Built motion from commit 67e5df37.|2.0.61 2.0.61
authorGiuseppe Careri <giuseppe.careri@xcally.com>
Thu, 28 Jun 2018 13:05:21 +0000 (15:05 +0200)
committerGiuseppe Careri <giuseppe.careri@xcally.com>
Thu, 28 Jun 2018 13:05:21 +0000 (15:05 +0200)
1018 files changed:
apidoc/api_project.js
apidoc/api_project.json
package.json
public/app/main/apps/analytics/i18n/da.json
public/app/main/apps/analytics/i18n/de.json
public/app/main/apps/analytics/i18n/en.json
public/app/main/apps/analytics/i18n/es.json
public/app/main/apps/analytics/i18n/fa.json
public/app/main/apps/analytics/i18n/fi.json
public/app/main/apps/analytics/i18n/fr.json
public/app/main/apps/analytics/i18n/hi.json
public/app/main/apps/analytics/i18n/it.json
public/app/main/apps/analytics/i18n/ja.json
public/app/main/apps/analytics/i18n/ko.json
public/app/main/apps/analytics/i18n/lv.json
public/app/main/apps/analytics/i18n/nl.json
public/app/main/apps/analytics/i18n/no.json
public/app/main/apps/analytics/i18n/pl.json
public/app/main/apps/analytics/i18n/pt-PT.json
public/app/main/apps/analytics/i18n/ru.json
public/app/main/apps/analytics/i18n/sv.json
public/app/main/apps/analytics/i18n/tr.json
public/app/main/apps/analytics/i18n/zh-CN.json
public/app/main/apps/analytics/i18n/zh-TW.json
public/app/main/apps/contactmanager/i18n/da.json
public/app/main/apps/contactmanager/i18n/de.json
public/app/main/apps/contactmanager/i18n/en.json
public/app/main/apps/contactmanager/i18n/es.json
public/app/main/apps/contactmanager/i18n/fa.json
public/app/main/apps/contactmanager/i18n/fi.json
public/app/main/apps/contactmanager/i18n/fr.json
public/app/main/apps/contactmanager/i18n/hi.json
public/app/main/apps/contactmanager/i18n/it.json
public/app/main/apps/contactmanager/i18n/ja.json
public/app/main/apps/contactmanager/i18n/ko.json
public/app/main/apps/contactmanager/i18n/lv.json
public/app/main/apps/contactmanager/i18n/nl.json
public/app/main/apps/contactmanager/i18n/no.json
public/app/main/apps/contactmanager/i18n/pl.json
public/app/main/apps/contactmanager/i18n/pt-PT.json
public/app/main/apps/contactmanager/i18n/ru.json
public/app/main/apps/contactmanager/i18n/sv.json
public/app/main/apps/contactmanager/i18n/tr.json
public/app/main/apps/contactmanager/i18n/zh-CN.json
public/app/main/apps/contactmanager/i18n/zh-TW.json
public/app/main/apps/dashboards/i18n/da.json
public/app/main/apps/dashboards/i18n/de.json
public/app/main/apps/dashboards/i18n/en.json
public/app/main/apps/dashboards/i18n/es.json
public/app/main/apps/dashboards/i18n/fa.json
public/app/main/apps/dashboards/i18n/fi.json
public/app/main/apps/dashboards/i18n/fr.json
public/app/main/apps/dashboards/i18n/hi.json
public/app/main/apps/dashboards/i18n/it.json
public/app/main/apps/dashboards/i18n/ja.json
public/app/main/apps/dashboards/i18n/ko.json
public/app/main/apps/dashboards/i18n/lv.json
public/app/main/apps/dashboards/i18n/nl.json
public/app/main/apps/dashboards/i18n/no.json
public/app/main/apps/dashboards/i18n/pl.json
public/app/main/apps/dashboards/i18n/pt-PT.json
public/app/main/apps/dashboards/i18n/ru.json
public/app/main/apps/dashboards/i18n/sv.json
public/app/main/apps/dashboards/i18n/tr.json
public/app/main/apps/dashboards/i18n/zh-CN.json
public/app/main/apps/dashboards/i18n/zh-TW.json
public/app/main/apps/settings/i18n/da.json
public/app/main/apps/settings/i18n/de.json
public/app/main/apps/settings/i18n/en.json
public/app/main/apps/settings/i18n/es.json
public/app/main/apps/settings/i18n/fa.json
public/app/main/apps/settings/i18n/fi.json
public/app/main/apps/settings/i18n/fr.json
public/app/main/apps/settings/i18n/hi.json
public/app/main/apps/settings/i18n/it.json
public/app/main/apps/settings/i18n/ja.json
public/app/main/apps/settings/i18n/ko.json
public/app/main/apps/settings/i18n/lv.json
public/app/main/apps/settings/i18n/nl.json
public/app/main/apps/settings/i18n/no.json
public/app/main/apps/settings/i18n/pl.json
public/app/main/apps/settings/i18n/pt-PT.json
public/app/main/apps/settings/i18n/ru.json
public/app/main/apps/settings/i18n/sv.json
public/app/main/apps/settings/i18n/tr.json
public/app/main/apps/settings/i18n/zh-CN.json
public/app/main/apps/settings/i18n/zh-TW.json
public/index.html
public/scripts/app.8d9b3829.js [moved from public/scripts/app.8e8e99e7.js with 52% 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/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/chatDisposition/chatDisposition.attributes.js
server/api/chatDisposition/chatDisposition.controller.js
server/api/chatDisposition/chatDisposition.model.js
server/api/chatDisposition/chatDisposition.rpc.js
server/api/chatDisposition/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.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/chatWebsite/chatWebsite.attributes.js
server/api/chatWebsite/chatWebsite.controller.js
server/api/chatWebsite/chatWebsite.model.js
server/api/chatWebsite/chatWebsite.rpc.js
server/api/chatWebsite/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/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/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/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/faxAccount/faxAccount.attributes.js
server/api/faxAccount/faxAccount.controller.js
server/api/faxAccount/faxAccount.model.js
server/api/faxAccount/faxAccount.rpc.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/faxDisposition/faxDisposition.attributes.js
server/api/faxDisposition/faxDisposition.controller.js
server/api/faxDisposition/faxDisposition.model.js
server/api/faxDisposition/faxDisposition.rpc.js
server/api/faxDisposition/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/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/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/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/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/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.model.js
server/api/mailAccount/mailAccount.rpc.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/mailDisposition/index.js
server/api/mailDisposition/mailDisposition.attributes.js
server/api/mailDisposition/mailDisposition.controller.js
server/api/mailDisposition/mailDisposition.model.js
server/api/mailDisposition/mailDisposition.rpc.js
server/api/mailInteraction/index.js
server/api/mailInteraction/mailInteraction.attributes.js
server/api/mailInteraction/mailInteraction.controller.js
server/api/mailInteraction/mailInteraction.events.js
server/api/mailInteraction/mailInteraction.model.js
server/api/mailInteraction/mailInteraction.rpc.js
server/api/mailInteraction/mailInteraction.socket.js
server/api/mailMessage/index.js
server/api/mailMessage/mailMessage.attributes.js
server/api/mailMessage/mailMessage.controller.js
server/api/mailMessage/mailMessage.events.js
server/api/mailMessage/mailMessage.model.js
server/api/mailMessage/mailMessage.rpc.js
server/api/mailMessage/mailMessage.socket.js
server/api/mailQueue/index.js
server/api/mailQueue/mailQueue.attributes.js
server/api/mailQueue/mailQueue.controller.js
server/api/mailQueue/mailQueue.events.js
server/api/mailQueue/mailQueue.model.js
server/api/mailQueue/mailQueue.rpc.js
server/api/mailQueue/mailQueue.socket.js
server/api/mailQueueReport/index.js
server/api/mailQueueReport/mailQueueReport.attributes.js
server/api/mailQueueReport/mailQueueReport.controller.js
server/api/mailQueueReport/mailQueueReport.model.js
server/api/mailQueueReport/mailQueueReport.rpc.js
server/api/mailServerIn/index.js
server/api/mailServerIn/mailServerIn.attributes.js
server/api/mailServerIn/mailServerIn.model.js
server/api/mailServerIn/mailServerIn.rpc.js
server/api/mailServerOut/index.js
server/api/mailServerOut/mailServerOut.attributes.js
server/api/mailServerOut/mailServerOut.controller.js
server/api/mailServerOut/mailServerOut.model.js
server/api/mailServerOut/mailServerOut.rpc.js
server/api/mailSubstatus/index.js
server/api/mailSubstatus/mailSubstatus.attributes.js
server/api/mailSubstatus/mailSubstatus.controller.js
server/api/mailSubstatus/mailSubstatus.model.js
server/api/mailSubstatus/mailSubstatus.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.model.js
server/api/openchannelAccount/openchannelAccount.rpc.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/openchannelDisposition/index.js
server/api/openchannelDisposition/openchannelDisposition.attributes.js
server/api/openchannelDisposition/openchannelDisposition.controller.js
server/api/openchannelDisposition/openchannelDisposition.model.js
server/api/openchannelDisposition/openchannelDisposition.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/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/pm2/index.js
server/api/pm2/pm2.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/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.model.js
server/api/smsAccount/smsAccount.rpc.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/smsDisposition/index.js
server/api/smsDisposition/smsDisposition.attributes.js
server/api/smsDisposition/smsDisposition.controller.js
server/api/smsDisposition/smsDisposition.model.js
server/api/smsDisposition/smsDisposition.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/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/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.model.js
server/api/squareProject/squareProject.rpc.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/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/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/userOpenchannelQueue/index.js
server/api/userOpenchannelQueue/userOpenchannelQueue.attributes.js
server/api/userOpenchannelQueue/userOpenchannelQueue.model.js
server/api/userOpenchannelQueue/userOpenchannelQueue.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/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/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/voiceDisposition/index.js
server/api/voiceDisposition/voiceDisposition.attributes.js
server/api/voiceDisposition/voiceDisposition.controller.js
server/api/voiceDisposition/voiceDisposition.model.js
server/api/voiceDisposition/voiceDisposition.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/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/app.js
server/components/auth/service.js
server/components/dashboards/run.js
server/components/encryptor/index.js
server/components/export/csv.js
server/components/export/pdf.js
server/components/export/xls.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/integrations/configuration.js
server/components/interaction/service.js
server/components/license/service.js
server/components/parsers/qs.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/index.js
server/config/seed.js
server/config/seedContact.js
server/config/seedUsers.js
server/config/socketio.js
server/config/triggers/index.js
server/config/utils.js
server/errors/index.js
server/migrations/2.0.61.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/graph/index.js
server/services/agi/index.js
server/services/agi/mailRpc/index.js
server/services/agi/reply.js
server/services/agi/rpc/index.js
server/services/agi/scripts/aws/index.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/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/action.js
server/services/ami/dialer/agentComplete.js
server/services/ami/dialer/final.js
server/services/ami/dialer/hangup.js
server/services/ami/dialer/history.js
server/services/ami/dialer/index.js
server/services/ami/dialer/queueCallerAbandon.js
server/services/ami/fax/action.js
server/services/ami/fax/channel.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/faxAccount.js
server/services/ami/model/freshdeskAccount.js
server/services/ami/model/queueReport.js
server/services/ami/model/salesforceAccount.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/voiceTrigger.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/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/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/freshdesk.js
server/services/ami/rpc/integrations/salesforce.js
server/services/ami/rpc/integrations/sugarcrm.js
server/services/ami/rpc/integrations/zendesk.js
server/services/ami/rpc/integrations/zoho.js
server/services/ami/rpc/memberReport.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/freshdesk.js
server/services/ami/trigger/integration/index.js
server/services/ami/trigger/integration/salesforce.js
server/services/ami/trigger/integration/sugarcrm.js
server/services/ami/trigger/integration/util.js
server/services/ami/trigger/integration/zendesk.js
server/services/ami/trigger/integration/zoho.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/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/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/server/applications/agent.js
server/services/routing/server/applications/autoreply.js
server/services/routing/server/applications/close.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/utils.js
server/services/routing/server/index.js
server/services/routing/server/interval.js

index 4ff94a1..d9c9356 100644 (file)
@@ -1 +1 @@
-define({\r  "name": "xCALLY Motion API",\r  "version": "2.0.60",\r  "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.",\r  "title": "xCALLY MOTION API",\r  "header": {\r    "title": "Introduction",\r    "content": "<h2>The API</h2>\n<p>This is the documentation for the xCALLY MOTION API.</p>\n<p>We make changes to the APIs from time to time. For more information, see <a href=\"https://wiki.xcallymotion.com/display/XMV/Motion+GUI\">Changelog</a>.</p>\n<p>The xCALLY MOTION API consists of several different APIs. Use the left sidebar menu to select one.</p>\n<p>The API is a JSON API. XML is not supported. To learn more, see [Working with JSON].</p>\n<p>Endpoints are documented with the HTTP method for the request and a partial resource identifier.\nExample:</p>\n<pre><code class=\"language-sh\">GET /api/users\n</code></pre>\n<p>Prepend your xCALLY URL to the resource identifier to get the full endpoint URL:</p>\n<pre><code class=\"language-sh\">https://motion.xcally.com/api/users\n</code></pre>\n<p>Curly braces, <code>{}</code>, indicate values you have to supply. Example:</p>\n<pre><code class=\"language-sh\">GET  /api/users/{id}\n</code></pre>\n<p>The examples in the docs are cURL statements. You can run the statements on a command line to try out different API requests. To learn more, see [Installing and using cURL]. In Windows, you'll need to modify some of the examples in the docs to make them work. See [Using cURL in Windows].</p>\n<p>The examples use basic authentication requiring a xCALLY username and password.</p>\n<h2>Security and Authentication</h2>\n<p>This is an SSL-only API, regardless of how your account is configured. You can authorize against the API using either basic authentication with your username and password or with an OAuth access token.</p>\n<p>Client-side CORS requests are supported if the request is authenticated with an OAuth access token. The requests are not supported if the request uses basic authentication or a xCALLY API token.</p>\n<h3>Basic authentication</h3>\n<p>Use the following authentication format with your username and password:\n<code>{username}:{password}</code></p>\n<p>Example:</p>\n<pre><code class=\"language-sh\">curl -u admin:password https://motion.xcally.com/api/users\n</code></pre>\n<h3>OAuth access token</h3>\n<p>The xCALLY API supports OAuth authorization flows.</p>\n<p>OAuth access tokens also permit client-side API requests.</p>\n<p>In your requests, specify the access token in an Authorization header as follows:\n<code>Authorization: Bearer {token}</code></p>\n<p>Example:</p>\n<pre><code class=\"language-sh\">curl -H &quot;Authorization: Bearer gErypPlm4dOVgGRvA1ZzMH5MQ3nLo8bo&quot; https://motion.xcally.com/api/users\n</code></pre>\n<h2>Request Format</h2>\n<p>The xCALLY API is a JSON API. You must supply a <code>Content-Type: application/json</code> header in <code>PUT</code> and <code>POST</code> requests. You must set an <code>Accept: application/json</code> header on all requests. You may get a <code>text/plain</code> response in case of an error like a bad request. You should treat this as an error you need to fix.</p>\n<h2>Response Format</h2>\n<p>The xCALLY API responds to successful requests with HTTP status codes in the 200 or 300 range. When you create or update a resource, the API renders the resulting JSON representation in the response body.</p>\n<p>Responses may have the status codes described in the following sections.</p>\n<h3>200 range</h3>\n<p>The request was successful. The status is 200 for successful GET and PUT requests, 201 for most POST requests, and 204 for DELETE requests.</p>\n<h3>400 range</h3>\n<p>The request was not successful. The content type of the response may be <code>text/plain</code> for API-level error messages, such as when trying to call the API without SSL. The content type is <code>application/json</code> for business-level error messages because the response includes a JSON object with information about the error.</p>\n<p>If you see a response from a known endpoint that looks like plain text, you probably made a syntax error in your request. This type of response commonly occurs when making a request to a nonexistent xCALLY Support instance.</p>\n<h3>500 range</h3>\n<p>When building an API client, we recommend treating any 500 status codes as a warning or temporary state. However, if the status persists and we don't have a publicly announced maintenance or service disruption, contact us at support@xcally.com.</p>\n<p>If submitting a ticket to Support, provide the complete HTTP response. This helps the Support team track down the request in the logs more quickly.</p>\n<h2>Data Types</h2>\n<p>The API returns and accepts JSON values, which can be strings in double quotes, numbers, objects, arrays, true or false, or null. Most programming languages have tools to parse this data.</p>\n<h2>ID integers</h2>\n<p>Most xCALLY Support resources such as queues and users are identified by the integer specified by the id attribute of API responses.</p>\n<p>The default numeric type in JavaScript, Ruby, Python, and PHP is sufficient to represent xCALLY Support ID integers.</p>\n<h2>Time stamps</h2>\n<p>Time stamps use UTC time and are formatted as ISO 8601 strings. Example: <code>2017-04-16T09:14:57Z</code></p>\n"\r  },\r  "template": {\r    "withGenerator": false,\r    "withCompare": false,\r    "forceLanguage": "en"\r  },\r  "sampleUrl": false,\r  "defaultVersion": "0.0.0",\r  "apidoc": "0.3.0",\r  "generator": {\r    "name": "apidoc",\r    "time": "2018-06-25T14:13:03.626Z",\r    "url": "http://apidocjs.com",\r    "version": "0.17.6"\r  }\r});
+define({\r  "name": "xCALLY Motion API",\r  "version": "2.0.61",\r  "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.",\r  "title": "xCALLY MOTION API",\r  "header": {\r    "title": "Introduction",\r    "content": "<h2>The API</h2>\n<p>This is the documentation for the xCALLY MOTION API.</p>\n<p>We make changes to the APIs from time to time. For more information, see <a href=\"https://wiki.xcallymotion.com/display/XMV/Motion+GUI\">Changelog</a>.</p>\n<p>The xCALLY MOTION API consists of several different APIs. Use the left sidebar menu to select one.</p>\n<p>The API is a JSON API. XML is not supported. To learn more, see [Working with JSON].</p>\n<p>Endpoints are documented with the HTTP method for the request and a partial resource identifier.\nExample:</p>\n<pre><code class=\"language-sh\">GET /api/users\n</code></pre>\n<p>Prepend your xCALLY URL to the resource identifier to get the full endpoint URL:</p>\n<pre><code class=\"language-sh\">https://motion.xcally.com/api/users\n</code></pre>\n<p>Curly braces, <code>{}</code>, indicate values you have to supply. Example:</p>\n<pre><code class=\"language-sh\">GET  /api/users/{id}\n</code></pre>\n<p>The examples in the docs are cURL statements. You can run the statements on a command line to try out different API requests. To learn more, see [Installing and using cURL]. In Windows, you'll need to modify some of the examples in the docs to make them work. See [Using cURL in Windows].</p>\n<p>The examples use basic authentication requiring a xCALLY username and password.</p>\n<h2>Security and Authentication</h2>\n<p>This is an SSL-only API, regardless of how your account is configured. You can authorize against the API using either basic authentication with your username and password or with an OAuth access token.</p>\n<p>Client-side CORS requests are supported if the request is authenticated with an OAuth access token. The requests are not supported if the request uses basic authentication or a xCALLY API token.</p>\n<h3>Basic authentication</h3>\n<p>Use the following authentication format with your username and password:\n<code>{username}:{password}</code></p>\n<p>Example:</p>\n<pre><code class=\"language-sh\">curl -u admin:password https://motion.xcally.com/api/users\n</code></pre>\n<h3>OAuth access token</h3>\n<p>The xCALLY API supports OAuth authorization flows.</p>\n<p>OAuth access tokens also permit client-side API requests.</p>\n<p>In your requests, specify the access token in an Authorization header as follows:\n<code>Authorization: Bearer {token}</code></p>\n<p>Example:</p>\n<pre><code class=\"language-sh\">curl -H &quot;Authorization: Bearer gErypPlm4dOVgGRvA1ZzMH5MQ3nLo8bo&quot; https://motion.xcally.com/api/users\n</code></pre>\n<h2>Request Format</h2>\n<p>The xCALLY API is a JSON API. You must supply a <code>Content-Type: application/json</code> header in <code>PUT</code> and <code>POST</code> requests. You must set an <code>Accept: application/json</code> header on all requests. You may get a <code>text/plain</code> response in case of an error like a bad request. You should treat this as an error you need to fix.</p>\n<h2>Response Format</h2>\n<p>The xCALLY API responds to successful requests with HTTP status codes in the 200 or 300 range. When you create or update a resource, the API renders the resulting JSON representation in the response body.</p>\n<p>Responses may have the status codes described in the following sections.</p>\n<h3>200 range</h3>\n<p>The request was successful. The status is 200 for successful GET and PUT requests, 201 for most POST requests, and 204 for DELETE requests.</p>\n<h3>400 range</h3>\n<p>The request was not successful. The content type of the response may be <code>text/plain</code> for API-level error messages, such as when trying to call the API without SSL. The content type is <code>application/json</code> for business-level error messages because the response includes a JSON object with information about the error.</p>\n<p>If you see a response from a known endpoint that looks like plain text, you probably made a syntax error in your request. This type of response commonly occurs when making a request to a nonexistent xCALLY Support instance.</p>\n<h3>500 range</h3>\n<p>When building an API client, we recommend treating any 500 status codes as a warning or temporary state. However, if the status persists and we don't have a publicly announced maintenance or service disruption, contact us at support@xcally.com.</p>\n<p>If submitting a ticket to Support, provide the complete HTTP response. This helps the Support team track down the request in the logs more quickly.</p>\n<h2>Data Types</h2>\n<p>The API returns and accepts JSON values, which can be strings in double quotes, numbers, objects, arrays, true or false, or null. Most programming languages have tools to parse this data.</p>\n<h2>ID integers</h2>\n<p>Most xCALLY Support resources such as queues and users are identified by the integer specified by the id attribute of API responses.</p>\n<p>The default numeric type in JavaScript, Ruby, Python, and PHP is sufficient to represent xCALLY Support ID integers.</p>\n<h2>Time stamps</h2>\n<p>Time stamps use UTC time and are formatted as ISO 8601 strings. Example: <code>2017-04-16T09:14:57Z</code></p>\n"\r  },\r  "template": {\r    "withGenerator": false,\r    "withCompare": false,\r    "forceLanguage": "en"\r  },\r  "sampleUrl": false,\r  "defaultVersion": "0.0.0",\r  "apidoc": "0.3.0",\r  "generator": {\r    "name": "apidoc",\r    "time": "2018-06-28T12:56:08.861Z",\r    "url": "http://apidocjs.com",\r    "version": "0.17.6"\r  }\r});
index 7174f81..a8dd052 100644 (file)
@@ -1 +1 @@
-{\r  "name": "xCALLY Motion API",\r  "version": "2.0.60",\r  "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.",\r  "title": "xCALLY MOTION API",\r  "header": {\r    "title": "Introduction",\r    "content": "<h2>The API</h2>\n<p>This is the documentation for the xCALLY MOTION API.</p>\n<p>We make changes to the APIs from time to time. For more information, see <a href=\"https://wiki.xcallymotion.com/display/XMV/Motion+GUI\">Changelog</a>.</p>\n<p>The xCALLY MOTION API consists of several different APIs. Use the left sidebar menu to select one.</p>\n<p>The API is a JSON API. XML is not supported. To learn more, see [Working with JSON].</p>\n<p>Endpoints are documented with the HTTP method for the request and a partial resource identifier.\nExample:</p>\n<pre><code class=\"language-sh\">GET /api/users\n</code></pre>\n<p>Prepend your xCALLY URL to the resource identifier to get the full endpoint URL:</p>\n<pre><code class=\"language-sh\">https://motion.xcally.com/api/users\n</code></pre>\n<p>Curly braces, <code>{}</code>, indicate values you have to supply. Example:</p>\n<pre><code class=\"language-sh\">GET  /api/users/{id}\n</code></pre>\n<p>The examples in the docs are cURL statements. You can run the statements on a command line to try out different API requests. To learn more, see [Installing and using cURL]. In Windows, you'll need to modify some of the examples in the docs to make them work. See [Using cURL in Windows].</p>\n<p>The examples use basic authentication requiring a xCALLY username and password.</p>\n<h2>Security and Authentication</h2>\n<p>This is an SSL-only API, regardless of how your account is configured. You can authorize against the API using either basic authentication with your username and password or with an OAuth access token.</p>\n<p>Client-side CORS requests are supported if the request is authenticated with an OAuth access token. The requests are not supported if the request uses basic authentication or a xCALLY API token.</p>\n<h3>Basic authentication</h3>\n<p>Use the following authentication format with your username and password:\n<code>{username}:{password}</code></p>\n<p>Example:</p>\n<pre><code class=\"language-sh\">curl -u admin:password https://motion.xcally.com/api/users\n</code></pre>\n<h3>OAuth access token</h3>\n<p>The xCALLY API supports OAuth authorization flows.</p>\n<p>OAuth access tokens also permit client-side API requests.</p>\n<p>In your requests, specify the access token in an Authorization header as follows:\n<code>Authorization: Bearer {token}</code></p>\n<p>Example:</p>\n<pre><code class=\"language-sh\">curl -H &quot;Authorization: Bearer gErypPlm4dOVgGRvA1ZzMH5MQ3nLo8bo&quot; https://motion.xcally.com/api/users\n</code></pre>\n<h2>Request Format</h2>\n<p>The xCALLY API is a JSON API. You must supply a <code>Content-Type: application/json</code> header in <code>PUT</code> and <code>POST</code> requests. You must set an <code>Accept: application/json</code> header on all requests. You may get a <code>text/plain</code> response in case of an error like a bad request. You should treat this as an error you need to fix.</p>\n<h2>Response Format</h2>\n<p>The xCALLY API responds to successful requests with HTTP status codes in the 200 or 300 range. When you create or update a resource, the API renders the resulting JSON representation in the response body.</p>\n<p>Responses may have the status codes described in the following sections.</p>\n<h3>200 range</h3>\n<p>The request was successful. The status is 200 for successful GET and PUT requests, 201 for most POST requests, and 204 for DELETE requests.</p>\n<h3>400 range</h3>\n<p>The request was not successful. The content type of the response may be <code>text/plain</code> for API-level error messages, such as when trying to call the API without SSL. The content type is <code>application/json</code> for business-level error messages because the response includes a JSON object with information about the error.</p>\n<p>If you see a response from a known endpoint that looks like plain text, you probably made a syntax error in your request. This type of response commonly occurs when making a request to a nonexistent xCALLY Support instance.</p>\n<h3>500 range</h3>\n<p>When building an API client, we recommend treating any 500 status codes as a warning or temporary state. However, if the status persists and we don't have a publicly announced maintenance or service disruption, contact us at support@xcally.com.</p>\n<p>If submitting a ticket to Support, provide the complete HTTP response. This helps the Support team track down the request in the logs more quickly.</p>\n<h2>Data Types</h2>\n<p>The API returns and accepts JSON values, which can be strings in double quotes, numbers, objects, arrays, true or false, or null. Most programming languages have tools to parse this data.</p>\n<h2>ID integers</h2>\n<p>Most xCALLY Support resources such as queues and users are identified by the integer specified by the id attribute of API responses.</p>\n<p>The default numeric type in JavaScript, Ruby, Python, and PHP is sufficient to represent xCALLY Support ID integers.</p>\n<h2>Time stamps</h2>\n<p>Time stamps use UTC time and are formatted as ISO 8601 strings. Example: <code>2017-04-16T09:14:57Z</code></p>\n"\r  },\r  "template": {\r    "withGenerator": false,\r    "withCompare": false,\r    "forceLanguage": "en"\r  },\r  "sampleUrl": false,\r  "defaultVersion": "0.0.0",\r  "apidoc": "0.3.0",\r  "generator": {\r    "name": "apidoc",\r    "time": "2018-06-25T14:13:03.626Z",\r    "url": "http://apidocjs.com",\r    "version": "0.17.6"\r  }\r}
+{\r  "name": "xCALLY Motion API",\r  "version": "2.0.61",\r  "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.",\r  "title": "xCALLY MOTION API",\r  "header": {\r    "title": "Introduction",\r    "content": "<h2>The API</h2>\n<p>This is the documentation for the xCALLY MOTION API.</p>\n<p>We make changes to the APIs from time to time. For more information, see <a href=\"https://wiki.xcallymotion.com/display/XMV/Motion+GUI\">Changelog</a>.</p>\n<p>The xCALLY MOTION API consists of several different APIs. Use the left sidebar menu to select one.</p>\n<p>The API is a JSON API. XML is not supported. To learn more, see [Working with JSON].</p>\n<p>Endpoints are documented with the HTTP method for the request and a partial resource identifier.\nExample:</p>\n<pre><code class=\"language-sh\">GET /api/users\n</code></pre>\n<p>Prepend your xCALLY URL to the resource identifier to get the full endpoint URL:</p>\n<pre><code class=\"language-sh\">https://motion.xcally.com/api/users\n</code></pre>\n<p>Curly braces, <code>{}</code>, indicate values you have to supply. Example:</p>\n<pre><code class=\"language-sh\">GET  /api/users/{id}\n</code></pre>\n<p>The examples in the docs are cURL statements. You can run the statements on a command line to try out different API requests. To learn more, see [Installing and using cURL]. In Windows, you'll need to modify some of the examples in the docs to make them work. See [Using cURL in Windows].</p>\n<p>The examples use basic authentication requiring a xCALLY username and password.</p>\n<h2>Security and Authentication</h2>\n<p>This is an SSL-only API, regardless of how your account is configured. You can authorize against the API using either basic authentication with your username and password or with an OAuth access token.</p>\n<p>Client-side CORS requests are supported if the request is authenticated with an OAuth access token. The requests are not supported if the request uses basic authentication or a xCALLY API token.</p>\n<h3>Basic authentication</h3>\n<p>Use the following authentication format with your username and password:\n<code>{username}:{password}</code></p>\n<p>Example:</p>\n<pre><code class=\"language-sh\">curl -u admin:password https://motion.xcally.com/api/users\n</code></pre>\n<h3>OAuth access token</h3>\n<p>The xCALLY API supports OAuth authorization flows.</p>\n<p>OAuth access tokens also permit client-side API requests.</p>\n<p>In your requests, specify the access token in an Authorization header as follows:\n<code>Authorization: Bearer {token}</code></p>\n<p>Example:</p>\n<pre><code class=\"language-sh\">curl -H &quot;Authorization: Bearer gErypPlm4dOVgGRvA1ZzMH5MQ3nLo8bo&quot; https://motion.xcally.com/api/users\n</code></pre>\n<h2>Request Format</h2>\n<p>The xCALLY API is a JSON API. You must supply a <code>Content-Type: application/json</code> header in <code>PUT</code> and <code>POST</code> requests. You must set an <code>Accept: application/json</code> header on all requests. You may get a <code>text/plain</code> response in case of an error like a bad request. You should treat this as an error you need to fix.</p>\n<h2>Response Format</h2>\n<p>The xCALLY API responds to successful requests with HTTP status codes in the 200 or 300 range. When you create or update a resource, the API renders the resulting JSON representation in the response body.</p>\n<p>Responses may have the status codes described in the following sections.</p>\n<h3>200 range</h3>\n<p>The request was successful. The status is 200 for successful GET and PUT requests, 201 for most POST requests, and 204 for DELETE requests.</p>\n<h3>400 range</h3>\n<p>The request was not successful. The content type of the response may be <code>text/plain</code> for API-level error messages, such as when trying to call the API without SSL. The content type is <code>application/json</code> for business-level error messages because the response includes a JSON object with information about the error.</p>\n<p>If you see a response from a known endpoint that looks like plain text, you probably made a syntax error in your request. This type of response commonly occurs when making a request to a nonexistent xCALLY Support instance.</p>\n<h3>500 range</h3>\n<p>When building an API client, we recommend treating any 500 status codes as a warning or temporary state. However, if the status persists and we don't have a publicly announced maintenance or service disruption, contact us at support@xcally.com.</p>\n<p>If submitting a ticket to Support, provide the complete HTTP response. This helps the Support team track down the request in the logs more quickly.</p>\n<h2>Data Types</h2>\n<p>The API returns and accepts JSON values, which can be strings in double quotes, numbers, objects, arrays, true or false, or null. Most programming languages have tools to parse this data.</p>\n<h2>ID integers</h2>\n<p>Most xCALLY Support resources such as queues and users are identified by the integer specified by the id attribute of API responses.</p>\n<p>The default numeric type in JavaScript, Ruby, Python, and PHP is sufficient to represent xCALLY Support ID integers.</p>\n<h2>Time stamps</h2>\n<p>Time stamps use UTC time and are formatted as ISO 8601 strings. Example: <code>2017-04-16T09:14:57Z</code></p>\n"\r  },\r  "template": {\r    "withGenerator": false,\r    "withCompare": false,\r    "forceLanguage": "en"\r  },\r  "sampleUrl": false,\r  "defaultVersion": "0.0.0",\r  "apidoc": "0.3.0",\r  "generator": {\r    "name": "apidoc",\r    "time": "2018-06-28T12:56:08.861Z",\r    "url": "http://apidocjs.com",\r    "version": "0.17.6"\r  }\r}
index 33c0934..f8e3d17 100644 (file)
@@ -1,6 +1,6 @@
 {
     "name": "motion",
-    "version": "2.0.60",
+    "version": "2.0.61",
     "description": "xCALLY Motion is the new Realtime asynchronous solution for your multichannel contact center over Asterisk.",
     "main": "server/app.js",
     "engines": {
index 2e6b581..bdbeef4 100644 (file)
@@ -82,6 +82,7 @@
         "ROWSPERPAGE": "Rækker pr. side",
         "OF": "Af",
         "DELETE": "Slet",
-        "REPORTNAME": "Rapportnavn"
+        "REPORTNAME": "Rapportnavn",
+        "SEND_IF_EMPTY": "Send hvis tom"
     }
 }
\ No newline at end of file
index f370e3c..1b628be 100644 (file)
@@ -82,6 +82,7 @@
         "ROWSPERPAGE": "Zeilen pro Seite",
         "OF": "Von",
         "DELETE": "Löschen",
-        "REPORTNAME": "Berichtsname"
+        "REPORTNAME": "Berichtsname",
+        "SEND_IF_EMPTY": "Senden, wenn leer"
     }
 }
\ No newline at end of file
index 420587e..ca6ffb9 100644 (file)
@@ -1,5 +1,6 @@
 {
     "ANALYTICS": {
+        "SEND_IF_EMPTY": "Send if empty",
         "REPORTNAME": "Report Name",
         "DELETE": "Delete",
         "NAME": "Name",
index 1f87790..7b472a5 100644 (file)
@@ -82,6 +82,7 @@
         "STATUS": "Estado",
         "TABLE": "Mesa",
         "TYPE": "Tipo",
-        "VALUE": "Valor"
+        "VALUE": "Valor",
+        "SEND_IF_EMPTY": "Enviar si está vacío"
     }
 }
\ No newline at end of file
index d8629b1..6fda154 100644 (file)
@@ -82,6 +82,7 @@
         "ROWSPERPAGE": "رديف در صفحه",
         "OF": "از",
         "DELETE": "حذف",
-        "REPORTNAME": "نام گزارش"
+        "REPORTNAME": "نام گزارش",
+        "SEND_IF_EMPTY": "ارسال کنید اگر خالی باشد"
     }
 }
\ No newline at end of file
index ae3ee06..4f7b684 100644 (file)
@@ -82,6 +82,7 @@
         "ROWSPERPAGE": "Riviä sivulle",
         "OF": ",",
         "DELETE": "Poistaa",
-        "REPORTNAME": "Raportin nimi"
+        "REPORTNAME": "Raportin nimi",
+        "SEND_IF_EMPTY": "Lähetä, jos se on tyhjä"
     }
 }
\ No newline at end of file
index 5cdccc1..9dd404f 100644 (file)
@@ -82,6 +82,7 @@
         "ROWSPERPAGE": "Lignes par page",
         "OF": "Sur",
         "DELETE": "Effacer",
-        "REPORTNAME": "Nom du rapport"
+        "REPORTNAME": "Nom du rapport",
+        "SEND_IF_EMPTY": "Envoyer si vide"
     }
 }
\ No newline at end of file
index af8d5b7..eb3b019 100644 (file)
@@ -82,6 +82,7 @@
         "ROWSPERPAGE": "पंक्तियां प्रति पृष्ठ",
         "OF": "की",
         "DELETE": "हटाना",
-        "REPORTNAME": "रिपोर्ट नाम"
+        "REPORTNAME": "रिपोर्ट नाम",
+        "SEND_IF_EMPTY": "खाली अगर भेजें"
     }
 }
\ No newline at end of file
index a374558..b02c532 100644 (file)
@@ -1,5 +1,6 @@
 {
     "ANALYTICS": {
+        "SEND_IF_EMPTY": "Invia se vuoto",
         "REPORTNAME": "Nome Report",
         "DELETE": "Elimina",
         "NAME": "Nome",
index ea129c1..2dc306f 100644 (file)
@@ -82,6 +82,7 @@
         "STATUS": "状態",
         "TABLE": "表",
         "TYPE": "タイプ",
-        "VALUE": "値"
+        "VALUE": "値",
+        "SEND_IF_EMPTY": "空の場合に送信する"
     }
 }
\ No newline at end of file
index 618e6ea..28a3f75 100644 (file)
@@ -82,6 +82,7 @@
         "ROWSPERPAGE": "페이지 당 행",
         "OF": "중",
         "DELETE": "지우다",
-        "REPORTNAME": "보고서 이름"
+        "REPORTNAME": "보고서 이름",
+        "SEND_IF_EMPTY": "비어 있으면 보내기"
     }
 }
\ No newline at end of file
index e156c1c..365ecf7 100644 (file)
@@ -82,6 +82,7 @@
         "ROWSPERPAGE": "Rindas vienā lappusē",
         "OF": "no",
         "DELETE": "Dzēst",
-        "REPORTNAME": "Ziņojuma nosaukums"
+        "REPORTNAME": "Ziņojuma nosaukums",
+        "SEND_IF_EMPTY": "Sūtīt, ja ir tukšs"
     }
 }
\ No newline at end of file
index 154d518..0a390ef 100644 (file)
@@ -82,6 +82,7 @@
         "ROWSPERPAGE": "Rijen per pagina",
         "OF": "Van",
         "DELETE": "Verwijder",
-        "REPORTNAME": "Rapportnaam"
+        "REPORTNAME": "Rapportnaam",
+        "SEND_IF_EMPTY": "Verstuur als leeg"
     }
 }
\ No newline at end of file
index 680603e..dacc55d 100644 (file)
@@ -82,6 +82,7 @@
         "ROWSPERPAGE": "Linjer per side",
         "OF": "Av",
         "DELETE": "Slett",
-        "REPORTNAME": "Rapportnavn"
+        "REPORTNAME": "Rapportnavn",
+        "SEND_IF_EMPTY": "Send hvis tom"
     }
 }
\ No newline at end of file
index 643f910..cb03f0d 100644 (file)
@@ -82,6 +82,7 @@
         "ROWSPERPAGE": "Wierszy na stronie",
         "OF": "z",
         "DELETE": "Kasować",
-        "REPORTNAME": "Nazwa raportu"
+        "REPORTNAME": "Nazwa raportu",
+        "SEND_IF_EMPTY": "Wyślij, jeśli jest pusty"
     }
 }
\ No newline at end of file
index 0092b62..815daea 100644 (file)
@@ -82,6 +82,7 @@
         "ROWSPERPAGE": "Linhas por página",
         "OF": "De",
         "DELETE": "Excluir",
-        "REPORTNAME": "Nome do relatório"
+        "REPORTNAME": "Nome do relatório",
+        "SEND_IF_EMPTY": "Enviar se vazio"
     }
 }
\ No newline at end of file
index 0a416bb..8a155b1 100644 (file)
@@ -82,6 +82,7 @@
         "ROWSPERPAGE": "Строк на странице",
         "OF": "В",
         "DELETE": "Удалить",
-        "REPORTNAME": "Название отчета"
+        "REPORTNAME": "Название отчета",
+        "SEND_IF_EMPTY": "Отправить, если пусто"
     }
 }
\ No newline at end of file
index 31283c5..317d3f9 100644 (file)
@@ -82,6 +82,7 @@
         "ROWSPERPAGE": "Rader per sida",
         "OF": "av",
         "DELETE": "Radera",
-        "REPORTNAME": "Rapportnamn"
+        "REPORTNAME": "Rapportnamn",
+        "SEND_IF_EMPTY": "Skicka om den är tom"
     }
 }
\ No newline at end of file
index 3f33396..abf27b3 100644 (file)
@@ -82,6 +82,7 @@
         "ROWSPERPAGE": "Sayfadaki satırları",
         "OF": "Ve",
         "DELETE": "silmek",
-        "REPORTNAME": "Rapor Adı"
+        "REPORTNAME": "Rapor Adı",
+        "SEND_IF_EMPTY": "Boş gönder"
     }
 }
\ No newline at end of file
index d8ea844..305126a 100644 (file)
@@ -82,6 +82,7 @@
         "ROWSPERPAGE": "每页的行数。",
         "OF": "的",
         "DELETE": "删除",
-        "REPORTNAME": "报告名称"
+        "REPORTNAME": "报告名称",
+        "SEND_IF_EMPTY": "如果空的话发送"
     }
 }
\ No newline at end of file
index 7039e53..d10c8c6 100644 (file)
@@ -82,6 +82,7 @@
         "ROWSPERPAGE": "每頁行數",
         "OF": "的",
         "DELETE": "刪除",
-        "REPORTNAME": "報告名稱"
+        "REPORTNAME": "報告名稱",
+        "SEND_IF_EMPTY": "如果空的話發送"
     }
 }
\ No newline at end of file
index 8c32a3f..30cc78f 100644 (file)
         "MOTIONDIALER": "Motion Bull",
         "PREFIX": "Dial Prefix",
         "PRIORITY": "Prioritet",
-        "USERID": "Husk agent ID"
+        "USERID": "Husk agent ID",
+        "CUSTOMER_JOURNEY": "Kunderejse"
     }
 }
\ No newline at end of file
index 70c759d..d663aa8 100644 (file)
         "MOTIONDIALER": "Motion Bull",
         "PREFIX": "Vorwahl wählen",
         "PRIORITY": "Priorität",
-        "USERID": "Rückruf der Agenten-ID"
+        "USERID": "Rückruf der Agenten-ID",
+        "CUSTOMER_JOURNEY": "Kundenreise"
     }
 }
\ No newline at end of file
index 57d2ffb..36e8c17 100644 (file)
@@ -1,5 +1,6 @@
 {
     "CONTACTMANAGER": {
+        "CUSTOMER_JOURNEY": "Customer Journey",
         "USERID": "Recall Agent ID",
         "PRIORITY": "Priority",
         "MOTIONDIALER": "Motion Bull",
index 810549e..680db03 100644 (file)
         "VAT": "TINA",
         "VOICEDISPOSITIONS": "Disposiciones de voz",
         "VOICEQUEUEID": "ID de VoiceQueue",
-        "WEBSITE": "Sitio web"
+        "WEBSITE": "Sitio web",
+        "CUSTOMER_JOURNEY": "Viaje del cliente"
     }
 }
\ No newline at end of file
index bb1848f..4e72f5e 100644 (file)
         "MOTIONDIALER": "حرکت بول",
         "PREFIX": "پیشوند شماره گیری کنید",
         "PRIORITY": "اولویت",
-        "USERID": "به یادآوری شناسه نمایندگی"
+        "USERID": "به یادآوری شناسه نمایندگی",
+        "CUSTOMER_JOURNEY": "سفر مشتری"
     }
 }
\ No newline at end of file
index dd2df1b..eb439b3 100644 (file)
         "MOTIONDIALER": "Motion Bull",
         "PREFIX": "Dial Prefix",
         "PRIORITY": "prioriteetti",
-        "USERID": "Recall Agent ID"
+        "USERID": "Recall Agent ID",
+        "CUSTOMER_JOURNEY": "Asiakasreitti"
     }
 }
\ No newline at end of file
index 1d2653f..a2f6596 100644 (file)
         "MOTIONDIALER": "Motion Bull",
         "PREFIX": "Préfixe de numérotation",
         "PRIORITY": "Priorité",
-        "USERID": "Identifiant de l'agent de rappel"
+        "USERID": "Identifiant de l'agent de rappel",
+        "CUSTOMER_JOURNEY": "Voyage du client"
     }
 }
\ No newline at end of file
index 153b61d..c7cef86 100644 (file)
         "MOTIONDIALER": "मोशन बुल",
         "PREFIX": "डायल उपसर्ग",
         "PRIORITY": "प्राथमिकता",
-        "USERID": "एजेंट आईडी याद करें"
+        "USERID": "एजेंट आईडी याद करें",
+        "CUSTOMER_JOURNEY": "ग्राहक का यात्रा"
     }
 }
\ No newline at end of file
index 34045d3..f48cd74 100644 (file)
@@ -1,5 +1,6 @@
 {
     "CONTACTMANAGER": {
+        "CUSTOMER_JOURNEY": "Customer Journey",
         "PREFIX": "Prefisso di chiamata",
         "VOICEQUEUEID": "VoiceQueue ID",
         "CAMPAIGNID": "Campaign ID",
index bff1e03..3ab3f4b 100644 (file)
         "VAT": "バット",
         "VOICEDISPOSITIONS": "音声処理",
         "VOICEQUEUEID": "VoiceQueue ID",
-        "WEBSITE": "ウェブサイト"
+        "WEBSITE": "ウェブサイト",
+        "CUSTOMER_JOURNEY": "顧客の旅"
     }
 }
\ No newline at end of file
index 5705440..48c4154 100644 (file)
         "MOTIONDIALER": "모션 불",
         "PREFIX": "다이얼 접두사",
         "PRIORITY": "우선 순위",
-        "USERID": "리콜 에이전트 ID"
+        "USERID": "리콜 에이전트 ID",
+        "CUSTOMER_JOURNEY": "고객 여정"
     }
 }
\ No newline at end of file
index 5d5a1fc..9cc4857 100644 (file)
         "MOTIONDIALER": "Motion Bull",
         "PREFIX": "Ciparu prefikss",
         "PRIORITY": "Prioritāte",
-        "USERID": "Atsaukt aģenta ID"
+        "USERID": "Atsaukt aģenta ID",
+        "CUSTOMER_JOURNEY": "Klientu brauciens"
     }
 }
\ No newline at end of file
index f273394..b14fba2 100644 (file)
         "MOTIONDIALER": "Motion Bull",
         "PREFIX": "Kies prefix",
         "PRIORITY": "Prioriteit",
-        "USERID": "Recall Agent ID"
+        "USERID": "Recall Agent ID",
+        "CUSTOMER_JOURNEY": "Customer Journey"
     }
 }
\ No newline at end of file
index 7c391b7..028f491 100644 (file)
         "MOTIONDIALER": "Motion Bull",
         "PREFIX": "Dial Prefix",
         "PRIORITY": "Prioritet",
-        "USERID": "Husk agent-ID"
+        "USERID": "Husk agent-ID",
+        "CUSTOMER_JOURNEY": "Kunde Reise"
     }
 }
\ No newline at end of file
index 40b0f66..a955b13 100644 (file)
         "MOTIONDIALER": "Motion Bull",
         "PREFIX": "Dial Prefiks",
         "PRIORITY": "Priorytet",
-        "USERID": "Przypomnij identyfikator agenta"
+        "USERID": "Przypomnij identyfikator agenta",
+        "CUSTOMER_JOURNEY": "Podróż klienta"
     }
 }
\ No newline at end of file
index ae769eb..7aaff4e 100644 (file)
         "MOTIONDIALER": "Motion Bull",
         "PREFIX": "Prefixo de discagem",
         "PRIORITY": "Prioridade",
-        "USERID": "ID do agente de recall"
+        "USERID": "ID do agente de recall",
+        "CUSTOMER_JOURNEY": "Viagem do cliente"
     }
 }
\ No newline at end of file
index 3b4cef8..7bfd805 100644 (file)
         "MOTIONDIALER": "Motion Bull",
         "PREFIX": "Префикс набора",
         "PRIORITY": "приоритет",
-        "USERID": "Идентификатор агента возврата"
+        "USERID": "Идентификатор агента возврата",
+        "CUSTOMER_JOURNEY": "Путешествие клиента"
     }
 }
\ No newline at end of file
index 5e86e53..8533a41 100644 (file)
         "MOTIONDIALER": "Motion Bull",
         "PREFIX": "Dial Prefix",
         "PRIORITY": "Prioritet",
-        "USERID": "Återkalla agent-ID"
+        "USERID": "Återkalla agent-ID",
+        "CUSTOMER_JOURNEY": "Kundresa"
     }
 }
\ No newline at end of file
index 26490db..f8ccb3f 100644 (file)
         "MOTIONDIALER": "Hareket boğa",
         "PREFIX": "Arama Öneki",
         "PRIORITY": "öncelik",
-        "USERID": "Geri Çağırma Aracı Kimliği"
+        "USERID": "Geri Çağırma Aracı Kimliği",
+        "CUSTOMER_JOURNEY": "Müşteri yolculuğu"
     }
 }
\ No newline at end of file
index 830bc03..ee9fe82 100644 (file)
         "MOTIONDIALER": "Motion Bull",
         "PREFIX": "拨号前缀",
         "PRIORITY": "优先",
-        "USERID": "召回代理商ID"
+        "USERID": "召回代理商ID",
+        "CUSTOMER_JOURNEY": "客户之旅"
     }
 }
\ No newline at end of file
index 9c42a4d..274f3d2 100644 (file)
         "MOTIONDIALER": "Motion Bull",
         "PREFIX": "撥號前綴",
         "PRIORITY": "優先",
-        "USERID": "召回代理商ID"
+        "USERID": "召回代理商ID",
+        "CUSTOMER_JOURNEY": "客戶之旅"
     }
 }
\ No newline at end of file
index accfcad..a807388 100644 (file)
         "ASSIGNTO": "Tildel til",
         "CLICKRELOAD": "Nye opgivne opkald! Genindlæs venligst",
         "NOTAVAILABLE": "Ikke tilgængelig",
-        "CURRENTLY_IN_USE_BY": "I øjeblikket i brug af"
+        "CURRENTLY_IN_USE_BY": "I øjeblikket i brug af",
+        "CUSTOMER_JOURNEY": "Kunderejse",
+        "NO_DATA_AVAILABLE": "Ingen tilgængelig data"
     }
 }
\ No newline at end of file
index 151bdd8..5e9f39b 100644 (file)
         "ASSIGNTO": "Zuweisen",
         "CLICKRELOAD": "Neue aufgegebene Anrufe! Bitte neu laden",
         "NOTAVAILABLE": "Nicht verfügbar",
-        "CURRENTLY_IN_USE_BY": "Derzeit im Einsatz von"
+        "CURRENTLY_IN_USE_BY": "Derzeit im Einsatz von",
+        "CUSTOMER_JOURNEY": "Kundenreise",
+        "NO_DATA_AVAILABLE": "Keine Daten verfügbar"
     }
 }
\ No newline at end of file
index eebca94..5bd0d65 100644 (file)
@@ -1,5 +1,7 @@
 {
     "DASHBOARDS": {
+        "NO_DATA_AVAILABLE": "No data available",
+        "CUSTOMER_JOURNEY": "Customer Journey",
         "ME": "Me",
         "CURRENTLY_IN_USE_BY": "Currently in use by",
         "NOTAVAILABLE": "Not available",
index 1ac0d7a..1c52002 100644 (file)
         "ASSIGNTO": "Asignar a",
         "CLICKRELOAD": "Nuevas llamadas abandonadas! Recargar por favor",
         "NOTAVAILABLE": "No disponible",
-        "CURRENTLY_IN_USE_BY": "Actualmente en uso por"
+        "CURRENTLY_IN_USE_BY": "Actualmente en uso por",
+        "CUSTOMER_JOURNEY": "Viaje del cliente",
+        "NO_DATA_AVAILABLE": "Datos no disponibles"
     }
 }
\ No newline at end of file
index c605465..aa7dcec 100644 (file)
         "ASSIGNTO": "اختصاص به",
         "CLICKRELOAD": "تماس های رها شده جدید! بارگیری مجدد لطفا",
         "NOTAVAILABLE": "در دسترس نیست",
-        "CURRENTLY_IN_USE_BY": "در حال حاضر در استفاده از"
+        "CURRENTLY_IN_USE_BY": "در حال حاضر در استفاده از",
+        "CUSTOMER_JOURNEY": "سفر مشتری",
+        "NO_DATA_AVAILABLE": "اطلاعاتی موجود نیست"
     }
 }
\ No newline at end of file
index 6108f18..6a3a35a 100644 (file)
         "ASSIGNTO": "Määritä kohteeseen",
         "CLICKRELOAD": "Uudet hylätyt puhelut! Lataa uudelleen",
         "NOTAVAILABLE": "Ei saatavilla",
-        "CURRENTLY_IN_USE_BY": "Käytössä tällä hetkellä"
+        "CURRENTLY_IN_USE_BY": "Käytössä tällä hetkellä",
+        "CUSTOMER_JOURNEY": "Asiakasreitti",
+        "NO_DATA_AVAILABLE": "Tietoja ei ole saatavilla"
     }
 }
\ No newline at end of file
index 3461307..c3b9f11 100644 (file)
         "ASSIGNTO": "Affecter à",
         "CLICKRELOAD": "Nouveaux appels abandonnés! Rechargez s'il vous plaît",
         "NOTAVAILABLE": "Indisponible",
-        "CURRENTLY_IN_USE_BY": "Actuellement utilisé par"
+        "CURRENTLY_IN_USE_BY": "Actuellement utilisé par",
+        "CUSTOMER_JOURNEY": "Voyage du client",
+        "NO_DATA_AVAILABLE": "Pas de données disponibles"
     }
 }
\ No newline at end of file
index 0820730..6d0ff35 100644 (file)
         "ASSIGNTO": "को आवंटित",
         "CLICKRELOAD": "नई त्याग की कॉल! कृपया पुनः लोड करें",
         "NOTAVAILABLE": "उपलब्ध नहीं है",
-        "CURRENTLY_IN_USE_BY": "वर्तमान में उपयोग में"
+        "CURRENTLY_IN_USE_BY": "वर्तमान में उपयोग में",
+        "CUSTOMER_JOURNEY": "ग्राहक का यात्रा",
+        "NO_DATA_AVAILABLE": "कोई डेटा उपलब्ध नहीं है"
     }
 }
\ No newline at end of file
index b758ce2..cf08233 100644 (file)
@@ -1,5 +1,7 @@
 {
     "DASHBOARDS": {
+        "NO_DATA_AVAILABLE": "Nessun dato disponibile",
+        "CUSTOMER_JOURNEY": "Customer Journey",
         "ME": "Mio",
         "CURRENTLY_IN_USE_BY": "Attualmente in uso da",
         "NOTAVAILABLE": "Non disponibile",
index 1f486e6..6d094d5 100644 (file)
         "WED": "水",
         "WELCOME_MESSAGE": "利用可能なセクションをナビゲートするには、左側のサイドバーを使用します",
         "WELCOME_TO_MOTION": "モーションへようこそ",
-        "YESTERDAY": "昨日"
+        "YESTERDAY": "昨日",
+        "CUSTOMER_JOURNEY": "顧客の旅",
+        "NO_DATA_AVAILABLE": "データなし"
     }
 }
\ No newline at end of file
index 4b2a416..eff2cb8 100644 (file)
         "ASSIGNTO": "에 할당",
         "CLICKRELOAD": "새로운 버려진 전화! 다시로드하십시오.",
         "NOTAVAILABLE": "사용 불가",
-        "CURRENTLY_IN_USE_BY": "현재 사용중인"
+        "CURRENTLY_IN_USE_BY": "현재 사용중인",
+        "CUSTOMER_JOURNEY": "고객 여정",
+        "NO_DATA_AVAILABLE": "자료 없음"
     }
 }
\ No newline at end of file
index 15afe42..865ab89 100644 (file)
         "ASSIGNTO": "Piešķirt",
         "CLICKRELOAD": "Jauni pameti zvani! Pārlādēt, lūdzu",
         "NOTAVAILABLE": "Nav pieejams",
-        "CURRENTLY_IN_USE_BY": "Šobrīd to izmanto"
+        "CURRENTLY_IN_USE_BY": "Šobrīd to izmanto",
+        "CUSTOMER_JOURNEY": "Klientu brauciens",
+        "NO_DATA_AVAILABLE": "Nav pieejami dati"
     }
 }
\ No newline at end of file
index e687c90..d214350 100644 (file)
         "ASSIGNTO": "Toewijzen",
         "CLICKRELOAD": "Nieuwe achtergelaten oproepen! Herladen alstublieft",
         "NOTAVAILABLE": "Niet beschikbaar",
-        "CURRENTLY_IN_USE_BY": "Momenteel in gebruik door"
+        "CURRENTLY_IN_USE_BY": "Momenteel in gebruik door",
+        "CUSTOMER_JOURNEY": "Customer Journey",
+        "NO_DATA_AVAILABLE": "Geen gegevens beschikbaar"
     }
 }
\ No newline at end of file
index 713381b..bc74025 100644 (file)
         "ASSIGNTO": "Tildel til",
         "CLICKRELOAD": "Nye forlatte samtaler! Legg igjen på nytt",
         "NOTAVAILABLE": "Ikke tilgjengelig",
-        "CURRENTLY_IN_USE_BY": "For tiden i bruk av"
+        "CURRENTLY_IN_USE_BY": "For tiden i bruk av",
+        "CUSTOMER_JOURNEY": "Kunde Reise",
+        "NO_DATA_AVAILABLE": "Ingen data tilgjengelig"
     }
 }
\ No newline at end of file
index 8a72ff3..0b7dc94 100644 (file)
         "ASSIGNTO": "Przypisać do",
         "CLICKRELOAD": "Nowe porzucone połączenia! Załaduj ponownie",
         "NOTAVAILABLE": "Niedostępne",
-        "CURRENTLY_IN_USE_BY": "Obecnie w użyciu przez"
+        "CURRENTLY_IN_USE_BY": "Obecnie w użyciu przez",
+        "CUSTOMER_JOURNEY": "Podróż klienta",
+        "NO_DATA_AVAILABLE": "Brak dostępnych danych"
     }
 }
\ No newline at end of file
index 943d15d..32c6b80 100644 (file)
         "ASSIGNTO": "Atribuir a",
         "CLICKRELOAD": "Novas chamadas abandonadas! Recarregar por favor",
         "NOTAVAILABLE": "Não disponível",
-        "CURRENTLY_IN_USE_BY": "Atualmente em uso por"
+        "CURRENTLY_IN_USE_BY": "Atualmente em uso por",
+        "CUSTOMER_JOURNEY": "Viagem do cliente",
+        "NO_DATA_AVAILABLE": "Não há dados disponíveis"
     }
 }
\ No newline at end of file
index 53ff385..9df823b 100644 (file)
         "ASSIGNTO": "Назначить в",
         "CLICKRELOAD": "Новые заброшенные звонки! Перезагрузить пожалуйста",
         "NOTAVAILABLE": "Недоступен",
-        "CURRENTLY_IN_USE_BY": "В настоящее время используется"
+        "CURRENTLY_IN_USE_BY": "В настоящее время используется",
+        "CUSTOMER_JOURNEY": "Путешествие клиента",
+        "NO_DATA_AVAILABLE": "Данные недоступны"
     }
 }
\ No newline at end of file
index 9ba81e6..2efabd1 100644 (file)
         "ASSIGNTO": "Tilldela till",
         "CLICKRELOAD": "Nya övergivna samtal! Uppdatera tack",
         "NOTAVAILABLE": "Inte tillgänglig",
-        "CURRENTLY_IN_USE_BY": "För närvarande används av"
+        "CURRENTLY_IN_USE_BY": "För närvarande används av",
+        "CUSTOMER_JOURNEY": "Kundresa",
+        "NO_DATA_AVAILABLE": "Ingen data tillgänglig"
     }
 }
\ No newline at end of file
index f6f4b20..0b62eb5 100644 (file)
         "ASSIGNTO": "Atamak",
         "CLICKRELOAD": "Yeni terk edilmiş aramalar! Yeniden lütfen",
         "NOTAVAILABLE": "Müsait değil",
-        "CURRENTLY_IN_USE_BY": "Şu anda tarafından kullanılıyor"
+        "CURRENTLY_IN_USE_BY": "Şu anda tarafından kullanılıyor",
+        "CUSTOMER_JOURNEY": "Müşteri yolculuğu",
+        "NO_DATA_AVAILABLE": "Veri yok"
     }
 }
\ No newline at end of file
index 867f7b1..fab539b 100644 (file)
         "ASSIGNTO": "分配给",
         "CLICKRELOAD": "新的被遗弃的电话请重新加载",
         "NOTAVAILABLE": "无法使用",
-        "CURRENTLY_IN_USE_BY": "目前正在使用中"
+        "CURRENTLY_IN_USE_BY": "目前正在使用中",
+        "CUSTOMER_JOURNEY": "客户之旅",
+        "NO_DATA_AVAILABLE": "无可用数据"
     }
 }
\ No newline at end of file
index d056fdc..d4483f8 100644 (file)
         "ASSIGNTO": "分配給",
         "CLICKRELOAD": "新的被遺棄的電話請重新加載",
         "NOTAVAILABLE": "無法使用",
-        "CURRENTLY_IN_USE_BY": "目前正在使用中"
+        "CURRENTLY_IN_USE_BY": "目前正在使用中",
+        "CUSTOMER_JOURNEY": "客戶之旅",
+        "NO_DATA_AVAILABLE": "無可用數據"
     }
 }
\ No newline at end of file
index e6830e5..9eb4775 100644 (file)
         "SECURITY_SUITE": "Security Suite",
         "ANNUALLY": "Årligt",
         "MOTIONBARAUTOUPDATER": "Automatisk opdatering",
-        "MOTIONBARAUTOUPDATERURL": "Automatisk opdaterings-URL"
+        "MOTIONBARAUTOUPDATERURL": "Automatisk opdaterings-URL",
+        "JAWS": "Jaws"
     }
 }
\ No newline at end of file
index 7bbd19b..1eff261 100644 (file)
         "SECURITY_SUITE": "Sicherheitssuite",
         "ANNUALLY": "Jährlich",
         "MOTIONBARAUTOUPDATER": "Automatischer Updater",
-        "MOTIONBARAUTOUPDATERURL": "Automatische Updater-URL"
+        "MOTIONBARAUTOUPDATERURL": "Automatische Updater-URL",
+        "JAWS": "Jaws"
     }
 }
\ No newline at end of file
index c1a12d7..37829dd 100644 (file)
@@ -1,5 +1,6 @@
 {
     "SETTINGS": {
+        "JAWS": "Jaws",
         "MOTIONBAR": "Motionbar",
         "MOTIONBARAUTOUPDATER": "Auto Updater",
         "MOTIONBARAUTOUPDATERURL": "Auto Updater URL",
index 83164ae..c15facb 100644 (file)
         "USERS": "Usuarios",
         "VERIFY": "Verificar",
         "WEBRTC": "WebRTC",
-        "WHITELABEL": "Etiqueta blanca"
+        "WHITELABEL": "Etiqueta blanca",
+        "JAWS": "Jaws"
     }
 }
\ No newline at end of file
index 4193e98..00802dc 100644 (file)
         "SECURITY_SUITE": "سوئیت امنیتی",
         "ANNUALLY": "سالانه",
         "MOTIONBARAUTOUPDATER": "خودکار به روز رسانی",
-        "MOTIONBARAUTOUPDATERURL": "URL به روز رسانی خودکار"
+        "MOTIONBARAUTOUPDATERURL": "URL به روز رسانی خودکار",
+        "JAWS": "Jaws"
     }
 }
\ No newline at end of file
index 9f2bb5c..e0ddd07 100644 (file)
         "SECURITY_SUITE": "Security Suite",
         "ANNUALLY": "Vuosittain",
         "MOTIONBARAUTOUPDATER": "Automaattinen päivitys",
-        "MOTIONBARAUTOUPDATERURL": "Automaattisen päivityksen URL-osoite"
+        "MOTIONBARAUTOUPDATERURL": "Automaattisen päivityksen URL-osoite",
+        "JAWS": "Jaws"
     }
 }
\ No newline at end of file
index e8ba8b2..2bf1d90 100644 (file)
         "SECURITY_SUITE": "Suite de sécurité",
         "ANNUALLY": "Annuellement",
         "MOTIONBARAUTOUPDATER": "Mise à jour automatique",
-        "MOTIONBARAUTOUPDATERURL": "URL de mise à jour automatique"
+        "MOTIONBARAUTOUPDATERURL": "URL de mise à jour automatique",
+        "JAWS": "Jaws"
     }
 }
\ No newline at end of file
index c543d6b..ead227e 100644 (file)
         "SECURITY_SUITE": "सुरक्षा सूट",
         "ANNUALLY": "हर साल",
         "MOTIONBARAUTOUPDATER": "ऑटो अपडेटर",
-        "MOTIONBARAUTOUPDATERURL": "ऑटो अपडेटर यूआरएल"
+        "MOTIONBARAUTOUPDATERURL": "ऑटो अपडेटर यूआरएल",
+        "JAWS": "Jaws"
     }
 }
\ No newline at end of file
index f63ee8c..765112f 100644 (file)
         "SECURITY_SUITE": "Suite Sicurezza",
         "ANNUALLY": "Annuale",
         "MOTIONBARAUTOUPDATER": "Aggiornamento Automatico",
-        "MOTIONBARAUTOUPDATERURL": "URL di aggiornamento automatico"
+        "MOTIONBARAUTOUPDATERURL": "URL di aggiornamento automatico",
+        "JAWS": "Jaws"
     }
 }
\ No newline at end of file
index 9ebbb99..1f8168c 100644 (file)
         "USERS": "ユーザー",
         "VERIFY": "確認",
         "WEBRTC": "WebRTC",
-        "WHITELABEL": "白いラベル"
+        "WHITELABEL": "白いラベル",
+        "JAWS": "Jaws"
     }
 }
\ No newline at end of file
index 3fa412b..df64ee7 100644 (file)
         "SECURITY_SUITE": "보안 스위트",
         "ANNUALLY": "매년",
         "MOTIONBARAUTOUPDATER": "자동 업데이터",
-        "MOTIONBARAUTOUPDATERURL": "자동 업데이터 URL"
+        "MOTIONBARAUTOUPDATERURL": "자동 업데이터 URL",
+        "JAWS": "Jaws"
     }
 }
\ No newline at end of file
index d83616c..9987e20 100644 (file)
         "SECURITY_SUITE": "Drošības komplekts",
         "ANNUALLY": "Katru gadu",
         "MOTIONBARAUTOUPDATER": "Auto atjauninātājs",
-        "MOTIONBARAUTOUPDATERURL": "Autoatjauninātāja URL"
+        "MOTIONBARAUTOUPDATERURL": "Autoatjauninātāja URL",
+        "JAWS": "Jaws"
     }
 }
\ No newline at end of file
index 6df91a4..4ff3866 100644 (file)
         "SECURITY_SUITE": "Beveiligingssuite",
         "ANNUALLY": "jaarlijks",
         "MOTIONBARAUTOUPDATER": "Auto Updater",
-        "MOTIONBARAUTOUPDATERURL": "Auto Updater-URL"
+        "MOTIONBARAUTOUPDATERURL": "Auto Updater-URL",
+        "JAWS": "Jaws"
     }
 }
\ No newline at end of file
index 84ae598..65669d9 100644 (file)
         "SECURITY_SUITE": "Security Suite",
         "ANNUALLY": "Årlig",
         "MOTIONBARAUTOUPDATER": "Automatisk oppdatering",
-        "MOTIONBARAUTOUPDATERURL": "Automatisk oppdateringsadresse"
+        "MOTIONBARAUTOUPDATERURL": "Automatisk oppdateringsadresse",
+        "JAWS": "Jaws"
     }
 }
\ No newline at end of file
index 31b9e0c..e40184b 100644 (file)
         "SECURITY_SUITE": "Security Suite",
         "ANNUALLY": "Rocznie",
         "MOTIONBARAUTOUPDATER": "Auto Updater",
-        "MOTIONBARAUTOUPDATERURL": "Adres URL automatycznej aktualizacji"
+        "MOTIONBARAUTOUPDATERURL": "Adres URL automatycznej aktualizacji",
+        "JAWS": "Jaws"
     }
 }
\ No newline at end of file
index d9c80d5..d982b01 100644 (file)
         "SECURITY_SUITE": "Suíte de Segurança",
         "ANNUALLY": "Anualmente",
         "MOTIONBARAUTOUPDATER": "Auto Updater",
-        "MOTIONBARAUTOUPDATERURL": "URL do atualizador automático"
+        "MOTIONBARAUTOUPDATERURL": "URL do atualizador automático",
+        "JAWS": "Jaws"
     }
 }
\ No newline at end of file
index f78d3c4..b9ccb20 100644 (file)
         "SECURITY_SUITE": "Люкс для обеспечения безопасности",
         "ANNUALLY": "ежегодно",
         "MOTIONBARAUTOUPDATER": "Автоматическое обновление",
-        "MOTIONBARAUTOUPDATERURL": "URL-адрес автоматического обновления"
+        "MOTIONBARAUTOUPDATERURL": "URL-адрес автоматического обновления",
+        "JAWS": "Jaws"
     }
 }
\ No newline at end of file
index 3e3e875..fa10c78 100644 (file)
         "SECURITY_SUITE": "Säkerhetssvit",
         "ANNUALLY": "Årligen",
         "MOTIONBARAUTOUPDATER": "Automatisk uppdatering",
-        "MOTIONBARAUTOUPDATERURL": "Automatisk uppdateringsadress"
+        "MOTIONBARAUTOUPDATERURL": "Automatisk uppdateringsadress",
+        "JAWS": "Jaws"
     }
 }
\ No newline at end of file
index 129af41..2d766d2 100644 (file)
         "SECURITY_SUITE": "Güvenlik Süiti",
         "ANNUALLY": "yıllık",
         "MOTIONBARAUTOUPDATER": "Otomatik Güncelleyici",
-        "MOTIONBARAUTOUPDATERURL": "Güncelleyici URL'si"
+        "MOTIONBARAUTOUPDATERURL": "Güncelleyici URL'si",
+        "JAWS": "Jaws"
     }
 }
\ No newline at end of file
index 0c62fa5..dbddb68 100644 (file)
         "SECURITY_SUITE": "安全套件",
         "ANNUALLY": "每年",
         "MOTIONBARAUTOUPDATER": "自动更新程序",
-        "MOTIONBARAUTOUPDATERURL": "自动更新器网址"
+        "MOTIONBARAUTOUPDATERURL": "自动更新器网址",
+        "JAWS": "Jaws"
     }
 }
\ No newline at end of file
index 0b1584e..73d76a1 100644 (file)
         "SECURITY_SUITE": "安全套件",
         "ANNUALLY": "每年",
         "MOTIONBARAUTOUPDATER": "自動更新程序",
-        "MOTIONBARAUTOUPDATERURL": "自動更新器網址"
+        "MOTIONBARAUTOUPDATERURL": "自動更新器網址",
+        "JAWS": "Jaws"
     }
 }
\ No newline at end of file
index cfe2e65..2678e8f 100644 (file)
@@ -58,7 +58,7 @@
 
     <script src="scripts/vendor.6a57c62e.js"></script>
 
-    <script src="scripts/app.8e8e99e7.js"></script>
+    <script src="scripts/app.8d9b3829.js"></script>
 
     <!-- CKEDITOR -->
     <script src="assets/plugins/ckeditor/ckeditor.js"></script>
similarity index 52%
rename from public/scripts/app.8e8e99e7.js
rename to public/scripts/app.8d9b3829.js
index edd7d4c..19a1b79 100644 (file)
@@ -1 +1 @@
-!function(){"use strict";angular.module("app.auth",[])}(),function(){"use strict";angular.module("app.core",["ngAnimate","ngAria","ngCookies","ngMessages","ngResource","ngSanitize","ngMaterial","pascalprecht.translate","ui.router","gridster","ds.clock","angucomplete-alt"])}(),function(){"use strict";function e(e,t){e.state("app.errors_error-404",{url:"/errors/error-404",views:{"main@":{templateUrl:"app/core/layouts/content-only.html",controller:"MainController as vm"},"content@app.errors_error-404":{templateUrl:"app/errors/404/error-404.html",controller:"Error404Controller as vm"}},params:{status:404,statusText:"",data:{},config:{}},bodyClass:"error-404"}),t.addPart("app/errors/404")}e.$inject=["$stateProvider","$translatePartialLoaderProvider"],angular.module("app.errors.error-404",[]).config(e)}(),function(){"use strict";function e(e,t){e.state("app.errors_error-500",{url:"/errors/error-500",views:{"main@":{templateUrl:"app/core/layouts/content-only.html",controller:"MainController as vm"},"content@app.errors_error-500":{templateUrl:"app/errors/500/error-500.html",controller:"Error500Controller as vm"}},params:{status:500,statusText:"",data:{},config:{}},bodyClass:"error-500"}),t.addPart("app/errors/500")}e.$inject=["$stateProvider","$translatePartialLoaderProvider"],angular.module("app.errors.error-500",[]).config(e)}(),function(){"use strict";angular.module("app.errors",["app.errors.error-404","app.errors.error-500"])}(),function(){"use strict";function e(e){e.addPart("app/footer")}e.$inject=["$translatePartialLoaderProvider"],angular.module("app.footer",[]).config(e)}(),function(){"use strict";function e(e,t){e.state("app.forgot",{url:"/forgot",views:{"main@":{templateUrl:"app/core/layouts/content-only.html",controller:"MainController as vm"},"content@app.forgot":{templateUrl:"app/forgot/forgot.html",controller:"ForgotPasswordController as vm"}},bodyClass:"forgot"}),t.addPart("app/forgot")}e.$inject=["$stateProvider","$translatePartialLoaderProvider"],angular.module("app.forgot",[]).config(e)}(),function(){"use strict";function e(e){e.addPart("app/header")}e.$inject=["$translatePartialLoaderProvider"],angular.module("app.header",[]).config(e)}(),function(){"use strict";angular.module("motion",["angular-toasty","app.core","app.auth","app.navigation","app.toolbar","app.quick-panel","app.header","app.footer","app.dashboards","app.staff","app.contactmanager","app.voice","app.chat","app.mail","app.sms","app.openchannel","app.fax","app.tools","app.callysquare","app.analytics","app.integrations","app.settings","app.help","app.motiondialer","app.jscripty","app.login","app.forgot","app.reset","app.errors"])}(),function(){"use strict";function e(e,t){e.state("app.login",{url:"/login?token&userId",views:{"main@":{templateUrl:"app/core/layouts/content-only.html",controller:"MainController as vm"},"content@app.login":{templateUrl:"app/login/login.html",controller:"LoginController as vm"}},bodyClass:"login"}),t.addPart("app/login")}e.$inject=["$stateProvider","$translatePartialLoaderProvider"],angular.module("app.login",[]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.analytics",{abstract:!0,url:"/analytics"}).state("app.analytics.metrics",{url:"/metrics",views:{"content@app":{templateUrl:"app/main/apps/analytics/views/metrics/metrics.html",controller:"MetricsController as vm"}},resolve:{metrics:["apiResolver",function(e){return e.resolve("analyticMetric@get",{fields:"createdAt,updatedAt,id,name,table,metric,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1201,bodyClass:"analytics"}).state("app.analytics.extractedReports",{url:"/extractedReports",views:{"content@app":{templateUrl:"app/main/apps/analytics/views/extractedReports/extractedReports.html",controller:"ExtractedReportsController as vm"}},resolve:{extractedReports:["apiResolver",function(e){return e.resolve("analyticExtractedReport@get",{fields:"createdAt,updatedAt,id,name,basename,savename,type,startDate,endDate,createdAt,status,output",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1202,bodyClass:"analytics"}),t.addPart("app/main/apps/analytics")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.analytics",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.analytics.reports"]).config(e)}(),function(){"use strict";function e(e){e.state("app.analytics.reports",{url:"/reports",views:{"content@app":{templateUrl:"app/main/apps/analytics/views/reports/reports.html",controller:"ReportsController as vm"}},resolve:{treeReports:["apiResolver",function(e){return e.resolve("analyticTreeReport@get",{fields:"id,tree",limit:10,offset:0})}]},authenticate:!0,permissionId:1203,bodyClass:"analytics"}).state("app.analytics.reports.edit",{url:"/:id?tab",views:{"content@app":{templateUrl:"app/main/apps/analytics/views/reports/edit/view.html",controller:"ReportController as vm"}},resolve:{report:["apiResolver","$stateParams","$q","describeTable",function(e,t,a,i){var o;return e.resolve("analyticCustomReport@get",{fields:"createdAt,updatedAt,id,name,description,table,conditions,joins",id:t.id}).then(function(e){var t=[];if((o=e).joins)try{o.joins=JSON.parse(o.joins);for(var n=0;n<o.joins.length;n+=1)t.push(i.getColumns(o.joins[n].foreignTable))}catch(e){console.log(e)}return a.all(t)}).then(function(e){for(var t=0;t<e.length;t+=1)o.joins[t].foreignTableFields=_.difference(_.keys(e[t]),["$promise","$resolved"]);return o})}]},authenticate:!0,permissionId:1203,bodyClass:"analytics"})}e.$inject=["$stateProvider"],angular.module("app.analytics.reports",["ngJsTree"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.callysquare",{abstract:!0,url:"/callysquare"}).state("app.callysquare.odbcs",{url:"/odbcs",views:{"content@app":{templateUrl:"app/main/apps/callysquare/views/odbcs/odbcs.html",controller:"OdbcsController as vm"}},resolve:{odbcs:["apiResolver",function(e){return e.resolve("squareOdbc@get",{fields:"createdAt,updatedAt,id,name,dsn,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1101,bodyClass:"callysquare"}).state("app.callysquare.squareRecordings",{url:"/squareRecordings",views:{"content@app":{templateUrl:"app/main/apps/callysquare/views/squareRecordings/squareRecordings.html",controller:"SquareRecordingsController as vm"}},resolve:{squareRecordings:["apiResolver",function(e){return e.resolve("squareRecording@get",{fields:"createdAt,updatedAt,id,filename,projectName,uniqueid,callerid,extension,audio,createdAt",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1102,bodyClass:"callysquare"}),t.addPart("app/main/apps/callysquare")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.callysquare",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.callysquare.projects"]).config(e)}(),function(){"use strict";function e(e){e.state("app.callysquare.projects",{url:"/projects",views:{"content@app":{templateUrl:"app/main/apps/callysquare/views/projects/projects.html",controller:"ProjectsController as vm"}},resolve:{projects:["apiResolver",function(e){return e.resolve("squareProject@get",{fields:"id,name,description,notes",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1103,bodyClass:"callysquare"}).state("app.callysquare.projects.edit",{url:"/:id?tab",views:{"content@app":{templateUrl:"app/main/apps/callysquare/views/projects/edit/view.html",controller:"ProjectController as vm"}},resolve:{project:["apiResolver","$stateParams",function(e,t){return e.resolve("squareProject@get",{id:t.id})}],users:["apiResolver",function(e){return e.resolve("user@get",{fields:"id,fullname,role",sort:"name",nolimit:!0})}],trunks:["apiResolver",function(e){return e.resolve("trunk@get",{fields:"id,name",sort:"name",nolimit:!0})}],queues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("voiceQueue@get",{type:"inbound",fields:"id,name",sort:"name",nolimit:!0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,type:"inbound",fields:"id,name",sort:"name",nolimit:!0,channel:"voice"})}],sounds:["apiResolver",function(e){return e.resolve("sound@get",{fields:"id,name",sort:"name",nolimit:!0})}],variables:["apiResolver",function(e){return e.resolve("variable@get",{fields:"id,name",sort:"name",nolimit:!0})}],databases:["apiResolver",function(e){return e.resolve("squareOdbc@get",{fields:"id,name",sort:"name",nolimit:!0})}],projects:["apiResolver",function(e){return e.resolve("squareProject@get",{fields:"id,name",sort:"name",nolimit:!0})}],contexts:["apiResolver",function(e){return e.resolve("voiceContext@get",{fields:"id,name",sort:"name",nolimit:!0})}],intervals:["apiResolver",function(e){return e.resolve("interval@get",{fields:"id,name,IntervalId",sort:"name",nolimit:!0})}],mailAccounts:["apiResolver",function(e){return e.resolve("mailAccount@get",{fields:"id,name",sort:"name",nolimit:!0})}],templates:["apiResolver",function(e){return e.resolve("template@get",{fields:"id,name",sort:"name",nolimit:!0})}],lists:["apiResolver",function(e){return e.resolve("cmList@get",{fields:"id,name",sort:"name",nolimit:!0})}],smsAccounts:["apiResolver",function(e){return e.resolve("smsAccount@get",{fields:"id,name",sort:"name",nolimit:!0})}],pauses:["apiResolver",function(e){return e.resolve("pause@get",{fields:"id,name",sort:"name",nolimit:!0})}]},authenticate:!0,permissionId:1103,bodyClass:"callysquare"})}e.$inject=["$stateProvider"],angular.module("app.callysquare.projects",[]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.chat",{abstract:!0,url:"/chat"}).state("app.chat.chatQueues",{url:"/chatQueues",views:{"content@app":{templateUrl:"app/main/apps/chat/views/chatQueues/chatQueues.html",controller:"ChatQueuesController as vm"}},resolve:{chatQueues:["apiResolver",function(e){return e.resolve("chatQueue@get",{fields:"createdAt,updatedAt,id,name,strategy,timeout,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:501,bodyClass:"chat"}).state("app.chat.chatQueues.edit",{url:"/:id?tab",params:{chatQueue:void 0},views:{"content@app":{templateUrl:"app/main/apps/chat/views/chatQueues/edit/view.html",controller:"ChatQueueController as vm"}},resolve:{chatQueue:["apiResolver","$stateParams",function(e,t){return e.resolve("chatQueue@get",{fields:"createdAt,updatedAt,id,name,strategy,timeout,description",id:t.id})}]},authenticate:!0,permissionId:501,bodyClass:"chat"}).state("app.chat.chatWebsites",{url:"/chatWebsites",views:{"content@app":{templateUrl:"app/main/apps/chat/views/chatWebsites/chatWebsites.html",controller:"ChatWebsitesController as vm"}},resolve:{chatWebsites:["apiResolver",function(e){return e.resolve("chatWebsite@get",{fields:"createdAt,updatedAt,id,token,agentIdentifier,name,key,address,remote,ListId,fidelity,timeout,agentAlias,closingQuestion,formSubmitSuccessMessage,formSubmitFailureMessage,color,color_focus,color_button,textColor,fontSize,header_shape,showAgentAvatar,animation,defaultWhiteLabel,whiteLabel,defaultLogo,conditionAgreement,autoclose,enableUnmanagedNote,unmanagedMessage,skipUnmanaged,sendUnmanaged,enableCustomerWriting,waitingTitle,waitingMessage,closingMessage,noteTitle,placeholderMessage,skipMessageButton,enableRating,ratingType,ratingStarsNumber,enableFeedback,forwardTranscript,forwardTranscriptMessage,closingMessageButton,download_transcript,enableCustomerAttachment,enquiry_enable,enquiry_forwarding,enquiry_forwarding_address,name_title,username_placeholder,email_title,email_placeholder,header_online,hideWhenOffline,header_offline,start_chat_button,offline_chat_button,offlineMessageSubject,offlineMessageBody,header_offline,offline_message,message_title,enquiry_message_placeholder,enquiry_button,rating_message,rating_send,rating_skip,acceptMethod,acceptUrl,rejectMethod,rejectUrl,closeMethod,closeUrl,onlineForm,offlineForm,mapKey,mapKeyOffline,forwardTranscript,forwardOffline,forwardOfflineAddress,IntervalId,timezone,waitForTheAssignedAgent,description,notificationSound,notificationShake,notificationTemplate",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:502,bodyClass:"chat"}).state("app.chat.chatWebsites.edit",{url:"/:id?tab",params:{chatWebsite:void 0},views:{"content@app":{templateUrl:"app/main/apps/chat/views/chatWebsites/edit/view.html",controller:"ChatWebsiteController as vm"}},resolve:{chatWebsite:["apiResolver","$stateParams",function(e,t){return e.resolve("chatWebsite@get",{fields:"createdAt,updatedAt,id,token,agentIdentifier,name,key,address,remote,ListId,fidelity,timeout,agentAlias,closingQuestion,formSubmitSuccessMessage,formSubmitFailureMessage,color,color_focus,color_button,textColor,fontSize,header_shape,showAgentAvatar,animation,defaultWhiteLabel,whiteLabel,defaultLogo,conditionAgreement,autoclose,enableUnmanagedNote,unmanagedMessage,skipUnmanaged,sendUnmanaged,enableCustomerWriting,waitingTitle,waitingMessage,closingMessage,noteTitle,placeholderMessage,skipMessageButton,enableRating,ratingType,ratingStarsNumber,enableFeedback,forwardTranscript,forwardTranscriptMessage,closingMessageButton,download_transcript,enableCustomerAttachment,enquiry_enable,enquiry_forwarding,enquiry_forwarding_address,name_title,username_placeholder,email_title,email_placeholder,header_online,hideWhenOffline,header_offline,start_chat_button,offline_chat_button,offlineMessageSubject,offlineMessageBody,header_offline,offline_message,message_title,enquiry_message_placeholder,enquiry_button,rating_message,rating_send,rating_skip,acceptMethod,acceptUrl,rejectMethod,rejectUrl,closeMethod,closeUrl,onlineForm,offlineForm,mapKey,mapKeyOffline,forwardTranscript,forwardOffline,forwardOfflineAddress,IntervalId,timezone,waitForTheAssignedAgent,description,notificationSound,notificationShake,notificationTemplate",id:t.id})}]},authenticate:!0,permissionId:502,bodyClass:"chat"}),t.addPart("app/main/apps/chat")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.chat",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.chat.realtime"]).config(e)}(),function(){"use strict";function e(e){e.state("app.chat.realtime",{url:"/realtime",views:{"content@app":{templateUrl:"app/main/apps/chat/views/realtime/realtime.html",controller:"ChatRealtimeController as vm"}},authenticate:!0,permissionId:510}).state("app.chat.realtime.agents",{url:"/agents",controller:"AgentsChatRealtimeController as vm",templateUrl:"app/main/apps/chat/views/realtime/agents/view.html",resolve:{pauses:["apiResolver",function(e){return e.resolve("pause@get",{nolimit:!0})}],agents:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("user@get",{fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastPauseAt,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0}):e.resolve("user@getAgents",{id:t.getCurrentUser().id,fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0})}],rpcAgents:["apiResolver",function(e){return e.resolve("rpc@getAgents")}]},authenticate:!0,permissionId:510}).state("app.chat.realtime.queues",{url:"/queues",controller:"QueuesChatRealtimeController as vm",templateUrl:"app/main/apps/chat/views/realtime/queues/view.html",resolve:{queues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("chatQueue@get",{type:"inbound",sort:"-updatedAt",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,channel:"chat",type:"inbound",sort:"-updatedAt",limit:10,page:1})}],rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getChatQueues")}]},authenticate:!0,permissionId:510})}e.$inject=["$stateProvider"],angular.module("app.chat.realtime",["timer"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.contactmanager",{abstract:!0,url:"/contactmanager"}).state("app.contactmanager.lists",{url:"/lists",views:{"content@app":{templateUrl:"app/main/apps/contactmanager/views/lists/lists.html",controller:"ListsController as vm"}},resolve:{lists:["apiResolver",function(e){return e.resolve("cmList@get",{fields:"createdAt,updatedAt,id,name,description,dialPrefix",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:301,bodyClass:"contactmanager"}).state("app.contactmanager.lists.edit",{url:"/:id?tab",params:{list:void 0},views:{"content@app":{templateUrl:"app/main/apps/contactmanager/views/lists/edit/view.html",controller:"ListController as vm"}},resolve:{list:["apiResolver","$stateParams",function(e,t){return e.resolve("cmList@get",{fields:"createdAt,updatedAt,id,name,description,dialPrefix",id:t.id})}]},authenticate:!0,permissionId:301,bodyClass:"contactmanager"}).state("app.contactmanager.companies",{url:"/companies",views:{"content@app":{templateUrl:"app/main/apps/contactmanager/views/companies/companies.html",controller:"CompaniesController as vm"}},resolve:{companies:["apiResolver",function(e){return e.resolve("cmCompany@get",{fields:"createdAt,updatedAt,id,name,phone,vat,fax,companyId,type,website,emailDomain,email,description,sStreet,sPostalCode,sCity,sCountry,street,postalCode,city,country",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:302,bodyClass:"contactmanager"}).state("app.contactmanager.companies.edit",{url:"/:id?tab",params:{company:void 0},views:{"content@app":{templateUrl:"app/main/apps/contactmanager/views/companies/edit/view.html",controller:"CompanyController as vm"}},resolve:{company:["apiResolver","$stateParams",function(e,t){return e.resolve("cmCompany@get",{fields:"createdAt,updatedAt,id,name,phone,vat,fax,companyId,type,website,emailDomain,email,description,sStreet,sPostalCode,sCity,sCountry,street,postalCode,city,country",id:t.id})}]},authenticate:!0,permissionId:302,bodyClass:"contactmanager"}).state("app.contactmanager.globalCustomFields",{url:"/globalCustomFields",views:{"content@app":{templateUrl:"app/main/apps/contactmanager/views/globalCustomFields/globalCustomFields.html",controller:"GlobalCustomFieldsController as vm"}},resolve:{globalCustomFields:["apiResolver",function(e){return e.resolve("cmCustomField@get",{fields:"createdAt,updatedAt,id,alias,type,values,required",sort:"-updatedAt",ListId:"null",limit:10,offset:0})}]},authenticate:!0,permissionId:304,bodyClass:"contactmanager"}),t.addPart("app/main/apps/contactmanager")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.contactmanager",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.contactmanager.contacts"]).config(e)}(),function(){"use strict";function e(e){e.state("app.contactmanager.contacts",{url:"/contacts?ListId&CompanyId",views:{"content@app":{templateUrl:"app/main/apps/contactmanager/views/contacts/contacts.html",controller:"ContactsController as vm"}},resolve:{contacts:["apiResolver","$stateParams",function(e,t){return e.resolve("cmContact@get",_.merge({sort:"-updatedAt",limit:10,offset:0},t))}],lists:["apiResolver",function(e){return e.resolve("cmList@get",{fields:"id,name",sort:"name",nolimit:!0})}],listsMap:["lists",function(e){for(var t={},n=0;n<e.rows.length;n++)t[e.rows[n].id]=e.rows[n].name;return t}],companies:["apiResolver",function(e){return e.resolve("cmCompany@get",{fields:"id,name",sort:"name",nolimit:!0})}],companiesMap:["companies",function(e){for(var t={},n=0;n<e.rows.length;n++)t[e.rows[n].id]=e.rows[n].name;return t}],tags:["apiResolver",function(e){return e.resolve("tag@get",{fields:"id,name",sort:"name",nolimit:!0})}]},authenticate:!0,permissionId:300,bodyClass:"contactmanager"}).state("app.contactmanager.contacts.edit",{url:"/:id?tab",views:{"content@app":{templateUrl:"app/main/apps/contactmanager/views/contacts/edit/view.html",controller:"ContactController as vm"}},resolve:{contact:["apiResolver","$stateParams",function(e,t){return e.resolve("cmContact@get",{id:t.id}).then(function(e){return e.dateOfBirth&&(e.dateOfBirth=new Date(e.dateOfBirth)),e}).catch(function(e){console.error(e)})}],hoppers:["apiResolver","$stateParams",function(e,t){return e.resolve("cmContact@getHoppers",{id:t.id,fields:"id,phone,scheduledat,priority,recallme,VoiceQueueId,CampaignId,UserId",sort:"-updatedAt",limit:10,offset:0})}],finals:["apiResolver","$stateParams",function(e,t){return e.resolve("cmContact@getHopperFinals",{id:t.id,fields:"id,uniqueid,calleridnum,statedesc,starttime,disposition",sort:"-updatedAt",limit:10,offset:0})}],histories:["apiResolver","$stateParams",function(e,t){return e.resolve("cmContact@getHopperHistories",{id:t.id,fields:"id,uniqueid,calleridnum,statedesc,scheduledat,starttime,endtime",sort:"-updatedAt",limit:10,offset:0})}],jscriptySessions:["apiResolver","$stateParams",function(e,t){return e.resolve("cmContact@getJscriptySessions",{id:t.id,fields:"id,starttime,endtime,membername,projectname",sort:"-starttime",limit:10,offset:0})}],companies:["apiResolver","$stateParams",function(e,t){return e.resolve("cmCompany@get")}],lists:["apiResolver",function(e){return e.resolve("cmList@get",{fields:"id,name",sort:"-updatedAt",nolimit:!0})}],customFields:["apiResolver","contact",function(e,t){return t.ListId?e.resolve("cmList@getCustomFields",{id:t.ListId}):null}],tags:["apiResolver","$stateParams",function(e,t){return e.resolve("tag@get")}]},authenticate:!0,permissionId:300,bodyClass:"contactmanager"})}e.$inject=["$stateProvider"],angular.module("app.contactmanager.contacts",[]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.dashboards",{abstract:!0,url:"/dashboards"}),t.addPart("app/main/apps/dashboards")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.dashboards",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.dashboards.general","app.dashboards.custom"]).config(e)}(),function(){"use strict";function e(e){e.state("app.dashboards.custom",{url:"/custom/:id",views:{"content@app":{templateUrl:"app/main/apps/dashboards/views/custom/custom.html",controller:"DashboardCustomController as vm"}},resolve:{voiceQueues:["apiResolver","Auth",function(t,e){var a;return(e.hasRole("admin")?t.resolve("voiceQueue@get",{fields:"id,name",nolimit:!0}):t.resolve("user@getQueues",{id:e.getCurrentUser().id,fields:"id,name",channel:"voice",nolimit:!0})).then(function(e){return a=e,t.resolve("rpc@getVoiceQueues")}).then(function(e){if(e)for(var t,n=0;n<e.rows.length;n+=1)(t=_.find(a.rows,{id:e.rows[n].id}))&&_.merge(t,_.pick(e.rows[n],["waiting","total","talking","answered","unmanaged"]));return a})}]},authenticate:!0,bodyClass:"dashboards"})}e.$inject=["$stateProvider"],angular.module("app.dashboards.custom",[]).config(e)}(),function(){"use strict";function e(e){e.state("app.dashboards.general",{url:"/general",data:{selectedTab:0},views:{"content@app":{templateProvider:["$stateParams","$templateFactory","Auth",function(e,t,n){var a=n.getCurrentUser();return a&&"agent"===a.role?t.fromUrl("app/main/apps/dashboards/views/general/agent/agent.general.html",e):t.fromUrl("app/main/apps/dashboards/views/general/user/user.general.html",e)}],controllerProvider:["Auth",function(e){var t=e.getCurrentUser();return t&&"agent"===t.role?"AgentDashboardGeneralController as vm":"UserDashboardGeneralController as vm"}]}},resolve:{globalUserLists:["apiResolver","Auth",function(e,t){return e.resolve("user@getLists",{id:t.getCurrentUser().id,sort:"name",nolimit:!0})}],globalLists:["apiResolver","Auth",function(e,t){return e.resolve("cmList@get",{sort:"name",nolimit:!0})}],globalTags:["apiResolver",function(e){return e.resolve("tag@get",{sort:"name",nolimit:!0})}],globalCompanies:["apiResolver",function(e){return e.resolve("cmCompany@get",{sort:"name",nolimit:!0})}]},authenticate:!0,bodyClass:"dashboards"})}e.$inject=["$stateProvider"],angular.module("app.dashboards.general",["ngMaterialDateRangePicker","app.dashboards.general.user"]).config(e)}(),function(){"use strict";function e(e){e.state("app.dashboards.general.voice",{url:"/voice",data:{selectedTab:0},views:{voice:{templateUrl:"app/main/apps/dashboards/views/general/user/voice/user.general.voice.html",controller:"UserVoiceDashboardGeneralController as vm"}},resolve:{rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getVoiceQueues")}],inboundQueues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("voiceQueue@get",{fields:"id,name",type:"inbound",nolimit:!0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,fields:"id,name",channel:"voice",type:"inbound",nolimit:!0})}],outbound:["apiResolver",function(e){return e.resolve("rpc@getOutbound")}]},authenticate:!0,bodyClass:"dashboards"}).state("app.dashboards.general.dialer",{url:"/dialer",data:{selectedTab:1},views:{dialer:{templateUrl:"app/main/apps/dashboards/views/general/user/dialer/user.general.dialer.html",controller:"UserVoiceDashboardDialerController as vm"}},resolve:{rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getVoiceQueues")}],outboundQueues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("voiceQueue@get",{fields:"id,name",type:"outbound",nolimit:!0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,fields:"id,name",channel:"voice",type:"outbound",nolimit:!0})}],rpcCampaigns:["apiResolver",function(e){return e.resolve("rpc@getCampaigns")}]},authenticate:!0,bodyClass:"dashboards"})}e.$inject=["$stateProvider"],angular.module("app.dashboards.general.user",[]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.fax",{abstract:!0,url:"/fax"}).state("app.fax.faxQueues",{url:"/faxQueues",views:{"content@app":{templateUrl:"app/main/apps/fax/views/faxQueues/faxQueues.html",controller:"FaxQueuesController as vm"}},resolve:{faxQueues:["apiResolver",function(e){return e.resolve("faxQueue@get",{fields:"createdAt,updatedAt,id,name,strategy,timeout,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:901,bodyClass:"fax"}).state("app.fax.faxQueues.edit",{url:"/:id?tab",params:{faxQueue:void 0},views:{"content@app":{templateUrl:"app/main/apps/fax/views/faxQueues/edit/view.html",controller:"FaxQueueController as vm"}},resolve:{faxQueue:["apiResolver","$stateParams",function(e,t){return e.resolve("faxQueue@get",{fields:"createdAt,updatedAt,id,name,strategy,timeout,description",id:t.id})}]},authenticate:!0,permissionId:901,bodyClass:"fax"}).state("app.fax.faxAccounts",{url:"/faxAccounts",views:{"content@app":{templateUrl:"app/main/apps/fax/views/faxAccounts/faxAccounts.html",controller:"FaxAccountsController as vm"}},resolve:{faxAccounts:["apiResolver",function(e){return e.resolve("faxAccount@get",{fields:"createdAt,updatedAt,id,name,key,headerinfo,TrunkId,localstationid,ListId,waitForTheAssignedAgent,description,ecm,minrate,maxrate,modem,gateway,faxdetect,t38timeout,tech,acceptMethod,acceptUrl,rejectMethod,rejectUrl,closeMethod,closeUrl,notificationSound,notificationShake,notificationTemplate",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:902,bodyClass:"fax"}).state("app.fax.faxAccounts.edit",{url:"/:id?tab",params:{faxAccount:void 0},views:{"content@app":{templateUrl:"app/main/apps/fax/views/faxAccounts/edit/view.html",controller:"FaxAccountController as vm"}},resolve:{faxAccount:["apiResolver","$stateParams",function(e,t){return e.resolve("faxAccount@get",{fields:"createdAt,updatedAt,id,name,key,headerinfo,TrunkId,localstationid,ListId,waitForTheAssignedAgent,description,ecm,minrate,maxrate,modem,gateway,faxdetect,t38timeout,tech,acceptMethod,acceptUrl,rejectMethod,rejectUrl,closeMethod,closeUrl,notificationSound,notificationShake,notificationTemplate",id:t.id})}]},authenticate:!0,permissionId:902,bodyClass:"fax"}),t.addPart("app/main/apps/fax")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.fax",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.fax.realtime"]).config(e)}(),function(){"use strict";function e(e){e.state("app.fax.realtime",{url:"/realtime",views:{"content@app":{templateUrl:"app/main/apps/fax/views/realtime/realtime.html",controller:"FaxRealtimeController as vm"}},authenticate:!0,permissionId:910}).state("app.fax.realtime.agents",{url:"/agents",controller:"AgentsFaxRealtimeController as vm",templateUrl:"app/main/apps/fax/views/realtime/agents/view.html",resolve:{pauses:["apiResolver",function(e){return e.resolve("pause@get",{nolimit:!0})}],agents:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("user@get",{fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastPauseAt,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0}):e.resolve("user@getAgents",{id:t.getCurrentUser().id,fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0})}],rpcAgents:["apiResolver",function(e){return e.resolve("rpc@getAgents")}]},authenticate:!0,permissionId:910}).state("app.fax.realtime.trunks",{url:"/trunks",controller:"TrunksFaxRealtimeController as vm",templateUrl:"app/main/apps/fax/views/realtime/trunks/view.html",resolve:{trunks:["apiResolver",function(e){return e.resolve("trunk@get",{fields:"id,name",active:!0,sort:"-updatedAt",limit:10,offset:0})}],rpcTrunks:["apiResolver",function(e){return e.resolve("rpc@getTrunks")}]},authenticate:!0,permissionId:910}).state("app.fax.realtime.queues",{url:"/queues",controller:"QueuesFaxRealtimeController as vm",templateUrl:"app/main/apps/fax/views/realtime/queues/view.html",resolve:{queues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("faxQueue@get",{type:"inbound",sort:"-updatedAt",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,channel:"fax",type:"inbound",sort:"-updatedAt",limit:10,page:1})}],rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getFaxQueues")}]},authenticate:!0,permissionId:910}).state("app.fax.realtime.accounts",{url:"/accounts",controller:"FaxAccountsRealtimeController as vm",templateUrl:"app/main/apps/fax/views/realtime/accounts/view.html",resolve:{faxAccounts:["apiResolver",function(e){return e.resolve("faxAccount@get",{sort:"-name",limit:10,offset:0})}],rpcFaxAccounts:["apiResolver",function(e){return e.resolve("rpc@getFaxAccounts")}]},authenticate:!0,permissionId:910})}e.$inject=["$stateProvider"],angular.module("app.fax.realtime",["timer"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.help",{abstract:!0,url:"/help"}),t.addPart("app/main/apps/help")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.help",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.help.about"]).config(e)}(),function(){"use strict";function e(e){e.state("app.help.about",{url:"/about",views:{"content@app":{templateUrl:"app/main/apps/help/views/about/about.html",controller:"AboutController as vm"}},resolve:{info:["apiResolver",function(e){return e.resolve("version@get")}]},authenticate:!0,permissionId:1405,bodyClass:"help"})}e.$inject=["$stateProvider"],angular.module("app.help.about",[]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.integrations",{abstract:!0,url:"/integrations"}).state("app.integrations.zendeskAccounts",{url:"/zendeskAccounts",views:{"content@app":{templateUrl:"app/main/apps/integrations/views/zendeskAccounts/zendeskAccounts.html",controller:"ZendeskAccountsController as vm"}},resolve:{zendeskAccounts:["apiResolver",function(e){return e.resolve("intZendeskAccount@get",{fields:"createdAt,updatedAt,id,name,type,username,remoteUri,authType,password,token,serverUrl,description",limit:10,offset:0})}]},authenticate:!0,permissionId:1301,bodyClass:"integrations"}).state("app.integrations.zendeskAccounts.edit",{url:"/:id?tab",params:{zendeskAccount:void 0},views:{"content@app":{templateUrl:"app/main/apps/integrations/views/zendeskAccounts/edit/view.html",controller:"ZendeskAccountController as vm"}},resolve:{zendeskAccount:["apiResolver","$stateParams",function(e,t){return e.resolve("intZendeskAccount@get",{fields:"createdAt,updatedAt,id,name,type,username,remoteUri,authType,password,token,serverUrl,description",id:t.id})}]},authenticate:!0,permissionId:1301,bodyClass:"integrations"}).state("app.integrations.salesforceAccounts",{url:"/salesforceAccounts",views:{"content@app":{templateUrl:"app/main/apps/integrations/views/salesforceAccounts/salesforceAccounts.html",controller:"SalesforceAccountsController as vm"}},resolve:{salesforceAccounts:["apiResolver",function(e){return e.resolve("intSalesforceAccount@get",{fields:"createdAt,updatedAt,id,name,type,username,remoteUri,password,clientId,clientSecret,securityToken,serverUrl,description",limit:10,offset:0})}]},authenticate:!0,permissionId:1302,bodyClass:"integrations"}).state("app.integrations.salesforceAccounts.edit",{url:"/:id?tab",params:{salesforceAccount:void 0},views:{"content@app":{templateUrl:"app/main/apps/integrations/views/salesforceAccounts/edit/view.html",controller:"SalesforceAccountController as vm"}},resolve:{salesforceAccount:["apiResolver","$stateParams",function(e,t){return e.resolve("intSalesforceAccount@get",{fields:"createdAt,updatedAt,id,name,type,username,remoteUri,password,clientId,clientSecret,securityToken,serverUrl,description",id:t.id})}]},authenticate:!0,permissionId:1302,bodyClass:"integrations"}).state("app.integrations.freshdeskAccounts",{url:"/freshdeskAccounts",views:{"content@app":{templateUrl:"app/main/apps/integrations/views/freshdeskAccounts/freshdeskAccounts.html",controller:"FreshdeskAccountsController as vm"}},resolve:{freshdeskAccounts:["apiResolver",function(e){return e.resolve("intFreshdeskAccount@get",{fields:"createdAt,updatedAt,id,name,username,remoteUri,apiKey,serverUrl,description",limit:10,offset:0})}]},authenticate:!0,permissionId:1303,bodyClass:"integrations"}).state("app.integrations.freshdeskAccounts.edit",{url:"/:id?tab",params:{freshdeskAccount:void 0},views:{"content@app":{templateUrl:"app/main/apps/integrations/views/freshdeskAccounts/edit/view.html",controller:"FreshdeskAccountController as vm"}},resolve:{freshdeskAccount:["apiResolver","$stateParams",function(e,t){return e.resolve("intFreshdeskAccount@get",{fields:"createdAt,updatedAt,id,name,username,remoteUri,apiKey,serverUrl,description",id:t.id})}]},authenticate:!0,permissionId:1303,bodyClass:"integrations"}).state("app.integrations.sugarcrmAccounts",{url:"/sugarcrmAccounts",views:{"content@app":{templateUrl:"app/main/apps/integrations/views/sugarcrmAccounts/sugarcrmAccounts.html",controller:"SugarcrmAccountsController as vm"}},resolve:{sugarcrmAccounts:["apiResolver",function(e){return e.resolve("intSugarcrmAccount@get",{fields:"createdAt,updatedAt,id,name,username,remoteUri,password,serverUrl,description",limit:10,offset:0})}]},authenticate:!0,permissionId:1304,bodyClass:"integrations"}).state("app.integrations.sugarcrmAccounts.edit",{url:"/:id?tab",params:{sugarcrmAccount:void 0},views:{"content@app":{templateUrl:"app/main/apps/integrations/views/sugarcrmAccounts/edit/view.html",controller:"SugarcrmAccountController as vm"}},resolve:{sugarcrmAccount:["apiResolver","$stateParams",function(e,t){return e.resolve("intSugarcrmAccount@get",{fields:"createdAt,updatedAt,id,name,username,remoteUri,password,serverUrl,description",id:t.id})}]},authenticate:!0,permissionId:1304,bodyClass:"integrations"}).state("app.integrations.deskAccounts",{url:"/deskAccounts",views:{"content@app":{templateUrl:"app/main/apps/integrations/views/deskAccounts/deskAccounts.html",controller:"DeskAccountsController as vm"}},resolve:{deskAccounts:["apiResolver",function(e){return e.resolve("intDeskAccount@get",{fields:"createdAt,updatedAt,id,name,type,remoteUri,authType,username,password,serverUrl,description",limit:10,offset:0})}]},authenticate:!0,permissionId:1302,bodyClass:"integrations"}).state("app.integrations.deskAccounts.edit",{url:"/:id?tab",params:{deskAccount:void 0},views:{"content@app":{templateUrl:"app/main/apps/integrations/views/deskAccounts/edit/view.html",controller:"DeskAccountController as vm"}},resolve:{deskAccount:["apiResolver","$stateParams",function(e,t){return e.resolve("intDeskAccount@get",{fields:"createdAt,updatedAt,id,name,type,remoteUri,authType,username,password,serverUrl,description",id:t.id})}]},authenticate:!0,permissionId:1302,bodyClass:"integrations"}).state("app.integrations.zohoAccounts",{url:"/zohoAccounts",views:{"content@app":{templateUrl:"app/main/apps/integrations/views/zohoAccounts/zohoAccounts.html",controller:"ZohoAccountsController as vm"}},resolve:{zohoAccounts:["apiResolver",function(e){return e.resolve("intZohoAccount@get",{fields:"createdAt,updatedAt,id,name,host,authToken,serverUrl,description",limit:10,offset:0})}]},authenticate:!0,permissionId:1302,bodyClass:"integrations"}).state("app.integrations.zohoAccounts.edit",{url:"/:id?tab",params:{zohoAccount:void 0},views:{"content@app":{templateUrl:"app/main/apps/integrations/views/zohoAccounts/edit/view.html",controller:"ZohoAccountController as vm"}},resolve:{zohoAccount:["apiResolver","$stateParams",function(e,t){return e.resolve("intZohoAccount@get",{fields:"createdAt,updatedAt,id,name,host,authToken,serverUrl,description",id:t.id})}]},authenticate:!0,permissionId:1302,bodyClass:"integrations"}),t.addPart("app/main/apps/integrations")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.integrations",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.jscripty",{abstract:!0,url:"/jscripty"}).state("app.jscripty.projects",{url:"/projects",views:{"content@app":{templateUrl:"app/main/apps/jscripty/views/projects/projects.html",controller:"JscriptyProjectsController as vm"}},resolve:{projects:["apiResolver",function(e){return e.resolve("jscriptyProject@get",{fields:"createdAt,updatedAt,id,name,enableUncompleteSave,description,createdAt,formData",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1701,bodyClass:"jscripty"}).state("app.jscripty.projects.edit",{url:"/:id?tab",params:{project:void 0},views:{"content@app":{templateUrl:"app/main/apps/jscripty/views/projects/edit/view.html",controller:"JscriptyProjectController as vm"}},resolve:{project:["apiResolver","$stateParams",function(e,t){return e.resolve("jscriptyProject@get",{fields:"createdAt,updatedAt,id,name,enableUncompleteSave,description,createdAt,formData",id:t.id})}]},authenticate:!0,permissionId:1701,bodyClass:"jscripty"}),t.addPart("app/main/apps/jscripty")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.jscripty",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.mail",{abstract:!0,url:"/mail"}).state("app.mail.mailQueues",{url:"/mailQueues",views:{"content@app":{templateUrl:"app/main/apps/mail/views/mailQueues/mailQueues.html",controller:"MailQueuesController as vm"}},resolve:{mailQueues:["apiResolver",function(e){return e.resolve("mailQueue@get",{fields:"createdAt,updatedAt,id,name,strategy,timeout,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:601,bodyClass:"mail"}).state("app.mail.mailQueues.edit",{url:"/:id?tab",params:{mailQueue:void 0},views:{"content@app":{templateUrl:"app/main/apps/mail/views/mailQueues/edit/view.html",controller:"MailQueueController as vm"}},resolve:{mailQueue:["apiResolver","$stateParams",function(e,t){return e.resolve("mailQueue@get",{fields:"createdAt,updatedAt,id,name,strategy,timeout,description",id:t.id})}]},authenticate:!0,permissionId:601,bodyClass:"mail"}).state("app.mail.mailAccounts",{url:"/mailAccounts",views:{"content@app":{templateUrl:"app/main/apps/mail/views/mailAccounts/mailAccounts.html",controller:"MailAccountsController as vm"}},resolve:{mailAccounts:["apiResolver",function(e){return e.resolve("mailAccount@get",{fields:"createdAt,updatedAt,id,name,key,email,ListId,active,cservice,Imap.service,Imap.host,Imap.port,Imap.tls,Imap.authentication,Imap.user,Imap.password,Imap.mailbox,Imap.connTimeout,Imap.authTimeout,Smtp.service,Smtp.host,Smtp.port,Smtp.secure,Smtp.authentication,Smtp.user,Smtp.pass,cauthentication,cuser,cpassword,fontFamily,fontSize,template,markAsUnread,waitForTheAssignedAgent,description,notificationSound,notificationShake,notificationTemplate",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:602,bodyClass:"mail"}).state("app.mail.mailAccounts.edit",{url:"/:id?tab",params:{mailAccount:void 0},views:{"content@app":{templateUrl:"app/main/apps/mail/views/mailAccounts/edit/view.html",controller:"MailAccountController as vm"}},resolve:{mailAccount:["apiResolver","$stateParams",function(e,t){return e.resolve("mailAccount@get",{fields:"createdAt,updatedAt,id,name,key,email,ListId,active,cservice,Imap.service,Imap.host,Imap.port,Imap.tls,Imap.authentication,Imap.user,Imap.password,Imap.mailbox,Imap.connTimeout,Imap.authTimeout,Smtp.service,Smtp.host,Smtp.port,Smtp.secure,Smtp.authentication,Smtp.user,Smtp.pass,cauthentication,cuser,cpassword,fontFamily,fontSize,template,markAsUnread,waitForTheAssignedAgent,description,notificationSound,notificationShake,notificationTemplate",id:t.id})}]},authenticate:!0,permissionId:602,bodyClass:"mail"}).state("app.mail.mailSubtatuses",{url:"/mailSubtatuses",views:{"content@app":{templateUrl:"app/main/apps/mail/views/mailSubtatuses/mailSubtatuses.html",controller:"MailSubstatusesController as vm"}},resolve:{mailSubtatuses:["apiResolver",function(e){return e.resolve("mailSubstatus@get",{fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:603,bodyClass:"mail"}),t.addPart("app/main/apps/mail")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.mail",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.mail.realtime"]).config(e)}(),function(){"use strict";function e(e){e.state("app.mail.realtime",{url:"/realtime",views:{"content@app":{templateUrl:"app/main/apps/mail/views/realtime/realtime.html",controller:"MailRealtimeController as vm"}},authenticate:!0,permissionId:610}).state("app.mail.realtime.agents",{url:"/agents",controller:"AgentsMailRealtimeController as vm",templateUrl:"app/main/apps/mail/views/realtime/agents/view.html",resolve:{pauses:["apiResolver",function(e){return e.resolve("pause@get",{nolimit:!0})}],agents:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("user@get",{fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastPauseAt,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0}):e.resolve("user@getAgents",{id:t.getCurrentUser().id,fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0})}],rpcAgents:["apiResolver",function(e){return e.resolve("rpc@getAgents")}]},authenticate:!0,permissionId:610}).state("app.mail.realtime.queues",{url:"/queues",controller:"QueuesMailRealtimeController as vm",templateUrl:"app/main/apps/mail/views/realtime/queues/view.html",resolve:{queues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("mailQueue@get",{type:"inbound",sort:"-updatedAt",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,channel:"mail",type:"inbound",sort:"-updatedAt",limit:10,page:1})}],rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getMailQueues")}]},authenticate:!0,permissionId:610}).state("app.mail.realtime.accounts",{url:"/accounts",controller:"MailAccountsRealtimeController as vm",templateUrl:"app/main/apps/mail/views/realtime/accounts/view.html",resolve:{mailAccounts:["apiResolver",function(e){return e.resolve("mailAccount@get",{sort:"-name",limit:10,offset:0})}],rpcMailAccounts:["apiResolver",function(e){return e.resolve("rpc@getMailAccounts")}]},authenticate:!0,permissionId:610})}e.$inject=["$stateProvider"],angular.module("app.mail.realtime",["timer"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.motiondialer",{abstract:!0,url:"/motiondialer"}).state("app.motiondialer.queueCampaigns",{url:"/queueCampaigns",views:{"content@app":{templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/queueCampaigns.html",controller:"QueueCampaignsController as vm"}},resolve:{queueCampaigns:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("voiceQueue@get",{fields:"createdAt,updatedAt,id,name,dialActive,TrunkId,TrunkBackupId,type,IntervalId,dialCheckDuplicateType,acw,acwTimeout,autopause,ringinuse,memberdelay,timeoutrestart,monitor_format,context,setinterfacevar,setqueuevar,setqueueentryvar,dialOrderByScheduledAt,dialRecallMeTimeout,dialRecallInQueue,dialGlobalInterval,dialTimezone,dialAMDActive,dialAMDInitialSilence,dialAMDGreeting,dialAMDAfterGreetingSilence,dialAMDTotalAnalysisTime,dialAMDMinWordLength,dialAMDBetweenWordsSilence,dialAMDMaximumNumberOfWords,dialAMDSilenceThreshold,dialAMDMaximumWordLength,dialMethod,dialPowerLevel,dialPredictiveOptimization,dialPredictiveOptimizationPercentage,dialPredictiveInterval,dialLimitQueue,dialOriginateCallerIdName,dialOriginateCallerIdNumber,dialOriginateTimeout,dialPrefix,dialQueueOptions,dialQueueTimeout,strategy,timeout,retry,wrapuptime,weight,musiconhold,dialQueueProject,dialQueueProject2,dialQueueProject,dialQueueProject2,dialAgiAfterHangupAgent,dialGlobalMaxRetry,dialCongestionMaxRetry,dialCongestionRetryFrequency,dialBusyMaxRetry,dialBusyRetryFrequency,dialNoAnswerMaxRetry,dialNoAnswerRetryFrequency,description",type:"outbound",sort:"-updatedAt",channel:"voice",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,fields:"createdAt,updatedAt,id,name,dialActive,TrunkId,TrunkBackupId,type,IntervalId,dialCheckDuplicateType,acw,acwTimeout,autopause,ringinuse,memberdelay,timeoutrestart,monitor_format,context,setinterfacevar,setqueuevar,setqueueentryvar,dialOrderByScheduledAt,dialRecallMeTimeout,dialRecallInQueue,dialGlobalInterval,dialTimezone,dialAMDActive,dialAMDInitialSilence,dialAMDGreeting,dialAMDAfterGreetingSilence,dialAMDTotalAnalysisTime,dialAMDMinWordLength,dialAMDBetweenWordsSilence,dialAMDMaximumNumberOfWords,dialAMDSilenceThreshold,dialAMDMaximumWordLength,dialMethod,dialPowerLevel,dialPredictiveOptimization,dialPredictiveOptimizationPercentage,dialPredictiveInterval,dialLimitQueue,dialOriginateCallerIdName,dialOriginateCallerIdNumber,dialOriginateTimeout,dialPrefix,dialQueueOptions,dialQueueTimeout,strategy,timeout,retry,wrapuptime,weight,musiconhold,dialQueueProject,dialQueueProject2,dialQueueProject,dialQueueProject2,dialAgiAfterHangupAgent,dialGlobalMaxRetry,dialCongestionMaxRetry,dialCongestionRetryFrequency,dialBusyMaxRetry,dialBusyRetryFrequency,dialNoAnswerMaxRetry,dialNoAnswerRetryFrequency,description",type:"outbound",sort:"-updatedAt",channel:"voice",limit:10,offset:0})}]},authenticate:!0,permissionId:1501,bodyClass:"motiondialer"}).state("app.motiondialer.queueCampaigns.edit",{url:"/:id?tab",params:{queueCampaign:void 0},views:{"content@app":{templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/view.html",controller:"QueueCampaignController as vm"}},resolve:{queueCampaign:["apiResolver","$stateParams",function(e,t){return e.resolve("voiceQueue@get",{fields:"createdAt,updatedAt,id,name,dialActive,TrunkId,TrunkBackupId,type,IntervalId,dialCheckDuplicateType,acw,acwTimeout,autopause,ringinuse,memberdelay,timeoutrestart,monitor_format,context,setinterfacevar,setqueuevar,setqueueentryvar,dialOrderByScheduledAt,dialRecallMeTimeout,dialRecallInQueue,dialGlobalInterval,dialTimezone,dialAMDActive,dialAMDInitialSilence,dialAMDGreeting,dialAMDAfterGreetingSilence,dialAMDTotalAnalysisTime,dialAMDMinWordLength,dialAMDBetweenWordsSilence,dialAMDMaximumNumberOfWords,dialAMDSilenceThreshold,dialAMDMaximumWordLength,dialMethod,dialPowerLevel,dialPredictiveOptimization,dialPredictiveOptimizationPercentage,dialPredictiveInterval,dialLimitQueue,dialOriginateCallerIdName,dialOriginateCallerIdNumber,dialOriginateTimeout,dialPrefix,dialQueueOptions,dialQueueTimeout,strategy,timeout,retry,wrapuptime,weight,musiconhold,dialQueueProject,dialQueueProject2,dialQueueProject,dialQueueProject2,dialAgiAfterHangupAgent,dialGlobalMaxRetry,dialCongestionMaxRetry,dialCongestionRetryFrequency,dialBusyMaxRetry,dialBusyRetryFrequency,dialNoAnswerMaxRetry,dialNoAnswerRetryFrequency,description",id:t.id})}]},authenticate:!0,permissionId:1501,bodyClass:"motiondialer"}).state("app.motiondialer.ivrCampaigns",{url:"/ivrCampaigns",views:{"content@app":{templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/ivrCampaigns.html",controller:"IvrCampaignsController as vm"}},resolve:{ivrCampaigns:["apiResolver",function(e){return e.resolve("campaign@get",{fields:"createdAt,updatedAt,id,name,active,TrunkId,TrunkBackupId,type,IntervalId,dialCheckDuplicateType,SquareProjectId,limitCalls,description,dialOriginateCallerIdName,dialOriginateCallerIdNumber,dialOriginateTimeout,dialGlobalMaxRetry,dialCongestionMaxRetry,dialCongestionRetryFrequency,dialBusyMaxRetry,dialBusyRetryFrequency,dialNoAnswerMaxRetry,dialNoAnswerRetryFrequency,dialOrderByScheduledAt,dialGlobalInterval,dialTimezone,dialPrefix,dialAMDActive,dialAMDInitialSilence,dialAMDGreeting,dialAMDAfterGreetingSilence,dialAMDTotalAnalysisTime,dialAMDMinWordLength,dialAMDBetweenWordsSilence,dialAMDMaximumNumberOfWords,dialAMDSilenceThreshold,dialAMDMaximumWordLength",type:"ivr",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1502,bodyClass:"motiondialer"}).state("app.motiondialer.ivrCampaigns.edit",{url:"/:id?tab",params:{ivrCampaign:void 0},views:{"content@app":{templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/view.html",controller:"IvrCampaignController as vm"}},resolve:{ivrCampaign:["apiResolver","$stateParams",function(e,t){return e.resolve("campaign@get",{fields:"createdAt,updatedAt,id,name,active,TrunkId,TrunkBackupId,type,IntervalId,dialCheckDuplicateType,SquareProjectId,limitCalls,description,dialOriginateCallerIdName,dialOriginateCallerIdNumber,dialOriginateTimeout,dialGlobalMaxRetry,dialCongestionMaxRetry,dialCongestionRetryFrequency,dialBusyMaxRetry,dialBusyRetryFrequency,dialNoAnswerMaxRetry,dialNoAnswerRetryFrequency,dialOrderByScheduledAt,dialGlobalInterval,dialTimezone,dialPrefix,dialAMDActive,dialAMDInitialSilence,dialAMDGreeting,dialAMDAfterGreetingSilence,dialAMDTotalAnalysisTime,dialAMDMinWordLength,dialAMDBetweenWordsSilence,dialAMDMaximumNumberOfWords,dialAMDSilenceThreshold,dialAMDMaximumWordLength",id:t.id})}]},authenticate:!0,permissionId:1502,bodyClass:"motiondialer"}),t.addPart("app/main/apps/motiondialer")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.motiondialer",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.motiondialer.realtime"]).config(e)}(),function(){"use strict";function e(e){e.state("app.motiondialer.realtime",{url:"/realtime",views:{"content@app":{templateUrl:"app/main/apps/motiondialer/views/realtime/realtime.html",controller:"MotionDialerRealtimeController as vm"}},authenticate:!0,permissionId:1510}).state("app.motiondialer.realtime.agents",{url:"/agents",controller:"AgentsMotionDialerRealtimeController as vm",templateUrl:"app/main/apps/motiondialer/views/realtime/agents/view.html",resolve:{pauses:["apiResolver",function(e){return e.resolve("pause@get",{nolimit:!0})}],agents:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("user@get",{fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastPauseAt,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0}):e.resolve("user@getAgents",{id:t.getCurrentUser().id,fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0})}],rpcAgents:["apiResolver",function(e){return e.resolve("rpc@getAgents")}]},authenticate:!0,permissionId:1510}).state("app.motiondialer.realtime.queues",{url:"/queues",controller:"QueuesMotionDialerRealtimeController as vm",templateUrl:"app/main/apps/motiondialer/views/realtime/queues/view.html",resolve:{queues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("voiceQueue@get",{type:"outbound",sort:"-updatedAt",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,channel:"voice",type:"outbound",sort:"-updatedAt",limit:10,page:1})}],rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getVoiceQueues")}]},authenticate:!0,permissionId:1510}).state("app.motiondialer.realtime.queue_calls",{url:"/queue_calls",controller:"QueueCallsMotionDialerRealtimeController as vm",templateUrl:"app/main/apps/motiondialer/views/realtime/queue_calls/view.html",resolve:{agents:["apiResolver",function(e){return e.resolve("user@get",{fields:"id,name,role",role:"agent",nolimit:!0})}],rpcVoiceQueuesChannels:["apiResolver",function(e){return e.resolve("rpc@getVoiceQueuesChannels")}]},authenticate:!0,permissionId:1510}).state("app.motiondialer.realtime.abandonedcalls",{url:"/abandonedcalls",controller:"AbandonedCallsMotionDialerRealtimeController as vm",templateUrl:"app/main/apps/motiondialer/views/realtime/abandonedcalls/view.html",resolve:{agents:["apiResolver",function(e){return e.resolve("user@get",{fields:"id,name,role",role:"agent",nolimit:!0})}]},authenticate:!0,permissionId:1510}).state("app.motiondialer.realtime.queue_params",{url:"/queue_params",controller:"QueueParamsMotionDialerRealtimeController as vm",templateUrl:"app/main/apps/motiondialer/views/realtime/queue_params/view.html",resolve:{queues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("voiceQueue@get",{type:"outbound",fields:"id,name",sort:"-updatedAt",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,channel:"voice",type:"outbound",fields:"id,name",sort:"-updatedAt",limit:10,page:1})}],rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getVoiceQueues")}]},authenticate:!0,permissionId:1510}).state("app.motiondialer.realtime.ivr_campaigns",{url:"/ivr_campaigns",controller:"IvrCampaignsMotionDialerRealtimeController as vm",templateUrl:"app/main/apps/motiondialer/views/realtime/ivr_campaigns/view.html",resolve:{campaigns:["apiResolver",function(e){return e.resolve("campaign@get",{sort:"-updatedAt",limit:10,offset:0})}],rpcCampaigns:["apiResolver",function(e){return e.resolve("rpc@getCampaigns")}]},authenticate:!0,permissionId:1510})}e.$inject=["$stateProvider"],angular.module("app.motiondialer.realtime",["timer"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.openchannel",{abstract:!0,url:"/openchannel"}).state("app.openchannel.openchannelQueues",{url:"/openchannelQueues",views:{"content@app":{templateUrl:"app/main/apps/openchannel/views/openchannelQueues/openchannelQueues.html",controller:"OpenchannelQueuesController as vm"}},resolve:{openchannelQueues:["apiResolver",function(e){return e.resolve("openchannelQueue@get",{fields:"createdAt,updatedAt,id,name,strategy,timeout,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:801,bodyClass:"openchannel"}).state("app.openchannel.openchannelQueues.edit",{url:"/:id?tab",params:{openchannelQueue:void 0},views:{"content@app":{templateUrl:"app/main/apps/openchannel/views/openchannelQueues/edit/view.html",controller:"OpenchannelQueueController as vm"}},resolve:{openchannelQueue:["apiResolver","$stateParams",function(e,t){return e.resolve("openchannelQueue@get",{fields:"createdAt,updatedAt,id,name,strategy,timeout,description",id:t.id})}]},authenticate:!0,permissionId:801,bodyClass:"openchannel"}).state("app.openchannel.openchannelAccounts",{url:"/openchannelAccounts",views:{"content@app":{templateUrl:"app/main/apps/openchannel/views/openchannelAccounts/openchannelAccounts.html",controller:"OpenchannelAccountsController as vm"}},resolve:{openchannelAccounts:["apiResolver",function(e){return e.resolve("openchannelAccount@get",{fields:"createdAt,updatedAt,id,name,key,replyUri,ListId,waitForTheAssignedAgent,description,receiveUri,notificationSound,notificationShake,notificationTemplate",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:802,bodyClass:"openchannel"}).state("app.openchannel.openchannelAccounts.edit",{url:"/:id?tab",params:{openchannelAccount:void 0},views:{"content@app":{templateUrl:"app/main/apps/openchannel/views/openchannelAccounts/edit/view.html",controller:"OpenchannelAccountController as vm"}},resolve:{openchannelAccount:["apiResolver","$stateParams",function(e,t){return e.resolve("openchannelAccount@get",{fields:"createdAt,updatedAt,id,name,key,replyUri,ListId,waitForTheAssignedAgent,description,receiveUri,notificationSound,notificationShake,notificationTemplate",id:t.id})}]},authenticate:!0,permissionId:802,bodyClass:"openchannel"}),t.addPart("app/main/apps/openchannel")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.openchannel",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.openchannel.realtime"]).config(e)}(),function(){"use strict";function e(e){e.state("app.openchannel.realtime",{url:"/realtime",views:{"content@app":{templateUrl:"app/main/apps/openchannel/views/realtime/realtime.html",controller:"OpenchannelRealtimeController as vm"}},authenticate:!0,permissionId:810}).state("app.openchannel.realtime.agents",{url:"/agents",controller:"AgentsOpenchannelRealtimeController as vm",templateUrl:"app/main/apps/openchannel/views/realtime/agents/view.html",resolve:{pauses:["apiResolver",function(e){return e.resolve("pause@get",{nolimit:!0})}],agents:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("user@get",{fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastPauseAt,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0}):e.resolve("user@getAgents",{id:t.getCurrentUser().id,fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0})}],rpcAgents:["apiResolver",function(e){return e.resolve("rpc@getAgents")}]},authenticate:!0,permissionId:810}).state("app.openchannel.realtime.queues",{url:"/queues",controller:"QueuesOpenchannelRealtimeController as vm",templateUrl:"app/main/apps/openchannel/views/realtime/queues/view.html",resolve:{queues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("openchannelQueue@get",{type:"inbound",sort:"-updatedAt",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,channel:"openchannel",type:"inbound",sort:"-updatedAt",limit:10,page:1})}],rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getOpenchannelQueues")}]},authenticate:!0,permissionId:810})}e.$inject=["$stateProvider"],angular.module("app.openchannel.realtime",["timer"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.settings",{abstract:!0,url:"/settings"}).state("app.settings.generals",{url:"/generals",views:{"content@app":{templateUrl:"app/main/apps/settings/views/generals/generals.html",controller:"GeneralsController as vm"}},resolve:{generals:["apiResolver",function(e){return e.resolve("setting@get",{fields:"createdAt,updatedAt,id,min_internal,securePassword,callRecordingEncryption,stunaddr,turnaddr,turnusername,turnpassword,phoneBarAutoUpdater,phoneBarAutoUpdaterUrl",limit:10,offset:0})}]},authenticate:!0,permissionId:1401,bodyClass:"settings"}).state("app.settings.smtps",{url:"/smtps",views:{"content@app":{templateUrl:"app/main/apps/settings/views/smtps/smtps.html",controller:"SmtpController as vm"}},resolve:{smtps:["apiResolver",function(e){return e.resolve("mailAccount@get",{fields:"createdAt,updatedAt,id,service,name,email,Smtp.service,Smtp.host,Smtp.port,Smtp.secure,Smtp.authentication,Smtp.user,Smtp.pass,description",service:"1",limit:10,offset:0})}]},authenticate:!0,permissionId:1402,bodyClass:"settings"}).state("app.settings.networks",{url:"/networks",views:{"content@app":{templateUrl:"app/main/apps/settings/views/networks/networks.html",controller:"NetworksController as vm"}},resolve:{networks:["apiResolver",function(e){return e.resolve("network@get",{fields:"createdAt,updatedAt,id,type,value,value,createdAt",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1403,bodyClass:"settings"}).state("app.settings.customizations",{url:"/customizations",views:{"content@app":{templateUrl:"app/main/apps/settings/views/customizations/customizations.html",controller:"CustomizationsController as vm"}},resolve:{customizations:["apiResolver",function(e){return e.resolve("setting@get",{fields:"createdAt,updatedAt,id,defaultLogo,defaultLoginLogo,defaultHeaderWhiteLabel,headerWhiteLabel,defaultPageTitle,pageTitle",limit:10,offset:0})}]},authenticate:!0,permissionId:1407,bodyClass:"settings"}),t.addPart("app/main/apps/settings")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.settings",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.settings.updates","app.settings.license","app.settings.system"]).config(e)}(),function(){"use strict";function e(e){e.state("app.settings.license",{url:"/license",views:{"content@app":{templateUrl:"app/main/apps/settings/views/license/license.html",controller:"LicenseController as vm"}},authenticate:!0,permissionId:1405,bodyClass:"settings"})}e.$inject=["$stateProvider"],angular.module("app.settings.license",[]).config(e)}(),function(){"use strict";function e(e){e.state("app.settings.system",{url:"/system?tab",views:{"content@app":{templateUrl:"app/main/apps/settings/views/system/system.html",controller:"SystemController as vm"}},resolve:{system:["apiResolver",function(e){return e.resolve("system@get")}],processes:["apiResolver",function(e){return e.resolve("pm2@get")}]},authenticate:!0,permissionId:1406,bodyClass:"settings"})}e.$inject=["$stateProvider"],angular.module("app.settings.system",[]).config(e)}(),function(){"use strict";function e(e){e.state("app.settings.updates",{url:"/updates",views:{"content@app":{templateUrl:"app/main/apps/settings/views/updates/updates.html",controller:"UpdatesController as vm"}},resolve:{version:["apiResolver",function(e){return e.resolve("version@get",{latest:!0})}]},authenticate:!0,permissionId:1404,bodyClass:"settings"})}e.$inject=["$stateProvider"],angular.module("app.settings.updates",[]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.sms",{abstract:!0,url:"/sms"}).state("app.sms.smsQueues",{url:"/smsQueues",views:{"content@app":{templateUrl:"app/main/apps/sms/views/smsQueues/smsQueues.html",controller:"SmsQueuesController as vm"}},resolve:{smsQueues:["apiResolver",function(e){return e.resolve("smsQueue@get",{fields:"createdAt,updatedAt,id,name,strategy,timeout,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:701,bodyClass:"sms"}).state("app.sms.smsQueues.edit",{url:"/:id?tab",params:{smsQueue:void 0},views:{"content@app":{templateUrl:"app/main/apps/sms/views/smsQueues/edit/view.html",controller:"SmsQueueController as vm"}},resolve:{smsQueue:["apiResolver","$stateParams",function(e,t){return e.resolve("smsQueue@get",{fields:"createdAt,updatedAt,id,name,strategy,timeout,description",id:t.id})}]},authenticate:!0,permissionId:701,bodyClass:"sms"}).state("app.sms.smsAccounts",{url:"/smsAccounts",views:{"content@app":{templateUrl:"app/main/apps/sms/views/smsAccounts/smsAccounts.html",controller:"SmsAccountsController as vm"}},resolve:{smsAccounts:["apiResolver",function(e){return e.resolve("smsAccount@get",{fields:"createdAt,updatedAt,id,name,key,token,remote,ListId,phone,type,accountSid,authId,authToken,smsMethod,username,password,senderString,deliveryReport,waitForTheAssignedAgent,description,receiveUrl,deliveryReportUrl,notificationSound,notificationShake,notificationTemplate",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:702,bodyClass:"sms"}).state("app.sms.smsAccounts.edit",{url:"/:id?tab",params:{smsAccount:void 0},views:{"content@app":{templateUrl:"app/main/apps/sms/views/smsAccounts/edit/view.html",controller:"SmsAccountController as vm"}},resolve:{smsAccount:["apiResolver","$stateParams",function(e,t){return e.resolve("smsAccount@get",{fields:"createdAt,updatedAt,id,name,key,token,remote,ListId,phone,type,accountSid,authId,authToken,smsMethod,username,password,senderString,deliveryReport,waitForTheAssignedAgent,description,receiveUrl,deliveryReportUrl,notificationSound,notificationShake,notificationTemplate",id:t.id})}]},authenticate:!0,permissionId:702,bodyClass:"sms"}),t.addPart("app/main/apps/sms")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.sms",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.sms.realtime"]).config(e)}(),function(){"use strict";function e(e){e.state("app.sms.realtime",{url:"/realtime",views:{"content@app":{templateUrl:"app/main/apps/sms/views/realtime/realtime.html",controller:"SmsRealtimeController as vm"}},authenticate:!0,permissionId:710}).state("app.sms.realtime.agents",{url:"/agents",controller:"AgentsSmsRealtimeController as vm",templateUrl:"app/main/apps/sms/views/realtime/agents/view.html",resolve:{pauses:["apiResolver",function(e){return e.resolve("pause@get",{nolimit:!0})}],agents:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("user@get",{fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastPauseAt,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0}):e.resolve("user@getAgents",{id:t.getCurrentUser().id,fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0})}],rpcAgents:["apiResolver",function(e){return e.resolve("rpc@getAgents")}]},authenticate:!0,permissionId:710}).state("app.sms.realtime.queues",{url:"/queues",controller:"QueuesSmsRealtimeController as vm",templateUrl:"app/main/apps/sms/views/realtime/queues/view.html",resolve:{queues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("smsQueue@get",{type:"inbound",sort:"-updatedAt",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,channel:"sms",type:"inbound",sort:"-updatedAt",limit:10,page:1})}],rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getSmsQueues")}]},authenticate:!0,permissionId:710})}e.$inject=["$stateProvider"],angular.module("app.sms.realtime",["timer"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.staff",{abstract:!0,url:"/staff"}).state("app.staff.users",{url:"/users",views:{"content@app":{templateUrl:"app/main/apps/staff/views/users/users.html",controller:"UsersController as vm"}},resolve:{users:["apiResolver",function(e){return e.resolve("user@get",{fields:"createdAt,updatedAt,role,id,fullname,name,email,phone,mobile,userpic,password,description,autointernal,internal,transport,nat,allow,context,callgroup,pickupgroup,permissions,crudPermissions,passwordResetAt,passwordResetAt",role:"admin,user",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:201,bodyClass:"staff"}).state("app.staff.users.edit",{url:"/:id?tab",params:{user:void 0},views:{"content@app":{templateUrl:"app/main/apps/staff/views/users/edit/view.html",controller:"UserController as vm"}},resolve:{user:["apiResolver","$stateParams",function(e,t){return e.resolve("user@get",{fields:"createdAt,updatedAt,role,id,fullname,name,email,phone,mobile,userpic,password,description,autointernal,internal,transport,nat,allow,context,callgroup,pickupgroup,permissions,crudPermissions,passwordResetAt,passwordResetAt",id:t.id})}]},authenticate:!0,permissionId:201,bodyClass:"staff"}).state("app.staff.agents",{url:"/agents",views:{"content@app":{templateUrl:"app/main/apps/staff/views/agents/agents.html",controller:"AgentsController as vm"}},resolve:{agents:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("user@get",{fields:"createdAt,updatedAt,id,role,fullname,name,alias,email,phone,mobile,userpic,password,showWebBar,autointernal,internal,loginInPause,description,dtlscertfile,dtlsprivatekey,voicemail,transport,host,nat,type,allow,callerid,context,callgroup,pickupgroup,chanspy,extensionMonitor,chatCapacity,mailCapacity,faxCapacity,smsCapacity,openchannelCapacity,phoneBarEnableSettings,phoneBarAutoAnswer,phoneBarAutoAnswerDelay,phoneBarRingInUse,phoneBarEnableRecording,phoneBarEnableDtmfTone,phoneBarDnd,phoneBarUnansweredCallBadge,phoneBarEnableJaws,phoneBarOutboundProxy,phoneBarUnconditional,phoneBarUnconditionalNumber,phoneBarRemoteControl,phoneBarRemoteControlPort,voicemail,phoneBarExpires,phoneBarListenPort,permissions,allowmessenger,passwordResetAt,passwordResetAt",role:"agent",sort:"-updatedAt",limit:10,offset:0}):e.resolve("user@getAgents",{id:t.getCurrentUser().id,fields:"createdAt,updatedAt,id,role,fullname,name,alias,email,phone,mobile,userpic,password,showWebBar,autointernal,internal,loginInPause,description,dtlscertfile,dtlsprivatekey,voicemail,transport,host,nat,type,allow,callerid,context,callgroup,pickupgroup,chanspy,extensionMonitor,chatCapacity,mailCapacity,faxCapacity,smsCapacity,openchannelCapacity,phoneBarEnableSettings,phoneBarAutoAnswer,phoneBarAutoAnswerDelay,phoneBarRingInUse,phoneBarEnableRecording,phoneBarEnableDtmfTone,phoneBarDnd,phoneBarUnansweredCallBadge,phoneBarEnableJaws,phoneBarOutboundProxy,phoneBarUnconditional,phoneBarUnconditionalNumber,phoneBarRemoteControl,phoneBarRemoteControlPort,voicemail,phoneBarExpires,phoneBarListenPort,permissions,allowmessenger,passwordResetAt,passwordResetAt",role:"agent",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:202,bodyClass:"staff"}).state("app.staff.agents.edit",{url:"/:id?tab",params:{agent:void 0},views:{"content@app":{templateUrl:"app/main/apps/staff/views/agents/edit/view.html",controller:"AgentController as vm"}},resolve:{agent:["apiResolver","$stateParams",function(e,t){return e.resolve("user@get",{fields:"createdAt,updatedAt,id,role,fullname,name,alias,email,phone,mobile,userpic,password,showWebBar,autointernal,internal,loginInPause,description,dtlscertfile,dtlsprivatekey,voicemail,transport,host,nat,type,allow,callerid,context,callgroup,pickupgroup,chanspy,extensionMonitor,chatCapacity,mailCapacity,faxCapacity,smsCapacity,openchannelCapacity,phoneBarEnableSettings,phoneBarAutoAnswer,phoneBarAutoAnswerDelay,phoneBarRingInUse,phoneBarEnableRecording,phoneBarEnableDtmfTone,phoneBarDnd,phoneBarUnansweredCallBadge,phoneBarEnableJaws,phoneBarOutboundProxy,phoneBarUnconditional,phoneBarUnconditionalNumber,phoneBarRemoteControl,phoneBarRemoteControlPort,voicemail,phoneBarExpires,phoneBarListenPort,permissions,allowmessenger,passwordResetAt,passwordResetAt",id:t.id})}]},authenticate:!0,permissionId:202,bodyClass:"staff"}).state("app.staff.telephones",{url:"/telephones",views:{"content@app":{templateUrl:"app/main/apps/staff/views/telephones/telephones.html",controller:"TelephonesController as vm"}},resolve:{telephones:["apiResolver",function(e){return e.resolve("user@get",{fields:"createdAt,updatedAt,id,role,fullname,name,email,password,description,autointernal,internal,voicemail,transport,nat,allow,callerid,context,callgroup,pickupgroup,encryption,phone,mobile",role:"telephone",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:203,bodyClass:"staff"}).state("app.staff.telephones.edit",{url:"/:id?tab",params:{telephone:void 0},views:{"content@app":{templateUrl:"app/main/apps/staff/views/telephones/edit/view.html",controller:"TelephoneController as vm"}},resolve:{telephone:["apiResolver","$stateParams",function(e,t){return e.resolve("user@get",{fields:"createdAt,updatedAt,id,role,fullname,name,email,password,description,autointernal,internal,voicemail,transport,nat,allow,callerid,context,callgroup,pickupgroup,encryption,phone,mobile",id:t.id})}]},authenticate:!0,permissionId:203,bodyClass:"staff"}).state("app.staff.teams",{url:"/teams",views:{"content@app":{templateUrl:"app/main/apps/staff/views/teams/teams.html",controller:"TeamsController as vm"}},resolve:{teams:["apiResolver",function(e){return e.resolve("team@get",{fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:204,bodyClass:"staff"}),t.addPart("app/main/apps/staff")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.staff",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.tools",{abstract:!0,url:"/tools"}).state("app.tools.cannedAnswers",{url:"/cannedAnswers",views:{"content@app":{templateUrl:"app/main/apps/tools/views/cannedAnswers/cannedAnswers.html",controller:"CannedAnswersController as vm"}},resolve:{cannedAnswers:["apiResolver",function(e){return e.resolve("cannedAnswer@get",{fields:"createdAt,updatedAt,id,key,value,description",sort:"-updatedAt",MailAccountId:"null",FaxAccountId:"null",SmsAccountId:"null",OpenchannelAccountId:"null",ChatWebsiteId:"null",limit:10,offset:0})}]},authenticate:!0,permissionId:1002,bodyClass:"tools"}).state("app.tools.customDashboards",{url:"/customDashboards",views:{"content@app":{templateUrl:"app/main/apps/tools/views/customDashboards/customDashboards.html",controller:"CustomDashboardsController as vm"}},resolve:{customDashboards:["apiResolver",function(e){return e.resolve("dashboard@get",{fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1003,bodyClass:"tools"}).state("app.tools.customDashboards.edit",{url:"/:id?tab",params:{customDashboard:void 0},views:{"content@app":{templateUrl:"app/main/apps/tools/views/customDashboards/edit/view.html",controller:"CustomDashboardController as vm"}},resolve:{customDashboard:["apiResolver","$stateParams",function(e,t){return e.resolve("dashboard@get",{fields:"createdAt,updatedAt,id,name,description",id:t.id})}]},authenticate:!0,permissionId:1003,bodyClass:"tools"}).state("app.tools.intervals",{url:"/intervals",views:{"content@app":{templateUrl:"app/main/apps/tools/views/intervals/intervals.html",controller:"IntervalsController as vm"}},resolve:{intervals:["apiResolver",function(e){return e.resolve("interval@get",{fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",IntervalId:"null",limit:10,offset:0})}]},authenticate:!0,permissionId:1004,bodyClass:"tools"}).state("app.tools.intervals.edit",{url:"/:id?tab",params:{interval:void 0},views:{"content@app":{templateUrl:"app/main/apps/tools/views/intervals/edit/view.html",controller:"IntervalController as vm"}},resolve:{interval:["apiResolver","$stateParams",function(e,t){return e.resolve("interval@get",{fields:"createdAt,updatedAt,id,name,description",id:t.id})}]},authenticate:!0,permissionId:1004,bodyClass:"tools"}).state("app.tools.pauses",{url:"/pauses",views:{"content@app":{templateUrl:"app/main/apps/tools/views/pauses/pauses.html",controller:"PausesController as vm"}},resolve:{pauses:["apiResolver",function(e){return e.resolve("pause@get",{fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1005,bodyClass:"tools"}).state("app.tools.schedules",{url:"/schedules",views:{"content@app":{templateUrl:"app/main/apps/tools/views/schedules/schedules.html",controller:"SchedulesController as vm"}},resolve:{schedules:["apiResolver",function(e){return e.resolve("schedule@get",{fields:"createdAt,updatedAt,id,name,type,DefaultReportId,CustomReportId,output,active,startAt,endAt,cron,subtractNumber,subtractUnit,sendMail,MailAccountId,email,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:42,bodyClass:"tools"}).state("app.tools.sounds",{url:"/sounds",views:{"content@app":{templateUrl:"app/main/apps/tools/views/sounds/sounds.html",controller:"SoundsController as vm"}},resolve:{sounds:["apiResolver",function(e){return e.resolve("sound@get",{fields:"createdAt,updatedAt,id,save_name,converted_format,name,audio,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1006,bodyClass:"tools"}).state("app.tools.tags",{url:"/tags",views:{"content@app":{templateUrl:"app/main/apps/tools/views/tags/tags.html",controller:"TagsController as vm"}},resolve:{tags:["apiResolver",function(e){return e.resolve("tag@get",{fields:"createdAt,updatedAt,id,name,description,color",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1007,bodyClass:"tools"}).state("app.tools.templates",{url:"/templates",views:{"content@app":{templateUrl:"app/main/apps/tools/views/templates/templates.html",controller:"TemplatesController as vm"}},resolve:{templates:["apiResolver",function(e){return e.resolve("template@get",{fields:"createdAt,updatedAt,id,name,html,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1008,bodyClass:"tools"}).state("app.tools.triggers",{url:"/triggers",views:{"content@app":{templateUrl:"app/main/apps/tools/views/triggers/triggers.html",controller:"TriggersController as vm"}},resolve:{triggers:["apiResolver",function(e){return e.resolve("trigger@get",{fields:"createdAt,updatedAt,id,name,channel,status,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1009,bodyClass:"tools"}).state("app.tools.triggers.edit",{url:"/:id?tab",params:{trigger:void 0},views:{"content@app":{templateUrl:"app/main/apps/tools/views/triggers/edit/view.html",controller:"TriggerController as vm"}},resolve:{trigger:["apiResolver","$stateParams",function(e,t){return e.resolve("trigger@get",{fields:"createdAt,updatedAt,id,name,channel,status,description",id:t.id})}]},authenticate:!0,permissionId:1009,bodyClass:"tools"}).state("app.tools.trunks",{url:"/trunks",views:{"content@app":{templateUrl:"app/main/apps/tools/views/trunks/trunks.html",controller:"TrunksController as vm"}},resolve:{trunks:["apiResolver",function(e){return e.resolve("trunk@get",{fields:"createdAt,updatedAt,id,name,active,host,secret,defaultuser,context,callerid,type,dtmfmode,nat,qualify,allow,insecure,call_limit,registry,description,directmedia,callcounter,fromdomain,fromuser,outboundproxy,usereqphone,trustrpid,sendrpid,encryption,port,transport,t38pt_udptl,otherFields",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1010,bodyClass:"tools"}).state("app.tools.trunks.edit",{url:"/:id?tab",params:{trunk:void 0},views:{"content@app":{templateUrl:"app/main/apps/tools/views/trunks/edit/view.html",controller:"TrunkController as vm"}},resolve:{trunk:["apiResolver","$stateParams",function(e,t){return e.resolve("trunk@get",{fields:"createdAt,updatedAt,id,name,active,host,secret,defaultuser,context,callerid,type,dtmfmode,nat,qualify,allow,insecure,call_limit,registry,description,directmedia,callcounter,fromdomain,fromuser,outboundproxy,usereqphone,trustrpid,sendrpid,encryption,port,transport,t38pt_udptl,otherFields",id:t.id})}]},authenticate:!0,permissionId:1010,bodyClass:"tools"}).state("app.tools.variables",{url:"/variables",views:{"content@app":{templateUrl:"app/main/apps/tools/views/variables/variables.html",controller:"VariablesController as vm"}},resolve:{variables:["apiResolver",function(e){return e.resolve("variable@get",{fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1011,bodyClass:"tools"}),t.addPart("app/main/apps/tools")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.tools",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter"]).config(e)}(),function(){"use strict";function e(e){e.state("app.voice.realtime",{url:"/realtime",views:{"content@app":{templateUrl:"app/main/apps/voice/views/realtime/realtime.html",controller:"VoiceRealtimeController as vm"}},authenticate:!0,permissionId:410}).state("app.voice.realtime.agents",{url:"/agents",controller:"AgentsVoiceRealtimeController as vm",templateUrl:"app/main/apps/voice/views/realtime/agents/view.html",resolve:{pauses:["apiResolver",function(e){return e.resolve("pause@get",{nolimit:!0})}],agents:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("user@get",{fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastPauseAt,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0}):e.resolve("user@getAgents",{id:t.getCurrentUser().id,fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0})}],rpcAgents:["apiResolver",function(e){return e.resolve("rpc@getAgents")}]},authenticate:!0,permissionId:410}).state("app.voice.realtime.telephones",{url:"/telephones",controller:"TelephonesVoiceRealtimeController as vm",templateUrl:"app/main/apps/voice/views/realtime/telephones/view.html",resolve:{telephones:["apiResolver",function(e){return e.resolve("user@get",{fields:"id,fullname,userpic,internal",role:"telephone",sort:"-updatedAt",limit:10,offset:0})}],rpcTelephones:["apiResolver",function(e){return e.resolve("rpc@getTelephones")}]},authenticate:!0,permissionId:410}).state("app.voice.realtime.trunks",{url:"/trunks",controller:"TrunksVoiceRealtimeController as vm",templateUrl:"app/main/apps/voice/views/realtime/trunks/view.html",resolve:{trunks:["apiResolver",function(e){return e.resolve("trunk@get",{fields:"id,name",active:!0,sort:"-updatedAt",limit:10,offset:0})}],rpcTrunks:["apiResolver",function(e){return e.resolve("rpc@getTrunks")}]},authenticate:!0,permissionId:410}).state("app.voice.realtime.queues",{url:"/queues",controller:"QueuesVoiceRealtimeController as vm",templateUrl:"app/main/apps/voice/views/realtime/queues/view.html",resolve:{queues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("voiceQueue@get",{type:"inbound",sort:"-updatedAt",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,channel:"voice",type:"inbound",sort:"-updatedAt",limit:10,page:1})}],rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getVoiceQueues")}]},authenticate:!0,permissionId:410}).state("app.voice.realtime.queue_calls",{url:"/queue_calls",controller:"QueueCallsVoiceRealtimeController as vm",templateUrl:"app/main/apps/voice/views/realtime/queue_calls/view.html",resolve:{agents:["apiResolver",function(e){return e.resolve("user@get",{fields:"id,name,role",role:"agent",nolimit:!0})}],rpcVoiceQueuesChannels:["apiResolver",function(e){return e.resolve("rpc@getVoiceQueuesChannels")}]},authenticate:!0,permissionId:410}).state("app.voice.realtime.abandonedcalls",{url:"/abandonedcalls",controller:"AbandonedCallsVoiceRealtimeController as vm",templateUrl:"app/main/apps/voice/views/realtime/abandonedcalls/view.html",resolve:{agents:["apiResolver",function(e){return e.resolve("user@get",{fields:"id,name,role",role:"agent",nolimit:!0})}]},authenticate:!0,permissionId:410}).state("app.voice.realtime.queue_params",{url:"/queue_params",controller:"QueueParamsVoiceRealtimeController as vm",templateUrl:"app/main/apps/voice/views/realtime/queue_params/view.html",resolve:{queues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("voiceQueue@get",{type:"inbound",fields:"id,name",sort:"-updatedAt",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,channel:"voice",type:"inbound",fields:"id,name",sort:"-updatedAt",limit:10,page:1})}],rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getVoiceQueues")}]},authenticate:!0,permissionId:410}).state("app.voice.realtime.outbound_calls",{url:"/outbound_calls",controller:"OutboundCallsVoiceRealtimeController as vm",templateUrl:"app/main/apps/voice/views/realtime/outbound_calls/view.html",resolve:{rpcCalls:["apiResolver",function(e){return e.resolve("rpc@getOutboundChannels")}]},authenticate:!0,permissionId:410})}e.$inject=["$stateProvider"],angular.module("app.voice.realtime",["timer"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.voice",{abstract:!0,url:"/voice"}).state("app.voice.voiceQueues",{url:"/voiceQueues",views:{"content@app":{templateUrl:"app/main/apps/voice/views/voiceQueues/voiceQueues.html",controller:"VoiceQueuesController as vm"}},resolve:{voiceQueues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("voiceQueue@get",{fields:"createdAt,updatedAt,id,name,type,strategy,timeout,maxlen,retry,wrapuptime,weight,joinempty,leavewhenempty,musiconhold,announce,description,periodic_announce,queue_reporthold,queue_youarenext,queue_thereare,queue_callswaiting,queue_holdtime,queue_minutes,queue_minute,queue_seconds,queue_thankyou,announce_frequency,min_announce_frequency,periodic_announce_frequency,random_periodic_announce,announce_holdtime,announce_position,announce_position_limit,reportholdtime,acw,acwTimeout,autopause,ringinuse,memberdelay,timeoutrestart,monitor_format,context,setinterfacevar,setqueuevar,setqueueentryvar",type:"inbound",sort:"-updatedAt",channel:"voice",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,fields:"createdAt,updatedAt,id,name,type,strategy,timeout,maxlen,retry,wrapuptime,weight,joinempty,leavewhenempty,musiconhold,announce,description,periodic_announce,queue_reporthold,queue_youarenext,queue_thereare,queue_callswaiting,queue_holdtime,queue_minutes,queue_minute,queue_seconds,queue_thankyou,announce_frequency,min_announce_frequency,periodic_announce_frequency,random_periodic_announce,announce_holdtime,announce_position,announce_position_limit,reportholdtime,acw,acwTimeout,autopause,ringinuse,memberdelay,timeoutrestart,monitor_format,context,setinterfacevar,setqueuevar,setqueueentryvar",type:"inbound",sort:"-updatedAt",channel:"voice",limit:10,offset:0})}]},authenticate:!0,permissionId:401,bodyClass:"voice"}).state("app.voice.voiceQueues.edit",{url:"/:id?tab",params:{voiceQueue:void 0},views:{"content@app":{templateUrl:"app/main/apps/voice/views/voiceQueues/edit/view.html",controller:"VoiceQueueController as vm"}},resolve:{voiceQueue:["apiResolver","$stateParams",function(e,t){return e.resolve("voiceQueue@get",{fields:"createdAt,updatedAt,id,name,type,strategy,timeout,maxlen,retry,wrapuptime,weight,joinempty,leavewhenempty,musiconhold,announce,description,periodic_announce,queue_reporthold,queue_youarenext,queue_thereare,queue_callswaiting,queue_holdtime,queue_minutes,queue_minute,queue_seconds,queue_thankyou,announce_frequency,min_announce_frequency,periodic_announce_frequency,random_periodic_announce,announce_holdtime,announce_position,announce_position_limit,reportholdtime,acw,acwTimeout,autopause,ringinuse,memberdelay,timeoutrestart,monitor_format,context,setinterfacevar,setqueuevar,setqueueentryvar",id:t.id})}]},authenticate:!0,permissionId:401,bodyClass:"voice"}).state("app.voice.inboundroutes",{url:"/inboundroutes",views:{"content@app":{templateUrl:"app/main/apps/voice/views/inboundroutes/inboundroutes.html",controller:"InboundRoutesController as vm"}},resolve:{inboundroutes:["apiResolver",function(e){return e.resolve("voiceExtension@get",{fields:"createdAt,updatedAt,id,appdata,type,exten,context,description",type:"inbound",sort:"-updatedAt",VoiceExtensionId:"null",limit:10,offset:0})}]},authenticate:!0,permissionId:402,bodyClass:"voice"}).state("app.voice.inboundroutes.edit",{url:"/:id?tab",params:{inboundroute:void 0},views:{"content@app":{templateUrl:"app/main/apps/voice/views/inboundroutes/edit/view.html",controller:"InboundRouteController as vm"}},resolve:{inboundroute:["apiResolver","$stateParams",function(e,t){return e.resolve("voiceExtension@get",{fields:"createdAt,updatedAt,id,appdata,type,exten,context,description",id:t.id})}]},authenticate:!0,permissionId:402,bodyClass:"voice"}).state("app.voice.outboundroutes",{url:"/outboundroutes",views:{"content@app":{templateUrl:"app/main/apps/voice/views/outboundroutes/outboundroutes.html",controller:"OutboundRoutesController as vm"}},resolve:{outboundroutes:["apiResolver",function(e){return e.resolve("voiceExtension@get",{fields:"createdAt,updatedAt,id,appdata,type,exten,context,recordingFormat,cutdigits,description",type:"outbound",sort:"-updatedAt",VoiceExtensionId:"null",limit:10,offset:0})}]},authenticate:!0,permissionId:403,bodyClass:"voice"}).state("app.voice.outboundroutes.edit",{url:"/:id?tab",params:{outboundroute:void 0},views:{"content@app":{templateUrl:"app/main/apps/voice/views/outboundroutes/edit/view.html",controller:"OutboundRouteController as vm"}},resolve:{outboundroute:["apiResolver","$stateParams",function(e,t){return e.resolve("voiceExtension@get",{fields:"createdAt,updatedAt,id,appdata,type,exten,context,recordingFormat,cutdigits,description",id:t.id})}]},authenticate:!0,permissionId:403,bodyClass:"voice"}).state("app.voice.internalroutes",{url:"/internalroutes",views:{"content@app":{templateUrl:"app/main/apps/voice/views/internalroutes/internalroutes.html",controller:"InternalRoutesController as vm"}},resolve:{internalroutes:["apiResolver",function(e){return e.resolve("voiceExtension@get",{fields:"createdAt,updatedAt,id,appdata,type,exten,context,description",type:"internal",sort:"-updatedAt",VoiceExtensionId:"null",limit:10,offset:0})}]},authenticate:!0,permissionId:404,bodyClass:"voice"}).state("app.voice.internalroutes.edit",{url:"/:id?tab",params:{internalroute:void 0},views:{"content@app":{templateUrl:"app/main/apps/voice/views/internalroutes/edit/view.html",controller:"InternalRouteController as vm"}},resolve:{internalroute:["apiResolver","$stateParams",function(e,t){return e.resolve("voiceExtension@get",{fields:"createdAt,updatedAt,id,appdata,type,exten,context,description",id:t.id})}]},authenticate:!0,permissionId:404,bodyClass:"voice"}).state("app.voice.contexts",{url:"/contexts",views:{"content@app":{templateUrl:"app/main/apps/voice/views/contexts/contexts.html",controller:"ContextsController as vm"}},resolve:{contexts:["apiResolver",function(e){return e.resolve("voiceContext@get",{fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",defaultEntry:"false",limit:10,offset:0})}]},authenticate:!0,permissionId:405,bodyClass:"voice"}).state("app.voice.voicemails",{url:"/voicemails",views:{"content@app":{templateUrl:"app/main/apps/voice/views/voicemails/voicemails.html",controller:"VoicemailsController as vm"}},resolve:{voicemails:["apiResolver",function(e){return e.resolve("voiceMail@get",{fields:"createdAt,updatedAt,id,customer_id,fullname,email,password,mailbox,context,tz,attach,envelope,delete,emailbody,emailsubject,maxsecs,maxmsg",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:406,bodyClass:"voice"}).state("app.voice.voicemails.edit",{url:"/:id?tab",params:{voicemail:void 0},views:{"content@app":{templateUrl:"app/main/apps/voice/views/voicemails/edit/view.html",controller:"VoicemailController as vm"}},resolve:{voicemail:["apiResolver","$stateParams",function(e,t){return e.resolve("voiceMail@get",{fields:"createdAt,updatedAt,id,customer_id,fullname,email,password,mailbox,context,tz,attach,envelope,delete,emailbody,emailsubject,maxsecs,maxmsg",id:t.id})}]},authenticate:!0,permissionId:406,bodyClass:"voice"}).state("app.voice.musiconholds",{url:"/musiconholds",views:{"content@app":{templateUrl:"app/main/apps/voice/views/musiconholds/musiconholds.html",controller:"MusicOnHoldsController as vm"}},resolve:{musiconholds:["apiResolver",function(e){return e.resolve("voiceMusicOnHold@get",{fields:"createdAt,updatedAt,id,name,mode,directory,application,format,sort",defaultEntry:"false",limit:10,offset:0})}]},authenticate:!0,permissionId:407,bodyClass:"voice"}).state("app.voice.musiconholds.edit",{url:"/:id?tab",params:{musiconhold:void 0},views:{"content@app":{templateUrl:"app/main/apps/voice/views/musiconholds/edit/view.html",controller:"MusicOnHoldController as vm"}},resolve:{musiconhold:["apiResolver","$stateParams",function(e,t){return e.resolve("voiceMusicOnHold@get",{fields:"createdAt,updatedAt,id,name,mode,directory,application,format,sort",id:t.id})}]},authenticate:!0,permissionId:407,bodyClass:"voice"}).state("app.voice.voiceRecordings",{url:"/voiceRecordings",views:{"content@app":{templateUrl:"app/main/apps/voice/views/voiceRecordings/voiceRecordings.html",controller:"VoiceRecordingsController as vm"}},resolve:{voiceRecordings:["apiResolver",function(e){return e.resolve("voiceRecording@get",{fields:"createdAt,updatedAt,id,format,value,type,uniqueid,calleridnum,exten,connectedlinenum,queue,membername,rating,audio,createdAt,userDisposition",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:408,bodyClass:"voice"}).state("app.voice.chanSpies",{url:"/chanSpies",views:{"content@app":{templateUrl:"app/main/apps/voice/views/chanSpies/chanSpies.html",controller:"ChanSpiesController as vm"}},resolve:{chanSpies:["apiResolver",function(e){return e.resolve("voiceChanSpy@get",{fields:"createdAt,updatedAt,id,name,prefix,options,auth,password,record,recordingFormat,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:409,bodyClass:"voice"}),t.addPart("app/main/apps/voice")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.voice",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.voice.realtime"]).config(e)}(),function(){"use strict";angular.module("app.navigation",[]).config(function(){})}(),function(){"use strict";function e(e,t){e.addPart("app/quick-panel")}e.$inject=["$translatePartialLoaderProvider","msApiProvider"],angular.module("app.quick-panel",[]).config(e)}(),function(){"use strict";function e(e,t){e.state("app.reset",{url:"/reset/:token",views:{"main@":{templateUrl:"app/core/layouts/content-only.html",controller:"MainController as vm"},"content@app.reset":{templateUrl:"app/reset/reset.html",controller:"ResetPasswordController as vm"}},bodyClass:"reset"}),t.addPart("app/reset")}e.$inject=["$stateProvider","$translatePartialLoaderProvider"],angular.module("app.reset",[]).config(e)}(),function(){"use strict";function e(e){e.addPart("app/toolbar")}e.$inject=["$translatePartialLoaderProvider"],angular.module("app.toolbar",[]).config(e)}(),function(){"use strict";function e(e){e.interceptors.push("authInterceptor")}e.$inject=["$httpProvider"],angular.module("app.auth").config(e)}(),function(){"use strict";function e(e,n,t,a){e.$on("$stateChangeStart",function(e,t){return t.hasOwnProperty("authenticate")&&t.authenticate&&!a.isLoggedIn()?(e.preventDefault(),n.go("app.login",{},{reload:!0,notify:!0})):a.isLoggedIn()&&t.hasOwnProperty("permissionId")&&t.permissionId&&!a.hasPermission(t.permissionId)&&!a.hasRole("admin")?(e.preventDefault(),n.go("app.dashboards.general",{},{reload:!0,notify:!0})):void 0})}e.$inject=["$rootScope","$state","$window","Auth"],angular.module("app.auth").run(e)}(),function(){"use strict";function e(e,a,i,o,t){var s,r=["id","role","fullname","name","internal","email","userpic","permissions","md5secret","phoneBarAutoAnswer","phoneBarAutoAnswerDelay","phoneBarEnableRecording","phoneBarEnableDtmfTone","voicePause","chatPause","mailPause","faxPause","smsPause","openchannelPause","phoneBarEnableSettings","phoneBarExpires","pauseType","showWebBar","phoneBarRemoteControlPort","phoneBarRemoteControl","lastLoginAt","lastPauseAt","crudPermissions","allowmessenger","passwordResetAt","alias"];function l(){var t=i.defer();return d("agent")&&0!==s.showWebBar?o.user.login({id:s.id}).$promise.then(function(){console.log("AGENT LOGGED IN"),t.resolve()}).catch(function(e){console.error(e),t.reject(e)}):d("admin")||d("user")?o.user.update({id:s.id},{online:!0,lastLoginAt:moment().format("YYYY-MM-DD HH:mm:ss")}).$promise.catch(function(e){console.error(e)}).finally(function(){t.resolve()}):t.resolve(),t.promise}function n(){if(a.remove("motion.user"),a.remove("motion.token"),s&&s.id){var e=s.id;s=null,t.localStorage.removeItem("motion.user:"+e)}}function d(e){return!!s&&s.role===e}function c(){return a.get("motion.token")}function m(e){return s=_.assign(s,_.pick(e,r)),a.put("motion.user",JSON.stringify(s)),s}return function(){if(a.get("motion.user"))s=JSON.parse(a.get("motion.user")),o.user.get({id:s.id,fields:r.join(",")}).$promise.then(function(e){if(e)return m(e)}).catch(function(e){console.log("Error retrieving user",e)})}(),{login:function(e){var t,n=i.defer();return o.auth.local(e).$promise.then(function(e){return t=e,a.put("motion.token",e.token),o.user.get({id:e.id,fields:r.join(",")}).$promise}).then(function(e){return(s=e).lastLoginAt=moment(),a.put("motion.user",JSON.stringify(e)),l()}).then(function(){n.resolve()}).catch(function(e){n.reject(e.data)}).finally(function(){return o.user.get({id:t.id,fields:r.join(",")}).$promise.then(function(e){s=e})}),n.promise},logout:function(e){var t;return i.defer(),e?(n(),i.resolve()):(t=i.defer(),d("agent")&&0!==s.showWebBar?o.user.logout({id:s.id}).$promise.then(function(){console.log("AGENT LOGGED OUT")}).catch(function(e){console.error(e)}).finally(function(){t.resolve()}):d("admin")||d("user")?o.user.update({id:s.id},{online:!1}).$promise.catch(function(e){console.error(e)}).finally(function(){t.resolve()}):t.resolve(),t.promise).then(n).catch(function(e){console.error(e)})},queueLogin:l,isLoggedIn:function(){return!(!s||!c())},hasRole:d,hasPermission:function(e){return!!s&&_.includes(s.permissions,e)},getToken:c,getCurrentUser:function(){return s},updateCurrentUser:m,removeCookies:n}}e.$inject=["$location","$cookies","$q","api","$window"],angular.module("app.auth").factory("Auth",e)}(),function(){"use strict";function e(e,t,n,a,i){var o;return{request:function(e){var t=n.get("motion.token");return e.headers=e.headers||{},i.isSameOrigin(e.url)&&t&&(e.headers.Authorization="Bearer "+t),e},responseError:function(e){switch(e.status){case 401:n.remove("motion.user"),n.remove("motion.token"),(o||(o=a.get("$state"))).go("app.login")}return t.reject(e)}}}e.$inject=["$rootScope","$q","$cookies","$injector","Util"],angular.module("app.auth").factory("authInterceptor",e)}(),function(){"use strict";function e(t){var n={safeCb:function(e){return angular.isFunction(e)?e:angular.noop},urlParse:function(e){var t=document.createElement("a");return t.href=e,""===t.host&&(t.href=t.href),t},isSameOrigin:function(i,e){return i=n.urlParse(i),(e=(e=e&&[].concat(e)||[]).map(n.urlParse)).push(t.location),1<=(e=e.filter(function(e){var t=i.hostname===e.hostname,n=i.protocol===e.protocol,a=i.port===e.port||""===e.port&&("80"===i.port||"443"===i.port);return t&&n&&a})).length}};return n}e.$inject=["$window"],angular.module("app.auth").factory("Util",e)}(),function(){"use strict";angular.module("app.core").provider("motionConfig",function(){var n={disableCustomScrollbars:!1,disableMdInkRippleOnMobile:!0,disableCustomScrollbarsOnMobile:!0};this.config=function(e){n=angular.extend({},n,e)},this.$get=function(){var e={getConfig:function(e){if(angular.isUndefined(n[e]))return!1;return n[e]},setConfig:function(e,t){n[e]=t}};return e}})}(),function(){"use strict";function e(e,t,n,a){t.debugEnabled(!0),e.config({tabindex:!1}),a.config({disableCustomScrollbars:!1,disableCustomScrollbarsOnMobile:!0,disableMdInkRippleOnMobile:!0}),n.config({wheelPropagation:!0})}e.$inject=["$ariaProvider","$logProvider","msScrollConfigProvider","motionConfigProvider"],angular.module("app.core").config(e)}(),function(){"use strict";function e(e,t,n){(t.generate(),n.getConfig("disableMdInkRippleOnMobile")&&e.isMobile())&&angular.element("body").attr("md-no-ink",!0);e.isMobile()&&angular.element("html").addClass("is-mobile");var a=e.detectBrowser();if(a){var i=a.browser+" "+a.version+" "+a.os;angular.element("html").addClass(i)}}e.$inject=["msUtils","motionGenerator","motionConfig"],angular.module("app.core").run(e)}(),function(){"use strict";function e(s,l,d){return{restrict:"E",compile:function(e,t){var o;return t.code||(o=e.html(),e.empty()),function(n,a,r){r.code&&(o=n.$eval(r.code));var i=n.$eval(r.shouldInterpolate);l.when(o).then(function(e){if(e){i&&(e=d(e)(n));var t=angular.element('<pre><code class="highlight" ng-non-bindable></code></pre>');a.append(t),s(function(){!function(e,t){var n=t.find("code"),a=e.split("\n"),i=(a=a.filter(function(e){return e.trim().length}))[0].match(/^\s*/)[0],o=new RegExp("^"+i);a=a.map(function(e){return e.replace(o,"").replace(/\s+$/,"")});var s=hljs.highlight(r.language||r.lang,a.join("\n"),!0);s.value=s.value.replace(/=<span class="hljs-value">""<\/span>/gi,"").replace("<head>","").replace("<head/>",""),n.append(s.value).addClass("highlight")}(e,t)},34,!1)}})}}}}e.$inject=["$timeout","$q","$interpolate"],angular.module("app.core").directive("hljs",e)}(),function(){"use strict";angular.module("app.core").directive("msCard",function(){return{restrict:"E",scope:{templatePath:"=template",card:"=ngModel",vm:"=viewModel"},template:'<div class="ms-card-content-wrapper" ng-include="templatePath" onload="cardTemplateLoaded()"></div>',compile:function(e){return e.addClass("ms-card"),function(e,t){e.cardTemplateLoaded=function(){e.$emit("msCard::cardTemplateLoaded",t)}}}}})}(),function(){"use strict";angular.module("app.core").directive("msClickToCall",function(){return{restrict:"E",scope:{type:"=",disabled:"=",target:"=",prefix:"=",license:"="},controller:["$scope","$rootScope","$http","$translate","Auth","toasty",function(t,n,a,i,e,o){function s(e){return _.isNil(e)?"":e.replace(/[^\w.+#*\-]+/g,"")}function r(e){return a.get(e).success(function(){o.success({title:"Successful call",msg:"Call properly handled!"})}).error(function(e){o.error({title:"PhoneBar API Error",msg:i.instant("CONTACTMANAGER.ERRORS.PHONEBAR_API")})})}t.currentUser=e.getCurrentUser(),t.showMenu=function(){return t.target&&t.target.indexOf("@")<0&&t.target!=t.currentUser.internal&&t.target!=t.currentUser.name&&(0==t.currentUser.showWebBar&&t.currentUser.phoneBarRemoteControl||2==t.currentUser.showWebBar&&t.license.webrtc)&&!t.disabled},t.call=function(e){switch(t.currentUser.showWebBar){case 0:return r("http://127.0.0.1:"+(t.currentUser.phoneBarRemoteControlPort||"9888")+"/api/originate/"+s(e));case 2:n.$broadcast("webrtc::call",{target:s(e)})}},t.transfer=function(e){switch(t.currentUser.showWebBar){case 0:return r("http://127.0.0.1:"+(t.currentUser.phoneBarRemoteControlPort||"9888")+"/api/transfer?number="+s(e));case 2:n.$broadcast("webrtc::transfer",{target:s(e)})}}}],templateUrl:"app/core/directives/ms-click-to-call/ms-click-to-call.html"}})}(),function(){"use strict";function e(i){return{require:"ngModel",priority:1,link:function(e,t,n,a){a.$formatters.push(i.formatter),a.$parsers.push(i.parser)}}}e.$inject=["msDatepickerFixConfig"],angular.module("app.core").provider("msDatepickerFixConfig",function(){var t={formatter:function(e){return e?""===e?e:new Date(e):""},parser:function(e){return e?moment(e).add(moment(e).utcOffset(),"m").toDate():""}};this.config=function(e){t=angular.extend({},t,e)},this.$get=function(){return t}}).directive("msDatepickerFix",e)}(),function(){"use strict";angular.module("app.core").directive("msDualMultiselect",function(){return{restrict:"E",scope:{options:"="},controller:["$scope",function(s){s.transfer=function(e,t,n,a){var i=[];if(0<=n)i.push(e[n]),t.push(e[n]),e.splice(n,1);else{for(var o=0;o<e.length;o+=1)t.push(e[o]);e.length=0,i=t}s.options.transferCallback&&s.options.transferCallback(i,a)},s.getLine=function(e,t){var n="";if(_.isNil(t))return n;if(_.isArray(t)){for(var a=0;a<t.length;a++)n+=" "+(e[t[a]]?e[t[a]]:"");return n}return e[t]?e[t]:""}}],templateUrl:"app/core/directives/ms-dual-multiselect/ms-dual-multiselect.html"}})}(),function(){"use strict";function e(e){return{restrict:"E",replace:!0,scope:{onReply:"&",setText:"&",getText:"&",pickerPosition:"=",search:"=",recentEmojis:"=",placeholder:"="},template:'<input class="emojionearea" type="text">',link:function(n,t){t.emojioneArea({pickerPosition:n.pickerPosition,search:n.search,recentEmojis:n.recentEmojis,placeholder:e.instant(n.placeholder||"Type a message"),events:{keyup:function(e,t){n.onReply({event:t,body:this.getText()})}}}),n.setText({dirFn:function(e){t[0].emojioneArea.setText(e||"")}}),n.getText({dirFn:function(){return t[0].emojioneArea.getText()}})}}}e.$inject=["$translate"],angular.module("app.core").directive("msEmojiArea",e)}(),function(){"use strict";angular.module("app.core").directive("msFontFamily",function(){return{restrict:"E",scope:{ngModel:"="},controller:["$scope",function(e){e.fonts=[{option:"Arial",value:"Arial,Helvetica,sans-serif"},{option:"Comic Sans MS",value:"Comic Sans MS,cursive"},{option:"Courier New",value:"Courier New,Courier,monospace"},{option:"Georgia",value:"Georgia,serif"},{option:"Lucida Sans Unicode",value:"Lucida Sans Unicode,Lucida Grande,sans-serif"},{option:"Tahoma",value:"Tahoma,Geneva,sans-serif"},{option:"Times New Roman",value:"Times New Roman,Times,serif"},{option:"Trebuchet MS",value:"Trebuchet MS,Helvetica,sans-serif"},{option:"Verdana",value:"Verdana,Geneva,sans-serif"}]}],templateUrl:"app/core/directives/ms-font-family/ms-font-family.html"}})}(),function(){"use strict";angular.module("app.core").controller("MsFormWizardController",function(){var t=this;function e(){return t.forms.length}function n(){return 0===t.selectedIndex}function a(){return t.selectedIndex===e()-1}t.forms=[],t.selectedIndex=0,t.registerForm=function(e){t.forms.push(e)},t.previousStep=function(){if(n())return;t.selectedIndex--},t.nextStep=function(){if(a())return;t.selectedIndex++},t.firstStep=function(){t.selectedIndex=0},t.lastStep=function(){t.selectedIndex=e()-1},t.totalSteps=e,t.isFirstStep=n,t.isLastStep=a,t.currentStepInvalid=function(){return angular.isDefined(t.forms[t.selectedIndex])&&t.forms[t.selectedIndex].$invalid},t.previousStepInvalid=function(){return 0<t.selectedIndex&&angular.isDefined(t.forms[t.selectedIndex-1])&&t.forms[t.selectedIndex-1].$invalid},t.formsIncomplete=function(){for(var e=0;e<t.forms.length;e++)if(t.forms[e].$invalid)return!0;return!1},t.resetForm=function(){for(var e=t.selectedIndex=0;e<t.forms.length;e++)t.forms[e].$setPristine(),t.forms[e].$setUntouched()}}).directive("msFormWizard",function(){return{restrict:"E",scope:!0,controller:"MsFormWizardController as msWizard",compile:function(e){return e.addClass("ms-form-wizard"),function(){}}}}).directive("msFormWizardForm",function(){return{restrict:"A",require:["form","^msFormWizard"],compile:function(e){return e.addClass("ms-form-wizard-form"),function(e,t,n,a){var i=a[0],o=a[1];o.registerForm(i)}}}})}(),function(){"use strict";function e(i){return{restrict:"E",scope:{onClose:"&"},transclude:!0,templateUrl:"app/core/directives/ms-info-bar/ms-info-bar.html",link:function(e,t){var n=i.find("ms-info-bar-active"),a="ms-info-bar-active";n.addClass(a),e.removeInfoBar=function(){n.removeClass(a),t.remove(),e.onClose&&e.onClose(),e.$destroy()}}}}e.$inject=["$document"],angular.module("app.core").directive("msInfoBar",e)}(),function(){"use strict";function e(r,a,l,e){var d=this,t={columnCount:5,respectItemOrder:!1,reLayoutDebounce:400,responsive:{md:3,sm:2,xs:1}},n=!0;function i(){n&&e.cancel(n),n=e(function(){!function(){d.containerPos=d.container[0].getBoundingClientRect(),function(){d.columnCount=d.options.columnCount,l("gt-md")?d.columnCount=d.options.columnCount:l("md")?d.columnCount=d.columnCount>d.options.responsive.md?d.options.responsive.md:d.columnCount:l("sm")?d.columnCount=d.columnCount>d.options.responsive.sm?d.options.responsive.sm:d.columnCount:d.columnCount=d.options.responsive.xs;d.columnWidth=d.containerPos.width/d.columnCount}(),r.$broadcast("msMasonry:relayoutStarted"),d.items=d.container.find("ms-masonry-item");for(var e=Array.apply(null,new Array(d.columnCount)).map(function(){return 0}),t=0;t<d.items.length;t++){var n,a,i,o,s=d.items[t];(s=angular.element(s)).scope()&&s.scope().$broadcast("msMasonryItem:startReLayout"),s.css({width:d.columnWidth}),d.options.respectItemOrder?(i=t%d.columnCount,o=e[i]):(o=Math.min.apply(Math,e),i=e.indexOf(o)),e[i]=o+s[0].getBoundingClientRect().height,n=Math.round(i*d.columnWidth),a=o,s.css({transform:"translate3d("+n+"px,"+a+"px,0px)"}),s.addClass("placed"),s.scope()&&s.scope().$broadcast("msMasonryItem:finishReLayout")}}(),r.$broadcast("msMasonry:relayoutFinished")},d.options.reLayoutDebounce)}d.options=null,d.container=[],d.containerPos="",d.columnWidth="",d.items=[],d.reLayout=i,d.initialize=function(){d.options=d.options?angular.extend(t,d.options):t,r.$watch(function(){return d.container.width()},function(e,t){e!==t&&i()})},d.waitImagesLoaded=function(e,t){if("undefined"!=typeof imagesLoaded){var n=a.imagesLoaded(e);n.on("done",function(){t()})}else t()},r.$on("msMasonry:relayout",function(){i()})}function t(s){return{restrict:"AEC",controller:"msMasonryController",compile:function(i,o){return{pre:function(e,t,n,a){a.options=angular.fromJson(o.options||"{}"),a.container=i},post:function(e,t,n,a){s(function(){a.initialize()})}}}}}e.$inject=["$scope","$window","$mdMedia","$timeout"],t.$inject=["$timeout"],angular.module("app.core").controller("msMasonryController",e).directive("msMasonry",t).directive("msMasonryItem",function(){return{restrict:"AEC",require:"^msMasonry",priority:1,link:function(e,t,n,a){a.waitImagesLoaded(t,function(){a.reLayout()}),e.$on("msMasonryItem:finishReLayout",function(){e.$watch(function(){return t.height()},function(e,t){e!==t&&a.reLayout()})}),t.on("$destroy",function(){a.reLayout()})}}})}(),function(){"use strict";function e(n,e,a,i){var o=this;function s(e,t){o.selectedPalette=e,o.selectedHues=t}function r(){s(!(o.selectedColor={palette:"",hue:"",class:""}),!1),d()}function l(e,t){o.selectedColor={palette:e,hue:t,class:"md-"+e+"-"+t+"-bg",bgColorValue:i.rgba(o.palettes[e][t].value),fgColorValue:i.rgba(o.palettes[e][t].contrast)},"obj"!==o.msModelType||angular.equals(o.selectedColor,o.modelCtrl.$viewValue)||d(),s(e,o.palettes[e]),n.$selectedColor=o.selectedColor}function d(){"class"===o.msModelType?o.modelCtrl.$setViewValue(o.selectedColor.class):"obj"===o.msModelType&&o.modelCtrl.$setViewValue(o.selectedColor)}o.palettes=e,o.selectedPalette=!1,o.selectedHues=!1,n.$selectedColor={},o.activateHueSelection=s,o.selectColor=function(e,t){l(e,t),d(),a.hide()},o.removeColor=r,n.$watch("ngModel",function(){if(!o.modelCtrl.$viewValue||""===o.modelCtrl.$viewValue)return void r();var e,t;if("class"===o.msModelType){var n=o.modelCtrl.$viewValue.split("-");5<=n.length?(e=n[1]+"-"+n[2],t=n[3]):(e=n[1],t=n[2])}else"obj"===o.msModelType&&(e=o.modelCtrl.$viewValue.palette,t=o.modelCtrl.$viewValue.hue||500);l(e,t)})}e.$inject=["$scope","$mdColorPalette","$mdMenu","motionGenerator"],angular.module("app.core").controller("msMaterialColorPickerController",e).directive("msMaterialColorPicker",function(){return{require:["msMaterialColorPicker","ngModel"],restrict:"E",scope:{ngModel:"=",msModelType:"@?"},controller:"msMaterialColorPickerController as vm",transclude:!0,templateUrl:"app/core/directives/ms-material-color-picker/ms-material-color-picker.html",link:function(e,t,n,a,i){var o=a[0];o.modelCtrl=a[1],o.msModelType=e.msModelType||"class",i(e,function(e){(e=e.filter(function(e,t){return 1===t.nodeType})).length&&t.find("ms-color-picker-button").replaceWith(e)})}}})}(),function(){"use strict";function e(p,g,v){return{restrict:"A",link:function(e,t,n){var a="true"===n.msNavIsFolded,i=!1,o=angular.element(p[0].body),s=angular.element('<div id="ms-nav-fold-open-overlay"></div>'),r=angular.element('<div id="ms-nav-fold-close-overlay"></div>'),l=t.parent();function d(){o.addClass("ms-nav-folded"),g.$broadcast("msNav::forceCollapse"),t.scrollTop(0),l.append(s),s.on("mouseenter touchstart",function(e){c(e),i=!0})}function c(e){angular.isDefined(e)&&e.preventDefault(),o.addClass("ms-nav-folded-open"),g.$broadcast("msNav::expandMatchingToggles"),l.find(s).remove(),l.parent().append(r),r.on("mouseenter touchstart",function(e){m(e),i=!1})}function m(e){angular.isDefined(e)&&e.preventDefault(),g.$broadcast("msNav::forceCollapse"),t.scrollTop(0),o.removeClass("ms-nav-folded-open"),l.parent().find(r).remove(),l.append(s),s.on("mouseenter touchstart",function(e){c(e),i=!0})}function u(){o.removeClass("ms-nav-folded ms-nav-folded-open"),g.$broadcast("msNav::expandMatchingToggles"),t.off("mouseenter mouseleave")}v.setFoldable(e,t,a),a?d():u(),e.toggleFold=function(){(a=!a)?d():u()},e.openFolded=c,e.closeFolded=m,e.isNavFoldedOpen=function(){return i},e.$on("$destroy",function(){s.off("mouseenter touchstart"),r.off("mouseenter touchstart"),t.off("mouseenter mouseleave")})}}}function t(n,a,i){return{restrict:"E",scope:{},controller:"MsNavController",compile:function(e){return e.addClass("ms-nav"),function(e){n.$broadcast("msNav::expandMatchingToggles");var t=n.$on("$stateChangeSuccess",function(){n.$broadcast("msNav::expandMatchingToggles"),a.when("navigation").then(function(e){e.close(),i.isNavFoldedOpen()&&i.closeFolded()})});e.$on("$destroy",function(){t()})}}}}function n(m,u,p,g){return{restrict:"A",require:"^msNav",scope:!0,compile:function(e,t){return e.addClass("ms-nav-toggle"),angular.isUndefined(t.collapsed)&&(t.collapsed=!0),e.attr("collapsed",t.collapsed),function(a,i,e,n){var o={expanded:"expanded",expandAnimation:"expand-animation",collapseAnimation:"collapse-animation"},t=i.find("a"),s=[],r=/\(.*\)/g;function l(){return"true"===i.attr("collapsed")}function d(){var e=u.defer();if(!l())return e.reject({error:!0}),e.promise;i.attr("collapsed",!1);var t=angular.element(i.find("ms-nav-toggle-items")[0]);t.css({position:"absolute",visibility:"hidden",display:"block",height:"auto"});var n=t[0].offsetHeight;return t.css({position:"",visibility:"",display:"",height:""}),a.$evalAsync(function(){p.animate(t,{display:"block",height:"0px"},{height:n+"px"},o.expandAnimation).then(function(){t.addClass(o.expanded),t.css({height:""}),e.resolve({success:!0})})}),e.promise}function c(){var e=u.defer();if(l())return e.reject({error:!0}),e.promise;i.attr("collapsed",!0);var t=angular.element(i.find("ms-nav-toggle-items")[0]),n=t[0].offsetHeight;return a.$evalAsync(function(){p.animate(t,{height:n+"px"},{height:"0px"},o.collapseAnimation).then(function(){t.removeClass(o.expanded),t.css({display:"",height:""}),e.resolve({success:!0})})}),e.promise}angular.forEach(t,function(e){var t=angular.element(e).attr("ui-sref");angular.isUndefined(t)||(t=t.replace(r,""),s.push(t))}),n.setToggleItem(i,a),i.children(".ms-nav-button").on("click",function(){if(n.isDisabled())return;n.disable(),l()?(n.clearLockedItems(),a.$emit("msNav::pushToLockedList"),m.$broadcast("msNav::collapse"),d().then(function(){n.enable()})):a.$broadcast("msNav::forceCollapse")}),a.$on("$destroy",function(){i.children(".ms-nav-button").off("click")}),a.$on("msNav::collapse",function(){var e=n.getLockedItems(),t=!1;angular.forEach(e,function(e){angular.equals(e.scope,a)&&(t=!0)}),t||c().then(function(){n.enable()})}),a.$on("msNav::forceCollapse",function(){c().then(function(){n.enable()})}),a.$on("msNav::expandMatchingToggles",function(){var t=g.current.name,n=!1;angular.forEach(s,function(e){t===e&&(n=!0)}),n?d():c()}),a.$on("msNav::pushToLockedList",function(){n.setLockedItem(i,a)})}}}}e.$inject=["$document","$rootScope","msNavFoldService"],t.$inject=["$rootScope","$mdComponentRegistry","msNavFoldService"],n.$inject=["$rootScope","$q","$animate","$state"],angular.module("app.core").factory("msNavFoldService",function(){var n={};return{setFoldable:function(e,t){n={scope:e,element:t}},isNavFoldedOpen:function(){return n.scope.isNavFoldedOpen()},toggleFold:function(){n.scope.toggleFold()},openFolded:function(){n.scope.openFolded()},closeFolded:function(){n.scope.closeFolded()}}}).directive("msNavIsFolded",e).controller("MsNavController",function(){var e=this,t=!1,n=[],a=[];e.isDisabled=function(){return t},e.enable=function(){t=!1},e.disable=function(){t=!0},e.setToggleItem=function(e,t){n.push({element:e,scope:t})},e.getLockedItems=function(){return a},e.setLockedItem=function(e,t){a.push({element:e,scope:t})},e.clearLockedItems=function(){a=[]}}).directive("msNav",t).directive("msNavTitle",function(){return{restrict:"A",compile:function(e){return e.addClass("ms-nav-title"),function(){}}}}).directive("msNavButton",function(){return{restrict:"AE",compile:function(e){return e.addClass("ms-nav-button"),function(){}}}}).directive("msNavToggle",n)}(),function(){"use strict";function e(e,t){e.root?this.navigation=t.getNavigation(e.root):this.navigation=t.getNavigation(),this.toggleHorizontalMobileMenu=function(){angular.element("body").toggleClass("ms-navigation-horizontal-mobile-menu-active")},t.sort()}function t(c,m,u,p){return{restrict:"E",scope:{folded:"=",root:"@"},controller:"MsNavigationController as vm",templateUrl:"app/core/directives/ms-navigation/templates/vertical.html",transclude:!0,compile:function(e){return e.addClass("ms-navigation"),function(e,t){var n=angular.element("body"),a=angular.element('<div id="ms-navigation-fold-expander"></div>'),i=angular.element('<div id="ms-navigation-fold-collapser"></div>'),o=u("navigation");function s(e){if(p.setFolded(e),e)c.$broadcast("msNavigation::collapse"),n.addClass("ms-navigation-folded"),r();else{var t=p.getActiveItem();t&&t.scope.$emit("msNavigation::stateMatched"),n.removeClass("ms-navigation-folded ms-navigation-folded-open"),i.remove()}}function r(){t.parent().append(a),m(function(){a.on("mouseenter touchstart",l)})}function l(e){e&&e.preventDefault(),p.setFoldedOpen(!0);var t=p.getActiveItem();t&&t.scope.$emit("msNavigation::stateMatched"),n.addClass("ms-navigation-folded-open"),a.remove(),n.find("#main").append(i),i.on("mouseenter touchstart",d)}function d(e){e&&e.preventDefault(),p.setFoldedOpen(!1),c.$broadcast("msNavigation::collapse"),n.removeClass("ms-navigation-folded-open"),i.remove(),r()}p.setNavigationScope(e),function(){null===p.getFolded()&&p.setFolded(e.folded);p.getFolded()&&(m(function(){c.$broadcast("msNavigation::collapse")}),n.addClass("ms-navigation-folded"),r())}(),e.$watch(function(){return o.isLockedOpen()},function(e,t){if(!angular.isUndefined(e)&&!angular.equals(e,t)&&p.getFolded())if(e)c.$broadcast("msNavigation::collapse");else{var n=p.getActiveItem();n&&n.scope.$emit("msNavigation::stateMatched")}}),e.$watch("folded",function(e,t){angular.isUndefined(e)||angular.equals(e,t)||s(e)}),e.toggleFolded=function(){s(!p.getFolded())},e.$on("$stateChangeStart",function(){o.close()}),e.$on("$destroy",function(){i.off("mouseenter touchstart"),a.off("mouseenter touchstart")})}}}}function n(n,e,a,i,t,o){var s=this;s.element=e,s.node=n.node,s.hasChildren=void 0,s.collapsed=void 0,s.collapsable=void 0,s.group=void 0,s.animateHeightClass="animate-height",s.toggleCollapsed=function(){s.collapsed?s.expand():s.collapse()},s.collapse=function(){var e=s.element.children("ul"),t=e[0].offsetHeight;n.$evalAsync(function(){s.collapsed=!0,s.element.addClass("collapsing"),i.animate(e,{display:"block",height:t+"px"},{height:"0px"},s.animateHeightClass).then(function(){e.css({display:"",height:""}),s.element.removeClass("collapsing")}),n.$broadcast("msNavigation::collapse")})},s.expand=function(){var e=s.element.children("ul");e.css({position:"absolute",visibility:"hidden",display:"block",height:"auto"});var t=e[0].offsetHeight;e.css({position:"",visibility:"",display:"",height:""}),n.$evalAsync(function(){s.collapsed=!1,s.element.addClass("expanding"),i.animate(e,{display:"block",height:"0px"},{height:t+"px"},s.animateHeightClass).then(function(){e.css({height:""}),s.element.removeClass("expanding")}),a.$broadcast("msNavigation::collapse",s.node._path)})},s.getClass=function(){return s.node.class},s.isHidden=function(){if(angular.isDefined(s.node.hidden)&&angular.isFunction(s.node.hidden))return s.node.hidden();return!1},function(){s.hasChildren=0<s.node.children.length,s.group=!(!angular.isDefined(s.node.group)||!0!==s.node.group),!s.hasChildren||s.group?s.collapsable=!1:s.collapsable=!(!angular.isUndefined(s.node.collapsable)&&"boolean"==typeof s.node.collapsable&&!0!==s.node.collapsable);s.collapsable?s.collapsed=!(!angular.isUndefined(s.node.collapsed)&&"boolean"==typeof s.node.collapsed&&!0!==s.node.collapsed):s.collapsed=!1;if(s.node.state===t.current.name||t.includes(s.node.state)){if(angular.isDefined(s.node.stateParams)&&angular.isDefined(t.params)&&!angular.equals(s.node.stateParams,t.params))return;n.$emit("msNavigation::stateMatched"),o.setActiveItem(s.node,n)}n.$on("msNavigation::stateMatched",function(){s.collapsable&&s.collapsed&&n.$evalAsync(function(){s.collapsed=!1})}),n.$on("msNavigation::collapse",function(e,t){if(!s.collapsed&&s.collapsable)if(angular.isUndefined(t))s.collapse();else{var n=t.split("."),a=[],i=o.getActiveItem();if(i&&(a=i.node._path.split(".")),-1<n.indexOf(s.node._id))return;if(-1<a.indexOf(s.node._id))return;s.collapse()}}),n.$on("$stateChangeSuccess",function(){if(s.node.state===t.current.name){if(angular.isDefined(s.node.stateParams)&&angular.isDefined(t.params)&&!angular.equals(s.node.stateParams,t.params))return;o.setActiveItem(s.node,n),a.$broadcast("msNavigation::collapse",s.node._path)}if(t.includes(s.node.state)){if(angular.isDefined(s.node.stateParams)&&angular.isDefined(t.params)&&!angular.equals(s.node.stateParams,t.params))return;n.$emit("msNavigation::stateMatched")}})}()}function a(t){return{restrict:"E",scope:{root:"@"},controller:"MsNavigationController as vm",templateUrl:"app/core/directives/ms-navigation/templates/horizontal.html",transclude:!0,compile:function(e){return e.addClass("ms-navigation-horizontal"),function(e){t.setNavigationScope(e)}}}}function i(n,e,t,a,i){var o=this;o.element=e,o.node=n.node,o.hasChildren=void 0,o.group=void 0,o.getClass=function(){return o.node.class},function(){if(o.isActive=!1,o.hasChildren=0<o.node.children.length,o.group=!(!angular.isDefined(o.node.group)||!0!==o.node.group),o.node.state===a.current.name||a.includes(o.node.state)){if(angular.isDefined(o.node.stateParams)&&angular.isDefined(a.params)&&!angular.equals(o.node.stateParams,a.params))return;n.$emit("msNavigation::stateMatched"),i.setActiveItem(o.node,n)}n.$on("msNavigation::stateMatched",function(){o.hasChildren&&n.$evalAsync(function(){o.isActive=!0})}),n.$on("msNavigation::clearActive",function(){if(o.hasChildren){var e=[],t=i.getActiveItem();t&&(e=t.node._path.split(".")),-1<e.indexOf(o.node._id)?n.$evalAsync(function(){o.isActive=!0}):n.$evalAsync(function(){o.isActive=!1})}}),n.$on("$stateChangeSuccess",function(){if(o.node.state===a.current.name||a.includes(o.node.state)){if(angular.isDefined(o.node.stateParams)&&angular.isDefined(a.params)&&!angular.equals(o.node.stateParams,a.params))return;i.setActiveItem(o.node,n),t.$broadcast("msNavigation::clearActive")}})}()}function o(i){return{restrict:"A",require:"^msNavigationHorizontalNode",compile:function(e){return e.addClass("ms-navigation-horizontal-item"),function(e,t,n,a){t.on("click",function(){if(!a.hasChildren||i("gt-md"))return;t.toggleClass("expanded")}),e.$on("$destroy",function(){t.off("click")})}}}}e.$inject=["$scope","msNavigationService"],t.$inject=["$rootScope","$timeout","$mdSidenav","msNavigationService"],n.$inject=["$scope","$element","$rootScope","$animate","$state","msNavigationService"],a.$inject=["msNavigationService"],i.$inject=["$scope","$element","$rootScope","$state","msNavigationService"],o.$inject=["$mdMedia"],angular.module("app.core").provider("msNavigationService",function(){var r=angular.injector(["ng"]).get("$log"),l=[];function s(e,t){if(angular.isString(e)){for(var n=e.split("."),a=n[n.length-1],i=function(e){var t=l;if(1===e.length)return t;e.pop();for(var n=0;n<e.length;n++){for(var a=e[n],i=!0,o=0;o<t.length;o++)if(t[o]._id===a){t=t[o].children,i=!1;break}if(i){var s={_id:a,_path:e.join("."),title:a,weight:1,children:[]};t.push(s),t=s.children}}return t}(n),o=!1,s=0;s<i.length;s++)if(i[s]._id===a){o=i[s];break}o?(angular.extend(o,t),o.uisref=m(o)):(t.children=[],!angular.isUndefined(t.weight)&&angular.isNumber(t.weight)||(t.weight=1),t._id=a,t._path=e,t.uisref=m(t),i.push(t))}else r.error("path must be a string (eg. `dashboard.project`)")}function d(e){if(angular.isString(e)){for(var t=l,n=e.split("."),a=0;a<n.length;a++)for(var i=n[a],o=0;o<t.length;o++)if(t[o]._id===i){if(t[o]._path===e)return t.splice(o,1),!0;t=t[o].children;break}return!1}r.error("path must be a string (eg. `dashboard.project`)")}function c(e){e||(e=l).sort(a);for(var t=0;t<e.length;t++){var n=e[t].children;1<n.length&&n.sort(a),0<n.length&&c(n)}}function a(e,t){return parseInt(e.weight)-parseInt(t.weight)}function m(e){var t="";return angular.isDefined(e.state)&&(t=e.state,angular.isDefined(e.stateParams)&&angular.isObject(e.stateParams)&&(t=t+"("+angular.toJson(e.stateParams)+")")),t}this.saveItem=s,this.deleteItem=d,this.sortByWeight=c,this.$get=function(){var n=null,t=null,a=null,i=null,e={saveItem:s,deleteItem:d,sort:c,clearNavigation:function(){l=[],t&&(t.vm.navigation=l)},setActiveItem:function(e,t){n={node:e,scope:t}},getActiveItem:function(){return n},getNavigation:o,getFlatNavigation:function(e){return function e(t){var n=[];for(var a=0;a<t.length;a++){var i=angular.copy(t[a]);i.children=[],n.push(i),0<t[a].children.length&&(n=n.concat(e(t[a].children)))}return n}(o(e))},setNavigationScope:function(e){t=e},setFolded:function(e){a=e},getFolded:function(){return a},setFoldedOpen:function(e){i=e},getFoldedOpen:function(){return i},toggleFolded:function(){t.toggleFolded()}};return e;function o(e){if(e){for(var t=0;t<l.length;t++)if(l[t]._id===e)return[l[t]];return null}return l}}}).controller("MsNavigationController",e).directive("msNavigation",t).controller("MsNavigationNodeController",n).directive("msNavigationNode",function(){return{restrict:"A",bindToController:{node:"=msNavigationNode"},controller:"MsNavigationNodeController as vm",compile:function(e){return e.addClass("ms-navigation-node"),function(e,t,n,a){t.addClass(a.getClass()),a.group&&t.addClass("group")}}}}).directive("msNavigationItem",function(){return{restrict:"A",require:"^msNavigationNode",compile:function(e){return e.addClass("ms-navigation-item"),function(e,t,n,a){a.collapsable&&t.on("click",a.toggleCollapsed),e.$on("$destroy",function(){t.off("click")})}}}}).directive("msNavigationHorizontal",a).controller("MsNavigationHorizontalNodeController",i).directive("msNavigationHorizontalNode",function(){return{restrict:"A",bindToController:{node:"=msNavigationHorizontalNode"},controller:"MsNavigationHorizontalNodeController as vm",compile:function(e){return e.addClass("ms-navigation-horizontal-node"),function(e,t,n,a){t.addClass(a.getClass()),a.group&&t.addClass("group")}}}}).directive("msNavigationHorizontalItem",o)}(),function(){"use strict";function e(i,t,o,e,n,s,a,r,l,d,c){var m=this,u=["ringingId","speakerId","microphoneId","ringingVolume","speakerVolume","microphoneVolume","ringingMute","speakerMute","microphoneMute"],p=JSON.parse(a.localStorage.getItem("motion2.user:"+m.conf.id))||{webrtc:{ringingVolume:.5,speakerVolume:.5,microphoneVolume:1,ringingMute:!1,speakerMute:!1,microphoneMute:!1}};function g(e){switch(e){case"ringing":m.conf.ringingMute&&m.soundPlayer.pause(),m.conf.ringingId&&m.soundPlayer.setSinkId(m.conf.ringingId).catch(function(e){console.info(e.message,m.conf.ringingId)});break;case"speaker":m.conf.speakerMute&&m.remotePlayer.pause(),m.conf.speakerId&&m.soundPlayer.setSinkId(m.conf.speakerId).catch(function(e){console.info(e.message,m.conf.speakerId)});break;case"microphone":if(m.conf.microphoneMute)for(var t=0;t<m.sessions.length;t+=1)m.sessions[t].mute();break;default:console.log("unknown device")}}function v(e,t,n){m.calls.unshift({target:e,fullname:n||e,inbound:t,time:moment().format("HH:mm")}),50<m.calls.length&&m.calls.pop()}function h(){return m.conf.license&&m.conf.isWebRTCSupported&&m.conf.hasMicrophone&&m.conf.hasSpeakers&&"https"===m.conf.protocol&&("chrome"===m.conf.browserName.toLowerCase()||"opera"===m.conf.browserName.toLowerCase()||"safari"===m.conf.browserName.toLowerCase())}function b(){p.webrtc=_.pick(m.conf,u),a.localStorage.setItem("motion2.user:"+m.conf.id,JSON.stringify(p))}function f(e){this.remotePlayer.srcObject=e.stream}function A(e){var t,n,a=e.session;switch(e.originator){case"local":a.outgoing=!0,a.name=e.request.ruri.user,a.user=e.request.ruri.user,v(a.user,!1);break;case"remote":a.incoming=!0,a.name=e.request.from.display_name,a.user=e.request.from.uri.user,t=e.session,n=t.name?t.name+" <"+t.user+">":t.user,c.create("Incoming call from: ",n,null,function(){t.answer(m.sessionConf)},function(){t.terminate()}).then(function(e){t.notification=e}).catch(function(e){console.error(e)}),v(e.session.user,!0),m.conf.autoAnswer&&o(function(){a.isInProgress()&&(a.autoAnswer=!0,m.conf.microphoneId?m.sessionConf.mediaConstraints.audio={deviceId:m.conf.microphoneId}:m.sessionConf.mediaConstraints.audio=!0,a.answer(m.sessionConf))},m.conf.autoAnswerDelay?1e3*m.conf.autoAnswerDelay:0)}a.call_id=e.request.call_id,a.connection&&(a.connection.onaddstream=f.bind(this)),a.on("progress",function(e,t){var n=!1;switch(t.originator){case"local":this.conf.ringingMute||(this.soundPlayer.setAttribute("src","assets/ms-phonebar/sounds/incoming-call.ogg"),n=!0);break;case"remote":this.putOtherCallsOnHold(e),this.soundPlayer.setAttribute("src","assets/ms-phonebar/sounds/outgoing-call.ogg"),n=!0}n&&(this.soundPlayer.loop="loop",this.soundPlayer.play().catch(function(e){console.log(e.message)}))}.bind(this,a)),a.on("confirmed",function(n,e){return n.confirmed=!0,"remote"===e.originator&&n.connection&&(n.connection.onaddstream=f.bind(this),_.head(n.connection.getRemoteStreams())&&(this.remotePlayer.srcObject=_.head(n.connection.getRemoteStreams()))),this.soundPlayer.pause(),this.soundPlayer.loop=null,this.putOtherCallsOnHold(n),g("speaker"),g("microphone"),n.autoAnswer&&(this.soundPlayer.setAttribute("src","assets/ms-phonebar/sounds/beep.ogg"),this.soundPlayer.play().catch(function(e){console.log(e.message)})),d.rpc.getVoiceChannels().$promise.then(function(e){var t=_.find(e.rows,function(e){return e.sipcalllinkedid===n.call_id?e:e.sipcalluniqueid===n.call_id?e:null});t&&(n.monitor=t.monitor,n.uniqueid=t.uniqueid,n.monitors=t.monitors)}).catch(function(e){console.error(e)})}.bind(this,a)),a.on("hold",function(e,t){"local"===t.originator&&(e.localHold=!0)}.bind(this,a)),a.on("unhold",function(e,t){"local"===t.originator&&(e.localHold=!1)}.bind(this,a)),a.on("ended",function(e,t){_.remove(this.sessions,{id:e.id})}.bind(this,a)),a.on("failed",function(e,t){this.soundPlayer.pause(),this.soundPlayer.loop=null,e.notification&&e.notification.close(),_.remove(this.sessions,{id:e.id})}.bind(this,a)),this.sessions.push(a)}function E(){m.target="",document.getElementById("ms-target").blur(),document.getElementById("ms-target").value="",i.$broadcast("angucomplete-alt:clearInput","ms-target-wrap")}function y(e,t,n,a){return function(){s.show(s.simple().textContent(t).position(n).hideDelay(a)),e.terminate()}}e(function(){},999),m.direction="right",m.selectedMode="md-scale",m.target="",m.showDialpad=!1,m.soundPlayer=document.createElement("audio"),m.remotePlayer=document.getElementById(m.conf.remotePlayerId),m.soundPlayer.volume=1,m.sessionConf={mediaConstraints:{audio:!0,video:!1}},m.sessions=[],m.calls=[],m.ua=new JsSIP.UA({sockets:[new JsSIP.WebSocketInterface("wss://"+m.conf.host+":8089/ws")],uri:new JsSIP.URI("sip",m.conf.name,m.conf.host,5060,null,null).toString(),authorization_user:m.conf.name,ha1:m.conf.ha1,realm:m.conf.realm,user_agent:m.conf.ua,session_timers_refresh_method:"invite",register_expires:m.conf.phoneBarExpires||60,register:!0}),m.conf=_.merge(p.webrtc,m.conf),t.bind("keyup",function(e){switch(e.keyCode){case 27:o(function(){m.showDialpad=!1})}}),m.$onInit=function(){g("ringing"),g("speaker"),b(),this.ua.on("registered",function(){console.log("registered"),this.registered=!0}.bind(this)),this.ua.on("unregistered",function(){console.log("unregistered"),this.registered=!1}.bind(this)),this.ua.on("newRTCSession",A.bind(this)),DetectRTC.load(function(){this.conf.hasMicrophone=DetectRTC.hasMicrophone,this.conf.hasSpeakers="Chrome"!==DetectRTC.browser.name&&"Edge"!==DetectRTC.browser.name&&"Opera"!==DetectRTC.browser.name||DetectRTC.hasSpeakers,this.conf.isWebRTCSupported=DetectRTC.isWebRTCSupported,this.conf.osName=DetectRTC.osName,this.conf.osVersion=DetectRTC.osVersion,this.conf.browserName=DetectRTC.browser.name,this.conf.browserVersion=DetectRTC.browser.version,h()?this.ua.start():this.conf.license||l.warning({title:r.instant("TOOLBAR.WARNING"),msg:r.instant("TOOLBAR.WEBRTC_LICENSE_NOT_ENABELD"),clickToClose:!0,showClose:!0,shake:!1,timeout:!1,position:"bottom-right"})}.bind(this))}.bind(this),m.type=function(e,t){var n=e;switch(m.target||(m.target=""),t&&(m.target+=e,i.$broadcast("angucomplete-alt:changeInput","ms-target-wrap",m.target)),e){case"*":n="asterisk";break;case"#":n="pound"}m.conf.enableDtmfTone&&(m.soundPlayer.setAttribute("src","assets/ms-phonebar/sounds/dialpad/"+n+".ogg"),m.soundPlayer.play().catch(function(e){console.log(e.message)}));for(var a=0;a<m.sessions.length;a+=1)m.sessions[a].isEstablished()&&!m.sessions[a].isOnHold().local&&m.sessions[a].sendDTMF(e)},m.call=function(){if(m.target&&m.target!==m.conf.name&&m.target!==m.conf.internal){m.conf.microphoneId?m.sessionConf.mediaConstraints.audio={deviceId:m.conf.microphoneId}:m.sessionConf.mediaConstraints.audio=!0;var e=m.target.replace(/ /g,"");e=(e=e.replace(/\(/g,"")).replace(/\)/g,""),m.ua.call(e,m.sessionConf)}E()},m.hold=function(e){e.hold({useUpdate:!1})},m.refer=function(t){var e=n.prompt().title("Transfer").textContent("Type the target").placeholder("Target").ariaLabel("Target").ok("Transfer").cancel("Cancel");n.show(e).then(function(e){t.refer(e,{eventHandlers:{requestSucceeded:y(t,"requestSucceeded","top right",3e3),requestFailed:y(t,"requestFailed","top right",3e3)}})})},m.record=function(e){n.show({controller:"RecordDialogController",controllerAs:"vm",templateUrl:"assets/ms-phonebar/record/dialog.html",parent:angular.element(t.body),clickOutsideToClose:!0,locals:{session:e,sessions:m.sessions}})},m.unhold=function(e){e.unhold({useUpdate:!1})},m.answer=function(e){e.answer(m.sessionConf)},m.terminate=function(e){e.terminate()},m.selectSession=function(e){e.unhold({useUpdate:!1}),m.putOtherCallsOnHold(e)},m.typeWrapper=function(e){switch(e.key.toLowerCase()){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"*":case"#":m.type(e.key);break;case"enter":m.call()}},m.toggleDialpad=function(){m.showDialpad=!m.showDialpad},m.referAttended=function(e){n.show({controller:"ReferAttendedDialogController",controllerAs:"vm",templateUrl:"assets/ms-phonebar/referAttended/dialog.html",parent:angular.element(t.body),clickOutsideToClose:!0,locals:{session:e,sessions:_.reject(m.sessions,{id:e.id})}})},m.toggleVolume=function(e){switch(e){case"ringing":m.conf.ringingMute=!m.conf.ringingMute;break;case"speaker":m.conf.speakerMute?(m.conf.speakerMute=!1,m.remotePlayer.play().catch(function(e){console.log(e.message)})):(m.conf.speakerMute=!0,m.remotePlayer.pause());break;case"microphone":m.conf.microphoneMute=!m.conf.microphoneMute;for(var t=0;t<m.sessions.length;t+=1)m.conf.microphoneMute?m.sessions[t].mute():m.sessions[t].unmute();break;default:console.log("unknown device")}b()},m.closeDialpad=function(){m.showDialpad=!1},m.putOtherCallsOnHold=function(e){if(1<m.sessions.length)for(var t=0;t<m.sessions.length;t+=1)m.sessions[t].id===e.id||m.sessions[t].isOnHold().remote||m.sessions[t].hold({useUpdate:!1})},m.targetChanged=function(e){e?/^(\w|\.|\+|#|\*|\(|\)|\s|\-)*$/.test(e)?(m.target=e,i.$broadcast("angucomplete-alt:changeInput","ms-target-wrap",m.target)):m.target?i.$broadcast("angucomplete-alt:changeInput","ms-target-wrap",m.target):E():E()},m.targetSelected=function(e){e&&(m.target=e.originalObject.target,m.call(),E())},i.$on("webrtc::settings",function(e){n.show({controller:"SettingsController",controllerAs:"vm",templateUrl:"assets/ms-phonebar/settings/settings.html",parent:angular.element(t.body),targetEvent:e,clickOutsideToClose:!0,resolve:{devices:function(){return navigator.mediaDevices.enumerateDevices()}},locals:{conf:m.conf}}).then(function(e){e&&(m.conf=e,g("ringing"),g("speaker"),b())})}),i.$on("webrtc::logout",function(){m.ua.stop()}),i.$on("webrtc::call",function(e,t){t.target&&(m.target=t.target,m.call())}),i.$on("webrtc::transfer",function(e,t){if(t.target)for(var n=0;n<m.sessions.length;n+=1)if(m.sessions[n].isEstablished()&&!m.sessions[n].isOnHold().local){m.sessions[n].refer(t.target,{eventHandlers:{requestSucceeded:y(m.sessions[n],"requestSucceeded","top right",3e3),requestFailed:y(m.sessions[n],"requestFailed","top right",3e3)}});break}})}e.$inject=["$scope","$document","$timeout","$interval","$mdDialog","$mdToast","$window","$translate","toasty","api","motNotification"],angular.module("app.core").controller("MsPhonebarController",e).directive("msPhonebar",function(){return{restrict:"E",scope:{conf:"="},require:"msPhonebar",controller:"MsPhonebarController",controllerAs:"vm_pb",bindToController:!0,templateUrl:"assets/ms-phonebar/ms-phonebar.html"}})}(),function(){"use strict";function e(i){return{restrict:"C",controller:["$scope","$element",function(e,t){function n(){t.css("display","inline"),i(a,1e3)}function a(){t.css("display","none"),i(n,1e3)}n()}],replace:!0}}function t(t,i,o,e,n){var s=this;function a(t,e){console.log("startMonitor");var n=i.defer(),a=(e||t.filename.replace(/^.*[\\\/]/,"")).split(".")[0];return o.rpc.startMonitor({uniqueid:s.session.uniqueid,filename:a,format:"wav"}).$promise.then(function(e){t.filename=a+".wav",t.mixmonitorid=e.mixmonitorid,t.status="rec",s.session.monitor=!0,n.resolve(t)}).catch(function(e){n.reject(e)}),n.promise}s.title="Record",s.sessions=e,s.session=n,s.closeDialog=function(){t.hide()},s.addRecording=function(){var e=t.prompt({skipHide:!0}).title("Start new recording").textContent("Type the file name.").placeholder("File name").ariaLabel("File name").initialValue(function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}()).ok("Start").cancel("Cancel");t.show(e).then(function(e){return a({},e)}).then(function(e){s.session.monitors.push(e)})},s.stop=function(t){return console.log("stopMonitor"),o.rpc.stopMonitor({uniqueid:s.session.uniqueid,mixmonitorid:t.mixmonitorid}).$promise.then(function(e){t.status="pause",s.session.monitor=_.includes(s.session.monitors,{status:"rec"})}).catch(function(e){console.error(e)})},s.start=a}e.$inject=["$timeout"],t.$inject=["$mdDialog","$q","api","sessions","session"],angular.module("app.core").directive("msBlink",e).controller("RecordDialogController",t)}(),function(){"use strict";function e(t,a,i,e){var o=this;function s(e){t.hide(e)}o.title="Refer Attended",o.sessions=i,o.session=e,o.sessionTarget=null,o.closeDialog=s,o.transfer=function(){var e,t,n=_.find(i,function(e){if(e.user===o.target)return e});n.outgoing?(e=n,t=o.session):(e=o.session,t=n);t.refer(e.user,{replaces:e,eventHandlers:{requestSucceeded:function(e){a.show(a.simple().textContent("requestSucceeded").position("top right").hideDelay(3e3)),s(),t.terminate()},requestFailed:function(e){a.show(a.simple().textContent("requestFailed").position("top right").hideDelay(3e3)),s(),t.terminate()}}})}}e.$inject=["$mdDialog","$mdToast","sessions","session"],angular.module("app.core").controller("ReferAttendedDialogController",e)}(),function(){"use strict";function e(e,o,t){var n=this;function a(e,t,n){var a;if(o[n]){if(a=_.find(e,function(e){return e.deviceId===o[n]}))return a.deviceId;var i=_.findIndex(e,function(e){return e.kind===t&&"default"!==e.deviceId});if(0<=i)return e[i].deviceId}else(a=_.find(e,function(e){return e.kind===t&&"default"!==e.deviceId}))&&(o[n]=a.deviceId);return o[n]||null}o.ringingId=a(t,"audiooutput","ringingId"),o.speakerId=a(t,"audiooutput","speakerId"),o.microphoneId=a(t,"audioinput","microphoneId"),o.ringingVolume=o.ringingVolume||.5,o.speakerVolume=o.speakerVolume||.5,o.microphoneVolume=o.microphoneVolume||1,o.ringingMute=o.ringingMute||!1,o.speakerMute=o.speakerMute||!1,o.microphoneMute=o.microphoneMute||!1,n.conf=angular.copy(o),n.devices=t,n.saveSettings=function(){e.hide(n.conf)},n.closeDialog=function(){e.hide()},n.isCompatibleBrowser=function(){return"chrome"===n.conf.browserName.toLowerCase()||"opera"===n.conf.browserName.toLowerCase()||"safari"===n.conf.browserName.toLowerCase()}}e.$inject=["$mdDialog","conf","devices"],angular.module("app.toolbar").controller("SettingsController",e)}(),function(){"use strict";angular.module("app.core").directive("msRandomClass",function(){return{restrict:"A",scope:{msRandomClass:"="},link:function(e,t){var n=e.msRandomClass[Math.floor(Math.random()*e.msRandomClass.length)];t.addClass(n)}}})}(),function(){"use strict";function e(i){return{restrict:"E",scope:{id:"=",model:"=",download:"="},replace:!0,link:function(t,e){var n=!1,a=document.createElement("audio");t.download||a.setAttribute("controlsList","nodownload"),a.setAttribute("preload","none"),a.setAttribute("controls",""),a.setAttribute("style","width: 265px;"),a.setAttribute("src"," "),a.onplay=function(e){n||(n=!0,e.preventDefault(),i[t.model||"voiceRecording"].download({id:t.id}).$promise.then(function(e){var t=[e.buffer],n=new Blob(t,{type:e.type});a.setAttribute("type",e.type),a.setAttribute("src",URL.createObjectURL(n)),a.play()}).catch(function(e){console.error(e)}))},e.append(a)}}}e.$inject=["api"],angular.module("app.core").directive("msRecording",e)}(),function(){"use strict";angular.module("app.core").directive("msResponsiveTable",function(){return{restrict:"A",link:function(e,t){var n=angular.element('<div class="ms-responsive-table-wrapper"></div>');t.after(n),n.append(t)}}})}(),function(){"use strict";function e(o,s,t,n){return{restrict:"AE",compile:function(e){if(!(n.getConfig("disableCustomScrollbars")||n.getConfig("disableCustomScrollbarsOnMobile")&&t.isMobile()))return e.addClass("ms-scroll"),function(e,t,n){var a={};function i(){PerfectScrollbar.update(t[0])}n.msScroll&&(a=e.$eval(n.msScroll)),a=angular.extend({},s.getConfig(),a),o(function(){PerfectScrollbar.initialize(t[0],a)},0),t.on("mouseenter",i),e.$watch(function(){return t.prop("scrollHeight")},function(e,t){angular.isUndefined(e)||angular.equals(e,t)||i()}),e.$watch(function(){return t.prop("scrollWidth")},function(e,t){angular.isUndefined(e)||angular.equals(e,t)||i()}),e.$on("$destroy",function(){t.off("mouseenter"),PerfectScrollbar.destroy(t[0])})}}}}e.$inject=["$timeout","msScrollConfig","msUtils","motionConfig"],angular.module("app.core").provider("msScrollConfig",function(){var t={wheelSpeed:1,wheelPropagation:!1,swipePropagation:!0,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,useKeyboard:!0,suppressScrollX:!1,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0,stopPropagationOnClick:!0};this.config=function(e){t=angular.extend({},t,e)},this.$get=function(){var e={getConfig:function(){return t}};return e}}).directive("msScroll",e)}(),function(){"use strict";function e(o,i,e){var s=this;s.collapsed=!0,s.query="",s.queryOptions={debounce:s.debounce||0};var t=!(!s.collapseOnBlur||"true"!=s.collapseOnBlur);s.resultsLoading=!1,s.results=null,s.selectedResultIndex=0,s.ignoreMouseEvents=!1,s.populateResults=function(e){if(s.collapsed)return;var t=angular.isArray(e),n=null===e;if(!t&&!n)return;s.selectedResultIndex=0,s.results=e},s.expand=function(){s.collapsed=!1,o.expand(),s.onExpand&&angular.isFunction(s.onExpand)&&s.onExpand()},s.collapse=function(){s.query="",s.populateResults(null),s.collapsed=!0,o.collapse(),s.onCollapse&&angular.isFunction(s.onCollapse)&&s.onCollapse()},s.blurCollapse=function(){if(!t)return;s.collapse()},s.absorbEvent=function(e){e.preventDefault()},s.handleKeydown=function(e){var t=e.keyCode;-1<[27,38,40].indexOf(t)&&e.preventDefault();switch(t){case 13:if(!s.results)return;s.handleResultClick(s.results[s.selectedResultIndex]);break;case 27:s.collapse();break;case 38:0<=s.selectedResultIndex-1&&(s.selectedResultIndex--,s.ensureSelectedResultIsVisible());break;case 40:if(!s.results)return;s.selectedResultIndex+1<s.results.length&&(s.selectedResultIndex++,s.ensureSelectedResultIsVisible())}},s.handleMouseenter=function(e){if(s.ignoreMouseEvents)return;s.selectedResultIndex=e},s.temporarilyIgnoreMouseEvents=function(){s.ignoreMouseEvents=!0,e.cancel(s.mouseEventIgnoreTimeout),s.mouseEventIgnoreTimeout=e(function(){s.ignoreMouseEvents=!1},250)},s.handleResultClick=function(e){s.onResultClick&&s.onResultClick({item:e});s.collapse()},s.ensureSelectedResultIsVisible=function(){var e=i.find(".ms-search-bar-results"),t=angular.element(e.find(".result")[s.selectedResultIndex]);if(e&&t){var n=t.position().top-8,a=t.position().top+t.outerHeight()+8;s.temporarilyIgnoreMouseEvents(),e.scrollTop()>n&&e.scrollTop(n),a>e.height()+e.scrollTop()&&e.scrollTop(a-e.height())}},o.$watch("MsSearchBar.query",function(e,t){if(!angular.isUndefined(e)&&!angular.equals(e,t)&&!s.collapsed){var n=o.$parent.$eval(s.onSearch,{query:e}),a=angular.isArray(n),i=n&&!!n.then;a&&s.populateResults(n),i&&(s.resultsLoading=!0,n.then(function(e){s.populateResults(e)},function(){s.populateResults([])}).finally(function(){s.resultsLoading=!1}))}})}function t(i){return{restrict:"E",scope:{},require:"msSearchBar",controller:"MsSearchBarController as MsSearchBar",bindToController:{debounce:"=?",onSearch:"@",onResultClick:"&?",onExpand:"&?",onCollapse:"&?",collapseOnBlur:"@"},templateUrl:"app/core/directives/ms-search-bar/ms-search-bar.html",compile:function(e){return e.addClass("ms-search-bar"),function(e,t){var n,a=i.find("body");e.collapse=function(){t.removeClass("expanded"),a.removeClass("ms-search-bar-expanded")},e.expand=function(){t.addClass("expanded"),a.addClass("ms-search-bar-expanded"),n.focus()},n=t.find("#ms-search-bar-input")}}}}e.$inject=["$scope","$element","$timeout"],t.$inject=["$document"],angular.module("app.core").controller("MsSearchBarController",e).directive("msSearchBar",t)}(),function(){"use strict";function e(e,n,i,s,r,l){var d=this;d.query="",d.queryOptions={debounce:300},d.resultsLoading=!1,d.selectedResultIndex=0,d.ignoreMouseEvents=!1,d.mobileBarActive=!1,d.results=null,d.shortcuts=[],d.sortableOptions={ghostClass:"ghost",forceFallback:!0,fallbackClass:"dragging",onSort:function(){d.saveShortcuts()}},d.populateResults=function(){for(var e=[],t=l.getFlatNavigation(),n=r.defer(),a=0;a<t.length;a++)t[a].uisref&&e.push(t[a]);if(d.query){e=e.filter(function(e){if(-1<angular.lowercase(e.title).search(angular.lowercase(d.query)))return!0});for(var i=0;i<e.length;i++){e[i].hasShortcut=!1;for(var o=0;o<d.shortcuts.length;o++)if(d.shortcuts[o]._id===e[i]._id){e[i].hasShortcut=!0;break}}}else 0<d.shortcuts.length&&(e=d.shortcuts);return d.selectedResultIndex=0,s(function(){n.resolve(e)},250),n.promise},d.loadShortcuts=function(){var e=r.defer(),t=angular.fromJson(n.get("motion.shortcuts"));angular.isUndefined(t)&&(t=[{title:"Agents",icon:"icon-account-multiple",state:"app.staff.agents",weight:5,children:[],uisref:"app.staff.agents",hasShortcut:!0},{title:"License",icon:"icon-cog",state:"app.settings.license",weight:10,children:[],uisref:"app.settings.license",hasShortcut:!0}],n.put("motion.shortcuts",angular.toJson(t)));return e.resolve(t),e.promise},d.saveShortcuts=function(){var e=r.defer();return n.put("motion.shortcuts",angular.toJson(d.shortcuts)),s(function(){e.resolve({success:!0})},250),e.promise},d.addShortcut=function(e){e.hasShortcut=!0,d.shortcuts.push(e),d.saveShortcuts()},d.removeShortcut=function(e){e.hasShortcut=!1;for(var t=0;t<d.shortcuts.length;t++)d.shortcuts[t]._id===e._id&&(d.shortcuts.splice(t,1),d.query||(0===d.shortcuts.length?d.results=null:t>=d.shortcuts.length&&(d.selectedResultIndex=d.shortcuts.length-1)));d.saveShortcuts()},d.handleResultClick=function(e){e.hasShortcut?d.removeShortcut(e):d.addShortcut(e)},d.absorbEvent=function(e){e.preventDefault()},d.handleKeydown=function(e){var t=e.keyCode;-1<[38,40].indexOf(t)&&e.preventDefault();switch(t){case 13:d.handleResultClick(d.results[d.selectedResultIndex]);break;case 38:0<=d.selectedResultIndex-1&&(d.selectedResultIndex--,d.ensureSelectedResultIsVisible());break;case 40:d.selectedResultIndex+1<d.results.length&&(d.selectedResultIndex++,d.ensureSelectedResultIsVisible())}},d.handleMouseenter=function(e){if(d.ignoreMouseEvents)return;d.selectedResultIndex=e},d.temporarilyIgnoreMouseEvents=function(){d.ignoreMouseEvents=!0,s.cancel(d.mouseEventIgnoreTimeout),d.mouseEventIgnoreTimeout=s(function(){d.ignoreMouseEvents=!1},250)},d.ensureSelectedResultIsVisible=function(){var e=i.find("#ms-shortcut-add-menu").find(".results"),t=angular.element(e.find(".result")[d.selectedResultIndex]);if(e&&t){var n=t.position().top-8,a=t.position().top+t.outerHeight()+8;d.temporarilyIgnoreMouseEvents(),e.scrollTop()>n&&e.scrollTop(n),a>e.height()+e.scrollTop()&&e.scrollTop(a-e.height())}},d.toggleMobileBar=function(){d.mobileBarActive=!d.mobileBarActive},d.loadShortcuts().then(function(e){d.shortcuts=e,0<d.shortcuts.length&&(d.results=e)}),e.$watch("MsShortcuts.query",function(e,t){angular.isUndefined(e)||angular.equals(e,t)||(d.resultsLoading=!0,d.populateResults().then(function(e){d.results=e},function(){d.results=[]}).finally(function(){d.resultsLoading=!1}))})}e.$inject=["$scope","$cookies","$document","$timeout","$q","msNavigationService"],angular.module("app.core").controller("MsShortcutsController",e).directive("msShortcuts",function(){return{restrict:"E",scope:{},require:"msShortcuts",controller:"MsShortcutsController as MsShortcuts",bindToController:{},templateUrl:"app/core/directives/ms-shortcuts/ms-shortcuts.html",compile:function(e){return e.addClass("ms-shortcuts"),function(e,t){}}}})}(),function(){"use strict";angular.module("app.core").directive("msSidenavHelper",function(){return{restrict:"A",require:"^mdSidenav",link:function(e,t,n,a){e.$watch(function(){return a.isOpen()&&!a.isLockedOpen()},function(e){angular.isUndefined(e)||(t.parent().toggleClass("full-height",e),angular.element("html").toggleClass("sidenav-open",e))})}}})}(),function(){"use strict";function e(a){return{restrict:"E",link:function(e,t){var n=e.$on("msSplashScreen::remove",function(){a.leave(t).then(function(){n(),e=t=null})})}}}e.$inject=["$animate"],angular.module("app.core").directive("msSplashScreen",e)}(),function(){"use strict";function e(e){var i=this;function t(){i.setCurrentStep(1)}function n(e){return s(e)?i.steps[e-1].scope.optionalStep:null}function a(e){return s(e)?!!i.steps[e-1].scope.hideStep:null}function o(e){return s(e)?!!n(e)||i.steps[e-1].form.$valid:null}function s(e){return!(angular.isUndefined(e)||e<1||e>i.steps.length)}i.mainForm=void 0,i.orientation="horizontal",i.steps=[],i.currentStep=void 0,i.currentStepNumber=1,i.setOrientation=function(e){i.orientation=e||"horizontal"},i.registerMainForm=function(e){i.mainForm=e},i.registerStep=function(e,t,n){var a={element:e,scope:t,form:n,stepNumber:t.step||i.steps.length+1,stepTitle:t.stepTitle,stepTitleTranslate:t.stepTitleTranslate};return i.steps.push(a),i.steps.sort(function(e,t){return e.stepNumber-t.stepNumber}),a},i.setupSteps=function(){i.setCurrentStep(i.currentStepNumber)},i.resetForm=function(){e(function(){for(var e=0;e<i.steps.length;e++)i.steps[e].form.$setPristine(),i.steps[e].form.$setUntouched();i.mainForm.$setPristine(),i.mainForm.$setUntouched(),t()})},i.setCurrentStep=function(e){if(!s(e))return;if(i.currentStepNumber=e,"horizontal"===i.orientation){for(var t=0;t<i.steps.length;t++)i.steps[t].element.hide();i.steps[i.currentStepNumber-1].element.show()}else if("vertical"===i.orientation){for(var n=0;n<i.steps.length;n++)i.steps[n].element.find(".ms-stepper-step-content").hide();i.steps[i.currentStepNumber-1].element.find(".ms-stepper-step-content").show()}},i.gotoStep=function(e){if(a(e))return;i.setCurrentStep(e)},i.gotoPreviousStep=function(){for(var e=i.currentStepNumber-1,t=e;1<=t;t--)if(!a(t)){e=t;break}i.setCurrentStep(e)},i.gotoNextStep=function(){for(var e=i.currentStepNumber+1,t=e;t<=i.steps.length;t++)if(!a(t)){e=t;break}i.setCurrentStep(e)},i.gotoFirstStep=t,i.gotoLastStep=function(){i.setCurrentStep(i.steps.length)},i.isFirstStep=function(){return 1===i.currentStepNumber},i.isLastStep=function(){return i.currentStepNumber===i.steps.length},i.isStepCurrent=function(e){if(!s(e))return null;return i.currentStepNumber===e},i.isStepDisabled=function(e){if(!s(e))return null;for(var t=!1,n=1;n<e;n++)if(!o(n)){t=!0;break}return t},i.isStepOptional=n,i.isStepHidden=a,i.filterHiddenStep=function(e){return!a(e.stepNumber)},i.isStepValid=o,i.isStepNumberValid=s,i.isFormValid=function(){return i.mainForm.$valid}}function t(s){return{restrict:"A",scope:{},require:["form","msVerticalStepper"],priority:1001,controller:"MsStepperController as MsStepper",bindToController:{model:"=ngModel"},transclude:!0,templateUrl:"app/core/directives/ms-stepper/templates/vertical/vertical.html",compile:function(e){return e.addClass("ms-stepper"),function(e,t,n,a){var i=a[0],o=a[1];s(function(){o.setOrientation("vertical"),o.registerMainForm(i),o.setupSteps()})}}}}e.$inject=["$timeout"],t.$inject=["$timeout"],angular.module("app.core").controller("MsStepperController",e).directive("msHorizontalStepper",function(){return{restrict:"A",scope:{},require:["form","msHorizontalStepper"],priority:1001,controller:"MsStepperController as MsStepper",bindToController:{model:"=ngModel"},transclude:!0,templateUrl:"app/core/directives/ms-stepper/templates/horizontal/horizontal.html",compile:function(e){return e.addClass("ms-stepper"),function(e,t,n,a){var i=a[0],o=a[1];o.setOrientation("horizontal"),o.registerMainForm(i),o.setupSteps()}}}}).directive("msHorizontalStepperStep",function(){return{restrict:"E",require:["form","^msHorizontalStepper"],priority:1e3,scope:{step:"=?",stepTitle:"=?",stepTitleTranslate:"=?",optionalStep:"=?",hideStep:"=?"},compile:function(e){return e.addClass("ms-stepper-step"),function(e,t,n,a){var i=a[0],o=a[1];e.optionalStep=angular.isDefined(n.optionalStep),o.registerStep(t,e,i),t.hide()}}}}).directive("msVerticalStepper",t).directive("msVerticalStepperStep",function(){return{restrict:"E",require:["form","^msVerticalStepper"],priority:1e3,scope:{step:"=?",stepTitle:"=?",stepTitleTranslate:"=?",optionalStep:"=?",hideStep:"=?"},transclude:!0,templateUrl:"app/core/directives/ms-stepper/templates/vertical/step/vertical-step.html",compile:function(e){return e.addClass("ms-stepper-step"),function(e,t,n,a){var i=a[0],o=a[1];e.optionalStep=angular.isDefined(n.optionalStep),e.stepInfo=o.registerStep(t,e,i),e.MsStepper=o,t.find(".ms-stepper-step-content").hide()}}}})}(),function(){"use strict";function e(m,u){return{scope:!0,require:"^msTimeline",compile:function(e){return e.addClass("ms-timeline-item").addClass("hidden"),function(e,n,t,a){var i=72,o=!1,s=!1,r=a.getScrollEl();!function(){n.find("ms-card")?e.$on("msCard::cardTemplateLoaded",function(e,t){var n=angular.element(t[0]);d(n).then(function(){m(function(){o=!0})})}):d(n).then(function(){m(function(){o=!0})});r.on("scroll",c),c()}();var l=e.$watch(function(){return o&&s},function(e,t){angular.equals(e,t)||e&&(n.removeClass("hidden").addClass("animate"),l())},!0);function d(e){var t=u.defer(),n=e.find("img");return 0<n.length?n.on("load",function(){t.resolve("Image is loaded")}):t.resolve("No images"),t.promise}function c(){r.scrollTop()+r.height()>n.position().top+i&&(m(function(){s=!0}),r.off("scroll",c))}}}}}e.$inject=["$timeout","$q"],angular.module("app.core").controller("MsTimelineController",function(){var t=this;t.scrollEl=void 0,t.setScrollEl=function(e){t.scrollEl=e},t.getScrollEl=function(){return t.scrollEl}}).directive("msTimeline",function(){return{scope:{msTimeline:"=?",loadMore:"&?msTimelineLoadMore"},controller:"MsTimelineController",compile:function(e){return e.addClass("ms-timeline"),function(e,t,n,a){var i=angular.element('<div class="ms-timeline-loader md-accent-bg md-whiteframe-4dp"><span class="spinner animate-rotate"></span></div>');t.append(i);var o={scrollEl:"#content"};o=angular.extend(o,e.msTimeline,{});var s=angular.element(o.scrollEl);a.setScrollEl(s);var r=144;function l(){s.scrollTop()+s.height()+r>i.position().top&&(i.addClass("show"),c(),e.loadMore().then(function(){i.removeClass("show"),d()},function(){i.remove()}))}function d(){s.on("scroll",l)}function c(){s.off("scroll",l)}d(),e.$on("$destroy",function(){c()})}}}}).directive("msTimelineItem",e)}(),function(){"use strict";angular.module("app.core").directive("msTimezone",function(){return{restrict:"E",scope:{ngModel:"="},controller:["$scope",function(e){e.timezone=[{name:"Europe/Andorra",utcOffset:60,offsetStr:"+01:00",countries:["AD"]},{name:"Asia/Dubai",utcOffset:240,offsetStr:"+04:00",countries:["AE","OM"]},{name:"Asia/Kabul",utcOffset:270,offsetStr:"+04:30",countries:["AF"]},{name:"Europe/Tirane",utcOffset:60,offsetStr:"+01:00",countries:["AL"]},{name:"Asia/Yerevan",utcOffset:240,offsetStr:"+04:00",countries:["AM"]},{name:"Antarctica/Rothera",utcOffset:-180,offsetStr:"-03:00",countries:["AQ"]},{name:"Antarctica/Palmer",utcOffset:-180,offsetStr:"-03:00",countries:["AQ"]},{name:"Antarctica/Mawson",utcOffset:300,offsetStr:"+05:00",countries:["AQ"]},{name:"Antarctica/Davis",utcOffset:420,offsetStr:"+07:00",countries:["AQ"]},{name:"Antarctica/Casey",utcOffset:480,offsetStr:"+08:00",countries:["AQ"]},{name:"Antarctica/Vostok",utcOffset:360,offsetStr:"+06:00",countries:["AQ"]},{name:"Antarctica/DumontDUrville",utcOffset:600,offsetStr:"+10:00",countries:["AQ"]},{name:"Antarctica/Syowa",utcOffset:180,offsetStr:"+03:00",countries:["AQ"]},{name:"Antarctica/Troll",utcOffset:0,offsetStr:"+00:00",countries:["AQ"]},{name:"America/Argentina/Buenos_Aires",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Cordoba",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Salta",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Jujuy",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Tucuman",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Catamarca",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/La_Rioja",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/San_Juan",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Mendoza",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/San_Luis",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Rio_Gallegos",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Ushuaia",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"Pacific/Pago_Pago",utcOffset:-660,offsetStr:"-11:00",countries:["AS","UM"]},{name:"Europe/Vienna",utcOffset:60,offsetStr:"+01:00",countries:["AT"]},{name:"Australia/Lord_Howe",utcOffset:660,offsetStr:"+11:00",countries:["AU"]},{name:"Antarctica/Macquarie",utcOffset:660,offsetStr:"+11:00",countries:["AU"]},{name:"Australia/Hobart",utcOffset:660,offsetStr:"+11:00",countries:["AU"]},{name:"Australia/Currie",utcOffset:660,offsetStr:"+11:00",countries:["AU"]},{name:"Australia/Melbourne",utcOffset:660,offsetStr:"+11:00",countries:["AU"]},{name:"Australia/Sydney",utcOffset:660,offsetStr:"+11:00",countries:["AU"]},{name:"Australia/Broken_Hill",utcOffset:630,offsetStr:"+10:30",countries:["AU"]},{name:"Australia/Brisbane",utcOffset:600,offsetStr:"+10:00",countries:["AU"]},{name:"Australia/Lindeman",utcOffset:600,offsetStr:"+10:00",countries:["AU"]},{name:"Australia/Adelaide",utcOffset:630,offsetStr:"+10:30",countries:["AU"]},{name:"Australia/Darwin",utcOffset:570,offsetStr:"+09:30",countries:["AU"]},{name:"Australia/Perth",utcOffset:480,offsetStr:"+08:00",countries:["AU"]},{name:"Australia/Eucla",utcOffset:525,offsetStr:"+08:45",countries:["AU"]},{name:"Asia/Baku",utcOffset:240,offsetStr:"+04:00",countries:["AZ"]},{name:"America/Barbados",utcOffset:-240,offsetStr:"-04:00",countries:["BB"]},{name:"Asia/Dhaka",utcOffset:360,offsetStr:"+06:00",countries:["BD"]},{name:"Europe/Brussels",utcOffset:60,offsetStr:"+01:00",countries:["BE"]},{name:"Europe/Sofia",utcOffset:120,offsetStr:"+02:00",countries:["BG"]},{name:"Atlantic/Bermuda",utcOffset:-240,offsetStr:"-04:00",countries:["BM"]},{name:"Asia/Brunei",utcOffset:480,offsetStr:"+08:00",countries:["BN"]},{name:"America/La_Paz",utcOffset:-240,offsetStr:"-04:00",countries:["BO"]},{name:"America/Noronha",utcOffset:-120,offsetStr:"-02:00",countries:["BR"]},{name:"America/Belem",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Fortaleza",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Recife",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Araguaina",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Maceio",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Bahia",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Sao_Paulo",utcOffset:-120,offsetStr:"-02:00",countries:["BR"]},{name:"America/Campo_Grande",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Cuiaba",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Santarem",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Porto_Velho",utcOffset:-240,offsetStr:"-04:00",countries:["BR"]},{name:"America/Boa_Vista",utcOffset:-240,offsetStr:"-04:00",countries:["BR"]},{name:"America/Manaus",utcOffset:-240,offsetStr:"-04:00",countries:["BR"]},{name:"America/Eirunepe",utcOffset:-300,offsetStr:"-05:00",countries:["BR"]},{name:"America/Rio_Branco",utcOffset:-300,offsetStr:"-05:00",countries:["BR"]},{name:"America/Nassau",utcOffset:-300,offsetStr:"-05:00",countries:["BS"]},{name:"Asia/Thimphu",utcOffset:360,offsetStr:"+06:00",countries:["BT"]},{name:"Europe/Minsk",utcOffset:180,offsetStr:"+03:00",countries:["BY"]},{name:"America/Belize",utcOffset:-360,offsetStr:"-06:00",countries:["BZ"]},{name:"America/St_Johns",utcOffset:-210,offsetStr:"-03:30",countries:["CA"]},{name:"America/Halifax",utcOffset:-240,offsetStr:"-04:00",countries:["CA"]},{name:"America/Glace_Bay",utcOffset:-240,offsetStr:"-04:00",countries:["CA"]},{name:"America/Moncton",utcOffset:-240,offsetStr:"-04:00",countries:["CA"]},{name:"America/Goose_Bay",utcOffset:-240,offsetStr:"-04:00",countries:["CA"]},{name:"America/Blanc-Sablon",utcOffset:-240,offsetStr:"-04:00",countries:["CA"]},{name:"America/Toronto",utcOffset:-300,offsetStr:"-05:00",countries:["CA"]},{name:"America/Nipigon",utcOffset:-300,offsetStr:"-05:00",countries:["CA"]},{name:"America/Thunder_Bay",utcOffset:-300,offsetStr:"-05:00",countries:["CA"]},{name:"America/Iqaluit",utcOffset:-300,offsetStr:"-05:00",countries:["CA"]},{name:"America/Pangnirtung",utcOffset:-300,offsetStr:"-05:00",countries:["CA"]},{name:"America/Resolute",utcOffset:-360,offsetStr:"-06:00",countries:["CA"]},{name:"America/Atikokan",utcOffset:-300,offsetStr:"-05:00",countries:["CA"]},{name:"America/Rankin_Inlet",utcOffset:-360,offsetStr:"-06:00",countries:["CA"]},{name:"America/Winnipeg",utcOffset:-360,offsetStr:"-06:00",countries:["CA"]},{name:"America/Rainy_River",utcOffset:-360,offsetStr:"-06:00",countries:["CA"]},{name:"America/Regina",utcOffset:-360,offsetStr:"-06:00",countries:["CA"]},{name:"America/Swift_Current",utcOffset:-360,offsetStr:"-06:00",countries:["CA"]},{name:"America/Edmonton",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Cambridge_Bay",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Yellowknife",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Inuvik",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Creston",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Dawson_Creek",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Fort_Nelson",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Vancouver",utcOffset:-480,offsetStr:"-08:00",countries:["CA"]},{name:"America/Whitehorse",utcOffset:-480,offsetStr:"-08:00",countries:["CA"]},{name:"America/Dawson",utcOffset:-480,offsetStr:"-08:00",countries:["CA"]},{name:"Indian/Cocos",utcOffset:390,offsetStr:"+06:30",countries:["CC"]},{name:"Europe/Zurich",utcOffset:60,offsetStr:"+01:00",countries:["CH","DE","LI"]},{name:"Africa/Abidjan",utcOffset:0,offsetStr:"+00:00",countries:["CI","BF","GM","GN","ML","MR","SH","SL","SN","ST","TG"]},{name:"Pacific/Rarotonga",utcOffset:-600,offsetStr:"-10:00",countries:["CK"]},{name:"America/Santiago",utcOffset:-180,offsetStr:"-03:00",countries:["CL"]},{name:"Pacific/Easter",utcOffset:-300,offsetStr:"-05:00",countries:["CL"]},{name:"Asia/Shanghai",utcOffset:480,offsetStr:"+08:00",countries:["CN"]},{name:"Asia/Urumqi",utcOffset:360,offsetStr:"+06:00",countries:["CN"]},{name:"America/Bogota",utcOffset:-300,offsetStr:"-05:00",countries:["CO"]},{name:"America/Costa_Rica",utcOffset:-360,offsetStr:"-06:00",countries:["CR"]},{name:"America/Havana",utcOffset:-300,offsetStr:"-05:00",countries:["CU"]},{name:"Atlantic/Cape_Verde",utcOffset:-60,offsetStr:"-01:00",countries:["CV"]},{name:"America/Curacao",utcOffset:-240,offsetStr:"-04:00",countries:["CW","AW","BQ","SX"]},{name:"Indian/Christmas",utcOffset:420,offsetStr:"+07:00",countries:["CX"]},{name:"Asia/Nicosia",utcOffset:120,offsetStr:"+02:00",countries:["CY"]},{name:"Europe/Prague",utcOffset:60,offsetStr:"+01:00",countries:["CZ","SK"]},{name:"Europe/Berlin",utcOffset:60,offsetStr:"+01:00",countries:["DE"]},{name:"Europe/Copenhagen",utcOffset:60,offsetStr:"+01:00",countries:["DK"]},{name:"America/Santo_Domingo",utcOffset:-240,offsetStr:"-04:00",countries:["DO"]},{name:"Africa/Algiers",utcOffset:60,offsetStr:"+01:00",countries:["DZ"]},{name:"America/Guayaquil",utcOffset:-300,offsetStr:"-05:00",countries:["EC"]},{name:"Pacific/Galapagos",utcOffset:-360,offsetStr:"-06:00",countries:["EC"]},{name:"Europe/Tallinn",utcOffset:120,offsetStr:"+02:00",countries:["EE"]},{name:"Africa/Cairo",utcOffset:120,offsetStr:"+02:00",countries:["EG"]},{name:"Africa/El_Aaiun",utcOffset:0,offsetStr:"+00:00",countries:["EH"]},{name:"Europe/Madrid",utcOffset:60,offsetStr:"+01:00",countries:["ES"]},{name:"Africa/Ceuta",utcOffset:60,offsetStr:"+01:00",countries:["ES"]},{name:"Atlantic/Canary",utcOffset:0,offsetStr:"+00:00",countries:["ES"]},{name:"Europe/Helsinki",utcOffset:120,offsetStr:"+02:00",countries:["FI","AX"]},{name:"Pacific/Fiji",utcOffset:720,offsetStr:"+12:00",countries:["FJ"]},{name:"Atlantic/Stanley",utcOffset:-180,offsetStr:"-03:00",countries:["FK"]},{name:"Pacific/Chuuk",utcOffset:600,offsetStr:"+10:00",countries:["FM"]},{name:"Pacific/Pohnpei",utcOffset:660,offsetStr:"+11:00",countries:["FM"]},{name:"Pacific/Kosrae",utcOffset:660,offsetStr:"+11:00",countries:["FM"]},{name:"Atlantic/Faroe",utcOffset:0,offsetStr:"+00:00",countries:["FO"]},{name:"Europe/Paris",utcOffset:60,offsetStr:"+01:00",countries:["FR"]},{name:"Europe/London",utcOffset:0,offsetStr:"+00:00",countries:["GB","GG","IM","JE"]},{name:"Asia/Tbilisi",utcOffset:240,offsetStr:"+04:00",countries:["GE"]},{name:"America/Cayenne",utcOffset:-180,offsetStr:"-03:00",countries:["GF"]},{name:"Africa/Accra",utcOffset:0,offsetStr:"+00:00",countries:["GH"]},{name:"Europe/Gibraltar",utcOffset:60,offsetStr:"+01:00",countries:["GI"]},{name:"America/Godthab",utcOffset:-180,offsetStr:"-03:00",countries:["GL"]},{name:"America/Danmarkshavn",utcOffset:0,offsetStr:"+00:00",countries:["GL"]},{name:"America/Scoresbysund",utcOffset:-60,offsetStr:"-01:00",countries:["GL"]},{name:"America/Thule",utcOffset:-240,offsetStr:"-04:00",countries:["GL"]},{name:"Europe/Athens",utcOffset:120,offsetStr:"+02:00",countries:["GR"]},{name:"Atlantic/South_Georgia",utcOffset:-120,offsetStr:"-02:00",countries:["GS"]},{name:"America/Guatemala",utcOffset:-360,offsetStr:"-06:00",countries:["GT"]},{name:"Pacific/Guam",utcOffset:600,offsetStr:"+10:00",countries:["GU","MP"]},{name:"Africa/Bissau",utcOffset:0,offsetStr:"+00:00",countries:["GW"]},{name:"America/Guyana",utcOffset:-240,offsetStr:"-04:00",countries:["GY"]},{name:"Asia/Hong_Kong",utcOffset:480,offsetStr:"+08:00",countries:["HK"]},{name:"America/Tegucigalpa",utcOffset:-360,offsetStr:"-06:00",countries:["HN"]},{name:"America/Port-au-Prince",utcOffset:-300,offsetStr:"-05:00",countries:["HT"]},{name:"Europe/Budapest",utcOffset:60,offsetStr:"+01:00",countries:["HU"]},{name:"Asia/Jakarta",utcOffset:420,offsetStr:"+07:00",countries:["ID"]},{name:"Asia/Pontianak",utcOffset:420,offsetStr:"+07:00",countries:["ID"]},{name:"Asia/Makassar",utcOffset:480,offsetStr:"+08:00",countries:["ID"]},{name:"Asia/Jayapura",utcOffset:540,offsetStr:"+09:00",countries:["ID"]},{name:"Europe/Dublin",utcOffset:0,offsetStr:"+00:00",countries:["IE"]},{name:"Asia/Jerusalem",utcOffset:120,offsetStr:"+02:00",countries:["IL"]},{name:"Asia/Kolkata",utcOffset:330,offsetStr:"+05:30",countries:["IN"]},{name:"Indian/Chagos",utcOffset:360,offsetStr:"+06:00",countries:["IO"]},{name:"Asia/Baghdad",utcOffset:180,offsetStr:"+03:00",countries:["IQ"]},{name:"Asia/Tehran",utcOffset:210,offsetStr:"+03:30",countries:["IR"]},{name:"Atlantic/Reykjavik",utcOffset:0,offsetStr:"+00:00",countries:["IS"]},{name:"Europe/Rome",utcOffset:60,offsetStr:"+01:00",countries:["IT","SM","VA"]},{name:"America/Jamaica",utcOffset:-300,offsetStr:"-05:00",countries:["JM"]},{name:"Asia/Amman",utcOffset:120,offsetStr:"+02:00",countries:["JO"]},{name:"Asia/Tokyo",utcOffset:540,offsetStr:"+09:00",countries:["JP"]},{name:"Africa/Nairobi",utcOffset:180,offsetStr:"+03:00",countries:["KE","DJ","ER","ET","KM","MG","SO","TZ","UG","YT"]},{name:"Asia/Bishkek",utcOffset:360,offsetStr:"+06:00",countries:["KG"]},{name:"Pacific/Tarawa",utcOffset:720,offsetStr:"+12:00",countries:["KI"]},{name:"Pacific/Enderbury",utcOffset:780,offsetStr:"+13:00",countries:["KI"]},{name:"Pacific/Kiritimati",utcOffset:840,offsetStr:"+14:00",countries:["KI"]},{name:"Asia/Pyongyang",utcOffset:510,offsetStr:"+08:30",countries:["KP"]},{name:"Asia/Seoul",utcOffset:540,offsetStr:"+09:00",countries:["KR"]},{name:"America/Cayman",utcOffset:-300,offsetStr:"-05:00",countries:["KY"]},{name:"Asia/Almaty",utcOffset:360,offsetStr:"+06:00",countries:["KZ"]},{name:"Asia/Qyzylorda",utcOffset:360,offsetStr:"+06:00",countries:["KZ"]},{name:"Asia/Aqtobe",utcOffset:300,offsetStr:"+05:00",countries:["KZ"]},{name:"Asia/Aqtau",utcOffset:300,offsetStr:"+05:00",countries:["KZ"]},{name:"Asia/Oral",utcOffset:300,offsetStr:"+05:00",countries:["KZ"]},{name:"Asia/Beirut",utcOffset:120,offsetStr:"+02:00",countries:["LB"]},{name:"Asia/Colombo",utcOffset:330,offsetStr:"+05:30",countries:["LK"]},{name:"Africa/Monrovia",utcOffset:0,offsetStr:"+00:00",countries:["LR"]},{name:"Europe/Vilnius",utcOffset:120,offsetStr:"+02:00",countries:["LT"]},{name:"Europe/Luxembourg",utcOffset:60,offsetStr:"+01:00",countries:["LU"]},{name:"Europe/Riga",utcOffset:120,offsetStr:"+02:00",countries:["LV"]},{name:"Africa/Tripoli",utcOffset:120,offsetStr:"+02:00",countries:["LY"]},{name:"Africa/Casablanca",utcOffset:0,offsetStr:"+00:00",countries:["MA"]},{name:"Europe/Monaco",utcOffset:60,offsetStr:"+01:00",countries:["MC"]},{name:"Europe/Chisinau",utcOffset:120,offsetStr:"+02:00",countries:["MD"]},{name:"Pacific/Majuro",utcOffset:720,offsetStr:"+12:00",countries:["MH"]},{name:"Pacific/Kwajalein",utcOffset:720,offsetStr:"+12:00",countries:["MH"]},{name:"Asia/Rangoon",utcOffset:390,offsetStr:"+06:30",countries:["MM"]},{name:"Asia/Ulaanbaatar",utcOffset:480,offsetStr:"+08:00",countries:["MN"]},{name:"Asia/Hovd",utcOffset:420,offsetStr:"+07:00",countries:["MN"]},{name:"Asia/Choibalsan",utcOffset:480,offsetStr:"+08:00",countries:["MN"]},{name:"Asia/Macau",utcOffset:480,offsetStr:"+08:00",countries:["MO"]},{name:"America/Martinique",utcOffset:-240,offsetStr:"-04:00",countries:["MQ"]},{name:"Europe/Malta",utcOffset:60,offsetStr:"+01:00",countries:["MT"]},{name:"Indian/Mauritius",utcOffset:240,offsetStr:"+04:00",countries:["MU"]},{name:"Indian/Maldives",utcOffset:300,offsetStr:"+05:00",countries:["MV"]},{name:"America/Mexico_City",utcOffset:-360,offsetStr:"-06:00",countries:["MX"]},{name:"America/Cancun",utcOffset:-300,offsetStr:"-05:00",countries:["MX"]},{name:"America/Merida",utcOffset:-360,offsetStr:"-06:00",countries:["MX"]},{name:"America/Monterrey",utcOffset:-360,offsetStr:"-06:00",countries:["MX"]},{name:"America/Matamoros",utcOffset:-360,offsetStr:"-06:00",countries:["MX"]},{name:"America/Mazatlan",utcOffset:-420,offsetStr:"-07:00",countries:["MX"]},{name:"America/Chihuahua",utcOffset:-420,offsetStr:"-07:00",countries:["MX"]},{name:"America/Ojinaga",utcOffset:-420,offsetStr:"-07:00",countries:["MX"]},{name:"America/Hermosillo",utcOffset:-420,offsetStr:"-07:00",countries:["MX"]},{name:"America/Tijuana",utcOffset:-480,offsetStr:"-08:00",countries:["MX"]},{name:"America/Santa_Isabel",utcOffset:-480,offsetStr:"-08:00",countries:["MX"]},{name:"America/Bahia_Banderas",utcOffset:-360,offsetStr:"-06:00",countries:["MX"]},{name:"Asia/Kuala_Lumpur",utcOffset:480,offsetStr:"+08:00",countries:["MY"]},{name:"Asia/Kuching",utcOffset:480,offsetStr:"+08:00",countries:["MY"]},{name:"Africa/Maputo",utcOffset:120,offsetStr:"+02:00",countries:["MZ","BI","BW","CD","MW","RW","ZM","ZW"]},{name:"Africa/Windhoek",utcOffset:120,offsetStr:"+02:00",countries:["NA"]},{name:"Pacific/Noumea",utcOffset:660,offsetStr:"+11:00",countries:["NC"]},{name:"Pacific/Norfolk",utcOffset:660,offsetStr:"+11:00",countries:["NF"]},{name:"Africa/Lagos",utcOffset:60,offsetStr:"+01:00",countries:["NG","AO","BJ","CD","CF","CG","CM","GA","GQ","NE"]},{name:"America/Managua",utcOffset:-360,offsetStr:"-06:00",countries:["NI"]},{name:"Europe/Amsterdam",utcOffset:60,offsetStr:"+01:00",countries:["NL"]},{name:"Europe/Oslo",utcOffset:60,offsetStr:"+01:00",countries:["NO","SJ"]},{name:"Asia/Kathmandu",utcOffset:345,offsetStr:"+05:45",countries:["NP"]},{name:"Pacific/Nauru",utcOffset:720,offsetStr:"+12:00",countries:["NR"]},{name:"Pacific/Niue",utcOffset:-660,offsetStr:"-11:00",countries:["NU"]},{name:"Pacific/Auckland",utcOffset:780,offsetStr:"+13:00",countries:["NZ","AQ"]},{name:"Pacific/Chatham",utcOffset:825,offsetStr:"+13:45",countries:["NZ"]},{name:"America/Panama",utcOffset:-300,offsetStr:"-05:00",countries:["PA"]},{name:"America/Lima",utcOffset:-300,offsetStr:"-05:00",countries:["PE"]},{name:"Pacific/Tahiti",utcOffset:-600,offsetStr:"-10:00",countries:["PF"]},{name:"Pacific/Marquesas",utcOffset:-570,offsetStr:"-09:30",countries:["PF"]},{name:"Pacific/Gambier",utcOffset:-540,offsetStr:"-09:00",countries:["PF"]},{name:"Pacific/Port_Moresby",utcOffset:600,offsetStr:"+10:00",countries:["PG"]},{name:"Pacific/Bougainville",utcOffset:660,offsetStr:"+11:00",countries:["PG"]},{name:"Asia/Manila",utcOffset:480,offsetStr:"+08:00",countries:["PH"]},{name:"Asia/Karachi",utcOffset:300,offsetStr:"+05:00",countries:["PK"]},{name:"Europe/Warsaw",utcOffset:60,offsetStr:"+01:00",countries:["PL"]},{name:"America/Miquelon",utcOffset:-180,offsetStr:"-03:00",countries:["PM"]},{name:"Pacific/Pitcairn",utcOffset:-480,offsetStr:"-08:00",countries:["PN"]},{name:"America/Puerto_Rico",utcOffset:-240,offsetStr:"-04:00",countries:["PR"]},{name:"Asia/Gaza",utcOffset:120,offsetStr:"+02:00",countries:["PS"]},{name:"Asia/Hebron",utcOffset:120,offsetStr:"+02:00",countries:["PS"]},{name:"Europe/Lisbon",utcOffset:0,offsetStr:"+00:00",countries:["PT"]},{name:"Atlantic/Madeira",utcOffset:0,offsetStr:"+00:00",countries:["PT"]},{name:"Atlantic/Azores",utcOffset:-60,offsetStr:"-01:00",countries:["PT"]},{name:"Pacific/Palau",utcOffset:540,offsetStr:"+09:00",countries:["PW"]},{name:"America/Asuncion",utcOffset:-180,offsetStr:"-03:00",countries:["PY"]},{name:"Asia/Qatar",utcOffset:180,offsetStr:"+03:00",countries:["QA","BH"]},{name:"Indian/Reunion",utcOffset:240,offsetStr:"+04:00",countries:["RE","TF"]},{name:"Europe/Bucharest",utcOffset:120,offsetStr:"+02:00",countries:["RO"]},{name:"Europe/Belgrade",utcOffset:60,offsetStr:"+01:00",countries:["RS","BA","HR","ME","MK","SI"]},{name:"Europe/Kaliningrad",utcOffset:120,offsetStr:"+02:00",countries:["RU"]},{name:"Europe/Moscow",utcOffset:180,offsetStr:"+03:00",countries:["RU"]},{name:"Europe/Simferopol",utcOffset:180,offsetStr:"+03:00",countries:["RU"]},{name:"Europe/Volgograd",utcOffset:180,offsetStr:"+03:00",countries:["RU"]},{name:"Europe/Samara",utcOffset:240,offsetStr:"+04:00",countries:["RU"]},{name:"Asia/Yekaterinburg",utcOffset:300,offsetStr:"+05:00",countries:["RU"]},{name:"Asia/Omsk",utcOffset:360,offsetStr:"+06:00",countries:["RU"]},{name:"Asia/Novosibirsk",utcOffset:360,offsetStr:"+06:00",countries:["RU"]},{name:"Asia/Novokuznetsk",utcOffset:420,offsetStr:"+07:00",countries:["RU"]},{name:"Asia/Krasnoyarsk",utcOffset:420,offsetStr:"+07:00",countries:["RU"]},{name:"Asia/Irkutsk",utcOffset:480,offsetStr:"+08:00",countries:["RU"]},{name:"Asia/Chita",utcOffset:480,offsetStr:"+08:00",countries:["RU"]},{name:"Asia/Yakutsk",utcOffset:540,offsetStr:"+09:00",countries:["RU"]},{name:"Asia/Khandyga",utcOffset:540,offsetStr:"+09:00",countries:["RU"]},{name:"Asia/Vladivostok",utcOffset:600,offsetStr:"+10:00",countries:["RU"]},{name:"Asia/Sakhalin",utcOffset:600,offsetStr:"+10:00",countries:["RU"]},{name:"Asia/Ust-Nera",utcOffset:600,offsetStr:"+10:00",countries:["RU"]},{name:"Asia/Magadan",utcOffset:600,offsetStr:"+10:00",countries:["RU"]},{name:"Asia/Srednekolymsk",utcOffset:660,offsetStr:"+11:00",countries:["RU"]},{name:"Asia/Kamchatka",utcOffset:720,offsetStr:"+12:00",countries:["RU"]},{name:"Asia/Anadyr",utcOffset:720,offsetStr:"+12:00",countries:["RU"]},{name:"Asia/Riyadh",utcOffset:180,offsetStr:"+03:00",countries:["SA","KW","YE"]},{name:"Pacific/Guadalcanal",utcOffset:660,offsetStr:"+11:00",countries:["SB"]},{name:"Indian/Mahe",utcOffset:240,offsetStr:"+04:00",countries:["SC"]},{name:"Africa/Khartoum",utcOffset:180,offsetStr:"+03:00",countries:["SD","SS"]},{name:"Europe/Stockholm",utcOffset:60,offsetStr:"+01:00",countries:["SE"]},{name:"Asia/Singapore",utcOffset:480,offsetStr:"+08:00",countries:["SG"]},{name:"America/Paramaribo",utcOffset:-180,offsetStr:"-03:00",countries:["SR"]},{name:"America/El_Salvador",utcOffset:-360,offsetStr:"-06:00",countries:["SV"]},{name:"Asia/Damascus",utcOffset:120,offsetStr:"+02:00",countries:["SY"]},{name:"America/Grand_Turk",utcOffset:-240,offsetStr:"-04:00",countries:["TC"]},{name:"Africa/Ndjamena",utcOffset:60,offsetStr:"+01:00",countries:["TD"]},{name:"Indian/Kerguelen",utcOffset:300,offsetStr:"+05:00",countries:["TF"]},{name:"Asia/Bangkok",utcOffset:420,offsetStr:"+07:00",countries:["TH","KH","LA","VN"]},{name:"Asia/Dushanbe",utcOffset:300,offsetStr:"+05:00",countries:["TJ"]},{name:"Pacific/Fakaofo",utcOffset:780,offsetStr:"+13:00",countries:["TK"]},{name:"Asia/Dili",utcOffset:540,offsetStr:"+09:00",countries:["TL"]},{name:"Asia/Ashgabat",utcOffset:300,offsetStr:"+05:00",countries:["TM"]},{name:"Africa/Tunis",utcOffset:60,offsetStr:"+01:00",countries:["TN"]},{name:"Pacific/Tongatapu",utcOffset:780,offsetStr:"+13:00",countries:["TO"]},{name:"Europe/Istanbul",utcOffset:120,offsetStr:"+02:00",countries:["TR"]},{name:"America/Port_of_Spain",utcOffset:-240,offsetStr:"-04:00",countries:["TT","AG","AI","BL","DM","GD","GP","KN","LC","MF","MS","VC","VG","VI"]},{name:"Pacific/Funafuti",utcOffset:720,offsetStr:"+12:00",countries:["TV"]},{name:"Asia/Taipei",utcOffset:480,offsetStr:"+08:00",countries:["TW"]},{name:"Europe/Kiev",utcOffset:120,offsetStr:"+02:00",countries:["UA"]},{name:"Europe/Uzhgorod",utcOffset:120,offsetStr:"+02:00",countries:["UA"]},{name:"Europe/Zaporozhye",utcOffset:120,offsetStr:"+02:00",countries:["UA"]},{name:"Pacific/Wake",utcOffset:720,offsetStr:"+12:00",countries:["UM"]},{name:"America/New_York",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Detroit",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Kentucky/Louisville",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Kentucky/Monticello",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Indiana/Indianapolis",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Indiana/Vincennes",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Indiana/Winamac",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Indiana/Marengo",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Indiana/Petersburg",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Indiana/Vevay",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Chicago",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/Indiana/Tell_City",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/Indiana/Knox",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/Menominee",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/North_Dakota/Center",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/North_Dakota/New_Salem",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/North_Dakota/Beulah",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/Denver",utcOffset:-420,offsetStr:"-07:00",countries:["US"]},{name:"America/Boise",utcOffset:-420,offsetStr:"-07:00",countries:["US"]},{name:"America/Phoenix",utcOffset:-420,offsetStr:"-07:00",countries:["US"]},{name:"America/Los_Angeles",utcOffset:-480,offsetStr:"-08:00",countries:["US"]},{name:"America/Metlakatla",utcOffset:-480,offsetStr:"-08:00",countries:["US"]},{name:"America/Anchorage",utcOffset:-540,offsetStr:"-09:00",countries:["US"]},{name:"America/Juneau",utcOffset:-540,offsetStr:"-09:00",countries:["US"]},{name:"America/Sitka",utcOffset:-540,offsetStr:"-09:00",countries:["US"]},{name:"America/Yakutat",utcOffset:-540,offsetStr:"-09:00",countries:["US"]},{name:"America/Nome",utcOffset:-540,offsetStr:"-09:00",countries:["US"]},{name:"America/Adak",utcOffset:-600,offsetStr:"-10:00",countries:["US"]},{name:"Pacific/Honolulu",utcOffset:-600,offsetStr:"-10:00",countries:["US","UM"]},{name:"America/Montevideo",utcOffset:-180,offsetStr:"-03:00",countries:["UY"]},{name:"Asia/Samarkand",utcOffset:300,offsetStr:"+05:00",countries:["UZ"]},{name:"Asia/Tashkent",utcOffset:300,offsetStr:"+05:00",countries:["UZ"]},{name:"America/Caracas",utcOffset:-270,offsetStr:"-04:30",countries:["VE"]},{name:"Asia/Ho_Chi_Minh",utcOffset:420,offsetStr:"+07:00",countries:["VN"]},{name:"Pacific/Efate",utcOffset:660,offsetStr:"+11:00",countries:["VU"]},{name:"Pacific/Wallis",utcOffset:720,offsetStr:"+12:00",countries:["WF"]},{name:"Pacific/Apia",utcOffset:840,offsetStr:"+14:00",countries:["WS"]},{name:"Africa/Johannesburg",utcOffset:120,offsetStr:"+02:00",countries:["ZA","LS","SZ"]}]}],templateUrl:"app/core/directives/ms-timezone/ms-timezone.html"}})}(),function(){"use strict";angular.module("app.core").controller("MsWidgetEngineCounterController",function(){var a=this;a.filter=[],a.filtered=!1,a.fontSize=20,a.getCount=function(e){var t=0;if(e){a.fontSize=e.attrs[2]&&e.attrs[2].value?parseInt(e.attrs[2].value)-parseInt(e.attrs[2].value)%2:20,e.attrs[1].value&&e.attrs[1].value.length?(a.filtered=!0,a.filter=_.intersection(e.voiceQueuesSelected,e.attrs[1].value)):(a.filtered=!1,a.filter=e.voiceQueuesSelected);for(var n=0;n<e.voiceQueues.rows.length;n+=1)_.includes(a.filter,e.voiceQueues.rows[n].id)&&("abandoned"===e.attrs[0].value?t+=parseInt(e.voiceQueues.rows[n].total)-parseInt(e.voiceQueues.rows[n].answered)-parseInt(e.voiceQueues.rows[n].unmanaged):t+=e.voiceQueues.rows[n][e.attrs[0].value]?parseInt(e.voiceQueues.rows[n][e.attrs[0].value]):0)}return t}})}(),function(){"use strict";function e(s,e){var r=this;r.filter=[],r.filtered=!1,r.properties=[],r.multiBarChart={labels:["QUEUE_NAME"],series:["TOTAL"],data:[[50]],options:{responsive:!0,legend:{display:!0,fontColor:"#2196f3"},scales:{xAxes:[{gridLines:{display:!0},ticks:{fontColor:"#2196f3",stepSize:1,beginAtZero:!0}}],yAxes:[{gridLines:{display:!1},ticks:{fontColor:"#2196f3"}}]}}},r.getMultiBarChart=function(e){e&&(e.attrs&&function(e){r.properties=_.map(_.filter(e.attrs,function(e){return e.name&&0<=e.name.indexOf("attrSerie")&&e.value&&"null"!==e.value}),"value"),e.attrs[3].value&&e.attrs[3].value.length?(r.filtered=!0,r.filter=_.intersection(e.voiceQueuesSelected,e.attrs[3].value)):(r.filtered=!1,r.filter=e.voiceQueuesSelected);if(r.multiBarChart.series.length>r.properties.length){var t=r.multiBarChart.series.length-r.properties.length;r.multiBarChart.series.splice(0,t),r.multiBarChart.data.splice(0,t)}for(var n=0;n<r.properties.length;n+=1){if(r.multiBarChart.series[n]=s.instant("TOOLS."+r.properties[n].toUpperCase()),_.isNil(r.multiBarChart.data[n])&&(r.multiBarChart.data[n]=[]),r.multiBarChart.labels.length>r.filter.length){var a=r.multiBarChart.labels.length-r.filter.length;r.multiBarChart.labels.splice(0,a),r.multiBarChart.data[n].splice(0,a)}for(var i=0,o=0;i<e.voiceQueues.rows.length;i+=1)_.includes(r.filter,e.voiceQueues.rows[i].id)&&(r.multiBarChart.labels[o]=e.voiceQueues.rows[i].name,"abandoned"===r.properties[n].toLowerCase()?r.multiBarChart.data[n][o]=parseInt(e.voiceQueues.rows[i].total)-parseInt(e.voiceQueues.rows[i].answered)-parseInt(e.voiceQueues.rows[i].unmanaged):r.multiBarChart.data[n][o]=e.voiceQueues.rows[i][r.properties[n]]?parseInt(e.voiceQueues.rows[i][r.properties[n]]):0,o+=1)}}(e),e.foreground&&function(e){r.multiBarChart.options.legend.fontColor=e.foreground;for(var t=0;t<r.multiBarChart.options.scales.xAxes.length;t+=1)r.multiBarChart.options.scales.xAxes[t].ticks.fontColor=e.foreground;for(var n=0;n<r.multiBarChart.options.scales.yAxes.length;n+=1)r.multiBarChart.options.scales.yAxes[n].ticks.fontColor=e.foreground}(e))}}e.$inject=["$translate","socket"],angular.module("app.core").controller("MsWidgetEngineMultibarChartController",e)}(),function(){"use strict";function e(o){var s=this;s.filter=[],s.filtered=!1,s.properties=[],s.pieChart={labels:["ANSWERED"],data:[30],options:{responsive:!0,legend:{display:!0}}},s.getPieChart=function(e){e&&(e.attrs&&function(e){s.properties=_.map(_.filter(e.attrs,function(e){return e.name&&0<=e.name.indexOf("attrSerie")&&e.value&&"null"!==e.value}),"value"),e.attrs[3].value&&e.attrs[3].value.length?(s.filtered=!0,s.filter=_.intersection(e.voiceQueuesSelected,e.attrs[3].value)):(s.filtered=!1,s.filter=e.voiceQueuesSelected);if(s.pieChart.labels.length>s.properties.length){var t=s.pieChart.labels.length-s.properties.length;s.pieChart.labels.splice(0,t),s.pieChart.data.splice(0,t)}for(var n=0,a=0;n<s.properties.length;n+=1){s.pieChart.labels[n]=o.instant("TOOLS."+s.properties[n].toUpperCase());for(var i=0;i<e.voiceQueues.rows.length;i+=1)_.includes(s.filter,e.voiceQueues.rows[i].id)&&("abandoned"===s.properties[n].toLowerCase()?a+=parseInt(e.voiceQueues.rows[i].total)-parseInt(e.voiceQueues.rows[i].answered)-parseInt(e.voiceQueues.rows[i].unmanaged):a+=e.voiceQueues.rows[i][s.properties[n]]?parseInt(e.voiceQueues.rows[i][s.properties[n]]):0);s.pieChart.data[n]=a,a=0}}(e),e.foreground&&(t=e,s.pieChart.options.legend.fontColor=t.foreground));var t}}e.$inject=["$translate"],angular.module("app.core").controller("MsWidgetEnginePieChartController",e)}(),function(){"use strict";function e(e,n,a,i){var o=this;function t(e){o.results=e||{count:0,rows:[]}}function s(){o.query.offset=(o.query.page-1)*o.query.limit,o.promise=i.analyticCustomReport.run(o.query,t).$promise}o.countDown=0,o.refresh=0,o.title="",o.columns=[],o.results={rows:[],count:0},o.query={limit:10,page:1,startDate:moment().startOf("day").format("YYYY-MM-DD HH:mm:ss"),endDate:moment().endOf("day").format("YYYY-MM-DD HH:mm:ss"),output:"web"},o.onInit=function e(t){t&&t.attrs&&(t.attrs[0]&&t.attrs[0].value&&(o.query.id=t.attrs[0].value,i.analyticFieldReport.get({fields:"field,alias",nolimit:!0,CustomReportId:t.attrs[0].value}).$promise.then(function(e){return e&&e.rows&&(o.columns=e.rows),i.analyticCustomReport.get({id:t.attrs[0].value,fields:"id,name"}).$promise}).then(function(e){e&&e.name&&(o.title=e.name),s()}).catch(function(e){console.log(e)})),t.attrs[1]&&t.attrs[1].value&&(o.refresh=parseInt(t.attrs[1].value),!_.isNaN(o.refresh)&&0<o.refresh?(o.countDown=parseInt(t.attrs[1].value),o.interval=a(function(){o.countDown-=1},1e3,0),o.timeout=n(function(){o.interval&&a.cancel(o.interval),e(t)},1e3*o.refresh)):(o.interval&&a.cancel(o.interval),o.timeout&&n.cancel(o.timeout))))},o.getResults=s,o.valueReplacer=function(e,t){moment(t,"YYYY-MM-DDTHH:mm:ssZ",!0).isValid()&&(t=moment(t,"").format("YYYY-MM-DD HH:mm:ss"));return t},e.$on("$destroy",function(){o.interval&&a.cancel(o.interval),o.timeout&&n.cancel(o.timeout)})}e.$inject=["$scope","$timeout","$interval","api"],angular.module("app.core").controller("MsWidgetEngineWebReportController",e)}(),function(){"use strict";function e(e,t){this.getTrustedURL=function(e){return t.trustAsResourceUrl(e)}}function t(e){return{restrict:"E",scope:{config:"=?",onEdit:"&?",onDelete:"&?"},require:"msWidgetEngine",controller:"MsWidgetEngineController",controllerAs:"vm",bindToController:!0,templateUrl:"app/core/directives/ms-widget-engine/ms-widget-engine.html"}}e.$inject=["$mdDialog","$sce"],t.$inject=["$document"],angular.module("app.core").controller("MsWidgetEngineController",e).directive("msWidgetEngine",t)}(),function(){"use strict";function e(e,t){var n=this;n.flipped=!1,n.flip=function(){if(!angular.isDefined(e.flippable)||!0!==e.flippable)return;n.flipped=!n.flipped,t.toggleClass("flipped",n.flipped)}}e.$inject=["$scope","$element"],angular.module("app.core").controller("MsWidgetController",e).directive("msWidget",function(){return{restrict:"E",scope:{flippable:"=?"},controller:"MsWidgetController",transclude:!0,compile:function(e){return e.addClass("ms-widget"),function(e,t,n,a,i){i(function(e){t.empty(),t.append(e)})}}}}).directive("msWidgetFront",function(){return{restrict:"E",require:"^msWidget",transclude:!0,compile:function(e){return e.addClass("ms-widget-front"),function(e,t,n,a,i){i(function(e){t.empty(),t.append(e)}),e.flipWidget=a.flip}}}}).directive("msWidgetBack",function(){return{restrict:"E",require:"^msWidget",transclude:!0,compile:function(e){return e.addClass("ms-widget-back"),function(e,t,n,a,i){i(function(e){t.empty(),t.append(e)}),e.flipWidget=a.flip}}}})}(),function(){"use strict";angular.module("app.core").filter("altDate",function(){return function(e){var t=Date.now()-new Date(e);return t<36e5?moment(e).fromNow():t<864e5?moment(e).format("HH:mm"):t<6048e5?moment(e).format("dddd"):moment(e).calendar()}})}(),function(){"use strict";function e(t){return function(e){return t.trustAsHtml(e)}}e.$inject=["$sce"],angular.module("app.core").filter("toTrusted",e).filter("htmlToPlaintext",function(){return function(e){return String(e).replace(/<[^>]+>/gm,"")}}).filter("nospace",function(){return function(e){return e?e.replace(/ /g,""):""}}).filter("humanizeDoc",function(){return function(e){if(e)return"directive"===e.type?e.name.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()}):e.label||e.name}})}(),function(){"use strict";angular.module("app.core").filter("filterByIds",function(){return function(e,t){if(0===e.length||!t)return e;if(0===t.length)return[];for(var n=[],a=0;a<e.length;a++){for(var i=e[a],o=!1,s=0;s<t.length;s++){var r=t[s];if(i.id===r){o=!0;break}}o&&n.push(i)}return n}})}(),function(){"use strict";angular.module("app.core").filter("filterByPropIds",function(){return function(e,t,n){if(0===e.length||!n||0===n.length)return e;for(var a=[],i=0;i<e.length;i++){for(var o=e[i],s=!1,r=0;r<n.length;r++){var l=n[r];if(-1<o[t].indexOf(l)){s=!0;break}}s&&a.push(o)}return a}})}(),function(){"use strict";angular.module("app.core").filter("filterByTags",function(){return function(e,n){if(0===e.length||0===n.length)return e;var a=[];return e.forEach(function(e){var t=n.every(function(t){var n=!1;return e.tags.forEach(function(e){e.name!==t.name||(n=!0)}),n});t&&a.push(e)}),a}}).filter("filterSingleByTags",function(){return function(e,t){if(0!==e.length&&0!==t.length){if(e.length<t.length)return[];var n=[],a=t.every(function(t){var n=!1;return e.forEach(function(e){e.name!==t.name||(n=!0)}),n});return a&&n.push(e),n}}})}(),function(){"use strict";function c(e,t,n,a){this.id=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),this.title=e,this.body=t,this.accept=n,this.reject=a,this.close=i}function m(){return/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}function i(){var n=this;navigator.serviceWorker.ready.then(function(e){e.getNotifications().then(function(e){var t=_.find(e,function(e){return e.data.id===n.id});t&&t.close()})})}angular.module("app.dashboards").provider("motNotification",function(){return{$get:[function(){var l,n,d=[];"serviceWorker"in navigator&&m()?navigator.serviceWorker.register("notification.js").then(function(e){(l=e).update(),l.installing?n=l.installing:l.waiting?n=l.waiting:l.active&&(n=l.active)}).catch(function(e){console.error("Service worker registration failed",e)}):console.error("Service Worker is not supported");return navigator.serviceWorker.addEventListener("message",function(e){if(e.source===n){var t=_.find(d,{id:e.data.id});if(t)switch(e.data.action){case"accept":t.accept&&t.accept();break;case"reject":t.reject&&t.reject()}}}),{create:function(e,i,o,s,r){return new Promise(function(t,n){var a;m()&&(window.document.hidden||window.document.mozHidden||window.document.webkitHidden)?(a=new c(e||"MyTitle",i||"MyBody",s,r),d.push(a),a?window.Notification.requestPermission().then(function(e){if("granted"===e)return l.showNotification(a.title,{body:a.body,requireInteraction:!0,icon:o||"assets/images/business/queueCampaigns.jpg",data:{id:a.id},actions:[{action:"accept",title:"Accept"},{action:"reject",title:"Reject"}]})}).then(function(e){t(a)}).catch(function(e){n(e)}):n(new Error("Notification creating error"))):t()})}}}]}})}(),function(){"use strict";function e(l,d,c){return{resolve:function(e,t){var n=e.split("@"),a=n[0],i=n[1],o=t||{};if(!a||!i)return d.error("apiResolver.resolve requires correct action parameter (ResourceName@methodName)"),!1;var s=l.defer(),r=function(e){for(var t=e.split("."),n=c,a=0;a<t.length;a++){if(angular.isUndefined(n[t[a]])){d.error('Resource part "'+t[a]+'" is not defined!'),n=!1;break}n=n[t[a]]}if(!n)return!1;return n}(a);r?r[i](o,function(e){s.resolve(e)},function(e){s.reject(e)}):(d.error('Resource "'+a+'" is not defined in the api service!'),s.reject('Resource "'+a+'" is not defined in the api service!'));return s.promise}}}e.$inject=["$q","$log","api"],angular.module("app.core").factory("apiResolver",e)}(),function(){"use strict";angular.module("app.core").provider("msApi",function(){var n=angular.injector(["ng"]).get("$log"),a="",v=[];function t(e){a=e}function i(){return a}function o(e,t){angular.isString(e)?angular.isArray(t)?v[e]={url:a+(t[0]||""),paramDefaults:t[1]||[],actions:t[2]||[],options:t[3]||{}}:n.error('"resource" must be an array and it must follow $resource definition'):n.error('"path" must be a string (eg. `dashboard.project`)')}this.setBaseUrl=t,this.getBaseUrl=i,this.getApiObject=function(){return v},this.register=o,this.$get=["$log","$q","$resource","$rootScope",function(m,u,p,g){var e={setBaseUrl:t,getBaseUrl:i,register:o,resolve:function(e,t){g.$broadcast("msApi::resolveStart");var n=e.split("@"),a=n[0],i=n[1],o=t||{};if(!a||!i)return m.error("msApi.resolve requires correct action parameter (resourceName@methodName)"),!1;var s=u.defer(),r=v[a];if(r){var l=p(r.url,r.paramDefaults,r.actions,r.options);l[i](o,function(e){s.resolve(e),g.$broadcast("msApi::resolveSuccess")},function(e){s.reject(e),g.$broadcast("msApi::resolveError")})}else m.error('Resource "'+a+'" is not defined in the api service!'),s.reject('Resource "'+a+'" is not defined in the api service!');return s.promise},request:function(e,t,n,a){g.$broadcast("msApi::requestStart");var i=e.split("@"),o=i[0],s=i[1],r=t||{};if(!o||!s)return m.error("msApi.resolve requires correct action parameter (resourceName@methodName)"),!1;var l=u.defer(),d=v[o];if(d){var c=p(d.url,d.paramDefaults,d.actions,d.options);c[s](r,function(e){g.$broadcast("msApi::requestSuccess"),l.resolve(e),angular.isDefined(n)&&angular.isFunction(n)&&n(e)},function(e){g.$broadcast("msApi::requestError"),l.reject(e),angular.isDefined(a)&&angular.isFunction(a)&&a(e)})}else m.error('Resource "'+o+'" is not defined in the api service!'),l.reject('Resource "'+o+'" is not defined in the api service!');return l.promise}};return e}]})}(),function(){"use strict";function e(l){var e=new MobileDetect(l.navigator.userAgent),d=null;return{exists:function(e,t){return-1<t.indexOf(e)},detectBrowser:function(){if(d)return d;var e=[{string:l.navigator.userAgent,subString:"Edge",versionSearch:"Edge",identity:"Edge"},{string:l.navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:l.navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:l.navigator.vendor,subString:"Apple",versionSearch:"Version",identity:"Safari"},{prop:l.opera,identity:"Opera"},{string:l.navigator.vendor,subString:"iCab",identity:"iCab"},{string:l.navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:l.navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:l.navigator.vendor,subString:"Camino",identity:"Camino"},{string:l.navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:l.navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:l.navigator.userAgent,subString:"Trident/7",identity:"Explorer",versionSearch:"rv"},{string:l.navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:l.navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],t=[{string:l.navigator.platform,subString:"Win",identity:"Windows"},{string:l.navigator.platform,subString:"Mac",identity:"Mac"},{string:l.navigator.platform,subString:"Linux",identity:"Linux"},{string:l.navigator.platform,subString:"iPhone",identity:"iPhone"},{string:l.navigator.platform,subString:"iPod",identity:"iPod"},{string:l.navigator.platform,subString:"iPad",identity:"iPad"},{string:l.navigator.platform,subString:"Android",identity:"Android"}],i="";function n(e){for(var t=0;t<e.length;t++){var n=e[t].string,a=e[t].prop;if(i=e[t].versionSearch||e[t].identity,n){if(-1!==n.indexOf(e[t].subString))return e[t].identity}else if(a)return e[t].identity}}function a(e){var t=e.indexOf(i);if(-1!==t)return parseInt(e.substring(t+i.length+1))}var o=n(e)||"unknown-browser",s=a(l.navigator.userAgent)||a(l.navigator.appVersion)||"unknown-version",r=n(t)||"unknown-os";return o=o.toLowerCase(),s=o+"-"+s,r=r.toLowerCase(),d={browser:o,version:s,os:r}},guidGenerator:function(){var e=function(){return(65536*(1+Math.random())||0).toString(16).substring(1)};return e()+e()+e()+e()+e()+e()},isMobile:function(){return e.mobile()},toggleInArray:function(e,t){-1===t.indexOf(e)?t.push(e):t.splice(t.indexOf(e),1)}}}e.$inject=["$window"],angular.module("app.core").factory("msUtils",e)}(),function(){"use strict";function e(e,t){var n=this;n.themes=t.themes,n.layoutModes=[{label:"Boxed",value:"boxed"},{label:"Wide",value:"wide"}],n.layoutStyles=[{label:"Vertical Navigation",value:"verticalNavigation",figure:"/assets/images/theme-options/vertical-nav.jpg"},{label:"Vertical Navigation with Fullwidth Toolbar",value:"verticalNavigationFullwidthToolbar",figure:"/assets/images/theme-options/vertical-nav-with-full-toolbar.jpg"},{label:"Vertical Navigation with Fullwidth Toolbar 2",value:"verticalNavigationFullwidthToolbar2",figure:"/assets/images/theme-options/vertical-nav-with-full-toolbar-2.jpg"},{label:"Horizontal Navigation",value:"horizontalNavigation",figure:"/assets/images/theme-options/horizontal-nav.jpg"},{label:"Content with Toolbar",value:"contentWithToolbar",figure:"/assets/images/theme-options/content-with-toolbar.jpg"},{label:"Content Only",value:"contentOnly",figure:"/assets/images/theme-options/content-only.jpg"}],n.layoutMode="wide",n.layoutStyle=e.get("motion.layoutStyle")||"verticalNavigation",n.setActiveTheme=function(e){t.setActiveTheme(e)},n.getActiveTheme=function(){return t.themes.active},n.updateLayoutMode=function(){angular.element("body").toggleClass("boxed","boxed"===n.layoutMode)},n.updateLayoutStyle=function(){e.put("motion.layoutStyle",n.layoutStyle),location.reload()}}function t(t){return{restrict:"E",scope:{},controller:"MsThemeOptionsController as vm",templateUrl:"app/core/theme-options/theme-options.html",compile:function(e){return e.addClass("ms-theme-options"),function(e){e.toggleOptionsSidenav=function(){t("motion-theme-options").toggle()}}}}}e.$inject=["$cookies","motionTheming"],t.$inject=["$mdSidenav"],angular.module("app.core").controller("MsThemeOptionsController",e).directive("msThemeOptions",t)}(),function(){"use strict";function e(i,a,o){var s={};return{generate:function(){var e=angular.copy(o.getRegisteredThemes()),a=angular.copy(o.getRegisteredPalettes());angular.forEach(e,function(n){s[n.name]={},angular.forEach(n.colors,function(e,t){s[n.name][t]={name:e.name,levels:{default:{color:l(a[e.name][e.hues.default].value),contrast1:l(a[e.name][e.hues.default].contrast,1),contrast2:l(a[e.name][e.hues.default].contrast,2),contrast3:l(a[e.name][e.hues.default].contrast,3),contrast4:l(a[e.name][e.hues.default].contrast,4)},hue1:{color:l(a[e.name][e.hues["hue-1"]].value),contrast1:l(a[e.name][e.hues["hue-1"]].contrast,1),contrast2:l(a[e.name][e.hues["hue-1"]].contrast,2),contrast3:l(a[e.name][e.hues["hue-1"]].contrast,3),contrast4:l(a[e.name][e.hues["hue-1"]].contrast,4)},hue2:{color:l(a[e.name][e.hues["hue-2"]].value),contrast1:l(a[e.name][e.hues["hue-2"]].contrast,1),contrast2:l(a[e.name][e.hues["hue-2"]].contrast,2),contrast3:l(a[e.name][e.hues["hue-2"]].contrast,3),contrast4:l(a[e.name][e.hues["hue-2"]].contrast,4)},hue3:{color:l(a[e.name][e.hues["hue-3"]].value),contrast1:l(a[e.name][e.hues["hue-3"]].contrast,1),contrast2:l(a[e.name][e.hues["hue-3"]].contrast,2),contrast3:l(a[e.name][e.hues["hue-3"]].contrast,3),contrast4:l(a[e.name][e.hues["hue-3"]].contrast,4)}}}})}),function(e){var t=angular.copy(e);angular.forEach(t,function(n){angular.forEach(n,function(e,t){n[t]=e.levels,n[t].color=e.levels.default.color,n[t].contrast1=e.levels.default.contrast1,n[t].contrast2=e.levels.default.contrast2,n[t].contrast3=e.levels.default.contrast3,n[t].contrast4=e.levels.default.contrast4,delete n[t].default})}),o.setThemesList(t);var n=i.get("motion.selectedTheme");n?o.setActiveTheme(n):o.setActiveTheme("default")}(s);var r={};angular.forEach(s,function(e,t){var n,a,i,o,s;(r={})["@themeName"]=t,angular.forEach(e,function(e,a){angular.forEach(e.levels,function(e,n){angular.forEach(e,function(e,t){r["@"+a+d(n)+d(t)]=e})})}),n=r,a=new RegExp(Object.keys(n).join("|"),"gi"),i='/* Content hack because they wont fix */\n/* https://github.com/angular/material/pull/8067 */\n[md-theme="@themeName"] md-content.md-hue-1,\nmd-content.md-@themeName-theme.md-hue-1 {\n    color: @backgroundHue1Contrast1;\n    background-color: @backgroundHue1Color;\n}\n\n[md-theme="@themeName"] md-content.md-hue-2,\nmd-content.md-@themeName-theme.md-hue-2 {\n    color: @backgroundHue2Contrast1;\n    background-color: @backgroundHue2Color;\n}\n\n[md-theme="@themeName"] md-content.md-hue-3,\n md-content.md-@themeName-theme.md-hue-3 {\n    color: @backgroundHue3Contrast1;\n    background-color: @backgroundHue3Color;\n}\n\n/* Text Colors */\n[md-theme="@themeName"] a {\n    color: @accentDefaultColor;\n}\n\n[md-theme="@themeName"] .secondary-text,\n[md-theme="@themeName"] .icon {\n    color: @backgroundDefaultContrast2;\n}\n\n[md-theme="@themeName"] .hint-text,\n[md-theme="@themeName"] .disabled-text {\n    color: @backgroundDefaultContrast3;\n}\n\n[md-theme="@themeName"] .fade-text,\n[md-theme="@themeName"] .divider {\n    color: @backgroundDefaultContrast4;\n}\n\n/* Primary */\n[md-theme="@themeName"] .md-primary-bg {\n    background-color: @primaryDefaultColor;\n    color: @primaryDefaultContrast1;\n}\n\n[md-theme="@themeName"] .md-primary-bg .secondary-text,\n[md-theme="@themeName"] .md-primary-bg .icon {\n    color: @primaryDefaultContrast2;\n}\n\n[md-theme="@themeName"] .md-primary-bg .hint-text,\n[md-theme="@themeName"] .md-primary-bg .disabled-text {\n    color: @primaryDefaultContrast3;\n}\n\n[md-theme="@themeName"] .md-primary-bg .fade-text,\n[md-theme="@themeName"] .md-primary-bg .divider {\n    color: @primaryDefaultContrast4;\n}\n\n/* Primary, Hue-1 */\n[md-theme="@themeName"] .md-primary-bg.md-hue-1 {\n    background-color: @primaryHue1Color;\n    color: @primaryHue1Contrast1;\n}\n\n[md-theme="@themeName"] .md-primary-bg.md-hue-1 .secondary-text,\n[md-theme="@themeName"] .md-primary-bg.md-hue-1 .icon {\n    color: @primaryHue1Contrast2;\n}\n\n[md-theme="@themeName"] .md-primary-bg.md-hue-1 .hint-text,\n[md-theme="@themeName"] .md-primary-bg.md-hue-1 .disabled-text {\n    color: @primaryHue1Contrast3;\n}\n\n[md-theme="@themeName"] .md-primary-bg.md-hue-1 .fade-text,\n[md-theme="@themeName"] .md-primary-bg.md-hue-1 .divider {\n    color: @primaryHue1Contrast4;\n}\n\n/* Primary, Hue-2 */\n[md-theme="@themeName"] .md-primary-bg.md-hue-2 {\n    background-color: @primaryHue2Color;\n    color: @primaryHue2Contrast1;\n}\n\n[md-theme="@themeName"] .md-primary-bg.md-hue-2 .secondary-text,\n[md-theme="@themeName"] .md-primary-bg.md-hue-2 .icon {\n    color: @primaryHue2Contrast2;\n}\n\n[md-theme="@themeName"] .md-primary-bg.md-hue-2 .hint-text,\n[md-theme="@themeName"] .md-primary-bg.md-hue-2 .disabled-text {\n    color: @primaryHue2Contrast3;\n}\n\n[md-theme="@themeName"] .md-primary-bg.md-hue-2 .fade-text,\n[md-theme="@themeName"] .md-primary-bg.md-hue-2 .divider {\n    color: @primaryHue2Contrast4;\n}\n\n/* Primary, Hue-3 */\n[md-theme="@themeName"] .md-primary-bg.md-hue-3 {\n    background-color: @primaryHue3Color;\n    color: @primaryHue3Contrast1;\n}\n\n[md-theme="@themeName"] .md-primary-bg.md-hue-3 .secondary-text,\n[md-theme="@themeName"] .md-primary-bg.md-hue-3 .icon {\n    color: @primaryHue3Contrast1;\n}\n\n[md-theme="@themeName"] .md-primary-bg.md-hue-3 .hint-text,\n[md-theme="@themeName"] .md-primary-bg.md-hue-3 .disabled-text {\n    color: @primaryHue3Contrast3;\n}\n\n[md-theme="@themeName"] .md-primary-bg.md-hue-3 .fade-text,\n[md-theme="@themeName"] .md-primary-bg.md-hue-3 .divider {\n    color: @primaryHue3Contrast4;\n}\n\n/* Primary foreground */\n[md-theme="@themeName"] .md-primary-fg {\n    color: @primaryDefaultColor !important;\n}\n\n/* Primary foreground, Hue-1 */\n[md-theme="@themeName"] .md-primary-fg.md-hue-1 {\n    color: @primaryHue1Color !important;\n}\n\n/* Primary foreground, Hue-2 */\n[md-theme="@themeName"] .md-primary-fg.md-hue-2 {\n    color: @primaryHue2Color !important;\n}\n\n/* Primary foreground, Hue-3 */\n[md-theme="@themeName"] .md-primary-fg.md-hue-3 {\n    color: @primaryHue3Color !important;\n}\n\n/* Accent */\n[md-theme="@themeName"] .md-accent-bg {\n    background-color: @accentDefaultColor;\n    color: @accentDefaultContrast1;\n}\n\n[md-theme="@themeName"] .md-accent-bg .secondary-text,\n[md-theme="@themeName"] .md-accent-bg .icon {\n    color: @accentDefaultContrast2;\n}\n\n[md-theme="@themeName"] .md-accent-bg .hint-text,\n[md-theme="@themeName"] .md-accent-bg .disabled-text {\n    color: @accentDefaultContrast3;\n}\n\n[md-theme="@themeName"] .md-accent-bg .fade-text,\n[md-theme="@themeName"] .md-accent-bg .divider {\n    color: @accentDefaultContrast4;\n}\n\n/* Accent, Hue-1 */\n[md-theme="@themeName"] .md-accent-bg.md-hue-1 {\n    background-color: @accentHue1Color;\n    color: @accentHue1Contrast1;\n}\n\n[md-theme="@themeName"] .md-accent-bg.md-hue-1 .secondary-text,\n[md-theme="@themeName"] .md-accent-bg.md-hue-1 .icon {\n    color: @accentHue1Contrast2;\n}\n\n[md-theme="@themeName"] .md-accent-bg.md-hue-1 .hint-text,\n[md-theme="@themeName"] .md-accent-bg.md-hue-1 .disabled-text {\n    color: @accentHue1Contrast3;\n}\n\n[md-theme="@themeName"] .md-accent-bg.md-hue-1 .fade-text,\n[md-theme="@themeName"] .md-accent-bg.md-hue-1 .divider {\n    color: @accentHue1Contrast4;\n}\n\n/* Accent, Hue-2 */\n[md-theme="@themeName"] .md-accent-bg.md-hue-2 {\n    background-color: @accentHue2Color;\n    color: @accentHue2Contrast1;\n}\n\n[md-theme="@themeName"] .md-accent-bg.md-hue-2 .secondary-text,\n[md-theme="@themeName"] .md-accent-bg.md-hue-2 .icon {\n    color: @accentHue2Contrast2;\n}\n\n[md-theme="@themeName"] .md-accent-bg.md-hue-2 .hint-text,\n[md-theme="@themeName"] .md-accent-bg.md-hue-2 .disabled-text {\n    color: @accentHue2Contrast3;\n}\n\n[md-theme="@themeName"] .md-accent-bg.md-hue-2 .fade-text,\n[md-theme="@themeName"] .md-accent-bg.md-hue-2 .divider {\n    color: @accentHue2Contrast4;\n}\n\n/* Accent, Hue-3 */\n[md-theme="@themeName"] .md-accent-bg.md-hue-3 {\n    background-color: @accentHue3Color;\n    color: @accentHue3Contrast1;\n}\n\n[md-theme="@themeName"] .md-accent-bg.md-hue-3 .secondary-text,\n[md-theme="@themeName"] .md-accent-bg.md-hue-3 .icon {\n    color: @accentHue3Contrast1;\n}\n\n[md-theme="@themeName"] .md-accent-bg.md-hue-3 .hint-text,\n[md-theme="@themeName"] .md-accent-bg.md-hue-3 .disabled-text {\n    color: @accentHue3Contrast3;\n}\n\n[md-theme="@themeName"] .md-accent-bg.md-hue-3 .fade-text,\n[md-theme="@themeName"] .md-accent-bg.md-hue-3 .divider {\n    color: @accentHue3Contrast4;\n}\n\n/* Accent foreground */\n[md-theme="@themeName"] .md-accent-fg {\n    color: @accentDefaultColor !important;\n}\n\n/* Accent foreground, Hue-1 */\n[md-theme="@themeName"] .md-accent-fg.md-hue-1 {\n    color: @accentHue1Color !important;\n}\n\n/* Accent foreground, Hue-2 */\n[md-theme="@themeName"] .md-accent-fg.md-hue-2 {\n    color: @accentHue2Color !important;\n}\n\n/* Accent foreground, Hue-3 */\n[md-theme="@themeName"] .md-accent-fg.md-hue-3 {\n    color: @accentHue3Color !important;\n}\n\n/* Warn */\n[md-theme="@themeName"] .md-warn-bg {\n    background-color: @warnDefaultColor;\n    color: @warnDefaultContrast1;\n}\n\n[md-theme="@themeName"] .md-warn-bg .secondary-text,\n[md-theme="@themeName"] .md-warn-bg .icon {\n    color: @warnDefaultContrast2;\n}\n\n[md-theme="@themeName"] .md-warn-bg .hint-text,\n[md-theme="@themeName"] .md-warn-bg .disabled-text {\n    color: @warnDefaultContrast3;\n}\n\n[md-theme="@themeName"] .md-warn-bg .fade-text,\n[md-theme="@themeName"] .md-warn-bg .divider {\n    color: @warnDefaultContrast4;\n}\n\n/* Warn, Hue-1 */\n[md-theme="@themeName"] .md-warn-bg.md-hue-1 {\n    background-color: @warnHue1Color;\n    color: @warnHue1Contrast1;\n}\n\n[md-theme="@themeName"] .md-warn-bg.md-hue-1 .secondary-text,\n[md-theme="@themeName"] .md-warn-bg.md-hue-1 .icon {\n    color: @warnHue1Contrast2;\n}\n\n[md-theme="@themeName"] .md-warn-bg.md-hue-1 .hint-text,\n[md-theme="@themeName"] .md-warn-bg.md-hue-1 .disabled-text {\n    color: @warnHue1Contrast3;\n}\n\n[md-theme="@themeName"] .md-warn-bg.md-hue-1 .fade-text,\n[md-theme="@themeName"] .md-warn-bg.md-hue-1 .divider {\n    color: @warnHue1Contrast4;\n}\n\n/* Warn, Hue-2 */\n[md-theme="@themeName"] .md-warn-bg.md-hue-2 {\n    background-color: @warnHue2Color;\n    color: @warnHue2Contrast1;\n}\n\n[md-theme="@themeName"] .md-warn-bg.md-hue-2 .secondary-text,\n[md-theme="@themeName"] .md-warn-bg.md-hue-2 .icon {\n    color: @warnHue2Contrast2;\n}\n\n[md-theme="@themeName"] .md-warn-bg.md-hue-2 .hint-text,\n[md-theme="@themeName"] .md-warn-bg.md-hue-2 .disabled-text {\n    color: @warnHue2Contrast3;\n}\n\n[md-theme="@themeName"] .md-warn-bg.md-hue-2 .fade-text,\n[md-theme="@themeName"] .md-warn-bg.md-hue-2 .divider {\n    color: @warnHue2Contrast4;\n}\n\n/* Warn, Hue-3 */\n[md-theme="@themeName"] .md-warn-bg.md-hue-3 {\n    background-color: @warnHue3Color;\n    color: @warnHue3Contrast1;\n}\n\n[md-theme="@themeName"] .md-warn-bg.md-hue-3 .secondary-text,\n[md-theme="@themeName"] .md-warn-bg.md-hue-3 .icon {\n    color: @warnHue3Contrast1;\n}\n\n[md-theme="@themeName"] .md-warn-bg.md-hue-3 .hint-text,\n[md-theme="@themeName"] .md-warn-bg.md-hue-3 .disabled-text {\n    color: @warnHue3Contrast3;\n}\n\n[md-theme="@themeName"] .md-warn-bg.md-hue-3 .fade-text,\n[md-theme="@themeName"] .md-warn-bg.md-hue-3 .divider {\n    color: @warnHue3Contrast4;\n}\n\n/* Warn foreground */\n[md-theme="@themeName"] .md-warn-fg {\n    color: @warnDefaultColor !important;\n}\n\n/* Warn foreground, Hue-1 */\n[md-theme="@themeName"] .md-warn-fg.md-hue-1 {\n    color: @warnHue1Color !important;\n}\n\n/* Warn foreground, Hue-2 */\n[md-theme="@themeName"] .md-warn-fg.md-hue-2 {\n    color: @warnHue2Color !important;\n}\n\n/* Warn foreground, Hue-3 */\n[md-theme="@themeName"] .md-warn-fg.md-hue-3 {\n    color: @warnHue3Color !important;\n}\n\n/* Background */\n[md-theme="@themeName"] .md-background-bg {\n    background-color: @backgroundDefaultColor;\n    color: @backgroundDefaultContrast1;\n}\n\n[md-theme="@themeName"] .md-background-bg .secondary-text,\n[md-theme="@themeName"] .md-background-bg .icon {\n    color: @backgroundDefaultContrast2;\n}\n\n[md-theme="@themeName"] .md-background-bg .hint-text,\n[md-theme="@themeName"] .md-background-bg .disabled-text {\n    color: @backgroundDefaultContrast3;\n}\n\n[md-theme="@themeName"] .md-background-bg .fade-text,\n[md-theme="@themeName"] .md-background-bg .divider {\n    color: @backgroundDefaultContrast4;\n}\n\n/* Background, Hue-1 */\n[md-theme="@themeName"] .md-background-bg.md-hue-1 {\n    background-color: @backgroundHue1Color;\n    color: @backgroundHue1Contrast1;\n}\n\n[md-theme="@themeName"] .md-background-bg.md-hue-1 .secondary-text,\n[md-theme="@themeName"] .md-background-bg.md-hue-1 .icon {\n    color: @backgroundHue1Contrast2;\n}\n\n[md-theme="@themeName"] .md-background-bg.md-hue-1 .hint-text,\n[md-theme="@themeName"] .md-background-bg.md-hue-1 .disabled-text {\n    color: @backgroundHue1Contrast3;\n}\n\n[md-theme="@themeName"] .md-background-bg.md-hue-1 .fade-text,\n[md-theme="@themeName"] .md-background-bg.md-hue-1 .divider {\n    color: @backgroundHue1Contrast4;\n}\n\n/* Background, Hue-2 */\n[md-theme="@themeName"] .md-background-bg.md-hue-2 {\n    background-color: @backgroundHue2Color;\n    color: @backgroundHue2Contrast1;\n}\n\n[md-theme="@themeName"] .md-background-bg.md-hue-2 .secondary-text,\n[md-theme="@themeName"] .md-background-bg.md-hue-2 .icon {\n    color: @backgroundHue2Contrast2;\n}\n\n[md-theme="@themeName"] .md-background-bg.md-hue-2 .hint-text,\n[md-theme="@themeName"] .md-background-bg.md-hue-2 .disabled-text {\n    color: @backgroundHue2Contrast3;\n}\n\n[md-theme="@themeName"] .md-background-bg.md-hue-2 .fade-text,\n[md-theme="@themeName"] .md-background-bg.md-hue-2 .divider {\n    color: @backgroundHue2Contrast4;\n}\n\n/* Background, Hue-3 */\n[md-theme="@themeName"] .md-background-bg.md-hue-3 {\n    background-color: @backgroundHue3Color;\n    color: @backgroundHue3Contrast1;\n}\n\n[md-theme="@themeName"] .md-background-bg.md-hue-3 .secondary-text,\n[md-theme="@themeName"] .md-background-bg.md-hue-3 .icon {\n    color: @backgroundHue3Contrast1;\n}\n\n[md-theme="@themeName"] .md-background-bg.md-hue-3 .hint-text,\n[md-theme="@themeName"] .md-background-bg.md-hue-3 .disabled-text {\n    color: @backgroundHue3Contrast3;\n}\n\n[md-theme="@themeName"] .md-background-bg.md-hue-3 .fade-text,\n[md-theme="@themeName"] .md-background-bg.md-hue-3 .divider {\n    color: @backgroundHue3Contrast4;\n}\n\n/* Background foreground */\n[md-theme="@themeName"] .md-background-fg {\n    color: @backgroundDefaultColor !important;\n}\n\n/* Background foreground, Hue-1 */\n[md-theme="@themeName"] .md-background-fg.md-hue-1 {\n    color: @backgroundHue1Color !important;\n}\n\n/* Background foreground, Hue-2 */\n[md-theme="@themeName"] .md-background-fg.md-hue-2 {\n    color: @backgroundHue2Color !important;\n}\n\n/* Background foreground, Hue-3 */\n[md-theme="@themeName"] .md-background-fg.md-hue-3 {\n    color: @backgroundHue3Color !important;\n}'.replace(a,function(e){return n[e]}),o=angular.element("head"),(s=angular.element('<style type="text/css"></style>')).html(i),o.append(s)})},rgba:l};function l(e,t){var n=t||!1;return 4===e.length&&255===e[0]&&255===e[1]&&255===e[2]&&e.splice(3,4),n&&(e=function(e,t){var n={white:{1:"1",2:"0.7",3:"0.3",4:"0.12"},black:{1:"0.87",2:"0.54",3:"0.26",4:"0.12"}};255===e[0]&&255===e[1]&&255===e[2]?e[3]=n.white[t]:0===e[0]&&0===e[1]&&0===e[2]&&(e[3]=n.black[t]);return e}(e,n)),3===e.length?"rgb("+e.join(",")+")":4===e.length?"rgba("+e.join(",")+")":void a.error("Invalid number of arguments supplied in the color array: "+e.length+"\nThe array must have 3 or 4 colors.")}function d(e){return e.charAt(0).toUpperCase()+e.slice(1)}}e.$inject=["$cookies","$log","motionTheming"],angular.module("app.core").factory("motionGenerator",e)}(),function(){"use strict";angular.module("app.core").constant("motionPalettes",[{name:"motion-blue",options:{50:"#ebf1fa",100:"#c2d4ef",200:"#9ab8e5",300:"#78a0dc",400:"#5688d3",500:"#3470ca",600:"#2e62b1",700:"#275498",800:"#21467e",900:"#1a3865",A100:"#c2d4ef",A200:"#9ab8e5",A400:"#5688d3",A700:"#275498",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400"}},{name:"motion-paleblue",options:{50:"#ececee",100:"#c5c6cb",200:"#9ea1a9",300:"#7d818c",400:"#5c616f",500:"#3c4252",600:"#353a48",700:"#2d323e",800:"#262933",900:"#1e2129",A100:"#c5c6cb",A200:"#9ea1a9",A400:"#5c616f",A700:"#2d323e",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400"}}])}(),function(){"use strict";angular.module("app.core").constant("motionThemes",{default:{primary:{name:"motion-paleblue",hues:{default:"700","hue-1":"500","hue-2":"600","hue-3":"400"}},accent:{name:"light-blue",hues:{default:"600","hue-1":"400","hue-2":"700","hue-3":"A100"}},warn:{name:"red"},background:{name:"grey",hues:{default:"A100","hue-1":"A100","hue-2":"100","hue-3":"300"}}},pinkTheme:{primary:{name:"blue-grey",hues:{default:"800","hue-1":"600","hue-2":"400","hue-3":"A100"}},accent:{name:"pink",hues:{default:"400","hue-1":"300","hue-2":"600","hue-3":"A100"}},warn:{name:"blue"},background:{name:"grey",hues:{default:"A100","hue-1":"A100","hue-2":"100","hue-3":"300"}}},tealTheme:{primary:{name:"motion-blue",hues:{default:"900","hue-1":"600","hue-2":"500","hue-3":"A100"}},accent:{name:"teal",hues:{default:"500","hue-1":"400","hue-2":"600","hue-3":"A100"}},warn:{name:"deep-orange"},background:{name:"grey",hues:{default:"A100","hue-1":"A100","hue-2":"100","hue-3":"300"}}}})}(),function(){"use strict";function e(n,e,t){var a;angular.injector(["ngCookies"]).invoke(["$cookies",function(e){a=e}]);var i=a.getObject("motion.customTheme");i&&(t.custom=i),n.alwaysWatchTheme(!0),angular.forEach(e,function(e){n.definePalette(e.name,e.options)}),angular.forEach(t,function(e,t){n.theme(t).primaryPalette(e.primary.name,e.primary.hues).accentPalette(e.accent.name,e.accent.hues).warnPalette(e.warn.name,e.warn.hues).backgroundPalette(e.background.name,e.background.hues)})}e.$inject=["$mdThemingProvider","motionPalettes","motionThemes"],angular.module("app.core").config(e)}(),function(){"use strict";function e(t,n,e){var a={getRegisteredPalettes:function(){return e.PALETTES},getRegisteredThemes:function(){return e.THEMES},setActiveTheme:function(e){if(angular.isUndefined(a.themes.list[e]))return angular.isUndefined(a.themes.list.default)?void n.error('You must have at least one theme named "default"'):(n.warn('The theme "'+e+'" does not exist! Falling back to the "default" theme.'),a.themes.active.name="default",a.themes.active.theme=a.themes.list.default,void t.put("motion.selectedTheme",a.themes.active.name));a.themes.active.name=e,a.themes.active.theme=a.themes.list[e],t.put("motion.selectedTheme",e)},setThemesList:function(e){a.themes.list=e},themes:{list:{},active:{name:"",theme:{}}}};return a}e.$inject=["$cookies","$log","$mdTheming"],angular.module("app.core").service("motionTheming",e)}(),function(){"use strict";function e(t,o,s,r){this.search=function(t){for(var e=[],n=r.getFlatNavigation(),a=s.defer(),i=0;i<n.length;i+=1)n[i].uisref&&e.push(n[i]);t&&(e=e.filter(function(e){if(-1<angular.lowercase(e.title).search(angular.lowercase(t)))return!0}));return o(function(){a.resolve(e)},1e3),a.promise},this.searchResultClick=function(e){e.uisref&&(e.stateParams?t.go(e.state,e.stateParams):t.go(e.state))}}e.$inject=["$state","$timeout","$q","msNavigationService"],angular.module("app.errors.error-404").controller("Error404Controller",e)}(),function(){"use strict";function e(e,t){var n=this;n.code="",n.send=!1,n.error=e.params,n.sendReport=function(){t.post("/api/jira",n.error).then(function(e){n.send=!0,e.data&&(n.code=e.data.id)},function(e){n.send=!1})}}e.$inject=["$state","$http"],angular.module("app.errors.error-500").controller("Error500Controller",e)}(),function(){"use strict";function e(e,t){var n=this;n.currentUser=e.getCurrentUser(),n.cookieAlertHide=t.get("motion.cookieAlertHide:"+n.currentUser.id)||!1,n.cookieAlertOnClose=function(){t.put("motion.cookieAlertHide:"+n.currentUser.id,!0)}}e.$inject=["Auth","$cookies"],angular.module("app.footer").controller("FooterController",e)}(),function(){"use strict";function e(e,t,n,a,i){var o=this;o.form={},o.forgotPassword=function(){return i.auth.forgot(o.form).$promise.then(function(){t.success({title:n.instant("FORGOTPASSWORD.LINK_SENT"),msg:n.instant("FORGOTPASSWORD.LINNK_SENT_MESSAGE")})}).catch(function(e){e&&t.error({title:n.instant("FORGOTPASSWORD.PASSWORD_RESET_ERROR"),msg:e.data?e.data.message||e.message||e:e.message||e})})},o.onInit=function(){e.isLoggedIn()&&a.go("app.dashboards.general")}}e.$inject=["Auth","toasty","$translate","$state","api"],angular.module("app.forgot").controller("ForgotPasswordController",e)}(),function(){"use strict";function e(e,t){var n=this;n.currentUser=e.getCurrentUser(),n.newsAlertHide=t.get("motion.newsAlertHide:"+n.currentUser.id)||!1,n.newsAlertOnClose=function(){t.put("motion.newsAlertHide:"+n.currentUser.id,!0)}}e.$inject=["Auth","$cookies"],angular.module("app.header").controller("HeaderController",e)}(),function(){"use strict";function e(e){var t={baseUrl:"api/"};return t.auth=e(t.baseUrl+"auth/local",{},{local:{method:"post",url:t.baseUrl+"auth/local"},forgot:{method:"post",url:t.baseUrl+"auth/local/forgot"},reset:{method:"post",url:t.baseUrl+"auth/local/reset/:token",params:{token:"@token"}},google:{method:"post",url:t.baseUrl+"auth/google"}}),t.jira=e(t.baseUrl+"jira"),t.rpc=e(t.baseUrl+"rpc",{},{startMonitor:{method:"get",url:t.baseUrl+"rpc/voice/channels/:uniqueid/mixmonitor",params:{uniqueid:"@uniqueid"}},stopMonitor:{method:"get",url:t.baseUrl+"rpc/voice/channels/:uniqueid/stopmixmonitor",params:{uniqueid:"@uniqueid"}},getVoiceChannels:{method:"get",url:t.baseUrl+"rpc/voice/channels"},getVoiceQueues:{method:"get",url:t.baseUrl+"rpc/voice/queues"},getChatQueues:{method:"get",url:t.baseUrl+"rpc/chat/queues"},getMailQueues:{method:"get",url:t.baseUrl+"rpc/mail/queues"},getSmsQueues:{method:"get",url:t.baseUrl+"rpc/sms/queues"},getOpenchannelQueues:{method:"get",url:t.baseUrl+"rpc/openchannel/queues"},getFaxQueues:{method:"get",url:t.baseUrl+"rpc/fax/queues"},getVoiceQueuesPreview:{method:"get",url:t.baseUrl+"rpc/voice/queues/preview/:id"},getVoiceQueuesChannels:{method:"get",url:t.baseUrl+"rpc/voice/queues/channels"},getVoiceQueuesChannel:{method:"get",url:t.baseUrl+"rpc/voice/queues/channels/:uniqueid"},getVoiceQueuesChannelHangup:{method:"get",url:t.baseUrl+"rpc/voice/queues/channels/:uniqueid/hangup"},getVoiceQueuesChannelRedirect:{method:"get",url:t.baseUrl+"rpc/voice/queues/channels/:uniqueid/redirect/:exten"},getOutbound:{method:"get",url:t.baseUrl+"rpc/outbound"},getOutboundChannels:{method:"get",url:t.baseUrl+"rpc/outbound/channels"},getAgents:{method:"get",url:t.baseUrl+"rpc/agents"},setAgentCapacity:{method:"put",url:t.baseUrl+"rpc/agents/:id/capacity",params:{id:"@id"}},getTelephones:{method:"get",url:t.baseUrl+"rpc/telephones"},getTrunks:{method:"get",url:t.baseUrl+"rpc/trunks"},getCampaigns:{method:"get",url:t.baseUrl+"rpc/campaigns"},getMailAccounts:{method:"get",url:t.baseUrl+"rpc/mail/accounts"},getFaxAccounts:{method:"get",url:t.baseUrl+"rpc/fax/accounts"},getChatQueuesWaitingInteractions:{method:"get",url:t.baseUrl+"rpc/chat/queues/waitinginteractions"},getMailQueuesWaitingInteractions:{method:"get",url:t.baseUrl+"rpc/mail/queues/waitinginteractions"},getOpenchannelQueuesWaitingInteractions:{method:"get",url:t.baseUrl+"rpc/openchannel/queues/waitinginteractions"},getSmsQueuesWaitingInteractions:{method:"get",url:t.baseUrl+"rpc/sms/queues/waitinginteractions"},getFaxQueuesWaitingInteractions:{method:"get",url:t.baseUrl+"rpc/fax/queues/waitinginteractions"}}),t.version=e(t.baseUrl+"version",{},{fetch:{method:"get",url:t.baseUrl+"version/fetch"},reset:{method:"get",url:t.baseUrl+"version/reset"},pull:{method:"get",url:t.baseUrl+"version/pull"},restart:{method:"get",url:t.baseUrl+"version/restart"},migrations:{method:"get",url:t.baseUrl+"version/migrations"}}),t.system=e(t.baseUrl+"system",{},{killProcess:{method:"get",url:t.baseUrl+"system/process/:pid/kill",params:{pid:"@pid"}}}),t.pm2=e(t.baseUrl+"pm2/:id",{id:"@id"},{update:{method:"put",isArray:!0}}),t.user=e(t.baseUrl+"users/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"users/describe"},clone:{method:"post",url:t.baseUrl+"users/:id/clone",params:{includeAll:"@includeAll"}},bulkCreate:{method:"post",url:t.baseUrl+"users/create_many",isArray:!0},addContacts:{isArray:!0,method:"post",url:t.baseUrl+"users/:id/contacts"},changePassword:{isArray:!1,method:"put",url:t.baseUrl+"users/:id/password"},addQueues:{isArray:!0,method:"post",url:t.baseUrl+"users/:id/queues"},removeQueues:{isArray:!1,method:"delete",url:t.baseUrl+"users/:id/queues"},addAvatar:{isArray:!1,method:"post",url:t.baseUrl+"users/:id/avatar"},getAvatar:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/avatar"},getContacts:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/contacts"},getQueues:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/queues"},getVoiceQueuesRt:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/queues_rt"},getGroups:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/groups"},getRecordings:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/recordings"},getChatInteractions:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/chat/interactions"},getOpenchannelInteractions:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/openchannel/interactions"},getMailInteractions:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/mail/interactions"},getSmsInteractions:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/sms/interactions"},getFaxInteractions:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/fax/interactions"},login:{isArray:!1,method:"post",url:t.baseUrl+"users/:id/login"},logout:{isArray:!1,method:"post",url:t.baseUrl+"users/:id/logout"},pause:{isArray:!1,method:"post",url:t.baseUrl+"users/:id/pause"},unpause:{isArray:!1,method:"post",url:t.baseUrl+"users/:id/unpause"},getTeams:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/teams"},addTeams:{isArray:!0,method:"post",url:t.baseUrl+"users/:id/teams"},removeTeams:{isArray:!1,method:"delete",url:t.baseUrl+"users/:id/teams"},getLists:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/lists"},getAgents:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/agents"},addChatInteractions:{isArray:!0,method:"post",url:t.baseUrl+"users/:id/chat_interactions"},removeChatInteractions:{isArray:!1,method:"delete",url:t.baseUrl+"users/:id/chat_interactions"},addMailInteractions:{isArray:!0,method:"post",url:t.baseUrl+"users/:id/mail_interactions"},removeMailInteractions:{isArray:!1,method:"delete",url:t.baseUrl+"users/:id/mail_interactions"},addFaxInteractions:{isArray:!0,method:"post",url:t.baseUrl+"users/:id/fax_interactions"},removeFaxInteractions:{isArray:!1,method:"delete",url:t.baseUrl+"users/:id/fax_interactions"},addSmsInteractions:{isArray:!0,method:"post",url:t.baseUrl+"users/:id/sms_interactions"},removeSmsInteractions:{isArray:!1,method:"delete",url:t.baseUrl+"users/:id/sms_interactions"},addOpenchannelInteractions:{isArray:!0,method:"post",url:t.baseUrl+"users/:id/openchannel_interactions"},removeOpenchannelInteractions:{isArray:!1,method:"delete",url:t.baseUrl+"users/:id/openchannel_interactions"}}),t.voiceChanSpy=e(t.baseUrl+"voice/chanspy/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/chanspy/describe"},clone:{method:"post",url:t.baseUrl+"voice/chanspy/:id/clone",params:{includeAll:"@includeAll"}}}),t.voiceContext=e(t.baseUrl+"voice/contexts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/contexts/describe"},clone:{method:"post",url:t.baseUrl+"voice/contexts/:id/clone",params:{includeAll:"@includeAll"}}}),t.voiceDisposition=e(t.baseUrl+"voice/dispositions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/dispositions/describe"},clone:{method:"post",url:t.baseUrl+"voice/dispositions/:id/clone",params:{includeAll:"@includeAll"}}}),t.voiceExtension=e(t.baseUrl+"voice/extensions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/extensions/describe"},clone:{method:"post",url:t.baseUrl+"voice/extensions/:id/clone",params:{includeAll:"@includeAll"}},addApplications:{isArray:!1,method:"post",url:t.baseUrl+"voice/extensions/:id/applications"}}),t.voiceMusicOnHold=e(t.baseUrl+"voice/mohs/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/mohs/describe"},clone:{method:"post",url:t.baseUrl+"voice/mohs/:id/clone",params:{includeAll:"@includeAll"}},addSound:{isArray:!1,method:"post",url:t.baseUrl+"voice/mohs/:id/sounds"},removeSound:{isArray:!1,method:"delete",url:t.baseUrl+"voice/mohs/:id/sounds/:id2"},getSounds:{isArray:!1,method:"get",url:t.baseUrl+"voice/mohs/:id/sounds"}}),t.voiceQueue=e(t.baseUrl+"voice/queues/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/queues/describe"},clone:{method:"post",url:t.baseUrl+"voice/queues/:id/clone",params:{includeAll:"@includeAll"}},getHoppers:{isArray:!1,method:"get",url:t.baseUrl+"voice/queues/:id/hoppers"},getHopperHistories:{isArray:!1,method:"get",url:t.baseUrl+"voice/queues/:id/hopper_histories"},getHopperFinals:{isArray:!1,method:"get",url:t.baseUrl+"voice/queues/:id/hopper_finals"},getHopperBlacks:{isArray:!1,method:"get",url:t.baseUrl+"voice/queues/:id/hopper_black"},getTeams:{isArray:!1,method:"get",url:t.baseUrl+"voice/queues/:id/teams"},addTeams:{isArray:!0,method:"post",url:t.baseUrl+"voice/queues/:id/teams"},removeTeams:{isArray:!1,method:"delete",url:t.baseUrl+"voice/queues/:id/teams"},addAgents:{isArray:!0,method:"post",url:t.baseUrl+"voice/queues/:id/users"},removeAgents:{isArray:!1,method:"delete",url:t.baseUrl+"voice/queues/:id/users"},getAgents:{isArray:!1,method:"get",url:t.baseUrl+"voice/queues/:id/users"},getMembers:{isArray:!1,method:"get",url:t.baseUrl+"voice/queues/:id/members"},getLists:{isArray:!1,method:"get",url:t.baseUrl+"voice/queues/:id/lists"},addLists:{isArray:!0,method:"post",url:t.baseUrl+"voice/queues/:id/lists"},removeLists:{isArray:!0,method:"delete",url:t.baseUrl+"voice/queues/:id/lists"},getBlackLists:{isArray:!1,method:"get",url:t.baseUrl+"voice/queues/:id/blacklists"},addBlackLists:{isArray:!0,method:"post",url:t.baseUrl+"voice/queues/:id/blacklists"},removeBlackLists:{isArray:!0,method:"delete",url:t.baseUrl+"voice/queues/:id/blacklists"}}),t.voiceRecording=e(t.baseUrl+"voice/recordings/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/recordings/describe"},clone:{method:"post",url:t.baseUrl+"voice/recordings/:id/clone",params:{includeAll:"@includeAll"}},download:{isArray:!1,method:"get",url:t.baseUrl+"voice/recordings/:id/download",responseType:"arraybuffer",cache:!1,transformResponse:function(e,t){var n=t();return{type:n["content-type"],length:n["content-length"],buffer:e}}},downloads:{isArray:!1,method:"get",url:t.baseUrl+"voice/recordings/:id/downloads"}}),t.voiceMail=e(t.baseUrl+"voice/mails/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/mails/describe"},clone:{method:"post",url:t.baseUrl+"voice/mails/:id/clone",params:{includeAll:"@includeAll"}},getMessages:{isArray:!1,method:"get",url:t.baseUrl+"voice/mails/:id/messages"}}),t.voiceMailMessage=e(t.baseUrl+"voice/mails/messages/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/mails/messages/describe"},clone:{method:"post",url:t.baseUrl+"voice/mails/messages/:id/clone",params:{includeAll:"@includeAll"}},download:{isArray:!1,method:"get",url:t.baseUrl+"voice/mails/messages/:id/download",responseType:"arraybuffer",cache:!1,transformResponse:function(e,t){var n=t();return{type:n["content-type"],length:n["content-length"],buffer:e}}}}),t.voiceCallReport=e(t.baseUrl+"voice/calls/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/calls/reports/describe"},clone:{method:"post",url:t.baseUrl+"voice/calls/reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.voiceDialReport=e(t.baseUrl+"voice/dials/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/dials/reports/describe"},clone:{method:"post",url:t.baseUrl+"voice/dials/reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.voiceAgentReport=e(t.baseUrl+"voice/agents/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/agents/reports/describe"},clone:{method:"post",url:t.baseUrl+"voice/agents/reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.voiceQueueReport=e(t.baseUrl+"voice/queues/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/queues/reports/describe"},clone:{method:"post",url:t.baseUrl+"voice/queues/reports/:id/clone",params:{includeAll:"@includeAll"}},getVoiceQueuesReport:{isArray:!1,method:"get",url:t.baseUrl+"voice/queues/reports/index"}}),t.memberReport=e(t.baseUrl+"members/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"members/reports/describe"},clone:{method:"post",url:t.baseUrl+"members/reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.trunk=e(t.baseUrl+"trunks/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"trunks/describe"},clone:{method:"post",url:t.baseUrl+"trunks/:id/clone",params:{includeAll:"@includeAll"}}}),t.voiceTransferReport=e(t.baseUrl+"voice/transfers/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/transfers/reports/describe"},clone:{method:"post",url:t.baseUrl+"voice/transfers/reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.mailServerOut=e(t.baseUrl+"mail/out_servers/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"mail/out_servers/describe"},clone:{method:"post",url:t.baseUrl+"mail/out_servers/:id/clone",params:{includeAll:"@includeAll"}}}),t.mailAccount=e(t.baseUrl+"mail/accounts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"mail/accounts/describe"},clone:{method:"post",url:t.baseUrl+"mail/accounts/:id/clone",params:{includeAll:"@includeAll"}},addAnswer:{isArray:!1,method:"post",url:t.baseUrl+"mail/accounts/:id/canned_answers"},getAnswers:{isArray:!1,method:"get",url:t.baseUrl+"mail/accounts/:id/canned_answers"},removeAnswers:{isArray:!1,method:"delete",url:t.baseUrl+"mail/accounts/:id/canned_answers"},getImap:{isArray:!1,method:"get",url:t.baseUrl+"mail/accounts/:id/in_servers"},addImap:{isArray:!1,method:"post",url:t.baseUrl+"mail/accounts/:id/in_servers"},removeImap:{isArray:!1,method:"delete",url:t.baseUrl+"mail/accounts/:id/in_servers"},getSmtp:{isArray:!1,method:"get",url:t.baseUrl+"mail/accounts/:id/out_servers"},addSmtp:{isArray:!1,method:"post",url:t.baseUrl+"mail/accounts/:id/out_servers"},removeSmtp:{isArray:!1,method:"delete",url:t.baseUrl+"mail/accounts/:id/out_servers"},addInteraction:{isArray:!1,method:"post",url:t.baseUrl+"mail/accounts/:id/interactions"},getInteractions:{isArray:!1,method:"get",url:t.baseUrl+"mail/accounts/:id/interactions"},addApplications:{isArray:!1,method:"post",url:t.baseUrl+"mail/accounts/:id/applications"},getApplications:{isArray:!1,method:"get",url:t.baseUrl+"mail/accounts/:id/applications"},addDisposition:{isArray:!1,method:"post",url:t.baseUrl+"mail/accounts/:id/dispositions"},addDispositions:{isArray:!1,method:"post",url:t.baseUrl+"mail/accounts/:id/dispositions"},getDispositions:{isArray:!1,method:"get",url:t.baseUrl+"mail/accounts/:id/dispositions"},getMessages:{isArray:!1,method:"get",url:t.baseUrl+"mail/accounts/:id/messages"},send:{isArray:!1,method:"post",url:t.baseUrl+"mail/accounts/:id/send"},verifySmtp:{isArray:!1,method:"get",url:t.baseUrl+"mail/accounts/:id/verify"}}),t.mailQueue=e(t.baseUrl+"mail/queues/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"mail/queues/describe"},clone:{method:"post",url:t.baseUrl+"mail/queues/:id/clone",params:{includeAll:"@includeAll"}},getMembers:{isArray:!1,method:"get",url:t.baseUrl+"mail/queues/:id/members"},getTeams:{isArray:!1,method:"get",url:t.baseUrl+"mail/queues/:id/teams"},addTeams:{isArray:!0,method:"post",url:t.baseUrl+"mail/queues/:id/teams"},removeTeams:{isArray:!1,method:"delete",url:t.baseUrl+"mail/queues/:id/teams"},addAgents:{isArray:!0,method:"post",url:t.baseUrl+"mail/queues/:id/users"},removeAgents:{isArray:!1,method:"delete",url:t.baseUrl+"mail/queues/:id/users"},getAgents:{isArray:!1,method:"get",url:t.baseUrl+"mail/queues/:id/users"}}),t.mailSubstatus=e(t.baseUrl+"mail/substatuses/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"mail/substatuses/describe"},clone:{method:"post",url:t.baseUrl+"mail/substatuses/:id/clone",params:{includeAll:"@includeAll"}}}),t.mailInteraction=e(t.baseUrl+"mail/interactions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"mail/interactions/describe"},clone:{method:"post",url:t.baseUrl+"mail/interactions/:id/clone",params:{includeAll:"@includeAll"}},addMessage:{isArray:!1,method:"post",url:t.baseUrl+"mail/interactions/:id/messages"},getMessages:{isArray:!1,method:"get",url:t.baseUrl+"mail/interactions/:id/messages"},addTags:{isArray:!1,method:"post",url:t.baseUrl+"mail/interactions/:id/tags"},removeTags:{isArray:!1,method:"delete",url:t.baseUrl+"mail/interactions/:id/tags"}}),t.mailMessage=e(t.baseUrl+"mail/messages/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"mail/messages/describe"},clone:{method:"post",url:t.baseUrl+"mail/messages/:id/clone",params:{includeAll:"@includeAll"}},accept:{isArray:!1,method:"put",url:t.baseUrl+"mail/messages/:id/accept"},reject:{isArray:!1,method:"put",url:t.baseUrl+"mail/messages/:id/reject"}}),t.mailApplication=e(t.baseUrl+"mail/applications/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"mail/applications/describe"},clone:{method:"post",url:t.baseUrl+"mail/applications/:id/clone",params:{includeAll:"@includeAll"}}}),t.mailDisposition=e(t.baseUrl+"mail/dispositions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"mail/dispositions/describe"},clone:{method:"post",url:t.baseUrl+"mail/dispositions/:id/clone",params:{includeAll:"@includeAll"}}}),t.mailQueueReport=e(t.baseUrl+"mail/reports/queue/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"mail/reports/queue/describe"},clone:{method:"post",url:t.baseUrl+"mail/reports/queue/:id/clone",params:{includeAll:"@includeAll"}}}),t.dashboard=e(t.baseUrl+"dashboards/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"dashboards/describe"},clone:{method:"post",url:t.baseUrl+"dashboards/:id/clone",params:{includeAll:"@includeAll"}},addItem:{isArray:!1,method:"post",url:t.baseUrl+"dashboards/:id/items"},getItems:{isArray:!1,method:"get",url:t.baseUrl+"dashboards/:id/items"}}),t.dashboardItem=e(t.baseUrl+"dashboards/items/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"dashboards/items/describe"},clone:{method:"post",url:t.baseUrl+"dashboards/items/:id/clone",params:{includeAll:"@includeAll"}}}),t.faxAccount=e(t.baseUrl+"fax/accounts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"fax/accounts/describe"},clone:{method:"post",url:t.baseUrl+"fax/accounts/:id/clone",params:{includeAll:"@includeAll"}},addAnswer:{isArray:!1,method:"post",url:t.baseUrl+"fax/accounts/:id/canned_answers"},getAnswers:{isArray:!1,method:"get",url:t.baseUrl+"fax/accounts/:id/canned_answers"},removeAnswers:{isArray:!1,method:"delete",url:t.baseUrl+"fax/accounts/:id/canned_answers"},addInteraction:{isArray:!1,method:"post",url:t.baseUrl+"fax/accounts/:id/interactions"},getInteractions:{isArray:!1,method:"get",url:t.baseUrl+"fax/accounts/:id/interactions"},addApplications:{isArray:!1,method:"post",url:t.baseUrl+"fax/accounts/:id/applications"},getApplications:{isArray:!1,method:"get",url:t.baseUrl+"fax/accounts/:id/applications"},addDisposition:{isArray:!1,method:"post",url:t.baseUrl+"fax/accounts/:id/dispositions"},addDispositions:{isArray:!1,method:"post",url:t.baseUrl+"fax/accounts/:id/dispositions"},getDispositions:{isArray:!1,method:"get",url:t.baseUrl+"fax/accounts/:id/dispositions"},addAccountApplications:{isArray:!1,method:"post",url:t.baseUrl+"fax/accounts/addaccountapplications"},updateAccountApplications:{isArray:!1,method:"post",url:t.baseUrl+"fax/accounts/updateaccountapplications"},getMessages:{isArray:!1,method:"get",url:t.baseUrl+"fax/accounts/:id/messages"},send:{isArray:!1,method:"post",url:t.baseUrl+"fax/accounts/:id/send"}}),t.faxApplication=e(t.baseUrl+"fax/applications/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"fax/applications/describe"},clone:{method:"post",url:t.baseUrl+"fax/applications/:id/clone",params:{includeAll:"@includeAll"}}}),t.faxDisposition=e(t.baseUrl+"fax/dispositions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"fax/dispositions/describe"},clone:{method:"post",url:t.baseUrl+"fax/dispositions/:id/clone",params:{includeAll:"@includeAll"}}}),t.faxInteraction=e(t.baseUrl+"fax/interactions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"fax/interactions/describe"},clone:{method:"post",url:t.baseUrl+"fax/interactions/:id/clone",params:{includeAll:"@includeAll"}},addMessage:{isArray:!1,method:"post",url:t.baseUrl+"fax/interactions/:id/messages"},getMessages:{isArray:!1,method:"get",url:t.baseUrl+"fax/interactions/:id/messages"},addTags:{isArray:!1,method:"post",url:t.baseUrl+"fax/interactions/:id/tags"},removeTags:{isArray:!1,method:"delete",url:t.baseUrl+"fax/interactions/:id/tags"}}),t.faxMessage=e(t.baseUrl+"fax/messages/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"fax/messages/describe"},clone:{method:"post",url:t.baseUrl+"fax/messages/:id/clone",params:{includeAll:"@includeAll"}},accept:{isArray:!1,method:"put",url:t.baseUrl+"fax/messages/:id/accept"},reject:{isArray:!1,method:"put",url:t.baseUrl+"fax/messages/:id/reject"}}),t.faxQueue=e(t.baseUrl+"fax/queues/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"fax/queues/describe"},clone:{method:"post",url:t.baseUrl+"fax/queues/:id/clone",params:{includeAll:"@includeAll"}},getMembers:{isArray:!1,method:"get",url:t.baseUrl+"fax/queues/:id/members"},getTeams:{isArray:!1,method:"get",url:t.baseUrl+"fax/queues/:id/teams"},addTeams:{isArray:!0,method:"post",url:t.baseUrl+"fax/queues/:id/teams"},removeTeams:{isArray:!1,method:"delete",url:t.baseUrl+"fax/queues/:id/teams"},addAgents:{isArray:!0,method:"post",url:t.baseUrl+"fax/queues/:id/users"},removeAgents:{isArray:!1,method:"delete",url:t.baseUrl+"fax/queues/:id/users"},getAgents:{isArray:!1,method:"get",url:t.baseUrl+"fax/queues/:id/users"}}),t.faxQueueReport=e(t.baseUrl+"fax/reports/queue/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"fax/reports/queue/describe"},clone:{method:"post",url:t.baseUrl+"fax/reports/queue/:id/clone",params:{includeAll:"@includeAll"}}}),t.smsAccount=e(t.baseUrl+"sms/accounts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"sms/accounts/describe"},clone:{method:"post",url:t.baseUrl+"sms/accounts/:id/clone",params:{includeAll:"@includeAll"}},addAnswer:{isArray:!1,method:"post",url:t.baseUrl+"sms/accounts/:id/canned_answers"},getAnswers:{isArray:!1,method:"get",url:t.baseUrl+"sms/accounts/:id/canned_answers"},removeAnswers:{isArray:!1,method:"delete",url:t.baseUrl+"sms/accounts/:id/canned_answers"},notify:{isArray:!1,method:"post",url:t.baseUrl+"sms/accounts/:id/notify"},addApplications:{isArray:!1,method:"post",url:t.baseUrl+"sms/accounts/:id/applications"},getApplications:{isArray:!1,method:"get",url:t.baseUrl+"sms/accounts/:id/applications"},addDisposition:{isArray:!1,method:"post",url:t.baseUrl+"sms/accounts/:id/dispositions"},addDispositions:{isArray:!1,method:"post",url:t.baseUrl+"sms/accounts/:id/dispositions"},getDispositions:{isArray:!1,method:"get",url:t.baseUrl+"sms/accounts/:id/dispositions"},getInteractions:{isArray:!1,method:"get",url:t.baseUrl+"sms/accounts/:id/interactions"},send:{isArray:!1,method:"post",url:t.baseUrl+"sms/accounts/:id/send"},status:{isArray:!1,method:"post",url:t.baseUrl+"sms/accounts/:id/status"}}),t.smsApplication=e(t.baseUrl+"sms/applications/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"sms/applications/describe"},clone:{method:"post",url:t.baseUrl+"sms/applications/:id/clone",params:{includeAll:"@includeAll"}}}),t.smsDisposition=e(t.baseUrl+"sms/dispositions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"sms/dispositions/describe"},clone:{method:"post",url:t.baseUrl+"sms/dispositions/:id/clone",params:{includeAll:"@includeAll"}}}),t.smsInteraction=e(t.baseUrl+"sms/interactions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"sms/interactions/describe"},clone:{method:"post",url:t.baseUrl+"sms/interactions/:id/clone",params:{includeAll:"@includeAll"}},addMessage:{isArray:!1,method:"post",url:t.baseUrl+"sms/interactions/:id/messages"},getMessages:{isArray:!1,method:"get",url:t.baseUrl+"sms/interactions/:id/messages"},addTags:{isArray:!1,method:"post",url:t.baseUrl+"sms/interactions/:id/tags"},removeTags:{isArray:!1,method:"delete",url:t.baseUrl+"sms/interactions/:id/tags"}}),t.smsMessage=e(t.baseUrl+"sms/messages/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"sms/messages/describe"},clone:{method:"post",url:t.baseUrl+"sms/messages/:id/clone",params:{includeAll:"@includeAll"}},accept:{isArray:!1,method:"put",url:t.baseUrl+"sms/messages/:id/accept"},reject:{isArray:!1,method:"put",url:t.baseUrl+"sms/messages/:id/reject"},status:{isArray:!1,method:"post",url:t.baseUrl+"sms/messages/:id/status"}}),t.smsQueue=e(t.baseUrl+"sms/queues/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"sms/queues/describe"},clone:{method:"post",url:t.baseUrl+"sms/queues/:id/clone",params:{includeAll:"@includeAll"}},getMembers:{isArray:!1,method:"get",url:t.baseUrl+"sms/queues/:id/members"},getTeams:{isArray:!1,method:"get",url:t.baseUrl+"sms/queues/:id/teams"},addTeams:{isArray:!0,method:"post",url:t.baseUrl+"sms/queues/:id/teams"},removeTeams:{isArray:!1,method:"delete",url:t.baseUrl+"sms/queues/:id/teams"},addAgents:{isArray:!0,method:"post",url:t.baseUrl+"sms/queues/:id/users"},removeAgents:{isArray:!1,method:"delete",url:t.baseUrl+"sms/queues/:id/users"},getAgents:{isArray:!1,method:"get",url:t.baseUrl+"sms/queues/:id/users"}}),t.openchannelAccount=e(t.baseUrl+"openchannel/accounts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"openchannel/accounts/describe"},clone:{method:"post",url:t.baseUrl+"openchannel/accounts/:id/clone",params:{includeAll:"@includeAll"}},addAnswer:{isArray:!1,method:"post",url:t.baseUrl+"openchannel/accounts/:id/canned_answers"},getAnswers:{isArray:!1,method:"get",url:t.baseUrl+"openchannel/accounts/:id/canned_answers"},removeAnswers:{isArray:!1,method:"delete",url:t.baseUrl+"openchannel/accounts/:id/canned_answers"},notify:{isArray:!1,method:"post",url:t.baseUrl+"openchannel/accounts/:id/notify"},addApplications:{isArray:!1,method:"post",url:t.baseUrl+"openchannel/accounts/:id/applications"},getApplications:{isArray:!1,method:"get",url:t.baseUrl+"openchannel/accounts/:id/applications"},addDisposition:{isArray:!1,method:"post",url:t.baseUrl+"openchannel/accounts/:id/dispositions"},addDispositions:{isArray:!1,method:"post",url:t.baseUrl+"openchannel/accounts/:id/dispositions"},getDispositions:{isArray:!1,method:"get",url:t.baseUrl+"openchannel/accounts/:id/dispositions"},getInteractions:{isArray:!1,method:"get",url:t.baseUrl+"openchannel/accounts/:id/interactions"}}),t.openchannelApplication=e(t.baseUrl+"openchannel/applications/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"openchannel/applications/describe"},clone:{method:"post",url:t.baseUrl+"openchannel/applications/:id/clone",params:{includeAll:"@includeAll"}}}),t.openchannelDisposition=e(t.baseUrl+"openchannel/dispositions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"openchannel/dispositions/describe"},clone:{method:"post",url:t.baseUrl+"openchannel/dispositions/:id/clone",params:{includeAll:"@includeAll"}}}),t.openchannelInteraction=e(t.baseUrl+"openchannel/interactions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"openchannel/interactions/describe"},clone:{method:"post",url:t.baseUrl+"openchannel/interactions/:id/clone",params:{includeAll:"@includeAll"}},addMessage:{isArray:!1,method:"post",url:t.baseUrl+"openchannel/interactions/:id/messages"},getMessages:{isArray:!1,method:"get",url:t.baseUrl+"openchannel/interactions/:id/messages"},addTags:{isArray:!1,method:"post",url:t.baseUrl+"openchannel/interactions/:id/tags"},removeTags:{isArray:!1,method:"delete",url:t.baseUrl+"openchannel/interactions/:id/tags"}}),t.openchannelMessage=e(t.baseUrl+"openchannel/messages/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"openchannel/messages/describe"},clone:{method:"post",url:t.baseUrl+"openchannel/messages/:id/clone",params:{includeAll:"@includeAll"}},accept:{isArray:!1,method:"put",url:t.baseUrl+"openchannel/messages/:id/accept"},reject:{isArray:!1,method:"put",url:t.baseUrl+"openchannel/messages/:id/reject"}}),t.openchannelQueue=e(t.baseUrl+"openchannel/queues/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"openchannel/queues/describe"},clone:{method:"post",url:t.baseUrl+"openchannel/queues/:id/clone",params:{includeAll:"@includeAll"}},getMembers:{isArray:!1,method:"get",url:t.baseUrl+"openchannel/queues/:id/members"},getTeams:{isArray:!1,method:"get",url:t.baseUrl+"openchannel/queues/:id/teams"},addTeams:{isArray:!0,method:"post",url:t.baseUrl+"openchannel/queues/:id/teams"},removeTeams:{isArray:!1,method:"delete",url:t.baseUrl+"openchannel/queues/:id/teams"},addAgents:{isArray:!0,method:"post",url:t.baseUrl+"openchannel/queues/:id/users"},removeAgents:{isArray:!1,method:"delete",url:t.baseUrl+"openchannel/queues/:id/users"},getAgents:{isArray:!1,method:"get",url:t.baseUrl+"openchannel/queues/:id/users"}}),t.chatWebsite=e(t.baseUrl+"chat/websites/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/websites/describe"},clone:{method:"post",url:t.baseUrl+"chat/websites/:id/clone",params:{includeAll:"@includeAll"}},addAnswer:{isArray:!1,method:"post",url:t.baseUrl+"chat/websites/:id/canned_answers"},getAnswers:{isArray:!1,method:"get",url:t.baseUrl+"chat/websites/:id/canned_answers"},removeAnswers:{isArray:!1,method:"delete",url:t.baseUrl+"chat/websites/:id/canned_answers"},addLogo:{isArray:!1,method:"post",url:t.baseUrl+"chat/websites/:id/logo"},addAvatar:{isArray:!1,method:"post",url:t.baseUrl+"chat/websites/:id/avatar"},getLogo:{isArray:!1,method:"get",url:t.baseUrl+"chat/websites/:id/logo"},getAvatar:{isArray:!1,method:"get",url:t.baseUrl+"chat/websites/:id/avatar"},notify:{isArray:!1,method:"post",url:t.baseUrl+"chat/websites/:id/notify"},offline:{isArray:!1,method:"post",url:t.baseUrl+"chat/websites/:id/offline"},addInteraction:{isArray:!1,method:"post",url:t.baseUrl+"chat/websites/:id/interactions"},getInteractions:{isArray:!1,method:"get",url:t.baseUrl+"chat/websites/:id/interactions"},getSnippet:{isArray:!1,method:"get",url:t.baseUrl+"chat/websites/:id/snippet"},addApplications:{isArray:!1,method:"post",url:t.baseUrl+"chat/websites/:id/applications"},getApplications:{isArray:!1,method:"get",url:t.baseUrl+"chat/websites/:id/applications"},addDisposition:{isArray:!1,method:"post",url:t.baseUrl+"chat/websites/:id/dispositions"},addDispositions:{isArray:!1,method:"post",url:t.baseUrl+"chat/websites/:id/dispositions"},getDispositions:{isArray:!1,method:"get",url:t.baseUrl+"chat/websites/:id/dispositions"},addProactiveActions:{isArray:!1,method:"post",url:t.baseUrl+"chat/websites/:id/proactive_actions"},getProactiveActions:{isArray:!1,method:"get",url:t.baseUrl+"chat/websites/:id/proactive_actions"},getFields:{isArray:!1,method:"get",url:t.baseUrl+"chat/websites/:id/fields"},getOfflineMessages:{isArray:!1,method:"get",url:t.baseUrl+"chat/websites/:id/offline_messages"}}),t.openchannelQueueReport=e(t.baseUrl+"openchannel/reports/queue/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"openchannel/reports/queue/describe"},clone:{method:"post",url:t.baseUrl+"openchannel/reports/queue/:id/clone",params:{includeAll:"@includeAll"}}}),t.chatApplication=e(t.baseUrl+"chat/applications/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/applications/describe"},clone:{method:"post",url:t.baseUrl+"chat/applications/:id/clone",params:{includeAll:"@includeAll"}}}),t.chatDisposition=e(t.baseUrl+"chat/dispositions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/dispositions/describe"},clone:{method:"post",url:t.baseUrl+"chat/dispositions/:id/clone",params:{includeAll:"@includeAll"}}}),t.chatInteraction=e(t.baseUrl+"chat/interactions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/interactions/describe"},clone:{method:"post",url:t.baseUrl+"chat/interactions/:id/clone",params:{includeAll:"@includeAll"}},abandon:{isArray:!1,method:"put",url:t.baseUrl+"chat/interactions/:id/abandon"},attachmentUpload:{isArray:!1,method:"post",url:t.baseUrl+"chat/interactions/:id/attachment_upload"},attachmentDownload:{isArray:!1,method:"get",url:t.baseUrl+"chat/interactions/:id/attachment_download"},close:{isArray:!1,method:"put",url:t.baseUrl+"chat/interactions/:id/close"},addMessage:{isArray:!1,method:"post",url:t.baseUrl+"chat/interactions/:id/messages"},getMessages:{isArray:!1,method:"get",url:t.baseUrl+"chat/interactions/:id/messages"},getMyMessages:{isArray:!1,method:"get",url:t.baseUrl+"chat/interactions/:id/my_messages"},addTags:{isArray:!1,method:"post",url:t.baseUrl+"chat/interactions/:id/tags"},removeTags:{isArray:!1,method:"delete",url:t.baseUrl+"chat/interactions/:id/tags"}}),t.chatMessage=e(t.baseUrl+"chat/messages/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/messages/describe"},clone:{method:"post",url:t.baseUrl+"chat/messages/:id/clone",params:{includeAll:"@includeAll"}},accept:{isArray:!1,method:"put",url:t.baseUrl+"chat/messages/:id/accept"},reject:{isArray:!1,method:"put",url:t.baseUrl+"chat/messages/:id/reject"}}),t.chatOfflineMessage=e(t.baseUrl+"chat/offline_messages/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/offline_messages/describe"},clone:{method:"post",url:t.baseUrl+"chat/offline_messages/:id/clone",params:{includeAll:"@includeAll"}}}),t.chatQueue=e(t.baseUrl+"chat/queues/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/queues/describe"},clone:{method:"post",url:t.baseUrl+"chat/queues/:id/clone",params:{includeAll:"@includeAll"}},getMembers:{isArray:!1,method:"get",url:t.baseUrl+"chat/queues/:id/members"},getTeams:{isArray:!1,method:"get",url:t.baseUrl+"chat/queues/:id/teams"},addTeams:{isArray:!0,method:"post",url:t.baseUrl+"chat/queues/:id/teams"},removeTeams:{isArray:!1,method:"delete",url:t.baseUrl+"chat/queues/:id/teams"},addAgents:{isArray:!0,method:"post",url:t.baseUrl+"chat/queues/:id/users"},removeAgents:{isArray:!1,method:"delete",url:t.baseUrl+"chat/queues/:id/users"},getAgents:{isArray:!1,method:"get",url:t.baseUrl+"chat/queues/:id/users"}}),t.chatGroup=e(t.baseUrl+"chat/groups/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/groups/describe"},clone:{method:"post",url:t.baseUrl+"chat/groups/:id/clone",params:{includeAll:"@includeAll"}},getUnread:{isArray:!1,method:"get",url:t.baseUrl+"chat/groups/:id/unread"},addMembers:{isArray:!0,method:"post",url:t.baseUrl+"chat/groups/:id/members"},getMembers:{isArray:!1,method:"get",url:t.baseUrl+"chat/groups/:id/members"},removeMembers:{isArray:!1,method:"delete",url:t.baseUrl+"chat/groups/:id/members"},addMessage:{isArray:!1,method:"post",url:t.baseUrl+"chat/groups/:id/messages"},getMessages:{isArray:!1,method:"get",url:t.baseUrl+"chat/groups/:id/messages"}}),t.chatProactiveAction=e(t.baseUrl+"chat/proactive_actions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/proactive_actions/describe"},clone:{method:"post",url:t.baseUrl+"chat/proactive_actions/:id/clone",params:{includeAll:"@includeAll"}}}),t.cmCompany=e(t.baseUrl+"cm/companies/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"cm/companies/describe"},clone:{method:"post",url:t.baseUrl+"cm/companies/:id/clone",params:{includeAll:"@includeAll"}},addContacts:{isArray:!1,method:"post",url:t.baseUrl+"cm/companies/:id/contacts"},getContacts:{isArray:!1,method:"get",url:t.baseUrl+"cm/companies/:id/contacts"}}),t.cmContact=e(t.baseUrl+"cm/contacts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"cm/contacts/describe"},clone:{method:"post",url:t.baseUrl+"cm/contacts/:id/clone",params:{includeAll:"@includeAll"}},merge:{isArray:!1,method:"post",url:t.baseUrl+"cm/contacts/merge"},bulkCreate:{isArray:!1,method:"post",url:t.baseUrl+"cm/contacts/create_many"},getHoppers:{isArray:!1,method:"get",url:t.baseUrl+"cm/contacts/:id/hoppers"},getHopperHistories:{isArray:!1,method:"get",url:t.baseUrl+"cm/contacts/:id/hopper_histories"},getHopperFinals:{isArray:!1,method:"get",url:t.baseUrl+"cm/contacts/:id/hopper_finals"},getJscriptySessions:{isArray:!1,method:"get",url:t.baseUrl+"cm/contacts/:id/jscripty_sessions"},uploadCsv:{isArray:!1,method:"post",url:t.baseUrl+"cm/contacts/csv"},upload:{isArray:!1,method:"post",url:t.baseUrl+"cm/contacts/upload"},import:{isArray:!1,method:"post",url:t.baseUrl+"cm/contacts/upload/:id"}}),t.cmHopper=e(t.baseUrl+"cm/hopper/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"cm/hopper/describe"},clone:{method:"post",url:t.baseUrl+"cm/hopper/:id/clone",params:{includeAll:"@includeAll"}},getPreview:{isArray:!1,method:"post",url:t.baseUrl+"cm/hopper/preview"},getOpenContacts:{isArray:!1,method:"get",url:t.baseUrl+"cm/hopper/opencontacts"}}),t.cmHopperBlack=e(t.baseUrl+"cm/hopper_black/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"cm/hopper_black/describe"},clone:{method:"post",url:t.baseUrl+"cm/hopper_black/:id/clone",params:{includeAll:"@includeAll"}}}),t.cmHopperFinal=e(t.baseUrl+"cm/hopper_final/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"cm/hopper_final/describe"},clone:{method:"post",url:t.baseUrl+"cm/hopper_final/:id/clone",params:{includeAll:"@includeAll"}},countContactsQueueCampaignHopperFinal:{isArray:!0,method:"get",url:t.baseUrl+"cm/hopper_final/voice/queue/countAttributes/:id"},countContactsIvrCampaignHopperFinal:{isArray:!0,method:"get",url:t.baseUrl+"cm/hopper_final/campaign/countAttributes/:id"},moveContactsQueueCampaignHopperFinal:{isArray:!0,method:"post",url:t.baseUrl+"cm/hopper_final/voice/queue/moveContacts/:id"},moveContactsIvrCampaignHopperFinal:{isArray:!0,method:"post",url:t.baseUrl+"cm/hopper_final/voice/campaign/moveContacts/:id"},checkContactHopper:{isArray:!1,method:"post",url:t.baseUrl+"cm/hopper_final/checkContactHopper"}}),t.cmHopperHistory=e(t.baseUrl+"cm/hopper_history/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"cm/hopper_history/describe"},clone:{method:"post",url:t.baseUrl+"cm/hopper_history/:id/clone",params:{includeAll:"@includeAll"}}}),t.cmCustomField=e(t.baseUrl+"cm/custom_fields/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"cm/custom_fields/describe"},clone:{method:"post",url:t.baseUrl+"cm/custom_fields/:id/clone",params:{includeAll:"@includeAll"}}}),t.cmList=e(t.baseUrl+"cm/lists/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"cm/lists/describe"},clone:{method:"post",url:t.baseUrl+"cm/lists/:id/clone",params:{includeAll:"@includeAll"}},addDisposition:{isArray:!1,method:"post",url:t.baseUrl+"cm/lists/:id/dispositions"},getDispositions:{isArray:!1,method:"get",url:t.baseUrl+"cm/lists/:id/dispositions"},addContacts:{isArray:!1,method:"post",url:t.baseUrl+"cm/lists/:id/contacts"},getContacts:{isArray:!0,method:"get",url:t.baseUrl+"cm/lists/:id/contacts"},getContactsCsv:{isArray:!1,method:"get",url:t.baseUrl+"cm/lists/:id/contacts/csv"},addCustomField:{isArray:!1,method:"post",url:t.baseUrl+"cm/lists/:id/fields"},getCustomFields:{isArray:!1,method:"get",url:t.baseUrl+"cm/lists/:id/fields"},addAgents:{isArray:!0,method:"post",url:t.baseUrl+"cm/lists/:id/users"},removeAgents:{isArray:!1,method:"delete",url:t.baseUrl+"cm/lists/:id/users"},getAgents:{isArray:!1,method:"get",url:t.baseUrl+"cm/lists/:id/users"}}),t.action=e(t.baseUrl+"actions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"actions/describe"},clone:{method:"post",url:t.baseUrl+"actions/:id/clone",params:{includeAll:"@includeAll"}}}),t.automation=e(t.baseUrl+"automations/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"automations/describe"},clone:{method:"post",url:t.baseUrl+"automations/:id/clone",params:{includeAll:"@includeAll"}},addConditions:{isArray:!1,method:"post",url:t.baseUrl+"automations/:id/conditions"},getConditions:{isArray:!1,method:"get",url:t.baseUrl+"automations/:id/conditions"},addActions:{isArray:!1,method:"post",url:t.baseUrl+"automations/:id/actions"},getActions:{isArray:!1,method:"get",url:t.baseUrl+"automations/:id/actions"}}),t.cannedAnswer=e(t.baseUrl+"canned_answers/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"canned_answers/describe"},clone:{method:"post",url:t.baseUrl+"canned_answers/:id/clone",params:{includeAll:"@includeAll"}}}),t.condition=e(t.baseUrl+"conditions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"conditions/describe"},clone:{method:"post",url:t.baseUrl+"conditions/:id/clone",params:{includeAll:"@includeAll"}}}),t.interval=e(t.baseUrl+"intervals/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"intervals/describe"},clone:{method:"post",url:t.baseUrl+"intervals/:id/clone",params:{includeAll:"@includeAll"}},addInterval:{isArray:!1,method:"post",url:t.baseUrl+"intervals/:id/sub_intervals"},getIntervals:{isArray:!1,method:"get",url:t.baseUrl+"intervals/:id/sub_intervals"},addIntervals:{isArray:!0,method:"post",url:t.baseUrl+"intervals/:id/sub_intervals/create_many"}}),t.pause=e(t.baseUrl+"pauses/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"pauses/describe"},clone:{method:"post",url:t.baseUrl+"pauses/:id/clone",params:{includeAll:"@includeAll"}}}),t.cdr=e(t.baseUrl+"cdr/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"cdr/describe"},clone:{method:"post",url:t.baseUrl+"cdr/:id/clone",params:{includeAll:"@includeAll"}}}),t.voiceQueuesLog=e(t.baseUrl+"voiceQueuesLog/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voiceQueuesLog/describe"},clone:{method:"post",url:t.baseUrl+"voiceQueuesLog/:id/clone",params:{includeAll:"@includeAll"}}}),t.schedule=e(t.baseUrl+"schedules/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"schedules/describe"},clone:{method:"post",url:t.baseUrl+"schedules/:id/clone",params:{includeAll:"@includeAll"}}}),t.sound=e(t.baseUrl+"sounds/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"sounds/describe"},clone:{method:"post",url:t.baseUrl+"sounds/:id/clone",params:{includeAll:"@includeAll"}},download:{isArray:!1,method:"get",url:t.baseUrl+"sounds/:id/download",responseType:"arraybuffer",cache:!1,transformResponse:function(e,t){var n=t();return{type:n["content-type"],length:n["content-length"],buffer:e}}},delete:{isArray:!1,method:"delete",url:t.baseUrl+"sounds/:id"}}),t.tag=e(t.baseUrl+"tags/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"tags/describe"},clone:{method:"post",url:t.baseUrl+"tags/:id/clone",params:{includeAll:"@includeAll"}}}),t.template=e(t.baseUrl+"templates/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"templates/describe"},clone:{method:"post",url:t.baseUrl+"templates/:id/clone",params:{includeAll:"@includeAll"}}}),t.trigger=e(t.baseUrl+"triggers/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"triggers/describe"},clone:{method:"post",url:t.baseUrl+"triggers/:id/clone",params:{includeAll:"@includeAll"}},addAllCondition:{isArray:!1,method:"post",url:t.baseUrl+"triggers/:id/all_conditions"},addAnyCondition:{isArray:!1,method:"post",url:t.baseUrl+"triggers/:id/any_conditions"},getAllConditions:{isArray:!1,method:"get",url:t.baseUrl+"triggers/:id/all_conditions"},getAnyConditions:{isArray:!1,method:"get",url:t.baseUrl+"triggers/:id/any_conditions"},addAction:{isArray:!1,method:"post",url:t.baseUrl+"triggers/:id/actions"},getActions:{isArray:!1,method:"get",url:t.baseUrl+"triggers/:id/actions"}}),t.variable=e(t.baseUrl+"variables/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"variables/describe"},clone:{method:"post",url:t.baseUrl+"variables/:id/clone",params:{includeAll:"@includeAll"}}}),t.integration=e(t.baseUrl+"integrations/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/describe"},clone:{method:"post",url:t.baseUrl+"integrations/:id/clone",params:{includeAll:"@includeAll"}}}),t.integrationReport=e(t.baseUrl+"integrations/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/reports/describe"},clone:{method:"post",url:t.baseUrl+"integrations/reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.analyticCustomReport=e(t.baseUrl+"analytics/custom_reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"analytics/custom_reports/describe"},clone:{method:"post",url:t.baseUrl+"analytics/custom_reports/:id/clone",params:{includeAll:"@includeAll"}},preview:{isArray:!0,method:"get",url:t.baseUrl+"analytics/custom_reports/:id/preview"},run:{isArray:!1,method:"get",url:t.baseUrl+"analytics/custom_reports/:id/run"},query:{isArray:!1,method:"get",url:t.baseUrl+"analytics/custom_reports/:id/query"}}),t.analyticDefaultReport=e(t.baseUrl+"analytics/default_reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"analytics/default_reports/describe"},clone:{method:"post",url:t.baseUrl+"analytics/default_reports/:id/clone",params:{includeAll:"@includeAll"}},preview:{isArray:!0,method:"get",url:t.baseUrl+"analytics/default_reports/:id/preview"},run:{isArray:!1,method:"get",url:t.baseUrl+"analytics/default_reports/:id/run"},query:{isArray:!1,method:"get",url:t.baseUrl+"analytics/default_reports/:id/query"}}),t.analyticExtractedReport=e(t.baseUrl+"analytics/extracted_reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"analytics/extracted_reports/describe"},clone:{method:"post",url:t.baseUrl+"analytics/extracted_reports/:id/clone",params:{includeAll:"@includeAll"}},download:{isArray:!1,method:"get",url:t.baseUrl+"analytics/extracted_reports/:id/download",responseType:"arraybuffer",cache:!1,transformResponse:function(e,t){var n=t();return{type:n["content-type"],length:n["content-length"],buffer:e}}}}),t.analyticMetric=e(t.baseUrl+"analytics/metrics/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"analytics/metrics/describe"},clone:{method:"post",url:t.baseUrl+"analytics/metrics/:id/clone",params:{includeAll:"@includeAll"}}}),t.analyticFieldReport=e(t.baseUrl+"analytics/field_reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"analytics/field_reports/describe"},clone:{method:"post",url:t.baseUrl+"analytics/field_reports/:id/clone",params:{includeAll:"@includeAll"}},bulkCreate:{method:"post",url:t.baseUrl+"analytics/field_reports/create_many",isArray:!0},bulkDestroy:{method:"delete",url:t.baseUrl+"analytics/field_reports/destroy_many",isArray:!0},addFields:{isArray:!0,method:"post",url:t.baseUrl+"analytics/field_reports/:id/create_many"}}),t.analyticTreeReport=e(t.baseUrl+"analytics/tree_reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"analytics/tree_reports/describe"},clone:{method:"post",url:t.baseUrl+"analytics/tree_reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.intSalesforceAccount=e(t.baseUrl+"integrations/salesforce/accounts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/salesforce/accounts/describe"},clone:{method:"post",url:t.baseUrl+"integrations/salesforce/accounts/:id/clone",params:{includeAll:"@includeAll"}},getConfigurations:{isArray:!1,method:"get",url:t.baseUrl+"integrations/salesforce/accounts/:id/configurations"},addConfiguration:{isArray:!1,method:"post",url:t.baseUrl+"integrations/salesforce/accounts/:id/configurations"},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/salesforce/accounts/:id/fields"}}),t.intSalesforceConfiguration=e(t.baseUrl+"integrations/salesforce/configurations/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/salesforce/configurations/describe"},clone:{method:"post",url:t.baseUrl+"integrations/salesforce/configurations/:id/clone",params:{includeAll:"@includeAll"}},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/salesforce/configurations/:id/fields"},getSubjects:{isArray:!1,method:"get",url:t.baseUrl+"integrations/salesforce/configurations/:id/subjects"},getDescriptions:{isArray:!1,method:"get",url:t.baseUrl+"integrations/salesforce/configurations/:id/descriptions"}}),t.intSalesforceField=e(t.baseUrl+"integrations/salesforce/fields/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/salesforce/fields/describe"},clone:{method:"post",url:t.baseUrl+"integrations/salesforce/fields/:id/clone",params:{includeAll:"@includeAll"}}}),t.intSugarcrmAccount=e(t.baseUrl+"integrations/sugarcrm/accounts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/sugarcrm/accounts/describe"},clone:{method:"post",url:t.baseUrl+"integrations/sugarcrm/accounts/:id/clone",params:{includeAll:"@includeAll"}},getConfigurations:{isArray:!1,method:"get",url:t.baseUrl+"integrations/sugarcrm/accounts/:id/configurations"},addConfiguration:{isArray:!1,method:"post",url:t.baseUrl+"integrations/sugarcrm/accounts/:id/configurations"},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/sugarcrm/accounts/:id/fields"}}),t.intSugarcrmConfiguration=e(t.baseUrl+"integrations/sugarcrm/configurations/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/sugarcrm/configurations/describe"},clone:{method:"post",url:t.baseUrl+"integrations/sugarcrm/configurations/:id/clone",params:{includeAll:"@includeAll"}},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/sugarcrm/configurations/:id/fields"},getSubjects:{isArray:!1,method:"get",url:t.baseUrl+"integrations/sugarcrm/configurations/:id/subjects"},getDescriptions:{isArray:!1,method:"get",url:t.baseUrl+"integrations/sugarcrm/configurations/:id/descriptions"}}),t.intSugarcrmField=e(t.baseUrl+"integrations/sugarcrm/fields/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/sugarcrm/fields/describe"},clone:{method:"post",url:t.baseUrl+"integrations/sugarcrm/fields/:id/clone",params:{includeAll:"@includeAll"}}}),t.intDeskAccount=e(t.baseUrl+"integrations/desk/accounts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/desk/accounts/describe"},clone:{method:"post",url:t.baseUrl+"integrations/desk/accounts/:id/clone",params:{includeAll:"@includeAll"}},getConfigurations:{isArray:!1,method:"get",url:t.baseUrl+"integrations/desk/accounts/:id/configurations"},addConfiguration:{isArray:!1,method:"post",url:t.baseUrl+"integrations/desk/accounts/:id/configurations"},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/desk/accounts/:id/fields"}}),t.intDeskConfiguration=e(t.baseUrl+"integrations/desk/configurations/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/desk/configurations/describe"},clone:{method:"post",url:t.baseUrl+"integrations/desk/configurations/:id/clone",params:{includeAll:"@includeAll"}},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/desk/configurations/:id/fields"},getSubjects:{isArray:!1,method:"get",url:t.baseUrl+"integrations/desk/configurations/:id/subjects"},getDescriptions:{isArray:!1,method:"get",url:t.baseUrl+"integrations/desk/configurations/:id/descriptions"},getTags:{isArray:!1,method:"get",url:t.baseUrl+"integrations/desk/configurations/:id/tags"},setTags:{isArray:!0,method:"post",url:t.baseUrl+"integrations/desk/configurations/:id/tags"}}),t.intDeskField=e(t.baseUrl+"integrations/desk/fields/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/desk/fields/describe"},clone:{method:"post",url:t.baseUrl+"integrations/desk/fields/:id/clone",params:{includeAll:"@includeAll"}}}),t.intZohoAccount=e(t.baseUrl+"integrations/zoho/accounts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/zoho/accounts/describe"},clone:{method:"post",url:t.baseUrl+"integrations/zoho/accounts/:id/clone",params:{includeAll:"@includeAll"}},getConfigurations:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zoho/accounts/:id/configurations"},addConfiguration:{isArray:!1,method:"post",url:t.baseUrl+"integrations/zoho/accounts/:id/configurations"},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zoho/accounts/:id/fields"}}),t.intZohoConfiguration=e(t.baseUrl+"integrations/zoho/configurations/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/zoho/configurations/describe"},clone:{method:"post",url:t.baseUrl+"integrations/zoho/configurations/:id/clone",params:{includeAll:"@includeAll"}},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zoho/configurations/:id/fields"},getSubjects:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zoho/configurations/:id/subjects"},getDescriptions:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zoho/configurations/:id/descriptions"}}),t.intZohoField=e(t.baseUrl+"integrations/zoho/fields/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/zoho/fields/describe"},clone:{method:"post",url:t.baseUrl+"integrations/zoho/fields/:id/clone",params:{includeAll:"@includeAll"}}}),t.intZendeskAccount=e(t.baseUrl+"integrations/zendesk/accounts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/zendesk/accounts/describe"},clone:{method:"post",url:t.baseUrl+"integrations/zendesk/accounts/:id/clone",params:{includeAll:"@includeAll"}},getConfigurations:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zendesk/accounts/:id/configurations"},addConfiguration:{isArray:!1,method:"post",url:t.baseUrl+"integrations/zendesk/accounts/:id/configurations"},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zendesk/accounts/:id/fields"}}),t.intZendeskConfiguration=e(t.baseUrl+"integrations/zendesk/configurations/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/zendesk/configurations/describe"},clone:{method:"post",url:t.baseUrl+"integrations/zendesk/configurations/:id/clone",params:{includeAll:"@includeAll"}},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zendesk/configurations/:id/fields"},getSubjects:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zendesk/configurations/:id/subjects"},getDescriptions:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zendesk/configurations/:id/descriptions"},getTags:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zendesk/configurations/:id/tags"},setTags:{isArray:!0,method:"post",url:t.baseUrl+"integrations/zendesk/configurations/:id/tags"}}),t.intZendeskField=e(t.baseUrl+"integrations/zendesk/fields/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/zendesk/fields/describe"},clone:{method:"post",url:t.baseUrl+"integrations/zendesk/fields/:id/clone",params:{includeAll:"@includeAll"}}}),t.intFreshdeskAccount=e(t.baseUrl+"integrations/freshdesk/accounts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/freshdesk/accounts/describe"},clone:{method:"post",url:t.baseUrl+"integrations/freshdesk/accounts/:id/clone",params:{includeAll:"@includeAll"}},getConfigurations:{isArray:!1,method:"get",url:t.baseUrl+"integrations/freshdesk/accounts/:id/configurations"},addConfiguration:{isArray:!1,method:"post",url:t.baseUrl+"integrations/freshdesk/accounts/:id/configurations"},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/freshdesk/accounts/:id/fields"}}),t.intFreshdeskConfiguration=e(t.baseUrl+"integrations/freshdesk/configurations/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/freshdesk/configurations/describe"},clone:{method:"post",url:t.baseUrl+"integrations/freshdesk/configurations/:id/clone",params:{includeAll:"@includeAll"}},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/freshdesk/configurations/:id/fields"},getSubjects:{isArray:!1,method:"get",url:t.baseUrl+"integrations/freshdesk/configurations/:id/subjects"},getDescriptions:{isArray:!1,method:"get",url:t.baseUrl+"integrations/freshdesk/configurations/:id/descriptions"},getTags:{isArray:!1,method:"get",url:t.baseUrl+"integrations/freshdesk/configurations/:id/tags"},setTags:{isArray:!0,method:"post",url:t.baseUrl+"integrations/freshdesk/configurations/:id/tags"}}),t.intFreshdeskField=e(t.baseUrl+"integrations/freshdesk/fields/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/freshdesk/fields/describe"},clone:{method:"post",url:t.baseUrl+"integrations/freshdesk/fields/:id/clone",params:{includeAll:"@includeAll"}}}),t.network=e(t.baseUrl+"networks/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"networks/describe"},clone:{method:"post",url:t.baseUrl+"networks/:id/clone",params:{includeAll:"@includeAll"}}}),t.chatQueueReport=e(t.baseUrl+"chat/reports/queue/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/reports/queue/describe"},clone:{method:"post",url:t.baseUrl+"chat/reports/queue/:id/clone",params:{includeAll:"@includeAll"}}}),t.chatInternalMessage=e(t.baseUrl+"chat/internal/messages/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/internal/messages/describe"},clone:{method:"post",url:t.baseUrl+"chat/internal/messages/:id/clone",params:{includeAll:"@includeAll"}},getUsers:{isArray:!1,method:"get",url:t.baseUrl+"chat/internal/messages/users"}}),t.jscriptyAnswerReport=e(t.baseUrl+"jscripty/answers/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"jscripty/answers/reports/describe"},clone:{method:"post",url:t.baseUrl+"jscripty/answers/reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.jscriptyQuestionReport=e(t.baseUrl+"jscripty/questions/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"jscripty/questions/reports/describe"},clone:{method:"post",url:t.baseUrl+"jscripty/questions/reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.jscriptySessionReport=e(t.baseUrl+"jscripty/sessions/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"jscripty/sessions/reports/describe"},clone:{method:"post",url:t.baseUrl+"jscripty/sessions/reports/:id/clone",params:{includeAll:"@includeAll"}},getQuestions:{isArray:!1,method:"get",url:t.baseUrl+"jscripty/sessions/reports/:id/questions"}}),t.smsQueueReport=e(t.baseUrl+"sms/reports/queue/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"sms/reports/queue/describe"},clone:{method:"post",url:t.baseUrl+"sms/reports/queue/:id/clone",params:{includeAll:"@includeAll"}}}),t.squareReport=e(t.baseUrl+"square/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"square/reports/describe"},clone:{method:"post",url:t.baseUrl+"square/reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.squareReportDetail=e(t.baseUrl+"square/details/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"square/details/reports/describe"},clone:{method:"post",url:t.baseUrl+"square/details/reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.jscriptyProject=e(t.baseUrl+"jscripty/projects/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"jscripty/projects/describe"},clone:{method:"post",url:t.baseUrl+"jscripty/projects/:id/clone",params:{includeAll:"@includeAll"}},getSessions:{isArray:!1,method:"get",url:t.baseUrl+"jscripty/projects/:id/sessions"},getAnswers:{isArray:!1,method:"get",url:t.baseUrl+"jscripty/projects/:id/answers"},getSummary:{isArray:!1,method:"get",url:t.baseUrl+"jscripty/projects/:id/summary"}}),t.setting=e(t.baseUrl+"settings/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"settings/describe"},clone:{method:"post",url:t.baseUrl+"settings/:id/clone",params:{includeAll:"@includeAll"}},addLogo:{isArray:!1,method:"post",url:t.baseUrl+"settings/:id/logo"},addLogoLogin:{isArray:!1,method:"post",url:t.baseUrl+"settings/:id/logo_login"},getLogo:{isArray:!1,method:"get",url:t.baseUrl+"settings/:id/logo"},getLogoLogin:{isArray:!1,method:"get",url:t.baseUrl+"settings/:id/logo_login"},gdpr:{isArray:!1,method:"get",url:t.baseUrl+"settings/:id/gdpr"}}),t.squareOdbc=e(t.baseUrl+"square/odbc/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"square/odbc/describe"},clone:{method:"post",url:t.baseUrl+"square/odbc/:id/clone",params:{includeAll:"@includeAll"}},test:{isArray:!1,method:"get",url:t.baseUrl+"square/odbc/:id/test"}}),t.squareProject=e(t.baseUrl+"square/projects/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"square/projects/describe"},clone:{method:"post",url:t.baseUrl+"square/projects/:id/clone",params:{includeAll:"@includeAll"}}}),t.squareRecording=e(t.baseUrl+"square/recordings/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"square/recordings/describe"},clone:{method:"post",url:t.baseUrl+"square/recordings/:id/clone",params:{includeAll:"@includeAll"}},download:{isArray:!1,method:"get",url:t.baseUrl+"square/recordings/:id/download",responseType:"arraybuffer",cache:!1,transformResponse:function(e,t){var n=t();return{type:n["content-type"],length:n["content-length"],buffer:e}}}}),t.team=e(t.baseUrl+"teams/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"teams/describe"},clone:{method:"post",url:t.baseUrl+"teams/:id/clone",params:{includeAll:"@includeAll"}},getQueues:{isArray:!0,method:"get",url:t.baseUrl+"teams/:id/queues"},addQueues:{isArray:!0,method:"post",url:t.baseUrl+"teams/:id/queues"},removeQueues:{isArray:!1,method:"delete",url:t.baseUrl+"teams/:id/queues"},addAgents:{isArray:!0,method:"post",url:t.baseUrl+"teams/:id/users"},removeAgents:{isArray:!1,method:"delete",url:t.baseUrl+"teams/:id/users"},getAgents:{isArray:!1,method:"get",url:t.baseUrl+"teams/:id/users"}}),t.license=e(t.baseUrl+"license/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"license/describe"},clone:{method:"post",url:t.baseUrl+"license/:id/clone",params:{includeAll:"@includeAll"}}}),t.campaign=e(t.baseUrl+"campaigns/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"campaigns/describe"},clone:{method:"post",url:t.baseUrl+"campaigns/:id/clone",params:{includeAll:"@includeAll"}},getHoppers:{isArray:!1,method:"get",url:t.baseUrl+"campaigns/:id/hoppers"},getHopperHistories:{isArray:!1,method:"get",url:t.baseUrl+"campaigns/:id/hopper_histories"},getHopperFinals:{isArray:!1,method:"get",url:t.baseUrl+"campaigns/:id/hopper_finals"},getHopperBlacks:{isArray:!1,method:"get",url:t.baseUrl+"campaigns/:id/hopper_black"},getLists:{isArray:!1,method:"get",url:t.baseUrl+"campaigns/:id/lists"},addLists:{isArray:!0,method:"post",url:t.baseUrl+"campaigns/:id/lists"},removeLists:{isArray:!0,method:"delete",url:t.baseUrl+"campaigns/:id/lists"},getBlackLists:{isArray:!1,method:"get",url:t.baseUrl+"campaigns/:id/blacklists"},addBlackLists:{isArray:!0,method:"post",url:t.baseUrl+"campaigns/:id/blacklists"},removeBlackLists:{isArray:!0,method:"delete",url:t.baseUrl+"campaigns/:id/blacklists"}}),t.migration=e(t.baseUrl+"migrations/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"migrations/describe"},clone:{method:"post",url:t.baseUrl+"migrations/:id/clone",params:{includeAll:"@includeAll"}}}),t.attachment=e(t.baseUrl+"attachments/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"attachments/describe"},clone:{method:"post",url:t.baseUrl+"attachments/:id/clone",params:{includeAll:"@includeAll"}},download:{isArray:!1,method:"get",url:t.baseUrl+"attachments/:id/download",responseType:"arraybuffer",cache:!1,transformResponse:function(e,t){var n=t();return{type:n["content-type"],length:n["content-length"],buffer:e}}}}),t}e.$inject=["$resource"],angular.module("motion").factory("api",e)}(),function(){"use strict";function e(e,t){t.setConfig({position:"top-right",sound:!1,html:!0,theme:"material"}),e.useLoader("$translatePartialLoader",{urlTemplate:"{part}/i18n/{lang}.json"}),e.preferredLanguage("en"),e.useSanitizeValueStrategy(null)}e.$inject=["$translateProvider","toastyConfigProvider"],angular.module("motion").config(e)}(),function(){"use strict";angular.module("motion")}(),function(){"use strict";function e(e,t,n){this.themes=e.themes;var a=n.get("motion.language");a&&t.use(a)}e.$inject=["motionTheming","$translate","$cookies"],angular.module("motion").controller("IndexController",e)}(),function(){"use strict";function e(a,i){return function(e){var t=new Date,n=new Date(e);return n.getDate()===t.getDate()&&n.getMonth()===t.getMonth()&&n.getFullYear()===t.getFullYear()?a("date")(n.getTime(),"shortTime"):n.getDate()===t.getDate()-1&&n.getMonth()===t.getMonth()&&n.getFullYear()===t.getFullYear()?i.instant("DASHBOARDS.YESTERDAY")+" "+a("date")(n.getTime(),"shortTime"):a("date")(n.getTime(),"MMM d, y h:mm a")}}function t(e){return{Today:e.instant("DASHBOARDS.TODAY"),Yesterday:e.instant("DASHBOARDS.YESTERDAY"),"This Week":e.instant("DASHBOARDS.THIS_WEEK"),"Last Week":e.instant("DASHBOARDS.LAST_WEEK"),"This Month":e.instant("DASHBOARDS.THIS_MONTH"),"Last Month":e.instant("DASHBOARDS.LAST_MONTH"),"This Year":e.instant("DASHBOARDS.THIS_YEAR"),"Last Year":e.instant("DASHBOARDS.LAST_YEAR"),January:e.instant("DASHBOARDS.JANUARY"),February:e.instant("DASHBOARDS.FEBRUARY"),March:e.instant("DASHBOARDS.MARCH"),April:e.instant("DASHBOARDS.APRIL"),May:e.instant("DASHBOARDS.MAY"),June:e.instant("DASHBOARDS.JUNE"),July:e.instant("DASHBOARDS.JULY"),August:e.instant("DASHBOARDS.AUGUST"),September:e.instant("DASHBOARDS.SEPTEMBER"),October:e.instant("DASHBOARDS.OCTOBER"),November:e.instant("DASHBOARDS.NOVEMBER"),December:e.instant("DASHBOARDS.DECEMBER"),Mon:e.instant("DASHBOARDS.MON"),Tue:e.instant("DASHBOARDS.TUE"),Wed:e.instant("DASHBOARDS.WED"),Thu:e.instant("DASHBOARDS.THU"),Fri:e.instant("DASHBOARDS.FRI"),Sat:e.instant("DASHBOARDS.SAT"),Sun:e.instant("DASHBOARDS.SUN")}}e.$inject=["$filter","$translate"],t.$inject=["$translate"],angular.module("motion").filter("limitObjectFromTo",function(){return function(e,t,n){var a,i={},o=0;for(a in e)if(n<=o&&(i[a]=e[a]),++o===n+t)break;return i}}).filter("formatdate",e).factory("IndexFactory",function(){var e=[{value:"jan"},{value:"feb"},{value:"mar"},{value:"apr"},{value:"may"},{value:"jun"},{value:"jul"},{value:"aug"},{value:"sep"},{value:"oct"},{value:"nov"},{value:"dec"}],t=[{value:"1"},{value:"2"},{value:"3"},{value:"4"},{value:"5"},{value:"6"},{value:"7"},{value:"8"},{value:"9"},{value:"10"},{value:"11"},{value:"12"}],n=[{value:"mon"},{value:"tue"},{value:"wed"},{value:"thu"},{value:"fri"},{value:"sat"},{value:"sun"}],a=[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];return{getMonthName:function(){return e},getMonthNumber:function(){return t},getDaysOfWeek:function(){return n},getDaysOfMonth:function(){return a}}}).factory("dateFilterLocalizationFactory",t).factory("Sequence",function(){return{enqueue:function(e){this.tail=this.tail?this.tail.finally(e):e()}}})}(),function(){"use strict";function e(e,t,n){var a;n.html5Mode(!0),t.otherwise("/dashboards/general"),angular.injector(["ngCookies"]).invoke(["$cookies",function(e){a=e}]);var i=a.get("motion.layoutStyle")||"verticalNavigation",o={verticalNavigation:{main:"app/core/layouts/vertical-navigation.html",toolbar:"app/toolbar/layouts/vertical-navigation/toolbar.html",navigation:"app/navigation/layouts/vertical-navigation/navigation.html",header:"app/header/layouts/vertical-navigation/header.html",footer:"app/footer/layouts/vertical-navigation/footer.html"},verticalNavigationFullwidthToolbar:{main:"app/core/layouts/vertical-navigation-fullwidth-toolbar.html",toolbar:"app/toolbar/layouts/vertical-navigation-fullwidth-toolbar/toolbar.html",navigation:"app/navigation/layouts/vertical-navigation/navigation.html"},verticalNavigationFullwidthToolbar2:{main:"app/core/layouts/vertical-navigation-fullwidth-toolbar-2.html",toolbar:"app/toolbar/layouts/vertical-navigation-fullwidth-toolbar-2/toolbar.html",navigation:"app/navigation/layouts/vertical-navigation-fullwidth-toolbar-2/navigation.html"},horizontalNavigation:{main:"app/core/layouts/horizontal-navigation.html",toolbar:"app/toolbar/layouts/horizontal-navigation/toolbar.html",navigation:"app/navigation/layouts/horizontal-navigation/navigation.html"},contentOnly:{main:"app/core/layouts/content-only.html",toolbar:"",navigation:""},contentWithToolbar:{main:"app/core/layouts/content-with-toolbar.html",toolbar:"app/toolbar/layouts/content-with-toolbar/toolbar.html",navigation:""}};e.state("app",{abstract:!0,views:{"main@":{templateUrl:o[i].main,controller:"MainController as vm"},"toolbar@app":{templateUrl:o[i].toolbar,controller:"ToolbarController as vm"},"navigation@app":{templateUrl:o[i].navigation,controller:"NavigationController as vm"},"quickPanel@app":{templateUrl:"app/quick-panel/quick-panel.html",controller:"QuickPanelController as vm"},"header@app":{templateUrl:o[i].header,controller:"HeaderController as vm"},"footer@app":{templateUrl:o[i].footer,controller:"FooterController as vm"}},resolve:{license:["apiResolver",function(e){return e.resolve("license@get")}],setting:["apiResolver",function(e){return e.resolve("setting@get",{id:1})}]}})}e.$inject=["$stateProvider","$urlRouterProvider","$locationProvider"],angular.module("motion").config(e)}(),function(){"use strict";function e(e,t,n){var a=e.$on("$stateChangeStart",function(){e.loadingProgress=!0}),i=e.$on("$stateChangeSuccess",function(){t(function(){e.loadingProgress=!1})});e.state=n,e.$on("$destroy",function(){a(),i()})}e.$inject=["$rootScope","$timeout","$state"],angular.module("motion").run(e)}(),function(){"use strict";function e(a,e){var i;function o(){i=io({query:"id="+e.getCurrentUser().id,transports:["websocket","polling"]})}return{connect:o,on:function(e,t){t=t||angular.noop,i||o(),i.on(e,function(){var e=arguments;a.$apply(function(){t.apply(i,e)})})},onWithoutApply:function(e,t){t=t||angular.noop,i||o(),i.on(e,function(){t.apply(i,arguments)})},emit:function(e,t,n){n=n||angular.noop,i||o(),i.emit(e,t,function(){var e=arguments;a.$apply(function(){n.apply(i,e)})})},removeAllListeners:function(e){i||o(),i.removeAllListeners(e)},removeListener:function(e,t){i||o(),i.removeListener(e,t)},disconnect:function(){i||o(),i.disconnect()}}}e.$inject=["$rootScope","Auth"],angular.module("motion").factory("socket",e)}(),function(){"use strict";function e(t,n,e,a,i,o){var s=this;s.progresslogin=!1,s.login=function(){return s.progresslogin=!0,o.login(s.form).then(function(){return t.go("app.dashboards.general")}).catch(function(e){s.message=e.message}).finally(function(){s.progresslogin=!1})},s.loginOauth=function(e){n.location.href="/api/auth/"+e},s.onInit=function(){{if(t.params.token&&t.params.userId)return o.removeCookies(),s.progresslogin=!0,e.put("motion.token",t.params.token),i.user.get({id:t.params.userId}).$promise.then(function(e){e&&(o.updateCurrentUser(e),t.go("app.dashboards.general"))}).finally(function(){s.progresslogin=!1});o.isLoggedIn()&&t.go("app.dashboards.general")}},s.onInit()}e.$inject=["$state","$window","$cookies","$timeout","api","Auth"],angular.module("app.login").controller("LoginController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="ANALYTICS.EDIT_EXTRACTEDREPORT",m.extractedReport=angular.copy(s),m.extractedReports=o,m.newExtractedReport=!1,m.extractedReport||(m.extractedReport={},m.title="ANALYTICS.NEW_EXTRACTEDREPORT",m.newExtractedReport=!0),m.addNewExtractedReport=function(){m.errors=[],r.analyticExtractedReport.save(m.extractedReport).$promise.then(function(e){m.extractedReports.unshift(e.toJSON()),i.success({title:"ExtractedReport properly created",msg:m.extractedReport.name?m.extractedReport.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.analyticExtractedReport.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.analyticExtractedReport.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveExtractedReport=function(){m.errors=[],r.analyticExtractedReport.update({id:m.extractedReport.id},m.extractedReport).$promise.then(function(e){var t=_.find(m.extractedReports,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"ExtractedReport properly saved!",msg:m.extractedReport.name?m.extractedReport.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.analyticExtractedReport.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.analyticExtractedReport.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteExtractedReport=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The extractedReport will be deleted.").ariaLabel("Delete ExtractedReport").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.analyticExtractedReport.delete({id:m.extractedReport.id}).$promise.then(function(){_.remove(m.extractedReports,{id:m.extractedReport.id}),i.success({title:"ExtractedReport properly deleted!",msg:(m.extractedReport.name||"extractedReport")+" has been deleted!"}),u(m.extractedReport)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.analyticExtractedReport.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.analyticExtractedReport.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","extractedReports","extractedReport","api","Auth","license","setting"],angular.module("app.analytics").controller("CreateOrEditExtractedReportDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.extractedReports=r||{count:0,rows:[]},v.table="extractedReports",v.listOrder="",v.listOrderAsc=null,v.selectedExtractedReports=[],v.query={fields:"createdAt,updatedAt,id,name,basename,savename,type,startDate,endDate,createdAt,status,output",sort:"-updatedAt",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditExtractedReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/extractedReports/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{extractedReport:e,extractedReports:v.extractedReports.rows,license:v.license,setting:null}})},v.downloadfile2=function(o,e){return l.analyticExtractedReport.download({id:o.id}).$promise.then(function(e){var t=[e.buffer],n="download",a=new Blob(t,{type:e.type});n=o.savename;var i=window.document.createElement("a");i.setAttribute("href",URL.createObjectURL(a)),i.setAttribute("download",n),i.click()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.analyticExtractedReport.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the extractedReport?").htmlContent("<b>"+(e.name||"extractedReport")+"</b> will be deleted.").ariaLabel("delete extractedReport").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getExtractedReports=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.analyticExtractedReport.get(v.query,f).$promise},v.createOrEditExtractedReport=function(e,t){i.show({controller:"CreateOrEditExtractedReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/extractedReports/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{extractedReport:t,extractedReports:v.extractedReports.rows,license:v.license,setting:v.setting}})},v.deleteExtractedReport=A,v.exportSelectedExtractedReports=function(){var e=angular.copy(v.selectedExtractedReports);return v.selectedExtractedReports=[],e},v.deleteSelectedExtractedReports=function(e){var t=i.confirm().title("Are you sure want to delete the selected extractedReports?").htmlContent("<b>"+v.selectedExtractedReports.length+" selected</b> will be deleted.").ariaLabel("delete ExtractedReports").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedExtractedReports.forEach(function(e){A(e)}),v.selectedExtractedReports=[]})},v.deselectExtractedReports=function(){v.selectedExtractedReports=[]},v.selectAllExtractedReports=function(){v.selectedExtractedReports=v.extractedReports.rows};var h=!0,b=1;function f(e){v.extractedReports=e||{count:0,rows:[]}}function A(e){l.analyticExtractedReport.delete({id:e.id}).$promise.then(function(){_.remove(v.extractedReports.rows,{id:e.id}),v.extractedReports.count-=1,v.extractedReports.rows.length||v.getExtractedReports(),c.success({title:"ExtractedReport deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEanalyticExtractedReport"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEanalyticExtractedReport",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getExtractedReports())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","extractedReports","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.analytics").controller("ExtractedReportsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="ANALYTICS.EDIT_METRIC",m.metric=angular.copy(s),m.metrics=o,m.newMetric=!1,m.metric||(m.metric={table:"report_agent"},m.title="ANALYTICS.NEW_METRIC",m.newMetric=!0),m.addNewMetric=function(){m.errors=[],r.analyticMetric.save(m.metric).$promise.then(function(e){m.metrics.unshift(e.toJSON()),i.success({title:"Metric properly created",msg:m.metric.name?m.metric.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.analyticMetric.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.analyticMetric.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveMetric=function(){m.errors=[],r.analyticMetric.update({id:m.metric.id},m.metric).$promise.then(function(e){var t=_.find(m.metrics,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Metric properly saved!",msg:m.metric.name?m.metric.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.analyticMetric.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.analyticMetric.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteMetric=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The metric will be deleted.").ariaLabel("Delete Metric").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.analyticMetric.delete({id:m.metric.id}).$promise.then(function(){_.remove(m.metrics,{id:m.metric.id}),i.success({title:"Metric properly deleted!",msg:(m.metric.name||"metric")+" has been deleted!"}),u(m.metric)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.analyticMetric.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.analyticMetric.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","metrics","metric","api","Auth","license","setting"],angular.module("app.analytics").controller("CreateOrEditMetricDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.metrics=r||{count:0,rows:[]},v.table="metrics",v.listOrder="",v.listOrderAsc=null,v.selectedMetrics=[],v.query={fields:"createdAt,updatedAt,id,name,table,metric,description",sort:"-updatedAt",limit:10,page:1},v.arraytable=_.keyBy([{option:"Agent Report",value:"'report_agent'"},{option:"Call Report",value:"'report_call'"},{option:"Contacts",value:"'cm_contacts'"},{option:"CSquare Report",value:"'report_square'"},{option:"CSquare Details Report",value:"'report_square_details'"},{option:"Dialer Hopper Processing",value:"'cm_hopper'"},{option:"Dialer Hopper Logs",value:"'cm_hopper_history'"},{option:"Dialer Hopper Final",value:"'cm_hopper_final'"},{option:"Integration Report",value:"'report_integration'"},{option:"Jscripty Sessions",value:"'report_jscripty_sessions'"},{option:"Jscripty Questions",value:"'report_jscripty_questions'"},{option:"Jscripty Answers",value:"'report_jscripty_answers'"},{option:"Member Report",value:"'report_member'"},{option:"Queue Report",value:"'report_queue'"},{option:"Users",value:"'users'"},{option:"Voice Recordings",value:"'voice_recordings'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editdialog=function(e,t){i.show({controller:"CreateOrEditMetricDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/metrics/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{metric:e,metrics:v.metrics.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the metric?").htmlContent("<b>"+(e.name||"metric")+"</b> will be deleted.").ariaLabel("delete metric").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getMetrics=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.analyticMetric.get(v.query,f).$promise},v.createOrEditMetric=function(e,t){i.show({controller:"CreateOrEditMetricDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/metrics/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{metric:t,metrics:v.metrics.rows,license:v.license,setting:v.setting}})},v.deleteMetric=A,v.exportSelectedMetrics=function(){var e=angular.copy(v.selectedMetrics);return v.selectedMetrics=[],e},v.deleteSelectedMetrics=function(e){var t=i.confirm().title("Are you sure want to delete the selected metrics?").htmlContent("<b>"+v.selectedMetrics.length+" selected</b> will be deleted.").ariaLabel("delete Metrics").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedMetrics.forEach(function(e){A(e)}),v.selectedMetrics=[]})},v.deselectMetrics=function(){v.selectedMetrics=[]},v.selectAllMetrics=function(){v.selectedMetrics=v.metrics.rows};var h=!0,b=1;function f(e){v.metrics=e||{count:0,rows:[]}}function A(e){l.analyticMetric.delete({id:e.id}).$promise.then(function(){_.remove(v.metrics.rows,{id:e.id}),v.metrics.count-=1,v.metrics.rows.length||v.getMetrics(),c.success({title:"Metric deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEanalyticMetric"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEanalyticMetric",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getMetrics())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","metrics","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.analytics").controller("MetricsController",e)}(),function(){"use strict";function e(e,t,a,n,i,o,s){var r=this;function l(){t.hide()}r.errors=[],r.report=angular.copy(n),r.report.name+="-copy",r.treeCustomData=s,r.treeCustomConfig={core:{multiple:!1,animation:!0,error:function(e){console.error("treeCtrl: error from js tree - "+angular.toJson(e))},check_callback:!0,worker:!0},version:1,plugins:["wholerow"]},r.treeCustomEvents={select_node:function(e,t){r.currentNode=t.node}},r.copyReport=function(){var n;r.errors=[],i.analyticCustomReport.save({name:r.report.name,description:r.report.description,table:r.report.table,conditions:r.report.conditions,joins:r.report.joins,parent:r.currentNode.id}).$promise.then(function(e){n=e,a.success({title:"Report properly copied!",msg:r.report.name?r.report.name+" has been copied!":""});var t={fields:"field,alias,function,format,groupBy,orderBy,custom,MetricId",nolimit:!0};return t["analyticCustomReport"===o?"CustomReportId":"DefaultReportId"]=r.report.id,i.analyticFieldReport.get(t).$promise}).then(function(e){var e=_.map(e.rows,function(e){return _.extend({},e,{CustomReportId:n.id})});return i.analyticFieldReport.bulkCreate(e).$promise}).then(function(){a.success({title:"Fields copied!",msg:"Fields has been copied!"}),l()}).catch(function(e){a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:COPYREPORT",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},r.closeDialog=l}e.$inject=["$location","$mdDialog","toasty","report","api","apiName","treeCustomData"],angular.module("app.analytics").controller("CopyReportDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l){var d=this;function c(){t.hide()}d.errors=[],d.joinTables=[],d.title="ANALYTICS.EDIT_REPORT",d.report=angular.copy(i),d.reports=a,d.newReport=!1,d.tables=l.getMap(),d.joinTypes=[{key:"join",value:"Join"},{key:"left_join",value:"Left Join"},{key:"right_join",value:"Right Join"},{key:"outer_join",value:"Outer Join"},{key:"cross_join",value:"Cross Join"}],d.report||(d.report={name:"",table:"report_agent",description:"",parent:r.id},d.title="ANALYTICS.NEW_REPORT",d.newReport=!0),d.addNewReport=function(){d.errors=[],d.report.joins=_.map(d.joinTables||[],function(e){return{parentKey:e.parentKey,foreignTable:e.name,foreignKey:e.foreignKey,type:e.type.toLowerCase()}}),d.report.joins=JSON.stringify(d.report.joins),o[s].save(d.report).$promise.then(function(e){d.reports.unshift(e),n.success({title:"Report properly created",msg:d.report.name?d.report.name+" has been created!":""}),c()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){d.errors=e.data.errors||[{message:e.toString(),type:"api.analyticReport.save"}];for(var t=0;t<e.data.errors.length;t++)n.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.analyticReport.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},d.saveReport=function(){d.errors=[],o[s].update({id:d.report.id},d.report).$promise.then(function(e){var t=_.find(d.reports,{id:e.id});t&&_.merge(t,e),n.success({title:"Report properly saved!",msg:d.report.name?d.report.name+" has been saved!":""}),c()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){d.errors=e.data.errors||[{message:e.toString(),type:"api.analyticReport.update"}];for(var t=0;t<e.data.errors.length;t++)n.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.analyticReport.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},d.deleteReport=function(){d.errors=[];var e=t.confirm().title("Are you sure?").content("The report will be deleted.").ariaLabel("Delete Report").ok("Delete").cancel("Cancel").targetEvent(event);t.show(e).then(function(){o[s].delete({id:d.report.id}).$promise.then(function(){_.remove(d.reports,{id:d.report.id}),n.success({title:"Report properly deleted!",msg:d.report.name?d.report.name+" has been deleted!":""}),c()}).catch(function(e){d.errors=e.data.errors||[{message:e.toString(),type:"api.analyticReport.delete"}]})},function(){})},d.closeDialog=c,d.selectedTableChange=function(e){e&&(delete d.selectedItem,d.joinTables.push(e))},d.removeJoin=function(e){d.joinTables.splice(e,1)},d.getFields=function(t,n,e){var a=_.find(d.tables,{name:e});a&&a.api&&o[a.api].describe().$promise.then(function(e){t[n]=_.difference(_.keys(e),["$promise","$resolved"])}).catch(function(e){console.error(e)})}}e.$inject=["$location","$mdDialog","toasty","reports","report","api","apiName","currentNode","describeTable"],angular.module("app.analytics").controller("CreateOrEditReportDialogController",e)}(),function(){"use strict";function e(i,a,o,e){var s=this;s.report={},s.conditions=e.getConditions,s.init=function(e){s.report=e,s.report.condition=angular.fromJson(e.conditions)||{group:{operator:"AND",rules:[]}};for(var t=0;t<s.report.condition.group.rules.length;t++)if(s.report.condition.group.rules[t].field){var n=s.report.condition.group.rules[t].field.split(".");1===n.length&&(s.report.condition.group.rules[t].field=s.report.table+"."+s.report.condition.group.rules[t].field)}a.getColumns(s.report.table).then(function(e){s.columns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt"])}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DESCRIBE",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.addCondition=function(e){e.unshift({condition:"=",field:"",value:""})},s.addGroup=function(e){e.push({group:{operator:"AND",rules:[]}})},s.deleteConfirm=function(e,t,n){var a=i.confirm().title("Are you sure want to delete the item?").htmlContent("The item will be deleted.").ariaLabel("delete item").targetEvent(n).ok("OK").cancel("CANCEL");i.show(a).then(function(){e.splice(t,1)},function(){console.log("CANCEL")})},s.isValueByCondition=function(e){return!_.includes(["IS NULL","IS NOT NULL","IS EMPTY","IS NOT EMPTY"],e)}}e.$inject=["$mdDialog","describeTable","toasty","sqlUtil"],angular.module("app.analytics").controller("ReportConditionsController",e)}(),function(){"use strict";function e(t){var a={cm_contacts:"cmContact",cm_hopper:"cmHopper",cm_hopper_final:"cmHopperFinal",cm_hopper_history:"cmHopperHistory",chat_websites:"chatWebsite",chat_queues:"chatQueue",chat_interactions:"chatInteraction",chat_messages:"chatMessage",chat_offline_messages:"chatOfflineMessage",report_chat_queue:"chatQueueReport",mail_accounts:"mailAccount",mail_queues:"mailQueue",mail_interactions:"mailInteraction",mail_messages:"mailMessage",report_mail_queue:"mailQueueReport",openchannel_accounts:"openchannelAccount",openchannel_queues:"openchannelQueue",openchannel_interactions:"openchannelInteraction",openchannel_messages:"openchannelMessage",report_openchannel_queue:"openchannelQueueReport",sms_accounts:"smsAccount",sms_queues:"smsQueue",sms_interactions:"smsInteraction",sms_messages:"smsMessage",report_sms_queue:"smsQueueReport",fax_accounts:"faxAccount",fax_queues:"faxQueue",fax_interactions:"faxInteraction",fax_messages:"faxMessage",report_fax_queue:"faxQueueReport",report_call:"voiceCallReport",report_agent:"voiceAgentReport",report_square:"squareReport",report_member:"memberReport",report_queue:"voiceQueueReport",report_square_details:"squareReportDetail",report_jscripty_sessions:"jscriptySessionReport",report_jscripty_questions:"jscriptyQuestionReport",report_jscripty_answers:"jscriptyAnswerReport",users:"user",voice_recordings:"voiceRecording"};return{getMap:function(){var n=[];return _.forIn(a,function(e,t){n.push({name:t,api:e})}),n},getColumns:function(e){return t[a[e]].describe().$promise}}}e.$inject=["api"],angular.module("app.analytics").factory("describeTable",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;(m.errors=[],m.title="Edit Report Field",m.report=i,m.reportField=angular.copy(s),m.reportFields=o,m.metrics=r,m.columns=l,m.sqlUtil=d,m.newReportField=!1,m.reportField)?(m.reportField.type=m.reportField.custom?"custom":m.reportField.MetricId?"metric":"column",m.reportField.field&&!m.reportField.custom&&_.isNil(m.reportField.MetricId)&&1===m.reportField.field.split(".").length&&(m.reportField.field=m.report.table+"."+m.reportField.field)):(m.reportField={type:"column",function:null,format:null,groupBy:!1,orderBy:null},m.title="New Report Field",m.newReportField=!0);function u(){n.hide()}m.addNewReportField=function(){m.errors=[],m.reportField.custom="custom"===m.reportField.type,m.reportField.MetricId="metric"===m.reportField.type?m.reportField.MetricId:null,m.reportField.CustomReportId=m.report.id,c.analyticFieldReport.save(m.reportField).$promise.then(function(e){m.reportFields.push(e),a.success({title:"Report field properly created",msg:m.reportField.field?m.reportField.field+" has been created!":m.reportField.type+" has been created!"}),u()}).catch(function(e){m.errors=e.data.errors||[{message:e.toString(),type:"api.analyticFieldReport.save"}]})},m.saveReportField=function(){m.errors=[],m.reportField.custom="custom"===m.reportField.type,m.reportField.MetricId="metric"===m.reportField.type?m.reportField.MetricId:null,c.analyticFieldReport.update({id:m.reportField.id},m.reportField).$promise.then(function(e){var t=_.find(m.reportFields,{id:e.id});t&&_.merge(t,e),a.success({title:"Report Field properly saved!",msg:m.reportField.field?m.reportField.field+" has been saved!":""}),u()}).catch(function(e){m.errors=e.data.errors||[{message:e.toString(),type:"api.analyticFieldReport.update"}]})},m.deleteReportField=function(e){m.errors=[];var t=n.confirm().title("Are you sure?").content("The field will be deleted.").ariaLabel("Delete Report").ok("Delete").cancel("Cancel").targetEvent(e);n.show(t).then(function(){c.analyticFieldReport.delete({id:m.reportField.id}).$promise.then(function(){_.remove(m.reportFields,{id:m.reportField.id}),a.success({title:"Report Field properly deleted!",msg:m.reportField.field?m.reportField.field+" has been deleted!":""}),u()}).catch(function(e){m.errors=e.data.errors||[{message:e.toString(),type:"api.analyticReportField.delete"}]})},function(){})},m.closeDialog=u}e.$inject=["$scope","$location","$mdDialog","toasty","report","reportFields","reportField","metrics","columns","sqlUtil","api"],angular.module("app.analytics").controller("CreateOrEditReportFieldDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.report={},c.reportFields={count:0,rows:[]},c.functions=_.keyBy(l.getFunctions,"value"),c.formats=_.keyBy(l.getFormats,"value"),c.groupBy=_.keyBy(l.getGroupBy,"value"),c.orderBy=_.keyBy(l.getOrderBy,"value"),c.selectedReportFields=[],c.query={fields:"createdAt,updatedAt,id,field,alias,function,format,groupBy,orderBy,custom,MetricId",nolimit:!0},c.sortableTable={animation:100,onSort:function(e){s.analyticFieldReport.addFields({id:c.report.id},e.models).$promise.then(function(e){c.reportFields.rows=e}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:ADDFIELDS"})})}},c.init=function(e){c.report=e,c.query.CustomReportId=c.report.id,r.getColumns(c.report.table).then(function(e){return c.columns=_.difference(_.keys(e),["$promise","$resolved"]),s.analyticMetric.get({fields:"id,name,metric,table",nolimit:!0}).$promise}).then(function(e){c.metrics=e.rows}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DESCRIBE",msg:e.data?JSON.stringify(e.data):e.toString()})}),c.getReportFields()},c.deleteConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the field?").htmlContent("<b>"+e.field+"</b> will be deleted.").ariaLabel("delete field").targetEvent(t).ok("OK").cancel("CANCEL");a.show(n).then(function(){p(e)},function(){console.log("CANCEL")})},c.success=u,c.getReportFields=function(){c.promise=s.analyticFieldReport.get(c.query,u).$promise},c.createOrEditReportField=function(e,t){a.show({controller:"CreateOrEditReportFieldDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/edit/field/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{report:c.report,reportField:t,reportFields:c.reportFields.rows,metrics:c.metrics,columns:c.columns,setting:null}})},c.deleteReportField=p,c.deleteSelectedReportFields=function(e){var t=a.confirm().title("Are you sure want to delete the selected fields?").htmlContent("<b>"+c.selectedReportFields.length+" selected</b> will be deleted.").ariaLabel("delete fields").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){c.selectedReportFields.forEach(function(e){p(e)}),c.selectedReportFields=[]})},c.getMetricName=function(e){var t=_.find(c.metrics,{id:e});return t?t.name:d.instant("ANALYTICS.NO_METRIC_FOUND")},c.getMetricValue=function(e){var t=_.find(c.metrics,{id:e});return t?t.metric:d.instant("ANALYTICS.NO_METRIC_FOUND")};var m=!0;function u(e){c.reportFields=e||{count:0,rows:[]}}function p(e){s.analyticFieldReport.delete({id:e.id}).$promise.then(function(){c.selectedReportFields=[],_.remove(c.reportFields.rows,{id:e.id}),c.reportFields.count-=1,c.reportFields.rows.length||c.getReportFields(),o.success({title:"Field deleted!",msg:e.field?e.field+" has been deleted!":""})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}t.$watch("vm_rf.query.filter",function(e,t){m?n(function(){m=!1}):c.getReportFields()})}e.$inject=["$cookies","$scope","$timeout","$mdDialog","$document","toasty","api","describeTable","sqlUtil","$translate"],angular.module("app.analytics").controller("ReportFieldsController",e)}(),function(){"use strict";angular.module("app.analytics").factory("sqlUtil",function(){return{getFunctions:[{value:"SUM",option:function(e){return"SUM ("+e+")"}},{value:"COUNT",option:function(e){return"COUNT ("+e+")"}},{value:"COUNT DISTINCT",option:function(e){return"COUNT (DISTINCT "+e+")"}},{value:"MAX",option:function(e){return"MAX ("+e+")"}},{value:"MIN",option:function(e){return"MIN ("+e+")"}},{value:"AVG",option:function(e){return"AVG ("+e+")"}},{value:"GROUP_CONCAT",option:function(e){return"GROUP_CONCAT ("+e+")"}},{value:"GROUP_CONCAT ASC",option:function(e){return"GROUP_CONCAT ("+e+" ORDER BY "+e+" ASC)"}},{value:"GROUP_CONCAT DESC",option:function(e){return"GROUP_CONCAT ("+e+" ORDER BY "+e+" DESC)"}}],getFormats:[{value:"SEC_TO_TIME",option:function(e){return"SEC_TO_TIME ("+e+")"}},{value:"DATE",option:function(e){return"DATE ("+e+")"}},{value:"HOUR",option:function(e){return"HOUR ("+e+")"}},{value:"ROUND",option:function(e){return"ROUND ("+e+")"}},{value:"UNIX_TIMESTAMP",option:function(e){return"UNIX_TIMESTAMP ("+e+")"}}],getGroupBy:[{value:!1,option:function(){return"No"}},{value:!0,option:function(e){return"GROUP BY "+e}}],getOrderBy:[{value:"ASC",option:function(e){return"ORDER BY "+e+" ASC"}},{value:"DESC",option:function(e){return"ORDER BY "+e+" DESC"}}],getConditions:["=","!=","<","<=",">",">=","LIKE","NOT LIKE","IS NULL","IS NOT NULL","IS EMPTY","IS NOT EMPTY"]}})}(),function(){"use strict";function e(e,t,n,a){var i=this;function o(e){return _.isArray(e)}i.report=a||{},i.selectedTab=e.params.tab||0,i.gotoReports=function(){e.go("app.analytics.reports")},i.saveReport=function(){i.report.conditions=angular.toJson(i.report.condition),n.analyticCustomReport.update({id:i.report.id},_.omit(i.report,"joins")).$promise.then(function(){t.success({title:"Report updated!",msg:i.report.name?i.report.name+" has been updated!":""})}).catch(function(e){t.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETreport",msg:e.data?JSON.stringify(e.data):e.toString()})})},i.previewReport=function(){i.columns=[],i.rows=[],i.error=!1,n.analyticFieldReport.get({fields:"field,alias",nolimit:!0,CustomReportId:i.report.id}).$promise.then(function(e){return i.columns=e?e.rows:[],n.analyticCustomReport.preview({id:i.report.id}).$promise}).then(function(e){i.rows=e}).catch(function(e){console.log(e),i.error={title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:analyticFieldReport",msg:e.data?e.data.message:e.toString(),sql:e.data&&e.data.parent?e.data.parent.sql:"NO QUERY"},t.error(i.error)})},i.queryReport=function(){return i.queryResult="Loading...",n.analyticCustomReport.query({id:i.report.id}).$promise.then(function(e){i.queryResult=e.sql}).catch(function(e){i.queryResult="",console.log(e),i.error={title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:analyticFieldReport",msg:e.data?e.data.message:e.toString(),sql:e.data&&e.data.parent?e.data.parent.sql:"NO QUERY"},t.error(i.error)})},i.mapArray=function(e,t){if(o(e))return _.map(e,t).join(",");return""},i.isArray=o,i.valueReplacer=function(e,t){moment(t,"YYYY-MM-DDTHH:mm:ssZ",!0).isValid()&&(t=moment(t,"").format("YYYY-MM-DD HH:mm:ss"));return t}}e.$inject=["$state","toasty","api","report"],angular.module("app.analytics").controller("ReportController",e)}(),function(){"use strict";function e(e,t,n,a,i,o){var s=this;s.errors=[],s.report=angular.copy(a),s.valueReplacer=function(e,t){moment(t,"YYYY-MM-DDTHH:mm:ssZ",!0).isValid()&&(t=moment(t,"").format("YYYY-MM-DD HH:mm:ss"));return t},s.closeDialog=function(){t.hide()},function(){s.columns=[],s.rows=[],s.error=!1;var e={fields:"field,alias",nolimit:!0};e["analyticCustomReport"===o?"CustomReportId":"DefaultReportId"]=s.report.id,s.promise=i.analyticFieldReport.get(e).$promise.then(function(e){return s.columns=e?e.rows:[],i[o].preview({id:s.report.id}).$promise}).then(function(e){s.rows=e}).catch(function(e){console.log(e),s.error={title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:analyticFieldReport",msg:e.data?e.data.message:e.toString(),sql:e.data&&e.data.parent?e.data.parent.sql:"NO QUERY"},n.error(s.error)})}()}e.$inject=["$location","$mdDialog","toasty","report","api","apiName"],angular.module("app.analytics").controller("PreviewReportDialogController",e)}(),function(){"use strict";function e(e,n,a,i,o,s,t,r,l,d,c){var m=this;m.currentUser=c.getCurrentUser(),m.reports={count:0,rows:[]},m.selectedReports=[],m.query={fields:"createdAt,updatedAt,id,name,description,table,parent,conditions,joins",limit:10,page:1,sort:"-updatedAt"},m.apiName=null,m.currentPath="",m.customTree=!0,m.editstate=function(e,t){o.go("app.analytics.reports.edit",{id:e.id})},m.copydialog=function(e,t){i.show({controller:"CopyReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/copy/dialog.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{report:e,apiName:m.apiName,treeCustomData:m.treeCustomInstance.jstree(!0).get_json("#")}}).finally(function(){})},m.previewdialog=function(e,t){i.show({controller:"PreviewReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/preview/dialog.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{report:e,apiName:m.apiName}})},m.rundialog=function(e,t){i.show({controller:"RunReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/run/dialog.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{report:e,apiName:m.apiName,currentPath:m.currentPath}})},m.downloadfile=function(a,e){var i;r.analyticMetric.get({fields:"id,name,metric,table",nolimit:!0}).$promise.then(function(e){i=_.keyBy(e.rows,"id");var t={fields:"field,alias,function,format,groupBy,orderBy,custom,MetricId",nolimit:!0};return t["analyticCustomReport"===m.apiName?"CustomReportId":"DefaultReportId"]=a.id,r.analyticFieldReport.get(t).$promise}).then(function(e){for(var t=0;t<e.rows.length;t+=1)e.rows[t].MetricId&&(e.rows[t].field=i[e.rows[t].MetricId].metric,e.rows[t].custom=!0),delete e.rows[t].MetricId;var n=s.document.createElement("a");n.href="data:text/json;charset=utf-8,"+s.encodeURIComponent(angular.toJson({name:a.name,description:a.description,table:a.table,conditions:a.conditions,joins:a.joins,fields:e.rows})),n.download=a.name+".json",n.target="_self",n.click(),d.success({title:"Report downloaded!",msg:a.name?a.name+" has been downloaded!":""})}).catch(function(e){d.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DOWNLOADJSON",msg:e.data?JSON.stringify(e.data):e.toString()})})},m.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the report?").htmlContent("<b>"+e.name+"</b> will be deleted.").ariaLabel("delete report").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){h(e)},function(){console.log("CANCEL")})},m.success=g,m.getReports=v,m.createOrEditReport=function(e,t){i.show({controller:"CreateOrEditReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/create/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{report:t,reports:m.reports.rows,apiName:m.apiName,currentNode:m.currentNode,setting:null}})},m.importReport=function(e,t,n){if("application/json"===e.file.type){var a=new FileReader;a.onload=function(e){console.log(e.target.result);try{var n=atob(e.target.result.split(",")[1]);n=angular.fromJson(n),r.analyticCustomReport.save({name:n.name,description:n.description,table:n.table,conditions:n.conditions,joins:n.joins,parent:m.currentNode.id}).$promise.then(function(t){m.reports.rows.unshift(t),d.success({title:"Report saved!",msg:t.name?t.name+" has been saved!":""});var e=_.map(n.fields,function(e){return _.extend({},e,{CustomReportId:t.id})});return r.analyticFieldReport.bulkCreate(e).$promise}).then(function(e){d.success({title:"Fields saved!",msg:"Fields has been saved!"})}).catch(function(e){d.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETanalyticReport",msg:e.data?JSON.stringify(e.data):e.toString()})})}catch(e){console.error(e),d.error({title:"Decode File Error",msg:e.toString()})}},a.readAsDataURL(e.file)}else d.error({title:"Format Error",msg:"Please use only json files"})},m.deleteReport=h,m.exportSelectedReports=function(){var e=angular.copy(m.selectedReports);return m.selectedReports=[],e},m.deleteSelectedReports=function(e){var t=i.confirm().title("Are you sure want to delete the selected reports?").htmlContent("<b>"+m.selectedReports.length+" selected</b> will be deleted.").ariaLabel("delete Reports").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){m.selectedReports.forEach(function(e){h(e)}),m.selectedReports=[]})},m.deselectReports=function(){m.selectedReports=[]},m.selectAllReports=function(){m.selectedReports=m.reports.rows},m.treeDefaultData=l.rows[0]?angular.fromJson(l.rows[0].tree):[],m.treeCustomData=l.rows[1]?angular.fromJson(l.rows[1].tree):[],m.treeDefaultConfig=E(!1),m.treeCustomConfig=E(!0),m.treeDefaultEvents=y(!1),m.treeCustomEvents=y(!0);var u=!0,p=1;function g(e){m.reports=e||{count:0,rows:[]}}function v(){m.query.offset=(m.query.page-1)*m.query.limit,m.apiName&&(m.promise=r[m.apiName].get(m.query,g).$promise)}function h(e){m.apiName&&r[m.apiName].delete({id:e.id}).$promise.then(function(){_.remove(m.reports.rows,{id:e.id}),m.reports.count-=1,m.reports.rows.length||m.getReports(),d.success({title:"Report deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.analyticreport.delete"}];for(var t=0;t<e.data.errors.length;t++)d.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else d.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.analyticreport.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}function b(e,t){m.treeDefaultInstance.jstree(!0).deselect_all(),m.treeDefaultInstance.jstree(!0).close_all(),m.currentNode=t.node,m.currentNode.custom=!0,m.currentPath=m.treeCustomInstance.jstree(!0).get_path(m.currentNode).join("/ "),m.apiName="analyticCustomReport",m.query.parent=t.node.id,v()}function f(e,t){m.treeCustomInstance.jstree(!0).deselect_all(),m.treeCustomInstance.jstree(!0).close_all(),m.currentNode=t.node,m.currentNode.custom=!1,m.currentPath=m.treeDefaultInstance.jstree(!0).get_path(m.currentNode).join("/ "),m.apiName="analyticDefaultReport",m.query.parent=t.node.id,v()}function A(e,t){var n=angular.toJson(m.treeCustomInstance.jstree(!0).get_json("#"));r.analyticTreeReport.update({id:2,tree:n}).$promise.then(function(){l.rows[1]&&(l.rows[1].tree=n),d.success({title:"Node Updated",msg:t.node.text?t.node.text+" has been updated!":"Node has been updated!"})}).catch(function(e){d.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATEanalyticTreeReport",msg:e.data?JSON.stringify(e.data):e.toString()})})}function E(e){return{core:{multiple:!1,animation:!0,error:function(e){console.error("treeCtrl: error from js tree - "+angular.toJson(e))},check_callback:!0,worker:!0},version:1,plugins:e?["contextmenu","dnd","search","state","wholerow"]:["search","state","wholerow"],contextmenu:{items:function(n){return{create:{label:t.instant("ANALYTICS.CREATE"),action:function(){n=m.treeCustomInstance.jstree(!0).create_node(n),m.treeCustomInstance.jstree(!0).edit(n)}},rename:{_disabled:"#"===n.parent,label:t.instant("ANALYTICS.RENAME"),action:function(){m.treeCustomInstance.jstree(!0).edit(n)}},remove:{_disabled:"#"===n.parent||"admin"!==m.currentUser.role&&0!==m.currentUser.crudPermissions,label:t.instant("ANALYTICS.REMOVE"),action:function(){var e=i.confirm().title("Are you sure want to delete the node?").htmlContent("<b>"+(n.text?n.text:"Node")+"</b> and its subnode will be deleted.").ariaLabel("delete node").ok("OK").cancel("CANCEL");i.show(e).then(function(){var e,t=m.treeCustomInstance.jstree(!0).get_parent(n);t=m.treeCustomInstance.jstree(!0).get_node(t),m.treeCustomInstance.jstree(!0).delete_node(n),e=[n.id].concat(n.children_d||[]),r.analyticCustomReport.get({parent:e.join(","),fields:"id,name"}).$promise.then(function(e){e&&e.rows&&e.rows.forEach(function(e){h(e)})}).catch(function(e){d.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEreportsByParents",msg:e.data?JSON.stringify(e.data):e.toString()})}),m.treeCustomInstance.jstree(!0).select_node(t)})}}}}}}}function y(e){return e?{create_node:A,rename_node:A,move_node:A,delete_node:A,select_node:b}:{select_node:f}}e.$watch("vm.query.filter",function(e,t){u?n(function(){u=!1}):(t||(p=m.query.page),e!==t&&(m.query.page=1),e||(m.query.page=p),m.getReports())}),e.$watch("vm.search",function(e,t){m.treeDefaultInstance&&m.treeDefaultInstance.jstree(!0).search(e),m.treeCustomInstance&&m.treeCustomInstance.jstree(!0).search(e)})}e.$inject=["$scope","$timeout","$document","$mdDialog","$state","$window","$translate","api","treeReports","toasty","Auth"],angular.module("app.analytics").controller("ReportsController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r){var l=this;function d(){l.export={id:l.report.id,name:l.report.name,startDate:new Date(moment().startOf("day")),endDate:new Date(moment().endOf("day")),output:"xlsx",fullPath:r?r+"/"+l.report.name:l.report.name}}function c(){n.hide()}l.errors=[],l.report=angular.copy(t),l.export={},l.runReport=function(t){l.errors=[],l.exportDate=_.assign({},l.export,{startDate:moment(l.export.startDate).format("YYYY-MM-DD HH:mm:ss"),endDate:moment(l.export.endDate).format("YYYY-MM-DD HH:mm:ss")}),i[o].run(l.exportDate).$promise.then(function(e){"web"===l.export.output?n.show({controller:"WebReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/run/web/dialog.html",parent:angular.element(s.body),targetEvent:t,skipHide:!0,locals:{apiName:o,exportDate:l.exportDate,results:e},resolve:{columns:["apiResolver",function(e){var t={fields:"field,alias",nolimit:!0};return t["analyticCustomReport"===o?"CustomReportId":"DefaultReportId"]=l.report.id,e.resolve("analyticFieldReport@get",t)}]}}):(a.success({title:"Report properly run!",msg:l.report.name?l.report.name+" has been run!":""}),c())}).catch(function(e){a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DESCRIBE",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},l.closeDialog=c,(l.refreshDate=d)()}e.$inject=["$location","$mdDialog","toasty","report","api","apiName","$document","currentPath"],angular.module("app.analytics").controller("RunReportDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s){var r=this;function l(e){r.results=e||{count:0,rows:[]}}r.errors=[],r.columns=a?a.rows:[],r.results=i||{rows:[],count:0},r.query={limit:10,page:1},r.closeDialog=function(){e.hide()},r.getResults=function(){s.offset=(r.query.page-1)*r.query.limit,s.limit=r.query.limit,r.promise=n[o].run(s,l).$promise},r.valueReplacer=function(e,t){moment(t,"YYYY-MM-DDTHH:mm:ssZ",!0).isValid()&&(t=moment(t,"").format("YYYY-MM-DD HH:mm:ss"));return t}}e.$inject=["$mdDialog","toasty","api","columns","results","apiName","exportDate"],angular.module("app.analytics").controller("WebReportDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CALLYSQUARE.EDIT_ODBC",m.odbc=angular.copy(s),m.odbcs=o,m.newOdbc=!1,m.odbc||(m.odbc={},m.title="CALLYSQUARE.NEW_ODBC",m.newOdbc=!0),m.addNewOdbc=function(){m.errors=[],r.squareOdbc.save(m.odbc).$promise.then(function(e){m.odbcs.unshift(e.toJSON()),i.success({title:"Odbc properly created",msg:m.odbc.name?m.odbc.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.squareOdbc.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.squareOdbc.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveOdbc=function(){m.errors=[],r.squareOdbc.update({id:m.odbc.id},m.odbc).$promise.then(function(e){var t=_.find(m.odbcs,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Odbc properly saved!",msg:m.odbc.name?m.odbc.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.squareOdbc.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.squareOdbc.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteOdbc=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The odbc will be deleted.").ariaLabel("Delete Odbc").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.squareOdbc.delete({id:m.odbc.id}).$promise.then(function(){_.remove(m.odbcs,{id:m.odbc.id}),i.success({title:"Odbc properly deleted!",msg:(m.odbc.name||"odbc")+" has been deleted!"}),u(m.odbc)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.squareOdbc.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.squareOdbc.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","odbcs","odbc","api","Auth","license","setting"],angular.module("app.callysquare").controller("CreateOrEditOdbcDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.odbcs=r||{count:0,rows:[]},v.table="odbcs",v.listOrder="",v.listOrderAsc=null,v.selectedODBC=[],v.query={fields:"createdAt,updatedAt,id,name,dsn,description",sort:"-updatedAt",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditOdbcDialogController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/odbcs/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{odbc:e,odbcs:v.odbcs.rows,license:v.license,setting:null}})},v.testtestOdbc=function(e,t){return l.squareOdbc.test({id:e.id}).$promise.then(function(){c.success({title:"Square ODBC properly tested",msg:"Connection succeded!"})}).catch(function(e){c.error({title:"Square ODBC properly tested",msg:e.data?JSON.stringify(e.data):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the odbc?").htmlContent("<b>"+(e.name||"odbc")+"</b> will be deleted.").ariaLabel("delete odbc").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getODBC=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.squareOdbc.get(v.query,f).$promise},v.createOrEditOdbc=function(e,t){i.show({controller:"CreateOrEditOdbcDialogController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/odbcs/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{odbc:t,odbcs:v.odbcs.rows,license:v.license,setting:v.setting}})},v.deleteOdbc=A,v.exportSelectedODBC=function(){var e=angular.copy(v.selectedODBC);return v.selectedODBC=[],e},v.deleteSelectedODBC=function(e){var t=i.confirm().title("Are you sure want to delete the selected odbcs?").htmlContent("<b>"+v.selectedODBC.length+" selected</b> will be deleted.").ariaLabel("delete Odbcs").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedODBC.forEach(function(e){A(e)}),v.selectedODBC=[]})},v.deselectODBC=function(){v.selectedODBC=[]},v.selectAllODBC=function(){v.selectedODBC=v.odbcs.rows};var h=!0,b=1;function f(e){v.odbcs=e||{count:0,rows:[]}}function A(e){l.squareOdbc.delete({id:e.id}).$promise.then(function(){_.remove(v.odbcs.rows,{id:e.id}),v.odbcs.count-=1,v.odbcs.rows.length||v.getODBC(),c.success({title:"Odbc deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEsquareOdbc"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEsquareOdbc",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getODBC())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","odbcs","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.callysquare").controller("OdbcsController",e)}(),function(){"use strict";function e(t,n,e,a,i,o,s,r){var l=this;function d(e){t.hide(e)}l.errors=[],l.title="CALLYSQUARE.EDIT_PROJECT",l.project=angular.copy(a),l.newWindow=!0,l.projects=e,l.newProject=!1,l.openFromEditor=o,l.project||(l.project={name:"",description:""},l.title="CALLYSQUARE.NEW_PROJECT",l.newProject=!0),l.addNewProject=function(){l.errors=[],i.squareProject.save(l.project).$promise.then(function(e){l.projects.unshift(e),n.success({title:"Project properly created",msg:l.project.name?l.project.name+" has been created!":""}),d(e),l.openFromEditor&&(l.newWindow?s.open("/callysquare/projects/"+e.id,"_blank"):r.go("app.callysquare.projects.edit",{id:e.id}))}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){l.errors=e.data.errors||[{message:e.toString(),type:"api.squareProject.save"}];for(var t=0;t<e.data.errors.length;t++)n.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.squareProject.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},l.saveProject=function(){l.errors=[],i.squareProject.update({id:l.project.id},l.project).$promise.then(function(e){var t=_.find(l.projects,{id:e.id});t&&_.merge(t,e),n.success({title:"Project properly saved!",msg:l.project.name?l.project.name+" has been saved!":""}),d(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){l.errors=e.data.errors||[{message:e.toString(),type:"api.squareProject.update"}];for(var t=0;t<e.data.errors.length;t++)n.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.squareProject.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},l.deleteProject=function(){l.errors=[];var e=t.confirm().title("Are you sure?").content("The project will be deleted.").ariaLabel("Delete Project").ok("Delete").cancel("Cancel").targetEvent(event);t.show(e).then(function(){i.squareProject.delete({id:l.project.id}).$promise.then(function(){_.remove(l.projects,{id:l.project.id}),n.success({title:"Project properly deleted!",msg:l.project.name?l.project.name+" has been deleted!":""}),d(l.project)}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.squareProject.delete"}]})},function(){})},l.closeDialog=d}e.$inject=["$mdDialog","toasty","projects","project","api","openFromEditor","$window","$state"],angular.module("app.callysquare").controller("CreateOrEditSquareProjectDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i,o,s,r,l,d,c,m,u,p,g,v,h,b,f,A,E,y,S,T,C){var x,O,w,I,R,N,D=this,L={playback:["file_id"],answer:["timeout"],menu:["file_id","digit","response","retry"],getdigits:["file_id","variable_id","mindigit","maxdigit","retry"],getsecretdigits:["file_id","variable_id","mindigit","maxdigit","hiddendigitsnum","retry"],vswitch:["variable_id"],database:["odbc_id","query"],ext_dial:["trunk_name","phone","timeout"],set:["variable_id"],math:["variable_id"],gotoc:["context","extension","priority"],system:["command"],agi:["command"],gotoif:["condition"],saydigits:["digits"],saynumber:["number"],sayphonetic:["text"],record:["file","timeout"],goal:["goalname"],dial:["sip_id","timeout"],queue:["queue_id","timeout"],callback:["list_id","name","phone","delay"],gotoiftime:["interval_id"],voicemail:["mailbox"],subproject:["project_id"],sendSMS:["sms_account_id","to","sms_text"],sendMail:["account_id","to"],sendFax:["account_id","to","attachment_path"],tts:["text"],ispeechtts:["text","key","speed"],ispeechasr:["key","timeout"],custom_app:["application"],googleasr:["key","timeout"],awspolly:["aws_access_key_id","aws_secret_access_key","tts"],lumenvoxtts:["text"],lumenvoxasr:["grammar"],tildeasr:["appid","appsecret","uri"],login:["findBy"],pause:["findBy","pause_id"],unpause:["findBy"],logout:["findBy"]},M={queue:["file_id"],database:["variable_id"],pause:["pause_id"]},k={sendMail:["to","cc","bcc"],voicemail:["mailbox"]};function U(e,t,n,a){return _.map(e,function(e){return{value:e[t],option:e[n],group:a?e[a]:void 0}})}D.cellName=A.tagName,D.attributes=_.map(A.attributes,function(e){return{name:e.name,value:e.value,defaultValue:M[D.cellName]&&_.includes(M[D.cellName],e.name),required:L[D.cellName]&&_.includes(L[D.cellName],e.name),help:k[D.cellName]&&_.includes(k[D.cellName],e.name)}}),D.values={sip_id:U(r,"id","fullname","role"),trunk_name:U(l,"name","name"),trunk_id:U(l,"id","name"),queue_id:U(d,"id","name"),file_id:U(c,"id","name"),variable_id:U(m,"id","name"),odbc_id:U(u,"id","name"),project_id:U(p,"id","name"),context:U(g,"id","name"),interval_id:(x=v,O="id",w="name",I="IntervalId",R=_.filter(x,function(e){return null===e[I]}),N=[],_.forEach(R,function(t){N.push({value:t[O],option:t[w]});var e=_.filter(x,function(e){return e[I]===t.id});_.forEach(e,function(e){N.push({value:e[O],option:" - "+e[w]})})}),N),account_id:U(h,"id","name"),template_id:U(b,"id","name"),list_id:U(f,"id","name"),sms_account_id:U(T,"id","name"),pause_id:U(C,"id","name"),answer:[{value:"yes",option:"Yes"},{value:"no",option:"No"}],hiddendigitspos:[{value:"first",option:"First"},{value:"last",option:"Last"}],recordingFormat:[{value:"wav",option:"Wav"},{value:"gsm",option:"Gsm"}],intkey:[{value:"#",option:"#"},{value:"*",option:"*"}],beep:[{value:"BEEP",option:"Yes"},{value:"NOBEEP",option:"No"}],model:n,ispeech_asr_language:a,ispeech_tts_language:o,google_tts_language:s,google_asr_language:i,aws_polly_region:S,aws_polly_voice:y,callback_priority:[{option:"Highest",value:4},{option:"High",value:3},{option:"Medium",value:2},{option:"Low",value:1},{option:"Lowest",value:0}],findBy:[{value:"internal",option:"Internal"},{value:"phone",option:"Phone"},{value:"mobile",option:"Mobile"}]},D.closeDialog=function(e){e&&E(D.attributes),t.hide()},D.getMap=U}e.$inject=["$mdDialog","toasty","ispeechAsrModel","ispeechAsrLanguage","googleAsrLanguage","ispeechTtsLanguage","googleTtsLanguage","users","trunks","queues","sounds","variables","databases","projects","contexts","intervals","mailAccounts","templates","lists","cell","saveCallback","awsPollyVoice","awsPollyRegion","smsAccounts","pauses"],angular.module("app.callysquare").controller("MxGraphDialogController",e)}(),function(){"use strict";angular.module("app.callysquare").directive("stringToNumber",function(){return{require:"ngModel",link:function(e,t,n,a){a.$parsers.push(function(e){return""+e}),a.$formatters.push(function(e){return parseFloat(e)})}}})}(),function(){"use strict";angular.module("app.callysquare").factory("ispeechAsrModel",function(){return[{value:"0",option:"Default"},{value:"date",option:"Date"},{value:"usmoney",option:"US Money"},{value:"numbersto9",option:"Numbers to 9"},{value:"numbersto99",option:"Numbers to 99"},{value:"numbersto999",option:"Numbers to 999"},{value:"time",option:"Time"},{value:"phonenumber",option:"Phone number"},{value:"streets",option:"Streets"},{value:"citystate",option:"US City/States"}]}).factory("ispeechAsrLanguage",function(){return[{value:"en-US",option:"English (US)"},{value:"en-CA",option:"English (Canada)"},{value:"en-GB",option:"English (UK)"},{value:"en-AU",option:"English (Australia)"},{value:"es-ES",option:"Spanish (Spain)"},{value:"es-MX",option:"Spanish (Mexico)"},{value:"it-IT",option:"Italian (Italy) / Finnish (Finland)"},{value:"fr-FR",option:"German (Germany)"},{value:"fr-CA",option:"French (Canada)"},{value:"pl-PL",option:"Polish (Poland)"},{value:"pt-PT",option:"Portuguese (Portugal)"},{value:"ca-ES",option:"Catalan (Catalan)"},{value:"zh-TW",option:"Chinese (Taiwan)"},{value:"da-DK",option:"Danish (Denmark)"},{value:"ja-JP",option:"Japanese (Japan)"},{value:"ko-KR",option:"Korean (Korea)"},{value:"nl-NL",option:"Dutch (Netherlands)"},{value:"nb-NO",option:"Norwegian (Norway)"},{value:"pt-BR",option:"Portuguese (Brazil)"},{value:"ru-RU",option:"Russian (Russia)"},{value:"sv-SE",option:"Swedish (Sweden)"},{value:"zh-CN",option:"Chinese (China)"},{value:"zh-HK",option:"Chinese (Hong Kong)"}]}).factory("ispeechTtsLanguage",function(){return[{value:"usenglishfemale",option:"US English Female"},{value:"usenglishmale",option:"US English Male"},{value:"ukenglishfemale",option:"UK English Female"},{value:"ukenglishmale",option:"UK English Male"},{value:"auenglishfemale",option:"Australian English"},{value:"usspanishfemale",option:"US Spanish Female"},{value:"usspanishmale",option:"US Spanish Male"},{value:"chchinesefemale",option:"Chinese Female"},{value:"chchinesemale",option:"Chinese Male"},{value:"hkchinesefemale",option:"Hong Kong Cantonese Female"},{value:"twchinesefemale",option:"Taiwan Chinese Female"},{value:"jpjapanesefemale",option:"Japanese Female"},{value:"jpjapanesemale",option:"Japanese Male"},{value:"krkoreanfemale",option:"Korean Female"},{value:"krkoreanmale",option:"Korean Male"},{value:"caenglishfemale",option:"Canadian English Female"},{value:"huhungarianfemale",option:"Hungarian Female"},{value:"brportuguesefemale",option:"Brazilian Portuguese Female"},{value:"eurportuguesefemale",option:"European Portuguese Female"},{value:"eurportuguesemale",option:"European Portuguese Male"},{value:"eurspanishfemale",option:"European Spanish Female"},{value:"eurspanishmale",option:"European Spanish Male"},{value:"eurcatalanfemale",option:"European Catalan Female"},{value:"eurczechfemale",option:"European Czech Female"},{value:"eurdanishfemale",option:"European Danish Female"},{value:"eurfinnishfemale",option:"European Finnish Female"},{value:"eurfrenchfemale",option:"European French Female"},{value:"eurfrenchmale",option:"European French Male"},{value:"eurnorwegianfemale",option:"European Norwegian Female"},{value:"eurdutchfemale",option:"European Dutch Female"},{value:"eurpolishfemale",option:"European Polish Female"},{value:"euritalianfemale",option:"European Italian Female"},{value:"euritalianmale",option:"European Italian Male"},{value:"eurturkishfemale",option:"European Turkish Female"},{value:"eurturkishmale",option:"European Turkish Male"},{value:"eurgermanfemale",option:"European German Female"},{value:"eurgermanmale",option:"European German Male"},{value:"rurussianfemale",option:"Russian Female"},{value:"rurussianmale",option:"Russian Male"},{value:"swswedishfemale",option:"Swedish Female"},{value:"cafrenchfemale",option:"Canadian French Female"},{value:"cafrenchmale",option:"Canadian French Male"}]}).factory("googleTtsLanguage",function(){return[{value:"af",option:"Afrikaans"},{value:"sq",option:"Albanian"},{value:"am",option:"Amharic"},{value:"ar",option:"Arabic"},{value:"hy",option:"Armenian"},{value:"az",option:"Azerbaijani"},{value:"eu",option:"Basque"},{value:"be",option:"Belarusian"},{value:"bn",option:"Bengali"},{value:"bh",option:"Bihari"},{value:"bs",option:"Bosnian"},{value:"br",option:"Breton"},{value:"bg",option:"Bulgarian"},{value:"km",option:"Cambodian"},{value:"ca",option:"Catalan"},{value:"zh-CN",option:"Chinese (Simplified)"},{value:"zh-TW",option:"Chinese (Traditional)"},{value:"co",option:"Corsican"},{value:"hr",option:"Croatian"},{value:"cs",option:"Czech"},{value:"da",option:"Danish"},{value:"nl",option:"Dutch"},{value:"en",option:"English"},{value:"eo",option:"Esperanto"},{value:"et",option:"Estonian"},{value:"fo",option:"Faroese"},{value:"tl",option:"Filipino"},{value:"fi",option:"Finnish"},{value:"fr",option:"French"},{value:"fy",option:"Frisian"},{value:"gl",option:"Galician"},{value:"ka",option:"Georgian"},{value:"de",option:"German"},{value:"el",option:"Greek"},{value:"gn",option:"Guarani"},{value:"gu",option:"Gujarati"},{value:"xx-hacker",option:"Hacker"},{value:"ha",option:"Hausa"},{value:"iw",option:"Hebrew"},{value:"hi",option:"Hindi"},{value:"hu",option:"Hungarian"},{value:"is",option:"Icelandic"},{value:"id",option:"Indonesian"},{value:"ia",option:"Interlingua"},{value:"ga",option:"Irish"},{value:"it",option:"Italian"},{value:"jw",option:"Javanese"},{value:"ja",option:"Japanese"},{value:"kn",option:"Kannada"},{value:"kk",option:"Kazakh"},{value:"rw",option:"Kinyarwanda"},{value:"rn",option:"Kirundi"},{value:"xx-klingon",option:"Klingon"},{value:"ku",option:"Kurdish"},{value:"ko",option:"Korean"},{value:"ky",option:"Kyrgyz"},{value:"lo",option:"Laothian"},{value:"la",option:"Latin"},{value:"lv",option:"Latvian"},{value:"ln",option:"Lingala"},{value:"lt",option:"Lithuanian"},{value:"mk",option:"Macedonian"},{value:"mg",option:"Malagasy"},{value:"ml",option:"Malayalam"},{value:"mt",option:"Maltese"},{value:"mi",option:"Maori"},{value:"mr",option:"Marathi"},{value:"mo",option:"Moldavian"},{value:"mn",option:"Mongolian"},{value:"sr-ME",option:"Montenegrin"},{value:"ne",option:"Nepali"},{value:"no",option:"Norwegian"},{value:"nn",option:"Norwegian (Nynorsk)"},{value:"oc",option:"Occitan"},{value:"or",option:"Oriya"},{value:"om",option:"Oromo"},{value:"ps",option:"Pashto"},{value:"fa",option:"Persian"},{value:"xx-pirate",option:"Pirate"},{value:"pl",option:"Polish"},{value:"pt-BR",option:"Portuguese (Brazil)"},{value:"pt-PT",option:"Portuguese (Portugal)"},{value:"pa",option:"Punjabi"},{value:"qu",option:"Quechua"},{value:"ro",option:"Romanian"},{value:"rm",option:"Romansh"},{value:"ru",option:"Russian"},{value:"gd",option:"Scots Gaelic"},{value:"sr",option:"Serbian"},{value:"sh",option:"Serbo-Croatian"},{value:"st",option:"Sesotho"},{value:"sn",option:"Shona"},{value:"sd",option:"Sindhi"},{value:"si",option:"Sinhalese"},{value:"sk",option:"Slovak"},{value:"sl",option:"Slovenian"},{value:"so",option:"Somali"},{value:"es",option:"Spanish"},{value:"su",option:"Sundanese"},{value:"sw",option:"Swahili"},{value:"sv",option:"Swedish"},{value:"tg",option:"Tajik"},{value:"ta",option:"Tamil"},{value:"tt",option:"Tatar"},{value:"te",option:"Telugu"},{value:"th",option:"Thai"},{value:"ti",option:"Tigrinya"},{value:"to",option:"Tonga"},{value:"tr",option:"Turkish"},{value:"tk",option:"Turkmen"},{value:"tw",option:"Twi"},{value:"ug",option:"Uighur"},{value:"uk",option:"Ukrainian"},{value:"ur",option:"Urdu"},{value:"uz",option:"Uzbek"},{value:"vi",option:"Vietnamese"},{value:"cy",option:"Welsh"},{value:"xh",option:"Xhosa"},{value:"yi",option:"Yiddish"},{value:"yo",option:"Yoruba"},{value:"zu",option:"Zulu"}]}).factory("googleAsrLanguage",function(){return[{value:"af-ZA",option:"Afrikaans (South Africa)"},{value:"am-ET",option:"Amharic (Ethiopia)"},{value:"hy-AM",option:"Armenian (Armenia)"},{value:"az-AZ",option:"Azerbaijani (Azerbaijan)"},{value:"id-ID",option:"Indonesian (Indonesia)"},{value:"ms-MY",option:"Malay (Malaysia)"},{value:"bn-BD",option:"Bengali (Bangladesh)"},{value:"bn-IN",option:"Bengali (India)"},{value:"ca-ES",option:"Catalan (Spain)"},{value:"cs-CZ",option:"Czech (Czech Republic)"},{value:"da-DK",option:"Danish (Denmark)"},{value:"de-DE",option:"German (Germany)"},{value:"en-AU",option:"English (Australia)"},{value:"en-CA",option:"English (Canada)"},{value:"en-GH",option:"English (Ghana)"},{value:"en-GB",option:"English (United Kingdom)"},{value:"en-IN",option:"English (India)"},{value:"en-IE",option:"English (Ireland)"},{value:"en-KE",option:"English (Kenya)"},{value:"en-NZ",option:"English (New Zealand)"},{value:"en-NG",option:"English (Nigeria)"},{value:"en-PH",option:"English (Philippines)"},{value:"en-ZA",option:"English (South Africa)"},{value:"en-TZ",option:"English (Tanzania)"},{value:"en-US",option:"English (United States)"},{value:"es-AR",option:"Spanish (Argentina)"},{value:"es-BO",option:"Spanish (Bolivia)"},{value:"es-CL",option:"Spanish (Chile)"},{value:"es-CO",option:"Spanish (Colombia)"},{value:"es-CR",option:"Spanish (Costa Rica)"},{value:"es-EC",option:"Spanish (Ecuador)"},{value:"es-SV",option:"Spanish (El Salvador)"},{value:"es-ES",option:"Spanish (Spain)"},{value:"es-US",option:"Spanish (United States)"},{value:"es-GT",option:"Spanish (Guatemala)"},{value:"es-HN",option:"Spanish (Honduras)"},{value:"es-MX",option:"Spanish (Mexico)"},{value:"es-NI",option:"Spanish (Nicaragua)"},{value:"es-PA",option:"Spanish (Panama)"},{value:"es-PY",option:"Spanish (Paraguay)"},{value:"es-PE",option:"Spanish (Peru)"},{value:"es-PR",option:"Spanish (Puerto Rico)"},{value:"es-DO",option:"Spanish (Dominican Republic)"},{value:"es-UY",option:"Spanish (Uruguay)"},{value:"es-VE",option:"Spanish (Venezuela)"},{value:"eu-ES",option:"Basque (Spain)"},{value:"fil-PH",option:"Filipino (Philippines)"},{value:"fr-CA",option:"French (Canada)"},{value:"fr-FR",option:"French (France)"},{value:"gl-ES",option:"Galician (Spain)"},{value:"ka-GE",option:"Georgian (Georgia)"},{value:"gu-IN",option:"Gujarati (India)"},{value:"hr-HR",option:"Croatian (Croatia)"},{value:"zu-ZA",option:"Zulu (South Africa)"},{value:"is-IS",option:"Icelandic (Iceland)"},{value:"it-IT",option:"Italian (Italy)"},{value:"jv-ID",option:"Javanese (Indonesia)"},{value:"kn-IN",option:"Kannada (India)"},{value:"km-KH",option:"Khmer (Cambodia)"},{value:"lo-LA",option:"Lao (Laos)"},{value:"lv-LV",option:"Latvian (Latvia)"},{value:"lt-LT",option:"Lithuanian (Lithuania)"},{value:"hu-HU",option:"Hungarian (Hungary)"},{value:"ml-IN",option:"Malayalam (India)"},{value:"mr-IN",option:"Marathi (India)"},{value:"nl-NL",option:"Dutch (Netherlands)"},{value:"ne-NP",option:"Nepali (Nepal)"},{value:"nb-NO",option:"Norwegian Bokmal (Norway)"},{value:"pl-PL",option:"Polish (Poland)"},{value:"pt-BR",option:"Portuguese (Brazil)"},{value:"pt-PT",option:"Portuguese (Portugal)"},{value:"ro-RO",option:"Romanian (Romania)"},{value:"si-LK",option:"Sinhala (Srilanka)"},{value:"sk-SK",option:"Slovak (Slovakia)"},{value:"sl-SI",option:"Slovenian (Slovenia)"},{value:"su-ID",option:"Sundanese (Indonesia)"},{value:"sw-TZ",option:"Swahili (Tanzania)"},{value:"sw-KE",option:"Swahili (Kenya)"},{value:"fi-FI",option:"Finnish (Finland)"},{value:"sv-SE",option:"Swedish (Sweden)"},{value:"ta-IN",option:"Tamil (India)"},{value:"ta-SG",option:"Tamil (Singapore)"},{value:"ta-LK",option:"Tamil (Sri Lanka)"},{value:"ta-MY",option:"Tamil (Malaysia)"},{value:"te-IN",option:"Telugu (India)"},{value:"vi-VN",option:"Vietnamese (Vietnam)"},{value:"tr-TR",option:"Turkish (Turkey)"},{value:"ur-PK",option:"Urdu (Pakistan)"},{value:"ur-IN",option:"Urdu (India)"},{value:"el-GR",option:"Greek (Greece)"},{value:"bg-BG",option:"Bulgarian (Bulgaria)"},{value:"ru-RU",option:"Russian (Russia)"},{value:"sr-RS",option:"Serbian (Serbia)"},{value:"uk-UA",option:"Ukrainian (Ukraine)"},{value:"he-IL",option:"Hebrew (Israel)"},{value:"ar-IL",option:"Arabic (Israel)"},{value:"ar-JO",option:"Arabic (Jordan)"},{value:"ar-AE",option:"Arabic (United Arab Emirates)"},{value:"ar-BH",option:"Arabic (Bahrain)"},{value:"ar-DZ",option:"Arabic (Algeria)"},{value:"ar-SA",option:"Arabic (Saudi Arabia)"},{value:"ar-IQ",option:"Arabic (Iraq)"},{value:"ar-KW",option:"Arabic (Kuwait)"},{value:"ar-MA",option:"Arabic (Morocco)"},{value:"ar-TN",option:"Arabic (Tunisia)"},{value:"ar-OM",option:"Arabic (Oman)"},{value:"ar-PS",option:"Arabic (State of Palestine)"},{value:"ar-QA",option:"Arabic (Qatar)"},{value:"ar-LB",option:"Arabic (Lebanon)"},{value:"ar-EG",option:"Arabic (Egypt)"},{value:"fa-IR",option:"Persian (Iran)"},{value:"hi-IN",option:"Hindi (India)"},{value:"th-TH",option:"Thai (Thailand)"},{value:"ko-KR",option:"Korean (South Korea)"},{value:"cmn-Hant-TW",option:"Chinese, Mandarin (Traditional, Taiwan)"},{value:"yue-Hant-HK",option:"Chinese, Cantonese (Traditional, Hong Kong)"},{value:"ja-JP",option:"Japanese (Japan)"},{value:"cmn-Hans-HK",option:"Chinese, Mandarin (Simplified, Hong Kong)"},{value:"cmn-Hans-CN",option:"Chinese, Mandarin (Simplified, China)"}]}).factory("awsPollyVoice",function(){return[{value:"Amy",option:"Amy (English, British, Female)"},{value:"Astrid",option:"Astrid (Swedish, Female)"},{value:"Brian",option:"Brian (English, British, Male)"},{value:"Carla",option:"Carla (Italian, Female)"},{value:"Carmen",option:"Carmen (Romanian, Female)"},{value:"Celine",option:"Celine (French, Female)"},{value:"Chantal",option:"Chantal (French, Canadian, Female)"},{value:"Conchita",option:"Conchita (Spanish, Castilian, Female)"},{value:"Cristiano",option:"Cristiano (Portuguese, Male)"},{value:"Dora",option:"Dora (Icelandic, Female)"},{value:"Emma",option:"Emma (English, British, Female)"},{value:"Enrique",option:"Enrique (Spanish, Castilian, Male)"},{value:"Ewa",option:"Ewa (Polish, Female)"},{value:"Filiz",option:"Filiz (Turkish, Female)"},{value:"Geraint",option:"Geraint (English, Welsh, Male)"},{value:"Giorgio",option:"Giorgio (Italian, Male)"},{value:"Gwineth",option:"Gwineth (Welsh, Female)"},{value:"Hans",option:"Hans (German, Male)"},{value:"Ines",option:"Ines (Portuguese, Female)"},{value:"Ivy",option:"Ivy (English, US, Female)"},{value:"Jacek",option:"Jacek (Polish, Male)"},{value:"Jan",option:"Jan (Polish, Male)"},{value:"Joanna",option:"Joanna (English, US, Female)"},{value:"Joey",option:"Joey (English, US, Male)"},{value:"Justin",option:"Justin (English, US, Male)"},{value:"Karl",option:"Karl (Icelandic, Male)"},{value:"Kendra",option:"Kendra (English, US, Female)"},{value:"Kimberly",option:"Kimberly (English, US, Female)"},{value:"Liv",option:"Liv (Norwegian, Female)"},{value:"Lotte",option:"Lotte (Dutch, Female)"},{value:"Mads",option:"Mads (Danish, Male)"},{value:"Maja",option:"Maja (Polish, Female)"},{value:"Marlene",option:"Marlene (German, Female)"},{value:"Mathieu",option:"Mathieu (French, Male)"},{value:"Maxim",option:"Maxim (Russian, Male)"},{value:"Miguel",option:"Miguel (Spanish, US, Male)"},{value:"Mizuki",option:"Mizuki (Japanese, Female)"},{value:"Naja",option:"Naja (Danish, Female)"},{value:"Nicole",option:"Nicole (English, Austrialian, Female)"},{value:"Penelope",option:"Penelope (Spanish, US, Female)"},{value:"Raveena",option:"Raveena (English, Indian, Female)"},{value:"Ricardo",option:"Ricardo (Portuguese, Brazilian, Male)"},{value:"Ruben",option:"Ruben (Dutch, Male)"},{value:"Russell",option:"Russell (English, Austrialian, Male)"},{value:"Salli",option:"Salli (English, US, Female)"},{value:"Tatyana",option:"Tatyana (Russian, Female)"},{value:"Vitoria",option:"Vitoria (Portuguese, Brazilian, Female)"}]}).factory("awsPollyRegion",function(){return[{value:"us-east-1",option:"US East (N. Virginia)"},{value:"us-east-2",option:"US East (Ohio)"},{value:"us-west-1",option:"US West (N. California)"},{value:"us-west-2",option:"US West (Oregon)"},{value:"ca-central-1",option:"Canada (Central)"},{value:"eu-west-1",option:"EU (Ireland)"},{value:"eu-central-1",option:"EU (Frankfurt)"},{value:"eu-west-2",option:"EU (London)"},{value:"eu-west-3",option:"EU (Paris)"},{value:"ap-southeast-1",option:"Asia Pacific (Singapore)"},{value:"ap-southeast-2",option:"Asia Pacific (Sydney)"},{value:"ap-northeast-2",option:"Asia Pacific (Seoul)"},{value:"ap-northeast-1",option:"Asia Pacific (Tokyo)"},{value:"ap-south-1",option:"Asia Pacific (Mumbai)"},{value:"sa-east-1",option:"South America (São Paulo)"}]})}(),function(){"use strict";function e(t,e,n,a){var i=this;i.project={preproduction:n},i.closeDialog=function(e){e?(a(i.project.preproduction),t.hide(i.project.preproduction)):t.hide()}}e.$inject=["$mdDialog","toasty","currentXML","saveCallback"],angular.module("app.callysquare").controller("MxGraphEditXMLController",e)}(),function(){"use strict";function e(t,n){var a=this;function i(e){e?(n(e),t.hide(e)):t.hide()}a.errors=[],a.ngFlowOptions={chunkSize:5242880,maxChunkRetries:1,singleFile:!0,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,allowDuplicateUploads:!0},a.ngFlow={flow:{}},a.dropping=!1,a.closeDialog=i,a.fileAdded=function(e){a.errors=[],"text/xml"!==e.file.type&&a.errors.push({message:"The format "+e.file.type+" is not supported!"});5242880<e.file.size&&a.errors.push({message:"The file is too big. Max 5MB files are supported!"});if(!a.errors.length){var t=new FileReader;t.onload=function(e){i(e.target.result)},t.readAsText(e.file)}}}e.$inject=["$mdDialog","saveCallback"],angular.module("app.callysquare").controller("MxGraphImportXMLController",e)}(),function(){"use strict";function e(t,n,e,a){var i=this;i.project=_.clone(e),i.closeDialog=function(){t.hide()},i.save=function(){i.errors=[],a.squareProject.update({id:i.project.id},{notes:i.project.notes,description:i.project.description}).$promise.then(function(e){n.success({title:"Project updated!",msg:i.project.name?i.project.name+" has been updated!":""}),t.hide(e)}).catch(function(e){console.error(e),i.errors=e.data.errors||[{message:e.toString(),type:"api.squareProject.update"}]})}}e.$inject=["$mdDialog","toasty","project","api"],angular.module("app.callysquare").controller("MxGraphUpdateInfoController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;o.projects=n,o.id="",o.newWindow=!0,o.closeDialog=function(e){o.errors=[],e?(t.hide(),o.newWindow?a.open("/callysquare/projects/"+o.id,"_blank"):i.go("app.callysquare.projects.edit",{id:o.id})):t.hide()}}e.$inject=["$mdDialog","toasty","projects","$window","$state"],angular.module("app.callysquare").controller("MxGraphOpenProjectController",e)}(),function(){"use strict";function e(t,n,e,a,i,o,s){var r=this;r.project=angular.copy(e),r.project.name+="_new",r.project.preproduction=a,r.newWindow=!0,r.closeDialog=function(){t.hide()},r.save=function(){delete r.project.id,i.squareProject.save(r.project).$promise.then(function(e){n.success({title:"Project properly created",msg:r.project.name?r.project.name+" has been created!":""}),t.hide(e),r.newWindow?o.open("/callysquare/projects/"+e.id,"_blank"):s.go("app.callysquare.projects.edit",{id:e.id})}).catch(function(e){console.error(e),r.errors=e.data.errors||[{message:e.toString(),type:"api.squareProject.save"}]})}}e.$inject=["$mdDialog","toasty","project","currentXML","api","$window","$state"],angular.module("app.callysquare").controller("MxGraphSaveProjectAsController",e)}(),function(){"use strict";function e(e,n,a,i,o,t,s,r,l,d,c,m,u,p,g,v,h,b,f,A,E){var y=this;y.project=t||{},y.saveOrPublishProject=function(e,t){var n={preproduction:e};t&&(n.production=e);o.squareProject.update({id:y.project.id},n).$promise.then(function(e){i.success({title:"Project "+(t?"published":"saved")+"!",msg:y.project.name?y.project.name+" has been "+(t?"published":"saved")+"!":""}),y.project.preproduction=e.preproduction}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsquareProject",msg:e.data?JSON.stringify(e.data):e.toString()})})},y.$onInit=function(){new EditorUi(y,new Editor,document.getElementById("geEditor")).openString(y.project.preproduction,y.project.name,y.project)},y.openDialog=function(e,t){a.show({controller:"MxGraphDialogController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/projects/edit/dialog/dialog.html",parent:angular.element(n.body),clickOutsideToClose:!0,locals:{users:s.rows||[],trunks:r.rows||[],queues:l.rows||[],sounds:d.rows||[],variables:c.rows||[],databases:m.rows||[],contexts:u.rows||[],projects:p.rows||[],intervals:g.rows||[],mailAccounts:v.rows||[],smsAccounts:f.rows||[],pauses:A.rows||[],templates:h.rows||[],lists:b.rows||[],cell:e,saveCallback:t}})},y.newProject=function(e){a.show({controller:"CreateOrEditProjectDialogController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/projects/create/dialog.html",parent:angular.element(n.body),clickOutsideToClose:!0,locals:{project:e,projects:p.rows,openFromEditor:!0,setting:null}})},y.openProject=function(){a.show({controller:"MxGraphOpenProjectController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/projects/edit/open/open.html",parent:angular.element(n.body),clickOutsideToClose:!0,locals:{projects:p.rows||[]}})},y.saveProjectAs=function(e){a.show({controller:"MxGraphSaveProjectAsController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/projects/edit/saveAs/saveAs.html",parent:angular.element(n.body),clickOutsideToClose:!0,locals:{project:y.project,currentXML:e}}).then(function(e){e&&p.rows.push(e)})},y.newVariable=function(e){a.show({controller:"CreateOrEditVariableDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/variables/create/dialog.html",parent:angular.element(n.body),clickOutsideToClose:!0,locals:{variable:e,variables:c.rows,license:null,setting:null}})},y.updateInfo=function(e){a.show({controller:"MxGraphUpdateInfoController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/projects/edit/info/info.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{project:y.project}}).then(function(e){e&&_.merge(y.project,e)})},y.editXML=function(e,t){a.show({controller:"MxGraphEditXMLController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/projects/edit/edit/edit.html",parent:angular.element(n.body),clickOutsideToClose:!0,locals:{currentXML:e,saveCallback:t}}).then(function(e){e&&(y.project.preproduction=e)})},y.importXML=function(e){a.show({controller:"MxGraphImportXMLController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/projects/edit/import/import.html",parent:angular.element(n.body),clickOutsideToClose:!0,locals:{saveCallback:e}}).then(function(e){e&&(y.project.preproduction=e)})},y.gotoProjects=function(){e.go("app.callysquare.projects")}}e.$inject=["$state","$document","$mdDialog","toasty","api","project","users","trunks","queues","sounds","variables","databases","contexts","projects","intervals","mailAccounts","templates","lists","smsAccounts","pauses","$window"],angular.module("app.callysquare").controller("ProjectController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d,c){var m=this;m.currentUser=c.getCurrentUser(),m.projects=a||{count:0,rows:[]},m.table="projects",m.listOrder="",m.listOrderAsc=null,m.selectedProjects=[],m.query={fields:"id,name,description,notes",sort:"-updatedAt",limit:10,page:1},m.editstate=function(e,t){n.go("app.callysquare.projects.edit",{id:e.id})},m.deleteconfirm=function(e,t){var n=s.confirm().title("Are you sure want to delete the project?").htmlContent("<b>"+e.name+"</b> will be deleted.").ariaLabel("delete project").targetEvent(t).ok("OK").cancel("CANCEL");s.show(n).then(function(){v(e)},function(){console.log("CANCEL")})},m.success=g,m.getProjects=function(){m.query.offset=(m.query.page-1)*m.query.limit,m.promise=i.squareProject.get(m.query,g).$promise},m.createOrEditProject=function(e,t){s.show({controller:"CreateOrEditSquareProjectDialogController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/projects/create/dialog.html",parent:angular.element(r.body),targetEvent:e,clickOutsideToClose:!0,locals:{project:t,projects:m.projects.rows,openFromEditor:null,setting:null}})},m.deleteProject=v,m.exportSelectedProjects=function(){var e=angular.copy(m.selectedProjects);return m.selectedProjects=[],e},m.deleteSelectedProjects=function(e){var t=s.confirm().title("Are you sure want to delete the selected projects?").htmlContent("<b>"+m.selectedProjects.length+" selected</b> will be deleted.").ariaLabel("delete Projects").targetEvent(e).ok("OK").cancel("CANCEL");s.show(t).then(function(){m.selectedProjects.forEach(function(e){v(e)}),m.selectedProjects=[]})},m.deselectProjects=function(){m.selectedProjects=[]},m.selectAllProjects=function(){m.selectedProjects=m.projects.rows};var u=!0,p=1;function g(e){m.projects=e||{count:0,rows:[]}}function v(e){i.squareProject.delete({id:e.id}).$promise.then(function(){_.remove(m.projects.rows,{id:e.id}),m.projects.count-=1,m.projects.rows.length||m.getProjects(),d.success({title:"Project deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.project.delete"}];for(var t=0;t<e.data.errors.length;t++)d.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else d.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.project.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){u?l(function(){u=!1}):(t||(p=m.query.page),e!==t&&(m.query.page=1),e||(m.query.page=p),m.getProjects())})}e.$inject=["$scope","$state","$mdSidenav","projects","api","msUtils","$mdDialog","$document","$timeout","toasty","Auth"],angular.module("app.callysquare").controller("ProjectsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CALLYSQUARE.EDIT_SQUARERECORDING",m.squareRecording=angular.copy(s),m.squareRecordings=o,m.newSquareRecording=!1,m.squareRecording||(m.squareRecording={},m.title="CALLYSQUARE.NEW_SQUARERECORDING",m.newSquareRecording=!0),m.addNewSquareRecording=function(){m.errors=[],r.squareRecording.save(m.squareRecording).$promise.then(function(e){m.squareRecordings.unshift(e.toJSON()),i.success({title:"SquareRecording properly created",msg:m.squareRecording.name?m.squareRecording.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.squareRecording.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.squareRecording.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSquareRecording=function(){m.errors=[],r.squareRecording.update({id:m.squareRecording.id},m.squareRecording).$promise.then(function(e){var t=_.find(m.squareRecordings,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"SquareRecording properly saved!",msg:m.squareRecording.name?m.squareRecording.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.squareRecording.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.squareRecording.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSquareRecording=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The squareRecording will be deleted.").ariaLabel("Delete SquareRecording").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.squareRecording.delete({id:m.squareRecording.id}).$promise.then(function(){_.remove(m.squareRecordings,{id:m.squareRecording.id}),i.success({title:"SquareRecording properly deleted!",msg:(m.squareRecording.name||"squareRecording")+" has been deleted!"}),u(m.squareRecording)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.squareRecording.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.squareRecording.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","squareRecordings","squareRecording","api","Auth","license","setting"],angular.module("app.callysquare").controller("CreateOrEditSquareRecordingDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.squareRecordings=r||{count:0,rows:[]},v.table="squareRecordings",v.listOrder="",v.listOrderAsc=null,v.selectedSquareRecordings=[],v.query={fields:"createdAt,updatedAt,id,filename,projectName,uniqueid,callerid,extension,audio,createdAt",sort:"-updatedAt",limit:10,page:1},v.downloadfile2=function(o,e){return l.squareRecording.download({id:o.id}).$promise.then(function(e){var t=[e.buffer],n="download",a=new Blob(t,{type:e.type});n=o.uniqueid+".wav";var i=window.document.createElement("a");i.setAttribute("href",URL.createObjectURL(a)),i.setAttribute("download",n),i.click()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.squareRecording.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the squareRecording?").htmlContent("<b>"+(e.name||"squareRecording")+"</b> will be deleted.").ariaLabel("delete squareRecording").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getSquareRecordings=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.squareRecording.get(v.query,f).$promise},v.createOrEditSquareRecording=function(e,t){i.show({controller:"CreateOrEditSquareRecordingDialogController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/squareRecordings/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{squareRecording:t,squareRecordings:v.squareRecordings.rows,license:v.license,setting:v.setting}})},v.deleteSquareRecording=A,v.exportSelectedSquareRecordings=function(){var e=angular.copy(v.selectedSquareRecordings);return v.selectedSquareRecordings=[],e},v.deleteSelectedSquareRecordings=function(e){var t=i.confirm().title("Are you sure want to delete the selected squareRecordings?").htmlContent("<b>"+v.selectedSquareRecordings.length+" selected</b> will be deleted.").ariaLabel("delete SquareRecordings").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedSquareRecordings.forEach(function(e){A(e)}),v.selectedSquareRecordings=[]})},v.deselectSquareRecordings=function(){v.selectedSquareRecordings=[]},v.selectAllSquareRecordings=function(){v.selectedSquareRecordings=v.squareRecordings.rows};var h=!0,b=1;function f(e){v.squareRecordings=e||{count:0,rows:[]}}function A(e){l.squareRecording.delete({id:e.id}).$promise.then(function(){_.remove(v.squareRecordings.rows,{id:e.id}),v.squareRecordings.count-=1,v.squareRecordings.rows.length||v.getSquareRecordings(),c.success({title:"SquareRecording deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEsquareRecording"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEsquareRecording",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getSquareRecordings())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","squareRecordings","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.callysquare").controller("SquareRecordingsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.chatQueues=r||{count:0,rows:[]},v.table="chatQueues",v.listOrder="",v.listOrderAsc=null,v.selectedChatQueues=[],v.query={fields:"createdAt,updatedAt,id,name,strategy,timeout,description",sort:"-updatedAt",limit:10,page:1},v.arraystrategy=_.keyBy([{option:"Beepall",value:"'beepall'"},{option:"RR Memory",value:"'rrmemory'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.chat.chatQueues.edit",{id:e.id,chatQueue:e})},v.teamadddialog=function(e,t){i.show({controller:"ChatQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatQueues/edit/teamadd/teamadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{chatQueue:e,chatQueues:v.chatQueues?v.chatQueues.rows:[]}})},v.agentadddialog=function(e,t){i.show({controller:"ChatQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatQueues/edit/agentadd/agentadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{chatQueue:e,chatQueues:v.chatQueues?v.chatQueues.rows:[],realtime:!1}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the chatQueue?").htmlContent("<b>"+(e.name||"chatQueue")+"</b> will be deleted.").ariaLabel("delete chatQueue").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.gotorealtimegoto=function(e,t){n.go("app.chat.realtime.queues",{})},v.success=f,v.getChatQueues=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.chatQueue.get(v.query,f).$promise},v.createOrEditChatQueue=function(e,t){i.show({controller:"CreateOrEditChatQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatQueues/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatQueue:t,chatQueues:v.chatQueues.rows,license:v.license,setting:v.setting}})},v.deleteChatQueue=A,v.exportSelectedChatQueues=function(){var e=angular.copy(v.selectedChatQueues);return v.selectedChatQueues=[],e},v.deleteSelectedChatQueues=function(e){var t=i.confirm().title("Are you sure want to delete the selected chatQueues?").htmlContent("<b>"+v.selectedChatQueues.length+" selected</b> will be deleted.").ariaLabel("delete ChatQueues").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedChatQueues.forEach(function(e){A(e)}),v.selectedChatQueues=[]})},v.deselectChatQueues=function(){v.selectedChatQueues=[]},v.selectAllChatQueues=function(){v.selectedChatQueues=v.chatQueues.rows};var h=!0,b=1;function f(e){v.chatQueues=e||{count:0,rows:[]}}function A(e){l.chatQueue.delete({id:e.id}).$promise.then(function(){_.remove(v.chatQueues.rows,{id:e.id}),v.chatQueues.count-=1,v.chatQueues.rows.length||v.getChatQueues(),c.success({title:"ChatQueue deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEchatQueue"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEchatQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getChatQueues())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","chatQueues","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.chat").controller("ChatQueuesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CHAT.EDIT_CHATQUEUE",m.chatQueue=angular.copy(s),m.chatQueues=o,m.newChatQueue=!1,m.chatQueue||(m.chatQueue={strategy:"beepall",timeout:10},m.title="CHAT.NEW_CHATQUEUE",m.newChatQueue=!0),m.addNewChatQueue=function(){m.errors=[],r.chatQueue.save(m.chatQueue).$promise.then(function(e){m.chatQueues.unshift(e.toJSON()),i.success({title:"ChatQueue properly created",msg:m.chatQueue.name?m.chatQueue.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatQueue.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatQueue.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveChatQueue=function(){m.errors=[],r.chatQueue.update({id:m.chatQueue.id},m.chatQueue).$promise.then(function(e){var t=_.find(m.chatQueues,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"ChatQueue properly saved!",msg:m.chatQueue.name?m.chatQueue.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatQueue.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatQueue.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteChatQueue=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The chatQueue will be deleted.").ariaLabel("Delete ChatQueue").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.chatQueue.delete({id:m.chatQueue.id}).$promise.then(function(){_.remove(m.chatQueues,{id:m.chatQueue.id}),i.success({title:"ChatQueue properly deleted!",msg:(m.chatQueue.name||"chatQueue")+" has been deleted!"}),u(m.chatQueue)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatQueue.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatQueue.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","chatQueues","chatQueue","api","Auth","license","setting"],angular.module("app.chat").controller("CreateOrEditChatQueueDialogController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r){var l=this;function d(){return a.chatQueue[l.isVoiceRealtime()?"getMembers":"getAgents"]({id:l.chatQueue.id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){return l.isVoiceRealtime()?l.selectedItems=e.rows?_.map(e.rows,function(e){return e.id=e.UserId,e.fullname=e.membername,e.penalty=e.hasOwnProperty("penalty")?"penalty "+e.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[]:l.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserChatQueue?"penalty "+e.UserChatQueue.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.selectedItems=l.selectedItems,r.hasRole("admin")?a.user.get({fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise:a.user.getAgents({id:r.getCurrentUser().id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise}).then(function(e){l.items=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserChatQueue?"penalty "+e.UserChatQueue.penalty:"",e.internal=e.internal?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.items=_.differenceBy(l.items,l.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETUSERS.GETAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}l.chatQueue=t,l.penalty=0,l.items=[],l.selectedItems=[],l.closeDialog=function(){e.hide()},l.isVoiceRealtime=function(){return o},l.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"penalty",labelAll:s.instant("CHAT.ALL_AGENTS"),labelSelected:s.instant("CHAT.SELECTED_AGENTS"),transferCallback:function(e,t){a.chatQueue[t?"removeAgents":"addAgents"]({id:l.chatQueue.id,ids:_.map(e,l.isVoiceRealtime()&&t?"UserId":"id"),penalty:l.penalty||0,realtime:o||!1}).$promise.then(function(){n.success({title:"ChatQueue properly "+(t?"removed":"added"),msg:"ChatQueue has been "+(t?"removed":"added")+"!"}),t||d()}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:chatQueue.ADDAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d()}e.$inject=["$mdDialog","toasty","api","chatQueue","chatQueues","realtime","$translate","Auth"],angular.module("app.chat").controller("ChatQueueagentaddController",e)}(),function(){"use strict";function e(e,n,a,t,i){var o=this;o.chatQueue=t,o.penalty=0,o.items=[],o.selectedItems=[],o.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("CHAT.ALL_TEAMS"),labelSelected:i.instant("CHAT.SELECTED_TEAMS"),transferCallback:function(e,t){a.chatQueue[t?"removeTeams":"addTeams"]({id:o.chatQueue.id,ids:_.map(e,"id"),penalty:o.penalty||0}).$promise.then(function(){n.success({title:"Team properly "+(t?"removed":"added"),msg:"Team has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:chatQueue.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},o.closeDialog=function(){e.hide()},a.chatQueue.getTeams({id:o.chatQueue.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return o.selectedItems=e.rows?e.rows:[],o.dualMultiselectOptions.selectedItems=o.selectedItems,a.team.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){o.items=e.rows?e.rows:[],o.dualMultiselectOptions.items=_.differenceBy(o.items,o.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","chatQueue","$translate"],angular.module("app.chat").controller("ChatQueueteamaddController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.chatQueue=d||e.params.chatQueue||{},c.selectedTab=e.params.tab||0,c.teamadddialog=function(e,t){n.show({controller:"ChatQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatQueues/edit/teamadd/teamadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{chatQueue:e,chatQueues:c.chatQueues?c.chatQueues.rows:[]}})},c.agentadddialog=function(e,t){n.show({controller:"ChatQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatQueues/edit/agentadd/agentadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{chatQueue:e,chatQueues:c.chatQueues?c.chatQueues.rows:[],realtime:!1}})},c.alert=r.info,c.gotoChatQueues=function(){e.go("app.chat.chatQueues")},c.saveChatQueue=function(){s.chatQueue.update({id:c.chatQueue.id},c.chatQueue).$promise.then(function(){r.success({title:"ChatQueue updated!",msg:c.chatQueue.name?c.chatQueue.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatQueue",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","chatQueue"],angular.module("app.chat").controller("ChatQueueController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.chatWebsites=r||{count:0,rows:[]},v.table="chatWebsites",v.listOrder="",v.listOrderAsc=null,v.selectedChatWebsites=[],v.query={fields:"createdAt,updatedAt,id,token,agentIdentifier,name,key,address,remote,ListId,fidelity,timeout,agentAlias,closingQuestion,formSubmitSuccessMessage,formSubmitFailureMessage,color,color_focus,color_button,textColor,fontSize,header_shape,showAgentAvatar,animation,defaultWhiteLabel,whiteLabel,defaultLogo,conditionAgreement,autoclose,enableUnmanagedNote,unmanagedMessage,skipUnmanaged,sendUnmanaged,enableCustomerWriting,waitingTitle,waitingMessage,closingMessage,noteTitle,placeholderMessage,skipMessageButton,enableRating,ratingType,ratingStarsNumber,enableFeedback,forwardTranscript,forwardTranscriptMessage,closingMessageButton,download_transcript,enableCustomerAttachment,enquiry_enable,enquiry_forwarding,enquiry_forwarding_address,name_title,username_placeholder,email_title,email_placeholder,header_online,hideWhenOffline,header_offline,start_chat_button,offline_chat_button,offlineMessageSubject,offlineMessageBody,header_offline,offline_message,message_title,enquiry_message_placeholder,enquiry_button,rating_message,rating_send,rating_skip,acceptMethod,acceptUrl,rejectMethod,rejectUrl,closeMethod,closeUrl,onlineForm,offlineForm,mapKey,mapKeyOffline,forwardTranscript,forwardOffline,forwardOfflineAddress,IntervalId,timezone,waitForTheAssignedAgent,description,notificationSound,notificationShake,notificationTemplate",sort:"-updatedAt",limit:10,page:1},v.arrayagentIdentifier=_.keyBy([{option:"WebsiteAlias",value:"'website_alias'"},{option:"AgentAlias",value:"'agent_alias'"},{option:"AgentFullname",value:"'agent_fullname'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayheader_shape=_.keyBy([{option:"Rounded",value:"'rounded'"},{option:"Squared",value:"'squared'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayratingType=_.keyBy([{option:"Star",value:"'star'"},{option:"Thumb",value:"'thumb'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayacceptMethod=_.keyBy([{option:"HTTP GET",value:"'GET'"},{option:"HTTP POST",value:"'POST'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayrejectMethod=_.keyBy([{option:"HTTP GET",value:"'GET'"},{option:"HTTP POST",value:"'POST'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraycloseMethod=_.keyBy([{option:"HTTP GET",value:"'GET'"},{option:"HTTP POST",value:"'POST'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.chat.chatWebsites.edit",{id:e.id,chatWebsite:e})},v.interactionsgoto=function(e,t){n.go("app.chat.chatWebsites.edit",{id:e.id,tab:9})},v.offlinemessagesgoto=function(e,t){n.go("app.chat.chatWebsites.edit",{id:e.id,tab:10})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the chatWebsite?").htmlContent("<b>"+(e.name||"chatWebsite")+"</b> will be deleted.").ariaLabel("delete chatWebsite").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getChatWebsites=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.chatWebsite.get(v.query,f).$promise},v.createOrEditChatWebsite=function(e,t){i.show({controller:"CreateOrEditChatWebsiteDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:t,chatWebsites:v.chatWebsites.rows,license:v.license,setting:v.setting}})},v.deleteChatWebsite=A,v.exportSelectedChatWebsites=function(){var e=angular.copy(v.selectedChatWebsites);return v.selectedChatWebsites=[],e},v.deleteSelectedChatWebsites=function(e){var t=i.confirm().title("Are you sure want to delete the selected chatWebsites?").htmlContent("<b>"+v.selectedChatWebsites.length+" selected</b> will be deleted.").ariaLabel("delete ChatWebsites").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedChatWebsites.forEach(function(e){A(e)}),v.selectedChatWebsites=[]})},v.deselectChatWebsites=function(){v.selectedChatWebsites=[]},v.selectAllChatWebsites=function(){v.selectedChatWebsites=v.chatWebsites.rows},l.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.lists=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.interval.get({fields:"id,name",sort:"name",IntervalId:"null"}).$promise.then(function(e){v.interval=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.chatWebsites=e||{count:0,rows:[]}}function A(e){l.chatWebsite.delete({id:e.id}).$promise.then(function(){_.remove(v.chatWebsites.rows,{id:e.id}),v.chatWebsites.count-=1,v.chatWebsites.rows.length||v.getChatWebsites(),c.success({title:"ChatWebsite deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEchatWebsite"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEchatWebsite",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getChatWebsites())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","chatWebsites","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.chat").controller("ChatWebsitesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CHAT.EDIT_CHATWEBSITE",m.chatWebsite=angular.copy(s),m.chatWebsites=o,m.newChatWebsite=!1,m.chatWebsite||(m.chatWebsite={remote:n.protocol()+"://"+n.host()+(n.port()?":"+n.port():""),header_shape:"rounded",IntervalId:"null",timezone:"null",waitForTheAssignedAgent:10,notificationSound:!0},m.title="CHAT.NEW_CHATWEBSITE",m.newChatWebsite=!0),t.params.id&&(m.chatWebsite.ChatWebsiteId=t.params.id),m.addNewChatWebsite=function(){m.errors=[],r.chatWebsite.save(m.chatWebsite).$promise.then(function(e){m.chatWebsites.unshift(e.toJSON()),i.success({title:"ChatWebsite properly created",msg:m.chatWebsite.name?m.chatWebsite.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatWebsite.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatWebsite.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveChatWebsite=function(){m.errors=[],r.chatWebsite.update({id:m.chatWebsite.id},m.chatWebsite).$promise.then(function(e){var t=_.find(m.chatWebsites,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"ChatWebsite properly saved!",msg:m.chatWebsite.name?m.chatWebsite.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatWebsite.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatWebsite.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteChatWebsite=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The chatWebsite will be deleted.").ariaLabel("Delete ChatWebsite").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.chatWebsite.delete({id:m.chatWebsite.id}).$promise.then(function(){_.remove(m.chatWebsites,{id:m.chatWebsite.id}),i.success({title:"ChatWebsite properly deleted!",msg:(m.chatWebsite.name||"chatWebsite")+" has been deleted!"}),u(m.chatWebsite)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatWebsite.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatWebsite.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.lists=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})}),r.interval.get({fields:"id,name",sort:"name",IntervalId:"null"}).$promise.then(function(e){m.interval=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","chatWebsites","chatWebsite","api","Auth","license","setting"],angular.module("app.chat").controller("CreateOrEditChatWebsiteDialogController",e)}(),function(){"use strict";function e(s,i,a,o,e){var r=this;function t(e,t){if(r.chatWebsiteApps.rows.length){var n=r.chatWebsiteApps.rows[t]?r.chatWebsiteApps.rows[t]:r.chatWebsiteApps.rows[0];i.show({controller:"EditChatWebsiteApp"+(n.appType||n.app).toLowerCase()+"DialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/apps/"+(n.appType||n.app).toLowerCase()+"/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsiteApp:n,chatWebsite:r.chatWebsite}}).then(function(e){e&&(e.id?r.chatWebsiteApps.rows[t]=e:r.chatWebsiteApps.rows.splice(t,0,e),l())}).catch(function(e){e&&o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:EDITMODALSHOW",msg:e.data?JSON.stringify(e.data):e.toString()})})}}function l(){for(var e=1,t=[],n=0;n<r.chatWebsiteApps.rows.length;n++,0){var a=r.chatWebsiteApps.rows[n],i=[],o=[];a.intervals="*,*,*,*"!==a.interval?[a.interval]:a.IntervalId?_.map(_.filter(r.intervals.rows,{IntervalId:a.IntervalId}),"interval"):[],a.context=r.chatWebsite.context,a.exten=r.chatWebsite.exten,a.type&&(a.type=a.type.toLowerCase()),a.priority=i.length?_.last(i).priority+1:e,e=(o.length?_.last(o).priority:a.priority)+1,t=_.concat(t,i,[a],o)}s.chatWebsite.addApplications({id:r.chatWebsite.id},_.sortBy(t,"priority")).$promise.then(function(e){r.chatWebsiteApps.rows=e.rows}).catch(function(e){console.error(e)})}function n(e){r.chatWebsiteApps=e||{count:0,rows:[]}}r.currentUser=e.getCurrentUser(),r.chatWebsite={},r.chatWebsiteApps={count:0,rows:[]},r.selectedChatWebsiteApps=[],r.query={sort:"priority"},r.apps=_.reject(_.sortBy([{app:"Interval",appType:"interval",types:["always","custom","list"],fields:[],isApp:!1},{app:"noop",appType:"noop",type:"noop",icon:"icon-apps",interval:"*,*,*,*",required:!0,isApp:!0,fields:[{title:"Value",name:"value",type:"text",param:0}]},{app:"system",appType:"system",type:"system",icon:"icon-apps",interval:"*,*,*,*",required:!0,isApp:!0,extraApi:[{name:"variables",route:"variable",filters:{fields:"id,name",sort:"name",nolimit:!0}}],fields:[{title:"Command",name:"command",type:"text",required:!0,param:0},{title:"Variable",name:"variable",type:"apiselect",values:"variables",value:"variable.name",option:"variable.name",defaultValues:[{value:"''",option:"None"}],defaultValue:"''",param:1}]},{app:"gotop",appType:"gotop",type:"goto",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Priority",name:"priority",type:"number",required:!0,min:0,param:0}]},{app:"gotoif",appType:"gotoif",type:"gotoif",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Condition",name:"condition",type:"text",required:!0,param:0},{title:"truepriority",name:"truepriority",type:"number",min:1,required:!0,param:1},{title:"falsepriority",name:"falsepriority",type:"number",min:1,required:!0,param:2}]},{app:"queue",appType:"queue",foreignKey:"ChatQueueId",type:"queue",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"queues",route:"chatQueue",filters:{fields:"id,name,type",sort:"name",nolimit:!0}}],fields:[{title:"Queue",name:"queue",type:"apiselect",values:"queues",value:"queue.name",option:"queue.name",defaultValue:300,required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",max:2147483,min:0,required:!0,defaultValue:300,param:1}]},{app:"agent",appType:"agent",type:"agent",foreignKey:"UserId",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"agents",route:"user",filters:{fields:"id,name",role:"agent",sort:"name",nolimit:!0}}],fields:[{title:"Agent",name:"agent",type:"apiselect",values:"agents",value:"agent.name",option:"agent.name",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",max:2147483,min:0,required:!0,defaultValue:30,param:1}]},{app:"close",appType:"close",type:"close",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Disposition",name:"disposition",type:"text",required:!0,param:0}]},{app:"autoreply",appType:"autoreply",type:"autoreply",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"times",name:"times",type:"select",defaultValue:"1",values:[{option:"One Time",value:"1"},{option:"Always",value:"0"}],required:!0,param:0},{title:"Text",name:"text",type:"textarea",maxlength:255,required:!0,param:1}]}],["app"]),{isApp:!1}),r.list={group:{name:"opt1",pull:"clone"},animation:100,sort:!1},r.applications={group:{name:"opt2",put:"opt1"},animation:100,onAdd:function(e){t(e,e.newIndex)},onSort:function(e){l()}},r.init=function(e){r.chatWebsite=e,r.query.id=e.id,r.query.isApp=!0,r.query.nolimit=!0,r.getChatWebsiteApps(),r.getIntervals()},r.deleteConfirm=function(e,t,n){var a=i.confirm().title("Are you sure want to delete the application?").htmlContent("<b>"+e.app+"</b> will be deleted.").ariaLabel("delete application").targetEvent(n).ok("OK").cancel("CANCEL");i.show(a).then(function(){r.chatWebsiteApps.rows.splice(t,1),l()},function(){console.log("CANCEL")})},r.getChatWebsiteApps=function(){r.promise=s.chatWebsite.getApplications(r.query,n).$promise},r.editChatWebsiteApp=t,r.editInterval=function(e,t){if(r.chatWebsiteApps.rows.length){var n=r.chatWebsiteApps.rows[t]?r.chatWebsiteApps.rows[t]:r.chatWebsiteApps.rows[0];i.show({controller:"EditChatWebsiteAppintervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/apps/interval/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:{interval:n.interval,IntervalId:n.IntervalId,application:!0},intervals:[]}}).then(function(e){e&&(n.interval=e.interval||"*,*,*,*",n.IntervalId=e.IntervalId||null,l())})}},r.deleteChatWebsiteApp=function(e){_.remove(r.chatWebsiteApps.rows,{id:e.id}),l(),o.success({title:"App deleted!",msg:e.app?e.app+" has been deleted!":""})},r.deleteSelectedChatWebsiteApps=function(e){var t=i.confirm().title("Are you sure want to delete the selected applications?").htmlContent("<b>"+r.selectedChatWebsiteApps.length+" selected</b> will be deleted.").ariaLabel("delete applications").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){r.selectedChatWebsiteApps.forEach(function(e){_.remove(r.chatWebsiteApps.rows,{id:e.id})}),r.selectedChatWebsiteApps=[],l()})},r.rewriteRouting=l,r.getIntervals=function(){return s.interval.get({fields:"id,interval,IntervalId"}).$promise.then(function(e){r.intervals=e}).catch(function(e){console.error(e)})}}e.$inject=["api","$mdDialog","$document","toasty","Auth"],angular.module("app.chat").controller("ChatWebsiteActionsController",e)}(),function(){"use strict";function e(e,a){var i=this;i.chatWebsite={},i.ngFlowOptions={maxChunkRetries:1,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,allowDuplicateUploads:!0},i.ngFlow={flow:{}},i.dropping=!1,i.fileAdded=function(e){var t=["png","jpg"];if(!_.includes(t,e.getExtension()))return a.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported only: "+t.join()}),!1;if(8388608<e.size)return a.error({title:"File too big",msg:"The max allowed size for image files is 8 Mb"}),!1;var n={id:e.uniqueIdentifier,file:e,type:"uploading"};return i.chatWebsite.images.unshift(n),!0},i.upload=function(){i.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+e.get("motion.token")},i.ngFlow.flow.upload()},i.fileSuccess=function(a,e){angular.forEach(i.chatWebsite.images,function(t,e){if(t.id===a.uniqueIdentifier){var n=new FileReader;n.readAsDataURL(t.file.file),n.onload=function(e){t.url=e.target.result},t.type="image"}})},i.init=function(e){i.chatWebsite=angular.copy(e),i.ngFlowOptions.target="/api/chat/websites/:id/avatar".replace(":id",i.chatWebsite.id),i.chatWebsite.images=[]}}e.$inject=["$cookies","toasty"],angular.module("app.chat").controller("ChatWebsiteagentAvatarController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="CHAT.EDIT_"+(e.appType||e.app).toUpperCase(),o.agent=angular.copy(e),o.agent.appdata)switch(o.agent.appType?o.agent.appType.toLowerCase():o.agent.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.agent.appdata.split(",");o.agent.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.agent.text=s.slice(1,s.length).join(",");break;case"message":o.agent.text=o.agent.appdata;break;case"set":o.agent.name=o.agent.appdata.split("=")[0],o.agent.value=o.agent.appdata.split("=")[1];break;case"agi":o.agent.project=o.agent.appdata;break;default:var r=o.agent.appdata.split(",");o.agent.agent=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.agent.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.agent.timeout=30;function l(e){t.hide(e)}o.agent.type&&"outbound"===o.agent.type.toLowerCase()&&"outbounddial"===o.agent.appType.toLowerCase()&&(o.agent.prefix=o.agent.phone?o.agent.phone.split("$")[0]:void 0,o.agent.callerId=o.agent.callerID?"CALLERID(all)="+o.agent.callerID:void 0),o.saveChatWebsiteApp=function(){o.errors=[];var e=[];o.agent.type&&"outbound"===o.agent.type.toLowerCase()&&"outboundDial"===o.agent.appType&&(o.agent.phone=a.cutdigits?(o.agent.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.agent.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.agent.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.agent.options+="U(xcally-mixmonitor-context)"):o.agent.options=o.agent.options.replace("U(xcally-mixmonitor-context)",""));var t=_.find(o.agents,{name:o.agent.agent});t&&(o.agent.UserId=t.id);if(o.agent.appType&&"custom"===o.agent.appType);else switch((o.agent.app||o.agent.appType).toLowerCase()){case"set":o.agent.appdata=o.agent.name+"="+o.agent.value;break;case"custom":break;default:e[0]=o.agent.agent,e[1]=o.agent.timeout,o.agent.appdata=e.join(",")}l(o.agent)},o.closeDialog=l,i.user.get({fields:"id,name",role:"agent",sort:"name",nolimit:"true"}).$promise.then(function(e){o.agents=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETagents",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","chatWebsiteApp","chatWebsite","api"],angular.module("app.chat").controller("EditChatWebsiteAppagentDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="CHAT.EDIT_"+(n.appType||n.app).toUpperCase(),o.autoreply=angular.copy(n),o.autoreply.appdata)switch(o.autoreply.appType?o.autoreply.appType.toLowerCase():o.autoreply.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.autoreply.appdata.split(",");o.autoreply.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.autoreply.text=s.slice(1,s.length).join(",");break;case"message":o.autoreply.text=o.autoreply.appdata;break;case"set":o.autoreply.name=o.autoreply.appdata.split("=")[0],o.autoreply.value=o.autoreply.appdata.split("=")[1];break;case"agi":o.autoreply.project=o.autoreply.appdata;break;default:var r=o.autoreply.appdata.split(",");o.autoreply.times=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.autoreply.text=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.autoreply.times=1;function l(e){t.hide(e)}o.autoreply.type&&"outbound"===o.autoreply.type.toLowerCase()&&"outbounddial"===o.autoreply.appType.toLowerCase()&&(o.autoreply.prefix=o.autoreply.phone?o.autoreply.phone.split("$")[0]:void 0,o.autoreply.callerId=o.autoreply.callerID?"CALLERID(all)="+o.autoreply.callerID:void 0),o.saveChatWebsiteApp=function(){o.errors=[];var e=[];o.autoreply.type&&"outbound"===o.autoreply.type.toLowerCase()&&"outboundDial"===o.autoreply.appType&&(o.autoreply.phone=a.cutdigits?(o.autoreply.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.autoreply.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.autoreply.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.autoreply.options+="U(xcally-mixmonitor-context)"):o.autoreply.options=o.autoreply.options.replace("U(xcally-mixmonitor-context)",""));if(o.autoreply.appType&&"custom"===o.autoreply.appType);else switch((o.autoreply.app||o.autoreply.appType).toLowerCase()){case"set":o.autoreply.appdata=o.autoreply.name+"="+o.autoreply.value;break;case"custom":break;default:e[0]=o.autoreply.times,e[1]=o.autoreply.text,o.autoreply.appdata=e.join(",")}l(o.autoreply)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","chatWebsiteApp","chatWebsite","api"],angular.module("app.chat").controller("EditChatWebsiteAppautoreplyDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="CHAT.EDIT_"+(n.appType||n.app).toUpperCase(),o.close=angular.copy(n),o.close.appdata)switch(o.close.appType?o.close.appType.toLowerCase():o.close.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.close.appdata.split(",");o.close.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.close.text=s.slice(1,s.length).join(",");break;case"message":o.close.text=o.close.appdata;break;case"set":o.close.name=o.close.appdata.split("=")[0],o.close.value=o.close.appdata.split("=")[1];break;case"agi":o.close.project=o.close.appdata;break;default:var r=o.close.appdata.split(",");o.close.disposition=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.close.type&&"outbound"===o.close.type.toLowerCase()&&"outbounddial"===o.close.appType.toLowerCase()&&(o.close.prefix=o.close.phone?o.close.phone.split("$")[0]:void 0,o.close.callerId=o.close.callerID?"CALLERID(all)="+o.close.callerID:void 0),o.saveChatWebsiteApp=function(){o.errors=[];var e=[];o.close.type&&"outbound"===o.close.type.toLowerCase()&&"outboundDial"===o.close.appType&&(o.close.phone=a.cutdigits?(o.close.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.close.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.close.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.close.options+="U(xcally-mixmonitor-context)"):o.close.options=o.close.options.replace("U(xcally-mixmonitor-context)",""));if(o.close.appType&&"custom"===o.close.appType);else switch((o.close.app||o.close.appType).toLowerCase()){case"set":o.close.appdata=o.close.name+"="+o.close.value;break;case"custom":break;default:e[0]=o.close.disposition,o.close.appdata=e.join(",")}l(o.close)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","chatWebsiteApp","chatWebsite","api"],angular.module("app.chat").controller("EditChatWebsiteAppcloseDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="CHAT.EDIT_"+(n.appType||n.app).toUpperCase(),o.gotoif=angular.copy(n),o.gotoif.appdata)switch(o.gotoif.appType?o.gotoif.appType.toLowerCase():o.gotoif.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.gotoif.appdata.split(",");o.gotoif.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.gotoif.text=s.slice(1,s.length).join(",");break;case"message":o.gotoif.text=o.gotoif.appdata;break;case"set":o.gotoif.name=o.gotoif.appdata.split("=")[0],o.gotoif.value=o.gotoif.appdata.split("=")[1];break;case"agi":o.gotoif.project=o.gotoif.appdata;break;default:var r=o.gotoif.appdata.split(",");o.gotoif.condition=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.gotoif.truepriority=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.gotoif.falsepriority=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10)}function l(e){t.hide(e)}o.gotoif.type&&"outbound"===o.gotoif.type.toLowerCase()&&"outbounddial"===o.gotoif.appType.toLowerCase()&&(o.gotoif.prefix=o.gotoif.phone?o.gotoif.phone.split("$")[0]:void 0,o.gotoif.callerId=o.gotoif.callerID?"CALLERID(all)="+o.gotoif.callerID:void 0),o.saveChatWebsiteApp=function(){o.errors=[];var e=[];o.gotoif.type&&"outbound"===o.gotoif.type.toLowerCase()&&"outboundDial"===o.gotoif.appType&&(o.gotoif.phone=a.cutdigits?(o.gotoif.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.gotoif.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.gotoif.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.gotoif.options+="U(xcally-mixmonitor-context)"):o.gotoif.options=o.gotoif.options.replace("U(xcally-mixmonitor-context)",""));if(o.gotoif.appType&&"custom"===o.gotoif.appType);else switch((o.gotoif.app||o.gotoif.appType).toLowerCase()){case"set":o.gotoif.appdata=o.gotoif.name+"="+o.gotoif.value;break;case"custom":break;default:e[0]=o.gotoif.condition,e[1]=o.gotoif.truepriority,e[2]=o.gotoif.falsepriority,o.gotoif.appdata=e.join(",")}l(o.gotoif)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","chatWebsiteApp","chatWebsite","api"],angular.module("app.chat").controller("EditChatWebsiteAppgotoifDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="CHAT.EDIT_"+(n.appType||n.app).toUpperCase(),o.gotop=angular.copy(n),o.gotop.appdata)switch(o.gotop.appType?o.gotop.appType.toLowerCase():o.gotop.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.gotop.appdata.split(",");o.gotop.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.gotop.text=s.slice(1,s.length).join(",");break;case"message":o.gotop.text=o.gotop.appdata;break;case"set":o.gotop.name=o.gotop.appdata.split("=")[0],o.gotop.value=o.gotop.appdata.split("=")[1];break;case"agi":o.gotop.project=o.gotop.appdata;break;default:var r=o.gotop.appdata.split(",");o.gotop.priority=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.gotop.type&&"outbound"===o.gotop.type.toLowerCase()&&"outbounddial"===o.gotop.appType.toLowerCase()&&(o.gotop.prefix=o.gotop.phone?o.gotop.phone.split("$")[0]:void 0,o.gotop.callerId=o.gotop.callerID?"CALLERID(all)="+o.gotop.callerID:void 0),o.saveChatWebsiteApp=function(){o.errors=[];var e=[];o.gotop.type&&"outbound"===o.gotop.type.toLowerCase()&&"outboundDial"===o.gotop.appType&&(o.gotop.phone=a.cutdigits?(o.gotop.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.gotop.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.gotop.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.gotop.options+="U(xcally-mixmonitor-context)"):o.gotop.options=o.gotop.options.replace("U(xcally-mixmonitor-context)",""));if(o.gotop.appType&&"custom"===o.gotop.appType);else switch((o.gotop.app||o.gotop.appType).toLowerCase()){case"set":o.gotop.appdata=o.gotop.name+"="+o.gotop.value;break;case"custom":break;default:e[0]=o.gotop.priority,o.gotop.appdata=e.join(",")}l(o.gotop)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","chatWebsiteApp","chatWebsite","api"],angular.module("app.chat").controller("EditChatWebsiteAppgotopDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;if(l.errors=[],l.title="TOOLS.EDIT_INTERVAL",l.interval=angular.copy(i),l.intervals=o,l.newInterval=!1,l.types=["always","custom","list"],l.daysOfWeek=a.getDaysOfWeek(),l.monthNumber=a.getMonthNumber(),l.monthName=a.getMonthName(),l.daysOfMonth=a.getDaysOfMonth(),l.interval)if("*,*,*,*"!==l.interval.interval){l.type="custom";var d=l.interval.interval.split(","),c=d[0],m=d[1],u=d[2],p=d[3];if("*"!==c){var g,v=c.split("-")[0],h=c.split("-")[1];(g=new Date).setHours(Number(v.split(":")[0])),g.setMinutes(Number(v.split(":")[1])),l.timeRangeFrom=g,(g=new Date).setHours(Number(h.split(":")[0])),g.setMinutes(Number(h.split(":")[1])),l.timeRangeTo=g}"*"!==m&&(l.dayOfWeekFrom=m.split("-")[0],l.dayOfWeekTo=m.split("-")[1]),"*"!==u&&(l.monthDayFrom=u.split("-")[0],l.monthDayTo=u.split("-")[1]),"*"!==p&&(l.monthFrom=p.split("-")[0],l.monthTo=p.split("-")[1])}else l.type="always";else l.interval={interval:"*,*,*,*"},l.type="always",l.title="TOOLS.NEW_INTERVAL",l.newInterval=!0;function b(){switch(l.type){case"always":case"list":return"*,*,*,*";case"custom":var e=[];if("*"!==l.timeRangeFrom&&l.timeRangeFrom&&l.timeRangeTo){var t=(l.timeRangeFrom.getHours()<10?"0":"")+l.timeRangeFrom.getHours()+":"+(l.timeRangeFrom.getMinutes()<10?"0":"")+l.timeRangeFrom.getMinutes(),n=(l.timeRangeTo.getHours()<10?"0":"")+l.timeRangeTo.getHours()+":"+(l.timeRangeTo.getMinutes()<10?"0":"")+l.timeRangeTo.getMinutes();e.push(t+"-"+n)}else e.push("*");return l.dayOfWeekFrom?l.dayOfWeekTo?e.push(l.dayOfWeekFrom+"-"+l.dayOfWeekTo):e.push(l.dayOfWeekFrom):e.push("*"),l.monthDayFrom?l.monthDayTo?e.push(l.monthDayFrom+"-"+l.monthDayTo):e.push(l.monthDayFrom):e.push("*"),l.monthFrom?l.monthTo?e.push(l.monthFrom+"-"+l.monthTo):e.push(l.monthFrom):e.push("*"),e.join()}}function f(e){t.hide(e)}e.params.id&&!l.interval.application&&(l.interval.IntervalId=e.params.id),l.interval.IntervalId&&l.interval.application&&(l.type="list"),l.addNewInterval=function(){l.errors=[],l.interval.interval=b(),r.interval.save(l.interval).$promise.then(function(e){l.intervals.push(e),s.success({title:"Interval properly created",msg:l.interval.name?l.interval.name+" has been created!":""}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}]})},l.saveInterval=function(){l.errors=[],l.interval.interval=b(),l.interval.application?("list"!==l.type&&(l.interval.IntervalId=null),f(l.interval)):r.interval.update({id:l.interval.id},l.interval).$promise.then(function(e){var t=_.find(l.intervals,{id:e.id});t&&_.merge(t,e),s.success({title:"Interval properly saved!",msg:"Interval has been saved!"}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}]})},l.closeDialog=f,l.interval.application&&r.interval.get({fields:"id,name,interval,IntervalId",IntervalId:"null",nolimit:!0}).$promise.then(function(e){l.intervals=e}).catch(function(e){console.error(e)})}e.$inject=["$state","$mdDialog","$mdToast","IndexFactory","interval","intervals","toasty","api"],angular.module("app.voice").controller("EditChatWebsiteAppintervalDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="CHAT.EDIT_"+(n.appType||n.app).toUpperCase(),o.noop=angular.copy(n),o.noop.appdata)switch(o.noop.appType?o.noop.appType.toLowerCase():o.noop.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.noop.appdata.split(",");o.noop.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.noop.text=s.slice(1,s.length).join(",");break;case"message":o.noop.text=o.noop.appdata;break;case"set":o.noop.name=o.noop.appdata.split("=")[0],o.noop.value=o.noop.appdata.split("=")[1];break;case"agi":o.noop.project=o.noop.appdata;break;default:var r=o.noop.appdata.split(",");o.noop.value=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.noop.type&&"outbound"===o.noop.type.toLowerCase()&&"outbounddial"===o.noop.appType.toLowerCase()&&(o.noop.prefix=o.noop.phone?o.noop.phone.split("$")[0]:void 0,o.noop.callerId=o.noop.callerID?"CALLERID(all)="+o.noop.callerID:void 0),o.saveChatWebsiteApp=function(){o.errors=[];var e=[];o.noop.type&&"outbound"===o.noop.type.toLowerCase()&&"outboundDial"===o.noop.appType&&(o.noop.phone=a.cutdigits?(o.noop.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.noop.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.noop.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.noop.options+="U(xcally-mixmonitor-context)"):o.noop.options=o.noop.options.replace("U(xcally-mixmonitor-context)",""));if(o.noop.appType&&"custom"===o.noop.appType);else switch((o.noop.app||o.noop.appType).toLowerCase()){case"set":o.noop.appdata=o.noop.name+"="+o.noop.value;break;case"custom":break;default:e[0]=o.noop.value,o.noop.appdata=e.join(",")}l(o.noop)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","chatWebsiteApp","chatWebsite","api"],angular.module("app.chat").controller("EditChatWebsiteAppnoopDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="CHAT.EDIT_"+(e.appType||e.app).toUpperCase(),o.queue=angular.copy(e),o.queue.appdata)switch(o.queue.appType?o.queue.appType.toLowerCase():o.queue.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.queue.appdata.split(",");o.queue.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.queue.text=s.slice(1,s.length).join(",");break;case"message":o.queue.text=o.queue.appdata;break;case"set":o.queue.name=o.queue.appdata.split("=")[0],o.queue.value=o.queue.appdata.split("=")[1];break;case"agi":o.queue.project=o.queue.appdata;break;default:var r=o.queue.appdata.split(",");o.queue.queue=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.queue.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.queue.queue=300,o.queue.timeout=300;function l(e){t.hide(e)}o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outbounddial"===o.queue.appType.toLowerCase()&&(o.queue.prefix=o.queue.phone?o.queue.phone.split("$")[0]:void 0,o.queue.callerId=o.queue.callerID?"CALLERID(all)="+o.queue.callerID:void 0),o.saveChatWebsiteApp=function(){o.errors=[];var e=[];o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outboundDial"===o.queue.appType&&(o.queue.phone=a.cutdigits?(o.queue.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.queue.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.queue.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.queue.options+="U(xcally-mixmonitor-context)"):o.queue.options=o.queue.options.replace("U(xcally-mixmonitor-context)",""));var t=_.find(o.queues,{name:o.queue.queue});t&&(o.queue[_.capitalize("chat")+"QueueId"]=t.id);if(o.queue.appType&&"custom"===o.queue.appType);else switch((o.queue.app||o.queue.appType).toLowerCase()){case"set":o.queue.appdata=o.queue.name+"="+o.queue.value;break;case"custom":break;default:e[0]=o.queue.queue,e[1]=o.queue.timeout,o.queue.appdata=e.join(",")}l(o.queue)},o.closeDialog=l,i.chatQueue.get({fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){o.queues=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","chatWebsiteApp","chatWebsite","api"],angular.module("app.chat").controller("EditChatWebsiteAppqueueDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="CHAT.EDIT_"+(e.appType||e.app).toUpperCase(),o.system=angular.copy(e),o.system.appdata)switch(o.system.appType?o.system.appType.toLowerCase():o.system.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.system.appdata.split(",");o.system.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.system.text=s.slice(1,s.length).join(",");break;case"message":o.system.text=o.system.appdata;break;case"set":o.system.name=o.system.appdata.split("=")[0],o.system.value=o.system.appdata.split("=")[1];break;case"agi":o.system.project=o.system.appdata;break;default:var r=o.system.appdata.split(",");o.system.command=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.system.variable=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.system.variable="";function l(e){t.hide(e)}o.system.type&&"outbound"===o.system.type.toLowerCase()&&"outbounddial"===o.system.appType.toLowerCase()&&(o.system.prefix=o.system.phone?o.system.phone.split("$")[0]:void 0,o.system.callerId=o.system.callerID?"CALLERID(all)="+o.system.callerID:void 0),o.saveChatWebsiteApp=function(){o.errors=[];var e=[];o.system.type&&"outbound"===o.system.type.toLowerCase()&&"outboundDial"===o.system.appType&&(o.system.phone=a.cutdigits?(o.system.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.system.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.system.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.system.options+="U(xcally-mixmonitor-context)"):o.system.options=o.system.options.replace("U(xcally-mixmonitor-context)",""));if(o.system.appType&&"custom"===o.system.appType);else switch((o.system.app||o.system.appType).toLowerCase()){case"set":o.system.appdata=o.system.name+"="+o.system.value;break;case"custom":break;default:e[0]=o.system.command,e[1]=o.system.variable,o.system.appdata=e.join(",")}l(o.system)},o.closeDialog=l,i.variable.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){o.variables=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvariables",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","chatWebsiteApp","chatWebsite","api"],angular.module("app.chat").controller("EditChatWebsiteAppsystemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.chatWebsite={},c.chatWebsiteChatCannedAnswers={count:0,rows:[]},c.selectedChatWebsiteChatCannedAnswers=[],c.query={fields:"createdAt,updatedAt,id,key,value,description,createdAt",limit:10,page:1},c.init=function(e){c.chatWebsite=e,c.query.id=c.chatWebsite.id,c.query.ChatWebsiteId=c.chatWebsite.id,c.getChatWebsiteChatCannedAnswers()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the chatCannedAnswer?").htmlContent("<b>"+(e.name||"chatCannedAnswer")+"</b> will be deleted.").ariaLabel("delete chatCannedAnswer").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getChatWebsiteChatCannedAnswers=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.chatWebsite.getAnswers(c.query,p).$promise},c.createOrEditChatWebsiteChatCannedAnswer=function(e,t){o.show({controller:"CreateOrEditChatCannedAnswerDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/chatCannedAnswers/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:c.chatWebsite,chatCannedAnswer:t,chatCannedAnswers:c.chatWebsiteChatCannedAnswers.rows,license:null,setting:null}})},c.exportSelectedChatWebsiteChatCannedAnswers=function(){var e=angular.copy(c.selectedChatWebsiteChatCannedAnswers);return c.selectedChatWebsiteChatCannedAnswers=[],e},c.deleteChatWebsiteChatCannedAnswer=g,c.deleteSelectedChatWebsiteChatCannedAnswers=function(e){var t=o.confirm().title("Are you sure want to delete the selected chatCannedAnswers?").htmlContent("<b>"+c.selectedChatWebsiteChatCannedAnswers.length+" selected</b> will be deleted.").ariaLabel("delete chatCannedAnswers").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedChatWebsiteChatCannedAnswers.forEach(function(e){g(e)}),c.selectedChatWebsiteChatCannedAnswers=[]})};var m=!0,u=1;function p(e){c.chatWebsiteChatCannedAnswers=e||{count:0,rows:[]}}function g(e){l.cannedAnswer.delete({id:e.id}).$promise.then(function(){_.remove(c.chatWebsiteChatCannedAnswers.rows,{id:e.id}),c.chatWebsiteChatCannedAnswers.count-=1,c.chatWebsiteChatCannedAnswers.rows.length||c.getChatWebsiteChatCannedAnswers(),r.success({title:"ChatCannedAnswer deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETchatWebsite"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatWebsite",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getChatWebsiteChatCannedAnswers())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.chat").controller("ChatWebsiteChatCannedAnswersController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CHAT.EDIT_CHATCANNEDANSWER",m.chatCannedAnswer=angular.copy(s),m.chatCannedAnswers=o,m.newChatCannedAnswer=!1,m.chatCannedAnswer||(m.chatCannedAnswer={},m.title="CHAT.NEW_CHATCANNEDANSWER",m.newChatCannedAnswer=!0),t.params.id&&(m.chatCannedAnswer.ChatWebsiteId=t.params.id),m.addNewChatCannedAnswer=function(){m.errors=[],r.cannedAnswer.save(m.chatCannedAnswer).$promise.then(function(e){m.chatCannedAnswers.unshift(e.toJSON()),i.success({title:"ChatCannedAnswer properly created",msg:m.chatCannedAnswer.name?m.chatCannedAnswer.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveChatCannedAnswer=function(){m.errors=[],r.cannedAnswer.update({id:m.chatCannedAnswer.id},m.chatCannedAnswer).$promise.then(function(e){var t=_.find(m.chatCannedAnswers,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"ChatCannedAnswer properly saved!",msg:m.chatCannedAnswer.name?m.chatCannedAnswer.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteChatCannedAnswer=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The chatCannedAnswer will be deleted.").ariaLabel("Delete ChatCannedAnswer").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.cannedAnswer.delete({id:m.chatCannedAnswer.id}).$promise.then(function(){_.remove(m.chatCannedAnswers,{id:m.chatCannedAnswer.id}),i.success({title:"ChatCannedAnswer properly deleted!",msg:(m.chatCannedAnswer.name||"chatCannedAnswer")+" has been deleted!"}),u(m.chatCannedAnswer)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","chatCannedAnswers","chatCannedAnswer","api","Auth","license","setting"],angular.module("app.chat").controller("CreateOrEditChatCannedAnswerDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.chatWebsite={},c.chatWebsiteChatDispositions={count:0,rows:[]},c.selectedChatWebsiteChatDispositions=[],c.query={fields:"createdAt,updatedAt,id,name,createdAt",limit:10,page:1},c.init=function(e){c.chatWebsite=e,c.query.id=c.chatWebsite.id,c.query.ChatWebsiteId=c.chatWebsite.id,c.getChatWebsiteChatDispositions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the chatDisposition?").htmlContent("<b>"+(e.name||"chatDisposition")+"</b> will be deleted.").ariaLabel("delete chatDisposition").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getChatWebsiteChatDispositions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.chatWebsite.getDispositions(c.query,p).$promise},c.createOrEditChatWebsiteChatDisposition=function(e,t){o.show({controller:"CreateOrEditChatDispositionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/chatDispositions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:c.chatWebsite,chatDisposition:t,chatDispositions:c.chatWebsiteChatDispositions.rows,license:null,setting:null}})},c.exportSelectedChatWebsiteChatDispositions=function(){var e=angular.copy(c.selectedChatWebsiteChatDispositions);return c.selectedChatWebsiteChatDispositions=[],e},c.deleteChatWebsiteChatDisposition=g,c.deleteSelectedChatWebsiteChatDispositions=function(e){var t=o.confirm().title("Are you sure want to delete the selected chatDispositions?").htmlContent("<b>"+c.selectedChatWebsiteChatDispositions.length+" selected</b> will be deleted.").ariaLabel("delete chatDispositions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedChatWebsiteChatDispositions.forEach(function(e){g(e)}),c.selectedChatWebsiteChatDispositions=[]})};var m=!0,u=1;function p(e){c.chatWebsiteChatDispositions=e||{count:0,rows:[]}}function g(e){l.chatDisposition.delete({id:e.id}).$promise.then(function(){_.remove(c.chatWebsiteChatDispositions.rows,{id:e.id}),c.chatWebsiteChatDispositions.count-=1,c.chatWebsiteChatDispositions.rows.length||c.getChatWebsiteChatDispositions(),r.success({title:"ChatDisposition deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETchatWebsite"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatWebsite",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getChatWebsiteChatDispositions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.chat").controller("ChatWebsiteChatDispositionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CHAT.EDIT_CHATDISPOSITION",m.chatDisposition=angular.copy(s),m.chatDispositions=o,m.newChatDisposition=!1,m.chatDisposition||(m.chatDisposition={},m.title="CHAT.NEW_CHATDISPOSITION",m.newChatDisposition=!0),t.params.id&&(m.chatDisposition.ChatWebsiteId=t.params.id),m.addNewChatDisposition=function(){m.errors=[],r.chatDisposition.save(m.chatDisposition).$promise.then(function(e){m.chatDispositions.unshift(e.toJSON()),i.success({title:"ChatDisposition properly created",msg:m.chatDisposition.name?m.chatDisposition.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatDisposition.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatDisposition.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveChatDisposition=function(){m.errors=[],r.chatDisposition.update({id:m.chatDisposition.id},m.chatDisposition).$promise.then(function(e){var t=_.find(m.chatDispositions,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"ChatDisposition properly saved!",msg:m.chatDisposition.name?m.chatDisposition.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatDisposition.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatDisposition.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteChatDisposition=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The chatDisposition will be deleted.").ariaLabel("Delete ChatDisposition").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.chatDisposition.delete({id:m.chatDisposition.id}).$promise.then(function(){_.remove(m.chatDispositions,{id:m.chatDisposition.id}),i.success({title:"ChatDisposition properly deleted!",msg:(m.chatDisposition.name||"chatDisposition")+" has been deleted!"}),u(m.chatDisposition)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatDisposition.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatDisposition.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","chatDispositions","chatDisposition","api","Auth","license","setting"],angular.module("app.chat").controller("CreateOrEditChatDispositionDialogController",e)}(),function(){"use strict";function e(n,e,a){var i=this;i.chatWebsite={},i.offlineForm={},i.buttons=[{type:"label",name:"Label",icon:"icon-label"},{type:"chooseFromList",name:"Select",icon:"icon-playlist-plus"},{type:"input",name:"Input",icon:"icon-keyboard"},{type:"textarea",name:"Textarea",icon:"icon-format-text"},{type:"multipleChoices",name:"Radio Buttons",icon:"icon-radiobox-marked"},{type:"checkboxes",name:"Checkboxes",icon:"icon-checkbox-multiple-marked-outline"},{type:"agreement",name:"Agreement",icon:"icon-checkbox-marked-outline"}],i.init=function(e){i.fields=[],i.customFields=[],i.uselessFields=["id","createdAt","updatedAt","ListId","CompanyId","$promise","$resolved"],i.chatWebsite=e,_.isEmpty(i.chatWebsite.offlineForm)&&(i.chatWebsite.offlineForm={items:[],fromKey:null});a.cmList.getCustomFields({id:i.chatWebsite.ListId}).$promise.then(function(e){for(var t=0;t<e.rows.length;t++)i.customFields.push({key:"cf_"+e.rows[t].id,value:e.rows[t].alias});return a.cmContact.describe().$promise}).then(function(e){for(var t=_.keys(e),n=0;n<t.length;n++)_.includes(i.uselessFields,t[n])||_.startsWith(t[n],"cf_")||i.fields.unshift({key:t[n],value:t[n]});return a.variable.get().$promise}).then(function(e){i.variables=e.rows}).catch(function(e){console.error(e)})},i.up=function(e,t){if(0!==t){var n=i.chatWebsite.offlineForm.items[t-1];i.chatWebsite.offlineForm.items[t]=n,i.chatWebsite.offlineForm.items[t-1]=angular.copy(e),i.chatWebsite.offlineForm.fromKey===t?i.chatWebsite.offlineForm.fromKey--:i.chatWebsite.offlineForm.fromKey===t-1&&i.chatWebsite.offlineForm.fromKey++}},i.down=function(e,t){if(t!==i.chatWebsite.offlineForm.items.length-1){var n=i.chatWebsite.offlineForm.items[t+1];i.chatWebsite.offlineForm.items[t]=n,i.chatWebsite.offlineForm.items[t+1]=angular.copy(e),i.chatWebsite.offlineForm.fromKey===t?i.chatWebsite.offlineForm.fromKey++:i.chatWebsite.offlineForm.fromKey===t+1&&i.chatWebsite.offlineForm.fromKey--}},i.add=function(e){i.chatWebsite.offlineForm.items.push({type:e,cmField:null,variable:null})},i.remove=function(e){var t=n.confirm().title("The component will be deleted.").textContent("Are you sure?").ariaLabel("Lucky day").ok("Ok").cancel("Cancel");n.show(t).then(function(){i.chatWebsite.offlineForm.items.splice(e,1)})}}e.$inject=["$mdDialog","$document","api"],angular.module("app.chat").controller("ChatWebsiteofflineFormController",e)}(),function(){"use strict";function e(n,e,a){var i=this;i.chatWebsite={},i.onlineForm={},i.buttons=[{type:"label",name:"Label",icon:"icon-label"},{type:"chooseFromList",name:"Select",icon:"icon-playlist-plus"},{type:"input",name:"Input",icon:"icon-keyboard"},{type:"textarea",name:"Textarea",icon:"icon-format-text"},{type:"multipleChoices",name:"Radio Buttons",icon:"icon-radiobox-marked"},{type:"checkboxes",name:"Checkboxes",icon:"icon-checkbox-multiple-marked-outline"},{type:"agreement",name:"Agreement",icon:"icon-checkbox-marked-outline"}],i.init=function(e){i.fields=[],i.customFields=[],i.uselessFields=["id","createdAt","updatedAt","ListId","CompanyId","$promise","$resolved"],i.chatWebsite=e,_.isEmpty(i.chatWebsite.onlineForm)&&(i.chatWebsite.onlineForm={items:[],fromKey:null});a.cmList.getCustomFields({id:i.chatWebsite.ListId}).$promise.then(function(e){for(var t=0;t<e.rows.length;t++)i.customFields.push({key:"cf_"+e.rows[t].id,value:e.rows[t].alias});return a.cmContact.describe().$promise}).then(function(e){for(var t=_.keys(e),n=0;n<t.length;n++)_.includes(i.uselessFields,t[n])||_.startsWith(t[n],"cf_")||i.fields.unshift({key:t[n],value:t[n]});return a.variable.get().$promise}).then(function(e){i.variables=e.rows}).catch(function(e){console.error(e)})},i.up=function(e,t){if(0!==t){var n=i.chatWebsite.onlineForm.items[t-1];i.chatWebsite.onlineForm.items[t]=n,i.chatWebsite.onlineForm.items[t-1]=angular.copy(e),i.chatWebsite.onlineForm.fromKey===t?i.chatWebsite.onlineForm.fromKey--:i.chatWebsite.onlineForm.fromKey===t-1&&i.chatWebsite.onlineForm.fromKey++}},i.down=function(e,t){if(t!==i.chatWebsite.onlineForm.items.length-1){var n=i.chatWebsite.onlineForm.items[t+1];i.chatWebsite.onlineForm.items[t]=n,i.chatWebsite.onlineForm.items[t+1]=angular.copy(e),i.chatWebsite.onlineForm.fromKey===t?i.chatWebsite.onlineForm.fromKey++:i.chatWebsite.onlineForm.fromKey===t+1&&i.chatWebsite.onlineForm.fromKey--}},i.add=function(e){i.chatWebsite.onlineForm.items.push({type:e,cmField:null,variable:null})},i.remove=function(e){var t=n.confirm().title("The component will be deleted.").textContent("Are you sure?").ariaLabel("Lucky day").ok("Ok").cancel("Cancel");n.show(t).then(function(){i.chatWebsite.onlineForm.fromKey===e&&(i.chatWebsite.onlineForm.fromKey=null),i.chatWebsite.onlineForm.items.splice(e,1),i.chatWebsite.onlineForm.items.length||(i.chatWebsite.onlineForm.fromKey=null)})}}e.$inject=["$mdDialog","$document","api"],angular.module("app.chat").controller("ChatWebsiteonlineFormController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.chatWebsite={},c.chatWebsiteInteractions={count:0,rows:[]},c.selectedChatWebsiteInteractions=[],c.query={fields:"createdAt,updatedAt,UserId,ContactId,ChatWebsiteId,id,createdAt,closedAt,Contact.firstName,Owner.name,disposition,ratingValue,ratingType,note,tag",sort:"-createdAt",includeAll:"true",limit:10,page:1},c.init=function(e){c.chatWebsite=e,c.query.id=c.chatWebsite.id,c.getChatWebsiteInteractions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the interaction?").htmlContent("<b>"+(e.name||"interaction")+"</b> will be deleted.").ariaLabel("delete interaction").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getChatWebsiteInteractions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.chatWebsite.getInteractions(c.query,p).$promise},c.createOrEditChatWebsiteInteraction=function(e,t){o.show({controller:"CreateOrEditInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/interactions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:c.chatWebsite,interaction:t,interactions:c.chatWebsiteInteractions.rows,license:null,setting:null}})},c.spychatInteraction=function(e,n){o.show({controller:"AgentGeneralInteractionController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/agent.general.interaction.dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,onShowing:function(e,t){e.vm.init({id:1,channel:"chat",interaction:n,spy:!0})}})},c.exportSelectedChatWebsiteInteractions=function(){var e=angular.copy(c.selectedChatWebsiteInteractions);return c.selectedChatWebsiteInteractions=[],e},c.deleteChatWebsiteInteraction=g,c.deleteSelectedChatWebsiteInteractions=function(e){var t=o.confirm().title("Are you sure want to delete the selected interactions?").htmlContent("<b>"+c.selectedChatWebsiteInteractions.length+" selected</b> will be deleted.").ariaLabel("delete interactions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedChatWebsiteInteractions.forEach(function(e){g(e)}),c.selectedChatWebsiteInteractions=[]})};var m=!0,u=1;function p(e){c.chatWebsiteInteractions=e||{count:0,rows:[]}}function g(e){l.chatInteraction.delete({id:e.id}).$promise.then(function(){_.remove(c.chatWebsiteInteractions.rows,{id:e.id}),c.chatWebsiteInteractions.count-=1,c.chatWebsiteInteractions.rows.length||c.getChatWebsiteInteractions(),r.success({title:"Interaction deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETchatWebsite"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatWebsite",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getChatWebsiteInteractions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.chat").controller("ChatWebsiteInteractionsController",e)}(),function(){"use strict";function e(e,a){var i=this;i.chatWebsite={},i.ngFlowOptions={maxChunkRetries:1,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,allowDuplicateUploads:!0},i.ngFlow={flow:{}},i.dropping=!1,i.fileAdded=function(e){var t=["png","jpg"];if(!_.includes(t,e.getExtension()))return a.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported only: "+t.join()}),!1;if(8388608<e.size)return a.error({title:"File too big",msg:"The max allowed size for image files is 8 Mb"}),!1;var n={id:e.uniqueIdentifier,file:e,type:"uploading"};return i.chatWebsite.images.unshift(n),!0},i.upload=function(){i.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+e.get("motion.token")},i.ngFlow.flow.upload()},i.fileSuccess=function(a,e){angular.forEach(i.chatWebsite.images,function(t,e){if(t.id===a.uniqueIdentifier){var n=new FileReader;n.readAsDataURL(t.file.file),n.onload=function(e){t.url=e.target.result},t.type="image"}})},i.init=function(e){i.chatWebsite=angular.copy(e),i.ngFlowOptions.target="/api/chat/websites/:id/logo".replace(":id",i.chatWebsite.id),i.chatWebsite.images=[]}}e.$inject=["$cookies","toasty"],angular.module("app.chat").controller("ChatWebsitelogoController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.chatWebsite={},c.chatWebsiteOfflineMessages={count:0,rows:[]},c.selectedChatWebsiteOfflineMessages=[],c.query={fields:"createdAt,updatedAt,id,ContactId,createdAt",sort:"-createdAt",limit:10,page:1},c.init=function(e){c.chatWebsite=e,c.query.id=c.chatWebsite.id,c.getChatWebsiteOfflineMessages()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the offlineMessage?").htmlContent("<b>"+(e.name||"offlineMessage")+"</b> will be deleted.").ariaLabel("delete offlineMessage").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getChatWebsiteOfflineMessages=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.chatWebsite.getOfflineMessages(c.query,p).$promise},c.createOrEditChatWebsiteOfflineMessage=function(e,t){o.show({controller:"CreateOrEditOfflineMessageDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/offlineMessages/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:c.chatWebsite,offlineMessage:t,offlineMessages:c.chatWebsiteOfflineMessages.rows,license:null,setting:null}})},c.showOfflineMessageChatWebsiteOfflineMessage=function(e,n){o.show({controller:"ShowOfflineMessageOfflineMessageDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/offlineMessages/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,resolve:{message:["apiResolver","$stateParams",function(e,t){return e.resolve("chatOfflineMessage@get",{fields:"id,body",id:n.id})}]}})},c.exportSelectedChatWebsiteOfflineMessages=function(){var e=angular.copy(c.selectedChatWebsiteOfflineMessages);return c.selectedChatWebsiteOfflineMessages=[],e},c.deleteChatWebsiteOfflineMessage=g,c.deleteSelectedChatWebsiteOfflineMessages=function(e){var t=o.confirm().title("Are you sure want to delete the selected offlineMessages?").htmlContent("<b>"+c.selectedChatWebsiteOfflineMessages.length+" selected</b> will be deleted.").ariaLabel("delete offlineMessages").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedChatWebsiteOfflineMessages.forEach(function(e){g(e)}),c.selectedChatWebsiteOfflineMessages=[]})},l.cmContact.get({fields:"id,firstName,lastName",nolimit:"true"}).$promise.then(function(e){c.contacts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontacts",msg:e.data?JSON.stringify(e.data):e.toString()})});var m=!0,u=1;function p(e){c.chatWebsiteOfflineMessages=e||{count:0,rows:[]}}function g(e){l.chatOfflineMessage.delete({id:e.id}).$promise.then(function(){_.remove(c.chatWebsiteOfflineMessages.rows,{id:e.id}),c.chatWebsiteOfflineMessages.count-=1,c.chatWebsiteOfflineMessages.rows.length||c.getChatWebsiteOfflineMessages(),r.success({title:"OfflineMessage deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETchatWebsite"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatWebsite",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getChatWebsiteOfflineMessages())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.chat").controller("ChatWebsiteOfflineMessagesController",e)}(),function(){"use strict";function e(t,e){this.title="CHAT.OFFLINE_MESSAGE",this.message=e,this.closeDialog=function(e){t.hide(e)}}e.$inject=["$mdDialog","message"],angular.module("app.chat").controller("ShowOfflineMessageOfflineMessageDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.chatWebsite={},c.chatWebsiteProactiveActions={count:0,rows:[]},c.selectedChatWebsiteProactiveActions=[],c.query={fields:"createdAt,updatedAt,id,name,type,selector,timeout,createdAt",limit:10,page:1},c.arraytype=_.keyBy([{option:"MouseOver",value:"'mouseOver'"},{option:"Timeout",value:"'timeout'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.init=function(e){c.chatWebsite=e,c.query.id=c.chatWebsite.id,c.query.ChatWebsiteId=c.chatWebsite.id,c.getChatWebsiteProactiveActions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the chatProactiveAction?").htmlContent("<b>"+(e.name||"chatProactiveAction")+"</b> will be deleted.").ariaLabel("delete chatProactiveAction").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getChatWebsiteProactiveActions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.chatWebsite.getProactiveActions(c.query,p).$promise},c.createOrEditChatWebsiteChatProactiveAction=function(e,t){o.show({controller:"CreateOrEditChatProactiveActionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/proactive/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:c.chatWebsite,chatProactiveAction:t,proactive:c.chatWebsiteProactiveActions.rows,license:null,setting:null}})},c.exportSelectedChatWebsiteProactiveActions=function(){var e=angular.copy(c.selectedChatWebsiteProactiveActions);return c.selectedChatWebsiteProactiveActions=[],e},c.deleteChatWebsiteChatProactiveAction=g,c.deleteSelectedChatWebsiteProactiveActions=function(e){var t=o.confirm().title("Are you sure want to delete the selected proactive?").htmlContent("<b>"+c.selectedChatWebsiteProactiveActions.length+" selected</b> will be deleted.").ariaLabel("delete proactive").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedChatWebsiteProactiveActions.forEach(function(e){g(e)}),c.selectedChatWebsiteProactiveActions=[]})};var m=!0,u=1;function p(e){c.chatWebsiteProactiveActions=e||{count:0,rows:[]}}function g(e){l.chatProactiveAction.delete({id:e.id}).$promise.then(function(){_.remove(c.chatWebsiteProactiveActions.rows,{id:e.id}),c.chatWebsiteProactiveActions.count-=1,c.chatWebsiteProactiveActions.rows.length||c.getChatWebsiteProactiveActions(),r.success({title:"ChatProactiveAction deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETchatWebsite"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatWebsite",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getChatWebsiteProactiveActions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.chat").controller("ChatWebsiteProactiveActionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CHAT.EDIT_CHATPROACTIVEACTION",m.chatProactiveAction=angular.copy(s),m.proactive=o,m.newChatProactiveAction=!1,m.chatProactiveAction||(m.chatProactiveAction={type:"mouseOver"},m.title="CHAT.NEW_CHATPROACTIVEACTION",m.newChatProactiveAction=!0),t.params.id&&(m.chatProactiveAction.ChatWebsiteId=t.params.id),m.addNewChatProactiveAction=function(){m.errors=[],r.chatProactiveAction.save(m.chatProactiveAction).$promise.then(function(e){m.proactive.unshift(e.toJSON()),i.success({title:"ChatProactiveAction properly created",msg:m.chatProactiveAction.name?m.chatProactiveAction.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatProactiveAction.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatProactiveAction.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveChatProactiveAction=function(){m.errors=[],r.chatProactiveAction.update({id:m.chatProactiveAction.id},m.chatProactiveAction).$promise.then(function(e){var t=_.find(m.proactive,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"ChatProactiveAction properly saved!",msg:m.chatProactiveAction.name?m.chatProactiveAction.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatProactiveAction.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatProactiveAction.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteChatProactiveAction=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The chatProactiveAction will be deleted.").ariaLabel("Delete ChatProactiveAction").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.chatProactiveAction.delete({id:m.chatProactiveAction.id}).$promise.then(function(){_.remove(m.proactive,{id:m.chatProactiveAction.id}),i.success({title:"ChatProactiveAction properly deleted!",msg:(m.chatProactiveAction.name||"chatProactiveAction")+" has been deleted!"}),u(m.chatProactiveAction)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatProactiveAction.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatProactiveAction.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","proactive","chatProactiveAction","api","Auth","license","setting"],angular.module("app.chat").controller("CreateOrEditChatProactiveActionDialogController",e)}(),function(){"use strict";function e(e){var t=this;t.chatWebsite={},t.init=function(e){t.chatWebsite=e,t.start="\n\x3c!-- START Motion Chat Script --\x3e",t.script='\n    <script src="'+t.chatWebsite.remote+"/api/chat/websites/"+t.chatWebsite.id+"/snippet?token="+t.chatWebsite.token+'"><\/script>',t.end="\n\x3c!-- START Motion Chat Script --\x3e"},t.info={},e.$watch("vm_ac.chatWebsite.remote",function(e){t.script='\n    <script src="'+t.chatWebsite.remote+"/api/chat/websites/"+t.chatWebsite.id+"/snippet?token="+t.chatWebsite.token+'"><\/script>'})}e.$inject=["$scope"],angular.module("app.chat").controller("ChatWebsiteScriptController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.chatWebsite=d||e.params.chatWebsite||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoChatWebsites=function(){e.go("app.chat.chatWebsites")},c.saveChatWebsite=function(){s.chatWebsite.update({id:c.chatWebsite.id},c.chatWebsite).$promise.then(function(){r.success({title:"ChatWebsite updated!",msg:c.chatWebsite.name?c.chatWebsite.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatWebsite",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.lists=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.template.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.templates=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtemplates",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.interval.get({fields:"id,name",sort:"name",IntervalId:"null"}).$promise.then(function(e){c.interval=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","chatWebsite"],angular.module("app.chat").controller("ChatWebsiteController",e)}(),function(){"use strict";function e(e,s,t,n,a,i,o,r,l,d,c,m,u,p,g,v){var h=this,b=["userpic","online","lastLoginAt","lastPauseAt","pauseType","lastPauseAt","internal","address","chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","chatCapacity","openchannelCapacity","mailCapacity","smsCapacity","faxCapacity","chatCurrentCapacity","openchannelCurrentCapacity","mailCurrentCapacity","smsCurrentCapacity","faxCurrentCapacity","chatStatus","openchannelStatus","mailStatus","smsStatus","faxStatus","voiceStatus","chatStatusTime","openchannelStatusTime","mailStatusTime","smsStatusTime","faxStatusTime","voiceStatusTime","queue","destconnectedlinenum"],f=["chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","online"];for(var A in h.availableStates=["ringing","inuse","busy","onhold","not_inuse"],h.pauses=o||{count:0,rows:[]},h.license=g,h.agents=r?_.keyBy(r.rows?r.rows:[],"id"):{},h.rpcAgents=l?_.keyBy(l.rows?l.rows:[],"id"):{},h.paginatedAgents={},h.load=!1,h.order=[],h.agentInternal={},h.agents)h.agents.hasOwnProperty(A)&&(h.agents[A].init=!0);h.query={limit:10,page:1,order:"fullname",globalStatusFilter:"",pauseTypeFilter:""},h.logout=function(e,t){return d.user.logout({id:e.id}).$promise.then(function(){m.success({title:"Agent logout",msg:e.fullname+"  properly logout"}),h.agents[e.id]&&(h.agents[e.id].online=!1),h.rpcAgents[e.id]&&(h.rpcAgents[e.id].online=!1),y()}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.queueAdd=function(e,t){n.show({controller:"AgentqueueaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/queueadd/queueadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{agent:e,agents:[],channel:"chat",realtime:!0,direction:"inbound"}})},h.pause=function(t,e){return d.user.pause({id:t.id,type:e}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.unPause=function(t){return d.user.unpause({id:t.id}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.showInfo=function(e){n.show(n.alert().clickOutsideToClose(!0).title("Legend").htmlContent("<div>TODO legend status + state</div>").ok("Ok").targetEvent(e))},h.getAgentStatus=C,h.getAgentGlobalStatus=x,h.isPause=S,h.checkPause=function(e){return"pause"===e},h.isPartialPause=function(e){return"*pause"===e},h.onSave=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(_.omit(e,f),b)),_.merge(h.rpcAgents[e.id],_.pick(_.omit(e,f),b)),x(h.agents[e.id]))},h.onUpdate=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(e,b)),_.merge(h.rpcAgents[e.id],_.pick(e,b)),x(h.agents[e.id]))},h.onInit=y,h.onConnect=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(_.merge(h.agents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])),_.merge(h.rpcAgents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])))},h.onComplete=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(h.agents[h.agentInternal[e.destaccountcode]]=_.omit(h.agents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]),h.rpcAgents[h.agentInternal[e.destaccountcode]]=_.omit(h.rpcAgents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]))},c.on("user:save",h.onSave),c.on("user:update",h.onUpdate),c.on("user:agentconnect",h.onConnect),c.on("user:agentcomplete",h.onComplete),y();var E=v(function(){h.load&&(h.load=!1,y())},999);function y(e){h.load=!1;var t,n,a=s.defer();h.promise=a.promise,h.filteredAgents=[],h.order=[],_.forIn(h.agents,function(e,t){h.rpcAgents[t]&&_.merge(e,_.pick(_.omit(h.rpcAgents[t],f),b)),x(e),e.online?(h.filteredAgents.push(e),h.agentInternal[e.internal]=t):e.globalStatusTime=_.toNumber(moment().format("x"))}),h.query.globalStatusFilter&&_.remove(h.filteredAgents,function(e){return e.globalStatus!==h.query.globalStatusFilter}),h.query.pauseTypeFilter&&_.remove(h.filteredAgents,function(e){return e.pauseType!==h.query.pauseTypeFilter}),h.query.filter&&_.remove(h.filteredAgents,function(e){return e.fullname.toLowerCase().indexOf(h.query.filter.toLowerCase())<0}),h.filteredAgents=(t=h.filteredAgents,n=_.startsWith(h.query.order,"-")?"desc":"asc",_.orderBy(t,[h.query.order.replace("-","")],[n]));var i=(h.query.page-1)*h.query.limit;h.paginatedAgents=_.drop(h.filteredAgents,i).slice(0,h.query.limit);for(var o=0;o<h.paginatedAgents.length;o+=1)h.order.push(h.paginatedAgents[o].id);a.resolve(),h.load=!0}function S(e){return"pause"===e||"*pause"===e}function T(e){return"idle"===e||"unknown"===e||"unavailable"===e||"ringing"===e||_.isNil(e)}function C(e,t){return"voice"===t?"idle"!==e[t+"Status"]?e[t+"Status"]:e[t+"Pause"]?e[t+"Status"]="pause":"idle":e[t+"Pause"]?e[t+"Status"]="pause":e[t+"Status"]}function x(e){var t="unknown";t=_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"pause":_.some([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"*pause":_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],T)?"idle":"busy",e.globalStatus!==t&&(e.globalStatus=t,e.init?(e.init=!1,e.globalStatusTime=S(t)?_.toNumber(moment(e.lastPauseAt).format("x")):_.max([e.voiceStatusTime,e.chatStatusTime,e.mailStatusTime,e.smsStatusTime,e.openchannelStatusTime,e.faxStatusTime])):e.globalStatusTime=_.toNumber(moment().format("x")))}e.$on("$destroy",function(){c.removeAllListeners("user:save"),c.removeAllListeners("user:update"),c.removeAllListeners("user:agentconnect"),c.removeAllListeners("user:agentcomplete"),E&&(v.cancel(E),E=null)})}e.$inject=["$scope","$q","$timeout","$mdDialog","$document","$filter","pauses","agents","rpcAgents","api","socket","toasty","helperClasses","Auth","license","$interval"],angular.module("app.voice").controller("AgentsChatRealtimeController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r,l,d,c,m){var u=this,p=["loggedIn","available","waiting","talking","pTalking","originated","message","dialActive","dialMethod","Trunk","paused"];function g(){var n=[];return _.forIn(u.queues,function(e,t){e.paused=0,e.loggedInDb=0,u.queues[t].agents={},n.push(l.chatQueue.getMembers({id:t}).$promise),u.rpcQueues[t]&&_.merge(e,_.pick(u.rpcQueues[t],p))}),t.all(n).then(function(e){for(var t=0;t<e.length;t+=1)for(var n=0;n<e[t].rows.length;n++)e[t].rows[n].paused&&u.queues[e[t].rows[n].ChatQueueId].paused++,u.queues[e[t].rows[n].ChatQueueId].loggedInDb++,u.queues[e[t].rows[n].ChatQueueId].agents[e[t].rows[n].UserId]=e[t].rows[n].ChatQueueId}).catch(function(e){console.error(e)})}u.count=s.count?s.count:0,u.queues=s?_.keyBy(s.rows?s.rows:[],"id"):{},u.rpcQueues=r?_.keyBy(r.rows?r.rows:[],"id"):{},m.hasRole("admin")?u.query={type:"inbound",sort:"-updatedAt",limit:10,page:1}:u.query={id:m.getCurrentUser().id,channel:"chat",type:"inbound",sort:"-updatedAt",limit:10,page:1},u.success=b,u.getQueues=function(){u.query.offset=(u.query.page-1)*u.query.limit,m.hasRole("admin")?u.promise=l.chatQueue.get(u.query,b).$promise:u.promise=l.user.getQueues(u.query,b).$promise},u.createOrEditChatQueue=function(e,t){a.show({controller:"CreateOrEditChatQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatQueues/create/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatQueue:t,chatQueues:_.values(u.queues),license:null,setting:null}})},u.agentAdd=function(e,t){a.show({controller:"ChatQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatQueues/edit/agentadd/agentadd.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatQueue:t,chatQueues:u.queues?u.queues.rows:[],realtime:!1}})},u.updateQueue=function(e){return l.chatQueue.update(e).$promise.then(function(){c.success({title:"Queue properly updated!",msg:e.name?e.name+" has been updated!":""})}).catch(function(e){c.error({title:"Error creating queue!",msg:e.message})})},u.onSave=function(e){u.queues[e.id]&&_.merge(u.queues[e.id],_.pick(e,p))},u.onSaveMember=function(e){u.queues[e.ChatQueueId]&&u.queues[e.ChatQueueId].loggedInDb++},u.onRemoveMember=function(e){u.queues[e.ChatQueueId]&&u.queues[e.ChatQueueId].loggedInDb--},u.onPause=function(n){console.log("onPause",n),n.voicePause?_.forIn(u.queues,function(e,t){e.agents[n.id]&&(e.paused+=1,console.log("pause"))}):n.voicePause||_.forIn(u.queues,function(e,t){e.agents[n.id]&&0<e.paused&&(e.paused-=1,console.log("unpause"))})},u.onLogin=function(e){console.log("onLogged",e),u.queues[e.ChatQueueId]&&(u.queues[e.ChatQueueId].loggedInDb+=1,u.queues[e.ChatQueueId].agents[e.UserId]=e.ChatQueueId)},u.onLogout=function(e){console.log("onLogout",e),u.queues[e.ChatQueueId]&&0<u.queues[e.ChatQueueId].loggedInDb&&(u.queues[e.ChatQueueId].loggedInDb-=1,delete u.queues[e.ChatQueueId].agents[e.UserId])},u.$onInit=g,u.order=[],_.forIn(u.queues,function(e,t){u.order.push(e.id)}),d.on("chat_queue:save",u.onSave),d.on("userChatQueue:save",u.onSaveMember),d.on("userChatQueue:remove",u.onRemoveMember),d.on("user:update",u.onPause),d.on("userVoiceQueue:remove",u.onLogout),d.on("userVoiceQueue:save",u.onLogin);var v=!0,h=1;function b(e){if(u.count=e.count,u.queues=e?_.keyBy(e.rows?e.rows:[],"id"):{},e.rows){u.order=[];for(var t=0;t<e.rows.length;t++)u.order.push(e.rows[t].id)}g()}e.$watch("vm.query.filter",function(e,t){v?n(function(){v=!1}):(t||(h=u.query.page),e!==t&&(u.query.page=1),e||(u.query.page=h),u.getQueues())}),e.$on("$destroy",function(){d.removeAllListeners("chat_queue:save"),d.removeAllListeners("userChatQueue:remove"),d.removeAllListeners("userChatQueue:save"),d.removeAllListeners("user:update"),d.removeAllListeners("userVoiceQueue:remove"),d.removeAllListeners("userVoiceQueue:save")})}e.$inject=["$scope","$timeout","$mdDialog","$q","$document","$interval","queues","rpcQueues","api","socket","toasty","Auth"],angular.module("app.chat").controller("QueuesChatRealtimeController",e)}(),function(){"use strict";angular.module("app.auth").factory("helperClasses",function(){return{status:{registered:"green-300-fg icon-checkbox-marked-circle",unregistered:"red-300-fg icon-close-circle",lagged:"red-300-fg icon-close-circle",reachable:"green-300-fg icon-checkbox-marked-circle",unreachable:"red-300-fg icon-close-circle",unknown:"grey-fg icon-minus-circle"},state:{unknown:"grey-fg icon-phone-hangup",not_inuse:"green-300-fg icon-phone-hangup",inuse:"red-300-fg icon-phone-in-talk",busy:"red-300-fg icon-phone-locked",invalid:"grey-fg icon-phone-hangup",unavailable:"grey-fg icon-phone-hangup",ringing:"blue-300-fg icon-phone-incoming",ringinuse:"blue-300-fg icon-phone-incoming",onhold:"blue-300-fg icon-phone-paused"},channelStatus:{ring:"blue-300-fg icon-phone-incoming",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"},channelStatusOut:{ring:"blue-300-fg icon-phone-outgoing",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"}}})}(),function(){"use strict";function e(e,n,t){switch(t.disconnect(),t.connect(),this.selectedTab=0,n.current.name){case"app.chat.realtime.agents":this.selectedTab=0;break;case"app.chat.realtime.queues":this.selectedTab=1;break;default:this.selectedTab=0,n.go("app.chat.realtime.agents")}e.$watch("vm.selectedTab",function(e,t){if(e!==t)switch(e){case 0:n.go("app.chat.realtime.agents");break;case 1:n.go("app.chat.realtime.queues");break;default:n.go("app.chat.realtime.agents")}})}e.$inject=["$scope","$state","socket"],angular.module("app.chat").controller("ChatRealtimeController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.companies=r||{count:0,rows:[]},v.table="companies",v.listOrder="",v.listOrderAsc=null,v.selectedCompanies=[],v.query={fields:"createdAt,updatedAt,id,name,phone,vat,fax,companyId,type,website,emailDomain,email,description,sStreet,sPostalCode,sCity,sCountry,street,postalCode,city,country",sort:"-updatedAt",limit:10,page:1},v.editstate=function(e,t){n.go("app.contactmanager.companies.edit",{id:e.id,company:e})},v.gotocontactsgoto=function(e,t){n.go("app.contactmanager.contacts",{CompanyId:e.id})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the company?").htmlContent("<b>"+(e.name||"company")+"</b> will be deleted.").ariaLabel("delete company").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getCompanies=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.cmCompany.get(v.query,f).$promise},v.createOrEditCompany=function(e,t){i.show({controller:"CreateOrEditCompanyDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/companies/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{company:t,companies:v.companies.rows,license:v.license,setting:v.setting}})},v.deleteCompany=A,v.exportSelectedCompanies=function(){var e=angular.copy(v.selectedCompanies);return v.selectedCompanies=[],e},v.deleteSelectedCompanies=function(e){var t=i.confirm().title("Are you sure want to delete the selected companies?").htmlContent("<b>"+v.selectedCompanies.length+" selected</b> will be deleted.").ariaLabel("delete Companys").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedCompanies.forEach(function(e){A(e)}),v.selectedCompanies=[]})},v.deselectCompanies=function(){v.selectedCompanies=[]},v.selectAllCompanies=function(){v.selectedCompanies=v.companies.rows};var h=!0,b=1;function f(e){v.companies=e||{count:0,rows:[]}}function A(e){l.cmCompany.delete({id:e.id}).$promise.then(function(){_.remove(v.companies.rows,{id:e.id}),v.companies.count-=1,v.companies.rows.length||v.getCompanies(),c.success({title:"Company deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEcmCompany"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEcmCompany",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getCompanies())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","companies","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.contactmanager").controller("CompaniesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CONTACTMANAGER.EDIT_COMPANY",m.company=angular.copy(s),m.companies=o,m.newCompany=!1,m.company||(m.company={},m.title="CONTACTMANAGER.NEW_COMPANY",m.newCompany=!0),m.addNewCompany=function(){m.errors=[],r.cmCompany.save(m.company).$promise.then(function(e){m.companies.unshift(e.toJSON()),i.success({title:"Company properly created",msg:m.company.name?m.company.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmCompany.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmCompany.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveCompany=function(){m.errors=[],r.cmCompany.update({id:m.company.id},m.company).$promise.then(function(e){var t=_.find(m.companies,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Company properly saved!",msg:m.company.name?m.company.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmCompany.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmCompany.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteCompany=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The company will be deleted.").ariaLabel("Delete Company").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.cmCompany.delete({id:m.company.id}).$promise.then(function(){_.remove(m.companies,{id:m.company.id}),i.success({title:"Company properly deleted!",msg:(m.company.name||"company")+" has been deleted!"}),u(m.company)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmCompany.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmCompany.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","companies","company","api","Auth","license","setting"],angular.module("app.contactmanager").controller("CreateOrEditCompanyDialogController",e)}(),function(){"use strict";function e(n,e,t,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=e.protocol()+"://"+e.host(),c.company=d||n.params.company||{},c.selectedTab=n.params.tab||0,c.gotogoto=function(e,t){n.go("app.contactmanager.contacts",{CompanyId:e.id})},c.alert=r.info,c.gotoCompanies=function(){n.go("app.contactmanager.companies")},c.saveCompany=function(){s.cmCompany.update({id:c.company.id},c.company).$promise.then(function(){r.success({title:"Company updated!",msg:c.company.name?c.company.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcmCompany",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","company"],angular.module("app.contactmanager").controller("CompanyController",e)}(),function(){"use strict";function e(t,i,n,a,o,s,e,r,l,d,c,m,u,p,g,v){var h=this;h.currentUser=p.getCurrentUser();h.license=v,h.ngFlowOptions={target:"api/cm/contacts/upload",singleFile:!0,maxChunkRetries:1,chunkSize:62914560,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,allowDuplicateUploads:!0},h.contacts=e||{count:0,rows:[]},h.options={hidden:!1,hover:!1,isOpen:!1},h.table="cm_contacts",h.selectedContacts=[],h.lists=r||{rows:[],count:0},h.companies=d||{rows:[],count:0},h.tags=m||{rows:[],count:0},h.listsMap=l,h.companiesMap=c,h.selectedTags=[],h.selectedList=null,h.selectedCompany=null,h.query=_.merge({sort:"-updatedAt",limit:10,offset:0,page:1},g),h.editdialog=function(e,t){a.go("app.contactmanager.contacts.edit",{id:e.id})},h.deleteconfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the contact?").htmlContent("<b>"+(e.firstName||e.email||e.phone||"Contact")+"</b> will be deleted.").ariaLabel("delete contact").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){E(e)})},h.success=A,h.getContacts=function(){h.query.offset=(h.query.page-1)*h.query.limit,h.promise=s.cmContact.get(h.query,A).$promise},h.mergeContact=function(e,t){o.show({controller:"MergeContactDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/merge/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,resolve:{contact:["apiResolver",function(e){return e.resolve("cmContact@get",{id:t.id})}],lists:["apiResolver",function(e){return e.resolve("cmList@get",{fields:"id,name"})}]},locals:{contacts:h.contacts.rows}})},h.duplicateContact=function(e,t){o.show({controller:"DuplicateContactDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/duplicate/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,resolve:{contact:["apiResolver",function(e){return e.resolve("cmContact@get",{id:t.id})}],lists:["apiResolver",function(e){return e.resolve("cmList@get",{fields:"id,name"})}]},locals:{contacts:h.contacts.rows}})},h.createOrEditContact=function(e,t){t&&t.dateOfBirth&&(t.dateOfBirth=new Date(t.dateOfBirth));o.show({controller:"CreateOrEditContactDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/create/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{ListId:h.query.ListId||a.params.ListId,CompanyId:h.query.CompanyId||a.params.CompanyId,contact:t,contacts:h.contacts.rows,setting:null},resolve:{lists:["apiResolver",function(e){return e.resolve("cmList@get",{fields:"id,name"})}],companies:["apiResolver",function(e){return e.resolve("cmCompany@get",{fields:"id,name"})}]}})},h.deleteContact=E,h.exportSelectedContacts=function(){var e=angular.copy(h.selectedContacts);return h.selectedContacts=[],e},h.deleteSelectedContacts=function(e){var t=o.confirm().title("Are you sure want to delete the selected contacts?").htmlContent("<b>"+h.selectedContacts.length+" selected</b> will be deleted.").ariaLabel("delete Contacts").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){h.selectedContacts.forEach(function(e){E(e)}),h.selectedContacts=[]})},h.deselectContacts=function(){h.selectedContacts=[]},h.selectAllContacts=function(){h.selectedContacts=h.contacts.rows},h.createTag=function(e){var t=o.prompt().title("What would you name your tag?").placeholder("Tag name").ariaLabel("Tag name").targetEvent(e).ok("Ok").cancel("Cancel");return o.show(t).then(function(e){if(e)return s.tag.save({name:e});u.error({title:"Error creating tag!",msg:"Invalid tag name."})}).then(function(e){e&&(h.tags.rows.push(e),u.success({title:"Tag properly created!",msg:e.tag?e.name+" has been created!":""}))})},h.createList=function(e){var t=o.prompt().title("What would you name your list?").placeholder("List name").ariaLabel("List name").targetEvent(e).ok("Ok").cancel("Cancel");return o.show(t).then(function(e){if(e)return s.cmList.save({name:e});u.error({title:"Error creating list!",msg:"Invalid list name."})}).then(function(e){e&&(h.lists.rows.push(e),u.success({title:"List properly created!",msg:e.name?e.name+" has been created!":""}))})},h.createCompany=function(e){var t=o.prompt().title("What would you name your company?").placeholder("Company name").ariaLabel("Company name").targetEvent(e).ok("Ok").cancel("Cancel");return o.show(t).then(function(e){if(e)return s.cmCompany.save({name:e});u.error({title:"Error creating company!",msg:"Invalid company name."})}).then(function(e){e&&(h.companies.rows.push(e),u.success({title:"Company properly created!",msg:e.name?e.name+" has been created!":""}))})},h.uploadContacts=function(e){o.show({controller:"UploadContactsDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/upload/upload.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!1,locals:{lists:r,companies:d}}).then(function(){h.getContacts()}).catch(function(e){console.error()})},h.importContacts=function(e,t,n){var a=JSON.parse(t);o.show({controller:"ImportContactsDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/import/import.html",parent:angular.element(i.body),clickOutsideToClose:!1,locals:{lists:r,companies:d,file:a.file,fields:a.fields,license:h.license}}).then(function(){h.getContacts()}).catch(function(e){console.error()})},h.hasPermission=function(){return p.hasPermission(303)||p.hasRole("admin")},a.params.ListId&&(h.selectedList=a.params.ListId),a.params.CompanyId&&(h.selectedCompany=a.params.CompanyId),t.$watch("vm.options.isOpen",function(e){e?n(function(){t.tooltipVisible=h.options.isOpen},600):t.tooltipVisible=h.options.isOpen});var b=!0,f=1;function A(e){h.contacts=e||{count:0,rows:[]}}function E(e){s.cmContact.delete({id:e.id}).$promise.then(function(){_.remove(h.contacts.rows,{id:e.id}),h.contacts.count-=1,h.contacts.rows.length||h.getContacts(),u.success({title:"Contact deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){h.errors=e.data.errors||[{message:e.toString(),type:"api.contact.delete"}];for(var t=0;t<e.data.errors.length;t++)u.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else u.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.contact.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm.query.filter",function(e,t){b?n(function(){b=!1}):(t||(f=h.query.page),e!==t&&(h.query.page=1),e||(h.query.page=f),h.getContacts())},!0),t.$watch("vm.selectedList",function(e,t){e!==t&&(h.query.ListId=h.selectedList||void 0,h.getContacts())}),t.$watch("vm.selectedCompany",function(e,t){e!==t&&(h.query.CompanyId=h.selectedCompany||void 0,h.getContacts())}),t.$watch("vm.selectedTags",function(e,t){(e.length||t.length)&&(h.query.tags=h.selectedTags.length?h.selectedTags.join():void 0,h.getContacts())})}e.$inject=["$scope","$document","$timeout","$state","$mdDialog","api","contacts","lists","listsMap","companies","companiesMap","tags","toasty","Auth","$stateParams","license"],angular.module("app.contactmanager").controller("ContactsController",e)}(),function(){"use strict";function e(n,a,e,t,i,o,s,r,l){var d=this;function c(){n.hide()}d.errors=[],d.title="CONTACTMANAGER.EDIT_CONTACT",d.contact=angular.copy(o),d.contacts=e||{rows:[],count:0},d.lists=t||{rows:[],count:0},d.companies=i||{rows:[],count:0},d.customFields={rows:[],count:0},d.newContact=!1,d.contact?(delete d.contact.List,d.ListId=d.contact.ListId||void 0):(d.contact={ListId:s?parseInt(s,10):void 0,CompanyId:r?parseInt(r,10):void 0},d.title="CONTACTMANAGER.NEW_CONTACT",d.newContact=!0),d.addNewContact=function(){d.errors=[],l.cmContact.save(d.contact).$promise.then(function(e){d.contacts.unshift(e),a.success({title:"Contact properly created",msg:d.contact.name?d.contact.name+" has been created!":""}),c()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){d.errors=e.data.errors||[{message:e.toString(),type:"api.user.save"}];for(var t=0;t<e.data.errors.length;t++)a.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.contacts.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},d.saveContact=function(){d.errors=[],l.cmContact.update({id:d.contact.id},d.contact).$promise.then(function(e){var t=_.find(d.contacts,{id:e.id});t&&_.merge(t,e),a.success({title:"Contact properly saved!",msg:d.contact.name?d.contact.name+" has been saved!":""}),c()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){d.errors=e.data.errors||[{message:e.toString(),type:"api.contact.update"}];for(var t=0;t<e.data.errors.length;t++)a.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.contact.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},d.deleteContact=function(e){d.errors=[];var t=n.confirm().title("Are you sure?").content("The contact will be deleted.").ariaLabel("Delete Contact").ok("Delete").cancel("Cancel").targetEvent(e);n.show(t).then(function(){l.cmContact.delete({id:d.contact.id}).$promise.then(function(){_.remove(d.contacts,{id:d.contact.id}),a.success({title:"Contact properly deleted!",msg:d.contact.name?d.contact.name+" has been deleted!":""}),c()}).catch(function(e){console.error(e),d.errors=e.data.errors||[{message:e.toString(),type:"api.contact.delete"}]})},function(){})},d.closeDialog=c,d.getCustomFields=function(e){{if(e)return l.cmList.getCustomFields({id:e}).$promise.then(function(e){e&&(d.customFields=e)}).catch(function(e){console.error(e)});d.customFields={rows:[],count:0}}},d.getDateFromString=function(e){return new Date(e)}}e.$inject=["$mdDialog","toasty","contacts","lists","companies","contact","ListId","CompanyId","api"],angular.module("app.tools").controller("CreateOrEditContactDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o){var s=this;function r(){e.hide()}s.errors=[],s.title="CONTACTMANAGER.COPY_CONTACT",s.contact=angular.copy(n),s.lists=i||{rows:[],count:0},s.addNewContact=function(){s.errors=[],delete s.contact.id,s.contact.tags&&!s.contact.tags.length&&delete s.contact.tags;o.cmContact.save(s.contact).$promise.then(function(e){a.unshift(e),t.success({title:"Contact properly created",msg:s.contact.name?s.contact.name+" has been created!":""}),r()}).catch(function(e){console.error(e),s.errors=e.data.errors||[{message:e.toString(),type:"api.contact.save"}]})},s.closeDialog=r}e.$inject=["$mdDialog","toasty","contact","contacts","lists","api"],angular.module("app.tools").controller("DuplicateContactDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;function d(e){a.hide(e)}l.errors=[],l.title="CONTACTMANAGER.EDIT_HOPPER",l.hopper=angular.copy(s),l.hoppers=o,l.newHopper=!1,l.hopper||(l.hopper={},l.title="CONTACTMANAGER.NEW_HOPPER",l.newHopper=!0),l.saveHopper=function(){l.errors=[],r.cmHopper.update({id:l.hopper.id},l.hopper).$promise.then(function(e){var t=_.find(l.hoppers,{id:e.id});t&&_.merge(t,e),i.success({title:"Hopper properly saved!",msg:l.hopper.name?l.hopper.name+" has been saved!":""}),d(e)}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.cmHopper.update"}]})},l.getDateFromString=function(e){return new Date(e)},l.closeDialog=d}e.$inject=["$scope","$state","$location","$mdDialog","toasty","hoppers","hopper","api"],angular.module("app.contactmanager.contacts").controller("EditHopperDialogController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d,c,m,u,p,g,v,h,b){var f=this;f.license=b,f.contact=r||{},f.hoppers=l||{rows:[],count:0},f.finals=d||{rows:[],count:0},f.histories=c||{rows:[],count:0},f.companies=u||{rows:[],count:0},f.lists=p||{rows:[],count:0},f.customFields=g||{rows:[],count:0},f.tags=v||{rows:[],count:0},f.jscriptySessions=h||{rows:[],count:0},f.arraypriority=_.keyBy([{option:"Highest",value:"'4'"},{option:"High",value:"'3'"},{option:"Medium",value:"'2'"},{option:"Low",value:"'1'"},{option:"Lowest",value:"'0'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),f.queryHopper={fields:"id,phone,scheduledat,priority,recallme,VoiceQueueId,CampaignId,UserId",sort:"-updatedAt",limit:10,page:1},f.queryFinal={fields:"id,uniqueid,calleridnum,statedesc,starttime,disposition",sort:"-id",limit:10,page:1},f.queryHistory={fields:"id,uniqueid,calleridnum,statedesc,scheduledat,starttime,endtime",sort:"-id",limit:10,page:1},f.queryJscriptySession={fields:"id,starttime,endtime,membername,projectname",sort:"-starttime",limit:10,page:1},f.selectedTab=t.params.tab||0,f.gotoContacts=function(){t.go("app.contactmanager.contacts",{},{reload:!0,notify:!0})},f.duplicateContact=function(e){i.show({controller:"DuplicateContactDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/duplicate/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,resolve:{lists:["apiResolver",function(e){return e.resolve("cmList@get",{fields:"id,name"})}]},locals:{contacts:m.rows,contact:r}})},f.saveContact=function(){s.cmContact.update({id:f.contact.id},f.contact).$promise.then(function(){o.success({title:"Contact updated!",msg:f.contact.name?f.contact.name+" has been updated!":""})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATEcontact",msg:e.data?JSON.stringify(e.data):e.toString()})})},f.editCompany=function(e,t){i.show({controller:"CreateOrEditCompanyDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/companies/create/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{companies:[],license:null,setting:null},resolve:{company:["apiResolver",function(e){return e.resolve("cmCompany@get",{id:t})}]}})},f.onSelectList=function(e){if(f.contact.ListId){var t=i.confirm().title("You are selecting the list number: "+f.contact.ListId).textContent("Warning! You won't select a different list for the contact "+f.contact.firstName||f.contact.lastName||f.contact.id).targetEvent(e).ok("Ok").cancel("Cancel");return i.show(t).then(f.onSelectListSuccess).catch(function(){f.contact.ListId=null})}},f.onSelectListSuccess=function(){return s.cmList.getCustomFields({id:f.contact.ListId}).$promise.then(function(e){f.customFields=e||{rows:[],count:0}}).catch(function(e){console.error(e)})},f.getDateFromString=function(e){return new Date(e)},f.getHoppers=function(){f.queryHopper.offset=(f.queryHopper.page-1)*f.queryHopper.limit,f.queryHopper.id=f.contact.id,f.promise=s.cmContact.getHoppers(f.queryHopper,y("hoppers")).$promise},f.getFinals=function(){f.queryFinal.offset=(f.queryFinal.page-1)*f.queryFinal.limit,f.queryFinal.id=f.contact.id,f.promise=s.cmContact.getHopperFinals(f.queryFinal,y("finals")).$promise},f.getHistories=function(){f.queryHistory.offset=(f.queryHistory.page-1)*f.queryHistory.limit,f.queryHistory.id=f.contact.id,f.promise=s.cmContact.getHopperHistories(f.queryHistory,y("histories")).$promise},f.getJscriptySessions=function(){f.queryJscriptySession.offset=(f.queryJscriptySession.page-1)*f.queryJscriptySession.limit,f.queryJscriptySession.id=f.contact.id,f.promise=s.cmContact.getJscriptySessions(f.queryJscriptySession,y("jscriptySessions")).$promise},f.deleteconfirm=function(t,e){var n=i.confirm().title("Are you sure want to delete the agent?").htmlContent("<b>"+(t.phone||"hopper")+"</b> will be deleted.").ariaLabel("delete hopper").targetEvent(e).ok("OK").cancel("CANCEL");i.show(n).then(function(){var e;e=t,s.cmHopper.delete({id:e.id}).$promise.then(function(){_.remove(f.hoppers.rows,{id:e.id}),f.hoppers.count--,f.hoppers.rows.length||f.getHoppers(),o.success({title:"Hopper deleted!",msg:e.phone?e.phone+" has been deleted!":""})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEhopper",msg:e.data?JSON.stringify(e.data):e.toString()})})},function(){console.log("CANCEL")})},f.editHopper=function(e,t){i.show({controller:"CreateOrEditHopperVoiceQueueIdDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/hoppers/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{hopper:t,hoppers:f.hoppers.rows,license:null,setting:null}})},f.createOrEditIvrCampaignHopper=function(e,t){i.show({controller:"CreateOrEditHopperCampaignIdDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/hoppers/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{hopper:t,hoppers:f.hoppers.rows,license:null,setting:null}})};var A=!0,E=1;function y(t){return function(e){f[t]=e||{count:0,rows:[]}}}e.$watch("vm.queryHopper.filter",function(e,t){A?n(function(){A=!1}):(t||(E=f.queryHopper.page),e!==t&&(f.queryHopper.page=1),e||(f.queryHopper.page=E),f.getHoppers())}),e.$watch("vm.queryFinal.filter",function(e,t){A?n(function(){A=!1}):(t||(E=f.queryFinal.page),e!==t&&(f.queryFinal.page=1),e||(f.queryFinal.page=E),f.getFinals())}),e.$watch("vm.queryHistory.filter",function(e,t){A?n(function(){A=!1}):(t||(E=f.queryHistory.page),e!==t&&(f.queryHistory.page=1),e||(f.queryHistory.page=E),f.getHistories())})}e.$inject=["$scope","$timeout","$state","$document","$mdDialog","toasty","api","contact","hoppers","finals","histories","contacts","companies","lists","customFields","tags","jscriptySessions","license"],angular.module("app.contactmanager.contacts").controller("ContactController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p){var g=this;g.processing=!1,g.stopping=!0,g.license=p,g.pid=0,g.result={finish:!1,rows:0,affectedRows:0,failedRows:0,duplicatedRows:0,errors:[]},g.contactFields=[{key:"firstName",required:!0},{key:"lastName",required:!1},{key:"phone",required:!0},{key:"mobile",required:!1},{key:"email",required:!1},{key:"dateOfBirth",required:!1},{key:"country",required:!1},{key:"city",required:!1},{key:"street",required:!1},{key:"postalCode",required:!1},{key:"fax",required:!1}],g.motionBullFields=[{key:"UserId",required:!1},{key:"scheduledat",required:!1},{key:"priority",required:!1}],g.binding={},g.duplicate=[],g.lists=o||{rows:[],count:0},g.companies=s||{rows:[],count:0},g.customFields={rows:[],count:0},g.fields=u||[],g.closeDialog=function(){d.removeAllListeners("contact:import:"+v),t.hide()},g.onChangeList=function(){return l.cmList.getCustomFields({id:g.ListId}).$promise.then(function(e){g.customFields=e}).catch(function(e){console.error(e)})},g.uploadCsv=function(){g.processing=moment(),l.cmContact.import({id:m.filename,binding:g.binding,ListId:g.ListId,CompanyId:g.CompanyId,duplicates:g.duplicates,socket_timestamp:v}).$promise.then(function(e){g.stopping=!1,e&&e.pid&&(g.pid=e.pid)}).catch(function(e){g.processing=!1,r.error({title:"Import process failed!",msg:"Please retry with a new file"})})},g.getHeaderErrors=function(){var e=u;return e.push("contact_import_error"),e},g.getArrayErrors=function(){for(var e=[],t=0;t<g.result.errors.length;t+=1){var n=g.result.errors[t].row;n.contact_import_error=g.result.errors[t].message,e.push(n)}return e},g.stopUpload=function(){if(g.stopping=!0,g.pid)return l.system.killProcess({pid:g.pid}).$promise.then(function(e){r.success({title:"CSV import process stopped!",msg:"Import has been stopped!"})}).catch(function(e){r.error({title:"CSV stop import process failed!",msg:"pid is unknown"})})};var v=moment().unix();d.on("contact:import:"+v,function(n){i(function(){if(g.result.rows=n.rows,n.errors)for(var e=0;e<n.errors.length;e++)g.result.errors.push(n.errors[e]);if(n.finish){g.result.finish=!0,g.result.affectedRows=n.affectedRows,g.result.failedRows=g.result.errors.length;var t=g.result.rows-g.result.affectedRows-g.result.errors.length;t&&0<t&&(g.duplicates.length?g.result.duplicatedRows=t:g.result.failedRows+=t),g.result.elapsed=moment().diff(g.processing,"seconds")}})}),c.$on("$destroy",function(){d.removeAllListeners("contact:import:"+v)})}e.$inject=["$cookies","$mdDialog","$interval","$q","$timeout","lists","companies","toasty","api","socket","$scope","file","fields","license"],angular.module("app.tools").controller("ImportContactsDialogController",e)}(),function(){"use strict";function e(i,e,o,t,s,n,r){var a=this;a.errors=[],a.title="CONTACTMANAGER.MERGE_CONTACT",a.contact=angular.copy(t),a.lists=n||[],a.change=function(){a.searchTerm?r.cmContact.get({fields:"id,firstName,lastName,phone,email",filter:a.searchTerm,ListId:t.ListId}).$promise.then(function(e){a.contacts=e.rows}).catch(function(e){console.error(e)}):a.contacts=[]},a.showConfirm=function(e,t,n){var a=i.confirm().title("Would you like to merge your contacs?").textContent("All unfilled values of the contact #"+n.id+" will be overwritten by the fields of the contact #"+t.id+".").targetEvent(e).ok("Ok").cancel("Cancel");i.show(a).then(function(){return r.cmContact.merge({to:n.id,from:t.id}).$promise}).then(function(e){_.remove(s,{id:n.id}),_.remove(s,{id:t.id}),s.unshift(e)}).then(function(){o.success({title:"Contact properly merged!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:MERGE_CONTACT",msg:e.data?JSON.stringify(e.data):e.toString()})})},a.closeDialog=function(){i.hide()}}e.$inject=["$mdDialog","$scope","toasty","contact","contacts","lists","api"],angular.module("app.tools").controller("MergeContactDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this,u=moment().unix();d.on("contact:csv_"+u,function(t){i(function(){m.uploading=!0,m.success+=t.success,m.errors+=t.errors,m.duplicate+=t.duplicates;for(var e=0;e<t.rows.length;e+=1)m.rows.push(t.rows[e]);t.finished&&(m.uploading=!1,m.finished=!0,m.disableStopButton=!0)})}),m.uploading=!1,m.showStopButton=!1,m.success=0,m.errors=0,m.duplicate=0,m.rows=[],m.contactFields=[{key:"firstName",required:!0},{key:"lastName",required:!1},{key:"phone",required:!0},{key:"mobile",required:!1},{key:"email",required:!1},{key:"dateOfBirth",required:!1},{key:"country",required:!1},{key:"city",required:!1},{key:"street",required:!1},{key:"postalCode",required:!1},{key:"fax",required:!1}],m.binding={},m.lists=o||{rows:[],count:0},m.companies=s||{rows:[],count:0},m.customFields={rows:[],count:0},m.ngFlowOptions={maxChunkRetries:1,chunkSize:15728640,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,target:"api/cm/contacts/csv",allowDuplicateUploads:!0},m.ngFlow={flow:{}},m.closeDialog=function(){d.removeAllListeners("contact:csv_"+u),t.hide()},m.onChangeList=function(){return l.cmList.getCustomFields({id:m.ListId}).$promise.then(function(e){m.customFields=e}).catch(function(e){console.error(e)})},m.uploadCsv=function(){m.uploading=!0,m.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+e.get("motion.token")},m.ngFlow.flow.opts.query={},m.ngFlow.flow.opts.query.binding_keys=_.keys(m.binding),m.ngFlow.flow.opts.query.binding_values=_.values(m.binding),m.ngFlow.flow.opts.query.ListId=m.ListId,m.ngFlow.flow.opts.query.socket_timestamp=u,m.CompanyId&&(m.ngFlow.flow.opts.query.CompanyId=m.CompanyId);m.duplicates&&(m.ngFlow.flow.opts.query.duplicates=m.duplicates);console.log("Flow options are:",m.ngFlow.flow.opts),m.ngFlow.flow.upload()},m.exportErrors=function(){for(var e=angular.copy(m.rows),t=0;t<e.length;t+=1)e[t].contact&&(e[t].contact=JSON.stringify(e[t].contact));return angular.copy(e)},m.fileAdded=function(e,t,n){Papa.parse(t.file,{skipEmptyLines:!0,header:!0,complete:function(e){console.log("csv file resultss",e),m.fields=e.meta.fields,m.fileSelected=!0,c.$apply()}})},m.fileSuccess=function(e,t,n){console.log("filessuccess",e,t,n);try{var a=JSON.parse(t);if(!a.pid)throw new Error("No pid parameter from api response!");m.pid=a.pid,m.showStopButton=!0}catch(e){console.error("Unable to parse upload result",e)}},m.stopUpload=function(){if(m.disableStopButton=!1,m.pid)return l.system.killProcess({pid:m.pid}).$promise.then(function(e){console.log("CSV upload process stopped!")}).catch(function(e){console.error(e)});console.error("pid is not defined")},c.$on("$destroy",function(){d.removeAllListeners("contact:csv_"+u)})}e.$inject=["$cookies","$mdDialog","$interval","$q","$timeout","lists","companies","toasty","api","socket","$scope"],angular.module("app.tools").controller("UploadContactsDialogController",e)}(),function(){"use strict";function e(a,e,t,n,i,o,s,r,l,d,c){var m=this;function u(e){n.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CONTACTMANAGER.EDIT_GLOBALCUSTOMFIELD",m.sortable={animation:800,sort:!0,onSort:function(e){a.globalCustomFieldForm.$pristine=!1}},m.globalCustomField=s,m.globalCustomFields=o,m.newGlobalCustomField=!1,m.globalCustomField||(m.globalCustomField={type:"text"},m.title="CONTACTMANAGER.NEW_GLOBALCUSTOMFIELD",m.newGlobalCustomField=!0),a.$watch("vm.globalCustomField.type",function(e,t){if(e!==t)switch(e){case"text":m.globalCustomField.values="";break;case"select":m.globalCustomField.values=[]}}),m.addNewGlobalCustomField=function(){m.errors=[],r.cmCustomField.save(m.globalCustomField).$promise.then(function(e){m.globalCustomFields.unshift(e.toJSON()),i.success({title:"GlobalCustomField properly created",msg:m.globalCustomField.name?m.globalCustomField.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmCustomField.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmCustomField.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveGlobalCustomField=function(){m.errors=[],r.cmCustomField.update({id:m.globalCustomField.id},m.globalCustomField).$promise.then(function(e){var t=_.find(m.globalCustomFields,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"GlobalCustomField properly saved!",msg:m.globalCustomField.name?m.globalCustomField.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmCustomField.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmCustomField.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteGlobalCustomField=function(e){m.errors=[];var t=n.confirm().title("Are you sure?").content("The globalCustomField will be deleted.").ariaLabel("Delete GlobalCustomField").ok("Delete").cancel("Cancel").targetEvent(e);n.show(t).then(function(){r.cmCustomField.delete({id:m.globalCustomField.id}).$promise.then(function(){_.remove(m.globalCustomFields,{id:m.globalCustomField.id}),i.success({title:"GlobalCustomField properly deleted!",msg:(m.globalCustomField.name||"globalCustomField")+" has been deleted!"}),u(m.globalCustomField)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmCustomField.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmCustomField.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,m.addItem=function(e){e.push({value:"New Item"}),a.globalCustomFieldForm.$pristine=!1},m.removeItem=function(e,t){e.splice(t,1),a.globalCustomFieldForm.$pristine=!1},m.removeItems=function(e){for(var t=e.length,n=0;n<t;n++)e.splice(0,1);a.globalCustomFieldForm.$pristine=!1}}e.$inject=["$scope","$state","$location","$mdDialog","toasty","globalCustomFields","globalCustomField","api","Auth","license","setting"],angular.module("app.contactmanager").controller("CreateOrEditGlobalCustomFieldDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.globalCustomFields=r||{count:0,rows:[]},v.table="globalCustomFields",v.listOrder="",v.listOrderAsc=null,v.selectedGlobalCustomFields=[],v.query={fields:"createdAt,updatedAt,id,alias,type,values,required",sort:"-updatedAt",ListId:"null",limit:10,page:1},v.arraytype=_.keyBy([{option:"Text",value:"'text'"},{option:"Select",value:"'select'"},{option:"Number",value:"'number'"},{option:"Switch",value:"'switch'"},{option:"Datetime",value:"'datetime'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editdialog=function(e,t){i.show({controller:"CreateOrEditGlobalCustomFieldDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/globalCustomFields/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{globalCustomField:e,globalCustomFields:v.globalCustomFields.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the globalCustomField?").htmlContent("<b>"+(e.name||"globalCustomField")+"</b> will be deleted.").ariaLabel("delete globalCustomField").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getGlobalCustomFields=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.cmCustomField.get(v.query,f).$promise},v.createOrEditGlobalCustomField=function(e,t){i.show({controller:"CreateOrEditGlobalCustomFieldDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/globalCustomFields/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{globalCustomField:t,globalCustomFields:v.globalCustomFields.rows,license:v.license,setting:v.setting}})},v.deleteGlobalCustomField=A,v.exportSelectedGlobalCustomFields=function(){var e=angular.copy(v.selectedGlobalCustomFields);return v.selectedGlobalCustomFields=[],e},v.deleteSelectedGlobalCustomFields=function(e){var t=i.confirm().title("Are you sure want to delete the selected globalCustomFields?").htmlContent("<b>"+v.selectedGlobalCustomFields.length+" selected</b> will be deleted.").ariaLabel("delete GlobalCustomFields").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedGlobalCustomFields.forEach(function(e){A(e)}),v.selectedGlobalCustomFields=[]})},v.deselectGlobalCustomFields=function(){v.selectedGlobalCustomFields=[]},v.selectAllGlobalCustomFields=function(){v.selectedGlobalCustomFields=v.globalCustomFields.rows};var h=!0,b=1;function f(e){v.globalCustomFields=e||{count:0,rows:[]}}function A(e){l.cmCustomField.delete({id:e.id}).$promise.then(function(){_.remove(v.globalCustomFields.rows,{id:e.id}),v.globalCustomFields.count-=1,v.globalCustomFields.rows.length||v.getGlobalCustomFields(),c.success({title:"GlobalCustomField deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEcmCustomField"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEcmCustomField",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getGlobalCustomFields())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","globalCustomFields","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.contactmanager").controller("GlobalCustomFieldsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CONTACTMANAGER.EDIT_LIST",m.list=angular.copy(s),m.lists=o,m.newList=!1,m.list||(m.list={},m.title="CONTACTMANAGER.NEW_LIST",m.newList=!0),m.addNewList=function(){m.errors=[],r.cmList.save(m.list).$promise.then(function(e){m.lists.unshift(e.toJSON()),i.success({title:"List properly created",msg:m.list.name?m.list.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmList.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmList.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveList=function(){m.errors=[],r.cmList.update({id:m.list.id},m.list).$promise.then(function(e){var t=_.find(m.lists,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"List properly saved!",msg:m.list.name?m.list.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmList.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmList.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteList=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The list will be deleted.").ariaLabel("Delete List").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.cmList.delete({id:m.list.id}).$promise.then(function(){_.remove(m.lists,{id:m.list.id}),i.success({title:"List properly deleted!",msg:(m.list.name||"list")+" has been deleted!"}),u(m.list)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmList.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmList.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","lists","list","api","Auth","license","setting"],angular.module("app.contactmanager").controller("CreateOrEditListDialogController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r){var l=this;function d(){return a.cmList[l.isVoiceRealtime()?"getMembers":"getAgents"]({id:l.list.id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){return l.isVoiceRealtime()?l.selectedItems=e.rows?_.map(e.rows,function(e){return e.id=e.UserId,e.fullname=e.membername,e.penalty=e.hasOwnProperty("penalty")?"penalty "+e.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[]:l.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserList?"penalty "+e.UserList.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.selectedItems=l.selectedItems,r.hasRole("admin")?a.user.get({fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise:a.user.getAgents({id:r.getCurrentUser().id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise}).then(function(e){l.items=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserList?"penalty "+e.UserList.penalty:"",e.internal=e.internal?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.items=_.differenceBy(l.items,l.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETUSERS.GETAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}l.list=t,l.penalty=0,l.items=[],l.selectedItems=[],l.closeDialog=function(){e.hide()},l.isVoiceRealtime=function(){return o},l.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"penalty",labelAll:s.instant("CONTACTMANAGER.ALL_AGENTS"),labelSelected:s.instant("CONTACTMANAGER.SELECTED_AGENTS"),transferCallback:function(e,t){a.cmList[t?"removeAgents":"addAgents"]({id:l.list.id,ids:_.map(e,l.isVoiceRealtime()&&t?"UserId":"id"),penalty:l.penalty||0,realtime:o||!1}).$promise.then(function(){n.success({title:"List properly "+(t?"removed":"added"),msg:"List has been "+(t?"removed":"added")+"!"}),t||d()}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:cmList.ADDAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d()}e.$inject=["$mdDialog","toasty","api","list","lists","realtime","$translate","Auth"],angular.module("app.contactmanager").controller("ListagentaddController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.list={},c.listCustomFields={count:0,rows:[]},c.selectedListCustomFields=[],c.query={fields:"createdAt,updatedAt,id,alias,type,values,required",limit:10,page:1},c.arraytype=_.keyBy([{option:"Text",value:"'text'"},{option:"Select",value:"'select'"},{option:"Number",value:"'number'"},{option:"Switch",value:"'switch'"},{option:"Datetime",value:"'datetime'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.init=function(e){c.list=e,c.query.id=c.list.id,c.query.ListId=c.list.id,c.getListCustomFields()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the customField?").htmlContent("<b>"+(e.name||"customField")+"</b> will be deleted.").ariaLabel("delete customField").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getListCustomFields=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.cmList.getCustomFields(c.query,p).$promise},c.createOrEditListCustomField=function(e,t){o.show({controller:"CreateOrEditCustomFieldDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/lists/edit/customFields/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{list:c.list,customField:t,customFields:c.listCustomFields.rows,license:null,setting:null}})},c.exportSelectedListCustomFields=function(){var e=angular.copy(c.selectedListCustomFields);return c.selectedListCustomFields=[],e},c.deleteListCustomField=g,c.deleteSelectedListCustomFields=function(e){var t=o.confirm().title("Are you sure want to delete the selected customFields?").htmlContent("<b>"+c.selectedListCustomFields.length+" selected</b> will be deleted.").ariaLabel("delete customFields").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedListCustomFields.forEach(function(e){g(e)}),c.selectedListCustomFields=[]})};var m=!0,u=1;function p(e){c.listCustomFields=e||{count:0,rows:[]}}function g(e){l.cmCustomField.delete({id:e.id}).$promise.then(function(){_.remove(c.listCustomFields.rows,{id:e.id}),c.listCustomFields.count-=1,c.listCustomFields.rows.length||c.getListCustomFields(),r.success({title:"CustomField deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETcmList"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcmList",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getListCustomFields())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.contactmanager").controller("ListCustomFieldsController",e)}(),function(){"use strict";function e(a,e,t,n,i,o,s,r,l,d,c){var m=this;function u(e){n.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CONTACTMANAGER.EDIT_CUSTOMFIELD",m.sortable={animation:800,sort:!0,onSort:function(e){a.customFieldForm.$pristine=!1}},m.customField=s,m.customFields=o,m.newCustomField=!1,m.customField||(m.customField={type:"text"},m.title="CONTACTMANAGER.NEW_CUSTOMFIELD",m.newCustomField=!0),e.params.id&&(m.customField.ListId=e.params.id),a.$watch("vm.customField.type",function(e,t){if(e!==t)switch(e){case"text":m.customField.values="";break;case"select":m.customField.values=[]}}),m.addNewCustomField=function(){m.errors=[],r.cmList.addCustomField({id:e.params.id},m.customField).$promise.then(function(e){m.customFields.unshift(e.toJSON()),i.success({title:"CustomField properly created",msg:m.customField.name?m.customField.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmCustomField.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmCustomField.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveCustomField=function(){m.errors=[],r.cmCustomField.update({id:m.customField.id},m.customField).$promise.then(function(e){var t=_.find(m.customFields,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"CustomField properly saved!",msg:m.customField.name?m.customField.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmCustomField.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmCustomField.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteCustomField=function(e){m.errors=[];var t=n.confirm().title("Are you sure?").content("The customField will be deleted.").ariaLabel("Delete CustomField").ok("Delete").cancel("Cancel").targetEvent(e);n.show(t).then(function(){r.cmCustomField.delete({id:m.customField.id}).$promise.then(function(){_.remove(m.customFields,{id:m.customField.id}),i.success({title:"CustomField properly deleted!",msg:(m.customField.name||"customField")+" has been deleted!"}),u(m.customField)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmCustomField.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmCustomField.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,m.addItem=function(e){e.push({value:"New Item"}),a.customFieldForm.$pristine=!1},m.removeItem=function(e,t){e.splice(t,1),a.customFieldForm.$pristine=!1},m.removeItems=function(e){for(var t=e.length,n=0;n<t;n++)e.splice(0,1);a.customFieldForm.$pristine=!1}}e.$inject=["$scope","$state","$location","$mdDialog","toasty","customFields","customField","api","Auth","license","setting"],angular.module("app.contactmanager").controller("CreateOrEditCustomFieldDialogController",e)}(),function(){"use strict";function e(n,e,a,i,t,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=t,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=e.protocol()+"://"+e.host(),c.list=d||n.params.list||{},c.selectedTab=n.params.tab||0,c.gotogoto=function(e,t){n.go("app.contactmanager.contacts",{ListId:e.id})},c.agentadddialog=function(e,t){a.show({controller:"ListagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/lists/edit/agentadd/agentadd.html",parent:angular.element(i.body),targetEvent:t,clickOutsideToClose:!0,locals:{list:e,lists:c.lists?c.lists.rows:[],realtime:!1}})},c.alert=r.info,c.gotoLists=function(){n.go("app.contactmanager.lists")},c.saveList=function(){s.cmList.update({id:c.list.id},c.list).$promise.then(function(){r.success({title:"List updated!",msg:c.list.name?c.list.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcmList",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","list"],angular.module("app.contactmanager").controller("ListController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.list={},c.listVoiceDispositions={count:0,rows:[]},c.selectedListVoiceDispositions=[],c.query={fields:"createdAt,updatedAt,id,name,createdAt",limit:10,page:1},c.init=function(e){c.list=e,c.query.id=c.list.id,c.query.ListId=c.list.id,c.getListVoiceDispositions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the voiceDisposition?").htmlContent("<b>"+(e.name||"voiceDisposition")+"</b> will be deleted.").ariaLabel("delete voiceDisposition").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getListVoiceDispositions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.cmList.getDispositions(c.query,p).$promise},c.createOrEditListVoiceDisposition=function(e,t){o.show({controller:"CreateOrEditVoiceDispositionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/lists/edit/voiceDispositions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{list:c.list,voiceDisposition:t,voiceDispositions:c.listVoiceDispositions.rows,license:null,setting:null}})},c.exportSelectedListVoiceDispositions=function(){var e=angular.copy(c.selectedListVoiceDispositions);return c.selectedListVoiceDispositions=[],e},c.deleteListVoiceDisposition=g,c.deleteSelectedListVoiceDispositions=function(e){var t=o.confirm().title("Are you sure want to delete the selected voiceDispositions?").htmlContent("<b>"+c.selectedListVoiceDispositions.length+" selected</b> will be deleted.").ariaLabel("delete voiceDispositions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedListVoiceDispositions.forEach(function(e){g(e)}),c.selectedListVoiceDispositions=[]})};var m=!0,u=1;function p(e){c.listVoiceDispositions=e||{count:0,rows:[]}}function g(e){l.voiceDisposition.delete({id:e.id}).$promise.then(function(){_.remove(c.listVoiceDispositions.rows,{id:e.id}),c.listVoiceDispositions.count-=1,c.listVoiceDispositions.rows.length||c.getListVoiceDispositions(),r.success({title:"VoiceDisposition deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETcmList"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcmList",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getListVoiceDispositions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.contactmanager").controller("ListVoiceDispositionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CONTACTMANAGER.EDIT_VOICEDISPOSITION",m.voiceDisposition=angular.copy(s),m.voiceDispositions=o,m.newVoiceDisposition=!1,m.voiceDisposition||(m.voiceDisposition={},m.title="CONTACTMANAGER.NEW_VOICEDISPOSITION",m.newVoiceDisposition=!0),t.params.id&&(m.voiceDisposition.ListId=t.params.id),m.addNewVoiceDisposition=function(){m.errors=[],r.voiceDisposition.save(m.voiceDisposition).$promise.then(function(e){m.voiceDispositions.unshift(e.toJSON()),i.success({title:"VoiceDisposition properly created",msg:m.voiceDisposition.name?m.voiceDisposition.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceDisposition.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceDisposition.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveVoiceDisposition=function(){m.errors=[],r.voiceDisposition.update({id:m.voiceDisposition.id},m.voiceDisposition).$promise.then(function(e){var t=_.find(m.voiceDispositions,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"VoiceDisposition properly saved!",msg:m.voiceDisposition.name?m.voiceDisposition.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceDisposition.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceDisposition.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteVoiceDisposition=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The voiceDisposition will be deleted.").ariaLabel("Delete VoiceDisposition").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceDisposition.delete({id:m.voiceDisposition.id}).$promise.then(function(){_.remove(m.voiceDispositions,{id:m.voiceDisposition.id}),i.success({title:"VoiceDisposition properly deleted!",msg:(m.voiceDisposition.name||"voiceDisposition")+" has been deleted!"}),u(m.voiceDisposition)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceDisposition.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceDisposition.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","voiceDispositions","voiceDisposition","api","Auth","license","setting"],angular.module("app.contactmanager").controller("CreateOrEditVoiceDispositionDialogController",e)}(),function(){"use strict";function e(e,a,n,t,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.lists=r||{count:0,rows:[]},v.table="lists",v.listOrder="",v.listOrderAsc=null,v.selectedLists=[],v.query={fields:"createdAt,updatedAt,id,name,description,dialPrefix",sort:"-updatedAt",limit:10,page:1},v.editstate=function(e,t){n.go("app.contactmanager.lists.edit",{id:e.id,list:e})},v.gotocontactsgoto=function(e,t){n.go("app.contactmanager.contacts",{ListId:e.id})},v.exportcsvcontactsexport=function(e,t){var n=a.document.createElement("a");n.href="/api/cm/lists/"+e.id+"/contacts/csv",n.target="_self",n.click()},v.agentadddialog=function(e,t){i.show({controller:"ListagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/lists/edit/agentadd/agentadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{list:e,lists:v.lists?v.lists.rows:[],realtime:!1}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the list?").htmlContent("<b>"+(e.name||"list")+"</b> will be deleted.").ariaLabel("delete list").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getLists=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.cmList.get(v.query,f).$promise},v.createOrEditList=function(e,t){i.show({controller:"CreateOrEditListDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/lists/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{list:t,lists:v.lists.rows,license:v.license,setting:v.setting}})},v.deleteList=A,v.exportSelectedLists=function(){var e=angular.copy(v.selectedLists);return v.selectedLists=[],e},v.deleteSelectedLists=function(e){var t=i.confirm().title("Are you sure want to delete the selected lists?").htmlContent("<b>"+v.selectedLists.length+" selected</b> will be deleted.").ariaLabel("delete Lists").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedLists.forEach(function(e){A(e)}),v.selectedLists=[]})},v.deselectLists=function(){v.selectedLists=[]},v.selectAllLists=function(){v.selectedLists=v.lists.rows};var h=!0,b=1;function f(e){v.lists=e||{count:0,rows:[]}}function A(e){l.cmList.delete({id:e.id}).$promise.then(function(){_.remove(v.lists.rows,{id:e.id}),v.lists.count-=1,v.lists.rows.length||v.getLists(),c.success({title:"List deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEcmList"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEcmList",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getLists())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","lists","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.contactmanager").controller("ListsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s){var r=this;r.currentUser=o.getCurrentUser(),r.customDashboard={},r.voiceQueues=s&&s.count?s:{count:0,rows:[]},r.voiceQueuesSelected=s&&s.count?_.map(s.rows,"id"):[],r.interval=t(function(){},1e3),r.onChangeVoiceQueues=function(){for(var e=0;e<r.customDashboard.widgets.length;e+=1)r.customDashboard.widgets[e].voiceQueuesSelected=r.voiceQueuesSelected},r.goToEdit=function(){e.go("app.tools.customDashboards.edit",{id:r.customDashboard.id,tab:1})},i.onWithoutApply("voice_queue:save",function(e){var t=_.find(r.voiceQueues.rows,{id:e.id});t&&_.merge(t,_.pick(e,_.keys(t)))}),a.dashboard.get({id:e.params.id}).$promise.then(function(e){if(e)return r.customDashboard=e,r.customDashboard.widgets=[],r.customDashboard.preview=!0,r.customDashboard.draggable={enabled:!1},r.customDashboard.resizable={enabled:!1},a.dashboard.getItems({id:r.customDashboard.id}).$promise}).then(function(e){if(e&&e.count&&e.rows)for(var t=0;t<e.rows.length;t+=1)e.rows[t].templateUrl="app/core/directives/ms-widget-engine/ms-widget-engine-"+e.rows[t].type+"/ms-widget-engine."+e.rows[t].type+".html",e.rows[t].voiceQueues=r.voiceQueues,e.rows[t].voiceQueuesSelected=r.voiceQueuesSelected,r.customDashboard.widgets.push(e.rows[t])}).catch(function(e){r.customDashboard=void 0}),n.$on("$destroy",function(){i.removeAllListeners("voice_queue:save"),r.interval&&t.cancel(r.interval)})}e.$inject=["$state","$interval","$scope","api","socket","Auth","voiceQueues"],angular.module("app.dashboards.custom").controller("DashboardCustomController",e)}(),function(){"use strict";function e(e,t,n,a,s,i,o,r,l,d,c,m,u,p,g,v,h,b,f,A,E,y,S,T){var C=this;C.license=E;function x(){var e={};for(var t in C.tabs)C.tabs.hasOwnProperty(t)&&(e[t]=C.tabs[t],C.tabs[t].interaction&&(e[t].interaction=_.pick(C.tabs[t].interaction,["id","OpenchannelAccountId","MailAccountId","ChatWebsiteId","FaxAccountId","SmsAccountId","closed"])));a.localStorage.setItem("motion2.user:"+C.user.id,JSON.stringify({tabs:e,currentTab:C.currentTab})),O(!0)}function O(e){var t={id:C.user.id,online:e,capacity:{mail:0,fax:0,sms:0,openchannel:0,chat:0},interaction:{mail:[],fax:[],sms:[],openchannel:[],chat:[]}};if(e)for(var n in C.tabs)C.tabs.hasOwnProperty(n)&&t.capacity.hasOwnProperty(C.tabs[n].channel)&&C.tabs[n].interaction&&!C.tabs[n].interaction.closed&&(t.capacity[C.tabs[n].channel]+=1,t.interaction[C.tabs[n].channel].push(C.tabs[n].interaction.id));return p.rpc.setAgentCapacity(t)}function w(t){if(C.tabs[t.id]&&(function(e){if(e.channel&&e.interaction)p.user["remove"+_.upperFirst(e.channel)+"Interactions"]({id:C.user.id,ids:[e.interaction.id]}).$promise.catch(function(e){console.error(e)})}(C.tabs[t.id]),delete C.tabs[t.id],C.currentTab=0,x(),"interaction"===t.type))return p[t.channel+"Interaction"].get({id:t.interaction.id}).$promise.then(function(e){return p.user["remove"+_.upperFirst(t.channel)+"Interactions"]({id:C.user.id,ids:[e.id]}).$promise}).catch(function(e){console.error(e)})}function I(e){e.id=_.random(1e10),e.openedAt=new Date,e.saved=!1,e.badges=0,C.tabs[e.id]=e,C.currentTab=e.id,x()}function R(t,n){var e={type:"interaction",title:t?t.toUpperCase():"openchannel",icon:function(e){switch(e){case"chat":return"icon-hangouts";case"mail":return"icon-email";case"sms":return"icon-message-text";case"openchannel":return"icon-google-earth";case"fax":return"icon-deskphone";default:return"icon-hangouts"}}(t),color:function(e){switch(e){case"chat":return"green-A700";case"mail":return"teal";case"sms":return"orange";case"openchannel":return"amber-A200";case"fax":return"blue-grey-A200";default:return"grey"}}(t),channel:t,interaction:n},a=_.find(C.tabs,function(e){return"interaction"===e.type&&e.interaction&&e.interaction.id===n.id&&e.channel===t});a?C.currentTab=a.id:I(e)}function N(e){e&&e.uniqueid&&C.notifications[e.uniqueid]&&(v.clear(C.notifications[e.uniqueid]),delete C.notifications[e.uniqueid])}function D(){return function(e){if(404===e.status)v.warning({title:s.instant("DASHBOARDS.ATTENTION"),msg:s.instant("DASHBOARDS.ACCEPT_ELSEWHERE")});else if(e.data&&e.data.errors&&e.data.errors.length){C.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelMessage.accept"}];for(var t=0;t<e.data.errors.length;t+=1)v.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else v.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelMessage.accept",msg:e.data?JSON.stringify(e.data.message):e.toString()})}}C.detectBrowser=T.detectBrowser(),C.user=u.getCurrentUser(),C.currentTab=0,C.notifications={},C.tabs={},C.globalUserLists=h||{count:0,rows:[]},C.globalLists=b||{count:0,rows:[]},C.globalCompanies=f||{count:0,rows:[]},C.globalTags=A||{count:0,rows:[]},C.onContactManager=function(t){var e={ListId:t.ListId,nolimit:!0,sort:"-updatedAt"},n=!1,a=t.calleridname&&"<unknown>"!==t.calleridname?t.calleridname:t.calleridnum||t.uniqueid,i=t.calleridnum;_.isNil(t["xmd-contactid"])?_.isNil(t.routeId)?e.phone=t.calleridnum:(e.phone=t.destcalleridnum,a=t.destcalleridname&&"<unknown>"!==t.destcalleridname?t.destcalleridname:t.destcalleridnum||t.uniqueid,i=t.destcalleridnum):_.isNil(t["xmd-listid"])||parseInt(t["xmd-listid"],10)===t.ListId?(e.id=t["xmd-contactid"],n=!0):t["xmd-contactid2"]&&(e.id=t["xmd-contactid2"],n=!0);return p.cmContact.get(e).$promise.then(function(e){n?e&&C.addContactTab(e,t):e.count&&e.rows[0]?C.addContactTab(e.rows[0],t):C.addContactTab({firstName:a,ListId:t.ListId,phone:i},t)}).catch(D())},C.onJscripty=function(n){return p.jscriptyProject.get({id:n.ProjectId}).$promise.then(function(t){if(t){if(!_.isUndefined(n["xmd-contactid"]))return p.cmContact.get({id:n["xmd-contactid"]}).$promise.then(function(e){I({type:"jscripty",title:t.name,icon:"icon-script",color:"grey",project:t,call:n,contact:e})}).catch(D());I({type:"jscripty",title:t.name,icon:"icon-script",color:"grey",project:t,call:n})}}).catch(D())},C.onBrowserUrl=function(e){if(e&&e.uri)if(e.uriLocation)switch(e.uriLocation){case"0":a.open(e.uri);break;case"1":a.open(e.uri,"_blank","width="+(e.windowWidth||"800")+",height="+e.windowHeight||"600");break;default:a.open(e.uri)}else a.open(e.uri)},C.onBrowserPopup=function(e){e&&e.html&&I({type:"popup",title:e.calleridnum||"popup",icon:"icon-tablet",color:"grey",html:e.html})},C.onNotificationSave=function(e){if(e&&e.uniqueid){n=e,y.isSupported()?y.requestPermission().then(function(){var e,t;t={autoClose:!0,duration:10,showOnPageHidden:!0,icon:"../../../../../../../assets/images/avatars/customer.png",body:(e=n).queue?"Queue: "+e.queue:"",focusOnclick:!0,closeOnClick:!0},y.show(e.title,t)},function(e){console.error("Please enable browser notifications!",e)}):console.error("Browser notifications are not supported by the browser. Normal notifications will be used.");var t=C.alreadyExistsTab(e);if(t){if(p[e.channel+"Message"])return C.currentTab!==t.id&&(t.badges+=1),p[e.channel+"Message"].accept({id:e.id,UserId:C.user.id}).$promise.catch(D())}else v.wait({title:e.title,msg:e.msg||"",showClose:!1,clickToClose:!1,timeout:!1,sound:e.sound,html:!0,shake:e.shake||!1,onAdd:function(){C.notifications[e.uniqueid]=this.id},onAccept:function(){if(N(e),p[e.channel+"Message"])return p[e.channel+"Message"].accept({id:e.id,UserId:C.user.id,manual:!0}).$promise.then(function(e){R(e.channel,e.interaction),v.success({title:"Message properly accepted!",msg:"Message has been accepted!"})}).catch(D())},onReject:function(){if(N(e),p[e.channel+"Message"])return p[e.channel+"Message"].reject({id:e.id,UserId:C.user.id}).$promise.then(function(e){v.success({title:"Message properly rejected!",msg:"Message has been rejected!"})}).catch(D())}})}var n},C.onNotificationRemove=N,C.onClickTab=function(e){C.currentTab=e,x()},C.isActiveTab=function(e){return e===C.currentTab},C.alreadyExistsTab=function(t){return _.find(C.tabs,function(e){return"interaction"===e.type&&e.interaction&&e.interaction.id==t.interactionId&&e.channel==t.channel})},C.addContactTab=function(t,n){var a={type:"contact",title:t?function(e){var t="";e&&(e.firstName||e.lastName?(e.firstName&&(t+=e.firstName+" "),e.lastName&&(t+=e.lastName)):e.phone&&(t=e.phone));return t}(t):s.instant("DASHBOARDS.NEW_CONTACT"),icon:"icon-account-circle",color:"red",contact:t,userLists:h,lists:b,companies:f,tags:A,calls:n?[n]:[],autoCreate:n?n.autoCreate:0};if(n){if(n["xmd-cdrtype"]&&"dialer"===n["xmd-cdrtype"])n.answeredAt=n.agentcalledAt?moment(n.agentcalledAt,"YYYY-MM-DD HH:mm:ss").toDate():new Date;else if(n.uniqueid){var e=n.uniqueid.split(".")[0];n.answeredAt=e?new Date(1e3*parseInt(e)):new Date}(n.agentcompleteAt||n.endtime)&&(n.disposedAt=new Date)}if(t){var i=_.find(C.tabs,function(e){return"contact"===e.type&&e.contact&&e.contact.id==t.id});if(i){if(n)if(i.calls){var o=_.find(i.calls,function(e){return e.uniqueid===n.uniqueid});o||i.calls.push(n)}else i.calls=[n];C.currentTab=i.id}else{if(t.ListId)return p.cmList.getDispositions({id:t.ListId}).$promise.then(function(e){return a.dispositions=e,p.cmList.getCustomFields({id:t.ListId}).$promise}).then(function(e){a.customFields=e}).catch(D()).finally(function(){I(a)});I(a)}}else I(a)},C.addInteractionTab=R,C.addTab=I,C.removeTab=w,C.updateLocalStorage=x,C.closeTab=function(e){var t=n.confirm().title("interaction"===e.type?"Do you want to close the interaction?":"Are you sure want to close the "+e.type+"?").textContent("interaction"===e.type?"":"The "+e.type+" has been modified. Closing will lose all changes!").ariaLabel("Close Contact").ok("interaction"===e.type?"YES":"OK").cancel("interaction"===e.type?"NO":"CANCEL");{if(!e.saved)return n.show(t).then(function(){"interaction"===e.type&&n.show({controller:"DisposeInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/dispose/dialog.html",parent:angular.element(o.body),clickOutsideToClose:!0,locals:{channel:e.channel,interaction:e.interaction}}),w(e)}).catch(function(){"interaction"===e.type&&w(e)});w(e)}},g.on("trigger:contactmanager",C.onContactManager),g.on("trigger:jscripty",C.onJscripty),g.on("trigger:browser:url",C.onBrowserUrl),g.on("trigger:browser:popup",C.onBrowserPopup),g.on("notification:save",C.onNotificationSave),g.on("notification:remove",C.onNotificationRemove),function(){var e=a.localStorage.getItem("motion2.user:"+C.user.id);if(e)try{e=JSON.parse(e),C.tabs=e.tabs?e.tabs:{},C.currentTab=e.currentTab?e.currentTab:0,O(!0)}catch(e){console.error(e)}}(),e.$on("$destroy",function(){for(var e in C.notifications)C.notifications.hasOwnProperty(e)&&N({uniqueid:e});g.removeAllListeners("trigger:contactmanager"),g.removeAllListeners("trigger:jscripty"),g.removeAllListeners("trigger:browser:url"),g.removeAllListeners("trigger:browser:popup"),g.removeAllListeners("notification:save"),g.removeAllListeners("notification:remove")})}e.$inject=["$scope","$state","$mdDialog","$window","$translate","$mdToast","$document","$templateCache","$rootScope","$controller","$compile","$templateRequest","Auth","api","socket","toasty","globalUserLists","globalLists","globalCompanies","globalTags","license","desktopNotification","$http","msUtils"],angular.module("app.dashboards").controller("AgentDashboardGeneralController",e)}(),function(){"use strict";angular.module("app.dashboards").provider("desktopNotification",function(){var b={autoClose:!0,duration:5,showOnPageHidden:!1};return{config:function(e){for(var t in e)b.hasOwnProperty(t)&&null!=e[t]&&(b[t]=e[t])},$get:["$q","$timeout","$window","PERMISSIONS",function(e,u,t,p){var g=t.Notification||t.mozNotification||t.webkitNotification;return{isSupported:v,currentPermission:h,requestPermission:function(){if(!v())return e.reject("Notification API not supported");var n=e.defer();Promise.resolve(g.requestPermission)==g.requestPermission?g.requestPermission().then(function(e){p.GRANTED===e?n.resolve(e):n.reject(e)}):g.requestPermission(function(e,t){p.GRANTED===e?n.resolve(e):n.reject(e)});return n.promise},show:function(e,t){if(t=t||{},!v()||(n=e,a=t,i=angular.isString(n),o=!a.onClick||angular.isFunction(a.onClick),!i||!o)||function(e){if(e||b.showOnPageHidden)return!(window.document.hidden||window.document.mozHidden||window.document.webkitHidden)}(t.showOnPageHidden)||h()!==p.GRANTED)return;var n,a,i,o;var s=new g(e,t),r=t.duration||b.duration,l=void 0===t.autoClose?b.autoClose:t.autoClose;s.onclick=function(){t.onClick&&t.onClick(),t.focusOnclick&&window.focus(),t.closeOnClick&&s.close()},l&&(d=s,c=r,m=1e3*c,u(d.close.bind(d),m,!1));var d,c,m;return s},permissions:{default:p.DEFAULT,granted:p.GRANTED,denied:p.DENIED}};function v(){return!(void 0===g)}function h(){return(g||{}).permission}}]}}).provider("msNavigationAgentService",function(){var r=angular.injector(["ng"]).get("$log"),l=[];function t(e,t){if(angular.isString(e)){for(var n=e.split("."),a=n[n.length-1],i=function(e){var t=l;if(1===e.length)return t;e.pop();for(var n=0;n<e.length;n++){for(var a=e[n],i=!0,o=0;o<t.length;o++)if(t[o]._id===a){t=t[o].children,i=!1;break}if(i){var s={_id:a,_path:e.join("."),title:a,weight:1,children:[]};t.push(s),t=s.children}}return t}(n),o=!1,s=0;s<i.length;s++)if(i[s]._id===a){o=i[s];break}o?(angular.extend(o,t),o.uisref=d(o)):(t.children=[],!angular.isUndefined(t.weight)&&angular.isNumber(t.weight)||(t.weight=1),t._id=a,t._path=e,t.uisref=d(t),i.push(t))}else r.error("path must be a string (eg. `dashboard.project`)")}function d(e){var t="";return angular.isDefined(e.state)&&(t=e.state,angular.isDefined(e.stateParams)&&angular.isObject(e.stateParams)&&(t=t+"("+angular.toJson(e.stateParams)+")")),t}this.saveItem=t,this.$get=function(){var e={saveItem:t,getNavigation:function(e){if(e){for(var t=0;t<l.length;t++)if(l[t]._id===e)return[l[t]];return null}return l}};return e}}).constant("PERMISSIONS",{DEFAULT:"default",GRANTED:"granted",DENIED:"denied"})}(),function(){"use strict";function e(s,r,e,i,l,t,d,c,n,a,o,m){var u=this;u.user=n.getCurrentUser(),u.detectBrowser=m.detectBrowser(),u.queryHopper={fields:"id,phone,scheduledat",sort:"-updatedAt",limit:10,page:1},u.queryFinal={fields:"uniqueid,calleridnum,statedesc,starttime,disposition",sort:"-updatedAt",limit:10,page:1},u.queryHistory={fields:"uniqueid,calleridnum,statedesc,scheduledat,starttime,endtime",sort:"-updatedAt",limit:10,page:1},u.hoppers={rows:[],count:0},u.finals={rows:[],count:0},u.histories={rows:[],count:0},u.addNewContact=function(){u.errors=[],d.cmContact.save(u.contact).$promise.then(function(e){return u.contact.id=e.id,u.newContact=!1,u.tab.title=e.firstName||e.phone,u.tab.contact=u.contact,d.user.addContacts({id:n.getCurrentUser().id,ids:[e.id]})}).then(function(){u.detailForm.$pristine=!0,u.customFieldsForm.$pristine=!0,c.success({title:"Contact properly created",msg:u.contact.firstName?u.contact.firstName+" has been created!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.contact.save"}];for(var t=0;t<e.data.errors.length;t+=1)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.contact.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},u.saveContact=function(){u.errors=[],d.cmContact.update({id:u.contact.id},u.contact).$promise.then(function(e){return u.tab.title=e.firstName||e.phone,u.tab.contact=u.contact,l.$parent.vm.updateLocalStorage(),d.user.addContacts({id:n.getCurrentUser().id,ids:[e.id]})}).then(function(){u.detailForm.$pristine=!0,u.customFieldsForm.$pristine=!0,c.success({title:"Contact properly updated!",msg:u.contact.name?u.contact.name+" has been updated!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.contact.save"}];for(var t=0;t<e.data.errors.length;t+=1)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.contact.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},u.getCustomFields=function(e){return d.cmList.getCustomFields({id:e}).$promise.then(function(e){u.tab.customFields=e}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"LIST:GETCustomFields",msg:e.data?JSON.stringify(e.data):e.toString()})})},u.call=l.$parent.vm.call,u.disposeCall=function(e,t){if(u.newContact)return void c.error({title:"ATTENTION",msg:"Before to dispose, please save the contact!"});s.show({controller:"DisposeCallDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/contact/dispose/dialog.html",parent:angular.element(r.body),targetEvent:t,clickOutsideToClose:!1,locals:{dispositions:u.tab.dispositions,contact:u.contact,call:t}}).then(function(e){e&&("BLACKLIST"===e?c.success({title:o.instant("DASHBOARDS.INFO"),msg:o.instant("DASHBOARDS.CALL_DISPOSED")+" "+e}):"RECALLME"===e||"RESCHEDULE"===e||c.success({title:o.instant("DASHBOARDS.INFO"),msg:o.instant("DASHBOARDS.CALL_SAVED")})),_.remove(u.tab.calls,function(e){return e.uniqueid==t.uniqueid})})},u.duplicateContact=function(e){s.show({controller:"DuplicateContactDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/duplicate/dialog.html",parent:angular.element(r.body),targetEvent:e,clickOutsideToClose:!0,resolve:{contact:["apiResolver",function(e){return e.resolve("cmContact@get",{id:u.contact.id})}],lists:["apiResolver",function(e){return e.resolve("user@getLists",{id:n.getCurrentUser().id,fields:"id,name"})}]},locals:{contacts:[]}})},u.mergeContact=function(e){s.show({controller:"MergeContactDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/merge/dialog.html",parent:angular.element(r.body),targetEvent:e,clickOutsideToClose:!0,resolve:{contact:["apiResolver",function(e){return e.resolve("cmContact@get",{id:u.contact.id})}],lists:["apiResolver",function(e){return e.resolve("user@getLists",{id:n.getCurrentUser().id,fields:"id,name"})}]},locals:{contacts:[]}})},u.getDateFromString=function(e){if(e)return new Date(e);return null},u.addJscriptyTab=function(e,t){try{l.$parent.$parent.$parent.vm.addTab({type:"jscripty",title:e.name,icon:"icon-script",color:"grey",project:e,contact:u.contact})}catch(e){c.error({title:"ERROR OPENING JSCRIPTY PROJECT",msg:"The project cannot be started"+JSON.stringify(e)})}},u.getHoppers=function(){u.contact&&u.contact.id&&(u.queryHopper.ContactId=u.contact.id,u.queryHopper.offset=(u.queryHopper.page-1)*u.queryHopper.limit,u.promise=d.cmHopper.get(u.queryHopper,v("hoppers")).$promise)},u.getFinals=function(){u.contact&&u.contact.id&&(u.queryFinal.ContactId=u.contact.id,u.queryFinal.offset=(u.queryFinal.page-1)*u.queryFinal.limit,u.promise=d.cmHopperFinal.get(u.queryFinal,v("finals")).$promise)},u.getHistories=function(){u.contact&&u.contact.id&&(u.queryHistory.ContactId=u.contact.id,u.queryHistory.offset=(u.queryHistory.page-1)*u.queryHistory.limit,u.promise=d.cmHopperHistory.get(u.queryHistory,v("histories")).$promise)},u.getJscriptyProjects=function(){d.jscriptyProject.get({fields:"createdAt,updatedAt,id,name,description,createdAt,formData,enableUncompleteSave",sort:"-updatedAt",nolimit:!0}).$promise.then(function(e){u.jscriptyProjects=e||{count:0,rows:[]}}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.jscripty.account"}];for(var t=0;t<e.data.errors.length;t+=1)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.jscripty.account",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},u.getMailAccounts=function(){d.mailAccount.get({nolimit:!0}).$promise.then(function(e){u.mailAccounts=e||{count:0,rows:[]}}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.mail.account"}];for(var t=0;t<e.data.errors.length;t+=1)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mail.account",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},u.getFaxAccounts=function(){d.faxAccount.get({nolimit:!0}).$promise.then(function(e){u.faxAccounts=e||{count:0,rows:[]}}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.fax.account"}];for(var t=0;t<e.data.errors.length;t+=1)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.fax.account",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},u.getSmsAccounts=function(){d.smsAccount.get({nolimit:!0}).$promise.then(function(e){u.smsAccounts=e||{count:0,rows:[]}}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.sms.account"}];for(var t=0;t<e.data.errors.length;t+=1)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.sms.account",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},u.composeInteraction=function(e,i,t,n){var o=i.toLowerCase();s.show({controller:"Compose"+i+"InteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/compose"+i+"/dialog.html",parent:angular.element(r.body),clickOutsideToClose:!1,locals:{account:t,message:{to:"mail"==o?n:n.split(",")},type:"new",interaction:{Contact:u.contact}},fullscreen:!0}).then(function(a){return d[o+"Account"].send({id:t.id},a).$promise.then(function(e){if("Mail"===i){var t=e;if(t&&t.Messages&&t.Messages.length){if(a.attachments&&a.attachments.length)for(var n=0;n<a.attachments.length;n+=1)d.attachment.update({id:a.attachments[n].id},{MailMessageId:_.head(t.Messages).id});c.success({title:"Message properly sent!",msg:"Message has been sent!"}),t.closed?(t.disposition=null,s.show({controller:"DisposeInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/dispose/dialog.html",parent:angular.element(r.body),clickOutsideToClose:!0,locals:{channel:"mail",interaction:t}})):l.$parent.vm.addInteractionTab("mail",t)}}else c.success({title:"Message properly sent!",msg:"Message has been sent!"}),l.$parent.vm.addInteractionTab(o,e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t+=1)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else"fax"===o?c.error({title:"FAX:SEND",msg:e.data?JSON.stringify(e.data):e.message||e.toString()}):c.error({title:e.status?"API:"+e.status+" - "+e.statusText:i.toUpperCase()+"ACCOUNT:SEND",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})})},u.init=function(e,t){u.tab=e,l.$watchGroup(["vm.detailForm.$pristine","vm.customFieldsForm.$pristine"],function(e,t){u.tab.saved=e[0]&&e[1]}),u.license=t,u.contact=u.tab.contact,u.newContact=!1,u.currentTab=0,u.contact&&u.contact.id?(d.user.addContacts({id:u.user.id,ids:[u.contact.id]}),u.contact.ListId&&(u.tab.userLists.rows=_.unionBy(u.tab.userLists.rows,_.filter(u.tab.lists.rows,{id:u.contact.ListId}),"id"),u.list=_.find(u.tab.userLists.rows,{id:u.contact.ListId})),u.getHoppers(),u.getFinals(),u.getHistories(),u.getMailAccounts(),u.getFaxAccounts(),u.getSmsAccounts()):(u.newContact=!0,e.autoCreate&&(console.log("autoCreate"),u.addNewContact()))},u.hasPermission=function(e){return n.hasPermission(e)},a.on("voice_queue_channel:remove",h),a.on("voice_outbound_channel:remove",h),u.getJscriptyProjects(),l.$watch("currentTab",function(e,t){1===u.currentTab&&(u.getHoppers(),u.getFinals(),u.getHistories())});var p=!0,g=1;function v(t){return function(e){u[t]=e||{count:0,rows:[]}}}function h(t){var n,e,a=_.findLastIndex(u.tab.calls,function(e){return e.uniqueid===t.uniqueid});0<=a&&(u.tab.calls[a].disposedAt=new Date),u.contact&&u.contact.id&&i((n=t.uniqueid,e=u.contact.id,function(){if(_.find(u.tab.calls,function(e){return e.uniqueid===n}))return d.voiceCallReport.update({id:n,ContactId:e}).$promise.catch(function(e){console.error(e)})}),1e3)}l.$watch("queryHopper.filter",function(e,t){p?i(function(){p=!1}):(t||(g=u.queryHopper.page),e!==t&&(u.queryHopper.page=1),e||(u.queryHopper.page=g),u.getHoppers())}),l.$watch("queryFinal.filter",function(e,t){p?i(function(){p=!1}):(t||(g=u.queryFinal.page),e!==t&&(u.queryFinal.page=1),e||(u.queryFinal.page=g),u.getFinals())}),l.$watch("queryHistory.filter",function(e,t){p?i(function(){p=!1}):(t||(g=u.queryHistory.page),e!==t&&(u.queryHistory.page=1),e||(u.queryHistory.page=g),u.getHistories())}),l.$on("$destroy",function(){a.removeAllListeners("voice_queue_channel:remove"),a.removeAllListeners("voice_outbound_channel:remove")})}e.$inject=["$mdDialog","$document","$window","$timeout","$scope","$rootScope","api","toasty","Auth","socket","$translate","msUtils"],angular.module("app.dashboards").controller("AgentGeneralContactController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p){var g=this;function v(){var e=g.choice?g.choice.toLowerCase():void 0;return{id:g.call.uniqueid,disposition:g.choice,dispositionat:moment(),amd:"amd"===e,fax:"fax"===e,blacklist:"blacklist"===e,recallme:"recallme"===e,UserId:"recallme"===e?u.getCurrentUser().id:null}}g.choice=null,g.isReschedule=!1,g.recallme=!1,g.dispositions=d,g.contact=m,g.call=c,g.note=g.call.note||void 0,g.dialerCall=!1,g.hopper={minDate:new Date,dateTime:new Date},g.call&&g.call.variables&&g.call.variables["xmd-voicequeueid"]&&(g.dialerCall=!0),g.saveDisposition=function(e){if(g.choice=_.isNil(e)?g.choice:e,g.call.note=g.note,l.voiceCallReport.update({id:g.call.uniqueid,userDisposition:g.choice,note:g.note,UserId:u.getCurrentUser().id,ContactId:g.contact.id}).$promise.catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATEVOICECALLREPORT",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.voiceRecording.get({uniqueid:g.call.uniqueid}).$promise.then(function(e){if(e)for(var t=0;t<e.rows.length;t+=1)l.voiceRecording.update({id:e.rows[t].id,userDisposition:g.choice}).$promise.catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATEVOICERECORDING",msg:e.data?JSON.stringify(e.data):e.toString()})})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATEVOICERECORDING",msg:e.data?JSON.stringify(e.data):e.toString()})}),g.dialerCall)if(l.cmHopperFinal.update(v()).$promise.catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATECMHOPPERFINAL",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.cmHopperHistory.update(v()).$promise.catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATECMHOPPERHISTORY",msg:e.data?JSON.stringify(e.data):e.toString()})}),_.isNil(g.choice))a.hide(g.choice?g.choice.toUpperCase():"");else switch(g.choice.toLowerCase()){case"blacklist":g.call&&g.call.variables&&g.call.variables["xmd-voicequeueid"]&&function(e){if(e)l.voiceQueue.getBlackLists({id:e,type:"outbound",fields:"id"}).$promise.then(function(e){var t=[];if(e&&0<e.count){for(var n=0;n<e.rows.length;n+=1){var a=angular.copy(g.contact);delete a.id,a.ListId=e.rows[n].id,t.push(l.cmContact.save(a).$promise)}return o.all(t)}return r.success({title:p.instant("DASHBOARDS.INFO"),msg:p.instant("DASHBOARDS.NOTAVAILABLE")+" "+g.choice}),void(g.choice=void 0)}).then(function(e){e&&a.hide(g.choice?g.choice.toUpperCase():"")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATEBLACKLIST",msg:e.data?JSON.stringify(e.data):e.toString()}),a.hide(g.choice?g.choice.toUpperCase():"")})}(g.call.variables["xmd-voicequeueid"]);break;case"reschedule":g.isReschedule=!0,g.recallme=!1;break;case"recallme":g.isReschedule=!0,g.recallme=!0;break;default:a.hide(g.choice?g.choice.toUpperCase():"")}else a.hide(g.choice?g.choice.toUpperCase():"")},g.closeDialog=function(){a.cancel()},g.saveReschedule=function(){return g.disable=!0,l.cmHopper.save({phone:g.contact.phone,UserId:g.recallme?u.getCurrentUser().id:null,ContactId:g.contact.id,ListId:g.contact.ListId,VoiceQueueId:Number(g.call["xmd-voicequeueid"]),scheduledat:moment(g.hopper.dateTime).format("YYYY-MM-DD HH:mm:ss"),priority:3,recallme:g.recallme}).$promise.then(function(){l.cmHopperFinal.update({id:g.call.uniqueid,rescheduled:!0,rescheduledat:moment(g.hopper.dateTime).format("YYYY-MM-DD HH:mm:ss"),recallme:g.recallme}).$promise.catch(function(e){console.log(e)})}).then(function(){r.success({title:p.instant("DASHBOARDS.INFO"),msg:p.instant("DASHBOARDS.CALL_DISPOSED")+" "+(g.recallme?p.instant("DASHBOARDS.RECALLME"):p.instant("DASHBOARDS.RESCHEDULE"))})}).catch(function(e){a.cancel(e)}).finally(function(){g.disable=!1,a.hide(g.choice?g.choice.toUpperCase():"")})}}e.$inject=["$scope","$state","$location","$mdDialog","$timeout","$q","$document","toasty","api","dispositions","call","contact","Auth","$translate"],angular.module("app.staff").controller("DisposeCallDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m){var u=this;u.call=l,u.contact=r,u.hopper={minDate:new Date,dateTime:new Date},u.closeDialog=function(){a.cancel()},u.saveDialog=function(){return u.disable=!0,s.cmHopper.save({phone:u.contact.phone,UserId:c?d.getCurrentUser().id:null,ContactId:u.contact.id,ListId:u.contact.ListId,VoiceQueueId:Number(u.call["xmd-voicequeueid"]),scheduledat:moment(u.hopper.dateTime).format("YYYY-MM-DD HH:mm:ss"),priority:3,recallme:c}).$promise.then(function(){s.cmHopperFinal.update({id:u.call.uniqueid,rescheduled:!0,rescheduledat:moment(u.hopper.dateTime).format("YYYY-MM-DD HH:mm:ss"),recallme:c}).$promise}).then(function(){o.success({title:m.instant("DASHBOARDS.INFO"),msg:m.instant("DASHBOARDS.CALL_DISPOSED")+" "+(c?m.instant("DASHBOARDS.RECALLME"):m.instant("DASHBOARDS.RESCHEDULE"))}),a.hide()}).catch(function(e){a.cancel(e)}).finally(function(){u.disable=!1})}}e.$inject=["$scope","$state","$location","$mdDialog","$timeout","toasty","api","contact","call","Auth","recallme","$translate"],angular.module("app.staff").controller("RescheduleCallDialogController",e)}(),function(){"use strict";function e(e,t){var n=t(function(){},999);e.$on("$destroy",function(){n&&(t.cancel(n),n=null)})}e.$inject=["$scope","$interval"],angular.module("app.dashboards").controller("AgentHomeAbandonedController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d,c){var m=this,u=!0;function p(){var e=i.localStorage.getItem("motion2.home.abandoned.bull.contacts:"+m.currentUser.id);e&&(e=JSON.parse(e))&&e.query&&(m.query=_.merge(e.query,_.omit(m.query,["sort","limit","page"])),m.query=_.omit(m.query,"filter")),s.voiceDisposition.get().$promise.then(function(e){m.disposition=e?e.rows:[]}).catch(function(e){console.log(e)}),s.user.getQueues({id:r.getCurrentUser().id,fields:"id,name",channel:"voice",type:"outbound",nolimit:!0}).$promise.then(function(e){m.queues=e||{count:0,rows:[]},m.queuesMap=_.mapValues(_.keyBy(m.queues.rows,"name"),"name"),m.defaultQueues=m.queues.rows?_.map(m.queues.rows,"name").join(","):void 0}).catch(function(e){console.error(e)}).finally(function(){m.getContacts()})}function g(e){m.contacts=e||{count:0,rows:[]},u=!1,m.refresh=!0}m.showTooltip=!1,m.refresh=!0,m.disable=[],m.disposition,m.currentUser=r.getCurrentUser(),m.localizationMap=c,m.pickerModel={dateStart:null,dateEnd:null},m.queues={},m.contacts={count:0,rows:[]},m.query={fields:"id,type,calleridnum,calleridname,queue,queuecallerabandonAt,queuecallerexitAt,queuecallerexitreason,assigned,lastAssignedTo,updatedAt,disposition",type:"outbound",queuecallerexitreason:"TIMEOUT,ABANDONED",sort:"-updatedAt",limit:10,page:1},m.clearAll=function(){m.query.dateStart=void 0,m.query.dateEnd=void 0,m.pickerModel={dateStart:null,dateEnd:null},m.getContacts()},m.getContacts=function(){m.query.dateStart=void 0,m.query.dateEnd=void 0,m.pickerModel.dateStart&&!u&&(m.query.dateStart=m.pickerModel.dateStart,m.query.dateEnd=m.pickerModel.dateEnd);m.query.queue=m.query.queue||m.defaultQueues,m.query.offset=(m.query.page-1)*m.query.limit,i.localStorage.setItem("motion2.home.abandoned.bull.contacts:"+m.currentUser.id,JSON.stringify({query:_.omit(m.query,"queue")})),m.promise=s.voiceQueueReport.getVoiceQueuesReport(m.query,g).$promise},m.refreshContacts=function(){m.showTooltip=!1,m.getContacts()},m.onInit=p,m.reserved=function(e,t){e&&(m.disable[e.id]=!0,s.voiceQueueReport.update({id:e.id,lastAssignedTo:e.assigned?m.currentUser.name:null,assigned:e.assigned,disposition:t||null}).$promise.catch(function(e){console.log(e)}).finally(function(){m.disable[e.id]=!1}))},m.onSavevoiceQueueReport=function(e){m.queuesMap&&"outbound"===e.type&&m.queuesMap[e.queue]&&(m.showTooltip=!0)},m.onUpdatevoiceQueueReport=function(e){if(e){var t=_.findIndex(m.contacts.rows,["id",e.id]);0<=t&&_.merge(m.contacts.rows[t],e)}},m.call=e.$parent.$parent.$parent.$parent.vm.call,m.transfer=e.$parent.$parent.$parent.$parent.vm.transfer,m.webcall=e.$parent.$parent.$parent.$parent.vm.webcall,m.webtransfer=e.$parent.$parent.$parent.$parent.vm.webtransfer,l.onWithoutApply("voiceQueueReport:save",m.onSavevoiceQueueReport),l.onWithoutApply("voiceQueueReport:update",m.onUpdatevoiceQueueReport),p();var v=!0,h=1;e.$watch("vm_bull.query.filter",function(e,t){v?n(function(){v=!1}):(t||(h=m.query.page),e!==t&&(m.query.page=1),e||(m.query.page=h),m.getContacts())}),e.$on("$destroy",function(){l.removeAllListeners("voiceQueueReport:save"),l.removeAllListeners("voiceQueueReport:update")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty","dateFilterLocalizationFactory"],angular.module("app.dashboards").controller("AgentHomeAbandonedBullController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d,c){var m=this,u=!0;function p(){var e=i.localStorage.getItem("motion2.home.abandoned.voice.contacts:"+m.currentUser.id);e&&(e=JSON.parse(e))&&e.query&&(m.query=_.merge(e.query,_.omit(m.query,["sort","limit","page"])),m.query=_.omit(m.query,"filter")),s.voiceDisposition.get().$promise.then(function(e){m.disposition=e?e.rows:[]}).catch(function(e){console.log(e)}),s.user.getQueues({id:r.getCurrentUser().id,fields:"id,name",channel:"voice",type:"inbound",nolimit:!0}).$promise.then(function(e){m.queues=e||{count:0,rows:[]},m.queuesMap=_.mapValues(_.keyBy(m.queues.rows,"name"),"name"),m.defaultQueues=m.queues.rows?_.map(m.queues.rows,"name").join(","):void 0}).catch(function(e){console.error(e)}).finally(function(){m.getContacts()})}function g(e){m.contacts=e||{count:0,rows:[]},u=!1,m.refresh=!0}m.showTooltip=!1,m.refresh=!0,m.disable=[],m.disposition,m.currentUser=r.getCurrentUser(),m.localizationMap=c,m.pickerModel={dateStart:null,dateEnd:null},m.queues={},m.contacts={count:0,rows:[]},m.query={fields:"id,type,calleridnum,calleridname,queue,queuecallerabandonAt,queuecallerexitAt,queuecallerexitreason,assigned,lastAssignedTo,updatedAt,disposition",type:"inbound",queuecallerexitreason:"TIMEOUT,ABANDONED",sort:"-updatedAt",limit:10,page:1},m.clearAll=function(){m.query.dateStart=void 0,m.query.dateEnd=void 0,m.pickerModel={dateStart:null,dateEnd:null},m.getContacts()},m.getContacts=function(){m.query.dateStart=void 0,m.query.dateEnd=void 0,m.pickerModel.dateStart&&!u&&(m.query.dateStart=m.pickerModel.dateStart,m.query.dateEnd=m.pickerModel.dateEnd);m.query.queue=m.query.queue||m.defaultQueues,m.query.offset=(m.query.page-1)*m.query.limit,i.localStorage.setItem("motion2.home.abandoned.voice.contacts:"+m.currentUser.id,JSON.stringify({query:_.omit(m.query,"queue")})),m.promise=s.voiceQueueReport.getVoiceQueuesReport(m.query,g).$promise},m.refreshContacts=function(){m.showTooltip=!1,m.getContacts()},m.onInit=p,m.reserved=function(e,t){e&&(m.disable[e.id]=!0,s.voiceQueueReport.update({id:e.id,lastAssignedTo:e.assigned?m.currentUser.name:null,assigned:e.assigned,disposition:t||null}).$promise.catch(function(e){console.log(e)}).finally(function(){m.disable[e.id]=!1}))},m.onSavevoiceQueueReport=function(e){m.queuesMap&&"inbound"===e.type&&m.queuesMap[e.queue]&&(m.showTooltip=!0)},m.onUpdatevoiceQueueReport=function(e){if(e){var t=_.findIndex(m.contacts.rows,["id",e.id]);0<=t&&_.merge(m.contacts.rows[t],e)}},m.call=e.$parent.$parent.$parent.$parent.vm.call,m.transfer=e.$parent.$parent.$parent.$parent.vm.transfer,m.webcall=e.$parent.$parent.$parent.$parent.vm.webcall,m.webtransfer=e.$parent.$parent.$parent.$parent.vm.webtransfer,l.onWithoutApply("voiceQueueReport:save",m.onSavevoiceQueueReport),l.onWithoutApply("voiceQueueReport:update",m.onUpdatevoiceQueueReport),p();var v=!0,h=1;e.$watch("vm_voice.query.filter",function(e,t){v?n(function(){v=!1}):(t||(h=m.query.page),e!==t&&(m.query.page=1),e||(m.query.page=h),m.getContacts())}),e.$on("$destroy",function(){l.removeAllListeners("voiceQueueReport:save"),l.removeAllListeners("voiceQueueReport:update")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty","dateFilterLocalizationFactory"],angular.module("app.dashboards").controller("AgentHomeAbandonedVoiceController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s){var r=this;r.user=i.getCurrentUser(),r.license={},r.sidebar="dashboard",r.navigation=s.getNavigation(),r.addContactTab=e.$parent.vm.addContactTab,r.addInteractionTab=e.$parent.vm.addInteractionTab,r.init=function(e){r.license=e;var t=n.localStorage.getItem("motion2.home:"+r.user.id);if(t)try{t=JSON.parse(t),r.sidebar=t.currentSidebarTab?t.currentSidebarTab:"dashboard"}catch(e){console.error(e),r.sidebar="dashboard"}},r.changeSidebarTab=function(e){r.sidebar=e,n.localStorage.setItem("motion2.home:"+r.user.id,JSON.stringify({currentSidebarTab:e}))},r.hasPermission=function(e){return i.hasPermission(e)}}e.$inject=["$scope","$timeout","$window","api","Auth","socket","msNavigationAgentService"],angular.module("app.dashboards").controller("AgentGeneralHomeController",e)}(),function(){"use strict";function e(n,a,e,t,i,o,s,r,l,d){var c=this;function m(e){c.chatInteractions=e||{count:0,rows:[]};for(var t=0;t<c.chatInteractions.rows.length;t+=1)p(c.chatInteractions.rows[t])}function u(){c.query.dateStart=void 0,c.query.dateEnd=void 0,c.pickerModel.dateStart&&(c.query.dateStart=c.pickerModel.dateStart,c.query.dateEnd=c.pickerModel.dateEnd),c.query.offset=(c.query.page-1)*c.query.limit,i.localStorage.setItem("motion2.home.chat:"+c.user.id,JSON.stringify({query:c.query})),c.promise=s.chatInteraction.get(c.query,m).$promise}function p(e){e&&e.Messages?e.unread=_.filter(e.Messages||[],{direction:"in",read:!1}).length:e.unread=0}c.user=r.getCurrentUser(),c.tags={count:0,rows:[]},c.chatInteractions={count:0,rows:[]},c.query={includeAll:!0,sort:"-updatedAt",limit:10,page:1,read:null,closed:null,substatus:null,ChatWebsiteId:null},c.success=m,c.getChatInteractions=u,c.showChatInteraction=function(e,t){n.$parent.vm.addInteractionTab("chat",t)},c.getContactLabel=function(e){if(e.Contact){var t="";t+=(e.Contact.firstName||"")+""+(e.Contact.lastName||"");var n=e.Account?e.Account.mapKey:void 0;return t+=n&&e.Contact[n]?" <"+e.Contact[n]+">":""}return o.instant("DASHBOARDS.UNKNOWN")},c.getUserLabel=function(e){if(e.UserId)return e.UserId===r.getCurrentUser().id?o.instant("DASHBOARDS.ME"):c.usersByKey[e.UserId].fullname+" <"+c.usersByKey[e.UserId].internal+">";return o.instant("DASHBOARDS.NOT_ASSIGNED")},c.getChatWebsiteLabel=function(e){if(e.Account)return e.Account.key;return o.instant("DASHBOARDS.UNKNOWN")},c.getColorByChannel=function(e){switch(e){case"chat":return"green-A700-bg";case"mail":return"teal-bg";case"sms":return"orange-bg";case"openchannel":return"amber-A200-bg";case"fax":return"blue-grey-A200-bg";default:return"white-bg"}},c.clearAll=function(){c.calendarModel={dateStart:null},c.pickerModel={dateStart:null},c.serviceModel={dateStart:null},c.getChatInteractions()},c.onInit=function(){return s.chatWebsite.get({nolimit:!0}).$promise.then(function(e){return c.chatAccounts=e||{count:0,rows:[]},s.tag.get().$promise}).then(function(e){c.tags=e||{count:0,rows:[]}}).then(function(){return s.user.get({nolimit:!0,fields:"id,fullname,userpic,internal"}).$promise}).then(function(e){c.usersByKey=_.keyBy(e.rows,"id")}).catch(function(e){console.error(e)}).finally(function(){var e=i.localStorage.getItem("motion2.home.chat:"+c.user.id);if(e)try{(e=JSON.parse(e)).query&&(c.query=_.merge(c.query,e.query),c.query=_.omit(c.query,"filter"),c.query.sort&&0<=c.query.sort.indexOf("lastMessage")&&(c.query=_.omit(c.query,"sort")),c.query.includeAll=!0)}catch(e){console.error(e)}l.on("chatInteraction:save",c.onChatInteractionSave),l.on("chatInteraction:update",c.onChatInteractionSave),l.on("chatInteractionTags:save",c.onChatInteractionTagsSave),l.on("chatMessage:save",c.onChatMessageSave),l.on("chatMessage:update",c.onChatMessageSave),l.on("user_has_chat_interactions:save",c.onChatInteractionOpen),l.on("user_has_chat_interactions:remove",c.onChatInteractionClose),c.getChatInteractions()})},c.onChatInteractionSave=function(e){if(e){var t=_.find(c.chatInteractions.rows,{id:e.id});t?_.merge(t,_.pick(e,_.keys(t))):u(),p(e)}},c.onChatInteractionTagsSave=function(e){if(e){var t=_.find(c.chatInteractions.rows,{id:e.id});t&&(t.Tags=e.tags||[],_.merge(t,_.pick(e,_.keys(t))))}},c.onChatMessageSave=function(e){if(e&&!e.secret){var t=_.find(c.chatInteractions.rows,{id:e.ChatInteractionId});if(t){var n=_.find(t.Messages,{id:e.id});n?_.merge(n,_.pick(e,_.keys(n))):(_.isNil(t.Messages)&&(t.Messages=[]),t.Messages.push(e)),p(t)}}},c.onChatInteractionOpen=function(e){var t=_.find(c.chatInteractions.rows,{id:e.ChatInteractionId});t&&t.Users&&(_.find(t.Users,{id:e.UserId})||t.Users.push({id:e.UserId}))},c.onChatInteractionClose=function(e){var t=_.find(c.chatInteractions.rows,{id:e.ChatInteractionId});t&&t.Users&&_.remove(t.Users,{id:e.UserId})},c.localizationMap={Today:o.instant("DASHBOARDS.TODAY"),Yesterday:o.instant("DASHBOARDS.YESTERDAY"),"This Week":o.instant("DASHBOARDS.THIS_WEEK"),"Last Week":o.instant("DASHBOARDS.LAST_WEEK"),"This Month":o.instant("DASHBOARDS.THIS_MONTH"),"Last Month":o.instant("DASHBOARDS.LAST_MONTH"),"This Year":o.instant("DASHBOARDS.THIS_YEAR"),"Last Year":o.instant("DASHBOARDS.LAST_YEAR"),January:o.instant("DASHBOARDS.JANUARY"),February:o.instant("DASHBOARDS.FEBRUARY"),March:o.instant("DASHBOARDS.MARCH"),April:o.instant("DASHBOARDS.APRIL"),May:o.instant("DASHBOARDS.MAY"),June:o.instant("DASHBOARDS.JUNE"),July:o.instant("DASHBOARDS.JULY"),August:o.instant("DASHBOARDS.AUGUST"),September:o.instant("DASHBOARDS.SEPTEMBER"),October:o.instant("DASHBOARDS.OCTOBER"),November:o.instant("DASHBOARDS.NOVEMBER"),December:o.instant("DASHBOARDS.DECEMBER"),Mon:o.instant("DASHBOARDS.MON"),Tue:o.instant("DASHBOARDS.TUE"),Wed:o.instant("DASHBOARDS.WED"),Thu:o.instant("DASHBOARDS.THU"),Fri:o.instant("DASHBOARDS.FRI"),Sat:o.instant("DASHBOARDS.SAT"),Sun:o.instant("DASHBOARDS.SUN")},c.pickerModel={dateStart:null},c.onInit();var g=!0,v=1;n.$watch("vm.query.filter",function(e,t){g?a(function(){g=!1}):(t||(v=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=v),c.getChatInteractions())}),n.$on("$destroy",function(){l.removeAllListeners("chatMessage:save"),l.removeAllListeners("chatMessage:update"),l.removeAllListeners("chatInteraction:save"),l.removeAllListeners("chatInteractionTags:save"),l.removeAllListeners("chatInteraction:update"),l.removeAllListeners("user_has_chat_interactions:save"),l.removeAllListeners("user_has_chat_interactions:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeChatController",e)}(),function(){"use strict";function e(n,a,i,o,e,t,s,r){var l=this;l.currentUser=t.getCurrentUser(),l.lists={},l.contacts={count:0,rows:[]},l.query={sort:"-updatedAt",limit:10,page:1},l.getContacts=function(){l.query.ListId=l.query.ListId||l.defaultLists,l.query.offset=(l.query.page-1)*l.query.limit,r.localStorage.setItem("motion2.home.contacts:"+l.currentUser.id,JSON.stringify({query:_.omit(l.query,"ListId")})),l.promise=s.cmContact.get(l.query,m).$promise},l.refreshContacts=function(){l.getContacts()},l.mergeContact=function(e,t){o.show({controller:"MergeContactDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/merge/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,resolve:{contact:["apiResolver",function(e){return e.resolve("cmContact@get",{id:t.id})}],lists:["apiResolver",function(e){return e.resolve("user@getLists",{id:l.currentUser.id,fields:"id,name"})}]},locals:{contacts:l.contacts.rows}})},l.duplicateContact=function(e,t){o.show({controller:"DuplicateContactDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/duplicate/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,resolve:{contact:["apiResolver",function(e){return e.resolve("cmContact@get",{id:t.id})}],lists:["apiResolver",function(e){return e.resolve("user@getLists",{id:l.currentUser.id,fields:"id,name"})}]},locals:{contacts:l.contacts.rows}})},l.openContact=function(e,t){a.$parent.vm.addContactTab(t)},l.call=a.$parent.vm.call,(l.onInit=u)();var d=!0,c=1;function m(e){l.contacts=e||{count:0,rows:[]}}function u(){var e=r.localStorage.getItem("motion2.home.contacts:"+l.currentUser.id);e&&(e=JSON.parse(e))&&e.query&&(l.query=_.merge(l.query,e.query),l.query=_.omit(l.query,"filter")),s.user.getLists({id:l.currentUser.id,fields:"id,name,dialPrefix",sort:"name",nolimit:!0}).$promise.then(function(e){l.lists=e||{count:0,rows:[]},l.listsMap=_.keyBy(l.lists.rows,"id"),l.defaultLists=l.lists.rows?_.map(l.lists.rows,"id").join(","):void 0}).catch(function(e){console.error(e)}).finally(function(){l.getContacts()})}a.$watch("vm.query.filter",function(e,t){d?i(function(){d=!1}):(t||(c=l.query.page),e!==t&&(l.query.page=1),e||(l.query.page=c),l.getContacts())})}e.$inject=["$document","$scope","$timeout","$mdDialog","$stateParams","Auth","api","$window"],angular.module("app.dashboards").controller("AgentHomeContactsController",e)}(),function(){"use strict";function e(e,t){var n=t(function(){},999);e.$on("$destroy",function(){n&&(t.cancel(n),n=null)})}e.$inject=["$scope","$interval"],angular.module("app.dashboards").controller("AgentHomeDashboardController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d){var c=this,m=["type","waiting","dialMethod","dialActive"];function u(e){c.voiceQueuesTotal=e.count?e.count:0,c.voiceQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},_.forIn(c.voiceQueues,function(e,t){c.rpcVoiceQueues[t]&&(c.voiceQueues[t].waiting=c.rpcVoiceQueues[t].waiting||0)})}c.voiceQueues={},c.voiceQueuesTotal=0,c.rpcVoiceQueues={},c.getVoiceQueues={},c.rpcVoiceQueuesChannels={},c.addVoiceQueuesChannels={},c.deleteVoiceQueuesChannels=[],c.load=!0,c.query={id:r.getCurrentUser().id,fields:"id,name,type,dialMethod,dialActive",channel:"voice",type:"outbound",limit:10,page:1},c.queryChannels={limit:10,page:1},c.success=u,c.getVoiceQueues=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=s.user.getQueues(c.query,u).$promise},c.getSize=function(e){return _.size(e)},c.onSaveQueue=function(e){c.voiceQueues[e.id]&&c.rpcVoiceQueues[e.id]&&(c.rpcVoiceQueues[e.id]=e,_.merge(c.voiceQueues[e.id],_.pick(e,m)))},c.onSaveChannel=function(e){"outbound"===e.type&&(e.queuecallerleaveAt?(delete c.rpcVoiceQueuesChannels[e.uniqueid],c.load&&c.deleteVoiceQueuesChannels.push(e.uniqueid)):(c.rpcVoiceQueuesChannels[e.uniqueid]=e,c.load&&(c.addVoiceQueuesChannels[e.uniqueid]=e)))},c.onUserVoiceQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getVoiceQueues()},c.onSaveVoiceQueue=function(e){_.isNil(e)||(c.rpcVoiceQueues[e.id]=_.pick(e,m))},c.onUpdateVoiceQueue=function(e){_.isNil(e)||(c.rpcVoiceQueues[e.id]&&_.merge(c.rpcVoiceQueues[e.id],_.pick(e,m)),c.voiceQueues[e.id]&&_.merge(c.voiceQueues[e.id],_.pick(e,m)))},c.onRemoveVoiceQueue=function(e){_.isNil(e)||(delete c.rpcVoiceQueues[e.id],delete c.voiceQueues[e.id])},l.onWithoutApply("voice_queue:save",c.onSaveQueue),l.onWithoutApply("voice_queue_channel:save",c.onSaveChannel),l.onWithoutApply("userVoiceQueue:save",c.onUserVoiceQueue),l.onWithoutApply("userVoiceQueue:remove",c.onUserVoiceQueue),l.onWithoutApply("voiceQueue:save",c.onSaveVoiceQueue),l.onWithoutApply("voiceQueue:remove",c.onRemoveVoiceQueue),l.onWithoutApply("voiceQueue:update",c.onUpdateVoiceQueue),s.rpc.getVoiceQueues().$promise.then(function(e){return c.rpcVoiceQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},s.rpc.getVoiceQueuesChannels().$promise}).then(function(e){c.rpcVoiceQueuesChannels=e?_.keyBy(e.rows?_.filter(e.rows,{type:"outbound",queuecallerleaveAt:null}):[],"uniqueid"):{}}).catch(function(e){console.error(e)}).finally(function(){_.merge(c.rpcVoiceQueuesChannels,c.addVoiceQueuesChannels);for(var e=0;e<c.deleteVoiceQueuesChannels.length;e+=1)delete c.rpcVoiceQueuesChannels[c.deleteVoiceQueuesChannels[e]];c.load=!1,c.addVoiceQueuesChannels={},c.deleteVoiceQueuesChannels=[],c.getVoiceQueues()});var p=!0,g=1;e.$watch("vm_dc.query.filter",function(e,t){p?n(function(){p=!1}):(t||(g=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=g),c.getVoiceQueues())}),e.$on("$destroy",function(){l.removeAllListeners("voice_queue:save"),l.removeAllListeners("voice_queue_channel:save"),l.removeAllListeners("userVoiceQueue:save"),l.removeAllListeners("userVoiceQueue:remove"),l.removeAllListeners("voiceQueue:save"),l.removeAllListeners("voiceQueue:update"),l.removeAllListeners("voiceQueue:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeDashboardBullController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d){var c=this,m=["id","name","mapAgentsId","waiting"],u=!0;function p(){var e=(c.queryChannels.page-1)*c.queryChannels.limit;c.paginatedInteractions=_.orderBy(c.rpcChatQueuesWaitingInteractions,["joinAt"],["desc"]),c.interactions=_.drop(c.paginatedInteractions,e).slice(0,c.queryChannels.limit)}function g(e){c.chatQueuesTotal=e.count?e.count:0,c.chatQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},_.forIn(c.chatQueues,function(e,t){c.rpcChatQueues[t]&&(c.chatQueues[t].waiting=c.rpcChatQueues[t].waiting||0)})}function v(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=s.user.getQueues(c.query,g).$promise}c.chatQueues={},c.chatQueuesTotal=0,c.rpcChatQueues={},c.paginatedInteractions=[],c.deleteChatQueuesWaitingInteractions=[],c.rpcChatQueuesWaitingInteractions={},c.query={id:r.getCurrentUser().id,channel:"chat",fields:"id,name,mapAgentsId,waiting",limit:10,page:1},c.queryChannels={limit:10,page:1},c.success=g,c.getChatQueues=v,c.getSize=function(e){return _.size(e)},c.getColorByChannel=function(e){switch(e){case"chat":return"green-A700-bg";case"mail":return"teal-bg";case"sms":return"orange-bg";case"openchannel":return"amber-A200-bg";case"fax":return"blue-grey-A200-bg";default:return"white-bg"}},c.paginate=p,c.onSaveQueue=function(e){c.chatQueues[e.id]&&c.rpcChatQueues[e.id]&&(_.merge(c.rpcChatQueues[e.id],_.pick(e,m)),_.merge(c.chatQueues[e.id],_.pick(e,m)))},c.onSaveChatQueue=function(e){_.isNil(e)||(c.rpcChatQueues[e.id]=_.pick(e,m))},c.onUpdateChatQueue=function(e){_.isNil(e)||(c.rpcChatQueues[e.id]&&_.merge(c.rpcChatQueues[e.id],_.pick(e,m)),c.chatQueues[e.id]&&_.merge(c.chatQueues[e.id],_.pick(e,m)))},c.onRemoveChatQueue=function(e){_.isNil(e)||(delete c.rpcChatQueues[e.id],delete c.chatQueues[e.id])},c.onSaveUserChatQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getChatQueues()},c.onRemoveUserChatQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getChatQueues()},c.onSaveChatQueueChannel=function(e){c.rpcChatQueuesWaitingInteractions[e.id]=e,p()},c.onRemoveChatQueueChannel=function(e){delete c.rpcChatQueuesWaitingInteractions[e.id],u&&c.deleteChatQueuesWaitingInteractions.push(e.id);p()},l.onWithoutApply("chat_queue:save",c.onSaveQueue),l.onWithoutApply("chatQueue:save",c.onSaveVoiceQueue),l.onWithoutApply("chatQueue:update",c.onUpdateVoiceQueue),l.onWithoutApply("chatQueue:remove",c.onRemoveVoiceQueue),l.onWithoutApply("userChatQueue:save",c.onSaveUserChatQueue),l.onWithoutApply("userChatQueue:remove",c.onRemoveUserChatQueue),l.onWithoutApply("chat_queue_waiting_interaction:save",c.onSaveChatQueueChannel),l.onWithoutApply("chat_queue_waiting_interaction:remove",c.onRemoveChatQueueChannel),s.rpc.getChatQueues().$promise.then(function(e){return c.rpcChatQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},s.rpc.getChatQueuesWaitingInteractions().$promise}).then(function(e){_.merge(c.rpcChatQueuesWaitingInteractions,e?_.keyBy(e.rows?e.rows:[],"id"):{})}).catch(function(e){console.error(e)}).finally(function(){for(var e=0;e<c.deleteChatQueuesWaitingInteractions.length;e+=1)delete c.rpcChatQueuesWaitingInteractions[c.deleteChatQueuesWaitingInteractions[e]];u=!1,c.deleteChatQueuesWaitingInteractions=[],v(),p()});var h=!0,b=1;e.$watch("vm_dc.query.filter",function(e,t){h?n(function(){h=!1}):(t||(b=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=b),c.getChatQueues())}),e.$on("$destroy",function(){l.removeAllListeners("chat_queue:save"),l.removeAllListeners("chatQueue:save"),l.removeAllListeners("chatQueue:update"),l.removeAllListeners("chatQueue:remove"),l.removeAllListeners("userChatQueue:save"),l.removeAllListeners("userChatQueue:remove"),l.removeAllListeners("chat_queue_waiting_interaction:save"),l.removeAllListeners("chat_queue_waiting_interaction:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeDashboardMultiChannelChatController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d){var c=this,m=["id","name","mapAgentsId","waiting"],u=!0;function p(){var e=(c.queryChannels.page-1)*c.queryChannels.limit;c.paginatedInteractions=_.orderBy(c.rpcFaxQueuesWaitingInteractions,["joinAt"],["desc"]),c.interactions=_.drop(c.paginatedInteractions,e).slice(0,c.queryChannels.limit)}function g(e){c.faxQueuesTotal=e.count?e.count:0,c.faxQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},_.forIn(c.faxQueues,function(e,t){c.rpcFaxQueues[t]&&(c.faxQueues[t].waiting=c.rpcFaxQueues[t].waiting||0)})}function v(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=s.user.getQueues(c.query,g).$promise}c.faxQueues={},c.faxQueuesTotal=0,c.rpcFaxQueues={},c.paginatedInteractions=[],c.deleteFaxQueuesWaitingInteractions=[],c.rpcFaxQueuesWaitingInteractions={},c.query={id:r.getCurrentUser().id,channel:"fax",fields:"id,name,mapAgentsId,waiting",limit:10,page:1},c.queryChannels={limit:10,page:1},c.success=g,c.getFaxQueues=v,c.getSize=function(e){return _.size(e)},c.getColorByChannel=function(e){switch(e){case"chat":return"green-A700-bg";case"mail":return"teal-bg";case"sms":return"orange-bg";case"openchannel":return"amber-A200-bg";case"fax":return"blue-grey-A200-bg";default:return"white-bg"}},c.paginate=p,c.onSaveQueue=function(e){c.faxQueues[e.id]&&c.rpcFaxQueues[e.id]&&(_.merge(c.rpcFaxQueues[e.id],_.pick(e,m)),_.merge(c.faxQueues[e.id],_.pick(e,m)))},c.onSaveFaxQueue=function(e){_.isNil(e)||(c.rpcFaxQueues[e.id]=_.pick(e,m))},c.onUpdateFaxQueue=function(e){_.isNil(e)||(c.rpcFaxQueues[e.id]&&_.merge(c.rpcFaxQueues[e.id],_.pick(e,m)),c.faxQueues[e.id]&&_.merge(c.faxQueues[e.id],_.pick(e,m)))},c.onRemoveFaxQueue=function(e){_.isNil(e)||(delete c.rpcFaxQueues[e.id],delete c.faxQueues[e.id])},c.onSaveUserFaxQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getFaxQueues()},c.onRemoveUserFaxQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getFaxQueues()},c.onSaveFaxQueueChannel=function(e){c.rpcFaxQueuesWaitingInteractions[e.id]=e,p()},c.onRemoveFaxQueueChannel=function(e){delete c.rpcFaxQueuesWaitingInteractions[e.id],u&&c.deleteFaxQueuesWaitingInteractions.push(e.id);p()},l.onWithoutApply("fax_queue:save",c.onSaveQueue),l.onWithoutApply("faxQueue:save",c.onSaveVoiceQueue),l.onWithoutApply("faxQueue:update",c.onUpdateVoiceQueue),l.onWithoutApply("faxQueue:remove",c.onRemoveVoiceQueue),l.onWithoutApply("userFaxQueue:save",c.onSaveUserFaxQueue),l.onWithoutApply("userFaxQueue:remove",c.onRemoveUserFaxQueue),l.onWithoutApply("fax_queue_waiting_interaction:save",c.onSaveFaxQueueChannel),l.onWithoutApply("fax_queue_waiting_interaction:remove",c.onRemoveFaxQueueChannel),s.rpc.getFaxQueues().$promise.then(function(e){return c.rpcFaxQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},s.rpc.getFaxQueuesWaitingInteractions().$promise}).then(function(e){_.merge(c.rpcFaxQueuesWaitingInteractions,e?_.keyBy(e.rows?e.rows:[],"id"):{})}).catch(function(e){console.error(e)}).finally(function(){for(var e=0;e<c.deleteFaxQueuesWaitingInteractions.length;e+=1)delete c.rpcFaxQueuesWaitingInteractions[c.deleteFaxQueuesWaitingInteractions[e]];u=!1,c.deleteFaxQueuesWaitingInteractions=[],v(),p()});var h=!0,b=1;e.$watch("vm_dc.query.filter",function(e,t){h?n(function(){h=!1}):(t||(b=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=b),c.getFaxQueues())}),e.$on("$destroy",function(){l.removeAllListeners("fax_queue:save"),l.removeAllListeners("faxQueue:save"),l.removeAllListeners("faxQueue:update"),l.removeAllListeners("faxQueue:remove"),l.removeAllListeners("userFaxQueue:save"),l.removeAllListeners("userFaxQueue:remove"),l.removeAllListeners("fax_queue_waiting_interaction:save"),l.removeAllListeners("fax_queue_waiting_interaction:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeDashboardMultiChannelFaxController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d){var c=this,m=["id","name","mapAgentsId","waiting"],u=!0;function p(){var e=(c.queryChannels.page-1)*c.queryChannels.limit;c.paginatedInteractions=_.orderBy(c.rpcMailQueuesWaitingInteractions,["joinAt"],["desc"]),c.interactions=_.drop(c.paginatedInteractions,e).slice(0,c.queryChannels.limit)}function g(e){c.mailQueuesTotal=e.count?e.count:0,c.mailQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},_.forIn(c.mailQueues,function(e,t){c.rpcMailQueues[t]&&(c.mailQueues[t].waiting=c.rpcMailQueues[t].waiting||0)})}function v(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=s.user.getQueues(c.query,g).$promise}c.mailQueues={},c.mailQueuesTotal=0,c.rpcMailQueues={},c.paginatedInteractions=[],c.deleteMailQueuesWaitingInteractions=[],c.rpcMailQueuesWaitingInteractions={},c.query={id:r.getCurrentUser().id,channel:"mail",fields:"id,name,mapAgentsId,waiting",limit:10,page:1},c.queryChannels={limit:10,page:1},c.success=g,c.getMailQueues=v,c.getSize=function(e){return _.size(e)},c.getColorByChannel=function(e){switch(e){case"chat":return"green-A700-bg";case"mail":return"teal-bg";case"sms":return"orange-bg";case"openchannel":return"amber-A200-bg";case"fax":return"blue-grey-A200-bg";default:return"white-bg"}},c.paginate=p,c.onSaveQueue=function(e){c.mailQueues[e.id]&&c.rpcMailQueues[e.id]&&(_.merge(c.rpcMailQueues[e.id],_.pick(e,m)),_.merge(c.mailQueues[e.id],_.pick(e,m)))},c.onSaveMailQueue=function(e){_.isNil(e)||(c.rpcMailQueues[e.id]=_.pick(e,m))},c.onUpdateMailQueue=function(e){_.isNil(e)||(c.rpcMailQueues[e.id]&&_.merge(c.rpcMailQueues[e.id],_.pick(e,m)),c.mailQueues[e.id]&&_.merge(c.mailQueues[e.id],_.pick(e,m)))},c.onRemoveMailQueue=function(e){_.isNil(e)||(delete c.rpcMailQueues[e.id],delete c.mailQueues[e.id])},c.onSaveUserMailQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getMailQueues()},c.onRemoveUserMailQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getMailQueues()},c.onSaveMailQueueChannel=function(e){c.rpcMailQueuesWaitingInteractions[e.id]=e,p()},c.onRemoveMailQueueChannel=function(e){delete c.rpcMailQueuesWaitingInteractions[e.id],u&&c.deleteMailQueuesWaitingInteractions.push(e.id);p()},l.onWithoutApply("mail_queue:save",c.onSaveQueue),l.onWithoutApply("mailQueue:save",c.onSaveVoiceQueue),l.onWithoutApply("mailQueue:update",c.onUpdateVoiceQueue),l.onWithoutApply("mailQueue:remove",c.onRemoveVoiceQueue),l.onWithoutApply("userMailQueue:save",c.onSaveUserMailQueue),l.onWithoutApply("userMailQueue:remove",c.onRemoveUserMailQueue),l.onWithoutApply("mail_queue_waiting_interaction:save",c.onSaveMailQueueChannel),l.onWithoutApply("mail_queue_waiting_interaction:remove",c.onRemoveMailQueueChannel),s.rpc.getMailQueues().$promise.then(function(e){return c.rpcMailQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},s.rpc.getMailQueuesWaitingInteractions().$promise}).then(function(e){_.merge(c.rpcMailQueuesWaitingInteractions,e?_.keyBy(e.rows?e.rows:[],"id"):{})}).catch(function(e){console.error(e)}).finally(function(){for(var e=0;e<c.deleteMailQueuesWaitingInteractions.length;e+=1)delete c.rpcMailQueuesWaitingInteractions[c.deleteMailQueuesWaitingInteractions[e]];u=!1,c.deleteMailQueuesWaitingInteractions=[],v(),p()});var h=!0,b=1;e.$watch("vm_dc.query.filter",function(e,t){h?n(function(){h=!1}):(t||(b=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=b),c.getMailQueues())}),e.$on("$destroy",function(){l.removeAllListeners("mail_queue:save"),l.removeAllListeners("mailQueue:save"),l.removeAllListeners("mailQueue:update"),l.removeAllListeners("mailQueue:remove"),l.removeAllListeners("userMailQueue:save"),l.removeAllListeners("userMailQueue:remove"),l.removeAllListeners("mail_queue_waiting_interaction:save"),l.removeAllListeners("mail_queue_waiting_interaction:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeDashboardMultiChannelMailController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d){var c=this,m=["id","name","mapAgentsId","waiting"],u=!0;function p(){var e=(c.queryChannels.page-1)*c.queryChannels.limit;c.paginatedInteractions=_.orderBy(c.rpcOpenchannelQueuesWaitingInteractions,["joinAt"],["desc"]),c.interactions=_.drop(c.paginatedInteractions,e).slice(0,c.queryChannels.limit)}function g(e){c.openchannelQueuesTotal=e.count?e.count:0,c.openchannelQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},_.forIn(c.openchannelQueues,function(e,t){c.rpcOpenchannelQueues[t]&&(c.openchannelQueues[t].waiting=c.rpcOpenchannelQueues[t].waiting||0)})}function v(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=s.user.getQueues(c.query,g).$promise}c.openchannelQueues={},c.openchannelQueuesTotal=0,c.rpcOpenchannelQueues={},c.paginatedInteractions=[],c.deleteOpenchannelQueuesWaitingInteractions=[],c.rpcOpenchannelQueuesWaitingInteractions={},c.query={id:r.getCurrentUser().id,channel:"openchannel",fields:"id,name,mapAgentsId,waiting",limit:10,page:1},c.queryChannels={limit:10,page:1},c.success=g,c.getOpenchannelQueues=v,c.getSize=function(e){return _.size(e)},c.getColorByChannel=function(e){switch(e){case"chat":return"green-A700-bg";case"mail":return"teal-bg";case"sms":return"orange-bg";case"openchannel":return"amber-A200-bg";case"fax":return"blue-grey-A200-bg";default:return"white-bg"}},c.paginate=p,c.onSaveQueue=function(e){c.openchannelQueues[e.id]&&c.rpcOpenchannelQueues[e.id]&&(_.merge(c.rpcOpenchannelQueues[e.id],_.pick(e,m)),_.merge(c.openchannelQueues[e.id],_.pick(e,m)))},c.onSaveOpenchannelQueue=function(e){_.isNil(e)||(c.rpcOpenchannelQueues[e.id]=_.pick(e,m))},c.onUpdateOpenchannelQueue=function(e){_.isNil(e)||(c.rpcOpenchannelQueues[e.id]&&_.merge(c.rpcOpenchannelQueues[e.id],_.pick(e,m)),c.openchannelQueues[e.id]&&_.merge(c.openchannelQueues[e.id],_.pick(e,m)))},c.onRemoveOpenchannelQueue=function(e){_.isNil(e)||(delete c.rpcOpenchannelQueues[e.id],delete c.openchannelQueues[e.id])},c.onSaveUserOpenchannelQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getOpenchannelQueues()},c.onRemoveUserOpenchannelQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getOpenchannelQueues()},c.onSaveOpenchannelQueueChannel=function(e){c.rpcOpenchannelQueuesWaitingInteractions[e.id]=e,p()},c.onRemoveOpenchannelQueueChannel=function(e){delete c.rpcOpenchannelQueuesWaitingInteractions[e.id],u&&c.deleteOpenchannelQueuesWaitingInteractions.push(e.id);p()},l.onWithoutApply("openchannel_queue:save",c.onSaveQueue),l.onWithoutApply("openchannelQueue:save",c.onSaveVoiceQueue),l.onWithoutApply("openchannelQueue:update",c.onUpdateVoiceQueue),l.onWithoutApply("openchannelQueue:remove",c.onRemoveVoiceQueue),l.onWithoutApply("userOpenchannelQueue:save",c.onSaveUserOpenchannelQueue),l.onWithoutApply("userOpenchannelQueue:remove",c.onRemoveUserOpenchannelQueue),l.onWithoutApply("openchannel_queue_waiting_interaction:save",c.onSaveOpenchannelQueueChannel),l.onWithoutApply("openchannel_queue_waiting_interaction:remove",c.onRemoveOpenchannelQueueChannel),s.rpc.getOpenchannelQueues().$promise.then(function(e){return c.rpcOpenchannelQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},s.rpc.getOpenchannelQueuesWaitingInteractions().$promise}).then(function(e){_.merge(c.rpcOpenchannelQueuesWaitingInteractions,e?_.keyBy(e.rows?e.rows:[],"id"):{})}).catch(function(e){console.error(e)}).finally(function(){for(var e=0;e<c.deleteOpenchannelQueuesWaitingInteractions.length;e+=1)delete c.rpcOpenchannelQueuesWaitingInteractions[c.deleteOpenchannelQueuesWaitingInteractions[e]];u=!1,c.deleteOpenchannelQueuesWaitingInteractions=[],v(),p()});var h=!0,b=1;e.$watch("vm_dc.query.filter",function(e,t){h?n(function(){h=!1}):(t||(b=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=b),c.getOpenchannelQueues())}),e.$on("$destroy",function(){l.removeAllListeners("openchannel_queue:save"),l.removeAllListeners("openchannelQueue:save"),l.removeAllListeners("openchannelQueue:update"),l.removeAllListeners("openchannelQueue:remove"),l.removeAllListeners("userOpenchannelQueue:save"),l.removeAllListeners("userOpenchannelQueue:remove"),l.removeAllListeners("openchannel_queue_waiting_interaction:save"),l.removeAllListeners("openchannel_queue_waiting_interaction:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeDashboardMultiChannelOpenchannelController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d){var c=this,m=["id","name","mapAgentsId","waiting"],u=!0;function p(){var e=(c.queryChannels.page-1)*c.queryChannels.limit;c.paginatedInteractions=_.orderBy(c.rpcSmsQueuesWaitingInteractions,["joinAt"],["desc"]),c.interactions=_.drop(c.paginatedInteractions,e).slice(0,c.queryChannels.limit)}function g(e){c.smsQueuesTotal=e.count?e.count:0,c.smsQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},_.forIn(c.smsQueues,function(e,t){c.rpcSmsQueues[t]&&(c.smsQueues[t].waiting=c.rpcSmsQueues[t].waiting||0)})}function v(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=s.user.getQueues(c.query,g).$promise}c.smsQueues={},c.smsQueuesTotal=0,c.rpcSmsQueues={},c.paginatedInteractions=[],c.deleteSmsQueuesWaitingInteractions=[],c.rpcSmsQueuesWaitingInteractions={},c.query={id:r.getCurrentUser().id,channel:"sms",fields:"id,name,mapAgentsId,waiting",limit:10,page:1},c.queryChannels={limit:10,page:1},c.success=g,c.getSmsQueues=v,c.getSize=function(e){return _.size(e)},c.getColorByChannel=function(e){switch(e){case"chat":return"green-A700-bg";case"mail":return"teal-bg";case"sms":return"orange-bg";case"openchannel":return"amber-A200-bg";case"fax":return"blue-grey-A200-bg";default:return"white-bg"}},c.paginate=p,c.onSaveQueue=function(e){c.smsQueues[e.id]&&c.rpcSmsQueues[e.id]&&(_.merge(c.rpcSmsQueues[e.id],_.pick(e,m)),_.merge(c.smsQueues[e.id],_.pick(e,m)))},c.onSaveSmsQueue=function(e){_.isNil(e)||(c.rpcSmsQueues[e.id]=_.pick(e,m))},c.onUpdateSmsQueue=function(e){_.isNil(e)||(c.rpcSmsQueues[e.id]&&_.merge(c.rpcSmsQueues[e.id],_.pick(e,m)),c.smsQueues[e.id]&&_.merge(c.smsQueues[e.id],_.pick(e,m)))},c.onRemoveSmsQueue=function(e){_.isNil(e)||(delete c.rpcSmsQueues[e.id],delete c.smsQueues[e.id])},c.onSaveUserSmsQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getSmsQueues()},c.onRemoveUserSmsQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getSmsQueues()},c.onSaveSmsQueueChannel=function(e){c.rpcSmsQueuesWaitingInteractions[e.id]=e,p()},c.onRemoveSmsQueueChannel=function(e){delete c.rpcSmsQueuesWaitingInteractions[e.id],u&&c.deleteSmsQueuesWaitingInteractions.push(e.id);p()},l.onWithoutApply("sms_queue:save",c.onSaveQueue),l.onWithoutApply("smsQueue:save",c.onSaveVoiceQueue),l.onWithoutApply("smsQueue:update",c.onUpdateVoiceQueue),l.onWithoutApply("smsQueue:remove",c.onRemoveVoiceQueue),l.onWithoutApply("userSmsQueue:save",c.onSaveUserSmsQueue),l.onWithoutApply("userSmsQueue:remove",c.onRemoveUserSmsQueue),l.onWithoutApply("sms_queue_waiting_interaction:save",c.onSaveSmsQueueChannel),l.onWithoutApply("sms_queue_waiting_interaction:remove",c.onRemoveSmsQueueChannel),s.rpc.getSmsQueues().$promise.then(function(e){return c.rpcSmsQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},s.rpc.getSmsQueuesWaitingInteractions().$promise}).then(function(e){_.merge(c.rpcSmsQueuesWaitingInteractions,e?_.keyBy(e.rows?e.rows:[],"id"):{})}).catch(function(e){console.error(e)}).finally(function(){for(var e=0;e<c.deleteSmsQueuesWaitingInteractions.length;e+=1)delete c.rpcSmsQueuesWaitingInteractions[c.deleteSmsQueuesWaitingInteractions[e]];u=!1,c.deleteSmsQueuesWaitingInteractions=[],v(),p()});var h=!0,b=1;e.$watch("vm_dc.query.filter",function(e,t){h?n(function(){h=!1}):(t||(b=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=b),c.getSmsQueues())}),e.$on("$destroy",function(){l.removeAllListeners("sms_queue:save"),l.removeAllListeners("smsQueue:save"),l.removeAllListeners("smsQueue:update"),l.removeAllListeners("smsQueue:remove"),l.removeAllListeners("userSmsQueue:save"),l.removeAllListeners("userSmsQueue:remove"),l.removeAllListeners("sms_queue_waiting_interaction:save"),l.removeAllListeners("sms_queue_waiting_interaction:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeDashboardMultiChannelSmsController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d){var c=this,m=["type","waiting","dialMethod","dialActive"];function u(e){c.voiceQueuesTotal=e.count?e.count:0,c.voiceQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},_.forIn(c.voiceQueues,function(e,t){c.rpcVoiceQueues[t]&&(c.voiceQueues[t].waiting=c.rpcVoiceQueues[t].waiting||0)})}c.voiceQueues={},c.voiceQueuesTotal=0,c.rpcVoiceQueues={},c.getVoiceQueues={},c.rpcVoiceQueuesChannels={},c.addVoiceQueuesChannels={},c.deleteVoiceQueuesChannels=[],c.load=!0,c.query={id:r.getCurrentUser().id,fields:"id,name,type,dialMethod,dialActive",channel:"voice",type:"inbound",limit:10,page:1},c.queryChannels={limit:10,page:1},c.success=u,c.getVoiceQueues=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=s.user.getQueues(c.query,u).$promise},c.getSize=function(e){return _.size(e)},c.onSaveQueue=function(e){c.voiceQueues[e.id]&&c.rpcVoiceQueues[e.id]&&(c.rpcVoiceQueues[e.id]=e,_.merge(c.voiceQueues[e.id],_.pick(e,m)))},c.onSaveChannel=function(e){"inbound"===e.type&&(e.queuecallerleaveAt?(delete c.rpcVoiceQueuesChannels[e.uniqueid],c.load&&c.deleteVoiceQueuesChannels.push(e.uniqueid)):(c.rpcVoiceQueuesChannels[e.uniqueid]=e,c.load&&(c.addVoiceQueuesChannels[e.uniqueid]=e)))},c.onUserVoiceQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getVoiceQueues()},c.onSaveVoiceQueue=function(e){_.isNil(e)||(c.rpcVoiceQueues[e.id]=_.pick(e,m))},c.onUpdateVoiceQueue=function(e){_.isNil(e)||(c.rpcVoiceQueues[e.id]&&_.merge(c.rpcVoiceQueues[e.id],_.pick(e,m)),c.voiceQueues[e.id]&&_.merge(c.voiceQueues[e.id],_.pick(e,m)))},c.onRemoveVoiceQueue=function(e){_.isNil(e)||(delete c.rpcVoiceQueues[e.id],delete c.voiceQueues[e.id])},l.onWithoutApply("voice_queue:save",c.onSaveQueue),l.onWithoutApply("voice_queue_channel:save",c.onSaveChannel),l.onWithoutApply("userVoiceQueue:save",c.onUserVoiceQueue),l.onWithoutApply("userVoiceQueue:remove",c.onUserVoiceQueue),l.onWithoutApply("voiceQueue:save",c.onSaveVoiceQueue),l.onWithoutApply("voiceQueue:remove",c.onRemoveVoiceQueue),l.onWithoutApply("voiceQueue:update",c.onUpdateVoiceQueue),s.rpc.getVoiceQueues().$promise.then(function(e){return c.rpcVoiceQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},s.rpc.getVoiceQueuesChannels().$promise}).then(function(e){c.rpcVoiceQueuesChannels=e?_.keyBy(e.rows?_.filter(e.rows,{type:"inbound",queuecallerleaveAt:null}):[],"uniqueid"):{}}).catch(function(e){console.error(e)}).finally(function(){_.merge(c.rpcVoiceQueuesChannels,c.addVoiceQueuesChannels);for(var e=0;e<c.deleteVoiceQueuesChannels.length;e+=1)delete c.rpcVoiceQueuesChannels[c.deleteVoiceQueuesChannels[e]];c.load=!1,c.addVoiceQueuesChannels={},c.deleteVoiceQueuesChannels=[],c.getVoiceQueues()});var p=!0,g=1;e.$watch("vm_dc.query.filter",function(e,t){p?n(function(){p=!1}):(t||(g=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=g),c.getVoiceQueues())}),e.$on("$destroy",function(){l.removeAllListeners("voice_queue:save"),l.removeAllListeners("voice_queue_channel:save"),l.removeAllListeners("userVoiceQueue:save"),l.removeAllListeners("userVoiceQueue:remove"),l.removeAllListeners("voiceQueue:save"),l.removeAllListeners("voiceQueue:update"),l.removeAllListeners("voiceQueue:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeDashboardVoiceController",e)}(),function(){"use strict";function e(n,a,i,o,t,s,r,l,d,c){var m=this;function e(e){m.faxInteractions=e||{count:0,rows:[]};for(var t=0;t<m.faxInteractions.rows.length;t+=1)p(m.faxInteractions.rows[t])}function u(){m.query.dateStart=void 0,m.query.dateEnd=void 0,m.pickerModel.dateStart&&(m.query.dateStart=m.pickerModel.dateStart,m.query.dateEnd=m.pickerModel.dateEnd),m.query.offset=(m.query.page-1)*m.query.limit,t.localStorage.setItem("motion2.home.fax:"+m.user.id,JSON.stringify({query:m.query})),m.promise=r.faxInteraction.get(m.query,e).$promise}function p(e){e&&e.Messages?e.unread=_.filter(e.Messages||[],{direction:"in",read:!1}).length:e.unread=0}m.user=l.getCurrentUser(),m.tags={count:0,rows:[]},m.faxInteractions={count:0,rows:[]},m.query={includeAll:!0,sort:"-updatedAt",limit:10,page:1,read:null,closed:null,substatus:null,FaxAccountId:null},m.success=e,m.getFaxInteractions=u,m.showFaxInteraction=function(e,t){n.$parent.vm.addInteractionTab("fax",t)},m.getContactLabel=function(e){if(e.Contact){var t="";return t+=(e.Contact.firstName||"")+""+(e.Contact.lastName||""),t+=" <"+(e.Contact.fax||"unknown")+">"}return s.instant("DASHBOARDS.UNKNOWN")},m.getUserLabel=function(e){if(e.UserId)return e.UserId===l.getCurrentUser().id?s.instant("DASHBOARDS.ME"):m.usersByKey[e.UserId].fullname+" <"+m.usersByKey[e.UserId].internal+">";return s.instant("DASHBOARDS.NOT_ASSIGNED")},m.getFaxAccountLabel=function(e){if(e.Account)return e.Account.key;return s.instant("DASHBOARDS.UNKNOWN")},m.getColorByChannel=function(e){switch(e){case"chat":return"green-A700-bg";case"mail":return"teal-bg";case"sms":return"orange-bg";case"openchannel":return"amber-A200-bg";case"fax":return"blue-grey-A200-bg";default:return"white-bg"}},m.clearAll=function(){m.calendarModel={dateStart:null},m.pickerModel={dateStart:null},m.serviceModel={dateStart:null},m.getFaxInteractions()},m.composeFaxInteraction=function(e,t){i.show({controller:"ComposeFaxInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/composeFax/dialog.html",parent:angular.element(o.body),clickOutsideToClose:!1,locals:{account:t,message:{},type:"new",interaction:{}},fullscreen:!0}).then(function(e){return r.faxAccount.send({id:t.id},e).$promise.then(function(e){c.success({title:"Message properly sent!",msg:"Message has been sent!"}),n.$parent.vm.addInteractionTab("fax",e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else c.error({title:"FAX:SEND",msg:e.data?JSON.stringify(e.data):e.message||e.toString()})})})},m.onInit=function(){return r.faxAccount.get({nolimit:!0}).$promise.then(function(e){return m.faxAccounts=e||{count:0,rows:[]},r.tag.get().$promise}).then(function(e){m.tags=e||{count:0,rows:[]}}).then(function(){return r.user.get({nolimit:!0,fields:"id,fullname,userpic,internal"}).$promise}).then(function(e){m.usersByKey=_.keyBy(e.rows,"id")}).catch(function(e){console.error(e)}).finally(function(){var e=t.localStorage.getItem("motion2.home.fax:"+m.user.id);if(e)try{(e=JSON.parse(e)).query&&(m.query=_.merge(m.query,e.query),m.query=_.omit(m.query,"filter"),m.query.sort&&0<=m.query.sort.indexOf("lastMessage")&&(m.query=_.omit(m.query,"sort")),m.query.includeAll=!0)}catch(e){console.error(e)}d.on("faxInteraction:save",m.onFaxInteractionSave),d.on("faxInteraction:update",m.onFaxInteractionSave),d.on("faxInteractionTags:save",m.onFaxInteractionTagsSave),d.on("faxMessage:save",m.onFaxMessageSave),d.on("faxMessage:update",m.onFaxMessageSave),d.on("user_has_fax_interactions:save",m.onFaxInteractionOpen),d.on("user_has_fax_interactions:remove",m.onFaxInteractionClose),m.getFaxInteractions()})},m.onFaxInteractionSave=function(e){if(e){var t=_.find(m.faxInteractions.rows,{id:e.id});t?_.merge(t,_.pick(e,_.keys(t))):u(),p(e)}},m.onFaxInteractionTagsSave=function(e){if(e){var t=_.find(m.faxInteractions.rows,{id:e.id});t&&(t.Tags=e.tags||[],_.merge(t,_.pick(e,_.keys(t))))}},m.onFaxMessageSave=function(e){if(e&&!e.secret){var t=_.find(m.faxInteractions.rows,{id:e.FaxInteractionId});if(t){var n=_.find(t.Messages,{id:e.id});n?_.merge(n,_.pick(e,_.keys(n))):(_.isNil(t.Messages)&&(t.Messages=[]),t.Messages.push(e)),p(t)}}},m.onFaxInteractionOpen=function(e){var t=_.find(m.faxInteractions.rows,{id:e.FaxInteractionId});t&&t.Users&&(_.find(t.Users,{id:e.UserId})||t.Users.push({id:e.UserId}))},m.onFaxInteractionClose=function(e){var t=_.find(m.faxInteractions.rows,{id:e.FaxInteractionId});t&&t.Users&&_.remove(t.Users,{id:e.UserId})},m.localizationMap={Today:s.instant("DASHBOARDS.TODAY"),Yesterday:s.instant("DASHBOARDS.YESTERDAY"),"This Week":s.instant("DASHBOARDS.THIS_WEEK"),"Last Week":s.instant("DASHBOARDS.LAST_WEEK"),"This Month":s.instant("DASHBOARDS.THIS_MONTH"),"Last Month":s.instant("DASHBOARDS.LAST_MONTH"),"This Year":s.instant("DASHBOARDS.THIS_YEAR"),"Last Year":s.instant("DASHBOARDS.LAST_YEAR"),January:s.instant("DASHBOARDS.JANUARY"),February:s.instant("DASHBOARDS.FEBRUARY"),March:s.instant("DASHBOARDS.MARCH"),April:s.instant("DASHBOARDS.APRIL"),May:s.instant("DASHBOARDS.MAY"),June:s.instant("DASHBOARDS.JUNE"),July:s.instant("DASHBOARDS.JULY"),August:s.instant("DASHBOARDS.AUGUST"),September:s.instant("DASHBOARDS.SEPTEMBER"),October:s.instant("DASHBOARDS.OCTOBER"),November:s.instant("DASHBOARDS.NOVEMBER"),December:s.instant("DASHBOARDS.DECEMBER"),Mon:s.instant("DASHBOARDS.MON"),Tue:s.instant("DASHBOARDS.TUE"),Wed:s.instant("DASHBOARDS.WED"),Thu:s.instant("DASHBOARDS.THU"),Fri:s.instant("DASHBOARDS.FRI"),Sat:s.instant("DASHBOARDS.SAT"),Sun:s.instant("DASHBOARDS.SUN")},m.pickerModel={dateStart:null},m.onInit();var g=!0,v=1;n.$watch("vm.query.filter",function(e,t){g?a(function(){g=!1}):(t||(v=m.query.page),e!==t&&(m.query.page=1),e||(m.query.page=v),m.getFaxInteractions())}),n.$on("$destroy",function(){d.removeAllListeners("faxMessage:save"),d.removeAllListeners("faxMessage:update"),d.removeAllListeners("faxInteraction:save"),d.removeAllListeners("faxInteractionTags:save"),d.removeAllListeners("faxInteraction:update"),d.removeAllListeners("user_has_fax_interactions:save"),d.removeAllListeners("user_has_fax_interactions:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeFaxController",e)}(),function(){"use strict";function e(a,n,i,o,t,s,r,l,d,c){var m=this;function e(e){m.mailInteractions=e||{count:0,rows:[]};for(var t=0;t<m.mailInteractions.rows.length;t+=1)p(m.mailInteractions.rows[t])}function u(){m.query.dateStart=void 0,m.query.dateEnd=void 0,m.pickerModel.dateStart&&(m.query.dateStart=m.pickerModel.dateStart,m.query.dateEnd=m.pickerModel.dateEnd),0!=m.query.closed&&(m.query.substatus=null),m.query.offset=(m.query.page-1)*m.query.limit,t.localStorage.setItem("motion2.home.mail:"+m.user.id,JSON.stringify({query:m.query})),m.promise=r.mailInteraction.get(m.query,e).$promise}function p(e){e&&e.Messages?e.unread=_.filter(e.Messages||[],{direction:"in",read:!1}).length:e.unread=0}m.user=l.getCurrentUser(),m.tags={count:0,rows:[]},m.mailInteractions={count:0,rows:[]},m.query={includeAll:!0,sort:"-updatedAt",limit:10,page:1,read:null,closed:null,substatus:null,MailAccountId:null},m.success=e,m.getMailInteractions=u,m.showMailInteraction=function(e,t){a.$parent.vm.addInteractionTab("mail",t)},m.getContactLabel=function(e){if(e.Contact){var t="";return t+=(e.Contact.firstName||"")+""+(e.Contact.lastName||""),e.to&&e.Account&&e.to.indexOf(e.Account.email)<0?t=e.to:t+=" <"+(e.Contact.email||"unknown")+">",t}return s.instant("DASHBOARDS.UNKNOWN")},m.getUserLabel=function(e){if(e.UserId)return e.UserId===l.getCurrentUser().id?s.instant("DASHBOARDS.ME"):m.usersByKey[e.UserId].fullname+" <"+m.usersByKey[e.UserId].internal+">";return s.instant("DASHBOARDS.NOT_ASSIGNED")},m.getMailAccountLabel=function(e){if(e.Account)return e.Account.key;return s.instant("DASHBOARDS.UNKNOWN")},m.getColorByChannel=function(e){switch(e){case"chat":return"green-A700-bg";case"mail":return"teal-bg";case"sms":return"orange-bg";case"openchannel":return"amber-A200-bg";case"fax":return"blue-grey-A200-bg";default:return"white-bg"}},m.clearAll=function(){m.calendarModel={dateStart:null},m.pickerModel={dateStart:null},m.serviceModel={dateStart:null},m.getMailInteractions()},m.composeMailInteraction=function(e,t){i.show({controller:"ComposeMailInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/composeMail/dialog.html",parent:angular.element(o.body),clickOutsideToClose:!1,locals:{account:t,message:{},type:"new",interaction:{}},fullscreen:!0}).then(function(n){return r.mailAccount.send({id:t.id},n).$promise.then(function(e){if(e&&e.Messages&&e.Messages.length){if(n.attachments&&n.attachments.length)for(var t=0;t<n.attachments.length;t+=1)r.attachment.update({id:n.attachments[t].id},{MailMessageId:_.head(e.Messages).id});c.success({title:"Message properly sent!",msg:"Message has been sent!"}),e.closed?(e.disposition=null,i.show({controller:"DisposeInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/dispose/dialog.html",parent:angular.element(o.body),clickOutsideToClose:!0,locals:{channel:"mail",interaction:e}})):a.$parent.vm.addInteractionTab("mail",e)}}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"MAILACCOUNT:SEND",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})})},m.onInit=function(){return r.mailAccount.get({nolimit:!0}).$promise.then(function(e){return m.mailAccounts=e||{count:0,rows:[]},r.tag.get().$promise}).then(function(e){m.tags=e||{count:0,rows:[]}}).then(function(){return r.user.get({nolimit:!0,fields:"id,fullname,userpic,internal"}).$promise}).then(function(e){m.usersByKey=_.keyBy(e.rows,"id")}).then(function(){return r.mailSubstatus.get({nolimit:!0}).$promise}).then(function(e){m.subStatuses=e||{count:0,rows:[]}}).catch(function(e){console.error(e)}).finally(function(){var e=t.localStorage.getItem("motion2.home.mail:"+m.user.id);if(e)try{(e=JSON.parse(e)).query&&(m.query=_.merge(m.query,e.query),m.query=_.omit(m.query,"filter"),m.query.sort&&0<=m.query.sort.indexOf("lastMessage")&&(m.query=_.omit(m.query,"sort")),m.query.includeAll=!0)}catch(e){console.error(e)}d.on("mailInteraction:save",m.onMailInteractionSave),d.on("mailInteraction:update",m.onMailInteractionSave),d.on("mailInteractionTags:save",m.onMailInteractionTagsSave),d.on("mailMessage:save",m.onMailMessageSave),d.on("mailMessage:update",m.onMailMessageSave),d.on("user_has_mail_interactions:save",m.onMailInteractionOpen),d.on("user_has_mail_interactions:remove",m.onMailInteractionClose),m.getMailInteractions()})},m.onMailInteractionSave=function(e){if(e){var t=_.find(m.mailInteractions.rows,{id:e.id});t?_.merge(t,_.pick(e,_.keys(t))):u(),p(e)}},m.onMailInteractionTagsSave=function(e){if(e){var t=_.find(m.mailInteractions.rows,{id:e.id});t&&(t.Tags=e.tags||[],_.merge(t,_.pick(e,_.keys(t))))}},m.onMailMessageSave=function(e){if(e&&!e.secret){var t=_.find(m.mailInteractions.rows,{id:e.MailInteractionId});if(t){var n=_.find(t.Messages,{id:e.id});n?_.merge(n,_.pick(e,_.keys(n))):(_.isNil(t.Messages)&&(t.Messages=[]),t.Messages.push(e)),p(t)}}},m.onMailInteractionOpen=function(e){var t=_.find(m.mailInteractions.rows,{id:e.MailInteractionId});t&&t.Users&&(_.find(t.Users,{id:e.UserId})||t.Users.push({id:e.UserId}))},m.onMailInteractionClose=function(e){var t=_.find(m.mailInteractions.rows,{id:e.MailInteractionId});t&&t.Users&&_.remove(t.Users,{id:e.UserId})},m.localizationMap={Today:s.instant("DASHBOARDS.TODAY"),Yesterday:s.instant("DASHBOARDS.YESTERDAY"),"This Week":s.instant("DASHBOARDS.THIS_WEEK"),"Last Week":s.instant("DASHBOARDS.LAST_WEEK"),"This Month":s.instant("DASHBOARDS.THIS_MONTH"),"Last Month":s.instant("DASHBOARDS.LAST_MONTH"),"This Year":s.instant("DASHBOARDS.THIS_YEAR"),"Last Year":s.instant("DASHBOARDS.LAST_YEAR"),January:s.instant("DASHBOARDS.JANUARY"),February:s.instant("DASHBOARDS.FEBRUARY"),March:s.instant("DASHBOARDS.MARCH"),April:s.instant("DASHBOARDS.APRIL"),May:s.instant("DASHBOARDS.MAY"),June:s.instant("DASHBOARDS.JUNE"),July:s.instant("DASHBOARDS.JULY"),August:s.instant("DASHBOARDS.AUGUST"),September:s.instant("DASHBOARDS.SEPTEMBER"),October:s.instant("DASHBOARDS.OCTOBER"),November:s.instant("DASHBOARDS.NOVEMBER"),December:s.instant("DASHBOARDS.DECEMBER"),Mon:s.instant("DASHBOARDS.MON"),Tue:s.instant("DASHBOARDS.TUE"),Wed:s.instant("DASHBOARDS.WED"),Thu:s.instant("DASHBOARDS.THU"),Fri:s.instant("DASHBOARDS.FRI"),Sat:s.instant("DASHBOARDS.SAT"),Sun:s.instant("DASHBOARDS.SUN")},m.pickerModel={dateStart:null},m.onInit();var g=!0,v=1;a.$watch("vm.query.filter",function(e,t){g?n(function(){g=!1}):(t||(v=m.query.page),e!==t&&(m.query.page=1),e||(m.query.page=v),m.getMailInteractions())}),a.$on("$destroy",function(){d.removeAllListeners("mailMessage:save"),d.removeAllListeners("mailMessage:update"),d.removeAllListeners("mailInteraction:save"),d.removeAllListeners("mailInteractionTags:save"),d.removeAllListeners("mailInteraction:update"),d.removeAllListeners("user_has_mail_interactions:save"),d.removeAllListeners("user_has_mail_interactions:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeMailController",e)}(),function(){"use strict";function e(n,a,i,o,e,t,s){var r=this;r.currentUser=e.getCurrentUser(),r.lists={},r.contacts={count:0,rows:[]},r.query={id:r.currentUser.id,sort:"-updatedAt",limit:10,page:1},r.getContacts=function(){r.query.ListId=r.query.ListId||r.defaultLists,r.query.offset=(r.query.page-1)*r.query.limit,s.localStorage.setItem("motion2.home.mycontacts:"+r.currentUser.id,JSON.stringify({query:r.query})),r.promise=t.user.getContacts(r.query,c).$promise},r.refreshContacts=function(){r.getContacts()},r.mergeContact=function(e,t){o.show({controller:"MergeContactDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/merge/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,resolve:{contact:["apiResolver",function(e){return e.resolve("cmContact@get",{id:t.id})}],lists:["apiResolver",function(e){return e.resolve("user@getLists",{id:r.currentUser.id,fields:"id,name"})}]},locals:{contacts:r.contacts.rows}})},r.duplicateContact=function(e,t){o.show({controller:"DuplicateContactDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/duplicate/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,resolve:{contact:["apiResolver",function(e){return e.resolve("cmContact@get",{id:t.id})}],lists:["apiResolver",function(e){return e.resolve("user@getLists",{id:r.currentUser.id,fields:"id,name"})}]},locals:{contacts:r.contacts.rows}})},r.openContact=function(e,t){a.$parent.vm.addContactTab(t)},r.call=a.$parent.vm.call,r.onInit=function(){var e=s.localStorage.getItem("motion2.home.mycontacts:"+r.currentUser.id);if(e)try{(e=JSON.parse(e)).query&&(r.query=_.omit(e.query,"filter"))}catch(e){console.error(e)}r.getContacts()},t.cmList.get({fields:"id,name,dialPrefix",sort:"name",nolimit:!0}).$promise.then(function(e){r.lists=e||{count:0,rows:[]},r.listsMap=_.keyBy(r.lists.rows,"id"),r.defaultLists=r.lists.rows?_.map(r.lists.rows,"id").join(","):void 0}).catch(function(e){console.error(e)}).finally(function(){r.getContacts()});var l=!0,d=1;function c(e){r.contacts=e||{count:0,rows:[]}}a.$watch("vm.query.filter",function(e,t){l?i(function(){l=!1}):(t||(d=r.query.page),e!==t&&(r.query.page=1),e||(r.query.page=d),r.getContacts())})}e.$inject=["$document","$scope","$timeout","$mdDialog","Auth","api","$window"],angular.module("app.dashboards").controller("AgentHomeMyContactsController",e)}(),function(){"use strict";function e(n,a,e,t,i,o,s,r,l,d){var c=this;function m(e){c.openchannelInteractions=e||{count:0,rows:[]};for(var t=0;t<c.openchannelInteractions.rows.length;t+=1)p(c.openchannelInteractions.rows[t])}function u(){c.query.dateStart=void 0,c.query.dateEnd=void 0,c.pickerModel.dateStart&&(c.query.dateStart=c.pickerModel.dateStart,c.query.dateEnd=c.pickerModel.dateEnd),c.query.offset=(c.query.page-1)*c.query.limit,i.localStorage.setItem("motion2.home.openchannel:"+c.user.id,JSON.stringify({query:c.query})),c.promise=s.openchannelInteraction.get(c.query,m).$promise}function p(e){e&&e.Messages?e.unread=_.filter(e.Messages||[],{direction:"in",read:!1}).length:e.unread=0}c.user=r.getCurrentUser(),c.tags={count:0,rows:[]},c.openchannelInteractions={count:0,rows:[]},c.query={includeAll:!0,sort:"-updatedAt",limit:10,page:1,read:null,closed:null,substatus:null,OpenchannelAccountId:null},c.success=m,c.getOpenchannelInteractions=u,c.showOpenchannelInteraction=function(e,t){n.$parent.vm.addInteractionTab("openchannel",t)},c.getContactLabel=function(e){if(e.Contact){var t="";return t+=(e.Contact.firstName||"")+""+(e.Contact.lastName||""),e.from&&(t=e.from),t}return o.instant("DASHBOARDS.UNKNOWN")},c.getUserLabel=function(e){if(e.UserId)return e.UserId===r.getCurrentUser().id?o.instant("DASHBOARDS.ME"):c.usersByKey[e.UserId].fullname+" <"+c.usersByKey[e.UserId].internal+">";return o.instant("DASHBOARDS.NOT_ASSIGNED")},c.getOpenchannelAccountLabel=function(e){if(e.Account)return e.Account.key;return o.instant("DASHBOARDS.UNKNOWN")},c.getColorByChannel=function(e){switch(e){case"chat":return"green-A700-bg";case"mail":return"teal-bg";case"sms":return"orange-bg";case"openchannel":return"amber-A200-bg";case"fax":return"blue-grey-A200-bg";default:return"white-bg"}},c.clearAll=function(){c.calendarModel={dateStart:null},c.pickerModel={dateStart:null},c.serviceModel={dateStart:null},c.getOpenchannelInteractions()},c.onInit=function(){return s.openchannelAccount.get({nolimit:!0}).$promise.then(function(e){return c.openchannelAccounts=e||{count:0,rows:[]},s.tag.get().$promise}).then(function(e){c.tags=e||{count:0,rows:[]}}).then(function(){return s.user.get({nolimit:!0,fields:"id,fullname,userpic,internal"}).$promise}).then(function(e){c.usersByKey=_.keyBy(e.rows,"id")}).catch(function(e){console.error(e)}).finally(function(){var e=i.localStorage.getItem("motion2.home.openchannel:"+c.user.id);if(e)try{(e=JSON.parse(e)).query&&(c.query=_.merge(c.query,e.query),c.query=_.omit(c.query,"filter"),c.query.sort&&0<=c.query.sort.indexOf("lastMessage")&&(c.query=_.omit(c.query,"sort")),c.query.includeAll=!0)}catch(e){console.error(e)}l.on("openchannelInteraction:save",c.onOpenchannelInteractionSave),l.on("openchannelInteraction:update",c.onOpenchannelInteractionSave),l.on("openchannelInteractionTags:save",c.onOpenchannelInteractionTagsSave),l.on("openchannelMessage:save",c.onOpenchannelMessageSave),l.on("openchannelMessage:update",c.onOpenchannelMessageSave),l.on("user_has_openchannel_interactions:save",c.onOpenchannelInteractionOpen),l.on("user_has_openchannel_interactions:remove",c.onOpenchannelInteractionClose),c.getOpenchannelInteractions()})},c.onOpenchannelInteractionSave=function(e){if(e){var t=_.find(c.openchannelInteractions.rows,{id:e.id});t?_.merge(t,_.pick(e,_.keys(t))):u(),p(e)}},c.onOpenchannelInteractionTagsSave=function(e){if(e){var t=_.find(c.openchannelInteractions.rows,{id:e.id});t&&(t.Tags=e.tags||[],_.merge(t,_.pick(e,_.keys(t))))}},c.onOpenchannelMessageSave=function(e){if(e&&!e.secret){var t=_.find(c.openchannelInteractions.rows,{id:e.OpenchannelInteractionId});if(t){var n=_.find(t.Messages,{id:e.id});n?_.merge(n,_.pick(e,_.keys(n))):(_.isNil(t.Messages)&&(t.Messages=[]),t.Messages.push(e)),p(t)}}},c.onOpenchannelInteractionOpen=function(e){var t=_.find(c.openchannelInteractions.rows,{id:e.OpenchannelInteractionId});t&&t.Users&&(_.find(t.Users,{id:e.UserId})||t.Users.push({id:e.UserId}))},c.onOpenchannelInteractionClose=function(e){var t=_.find(c.openchannelInteractions.rows,{id:e.OpenchannelInteractionId});t&&t.Users&&_.remove(t.Users,{id:e.UserId})},c.localizationMap={Today:o.instant("DASHBOARDS.TODAY"),Yesterday:o.instant("DASHBOARDS.YESTERDAY"),"This Week":o.instant("DASHBOARDS.THIS_WEEK"),"Last Week":o.instant("DASHBOARDS.LAST_WEEK"),"This Month":o.instant("DASHBOARDS.THIS_MONTH"),"Last Month":o.instant("DASHBOARDS.LAST_MONTH"),"This Year":o.instant("DASHBOARDS.THIS_YEAR"),"Last Year":o.instant("DASHBOARDS.LAST_YEAR"),January:o.instant("DASHBOARDS.JANUARY"),February:o.instant("DASHBOARDS.FEBRUARY"),March:o.instant("DASHBOARDS.MARCH"),April:o.instant("DASHBOARDS.APRIL"),May:o.instant("DASHBOARDS.MAY"),June:o.instant("DASHBOARDS.JUNE"),July:o.instant("DASHBOARDS.JULY"),August:o.instant("DASHBOARDS.AUGUST"),September:o.instant("DASHBOARDS.SEPTEMBER"),October:o.instant("DASHBOARDS.OCTOBER"),November:o.instant("DASHBOARDS.NOVEMBER"),December:o.instant("DASHBOARDS.DECEMBER"),Mon:o.instant("DASHBOARDS.MON"),Tue:o.instant("DASHBOARDS.TUE"),Wed:o.instant("DASHBOARDS.WED"),Thu:o.instant("DASHBOARDS.THU"),Fri:o.instant("DASHBOARDS.FRI"),Sat:o.instant("DASHBOARDS.SAT"),Sun:o.instant("DASHBOARDS.SUN")},c.pickerModel={dateStart:null},c.onInit();var g=!0,v=1;n.$watch("vm.query.filter",function(e,t){g?a(function(){g=!1}):(t||(v=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=v),c.getOpenchannelInteractions())}),n.$on("$destroy",function(){l.removeAllListeners("openchannelMessage:save"),l.removeAllListeners("openchannelMessage:update"),l.removeAllListeners("openchannelInteraction:save"),l.removeAllListeners("openchannelInteractionTags:save"),l.removeAllListeners("openchannelInteraction:update"),l.removeAllListeners("user_has_openchannel_interactions:save"),l.removeAllListeners("user_has_openchannel_interactions:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeOpenchannelController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u){var p=this;function g(e){p.voiceRecordings=e||{count:0,rows:[]}}p.currentUser=c.getCurrentUser(),p.voiceRecordings={},p.localizationMap=u,p.pickerModel={dateStart:null},p.table="voiceRecordings",p.query={UserId:p.currentUser.id,fields:"createdAt,updatedAt,id,format,value,type,uniqueid,calleridnum,exten,connectedlinenum,queue,rating,audio,UserId",sort:"-updatedAt",limit:10,page:1,type:null},p.downloadfile=function(i,e){return r.voiceRecording.download({id:i.id,exists:!0}).$promise.then(function(e){var t=[e.buffer],n=new Blob(t,{type:e.type}),a=window.document.createElement("a");a.setAttribute("href",URL.createObjectURL(n)),a.setAttribute("download",i.uniqueid+i.format),a.click()}).catch(function(e){d.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceRecording",msg:e.data?JSON.stringify(e.data):e.toString()})})},p.success=g,p.getVoiceRecordings=function(){p.query.dateStart=void 0,p.query.dateEnd=void 0,p.pickerModel.dateStart&&(p.query.dateStart=p.pickerModel.dateStart,p.query.dateEnd=p.pickerModel.dateEnd);p.query.offset=(p.query.page-1)*p.query.limit,t.localStorage.setItem("motion2.home.recordings:"+p.currentUser.id,JSON.stringify({query:p.query})),p.promise=r.voiceRecording.get(p.query,g).$promise},p.onInit=function(){var e=t.localStorage.getItem("motion2.home.recordings:"+p.currentUser.id);if(e)try{(e=JSON.parse(e)).query&&(p.query=_.omit(e.query,["filter","id"]),p.query.fields="createdAt,updatedAt,id,format,value,type,uniqueid,calleridnum,exten,connectedlinenum,queue,rating,audio,UserId",p.query.UserId=p.currentUser.id)}catch(e){console.error(e)}p.getVoiceRecordings()},p.clearAll=function(){p.pickerModel={dateStart:null},p.getVoiceRecordings()};var v=!0,h=1;e.$watch("vm.query.filter",function(e,t){v?s(function(){v=!1}):(t||(h=p.query.page),e!==t&&(p.query.page=1),e||(p.query.page=h),p.getVoiceRecordings())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","api","msUtils","toasty","Auth","$translate","dateFilterLocalizationFactory"],angular.module("app.dashboards").controller("AgentHomeRecordingsController",e)}(),function(){"use strict";function e(n,a,i,o,t,s,r,l,d,c){var m=this;function e(e){m.smsInteractions=e||{count:0,rows:[]};for(var t=0;t<m.smsInteractions.rows.length;t+=1)p(m.smsInteractions.rows[t])}function u(){m.query.dateStart=void 0,m.query.dateEnd=void 0,m.pickerModel.dateStart&&(m.query.dateStart=m.pickerModel.dateStart,m.query.dateEnd=m.pickerModel.dateEnd),m.query.offset=(m.query.page-1)*m.query.limit,t.localStorage.setItem("motion2.home.sms:"+m.user.id,JSON.stringify({query:m.query})),m.promise=r.smsInteraction.get(m.query,e).$promise}function p(e){e&&e.Messages?e.unread=_.filter(e.Messages||[],{direction:"in",read:!1}).length:e.unread=0}m.user=l.getCurrentUser(),m.tags={count:0,rows:[]},m.smsInteractions={count:0,rows:[]},m.query={includeAll:!0,sort:"-updatedAt",limit:10,page:1,read:null,closed:null,substatus:null,SmsAccountId:null},m.success=e,m.getSmsInteractions=u,m.showSmsInteraction=function(e,t){n.$parent.vm.addInteractionTab("sms",t)},m.getContactLabel=function(e){if(e.Contact){var t="";return t+=(e.Contact.firstName||"")+""+(e.Contact.lastName||""),t+=" <"+(e.Contact.mobile||"unknown")+">"}return s.instant("DASHBOARDS.UNKNOWN")},m.getUserLabel=function(e){if(e.UserId)return e.UserId===l.getCurrentUser().id?s.instant("DASHBOARDS.ME"):m.usersByKey[e.UserId].fullname+" <"+m.usersByKey[e.UserId].internal+">";return s.instant("DASHBOARDS.NOT_ASSIGNED")},m.getSmsAccountLabel=function(e){if(e.Account)return e.Account.key;return s.instant("DASHBOARDS.UNKNOWN")},m.getColorByChannel=function(e){switch(e){case"chat":return"green-A700-bg";case"mail":return"teal-bg";case"sms":return"orange-bg";case"openchannel":return"amber-A200-bg";case"fax":return"blue-grey-A200-bg";default:return"white-bg"}},m.clearAll=function(){m.calendarModel={dateStart:null},m.pickerModel={dateStart:null},m.serviceModel={dateStart:null},m.getSmsInteractions()},m.composeSmsInteraction=function(e,t){i.show({controller:"ComposeSmsInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/composeSms/dialog.html",parent:angular.element(o.body),clickOutsideToClose:!1,locals:{account:t,message:{},type:"new",interaction:{}},fullscreen:!0}).then(function(e){return r.smsAccount.send({id:t.id},e).$promise.then(function(e){c.success({title:"Message properly sent!",msg:"Message has been sent!"}),n.$parent.vm.addInteractionTab("sms",e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SMSACCOUNT:SEND",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})})},m.onInit=function(){return r.smsAccount.get({nolimit:!0}).$promise.then(function(e){return m.smsAccounts=e||{count:0,rows:[]},r.tag.get().$promise}).then(function(e){m.tags=e||{count:0,rows:[]}}).then(function(){return r.user.get({nolimit:!0,fields:"id,fullname,userpic,internal"}).$promise}).then(function(e){m.usersByKey=_.keyBy(e.rows,"id")}).catch(function(e){console.error(e)}).finally(function(){var e=t.localStorage.getItem("motion2.home.sms:"+m.user.id);if(e)try{(e=JSON.parse(e)).query&&(m.query=_.merge(m.query,e.query),m.query=_.omit(m.query,"filter"),m.query.sort&&0<=m.query.sort.indexOf("lastMessage")&&(m.query=_.omit(m.query,"sort")),m.query.includeAll=!0)}catch(e){console.error(e)}d.on("smsInteraction:save",m.onSmsInteractionSave),d.on("smsInteraction:update",m.onSmsInteractionSave),d.on("smsInteractionTags:save",m.onSmsInteractionTagsSave),d.on("smsMessage:save",m.onSmsMessageSave),d.on("smsMessage:update",m.onSmsMessageSave),d.on("user_has_sms_interactions:save",m.onSmsInteractionOpen),d.on("user_has_sms_interactions:remove",m.onSmsInteractionClose),m.getSmsInteractions()})},m.onSmsInteractionSave=function(e){if(e){var t=_.find(m.smsInteractions.rows,{id:e.id});t?_.merge(t,_.pick(e,_.keys(t))):u(),p(e)}},m.onSmsInteractionTagsSave=function(e){if(e){var t=_.find(m.smsInteractions.rows,{id:e.id});t&&(t.Tags=e.tags||[],_.merge(t,_.pick(e,_.keys(t))))}},m.onSmsMessageSave=function(e){if(e&&!e.secret){var t=_.find(m.smsInteractions.rows,{id:e.SmsInteractionId});if(t){var n=_.find(t.Messages,{id:e.id});n?_.merge(n,_.pick(e,_.keys(n))):(_.isNil(t.Messages)&&(t.Messages=[]),t.Messages.push(e)),p(t)}}},m.onSmsInteractionOpen=function(e){var t=_.find(m.smsInteractions.rows,{id:e.SmsInteractionId});t&&t.Users&&(_.find(t.Users,{id:e.UserId})||t.Users.push({id:e.UserId}))},m.onSmsInteractionClose=function(e){var t=_.find(m.smsInteractions.rows,{id:e.SmsInteractionId});t&&t.Users&&_.remove(t.Users,{id:e.UserId})},m.localizationMap={Today:s.instant("DASHBOARDS.TODAY"),Yesterday:s.instant("DASHBOARDS.YESTERDAY"),"This Week":s.instant("DASHBOARDS.THIS_WEEK"),"Last Week":s.instant("DASHBOARDS.LAST_WEEK"),"This Month":s.instant("DASHBOARDS.THIS_MONTH"),"Last Month":s.instant("DASHBOARDS.LAST_MONTH"),"This Year":s.instant("DASHBOARDS.THIS_YEAR"),"Last Year":s.instant("DASHBOARDS.LAST_YEAR"),January:s.instant("DASHBOARDS.JANUARY"),February:s.instant("DASHBOARDS.FEBRUARY"),March:s.instant("DASHBOARDS.MARCH"),April:s.instant("DASHBOARDS.APRIL"),May:s.instant("DASHBOARDS.MAY"),June:s.instant("DASHBOARDS.JUNE"),July:s.instant("DASHBOARDS.JULY"),August:s.instant("DASHBOARDS.AUGUST"),September:s.instant("DASHBOARDS.SEPTEMBER"),October:s.instant("DASHBOARDS.OCTOBER"),November:s.instant("DASHBOARDS.NOVEMBER"),December:s.instant("DASHBOARDS.DECEMBER"),Mon:s.instant("DASHBOARDS.MON"),Tue:s.instant("DASHBOARDS.TUE"),Wed:s.instant("DASHBOARDS.WED"),Thu:s.instant("DASHBOARDS.THU"),Fri:s.instant("DASHBOARDS.FRI"),Sat:s.instant("DASHBOARDS.SAT"),Sun:s.instant("DASHBOARDS.SUN")},m.pickerModel={dateStart:null},m.onInit();var g=!0,v=1;n.$watch("vm.query.filter",function(e,t){g?a(function(){g=!1}):(t||(v=m.query.page),e!==t&&(m.query.page=1),e||(m.query.page=v),m.getSmsInteractions())}),n.$on("$destroy",function(){d.removeAllListeners("smsMessage:save"),d.removeAllListeners("smsMessage:update"),d.removeAllListeners("smsInteraction:save"),d.removeAllListeners("smsInteractionTags:save"),d.removeAllListeners("smsInteraction:update"),d.removeAllListeners("user_has_sms_interactions:save"),d.removeAllListeners("user_has_sms_interactions:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeSmsController",e)}(),function(){"use strict";function e(t,n,e,a,i,o,s,r,l,d){var c=this;function m(e){c.voiceCalls=e||{count:0,rows:[]}}c.currentUser=i.getCurrentUser(),c.voiceCalls={},c.localizationMap=d,c.pickerModel={dateStart:null},c.table="voiceCalls",c.query={UserId:c.currentUser.id,fields:"id,type,uniqueid,tag,starttime,endtime,source,destination,userDisposition,note,duration,billableseconds,answertime",sort:"-updatedAt",limit:10,page:1,type:null},c.success=m,c.getVoiceCalls=function(){c.query.dateStart=void 0,c.query.dateEnd=void 0,c.pickerModel.dateStart&&(c.query.dateStart=c.pickerModel.dateStart,c.query.dateEnd=c.pickerModel.dateEnd);c.query.offset=(c.query.page-1)*c.query.limit,s.localStorage.setItem("motion2.home.voice:"+c.currentUser.id,JSON.stringify({query:c.query})),c.promise=e.voiceCallReport.get(c.query,m).$promise},c.onInit=function(){return e.tag.get().$promise.then(function(e){c.tags=e||{count:0,rows:[]}}).catch(function(e){a.error({title:"Init error",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()}),c.tags={count:0,rows:[]}}).finally(function(){var e=s.localStorage.getItem("motion2.home.voice:"+c.currentUser.id);if(e)try{(e=JSON.parse(e)).query&&(c.query=_.omit(e.query,"filter"))}catch(e){console.error(e)}c.getVoiceCalls()})},c.showDetails=function(e){t.show({controller:"AgentHomeVoiceDetailsController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/home/voice/details/dialog.html",parent:angular.element(n.body),clickOutsideToClose:!0,locals:{call:e}})},c.clearAll=function(){c.pickerModel={dateStart:null},c.getVoiceCalls()};var u=!0,p=1;r.$watch("vm.query.filter",function(e,t){u?l(function(){u=!1}):(t||(p=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=p),c.getVoiceCalls())})}e.$inject=["$mdDialog","$document","api","toasty","Auth","$translate","$window","$scope","$timeout","dateFilterLocalizationFactory"],angular.module("app.dashboards").controller("AgentHomeVoiceController",e)}(),function(){"use strict";function e(e,t){this.call=t,this.closeDialog=function(){e.hide()}}e.$inject=["$mdDialog","call"],angular.module("app.dashboards").controller("AgentHomeVoiceDetailsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p){var g=this;function v(){i.show({controller:"DisposeInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/dispose/dialog.html",parent:angular.element(n.body),clickOutsideToClose:!0,locals:{channel:g.tab.channel,interaction:g.tab.interaction}}).then(function(e){g.tab.saved=!!e,e&&a.$parent.$parent.$parent.vm.closeTab(g.tab)})}function h(e,t){i.show({controller:"ComposeMailInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/composeMail/dialog.html",parent:angular.element(n.body),clickOutsideToClose:!1,locals:{account:g.account,message:t,type:e,interaction:g.interaction},fullscreen:!0,skipHide:!!g.tab.spy}).then(function(t){t&&f(t),t.Interaction&&g.interaction&&g.interaction.id&&(t.Interaction.id=g.interaction.id,d.mailInteraction.update(t.Interaction).$promise.then(function(e){e&&e.closed?(g.tab.saved=!0,g.interaction.closed=!0,g.interaction.closedAt=e.closedAt,v()):null!==t.Interaction.substatus&&(g.tab.saved=!0,g.tab.interaction.substatus=t.Interaction.substatus,a.$parent.$parent.$parent.vm.closeTab(g.tab))}).catch(function(e){console.error(e)}))})}function b(){"mail"!==g.tab.channel&&t(function(){var e=angular.element(n.find("md-content[name*='interaction-content-"+g.tab.id+"']"));e&&e[0]&&(e[0].scrollTop=e[0].scrollHeight)},0)}function f(n){if(n)return n["chat"===g.tab.channel?"ChatWebsiteId":_.capitalize(g.tab.channel)+"AccountId"]=g.interaction["chat"===g.tab.channel?"ChatWebsiteId":_.capitalize(g.tab.channel)+"AccountId"],n[_.capitalize(g.tab.channel)+"InteractionId"]=g.interaction.id,n.UserId=g.user.id,n.ContactId=g.interaction.ContactId,n.direction="out",n.secret=!(!g.tab.spy&&!n.secret),d[g.tab.channel+"Message"].save(n).$promise.then(function(e){if(e&&e.id&&n.attachments&&n.attachments.length)for(var t=0;t<n.attachments.length;t+=1)d.attachment.update({id:n.attachments[t].id},{MailMessageId:e.id})}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:SENDMESSAGE",msg:e.data?JSON.stringify(e.data):e.toString()})}).finally(function(){g.setText(),b()})}function A(e){switch(e){case"chat":return"green-A700";case"mail":return"teal";case"sms":return"orange";case"openchannel":return"amber-A200";case"fax":return"blue-grey-A200";default:return"blue-A700"}}function E(e){e&&e.count&&e.rows.length&&(g.journey=_.concat(g.journey,e.rows))}g.showFooter=!1,g.showInteraction=!1,g.user=m.getCurrentUser(),g.detectBrowser=p.detectBrowser(),g.journey=[],g.acceptedMessages=[],g.omniChannels=["mail","chat","sms","openchannel","fax"],g.ngFlowOptions={maxChunkRetries:1,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,singleFile:!0,target:"api/attachments",allowDuplicateUploads:!0},g.ngFlow={flow:{}},g.selectedMailShowDetails={},g.selectedMailShowSystemMessage={},g.init=function(e){g.tab=e,g.tab.saved=!0,g.tab.badges=0,g.tab&&g.tab.channel&&g.tab.interaction&&(g.interaction=g.tab.interaction,d[g.tab.channel+"Interaction"].get({id:g.tab.interaction.id,includeAll:!0}).$promise.then(function(e){return e&&(g.interaction=e,g.tab.interaction=e),g.tab.saved=g.interaction.closed,g.queryMessage={id:g.interaction.id,includeAll:!0},"mail"===g.tab.channel?(g.queryMessage.sort="-id",g.queryMessage.offset=0,g.queryMessage.limit=3):(g.queryMessage.sort="id",g.queryMessage.nolimit=!0),d[g.tab.channel+"Interaction"].getMessages(g.queryMessage).$promise}).then(function(e){return g.messages=e||{count:0,rows:[]},d["chat"===g.tab.channel?"chatWebsite":g.tab.channel+"Account"].get({id:g.interaction["chat"===g.tab.channel?"ChatWebsiteId":_.capitalize(g.tab.channel)+"AccountId"]}).$promise}).then(function(e){return g.account=e,g.tab.title=g.account.key||g.account.name,d.cmContact.get({id:g.interaction.ContactId}).$promise}).then(function(e){return g.contact=e,g.contact&&(!function(e){if(e&&e.id){for(var t=0;t<g.omniChannels.length;t++)d[g.omniChannels[t]+"Interaction"].get({ContactId:e.id,includeAll:!0}).$promise.then(E);d.voiceCallReport.get({ContactId:e.id,includeAll:!0}).$promise.then(E)}}(g.contact),g.tab.title+=" - "+g.contact.firstName),d.user.get({fields:"id,fullname",nolimit:!0}).$promise}).then(function(e){g.users=e||{count:0,rows:[]},g.usersMap=_.mapValues(_.keyBy(g.users.rows,"id"),"fullname")}).then(function(){if(g.tab.channel&&g.interaction)return d.user["add"+_.upperFirst(g.tab.channel)+"Interactions"]({id:g.user.id,ids:[g.interaction.id]})}).then(function(){return d.mailSubstatus.get({nolimit:!0}).$promise}).then(function(e){g.subStatuses=e||{count:0,rows:[]}}).catch(function(e){console.error(e)}).finally(function(){!function(){if(!g.tab.spy)for(var e=0;e<g.messages.rows.length;e+=1)"in"!==g.messages.rows[e].direction||g.messages.rows[e].read||(d[g.tab.channel+"Message"].accept({id:g.messages.rows[e].id,UserId:g.user.id}),g.acceptedMessages.push(g.messages.rows[e].id))}(),b(),u.on(g.tab.channel+"Message:save",g.onMessageSave),u.on(g.tab.channel+"Message:update",g.onMessageSave),u.on(g.tab.channel+"Interaction:save",g.onInteractionSave),u.on(g.tab.channel+"Interaction:update",g.onInteractionSave),u.on("user_has_"+g.tab.channel+"_interactions:save",g.onInteractionOpen),u.on("user_has_"+g.tab.channel+"_interactions:remove",g.onInteractionClose),g.showFooter=!0,g.showInteraction=!0}))},g.getLabelByMessage=function(e){var t="loading...";if(e)return"in"===e.direction?e.Contact?e.Contact.firstName||"Anonymous":t:e.UserId?g.usersMap?g.usersMap[e.UserId]:t:"System"},g.openContact=function(e,t){try{a.$parent.$parent.$parent.vm.addContactTab(t||g.contact)}catch(e){c.error({title:"ERROR OPEN CONTACT",msg:"Jscripty can't open the contact"})}},g.openInteraction=function(e,t){try{if(t.MailAccountId)return a.$parent.$parent.$parent.vm.addInteractionTab("mail",t);if(t.ChatWebsiteId)return a.$parent.$parent.$parent.vm.addInteractionTab("chat",t);if(t.SmsAccountId)return a.$parent.$parent.$parent.vm.addInteractionTab("sms",t);if(t.OpenchannelAccountId)return a.$parent.$parent.$parent.vm.addInteractionTab("openchannel",t);if(t.FaxAccountId)return a.$parent.$parent.$parent.vm.addInteractionTab("fax",t)}catch(e){c.error({title:"ERROR OPEN INTERACTION",msg:"Customer Journey can't open the interaction"})}},g.disposeInteraction=v,g.tagInteraction=function(){i.show({controller:"TagInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/tag/dialog.html",parent:angular.element(n.body),clickOutsideToClose:!0,skipHide:!!g.tab.spy,resolve:{tags:["apiResolver",function(e){return e.resolve("tag@get",{nolimit:!0,fields:"id,name,color"})}]},locals:{channel:g.tab.channel,interaction:g.tab.interaction}})},g.composeMailInteraction=function(t,e){if(e.inReplyTo){var n=_.find(g.messages.rows,{messageId:e.inReplyTo});if(!n)return d.mailMessage.get({messageId:e.inReplyTo}).$promise.then(function(e){h(t,e&&e.count?e.rows[0]:void 0)}).catch(function(e){console.error(e),h(t,void 0)});h(t,n)}else h(t,e)},g.composeFaxInteraction=function(e){var t={to:[]};t.to.push(g.contact.fax),i.show({controller:"ComposeFaxInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/composeFax/dialog.html",parent:angular.element(n.body),clickOutsideToClose:!1,locals:{account:g.account,message:t,type:e},fullscreen:!0}).then(function(e){return d.faxAccount.send({id:g.account.id},e).$promise.then(function(e){c.success({title:"Message properly sent!",msg:"Message has been sent!"}),a.$parent.vm.addInteractionTab("fax",e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else c.error({title:"FAX:SEND",msg:e.data?JSON.stringify(e.data):e.message||e.toString()})})})},g.composeSmsInteraction=function(e,t){i.show({controller:"ComposeSmsInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/composeSms/dialog.html",parent:angular.element(n.body),clickOutsideToClose:!1,locals:{account:g.account,message:t,type:e},fullscreen:!0,skipHide:!!g.tab.spy}).then(function(e){e&&f(e)})},g.reply=function(e,t){if(e&&13===e.keyCode&&e.shiftKey)return;if(e&&13!==e.keyCode)return;if(""===t)return;f(function(e){var t={},n="chat"===g.tab.channel?"ChatWebsiteId":_.capitalize(g.tab.channel)+"AccountId";t[n]=g.interaction[n].toString(),t[_.capitalize(g.tab.channel)+"InteractionId"]=g.interaction.id,"sms"===g.tab.channel&&(t.phone=g.interaction.phone);e&&(t.UserId=g.user.id,t.ContactId=g.interaction.ContactId,t.body=e,t.createdAt=Date.now());return t}(t))},g.upload=function(){g.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+e.get("motion.token")},g.ngFlow.flow.upload()},g.setTextWrapper=function(e){g.setText=e},g.getTextWrapper=function(e){g.getText=e},g.fileAdded=function(e){{if("fax"===g.tab.channel){var t=["pdf","tif"];return!!_.includes(t,e.getExtension())||(c.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported only: "+t.join()}),!1)}return!0}},g.fileSuccess=function(e,t){var n=JSON.parse(t),a=n.name;"chat"===g.tab.channel&&(a='<a href="'+(g.account.remote?g.account.remote:l.protocol()+"://"+l.host())+"/api/chat/interactions/"+g.interaction.id+"/attachment_download?attachId="+n.id+"&token="+g.account.token+'" target="_self">'+n.name+"</a>");f({body:a,AttachmentId:n.id})},g.onMessageSave=function(e){if(e&&g.interaction.id!=e[_.capitalize(g.tab.channel)+"InteractionId"])return;var t=!1;g.messages?t=_.find(g.messages.rows,{id:e.id}):g.messages={rows:[],count:0};t?_.merge(t,e):("mail"===g.tab.channel?g.messages.rows.unshift(e):g.messages.rows.push(e),b())},g.onInteractionSave=function(e){if(e&&g.interaction.id!==e.id)return;_.merge(g.interaction,e)},g.searchTextChange=function(t){var n=o.defer(),a=[],e={},i="chat"===g.tab.channel?"ChatWebsiteId":_.capitalize(g.tab.channel)+"AccountId";return e.filter=t,e[i]=g.account.id,d.cannedAnswer.get(e).$promise.then(function(e){return a=_.concat(a,e.rows),d.cannedAnswer.get({filter:t}).$promise}).then(function(e){a=_.concat(a,_.filter(e.rows,function(e){return!(e.MailAccountId||e.FaxAccountId||e.SmsAccountId||e.OpenchannelAccountId||e.ChatWebsiteId)})),n.resolve(a)}).catch(function(e){n.reject(e)}),n.promise},g.selectedItemChange=function(t){if(t){var n=g.getText();try{_.templateSettings.interpolate=/{{([\s\S]+?)}}/g;var e=_.template(t.value),a={user:g.user,account:g.account,interaction:g.interaction,contact:g.interaction&&g.interaction.Contact?g.interaction.Contact:{}};g.setText(n+" "+e(a))}catch(e){g.setText(n+" "+t.value)}g.selectedItem=null,g.changeDisplayCannedAnswerInputValue()}},g.getIconByChannel=function(e){switch(e){case"chat":return"icon-hangouts";case"mail":return"icon-email";case"sms":return"icon-message-text";case"openchannel":return"icon-google-earth";case"fax":return"icon-deskphone";default:return"icon-hangouts"}},g.getColorByChannel=A,g.getColorByItem=function(e){var t="";e.FaxAccountId?t="fax":e.OpenchannelAccountId?t="openchannel":e.SmsAccountId?t="sms":e.MailAccountId?t="mail":e.ChatWebsiteId?t="chat":e.amaflags&&(t="voice");return A(t)},g.displayCannedAnswerInput=!1,g.changeDisplayCannedAnswerInputValue=function(){g.displayCannedAnswerInput=!g.displayCannedAnswerInput},g.setAs=function(e){g.tab.channel&&g.interaction&&g.interaction.id&&d[g.tab.channel+"Interaction"].update({id:g.interaction.id,substatus:e,substatusAt:Date.now()}).$promise.catch(function(e){console.error(e)})},g.markAsUnread=function(){if(g.tab.channel&&g.interaction&&g.interaction.id)if(g.acceptedMessages.length)for(var e=0;e<g.acceptedMessages.length;e+=1)d[g.tab.channel+"Message"].update({id:g.acceptedMessages[e],read:!1,UserId:null});else for(var t=0;t<g.messages.rows.length;t+=1)if("in"===g.messages.rows[t].direction){g.messages.rows[t].UserId===g.user.id?d[g.tab.channel+"Message"].update({id:g.messages.rows[t].id,read:!1,UserId:null}):c.error({title:"You can't mark as unread",msg:"You are not the owner of the last message!"});break}g.tab.saved=!0,a.$parent.$parent.$parent.vm.closeTab(g.tab)},g.getAttachments=function(t){return d.attachment.get({MailMessageId:t.id}).$promise.then(function(e){e&&e.rows&&(t.attachments=e.rows)}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"ATTACHMENTS:GET",msg:e.data?JSON.stringify(e.data):e.toString()})})},g.getAttachment=function(i){return d.attachment.download({id:i.id}).$promise.then(function(e){if(e){var t=new Blob([e.buffer],{type:e.type}),n=document.createElement("a"),a=window.URL.createObjectURL(t);n.href=a,n.target="_self",n.download=i.name,document.body.appendChild(n),n.click(),setTimeout(function(){document.body.removeChild(n),window.URL.revokeObjectURL(a)},100)}}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"ATTACHMENTS:GET",msg:e.data?JSON.stringify(e.data):e.toString()})})},g.htmlToPlaintext=function(e){return e?String(e).replace(/<[^>]+>/gm,""):""},g.onInteractionOpen=function(e){var t;g.interaction.id==e[_.upperFirst(g.tab.channel)+"InteractionId"]&&(g.interaction.Users&&(t=_.find(g.interaction.Users,{id:e.UserId})),t||g.interaction.Users.push({id:e.UserId}))},g.onInteractionClose=function(e){g.interaction.id==e[_.upperFirst(g.tab.channel)+"InteractionId"]&&g.interaction.Users&&_.remove(g.interaction.Users,{id:e.UserId})},g.loadNextPage=function(){var n=o.defer();return g.queryMessage?(g.queryMessage.offset=g.messages.rows.length,d[g.tab.channel+"Interaction"].getMessages(g.queryMessage).$promise.then(function(e){for(var t=0;t<e.rows.length;t+=1)g.messages.rows.push(e.rows[t]),"in"!==e.rows[t].direction||e.rows[t].read||(d[g.tab.channel+"Message"].accept({id:e.rows[t].id,UserId:g.user.id}),g.acceptedMessages.push(e.rows[t].id));return n.resolve(e)}).catch(function(e){return n.reject(e)})):n.reject()},g.timelineOptions={scrollEl:"#interaction-content"},a.$on("$destroy",function(){u.removeAllListeners(g.tab.channel+"Message:save"),u.removeAllListeners(g.tab.channel+"Message:update"),u.removeAllListeners(g.tab.channel+"Interaction:save"),u.removeAllListeners(g.tab.channel+"Interaction:update"),u.removeAllListeners("user_has_"+g.tab.channel+"_interactions:save"),u.removeAllListeners("user_has_"+g.tab.channel+"_interactions:remove")})}function t(a){return{scope:{ngBindHtmlUnsafe:"="},template:"<div ng-bind-html='trustedHtml'></div>",link:function(n){n.updateView=function(){var e,t=_.replace(n.ngBindHtmlUnsafe,'<div id="xm-mail-content"','<a style="cursor:pointer" class="toggle-details md-accent-color" onclick="document.getElementById(\''+(e="xm-mail-content-"+Math.floor(9999*Math.random()+1))+"').style.display='block'; this.parentNode.removeChild(this)\">See More</a><div id=\""+e+'" style="display:none"');n.trustedHtml=a.trustAsHtml(t)},n.$watch("ngBindHtmlUnsafe",function(e,t){n.updateView(e)})}}}e.$inject=["$cookies","$timeout","$document","$scope","$mdDialog","$q","$sce","$window","$location","api","toasty","Auth","socket","msUtils"],t.$inject=["$sce"],angular.module("app.dashboards").directive("ngBindHtmlUnsafe",t).controller("AgentGeneralInteractionController",e)}(),function(){"use strict";angular.module("app.dashboards").factory("Emojis",function(){return{watchEmbedData:!1,sanitizeHtml:!1,fontSmiley:!1,emoji:!0,link:!0,linkTarget:"_blank",pdf:{embed:!0},image:{embed:!0},audio:{embed:!0},basicVideo:!1,gdevAuth:"xxxxxxxx",video:{embed:!1,width:null,height:null,ytTheme:"dark",details:!1,thumbnailQuality:"medium",autoPlay:!0},twitchtvEmbed:!0,dailymotionEmbed:!0,tedEmbed:!0,dotsubEmbed:!0,liveleakEmbed:!0,ustreamEmbed:!0,soundCloudEmbed:!0,soundCloudOptions:{height:160,themeColor:"f50000",autoPlay:!1,hideRelated:!1,showComments:!0,showUser:!0,showReposts:!1,visual:!1,download:!1},spotifyEmbed:!0,tweetEmbed:!0,tweetOptions:{maxWidth:550,hideMedia:!1,hideThread:!1,align:"none",lang:"en"},code:{highlight:!0,lineNumbers:!1},codepenEmbed:!0,codepenHeight:300,jsfiddleEmbed:!0,jsfiddleHeight:300,jsbinEmbed:!0,jsbinHeight:300,plunkerEmbed:!0,githubgistEmbed:!0,ideoneEmbed:!0,ideoneHeight:300}})}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.separatorKeys=[a.KEY_CODE.ENTER,a.KEY_CODE.COMMA,a.KEY_CODE.TAB],c.fileAdded=function(e){var t=["pdf","tif"];if(!_.includes(t,e.getExtension()))return l.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported only: "+t.join()}),!1;return!0},c.message={from:i.localstationid,to:_.isNil(o.to)||_.isEmpty(o.to)?[]:o.to,attachments:[]},c.ngFlowOptions={maxChunkRetries:1,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,singleFile:!0,target:"api/attachments",allowDuplicateUploads:!0},c.ngFlow={flow:{}},c.send=function(e){1===c.message.attachments.length?c.message.to.length?(o.draft=void 0,n.hide({from:c.message.from,to:c.message.to,attach:c.message.attachments.length,attachments:c.message.attachments})):l.error("To is mandatory"):l.error("Attachment is mandatory")},c.upload=function(){c.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+e.get("motion.token")},c.ngFlow.flow.upload()},c.fileSuccess=function(e,t){try{(t=JSON.parse(t)).size=e.size,c.message.attachments.push(t)}catch(e){console.error(e)}},c.getContact=function(e){var t="";e.firstName&&e.firstName!==e.fax&&(t+=e.firstName+" ");e.lastName&&e.lastName!==e.fax&&(t+=e.lastName+" ");return t+="<"+e.fax+">"},c.contactSearch=function(e){return i&&i.ListId?r.cmContact.get({ListId:i.ListId,nolimit:!0,filter:e,fields:"firstName,lastName,fax"}).$promise.then(function(e){return e.rows}):[]},c.transformContact=function(e){var t=e;if(_.isObject(e))return e.fax;if(n=t,!/[&\/\\#,()$~%.'":;*?<>{}\s\\|a-zA-Z\pS!òàùè…_§°çéì-]/.test(n))return t;var n;return l.error("Fax "+t+" is not valid"),null},c.closeDialog=function(){o.draft=c.message,n.cancel()}}e.$inject=["$cookies","$window","$mdDialog","$mdConstant","account","message","type","api","toasty","$q"],angular.module("app.dashboards").controller("ComposeFaxInteractionDialogController",e)}(),function(){"use strict";function e(t,e,i,n,o,s,a,r,l,d,c,m){var u=this;switch(u.currentUser=c.getCurrentUser(),u.secret="note"===a,u.hiddenCC=!0,u.hiddenBCC=!0,u.verifySmtp=!0,u.errors=[],u.separatorKeys=[n.KEY_CODE.ENTER,n.KEY_CODE.COMMA,n.KEY_CODE.TAB],u.searchTextChange=function(t){var n=d.defer(),a=[];return r.cannedAnswer.get({filter:t,MailAccountId:o.id}).$promise.then(function(e){return a=_.concat(a,e.rows),r.cannedAnswer.get({filter:t}).$promise}).then(function(e){a=_.concat(a,_.filter(e.rows,function(e){return!(e.MailAccountId||e.FaxAccountId||e.SmsAccountId||e.OpenchannelAccountId||e.ChatWebsiteId)})),n.resolve(a)}).catch(function(e){n.reject(e)}),n.promise},u.selectedItemChange=function(t){if(t&&t.value&&u.ckEditorInstance)try{var e=_.template(t.value),n={user:u.currentUser,account:o,interaction:m,contact:m&&m.Contact?m.Contact:{}};u.ckEditorInstance.insertText(e(n))}catch(e){console.error(e),u.ckEditorInstance.insertText(t.value)}document.getElementById("html-area").focus(),u.selectedItem=null},u.onReadyEditor=function(e){try{u.ckEditorInstance=CKEDITOR.instances["html-area"]}catch(e){console.error("Unable to get Html Editor instance",e)}},_.templateSettings.interpolate=/{{([\s\S]+?)}}/g,u.replyTemplate=_.template("On {{ date }}, at {{ time }}, {{ from }} wrote:"),u.forwardTemplate=_.template("Begin forwarded message:<br><br><strong>From:</strong> {{ from }}<br><strong>Subject:</strong> {{ subject }}<br><strong>Date:</strong> {{ date }}, at {{ time }}<br><strong>To:</strong> {{ to }}"),u.message={from:o.email,to:[],cc:[],bcc:[],body:g(),type:a,attachments:[],showLastMessage:!0},u.ckeditor={skin:"office2013",startupFocus:!0,language:"en",allowedContent:!0,extraPlugins:"font,colorbutton,autogrow,autoembed,autocorrect,googlethisterm,pastebase64",toolbarGroups:[{name:"styles",groups:["styles"]},{name:"clipboard",groups:["undo"]},{name:"colors",groups:["colors"]},{name:"basicstyles",groups:["basicstyles"]},{name:"paragraph",groups:["list","indent","align"]}],autoGrow_onStartup:!0,autoGrow_minHeight:u.secret?160:300,autoGrow_maxHeight:e.innerHeight-400,autocorrect_enabled:!0,disableNativeSpellChecker:!1,font_defaultLabel:o.fontFamily?o.fontFamily.split(",")[0]:"Arial",fontSize_defaultLabel:o.fontSize||"12",removePlugins:"magicline"},u.ngFlowOptions={maxChunkRetries:1,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,singleFile:!0,target:"api/attachments",allowDuplicateUploads:!0},u.ngFlow={flow:{}},u.reply=function(e){angular.isDefined(s)&&(u.message.type="reply",u.message.to="in"===s.direction?s.from.split(","):s.to.split(","),u.message.subject=_.startsWith(s.subject,"Re:")?s.subject:"Re: "+s.subject,u.message.inReplyTo=s.messageId,u.message.body=s.draft&&s.draft.inReplyTo?s.draft.body:g(),u.message.attachments=s.draft?s.draft.attachments:[],e&&s.cc&&(u.hiddenCC=!1,u.message.cc=s.cc.split(",")),u.message.showLastMessage=!!s.draft&&s.draft.showLastMessage)},u.newMail=function(){angular.isDefined(s)&&(u.message.type="new",u.message.to=s.to?s.to.split(","):[])},u.forward=function(){if(angular.isDefined(s)){if(u.message.type="forward",u.message.subject=_.startsWith(s.subject,"Fwd:")?s.subject:"Fwd: "+s.subject,u.message.body=s.draft&&!s.draft.inReplyTo?s.draft.body:g(),s.Attachments&&s.Attachments.length)for(var e=0;e<s.Attachments.length;e++)u.message.attachments.push(s.Attachments[e]);u.message.showLastMessage=!!s.draft&&s.draft.showLastMessage}},u.send=function(e,t,n){if(u.message.to&&u.message.body)if(u.message.to.length)if(s.draft=void 0,_.isEmpty(u.message.subject)){var a=i.confirm({skipHide:!0}).title("Warning").textContent("This message has no subject. Are you sure you want to send it?").ariaLabel("Warning").targetEvent(e).ok("Send Anyway").cancel("Cancel");i.show(a).then(function(){p(t,n)})}else p(t,n);else l.error("To is mandatory")},u.note=function(){u.type="note",u.secret=!0,u.message.body='<div style="font-family:'+o.fontFamily+";font-size:"+o.fontSize+'px"><p></p></div>'},u.addNote=function(){u.message.body&&(u.message.draft=void 0,i.hide({secret:!0,body:u.message.body,attach:u.message.attachments.length,attachments:u.message.attachments}))},u.upload=function(e){u.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+t.get("motion.token")},u.ngFlow.flow.upload()},u.fileSuccess=function(e,t){try{(t=JSON.parse(t)).size=e.size,u.message.attachments.push(t)}catch(e){console.error(e)}},u.deleteAttachment=function(e){u.message.attachments=_.reject(u.message.attachments,{id:e.id}),r.attachment.delete({id:e.id}).$promise.then(function(){l.success({title:"Attachment deleted!",msg:e.name?e.name+" has been deleted!":""})})},u.getContact=function(e){var t="";e.firstName&&e.firstName!==e.email&&(t+=e.firstName+" ");e.lastName&&e.lastName!==e.email&&(t+=e.lastName+" ");return t+="<"+e.email+">"},u.contactSearch=function(e){return o&&o.ListId?r.cmContact.get({ListId:o.ListId,nolimit:!0,filter:e,fields:"firstName,lastName,email"}).$promise.then(function(e){return e.rows}):[]},u.transformContact=function(e){var t=e;if(_.isObject(e))return e.email;if(n=t,/^(([^<>()\[\]\\.,;:\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,}))$/.test(n))return t;var n;return l.error("Email "+t+" is not valid"),null},u.closeDialog=function(){angular.isDefined(s)&&(s.draft=u.message);i.cancel()},u.loadLastMessage=function(){u.message.body+=v(u.message.type)},a){case"reply":u.reply(!1);break;case"replyAll":u.reply(!0);break;case"forward":u.forward();break;case"new":u.newMail();break;case"note":u.note()}function p(e,t){var n={from:u.message.from,to:u.message.to.join(","),cc:u.message.cc.join(","),bcc:u.message.bcc.join(","),subject:u.message.subject,body:u.message.showLastMessage?u.message.body:u.message.body+v(u.message.type),inReplyTo:u.message.inReplyTo,attach:u.message.attachments.length,attachments:u.message.attachments,Interaction:{lastMsgAt:moment().format("YYYY-MM-DD HH:mm:ss"),lastMsgDirection:"out",lastMsgBody:u.message.body,substatus:t,substatusAt:moment().format("YYYY-MM-DD HH:mm:ss")}};n.html='<div id="xm-mail-content">'+_.replace(n.body,'<div id="xm-mail-content"',"<div")+"</div>",e&&(n.Interaction.closed=!0,n.Interaction.closedAt=moment().format("YYYY-MM-DD HH:mm:ss")),i.hide(n)}function g(){return'<div style="font-family:'+o.fontFamily+";font-size:"+o.fontSize+'px">'+function(){if(_.isNil(o.template))return"";try{return _.template(o.template)({user:u.currentUser,account:o,interaction:m,contact:m&&m.Contact?m.Contact:{}})}catch(e){return console.error(e),""}}()+"</div>"}function v(e){var t,n,a='<div id="xm-mail-content"><blockquote type="cite">';switch(e){case"reply":case"replyAll":a+=u.replyTemplate({date:moment(s.createdAt).format("D MMM YYYY")||"",time:moment(s.createdAt).format("HH:mm")||"",from:_.escape(s.from)||""});break;case"forward":a+=u.forwardTemplate({date:moment(s.createdAt).format("D MMM YYYY")||"",time:moment(s.createdAt).format("HH:mm")||"",from:_.escape(s.from)||"",to:_.escape(s.to)||"",subject:_.escape(s.subject)||""})}return a+="<br><br>",a+=(t=s.body?_.replace(s.body,'<div id="xm-mail-content"',"<div"):"",(n=t.match(/\<body[^>]*\>([^]*)\<\/body/m))?n[1]:t),a+="</blockquote></div>",e?a:""}r.mailSubstatus.get({nolimit:!0}).$promise.then(function(e){u.subStatuses=e||{count:0,rows:[]}}).catch(function(e){console.error(e)}),u.secret||r.mailAccount.verifySmtp({id:o.id}).$promise.catch(function(e){u.verifySmtp=!1,u.errors.push({message:e.data,type:e.status}),u.errors.push({message:"You can't reply or send an email. Please contact the administrator!",type:"500"})})}e.$inject=["$cookies","$window","$mdDialog","$mdConstant","account","message","type","api","toasty","$q","Auth","interaction"],angular.module("app.dashboards").controller("ComposeMailInteractionDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u){var p=this;switch(p.currentUser=u.getCurrentUser(),p.errors=[],p.separatorKeys=[i.KEY_CODE.ENTER,i.KEY_CODE.COMMA,i.KEY_CODE.TAB],p.searchTextChange=function(t){var n=c.defer(),a=[];return l.cannedAnswer.get({filter:t,SmsAccountId:o.id}).$promise.then(function(e){return a=_.concat(a,e.rows),l.cannedAnswer.get({filter:t}).$promise}).then(function(e){a=_.concat(a,_.filter(e.rows,function(e){return!(e.MailAccountId||e.FaxAccountId||e.SmsAccountId||e.OpenchannelAccountId||e.ChatWebsiteId)})),n.resolve(a)}).catch(function(e){n.reject(e)}),n.promise},p.selectedItemChange=function(t){if(t){var n=p.getText();try{_.templateSettings.interpolate=/{{([\s\S]+?)}}/g;var e=_.template(t.value),a={user:p.currentUser,account:o};p.setText(n+" "+e(a))}catch(e){p.setText(n+" "+t.value)}p.selectedItem=null}},p.note=function(){p.secret=!0},p.addNote=function(){var e=p.getText();e&&a.hide({secret:!0,body:e})},p.message={from:o.phone,to:_.isNil(s.to)||_.isEmpty(s.to)?[]:s.to,body:""},p.send=function(e){var t=p.getText();p.message.to&&t&&(p.message.to.length?(n=t,a.hide({to:p.message.to.join(","),body:n})):d.error("To is mandatory"));var n},p.getContact=function(e){var t="";e.firstName&&e.firstName!==e.mobile&&(t+=e.firstName+" ");e.lastName&&e.lastName!==e.mobile&&(t+=e.lastName+" ");return t+="<"+e.mobile+">"},p.closeDialog=function(){a.cancel()},p.contactSearch=function(e){return o&&o.ListId?l.cmContact.get({ListId:o.ListId,nolimit:!0,filter:e,fields:"firstName,lastName,mobile"}).$promise.then(function(e){return e.rows}):[]},p.setTextWrapper=function(e){p.setText=e},p.getTextWrapper=function(e){p.getText=e},p.transformContact=function(e){var t=e;if(_.isObject(t))return e.mobile;if(n=t,/^(\+|\d)[0-9]{7,16}$/.test(n))return t;var n;return d.error("Mobile "+t+" is not valid"),null},r){case"note":p.note()}}e.$inject=["$cookies","$timeout","$window","$mdDialog","$mdConstant","account","message","type","api","toasty","$q","$translate","Auth"],angular.module("app.dashboards").controller("ComposeSmsInteractionDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;function d(e){a.hide(e)}l.errors=[],l.interaction=angular.copy(s),l.interaction.disposition||(l.interaction.disposition=null),l.channel=r,l.saveDisposition=function(e){l.errors=[],l.interaction.closed||(l.interaction.closedAt=Date.now());l.interaction.closed=!0,o[l.interactionMethod]?o[l.interactionMethod].update(_.pick(l.interaction,["MailAccountId","closed","closedAt","disposition","id","note"])).$promise.then(function(e){l.interaction=e,i.success({title:"Interaction properly closed!",msg:"Interaction has been closed!"}),d(!0)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){l.errors=e.data.errors||[{message:e.toString(),type:"api.variable.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.variable.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})}):d(!1)},l.closeDialog=d,l.dispositionMethod="chat"===l.channel?"chatWebsite":l.channel+"Account",l.interactionMethod=l.channel+"Interaction",o[l.dispositionMethod]&&o[l.dispositionMethod].getDispositions({fields:"id,name",sort:"name",nolimit:!0,id:l.interaction["chat"===l.channel?"ChatWebsiteId":_.capitalize(l.channel)+"AccountId"]}).$promise.then(function(e){l.dispositions=e||{count:0,rows:[]}}).catch(function(e){console.error(e)})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","api","interaction","channel"],angular.module("app.dashboards").controller("DisposeInteractionDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i,o){var s=this;function r(e){t.hide(e)}s.errors=[],s.tags=o,s.interaction=angular.copy(a),s.interaction.Tags=_.map(s.interaction.Tags,function(e){return{id:e.id,name:e.name,color:e.color}}),s.channel=i,s.autocompleteRequireMatch=!0,s.saveTag=function(){{if(s.errors=[],e[s.interactionMethod])return e[s.interactionMethod].addTags({id:s.interaction.id,ids:_.map(s.interaction.Tags,"id")}).$promise.then(function(){n.success({title:"Interaction properly tagged!",msg:"Interaction has been tagged!"}),a.Tags=s.interaction.Tags,r(!0)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t+=1)n.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.variable.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})});r(!1)}},s.closeDialog=r,s.interactionMethod=s.channel+"Interaction"}e.$inject=["$mdDialog","toasty","api","interaction","channel","tags"],angular.module("app.dashboards").controller("TagInteractionDialogController",e)}(),function(){"use strict";function e(i,o,s,e,l,d,t,n,a,r,c){var m=this;function u(){try{i.$parent.$parent.$parent.vm.updateLocalStorage()}catch(e){d.error({title:"ERROR UPDATE LOCAL TABS",msg:"Error updating locally stored tabs"})}}function p(n,e){var r=t.getCurrentUser();l.jscriptySessionReport.save({starttime:m.starttime,membername:m.call&&m.call.membername?m.call.membername:r.name,calleridname:m.call&&m.call.calleridname?m.call.calleridname:void 0,calleridnum:m.call&&m.call.calleridnum?m.call.calleridnum:void 0,queue:m.call&&m.call.queue?m.call.queue:void 0,uniqueid:m.call&&m.call.uniqueid?m.call.uniqueid:void 0,VoiceQueueId:m.call&&m.call["xmd-voicequeueid"]?m.call["xmd-voicequeueid"]:void 0,ProjectId:m.project&&m.project.id?m.project.id:void 0,projectname:m.project&&m.project.name?m.project.name:void 0,ContactId:m.contact&&m.contact.id?m.contact.id:void 0,completed:e}).$promise.then(function(e){if(e)for(var t=m.getResponseSheetHeaders(),n=m.getResponseSheetRow(),a=m.getQuestionWithResponseList(),i=0;i<t.length;i+=1)if(!_.isEmpty(n[i])){l.jscriptyQuestionReport.save({question:t[i],answer:n[i],questionId:a[i].id,membername:m.call&&m.call.membername?m.call.membername:r.name,calleridname:m.call&&m.call.calleridname?m.call.calleridname:void 0,calleridnum:m.call&&m.call.calleridnum?m.call.calleridnum:void 0,queue:m.call&&m.call.queue?m.call.queue:void 0,uniqueid:m.call&&m.call.uniqueid?m.call.uniqueid:void 0,SessionId:e.id,ProjectId:m.project.id,projectname:m.project.name});for(var o=n[i].toString().split(";"),s=0;s<o.length;s+=1)l.jscriptyAnswerReport.save({question:t[i],questionId:a[i].id,answer:o[s].trim(),membername:m.call&&m.call.membername?m.call.membername:r.name,calleridname:m.call&&m.call.calleridname?m.call.calleridname:void 0,calleridnum:m.call&&m.call.calleridnum?m.call.calleridnum:void 0,queue:m.call&&m.call.queue?m.call.queue:void 0,uniqueid:m.call&&m.call.uniqueid?m.call.uniqueid:void 0,SessionId:e.id,ProjectId:m.project.id,projectname:m.project.name})}return e}).then(function(e){e?n.resolve(!0):n.reject()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.contact.save"}];for(var t=0;t<e.data.errors.length;t+=1)d.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else d.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.contact.save",msg:e.data?JSON.stringify(e.data.message):e.toString()});n.reject()})}m.formViewer={},m.showResetButton=!0,m.showIncompleteSubmitButton=!1,m.detectBrowser=c.detectBrowser(),m.onSubmit=function(e,t){var n=o.defer();if(t){var a=s.confirm().title("Would you like to save your survey?").textContent("").ariaLabel("survey").targetEvent(e).ok("YES").cancel("NO");s.show(a).then(function(){p(n,!1)},function(){n.resolve()})}else p(n,!0);return n.promise.then(function(e){e&&(d.success({title:"Session saved",msg:"Your survey session has been properly saved!"}),function(e){try{i.$parent.$parent.$parent.vm.removeTab(e)}catch(e){d.error({title:"ERROR REMOVE TAB",msg:"Error while removing tab"})}}(m.tab.id))}).catch(function(e){d.error({title:"Session save error",msg:"There has been an error while trying to save your survey session!"})})},m.openContact=function(e,t){try{i.$parent.$parent.$parent.vm.addContactTab(t)}catch(e){d.error({title:"ERROR OPEN CONTACT",msg:"Jscripty can't open the contact"})}},m.isJsonString=function(e){if(_.isNil(e))return!1;try{JSON.parse(e)}catch(e){return!1}return!0},m.getResponseSheet=function(){return e.getResponseSheet(m.project.formData,m.project.responseData,!1)},m.getResponseSheetRow=function(){return e.getResponseSheetRow(m.project.formData,m.project.responseData)},m.getResponseSheetHeaders=function(){return e.getResponseSheetHeaders(m.project.formData,!1)},m.getQuestionWithResponseList=function(){return e.getQuestionWithResponseList(m.project.formData,m.project.responseData)},m.init=function(e){m.tab=e,m.tab&&(m.call=m.tab.call,m.starttime=m.tab.openedAt,m.contact=m.tab.contact,m.project=m.tab.project,m.project&&(_.isObjectLike(m.project.formData)?m.project.formData=m.project.formData:m.isJsonString(m.project.formData)?m.project.formData=JSON.parse(m.project.formData):m.project.formData=void 0,m.project.responseData=m.project.responseData||{},void 0!==m.project.currentPage&&r(function(){a.$broadcast("mwForm.pageEvents.changePage",{page:m.project.currentPage})}),i.$on("mwForm.pageEvents.pageCurrentChanged",function(e,t){if(t.currentPage&&(m.project.currentPage=t.currentPage.number-1,u(),m.project.enableUncompleteSave&&(1<=t.currentPage.number&&t.currentPage.number<m.project.formData.pages.length?m.showIncompleteSubmitButton=!0:m.showIncompleteSubmitButton=!1),m.project.formData&&m.project.formData.pages))for(var n=0,a=m.project.formData.pages.length;n<a;n++)if(t.currentPage.number<n+1&&m.project.formData.pages[n].elements)for(var i=0,o=m.project.formData.pages[n].elements.length;i<o;i++)"question"===m.project.formData.pages[n].elements[i].type&&m.project.formData.pages[n].elements[i].question&&delete m.project.responseData[m.project.formData.pages[n].elements[i].question.id]})))},m.resetViewer=function(e){if(m.formViewer.reset){var t=s.confirm().title(n.instant("JSCRIPTY.DO_YOU_WANT_TO_RESET_SESSION")).content(n.instant("JSCRIPTY.ALL_SURVEY_DATA_WILL_BE_LOST")).textContent("").ariaLabel("survey").targetEvent(e).ok(n.instant("JSCRIPTY.YES")).cancel(n.instant("JSCRIPTY.NO"));s.show(t).then(function(){m.showIncompleteSubmitButton=!1,m.project.currentPage=void 0,u(),m.formViewer.reset()})}}}e.$inject=["$scope","$q","$mdDialog","mwFormResponseUtils","api","toasty","Auth","$translate","$rootScope","$timeout","msUtils"],angular.module("app.dashboards").controller("AgentGeneralJscriptyController",e)}(),function(){"use strict";function e(n,a,e,t,i){var o=this;function s(){return function(e){if(404===e.status)a.info({title:n.instant("DASHBOARDS.ATTENTION"),msg:n.instant("DASHBOARDS.ACCEPT_ELSEWHERE")});else if(e.data&&e.data.errors&&e.data.errors.length){o.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelMessage.accept"}];for(var t=0;t<e.data.errors.length;t+=1)a.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelMessage.accept",msg:e.data?JSON.stringify(e.data.message):e.toString()})}}o.notification=e,o.user=i.getCurrentUser(),o.accept=function(e){{if(t[o.notification.channel+"Message"])return t[o.notification.channel+"Message"].accept({id:o.notification.id,UserId:o.user.id,manual:!0}).$promise.then(function(e){a.success({title:"Message properly accepted!",msg:"Message has been accepted!"})}).catch(s());a.error({title:"API:ERROR",msg:"API accept message not found: "+o.notification.channel+"Message"})}},o.reject=function(e){{if(t[o.notification.channel+"Message"])return t[o.notification.channel+"Message"].reject({id:o.notification.id,UserId:o.user.id}).$promise.then(function(e){a.success({title:"Message properly rejected!",msg:"Message has been rejected!"})}).catch(s());a.error({title:"API:ERROR",msg:"API reject message not found: "+o.notification.channel+"Message"})}}}e.$inject=["$translate","toasty","notification","api","Auth"],angular.module("app.dashboards").controller("NotificationController",e)}(),function(){"use strict";angular.module("app.dashboards").controller("AgentGeneralPopupController",function(){var t=this;t.init=function(e){t.tab=e,t.tab&&(t.tab.saved=!0,t.html=t.tab.html)}})}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(){l({queues:m.outboundQueues,rpcQueues:m.rpcQueues}).then(function(e){m.inbound=e})}function p(){d({rpcCampaigns:m.rpcCampaigns}).then(function(e){m.ivr=e})}m.outboundQueues=s?_.keyBy(s.rows?s.rows:[],"id"):{},m.rpcQueues=r?_.keyBy(r.rows?r.rows:[],"id"):{},m.rpcCampaigns=c?_.keyBy(c.rows?c.rows:[],"id"):{},m.inbound={waiting:0,talking:0,pTalking:0,answered:0,abandoned:0,unmanaged:0,sumHoldTime:0,sumBillable:0,total:0,avgHoldTime:"00:00:00",avgTalkTime:"00:00:00",answerRate:0,abandonRate:0,outboundDropCallsDayCallersExit:0,outboundDropCallsDayTimeout:0},m.ivr={originated:0,limitCalls:0},m.onSaveQueue=function(e){m.outboundQueues[e.id]&&m.rpcQueues[e.id]&&(m.rpcQueues[e.id]=e)},m.onSaveCampaign=function(e){m.rpcCampaigns[e.id]&&(m.rpcCampaigns[e.id]=e)},i.onWithoutApply("voice_queue:save",m.onSaveQueue),m.interval=t(function(){u(),p()},999),i.onWithoutApply("campaign:save",m.onSaveCampaign),u(),p(),e.$on("$destroy",function(){i.removeAllListeners("voice_queue:save"),i.removeAllListeners("campaign:save"),m.interval&&t.cancel(m.interval)})}e.$inject=["$scope","$interval","$mdSidenav","Auth","socket","api","outboundQueues","rpcQueues","initializeRealtimeQueue","initializeRealtimeCampaign","rpcCampaigns"],angular.module("app.dashboards").controller("UserVoiceDashboardDialerController",e)}(),function(){"use strict";function e(n){var o=[],s=function(){var a=o[0],i={waiting:0,talking:0,pTalking:0,answered:0,abandoned:0,unmanaged:0,sumHoldTime:0,sumBillable:0,total:0,avgHoldTime:"00:00:00",avgTalkTime:"00:00:00",answerRate:0,abandonRate:0,originated:0,outboundDropCallsDayCallersExit:0,outboundDropCallsDayTimeout:0};_.forIn(a.queues,function(e,t){if(a.rpcQueues[t]){i.waiting+=a.rpcQueues[t].waiting||0,i.talking+=(a.rpcQueues[t].talking||0)+(a.rpcQueues[t].pTalking||0),i.answered+=a.rpcQueues[t].answered||0,i.unmanaged+=a.rpcQueues[t].unmanaged||0,i.sumHoldTime+=a.rpcQueues[t].sumHoldTime||0,i.sumBillable+=a.rpcQueues[t].sumBillable||0,i.total+=a.rpcQueues[t].total||0,i.originated+=a.rpcQueues[t].originated||0,i.outboundDropCallsDayCallersExit+=a.rpcQueues[t].outboundDropCallsDayCallersExit||0,i.outboundDropCallsDayTimeout+=a.rpcQueues[t].outboundDropCallsDayTimeout||0;var n=a.rpcQueues[t].total-a.rpcQueues[t].answered-a.rpcQueues[t].unmanaged;i.abandoned+=0<n?n:0}}),i.avgHoldTime=Math.round(0<i.total?i.sumHoldTime/i.total:0),i.avgHoldTime=new Date(1e3*i.avgHoldTime).toISOString().substr(11,8),i.avgTalkTime=Math.round(0<i.answered?i.sumBillable/i.answered:0),i.avgTalkTime=new Date(1e3*i.avgTalkTime).toISOString().substr(11,8),i.answerRate=Math.round((0<i.total?i.answered/i.total*100:0)*Math.pow(10,1))/Math.pow(10,1),i.abandonRate=Math.round((0<i.total?i.abandoned/i.total*100:0)*Math.pow(10,1))/Math.pow(10,1),i.outboundDropRate=Math.round((0<i.total?i.outboundDropCallsDayTimeout/i.total*100:0)*Math.pow(10,1))/Math.pow(10,1),i.outboundAbandonRate=Math.round((0<i.total?i.outboundDropCallsDayCallersExit/i.total*100:0)*Math.pow(10,1))/Math.pow(10,1),i.outboundanswerRate=0<100-i.outboundDropRate-i.outboundAbandonRate&&i.total?100-i.outboundDropRate-i.outboundAbandonRate:0,o.shift(),a.defer.resolve(i),0<o.length&&s()};return function(e){var t=n.defer();return o.push({queues:e.queues,rpcQueues:e.rpcQueues,defer:t}),1===o.length&&s(),t.promise}}function t(n){var i=[],o=function(){var n=i[0],a={originated:0,limitCalls:0};_.forIn(n.rpcCampaigns,function(e,t){n.rpcCampaigns[t]&&(a.originated+=n.rpcCampaigns[t].originated||0,a.limitCalls+=n.rpcCampaigns[t].limitCalls||0)}),i.shift(),n.defer.resolve(a),0<i.length&&o()};return function(e){var t=n.defer();return i.push({rpcCampaigns:e.rpcCampaigns,defer:t}),1===i.length&&o(),t.promise}}function n(e,o,t,n){var s=this;s.hasPermission=function(){return t.hasPermission(101)||t.hasRole("admin")},s.license=n,e.$on("$stateChangeSuccess",function(e,t,n,a,i){if(t.data)switch(s.currentTab=t.data.selectedTab,s.currentTab){case 1:o.go("app.dashboards.general.dialer");break;default:o.go("app.dashboards.general.voice")}})}e.$inject=["$q"],t.$inject=["$q"],n.$inject=["$scope","$state","Auth","license"],angular.module("app.dashboards").filter("secToTime",function(){return function(e){return new Date(1e3*e).toISOString().substr(11,8)}}).factory("initializeRealtimeQueue",e).factory("initializeRealtimeCampaign",t).controller("UserDashboardGeneralController",n)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;function m(){d({queues:c.inboundQueues,rpcQueues:c.rpcQueues}).then(function(e){c.inbound=e})}c.inboundQueues=s?_.keyBy(s.rows?s.rows:[],"id"):{},c.rpcQueues=r?_.keyBy(r.rows?r.rows:[],"id"):{},c.inbound={waiting:0,talking:0,answered:0,abandoned:0,unmanaged:0,sumHoldTime:0,sumBillable:0,total:0,avgHoldTime:"00:00:00",avgTalkTime:"00:00:00",answerRate:0,abandonRate:0},c.outbound=l||{answered:0,sumBillable:0,sumDuration:0,sumHoldTime:0,total:0},c.onSaveQueue=function(e){c.inboundQueues[e.id]&&c.rpcQueues[e.id]&&(c.rpcQueues[e.id]=e,m())},c.onSaveOutbound=function(e){c.outbound=e},i.on("voice_queue:save",c.onSaveQueue),i.on("voice_outbound:save",c.onSaveOutbound),m(),e.$on("$destroy",function(){i.removeAllListeners("voice_queue:save"),i.removeAllListeners("voice_outbound:save")})}e.$inject=["$scope","$interval","$mdSidenav","Auth","socket","api","inboundQueues","rpcQueues","outbound","initializeRealtimeQueue"],angular.module("app.dashboards").controller("UserVoiceDashboardGeneralController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="FAX.EDIT_FAXACCOUNT",m.faxAccount=angular.copy(s),m.faxAccounts=o,m.newFaxAccount=!1,m.faxAccount||(m.faxAccount={waitForTheAssignedAgent:10,notificationSound:!0},m.title="FAX.NEW_FAXACCOUNT",m.newFaxAccount=!0),t.params.id&&(m.faxAccount.FaxAccountId=t.params.id),m.addNewFaxAccount=function(){m.errors=[],r.faxAccount.addAccountApplications(m.faxAccount).$promise.then(function(e){m.faxAccounts.unshift(e.toJSON()),i.success({title:"FaxAccount properly created",msg:m.faxAccount.name?m.faxAccount.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.faxAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.faxAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveFaxAccount=function(){m.errors=[],r.faxAccount.updateAccountApplications(m.faxAccount).$promise.then(function(e){var t=_.find(m.faxAccounts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"FaxAccount properly saved!",msg:m.faxAccount.name?m.faxAccount.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.faxAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.faxAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteFaxAccount=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The faxAccount will be deleted.").ariaLabel("Delete FaxAccount").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.faxAccount.delete({id:m.faxAccount.id}).$promise.then(function(){_.remove(m.faxAccounts,{id:m.faxAccount.id}),i.success({title:"FaxAccount properly deleted!",msg:(m.faxAccount.name||"faxAccount")+" has been deleted!"}),u(m.faxAccount)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.faxAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.faxAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.trunk.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.trunks=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})}),r.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.lists=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","faxAccounts","faxAccount","api","Auth","license","setting"],angular.module("app.fax").controller("CreateOrEditFaxAccountDialogController",e)}(),function(){"use strict";function e(s,i,a,o,e){var r=this;function t(e,t){if(r.faxAccountApps.rows.length){var n=r.faxAccountApps.rows[t]?r.faxAccountApps.rows[t]:r.faxAccountApps.rows[0];i.show({controller:"EditFaxAccountApp"+(n.appType||n.app).toLowerCase()+"DialogController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxAccounts/edit/apps/"+(n.appType||n.app).toLowerCase()+"/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{faxAccountApp:n,faxAccount:r.faxAccount}}).then(function(e){e&&(e.id?r.faxAccountApps.rows[t]=e:r.faxAccountApps.rows.splice(t,0,e),l())}).catch(function(e){e&&o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:EDITMODALSHOW",msg:e.data?JSON.stringify(e.data):e.toString()})})}}function l(){for(var e=1,t=[],n=0;n<r.faxAccountApps.rows.length;n++,0){var a=r.faxAccountApps.rows[n],i=[],o=[];a.intervals="*,*,*,*"!==a.interval?[a.interval]:a.IntervalId?_.map(_.filter(r.intervals.rows,{IntervalId:a.IntervalId}),"interval"):[],a.context=r.faxAccount.context,a.exten=r.faxAccount.exten,a.type&&(a.type=a.type.toLowerCase()),a.priority=i.length?_.last(i).priority+1:e,e=(o.length?_.last(o).priority:a.priority)+1,t=_.concat(t,i,[a],o)}s.faxAccount.addApplications({id:r.faxAccount.id},_.sortBy(t,"priority")).$promise.then(function(e){r.faxAccountApps.rows=e.rows}).catch(function(e){console.error(e)})}function n(e){r.faxAccountApps=e||{count:0,rows:[]}}r.currentUser=e.getCurrentUser(),r.faxAccount={},r.faxAccountApps={count:0,rows:[]},r.selectedFaxAccountApps=[],r.query={sort:"priority"},r.apps=_.reject(_.sortBy([{app:"Interval",appType:"interval",types:["always","custom","list"],fields:[],isApp:!1},{app:"noop",appType:"noop",type:"noop",icon:"icon-apps",interval:"*,*,*,*",required:!0,isApp:!0,fields:[{title:"Value",name:"value",type:"text",param:0}]},{app:"system",appType:"system",type:"system",icon:"icon-apps",interval:"*,*,*,*",required:!0,isApp:!0,extraApi:[{name:"variables",route:"variable",filters:{fields:"id,name",sort:"name",nolimit:!0}}],fields:[{title:"Command",name:"command",type:"text",required:!0,param:0},{title:"Variable",name:"variable",type:"apiselect",values:"variables",value:"variable.name",option:"variable.name",defaultValues:[{value:"''",option:"None"}],defaultValue:"''",param:1}]},{app:"gotop",appType:"gotop",type:"goto",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Priority",name:"priority",type:"number",required:!0,min:0,param:0}]},{app:"gotoif",appType:"gotoif",type:"gotoif",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Condition",name:"condition",type:"text",required:!0,param:0},{title:"truepriority",name:"truepriority",type:"number",min:1,required:!0,param:1},{title:"falsepriority",name:"falsepriority",type:"number",min:1,required:!0,param:2}]},{app:"queue",appType:"queue",foreignKey:"FaxQueueId",type:"queue",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"queues",route:"faxQueue",filters:{fields:"id,name,type",sort:"name",nolimit:!0}}],fields:[{title:"Queue",name:"queue",type:"apiselect",values:"queues",value:"queue.name",option:"queue.name",defaultValue:300,required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",max:2147483,min:0,defaultValue:300,required:!0,param:1}]},{app:"agent",appType:"agent",type:"agent",foreignKey:"UserId",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"agents",route:"user",filters:{fields:"id,name",sort:"name",role:"agent",nolimit:!0}}],fields:[{title:"Agent",name:"agent",type:"apiselect",values:"agents",value:"agent.name",option:"agent.name",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",max:2147483,min:0,required:!0,defaultValue:30,param:1}]},{app:"close",appType:"close",type:"close",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Disposition",name:"disposition",type:"text",required:!0,param:0}]}],["app"]),{isApp:!1}),r.list={group:{name:"opt1",pull:"clone"},animation:100,sort:!1},r.applications={group:{name:"opt2",put:"opt1"},animation:100,onAdd:function(e){t(e,e.newIndex)},onSort:function(e){l()}},r.init=function(e){r.faxAccount=e,r.query.id=e.id,r.query.isApp=!0,r.query.nolimit=!0,r.getFaxAccountApps(),r.getIntervals()},r.deleteConfirm=function(e,t,n){var a=i.confirm().title("Are you sure want to delete the application?").htmlContent("<b>"+e.app+"</b> will be deleted.").ariaLabel("delete application").targetEvent(n).ok("OK").cancel("CANCEL");i.show(a).then(function(){r.faxAccountApps.rows.splice(t,1),l()},function(){console.log("CANCEL")})},r.getFaxAccountApps=function(){r.promise=s.faxAccount.getApplications(r.query,n).$promise},r.editFaxAccountApp=t,r.editInterval=function(e,t){if(r.faxAccountApps.rows.length){var n=r.faxAccountApps.rows[t]?r.faxAccountApps.rows[t]:r.faxAccountApps.rows[0];i.show({controller:"EditFaxAccountAppintervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxAccounts/edit/apps/interval/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:{interval:n.interval,IntervalId:n.IntervalId,application:!0},intervals:[]}}).then(function(e){e&&(n.interval=e.interval||"*,*,*,*",n.IntervalId=e.IntervalId||null,l())})}},r.deleteFaxAccountApp=function(e){_.remove(r.faxAccountApps.rows,{id:e.id}),l(),o.success({title:"App deleted!",msg:e.app?e.app+" has been deleted!":""})},r.deleteSelectedFaxAccountApps=function(e){var t=i.confirm().title("Are you sure want to delete the selected applications?").htmlContent("<b>"+r.selectedFaxAccountApps.length+" selected</b> will be deleted.").ariaLabel("delete applications").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){r.selectedFaxAccountApps.forEach(function(e){_.remove(r.faxAccountApps.rows,{id:e.id})}),r.selectedFaxAccountApps=[],l()})},r.rewriteRouting=l,r.getIntervals=function(){return s.interval.get({fields:"id,interval,IntervalId"}).$promise.then(function(e){r.intervals=e}).catch(function(e){console.error(e)})}}e.$inject=["api","$mdDialog","$document","toasty","Auth"],angular.module("app.fax").controller("FaxAccountActionsController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="FAX.EDIT_"+(e.appType||e.app).toUpperCase(),o.agent=angular.copy(e),o.agent.appdata)switch(o.agent.appType?o.agent.appType.toLowerCase():o.agent.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.agent.appdata.split(",");o.agent.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.agent.text=s.slice(1,s.length).join(",");break;case"message":o.agent.text=o.agent.appdata;break;case"set":o.agent.name=o.agent.appdata.split("=")[0],o.agent.value=o.agent.appdata.split("=")[1];break;case"agi":o.agent.project=o.agent.appdata;break;default:var r=o.agent.appdata.split(",");o.agent.agent=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.agent.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.agent.timeout=30;function l(e){t.hide(e)}o.agent.type&&"outbound"===o.agent.type.toLowerCase()&&"outbounddial"===o.agent.appType.toLowerCase()&&(o.agent.prefix=o.agent.phone?o.agent.phone.split("$")[0]:void 0,o.agent.callerId=o.agent.callerID?"CALLERID(all)="+o.agent.callerID:void 0),o.saveFaxAccountApp=function(){o.errors=[];var e=[];o.agent.type&&"outbound"===o.agent.type.toLowerCase()&&"outboundDial"===o.agent.appType&&(o.agent.phone=a.cutdigits?(o.agent.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.agent.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.agent.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.agent.options+="U(xcally-mixmonitor-context)"):o.agent.options=o.agent.options.replace("U(xcally-mixmonitor-context)",""));var t=_.find(o.agents,{name:o.agent.agent});t&&(o.agent.UserId=t.id);if(o.agent.appType&&"custom"===o.agent.appType);else switch((o.agent.app||o.agent.appType).toLowerCase()){case"set":o.agent.appdata=o.agent.name+"="+o.agent.value;break;case"custom":break;default:e[0]=o.agent.agent,e[1]=o.agent.timeout,o.agent.appdata=e.join(",")}l(o.agent)},o.closeDialog=l,i.user.get({fields:"id,name",sort:"name",role:"agent",nolimit:"true"}).$promise.then(function(e){o.agents=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETagents",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","faxAccountApp","faxAccount","api"],angular.module("app.fax").controller("EditFaxAccountAppagentDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="FAX.EDIT_"+(n.appType||n.app).toUpperCase(),o.close=angular.copy(n),o.close.appdata)switch(o.close.appType?o.close.appType.toLowerCase():o.close.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.close.appdata.split(",");o.close.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.close.text=s.slice(1,s.length).join(",");break;case"message":o.close.text=o.close.appdata;break;case"set":o.close.name=o.close.appdata.split("=")[0],o.close.value=o.close.appdata.split("=")[1];break;case"agi":o.close.project=o.close.appdata;break;default:var r=o.close.appdata.split(",");o.close.disposition=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.close.type&&"outbound"===o.close.type.toLowerCase()&&"outbounddial"===o.close.appType.toLowerCase()&&(o.close.prefix=o.close.phone?o.close.phone.split("$")[0]:void 0,o.close.callerId=o.close.callerID?"CALLERID(all)="+o.close.callerID:void 0),o.saveFaxAccountApp=function(){o.errors=[];var e=[];o.close.type&&"outbound"===o.close.type.toLowerCase()&&"outboundDial"===o.close.appType&&(o.close.phone=a.cutdigits?(o.close.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.close.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.close.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.close.options+="U(xcally-mixmonitor-context)"):o.close.options=o.close.options.replace("U(xcally-mixmonitor-context)",""));if(o.close.appType&&"custom"===o.close.appType);else switch((o.close.app||o.close.appType).toLowerCase()){case"set":o.close.appdata=o.close.name+"="+o.close.value;break;case"custom":break;default:e[0]=o.close.disposition,o.close.appdata=e.join(",")}l(o.close)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","faxAccountApp","faxAccount","api"],angular.module("app.fax").controller("EditFaxAccountAppcloseDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="FAX.EDIT_"+(n.appType||n.app).toUpperCase(),o.gotoif=angular.copy(n),o.gotoif.appdata)switch(o.gotoif.appType?o.gotoif.appType.toLowerCase():o.gotoif.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.gotoif.appdata.split(",");o.gotoif.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.gotoif.text=s.slice(1,s.length).join(",");break;case"message":o.gotoif.text=o.gotoif.appdata;break;case"set":o.gotoif.name=o.gotoif.appdata.split("=")[0],o.gotoif.value=o.gotoif.appdata.split("=")[1];break;case"agi":o.gotoif.project=o.gotoif.appdata;break;default:var r=o.gotoif.appdata.split(",");o.gotoif.condition=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.gotoif.truepriority=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.gotoif.falsepriority=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10)}function l(e){t.hide(e)}o.gotoif.type&&"outbound"===o.gotoif.type.toLowerCase()&&"outbounddial"===o.gotoif.appType.toLowerCase()&&(o.gotoif.prefix=o.gotoif.phone?o.gotoif.phone.split("$")[0]:void 0,o.gotoif.callerId=o.gotoif.callerID?"CALLERID(all)="+o.gotoif.callerID:void 0),o.saveFaxAccountApp=function(){o.errors=[];var e=[];o.gotoif.type&&"outbound"===o.gotoif.type.toLowerCase()&&"outboundDial"===o.gotoif.appType&&(o.gotoif.phone=a.cutdigits?(o.gotoif.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.gotoif.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.gotoif.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.gotoif.options+="U(xcally-mixmonitor-context)"):o.gotoif.options=o.gotoif.options.replace("U(xcally-mixmonitor-context)",""));if(o.gotoif.appType&&"custom"===o.gotoif.appType);else switch((o.gotoif.app||o.gotoif.appType).toLowerCase()){case"set":o.gotoif.appdata=o.gotoif.name+"="+o.gotoif.value;break;case"custom":break;default:e[0]=o.gotoif.condition,e[1]=o.gotoif.truepriority,e[2]=o.gotoif.falsepriority,o.gotoif.appdata=e.join(",")}l(o.gotoif)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","faxAccountApp","faxAccount","api"],angular.module("app.fax").controller("EditFaxAccountAppgotoifDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="FAX.EDIT_"+(n.appType||n.app).toUpperCase(),o.gotop=angular.copy(n),o.gotop.appdata)switch(o.gotop.appType?o.gotop.appType.toLowerCase():o.gotop.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.gotop.appdata.split(",");o.gotop.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.gotop.text=s.slice(1,s.length).join(",");break;case"message":o.gotop.text=o.gotop.appdata;break;case"set":o.gotop.name=o.gotop.appdata.split("=")[0],o.gotop.value=o.gotop.appdata.split("=")[1];break;case"agi":o.gotop.project=o.gotop.appdata;break;default:var r=o.gotop.appdata.split(",");o.gotop.priority=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.gotop.type&&"outbound"===o.gotop.type.toLowerCase()&&"outbounddial"===o.gotop.appType.toLowerCase()&&(o.gotop.prefix=o.gotop.phone?o.gotop.phone.split("$")[0]:void 0,o.gotop.callerId=o.gotop.callerID?"CALLERID(all)="+o.gotop.callerID:void 0),o.saveFaxAccountApp=function(){o.errors=[];var e=[];o.gotop.type&&"outbound"===o.gotop.type.toLowerCase()&&"outboundDial"===o.gotop.appType&&(o.gotop.phone=a.cutdigits?(o.gotop.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.gotop.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.gotop.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.gotop.options+="U(xcally-mixmonitor-context)"):o.gotop.options=o.gotop.options.replace("U(xcally-mixmonitor-context)",""));if(o.gotop.appType&&"custom"===o.gotop.appType);else switch((o.gotop.app||o.gotop.appType).toLowerCase()){case"set":o.gotop.appdata=o.gotop.name+"="+o.gotop.value;break;case"custom":break;default:e[0]=o.gotop.priority,o.gotop.appdata=e.join(",")}l(o.gotop)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","faxAccountApp","faxAccount","api"],angular.module("app.fax").controller("EditFaxAccountAppgotopDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;if(l.errors=[],l.title="TOOLS.EDIT_INTERVAL",l.interval=angular.copy(i),l.intervals=o,l.newInterval=!1,l.types=["always","custom","list"],l.daysOfWeek=a.getDaysOfWeek(),l.monthNumber=a.getMonthNumber(),l.monthName=a.getMonthName(),l.daysOfMonth=a.getDaysOfMonth(),l.interval)if("*,*,*,*"!==l.interval.interval){l.type="custom";var d=l.interval.interval.split(","),c=d[0],m=d[1],u=d[2],p=d[3];if("*"!==c){var g,v=c.split("-")[0],h=c.split("-")[1];(g=new Date).setHours(Number(v.split(":")[0])),g.setMinutes(Number(v.split(":")[1])),l.timeRangeFrom=g,(g=new Date).setHours(Number(h.split(":")[0])),g.setMinutes(Number(h.split(":")[1])),l.timeRangeTo=g}"*"!==m&&(l.dayOfWeekFrom=m.split("-")[0],l.dayOfWeekTo=m.split("-")[1]),"*"!==u&&(l.monthDayFrom=u.split("-")[0],l.monthDayTo=u.split("-")[1]),"*"!==p&&(l.monthFrom=p.split("-")[0],l.monthTo=p.split("-")[1])}else l.type="always";else l.interval={interval:"*,*,*,*"},l.type="always",l.title="TOOLS.NEW_INTERVAL",l.newInterval=!0;function b(){switch(l.type){case"always":case"list":return"*,*,*,*";case"custom":var e=[];if("*"!==l.timeRangeFrom&&l.timeRangeFrom&&l.timeRangeTo){var t=(l.timeRangeFrom.getHours()<10?"0":"")+l.timeRangeFrom.getHours()+":"+(l.timeRangeFrom.getMinutes()<10?"0":"")+l.timeRangeFrom.getMinutes(),n=(l.timeRangeTo.getHours()<10?"0":"")+l.timeRangeTo.getHours()+":"+(l.timeRangeTo.getMinutes()<10?"0":"")+l.timeRangeTo.getMinutes();e.push(t+"-"+n)}else e.push("*");return l.dayOfWeekFrom?l.dayOfWeekTo?e.push(l.dayOfWeekFrom+"-"+l.dayOfWeekTo):e.push(l.dayOfWeekFrom):e.push("*"),l.monthDayFrom?l.monthDayTo?e.push(l.monthDayFrom+"-"+l.monthDayTo):e.push(l.monthDayFrom):e.push("*"),l.monthFrom?l.monthTo?e.push(l.monthFrom+"-"+l.monthTo):e.push(l.monthFrom):e.push("*"),e.join()}}function f(e){t.hide(e)}e.params.id&&!l.interval.application&&(l.interval.IntervalId=e.params.id),l.interval.IntervalId&&l.interval.application&&(l.type="list"),l.addNewInterval=function(){l.errors=[],l.interval.interval=b(),r.interval.save(l.interval).$promise.then(function(e){l.intervals.push(e),s.success({title:"Interval properly created",msg:l.interval.name?l.interval.name+" has been created!":""}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}]})},l.saveInterval=function(){l.errors=[],l.interval.interval=b(),l.interval.application?("list"!==l.type&&(l.interval.IntervalId=null),f(l.interval)):r.interval.update({id:l.interval.id},l.interval).$promise.then(function(e){var t=_.find(l.intervals,{id:e.id});t&&_.merge(t,e),s.success({title:"Interval properly saved!",msg:"Interval has been saved!"}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}]})},l.closeDialog=f,l.interval.application&&r.interval.get({fields:"id,name,interval,IntervalId",IntervalId:"null",nolimit:!0}).$promise.then(function(e){l.intervals=e}).catch(function(e){console.error(e)})}e.$inject=["$state","$mdDialog","$mdToast","IndexFactory","interval","intervals","toasty","api"],angular.module("app.voice").controller("EditFaxAccountAppintervalDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="FAX.EDIT_"+(n.appType||n.app).toUpperCase(),o.noop=angular.copy(n),o.noop.appdata)switch(o.noop.appType?o.noop.appType.toLowerCase():o.noop.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.noop.appdata.split(",");o.noop.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.noop.text=s.slice(1,s.length).join(",");break;case"message":o.noop.text=o.noop.appdata;break;case"set":o.noop.name=o.noop.appdata.split("=")[0],o.noop.value=o.noop.appdata.split("=")[1];break;case"agi":o.noop.project=o.noop.appdata;break;default:var r=o.noop.appdata.split(",");o.noop.value=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.noop.type&&"outbound"===o.noop.type.toLowerCase()&&"outbounddial"===o.noop.appType.toLowerCase()&&(o.noop.prefix=o.noop.phone?o.noop.phone.split("$")[0]:void 0,o.noop.callerId=o.noop.callerID?"CALLERID(all)="+o.noop.callerID:void 0),o.saveFaxAccountApp=function(){o.errors=[];var e=[];o.noop.type&&"outbound"===o.noop.type.toLowerCase()&&"outboundDial"===o.noop.appType&&(o.noop.phone=a.cutdigits?(o.noop.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.noop.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.noop.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.noop.options+="U(xcally-mixmonitor-context)"):o.noop.options=o.noop.options.replace("U(xcally-mixmonitor-context)",""));if(o.noop.appType&&"custom"===o.noop.appType);else switch((o.noop.app||o.noop.appType).toLowerCase()){case"set":o.noop.appdata=o.noop.name+"="+o.noop.value;break;case"custom":break;default:e[0]=o.noop.value,o.noop.appdata=e.join(",")}l(o.noop)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","faxAccountApp","faxAccount","api"],angular.module("app.fax").controller("EditFaxAccountAppnoopDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="FAX.EDIT_"+(e.appType||e.app).toUpperCase(),o.queue=angular.copy(e),o.queue.appdata)switch(o.queue.appType?o.queue.appType.toLowerCase():o.queue.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.queue.appdata.split(",");o.queue.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.queue.text=s.slice(1,s.length).join(",");break;case"message":o.queue.text=o.queue.appdata;break;case"set":o.queue.name=o.queue.appdata.split("=")[0],o.queue.value=o.queue.appdata.split("=")[1];break;case"agi":o.queue.project=o.queue.appdata;break;default:var r=o.queue.appdata.split(",");o.queue.queue=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.queue.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.queue.queue=300,o.queue.timeout=300;function l(e){t.hide(e)}o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outbounddial"===o.queue.appType.toLowerCase()&&(o.queue.prefix=o.queue.phone?o.queue.phone.split("$")[0]:void 0,o.queue.callerId=o.queue.callerID?"CALLERID(all)="+o.queue.callerID:void 0),o.saveFaxAccountApp=function(){o.errors=[];var e=[];o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outboundDial"===o.queue.appType&&(o.queue.phone=a.cutdigits?(o.queue.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.queue.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.queue.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.queue.options+="U(xcally-mixmonitor-context)"):o.queue.options=o.queue.options.replace("U(xcally-mixmonitor-context)",""));var t=_.find(o.queues,{name:o.queue.queue});t&&(o.queue[_.capitalize("fax")+"QueueId"]=t.id);if(o.queue.appType&&"custom"===o.queue.appType);else switch((o.queue.app||o.queue.appType).toLowerCase()){case"set":o.queue.appdata=o.queue.name+"="+o.queue.value;break;case"custom":break;default:e[0]=o.queue.queue,e[1]=o.queue.timeout,o.queue.appdata=e.join(",")}l(o.queue)},o.closeDialog=l,i.faxQueue.get({fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){o.queues=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","faxAccountApp","faxAccount","api"],angular.module("app.fax").controller("EditFaxAccountAppqueueDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="FAX.EDIT_"+(e.appType||e.app).toUpperCase(),o.system=angular.copy(e),o.system.appdata)switch(o.system.appType?o.system.appType.toLowerCase():o.system.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.system.appdata.split(",");o.system.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.system.text=s.slice(1,s.length).join(",");break;case"message":o.system.text=o.system.appdata;break;case"set":o.system.name=o.system.appdata.split("=")[0],o.system.value=o.system.appdata.split("=")[1];break;case"agi":o.system.project=o.system.appdata;break;default:var r=o.system.appdata.split(",");o.system.command=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.system.variable=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.system.variable="";function l(e){t.hide(e)}o.system.type&&"outbound"===o.system.type.toLowerCase()&&"outbounddial"===o.system.appType.toLowerCase()&&(o.system.prefix=o.system.phone?o.system.phone.split("$")[0]:void 0,o.system.callerId=o.system.callerID?"CALLERID(all)="+o.system.callerID:void 0),o.saveFaxAccountApp=function(){o.errors=[];var e=[];o.system.type&&"outbound"===o.system.type.toLowerCase()&&"outboundDial"===o.system.appType&&(o.system.phone=a.cutdigits?(o.system.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.system.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.system.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.system.options+="U(xcally-mixmonitor-context)"):o.system.options=o.system.options.replace("U(xcally-mixmonitor-context)",""));if(o.system.appType&&"custom"===o.system.appType);else switch((o.system.app||o.system.appType).toLowerCase()){case"set":o.system.appdata=o.system.name+"="+o.system.value;break;case"custom":break;default:e[0]=o.system.command,e[1]=o.system.variable,o.system.appdata=e.join(",")}l(o.system)},o.closeDialog=l,i.variable.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){o.variables=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvariables",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","faxAccountApp","faxAccount","api"],angular.module("app.fax").controller("EditFaxAccountAppsystemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.faxAccount={},c.faxAccountFaxDispositions={count:0,rows:[]},c.selectedFaxAccountFaxDispositions=[],c.query={fields:"createdAt,updatedAt,id,name,createdAt",limit:10,page:1},c.init=function(e){c.faxAccount=e,c.query.id=c.faxAccount.id,c.query.FaxAccountId=c.faxAccount.id,c.getFaxAccountFaxDispositions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the faxDisposition?").htmlContent("<b>"+(e.name||"faxDisposition")+"</b> will be deleted.").ariaLabel("delete faxDisposition").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getFaxAccountFaxDispositions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.faxAccount.getDispositions(c.query,p).$promise},c.createOrEditFaxAccountFaxDisposition=function(e,t){o.show({controller:"CreateOrEditFaxDispositionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxAccounts/edit/faxDispositions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{faxAccount:c.faxAccount,faxDisposition:t,faxDispositions:c.faxAccountFaxDispositions.rows,license:null,setting:null}})},c.exportSelectedFaxAccountFaxDispositions=function(){var e=angular.copy(c.selectedFaxAccountFaxDispositions);return c.selectedFaxAccountFaxDispositions=[],e},c.deleteFaxAccountFaxDisposition=g,c.deleteSelectedFaxAccountFaxDispositions=function(e){var t=o.confirm().title("Are you sure want to delete the selected faxDispositions?").htmlContent("<b>"+c.selectedFaxAccountFaxDispositions.length+" selected</b> will be deleted.").ariaLabel("delete faxDispositions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedFaxAccountFaxDispositions.forEach(function(e){g(e)}),c.selectedFaxAccountFaxDispositions=[]})};var m=!0,u=1;function p(e){c.faxAccountFaxDispositions=e||{count:0,rows:[]}}function g(e){l.faxDisposition.delete({id:e.id}).$promise.then(function(){_.remove(c.faxAccountFaxDispositions.rows,{id:e.id}),c.faxAccountFaxDispositions.count-=1,c.faxAccountFaxDispositions.rows.length||c.getFaxAccountFaxDispositions(),r.success({title:"FaxDisposition deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETfaxAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfaxAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getFaxAccountFaxDispositions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.fax").controller("FaxAccountFaxDispositionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="FAX.EDIT_FAXDISPOSITION",m.faxDisposition=angular.copy(s),m.faxDispositions=o,m.newFaxDisposition=!1,m.faxDisposition||(m.faxDisposition={},m.title="FAX.NEW_FAXDISPOSITION",m.newFaxDisposition=!0),t.params.id&&(m.faxDisposition.FaxAccountId=t.params.id),m.addNewFaxDisposition=function(){m.errors=[],r.faxDisposition.save(m.faxDisposition).$promise.then(function(e){m.faxDispositions.unshift(e.toJSON()),i.success({title:"FaxDisposition properly created",msg:m.faxDisposition.name?m.faxDisposition.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.faxDisposition.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.faxDisposition.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveFaxDisposition=function(){m.errors=[],r.faxDisposition.update({id:m.faxDisposition.id},m.faxDisposition).$promise.then(function(e){var t=_.find(m.faxDispositions,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"FaxDisposition properly saved!",msg:m.faxDisposition.name?m.faxDisposition.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.faxDisposition.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.faxDisposition.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteFaxDisposition=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The faxDisposition will be deleted.").ariaLabel("Delete FaxDisposition").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.faxDisposition.delete({id:m.faxDisposition.id}).$promise.then(function(){_.remove(m.faxDispositions,{id:m.faxDisposition.id}),i.success({title:"FaxDisposition properly deleted!",msg:(m.faxDisposition.name||"faxDisposition")+" has been deleted!"}),u(m.faxDisposition)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.faxDisposition.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.faxDisposition.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","faxDispositions","faxDisposition","api","Auth","license","setting"],angular.module("app.fax").controller("CreateOrEditFaxDispositionDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.faxAccount={},c.faxAccountInteractions={count:0,rows:[]},c.selectedFaxAccountInteractions=[],c.query={fields:"createdAt,updatedAt,id,createdAt,Contact.firstName,Owner.name,closedAt,disposition,note,UserId,ContactId,FaxAccountId,tag",sort:"-createdAt",includeAll:"true",limit:10,page:1},c.init=function(e){c.faxAccount=e,c.query.id=c.faxAccount.id,c.getFaxAccountInteractions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the interaction?").htmlContent("<b>"+(e.name||"interaction")+"</b> will be deleted.").ariaLabel("delete interaction").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getFaxAccountInteractions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.faxAccount.getInteractions(c.query,p).$promise},c.createOrEditFaxAccountInteraction=function(e,t){o.show({controller:"CreateOrEditInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxAccounts/edit/interactions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{faxAccount:c.faxAccount,interaction:t,interactions:c.faxAccountInteractions.rows,license:null,setting:null}})},c.spyfaxInteraction=function(e,n){o.show({controller:"AgentGeneralInteractionController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/agent.general.interaction.dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,onShowing:function(e,t){e.vm.init({id:1,channel:"fax",interaction:n,spy:!0})}})},c.exportSelectedFaxAccountInteractions=function(){var e=angular.copy(c.selectedFaxAccountInteractions);return c.selectedFaxAccountInteractions=[],e},c.deleteFaxAccountInteraction=g,c.deleteSelectedFaxAccountInteractions=function(e){var t=o.confirm().title("Are you sure want to delete the selected interactions?").htmlContent("<b>"+c.selectedFaxAccountInteractions.length+" selected</b> will be deleted.").ariaLabel("delete interactions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedFaxAccountInteractions.forEach(function(e){g(e)}),c.selectedFaxAccountInteractions=[]})};var m=!0,u=1;function p(e){c.faxAccountInteractions=e||{count:0,rows:[]}}function g(e){l.faxInteraction.delete({id:e.id}).$promise.then(function(){_.remove(c.faxAccountInteractions.rows,{id:e.id}),c.faxAccountInteractions.count-=1,c.faxAccountInteractions.rows.length||c.getFaxAccountInteractions(),r.success({title:"Interaction deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETfaxAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfaxAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getFaxAccountInteractions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.fax").controller("FaxAccountInteractionsController",e)}(),function(){"use strict";function e(n,e,t,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=e.protocol()+"://"+e.host(),c.faxAccount=d||n.params.faxAccount||{},c.selectedTab=n.params.tab||0,c.gotogoto=function(e,t){n.go("app.fax.realtime.accounts",{})},c.alert=r.info,c.gotoFaxAccounts=function(){n.go("app.fax.faxAccounts")},c.saveFaxAccount=function(){s.faxAccount.updateAccountApplications(c.faxAccount).$promise.then(function(){r.success({title:"FaxAccount updated!",msg:c.faxAccount.name?c.faxAccount.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfaxAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.trunk.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.trunks=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.lists=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","faxAccount"],angular.module("app.fax").controller("FaxAccountController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.faxAccounts=r||{count:0,rows:[]},v.table="faxAccounts",v.listOrder="",v.listOrderAsc=null,v.selectedFaxAccounts=[],v.query={fields:"createdAt,updatedAt,id,name,key,headerinfo,TrunkId,localstationid,ListId,waitForTheAssignedAgent,description,ecm,minrate,maxrate,modem,gateway,faxdetect,t38timeout,tech,acceptMethod,acceptUrl,rejectMethod,rejectUrl,closeMethod,closeUrl,notificationSound,notificationShake,notificationTemplate",sort:"-updatedAt",limit:10,page:1},v.arrayecm=_.keyBy([{option:"yes",value:"'yes'"},{option:"no",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayminrate=_.keyBy([{option:"2400",value:"'2400'"},{option:"4800",value:"'4800'"},{option:"7200",value:"'7200'"},{option:"9600",value:"'9600'"},{option:"12000",value:"'12000'"},{option:"14400",value:"'14400'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraymaxrate=_.keyBy([{option:"2400",value:"'2400'"},{option:"4800",value:"'4800'"},{option:"7200",value:"'7200'"},{option:"9600",value:"'9600'"},{option:"12000",value:"'12000'"},{option:"14400",value:"'14400'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraytech=_.keyBy([{option:"SIP",value:"'SIP'"},{option:"IAX",value:"'IAX'"},{option:"DADHI",value:"'DADHI'"},{option:"KHOMP",value:"'KHOMP'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayacceptMethod=_.keyBy([{option:"HTTP GET",value:"'GET'"},{option:"HTTP POST",value:"'POST'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayrejectMethod=_.keyBy([{option:"HTTP GET",value:"'GET'"},{option:"HTTP POST",value:"'POST'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraycloseMethod=_.keyBy([{option:"HTTP GET",value:"'GET'"},{option:"HTTP POST",value:"'POST'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.fax.faxAccounts.edit",{id:e.id,faxAccount:e})},v.interactionsgoto=function(e,t){n.go("app.fax.faxAccounts.edit",{id:e.id,tab:5})},v.gotorealtimegoto=function(e,t){n.go("app.fax.realtime.accounts",{})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the faxAccount?").htmlContent("<b>"+(e.name||"faxAccount")+"</b> will be deleted.").ariaLabel("delete faxAccount").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getFaxAccounts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.faxAccount.get(v.query,f).$promise},v.createOrEditFaxAccount=function(e,t){i.show({controller:"CreateOrEditFaxAccountDialogController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxAccounts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{faxAccount:t,faxAccounts:v.faxAccounts.rows,license:v.license,setting:v.setting}})},v.deleteFaxAccount=A,v.exportSelectedFaxAccounts=function(){var e=angular.copy(v.selectedFaxAccounts);return v.selectedFaxAccounts=[],e},v.deleteSelectedFaxAccounts=function(e){var t=i.confirm().title("Are you sure want to delete the selected faxAccounts?").htmlContent("<b>"+v.selectedFaxAccounts.length+" selected</b> will be deleted.").ariaLabel("delete FaxAccounts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedFaxAccounts.forEach(function(e){A(e)}),v.selectedFaxAccounts=[]})},v.deselectFaxAccounts=function(){v.selectedFaxAccounts=[]},v.selectAllFaxAccounts=function(){v.selectedFaxAccounts=v.faxAccounts.rows},l.trunk.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.trunks=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.lists=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.faxAccounts=e||{count:0,rows:[]}}function A(e){l.faxAccount.delete({id:e.id}).$promise.then(function(){_.remove(v.faxAccounts.rows,{id:e.id}),v.faxAccounts.count-=1,v.faxAccounts.rows.length||v.getFaxAccounts(),c.success({title:"FaxAccount deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEfaxAccount"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEfaxAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getFaxAccounts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","faxAccounts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.fax").controller("FaxAccountsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="FAX.EDIT_FAXQUEUE",m.faxQueue=angular.copy(s),m.faxQueues=o,m.newFaxQueue=!1,m.faxQueue||(m.faxQueue={strategy:"beepall",timeout:10},m.title="FAX.NEW_FAXQUEUE",m.newFaxQueue=!0),m.addNewFaxQueue=function(){m.errors=[],r.faxQueue.save(m.faxQueue).$promise.then(function(e){m.faxQueues.unshift(e.toJSON()),i.success({title:"FaxQueue properly created",msg:m.faxQueue.name?m.faxQueue.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.faxQueue.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.faxQueue.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveFaxQueue=function(){m.errors=[],r.faxQueue.update({id:m.faxQueue.id},m.faxQueue).$promise.then(function(e){var t=_.find(m.faxQueues,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"FaxQueue properly saved!",msg:m.faxQueue.name?m.faxQueue.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.faxQueue.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.faxQueue.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteFaxQueue=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The faxQueue will be deleted.").ariaLabel("Delete FaxQueue").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.faxQueue.delete({id:m.faxQueue.id}).$promise.then(function(){_.remove(m.faxQueues,{id:m.faxQueue.id}),i.success({title:"FaxQueue properly deleted!",msg:(m.faxQueue.name||"faxQueue")+" has been deleted!"}),u(m.faxQueue)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.faxQueue.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.faxQueue.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","faxQueues","faxQueue","api","Auth","license","setting"],angular.module("app.fax").controller("CreateOrEditFaxQueueDialogController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r){var l=this;function d(){return a.faxQueue[l.isVoiceRealtime()?"getMembers":"getAgents"]({id:l.faxQueue.id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){return l.isVoiceRealtime()?l.selectedItems=e.rows?_.map(e.rows,function(e){return e.id=e.UserId,e.fullname=e.membername,e.penalty=e.hasOwnProperty("penalty")?"penalty "+e.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[]:l.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserFaxQueue?"penalty "+e.UserFaxQueue.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.selectedItems=l.selectedItems,r.hasRole("admin")?a.user.get({fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise:a.user.getAgents({id:r.getCurrentUser().id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise}).then(function(e){l.items=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserFaxQueue?"penalty "+e.UserFaxQueue.penalty:"",e.internal=e.internal?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.items=_.differenceBy(l.items,l.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETUSERS.GETAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}l.faxQueue=t,l.penalty=0,l.items=[],l.selectedItems=[],l.closeDialog=function(){e.hide()},l.isVoiceRealtime=function(){return o},l.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"penalty",labelAll:s.instant("FAX.ALL_AGENTS"),labelSelected:s.instant("FAX.SELECTED_AGENTS"),transferCallback:function(e,t){a.faxQueue[t?"removeAgents":"addAgents"]({id:l.faxQueue.id,ids:_.map(e,l.isVoiceRealtime()&&t?"UserId":"id"),penalty:l.penalty||0,realtime:o||!1}).$promise.then(function(){n.success({title:"FaxQueue properly "+(t?"removed":"added"),msg:"FaxQueue has been "+(t?"removed":"added")+"!"}),t||d()}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:faxQueue.ADDAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d()}e.$inject=["$mdDialog","toasty","api","faxQueue","faxQueues","realtime","$translate","Auth"],angular.module("app.fax").controller("FaxQueueagentaddController",e)}(),function(){"use strict";function e(e,n,a,t,i){var o=this;o.faxQueue=t,o.penalty=0,o.items=[],o.selectedItems=[],o.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("FAX.ALL_TEAMS"),labelSelected:i.instant("FAX.SELECTED_TEAMS"),transferCallback:function(e,t){a.faxQueue[t?"removeTeams":"addTeams"]({id:o.faxQueue.id,ids:_.map(e,"id"),penalty:o.penalty||0}).$promise.then(function(){n.success({title:"Team properly "+(t?"removed":"added"),msg:"Team has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:faxQueue.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},o.closeDialog=function(){e.hide()},a.faxQueue.getTeams({id:o.faxQueue.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return o.selectedItems=e.rows?e.rows:[],o.dualMultiselectOptions.selectedItems=o.selectedItems,a.team.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){o.items=e.rows?e.rows:[],o.dualMultiselectOptions.items=_.differenceBy(o.items,o.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","faxQueue","$translate"],angular.module("app.fax").controller("FaxQueueteamaddController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.faxQueue=d||e.params.faxQueue||{},c.selectedTab=e.params.tab||0,c.teamadddialog=function(e,t){n.show({controller:"FaxQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxQueues/edit/teamadd/teamadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{faxQueue:e,faxQueues:c.faxQueues?c.faxQueues.rows:[]}})},c.agentadddialog=function(e,t){n.show({controller:"FaxQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxQueues/edit/agentadd/agentadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{faxQueue:e,faxQueues:c.faxQueues?c.faxQueues.rows:[],realtime:!1}})},c.alert=r.info,c.gotoFaxQueues=function(){e.go("app.fax.faxQueues")},c.saveFaxQueue=function(){s.faxQueue.update({id:c.faxQueue.id},c.faxQueue).$promise.then(function(){r.success({title:"FaxQueue updated!",msg:c.faxQueue.name?c.faxQueue.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfaxQueue",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","faxQueue"],angular.module("app.fax").controller("FaxQueueController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.faxQueues=r||{count:0,rows:[]},v.table="faxQueues",v.listOrder="",v.listOrderAsc=null,v.selectedFaxQueues=[],v.query={fields:"createdAt,updatedAt,id,name,strategy,timeout,description",sort:"-updatedAt",limit:10,page:1},v.arraystrategy=_.keyBy([{option:"Beepall",value:"'beepall'"},{option:"RR Memory",value:"'rrmemory'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.fax.faxQueues.edit",{id:e.id,faxQueue:e})},v.teamadddialog=function(e,t){i.show({controller:"FaxQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxQueues/edit/teamadd/teamadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{faxQueue:e,faxQueues:v.faxQueues?v.faxQueues.rows:[]}})},v.agentadddialog=function(e,t){i.show({controller:"FaxQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxQueues/edit/agentadd/agentadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{faxQueue:e,faxQueues:v.faxQueues?v.faxQueues.rows:[],realtime:!1}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the faxQueue?").htmlContent("<b>"+(e.name||"faxQueue")+"</b> will be deleted.").ariaLabel("delete faxQueue").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.gotorealtimegoto=function(e,t){n.go("app.fax.realtime.queues",{})},v.success=f,v.getFaxQueues=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.faxQueue.get(v.query,f).$promise},v.createOrEditFaxQueue=function(e,t){i.show({controller:"CreateOrEditFaxQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxQueues/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{faxQueue:t,faxQueues:v.faxQueues.rows,license:v.license,setting:v.setting}})},v.deleteFaxQueue=A,v.exportSelectedFaxQueues=function(){var e=angular.copy(v.selectedFaxQueues);return v.selectedFaxQueues=[],e},v.deleteSelectedFaxQueues=function(e){var t=i.confirm().title("Are you sure want to delete the selected faxQueues?").htmlContent("<b>"+v.selectedFaxQueues.length+" selected</b> will be deleted.").ariaLabel("delete FaxQueues").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedFaxQueues.forEach(function(e){A(e)}),v.selectedFaxQueues=[]})},v.deselectFaxQueues=function(){v.selectedFaxQueues=[]},v.selectAllFaxQueues=function(){v.selectedFaxQueues=v.faxQueues.rows};var h=!0,b=1;function f(e){v.faxQueues=e||{count:0,rows:[]}}function A(e){l.faxQueue.delete({id:e.id}).$promise.then(function(){_.remove(v.faxQueues.rows,{id:e.id}),v.faxQueues.count-=1,v.faxQueues.rows.length||v.getFaxQueues(),c.success({title:"FaxQueue deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEfaxQueue"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEfaxQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getFaxQueues())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","faxQueues","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.fax").controller("FaxQueuesController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d){var c=this;function m(){_.forIn(c.faxAccounts,function(e,t){c.rpcFaxAccounts[t]&&_.merge(e,c.rpcFaxAccounts[t])}),_.forIn(c.faxAccounts,function(t,e){var n={id:e,sort:"-id",direction:"in",limit:1,offset:0,$gte:"createdAt,"+moment().startOf("day").format("YYYY-MM-DD HH:mm:ss")};o.faxAccount.getMessages(n).$promise.then(function(e){return e&&(t.in=e.count||0,t.lastIn=e.rows&&e.rows.length?e.rows[0].createdAt:void 0),n.direction="out",o.faxAccount.getMessages(n).$promise}).then(function(e){e&&(t.out=e.count||0,t.lastOut=e.rows&&e.rows.length?e.rows[0].createdAt:void 0)}).catch(function(e){console.log(e)})})}c.count=l&&l.count?l.count:0,c.faxAccounts=l?_.keyBy(l.rows?l.rows:[],"id"):{},c.rpcFaxAccounts=d?_.keyBy(d.rows?d.rows:[],"id"):{},c.query={sort:"-name",limit:10,page:1},c.success=g,c.$onInit=m,c.getFaxAccounts=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=o.faxAccount.get(c.query,g).$promise},c.onSave=function(e){c.faxAccounts[e.id]&&_.merge(c.faxAccounts[e.id],e)},c.onFaxMessageSave=function(e){c.faxAccounts[e.FaxAccountId]&&("in"==e.direction?(c.faxAccounts[e.FaxAccountId].in+=1,c.faxAccounts[e.FaxAccountId].lastIn=e.createdAt):(c.faxAccounts[e.FaxAccountId].out+=1,c.faxAccounts[e.FaxAccountId].lastOut=e.createdAt))},c.goToFaxAccount=function(e,t){i.go("app.fax.faxAccounts.edit",{id:t.id,faxAccount:t})},c.order=[],_.forIn(c.faxAccounts,function(e,t){c.order.push(e.id)}),s.on("faxAccount:save",c.onSave),s.on("faxAccount:update",c.onSave),s.on("faxMessage:save",c.onFaxMessageSave);var u=!0,p=1;function g(e){if(c.faxAccounts=e?_.keyBy(e.rows?e.rows:[],"id"):{},e.rows){c.order=[];for(var t=0;t<e.rows.length;t++)c.order.push(e.rows[t].id)}m()}e.$watch("vm.query.filter",function(e,t){u?n(function(){u=!1}):(t||(p=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=p),c.getFaxAccounts())}),e.$on("$destroy",function(){s.removeAllListeners("faxAccount:save"),s.removeAllListeners("faxAccount:update"),s.removeAllListeners("faxMessage:save")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$state","api","socket","toasty","faxAccounts","rpcFaxAccounts"],angular.module("app.fax").controller("FaxAccountsRealtimeController",e)}(),function(){"use strict";function e(e,s,t,n,a,i,o,r,l,d,c,m,u,p,g,v){var h=this,b=["userpic","online","lastLoginAt","lastPauseAt","pauseType","lastPauseAt","internal","address","chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","chatCapacity","openchannelCapacity","mailCapacity","smsCapacity","faxCapacity","chatCurrentCapacity","openchannelCurrentCapacity","mailCurrentCapacity","smsCurrentCapacity","faxCurrentCapacity","chatStatus","openchannelStatus","mailStatus","smsStatus","faxStatus","voiceStatus","chatStatusTime","openchannelStatusTime","mailStatusTime","smsStatusTime","faxStatusTime","voiceStatusTime","queue","destconnectedlinenum"],f=["chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","online"];for(var A in h.availableStates=["ringing","inuse","busy","onhold","not_inuse"],h.pauses=o||{count:0,rows:[]},h.license=g,h.agents=r?_.keyBy(r.rows?r.rows:[],"id"):{},h.rpcAgents=l?_.keyBy(l.rows?l.rows:[],"id"):{},h.paginatedAgents={},h.load=!1,h.order=[],h.agentInternal={},h.agents)h.agents.hasOwnProperty(A)&&(h.agents[A].init=!0);h.query={limit:10,page:1,order:"fullname",globalStatusFilter:"",pauseTypeFilter:""},h.logout=function(e,t){return d.user.logout({id:e.id}).$promise.then(function(){m.success({title:"Agent logout",msg:e.fullname+"  properly logout"}),h.agents[e.id]&&(h.agents[e.id].online=!1),h.rpcAgents[e.id]&&(h.rpcAgents[e.id].online=!1),y()}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.queueAdd=function(e,t){n.show({controller:"AgentqueueaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/queueadd/queueadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{agent:e,agents:[],channel:"fax",realtime:!0,direction:"inbound"}})},h.pause=function(t,e){return d.user.pause({id:t.id,type:e}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.unPause=function(t){return d.user.unpause({id:t.id}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.showInfo=function(e){n.show(n.alert().clickOutsideToClose(!0).title("Legend").htmlContent("<div>TODO legend status + state</div>").ok("Ok").targetEvent(e))},h.getAgentStatus=C,h.getAgentGlobalStatus=x,h.isPause=S,h.checkPause=function(e){return"pause"===e},h.isPartialPause=function(e){return"*pause"===e},h.onSave=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(_.omit(e,f),b)),_.merge(h.rpcAgents[e.id],_.pick(_.omit(e,f),b)),x(h.agents[e.id]))},h.onUpdate=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(e,b)),_.merge(h.rpcAgents[e.id],_.pick(e,b)),x(h.agents[e.id]))},h.onInit=y,h.onConnect=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(_.merge(h.agents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])),_.merge(h.rpcAgents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])))},h.onComplete=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(h.agents[h.agentInternal[e.destaccountcode]]=_.omit(h.agents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]),h.rpcAgents[h.agentInternal[e.destaccountcode]]=_.omit(h.rpcAgents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]))},c.on("user:save",h.onSave),c.on("user:update",h.onUpdate),c.on("user:agentconnect",h.onConnect),c.on("user:agentcomplete",h.onComplete),y();var E=v(function(){h.load&&(h.load=!1,y())},999);function y(e){h.load=!1;var t,n,a=s.defer();h.promise=a.promise,h.filteredAgents=[],h.order=[],_.forIn(h.agents,function(e,t){h.rpcAgents[t]&&_.merge(e,_.pick(_.omit(h.rpcAgents[t],f),b)),x(e),e.online?(h.filteredAgents.push(e),h.agentInternal[e.internal]=t):e.globalStatusTime=_.toNumber(moment().format("x"))}),h.query.globalStatusFilter&&_.remove(h.filteredAgents,function(e){return e.globalStatus!==h.query.globalStatusFilter}),h.query.pauseTypeFilter&&_.remove(h.filteredAgents,function(e){return e.pauseType!==h.query.pauseTypeFilter}),h.query.filter&&_.remove(h.filteredAgents,function(e){return e.fullname.toLowerCase().indexOf(h.query.filter.toLowerCase())<0}),h.filteredAgents=(t=h.filteredAgents,n=_.startsWith(h.query.order,"-")?"desc":"asc",_.orderBy(t,[h.query.order.replace("-","")],[n]));var i=(h.query.page-1)*h.query.limit;h.paginatedAgents=_.drop(h.filteredAgents,i).slice(0,h.query.limit);for(var o=0;o<h.paginatedAgents.length;o+=1)h.order.push(h.paginatedAgents[o].id);a.resolve(),h.load=!0}function S(e){return"pause"===e||"*pause"===e}function T(e){return"idle"===e||"unknown"===e||"unavailable"===e||"ringing"===e||_.isNil(e)}function C(e,t){return"voice"===t?"idle"!==e[t+"Status"]?e[t+"Status"]:e[t+"Pause"]?e[t+"Status"]="pause":"idle":e[t+"Pause"]?e[t+"Status"]="pause":e[t+"Status"]}function x(e){var t="unknown";t=_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"pause":_.some([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"*pause":_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],T)?"idle":"busy",e.globalStatus!==t&&(e.globalStatus=t,e.init?(e.init=!1,e.globalStatusTime=S(t)?_.toNumber(moment(e.lastPauseAt).format("x")):_.max([e.voiceStatusTime,e.chatStatusTime,e.mailStatusTime,e.smsStatusTime,e.openchannelStatusTime,e.faxStatusTime])):e.globalStatusTime=_.toNumber(moment().format("x")))}e.$on("$destroy",function(){c.removeAllListeners("user:save"),c.removeAllListeners("user:update"),c.removeAllListeners("user:agentconnect"),c.removeAllListeners("user:agentcomplete"),E&&(v.cancel(E),E=null)})}e.$inject=["$scope","$q","$timeout","$mdDialog","$document","$filter","pauses","agents","rpcAgents","api","socket","toasty","helperClasses","Auth","license","$interval"],angular.module("app.voice").controller("AgentsFaxRealtimeController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r,l,d,c,m){var u=this,p=["loggedIn","available","waiting","talking","pTalking","originated","message","dialActive","dialMethod","Trunk","paused"];function g(){var n=[];return _.forIn(u.queues,function(e,t){e.paused=0,e.loggedInDb=0,u.queues[t].agents={},n.push(l.faxQueue.getMembers({id:t}).$promise),u.rpcQueues[t]&&_.merge(e,_.pick(u.rpcQueues[t],p))}),t.all(n).then(function(e){for(var t=0;t<e.length;t+=1)for(var n=0;n<e[t].rows.length;n++)e[t].rows[n].paused&&u.queues[e[t].rows[n].FaxQueueId].paused++,u.queues[e[t].rows[n].FaxQueueId].loggedInDb++,u.queues[e[t].rows[n].FaxQueueId].agents[e[t].rows[n].UserId]=e[t].rows[n].FaxQueueId}).catch(function(e){console.error(e)})}u.count=s.count?s.count:0,u.queues=s?_.keyBy(s.rows?s.rows:[],"id"):{},u.rpcQueues=r?_.keyBy(r.rows?r.rows:[],"id"):{},m.hasRole("admin")?u.query={type:"inbound",sort:"-updatedAt",limit:10,page:1}:u.query={id:m.getCurrentUser().id,channel:"fax",type:"inbound",sort:"-updatedAt",limit:10,page:1},u.success=b,u.getQueues=function(){u.query.offset=(u.query.page-1)*u.query.limit,m.hasRole("admin")?u.promise=l.faxQueue.get(u.query,b).$promise:u.promise=l.user.getQueues(u.query,b).$promise},u.createOrEditFaxQueue=function(e,t){a.show({controller:"CreateOrEditFaxQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxQueues/create/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{faxQueue:t,faxQueues:_.values(u.queues),license:null,setting:null}})},u.agentAdd=function(e,t){a.show({controller:"FaxQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxQueues/edit/agentadd/agentadd.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{faxQueue:t,faxQueues:u.queues?u.queues.rows:[],realtime:!1}})},u.updateQueue=function(e){return l.faxQueue.update(e).$promise.then(function(){c.success({title:"Queue properly updated!",msg:e.name?e.name+" has been updated!":""})}).catch(function(e){c.error({title:"Error creating queue!",msg:e.message})})},u.onSave=function(e){u.queues[e.id]&&_.merge(u.queues[e.id],_.pick(e,p))},u.onSaveMember=function(e){u.queues[e.FaxQueueId]&&u.queues[e.FaxQueueId].loggedInDb++},u.onRemoveMember=function(e){u.queues[e.FaxQueueId]&&u.queues[e.FaxQueueId].loggedInDb--},u.onPause=function(n){console.log("onPause",n),n.voicePause?_.forIn(u.queues,function(e,t){e.agents[n.id]&&(e.paused+=1,console.log("pause"))}):n.voicePause||_.forIn(u.queues,function(e,t){e.agents[n.id]&&0<e.paused&&(e.paused-=1,console.log("unpause"))})},u.onLogin=function(e){console.log("onLogged",e),u.queues[e.FaxQueueId]&&(u.queues[e.FaxQueueId].loggedInDb+=1,u.queues[e.FaxQueueId].agents[e.UserId]=e.FaxQueueId)},u.onLogout=function(e){console.log("onLogout",e),u.queues[e.FaxQueueId]&&0<u.queues[e.FaxQueueId].loggedInDb&&(u.queues[e.FaxQueueId].loggedInDb-=1,delete u.queues[e.FaxQueueId].agents[e.UserId])},u.$onInit=g,u.order=[],_.forIn(u.queues,function(e,t){u.order.push(e.id)}),d.on("fax_queue:save",u.onSave),d.on("userFaxQueue:save",u.onSaveMember),d.on("userFaxQueue:remove",u.onRemoveMember),d.on("user:update",u.onPause),d.on("userVoiceQueue:remove",u.onLogout),d.on("userVoiceQueue:save",u.onLogin);var v=!0,h=1;function b(e){if(u.count=e.count,u.queues=e?_.keyBy(e.rows?e.rows:[],"id"):{},e.rows){u.order=[];for(var t=0;t<e.rows.length;t++)u.order.push(e.rows[t].id)}g()}e.$watch("vm.query.filter",function(e,t){v?n(function(){v=!1}):(t||(h=u.query.page),e!==t&&(u.query.page=1),e||(u.query.page=h),u.getQueues())}),e.$on("$destroy",function(){d.removeAllListeners("fax_queue:save"),d.removeAllListeners("userFaxQueue:remove"),d.removeAllListeners("userFaxQueue:save"),d.removeAllListeners("user:update"),d.removeAllListeners("userVoiceQueue:remove"),d.removeAllListeners("userVoiceQueue:save")})}e.$inject=["$scope","$timeout","$mdDialog","$q","$document","$interval","queues","rpcQueues","api","socket","toasty","Auth"],angular.module("app.fax").controller("QueuesFaxRealtimeController",e)}(),function(){"use strict";angular.module("app.auth").factory("helperClasses",function(){return{status:{registered:"green-300-fg icon-checkbox-marked-circle",unregistered:"red-300-fg icon-close-circle",lagged:"red-300-fg icon-close-circle",reachable:"green-300-fg icon-checkbox-marked-circle",unreachable:"red-300-fg icon-close-circle",unknown:"grey-fg icon-minus-circle"},state:{unknown:"grey-fg icon-phone-hangup",not_inuse:"green-300-fg icon-phone-hangup",inuse:"red-300-fg icon-phone-in-talk",busy:"red-300-fg icon-phone-locked",invalid:"grey-fg icon-phone-hangup",unavailable:"grey-fg icon-phone-hangup",ringing:"blue-300-fg icon-phone-incoming",ringinuse:"blue-300-fg icon-phone-incoming",onhold:"blue-300-fg icon-phone-paused"},channelStatus:{ring:"blue-300-fg icon-phone-incoming",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"},channelStatusOut:{ring:"blue-300-fg icon-phone-outgoing",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"}}})}(),function(){"use strict";function e(e,n,t){switch(t.disconnect(),t.connect(),this.selectedTab=0,n.current.name){case"app.fax.realtime.agents":this.selectedTab=0;break;case"app.fax.realtime.trunks":this.selectedTab=1;break;case"app.fax.realtime.queues":this.selectedTab=2;break;case"app.fax.realtime.accounts":this.selectedTab=3;break;default:this.selectedTab=0,n.go("app.fax.realtime.agents")}e.$watch("vm.selectedTab",function(e,t){if(e!==t)switch(e){case 0:n.go("app.fax.realtime.agents");break;case 1:n.go("app.fax.realtime.trunks");break;case 2:n.go("app.fax.realtime.queues");break;case 3:n.go("app.fax.realtime.accounts");break;default:n.go("app.fax.realtime.agents")}})}e.$inject=["$scope","$state","socket"],angular.module("app.fax").controller("FaxRealtimeController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l){var d=this,c=["status","stateRegistry","registry","host","port","internal","state","status"];function m(){for(var e,t=0;t<d.trunks.length;t+=1)0<=(e=_.findIndex(d.rpcTrunks,["id",d.trunks[t].id]))&&_.merge(d.trunks[t],_.pick(d.rpcTrunks[e],c))}function u(e,t,n){0<=t&&_.merge(e[t],_.pick(n,c))}d.count=a.count,d.trunks=a?a.rows:[],d.rpcTrunks=i&&i.rows?i.rows:[],d.query={fields:"id,name",active:!0,sort:"-updatedAt",limit:10,page:1},d.statusClass=r.status,d.stateClass=r.state,d.success=v,d.$onInit=m,d.showInfo=function(e){t.show(t.alert().clickOutsideToClose(!0).title("Legend").htmlContent("<div>TODO legend status + state</div>").ok("Ok").targetEvent(e))},d.getTrunks=function(){d.query.offset=(d.query.page-1)*d.query.limit,d.promise=o.trunk.get(d.query,v).$promise},d.goToTrunk=function(e,t){l.go("app.tools.trunks.edit",{id:t.id})},d.onSave=function(e){var t=_.findIndex(d.trunks,["id",e.id]),n=_.findIndex(d.rpcTrunks,["id",e.id]);u(d.trunks,t,e),u(d.rpcTrunks,n,e)},s.on("trunk:save",d.onSave);var p=!0,g=1;function v(e){d.count=e.count,d.trunks=e&&e.rows?e.rows:[],m()}e.$watch("vm.query.filter",function(e,t){p?n(function(){p=!1}):(t||(g=d.query.page),e!==t&&(d.query.page=1),e||(d.query.page=g),d.getTrunks())}),e.$on("$destroy",function(){s.removeAllListeners("trunk:save")})}e.$inject=["$scope","$timeout","$mdDialog","trunks","rpcTrunks","api","socket","helperClasses","$state"],angular.module("app.fax").controller("TrunksFaxRealtimeController",e)}(),function(){"use strict";function e(e,t){this.info=e,this.license=t}e.$inject=["info","license"],angular.module("app.help.about").controller("AboutController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_DESKACCOUNT",m.deskAccount=angular.copy(s),m.deskAccounts=o,m.newDeskAccount=!1,m.deskAccount||(m.deskAccount={type:"integrationTab",authType:"basic",serverUrl:n.protocol()+"://"+n.host()+(n.port()?":"+n.port():"")},m.title="INTEGRATIONS.NEW_DESKACCOUNT",m.newDeskAccount=!0),m.addNewDeskAccount=function(){m.errors=[],r.intDeskAccount.save(m.deskAccount).$promise.then(function(e){m.deskAccounts.unshift(e.toJSON()),i.success({title:"DeskAccount properly created",msg:m.deskAccount.name?m.deskAccount.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intDeskAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intDeskAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveDeskAccount=function(){m.errors=[],r.intDeskAccount.update({id:m.deskAccount.id},m.deskAccount).$promise.then(function(e){var t=_.find(m.deskAccounts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"DeskAccount properly saved!",msg:m.deskAccount.name?m.deskAccount.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intDeskAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intDeskAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteDeskAccount=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The deskAccount will be deleted.").ariaLabel("Delete DeskAccount").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intDeskAccount.delete({id:m.deskAccount.id}).$promise.then(function(){_.remove(m.deskAccounts,{id:m.deskAccount.id}),i.success({title:"DeskAccount properly deleted!",msg:(m.deskAccount.name||"deskAccount")+" has been deleted!"}),u(m.deskAccount)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intDeskAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intDeskAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","deskAccounts","deskAccount","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditDeskAccountDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.deskAccounts=r||{count:0,rows:[]},v.table="deskAccounts",v.listOrder="",v.listOrderAsc=null,v.selectedDeskAccounts=[],v.query={fields:"createdAt,updatedAt,id,name,type,remoteUri,authType,username,password,serverUrl,description",limit:10,page:1},v.arraytype=_.keyBy([{option:"Integration_Tab",value:"'integrationTab'"},{option:"New_Tab",value:"'newTab'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayauthType=_.keyBy([{option:"Basic",value:"'basic'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.integrations.deskAccounts.edit",{id:e.id,deskAccount:e})},v.testtestintegrationaccount=function(e,t){return l.intDeskAccount.getFields({id:e.id,test:!0}).$promise.then(function(){c.success({title:"DeskAccount properly tested",msg:"Connection succeded!"})}).catch(function(e){c.error({title:"DeskAccount properly tested",msg:e.data?e.data.message?e.data.message:JSON.stringify(e.data):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the deskAccount?").htmlContent("<b>"+(e.name||"deskAccount")+"</b> will be deleted.").ariaLabel("delete deskAccount").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getDeskAccounts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.intDeskAccount.get(v.query,f).$promise},v.createOrEditDeskAccount=function(e,t){i.show({controller:"CreateOrEditDeskAccountDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/deskAccounts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{deskAccount:t,deskAccounts:v.deskAccounts.rows,license:v.license,setting:v.setting}})},v.deleteDeskAccount=A,v.exportSelectedDeskAccounts=function(){var e=angular.copy(v.selectedDeskAccounts);return v.selectedDeskAccounts=[],e},v.deleteSelectedDeskAccounts=function(e){var t=i.confirm().title("Are you sure want to delete the selected deskAccounts?").htmlContent("<b>"+v.selectedDeskAccounts.length+" selected</b> will be deleted.").ariaLabel("delete DeskAccounts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedDeskAccounts.forEach(function(e){A(e)}),v.selectedDeskAccounts=[]})},v.deselectDeskAccounts=function(){v.selectedDeskAccounts=[]},v.selectAllDeskAccounts=function(){v.selectedDeskAccounts=v.deskAccounts.rows};var h=!0,b=1;function f(e){v.deskAccounts=e||{count:0,rows:[]}}function A(e){l.intDeskAccount.delete({id:e.id}).$promise.then(function(){_.remove(v.deskAccounts.rows,{id:e.id}),v.deskAccounts.count-=1,v.deskAccounts.rows.length||v.getDeskAccounts(),c.success({title:"DeskAccount deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEintDeskAccount"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEintDeskAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getDeskAccounts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","deskAccounts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.integrations").controller("DeskAccountsController",e)}(),function(){"use strict";function e(a,n,i,o,e){var s=this;function r(e){i.intDeskField.delete({id:e.id}).$promise.then(function(){_.remove(s.subjects,{id:e.id}),o.success({title:"Subject deleted!",msg:"Subject has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function l(e){i.intDeskField.delete({id:e.id}).$promise.then(function(){_.remove(s.descriptions,{id:e.id}),o.success({title:"Description deleted!",msg:"Description has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function d(e){i.intDeskField.delete({id:e.id}).$promise.then(function(){_.remove(s.fields,{id:e.id}),o.success({title:"Field deleted!",msg:"Field has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}s.currentUser=e.getCurrentUser(),s.deskAccount={},s.deskConfiguration={},s.configurations=[],s.selectedDeskConfiguration=-1,s.init=function(e){s.deskAccount=e,i.intDeskAccount.getConfigurations({id:s.deskAccount.id,sort:"-updatedAt"}).$promise.then(function(e){return s.configurations=e.rows?e.rows:[],s.configurations.length&&s.getDeskConfiguration(0),i.variable.get({nolimit:!0,sort:"name"}).$promise}).then(function(e){s.variables=e.rows?e.rows:[],s.variablesById=_.keyBy(s.variables,"id")}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETCONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.getDeskConfiguration=function(e){s.deskConfiguration=s.configurations[e],s.selectedDeskConfiguration=e,i.intDeskConfiguration.getSubjects({id:s.deskConfiguration.id}).$promise.then(function(e){return s.subjects=e.rows?e.rows:[],i.intDeskConfiguration.getDescriptions({id:s.deskConfiguration.id}).$promise}).then(function(e){return s.descriptions=e.rows?e.rows:[],i.intDeskConfiguration.getFields({id:s.deskConfiguration.id}).$promise}).then(function(e){s.fields=e.rows?e.rows:[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),i.intDeskConfiguration.getTags({id:s.deskConfiguration.id}).$promise.then(function(e){s.selectedTags=e.rows?_.map(e.rows,"id"):[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.createOrEditDeskConfiguration=function(e,t){a.show({controller:"CreateOrEditDeskConfigurationDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/deskAccounts/edit/configurations/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{deskConfiguration:t,configurations:s.configurations,license:null,setting:null}}).finally(function(){s.getDeskConfiguration(0)})},s.deleteDeskConfiguration=function(e,t){var n=a.confirm().title("Are you sure want to delete the deskConfiguration?").htmlContent("<b>"+(t.name||"deskConfiguration")+"</b> will be deleted.").ariaLabel("delete deskConfiguration").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){i.intDeskConfiguration.delete({id:t.id}).$promise.then(function(){_.remove(s.configurations,{id:t.id}),o.success({title:"DeskConfiguration deleted!",msg:t.name?t.name+" has been deleted!":""})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})}).finally(function(){s.getDeskConfiguration(0)})},function(){console.log("CANCEL")})},s.selectChangedAdvanced=function(){return i.intSalesforceConfiguration.update({id:s.deskConfiguration.id},s.deskConfiguration).$promise.then(function(){o.success({title:"Module updated!",msg:"Module has been updated!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.selectedTags=[],s.selectTagsChanged=function(e){i.intDeskConfiguration.setTags({id:s.deskConfiguration.id,ids:s.selectedTags}).$promise.then(function(){o.success({title:"Tags set!",msg:"Tags has been set!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:ADDTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})})},i.tag.get({nolimit:!0,sort:"name"}).$promise.then(function(e){s.tags=e.rows?e.rows:[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.selectedSubjects=[],s.createOrEditSubject=function(e,t){a.show({controller:"CreateOrEditDeskAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/deskAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"subject",item:t,items:s.subjects,configuration:s.deskConfiguration,account:s.deskAccount,license:null,setting:null}})},s.deleteSubjectConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the subject?").htmlContent("<b>Subject</b> will be deleted.").ariaLabel("delete subject").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){r(t)},function(){console.log("CANCEL")})},s.deleteSelectedSubjects=function(e){var t=a.confirm().title("Are you sure want to delete the selected subjects?").htmlContent("<b>"+s.selectedSubjects.length+" selected</b> will be deleted.").ariaLabel("delete subjects").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedSubjects.forEach(function(e){r(e)}),s.selectedSubjects=[]})},s.selectedDescriptions=[],s.createOrEditDescription=function(e,t){a.show({controller:"CreateOrEditDeskAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/deskAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"description",item:t,items:s.descriptions,configuration:s.deskConfiguration,account:s.deskAccount,license:null,setting:null}})},s.deleteDescriptionConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the description?").htmlContent("<b>Description</b> will be deleted.").ariaLabel("delete description").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){l(t)},function(){console.log("CANCEL")})},s.deleteSelectedDescriptions=function(e){var t=a.confirm().title("Are you sure want to delete the selected descriptions?").htmlContent("<b>"+s.selectedDescriptions.length+" selected</b> will be deleted.").ariaLabel("delete descriptions").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedDescriptions.forEach(function(e){l(e)}),s.selectedDescriptions=[]})},s.selectedFields=[],s.createOrEditField=function(e,t){a.show({controller:"CreateOrEditDeskAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/deskAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"field",item:t,items:s.fields,configuration:s.deskConfiguration,account:s.deskAccount,license:null,setting:null}})},s.deleteFieldConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the field?").htmlContent("<b>Field</b> will be deleted.").ariaLabel("delete field").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){d(t)},function(){console.log("CANCEL")})},s.deleteSelectedFields=function(e){var t=a.confirm().title("Are you sure want to delete the selected fields?").htmlContent("<b>"+s.selectedFields.length+" selected</b> will be deleted.").ariaLabel("delete fields").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedFields.forEach(function(e){d(e)}),s.selectedFields=[]})}}e.$inject=["$mdDialog","$document","api","toasty","Auth"],angular.module("app.integrations").controller("DeskAccountConfigurationsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_DESKCONFIGURATION",m.deskConfiguration=angular.copy(s),m.configurations=o,m.newDeskConfiguration=!1,m.deskConfiguration||(m.deskConfiguration={channel:"voice",type:"inbound"},m.title="INTEGRATIONS.NEW_DESKCONFIGURATION",m.newDeskConfiguration=!0),m.addNewDeskConfiguration=function(){m.errors=[],r.intDeskAccount.addConfiguration({id:t.params.id},m.deskConfiguration).$promise.then(function(e){m.configurations.unshift(e.toJSON()),i.success({title:"DeskConfiguration properly created",msg:m.deskConfiguration.name?m.deskConfiguration.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intDeskConfiguration.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intDeskConfiguration.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveDeskConfiguration=function(){m.errors=[],r.intDeskConfiguration.update({id:m.deskConfiguration.id},m.deskConfiguration).$promise.then(function(e){var t=_.find(m.configurations,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"DeskConfiguration properly saved!",msg:m.deskConfiguration.name?m.deskConfiguration.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intDeskConfiguration.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intDeskConfiguration.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteDeskConfiguration=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The deskConfiguration will be deleted.").ariaLabel("Delete DeskConfiguration").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intDeskConfiguration.delete({id:m.deskConfiguration.id}).$promise.then(function(){_.remove(m.configurations,{id:m.deskConfiguration.id}),i.success({title:"DeskConfiguration properly deleted!",msg:(m.deskConfiguration.name||"deskConfiguration")+" has been deleted!"}),u(m.deskConfiguration)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intDeskConfiguration.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intDeskConfiguration.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configurations","deskConfiguration","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditDeskConfigurationDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(){a.hide()}m.errors=[],m.title="INTEGRATIONS.EDIT_"+_.toUpper(d),m.item=angular.copy(r),m.items=s,m.type=d,m.newItem=!1,m.item||(m.item={type:"string"},m.item[_.capitalize(d)+"Id"]=o.id,m.title="INTEGRATIONS.NEW_"+_.toUpper(d),m.newItem=!0),m.addNewItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intDeskField.save(m.item).$promise.then(function(e){m.items.unshift(e),i.success({title:_.capitalize(d)+" properly created",msg:_.capitalize(d)+" has been created!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.save"}]})},m.saveItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intDeskField.update({id:m.item.id},m.item).$promise.then(function(e){var t=_.find(m.items,{id:e.id});t&&_.merge(t,e),i.success({title:_.capitalize(d)+" properly saved!",msg:_.capitalize(d)+" has been saved!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.intItem.update"}]})},m.deleteItem=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The "+d+" will be deleted.").ariaLabel("Delete "+_.capitalize(d)).ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){c.intDeskField.delete({id:m.item.id}).$promise.then(function(){_.remove(m.items,{id:m.item.id}),i.success({title:_.capitalize(d)+" properly deleted!",msg:_.capitalize(d)+" has been deleted!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.delete"}]})},function(){})},m.getSelectedVariable=function(){return void 0!==m.item.variableName?m.item.variableName:"Please select a variable"},m.closeDialog=u,c.variable.get({nolimit:!0}).$promise.then(function(e){return m.variables=e.rows?e.rows:[],c.voiceAgentReport.describe().$promise}).then(function(e){return m.voiceAgentReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceAgentReportColumns.push("recordingURL"),c.voiceDialReport.describe().$promise}).then(function(e){m.voiceDialReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceDialReportColumns.push("recordingURL")}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETVARIABLES",msg:e.data?JSON.stringify(e.data):e.toString()})}),c.intDeskAccount.getFields({id:l.id}).$promise.then(function(e){m.accountConnected=!0,m.fields=e.rows?e.rows:[],m.item.idField&&(m.customField=_.find(m.fields,{id:m.item.idField}))}).catch(function(e){m.accountConnected=!1,console.error(e)})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configuration","items","item","account","type","api"],angular.module("app.integrations").controller("CreateOrEditDeskAccountItemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.deskAccount=d||e.params.deskAccount||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoDeskAccounts=function(){e.go("app.integrations.deskAccounts")},c.saveDeskAccount=function(){s.intDeskAccount.update({id:c.deskAccount.id},c.deskAccount).$promise.then(function(){r.success({title:"DeskAccount updated!",msg:c.deskAccount.name?c.deskAccount.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETintDeskAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","deskAccount"],angular.module("app.integrations").controller("DeskAccountController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_FRESHDESKACCOUNT",m.freshdeskAccount=angular.copy(s),m.freshdeskAccounts=o,m.newFreshdeskAccount=!1,m.freshdeskAccount||(m.freshdeskAccount={serverUrl:n.protocol()+"://"+n.host()+(n.port()?":"+n.port():"")},m.title="INTEGRATIONS.NEW_FRESHDESKACCOUNT",m.newFreshdeskAccount=!0),m.addNewFreshdeskAccount=function(){m.errors=[],r.intFreshdeskAccount.save(m.freshdeskAccount).$promise.then(function(e){m.freshdeskAccounts.unshift(e.toJSON()),i.success({title:"FreshdeskAccount properly created",msg:m.freshdeskAccount.name?m.freshdeskAccount.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intFreshdeskAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intFreshdeskAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveFreshdeskAccount=function(){m.errors=[],r.intFreshdeskAccount.update({id:m.freshdeskAccount.id},m.freshdeskAccount).$promise.then(function(e){var t=_.find(m.freshdeskAccounts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"FreshdeskAccount properly saved!",msg:m.freshdeskAccount.name?m.freshdeskAccount.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intFreshdeskAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intFreshdeskAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteFreshdeskAccount=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The freshdeskAccount will be deleted.").ariaLabel("Delete FreshdeskAccount").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intFreshdeskAccount.delete({id:m.freshdeskAccount.id}).$promise.then(function(){_.remove(m.freshdeskAccounts,{id:m.freshdeskAccount.id}),i.success({title:"FreshdeskAccount properly deleted!",msg:(m.freshdeskAccount.name||"freshdeskAccount")+" has been deleted!"}),u(m.freshdeskAccount)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intFreshdeskAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intFreshdeskAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","freshdeskAccounts","freshdeskAccount","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditFreshdeskAccountDialogController",e)}(),function(){"use strict";function e(a,n,i,o,e){var s=this;function r(e){i.intFreshdeskField.delete({id:e.id}).$promise.then(function(){_.remove(s.subjects,{id:e.id}),o.success({title:"Subject deleted!",msg:"Subject has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function l(e){i.intFreshdeskField.delete({id:e.id}).$promise.then(function(){_.remove(s.descriptions,{id:e.id}),o.success({title:"Description deleted!",msg:"Description has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function d(e){i.intFreshdeskField.delete({id:e.id}).$promise.then(function(){_.remove(s.fields,{id:e.id}),o.success({title:"Field deleted!",msg:"Field has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}s.currentUser=e.getCurrentUser(),s.freshdeskAccount={},s.freshdeskConfiguration={},s.configurations=[],s.selectedFreshdeskConfiguration=-1,s.init=function(e){s.freshdeskAccount=e,i.intFreshdeskAccount.getConfigurations({id:s.freshdeskAccount.id,sort:"-updatedAt"}).$promise.then(function(e){return s.configurations=e.rows?e.rows:[],s.configurations.length&&s.getFreshdeskConfiguration(0),i.variable.get({nolimit:!0,sort:"name"}).$promise}).then(function(e){s.variables=e.rows?e.rows:[],s.variablesById=_.keyBy(s.variables,"id")}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETCONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.getFreshdeskConfiguration=function(e){s.freshdeskConfiguration=s.configurations[e],s.selectedFreshdeskConfiguration=e,i.intFreshdeskConfiguration.getSubjects({id:s.freshdeskConfiguration.id}).$promise.then(function(e){return s.subjects=e.rows?e.rows:[],i.intFreshdeskConfiguration.getDescriptions({id:s.freshdeskConfiguration.id}).$promise}).then(function(e){return s.descriptions=e.rows?e.rows:[],i.intFreshdeskConfiguration.getFields({id:s.freshdeskConfiguration.id}).$promise}).then(function(e){s.fields=e.rows?e.rows:[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),i.intFreshdeskConfiguration.getTags({id:s.freshdeskConfiguration.id}).$promise.then(function(e){s.selectedTags=e.rows?_.map(e.rows,"id"):[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.createOrEditFreshdeskConfiguration=function(e,t){a.show({controller:"CreateOrEditFreshdeskConfigurationDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/freshdeskAccounts/edit/configurations/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{freshdeskConfiguration:t,configurations:s.configurations,license:null,setting:null}}).finally(function(){s.getFreshdeskConfiguration(0)})},s.deleteFreshdeskConfiguration=function(e,t){var n=a.confirm().title("Are you sure want to delete the freshdeskConfiguration?").htmlContent("<b>"+(t.name||"freshdeskConfiguration")+"</b> will be deleted.").ariaLabel("delete freshdeskConfiguration").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){i.intFreshdeskConfiguration.delete({id:t.id}).$promise.then(function(){_.remove(s.configurations,{id:t.id}),o.success({title:"FreshdeskConfiguration deleted!",msg:t.name?t.name+" has been deleted!":""})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})}).finally(function(){s.getFreshdeskConfiguration(0)})},function(){console.log("CANCEL")})},s.selectChangedAdvanced=function(){return i.intSalesforceConfiguration.update({id:s.freshdeskConfiguration.id},s.freshdeskConfiguration).$promise.then(function(){o.success({title:"Module updated!",msg:"Module has been updated!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.selectedTags=[],s.selectTagsChanged=function(e){i.intFreshdeskConfiguration.setTags({id:s.freshdeskConfiguration.id,ids:s.selectedTags}).$promise.then(function(){o.success({title:"Tags set!",msg:"Tags has been set!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:ADDTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})})},i.tag.get({nolimit:!0,sort:"name"}).$promise.then(function(e){s.tags=e.rows?e.rows:[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.selectedSubjects=[],s.createOrEditSubject=function(e,t){a.show({controller:"CreateOrEditFreshdeskAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/freshdeskAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"subject",item:t,items:s.subjects,configuration:s.freshdeskConfiguration,account:s.freshdeskAccount,license:null,setting:null}})},s.deleteSubjectConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the subject?").htmlContent("<b>Subject</b> will be deleted.").ariaLabel("delete subject").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){r(t)},function(){console.log("CANCEL")})},s.deleteSelectedSubjects=function(e){var t=a.confirm().title("Are you sure want to delete the selected subjects?").htmlContent("<b>"+s.selectedSubjects.length+" selected</b> will be deleted.").ariaLabel("delete subjects").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedSubjects.forEach(function(e){r(e)}),s.selectedSubjects=[]})},s.selectedDescriptions=[],s.createOrEditDescription=function(e,t){a.show({controller:"CreateOrEditFreshdeskAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/freshdeskAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"description",item:t,items:s.descriptions,configuration:s.freshdeskConfiguration,account:s.freshdeskAccount,license:null,setting:null}})},s.deleteDescriptionConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the description?").htmlContent("<b>Description</b> will be deleted.").ariaLabel("delete description").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){l(t)},function(){console.log("CANCEL")})},s.deleteSelectedDescriptions=function(e){var t=a.confirm().title("Are you sure want to delete the selected descriptions?").htmlContent("<b>"+s.selectedDescriptions.length+" selected</b> will be deleted.").ariaLabel("delete descriptions").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedDescriptions.forEach(function(e){l(e)}),s.selectedDescriptions=[]})},s.selectedFields=[],s.createOrEditField=function(e,t){a.show({controller:"CreateOrEditFreshdeskAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/freshdeskAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"field",item:t,items:s.fields,configuration:s.freshdeskConfiguration,account:s.freshdeskAccount,license:null,setting:null}})},s.deleteFieldConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the field?").htmlContent("<b>Field</b> will be deleted.").ariaLabel("delete field").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){d(t)},function(){console.log("CANCEL")})},s.deleteSelectedFields=function(e){var t=a.confirm().title("Are you sure want to delete the selected fields?").htmlContent("<b>"+s.selectedFields.length+" selected</b> will be deleted.").ariaLabel("delete fields").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedFields.forEach(function(e){d(e)}),s.selectedFields=[]})}}e.$inject=["$mdDialog","$document","api","toasty","Auth"],angular.module("app.integrations").controller("FreshdeskAccountConfigurationsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_FRESHDESKCONFIGURATION",m.freshdeskConfiguration=angular.copy(s),m.configurations=o,m.newFreshdeskConfiguration=!1,m.freshdeskConfiguration||(m.freshdeskConfiguration={channel:"voice",type:"inbound"},m.title="INTEGRATIONS.NEW_FRESHDESKCONFIGURATION",m.newFreshdeskConfiguration=!0),m.addNewFreshdeskConfiguration=function(){m.errors=[],r.intFreshdeskAccount.addConfiguration({id:t.params.id},m.freshdeskConfiguration).$promise.then(function(e){m.configurations.unshift(e.toJSON()),i.success({title:"FreshdeskConfiguration properly created",msg:m.freshdeskConfiguration.name?m.freshdeskConfiguration.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intFreshdeskConfiguration.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intFreshdeskConfiguration.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveFreshdeskConfiguration=function(){m.errors=[],r.intFreshdeskConfiguration.update({id:m.freshdeskConfiguration.id},m.freshdeskConfiguration).$promise.then(function(e){var t=_.find(m.configurations,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"FreshdeskConfiguration properly saved!",msg:m.freshdeskConfiguration.name?m.freshdeskConfiguration.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intFreshdeskConfiguration.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intFreshdeskConfiguration.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteFreshdeskConfiguration=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The freshdeskConfiguration will be deleted.").ariaLabel("Delete FreshdeskConfiguration").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intFreshdeskConfiguration.delete({id:m.freshdeskConfiguration.id}).$promise.then(function(){_.remove(m.configurations,{id:m.freshdeskConfiguration.id}),i.success({title:"FreshdeskConfiguration properly deleted!",msg:(m.freshdeskConfiguration.name||"freshdeskConfiguration")+" has been deleted!"}),u(m.freshdeskConfiguration)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intFreshdeskConfiguration.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intFreshdeskConfiguration.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configurations","freshdeskConfiguration","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditFreshdeskConfigurationDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(){a.hide()}m.errors=[],m.title="INTEGRATIONS.EDIT_"+_.toUpper(d),m.item=angular.copy(r),m.items=s,m.type=d,m.newItem=!1,m.item||(m.item={type:"string"},m.item[_.capitalize(d)+"Id"]=o.id,m.title="INTEGRATIONS.NEW_"+_.toUpper(d),m.newItem=!0),m.addNewItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intFreshdeskField.save(m.item).$promise.then(function(e){m.items.unshift(e),i.success({title:_.capitalize(d)+" properly created",msg:_.capitalize(d)+" has been created!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.save"}]})},m.saveItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intFreshdeskField.update({id:m.item.id},m.item).$promise.then(function(e){var t=_.find(m.items,{id:e.id});t&&_.merge(t,e),i.success({title:_.capitalize(d)+" properly saved!",msg:_.capitalize(d)+" has been saved!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.intItem.update"}]})},m.deleteItem=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The "+d+" will be deleted.").ariaLabel("Delete "+_.capitalize(d)).ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){c.intFreshdeskField.delete({id:m.item.id}).$promise.then(function(){_.remove(m.items,{id:m.item.id}),i.success({title:_.capitalize(d)+" properly deleted!",msg:_.capitalize(d)+" has been deleted!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.delete"}]})},function(){})},m.getSelectedVariable=function(){return void 0!==m.item.variableName?m.item.variableName:"Please select a variable"},m.closeDialog=u,c.variable.get({nolimit:!0}).$promise.then(function(e){return m.variables=e.rows?e.rows:[],c.voiceAgentReport.describe().$promise}).then(function(e){return m.voiceAgentReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceAgentReportColumns.push("recordingURL"),c.voiceDialReport.describe().$promise}).then(function(e){m.voiceDialReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceDialReportColumns.push("recordingURL")}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETVARIABLES",msg:e.data?JSON.stringify(e.data):e.toString()})}),c.intFreshdeskAccount.getFields({id:l.id}).$promise.then(function(e){m.accountConnected=!0,m.fields=e.rows?e.rows:[],m.item.idField&&(m.customField=_.find(m.fields,{id:m.item.idField}))}).catch(function(e){m.accountConnected=!1,console.error(e)})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configuration","items","item","account","type","api"],angular.module("app.integrations").controller("CreateOrEditFreshdeskAccountItemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.freshdeskAccount=d||e.params.freshdeskAccount||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoFreshdeskAccounts=function(){e.go("app.integrations.freshdeskAccounts")},c.saveFreshdeskAccount=function(){s.intFreshdeskAccount.update({id:c.freshdeskAccount.id},c.freshdeskAccount).$promise.then(function(){r.success({title:"FreshdeskAccount updated!",msg:c.freshdeskAccount.name?c.freshdeskAccount.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETintFreshdeskAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","freshdeskAccount"],angular.module("app.integrations").controller("FreshdeskAccountController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.freshdeskAccounts=r||{count:0,rows:[]},v.table="freshdeskAccounts",v.listOrder="",v.listOrderAsc=null,v.selectedFreshdeskAccounts=[],v.query={fields:"createdAt,updatedAt,id,name,username,remoteUri,apiKey,serverUrl,description",limit:10,page:1},v.editstate=function(e,t){n.go("app.integrations.freshdeskAccounts.edit",{id:e.id,freshdeskAccount:e})},v.testtestintegrationaccount=function(e,t){return l.intFreshdeskAccount.getFields({id:e.id,test:!0}).$promise.then(function(){c.success({title:"FreshdeskAccount properly tested",msg:"Connection succeded!"})}).catch(function(e){c.error({title:"FreshdeskAccount properly tested",msg:e.data?e.data.message?e.data.message:JSON.stringify(e.data):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the freshdeskAccount?").htmlContent("<b>"+(e.name||"freshdeskAccount")+"</b> will be deleted.").ariaLabel("delete freshdeskAccount").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getFreshdeskAccounts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.intFreshdeskAccount.get(v.query,f).$promise},v.createOrEditFreshdeskAccount=function(e,t){i.show({controller:"CreateOrEditFreshdeskAccountDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/freshdeskAccounts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{freshdeskAccount:t,freshdeskAccounts:v.freshdeskAccounts.rows,license:v.license,setting:v.setting}})},v.deleteFreshdeskAccount=A,v.exportSelectedFreshdeskAccounts=function(){var e=angular.copy(v.selectedFreshdeskAccounts);return v.selectedFreshdeskAccounts=[],e},v.deleteSelectedFreshdeskAccounts=function(e){var t=i.confirm().title("Are you sure want to delete the selected freshdeskAccounts?").htmlContent("<b>"+v.selectedFreshdeskAccounts.length+" selected</b> will be deleted.").ariaLabel("delete FreshdeskAccounts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedFreshdeskAccounts.forEach(function(e){A(e)}),v.selectedFreshdeskAccounts=[]})},v.deselectFreshdeskAccounts=function(){v.selectedFreshdeskAccounts=[]},v.selectAllFreshdeskAccounts=function(){v.selectedFreshdeskAccounts=v.freshdeskAccounts.rows};var h=!0,b=1;function f(e){v.freshdeskAccounts=e||{count:0,rows:[]}}function A(e){l.intFreshdeskAccount.delete({id:e.id}).$promise.then(function(){_.remove(v.freshdeskAccounts.rows,{id:e.id}),v.freshdeskAccounts.count-=1,v.freshdeskAccounts.rows.length||v.getFreshdeskAccounts(),c.success({title:"FreshdeskAccount deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEintFreshdeskAccount"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEintFreshdeskAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getFreshdeskAccounts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","freshdeskAccounts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.integrations").controller("FreshdeskAccountsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_SALESFORCEACCOUNT",m.salesforceAccount=angular.copy(s),m.salesforceAccounts=o,m.newSalesforceAccount=!1,m.salesforceAccount||(m.salesforceAccount={type:"integrationTab",serverUrl:n.protocol()+"://"+n.host()+(n.port()?":"+n.port():"")},m.title="INTEGRATIONS.NEW_SALESFORCEACCOUNT",m.newSalesforceAccount=!0),m.addNewSalesforceAccount=function(){m.errors=[],r.intSalesforceAccount.save(m.salesforceAccount).$promise.then(function(e){m.salesforceAccounts.unshift(e.toJSON()),i.success({title:"SalesforceAccount properly created",msg:m.salesforceAccount.name?m.salesforceAccount.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSalesforceAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSalesforceAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSalesforceAccount=function(){m.errors=[],r.intSalesforceAccount.update({id:m.salesforceAccount.id},m.salesforceAccount).$promise.then(function(e){var t=_.find(m.salesforceAccounts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"SalesforceAccount properly saved!",msg:m.salesforceAccount.name?m.salesforceAccount.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSalesforceAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSalesforceAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSalesforceAccount=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The salesforceAccount will be deleted.").ariaLabel("Delete SalesforceAccount").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intSalesforceAccount.delete({id:m.salesforceAccount.id}).$promise.then(function(){_.remove(m.salesforceAccounts,{id:m.salesforceAccount.id}),i.success({title:"SalesforceAccount properly deleted!",msg:(m.salesforceAccount.name||"salesforceAccount")+" has been deleted!"}),u(m.salesforceAccount)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSalesforceAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSalesforceAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","salesforceAccounts","salesforceAccount","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditSalesforceAccountDialogController",e)}(),function(){"use strict";function e(a,n,i,o,e){var s=this;function r(e){i.intSalesforceField.delete({id:e.id}).$promise.then(function(){_.remove(s.subjects,{id:e.id}),o.success({title:"Subject deleted!",msg:"Subject has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function l(e){i.intSalesforceField.delete({id:e.id}).$promise.then(function(){_.remove(s.descriptions,{id:e.id}),o.success({title:"Description deleted!",msg:"Description has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function d(e){i.intSalesforceField.delete({id:e.id}).$promise.then(function(){_.remove(s.fields,{id:e.id}),o.success({title:"Field deleted!",msg:"Field has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}s.currentUser=e.getCurrentUser(),s.salesforceAccount={},s.salesforceConfiguration={},s.configurations=[],s.selectedSalesforceConfiguration=-1,s.init=function(e){s.salesforceAccount=e,i.intSalesforceAccount.getConfigurations({id:s.salesforceAccount.id,sort:"-updatedAt"}).$promise.then(function(e){return s.configurations=e.rows?e.rows:[],s.configurations.length&&s.getSalesforceConfiguration(0),i.variable.get({nolimit:!0,sort:"name"}).$promise}).then(function(e){s.variables=e.rows?e.rows:[],s.variablesById=_.keyBy(s.variables,"id")}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETCONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.getSalesforceConfiguration=function(e){s.salesforceConfiguration=s.configurations[e],s.selectedSalesforceConfiguration=e,i.intSalesforceConfiguration.getSubjects({id:s.salesforceConfiguration.id}).$promise.then(function(e){return s.subjects=e.rows?e.rows:[],i.intSalesforceConfiguration.getDescriptions({id:s.salesforceConfiguration.id}).$promise}).then(function(e){return s.descriptions=e.rows?e.rows:[],i.intSalesforceConfiguration.getFields({id:s.salesforceConfiguration.id}).$promise}).then(function(e){s.fields=e.rows?e.rows:[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.createOrEditSalesforceConfiguration=function(e,t){a.show({controller:"CreateOrEditSalesforceConfigurationDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/salesforceAccounts/edit/configurations/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{salesforceConfiguration:t,configurations:s.configurations,license:null,setting:null}}).finally(function(){s.getSalesforceConfiguration(0)})},s.deleteSalesforceConfiguration=function(e,t){var n=a.confirm().title("Are you sure want to delete the salesforceConfiguration?").htmlContent("<b>"+(t.name||"salesforceConfiguration")+"</b> will be deleted.").ariaLabel("delete salesforceConfiguration").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){i.intSalesforceConfiguration.delete({id:t.id}).$promise.then(function(){_.remove(s.configurations,{id:t.id}),o.success({title:"SalesforceConfiguration deleted!",msg:t.name?t.name+" has been deleted!":""})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})}).finally(function(){s.getSalesforceConfiguration(0)})},function(){console.log("CANCEL")})},s.selectChangedAdvanced=function(){return i.intSalesforceConfiguration.update({id:s.salesforceConfiguration.id},s.salesforceConfiguration).$promise.then(function(){o.success({title:"Module updated!",msg:"Module has been updated!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.selectedSubjects=[],s.createOrEditSubject=function(e,t){a.show({controller:"CreateOrEditSalesforceAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/salesforceAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"subject",item:t,items:s.subjects,configuration:s.salesforceConfiguration,account:s.salesforceAccount,license:null,setting:null}})},s.deleteSubjectConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the subject?").htmlContent("<b>Subject</b> will be deleted.").ariaLabel("delete subject").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){r(t)},function(){console.log("CANCEL")})},s.deleteSelectedSubjects=function(e){var t=a.confirm().title("Are you sure want to delete the selected subjects?").htmlContent("<b>"+s.selectedSubjects.length+" selected</b> will be deleted.").ariaLabel("delete subjects").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedSubjects.forEach(function(e){r(e)}),s.selectedSubjects=[]})},s.selectedDescriptions=[],s.createOrEditDescription=function(e,t){a.show({controller:"CreateOrEditSalesforceAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/salesforceAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"description",item:t,items:s.descriptions,configuration:s.salesforceConfiguration,account:s.salesforceAccount,license:null,setting:null}})},s.deleteDescriptionConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the description?").htmlContent("<b>Description</b> will be deleted.").ariaLabel("delete description").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){l(t)},function(){console.log("CANCEL")})},s.deleteSelectedDescriptions=function(e){var t=a.confirm().title("Are you sure want to delete the selected descriptions?").htmlContent("<b>"+s.selectedDescriptions.length+" selected</b> will be deleted.").ariaLabel("delete descriptions").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedDescriptions.forEach(function(e){l(e)}),s.selectedDescriptions=[]})},s.selectedFields=[],s.createOrEditField=function(e,t){a.show({controller:"CreateOrEditSalesforceAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/salesforceAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"field",item:t,items:s.fields,configuration:s.salesforceConfiguration,account:s.salesforceAccount,license:null,setting:null}})},s.deleteFieldConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the field?").htmlContent("<b>Field</b> will be deleted.").ariaLabel("delete field").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){d(t)},function(){console.log("CANCEL")})},s.deleteSelectedFields=function(e){var t=a.confirm().title("Are you sure want to delete the selected fields?").htmlContent("<b>"+s.selectedFields.length+" selected</b> will be deleted.").ariaLabel("delete fields").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedFields.forEach(function(e){d(e)}),s.selectedFields=[]})}}e.$inject=["$mdDialog","$document","api","toasty","Auth"],angular.module("app.integrations").controller("SalesforceAccountConfigurationsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_SALESFORCECONFIGURATION",m.salesforceConfiguration=angular.copy(s),m.configurations=o,m.newSalesforceConfiguration=!1,m.salesforceConfiguration||(m.salesforceConfiguration={channel:"voice",type:"inbound"},m.title="INTEGRATIONS.NEW_SALESFORCECONFIGURATION",m.newSalesforceConfiguration=!0),m.addNewSalesforceConfiguration=function(){m.errors=[],r.intSalesforceAccount.addConfiguration({id:t.params.id},m.salesforceConfiguration).$promise.then(function(e){m.configurations.unshift(e.toJSON()),i.success({title:"SalesforceConfiguration properly created",msg:m.salesforceConfiguration.name?m.salesforceConfiguration.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSalesforceConfiguration.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSalesforceConfiguration.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSalesforceConfiguration=function(){m.errors=[],r.intSalesforceConfiguration.update({id:m.salesforceConfiguration.id},m.salesforceConfiguration).$promise.then(function(e){var t=_.find(m.configurations,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"SalesforceConfiguration properly saved!",msg:m.salesforceConfiguration.name?m.salesforceConfiguration.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSalesforceConfiguration.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSalesforceConfiguration.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSalesforceConfiguration=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The salesforceConfiguration will be deleted.").ariaLabel("Delete SalesforceConfiguration").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intSalesforceConfiguration.delete({id:m.salesforceConfiguration.id}).$promise.then(function(){_.remove(m.configurations,{id:m.salesforceConfiguration.id}),i.success({title:"SalesforceConfiguration properly deleted!",msg:(m.salesforceConfiguration.name||"salesforceConfiguration")+" has been deleted!"}),u(m.salesforceConfiguration)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSalesforceConfiguration.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSalesforceConfiguration.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configurations","salesforceConfiguration","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditSalesforceConfigurationDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(){a.hide()}m.errors=[],m.title="INTEGRATIONS.EDIT_"+_.toUpper(d),m.item=angular.copy(r),m.items=s,m.type=d,m.newItem=!1,m.item||(m.item={type:"string"},m.item[_.capitalize(d)+"Id"]=o.id,m.title="INTEGRATIONS.NEW_"+_.toUpper(d),m.newItem=!0),m.addNewItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intSalesforceField.save(m.item).$promise.then(function(e){m.items.unshift(e),i.success({title:_.capitalize(d)+" properly created",msg:_.capitalize(d)+" has been created!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.save"}]})},m.saveItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intSalesforceField.update({id:m.item.id},m.item).$promise.then(function(e){var t=_.find(m.items,{id:e.id});t&&_.merge(t,e),i.success({title:_.capitalize(d)+" properly saved!",msg:_.capitalize(d)+" has been saved!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.intItem.update"}]})},m.deleteItem=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The "+d+" will be deleted.").ariaLabel("Delete "+_.capitalize(d)).ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){c.intSalesforceField.delete({id:m.item.id}).$promise.then(function(){_.remove(m.items,{id:m.item.id}),i.success({title:_.capitalize(d)+" properly deleted!",msg:_.capitalize(d)+" has been deleted!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.delete"}]})},function(){})},m.getSelectedVariable=function(){return void 0!==m.item.variableName?m.item.variableName:"Please select a variable"},m.closeDialog=u,c.variable.get({nolimit:!0}).$promise.then(function(e){return m.variables=e.rows?e.rows:[],c.voiceAgentReport.describe().$promise}).then(function(e){return m.voiceAgentReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceAgentReportColumns.push("recordingURL"),c.voiceDialReport.describe().$promise}).then(function(e){m.voiceDialReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceDialReportColumns.push("recordingURL")}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETVARIABLES",msg:e.data?JSON.stringify(e.data):e.toString()})}),c.intSalesforceAccount.getFields({id:l.id}).$promise.then(function(e){m.accountConnected=!0,m.fields=e.rows?e.rows:[],m.item.idField&&(m.customField=_.find(m.fields,{id:m.item.idField}))}).catch(function(e){m.accountConnected=!1,console.error(e)})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configuration","items","item","account","type","api"],angular.module("app.integrations").controller("CreateOrEditSalesforceAccountItemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.salesforceAccount=d||e.params.salesforceAccount||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoSalesforceAccounts=function(){e.go("app.integrations.salesforceAccounts")},c.saveSalesforceAccount=function(){s.intSalesforceAccount.update({id:c.salesforceAccount.id},c.salesforceAccount).$promise.then(function(){r.success({title:"SalesforceAccount updated!",msg:c.salesforceAccount.name?c.salesforceAccount.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETintSalesforceAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","salesforceAccount"],angular.module("app.integrations").controller("SalesforceAccountController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.salesforceAccounts=r||{count:0,rows:[]},v.table="salesforceAccounts",v.listOrder="",v.listOrderAsc=null,v.selectedSalesforceAccounts=[],v.query={fields:"createdAt,updatedAt,id,name,type,username,remoteUri,password,clientId,clientSecret,securityToken,serverUrl,description",limit:10,page:1},v.arraytype=_.keyBy([{option:"Integration_Tab",value:"'integrationTab'"},{option:"New_Tab",value:"'newTab'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.integrations.salesforceAccounts.edit",{id:e.id,salesforceAccount:e})},v.testtestintegrationaccount=function(e,t){return l.intSalesforceAccount.getFields({id:e.id,test:!0}).$promise.then(function(){c.success({title:"SalesforceAccount properly tested",msg:"Connection succeded!"})}).catch(function(e){c.error({title:"SalesforceAccount properly tested",msg:e.data?e.data.message?e.data.message:JSON.stringify(e.data):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the salesforceAccount?").htmlContent("<b>"+(e.name||"salesforceAccount")+"</b> will be deleted.").ariaLabel("delete salesforceAccount").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getSalesforceAccounts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.intSalesforceAccount.get(v.query,f).$promise},v.createOrEditSalesforceAccount=function(e,t){i.show({controller:"CreateOrEditSalesforceAccountDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/salesforceAccounts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{salesforceAccount:t,salesforceAccounts:v.salesforceAccounts.rows,license:v.license,setting:v.setting}})},v.deleteSalesforceAccount=A,v.exportSelectedSalesforceAccounts=function(){var e=angular.copy(v.selectedSalesforceAccounts);return v.selectedSalesforceAccounts=[],e},v.deleteSelectedSalesforceAccounts=function(e){var t=i.confirm().title("Are you sure want to delete the selected salesforceAccounts?").htmlContent("<b>"+v.selectedSalesforceAccounts.length+" selected</b> will be deleted.").ariaLabel("delete SalesforceAccounts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedSalesforceAccounts.forEach(function(e){A(e)}),v.selectedSalesforceAccounts=[]})},v.deselectSalesforceAccounts=function(){v.selectedSalesforceAccounts=[]},v.selectAllSalesforceAccounts=function(){v.selectedSalesforceAccounts=v.salesforceAccounts.rows};var h=!0,b=1;function f(e){v.salesforceAccounts=e||{count:0,rows:[]}}function A(e){l.intSalesforceAccount.delete({id:e.id}).$promise.then(function(){_.remove(v.salesforceAccounts.rows,{id:e.id}),v.salesforceAccounts.count-=1,v.salesforceAccounts.rows.length||v.getSalesforceAccounts(),c.success({title:"SalesforceAccount deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEintSalesforceAccount"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEintSalesforceAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getSalesforceAccounts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","salesforceAccounts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.integrations").controller("SalesforceAccountsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_SUGARCRMACCOUNT",m.sugarcrmAccount=angular.copy(s),m.sugarcrmAccounts=o,m.newSugarcrmAccount=!1,m.sugarcrmAccount||(m.sugarcrmAccount={serverUrl:n.protocol()+"://"+n.host()+(n.port()?":"+n.port():"")},m.title="INTEGRATIONS.NEW_SUGARCRMACCOUNT",m.newSugarcrmAccount=!0),m.addNewSugarcrmAccount=function(){m.errors=[],r.intSugarcrmAccount.save(m.sugarcrmAccount).$promise.then(function(e){m.sugarcrmAccounts.unshift(e.toJSON()),i.success({title:"SugarcrmAccount properly created",msg:m.sugarcrmAccount.name?m.sugarcrmAccount.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSugarcrmAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSugarcrmAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSugarcrmAccount=function(){m.errors=[],r.intSugarcrmAccount.update({id:m.sugarcrmAccount.id},m.sugarcrmAccount).$promise.then(function(e){var t=_.find(m.sugarcrmAccounts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"SugarcrmAccount properly saved!",msg:m.sugarcrmAccount.name?m.sugarcrmAccount.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSugarcrmAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSugarcrmAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSugarcrmAccount=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The sugarcrmAccount will be deleted.").ariaLabel("Delete SugarcrmAccount").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intSugarcrmAccount.delete({id:m.sugarcrmAccount.id}).$promise.then(function(){_.remove(m.sugarcrmAccounts,{id:m.sugarcrmAccount.id}),i.success({title:"SugarcrmAccount properly deleted!",msg:(m.sugarcrmAccount.name||"sugarcrmAccount")+" has been deleted!"}),u(m.sugarcrmAccount)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSugarcrmAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSugarcrmAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","sugarcrmAccounts","sugarcrmAccount","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditSugarcrmAccountDialogController",e)}(),function(){"use strict";function e(a,n,i,o,e){var s=this;function r(e){i.intSugarcrmField.delete({id:e.id}).$promise.then(function(){_.remove(s.subjects,{id:e.id}),o.success({title:"Subject deleted!",msg:"Subject has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function l(e){i.intSugarcrmField.delete({id:e.id}).$promise.then(function(){_.remove(s.descriptions,{id:e.id}),o.success({title:"Description deleted!",msg:"Description has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function d(e){i.intSugarcrmField.delete({id:e.id}).$promise.then(function(){_.remove(s.fields,{id:e.id}),o.success({title:"Field deleted!",msg:"Field has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}s.currentUser=e.getCurrentUser(),s.sugarcrmAccount={},s.sugarcrmConfiguration={},s.configurations=[],s.selectedSugarcrmConfiguration=-1,s.init=function(e){s.sugarcrmAccount=e,i.intSugarcrmAccount.getConfigurations({id:s.sugarcrmAccount.id,sort:"-updatedAt"}).$promise.then(function(e){return s.configurations=e.rows?e.rows:[],s.configurations.length&&s.getSugarcrmConfiguration(0),i.variable.get({nolimit:!0,sort:"name"}).$promise}).then(function(e){s.variables=e.rows?e.rows:[],s.variablesById=_.keyBy(s.variables,"id")}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETCONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.getSugarcrmConfiguration=function(e){s.sugarcrmConfiguration=s.configurations[e],s.selectedSugarcrmConfiguration=e,i.intSugarcrmConfiguration.getSubjects({id:s.sugarcrmConfiguration.id}).$promise.then(function(e){return s.subjects=e.rows?e.rows:[],i.intSugarcrmConfiguration.getDescriptions({id:s.sugarcrmConfiguration.id}).$promise}).then(function(e){return s.descriptions=e.rows?e.rows:[],i.intSugarcrmConfiguration.getFields({id:s.sugarcrmConfiguration.id}).$promise}).then(function(e){s.fields=e.rows?e.rows:[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.createOrEditSugarcrmConfiguration=function(e,t){a.show({controller:"CreateOrEditSugarcrmConfigurationDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/sugarcrmAccounts/edit/configurations/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{sugarcrmConfiguration:t,configurations:s.configurations,license:null,setting:null}}).finally(function(){s.getSugarcrmConfiguration(0)})},s.deleteSugarcrmConfiguration=function(e,t){var n=a.confirm().title("Are you sure want to delete the sugarcrmConfiguration?").htmlContent("<b>"+(t.name||"sugarcrmConfiguration")+"</b> will be deleted.").ariaLabel("delete sugarcrmConfiguration").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){i.intSugarcrmConfiguration.delete({id:t.id}).$promise.then(function(){_.remove(s.configurations,{id:t.id}),o.success({title:"SugarcrmConfiguration deleted!",msg:t.name?t.name+" has been deleted!":""})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})}).finally(function(){s.getSugarcrmConfiguration(0)})},function(){console.log("CANCEL")})},s.selectChangedAdvanced=function(){return i.intSalesforceConfiguration.update({id:s.sugarcrmConfiguration.id},s.sugarcrmConfiguration).$promise.then(function(){o.success({title:"Module updated!",msg:"Module has been updated!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.selectedSubjects=[],s.createOrEditSubject=function(e,t){a.show({controller:"CreateOrEditSugarcrmAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/sugarcrmAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"subject",item:t,items:s.subjects,configuration:s.sugarcrmConfiguration,account:s.sugarcrmAccount,license:null,setting:null}})},s.deleteSubjectConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the subject?").htmlContent("<b>Subject</b> will be deleted.").ariaLabel("delete subject").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){r(t)},function(){console.log("CANCEL")})},s.deleteSelectedSubjects=function(e){var t=a.confirm().title("Are you sure want to delete the selected subjects?").htmlContent("<b>"+s.selectedSubjects.length+" selected</b> will be deleted.").ariaLabel("delete subjects").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedSubjects.forEach(function(e){r(e)}),s.selectedSubjects=[]})},s.selectedDescriptions=[],s.createOrEditDescription=function(e,t){a.show({controller:"CreateOrEditSugarcrmAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/sugarcrmAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"description",item:t,items:s.descriptions,configuration:s.sugarcrmConfiguration,account:s.sugarcrmAccount,license:null,setting:null}})},s.deleteDescriptionConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the description?").htmlContent("<b>Description</b> will be deleted.").ariaLabel("delete description").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){l(t)},function(){console.log("CANCEL")})},s.deleteSelectedDescriptions=function(e){var t=a.confirm().title("Are you sure want to delete the selected descriptions?").htmlContent("<b>"+s.selectedDescriptions.length+" selected</b> will be deleted.").ariaLabel("delete descriptions").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedDescriptions.forEach(function(e){l(e)}),s.selectedDescriptions=[]})},s.selectedFields=[],s.createOrEditField=function(e,t){a.show({controller:"CreateOrEditSugarcrmAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/sugarcrmAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"field",item:t,items:s.fields,configuration:s.sugarcrmConfiguration,account:s.sugarcrmAccount,license:null,setting:null}})},s.deleteFieldConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the field?").htmlContent("<b>Field</b> will be deleted.").ariaLabel("delete field").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){d(t)},function(){console.log("CANCEL")})},s.deleteSelectedFields=function(e){var t=a.confirm().title("Are you sure want to delete the selected fields?").htmlContent("<b>"+s.selectedFields.length+" selected</b> will be deleted.").ariaLabel("delete fields").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedFields.forEach(function(e){d(e)}),s.selectedFields=[]})}}e.$inject=["$mdDialog","$document","api","toasty","Auth"],angular.module("app.integrations").controller("SugarcrmAccountConfigurationsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_SUGARCRMCONFIGURATION",m.sugarcrmConfiguration=angular.copy(s),m.configurations=o,m.newSugarcrmConfiguration=!1,m.sugarcrmConfiguration||(m.sugarcrmConfiguration={channel:"voice",type:"inbound"},m.title="INTEGRATIONS.NEW_SUGARCRMCONFIGURATION",m.newSugarcrmConfiguration=!0),m.addNewSugarcrmConfiguration=function(){m.errors=[],r.intSugarcrmAccount.addConfiguration({id:t.params.id},m.sugarcrmConfiguration).$promise.then(function(e){m.configurations.unshift(e.toJSON()),i.success({title:"SugarcrmConfiguration properly created",msg:m.sugarcrmConfiguration.name?m.sugarcrmConfiguration.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSugarcrmConfiguration.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSugarcrmConfiguration.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSugarcrmConfiguration=function(){m.errors=[],r.intSugarcrmConfiguration.update({id:m.sugarcrmConfiguration.id},m.sugarcrmConfiguration).$promise.then(function(e){var t=_.find(m.configurations,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"SugarcrmConfiguration properly saved!",msg:m.sugarcrmConfiguration.name?m.sugarcrmConfiguration.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSugarcrmConfiguration.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSugarcrmConfiguration.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSugarcrmConfiguration=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The sugarcrmConfiguration will be deleted.").ariaLabel("Delete SugarcrmConfiguration").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intSugarcrmConfiguration.delete({id:m.sugarcrmConfiguration.id}).$promise.then(function(){_.remove(m.configurations,{id:m.sugarcrmConfiguration.id}),i.success({title:"SugarcrmConfiguration properly deleted!",msg:(m.sugarcrmConfiguration.name||"sugarcrmConfiguration")+" has been deleted!"}),u(m.sugarcrmConfiguration)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSugarcrmConfiguration.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSugarcrmConfiguration.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configurations","sugarcrmConfiguration","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditSugarcrmConfigurationDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(){a.hide()}m.errors=[],m.title="INTEGRATIONS.EDIT_"+_.toUpper(d),m.item=angular.copy(r),m.items=s,m.type=d,m.newItem=!1,m.item||(m.item={type:"string"},m.item[_.capitalize(d)+"Id"]=o.id,m.title="INTEGRATIONS.NEW_"+_.toUpper(d),m.newItem=!0),m.addNewItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intSugarcrmField.save(m.item).$promise.then(function(e){m.items.unshift(e),i.success({title:_.capitalize(d)+" properly created",msg:_.capitalize(d)+" has been created!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.save"}]})},m.saveItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intSugarcrmField.update({id:m.item.id},m.item).$promise.then(function(e){var t=_.find(m.items,{id:e.id});t&&_.merge(t,e),i.success({title:_.capitalize(d)+" properly saved!",msg:_.capitalize(d)+" has been saved!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.intItem.update"}]})},m.deleteItem=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The "+d+" will be deleted.").ariaLabel("Delete "+_.capitalize(d)).ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){c.intSugarcrmField.delete({id:m.item.id}).$promise.then(function(){_.remove(m.items,{id:m.item.id}),i.success({title:_.capitalize(d)+" properly deleted!",msg:_.capitalize(d)+" has been deleted!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.delete"}]})},function(){})},m.getSelectedVariable=function(){return void 0!==m.item.variableName?m.item.variableName:"Please select a variable"},m.closeDialog=u,c.variable.get({nolimit:!0}).$promise.then(function(e){return m.variables=e.rows?e.rows:[],c.voiceAgentReport.describe().$promise}).then(function(e){return m.voiceAgentReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceAgentReportColumns.push("recordingURL"),c.voiceDialReport.describe().$promise}).then(function(e){m.voiceDialReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceDialReportColumns.push("recordingURL")}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETVARIABLES",msg:e.data?JSON.stringify(e.data):e.toString()})}),c.intSugarcrmAccount.getFields({id:l.id}).$promise.then(function(e){m.accountConnected=!0,m.fields=e.rows?e.rows:[],m.item.idField&&(m.customField=_.find(m.fields,{id:m.item.idField}))}).catch(function(e){m.accountConnected=!1,console.error(e)})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configuration","items","item","account","type","api"],angular.module("app.integrations").controller("CreateOrEditSugarcrmAccountItemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.sugarcrmAccount=d||e.params.sugarcrmAccount||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoSugarcrmAccounts=function(){e.go("app.integrations.sugarcrmAccounts")},c.saveSugarcrmAccount=function(){s.intSugarcrmAccount.update({id:c.sugarcrmAccount.id},c.sugarcrmAccount).$promise.then(function(){r.success({title:"SugarcrmAccount updated!",msg:c.sugarcrmAccount.name?c.sugarcrmAccount.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETintSugarcrmAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","sugarcrmAccount"],angular.module("app.integrations").controller("SugarcrmAccountController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.sugarcrmAccounts=r||{count:0,rows:[]},v.table="sugarcrmAccounts",v.listOrder="",v.listOrderAsc=null,v.selectedSugarcrmAccounts=[],v.query={fields:"createdAt,updatedAt,id,name,username,remoteUri,password,serverUrl,description",limit:10,page:1},v.editstate=function(e,t){n.go("app.integrations.sugarcrmAccounts.edit",{id:e.id,sugarcrmAccount:e})},v.testtestintegrationaccount=function(e,t){return l.intSugarcrmAccount.getFields({id:e.id,test:!0}).$promise.then(function(){c.success({title:"SugarcrmAccount properly tested",msg:"Connection succeded!"})}).catch(function(e){c.error({title:"SugarcrmAccount properly tested",msg:e.data?e.data.message?e.data.message:JSON.stringify(e.data):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the sugarcrmAccount?").htmlContent("<b>"+(e.name||"sugarcrmAccount")+"</b> will be deleted.").ariaLabel("delete sugarcrmAccount").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getSugarcrmAccounts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.intSugarcrmAccount.get(v.query,f).$promise},v.createOrEditSugarcrmAccount=function(e,t){i.show({controller:"CreateOrEditSugarcrmAccountDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/sugarcrmAccounts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{sugarcrmAccount:t,sugarcrmAccounts:v.sugarcrmAccounts.rows,license:v.license,setting:v.setting}})},v.deleteSugarcrmAccount=A,v.exportSelectedSugarcrmAccounts=function(){var e=angular.copy(v.selectedSugarcrmAccounts);return v.selectedSugarcrmAccounts=[],e},v.deleteSelectedSugarcrmAccounts=function(e){var t=i.confirm().title("Are you sure want to delete the selected sugarcrmAccounts?").htmlContent("<b>"+v.selectedSugarcrmAccounts.length+" selected</b> will be deleted.").ariaLabel("delete SugarcrmAccounts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedSugarcrmAccounts.forEach(function(e){A(e)}),v.selectedSugarcrmAccounts=[]})},v.deselectSugarcrmAccounts=function(){v.selectedSugarcrmAccounts=[]},v.selectAllSugarcrmAccounts=function(){v.selectedSugarcrmAccounts=v.sugarcrmAccounts.rows};var h=!0,b=1;function f(e){v.sugarcrmAccounts=e||{count:0,rows:[]}}function A(e){l.intSugarcrmAccount.delete({id:e.id}).$promise.then(function(){_.remove(v.sugarcrmAccounts.rows,{id:e.id}),v.sugarcrmAccounts.count-=1,v.sugarcrmAccounts.rows.length||v.getSugarcrmAccounts(),c.success({title:"SugarcrmAccount deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEintSugarcrmAccount"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEintSugarcrmAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getSugarcrmAccounts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","sugarcrmAccounts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.integrations").controller("SugarcrmAccountsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_ZENDESKACCOUNT",m.zendeskAccount=angular.copy(s),m.zendeskAccounts=o,m.newZendeskAccount=!1,m.zendeskAccount||(m.zendeskAccount={type:"integrationTab",authType:"password",serverUrl:n.protocol()+"://"+n.host()+(n.port()?":"+n.port():"")},m.title="INTEGRATIONS.NEW_ZENDESKACCOUNT",m.newZendeskAccount=!0),m.addNewZendeskAccount=function(){m.errors=[],r.intZendeskAccount.save(m.zendeskAccount).$promise.then(function(e){m.zendeskAccounts.unshift(e.toJSON()),i.success({title:"ZendeskAccount properly created",msg:m.zendeskAccount.name?m.zendeskAccount.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZendeskAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZendeskAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveZendeskAccount=function(){m.errors=[],r.intZendeskAccount.update({id:m.zendeskAccount.id},m.zendeskAccount).$promise.then(function(e){var t=_.find(m.zendeskAccounts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"ZendeskAccount properly saved!",msg:m.zendeskAccount.name?m.zendeskAccount.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZendeskAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZendeskAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteZendeskAccount=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The zendeskAccount will be deleted.").ariaLabel("Delete ZendeskAccount").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intZendeskAccount.delete({id:m.zendeskAccount.id}).$promise.then(function(){_.remove(m.zendeskAccounts,{id:m.zendeskAccount.id}),i.success({title:"ZendeskAccount properly deleted!",msg:(m.zendeskAccount.name||"zendeskAccount")+" has been deleted!"}),u(m.zendeskAccount)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZendeskAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZendeskAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","zendeskAccounts","zendeskAccount","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditZendeskAccountDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(){a.hide()}m.errors=[],m.title="INTEGRATIONS.EDIT_"+_.toUpper(d),m.item=angular.copy(r),m.items=s,m.type=d,m.newItem=!1,m.item||(m.item={type:"string"},m.item[_.capitalize(d)+"Id"]=o.id,m.title="INTEGRATIONS.NEW_"+_.toUpper(d),m.newItem=!0),m.addNewItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intZendeskField.save(m.item).$promise.then(function(e){m.items.unshift(e),i.success({title:_.capitalize(d)+" properly created",msg:_.capitalize(d)+" has been created!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.save"}]})},m.saveItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intZendeskField.update({id:m.item.id},m.item).$promise.then(function(e){var t=_.find(m.items,{id:e.id});t&&_.merge(t,e),i.success({title:_.capitalize(d)+" properly saved!",msg:_.capitalize(d)+" has been saved!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.intItem.update"}]})},m.deleteItem=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The "+d+" will be deleted.").ariaLabel("Delete "+_.capitalize(d)).ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){c.intZendeskField.delete({id:m.item.id}).$promise.then(function(){_.remove(m.items,{id:m.item.id}),i.success({title:_.capitalize(d)+" properly deleted!",msg:_.capitalize(d)+" has been deleted!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.delete"}]})},function(){})},m.getSelectedVariable=function(){return void 0!==m.item.variableName?m.item.variableName:"Please select a variable"},m.closeDialog=u,c.variable.get({nolimit:!0}).$promise.then(function(e){return m.variables=e.rows?e.rows:[],c.voiceAgentReport.describe().$promise}).then(function(e){return m.voiceAgentReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceAgentReportColumns.push("recordingURL"),c.voiceDialReport.describe().$promise}).then(function(e){m.voiceDialReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceDialReportColumns.push("recordingURL")}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETVARIABLES",msg:e.data?JSON.stringify(e.data):e.toString()})}),c.intZendeskAccount.getFields({id:l.id}).$promise.then(function(e){m.accountConnected=!0,m.fields=e.rows?e.rows:[],m.item.idField&&(m.customField=_.find(m.fields,{id:m.item.idField}))}).catch(function(e){m.accountConnected=!1,console.error(e)})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configuration","items","item","account","type","api"],angular.module("app.integrations").controller("CreateOrEditZendeskAccountItemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.zendeskAccount=d||e.params.zendeskAccount||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoZendeskAccounts=function(){e.go("app.integrations.zendeskAccounts")},c.saveZendeskAccount=function(){s.intZendeskAccount.update({id:c.zendeskAccount.id},c.zendeskAccount).$promise.then(function(){r.success({title:"ZendeskAccount updated!",msg:c.zendeskAccount.name?c.zendeskAccount.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETintZendeskAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","zendeskAccount"],angular.module("app.integrations").controller("ZendeskAccountController",e)}(),function(){"use strict";function e(a,n,i,o,e){var s=this;function r(e){i.intZendeskField.delete({id:e.id}).$promise.then(function(){_.remove(s.subjects,{id:e.id}),o.success({title:"Subject deleted!",msg:"Subject has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function l(e){i.intZendeskField.delete({id:e.id}).$promise.then(function(){_.remove(s.descriptions,{id:e.id}),o.success({title:"Description deleted!",msg:"Description has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function d(e){i.intZendeskField.delete({id:e.id}).$promise.then(function(){_.remove(s.fields,{id:e.id}),o.success({title:"Field deleted!",msg:"Field has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}s.currentUser=e.getCurrentUser(),s.zendeskAccount={},s.zendeskConfiguration={},s.zendeskConfigurations=[],s.selectedZendeskConfiguration=-1,s.init=function(e){s.zendeskAccount=e,i.intZendeskAccount.getConfigurations({id:s.zendeskAccount.id,sort:"-updatedAt"}).$promise.then(function(e){return s.zendeskConfigurations=e.rows?e.rows:[],s.zendeskConfigurations.length&&s.getZendeskConfiguration(0),i.variable.get({nolimit:!0,sort:"name"}).$promise}).then(function(e){s.variables=e.rows?e.rows:[],s.variablesById=_.keyBy(s.variables,"id")}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETCONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.getZendeskConfiguration=function(e){s.zendeskConfiguration=s.zendeskConfigurations[e],s.selectedZendeskConfiguration=e,i.intZendeskConfiguration.getSubjects({id:s.zendeskConfiguration.id}).$promise.then(function(e){return s.subjects=e.rows?e.rows:[],i.intZendeskConfiguration.getDescriptions({id:s.zendeskConfiguration.id}).$promise}).then(function(e){return s.descriptions=e.rows?e.rows:[],i.intZendeskConfiguration.getFields({id:s.zendeskConfiguration.id}).$promise}).then(function(e){s.fields=e.rows?e.rows:[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),i.intZendeskConfiguration.getTags({id:s.zendeskConfiguration.id}).$promise.then(function(e){s.selectedTags=e.rows?_.map(e.rows,"id"):[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.createOrEditZendeskConfiguration=function(e,t){a.show({controller:"CreateOrEditZendeskConfigurationDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/zendeskAccounts/edit/zendeskConfigurations/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{zendeskConfiguration:t,zendeskConfigurations:s.zendeskConfigurations,license:null,setting:null}}).finally(function(){s.getZendeskConfiguration(0)})},s.deleteZendeskConfiguration=function(e,t){var n=a.confirm().title("Are you sure want to delete the zendeskConfiguration?").htmlContent("<b>"+(t.name||"zendeskConfiguration")+"</b> will be deleted.").ariaLabel("delete zendeskConfiguration").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){i.intZendeskConfiguration.delete({id:t.id}).$promise.then(function(){_.remove(s.zendeskConfigurations,{id:t.id}),o.success({title:"ZendeskConfiguration deleted!",msg:t.name?t.name+" has been deleted!":""})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})}).finally(function(){s.getZendeskConfiguration(0)})},function(){console.log("CANCEL")})},s.selectChangedAdvanced=function(){return i.intSalesforceConfiguration.update({id:s.zendeskConfiguration.id},s.zendeskConfiguration).$promise.then(function(){o.success({title:"Module updated!",msg:"Module has been updated!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.selectedTags=[],s.selectTagsChanged=function(e){i.intZendeskConfiguration.setTags({id:s.zendeskConfiguration.id,ids:s.selectedTags}).$promise.then(function(){o.success({title:"Tags set!",msg:"Tags has been set!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:ADDTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})})},i.tag.get({nolimit:!0,sort:"name"}).$promise.then(function(e){s.tags=e.rows?e.rows:[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.selectedSubjects=[],s.createOrEditSubject=function(e,t){a.show({controller:"CreateOrEditZendeskAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/zendeskAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"subject",item:t,items:s.subjects,configuration:s.zendeskConfiguration,account:s.zendeskAccount,license:null,setting:null}})},s.deleteSubjectConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the subject?").htmlContent("<b>Subject</b> will be deleted.").ariaLabel("delete subject").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){r(t)},function(){console.log("CANCEL")})},s.deleteSelectedSubjects=function(e){var t=a.confirm().title("Are you sure want to delete the selected subjects?").htmlContent("<b>"+s.selectedSubjects.length+" selected</b> will be deleted.").ariaLabel("delete subjects").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedSubjects.forEach(function(e){r(e)}),s.selectedSubjects=[]})},s.selectedDescriptions=[],s.createOrEditDescription=function(e,t){a.show({controller:"CreateOrEditZendeskAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/zendeskAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"description",item:t,items:s.descriptions,configuration:s.zendeskConfiguration,account:s.zendeskAccount,license:null,setting:null}})},s.deleteDescriptionConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the description?").htmlContent("<b>Description</b> will be deleted.").ariaLabel("delete description").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){l(t)},function(){console.log("CANCEL")})},s.deleteSelectedDescriptions=function(e){var t=a.confirm().title("Are you sure want to delete the selected descriptions?").htmlContent("<b>"+s.selectedDescriptions.length+" selected</b> will be deleted.").ariaLabel("delete descriptions").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedDescriptions.forEach(function(e){l(e)}),s.selectedDescriptions=[]})},s.selectedFields=[],s.createOrEditField=function(e,t){a.show({controller:"CreateOrEditZendeskAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/zendeskAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"field",item:t,items:s.fields,configuration:s.zendeskConfiguration,account:s.zendeskAccount,license:null,setting:null}})},s.deleteFieldConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the field?").htmlContent("<b>Field</b> will be deleted.").ariaLabel("delete field").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){d(t)},function(){console.log("CANCEL")})},s.deleteSelectedFields=function(e){var t=a.confirm().title("Are you sure want to delete the selected fields?").htmlContent("<b>"+s.selectedFields.length+" selected</b> will be deleted.").ariaLabel("delete fields").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedFields.forEach(function(e){d(e)}),s.selectedFields=[]})}}e.$inject=["$mdDialog","$document","api","toasty","Auth"],angular.module("app.integrations").controller("ZendeskAccountConfigurationsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_ZENDESKCONFIGURATION",m.zendeskConfiguration=angular.copy(s),m.zendeskConfigurations=o,m.newZendeskConfiguration=!1,m.zendeskConfiguration||(m.zendeskConfiguration={channel:"voice",type:"inbound"},m.title="INTEGRATIONS.NEW_ZENDESKCONFIGURATION",m.newZendeskConfiguration=!0),m.addNewZendeskConfiguration=function(){m.errors=[],r.intZendeskAccount.addConfiguration({id:t.params.id},m.zendeskConfiguration).$promise.then(function(e){m.zendeskConfigurations.unshift(e.toJSON()),i.success({title:"ZendeskConfiguration properly created",msg:m.zendeskConfiguration.name?m.zendeskConfiguration.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZendeskConfiguration.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZendeskConfiguration.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveZendeskConfiguration=function(){m.errors=[],r.intZendeskConfiguration.update({id:m.zendeskConfiguration.id},m.zendeskConfiguration).$promise.then(function(e){var t=_.find(m.zendeskConfigurations,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"ZendeskConfiguration properly saved!",msg:m.zendeskConfiguration.name?m.zendeskConfiguration.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZendeskConfiguration.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZendeskConfiguration.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteZendeskConfiguration=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The zendeskConfiguration will be deleted.").ariaLabel("Delete ZendeskConfiguration").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intZendeskConfiguration.delete({id:m.zendeskConfiguration.id}).$promise.then(function(){_.remove(m.zendeskConfigurations,{id:m.zendeskConfiguration.id}),i.success({title:"ZendeskConfiguration properly deleted!",msg:(m.zendeskConfiguration.name||"zendeskConfiguration")+" has been deleted!"}),u(m.zendeskConfiguration)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZendeskConfiguration.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZendeskConfiguration.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","zendeskConfigurations","zendeskConfiguration","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditZendeskConfigurationDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.zendeskAccounts=r||{count:0,rows:[]},v.table="zendeskAccounts",v.listOrder="",v.listOrderAsc=null,v.selectedZendeskAccounts=[],v.query={fields:"createdAt,updatedAt,id,name,type,username,remoteUri,authType,password,token,serverUrl,description",limit:10,page:1},v.arraytype=_.keyBy([{option:"Integration_Tab",value:"'integrationTab'"},{option:"New_Tab",value:"'newTab'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayauthType=_.keyBy([{option:"Password",value:"'password'"},{option:"Token",value:"'token'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.integrations.zendeskAccounts.edit",{id:e.id,zendeskAccount:e})},v.testtestintegrationaccount=function(e,t){return l.intZendeskAccount.getFields({id:e.id,test:!0}).$promise.then(function(){c.success({title:"ZendeskAccount properly tested",msg:"Connection succeded!"})}).catch(function(e){c.error({title:"ZendeskAccount properly tested",msg:e.data?e.data.message?e.data.message:JSON.stringify(e.data):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the zendeskAccount?").htmlContent("<b>"+(e.name||"zendeskAccount")+"</b> will be deleted.").ariaLabel("delete zendeskAccount").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getZendeskAccounts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.intZendeskAccount.get(v.query,f).$promise},v.createOrEditZendeskAccount=function(e,t){i.show({controller:"CreateOrEditZendeskAccountDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/zendeskAccounts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{zendeskAccount:t,zendeskAccounts:v.zendeskAccounts.rows,license:v.license,setting:v.setting}})},v.deleteZendeskAccount=A,v.exportSelectedZendeskAccounts=function(){var e=angular.copy(v.selectedZendeskAccounts);return v.selectedZendeskAccounts=[],e},v.deleteSelectedZendeskAccounts=function(e){var t=i.confirm().title("Are you sure want to delete the selected zendeskAccounts?").htmlContent("<b>"+v.selectedZendeskAccounts.length+" selected</b> will be deleted.").ariaLabel("delete ZendeskAccounts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedZendeskAccounts.forEach(function(e){A(e)}),v.selectedZendeskAccounts=[]})},v.deselectZendeskAccounts=function(){v.selectedZendeskAccounts=[]},v.selectAllZendeskAccounts=function(){v.selectedZendeskAccounts=v.zendeskAccounts.rows};var h=!0,b=1;function f(e){v.zendeskAccounts=e||{count:0,rows:[]}}function A(e){l.intZendeskAccount.delete({id:e.id}).$promise.then(function(){_.remove(v.zendeskAccounts.rows,{id:e.id}),v.zendeskAccounts.count-=1,v.zendeskAccounts.rows.length||v.getZendeskAccounts(),c.success({title:"ZendeskAccount deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEintZendeskAccount"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEintZendeskAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getZendeskAccounts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","zendeskAccounts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.integrations").controller("ZendeskAccountsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_ZOHOACCOUNT",m.zohoAccount=angular.copy(s),m.zohoAccounts=o,m.newZohoAccount=!1,m.zohoAccount||(m.zohoAccount={host:"zoho.com",serverUrl:n.protocol()+"://"+n.host()+(n.port()?":"+n.port():"")},m.title="INTEGRATIONS.NEW_ZOHOACCOUNT",m.newZohoAccount=!0),m.addNewZohoAccount=function(){m.errors=[],r.intZohoAccount.save(m.zohoAccount).$promise.then(function(e){m.zohoAccounts.unshift(e.toJSON()),i.success({title:"ZohoAccount properly created",msg:m.zohoAccount.name?m.zohoAccount.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZohoAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZohoAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveZohoAccount=function(){m.errors=[],r.intZohoAccount.update({id:m.zohoAccount.id},m.zohoAccount).$promise.then(function(e){var t=_.find(m.zohoAccounts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"ZohoAccount properly saved!",msg:m.zohoAccount.name?m.zohoAccount.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZohoAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZohoAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteZohoAccount=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The zohoAccount will be deleted.").ariaLabel("Delete ZohoAccount").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intZohoAccount.delete({id:m.zohoAccount.id}).$promise.then(function(){_.remove(m.zohoAccounts,{id:m.zohoAccount.id}),i.success({title:"ZohoAccount properly deleted!",msg:(m.zohoAccount.name||"zohoAccount")+" has been deleted!"}),u(m.zohoAccount)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZohoAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZohoAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","zohoAccounts","zohoAccount","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditZohoAccountDialogController",e)}(),function(){"use strict";function e(a,n,i,o,e){var s=this;function r(e){i.intZohoField.delete({id:e.id}).$promise.then(function(){_.remove(s.subjects,{id:e.id}),o.success({title:"Subject deleted!",msg:"Subject has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function l(e){i.intZohoField.delete({id:e.id}).$promise.then(function(){_.remove(s.descriptions,{id:e.id}),o.success({title:"Description deleted!",msg:"Description has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function d(e){i.intZohoField.delete({id:e.id}).$promise.then(function(){_.remove(s.fields,{id:e.id}),o.success({title:"Field deleted!",msg:"Field has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}s.currentUser=e.getCurrentUser(),s.zohoAccount={},s.zohoConfiguration={},s.configurations=[],s.selectedZohoConfiguration=-1,s.init=function(e){s.zohoAccount=e,i.intZohoAccount.getConfigurations({id:s.zohoAccount.id,sort:"-updatedAt"}).$promise.then(function(e){return s.configurations=e.rows?e.rows:[],s.configurations.length&&s.getZohoConfiguration(0),i.variable.get({nolimit:!0,sort:"name"}).$promise}).then(function(e){s.variables=e.rows?e.rows:[],s.variablesById=_.keyBy(s.variables,"id")}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETCONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.getZohoConfiguration=function(e){s.zohoConfiguration=s.configurations[e],s.selectedZohoConfiguration=e,i.intZohoConfiguration.getSubjects({id:s.zohoConfiguration.id}).$promise.then(function(e){return s.subjects=e.rows?e.rows:[],i.intZohoConfiguration.getDescriptions({id:s.zohoConfiguration.id}).$promise}).then(function(e){return s.descriptions=e.rows?e.rows:[],i.intZohoConfiguration.getFields({id:s.zohoConfiguration.id}).$promise}).then(function(e){s.fields=e.rows?e.rows:[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.createOrEditZohoConfiguration=function(e,t){a.show({controller:"CreateOrEditZohoConfigurationDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/zohoAccounts/edit/configurations/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{zohoConfiguration:t,configurations:s.configurations,license:null,setting:null}}).finally(function(){s.getZohoConfiguration(0)})},s.deleteZohoConfiguration=function(e,t){var n=a.confirm().title("Are you sure want to delete the zohoConfiguration?").htmlContent("<b>"+(t.name||"zohoConfiguration")+"</b> will be deleted.").ariaLabel("delete zohoConfiguration").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){i.intZohoConfiguration.delete({id:t.id}).$promise.then(function(){_.remove(s.configurations,{id:t.id}),o.success({title:"ZohoConfiguration deleted!",msg:t.name?t.name+" has been deleted!":""})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})}).finally(function(){s.getZohoConfiguration(0)})},function(){console.log("CANCEL")})},s.selectChangedAdvanced=function(){return i.intSalesforceConfiguration.update({id:s.zohoConfiguration.id},s.zohoConfiguration).$promise.then(function(){o.success({title:"Module updated!",msg:"Module has been updated!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.selectedSubjects=[],s.createOrEditSubject=function(e,t){a.show({controller:"CreateOrEditZohoAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/zohoAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"subject",item:t,items:s.subjects,configuration:s.zohoConfiguration,account:s.zohoAccount,license:null,setting:null}})},s.deleteSubjectConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the subject?").htmlContent("<b>Subject</b> will be deleted.").ariaLabel("delete subject").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){r(t)},function(){console.log("CANCEL")})},s.deleteSelectedSubjects=function(e){var t=a.confirm().title("Are you sure want to delete the selected subjects?").htmlContent("<b>"+s.selectedSubjects.length+" selected</b> will be deleted.").ariaLabel("delete subjects").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedSubjects.forEach(function(e){r(e)}),s.selectedSubjects=[]})},s.selectedDescriptions=[],s.createOrEditDescription=function(e,t){a.show({controller:"CreateOrEditZohoAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/zohoAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"description",item:t,items:s.descriptions,configuration:s.zohoConfiguration,account:s.zohoAccount,license:null,setting:null}})},s.deleteDescriptionConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the description?").htmlContent("<b>Description</b> will be deleted.").ariaLabel("delete description").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){l(t)},function(){console.log("CANCEL")})},s.deleteSelectedDescriptions=function(e){var t=a.confirm().title("Are you sure want to delete the selected descriptions?").htmlContent("<b>"+s.selectedDescriptions.length+" selected</b> will be deleted.").ariaLabel("delete descriptions").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedDescriptions.forEach(function(e){l(e)}),s.selectedDescriptions=[]})},s.selectedFields=[],s.createOrEditField=function(e,t){a.show({controller:"CreateOrEditZohoAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/zohoAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"field",item:t,items:s.fields,configuration:s.zohoConfiguration,account:s.zohoAccount,license:null,setting:null}})},s.deleteFieldConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the field?").htmlContent("<b>Field</b> will be deleted.").ariaLabel("delete field").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){d(t)},function(){console.log("CANCEL")})},s.deleteSelectedFields=function(e){var t=a.confirm().title("Are you sure want to delete the selected fields?").htmlContent("<b>"+s.selectedFields.length+" selected</b> will be deleted.").ariaLabel("delete fields").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedFields.forEach(function(e){d(e)}),s.selectedFields=[]})}}e.$inject=["$mdDialog","$document","api","toasty","Auth"],angular.module("app.integrations").controller("ZohoAccountConfigurationsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_ZOHOCONFIGURATION",m.zohoConfiguration=angular.copy(s),m.configurations=o,m.newZohoConfiguration=!1,m.zohoConfiguration||(m.zohoConfiguration={channel:"voice",type:"inbound"},m.title="INTEGRATIONS.NEW_ZOHOCONFIGURATION",m.newZohoConfiguration=!0),m.addNewZohoConfiguration=function(){m.errors=[],r.intZohoAccount.addConfiguration({id:t.params.id},m.zohoConfiguration).$promise.then(function(e){m.configurations.unshift(e.toJSON()),i.success({title:"ZohoConfiguration properly created",msg:m.zohoConfiguration.name?m.zohoConfiguration.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZohoConfiguration.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZohoConfiguration.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveZohoConfiguration=function(){m.errors=[],r.intZohoConfiguration.update({id:m.zohoConfiguration.id},m.zohoConfiguration).$promise.then(function(e){var t=_.find(m.configurations,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"ZohoConfiguration properly saved!",msg:m.zohoConfiguration.name?m.zohoConfiguration.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZohoConfiguration.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZohoConfiguration.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteZohoConfiguration=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The zohoConfiguration will be deleted.").ariaLabel("Delete ZohoConfiguration").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intZohoConfiguration.delete({id:m.zohoConfiguration.id}).$promise.then(function(){_.remove(m.configurations,{id:m.zohoConfiguration.id}),i.success({title:"ZohoConfiguration properly deleted!",msg:(m.zohoConfiguration.name||"zohoConfiguration")+" has been deleted!"}),u(m.zohoConfiguration)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZohoConfiguration.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZohoConfiguration.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configurations","zohoConfiguration","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditZohoConfigurationDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(){a.hide()}m.errors=[],m.title="INTEGRATIONS.EDIT_"+_.toUpper(d),m.item=angular.copy(r),m.items=s,m.type=d,m.newItem=!1,m.item||(m.item={type:"string"},m.item[_.capitalize(d)+"Id"]=o.id,m.title="INTEGRATIONS.NEW_"+_.toUpper(d),m.newItem=!0),m.addNewItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intZohoField.save(m.item).$promise.then(function(e){m.items.unshift(e),i.success({title:_.capitalize(d)+" properly created",msg:_.capitalize(d)+" has been created!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.save"}]})},m.saveItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intZohoField.update({id:m.item.id},m.item).$promise.then(function(e){var t=_.find(m.items,{id:e.id});t&&_.merge(t,e),i.success({title:_.capitalize(d)+" properly saved!",msg:_.capitalize(d)+" has been saved!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.intItem.update"}]})},m.deleteItem=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The "+d+" will be deleted.").ariaLabel("Delete "+_.capitalize(d)).ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){c.intZohoField.delete({id:m.item.id}).$promise.then(function(){_.remove(m.items,{id:m.item.id}),i.success({title:_.capitalize(d)+" properly deleted!",msg:_.capitalize(d)+" has been deleted!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.delete"}]})},function(){})},m.getSelectedVariable=function(){return void 0!==m.item.variableName?m.item.variableName:"Please select a variable"},m.closeDialog=u,c.variable.get({nolimit:!0}).$promise.then(function(e){return m.variables=e.rows?e.rows:[],c.voiceAgentReport.describe().$promise}).then(function(e){return m.voiceAgentReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceAgentReportColumns.push("recordingURL"),c.voiceDialReport.describe().$promise}).then(function(e){m.voiceDialReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceDialReportColumns.push("recordingURL")}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETVARIABLES",msg:e.data?JSON.stringify(e.data):e.toString()})}),c.intZohoAccount.getFields({id:l.id}).$promise.then(function(e){m.accountConnected=!0,m.fields=e.rows?e.rows:[],m.item.idField&&(m.customField=_.find(m.fields,{id:m.item.idField}))}).catch(function(e){m.accountConnected=!1,console.error(e)})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configuration","items","item","account","type","api"],angular.module("app.integrations").controller("CreateOrEditZohoAccountItemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.zohoAccount=d||e.params.zohoAccount||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoZohoAccounts=function(){e.go("app.integrations.zohoAccounts")},c.saveZohoAccount=function(){s.intZohoAccount.update({id:c.zohoAccount.id},c.zohoAccount).$promise.then(function(){r.success({title:"ZohoAccount updated!",msg:c.zohoAccount.name?c.zohoAccount.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETintZohoAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","zohoAccount"],angular.module("app.integrations").controller("ZohoAccountController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.zohoAccounts=r||{count:0,rows:[]},v.table="zohoAccounts",v.listOrder="",v.listOrderAsc=null,v.selectedZohoAccounts=[],v.query={fields:"createdAt,updatedAt,id,name,host,authToken,serverUrl,description",limit:10,page:1},v.arrayhost=_.keyBy([{option:"zoho.com",value:"'zoho.com'"},{option:"zoho.eu",value:"'zoho.eu'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.integrations.zohoAccounts.edit",{id:e.id,zohoAccount:e})},v.testtestintegrationaccount=function(e,t){return l.intZohoAccount.getFields({id:e.id,test:!0}).$promise.then(function(){c.success({title:"ZohoAccount properly tested",msg:"Connection succeded!"})}).catch(function(e){c.error({title:"ZohoAccount properly tested",msg:e.data?e.data.message?e.data.message:JSON.stringify(e.data):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the zohoAccount?").htmlContent("<b>"+(e.name||"zohoAccount")+"</b> will be deleted.").ariaLabel("delete zohoAccount").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getZohoAccounts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.intZohoAccount.get(v.query,f).$promise},v.createOrEditZohoAccount=function(e,t){i.show({controller:"CreateOrEditZohoAccountDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/zohoAccounts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{zohoAccount:t,zohoAccounts:v.zohoAccounts.rows,license:v.license,setting:v.setting}})},v.deleteZohoAccount=A,v.exportSelectedZohoAccounts=function(){var e=angular.copy(v.selectedZohoAccounts);return v.selectedZohoAccounts=[],e},v.deleteSelectedZohoAccounts=function(e){var t=i.confirm().title("Are you sure want to delete the selected zohoAccounts?").htmlContent("<b>"+v.selectedZohoAccounts.length+" selected</b> will be deleted.").ariaLabel("delete ZohoAccounts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedZohoAccounts.forEach(function(e){A(e)}),v.selectedZohoAccounts=[]})},v.deselectZohoAccounts=function(){v.selectedZohoAccounts=[]},v.selectAllZohoAccounts=function(){v.selectedZohoAccounts=v.zohoAccounts.rows};var h=!0,b=1;function f(e){v.zohoAccounts=e||{count:0,rows:[]}}function A(e){l.intZohoAccount.delete({id:e.id}).$promise.then(function(){_.remove(v.zohoAccounts.rows,{id:e.id}),v.zohoAccounts.count-=1,v.zohoAccounts.rows.length||v.getZohoAccounts(),c.success({title:"ZohoAccount deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEintZohoAccount"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEintZohoAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getZohoAccounts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","zohoAccounts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.integrations").controller("ZohoAccountsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="JSCRIPTY.EDIT_PROJECT",m.project=angular.copy(s),m.projects=o,m.newProject=!1,m.project||(m.project={enableUncompleteSave:!0},m.title="JSCRIPTY.NEW_PROJECT",m.newProject=!0),m.addNewProject=function(){m.errors=[],r.jscriptyProject.save(m.project).$promise.then(function(e){m.projects.unshift(e.toJSON()),i.success({title:"Project properly created",msg:m.project.name?m.project.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.jscriptyProject.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.jscriptyProject.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveProject=function(){m.errors=[],r.jscriptyProject.update({id:m.project.id},m.project).$promise.then(function(e){var t=_.find(m.projects,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Project properly saved!",msg:m.project.name?m.project.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.jscriptyProject.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.jscriptyProject.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteProject=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The project will be deleted.").ariaLabel("Delete Project").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.jscriptyProject.delete({id:m.project.id}).$promise.then(function(){_.remove(m.projects,{id:m.project.id}),i.success({title:"Project properly deleted!",msg:(m.project.name||"project")+" has been deleted!"}),u(m.project)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.jscriptyProject.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.jscriptyProject.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","projects","project","api","Auth","license","setting"],angular.module("app.jscripty").controller("CreateOrEditProjectDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o){var s=this;s.project={},s.localizationMap=o;var r=new Date;r.setHours(0,0,0,0),s.pickerModel={dateStart:r,dateEnd:null,selectedTemplate:"TD"},s.init=function(e){s.project=e,s.getAnswers()},s.getSummary=function(){var e=n.document.createElement("a");e.href="/api/jscripty/projects/"+s.project.id+"/summary",e.target="_self",e.click()},s.getAnswers=function(){return s.hasIdAnswers=!1,a.jscriptyProject.getAnswers({id:s.project.id,sort:"-createdAt,questionId",dateStart:s.pickerModel.dateStart,dateEnd:s.pickerModel.dateEnd,nolimit:!0}).$promise.then(function(e){if(e&&e.rows&&e.hasOwnProperty("count")){s.answers={};for(var t=0,n=e.count;t<n;t++)e.rows[t].questionId&&(s.hasIdAnswers=!0,s.answers.hasOwnProperty(e.rows[t].questionId)||(s.answers[e.rows[t].questionId]={question:e.rows[t].question,answers:{},sum:0}),""===e.rows[t].answer&&(e.rows[t].answer="NO_ANSWER"),s.answers[e.rows[t].questionId].answers[e.rows[t].answer]?s.answers[e.rows[t].questionId].answers[e.rows[t].answer]+=1:s.answers[e.rows[t].questionId].answers[e.rows[t].answer]=1,s.answers[e.rows[t].questionId].sum+=1)}}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETANSWERS",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$mdDialog","$document","$window","api","toasty","dateFilterLocalizationFactory"],angular.module("app.jscripty").controller("ProjectAnswersController",e)}(),function(){"use strict";angular.module("app.jscripty").controller("ProjectBuilderController",function(){var t=this;t.project={},t.optionsBuilder={questionTypes:["text","textarea","radio","checkbox","select","number","date","time","email","range","url"],elementTypes:["question","paragraph"]},t.init=function(e){t.project=e,_.isObjectLike(e.formData)?t.project.formData=e.formData:t.isJsonString(e.formData)?t.project.formData=JSON.parse(e.formData):t.project.formData={}},t.isJsonString=function(e){if(_.isNil(e))return!1;try{JSON.parse(e)}catch(e){return!1}return!0}})}(),function(){"use strict";function e(t,n,a,e,i,o,s){var r=this;function l(e){t.hide(e)}r.newProject=!0,r.project=angular.copy(i),r.projects=o,r.title=s.instant("JSCRIPTY.CLONE_PROJECT"),i&&i.name&&(r.title+=": "+i.name),r.cloneProject=function(){return e.jscriptyProject.clone({id:i.id},r.project).$promise.then(function(e){r.projects.unshift(e.toJSON()),a.success({title:"Project properly cloned",msg:r.project.name?r.project.name+" has been cloned!":""}),n.go("app.jscripty.projects.edit",{id:e.id}),l(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){r.errors=e.data.errors||[{message:e.toString(),type:"api.jscriptyProject.clone"}];for(var t=0;t<e.data.errors.length;t+=1)a.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.jscriptyProject.clone",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},r.closeDialog=l}e.$inject=["$mdDialog","$state","toasty","api","project","projects","$translate"],angular.module("app.jscripty").controller("ProjectcloneController",e)}(),function(){"use strict";function e(a,i,t){var s=this;s.project={},s.responseData={},s.formViewer={},s.init=function(e){s.project=e,t.$on("mwForm.pageEvents.pageCurrentChanged",function(e,t){if(t.currentPage&&s.project.formData&&s.project.formData.pages)for(var n=0,a=s.project.formData.pages.length;n<a;n++)if(t.currentPage.number<n+1&&s.project.formData.pages[n].elements)for(var i=0,o=s.project.formData.pages[n].elements.length;i<o;i++)"question"===s.project.formData.pages[n].elements[i].type&&s.project.formData.pages[n].elements[i].question&&delete s.responseData[s.project.formData.pages[n].elements[i].question.id]})},s.onSubmit=function(e){var t=a.defer(),n=i.confirm().title("Would you like to save your survey?").textContent("").ariaLabel("survey").targetEvent(e).ok("SAVE").cancel("CANCEL");return i.show(n).then(function(){t.resolve(!0)},function(){t.reject()}),t.promise},s.resetViewer=function(){s.formViewer.reset&&s.formViewer.reset()}}e.$inject=["$q","$mdDialog","$scope"],angular.module("app.jscripty").controller("ProjectViewerController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.project={},c.projectSessions={count:0,rows:[]},c.selectedProjectSessions=[],c.query={fields:"createdAt,updatedAt,id,starttime,endtime,membername,calleridnum,completed",sort:"-starttime",limit:10,page:1},c.init=function(e){c.project=e,c.query.id=c.project.id,c.getProjectSessions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the session?").htmlContent("<b>"+(e.name||"session")+"</b> will be deleted.").ariaLabel("delete session").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getProjectSessions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.jscriptyProject.getSessions(c.query,p).$promise},c.createOrEditProjectSession=function(e,t){o.show({controller:"CreateOrEditSessionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/jscripty/views/projects/edit/sessions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{project:c.project,session:t,sessions:c.projectSessions.rows,license:null,setting:null}})},c.showQuestionsProjectSession=function(e,n){o.show({controller:"ShowQuestionsSessionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/jscripty/views/projects/edit/sessions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,resolve:{questions:["apiResolver","$stateParams",function(e,t){return e.resolve("jscriptySessionReport@getQuestions",{fields:"question,answer",sort:"id",id:n.id})}]},locals:{project:c.project,session:n}})},c.exportSelectedProjectSessions=function(){var e=angular.copy(c.selectedProjectSessions);return c.selectedProjectSessions=[],e},c.deleteProjectSession=g,c.deleteSelectedProjectSessions=function(e){var t=o.confirm().title("Are you sure want to delete the selected sessions?").htmlContent("<b>"+c.selectedProjectSessions.length+" selected</b> will be deleted.").ariaLabel("delete sessions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedProjectSessions.forEach(function(e){g(e)}),c.selectedProjectSessions=[]})};var m=!0,u=1;function p(e){c.projectSessions=e||{count:0,rows:[]}}function g(e){l.jscriptySessionReport.delete({id:e.id}).$promise.then(function(){_.remove(c.projectSessions.rows,{id:e.id}),c.projectSessions.count-=1,c.projectSessions.rows.length||c.getProjectSessions(),r.success({title:"Session deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETjscriptyProject"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETjscriptyProject",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getProjectSessions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.jscripty").controller("ProjectSessionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l){this.title="JSCRIPTY.SESSION_RESULTS",this.session=o,this.questions=s,this.project=r,this.closeDialog=function(e){a.hide(e)}}e.$inject=["$scope","$state","$location","$mdDialog","toasty","session","questions","project","api"],angular.module("app.jscripty").controller("ShowQuestionsSessionDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.project=d||e.params.project||{},c.selectedTab=e.params.tab||0,c.clonedialog=function(e,t){n.show({controller:"ProjectcloneController",controllerAs:"vm",templateUrl:"app/main/apps/jscripty/views/projects/edit/clone/clone.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{project:e,projects:c.projects?c.projects.rows:[]}})},c.alert=r.info,c.gotoProjects=function(){e.go("app.jscripty.projects")},c.saveProject=function(){s.jscriptyProject.update({id:c.project.id},c.project).$promise.then(function(){r.success({title:"Project updated!",msg:c.project.name?c.project.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETjscriptyProject",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","project"],angular.module("app.jscripty").controller("JscriptyProjectController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.projects=r||{count:0,rows:[]},v.table="projects",v.listOrder="",v.listOrderAsc=null,v.selectedProjects=[],v.query={fields:"createdAt,updatedAt,id,name,enableUncompleteSave,description,createdAt,formData",sort:"-updatedAt",limit:10,page:1},v.editstate=function(e,t){n.go("app.jscripty.projects.edit",{id:e.id,project:e})},v.clonedialog=function(e,t){i.show({controller:"ProjectcloneController",controllerAs:"vm",templateUrl:"app/main/apps/jscripty/views/projects/edit/clone/clone.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{project:e,projects:v.projects?v.projects.rows:[]}})},v.sessionsgoto=function(e,t){n.go("app.jscripty.projects.edit",{id:e.id,tab:3})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the project?").htmlContent("<b>"+(e.name||"project")+"</b> will be deleted.").ariaLabel("delete project").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getProjects=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.jscriptyProject.get(v.query,f).$promise},v.createOrEditProject=function(e,t){i.show({controller:"CreateOrEditProjectDialogController",controllerAs:"vm",templateUrl:"app/main/apps/jscripty/views/projects/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{project:t,projects:v.projects.rows,license:v.license,setting:v.setting}})},v.deleteProject=A,v.exportSelectedProjects=function(){var e=angular.copy(v.selectedProjects);return v.selectedProjects=[],e},v.deleteSelectedProjects=function(e){var t=i.confirm().title("Are you sure want to delete the selected projects?").htmlContent("<b>"+v.selectedProjects.length+" selected</b> will be deleted.").ariaLabel("delete Projects").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedProjects.forEach(function(e){A(e)}),v.selectedProjects=[]})},v.deselectProjects=function(){v.selectedProjects=[]},v.selectAllProjects=function(){v.selectedProjects=v.projects.rows};var h=!0,b=1;function f(e){v.projects=e||{count:0,rows:[]}}function A(e){l.jscriptyProject.delete({id:e.id}).$promise.then(function(){_.remove(v.projects.rows,{id:e.id}),v.projects.count-=1,v.projects.rows.length||v.getProjects(),c.success({title:"Project deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEjscriptyProject"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEjscriptyProject",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getProjects())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","projects","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.jscripty").controller("JscriptyProjectsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="MAIL.EDIT_MAILACCOUNT",m.mailAccount=angular.copy(s),m.mailAccounts=o,m.newMailAccount=!1,m.mailAccount||(m.mailAccount={active:!0,cservice:"null",cauthentication:!0,fontSize:13,waitForTheAssignedAgent:10,notificationSound:!0},m.title="MAIL.NEW_MAILACCOUNT",m.newMailAccount=!0),t.params.id&&(m.mailAccount.MailAccountId=t.params.id),m.addNewMailAccount=function(){m.errors=[],r.mailAccount.save(m.mailAccount).$promise.then(function(e){m.mailAccounts.unshift(e.toJSON()),i.success({title:"MailAccount properly created",msg:m.mailAccount.name?m.mailAccount.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveMailAccount=function(){m.errors=[],r.mailAccount.update({id:m.mailAccount.id},m.mailAccount).$promise.then(function(e){var t=_.find(m.mailAccounts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"MailAccount properly saved!",msg:m.mailAccount.name?m.mailAccount.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteMailAccount=function(e){if(m.mailAccount.service)return i.error({title:"Mail Account not deleted!",msg:"You can't remove service account"});m.errors=[];var t=a.confirm().title("Are you sure?").content("The mailAccount will be deleted.").ariaLabel("Delete MailAccount").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.mailAccount.delete({id:m.mailAccount.id}).$promise.then(function(){_.remove(m.mailAccounts,{id:m.mailAccount.id}),i.success({title:"MailAccount properly deleted!",msg:(m.mailAccount.name||"mailAccount")+" has been deleted!"}),u(m.mailAccount)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.lists=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","mailAccounts","mailAccount","api","Auth","license","setting"],angular.module("app.mail").controller("CreateOrEditMailAccountDialogController",e)}(),function(){"use strict";function e(s,i,a,o,e){var r=this;function t(e,t){if(r.mailAccountApps.rows.length){var n=r.mailAccountApps.rows[t]?r.mailAccountApps.rows[t]:r.mailAccountApps.rows[0];i.show({controller:"EditMailAccountApp"+(n.appType||n.app).toLowerCase()+"DialogController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailAccounts/edit/apps/"+(n.appType||n.app).toLowerCase()+"/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{mailAccountApp:n,mailAccount:r.mailAccount}}).then(function(e){e&&(e.id?r.mailAccountApps.rows[t]=e:r.mailAccountApps.rows.splice(t,0,e),l())}).catch(function(e){e&&o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:EDITMODALSHOW",msg:e.data?JSON.stringify(e.data):e.toString()})})}}function l(){for(var e=1,t=[],n=0;n<r.mailAccountApps.rows.length;n++,0){var a=r.mailAccountApps.rows[n],i=[],o=[];a.intervals="*,*,*,*"!==a.interval?[a.interval]:a.IntervalId?_.map(_.filter(r.intervals.rows,{IntervalId:a.IntervalId}),"interval"):[],a.context=r.mailAccount.context,a.exten=r.mailAccount.exten,a.type&&(a.type=a.type.toLowerCase()),a.priority=i.length?_.last(i).priority+1:e,e=(o.length?_.last(o).priority:a.priority)+1,t=_.concat(t,i,[a],o)}s.mailAccount.addApplications({id:r.mailAccount.id},_.sortBy(t,"priority")).$promise.then(function(e){r.mailAccountApps.rows=e.rows}).catch(function(e){console.error(e)})}function n(e){r.mailAccountApps=e||{count:0,rows:[]}}r.currentUser=e.getCurrentUser(),r.mailAccount={},r.mailAccountApps={count:0,rows:[]},r.selectedMailAccountApps=[],r.query={sort:"priority"},r.apps=_.reject(_.sortBy([{app:"Interval",appType:"interval",types:["always","custom","list"],fields:[],isApp:!1},{app:"noop",appType:"noop",type:"noop",icon:"icon-apps",interval:"*,*,*,*",required:!0,isApp:!0,fields:[{title:"Value",name:"value",type:"text",param:0}]},{app:"system",appType:"system",type:"system",icon:"icon-apps",interval:"*,*,*,*",required:!0,isApp:!0,extraApi:[{name:"variables",route:"variable",filters:{fields:"id,name",sort:"name",nolimit:!0}}],fields:[{title:"Command",name:"command",type:"text",required:!0,param:0},{title:"Variable",name:"variable",type:"apiselect",values:"variables",value:"variable.name",option:"variable.name",defaultValues:[{value:"''",option:"None"}],defaultValue:"''",param:1}]},{app:"gotop",appType:"gotop",type:"goto",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Priority",name:"priority",type:"number",required:!0,min:0,param:0}]},{app:"gotoif",appType:"gotoif",type:"gotoif",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Condition",name:"condition",type:"text",required:!0,param:0},{title:"truepriority",name:"truepriority",type:"number",min:1,required:!0,param:1},{title:"falsepriority",name:"falsepriority",type:"number",min:1,required:!0,param:2}]},{app:"queue",appType:"queue",foreignKey:"MailQueueId",type:"queue",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"queues",route:"mailQueue",filters:{fields:"id,name,type",sort:"name",nolimit:!0}}],fields:[{title:"Queue",name:"queue",type:"apiselect",values:"queues",value:"queue.name",option:"queue.name",defaultValue:300,required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",max:2147483,min:0,required:!0,defaultValue:300,param:1}]},{app:"agent",appType:"agent",type:"agent",foreignKey:"UserId",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"agents",route:"user",filters:{fields:"id,name",sort:"name",nolimit:!0,role:"agent"}}],fields:[{title:"Agent",name:"agent",type:"apiselect",values:"agents",value:"agent.name",option:"agent.name",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",max:2147483,min:0,required:!0,defaultValue:30,param:1}]},{app:"autoreply",appType:"autoreply",type:"autoreply",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"times",name:"times",type:"select",defaultValue:"1",values:[{option:"One Time",value:"1"},{option:"Always",value:"0"}],required:!0,param:0},{title:"Text",name:"text",type:"html",required:!0,param:1}]},{app:"close",appType:"close",type:"close",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Disposition",name:"disposition",type:"text",required:!0,param:0}]}],["app"]),{isApp:!1}),r.list={group:{name:"opt1",pull:"clone"},animation:100,sort:!1},r.applications={group:{name:"opt2",put:"opt1"},animation:100,onAdd:function(e){t(e,e.newIndex)},onSort:function(e){l()}},r.init=function(e){r.mailAccount=e,r.query.id=e.id,r.query.isApp=!0,r.query.nolimit=!0,r.getMailAccountApps(),r.getIntervals()},r.deleteConfirm=function(e,t,n){var a=i.confirm().title("Are you sure want to delete the application?").htmlContent("<b>"+e.app+"</b> will be deleted.").ariaLabel("delete application").targetEvent(n).ok("OK").cancel("CANCEL");i.show(a).then(function(){r.mailAccountApps.rows.splice(t,1),l()},function(){console.log("CANCEL")})},r.getMailAccountApps=function(){r.promise=s.mailAccount.getApplications(r.query,n).$promise},r.editMailAccountApp=t,r.editInterval=function(e,t){if(r.mailAccountApps.rows.length){var n=r.mailAccountApps.rows[t]?r.mailAccountApps.rows[t]:r.mailAccountApps.rows[0];i.show({controller:"EditMailAccountAppintervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailAccounts/edit/apps/interval/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:{interval:n.interval,IntervalId:n.IntervalId,application:!0},intervals:[]}}).then(function(e){e&&(n.interval=e.interval||"*,*,*,*",n.IntervalId=e.IntervalId||null,l())})}},r.deleteMailAccountApp=function(e){_.remove(r.mailAccountApps.rows,{id:e.id}),l(),o.success({title:"App deleted!",msg:e.app?e.app+" has been deleted!":""})},r.deleteSelectedMailAccountApps=function(e){var t=i.confirm().title("Are you sure want to delete the selected applications?").htmlContent("<b>"+r.selectedMailAccountApps.length+" selected</b> will be deleted.").ariaLabel("delete applications").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){r.selectedMailAccountApps.forEach(function(e){_.remove(r.mailAccountApps.rows,{id:e.id})}),r.selectedMailAccountApps=[],l()})},r.rewriteRouting=l,r.getIntervals=function(){return s.interval.get({fields:"id,interval,IntervalId"}).$promise.then(function(e){r.intervals=e}).catch(function(e){console.error(e)})}}e.$inject=["api","$mdDialog","$document","toasty","Auth"],angular.module("app.mail").controller("MailAccountActionsController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="MAIL.EDIT_"+(e.appType||e.app).toUpperCase(),o.agent=angular.copy(e),o.agent.appdata)switch(o.agent.appType?o.agent.appType.toLowerCase():o.agent.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.agent.appdata.split(",");o.agent.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.agent.text=s.slice(1,s.length).join(",");break;case"message":o.agent.text=o.agent.appdata;break;case"set":o.agent.name=o.agent.appdata.split("=")[0],o.agent.value=o.agent.appdata.split("=")[1];break;case"agi":o.agent.project=o.agent.appdata;break;default:var r=o.agent.appdata.split(",");o.agent.agent=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.agent.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.agent.timeout=30;function l(e){t.hide(e)}o.agent.type&&"outbound"===o.agent.type.toLowerCase()&&"outbounddial"===o.agent.appType.toLowerCase()&&(o.agent.prefix=o.agent.phone?o.agent.phone.split("$")[0]:void 0,o.agent.callerId=o.agent.callerID?"CALLERID(all)="+o.agent.callerID:void 0),o.saveMailAccountApp=function(){o.errors=[];var e=[];o.agent.type&&"outbound"===o.agent.type.toLowerCase()&&"outboundDial"===o.agent.appType&&(o.agent.phone=a.cutdigits?(o.agent.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.agent.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.agent.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.agent.options+="U(xcally-mixmonitor-context)"):o.agent.options=o.agent.options.replace("U(xcally-mixmonitor-context)",""));var t=_.find(o.agents,{name:o.agent.agent});t&&(o.agent.UserId=t.id);if(o.agent.appType&&"custom"===o.agent.appType);else switch((o.agent.app||o.agent.appType).toLowerCase()){case"set":o.agent.appdata=o.agent.name+"="+o.agent.value;break;case"custom":break;default:e[0]=o.agent.agent,e[1]=o.agent.timeout,o.agent.appdata=e.join(",")}l(o.agent)},o.closeDialog=l,i.user.get({fields:"id,name",sort:"name",nolimit:"true",role:"agent"}).$promise.then(function(e){o.agents=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETagents",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","mailAccountApp","mailAccount","api"],angular.module("app.mail").controller("EditMailAccountAppagentDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="MAIL.EDIT_"+(n.appType||n.app).toUpperCase(),o.autoreply=angular.copy(n),o.autoreply.appdata)switch(o.autoreply.appType?o.autoreply.appType.toLowerCase():o.autoreply.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.autoreply.appdata.split(",");o.autoreply.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.autoreply.text=s.slice(1,s.length).join(",");break;case"message":o.autoreply.text=o.autoreply.appdata;break;case"set":o.autoreply.name=o.autoreply.appdata.split("=")[0],o.autoreply.value=o.autoreply.appdata.split("=")[1];break;case"agi":o.autoreply.project=o.autoreply.appdata;break;default:var r=o.autoreply.appdata.split(",");o.autoreply.times=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.autoreply.text=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.autoreply.times=1;function l(e){t.hide(e)}o.autoreply.type&&"outbound"===o.autoreply.type.toLowerCase()&&"outbounddial"===o.autoreply.appType.toLowerCase()&&(o.autoreply.prefix=o.autoreply.phone?o.autoreply.phone.split("$")[0]:void 0,o.autoreply.callerId=o.autoreply.callerID?"CALLERID(all)="+o.autoreply.callerID:void 0),o.saveMailAccountApp=function(){o.errors=[];var e=[];o.autoreply.type&&"outbound"===o.autoreply.type.toLowerCase()&&"outboundDial"===o.autoreply.appType&&(o.autoreply.phone=a.cutdigits?(o.autoreply.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.autoreply.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.autoreply.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.autoreply.options+="U(xcally-mixmonitor-context)"):o.autoreply.options=o.autoreply.options.replace("U(xcally-mixmonitor-context)",""));if(o.autoreply.appType&&"custom"===o.autoreply.appType);else switch((o.autoreply.app||o.autoreply.appType).toLowerCase()){case"set":o.autoreply.appdata=o.autoreply.name+"="+o.autoreply.value;break;case"custom":break;default:e[0]=o.autoreply.times,e[1]=o.autoreply.text,o.autoreply.appdata=e.join(",")}l(o.autoreply)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","mailAccountApp","mailAccount","api"],angular.module("app.mail").controller("EditMailAccountAppautoreplyDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="MAIL.EDIT_"+(n.appType||n.app).toUpperCase(),o.close=angular.copy(n),o.close.appdata)switch(o.close.appType?o.close.appType.toLowerCase():o.close.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.close.appdata.split(",");o.close.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.close.text=s.slice(1,s.length).join(",");break;case"message":o.close.text=o.close.appdata;break;case"set":o.close.name=o.close.appdata.split("=")[0],o.close.value=o.close.appdata.split("=")[1];break;case"agi":o.close.project=o.close.appdata;break;default:var r=o.close.appdata.split(",");o.close.disposition=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.close.type&&"outbound"===o.close.type.toLowerCase()&&"outbounddial"===o.close.appType.toLowerCase()&&(o.close.prefix=o.close.phone?o.close.phone.split("$")[0]:void 0,o.close.callerId=o.close.callerID?"CALLERID(all)="+o.close.callerID:void 0),o.saveMailAccountApp=function(){o.errors=[];var e=[];o.close.type&&"outbound"===o.close.type.toLowerCase()&&"outboundDial"===o.close.appType&&(o.close.phone=a.cutdigits?(o.close.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.close.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.close.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.close.options+="U(xcally-mixmonitor-context)"):o.close.options=o.close.options.replace("U(xcally-mixmonitor-context)",""));if(o.close.appType&&"custom"===o.close.appType);else switch((o.close.app||o.close.appType).toLowerCase()){case"set":o.close.appdata=o.close.name+"="+o.close.value;break;case"custom":break;default:e[0]=o.close.disposition,o.close.appdata=e.join(",")}l(o.close)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","mailAccountApp","mailAccount","api"],angular.module("app.mail").controller("EditMailAccountAppcloseDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="MAIL.EDIT_"+(n.appType||n.app).toUpperCase(),o.gotoif=angular.copy(n),o.gotoif.appdata)switch(o.gotoif.appType?o.gotoif.appType.toLowerCase():o.gotoif.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.gotoif.appdata.split(",");o.gotoif.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.gotoif.text=s.slice(1,s.length).join(",");break;case"message":o.gotoif.text=o.gotoif.appdata;break;case"set":o.gotoif.name=o.gotoif.appdata.split("=")[0],o.gotoif.value=o.gotoif.appdata.split("=")[1];break;case"agi":o.gotoif.project=o.gotoif.appdata;break;default:var r=o.gotoif.appdata.split(",");o.gotoif.condition=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.gotoif.truepriority=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.gotoif.falsepriority=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10)}function l(e){t.hide(e)}o.gotoif.type&&"outbound"===o.gotoif.type.toLowerCase()&&"outbounddial"===o.gotoif.appType.toLowerCase()&&(o.gotoif.prefix=o.gotoif.phone?o.gotoif.phone.split("$")[0]:void 0,o.gotoif.callerId=o.gotoif.callerID?"CALLERID(all)="+o.gotoif.callerID:void 0),o.saveMailAccountApp=function(){o.errors=[];var e=[];o.gotoif.type&&"outbound"===o.gotoif.type.toLowerCase()&&"outboundDial"===o.gotoif.appType&&(o.gotoif.phone=a.cutdigits?(o.gotoif.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.gotoif.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.gotoif.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.gotoif.options+="U(xcally-mixmonitor-context)"):o.gotoif.options=o.gotoif.options.replace("U(xcally-mixmonitor-context)",""));if(o.gotoif.appType&&"custom"===o.gotoif.appType);else switch((o.gotoif.app||o.gotoif.appType).toLowerCase()){case"set":o.gotoif.appdata=o.gotoif.name+"="+o.gotoif.value;break;case"custom":break;default:e[0]=o.gotoif.condition,e[1]=o.gotoif.truepriority,e[2]=o.gotoif.falsepriority,o.gotoif.appdata=e.join(",")}l(o.gotoif)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","mailAccountApp","mailAccount","api"],angular.module("app.mail").controller("EditMailAccountAppgotoifDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="MAIL.EDIT_"+(n.appType||n.app).toUpperCase(),o.gotop=angular.copy(n),o.gotop.appdata)switch(o.gotop.appType?o.gotop.appType.toLowerCase():o.gotop.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.gotop.appdata.split(",");o.gotop.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.gotop.text=s.slice(1,s.length).join(",");break;case"message":o.gotop.text=o.gotop.appdata;break;case"set":o.gotop.name=o.gotop.appdata.split("=")[0],o.gotop.value=o.gotop.appdata.split("=")[1];break;case"agi":o.gotop.project=o.gotop.appdata;break;default:var r=o.gotop.appdata.split(",");o.gotop.priority=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.gotop.type&&"outbound"===o.gotop.type.toLowerCase()&&"outbounddial"===o.gotop.appType.toLowerCase()&&(o.gotop.prefix=o.gotop.phone?o.gotop.phone.split("$")[0]:void 0,o.gotop.callerId=o.gotop.callerID?"CALLERID(all)="+o.gotop.callerID:void 0),o.saveMailAccountApp=function(){o.errors=[];var e=[];o.gotop.type&&"outbound"===o.gotop.type.toLowerCase()&&"outboundDial"===o.gotop.appType&&(o.gotop.phone=a.cutdigits?(o.gotop.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.gotop.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.gotop.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.gotop.options+="U(xcally-mixmonitor-context)"):o.gotop.options=o.gotop.options.replace("U(xcally-mixmonitor-context)",""));if(o.gotop.appType&&"custom"===o.gotop.appType);else switch((o.gotop.app||o.gotop.appType).toLowerCase()){case"set":o.gotop.appdata=o.gotop.name+"="+o.gotop.value;break;case"custom":break;default:e[0]=o.gotop.priority,o.gotop.appdata=e.join(",")}l(o.gotop)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","mailAccountApp","mailAccount","api"],angular.module("app.mail").controller("EditMailAccountAppgotopDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;if(l.errors=[],l.title="TOOLS.EDIT_INTERVAL",l.interval=angular.copy(i),l.intervals=o,l.newInterval=!1,l.types=["always","custom","list"],l.daysOfWeek=a.getDaysOfWeek(),l.monthNumber=a.getMonthNumber(),l.monthName=a.getMonthName(),l.daysOfMonth=a.getDaysOfMonth(),l.interval)if("*,*,*,*"!==l.interval.interval){l.type="custom";var d=l.interval.interval.split(","),c=d[0],m=d[1],u=d[2],p=d[3];if("*"!==c){var g,v=c.split("-")[0],h=c.split("-")[1];(g=new Date).setHours(Number(v.split(":")[0])),g.setMinutes(Number(v.split(":")[1])),l.timeRangeFrom=g,(g=new Date).setHours(Number(h.split(":")[0])),g.setMinutes(Number(h.split(":")[1])),l.timeRangeTo=g}"*"!==m&&(l.dayOfWeekFrom=m.split("-")[0],l.dayOfWeekTo=m.split("-")[1]),"*"!==u&&(l.monthDayFrom=u.split("-")[0],l.monthDayTo=u.split("-")[1]),"*"!==p&&(l.monthFrom=p.split("-")[0],l.monthTo=p.split("-")[1])}else l.type="always";else l.interval={interval:"*,*,*,*"},l.type="always",l.title="TOOLS.NEW_INTERVAL",l.newInterval=!0;function b(){switch(l.type){case"always":case"list":return"*,*,*,*";case"custom":var e=[];if("*"!==l.timeRangeFrom&&l.timeRangeFrom&&l.timeRangeTo){var t=(l.timeRangeFrom.getHours()<10?"0":"")+l.timeRangeFrom.getHours()+":"+(l.timeRangeFrom.getMinutes()<10?"0":"")+l.timeRangeFrom.getMinutes(),n=(l.timeRangeTo.getHours()<10?"0":"")+l.timeRangeTo.getHours()+":"+(l.timeRangeTo.getMinutes()<10?"0":"")+l.timeRangeTo.getMinutes();e.push(t+"-"+n)}else e.push("*");return l.dayOfWeekFrom?l.dayOfWeekTo?e.push(l.dayOfWeekFrom+"-"+l.dayOfWeekTo):e.push(l.dayOfWeekFrom):e.push("*"),l.monthDayFrom?l.monthDayTo?e.push(l.monthDayFrom+"-"+l.monthDayTo):e.push(l.monthDayFrom):e.push("*"),l.monthFrom?l.monthTo?e.push(l.monthFrom+"-"+l.monthTo):e.push(l.monthFrom):e.push("*"),e.join()}}function f(e){t.hide(e)}e.params.id&&!l.interval.application&&(l.interval.IntervalId=e.params.id),l.interval.IntervalId&&l.interval.application&&(l.type="list"),l.addNewInterval=function(){l.errors=[],l.interval.interval=b(),r.interval.save(l.interval).$promise.then(function(e){l.intervals.push(e),s.success({title:"Interval properly created",msg:l.interval.name?l.interval.name+" has been created!":""}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}]})},l.saveInterval=function(){l.errors=[],l.interval.interval=b(),l.interval.application?("list"!==l.type&&(l.interval.IntervalId=null),f(l.interval)):r.interval.update({id:l.interval.id},l.interval).$promise.then(function(e){var t=_.find(l.intervals,{id:e.id});t&&_.merge(t,e),s.success({title:"Interval properly saved!",msg:"Interval has been saved!"}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}]})},l.closeDialog=f,l.interval.application&&r.interval.get({fields:"id,name,interval,IntervalId",IntervalId:"null",nolimit:!0}).$promise.then(function(e){l.intervals=e}).catch(function(e){console.error(e)})}e.$inject=["$state","$mdDialog","$mdToast","IndexFactory","interval","intervals","toasty","api"],angular.module("app.voice").controller("EditMailAccountAppintervalDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="MAIL.EDIT_"+(n.appType||n.app).toUpperCase(),o.noop=angular.copy(n),o.noop.appdata)switch(o.noop.appType?o.noop.appType.toLowerCase():o.noop.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.noop.appdata.split(",");o.noop.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.noop.text=s.slice(1,s.length).join(",");break;case"message":o.noop.text=o.noop.appdata;break;case"set":o.noop.name=o.noop.appdata.split("=")[0],o.noop.value=o.noop.appdata.split("=")[1];break;case"agi":o.noop.project=o.noop.appdata;break;default:var r=o.noop.appdata.split(",");o.noop.value=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.noop.type&&"outbound"===o.noop.type.toLowerCase()&&"outbounddial"===o.noop.appType.toLowerCase()&&(o.noop.prefix=o.noop.phone?o.noop.phone.split("$")[0]:void 0,o.noop.callerId=o.noop.callerID?"CALLERID(all)="+o.noop.callerID:void 0),o.saveMailAccountApp=function(){o.errors=[];var e=[];o.noop.type&&"outbound"===o.noop.type.toLowerCase()&&"outboundDial"===o.noop.appType&&(o.noop.phone=a.cutdigits?(o.noop.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.noop.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.noop.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.noop.options+="U(xcally-mixmonitor-context)"):o.noop.options=o.noop.options.replace("U(xcally-mixmonitor-context)",""));if(o.noop.appType&&"custom"===o.noop.appType);else switch((o.noop.app||o.noop.appType).toLowerCase()){case"set":o.noop.appdata=o.noop.name+"="+o.noop.value;break;case"custom":break;default:e[0]=o.noop.value,o.noop.appdata=e.join(",")}l(o.noop)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","mailAccountApp","mailAccount","api"],angular.module("app.mail").controller("EditMailAccountAppnoopDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="MAIL.EDIT_"+(e.appType||e.app).toUpperCase(),o.queue=angular.copy(e),o.queue.appdata)switch(o.queue.appType?o.queue.appType.toLowerCase():o.queue.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.queue.appdata.split(",");o.queue.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.queue.text=s.slice(1,s.length).join(",");break;case"message":o.queue.text=o.queue.appdata;break;case"set":o.queue.name=o.queue.appdata.split("=")[0],o.queue.value=o.queue.appdata.split("=")[1];break;case"agi":o.queue.project=o.queue.appdata;break;default:var r=o.queue.appdata.split(",");o.queue.queue=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.queue.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.queue.queue=300,o.queue.timeout=300;function l(e){t.hide(e)}o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outbounddial"===o.queue.appType.toLowerCase()&&(o.queue.prefix=o.queue.phone?o.queue.phone.split("$")[0]:void 0,o.queue.callerId=o.queue.callerID?"CALLERID(all)="+o.queue.callerID:void 0),o.saveMailAccountApp=function(){o.errors=[];var e=[];o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outboundDial"===o.queue.appType&&(o.queue.phone=a.cutdigits?(o.queue.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.queue.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.queue.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.queue.options+="U(xcally-mixmonitor-context)"):o.queue.options=o.queue.options.replace("U(xcally-mixmonitor-context)",""));var t=_.find(o.queues,{name:o.queue.queue});t&&(o.queue[_.capitalize("mail")+"QueueId"]=t.id);if(o.queue.appType&&"custom"===o.queue.appType);else switch((o.queue.app||o.queue.appType).toLowerCase()){case"set":o.queue.appdata=o.queue.name+"="+o.queue.value;break;case"custom":break;default:e[0]=o.queue.queue,e[1]=o.queue.timeout,o.queue.appdata=e.join(",")}l(o.queue)},o.closeDialog=l,i.mailQueue.get({fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){o.queues=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","mailAccountApp","mailAccount","api"],angular.module("app.mail").controller("EditMailAccountAppqueueDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="MAIL.EDIT_"+(e.appType||e.app).toUpperCase(),o.system=angular.copy(e),o.system.appdata)switch(o.system.appType?o.system.appType.toLowerCase():o.system.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.system.appdata.split(",");o.system.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.system.text=s.slice(1,s.length).join(",");break;case"message":o.system.text=o.system.appdata;break;case"set":o.system.name=o.system.appdata.split("=")[0],o.system.value=o.system.appdata.split("=")[1];break;case"agi":o.system.project=o.system.appdata;break;default:var r=o.system.appdata.split(",");o.system.command=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.system.variable=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.system.variable="";function l(e){t.hide(e)}o.system.type&&"outbound"===o.system.type.toLowerCase()&&"outbounddial"===o.system.appType.toLowerCase()&&(o.system.prefix=o.system.phone?o.system.phone.split("$")[0]:void 0,o.system.callerId=o.system.callerID?"CALLERID(all)="+o.system.callerID:void 0),o.saveMailAccountApp=function(){o.errors=[];var e=[];o.system.type&&"outbound"===o.system.type.toLowerCase()&&"outboundDial"===o.system.appType&&(o.system.phone=a.cutdigits?(o.system.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.system.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.system.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.system.options+="U(xcally-mixmonitor-context)"):o.system.options=o.system.options.replace("U(xcally-mixmonitor-context)",""));if(o.system.appType&&"custom"===o.system.appType);else switch((o.system.app||o.system.appType).toLowerCase()){case"set":o.system.appdata=o.system.name+"="+o.system.value;break;case"custom":break;default:e[0]=o.system.command,e[1]=o.system.variable,o.system.appdata=e.join(",")}l(o.system)},o.closeDialog=l,i.variable.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){o.variables=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvariables",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","mailAccountApp","mailAccount","api"],angular.module("app.mail").controller("EditMailAccountAppsystemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.mailAccount={},c.mailAccountInteractions={count:0,rows:[]},c.selectedMailAccountInteractions=[],c.query={fields:"createdAt,updatedAt,UserId,ContactId,MailAccountId,id,createdAt,Contact.firstName,Owner.name,closedAt,disposition,note,tag",sort:"-createdAt",includeAll:"true",limit:10,page:1},c.init=function(e){c.mailAccount=e,c.query.id=c.mailAccount.id,c.getMailAccountInteractions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the interaction?").htmlContent("<b>"+(e.name||"interaction")+"</b> will be deleted.").ariaLabel("delete interaction").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getMailAccountInteractions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.mailAccount.getInteractions(c.query,p).$promise},c.createOrEditMailAccountInteraction=function(e,t){o.show({controller:"CreateOrEditInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailAccounts/edit/interactions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{mailAccount:c.mailAccount,interaction:t,interactions:c.mailAccountInteractions.rows,license:null,setting:null}})},c.spymailInteraction=function(e,n){o.show({controller:"AgentGeneralInteractionController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/agent.general.interaction.dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,onShowing:function(e,t){e.vm.init({id:1,channel:"mail",interaction:n,spy:!0})}})},c.exportSelectedMailAccountInteractions=function(){var e=angular.copy(c.selectedMailAccountInteractions);return c.selectedMailAccountInteractions=[],e},c.deleteMailAccountInteraction=g,c.deleteSelectedMailAccountInteractions=function(e){var t=o.confirm().title("Are you sure want to delete the selected interactions?").htmlContent("<b>"+c.selectedMailAccountInteractions.length+" selected</b> will be deleted.").ariaLabel("delete interactions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedMailAccountInteractions.forEach(function(e){g(e)}),c.selectedMailAccountInteractions=[]})};var m=!0,u=1;function p(e){c.mailAccountInteractions=e||{count:0,rows:[]}}function g(e){l.mailInteraction.delete({id:e.id}).$promise.then(function(){_.remove(c.mailAccountInteractions.rows,{id:e.id}),c.mailAccountInteractions.count-=1,c.mailAccountInteractions.rows.length||c.getMailAccountInteractions(),r.success({title:"Interaction deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETmailAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getMailAccountInteractions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.mail").controller("MailAccountInteractionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.mailAccount={},c.mailAccountMailCannedAnswers={count:0,rows:[]},c.selectedMailAccountMailCannedAnswers=[],c.query={fields:"createdAt,updatedAt,id,key,value,description,createdAt",limit:10,page:1},c.init=function(e){c.mailAccount=e,c.query.id=c.mailAccount.id,c.query.MailAccountId=c.mailAccount.id,c.getMailAccountMailCannedAnswers()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the mailCannedAnswer?").htmlContent("<b>"+(e.name||"mailCannedAnswer")+"</b> will be deleted.").ariaLabel("delete mailCannedAnswer").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getMailAccountMailCannedAnswers=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.mailAccount.getAnswers(c.query,p).$promise},c.createOrEditMailAccountMailCannedAnswer=function(e,t){o.show({controller:"CreateOrEditMailCannedAnswerDialogController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailAccounts/edit/mailCannedAnswers/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{mailAccount:c.mailAccount,mailCannedAnswer:t,mailCannedAnswers:c.mailAccountMailCannedAnswers.rows,license:null,setting:null}})},c.exportSelectedMailAccountMailCannedAnswers=function(){var e=angular.copy(c.selectedMailAccountMailCannedAnswers);return c.selectedMailAccountMailCannedAnswers=[],e},c.deleteMailAccountMailCannedAnswer=g,c.deleteSelectedMailAccountMailCannedAnswers=function(e){var t=o.confirm().title("Are you sure want to delete the selected mailCannedAnswers?").htmlContent("<b>"+c.selectedMailAccountMailCannedAnswers.length+" selected</b> will be deleted.").ariaLabel("delete mailCannedAnswers").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedMailAccountMailCannedAnswers.forEach(function(e){g(e)}),c.selectedMailAccountMailCannedAnswers=[]})};var m=!0,u=1;function p(e){c.mailAccountMailCannedAnswers=e||{count:0,rows:[]}}function g(e){l.cannedAnswer.delete({id:e.id}).$promise.then(function(){_.remove(c.mailAccountMailCannedAnswers.rows,{id:e.id}),c.mailAccountMailCannedAnswers.count-=1,c.mailAccountMailCannedAnswers.rows.length||c.getMailAccountMailCannedAnswers(),r.success({title:"MailCannedAnswer deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETmailAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getMailAccountMailCannedAnswers())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.mail").controller("MailAccountMailCannedAnswersController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="MAIL.EDIT_MAILCANNEDANSWER",m.mailCannedAnswer=angular.copy(s),m.mailCannedAnswers=o,m.newMailCannedAnswer=!1,m.mailCannedAnswer||(m.mailCannedAnswer={},m.title="MAIL.NEW_MAILCANNEDANSWER",m.newMailCannedAnswer=!0),t.params.id&&(m.mailCannedAnswer.MailAccountId=t.params.id),m.addNewMailCannedAnswer=function(){m.errors=[],r.cannedAnswer.save(m.mailCannedAnswer).$promise.then(function(e){m.mailCannedAnswers.unshift(e.toJSON()),i.success({title:"MailCannedAnswer properly created",msg:m.mailCannedAnswer.name?m.mailCannedAnswer.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveMailCannedAnswer=function(){m.errors=[],r.cannedAnswer.update({id:m.mailCannedAnswer.id},m.mailCannedAnswer).$promise.then(function(e){var t=_.find(m.mailCannedAnswers,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"MailCannedAnswer properly saved!",msg:m.mailCannedAnswer.name?m.mailCannedAnswer.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteMailCannedAnswer=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The mailCannedAnswer will be deleted.").ariaLabel("Delete MailCannedAnswer").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.cannedAnswer.delete({id:m.mailCannedAnswer.id}).$promise.then(function(){_.remove(m.mailCannedAnswers,{id:m.mailCannedAnswer.id}),i.success({title:"MailCannedAnswer properly deleted!",msg:(m.mailCannedAnswer.name||"mailCannedAnswer")+" has been deleted!"}),u(m.mailCannedAnswer)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","mailCannedAnswers","mailCannedAnswer","api","Auth","license","setting"],angular.module("app.mail").controller("CreateOrEditMailCannedAnswerDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.mailAccount={},c.mailAccountMailDispositions={count:0,rows:[]},c.selectedMailAccountMailDispositions=[],c.query={fields:"createdAt,updatedAt,id,name,createdAt",limit:10,page:1},c.init=function(e){c.mailAccount=e,c.query.id=c.mailAccount.id,c.query.MailAccountId=c.mailAccount.id,c.getMailAccountMailDispositions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the mailDisposition?").htmlContent("<b>"+(e.name||"mailDisposition")+"</b> will be deleted.").ariaLabel("delete mailDisposition").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getMailAccountMailDispositions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.mailAccount.getDispositions(c.query,p).$promise},c.createOrEditMailAccountMailDisposition=function(e,t){o.show({controller:"CreateOrEditMailDispositionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailAccounts/edit/mailDispositions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{mailAccount:c.mailAccount,mailDisposition:t,mailDispositions:c.mailAccountMailDispositions.rows,license:null,setting:null}})},c.exportSelectedMailAccountMailDispositions=function(){var e=angular.copy(c.selectedMailAccountMailDispositions);return c.selectedMailAccountMailDispositions=[],e},c.deleteMailAccountMailDisposition=g,c.deleteSelectedMailAccountMailDispositions=function(e){var t=o.confirm().title("Are you sure want to delete the selected mailDispositions?").htmlContent("<b>"+c.selectedMailAccountMailDispositions.length+" selected</b> will be deleted.").ariaLabel("delete mailDispositions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedMailAccountMailDispositions.forEach(function(e){g(e)}),c.selectedMailAccountMailDispositions=[]})};var m=!0,u=1;function p(e){c.mailAccountMailDispositions=e||{count:0,rows:[]}}function g(e){l.mailDisposition.delete({id:e.id}).$promise.then(function(){_.remove(c.mailAccountMailDispositions.rows,{id:e.id}),c.mailAccountMailDispositions.count-=1,c.mailAccountMailDispositions.rows.length||c.getMailAccountMailDispositions(),r.success({title:"MailDisposition deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETmailAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getMailAccountMailDispositions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.mail").controller("MailAccountMailDispositionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="MAIL.EDIT_MAILDISPOSITION",m.mailDisposition=angular.copy(s),m.mailDispositions=o,m.newMailDisposition=!1,m.mailDisposition||(m.mailDisposition={},m.title="MAIL.NEW_MAILDISPOSITION",m.newMailDisposition=!0),t.params.id&&(m.mailDisposition.MailAccountId=t.params.id),m.addNewMailDisposition=function(){m.errors=[],r.mailDisposition.save(m.mailDisposition).$promise.then(function(e){m.mailDispositions.unshift(e.toJSON()),i.success({title:"MailDisposition properly created",msg:m.mailDisposition.name?m.mailDisposition.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailDisposition.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailDisposition.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveMailDisposition=function(){m.errors=[],r.mailDisposition.update({id:m.mailDisposition.id},m.mailDisposition).$promise.then(function(e){var t=_.find(m.mailDispositions,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"MailDisposition properly saved!",msg:m.mailDisposition.name?m.mailDisposition.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailDisposition.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailDisposition.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteMailDisposition=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The mailDisposition will be deleted.").ariaLabel("Delete MailDisposition").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.mailDisposition.delete({id:m.mailDisposition.id}).$promise.then(function(){_.remove(m.mailDispositions,{id:m.mailDisposition.id}),i.success({title:"MailDisposition properly deleted!",msg:(m.mailDisposition.name||"mailDisposition")+" has been deleted!"}),u(m.mailDisposition)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailDisposition.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailDisposition.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","mailDispositions","mailDisposition","api","Auth","license","setting"],angular.module("app.mail").controller("CreateOrEditMailDispositionDialogController",e)}(),function(){"use strict";function e(n,e,t,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=e.protocol()+"://"+e.host(),c.mailAccount=d||n.params.mailAccount||{},c.selectedTab=n.params.tab||0,c.gotogoto=function(e,t){n.go("app.mail.realtime.accounts",{})},c.alert=r.info,c.gotoMailAccounts=function(){n.go("app.mail.mailAccounts")},c.saveMailAccount=function(){s.mailAccount.update({id:c.mailAccount.id},c.mailAccount).$promise.then(function(){r.success({title:"MailAccount updated!",msg:c.mailAccount.name?c.mailAccount.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.lists=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","mailAccount"],angular.module("app.mail").controller("MailAccountController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.mailAccounts=r||{count:0,rows:[]},v.table="mailAccounts",v.listOrder="",v.listOrderAsc=null,v.selectedMailAccounts=[],v.query={fields:"createdAt,updatedAt,id,name,key,email,ListId,active,cservice,Imap.service,Imap.host,Imap.port,Imap.tls,Imap.authentication,Imap.user,Imap.password,Imap.mailbox,Imap.connTimeout,Imap.authTimeout,Smtp.service,Smtp.host,Smtp.port,Smtp.secure,Smtp.authentication,Smtp.user,Smtp.pass,cauthentication,cuser,cpassword,fontFamily,fontSize,template,markAsUnread,waitForTheAssignedAgent,description,notificationSound,notificationShake,notificationTemplate",sort:"-updatedAt",limit:10,page:1},v.arraycservice=_.keyBy([{option:"Custom",value:"null"},{option:"Gmail",value:"'gmail'"},{option:"Hotmail",value:"'hotmail'"},{option:"Yahoo",value:"'yahoo'"},{option:"Outlook365",value:"'outlook365'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v["arrayImap.service"]=_.keyBy([{option:"Custom",value:"null"},{option:"Gmail",value:"'gmail'"},{option:"Hotmail",value:"'hotmail'"},{option:"Yahoo",value:"'yahoo'"},{option:"Outlook365",value:"'outlook365'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v["arraySmtp.service"]=_.keyBy([{option:"Custom",value:"null"},{option:"Gmail",value:"'gmail'"},{option:"Hotmail",value:"'hotmail'"},{option:"Yahoo",value:"'yahoo'"},{option:"Outlook365",value:"'outlook365'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.mail.mailAccounts.edit",{id:e.id,mailAccount:e})},v.verifysmtpverifysmtp=function(e,t){{if(e&&e.id)return l.mailAccount.verifySmtp({id:e.id}).$promise.then(function(){c.success({title:"Smtp properly verified",msg:"Connection succeded!"})}).catch(function(e){c.error({title:"Smtp properly verified",msg:e.data?JSON.stringify(e.data):e.toString()})});c.error({title:"Smtp properly verified",msg:"Smpt id unknown"})}},v.interactionsgoto=function(e,t){n.go("app.mail.mailAccounts.edit",{id:e.id,tab:6})},v.gotorealtimegoto=function(e,t){n.go("app.mail.realtime.accounts",{})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the mailAccount?").htmlContent("<b>"+(e.name||"mailAccount")+"</b> will be deleted.").ariaLabel("delete mailAccount").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getMailAccounts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.mailAccount.get(v.query,f).$promise},v.createOrEditMailAccount=function(e,t){i.show({controller:"CreateOrEditMailAccountDialogController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailAccounts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{mailAccount:t,mailAccounts:v.mailAccounts.rows,license:v.license,setting:v.setting}})},v.deleteMailAccount=A,v.exportSelectedMailAccounts=function(){var e=angular.copy(v.selectedMailAccounts);return v.selectedMailAccounts=[],e},v.deleteSelectedMailAccounts=function(e){var t=i.confirm().title("Are you sure want to delete the selected mailAccounts?").htmlContent("<b>"+v.selectedMailAccounts.length+" selected</b> will be deleted.").ariaLabel("delete MailAccounts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedMailAccounts.forEach(function(e){A(e)}),v.selectedMailAccounts=[]})},v.deselectMailAccounts=function(){v.selectedMailAccounts=[]},v.selectAllMailAccounts=function(){v.selectedMailAccounts=v.mailAccounts.rows},l.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.lists=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.mailAccounts=e||{count:0,rows:[]}}function A(e){if(e.service)return c.error({title:"Mail Account not deleted!",msg:"You can't remove service account"});l.mailAccount.delete({id:e.id}).$promise.then(function(){_.remove(v.mailAccounts.rows,{id:e.id}),v.mailAccounts.count-=1,v.mailAccounts.rows.length||v.getMailAccounts(),c.success({title:"MailAccount deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEmailAccount"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEmailAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getMailAccounts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","mailAccounts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.mail").controller("MailAccountsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="MAIL.EDIT_MAILQUEUE",m.mailQueue=angular.copy(s),m.mailQueues=o,m.newMailQueue=!1,m.mailQueue||(m.mailQueue={strategy:"beepall",timeout:10},m.title="MAIL.NEW_MAILQUEUE",m.newMailQueue=!0),m.addNewMailQueue=function(){m.errors=[],r.mailQueue.save(m.mailQueue).$promise.then(function(e){m.mailQueues.unshift(e.toJSON()),i.success({title:"MailQueue properly created",msg:m.mailQueue.name?m.mailQueue.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailQueue.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailQueue.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveMailQueue=function(){m.errors=[],r.mailQueue.update({id:m.mailQueue.id},m.mailQueue).$promise.then(function(e){var t=_.find(m.mailQueues,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"MailQueue properly saved!",msg:m.mailQueue.name?m.mailQueue.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailQueue.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailQueue.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteMailQueue=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The mailQueue will be deleted.").ariaLabel("Delete MailQueue").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.mailQueue.delete({id:m.mailQueue.id}).$promise.then(function(){_.remove(m.mailQueues,{id:m.mailQueue.id}),i.success({title:"MailQueue properly deleted!",msg:(m.mailQueue.name||"mailQueue")+" has been deleted!"}),u(m.mailQueue)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailQueue.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailQueue.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","mailQueues","mailQueue","api","Auth","license","setting"],angular.module("app.mail").controller("CreateOrEditMailQueueDialogController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r){var l=this;function d(){return a.mailQueue[l.isVoiceRealtime()?"getMembers":"getAgents"]({id:l.mailQueue.id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){return l.isVoiceRealtime()?l.selectedItems=e.rows?_.map(e.rows,function(e){return e.id=e.UserId,e.fullname=e.membername,e.penalty=e.hasOwnProperty("penalty")?"penalty "+e.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[]:l.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserMailQueue?"penalty "+e.UserMailQueue.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.selectedItems=l.selectedItems,r.hasRole("admin")?a.user.get({fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise:a.user.getAgents({id:r.getCurrentUser().id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise}).then(function(e){l.items=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserMailQueue?"penalty "+e.UserMailQueue.penalty:"",e.internal=e.internal?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.items=_.differenceBy(l.items,l.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETUSERS.GETAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}l.mailQueue=t,l.penalty=0,l.items=[],l.selectedItems=[],l.closeDialog=function(){e.hide()},l.isVoiceRealtime=function(){return o},l.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"penalty",labelAll:s.instant("MAIL.ALL_AGENTS"),labelSelected:s.instant("MAIL.SELECTED_AGENTS"),transferCallback:function(e,t){a.mailQueue[t?"removeAgents":"addAgents"]({id:l.mailQueue.id,ids:_.map(e,l.isVoiceRealtime()&&t?"UserId":"id"),penalty:l.penalty||0,realtime:o||!1}).$promise.then(function(){n.success({title:"MailQueue properly "+(t?"removed":"added"),msg:"MailQueue has been "+(t?"removed":"added")+"!"}),t||d()}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:mailQueue.ADDAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d()}e.$inject=["$mdDialog","toasty","api","mailQueue","mailQueues","realtime","$translate","Auth"],angular.module("app.mail").controller("MailQueueagentaddController",e)}(),function(){"use strict";function e(e,n,a,t,i){var o=this;o.mailQueue=t,o.penalty=0,o.items=[],o.selectedItems=[],o.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("MAIL.ALL_TEAMS"),labelSelected:i.instant("MAIL.SELECTED_TEAMS"),transferCallback:function(e,t){a.mailQueue[t?"removeTeams":"addTeams"]({id:o.mailQueue.id,ids:_.map(e,"id"),penalty:o.penalty||0}).$promise.then(function(){n.success({title:"Team properly "+(t?"removed":"added"),msg:"Team has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:mailQueue.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},o.closeDialog=function(){e.hide()},a.mailQueue.getTeams({id:o.mailQueue.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return o.selectedItems=e.rows?e.rows:[],o.dualMultiselectOptions.selectedItems=o.selectedItems,a.team.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){o.items=e.rows?e.rows:[],o.dualMultiselectOptions.items=_.differenceBy(o.items,o.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","mailQueue","$translate"],angular.module("app.mail").controller("MailQueueteamaddController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.mailQueue=d||e.params.mailQueue||{},c.selectedTab=e.params.tab||0,c.teamadddialog=function(e,t){n.show({controller:"MailQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailQueues/edit/teamadd/teamadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{mailQueue:e,mailQueues:c.mailQueues?c.mailQueues.rows:[]}})},c.agentadddialog=function(e,t){n.show({controller:"MailQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailQueues/edit/agentadd/agentadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{mailQueue:e,mailQueues:c.mailQueues?c.mailQueues.rows:[],realtime:!1}})},c.alert=r.info,c.gotoMailQueues=function(){e.go("app.mail.mailQueues")},c.saveMailQueue=function(){s.mailQueue.update({id:c.mailQueue.id},c.mailQueue).$promise.then(function(){r.success({title:"MailQueue updated!",msg:c.mailQueue.name?c.mailQueue.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailQueue",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","mailQueue"],angular.module("app.mail").controller("MailQueueController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.mailQueues=r||{count:0,rows:[]},v.table="mailQueues",v.listOrder="",v.listOrderAsc=null,v.selectedMailQueues=[],v.query={fields:"createdAt,updatedAt,id,name,strategy,timeout,description",sort:"-updatedAt",limit:10,page:1},v.arraystrategy=_.keyBy([{option:"Beepall",value:"'beepall'"},{option:"RR Memory",value:"'rrmemory'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.mail.mailQueues.edit",{id:e.id,mailQueue:e})},v.teamadddialog=function(e,t){i.show({controller:"MailQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailQueues/edit/teamadd/teamadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{mailQueue:e,mailQueues:v.mailQueues?v.mailQueues.rows:[]}})},v.agentadddialog=function(e,t){i.show({controller:"MailQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailQueues/edit/agentadd/agentadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{mailQueue:e,mailQueues:v.mailQueues?v.mailQueues.rows:[],realtime:!1}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the mailQueue?").htmlContent("<b>"+(e.name||"mailQueue")+"</b> will be deleted.").ariaLabel("delete mailQueue").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.gotorealtimegoto=function(e,t){n.go("app.mail.realtime.queues",{})},v.success=f,v.getMailQueues=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.mailQueue.get(v.query,f).$promise},v.createOrEditMailQueue=function(e,t){i.show({controller:"CreateOrEditMailQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailQueues/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{mailQueue:t,mailQueues:v.mailQueues.rows,license:v.license,setting:v.setting}})},v.deleteMailQueue=A,v.exportSelectedMailQueues=function(){var e=angular.copy(v.selectedMailQueues);return v.selectedMailQueues=[],e},v.deleteSelectedMailQueues=function(e){var t=i.confirm().title("Are you sure want to delete the selected mailQueues?").htmlContent("<b>"+v.selectedMailQueues.length+" selected</b> will be deleted.").ariaLabel("delete MailQueues").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedMailQueues.forEach(function(e){A(e)}),v.selectedMailQueues=[]})},v.deselectMailQueues=function(){v.selectedMailQueues=[]},v.selectAllMailQueues=function(){v.selectedMailQueues=v.mailQueues.rows};var h=!0,b=1;function f(e){v.mailQueues=e||{count:0,rows:[]}}function A(e){l.mailQueue.delete({id:e.id}).$promise.then(function(){_.remove(v.mailQueues.rows,{id:e.id}),v.mailQueues.count-=1,v.mailQueues.rows.length||v.getMailQueues(),c.success({title:"MailQueue deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEmailQueue"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEmailQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getMailQueues())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","mailQueues","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.mail").controller("MailQueuesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="MAIL.EDIT_MAILSUBSTATUS",m.mailSubstatus=angular.copy(s),m.mailSubtatuses=o,m.newMailSubstatus=!1,m.mailSubstatus||(m.mailSubstatus={},m.title="MAIL.NEW_MAILSUBSTATUS",m.newMailSubstatus=!0),m.addNewMailSubstatus=function(){m.errors=[],r.mailSubstatus.save(m.mailSubstatus).$promise.then(function(e){m.mailSubtatuses.unshift(e.toJSON()),i.success({title:"MailSubstatus properly created",msg:m.mailSubstatus.name?m.mailSubstatus.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailSubstatus.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailSubstatus.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveMailSubstatus=function(){m.errors=[],r.mailSubstatus.update({id:m.mailSubstatus.id},m.mailSubstatus).$promise.then(function(e){var t=_.find(m.mailSubtatuses,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"MailSubstatus properly saved!",msg:m.mailSubstatus.name?m.mailSubstatus.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailSubstatus.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailSubstatus.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteMailSubstatus=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The mailSubstatus will be deleted.").ariaLabel("Delete MailSubstatus").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.mailSubstatus.delete({id:m.mailSubstatus.id}).$promise.then(function(){_.remove(m.mailSubtatuses,{id:m.mailSubstatus.id}),i.success({title:"MailSubstatus properly deleted!",msg:(m.mailSubstatus.name||"mailSubstatus")+" has been deleted!"}),u(m.mailSubstatus)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailSubstatus.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailSubstatus.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","mailSubtatuses","mailSubstatus","api","Auth","license","setting"],angular.module("app.mail").controller("CreateOrEditMailSubstatusDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.mailSubtatuses=r||{count:0,rows:[]},v.table="mailSubtatuses",v.listOrder="",v.listOrderAsc=null,v.selectedMailSubstatuses=[],v.query={fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditMailSubstatusDialogController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailSubtatuses/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{mailSubstatus:e,mailSubtatuses:v.mailSubtatuses.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the mailSubstatus?").htmlContent("<b>"+(e.name||"mailSubstatus")+"</b> will be deleted.").ariaLabel("delete mailSubstatus").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getMailSubstatuses=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.mailSubstatus.get(v.query,f).$promise},v.createOrEditMailSubstatus=function(e,t){i.show({controller:"CreateOrEditMailSubstatusDialogController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailSubtatuses/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{mailSubstatus:t,mailSubtatuses:v.mailSubtatuses.rows,license:v.license,setting:v.setting}})},v.deleteMailSubstatus=A,v.exportSelectedMailSubstatuses=function(){var e=angular.copy(v.selectedMailSubstatuses);return v.selectedMailSubstatuses=[],e},v.deleteSelectedMailSubstatuses=function(e){var t=i.confirm().title("Are you sure want to delete the selected mailSubtatuses?").htmlContent("<b>"+v.selectedMailSubstatuses.length+" selected</b> will be deleted.").ariaLabel("delete MailSubstatuss").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedMailSubstatuses.forEach(function(e){A(e)}),v.selectedMailSubstatuses=[]})},v.deselectMailSubstatuses=function(){v.selectedMailSubstatuses=[]},v.selectAllMailSubstatuses=function(){v.selectedMailSubstatuses=v.mailSubtatuses.rows};var h=!0,b=1;function f(e){v.mailSubtatuses=e||{count:0,rows:[]}}function A(e){l.mailSubstatus.delete({id:e.id}).$promise.then(function(){_.remove(v.mailSubtatuses.rows,{id:e.id}),v.mailSubtatuses.count-=1,v.mailSubtatuses.rows.length||v.getMailSubstatuses(),c.success({title:"MailSubstatus deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEmailSubstatus"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEmailSubstatus",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getMailSubstatuses())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","mailSubtatuses","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.mail").controller("MailSubstatusesController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d){var c=this;function m(){_.forIn(c.mailAccounts,function(e,t){c.rpcMailAccounts[t]&&_.merge(e,c.rpcMailAccounts[t])}),_.forIn(c.mailAccounts,function(t,e){var n={id:e,sort:"-id",direction:"in",limit:1,offset:0,$gte:"createdAt,"+moment().startOf("day").format("YYYY-MM-DD HH:mm:ss")};o.mailAccount.getMessages(n).$promise.then(function(e){return e&&(t.in=e.count||0,t.lastIn=e.rows&&e.rows.length?e.rows[0].createdAt:void 0),n.direction="out",o.mailAccount.getMessages(n).$promise}).then(function(e){e&&(t.out=e.count||0,t.lastOut=e.rows&&e.rows.length?e.rows[0].createdAt:void 0)}).catch(function(e){console.log(e)})})}c.count=l&&l.count?l.count:0,c.mailAccounts=l?_.keyBy(l.rows?l.rows:[],"id"):{},c.rpcMailAccounts=d?_.keyBy(d.rows?d.rows:[],"id"):{},c.query={sort:"-name",limit:10,page:1},c.success=g,c.$onInit=m,c.getMailAccounts=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=o.mailAccount.get(c.query,g).$promise},c.onSave=function(e){c.mailAccounts[e.id]&&_.merge(c.mailAccounts[e.id],e)},c.onMailMessageSave=function(e){c.mailAccounts[e.MailAccountId]&&("in"==e.direction?(c.mailAccounts[e.MailAccountId].in+=1,c.mailAccounts[e.MailAccountId].lastIn=e.createdAt):(c.mailAccounts[e.MailAccountId].out+=1,c.mailAccounts[e.MailAccountId].lastOut=e.createdAt))},c.goToMailAccount=function(e,t){i.go("app.mail.mailAccounts.edit",{id:t.id,mailAccount:t})},c.verifySmtp=function(e,t){{if(t&&t.id)return o.mailAccount.verifySmtp({id:t.id}).$promise.then(function(){r.success({title:"Smtp properly verified",msg:"Connection succeded!"})}).catch(function(e){r.error({title:"Smtp properly verified",msg:e.data?JSON.stringify(e.data):e.toString()})});r.error({title:"Smtp properly verified",msg:"Smpt id unknown"})}},c.order=[],_.forIn(c.mailAccounts,function(e,t){c.order.push(e.id)}),s.on("mailAccount:save",c.onSave),s.on("mailAccount:update",c.onSave),s.on("mailMessage:save",c.onMailMessageSave);var u=!0,p=1;function g(e){if(c.mailAccounts=e?_.keyBy(e.rows?e.rows:[],"id"):{},e.rows){c.order=[];for(var t=0;t<e.rows.length;t++)c.order.push(e.rows[t].id)}m()}e.$watch("vm.query.filter",function(e,t){u?n(function(){u=!1}):(t||(p=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=p),c.getMailAccounts())}),e.$on("$destroy",function(){s.removeAllListeners("mailAccount:save"),s.removeAllListeners("mailAccount:update"),s.removeAllListeners("mailMessage:save")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$state","api","socket","toasty","mailAccounts","rpcMailAccounts"],angular.module("app.mail").controller("MailAccountsRealtimeController",e)}(),function(){"use strict";function e(e,s,t,n,a,i,o,r,l,d,c,m,u,p,g,v){var h=this,b=["userpic","online","lastLoginAt","lastPauseAt","pauseType","lastPauseAt","internal","address","chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","chatCapacity","openchannelCapacity","mailCapacity","smsCapacity","faxCapacity","chatCurrentCapacity","openchannelCurrentCapacity","mailCurrentCapacity","smsCurrentCapacity","faxCurrentCapacity","chatStatus","openchannelStatus","mailStatus","smsStatus","faxStatus","voiceStatus","chatStatusTime","openchannelStatusTime","mailStatusTime","smsStatusTime","faxStatusTime","voiceStatusTime","queue","destconnectedlinenum"],f=["chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","online"];for(var A in h.availableStates=["ringing","inuse","busy","onhold","not_inuse"],h.pauses=o||{count:0,rows:[]},h.license=g,h.agents=r?_.keyBy(r.rows?r.rows:[],"id"):{},h.rpcAgents=l?_.keyBy(l.rows?l.rows:[],"id"):{},h.paginatedAgents={},h.load=!1,h.order=[],h.agentInternal={},h.agents)h.agents.hasOwnProperty(A)&&(h.agents[A].init=!0);h.query={limit:10,page:1,order:"fullname",globalStatusFilter:"",pauseTypeFilter:""},h.logout=function(e,t){return d.user.logout({id:e.id}).$promise.then(function(){m.success({title:"Agent logout",msg:e.fullname+"  properly logout"}),h.agents[e.id]&&(h.agents[e.id].online=!1),h.rpcAgents[e.id]&&(h.rpcAgents[e.id].online=!1),y()}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.queueAdd=function(e,t){n.show({controller:"AgentqueueaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/queueadd/queueadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{agent:e,agents:[],channel:"mail",realtime:!0,direction:"inbound"}})},h.pause=function(t,e){return d.user.pause({id:t.id,type:e}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.unPause=function(t){return d.user.unpause({id:t.id}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.showInfo=function(e){n.show(n.alert().clickOutsideToClose(!0).title("Legend").htmlContent("<div>TODO legend status + state</div>").ok("Ok").targetEvent(e))},h.getAgentStatus=C,h.getAgentGlobalStatus=x,h.isPause=S,h.checkPause=function(e){return"pause"===e},h.isPartialPause=function(e){return"*pause"===e},h.onSave=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(_.omit(e,f),b)),_.merge(h.rpcAgents[e.id],_.pick(_.omit(e,f),b)),x(h.agents[e.id]))},h.onUpdate=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(e,b)),_.merge(h.rpcAgents[e.id],_.pick(e,b)),x(h.agents[e.id]))},h.onInit=y,h.onConnect=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(_.merge(h.agents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])),_.merge(h.rpcAgents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])))},h.onComplete=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(h.agents[h.agentInternal[e.destaccountcode]]=_.omit(h.agents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]),h.rpcAgents[h.agentInternal[e.destaccountcode]]=_.omit(h.rpcAgents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]))},c.on("user:save",h.onSave),c.on("user:update",h.onUpdate),c.on("user:agentconnect",h.onConnect),c.on("user:agentcomplete",h.onComplete),y();var E=v(function(){h.load&&(h.load=!1,y())},999);function y(e){h.load=!1;var t,n,a=s.defer();h.promise=a.promise,h.filteredAgents=[],h.order=[],_.forIn(h.agents,function(e,t){h.rpcAgents[t]&&_.merge(e,_.pick(_.omit(h.rpcAgents[t],f),b)),x(e),e.online?(h.filteredAgents.push(e),h.agentInternal[e.internal]=t):e.globalStatusTime=_.toNumber(moment().format("x"))}),h.query.globalStatusFilter&&_.remove(h.filteredAgents,function(e){return e.globalStatus!==h.query.globalStatusFilter}),h.query.pauseTypeFilter&&_.remove(h.filteredAgents,function(e){return e.pauseType!==h.query.pauseTypeFilter}),h.query.filter&&_.remove(h.filteredAgents,function(e){return e.fullname.toLowerCase().indexOf(h.query.filter.toLowerCase())<0}),h.filteredAgents=(t=h.filteredAgents,n=_.startsWith(h.query.order,"-")?"desc":"asc",_.orderBy(t,[h.query.order.replace("-","")],[n]));var i=(h.query.page-1)*h.query.limit;h.paginatedAgents=_.drop(h.filteredAgents,i).slice(0,h.query.limit);for(var o=0;o<h.paginatedAgents.length;o+=1)h.order.push(h.paginatedAgents[o].id);a.resolve(),h.load=!0}function S(e){return"pause"===e||"*pause"===e}function T(e){return"idle"===e||"unknown"===e||"unavailable"===e||"ringing"===e||_.isNil(e)}function C(e,t){return"voice"===t?"idle"!==e[t+"Status"]?e[t+"Status"]:e[t+"Pause"]?e[t+"Status"]="pause":"idle":e[t+"Pause"]?e[t+"Status"]="pause":e[t+"Status"]}function x(e){var t="unknown";t=_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"pause":_.some([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"*pause":_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],T)?"idle":"busy",e.globalStatus!==t&&(e.globalStatus=t,e.init?(e.init=!1,e.globalStatusTime=S(t)?_.toNumber(moment(e.lastPauseAt).format("x")):_.max([e.voiceStatusTime,e.chatStatusTime,e.mailStatusTime,e.smsStatusTime,e.openchannelStatusTime,e.faxStatusTime])):e.globalStatusTime=_.toNumber(moment().format("x")))}e.$on("$destroy",function(){c.removeAllListeners("user:save"),c.removeAllListeners("user:update"),c.removeAllListeners("user:agentconnect"),c.removeAllListeners("user:agentcomplete"),E&&(v.cancel(E),E=null)})}e.$inject=["$scope","$q","$timeout","$mdDialog","$document","$filter","pauses","agents","rpcAgents","api","socket","toasty","helperClasses","Auth","license","$interval"],angular.module("app.voice").controller("AgentsMailRealtimeController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r,l,d,c,m){var u=this,p=["loggedIn","available","waiting","talking","pTalking","originated","message","dialActive","dialMethod","Trunk","paused"];function g(){var n=[];return _.forIn(u.queues,function(e,t){e.paused=0,e.loggedInDb=0,u.queues[t].agents={},n.push(l.mailQueue.getMembers({id:t}).$promise),u.rpcQueues[t]&&_.merge(e,_.pick(u.rpcQueues[t],p))}),t.all(n).then(function(e){for(var t=0;t<e.length;t+=1)for(var n=0;n<e[t].rows.length;n++)e[t].rows[n].paused&&u.queues[e[t].rows[n].MailQueueId].paused++,u.queues[e[t].rows[n].MailQueueId].loggedInDb++,u.queues[e[t].rows[n].MailQueueId].agents[e[t].rows[n].UserId]=e[t].rows[n].MailQueueId}).catch(function(e){console.error(e)})}u.count=s.count?s.count:0,u.queues=s?_.keyBy(s.rows?s.rows:[],"id"):{},u.rpcQueues=r?_.keyBy(r.rows?r.rows:[],"id"):{},m.hasRole("admin")?u.query={type:"inbound",sort:"-updatedAt",limit:10,page:1}:u.query={id:m.getCurrentUser().id,channel:"mail",type:"inbound",sort:"-updatedAt",limit:10,page:1},u.success=b,u.getQueues=function(){u.query.offset=(u.query.page-1)*u.query.limit,m.hasRole("admin")?u.promise=l.mailQueue.get(u.query,b).$promise:u.promise=l.user.getQueues(u.query,b).$promise},u.createOrEditMailQueue=function(e,t){a.show({controller:"CreateOrEditMailQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailQueues/create/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{mailQueue:t,mailQueues:_.values(u.queues),license:null,setting:null}})},u.agentAdd=function(e,t){a.show({controller:"MailQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailQueues/edit/agentadd/agentadd.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{mailQueue:t,mailQueues:u.queues?u.queues.rows:[],realtime:!1}})},u.updateQueue=function(e){return l.mailQueue.update(e).$promise.then(function(){c.success({title:"Queue properly updated!",msg:e.name?e.name+" has been updated!":""})}).catch(function(e){c.error({title:"Error creating queue!",msg:e.message})})},u.onSave=function(e){u.queues[e.id]&&_.merge(u.queues[e.id],_.pick(e,p))},u.onSaveMember=function(e){u.queues[e.MailQueueId]&&u.queues[e.MailQueueId].loggedInDb++},u.onRemoveMember=function(e){u.queues[e.MailQueueId]&&u.queues[e.MailQueueId].loggedInDb--},u.onPause=function(n){console.log("onPause",n),n.voicePause?_.forIn(u.queues,function(e,t){e.agents[n.id]&&(e.paused+=1,console.log("pause"))}):n.voicePause||_.forIn(u.queues,function(e,t){e.agents[n.id]&&0<e.paused&&(e.paused-=1,console.log("unpause"))})},u.onLogin=function(e){console.log("onLogged",e),u.queues[e.MailQueueId]&&(u.queues[e.MailQueueId].loggedInDb+=1,u.queues[e.MailQueueId].agents[e.UserId]=e.MailQueueId)},u.onLogout=function(e){console.log("onLogout",e),u.queues[e.MailQueueId]&&0<u.queues[e.MailQueueId].loggedInDb&&(u.queues[e.MailQueueId].loggedInDb-=1,delete u.queues[e.MailQueueId].agents[e.UserId])},u.$onInit=g,u.order=[],_.forIn(u.queues,function(e,t){u.order.push(e.id)}),d.on("mail_queue:save",u.onSave),d.on("userMailQueue:save",u.onSaveMember),d.on("userMailQueue:remove",u.onRemoveMember),d.on("user:update",u.onPause),d.on("userVoiceQueue:remove",u.onLogout),d.on("userVoiceQueue:save",u.onLogin);var v=!0,h=1;function b(e){if(u.count=e.count,u.queues=e?_.keyBy(e.rows?e.rows:[],"id"):{},e.rows){u.order=[];for(var t=0;t<e.rows.length;t++)u.order.push(e.rows[t].id)}g()}e.$watch("vm.query.filter",function(e,t){v?n(function(){v=!1}):(t||(h=u.query.page),e!==t&&(u.query.page=1),e||(u.query.page=h),u.getQueues())}),e.$on("$destroy",function(){d.removeAllListeners("mail_queue:save"),d.removeAllListeners("userMailQueue:remove"),d.removeAllListeners("userMailQueue:save"),d.removeAllListeners("user:update"),d.removeAllListeners("userVoiceQueue:remove"),d.removeAllListeners("userVoiceQueue:save")})}e.$inject=["$scope","$timeout","$mdDialog","$q","$document","$interval","queues","rpcQueues","api","socket","toasty","Auth"],angular.module("app.mail").controller("QueuesMailRealtimeController",e)}(),function(){"use strict";angular.module("app.auth").factory("helperClasses",function(){return{status:{registered:"green-300-fg icon-checkbox-marked-circle",unregistered:"red-300-fg icon-close-circle",lagged:"red-300-fg icon-close-circle",reachable:"green-300-fg icon-checkbox-marked-circle",unreachable:"red-300-fg icon-close-circle",unknown:"grey-fg icon-minus-circle"},state:{unknown:"grey-fg icon-phone-hangup",not_inuse:"green-300-fg icon-phone-hangup",inuse:"red-300-fg icon-phone-in-talk",busy:"red-300-fg icon-phone-locked",invalid:"grey-fg icon-phone-hangup",unavailable:"grey-fg icon-phone-hangup",ringing:"blue-300-fg icon-phone-incoming",ringinuse:"blue-300-fg icon-phone-incoming",onhold:"blue-300-fg icon-phone-paused"},channelStatus:{ring:"blue-300-fg icon-phone-incoming",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"},channelStatusOut:{ring:"blue-300-fg icon-phone-outgoing",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"}}})}(),function(){"use strict";function e(e,n,t){switch(t.disconnect(),t.connect(),this.selectedTab=0,n.current.name){case"app.mail.realtime.agents":this.selectedTab=0;break;case"app.mail.realtime.queues":this.selectedTab=1;break;case"app.mail.realtime.accounts":this.selectedTab=2;break;default:this.selectedTab=0,n.go("app.mail.realtime.agents")}e.$watch("vm.selectedTab",function(e,t){if(e!==t)switch(e){case 0:n.go("app.mail.realtime.agents");break;case 1:n.go("app.mail.realtime.queues");break;case 2:n.go("app.mail.realtime.accounts");break;default:n.go("app.mail.realtime.agents")}})}e.$inject=["$scope","$state","socket"],angular.module("app.mail").controller("MailRealtimeController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="MOTIONDIALER.EDIT_IVRCAMPAIGN",m.ivrCampaign=angular.copy(s),m.ivrCampaigns=o,m.newIvrCampaign=!1,m.ivrCampaign||(m.ivrCampaign={active:!0,type:"ivr",dialCheckDuplicateType:"always",limitCalls:30,dialOriginateTimeout:30,dialGlobalMaxRetry:4,dialCongestionMaxRetry:3,dialCongestionRetryFrequency:150,dialBusyMaxRetry:3,dialBusyRetryFrequency:150,dialNoAnswerMaxRetry:3,dialNoAnswerRetryFrequency:150,dialOrderByScheduledAt:"ASC",dialGlobalInterval:"07:00-22:00,*,*,*",dialAMDInitialSilence:2500,dialAMDGreeting:1500,dialAMDAfterGreetingSilence:800,dialAMDTotalAnalysisTime:5e3,dialAMDMinWordLength:100,dialAMDBetweenWordsSilence:50,dialAMDMaximumNumberOfWords:3,dialAMDSilenceThreshold:256,dialAMDMaximumWordLength:5e3},m.title="MOTIONDIALER.NEW_IVRCAMPAIGN",m.newIvrCampaign=!0),m.addNewIvrCampaign=function(){m.errors=[],r.campaign.save(m.ivrCampaign).$promise.then(function(e){m.ivrCampaigns.unshift(e.toJSON()),i.success({title:"IvrCampaign properly created",msg:m.ivrCampaign.name?m.ivrCampaign.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.campaign.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.campaign.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveIvrCampaign=function(){m.errors=[],r.campaign.update({id:m.ivrCampaign.id},m.ivrCampaign).$promise.then(function(e){var t=_.find(m.ivrCampaigns,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"IvrCampaign properly saved!",msg:m.ivrCampaign.name?m.ivrCampaign.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.campaign.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.campaign.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteIvrCampaign=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The ivrCampaign will be deleted.").ariaLabel("Delete IvrCampaign").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.campaign.delete({id:m.ivrCampaign.id}).$promise.then(function(){_.remove(m.ivrCampaigns,{id:m.ivrCampaign.id}),i.success({title:"IvrCampaign properly deleted!",msg:(m.ivrCampaign.name||"ivrCampaign")+" has been deleted!"}),u(m.ivrCampaign)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.campaign.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.campaign.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.trunk.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.trunks=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})}),r.squareProject.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.projects=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETprojects",msg:e.data?JSON.stringify(e.data):e.toString()})}),r.interval.get({fields:"id,name",sort:"name",IntervalId:"null"}).$promise.then(function(e){m.interval=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","ivrCampaigns","ivrCampaign","api","Auth","license","setting"],angular.module("app.motiondialer").controller("CreateOrEditIvrCampaignDialogController",e)}(),function(){"use strict";function e(e,n,a,t,i,o){var s=this;s.ivrCampaign=t,s.items=[],s.selectedItems=[],s.loading=!1,s.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!1,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("MOTIONDIALER.ALL_LISTS"),labelSelected:i.instant("MOTIONDIALER.SELECTED_LISTS"),transferCallback:function(e,t){s.loading=!0,a.campaign[t?"removeBlackLists":"addBlackLists"]({id:s.ivrCampaign.id,ids:_.map(e,"id")}).$promise.then(function(){n.success({title:"List properly "+(t?"removed":"added"),msg:"List has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:ivrCampaign.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})}).finally(function(){s.loading=!1})}},s.closeDialog=function(){e.hide()},a.campaign.getBlackLists({id:s.ivrCampaign.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return s.selectedItems=e.rows?e.rows:[],s.dualMultiselectOptions.selectedItems=s.selectedItems,a.cmList.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){s.items=e.rows?e.rows:[],s.dualMultiselectOptions.items=_.differenceBy(s.items,s.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","ivrCampaign","$translate","$timeout"],angular.module("app.motiondialer").controller("IvrCampaignblacklistaddController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.ivrCampaign={},c.ivrCampaignHopperBlacks={count:0,rows:[]},c.selectedIvrCampaignHopperBlacks=[],c.query={fields:"createdAt,updatedAt,ContactId,phone",sort:"-id",limit:10,page:1},c.init=function(e){c.ivrCampaign=e,c.query.id=c.ivrCampaign.id,c.query.CampaignId=c.ivrCampaign.id,c.getIvrCampaignHopperBlacks()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the hopperBlack?").htmlContent("<b>"+(e.name||"hopperBlack")+"</b> will be deleted.").ariaLabel("delete hopperBlack").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getIvrCampaignHopperBlacks=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.campaign.getHopperBlacks(c.query,p).$promise},c.createOrEditIvrCampaignHopperBlack=function(e,t){o.show({controller:"CreateOrEditHopperBlackDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/hopperBlacks/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{ivrCampaign:c.ivrCampaign,hopperBlack:t,hopperBlacks:c.ivrCampaignHopperBlacks.rows,license:null,setting:null}})},c.exportSelectedIvrCampaignHopperBlacks=function(){var e=angular.copy(c.selectedIvrCampaignHopperBlacks);return c.selectedIvrCampaignHopperBlacks=[],e},c.deleteIvrCampaignHopperBlack=g,c.deleteSelectedIvrCampaignHopperBlacks=function(e){var t=o.confirm().title("Are you sure want to delete the selected hopperBlacks?").htmlContent("<b>"+c.selectedIvrCampaignHopperBlacks.length+" selected</b> will be deleted.").ariaLabel("delete hopperBlacks").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedIvrCampaignHopperBlacks.forEach(function(e){g(e)}),c.selectedIvrCampaignHopperBlacks=[]})};var m=!0,u=1;function p(e){c.ivrCampaignHopperBlacks=e||{count:0,rows:[]}}function g(e){l.hopperBlack.delete({id:e.id}).$promise.then(function(){_.remove(c.ivrCampaignHopperBlacks.rows,{id:e.id}),c.ivrCampaignHopperBlacks.count-=1,c.ivrCampaignHopperBlacks.rows.length||c.getIvrCampaignHopperBlacks(),r.success({title:"HopperBlack deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETcampaign"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcampaign",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getIvrCampaignHopperBlacks())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.motiondialer").controller("IvrCampaignHopperBlacksController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.contacts={},c.ivrCampaign={},c.ivrCampaignHopperFinals={count:0,rows:[]},c.selectedIvrCampaignHopperFinals=[],c.query={fields:"createdAt,updatedAt,uniqueid,ContactId,calleridnum,calleridname,statedesc,countcongestionretry,countbusyretry,countnoanswerretry,countglobal,scheduledat,starttime,responsetime,endtime,disposition,ListId,UserId,VoiceQueueId,CampaignId,recallme,deleted,campaign",sort:"-id",limit:10,page:1},c.init=function(e){c.ivrCampaign=e,c.query.id=c.ivrCampaign.id,c.query.CampaignId=c.ivrCampaign.id,c.getIvrCampaignHopperFinals()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the hopperFinal?").htmlContent("<b>"+(e.name||"hopperFinal")+"</b> will be deleted.").ariaLabel("delete hopperFinal").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getIvrCampaignHopperFinals=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.campaign.getHopperFinals(c.query,p).$promise},c.createOrEditIvrCampaignHopperFinal=function(e,t){o.show({controller:"CreateOrEditHopperFinalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/hopperFinals/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{ivrCampaign:c.ivrCampaign,hopperFinal:t,hopperFinals:c.ivrCampaignHopperFinals.rows,license:null,setting:null}})},c.exportSelectedIvrCampaignHopperFinals=function(){var e=angular.copy(c.selectedIvrCampaignHopperFinals);return c.selectedIvrCampaignHopperFinals=[],e},c.deleteIvrCampaignHopperFinal=g,c.deleteSelectedIvrCampaignHopperFinals=function(e){var t=o.confirm().title("Are you sure want to delete the selected hopperFinals?").htmlContent("<b>"+c.selectedIvrCampaignHopperFinals.length+" selected</b> will be deleted.").ariaLabel("delete hopperFinals").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedIvrCampaignHopperFinals.forEach(function(e){g(e)}),c.selectedIvrCampaignHopperFinals=[]})},c.moveIvrCampaignHopperFinal=v,c.moveContactsIvrCampaignHopperFinal=function(e){l.cmHopperFinal.moveContactsIvrCampaignHopperFinal({id:c.query.id,state:e}).$promise.then(function(e){_.isNil(e)&&_.isNil(e[0])?r.info({title:"Restored Contacts",msg:"0"}):r.info({title:"Restored Contacts",msg:JSON.stringify(e[0].affectedRows)})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},c.countContactsIvrCampaignHopperFinal=function(e){l.cmHopperFinal.countContactsIvrCampaignHopperFinal({id:e}).$promise.then(function(e){_.merge(c.contacts,e[0])}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcampaign",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},c.moveConfirm=function(e,t){var n=o.confirm().title("Are you sure want to restore the contact?").htmlContent("<b>Contact</b> will be restored.").ariaLabel("Restore Contact").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){v(e)},function(){console.log("CANCEL")})},c.moveSelectedIvrCampaignHopperFinals=function(e){var t=o.confirm().title("Are you sure want to restore the selected contacts?").htmlContent("<b> Contacts selected</b> will be restored.").ariaLabel("Restore Contacts").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedIvrCampaignHopperFinals.forEach(function(e){v(e)}),c.selectedIvrCampaignHopperFinals=[]})};var m=!0,u=1;function p(e){c.ivrCampaignHopperFinals=e||{count:0,rows:[]}}function g(e){l.hopperFinal.delete({id:e.id}).$promise.then(function(){_.remove(c.ivrCampaignHopperFinals.rows,{id:e.id}),c.ivrCampaignHopperFinals.count-=1,c.ivrCampaignHopperFinals.rows.length||c.getIvrCampaignHopperFinals(),r.success({title:"HopperFinal deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETcampaign"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcampaign",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}function v(a){l.cmHopperFinal.checkContactHopper(a).$promise.then(function(e){r.info({title:"The contact is in the hopper",msg:"Contact ID "+e.ContactId})}).catch(function(e){var t,n;"Not Found"===e.data?l.cmHopper.save((t=a,n={},n.phone=t.calleridnum,n.scheduledat=moment().format("YYYY-MM-DD HH:mm:ss"),n.countbusyretry=0,n.countcongestionretry=0,n.countnoanswerretry=0,n.countglobal=0,n.ContactId=t.ContactId,n.ListId=t.ListId,n.UserId=t.deleted?null:t.UserId,n.VoiceQueueId=t.VoiceQueueId,n.CampaignId=t.CampaignId,n.priority=t.recallme?3:2,n.recallme=!!t.recallme,n)).$promise.then(function(e){var t,n;r.info({title:"Restored Contact",msg:"Contact ID "+e.ContactId}),e.ContactId&&l.cmHopperHistory.save(((n={}).calleridnum=(t=a).calleridnum,n.calleridname=t.calleridname,n.scheduledat=moment().format("YYYY-MM-DD HH:mm:ss"),n.countbusyretry=t.countbusyretry,n.countcongestionretry=t.countcongestionretry,n.countnoanswerretry=t.countnoanswerretry,n.countglobal=t.countglobal,n.ContactId=t.ContactId,n.ListId=t.ListId,n.UserId=d.getCurrentUser().id,n.VoiceQueueId=t.VoiceQueueId,n.CampaignId=t.CampaignId,n.editedat=moment().format("YYYY-MM-DD HH:mm:ss"),n.edited=!0,n.state=25,n.statedesc="Restored",n.campaign=t.campaign,n.campaigntype=t.VoiceQueueId?"queue":"ivr",n))}).catch(function(e){_.isNil(e.data)||"Validation error"!==e.data.message?r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()}):r.info({title:"The contact is in the hopper",msg:"Contact ID "+a.ContactId})}):r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getIvrCampaignHopperFinals())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.motiondialer").controller("IvrCampaignHopperFinalsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.ivrCampaign={},c.ivrCampaignHopperHistories={count:0,rows:[]},c.selectedIvrCampaignHopperHistories=[],c.query={fields:"createdAt,updatedAt,uniqueid,ContactId,calleridnum,calleridname,statedesc,scheduledat,starttime,responsetime,endtime",sort:"-id",limit:10,page:1},c.init=function(e){c.ivrCampaign=e,c.query.id=c.ivrCampaign.id,c.query.CampaignId=c.ivrCampaign.id,c.getIvrCampaignHopperHistories()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the hopperHistory?").htmlContent("<b>"+(e.name||"hopperHistory")+"</b> will be deleted.").ariaLabel("delete hopperHistory").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getIvrCampaignHopperHistories=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.campaign.getHopperHistories(c.query,p).$promise},c.createOrEditIvrCampaignHopperHistory=function(e,t){o.show({controller:"CreateOrEditHopperHistoryDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/hopperHistories/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{ivrCampaign:c.ivrCampaign,hopperHistory:t,hopperHistories:c.ivrCampaignHopperHistories.rows,license:null,setting:null}})},c.exportSelectedIvrCampaignHopperHistories=function(){var e=angular.copy(c.selectedIvrCampaignHopperHistories);return c.selectedIvrCampaignHopperHistories=[],e},c.deleteIvrCampaignHopperHistory=g,c.deleteSelectedIvrCampaignHopperHistories=function(e){var t=o.confirm().title("Are you sure want to delete the selected hopperHistories?").htmlContent("<b>"+c.selectedIvrCampaignHopperHistories.length+" selected</b> will be deleted.").ariaLabel("delete hopperHistories").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedIvrCampaignHopperHistories.forEach(function(e){g(e)}),c.selectedIvrCampaignHopperHistories=[]})};var m=!0,u=1;function p(e){c.ivrCampaignHopperHistories=e||{count:0,rows:[]}}function g(e){l.hopperHistory.delete({id:e.id}).$promise.then(function(){_.remove(c.ivrCampaignHopperHistories.rows,{id:e.id}),c.ivrCampaignHopperHistories.count-=1,c.ivrCampaignHopperHistories.rows.length||c.getIvrCampaignHopperHistories(),r.success({title:"HopperHistory deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETcampaign"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcampaign",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getIvrCampaignHopperHistories())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.motiondialer").controller("IvrCampaignHopperHistoriesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.ivrCampaign={},c.ivrCampaignHoppers={count:0,rows:[]},c.selectedIvrCampaignHoppers=[],c.query={fields:"createdAt,updatedAt,id,ContactId,phone,countcongestionretry,countbusyretry,countnoanswerretry,scheduledat,priority",sort:"-updatedAt",limit:10,page:1},c.arraypriority=_.keyBy([{option:"Highest",value:"'4'"},{option:"High",value:"'3'"},{option:"Medium",value:"'2'"},{option:"Low",value:"'1'"},{option:"Lowest",value:"'0'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.init=function(e){c.ivrCampaign=e,c.query.id=c.ivrCampaign.id,c.query.CampaignId=c.ivrCampaign.id,c.getIvrCampaignHoppers()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the hopper?").htmlContent("<b>"+(e.name||"hopper")+"</b> will be deleted.").ariaLabel("delete hopper").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getIvrCampaignHoppers=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.campaign.getHoppers(c.query,p).$promise},c.createOrEditIvrCampaignHopper=function(e,t){o.show({controller:"CreateOrEditHopperCampaignIdDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/hoppers/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{ivrCampaign:c.ivrCampaign,hopper:t,hoppers:c.ivrCampaignHoppers.rows,license:null,setting:null}})},c.exportSelectedIvrCampaignHoppers=function(){var e=angular.copy(c.selectedIvrCampaignHoppers);return c.selectedIvrCampaignHoppers=[],e},c.deleteIvrCampaignHopper=g,c.deleteSelectedIvrCampaignHoppers=function(e){var t=o.confirm().title("Are you sure want to delete the selected hoppers?").htmlContent("<b>"+c.selectedIvrCampaignHoppers.length+" selected</b> will be deleted.").ariaLabel("delete hoppers").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedIvrCampaignHoppers.forEach(function(e){g(e)}),c.selectedIvrCampaignHoppers=[]})},l.user.get({fields:"id,name",role:"agent",sort:"name",nolimit:"true"}).$promise.then(function(e){c.agents=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETagents",msg:e.data?JSON.stringify(e.data):e.toString()})});var m=!0,u=1;function p(e){c.ivrCampaignHoppers=e||{count:0,rows:[]}}function g(e){l.cmHopper.delete({id:e.id}).$promise.then(function(){_.remove(c.ivrCampaignHoppers.rows,{id:e.id}),c.ivrCampaignHoppers.count-=1,c.ivrCampaignHoppers.rows.length||c.getIvrCampaignHoppers(),r.success({title:"Hopper deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETcampaign"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcampaign",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getIvrCampaignHoppers())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.motiondialer").controller("IvrCampaignHoppersController",e)}(),function(){"use strict";function e(e,t,n,a,s,i,o,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="MOTIONDIALER.EDIT_HOPPER",m.hopper=angular.copy(o),m.hoppers=i,m.newHopper=!1,m.hopper||(m.hopper={},m.title="MOTIONDIALER.NEW_HOPPER",m.newHopper=!0),t.params.id&&(m.hopper.CampaignId=t.params.id),m.addNewHopper=function(){m.errors=[],r.cmHopper.save(m.hopper).$promise.then(function(e){m.hoppers.unshift(e.toJSON()),s.success({title:"Hopper properly created",msg:m.hopper.name?m.hopper.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmHopper.save"}];for(var t=0;t<e.data.errors.length;t+=1)s.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else s.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmHopper.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveHopper=function(){var n,a,i,o;m.errors=[],m.hopper.UserId=m.hopper.recallme?m.hopper.UserId:null,r.cmHopper.get({id:m.hopper.id,attributes:["scheduledat"]}).$promise.then(function(e){n=_.isNil(e)||_.isEmpty(e)?moment().format("YYYY-MM-DD HH:mm:ss"):e.scheduledat}).finally(function(){r.cmHopper.update({id:m.hopper.id},_.omit(m.hopper,["VoiceQueueId","CampaignId","ContactId","ListId"])).$promise.then(function(e){a=e,r.cmContact.get({id:a.ContactId,attributes:["firstName","lastName"]}).$promise.then(function(e){_.isNil(e)||_.isNil(e.firstName)||(i=e.firstName,_.isNil(e.lastName)||(i+=" "+e.lastName))}).catch(function(){i=void 0}).finally(function(){r.campaign.get({raw:!1,id:a.CampaignId,attributes:["name"]}).$promise.then(function(e){o=e.name}).catch(function(e){o=void 0}).finally(function(){r.cmHopperHistory.save({state:24,statedesc:"Edited",scheduledat:n,calleridnum:a.phone,calleridname:i,campaigntype:a.VoiceQueueId?"queue":"ivr",campaign:o,editedat:moment().format("YYYY-MM-DD HH:mm:ss"),edited:!0,ListId:a.ListId,UserId:l.getCurrentUser().id,VoiceQueueId:a.VoiceQueueId,CampaignId:a.CampaignId,ContactId:a.ContactId,callback:a.callback,callbackuniqueid:a.callbackuniqueid,countbusyretry:a.countbusyretry,countcongestionretry:a.countcongestionretry,countglobal:a.countglobal,countnoanswerretry:a.countnoanswerretry,followuptime:a.followuptime,recallme:a.recallme})})});var t=_.find(m.hoppers,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),s.success({title:"Hopper properly saved!",msg:m.hopper.name?m.hopper.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmHopper.update"}];for(var t=0;t<e.data.errors.length;t++)s.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else s.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmHopper.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})})},m.deleteHopper=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The hopper will be deleted.").ariaLabel("Delete Hopper").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.cmHopper.delete({id:m.hopper.id}).$promise.then(function(){_.remove(m.hoppers,{id:m.hopper.id}),s.success({title:"Hopper properly deleted!",msg:(m.hopper.name||"hopper")+" has been deleted!"}),u(m.hopper)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmHopper.delete"}];for(var t=0;t<e.data.errors.length;t++)s.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else s.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmHopper.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.user.get({fields:"id,name",role:"agent",sort:"name",nolimit:"true"}).$promise.then(function(e){m.agents=e.rows||[]}).catch(function(e){s.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETagents",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","hoppers","hopper","api","Auth","license","setting"],angular.module("app.motiondialer").controller("CreateOrEditHopperCampaignIdDialogController",e)}(),function(){"use strict";function e(n,a){var i=this;i.ivrCampaign={},i.init=function(t){i.ivrCampaign=t,n.cmHopper.get({limit:0,CampaignId:t.id}).$promise.then(function(e){return i.total=e.count||0,n.cmHopper.get({limit:0,CampaignId:t.id,active:!1,countbusyretry:0,countcongestionretry:0,countnoanswerretry:0}).$promise}).then(function(e){return i.fresh=e.count||0,n.cmHopperFinal.get({limit:0,CampaignId:t.id}).$promise}).then(function(e){i.closed=e.count||0}).catch(function(e){a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["api","toasty"],angular.module("app.motiondialer").controller("IvrCampaignHopperStatisticsController",e)}(),function(){"use strict";function e(e,n,a,t,i,o){var s=this;s.ivrCampaign=t,s.items=[],s.selectedItems=[],s.loading=!1,s.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!1,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("MOTIONDIALER.ALL_LISTS"),labelSelected:i.instant("MOTIONDIALER.SELECTED_LISTS"),transferCallback:function(e,t){s.loading=!0,a.campaign[t?"removeLists":"addLists"]({id:s.ivrCampaign.id,ids:_.map(e,"id")}).$promise.then(function(){n.success({title:"List properly "+(t?"removed":"added"),msg:"List has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:ivrCampaign.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})}).finally(function(){s.loading=!1})}},s.closeDialog=function(){e.hide()},a.campaign.getLists({id:s.ivrCampaign.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return s.selectedItems=e.rows?e.rows:[],s.dualMultiselectOptions.selectedItems=s.selectedItems,a.cmList.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){s.items=e.rows?e.rows:[],s.dualMultiselectOptions.items=_.differenceBy(s.items,s.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","ivrCampaign","$translate","$timeout"],angular.module("app.motiondialer").controller("IvrCampaignlistaddController",e)}(),function(){"use strict";function e(e,t,a,i,o,n,s,r){var l=this;function d(){t.hide()}function c(e,t){var n=t.id;s.enqueue(function(){return i.campaign.removeLists({id:e,ids:n}).$promise.then(function(){return i.campaign.addLists({id:e,ids:n,dialCheckDuplicateType:"never"}).$promise}).then(function(){a.success({title:"Reset Succesfull",msg:"List "+t.name+" has been reset"})}).catch(function(e){a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:queueCampaign.RESETLIST",msg:e.status?JSON.stringify(e.data):e.toString()})})})}l.selected=[],l.items=n||[],l.loading=!1,l.closeDialog=d,l.exists=function(e,t){return-1<t.indexOf(e)},l.toggle=function(e,t){var n=t.indexOf(e);-1<n?t.splice(n,1):t.push(e)},l.isIndeterminate=function(){return 0!==l.selected.length&&l.selected.length!==l.items.length},l.isChecked=function(){return l.selected.length===l.items.length},l.toggleAll=function(){l.selected.length===l.items.length?l.selected=[]:(0===l.selected.length||0<l.selected.length)&&(l.selected=l.items.slice(0))},l.listSelected=function(){l.loading=!0,r(function(e,t){for(var n=0;n<l.selected.length;n+=1)c(o.id,l.selected[n]);var a;a=e,s.enqueue(function(){return a()})}).finally(function(){l.loading=!1,d()})}}e.$inject=["$scope","$mdDialog","toasty","api","ivrCampaign","listsCampaign","Sequence","$q"],angular.module("app.motiondialer").controller("IvrCampaignresetlistController",e)}(),function(){"use strict";function e(n,e,i,o,t,a,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=t,c.setting=a,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=e.protocol()+"://"+e.host(),c.ivrCampaign=d||n.params.ivrCampaign||{},c.selectedTab=n.params.tab||0,c.listadddialog=function(e,t){i.show({controller:"IvrCampaignlistaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/listadd/listadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{ivrCampaign:e,ivrCampaigns:c.ivrCampaigns?c.ivrCampaigns.rows:[]}})},c.blacklistadddialog=function(e,t){i.show({controller:"IvrCampaignblacklistaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/blacklistadd/blacklistadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{ivrCampaign:e,ivrCampaigns:c.ivrCampaigns?c.ivrCampaigns.rows:[]}})},c.resetlistdialog=function(t,n){s.campaign.getLists({id:t.id,fields:"id,name",nolimit:!0}).$promise.then(function(a){if(_.isNil(a.rows)||_.isEmpty(a.rows))r.info({title:"Campaign Without Lists"});else if(1===a.rows.length){var e=i.confirm().title("Are you sure want to reset the list "+a.rows[0].name+" ?").htmlContent("<b>"+a.rows[0].name+"</b> will be reset.").ariaLabel("Reset List").targetEvent(n).ok("OK").cancel("CANCEL");i.show(e).then(function(){var e,t,n;e=c.ivrCampaign.id,t=a.rows[0],n=t.id,s.campaign.removeLists({id:e,ids:n}).$promise.then(function(){return s.campaign.addLists({id:e,ids:n,dialCheckDuplicateType:"never"}).$promise}).then(function(){r.success({title:"Reset Succesfull",msg:"List "+t.name+" has been reset"})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:ivrCampaign.REMOVELIST",msg:e.status?JSON.stringify(e.data):e.toString()})})})}else i.show({controller:"IvrCampaignresetlistController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/resetlist/resetlist.html",parent:angular.element(o.body),targetEvent:n,clickOutsideToClose:!1,locals:{ivrCampaign:t,listsCampaign:a?a.rows:[]}})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:RESETLIST",msg:e.status?JSON.stringify(e.data):e.toString()})})},c.gotogoto=function(e,t){n.go("app.motiondialer.realtime.ivr_campaigns",{})},c.alert=r.info,c.gotoIvrCampaigns=function(){n.go("app.motiondialer.ivrCampaigns")},c.saveIvrCampaign=function(){s.campaign.update({id:c.ivrCampaign.id},c.ivrCampaign).$promise.then(function(){r.success({title:"IvrCampaign updated!",msg:c.ivrCampaign.name?c.ivrCampaign.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcampaign",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.trunk.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.trunks=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.squareProject.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.projects=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETprojects",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.interval.get({fields:"id,name",sort:"name",IntervalId:"null"}).$promise.then(function(e){c.interval=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","ivrCampaign"],angular.module("app.motiondialer").controller("IvrCampaignController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.ivrCampaigns=r||{count:0,rows:[]},v.table="ivrCampaigns",v.listOrder="",v.listOrderAsc=null,v.selectedIvrCampaigns=[],v.query={fields:"createdAt,updatedAt,id,name,active,TrunkId,TrunkBackupId,type,IntervalId,dialCheckDuplicateType,SquareProjectId,limitCalls,description,dialOriginateCallerIdName,dialOriginateCallerIdNumber,dialOriginateTimeout,dialGlobalMaxRetry,dialCongestionMaxRetry,dialCongestionRetryFrequency,dialBusyMaxRetry,dialBusyRetryFrequency,dialNoAnswerMaxRetry,dialNoAnswerRetryFrequency,dialOrderByScheduledAt,dialGlobalInterval,dialTimezone,dialPrefix,dialAMDActive,dialAMDInitialSilence,dialAMDGreeting,dialAMDAfterGreetingSilence,dialAMDTotalAnalysisTime,dialAMDMinWordLength,dialAMDBetweenWordsSilence,dialAMDMaximumNumberOfWords,dialAMDSilenceThreshold,dialAMDMaximumWordLength",type:"ivr",sort:"-updatedAt",limit:10,page:1},v.arraydialCheckDuplicateType=_.keyBy([{option:"ALWAYS",value:"'always'"},{option:"NEVER",value:"'never'"},{option:"ONLY_IF_OPEN",value:"'onlyIfOpen'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraydialOrderByScheduledAt=_.keyBy([{option:"DESC",value:"'DESC'"},{option:"ASC",value:"'ASC'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.motiondialer.ivrCampaigns.edit",{id:e.id,ivrCampaign:e})},v.listadddialog=function(e,t){i.show({controller:"IvrCampaignlistaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/listadd/listadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{ivrCampaign:e,ivrCampaigns:v.ivrCampaigns?v.ivrCampaigns.rows:[]}})},v.blacklistadddialog=function(e,t){i.show({controller:"IvrCampaignblacklistaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/blacklistadd/blacklistadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{ivrCampaign:e,ivrCampaigns:v.ivrCampaigns?v.ivrCampaigns.rows:[]}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the ivrCampaign?").htmlContent("<b>"+(e.name||"ivrCampaign")+"</b> will be deleted.").ariaLabel("delete ivrCampaign").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.gotorealtimegoto=function(e,t){n.go("app.motiondialer.realtime.ivr_campaigns",{})},v.success=f,v.getIvrCampaigns=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.campaign.get(v.query,f).$promise},v.createOrEditIvrCampaign=function(e,t){i.show({controller:"CreateOrEditIvrCampaignDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{ivrCampaign:t,ivrCampaigns:v.ivrCampaigns.rows,license:v.license,setting:v.setting}})},v.deleteIvrCampaign=A,v.exportSelectedIvrCampaigns=function(){var e=angular.copy(v.selectedIvrCampaigns);return v.selectedIvrCampaigns=[],e},v.deleteSelectedIvrCampaigns=function(e){var t=i.confirm().title("Are you sure want to delete the selected ivrCampaigns?").htmlContent("<b>"+v.selectedIvrCampaigns.length+" selected</b> will be deleted.").ariaLabel("delete IvrCampaigns").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedIvrCampaigns.forEach(function(e){A(e)}),v.selectedIvrCampaigns=[]})},v.deselectIvrCampaigns=function(){v.selectedIvrCampaigns=[]},v.selectAllIvrCampaigns=function(){v.selectedIvrCampaigns=v.ivrCampaigns.rows},l.trunk.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.trunks=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.squareProject.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.projects=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETprojects",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.interval.get({fields:"id,name",sort:"name",IntervalId:"null"}).$promise.then(function(e){v.interval=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.ivrCampaigns=e||{count:0,rows:[]}}function A(e){l.campaign.delete({id:e.id}).$promise.then(function(){_.remove(v.ivrCampaigns.rows,{id:e.id}),v.ivrCampaigns.count-=1,v.ivrCampaigns.rows.length||v.getIvrCampaigns(),c.success({title:"IvrCampaign deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEcampaign"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEcampaign",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getIvrCampaigns())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","ivrCampaigns","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.motiondialer").controller("IvrCampaignsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="MOTIONDIALER.EDIT_QUEUECAMPAIGN",m.queueCampaign=angular.copy(s),m.queueCampaigns=o,m.newQueueCampaign=!1,m.queueCampaign||(m.queueCampaign={dialActive:!0,type:"outbound",dialCheckDuplicateType:"always",autopause:"no",ringinuse:"no",timeoutrestart:"no",setinterfacevar:"no",setqueuevar:"no",setqueueentryvar:"no",dialOrderByScheduledAt:"ASC",dialGlobalInterval:"07:00-22:00,*,*,*",dialAMDInitialSilence:2500,dialAMDGreeting:1500,dialAMDAfterGreetingSilence:800,dialAMDTotalAnalysisTime:5e3,dialAMDMinWordLength:100,dialAMDBetweenWordsSilence:50,dialAMDMaximumNumberOfWords:3,dialAMDSilenceThreshold:256,dialAMDMaximumWordLength:5e3,dialMethod:"progressive",dialPowerLevel:1,dialPredictiveOptimization:"dropRate",dialPredictiveOptimizationPercentage:3,dialPredictiveInterval:10,dialLimitQueue:0,dialOriginateTimeout:30,dialQueueOptions:"tTxX",dialQueueTimeout:3,strategy:"rrmemory",timeout:3,retry:3,weight:1,dialGlobalMaxRetry:4,dialCongestionMaxRetry:3,dialCongestionRetryFrequency:150,dialBusyMaxRetry:3,dialBusyRetryFrequency:150,dialNoAnswerMaxRetry:3,dialNoAnswerRetryFrequency:150},m.title="MOTIONDIALER.NEW_QUEUECAMPAIGN",m.newQueueCampaign=!0),m.addNewQueueCampaign=function(){m.errors=[],r.voiceQueue.save(m.queueCampaign).$promise.then(function(e){m.queueCampaigns.unshift(e.toJSON()),i.success({title:"QueueCampaign properly created",msg:m.queueCampaign.name?m.queueCampaign.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceQueue.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceQueue.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveQueueCampaign=function(){m.errors=[],r.voiceQueue.update({id:m.queueCampaign.id},m.queueCampaign).$promise.then(function(e){var t=_.find(m.queueCampaigns,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"QueueCampaign properly saved!",msg:m.queueCampaign.name?m.queueCampaign.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceQueue.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceQueue.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteQueueCampaign=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The queueCampaign will be deleted.").ariaLabel("Delete QueueCampaign").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceQueue.delete({id:m.queueCampaign.id}).$promise.then(function(){_.remove(m.queueCampaigns,{id:m.queueCampaign.id}),i.success({title:"QueueCampaign properly deleted!",msg:(m.queueCampaign.name||"queueCampaign")+" has been deleted!"}),u(m.queueCampaign)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceQueue.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceQueue.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.trunk.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.trunks=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})}),r.interval.get({fields:"id,name",sort:"name",IntervalId:"null"}).$promise.then(function(e){m.interval=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","queueCampaigns","queueCampaign","api","Auth","license","setting"],angular.module("app.motiondialer").controller("CreateOrEditQueueCampaignDialogController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r){var l=this;function d(){return a.voiceQueue[l.isVoiceRealtime()?"getMembers":"getAgents"]({id:l.queueCampaign.id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){return l.isVoiceRealtime()?l.selectedItems=e.rows?_.map(e.rows,function(e){return e.id=e.UserId,e.fullname=e.membername,e.penalty=e.hasOwnProperty("penalty")?"penalty "+e.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[]:l.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserQueueCampaign?"penalty "+e.UserQueueCampaign.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.selectedItems=l.selectedItems,r.hasRole("admin")?a.user.get({fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise:a.user.getAgents({id:r.getCurrentUser().id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise}).then(function(e){l.items=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserQueueCampaign?"penalty "+e.UserQueueCampaign.penalty:"",e.internal=e.internal?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.items=_.differenceBy(l.items,l.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETUSERS.GETAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}l.queueCampaign=t,l.penalty=0,l.items=[],l.selectedItems=[],l.closeDialog=function(){e.hide()},l.isVoiceRealtime=function(){return o},l.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"penalty",labelAll:s.instant("MOTIONDIALER.ALL_AGENTS"),labelSelected:s.instant("MOTIONDIALER.SELECTED_AGENTS"),transferCallback:function(e,t){a.voiceQueue[t?"removeAgents":"addAgents"]({id:l.queueCampaign.id,ids:_.map(e,l.isVoiceRealtime()&&t?"UserId":"id"),penalty:l.penalty||0,realtime:o||!1}).$promise.then(function(){n.success({title:"QueueCampaign properly "+(t?"removed":"added"),msg:"QueueCampaign has been "+(t?"removed":"added")+"!"}),t||d()}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:voiceQueue.ADDAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d()}e.$inject=["$mdDialog","toasty","api","queueCampaign","queueCampaigns","realtime","$translate","Auth"],angular.module("app.motiondialer").controller("QueueCampaignagentaddController",e)}(),function(){"use strict";function e(e,n,a,t,i,o){var s=this;s.queueCampaign=t,s.items=[],s.selectedItems=[],s.loading=!1,s.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!1,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("MOTIONDIALER.ALL_LISTS"),labelSelected:i.instant("MOTIONDIALER.SELECTED_LISTS"),transferCallback:function(e,t){s.loading=!0,a.voiceQueue[t?"removeBlackLists":"addBlackLists"]({id:s.queueCampaign.id,ids:_.map(e,"id")}).$promise.then(function(){n.success({title:"List properly "+(t?"removed":"added"),msg:"List has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:queueCampaign.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})}).finally(function(){s.loading=!1})}},s.closeDialog=function(){e.hide()},a.voiceQueue.getBlackLists({id:s.queueCampaign.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return s.selectedItems=e.rows?e.rows:[],s.dualMultiselectOptions.selectedItems=s.selectedItems,a.cmList.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){s.items=e.rows?e.rows:[],s.dualMultiselectOptions.items=_.differenceBy(s.items,s.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","queueCampaign","$translate","$timeout"],angular.module("app.motiondialer").controller("QueueCampaignblacklistaddController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.queueCampaign={},c.queueCampaignHopperBlacks={count:0,rows:[]},c.selectedQueueCampaignHopperBlacks=[],c.query={fields:"createdAt,updatedAt,ContactId,phone",sort:"-id",limit:10,page:1},c.init=function(e){c.queueCampaign=e,c.query.id=c.queueCampaign.id,c.query.VoiceQueueId=c.queueCampaign.id,c.getQueueCampaignHopperBlacks()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the hopperBlack?").htmlContent("<b>"+(e.name||"hopperBlack")+"</b> will be deleted.").ariaLabel("delete hopperBlack").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getQueueCampaignHopperBlacks=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.voiceQueue.getHopperBlacks(c.query,p).$promise},c.createOrEditQueueCampaignHopperBlack=function(e,t){o.show({controller:"CreateOrEditHopperBlackDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/hopperBlacks/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{queueCampaign:c.queueCampaign,hopperBlack:t,hopperBlacks:c.queueCampaignHopperBlacks.rows,license:null,setting:null}})},c.exportSelectedQueueCampaignHopperBlacks=function(){var e=angular.copy(c.selectedQueueCampaignHopperBlacks);return c.selectedQueueCampaignHopperBlacks=[],e},c.deleteQueueCampaignHopperBlack=g,c.deleteSelectedQueueCampaignHopperBlacks=function(e){var t=o.confirm().title("Are you sure want to delete the selected hopperBlacks?").htmlContent("<b>"+c.selectedQueueCampaignHopperBlacks.length+" selected</b> will be deleted.").ariaLabel("delete hopperBlacks").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedQueueCampaignHopperBlacks.forEach(function(e){g(e)}),c.selectedQueueCampaignHopperBlacks=[]})};var m=!0,u=1;function p(e){c.queueCampaignHopperBlacks=e||{count:0,rows:[]}}function g(e){l.hopperBlack.delete({id:e.id}).$promise.then(function(){_.remove(c.queueCampaignHopperBlacks.rows,{id:e.id}),c.queueCampaignHopperBlacks.count-=1,c.queueCampaignHopperBlacks.rows.length||c.getQueueCampaignHopperBlacks(),r.success({title:"HopperBlack deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETvoiceQueue"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getQueueCampaignHopperBlacks())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.motiondialer").controller("QueueCampaignHopperBlacksController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.contacts={},c.queueCampaign={},c.queueCampaignHopperFinals={count:0,rows:[]},c.selectedQueueCampaignHopperFinals=[],c.query={fields:"createdAt,updatedAt,uniqueid,ContactId,calleridnum,calleridname,statedesc,countcongestionretry,countbusyretry,countnoanswerretry,countglobal,scheduledat,starttime,responsetime,endtime,disposition,ListId,UserId,VoiceQueueId,CampaignId,recallme,deleted,campaign",sort:"-id",limit:10,page:1},c.init=function(e){c.queueCampaign=e,c.query.id=c.queueCampaign.id,c.query.VoiceQueueId=c.queueCampaign.id,c.getQueueCampaignHopperFinals()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the hopperFinal?").htmlContent("<b>"+(e.name||"hopperFinal")+"</b> will be deleted.").ariaLabel("delete hopperFinal").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getQueueCampaignHopperFinals=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.voiceQueue.getHopperFinals(c.query,p).$promise},c.createOrEditQueueCampaignHopperFinal=function(e,t){o.show({controller:"CreateOrEditHopperFinalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/hopperFinals/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{queueCampaign:c.queueCampaign,hopperFinal:t,hopperFinals:c.queueCampaignHopperFinals.rows,license:null,setting:null}})},c.exportSelectedQueueCampaignHopperFinals=function(){var e=angular.copy(c.selectedQueueCampaignHopperFinals);return c.selectedQueueCampaignHopperFinals=[],e},c.deleteQueueCampaignHopperFinal=g,c.deleteSelectedQueueCampaignHopperFinals=function(e){var t=o.confirm().title("Are you sure want to delete the selected hopperFinals?").htmlContent("<b>"+c.selectedQueueCampaignHopperFinals.length+" selected</b> will be deleted.").ariaLabel("delete hopperFinals").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedQueueCampaignHopperFinals.forEach(function(e){g(e)}),c.selectedQueueCampaignHopperFinals=[]})},c.moveQueueCampaignHopperFinal=v,c.moveContactsQueueCampaignHopperFinal=function(e){l.cmHopperFinal.moveContactsQueueCampaignHopperFinal({id:c.query.id,state:e}).$promise.then(function(e){_.isNil(e)&&_.isNil(e[0])?r.info({title:"Restored Contacts",msg:"0"}):r.info({title:"Restored Contacts",msg:JSON.stringify(e[0].affectedRows)})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},c.countContactsQueueCampaignHopperFinal=function(e){l.cmHopperFinal.countContactsQueueCampaignHopperFinal({id:e}).$promise.then(function(e){_.merge(c.contacts,e[0])}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},c.moveConfirm=function(e,t){var n=o.confirm().title("Are you sure want to restore the contact?").htmlContent("<b>Contact</b> will be restored.").ariaLabel("Restore Contact").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){v(e)},function(){console.log("CANCEL")})},c.moveSelectedQueueCampaignHopperFinals=function(e){var t=o.confirm().title("Are you sure want to restore the selected contacts?").htmlContent("<b> Contacts selected</b> will be restored.").ariaLabel("Restore Contacts").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedQueueCampaignHopperFinals.forEach(function(e){v(e)}),c.selectedQueueCampaignHopperFinals=[]})};var m=!0,u=1;function p(e){c.queueCampaignHopperFinals=e||{count:0,rows:[]}}function g(e){l.hopperFinal.delete({id:e.id}).$promise.then(function(){_.remove(c.queueCampaignHopperFinals.rows,{id:e.id}),c.queueCampaignHopperFinals.count-=1,c.queueCampaignHopperFinals.rows.length||c.getQueueCampaignHopperFinals(),r.success({title:"HopperFinal deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETvoiceQueue"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}function v(a){l.cmHopperFinal.checkContactHopper(a).$promise.then(function(e){r.info({title:"The contact is in the hopper",msg:"Contact ID "+e.ContactId})}).catch(function(e){var t,n;"Not Found"===e.data?l.cmHopper.save((t=a,n={},n.phone=t.calleridnum,n.scheduledat=moment().format("YYYY-MM-DD HH:mm:ss"),n.countbusyretry=0,n.countcongestionretry=0,n.countnoanswerretry=0,n.countglobal=0,n.ContactId=t.ContactId,n.ListId=t.ListId,n.UserId=t.deleted?null:t.UserId,n.VoiceQueueId=t.VoiceQueueId,n.CampaignId=t.CampaignId,n.priority=t.recallme?3:2,n.recallme=!!t.recallme,n)).$promise.then(function(e){var t,n;r.info({title:"Restored Contact",msg:"Contact ID "+e.ContactId}),e.ContactId&&l.cmHopperHistory.save(((n={}).calleridnum=(t=a).calleridnum,n.calleridname=t.calleridname,n.scheduledat=moment().format("YYYY-MM-DD HH:mm:ss"),n.countbusyretry=t.countbusyretry,n.countcongestionretry=t.countcongestionretry,n.countnoanswerretry=t.countnoanswerretry,n.countglobal=t.countglobal,n.ContactId=t.ContactId,n.ListId=t.ListId,n.UserId=d.getCurrentUser().id,n.VoiceQueueId=t.VoiceQueueId,n.CampaignId=t.CampaignId,n.editedat=moment().format("YYYY-MM-DD HH:mm:ss"),n.edited=!0,n.state=25,n.statedesc="Restored",n.campaign=t.campaign,n.campaigntype=t.VoiceQueueId?"queue":"ivr",n))}).catch(function(e){_.isNil(e.data)||"Validation error"!==e.data.message?r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()}):r.info({title:"The contact is in the hopper",msg:"Contact ID "+a.ContactId})}):r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getQueueCampaignHopperFinals())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.motiondialer").controller("QueueCampaignHopperFinalsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.queueCampaign={},c.queueCampaignHopperHistories={count:0,rows:[]},c.selectedQueueCampaignHopperHistories=[],c.query={fields:"createdAt,updatedAt,uniqueid,ContactId,calleridnum,calleridname,statedesc,scheduledat,starttime,responsetime,endtime",sort:"-id",limit:10,page:1},c.init=function(e){c.queueCampaign=e,c.query.id=c.queueCampaign.id,c.query.VoiceQueueId=c.queueCampaign.id,c.getQueueCampaignHopperHistories()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the hopperHistory?").htmlContent("<b>"+(e.name||"hopperHistory")+"</b> will be deleted.").ariaLabel("delete hopperHistory").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getQueueCampaignHopperHistories=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.voiceQueue.getHopperHistories(c.query,p).$promise},c.createOrEditQueueCampaignHopperHistory=function(e,t){o.show({controller:"CreateOrEditHopperHistoryDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/hopperHistories/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{queueCampaign:c.queueCampaign,hopperHistory:t,hopperHistories:c.queueCampaignHopperHistories.rows,license:null,setting:null}})},c.exportSelectedQueueCampaignHopperHistories=function(){var e=angular.copy(c.selectedQueueCampaignHopperHistories);return c.selectedQueueCampaignHopperHistories=[],e},c.deleteQueueCampaignHopperHistory=g,c.deleteSelectedQueueCampaignHopperHistories=function(e){var t=o.confirm().title("Are you sure want to delete the selected hopperHistories?").htmlContent("<b>"+c.selectedQueueCampaignHopperHistories.length+" selected</b> will be deleted.").ariaLabel("delete hopperHistories").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedQueueCampaignHopperHistories.forEach(function(e){g(e)}),c.selectedQueueCampaignHopperHistories=[]})};var m=!0,u=1;function p(e){c.queueCampaignHopperHistories=e||{count:0,rows:[]}}function g(e){l.hopperHistory.delete({id:e.id}).$promise.then(function(){_.remove(c.queueCampaignHopperHistories.rows,{id:e.id}),c.queueCampaignHopperHistories.count-=1,c.queueCampaignHopperHistories.rows.length||c.getQueueCampaignHopperHistories(),r.success({title:"HopperHistory deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETvoiceQueue"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getQueueCampaignHopperHistories())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.motiondialer").controller("QueueCampaignHopperHistoriesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.queueCampaign={},c.queueCampaignHoppers={count:0,rows:[]},c.selectedQueueCampaignHoppers=[],c.query={fields:"createdAt,updatedAt,id,ContactId,phone,countcongestionretry,countbusyretry,countnoanswerretry,scheduledat,priority,recallme,UserId",sort:"-updatedAt",limit:10,page:1},c.arraypriority=_.keyBy([{option:"Highest",value:"'4'"},{option:"High",value:"'3'"},{option:"Medium",value:"'2'"},{option:"Low",value:"'1'"},{option:"Lowest",value:"'0'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.init=function(e){c.queueCampaign=e,c.query.id=c.queueCampaign.id,c.query.VoiceQueueId=c.queueCampaign.id,c.getQueueCampaignHoppers()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the hopper?").htmlContent("<b>"+(e.name||"hopper")+"</b> will be deleted.").ariaLabel("delete hopper").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getQueueCampaignHoppers=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.voiceQueue.getHoppers(c.query,p).$promise},c.createOrEditQueueCampaignHopper=function(e,t){o.show({controller:"CreateOrEditHopperVoiceQueueIdDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/hoppers/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{queueCampaign:c.queueCampaign,hopper:t,hoppers:c.queueCampaignHoppers.rows,license:null,setting:null}})},c.exportSelectedQueueCampaignHoppers=function(){var e=angular.copy(c.selectedQueueCampaignHoppers);return c.selectedQueueCampaignHoppers=[],e},c.deleteQueueCampaignHopper=g,c.deleteSelectedQueueCampaignHoppers=function(e){var t=o.confirm().title("Are you sure want to delete the selected hoppers?").htmlContent("<b>"+c.selectedQueueCampaignHoppers.length+" selected</b> will be deleted.").ariaLabel("delete hoppers").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedQueueCampaignHoppers.forEach(function(e){g(e)}),c.selectedQueueCampaignHoppers=[]})},l.user.get({fields:"id,name",role:"agent",sort:"name",nolimit:"true"}).$promise.then(function(e){c.agents=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETagents",msg:e.data?JSON.stringify(e.data):e.toString()})});var m=!0,u=1;function p(e){c.queueCampaignHoppers=e||{count:0,rows:[]}}function g(e){l.cmHopper.delete({id:e.id}).$promise.then(function(){_.remove(c.queueCampaignHoppers.rows,{id:e.id}),c.queueCampaignHoppers.count-=1,c.queueCampaignHoppers.rows.length||c.getQueueCampaignHoppers(),r.success({title:"Hopper deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETvoiceQueue"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getQueueCampaignHoppers())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.motiondialer").controller("QueueCampaignHoppersController",e)}(),function(){"use strict";function e(e,t,n,a,s,i,o,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="MOTIONDIALER.EDIT_HOPPER",m.hopper=angular.copy(o),m.hoppers=i,m.newHopper=!1,m.hopper||(m.hopper={},m.title="MOTIONDIALER.NEW_HOPPER",m.newHopper=!0),t.params.id&&(m.hopper.VoiceQueueId=t.params.id),m.addNewHopper=function(){m.errors=[],r.cmHopper.save(m.hopper).$promise.then(function(e){m.hoppers.unshift(e.toJSON()),s.success({title:"Hopper properly created",msg:m.hopper.name?m.hopper.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmHopper.save"}];for(var t=0;t<e.data.errors.length;t+=1)s.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else s.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmHopper.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveHopper=function(){var n,a,i,o;m.errors=[],m.hopper.UserId=m.hopper.recallme?m.hopper.UserId:null,r.cmHopper.get({id:m.hopper.id,attributes:["scheduledat"]}).$promise.then(function(e){n=_.isNil(e)||_.isEmpty(e)?moment().format("YYYY-MM-DD HH:mm:ss"):e.scheduledat}).finally(function(){r.cmHopper.update({id:m.hopper.id},_.omit(m.hopper,["VoiceQueueId","CampaignId","ContactId","ListId"])).$promise.then(function(e){a=e,r.cmContact.get({id:a.ContactId,attributes:["firstName","lastName"]}).$promise.then(function(e){_.isNil(e)||_.isNil(e.firstName)||(i=e.firstName,_.isNil(e.lastName)||(i+=" "+e.lastName))}).catch(function(){i=void 0}).finally(function(){r.voiceQueue.get({raw:!1,id:a.VoiceQueueId,attributes:["name"]}).$promise.then(function(e){o=e.name}).catch(function(e){o=void 0}).finally(function(){r.cmHopperHistory.save({state:24,statedesc:"Edited",scheduledat:n,calleridnum:a.phone,calleridname:i,campaigntype:a.VoiceQueueId?"queue":"ivr",campaign:o,editedat:moment().format("YYYY-MM-DD HH:mm:ss"),edited:!0,ListId:a.ListId,UserId:l.getCurrentUser().id,VoiceQueueId:a.VoiceQueueId,CampaignId:a.CampaignId,ContactId:a.ContactId,callback:a.callback,callbackuniqueid:a.callbackuniqueid,countbusyretry:a.countbusyretry,countcongestionretry:a.countcongestionretry,countglobal:a.countglobal,countnoanswerretry:a.countnoanswerretry,followuptime:a.followuptime,recallme:a.recallme})})});var t=_.find(m.hoppers,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),s.success({title:"Hopper properly saved!",msg:m.hopper.name?m.hopper.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmHopper.update"}];for(var t=0;t<e.data.errors.length;t++)s.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else s.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmHopper.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})})},m.deleteHopper=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The hopper will be deleted.").ariaLabel("Delete Hopper").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.cmHopper.delete({id:m.hopper.id}).$promise.then(function(){_.remove(m.hoppers,{id:m.hopper.id}),s.success({title:"Hopper properly deleted!",msg:(m.hopper.name||"hopper")+" has been deleted!"}),u(m.hopper)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmHopper.delete"}];for(var t=0;t<e.data.errors.length;t++)s.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else s.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmHopper.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.user.get({fields:"id,name",role:"agent",sort:"name",nolimit:"true"}).$promise.then(function(e){m.agents=e.rows||[]}).catch(function(e){s.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETagents",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","hoppers","hopper","api","Auth","license","setting"],angular.module("app.motiondialer").controller("CreateOrEditHopperVoiceQueueIdDialogController",e)}(),function(){"use strict";function e(n,a){var i=this;i.queueCampaign={},i.init=function(t){i.queueCampaign=t,n.cmHopper.get({limit:0,VoiceQueueId:t.id}).$promise.then(function(e){return i.total=e.count||0,n.cmHopper.get({limit:0,VoiceQueueId:t.id,active:!1,countbusyretry:0,countcongestionretry:0,countnoanswerretry:0}).$promise}).then(function(e){return i.fresh=e.count||0,n.cmHopperFinal.get({limit:0,VoiceQueueId:t.id}).$promise}).then(function(e){i.closed=e.count||0}).catch(function(e){a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["api","toasty"],angular.module("app.motiondialer").controller("QueueCampaignHopperStatisticsController",e)}(),function(){"use strict";function e(e,n,a,t,i,o){var s=this;s.queueCampaign=t,s.items=[],s.selectedItems=[],s.loading=!1,s.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!1,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("MOTIONDIALER.ALL_LISTS"),labelSelected:i.instant("MOTIONDIALER.SELECTED_LISTS"),transferCallback:function(e,t){s.loading=!0,a.voiceQueue[t?"removeLists":"addLists"]({id:s.queueCampaign.id,ids:_.map(e,"id")}).$promise.then(function(){n.success({title:"List properly "+(t?"removed":"added"),msg:"List has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:queueCampaign.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})}).finally(function(){s.loading=!1})}},s.closeDialog=function(){e.hide()},a.voiceQueue.getLists({id:s.queueCampaign.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return s.selectedItems=e.rows?e.rows:[],s.dualMultiselectOptions.selectedItems=s.selectedItems,a.cmList.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){s.items=e.rows?e.rows:[],s.dualMultiselectOptions.items=_.differenceBy(s.items,s.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","queueCampaign","$translate","$timeout"],angular.module("app.motiondialer").controller("QueueCampaignlistaddController",e)}(),function(){"use strict";function e(e,t,a,i,o,n,s,r){var l=this;function d(){t.hide()}function c(e,t){var n=t.id;s.enqueue(function(){return i.voiceQueue.removeLists({id:e,ids:n}).$promise.then(function(){return i.voiceQueue.addLists({id:e,ids:n,dialCheckDuplicateType:"never"}).$promise}).then(function(){a.success({title:"Reset Succesfull",msg:"List "+t.name+" has been reset"})}).catch(function(e){a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:queueCampaign.RESETLIST",msg:e.status?JSON.stringify(e.data):e.toString()})})})}l.selected=[],l.items=n||[],l.loading=!1,l.closeDialog=d,l.exists=function(e,t){return-1<t.indexOf(e)},l.toggle=function(e,t){var n=t.indexOf(e);-1<n?t.splice(n,1):t.push(e)},l.isIndeterminate=function(){return 0!==l.selected.length&&l.selected.length!==l.items.length},l.isChecked=function(){return l.selected.length===l.items.length},l.toggleAll=function(){l.selected.length===l.items.length?l.selected=[]:(0===l.selected.length||0<l.selected.length)&&(l.selected=l.items.slice(0))},l.listSelected=function(){l.loading=!0,r(function(e,t){for(var n=0;n<l.selected.length;n+=1)c(o.id,l.selected[n]);var a;a=e,s.enqueue(function(){return a()})}).finally(function(){l.loading=!1,d()})}}e.$inject=["$scope","$mdDialog","toasty","api","queueCampaign","listsCampaign","Sequence","$q"],angular.module("app.motiondialer").controller("QueueCampaignresetlistController",e)}(),function(){"use strict";function e(e,n,a,t,i){var o=this;o.queueCampaign=t,o.penalty=0,o.items=[],o.selectedItems=[],o.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("MOTIONDIALER.ALL_TEAMS"),labelSelected:i.instant("MOTIONDIALER.SELECTED_TEAMS"),transferCallback:function(e,t){a.voiceQueue[t?"removeTeams":"addTeams"]({id:o.queueCampaign.id,ids:_.map(e,"id"),penalty:o.penalty||0}).$promise.then(function(){n.success({title:"Team properly "+(t?"removed":"added"),msg:"Team has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:queueCampaign.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},o.closeDialog=function(){e.hide()},a.voiceQueue.getTeams({id:o.queueCampaign.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return o.selectedItems=e.rows?e.rows:[],o.dualMultiselectOptions.selectedItems=o.selectedItems,a.team.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){o.items=e.rows?e.rows:[],o.dualMultiselectOptions.items=_.differenceBy(o.items,o.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","queueCampaign","$translate"],angular.module("app.motiondialer").controller("QueueCampaignteamaddController",e)}(),function(){"use strict";function e(n,e,i,o,t,a,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=t,c.setting=a,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=e.protocol()+"://"+e.host(),c.queueCampaign=d||n.params.queueCampaign||{},c.selectedTab=n.params.tab||0,c.listadddialog=function(e,t){i.show({controller:"QueueCampaignlistaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/listadd/listadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{queueCampaign:e,queueCampaigns:c.queueCampaigns?c.queueCampaigns.rows:[]}})},c.blacklistadddialog=function(e,t){i.show({controller:"QueueCampaignblacklistaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/blacklistadd/blacklistadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{queueCampaign:e,queueCampaigns:c.queueCampaigns?c.queueCampaigns.rows:[]}})},c.teamadddialog=function(e,t){i.show({controller:"QueueCampaignteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/teamadd/teamadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{queueCampaign:e,queueCampaigns:c.queueCampaigns?c.queueCampaigns.rows:[]}})},c.agentadddialog=function(e,t){i.show({controller:"QueueCampaignagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/agentadd/agentadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{queueCampaign:e,queueCampaigns:c.queueCampaigns?c.queueCampaigns.rows:[],realtime:!1}})},c.resetlistdialog=function(t,n){s.voiceQueue.getLists({id:t.id,fields:"id,name",nolimit:!0}).$promise.then(function(a){if(_.isNil(a.rows)||_.isEmpty(a.rows))r.info({title:"Campaign Without Lists"});else if(1===a.rows.length){var e=i.confirm().title("Are you sure want to reset the list "+a.rows[0].name+" ?").htmlContent("<b>"+a.rows[0].name+"</b> will be reset.").ariaLabel("Reset List").targetEvent(n).ok("OK").cancel("CANCEL");i.show(e).then(function(){var e,t,n;e=c.queueCampaign.id,t=a.rows[0],n=t.id,s.voiceQueue.removeLists({id:e,ids:n}).$promise.then(function(){return s.voiceQueue.addLists({id:e,ids:n,dialCheckDuplicateType:"never"}).$promise}).then(function(){r.success({title:"Reset Succesfull",msg:"List "+t.name+" has been reset"})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:queueCampaign.REMOVELIST",msg:e.status?JSON.stringify(e.data):e.toString()})})})}else i.show({controller:"QueueCampaignresetlistController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/resetlist/resetlist.html",parent:angular.element(o.body),targetEvent:n,clickOutsideToClose:!1,locals:{queueCampaign:t,listsCampaign:a?a.rows:[]}})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:RESETLIST",msg:e.status?JSON.stringify(e.data):e.toString()})})},c.gotogoto=function(e,t){n.go("app.motiondialer.realtime.queues",{})},c.alert=r.info,c.gotoQueueCampaigns=function(){n.go("app.motiondialer.queueCampaigns")},c.saveQueueCampaign=function(){s.voiceQueue.update({id:c.queueCampaign.id},c.queueCampaign).$promise.then(function(){r.success({title:"QueueCampaign updated!",msg:c.queueCampaign.name?c.queueCampaign.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.voiceMusicOnHold.get({fields:"name",nolimit:"true"}).$promise.then(function(e){c.musiconholds=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmusiconholds",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.trunk.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.trunks=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.squareProject.get({fields:"name",sort:"name"}).$promise.then(function(e){c.projects=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETprojects",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.interval.get({fields:"id,name",sort:"name",IntervalId:"null"}).$promise.then(function(e){c.interval=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","queueCampaign"],angular.module("app.motiondialer").controller("QueueCampaignController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.queueCampaigns=r||{count:0,rows:[]},v.table="queueCampaigns",v.listOrder="",v.listOrderAsc=null,v.selectedQueueCampaigns=[],v.query={fields:"createdAt,updatedAt,id,name,dialActive,TrunkId,TrunkBackupId,type,IntervalId,dialCheckDuplicateType,acw,acwTimeout,autopause,ringinuse,memberdelay,timeoutrestart,monitor_format,context,setinterfacevar,setqueuevar,setqueueentryvar,dialOrderByScheduledAt,dialRecallMeTimeout,dialRecallInQueue,dialGlobalInterval,dialTimezone,dialAMDActive,dialAMDInitialSilence,dialAMDGreeting,dialAMDAfterGreetingSilence,dialAMDTotalAnalysisTime,dialAMDMinWordLength,dialAMDBetweenWordsSilence,dialAMDMaximumNumberOfWords,dialAMDSilenceThreshold,dialAMDMaximumWordLength,dialMethod,dialPowerLevel,dialPredictiveOptimization,dialPredictiveOptimizationPercentage,dialPredictiveInterval,dialLimitQueue,dialOriginateCallerIdName,dialOriginateCallerIdNumber,dialOriginateTimeout,dialPrefix,dialQueueOptions,dialQueueTimeout,strategy,timeout,retry,wrapuptime,weight,musiconhold,dialQueueProject,dialQueueProject2,dialQueueProject,dialQueueProject2,dialAgiAfterHangupAgent,dialGlobalMaxRetry,dialCongestionMaxRetry,dialCongestionRetryFrequency,dialBusyMaxRetry,dialBusyRetryFrequency,dialNoAnswerMaxRetry,dialNoAnswerRetryFrequency,description",type:"outbound",sort:"-updatedAt",channel:"voice",limit:10,page:1},v.arraydialCheckDuplicateType=_.keyBy([{option:"ALWAYS",value:"'always'"},{option:"NEVER",value:"'never'"},{option:"ONLY_IF_OPEN",value:"'onlyIfOpen'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayautopause=_.keyBy([{option:"Yes",value:"'all'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayringinuse=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraytimeoutrestart=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraymonitor_format=_.keyBy([{option:"Inactive",value:"''"},{option:"wav",value:"'wav'"},{option:"wav49",value:"'wav49'"},{option:"gsm",value:"'gsm'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraysetinterfacevar=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraysetqueuevar=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraysetqueueentryvar=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraydialOrderByScheduledAt=_.keyBy([{option:"DESC",value:"'DESC'"},{option:"ASC",value:"'ASC'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraydialMethod=_.keyBy([{option:"Progressive",value:"'progressive'"},{option:"PowerDialing",value:"'power'"},{option:"Predictive",value:"'predictive'"},{option:"Preview",value:"'preview'"},{option:"BookedProgressive",value:"'booked'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraydialPredictiveOptimization=_.keyBy([{option:"AgentBusyFactor",value:"'agentBusyFactor'"},{option:"DropRate",value:"'dropRate'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraystrategy=_.keyBy([{option:"Round Robin Memory",value:"'rrmemory'"},{option:"Round Robin",value:"'roundrobin'",ngIf:"vm.queueCampaign.dialMethod === 'booked'"},{option:"Least Recent",value:"'leastrecent'",ngIf:"vm.queueCampaign.dialMethod !== 'booked'"},{option:"Fewest Calls",value:"'fewestcalls'",ngIf:"vm.queueCampaign.dialMethod !== 'booked'"},{option:"Random",value:"'random'",ngIf:"vm.queueCampaign.dialMethod !== 'booked'"},{option:"Linear",value:"'linear'",ngIf:"vm.queueCampaign.dialMethod !== 'booked'"},{option:"Weight Random",value:"'wrandom'",ngIf:"vm.queueCampaign.dialMethod !== 'booked'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.motiondialer.queueCampaigns.edit",{id:e.id,queueCampaign:e})},v.listadddialog=function(e,t){i.show({controller:"QueueCampaignlistaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/listadd/listadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{queueCampaign:e,queueCampaigns:v.queueCampaigns?v.queueCampaigns.rows:[]}})},v.blacklistadddialog=function(e,t){i.show({controller:"QueueCampaignblacklistaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/blacklistadd/blacklistadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{queueCampaign:e,queueCampaigns:v.queueCampaigns?v.queueCampaigns.rows:[]}})},v.teamadddialog=function(e,t){i.show({controller:"QueueCampaignteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/teamadd/teamadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{queueCampaign:e,queueCampaigns:v.queueCampaigns?v.queueCampaigns.rows:[]}})},v.agentadddialog=function(e,t){i.show({controller:"QueueCampaignagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/agentadd/agentadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{queueCampaign:e,queueCampaigns:v.queueCampaigns?v.queueCampaigns.rows:[],realtime:!1}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the queueCampaign?").htmlContent("<b>"+(e.name||"queueCampaign")+"</b> will be deleted.").ariaLabel("delete queueCampaign").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.gotorealtimegoto=function(e,t){n.go("app.motiondialer.realtime.queues",{})},v.success=f,v.getQueueCampaigns=function(){v.query.offset=(v.query.page-1)*v.query.limit,m.hasRole("admin")?v.promise=l.voiceQueue.get(v.query,f).$promise:(v.query.id=v.currentUser.id,v.promise=l.user.getQueues(v.query,f).$promise)},v.createOrEditQueueCampaign=function(e,t){i.show({controller:"CreateOrEditQueueCampaignDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{queueCampaign:t,queueCampaigns:v.queueCampaigns.rows,license:v.license,setting:v.setting}})},v.deleteQueueCampaign=A,v.exportSelectedQueueCampaigns=function(){var e=angular.copy(v.selectedQueueCampaigns);return v.selectedQueueCampaigns=[],e},v.deleteSelectedQueueCampaigns=function(e){var t=i.confirm().title("Are you sure want to delete the selected queueCampaigns?").htmlContent("<b>"+v.selectedQueueCampaigns.length+" selected</b> will be deleted.").ariaLabel("delete QueueCampaigns").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedQueueCampaigns.forEach(function(e){A(e)}),v.selectedQueueCampaigns=[]})},v.deselectQueueCampaigns=function(){v.selectedQueueCampaigns=[]},v.selectAllQueueCampaigns=function(){v.selectedQueueCampaigns=v.queueCampaigns.rows},l.trunk.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.trunks=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.interval.get({fields:"id,name",sort:"name",IntervalId:"null"}).$promise.then(function(e){v.interval=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.queueCampaigns=e||{count:0,rows:[]}}function A(e){l.voiceQueue.delete({id:e.id}).$promise.then(function(){_.remove(v.queueCampaigns.rows,{id:e.id}),v.queueCampaigns.count-=1,v.queueCampaigns.rows.length||v.getQueueCampaigns(),c.success({title:"QueueCampaign deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvoiceQueue"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getQueueCampaigns())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","queueCampaigns","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.motiondialer").controller("QueueCampaignsController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d,c,m){var u=this,p=!0;function g(){var e=i.localStorage.getItem("motion2.realtime.abandoned.bull.contacts:"+u.currentUser.id);e&&(e=JSON.parse(e))&&e.query&&(u.query=_.merge(e.query,_.omit(u.query,["sort","limit","page"])),u.query=_.omit(u.query,"filter")),s.voiceDisposition.get().$promise.then(function(e){u.disposition=e?e.rows:[]}).catch(function(e){console.log(e)}),s.user.getQueues({id:r.getCurrentUser().id,fields:"id,name",channel:"voice",type:"outbound",nolimit:!0}).$promise.then(function(e){u.queues=e||{count:0,rows:[]},u.queuesMap=_.mapValues(_.keyBy(u.queues.rows,"name"),"name")}).catch(function(e){console.error(e)}).finally(function(){u.getContacts()})}function v(e){u.contacts=e||{count:0,rows:[]},p=!1,u.refresh=!0}u.showTooltip=!1,u.refresh=!0,u.disable=[],u.agents=m||[],u.currentUser=r.getCurrentUser(),u.localizationMap=c,u.pickerModel={dateStart:null,dateEnd:null},u.queues={},u.contacts={count:0,rows:[]},u.query={fields:"id,type,calleridnum,calleridname,queue,queuecallerabandonAt,queuecallerexitAt,queuecallerexitreason,assigned,lastAssignedTo,updatedAt,disposition",type:"outbound",queuecallerexitreason:"TIMEOUT,ABANDONED",sort:"-updatedAt",limit:10,page:1},u.clearAll=function(){u.query.dateStart=void 0,u.query.dateEnd=void 0,u.pickerModel={dateStart:null,dateEnd:null},u.getContacts()},u.getContacts=function(){u.refresh=!1,u.query.dateStart=void 0,u.query.dateEnd=void 0,u.pickerModel.dateStart&&!p&&(u.query.dateStart=u.pickerModel.dateStart,u.query.dateEnd=u.pickerModel.dateEnd);u.query.queue=u.query.queue,u.query.offset=(u.query.page-1)*u.query.limit,i.localStorage.setItem("motion2.realtime.abandoned.bull.contacts:"+u.currentUser.id,JSON.stringify({query:_.omit(u.query,"queue")})),u.promise=s.voiceQueueReport.getVoiceQueuesReport(u.query,v).$promise},u.refreshContacts=function(){u.showTooltip=!1,u.getContacts()},u.onInit=g,u.assignedA=function(e,t){e&&(u.disable[e.id]=!0,s.voiceQueueReport.update({id:e.id,lastAssignedTo:t?t.name:null,assigned:!!t}).$promise.catch(function(e){console.log(e)}).finally(function(){u.disable[e.id]=!1}))},u.disposed=function(e,t){e&&s.voiceQueueReport.update({id:e.id,disposition:t||null}).$promise.catch(function(e){console.log(e)})},u.onSavevoiceQueueReport=function(e){e&&u.queuesMap&&"outbound"===e.type&&u.queuesMap[e.queue]&&(u.showTooltip=!0)},u.onUpdatevoiceQueueReport=function(e){if(e){var t=_.findIndex(u.contacts.rows,["id",e.id]);0<=t&&_.merge(u.contacts.rows[t],e)}},l.onWithoutApply("voiceQueueReport:save",u.onSavevoiceQueueReport),l.on("voiceQueueReport:update",u.onUpdatevoiceQueueReport),g();var h=!0,b=1;e.$watch("vm.query.filter",function(e,t){h?n(function(){h=!1}):(t||(b=u.query.page),e!==t&&(u.query.page=1),e||(u.query.page=b),u.getContacts())}),e.$on("$destroy",function(){l.removeAllListeners("voiceQueueReport:save"),l.removeAllListeners("voiceQueueReport:update")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty","dateFilterLocalizationFactory","agents"],angular.module("app.motiondialer").controller("AbandonedCallsMotionDialerRealtimeController",e)}(),function(){"use strict";function e(e,s,t,n,a,i,o,r,l,d,c,m,u,p,g,v){var h=this,b=["userpic","online","lastLoginAt","lastPauseAt","pauseType","lastPauseAt","internal","address","chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","chatCapacity","openchannelCapacity","mailCapacity","smsCapacity","faxCapacity","chatCurrentCapacity","openchannelCurrentCapacity","mailCurrentCapacity","smsCurrentCapacity","faxCurrentCapacity","chatStatus","openchannelStatus","mailStatus","smsStatus","faxStatus","voiceStatus","chatStatusTime","openchannelStatusTime","mailStatusTime","smsStatusTime","faxStatusTime","voiceStatusTime","queue","destconnectedlinenum"],f=["chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","online"];for(var A in h.availableStates=["ringing","inuse","busy","onhold","not_inuse"],h.pauses=o||{count:0,rows:[]},h.license=g,h.agents=r?_.keyBy(r.rows?r.rows:[],"id"):{},h.rpcAgents=l?_.keyBy(l.rows?l.rows:[],"id"):{},h.paginatedAgents={},h.load=!1,h.order=[],h.agentInternal={},h.agents)h.agents.hasOwnProperty(A)&&(h.agents[A].init=!0);h.query={limit:10,page:1,order:"fullname",globalStatusFilter:"",pauseTypeFilter:""},h.logout=function(e,t){return d.user.logout({id:e.id}).$promise.then(function(){m.success({title:"Agent logout",msg:e.fullname+"  properly logout"}),h.agents[e.id]&&(h.agents[e.id].online=!1),h.rpcAgents[e.id]&&(h.rpcAgents[e.id].online=!1),y()}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.queueAdd=function(e,t){n.show({controller:"AgentqueueaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/queueadd/queueadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{agent:e,agents:[],channel:"voice",realtime:!0,direction:"outbound"}})},h.pause=function(t,e){return d.user.pause({id:t.id,type:e}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.unPause=function(t){return d.user.unpause({id:t.id}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.showInfo=function(e){n.show(n.alert().clickOutsideToClose(!0).title("Legend").htmlContent("<div>TODO legend status + state</div>").ok("Ok").targetEvent(e))},h.getAgentStatus=C,h.getAgentGlobalStatus=x,h.isPause=S,h.checkPause=function(e){return"pause"===e},h.isPartialPause=function(e){return"*pause"===e},h.onSave=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(_.omit(e,f),b)),_.merge(h.rpcAgents[e.id],_.pick(_.omit(e,f),b)),x(h.agents[e.id]))},h.onUpdate=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(e,b)),_.merge(h.rpcAgents[e.id],_.pick(e,b)),x(h.agents[e.id]))},h.onInit=y,h.onConnect=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(_.merge(h.agents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])),_.merge(h.rpcAgents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])))},h.onComplete=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(h.agents[h.agentInternal[e.destaccountcode]]=_.omit(h.agents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]),h.rpcAgents[h.agentInternal[e.destaccountcode]]=_.omit(h.rpcAgents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]))},c.on("user:save",h.onSave),c.on("user:update",h.onUpdate),c.on("user:agentconnect",h.onConnect),c.on("user:agentcomplete",h.onComplete),y();var E=v(function(){h.load&&(h.load=!1,y())},999);function y(e){h.load=!1;var t,n,a=s.defer();h.promise=a.promise,h.filteredAgents=[],h.order=[],_.forIn(h.agents,function(e,t){h.rpcAgents[t]&&_.merge(e,_.pick(_.omit(h.rpcAgents[t],f),b)),x(e),e.online?(h.filteredAgents.push(e),h.agentInternal[e.internal]=t):e.globalStatusTime=_.toNumber(moment().format("x"))}),h.query.globalStatusFilter&&_.remove(h.filteredAgents,function(e){return e.globalStatus!==h.query.globalStatusFilter}),h.query.pauseTypeFilter&&_.remove(h.filteredAgents,function(e){return e.pauseType!==h.query.pauseTypeFilter}),h.query.filter&&_.remove(h.filteredAgents,function(e){return e.fullname.toLowerCase().indexOf(h.query.filter.toLowerCase())<0}),h.filteredAgents=(t=h.filteredAgents,n=_.startsWith(h.query.order,"-")?"desc":"asc",_.orderBy(t,[h.query.order.replace("-","")],[n]));var i=(h.query.page-1)*h.query.limit;h.paginatedAgents=_.drop(h.filteredAgents,i).slice(0,h.query.limit);for(var o=0;o<h.paginatedAgents.length;o+=1)h.order.push(h.paginatedAgents[o].id);a.resolve(),h.load=!0}function S(e){return"pause"===e||"*pause"===e}function T(e){return"idle"===e||"unknown"===e||"unavailable"===e||"ringing"===e||_.isNil(e)}function C(e,t){return"voice"===t?"idle"!==e[t+"Status"]?e[t+"Status"]:e[t+"Pause"]?e[t+"Status"]="pause":"idle":e[t+"Pause"]?e[t+"Status"]="pause":e[t+"Status"]}function x(e){var t="unknown";t=_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"pause":_.some([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"*pause":_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],T)?"idle":"busy",e.globalStatus!==t&&(e.globalStatus=t,e.init?(e.init=!1,e.globalStatusTime=S(t)?_.toNumber(moment(e.lastPauseAt).format("x")):_.max([e.voiceStatusTime,e.chatStatusTime,e.mailStatusTime,e.smsStatusTime,e.openchannelStatusTime,e.faxStatusTime])):e.globalStatusTime=_.toNumber(moment().format("x")))}e.$on("$destroy",function(){c.removeAllListeners("user:save"),c.removeAllListeners("user:update"),c.removeAllListeners("user:agentconnect"),c.removeAllListeners("user:agentcomplete"),E&&(v.cancel(E),E=null)})}e.$inject=["$scope","$q","$timeout","$mdDialog","$document","$filter","pauses","agents","rpcAgents","api","socket","toasty","helperClasses","Auth","license","$interval"],angular.module("app.voice").controller("AgentsMotionDialerRealtimeController",e)}(),function(){"use strict";function e(e,n,a,i,t,o,s,r,l,d){var c=this,m=["name","active","limitCalls","message","originated","IntervalId","SquareProjectId","Trunk","TrunkId","ivrAnswerCallsDay","dialQueueProject","ivrTotalCallsDays","description"];function u(){_.forIn(c.campaigns,function(e,t){c.rpcCampaigns[t]&&_.merge(e,_.pick(c.rpcCampaigns[t],m))})}c.count=s.count,c.campaigns=s?_.keyBy(s.rows?s.rows:[],"id"):{},c.rpcCampaigns=o?_.keyBy(o.rows?o.rows:[],"id"):{},c.query={sort:"-updatedAt",limit:10,page:1},c.success=v,c.getCampaigns=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=r.campaign.get(c.query,v).$promise},c.onSave=function(e){c.campaigns[e.id]&&(_.merge(c.campaigns[e.id],_.pick(e,m)),_.merge(c.rpcCampaigns[e.id],_.pick(e,m)))},c.$onInit=u,c.createOrEditIvrCampaign=function(e,t){a.show({controller:"CreateOrEditIvrCampaignDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/create/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{ivrCampaign:t,ivrCampaigns:_.values(c.campaigns),license:null,setting:null}})},l.onWithoutApply("campaign:save",c.onSave),c.interval=t(function(){},999);var p=!0,g=1;function v(e){c.count=e.count,c.campaigns=e?_.keyBy(e.rows?e.rows:[],"id"):{},u()}e.$watch("vm.query.filter",function(e,t){p?n(function(){p=!1}):(t||(g=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=g),c.getCampaigns())}),e.$on("$destroy",function(){l.removeAllListeners("campaign:save"),c.interval&&t.cancel(c.interval)})}e.$inject=["$scope","$timeout","$mdDialog","$document","$interval","rpcCampaigns","campaigns","api","socket","Auth"],angular.module("app.motiondialer").controller("IvrCampaignsMotionDialerRealtimeController",e)}(),function(){"use strict";function e(e,t,a,n,i,o,s,r,l){var d=this;d.agents=n||{count:0,rows:[]},d.rpcVoiceQueuesChannels=i?_.keyBy(i.rows?_.filter(i.rows,{type:"outbound"}):[],"uniqueid"):{},d.queryChannels={limit:10,page:1},d.getSize=function(e){return _.size(e)},d.onSave=function(e){"outbound"===e.type&&(d.rpcVoiceQueuesChannels[e.uniqueid]=e)},d.onRemove=function(e){d.rpcVoiceQueuesChannels[e.uniqueid]&&delete d.rpcVoiceQueuesChannels[e.uniqueid]},d.hangup=function(t){return o.rpc.getVoiceQueuesChannelHangup({uniqueid:t}).$promise.then(function(e){l.success({title:"Channel "+t+" properly hangup!",msg:e.message||""})}).catch(function(e){l.error({title:e.status+" - "+e.statusText,msg:JSON.stringify(e.data)||e.message.join(" ")})})},d.redirectToAgent=function(t,e){return o.rpc.getVoiceQueuesChannelRedirect({uniqueid:t,exten:e}).$promise.then(function(e){l.success({title:"Channel "+t+" properly redirect!",msg:e.message||""})}).catch(function(e){l.error({title:e.status+" - "+e.statusText,msg:JSON.stringify(e.data)||e.message.join(" ")})})},d.redirectToNumber=function(e,t){var n=a.prompt().title("Which number do you want transfer the call to?").placeholder("Number").targetEvent(e).ok("Ok").cancel("Cancel");return a.show(n).then(function(e){return o.rpc.getVoiceQueuesChannelRedirect({uniqueid:t,exten:e}).$promise}).then(function(e){l.success({title:"Channel "+t+" properly redirect!",msg:e.message||""})}).catch(function(e){l.error({title:e.status+" - "+e.statusText,msg:JSON.stringify(e.data)||e.message.join(" ")})})},s.on("voice_queue_channel:save",d.onSave),s.on("voice_queue_channel:remove",d.onRemove),e.$on("$destroy",function(){s.removeAllListeners("voice_queue_channel:save"),s.removeAllListeners("voice_queue_channel:remove")})}e.$inject=["$scope","$timeout","$mdDialog","agents","rpcVoiceQueuesChannels","api","socket","helperClasses","toasty"],angular.module("app.motiondialer").controller("QueueCallsMotionDialerRealtimeController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r){var l=this,d=["total","answered","sumHoldTime","sumDuration","sumBillable","outboundNoAnswerCallsDay","outboundBusyCallsDay","outboundCongestionCallsDay","outboundNoSuchCallsDay","outboundUnknownCallsDay","outboundDropCallsDayTimeout","outboundDropCallsDayCallersExit","outboundBlacklistCallsDay","outboundOriginateFailureCallsDay","outboundAnswerAgiCallsDay","outboundReCallsDay","outboundRejectCallsDay"];function c(){_.forIn(l.queues,function(e,t){l.rpcQueues[t]&&_.merge(e,_.pick(l.rpcQueues[t],d))})}l.count=a.count,l.queues=a?_.keyBy(a.rows?a.rows:[],"id"):{},l.rpcQueues=i?_.keyBy(i.rows?i.rows:[],"id"):{},r.hasRole("admin")?l.query={type:"outbound",fields:"id,name",sort:"-updatedAt",limit:10,page:1}:l.query={id:r.getCurrentUser().id,channel:"voice",type:"outbound",fields:"id,name",sort:"-updatedAt",limit:10,page:1},l.success=p,l.getQueues=function(){l.query.offset=(l.query.page-1)*l.query.limit,r.hasRole("admin")?l.promise=o.voiceQueue.get(l.query,p).$promise:l.promise=o.user.getQueues(l.query,p).$promise},l.onSave=function(e){l.queues[e.id]&&_.merge(l.queues[e.id],_.pick(e,d))},l.$onInit=c,s.onWithoutApply("voice_queue:save",l.onSave),l.interval=t(function(){},999);var m=!0,u=1;function p(e){l.count=e.count,l.queues=e?_.keyBy(e.rows?e.rows:[],"id"):{},c()}e.$watch("vm.query.filter",function(e,t){m?n(function(){m=!1}):(t||(u=l.query.page),e!==t&&(l.query.page=1),e||(l.query.page=u),l.getQueues())}),e.$on("$destroy",function(){s.removeAllListeners("voice_queue:save"),l.interval&&t.cancel(l.interval)})}e.$inject=["$scope","$timeout","$interval","queues","rpcQueues","api","socket","Auth"],angular.module("app.motiondialer").controller("QueueParamsMotionDialerRealtimeController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r,l,d,c,m){var u=this,p=["loggedIn","available","waiting","talking","pTalking","originated","message","dialActive","dialMethod","Trunk","paused"];function g(){var n=[];return _.forIn(u.queues,function(e,t){e.paused=0,e.loggedInDb=0,u.queues[t].agents={},n.push(l.voiceQueue.getMembers({id:t}).$promise),u.rpcQueues[t]&&_.merge(e,_.pick(u.rpcQueues[t],p))}),t.all(n).then(function(e){for(var t=0;t<e.length;t+=1)for(var n=0;n<e[t].rows.length;n++)e[t].rows[n].paused&&u.queues[e[t].rows[n].VoiceQueueId].paused++,u.queues[e[t].rows[n].VoiceQueueId].loggedInDb++,u.queues[e[t].rows[n].VoiceQueueId].agents[e[t].rows[n].UserId]=e[t].rows[n].VoiceQueueId}).catch(function(e){console.error(e)})}u.count=s.count?s.count:0,u.queues=s?_.keyBy(s.rows?s.rows:[],"id"):{},u.rpcQueues=r?_.keyBy(r.rows?r.rows:[],"id"):{},m.hasRole("admin")?u.query={type:"outbound",sort:"-updatedAt",limit:10,page:1}:u.query={id:m.getCurrentUser().id,channel:"voice",type:"outbound",sort:"-updatedAt",limit:10,page:1},u.success=b,u.getQueues=function(){u.query.offset=(u.query.page-1)*u.query.limit,m.hasRole("admin")?u.promise=l.voiceQueue.get(u.query,b).$promise:u.promise=l.user.getQueues(u.query,b).$promise},u.createOrEditMotionDialerQueue=function(e,t){a.show({controller:"CreateOrEditQueueCampaignDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/create/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{queueCampaign:t,queueCampaigns:_.values(u.queues),license:null,setting:null}})},u.agentAdd=function(e,t){a.show({controller:"QueueCampaignagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/agentadd/agentadd.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{queueCampaign:t,queueCampaigns:u.queues?u.queues.rows:[],realtime:!0}})},u.updateQueue=function(e){return l.voiceQueue.update(e).$promise.then(function(){c.success({title:"Queue properly updated!",msg:e.name?e.name+" has been updated!":""})}).catch(function(e){c.error({title:"Error creating queue!",msg:e.message})})},u.onSave=function(e){u.queues[e.id]&&_.merge(u.queues[e.id],_.pick(e,p))},u.onSaveMember=function(e){u.queues[e.MotionDialerQueueId]&&u.queues[e.MotionDialerQueueId].loggedInDb++},u.onPause=function(n){console.log("onPause",n),n.voicePause?_.forIn(u.queues,function(e,t){e.agents[n.id]&&(e.paused+=1,console.log("pause"))}):n.voicePause||_.forIn(u.queues,function(e,t){e.agents[n.id]&&0<e.paused&&(e.paused-=1,console.log("unpause"))})},u.onLogin=function(e){console.log("onLogged",e),u.queues[e.VoiceQueueId]&&(u.queues[e.VoiceQueueId].loggedInDb+=1,u.queues[e.VoiceQueueId].agents[e.UserId]=e.VoiceQueueId)},u.onLogout=function(e){console.log("onLogout",e),u.queues[e.VoiceQueueId]&&0<u.queues[e.VoiceQueueId].loggedInDb&&(u.queues[e.VoiceQueueId].loggedInDb-=1,delete u.queues[e.VoiceQueueId].agents[e.UserId])},u.$onInit=g,u.order=[],_.forIn(u.queues,function(e,t){u.order.push(e.id)}),d.onWithoutApply("voice_queue:save",u.onSave),u.interval=o(function(){},999),d.on("userVoiceQueueRt:save",u.onSaveMember),d.on("user:update",u.onPause),d.on("userVoiceQueue:remove",u.onLogout),d.on("userVoiceQueue:save",u.onLogin);var v=!0,h=1;function b(e){if(u.count=e.count,u.queues=e?_.keyBy(e.rows?e.rows:[],"id"):{},e.rows){u.order=[];for(var t=0;t<e.rows.length;t++)u.order.push(e.rows[t].id)}g()}e.$watch("vm.query.filter",function(e,t){v?n(function(){v=!1}):(t||(h=u.query.page),e!==t&&(u.query.page=1),e||(u.query.page=h),u.getQueues())}),e.$on("$destroy",function(){d.removeAllListeners("voice_queue:save"),u.interval&&o.cancel(u.interval),d.removeAllListeners("userVoiceQueueRt:save"),d.removeAllListeners("user:update"),d.removeAllListeners("userVoiceQueue:remove"),d.removeAllListeners("userVoiceQueue:save")})}e.$inject=["$scope","$timeout","$mdDialog","$q","$document","$interval","queues","rpcQueues","api","socket","toasty","Auth"],angular.module("app.motiondialer").controller("QueuesMotionDialerRealtimeController",e)}(),function(){"use strict";angular.module("app.auth").factory("helperClasses",function(){return{status:{registered:"green-300-fg icon-checkbox-marked-circle",unregistered:"red-300-fg icon-close-circle",lagged:"red-300-fg icon-close-circle",reachable:"green-300-fg icon-checkbox-marked-circle",unreachable:"red-300-fg icon-close-circle",unknown:"grey-fg icon-minus-circle"},state:{unknown:"grey-fg icon-phone-hangup",not_inuse:"green-300-fg icon-phone-hangup",inuse:"red-300-fg icon-phone-in-talk",busy:"red-300-fg icon-phone-locked",invalid:"grey-fg icon-phone-hangup",unavailable:"grey-fg icon-phone-hangup",ringing:"blue-300-fg icon-phone-incoming",ringinuse:"blue-300-fg icon-phone-incoming",onhold:"blue-300-fg icon-phone-paused"},channelStatus:{ring:"blue-300-fg icon-phone-incoming",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"},channelStatusOut:{ring:"blue-300-fg icon-phone-outgoing",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"}}})}(),function(){"use strict";function e(e,n,t){switch(t.disconnect(),t.connect(),this.selectedTab=0,n.current.name){case"app.motiondialer.realtime.agents":this.selectedTab=0;break;case"app.motiondialer.realtime.queues":this.selectedTab=1;break;case"app.motiondialer.realtime.queue_calls":this.selectedTab=2;break;case"app.motiondialer.realtime.abandonedcalls":this.selectedTab=3;break;case"app.motiondialer.realtime.queue_params":this.selectedTab=4;break;case"app.motiondialer.realtime.ivr_campaigns":this.selectedTab=5;break;default:this.selectedTab=0,n.go("app.motiondialer.realtime.agents")}e.$watch("vm.selectedTab",function(e,t){if(e!==t)switch(e){case 0:n.go("app.motiondialer.realtime.agents");break;case 1:n.go("app.motiondialer.realtime.queues");break;case 2:n.go("app.motiondialer.realtime.queue_calls");break;case 3:n.go("app.motiondialer.realtime.abandonedcalls");break;case 4:n.go("app.motiondialer.realtime.queue_params");break;case 5:n.go("app.motiondialer.realtime.ivr_campaigns");break;default:n.go("app.motiondialer.realtime.agents")}})}e.$inject=["$scope","$state","socket"],angular.module("app.motiondialer").controller("MotionDialerRealtimeController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="OPENCHANNEL.EDIT_OPENCHANNELACCOUNT",m.openchannelAccount=angular.copy(s),m.openchannelAccounts=o,m.newOpenchannelAccount=!1,m.openchannelAccount||(m.openchannelAccount={waitForTheAssignedAgent:10,notificationSound:!0},m.title="OPENCHANNEL.NEW_OPENCHANNELACCOUNT",m.newOpenchannelAccount=!0),t.params.id&&(m.openchannelAccount.OpenchannelAccountId=t.params.id),m.addNewOpenchannelAccount=function(){m.errors=[],r.openchannelAccount.save(m.openchannelAccount).$promise.then(function(e){m.openchannelAccounts.unshift(e.toJSON()),i.success({title:"OpenchannelAccount properly created",msg:m.openchannelAccount.name?m.openchannelAccount.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveOpenchannelAccount=function(){m.errors=[],r.openchannelAccount.update({id:m.openchannelAccount.id},m.openchannelAccount).$promise.then(function(e){var t=_.find(m.openchannelAccounts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"OpenchannelAccount properly saved!",msg:m.openchannelAccount.name?m.openchannelAccount.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteOpenchannelAccount=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The openchannelAccount will be deleted.").ariaLabel("Delete OpenchannelAccount").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.openchannelAccount.delete({id:m.openchannelAccount.id}).$promise.then(function(){_.remove(m.openchannelAccounts,{id:m.openchannelAccount.id}),i.success({title:"OpenchannelAccount properly deleted!",msg:(m.openchannelAccount.name||"openchannelAccount")+" has been deleted!"}),u(m.openchannelAccount)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.lists=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","openchannelAccounts","openchannelAccount","api","Auth","license","setting"],angular.module("app.openchannel").controller("CreateOrEditOpenchannelAccountDialogController",e)}(),function(){"use strict";function e(s,i,a,o,e){var r=this;function t(e,t){if(r.openchannelAccountApps.rows.length){var n=r.openchannelAccountApps.rows[t]?r.openchannelAccountApps.rows[t]:r.openchannelAccountApps.rows[0];i.show({controller:"EditOpenchannelAccountApp"+(n.appType||n.app).toLowerCase()+"DialogController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelAccounts/edit/apps/"+(n.appType||n.app).toLowerCase()+"/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{openchannelAccountApp:n,openchannelAccount:r.openchannelAccount}}).then(function(e){e&&(e.id?r.openchannelAccountApps.rows[t]=e:r.openchannelAccountApps.rows.splice(t,0,e),l())}).catch(function(e){e&&o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:EDITMODALSHOW",msg:e.data?JSON.stringify(e.data):e.toString()})})}}function l(){for(var e=1,t=[],n=0;n<r.openchannelAccountApps.rows.length;n++,0){var a=r.openchannelAccountApps.rows[n],i=[],o=[];a.intervals="*,*,*,*"!==a.interval?[a.interval]:a.IntervalId?_.map(_.filter(r.intervals.rows,{IntervalId:a.IntervalId}),"interval"):[],a.context=r.openchannelAccount.context,a.exten=r.openchannelAccount.exten,a.type&&(a.type=a.type.toLowerCase()),a.priority=i.length?_.last(i).priority+1:e,e=(o.length?_.last(o).priority:a.priority)+1,t=_.concat(t,i,[a],o)}s.openchannelAccount.addApplications({id:r.openchannelAccount.id},_.sortBy(t,"priority")).$promise.then(function(e){r.openchannelAccountApps.rows=e.rows}).catch(function(e){console.error(e)})}function n(e){r.openchannelAccountApps=e||{count:0,rows:[]}}r.currentUser=e.getCurrentUser(),r.openchannelAccount={},r.openchannelAccountApps={count:0,rows:[]},r.selectedOpenchannelAccountApps=[],r.query={sort:"priority"},r.apps=_.reject(_.sortBy([{app:"Interval",appType:"interval",types:["always","custom","list"],fields:[],isApp:!1},{app:"noop",appType:"noop",type:"noop",icon:"icon-apps",interval:"*,*,*,*",required:!0,isApp:!0,fields:[{title:"Value",name:"value",type:"text",param:0}]},{app:"system",appType:"system",type:"system",icon:"icon-apps",interval:"*,*,*,*",required:!0,isApp:!0,extraApi:[{name:"variables",route:"variable",filters:{fields:"id,name",sort:"name",nolimit:!0}}],fields:[{title:"Command",name:"command",type:"text",required:!0,param:0},{title:"Variable",name:"variable",type:"apiselect",values:"variables",value:"variable.name",option:"variable.name",defaultValues:[{value:"''",option:"None"}],defaultValue:"''",param:1}]},{app:"gotop",appType:"gotop",type:"goto",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Priority",name:"priority",type:"number",required:!0,min:0,param:0}]},{app:"gotoif",appType:"gotoif",type:"gotoif",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Condition",name:"condition",type:"text",required:!0,param:0},{title:"truepriority",name:"truepriority",type:"number",min:1,required:!0,param:1},{title:"falsepriority",name:"falsepriority",type:"number",min:1,required:!0,param:2}]},{app:"queue",appType:"queue",foreignKey:"OpenchannelQueueId",type:"queue",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"queues",route:"openchannelQueue",filters:{fields:"id,name,type",sort:"name",nolimit:!0}}],fields:[{title:"Queue",name:"queue",type:"apiselect",values:"queues",value:"queue.name",option:"queue.name",defaultValue:300,required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",max:2147483,min:0,defaultValue:300,required:!0,param:1}]},{app:"agent",appType:"agent",type:"agent",foreignKey:"UserId",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"agents",route:"user",filters:{fields:"id,name",sort:"name",role:"agent",nolimit:!0}}],fields:[{title:"Agent",name:"agent",type:"apiselect",values:"agents",value:"agent.name",option:"agent.name",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",max:2147483,min:0,required:!0,defaultValue:30,param:1}]},{app:"autoreply",appType:"autoreply",type:"autoreply",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"times",name:"times",type:"select",defaultValue:"1",values:[{option:"One Time",value:"1"},{option:"Always",value:"0"}],required:!0,param:0},{title:"Text",name:"text",type:"textarea",maxlength:255,required:!0,param:1}]},{app:"close",appType:"close",type:"close",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Disposition",name:"disposition",type:"text",required:!0,param:0}]}],["app"]),{isApp:!1}),r.list={group:{name:"opt1",pull:"clone"},animation:100,sort:!1},r.applications={group:{name:"opt2",put:"opt1"},animation:100,onAdd:function(e){t(e,e.newIndex)},onSort:function(e){l()}},r.init=function(e){r.openchannelAccount=e,r.query.id=e.id,r.query.isApp=!0,r.query.nolimit=!0,r.getOpenchannelAccountApps(),r.getIntervals()},r.deleteConfirm=function(e,t,n){var a=i.confirm().title("Are you sure want to delete the application?").htmlContent("<b>"+e.app+"</b> will be deleted.").ariaLabel("delete application").targetEvent(n).ok("OK").cancel("CANCEL");i.show(a).then(function(){r.openchannelAccountApps.rows.splice(t,1),l()},function(){console.log("CANCEL")})},r.getOpenchannelAccountApps=function(){r.promise=s.openchannelAccount.getApplications(r.query,n).$promise},r.editOpenchannelAccountApp=t,r.editInterval=function(e,t){if(r.openchannelAccountApps.rows.length){var n=r.openchannelAccountApps.rows[t]?r.openchannelAccountApps.rows[t]:r.openchannelAccountApps.rows[0];i.show({controller:"EditOpenchannelAccountAppintervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelAccounts/edit/apps/interval/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:{interval:n.interval,IntervalId:n.IntervalId,application:!0},intervals:[]}}).then(function(e){e&&(n.interval=e.interval||"*,*,*,*",n.IntervalId=e.IntervalId||null,l())})}},r.deleteOpenchannelAccountApp=function(e){_.remove(r.openchannelAccountApps.rows,{id:e.id}),l(),o.success({title:"App deleted!",msg:e.app?e.app+" has been deleted!":""})},r.deleteSelectedOpenchannelAccountApps=function(e){var t=i.confirm().title("Are you sure want to delete the selected applications?").htmlContent("<b>"+r.selectedOpenchannelAccountApps.length+" selected</b> will be deleted.").ariaLabel("delete applications").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){r.selectedOpenchannelAccountApps.forEach(function(e){_.remove(r.openchannelAccountApps.rows,{id:e.id})}),r.selectedOpenchannelAccountApps=[],l()})},r.rewriteRouting=l,r.getIntervals=function(){return s.interval.get({fields:"id,interval,IntervalId"}).$promise.then(function(e){r.intervals=e}).catch(function(e){console.error(e)})}}e.$inject=["api","$mdDialog","$document","toasty","Auth"],angular.module("app.openchannel").controller("OpenchannelAccountActionsController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="OPENCHANNEL.EDIT_"+(e.appType||e.app).toUpperCase(),o.agent=angular.copy(e),o.agent.appdata)switch(o.agent.appType?o.agent.appType.toLowerCase():o.agent.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.agent.appdata.split(",");o.agent.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.agent.text=s.slice(1,s.length).join(",");break;case"message":o.agent.text=o.agent.appdata;break;case"set":o.agent.name=o.agent.appdata.split("=")[0],o.agent.value=o.agent.appdata.split("=")[1];break;case"agi":o.agent.project=o.agent.appdata;break;default:var r=o.agent.appdata.split(",");o.agent.agent=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.agent.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.agent.timeout=30;function l(e){t.hide(e)}o.agent.type&&"outbound"===o.agent.type.toLowerCase()&&"outbounddial"===o.agent.appType.toLowerCase()&&(o.agent.prefix=o.agent.phone?o.agent.phone.split("$")[0]:void 0,o.agent.callerId=o.agent.callerID?"CALLERID(all)="+o.agent.callerID:void 0),o.saveOpenchannelAccountApp=function(){o.errors=[];var e=[];o.agent.type&&"outbound"===o.agent.type.toLowerCase()&&"outboundDial"===o.agent.appType&&(o.agent.phone=a.cutdigits?(o.agent.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.agent.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.agent.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.agent.options+="U(xcally-mixmonitor-context)"):o.agent.options=o.agent.options.replace("U(xcally-mixmonitor-context)",""));var t=_.find(o.agents,{name:o.agent.agent});t&&(o.agent.UserId=t.id);if(o.agent.appType&&"custom"===o.agent.appType);else switch((o.agent.app||o.agent.appType).toLowerCase()){case"set":o.agent.appdata=o.agent.name+"="+o.agent.value;break;case"custom":break;default:e[0]=o.agent.agent,e[1]=o.agent.timeout,o.agent.appdata=e.join(",")}l(o.agent)},o.closeDialog=l,i.user.get({fields:"id,name",sort:"name",role:"agent",nolimit:"true"}).$promise.then(function(e){o.agents=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETagents",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","openchannelAccountApp","openchannelAccount","api"],angular.module("app.openchannel").controller("EditOpenchannelAccountAppagentDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="OPENCHANNEL.EDIT_"+(n.appType||n.app).toUpperCase(),o.autoreply=angular.copy(n),o.autoreply.appdata)switch(o.autoreply.appType?o.autoreply.appType.toLowerCase():o.autoreply.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.autoreply.appdata.split(",");o.autoreply.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.autoreply.text=s.slice(1,s.length).join(",");break;case"message":o.autoreply.text=o.autoreply.appdata;break;case"set":o.autoreply.name=o.autoreply.appdata.split("=")[0],o.autoreply.value=o.autoreply.appdata.split("=")[1];break;case"agi":o.autoreply.project=o.autoreply.appdata;break;default:var r=o.autoreply.appdata.split(",");o.autoreply.times=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.autoreply.text=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.autoreply.times=1;function l(e){t.hide(e)}o.autoreply.type&&"outbound"===o.autoreply.type.toLowerCase()&&"outbounddial"===o.autoreply.appType.toLowerCase()&&(o.autoreply.prefix=o.autoreply.phone?o.autoreply.phone.split("$")[0]:void 0,o.autoreply.callerId=o.autoreply.callerID?"CALLERID(all)="+o.autoreply.callerID:void 0),o.saveOpenchannelAccountApp=function(){o.errors=[];var e=[];o.autoreply.type&&"outbound"===o.autoreply.type.toLowerCase()&&"outboundDial"===o.autoreply.appType&&(o.autoreply.phone=a.cutdigits?(o.autoreply.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.autoreply.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.autoreply.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.autoreply.options+="U(xcally-mixmonitor-context)"):o.autoreply.options=o.autoreply.options.replace("U(xcally-mixmonitor-context)",""));if(o.autoreply.appType&&"custom"===o.autoreply.appType);else switch((o.autoreply.app||o.autoreply.appType).toLowerCase()){case"set":o.autoreply.appdata=o.autoreply.name+"="+o.autoreply.value;break;case"custom":break;default:e[0]=o.autoreply.times,e[1]=o.autoreply.text,o.autoreply.appdata=e.join(",")}l(o.autoreply)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","openchannelAccountApp","openchannelAccount","api"],angular.module("app.openchannel").controller("EditOpenchannelAccountAppautoreplyDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="OPENCHANNEL.EDIT_"+(n.appType||n.app).toUpperCase(),o.close=angular.copy(n),o.close.appdata)switch(o.close.appType?o.close.appType.toLowerCase():o.close.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.close.appdata.split(",");o.close.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.close.text=s.slice(1,s.length).join(",");break;case"message":o.close.text=o.close.appdata;break;case"set":o.close.name=o.close.appdata.split("=")[0],o.close.value=o.close.appdata.split("=")[1];break;case"agi":o.close.project=o.close.appdata;break;default:var r=o.close.appdata.split(",");o.close.disposition=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.close.type&&"outbound"===o.close.type.toLowerCase()&&"outbounddial"===o.close.appType.toLowerCase()&&(o.close.prefix=o.close.phone?o.close.phone.split("$")[0]:void 0,o.close.callerId=o.close.callerID?"CALLERID(all)="+o.close.callerID:void 0),o.saveOpenchannelAccountApp=function(){o.errors=[];var e=[];o.close.type&&"outbound"===o.close.type.toLowerCase()&&"outboundDial"===o.close.appType&&(o.close.phone=a.cutdigits?(o.close.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.close.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.close.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.close.options+="U(xcally-mixmonitor-context)"):o.close.options=o.close.options.replace("U(xcally-mixmonitor-context)",""));if(o.close.appType&&"custom"===o.close.appType);else switch((o.close.app||o.close.appType).toLowerCase()){case"set":o.close.appdata=o.close.name+"="+o.close.value;break;case"custom":break;default:e[0]=o.close.disposition,o.close.appdata=e.join(",")}l(o.close)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","openchannelAccountApp","openchannelAccount","api"],angular.module("app.openchannel").controller("EditOpenchannelAccountAppcloseDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="OPENCHANNEL.EDIT_"+(n.appType||n.app).toUpperCase(),o.gotoif=angular.copy(n),o.gotoif.appdata)switch(o.gotoif.appType?o.gotoif.appType.toLowerCase():o.gotoif.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.gotoif.appdata.split(",");o.gotoif.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.gotoif.text=s.slice(1,s.length).join(",");break;case"message":o.gotoif.text=o.gotoif.appdata;break;case"set":o.gotoif.name=o.gotoif.appdata.split("=")[0],o.gotoif.value=o.gotoif.appdata.split("=")[1];break;case"agi":o.gotoif.project=o.gotoif.appdata;break;default:var r=o.gotoif.appdata.split(",");o.gotoif.condition=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.gotoif.truepriority=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.gotoif.falsepriority=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10)}function l(e){t.hide(e)}o.gotoif.type&&"outbound"===o.gotoif.type.toLowerCase()&&"outbounddial"===o.gotoif.appType.toLowerCase()&&(o.gotoif.prefix=o.gotoif.phone?o.gotoif.phone.split("$")[0]:void 0,o.gotoif.callerId=o.gotoif.callerID?"CALLERID(all)="+o.gotoif.callerID:void 0),o.saveOpenchannelAccountApp=function(){o.errors=[];var e=[];o.gotoif.type&&"outbound"===o.gotoif.type.toLowerCase()&&"outboundDial"===o.gotoif.appType&&(o.gotoif.phone=a.cutdigits?(o.gotoif.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.gotoif.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.gotoif.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.gotoif.options+="U(xcally-mixmonitor-context)"):o.gotoif.options=o.gotoif.options.replace("U(xcally-mixmonitor-context)",""));if(o.gotoif.appType&&"custom"===o.gotoif.appType);else switch((o.gotoif.app||o.gotoif.appType).toLowerCase()){case"set":o.gotoif.appdata=o.gotoif.name+"="+o.gotoif.value;break;case"custom":break;default:e[0]=o.gotoif.condition,e[1]=o.gotoif.truepriority,e[2]=o.gotoif.falsepriority,o.gotoif.appdata=e.join(",")}l(o.gotoif)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","openchannelAccountApp","openchannelAccount","api"],angular.module("app.openchannel").controller("EditOpenchannelAccountAppgotoifDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="OPENCHANNEL.EDIT_"+(n.appType||n.app).toUpperCase(),o.gotop=angular.copy(n),o.gotop.appdata)switch(o.gotop.appType?o.gotop.appType.toLowerCase():o.gotop.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.gotop.appdata.split(",");o.gotop.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.gotop.text=s.slice(1,s.length).join(",");break;case"message":o.gotop.text=o.gotop.appdata;break;case"set":o.gotop.name=o.gotop.appdata.split("=")[0],o.gotop.value=o.gotop.appdata.split("=")[1];break;case"agi":o.gotop.project=o.gotop.appdata;break;default:var r=o.gotop.appdata.split(",");o.gotop.priority=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.gotop.type&&"outbound"===o.gotop.type.toLowerCase()&&"outbounddial"===o.gotop.appType.toLowerCase()&&(o.gotop.prefix=o.gotop.phone?o.gotop.phone.split("$")[0]:void 0,o.gotop.callerId=o.gotop.callerID?"CALLERID(all)="+o.gotop.callerID:void 0),o.saveOpenchannelAccountApp=function(){o.errors=[];var e=[];o.gotop.type&&"outbound"===o.gotop.type.toLowerCase()&&"outboundDial"===o.gotop.appType&&(o.gotop.phone=a.cutdigits?(o.gotop.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.gotop.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.gotop.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.gotop.options+="U(xcally-mixmonitor-context)"):o.gotop.options=o.gotop.options.replace("U(xcally-mixmonitor-context)",""));if(o.gotop.appType&&"custom"===o.gotop.appType);else switch((o.gotop.app||o.gotop.appType).toLowerCase()){case"set":o.gotop.appdata=o.gotop.name+"="+o.gotop.value;break;case"custom":break;default:e[0]=o.gotop.priority,o.gotop.appdata=e.join(",")}l(o.gotop)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","openchannelAccountApp","openchannelAccount","api"],angular.module("app.openchannel").controller("EditOpenchannelAccountAppgotopDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;if(l.errors=[],l.title="TOOLS.EDIT_INTERVAL",l.interval=angular.copy(i),l.intervals=o,l.newInterval=!1,l.types=["always","custom","list"],l.daysOfWeek=a.getDaysOfWeek(),l.monthNumber=a.getMonthNumber(),l.monthName=a.getMonthName(),l.daysOfMonth=a.getDaysOfMonth(),l.interval)if("*,*,*,*"!==l.interval.interval){l.type="custom";var d=l.interval.interval.split(","),c=d[0],m=d[1],u=d[2],p=d[3];if("*"!==c){var g,v=c.split("-")[0],h=c.split("-")[1];(g=new Date).setHours(Number(v.split(":")[0])),g.setMinutes(Number(v.split(":")[1])),l.timeRangeFrom=g,(g=new Date).setHours(Number(h.split(":")[0])),g.setMinutes(Number(h.split(":")[1])),l.timeRangeTo=g}"*"!==m&&(l.dayOfWeekFrom=m.split("-")[0],l.dayOfWeekTo=m.split("-")[1]),"*"!==u&&(l.monthDayFrom=u.split("-")[0],l.monthDayTo=u.split("-")[1]),"*"!==p&&(l.monthFrom=p.split("-")[0],l.monthTo=p.split("-")[1])}else l.type="always";else l.interval={interval:"*,*,*,*"},l.type="always",l.title="TOOLS.NEW_INTERVAL",l.newInterval=!0;function b(){switch(l.type){case"always":case"list":return"*,*,*,*";case"custom":var e=[];if("*"!==l.timeRangeFrom&&l.timeRangeFrom&&l.timeRangeTo){var t=(l.timeRangeFrom.getHours()<10?"0":"")+l.timeRangeFrom.getHours()+":"+(l.timeRangeFrom.getMinutes()<10?"0":"")+l.timeRangeFrom.getMinutes(),n=(l.timeRangeTo.getHours()<10?"0":"")+l.timeRangeTo.getHours()+":"+(l.timeRangeTo.getMinutes()<10?"0":"")+l.timeRangeTo.getMinutes();e.push(t+"-"+n)}else e.push("*");return l.dayOfWeekFrom?l.dayOfWeekTo?e.push(l.dayOfWeekFrom+"-"+l.dayOfWeekTo):e.push(l.dayOfWeekFrom):e.push("*"),l.monthDayFrom?l.monthDayTo?e.push(l.monthDayFrom+"-"+l.monthDayTo):e.push(l.monthDayFrom):e.push("*"),l.monthFrom?l.monthTo?e.push(l.monthFrom+"-"+l.monthTo):e.push(l.monthFrom):e.push("*"),e.join()}}function f(e){t.hide(e)}e.params.id&&!l.interval.application&&(l.interval.IntervalId=e.params.id),l.interval.IntervalId&&l.interval.application&&(l.type="list"),l.addNewInterval=function(){l.errors=[],l.interval.interval=b(),r.interval.save(l.interval).$promise.then(function(e){l.intervals.push(e),s.success({title:"Interval properly created",msg:l.interval.name?l.interval.name+" has been created!":""}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}]})},l.saveInterval=function(){l.errors=[],l.interval.interval=b(),l.interval.application?("list"!==l.type&&(l.interval.IntervalId=null),f(l.interval)):r.interval.update({id:l.interval.id},l.interval).$promise.then(function(e){var t=_.find(l.intervals,{id:e.id});t&&_.merge(t,e),s.success({title:"Interval properly saved!",msg:"Interval has been saved!"}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}]})},l.closeDialog=f,l.interval.application&&r.interval.get({fields:"id,name,interval,IntervalId",IntervalId:"null",nolimit:!0}).$promise.then(function(e){l.intervals=e}).catch(function(e){console.error(e)})}e.$inject=["$state","$mdDialog","$mdToast","IndexFactory","interval","intervals","toasty","api"],angular.module("app.voice").controller("EditOpenchannelAccountAppintervalDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="OPENCHANNEL.EDIT_"+(n.appType||n.app).toUpperCase(),o.noop=angular.copy(n),o.noop.appdata)switch(o.noop.appType?o.noop.appType.toLowerCase():o.noop.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.noop.appdata.split(",");o.noop.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.noop.text=s.slice(1,s.length).join(",");break;case"message":o.noop.text=o.noop.appdata;break;case"set":o.noop.name=o.noop.appdata.split("=")[0],o.noop.value=o.noop.appdata.split("=")[1];break;case"agi":o.noop.project=o.noop.appdata;break;default:var r=o.noop.appdata.split(",");o.noop.value=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.noop.type&&"outbound"===o.noop.type.toLowerCase()&&"outbounddial"===o.noop.appType.toLowerCase()&&(o.noop.prefix=o.noop.phone?o.noop.phone.split("$")[0]:void 0,o.noop.callerId=o.noop.callerID?"CALLERID(all)="+o.noop.callerID:void 0),o.saveOpenchannelAccountApp=function(){o.errors=[];var e=[];o.noop.type&&"outbound"===o.noop.type.toLowerCase()&&"outboundDial"===o.noop.appType&&(o.noop.phone=a.cutdigits?(o.noop.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.noop.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.noop.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.noop.options+="U(xcally-mixmonitor-context)"):o.noop.options=o.noop.options.replace("U(xcally-mixmonitor-context)",""));if(o.noop.appType&&"custom"===o.noop.appType);else switch((o.noop.app||o.noop.appType).toLowerCase()){case"set":o.noop.appdata=o.noop.name+"="+o.noop.value;break;case"custom":break;default:e[0]=o.noop.value,o.noop.appdata=e.join(",")}l(o.noop)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","openchannelAccountApp","openchannelAccount","api"],angular.module("app.openchannel").controller("EditOpenchannelAccountAppnoopDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="OPENCHANNEL.EDIT_"+(e.appType||e.app).toUpperCase(),o.queue=angular.copy(e),o.queue.appdata)switch(o.queue.appType?o.queue.appType.toLowerCase():o.queue.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.queue.appdata.split(",");o.queue.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.queue.text=s.slice(1,s.length).join(",");break;case"message":o.queue.text=o.queue.appdata;break;case"set":o.queue.name=o.queue.appdata.split("=")[0],o.queue.value=o.queue.appdata.split("=")[1];break;case"agi":o.queue.project=o.queue.appdata;break;default:var r=o.queue.appdata.split(",");o.queue.queue=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.queue.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.queue.queue=300,o.queue.timeout=300;function l(e){t.hide(e)}o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outbounddial"===o.queue.appType.toLowerCase()&&(o.queue.prefix=o.queue.phone?o.queue.phone.split("$")[0]:void 0,o.queue.callerId=o.queue.callerID?"CALLERID(all)="+o.queue.callerID:void 0),o.saveOpenchannelAccountApp=function(){o.errors=[];var e=[];o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outboundDial"===o.queue.appType&&(o.queue.phone=a.cutdigits?(o.queue.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.queue.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.queue.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.queue.options+="U(xcally-mixmonitor-context)"):o.queue.options=o.queue.options.replace("U(xcally-mixmonitor-context)",""));var t=_.find(o.queues,{name:o.queue.queue});t&&(o.queue[_.capitalize("openChannel")+"QueueId"]=t.id);if(o.queue.appType&&"custom"===o.queue.appType);else switch((o.queue.app||o.queue.appType).toLowerCase()){case"set":o.queue.appdata=o.queue.name+"="+o.queue.value;break;case"custom":break;default:e[0]=o.queue.queue,e[1]=o.queue.timeout,o.queue.appdata=e.join(",")}l(o.queue)},o.closeDialog=l,i.openchannelQueue.get({fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){o.queues=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","openchannelAccountApp","openchannelAccount","api"],angular.module("app.openchannel").controller("EditOpenchannelAccountAppqueueDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="OPENCHANNEL.EDIT_"+(e.appType||e.app).toUpperCase(),o.system=angular.copy(e),o.system.appdata)switch(o.system.appType?o.system.appType.toLowerCase():o.system.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.system.appdata.split(",");o.system.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.system.text=s.slice(1,s.length).join(",");break;case"message":o.system.text=o.system.appdata;break;case"set":o.system.name=o.system.appdata.split("=")[0],o.system.value=o.system.appdata.split("=")[1];break;case"agi":o.system.project=o.system.appdata;break;default:var r=o.system.appdata.split(",");o.system.command=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.system.variable=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.system.variable="";function l(e){t.hide(e)}o.system.type&&"outbound"===o.system.type.toLowerCase()&&"outbounddial"===o.system.appType.toLowerCase()&&(o.system.prefix=o.system.phone?o.system.phone.split("$")[0]:void 0,o.system.callerId=o.system.callerID?"CALLERID(all)="+o.system.callerID:void 0),o.saveOpenchannelAccountApp=function(){o.errors=[];var e=[];o.system.type&&"outbound"===o.system.type.toLowerCase()&&"outboundDial"===o.system.appType&&(o.system.phone=a.cutdigits?(o.system.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.system.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.system.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.system.options+="U(xcally-mixmonitor-context)"):o.system.options=o.system.options.replace("U(xcally-mixmonitor-context)",""));if(o.system.appType&&"custom"===o.system.appType);else switch((o.system.app||o.system.appType).toLowerCase()){case"set":o.system.appdata=o.system.name+"="+o.system.value;break;case"custom":break;default:e[0]=o.system.command,e[1]=o.system.variable,o.system.appdata=e.join(",")}l(o.system)},o.closeDialog=l,i.variable.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){o.variables=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvariables",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","openchannelAccountApp","openchannelAccount","api"],angular.module("app.openchannel").controller("EditOpenchannelAccountAppsystemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.openchannelAccount={},c.openchannelAccountInteractions={count:0,rows:[]},c.selectedOpenchannelAccountInteractions=[],c.query={fields:"createdAt,updatedAt,id,createdAt,Contact.firstName,Owner.name,closedAt,disposition,note,UserId,ContactId,OpenchannelAccountId,tag",sort:"-createdAt",includeAll:"true",limit:10,page:1},c.init=function(e){c.openchannelAccount=e,c.query.id=c.openchannelAccount.id,c.getOpenchannelAccountInteractions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the interaction?").htmlContent("<b>"+(e.name||"interaction")+"</b> will be deleted.").ariaLabel("delete interaction").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getOpenchannelAccountInteractions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.openchannelAccount.getInteractions(c.query,p).$promise},c.createOrEditOpenchannelAccountInteraction=function(e,t){o.show({controller:"CreateOrEditInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelAccounts/edit/interactions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{openchannelAccount:c.openchannelAccount,interaction:t,interactions:c.openchannelAccountInteractions.rows,license:null,setting:null}})},c.spyopenchannelInteraction=function(e,n){o.show({controller:"AgentGeneralInteractionController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/agent.general.interaction.dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,onShowing:function(e,t){e.vm.init({id:1,channel:"openchannel",interaction:n,spy:!0})}})},c.exportSelectedOpenchannelAccountInteractions=function(){var e=angular.copy(c.selectedOpenchannelAccountInteractions);return c.selectedOpenchannelAccountInteractions=[],e},c.deleteOpenchannelAccountInteraction=g,c.deleteSelectedOpenchannelAccountInteractions=function(e){var t=o.confirm().title("Are you sure want to delete the selected interactions?").htmlContent("<b>"+c.selectedOpenchannelAccountInteractions.length+" selected</b> will be deleted.").ariaLabel("delete interactions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedOpenchannelAccountInteractions.forEach(function(e){g(e)}),c.selectedOpenchannelAccountInteractions=[]})};var m=!0,u=1;function p(e){c.openchannelAccountInteractions=e||{count:0,rows:[]}}function g(e){l.openchannelInteraction.delete({id:e.id}).$promise.then(function(){_.remove(c.openchannelAccountInteractions.rows,{id:e.id}),c.openchannelAccountInteractions.count-=1,c.openchannelAccountInteractions.rows.length||c.getOpenchannelAccountInteractions(),r.success({title:"Interaction deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETopenchannelAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETopenchannelAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getOpenchannelAccountInteractions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.openchannel").controller("OpenchannelAccountInteractionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.openchannelAccount={},c.openchannelAccountOpenchannelCannedAnswers={count:0,rows:[]},c.selectedOpenchannelAccountOpenchannelCannedAnswers=[],c.query={fields:"createdAt,updatedAt,id,key,value,description,createdAt",limit:10,page:1},c.init=function(e){c.openchannelAccount=e,c.query.id=c.openchannelAccount.id,c.query.OpenchannelAccountId=c.openchannelAccount.id,c.getOpenchannelAccountOpenchannelCannedAnswers()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the openchannelCannedAnswer?").htmlContent("<b>"+(e.name||"openchannelCannedAnswer")+"</b> will be deleted.").ariaLabel("delete openchannelCannedAnswer").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getOpenchannelAccountOpenchannelCannedAnswers=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.openchannelAccount.getAnswers(c.query,p).$promise},c.createOrEditOpenchannelAccountOpenchannelCannedAnswer=function(e,t){o.show({controller:"CreateOrEditOpenchannelCannedAnswerDialogController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelAccounts/edit/openchannelCannedAnswers/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{openchannelAccount:c.openchannelAccount,openchannelCannedAnswer:t,openchannelCannedAnswers:c.openchannelAccountOpenchannelCannedAnswers.rows,license:null,setting:null}})},c.exportSelectedOpenchannelAccountOpenchannelCannedAnswers=function(){var e=angular.copy(c.selectedOpenchannelAccountOpenchannelCannedAnswers);return c.selectedOpenchannelAccountOpenchannelCannedAnswers=[],e},c.deleteOpenchannelAccountOpenchannelCannedAnswer=g,c.deleteSelectedOpenchannelAccountOpenchannelCannedAnswers=function(e){var t=o.confirm().title("Are you sure want to delete the selected openchannelCannedAnswers?").htmlContent("<b>"+c.selectedOpenchannelAccountOpenchannelCannedAnswers.length+" selected</b> will be deleted.").ariaLabel("delete openchannelCannedAnswers").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedOpenchannelAccountOpenchannelCannedAnswers.forEach(function(e){g(e)}),c.selectedOpenchannelAccountOpenchannelCannedAnswers=[]})};var m=!0,u=1;function p(e){c.openchannelAccountOpenchannelCannedAnswers=e||{count:0,rows:[]}}function g(e){l.cannedAnswer.delete({id:e.id}).$promise.then(function(){_.remove(c.openchannelAccountOpenchannelCannedAnswers.rows,{id:e.id}),c.openchannelAccountOpenchannelCannedAnswers.count-=1,c.openchannelAccountOpenchannelCannedAnswers.rows.length||c.getOpenchannelAccountOpenchannelCannedAnswers(),r.success({title:"OpenchannelCannedAnswer deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETopenchannelAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETopenchannelAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getOpenchannelAccountOpenchannelCannedAnswers())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.openchannel").controller("OpenchannelAccountOpenchannelCannedAnswersController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="OPENCHANNEL.EDIT_OPENCHANNELCANNEDANSWER",m.openchannelCannedAnswer=angular.copy(s),m.openchannelCannedAnswers=o,m.newOpenchannelCannedAnswer=!1,m.openchannelCannedAnswer||(m.openchannelCannedAnswer={},m.title="OPENCHANNEL.NEW_OPENCHANNELCANNEDANSWER",m.newOpenchannelCannedAnswer=!0),t.params.id&&(m.openchannelCannedAnswer.OpenchannelAccountId=t.params.id),m.addNewOpenchannelCannedAnswer=function(){m.errors=[],r.cannedAnswer.save(m.openchannelCannedAnswer).$promise.then(function(e){m.openchannelCannedAnswers.unshift(e.toJSON()),i.success({title:"OpenchannelCannedAnswer properly created",msg:m.openchannelCannedAnswer.name?m.openchannelCannedAnswer.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveOpenchannelCannedAnswer=function(){m.errors=[],r.cannedAnswer.update({id:m.openchannelCannedAnswer.id},m.openchannelCannedAnswer).$promise.then(function(e){var t=_.find(m.openchannelCannedAnswers,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"OpenchannelCannedAnswer properly saved!",msg:m.openchannelCannedAnswer.name?m.openchannelCannedAnswer.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteOpenchannelCannedAnswer=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The openchannelCannedAnswer will be deleted.").ariaLabel("Delete OpenchannelCannedAnswer").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.cannedAnswer.delete({id:m.openchannelCannedAnswer.id}).$promise.then(function(){_.remove(m.openchannelCannedAnswers,{id:m.openchannelCannedAnswer.id}),i.success({title:"OpenchannelCannedAnswer properly deleted!",msg:(m.openchannelCannedAnswer.name||"openchannelCannedAnswer")+" has been deleted!"}),u(m.openchannelCannedAnswer)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","openchannelCannedAnswers","openchannelCannedAnswer","api","Auth","license","setting"],angular.module("app.openchannel").controller("CreateOrEditOpenchannelCannedAnswerDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.openchannelAccount={},c.openchannelAccountOpenchannelDispositions={count:0,rows:[]},c.selectedOpenchannelAccountOpenchannelDispositions=[],c.query={fields:"createdAt,updatedAt,id,name,createdAt",limit:10,page:1},c.init=function(e){c.openchannelAccount=e,c.query.id=c.openchannelAccount.id,c.query.OpenchannelAccountId=c.openchannelAccount.id,c.getOpenchannelAccountOpenchannelDispositions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the openchannelDisposition?").htmlContent("<b>"+(e.name||"openchannelDisposition")+"</b> will be deleted.").ariaLabel("delete openchannelDisposition").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getOpenchannelAccountOpenchannelDispositions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.openchannelAccount.getDispositions(c.query,p).$promise},c.createOrEditOpenchannelAccountOpenchannelDisposition=function(e,t){o.show({controller:"CreateOrEditOpenchannelDispositionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelAccounts/edit/openchannelDispositions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{openchannelAccount:c.openchannelAccount,openchannelDisposition:t,openchannelDispositions:c.openchannelAccountOpenchannelDispositions.rows,license:null,setting:null}})},c.exportSelectedOpenchannelAccountOpenchannelDispositions=function(){var e=angular.copy(c.selectedOpenchannelAccountOpenchannelDispositions);return c.selectedOpenchannelAccountOpenchannelDispositions=[],e},c.deleteOpenchannelAccountOpenchannelDisposition=g,c.deleteSelectedOpenchannelAccountOpenchannelDispositions=function(e){var t=o.confirm().title("Are you sure want to delete the selected openchannelDispositions?").htmlContent("<b>"+c.selectedOpenchannelAccountOpenchannelDispositions.length+" selected</b> will be deleted.").ariaLabel("delete openchannelDispositions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedOpenchannelAccountOpenchannelDispositions.forEach(function(e){g(e)}),c.selectedOpenchannelAccountOpenchannelDispositions=[]})};var m=!0,u=1;function p(e){c.openchannelAccountOpenchannelDispositions=e||{count:0,rows:[]}}function g(e){l.openchannelDisposition.delete({id:e.id}).$promise.then(function(){_.remove(c.openchannelAccountOpenchannelDispositions.rows,{id:e.id}),c.openchannelAccountOpenchannelDispositions.count-=1,c.openchannelAccountOpenchannelDispositions.rows.length||c.getOpenchannelAccountOpenchannelDispositions(),r.success({title:"OpenchannelDisposition deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETopenchannelAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETopenchannelAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getOpenchannelAccountOpenchannelDispositions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.openchannel").controller("OpenchannelAccountOpenchannelDispositionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="OPENCHANNEL.EDIT_OPENCHANNELDISPOSITION",m.openchannelDisposition=angular.copy(s),m.openchannelDispositions=o,m.newOpenchannelDisposition=!1,m.openchannelDisposition||(m.openchannelDisposition={},m.title="OPENCHANNEL.NEW_OPENCHANNELDISPOSITION",m.newOpenchannelDisposition=!0),t.params.id&&(m.openchannelDisposition.OpenchannelAccountId=t.params.id),m.addNewOpenchannelDisposition=function(){m.errors=[],r.openchannelDisposition.save(m.openchannelDisposition).$promise.then(function(e){m.openchannelDispositions.unshift(e.toJSON()),i.success({title:"OpenchannelDisposition properly created",msg:m.openchannelDisposition.name?m.openchannelDisposition.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelDisposition.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelDisposition.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveOpenchannelDisposition=function(){m.errors=[],r.openchannelDisposition.update({id:m.openchannelDisposition.id},m.openchannelDisposition).$promise.then(function(e){var t=_.find(m.openchannelDispositions,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"OpenchannelDisposition properly saved!",msg:m.openchannelDisposition.name?m.openchannelDisposition.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelDisposition.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelDisposition.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteOpenchannelDisposition=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The openchannelDisposition will be deleted.").ariaLabel("Delete OpenchannelDisposition").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.openchannelDisposition.delete({id:m.openchannelDisposition.id}).$promise.then(function(){_.remove(m.openchannelDispositions,{id:m.openchannelDisposition.id}),i.success({title:"OpenchannelDisposition properly deleted!",msg:(m.openchannelDisposition.name||"openchannelDisposition")+" has been deleted!"}),u(m.openchannelDisposition)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelDisposition.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelDisposition.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","openchannelDispositions","openchannelDisposition","api","Auth","license","setting"],angular.module("app.openchannel").controller("CreateOrEditOpenchannelDispositionDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.openchannelAccount=d||e.params.openchannelAccount||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoOpenchannelAccounts=function(){e.go("app.openchannel.openchannelAccounts")},c.saveOpenchannelAccount=function(){s.openchannelAccount.update({id:c.openchannelAccount.id},c.openchannelAccount).$promise.then(function(){r.success({title:"OpenchannelAccount updated!",msg:c.openchannelAccount.name?c.openchannelAccount.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETopenchannelAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.lists=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","openchannelAccount"],angular.module("app.openchannel").controller("OpenchannelAccountController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.openchannelAccounts=r||{count:0,rows:[]},v.table="openchannelAccounts",v.listOrder="",v.listOrderAsc=null,v.selectedOpenchannelAccounts=[],v.query={fields:"createdAt,updatedAt,id,name,key,replyUri,ListId,waitForTheAssignedAgent,description,receiveUri,notificationSound,notificationShake,notificationTemplate",sort:"-updatedAt",limit:10,page:1},v.editstate=function(e,t){n.go("app.openchannel.openchannelAccounts.edit",{id:e.id,openchannelAccount:e})},v.interactionsgoto=function(e,t){n.go("app.openchannel.openchannelAccounts.edit",{id:e.id,tab:4})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the openchannelAccount?").htmlContent("<b>"+(e.name||"openchannelAccount")+"</b> will be deleted.").ariaLabel("delete openchannelAccount").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getOpenchannelAccounts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.openchannelAccount.get(v.query,f).$promise},v.createOrEditOpenchannelAccount=function(e,t){i.show({controller:"CreateOrEditOpenchannelAccountDialogController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelAccounts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{openchannelAccount:t,openchannelAccounts:v.openchannelAccounts.rows,license:v.license,setting:v.setting}})},v.deleteOpenchannelAccount=A,v.exportSelectedOpenchannelAccounts=function(){var e=angular.copy(v.selectedOpenchannelAccounts);return v.selectedOpenchannelAccounts=[],e},v.deleteSelectedOpenchannelAccounts=function(e){var t=i.confirm().title("Are you sure want to delete the selected openchannelAccounts?").htmlContent("<b>"+v.selectedOpenchannelAccounts.length+" selected</b> will be deleted.").ariaLabel("delete OpenchannelAccounts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedOpenchannelAccounts.forEach(function(e){A(e)}),v.selectedOpenchannelAccounts=[]})},v.deselectOpenchannelAccounts=function(){v.selectedOpenchannelAccounts=[]},v.selectAllOpenchannelAccounts=function(){v.selectedOpenchannelAccounts=v.openchannelAccounts.rows},l.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.lists=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.openchannelAccounts=e||{count:0,rows:[]}}function A(e){l.openchannelAccount.delete({id:e.id}).$promise.then(function(){_.remove(v.openchannelAccounts.rows,{id:e.id}),v.openchannelAccounts.count-=1,v.openchannelAccounts.rows.length||v.getOpenchannelAccounts(),c.success({title:"OpenchannelAccount deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEopenchannelAccount"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEopenchannelAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getOpenchannelAccounts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","openchannelAccounts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.openchannel").controller("OpenchannelAccountsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="OPENCHANNEL.EDIT_OPENCHANNELQUEUE",m.openchannelQueue=angular.copy(s),m.openchannelQueues=o,m.newOpenchannelQueue=!1,m.openchannelQueue||(m.openchannelQueue={strategy:"beepall",timeout:10},m.title="OPENCHANNEL.NEW_OPENCHANNELQUEUE",m.newOpenchannelQueue=!0),m.addNewOpenchannelQueue=function(){m.errors=[],r.openchannelQueue.save(m.openchannelQueue).$promise.then(function(e){m.openchannelQueues.unshift(e.toJSON()),i.success({title:"OpenchannelQueue properly created",msg:m.openchannelQueue.name?m.openchannelQueue.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelQueue.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelQueue.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveOpenchannelQueue=function(){m.errors=[],r.openchannelQueue.update({id:m.openchannelQueue.id},m.openchannelQueue).$promise.then(function(e){var t=_.find(m.openchannelQueues,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"OpenchannelQueue properly saved!",msg:m.openchannelQueue.name?m.openchannelQueue.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelQueue.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelQueue.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteOpenchannelQueue=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The openchannelQueue will be deleted.").ariaLabel("Delete OpenchannelQueue").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.openchannelQueue.delete({id:m.openchannelQueue.id}).$promise.then(function(){_.remove(m.openchannelQueues,{id:m.openchannelQueue.id}),i.success({title:"OpenchannelQueue properly deleted!",msg:(m.openchannelQueue.name||"openchannelQueue")+" has been deleted!"}),u(m.openchannelQueue)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelQueue.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelQueue.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","openchannelQueues","openchannelQueue","api","Auth","license","setting"],angular.module("app.openchannel").controller("CreateOrEditOpenchannelQueueDialogController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r){var l=this;function d(){return a.openchannelQueue[l.isVoiceRealtime()?"getMembers":"getAgents"]({id:l.openchannelQueue.id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){return l.isVoiceRealtime()?l.selectedItems=e.rows?_.map(e.rows,function(e){return e.id=e.UserId,e.fullname=e.membername,e.penalty=e.hasOwnProperty("penalty")?"penalty "+e.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[]:l.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserOpenchannelQueue?"penalty "+e.UserOpenchannelQueue.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.selectedItems=l.selectedItems,r.hasRole("admin")?a.user.get({fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise:a.user.getAgents({id:r.getCurrentUser().id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise}).then(function(e){l.items=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserOpenchannelQueue?"penalty "+e.UserOpenchannelQueue.penalty:"",e.internal=e.internal?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.items=_.differenceBy(l.items,l.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETUSERS.GETAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}l.openchannelQueue=t,l.penalty=0,l.items=[],l.selectedItems=[],l.closeDialog=function(){e.hide()},l.isVoiceRealtime=function(){return o},l.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"penalty",labelAll:s.instant("OPENCHANNEL.ALL_AGENTS"),labelSelected:s.instant("OPENCHANNEL.SELECTED_AGENTS"),transferCallback:function(e,t){a.openchannelQueue[t?"removeAgents":"addAgents"]({id:l.openchannelQueue.id,ids:_.map(e,l.isVoiceRealtime()&&t?"UserId":"id"),penalty:l.penalty||0,realtime:o||!1}).$promise.then(function(){n.success({title:"OpenchannelQueue properly "+(t?"removed":"added"),msg:"OpenchannelQueue has been "+(t?"removed":"added")+"!"}),t||d()}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:openchannelQueue.ADDAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d()}e.$inject=["$mdDialog","toasty","api","openchannelQueue","openchannelQueues","realtime","$translate","Auth"],angular.module("app.openchannel").controller("OpenchannelQueueagentaddController",e)}(),function(){"use strict";function e(e,n,a,t,i){var o=this;o.openchannelQueue=t,o.penalty=0,o.items=[],o.selectedItems=[],o.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("OPENCHANNEL.ALL_TEAMS"),labelSelected:i.instant("OPENCHANNEL.SELECTED_TEAMS"),transferCallback:function(e,t){a.openchannelQueue[t?"removeTeams":"addTeams"]({id:o.openchannelQueue.id,ids:_.map(e,"id"),penalty:o.penalty||0}).$promise.then(function(){n.success({title:"Team properly "+(t?"removed":"added"),msg:"Team has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:openchannelQueue.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},o.closeDialog=function(){e.hide()},a.openchannelQueue.getTeams({id:o.openchannelQueue.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return o.selectedItems=e.rows?e.rows:[],o.dualMultiselectOptions.selectedItems=o.selectedItems,a.team.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){o.items=e.rows?e.rows:[],o.dualMultiselectOptions.items=_.differenceBy(o.items,o.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","openchannelQueue","$translate"],angular.module("app.openchannel").controller("OpenchannelQueueteamaddController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.openchannelQueue=d||e.params.openchannelQueue||{},c.selectedTab=e.params.tab||0,c.teamadddialog=function(e,t){n.show({controller:"OpenchannelQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelQueues/edit/teamadd/teamadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{openchannelQueue:e,openchannelQueues:c.openchannelQueues?c.openchannelQueues.rows:[]}})},c.agentadddialog=function(e,t){n.show({controller:"OpenchannelQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelQueues/edit/agentadd/agentadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{openchannelQueue:e,openchannelQueues:c.openchannelQueues?c.openchannelQueues.rows:[],realtime:!1}})},c.alert=r.info,c.gotoOpenchannelQueues=function(){e.go("app.openchannel.openchannelQueues")},c.saveOpenchannelQueue=function(){s.openchannelQueue.update({id:c.openchannelQueue.id},c.openchannelQueue).$promise.then(function(){r.success({title:"OpenchannelQueue updated!",msg:c.openchannelQueue.name?c.openchannelQueue.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETopenchannelQueue",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","openchannelQueue"],angular.module("app.openchannel").controller("OpenchannelQueueController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.openchannelQueues=r||{count:0,rows:[]},v.table="openchannelQueues",v.listOrder="",v.listOrderAsc=null,v.selectedOpenchannelQueues=[],v.query={fields:"createdAt,updatedAt,id,name,strategy,timeout,description",sort:"-updatedAt",limit:10,page:1},v.arraystrategy=_.keyBy([{option:"Beepall",value:"'beepall'"},{option:"RR Memory",value:"'rrmemory'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.openchannel.openchannelQueues.edit",{id:e.id,openchannelQueue:e})},v.teamadddialog=function(e,t){i.show({controller:"OpenchannelQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelQueues/edit/teamadd/teamadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{openchannelQueue:e,openchannelQueues:v.openchannelQueues?v.openchannelQueues.rows:[]}})},v.agentadddialog=function(e,t){i.show({controller:"OpenchannelQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelQueues/edit/agentadd/agentadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{openchannelQueue:e,openchannelQueues:v.openchannelQueues?v.openchannelQueues.rows:[],realtime:!1}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the openchannelQueue?").htmlContent("<b>"+(e.name||"openchannelQueue")+"</b> will be deleted.").ariaLabel("delete openchannelQueue").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.gotorealtimegoto=function(e,t){n.go("app.openchannel.realtime.queues",{})},v.success=f,v.getOpenchannelQueues=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.openchannelQueue.get(v.query,f).$promise},v.createOrEditOpenchannelQueue=function(e,t){i.show({controller:"CreateOrEditOpenchannelQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelQueues/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{openchannelQueue:t,openchannelQueues:v.openchannelQueues.rows,license:v.license,setting:v.setting}})},v.deleteOpenchannelQueue=A,v.exportSelectedOpenchannelQueues=function(){var e=angular.copy(v.selectedOpenchannelQueues);return v.selectedOpenchannelQueues=[],e},v.deleteSelectedOpenchannelQueues=function(e){var t=i.confirm().title("Are you sure want to delete the selected openchannelQueues?").htmlContent("<b>"+v.selectedOpenchannelQueues.length+" selected</b> will be deleted.").ariaLabel("delete OpenchannelQueues").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedOpenchannelQueues.forEach(function(e){A(e)}),v.selectedOpenchannelQueues=[]})},v.deselectOpenchannelQueues=function(){v.selectedOpenchannelQueues=[]},v.selectAllOpenchannelQueues=function(){v.selectedOpenchannelQueues=v.openchannelQueues.rows};var h=!0,b=1;function f(e){v.openchannelQueues=e||{count:0,rows:[]}}function A(e){l.openchannelQueue.delete({id:e.id}).$promise.then(function(){_.remove(v.openchannelQueues.rows,{id:e.id}),v.openchannelQueues.count-=1,v.openchannelQueues.rows.length||v.getOpenchannelQueues(),c.success({title:"OpenchannelQueue deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEopenchannelQueue"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEopenchannelQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getOpenchannelQueues())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","openchannelQueues","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.openchannel").controller("OpenchannelQueuesController",e)}(),function(){"use strict";function e(e,s,t,n,a,i,o,r,l,d,c,m,u,p,g,v){var h=this,b=["userpic","online","lastLoginAt","lastPauseAt","pauseType","lastPauseAt","internal","address","chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","chatCapacity","openchannelCapacity","mailCapacity","smsCapacity","faxCapacity","chatCurrentCapacity","openchannelCurrentCapacity","mailCurrentCapacity","smsCurrentCapacity","faxCurrentCapacity","chatStatus","openchannelStatus","mailStatus","smsStatus","faxStatus","voiceStatus","chatStatusTime","openchannelStatusTime","mailStatusTime","smsStatusTime","faxStatusTime","voiceStatusTime","queue","destconnectedlinenum"],f=["chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","online"];for(var A in h.availableStates=["ringing","inuse","busy","onhold","not_inuse"],h.pauses=o||{count:0,rows:[]},h.license=g,h.agents=r?_.keyBy(r.rows?r.rows:[],"id"):{},h.rpcAgents=l?_.keyBy(l.rows?l.rows:[],"id"):{},h.paginatedAgents={},h.load=!1,h.order=[],h.agentInternal={},h.agents)h.agents.hasOwnProperty(A)&&(h.agents[A].init=!0);h.query={limit:10,page:1,order:"fullname",globalStatusFilter:"",pauseTypeFilter:""},h.logout=function(e,t){return d.user.logout({id:e.id}).$promise.then(function(){m.success({title:"Agent logout",msg:e.fullname+"  properly logout"}),h.agents[e.id]&&(h.agents[e.id].online=!1),h.rpcAgents[e.id]&&(h.rpcAgents[e.id].online=!1),y()}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.queueAdd=function(e,t){n.show({controller:"AgentqueueaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/queueadd/queueadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{agent:e,agents:[],channel:"openchannel",realtime:!0,direction:"inbound"}})},h.pause=function(t,e){return d.user.pause({id:t.id,type:e}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.unPause=function(t){return d.user.unpause({id:t.id}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.showInfo=function(e){n.show(n.alert().clickOutsideToClose(!0).title("Legend").htmlContent("<div>TODO legend status + state</div>").ok("Ok").targetEvent(e))},h.getAgentStatus=C,h.getAgentGlobalStatus=x,h.isPause=S,h.checkPause=function(e){return"pause"===e},h.isPartialPause=function(e){return"*pause"===e},h.onSave=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(_.omit(e,f),b)),_.merge(h.rpcAgents[e.id],_.pick(_.omit(e,f),b)),x(h.agents[e.id]))},h.onUpdate=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(e,b)),_.merge(h.rpcAgents[e.id],_.pick(e,b)),x(h.agents[e.id]))},h.onInit=y,h.onConnect=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(_.merge(h.agents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])),_.merge(h.rpcAgents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])))},h.onComplete=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(h.agents[h.agentInternal[e.destaccountcode]]=_.omit(h.agents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]),h.rpcAgents[h.agentInternal[e.destaccountcode]]=_.omit(h.rpcAgents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]))},c.on("user:save",h.onSave),c.on("user:update",h.onUpdate),c.on("user:agentconnect",h.onConnect),c.on("user:agentcomplete",h.onComplete),y();var E=v(function(){h.load&&(h.load=!1,y())},999);function y(e){h.load=!1;var t,n,a=s.defer();h.promise=a.promise,h.filteredAgents=[],h.order=[],_.forIn(h.agents,function(e,t){h.rpcAgents[t]&&_.merge(e,_.pick(_.omit(h.rpcAgents[t],f),b)),x(e),e.online?(h.filteredAgents.push(e),h.agentInternal[e.internal]=t):e.globalStatusTime=_.toNumber(moment().format("x"))}),h.query.globalStatusFilter&&_.remove(h.filteredAgents,function(e){return e.globalStatus!==h.query.globalStatusFilter}),h.query.pauseTypeFilter&&_.remove(h.filteredAgents,function(e){return e.pauseType!==h.query.pauseTypeFilter}),h.query.filter&&_.remove(h.filteredAgents,function(e){return e.fullname.toLowerCase().indexOf(h.query.filter.toLowerCase())<0}),h.filteredAgents=(t=h.filteredAgents,n=_.startsWith(h.query.order,"-")?"desc":"asc",_.orderBy(t,[h.query.order.replace("-","")],[n]));var i=(h.query.page-1)*h.query.limit;h.paginatedAgents=_.drop(h.filteredAgents,i).slice(0,h.query.limit);for(var o=0;o<h.paginatedAgents.length;o+=1)h.order.push(h.paginatedAgents[o].id);a.resolve(),h.load=!0}function S(e){return"pause"===e||"*pause"===e}function T(e){return"idle"===e||"unknown"===e||"unavailable"===e||"ringing"===e||_.isNil(e)}function C(e,t){return"voice"===t?"idle"!==e[t+"Status"]?e[t+"Status"]:e[t+"Pause"]?e[t+"Status"]="pause":"idle":e[t+"Pause"]?e[t+"Status"]="pause":e[t+"Status"]}function x(e){var t="unknown";t=_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"pause":_.some([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"*pause":_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],T)?"idle":"busy",e.globalStatus!==t&&(e.globalStatus=t,e.init?(e.init=!1,e.globalStatusTime=S(t)?_.toNumber(moment(e.lastPauseAt).format("x")):_.max([e.voiceStatusTime,e.chatStatusTime,e.mailStatusTime,e.smsStatusTime,e.openchannelStatusTime,e.faxStatusTime])):e.globalStatusTime=_.toNumber(moment().format("x")))}e.$on("$destroy",function(){c.removeAllListeners("user:save"),c.removeAllListeners("user:update"),c.removeAllListeners("user:agentconnect"),c.removeAllListeners("user:agentcomplete"),E&&(v.cancel(E),E=null)})}e.$inject=["$scope","$q","$timeout","$mdDialog","$document","$filter","pauses","agents","rpcAgents","api","socket","toasty","helperClasses","Auth","license","$interval"],angular.module("app.voice").controller("AgentsOpenchannelRealtimeController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r,l,d,c,m){var u=this,p=["loggedIn","available","waiting","talking","pTalking","originated","message","dialActive","dialMethod","Trunk","paused"];function g(){var n=[];return _.forIn(u.queues,function(e,t){e.paused=0,e.loggedInDb=0,u.queues[t].agents={},n.push(l.openchannelQueue.getMembers({id:t}).$promise),u.rpcQueues[t]&&_.merge(e,_.pick(u.rpcQueues[t],p))}),t.all(n).then(function(e){for(var t=0;t<e.length;t+=1)for(var n=0;n<e[t].rows.length;n++)e[t].rows[n].paused&&u.queues[e[t].rows[n].OpenchannelQueueId].paused++,u.queues[e[t].rows[n].OpenchannelQueueId].loggedInDb++,u.queues[e[t].rows[n].OpenchannelQueueId].agents[e[t].rows[n].UserId]=e[t].rows[n].OpenchannelQueueId}).catch(function(e){console.error(e)})}u.count=s.count?s.count:0,u.queues=s?_.keyBy(s.rows?s.rows:[],"id"):{},u.rpcQueues=r?_.keyBy(r.rows?r.rows:[],"id"):{},m.hasRole("admin")?u.query={type:"inbound",sort:"-updatedAt",limit:10,page:1}:u.query={id:m.getCurrentUser().id,channel:"openchannel",type:"inbound",sort:"-updatedAt",limit:10,page:1},u.success=b,u.getQueues=function(){u.query.offset=(u.query.page-1)*u.query.limit,m.hasRole("admin")?u.promise=l.openchannelQueue.get(u.query,b).$promise:u.promise=l.user.getQueues(u.query,b).$promise},u.createOrEditOpenchannelQueue=function(e,t){a.show({controller:"CreateOrEditOpenchannelQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelQueues/create/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{openchannelQueue:t,openchannelQueues:_.values(u.queues),license:null,setting:null}})},u.agentAdd=function(e,t){a.show({controller:"OpenchannelQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelQueues/edit/agentadd/agentadd.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{openchannelQueue:t,openchannelQueues:u.queues?u.queues.rows:[],realtime:!1}})},u.updateQueue=function(e){return l.openchannelQueue.update(e).$promise.then(function(){c.success({title:"Queue properly updated!",msg:e.name?e.name+" has been updated!":""})}).catch(function(e){c.error({title:"Error creating queue!",msg:e.message})})},u.onSave=function(e){u.queues[e.id]&&_.merge(u.queues[e.id],_.pick(e,p))},u.onSaveMember=function(e){u.queues[e.OpenchannelQueueId]&&u.queues[e.OpenchannelQueueId].loggedInDb++},u.onRemoveMember=function(e){u.queues[e.OpenchannelQueueId]&&u.queues[e.OpenchannelQueueId].loggedInDb--},u.onPause=function(n){console.log("onPause",n),n.voicePause?_.forIn(u.queues,function(e,t){e.agents[n.id]&&(e.paused+=1,console.log("pause"))}):n.voicePause||_.forIn(u.queues,function(e,t){e.agents[n.id]&&0<e.paused&&(e.paused-=1,console.log("unpause"))})},u.onLogin=function(e){console.log("onLogged",e),u.queues[e.OpenchannelQueueId]&&(u.queues[e.OpenchannelQueueId].loggedInDb+=1,u.queues[e.OpenchannelQueueId].agents[e.UserId]=e.OpenchannelQueueId)},u.onLogout=function(e){console.log("onLogout",e),u.queues[e.OpenchannelQueueId]&&0<u.queues[e.OpenchannelQueueId].loggedInDb&&(u.queues[e.OpenchannelQueueId].loggedInDb-=1,delete u.queues[e.OpenchannelQueueId].agents[e.UserId])},u.$onInit=g,u.order=[],_.forIn(u.queues,function(e,t){u.order.push(e.id)}),d.on("openchannel_queue:save",u.onSave),d.on("userOpenchannelQueue:save",u.onSaveMember),d.on("userOpenchannelQueue:remove",u.onRemoveMember),d.on("user:update",u.onPause),d.on("userVoiceQueue:remove",u.onLogout),d.on("userVoiceQueue:save",u.onLogin);var v=!0,h=1;function b(e){if(u.count=e.count,u.queues=e?_.keyBy(e.rows?e.rows:[],"id"):{},e.rows){u.order=[];for(var t=0;t<e.rows.length;t++)u.order.push(e.rows[t].id)}g()}e.$watch("vm.query.filter",function(e,t){v?n(function(){v=!1}):(t||(h=u.query.page),e!==t&&(u.query.page=1),e||(u.query.page=h),u.getQueues())}),e.$on("$destroy",function(){d.removeAllListeners("openchannel_queue:save"),d.removeAllListeners("userOpenchannelQueue:remove"),d.removeAllListeners("userOpenchannelQueue:save"),d.removeAllListeners("user:update"),d.removeAllListeners("userVoiceQueue:remove"),d.removeAllListeners("userVoiceQueue:save")})}e.$inject=["$scope","$timeout","$mdDialog","$q","$document","$interval","queues","rpcQueues","api","socket","toasty","Auth"],angular.module("app.openchannel").controller("QueuesOpenchannelRealtimeController",e)}(),function(){"use strict";angular.module("app.auth").factory("helperClasses",function(){return{status:{registered:"green-300-fg icon-checkbox-marked-circle",unregistered:"red-300-fg icon-close-circle",lagged:"red-300-fg icon-close-circle",reachable:"green-300-fg icon-checkbox-marked-circle",unreachable:"red-300-fg icon-close-circle",unknown:"grey-fg icon-minus-circle"},state:{unknown:"grey-fg icon-phone-hangup",not_inuse:"green-300-fg icon-phone-hangup",inuse:"red-300-fg icon-phone-in-talk",busy:"red-300-fg icon-phone-locked",invalid:"grey-fg icon-phone-hangup",unavailable:"grey-fg icon-phone-hangup",ringing:"blue-300-fg icon-phone-incoming",ringinuse:"blue-300-fg icon-phone-incoming",onhold:"blue-300-fg icon-phone-paused"},channelStatus:{ring:"blue-300-fg icon-phone-incoming",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"},channelStatusOut:{ring:"blue-300-fg icon-phone-outgoing",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"}}})}(),function(){"use strict";function e(e,n,t){switch(t.disconnect(),t.connect(),this.selectedTab=0,n.current.name){case"app.openchannel.realtime.agents":this.selectedTab=0;break;case"app.openchannel.realtime.queues":this.selectedTab=1;break;default:this.selectedTab=0,n.go("app.openchannel.realtime.agents")}e.$watch("vm.selectedTab",function(e,t){if(e!==t)switch(e){case 0:n.go("app.openchannel.realtime.agents");break;case 1:n.go("app.openchannel.realtime.queues");break;default:n.go("app.openchannel.realtime.agents")}})}e.$inject=["$scope","$state","socket"],angular.module("app.openchannel").controller("OpenchannelRealtimeController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="SETTINGS.EDIT_CUSTOMIZATION",m.customization=angular.copy(s),m.customizations=o,m.newCustomization=!1,m.customization||(m.customization={},m.title="SETTINGS.NEW_CUSTOMIZATION",m.newCustomization=!0),m.addNewCustomization=function(){m.errors=[],r.setting.save(m.customization).$promise.then(function(e){m.customizations.unshift(e.toJSON()),i.success({title:"Customization properly created",msg:m.customization.name?m.customization.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.setting.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.setting.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveCustomization=function(){m.errors=[],r.setting.update({id:m.customization.id},m.customization).$promise.then(function(e){var t=_.find(m.customizations,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Customization properly saved!",msg:m.customization.name?m.customization.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.setting.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.setting.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteCustomization=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The customization will be deleted.").ariaLabel("Delete Customization").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.setting.delete({id:m.customization.id}).$promise.then(function(){_.remove(m.customizations,{id:m.customization.id}),i.success({title:"Customization properly deleted!",msg:(m.customization.name||"customization")+" has been deleted!"}),u(m.customization)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.setting.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.setting.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","customizations","customization","api","Auth","license","setting"],angular.module("app.settings").controller("CreateOrEditCustomizationDialogController",e)}(),function(){"use strict";function e(e,t,n){var a=this;a.customizations=e,a.customization={},a.customizations&&a.customizations.rows&&a.customizations.rows.length&&(a.customization=a.customizations.rows[0]),a.saveCustomization=function(){a.customization.id?t.setting.update({id:a.customization.id},a.customization).$promise.then(function(){n.success({title:"Customization updated!",msg:a.customization.name?a.customization.name+" has been updated!":""})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsetting",msg:e.data?JSON.stringify(e.data):e.toString()})}):t.setting.save(a.customization).$promise.then(function(e){_.merge(a.customization,e),n.success({title:"Customization updated!",msg:a.customization.name?a.customization.name+" has been updated!":""})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsetting",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["customizations","api","toasty"],angular.module("app.settings").controller("CustomizationsController",e)}(),function(){"use strict";function e(e,a){var i=this;i.customization={},i.ngFlowOptions={maxChunkRetries:1,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,allowDuplicateUploads:!0},i.ngFlow={flow:{}},i.dropping=!1,i.fileAdded=function(e){var t=["png","jpg"];if(!_.includes(t,e.getExtension()))return a.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported only: "+t.join()}),!1;if(8388608<e.size)return a.error({title:"File too big",msg:"The max allowed size for image files is 8 Mb"}),!1;var n={id:e.uniqueIdentifier,file:e,type:"uploading"};return i.customization.images.unshift(n),!0},i.upload=function(){i.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+e.get("motion.token")},i.ngFlow.flow.upload()},i.fileSuccess=function(a,e){angular.forEach(i.customization.images,function(t,e){if(t.id===a.uniqueIdentifier){var n=new FileReader;n.readAsDataURL(t.file.file),n.onload=function(e){t.url=e.target.result},t.type="image"}})},i.init=function(e){i.customization=angular.copy(e),i.ngFlowOptions.target="/api/settings/1/logo".replace(":id",i.customization.id),i.customization.images=[]}}e.$inject=["$cookies","toasty"],angular.module("app.settings").controller("CustomizationlogoController",e)}(),function(){"use strict";function e(e,a){var i=this;i.customization={},i.ngFlowOptions={maxChunkRetries:1,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,allowDuplicateUploads:!0},i.ngFlow={flow:{}},i.dropping=!1,i.fileAdded=function(e){var t=["png","jpg"];if(!_.includes(t,e.getExtension()))return a.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported only: "+t.join()}),!1;if(8388608<e.size)return a.error({title:"File too big",msg:"The max allowed size for image files is 8 Mb"}),!1;var n={id:e.uniqueIdentifier,file:e,type:"uploading"};return i.customization.images.unshift(n),!0},i.upload=function(){i.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+e.get("motion.token")},i.ngFlow.flow.upload()},i.fileSuccess=function(a,e){angular.forEach(i.customization.images,function(t,e){if(t.id===a.uniqueIdentifier){var n=new FileReader;n.readAsDataURL(t.file.file),n.onload=function(e){t.url=e.target.result},t.type="image"}})},i.init=function(e){i.customization=angular.copy(e),i.ngFlowOptions.target="/api/settings/1/logo_login".replace(":id",i.customization.id),i.customization.images=[]}}e.$inject=["$cookies","toasty"],angular.module("app.settings").controller("CustomizationlogologinController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="SETTINGS.EDIT_GENERAL",m.general=angular.copy(s),m.generals=o,m.newGeneral=!1,m.general||(m.general={min_internal:1e3,phoneBarAutoUpdater:!0,phoneBarAutoUpdaterUrl:"https://www.xcally.com/bar/phonebar/autoupdater.xml"},m.title="SETTINGS.NEW_GENERAL",m.newGeneral=!0),m.addNewGeneral=function(){m.errors=[],r.setting.save(m.general).$promise.then(function(e){m.generals.unshift(e.toJSON()),i.success({title:"General properly created",msg:m.general.name?m.general.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.setting.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.setting.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveGeneral=function(){m.errors=[],r.setting.update({id:m.general.id},m.general).$promise.then(function(e){var t=_.find(m.generals,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"General properly saved!",msg:m.general.name?m.general.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.setting.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.setting.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteGeneral=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The general will be deleted.").ariaLabel("Delete General").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.setting.delete({id:m.general.id}).$promise.then(function(){_.remove(m.generals,{id:m.general.id}),i.success({title:"General properly deleted!",msg:(m.general.name||"general")+" has been deleted!"}),u(m.general)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.setting.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.setting.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","generals","general","api","Auth","license","setting"],angular.module("app.settings").controller("CreateOrEditGeneralDialogController",e)}(),function(){"use strict";function e(e,t,n){var a=this;a.generals=e,a.general={},a.generals&&a.generals.rows&&a.generals.rows.length&&(a.general=a.generals.rows[0]),a.saveGeneral=function(){a.general.id?t.setting.update({id:a.general.id},a.general).$promise.then(function(){n.success({title:"General updated!",msg:a.general.name?a.general.name+" has been updated!":""})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsetting",msg:e.data?JSON.stringify(e.data):e.toString()})}):t.setting.save(a.general).$promise.then(function(e){_.merge(a.general,e),n.success({title:"General updated!",msg:a.general.name?a.general.name+" has been updated!":""})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsetting",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["generals","api","toasty"],angular.module("app.settings").controller("GeneralsController",e)}(),function(){"use strict";function e(t,n,a,i,o,s){var r=this;r.license=i||{},r.agents=0,r.users=0,r.telephones=0,r.license.gray&&(r.license.deadline=moment(r.license.gray).add(7,"days").format()),r.channels=[{name:"chat",icon:"icon-hangouts"},{name:"mail",icon:"icon-email"},{name:"messaging",icon:"icon-message-text"},{name:"fax",icon:"icon-deskphone"},{name:"openchannel",icon:"icon-google-earth"}],r.modules=[{name:"cm",icon:"icon-account-circle"},{name:"dialer",icon:"icon-crosshairs"},{name:"jscripty",icon:"icon-console"}],r.others=[{name:"callysquare",icon:"icon-sitemap"},{name:"webrtc",icon:"icon-server-plus"},{name:"custom",icon:"icon-table-edit"},{name:"update",icon:"icon-cloud-download"}],r.requestLicense=function(e){n.show({controller:"RequestLicenseDialogController",controllerAs:"vm",templateUrl:"app/main/apps/settings/views/license/request/dialog.html",parent:angular.element(t.body),targetEvent:e,clickOutsideToClose:!0,locals:{license:i,channels:r.channels,modules:r.modules,others:r.others}})},r.updateLicense=function(e){var t=n.prompt().title("Do you want to update your license manually?").textContent("Enter your license.").targetEvent(e).ok("Ok").cancel("Cancel");n.show(t).then(function(e){if(e)return s.license.update({id:1,license:e}).$promise.then(function(){o.success({title:"License properly updated!",msg:"The license has been updated!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATElicense",msg:e.data?JSON.stringify(e.data):e.toString()})})}).catch(function(e){e&&console.error(e)})},r.gotoProcess=function(e){a.go("app.settings.system",{tab:1})},s.user.get({fields:"id",role:"agent",online:!0}).$promise.then(function(e){return r.agents=e&&e.count?e.count:0,s.user.get({fields:"id",role:"user,admin"}).$promise}).then(function(e){return r.users=e&&e.count?e.count:0,s.user.get({fields:"id",role:"telephone"}).$promise}).then(function(e){r.telephones=e&&e.count?e.count:0}).catch(function(e){console.log(e)})}e.$inject=["$document","$mdDialog","$state","license","toasty","api"],angular.module("app.settings.license").controller("LicenseController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l){var d=this;function c(){e.hide()}d.errors=[],d.user=r.getCurrentUser(),d.license=angular.copy(n),d.channels=a,d.modules=i,d.others=o,d.license.name=d.user.fullname,d.license.email=d.user.email,d.sendRequest=function(){for(var e in d.errors=[],d.table="||FIELD||OLD||NEW||\n",d.license)d.license.hasOwnProperty(e)&&!_.includes(["$promise","$resolved"],e)&&(n[e]===d.license[e]?d.table+="|"+e+"|"+(void 0!==n[e]?n[e]:"")+"|"+d.license[e]+"|\n":d.table+="|"+e+"|{color:red}"+(void 0!==n[e]?n[e]:"")+"{color}|*"+d.license[e]+"*|\n");s.jira.save({key:"MOTLICENSE",summary:"Motion License Request",description:d.table,issuetype:"Task"}).$promise.then(function(e){t.success({title:"Request sent!",msg:l.instant("SETTINGS.LICENSE_REQUEST_SENT"),timeout:15e3}),c()}).catch(function(e){console.error(e),d.errors=[{message:l.instant("SETTINGS.JIRA_ERROR_MESSAGE"),type:"api.jira"}]})},d.closeDialog=c}e.$inject=["$mdDialog","toasty","license","channels","modules","others","api","Auth","$translate"],angular.module("app.settings.license").controller("RequestLicenseDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="SETTINGS.EDIT_NETWORK",m.network=angular.copy(s),m.networks=o,m.newNetwork=!1,m.network||(m.network={type:"localnet"},m.title="SETTINGS.NEW_NETWORK",m.newNetwork=!0),m.addNewNetwork=function(){m.errors=[],r.network.save(m.network).$promise.then(function(e){m.networks.unshift(e.toJSON()),i.success({title:"Network properly created",msg:m.network.name?m.network.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.network.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.network.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveNetwork=function(){m.errors=[],r.network.update({id:m.network.id},m.network).$promise.then(function(e){var t=_.find(m.networks,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Network properly saved!",msg:m.network.name?m.network.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.network.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.network.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteNetwork=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The network will be deleted.").ariaLabel("Delete Network").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.network.delete({id:m.network.id}).$promise.then(function(){_.remove(m.networks,{id:m.network.id}),i.success({title:"Network properly deleted!",msg:(m.network.name||"network")+" has been deleted!"}),u(m.network)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.network.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.network.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","networks","network","api","Auth","license","setting"],angular.module("app.settings").controller("CreateOrEditNetworkDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.networks=r||{count:0,rows:[]},v.table="networks",v.listOrder="",v.listOrderAsc=null,v.selectedNetworks=[],v.query={fields:"createdAt,updatedAt,id,type,value,value,createdAt",sort:"-updatedAt",limit:10,page:1},v.arraytype=_.keyBy([{option:"LocalNET",value:"'localnet'"},{option:"ExternIP",value:"'externip'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editdialog=function(e,t){i.show({controller:"CreateOrEditNetworkDialogController",controllerAs:"vm",templateUrl:"app/main/apps/settings/views/networks/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{network:e,networks:v.networks.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the network?").htmlContent("<b>"+(e.name||"network")+"</b> will be deleted.").ariaLabel("delete network").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getNetworks=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.network.get(v.query,f).$promise},v.createOrEditNetwork=function(e,t){i.show({controller:"CreateOrEditNetworkDialogController",controllerAs:"vm",templateUrl:"app/main/apps/settings/views/networks/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{network:t,networks:v.networks.rows,license:v.license,setting:v.setting}})},v.deleteNetwork=A,v.exportSelectedNetworks=function(){var e=angular.copy(v.selectedNetworks);return v.selectedNetworks=[],e},v.deleteSelectedNetworks=function(e){var t=i.confirm().title("Are you sure want to delete the selected networks?").htmlContent("<b>"+v.selectedNetworks.length+" selected</b> will be deleted.").ariaLabel("delete Networks").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedNetworks.forEach(function(e){A(e)}),v.selectedNetworks=[]})},v.deselectNetworks=function(){v.selectedNetworks=[]},v.selectAllNetworks=function(){v.selectedNetworks=v.networks.rows};var h=!0,b=1;function f(e){v.networks=e||{count:0,rows:[]}}function A(e){l.network.delete({id:e.id}).$promise.then(function(){_.remove(v.networks.rows,{id:e.id}),v.networks.count-=1,v.networks.rows.length||v.getNetworks(),c.success({title:"Network deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEnetwork"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEnetwork",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getNetworks())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","networks","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.settings").controller("NetworksController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="SETTINGS.EDIT_SMTP",m.smtp=angular.copy(s),m.smtps=o,m.newSmtp=!1,m.smtp||(m.smtp={service:!0},m.title="SETTINGS.NEW_SMTP",m.newSmtp=!0),m.addNewSmtp=function(){m.errors=[],r.mailAccount.save(m.smtp).$promise.then(function(e){m.smtps.unshift(e.toJSON()),i.success({title:"Smtp properly created",msg:m.smtp.name?m.smtp.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSmtp=function(){m.errors=[],r.mailAccount.update({id:m.smtp.id},m.smtp).$promise.then(function(e){var t=_.find(m.smtps,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Smtp properly saved!",msg:m.smtp.name?m.smtp.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSmtp=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The smtp will be deleted.").ariaLabel("Delete Smtp").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.mailAccount.delete({id:m.smtp.id}).$promise.then(function(){_.remove(m.smtps,{id:m.smtp.id}),i.success({title:"Smtp properly deleted!",msg:(m.smtp.name||"smtp")+" has been deleted!"}),u(m.smtp)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","smtps","smtp","api","Auth","license","setting"],angular.module("app.settings").controller("CreateOrEditSmtpDialogController",e)}(),function(){"use strict";function e(e,t,n){var a=this;a.smtps=e,a.smtp={},a.smtps&&a.smtps.rows&&a.smtps.rows.length?a.smtp=a.smtps.rows[0]:a.smtp={service:!0,Smtp:{service:null}},a.saveSmtp=function(){a.smtp.id?t.mailAccount.update({id:a.smtp.id},a.smtp).$promise.then(function(){n.success({title:"Smtp updated!",msg:a.smtp.name?a.smtp.name+" has been updated!":""})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccount",msg:e.data?JSON.stringify(e.data):e.toString()})}):t.mailAccount.save(a.smtp).$promise.then(function(e){_.merge(a.smtp,e),n.success({title:"Smtp updated!",msg:a.smtp.name?a.smtp.name+" has been updated!":""})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})},a.verifySmtp=function(){a.smtp.id&&t.mailAccount.verifySmtp({id:a.smtp.id}).$promise.then(function(){n.success({title:"Smtp verified!",msg:a.smtp.name?a.smtp.name+" has been verified!":""})}).catch(function(e){n.error({title:"Smtp not verified! Remember to save before to verify!",msg:e.data?JSON.stringify(e.data):e.toString(),timeout:1e4})})}}e.$inject=["smtps","api","toasty"],angular.module("app.settings").controller("SmtpController",e)}(),function(){"use strict";function e(e,i,o,t,n,a,s,r){var l,d=this;d.system=n||{},d.processes=a?a.rows:[],d.processLimit=7,d.selectedTab=t.params.tab||0,d.getInfo=function(){return r.system.get().$promise.then(function(e){_.merge(d.system,e)}).catch(d.cancelInterval)},d.getProcesses=function(){return r.pm2.get().$promise.then(function(e){_.merge(d.processes,e?e.rows:[])}).catch(d.cancelInterval)},d.cancelInterval=function(e){i.cancel(l)},d.updateProcess=function(e,t,n){var a=o.confirm().title("Would you like to change the status of the process #"+t+"?").textContent("The status will be changed to: "+n.toUpperCase()).ariaLabel("Lucky day").targetEvent(e).ok("Ok").cancel("Cancel");o.show(a).then(function(){return r.pm2.update({id:t,status:n})}).then(function(){i(d.getProcesses,1e3,1)}).then(function(){s.success({title:"Process updated!",msg:"Status properly changed to: "+n})})},l=i(d.getInfo,5e3),e.$on("$destroy",function(){d.cancelInterval()})}e.$inject=["$scope","$interval","$mdDialog","$state","system","processes","toasty","api"],angular.module("app.settings.system").controller("SystemController",e)}(),function(){"use strict";function e(e,t,n,a,i){var o=this;o.title="SETTINGS.UPDATE",o.progress=0,o.updating=!0,o.output="Waiting...",o.success=!0,o.interval=t(function(){o.progress<90&&(o.progress+=1)},1e3),o.closeDialog=function(){e.hide()},o.reload=function(){n.location.reload()},o.stopInterval=function(){angular.isDefined(o.interval)&&(t.cancel(o.interval),o.interval=void 0);o.progress=100,o.updating=!1},i.version.fetch().$promise.then(function(e){return o.output=e.output+"...",i.version.reset().$promise}).then(function(e){return o.output=e.output+"...",i.version.pull().$promise}).then(function(e){return o.output=e.output+"...",i.version.migrations().$promise}).then(function(e){return o.output=e.output+"...",i.version.restart().$promise}).then(function(e){o.output="Waiting to restart motion...",a(function(){o.stopInterval()},3e4)}).catch(function(e){o.success=!1,o.stopInterval(),o.output=JSON.stringify(e)})}e.$inject=["$mdDialog","$interval","$window","$timeout","api"],angular.module("app.settings").controller("UpdateDialogController",e)}(),function(){"use strict";function e(n,e,a,t,i){this.version=t||{},this.updateConfirm=function(e){var t=n.confirm().title("Would you like to update your system?").htmlContent('The system request time for the update should be below 1 minute.<br><br>Do you agree the terms of this <a href="http://www.xcally.com/support/eula-xcally-license-en.pdf" target="_blank">End User License Agreement<a>?').ariaLabel("").targetEvent(e).clickOutsideToClose(!0).parent(angular.element(a.body)).ok("I agree").cancel("Disagree");n.show(t).then(function(){n.show({controller:"UpdateDialogController",controllerAs:"vm",templateUrl:"app/main/apps/settings/views/updates/update/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!1})})}}e.$inject=["$mdDialog","$interval","$document","version","toasty"],angular.module("app.settings").controller("UpdatesController",e)}(),function(){"use strict";function e(e,s,t,n,a,i,o,r,l,d,c,m,u,p,g,v){var h=this,b=["userpic","online","lastLoginAt","lastPauseAt","pauseType","lastPauseAt","internal","address","chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","chatCapacity","openchannelCapacity","mailCapacity","smsCapacity","faxCapacity","chatCurrentCapacity","openchannelCurrentCapacity","mailCurrentCapacity","smsCurrentCapacity","faxCurrentCapacity","chatStatus","openchannelStatus","mailStatus","smsStatus","faxStatus","voiceStatus","chatStatusTime","openchannelStatusTime","mailStatusTime","smsStatusTime","faxStatusTime","voiceStatusTime","queue","destconnectedlinenum"],f=["chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","online"];for(var A in h.availableStates=["ringing","inuse","busy","onhold","not_inuse"],h.pauses=o||{count:0,rows:[]},h.license=g,h.agents=r?_.keyBy(r.rows?r.rows:[],"id"):{},h.rpcAgents=l?_.keyBy(l.rows?l.rows:[],"id"):{},h.paginatedAgents={},h.load=!1,h.order=[],h.agentInternal={},h.agents)h.agents.hasOwnProperty(A)&&(h.agents[A].init=!0);h.query={limit:10,page:1,order:"fullname",globalStatusFilter:"",pauseTypeFilter:""},h.logout=function(e,t){return d.user.logout({id:e.id}).$promise.then(function(){m.success({title:"Agent logout",msg:e.fullname+"  properly logout"}),h.agents[e.id]&&(h.agents[e.id].online=!1),h.rpcAgents[e.id]&&(h.rpcAgents[e.id].online=!1),y()}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.queueAdd=function(e,t){n.show({controller:"AgentqueueaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/queueadd/queueadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{agent:e,agents:[],channel:"sms",realtime:!0,direction:"inbound"}})},h.pause=function(t,e){return d.user.pause({id:t.id,type:e}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.unPause=function(t){return d.user.unpause({id:t.id}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.showInfo=function(e){n.show(n.alert().clickOutsideToClose(!0).title("Legend").htmlContent("<div>TODO legend status + state</div>").ok("Ok").targetEvent(e))},h.getAgentStatus=C,h.getAgentGlobalStatus=x,h.isPause=S,h.checkPause=function(e){return"pause"===e},h.isPartialPause=function(e){return"*pause"===e},h.onSave=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(_.omit(e,f),b)),_.merge(h.rpcAgents[e.id],_.pick(_.omit(e,f),b)),x(h.agents[e.id]))},h.onUpdate=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(e,b)),_.merge(h.rpcAgents[e.id],_.pick(e,b)),x(h.agents[e.id]))},h.onInit=y,h.onConnect=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(_.merge(h.agents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])),_.merge(h.rpcAgents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])))},h.onComplete=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(h.agents[h.agentInternal[e.destaccountcode]]=_.omit(h.agents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]),h.rpcAgents[h.agentInternal[e.destaccountcode]]=_.omit(h.rpcAgents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]))},c.on("user:save",h.onSave),c.on("user:update",h.onUpdate),c.on("user:agentconnect",h.onConnect),c.on("user:agentcomplete",h.onComplete),y();var E=v(function(){h.load&&(h.load=!1,y())},999);function y(e){h.load=!1;var t,n,a=s.defer();h.promise=a.promise,h.filteredAgents=[],h.order=[],_.forIn(h.agents,function(e,t){h.rpcAgents[t]&&_.merge(e,_.pick(_.omit(h.rpcAgents[t],f),b)),x(e),e.online?(h.filteredAgents.push(e),h.agentInternal[e.internal]=t):e.globalStatusTime=_.toNumber(moment().format("x"))}),h.query.globalStatusFilter&&_.remove(h.filteredAgents,function(e){return e.globalStatus!==h.query.globalStatusFilter}),h.query.pauseTypeFilter&&_.remove(h.filteredAgents,function(e){return e.pauseType!==h.query.pauseTypeFilter}),h.query.filter&&_.remove(h.filteredAgents,function(e){return e.fullname.toLowerCase().indexOf(h.query.filter.toLowerCase())<0}),h.filteredAgents=(t=h.filteredAgents,n=_.startsWith(h.query.order,"-")?"desc":"asc",_.orderBy(t,[h.query.order.replace("-","")],[n]));var i=(h.query.page-1)*h.query.limit;h.paginatedAgents=_.drop(h.filteredAgents,i).slice(0,h.query.limit);for(var o=0;o<h.paginatedAgents.length;o+=1)h.order.push(h.paginatedAgents[o].id);a.resolve(),h.load=!0}function S(e){return"pause"===e||"*pause"===e}function T(e){return"idle"===e||"unknown"===e||"unavailable"===e||"ringing"===e||_.isNil(e)}function C(e,t){return"voice"===t?"idle"!==e[t+"Status"]?e[t+"Status"]:e[t+"Pause"]?e[t+"Status"]="pause":"idle":e[t+"Pause"]?e[t+"Status"]="pause":e[t+"Status"]}function x(e){var t="unknown";t=_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"pause":_.some([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"*pause":_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],T)?"idle":"busy",e.globalStatus!==t&&(e.globalStatus=t,e.init?(e.init=!1,e.globalStatusTime=S(t)?_.toNumber(moment(e.lastPauseAt).format("x")):_.max([e.voiceStatusTime,e.chatStatusTime,e.mailStatusTime,e.smsStatusTime,e.openchannelStatusTime,e.faxStatusTime])):e.globalStatusTime=_.toNumber(moment().format("x")))}e.$on("$destroy",function(){c.removeAllListeners("user:save"),c.removeAllListeners("user:update"),c.removeAllListeners("user:agentconnect"),c.removeAllListeners("user:agentcomplete"),E&&(v.cancel(E),E=null)})}e.$inject=["$scope","$q","$timeout","$mdDialog","$document","$filter","pauses","agents","rpcAgents","api","socket","toasty","helperClasses","Auth","license","$interval"],angular.module("app.voice").controller("AgentsSmsRealtimeController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r,l,d,c,m){var u=this,p=["loggedIn","available","waiting","talking","pTalking","originated","message","dialActive","dialMethod","Trunk","paused"];function g(){var n=[];return _.forIn(u.queues,function(e,t){e.paused=0,e.loggedInDb=0,u.queues[t].agents={},n.push(l.smsQueue.getMembers({id:t}).$promise),u.rpcQueues[t]&&_.merge(e,_.pick(u.rpcQueues[t],p))}),t.all(n).then(function(e){for(var t=0;t<e.length;t+=1)for(var n=0;n<e[t].rows.length;n++)e[t].rows[n].paused&&u.queues[e[t].rows[n].SmsQueueId].paused++,u.queues[e[t].rows[n].SmsQueueId].loggedInDb++,u.queues[e[t].rows[n].SmsQueueId].agents[e[t].rows[n].UserId]=e[t].rows[n].SmsQueueId}).catch(function(e){console.error(e)})}u.count=s.count?s.count:0,u.queues=s?_.keyBy(s.rows?s.rows:[],"id"):{},u.rpcQueues=r?_.keyBy(r.rows?r.rows:[],"id"):{},m.hasRole("admin")?u.query={type:"inbound",sort:"-updatedAt",limit:10,page:1}:u.query={id:m.getCurrentUser().id,channel:"sms",type:"inbound",sort:"-updatedAt",limit:10,page:1},u.success=b,u.getQueues=function(){u.query.offset=(u.query.page-1)*u.query.limit,m.hasRole("admin")?u.promise=l.smsQueue.get(u.query,b).$promise:u.promise=l.user.getQueues(u.query,b).$promise},u.createOrEditSmsQueue=function(e,t){a.show({controller:"CreateOrEditSmsQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsQueues/create/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{smsQueue:t,smsQueues:_.values(u.queues),license:null,setting:null}})},u.agentAdd=function(e,t){a.show({controller:"SmsQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsQueues/edit/agentadd/agentadd.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{smsQueue:t,smsQueues:u.queues?u.queues.rows:[],realtime:!1}})},u.updateQueue=function(e){return l.smsQueue.update(e).$promise.then(function(){c.success({title:"Queue properly updated!",msg:e.name?e.name+" has been updated!":""})}).catch(function(e){c.error({title:"Error creating queue!",msg:e.message})})},u.onSave=function(e){u.queues[e.id]&&_.merge(u.queues[e.id],_.pick(e,p))},u.onSaveMember=function(e){u.queues[e.SmsQueueId]&&u.queues[e.SmsQueueId].loggedInDb++},u.onRemoveMember=function(e){u.queues[e.SmsQueueId]&&u.queues[e.SmsQueueId].loggedInDb--},u.onPause=function(n){console.log("onPause",n),n.voicePause?_.forIn(u.queues,function(e,t){e.agents[n.id]&&(e.paused+=1,console.log("pause"))}):n.voicePause||_.forIn(u.queues,function(e,t){e.agents[n.id]&&0<e.paused&&(e.paused-=1,console.log("unpause"))})},u.onLogin=function(e){console.log("onLogged",e),u.queues[e.SmsQueueId]&&(u.queues[e.SmsQueueId].loggedInDb+=1,u.queues[e.SmsQueueId].agents[e.UserId]=e.SmsQueueId)},u.onLogout=function(e){console.log("onLogout",e),u.queues[e.SmsQueueId]&&0<u.queues[e.SmsQueueId].loggedInDb&&(u.queues[e.SmsQueueId].loggedInDb-=1,delete u.queues[e.SmsQueueId].agents[e.UserId])},u.$onInit=g,u.order=[],_.forIn(u.queues,function(e,t){u.order.push(e.id)}),d.on("sms_queue:save",u.onSave),d.on("userSmsQueue:save",u.onSaveMember),d.on("userSmsQueue:remove",u.onRemoveMember),d.on("user:update",u.onPause),d.on("userVoiceQueue:remove",u.onLogout),d.on("userVoiceQueue:save",u.onLogin);var v=!0,h=1;function b(e){if(u.count=e.count,u.queues=e?_.keyBy(e.rows?e.rows:[],"id"):{},e.rows){u.order=[];for(var t=0;t<e.rows.length;t++)u.order.push(e.rows[t].id)}g()}e.$watch("vm.query.filter",function(e,t){v?n(function(){v=!1}):(t||(h=u.query.page),e!==t&&(u.query.page=1),e||(u.query.page=h),u.getQueues())}),e.$on("$destroy",function(){d.removeAllListeners("sms_queue:save"),d.removeAllListeners("userSmsQueue:remove"),d.removeAllListeners("userSmsQueue:save"),d.removeAllListeners("user:update"),d.removeAllListeners("userVoiceQueue:remove"),d.removeAllListeners("userVoiceQueue:save")})}e.$inject=["$scope","$timeout","$mdDialog","$q","$document","$interval","queues","rpcQueues","api","socket","toasty","Auth"],angular.module("app.sms").controller("QueuesSmsRealtimeController",e)}(),function(){"use strict";angular.module("app.auth").factory("helperClasses",function(){return{status:{registered:"green-300-fg icon-checkbox-marked-circle",unregistered:"red-300-fg icon-close-circle",lagged:"red-300-fg icon-close-circle",reachable:"green-300-fg icon-checkbox-marked-circle",unreachable:"red-300-fg icon-close-circle",unknown:"grey-fg icon-minus-circle"},state:{unknown:"grey-fg icon-phone-hangup",not_inuse:"green-300-fg icon-phone-hangup",inuse:"red-300-fg icon-phone-in-talk",busy:"red-300-fg icon-phone-locked",invalid:"grey-fg icon-phone-hangup",unavailable:"grey-fg icon-phone-hangup",ringing:"blue-300-fg icon-phone-incoming",ringinuse:"blue-300-fg icon-phone-incoming",onhold:"blue-300-fg icon-phone-paused"},channelStatus:{ring:"blue-300-fg icon-phone-incoming",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"},channelStatusOut:{ring:"blue-300-fg icon-phone-outgoing",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"}}})}(),function(){"use strict";function e(e,n,t){switch(t.disconnect(),t.connect(),this.selectedTab=0,n.current.name){case"app.sms.realtime.agents":this.selectedTab=0;break;case"app.sms.realtime.queues":this.selectedTab=1;break;default:this.selectedTab=0,n.go("app.sms.realtime.agents")}e.$watch("vm.selectedTab",function(e,t){if(e!==t)switch(e){case 0:n.go("app.sms.realtime.agents");break;case 1:n.go("app.sms.realtime.queues");break;default:n.go("app.sms.realtime.agents")}})}e.$inject=["$scope","$state","socket"],angular.module("app.sms").controller("SmsRealtimeController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="SMS.EDIT_SMSACCOUNT",m.smsAccount=angular.copy(s),m.smsAccounts=o,m.newSmsAccount=!1,m.smsAccount||(m.smsAccount={remote:n.protocol()+"://"+n.host()+(n.port()?":"+n.port():""),type:"twilio",waitForTheAssignedAgent:10,notificationSound:!0},m.title="SMS.NEW_SMSACCOUNT",m.newSmsAccount=!0),t.params.id&&(m.smsAccount.SmsAccountId=t.params.id),m.addNewSmsAccount=function(){m.errors=[],r.smsAccount.save(m.smsAccount).$promise.then(function(e){m.smsAccounts.unshift(e.toJSON()),i.success({title:"SmsAccount properly created",msg:m.smsAccount.name?m.smsAccount.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.smsAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.smsAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSmsAccount=function(){m.errors=[],r.smsAccount.update({id:m.smsAccount.id},m.smsAccount).$promise.then(function(e){var t=_.find(m.smsAccounts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"SmsAccount properly saved!",msg:m.smsAccount.name?m.smsAccount.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.smsAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.smsAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSmsAccount=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The smsAccount will be deleted.").ariaLabel("Delete SmsAccount").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.smsAccount.delete({id:m.smsAccount.id}).$promise.then(function(){_.remove(m.smsAccounts,{id:m.smsAccount.id}),i.success({title:"SmsAccount properly deleted!",msg:(m.smsAccount.name||"smsAccount")+" has been deleted!"}),u(m.smsAccount)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.smsAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.smsAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.lists=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","smsAccounts","smsAccount","api","Auth","license","setting"],angular.module("app.sms").controller("CreateOrEditSmsAccountDialogController",e)}(),function(){"use strict";function e(s,i,a,o,e){var r=this;function t(e,t){if(r.smsAccountApps.rows.length){var n=r.smsAccountApps.rows[t]?r.smsAccountApps.rows[t]:r.smsAccountApps.rows[0];i.show({controller:"EditSmsAccountApp"+(n.appType||n.app).toLowerCase()+"DialogController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsAccounts/edit/apps/"+(n.appType||n.app).toLowerCase()+"/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{smsAccountApp:n,smsAccount:r.smsAccount}}).then(function(e){e&&(e.id?r.smsAccountApps.rows[t]=e:r.smsAccountApps.rows.splice(t,0,e),l())}).catch(function(e){e&&o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:EDITMODALSHOW",msg:e.data?JSON.stringify(e.data):e.toString()})})}}function l(){for(var e=1,t=[],n=0;n<r.smsAccountApps.rows.length;n++,0){var a=r.smsAccountApps.rows[n],i=[],o=[];a.intervals="*,*,*,*"!==a.interval?[a.interval]:a.IntervalId?_.map(_.filter(r.intervals.rows,{IntervalId:a.IntervalId}),"interval"):[],a.context=r.smsAccount.context,a.exten=r.smsAccount.exten,a.type&&(a.type=a.type.toLowerCase()),a.priority=i.length?_.last(i).priority+1:e,e=(o.length?_.last(o).priority:a.priority)+1,t=_.concat(t,i,[a],o)}s.smsAccount.addApplications({id:r.smsAccount.id},_.sortBy(t,"priority")).$promise.then(function(e){r.smsAccountApps.rows=e.rows}).catch(function(e){console.error(e)})}function n(e){r.smsAccountApps=e||{count:0,rows:[]}}r.currentUser=e.getCurrentUser(),r.smsAccount={},r.smsAccountApps={count:0,rows:[]},r.selectedSmsAccountApps=[],r.query={sort:"priority"},r.apps=_.reject(_.sortBy([{app:"Interval",appType:"interval",types:["always","custom","list"],fields:[],isApp:!1},{app:"noop",appType:"noop",type:"noop",icon:"icon-apps",interval:"*,*,*,*",required:!0,isApp:!0,fields:[{title:"Value",name:"value",type:"text",param:0}]},{app:"system",appType:"system",type:"system",icon:"icon-apps",interval:"*,*,*,*",required:!0,isApp:!0,extraApi:[{name:"variables",route:"variable",filters:{fields:"id,name",sort:"name",nolimit:!0}}],fields:[{title:"Command",name:"command",type:"text",required:!0,param:0},{title:"Variable",name:"variable",type:"apiselect",values:"variables",value:"variable.name",option:"variable.name",defaultValues:[{value:"''",option:"None"}],defaultValue:"''",param:1}]},{app:"gotop",appType:"gotop",type:"goto",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Priority",name:"priority",type:"number",required:!0,min:0,param:0}]},{app:"gotoif",appType:"gotoif",type:"gotoif",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Condition",name:"condition",type:"text",required:!0,param:0},{title:"truepriority",name:"truepriority",type:"number",min:1,required:!0,param:1},{title:"falsepriority",name:"falsepriority",type:"number",min:1,required:!0,param:2}]},{app:"queue",appType:"queue",foreignKey:"SmsQueueId",type:"queue",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"queues",route:"smsQueue",filters:{fields:"id,name,type",sort:"name",nolimit:!0}}],fields:[{title:"Queue",name:"queue",type:"apiselect",values:"queues",value:"queue.name",option:"queue.name",defaultValue:300,required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",max:2147483,min:0,required:!0,defaultValue:300,param:1}]},{app:"agent",appType:"agent",type:"agent",foreignKey:"UserId",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"agents",route:"user",filters:{fields:"id,name",sort:"name",nolimit:!0,role:"agent"}}],fields:[{title:"Agent",name:"agent",type:"apiselect",values:"agents",value:"agent.name",option:"agent.name",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",max:2147483,min:0,required:!0,defaultValue:30,param:1}]},{app:"autoreply",appType:"autoreply",type:"autoreply",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"times",name:"times",type:"select",defaultValue:"1",values:[{option:"One Time",value:"1"},{option:"Always",value:"0"}],required:!0,param:0},{title:"Text",name:"text",type:"textarea",maxlength:255,required:!0,param:1}]},{app:"close",appType:"close",type:"close",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Disposition",name:"disposition",type:"text",required:!0,param:0}]}],["app"]),{isApp:!1}),r.list={group:{name:"opt1",pull:"clone"},animation:100,sort:!1},r.applications={group:{name:"opt2",put:"opt1"},animation:100,onAdd:function(e){t(e,e.newIndex)},onSort:function(e){l()}},r.init=function(e){r.smsAccount=e,r.query.id=e.id,r.query.isApp=!0,r.query.nolimit=!0,r.getSmsAccountApps(),r.getIntervals()},r.deleteConfirm=function(e,t,n){var a=i.confirm().title("Are you sure want to delete the application?").htmlContent("<b>"+e.app+"</b> will be deleted.").ariaLabel("delete application").targetEvent(n).ok("OK").cancel("CANCEL");i.show(a).then(function(){r.smsAccountApps.rows.splice(t,1),l()},function(){console.log("CANCEL")})},r.getSmsAccountApps=function(){r.promise=s.smsAccount.getApplications(r.query,n).$promise},r.editSmsAccountApp=t,r.editInterval=function(e,t){if(r.smsAccountApps.rows.length){var n=r.smsAccountApps.rows[t]?r.smsAccountApps.rows[t]:r.smsAccountApps.rows[0];i.show({controller:"EditSmsAccountAppintervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsAccounts/edit/apps/interval/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:{interval:n.interval,IntervalId:n.IntervalId,application:!0},intervals:[]}}).then(function(e){e&&(n.interval=e.interval||"*,*,*,*",n.IntervalId=e.IntervalId||null,l())})}},r.deleteSmsAccountApp=function(e){_.remove(r.smsAccountApps.rows,{id:e.id}),l(),o.success({title:"App deleted!",msg:e.app?e.app+" has been deleted!":""})},r.deleteSelectedSmsAccountApps=function(e){var t=i.confirm().title("Are you sure want to delete the selected applications?").htmlContent("<b>"+r.selectedSmsAccountApps.length+" selected</b> will be deleted.").ariaLabel("delete applications").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){r.selectedSmsAccountApps.forEach(function(e){_.remove(r.smsAccountApps.rows,{id:e.id})}),r.selectedSmsAccountApps=[],l()})},r.rewriteRouting=l,r.getIntervals=function(){return s.interval.get({fields:"id,interval,IntervalId"}).$promise.then(function(e){r.intervals=e}).catch(function(e){console.error(e)})}}e.$inject=["api","$mdDialog","$document","toasty","Auth"],angular.module("app.sms").controller("SmsAccountActionsController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="SMS.EDIT_"+(e.appType||e.app).toUpperCase(),o.agent=angular.copy(e),o.agent.appdata)switch(o.agent.appType?o.agent.appType.toLowerCase():o.agent.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.agent.appdata.split(",");o.agent.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.agent.text=s.slice(1,s.length).join(",");break;case"message":o.agent.text=o.agent.appdata;break;case"set":o.agent.name=o.agent.appdata.split("=")[0],o.agent.value=o.agent.appdata.split("=")[1];break;case"agi":o.agent.project=o.agent.appdata;break;default:var r=o.agent.appdata.split(",");o.agent.agent=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.agent.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.agent.timeout=30;function l(e){t.hide(e)}o.agent.type&&"outbound"===o.agent.type.toLowerCase()&&"outbounddial"===o.agent.appType.toLowerCase()&&(o.agent.prefix=o.agent.phone?o.agent.phone.split("$")[0]:void 0,o.agent.callerId=o.agent.callerID?"CALLERID(all)="+o.agent.callerID:void 0),o.saveSmsAccountApp=function(){o.errors=[];var e=[];o.agent.type&&"outbound"===o.agent.type.toLowerCase()&&"outboundDial"===o.agent.appType&&(o.agent.phone=a.cutdigits?(o.agent.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.agent.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.agent.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.agent.options+="U(xcally-mixmonitor-context)"):o.agent.options=o.agent.options.replace("U(xcally-mixmonitor-context)",""));var t=_.find(o.agents,{name:o.agent.agent});t&&(o.agent.UserId=t.id);if(o.agent.appType&&"custom"===o.agent.appType);else switch((o.agent.app||o.agent.appType).toLowerCase()){case"set":o.agent.appdata=o.agent.name+"="+o.agent.value;break;case"custom":break;default:e[0]=o.agent.agent,e[1]=o.agent.timeout,o.agent.appdata=e.join(",")}l(o.agent)},o.closeDialog=l,i.user.get({fields:"id,name",sort:"name",nolimit:"true",role:"agent"}).$promise.then(function(e){o.agents=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETagents",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","smsAccountApp","smsAccount","api"],angular.module("app.sms").controller("EditSmsAccountAppagentDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="SMS.EDIT_"+(n.appType||n.app).toUpperCase(),o.autoreply=angular.copy(n),o.autoreply.appdata)switch(o.autoreply.appType?o.autoreply.appType.toLowerCase():o.autoreply.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.autoreply.appdata.split(",");o.autoreply.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.autoreply.text=s.slice(1,s.length).join(",");break;case"message":o.autoreply.text=o.autoreply.appdata;break;case"set":o.autoreply.name=o.autoreply.appdata.split("=")[0],o.autoreply.value=o.autoreply.appdata.split("=")[1];break;case"agi":o.autoreply.project=o.autoreply.appdata;break;default:var r=o.autoreply.appdata.split(",");o.autoreply.times=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.autoreply.text=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.autoreply.times=1;function l(e){t.hide(e)}o.autoreply.type&&"outbound"===o.autoreply.type.toLowerCase()&&"outbounddial"===o.autoreply.appType.toLowerCase()&&(o.autoreply.prefix=o.autoreply.phone?o.autoreply.phone.split("$")[0]:void 0,o.autoreply.callerId=o.autoreply.callerID?"CALLERID(all)="+o.autoreply.callerID:void 0),o.saveSmsAccountApp=function(){o.errors=[];var e=[];o.autoreply.type&&"outbound"===o.autoreply.type.toLowerCase()&&"outboundDial"===o.autoreply.appType&&(o.autoreply.phone=a.cutdigits?(o.autoreply.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.autoreply.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.autoreply.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.autoreply.options+="U(xcally-mixmonitor-context)"):o.autoreply.options=o.autoreply.options.replace("U(xcally-mixmonitor-context)",""));if(o.autoreply.appType&&"custom"===o.autoreply.appType);else switch((o.autoreply.app||o.autoreply.appType).toLowerCase()){case"set":o.autoreply.appdata=o.autoreply.name+"="+o.autoreply.value;break;case"custom":break;default:e[0]=o.autoreply.times,e[1]=o.autoreply.text,o.autoreply.appdata=e.join(",")}l(o.autoreply)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","smsAccountApp","smsAccount","api"],angular.module("app.sms").controller("EditSmsAccountAppautoreplyDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="SMS.EDIT_"+(n.appType||n.app).toUpperCase(),o.close=angular.copy(n),o.close.appdata)switch(o.close.appType?o.close.appType.toLowerCase():o.close.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.close.appdata.split(",");o.close.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.close.text=s.slice(1,s.length).join(",");break;case"message":o.close.text=o.close.appdata;break;case"set":o.close.name=o.close.appdata.split("=")[0],o.close.value=o.close.appdata.split("=")[1];break;case"agi":o.close.project=o.close.appdata;break;default:var r=o.close.appdata.split(",");o.close.disposition=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.close.type&&"outbound"===o.close.type.toLowerCase()&&"outbounddial"===o.close.appType.toLowerCase()&&(o.close.prefix=o.close.phone?o.close.phone.split("$")[0]:void 0,o.close.callerId=o.close.callerID?"CALLERID(all)="+o.close.callerID:void 0),o.saveSmsAccountApp=function(){o.errors=[];var e=[];o.close.type&&"outbound"===o.close.type.toLowerCase()&&"outboundDial"===o.close.appType&&(o.close.phone=a.cutdigits?(o.close.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.close.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.close.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.close.options+="U(xcally-mixmonitor-context)"):o.close.options=o.close.options.replace("U(xcally-mixmonitor-context)",""));if(o.close.appType&&"custom"===o.close.appType);else switch((o.close.app||o.close.appType).toLowerCase()){case"set":o.close.appdata=o.close.name+"="+o.close.value;break;case"custom":break;default:e[0]=o.close.disposition,o.close.appdata=e.join(",")}l(o.close)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","smsAccountApp","smsAccount","api"],angular.module("app.sms").controller("EditSmsAccountAppcloseDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="SMS.EDIT_"+(n.appType||n.app).toUpperCase(),o.gotoif=angular.copy(n),o.gotoif.appdata)switch(o.gotoif.appType?o.gotoif.appType.toLowerCase():o.gotoif.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.gotoif.appdata.split(",");o.gotoif.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.gotoif.text=s.slice(1,s.length).join(",");break;case"message":o.gotoif.text=o.gotoif.appdata;break;case"set":o.gotoif.name=o.gotoif.appdata.split("=")[0],o.gotoif.value=o.gotoif.appdata.split("=")[1];break;case"agi":o.gotoif.project=o.gotoif.appdata;break;default:var r=o.gotoif.appdata.split(",");o.gotoif.condition=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.gotoif.truepriority=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.gotoif.falsepriority=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10)}function l(e){t.hide(e)}o.gotoif.type&&"outbound"===o.gotoif.type.toLowerCase()&&"outbounddial"===o.gotoif.appType.toLowerCase()&&(o.gotoif.prefix=o.gotoif.phone?o.gotoif.phone.split("$")[0]:void 0,o.gotoif.callerId=o.gotoif.callerID?"CALLERID(all)="+o.gotoif.callerID:void 0),o.saveSmsAccountApp=function(){o.errors=[];var e=[];o.gotoif.type&&"outbound"===o.gotoif.type.toLowerCase()&&"outboundDial"===o.gotoif.appType&&(o.gotoif.phone=a.cutdigits?(o.gotoif.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.gotoif.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.gotoif.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.gotoif.options+="U(xcally-mixmonitor-context)"):o.gotoif.options=o.gotoif.options.replace("U(xcally-mixmonitor-context)",""));if(o.gotoif.appType&&"custom"===o.gotoif.appType);else switch((o.gotoif.app||o.gotoif.appType).toLowerCase()){case"set":o.gotoif.appdata=o.gotoif.name+"="+o.gotoif.value;break;case"custom":break;default:e[0]=o.gotoif.condition,e[1]=o.gotoif.truepriority,e[2]=o.gotoif.falsepriority,o.gotoif.appdata=e.join(",")}l(o.gotoif)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","smsAccountApp","smsAccount","api"],angular.module("app.sms").controller("EditSmsAccountAppgotoifDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="SMS.EDIT_"+(n.appType||n.app).toUpperCase(),o.gotop=angular.copy(n),o.gotop.appdata)switch(o.gotop.appType?o.gotop.appType.toLowerCase():o.gotop.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.gotop.appdata.split(",");o.gotop.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.gotop.text=s.slice(1,s.length).join(",");break;case"message":o.gotop.text=o.gotop.appdata;break;case"set":o.gotop.name=o.gotop.appdata.split("=")[0],o.gotop.value=o.gotop.appdata.split("=")[1];break;case"agi":o.gotop.project=o.gotop.appdata;break;default:var r=o.gotop.appdata.split(",");o.gotop.priority=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.gotop.type&&"outbound"===o.gotop.type.toLowerCase()&&"outbounddial"===o.gotop.appType.toLowerCase()&&(o.gotop.prefix=o.gotop.phone?o.gotop.phone.split("$")[0]:void 0,o.gotop.callerId=o.gotop.callerID?"CALLERID(all)="+o.gotop.callerID:void 0),o.saveSmsAccountApp=function(){o.errors=[];var e=[];o.gotop.type&&"outbound"===o.gotop.type.toLowerCase()&&"outboundDial"===o.gotop.appType&&(o.gotop.phone=a.cutdigits?(o.gotop.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.gotop.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.gotop.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.gotop.options+="U(xcally-mixmonitor-context)"):o.gotop.options=o.gotop.options.replace("U(xcally-mixmonitor-context)",""));if(o.gotop.appType&&"custom"===o.gotop.appType);else switch((o.gotop.app||o.gotop.appType).toLowerCase()){case"set":o.gotop.appdata=o.gotop.name+"="+o.gotop.value;break;case"custom":break;default:e[0]=o.gotop.priority,o.gotop.appdata=e.join(",")}l(o.gotop)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","smsAccountApp","smsAccount","api"],angular.module("app.sms").controller("EditSmsAccountAppgotopDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;if(l.errors=[],l.title="TOOLS.EDIT_INTERVAL",l.interval=angular.copy(i),l.intervals=o,l.newInterval=!1,l.types=["always","custom","list"],l.daysOfWeek=a.getDaysOfWeek(),l.monthNumber=a.getMonthNumber(),l.monthName=a.getMonthName(),l.daysOfMonth=a.getDaysOfMonth(),l.interval)if("*,*,*,*"!==l.interval.interval){l.type="custom";var d=l.interval.interval.split(","),c=d[0],m=d[1],u=d[2],p=d[3];if("*"!==c){var g,v=c.split("-")[0],h=c.split("-")[1];(g=new Date).setHours(Number(v.split(":")[0])),g.setMinutes(Number(v.split(":")[1])),l.timeRangeFrom=g,(g=new Date).setHours(Number(h.split(":")[0])),g.setMinutes(Number(h.split(":")[1])),l.timeRangeTo=g}"*"!==m&&(l.dayOfWeekFrom=m.split("-")[0],l.dayOfWeekTo=m.split("-")[1]),"*"!==u&&(l.monthDayFrom=u.split("-")[0],l.monthDayTo=u.split("-")[1]),"*"!==p&&(l.monthFrom=p.split("-")[0],l.monthTo=p.split("-")[1])}else l.type="always";else l.interval={interval:"*,*,*,*"},l.type="always",l.title="TOOLS.NEW_INTERVAL",l.newInterval=!0;function b(){switch(l.type){case"always":case"list":return"*,*,*,*";case"custom":var e=[];if("*"!==l.timeRangeFrom&&l.timeRangeFrom&&l.timeRangeTo){var t=(l.timeRangeFrom.getHours()<10?"0":"")+l.timeRangeFrom.getHours()+":"+(l.timeRangeFrom.getMinutes()<10?"0":"")+l.timeRangeFrom.getMinutes(),n=(l.timeRangeTo.getHours()<10?"0":"")+l.timeRangeTo.getHours()+":"+(l.timeRangeTo.getMinutes()<10?"0":"")+l.timeRangeTo.getMinutes();e.push(t+"-"+n)}else e.push("*");return l.dayOfWeekFrom?l.dayOfWeekTo?e.push(l.dayOfWeekFrom+"-"+l.dayOfWeekTo):e.push(l.dayOfWeekFrom):e.push("*"),l.monthDayFrom?l.monthDayTo?e.push(l.monthDayFrom+"-"+l.monthDayTo):e.push(l.monthDayFrom):e.push("*"),l.monthFrom?l.monthTo?e.push(l.monthFrom+"-"+l.monthTo):e.push(l.monthFrom):e.push("*"),e.join()}}function f(e){t.hide(e)}e.params.id&&!l.interval.application&&(l.interval.IntervalId=e.params.id),l.interval.IntervalId&&l.interval.application&&(l.type="list"),l.addNewInterval=function(){l.errors=[],l.interval.interval=b(),r.interval.save(l.interval).$promise.then(function(e){l.intervals.push(e),s.success({title:"Interval properly created",msg:l.interval.name?l.interval.name+" has been created!":""}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}]})},l.saveInterval=function(){l.errors=[],l.interval.interval=b(),l.interval.application?("list"!==l.type&&(l.interval.IntervalId=null),f(l.interval)):r.interval.update({id:l.interval.id},l.interval).$promise.then(function(e){var t=_.find(l.intervals,{id:e.id});t&&_.merge(t,e),s.success({title:"Interval properly saved!",msg:"Interval has been saved!"}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}]})},l.closeDialog=f,l.interval.application&&r.interval.get({fields:"id,name,interval,IntervalId",IntervalId:"null",nolimit:!0}).$promise.then(function(e){l.intervals=e}).catch(function(e){console.error(e)})}e.$inject=["$state","$mdDialog","$mdToast","IndexFactory","interval","intervals","toasty","api"],angular.module("app.voice").controller("EditSmsAccountAppintervalDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="SMS.EDIT_"+(n.appType||n.app).toUpperCase(),o.noop=angular.copy(n),o.noop.appdata)switch(o.noop.appType?o.noop.appType.toLowerCase():o.noop.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.noop.appdata.split(",");o.noop.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.noop.text=s.slice(1,s.length).join(",");break;case"message":o.noop.text=o.noop.appdata;break;case"set":o.noop.name=o.noop.appdata.split("=")[0],o.noop.value=o.noop.appdata.split("=")[1];break;case"agi":o.noop.project=o.noop.appdata;break;default:var r=o.noop.appdata.split(",");o.noop.value=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.noop.type&&"outbound"===o.noop.type.toLowerCase()&&"outbounddial"===o.noop.appType.toLowerCase()&&(o.noop.prefix=o.noop.phone?o.noop.phone.split("$")[0]:void 0,o.noop.callerId=o.noop.callerID?"CALLERID(all)="+o.noop.callerID:void 0),o.saveSmsAccountApp=function(){o.errors=[];var e=[];o.noop.type&&"outbound"===o.noop.type.toLowerCase()&&"outboundDial"===o.noop.appType&&(o.noop.phone=a.cutdigits?(o.noop.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.noop.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.noop.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.noop.options+="U(xcally-mixmonitor-context)"):o.noop.options=o.noop.options.replace("U(xcally-mixmonitor-context)",""));if(o.noop.appType&&"custom"===o.noop.appType);else switch((o.noop.app||o.noop.appType).toLowerCase()){case"set":o.noop.appdata=o.noop.name+"="+o.noop.value;break;case"custom":break;default:e[0]=o.noop.value,o.noop.appdata=e.join(",")}l(o.noop)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","smsAccountApp","smsAccount","api"],angular.module("app.sms").controller("EditSmsAccountAppnoopDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="SMS.EDIT_"+(e.appType||e.app).toUpperCase(),o.queue=angular.copy(e),o.queue.appdata)switch(o.queue.appType?o.queue.appType.toLowerCase():o.queue.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.queue.appdata.split(",");o.queue.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.queue.text=s.slice(1,s.length).join(",");break;case"message":o.queue.text=o.queue.appdata;break;case"set":o.queue.name=o.queue.appdata.split("=")[0],o.queue.value=o.queue.appdata.split("=")[1];break;case"agi":o.queue.project=o.queue.appdata;break;default:var r=o.queue.appdata.split(",");o.queue.queue=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.queue.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.queue.queue=300,o.queue.timeout=300;function l(e){t.hide(e)}o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outbounddial"===o.queue.appType.toLowerCase()&&(o.queue.prefix=o.queue.phone?o.queue.phone.split("$")[0]:void 0,o.queue.callerId=o.queue.callerID?"CALLERID(all)="+o.queue.callerID:void 0),o.saveSmsAccountApp=function(){o.errors=[];var e=[];o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outboundDial"===o.queue.appType&&(o.queue.phone=a.cutdigits?(o.queue.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.queue.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.queue.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.queue.options+="U(xcally-mixmonitor-context)"):o.queue.options=o.queue.options.replace("U(xcally-mixmonitor-context)",""));var t=_.find(o.queues,{name:o.queue.queue});t&&(o.queue[_.capitalize("sms")+"QueueId"]=t.id);if(o.queue.appType&&"custom"===o.queue.appType);else switch((o.queue.app||o.queue.appType).toLowerCase()){case"set":o.queue.appdata=o.queue.name+"="+o.queue.value;break;case"custom":break;default:e[0]=o.queue.queue,e[1]=o.queue.timeout,o.queue.appdata=e.join(",")}l(o.queue)},o.closeDialog=l,i.smsQueue.get({fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){o.queues=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","smsAccountApp","smsAccount","api"],angular.module("app.sms").controller("EditSmsAccountAppqueueDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="SMS.EDIT_"+(e.appType||e.app).toUpperCase(),o.system=angular.copy(e),o.system.appdata)switch(o.system.appType?o.system.appType.toLowerCase():o.system.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.system.appdata.split(",");o.system.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.system.text=s.slice(1,s.length).join(",");break;case"message":o.system.text=o.system.appdata;break;case"set":o.system.name=o.system.appdata.split("=")[0],o.system.value=o.system.appdata.split("=")[1];break;case"agi":o.system.project=o.system.appdata;break;default:var r=o.system.appdata.split(",");o.system.command=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.system.variable=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.system.variable="";function l(e){t.hide(e)}o.system.type&&"outbound"===o.system.type.toLowerCase()&&"outbounddial"===o.system.appType.toLowerCase()&&(o.system.prefix=o.system.phone?o.system.phone.split("$")[0]:void 0,o.system.callerId=o.system.callerID?"CALLERID(all)="+o.system.callerID:void 0),o.saveSmsAccountApp=function(){o.errors=[];var e=[];o.system.type&&"outbound"===o.system.type.toLowerCase()&&"outboundDial"===o.system.appType&&(o.system.phone=a.cutdigits?(o.system.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.system.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.system.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.system.options+="U(xcally-mixmonitor-context)"):o.system.options=o.system.options.replace("U(xcally-mixmonitor-context)",""));if(o.system.appType&&"custom"===o.system.appType);else switch((o.system.app||o.system.appType).toLowerCase()){case"set":o.system.appdata=o.system.name+"="+o.system.value;break;case"custom":break;default:e[0]=o.system.command,e[1]=o.system.variable,o.system.appdata=e.join(",")}l(o.system)},o.closeDialog=l,i.variable.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){o.variables=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvariables",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","smsAccountApp","smsAccount","api"],angular.module("app.sms").controller("EditSmsAccountAppsystemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.smsAccount={},c.smsAccountInteractions={count:0,rows:[]},c.selectedSmsAccountInteractions=[],c.query={fields:"createdAt,updatedAt,id,createdAt,Contact.firstName,Owner.name,closedAt,disposition,note,UserId,ContactId,SmsAccountId,tag",sort:"-createdAt",includeAll:"true",limit:10,page:1},c.init=function(e){c.smsAccount=e,c.query.id=c.smsAccount.id,c.getSmsAccountInteractions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the interaction?").htmlContent("<b>"+(e.name||"interaction")+"</b> will be deleted.").ariaLabel("delete interaction").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getSmsAccountInteractions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.smsAccount.getInteractions(c.query,p).$promise},c.createOrEditSmsAccountInteraction=function(e,t){o.show({controller:"CreateOrEditInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsAccounts/edit/interactions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{smsAccount:c.smsAccount,interaction:t,interactions:c.smsAccountInteractions.rows,license:null,setting:null}})},c.spysmsInteraction=function(e,n){o.show({controller:"AgentGeneralInteractionController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/agent.general.interaction.dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,onShowing:function(e,t){e.vm.init({id:1,channel:"sms",interaction:n,spy:!0})}})},c.exportSelectedSmsAccountInteractions=function(){var e=angular.copy(c.selectedSmsAccountInteractions);return c.selectedSmsAccountInteractions=[],e},c.deleteSmsAccountInteraction=g,c.deleteSelectedSmsAccountInteractions=function(e){var t=o.confirm().title("Are you sure want to delete the selected interactions?").htmlContent("<b>"+c.selectedSmsAccountInteractions.length+" selected</b> will be deleted.").ariaLabel("delete interactions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedSmsAccountInteractions.forEach(function(e){g(e)}),c.selectedSmsAccountInteractions=[]})};var m=!0,u=1;function p(e){c.smsAccountInteractions=e||{count:0,rows:[]}}function g(e){l.smsInteraction.delete({id:e.id}).$promise.then(function(){_.remove(c.smsAccountInteractions.rows,{id:e.id}),c.smsAccountInteractions.count-=1,c.smsAccountInteractions.rows.length||c.getSmsAccountInteractions(),r.success({title:"Interaction deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETsmsAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsmsAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getSmsAccountInteractions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.sms").controller("SmsAccountInteractionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.smsAccount={},c.smsAccountSmsCannedAnswers={count:0,rows:[]},c.selectedSmsAccountSmsCannedAnswers=[],c.query={fields:"createdAt,updatedAt,id,key,value,description,createdAt",limit:10,page:1},c.init=function(e){c.smsAccount=e,c.query.id=c.smsAccount.id,c.query.SmsAccountId=c.smsAccount.id,c.getSmsAccountSmsCannedAnswers()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the smsCannedAnswer?").htmlContent("<b>"+(e.name||"smsCannedAnswer")+"</b> will be deleted.").ariaLabel("delete smsCannedAnswer").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getSmsAccountSmsCannedAnswers=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.smsAccount.getAnswers(c.query,p).$promise},c.createOrEditSmsAccountSmsCannedAnswer=function(e,t){o.show({controller:"CreateOrEditSmsCannedAnswerDialogController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsAccounts/edit/smsCannedAnswers/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{smsAccount:c.smsAccount,smsCannedAnswer:t,smsCannedAnswers:c.smsAccountSmsCannedAnswers.rows,license:null,setting:null}})},c.exportSelectedSmsAccountSmsCannedAnswers=function(){var e=angular.copy(c.selectedSmsAccountSmsCannedAnswers);return c.selectedSmsAccountSmsCannedAnswers=[],e},c.deleteSmsAccountSmsCannedAnswer=g,c.deleteSelectedSmsAccountSmsCannedAnswers=function(e){var t=o.confirm().title("Are you sure want to delete the selected smsCannedAnswers?").htmlContent("<b>"+c.selectedSmsAccountSmsCannedAnswers.length+" selected</b> will be deleted.").ariaLabel("delete smsCannedAnswers").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedSmsAccountSmsCannedAnswers.forEach(function(e){g(e)}),c.selectedSmsAccountSmsCannedAnswers=[]})};var m=!0,u=1;function p(e){c.smsAccountSmsCannedAnswers=e||{count:0,rows:[]}}function g(e){l.cannedAnswer.delete({id:e.id}).$promise.then(function(){_.remove(c.smsAccountSmsCannedAnswers.rows,{id:e.id}),c.smsAccountSmsCannedAnswers.count-=1,c.smsAccountSmsCannedAnswers.rows.length||c.getSmsAccountSmsCannedAnswers(),r.success({title:"SmsCannedAnswer deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETsmsAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsmsAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getSmsAccountSmsCannedAnswers())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.sms").controller("SmsAccountSmsCannedAnswersController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="SMS.EDIT_SMSCANNEDANSWER",m.smsCannedAnswer=angular.copy(s),m.smsCannedAnswers=o,m.newSmsCannedAnswer=!1,m.smsCannedAnswer||(m.smsCannedAnswer={},m.title="SMS.NEW_SMSCANNEDANSWER",m.newSmsCannedAnswer=!0),t.params.id&&(m.smsCannedAnswer.SmsAccountId=t.params.id),m.addNewSmsCannedAnswer=function(){m.errors=[],r.cannedAnswer.save(m.smsCannedAnswer).$promise.then(function(e){m.smsCannedAnswers.unshift(e.toJSON()),i.success({title:"SmsCannedAnswer properly created",msg:m.smsCannedAnswer.name?m.smsCannedAnswer.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSmsCannedAnswer=function(){m.errors=[],r.cannedAnswer.update({id:m.smsCannedAnswer.id},m.smsCannedAnswer).$promise.then(function(e){var t=_.find(m.smsCannedAnswers,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"SmsCannedAnswer properly saved!",msg:m.smsCannedAnswer.name?m.smsCannedAnswer.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSmsCannedAnswer=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The smsCannedAnswer will be deleted.").ariaLabel("Delete SmsCannedAnswer").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.cannedAnswer.delete({id:m.smsCannedAnswer.id}).$promise.then(function(){_.remove(m.smsCannedAnswers,{id:m.smsCannedAnswer.id}),i.success({title:"SmsCannedAnswer properly deleted!",msg:(m.smsCannedAnswer.name||"smsCannedAnswer")+" has been deleted!"}),u(m.smsCannedAnswer)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","smsCannedAnswers","smsCannedAnswer","api","Auth","license","setting"],angular.module("app.sms").controller("CreateOrEditSmsCannedAnswerDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.smsAccount={},c.smsAccountSmsDispositions={count:0,rows:[]},c.selectedSmsAccountSmsDispositions=[],c.query={fields:"createdAt,updatedAt,id,name,createdAt",limit:10,page:1},c.init=function(e){c.smsAccount=e,c.query.id=c.smsAccount.id,c.query.SmsAccountId=c.smsAccount.id,c.getSmsAccountSmsDispositions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the smsDisposition?").htmlContent("<b>"+(e.name||"smsDisposition")+"</b> will be deleted.").ariaLabel("delete smsDisposition").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getSmsAccountSmsDispositions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.smsAccount.getDispositions(c.query,p).$promise},c.createOrEditSmsAccountSmsDisposition=function(e,t){o.show({controller:"CreateOrEditSmsDispositionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsAccounts/edit/smsDispositions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{smsAccount:c.smsAccount,smsDisposition:t,smsDispositions:c.smsAccountSmsDispositions.rows,license:null,setting:null}})},c.exportSelectedSmsAccountSmsDispositions=function(){var e=angular.copy(c.selectedSmsAccountSmsDispositions);return c.selectedSmsAccountSmsDispositions=[],e},c.deleteSmsAccountSmsDisposition=g,c.deleteSelectedSmsAccountSmsDispositions=function(e){var t=o.confirm().title("Are you sure want to delete the selected smsDispositions?").htmlContent("<b>"+c.selectedSmsAccountSmsDispositions.length+" selected</b> will be deleted.").ariaLabel("delete smsDispositions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedSmsAccountSmsDispositions.forEach(function(e){g(e)}),c.selectedSmsAccountSmsDispositions=[]})};var m=!0,u=1;function p(e){c.smsAccountSmsDispositions=e||{count:0,rows:[]}}function g(e){l.smsDisposition.delete({id:e.id}).$promise.then(function(){_.remove(c.smsAccountSmsDispositions.rows,{id:e.id}),c.smsAccountSmsDispositions.count-=1,c.smsAccountSmsDispositions.rows.length||c.getSmsAccountSmsDispositions(),r.success({title:"SmsDisposition deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETsmsAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsmsAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getSmsAccountSmsDispositions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.sms").controller("SmsAccountSmsDispositionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="SMS.EDIT_SMSDISPOSITION",m.smsDisposition=angular.copy(s),m.smsDispositions=o,m.newSmsDisposition=!1,m.smsDisposition||(m.smsDisposition={},m.title="SMS.NEW_SMSDISPOSITION",m.newSmsDisposition=!0),t.params.id&&(m.smsDisposition.SmsAccountId=t.params.id),m.addNewSmsDisposition=function(){m.errors=[],r.smsDisposition.save(m.smsDisposition).$promise.then(function(e){m.smsDispositions.unshift(e.toJSON()),i.success({title:"SmsDisposition properly created",msg:m.smsDisposition.name?m.smsDisposition.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.smsDisposition.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.smsDisposition.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSmsDisposition=function(){m.errors=[],r.smsDisposition.update({id:m.smsDisposition.id},m.smsDisposition).$promise.then(function(e){var t=_.find(m.smsDispositions,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"SmsDisposition properly saved!",msg:m.smsDisposition.name?m.smsDisposition.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.smsDisposition.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.smsDisposition.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSmsDisposition=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The smsDisposition will be deleted.").ariaLabel("Delete SmsDisposition").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.smsDisposition.delete({id:m.smsDisposition.id}).$promise.then(function(){_.remove(m.smsDispositions,{id:m.smsDisposition.id}),i.success({title:"SmsDisposition properly deleted!",msg:(m.smsDisposition.name||"smsDisposition")+" has been deleted!"}),u(m.smsDisposition)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.smsDisposition.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.smsDisposition.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","smsDispositions","smsDisposition","api","Auth","license","setting"],angular.module("app.sms").controller("CreateOrEditSmsDispositionDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.smsAccount=d||e.params.smsAccount||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoSmsAccounts=function(){e.go("app.sms.smsAccounts")},c.saveSmsAccount=function(){s.smsAccount.update({id:c.smsAccount.id},c.smsAccount).$promise.then(function(){r.success({title:"SmsAccount updated!",msg:c.smsAccount.name?c.smsAccount.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsmsAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.lists=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","smsAccount"],angular.module("app.sms").controller("SmsAccountController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.smsAccounts=r||{count:0,rows:[]},v.table="smsAccounts",v.listOrder="",v.listOrderAsc=null,v.selectedSmsAccounts=[],v.query={fields:"createdAt,updatedAt,id,name,key,token,remote,ListId,phone,type,accountSid,authId,authToken,smsMethod,username,password,senderString,deliveryReport,waitForTheAssignedAgent,description,receiveUrl,deliveryReportUrl,notificationSound,notificationShake,notificationTemplate",sort:"-updatedAt",limit:10,page:1},v.arraytype=_.keyBy([{option:"Twilio",value:"'twilio'"},{option:"Skebby",value:"'skebby'"},{option:"Connectel",value:"'connectel'"},{option:"ClickSend",value:"'clicksend'"},{option:"Plivo",value:"'plivo'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraysmsMethod=_.keyBy([{option:"Basic",value:"'basic'"},{option:"Classic",value:"'classic'"},{option:"Classic+",value:"'classic+'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.sms.smsAccounts.edit",{id:e.id,smsAccount:e})},v.interactionsgoto=function(e,t){n.go("app.sms.smsAccounts.edit",{id:e.id,tab:5})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the smsAccount?").htmlContent("<b>"+(e.name||"smsAccount")+"</b> will be deleted.").ariaLabel("delete smsAccount").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getSmsAccounts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.smsAccount.get(v.query,f).$promise},v.createOrEditSmsAccount=function(e,t){i.show({controller:"CreateOrEditSmsAccountDialogController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsAccounts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{smsAccount:t,smsAccounts:v.smsAccounts.rows,license:v.license,setting:v.setting}})},v.deleteSmsAccount=A,v.exportSelectedSmsAccounts=function(){var e=angular.copy(v.selectedSmsAccounts);return v.selectedSmsAccounts=[],e},v.deleteSelectedSmsAccounts=function(e){var t=i.confirm().title("Are you sure want to delete the selected smsAccounts?").htmlContent("<b>"+v.selectedSmsAccounts.length+" selected</b> will be deleted.").ariaLabel("delete SmsAccounts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedSmsAccounts.forEach(function(e){A(e)}),v.selectedSmsAccounts=[]})},v.deselectSmsAccounts=function(){v.selectedSmsAccounts=[]},v.selectAllSmsAccounts=function(){v.selectedSmsAccounts=v.smsAccounts.rows},l.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.lists=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.smsAccounts=e||{count:0,rows:[]}}function A(e){l.smsAccount.delete({id:e.id}).$promise.then(function(){_.remove(v.smsAccounts.rows,{id:e.id}),v.smsAccounts.count-=1,v.smsAccounts.rows.length||v.getSmsAccounts(),c.success({title:"SmsAccount deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEsmsAccount"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEsmsAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getSmsAccounts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","smsAccounts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.sms").controller("SmsAccountsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="SMS.EDIT_SMSQUEUE",m.smsQueue=angular.copy(s),m.smsQueues=o,m.newSmsQueue=!1,m.smsQueue||(m.smsQueue={strategy:"beepall",timeout:10},m.title="SMS.NEW_SMSQUEUE",m.newSmsQueue=!0),m.addNewSmsQueue=function(){m.errors=[],r.smsQueue.save(m.smsQueue).$promise.then(function(e){m.smsQueues.unshift(e.toJSON()),i.success({title:"SmsQueue properly created",msg:m.smsQueue.name?m.smsQueue.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.smsQueue.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.smsQueue.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSmsQueue=function(){m.errors=[],r.smsQueue.update({id:m.smsQueue.id},m.smsQueue).$promise.then(function(e){var t=_.find(m.smsQueues,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"SmsQueue properly saved!",msg:m.smsQueue.name?m.smsQueue.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.smsQueue.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.smsQueue.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSmsQueue=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The smsQueue will be deleted.").ariaLabel("Delete SmsQueue").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.smsQueue.delete({id:m.smsQueue.id}).$promise.then(function(){_.remove(m.smsQueues,{id:m.smsQueue.id}),i.success({title:"SmsQueue properly deleted!",msg:(m.smsQueue.name||"smsQueue")+" has been deleted!"}),u(m.smsQueue)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.smsQueue.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.smsQueue.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","smsQueues","smsQueue","api","Auth","license","setting"],angular.module("app.sms").controller("CreateOrEditSmsQueueDialogController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r){var l=this;function d(){return a.smsQueue[l.isVoiceRealtime()?"getMembers":"getAgents"]({id:l.smsQueue.id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){return l.isVoiceRealtime()?l.selectedItems=e.rows?_.map(e.rows,function(e){return e.id=e.UserId,e.fullname=e.membername,e.penalty=e.hasOwnProperty("penalty")?"penalty "+e.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[]:l.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserSmsQueue?"penalty "+e.UserSmsQueue.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.selectedItems=l.selectedItems,r.hasRole("admin")?a.user.get({fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise:a.user.getAgents({id:r.getCurrentUser().id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise}).then(function(e){l.items=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserSmsQueue?"penalty "+e.UserSmsQueue.penalty:"",e.internal=e.internal?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.items=_.differenceBy(l.items,l.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETUSERS.GETAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}l.smsQueue=t,l.penalty=0,l.items=[],l.selectedItems=[],l.closeDialog=function(){e.hide()},l.isVoiceRealtime=function(){return o},l.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"penalty",labelAll:s.instant("SMS.ALL_AGENTS"),labelSelected:s.instant("SMS.SELECTED_AGENTS"),transferCallback:function(e,t){a.smsQueue[t?"removeAgents":"addAgents"]({id:l.smsQueue.id,ids:_.map(e,l.isVoiceRealtime()&&t?"UserId":"id"),penalty:l.penalty||0,realtime:o||!1}).$promise.then(function(){n.success({title:"SmsQueue properly "+(t?"removed":"added"),msg:"SmsQueue has been "+(t?"removed":"added")+"!"}),t||d()}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:smsQueue.ADDAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d()}e.$inject=["$mdDialog","toasty","api","smsQueue","smsQueues","realtime","$translate","Auth"],angular.module("app.sms").controller("SmsQueueagentaddController",e)}(),function(){"use strict";function e(e,n,a,t,i){var o=this;o.smsQueue=t,o.penalty=0,o.items=[],o.selectedItems=[],o.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("SMS.ALL_TEAMS"),labelSelected:i.instant("SMS.SELECTED_TEAMS"),transferCallback:function(e,t){a.smsQueue[t?"removeTeams":"addTeams"]({id:o.smsQueue.id,ids:_.map(e,"id"),penalty:o.penalty||0}).$promise.then(function(){n.success({title:"Team properly "+(t?"removed":"added"),msg:"Team has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:smsQueue.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},o.closeDialog=function(){e.hide()},a.smsQueue.getTeams({id:o.smsQueue.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return o.selectedItems=e.rows?e.rows:[],o.dualMultiselectOptions.selectedItems=o.selectedItems,a.team.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){o.items=e.rows?e.rows:[],o.dualMultiselectOptions.items=_.differenceBy(o.items,o.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","smsQueue","$translate"],angular.module("app.sms").controller("SmsQueueteamaddController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.smsQueue=d||e.params.smsQueue||{},c.selectedTab=e.params.tab||0,c.teamadddialog=function(e,t){n.show({controller:"SmsQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsQueues/edit/teamadd/teamadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{smsQueue:e,smsQueues:c.smsQueues?c.smsQueues.rows:[]}})},c.agentadddialog=function(e,t){n.show({controller:"SmsQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsQueues/edit/agentadd/agentadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{smsQueue:e,smsQueues:c.smsQueues?c.smsQueues.rows:[],realtime:!1}})},c.alert=r.info,c.gotoSmsQueues=function(){e.go("app.sms.smsQueues")},c.saveSmsQueue=function(){s.smsQueue.update({id:c.smsQueue.id},c.smsQueue).$promise.then(function(){r.success({title:"SmsQueue updated!",msg:c.smsQueue.name?c.smsQueue.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsmsQueue",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","smsQueue"],angular.module("app.sms").controller("SmsQueueController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.smsQueues=r||{count:0,rows:[]},v.table="smsQueues",v.listOrder="",v.listOrderAsc=null,v.selectedSmsQueues=[],v.query={fields:"createdAt,updatedAt,id,name,strategy,timeout,description",sort:"-updatedAt",limit:10,page:1},v.arraystrategy=_.keyBy([{option:"Beepall",value:"'beepall'"},{option:"RR Memory",value:"'rrmemory'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.sms.smsQueues.edit",{id:e.id,smsQueue:e})},v.teamadddialog=function(e,t){i.show({controller:"SmsQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsQueues/edit/teamadd/teamadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{smsQueue:e,smsQueues:v.smsQueues?v.smsQueues.rows:[]}})},v.agentadddialog=function(e,t){i.show({controller:"SmsQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsQueues/edit/agentadd/agentadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{smsQueue:e,smsQueues:v.smsQueues?v.smsQueues.rows:[],realtime:!1}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the smsQueue?").htmlContent("<b>"+(e.name||"smsQueue")+"</b> will be deleted.").ariaLabel("delete smsQueue").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.gotorealtimegoto=function(e,t){n.go("app.sms.realtime.queues",{})},v.success=f,v.getSmsQueues=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.smsQueue.get(v.query,f).$promise},v.createOrEditSmsQueue=function(e,t){i.show({controller:"CreateOrEditSmsQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsQueues/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{smsQueue:t,smsQueues:v.smsQueues.rows,license:v.license,setting:v.setting}})},v.deleteSmsQueue=A,v.exportSelectedSmsQueues=function(){var e=angular.copy(v.selectedSmsQueues);return v.selectedSmsQueues=[],e},v.deleteSelectedSmsQueues=function(e){var t=i.confirm().title("Are you sure want to delete the selected smsQueues?").htmlContent("<b>"+v.selectedSmsQueues.length+" selected</b> will be deleted.").ariaLabel("delete SmsQueues").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedSmsQueues.forEach(function(e){A(e)}),v.selectedSmsQueues=[]})},v.deselectSmsQueues=function(){v.selectedSmsQueues=[]},v.selectAllSmsQueues=function(){v.selectedSmsQueues=v.smsQueues.rows};var h=!0,b=1;function f(e){v.smsQueues=e||{count:0,rows:[]}}function A(e){l.smsQueue.delete({id:e.id}).$promise.then(function(){_.remove(v.smsQueues.rows,{id:e.id}),v.smsQueues.count-=1,v.smsQueues.rows.length||v.getSmsQueues(),c.success({title:"SmsQueue deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEsmsQueue"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEsmsQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getSmsQueues())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","smsQueues","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.sms").controller("SmsQueuesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.agents=r||{count:0,rows:[]},v.table="agents",v.listOrder="",v.listOrderAsc=null,v.selectedAgents=[],v.query={fields:"createdAt,updatedAt,id,role,fullname,name,alias,email,phone,mobile,userpic,password,showWebBar,autointernal,internal,loginInPause,description,dtlscertfile,dtlsprivatekey,voicemail,transport,host,nat,type,allow,callerid,context,callgroup,pickupgroup,chanspy,extensionMonitor,chatCapacity,mailCapacity,faxCapacity,smsCapacity,openchannelCapacity,phoneBarEnableSettings,phoneBarAutoAnswer,phoneBarAutoAnswerDelay,phoneBarRingInUse,phoneBarEnableRecording,phoneBarEnableDtmfTone,phoneBarDnd,phoneBarUnansweredCallBadge,phoneBarEnableJaws,phoneBarOutboundProxy,phoneBarUnconditional,phoneBarUnconditionalNumber,phoneBarRemoteControl,phoneBarRemoteControlPort,voicemail,phoneBarExpires,phoneBarListenPort,permissions,allowmessenger,passwordResetAt,passwordResetAt",role:"agent",sort:"-updatedAt",limit:10,page:1},v.arrayshowWebBar=_.keyBy([{option:"Phonebar",value:"0"},{option:"External",value:"1"},{option:"WebRTC (rc-1)",value:"2"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraytransport=_.keyBy([{option:"udp",value:"'udp'"},{option:"tcp",value:"'tcp'"},{option:"ws",value:"'ws'",ngIf:"vm.agent.showWebBar == 1"},{option:"wss",value:"'wss'",ngIf:"vm.agent.showWebBar == 1"},{option:"tls",value:"'tls'",ngIf:"vm.agent.showWebBar == 1"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraynat=_.keyBy([{option:"force_rport",value:"'force_rport'"},{option:"comedia",value:"'comedia'"},{option:"yes",value:"'yes'"},{option:"no",value:"'no'"},{option:"never",value:"'never'"},{option:"route",value:"'route'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraytype=_.keyBy([{option:"Friend",value:"'friend'"},{option:"User",value:"'user'"},{option:"Peer",value:"'peer'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayallow=_.keyBy([{option:"ulaw",value:"'ulaw'"},{option:"alaw",value:"'alaw'"},{option:"gsm",value:"'gsm'"},{option:"g722",value:"'g722'"},{option:"g729",value:"'g729'"},{option:"opus",value:"'opus'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayextensionMonitor=_.keyBy([{option:"Inactive",value:"''"},{option:"wav",value:"'wav'"},{option:"wav49",value:"'WAV'"},{option:"gsm",value:"'gsm'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.staff.agents.edit",{id:e.id,agent:e})},v.teamadddialog=function(e,t){i.show({controller:"AgentteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/teamadd/teamadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{agent:e,agents:v.agents?v.agents.rows:[]}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the agent?").htmlContent("<b>"+(e.name||"agent")+"</b> will be deleted.").ariaLabel("delete agent").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getAgents=function(){v.query.offset=(v.query.page-1)*v.query.limit,m.hasRole("admin")?v.promise=l.user.get(v.query,f).$promise:(v.query.id=v.currentUser.id,v.promise=l.user.getAgents(v.query,f).$promise)},v.createOrEditAgent=function(e,t){i.show({controller:"CreateOrEditAgentDialogController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{agent:t,agents:v.agents.rows,license:v.license,setting:v.setting}})},v.deleteAgent=A,v.exportSelectedAgents=function(){var e=angular.copy(v.selectedAgents);return v.selectedAgents=[],e},v.deleteSelectedAgents=function(e){var t=i.confirm().title("Are you sure want to delete the selected agents?").htmlContent("<b>"+v.selectedAgents.length+" selected</b> will be deleted.").ariaLabel("delete Agents").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedAgents.forEach(function(e){A(e)}),v.selectedAgents=[]})},v.deselectAgents=function(){v.selectedAgents=[]},v.selectAllAgents=function(){v.selectedAgents=v.agents.rows};var h=!0,b=1;function f(e){v.agents=e||{count:0,rows:[]}}function A(e){l.user.delete({id:e.id}).$promise.then(function(){_.remove(v.agents.rows,{id:e.id}),v.agents.count-=1,v.agents.rows.length||v.getAgents(),c.success({title:"Agent deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEuser"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEuser",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getAgents())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","agents","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.staff").controller("AgentsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="STAFF.EDIT_AGENT",m.agent=angular.copy(s),m.agents=o,m.newAgent=!1,m.agent||(m.agent={role:"agent",showWebBar:"0",autointernal:!0,type:"friend",context:"from-sip",phoneBarRemoteControl:!0,phoneBarRemoteControlPort:9888,allowmessenger:!0},m.title="STAFF.NEW_AGENT",m.newAgent=!0),m.addNewAgent=function(){m.errors=[],r.user.save(m.agent).$promise.then(function(e){m.agents.unshift(e.toJSON()),i.success({title:"Agent properly created",msg:m.agent.name?m.agent.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.user.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.user.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveAgent=function(){m.errors=[],r.user.update({id:m.agent.id},m.agent).$promise.then(function(e){var t=_.find(m.agents,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Agent properly saved!",msg:m.agent.name?m.agent.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.user.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.user.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteAgent=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The agent will be deleted.").ariaLabel("Delete Agent").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.user.delete({id:m.agent.id}).$promise.then(function(){_.remove(m.agents,{id:m.agent.id}),i.success({title:"Agent properly deleted!",msg:(m.agent.name||"agent")+" has been deleted!"}),u(m.agent)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.user.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.user.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","agents","agent","api","Auth","license","setting"],angular.module("app.staff").controller("CreateOrEditAgentDialogController",e)}(),function(){"use strict";function e(e,a){var i=this;i.agent={},i.ngFlowOptions={maxChunkRetries:1,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,allowDuplicateUploads:!0},i.ngFlow={flow:{}},i.dropping=!1,i.fileAdded=function(e){var t=["png","jpg"];if(!_.includes(t,e.getExtension()))return a.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported only: "+t.join()}),!1;if(8388608<e.size)return a.error({title:"File too big",msg:"The max allowed size for image files is 8 Mb"}),!1;var n={id:e.uniqueIdentifier,file:e,type:"uploading"};return i.agent.images.unshift(n),!0},i.upload=function(){i.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+e.get("motion.token")},i.ngFlow.flow.upload()},i.fileSuccess=function(a,e){angular.forEach(i.agent.images,function(t,e){if(t.id===a.uniqueIdentifier){var n=new FileReader;n.readAsDataURL(t.file.file),n.onload=function(e){t.url=e.target.result},t.type="image"}})},i.init=function(e){i.agent=angular.copy(e),i.ngFlowOptions.target="api/users/"+i.agent.id+"/avatar",i.agent.images=[]}}e.$inject=["$cookies","toasty"],angular.module("app.staff").controller("Agentchange_avatarController",e)}(),function(){"use strict";function e(e,t,n,a,i){var o=this;function s(){e.hide()}o.errors=[],o.setting=i,o.passwordPattern=o.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",o.agent=a,o.password="",o.savePassword=function(){o.errors=[],n.user.changePassword({id:o.agent.id,newPassword:o.password}).$promise.then(function(){t.success({title:"Agent password properly updated!"}),s()}).catch(function(e){console.error(e),o.errors=e.data.errors||[{message:e.toString(),type:"api.agent.changePassword"}]})},o.closeDialog=s}e.$inject=["$mdDialog","toasty","api","agent","setting"],angular.module("app.staff").controller("AgentchangepasswordController",e)}(),function(){"use strict";function e(i,e,t,o){var s=this;s.agent={},s.navigation=t.getNavigation(),s.init=function(e){s.agent=e},s.onChange=function(t,n){if((n||t).enabled){if(n)n.enabled=!0,s.agent.permissions.push(n.id);else for(var e=0;e<t.children.length;e++)t.children[e].enabled=!0,s.agent.permissions.push(t.children[e].id);t.enabled=!0,s.agent.permissions.push(t.id)}else if(n)n.enabled=!1,_.remove(s.agent.permissions,function(e){return n.id===e}),_.filter(t.children,{enabled:!1}).length===t.children.length&&(t.enabled=!1,_.remove(s.agent.permissions,function(e){return t.id===e}));else{t.enabled=!1,_.remove(s.agent.permissions,function(e){return t.id===e});for(var a=0;a<t.children.length;a++)t.children[a].enabled=!1,_.remove(s.agent.permissions,function(e){return t.children[a].id===e})}return i.user.update({id:s.agent.id,permissions:_.uniq(s.agent.permissions)}).$promise.then(function(){o.success({title:"agent updated!",msg:s.agent.name?s.agent.name+" has been updated!":""})}).catch(function(e){console.error(e)})}}e.$inject=["api","msNavigationService","msNavigationAgentService","toasty"],angular.module("app.staff").controller("AgentPermissionsController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r,l){var d=this;function c(){a.user[d.isVoiceRealtime()?"getVoiceQueuesRt":"getQueues"]({id:d.agent.id,fields:d.isVoiceRealtime()?"VoiceQueueId,queue_name,penalty":"id,name,strategy,type",channel:i,nolimit:!0}).$promise.then(function(e){return d.isVoiceRealtime()?d.selectedItems=e.rows?_.map(e.rows,function(e){return{id:e.VoiceQueueId,name:e.queue_name,penalty:e.hasOwnProperty("penalty")?"penalty "+e.penalty:"penalty 0",strategy:""}}):[]:d.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserVoiceQueue?"penalty "+e.UserVoiceQueue.penalty:"",e}):[],l.hasRole("admin")?a[d.apiname].get({fields:"id,name,strategy,type",nolimit:!0,type:s}).$promise:a.user.getQueues({id:l.getCurrentUser().id,fields:"id,name,strategy,type",nolimit:!0,type:s,channel:i}).$promise}).then(function(e){d.items=e.rows?e.rows:[],d.selectedItems=_.intersectionBy(d.selectedItems,d.items,"id"),d.dualMultiselectOptions.selectedItems=d.selectedItems,d.dualMultiselectOptions.items=_.differenceBy(d.items,d.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETQUEUES",msg:e.status?JSON.stringify(e.data):e.toString()})})}d.agent=t,d.penalty=0,d.apiname=i+"Queue",d.title=r.instant("STAFF.QUEUEADD_AGENT_"+i.toUpperCase()+"_"+s.toUpperCase()),d.items=[],d.selectedItems=[],d.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"name",line2:"type",line3:"agent"===d.agent.role?"penalty":"",labelAll:r.instant("STAFF.ALL_QUEUES_"+i.toUpperCase()+"_"+s.toUpperCase()),labelSelected:r.instant("STAFF.SELECTED_QUEUES_"+i.toUpperCase()+"_"+s.toUpperCase()),transferCallback:function(e,t){a.user[t?"removeQueues":"addQueues"]({id:d.agent.id,ids:_.map(e,"id"),channel:i,penalty:d.penalty||0,realtime:o}).$promise.then(function(){c(),n.success({title:"Queue properly "+(t?"removed":"added"),msg:"Queue has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:USER.ADDQUEUES",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d.closeDialog=function(){e.hide()},d.isVoiceRealtime=function(){return o&&"voice"===i},d.isVoiceChannel=function(){return"voice"===i},c()}e.$inject=["$mdDialog","toasty","api","agent","channel","realtime","direction","$translate","Auth"],angular.module("app.staff").controller("AgentqueueaddController",e)}(),function(){"use strict";function e(e,n,a,t,i){var o=this;o.agent=t,o.penalty=0,o.items=[],o.selectedItems=[],o.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("STAFF.ALL_TEAMS"),labelSelected:i.instant("STAFF.SELECTED_TEAMS"),transferCallback:function(e,t){a.user[t?"removeTeams":"addTeams"]({id:o.agent.id,ids:_.map(e,"id"),penalty:o.penalty||0}).$promise.then(function(){n.success({title:"Team properly "+(t?"removed":"added"),msg:"Team has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:agent.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},o.closeDialog=function(){e.hide()},a.user.getTeams({id:o.agent.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return o.selectedItems=e.rows?e.rows:[],o.dualMultiselectOptions.selectedItems=o.selectedItems,a.team.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){o.items=e.rows?e.rows:[],o.dualMultiselectOptions.items=_.differenceBy(o.items,o.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","agent","$translate"],angular.module("app.staff").controller("AgentteamaddController",e)}(),function(){"use strict";function e(e,t,i,o,n,a,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=n,c.setting=a,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.agent=d||e.params.agent||{},c.selectedTab=e.params.tab||0,c.queueaddchannel=function(e,t,n,a){i.show({controller:"AgentqueueaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/queueadd/queueadd.html",parent:angular.element(o.body),targetEvent:n,clickOutsideToClose:!0,locals:{agent:e,agents:c.agents?c.agents.rows:[],channel:t,realtime:!1,direction:a||"inbound"}})},c.teamadddialog=function(e,t){i.show({controller:"AgentteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/teamadd/teamadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{agent:e,agents:c.agents?c.agents.rows:[]}})},c.changepassworddialog=function(e,t){i.show({controller:"AgentchangepasswordController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/changepassword/changepassword.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{agent:e,setting:a,agents:c.agents?c.agents.rows:[]}})},c.alert=r.info,c.gotoAgents=function(){e.go("app.staff.agents")},c.saveAgent=function(){c.agent=_.omit(c.agent,"userpic"),s.user.update({id:c.agent.id},c.agent).$promise.then(function(){r.success({title:"Agent updated!",msg:c.agent.name?c.agent.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETuser",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){c.contexts=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","agent"],angular.module("app.staff").controller("AgentController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="STAFF.EDIT_TEAM",m.team=angular.copy(s),m.teams=o,m.newTeam=!1,m.team||(m.team={},m.title="STAFF.NEW_TEAM",m.newTeam=!0),m.addNewTeam=function(){m.errors=[],r.team.save(m.team).$promise.then(function(e){m.teams.unshift(e.toJSON()),i.success({title:"Team properly created",msg:m.team.name?m.team.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.team.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.team.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveTeam=function(){m.errors=[],r.team.update({id:m.team.id},m.team).$promise.then(function(e){var t=_.find(m.teams,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Team properly saved!",msg:m.team.name?m.team.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.team.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.team.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteTeam=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The team will be deleted.").ariaLabel("Delete Team").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.team.delete({id:m.team.id}).$promise.then(function(){_.remove(m.teams,{id:m.team.id}),i.success({title:"Team properly deleted!",msg:(m.team.name||"team")+" has been deleted!"}),u(m.team)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.team.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.team.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","teams","team","api","Auth","license","setting"],angular.module("app.staff").controller("CreateOrEditTeamDialogController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r){var l=this;function d(){return a.team[l.isVoiceRealtime()?"getMembers":"getAgents"]({id:l.team.id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){return l.isVoiceRealtime()?l.selectedItems=e.rows?_.map(e.rows,function(e){return e.id=e.UserId,e.fullname=e.membername,e.penalty=e.hasOwnProperty("penalty")?"penalty "+e.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[]:l.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserTeam?"penalty "+e.UserTeam.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.selectedItems=l.selectedItems,r.hasRole("admin")?a.user.get({fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise:a.user.getAgents({id:r.getCurrentUser().id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise}).then(function(e){l.items=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserTeam?"penalty "+e.UserTeam.penalty:"",e.internal=e.internal?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.items=_.differenceBy(l.items,l.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETUSERS.GETAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}l.team=t,l.penalty=0,l.items=[],l.selectedItems=[],l.closeDialog=function(){e.hide()},l.isVoiceRealtime=function(){return o},l.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"penalty",labelAll:s.instant("STAFF.ALL_AGENTS"),labelSelected:s.instant("STAFF.SELECTED_AGENTS"),transferCallback:function(e,t){a.team[t?"removeAgents":"addAgents"]({id:l.team.id,ids:_.map(e,l.isVoiceRealtime()&&t?"UserId":"id"),penalty:l.penalty||0,realtime:o||!1}).$promise.then(function(){n.success({title:"Team properly "+(t?"removed":"added"),msg:"Team has been "+(t?"removed":"added")+"!"}),t||d()}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:team.ADDAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d()}e.$inject=["$mdDialog","toasty","api","team","teams","realtime","$translate","Auth"],angular.module("app.staff").controller("TeamagentaddController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.teams=r||{count:0,rows:[]},v.table="teams",v.listOrder="",v.listOrderAsc=null,v.selectedTeams=[],v.query={fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditTeamDialogController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/teams/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{team:e,teams:v.teams.rows,license:v.license,setting:null}})},v.agentadddialog=function(e,t){i.show({controller:"TeamagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/teams/edit/agentadd/agentadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{team:e,teams:v.teams?v.teams.rows:[],realtime:!1}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the team?").htmlContent("<b>"+(e.name||"team")+"</b> will be deleted.").ariaLabel("delete team").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getTeams=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.team.get(v.query,f).$promise},v.createOrEditTeam=function(e,t){i.show({controller:"CreateOrEditTeamDialogController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/teams/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{team:t,teams:v.teams.rows,license:v.license,setting:v.setting}})},v.deleteTeam=A,v.exportSelectedTeams=function(){var e=angular.copy(v.selectedTeams);return v.selectedTeams=[],e},v.deleteSelectedTeams=function(e){var t=i.confirm().title("Are you sure want to delete the selected teams?").htmlContent("<b>"+v.selectedTeams.length+" selected</b> will be deleted.").ariaLabel("delete Teams").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedTeams.forEach(function(e){A(e)}),v.selectedTeams=[]})},v.deselectTeams=function(){v.selectedTeams=[]},v.selectAllTeams=function(){v.selectedTeams=v.teams.rows};var h=!0,b=1;function f(e){v.teams=e||{count:0,rows:[]}}function A(e){l.team.delete({id:e.id}).$promise.then(function(){_.remove(v.teams.rows,{id:e.id}),v.teams.count-=1,v.teams.rows.length||v.getTeams(),c.success({title:"Team deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEteam"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEteam",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getTeams())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","teams","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.staff").controller("TeamsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="STAFF.EDIT_TELEPHONE",m.telephone=angular.copy(s),m.telephones=o,m.newTelephone=!1,m.telephone||(m.telephone={role:"telephone",autointernal:!0,context:"from-sip"},m.title="STAFF.NEW_TELEPHONE",m.newTelephone=!0),m.addNewTelephone=function(){m.errors=[],r.user.save(m.telephone).$promise.then(function(e){m.telephones.unshift(e.toJSON()),i.success({title:"Telephone properly created",msg:m.telephone.name?m.telephone.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.user.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.user.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveTelephone=function(){m.errors=[],r.user.update({id:m.telephone.id},m.telephone).$promise.then(function(e){var t=_.find(m.telephones,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Telephone properly saved!",msg:m.telephone.name?m.telephone.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.user.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.user.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteTelephone=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The telephone will be deleted.").ariaLabel("Delete Telephone").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.user.delete({id:m.telephone.id}).$promise.then(function(){_.remove(m.telephones,{id:m.telephone.id}),i.success({title:"Telephone properly deleted!",msg:(m.telephone.name||"telephone")+" has been deleted!"}),u(m.telephone)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.user.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.user.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","telephones","telephone","api","Auth","license","setting"],angular.module("app.staff").controller("CreateOrEditTelephoneDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i){var o=this;function s(){e.hide()}o.errors=[],o.setting=i,o.passwordPattern=o.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",o.telephone=a,o.password="",o.savePassword=function(){o.errors=[],n.user.changePassword({id:o.telephone.id,newPassword:o.password}).$promise.then(function(){t.success({title:"Telephone password properly updated!"}),s()}).catch(function(e){console.error(e),o.errors=e.data.errors||[{message:e.toString(),type:"api.telephone.changePassword"}]})},o.closeDialog=s}e.$inject=["$mdDialog","toasty","api","telephone","setting"],angular.module("app.staff").controller("TelephonechangepasswordController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.telephone=d||e.params.telephone||{},c.selectedTab=e.params.tab||0,c.changepassworddialog=function(e,t){n.show({controller:"TelephonechangepasswordController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/telephones/edit/changepassword/changepassword.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{telephone:e,setting:o,telephones:c.telephones?c.telephones.rows:[]}})},c.alert=r.info,c.gotoTelephones=function(){e.go("app.staff.telephones")},c.saveTelephone=function(){s.user.update({id:c.telephone.id},c.telephone).$promise.then(function(){r.success({title:"Telephone updated!",msg:c.telephone.name?c.telephone.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETuser",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){c.contexts=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","telephone"],angular.module("app.staff").controller("TelephoneController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.telephones=r||{count:0,rows:[]},v.table="telephones",v.listOrder="",v.listOrderAsc=null,v.selectedTelephones=[],v.query={fields:"createdAt,updatedAt,id,role,fullname,name,email,password,description,autointernal,internal,voicemail,transport,nat,allow,callerid,context,callgroup,pickupgroup,encryption,phone,mobile",role:"telephone",sort:"-updatedAt",limit:10,page:1},v.arraytransport=_.keyBy([{option:"udp",value:"'udp'"},{option:"tcp",value:"'tcp'"},{option:"ws",value:"'ws'"},{option:"wss",value:"'wss'"},{option:"tls",value:"'tls'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraynat=_.keyBy([{option:"force_rport",value:"'force_rport'"},{option:"comedia",value:"'comedia'"},{option:"yes",value:"'yes'"},{option:"no",value:"'no'"},{option:"never",value:"'never'"},{option:"route",value:"'route'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayallow=_.keyBy([{option:"ulaw",value:"'ulaw'"},{option:"alaw",value:"'alaw'"},{option:"gsm",value:"'gsm'"},{option:"g722",value:"'g722'"},{option:"g729",value:"'g729'"},{option:"opus",value:"'opus'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayencryption=_.keyBy([{option:"yes",value:"'yes'"},{option:"no",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.staff.telephones.edit",{id:e.id,telephone:e})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the telephone?").htmlContent("<b>"+(e.name||"telephone")+"</b> will be deleted.").ariaLabel("delete telephone").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getTelephones=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.user.get(v.query,f).$promise},v.createOrEditTelephone=function(e,t){i.show({controller:"CreateOrEditTelephoneDialogController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/telephones/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{telephone:t,telephones:v.telephones.rows,license:v.license,setting:v.setting}})},v.deleteTelephone=A,v.exportSelectedTelephones=function(){var e=angular.copy(v.selectedTelephones);return v.selectedTelephones=[],e},v.deleteSelectedTelephones=function(e){var t=i.confirm().title("Are you sure want to delete the selected telephones?").htmlContent("<b>"+v.selectedTelephones.length+" selected</b> will be deleted.").ariaLabel("delete Telephones").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedTelephones.forEach(function(e){A(e)}),v.selectedTelephones=[]})},v.deselectTelephones=function(){v.selectedTelephones=[]},v.selectAllTelephones=function(){v.selectedTelephones=v.telephones.rows};var h=!0,b=1;function f(e){v.telephones=e||{count:0,rows:[]}}function A(e){l.user.delete({id:e.id}).$promise.then(function(){_.remove(v.telephones.rows,{id:e.id}),v.telephones.count-=1,v.telephones.rows.length||v.getTelephones(),c.success({title:"Telephone deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEuser"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEuser",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getTelephones())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","telephones","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.staff").controller("TelephonesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="STAFF.EDIT_USER",m.user=angular.copy(s),m.users=o,m.newUser=!1,m.user||(m.user={role:"user",autointernal:!0,context:"from-sip",crudPermissions:"0"},m.title="STAFF.NEW_USER",m.newUser=!0),m.addNewUser=function(){m.errors=[],r.user.save(m.user).$promise.then(function(e){m.users.unshift(e.toJSON()),i.success({title:"User properly created",msg:m.user.name?m.user.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.user.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.user.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveUser=function(){m.errors=[],r.user.update({id:m.user.id},m.user).$promise.then(function(e){var t=_.find(m.users,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"User properly saved!",msg:m.user.name?m.user.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.user.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.user.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteUser=function(e){if(l.getCurrentUser().id===m.user.id)return i.error({title:"User not deleted!",msg:"You can't remove yourself"});m.errors=[];var t=a.confirm().title("Are you sure?").content("The user will be deleted.").ariaLabel("Delete User").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.user.delete({id:m.user.id}).$promise.then(function(){_.remove(m.users,{id:m.user.id}),i.success({title:"User properly deleted!",msg:(m.user.name||"user")+" has been deleted!"}),u(m.user)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.user.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.user.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","users","user","api","Auth","license","setting"],angular.module("app.staff").controller("CreateOrEditUserDialogController",e)}(),function(){"use strict";function e(e,a){var i=this;i.user={},i.ngFlowOptions={maxChunkRetries:1,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,allowDuplicateUploads:!0},i.ngFlow={flow:{}},i.dropping=!1,i.fileAdded=function(e){var t=["png","jpg"];if(!_.includes(t,e.getExtension()))return a.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported only: "+t.join()}),!1;if(8388608<e.size)return a.error({title:"File too big",msg:"The max allowed size for image files is 8 Mb"}),!1;var n={id:e.uniqueIdentifier,file:e,type:"uploading"};return i.user.images.unshift(n),!0},i.upload=function(){i.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+e.get("motion.token")},i.ngFlow.flow.upload()},i.fileSuccess=function(a,e){angular.forEach(i.user.images,function(t,e){if(t.id===a.uniqueIdentifier){var n=new FileReader;n.readAsDataURL(t.file.file),n.onload=function(e){t.url=e.target.result},t.type="image"}})},i.init=function(e){i.user=angular.copy(e),i.ngFlowOptions.target="api/users/"+i.user.id+"/avatar",i.user.images=[]}}e.$inject=["$cookies","toasty"],angular.module("app.staff").controller("Userchange_avatarController",e)}(),function(){"use strict";function e(e,t,n,a,i){var o=this;function s(){e.hide()}o.errors=[],o.setting=i,o.passwordPattern=o.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",o.user=a,o.password="",o.savePassword=function(){o.errors=[],n.user.changePassword({id:o.user.id,newPassword:o.password}).$promise.then(function(){t.success({title:"User password properly updated!"}),s()}).catch(function(e){console.error(e),o.errors=e.data.errors||[{message:e.toString(),type:"api.user.changePassword"}]})},o.closeDialog=s}e.$inject=["$mdDialog","toasty","api","user","setting"],angular.module("app.staff").controller("UserchangepasswordController",e)}(),function(){"use strict";function e(i,e,t,o){var s=this;s.user={},s.navigation=e.getNavigation(),s.init=function(e){s.user=e},s.onChange=function(t,n){if((n||t).enabled){if(n)n.enabled=!0,s.user.permissions.push(n.id);else for(var e=0;e<t.children.length;e++)t.children[e].enabled=!0,s.user.permissions.push(t.children[e].id);t.enabled=!0,s.user.permissions.push(t.id)}else if(n)n.enabled=!1,_.remove(s.user.permissions,function(e){return n.id===e}),_.filter(t.children,{enabled:!1}).length===t.children.length&&(t.enabled=!1,_.remove(s.user.permissions,function(e){return t.id===e}));else{t.enabled=!1,_.remove(s.user.permissions,function(e){return t.id===e});for(var a=0;a<t.children.length;a++)t.children[a].enabled=!1,_.remove(s.user.permissions,function(e){return t.children[a].id===e})}return i.user.update({id:s.user.id,permissions:_.uniq(s.user.permissions)}).$promise.then(function(){o.success({title:"user updated!",msg:s.user.name?s.user.name+" has been updated!":""})}).catch(function(e){console.error(e)})}}e.$inject=["api","msNavigationService","msNavigationAgentService","toasty"],angular.module("app.staff").controller("UserPermissionsController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r,l){var d=this;function c(){a.user[d.isVoiceRealtime()?"getVoiceQueuesRt":"getQueues"]({id:d.user.id,fields:d.isVoiceRealtime()?"VoiceQueueId,queue_name,penalty":"id,name,strategy,type",channel:i,nolimit:!0}).$promise.then(function(e){return d.isVoiceRealtime()?d.selectedItems=e.rows?_.map(e.rows,function(e){return{id:e.VoiceQueueId,name:e.queue_name,penalty:e.hasOwnProperty("penalty")?"penalty "+e.penalty:"penalty 0",strategy:""}}):[]:d.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserVoiceQueue?"penalty "+e.UserVoiceQueue.penalty:"",e}):[],l.hasRole("admin")?a[d.apiname].get({fields:"id,name,strategy,type",nolimit:!0,type:s}).$promise:a.user.getQueues({id:l.getCurrentUser().id,fields:"id,name,strategy,type",nolimit:!0,type:s,channel:i}).$promise}).then(function(e){d.items=e.rows?e.rows:[],d.selectedItems=_.intersectionBy(d.selectedItems,d.items,"id"),d.dualMultiselectOptions.selectedItems=d.selectedItems,d.dualMultiselectOptions.items=_.differenceBy(d.items,d.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETQUEUES",msg:e.status?JSON.stringify(e.data):e.toString()})})}d.user=t,d.penalty=0,d.apiname=i+"Queue",d.title=r.instant("STAFF.QUEUEADD_USER_"+i.toUpperCase()+"_"+s.toUpperCase()),d.items=[],d.selectedItems=[],d.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"name",line2:"type",line3:"agent"===d.user.role?"penalty":"",labelAll:r.instant("STAFF.ALL_QUEUES_"+i.toUpperCase()+"_"+s.toUpperCase()),labelSelected:r.instant("STAFF.SELECTED_QUEUES_"+i.toUpperCase()+"_"+s.toUpperCase()),transferCallback:function(e,t){a.user[t?"removeQueues":"addQueues"]({id:d.user.id,ids:_.map(e,"id"),channel:i,penalty:d.penalty||0,realtime:o}).$promise.then(function(){c(),n.success({title:"Queue properly "+(t?"removed":"added"),msg:"Queue has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:USER.ADDQUEUES",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d.closeDialog=function(){e.hide()},d.isVoiceRealtime=function(){return o&&"voice"===i},d.isVoiceChannel=function(){return"voice"===i},c()}e.$inject=["$mdDialog","toasty","api","user","channel","realtime","direction","$translate","Auth"],angular.module("app.staff").controller("UserqueueaddController",e)}(),function(){"use strict";function e(e,t,i,o,n,a,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=n,c.setting=a,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.user=d||e.params.user||{},c.selectedTab=e.params.tab||0,c.queueaddchannel=function(e,t,n,a){i.show({controller:"UserqueueaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/users/edit/queueadd/queueadd.html",parent:angular.element(o.body),targetEvent:n,clickOutsideToClose:!0,locals:{user:e,users:c.users?c.users.rows:[],channel:t,realtime:!1,direction:a||"inbound"}})},c.changepassworddialog=function(e,t){i.show({controller:"UserchangepasswordController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/users/edit/changepassword/changepassword.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{user:e,setting:a,users:c.users?c.users.rows:[]}})},c.alert=r.info,c.gotoUsers=function(){e.go("app.staff.users")},c.saveUser=function(){c.user=_.omit(c.user,"userpic"),s.user.update({id:c.user.id},c.user).$promise.then(function(){r.success({title:"User updated!",msg:c.user.name?c.user.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETuser",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){c.contexts=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","user"],angular.module("app.staff").controller("UserController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.users=r||{count:0,rows:[]},v.table="users",v.listOrder="",v.listOrderAsc=null,v.selectedUsers=[],v.query={fields:"createdAt,updatedAt,role,id,fullname,name,email,phone,mobile,userpic,password,description,autointernal,internal,transport,nat,allow,context,callgroup,pickupgroup,permissions,crudPermissions,passwordResetAt,passwordResetAt",role:"admin,user",sort:"-updatedAt",limit:10,page:1},v.arrayrole=_.keyBy([{option:"Admin",value:"'admin'"},{option:"User",value:"'user'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraytransport=_.keyBy([{option:"udp",value:"'udp'"},{option:"tcp",value:"'tcp'"},{option:"ws",value:"'ws'"},{option:"wss",value:"'wss'"},{option:"tls",value:"'tls'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraynat=_.keyBy([{option:"force_rport",value:"'force_rport'"},{option:"comedia",value:"'comedia'"},{option:"yes",value:"'yes'"},{option:"no",value:"'no'"},{option:"never",value:"'never'"},{option:"route",value:"'route'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayallow=_.keyBy([{option:"ulaw",value:"'ulaw'"},{option:"alaw",value:"'alaw'"},{option:"gsm",value:"'gsm'"},{option:"g722",value:"'g722'"},{option:"g729",value:"'g729'"},{option:"opus",value:"'opus'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraycrudPermissions=_.keyBy([{option:"readAndEditAndDelete",value:"0"},{option:"readAndEdit",value:"1"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.staff.users.edit",{id:e.id,user:e})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the user?").htmlContent("<b>"+(e.name||"user")+"</b> will be deleted.").ariaLabel("delete user").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getUsers=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.user.get(v.query,f).$promise},v.createOrEditUser=function(e,t){i.show({controller:"CreateOrEditUserDialogController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/users/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{user:t,users:v.users.rows,license:v.license,setting:v.setting}})},v.deleteUser=A,v.exportSelectedUsers=function(){var e=angular.copy(v.selectedUsers);return v.selectedUsers=[],e},v.deleteSelectedUsers=function(e){var t=i.confirm().title("Are you sure want to delete the selected users?").htmlContent("<b>"+v.selectedUsers.length+" selected</b> will be deleted.").ariaLabel("delete Users").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedUsers.forEach(function(e){A(e)}),v.selectedUsers=[]})},v.deselectUsers=function(){v.selectedUsers=[]},v.selectAllUsers=function(){v.selectedUsers=v.users.rows};var h=!0,b=1;function f(e){v.users=e||{count:0,rows:[]}}function A(e){l.user.delete({id:e.id}).$promise.then(function(){_.remove(v.users.rows,{id:e.id}),v.users.count-=1,v.users.rows.length||v.getUsers(),c.success({title:"User deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEuser"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEuser",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getUsers())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","users","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.staff").controller("UsersController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.cannedAnswers=r||{count:0,rows:[]},v.table="cannedAnswers",v.listOrder="",v.listOrderAsc=null,v.selectedCannedAnswers=[],v.query={fields:"createdAt,updatedAt,id,key,value,description",sort:"-updatedAt",MailAccountId:"null",FaxAccountId:"null",SmsAccountId:"null",OpenchannelAccountId:"null",ChatWebsiteId:"null",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditCannedAnswerDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/cannedAnswers/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{cannedAnswer:e,cannedAnswers:v.cannedAnswers.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the cannedAnswer?").htmlContent("<b>"+(e.name||"cannedAnswer")+"</b> will be deleted.").ariaLabel("delete cannedAnswer").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getCannedAnswers=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.cannedAnswer.get(v.query,f).$promise},v.createOrEditCannedAnswer=function(e,t){i.show({controller:"CreateOrEditCannedAnswerDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/cannedAnswers/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{cannedAnswer:t,cannedAnswers:v.cannedAnswers.rows,license:v.license,setting:v.setting}})},v.deleteCannedAnswer=A,v.exportSelectedCannedAnswers=function(){var e=angular.copy(v.selectedCannedAnswers);return v.selectedCannedAnswers=[],e},v.deleteSelectedCannedAnswers=function(e){var t=i.confirm().title("Are you sure want to delete the selected cannedAnswers?").htmlContent("<b>"+v.selectedCannedAnswers.length+" selected</b> will be deleted.").ariaLabel("delete CannedAnswers").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedCannedAnswers.forEach(function(e){A(e)}),v.selectedCannedAnswers=[]})},v.deselectCannedAnswers=function(){v.selectedCannedAnswers=[]},v.selectAllCannedAnswers=function(){v.selectedCannedAnswers=v.cannedAnswers.rows};var h=!0,b=1;function f(e){v.cannedAnswers=e||{count:0,rows:[]}}function A(e){l.cannedAnswer.delete({id:e.id}).$promise.then(function(){_.remove(v.cannedAnswers.rows,{id:e.id}),v.cannedAnswers.count-=1,v.cannedAnswers.rows.length||v.getCannedAnswers(),c.success({title:"CannedAnswer deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEcannedAnswer"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEcannedAnswer",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getCannedAnswers())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","cannedAnswers","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("CannedAnswersController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_CANNEDANSWER",m.cannedAnswer=angular.copy(s),m.cannedAnswers=o,m.newCannedAnswer=!1,m.cannedAnswer||(m.cannedAnswer={},m.title="TOOLS.NEW_CANNEDANSWER",m.newCannedAnswer=!0),m.addNewCannedAnswer=function(){m.errors=[],r.cannedAnswer.save(m.cannedAnswer).$promise.then(function(e){m.cannedAnswers.unshift(e.toJSON()),i.success({title:"CannedAnswer properly created",msg:m.cannedAnswer.name?m.cannedAnswer.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveCannedAnswer=function(){m.errors=[],r.cannedAnswer.update({id:m.cannedAnswer.id},m.cannedAnswer).$promise.then(function(e){var t=_.find(m.cannedAnswers,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"CannedAnswer properly saved!",msg:m.cannedAnswer.name?m.cannedAnswer.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteCannedAnswer=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The cannedAnswer will be deleted.").ariaLabel("Delete CannedAnswer").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.cannedAnswer.delete({id:m.cannedAnswer.id}).$promise.then(function(){_.remove(m.cannedAnswers,{id:m.cannedAnswer.id}),i.success({title:"CannedAnswer properly deleted!",msg:(m.cannedAnswer.name||"cannedAnswer")+" has been deleted!"}),u(m.cannedAnswer)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","cannedAnswers","cannedAnswer","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditCannedAnswerDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_CUSTOMDASHBOARD",m.customDashboard=angular.copy(s),m.customDashboards=o,m.newCustomDashboard=!1,m.customDashboard||(m.customDashboard={},m.title="TOOLS.NEW_CUSTOMDASHBOARD",m.newCustomDashboard=!0),m.addNewCustomDashboard=function(){m.errors=[],r.dashboard.save(m.customDashboard).$promise.then(function(e){m.customDashboards.unshift(e.toJSON()),i.success({title:"CustomDashboard properly created",msg:m.customDashboard.name?m.customDashboard.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.dashboard.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.dashboard.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveCustomDashboard=function(){m.errors=[],r.dashboard.update({id:m.customDashboard.id},m.customDashboard).$promise.then(function(e){var t=_.find(m.customDashboards,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"CustomDashboard properly saved!",msg:m.customDashboard.name?m.customDashboard.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.dashboard.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.dashboard.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteCustomDashboard=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The customDashboard will be deleted.").ariaLabel("Delete CustomDashboard").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.dashboard.delete({id:m.customDashboard.id}).$promise.then(function(){_.remove(m.customDashboards,{id:m.customDashboard.id}),i.success({title:"CustomDashboard properly deleted!",msg:(m.customDashboard.name||"customDashboard")+" has been deleted!"}),u(m.customDashboard)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.dashboard.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.dashboard.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","customDashboards","customDashboard","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditCustomDashboardDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.customDashboards=r||{count:0,rows:[]},v.table="customDashboards",v.listOrder="",v.listOrderAsc=null,v.selectedCustomDashboards=[],v.query={fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",limit:10,page:1},v.editstate=function(e,t){n.go("app.tools.customDashboards.edit",{id:e.id,customDashboard:e})},v.useradddialog=function(e,t){i.show({controller:"CustomDashboarduseraddController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/customDashboards/edit/useradd/useradd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{customDashboard:e,customDashboards:v.customDashboards?v.customDashboards.rows:[]}})},v.clonedialog=function(e,t){i.show({controller:"CustomDashboardcloneController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/customDashboards/edit/clone/clone.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{customDashboard:e,customDashboards:v.customDashboards?v.customDashboards.rows:[]}})},v.gotodashboardgoto=function(e,t){n.go("app.dashboards.custom",{id:e.id})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the customDashboard?").htmlContent("<b>"+(e.name||"customDashboard")+"</b> will be deleted.").ariaLabel("delete customDashboard").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getCustomDashboards=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.dashboard.get(v.query,f).$promise},v.createOrEditCustomDashboard=function(e,t){i.show({controller:"CreateOrEditCustomDashboardDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/customDashboards/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{customDashboard:t,customDashboards:v.customDashboards.rows,license:v.license,setting:v.setting}})},v.deleteCustomDashboard=A,v.exportSelectedCustomDashboards=function(){var e=angular.copy(v.selectedCustomDashboards);return v.selectedCustomDashboards=[],e},v.deleteSelectedCustomDashboards=function(e){var t=i.confirm().title("Are you sure want to delete the selected customDashboards?").htmlContent("<b>"+v.selectedCustomDashboards.length+" selected</b> will be deleted.").ariaLabel("delete CustomDashboards").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedCustomDashboards.forEach(function(e){A(e)}),v.selectedCustomDashboards=[]})},v.deselectCustomDashboards=function(){v.selectedCustomDashboards=[]},v.selectAllCustomDashboards=function(){v.selectedCustomDashboards=v.customDashboards.rows};var h=!0,b=1;function f(e){v.customDashboards=e||{count:0,rows:[]}}function A(e){l.dashboard.delete({id:e.id}).$promise.then(function(){_.remove(v.customDashboards.rows,{id:e.id}),v.customDashboards.count-=1,v.customDashboards.rows.length||v.getCustomDashboards(),c.success({title:"CustomDashboard deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEdashboard"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEdashboard",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getCustomDashboards())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","customDashboards","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("CustomDashboardsController",e)}(),function(){"use strict";function e(t,n,a,e,i,o,s){var r=this;function l(e){t.hide(e)}r.newCustomDashboard=!0,r.customDashboard=angular.copy(i),r.customDashboards=o,r.title=s.instant("TOOLS.CLONE_CUSTOMDASHBOARD"),i&&i.name&&(r.title+=": "+i.name),r.cloneCustomDashboard=function(){return e.dashboard.clone({id:i.id,includeAll:!0},r.customDashboard).$promise.then(function(e){r.customDashboards.unshift(e.toJSON()),a.success({title:"CustomDashboard properly cloned",msg:r.customDashboard.name?r.customDashboard.name+" has been cloned!":""}),n.go("app.tools.customDashboards.edit",{id:e.id}),l(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){r.errors=e.data.errors||[{message:e.toString(),type:"api.dashboard.clone"}];for(var t=0;t<e.data.errors.length;t+=1)a.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.dashboard.clone",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},r.closeDialog=l}e.$inject=["$mdDialog","$state","toasty","api","customDashboard","customDashboards","$translate"],angular.module("app.tools").controller("CustomDashboardcloneController",e)}(),function(){"use strict";function e(n,a,e,i,o){var s=this;function t(e,t,n){return o.dashboardItem.update(n).$promise.catch(function(e){console.error(e)})}s.customDashboard={},s.voiceQueues=o.rpc.getVoiceQueues({fields:"id,name"}),s.init=function(e){return s.customDashboard=e,s.customDashboard.draggable={enabled:!0,handle:".draggable",stop:t},s.customDashboard.resizable={enabled:!0,handle:".resizable",stop:t},s.customDashboard.widgets=[],o.dashboard.getItems({id:e.id}).$promise.then(function(e){if(e&&e.count&&e.rows)for(var t=0;t<e.rows.length;t+=1)e.rows[t].voiceQueues=s.voiceQueues,e.rows[t].voiceQueuesSelected=_.map(s.voiceQueues.rows,"id"),e.rows[t].templateUrl="app/core/directives/ms-widget-engine/ms-widget-engine-"+e.rows[t].type+"/ms-widget-engine."+e.rows[t].type+".html",s.customDashboard.widgets.push(e.rows[t])}).catch(function(e){console.error(e)})},s.createOrEditWidget=function(e){if(e&&e.attrs)for(var t=0;t<e.attrs.length;t+=1)e[e.attrs[t].name]=e.attrs[t].value;n.show({controller:"CreateOrEditDashboardItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/customDashboards/edit/dashboard/dialog.html",parent:angular.element(a.body),clickOutsideToClose:!0,locals:{dashboarditem:e,dashboard:s.customDashboard.widgets,license:null,setting:null}}).then(function(e){for(var t=0;t<s.customDashboard.widgets.length;t+=1)s.customDashboard.widgets[t].id===e.id&&(s.customDashboard.widgets[t].attrs=e.attrs,s.customDashboard.widgets[t].voiceQueues=s.voiceQueues,s.customDashboard.widgets[t].voiceQueuesSelected=_.map(s.voiceQueues.rows,"id"),s.customDashboard.widgets[t].templateUrl="app/core/directives/ms-widget-engine/ms-widget-engine-"+s.customDashboard.widgets[t].type+"/ms-widget-engine."+s.customDashboard.widgets[t].type+".html")})},s.deleteWidget=function(t){var e=n.confirm().title("Would you like to delete "+t.title+"?").textContent("").ariaLabel("Delete Widget").ok("YES").cancel("NO");n.show(e).then(function(){return o.dashboardItem.delete({id:t.id}).$promise.then(function(e){_.remove(s.customDashboard.widgets,{id:t.id}),i.success({title:"Widget deleted!",msg:t.name?t.name+" has been deleted!":"Widget has been deleted!"})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){s.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETE.customDashboard"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEdashboard",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()});console.error(e)})})}}e.$inject=["$mdDialog","$document","socket","toasty","api"],angular.module("app.tools").controller("CustomDashboardItemsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_DASHBOARDITEM",m.dashboarditem=angular.copy(s),m.dashboard=o,m.newDashboardItem=!1,m.dashboarditem||(m.dashboarditem={type:"counter",attrUrl:"https://",attrHourFormat:"HH:mm:ss",attrTimezone:"0.00",attrMetric:"total",attrSerie1:"total",attrSerie2:"null",attrSerie3:"null",attrRefresh:10,attrFontSize:20,foreground:"#2196f3",background:"#ffffff"},m.title="TOOLS.NEW_DASHBOARDITEM",m.newDashboardItem=!0),m.addNewDashboardItem=function(){m.errors=[],r.dashboard.addItem({id:t.params.id},m.dashboarditem).$promise.then(function(e){m.dashboard.unshift(e.toJSON()),i.success({title:"DashboardItem properly created",msg:m.dashboarditem.name?m.dashboarditem.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.dashboardItem.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.dashboardItem.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveDashboardItem=function(){m.errors=[],r.dashboardItem.update({id:m.dashboarditem.id},m.dashboarditem).$promise.then(function(e){var t=_.find(m.dashboard,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"DashboardItem properly saved!",msg:m.dashboarditem.name?m.dashboarditem.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.dashboardItem.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.dashboardItem.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteDashboardItem=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The dashboarditem will be deleted.").ariaLabel("Delete DashboardItem").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.dashboardItem.delete({id:m.dashboarditem.id}).$promise.then(function(){_.remove(m.dashboard,{id:m.dashboarditem.id}),i.success({title:"DashboardItem properly deleted!",msg:(m.dashboarditem.name||"dashboarditem")+" has been deleted!"}),u(m.dashboarditem)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.dashboardItem.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.dashboardItem.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.analyticCustomReport.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){m.customReports=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcustomReports",msg:e.data?JSON.stringify(e.data):e.toString()})}),r.voiceQueue.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){m.voiceQueues=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueues",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","dashboard","dashboarditem","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditDashboardItemDialogController",e)}(),function(){"use strict";function e(e,i,o,s,t,n,a){var r=this;r.closeDialog=function(){e.hide()},r.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"penalty",labelAll:n.instant("TOOLS.ALL_USERS"),labelSelected:n.instant("TOOLS.SELECTED_USERS"),transferCallback:function(e,t){for(var n=0,a=0;n<e.length;n+=1)a=99999+s.id,e[n].permissions=t?_.without(e[n].permissions,a):_.concat(e[n].permissions,a),o.user.update(e[n]).$promise.then(function(){i.success({title:"User properly "+(t?"removed":"added"),msg:"User has been "+(t?"removed":"added")+"!"})}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:dashboard.ADDUSERS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},function(){if(s&&s.id){var t=99999+s.id;o.user.get({fields:"id,fullname,name,internal,permissions",role:"user",nolimit:!0}).$promise.then(function(e){r.dualMultiselectOptions.selectedItems=_.filter(e.rows,function(e){return _.includes(e.permissions,t)}),r.dualMultiselectOptions.items=_.differenceBy(e.rows,r.dualMultiselectOptions.selectedItems,"id")}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETUSERS.GETAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}}()}e.$inject=["$mdDialog","toasty","api","customDashboard","customDashboards","$translate","Auth"],angular.module("app.tools").controller("CustomDashboarduseraddController",e)}(),function(){"use strict";function e(n,e,a,i,t,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=t,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=e.protocol()+"://"+e.host(),c.customDashboard=d||n.params.customDashboard||{},c.selectedTab=n.params.tab||0,c.useradddialog=function(e,t){a.show({controller:"CustomDashboarduseraddController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/customDashboards/edit/useradd/useradd.html",parent:angular.element(i.body),targetEvent:t,clickOutsideToClose:!0,locals:{customDashboard:e,customDashboards:c.customDashboards?c.customDashboards.rows:[]}})},c.clonedialog=function(e,t){a.show({controller:"CustomDashboardcloneController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/customDashboards/edit/clone/clone.html",parent:angular.element(i.body),targetEvent:t,clickOutsideToClose:!0,locals:{customDashboard:e,customDashboards:c.customDashboards?c.customDashboards.rows:[]}})},c.gotogoto=function(e,t){n.go("app.dashboards.custom",{id:e.id})},c.alert=r.info,c.gotoCustomDashboards=function(){n.go("app.tools.customDashboards")},c.saveCustomDashboard=function(){s.dashboard.update({id:c.customDashboard.id},c.customDashboard).$promise.then(function(){r.success({title:"CustomDashboard updated!",msg:c.customDashboard.name?c.customDashboard.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETdashboard",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","customDashboard"],angular.module("app.tools").controller("CustomDashboardController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_INTERVAL",m.interval=angular.copy(s),m.intervals=o,m.newInterval=!1,m.interval||(m.interval={},m.title="TOOLS.NEW_INTERVAL",m.newInterval=!0),m.addNewInterval=function(){m.errors=[],r.interval.save(m.interval).$promise.then(function(e){m.intervals.unshift(e.toJSON()),i.success({title:"Interval properly created",msg:m.interval.name?m.interval.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.interval.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveInterval=function(){m.errors=[],r.interval.update({id:m.interval.id},m.interval).$promise.then(function(e){var t=_.find(m.intervals,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Interval properly saved!",msg:m.interval.name?m.interval.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.interval.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteInterval=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The interval will be deleted.").ariaLabel("Delete Interval").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.interval.delete({id:m.interval.id}).$promise.then(function(){_.remove(m.intervals,{id:m.interval.id}),i.success({title:"Interval properly deleted!",msg:(m.interval.name||"interval")+" has been deleted!"}),u(m.interval)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.interval.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.interval.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","intervals","interval","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditIntervalDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;if(l.errors=[],l.title="TOOLS.EDIT_INTERVAL",l.interval=angular.copy(i),l.intervals=o,l.newInterval=!1,l.types=["always","custom"],l.daysOfWeek=a.getDaysOfWeek(),l.monthNumber=a.getMonthNumber(),l.monthName=a.getMonthName(),l.daysOfMonth=a.getDaysOfMonth(),l.interval)if("*,*,*,*"!==l.interval.interval){l.type="custom";var d=l.interval.interval.split(","),c=d[0],m=d[1],u=d[2],p=d[3];if("*"!==c){var g,v=c.split("-")[0],h=c.split("-")[1];(g=new Date).setHours(Number(v.split(":")[0])),g.setMinutes(Number(v.split(":")[1])),l.timeRangeFrom=g,(g=new Date).setHours(Number(h.split(":")[0])),g.setMinutes(Number(h.split(":")[1])),l.timeRangeTo=g}"*"!==m&&(l.dayOfWeekFrom=m.split("-")[0],l.dayOfWeekTo=m.split("-")[1]),"*"!==u&&(l.monthDayFrom=u.split("-")[0],l.monthDayTo=u.split("-")[1]),"*"!==p&&(l.monthFrom=p.split("-")[0],l.monthTo=p.split("-")[1])}else l.type="always";else l.interval={interval:"*,*,*,*"},l.type="always",l.title="TOOLS.NEW_INTERVAL",l.newInterval=!0;function b(){switch(l.type){case"always":case"list":return"*,*,*,*";case"custom":var e=[];if("*"!==l.timeRangeFrom&&l.timeRangeFrom&&l.timeRangeTo){var t=(l.timeRangeFrom.getHours()<10?"0":"")+l.timeRangeFrom.getHours()+":"+(l.timeRangeFrom.getMinutes()<10?"0":"")+l.timeRangeFrom.getMinutes(),n=(l.timeRangeTo.getHours()<10?"0":"")+l.timeRangeTo.getHours()+":"+(l.timeRangeTo.getMinutes()<10?"0":"")+l.timeRangeTo.getMinutes();e.push(t+"-"+n)}else e.push("*");return l.dayOfWeekFrom?l.dayOfWeekTo?e.push(l.dayOfWeekFrom+"-"+l.dayOfWeekTo):e.push(l.dayOfWeekFrom):e.push("*"),l.monthDayFrom?l.monthDayTo?e.push(l.monthDayFrom+"-"+l.monthDayTo):e.push(l.monthDayFrom):e.push("*"),l.monthFrom?l.monthTo?e.push(l.monthFrom+"-"+l.monthTo):e.push(l.monthFrom):e.push("*"),e.join()}}function f(e){t.hide(e)}e.params.id&&!l.interval.application&&(l.interval.IntervalId=e.params.id),l.interval.IntervalId&&l.interval.application&&(l.type="list"),l.addNewInterval=function(){l.errors=[],l.interval.interval=b(),r.interval.save(l.interval).$promise.then(function(e){l.intervals.push(e),s.success({title:"Interval properly created",msg:l.interval.name?l.interval.name+" has been created!":""}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}]})},l.saveInterval=function(){l.errors=[],l.interval.interval=b(),l.interval.application?("list"!==l.type&&(l.interval.IntervalId=null),f(l.interval)):r.interval.update({id:l.interval.id},l.interval).$promise.then(function(e){var t=_.find(l.intervals,{id:e.id});t&&_.merge(t,e),s.success({title:"Interval properly saved!",msg:"Interval has been saved!"}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}]})},l.closeDialog=f,l.interval.application&&r.interval.get({fields:"id,name,interval,IntervalId",IntervalId:"null",nolimit:!0}).$promise.then(function(e){l.intervals=e}).catch(function(e){console.error(e)})}e.$inject=["$state","$mdDialog","$mdToast","IndexFactory","interval","intervals","toasty","api"],angular.module("app.voice").controller("EditAppintervalDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.interval={},c.intervalIntervals={count:0,rows:[]},c.selectedIntervalIntervals=[],c.sortableTable={animation:100,onSort:function(e){l.interval.addIntervals({id:c.interval.id},e.models).$promise.then(function(e){c.intervalIntervals.rows=e}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:SORTABLETABLE",msg:e.data?JSON.stringify(e.data):e.toString()})})}},c.query={fields:"createdAt,updatedAt,id,name,interval,createdAt",nolimit:"true",limit:10,page:1},c.init=function(e){c.interval=e,c.query.id=c.interval.id,c.getIntervalIntervals()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the interval?").htmlContent("<b>"+(e.name||"interval")+"</b> will be deleted.").ariaLabel("delete interval").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getIntervalIntervals=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.interval.getIntervals(c.query,p).$promise},c.createOrEditIntervalInterval=function(e,t){o.show({controller:"EditAppintervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/intervals/edit/apps/interval/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:c.interval,interval:t,intervals:c.intervalIntervals.rows,license:null,setting:null}})},c.exportSelectedIntervalIntervals=function(){var e=angular.copy(c.selectedIntervalIntervals);return c.selectedIntervalIntervals=[],e},c.deleteIntervalInterval=g,c.deleteSelectedIntervalIntervals=function(e){var t=o.confirm().title("Are you sure want to delete the selected intervals?").htmlContent("<b>"+c.selectedIntervalIntervals.length+" selected</b> will be deleted.").ariaLabel("delete intervals").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedIntervalIntervals.forEach(function(e){g(e)}),c.selectedIntervalIntervals=[]})};var m=!0,u=1;function p(e){c.intervalIntervals=e||{count:0,rows:[]}}function g(e){l.interval.delete({id:e.id}).$promise.then(function(){_.remove(c.intervalIntervals.rows,{id:e.id}),c.intervalIntervals.count-=1,c.intervalIntervals.rows.length||c.getIntervalIntervals(),r.success({title:"Interval deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETinterval"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getIntervalIntervals())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.tools").controller("IntervalIntervalsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_INTERVAL",m.interval=angular.copy(s),m.intervals=o,m.newInterval=!1,m.interval||(m.interval={},m.title="TOOLS.NEW_INTERVAL",m.newInterval=!0),m.addNewInterval=function(){m.errors=[],r.interval.save(m.interval).$promise.then(function(e){m.intervals.unshift(e.toJSON()),i.success({title:"Interval properly created",msg:m.interval.name?m.interval.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.interval.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveInterval=function(){m.errors=[],r.interval.update({id:m.interval.id},m.interval).$promise.then(function(e){var t=_.find(m.intervals,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Interval properly saved!",msg:m.interval.name?m.interval.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.interval.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteInterval=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The interval will be deleted.").ariaLabel("Delete Interval").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.interval.delete({id:m.interval.id}).$promise.then(function(){_.remove(m.intervals,{id:m.interval.id}),i.success({title:"Interval properly deleted!",msg:(m.interval.name||"interval")+" has been deleted!"}),u(m.interval)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.interval.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.interval.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","intervals","interval","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditIntervalDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.interval=d||e.params.interval||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoIntervals=function(){e.go("app.tools.intervals")},c.saveInterval=function(){s.interval.update({id:c.interval.id},c.interval).$promise.then(function(){r.success({title:"Interval updated!",msg:c.interval.name?c.interval.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","interval"],angular.module("app.tools").controller("IntervalController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.intervals=r||{count:0,rows:[]},v.table="intervals",v.listOrder="",v.listOrderAsc=null,v.selectedIntervals=[],v.query={fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",IntervalId:"null",limit:10,page:1},v.editstate=function(e,t){n.go("app.tools.intervals.edit",{id:e.id,interval:e})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the interval?").htmlContent("<b>"+(e.name||"interval")+"</b> will be deleted.").ariaLabel("delete interval").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getIntervals=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.interval.get(v.query,f).$promise},v.createOrEditInterval=function(e,t){i.show({controller:"CreateOrEditIntervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/intervals/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:t,intervals:v.intervals.rows,license:v.license,setting:v.setting}})},v.deleteInterval=A,v.exportSelectedIntervals=function(){var e=angular.copy(v.selectedIntervals);return v.selectedIntervals=[],e},v.deleteSelectedIntervals=function(e){var t=i.confirm().title("Are you sure want to delete the selected intervals?").htmlContent("<b>"+v.selectedIntervals.length+" selected</b> will be deleted.").ariaLabel("delete Intervals").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedIntervals.forEach(function(e){A(e)}),v.selectedIntervals=[]})},v.deselectIntervals=function(){v.selectedIntervals=[]},v.selectAllIntervals=function(){v.selectedIntervals=v.intervals.rows};var h=!0,b=1;function f(e){v.intervals=e||{count:0,rows:[]}}function A(e){l.interval.delete({id:e.id}).$promise.then(function(){_.remove(v.intervals.rows,{id:e.id}),v.intervals.count-=1,v.intervals.rows.length||v.getIntervals(),c.success({title:"Interval deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEinterval"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEinterval",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getIntervals())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","intervals","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("IntervalsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_PAUSE",m.pause=angular.copy(s),m.pauses=o,m.newPause=!1,m.pause||(m.pause={},m.title="TOOLS.NEW_PAUSE",m.newPause=!0),m.addNewPause=function(){m.errors=[],r.pause.save(m.pause).$promise.then(function(e){m.pauses.unshift(e.toJSON()),i.success({title:"Pause properly created",msg:m.pause.name?m.pause.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.pause.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.pause.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.savePause=function(){m.errors=[],r.pause.update({id:m.pause.id},m.pause).$promise.then(function(e){var t=_.find(m.pauses,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Pause properly saved!",msg:m.pause.name?m.pause.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.pause.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.pause.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deletePause=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The pause will be deleted.").ariaLabel("Delete Pause").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.pause.delete({id:m.pause.id}).$promise.then(function(){_.remove(m.pauses,{id:m.pause.id}),i.success({title:"Pause properly deleted!",msg:(m.pause.name||"pause")+" has been deleted!"}),u(m.pause)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.pause.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.pause.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","pauses","pause","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditPauseDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.pauses=r||{count:0,rows:[]},v.table="pauses",v.listOrder="",v.listOrderAsc=null,v.selectedPauses=[],v.query={fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditPauseDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/pauses/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{pause:e,pauses:v.pauses.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the pause?").htmlContent("<b>"+(e.name||"pause")+"</b> will be deleted.").ariaLabel("delete pause").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getPauses=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.pause.get(v.query,f).$promise},v.createOrEditPause=function(e,t){i.show({controller:"CreateOrEditPauseDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/pauses/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{pause:t,pauses:v.pauses.rows,license:v.license,setting:v.setting}})},v.deletePause=A,v.exportSelectedPauses=function(){var e=angular.copy(v.selectedPauses);return v.selectedPauses=[],e},v.deleteSelectedPauses=function(e){var t=i.confirm().title("Are you sure want to delete the selected pauses?").htmlContent("<b>"+v.selectedPauses.length+" selected</b> will be deleted.").ariaLabel("delete Pauses").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedPauses.forEach(function(e){A(e)}),v.selectedPauses=[]})},v.deselectPauses=function(){v.selectedPauses=[]},v.selectAllPauses=function(){v.selectedPauses=v.pauses.rows};var h=!0,b=1;function f(e){v.pauses=e||{count:0,rows:[]}}function A(e){l.pause.delete({id:e.id}).$promise.then(function(){_.remove(v.pauses.rows,{id:e.id}),v.pauses.count-=1,v.pauses.rows.length||v.getPauses(),c.success({title:"Pause deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEpause"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEpause",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getPauses())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","pauses","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("PausesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_SCHEDULE",m.schedule=angular.copy(s),m.schedules=o,m.newSchedule=!1,m.schedule||(m.schedule={type:"custom",output:"xlsx",active:!0,startAt:new Date,endAt:new Date(Date.now()+2592e6),cron:"0 0 * * *",subtractNumber:1,subtractUnit:"days",sendMail:!1},m.title="TOOLS.NEW_SCHEDULE",m.newSchedule=!0),m.addNewSchedule=function(){m.errors=[],r.schedule.save(m.schedule).$promise.then(function(e){m.schedules.unshift(e.toJSON()),i.success({title:"Schedule properly created",msg:m.schedule.name?m.schedule.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.schedule.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.schedule.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSchedule=function(){m.errors=[],r.schedule.update({id:m.schedule.id},m.schedule).$promise.then(function(e){var t=_.find(m.schedules,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Schedule properly saved!",msg:m.schedule.name?m.schedule.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.schedule.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.schedule.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSchedule=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The schedule will be deleted.").ariaLabel("Delete Schedule").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.schedule.delete({id:m.schedule.id}).$promise.then(function(){_.remove(m.schedules,{id:m.schedule.id}),i.success({title:"Schedule properly deleted!",msg:(m.schedule.name||"schedule")+" has been deleted!"}),u(m.schedule)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.schedule.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.schedule.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.analyticCustomReport.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.customReports=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcustomReports",msg:e.data?JSON.stringify(e.data):e.toString()})}),r.analyticDefaultReport.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.defaultReports=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETdefaultReports",msg:e.data?JSON.stringify(e.data):e.toString()})}),r.mailAccount.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.mailAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","schedules","schedule","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditScheduleDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.schedules=r||{count:0,rows:[]},v.table="schedules",v.listOrder="",v.listOrderAsc=null,v.selectedScheduler=[],v.query={fields:"createdAt,updatedAt,id,name,type,DefaultReportId,CustomReportId,output,active,startAt,endAt,cron,subtractNumber,subtractUnit,sendMail,MailAccountId,email,description",sort:"-updatedAt",limit:10,page:1},v.arraytype=_.keyBy([{option:"Default",value:"'default'"},{option:"Custom",value:"'custom'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayoutput=_.keyBy([{option:"CSV",value:"'csv'"},{option:"PDF",value:"'pdf'"},{option:"Excel",value:"'xlsx'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraysubtractUnit=_.keyBy([{option:"Minutes",value:"'minutes'"},{option:"Hours",value:"'hours'"},{option:"Days",value:"'days'"},{option:"Weeks",value:"'weeks'"},{option:"Months",value:"'months'"},{option:"Quarters",value:"'quarters'"},{option:"Years",value:"'years'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editdialog=function(e,t){i.show({controller:"CreateOrEditScheduleDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/schedules/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{schedule:e,schedules:v.schedules.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the schedule?").htmlContent("<b>"+(e.name||"schedule")+"</b> will be deleted.").ariaLabel("delete schedule").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getScheduler=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.schedule.get(v.query,f).$promise},v.createOrEditSchedule=function(e,t){i.show({controller:"CreateOrEditScheduleDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/schedules/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{schedule:t,schedules:v.schedules.rows,license:v.license,setting:v.setting}})},v.deleteSchedule=A,v.exportSelectedScheduler=function(){var e=angular.copy(v.selectedScheduler);return v.selectedScheduler=[],e},v.deleteSelectedScheduler=function(e){var t=i.confirm().title("Are you sure want to delete the selected schedules?").htmlContent("<b>"+v.selectedScheduler.length+" selected</b> will be deleted.").ariaLabel("delete Schedules").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedScheduler.forEach(function(e){A(e)}),v.selectedScheduler=[]})},v.deselectScheduler=function(){v.selectedScheduler=[]},v.selectAllScheduler=function(){v.selectedScheduler=v.schedules.rows},l.analyticCustomReport.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.customReports=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcustomReports",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.analyticDefaultReport.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.defaultReports=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETdefaultReports",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.mailAccount.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.mailAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.schedules=e||{count:0,rows:[]}}function A(e){l.schedule.delete({id:e.id}).$promise.then(function(){_.remove(v.schedules.rows,{id:e.id}),v.schedules.count-=1,v.schedules.rows.length||v.getScheduler(),c.success({title:"Schedule deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEschedule"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEschedule",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getScheduler())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","schedules","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("SchedulesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_SOUND",m.sound=angular.copy(s),m.sounds=o,m.newSound=!1,m.sound||(m.sound={},m.title="TOOLS.NEW_SOUND",m.newSound=!0),m.addNewSound=function(){m.errors=[],r.sound.save(m.sound).$promise.then(function(e){m.sounds.unshift(e.toJSON()),i.success({title:"Sound properly created",msg:m.sound.name?m.sound.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.sound.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.sound.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSound=function(){m.errors=[],r.sound.update({id:m.sound.id},m.sound).$promise.then(function(e){var t=_.find(m.sounds,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Sound properly saved!",msg:m.sound.name?m.sound.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.sound.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.sound.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSound=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The sound will be deleted.").ariaLabel("Delete Sound").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.sound.delete({id:m.sound.id}).$promise.then(function(){_.remove(m.sounds,{id:m.sound.id}),i.success({title:"Sound properly deleted!",msg:(m.sound.name||"sound")+" has been deleted!"}),u(m.sound)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.sound.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.sound.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","sounds","sound","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditSoundDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.sounds=r||{count:0,rows:[]},v.table="sounds",v.listOrder="",v.listOrderAsc=null,v.selectedSounds=[],v.query={fields:"createdAt,updatedAt,id,save_name,converted_format,name,audio,description",sort:"-updatedAt",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditSoundDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/sounds/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{sound:e,sounds:v.sounds.rows,license:v.license,setting:null}})},v.downloadfile2=function(o,e){return l.sound.download({id:o.id}).$promise.then(function(e){var t=[e.buffer],n="download",a=new Blob(t,{type:e.type});n=o.converted_format?o.save_name+"."+o.converted_format:o.save_name;var i=window.document.createElement("a");i.setAttribute("href",URL.createObjectURL(a)),i.setAttribute("download",n),i.click()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.sound.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the sound?").htmlContent("<b>"+(e.name||"sound")+"</b> will be deleted.").ariaLabel("delete sound").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getSounds=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.sound.get(v.query,f).$promise},v.createOrEditSound=function(e,t){i.show({controller:"CreateOrEditSoundDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/sounds/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{sound:t,sounds:v.sounds.rows,license:v.license,setting:v.setting}})},v.deleteSound=A,v.exportSelectedSounds=function(){var e=angular.copy(v.selectedSounds);return v.selectedSounds=[],e},v.deleteSelectedSounds=function(e){var t=i.confirm().title("Are you sure want to delete the selected sounds?").htmlContent("<b>"+v.selectedSounds.length+" selected</b> will be deleted.").ariaLabel("delete Sounds").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedSounds.forEach(function(e){A(e)}),v.selectedSounds=[]})},v.deselectSounds=function(){v.selectedSounds=[]},v.selectAllSounds=function(){v.selectedSounds=v.sounds.rows},v.uploadSound=function(e){i.show({controller:"UploadSoundDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/sounds/uploadsound/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{sounds:v.sounds.rows}})};var h=!0,b=1;function f(e){v.sounds=e||{count:0,rows:[]}}function A(e){l.sound.delete({id:e.id}).$promise.then(function(){_.remove(v.sounds.rows,{id:e.id}),v.sounds.count-=1,v.sounds.rows.length||v.getSounds(),c.success({title:"Sound deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEsound"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEsound",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getSounds())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","sounds","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("SoundsController",e)}(),function(){"use strict";function e(e,t,a,n,i){var o=this;o.errors=[],o.title="TOOLS.UPLOAD_SOUND",o.sounds=n,o.uploadSounds=[],o.sound={},o.ngFlowOptions={maxChunkRetries:1,chunkSize:15728640,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,target:"api/sounds",allowDuplicateUploads:!0},o.ngFlow={flow:{}},o.dropping=!1,o.fileAdded=function(e){var t=["wav","mp3","gsm"];if(!_.includes(t,e.getExtension()))return a.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported only: "+t.join()}),!1;if(15728640<e.size)return a.error({title:"File too big",msg:"The max allowed size for audio files is 15 Mb"}),!1;var n={id:e.uniqueIdentifier,file:e,type:"uploading"};return o.uploadSounds.unshift(n),!0},o.upload=function(){o.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+e.get("motion.token")},o.ngFlow.flow.upload()},o.fileSuccess=function(a,e){o.sounds.unshift(JSON.parse(e)),angular.forEach(o.uploadSounds,function(t,e){if(t.id===a.uniqueIdentifier){var n=new FileReader;n.readAsDataURL(t.file.file),n.onload=function(e){t.url=e.target.result},t.type="sound"}})},o.closeDialog=function(){t.hide()}}e.$inject=["$cookies","$mdDialog","toasty","sounds","api"],angular.module("app.tools").controller("UploadSoundDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_TAG",m.tag=angular.copy(s),m.tags=o,m.newTag=!1,m.tag||(m.tag={},m.title="TOOLS.NEW_TAG",m.newTag=!0),m.addNewTag=function(){m.errors=[],r.tag.save(m.tag).$promise.then(function(e){m.tags.unshift(e.toJSON()),i.success({title:"Tag properly created",msg:m.tag.name?m.tag.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.tag.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.tag.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveTag=function(){m.errors=[],r.tag.update({id:m.tag.id},m.tag).$promise.then(function(e){var t=_.find(m.tags,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Tag properly saved!",msg:m.tag.name?m.tag.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.tag.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.tag.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteTag=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The tag will be deleted.").ariaLabel("Delete Tag").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.tag.delete({id:m.tag.id}).$promise.then(function(){_.remove(m.tags,{id:m.tag.id}),i.success({title:"Tag properly deleted!",msg:(m.tag.name||"tag")+" has been deleted!"}),u(m.tag)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.tag.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.tag.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","tags","tag","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditTagDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.tags=r||{count:0,rows:[]},v.table="tags",v.listOrder="",v.listOrderAsc=null,v.selectedTags=[],v.query={fields:"createdAt,updatedAt,id,name,description,color",sort:"-updatedAt",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditTagDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/tags/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{tag:e,tags:v.tags.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the tag?").htmlContent("<b>"+(e.name||"tag")+"</b> will be deleted.").ariaLabel("delete tag").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getTags=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.tag.get(v.query,f).$promise},v.createOrEditTag=function(e,t){i.show({controller:"CreateOrEditTagDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/tags/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{tag:t,tags:v.tags.rows,license:v.license,setting:v.setting}})},v.deleteTag=A,v.exportSelectedTags=function(){var e=angular.copy(v.selectedTags);return v.selectedTags=[],e},v.deleteSelectedTags=function(e){var t=i.confirm().title("Are you sure want to delete the selected tags?").htmlContent("<b>"+v.selectedTags.length+" selected</b> will be deleted.").ariaLabel("delete Tags").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedTags.forEach(function(e){A(e)}),v.selectedTags=[]})},v.deselectTags=function(){v.selectedTags=[]},v.selectAllTags=function(){v.selectedTags=v.tags.rows};var h=!0,b=1;function f(e){v.tags=e||{count:0,rows:[]}}function A(e){l.tag.delete({id:e.id}).$promise.then(function(){_.remove(v.tags.rows,{id:e.id}),v.tags.count-=1,v.tags.rows.length||v.getTags(),c.success({title:"Tag deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEtag"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEtag",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getTags())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","tags","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("TagsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_TEMPLATE",m.template=angular.copy(s),m.templates=o,m.newTemplate=!1,m.template||(m.template={},m.title="TOOLS.NEW_TEMPLATE",m.newTemplate=!0),m.addNewTemplate=function(){m.errors=[],r.template.save(m.template).$promise.then(function(e){m.templates.unshift(e.toJSON()),i.success({title:"Template properly created",msg:m.template.name?m.template.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.template.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.template.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveTemplate=function(){m.errors=[],r.template.update({id:m.template.id},m.template).$promise.then(function(e){var t=_.find(m.templates,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Template properly saved!",msg:m.template.name?m.template.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.template.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.template.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteTemplate=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The template will be deleted.").ariaLabel("Delete Template").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.template.delete({id:m.template.id}).$promise.then(function(){_.remove(m.templates,{id:m.template.id}),i.success({title:"Template properly deleted!",msg:(m.template.name||"template")+" has been deleted!"}),u(m.template)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.template.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.template.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","templates","template","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditTemplateDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.templates=r||{count:0,rows:[]},v.table="templates",v.listOrder="",v.listOrderAsc=null,v.selectedTemplates=[],v.query={fields:"createdAt,updatedAt,id,name,html,description",sort:"-updatedAt",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditTemplateDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/templates/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{template:e,templates:v.templates.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the template?").htmlContent("<b>"+(e.name||"template")+"</b> will be deleted.").ariaLabel("delete template").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getTemplates=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.template.get(v.query,f).$promise},v.createOrEditTemplate=function(e,t){i.show({controller:"CreateOrEditTemplateDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/templates/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{template:t,templates:v.templates.rows,license:v.license,setting:v.setting}})},v.deleteTemplate=A,v.exportSelectedTemplates=function(){var e=angular.copy(v.selectedTemplates);return v.selectedTemplates=[],e},v.deleteSelectedTemplates=function(e){var t=i.confirm().title("Are you sure want to delete the selected templates?").htmlContent("<b>"+v.selectedTemplates.length+" selected</b> will be deleted.").ariaLabel("delete Templates").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedTemplates.forEach(function(e){A(e)}),v.selectedTemplates=[]})},v.deselectTemplates=function(){v.selectedTemplates=[]},v.selectAllTemplates=function(){v.selectedTemplates=v.templates.rows};var h=!0,b=1;function f(e){v.templates=e||{count:0,rows:[]}}function A(e){l.template.delete({id:e.id}).$promise.then(function(){_.remove(v.templates.rows,{id:e.id}),v.templates.count-=1,v.templates.rows.length||v.getTemplates(),c.success({title:"Template deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEtemplate"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEtemplate",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getTemplates())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","templates","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("TemplatesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_TRIGGER",m.trigger=angular.copy(s),m.triggers=o,m.newTrigger=!1,m.trigger||(m.trigger={channel:"voice"},m.title="TOOLS.NEW_TRIGGER",m.newTrigger=!0),m.addNewTrigger=function(){m.errors=[],r.trigger.save(m.trigger).$promise.then(function(e){m.triggers.unshift(e.toJSON()),i.success({title:"Trigger properly created",msg:m.trigger.name?m.trigger.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.trigger.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.trigger.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveTrigger=function(){m.errors=[],r.trigger.update({id:m.trigger.id},m.trigger).$promise.then(function(e){var t=_.find(m.triggers,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Trigger properly saved!",msg:m.trigger.name?m.trigger.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.trigger.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.trigger.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteTrigger=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The trigger will be deleted.").ariaLabel("Delete Trigger").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.trigger.delete({id:m.trigger.id}).$promise.then(function(){_.remove(m.triggers,{id:m.trigger.id}),i.success({title:"Trigger properly deleted!",msg:(m.trigger.name||"trigger")+" has been deleted!"}),u(m.trigger)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.trigger.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.trigger.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","triggers","trigger","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditTriggerDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.trigger={},c.triggerActions={count:0,rows:[]},c.selectedTriggerActions=[],c.query={fields:"createdAt,updatedAt,id,action,data1,data1,data1,data2,data1,data2,data2,data1,data2,data2,data2,data2,data2,data2,data3,data3,data3,data3,data3,data3,data1,data2,data2,data3,data2,data2,data2,data3,data4,data5,data6,createdAt",limit:10,page:1},c.arrayaction=_.keyBy([{option:"CONTACT_MANAGER",value:"'contactManager'",ngIf:"vm.trigger.channel == 'voice'"},{option:"INTEGRATIONS",value:"'integration'",ngIf:"vm.trigger.channel == 'voice'"},{option:"MOTION_BAR",value:"'motionbar'"},{option:"JSCRIPTY",value:"'jscripty'",ngIf:"vm.trigger.channel == 'voice'"},{option:"URL_FORWARD",value:"'urlForward'"},{option:"BROWSER",value:"'browser'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.browserValues=_.keyBy([{option:"Popup",value:"'0'"},{option:"CTI URL",value:"'1'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.autoCreateContact=_.keyBy([{option:"yes",value:"'1'"},{option:"no",value:"'0'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.urlForwardValues=_.keyBy([{option:"GET",value:"'GET'"},{option:"POST",value:"'POST'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.integrationValues=_.keyBy([{option:"Zendesk",value:"'zendesk'"},{option:"Salesforce",value:"'salesforce'"},{option:"SugarCRM",value:"'sugarcrm'"},{option:"Freshdesk",value:"'freshdesk'"},{option:"Desk",value:"'desk'"},{option:"Zoho",value:"'zoho'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.motionbarValues=_.keyBy([{option:"Popup",value:"'0'"},{option:"CTI URL",value:"'1'"},{option:"Windows App",value:"'2'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.eventVariables=_.keyBy([{option:"yes",value:"'1'"},{option:"no",value:"'0'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.location=_.keyBy([{option:"NEW_TAB",value:"'0'"},{option:"NEW_WINDOW",value:"'1'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.init=function(e){c.trigger=e,c.query.id=c.trigger.id,c.query.ActionId=c.trigger.id,c.getTriggerActions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the action?").htmlContent("<b>"+(e.name||"action")+"</b> will be deleted.").ariaLabel("delete action").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getTriggerActions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.trigger.getActions(c.query,p).$promise},c.createOrEditTriggerAction=function(e,t){o.show({controller:"CreateOrEditActionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/triggers/edit/actions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{trigger:c.trigger,action:t,actions:c.triggerActions.rows,license:null,setting:null}})},c.exportSelectedTriggerActions=function(){var e=angular.copy(c.selectedTriggerActions);return c.selectedTriggerActions=[],e},c.deleteTriggerAction=g,c.deleteSelectedTriggerActions=function(e){var t=o.confirm().title("Are you sure want to delete the selected actions?").htmlContent("<b>"+c.selectedTriggerActions.length+" selected</b> will be deleted.").ariaLabel("delete actions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedTriggerActions.forEach(function(e){g(e)}),c.selectedTriggerActions=[]})},l.cmList.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){c.lists=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.jscriptyProject.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){c.projects=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETprojects",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intZendeskAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.zendeskAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETzendeskAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intDeskAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.deskAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETdeskAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intZohoAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.zohoAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETzohoAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intSalesforceAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.salesforceAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsalesforceAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intSugarcrmAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.sugarcrmAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsugarcrmAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intFreshdeskAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.freshdeskAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfreshdeskAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intZendeskConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){c.zendeskConfigurations=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETzendeskConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intDeskConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){c.deskConfigurations=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETdeskConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intZohoConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){c.zohoConfigurations=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETzohoConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intSalesforceConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){c.salesforceConfigurations=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsalesforceConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intSugarcrmConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){c.sugarcrmConfigurations=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsugarcrmConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intFreshdeskConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){c.freshdeskConfigurations=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfreshdeskConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.template.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.templates=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtemplates",msg:e.data?JSON.stringify(e.data):e.toString()})});var m=!0,u=1;function p(e){c.triggerActions=e||{count:0,rows:[]}}function g(e){l.action.delete({id:e.id}).$promise.then(function(){_.remove(c.triggerActions.rows,{id:e.id}),c.triggerActions.count-=1,c.triggerActions.rows.length||c.getTriggerActions(),r.success({title:"Action deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETtrigger"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrigger",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getTriggerActions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.tools").controller("TriggerActionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m){var u=this;function p(e){a.hide(e)}u.errors=[],u.setting=m,u.license=c,u.passwordPattern=u.setting&&u.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",u.title="TOOLS.EDIT_ACTION",u.action=angular.copy(s),u.actions=o,u.newAction=!1,u.trigger=angular.copy(r),u.action||(u.action={data3:"0",data4:"0",data5:"800",data6:"600"},u.title="TOOLS.NEW_ACTION",u.newAction=!0),t.params.id&&(u.action.ActionId=t.params.id),u.addNewAction=function(){u.errors=[],l.trigger.addAction({id:t.params.id},u.action).$promise.then(function(e){u.actions.unshift(e.toJSON()),i.success({title:"Action properly created",msg:u.action.name?u.action.name+" has been created!":""}),p(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.action.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.action.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},u.saveAction=function(){u.errors=[],l.action.update({id:u.action.id},u.action).$promise.then(function(e){var t=_.find(u.actions,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Action properly saved!",msg:u.action.name?u.action.name+" has been saved!":""}),p(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.action.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.action.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},u.deleteAction=function(e){u.errors=[];var t=a.confirm().title("Are you sure?").content("The action will be deleted.").ariaLabel("Delete Action").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){l.action.delete({id:u.action.id}).$promise.then(function(){_.remove(u.actions,{id:u.action.id}),i.success({title:"Action properly deleted!",msg:(u.action.name||"action")+" has been deleted!"}),p(u.action)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.action.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.action.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},u.getDateFromString=function(e){return new Date(e)},u.closeDialog=p,l.cmList.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){u.lists=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.jscriptyProject.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){u.projects=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETprojects",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intZendeskAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.zendeskAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETzendeskAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intDeskAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.deskAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETdeskAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intZohoAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.zohoAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETzohoAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intSalesforceAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.salesforceAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsalesforceAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intSugarcrmAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.sugarcrmAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsugarcrmAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intFreshdeskAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.freshdeskAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfreshdeskAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intZendeskConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){u.zendeskConfigurations=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETzendeskConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intDeskConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){u.deskConfigurations=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETdeskConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intZohoConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){u.zohoConfigurations=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETzohoConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intSalesforceConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){u.salesforceConfigurations=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsalesforceConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intSugarcrmConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){u.sugarcrmConfigurations=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsugarcrmConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intFreshdeskConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){u.freshdeskConfigurations=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfreshdeskConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.template.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.templates=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtemplates",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","actions","action","trigger","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditActionDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.trigger={},c.triggerAllConditions={count:0,rows:[]},c.selectedTriggerAllConditions=[],c.query={fields:"createdAt,updatedAt,id,field,operator,value,value,value,value,value,value,value,value,value,value,value,createdAt",limit:10,page:1},c.arrayfield=_.keyBy([{option:"Queue",value:"'queue'",ngIf:"vm.trigger.channel == 'voice'"},{option:"Call_Status",value:"'lastevent'",ngIf:"vm.trigger.channel == 'voice'"},{option:"OutboundRoute",value:"'routeId'",ngIf:"vm.trigger.channel == 'voice'"},{option:"Account",value:"'account'",ngIf:"vm.trigger.channel != 'voice'"},{option:"Interaction",value:"'interaction'",ngIf:"vm.trigger.channel != 'voice'"},{option:"Message",value:"'message'",ngIf:"vm.trigger.channel != 'voice'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.arrayoperator=_.keyBy([{option:"Equals",value:"'equals'"},{option:"Not_Equals",value:"'not_equals'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.callStatusValues=_.keyBy([{option:"Abandon",value:"'abandoned'"},{option:"Hangup",value:"'complete'"},{option:"Reject",value:"'rejected'"},{option:"Ring",value:"'called'"},{option:"Answer",value:"'connect'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.interactionStatusValues=_.keyBy([{option:"Opened",value:"'opened'"},{option:"Closed",value:"'closed'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.messageStatusValues=_.keyBy([{option:"Incoming",value:"'in'"},{option:"Outgoing",value:"'out'"},{option:"Accepted",value:"'accept'"},{option:"Rejected",value:"'reject'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.init=function(e){c.trigger=e,c.query.id=c.trigger.id,c.query.TriggerAllId=c.trigger.id,c.getTriggerAllConditions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the allCondition?").htmlContent("<b>"+(e.name||"allCondition")+"</b> will be deleted.").ariaLabel("delete allCondition").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getTriggerAllConditions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.trigger.getAllConditions(c.query,p).$promise},c.createOrEditTriggerAllCondition=function(e,t){o.show({controller:"CreateOrEditAllConditionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/triggers/edit/allconditions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{trigger:c.trigger,allCondition:t,allconditions:c.triggerAllConditions.rows,license:null,setting:null}})},c.exportSelectedTriggerAllConditions=function(){var e=angular.copy(c.selectedTriggerAllConditions);return c.selectedTriggerAllConditions=[],e},c.deleteTriggerAllCondition=g,c.deleteSelectedTriggerAllConditions=function(e){var t=o.confirm().title("Are you sure want to delete the selected allconditions?").htmlContent("<b>"+c.selectedTriggerAllConditions.length+" selected</b> will be deleted.").ariaLabel("delete allconditions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedTriggerAllConditions.forEach(function(e){g(e)}),c.selectedTriggerAllConditions=[]})},l.chatWebsite.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.chatAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.mailAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.mailAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.smsAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.smsAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsmsAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.faxAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.faxAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfaxAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.openchannelAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.openchannelAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETopenchannelAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.voiceQueue.get({fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){c.queues=_.keyBy(e.rows||[],"name")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.voiceExtension.get({fields:"id,exten",type:"outbound",VoiceExtensionId:"null",nolimit:"true"}).$promise.then(function(e){c.outboundRoutes=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GEToutboundRoutes",msg:e.data?JSON.stringify(e.data):e.toString()})});var m=!0,u=1;function p(e){c.triggerAllConditions=e||{count:0,rows:[]}}function g(e){l.condition.delete({id:e.id}).$promise.then(function(){_.remove(c.triggerAllConditions.rows,{id:e.id}),c.triggerAllConditions.count-=1,c.triggerAllConditions.rows.length||c.getTriggerAllConditions(),r.success({title:"AllCondition deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETtrigger"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrigger",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getTriggerAllConditions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.tools").controller("TriggerAllConditionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m){var u=this;function p(e){a.hide(e)}u.errors=[],u.setting=m,u.license=c,u.passwordPattern=u.setting&&u.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",u.title="TOOLS.EDIT_ALLCONDITION",u.allCondition=angular.copy(s),u.allconditions=o,u.newAllCondition=!1,u.trigger=angular.copy(r),u.allCondition||(u.allCondition={field:"queue",operator:"equals",value:"abandoned",value:"opened",value:"in"},u.title="TOOLS.NEW_ALLCONDITION",u.newAllCondition=!0),t.params.id&&(u.allCondition.TriggerAllId=t.params.id),u.addNewAllCondition=function(){u.errors=[],l.trigger.addAllCondition({id:t.params.id},u.allCondition).$promise.then(function(e){u.allconditions.unshift(e.toJSON()),i.success({title:"AllCondition properly created",msg:u.allCondition.name?u.allCondition.name+" has been created!":""}),p(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.condition.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.condition.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},u.saveAllCondition=function(){u.errors=[],l.condition.update({id:u.allCondition.id},u.allCondition).$promise.then(function(e){var t=_.find(u.allconditions,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"AllCondition properly saved!",msg:u.allCondition.name?u.allCondition.name+" has been saved!":""}),p(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.condition.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.condition.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},u.deleteAllCondition=function(e){u.errors=[];var t=a.confirm().title("Are you sure?").content("The allCondition will be deleted.").ariaLabel("Delete AllCondition").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){l.condition.delete({id:u.allCondition.id}).$promise.then(function(){_.remove(u.allconditions,{id:u.allCondition.id}),i.success({title:"AllCondition properly deleted!",msg:(u.allCondition.name||"allCondition")+" has been deleted!"}),p(u.allCondition)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.condition.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.condition.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},u.getDateFromString=function(e){return new Date(e)},u.closeDialog=p,l.chatWebsite.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.chatAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.mailAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.mailAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.smsAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.smsAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsmsAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.faxAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.faxAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfaxAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.openchannelAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.openchannelAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETopenchannelAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.voiceQueue.get({fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){u.queues=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.voiceExtension.get({fields:"id,exten",type:"outbound",VoiceExtensionId:"null",nolimit:"true"}).$promise.then(function(e){u.outboundRoutes=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GEToutboundRoutes",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","allconditions","allCondition","trigger","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditAllConditionDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.trigger={},c.triggerAnyConditions={count:0,rows:[]},c.selectedTriggerAnyConditions=[],c.query={fields:"createdAt,updatedAt,id,field,operator,value,value,value,value,value,value,value,value,value,value,value,createdAt",limit:10,page:1},c.arrayfield=_.keyBy([{option:"Queue",value:"'queue'",ngIf:"vm.trigger.channel == 'voice'"},{option:"Call_Status",value:"'lastevent'",ngIf:"vm.trigger.channel == 'voice'"},{option:"OutboundRoute",value:"'routeId'",ngIf:"vm.trigger.channel == 'voice'"},{option:"Account",value:"'account'",ngIf:"vm.trigger.channel != 'voice'"},{option:"Interaction",value:"'interaction'",ngIf:"vm.trigger.channel != 'voice'"},{option:"Message",value:"'message'",ngIf:"vm.trigger.channel != 'voice'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.arrayoperator=_.keyBy([{option:"Equals",value:"'equals'"},{option:"Not_Equals",value:"'not_equals'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.callStatusValues=_.keyBy([{option:"Abandon",value:"'abandoned'"},{option:"Hangup",value:"'complete'"},{option:"Reject",value:"'rejected'"},{option:"Ring",value:"'called'"},{option:"Answer",value:"'connect'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.interactionStatusValues=_.keyBy([{option:"Opened",value:"'opened'"},{option:"Closed",value:"'closed'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.messageStatusValues=_.keyBy([{option:"Incoming",value:"'in'"},{option:"Outgoing",value:"'out'"},{option:"Accepted",value:"'accept'"},{option:"Rejected",value:"'reject'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.init=function(e){c.trigger=e,c.query.id=c.trigger.id,c.query.TriggerAnyId=c.trigger.id,c.getTriggerAnyConditions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the anyCondition?").htmlContent("<b>"+(e.name||"anyCondition")+"</b> will be deleted.").ariaLabel("delete anyCondition").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getTriggerAnyConditions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.trigger.getAnyConditions(c.query,p).$promise},c.createOrEditTriggerAnyCondition=function(e,t){o.show({controller:"CreateOrEditAnyConditionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/triggers/edit/anyconditions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{trigger:c.trigger,anyCondition:t,anyconditions:c.triggerAnyConditions.rows,license:null,setting:null}})},c.exportSelectedTriggerAnyConditions=function(){var e=angular.copy(c.selectedTriggerAnyConditions);return c.selectedTriggerAnyConditions=[],e},c.deleteTriggerAnyCondition=g,c.deleteSelectedTriggerAnyConditions=function(e){var t=o.confirm().title("Are you sure want to delete the selected anyconditions?").htmlContent("<b>"+c.selectedTriggerAnyConditions.length+" selected</b> will be deleted.").ariaLabel("delete anyconditions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedTriggerAnyConditions.forEach(function(e){g(e)}),c.selectedTriggerAnyConditions=[]})},l.chatWebsite.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.chatAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.mailAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.mailAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.smsAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.smsAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsmsAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.faxAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.faxAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfaxAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.openchannelAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.openchannelAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETopenchannelAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.voiceQueue.get({fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){c.queues=_.keyBy(e.rows||[],"name")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.voiceExtension.get({fields:"id,exten",type:"outbound",VoiceExtensionId:"null",nolimit:"true"}).$promise.then(function(e){c.outboundRoutes=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GEToutboundRoutes",msg:e.data?JSON.stringify(e.data):e.toString()})});var m=!0,u=1;function p(e){c.triggerAnyConditions=e||{count:0,rows:[]}}function g(e){l.condition.delete({id:e.id}).$promise.then(function(){_.remove(c.triggerAnyConditions.rows,{id:e.id}),c.triggerAnyConditions.count-=1,c.triggerAnyConditions.rows.length||c.getTriggerAnyConditions(),r.success({title:"AnyCondition deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETtrigger"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrigger",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getTriggerAnyConditions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.tools").controller("TriggerAnyConditionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m){var u=this;function p(e){a.hide(e)}u.errors=[],u.setting=m,u.license=c,u.passwordPattern=u.setting&&u.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",u.title="TOOLS.EDIT_ANYCONDITION",u.anyCondition=angular.copy(s),u.anyconditions=o,u.newAnyCondition=!1,u.trigger=angular.copy(r),u.anyCondition||(u.anyCondition={field:"queue",operator:"equals",value:"abandoned",value:"opened",value:"in"},u.title="TOOLS.NEW_ANYCONDITION",u.newAnyCondition=!0),t.params.id&&(u.anyCondition.TriggerAnyId=t.params.id),u.addNewAnyCondition=function(){u.errors=[],l.trigger.addAnyCondition({id:t.params.id},u.anyCondition).$promise.then(function(e){u.anyconditions.unshift(e.toJSON()),i.success({title:"AnyCondition properly created",msg:u.anyCondition.name?u.anyCondition.name+" has been created!":""}),p(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.condition.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.condition.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},u.saveAnyCondition=function(){u.errors=[],l.condition.update({id:u.anyCondition.id},u.anyCondition).$promise.then(function(e){var t=_.find(u.anyconditions,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"AnyCondition properly saved!",msg:u.anyCondition.name?u.anyCondition.name+" has been saved!":""}),p(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.condition.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.condition.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},u.deleteAnyCondition=function(e){u.errors=[];var t=a.confirm().title("Are you sure?").content("The anyCondition will be deleted.").ariaLabel("Delete AnyCondition").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){l.condition.delete({id:u.anyCondition.id}).$promise.then(function(){_.remove(u.anyconditions,{id:u.anyCondition.id}),i.success({title:"AnyCondition properly deleted!",msg:(u.anyCondition.name||"anyCondition")+" has been deleted!"}),p(u.anyCondition)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.condition.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.condition.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},u.getDateFromString=function(e){return new Date(e)},u.closeDialog=p,l.chatWebsite.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.chatAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.mailAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.mailAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.smsAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.smsAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsmsAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.faxAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.faxAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfaxAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.openchannelAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.openchannelAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETopenchannelAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.voiceQueue.get({fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){u.queues=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.voiceExtension.get({fields:"id,exten",type:"outbound",VoiceExtensionId:"null",nolimit:"true"}).$promise.then(function(e){u.outboundRoutes=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GEToutboundRoutes",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","anyconditions","anyCondition","trigger","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditAnyConditionDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.trigger=d||e.params.trigger||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoTriggers=function(){e.go("app.tools.triggers")},c.saveTrigger=function(){s.trigger.update({id:c.trigger.id},c.trigger).$promise.then(function(){r.success({title:"Trigger updated!",msg:c.trigger.name?c.trigger.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrigger",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","trigger"],angular.module("app.tools").controller("TriggerController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.triggers=r||{count:0,rows:[]},v.table="triggers",v.listOrder="",v.listOrderAsc=null,v.selectedTriggers=[],v.query={fields:"createdAt,updatedAt,id,name,channel,status,description",sort:"-updatedAt",limit:10,page:1},v.arraychannel=_.keyBy([{option:"Voice",value:"'voice'"},{option:"Openchannel",value:"'openchannel'",ngIf:"vm.license.openchannel"},{option:"Chat",value:"'chat'",ngIf:"vm.license.chat"},{option:"Mail",value:"'mail'",ngIf:"vm.license.mail"},{option:"Sms",value:"'sms'",ngIf:"vm.license.messaging"},{option:"Fax",value:"'fax'",ngIf:"vm.license.fax"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.tools.triggers.edit",{id:e.id,trigger:e})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the trigger?").htmlContent("<b>"+(e.name||"trigger")+"</b> will be deleted.").ariaLabel("delete trigger").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getTriggers=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.trigger.get(v.query,f).$promise},v.createOrEditTrigger=function(e,t){i.show({controller:"CreateOrEditTriggerDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/triggers/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{trigger:t,triggers:v.triggers.rows,license:v.license,setting:v.setting}})},v.deleteTrigger=A,v.exportSelectedTriggers=function(){var e=angular.copy(v.selectedTriggers);return v.selectedTriggers=[],e},v.deleteSelectedTriggers=function(e){var t=i.confirm().title("Are you sure want to delete the selected triggers?").htmlContent("<b>"+v.selectedTriggers.length+" selected</b> will be deleted.").ariaLabel("delete Triggers").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedTriggers.forEach(function(e){A(e)}),v.selectedTriggers=[]})},v.deselectTriggers=function(){v.selectedTriggers=[]},v.selectAllTriggers=function(){v.selectedTriggers=v.triggers.rows};var h=!0,b=1;function f(e){v.triggers=e||{count:0,rows:[]}}function A(e){l.trigger.delete({id:e.id}).$promise.then(function(){_.remove(v.triggers.rows,{id:e.id}),v.triggers.count-=1,v.triggers.rows.length||v.getTriggers(),c.success({title:"Trigger deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEtrigger"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEtrigger",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getTriggers())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","triggers","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("TriggersController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_TRUNK",m.trunk=angular.copy(s),m.trunks=o,m.newTrunk=!1,m.trunk||(m.trunk={active:!0,type:"friend",dtmfmode:"rfc2833",qualify:"yes",t38pt_udptl:"no"},m.title="TOOLS.NEW_TRUNK",m.newTrunk=!0),m.addNewTrunk=function(){m.errors=[],r.trunk.save(m.trunk).$promise.then(function(e){m.trunks.unshift(e.toJSON()),i.success({title:"Trunk properly created",msg:m.trunk.name?m.trunk.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.trunk.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.trunk.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveTrunk=function(){m.errors=[],r.trunk.update({id:m.trunk.id},m.trunk).$promise.then(function(e){var t=_.find(m.trunks,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Trunk properly saved!",msg:m.trunk.name?m.trunk.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.trunk.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.trunk.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteTrunk=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The trunk will be deleted.").ariaLabel("Delete Trunk").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.trunk.delete({id:m.trunk.id}).$promise.then(function(){_.remove(m.trunks,{id:m.trunk.id}),i.success({title:"Trunk properly deleted!",msg:(m.trunk.name||"trunk")+" has been deleted!"}),u(m.trunk)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.trunk.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.trunk.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","trunks","trunk","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditTrunkDialogController",e)}(),function(){"use strict";function e(n,e,t,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=e.protocol()+"://"+e.host(),c.trunk=d||n.params.trunk||{},c.selectedTab=n.params.tab||0,c.gotogoto=function(e,t){n.go("app.voice.realtime.trunks",{})},c.alert=r.info,c.gotoTrunks=function(){n.go("app.tools.trunks")},c.saveTrunk=function(){s.trunk.update({id:c.trunk.id},c.trunk).$promise.then(function(){r.success({title:"Trunk updated!",msg:c.trunk.name?c.trunk.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunk",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.voiceContext.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.contexts=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","trunk"],angular.module("app.tools").controller("TrunkController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.trunks=r||{count:0,rows:[]},v.table="trunks",v.listOrder="",v.listOrderAsc=null,v.selectedTrunks=[],v.query={fields:"createdAt,updatedAt,id,name,active,host,secret,defaultuser,context,callerid,type,dtmfmode,nat,qualify,allow,insecure,call_limit,registry,description,directmedia,callcounter,fromdomain,fromuser,outboundproxy,usereqphone,trustrpid,sendrpid,encryption,port,transport,t38pt_udptl,otherFields",sort:"-updatedAt",limit:10,page:1},v.arraytype=_.keyBy([{option:"Friend",value:"'friend'"},{option:"User",value:"'user'"},{option:"Peer",value:"'peer'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraydtmfmode=_.keyBy([{option:"rfc2833",value:"'rfc2833'"},{option:"info",value:"'info'"},{option:"shortinfo",value:"'shortinfo'"},{option:"inband",value:"'inband'"},{option:"auto",value:"'auto'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraynat=_.keyBy([{option:"force_rport",value:"'force_rport'"},{option:"comedia",value:"'comedia'"},{option:"yes",value:"'yes'"},{option:"no",value:"'no'"},{option:"never",value:"'never'"},{option:"route",value:"'route'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayqualify=_.keyBy([{option:"yes",value:"'yes'"},{option:"no",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayallow=_.keyBy([{option:"ulaw",value:"'ulaw'"},{option:"alaw",value:"'alaw'"},{option:"gsm",value:"'gsm'"},{option:"g723",value:"'g723'"},{option:"g726",value:"'g726'"},{option:"g722",value:"'g722'"},{option:"g729",value:"'g729'"},{option:"ilbc",value:"'ilbc'"},{option:"opus",value:"'opus'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayinsecure=_.keyBy([{option:"port",value:"'port'"},{option:"invite",value:"'invite'"},{option:"very",value:"'very'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraydirectmedia=_.keyBy([{option:"yes",value:"'yes'"},{option:"no",value:"'no'"},{option:"nonat",value:"'nonat'"},{option:"update",value:"'update'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraycallcounter=_.keyBy([{option:"yes",value:"'yes'"},{option:"no",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayusereqphone=_.keyBy([{option:"yes",value:"'yes'"},{option:"no",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraytrustrpid=_.keyBy([{option:"yes",value:"'yes'"},{option:"no",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraysendrpid=_.keyBy([{option:"yes",value:"'yes'"},{option:"no",value:"'no'"},{option:"pai",value:"'pai'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayencryption=_.keyBy([{option:"yes",value:"'yes'"},{option:"no",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraytransport=_.keyBy([{option:"udp",value:"'udp'"},{option:"tcp",value:"'tcp'"},{option:"ws",value:"'ws'"},{option:"wss",value:"'wss'"},{option:"tls",value:"'tls'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.tools.trunks.edit",{id:e.id,trunk:e})},v.gotorealtimegoto=function(e,t){n.go("app.voice.realtime.trunks",{})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the trunk?").htmlContent("<b>"+(e.name||"trunk")+"</b> will be deleted.").ariaLabel("delete trunk").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getTrunks=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.trunk.get(v.query,f).$promise},v.createOrEditTrunk=function(e,t){i.show({controller:"CreateOrEditTrunkDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/trunks/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{trunk:t,trunks:v.trunks.rows,license:v.license,setting:v.setting}})},v.deleteTrunk=A,v.exportSelectedTrunks=function(){var e=angular.copy(v.selectedTrunks);return v.selectedTrunks=[],e},v.deleteSelectedTrunks=function(e){var t=i.confirm().title("Are you sure want to delete the selected trunks?").htmlContent("<b>"+v.selectedTrunks.length+" selected</b> will be deleted.").ariaLabel("delete Trunks").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedTrunks.forEach(function(e){A(e)}),v.selectedTrunks=[]})},v.deselectTrunks=function(){v.selectedTrunks=[]},v.selectAllTrunks=function(){v.selectedTrunks=v.trunks.rows};var h=!0,b=1;function f(e){v.trunks=e||{count:0,rows:[]}}function A(e){l.trunk.delete({id:e.id}).$promise.then(function(){_.remove(v.trunks.rows,{id:e.id}),v.trunks.count-=1,v.trunks.rows.length||v.getTrunks(),c.success({title:"Trunk deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEtrunk"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEtrunk",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getTrunks())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","trunks","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("TrunksController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_VARIABLE",m.variable=angular.copy(s),m.variables=o,m.newVariable=!1,m.variable||(m.variable={},m.title="TOOLS.NEW_VARIABLE",m.newVariable=!0),m.addNewVariable=function(){m.errors=[],r.variable.save(m.variable).$promise.then(function(e){m.variables.unshift(e.toJSON()),i.success({title:"Variable properly created",msg:m.variable.name?m.variable.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.variable.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.variable.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveVariable=function(){m.errors=[],r.variable.update({id:m.variable.id},m.variable).$promise.then(function(e){var t=_.find(m.variables,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Variable properly saved!",msg:m.variable.name?m.variable.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.variable.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.variable.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteVariable=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The variable will be deleted.").ariaLabel("Delete Variable").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.variable.delete({id:m.variable.id}).$promise.then(function(){_.remove(m.variables,{id:m.variable.id}),i.success({title:"Variable properly deleted!",msg:(m.variable.name||"variable")+" has been deleted!"}),u(m.variable)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.variable.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.variable.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","variables","variable","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditVariableDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.variables=r||{count:0,rows:[]},v.table="variables",v.listOrder="",v.listOrderAsc=null,v.selectedVariables=[],v.query={fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditVariableDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/variables/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{variable:e,variables:v.variables.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the variable?").htmlContent("<b>"+(e.name||"variable")+"</b> will be deleted.").ariaLabel("delete variable").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getVariables=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.variable.get(v.query,f).$promise},v.createOrEditVariable=function(e,t){i.show({controller:"CreateOrEditVariableDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/variables/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{variable:t,variables:v.variables.rows,license:v.license,setting:v.setting}})},v.deleteVariable=A,v.exportSelectedVariables=function(){var e=angular.copy(v.selectedVariables);return v.selectedVariables=[],e},v.deleteSelectedVariables=function(e){var t=i.confirm().title("Are you sure want to delete the selected variables?").htmlContent("<b>"+v.selectedVariables.length+" selected</b> will be deleted.").ariaLabel("delete Variables").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedVariables.forEach(function(e){A(e)}),v.selectedVariables=[]})},v.deselectVariables=function(){v.selectedVariables=[]},v.selectAllVariables=function(){v.selectedVariables=v.variables.rows};var h=!0,b=1;function f(e){v.variables=e||{count:0,rows:[]}}function A(e){l.variable.delete({id:e.id}).$promise.then(function(){_.remove(v.variables.rows,{id:e.id}),v.variables.count-=1,v.variables.rows.length||v.getVariables(),c.success({title:"Variable deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvariable"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvariable",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getVariables())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","variables","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("VariablesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.chanSpies=r||{count:0,rows:[]},v.table="chanSpies",v.listOrder="",v.listOrderAsc=null,v.selectedChanSpies=[],v.query={fields:"createdAt,updatedAt,id,name,prefix,options,auth,password,record,recordingFormat,description",sort:"-updatedAt",limit:10,page:1},v.arrayoptions=_.keyBy([{option:"b: Only spy on channels involved in a bridged call.",value:"'b'"},{option:"B: Instead of whispering on a single channel barge in on both channels involved in the call.",value:"'B'"},{option:"E: Exit when the spied-on channel hangs up.",value:"'E'"},{option:"o: Only listen to audio coming from this channel.",value:"'o'"},{option:"q: Don't play a beep when beginning to spy on a channel, or speak the selected channel name.",value:"'q'"},{option:"s: Skip the playback of the channel type (i.e. SIP, IAX, etc) when speaking the selected channel name.",value:"'s'"},{option:"S: Stop when no more channels are left to spy on.",value:"'S'"},{option:"w: Enable whisper mode, so the spying channel can talk to the spied-on channel.",value:"'w'"},{option:"W: Enable private whisper mode, so the spying channel can talk to the spied-on channel but cannot listen to that channel.",value:"'W'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayrecordingFormat=_.keyBy([{option:"wav",value:"'wav'"},{option:"gsm",value:"'gsm'"},{option:"wav49",value:"'WAV'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editdialog=function(e,t){i.show({controller:"CreateOrEditchanSpyDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/chanSpies/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{chanSpy:e,chanSpies:v.chanSpies.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the chanSpy?").htmlContent("<b>"+(e.name||"chanSpy")+"</b> will be deleted.").ariaLabel("delete chanSpy").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getChanSpies=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.voiceChanSpy.get(v.query,f).$promise},v.createOrEditchanSpy=function(e,t){i.show({controller:"CreateOrEditchanSpyDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/chanSpies/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{chanSpy:t,chanSpies:v.chanSpies.rows,license:v.license,setting:v.setting}})},v.deletechanSpy=A,v.exportSelectedChanSpies=function(){var e=angular.copy(v.selectedChanSpies);return v.selectedChanSpies=[],e},v.deleteSelectedChanSpies=function(e){var t=i.confirm().title("Are you sure want to delete the selected chanSpies?").htmlContent("<b>"+v.selectedChanSpies.length+" selected</b> will be deleted.").ariaLabel("delete chanSpys").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedChanSpies.forEach(function(e){A(e)}),v.selectedChanSpies=[]})},v.deselectChanSpies=function(){v.selectedChanSpies=[]},v.selectAllChanSpies=function(){v.selectedChanSpies=v.chanSpies.rows};var h=!0,b=1;function f(e){v.chanSpies=e||{count:0,rows:[]}}function A(e){l.voiceChanSpy.delete({id:e.id}).$promise.then(function(){_.remove(v.chanSpies.rows,{id:e.id}),v.chanSpies.count-=1,v.chanSpies.rows.length||v.getChanSpies(),c.success({title:"chanSpy deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvoiceChanSpy"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvoiceChanSpy",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getChanSpies())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","chanSpies","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.voice").controller("ChanSpiesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="VOICE.EDIT_CHANSPY",m.chanSpy=angular.copy(s),m.chanSpies=o,m.newchanSpy=!1,m.chanSpy||(m.chanSpy={recordingFormat:"wav"},m.title="VOICE.NEW_CHANSPY",m.newchanSpy=!0),m.addNewchanSpy=function(){m.errors=[],r.voiceChanSpy.save(m.chanSpy).$promise.then(function(e){m.chanSpies.unshift(e.toJSON()),i.success({title:"chanSpy properly created",msg:m.chanSpy.name?m.chanSpy.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceChanSpy.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceChanSpy.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.savechanSpy=function(){m.errors=[],r.voiceChanSpy.update({id:m.chanSpy.id},m.chanSpy).$promise.then(function(e){var t=_.find(m.chanSpies,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"chanSpy properly saved!",msg:m.chanSpy.name?m.chanSpy.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceChanSpy.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceChanSpy.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deletechanSpy=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The chanSpy will be deleted.").ariaLabel("Delete chanSpy").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceChanSpy.delete({id:m.chanSpy.id}).$promise.then(function(){_.remove(m.chanSpies,{id:m.chanSpy.id}),i.success({title:"chanSpy properly deleted!",msg:(m.chanSpy.name||"chanSpy")+" has been deleted!"}),u(m.chanSpy)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceChanSpy.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceChanSpy.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","chanSpies","chanSpy","api","Auth","license","setting"],angular.module("app.voice").controller("CreateOrEditchanSpyDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.contexts=r||{count:0,rows:[]},v.table="contexts",v.listOrder="",v.listOrderAsc=null,v.selectedContexts=[],v.query={fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",defaultEntry:"false",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditContextDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/contexts/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{context:e,contexts:v.contexts.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the context?").htmlContent("<b>"+(e.name||"context")+"</b> will be deleted.").ariaLabel("delete context").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getContexts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.voiceContext.get(v.query,f).$promise},v.createOrEditContext=function(e,t){i.show({controller:"CreateOrEditContextDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/contexts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{context:t,contexts:v.contexts.rows,license:v.license,setting:v.setting}})},v.deleteContext=A,v.exportSelectedContexts=function(){var e=angular.copy(v.selectedContexts);return v.selectedContexts=[],e},v.deleteSelectedContexts=function(e){var t=i.confirm().title("Are you sure want to delete the selected contexts?").htmlContent("<b>"+v.selectedContexts.length+" selected</b> will be deleted.").ariaLabel("delete Contexts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedContexts.forEach(function(e){A(e)}),v.selectedContexts=[]})},v.deselectContexts=function(){v.selectedContexts=[]},v.selectAllContexts=function(){v.selectedContexts=v.contexts.rows};var h=!0,b=1;function f(e){v.contexts=e||{count:0,rows:[]}}function A(e){l.voiceContext.delete({id:e.id}).$promise.then(function(){_.remove(v.contexts.rows,{id:e.id}),v.contexts.count-=1,v.contexts.rows.length||v.getContexts(),c.success({title:"Context deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvoiceContext"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvoiceContext",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getContexts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","contexts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.voice").controller("ContextsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="VOICE.EDIT_CONTEXT",m.context=angular.copy(s),m.contexts=o,m.newContext=!1,m.context||(m.context={},m.title="VOICE.NEW_CONTEXT",m.newContext=!0),m.addNewContext=function(){m.errors=[],r.voiceContext.save(m.context).$promise.then(function(e){m.contexts.unshift(e.toJSON()),i.success({title:"Context properly created",msg:m.context.name?m.context.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceContext.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceContext.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveContext=function(){m.errors=[],r.voiceContext.update({id:m.context.id},m.context).$promise.then(function(e){var t=_.find(m.contexts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Context properly saved!",msg:m.context.name?m.context.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceContext.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceContext.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteContext=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The context will be deleted.").ariaLabel("Delete Context").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceContext.delete({id:m.context.id}).$promise.then(function(){_.remove(m.contexts,{id:m.context.id}),i.success({title:"Context properly deleted!",msg:(m.context.name||"context")+" has been deleted!"}),u(m.context)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceContext.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceContext.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","contexts","context","api","Auth","license","setting"],angular.module("app.voice").controller("CreateOrEditContextDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="VOICE.EDIT_INBOUNDROUTE",m.inboundroute=angular.copy(s),m.inboundroutes=o,m.newInboundRoute=!1,m.inboundroute||(m.inboundroute={appdata:"Inbound Call",type:"inbound",context:"from-voip-provider"},m.title="VOICE.NEW_INBOUNDROUTE",m.newInboundRoute=!0),m.addNewInboundRoute=function(){m.errors=[],r.voiceExtension.save(m.inboundroute).$promise.then(function(e){m.inboundroutes.unshift(e.toJSON()),i.success({title:"InboundRoute properly created",msg:m.inboundroute.name?m.inboundroute.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceExtension.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceExtension.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveInboundRoute=function(){m.errors=[],r.voiceExtension.update({id:m.inboundroute.id},m.inboundroute).$promise.then(function(e){var t=_.find(m.inboundroutes,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"InboundRoute properly saved!",msg:m.inboundroute.name?m.inboundroute.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceExtension.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceExtension.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteInboundRoute=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The inboundroute will be deleted.").ariaLabel("Delete InboundRoute").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceExtension.delete({id:m.inboundroute.id}).$promise.then(function(){_.remove(m.inboundroutes,{id:m.inboundroute.id}),i.success({title:"InboundRoute properly deleted!",msg:(m.inboundroute.name||"inboundroute")+" has been deleted!"}),u(m.inboundroute)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceExtension.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceExtension.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){m.contexts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","inboundroutes","inboundroute","api","Auth","license","setting"],angular.module("app.voice").controller("CreateOrEditInboundRouteDialogController",e)}(),function(){"use strict";function e(m,i,a,o,e){var u=this;function t(e,t){if(u.inboundrouteApps.rows.length){var n=u.inboundrouteApps.rows[t]?u.inboundrouteApps.rows[t]:u.inboundrouteApps.rows[0];i.show({controller:"EditInboundApp"+(n.appType||n.app).toLowerCase()+"DialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/inboundroutes/edit/apps/"+(n.appType||n.app).toLowerCase()+"/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{inboundrouteApp:n,inboundroute:u.inboundroute}}).then(function(e){e&&(e.id?u.inboundrouteApps.rows[t]=e:u.inboundrouteApps.rows.splice(t,0,e),s())}).catch(function(e){e&&o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:EDITMODALSHOW",msg:e.data?JSON.stringify(e.data):e.toString()})})}}function s(){var e=["queue","playback"],t=2,n=[];n.push({type:"inbound",app:"Set",appdata:"CDR(type)=inbound",context:u.inboundroute.context,exten:u.inboundroute.exten,priority:t++,VoiceExtensionId:u.inboundroute.id}),n.push({type:"inbound",app:"Set",appdata:"XCALLY-MOTION-ANSWER=0",context:u.inboundroute.context,exten:u.inboundroute.exten,priority:t++,VoiceExtensionId:u.inboundroute.id}),n.push({type:"inbound",app:"Set",appdata:"XCALLY-MOTION-PROGRESS=0",context:u.inboundroute.context,exten:u.inboundroute.exten,priority:t++,VoiceExtensionId:u.inboundroute.id}),n.push({type:"inbound",app:"Set",appdata:"MONITOR_OPTIONS=ab",context:u.inboundroute.context,exten:u.inboundroute.exten,priority:t++,VoiceExtensionId:u.inboundroute.id});for(var a=0,i=0;a<u.inboundrouteApps.rows.length;a++,i=0){var o=u.inboundrouteApps.rows[a],s=[],r=[];o.intervals="*,*,*,*"!==o.interval?[o.interval]:o.IntervalId?_.map(_.filter(u.intervals.rows,{IntervalId:o.IntervalId}),"interval"):[],o.context=u.inboundroute.context,o.exten=u.inboundroute.exten,o.type&&(o.type=o.type.toLowerCase()),o.hasOwnProperty("answer")&&e.includes(o.app.toLowerCase())&&"custom"!==o.appType&&(o.answer?(s.push({type:o.type.toLowerCase(),app:"ExecIf",appdata:"$[${XCALLY-MOTION-ANSWER}=0]?Answer",context:u.inboundroute.context,exten:u.inboundroute.exten,priority:o.intervals.length+t+i++,VoiceExtensionId:u.inboundroute.id}),s.push({type:o.type.toLowerCase(),app:"Set",appdata:"XCALLY-MOTION-ANSWER=1",context:u.inboundroute.context,exten:u.inboundroute.exten,priority:o.intervals.length+t+i++,VoiceExtensionId:u.inboundroute.id})):(s.push({type:o.type.toLowerCase(),app:"ExecIf",appdata:"$[${XCALLY-MOTION-PROGRESS}=0]?Progress",context:u.inboundroute.context,exten:u.inboundroute.exten,priority:o.intervals.length+t+i++,VoiceExtensionId:u.inboundroute.id}),s.push({type:o.type.toLowerCase(),app:"Set",appdata:"XCALLY-MOTION-PROGRESS=1",context:u.inboundroute.context,exten:u.inboundroute.exten,priority:o.intervals.length+t+i++,VoiceExtensionId:u.inboundroute.id})));for(var l=0;l<o.intervals.length;l++){var d=t+o.intervals.length,c=l===o.intervals.length-1?t+s.length+r.length+2:t+l+1;s.splice(l,0,{type:"inbound",app:"GotoIfTime",appdata:o.intervals[l]+"?"+u.inboundroute.context+",${EXTEN},"+d+":"+u.inboundroute.context+",${EXTEN},"+c,exten:u.inboundroute.exten,context:u.inboundroute.context,priority:t+l,VoiceExtensionId:u.inboundroute.id})}o.priority=s.length?_.last(s).priority+1:t,t=(r.length?_.last(r).priority:o.priority)+1,n=_.concat(n,s,[o],r)}n.push({type:"inbound",app:"Hangup",exten:u.inboundroute.exten,context:u.inboundroute.context,priority:t,VoiceExtensionId:u.inboundroute.id}),m.voiceExtension.addApplications({id:u.inboundroute.id},_.sortBy(n,"priority")).$promise.then(function(e){u.inboundrouteApps.rows=e.rows}).catch(function(e){console.error(e)})}function n(e){u.inboundrouteApps=e||{count:0,rows:[]}}u.currentUser=e.getCurrentUser(),u.inboundroute={},u.inboundrouteApps={count:0,rows:[]},u.selectedInboundRouteApps=[],u.query={sort:"priority"},u.apps=_.reject(_.sortBy([{app:"Interval",appType:"interval",types:["always","custom","list"],fields:[],isApp:!1},{app:"Queue",appType:"queue",context:"from-voip-provider",type:"Inbound",appdata:",xX,,,300,,,,,",icon:"icon-apps",options:"xX",interval:"*,*,*,*",answer:!0,isApp:!0,extraApi:[{name:"sounds",route:"sound",filters:{fields:"name,save_name",sort:"name"}},{name:"queues",route:"voiceQueue",filters:{type:"inbound",fields:"id,name,type",sort:"name",nolimit:!0}}],fields:[{title:"Queue",name:"queue",type:"apiselect",values:"queues",value:"queue.name",option:"queue.name",required:!0,param:0},{title:"Options",name:"options",type:"text",param:1},{title:"Url",name:"URL",type:"text",param:2},{title:"Announce_Overrides",name:"sound",type:"apiselect",values:"sounds",value:"'/var/opt/motion2/server/files/sounds/converted/{{sound.save_name}}'",option:"sound.name",defaultValues:[{value:"''",option:"None"}],param:3},{title:"Timeout",name:"timeout",type:"number",min:0,param:4},{title:"Agi",name:"agi",type:"text",param:5},{title:"Macro",name:"macro",type:"text",param:6},{title:"GoSub",name:"gosub",type:"text",param:7},{title:"Rule",name:"rule",type:"text",param:8},{title:"Position",name:"position",type:"number",min:0,param:9},{title:"Answer",name:"answer",type:"switch",general:!0}]},{app:"Playback",appType:"playback",context:"from-voip-provider",type:"Inbound",icon:"icon-apps",interval:"*,*,*,*",answer:!0,isApp:!0,extraApi:[{name:"sounds",route:"sound",filters:{fields:"name,save_name",sort:"name"}}],fields:[{title:"Audio_Files",name:"appdata",type:"apiselect",values:"sounds",value:"'/var/opt/motion2/server/files/sounds/converted/{{appdata.save_name}}'",option:"appdata.name",required:!0,param:0},{title:"Options",name:"options",type:"text",param:1},{title:"Answer",name:"answer",type:"switch",general:!0}]},{app:"Dial",appType:"dial",context:"from-voip-provider",type:"Inbound",icon:"icon-apps",interval:"*,*,*,*",options:"xX",isApp:!0,fields:[{title:"Technology/Resource",name:"tech",type:"text",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",min:0,param:1},{title:"Options",name:"options",type:"text",param:2},{title:"Url",name:"url",type:"text",param:3}]},{app:"Dial",appType:"internalDial",context:"from-voip-provider",type:"Inbound",icon:"icon-apps",interval:"*,*,*,*",options:"xX",isApp:!0,extraApi:[{name:"users",route:"user",filters:{fields:"name",sort:"name"}}],fields:[{title:"User",name:"user",type:"apiselect",values:"users",value:"'SIP/{{user.name}}'",option:"user.name",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",min:0,param:1},{title:"Options",name:"options",type:"text",param:2},{title:"Url",name:"url",type:"text",param:3}]},{app:"Dial",appType:"externalDial",context:"from-voip-provider",type:"inbound",icon:"icon-apps",interval:"*,*,*,*",options:"xX",isApp:!0,extraApi:[{name:"trunks",route:"trunk",filters:{fields:"name",sort:"name"}}],fields:[{title:"Trunk",name:"trunk",type:"apiselect",values:"trunks",value:"trunk.name",option:"trunk.name",required:!0,param:0},{title:"Phone",name:"phone",required:!0,type:"text"},{title:"Timeout",name:"timeout",type:"number",min:0,param:1},{title:"Options",name:"options",type:"text",param:2},{title:"Url",name:"url",type:"text",param:3}]},{app:"Dial",appType:"ringGroup",context:"from-voip-provider",type:"inbound",icon:"icon-apps",interval:"*,*,*,*",options:"xX",isApp:!0,extraApi:[{name:"users",route:"user",filters:{fields:"name",sort:"name"}}],fields:[{title:"User",name:"multipleUsers",type:"apiselect",multiple:!0,values:"users",value:"'SIP/{{multipleUsers.name}}'",option:"multipleUsers.name",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",min:0,param:1},{title:"Options",name:"options",type:"text",param:2},{title:"Url",name:"url",type:"text",param:3}]},{app:"AGI",alias:"CallySquare",appType:"agi",context:"from-voip-provider",type:"inbound",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"projects",route:"squareProject",filters:{fields:"name",sort:"name"}}],fields:[{title:"Project",name:"project",type:"apiselect",values:"projects",value:"'agi://127.0.0.1/square,{{project.name}}'",option:"project.name",required:!0,param:0}]},{app:"goto",appType:"goTo",context:"from-voip-provider",type:"Inbound",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"contexts",route:"voiceContext",filters:{fields:"name",sort:"name"}}],fields:[{title:"Context",name:"context",type:"apiselect",values:"contexts",value:"context.name",option:"context.name",required:!0,param:0},{title:"Extension",name:"extension",type:"text",required:!0,param:1},{title:"Priority",name:"priority",type:"text",required:!0,param:2}]},{app:"hangup",appType:"hangup",context:"from-voip-provider",type:"Inbound",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Hangup_Cause",name:"appdata",type:"select",param:0,values:[{option:"HANGUPCAUSE_1",value:"'1'"},{option:"HANGUPCAUSE_16",value:"'16'"},{option:"HANGUPCAUSE_17",value:"'17'"},{option:"HANGUPCAUSE_18",value:"'18'"},{option:"HANGUPCAUSE_21",value:"'21'"},{option:"HANGUPCAUSE_22",value:"'22'"},{option:"HANGUPCAUSE_27",value:"'27'"},{option:"HANGUPCAUSE_38",value:"'38'"},{option:"HANGUPCAUSE_41",value:"'41'"}],translate:!0,required:!0,general:!0}]},{app:"Set",appType:"set",context:"from-voip-provider",type:"Inbound",separator:"=",icon:"icon-apps",interval:"*,*,*,*",extraApi:[{name:"variables",route:"variable",filters:{fields:"name",sort:"name"}}],isApp:!0,fields:[{title:"Variable",name:"name",type:"apiselect",values:"variables",value:"name.name",option:"name.name",required:!0,param:0},{title:"Value",name:"value",type:"text",required:!0,param:1}]},{app:null,appType:"custom",icon:"icon-apps",type:"Inbound",interval:"*,*,*,*",isApp:!0,fields:[{title:"Application_Name",name:"app",type:"text",required:!0,param:0},{title:"Arguments",name:"appdata",type:"text",param:1}]},{app:"Voicemail",appType:"voicemail",context:"from-voip-provider",icon:"icon-apps",type:"Inbound",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"voiceMails",route:"voiceMail",filters:{fields:"mailbox",sort:"mailbox"}}],fields:[{title:"Mailbox@Context",name:"voiceMail",type:"apiselect",values:"voiceMails",value:"'{{voiceMail.mailbox}}@from-voicemail'",option:"voiceMail.mailbox",required:!0,param:0},{title:"Options",name:"options",type:"text",param:1}]}],["app"]),{isApp:!1}),u.list={group:{name:"opt1",pull:"clone"},animation:100,sort:!1},u.applications={group:{name:"opt2",put:"opt1"},animation:100,onAdd:function(e){t(e,e.newIndex)},onSort:function(e){s()}},u.init=function(e){u.inboundroute=e,u.query.VoiceExtensionId=e.id,u.query.isApp=!0,u.query.nolimit=!0,u.getInboundRouteApps(),u.getIntervals()},u.deleteConfirm=function(e,t,n){var a=i.confirm().title("Are you sure want to delete the application?").htmlContent("<b>"+e.app+"</b> will be deleted.").ariaLabel("delete application").targetEvent(n).ok("OK").cancel("CANCEL");i.show(a).then(function(){u.inboundrouteApps.rows.splice(t,1),s()},function(){console.log("CANCEL")})},u.getInboundRouteApps=function(){u.promise=m.voiceExtension.get(u.query,n).$promise},u.editInboundRouteApp=t,u.editInterval=function(e,t){if(u.inboundrouteApps.rows.length){var n=u.inboundrouteApps.rows[t]?u.inboundrouteApps.rows[t]:u.inboundrouteApps.rows[0];i.show({controller:"EditInboundAppintervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/inboundroutes/edit/apps/interval/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:{interval:n.interval,IntervalId:n.IntervalId,application:!0},intervals:[]}}).then(function(e){e&&(n.interval=e.interval||"*,*,*,*",n.IntervalId=e.IntervalId||null,s())})}},u.deleteInboundRouteApp=function(e){_.remove(u.inboundrouteApps.rows,{id:e.id}),s(),o.success({title:"App deleted!",msg:e.app?e.app+" has been deleted!":""})},u.deleteSelectedInboundRouteApps=function(e){var t=i.confirm().title("Are you sure want to delete the selected applications?").htmlContent("<b>"+u.selectedInboundRouteApps.length+" selected</b> will be deleted.").ariaLabel("delete applications").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){u.selectedInboundRouteApps.forEach(function(e){_.remove(u.inboundrouteApps.rows,{id:e.id})}),u.selectedInboundRouteApps=[],s()})},u.rewriteRouting=s,u.getIntervals=function(){return m.interval.get({fields:"id,interval,IntervalId"}).$promise.then(function(e){u.intervals=e}).catch(function(e){console.error(e)})}}e.$inject=["api","$mdDialog","$document","toasty","Auth"],angular.module("app.voice").controller("InboundRouteActionsController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.agi=angular.copy(e),o.agi.appdata)switch(o.agi.appType?o.agi.appType.toLowerCase():o.agi.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.agi.appdata.split(",");o.agi.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.agi.text=s.slice(1,s.length).join(",");break;case"message":o.agi.text=o.agi.appdata;break;case"set":o.agi.name=o.agi.appdata.split("=")[0],o.agi.value=o.agi.appdata.split("=")[1];break;case"agi":o.agi.project=o.agi.appdata;break;default:var r=o.agi.appdata.split(",");o.agi.project=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.agi.type&&"outbound"===o.agi.type.toLowerCase()&&"outbounddial"===o.agi.appType.toLowerCase()&&(o.agi.prefix=o.agi.phone?o.agi.phone.split("$")[0]:void 0,o.agi.callerId=o.agi.callerID?"CALLERID(all)="+o.agi.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.agi.type&&"outbound"===o.agi.type.toLowerCase()&&"outboundDial"===o.agi.appType&&(o.agi.phone=a.cutdigits?(o.agi.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.agi.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.agi.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.agi.options+="U(xcally-mixmonitor-context)"):o.agi.options=o.agi.options.replace("U(xcally-mixmonitor-context)",""));if(o.agi.appType&&"custom"===o.agi.appType);else switch((o.agi.app||o.agi.appType).toLowerCase()){case"set":o.agi.appdata=o.agi.name+"="+o.agi.value;break;case"custom":break;default:e[0]=o.agi.project,o.agi.appdata=e.join(",")}l(o.agi)},o.closeDialog=l,i.squareProject.get({fields:"name",sort:"name"}).$promise.then(function(e){o.projects=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETprojects",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppagiDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(n.appType||n.app).toUpperCase(),o.custom=angular.copy(n),o.custom.appdata)switch(o.custom.appType?o.custom.appType.toLowerCase():o.custom.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.custom.appdata.split(",");o.custom.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.custom.text=s.slice(1,s.length).join(",");break;case"message":o.custom.text=o.custom.appdata;break;case"set":o.custom.name=o.custom.appdata.split("=")[0],o.custom.value=o.custom.appdata.split("=")[1];break;case"agi":o.custom.project=o.custom.appdata;break;default:var r=o.custom.appdata.split(",");o.custom.app=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.custom.appdata=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}function l(e){t.hide(e)}o.custom.type&&"outbound"===o.custom.type.toLowerCase()&&"outbounddial"===o.custom.appType.toLowerCase()&&(o.custom.prefix=o.custom.phone?o.custom.phone.split("$")[0]:void 0,o.custom.callerId=o.custom.callerID?"CALLERID(all)="+o.custom.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.custom.type&&"outbound"===o.custom.type.toLowerCase()&&"outboundDial"===o.custom.appType&&(o.custom.phone=a.cutdigits?(o.custom.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.custom.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.custom.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.custom.options+="U(xcally-mixmonitor-context)"):o.custom.options=o.custom.options.replace("U(xcally-mixmonitor-context)",""));if(o.custom.appType&&"custom"===o.custom.appType);else switch((o.custom.app||o.custom.appType).toLowerCase()){case"set":o.custom.appdata=o.custom.name+"="+o.custom.value;break;case"custom":break;default:e[0]=o.custom.app,e[1]=o.custom.appdata,o.custom.appdata=e.join(",")}l(o.custom)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppcustomDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(n.appType||n.app).toUpperCase(),o.dial=angular.copy(n),o.dial.appdata)switch(o.dial.appType?o.dial.appType.toLowerCase():o.dial.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.dial.appdata.split(",");o.dial.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.dial.text=s.slice(1,s.length).join(",");break;case"message":o.dial.text=o.dial.appdata;break;case"set":o.dial.name=o.dial.appdata.split("=")[0],o.dial.value=o.dial.appdata.split("=")[1];break;case"agi":o.dial.project=o.dial.appdata;break;default:var r=o.dial.appdata.split(",");o.dial.tech=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.dial.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.dial.options=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.dial.url=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10)}function l(e){t.hide(e)}o.dial.type&&"outbound"===o.dial.type.toLowerCase()&&"outbounddial"===o.dial.appType.toLowerCase()&&(o.dial.prefix=o.dial.phone?o.dial.phone.split("$")[0]:void 0,o.dial.callerId=o.dial.callerID?"CALLERID(all)="+o.dial.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.dial.type&&"outbound"===o.dial.type.toLowerCase()&&"outboundDial"===o.dial.appType&&(o.dial.phone=a.cutdigits?(o.dial.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.dial.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.dial.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.dial.options+="U(xcally-mixmonitor-context)"):o.dial.options=o.dial.options.replace("U(xcally-mixmonitor-context)",""));if(o.dial.appType&&"custom"===o.dial.appType);else switch((o.dial.app||o.dial.appType).toLowerCase()){case"set":o.dial.appdata=o.dial.name+"="+o.dial.value;break;case"custom":break;default:e[0]=o.dial.tech,e[1]=o.dial.timeout,e[2]=o.dial.options,e[3]=o.dial.url,o.dial.appdata=e.join(",")}l(o.dial)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppdialDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.externaldial=angular.copy(e),o.externaldial.appdata)switch(o.externaldial.appType?o.externaldial.appType.toLowerCase():o.externaldial.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.externaldial.appdata.split(",");o.externaldial.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.externaldial.text=s.slice(1,s.length).join(",");break;case"message":o.externaldial.text=o.externaldial.appdata;break;case"set":o.externaldial.name=o.externaldial.appdata.split("=")[0],o.externaldial.value=o.externaldial.appdata.split("=")[1];break;case"agi":o.externaldial.project=o.externaldial.appdata;break;default:var r=o.externaldial.appdata.split(",");o.externaldial.trunk=r[0].split("/")[1],o.externaldial.phone=r[0].split("/")[2],o.externaldial.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.externaldial.options=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.externaldial.url=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10)}function l(e){t.hide(e)}o.externaldial.type&&"outbound"===o.externaldial.type.toLowerCase()&&"outbounddial"===o.externaldial.appType.toLowerCase()&&(o.externaldial.prefix=o.externaldial.phone?o.externaldial.phone.split("$")[0]:void 0,o.externaldial.callerId=o.externaldial.callerID?"CALLERID(all)="+o.externaldial.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.externaldial.type&&"outbound"===o.externaldial.type.toLowerCase()&&"outboundDial"===o.externaldial.appType&&(o.externaldial.phone=a.cutdigits?(o.externaldial.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.externaldial.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.externaldial.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.externaldial.options+="U(xcally-mixmonitor-context)"):o.externaldial.options=o.externaldial.options.replace("U(xcally-mixmonitor-context)",""));if(o.externaldial.appType&&"custom"===o.externaldial.appType);else switch((o.externaldial.app||o.externaldial.appType).toLowerCase()){case"set":o.externaldial.appdata=o.externaldial.name+"="+o.externaldial.value;break;case"custom":break;default:e[0]=["SIP",o.externaldial.trunk,o.externaldial.phone].join("/"),e[1]=o.externaldial.timeout,e[2]=o.externaldial.options,e[3]=o.externaldial.url,o.externaldial.appdata=e.join(",")}l(o.externaldial)},o.closeDialog=l,i.trunk.get({fields:"name",sort:"name"}).$promise.then(function(e){o.trunks=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppexternaldialDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.goto=angular.copy(e),o.goto.appdata)switch(o.goto.appType?o.goto.appType.toLowerCase():o.goto.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.goto.appdata.split(",");o.goto.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.goto.text=s.slice(1,s.length).join(",");break;case"message":o.goto.text=o.goto.appdata;break;case"set":o.goto.name=o.goto.appdata.split("=")[0],o.goto.value=o.goto.appdata.split("=")[1];break;case"agi":o.goto.project=o.goto.appdata;break;default:var r=o.goto.appdata.split(",");o.goto.context=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.goto.extension=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.goto.priority=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10)}function l(e){t.hide(e)}o.goto.type&&"outbound"===o.goto.type.toLowerCase()&&"outbounddial"===o.goto.appType.toLowerCase()&&(o.goto.prefix=o.goto.phone?o.goto.phone.split("$")[0]:void 0,o.goto.callerId=o.goto.callerID?"CALLERID(all)="+o.goto.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.goto.type&&"outbound"===o.goto.type.toLowerCase()&&"outboundDial"===o.goto.appType&&(o.goto.phone=a.cutdigits?(o.goto.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.goto.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.goto.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.goto.options+="U(xcally-mixmonitor-context)"):o.goto.options=o.goto.options.replace("U(xcally-mixmonitor-context)",""));if(o.goto.appType&&"custom"===o.goto.appType);else switch((o.goto.app||o.goto.appType).toLowerCase()){case"set":o.goto.appdata=o.goto.name+"="+o.goto.value;break;case"custom":break;default:e[0]=o.goto.context,e[1]=o.goto.extension,e[2]=o.goto.priority,o.goto.appdata=e.join(",")}l(o.goto)},o.closeDialog=l,i.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){o.contexts=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppgotoDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(n.appType||n.app).toUpperCase(),o.hangup=angular.copy(n),o.hangup.appdata)switch(o.hangup.appType?o.hangup.appType.toLowerCase():o.hangup.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.hangup.appdata.split(",");o.hangup.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.hangup.text=s.slice(1,s.length).join(",");break;case"message":o.hangup.text=o.hangup.appdata;break;case"set":o.hangup.name=o.hangup.appdata.split("=")[0],o.hangup.value=o.hangup.appdata.split("=")[1];break;case"agi":o.hangup.project=o.hangup.appdata;break;default:var r=o.hangup.appdata.split(",");o.hangup.appdata=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.hangup.type&&"outbound"===o.hangup.type.toLowerCase()&&"outbounddial"===o.hangup.appType.toLowerCase()&&(o.hangup.prefix=o.hangup.phone?o.hangup.phone.split("$")[0]:void 0,o.hangup.callerId=o.hangup.callerID?"CALLERID(all)="+o.hangup.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.hangup.type&&"outbound"===o.hangup.type.toLowerCase()&&"outboundDial"===o.hangup.appType&&(o.hangup.phone=a.cutdigits?(o.hangup.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.hangup.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.hangup.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.hangup.options+="U(xcally-mixmonitor-context)"):o.hangup.options=o.hangup.options.replace("U(xcally-mixmonitor-context)",""));if(o.hangup.appType&&"custom"===o.hangup.appType);else switch((o.hangup.app||o.hangup.appType).toLowerCase()){case"set":o.hangup.appdata=o.hangup.name+"="+o.hangup.value;break;case"custom":break;default:e[0]=o.hangup.appdata,o.hangup.appdata=e.join(",")}l(o.hangup)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundApphangupDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.internaldial=angular.copy(e),o.internaldial.appdata)switch(o.internaldial.appType?o.internaldial.appType.toLowerCase():o.internaldial.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.internaldial.appdata.split(",");o.internaldial.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.internaldial.text=s.slice(1,s.length).join(",");break;case"message":o.internaldial.text=o.internaldial.appdata;break;case"set":o.internaldial.name=o.internaldial.appdata.split("=")[0],o.internaldial.value=o.internaldial.appdata.split("=")[1];break;case"agi":o.internaldial.project=o.internaldial.appdata;break;default:var r=o.internaldial.appdata.split(",");o.internaldial.user=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.internaldial.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.internaldial.options=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.internaldial.url=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10)}function l(e){t.hide(e)}o.internaldial.type&&"outbound"===o.internaldial.type.toLowerCase()&&"outbounddial"===o.internaldial.appType.toLowerCase()&&(o.internaldial.prefix=o.internaldial.phone?o.internaldial.phone.split("$")[0]:void 0,o.internaldial.callerId=o.internaldial.callerID?"CALLERID(all)="+o.internaldial.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.internaldial.type&&"outbound"===o.internaldial.type.toLowerCase()&&"outboundDial"===o.internaldial.appType&&(o.internaldial.phone=a.cutdigits?(o.internaldial.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.internaldial.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.internaldial.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.internaldial.options+="U(xcally-mixmonitor-context)"):o.internaldial.options=o.internaldial.options.replace("U(xcally-mixmonitor-context)",""));if(o.internaldial.appType&&"custom"===o.internaldial.appType);else switch((o.internaldial.app||o.internaldial.appType).toLowerCase()){case"set":o.internaldial.appdata=o.internaldial.name+"="+o.internaldial.value;break;case"custom":break;default:e[0]=o.internaldial.user,e[1]=o.internaldial.timeout,e[2]=o.internaldial.options,e[3]=o.internaldial.url,o.internaldial.appdata=e.join(",")}l(o.internaldial)},o.closeDialog=l,i.user.get({fields:"name",sort:"name"}).$promise.then(function(e){o.users=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETusers",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppinternaldialDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;if(l.errors=[],l.title="TOOLS.EDIT_INTERVAL",l.interval=angular.copy(i),l.intervals=o,l.newInterval=!1,l.types=["always","custom","list"],l.daysOfWeek=a.getDaysOfWeek(),l.monthNumber=a.getMonthNumber(),l.monthName=a.getMonthName(),l.daysOfMonth=a.getDaysOfMonth(),l.interval)if("*,*,*,*"!==l.interval.interval){l.type="custom";var d=l.interval.interval.split(","),c=d[0],m=d[1],u=d[2],p=d[3];if("*"!==c){var g,v=c.split("-")[0],h=c.split("-")[1];(g=new Date).setHours(Number(v.split(":")[0])),g.setMinutes(Number(v.split(":")[1])),l.timeRangeFrom=g,(g=new Date).setHours(Number(h.split(":")[0])),g.setMinutes(Number(h.split(":")[1])),l.timeRangeTo=g}"*"!==m&&(l.dayOfWeekFrom=m.split("-")[0],l.dayOfWeekTo=m.split("-")[1]),"*"!==u&&(l.monthDayFrom=u.split("-")[0],l.monthDayTo=u.split("-")[1]),"*"!==p&&(l.monthFrom=p.split("-")[0],l.monthTo=p.split("-")[1])}else l.type="always";else l.interval={interval:"*,*,*,*"},l.type="always",l.title="TOOLS.NEW_INTERVAL",l.newInterval=!0;function b(){switch(l.type){case"always":case"list":return"*,*,*,*";case"custom":var e=[];if("*"!==l.timeRangeFrom&&l.timeRangeFrom&&l.timeRangeTo){var t=(l.timeRangeFrom.getHours()<10?"0":"")+l.timeRangeFrom.getHours()+":"+(l.timeRangeFrom.getMinutes()<10?"0":"")+l.timeRangeFrom.getMinutes(),n=(l.timeRangeTo.getHours()<10?"0":"")+l.timeRangeTo.getHours()+":"+(l.timeRangeTo.getMinutes()<10?"0":"")+l.timeRangeTo.getMinutes();e.push(t+"-"+n)}else e.push("*");return l.dayOfWeekFrom?l.dayOfWeekTo?e.push(l.dayOfWeekFrom+"-"+l.dayOfWeekTo):e.push(l.dayOfWeekFrom):e.push("*"),l.monthDayFrom?l.monthDayTo?e.push(l.monthDayFrom+"-"+l.monthDayTo):e.push(l.monthDayFrom):e.push("*"),l.monthFrom?l.monthTo?e.push(l.monthFrom+"-"+l.monthTo):e.push(l.monthFrom):e.push("*"),e.join()}}function f(e){t.hide(e)}e.params.id&&!l.interval.application&&(l.interval.IntervalId=e.params.id),l.interval.IntervalId&&l.interval.application&&(l.type="list"),l.addNewInterval=function(){l.errors=[],l.interval.interval=b(),r.interval.save(l.interval).$promise.then(function(e){l.intervals.push(e),s.success({title:"Interval properly created",msg:l.interval.name?l.interval.name+" has been created!":""}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}]})},l.saveInterval=function(){l.errors=[],l.interval.interval=b(),l.interval.application?("list"!==l.type&&(l.interval.IntervalId=null),f(l.interval)):r.interval.update({id:l.interval.id},l.interval).$promise.then(function(e){var t=_.find(l.intervals,{id:e.id});t&&_.merge(t,e),s.success({title:"Interval properly saved!",msg:"Interval has been saved!"}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}]})},l.closeDialog=f,l.interval.application&&r.interval.get({fields:"id,name,interval,IntervalId",IntervalId:"null",nolimit:!0}).$promise.then(function(e){l.intervals=e}).catch(function(e){console.error(e)})}e.$inject=["$state","$mdDialog","$mdToast","IndexFactory","interval","intervals","toasty","api"],angular.module("app.voice").controller("EditInboundAppintervalDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.playback=angular.copy(e),o.playback.appdata)switch(o.playback.appType?o.playback.appType.toLowerCase():o.playback.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.playback.appdata.split(",");o.playback.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.playback.text=s.slice(1,s.length).join(",");break;case"message":o.playback.text=o.playback.appdata;break;case"set":o.playback.name=o.playback.appdata.split("=")[0],o.playback.value=o.playback.appdata.split("=")[1];break;case"agi":o.playback.project=o.playback.appdata;break;default:var r=o.playback.appdata.split(",");o.playback.appdata=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.playback.options=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}function l(e){t.hide(e)}o.playback.type&&"outbound"===o.playback.type.toLowerCase()&&"outbounddial"===o.playback.appType.toLowerCase()&&(o.playback.prefix=o.playback.phone?o.playback.phone.split("$")[0]:void 0,o.playback.callerId=o.playback.callerID?"CALLERID(all)="+o.playback.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.playback.type&&"outbound"===o.playback.type.toLowerCase()&&"outboundDial"===o.playback.appType&&(o.playback.phone=a.cutdigits?(o.playback.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.playback.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.playback.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.playback.options+="U(xcally-mixmonitor-context)"):o.playback.options=o.playback.options.replace("U(xcally-mixmonitor-context)",""));if(o.playback.appType&&"custom"===o.playback.appType);else switch((o.playback.app||o.playback.appType).toLowerCase()){case"set":o.playback.appdata=o.playback.name+"="+o.playback.value;break;case"custom":break;default:e[0]=o.playback.appdata,e[1]=o.playback.options,o.playback.appdata=e.join(",")}l(o.playback)},o.closeDialog=l,i.sound.get({fields:"name,save_name",sort:"name"}).$promise.then(function(e){o.sounds=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsounds",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppplaybackDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.queue=angular.copy(e),o.queue.appdata)switch(o.queue.appType?o.queue.appType.toLowerCase():o.queue.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.queue.appdata.split(",");o.queue.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.queue.text=s.slice(1,s.length).join(",");break;case"message":o.queue.text=o.queue.appdata;break;case"set":o.queue.name=o.queue.appdata.split("=")[0],o.queue.value=o.queue.appdata.split("=")[1];break;case"agi":o.queue.project=o.queue.appdata;break;default:var r=o.queue.appdata.split(",");o.queue.queue=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.queue.options=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.queue.URL=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.queue.sound=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10),o.queue.timeout=_.isEmpty(r[4])?r[4]:isNaN(r[4])?r[4]:parseInt(r[4],10),o.queue.agi=_.isEmpty(r[5])?r[5]:isNaN(r[5])?r[5]:parseInt(r[5],10),o.queue.macro=_.isEmpty(r[6])?r[6]:isNaN(r[6])?r[6]:parseInt(r[6],10),o.queue.gosub=_.isEmpty(r[7])?r[7]:isNaN(r[7])?r[7]:parseInt(r[7],10),o.queue.rule=_.isEmpty(r[8])?r[8]:isNaN(r[8])?r[8]:parseInt(r[8],10),o.queue.position=_.isEmpty(r[9])?r[9]:isNaN(r[9])?r[9]:parseInt(r[9],10)}function l(e){t.hide(e)}o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outbounddial"===o.queue.appType.toLowerCase()&&(o.queue.prefix=o.queue.phone?o.queue.phone.split("$")[0]:void 0,o.queue.callerId=o.queue.callerID?"CALLERID(all)="+o.queue.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outboundDial"===o.queue.appType&&(o.queue.phone=a.cutdigits?(o.queue.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.queue.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.queue.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.queue.options+="U(xcally-mixmonitor-context)"):o.queue.options=o.queue.options.replace("U(xcally-mixmonitor-context)",""));if(o.queue.appType&&"custom"===o.queue.appType);else switch((o.queue.app||o.queue.appType).toLowerCase()){case"set":o.queue.appdata=o.queue.name+"="+o.queue.value;break;case"custom":break;default:e[0]=o.queue.queue,e[1]=o.queue.options,e[2]=o.queue.URL,e[3]=o.queue.sound,e[4]=o.queue.timeout,e[5]=o.queue.agi,e[6]=o.queue.macro,e[7]=o.queue.gosub,e[8]=o.queue.rule,e[9]=o.queue.position,o.queue.appdata=e.join(",")}l(o.queue)},o.closeDialog=l,i.sound.get({fields:"name,save_name",sort:"name"}).$promise.then(function(e){o.sounds=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsounds",msg:e.data?JSON.stringify(e.data):e.toString()})}),i.voiceQueue.get({type:"inbound",fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){o.queues=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppqueueDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.ringgroup=angular.copy(e),o.ringgroup.appdata)switch(o.ringgroup.appType?o.ringgroup.appType.toLowerCase():o.ringgroup.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.ringgroup.appdata.split(",");o.ringgroup.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.ringgroup.text=s.slice(1,s.length).join(",");break;case"message":o.ringgroup.text=o.ringgroup.appdata;break;case"set":o.ringgroup.name=o.ringgroup.appdata.split("=")[0],o.ringgroup.value=o.ringgroup.appdata.split("=")[1];break;case"agi":o.ringgroup.project=o.ringgroup.appdata;break;default:var r=o.ringgroup.appdata.split(",");o.ringgroup.multipleUsers=r[0].split("&"),o.ringgroup.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.ringgroup.options=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.ringgroup.url=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10)}function l(e){t.hide(e)}o.ringgroup.type&&"outbound"===o.ringgroup.type.toLowerCase()&&"outbounddial"===o.ringgroup.appType.toLowerCase()&&(o.ringgroup.prefix=o.ringgroup.phone?o.ringgroup.phone.split("$")[0]:void 0,o.ringgroup.callerId=o.ringgroup.callerID?"CALLERID(all)="+o.ringgroup.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.ringgroup.type&&"outbound"===o.ringgroup.type.toLowerCase()&&"outboundDial"===o.ringgroup.appType&&(o.ringgroup.phone=a.cutdigits?(o.ringgroup.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.ringgroup.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.ringgroup.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.ringgroup.options+="U(xcally-mixmonitor-context)"):o.ringgroup.options=o.ringgroup.options.replace("U(xcally-mixmonitor-context)",""));if(o.ringgroup.appType&&"custom"===o.ringgroup.appType);else switch((o.ringgroup.app||o.ringgroup.appType).toLowerCase()){case"set":o.ringgroup.appdata=o.ringgroup.name+"="+o.ringgroup.value;break;case"custom":break;default:e[0]=o.ringgroup.multipleUsers.join("&"),e[1]=o.ringgroup.timeout,e[2]=o.ringgroup.options,e[3]=o.ringgroup.url,o.ringgroup.appdata=e.join(",")}l(o.ringgroup)},o.closeDialog=l,i.user.get({fields:"name",sort:"name"}).$promise.then(function(e){o.users=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETusers",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppringgroupDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.set=angular.copy(e),o.set.appdata)switch(o.set.appType?o.set.appType.toLowerCase():o.set.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.set.appdata.split(",");o.set.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.set.text=s.slice(1,s.length).join(",");break;case"message":o.set.text=o.set.appdata;break;case"set":o.set.name=o.set.appdata.split("=")[0],o.set.value=o.set.appdata.split("=")[1];break;case"agi":o.set.project=o.set.appdata;break;default:var r=o.set.appdata.split("=");o.set.name=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.set.value=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}function l(e){t.hide(e)}o.set.type&&"outbound"===o.set.type.toLowerCase()&&"outbounddial"===o.set.appType.toLowerCase()&&(o.set.prefix=o.set.phone?o.set.phone.split("$")[0]:void 0,o.set.callerId=o.set.callerID?"CALLERID(all)="+o.set.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.set.type&&"outbound"===o.set.type.toLowerCase()&&"outboundDial"===o.set.appType&&(o.set.phone=a.cutdigits?(o.set.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.set.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.set.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.set.options+="U(xcally-mixmonitor-context)"):o.set.options=o.set.options.replace("U(xcally-mixmonitor-context)",""));if(o.set.appType&&"custom"===o.set.appType);else switch((o.set.app||o.set.appType).toLowerCase()){case"set":o.set.appdata=o.set.name+"="+o.set.value;break;case"custom":break;default:e[0]=o.set.name,e[1]=o.set.value,o.set.appdata=e.join("=")}l(o.set)},o.closeDialog=l,i.variable.get({fields:"name",sort:"name"}).$promise.then(function(e){o.variables=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvariables",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppsetDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.voicemail=angular.copy(e),o.voicemail.appdata)switch(o.voicemail.appType?o.voicemail.appType.toLowerCase():o.voicemail.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.voicemail.appdata.split(",");o.voicemail.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.voicemail.text=s.slice(1,s.length).join(",");break;case"message":o.voicemail.text=o.voicemail.appdata;break;case"set":o.voicemail.name=o.voicemail.appdata.split("=")[0],o.voicemail.value=o.voicemail.appdata.split("=")[1];break;case"agi":o.voicemail.project=o.voicemail.appdata;break;default:var r=o.voicemail.appdata.split(",");o.voicemail.voiceMail=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.voicemail.options=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}function l(e){t.hide(e)}o.voicemail.type&&"outbound"===o.voicemail.type.toLowerCase()&&"outbounddial"===o.voicemail.appType.toLowerCase()&&(o.voicemail.prefix=o.voicemail.phone?o.voicemail.phone.split("$")[0]:void 0,o.voicemail.callerId=o.voicemail.callerID?"CALLERID(all)="+o.voicemail.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.voicemail.type&&"outbound"===o.voicemail.type.toLowerCase()&&"outboundDial"===o.voicemail.appType&&(o.voicemail.phone=a.cutdigits?(o.voicemail.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.voicemail.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.voicemail.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.voicemail.options+="U(xcally-mixmonitor-context)"):o.voicemail.options=o.voicemail.options.replace("U(xcally-mixmonitor-context)",""));if(o.voicemail.appType&&"custom"===o.voicemail.appType);else switch((o.voicemail.app||o.voicemail.appType).toLowerCase()){case"set":o.voicemail.appdata=o.voicemail.name+"="+o.voicemail.value;break;case"custom":break;default:e[0]=o.voicemail.voiceMail,e[1]=o.voicemail.options,o.voicemail.appdata=e.join(",")}l(o.voicemail)},o.closeDialog=l,i.voiceMail.get({fields:"mailbox",sort:"mailbox"}).$promise.then(function(e){o.voiceMails=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceMails",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppvoicemailDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.inboundroute=d||e.params.inboundroute||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoInboundRoutes=function(){e.go("app.voice.inboundroutes")},c.saveInboundRoute=function(){s.voiceExtension.update({id:c.inboundroute.id},c.inboundroute).$promise.then(function(){r.success({title:"InboundRoute updated!",msg:c.inboundroute.name?c.inboundroute.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceExtension",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){c.contexts=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","inboundroute"],angular.module("app.voice").controller("InboundRouteController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.inboundroutes=r||{count:0,rows:[]},v.table="inboundroutes",v.listOrder="",v.listOrderAsc=null,v.selectedInboundRoutes=[],v.query={fields:"createdAt,updatedAt,id,appdata,type,exten,context,description",type:"inbound",sort:"-updatedAt",VoiceExtensionId:"null",limit:10,page:1},v.editstate=function(e,t){n.go("app.voice.inboundroutes.edit",{id:e.id,inboundroute:e})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the inboundroute?").htmlContent("<b>"+(e.name||"inboundroute")+"</b> will be deleted.").ariaLabel("delete inboundroute").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getInboundRoutes=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.voiceExtension.get(v.query,f).$promise},v.createOrEditInboundRoute=function(e,t){i.show({controller:"CreateOrEditInboundRouteDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/inboundroutes/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{inboundroute:t,inboundroutes:v.inboundroutes.rows,license:v.license,setting:v.setting}})},v.deleteInboundRoute=A,v.exportSelectedInboundRoutes=function(){var e=angular.copy(v.selectedInboundRoutes);return v.selectedInboundRoutes=[],e},v.deleteSelectedInboundRoutes=function(e){var t=i.confirm().title("Are you sure want to delete the selected inboundroutes?").htmlContent("<b>"+v.selectedInboundRoutes.length+" selected</b> will be deleted.").ariaLabel("delete InboundRoutes").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedInboundRoutes.forEach(function(e){A(e)}),v.selectedInboundRoutes=[]})},v.deselectInboundRoutes=function(){v.selectedInboundRoutes=[]},v.selectAllInboundRoutes=function(){v.selectedInboundRoutes=v.inboundroutes.rows},l.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){v.contexts=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.inboundroutes=e||{count:0,rows:[]}}function A(e){l.voiceExtension.delete({id:e.id}).$promise.then(function(){_.remove(v.inboundroutes.rows,{id:e.id}),v.inboundroutes.count-=1,v.inboundroutes.rows.length||v.getInboundRoutes(),c.success({title:"InboundRoute deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvoiceExtension"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvoiceExtension",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getInboundRoutes())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","inboundroutes","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.voice").controller("InboundRoutesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="VOICE.EDIT_INTERNALROUTE",m.internalroute=angular.copy(s),m.internalroutes=o,m.newInternalRoute=!1,m.internalroute||(m.internalroute={appdata:"Internal Call",type:"internal",context:"from-sip"},m.title="VOICE.NEW_INTERNALROUTE",m.newInternalRoute=!0),m.addNewInternalRoute=function(){m.errors=[],r.voiceExtension.save(m.internalroute).$promise.then(function(e){m.internalroutes.unshift(e.toJSON()),i.success({title:"InternalRoute properly created",msg:m.internalroute.name?m.internalroute.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceExtension.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceExtension.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveInternalRoute=function(){m.errors=[],r.voiceExtension.update({id:m.internalroute.id},m.internalroute).$promise.then(function(e){var t=_.find(m.internalroutes,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"InternalRoute properly saved!",msg:m.internalroute.name?m.internalroute.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceExtension.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceExtension.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteInternalRoute=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The internalroute will be deleted.").ariaLabel("Delete InternalRoute").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceExtension.delete({id:m.internalroute.id}).$promise.then(function(){_.remove(m.internalroutes,{id:m.internalroute.id}),i.success({title:"InternalRoute properly deleted!",msg:(m.internalroute.name||"internalroute")+" has been deleted!"}),u(m.internalroute)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceExtension.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceExtension.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){m.contexts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","internalroutes","internalroute","api","Auth","license","setting"],angular.module("app.voice").controller("CreateOrEditInternalRouteDialogController",e)}(),function(){"use strict";function e(m,i,a,o,e){var u=this;function t(e,t){if(u.internalrouteApps.rows.length){var n=u.internalrouteApps.rows[t]?u.internalrouteApps.rows[t]:u.internalrouteApps.rows[0];i.show({controller:"EditInternalApp"+(n.appType||n.app).toLowerCase()+"DialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/internalroutes/edit/apps/"+(n.appType||n.app).toLowerCase()+"/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{internalrouteApp:n,internalroute:u.internalroute}}).then(function(e){e&&(e.id?u.internalrouteApps.rows[t]=e:u.internalrouteApps.rows.splice(t,0,e),s())}).catch(function(e){e&&o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:EDITMODALSHOW",msg:e.data?JSON.stringify(e.data):e.toString()})})}}function s(){var e=["queue","playback"],t=2,n=[];n.push({type:"internal",app:"Set",appdata:"CDR(type)=internal",context:u.internalroute.context,exten:u.internalroute.exten,priority:t++,VoiceExtensionId:u.internalroute.id}),n.push({type:"internal",app:"Set",appdata:"XCALLY-MOTION-ANSWER=0",context:u.internalroute.context,exten:u.internalroute.exten,priority:t++,VoiceExtensionId:u.internalroute.id}),n.push({type:"internal",app:"Set",appdata:"XCALLY-MOTION-PROGRESS=0",context:u.internalroute.context,exten:u.internalroute.exten,priority:t++,VoiceExtensionId:u.internalroute.id}),n.push({type:"internal",app:"Set",appdata:"MONITOR_OPTIONS=ab",context:u.internalroute.context,exten:u.internalroute.exten,priority:t++,VoiceExtensionId:u.internalroute.id});for(var a=0,i=0;a<u.internalrouteApps.rows.length;a++,i=0){var o=u.internalrouteApps.rows[a],s=[],r=[];o.intervals="*,*,*,*"!==o.interval?[o.interval]:o.IntervalId?_.map(_.filter(u.intervals.rows,{IntervalId:o.IntervalId}),"interval"):[],o.context=u.internalroute.context,o.exten=u.internalroute.exten,o.type&&(o.type=o.type.toLowerCase()),o.hasOwnProperty("answer")&&e.includes(o.app.toLowerCase())&&"custom"!==o.appType&&(o.answer?(s.push({type:o.type.toLowerCase(),app:"ExecIf",appdata:"$[${XCALLY-MOTION-ANSWER}=0]?Answer",context:u.internalroute.context,exten:u.internalroute.exten,priority:o.intervals.length+t+i++,VoiceExtensionId:u.internalroute.id}),s.push({type:o.type.toLowerCase(),app:"Set",appdata:"XCALLY-MOTION-ANSWER=1",context:u.internalroute.context,exten:u.internalroute.exten,priority:o.intervals.length+t+i++,VoiceExtensionId:u.internalroute.id})):(s.push({type:o.type.toLowerCase(),app:"ExecIf",appdata:"$[${XCALLY-MOTION-PROGRESS}=0]?Progress",context:u.internalroute.context,exten:u.internalroute.exten,priority:o.intervals.length+t+i++,VoiceExtensionId:u.internalroute.id}),s.push({type:o.type.toLowerCase(),app:"Set",appdata:"XCALLY-MOTION-PROGRESS=1",context:u.internalroute.context,exten:u.internalroute.exten,priority:o.intervals.length+t+i++,VoiceExtensionId:u.internalroute.id})));for(var l=0;l<o.intervals.length;l++){var d=t+o.intervals.length,c=l===o.intervals.length-1?t+s.length+r.length+2:t+l+1;s.splice(l,0,{type:"internal",app:"GotoIfTime",appdata:o.intervals[l]+"?"+u.internalroute.context+",${EXTEN},"+d+":"+u.internalroute.context+",${EXTEN},"+c,exten:u.internalroute.exten,context:u.internalroute.context,priority:t+l,VoiceExtensionId:u.internalroute.id})}o.priority=s.length?_.last(s).priority+1:t,t=(r.length?_.last(r).priority:o.priority)+1,n=_.concat(n,s,[o],r)}n.push({type:"internal",app:"Hangup",exten:u.internalroute.exten,context:u.internalroute.context,priority:t,VoiceExtensionId:u.internalroute.id}),m.voiceExtension.addApplications({id:u.internalroute.id},_.sortBy(n,"priority")).$promise.then(function(e){u.internalrouteApps.rows=e.rows}).catch(function(e){console.error(e)})}function n(e){u.internalrouteApps=e||{count:0,rows:[]}}u.currentUser=e.getCurrentUser(),u.internalroute={},u.internalrouteApps={count:0,rows:[]},u.selectedInternalRouteApps=[],u.query={sort:"priority"},u.apps=_.reject(_.sortBy([{app:"Interval",appType:"interval",type:"Internal",types:["always","custom","list"],fields:[],isApp:!1},{app:"Queue",appType:"queue",context:"from-sip",type:"Internal",options:"xX",appdata:",xX,,,300,,,,,",icon:"icon-apps",interval:"*,*,*,*",answer:!0,isApp:!0,extraApi:[{name:"sounds",route:"sound",filters:{fields:"name,save_name",sort:"name"}},{name:"queues",route:"voiceQueue",filters:{type:"inbound",fields:"id,name,type",sort:"name",nolimit:!0}}],fields:[{title:"Queue",name:"queue",type:"apiselect",values:"queues",value:"queue.name",option:"queue.name",required:!0,param:0},{title:"Options",name:"options",type:"text",param:1},{title:"Url",name:"URL",type:"text",param:2},{title:"Announce_Overrides",name:"sound",type:"apiselect",values:"sounds",value:"'/var/opt/motion2/server/files/sounds/converted/{{sound.save_name}}'",option:"sound.name",defaultValues:[{value:"''",option:"None"}],param:3},{title:"Timeout",name:"timeout",type:"number",min:0,param:4},{title:"Agi",name:"agi",type:"text",param:5},{title:"Macro",name:"macro",type:"text",param:6},{title:"GoSub",name:"gosub",type:"text",param:7},{title:"Rule",name:"rule",type:"text",param:8},{title:"Position",name:"position",type:"number",min:0,param:9},{title:"Answer",name:"answer",type:"switch",general:!0}]},{app:"Playback",appType:"playback",context:"from-sip",type:"Internal",icon:"icon-apps",interval:"*,*,*,*",answer:!0,isApp:!0,extraApi:[{name:"sounds",route:"sound",filters:{fields:"name,save_name",sort:"name"}}],fields:[{title:"Audio_Files",name:"appdata",type:"apiselect",values:"sounds",value:"'/var/opt/motion2/server/files/sounds/converted/{{appdata.save_name}}'",option:"appdata.name",required:!0,param:0},{title:"Options",name:"options",type:"text",param:1},{title:"Answer",name:"answer",type:"switch",general:!0}]},{app:"Dial",appType:"dial",context:"from-sip",type:"Internal",icon:"icon-apps",options:"xX",interval:"*,*,*,*",isApp:!0,fields:[{title:"Technology/Resource",name:"tech",type:"text",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",min:0,param:1},{title:"Options",name:"options",type:"text",param:2},{title:"Url",name:"url",type:"text",param:3}]},{app:"Dial",appType:"internalDial",context:"from-sip",type:"Internal",icon:"icon-apps",options:"xX",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"users",route:"user",filters:{fields:"name",sort:"name"}}],fields:[{title:"User",name:"user",type:"apiselect",values:"users",value:"'SIP/{{user.name}}'",option:"user.name",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",min:0,param:1},{title:"Options",name:"options",type:"text",param:2},{title:"Url",name:"url",type:"text",param:3}]},{app:"Dial",appType:"externalDial",context:"from-sip",type:"Internal",icon:"icon-apps",interval:"*,*,*,*",options:"xX",isApp:!0,extraApi:[{name:"trunks",route:"trunk",filters:{fields:"name",sort:"name"}}],fields:[{title:"Trunk",name:"trunk",type:"apiselect",values:"trunks",value:"trunk.name",option:"trunk.name",required:!0,param:0},{title:"Phone",name:"phone",type:"text"},{title:"Timeout",name:"timeout",type:"number",min:0,param:1},{title:"Options",name:"options",type:"text",param:2},{title:"Url",name:"url",type:"text",param:3}]},{app:"Dial",appType:"ringGroup",context:"from-sip",type:"Internal",icon:"icon-apps",interval:"*,*,*,*",options:"xX",isApp:!0,extraApi:[{name:"users",route:"user",filters:{fields:"name",sort:"name"}}],fields:[{title:"User",name:"multipleUsers",type:"apiselect",multiple:!0,values:"users",value:"'SIP/{{multipleUsers.name}}'",option:"multipleUsers.name",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",min:0,param:1},{title:"Options",name:"options",type:"text",param:2},{title:"Url",name:"url",type:"text",param:3}]},{app:"AGI",alias:"CallySquare",appType:"agi",context:"from-sip",type:"Internal",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"projects",route:"squareProject",filters:{fields:"name",sort:"name"}}],fields:[{title:"Project",name:"project",type:"apiselect",values:"projects",value:"'agi://127.0.0.1/square,{{project.name}}'",option:"project.name",required:!0,param:0}]},{app:"goto",appType:"goTo",context:"from-sip",type:"Internal",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"contexts",route:"voiceContext",filters:{fields:"name",sort:"name"}}],fields:[{title:"Context",name:"context",type:"apiselect",values:"contexts",value:"context.name",option:"context.name",required:!0,param:0},{title:"Extension",name:"extension",type:"text",required:!0,param:1},{title:"Priority",name:"priority",type:"text",required:!0,param:2}]},{app:"hangup",appType:"hangup",context:"from-sip",type:"Internal",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Hangup_Cause",name:"appdata",type:"select",param:0,values:[{option:"HANGUPCAUSE_1",value:"'1'"},{option:"HANGUPCAUSE_16",value:"'16'"},{option:"HANGUPCAUSE_17",value:"'17'"},{option:"HANGUPCAUSE_18",value:"'18'"},{option:"HANGUPCAUSE_21",value:"'21'"},{option:"HANGUPCAUSE_22",value:"'22'"},{option:"HANGUPCAUSE_27",value:"'27'"},{option:"HANGUPCAUSE_38",value:"'38'"},{option:"HANGUPCAUSE_41",value:"'41'"}],translate:!0,required:!0,general:!0}]},{app:"Set",appType:"set",context:"from-sip",type:"Internal",separator:"=",icon:"icon-apps",interval:"*,*,*,*",extraApi:[{name:"variables",route:"variable",filters:{fields:"name",sort:"name"}}],isApp:!0,fields:[{title:"Variable",name:"name",type:"apiselect",values:"variables",value:"name.name",option:"name.name",required:!0,param:0},{title:"Value",name:"value",type:"text",required:!0,param:1}]},{app:null,appType:"custom",icon:"icon-apps",type:"Internal",interval:"*,*,*,*",isApp:!0,fields:[{title:"Application_Name",name:"app",type:"text",required:!0,param:0},{title:"Arguments",name:"appdata",type:"text",param:1}]},{app:"Voicemail",appType:"voicemail",context:"from-sip",icon:"icon-apps",type:"Internal",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"voiceMails",route:"voiceMail",filters:{fields:"mailbox",sort:"mailbox"}}],fields:[{title:"Mailbox@Context",name:"voiceMail",type:"apiselect",values:"voiceMails",value:"'{{voiceMail.mailbox}}@from-voicemail'",option:"voiceMail.mailbox",required:!0,param:0},{title:"Options",name:"options",type:"text",param:1}]}],["app"]),{isApp:!1}),u.list={group:{name:"opt1",pull:"clone"},animation:100,sort:!1},u.applications={group:{name:"opt2",put:"opt1"},animation:100,onAdd:function(e){t(e,e.newIndex)},onSort:function(e){s()}},u.init=function(e){u.internalroute=e,u.query.VoiceExtensionId=e.id,u.query.isApp=!0,u.query.nolimit=!0,u.getInternalRouteApps(),u.getIntervals()},u.deleteConfirm=function(e,t,n){var a=i.confirm().title("Are you sure want to delete the application?").htmlContent("<b>"+e.app+"</b> will be deleted.").ariaLabel("delete application").targetEvent(n).ok("OK").cancel("CANCEL");i.show(a).then(function(){u.internalrouteApps.rows.splice(t,1),s()},function(){console.log("CANCEL")})},u.getInternalRouteApps=function(){u.promise=m.voiceExtension.get(u.query,n).$promise},u.editInternalRouteApp=t,u.editInterval=function(e,t){if(u.internalrouteApps.rows.length){var n=u.internalrouteApps.rows[t]?u.internalrouteApps.rows[t]:u.internalrouteApps.rows[0];i.show({controller:"EditInternalAppintervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/internalroutes/edit/apps/interval/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:{interval:n.interval,IntervalId:n.IntervalId,application:!0},intervals:[]}}).then(function(e){e&&(n.interval=e.interval||"*,*,*,*",n.IntervalId=e.IntervalId||null,s())})}},u.deleteInternalRouteApp=function(e){_.remove(u.internalrouteApps.rows,{id:e.id}),s(),o.success({title:"App deleted!",msg:e.app?e.app+" has been deleted!":""})},u.deleteSelectedInternalRouteApps=function(e){var t=i.confirm().title("Are you sure want to delete the selected applications?").htmlContent("<b>"+u.selectedInternalRouteApps.length+" selected</b> will be deleted.").ariaLabel("delete applications").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){u.selectedInternalRouteApps.forEach(function(e){_.remove(u.internalrouteApps.rows,{id:e.id})}),u.selectedInternalRouteApps=[],s()})},u.rewriteRouting=s,u.getIntervals=function(){return m.interval.get({fields:"id,interval,IntervalId"}).$promise.then(function(e){u.intervals=e}).catch(function(e){console.error(e)})}}e.$inject=["api","$mdDialog","$document","toasty","Auth"],angular.module("app.voice").controller("InternalRouteActionsController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.agi=angular.copy(e),o.agi.appdata)switch(o.agi.appType?o.agi.appType.toLowerCase():o.agi.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.agi.appdata.split(",");o.agi.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.agi.text=s.slice(1,s.length).join(",");break;case"message":o.agi.text=o.agi.appdata;break;case"set":o.agi.name=o.agi.appdata.split("=")[0],o.agi.value=o.agi.appdata.split("=")[1];break;case"agi":o.agi.project=o.agi.appdata;break;default:var r=o.agi.appdata.split(",");o.agi.project=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.agi.type&&"outbound"===o.agi.type.toLowerCase()&&"outbounddial"===o.agi.appType.toLowerCase()&&(o.agi.prefix=o.agi.phone?o.agi.phone.split("$")[0]:void 0,o.agi.callerId=o.agi.callerID?"CALLERID(all)="+o.agi.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.agi.type&&"outbound"===o.agi.type.toLowerCase()&&"outboundDial"===o.agi.appType&&(o.agi.phone=a.cutdigits?(o.agi.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.agi.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.agi.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.agi.options+="U(xcally-mixmonitor-context)"):o.agi.options=o.agi.options.replace("U(xcally-mixmonitor-context)",""));if(o.agi.appType&&"custom"===o.agi.appType);else switch((o.agi.app||o.agi.appType).toLowerCase()){case"set":o.agi.appdata=o.agi.name+"="+o.agi.value;break;case"custom":break;default:e[0]=o.agi.project,o.agi.appdata=e.join(",")}l(o.agi)},o.closeDialog=l,i.squareProject.get({fields:"name",sort:"name"}).$promise.then(function(e){o.projects=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETprojects",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppagiDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(n.appType||n.app).toUpperCase(),o.custom=angular.copy(n),o.custom.appdata)switch(o.custom.appType?o.custom.appType.toLowerCase():o.custom.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.custom.appdata.split(",");o.custom.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.custom.text=s.slice(1,s.length).join(",");break;case"message":o.custom.text=o.custom.appdata;break;case"set":o.custom.name=o.custom.appdata.split("=")[0],o.custom.value=o.custom.appdata.split("=")[1];break;case"agi":o.custom.project=o.custom.appdata;break;default:var r=o.custom.appdata.split(",");o.custom.app=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.custom.appdata=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}function l(e){t.hide(e)}o.custom.type&&"outbound"===o.custom.type.toLowerCase()&&"outbounddial"===o.custom.appType.toLowerCase()&&(o.custom.prefix=o.custom.phone?o.custom.phone.split("$")[0]:void 0,o.custom.callerId=o.custom.callerID?"CALLERID(all)="+o.custom.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.custom.type&&"outbound"===o.custom.type.toLowerCase()&&"outboundDial"===o.custom.appType&&(o.custom.phone=a.cutdigits?(o.custom.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.custom.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.custom.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.custom.options+="U(xcally-mixmonitor-context)"):o.custom.options=o.custom.options.replace("U(xcally-mixmonitor-context)",""));if(o.custom.appType&&"custom"===o.custom.appType);else switch((o.custom.app||o.custom.appType).toLowerCase()){case"set":o.custom.appdata=o.custom.name+"="+o.custom.value;break;case"custom":break;default:e[0]=o.custom.app,e[1]=o.custom.appdata,o.custom.appdata=e.join(",")}l(o.custom)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppcustomDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(n.appType||n.app).toUpperCase(),o.dial=angular.copy(n),o.dial.appdata)switch(o.dial.appType?o.dial.appType.toLowerCase():o.dial.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.dial.appdata.split(",");o.dial.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.dial.text=s.slice(1,s.length).join(",");break;case"message":o.dial.text=o.dial.appdata;break;case"set":o.dial.name=o.dial.appdata.split("=")[0],o.dial.value=o.dial.appdata.split("=")[1];break;case"agi":o.dial.project=o.dial.appdata;break;default:var r=o.dial.appdata.split(",");o.dial.tech=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.dial.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.dial.options=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.dial.url=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10)}function l(e){t.hide(e)}o.dial.type&&"outbound"===o.dial.type.toLowerCase()&&"outbounddial"===o.dial.appType.toLowerCase()&&(o.dial.prefix=o.dial.phone?o.dial.phone.split("$")[0]:void 0,o.dial.callerId=o.dial.callerID?"CALLERID(all)="+o.dial.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.dial.type&&"outbound"===o.dial.type.toLowerCase()&&"outboundDial"===o.dial.appType&&(o.dial.phone=a.cutdigits?(o.dial.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.dial.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.dial.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.dial.options+="U(xcally-mixmonitor-context)"):o.dial.options=o.dial.options.replace("U(xcally-mixmonitor-context)",""));if(o.dial.appType&&"custom"===o.dial.appType);else switch((o.dial.app||o.dial.appType).toLowerCase()){case"set":o.dial.appdata=o.dial.name+"="+o.dial.value;break;case"custom":break;default:e[0]=o.dial.tech,e[1]=o.dial.timeout,e[2]=o.dial.options,e[3]=o.dial.url,o.dial.appdata=e.join(",")}l(o.dial)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppdialDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.externaldial=angular.copy(e),o.externaldial.appdata)switch(o.externaldial.appType?o.externaldial.appType.toLowerCase():o.externaldial.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.externaldial.appdata.split(",");o.externaldial.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.externaldial.text=s.slice(1,s.length).join(",");break;case"message":o.externaldial.text=o.externaldial.appdata;break;case"set":o.externaldial.name=o.externaldial.appdata.split("=")[0],o.externaldial.value=o.externaldial.appdata.split("=")[1];break;case"agi":o.externaldial.project=o.externaldial.appdata;break;default:var r=o.externaldial.appdata.split(",");o.externaldial.trunk=r[0].split("/")[1],o.externaldial.phone=r[0].split("/")[2],o.externaldial.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.externaldial.options=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.externaldial.url=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10)}function l(e){t.hide(e)}o.externaldial.type&&"outbound"===o.externaldial.type.toLowerCase()&&"outbounddial"===o.externaldial.appType.toLowerCase()&&(o.externaldial.prefix=o.externaldial.phone?o.externaldial.phone.split("$")[0]:void 0,o.externaldial.callerId=o.externaldial.callerID?"CALLERID(all)="+o.externaldial.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.externaldial.type&&"outbound"===o.externaldial.type.toLowerCase()&&"outboundDial"===o.externaldial.appType&&(o.externaldial.phone=a.cutdigits?(o.externaldial.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.externaldial.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.externaldial.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.externaldial.options+="U(xcally-mixmonitor-context)"):o.externaldial.options=o.externaldial.options.replace("U(xcally-mixmonitor-context)",""));if(o.externaldial.appType&&"custom"===o.externaldial.appType);else switch((o.externaldial.app||o.externaldial.appType).toLowerCase()){case"set":o.externaldial.appdata=o.externaldial.name+"="+o.externaldial.value;break;case"custom":break;default:e[0]=["SIP",o.externaldial.trunk,o.externaldial.phone].join("/"),e[1]=o.externaldial.timeout,e[2]=o.externaldial.options,e[3]=o.externaldial.url,o.externaldial.appdata=e.join(",")}l(o.externaldial)},o.closeDialog=l,i.trunk.get({fields:"name",sort:"name"}).$promise.then(function(e){o.trunks=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppexternaldialDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.goto=angular.copy(e),o.goto.appdata)switch(o.goto.appType?o.goto.appType.toLowerCase():o.goto.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.goto.appdata.split(",");o.goto.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.goto.text=s.slice(1,s.length).join(",");break;case"message":o.goto.text=o.goto.appdata;break;case"set":o.goto.name=o.goto.appdata.split("=")[0],o.goto.value=o.goto.appdata.split("=")[1];break;case"agi":o.goto.project=o.goto.appdata;break;default:var r=o.goto.appdata.split(",");o.goto.context=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.goto.extension=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.goto.priority=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10)}function l(e){t.hide(e)}o.goto.type&&"outbound"===o.goto.type.toLowerCase()&&"outbounddial"===o.goto.appType.toLowerCase()&&(o.goto.prefix=o.goto.phone?o.goto.phone.split("$")[0]:void 0,o.goto.callerId=o.goto.callerID?"CALLERID(all)="+o.goto.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.goto.type&&"outbound"===o.goto.type.toLowerCase()&&"outboundDial"===o.goto.appType&&(o.goto.phone=a.cutdigits?(o.goto.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.goto.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.goto.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.goto.options+="U(xcally-mixmonitor-context)"):o.goto.options=o.goto.options.replace("U(xcally-mixmonitor-context)",""));if(o.goto.appType&&"custom"===o.goto.appType);else switch((o.goto.app||o.goto.appType).toLowerCase()){case"set":o.goto.appdata=o.goto.name+"="+o.goto.value;break;case"custom":break;default:e[0]=o.goto.context,e[1]=o.goto.extension,e[2]=o.goto.priority,o.goto.appdata=e.join(",")}l(o.goto)},o.closeDialog=l,i.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){o.contexts=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppgotoDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(n.appType||n.app).toUpperCase(),o.hangup=angular.copy(n),o.hangup.appdata)switch(o.hangup.appType?o.hangup.appType.toLowerCase():o.hangup.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.hangup.appdata.split(",");o.hangup.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.hangup.text=s.slice(1,s.length).join(",");break;case"message":o.hangup.text=o.hangup.appdata;break;case"set":o.hangup.name=o.hangup.appdata.split("=")[0],o.hangup.value=o.hangup.appdata.split("=")[1];break;case"agi":o.hangup.project=o.hangup.appdata;break;default:var r=o.hangup.appdata.split(",");o.hangup.appdata=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.hangup.type&&"outbound"===o.hangup.type.toLowerCase()&&"outbounddial"===o.hangup.appType.toLowerCase()&&(o.hangup.prefix=o.hangup.phone?o.hangup.phone.split("$")[0]:void 0,o.hangup.callerId=o.hangup.callerID?"CALLERID(all)="+o.hangup.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.hangup.type&&"outbound"===o.hangup.type.toLowerCase()&&"outboundDial"===o.hangup.appType&&(o.hangup.phone=a.cutdigits?(o.hangup.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.hangup.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.hangup.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.hangup.options+="U(xcally-mixmonitor-context)"):o.hangup.options=o.hangup.options.replace("U(xcally-mixmonitor-context)",""));if(o.hangup.appType&&"custom"===o.hangup.appType);else switch((o.hangup.app||o.hangup.appType).toLowerCase()){case"set":o.hangup.appdata=o.hangup.name+"="+o.hangup.value;break;case"custom":break;default:e[0]=o.hangup.appdata,o.hangup.appdata=e.join(",")}l(o.hangup)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalApphangupDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.internaldial=angular.copy(e),o.internaldial.appdata)switch(o.internaldial.appType?o.internaldial.appType.toLowerCase():o.internaldial.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.internaldial.appdata.split(",");o.internaldial.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.internaldial.text=s.slice(1,s.length).join(",");break;case"message":o.internaldial.text=o.internaldial.appdata;break;case"set":o.internaldial.name=o.internaldial.appdata.split("=")[0],o.internaldial.value=o.internaldial.appdata.split("=")[1];break;case"agi":o.internaldial.project=o.internaldial.appdata;break;default:var r=o.internaldial.appdata.split(",");o.internaldial.user=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.internaldial.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.internaldial.options=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.internaldial.url=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10)}function l(e){t.hide(e)}o.internaldial.type&&"outbound"===o.internaldial.type.toLowerCase()&&"outbounddial"===o.internaldial.appType.toLowerCase()&&(o.internaldial.prefix=o.internaldial.phone?o.internaldial.phone.split("$")[0]:void 0,o.internaldial.callerId=o.internaldial.callerID?"CALLERID(all)="+o.internaldial.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.internaldial.type&&"outbound"===o.internaldial.type.toLowerCase()&&"outboundDial"===o.internaldial.appType&&(o.internaldial.phone=a.cutdigits?(o.internaldial.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.internaldial.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.internaldial.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.internaldial.options+="U(xcally-mixmonitor-context)"):o.internaldial.options=o.internaldial.options.replace("U(xcally-mixmonitor-context)",""));if(o.internaldial.appType&&"custom"===o.internaldial.appType);else switch((o.internaldial.app||o.internaldial.appType).toLowerCase()){case"set":o.internaldial.appdata=o.internaldial.name+"="+o.internaldial.value;break;case"custom":break;default:e[0]=o.internaldial.user,e[1]=o.internaldial.timeout,e[2]=o.internaldial.options,e[3]=o.internaldial.url,o.internaldial.appdata=e.join(",")}l(o.internaldial)},o.closeDialog=l,i.user.get({fields:"name",sort:"name"}).$promise.then(function(e){o.users=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETusers",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppinternaldialDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;if(l.errors=[],l.title="TOOLS.EDIT_INTERVAL",l.interval=angular.copy(i),l.intervals=o,l.newInterval=!1,l.types=["always","custom","list"],l.daysOfWeek=a.getDaysOfWeek(),l.monthNumber=a.getMonthNumber(),l.monthName=a.getMonthName(),l.daysOfMonth=a.getDaysOfMonth(),l.interval)if("*,*,*,*"!==l.interval.interval){l.type="custom";var d=l.interval.interval.split(","),c=d[0],m=d[1],u=d[2],p=d[3];if("*"!==c){var g,v=c.split("-")[0],h=c.split("-")[1];(g=new Date).setHours(Number(v.split(":")[0])),g.setMinutes(Number(v.split(":")[1])),l.timeRangeFrom=g,(g=new Date).setHours(Number(h.split(":")[0])),g.setMinutes(Number(h.split(":")[1])),l.timeRangeTo=g}"*"!==m&&(l.dayOfWeekFrom=m.split("-")[0],l.dayOfWeekTo=m.split("-")[1]),"*"!==u&&(l.monthDayFrom=u.split("-")[0],l.monthDayTo=u.split("-")[1]),"*"!==p&&(l.monthFrom=p.split("-")[0],l.monthTo=p.split("-")[1])}else l.type="always";else l.interval={interval:"*,*,*,*"},l.type="always",l.title="TOOLS.NEW_INTERVAL",l.newInterval=!0;function b(){switch(l.type){case"always":case"list":return"*,*,*,*";case"custom":var e=[];if("*"!==l.timeRangeFrom&&l.timeRangeFrom&&l.timeRangeTo){var t=(l.timeRangeFrom.getHours()<10?"0":"")+l.timeRangeFrom.getHours()+":"+(l.timeRangeFrom.getMinutes()<10?"0":"")+l.timeRangeFrom.getMinutes(),n=(l.timeRangeTo.getHours()<10?"0":"")+l.timeRangeTo.getHours()+":"+(l.timeRangeTo.getMinutes()<10?"0":"")+l.timeRangeTo.getMinutes();e.push(t+"-"+n)}else e.push("*");return l.dayOfWeekFrom?l.dayOfWeekTo?e.push(l.dayOfWeekFrom+"-"+l.dayOfWeekTo):e.push(l.dayOfWeekFrom):e.push("*"),l.monthDayFrom?l.monthDayTo?e.push(l.monthDayFrom+"-"+l.monthDayTo):e.push(l.monthDayFrom):e.push("*"),l.monthFrom?l.monthTo?e.push(l.monthFrom+"-"+l.monthTo):e.push(l.monthFrom):e.push("*"),e.join()}}function f(e){t.hide(e)}e.params.id&&!l.interval.application&&(l.interval.IntervalId=e.params.id),l.interval.IntervalId&&l.interval.application&&(l.type="list"),l.addNewInterval=function(){l.errors=[],l.interval.interval=b(),r.interval.save(l.interval).$promise.then(function(e){l.intervals.push(e),s.success({title:"Interval properly created",msg:l.interval.name?l.interval.name+" has been created!":""}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}]})},l.saveInterval=function(){l.errors=[],l.interval.interval=b(),l.interval.application?("list"!==l.type&&(l.interval.IntervalId=null),f(l.interval)):r.interval.update({id:l.interval.id},l.interval).$promise.then(function(e){var t=_.find(l.intervals,{id:e.id});t&&_.merge(t,e),s.success({title:"Interval properly saved!",msg:"Interval has been saved!"}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}]})},l.closeDialog=f,l.interval.application&&r.interval.get({fields:"id,name,interval,IntervalId",IntervalId:"null",nolimit:!0}).$promise.then(function(e){l.intervals=e}).catch(function(e){console.error(e)})}e.$inject=["$state","$mdDialog","$mdToast","IndexFactory","interval","intervals","toasty","api"],angular.module("app.voice").controller("EditInternalAppintervalDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.playback=angular.copy(e),o.playback.appdata)switch(o.playback.appType?o.playback.appType.toLowerCase():o.playback.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.playback.appdata.split(",");o.playback.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.playback.text=s.slice(1,s.length).join(",");break;case"message":o.playback.text=o.playback.appdata;break;case"set":o.playback.name=o.playback.appdata.split("=")[0],o.playback.value=o.playback.appdata.split("=")[1];break;case"agi":o.playback.project=o.playback.appdata;break;default:var r=o.playback.appdata.split(",");o.playback.appdata=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.playback.options=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}function l(e){t.hide(e)}o.playback.type&&"outbound"===o.playback.type.toLowerCase()&&"outbounddial"===o.playback.appType.toLowerCase()&&(o.playback.prefix=o.playback.phone?o.playback.phone.split("$")[0]:void 0,o.playback.callerId=o.playback.callerID?"CALLERID(all)="+o.playback.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.playback.type&&"outbound"===o.playback.type.toLowerCase()&&"outboundDial"===o.playback.appType&&(o.playback.phone=a.cutdigits?(o.playback.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.playback.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.playback.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.playback.options+="U(xcally-mixmonitor-context)"):o.playback.options=o.playback.options.replace("U(xcally-mixmonitor-context)",""));if(o.playback.appType&&"custom"===o.playback.appType);else switch((o.playback.app||o.playback.appType).toLowerCase()){case"set":o.playback.appdata=o.playback.name+"="+o.playback.value;break;case"custom":break;default:e[0]=o.playback.appdata,e[1]=o.playback.options,o.playback.appdata=e.join(",")}l(o.playback)},o.closeDialog=l,i.sound.get({fields:"name,save_name",sort:"name"}).$promise.then(function(e){o.sounds=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsounds",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppplaybackDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.queue=angular.copy(e),o.queue.appdata)switch(o.queue.appType?o.queue.appType.toLowerCase():o.queue.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.queue.appdata.split(",");o.queue.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.queue.text=s.slice(1,s.length).join(",");break;case"message":o.queue.text=o.queue.appdata;break;case"set":o.queue.name=o.queue.appdata.split("=")[0],o.queue.value=o.queue.appdata.split("=")[1];break;case"agi":o.queue.project=o.queue.appdata;break;default:var r=o.queue.appdata.split(",");o.queue.queue=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.queue.options=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.queue.URL=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.queue.sound=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10),o.queue.timeout=_.isEmpty(r[4])?r[4]:isNaN(r[4])?r[4]:parseInt(r[4],10),o.queue.agi=_.isEmpty(r[5])?r[5]:isNaN(r[5])?r[5]:parseInt(r[5],10),o.queue.macro=_.isEmpty(r[6])?r[6]:isNaN(r[6])?r[6]:parseInt(r[6],10),o.queue.gosub=_.isEmpty(r[7])?r[7]:isNaN(r[7])?r[7]:parseInt(r[7],10),o.queue.rule=_.isEmpty(r[8])?r[8]:isNaN(r[8])?r[8]:parseInt(r[8],10),o.queue.position=_.isEmpty(r[9])?r[9]:isNaN(r[9])?r[9]:parseInt(r[9],10)}function l(e){t.hide(e)}o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outbounddial"===o.queue.appType.toLowerCase()&&(o.queue.prefix=o.queue.phone?o.queue.phone.split("$")[0]:void 0,o.queue.callerId=o.queue.callerID?"CALLERID(all)="+o.queue.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outboundDial"===o.queue.appType&&(o.queue.phone=a.cutdigits?(o.queue.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.queue.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.queue.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.queue.options+="U(xcally-mixmonitor-context)"):o.queue.options=o.queue.options.replace("U(xcally-mixmonitor-context)",""));if(o.queue.appType&&"custom"===o.queue.appType);else switch((o.queue.app||o.queue.appType).toLowerCase()){case"set":o.queue.appdata=o.queue.name+"="+o.queue.value;break;case"custom":break;default:e[0]=o.queue.queue,e[1]=o.queue.options,e[2]=o.queue.URL,e[3]=o.queue.sound,e[4]=o.queue.timeout,e[5]=o.queue.agi,e[6]=o.queue.macro,e[7]=o.queue.gosub,e[8]=o.queue.rule,e[9]=o.queue.position,o.queue.appdata=e.join(",")}l(o.queue)},o.closeDialog=l,i.sound.get({fields:"name,save_name",sort:"name"}).$promise.then(function(e){o.sounds=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsounds",msg:e.data?JSON.stringify(e.data):e.toString()})}),i.voiceQueue.get({type:"inbound",fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){o.queues=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppqueueDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.ringgroup=angular.copy(e),o.ringgroup.appdata)switch(o.ringgroup.appType?o.ringgroup.appType.toLowerCase():o.ringgroup.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.ringgroup.appdata.split(",");o.ringgroup.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.ringgroup.text=s.slice(1,s.length).join(",");break;case"message":o.ringgroup.text=o.ringgroup.appdata;break;case"set":o.ringgroup.name=o.ringgroup.appdata.split("=")[0],o.ringgroup.value=o.ringgroup.appdata.split("=")[1];break;case"agi":o.ringgroup.project=o.ringgroup.appdata;break;default:var r=o.ringgroup.appdata.split(",");o.ringgroup.multipleUsers=r[0].split("&"),o.ringgroup.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.ringgroup.options=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.ringgroup.url=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10)}function l(e){t.hide(e)}o.ringgroup.type&&"outbound"===o.ringgroup.type.toLowerCase()&&"outbounddial"===o.ringgroup.appType.toLowerCase()&&(o.ringgroup.prefix=o.ringgroup.phone?o.ringgroup.phone.split("$")[0]:void 0,o.ringgroup.callerId=o.ringgroup.callerID?"CALLERID(all)="+o.ringgroup.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.ringgroup.type&&"outbound"===o.ringgroup.type.toLowerCase()&&"outboundDial"===o.ringgroup.appType&&(o.ringgroup.phone=a.cutdigits?(o.ringgroup.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.ringgroup.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.ringgroup.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.ringgroup.options+="U(xcally-mixmonitor-context)"):o.ringgroup.options=o.ringgroup.options.replace("U(xcally-mixmonitor-context)",""));if(o.ringgroup.appType&&"custom"===o.ringgroup.appType);else switch((o.ringgroup.app||o.ringgroup.appType).toLowerCase()){case"set":o.ringgroup.appdata=o.ringgroup.name+"="+o.ringgroup.value;break;case"custom":break;default:e[0]=o.ringgroup.multipleUsers.join("&"),e[1]=o.ringgroup.timeout,e[2]=o.ringgroup.options,e[3]=o.ringgroup.url,o.ringgroup.appdata=e.join(",")}l(o.ringgroup)},o.closeDialog=l,i.user.get({fields:"name",sort:"name"}).$promise.then(function(e){o.users=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETusers",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppringgroupDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.set=angular.copy(e),o.set.appdata)switch(o.set.appType?o.set.appType.toLowerCase():o.set.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.set.appdata.split(",");o.set.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.set.text=s.slice(1,s.length).join(",");break;case"message":o.set.text=o.set.appdata;break;case"set":o.set.name=o.set.appdata.split("=")[0],o.set.value=o.set.appdata.split("=")[1];break;case"agi":o.set.project=o.set.appdata;break;default:var r=o.set.appdata.split("=");o.set.name=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.set.value=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}function l(e){t.hide(e)}o.set.type&&"outbound"===o.set.type.toLowerCase()&&"outbounddial"===o.set.appType.toLowerCase()&&(o.set.prefix=o.set.phone?o.set.phone.split("$")[0]:void 0,o.set.callerId=o.set.callerID?"CALLERID(all)="+o.set.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.set.type&&"outbound"===o.set.type.toLowerCase()&&"outboundDial"===o.set.appType&&(o.set.phone=a.cutdigits?(o.set.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.set.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.set.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.set.options+="U(xcally-mixmonitor-context)"):o.set.options=o.set.options.replace("U(xcally-mixmonitor-context)",""));if(o.set.appType&&"custom"===o.set.appType);else switch((o.set.app||o.set.appType).toLowerCase()){case"set":o.set.appdata=o.set.name+"="+o.set.value;break;case"custom":break;default:e[0]=o.set.name,e[1]=o.set.value,o.set.appdata=e.join("=")}l(o.set)},o.closeDialog=l,i.variable.get({fields:"name",sort:"name"}).$promise.then(function(e){o.variables=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvariables",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppsetDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.voicemail=angular.copy(e),o.voicemail.appdata)switch(o.voicemail.appType?o.voicemail.appType.toLowerCase():o.voicemail.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.voicemail.appdata.split(",");o.voicemail.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.voicemail.text=s.slice(1,s.length).join(",");break;case"message":o.voicemail.text=o.voicemail.appdata;break;case"set":o.voicemail.name=o.voicemail.appdata.split("=")[0],o.voicemail.value=o.voicemail.appdata.split("=")[1];break;case"agi":o.voicemail.project=o.voicemail.appdata;break;default:var r=o.voicemail.appdata.split(",");o.voicemail.voiceMail=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.voicemail.options=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}function l(e){t.hide(e)}o.voicemail.type&&"outbound"===o.voicemail.type.toLowerCase()&&"outbounddial"===o.voicemail.appType.toLowerCase()&&(o.voicemail.prefix=o.voicemail.phone?o.voicemail.phone.split("$")[0]:void 0,o.voicemail.callerId=o.voicemail.callerID?"CALLERID(all)="+o.voicemail.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.voicemail.type&&"outbound"===o.voicemail.type.toLowerCase()&&"outboundDial"===o.voicemail.appType&&(o.voicemail.phone=a.cutdigits?(o.voicemail.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.voicemail.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.voicemail.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.voicemail.options+="U(xcally-mixmonitor-context)"):o.voicemail.options=o.voicemail.options.replace("U(xcally-mixmonitor-context)",""));if(o.voicemail.appType&&"custom"===o.voicemail.appType);else switch((o.voicemail.app||o.voicemail.appType).toLowerCase()){case"set":o.voicemail.appdata=o.voicemail.name+"="+o.voicemail.value;break;case"custom":break;default:e[0]=o.voicemail.voiceMail,e[1]=o.voicemail.options,o.voicemail.appdata=e.join(",")}l(o.voicemail)},o.closeDialog=l,i.voiceMail.get({fields:"mailbox",sort:"mailbox"}).$promise.then(function(e){o.voiceMails=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceMails",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppvoicemailDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.internalroute=d||e.params.internalroute||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoInternalRoutes=function(){e.go("app.voice.internalroutes")},c.saveInternalRoute=function(){s.voiceExtension.update({id:c.internalroute.id},c.internalroute).$promise.then(function(){r.success({title:"InternalRoute updated!",msg:c.internalroute.name?c.internalroute.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceExtension",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){c.contexts=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","internalroute"],angular.module("app.voice").controller("InternalRouteController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.internalroutes=r||{count:0,rows:[]},v.table="internalroutes",v.listOrder="",v.listOrderAsc=null,v.selectedInternalRoutes=[],v.query={fields:"createdAt,updatedAt,id,appdata,type,exten,context,description",type:"internal",sort:"-updatedAt",VoiceExtensionId:"null",limit:10,page:1},v.editstate=function(e,t){n.go("app.voice.internalroutes.edit",{id:e.id,internalroute:e})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the internalroute?").htmlContent("<b>"+(e.name||"internalroute")+"</b> will be deleted.").ariaLabel("delete internalroute").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getInternalRoutes=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.voiceExtension.get(v.query,f).$promise},v.createOrEditInternalRoute=function(e,t){i.show({controller:"CreateOrEditInternalRouteDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/internalroutes/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{internalroute:t,internalroutes:v.internalroutes.rows,license:v.license,setting:v.setting}})},v.deleteInternalRoute=A,v.exportSelectedInternalRoutes=function(){var e=angular.copy(v.selectedInternalRoutes);return v.selectedInternalRoutes=[],e},v.deleteSelectedInternalRoutes=function(e){var t=i.confirm().title("Are you sure want to delete the selected internalroutes?").htmlContent("<b>"+v.selectedInternalRoutes.length+" selected</b> will be deleted.").ariaLabel("delete InternalRoutes").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedInternalRoutes.forEach(function(e){A(e)}),v.selectedInternalRoutes=[]})},v.deselectInternalRoutes=function(){v.selectedInternalRoutes=[]},v.selectAllInternalRoutes=function(){v.selectedInternalRoutes=v.internalroutes.rows},l.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){v.contexts=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.internalroutes=e||{count:0,rows:[]}}function A(e){l.voiceExtension.delete({id:e.id}).$promise.then(function(){_.remove(v.internalroutes.rows,{id:e.id}),v.internalroutes.count-=1,v.internalroutes.rows.length||v.getInternalRoutes(),c.success({title:"InternalRoute deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvoiceExtension"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvoiceExtension",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getInternalRoutes())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","internalroutes","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.voice").controller("InternalRoutesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="VOICE.EDIT_MUSICONHOLD",m.musiconhold=angular.copy(s),m.musiconholds=o,m.newMusicOnHold=!1,m.musiconhold||(m.musiconhold={mode:"files"},m.title="VOICE.NEW_MUSICONHOLD",m.newMusicOnHold=!0),m.addNewMusicOnHold=function(){m.errors=[],r.voiceMusicOnHold.save(m.musiconhold).$promise.then(function(e){m.musiconholds.unshift(e.toJSON()),i.success({title:"MusicOnHold properly created",msg:m.musiconhold.name?m.musiconhold.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceMusicOnHold.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMusicOnHold.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveMusicOnHold=function(){m.errors=[],r.voiceMusicOnHold.update({id:m.musiconhold.id},m.musiconhold).$promise.then(function(e){var t=_.find(m.musiconholds,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"MusicOnHold properly saved!",msg:m.musiconhold.name?m.musiconhold.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceMusicOnHold.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMusicOnHold.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteMusicOnHold=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The musiconhold will be deleted.").ariaLabel("Delete MusicOnHold").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceMusicOnHold.delete({id:m.musiconhold.id}).$promise.then(function(){_.remove(m.musiconholds,{id:m.musiconhold.id}),i.success({title:"MusicOnHold properly deleted!",msg:(m.musiconhold.name||"musiconhold")+" has been deleted!"}),u(m.musiconhold)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceMusicOnHold.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMusicOnHold.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","musiconholds","musiconhold","api","Auth","license","setting"],angular.module("app.voice").controller("CreateOrEditMusicOnHoldDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.musiconhold={},c.musiconholdMohSounds={count:0,rows:[]},c.selectedMusicOnHoldMohSounds=[],c.query={fields:"createdAt,updatedAt,id,save_name,converted_format,audio,id,createdAt",limit:10,page:1},c.init=function(e){c.musiconhold=e,c.query.id=c.musiconhold.id,c.query.VoiceMusicOnHoldId=c.musiconhold.id,c.getMusicOnHoldMohSounds()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the mohSound?").htmlContent("<b>"+(e.name||"mohSound")+"</b> will be deleted.").ariaLabel("delete mohSound").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.voiceMusicOnHoldDownload=function(o,e){return l.sound.download({id:o.id,exists:!0}).$promise.then(function(e){var t=[e.buffer],n="mohSound"+o.id,a=new Blob(t,{type:e.type});n=o.converted_format?o.save_name+"."+o.converted_format:o.save_name;var i=window.document.createElement("a");i.setAttribute("href",URL.createObjectURL(a)),i.setAttribute("download",n),i.click()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t+=1)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMusicOnHold.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},c.success=p,c.getMusicOnHoldMohSounds=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.voiceMusicOnHold.getSounds(c.query,p).$promise},c.createOrEditMusicOnHoldMohSound=function(e,t){o.show({controller:"CreateOrEditMohSoundDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/musiconholds/edit/mohSounds/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{musiconhold:c.musiconhold,mohSound:t,mohSounds:c.musiconholdMohSounds.rows,license:null,setting:null}})},c.exportSelectedMusicOnHoldMohSounds=function(){var e=angular.copy(c.selectedMusicOnHoldMohSounds);return c.selectedMusicOnHoldMohSounds=[],e},c.deleteMusicOnHoldMohSound=g,c.deleteSelectedMusicOnHoldMohSounds=function(e){var t=o.confirm().title("Are you sure want to delete the selected mohSounds?").htmlContent("<b>"+c.selectedMusicOnHoldMohSounds.length+" selected</b> will be deleted.").ariaLabel("delete mohSounds").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedMusicOnHoldMohSounds.forEach(function(e){g(e)}),c.selectedMusicOnHoldMohSounds=[]})},l.sound.get({fields:"name,id",sort:"name"}).$promise.then(function(e){c.sounds=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsounds",msg:e.data?JSON.stringify(e.data):e.toString()})});var m=!0,u=1;function p(e){c.musiconholdMohSounds=e||{count:0,rows:[]}}function g(e){l.voiceMusicOnHold.removeSound({id:n.params.id,id2:e.id}).$promise.then(function(){_.remove(c.musiconholdMohSounds.rows,{id:e.id}),c.musiconholdMohSounds.count-=1,c.musiconholdMohSounds.rows.length||c.getMusicOnHoldMohSounds(),r.success({title:"MohSound deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETvoiceMusicOnHold"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceMusicOnHold",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getMusicOnHoldMohSounds())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.voice").controller("MusicOnHoldMohSoundsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="VOICE.EDIT_MOHSOUND",m.mohSound=angular.copy(s),m.mohSounds=o,m.newMohSound=!1,m.mohSound||(m.mohSound={},m.title="VOICE.NEW_MOHSOUND",m.newMohSound=!0),t.params.id&&(m.mohSound.VoiceMusicOnHoldId=t.params.id),m.addNewMohSound=function(){m.errors=[],r.voiceMusicOnHold.addSound({id:t.params.id},m.mohSound).$promise.then(function(e){m.mohSounds.unshift(e.toJSON()),i.success({title:"MohSound properly created",msg:m.mohSound.name?m.mohSound.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceMusicOnHold.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMusicOnHold.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveMohSound=function(){m.errors=[],r.voiceMusicOnHold.update({id:m.mohSound.id},m.mohSound).$promise.then(function(e){var t=_.find(m.mohSounds,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"MohSound properly saved!",msg:m.mohSound.name?m.mohSound.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceMusicOnHold.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMusicOnHold.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteMohSound=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The mohSound will be deleted.").ariaLabel("Delete MohSound").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceMusicOnHold.delete({id:m.mohSound.id}).$promise.then(function(){_.remove(m.mohSounds,{id:m.mohSound.id}),i.success({title:"MohSound properly deleted!",msg:(m.mohSound.name||"mohSound")+" has been deleted!"}),u(m.mohSound)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceMusicOnHold.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMusicOnHold.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.sound.get({fields:"name,id",sort:"name"}).$promise.then(function(e){m.sounds=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsounds",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","mohSounds","mohSound","api","Auth","license","setting"],angular.module("app.voice").controller("CreateOrEditMohSoundDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.musiconhold=d||e.params.musiconhold||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoMusicOnHolds=function(){e.go("app.voice.musiconholds")},c.saveMusicOnHold=function(){s.voiceMusicOnHold.update({id:c.musiconhold.id},c.musiconhold).$promise.then(function(){r.success({title:"MusicOnHold updated!",msg:c.musiconhold.name?c.musiconhold.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceMusicOnHold",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","musiconhold"],angular.module("app.voice").controller("MusicOnHoldController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.musiconholds=r||{count:0,rows:[]},v.table="musiconholds",v.listOrder="",v.listOrderAsc=null,v.selectedMusicOnHolds=[],v.query={fields:"createdAt,updatedAt,id,name,mode,directory,application,format,sort",defaultEntry:"false",limit:10,page:1},v.arraymode=_.keyBy([{option:"Files",value:"'files'"},{option:"Custom",value:"'custom'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraysort=_.keyBy([{option:"Random",value:"'random'"},{option:"Alphabetical",value:"'alpha'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.voice.musiconholds.edit",{id:e.id,musiconhold:e})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the musiconhold?").htmlContent("<b>"+(e.name||"musiconhold")+"</b> will be deleted.").ariaLabel("delete musiconhold").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getMusicOnHolds=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.voiceMusicOnHold.get(v.query,f).$promise},v.createOrEditMusicOnHold=function(e,t){i.show({controller:"CreateOrEditMusicOnHoldDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/musiconholds/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{musiconhold:t,musiconholds:v.musiconholds.rows,license:v.license,setting:v.setting}})},v.deleteMusicOnHold=A,v.exportSelectedMusicOnHolds=function(){var e=angular.copy(v.selectedMusicOnHolds);return v.selectedMusicOnHolds=[],e},v.deleteSelectedMusicOnHolds=function(e){var t=i.confirm().title("Are you sure want to delete the selected musiconholds?").htmlContent("<b>"+v.selectedMusicOnHolds.length+" selected</b> will be deleted.").ariaLabel("delete MusicOnHolds").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedMusicOnHolds.forEach(function(e){A(e)}),v.selectedMusicOnHolds=[]})},v.deselectMusicOnHolds=function(){v.selectedMusicOnHolds=[]},v.selectAllMusicOnHolds=function(){v.selectedMusicOnHolds=v.musiconholds.rows};var h=!0,b=1;function f(e){v.musiconholds=e||{count:0,rows:[]}}function A(e){l.voiceMusicOnHold.delete({id:e.id}).$promise.then(function(){_.remove(v.musiconholds.rows,{id:e.id}),v.musiconholds.count-=1,v.musiconholds.rows.length||v.getMusicOnHolds(),c.success({title:"MusicOnHold deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvoiceMusicOnHold"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvoiceMusicOnHold",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getMusicOnHolds())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","musiconholds","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.voice").controller("MusicOnHoldsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="VOICE.EDIT_OUTBOUNDROUTE",m.outboundroute=angular.copy(s),m.outboundroutes=o,m.newOutboundRoute=!1,m.outboundroute||(m.outboundroute={appdata:"Outbound Call",type:"outbound",context:"from-sip",recordingFormat:"none"},m.title="VOICE.NEW_OUTBOUNDROUTE",m.newOutboundRoute=!0),m.addNewOutboundRoute=function(){m.errors=[],r.voiceExtension.save(m.outboundroute).$promise.then(function(e){m.outboundroutes.unshift(e.toJSON()),i.success({title:"OutboundRoute properly created",msg:m.outboundroute.name?m.outboundroute.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceExtension.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceExtension.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveOutboundRoute=function(){m.errors=[],r.voiceExtension.update({id:m.outboundroute.id},m.outboundroute).$promise.then(function(e){var t=_.find(m.outboundroutes,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"OutboundRoute properly saved!",msg:m.outboundroute.name?m.outboundroute.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceExtension.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceExtension.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteOutboundRoute=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The outboundroute will be deleted.").ariaLabel("Delete OutboundRoute").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceExtension.delete({id:m.outboundroute.id}).$promise.then(function(){_.remove(m.outboundroutes,{id:m.outboundroute.id}),i.success({title:"OutboundRoute properly deleted!",msg:(m.outboundroute.name||"outboundroute")+" has been deleted!"}),u(m.outboundroute)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceExtension.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceExtension.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){m.contexts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","outboundroutes","outboundroute","api","Auth","license","setting"],angular.module("app.voice").controller("CreateOrEditOutboundRouteDialogController",e)}(),function(){"use strict";function e(b,i,a,o,t,e,n){var f=this;function s(e,t){if(f.outboundrouteApps.rows.length){var n=f.outboundrouteApps.rows[t]?f.outboundrouteApps.rows[t]:f.outboundrouteApps.rows[0];i.show({controller:"EditoutboundApp"+(n.appType||n.app).toLowerCase()+"DialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/outboundroutes/edit/apps/"+(n.appType||n.app).toLowerCase()+"/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{outboundrouteApp:n,outboundroute:f.outboundroute}}).then(function(e){e&&(e.id?f.outboundrouteApps.rows[t]=e:f.outboundrouteApps.rows.splice(t,0,e),r())}).catch(function(e){e&&o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:EDITMODALSHOW",msg:e.data?JSON.stringify(e.data):e.toString()})})}}function r(e){var t=2,n=[];n.push({type:"outbound",app:"Set",appdata:"CDR(type)=outbound",context:f.outboundroute.context,exten:f.outboundroute.exten,priority:t++,VoiceExtensionId:f.outboundroute.id}),n.push({type:"outbound",app:"Set",appdata:"XCALLY-MOTION-ANSWER=0",context:f.outboundroute.context,exten:f.outboundroute.exten,priority:t++,VoiceExtensionId:f.outboundroute.id}),n.push({type:"outbound",app:"Set",appdata:"XCALLY-MOTION-PROGRESS=0",context:f.outboundroute.context,exten:f.outboundroute.exten,priority:t++,VoiceExtensionId:f.outboundroute.id}),n.push({type:"outbound",app:"Set",appdata:"MONITOR_OPTIONS=ab",context:f.outboundroute.context,exten:f.outboundroute.exten,priority:t++,VoiceExtensionId:f.outboundroute.id}),n.push({type:"outbound",app:"Set",appdata:"outboundrouteid="+f.outboundroute.id,context:f.outboundroute.context,exten:f.outboundroute.exten,priority:t++,VoiceExtensionId:f.outboundroute.id}),f.outboundroute.hasOwnProperty("recordingFormat")&&"none"!==f.outboundroute.recordingFormat&&(n.push({type:"outbound",app:"Set",appdata:"_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}",context:f.outboundroute.context,exten:f.outboundroute.exten,priority:t++,VoiceExtensionId:f.outboundroute.id}),n.push({type:"outbound",app:"Set",appdata:"_XCALLY_MIXMONITOR_FORMAT="+f.outboundroute.recordingFormat||"wav",context:f.outboundroute.context,exten:f.outboundroute.exten,priority:t++,VoiceExtensionId:f.outboundroute.id}));for(var a=0,i=0;a<f.outboundrouteApps.rows.length;a++,i=0){var o=f.outboundrouteApps.rows[a],s=[],r=[];o.intervals="*,*,*,*"!==o.interval?[o.interval]:o.IntervalId?_.map(_.filter(f.intervals.rows,{IntervalId:o.IntervalId}),"interval"):[],o.context=f.outboundroute.context,o.exten=f.outboundroute.exten,o.type&&(o.type=o.type.toLowerCase()),o.hasOwnProperty("tag")&&o.tag&&"--"!==o.tag&&s.push({type:o.type.toLowerCase(),app:"Set",appdata:"CDR(tag)="+o.tag,context:f.outboundroute.context,exten:f.outboundroute.exten,priority:o.intervals.length+t+i++,VoiceExtensionId:f.outboundroute.id}),o.hasOwnProperty("callerID")&&o.callerID&&s.push({type:o.type.toLowerCase(),app:"Set",appdata:"CALLERID(all)="+o.callerID,context:f.outboundroute.context,exten:f.outboundroute.exten,priority:o.intervals.length+t+i++,VoiceExtensionId:f.outboundroute.id});for(var l=0;l<o.intervals.length;l++){var d=t+o.intervals.length,c=l===o.intervals.length-1?t+s.length+r.length+2:t+l+1;s.splice(l,0,{type:"outbound",app:"GotoIfTime",appdata:o.intervals[l]+"?"+f.outboundroute.context+",${EXTEN},"+d+":"+f.outboundroute.context+",${EXTEN},"+c,exten:f.outboundroute.exten,context:f.outboundroute.context,priority:t+l,VoiceExtensionId:f.outboundroute.id})}if(e&&"outboundDial"===o.appType){var m=_.find(f.apps,{appType:"outboundDial"});if(m&&m.fields){for(var u={},p=o.appdata.split(","),g=[],v=0,h=m.fields.length;v<h;v++)if(m.fields[v].hasOwnProperty("param"))switch(m.fields[v].name){case"trunk":u.trunk=p[m.fields[v].param].split("/")[1],u.phone=p[m.fields[v].param].split("/")[2],u.prefix=u.phone?u.phone.split("$")[0]:void 0,u.phone=f.outboundroute.cutdigits?(u.prefix||"")+"${EXTEN:"+f.outboundroute.cutdigits+"}":(u.prefix||"")+"${EXTEN}",g[m.fields[v].param]=["SIP",u.trunk,u.phone].join("/");break;case"options":u.options=p[m.fields[v].param],"none"!==f.outboundroute.recordingFormat?u.options.indexOf("U(xcally-mixmonitor-context)")<0&&(u.options+="U(xcally-mixmonitor-context)"):u.options=u.options.replace("U(xcally-mixmonitor-context)",""),g[m.fields[v].param]=u.options;break;default:g[m.fields[v].param]=p[m.fields[v].param]}o.appdata=g.join(",")}}o.priority=s.length?_.last(s).priority+1:t,t=(r.length?_.last(r).priority:o.priority)+1,n=_.concat(n,s,[o],r)}n.push({type:"outbound",app:"Hangup",exten:f.outboundroute.exten,context:f.outboundroute.context,priority:t,VoiceExtensionId:f.outboundroute.id}),b.voiceExtension.addApplications({id:f.outboundroute.id},_.sortBy(n,"priority")).$promise.then(function(e){f.outboundrouteApps.rows=e.rows}).catch(function(e){console.error(e)})}function l(e){f.outboundrouteApps=e||{count:0,rows:[]}}f.currentUser=n.getCurrentUser(),f.outboundroute={},f.outboundrouteApps={count:0,rows:[]},f.selectedOutboundRouteApps=[],f.query={sort:"priority"},f.apps=_.reject(_.sortBy([{app:"Interval",appType:"interval",type:"Outbound",types:["always","custom","list"],fields:[],isApp:!1},{app:"Dial",appType:"outboundDial",context:"from-sip",type:"Outbound",icon:"icon-apps",interval:"*,*,*,*",options:"xX",isApp:!0,extraApi:[{name:"trunks",route:"trunk",filters:{fields:"name",sort:"name"}},{name:"tags",route:"tag",filters:{fields:"name",sort:"name"}}],fields:[{title:"Trunk",name:"trunk",type:"apiselect",values:"trunks",value:"trunk.name",option:"trunk.name",required:!0,param:0},{title:"Caller_ID",name:"callerID",type:"text"},{title:"Prefix",name:"prefix",type:"text"},{title:"Tags",name:"tag",type:"apiselect",values:"tags",value:"tag.name",option:"tag.name",defaultValues:[{value:"'--'",option:"None"}]},{title:"Timeout",name:"timeout",type:"number",min:0,param:1},{title:"Options",name:"options",type:"text",param:2},{title:"Url",name:"url",type:"text",param:3}]},{app:null,type:"Outbound",appType:"custom",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Application_Name",name:"app",type:"text",required:!0,param:0},{title:"Arguments",name:"appdata",type:"text",param:1}]}],["app"]),{isApp:!1}),f.list={group:{name:"opt1",pull:"clone"},animation:100,sort:!1},f.applications={group:{name:"opt2",put:"opt1"},animation:100,onAdd:function(e){s(e,e.newIndex)},onSort:function(e){r()}},f.init=function(e){f.outboundroute=e,t.on("voiceExtension:update",f.onVoiceExtensionUpdate),f.query.VoiceExtensionId=e.id,f.query.isApp=!0,f.query.nolimit=!0,f.getOutboundRouteApps(),f.getIntervals()},f.deleteConfirm=function(e,t,n){var a=i.confirm().title("Are you sure want to delete the application?").htmlContent("<b>"+e.app+"</b> will be deleted.").ariaLabel("delete application").targetEvent(n).ok("OK").cancel("CANCEL");i.show(a).then(function(){f.outboundrouteApps.rows.splice(t,1),r()},function(){console.log("CANCEL")})},f.getOutboundRouteApps=function(){f.promise=b.voiceExtension.get(f.query,l).$promise},f.editOutboundRouteApp=s,f.editInterval=function(e,t){if(f.outboundrouteApps.rows.length){var n=f.outboundrouteApps.rows[t]?f.outboundrouteApps.rows[t]:f.outboundrouteApps.rows[0];i.show({controller:"EditoutboundAppintervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/outboundroutes/edit/apps/interval/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:{interval:n.interval,IntervalId:n.IntervalId,application:!0},intervals:[]}}).then(function(e){e&&(n.interval=e.interval||"*,*,*,*",n.IntervalId=e.IntervalId||null,r())})}},f.deleteOutboundRouteApp=function(e){_.remove(f.outboundrouteApps.rows,{id:e.id}),r(),o.success({title:"App deleted!",msg:e.app?e.app+" has been deleted!":""})},f.deleteSelectedOutboundRouteApps=function(e){var t=i.confirm().title("Are you sure want to delete the selected applications?").htmlContent("<b>"+f.selectedOutboundRouteApps.length+" selected</b> will be deleted.").ariaLabel("delete applications").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){f.selectedOutboundRouteApps.forEach(function(e){_.remove(f.outboundrouteApps.rows,{id:e.id})}),f.selectedOutboundRouteApps=[],r()})},f.rewriteRouting=r,f.getIntervals=function(){return b.interval.get({fields:"id,interval,IntervalId"}).$promise.then(function(e){f.intervals=e}).catch(function(e){console.error(e)})},f.onVoiceExtensionUpdate=function(e){e.VoiceExtensionId===f.outboundroute.id&&r(!0)},e.$on("$destroy",function(){t.removeAllListeners("voiceExtension:update")})}e.$inject=["api","$mdDialog","$document","toasty","socket","$scope","Auth"],angular.module("app.voice").controller("OutboundRouteActionsController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(n.appType||n.app).toUpperCase(),o.custom=angular.copy(n),o.custom.appdata)switch(o.custom.appType?o.custom.appType.toLowerCase():o.custom.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.custom.appdata.split(",");o.custom.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.custom.text=s.slice(1,s.length).join(",");break;case"message":o.custom.text=o.custom.appdata;break;case"set":o.custom.name=o.custom.appdata.split("=")[0],o.custom.value=o.custom.appdata.split("=")[1];break;case"agi":o.custom.project=o.custom.appdata;break;default:var r=o.custom.appdata.split(",");o.custom.app=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.custom.appdata=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}function l(e){t.hide(e)}o.custom.type&&"outbound"===o.custom.type.toLowerCase()&&"outbounddial"===o.custom.appType.toLowerCase()&&(o.custom.prefix=o.custom.phone?o.custom.phone.split("$")[0]:void 0,o.custom.callerId=o.custom.callerID?"CALLERID(all)="+o.custom.callerID:void 0),o.saveOutboundRouteApp=function(){o.errors=[];var e=[];o.custom.type&&"outbound"===o.custom.type.toLowerCase()&&"outboundDial"===o.custom.appType&&(o.custom.phone=a.cutdigits?(o.custom.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.custom.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.custom.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.custom.options+="U(xcally-mixmonitor-context)"):o.custom.options=o.custom.options.replace("U(xcally-mixmonitor-context)",""));if(o.custom.appType&&"custom"===o.custom.appType);else switch((o.custom.app||o.custom.appType).toLowerCase()){case"set":o.custom.appdata=o.custom.name+"="+o.custom.value;break;case"custom":break;default:e[0]=o.custom.app,e[1]=o.custom.appdata,o.custom.appdata=e.join(",")}l(o.custom)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","outboundrouteApp","outboundroute","api"],angular.module("app.voice").controller("EditoutboundAppcustomDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;if(l.errors=[],l.title="TOOLS.EDIT_INTERVAL",l.interval=angular.copy(i),l.intervals=o,l.newInterval=!1,l.types=["always","custom","list"],l.daysOfWeek=a.getDaysOfWeek(),l.monthNumber=a.getMonthNumber(),l.monthName=a.getMonthName(),l.daysOfMonth=a.getDaysOfMonth(),l.interval)if("*,*,*,*"!==l.interval.interval){l.type="custom";var d=l.interval.interval.split(","),c=d[0],m=d[1],u=d[2],p=d[3];if("*"!==c){var g,v=c.split("-")[0],h=c.split("-")[1];(g=new Date).setHours(Number(v.split(":")[0])),g.setMinutes(Number(v.split(":")[1])),l.timeRangeFrom=g,(g=new Date).setHours(Number(h.split(":")[0])),g.setMinutes(Number(h.split(":")[1])),l.timeRangeTo=g}"*"!==m&&(l.dayOfWeekFrom=m.split("-")[0],l.dayOfWeekTo=m.split("-")[1]),"*"!==u&&(l.monthDayFrom=u.split("-")[0],l.monthDayTo=u.split("-")[1]),"*"!==p&&(l.monthFrom=p.split("-")[0],l.monthTo=p.split("-")[1])}else l.type="always";else l.interval={interval:"*,*,*,*"},l.type="always",l.title="TOOLS.NEW_INTERVAL",l.newInterval=!0;function b(){switch(l.type){case"always":case"list":return"*,*,*,*";case"custom":var e=[];if("*"!==l.timeRangeFrom&&l.timeRangeFrom&&l.timeRangeTo){var t=(l.timeRangeFrom.getHours()<10?"0":"")+l.timeRangeFrom.getHours()+":"+(l.timeRangeFrom.getMinutes()<10?"0":"")+l.timeRangeFrom.getMinutes(),n=(l.timeRangeTo.getHours()<10?"0":"")+l.timeRangeTo.getHours()+":"+(l.timeRangeTo.getMinutes()<10?"0":"")+l.timeRangeTo.getMinutes();e.push(t+"-"+n)}else e.push("*");return l.dayOfWeekFrom?l.dayOfWeekTo?e.push(l.dayOfWeekFrom+"-"+l.dayOfWeekTo):e.push(l.dayOfWeekFrom):e.push("*"),l.monthDayFrom?l.monthDayTo?e.push(l.monthDayFrom+"-"+l.monthDayTo):e.push(l.monthDayFrom):e.push("*"),l.monthFrom?l.monthTo?e.push(l.monthFrom+"-"+l.monthTo):e.push(l.monthFrom):e.push("*"),e.join()}}function f(e){t.hide(e)}e.params.id&&!l.interval.application&&(l.interval.IntervalId=e.params.id),l.interval.IntervalId&&l.interval.application&&(l.type="list"),l.addNewInterval=function(){l.errors=[],l.interval.interval=b(),r.interval.save(l.interval).$promise.then(function(e){l.intervals.push(e),s.success({title:"Interval properly created",msg:l.interval.name?l.interval.name+" has been created!":""}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}]})},l.saveInterval=function(){l.errors=[],l.interval.interval=b(),l.interval.application?("list"!==l.type&&(l.interval.IntervalId=null),f(l.interval)):r.interval.update({id:l.interval.id},l.interval).$promise.then(function(e){var t=_.find(l.intervals,{id:e.id});t&&_.merge(t,e),s.success({title:"Interval properly saved!",msg:"Interval has been saved!"}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}]})},l.closeDialog=f,l.interval.application&&r.interval.get({fields:"id,name,interval,IntervalId",IntervalId:"null",nolimit:!0}).$promise.then(function(e){l.intervals=e}).catch(function(e){console.error(e)})}e.$inject=["$state","$mdDialog","$mdToast","IndexFactory","interval","intervals","toasty","api"],angular.module("app.voice").controller("EditoutboundAppintervalDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.outbounddial=angular.copy(e),o.outbounddial.appdata)switch(o.outbounddial.appType?o.outbounddial.appType.toLowerCase():o.outbounddial.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.outbounddial.appdata.split(",");o.outbounddial.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.outbounddial.text=s.slice(1,s.length).join(",");break;case"message":o.outbounddial.text=o.outbounddial.appdata;break;case"set":o.outbounddial.name=o.outbounddial.appdata.split("=")[0],o.outbounddial.value=o.outbounddial.appdata.split("=")[1];break;case"agi":o.outbounddial.project=o.outbounddial.appdata;break;default:var r=o.outbounddial.appdata.split(",");o.outbounddial.trunk=r[0].split("/")[1],o.outbounddial.phone=r[0].split("/")[2],o.outbounddial.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.outbounddial.options=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.outbounddial.url=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10)}function l(e){t.hide(e)}o.outbounddial.type&&"outbound"===o.outbounddial.type.toLowerCase()&&"outbounddial"===o.outbounddial.appType.toLowerCase()&&(o.outbounddial.prefix=o.outbounddial.phone?o.outbounddial.phone.split("$")[0]:void 0,o.outbounddial.callerId=o.outbounddial.callerID?"CALLERID(all)="+o.outbounddial.callerID:void 0),o.saveOutboundRouteApp=function(){o.errors=[];var e=[];o.outbounddial.type&&"outbound"===o.outbounddial.type.toLowerCase()&&"outboundDial"===o.outbounddial.appType&&(o.outbounddial.phone=a.cutdigits?(o.outbounddial.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.outbounddial.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.outbounddial.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.outbounddial.options+="U(xcally-mixmonitor-context)"):o.outbounddial.options=o.outbounddial.options.replace("U(xcally-mixmonitor-context)",""));if(o.outbounddial.appType&&"custom"===o.outbounddial.appType);else switch((o.outbounddial.app||o.outbounddial.appType).toLowerCase()){case"set":o.outbounddial.appdata=o.outbounddial.name+"="+o.outbounddial.value;break;case"custom":break;default:e[0]=["SIP",o.outbounddial.trunk,o.outbounddial.phone].join("/"),e[1]=o.outbounddial.timeout,e[2]=o.outbounddial.options,e[3]=o.outbounddial.url,o.outbounddial.appdata=e.join(",")}l(o.outbounddial)},o.closeDialog=l,i.trunk.get({fields:"name",sort:"name"}).$promise.then(function(e){o.trunks=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})}),i.tag.get({fields:"name",sort:"name"}).$promise.then(function(e){o.tags=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtags",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","outboundrouteApp","outboundroute","api"],angular.module("app.voice").controller("EditoutboundAppoutbounddialDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.outboundroute=d||e.params.outboundroute||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoOutboundRoutes=function(){e.go("app.voice.outboundroutes")},c.saveOutboundRoute=function(){s.voiceExtension.update({id:c.outboundroute.id},c.outboundroute).$promise.then(function(){r.success({title:"OutboundRoute updated!",msg:c.outboundroute.name?c.outboundroute.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceExtension",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){c.contexts=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","outboundroute"],angular.module("app.voice").controller("OutboundRouteController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.outboundroutes=r||{count:0,rows:[]},v.table="outboundroutes",v.listOrder="",v.listOrderAsc=null,v.selectedOutboundRoutes=[],v.query={fields:"createdAt,updatedAt,id,appdata,type,exten,context,recordingFormat,cutdigits,description",type:"outbound",sort:"-updatedAt",VoiceExtensionId:"null",limit:10,page:1},v.arrayrecordingFormat=_.keyBy([{option:"none",value:"'none'"},{option:"wav",value:"'wav'"},{option:"wav49",value:"'WAV'"},{option:"gsm",value:"'gsm'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.voice.outboundroutes.edit",{id:e.id,outboundroute:e})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the outboundroute?").htmlContent("<b>"+(e.name||"outboundroute")+"</b> will be deleted.").ariaLabel("delete outboundroute").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getOutboundRoutes=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.voiceExtension.get(v.query,f).$promise},v.createOrEditOutboundRoute=function(e,t){i.show({controller:"CreateOrEditOutboundRouteDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/outboundroutes/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{outboundroute:t,outboundroutes:v.outboundroutes.rows,license:v.license,setting:v.setting}})},v.deleteOutboundRoute=A,v.exportSelectedOutboundRoutes=function(){var e=angular.copy(v.selectedOutboundRoutes);return v.selectedOutboundRoutes=[],e},v.deleteSelectedOutboundRoutes=function(e){var t=i.confirm().title("Are you sure want to delete the selected outboundroutes?").htmlContent("<b>"+v.selectedOutboundRoutes.length+" selected</b> will be deleted.").ariaLabel("delete OutboundRoutes").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedOutboundRoutes.forEach(function(e){A(e)}),v.selectedOutboundRoutes=[]})},v.deselectOutboundRoutes=function(){v.selectedOutboundRoutes=[]},v.selectAllOutboundRoutes=function(){v.selectedOutboundRoutes=v.outboundroutes.rows},l.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){v.contexts=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.outboundroutes=e||{count:0,rows:[]}}function A(e){l.voiceExtension.delete({id:e.id}).$promise.then(function(){_.remove(v.outboundroutes.rows,{id:e.id}),v.outboundroutes.count-=1,v.outboundroutes.rows.length||v.getOutboundRoutes(),c.success({title:"OutboundRoute deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvoiceExtension"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvoiceExtension",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getOutboundRoutes())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","outboundroutes","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.voice").controller("OutboundRoutesController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d,c,m){var u=this,p=!0;function g(){var e=i.localStorage.getItem("motion2.realtime.abandoned.voice.contacts:"+u.currentUser.id);e&&(e=JSON.parse(e))&&e.query&&(u.query=_.merge(e.query,_.omit(u.query,["sort","limit","page"])),u.query=_.omit(u.query,"filter")),s.voiceDisposition.get().$promise.then(function(e){u.disposition=e?e.rows:[]}).catch(function(e){console.log(e)}),s.user.getQueues({id:r.getCurrentUser().id,fields:"id,name",channel:"voice",type:"inbound",nolimit:!0}).$promise.then(function(e){u.queues=e||{count:0,rows:[]},u.queuesMap=_.mapValues(_.keyBy(u.queues.rows,"name"),"name")}).catch(function(e){console.error(e)}).finally(function(){u.getContacts()})}function v(e){u.contacts=e||{count:0,rows:[]},p=!1,u.refresh=!0}u.showTooltip=!1,u.refresh=!0,u.disable=[],u.agents=m||[],u.currentUser=r.getCurrentUser(),u.localizationMap=c,u.pickerModel={dateStart:null,dateEnd:null},u.queues={},u.contacts={count:0,rows:[]},u.query={fields:"id,type,calleridnum,calleridname,queue,queuecallerabandonAt,queuecallerexitAt,queuecallerexitreason,assigned,lastAssignedTo,updatedAt,disposition",type:"inbound",queuecallerexitreason:"TIMEOUT,ABANDONED",sort:"-updatedAt",limit:10,page:1},u.clearAll=function(){u.query.dateStart=void 0,u.query.dateEnd=void 0,u.pickerModel={dateStart:null,dateEnd:null},u.getContacts()},u.getContacts=function(){u.refresh=!1,u.query.dateStart=void 0,u.query.dateEnd=void 0,u.pickerModel.dateStart&&!p&&(u.query.dateStart=u.pickerModel.dateStart,u.query.dateEnd=u.pickerModel.dateEnd);u.query.queue=u.query.queue,u.query.offset=(u.query.page-1)*u.query.limit,i.localStorage.setItem("motion2.realtime.abandoned.voice.contacts:"+u.currentUser.id,JSON.stringify({query:_.omit(u.query,"queue")})),u.promise=s.voiceQueueReport.getVoiceQueuesReport(u.query,v).$promise},u.refreshContacts=function(){u.showTooltip=!1,u.getContacts()},u.onInit=g,u.assignedA=function(e,t){e&&(u.disable[e.id]=!0,s.voiceQueueReport.update({id:e.id,lastAssignedTo:t?t.name:null,assigned:!!t}).$promise.catch(function(e){console.log(e)}).finally(function(){u.disable[e.id]=!1}))},u.disposed=function(e,t){e&&s.voiceQueueReport.update({id:e.id,disposition:t||null}).$promise.catch(function(e){console.log(e)})},u.onSavevoiceQueueReport=function(e){e&&u.queuesMap&&"inbound"===e.type&&u.queuesMap[e.queue]&&(u.showTooltip=!0)},u.onUpdatevoiceQueueReport=function(e){if(e){var t=_.findIndex(u.contacts.rows,["id",e.id]);0<=t&&_.merge(u.contacts.rows[t],e)}},l.onWithoutApply("voiceQueueReport:save",u.onSavevoiceQueueReport),l.on("voiceQueueReport:update",u.onUpdatevoiceQueueReport),g();var h=!0,b=1;e.$watch("vm.query.filter",function(e,t){h?n(function(){h=!1}):(t||(b=u.query.page),e!==t&&(u.query.page=1),e||(u.query.page=b),u.getContacts())}),e.$on("$destroy",function(){l.removeAllListeners("voiceQueueReport:save"),l.removeAllListeners("voiceQueueReport:update")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty","dateFilterLocalizationFactory","agents"],angular.module("app.voice").controller("AbandonedCallsVoiceRealtimeController",e)}(),function(){"use strict";function e(e,s,t,n,a,i,o,r,l,d,c,m,u,p,g,v){var h=this,b=["userpic","online","lastLoginAt","lastPauseAt","pauseType","lastPauseAt","internal","address","chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","chatCapacity","openchannelCapacity","mailCapacity","smsCapacity","faxCapacity","chatCurrentCapacity","openchannelCurrentCapacity","mailCurrentCapacity","smsCurrentCapacity","faxCurrentCapacity","chatStatus","openchannelStatus","mailStatus","smsStatus","faxStatus","voiceStatus","chatStatusTime","openchannelStatusTime","mailStatusTime","smsStatusTime","faxStatusTime","voiceStatusTime","queue","destconnectedlinenum"],f=["chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","online"];for(var A in h.availableStates=["ringing","inuse","busy","onhold","not_inuse"],h.pauses=o||{count:0,rows:[]},h.license=g,h.agents=r?_.keyBy(r.rows?r.rows:[],"id"):{},h.rpcAgents=l?_.keyBy(l.rows?l.rows:[],"id"):{},h.paginatedAgents={},h.load=!1,h.order=[],h.agentInternal={},h.agents)h.agents.hasOwnProperty(A)&&(h.agents[A].init=!0);h.query={limit:10,page:1,order:"fullname",globalStatusFilter:"",pauseTypeFilter:""},h.logout=function(e,t){return d.user.logout({id:e.id}).$promise.then(function(){m.success({title:"Agent logout",msg:e.fullname+"  properly logout"}),h.agents[e.id]&&(h.agents[e.id].online=!1),h.rpcAgents[e.id]&&(h.rpcAgents[e.id].online=!1),y()}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.queueAdd=function(e,t){n.show({controller:"AgentqueueaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/queueadd/queueadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{agent:e,agents:[],channel:"voice",realtime:!0,direction:"inbound"}})},h.pause=function(t,e){return d.user.pause({id:t.id,type:e}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.unPause=function(t){return d.user.unpause({id:t.id}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.showInfo=function(e){n.show(n.alert().clickOutsideToClose(!0).title("Legend").htmlContent("<div>TODO legend status + state</div>").ok("Ok").targetEvent(e))},h.getAgentStatus=C,h.getAgentGlobalStatus=x,h.isPause=S,h.checkPause=function(e){return"pause"===e},h.isPartialPause=function(e){return"*pause"===e},h.onSave=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(_.omit(e,f),b)),_.merge(h.rpcAgents[e.id],_.pick(_.omit(e,f),b)),x(h.agents[e.id]))},h.onUpdate=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(e,b)),_.merge(h.rpcAgents[e.id],_.pick(e,b)),x(h.agents[e.id]))},h.onInit=y,h.onConnect=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(_.merge(h.agents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])),_.merge(h.rpcAgents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])))},h.onComplete=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(h.agents[h.agentInternal[e.destaccountcode]]=_.omit(h.agents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]),h.rpcAgents[h.agentInternal[e.destaccountcode]]=_.omit(h.rpcAgents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]))},c.on("user:save",h.onSave),c.on("user:update",h.onUpdate),c.on("user:agentconnect",h.onConnect),c.on("user:agentcomplete",h.onComplete),y();var E=v(function(){h.load&&(h.load=!1,y())},999);function y(e){h.load=!1;var t,n,a=s.defer();h.promise=a.promise,h.filteredAgents=[],h.order=[],_.forIn(h.agents,function(e,t){h.rpcAgents[t]&&_.merge(e,_.pick(_.omit(h.rpcAgents[t],f),b)),x(e),e.online?(h.filteredAgents.push(e),h.agentInternal[e.internal]=t):e.globalStatusTime=_.toNumber(moment().format("x"))}),h.query.globalStatusFilter&&_.remove(h.filteredAgents,function(e){return e.globalStatus!==h.query.globalStatusFilter}),h.query.pauseTypeFilter&&_.remove(h.filteredAgents,function(e){return e.pauseType!==h.query.pauseTypeFilter}),h.query.filter&&_.remove(h.filteredAgents,function(e){return e.fullname.toLowerCase().indexOf(h.query.filter.toLowerCase())<0}),h.filteredAgents=(t=h.filteredAgents,n=_.startsWith(h.query.order,"-")?"desc":"asc",_.orderBy(t,[h.query.order.replace("-","")],[n]));var i=(h.query.page-1)*h.query.limit;h.paginatedAgents=_.drop(h.filteredAgents,i).slice(0,h.query.limit);for(var o=0;o<h.paginatedAgents.length;o+=1)h.order.push(h.paginatedAgents[o].id);a.resolve(),h.load=!0}function S(e){return"pause"===e||"*pause"===e}function T(e){return"idle"===e||"unknown"===e||"unavailable"===e||"ringing"===e||_.isNil(e)}function C(e,t){return"voice"===t?"idle"!==e[t+"Status"]?e[t+"Status"]:e[t+"Pause"]?e[t+"Status"]="pause":"idle":e[t+"Pause"]?e[t+"Status"]="pause":e[t+"Status"]}function x(e){var t="unknown";t=_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"pause":_.some([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"*pause":_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],T)?"idle":"busy",e.globalStatus!==t&&(e.globalStatus=t,e.init?(e.init=!1,e.globalStatusTime=S(t)?_.toNumber(moment(e.lastPauseAt).format("x")):_.max([e.voiceStatusTime,e.chatStatusTime,e.mailStatusTime,e.smsStatusTime,e.openchannelStatusTime,e.faxStatusTime])):e.globalStatusTime=_.toNumber(moment().format("x")))}e.$on("$destroy",function(){c.removeAllListeners("user:save"),c.removeAllListeners("user:update"),c.removeAllListeners("user:agentconnect"),c.removeAllListeners("user:agentcomplete"),E&&(v.cancel(E),E=null)})}e.$inject=["$scope","$q","$timeout","$mdDialog","$document","$filter","pauses","agents","rpcAgents","api","socket","toasty","helperClasses","Auth","license","$interval"],angular.module("app.voice").controller("AgentsVoiceRealtimeController",e)}(),function(){"use strict";function e(e,n,t,a,i,o){var s=this;s.calls=i||{rows:[],count:0},s.query={limit:10,page:1},s.channelStatus=o.channelStatusOut,s.onSave=function(e){var t=_.find(s.calls.rows,{channel:e.channel});e.channelstatedesc=e.dialstatus?"up":"ring",t?_.merge(t,e):e.channel&&s.calls.rows.push(e)},s.onRemove=function(e){var t=_.findIndex(s.calls.rows,{channel:e.channel});0<=t&&(s.calls.rows[t].status="hangup");n(function(){s.calls.rows.splice(t,1)},5e3)},a.on("voice_outbound_channel:save",s.onSave),a.on("voice_outbound_channel:remove",s.onRemove),e.$on("$destroy",function(){a.removeAllListeners("voice_outbound_channel:save"),a.removeAllListeners("voice_outbound_channel:remove")})}e.$inject=["$scope","$timeout","api","socket","rpcCalls","helperClasses"],angular.module("app.voice").controller("OutboundCallsVoiceRealtimeController",e)}(),function(){"use strict";function e(e,t,a,n,i,o,s,r,l){var d=this;d.agents=n||{count:0,rows:[]},d.rpcVoiceQueuesChannels=i?_.keyBy(i.rows?_.filter(i.rows,{type:"inbound"}):[],"uniqueid"):{},d.queryChannels={limit:10,page:1},d.getSize=function(e){return _.size(e)},d.onSave=function(e){"inbound"===e.type&&(d.rpcVoiceQueuesChannels[e.uniqueid]=e)},d.onRemove=function(e){d.rpcVoiceQueuesChannels[e.uniqueid]&&delete d.rpcVoiceQueuesChannels[e.uniqueid]},d.hangup=function(t){return o.rpc.getVoiceQueuesChannelHangup({uniqueid:t}).$promise.then(function(e){l.success({title:"Channel "+t+" properly hangup!",msg:e.message||""})}).catch(function(e){l.error({title:e.status+" - "+e.statusText,msg:JSON.stringify(e.data)||e.message.join(" ")})})},d.redirectToAgent=function(t,e){return o.rpc.getVoiceQueuesChannelRedirect({uniqueid:t,exten:e}).$promise.then(function(e){l.success({title:"Channel "+t+" properly redirect!",msg:e.message||""})}).catch(function(e){l.error({title:e.status+" - "+e.statusText,msg:JSON.stringify(e.data)||e.message.join(" ")})})},d.redirectToNumber=function(e,t){var n=a.prompt().title("Which number do you want transfer the call to?").placeholder("Number").targetEvent(e).ok("Ok").cancel("Cancel");return a.show(n).then(function(e){return o.rpc.getVoiceQueuesChannelRedirect({uniqueid:t,exten:e}).$promise}).then(function(e){l.success({title:"Channel "+t+" properly redirect!",msg:e.message||""})}).catch(function(e){l.error({title:e.status+" - "+e.statusText,msg:JSON.stringify(e.data)||e.message.join(" ")})})},s.on("voice_queue_channel:save",d.onSave),s.on("voice_queue_channel:remove",d.onRemove),e.$on("$destroy",function(){s.removeAllListeners("voice_queue_channel:save"),s.removeAllListeners("voice_queue_channel:remove")})}e.$inject=["$scope","$timeout","$mdDialog","agents","rpcVoiceQueuesChannels","api","socket","helperClasses","toasty"],angular.module("app.voice").controller("QueueCallsVoiceRealtimeController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r){var l=this,d=["total","answered","unmanaged","sumHoldTime","sumDuration","sumBillable"];function c(){_.forIn(l.queues,function(e,t){l.rpcQueues[t]&&_.merge(e,_.pick(l.rpcQueues[t],d))})}l.count=a.count,l.queues=a?_.keyBy(a.rows?a.rows:[],"id"):{},l.rpcQueues=i?_.keyBy(i.rows?i.rows:[],"id"):{},r.hasRole("admin")?l.query={type:"inbound",fields:"id,name",sort:"-updatedAt",limit:10,page:1}:l.query={id:r.getCurrentUser().id,channel:"voice",type:"inbound",fields:"id,name",sort:"-updatedAt",limit:10,page:1},l.success=p,l.getQueues=function(){l.query.offset=(l.query.page-1)*l.query.limit,r.hasRole("admin")?l.promise=o.voiceQueue.get(l.query,p).$promise:l.promise=o.user.getQueues(l.query,p).$promise},l.onSave=function(e){l.queues[e.id]&&_.merge(l.queues[e.id],_.pick(e,d))},l.$onInit=c,s.onWithoutApply("voice_queue:save",l.onSave),l.interval=t(function(){},999);var m=!0,u=1;function p(e){l.count=e.count,l.queues=e?_.keyBy(e.rows?e.rows:[],"id"):{},c()}e.$watch("vm.query.filter",function(e,t){m?n(function(){m=!1}):(t||(u=l.query.page),e!==t&&(l.query.page=1),e||(l.query.page=u),l.getQueues())}),e.$on("$destroy",function(){s.removeAllListeners("voice_queue:save"),l.interval&&t.cancel(l.interval)})}e.$inject=["$scope","$timeout","$interval","queues","rpcQueues","api","socket","Auth"],angular.module("app.voice").controller("QueueParamsVoiceRealtimeController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r,l,d,c,m){var u=this,p=["loggedIn","available","waiting","talking","pTalking","originated","message","dialActive","dialMethod","Trunk","paused"];function g(){var n=[];return _.forIn(u.queues,function(e,t){e.paused=0,e.loggedInDb=0,u.queues[t].agents={},n.push(l.voiceQueue.getMembers({id:t}).$promise),u.rpcQueues[t]&&_.merge(e,_.pick(u.rpcQueues[t],p))}),t.all(n).then(function(e){for(var t=0;t<e.length;t+=1)for(var n=0;n<e[t].rows.length;n++)e[t].rows[n].paused&&u.queues[e[t].rows[n].VoiceQueueId].paused++,u.queues[e[t].rows[n].VoiceQueueId].loggedInDb++,u.queues[e[t].rows[n].VoiceQueueId].agents[e[t].rows[n].UserId]=e[t].rows[n].VoiceQueueId}).catch(function(e){console.error(e)})}u.count=s.count?s.count:0,u.queues=s?_.keyBy(s.rows?s.rows:[],"id"):{},u.rpcQueues=r?_.keyBy(r.rows?r.rows:[],"id"):{},m.hasRole("admin")?u.query={type:"inbound",sort:"-updatedAt",limit:10,page:1}:u.query={id:m.getCurrentUser().id,channel:"voice",type:"inbound",sort:"-updatedAt",limit:10,page:1},u.success=b,u.getQueues=function(){u.query.offset=(u.query.page-1)*u.query.limit,m.hasRole("admin")?u.promise=l.voiceQueue.get(u.query,b).$promise:u.promise=l.user.getQueues(u.query,b).$promise},u.createOrEditVoiceQueue=function(e,t){a.show({controller:"CreateOrEditVoiceQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/voiceQueues/create/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{voiceQueue:t,voiceQueues:_.values(u.queues),license:null,setting:null}})},u.agentAdd=function(e,t){a.show({controller:"VoiceQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/voiceQueues/edit/agentadd/agentadd.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{voiceQueue:t,voiceQueues:u.queues?u.queues.rows:[],realtime:!0}})},u.updateQueue=function(e){return l.voiceQueue.update(e).$promise.then(function(){c.success({title:"Queue properly updated!",msg:e.name?e.name+" has been updated!":""})}).catch(function(e){c.error({title:"Error creating queue!",msg:e.message})})},u.onSave=function(e){u.queues[e.id]&&_.merge(u.queues[e.id],_.pick(e,p))},u.onPause=function(n){console.log("onPause",n),n.voicePause?_.forIn(u.queues,function(e,t){e.agents[n.id]&&(e.paused+=1,console.log("pause"))}):n.voicePause||_.forIn(u.queues,function(e,t){e.agents[n.id]&&0<e.paused&&(e.paused-=1,console.log("unpause"))})},u.onLogin=function(e){console.log("onLogged",e),u.queues[e.VoiceQueueId]&&(u.queues[e.VoiceQueueId].loggedInDb+=1,u.queues[e.VoiceQueueId].agents[e.UserId]=e.VoiceQueueId)},u.onLogout=function(e){console.log("onLogout",e),u.queues[e.VoiceQueueId]&&0<u.queues[e.VoiceQueueId].loggedInDb&&(u.queues[e.VoiceQueueId].loggedInDb-=1,delete u.queues[e.VoiceQueueId].agents[e.UserId])},u.$onInit=g,u.order=[],_.forIn(u.queues,function(e,t){u.order.push(e.id)}),d.onWithoutApply("voice_queue:save",u.onSave),u.interval=o(function(){},999),d.on("user:update",u.onPause),d.on("userVoiceQueue:remove",u.onLogout),d.on("userVoiceQueue:save",u.onLogin);var v=!0,h=1;function b(e){if(u.count=e.count,u.queues=e?_.keyBy(e.rows?e.rows:[],"id"):{},e.rows){u.order=[];for(var t=0;t<e.rows.length;t++)u.order.push(e.rows[t].id)}g()}e.$watch("vm.query.filter",function(e,t){v?n(function(){v=!1}):(t||(h=u.query.page),e!==t&&(u.query.page=1),e||(u.query.page=h),u.getQueues())}),e.$on("$destroy",function(){d.removeAllListeners("voice_queue:save"),u.interval&&o.cancel(u.interval),d.removeAllListeners("user:update"),d.removeAllListeners("userVoiceQueue:remove"),d.removeAllListeners("userVoiceQueue:save")})}e.$inject=["$scope","$timeout","$mdDialog","$q","$document","$interval","queues","rpcQueues","api","socket","toasty","Auth"],angular.module("app.voice").controller("QueuesVoiceRealtimeController",e)}(),function(){"use strict";angular.module("app.auth").factory("helperClasses",function(){return{status:{registered:"green-300-fg icon-checkbox-marked-circle",unregistered:"red-300-fg icon-close-circle",lagged:"red-300-fg icon-close-circle",reachable:"green-300-fg icon-checkbox-marked-circle",unreachable:"red-300-fg icon-close-circle",unknown:"grey-fg icon-minus-circle"},state:{unknown:"grey-fg icon-phone-hangup",not_inuse:"green-300-fg icon-phone-hangup",inuse:"red-300-fg icon-phone-in-talk",busy:"red-300-fg icon-phone-locked",invalid:"grey-fg icon-phone-hangup",unavailable:"grey-fg icon-phone-hangup",ringing:"blue-300-fg icon-phone-incoming",ringinuse:"blue-300-fg icon-phone-incoming",onhold:"blue-300-fg icon-phone-paused"},channelStatus:{ring:"blue-300-fg icon-phone-incoming",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"},channelStatusOut:{ring:"blue-300-fg icon-phone-outgoing",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"}}})}(),function(){"use strict";function e(e,n,t){var a=this;switch(t.disconnect(),t.connect(),a.selectedTab=0,n.current.name){case"app.voice.realtime.agents":a.selectedTab=0;break;case"app.voice.realtime.telephones":a.selectedTab=1;break;case"app.voice.realtime.trunks":a.selectedTab=2;break;case"app.voice.realtime.queues":a.selectedTab=3;break;case"app.voice.realtime.queue_calls":a.selectedTab=4;break;case"app.voice.realtime.abandonedcalls":a.selectedTab=5;break;case"app.voice.realtime.queue_params":a.selectedTab=6;break;case"app.voice.realtime.outbound_calls":a.selectedTab=7;break;default:a.selectedTab=0,n.go("app.voice.realtime.agents")}e.$watch("vm.selectedTab",function(e,t){if(e!==t)switch(e){case 0:n.go("app.voice.realtime.agents");break;case 1:n.go("app.voice.realtime.telephones");break;case 2:n.go("app.voice.realtime.trunks");break;case 3:n.go("app.voice.realtime.queues");break;case 4:n.go("app.voice.realtime.queue_calls");break;case 5:n.go("app.voice.realtime.abandonedcalls");break;case 6:n.go("app.voice.realtime.queue_params");break;case 7:n.go("app.voice.realtime.outbound_calls");break;default:n.go("app.voice.realtime.agents")}})}e.$inject=["$scope","$state","socket"],angular.module("app.voice").controller("VoiceRealtimeController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r){var l=this,d=["fullname","internal","state","status"];function c(){_.forIn(l.telephones,function(e,t){l.rpcTelephones[t]&&_.merge(e,_.pick(l.rpcTelephones[t],d))})}l.count=a.count,l.attributes=["fullname","internal","state","status","address"],l.telephones=a?_.keyBy(a.rows?a.rows:[],"id"):{},l.rpcTelephones=i?_.keyBy(i.rows?i.rows:[],"id"):{},l.query={fields:"id,fullname,internal",role:"telephone",sort:"-updatedAt",limit:10,page:1},l.statusClass=r.status,l.stateClass=r.state,l.success=p,l.$onInit=c,l.showInfo=function(e){t.show(t.alert().clickOutsideToClose(!0).title("Legend").htmlContent("<div>TODO legend status + state</div>").ok("Ok").targetEvent(e))},l.getTelephones=function(){l.query.offset=(l.query.page-1)*l.query.limit,l.promise=o.user.get(l.query,p).$promise},l.onSave=function(e){l.telephones[e.id]&&_.merge(l.telephones[e.id],_.pick(e,d))},s.on("telephone:save",l.onSave);var m=!0,u=1;function p(e){l.telephones=e?_.keyBy(e.rows?e.rows:[],"id"):{},c()}e.$watch("vm.query.filter",function(e,t){m?n(function(){m=!1}):(t||(u=l.query.page),e!==t&&(l.query.page=1),e||(l.query.page=u),l.getTelephones())}),e.$on("$destroy",function(){s.removeAllListeners("telephone:save")})}e.$inject=["$scope","$timeout","$mdDialog","telephones","rpcTelephones","api","socket","helperClasses"],angular.module("app.voice").controller("TelephonesVoiceRealtimeController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l){var d=this,c=["status","stateRegistry","registry","host","port","internal","state","status"];function m(){for(var e,t=0;t<d.trunks.length;t+=1)0<=(e=_.findIndex(d.rpcTrunks,["id",d.trunks[t].id]))&&_.merge(d.trunks[t],_.pick(d.rpcTrunks[e],c))}function u(e,t,n){0<=t&&_.merge(e[t],_.pick(n,c))}d.count=a.count,d.trunks=a?a.rows:[],d.rpcTrunks=i&&i.rows?i.rows:[],d.query={fields:"id,name",active:!0,sort:"-updatedAt",limit:10,page:1},d.statusClass=r.status,d.stateClass=r.state,d.success=v,d.$onInit=m,d.showInfo=function(e){t.show(t.alert().clickOutsideToClose(!0).title("Legend").htmlContent("<div>TODO legend status + state</div>").ok("Ok").targetEvent(e))},d.getTrunks=function(){d.query.offset=(d.query.page-1)*d.query.limit,d.promise=o.trunk.get(d.query,v).$promise},d.goToTrunk=function(e,t){l.go("app.tools.trunks.edit",{id:t.id})},d.onSave=function(e){var t=_.findIndex(d.trunks,["id",e.id]),n=_.findIndex(d.rpcTrunks,["id",e.id]);u(d.trunks,t,e),u(d.rpcTrunks,n,e)},s.on("trunk:save",d.onSave);var p=!0,g=1;function v(e){d.count=e.count,d.trunks=e&&e.rows?e.rows:[],m()}e.$watch("vm.query.filter",function(e,t){p?n(function(){p=!1}):(t||(g=d.query.page),e!==t&&(d.query.page=1),e||(d.query.page=g),d.getTrunks())}),e.$on("$destroy",function(){s.removeAllListeners("trunk:save")})}e.$inject=["$scope","$timeout","$mdDialog","trunks","rpcTrunks","api","socket","helperClasses","$state"],angular.module("app.voice").controller("TrunksVoiceRealtimeController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="VOICE.EDIT_VOICEMAIL",m.voicemail=angular.copy(s),m.voicemails=o,m.newVoicemail=!1,m.voicemail||(m.voicemail={attach:"no"},m.title="VOICE.NEW_VOICEMAIL",m.newVoicemail=!0),m.addNewVoicemail=function(){m.errors=[],r.voiceMail.save(m.voicemail).$promise.then(function(e){m.voicemails.unshift(e.toJSON()),i.success({title:"Voicemail properly created",msg:m.voicemail.name?m.voicemail.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceMail.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMail.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveVoicemail=function(){m.errors=[],r.voiceMail.update({id:m.voicemail.id},m.voicemail).$promise.then(function(e){var t=_.find(m.voicemails,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Voicemail properly saved!",msg:m.voicemail.name?m.voicemail.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceMail.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMail.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteVoicemail=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The voicemail will be deleted.").ariaLabel("Delete Voicemail").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceMail.delete({id:m.voicemail.id}).$promise.then(function(){_.remove(m.voicemails,{id:m.voicemail.id}),i.success({title:"Voicemail properly deleted!",msg:(m.voicemail.name||"voicemail")+" has been deleted!"}),u(m.voicemail)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceMail.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMail.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","voicemails","voicemail","api","Auth","license","setting"],angular.module("app.voice").controller("CreateOrEditVoicemailDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.voicemail={},c.voicemailMessages={count:0,rows:[]},c.selectedVoicemailMessages=[],c.query={fields:"createdAt,updatedAt,id,callerid,duration,audio,stamp,msg_id",sort:"-stamp",limit:10,page:1},c.init=function(e){c.voicemail=e,c.query.id=c.voicemail.id,c.getVoicemailMessages()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the message?").htmlContent("<b>"+(e.name||"message")+"</b> will be deleted.").ariaLabel("delete message").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.voiceMailMessageDownload=function(o,e){return l.voiceMailMessage.download({id:o.id,exists:!0}).$promise.then(function(e){var t=[e.buffer],n="message"+o.id,a=new Blob(t,{type:e.type});n=o.msg_id+".wav";var i=window.document.createElement("a");i.setAttribute("href",URL.createObjectURL(a)),i.setAttribute("download",n),i.click()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t+=1)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMail.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},c.success=p,c.getVoicemailMessages=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.voiceMail.getMessages(c.query,p).$promise},c.createOrEditVoicemailMessage=function(e,t){o.show({controller:"CreateOrEditMessageDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/voicemails/edit/messages/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{voicemail:c.voicemail,message:t,messages:c.voicemailMessages.rows,license:null,setting:null}})},c.exportSelectedVoicemailMessages=function(){var e=angular.copy(c.selectedVoicemailMessages);return c.selectedVoicemailMessages=[],e},c.deleteVoicemailMessage=g,c.deleteSelectedVoicemailMessages=function(e){var t=o.confirm().title("Are you sure want to delete the selected messages?").htmlContent("<b>"+c.selectedVoicemailMessages.length+" selected</b> will be deleted.").ariaLabel("delete messages").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedVoicemailMessages.forEach(function(e){g(e)}),c.selectedVoicemailMessages=[]})};var m=!0,u=1;function p(e){c.voicemailMessages=e||{count:0,rows:[]}}function g(e){l.voiceMailMessage.delete({id:e.id}).$promise.then(function(){_.remove(c.voicemailMessages.rows,{id:e.id}),c.voicemailMessages.count-=1,c.voicemailMessages.rows.length||c.getVoicemailMessages(),r.success({title:"Message deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETvoiceMail"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceMail",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getVoicemailMessages())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.voice").controller("VoicemailMessagesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.voicemail=d||e.params.voicemail||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoVoicemails=function(){e.go("app.voice.voicemails")},c.saveVoicemail=function(){s.voiceMail.update({id:c.voicemail.id},c.voicemail).$promise.then(function(){r.success({title:"Voicemail updated!",msg:c.voicemail.name?c.voicemail.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceMail",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){c.contexts=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","voicemail"],angular.module("app.voice").controller("VoicemailController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.voicemails=r||{count:0,rows:[]},v.table="voicemails",v.listOrder="",v.listOrderAsc=null,v.selectedVoicemails=[],v.query={fields:"createdAt,updatedAt,id,customer_id,fullname,email,password,mailbox,context,tz,attach,envelope,delete,emailbody,emailsubject,maxsecs,maxmsg",sort:"-updatedAt",limit:10,page:1},v.arrayattach=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayenvelope=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraydelete=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.voice.voicemails.edit",{id:e.id,voicemail:e})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the voicemail?").htmlContent("<b>"+(e.name||"voicemail")+"</b> will be deleted.").ariaLabel("delete voicemail").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getVoicemails=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.voiceMail.get(v.query,f).$promise},v.createOrEditVoicemail=function(e,t){i.show({controller:"CreateOrEditVoicemailDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/voicemails/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{voicemail:t,voicemails:v.voicemails.rows,license:v.license,setting:v.setting}})},v.deleteVoicemail=A,v.exportSelectedVoicemails=function(){var e=angular.copy(v.selectedVoicemails);return v.selectedVoicemails=[],e},v.deleteSelectedVoicemails=function(e){var t=i.confirm().title("Are you sure want to delete the selected voicemails?").htmlContent("<b>"+v.selectedVoicemails.length+" selected</b> will be deleted.").ariaLabel("delete Voicemails").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedVoicemails.forEach(function(e){A(e)}),v.selectedVoicemails=[]})},v.deselectVoicemails=function(){v.selectedVoicemails=[]},v.selectAllVoicemails=function(){v.selectedVoicemails=v.voicemails.rows};var h=!0,b=1;function f(e){v.voicemails=e||{count:0,rows:[]}}function A(e){l.voiceMail.delete({id:e.id}).$promise.then(function(){_.remove(v.voicemails.rows,{id:e.id}),v.voicemails.count-=1,v.voicemails.rows.length||v.getVoicemails(),c.success({title:"Voicemail deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvoiceMail"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvoiceMail",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getVoicemails())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","voicemails","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.voice").controller("VoicemailsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="VOICE.EDIT_VOICEQUEUE",m.voiceQueue=angular.copy(s),m.voiceQueues=o,m.newVoiceQueue=!1,m.voiceQueue||(m.voiceQueue={type:"inbound",strategy:"ringall",timeout:15,retry:2,random_periodic_announce:"no",announce_holdtime:"no",announce_position:"no",reportholdtime:"no",autopause:"no",ringinuse:"no",timeoutrestart:"no",setinterfacevar:"no",setqueuevar:"no",setqueueentryvar:"no"},m.title="VOICE.NEW_VOICEQUEUE",m.newVoiceQueue=!0),m.addNewVoiceQueue=function(){m.errors=[],r.voiceQueue.save(m.voiceQueue).$promise.then(function(e){m.voiceQueues.unshift(e.toJSON()),i.success({title:"VoiceQueue properly created",msg:m.voiceQueue.name?m.voiceQueue.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceQueue.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceQueue.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveVoiceQueue=function(){m.errors=[],r.voiceQueue.update({id:m.voiceQueue.id},m.voiceQueue).$promise.then(function(e){var t=_.find(m.voiceQueues,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"VoiceQueue properly saved!",msg:m.voiceQueue.name?m.voiceQueue.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceQueue.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceQueue.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteVoiceQueue=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The voiceQueue will be deleted.").ariaLabel("Delete VoiceQueue").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceQueue.delete({id:m.voiceQueue.id}).$promise.then(function(){_.remove(m.voiceQueues,{id:m.voiceQueue.id}),i.success({title:"VoiceQueue properly deleted!",msg:(m.voiceQueue.name||"voiceQueue")+" has been deleted!"}),u(m.voiceQueue)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceQueue.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceQueue.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","voiceQueues","voiceQueue","api","Auth","license","setting"],angular.module("app.voice").controller("CreateOrEditVoiceQueueDialogController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r){var l=this;function d(){return a.voiceQueue[l.isVoiceRealtime()?"getMembers":"getAgents"]({id:l.voiceQueue.id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){return l.isVoiceRealtime()?l.selectedItems=e.rows?_.map(e.rows,function(e){return e.id=e.UserId,e.fullname=e.membername,e.penalty=e.hasOwnProperty("penalty")?"penalty "+e.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[]:l.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserVoiceQueue?"penalty "+e.UserVoiceQueue.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.selectedItems=l.selectedItems,r.hasRole("admin")?a.user.get({fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise:a.user.getAgents({id:r.getCurrentUser().id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise}).then(function(e){l.items=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserVoiceQueue?"penalty "+e.UserVoiceQueue.penalty:"",e.internal=e.internal?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.items=_.differenceBy(l.items,l.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETUSERS.GETAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}l.voiceQueue=t,l.penalty=0,l.items=[],l.selectedItems=[],l.closeDialog=function(){e.hide()},l.isVoiceRealtime=function(){return o},l.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"penalty",labelAll:s.instant("VOICE.ALL_AGENTS"),labelSelected:s.instant("VOICE.SELECTED_AGENTS"),transferCallback:function(e,t){a.voiceQueue[t?"removeAgents":"addAgents"]({id:l.voiceQueue.id,ids:_.map(e,l.isVoiceRealtime()&&t?"UserId":"id"),penalty:l.penalty||0,realtime:o||!1}).$promise.then(function(){n.success({title:"VoiceQueue properly "+(t?"removed":"added"),msg:"VoiceQueue has been "+(t?"removed":"added")+"!"}),t||d()}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:voiceQueue.ADDAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d()}e.$inject=["$mdDialog","toasty","api","voiceQueue","voiceQueues","realtime","$translate","Auth"],angular.module("app.voice").controller("VoiceQueueagentaddController",e)}(),function(){"use strict";function e(e,n,a,t,i){var o=this;o.voiceQueue=t,o.penalty=0,o.items=[],o.selectedItems=[],o.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("VOICE.ALL_TEAMS"),labelSelected:i.instant("VOICE.SELECTED_TEAMS"),transferCallback:function(e,t){a.voiceQueue[t?"removeTeams":"addTeams"]({id:o.voiceQueue.id,ids:_.map(e,"id"),penalty:o.penalty||0}).$promise.then(function(){n.success({title:"Team properly "+(t?"removed":"added"),msg:"Team has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:voiceQueue.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},o.closeDialog=function(){e.hide()},a.voiceQueue.getTeams({id:o.voiceQueue.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return o.selectedItems=e.rows?e.rows:[],o.dualMultiselectOptions.selectedItems=o.selectedItems,a.team.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){o.items=e.rows?e.rows:[],o.dualMultiselectOptions.items=_.differenceBy(o.items,o.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","voiceQueue","$translate"],angular.module("app.voice").controller("VoiceQueueteamaddController",e)}(),function(){"use strict";function e(n,e,a,i,t,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=t,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=e.protocol()+"://"+e.host(),c.voiceQueue=d||n.params.voiceQueue||{},c.selectedTab=n.params.tab||0,c.teamadddialog=function(e,t){a.show({controller:"VoiceQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/voiceQueues/edit/teamadd/teamadd.html",parent:angular.element(i.body),targetEvent:t,clickOutsideToClose:!0,locals:{voiceQueue:e,voiceQueues:c.voiceQueues?c.voiceQueues.rows:[]}})},c.agentadddialog=function(e,t){a.show({controller:"VoiceQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/voiceQueues/edit/agentadd/agentadd.html",parent:angular.element(i.body),targetEvent:t,clickOutsideToClose:!0,locals:{voiceQueue:e,voiceQueues:c.voiceQueues?c.voiceQueues.rows:[],realtime:!1}})},c.gotogoto=function(e,t){n.go("app.voice.realtime.queues",{})},c.alert=r.info,c.gotoVoiceQueues=function(){n.go("app.voice.voiceQueues")},c.saveVoiceQueue=function(){s.voiceQueue.update({id:c.voiceQueue.id},c.voiceQueue).$promise.then(function(){r.success({title:"VoiceQueue updated!",msg:c.voiceQueue.name?c.voiceQueue.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.voiceMusicOnHold.get({fields:"name",nolimit:"true"}).$promise.then(function(e){c.musiconholds=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmusiconholds",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.sound.get({fields:"name,save_name",sort:"name",nolimit:"true"}).$promise.then(function(e){c.sounds=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsounds",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","voiceQueue"],angular.module("app.voice").controller("VoiceQueueController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.voiceQueues=r||{count:0,rows:[]},v.table="voiceQueues",v.listOrder="",v.listOrderAsc=null,v.selectedVoiceQueues=[],v.query={fields:"createdAt,updatedAt,id,name,type,strategy,timeout,maxlen,retry,wrapuptime,weight,joinempty,leavewhenempty,musiconhold,announce,description,periodic_announce,queue_reporthold,queue_youarenext,queue_thereare,queue_callswaiting,queue_holdtime,queue_minutes,queue_minute,queue_seconds,queue_thankyou,announce_frequency,min_announce_frequency,periodic_announce_frequency,random_periodic_announce,announce_holdtime,announce_position,announce_position_limit,reportholdtime,acw,acwTimeout,autopause,ringinuse,memberdelay,timeoutrestart,monitor_format,context,setinterfacevar,setqueuevar,setqueueentryvar",type:"inbound",sort:"-updatedAt",channel:"voice",limit:10,page:1},v.arraystrategy=_.keyBy([{option:"Ringall",value:"'ringall'"},{option:"Round Robin Memory",value:"'rrmemory'"},{option:"Least Recent",value:"'leastrecent'"},{option:"Fewest Calls",value:"'fewestcalls'"},{option:"Random",value:"'random'"},{option:"Linear",value:"'linear'"},{option:"Weight Random",value:"'wrandom'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayjoinempty=_.keyBy([{option:"no",value:"'no'"},{option:"yes",value:"'yes'"},{option:"strict",value:"'strict'"},{option:"loose",value:"'loose'"},{option:"paused",value:"'paused'"},{option:"penalty",value:"'penalty'"},{option:"inuse",value:"'inuse'"},{option:"ringing",value:"'ringing'"},{option:"unavailable",value:"'unavailable'"},{option:"invalid",value:"'invalid'"},{option:"unknoww",value:"'unknown'"},{option:"wrapup",value:"'wrapup'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayleavewhenempty=_.keyBy([{option:"no",value:"'no'"},{option:"yes",value:"'yes'"},{option:"strict",value:"'strict'"},{option:"loose",value:"'loose'"},{option:"paused",value:"'paused'"},{option:"penalty",value:"'penalty'"},{option:"inuse",value:"'inuse'"},{option:"ringing",value:"'ringing'"},{option:"unavailable",value:"'unavailable'"},{option:"invalid",value:"'invalid'"},{option:"unknoww",value:"'unknown'"},{option:"wrapup",value:"'wrapup'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayrandom_periodic_announce=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayannounce_holdtime=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"},{option:"Once",value:"'once'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayannounce_position=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"},{option:"Limit",value:"'limit'"},{option:"More",value:"'more'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayreportholdtime=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayautopause=_.keyBy([{option:"Yes",value:"'all'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayringinuse=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraytimeoutrestart=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraymonitor_format=_.keyBy([{option:"Inactive",value:"''"},{option:"wav",value:"'wav'"},{option:"wav49",value:"'wav49'"},{option:"gsm",value:"'gsm'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraysetinterfacevar=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraysetqueuevar=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraysetqueueentryvar=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.voice.voiceQueues.edit",{id:e.id,voiceQueue:e})},v.teamadddialog=function(e,t){i.show({controller:"VoiceQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/voiceQueues/edit/teamadd/teamadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{voiceQueue:e,voiceQueues:v.voiceQueues?v.voiceQueues.rows:[]}})},v.agentadddialog=function(e,t){i.show({controller:"VoiceQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/voiceQueues/edit/agentadd/agentadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{voiceQueue:e,voiceQueues:v.voiceQueues?v.voiceQueues.rows:[],realtime:!1}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the voiceQueue?").htmlContent("<b>"+(e.name||"voiceQueue")+"</b> will be deleted.").ariaLabel("delete voiceQueue").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.gotorealtimegoto=function(e,t){n.go("app.voice.realtime.queues",{})},v.success=f,v.getVoiceQueues=function(){v.query.offset=(v.query.page-1)*v.query.limit,m.hasRole("admin")?v.promise=l.voiceQueue.get(v.query,f).$promise:(v.query.id=v.currentUser.id,v.promise=l.user.getQueues(v.query,f).$promise)},v.createOrEditVoiceQueue=function(e,t){i.show({controller:"CreateOrEditVoiceQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/voiceQueues/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{voiceQueue:t,voiceQueues:v.voiceQueues.rows,license:v.license,setting:v.setting}})},v.deleteVoiceQueue=A,v.exportSelectedVoiceQueues=function(){var e=angular.copy(v.selectedVoiceQueues);return v.selectedVoiceQueues=[],e},v.deleteSelectedVoiceQueues=function(e){var t=i.confirm().title("Are you sure want to delete the selected voiceQueues?").htmlContent("<b>"+v.selectedVoiceQueues.length+" selected</b> will be deleted.").ariaLabel("delete VoiceQueues").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedVoiceQueues.forEach(function(e){A(e)}),v.selectedVoiceQueues=[]})},v.deselectVoiceQueues=function(){v.selectedVoiceQueues=[]},v.selectAllVoiceQueues=function(){v.selectedVoiceQueues=v.voiceQueues.rows};var h=!0,b=1;function f(e){v.voiceQueues=e||{count:0,rows:[]}}function A(e){l.voiceQueue.delete({id:e.id}).$promise.then(function(){_.remove(v.voiceQueues.rows,{id:e.id}),v.voiceQueues.count-=1,v.voiceQueues.rows.length||v.getVoiceQueues(),c.success({title:"VoiceQueue deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvoiceQueue"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getVoiceQueues())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","voiceQueues","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.voice").controller("VoiceQueuesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="VOICE.EDIT_VOICERECORDING",m.voiceRecording=angular.copy(s),m.voiceRecordings=o,m.newVoiceRecording=!1,m.voiceRecording||(m.voiceRecording={},m.title="VOICE.NEW_VOICERECORDING",m.newVoiceRecording=!0),m.addNewVoiceRecording=function(){m.errors=[],r.voiceRecording.save(m.voiceRecording).$promise.then(function(e){m.voiceRecordings.unshift(e.toJSON()),i.success({title:"VoiceRecording properly created",msg:m.voiceRecording.name?m.voiceRecording.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceRecording.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceRecording.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveVoiceRecording=function(){m.errors=[],r.voiceRecording.update({id:m.voiceRecording.id},m.voiceRecording).$promise.then(function(e){var t=_.find(m.voiceRecordings,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"VoiceRecording properly saved!",msg:m.voiceRecording.name?m.voiceRecording.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceRecording.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceRecording.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteVoiceRecording=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The voiceRecording will be deleted.").ariaLabel("Delete VoiceRecording").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceRecording.delete({id:m.voiceRecording.id}).$promise.then(function(){_.remove(m.voiceRecordings,{id:m.voiceRecording.id}),i.success({title:"VoiceRecording properly deleted!",msg:(m.voiceRecording.name||"voiceRecording")+" has been deleted!"}),u(m.voiceRecording)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceRecording.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceRecording.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","voiceRecordings","voiceRecording","api","Auth","license","setting"],angular.module("app.voice").controller("CreateOrEditVoiceRecordingDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.voiceRecordings=r||{count:0,rows:[]},v.table="voiceRecordings",v.listOrder="",v.listOrderAsc=null,v.selectedVoiceRecordings=[],v.query={fields:"createdAt,updatedAt,id,format,value,type,uniqueid,calleridnum,exten,connectedlinenum,queue,membername,rating,audio,createdAt,userDisposition",sort:"-updatedAt",limit:10,page:1},v.localizationMap=g,v.pickerModel={dateStart:null},v.downloadfile2=function(o,e){return l.voiceRecording.download({id:o.id}).$promise.then(function(e){var t=[e.buffer],n="download",a=new Blob(t,{type:e.type});n=o.uniqueid+o.format;var i=window.document.createElement("a");i.setAttribute("href",URL.createObjectURL(a)),i.setAttribute("download",n),i.click()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceRecording.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the voiceRecording?").htmlContent("<b>"+(e.name||"voiceRecording")+"</b> will be deleted.").ariaLabel("delete voiceRecording").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getVoiceRecordings=function(){v.query.dateStart=void 0,v.query.dateEnd=void 0,v.pickerModel.dateStart&&(v.query.dateStart=v.pickerModel.dateStart,v.query.dateEnd=v.pickerModel.dateEnd);v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.voiceRecording.get(v.query,f).$promise},v.createOrEditVoiceRecording=function(e,t){i.show({controller:"CreateOrEditVoiceRecordingDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/voiceRecordings/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{voiceRecording:t,voiceRecordings:v.voiceRecordings.rows,license:v.license,setting:v.setting}})},v.deleteVoiceRecording=A,v.exportSelectedVoiceRecordings=function(){var e=angular.copy(v.selectedVoiceRecordings);return v.selectedVoiceRecordings=[],e},v.deleteSelectedVoiceRecordings=function(e){var t=i.confirm().title("Are you sure want to delete the selected voiceRecordings?").htmlContent("<b>"+v.selectedVoiceRecordings.length+" selected</b> will be deleted.").ariaLabel("delete VoiceRecordings").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedVoiceRecordings.forEach(function(e){A(e)}),v.selectedVoiceRecordings=[]})},v.deselectVoiceRecordings=function(){v.selectedVoiceRecordings=[]},v.selectAllVoiceRecordings=function(){v.selectedVoiceRecordings=v.voiceRecordings.rows},v.clearDateFilter=function(){v.pickerModel={dateStart:null},v.getVoiceRecordings()};var h=!0,b=1;function f(e){v.voiceRecordings=e||{count:0,rows:[]}}function A(e){l.voiceRecording.delete({id:e.id}).$promise.then(function(){_.remove(v.voiceRecordings.rows,{id:e.id}),v.voiceRecordings.count-=1,v.voiceRecordings.rows.length||v.getVoiceRecordings(),c.success({title:"VoiceRecording deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvoiceRecording"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvoiceRecording",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getVoiceRecordings())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","voiceRecordings","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.voice").controller("VoiceRecordingsController",e)}(),function(){"use strict";function e(t,n,a,e,i,o,s,r){var l=this;function d(e,t){return{id:e,title:t.name||"NONAME",state:"app.dashboards.custom",stateParams:t,weight:2,hidden:function(){return i.hasRole("agent")||!i.hasPermission(e)&&!i.hasRole("admin")}}}l.isAgent=function(){return i.getCurrentUser()&&i.hasRole("agent")},a.saveItem("apps",{title:"APPS",group:!0,weight:1,hidden:function(){return i.hasRole("agent")}}),s.version.get().$promise.then(function(e){l.version=e&&e.current?e.current:"UNKNOWN"}).catch(function(e){l.version="UNKNOWN"}).finally(function(){a.saveItem("version",{title:"VERSION "+l.version,group:!0,weight:2,hidden:function(){return i.hasRole("agent")}})}),i.isLoggedIn()&&s.dashboard.get().$promise.then(function(e){for(var t=0,n=0;n<e.rows.length;n+=1)t=99999+e.rows[n].id,a.saveItem("apps.dashboards.custom_"+t,d(t,e.rows[n]))}),o.custom&&!r.defaultPageTitle&&r.pageTitle&&angular.element("#pageTitle").html(r.pageTitle),a.saveItem("apps.dashboards",{id:100,title:"Dashboards",translate:"DASHBOARDS.DASHBOARDS",icon:"icon-tile-four",weight:2,hidden:function(){return i.hasRole("agent")||!i.hasPermission(100)&&!i.hasRole("admin")}}),a.saveItem("apps.dashboards.general",{id:101,title:"General",translate:"DASHBOARDS.GENERAL",state:"app.dashboards.general",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(101)&&!i.hasRole("admin")}}),a.saveItem("apps.staff",{id:200,title:"Staff",translate:"STAFF.STAFF",icon:"icon-account-multiple",weight:3,hidden:function(){return i.hasRole("agent")||!i.hasPermission(200)&&!i.hasRole("admin")}}),a.saveItem("apps.staff.users",{id:201,title:"Users",translate:"STAFF.USERS",state:"app.staff.users",weight:1,hidden:function(){return i.hasRole("agent")||i.hasRole("user")||!i.hasPermission(201)&&!i.hasRole("admin")}}),a.saveItem("apps.staff.agents",{id:202,title:"Agents",translate:"STAFF.AGENTS",state:"app.staff.agents",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(202)&&!i.hasRole("admin")}}),a.saveItem("apps.staff.telephones",{id:203,title:"Telephones",translate:"STAFF.TELEPHONES",state:"app.staff.telephones",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(203)&&!i.hasRole("admin")}}),a.saveItem("apps.staff.teams",{id:204,title:"Teams",translate:"STAFF.TEAMS",state:"app.staff.teams",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(204)&&!i.hasRole("admin")}}),a.saveItem("apps.contactmanager",{id:300,title:"ContactManager",translate:"CONTACTMANAGER.CONTACTMANAGER",icon:"icon-account-circle",weight:4,hidden:function(){return!o.cm||i.hasRole("agent")||!i.hasPermission(300)&&!i.hasRole("admin")}}),a.saveItem("apps.contactmanager.lists",{id:301,title:"Lists",translate:"CONTACTMANAGER.LISTS",state:"app.contactmanager.lists",weight:2,hidden:function(){return i.hasRole("agent")||!i.hasPermission(301)&&!i.hasRole("admin")}}),a.saveItem("apps.contactmanager.companies",{id:302,title:"Companies",translate:"CONTACTMANAGER.COMPANIES",state:"app.contactmanager.companies",weight:3,hidden:function(){return i.hasRole("agent")||!i.hasPermission(302)&&!i.hasRole("admin")}}),a.saveItem("apps.contactmanager.globalCustomFields",{id:304,title:"GlobalCustomFields",translate:"CONTACTMANAGER.GLOBALCUSTOMFIELDS",state:"app.contactmanager.globalCustomFields",weight:4,hidden:function(){return i.hasRole("agent")||!i.hasPermission(304)&&!i.hasRole("admin")}}),a.saveItem("apps.contactmanager.contacts",{id:303,title:"Contacts",translate:"CONTACTMANAGER.CONTACTS",state:"app.contactmanager.contacts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(303)&&!i.hasRole("admin")}}),a.saveItem("apps.voice",{id:400,title:"Voice",translate:"VOICE.VOICE",icon:"icon-phone",weight:5,hidden:function(){return i.hasRole("agent")||!i.hasPermission(400)&&!i.hasRole("admin")}}),a.saveItem("apps.voice.voiceQueues",{id:401,title:"VoiceQueues",translate:"VOICE.VOICEQUEUES",state:"app.voice.voiceQueues",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(401)&&!i.hasRole("admin")}}),a.saveItem("apps.voice.inboundroutes",{id:402,title:"InboundRoutes",translate:"VOICE.INBOUNDROUTES",state:"app.voice.inboundroutes",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(402)&&!i.hasRole("admin")}}),a.saveItem("apps.voice.outboundroutes",{id:403,title:"OutboundRoutes",translate:"VOICE.OUTBOUNDROUTES",state:"app.voice.outboundroutes",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(403)&&!i.hasRole("admin")}}),a.saveItem("apps.voice.internalroutes",{id:404,title:"InternalRoutes",translate:"VOICE.INTERNALROUTES",state:"app.voice.internalroutes",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(404)&&!i.hasRole("admin")}}),a.saveItem("apps.voice.contexts",{id:405,title:"Contexts",translate:"VOICE.CONTEXTS",state:"app.voice.contexts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(405)&&!i.hasRole("admin")}}),a.saveItem("apps.voice.voicemails",{id:406,title:"Voicemails",translate:"VOICE.VOICEMAILS",state:"app.voice.voicemails",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(406)&&!i.hasRole("admin")}}),a.saveItem("apps.voice.musiconholds",{id:407,title:"MusicOnHolds",translate:"VOICE.MUSICONHOLDS",state:"app.voice.musiconholds",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(407)&&!i.hasRole("admin")}}),a.saveItem("apps.voice.voiceRecordings",{id:408,title:"VoiceRecordings",translate:"VOICE.VOICERECORDINGS",state:"app.voice.voiceRecordings",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(408)&&!i.hasRole("admin")}}),a.saveItem("apps.voice.chanSpies",{id:409,title:"ChanSpies",translate:"VOICE.CHANSPIES",state:"app.voice.chanSpies",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(409)&&!i.hasRole("admin")}}),a.saveItem("apps.voice.realtime",{id:410,title:"Realtime",translate:"VOICE.REALTIME",state:"app.voice.realtime",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(410)&&!i.hasRole("admin")}}),a.saveItem("apps.chat",{id:500,title:"Chat",translate:"CHAT.CHAT",icon:"icon-hangouts",weight:6,hidden:function(){return!o.chat||i.hasRole("agent")||!i.hasPermission(500)&&!i.hasRole("admin")}}),a.saveItem("apps.chat.chatQueues",{id:501,title:"ChatQueues",translate:"CHAT.CHATQUEUES",state:"app.chat.chatQueues",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(501)&&!i.hasRole("admin")}}),a.saveItem("apps.chat.chatWebsites",{id:502,title:"ChatWebsites",translate:"CHAT.CHATWEBSITES",state:"app.chat.chatWebsites",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(502)&&!i.hasRole("admin")}}),a.saveItem("apps.chat.realtime",{id:510,title:"Realtime",translate:"CHAT.REALTIME",state:"app.chat.realtime",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(510)&&!i.hasRole("admin")}}),a.saveItem("apps.mail",{id:600,title:"Mail",translate:"MAIL.MAIL",icon:"icon-email",weight:7,hidden:function(){return!o.mail||i.hasRole("agent")||!i.hasPermission(600)&&!i.hasRole("admin")}}),a.saveItem("apps.mail.mailQueues",{id:601,title:"MailQueues",translate:"MAIL.MAILQUEUES",state:"app.mail.mailQueues",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(601)&&!i.hasRole("admin")}}),a.saveItem("apps.mail.mailAccounts",{id:602,title:"MailAccounts",translate:"MAIL.MAILACCOUNTS",state:"app.mail.mailAccounts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(602)&&!i.hasRole("admin")}}),a.saveItem("apps.mail.mailSubtatuses",{id:603,title:"MailSubstatuses",translate:"MAIL.MAILSUBSTATUSES",state:"app.mail.mailSubtatuses",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(603)&&!i.hasRole("admin")}}),a.saveItem("apps.mail.realtime",{id:610,title:"Realtime",translate:"MAIL.REALTIME",state:"app.mail.realtime",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(610)&&!i.hasRole("admin")}}),a.saveItem("apps.sms",{id:700,title:"Sms",translate:"SMS.SMS",icon:"icon-message-text",weight:8,hidden:function(){return!o.messaging||i.hasRole("agent")||!i.hasPermission(700)&&!i.hasRole("admin")}}),a.saveItem("apps.sms.smsQueues",{id:701,title:"SmsQueues",translate:"SMS.SMSQUEUES",state:"app.sms.smsQueues",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(701)&&!i.hasRole("admin")}}),a.saveItem("apps.sms.smsAccounts",{id:702,title:"SmsAccounts",translate:"SMS.SMSACCOUNTS",state:"app.sms.smsAccounts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(702)&&!i.hasRole("admin")}}),a.saveItem("apps.sms.realtime",{id:710,title:"Realtime",translate:"SMS.REALTIME",state:"app.sms.realtime",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(710)&&!i.hasRole("admin")}}),a.saveItem("apps.openchannel",{id:800,title:"Openchannel",translate:"OPENCHANNEL.OPENCHANNEL",icon:"icon-google-earth",weight:9,hidden:function(){return!o.openchannel||i.hasRole("agent")||!i.hasPermission(800)&&!i.hasRole("admin")}}),a.saveItem("apps.openchannel.openchannelQueues",{id:801,title:"OpenchannelQueues",translate:"OPENCHANNEL.OPENCHANNELQUEUES",state:"app.openchannel.openchannelQueues",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(801)&&!i.hasRole("admin")}}),a.saveItem("apps.openchannel.openchannelAccounts",{id:802,title:"OpenchannelAccounts",translate:"OPENCHANNEL.OPENCHANNELACCOUNTS",state:"app.openchannel.openchannelAccounts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(802)&&!i.hasRole("admin")}}),a.saveItem("apps.openchannel.realtime",{id:810,title:"Realtime",translate:"OPENCHANNEL.REALTIME",state:"app.openchannel.realtime",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(810)&&!i.hasRole("admin")}}),a.saveItem("apps.fax",{id:900,title:"Fax",translate:"FAX.FAX",icon:"icon-deskphone",weight:10,hidden:function(){return!o.fax||i.hasRole("agent")||!i.hasPermission(900)&&!i.hasRole("admin")}}),a.saveItem("apps.fax.faxQueues",{id:901,title:"FaxQueues",translate:"FAX.FAXQUEUES",state:"app.fax.faxQueues",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(901)&&!i.hasRole("admin")}}),a.saveItem("apps.fax.faxAccounts",{id:902,title:"FaxAccounts",translate:"FAX.FAXACCOUNTS",state:"app.fax.faxAccounts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(902)&&!i.hasRole("admin")}}),a.saveItem("apps.fax.realtime",{id:910,title:"Realtime",translate:"FAX.REALTIME",state:"app.fax.realtime",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(910)&&!i.hasRole("admin")}}),a.saveItem("apps.tools",{id:1e3,title:"Tools",translate:"TOOLS.TOOLS",icon:"icon-auto-fix",weight:13,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1e3)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.cannedAnswers",{id:1002,title:"CannedAnswers",translate:"TOOLS.CANNEDANSWERS",state:"app.tools.cannedAnswers",weight:2,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1002)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.customDashboards",{id:1003,title:"CustomDashboards",translate:"TOOLS.CUSTOMDASHBOARDS",state:"app.tools.customDashboards",weight:3,badge:{content:"beta",color:"orange"},hidden:function(){return i.hasRole("agent")||!i.hasPermission(1003)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.intervals",{id:1004,title:"Intervals",translate:"TOOLS.INTERVALS",state:"app.tools.intervals",weight:4,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1004)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.pauses",{id:1005,title:"Pauses",translate:"TOOLS.PAUSES",state:"app.tools.pauses",weight:5,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1005)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.schedules",{id:42,title:"Scheduler",translate:"TOOLS.SCHEDULER",state:"app.tools.schedules",weight:6,hidden:function(){return i.hasRole("agent")||!i.hasPermission(42)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.sounds",{id:1006,title:"Sounds",translate:"TOOLS.SOUNDS",state:"app.tools.sounds",weight:7,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1006)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.tags",{id:1007,title:"Tags",translate:"TOOLS.TAGS",state:"app.tools.tags",weight:8,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1007)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.templates",{id:1008,title:"Templates",translate:"TOOLS.TEMPLATES",state:"app.tools.templates",weight:9,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1008)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.triggers",{id:1009,title:"Triggers",translate:"TOOLS.TRIGGERS",state:"app.tools.triggers",weight:10,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1009)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.trunks",{id:1010,title:"Trunks",translate:"TOOLS.TRUNKS",state:"app.tools.trunks",weight:11,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1010)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.variables",{id:1011,title:"Variables",translate:"TOOLS.VARIABLES",state:"app.tools.variables",weight:12,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1011)&&!i.hasRole("admin")}}),a.saveItem("apps.callysquare",{id:1100,title:"CallySquare",translate:"CALLYSQUARE.CALLYSQUARE",icon:"icon-sitemap",weight:11,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1100)&&!i.hasRole("admin")}}),a.saveItem("apps.callysquare.odbcs",{id:1101,title:"ODBC",translate:"CALLYSQUARE.ODBC",state:"app.callysquare.odbcs",weight:2,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1101)&&!i.hasRole("admin")}}),a.saveItem("apps.callysquare.squareRecordings",{id:1102,title:"SquareRecordings",translate:"CALLYSQUARE.SQUARERECORDINGS",state:"app.callysquare.squareRecordings",weight:3,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1102)&&!i.hasRole("admin")}}),a.saveItem("apps.callysquare.projects",{id:1103,title:"Projects",translate:"CALLYSQUARE.PROJECTS",state:"app.callysquare.projects",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1103)&&!i.hasRole("admin")}}),a.saveItem("apps.analytics",{id:1200,title:"Analytics",translate:"ANALYTICS.ANALYTICS",icon:"icon-chart-line",weight:14,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1200)&&!i.hasRole("admin")}}),a.saveItem("apps.analytics.metrics",{id:1201,title:"Metrics",translate:"ANALYTICS.METRICS",state:"app.analytics.metrics",weight:3,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1201)&&!i.hasRole("admin")}}),a.saveItem("apps.analytics.extractedReports",{id:1202,title:"ExtractedReports",translate:"ANALYTICS.EXTRACTEDREPORTS",state:"app.analytics.extractedReports",weight:2,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1202)&&!i.hasRole("admin")}}),a.saveItem("apps.analytics.reports",{id:1203,title:"Reports",translate:"ANALYTICS.REPORTS",state:"app.analytics.reports",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1203)&&!i.hasRole("admin")}}),a.saveItem("apps.integrations",{id:1300,title:"Integrations",translate:"INTEGRATIONS.INTEGRATIONS",icon:"icon-heart",weight:15,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1300)&&!i.hasRole("admin")}}),a.saveItem("apps.integrations.zendeskAccounts",{id:1301,title:"ZendeskAccounts",translate:"INTEGRATIONS.ZENDESKACCOUNTS",state:"app.integrations.zendeskAccounts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1301)&&!i.hasRole("admin")}}),a.saveItem("apps.integrations.salesforceAccounts",{id:1302,title:"SalesforceAccounts",translate:"INTEGRATIONS.SALESFORCEACCOUNTS",state:"app.integrations.salesforceAccounts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1302)&&!i.hasRole("admin")}}),a.saveItem("apps.integrations.freshdeskAccounts",{id:1303,title:"FreshdeskAccounts",translate:"INTEGRATIONS.FRESHDESKACCOUNTS",state:"app.integrations.freshdeskAccounts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1303)&&!i.hasRole("admin")}}),a.saveItem("apps.integrations.sugarcrmAccounts",{id:1304,title:"SugarcrmAccounts",translate:"INTEGRATIONS.SUGARCRMACCOUNTS",state:"app.integrations.sugarcrmAccounts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1304)&&!i.hasRole("admin")}}),a.saveItem("apps.integrations.deskAccounts",{id:1302,title:"DeskAccounts",translate:"INTEGRATIONS.DESKACCOUNTS",state:"app.integrations.deskAccounts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1302)&&!i.hasRole("admin")}}),a.saveItem("apps.integrations.zohoAccounts",{id:1302,title:"ZohoAccounts",translate:"INTEGRATIONS.ZOHOACCOUNTS",state:"app.integrations.zohoAccounts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1302)&&!i.hasRole("admin")}}),a.saveItem("apps.settings",{id:1400,title:"Settings",translate:"SETTINGS.SETTINGS",icon:"icon-cog",weight:16,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1400)&&!i.hasRole("admin")}}),a.saveItem("apps.settings.generals",{id:1401,title:"General",translate:"SETTINGS.GENERAL",state:"app.settings.generals",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1401)&&!i.hasRole("admin")}}),a.saveItem("apps.settings.smtps",{id:1402,title:"Smtp",translate:"SETTINGS.SMTP",state:"app.settings.smtps",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1402)&&!i.hasRole("admin")}}),a.saveItem("apps.settings.networks",{id:1403,title:"Networks",translate:"SETTINGS.NETWORKS",state:"app.settings.networks",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1403)&&!i.hasRole("admin")}}),a.saveItem("apps.settings.customizations",{id:1407,title:"Customizations",translate:"SETTINGS.CUSTOMIZATIONS",state:"app.settings.customizations",weight:1,hidden:function(){return!o.custom||i.hasRole("agent")||!i.hasPermission(1407)&&!i.hasRole("admin")}}),a.saveItem("apps.settings.updates",{id:1404,title:"Updates",translate:"SETTINGS.UPDATES",state:"app.settings.updates",weight:1,hidden:function(){return!o.update||i.hasRole("agent")||!i.hasPermission(1404)&&!i.hasRole("admin")}}),a.saveItem("apps.settings.license",{id:1405,title:"License",translate:"SETTINGS.LICENSE",state:"app.settings.license",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1405)&&!i.hasRole("admin")}}),a.saveItem("apps.settings.system",{id:1406,title:"System",translate:"SETTINGS.SYSTEM",state:"app.settings.system",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1406)&&!i.hasRole("admin")}}),a.saveItem("apps.help",{id:1600,title:"Help",translate:"HELP.HELP",icon:"icon-help",weight:17,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1600)&&!i.hasRole("admin")}}),a.saveItem("apps.help.about",{id:1601,title:"About",translate:"HELP.ABOUT",state:"app.help.about",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1601)&&!i.hasRole("admin")}}),a.saveItem("apps.motiondialer",{id:1500,title:"MotionDialer",translate:"MOTIONDIALER.MOTIONDIALER",icon:"icon-fire",weight:5,hidden:function(){return!o.dialer||i.hasRole("agent")||!i.hasPermission(1500)&&!i.hasRole("admin")}}),a.saveItem("apps.motiondialer.queueCampaigns",{id:1501,title:"QueueCampaigns",translate:"MOTIONDIALER.QUEUECAMPAIGNS",state:"app.motiondialer.queueCampaigns",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1501)&&!i.hasRole("admin")}}),a.saveItem("apps.motiondialer.ivrCampaigns",{id:1502,title:"IvrCampaigns",translate:"MOTIONDIALER.IVRCAMPAIGNS",state:"app.motiondialer.ivrCampaigns",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1502)&&!i.hasRole("admin")}}),a.saveItem("apps.motiondialer.realtime",{id:1510,title:"Realtime",translate:"MOTIONDIALER.REALTIME",state:"app.motiondialer.realtime",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1510)&&!i.hasRole("admin")}}),a.saveItem("apps.jscripty",{id:1700,title:"jscripty",translate:"JSCRIPTY.JSCRIPTY",icon:"icon-script",weight:12,hidden:function(){return!o.jscripty||i.hasRole("agent")||!i.hasPermission(1700)&&!i.hasRole("admin")}}),a.saveItem("apps.jscripty.projects",{id:1701,title:"Projects",translate:"JSCRIPTY.PROJECTS",state:"app.jscripty.projects",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1701)&&!i.hasRole("admin")}}),e.saveItem("apps",{title:"APPS",group:!0,weight:1}),e.saveItem("apps.home",{id:100,title:"Home",translate:"DASHBOARDS.HOME",icon:"icon-home",weight:1}),e.saveItem("apps.home.dashboard",{id:101,title:"Dashboard",translate:"DASHBOARDS.DASHBOARD",state:"dashboard",icon:"icon-tile-four",iconClass:"cyan-500-fg",weight:1,hidden:function(){return!i.hasPermission(101)}}),e.saveItem("apps.home.contacts",{id:102,title:"Contacts",translate:"DASHBOARDS.CONTACTS",state:"contacts",icon:"icon-account-circle",iconClass:"red-fg",weight:2,hidden:function(){return!o.cm||!i.hasPermission(102)}}),e.saveItem("apps.home.mycontacts",{id:103,title:"Contacts",translate:"DASHBOARDS.MYCONTACTS",state:"mycontacts",icon:"icon-account-multiple",iconClass:"red-fg",weight:3,hidden:function(){return!o.cm||!i.hasPermission(103)}}),e.saveItem("apps.home.voice",{id:110,title:"Voice",translate:"DASHBOARDS.VOICE",state:"voice",icon:"icon-phone",iconClass:"blue-A700-fg",weight:4,hidden:function(){return!i.hasPermission(110)}}),e.saveItem("apps.home.abandoned",{id:111,title:"Abandoned",translate:"DASHBOARDS.ABANDONED",state:"abandoned",icon:"icon-phone-missed",iconClass:"blue-fg",weight:5,hidden:function(){return!i.hasPermission(111)}}),e.saveItem("apps.home.recordings",{id:104,title:"Recordings",translate:"DASHBOARDS.RECORDINGS",state:"recordings",icon:"icon-audiobook",iconClass:"indigo-A100-fg",weight:6,hidden:function(){return!i.hasPermission(104)}}),e.saveItem("apps.home.chat",{id:105,title:"Chat",translate:"DASHBOARDS.CHAT",state:"chat",icon:"icon-hangouts",iconClass:"green-A700-fg",weight:7,hidden:function(){return!o.chat||!i.hasPermission(105)}}),e.saveItem("apps.home.mail",{id:106,title:"Mail",translate:"DASHBOARDS.MAIL",state:"mail",icon:"icon-email",iconClass:"teal-fg",weight:8,hidden:function(){return!o.mail||!i.hasPermission(106)}}),e.saveItem("apps.home.sms",{id:107,title:"Sms",translate:"DASHBOARDS.SMS",state:"sms",icon:"icon-message-text",iconClass:"orange-fg",weight:9,hidden:function(){return!o.messaging||!i.hasPermission(107)}}),e.saveItem("apps.home.openchannel",{id:108,title:"Openchannel",translate:"DASHBOARDS.OPENCHANNEL",state:"openchannel",icon:"icon-google-earth",iconClass:"amber-A200-fg",weight:10,hidden:function(){return!o.openchannel||!i.hasPermission(108)}}),e.saveItem("apps.home.fax",{id:109,title:"Fax",translate:"DASHBOARDS.FAX",state:"fax",icon:"icon-deskphone",iconClass:"blue-grey-A200-fg",weight:11,hidden:function(){return!o.fax||!i.hasPermission(109)}}),t.$on("$viewContentAnimationEnded",function(e){e.targetScope.$id===t.$id&&n.$broadcast("msSplashScreen::remove")})}e.$inject=["$scope","$rootScope","msNavigationService","msNavigationAgentService","Auth","license","api","setting"],angular.module("motion").controller("MainController",e)}(),function(){"use strict";function e(e,t,n,a,i,o){var s=this;function r(e){if(e&&e.id){var t=99999+e.id;i.saveItem("apps.dashboards.custom_"+t,{id:t,title:e.name||"NONAME",badge:{content:"beta",color:"orange"},state:"app.dashboards.custom",stateParams:e,weight:2,hidden:function(){return o.hasRole("agent")||!o.hasPermission(t)&&!o.hasRole("admin")}})}}s.bodyEl=angular.element("body"),s.msScrollOptions={suppressScrollX:!0},s.setting=n,s.$onInit=function(){s.folded="true"===t.get("motion.folded")||!1},s.toggleMsNavigationFolded=function(){s.folded=!s.folded,t.put("motion.folded",s.folded)},s.getLogo=function(){return s.setting.defaultHeaderWhiteLabel?"xCALLY Motion":s.setting.headerWhiteLabel},a.on("dashboard:save",r),a.on("dashboard:update",r),a.on("dashboard:remove",function(e){if(e&&e.id){var t=99999+e.id;i.deleteItem("apps.dashboards.custom_"+t)}}),e.$on("$stateChangeSuccess",function(){s.bodyEl.removeClass("ms-navigation-horizontal-mobile-menu-active")})}e.$inject=["$scope","$cookies","setting","socket","msNavigationService","Auth"],angular.module("app.navigation").controller("NavigationController",e)}(),function(){"use strict";function e(e,a,i,t,n,o,s,r){var l=this;function d(n){s.isSupported()?s.requestPermission().then(function(){var e,t;t={autoClose:!0,duration:10,showOnPageHidden:!0,icon:"api/users/"+(e=n).FromId+"/avatar",body:e.body||"",focusOnclick:!0,closeOnClick:!0},s.show(a.instant("QUICKPANEL.NEW_INTERNAL_MESSAGE"),t)},function(e){console.error("Please enable browser notifications!",e)}):console.error("Browser notifications are not supported by the browser. Normal notifications will be used.")}l.date=moment().format(),l.currentUser=t.getCurrentUser(),l.license=r,l.unreadTotalMessages=0,l.unreadTotalGroupMessages=0,l.userIsNotPhonebar=function(){return"admin"===l.currentUser.role||"user"===l.currentUser.role||"agent"===l.currentUser.role&&0!==l.currentUser.showWebBar},l.onMessageSave=function(e){e.ToId===l.currentUser.id&&e.FromId!==l.currentUser.id&&!e.read&&e.ChatGroupId&&(l.unreadTotalGroupMessages++,d(e));e.ToId!==l.currentUser.id||e.ChatGroupId||(l.unreadTotalMessages+=1,d(e))},l.onMessageUpdate=function(e){e.ToId===l.currentUser.id&&e.read&&0<l.unreadTotalMessages&&!e.ChatGroupId&&(l.unreadTotalMessages-=1);e.ToId==l.currentUser.id&&e.FromId!==l.currentUser.id&&e.ChatGroupId&&e.read&&0<l.unreadTotalGroupMessages&&l.unreadTotalGroupMessages--},n.on("chatInternalMessage:save",l.onMessageSave),n.on("chatInternalMessage:update",l.onMessageUpdate),o.chatInternalMessage.get({fields:"FromId",ToId:l.currentUser.id,read:!1,nolimit:!0,ChatGroupId:"null"}).$promise.then(function(e){return e&&e.count&&(l.unreadTotalMessages=e.count),o.user.getGroups({id:l.currentUser.id}).$promise}).then(function(e){for(var t=[],n=e.rows,a=0;a<n.length;a++)t.push(o.chatGroup.getUnread({id:n[a].id}).$promise);return i.all(t)}).then(function(e){for(var t=0;t<e.length;t++)l.unreadTotalGroupMessages+=e[t].count}).catch(function(e){console.error(e)}),e.$on("$destroy",function(){n.removeAllListeners("chatInternalMessage:save"),n.removeAllListeners("chatInternalMessage:update")})}e.$inject=["$scope","$translate","$q","Auth","socket","api","desktopNotification","license"],angular.module("app.quick-panel").controller("QuickPanelController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m){var u=this;function p(e){var t=angular.element("#chat-dialog");a(function(){t.animate({scrollTop:t[0].scrollHeight},e)},0)}function g(e){return _.isNil(e)?"":e.replace(/[^\w.+#*\-]+/g,"")}function v(e){return m.get(e).success(function(){t.success({title:"Successful call",msg:"Call properly handled!"})}).error(function(e){t.error({title:"PhoneBar API Error",msg:d.instant("CONTACTMANAGER.ERRORS.PHONEBAR_API")})})}u.currentUser=i.getCurrentUser(),u.user=void 0,u.users={count:0,rows:[]},u.standardDate=moment(0).format("YYYY-MM-DD HH:mm:ss"),u.unreadMessage={},u.replyMessage="",u.disabled=!1,u.init=function(e){u.license=e},u.toggleChat=function(e){if(e){if(!e.allowmessenger&&"agent"===e.role)return t.warning({title:d.instant("QUICKPANEL.WARNING"),msg:d.instant("QUICKPANEL.MESSENGER_DISABLED")}),void(u.user=void 0);u.user=e,u.replyMessage="",n.chatInternalMessage.get({sort:"createdAt",FromId:u.currentUser.id+","+e.id,ToId:u.currentUser.id+","+e.id,ChatGroupId:"null"}).$promise.then(function(e){if(e&&e.rows){u.user.messages=e;for(var t=0;t<u.user.messages.rows.length;t+=1)!1===u.user.messages.rows[t].read&&u.user.messages.rows[t].ToId===u.currentUser.id&&n.chatInternalMessage.update({id:u.user.messages.rows[t].id,read:!0})}}).finally(function(){p(0)})}else u.user=void 0},u.reply=function(){u.disabled=!0;Date.now();if(""===u.replyMessage)return void(u.disabled=!1);var e={FromId:u.currentUser.id,ToId:u.user.id,body:u.replyMessage,read:!1};u.replyMessage="",n.chatInternalMessage.save(e).$promise.then(function(e){u.user.messages.rows.push(e),u.user.lastMessageAt=e.createdAt,u.user.lastMessage=e,p(400)}).catch(function(e){}).finally(function(){u.disabled=!1})},u.onMessageSave=function(e){if(e.ToId===u.currentUser.id&&!e.ChatGroupId){u.user&&u.user.id===e.FromId?(u.user.messages.rows.push(e),p(0),n.chatInternalMessage.update({id:e.id,read:!0})):u.unreadMessage[e.FromId]=u.unreadMessage[e.FromId]?u.unreadMessage[e.FromId]+1:1;var t=_.find(u.users.rows,{id:e.FromId});t&&(t.lastMessageAt=e.createdAt,t.lastMessage=e)}},u.onMessageUpdate=function(e){if((e.FromId===u.currentUser.id||e.ToId===u.currentUser.id)&&!e.ChatGroupId){if(u.user){var t=_.find(u.user.messages.rows,{id:e.id});t&&_.merge(t,e)}var n=_.find(u.users.rows,{id:u.currentUser.id===e.FromId?e.ToId:e.FromId});n&&n.lastMessage&&_.merge(n.lastMessage,e),e.ToId===u.currentUser.id&&e.read&&0<u.unreadMessage[e.FromId]&&(u.unreadMessage[e.FromId]-=1)}},u.onUserUpdate=function(e){var t=_.find(u.users.rows,{id:e.id});t&&(_.isNil(e.online)||t.online===e.online||(t.online=e.online),_.isNil(e.allowmessenger)||t.allowmessenger===e.allowmessenger||(t.allowmessenger=e.allowmessenger))},u.webcall=function(e){c.$broadcast("webrtc::call",{target:g(e)})},u.call=function(e){return v("http://127.0.0.1:"+(u.user.phoneBarRemoteControlPort||"9888")+"/api/originate/"+g(e))},u.transfer=function(e){return v("http://127.0.0.1:"+(u.user.phoneBarRemoteControlPort||"9888")+"/api/transfer?number="+g(e))},o.on("chatInternalMessage:save",u.onMessageSave),o.on("chatInternalMessage:update",u.onMessageUpdate),o.on("user:update",u.onUserUpdate),s("quick-panel").onClose(function(){u.user=void 0}),n.chatInternalMessage.get({fields:"FromId",ToId:u.currentUser.id,read:!1,nolimit:!0,ChatGroupId:"null"}).$promise.then(function(e){u.unreadMessage=_.countBy(e.rows,"FromId")}).catch(function(e){}),n.chatInternalMessage.getUsers().$promise.then(function(e){u.users=e}).catch(function(e){console.error(e)}),e.$on("$destroy",function(){o.removeAllListeners("chatInternalMessage:save"),o.removeAllListeners("chatInternalMessage:update"),o.removeAllListeners("user:update")})}e.$inject=["$scope","toasty","api","$timeout","Auth","socket","$mdSidenav","$q","$interval","$translate","$rootScope","$http"],angular.module("app.quick-panel").controller("ChatInternalController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l){var d=this;function c(e){a.hide(e)}d.errors=[],d.title="QUICKPANEL.EDIT_CHATGROUP",d.group=angular.copy(r),d.currentUser=s.getCurrentUser(),d.members=l,d.newChatGroup=!0,d.group||(d.group={write:!0,members:[]},d.title="QUICKPANEL.NEW_CHATGROUP"),d.saveChatGroup=function(){var n;return d.errors=[],o.chatGroup.save({name:d.group.name,write:d.group.write}).$promise.then(function(e){var t=_.map(d.group.members,"id");return t.unshift(d.currentUser.id),n=e,o.chatGroup.addMembers({id:n.id,ids:t}).$promise}).then(function(){i.success({title:"Group properly saved!",msg:n.name+" has been saved!"}),c(n)}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatQueue.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},d.closeDialog=c,d.querySearch=function(e){return e?d.members.rows.filter((t=e,n=angular.lowercase(t),function(e){var t=e.name.toLowerCase();return-1!=t.indexOf(n)})):[];var t,n}}e.$inject=["$scope","$state","$location","$mdDialog","toasty","api","Auth","group","members"],angular.module("app.quick-panel").controller("CreateOrEditChatGroupDialogController",e)}(),function(){"use strict";function e(e,n,a,o,t,s,i,r,l,d){var c=this;function m(){delete c.group}function u(e){var t=angular.element("#chat-group-dialog");a(function(){t.animate({scrollTop:t[0].scrollHeight},e)},0)}c.currentUser=i.getCurrentUser(),c.unreadGroupMessages={},c.groups={},c.participants,c.group,c.init=function(e){return c.license=e,r.user.getGroups({id:c.currentUser.id}).$promise.then(function(e){for(var t=0,n=[];t<e.rows.length;t++)e.rows[t].unreadGroupMessages=0,c.groups[e.rows[t].id]=e.rows[t],n.push(r.chatGroup.getUnread({id:e.rows[t].id}).$promise);return s.all(n)}).then(function(e){for(var t=0;t<e.length;t++)c.groups[e[t].id].unreadGroupMessages+=e[t].count}).catch(function(e){console.error(e)})},c.back=m,c.addGroup=function(e,t){o.show({controller:"CreateOrEditChatGroupDialogController",controllerAs:"vm",templateUrl:"app/quick-panel/tabs/groups/create/dialog.html",parent:angular.element(n.body),targetEvent:t,clickOutsideToClose:!0,locals:{group:e,me:c.currentUser,license:null,setting:null},resolve:{members:function(){return r.user.get({role:"agent"}).$promise}}}).then(function(e){e&&(c.groups[e.id]=e)}).catch(function(e){e&&console.error(e.message)})},c.deleteGroup=function(e,t){var n=o.confirm().title("Are you sure want to delete the selected group?").htmlContent("Group <b>"+e.name+"</b> will be deleted.").ariaLabel("delete Group").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){return r.chatGroup.delete({id:e.id}).$promise}).then(function(){delete c.groups[e.id],d.success({title:"Group properly deleted!",msg:e.name+" has been deleted!"})}).catch(function(e){e&&d.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatGroup.delete",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},c.groupsToArray=function(){return _.values(c.groups)},c.showMessageInfo=function(e,i){o.show({controller:"ShowMessageInfoDialogController",controllerAs:"vm",templateUrl:"app/quick-panel/tabs/groups/info/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{message:i},resolve:{data:function(){var a={messages:[]};return r.chatInternalMessage.get({ChatInternalMessageId:i.id}).$promise.then(function(e){var t=[];a.messages=e.rows,a.messages.unshift(i);for(var n=0;n<a.messages.length;n++)t.push(r.user.get({id:a.messages[n].ToId,fields:"id,name,fullname,userpic"}).$promise);return s.all(t)}).then(function(e){return a.users=e,a}).catch(function(e){e&&console.error(e)})}}}).then(function(){}).catch(function(e){e&&console.error(e.message)})},c.toggleChat=function(t){c.group={id:t.id,write:t.write,messages:{}},r.chatGroup.getMembers({id:t.id,fields:"id,name,fullname"}).$promise.then(function(e){return c.group.membersByKeys=_.keyBy(e.rows,"id"),c.group.members=_.differenceBy(e.rows,[{id:c.currentUser.id}],"id"),c.participants=_.map(c.group.members,"fullname").join(", "),r.chatGroup.getMessages({id:t.id}).$promise}).then(function(e){for(var t,n=0,a=[];n<e.count;n++)e.rows[n].ToId===c.currentUser.id&&(t=e.rows[n],c.group.messages[t.id]=t,e.rows[n].ToId!=c.currentUser.id||e.rows[n].FromId===c.currentUser.id||t.read||a.push(r.chatInternalMessage.update({id:t.id,read:!0})));return s.all(a)}).then(function(){u(400)}).catch(function(e){console.error(e.message)})},c.reply=function(){if(!c.replyMessage)return;var n={id:c.group.id,FromId:c.currentUser.id,ToId:c.currentUser.id,body:c.replyMessage,read:!0},a=[];c.replyMessage="",r.chatGroup.addMessage(n).$promise.then(function(e){n.read=!1,n.ChatInternalMessageId=e.id;for(var t=0;t<c.group.members.length;t++)c.group.members[t].id!==c.currentUser.id&&(n.ToId=c.group.members[t].id,a.push(r.chatGroup.addMessage(angular.copy(n)).$promise));return s.all(a)}).catch(function(e){console.log(e)})},l.on("chatInternalMessage:save",function(t){if(!c.group&&t.ToId===c.currentUser.id&&t.FromId!==c.currentUser.id&&!t.read&&t.ChatGroupId){var e=c.groups[t.ChatGroupId];if(!e)return r.chatGroup.get({id:t.ChatGroupId}).$promise.then(function(e){e.unreadGroupMessages=1,c.groups[e.id]=e});e.unreadGroupMessages||(e.unreadGroupMessages=0),e.unreadGroupMessages++}c.group&&t.ChatGroupId===c.group.id&&t.ToId===c.currentUser.id&&r.chatInternalMessage.update({id:t.id,read:!0}).$promise.then(function(){var e;e=t,c.group.messages[e.id]=e,u(400)})}),l.on("chatInternalMessage:update",function(e){e.ToId==c.currentUser.id&&e.FromId!==c.currentUser.id&&e.ChatGroupId&&e.read&&(0<c.groups[e.ChatGroupId].unreadGroupMessages&&c.groups[e.ChatGroupId].unreadGroupMessages--,c.group.messages[e.id]&&(c.group.messages[e.id].read=!0))}),l.on("chatGroup:remove",function(e){c.groups[e.id]&&delete c.groups[e.id]}),t("quick-panel").onClose(m),e.$on("$destroy",function(){l.removeAllListeners("chatInternalMessage:save"),l.removeAllListeners("chatInternalMessage:update"),l.removeAllListeners("chatGroup:remove")})}e.$inject=["$scope","$document","$timeout","$mdDialog","$mdSidenav","$q","Auth","api","socket","toasty"],angular.module("app.quick-panel").controller("ChatGroupController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){this.data=r,this.title="QUICKPANEL.INFO",this.closeDialog=function(){a.hide()}}e.$inject=["$scope","$state","$location","$mdDialog","toasty","api","Auth","data"],angular.module("app.quick-panel").controller("ShowMessageInfoDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o){var s=this;s.form={token:o.token},s.setting={},s.resetPassword=function(){return i.auth.reset(s.form).$promise.then(function(){t.success({title:n.instant("RESETPASSWORD.PASSWORD_RESET"),msg:n.instant("RESETPASSWORD.PASSWORD_RESET_MESSAGE")}),a.go("app.login")}).catch(function(e){e&&t.error({title:n.instant("RESETPASSWORD.PASSWORD_RESET_ERROR"),msg:e.data?e.data.message||e.message||e:e.message||e})})},s.onInit=function(){e.isLoggedIn()&&a.go("app.dashboards.general");return i.setting.gdpr({id:1}).$promise.then(function(e){s.setting=e,s.passwordPattern=s.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:""}).catch(function(e){e&&t.error({title:"Error",msg:e.data?e.data.message||e.message||e:e.message||e})})}}e.$inject=["Auth","toasty","$translate","$state","api","$stateParams"],angular.module("app.reset").controller("ResetPasswordController",e)}(),function(){"use strict";function e(e,t,n,a,i,o){var s=this;function r(){e.hide()}s.errors=[],s.user=a,s.setting=i,s.reset=o,s.passwordPattern=s.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",s.savePassword=function(){s.errors=[],n.user.changePassword({id:s.user.id},{oldPassword:s.oldPassword,newPassword:s.password}).$promise.then(function(){t.show(t.simple().textContent("Your password properly updated").position("top right").hideDelay(5e3)),r()}).catch(function(e){console.error(e),s.errors=e.data.errors&&e.data.errors.length?e.data.errors:[{message:e.data.message||"Authorization error",type:"api.user.changePassword"}]})},s.closeDialog=r}e.$inject=["$mdDialog","$mdToast","api","user","setting","reset"],angular.module("app.toolbar").controller("ChangePasswordController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s){var r=this,l=[];function d(e){_.isNil(e)&&o.cmHopper.update({id:r.preview.id,UserId:null}),a.hide()}r.errors=[],r.preview=s,r.originated=!1,r.disable=!1,r.disableGetContact=!1,l.push(r.preview.id),r.originatePreview=function(){r.originated=!0,r.disable=!0,_.isEmpty(r.preview)?(i.error({title:"Message",msg:"Contact not available"}),r.disable=!1,l=[],d(!0)):o.rpc.getVoiceQueuesPreview({id:r.preview.id}).$promise.then(function(e){d(!0)}).catch(function(e){i.error({title:"Message",msg:e.data}),d(!0)}).finally(function(){r.disable=!1,l=[]})},r.closeDialog=d,r.nextContact=function(){r.disableGetContact=!0,r.originated||o.cmHopper.update({id:r.preview.id,UserId:null});return o.cmHopper.getPreview({hopperIds:l}).$promise.then(function(e){_.isNil(e)||_.isNil(e.Queue)||!e.Queue.dialActive?i.info({title:"PREVIEW",msg:"CAMPAIGN NOT ACTIVE"}):(r.preview=e,l.push(r.preview.id))}).catch(function(e){if(l=[],a.hide(),404===e.status)i.info({title:"PREVIEW",msg:"CONTACT NOT AVAILABLE"});else if(e.data&&e.data.errors&&e.data.errors.length){r.errors=e.data.errors||[{message:e.toString(),type:"api preview"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api preview",msg:e.data?JSON.stringify(e.data.message):e.toString()})}).finally(function(){r.disableGetContact=!1})},e.$on("$destroy",function(){r.originated||o.cmHopper.update({id:r.preview.id,UserId:null})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","api","preview"],angular.module("app.toolbar").controller("PreviewDialogController",e)}(),function(){"use strict";function e(e,t,o,n,s,a,i,r,l,d,c,m,u,p,g,v,h,b,f,A,E){var y,S=this;function T(e){S.voiceQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{}}function C(){S.promise=b.user.getQueues(S.query,T).$promise}function x(e){return v.logout(e).then(function(){return h.disconnect(),t.$broadcast("webrtc::logout"),n.go("app.login")}).catch(function(e){console.error(e)})}function O(e,t){c.show({controller:"ChangePasswordController",controllerAs:"vm",templateUrl:"app/toolbar/changepassword/changepassword.html",parent:angular.element(m.body),targetEvent:e,clickOutsideToClose:!t,locals:{user:S.user,setting:A,reset:t}})}S.voiceQueues={},S.polling=!0,t.global={search:""},S.pauses=[],S.license=f,S.currentUser=v.getCurrentUser(),S.unreadTotalMessages=0,S.unreadTotalGroupMessages=0,S.contcts=0,"agent"===S.currentUser.role&&(y=E(function(){_.some(S.voiceQueues,{dialMethod:"preview",dialActive:!0})&&S.license.dialer&&S.polling?(S.polling=!1,b.cmHopper.getOpenContacts().$promise.then(function(e){e&&_.isNumber(e.contacts)&&(S.contacts=e.contacts)}).finally(function(){S.polling=!0})):S.contacts=0},14999)),S.setting=A,S.bodyEl=angular.element("body"),S.conf={realm:"asterisk",host:a.host(),protocol:a.protocol(),remotePlayerId:"remote-audio",ua:"Motion WebRTC Bar 0.2.0",license:S.license.webrtc,phoneBarExpires:S.currentUser.phoneBarExpires},S.query={id:v.getCurrentUser().id,fields:"id,name,type,dialMethod,dialActive",channel:"voice",nolimit:!0},S.userStatusOptions=[{title:"Online",icon:"icon-checkbox-marked-circle",color:"#4CAF50"},{title:"Away",icon:"icon-clock",color:"#FFC107"},{title:"Do not Disturb",icon:"icon-minus-circle",color:"#F44336"},{title:"Invisible",icon:"icon-checkbox-blank-circle-outline",color:"#BDBDBD"},{title:"Offline",icon:"icon-checkbox-blank-circle-outline",color:"#616161"}],S.languages={en:{title:"English",translation:"TOOLBAR.ENGLISH",code:"en",flag:"us"},it:{title:"Italian",translation:"TOOLBAR.ITALIAN",code:"it",flag:"it"},fr:{title:"French",translation:"TOOLBAR.FRENCH",code:"fr",flag:"fr"},ko:{title:"Korean",translation:"TOOLBAR.KOREAN",code:"ko",flag:"ko"},es:{title:"Spanish",translation:"TOOLBAR.SPANISH",code:"es",flag:"es"},sv:{title:"Swedish",translation:"TOOLBAR.SWEDISH",code:"sv",flag:"sv"},ru:{title:"Russian",translation:"TOOLBAR.RUSSIAN",code:"ru",flag:"ru"},de:{title:"German",translation:"TOOLBAR.GERMAN",code:"de",flag:"de"},ja:{title:"Japanese",translation:"TOOLBAR.JAPANESE",code:"ja",flag:"ja"},"zh-CN":{title:"ChineseSimplified",translation:"TOOLBAR.CHINESESIMPLIFIED",code:"zh-CN",flag:"zh-CN"},"zh-TW":{title:"ChineseTraditional",translation:"TOOLBAR.CHINESETRADITIONAL",code:"zh-TW",flag:"zh-TW"},nl:{title:"Dutch",translation:"TOOLBAR.DUTCH",code:"nl",flag:"nl"},fi:{title:"Finnish",translation:"TOOLBAR.FINNISH",code:"fi",flag:"fi"},da:{title:"Danish",translation:"TOOLBAR.DANISH",code:"da",flag:"da"},"pt-PT":{title:"Portuguese",translation:"TOOLBAR.PORTUGUESE",code:"pt-PT",flag:"pt-PT"},no:{title:"Norwegian",translation:"TOOLBAR.NORWEGIAN",code:"no",flag:"no"},hi:{title:"Hindi",translation:"TOOLBAR.HINDI",code:"hi",flag:"hi"},tr:{title:"Turkish",translation:"TOOLBAR.TURKISH",code:"tr",flag:"tr"},fa:{title:"Persian",translation:"TOOLBAR.PERSIAN",code:"fa",flag:"fa"},pl:{title:"Polish",translation:"TOOLBAR.POLISH",code:"pl",flag:"pl"},lv:{title:"Latvian",translation:"TOOLBAR.LATVIAN",code:"lv",flag:"lv"}},S.toggleSidenav=function(e){i(e).toggle()},S.logout=x,S.changeLanguage=function(e){if(!S.languages.hasOwnProperty(e.code)){return void l.show({template:'<md-toast id="language-message" layout="column" layout-align="center start"><div class="md-toast-content">Motion supports multiple translations through angular-translate module, but currently we do not support the selected language. If you want to help us, send us a message.</div></md-toast>',hideDelay:7e3,position:"top right",parent:"#content"})}S.selectedLanguage=e,u.put("motion.language",e.code),r.use(e.code),"app.callysquare.projects.edit"===n.current.name&&d.location.reload()},S.setUserStatus=function(e){S.userStatus=e},S.toggleHorizontalMobileMenu=function(){S.bodyEl.toggleClass("ms-navigation-horizontal-mobile-menu-active")},S.toggleMsNavigationFolded=function(){g.toggleFolded()},S.search=function(t){for(var e=[],n=g.getFlatNavigation(),a=o.defer(),i=0;i<n.length;i++)n[i].uisref&&e.push(n[i]);t&&(e=e.filter(function(e){if(-1<angular.lowercase(e.title).search(angular.lowercase(t)))return!0}));return s(function(){a.resolve(e)},1e3),a.promise},S.searchResultClick=function(e){e.uisref&&(e.stateParams?n.go(e.state,e.stateParams):n.go(e.state))},S.openSettings=function(e){t.$broadcast("webrtc::settings")},S.changePassword=O,S.isAgent=function(){return v.getCurrentUser()&&v.hasRole("agent")},S.onUserUpdate=function(e){if(e.id===S.user.id)if("agent"===e.role&&_.isBoolean(e.online)&&!e.online)if(0!==S.user.showWebBar){var t=c.confirm().title(r.instant("TOOLBAR.WARNING")+"!").textContent(r.instant("TOOLBAR.SOMEONE_LOGGED_YOU_OUT")).ariaLabel(r.instant("TOOLBAR.WARNING")+"!").ok(r.instant("TOOLBAR.STAY_LOGGED")).cancel("Logout");c.show(t).then(function(){v.queueLogin()}).catch(function(e){x(!0)}).finally(function(){_.merge(S.user,e),v.updateCurrentUser(S.user)})}else x(!0),_.merge(S.user,e),v.updateCurrentUser(S.user);else _.merge(S.user,e),v.updateCurrentUser(S.user)},S.onUserCalled=function(e){2===S.currentUser.showWebBar&&"agent"===S.currentUser.role&&S.currentUser.name===e.membername&&p.info({title:"WebRTC Popup",msg:"<div>              <span>Call from: "+e.calleridnum+"</span><br>              <span>Queue: "+e.queue+"</span><br>              <span>Extra: "+(e.extravar||"Not defined")+"</span><br>              </div>",showClose:!0,timeout:1e4,html:!0})},S.pause=function(e){return b.user.pause({id:S.user.id,type:e||"DEFAULT PAUSE"}).$promise.catch(function(e){p.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:PAUSEUSER",msg:e.status?JSON.stringify(e.data):e.toString()})})},S.unpause=function(){return b.user.unpause({id:S.user.id}).$promise.catch(function(e){p.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UNPAUSEUSER",msg:e.status?JSON.stringify(e.data):e.toString()})})},S.preview=function(t){return S.disable=!0,b.cmHopper.getPreview().$promise.then(function(e){_.isNil(e)||_.isNil(e.Queue)||!e.Queue.dialActive?p.info({title:"PREVIEW",msg:"CAMPAIGN NOT ACTIVE"}):c.show({controller:"PreviewDialogController",controllerAs:"vm",templateUrl:"app/toolbar/preview/dialog.html",parent:angular.element(m.body),targetEvent:t,clickOutsideToClose:!0,locals:{preview:e}})}).catch(function(e){if(404===e.status)p.info({title:"PREVIEW",msg:"CONTACT NOT AVAILABLE"});else if(e.data&&e.data.errors&&e.data.errors.length){S.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelMessage.accept"}];for(var t=0;t<e.data.errors.length;t+=1)p.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else p.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelMessage.accept",msg:e.data?JSON.stringify(e.data.message):e.toString()})}).finally(function(){S.disable=!1})},S.getLogo=function(){return S.setting.defaultHeaderWhiteLabel?"xCALLY Motion":S.setting.headerWhiteLabel},S.userIsNotPhonebar=function(){return"admin"===S.currentUser.role||"user"===S.currentUser.role||"agent"===S.currentUser.role&&0!==S.currentUser.showWebBar},S.onInternalMessageSave=function(e){e.ToId!==S.currentUser.id||e.ChatGroupId||(S.unreadTotalMessages+=1);e.ToId===S.currentUser.id&&e.FromId!==S.currentUser.id&&!e.read&&e.ChatGroupId&&S.unreadTotalGroupMessages++},S.onInternalMessageUpdate=function(e){e.ToId===S.currentUser.id&&e.read&&0<S.unreadTotalMessages&&!e.ChatGroupId&&(S.unreadTotalMessages-=1);e.ToId===S.currentUser.id&&e.read&&e.ChatGroupId&&0<S.unreadTotalGroupMessages&&S.unreadTotalGroupMessages--},S.onUserVoiceQueue=function(e){_.toInteger(e.UserId)===v.getCurrentUser().id&&C()},S.onVoiceQueue=function(e){C()},h.connect(),h.on("user:update",S.onUserUpdate),h.on("user:called",S.onUserCalled),h.on("chatInternalMessage:save",S.onInternalMessageSave),h.on("chatInternalMessage:update",S.onInternalMessageUpdate),h.on("userVoiceQueue:save",S.onUserVoiceQueue),h.on("voiceQueue:save",S.onVoiceQueue),h.on("userVoiceQueue:remove",S.onUserVoiceQueue),h.on("voiceQueue:remove",S.onVoiceQueue),h.on("voiceQueue:update",S.onVoiceQueue),function(){S.user=v.getCurrentUser(),S.conf.ha1=S.user.md5secret,S.conf.id=S.user.id,S.conf.name=S.user.name,S.conf.fullname=S.user.fullname,S.conf.internal=S.user.internal,S.conf.recording=S.user.phoneBarEnableRecording,S.conf.autoAnswer=S.user.phoneBarAutoAnswer,S.conf.enableSettings=S.user.phoneBarEnableSettings,S.conf.enableDtmfTone=S.user.phoneBarEnableDtmfTone,S.conf.autoAnswerDelay=S.user.phoneBarAutoAnswerDelay,S.userStatus=S.userStatusOptions[0];var e=u.get("motion.language");e&&S.languages.hasOwnProperty(e)?S.selectedLanguage=S.languages[e]:S.selectedLanguage=S.languages[r.preferredLanguage()];if(b.pause.get({fields:"name",nolimit:!0}).$promise.then(function(e){S.pauses=e.rows?e.rows:[]}).catch(function(e){p.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETPAUSES",msg:e.status?JSON.stringify(e.data):e.toString()})}),S.setting.securePassword)if(S.user.passwordResetAt){var t=moment(S.user.passwordResetAt).add(S.setting.passwordExpiresDays||90,"day");moment().isAfter(t)?O(null,!0):moment().add(15,"day").isAfter(t)&&p.warning({title:r.instant("TOOLBAR.WARNING")+"!",msg:r.instant("TOOLBAR.PASSWORD_EXPIRE_REMAINING_DAYS")+": "+Math.ceil(t.diff(moment(),"days",!0)),timeout:2e4})}else O(null,!0)}(),C(),b.chatInternalMessage.get({fields:"FromId",ToId:S.currentUser.id,read:!1,nolimit:!0}).$promise.then(function(e){S.unreadTotalMessages=e.rows.length}),e.$on("$destroy",function(){h.removeAllListeners("user:called"),h.removeAllListeners("user:update"),h.removeAllListeners("chatInternalMessage:save"),h.removeAllListeners("chatInternalMessage:update"),h.removeAllListeners("userVoiceQueue:save"),h.removeAllListeners("voiceQueue:save"),h.removeAllListeners("userVoiceQueue:remove"),h.removeAllListeners("voiceQueue:remove"),h.removeAllListeners("voiceQueue:update"),y&&(E.cancel(y),y=null)})}e.$inject=["$scope","$rootScope","$q","$state","$timeout","$location","$mdSidenav","$translate","$mdToast","$window","$mdDialog","$document","$cookies","toasty","msNavigationService","Auth","socket","api","license","setting","$interval"],angular.module("app.toolbar").controller("ToolbarController",e)}();var urlParams=function(e){var t=new Object,n=e.lastIndexOf("?");if(0<n)for(var a=e.substring(n+1).split("&"),i=0;i<a.length;i++)0<(n=a[i].indexOf("="))&&(t[a[i].substring(0,n)]=a[i].substring(n+1));return t}(window.location.href),t0=new Date,MAX_REQUEST_SIZE=10485760,MAX_WIDTH=12e3,MAX_HEIGHT=12e3,EXPORT_URL="http://exp.draw.io/ImageExport2/export",SHARE_HOST="http://localhost:3000",SAVE_URL="api/square/projects/",VARIABLE_URL="/api/variables",STENCIL_PATH="/assets/plugins/square/stencils",SHAPES_PATH="/assets/plugins/square/shapes",IMAGE_PATH="/assets/plugins/square/images",STYLE_PATH="/assets/plugins/square/styles",CSS_PATH="/assets/plugins/square/styles",OPEN_FORM="api/square/projects/open",TEMPLATE_PATH="/assets/plugins/square/templates",RESOURCES_PATH="/assets/plugins/square/resources",RESOURCE_BASE=RESOURCES_PATH+"/grapheditor",tapAndHoldStartsConnection=!0,showConnectorImg=!0,mxLoadResources=!1,mxLanguages=["it","fr","ko","es","sv","ru","de","ja","zh-CN","zh-TW","nl","fi","da","pt-PT","no","hi","tr","fa"],mxLanguage="en",match=document.cookie.match(new RegExp("(^| )motion.language=([^;]+)"));match&&mxLanguages.includes(match[2])&&(mxLanguage=match[2]);var mxBasePath="assets/plugins/mxgraph",mxClient={VERSION:"2.0.0.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&navigator.userAgent.indexOf("MSIE")<0,IS_OP:0<=navigator.userAgent.indexOf("Opera/"),IS_OT:navigator.userAgent.indexOf("Presto/2.4.")<0&&navigator.userAgent.indexOf("Presto/2.3.")<0&&navigator.userAgent.indexOf("Presto/2.2.")<0&&navigator.userAgent.indexOf("Presto/2.1.")<0&&navigator.userAgent.indexOf("Presto/2.0.")<0&&navigator.userAgent.indexOf("Presto/1.")<0,IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&navigator.userAgent.indexOf("Chrome/")<0,IS_GC:0<=navigator.userAgent.indexOf("Chrome/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&navigator.userAgent.indexOf("Firefox/1.")<0&&navigator.userAgent.indexOf("Firefox/2.")<0||0<=navigator.userAgent.indexOf("Iceweasel/")&&navigator.userAgent.indexOf("Iceweasel/1.")<0&&navigator.userAgent.indexOf("Iceweasel/2.")<0||0<=navigator.userAgent.indexOf("SeaMonkey/")&&navigator.userAgent.indexOf("SeaMonkey/1.")<0||0<=navigator.userAgent.indexOf("Iceape/")&&navigator.userAgent.indexOf("Iceape/1.")<0,IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||0<=navigator.userAgent.indexOf("Epiphany/")||0<=navigator.userAgent.indexOf("AppleWebKit/")||0<=navigator.userAgent.indexOf("Gecko/")||0<=navigator.userAgent.indexOf("Opera/"),NO_FO:0<=navigator.userAgent.indexOf("Firefox/1.")||0<=navigator.userAgent.indexOf("Iceweasel/1.")||0<=navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/1.")||0<=navigator.userAgent.indexOf("Camino/1.")||0<=navigator.userAgent.indexOf("Epiphany/2.")||0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("MSIE")||0<=navigator.userAgent.indexOf("Mozilla/2."),IS_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_MAC:0<navigator.userAgent.toUpperCase().indexOf("MACINTOSH"),IS_TOUCH:0<navigator.userAgent.toUpperCase().indexOf("IPAD")||0<navigator.userAgent.toUpperCase().indexOf("IPOD")||0<navigator.userAgent.toUpperCase().indexOf("IPHONE")||0<navigator.userAgent.toUpperCase().indexOf("ANDROID"),IS_LOCAL:document.location.href.indexOf("http://")<0&&document.location.href.indexOf("https://")<0,isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(e,t,n){if(n=n||document,mxClient.IS_IE6)n.write('<link rel="'+e+'" href="'+t+'" charset="ISO-8859-1" type="text/css"/>');else{var a=n.createElement("link");a.setAttribute("rel",e),a.setAttribute("href",t),a.setAttribute("charset","ISO-8859-1"),a.setAttribute("type","text/css"),n.getElementsByTagName("head")[0].appendChild(a)}},include:function(e){document.write('<script src="'+e+'"><\/script>')},dispose:function(){for(var e=0;e<mxEvent.objects.length;e++)null!=mxEvent.objects[e].mxListenerList&&mxEvent.removeAllListeners(mxEvent.objects[e])}};if(mxClient.IS_OP&&mxClient.IS_OT?mxClient.CSS_PREFIX="O":mxClient.IS_SF||mxClient.IS_GC?mxClient.CSS_PREFIX="Webkit":mxClient.IS_MT?mxClient.CSS_PREFIX="Moz":mxClient.IS_IE&&9<=document.documentMode&&(mxClient.CSS_PREFIX="ms"),void 0===mxLoadResources&&(mxLoadResources=!0),"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt"),"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0),void 0!==mxBasePath&&0<mxBasePath.length?("/"==mxBasePath.substring(mxBasePath.length-1)&&(mxBasePath=mxBasePath.substring(0,mxBasePath.length-1)),mxClient.basePath=mxBasePath):mxClient.basePath=".","undefined"!=typeof mxImageBasePath&&0<mxImageBasePath.length?("/"==mxImageBasePath.substring(mxImageBasePath.length-1)&&(mxImageBasePath=mxImageBasePath.substring(0,mxImageBasePath.length-1)),mxClient.imageBasePath=mxImageBasePath):mxClient.imageBasePath=mxClient.basePath+"/images",mxClient.language=void 0!==mxLanguage?mxLanguage:mxClient.IS_IE?navigator.userLanguage:navigator.language,mxClient.defaultLanguage="undefined"!=typeof mxDefaultLanguage?mxDefaultLanguage:"en",mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/common.css"),void 0!==mxLanguages&&(mxClient.languages=mxLanguages),mxClient.IS_IE){if(9<=document.documentMode)mxClient.IS_VML=!1,mxClient.IS_SVG=!0;else{8==document.documentMode?(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml","#default#VML"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office","#default#VML")):(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office"));var ss=document.createStyleSheet();ss.cssText="v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}",mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/explorer.css")}window.attachEvent("onunload",mxClient.dispose)}var mxLog={consoleName:"Console",TRACE:!1,DEBUG:!0,WARN:!0,buffer:"",init:function(){if(null==mxLog.window&&null!=document.body){var e=mxLog.consoleName+" - mxGraph "+mxClient.VERSION,t=document.createElement("table");t.setAttribute("width","100%"),t.setAttribute("height","100%");var n=document.createElement("tbody"),a=document.createElement("tr"),i=document.createElement("td");if(i.style.verticalAlign="top",mxLog.textarea=document.createElement("textarea"),mxLog.textarea.setAttribute("readOnly","true"),mxLog.textarea.style.height="100%",mxLog.textarea.style.resize="none",mxLog.textarea.value=mxLog.buffer,mxLog.textarea.style.width=mxClient.IS_NS&&"BackCompat"!=document.compatMode?"99%":"100%",i.appendChild(mxLog.textarea),a.appendChild(i),n.appendChild(a),a=document.createElement("tr"),mxLog.td=document.createElement("td"),mxLog.td.style.verticalAlign="top",mxLog.td.setAttribute("height","30px"),a.appendChild(mxLog.td),n.appendChild(a),t.appendChild(n),mxLog.addButton("Info",function(e){mxLog.info()}),mxLog.addButton("DOM",function(e){e=mxUtils.getInnerHtml(document.body),mxLog.debug(e)}),mxLog.addButton("Trace",function(e){mxLog.TRACE=!mxLog.TRACE,mxLog.TRACE?mxLog.debug("Tracing enabled"):mxLog.debug("Tracing disabled")}),mxLog.addButton("Copy",function(e){try{mxUtils.copy(mxLog.textarea.value)}catch(e){mxUtils.alert(e)}}),mxLog.addButton("Show",function(e){try{mxUtils.popup(mxLog.textarea.value)}catch(e){mxUtils.alert(e)}}),mxLog.addButton("Clear",function(e){mxLog.textarea.value=""}),a=n=0,"number"==typeof window.innerWidth?(n=window.innerHeight,a=window.innerWidth):(n=document.documentElement.clientHeight||document.body.clientHeight,a=document.body.clientWidth),mxLog.window=new mxWindow(e,t,Math.max(0,a-320),Math.max(0,n-210),300,160),mxLog.window.setMaximizable(!0),mxLog.window.setScrollable(!1),mxLog.window.setResizable(!0),mxLog.window.setClosable(!0),mxLog.window.destroyOnClose=!1,(mxClient.IS_NS||mxClient.IS_IE)&&!mxClient.IS_GC&&!mxClient.IS_SF&&"BackCompat"!=document.compatMode){var o=mxLog.window.getElement();e=function(e,t){mxLog.textarea.style.height=Math.max(0,o.offsetHeight-70)+"px"};mxLog.window.addListener(mxEvent.RESIZE_END,e),mxLog.window.addListener(mxEvent.MAXIMIZE,e),mxLog.window.addListener(mxEvent.NORMALIZE,e),mxLog.textarea.style.height="92px"}}},info:function(){mxLog.writeln(mxUtils.toString(navigator))},addButton:function(e,t){var n=document.createElement("button");mxUtils.write(n,e),mxEvent.addListener(n,"click",t),mxLog.td.appendChild(n)},isVisible:function(){return null!=mxLog.window&&mxLog.window.isVisible()},show:function(){mxLog.setVisible(!0)},setVisible:function(e){null==mxLog.window&&mxLog.init(),null!=mxLog.window&&mxLog.window.setVisible(e)},enter:function(e){if(mxLog.TRACE)return mxLog.writeln("Entering "+e),(new Date).getTime()},leave:function(e,t){if(mxLog.TRACE){var n=0!=t?" ("+((new Date).getTime()-t)+" ms)":"";mxLog.writeln("Leaving "+e+n)}},debug:function(){mxLog.DEBUG&&mxLog.writeln.apply(this,arguments)},warn:function(){mxLog.WARN&&mxLog.writeln.apply(this,arguments)},write:function(){for(var e="",t=0;t<arguments.length;t++)e+=arguments[t],t<arguments.length-1&&(e+=" ");null!=mxLog.textarea?(mxLog.textarea.value+=e,0<=navigator.userAgent.indexOf("Presto/2.5")&&(mxLog.textarea.style.visibility="hidden",mxLog.textarea.style.visibility="visible"),mxLog.textarea.scrollTop=mxLog.textarea.scrollHeight):mxLog.buffer+=e},writeln:function(){for(var e="",t=0;t<arguments.length;t++)e+=arguments[t],t<arguments.length-1&&(e+=" ");mxLog.write(e+"\n")}},mxObjectIdentity={FIELD_NAME:"mxObjectId",counter:0,get:function(e){if("object"==typeof e&&null==e[mxObjectIdentity.FIELD_NAME]){var t=mxUtils.getFunctionName(e.constructor);e[mxObjectIdentity.FIELD_NAME]=t+"#"+mxObjectIdentity.counter++}return e[mxObjectIdentity.FIELD_NAME]},clear:function(e){"object"==typeof e&&delete e[mxObjectIdentity.FIELD_NAME]}};function mxDictionary(){this.clear()}mxDictionary.prototype.map=null,mxDictionary.prototype.clear=function(){this.map={}},mxDictionary.prototype.get=function(e){return e=mxObjectIdentity.get(e),this.map[e]},mxDictionary.prototype.put=function(e,t){var n=mxObjectIdentity.get(e),a=this.map[n];return this.map[n]=t,a},mxDictionary.prototype.remove=function(e){e=mxObjectIdentity.get(e);var t=this.map[e];return delete this.map[e],t},mxDictionary.prototype.getKeys=function(){var e,t=[];for(e in this.map)t.push(e);return t},mxDictionary.prototype.getValues=function(){var e,t=[];for(e in this.map)t.push(this.map[e]);return t},mxDictionary.prototype.visit=function(e){for(var t in this.map)e(t,this.map[t])};var mxResources={resources:[],extension:mxResourceExtension,resourcesEncoded:!1,loadDefaultBundle:!0,loadSpecialBundle:!0,isLanguageSupported:function(e){return null==mxClient.languages||0<=mxUtils.indexOf(mxClient.languages,e)},getDefaultBundle:function(e,t){return mxResources.loadDefaultBundle||!mxResources.isLanguageSupported(t)?e+mxResources.extension:null},getSpecialBundle:function(e,t){if(null==mxClient.languages||!this.isLanguageSupported(t)){var n=t.indexOf("-");0<n&&(t=t.substring(0,n))}return mxResources.loadSpecialBundle&&mxResources.isLanguageSupported(t)&&t!=mxClient.defaultLanguage?e+"_"+t+mxResources.extension:null},add:function(e,t){if((t=null!=t?t:mxClient.language.toLowerCase())!=mxConstants.NONE){var n=mxResources.getDefaultBundle(e,t);if(null!=n)try{var a=mxUtils.load(n);a.isReady()&&mxResources.parse(a.getText())}catch(e){}if(null!=(n=mxResources.getSpecialBundle(e,t)))try{(a=mxUtils.load(n)).isReady()&&mxResources.parse(a.getText())}catch(e){}}},parse:function(e){if(null!=e){e=e.split("\n");for(var t=0;t<e.length;t++)if("#"!=e[t].charAt(0)){var n=e[t].indexOf("=");if(0<n){var a=e[t].substring(0,n),i=e[t].length;13==e[t].charCodeAt(i-1)&&i--,n=e[t].substring(n+1,i),this.resourcesEncoded?(n=n.replace(/\\(?=u[a-fA-F\d]{4})/g,"%"),mxResources.resources[a]=unescape(n)):mxResources.resources[a]=n}}}},get:function(e,t,n){if(null==(e=mxResources.resources[e])&&(e=n),null!=e&&null!=t){n=[];for(var a=null,i=0;i<e.length;i++){var o=e.charAt(i);"{"==o?a="":null!=a&&"}"==o?(0<=(a=parseInt(a)-1)&&a<t.length&&n.push(t[a]),a=null):null!=a?a+=o:n.push(o)}e=n.join("")}return e}};function mxPoint(e,t){this.x=null!=e?e:0,this.y=null!=t?t:0}function mxRectangle(e,t,n,a){mxPoint.call(this,e,t),this.width=null!=n?n:0,this.height=null!=a?a:0}mxPoint.prototype.x=null,mxPoint.prototype.y=null,mxPoint.prototype.equals=function(e){return e.x==this.x&&e.y==this.y},mxPoint.prototype.clone=function(){return mxUtils.clone(this)},mxRectangle.prototype=new mxPoint,mxRectangle.prototype.constructor=mxRectangle,mxRectangle.prototype.width=null,mxRectangle.prototype.height=null,mxRectangle.prototype.setRect=function(e,t,n,a){this.x=e,this.y=t,this.width=n,this.height=a},mxRectangle.prototype.getCenterX=function(){return this.x+this.width/2},mxRectangle.prototype.getCenterY=function(){return this.y+this.height/2},mxRectangle.prototype.add=function(e){if(null!=e){var t=Math.min(this.x,e.x),n=Math.min(this.y,e.y),a=Math.max(this.x+this.width,e.x+e.width);e=Math.max(this.y+this.height,e.y+e.height),this.x=t,this.y=n,this.width=a-t,this.height=e-n}},mxRectangle.prototype.grow=function(e){this.x-=e,this.y-=e,this.width+=2*e,this.height+=2*e},mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)},mxRectangle.prototype.equals=function(e){return e.x==this.x&&e.y==this.y&&e.width==this.width&&e.height==this.height};var mxEffects={animateChanges:function(l,d,c){var m=0,u=function(){for(var e=!1,t=0;t<d.length;t++){var n=d[t];if(n instanceof mxGeometryChange||n instanceof mxTerminalChange||n instanceof mxValueChange||n instanceof mxChildChange||n instanceof mxStyleChange){var a=l.getView().getState(n.cell||n.child,!1);if(null!=a)if(e=!0,n.constructor!=mxGeometryChange||l.model.isEdge(n.cell))mxUtils.setOpacity(a.shape.node,100*m/10);else{var i=l.getView().scale,o=(n.geometry.x-n.previous.x)*i,s=(n.geometry.y-n.previous.y)*i,r=(n.geometry.width-n.previous.width)*i;i=(n.geometry.height-n.previous.height)*i;0==m?(a.x-=o,a.y-=s,a.width-=r,a.height-=i):(a.x+=o/10,a.y+=s/10,a.width+=r/10,a.height+=i/10),l.cellRenderer.redraw(a),mxEffects.cascadeOpacity(l,n.cell,100*m/10)}}}m<10&&e?(m++,window.setTimeout(u,p)):null!=c&&c()},p=30;u()},cascadeOpacity:function(e,t,n){for(var a=e.model.getChildCount(t),i=0;i<a;i++){var o=e.model.getChildAt(t,i),s=e.getView().getState(o);null!=s&&(mxUtils.setOpacity(s.shape.node,n),mxEffects.cascadeOpacity(e,o,n))}if(null!=(t=e.model.getEdges(t)))for(i=0;i<t.length;i++)null!=(a=e.getView().getState(t[i]))&&mxUtils.setOpacity(a.shape.node,n)},fadeOut:function(e,t,n,a,i,o){a=a||40,i=i||30;var s=t||100;if(mxUtils.setOpacity(e,s),o||null==o){var r=function(){s=Math.max(s-a,0),mxUtils.setOpacity(e,s),0<s?window.setTimeout(r,i):(e.style.visibility="hidden",n&&e.parentNode&&e.parentNode.removeChild(e))};window.setTimeout(r,i)}else e.style.visibility="hidden",n&&e.parentNode&&e.parentNode.removeChild(e)}},mxUtils={errorResource:"none"!=mxClient.language?"error":"",closeResource:"none"!=mxClient.language?"close":"",errorImage:mxClient.imageBasePath+"/error.gif",removeCursors:function(e){if(null!=e.style&&(e.style.cursor=""),null!=(e=e.childNodes))for(var t=e.length,n=0;n<t;n+=1)mxUtils.removeCursors(e[n])},getCurrentStyle:mxClient.IS_IE?function(e){return null!=e?e.currentStyle:null}:function(e){return null!=e?window.getComputedStyle(e,""):null},hasScrollbars:function(e){return null!=(e=mxUtils.getCurrentStyle(e))&&("scroll"==e.overflow||"auto"==e.overflow)},bind:function(e,t){return function(){return t.apply(e,arguments)}},eval:function(a){var b=null;if(0<=a.indexOf("function"))try{eval("var _mxJavaScriptExpression="+a),b=_mxJavaScriptExpression,_mxJavaScriptExpression=null}catch(e){mxLog.warn(e.message+" while evaluating "+a)}else try{b=eval(a)}catch(e){mxLog.warn(e.message+" while evaluating "+a)}return b},findNode:function(e,t,n){var a=e.getAttribute(t);if(null!=a&&a==n)return e;for(e=e.firstChild;null!=e;){if(null!=(a=mxUtils.findNode(e,t,n)))return a;e=e.nextSibling}return null},findNodeByAttribute:9<=document.documentMode?function(e,t,n){var a=null;if(null!=e)if(e.nodeType==mxConstants.NODETYPE_ELEMENT&&e.getAttribute(t)==n)a=e;else for(e=e.firstChild;null!=e&&null==a;)a=mxUtils.findNodeByAttribute(e,t,n),e=e.nextSibling;return a}:mxClient.IS_IE?function(e,t,n){return null==e?null:e.ownerDocument.selectSingleNode("//*[@"+t+"='"+n+"']")}:function(e,t,n){return null==e?null:e.ownerDocument.evaluate("//*[@"+t+"='"+n+"']",e.ownerDocument,null,XPathResult.ANY_TYPE,null).iterateNext()},getFunctionName:function(e){var t=null;if(null!=e)if(null!=e.name)t=e.name;else{for(e=e.toString(),t=9;" "==e.charAt(t);)t++;var n=e.indexOf("(",t);t=e.substring(t,n)}return t},indexOf:function(e,t){if(null!=e&&null!=t)for(var n=0;n<e.length;n++)if(e[n]==t)return n;return-1},remove:function(e,t){var n=null;if("object"==typeof t)for(var a=mxUtils.indexOf(t,e);0<=a;)t.splice(a,1),n=e,a=mxUtils.indexOf(t,e);for(var i in t)t[i]==e&&(delete t[i],n=e);return n},isNode:function(e,t,n,a){return!(null==e||isNaN(e.nodeType)||null!=t&&e.nodeName.toLowerCase()!=t.toLowerCase())&&(null==n||e.getAttribute(n)==a)},getChildNodes:function(e,t){t=t||mxConstants.NODETYPE_ELEMENT;for(var n=[],a=e.firstChild;null!=a;)a.nodeType==t&&n.push(a),a=a.nextSibling;return n},createXmlDocument:function(){var e=null;return document.implementation&&document.implementation.createDocument?e=document.implementation.createDocument("","",null):window.ActiveXObject&&(e=new ActiveXObject("Microsoft.XMLDOM")),e},parseXml:mxClient.IS_IE&&(void 0===document.documentMode||document.documentMode<9)?function(e){var t=mxUtils.createXmlDocument();return t.async="false",t.loadXML(e),t}:function(e){return(new DOMParser).parseFromString(e,"text/xml")},clearSelection:document.selection?function(){document.selection.empty()}:window.getSelection?function(){window.getSelection().removeAllRanges()}:void 0,getPrettyXml:function(e,t,n){var a=[];if(null!=e)if(t=t||"  ",n=n||"",e.nodeType==mxConstants.NODETYPE_TEXT)a.push(e.nodeValue);else{a.push(n+"<"+e.nodeName);var i=e.attributes;if(null!=i)for(var o=0;o<i.length;o++){var s=mxUtils.htmlEntities(i[o].nodeValue);a.push(" "+i[o].nodeName+'="'+s+'"')}if(null!=(i=e.firstChild)){for(a.push(">\n");null!=i;)a.push(mxUtils.getPrettyXml(i,t,n+t)),i=i.nextSibling;a.push(n+"</"+e.nodeName+">\n")}else a.push("/>\n")}return a.join("")},removeWhitespace:function(e,t){for(var n=t?e.previousSibling:e.nextSibling;null!=n&&n.nodeType==mxConstants.NODETYPE_TEXT;){var a=t?n.previousSibling:n.nextSibling,i=mxUtils.getTextContent(n);0==mxUtils.trim(i).length&&n.parentNode.removeChild(n),n=a}},htmlEntities:function(e,t){return e=(e=(e=(e=(e=(e||"").replace(/&/g,"&amp;")).replace(/"/g,"&quot;")).replace(/\'/g,"&#39;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;"),(null==t||t)&&(e=e.replace(/\n/g,"&#xa;")),e},isVml:function(e){return null!=e&&"urn:schemas-microsoft-com:vml"==e.tagUrn},getXml:function(e,t){var n="";return null!=e&&(n=null==(n=e.xml)?e.innerHTML?e.innerHTML:(new XMLSerializer).serializeToString(e):n.replace(/\r\n\t[\t]*/g,"").replace(/>\r\n/g,">").replace(/\r\n/g,"\n")),n.replace(/\n/g,t||"&#xa;")},getTextContent:function(e){var t="";return null!=e&&(null!=e.firstChild&&(e=e.firstChild),t=e.nodeValue||""),t},getInnerHtml:mxClient.IS_IE?function(e){return null!=e?e.innerHTML:""}:function(e){return null!=e?(new XMLSerializer).serializeToString(e):""},getOuterHtml:mxClient.IS_IE?function(e){if(null!=e){if(null!=e.outerHTML)return e.outerHTML;var t=[];t.push("<"+e.nodeName);var n=e.attributes;if(null!=n)for(var a=0;a<n.length;a++){var i=n[a].nodeValue;null!=i&&0<i.length&&(t.push(" "),t.push(n[a].nodeName),t.push('="'),t.push(i),t.push('"'))}return 0==e.innerHTML.length?t.push("/>"):(t.push(">"),t.push(e.innerHTML),t.push("</"+e.nodeName+">")),t.join("")}return""}:function(e){return null!=e?(new XMLSerializer).serializeToString(e):""},write:function(e,t){var n=e.ownerDocument.createTextNode(t);return null!=e&&e.appendChild(n),n},writeln:function(e,t){var n=e.ownerDocument.createTextNode(t);return null!=e&&(e.appendChild(n),e.appendChild(document.createElement("br"))),n},br:function(e,t){t=t||1;for(var n=null,a=0;a<t;a++)null!=e&&(n=e.ownerDocument.createElement("br"),e.appendChild(n));return n},button:function(e,t,n){return n=(n=null!=n?n:document).createElement("button"),mxUtils.write(n,e),mxEvent.addListener(n,"click",function(e){t(e)}),n},para:function(e,t){var n=document.createElement("p");return mxUtils.write(n,t),null!=e&&e.appendChild(n),n},addTransparentBackgroundFilter:function(e){e.style.filter+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mxClient.imageBasePath+"/transparent.gif', sizingMethod='scale')"},linkAction:function(e,t,n,a,i){return mxUtils.link(e,t,function(){n.execute(a)},i)},linkInvoke:function(e,t,n,a,i,o){return mxUtils.link(e,t,function(){n[a](i)},o)},link:function(e,t,n,a){var i=document.createElement("span");return i.style.color="blue",i.style.textDecoration="underline",i.style.cursor="pointer",null!=a&&(i.style.paddingLeft=a+"px"),mxEvent.addListener(i,"click",n),mxUtils.write(i,t),null!=e&&e.appendChild(i),i},fit:function(e){var t=parseInt(e.offsetLeft),n=parseInt(e.offsetWidth),a=document.body,i=document.documentElement,o=(a.scrollLeft||i.scrollLeft)+(a.clientWidth||i.clientWidth);o<t+n&&(e.style.left=Math.max(a.scrollLeft||i.scrollLeft,o-n)+"px"),t=parseInt(e.offsetTop),n=parseInt(e.offsetHeight),(o=(a.scrollTop||i.scrollTop)+Math.max(a.clientHeight||0,i.clientHeight))<t+n&&(e.style.top=Math.max(a.scrollTop||i.scrollTop,o-n)+"px")},open:function(e){if(mxClient.IS_NS){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")}catch(e){return mxUtils.alert("Permission to read file denied."),""}var t=Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);return t.initWithPath(e),t.exists()?((e=Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream)).init(t,1,4,null),(t=Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance(Components.interfaces.nsIScriptableInputStream)).init(e),t.read(t.available())):(mxUtils.alert("File not found."),"")}return e=(t=new ActiveXObject("Scripting.FileSystemObject").OpenTextFile(e,1)).readAll(),t.close(),e},save:function(e,t){if(mxClient.IS_NS){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")}catch(e){return void mxUtils.alert("Permission to write file denied.")}var n=Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);n.initWithPath(e),n.exists()||n.create(0,420);var a=Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);a.init(n,34,4,null),a.write(t,t.length),a.flush(),a.close()}else(n=new ActiveXObject("Scripting.FileSystemObject").CreateTextFile(e,!0)).Write(t),n.Close()},saveAs:function(e){var t=document.createElement("iframe");t.setAttribute("src",""),t.style.visibility="hidden",document.body.appendChild(t);try{if(mxClient.IS_NS){var n=t.contentDocument;n.open(),n.write(e),n.close();try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"),t.focus(),saveDocument(n)}catch(e){mxUtils.alert("Permission to save document denied.")}}else(n=t.contentWindow.document).write(e),n.execCommand("SaveAs",!1,document.location)}finally{document.body.removeChild(t)}},copy:function(e){if(window.clipboardData)window.clipboardData.setData("Text",e);else{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");var t=Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);if(t){var n=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);if(n){n.addDataFlavor("text/unicode");var a=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);a.data=e,n.setTransferData("text/unicode",a,2*e.length),t.setData(n,null,Components.interfaces.nsIClipboard.kGlobalClipboard)}}}},load:function(e){return(e=new mxXmlRequest(e,null,"GET",!1)).send(),e},get:function(e,t,n){return new mxXmlRequest(e,null,"GET").send(t,n)},post:function(e,t,n,a){return new mxXmlRequest(e,t).send(n,a)},submit:function(e,t,n,a){return new mxXmlRequest(e,t).simulate(n,a)},loadInto:function(e,t,n){mxClient.IS_IE?t.onreadystatechange=function(){4==t.readyState&&n()}:t.addEventListener("load",n,!1),t.load(e)},getValue:function(e,t,n){return null==(e=null!=e?e[t]:null)&&(e=n),e},getNumber:function(e,t,n){return null==(e=null!=e?e[t]:null)&&(e=n||0),Number(e)},getColor:function(e,t,n){return null==(e=null!=e?e[t]:null)?e=n:e==mxConstants.NONE&&(e=null),e},clone:function(e,t,n){n=null!=n&&n;var a=null;if(null!=e&&"function"==typeof e.constructor){var i;a=new e.constructor;for(i in e)i!=mxObjectIdentity.FIELD_NAME&&(null==t||mxUtils.indexOf(t,i)<0)&&(a[i]=n||"object"!=typeof e[i]?e[i]:mxUtils.clone(e[i]))}return a},equalPoints:function(e,t){if(null==e&&null!=t||null!=e&&null==t||null!=e&&null!=t&&e.length!=t.length)return!1;if(null!=e&&null!=t)for(var n=0;n<e.length;n++)if(e[n]==t[n]||null!=e[n]&&!e[n].equals(t[n]))return!1;return!0},equalEntries:function(e,t){if(null==e&&null!=t||null!=e&&null==t||null!=e&&null!=t&&e.length!=t.length)return!1;if(null!=e&&null!=t)for(var n in e)if(e[n]!=t[n])return!1;return!0},extend:function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},toString:function(e){var t,n="";for(t in e)try{if(null==e[t])n+=t+" = [null]\n";else if("function"==typeof e[t])n+=t+" => [Function]\n";else if("object"==typeof e[t])n=n+(t+" => [")+mxUtils.getFunctionName(e[t].constructor)+"]\n";else n+=t+" = "+e[t]+"\n"}catch(e){n+=t+"="+e.message}return n},toRadians:function(e){return Math.PI*e/180},arcToCurves:function(e,t,n,a,i,o,s,r,l){if(r-=e,l-=t,0===n||0===a)return h;n=Math.abs(n),a=Math.abs(a);var d=-r/2,c=-l/2,m=Math.cos(i*Math.PI/180);i=m*d+(h=Math.sin(i*Math.PI/180))*c;d=-1*h*d+m*c;1<(v=(c=i*i)/(g=n*n)+(p=d*d)/(A=a*a))?(n*=Math.sqrt(v),a*=Math.sqrt(v),o=0):(v=1,o===s&&(v=-1),o=v*Math.sqrt((g*A-g*p-A*c)/(g*p+A*c))),r=m*(c=o*n*d/a)-h*(p=-1*o*a*i/n)+r/2,l=h*c+m*p+l/2,o=0<=(g=Math.atan2((d-p)/a,(i-c)/n)-Math.atan2(0,1))?g:2*Math.PI+g,i=0<=(g=Math.atan2((-d-p)/a,(-i-c)/n)-Math.atan2((d-p)/a,(i-c)/n))?g:2*Math.PI+g,0==s&&0<i?i-=2*Math.PI:0!=s&&i<0&&(i+=2*Math.PI),s=2*i/Math.PI,i/=s=Math.ceil(s<0?-1*s:s),d=8/3*Math.sin(i/4)*Math.sin(i/4)/Math.sin(i/2),c=m*n,m*=a,n*=h,a*=h;for(var u=Math.cos(o),p=-d*(c*(f=Math.sin(o))+a*u),g=-d*(n*f-m*u),v=A=0,h=[],b=0;b<s;++b){o+=i;var f,A=c*(u=Math.cos(o))-a*(f=Math.sin(o))+r,E=(v=n*u+m*f+l,-d*(c*f+a*u));u=-d*(n*f-m*u);h[f=6*b]=Number(p+e),h[f+1]=Number(g+t),h[f+2]=Number(A-E+e),h[f+3]=Number(v-u+t),h[f+4]=Number(A+e),h[f+5]=Number(v+t),p=A+E,g=v+u}return h},getBoundingBox:function(e,t){var n=null;if(null!=e&&null!=t&&0!=t){var a=mxUtils.toRadians(t),i=(n=Math.cos(a),Math.sin(a)),o=new mxPoint(e.x+e.width/2,e.y+e.height/2),s=new mxPoint(e.x,e.y),r=new mxPoint((a=new mxPoint(e.x+e.width,e.y)).x,e.y+e.height),l=new mxPoint(e.x,r.y);s=mxUtils.getRotatedPoint(s,n,i,o),a=mxUtils.getRotatedPoint(a,n,i,o),r=mxUtils.getRotatedPoint(r,n,i,o),l=mxUtils.getRotatedPoint(l,n,i,o);(n=new mxRectangle(s.x,s.y,0,0)).add(new mxRectangle(a.x,a.y,0,0)),n.add(new mxRectangle(r.x,r.y,0,0)),n.add(new mxRectangle(l.x,l.y,0,0))}return n},getRotatedPoint:function(e,t,n,a){a=null!=a?a:new mxPoint;var i=e.x-a.x;return new mxPoint(i*t-(e=e.y-a.y)*n+a.x,e*t+i*n+a.y)},getPortConstraints:function(e,t,n,a){return null==(e=mxUtils.getValue(e.style,mxConstants.STYLE_PORT_CONSTRAINT,null))?a:(a=e.toString(),e=mxConstants.DIRECTION_MASK_NONE,0<=a.indexOf(mxConstants.DIRECTION_NORTH)&&(e|=mxConstants.DIRECTION_MASK_NORTH),0<=a.indexOf(mxConstants.DIRECTION_WEST)&&(e|=mxConstants.DIRECTION_MASK_WEST),0<=a.indexOf(mxConstants.DIRECTION_SOUTH)&&(e|=mxConstants.DIRECTION_MASK_SOUTH),0<=a.indexOf(mxConstants.DIRECTION_EAST)&&(e|=mxConstants.DIRECTION_MASK_EAST),e)},reversePortConstraints:function(e){return(e&mxConstants.DIRECTION_MASK_WEST)<<3|(e&mxConstants.DIRECTION_MASK_NORTH)<<1|(e&mxConstants.DIRECTION_MASK_SOUTH)>>1|(e&mxConstants.DIRECTION_MASK_EAST)>>3},findNearestSegment:function(e,t,n){var a=-1;if(0<e.absolutePoints.length)for(var i=e.absolutePoints[0],o=null,s=1;s<e.absolutePoints.length;s++){var r=e.absolutePoints[s];i=mxUtils.ptSegDistSq(i.x,i.y,r.x,r.y,t,n);(null==o||i<o)&&(o=i,a=s-1),i=r}return a},rectangleIntersectsSegment:function(e,t,n){var a=e.y,i=e.x,o=a+e.height,s=i+e.width;e=t.x;var r=n.x;if(t.x>n.x&&(e=n.x,r=t.x),s<r&&(r=s),e<i&&(e=i),r<e)return!1;i=t.y,s=n.y;var l=n.x-t.x;return 1e-7<Math.abs(l)&&(i=(n=(n.y-t.y)/l)*e+(t=t.y-n*t.x),s=n*r+t),s<i&&(t=s,s=i,i=t),o<s&&(s=o),i<a&&(i=a),!(s<i)},contains:function(e,t,n){return e.x<=t&&e.x+e.width>=t&&e.y<=n&&e.y+e.height>=n},intersects:function(e,t){var n=e.width,a=e.height,i=t.width,o=t.height;if(i<=0||o<=0||n<=0||a<=0)return!1;var s=e.x,r=e.y,l=t.x,d=t.y;o+=d,n+=s,a+=r;return((i=i+l)<l||s<i)&&(o<d||r<o)&&(n<s||l<n)&&(a<r||d<a)},intersectsHotspot:function(e,t,n,a,i,o){if(i=null!=i?i:0,o=null!=o?o:0,0<(a=null!=a?a:1)){var s=e.getCenterX(),r=e.getCenterY(),l=e.width,d=e.height,c=mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE)*e.view.scale;return 0<c&&(mxUtils.getValue(e.style,mxConstants.STYLE_HORIZONTAL,!0)?(r=e.y+c/2,d=c):(s=e.x+c/2,l=c)),l=Math.max(i,l*a),d=Math.max(i,d*a),0<o&&(l=Math.min(l,o),d=Math.min(d,o)),a=new mxRectangle(s-l/2,r-d/2,l,d),0!=(s=mxUtils.toRadians(mxUtils.getValue(e.style,mxConstants.STYLE_ROTATION)||0))&&(i=Math.cos(-s),o=Math.sin(-s),s=new mxPoint(e.getCenterX(),e.getCenterY()),t=(e=mxUtils.getRotatedPoint(new mxPoint(t,n),i,o,s)).x,n=e.y),mxUtils.contains(a,t,n)}return!0},getOffset:function(e,t){var n=0,a=0;if(null!=t&&t){var i=document.body,o=document.documentElement;n=n+(i.scrollLeft||o.scrollLeft),a=a+(i.scrollTop||o.scrollTop)}for(;e.offsetParent;)n+=e.offsetLeft,a+=e.offsetTop,e=e.offsetParent;return new mxPoint(n,a)},getScrollOrigin:function(e){for(var t=document.body,n=document.documentElement,a=new mxPoint(t.scrollLeft||n.scrollLeft,t.scrollTop||n.scrollTop);null!=e&&e!=t&&e!=n;)!isNaN(e.scrollLeft)&&!isNaN(e.scrollTop)&&(a.x+=e.scrollLeft,a.y+=e.scrollTop),e=e.parentNode;return a},convertPoint:function(e,t,n){var a=mxUtils.getScrollOrigin(e);return(e=mxUtils.getOffset(e)).x-=a.x,e.y-=a.y,new mxPoint(t-e.x,n-e.y)},ltrim:function(e,t){return e.replace(RegExp("^["+(t||"\\s")+"]+","g"),"")},rtrim:function(e,t){return e.replace(RegExp("["+(t||"\\s")+"]+$","g"),"")},trim:function(e,t){return mxUtils.ltrim(mxUtils.rtrim(e,t),t)},isNumeric:function(e){return null!=e&&(null==e.length||0<e.length&&e.indexOf("0x")<0&&e.indexOf("0X")<0)&&!isNaN(e)},mod:function(e,t){return(e%t+t)%t},intersection:function(e,t,n,a,i,o,s,r){var l=(r-o)*(n-e)-(s-i)*(a-t);return s=((s-i)*(t-o)-(r-o)*(e-i))/l,i=((n-e)*(t-o)-(a-t)*(e-i))/l,0<=s&&s<=1&&0<=i&&i<=1?new mxPoint(e+s*(n-e),t+s*(a-t)):null},ptSegDistSq:function(e,t,n,a,i,o){return(i-=e)*(n-=e)+(o-=t)*(a-=t)<=0?n=0:n=(e=(i=n-i)*n+(o=a-o)*a)<=0?0:e*e/(n*n+a*a),(i=i*i+o*o-n)<0&&(i=0),i},relativeCcw:function(e,t,n,a,i,o){return 0==(e=(i-=e)*(a-=t)-(o-=t)*(n-=e))&&(0<(e=i*n+o*a)&&((e=(i-n)*n+(o-a)*a)<0&&(e=0))),e<0?-1:0<e?1:0},animateChanges:function(e,t){mxEffects.animateChanges.apply(this,arguments)},cascadeOpacity:function(e,t,n){mxEffects.cascadeOpacity.apply(this,arguments)},fadeOut:function(e,t,n,a,i,o){mxEffects.fadeOut.apply(this,arguments)},setOpacity:function(e,t){mxUtils.isVml(e)?e.style.filter=100<=t?null:"alpha(opacity="+t/5+")":mxClient.IS_IE&&(void 0===document.documentMode||document.documentMode<9)?e.style.filter=100<=t?null:"alpha(opacity="+t+")":e.style.opacity=t/100},createImage:function(e){var t=null;return mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?((t=document.createElement(mxClient.VML_PREFIX+":image")).setAttribute("src",e),t.style.borderStyle="none"):((t=document.createElement("img")).setAttribute("src",e),t.setAttribute("border","0")),t},sortCells:function(e,i){i=null==i||i;var o=new mxDictionary;return e.sort(function(e,t){var n=o.get(e);null==n&&(n=mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR),o.put(e,n));var a=o.get(t);return null==a&&(a=mxCellPath.create(t).split(mxCellPath.PATH_SEPARATOR),o.put(t,a)),0==(n=mxCellPath.compare(n,a))?0:0<n==i?1:-1}),e},getStylename:function(e){return null!=e&&(e=e.split(";")[0]).indexOf("=")<0?e:""},getStylenames:function(e){var t=[];if(null!=e){e=e.split(";");for(var n=0;n<e.length;n++)e[n].indexOf("=")<0&&t.push(e[n])}return t},indexOfStylename:function(e,t){if(null!=e&&null!=t)for(var n=e.split(";"),a=0,i=0;i<n.length;i++){if(n[i]==t)return a;a+=n[i].length+1}return-1},addStylename:function(e,t){return mxUtils.indexOfStylename(e,t)<0&&(null==e?e="":0<e.length&&";"!=e.charAt(e.length-1)&&(e+=";"),e+=t),e},removeStylename:function(e,t){var n=[];if(null!=e)for(var a=e.split(";"),i=0;i<a.length;i++)a[i]!=t&&n.push(a[i]);return n.join(";")},removeAllStylenames:function(e){var t=[];if(null!=e){e=e.split(";");for(var n=0;n<e.length;n++)0<=e[n].indexOf("=")&&t.push(e[n])}return t.join(";")},setCellStyles:function(e,t,n,a){if(null!=t&&0<t.length){e.beginUpdate();try{for(var i=0;i<t.length;i++)if(null!=t[i]){var o=mxUtils.setStyle(e.getStyle(t[i]),n,a);e.setStyle(t[i],o)}}finally{e.endUpdate()}}},setStyle:function(e,t,n){var a=null!=n&&(void 0===n.length||0<n.length);if(null==e||0==e.length)a&&(e=t+"="+n);else{var i=e.indexOf(t+"=");i<0?a&&(a=";"==e.charAt(e.length-1)?"":";",e=e+a+t+"="+n):(t=a?t+"="+n:"",n=e.indexOf(";",i),a||n++,e=e.substring(0,i)+t+(i<n?e.substring(n):""))}return e},setCellStyleFlags:function(e,t,n,a,i){if(null!=t&&0<t.length){e.beginUpdate();try{for(var o=0;o<t.length;o++)if(null!=t[o]){var s=mxUtils.setStyleFlag(e.getStyle(t[o]),n,a,i);e.setStyle(t[o],s)}}finally{e.endUpdate()}}},setStyleFlag:function(e,t,n,a){if(null==e||0==e.length)e=a||null==a?t+"="+n:t+"=0";else{var i=e.indexOf(t+"=");if(i<0)i=";"==e.charAt(e.length-1)?"":";",e=a||null==a?e+i+t+"="+n:e+i+t+"=0";else{var o=e.indexOf(";",i),s="";s=o<0?e.substring(i+t.length+1):e.substring(i+t.length+1,o),s=null==a?parseInt(s)^n:a?parseInt(s)|n:parseInt(s)&~n;e=e.substring(0,i)+t+"="+s+(0<=o?e.substring(o):"")}}return e},getAlignmentAsPoint:function(e,t){var n=0,a=0;return e==mxConstants.ALIGN_CENTER?n=-.5:e==mxConstants.ALIGN_RIGHT&&(n=-1),t==mxConstants.ALIGN_MIDDLE?a=-.5:t==mxConstants.ALIGN_BOTTOM&&(a=-1),new mxPoint(n,a)},getSizeForString:function(e,t,n){t=null!=t?t:mxConstants.DEFAULT_FONTSIZE,n=null!=n?n:mxConstants.DEFAULT_FONTFAMILY;var a=document.createElement("div");return a.style.fontFamily=n,a.style.fontSize=Math.round(t)+"px",a.style.lineHeight=Math.round(t*mxConstants.LINE_HEIGHT)+"px",a.style.position="absolute",a.style.whiteSpace="nowrap",a.style.visibility="hidden",a.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",a.style.zoom="1",a.innerHTML=e,document.body.appendChild(a),e=new mxRectangle(0,0,a.offsetWidth,a.offsetHeight),document.body.removeChild(a),e},getViewXml:function(e,t,n,a,i){a=null!=a?a:0,i=null!=i?i:0,t=null!=t?t:1,null==n&&(n=[e.getModel().getRoot()]);var o=e.getView(),s=null,r=o.isEventsEnabled();o.setEventsEnabled(!1);var l=o.drawPane,d=o.overlayPane;e.dialect==mxConstants.DIALECT_SVG?(o.drawPane=document.createElementNS(mxConstants.NS_SVG,"g"),o.canvas.appendChild(o.drawPane),o.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g")):(o.drawPane=o.drawPane.cloneNode(!1),o.canvas.appendChild(o.drawPane),o.overlayPane=o.overlayPane.cloneNode(!1)),o.canvas.appendChild(o.overlayPane);var c=o.getTranslate();o.translate=new mxPoint(a,i),t=new mxTemporaryCellStates(e.getView(),t,n);try{s=(new mxCodec).encode(e.getView())}finally{t.destroy(),o.translate=c,o.canvas.removeChild(o.drawPane),o.canvas.removeChild(o.overlayPane),o.drawPane=l,o.overlayPane=d,o.setEventsEnabled(r)}return s},getScaleForPageCount:function(e,t,n,a){if(e<1)return 1;a=null!=a?a:0;var i=(n=null!=n?n:mxConstants.PAGE_FORMAT_A4_PORTRAIT).width-2*a;n=n.height-2*a,a=t.getGraphBounds().clone(),t=t.getView().getScale(),a.width/=t,a.height/=t,n=(t=a.width)/a.height/(i/n),a=Math.sqrt(e);var o=Math.sqrt(n);if(n=a*o,a/=o,n<1&&e<a){var s=a/e;a=e,n/=s}for(a<1&&e<n&&(s=n/e,n=e,a/=s),s=Math.ceil(n)*Math.ceil(a),o=0;e<s;){s=Math.floor(n)/n;var r=Math.floor(a)/a;if(1==s&&(s=Math.floor(n-1)/n),1==r&&(r=Math.floor(a-1)/a),n*=s=r<s?s:r,a*=s,s=Math.ceil(n)*Math.ceil(a),10<++o)break}return i*n/t*.99999},show:function(e,t,n,a){if(n=null!=n?n:0,a=null!=a?a:0,null==t?t=window.open().document:t.open(),n=-(i=e.getGraphBounds()).x+n,a=-i.y+a,mxClient.IS_IE){for(var i="<html><head>",o=document.getElementsByTagName("base"),s=0;s<o.length;s++)i+=o[s].outerHTML;for(i+="<style>",s=0;s<document.styleSheets.length;s++)try{i+=document.styleSheets(s).cssText}catch(e){}i+="</style></head>",i+="<body>",i+=e.container.innerHTML,i+="</body>",i+="<html>",t.writeln(i),t.close(),null!=(e=t.body.getElementsByTagName("DIV")[0])&&(e.style.position="absolute",e.style.left=n+"px",e.style.top=a+"px")}else{for(t.writeln("<html"),t.writeln("<head>"),o=document.getElementsByTagName("base"),s=0;s<o.length;s++)t.writeln(mxUtils.getOuterHtml(o[s]));for(o=document.getElementsByTagName("link"),s=0;s<o.length;s++)t.writeln(mxUtils.getOuterHtml(o[s]));for(o=document.getElementsByTagName("style"),s=0;s<o.length;s++)t.writeln(mxUtils.getOuterHtml(o[s]));for(t.writeln("</head>"),t.writeln("</html>"),t.close(),null==t.body&&t.documentElement.appendChild(t.createElement("body")),t.body.style.overflow="auto",e=e.container.firstChild;null!=e;)s=e.cloneNode(!0),t.body.appendChild(s),e=e.nextSibling;null!=(e=t.getElementsByTagName("g")[0])&&(e.setAttribute("transform","translate("+n+","+a+")"),(n=e.ownerSVGElement).setAttribute("width",i.width+Math.max(i.x,0)+3),n.setAttribute("height",i.height+Math.max(i.y,0)+3))}return mxUtils.removeCursors(t.body),t},printScreen:function(e){var t=window.open();mxUtils.show(e,t.document),e=function(){t.focus(),t.print(),t.close()},mxClient.IS_GC?t.setTimeout(e,500):e()},popup:function(e,t){if(t){var n=document.createElement("div");n.style.overflow="scroll",n.style.width="636px",n.style.height="460px";var a=document.createElement("pre");a.innerHTML=mxUtils.htmlEntities(e,!1).replace(/\n/g,"<br>").replace(/ /g,"&nbsp;"),n.appendChild(a),(n=new mxWindow("Popup Window",n,document.body.clientWidth/2-320,(document.body.clientHeight||document.documentElement.clientHeight)/2-240,640,480,!1,!0)).setClosable(!0),n.setVisible(!0)}else mxClient.IS_NS?((n=window.open()).document.writeln("<pre>"+mxUtils.htmlEntities(e)+"</pre"),n.document.close()):((a=(n=window.open()).document.createElement("pre")).innerHTML=mxUtils.htmlEntities(e,!1).replace(/\n/g,"<br>").replace(/ /g,"&nbsp;"),n.document.body.appendChild(a))},alert:function(e){alert(e)},prompt:function(e,t){return prompt(e,t)},confirm:function(e){return confirm(e)},error:function(e,t,n,a){var i=document.createElement("div");i.style.padding="20px";var o=document.createElement("img");o.setAttribute("src",a||mxUtils.errorImage),o.setAttribute("valign","bottom"),o.style.verticalAlign="middle",i.appendChild(o),i.appendChild(document.createTextNode(" ")),i.appendChild(document.createTextNode(" ")),i.appendChild(document.createTextNode(" ")),mxUtils.write(i,e),e=document.body.clientWidth,a=document.body.clientHeight||document.documentElement.clientHeight;var s=new mxWindow(mxResources.get(mxUtils.errorResource)||mxUtils.errorResource,i,(e-t)/2,a/4,t,null,!1,!0);return n&&(mxUtils.br(i),t=document.createElement("p"),n=document.createElement("button"),mxClient.IS_IE?n.style.cssText="float:right":n.setAttribute("style","float:right"),mxEvent.addListener(n,"click",function(e){s.destroy()}),mxUtils.write(n,mxResources.get(mxUtils.closeResource)||mxUtils.closeResource),t.appendChild(n),i.appendChild(t),mxUtils.br(i),s.setClosable(!0)),s.setVisible(!0),s},makeDraggable:function(e,t,n,i,a,o,s,r,l,d){return(e=new mxDragSource(e,n)).dragOffset=new mxPoint(null!=a?a:0,null!=o?o:mxConstants.TOOLTIP_VERTICAL_OFFSET),e.autoscroll=s,e.setGuidesEnabled(!1),null!=l&&(e.highlightDropTargets=l),null!=d&&(e.getDropTarget=d),e.getGraphForEvent=function(e){return"function"==typeof t?t(e):t},null!=i&&(e.createDragElement=function(){return i.cloneNode(!0)},r&&(e.createPreviewElement=function(e){var t=i.cloneNode(!0),n=parseInt(t.style.width),a=parseInt(t.style.height);return t.style.width=Math.round(n*e.view.scale)+"px",t.style.height=Math.round(a*e.view.scale)+"px",t})),e}},mxConstants={DEFAULT_HOTSPOT:.3,MIN_HOTSPOT_SIZE:8,MAX_HOTSPOT_SIZE:0,RENDERING_HINT_EXACT:"exact",RENDERING_HINT_FASTER:"faster",RENDERING_HINT_FASTEST:"fastest",DIALECT_SVG:"svg",DIALECT_VML:"vml",DIALECT_MIXEDHTML:"mixedHtml",DIALECT_PREFERHTML:"preferHtml",DIALECT_STRICTHTML:"strictHtml",NS_SVG:"http://www.w3.org/2000/svg",NS_XHTML:"http://www.w3.org/1999/xhtml",NS_XLINK:"http://www.w3.org/1999/xlink",SHADOWCOLOR:"gray",SHADOW_OFFSET_X:2,SHADOW_OFFSET_Y:3,SHADOW_OPACITY:1,NODETYPE_ELEMENT:1,NODETYPE_ATTRIBUTE:2,NODETYPE_TEXT:3,NODETYPE_CDATA:4,NODETYPE_ENTITY_REFERENCE:5,NODETYPE_ENTITY:6,NODETYPE_PROCESSING_INSTRUCTION:7,NODETYPE_COMMENT:8,NODETYPE_DOCUMENT:9,NODETYPE_DOCUMENTTYPE:10,NODETYPE_DOCUMENT_FRAGMENT:11,NODETYPE_NOTATION:12,TOOLTIP_VERTICAL_OFFSET:16,DEFAULT_VALID_COLOR:"#00FF00",DEFAULT_INVALID_COLOR:"#FF0000",HIGHLIGHT_STROKEWIDTH:3,CURSOR_MOVABLE_VERTEX:"move",CURSOR_MOVABLE_EDGE:"move",CURSOR_LABEL_HANDLE:"default",CURSOR_BEND_HANDLE:"pointer",CURSOR_CONNECT:"pointer",HIGHLIGHT_COLOR:"#00FF00",CONNECT_TARGET_COLOR:"#0000FF",INVALID_CONNECT_TARGET_COLOR:"#FF0000",DROP_TARGET_COLOR:"#0000FF",VALID_COLOR:"#00FF00",INVALID_COLOR:"#FF0000",EDGE_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_STROKEWIDTH:1,EDGE_SELECTION_STROKEWIDTH:1,VERTEX_SELECTION_DASHED:!0,EDGE_SELECTION_DASHED:!0,GUIDE_COLOR:"#FF0000",GUIDE_STROKEWIDTH:1,OUTLINE_COLOR:"#0099FF",OUTLINE_STROKEWIDTH:mxClient.IS_IE?2:3,HANDLE_SIZE:7,LABEL_HANDLE_SIZE:4,HANDLE_FILLCOLOR:"#00FF00",HANDLE_STROKECOLOR:"black",LABEL_HANDLE_FILLCOLOR:"yellow",CONNECT_HANDLE_FILLCOLOR:"#0000FF",LOCKED_HANDLE_FILLCOLOR:"#FF0000",OUTLINE_HANDLE_FILLCOLOR:"#00FFFF",OUTLINE_HANDLE_STROKECOLOR:"#0033FF",DEFAULT_FONTFAMILY:"Arial,Helvetica",DEFAULT_FONTSIZE:11,LINE_HEIGHT:1.2,DEFAULT_FONTSTYLE:0,DEFAULT_STARTSIZE:40,DEFAULT_MARKERSIZE:6,DEFAULT_IMAGESIZE:24,ENTITY_SEGMENT:30,RECTANGLE_ROUNDING_FACTOR:.15,LINE_ARCSIZE:20,ARROW_SPACING:10,ARROW_WIDTH:30,ARROW_SIZE:30,PAGE_FORMAT_A4_PORTRAIT:new mxRectangle(0,0,826,1169),PAGE_FORMAT_A4_LANDSCAPE:new mxRectangle(0,0,1169,826),PAGE_FORMAT_LETTER_PORTRAIT:new mxRectangle(0,0,850,1100),PAGE_FORMAT_LETTER_LANDSCAPE:new mxRectangle(0,0,1100,850),NONE:"none",STYLE_PERIMETER:"perimeter",STYLE_SOURCE_PORT:"sourcePort",STYLE_TARGET_PORT:"targetPort",STYLE_PORT_CONSTRAINT:"portConstraint",STYLE_OPACITY:"opacity",STYLE_TEXT_OPACITY:"textOpacity",STYLE_OVERFLOW:"overflow",STYLE_ORTHOGONAL:"orthogonal",STYLE_EXIT_X:"exitX",STYLE_EXIT_Y:"exitY",STYLE_EXIT_PERIMETER:"exitPerimeter",STYLE_ENTRY_X:"entryX",STYLE_ENTRY_Y:"entryY",STYLE_ENTRY_PERIMETER:"entryPerimeter",STYLE_WHITE_SPACE:"whiteSpace",STYLE_ROTATION:"rotation",STYLE_FILLCOLOR:"fillColor",STYLE_SWIMLANE_FILLCOLOR:"swimlaneFillColor",STYLE_GRADIENTCOLOR:"gradientColor",STYLE_GRADIENT_DIRECTION:"gradientDirection",STYLE_STROKECOLOR:"strokeColor",STYLE_SEPARATORCOLOR:"separatorColor",STYLE_STROKEWIDTH:"strokeWidth",STYLE_ALIGN:"align",STYLE_VERTICAL_ALIGN:"verticalAlign",STYLE_LABEL_POSITION:"labelPosition",STYLE_VERTICAL_LABEL_POSITION:"verticalLabelPosition",STYLE_IMAGE_ASPECT:"imageAspect",STYLE_IMAGE_ALIGN:"imageAlign",STYLE_IMAGE_VERTICAL_ALIGN:"imageVerticalAlign",STYLE_GLASS:"glass",STYLE_IMAGE:"image",STYLE_IMAGE_WIDTH:"imageWidth",STYLE_IMAGE_HEIGHT:"imageHeight",STYLE_IMAGE_BACKGROUND:"imageBackground",STYLE_IMAGE_BORDER:"imageBorder",STYLE_FLIPH:"flipH",STYLE_FLIPV:"flipV",STYLE_NOLABEL:"noLabel",STYLE_NOEDGESTYLE:"noEdgeStyle",STYLE_LABEL_BACKGROUNDCOLOR:"labelBackgroundColor",STYLE_LABEL_BORDERCOLOR:"labelBorderColor",STYLE_LABEL_PADDING:"labelPadding",STYLE_INDICATOR_SHAPE:"indicatorShape",STYLE_INDICATOR_IMAGE:"indicatorImage",STYLE_INDICATOR_COLOR:"indicatorColor",STYLE_INDICATOR_STROKECOLOR:"indicatorStrokeColor",STYLE_INDICATOR_GRADIENTCOLOR:"indicatorGradientColor",STYLE_INDICATOR_SPACING:"indicatorSpacing",STYLE_INDICATOR_WIDTH:"indicatorWidth",STYLE_INDICATOR_HEIGHT:"indicatorHeight",STYLE_INDICATOR_DIRECTION:"indicatorDirection",STYLE_SHADOW:"shadow",STYLE_SEGMENT:"segment",STYLE_ENDARROW:"endArrow",STYLE_STARTARROW:"startArrow",STYLE_ENDSIZE:"endSize",STYLE_STARTSIZE:"startSize",STYLE_SWIMLANE_LINE:"swimlaneLine",STYLE_ENDFILL:"endFill",STYLE_STARTFILL:"startFill",STYLE_DASHED:"dashed",STYLE_DASH_PATTERN:"dashPattern",STYLE_ROUNDED:"rounded",STYLE_CURVED:"curved",STYLE_ARCSIZE:"arcSize",STYLE_SMOOTH:"smooth",STYLE_SOURCE_PERIMETER_SPACING:"sourcePerimeterSpacing",STYLE_TARGET_PERIMETER_SPACING:"targetPerimeterSpacing",STYLE_PERIMETER_SPACING:"perimeterSpacing",STYLE_SPACING:"spacing",STYLE_SPACING_TOP:"spacingTop",STYLE_SPACING_LEFT:"spacingLeft",STYLE_SPACING_BOTTOM:"spacingBottom",STYLE_SPACING_RIGHT:"spacingRight",STYLE_HORIZONTAL:"horizontal",STYLE_DIRECTION:"direction",STYLE_ELBOW:"elbow",STYLE_FONTCOLOR:"fontColor",STYLE_FONTFAMILY:"fontFamily",STYLE_FONTSIZE:"fontSize",STYLE_FONTSTYLE:"fontStyle",STYLE_AUTOSIZE:"autosize",STYLE_FOLDABLE:"foldable",STYLE_EDITABLE:"editable",STYLE_BENDABLE:"bendable",STYLE_MOVABLE:"movable",STYLE_RESIZABLE:"resizable",STYLE_CLONEABLE:"cloneable",STYLE_DELETABLE:"deletable",STYLE_SHAPE:"shape",STYLE_EDGE:"edgeStyle",STYLE_LOOP:"loopStyle",STYLE_ROUTING_CENTER_X:"routingCenterX",STYLE_ROUTING_CENTER_Y:"routingCenterY",FONT_BOLD:1,FONT_ITALIC:2,FONT_UNDERLINE:4,FONT_SHADOW:8,SHAPE_RECTANGLE:"rectangle",SHAPE_ELLIPSE:"ellipse",SHAPE_DOUBLE_ELLIPSE:"doubleEllipse",SHAPE_RHOMBUS:"rhombus",SHAPE_LINE:"line",SHAPE_IMAGE:"image",SHAPE_ARROW:"arrow",SHAPE_LABEL:"label",SHAPE_CYLINDER:"cylinder",SHAPE_SWIMLANE:"swimlane",SHAPE_CONNECTOR:"connector",SHAPE_ACTOR:"actor",SHAPE_CLOUD:"cloud",SHAPE_TRIANGLE:"triangle",SHAPE_HEXAGON:"hexagon",ARROW_CLASSIC:"classic",ARROW_BLOCK:"block",ARROW_OPEN:"open",ARROW_OVAL:"oval",ARROW_DIAMOND:"diamond",ARROW_DIAMOND_THIN:"diamondThin",ALIGN_LEFT:"left",ALIGN_CENTER:"center",ALIGN_RIGHT:"right",ALIGN_TOP:"top",ALIGN_MIDDLE:"middle",ALIGN_BOTTOM:"bottom",DIRECTION_NORTH:"north",DIRECTION_SOUTH:"south",DIRECTION_EAST:"east",DIRECTION_WEST:"west",DIRECTION_MASK_NONE:0,DIRECTION_MASK_WEST:1,DIRECTION_MASK_NORTH:2,DIRECTION_MASK_SOUTH:4,DIRECTION_MASK_EAST:8,DIRECTION_MASK_ALL:15,ELBOW_VERTICAL:"vertical",ELBOW_HORIZONTAL:"horizontal",EDGESTYLE_ELBOW:"elbowEdgeStyle",EDGESTYLE_ENTITY_RELATION:"entityRelationEdgeStyle",EDGESTYLE_LOOP:"loopEdgeStyle",EDGESTYLE_SIDETOSIDE:"sideToSideEdgeStyle",EDGESTYLE_TOPTOBOTTOM:"topToBottomEdgeStyle",EDGESTYLE_ORTHOGONAL:"orthogonalEdgeStyle",EDGESTYLE_SEGMENT:"segmentEdgeStyle",PERIMETER_ELLIPSE:"ellipsePerimeter",PERIMETER_RECTANGLE:"rectanglePerimeter",PERIMETER_RHOMBUS:"rhombusPerimeter",PERIMETER_TRIANGLE:"trianglePerimeter"};function mxEventObject(e){this.name=e,this.properties=[];for(var t=1;t<arguments.length;t+=2)null!=arguments[t+1]&&(this.properties[arguments[t]]=arguments[t+1])}function mxMouseEvent(e,t){this.evt=e,this.state=t}function mxEventSource(e){this.setEventSource(e)}mxEventObject.prototype.name=null,mxEventObject.prototype.properties=null,mxEventObject.prototype.consumed=!1,mxEventObject.prototype.getName=function(){return this.name},mxEventObject.prototype.getProperties=function(){return this.properties},mxEventObject.prototype.getProperty=function(e){return this.properties[e]},mxEventObject.prototype.isConsumed=function(){return this.consumed},mxEventObject.prototype.consume=function(){this.consumed=!0},mxMouseEvent.prototype.consumed=!1,mxMouseEvent.prototype.evt=null,mxMouseEvent.prototype.graphX=null,mxMouseEvent.prototype.graphY=null,mxMouseEvent.prototype.state=null,mxMouseEvent.prototype.getEvent=function(){return this.evt},mxMouseEvent.prototype.getSource=function(){return mxEvent.getSource(this.evt)},mxMouseEvent.prototype.isSource=function(e){if(null!=e)for(var t=this.getSource();null!=t;){if(t==e.node)return!0;t=t.parentNode}return!1},mxMouseEvent.prototype.getX=function(){return mxEvent.getClientX(this.getEvent())},mxMouseEvent.prototype.getY=function(){return mxEvent.getClientY(this.getEvent())},mxMouseEvent.prototype.getGraphX=function(){return this.graphX},mxMouseEvent.prototype.getGraphY=function(){return this.graphY},mxMouseEvent.prototype.getState=function(){return this.state},mxMouseEvent.prototype.getCell=function(){var e=this.getState();return null!=e?e.cell:null},mxMouseEvent.prototype.isPopupTrigger=function(){return mxEvent.isPopupTrigger(this.getEvent())},mxMouseEvent.prototype.isConsumed=function(){return this.consumed},mxMouseEvent.prototype.consume=function(e){(null==e||e)&&this.evt.preventDefault&&this.evt.preventDefault(),this.evt.returnValue=!1,this.consumed=!0},mxEventSource.prototype.eventListeners=null,mxEventSource.prototype.eventsEnabled=!0,mxEventSource.prototype.eventSource=null,mxEventSource.prototype.isEventsEnabled=function(){return this.eventsEnabled},mxEventSource.prototype.setEventsEnabled=function(e){this.eventsEnabled=e},mxEventSource.prototype.getEventSource=function(){return this.eventSource},mxEventSource.prototype.setEventSource=function(e){this.eventSource=e},mxEventSource.prototype.addListener=function(e,t){null==this.eventListeners&&(this.eventListeners=[]),this.eventListeners.push(e),this.eventListeners.push(t)},mxEventSource.prototype.removeListener=function(e){if(null!=this.eventListeners)for(var t=0;t<this.eventListeners.length;)this.eventListeners[t+1]==e?this.eventListeners.splice(t,2):t+=2},mxEventSource.prototype.fireEvent=function(e,t){if(null!=this.eventListeners&&this.isEventsEnabled()){null==e&&(e=new mxEventObject),null==t&&(t=this.getEventSource()),null==t&&(t=this);for(var n=[t,e],a=0;a<this.eventListeners.length;a+=2){var i=this.eventListeners[a];(null==i||i==e.getName())&&this.eventListeners[a+1].apply(this,n)}}};var mxEvent={objects:[],addListener:function(){var a=function(e,t,n){null==e.mxListenerList&&(e.mxListenerList=[],mxEvent.objects.push(e)),e.mxListenerList.push({name:t,f:n})};return window.addEventListener?function(e,t,n){e.addEventListener(t,n,!1),a(e,t,n)}:function(e,t,n){e.attachEvent("on"+t,n),a(e,t,n)}}(),removeListener:function(){var a=function(e,t,n){if(null!=e.mxListenerList){t=e.mxListenerList.length;for(var a=0;a<t;a++)if(e.mxListenerList[a].f==n){e.mxListenerList.splice(a,1);break}0==e.mxListenerList.length&&(e.mxListenerList=null)}};return window.removeEventListener?function(e,t,n){e.removeEventListener(t,n,!1),a(e,t,n)}:function(e,t,n){e.detachEvent("on"+t,n),a(e,t,n)}}(),removeAllListeners:function(e){var t=e.mxListenerList;if(null!=t)for(;0<t.length;){var n=t[0];mxEvent.removeListener(e,n.name,n.f)}},addGestureListeners:function(e,t,n,a){null!=t&&mxEvent.addListener(e,"mousedown",t),null!=n&&mxEvent.addListener(e,"mousemove",n),null!=a&&mxEvent.addListener(e,"mouseup",a),mxClient.IS_TOUCH&&(null!=t&&mxEvent.addListener(e,"touchstart",t),null!=n&&mxEvent.addListener(e,"touchmove",n),null!=a&&mxEvent.addListener(e,"touchend",a))},removeGestureListeners:function(e,t,n,a){null!=t&&mxEvent.removeListener(e,"mousedown",t),null!=n&&mxEvent.removeListener(e,"mousemove",n),null!=a&&mxEvent.removeListener(e,"mouseup",a),mxClient.IS_TOUCH&&(null!=t&&mxEvent.removeListener(e,"touchstart",t),null!=n&&mxEvent.removeListener(e,"touchmove",n),null!=a&&mxEvent.removeListener(e,"touchend",a))},redirectMouseEvents:function(e,n,t,a,i,o,s){var r=function(e){return"function"==typeof t?t(e):t};mxEvent.addGestureListeners(e,function(e){null!=a?a(e):mxEvent.isConsumed(e)||n.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e,r(e)))},function(e){null!=i?i(e):mxEvent.isConsumed(e)||n.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,r(e)))},function(e){null!=o?o(e):mxEvent.isConsumed(e)||n.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e,r(e)))}),mxEvent.addListener(e,"dblclick",function(e){if(null!=s)s(e);else if(!mxEvent.isConsumed(e)){var t=r(e);n.dblClick(e,null!=t?t.cell:null)}})},release:function(e){if(null!=e&&(mxEvent.removeAllListeners(e),null!=(e=e.childNodes)))for(var t=e.length,n=0;n<t;n+=1)mxEvent.release(e[n])},addMouseWheelListener:function(n){if(null!=n){var e=function(e){null==e&&(e=window.event);var t=0;0!=(t=!mxClient.IS_NS||mxClient.IS_SF||mxClient.IS_GC?e.wheelDelta/120:-e.detail/2)&&n(e,0<t)};mxClient.IS_NS?mxEvent.addListener(window,mxClient.IS_SF||mxClient.IS_GC?"mousewheel":"DOMMouseScroll",e):mxEvent.addListener(document,"mousewheel",e)}},disableContextMenu:mxClient.IS_IE&&(void 0===document.documentMode||document.documentMode<9)?function(e){mxEvent.addListener(e,"contextmenu",function(){return!1})}:function(e){e.setAttribute("oncontextmenu","return false;")},getSource:function(e){return null!=e.srcElement?e.srcElement:e.target},isConsumed:function(e){return null!=e.isConsumed&&e.isConsumed},isLeftMouseButton:function(e){return e.button==(mxClient.IS_IE&&(void 0===document.documentMode||document.documentMode<9)?1:0)},isRightMouseButton:function(e){return 2==e.button},isPopupTrigger:function(e){return mxEvent.isRightMouseButton(e)||mxEvent.isShiftDown(e)&&!mxEvent.isControlDown(e)},isShiftDown:function(e){return null!=e&&e.shiftKey},isAltDown:function(e){return null!=e&&e.altKey},isControlDown:function(e){return null!=e&&e.ctrlKey},isMetaDown:function(e){return null!=e&&e.metaKey},getMainEvent:function(e){return"touchstart"!=e.type&&"touchmove"!=e.type||null==e.touches||null==e.touches[0]?"touchend"==e.type&&null!=e.changedTouches&&null!=e.changedTouches[0]&&(e=e.changedTouches[0]):e=e.touches[0],e},getClientX:function(e){return mxEvent.getMainEvent(e).clientX},getClientY:function(e){return mxEvent.getMainEvent(e).clientY},consume:function(e,t,n){n=null==n||n,(null==t||t)&&(e.preventDefault?(n&&e.stopPropagation(),e.preventDefault()):n&&(e.cancelBubble=!0)),e.isConsumed=!0,e.returnValue=!1},LABEL_HANDLE:-1,ROTATION_HANDLE:-2,MOUSE_DOWN:"mouseDown",MOUSE_MOVE:"mouseMove",MOUSE_UP:"mouseUp",ACTIVATE:"activate",RESIZE_START:"resizeStart",RESIZE:"resize",RESIZE_END:"resizeEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",PAN_START:"panStart",PAN:"pan",PAN_END:"panEnd",MINIMIZE:"minimize",NORMALIZE:"normalize",MAXIMIZE:"maximize",HIDE:"hide",SHOW:"show",CLOSE:"close",DESTROY:"destroy",REFRESH:"refresh",SIZE:"size",SELECT:"select",FIRED:"fired",GET:"get",RECEIVE:"receive",CONNECT:"connect",DISCONNECT:"disconnect",SUSPEND:"suspend",RESUME:"resume",MARK:"mark",SESSION:"session",ROOT:"root",POST:"post",OPEN:"open",SAVE:"save",BEFORE_ADD_VERTEX:"beforeAddVertex",ADD_VERTEX:"addVertex",AFTER_ADD_VERTEX:"afterAddVertex",DONE:"done",EXECUTE:"execute",EXECUTED:"executed",BEGIN_UPDATE:"beginUpdate",START_EDIT:"startEdit",END_UPDATE:"endUpdate",END_EDIT:"endEdit",BEFORE_UNDO:"beforeUndo",UNDO:"undo",REDO:"redo",CHANGE:"change",NOTIFY:"notify",LAYOUT_CELLS:"layoutCells",CLICK:"click",SCALE:"scale",TRANSLATE:"translate",SCALE_AND_TRANSLATE:"scaleAndTranslate",UP:"up",DOWN:"down",ADD:"add",REMOVE:"remove",CLEAR:"clear",ADD_CELLS:"addCells",CELLS_ADDED:"cellsAdded",MOVE_CELLS:"moveCells",CELLS_MOVED:"cellsMoved",RESIZE_CELLS:"resizeCells",CELLS_RESIZED:"cellsResized",TOGGLE_CELLS:"toggleCells",CELLS_TOGGLED:"cellsToggled",ORDER_CELLS:"orderCells",CELLS_ORDERED:"cellsOrdered",REMOVE_CELLS:"removeCells",CELLS_REMOVED:"cellsRemoved",GROUP_CELLS:"groupCells",UNGROUP_CELLS:"ungroupCells",REMOVE_CELLS_FROM_PARENT:"removeCellsFromParent",FOLD_CELLS:"foldCells",CELLS_FOLDED:"cellsFolded",ALIGN_CELLS:"alignCells",LABEL_CHANGED:"labelChanged",CONNECT_CELL:"connectCell",CELL_CONNECTED:"cellConnected",SPLIT_EDGE:"splitEdge",FLIP_EDGE:"flipEdge",START_EDITING:"startEditing",ADD_OVERLAY:"addOverlay",REMOVE_OVERLAY:"removeOverlay",UPDATE_CELL_SIZE:"updateCellSize",ESCAPE:"escape",CLICK:"click",DOUBLE_CLICK:"doubleClick",START:"start",RESET:"reset"};function mxXmlRequest(e,t,n,a,i,o){this.url=e,this.params=t,this.method=n||"POST",this.async=null==a||a,this.username=i,this.password=o}mxXmlRequest.prototype.url=null,mxXmlRequest.prototype.params=null,mxXmlRequest.prototype.method=null,mxXmlRequest.prototype.async=null,mxXmlRequest.prototype.binary=!1,mxXmlRequest.prototype.username=null,mxXmlRequest.prototype.password=null,mxXmlRequest.prototype.request=null,mxXmlRequest.prototype.isBinary=function(){return this.binary},mxXmlRequest.prototype.setBinary=function(e){this.binary=e},mxXmlRequest.prototype.getText=function(){return this.request.responseText},mxXmlRequest.prototype.isReady=function(){return 4==this.request.readyState},mxXmlRequest.prototype.getDocumentElement=function(){var e=this.getXml();return null!=e?e.documentElement:null},mxXmlRequest.prototype.getXml=function(){var e=this.request.responseXML;return(9<=document.documentMode||null==e||null==e.documentElement)&&(e=mxUtils.parseXml(this.request.responseText)),e},mxXmlRequest.prototype.getText=function(){return this.request.responseText},mxXmlRequest.prototype.getStatus=function(){return this.request.status},mxXmlRequest.prototype.create=window.XMLHttpRequest?function(){var e=new XMLHttpRequest;return this.isBinary()&&e.overrideMimeType&&e.overrideMimeType("text/plain; charset=x-user-defined"),e}:"undefined"!=typeof ActiveXObject?function(){return new ActiveXObject("Microsoft.XMLHTTP")}:void 0,mxXmlRequest.prototype.send=function(e,t){this.request=this.create(),null!=this.request&&(null!=e&&(this.request.onreadystatechange=mxUtils.bind(this,function(){this.isReady()&&(e(this),this.onreadystatechaange=null)})),this.request.open(this.method,this.url,this.async,this.username,this.password),this.setRequestHeaders(this.request,this.params),this.request.send(this.params))},mxXmlRequest.prototype.setRequestHeaders=function(e,t){null!=t&&e.setRequestHeader("Content-Type","application/x-www-form-urlencoded")},mxXmlRequest.prototype.simulate=function(e,t){var n=null;(e=e||document)==document&&(n=window.onbeforeunload,window.onbeforeunload=null);var a=e.createElement("form");a.setAttribute("method",this.method),a.setAttribute("action",this.url),null!=t&&a.setAttribute("target",t),a.style.display="none",a.style.visibility="hidden";for(var i=0<this.params.indexOf("&")?this.params.split("&"):this.params.split(),o=0;o<i.length;o++){if(0<(s=i[o].indexOf("="))){var s,r=i[o].substring(0,s),l=i[o].substring(s+1);(s=e.createElement("textarea")).setAttribute("name",r),l=l.replace(/\n/g,"&#xa;"),r=e.createTextNode(l),s.appendChild(r),a.appendChild(s)}}e.body.appendChild(a),a.submit(),e.body.removeChild(a),null!=n&&(window.onbeforeunload=n)};var mxClipboard={STEPSIZE:10,insertCount:1,cells:null,isEmpty:function(){return null==mxClipboard.cells},cut:function(e,t){return t=mxClipboard.copy(e,t),mxClipboard.insertCount=0,mxClipboard.removeCells(e,t),t},removeCells:function(e,t){e.removeCells(t)},copy:function(e,t){t=t||e.getSelectionCells();var n=e.getExportableCells(t);return mxClipboard.insertCount=1,mxClipboard.cells=e.cloneCells(n),n},paste:function(e){if(null!=mxClipboard.cells){var t=e.getImportableCells(mxClipboard.cells),n=mxClipboard.insertCount*mxClipboard.STEPSIZE,a=e.getDefaultParent();t=e.importCells(t,n,n,a);mxClipboard.insertCount++,e.setSelectionCells(t)}}};function mxWindow(e,t,n,a,i,o,s,r,l,d){null!=t&&(s=null==s||s,this.content=t,this.init(n,a,i,o,d),this.installMaximizeHandler(),this.installMinimizeHandler(),this.installCloseHandler(),this.setMinimizable(s),this.setTitle(e),(null==r||r)&&this.installMoveHandler(),null!=l&&null!=l.parentNode?l.parentNode.replaceChild(this.div,l):document.body.appendChild(this.div))}function mxForm(e){this.table=document.createElement("table"),this.table.className=e,this.body=document.createElement("tbody"),this.table.appendChild(this.body)}function mxImage(e,t,n){this.src=e,this.width=t,this.height=n}function mxDivResizer(e,t){if("div"==e.nodeName.toLowerCase()){null==t&&(t=window),this.div=e;var n=mxUtils.getCurrentStyle(e);null!=n&&(this.resizeWidth="auto"==n.width,this.resizeHeight="auto"==n.height),mxEvent.addListener(t,"resize",mxUtils.bind(this,function(e){this.handlingResize||(this.handlingResize=!0,this.resize(),this.handlingResize=!1)})),this.resize()}}function mxDragSource(e,t){this.element=e,this.dropHandler=t,mxEvent.addGestureListeners(e,mxUtils.bind(this,this.mouseDown))}function mxToolbar(e){this.container=e}function mxSession(t,e,n,a){this.model=t,this.urlInit=e,this.urlPoll=n,this.urlNotify=a,null!=t&&(this.codec=new mxCodec,this.codec.lookup=function(e){return t.getCell(e)}),t.addListener(mxEvent.NOTIFY,mxUtils.bind(this,function(e,t){var n=t.getProperty("edit");(null!=n&&this.debug||this.connected&&!this.suspended)&&this.notify("<edit>"+this.encodeChanges(n.changes,n.undone)+"</edit>")}))}function mxUndoableEdit(e,t){this.source=e,this.changes=[],this.significant=null==t||t}function mxUndoManager(e){this.size=null!=e?e:100,this.clear()}mxWindow.prototype=new mxEventSource,mxWindow.prototype.constructor=mxWindow,mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif",mxWindow.prototype.maximizeImage=mxClient.imageBasePath+"/maximize.gif",mxWindow.prototype.resizeImage=mxClient.imageBasePath+"/resize.gif",mxWindow.prototype.visible=!1,mxWindow.prototype.content=!1,mxWindow.prototype.minimumSize=new mxRectangle(0,0,50,40),mxWindow.prototype.title=!1,mxWindow.prototype.content=!1,mxWindow.prototype.destroyOnClose=!0,mxWindow.prototype.init=function(e,t,n,a,i){i=null!=i?i:"mxWindow",this.div=document.createElement("div"),this.div.className=i,this.div.style.left=e+"px",this.div.style.top=t+"px",this.table=document.createElement("table"),this.table.className=i,null!=n&&(mxClient.IS_IE||(this.div.style.width=n+"px"),this.table.style.width=n+"px"),null!=a&&(mxClient.IS_IE||(this.div.style.height=a+"px"),this.table.style.height=a+"px"),e=document.createElement("tbody"),t=document.createElement("tr"),this.title=document.createElement("td"),this.title.className=i+"Title",t.appendChild(this.title),e.appendChild(t),t=document.createElement("tr"),this.td=document.createElement("td"),this.td.className=i+"Pane",this.contentWrapper=document.createElement("div"),this.contentWrapper.className=i+"Pane",this.contentWrapper.style.width="100%",this.contentWrapper.appendChild(this.content),(mxClient.IS_IE||"DIV"!=this.content.nodeName.toUpperCase())&&(this.contentWrapper.style.height="100%"),this.td.appendChild(this.contentWrapper),t.appendChild(this.td),e.appendChild(t),this.table.appendChild(e),this.div.appendChild(this.table),i=mxUtils.bind(this,function(e){this.activate()}),mxEvent.addListener(this.title,"mousedown",i),mxEvent.addListener(this.table,"mousedown",i),mxClient.IS_TOUCH&&(mxEvent.addListener(this.title,"touchstart",i),mxEvent.addListener(this.table,"touchstart",i)),this.hide()},mxWindow.prototype.setTitle=function(e){for(var t=this.title.firstChild;null!=t;){var n=t.nextSibling;t.nodeType==mxConstants.NODETYPE_TEXT&&t.parentNode.removeChild(t),t=n}mxUtils.write(this.title,e||"")},mxWindow.prototype.setScrollable=function(e){navigator.userAgent.indexOf("Presto/2.5")<0&&(this.contentWrapper.style.overflow=e?"auto":"hidden")},mxWindow.prototype.activate=function(){if(mxWindow.activeWindow!=this){var e=null!=(e=mxUtils.getCurrentStyle(this.getElement()))?e.zIndex:3;if(mxWindow.activeWindow){var t=mxWindow.activeWindow.getElement();null!=t&&null!=t.style&&(t.style.zIndex=e)}t=mxWindow.activeWindow,this.getElement().style.zIndex=parseInt(e)+1,(mxWindow.activeWindow=this).fireEvent(new mxEventObject(mxEvent.ACTIVATE,"previousWindow",t))}},mxWindow.prototype.getElement=function(){return this.div},mxWindow.prototype.fit=function(){mxUtils.fit(this.div)},mxWindow.prototype.isResizable=function(){return null!=this.resize&&"none"!=this.resize.style.display},mxWindow.prototype.setResizable=function(e){e?null==this.resize?(this.resize=document.createElement("img"),this.resize.style.position="absolute",this.resize.style.bottom="2px",this.resize.style.right="2px",this.resize.setAttribute("src",mxClient.imageBasePath+"/resize.gif"),this.resize.style.cursor="nw-resize",mxEvent.addGestureListeners(this.resize,mxUtils.bind(this,function(e){this.activate();var a=mxEvent.getClientX(e),i=mxEvent.getClientY(e),o=this.div.offsetWidth,s=this.div.offsetHeight,t=mxUtils.bind(this,function(e){var t=mxEvent.getClientX(e)-a,n=mxEvent.getClientY(e)-i;this.setSize(o+t,s+n),this.fireEvent(new mxEventObject(mxEvent.RESIZE,"event",e)),mxEvent.consume(e)}),n=mxUtils.bind(this,function(e){mxEvent.removeGestureListeners(document,null,t,n),this.fireEvent(new mxEventObject(mxEvent.RESIZE_END,"event",e)),mxEvent.consume(e)});mxEvent.addGestureListeners(document,null,t,n),this.fireEvent(new mxEventObject(mxEvent.RESIZE_START,"event",e)),mxEvent.consume(e)}),null,null),this.div.appendChild(this.resize)):this.resize.style.display="inline":null!=this.resize&&(this.resize.style.display="none")},mxWindow.prototype.setSize=function(e,t){e=Math.max(this.minimumSize.width,e),t=Math.max(this.minimumSize.height,t),mxClient.IS_IE||(this.div.style.width=e+"px",this.div.style.height=t+"px"),this.table.style.width=e+"px",this.table.style.height=t+"px",mxClient.IS_IE||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-2+"px")},mxWindow.prototype.setMinimizable=function(e){this.minimize.style.display=e?"":"none"},mxWindow.prototype.getMinimumSize=function(){return new mxRectangle(0,0,0,this.title.offsetHeight)},mxWindow.prototype.installMinimizeHandler=function(){this.minimize=document.createElement("img"),this.minimize.setAttribute("src",this.minimizeImage),this.minimize.setAttribute("align","right"),this.minimize.setAttribute("title","Minimize"),this.minimize.style.cursor="pointer",this.minimize.style.marginRight="1px",this.minimize.style.display="none",this.title.appendChild(this.minimize);var n=!1,a=null,i=null,e=mxUtils.bind(this,function(e){if(this.activate(),n)n=!1,this.minimize.setAttribute("src",this.minimizeImage),this.minimize.setAttribute("title","Minimize"),this.contentWrapper.style.display="",this.maximize.style.display=a,mxClient.IS_IE||(this.div.style.height=i),this.table.style.height=i,null!=this.resize&&(this.resize.style.visibility=""),this.fireEvent(new mxEventObject(mxEvent.NORMALIZE,"event",e));else{n=!0,this.minimize.setAttribute("src",this.normalizeImage),this.minimize.setAttribute("title","Normalize"),this.contentWrapper.style.display="none",a=this.maximize.style.display,this.maximize.style.display="none",i=this.table.style.height;var t=this.getMinimumSize();0<t.height&&(mxClient.IS_IE||(this.div.style.height=t.height+"px"),this.table.style.height=t.height+"px"),0<t.width&&(mxClient.IS_IE||(this.div.style.width=t.width+"px"),this.table.style.width=t.width+"px"),null!=this.resize&&(this.resize.style.visibility="hidden"),this.fireEvent(new mxEventObject(mxEvent.MINIMIZE,"event",e))}mxEvent.consume(e)});mxEvent.addListener(this.minimize,"mousedown",e),mxClient.IS_TOUCH&&mxEvent.addListener(this.minimize,"touchstart",e)},mxWindow.prototype.setMaximizable=function(e){this.maximize.style.display=e?"":"none"},mxWindow.prototype.installMaximizeHandler=function(){this.maximize=document.createElement("img"),this.maximize.setAttribute("src",this.maximizeImage),this.maximize.setAttribute("align","right"),this.maximize.setAttribute("title","Maximize"),this.maximize.style.cursor="default",this.maximize.style.marginLeft="1px",this.maximize.style.cursor="pointer",this.maximize.style.display="none",this.title.appendChild(this.maximize);var n=!1,a=null,i=null,o=null,s=null,e=mxUtils.bind(this,function(e){if(this.activate(),"none"!=this.maximize.style.display){if(n)n=!1,this.maximize.setAttribute("src",this.maximizeImage),this.maximize.setAttribute("title","Maximize"),this.contentWrapper.style.display="",this.minimize.style.visibility="",this.div.style.left=a+"px",this.div.style.top=i+"px",mxClient.IS_IE||(this.div.style.height=o,this.div.style.width=s,"auto"!=(t=mxUtils.getCurrentStyle(this.contentWrapper)).overflow&&null==this.resize)||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-2+"px"),this.table.style.height=o,this.table.style.width=s,null!=this.resize&&(this.resize.style.visibility=""),this.fireEvent(new mxEventObject(mxEvent.NORMALIZE,"event",e));else{if(n=!0,this.maximize.setAttribute("src",this.normalizeImage),this.maximize.setAttribute("title","Normalize"),this.contentWrapper.style.display="",this.minimize.style.visibility="hidden",a=parseInt(this.div.style.left),i=parseInt(this.div.style.top),o=this.table.style.height,s=this.table.style.width,this.div.style.left="0px",this.div.style.top="0px",mxClient.IS_IE||(this.div.style.height=document.body.clientHeight-2+"px",this.div.style.width=document.body.clientWidth-2+"px"),this.table.style.width=document.body.clientWidth-2+"px",this.table.style.height=document.body.clientHeight-2+"px",null!=this.resize&&(this.resize.style.visibility="hidden"),!mxClient.IS_IE){var t=mxUtils.getCurrentStyle(this.contentWrapper);"auto"!=t.overflow&&null==this.resize||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-2+"px")}this.fireEvent(new mxEventObject(mxEvent.MAXIMIZE,"event",e))}mxEvent.consume(e)}});mxEvent.addGestureListeners(this.maximize,e),mxEvent.addListener(this.title,"dblclick",e)},mxWindow.prototype.installMoveHandler=function(){this.title.style.cursor="move",mxEvent.addGestureListeners(this.title,mxUtils.bind(this,function(e){var a=mxEvent.getClientX(e),i=mxEvent.getClientY(e),o=this.getX(),s=this.getY(),t=mxUtils.bind(this,function(e){var t=mxEvent.getClientX(e)-a,n=mxEvent.getClientY(e)-i;this.setLocation(o+t,s+n),this.fireEvent(new mxEventObject(mxEvent.MOVE,"event",e)),mxEvent.consume(e)}),n=mxUtils.bind(this,function(e){mxEvent.removeGestureListeners(document,null,t,n),this.fireEvent(new mxEventObject(mxEvent.MOVE_END,"event",e)),mxEvent.consume(e)});mxEvent.addGestureListeners(document,null,t,n),this.fireEvent(new mxEventObject(mxEvent.MOVE_START,"event",e)),mxEvent.consume(e)}))},mxWindow.prototype.setLocation=function(e,t){this.div.style.left=e+"px",this.div.style.top=t+"px"},mxWindow.prototype.getX=function(){return parseInt(this.div.style.left)},mxWindow.prototype.getY=function(){return parseInt(this.div.style.top)},mxWindow.prototype.installCloseHandler=function(){this.closeImg=document.createElement("img"),this.closeImg.setAttribute("src",this.closeImage),this.closeImg.setAttribute("align","right"),this.closeImg.setAttribute("title","Close"),this.closeImg.style.marginLeft="2px",this.closeImg.style.cursor="pointer",this.closeImg.style.display="none",this.title.insertBefore(this.closeImg,this.title.firstChild),mxEvent.addGestureListeners(this.closeImg,mxUtils.bind(this,function(e){this.fireEvent(new mxEventObject(mxEvent.CLOSE,"event",e)),this.destroyOnClose?this.destroy():this.setVisible(!1),mxEvent.consume(e)}))},mxWindow.prototype.setImage=function(e){this.image=document.createElement("img"),this.image.setAttribute("src",e),this.image.setAttribute("align","left"),this.image.style.marginRight="4px",this.image.style.marginLeft="0px",this.image.style.marginTop="-2px",this.title.insertBefore(this.image,this.title.firstChild)},mxWindow.prototype.setClosable=function(e){this.closeImg.style.display=e?"":"none"},mxWindow.prototype.isVisible=function(){return null!=this.div&&"hidden"!=this.div.style.visibility},mxWindow.prototype.setVisible=function(e){null!=this.div&&this.isVisible()!=e&&(e?this.show():this.hide())},mxWindow.prototype.show=function(){this.div.style.visibility="",this.activate();var e=mxUtils.getCurrentStyle(this.contentWrapper);mxClient.IS_IE||"auto"!=e.overflow&&null==this.resize||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-2+"px"),this.fireEvent(new mxEventObject(mxEvent.SHOW))},mxWindow.prototype.hide=function(){this.div.style.visibility="hidden",this.fireEvent(new mxEventObject(mxEvent.HIDE))},mxWindow.prototype.destroy=function(){this.fireEvent(new mxEventObject(mxEvent.DESTROY)),null!=this.div&&(mxEvent.release(this.div),this.div.parentNode.removeChild(this.div),this.div=null),this.contentWrapper=this.content=this.title=null},mxForm.prototype.table=null,mxForm.prototype.body=!1,mxForm.prototype.getTable=function(){return this.table},mxForm.prototype.addButtons=function(e,t){var n=document.createElement("tr"),a=document.createElement("td");n.appendChild(a);a=document.createElement("td");var i=document.createElement("button");mxUtils.write(i,mxResources.get("ok")||"OK"),a.appendChild(i),mxEvent.addListener(i,"click",function(){e()}),i=document.createElement("button"),mxUtils.write(i,mxResources.get("cancel")||"Cancel"),a.appendChild(i),mxEvent.addListener(i,"click",function(){t()}),n.appendChild(a),this.body.appendChild(n)},mxForm.prototype.addText=function(e,t){var n=document.createElement("input");return n.setAttribute("type","text"),n.value=t,this.addField(e,n)},mxForm.prototype.addCheckbox=function(e,t){var n=document.createElement("input");return n.setAttribute("type","checkbox"),this.addField(e,n),t&&(n.checked=!0),n},mxForm.prototype.addTextarea=function(e,t,n){var a=document.createElement("textarea");return mxClient.IS_NS&&n--,a.setAttribute("rows",n||2),a.value=t,this.addField(e,a)},mxForm.prototype.addCombo=function(e,t,n){var a=document.createElement("select");return null!=n&&a.setAttribute("size",n),t&&a.setAttribute("multiple","true"),this.addField(e,a)},mxForm.prototype.addOption=function(e,t,n,a){var i=document.createElement("option");mxUtils.writeln(i,t),i.setAttribute("value",n),a&&i.setAttribute("selected",a),e.appendChild(i)},mxForm.prototype.addField=function(e,t){var n=document.createElement("tr"),a=document.createElement("td");return mxUtils.write(a,e),n.appendChild(a),(a=document.createElement("td")).appendChild(t),n.appendChild(a),this.body.appendChild(n),t},mxImage.prototype.src=null,mxImage.prototype.width=null,mxImage.prototype.height=null,mxDivResizer.prototype.resizeWidth=!0,mxDivResizer.prototype.resizeHeight=!0,mxDivResizer.prototype.handlingResize=!1,mxDivResizer.prototype.resize=function(){var e=this.getDocumentWidth(),t=this.getDocumentHeight(),n=parseInt(this.div.style.left),a=parseInt(this.div.style.right),i=parseInt(this.div.style.top),o=parseInt(this.div.style.bottom);this.resizeWidth&&!isNaN(n)&&!isNaN(a)&&0<=n&&0<=a&&0<e-a-n&&(this.div.style.width=e-a-n+"px"),this.resizeHeight&&!isNaN(i)&&!isNaN(o)&&0<=i&&0<=o&&0<t-i-o&&(this.div.style.height=t-i-o+"px")},mxDivResizer.prototype.getDocumentWidth=function(){return document.body.clientWidth},mxDivResizer.prototype.getDocumentHeight=function(){return document.body.clientHeight},mxDragSource.prototype.element=null,mxDragSource.prototype.dropHandler=null,mxDragSource.prototype.dragOffset=null,mxDragSource.prototype.dragElement=null,mxDragSource.prototype.previewElement=null,mxDragSource.prototype.enabled=!0,mxDragSource.prototype.currentGraph=null,mxDragSource.prototype.currentDropTarget=null,mxDragSource.prototype.currentPoint=null,mxDragSource.prototype.currentGuide=null,mxDragSource.prototype.currentHighlight=null,mxDragSource.prototype.autoscroll=!0,mxDragSource.prototype.guidesEnabled=!0,mxDragSource.prototype.gridEnabled=!0,mxDragSource.prototype.highlightDropTargets=!0,mxDragSource.prototype.dragElementZIndex=100,mxDragSource.prototype.dragElementOpacity=70,mxDragSource.prototype.isEnabled=function(){return this.enabled},mxDragSource.prototype.setEnabled=function(e){this.enabled=e},mxDragSource.prototype.isGuidesEnabled=function(){return this.guidesEnabled},mxDragSource.prototype.setGuidesEnabled=function(e){this.guidesEnabled=e},mxDragSource.prototype.isGridEnabled=function(){return this.gridEnabled},mxDragSource.prototype.setGridEnabled=function(e){this.gridEnabled=e},mxDragSource.prototype.getGraphForEvent=function(e){return null},mxDragSource.prototype.getDropTarget=function(e,t,n){return e.getCellAt(t,n)},mxDragSource.prototype.createDragElement=function(e){return this.element.cloneNode(!0)},mxDragSource.prototype.createPreviewElement=function(e){return null},mxDragSource.prototype.mouseDown=function(e){this.enabled&&!mxEvent.isConsumed(e)&&null==this.mouseMoveHandler&&(this.startDrag(e),this.mouseMoveHandler=mxUtils.bind(this,this.mouseMove),this.mouseUpHandler=mxUtils.bind(this,this.mouseUp),mxEvent.addGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler),mxEvent.consume(e,!0,!1))},mxDragSource.prototype.startDrag=function(e){this.dragElement=this.createDragElement(e),this.dragElement.style.position="absolute",this.dragElement.style.zIndex=this.dragElementZIndex,mxUtils.setOpacity(this.dragElement,this.dragElementOpacity)},mxDragSource.prototype.stopDrag=function(e){null!=this.dragElement&&(null!=this.dragElement.parentNode&&this.dragElement.parentNode.removeChild(this.dragElement),this.dragElement=null)},mxDragSource.prototype.graphContainsEvent=function(e,t){var n=mxEvent.getClientX(t),a=mxEvent.getClientY(t),i=mxUtils.getOffset(e.container),o=mxUtils.getScrollOrigin();return n>=i.x-o.x&&a>=i.y-o.y&&n<=i.x-o.x+e.container.offsetWidth&&a<=i.y-o.y+e.container.offsetHeight},mxDragSource.prototype.mouseMove=function(e){if(null!=(t=this.getGraphForEvent(e))&&!this.graphContainsEvent(t,e)&&(t=null),t!=this.currentGraph&&(null!=this.currentGraph&&this.dragExit(this.currentGraph),this.currentGraph=t,null!=this.currentGraph&&this.dragEnter(this.currentGraph)),null!=this.currentGraph&&this.dragOver(this.currentGraph,e),null==this.dragElement||null!=this.previewElement&&"visible"==this.previewElement.style.visibility)null!=this.dragElement&&(this.dragElement.style.visibility="hidden");else{var t=mxEvent.getClientX(e),n=mxEvent.getClientY(e);null==this.dragElement.parentNode&&document.body.appendChild(this.dragElement),this.dragElement.style.visibility="visible",null!=this.dragOffset&&(t+=this.dragOffset.x,n+=this.dragOffset.y),t+=document.body.scrollLeft||document.documentElement.scrollLeft,n+=document.body.scrollTop||document.documentElement.scrollTop,this.dragElement.style.left=t+"px",this.dragElement.style.top=n+"px"}mxEvent.consume(e)},mxDragSource.prototype.mouseUp=function(e){if(null!=this.currentGraph){if(null!=this.currentPoint&&(null==this.previewElement||"hidden"!=this.previewElement.style.visibility)){var t=this.currentGraph.view.scale,n=this.currentGraph.view.translate;this.drop(this.currentGraph,e,this.currentDropTarget,this.currentPoint.x/t-n.x,this.currentPoint.y/t-n.y)}this.dragExit(this.currentGraph)}this.stopDrag(e),mxEvent.removeGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler),this.currentGraph=this.mouseUpHandler=this.mouseMoveHandler=null,mxEvent.consume(e)},mxDragSource.prototype.dragEnter=function(e){e.isMouseDown=!0,this.previewElement=this.createPreviewElement(e),this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(e,e.graphHandler.getGuideStates())),this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(e,mxConstants.DROP_TARGET_COLOR))},mxDragSource.prototype.dragExit=function(e){this.currentPoint=this.currentDropTarget=null,e.isMouseDown=!1,null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null),null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null),null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)},mxDragSource.prototype.dragOver=function(e,t){var n=mxUtils.getOffset(e.container),a=mxUtils.getScrollOrigin(e.container),i=mxEvent.getClientX(t)-n.x+a.x;n=mxEvent.getClientY(t)-n.y+a.y;if(e.autoScroll&&(null==this.autoscroll||this.autoscroll)&&e.scrollPointToVisible(i,n,e.autoExtend),null!=this.currentHighlight&&e.isDropEnabled()&&(this.currentDropTarget=this.getDropTarget(e,i,n),a=e.getView().getState(this.currentDropTarget),this.currentHighlight.highlight(a)),null!=this.previewElement){null==this.previewElement.parentNode&&(e.container.appendChild(this.previewElement),this.previewElement.style.zIndex="3",this.previewElement.style.position="absolute");a=this.isGridEnabled()&&e.isGridEnabledEvent(t);var o=!0;if(null!=this.currentGuide&&this.currentGuide.isEnabledForEvent(t))o=new mxRectangle(0,0,o=parseInt(this.previewElement.style.width),s=parseInt(this.previewElement.style.height)),n=new mxPoint(i,n),n=this.currentGuide.move(o,n,a),o=!1,i=n.x,n=n.y;else if(a){a=e.view.scale;var s=e.view.translate,r=e.gridSize/2;i=(e.snap(i/a-s.x-r)+s.x)*a,n=(e.snap(n/a-s.y-r)+s.y)*a}null!=this.currentGuide&&o&&this.currentGuide.hide(),null!=this.previewOffset&&(i+=this.previewOffset.x,n+=this.previewOffset.y),this.previewElement.style.left=Math.round(i)+"px",this.previewElement.style.top=Math.round(n)+"px",this.previewElement.style.visibility="visible"}this.currentPoint=new mxPoint(i,n)},mxDragSource.prototype.drop=function(e,t,n,a,i){this.dropHandler(e,t,n,a,i),e.container.focus()},mxToolbar.prototype=new mxEventSource,mxToolbar.prototype.constructor=mxToolbar,mxToolbar.prototype.container=null,mxToolbar.prototype.enabled=!0,mxToolbar.prototype.noReset=!1,mxToolbar.prototype.updateDefaultMode=!0,mxToolbar.prototype.addItem=function(e,t,n,a,i,o){var s=document.createElement(null!=t?"img":"button"),r=i||(null!=o?"mxToolbarMode":"mxToolbarItem");return s.className=r,s.setAttribute("src",t),null!=e&&(null!=t?s.setAttribute("title",e):mxUtils.write(s,e)),this.container.appendChild(s),null!=n&&(mxEvent.addListener(s,"click",n),mxClient.IS_TOUCH&&mxEvent.addListener(s,"touchend",n)),e=mxUtils.bind(this,function(e){null!=a?s.setAttribute("src",t):s.style.backgroundColor=""}),mxEvent.addGestureListeners(s,mxUtils.bind(this,function(e){if(null!=a?s.setAttribute("src",a):s.style.backgroundColor="gray",null!=o){null==this.menu&&(this.menu=new mxPopupMenu,this.menu.init());var t=this.currentImg;this.menu.isMenuShowing()&&this.menu.hideMenu(),t!=s&&(this.currentImg=s,this.menu.factoryMethod=o,t=new mxPoint(s.offsetLeft,s.offsetTop+s.offsetHeight),this.menu.popup(t.x,t.y,null,e),this.menu.isMenuShowing()&&(s.className=r+"Selected",this.menu.hideMenu=function(){mxPopupMenu.prototype.hideMenu.apply(this),s.className=r,this.currentImg=null}))}}),null,e),mxEvent.addListener(s,"mouseout",e),s},mxToolbar.prototype.addCombo=function(e){var t=document.createElement("div");t.style.display="inline",t.className="mxToolbarComboContainer";var n=document.createElement("select");return n.className=e||"mxToolbarCombo",t.appendChild(n),this.container.appendChild(t),n},mxToolbar.prototype.addActionCombo=function(e,t){var n=document.createElement("select");return n.className=t||"mxToolbarCombo",this.addOption(n,e,null),mxEvent.addListener(n,"change",function(e){var t=n.options[n.selectedIndex];n.selectedIndex=0,null!=t.funct&&t.funct(e)}),this.container.appendChild(n),n},mxToolbar.prototype.addOption=function(e,t,n){var a=document.createElement("option");return mxUtils.writeln(a,t),"function"==typeof n?a.funct=n:a.setAttribute("value",n),e.appendChild(a),a},mxToolbar.prototype.addSwitchMode=function(e,t,n,a,i){var o=document.createElement("img");return o.initialClassName=i||"mxToolbarMode",o.className=o.initialClassName,o.setAttribute("src",t),o.altIcon=a,null!=e&&o.setAttribute("title",e),mxEvent.addListener(o,"click",mxUtils.bind(this,function(e){null!=(e=this.selectedMode.altIcon)?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",e)):this.selectedMode.className=this.selectedMode.initialClassName,this.updateDefaultMode&&(this.defaultMode=o),null!=(e=(this.selectedMode=o).altIcon)?(o.altIcon=o.getAttribute("src"),o.setAttribute("src",e)):o.className=o.initialClassName+"Selected",this.fireEvent(new mxEventObject(mxEvent.SELECT)),n()})),this.container.appendChild(o),null==this.defaultMode&&(this.defaultMode=o,this.selectMode(o),n()),o},mxToolbar.prototype.addMode=function(e,t,n,a,i,o){o=null==o||o;var s=document.createElement(null!=t?"img":"button");return s.initialClassName=i||"mxToolbarMode",s.className=s.initialClassName,s.setAttribute("src",t),s.altIcon=a,null!=e&&s.setAttribute("title",e),this.enabled&&o&&(mxEvent.addListener(s,"click",mxUtils.bind(this,function(e){this.selectMode(s,n),this.noReset=!1})),mxEvent.addListener(s,"dblclick",mxUtils.bind(this,function(e){this.selectMode(s,n),this.noReset=!0})),null==this.defaultMode&&(this.defaultMode=s,this.defaultFunction=n,this.selectMode(s,n))),this.container.appendChild(s),s},mxToolbar.prototype.selectMode=function(e,t){if(this.selectedMode!=e){if(null!=this.selectedMode){var n=this.selectedMode.altIcon;null!=n?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",n)):this.selectedMode.className=this.selectedMode.initialClassName}this.selectedMode=e,null!=(n=this.selectedMode.altIcon)?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",n)):this.selectedMode.className=this.selectedMode.initialClassName+"Selected",this.fireEvent(new mxEventObject(mxEvent.SELECT,"function",t))}},mxToolbar.prototype.resetMode=function(e){(e||!this.noReset)&&this.selectedMode!=this.defaultMode&&this.selectMode(this.defaultMode,this.defaultFunction)},mxToolbar.prototype.addSeparator=function(e){return this.addItem(null,e,null)},mxToolbar.prototype.addBreak=function(){mxUtils.br(this.container)},mxToolbar.prototype.addLine=function(){var e=document.createElement("hr");e.style.marginRight="6px",e.setAttribute("size","1"),this.container.appendChild(e)},mxToolbar.prototype.destroy=function(){mxEvent.release(this.container),this.selectedMode=this.defaultFunction=this.defaultMode=this.container=null,null!=this.menu&&this.menu.destroy()},mxSession.prototype=new mxEventSource,mxSession.prototype.constructor=mxSession,mxSession.prototype.model=null,mxSession.prototype.urlInit=null,mxSession.prototype.urlPoll=null,mxSession.prototype.urlNotify=null,mxSession.prototype.codec=null,mxSession.prototype.linefeed="&#xa;",mxSession.prototype.escapePostData=!0,mxSession.prototype.significantRemoteChanges=!0,mxSession.prototype.sent=0,mxSession.prototype.received=0,mxSession.prototype.debug=!1,mxSession.prototype.connected=!1,mxSession.prototype.suspended=!1,mxSession.prototype.polling=!1,mxSession.prototype.start=function(){this.debug?(this.connected=!0,this.fireEvent(new mxEventObject(mxEvent.CONNECT))):this.connected||this.get(this.urlInit,mxUtils.bind(this,function(e){this.connected=!0,this.fireEvent(new mxEventObject(mxEvent.CONNECT)),this.poll()}))},mxSession.prototype.suspend=function(){this.connected&&!this.suspended&&(this.suspended=!0,this.fireEvent(new mxEventObject(mxEvent.SUSPEND)))},mxSession.prototype.resume=function(e,t,n){this.connected&&this.suspended&&(this.suspended=!1,this.fireEvent(new mxEventObject(mxEvent.RESUME)),this.polling||this.poll())},mxSession.prototype.stop=function(e){this.connected&&(this.connected=!1),this.fireEvent(new mxEventObject(mxEvent.DISCONNECT,"reason",e))},mxSession.prototype.poll=function(){this.connected&&!this.suspended&&null!=this.urlPoll?(this.polling=!0,this.get(this.urlPoll,mxUtils.bind(this,function(){this.poll()}))):this.polling=!1},mxSession.prototype.notify=function(e,t,n){null!=e&&0<e.length&&(null!=this.urlNotify&&(this.debug?(mxLog.show(),mxLog.debug("mxSession.notify: "+this.urlNotify+" xml="+e)):(e="<message><delta>"+e+"</delta></message>",this.escapePostData&&(e=encodeURIComponent(e)),mxUtils.post(this.urlNotify,"xml="+e,t,n))),this.sent+=e.length,this.fireEvent(new mxEventObject(mxEvent.NOTIFY,"url",this.urlNotify,"xml",e)))},mxSession.prototype.get=function(n,a,t){if(void 0!==mxUtils){var i=mxUtils.bind(this,function(e){null!=t?t(e):this.stop(e)});mxUtils.get(n,mxUtils.bind(this,function(e){if(void 0!==mxUtils)if(e.isReady()&&404!=e.getStatus()){if(this.received+=e.getText().length,this.fireEvent(new mxEventObject(mxEvent.GET,"url",n,"request",e)),this.isValidResponse(e)){if(0<e.getText().length){var t=e.getDocumentElement();null==t?i("Invalid response: "+e.getText()):this.receive(t)}null!=a&&a(e)}}else i("Response not ready")}),function(e){i("Transmission error")})}},mxSession.prototype.isValidResponse=function(e){return e.getText().indexOf("<?php")<0},mxSession.prototype.encodeChanges=function(e,t){for(var n="",a=t?-1:1,i=t?e.length-1:0;0<=i&&i<e.length;i+=a){var o=this.codec.encode(e[i]);n=n+mxUtils.getXml(o,this.linefeed)}return n},mxSession.prototype.receive=function(e){if(null!=e&&e.nodeType==mxConstants.NODETYPE_ELEMENT){var t=e.getAttribute("namespace");for(null!=t&&(this.model.prefix=t+"-"),t=e.firstChild;null!=t;){var n=t.nodeName.toLowerCase();"state"==n?this.processState(t):"delta"==n&&this.processDelta(t),t=t.nextSibling}this.fireEvent(new mxEventObject(mxEvent.RECEIVE,"node",e))}},mxSession.prototype.processState=function(e){new mxCodec(e.ownerDocument).decode(e.firstChild,this.model)},mxSession.prototype.processDelta=function(e){for(e=e.firstChild;null!=e;)"edit"==e.nodeName&&this.processEdit(e),e=e.nextSibling},mxSession.prototype.processEdit=function(e){if(0<(e=this.decodeChanges(e)).length){var t=this.createUndoableEdit(e);this.model.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",t,"changes",e)),this.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",t)),this.fireEvent(new mxEventObject(mxEvent.FIRED,"edit",t))}},mxSession.prototype.createUndoableEdit=function(e){var t=new mxUndoableEdit(this.model,this.significantRemoteChanges);return t.changes=e,t.notify=function(){t.source.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",t,"changes",t.changes)),t.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,"edit",t,"changes",t.changes))},t},mxSession.prototype.decodeChanges=function(e){this.codec.document=e.ownerDocument;var t=[];for(e=e.firstChild;null!=e;){var n=this.decodeChange(e);null!=n&&t.push(n),e=e.nextSibling}return t},mxSession.prototype.decodeChange=function(e){var t=null;return e.nodeType==mxConstants.NODETYPE_ELEMENT&&(null!=(t="mxRootChange"==e.nodeName?new mxCodec(e.ownerDocument).decode(e):this.codec.decode(e))&&(t.model=this.model,t.execute(),"mxChildChange"==e.nodeName&&null==t.parent&&this.cellRemoved(t.child))),t},mxSession.prototype.cellRemoved=function(e,t){this.codec.putObject(e.getId(),e);for(var n=this.model.getChildCount(e),a=0;a<n;a++)this.cellRemoved(this.model.getChildAt(e,a))},mxUndoableEdit.prototype.source=null,mxUndoableEdit.prototype.changes=null,mxUndoableEdit.prototype.significant=null,mxUndoableEdit.prototype.undone=!1,mxUndoableEdit.prototype.redone=!1,mxUndoableEdit.prototype.isEmpty=function(){return 0==this.changes.length},mxUndoableEdit.prototype.isSignificant=function(){return this.significant},mxUndoableEdit.prototype.add=function(e){this.changes.push(e)},mxUndoableEdit.prototype.notify=function(){},mxUndoableEdit.prototype.die=function(){},mxUndoableEdit.prototype.undo=function(){if(!this.undone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var e=this.changes.length-1;0<=e;e--){var t=this.changes[e];null!=t.execute?t.execute():null!=t.undo&&t.undo(),this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",t))}this.undone=!0,this.redone=!1,this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()},mxUndoableEdit.prototype.redo=function(){if(!this.redone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var e=this.changes.length,t=0;t<e;t++){var n=this.changes[t];null!=n.execute?n.execute():null!=n.redo&&n.redo(),this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",n))}this.undone=!1,this.redone=!0,this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()},mxUndoManager.prototype=new mxEventSource,mxUndoManager.prototype.constructor=mxUndoManager,mxUndoManager.prototype.size=null,mxUndoManager.prototype.history=null,mxUndoManager.prototype.indexOfNextAdd=0,mxUndoManager.prototype.isEmpty=function(){return 0==this.history.length},mxUndoManager.prototype.clear=function(){this.history=[],this.indexOfNextAdd=0,this.fireEvent(new mxEventObject(mxEvent.CLEAR))},mxUndoManager.prototype.canUndo=function(){return 0<this.indexOfNextAdd},mxUndoManager.prototype.undo=function(){for(;0<this.indexOfNextAdd;){var e=this.history[--this.indexOfNextAdd];if(e.undo(),e.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",e));break}}},mxUndoManager.prototype.canRedo=function(){return this.indexOfNextAdd<this.history.length},mxUndoManager.prototype.redo=function(){for(var e=this.history.length;this.indexOfNextAdd<e;){var t=this.history[this.indexOfNextAdd++];if(t.redo(),t.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.REDO,"edit",t));break}}},mxUndoManager.prototype.undoableEditHappened=function(e){this.trim(),0<this.size&&this.size==this.history.length&&this.history.shift(),this.history.push(e),this.indexOfNextAdd=this.history.length,this.fireEvent(new mxEventObject(mxEvent.ADD,"edit",e))},mxUndoManager.prototype.trim=function(){if(this.history.length>this.indexOfNextAdd)for(var e=this.history.splice(this.indexOfNextAdd,this.history.length-this.indexOfNextAdd),t=0;t<e.length;t++)e[t].die()};var mxUrlConverter=function(e){var n=!0,a=null,i=null;return{isEnabled:function(){return n},setEnabled:function(e){n=e},getBaseUrl:function(){return a},setBaseUrl:function(e){a=e},getBaseDomain:function(){return a},setBaseDomain:function(e){a=e},isRelativeUrl:function(e){return"http://"!=e.substring(0,7)&&"https://"!=e.substring(0,8)&&"data:image"!=e.substring(0,10)},convert:function(e){if(n&&this.isRelativeUrl(e)){if(null==a){i=location.protocol+"//"+location.host;var t=(a=i+location.pathname).lastIndexOf("/");0<t&&(a=a.substring(0,t+1))}e="/"==e.charAt(0)?i+e:a+e}return e}}};function mxPanningManager(o){this.thread=null,this.active=!1,this.dy=this.dx=this.t0y=this.t0x=this.tdy=this.tdx=0,this.scrollbars=!1,this.scrollTop=this.scrollLeft=0,this.mouseListener={mouseDown:function(e,t){},mouseMove:function(e,t){},mouseUp:mxUtils.bind(this,function(e,t){this.active&&this.stop()})},o.addMouseListener(this.mouseListener),mxEvent.addListener(document,"mouseup",mxUtils.bind(this,function(){this.active&&this.stop()}));var s=mxUtils.bind(this,function(){return this.scrollbars=mxUtils.hasScrollbars(o.container),this.scrollLeft=o.container.scrollLeft,this.scrollTop=o.container.scrollTop,window.setInterval(mxUtils.bind(this,function(){if(this.tdx-=this.dx,this.tdy-=this.dy,this.scrollbars){var e=-o.container.scrollLeft-Math.ceil(this.dx),t=-o.container.scrollTop-Math.ceil(this.dy);o.panGraph(e,t),o.panDx=this.scrollLeft-o.container.scrollLeft,o.panDy=this.scrollTop-o.container.scrollTop,o.fireEvent(new mxEventObject(mxEvent.PAN))}else o.panGraph(this.getDx(),this.getDy())}),this.delay)});this.isActive=function(){return active},this.getDx=function(){return Math.round(this.tdx)},this.getDy=function(){return Math.round(this.tdy)},this.start=function(){this.t0x=o.view.translate.x,this.t0y=o.view.translate.y,this.active=!0},this.panTo=function(e,t,n,a){this.active||this.start(),this.scrollLeft=o.container.scrollLeft,this.scrollTop=o.container.scrollTop,a=null!=a?a:0;var i=o.container;this.dx=e+(null!=n?n:0)-i.scrollLeft-i.clientWidth,this.dx<0&&Math.abs(this.dx)<this.border?this.dx=this.border+this.dx:this.dx=this.handleMouseOut?Math.max(this.dx,0):0,0==this.dx&&(this.dx=e-i.scrollLeft,this.dx=0<this.dx&&this.dx<this.border?this.dx-this.border:this.handleMouseOut?Math.min(0,this.dx):0),this.dy=t+a-i.scrollTop-i.clientHeight,this.dy<0&&Math.abs(this.dy)<this.border?this.dy=this.border+this.dy:this.dy=this.handleMouseOut?Math.max(this.dy,0):0,0==this.dy&&(this.dy=t-i.scrollTop,this.dy=0<this.dy&&this.dy<this.border?this.dy-this.border:this.handleMouseOut?Math.min(0,this.dy):0),0!=this.dx||0!=this.dy?(this.dx*=this.damper,this.dy*=this.damper,null==this.thread&&(this.thread=s())):null!=this.thread&&(window.clearInterval(this.thread),this.thread=null)},this.stop=function(){if(this.active)if(this.active=!1,null!=this.thread&&(window.clearInterval(this.thread),this.thread=null),this.tdy=this.tdx=0,this.scrollbars)o.panDx=0,o.panDy=0,o.fireEvent(new mxEventObject(mxEvent.PAN));else{var e=o.panDx,t=o.panDy;0==e&&0==t||(o.panGraph(0,0),o.view.setTranslate(this.t0x+e/o.view.scale,this.t0y+t/o.view.scale))}},this.destroy=function(){o.removeMouseListener(this.mouseListener)}}function mxPopupMenu(e){null!=(this.factoryMethod=e)&&this.init()}function mxAutoSaveManager(e){this.changeHandler=mxUtils.bind(this,function(e,t){this.isEnabled()&&this.graphModelChanged(t.getProperty("edit").changes)}),this.setGraph(e)}function mxAnimation(e){this.delay=null!=e?e:20}function mxMorphing(e,t,n,a){mxAnimation.call(this,a),this.graph=e,this.steps=null!=t?t:6,this.ease=null!=n?n:1.5}function mxImageBundle(e){this.images=[],this.alt=null!=e&&e}function mxImageExport(){}function mxAbstractCanvas2D(){this.converter=this.createUrlConverter(),this.reset()}function mxXmlCanvas2D(e){mxAbstractCanvas2D.call(this),this.root=e,this.writeDefaults()}function mxSvgCanvas2D(e,t){mxAbstractCanvas2D.call(this),this.root=e,this.gradients=[],this.defs=null,this.styleEnabled=null!=t&&t;var n=null;if(e.ownerDocument!=document)for(n=e;null!=n&&"svg"!=n.nodeName;)n=n.parentNode;null!=n&&(0<n.getElementsByTagName("defs").length&&(this.defs=n.getElementsByTagName("defs")[0]),null==this.defs&&(this.defs=this.createElement("defs"),null!=n.firstChild?n.insertBefore(this.defs,n.firstChild):n.appendChild(this.defs)),this.styleEnabled&&this.defs.appendChild(this.createStyle()))}mxPanningManager.prototype.damper=1/6,mxPanningManager.prototype.delay=10,mxPanningManager.prototype.handleMouseOut=!0,mxPanningManager.prototype.border=0,mxPopupMenu.prototype=new mxEventSource,mxPopupMenu.prototype.constructor=mxPopupMenu,mxPopupMenu.prototype.submenuImage=mxClient.imageBasePath+"/submenu.gif",mxPopupMenu.prototype.zIndex=10006,mxPopupMenu.prototype.factoryMethod=null,mxPopupMenu.prototype.useLeftButtonForPopup=!1,mxPopupMenu.prototype.enabled=!0,mxPopupMenu.prototype.itemCount=0,mxPopupMenu.prototype.autoExpand=!1,mxPopupMenu.prototype.smartSeparators=!1,mxPopupMenu.prototype.labels=!0,mxPopupMenu.prototype.init=function(){this.table=document.createElement("table"),this.table.className="mxPopupMenu",this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.div=document.createElement("div"),this.div.className="mxPopupMenu",this.div.style.display="inline",this.div.style.zIndex=this.zIndex,this.div.appendChild(this.table),mxEvent.disableContextMenu(this.div)},mxPopupMenu.prototype.isEnabled=function(){return this.enabled},mxPopupMenu.prototype.setEnabled=function(e){this.enabled=e},mxPopupMenu.prototype.isPopupTrigger=function(e){return e.isPopupTrigger()||this.useLeftButtonForPopup&&mxEvent.isLeftMouseButton(e.getEvent())},mxPopupMenu.prototype.addItem=function(e,t,n,a,i,o){a=a||this,this.itemCount++,a.willAddSeparator&&(a.containsItems&&this.addSeparator(a,!0),a.willAddSeparator=!1),a.containsItems=!0;var s=document.createElement("tr");s.className="mxPopupMenuItem";var r=document.createElement("td");return r.className="mxPopupMenuIcon",null!=t?((i=document.createElement("img")).src=t,r.appendChild(i)):null!=i&&((t=document.createElement("div")).className=i,r.appendChild(t)),s.appendChild(r),this.labels&&((r=document.createElement("td")).className="mxPopupMenuItem"+(null==o||o?"":" disabled"),mxUtils.write(r,e),r.align="left",s.appendChild(r),(e=document.createElement("td")).className="mxPopupMenuItem"+(null==o||o?"":" disabled"),e.style.paddingRight="6px",e.style.textAlign="right",s.appendChild(e),null==a.div&&this.createSubmenu(a)),a.tbody.appendChild(s),(null==o||o)&&(mxEvent.addGestureListeners(s,mxUtils.bind(this,function(e){this.eventReceiver=s,a.activeRow!=s&&a.activeRow!=a&&(null!=a.activeRow&&null!=a.activeRow.div.parentNode&&this.hideSubmenu(a),null!=s.div&&(this.showSubmenu(a,s),a.activeRow=s)),mxEvent.consume(e)}),mxUtils.bind(this,function(e){a.activeRow!=s&&a.activeRow!=a&&(null!=a.activeRow&&null!=a.activeRow.div.parentNode&&this.hideSubmenu(a),this.autoExpand&&null!=s.div&&(this.showSubmenu(a,s),a.activeRow=s)),s.className="mxPopupMenuItemHover"}),mxUtils.bind(this,function(e){this.eventReceiver==s&&(a.activeRow!=s&&this.hideMenu(),null!=n&&n(e)),this.eventReceiver=null,mxEvent.consume(e)})),mxEvent.addListener(s,"mouseout",mxUtils.bind(this,function(e){s.className="mxPopupMenuItem"}))),s},mxPopupMenu.prototype.createSubmenu=function(e){e.table=document.createElement("table"),e.table.className="mxPopupMenu",e.tbody=document.createElement("tbody"),e.table.appendChild(e.tbody),e.div=document.createElement("div"),e.div.className="mxPopupMenu",e.div.style.position="absolute",e.div.style.display="inline",e.div.style.zIndex=this.zIndex,e.div.appendChild(e.table);var t=document.createElement("img");t.setAttribute("src",this.submenuImage),td=e.firstChild.nextSibling.nextSibling,td.appendChild(t)},mxPopupMenu.prototype.showSubmenu=function(e,t){if(null!=t.div){t.div.style.left=e.div.offsetLeft+t.offsetLeft+t.offsetWidth-1+"px",t.div.style.top=e.div.offsetTop+t.offsetTop+"px",document.body.appendChild(t.div);var n=parseInt(t.div.offsetLeft),a=parseInt(t.div.offsetWidth),i=document.body,o=document.documentElement;n+a>(i.scrollLeft||o.scrollLeft)+(i.clientWidth||o.clientWidth)&&(t.div.style.left=e.div.offsetLeft-a+(mxClient.IS_IE?6:-6)+"px"),mxUtils.fit(t.div)}},mxPopupMenu.prototype.addSeparator=function(e,t){if(e=e||this,this.smartSeparators&&!t)e.willAddSeparator=!0;else if(null!=e.tbody){e.willAddSeparator=!1;var n=document.createElement("tr"),a=document.createElement("td");a.className="mxPopupMenuIcon",a.style.padding="0 0 0 0px",n.appendChild(a),(a=document.createElement("td")).style.padding="0 0 0 0px",a.setAttribute("colSpan","2");var i=document.createElement("hr");i.setAttribute("size","1"),a.appendChild(i),n.appendChild(a),e.tbody.appendChild(n)}},mxPopupMenu.prototype.popup=function(e,t,n,a){if(null!=this.div&&null!=this.tbody&&null!=this.factoryMethod){for(this.div.style.left=e+"px",this.div.style.top=t+"px";null!=this.tbody.firstChild;)mxEvent.release(this.tbody.firstChild),this.tbody.removeChild(this.tbody.firstChild);this.itemCount=0,this.factoryMethod(this,n,a),0<this.itemCount&&(this.showMenu(),this.fireEvent(new mxEventObject(mxEvent.SHOW)))}},mxPopupMenu.prototype.isMenuShowing=function(){return null!=this.div&&this.div.parentNode==document.body},mxPopupMenu.prototype.showMenu=function(){9<=document.documentMode&&(this.div.style.filter="none"),document.body.appendChild(this.div),mxUtils.fit(this.div)},mxPopupMenu.prototype.hideMenu=function(){null!=this.div&&(null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.hideSubmenu(this),this.containsItems=!1)},mxPopupMenu.prototype.hideSubmenu=function(e){null!=e.activeRow&&(this.hideSubmenu(e.activeRow),null!=e.activeRow.div.parentNode&&e.activeRow.div.parentNode.removeChild(e.activeRow.div),e.activeRow=null)},mxPopupMenu.prototype.destroy=function(){null!=this.div&&(mxEvent.release(this.div),null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.div=null)},mxAutoSaveManager.prototype=new mxEventSource,mxAutoSaveManager.prototype.constructor=mxAutoSaveManager,mxAutoSaveManager.prototype.graph=null,mxAutoSaveManager.prototype.autoSaveDelay=10,mxAutoSaveManager.prototype.autoSaveThrottle=2,mxAutoSaveManager.prototype.autoSaveThreshold=5,mxAutoSaveManager.prototype.ignoredChanges=0,mxAutoSaveManager.prototype.lastSnapshot=0,mxAutoSaveManager.prototype.enabled=!0,mxAutoSaveManager.prototype.changeHandler=null,mxAutoSaveManager.prototype.isEnabled=function(){return this.enabled},mxAutoSaveManager.prototype.setEnabled=function(e){this.enabled=e},mxAutoSaveManager.prototype.setGraph=function(e){null!=this.graph&&this.graph.getModel().removeListener(this.changeHandler),this.graph=e,null!=this.graph&&this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler)},mxAutoSaveManager.prototype.save=function(){},mxAutoSaveManager.prototype.graphModelChanged=function(e){(e=((new Date).getTime()-this.lastSnapshot)/1e3)>this.autoSaveDelay||this.ignoredChanges>=this.autoSaveThreshold&&e>this.autoSaveThrottle?(this.save(),this.reset()):this.ignoredChanges++},mxAutoSaveManager.prototype.reset=function(){this.lastSnapshot=(new Date).getTime(),this.ignoredChanges=0},mxAutoSaveManager.prototype.destroy=function(){this.setGraph(null)},mxAnimation.prototype=new mxEventSource,mxAnimation.prototype.constructor=mxAnimation,mxAnimation.prototype.delay=null,mxAnimation.prototype.thread=null,mxAnimation.prototype.startAnimation=function(){null==this.thread&&(this.thread=window.setInterval(mxUtils.bind(this,this.updateAnimation),this.delay))},mxAnimation.prototype.updateAnimation=function(){this.fireEvent(new mxEventObject(mxEvent.EXECUTE))},mxAnimation.prototype.stopAnimation=function(){null!=this.thread&&(window.clearInterval(this.thread),this.thread=null,this.fireEvent(new mxEventObject(mxEvent.DONE)))},mxMorphing.prototype=new mxAnimation,mxMorphing.prototype.constructor=mxMorphing,mxMorphing.prototype.graph=null,mxMorphing.prototype.steps=null,mxMorphing.prototype.step=0,mxMorphing.prototype.ease=null,mxMorphing.prototype.cells=null,mxMorphing.prototype.updateAnimation=function(){var e=new mxCellStatePreview(this.graph);if(null!=this.cells)for(var t=0;t<this.cells.length;t++)this.animateCell(cells[t],e,!1);else this.animateCell(this.graph.getModel().getRoot(),e,!0);this.show(e),(e.isEmpty()||this.step++>=this.steps)&&this.stopAnimation()},mxMorphing.prototype.show=function(e){e.show()},mxMorphing.prototype.animateCell=function(e,t,n){var a=this.graph.getView().getState(e),i=null;if(null!=a&&(i=this.getDelta(a),this.graph.getModel().isVertex(e)&&(0!=i.x||0!=i.y))){var o=this.graph.view.getTranslate(),s=this.graph.view.getScale();i.x+=o.x*s,i.y+=o.y*s,t.moveState(a,-i.x/this.ease,-i.y/this.ease)}if(n&&!this.stopRecursion(a,i))for(a=this.graph.getModel().getChildCount(e),i=0;i<a;i++)this.animateCell(this.graph.getModel().getChildAt(e,i),t,n)},mxMorphing.prototype.stopRecursion=function(e,t){return null!=t&&(0!=t.x||0!=t.y)},mxMorphing.prototype.getDelta=function(e){var t=this.getOriginForCell(e.cell),n=this.graph.getView().getTranslate(),a=this.graph.getView().getScale();return e=new mxPoint(e.x/a-n.x,e.y/a-n.y),new mxPoint((t.x-e.x)*a,(t.y-e.y)*a)},mxMorphing.prototype.getOriginForCell=function(e){var t=null;return null!=e&&(t=this.getOriginForCell(this.graph.getModel().getParent(e)),null!=(e=this.graph.getCellGeometry(e))&&(t.x+=e.x,t.y+=e.y)),null==t&&(t=new mxPoint(-(t=this.graph.view.getTranslate()).x,-t.y)),t},mxImageBundle.prototype.images=null,mxImageBundle.prototype.images=null,mxImageBundle.prototype.putImage=function(e,t,n){this.images[e]={value:t,fallback:n}},mxImageBundle.prototype.getImage=function(e){var t=null;return null!=e&&(null!=(e=this.images[e])&&(t=this.alt?e.fallback:e.value)),t},mxImageExport.prototype.includeOverlays=!1,mxImageExport.prototype.drawState=function(e,t){null!=e&&(this.visitStatesRecursive(e,t,this.drawCellState),this.includeOverlays&&this.visitStatesRecursive(e,t,this.drawOverlays))},mxImageExport.prototype.visitStatesRecursive=function(e,t,n){if(null!=e){n(e,t);for(var a=e.view.graph,i=a.model.getChildCount(e.cell),o=0;o<i;o++){var s=a.view.getState(a.model.getChildAt(e.cell,o));this.visitStatesRecursive(s,t,n)}}},mxImageExport.prototype.drawCellState=function(e,t){e.shape instanceof mxShape&&(t.save(),e.shape.paint(t),t.restore()),null!=e.text&&(t.save(),e.text.paint(t),t.restore())},mxImageExport.prototype.drawOverlays=function(e,n){null!=e.overlays&&e.overlays.visit(function(e,t){t instanceof mxShape&&t.paint(n)})},mxAbstractCanvas2D.prototype.state=null,mxAbstractCanvas2D.prototype.states=null,mxAbstractCanvas2D.prototype.path=null,mxAbstractCanvas2D.prototype.rotateHtml=!0,mxAbstractCanvas2D.prototype.lastX=0,mxAbstractCanvas2D.prototype.lastY=0,mxAbstractCanvas2D.prototype.moveOp="M",mxAbstractCanvas2D.prototype.lineOp="L",mxAbstractCanvas2D.prototype.quadOp="Q",mxAbstractCanvas2D.prototype.curveOp="C",mxAbstractCanvas2D.prototype.closeOp="Z",mxAbstractCanvas2D.prototype.pointerEvents=!1,mxAbstractCanvas2D.prototype.createUrlConverter=function(){return new mxUrlConverter},mxAbstractCanvas2D.prototype.reset=function(){this.state=this.createState(),this.states=[]},mxAbstractCanvas2D.prototype.createState=function(){return{dx:0,dy:0,scale:1,alpha:1,fillColor:null,fillAlpha:1,gradientColor:null,gradientAlpha:1,gradientDirection:null,strokeColor:null,strokeWidth:1,dashed:!1,dashPattern:"3 3",lineCap:"flat",lineJoin:"miter",miterLimit:10,fontColor:"#000000",fontBackgroundColor:null,fontBorderColor:null,fontSize:mxConstants.DEFAULT_FONTSIZE,fontFamily:mxConstants.DEFAULT_FONTFAMILY,fontStyle:0,shadow:!1,shadowColor:mxConstants.SHADOWCOLOR,shadowAlpha:mxConstants.SHADOW_OPACITY,shadowDx:mxConstants.SHADOW_OFFSET_X,shadowDy:mxConstants.SHADOW_OFFSET_Y,rotation:0,rotationCx:0,rotationCy:0}},mxAbstractCanvas2D.prototype.format=function(e){return Math.round(parseFloat(e))},mxAbstractCanvas2D.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var e=this.state,t=2;t<arguments.length;t+=2)this.lastX=arguments[t-1],this.lastY=arguments[t],this.path.push(this.format((this.lastX+e.dx)*e.scale)),this.path.push(this.format((this.lastY+e.dy)*e.scale))},mxAbstractCanvas2D.prototype.rotatePoint=function(e,t,n,a,i){return n*=Math.PI/180,mxUtils.getRotatedPoint(new mxPoint(e,t),Math.cos(n),Math.sin(n),new mxPoint(a,i))},mxAbstractCanvas2D.prototype.save=function(){this.states.push(this.state),this.state=mxUtils.clone(this.state)},mxAbstractCanvas2D.prototype.restore=function(){this.state=this.states.pop()},mxAbstractCanvas2D.prototype.scale=function(e){this.state.scale*=e,this.state.strokeWidth*=e},mxAbstractCanvas2D.prototype.translate=function(e,t){this.state.dx+=e,this.state.dy+=t},mxAbstractCanvas2D.prototype.setAlpha=function(e){this.state.alpha=e},mxAbstractCanvas2D.prototype.setFillColor=function(e){e==mxConstants.NONE&&(e=null),this.state.fillColor=e,this.state.gradientColor=null},mxAbstractCanvas2D.prototype.setGradient=function(e,t,n,a,i,o,s,r,l){(n=this.state).fillColor=e,n.fillAlpha=null!=r?r:1,n.gradientColor=t,n.gradientAlpha=null!=l?l:1,n.gradientDirection=s},mxAbstractCanvas2D.prototype.setStrokeColor=function(e){e==mxConstants.NONE&&(e=null),this.state.strokeColor=e},mxAbstractCanvas2D.prototype.setStrokeWidth=function(e){this.state.strokeWidth=e},mxAbstractCanvas2D.prototype.setDashed=function(e){this.state.dashed=e},mxAbstractCanvas2D.prototype.setDashPattern=function(e){this.state.dashPattern=e},mxAbstractCanvas2D.prototype.setLineCap=function(e){this.state.lineCap=e},mxAbstractCanvas2D.prototype.setLineJoin=function(e){this.state.lineJoin=e},mxAbstractCanvas2D.prototype.setMiterLimit=function(e){this.state.miterLimit=e},mxAbstractCanvas2D.prototype.setFontColor=function(e){e==mxConstants.NONE&&(e=null),this.state.fontColor=e},mxAbstractCanvas2D.prototype.setFontBackgroundColor=function(e){e==mxConstants.NONE&&(e=null),this.state.fontBackgroundColor=e},mxAbstractCanvas2D.prototype.setFontBorderColor=function(e){e==mxConstants.NONE&&(e=null),this.state.fontBorderColor=e},mxAbstractCanvas2D.prototype.setFontSize=function(e){this.state.fontSize=e},mxAbstractCanvas2D.prototype.setFontFamily=function(e){this.state.fontFamily=e},mxAbstractCanvas2D.prototype.setFontStyle=function(e){null==e&&(e=0),this.state.fontStyle=e},mxAbstractCanvas2D.prototype.setShadow=function(e){this.state.shadow=e},mxAbstractCanvas2D.prototype.setShadowColor=function(e){e==mxConstants.NONE&&(e=null),this.state.shadowColor=e},mxAbstractCanvas2D.prototype.setShadowAlpha=function(e){this.state.shadowAlpha=e},mxAbstractCanvas2D.prototype.setShadowOffset=function(e,t){this.state.shadowDx=e,this.state.shadowDy=t},mxAbstractCanvas2D.prototype.begin=function(){this.lastY=this.lastX=0,this.path=[]},mxAbstractCanvas2D.prototype.moveTo=function(e,t){this.addOp(this.moveOp,e,t)},mxAbstractCanvas2D.prototype.lineTo=function(e,t){this.addOp(this.lineOp,e,t)},mxAbstractCanvas2D.prototype.quadTo=function(e,t,n,a){this.addOp(this.quadOp,e,t,n,a)},mxAbstractCanvas2D.prototype.curveTo=function(e,t,n,a,i,o){this.addOp(this.curveOp,e,t,n,a,i,o)},mxAbstractCanvas2D.prototype.arcTo=function(e,t,n,a,i,o,s){for(e=mxUtils.arcToCurves(this.lastX,this.lastY,e,t,n,a,i,o,s),t=0;t<e.length;t+=6)this.curveTo(e[t],e[t+1],e[t+2],e[t+3],e[t+4],e[t+5])},mxAbstractCanvas2D.prototype.close=function(e,t,n,a,i,o){this.addOp(this.closeOp)},mxAbstractCanvas2D.prototype.end=function(){},mxUtils.extend(mxXmlCanvas2D,mxAbstractCanvas2D),mxXmlCanvas2D.prototype.textEnabled=!0,mxXmlCanvas2D.prototype.compressed=!0,mxXmlCanvas2D.prototype.writeDefaults=function(){var e;(e=this.createElement("fontfamily")).setAttribute("family",mxConstants.DEFAULT_FONTFAMILY),this.root.appendChild(e),(e=this.createElement("fontsize")).setAttribute("size",mxConstants.DEFAULT_FONTSIZE),this.root.appendChild(e),(e=this.createElement("shadowcolor")).setAttribute("color",mxConstants.SHADOWCOLOR),this.root.appendChild(e),(e=this.createElement("shadowalpha")).setAttribute("alpha",mxConstants.SHADOW_OPACITY),this.root.appendChild(e),(e=this.createElement("shadowoffset")).setAttribute("dx",mxConstants.SHADOW_OFFSET_X),e.setAttribute("dy",mxConstants.SHADOW_OFFSET_Y),this.root.appendChild(e)},mxXmlCanvas2D.prototype.format=function(e){return parseFloat(parseFloat(e).toFixed(2))},mxXmlCanvas2D.prototype.createElement=function(e){return this.root.ownerDocument.createElement(e)},mxXmlCanvas2D.prototype.save=function(){this.compressed&&mxAbstractCanvas2D.prototype.save.apply(this,arguments),this.root.appendChild(this.createElement("save"))},mxXmlCanvas2D.prototype.restore=function(){this.compressed&&mxAbstractCanvas2D.prototype.restore.apply(this,arguments),this.root.appendChild(this.createElement("restore"))},mxXmlCanvas2D.prototype.scale=function(e){if(this.compressed){if(this.state.scale==e)return;mxAbstractCanvas2D.prototype.setAlpha.apply(this,arguments)}var t=this.createElement("scale");t.setAttribute("scale",e),this.root.appendChild(t)},mxXmlCanvas2D.prototype.translate=function(e,t){var n=this.createElement("translate");n.setAttribute("dx",this.format(e)),n.setAttribute("dy",this.format(t)),this.root.appendChild(n)},mxXmlCanvas2D.prototype.rotate=function(e,t,n,a,i){var o=this.createElement("rotate");(0!=e||t||n)&&(o.setAttribute("theta",this.format(e)),o.setAttribute("flipH",t?"1":"0"),o.setAttribute("flipV",n?"1":"0"),o.setAttribute("cx",this.format(a)),o.setAttribute("cy",this.format(i)),this.root.appendChild(o))},mxXmlCanvas2D.prototype.setAlpha=function(e){if(this.compressed){if(this.state.alpha==e)return;mxAbstractCanvas2D.prototype.setAlpha.apply(this,arguments)}var t=this.createElement("alpha");t.setAttribute("alpha",this.format(e)),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setFillColor=function(e){if(e==mxConstants.NONE&&(e=null),this.compressed){if(this.state.fillColor==e)return;mxAbstractCanvas2D.prototype.setFillColor.apply(this,arguments)}var t=this.createElement("fillcolor");t.setAttribute("color",null!=e?e:mxConstants.NONE),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setGradient=function(e,t,n,a,i,o,s,r,l){if(null!=e&&null!=t){mxAbstractCanvas2D.prototype.setGradient.apply(this,arguments);var d=this.createElement("gradient");d.setAttribute("c1",e),d.setAttribute("c2",t),d.setAttribute("x",this.format(n)),d.setAttribute("y",this.format(a)),d.setAttribute("w",this.format(i)),d.setAttribute("h",this.format(o)),null!=s&&d.setAttribute("direction",s),null!=r&&d.setAttribute("alpha1",r),null!=l&&d.setAttribute("alpha2",l),this.root.appendChild(d)}},mxXmlCanvas2D.prototype.setStrokeColor=function(e){if(e==mxConstants.NONE&&(e=null),this.compressed){if(this.state.strokeColor==e)return;mxAbstractCanvas2D.prototype.setStrokeColor.apply(this,arguments)}var t=this.createElement("strokecolor");t.setAttribute("color",null!=e?e:mxConstants.NONE),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setStrokeWidth=function(e){if(this.compressed){if(this.state.strokeWidth==e)return;mxAbstractCanvas2D.prototype.setStrokeWidth.apply(this,arguments)}var t=this.createElement("strokewidth");t.setAttribute("width",this.format(e)),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setDashed=function(e){if(this.compressed){if(this.state.dashed==e)return;mxAbstractCanvas2D.prototype.setDashed.apply(this,arguments)}var t=this.createElement("dashed");t.setAttribute("dashed",e?"1":"0"),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setDashPattern=function(e){if(this.compressed){if(this.state.dashPattern==e)return;mxAbstractCanvas2D.prototype.setDashPattern.apply(this,arguments)}var t=this.createElement("dashpattern");t.setAttribute("pattern",e),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setLineCap=function(e){if(this.compressed){if(this.state.lineCap==e)return;mxAbstractCanvas2D.prototype.setLineCap.apply(this,arguments)}var t=this.createElement("linecap");t.setAttribute("cap",e),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setLineJoin=function(e){if(this.compressed){if(this.state.lineJoin==e)return;mxAbstractCanvas2D.prototype.setLineJoin.apply(this,arguments)}var t=this.createElement("linejoin");t.setAttribute("join",e),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setMiterLimit=function(e){if(this.compressed){if(this.state.miterLimit==e)return;mxAbstractCanvas2D.prototype.setMiterLimit.apply(this,arguments)}var t=this.createElement("miterlimit");t.setAttribute("limit",e),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setFontColor=function(e){if(this.textEnabled){if(e==mxConstants.NONE&&(e=null),this.compressed){if(this.state.fontColor==e)return;mxAbstractCanvas2D.prototype.setFontColor.apply(this,arguments)}var t=this.createElement("fontcolor");t.setAttribute("color",null!=e?e:mxConstants.NONE),this.root.appendChild(t)}},mxXmlCanvas2D.prototype.setFontBackgroundColor=function(e){if(this.textEnabled){if(e==mxConstants.NONE&&(e=null),this.compressed){if(this.state.fontBackgroundColor==e)return;mxAbstractCanvas2D.prototype.setFontBackgroundColor.apply(this,arguments)}var t=this.createElement("fontbackgroundcolor");t.setAttribute("color",null!=e?e:mxConstants.NONE),this.root.appendChild(t)}},mxXmlCanvas2D.prototype.setFontBorderColor=function(e){if(this.textEnabled){if(e==mxConstants.NONE&&(e=null),this.compressed){if(this.state.fontBorderColor==e)return;mxAbstractCanvas2D.prototype.setFontBorderColor.apply(this,arguments)}var t=this.createElement("fontbordercolor");t.setAttribute("color",null!=e?e:mxConstants.NONE),this.root.appendChild(t)}},mxXmlCanvas2D.prototype.setFontSize=function(e){if(this.textEnabled){if(this.compressed){if(this.state.fontSize==e)return;mxAbstractCanvas2D.prototype.setFontSize.apply(this,arguments)}var t=this.createElement("fontsize");t.setAttribute("size",e),this.root.appendChild(t)}},mxXmlCanvas2D.prototype.setFontFamily=function(e){if(this.textEnabled){if(this.compressed){if(this.state.fontFamily==e)return;mxAbstractCanvas2D.prototype.setFontFamily.apply(this,arguments)}var t=this.createElement("fontfamily");t.setAttribute("family",e),this.root.appendChild(t)}},mxXmlCanvas2D.prototype.setFontStyle=function(e){if(this.textEnabled){if(null==e&&(e=0),this.compressed){if(this.state.fontStyle==e)return;mxAbstractCanvas2D.prototype.setFontStyle.apply(this,arguments)}var t=this.createElement("fontstyle");t.setAttribute("style",e),this.root.appendChild(t)}},mxXmlCanvas2D.prototype.setShadow=function(e){if(this.compressed){if(this.state.shadow==e)return;mxAbstractCanvas2D.prototype.setShadow.apply(this,arguments)}var t=this.createElement("shadow");t.setAttribute("enabled",e?"1":"0"),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setShadowColor=function(e){if(this.compressed){if(e==mxConstants.NONE&&(e=null),this.state.shadowColor==e)return;mxAbstractCanvas2D.prototype.setShadowColor.apply(this,arguments)}var t=this.createElement("shadowcolor");t.setAttribute("color",null!=e?e:mxConstants.NONE),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setShadowAlpha=function(e){if(this.compressed){if(this.state.shadowAlpha==e)return;mxAbstractCanvas2D.prototype.setShadowAlpha.apply(this,arguments)}var t=this.createElement("shadowalpha");t.setAttribute("alpha",e),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setShadowOffset=function(e,t){if(this.compressed){if(this.state.shadowDx==e&&this.state.shadowDy==t)return;mxAbstractCanvas2D.prototype.setShadowOffset.apply(this,arguments)}var n=this.createElement("shadowoffset");n.setAttribute("dx",e),n.setAttribute("dy",t),this.root.appendChild(n)},mxXmlCanvas2D.prototype.rect=function(e,t,n,a){var i=this.createElement("rect");i.setAttribute("x",this.format(e)),i.setAttribute("y",this.format(t)),i.setAttribute("w",this.format(n)),i.setAttribute("h",this.format(a)),this.root.appendChild(i)},mxXmlCanvas2D.prototype.roundrect=function(e,t,n,a,i,o){var s=this.createElement("roundrect");s.setAttribute("x",this.format(e)),s.setAttribute("y",this.format(t)),s.setAttribute("w",this.format(n)),s.setAttribute("h",this.format(a)),s.setAttribute("dx",this.format(i)),s.setAttribute("dy",this.format(o)),this.root.appendChild(s)},mxXmlCanvas2D.prototype.ellipse=function(e,t,n,a){var i=this.createElement("ellipse");i.setAttribute("x",this.format(e)),i.setAttribute("y",this.format(t)),i.setAttribute("w",this.format(n)),i.setAttribute("h",this.format(a)),this.root.appendChild(i)},mxXmlCanvas2D.prototype.image=function(e,t,n,a,i,o,s,r){i=this.converter.convert(i);var l=this.createElement("image");l.setAttribute("x",this.format(e)),l.setAttribute("y",this.format(t)),l.setAttribute("w",this.format(n)),l.setAttribute("h",this.format(a)),l.setAttribute("src",i),l.setAttribute("aspect",o?"1":"0"),l.setAttribute("flipH",s?"1":"0"),l.setAttribute("flipV",r?"1":"0"),this.root.appendChild(l)},mxXmlCanvas2D.prototype.begin=function(){this.root.appendChild(this.createElement("begin")),this.lastY=this.lastX=0},mxXmlCanvas2D.prototype.moveTo=function(e,t){var n=this.createElement("move");n.setAttribute("x",this.format(e)),n.setAttribute("y",this.format(t)),this.root.appendChild(n),this.lastX=e,this.lastY=t},mxXmlCanvas2D.prototype.lineTo=function(e,t){var n=this.createElement("line");n.setAttribute("x",this.format(e)),n.setAttribute("y",this.format(t)),this.root.appendChild(n),this.lastX=e,this.lastY=t},mxXmlCanvas2D.prototype.quadTo=function(e,t,n,a){var i=this.createElement("quad");i.setAttribute("x1",this.format(e)),i.setAttribute("y1",this.format(t)),i.setAttribute("x2",this.format(n)),i.setAttribute("y2",this.format(a)),this.root.appendChild(i),this.lastX=n,this.lastY=a},mxXmlCanvas2D.prototype.curveTo=function(e,t,n,a,i,o){var s=this.createElement("curve");s.setAttribute("x1",this.format(e)),s.setAttribute("y1",this.format(t)),s.setAttribute("x2",this.format(n)),s.setAttribute("y2",this.format(a)),s.setAttribute("x3",this.format(i)),s.setAttribute("y3",this.format(o)),this.root.appendChild(s),this.lastX=i,this.lastY=o},mxXmlCanvas2D.prototype.close=function(){this.root.appendChild(this.createElement("close"))},mxXmlCanvas2D.prototype.text=function(e,t,n,a,i,o,s,r,l,d,c,m){if(this.textEnabled&&null!=i){mxUtils.isNode(i)&&(i=mxUtils.getOuterHtml(i));var u=this.createElement("text");u.setAttribute("x",this.format(e)),u.setAttribute("y",this.format(t)),u.setAttribute("w",this.format(n)),u.setAttribute("h",this.format(a)),u.setAttribute("str",i),null!=o&&u.setAttribute("align",o),null!=s&&u.setAttribute("valign",s),u.setAttribute("wrap",r?"1":"0"),null==l&&(l=""),u.setAttribute("format",l),null!=d&&u.setAttribute("fill",d?"1":"0"),null!=c&&u.setAttribute("clip",c?"1":"0"),null!=m&&u.setAttribute("rotation",m),this.root.appendChild(u)}},mxXmlCanvas2D.prototype.stroke=function(){this.root.appendChild(this.createElement("stroke"))},mxXmlCanvas2D.prototype.fill=function(){this.root.appendChild(this.createElement("fill"))},mxXmlCanvas2D.prototype.fillAndStroke=function(){this.root.appendChild(this.createElement("fillstroke"))},mxUtils.extend(mxSvgCanvas2D,mxAbstractCanvas2D),mxSvgCanvas2D.prototype.node=null,mxSvgCanvas2D.prototype.matchHtmlAlignment=!0,mxSvgCanvas2D.prototype.textEnabled=!0,mxSvgCanvas2D.prototype.foEnabled=!0,mxSvgCanvas2D.prototype.strokeTolerance=0,mxSvgCanvas2D.prototype.refCount=0,mxSvgCanvas2D.prototype.blockImagePointerEvents=!1,mxSvgCanvas2D.prototype.reset=function(){mxAbstractCanvas2D.prototype.reset.apply(this,arguments),this.gradients=[]},mxSvgCanvas2D.prototype.createStyle=function(e){return(e=this.createElement("style")).setAttribute("type","text/css"),mxUtils.write(e,"svg{font-family:"+mxConstants.DEFAULT_FONTFAMILY+";font-size:"+mxConstants.DEFAULT_FONTSIZE+";fill:none;stroke-miterlimit:10}"),e},mxSvgCanvas2D.prototype.createElement=function(e,t){if(null!=this.root.ownerDocument.createElementNS)return this.root.ownerDocument.createElementNS(t||mxConstants.NS_SVG,e);var n=this.root.ownerDocument.createElement(e);return null!=t&&n.setAttribute("xmlns",t),n},mxSvgCanvas2D.prototype.createGradientId=function(e,t,n,a,i){return"#"==e.charAt(0)&&(e=e.substring(1)),"#"==t.charAt(0)&&(t=t.substring(1)),e=e.toLowerCase()+"-"+n,t=t.toLowerCase()+"-"+a,(n=null)==i||i==mxConstants.DIRECTION_SOUTH?n="s":i==mxConstants.DIRECTION_EAST?n="e":(a=e,e=t,t=a,i==mxConstants.DIRECTION_NORTH?n="s":i==mxConstants.DIRECTION_WEST&&(n="e")),"mx-gradient-"+e+"-"+t+"-"+n},mxSvgCanvas2D.prototype.getSvgGradient=function(e,t,n,a,i){var o=this.createGradientId(e,t,n,a,i),s=this.gradients[o];if(null==s){var r=this.root.ownerSVGElement,l=0,d=o+"-"+l;if(null!=r)for(s=r.ownerDocument.getElementById(d);null!=s&&s.ownerSVGElement!=r;)d=o+"-"+l++,s=r.ownerDocument.getElementById(d);else d="id"+ ++this.refCount;null==s&&((s=this.createSvgGradient(e,t,n,a,i)).setAttribute("id",d),null!=this.defs?this.defs.appendChild(s):r.appendChild(s)),this.gradients[o]=s}return s.getAttribute("id")},mxSvgCanvas2D.prototype.createSvgGradient=function(e,t,n,a,i){var o=this.createElement("linearGradient");return o.setAttribute("x1","0%"),o.setAttribute("y1","0%"),o.setAttribute("x2","0%"),o.setAttribute("y2","0%"),null==i||i==mxConstants.DIRECTION_SOUTH?o.setAttribute("y2","100%"):i==mxConstants.DIRECTION_EAST?o.setAttribute("x2","100%"):i==mxConstants.DIRECTION_NORTH?o.setAttribute("y1","100%"):i==mxConstants.DIRECTION_WEST&&o.setAttribute("x1","100%"),n=n<1?";stop-opacity:"+n:"",(i=this.createElement("stop")).setAttribute("offset","0%"),i.setAttribute("style","stop-color:"+e+n),o.appendChild(i),n=a<1?";stop-opacity:"+a:"",(i=this.createElement("stop")).setAttribute("offset","100%"),i.setAttribute("style","stop-color:"+t+n),o.appendChild(i),o},mxSvgCanvas2D.prototype.addNode=function(e,t){var n=this.node,a=this.state;if(null!=n){if("path"==n.nodeName){if(!(null!=this.path&&0<this.path.length))return;n.setAttribute("d",this.path.join(" "))}e&&null!=a.fillColor?this.updateFill():this.styleEnabled||("ellipse"!=n.nodeName||!mxClient.IS_NS||mxClient.IS_GC||mxClient.IS_SF?n.setAttribute("fill","none"):n.setAttribute("fill","transparent"),e=!1),t&&null!=a.strokeColor?this.updateStroke():this.styleEnabled||n.setAttribute("stroke","none"),null!=a.transform&&0<a.transform.length&&n.setAttribute("transform",a.transform),a.shadow&&this.root.appendChild(this.createShadow(n)),0<this.strokeTolerance&&!e&&this.root.appendChild(this.createTolerance(n)),this.pointerEvents&&("path"!=n.nodeName||this.path[this.path.length-1]==this.closeOp)&&n.setAttribute("pointer-events","all"),this.root.appendChild(n)}},mxSvgCanvas2D.prototype.updateFill=function(){var e=this.state;e.alpha<1&&this.node.setAttribute("fill-opacity",e.alpha),null!=e.fillColor&&(null!=e.gradientColor?(e=this.getSvgGradient(e.fillColor,e.gradientColor,e.fillAlpha,e.gradientAlpha,e.gradientDirection),this.node.setAttribute("fill","url(#"+e+")")):this.node.setAttribute("fill",e.fillColor.toLowerCase()))},mxSvgCanvas2D.prototype.updateStroke=function(){var e=this.state;this.node.setAttribute("stroke",e.strokeColor.toLowerCase()),e.alpha<1&&this.node.setAttribute("stroke-opacity",e.alpha);var t=Math.max(1,this.format(e.strokeWidth*e.scale));1!=t&&this.node.setAttribute("stroke-width",t),"path"==this.node.nodeName&&this.updateStrokeAttributes(),e.dashed&&this.node.setAttribute("stroke-dasharray",this.createDashPattern(t))},mxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var e=this.state;if(null!=e.lineJoin&&"miter"!=e.lineJoin&&this.node.setAttribute("stroke-linejoin",e.lineJoin),null!=e.lineCap){var t=e.lineCap;"flat"==t&&(t="butt"),"butt"!=t&&this.node.setAttribute("stroke-linecap",t)}null!=e.miterLimit&&(!this.styleEnabled||10!=e.miterLimit)&&this.node.setAttribute("stroke-miterlimit",e.miterLimit)},mxSvgCanvas2D.prototype.createDashPattern=function(e){var t=this.state.dashPattern.split(" "),n=[];if(0<t.length)for(var a=0;a<t.length;a++)n[a]=Number(t[a])*e;return n.join(" ")},mxSvgCanvas2D.prototype.createTolerance=function(e){e=e.cloneNode(!0);var t=parseFloat(e.getAttribute("stroke-width")||1)+this.strokeTolerance;return e.setAttribute("pointer-events","stroke"),e.setAttribute("visibility","hidden"),e.removeAttribute("stroke-dasharray"),e.setAttribute("stroke-width",t),e.setAttribute("fill","none"),e.setAttribute("stroke",mxClient.IS_OP?"none":"white"),e},mxSvgCanvas2D.prototype.createShadow=function(e){e=e.cloneNode(!0);var t=this.state;return"none"!=e.getAttribute("fill")&&e.setAttribute("fill",t.shadowColor),"none"!=e.getAttribute("stroke")&&e.setAttribute("stroke",t.shadowColor),e.setAttribute("transform","translate("+this.format(t.shadowDx*t.scale)+","+this.format(t.shadowDy*t.scale)+")"+(t.transform||"")),e.setAttribute("opacity",t.shadowAlpha),e},mxSvgCanvas2D.prototype.rotate=function(e,t,n,a,i){if(0!=e||t||n){var o=this.state;if(a+=o.dx,i+=o.dy,a*=o.scale,i*=o.scale,o.transform=o.transform||"",t&&n)e+=180;else if(t^n){var s=t?a:0,r=t?-1:1,l=n?i:0,d=n?-1:1;o.transform+="translate("+this.format(s)+","+this.format(l)+")scale("+this.format(r)+","+this.format(d)+")translate("+this.format(-s)+","+this.format(-l)+")"}(t?!n:n)&&(e*=-1),0!=e&&(o.transform+="rotate("+this.format(e)+","+this.format(a)+","+this.format(i)+")"),o.rotation+=e,o.rotationCx=a,o.rotationCy=i}},mxSvgCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments),this.node=this.createElement("path")},mxSvgCanvas2D.prototype.rect=function(e,t,n,a){var i=this.state,o=this.createElement("rect");o.setAttribute("x",this.format((e+i.dx)*i.scale)),o.setAttribute("y",this.format((t+i.dy)*i.scale)),o.setAttribute("width",this.format(n*i.scale)),o.setAttribute("height",this.format(a*i.scale)),this.node=o},mxSvgCanvas2D.prototype.roundrect=function(e,t,n,a,i,o){this.rect(e,t,n,a),0<i&&this.node.setAttribute("rx",this.format(i*this.state.scale)),0<o&&this.node.setAttribute("ry",this.format(o*this.state.scale))},mxSvgCanvas2D.prototype.ellipse=function(e,t,n,a){var i=this.state,o=this.createElement("ellipse");o.setAttribute("cx",Math.round((e+n/2+i.dx)*i.scale)),o.setAttribute("cy",Math.round((t+a/2+i.dy)*i.scale)),o.setAttribute("rx",n/2*i.scale),o.setAttribute("ry",a/2*i.scale),this.node=o},mxSvgCanvas2D.prototype.image=function(e,t,n,a,i,o,s,r){i=this.converter.convert(i),o=null==o||o,s=null!=s&&s,r=null!=r&&r;var l=this.state;e+=l.dx,t+=l.dy;var d=this.createElement("image");if(d.setAttribute("x",this.format(e*l.scale)),d.setAttribute("y",this.format(t*l.scale)),d.setAttribute("width",this.format(n*l.scale)),d.setAttribute("height",this.format(a*l.scale)),null==d.setAttributeNS?d.setAttribute("xlink:href",i):d.setAttributeNS(mxConstants.NS_XLINK,"href",i),o||d.setAttribute("preserveAspectRatio","none"),l.alpha<1&&d.setAttribute("opacity",l.alpha),i=this.state.transform||"",s||r){var c=o=1,m=0,u=0;s&&(o=-1,m=-n-2*e),r&&(c=-1,u=-a-2*t),i+="scale("+o+","+c+")translate("+m+","+u+")"}0<i.length&&d.setAttribute("transform",i),this.root.appendChild(d),this.blockImagePointerEvents&&(d.setAttribute("style","pointer-events:none"),(d=this.createElement("rect")).setAttribute("visibility","hidden"),d.setAttribute("pointer-events","fill"),d.setAttribute("x",this.format(e*l.scale)),d.setAttribute("y",this.format(t*l.scale)),d.setAttribute("width",this.format(n*l.scale)),d.setAttribute("height",this.format(a*l.scale)),this.root.appendChild(d))},mxSvgCanvas2D.prototype.createDiv=function(e,t,n,a,i){return n=this.state,a="display:inline-block;font-size:"+Math.round(n.fontSize)+"px;font-family:"+n.fontFamily+";color:"+n.fontColor+";line-height:"+Math.round(n.fontSize*mxConstants.LINE_HEIGHT)+"px;"+a,(n.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="font-weight:bold;"),(n.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="font-style:italic;"),(n.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(a+="font-decoration:underline;"),t==mxConstants.ALIGN_CENTER?a+="text-align:center;":t==mxConstants.ALIGN_RIGHT&&(a+="text-align:right;"),t="",null!=n.fontBackgroundColor&&(t+="background-color:"+n.fontBackgroundColor+";"),null!=n.fontBorderColor&&(t+="border:1px solid "+n.fontBorderColor+";"),mxUtils.isNode(e)||((n=document.createElement("textarea")).innerHTML=e.replace(/&lt;/g,"&amp;lt;").replace(/&gt;/g,"&amp;gt;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=n.value,i?a+=t:0<t.length&&(e='<div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;'+t+'">'+e+"</div>")),!mxClient.IS_IE&&document.createElementNS?((i=document.createElementNS("http://www.w3.org/1999/xhtml","div")).setAttribute("style",a),mxUtils.isNode(e)?this.root.ownerDocument!=document?i.appendChild(e.cloneNode(!0)):i.appendChild(e):i.innerHTML=e,i):(mxUtils.isNode(e)&&this.root.ownerDocument!=document&&(e=e.outerHTML),e=e.replace(/<br>/g,"<br />").replace(/<hr>/g,"<hr />"),mxUtils.parseXml('<div xmlns="http://www.w3.org/1999/xhtml" style="'+a+'">'+e+"</div>").documentElement)},mxSvgCanvas2D.prototype.text=function(e,t,n,a,i,o,s,r,l,d,c,m){if(this.textEnabled&&null!=i){m=null!=m?m:0;var u=this.state;if(e+=u.dx,t+=u.dy,this.foEnabled&&"html"==l){var p="vertical-align:top;";if(c?(p+="overflow:hidden;",0<a&&(p+="max-height:"+Math.round(a)+"px;"),0<n&&(p+="width:"+Math.round(n)+"px;")):d&&(p+="width:"+Math.round(n)+"px;",0<a&&(p+="max-height:"+Math.round(a)+"px;")),r?(!c&&0<n&&(p+="width:"+Math.round(n)+"px;"),p+="white-space:normal;"):p+="white-space:nowrap;",r=this.createElement("g"),u.alpha<1&&r.setAttribute("opacity",u.alpha),(l=this.createElement("foreignObject")).setAttribute("pointer-events","all"),null!=(p=this.createDiv(i,o,s,p,d))){r.appendChild(l),this.root.appendChild(r);var g=0;if(mxClient.IS_IE&&!mxClient.IS_SVG){var v=document.createElement("div");v.style.cssText=p.getAttribute("style"),v.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",v.style.visibility="hidden",v.innerHTML=mxUtils.isNode(i)?i.outerHTML:i,document.body.appendChild(v),g=v.offsetWidth,a=mxClient.IS_QUIRKS&&0<a&&c?Math.min(a,v.offsetHeight+2):v.offsetHeight,v.parentNode.removeChild(v),l.appendChild(p)}else this.root.ownerDocument!=document?(p.style.visibility="hidden",document.body.appendChild(p),g=p.offsetWidth,a=p.offsetHeight,l.appendChild(p),p.style.visibility=""):(l.appendChild(p),g=p.offsetWidth,a=p.offsetHeight);n=d?Math.max(n,g):g,u.alpha<1&&r.setAttribute("opacity",u.alpha),d=i=0,o==mxConstants.ALIGN_CENTER?i-=n/2:o==mxConstants.ALIGN_RIGHT&&(i-=n),e+=i,s==mxConstants.ALIGN_MIDDLE?d-=a/2:s==mxConstants.ALIGN_BOTTOM&&(d-=a),t+=d,o=1!=u.scale?"scale("+u.scale+")":"",0!=u.rotation&&this.rotateHtml?(o+="rotate("+u.rotation+","+n/2+","+a/2+")",e=(t=this.rotatePoint((e+n/2)*u.scale,(t+a/2)*u.scale,u.rotation,u.rotationCx,u.rotationCy)).x-n*u.scale/2,t=t.y-a*u.scale/2):(e*=u.scale,t*=u.scale),0!=m&&(o+="rotate("+m+","+-i+","+-d+")"),r.setAttribute("transform","translate("+Math.round(e)+","+Math.round(t)+")"+o),l.setAttribute("width",Math.round(Math.max(1,n))),l.setAttribute("height",Math.round(Math.max(1,a)))}}else this.plainText(e,t,n,a,i,o,s,r,d,c,m)}},mxSvgCanvas2D.prototype.createClip=function(e,t,n,a){for(var i="mx-clip-"+(e=Math.round(e))+"-"+(t=Math.round(t))+"-"+(n=Math.round(n))+"-"+(a=Math.round(a)),o=0,s=i+"-"+o;null!=document.getElementById(s);)s=i+"-"+ ++o;return clip=this.createElement("clipPath"),clip.setAttribute("id",s),(i=this.createElement("rect")).setAttribute("x",e),i.setAttribute("y",t),i.setAttribute("width",n),i.setAttribute("height",a),clip.appendChild(i),clip},mxSvgCanvas2D.prototype.plainText=function(e,t,n,a,i,o,s,r,l,d,c){c=null!=c?c:0,r=this.state;var m=Math.round(r.fontSize),u=this.createElement("g"),p=r.transform||"";if(0!=c&&(p+="rotate("+c+","+this.format(e*r.scale)+","+this.format(t*r.scale)+")"),d&&0<n&&0<a){var g=e;c=t,o==mxConstants.ALIGN_CENTER?g-=n/2:o==mxConstants.ALIGN_RIGHT&&(g-=n),s==mxConstants.ALIGN_MIDDLE?c-=a/2:s==mxConstants.ALIGN_BOTTOM&&(c-=a),c=this.createClip(g*r.scale-2,c*r.scale-2,n*r.scale+4,a*r.scale+4),null!=this.defs?this.defs.appendChild(c):this.root.appendChild(c),u.setAttribute("clip-path","url(#"+c.getAttribute("id")+")")}this.updateFont(u,o),"start"!=(c=o==mxConstants.ALIGN_RIGHT?"end":o==mxConstants.ALIGN_CENTER?"middle":"start")&&u.setAttribute("text-anchor",c),(!this.styleEnabled||m!=mxConstants.DEFAULT_FONTSIZE)&&u.setAttribute("font-size",Math.round(m*r.scale)+"px"),0<p.length&&u.setAttribute("transform",p),r.alpha<1&&u.setAttribute("opacity",r.alpha);p=i.split("\n"),g=Math.round(m*mxConstants.LINE_HEIGHT);var v=m+(p.length-1)*g;for(c=t+m-1,s==mxConstants.ALIGN_MIDDLE?c-=(a=(this.matchHtmlAlignment&&d&&0<a?Math.min(v,a):v)/2)+1:s==mxConstants.ALIGN_BOTTOM&&(c-=(a=this.matchHtmlAlignment&&d&&0<a?Math.min(v,a):v)+2),a=0;a<p.length;a++)0<p[a].length&&0<mxUtils.trim(p[a]).length&&((d=this.createElement("text")).setAttribute("x",this.format(e*r.scale)),d.setAttribute("y",this.format(c*r.scale)),mxUtils.write(d,p[a]),u.appendChild(d)),c+=g;this.root.appendChild(u),this.addTextBackground(u,i,e,t,n,v,o,s,l)},mxSvgCanvas2D.prototype.updateFont=function(e){var t=this.state;e.setAttribute("fill",t.fontColor),(!this.styleEnabled||t.fontFamily!=mxConstants.DEFAULT_FONTFAMILY)&&e.setAttribute("font-family",t.fontFamily),(t.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&e.setAttribute("font-weight","bold"),(t.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&e.setAttribute("font-style","italic"),(t.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&e.setAttribute("text-decoration","underline")},mxSvgCanvas2D.prototype.addTextBackground=function(e,t,n,a,i,o,s,r,l){var d=this.state;if(null!=d.fontBackgroundColor||null!=d.fontBorderColor){var c=null;l?(s==mxConstants.ALIGN_CENTER?n-=i/2:s==mxConstants.ALIGN_RIGHT&&(n-=i),r==mxConstants.ALIGN_MIDDLE?a-=o/2:r==mxConstants.ALIGN_BOTTOM&&(a-=o),c=new mxRectangle((n+1)*d.scale,a*d.scale,(i-2)*d.scale,(o+2)*d.scale)):null!=e.getBBox&&this.root.ownerDocument==document?(c=e.getBBox(),t=mxClient.IS_IE&&mxClient.IS_SVG,c=new mxRectangle(c.x,c.y+(t?0:1),c.width,c.height+(t?1:0))):((c=document.createElement("div")).style.lineHeight=Math.round(d.fontSize*mxConstants.LINE_HEIGHT)+"px",c.style.fontSize=Math.round(d.fontSize)+"px",c.style.fontFamily=d.fontFamily,c.style.whiteSpace="nowrap",c.style.position="absolute",c.style.visibility="hidden",c.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",c.style.zoom="1",(d.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(c.style.fontWeight="bold"),(d.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(c.style.fontStyle="italic"),t=mxUtils.htmlEntities(t,!1),c.innerHTML=t.replace(/\n/g,"<br/>"),document.body.appendChild(c),i=c.offsetWidth,o=c.offsetHeight,c.parentNode.removeChild(c),s==mxConstants.ALIGN_CENTER?n-=i/2:s==mxConstants.ALIGN_RIGHT&&(n-=i),r==mxConstants.ALIGN_MIDDLE?a-=o/2:r==mxConstants.ALIGN_BOTTOM&&(a-=o),c=new mxRectangle((n+1)*d.scale,(a+2)*d.scale,i*d.scale,(o+1)*d.scale)),null!=c&&((t=this.createElement("rect")).setAttribute("fill",d.fontBackgroundColor||"none"),t.setAttribute("stroke",d.fontBorderColor||"none"),t.setAttribute("x",Math.floor(c.x-1)),t.setAttribute("y",Math.floor(c.y-1)),t.setAttribute("width",Math.ceil(c.width+2)),t.setAttribute("height",Math.ceil(c.height)),d=null!=d.fontBorderColor?Math.max(1,this.format(d.scale)):0,t.setAttribute("stroke-width",d),this.root.ownerDocument==document&&1==mxUtils.mod(d,2)&&t.setAttribute("transform","translate(0.5, 0.5)"),e.insertBefore(t,e.firstChild))}},mxSvgCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)},mxSvgCanvas2D.prototype.fill=function(){this.addNode(!0,!1)},mxSvgCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};var mxVmlCanvas2D=function(e){mxAbstractCanvas2D.call(this),this.root=e};function mxGuide(e,t){this.graph=e,this.setStates(t)}function mxStencil(e){this.desc=e,this.parseDescription(),this.parseConstraints()}function mxShape(e){this.stencil=e,this.strokewidth=1,this.rotation=0,this.opacity=100,this.flipV=this.flipH=!1}mxUtils.extend(mxVmlCanvas2D,mxAbstractCanvas2D),mxVmlCanvas2D.prototype.node=null,mxVmlCanvas2D.prototype.textEnabled=!0,mxVmlCanvas2D.prototype.moveOp="m",mxVmlCanvas2D.prototype.lineOp="l",mxVmlCanvas2D.prototype.curveOp="c",mxVmlCanvas2D.prototype.closeOp="x",mxVmlCanvas2D.prototype.rotatedHtmlBackground="",mxVmlCanvas2D.prototype.vmlScale=1,mxVmlCanvas2D.prototype.addNode=function(e,t){var n=this.node,a=this.state;if(null!=n){if("shape"==n.nodeName){if(!(null!=this.path&&0<this.path.length))return;n.path=this.path.join(" ")+" e",n.style.width=this.root.style.width,n.style.height=this.root.style.height,n.coordsize=parseInt(n.style.width)+" "+parseInt(n.style.height)}n.strokeweight=this.format(Math.max(1,a.strokeWidth*a.scale/this.vmlScale))+"px",a.shadow&&this.root.appendChild(this.createShadow(n,e&&null!=a.fillColor,t&&null!=a.strokeColor)),t&&null!=a.strokeColor?(n.stroked="true",n.strokecolor=a.strokeColor):n.stroked="false",n.appendChild(this.createStroke()),e&&null!=a.fillColor?n.appendChild(this.createFill()):!this.pointerEvents||"shape"==n.nodeName&&this.path[this.path.length-1]!=this.closeOp?n.filled="false":n.appendChild(this.createTransparentFill()),this.root.appendChild(n)}},mxVmlCanvas2D.prototype.createTransparentFill=function(){var e=document.createElement(mxClient.VML_PREFIX+":fill");return e.src=mxClient.imageBasePath+"/transparent.gif",e.type="tile",e},mxVmlCanvas2D.prototype.createFill=function(){var e=this.state,t=document.createElement(mxClient.VML_PREFIX+":fill");if(t.color=e.fillColor,null!=e.gradientColor){t.type="gradient",t.method="none",t.color2=e.gradientColor;var n=180-e.rotation;n=e.gradientDirection==mxConstants.DIRECTION_WEST?n-(90+("x"==this.root.style.flip?180:0)):e.gradientDirection==mxConstants.DIRECTION_EAST?n+(90+("x"==this.root.style.flip?180:0)):e.gradientDirection==mxConstants.DIRECTION_NORTH?n-(180+("y"==this.root.style.flip?-180:0)):n+("y"==this.root.style.flip?-180:0);"x"!=this.root.style.flip&&"y"!=this.root.style.flip||(n*=-1),t.angle=mxUtils.mod(n,360),t.opacity=100*e.alpha*e.fillAlpha+"%",t.setAttribute(mxClient.OFFICE_PREFIX+":opacity2",100*e.alpha*e.gradientAlpha+"%")}else e.alpha<1&&(t.opacity=100*e.alpha+"%");return t},mxVmlCanvas2D.prototype.createStroke=function(){var e=this.state,t=document.createElement(mxClient.VML_PREFIX+":stroke");return t.endcap=e.lineCap||"flat",t.joinstyle=e.lineJoin||"miter",t.miterlimit=e.miterLimit||"10",e.alpha<1&&(t.opacity=100*e.alpha+"%"),e.dashed&&(t.dashstyle=this.getVmlDashStyle()),t},mxVmlCanvas2D.prototype.getVmlDashStyle=function(){var e="dash";if(null!=this.state.dashPattern){var t=this.state.dashPattern.split(" ");0<t.length&&1==t[0]&&(e="0 2")}return e},mxVmlCanvas2D.prototype.createShadow=function(e,t,n){var a=this.state,i=-a.rotation*(Math.PI/180),o=Math.cos(i),s=(i=Math.sin(i),a.shadowDx*a.scale),r=a.shadowDy*a.scale;"x"==this.root.style.flip?s*=-1:"y"==this.root.style.flip&&(r*=-1);var l=e.cloneNode(!0);return l.style.marginLeft=Math.round(s*o-r*i)+"px",l.style.marginTop=Math.round(s*i+r*o)+"px",8==document.documentMode&&(l.strokeweight=e.strokeweight,"shape"==e.nodeName&&(l.path=this.path.join(" ")+" e",l.style.width=this.root.style.width,l.style.height=this.root.style.height,l.coordsize=parseInt(e.style.width)+" "+parseInt(e.style.height))),n?(l.strokecolor=a.shadowColor,l.appendChild(this.createShadowStroke())):l.stroked="false",t?l.appendChild(this.createShadowFill()):l.filled="false",l},mxVmlCanvas2D.prototype.createShadowFill=function(){var e=document.createElement(mxClient.VML_PREFIX+":fill");return e.color=this.state.shadowColor,e.opacity=100*this.state.alpha*this.state.shadowAlpha+"%",e},mxVmlCanvas2D.prototype.createShadowStroke=function(){var e=this.createStroke();return e.opacity=100*this.state.alpha*this.state.shadowAlpha+"%",e},mxVmlCanvas2D.prototype.rotate=function(e,t,n,a,i){t&&n?e+=180:t?this.root.style.flip="x":n&&(this.root.style.flip="y"),(t?!n:n)&&(e*=-1),this.root.style.rotation=e,this.state.rotation+=e,this.state.rotationCx=a,this.state.rotationCy=i},mxVmlCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments),this.node=document.createElement(mxClient.VML_PREFIX+":shape"),this.node.style.position="absolute"},mxVmlCanvas2D.prototype.quadTo=function(e,t,n,a){var i=this.state,o=(this.lastX+i.dx)*i.scale,s=(this.lastY+i.dy)*i.scale;e=(e+i.dx)*i.scale;s+=2/3*((t=(t+i.dy)*i.scale)-s);var r=(n=(n+i.dx)*i.scale)+2/3*(e-n);t=(a=(a+i.dy)*i.scale)+2/3*(t-a),this.path.push("c "+this.format(o+2/3*(e-o))+" "+this.format(s)+" "+this.format(r)+" "+this.format(t)+" "+this.format(n)+" "+this.format(a)),this.lastX=n/i.scale-i.dx,this.lastY=a/i.scale-i.dy},mxVmlCanvas2D.prototype.createRect=function(e,t,n,a,i){var o=this.state;return(e=document.createElement(e)).style.position="absolute",e.style.left=this.format((t+o.dx)*o.scale)+"px",e.style.top=this.format((n+o.dy)*o.scale)+"px",e.style.width=this.format(a*o.scale)+"px",e.style.height=this.format(i*o.scale)+"px",e},mxVmlCanvas2D.prototype.rect=function(e,t,n,a){this.node=this.createRect(mxClient.VML_PREFIX+":rect",e,t,n,a)},mxVmlCanvas2D.prototype.roundrect=function(e,t,n,a,i,o){this.node=this.createRect(mxClient.VML_PREFIX+":roundrect",e,t,n,a),this.node.setAttribute("arcsize",Math.max(100*i/n,100*o/a)+"%")},mxVmlCanvas2D.prototype.ellipse=function(e,t,n,a){this.node=this.createRect(mxClient.VML_PREFIX+":oval",e,t,n,a)},mxVmlCanvas2D.prototype.image=function(e,t,n,a,i,o,s,r){var l=null;o?((l=this.createRect(mxClient.VML_PREFIX+":rect",e,t,n,a)).stroked="false",(e=document.createElement(mxClient.VML_PREFIX+":fill")).aspect=o?"atmost":"ignore",e.rotate="true",e.type="frame",e.src=i,l.appendChild(e)):(l=this.createRect(mxClient.VML_PREFIX+":image",e,t,n,a)).src=i,s&&r?l.style.rotation="180":s?l.style.flip="x":r&&(l.style.flip="y"),this.state.alpha<1&&(l.style.filter+="alpha(opacity="+100*this.state.alpha+")"),this.root.appendChild(l)},mxVmlCanvas2D.prototype.createDiv=function(e,t,n,a){n=document.createElement("div");var i=this.state,o="";return null!=i.fontBackgroundColor&&(o+="background-color:"+i.fontBackgroundColor+";"),null!=i.fontBorderColor&&(o+="border:1px solid "+i.fontBorderColor+";"),mxUtils.isNode(e)?n.appendChild(e):0<o.length&&!a?((a=document.createElement("div")).style.cssText=o,a.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",a.style.zoom="1",a.innerHTML=e,n.appendChild(a)):(n.style.cssText=o,n.innerHTML=e),(e=n.style).fontSize=Math.round(i.fontSize/this.vmlScale)+"px",e.fontFamily=i.fontFamily,e.color=i.fontColor,e.verticalAlign="top",e.textAlign=t||"left",e.lineHeight=Math.round(i.fontSize*mxConstants.LINE_HEIGHT/this.vmlScale)+"px",(i.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(e.fontWeight="bold"),(i.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(e.fontStyle="italic"),(i.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(e.fontDecoration="underline"),n},mxVmlCanvas2D.prototype.text=function(e,t,n,a,i,o,s,r,l,d,c,m){if(this.textEnabled&&null!=i){var u=this.state;if("html"==l){null!=u.rotation&&(e=(t=this.rotatePoint(e,t,u.rotation,u.rotationCx,u.rotationCy)).x,t=t.y),8==document.documentMode?(e+=u.dx,t+=u.dy):(e*=u.scale,t*=u.scale),(l=8==document.documentMode?document.createElement(mxClient.VML_PREFIX+":group"):document.createElement("div")).style.position="absolute",l.style.display="inline",l.style.left=this.format(e)+"px",l.style.top=this.format(t)+"px",l.style.zoom=u.scale;var p=document.createElement("div");p.style.position="relative",p.style.display="inline";var g=(v=mxUtils.getAlignmentAsPoint(o,s)).x,v=v.y;if(i=this.createDiv(i,o,s,d),o=document.createElement("div"),r?(!c&&0<n&&(i.style.width=Math.round(n)+"px"),i.style.whiteSpace="normal"):i.style.whiteSpace="nowrap",r=u.rotation+(m||0),this.rotateHtml&&0!=r?(o.style.display="inline",o.style.zoom="1",o.appendChild(i),8==document.documentMode&&"DIV"!=this.root.nodeName?(p.appendChild(o),l.appendChild(p)):l.appendChild(o)):8==document.documentMode?(p.appendChild(i),l.appendChild(p)):(i.style.display="inline",l.appendChild(i)),"DIV"!=this.root.nodeName?((m=document.createElement(mxClient.VML_PREFIX+":rect")).stroked="false",m.filled="false",m.appendChild(l),this.root.appendChild(m)):this.root.appendChild(l),c?(i.style.overflow="hidden",0<n&&(i.style.width=Math.round(n)+"px"),0<a&&8==document.documentMode&&(i.style.maxHeight=Math.round(a)+"px")):d&&(i.style.width=n+"px",0<a&&(i.style.maxHeight=Math.round(a)+"px")),this.rotateHtml&&0!=r){n=r*(Math.PI/180),r=parseFloat(parseFloat(Math.cos(n)).toFixed(8)),m=parseFloat(parseFloat(Math.sin(-n)).toFixed(8)),(n%=2*Math.PI)<0&&(n+=2*Math.PI),(n%=Math.PI)>Math.PI/2&&(n=Math.PI-n),s=Math.cos(n);var h=Math.sin(n);8==document.documentMode&&(i.style.display="inline-block",o.style.display="inline-block",p.style.display="inline-block"),i.style.visibility="hidden",document.body.appendChild(i),n=i.offsetWidth,p=i.offsetHeight,mxClient.IS_QUIRKS&&(c||d)&&a<p&&(p=a,i.style.height=p+"px"),c=((a=p)-a*s+n*-h)/2-m*n*(g+.5)+r*a*(v+.5),d=(n-n*s+a*-h)/2+r*n*(g+.5)+m*a*(v+.5),"group"==l.nodeName&&"DIV"==this.root.nodeName?((g=document.createElement("div")).style.display="inline-block",g.style.position="absolute",g.style.left=this.format(e+(d-n/2)*u.scale)+"px",g.style.top=this.format(t+(c-a/2)*u.scale)+"px",l.parentNode.appendChild(g),g.appendChild(l)):(u=8==document.documentMode?1:u.scale,l.style.left=this.format(e+(d-n/2)*u)+"px",l.style.top=this.format(t+(c-a/2)*u)+"px"),o.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+r+", M12="+m+", M21="+-m+", M22="+r+", sizingMethod='auto expand')",o.style.backgroundColor=this.rotatedHtmlBackground,this.state.alpha<1&&(o.style.filter+="alpha(opacity="+100*this.state.alpha+")"),i.style.visibility="",o.appendChild(i)}else 8!=document.documentMode?(i.style.verticalAlign="top",this.state.alpha<1&&(l.style.filter="alpha(opacity="+100*this.state.alpha+")"),u=i.parentNode,i.style.visibility="hidden",document.body.appendChild(i),n=i.offsetWidth,p=i.offsetHeight,mxClient.IS_QUIRKS&&c&&a<p&&(p=a,i.style.height=p+"px"),a=p,i.style.visibility="",u.appendChild(i),l.style.left=this.format(e+n*g*this.state.scale)+"px",l.style.top=this.format(t+a*v*this.state.scale)+"px"):(this.state.alpha<1&&(i.style.filter="alpha(opacity="+100*this.state.alpha+")"),p.style.left=100*g+"%",p.style.top=100*v+"%")}else this.plainText(e,t,n,a,mxUtils.htmlEntities(i,!1),o,s,r,l,d,c,m)}},mxVmlCanvas2D.prototype.plainText=function(e,t,n,a,i,o,s,r,l,d,c,m){e=(e+(a=this.state).dx)*a.scale,t=(t+a.dy)*a.scale,(n=document.createElement(mxClient.VML_PREFIX+":shape")).style.width="1px",n.style.height="1px",n.stroked="false",(d=document.createElement(mxClient.VML_PREFIX+":fill")).color=a.fontColor,d.opacity=100*a.alpha+"%",n.appendChild(d),(d=document.createElement(mxClient.VML_PREFIX+":path")).textpathok="true",d.v="m "+this.format(0)+" "+this.format(0)+" l "+this.format(1)+" "+this.format(0),n.appendChild(d),(d=document.createElement(mxClient.VML_PREFIX+":textpath")).style.cssText="v-text-align:"+o,d.style.align=o,d.style.fontFamily=a.fontFamily,d.string=i,d.on="true",o=Math.round(a.fontSize*a.scale/this.vmlScale),d.style.fontSize=o+"px",(a.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d.style.fontWeight="bold"),(a.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d.style.fontStyle="italic"),(a.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d.style.textDecoration="underline"),a=o+((i=i.split("\n")).length-1)*o*mxConstants.LINE_HEIGHT,o=i=0,s==mxConstants.ALIGN_BOTTOM?o=-a/2:s!=mxConstants.ALIGN_MIDDLE&&(o=a/2),null!=m&&(s=(n.style.rotation=m)*(Math.PI/180),i=Math.sin(s)*o,o*=Math.cos(s)),n.appendChild(d),n.style.left=this.format(e-i)+"px",n.style.top=this.format(t+o)+"px",this.root.appendChild(n)},mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)},mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)},mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)},mxGuide.prototype.graph=null,mxGuide.prototype.states=null,mxGuide.prototype.horizontal=!0,mxGuide.prototype.vertical=!0,mxGuide.prototype.guideX=null,mxGuide.prototype.guideY=null,mxGuide.prototype.setStates=function(e){this.states=e},mxGuide.prototype.isEnabledForEvent=function(e){return!0},mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize*this.graph.view.scale/2},mxGuide.prototype.createGuideShape=function(e){return(e=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)).isDashed=!0,e},mxGuide.prototype.move=function(a,e,t){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=e){var n=this.graph.getView().translate,i=this.graph.getView().scale,o=e.x,s=e.y,r=!1,l=!1,d=b=this.getGuideTolerance(),c=b;(b=a.clone()).x+=e.x,b.y+=e.y;var m=b.x,u=b.x+b.width,p=b.getCenterX(),g=b.y,v=b.y+b.height,h=b.getCenterY();e=function(e){e+=this.graph.panDx;var t=!1;if(Math.abs(e-p)<d?(o=e-a.getCenterX(),d=Math.abs(e-p),t=!0):Math.abs(e-m)<d?(o=e-a.x,d=Math.abs(e-m),t=!0):Math.abs(e-u)<d&&(o=e-a.x-a.width,d=Math.abs(e-u),t=!0),t){null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane()));var n=this.graph.container;e-=this.graph.panDx,this.guideX.points=[new mxPoint(e,-this.graph.panDy),new mxPoint(e,n.scrollHeight-3-this.graph.panDy)]}r=r||t};for(var b=function(e){e+=this.graph.panDy;var t=!1;if(Math.abs(e-h)<c?(s=e-a.getCenterY(),c=Math.abs(e-h),t=!0):Math.abs(e-g)<c?(s=e-a.y,c=Math.abs(e-g),t=!0):Math.abs(e-v)<c&&(s=e-a.y-a.height,c=Math.abs(e-v),t=!0),t){null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane()));var n=this.graph.container;e-=this.graph.panDy,this.guideY.points=[new mxPoint(-this.graph.panDx,e),new mxPoint(n.scrollWidth-3-this.graph.panDx,e)]}l=l||t},f=0;f<this.states.length;f++){var A=this.states[f];null!=A&&(this.horizontal&&(e.call(this,A.getCenterX()),e.call(this,A.x),e.call(this,A.x+A.width)),this.vertical&&(b.call(this,A.getCenterY()),b.call(this,A.y),b.call(this,A.y+A.height)))}r||null==this.guideX?null!=this.guideX&&(this.guideX.node.style.visibility="visible",this.guideX.redraw()):this.guideX.node.style.visibility="hidden",l||null==this.guideY?null!=this.guideY&&(this.guideY.node.style.visibility="visible",this.guideY.redraw()):this.guideY.node.style.visibility="hidden",t&&(r||(t=a.x-(this.graph.snap(a.x/i-n.x)+n.x)*i,o=this.graph.snap(o/i)*i-t),l||(n=a.y-(this.graph.snap(a.y/i-n.y)+n.y)*i,s=this.graph.snap(s/i)*i-n)),e=new mxPoint(o,s)}return e},mxGuide.prototype.hide=function(){null!=this.guideX&&(this.guideX.node.style.visibility="hidden"),null!=this.guideY&&(this.guideY.node.style.visibility="hidden")},mxGuide.prototype.destroy=function(){null!=this.guideX&&(this.guideX.destroy(),this.guideX=null),null!=this.guideY&&(this.guideY.destroy(),this.guideY=null)},mxStencil.defaultLocalized=!1,mxStencil.prototype.desc=null,mxStencil.prototype.constraints=null,mxStencil.prototype.aspect=null,mxStencil.prototype.w0=null,mxStencil.prototype.h0=null,mxStencil.prototype.bgNode=null,mxStencil.prototype.fgNode=null,mxStencil.prototype.strokewidth=null,mxStencil.prototype.parseDescription=function(){this.fgNode=this.desc.getElementsByTagName("foreground")[0],this.bgNode=this.desc.getElementsByTagName("background")[0],this.w0=Number(this.desc.getAttribute("w")||100),this.h0=Number(this.desc.getAttribute("h")||100);var e=this.desc.getAttribute("aspect");this.aspect=null!=e?e:"variable",e=this.desc.getAttribute("strokewidth"),this.strokewidth=null!=e?e:"1"},mxStencil.prototype.parseConstraints=function(){var e=this.desc.getElementsByTagName("connections")[0];if(null!=e&&(null!=(e=mxUtils.getChildNodes(e))&&0<e.length)){this.constraints=[];for(var t=0;t<e.length;t++)this.constraints.push(this.parseConstraint(e[t]))}},mxStencil.prototype.parseConstraint=function(e){var t=Number(e.getAttribute("x")),n=Number(e.getAttribute("y"));return e="1"==e.getAttribute("perimeter"),new mxConnectionConstraint(new mxPoint(t,n),e)},mxStencil.prototype.evaluateTextAttribute=function(e,t,n){return t=this.evaluateAttribute(e,t,n),e=e.getAttribute("localized"),(mxStencil.defaultLocalized&&null==e||"1"==e)&&(t=mxResources.get(t)),t},mxStencil.prototype.evaluateAttribute=function(e,t,n){return null==(t=e.getAttribute(t))&&(null!=(e=mxUtils.getTextContent(e))&&("function"==typeof(e=mxUtils.eval(e))&&(t=e(n)))),t},mxStencil.prototype.drawShape=function(e,t,n,a,i,o){this.drawChildren(e,t,n,a,i,o,this.bgNode,!1),this.drawChildren(e,t,n,a,i,o,this.fgNode,!0)},mxStencil.prototype.drawChildren=function(e,t,n,a,i,o,s,r){if(null!=s){var l=mxUtils.getValue(t.style,mxConstants.STYLE_DIRECTION,null);for(n=this.computeAspect(t.style,n,a,i,o,l),a=Math.min(n.width,n.height),a="inherit"==this.strokewidth?Number(mxUtils.getNumber(t.style,mxConstants.STYLE_STROKEWIDTH,1)):Number(this.strokewidth)*a,e.setStrokeWidth(a),s=s.firstChild;null!=s;)s.nodeType==mxConstants.NODETYPE_ELEMENT&&this.drawNode(e,t,s,n,r),s=s.nextSibling}},mxStencil.prototype.computeAspect=function(e,t,n,a,i,o){e=t,t=a/this.w0;var s=i/this.h0;if(o="north"==o||"south"==o){s=a/this.h0,t=i/this.w0;var r=(a-i)/2;e+=r,n-=r}return"fixed"==this.aspect&&(t=s=Math.min(t,s),o?(e+=(i-this.w0*t)/2,n+=(a-this.h0*s)/2):(e+=(a-this.w0*t)/2,n+=(i-this.h0*s)/2)),new mxRectangle(e,n,t,s)},mxStencil.prototype.drawNode=function(e,t,n,a,i){var o=n.nodeName,s=a.x,r=a.y,l=a.width,d=a.height,c=Math.min(l,d);if("save"==o)e.save();else if("restore"==o)e.restore();else if("path"==o)for(e.begin(),n=n.firstChild;null!=n;)n.nodeType==mxConstants.NODETYPE_ELEMENT&&this.drawNode(e,t,n,a,i),n=n.nextSibling;else if("close"==o)e.close();else if("move"==o)e.moveTo(s+Number(n.getAttribute("x"))*l,r+Number(n.getAttribute("y"))*d);else if("line"==o)e.lineTo(s+Number(n.getAttribute("x"))*l,r+Number(n.getAttribute("y"))*d);else if("quad"==o)e.quadTo(s+Number(n.getAttribute("x1"))*l,r+Number(n.getAttribute("y1"))*d,s+Number(n.getAttribute("x2"))*l,r+Number(n.getAttribute("y2"))*d);else if("curve"==o)e.curveTo(s+Number(n.getAttribute("x1"))*l,r+Number(n.getAttribute("y1"))*d,s+Number(n.getAttribute("x2"))*l,r+Number(n.getAttribute("y2"))*d,s+Number(n.getAttribute("x3"))*l,r+Number(n.getAttribute("y3"))*d);else if("arc"==o)e.arcTo(Number(n.getAttribute("rx"))*l,Number(n.getAttribute("ry"))*d,Number(n.getAttribute("x-axis-rotation")),Number(n.getAttribute("large-arc-flag")),Number(n.getAttribute("sweep-flag")),s+Number(n.getAttribute("x"))*l,r+Number(n.getAttribute("y"))*d);else if("rect"==o)e.rect(s+Number(n.getAttribute("x"))*l,r+Number(n.getAttribute("y"))*d,Number(n.getAttribute("w"))*l,Number(n.getAttribute("h"))*d);else if("roundrect"==o)0==(t=n.getAttribute("arcsize"))&&(t=100*mxConstants.RECTANGLE_ROUNDING_FACTOR),c=Number(n.getAttribute("w"))*l,a=Number(n.getAttribute("h"))*d,t=Number(t)/100,t=Math.min(c*t,a*t),e.roundrect(s+Number(n.getAttribute("x"))*l,r+Number(n.getAttribute("y"))*d,c,a,t,t);else if("ellipse"==o)e.ellipse(s+Number(n.getAttribute("x"))*l,r+Number(n.getAttribute("y"))*d,Number(n.getAttribute("w"))*l,Number(n.getAttribute("h"))*d);else if("image"==o)t=this.evaluateAttribute(n,"src",t),e.image(s+Number(n.getAttribute("x"))*l,r+Number(n.getAttribute("y"))*d,Number(n.getAttribute("w"))*l,Number(n.getAttribute("h"))*d,t,!1,"1"==n.getAttribute("flipH"),"1"==n.getAttribute("flipV"));else if("text"==o){if(c=this.evaluateTextAttribute(n,"str",t),a="1"==n.getAttribute("vertical")?-90:0,"0"==n.getAttribute("align-shape")){var m=t.rotation,u=1==mxUtils.getValue(t.style,mxConstants.STYLE_FLIPH,0);t=1==mxUtils.getValue(t.style,mxConstants.STYLE_FLIPV,0),a=u&&t?a-m:u||t?a+m:a-m}a-=n.getAttribute("rotation"),e.text(s+Number(n.getAttribute("x"))*l,r+Number(n.getAttribute("y"))*d,0,0,c,n.getAttribute("align")||"left",n.getAttribute("valign")||"top",!1,"",!1,!1,a)}else if("include-shape"==o)null!=(m=mxStencilRegistry.getStencil(n.getAttribute("name")))&&(s+=Number(n.getAttribute("x"))*l,r+=Number(n.getAttribute("y"))*d,c=Number(n.getAttribute("w"))*l,a=Number(n.getAttribute("h"))*d,m.drawShape(e,t,s,r,c,a));else if("fillstroke"==o)e.fillAndStroke();else if("fill"==o)e.fill();else if("stroke"==o)e.stroke();else if("strokewidth"==o)e.setStrokeWidth(Number(n.getAttribute("width"))*c);else if("dashed"==o)e.setDashed("1"==n.getAttribute("dashed"));else if("dashpattern"==o){if(null!=(n=n.getAttribute("pattern"))){for(n=n.split(" "),l=[],d=0;d<n.length;d++)0<n[d].length&&l.push(Number(n[d])*c);n=l.join(" "),e.setDashPattern(n)}}else"strokecolor"==o?e.setStrokeColor(n.getAttribute("color")):"linecap"==o?e.setLineCap(n.getAttribute("cap")):"linejoin"==o?e.setLineJoin(n.getAttribute("join")):"miterlimit"==o?e.setMiterLimit(Number(n.getAttribute("limit"))):"fillcolor"==o?e.setFillColor(n.getAttribute("color")):"alpha"==o?e.setAlpha(n.getAttribute("alpha")):"fontcolor"==o?e.setFontColor(n.getAttribute("color")):"fontstyle"==o?e.setFontStyle(n.getAttribute("style")):"fontfamily"==o?e.setFontFamily(n.getAttribute("family")):"fontsize"==o&&e.setFontSize(Number(n.getAttribute("size"))*c);i&&("fillstroke"==o||"fill"==o||"stroke"==o)&&e.setShadow(!1)},mxShape.prototype.dialect=null,mxShape.prototype.scale=1,mxShape.prototype.bounds=null,mxShape.prototype.points=null,mxShape.prototype.node=null,mxShape.prototype.style=null,mxShape.prototype.style=null,mxShape.prototype.boundingBox=null,mxShape.prototype.stencil=null,mxShape.prototype.svgStrokeTolerance=6,mxShape.prototype.pointerEvents=!0,mxShape.prototype.stencilPointerEvents=!1,mxShape.prototype.vmlScale=1,mxShape.prototype.init=function(e){null==this.node&&(this.node=this.create(e),null!=e&&e.appendChild(this.node))},mxShape.prototype.isParseVml=function(){return!0},mxShape.prototype.isHtmlAllowed=function(){return!1},mxShape.prototype.getSvgScreenOffset=function(){return 1==mxUtils.mod(Math.max(1,Math.round(this.strokewidth*this.scale)),2)?.5:0},mxShape.prototype.create=function(e){return null!=e.ownerSVGElement?this.createSvg(e):8==document.documentMode||this.dialect==mxConstants.DIALECT_SVG||this.dialect!=mxConstants.DIALECT_VML&&this.isHtmlAllowed()?this.createHtml(e):this.createVml(e)},mxShape.prototype.createSvg=function(){return document.createElementNS(mxConstants.NS_SVG,"g")},mxShape.prototype.createVml=function(){var e=document.createElement(mxClient.VML_PREFIX+":group");return e.style.position="absolute",e},mxShape.prototype.createHtml=function(){var e=document.createElement("div");return e.style.position="absolute",e},mxShape.prototype.reconfigure=function(){this.redraw()},mxShape.prototype.redraw=function(){this.updateBoundsFromPoints(),this.checkBounds()?(this.node.style.visibility="","DIV"==this.node.nodeName&&this.isHtmlAllowed()?this.redrawHtmlShape():this.redrawShape(),this.updateBoundingBox()):(this.node.style.visibility="hidden",this.boundingBox=null)},mxShape.prototype.updateBoundsFromPoints=function(){var e=this.points;if(null!=e&&0<e.length&&null!=e[0]){this.bounds=new mxRectangle(Number(e[0].x),Number(e[0].y),1,1);for(var t=1;t<this.points.length;t++)null!=e[t]&&this.bounds.add(new mxRectangle(Number(e[t].x),Number(e[t].y),1,1))}},mxShape.prototype.checkBounds=function(){return null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)&&0<this.bounds.width&&0<this.bounds.height},mxShape.prototype.createVmlGroup=function(){var e=document.createElement(mxClient.VML_PREFIX+":group");return e.style.position="absolute",e.style.width=this.node.style.width,e.style.height=this.node.style.height,e},mxShape.prototype.redrawShape=function(){var e=this.createCanvas();for(e.pointerEvents=this.pointerEvents;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);this.paint(e),this.node!=e.root&&this.node.insertAdjacentHTML("beforeend",e.root.outerHTML),"DIV"==this.node.nodeName&&8==document.documentMode&&(this.node.style.filter="",(null==this.stencil||!this.stencilPointerEvents)&&mxUtils.addTransparentBackgroundFilter(this.node)),this.destroyCanvas(e)},mxShape.prototype.createCanvas=function(){var e=null,t=null;if(null!=this.node.ownerSVGElement)(e=new mxSvgCanvas2D(this.node,!1)).strokeTolerance=this.svgStrokeTolerance,e.blockImagePointerEvents=mxClient.IS_NS&&!mxClient.IS_SF&&!mxClient.IS_GC,0!=(t=this.getSvgScreenOffset())?this.node.setAttribute("transform","translate("+t+","+t+")"):this.node.removeAttribute("transform");else{this.updateVmlContainer();var n=Math.max(1,Math.round(this.bounds.width)),a=Math.max(1,Math.round(this.bounds.height));t=8==document.documentMode&&this.isParseVml()?this.createVmlGroup():this.node,e=new mxVmlCanvas2D(t,!1);""!=t.tagUrn&&(t.coordsize=n*this.vmlScale+","+a*this.vmlScale,e.scale(this.vmlScale),e.vmlScale=this.vmlScale),t=this.scale,e.translate(-Math.round(this.bounds.x/t),-Math.round(this.bounds.y/t))}return e},mxShape.prototype.updateVmlContainer=function(){this.node.style.left=Math.round(this.bounds.x)+"px",this.node.style.top=Math.round(this.bounds.y)+"px";var e=Math.max(1,Math.round(this.bounds.width)),t=Math.max(1,Math.round(this.bounds.height));this.node.style.width=e+"px",this.node.style.height=t+"px",this.node.style.overflow="visible"},mxShape.prototype.destroyCanvas=function(e){if(e instanceof mxSvgCanvas2D){for(var t in e.gradients){var n=e.gradients[t];n.mxRefCount=(n.mxRefCount||0)+1}this.releaseSvgGradients(this.oldGradients),this.oldGradients=e.gradients}},mxShape.prototype.paint=function(e){var t=this.scale,n=this.bounds.x/t,a=this.bounds.y/t,i=this.bounds.width/t,o=this.bounds.height/t;if(this.isPaintBoundsInverted()){n=n+(s=(i-o)/2),a=a-s;var s=i;i=o,o=s}if(this.updateTransform(e,n,a,i,o),this.configureCanvas(e,n,a,i,o),null!=this.stencil)this.paintStencilShape(e,n,a,i,o);else if(e.setStrokeWidth(this.strokewidth),null!=this.points){for(n=[],a=0;a<this.points.length;a++)n.push(new mxPoint(this.points[a].x/t,this.points[a].y/t));this.paintEdgeShape(e,n)}else this.paintVertexShape(e,n,a,i,o)},mxShape.prototype.configureCanvas=function(e,t,n,a,i){var o=null;null!=this.style&&(o=this.style.dashPattern),e.setAlpha(this.opacity/100),null!=this.isShadow&&e.setShadow(this.isShadow),null!=this.isDashed&&e.setDashed(this.isDashed),null!=o&&e.setDashPattern(o),null!=this.gradient?(t=this.getGradientBounds(e,t,n,a,i),e.setGradient(this.fill,this.gradient,t.x,t.y,t.width,t.height,this.gradientDirection)):e.setFillColor(this.fill),e.setStrokeColor(this.stroke)},mxShape.prototype.getGradientBounds=function(e,t,n,a,i){return new mxRectangle(t,n,a,i)},mxShape.prototype.updateTransform=function(e,t,n,a,i){e.scale(this.scale),e.rotate(this.getShapeRotation(),this.flipH,this.flipV,t+a/2,n+i/2)},mxShape.prototype.paintStencilShape=function(e,t,n,a,i){this.stencilPointerEvents&&(this.dialect==mxConstants.DIALECT_SVG?this.addTransparentBackgroundRectangle(this.node,t,n,a,i):8!=document.documentMode&&this.setTransparentBackgroundImage(this.node)),this.stencil.drawShape(e,this,t,n,a,i)},mxShape.prototype.paintVertexShape=function(e,t,n,a,i){this.paintBackground(e,t,n,a,i),e.setShadow(!1),this.paintForeground(e,t,n,a,i)},mxShape.prototype.paintBackground=function(e,t,n,a,i){},mxShape.prototype.paintForeground=function(e,t,n,a,i){},mxShape.prototype.paintEdgeShape=function(e,t){},mxShape.prototype.getArcSize=function(e,t){var n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return Math.min(e*n,t*n)},mxShape.prototype.paintGlassEffect=function(e,t,n,a,i,o){var s=Math.ceil(this.strokewidth/2);e.setGradient("#ffffff","#ffffff",t,n,a,.6*i,"south",.9,.1),e.begin(),o+=2*s,this.isRounded?(e.moveTo(t-s+o,n-s),e.quadTo(t-s,n-s,t-s,n-s+o),e.lineTo(t-s,n+.4*i),e.quadTo(t+.5*a,n+.7*i,t+a+s,n+.4*i),e.lineTo(t+a+s,n-s+o),e.quadTo(t+a+s,n-s,t+a+s-o,n-s)):(e.moveTo(t-s,n-s),e.lineTo(t-s,n+.4*i),e.quadTo(t+.5*a,n+.7*i,t+a+s,n+.4*i),e.lineTo(t+a+s,n-s)),e.close(),e.fill()},mxShape.prototype.apply=function(e){this.state=e,this.style=e.style,null!=this.style&&(this.fill=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,this.fill),this.gradient=mxUtils.getValue(this.style,mxConstants.STYLE_GRADIENTCOLOR,this.gradient),this.gradientDirection=mxUtils.getValue(this.style,mxConstants.STYLE_GRADIENT_DIRECTION,this.gradientDirection),this.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_OPACITY,this.opacity),this.stroke=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,this.stroke),this.strokewidth=mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth),this.spacing=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing),this.startSize=mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,this.startSize),this.endSize=mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,this.endSize),this.startArrow=mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,this.startArrow),this.endArrow=mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,this.endArrow),this.rotation=mxUtils.getValue(this.style,mxConstants.STYLE_ROTATION,this.rotation),this.direction=mxUtils.getValue(this.style,mxConstants.STYLE_DIRECTION,this.direction),this.flipH=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,0),this.flipV=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0),null!=this.stencil&&(this.flipH=1==mxUtils.getValue(this.style,"stencilFlipH",0)||this.flipH,this.flipV=1==mxUtils.getValue(this.style,"stencilFlipV",0)||this.flipV),"north"!=this.direction&&"south"!=this.direction||(e=this.flipH,this.flipH=this.flipV,this.flipV=e),this.isShadow=1==mxUtils.getValue(this.style,mxConstants.STYLE_SHADOW,this.isShadow),this.isDashed=1==mxUtils.getValue(this.style,mxConstants.STYLE_DASHED,this.isDashed),this.isRounded=1==mxUtils.getValue(this.style,mxConstants.STYLE_ROUNDED,this.isRounded),this.glass=1==mxUtils.getValue(this.style,mxConstants.STYLE_GLASS,this.glass),"none"==this.fill&&(this.fill=null),"none"==this.gradient&&(this.gradient=null),"none"==this.stroke&&(this.stroke=null))},mxShape.prototype.setCursor=function(e){null==e&&(e=""),this.cursor=e,null!=this.node&&(this.node.style.cursor=e)},mxShape.prototype.getCursor=function(){return this.cursor},mxShape.prototype.updateBoundingBox=function(){if(null!=this.bounds){var e=this.createBoundingBox();if(null!=e){this.augmentBoundingBox(e);var t=this.getShapeRotation();0!=t&&(e=mxUtils.getBoundingBox(e,t)),e.x=Math.floor(e.x),e.y=Math.floor(e.y),e.width=Math.ceil(e.width),e.height=Math.ceil(e.height)}this.boundingBox=e}},mxShape.prototype.createBoundingBox=function(){var e=this.bounds.clone();if(this.isPaintBoundsInverted()){var t=(e.width-e.height)/2;e.x+=t,e.y-=t,t=e.width,e.width=e.height,e.height=t}return e},mxShape.prototype.augmentBoundingBox=function(e){this.isShadow&&(e.width+=Math.ceil(mxConstants.SHADOW_OFFSET_X*this.scale),e.height+=Math.ceil(mxConstants.SHADOW_OFFSET_Y*this.scale));var t=Math.ceil(this.strokewidth*this.scale);e.grow(Math.ceil(t/2))},mxShape.prototype.isPaintBoundsInverted=function(){return null==this.stencil&&("north"==this.direction||"south"==this.direction)},mxShape.prototype.getRotation=function(){return null!=this.rotation?this.rotation:0},mxShape.prototype.getTextRotation=function(){var e=this.getRotation();return 1!=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)&&(e+=mxText.prototype.verticalTextRotation),e},mxShape.prototype.getShapeRotation=function(){var e=this.getRotation();return null!=this.direction&&("north"==this.direction?e+=270:"west"==this.direction?e+=180:"south"==this.direction&&(e+=90)),e},mxShape.prototype.addTransparentBackgroundRectangle=function(e,t,n,a,i){(e=document.createElementNS(mxConstants.NS_SVG,"rect")).setAttribute("x",t),e.setAttribute("y",n),e.setAttribute("width",a),e.setAttribute("height",i),e.setAttribute("fill","none"),e.setAttribute("stroke","none"),e.setAttribute("pointer-events","all"),this.node.appendChild(e)},mxShape.prototype.setTransparentBackgroundImage=function(e){e.style.backgroundImage="url('"+mxClient.imageBasePath+"/transparent.gif')"},mxShape.prototype.releaseSvgGradients=function(e){if(null!=e)for(var t in e){var n=e[t];n.mxRefCount=(n.mxRefCount||0)-1,0==n.mxRefCount&&null!=n.parentNode&&n.parentNode.removeChild(n)}},mxShape.prototype.destroy=function(){null!=this.node&&(mxEvent.release(this.node),null!=this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.node=null),this.releaseSvgGradients(this.oldGradients),this.oldGradients=null};var mxStencilRegistry={stencils:[],addStencil:function(e,t){mxStencilRegistry.stencils[e]=t},getStencil:function(e){return mxStencilRegistry.stencils[e]}},mxMarker={markers:[],addMarker:function(e,t){mxMarker.markers[e]=t},createMarker:function(e,t,n,a,i,o,s,r,l,d){var c=mxMarker.markers[n];return null!=c?c(e,t,n,a,i,o,s,r,l,d):null}};function mxActor(e,t,n,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=n,this.strokewidth=null!=a?a:1}function mxCloud(e,t,n,a){mxActor.call(this),this.bounds=e,this.fill=t,this.stroke=n,this.strokewidth=null!=a?a:1}function mxRectangleShape(e,t,n,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=n,this.strokewidth=null!=a?a:1}function mxEllipse(e,t,n,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=n,this.strokewidth=null!=a?a:1}function mxDoubleEllipse(e,t,n,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=n,this.strokewidth=null!=a?a:1}function mxRhombus(e,t,n,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=n,this.strokewidth=null!=a?a:1}function mxPolyline(e,t,n){mxShape.call(this),this.points=e,this.stroke=t,this.strokewidth=null!=n?n:1}function mxArrow(e,t,n,a,i,o,s){mxShape.call(this),this.points=e,this.fill=t,this.stroke=n,this.strokewidth=null!=a?a:1,this.arrowWidth=null!=i?i:mxConstants.ARROW_WIDTH,this.spacing=null!=o?o:mxConstants.ARROW_SPACING,this.endSize=null!=s?s:mxConstants.ARROW_SIZE}function mxText(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g,v,h,b,f,A){mxShape.call(this),this.value=e,this.bounds=t,this.color=null!=i?i:"black",this.align=null!=n?n:"",this.valign=null!=a?a:"",this.family=null!=o?o:mxConstants.DEFAULT_FONTFAMILY,this.size=null!=s?s:mxConstants.DEFAULT_FONTSIZE,this.fontStyle=null!=r?r:mxConstants.DEFAULT_FONTSTYLE,this.spacing=parseInt(l||2),this.spacingTop=this.spacing+parseInt(d||0),this.spacingRight=this.spacing+parseInt(c||0),this.spacingBottom=this.spacing+parseInt(m||0),this.spacingLeft=this.spacing+parseInt(u||0),this.horizontal=null==p||p,this.background=g,this.border=v,this.wrap=null!=h&&h,this.clipped=null!=b&&b,this.overflow=null!=f?f:"visible",this.labelPadding=null!=A?A:0,this.rotation=0}function mxTriangle(){mxActor.call(this)}function mxHexagon(){mxActor.call(this)}function mxLine(e,t,n){mxShape.call(this),this.bounds=e,this.stroke=t,this.strokewidth=null!=n?n:1}function mxImageShape(e,t,n,a,i){mxShape.call(this),this.bounds=e,this.image=t,this.fill=n,this.stroke=a,this.strokewidth=null!=i?i:1,this.shadow=!1}function mxLabel(e,t,n,a){mxRectangleShape.call(this,e,t,n,a)}function mxCylinder(e,t,n,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=n,this.strokewidth=null!=a?a:1}function mxConnector(e,t,n){mxPolyline.call(this,e,t,n)}function mxSwimlane(e,t,n,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=n,this.strokewidth=null!=a?a:1}function mxGraphLayout(e){this.graph=e}function mxStackLayout(e,t,n,a,i,o){mxGraphLayout.call(this,e),this.horizontal=null==t||t,this.spacing=null!=n?n:0,this.x0=null!=a?a:0,this.y0=null!=i?i:0,this.border=null!=o?o:0}function mxPartitionLayout(e,t,n,a){mxGraphLayout.call(this,e),this.horizontal=null==t||t,this.spacing=n||0,this.border=a||0}function mxCompactTreeLayout(e,t,n){mxGraphLayout.call(this,e),this.horizontal=null==t||t,this.invert=null!=n&&n}function WeightedCellSorter(e,t){this.cell=e,this.weightedValue=t}function mxFastOrganicLayout(e){mxGraphLayout.call(this,e)}function mxCircleLayout(e,t){mxGraphLayout.call(this,e),this.radius=null!=t?t:100}function mxParallelEdgeLayout(e){mxGraphLayout.call(this,e)}function mxCompositeLayout(e,t,n){mxGraphLayout.call(this,e),this.layouts=t,this.master=n}function mxEdgeLabelLayout(e,t){mxGraphLayout.call(this,e)}function mxGraphAbstractHierarchyCell(){this.x=[],this.y=[],this.temp=[]}function mxGraphHierarchyNode(e){mxGraphAbstractHierarchyCell.apply(this,arguments),this.cell=e}function mxGraphHierarchyEdge(e){mxGraphAbstractHierarchyCell.apply(this,arguments),this.edges=e}function mxGraphHierarchyModel(e,t,n,a,i){for(e.getGraph(),this.tightenToSource=i,this.roots=n,this.parent=a,this.vertexMapper={},this.edgeMapper={},this.maxRank=0,n=[],null==t&&(t=this.graph.getChildVertices(a)),this.maxRank=this.SOURCESCANSTARTRANK,this.createInternalCells(e,t,n),a=0;a<t.length;a++){i=n[a].connectsAsSource;for(var o=0;o<i.length;o++){var s=i[o];if(null!=(r=s.edges)&&0<r.length){var r=r[0],l=e.getVisibleTerminal(r,!1);l=mxCellPath.create(l),l=this.vertexMapper[l];n[a]==l&&(l=e.getVisibleTerminal(r,!0),l=mxCellPath.create(l),l=this.vertexMapper[l]),null!=l&&n[a]!=l&&(0==(s.target=l).connectsAsTarget.length&&(l.connectsAsTarget=[]),mxUtils.indexOf(l.connectsAsTarget,s)<0&&l.connectsAsTarget.push(s))}}n[a].temp[0]=1}}function mxHierarchicalLayoutStage(){}function mxMedianHybridCrossingReduction(e){this.layout=e}function MedianCellSorter(){}function mxMinimumCycleRemover(e){this.layout=e}function mxCoordinateAssignment(e,t,n,a,i,o){this.layout=e,this.intraCellSpacing=t,this.interRankCellSpacing=n,this.orientation=a,this.initialX=i,this.parallelEdgeSpacing=o}!function(){function e(e,t,n,a,i,o,s,r,l,d){t=1.118*i*l,r=1.118*o*l,i*=s+l,o*=s+l;var c=a.clone();return c.x-=t,c.y-=r,s=n!=mxConstants.ARROW_CLASSIC?1:.75,a.x+=-i*s-t,a.y+=-o*s-r,function(){e.begin(),e.moveTo(c.x,c.y),e.lineTo(c.x-i-o/2,c.y-o+i/2),n==mxConstants.ARROW_CLASSIC&&e.lineTo(c.x-3*i/4,c.y-3*o/4),e.lineTo(c.x+o/2-i,c.y-o-i/2),e.close(),d?e.fillAndStroke():e.stroke()}}function t(e,t,n,a,i,o,s,r,l,d){r=n==mxConstants.ARROW_DIAMOND?.7071:.9862,t=i*l*r,r*=o*l,i*=s+l,o*=s+l;var c=a.clone();c.x-=t,c.y-=r,a.x+=-i-t,a.y+=-o-r;var m=n==mxConstants.ARROW_DIAMOND?2:3.4;return function(){e.begin(),e.moveTo(c.x,c.y),e.lineTo(c.x-i/2-o/m,c.y+i/m-o/2),e.lineTo(c.x-i,c.y-o),e.lineTo(c.x-i/2+o/m,c.y-o/2-i/m),e.close(),d?e.fillAndStroke():e.stroke()}}mxMarker.addMarker("classic",e),mxMarker.addMarker("block",e),mxMarker.addMarker("open",function(e,t,n,a,i,o,s,r,l,d){t=1.118*i*l,n=1.118*o*l,i*=s+l,o*=s+l;var c=a.clone();return c.x-=t,c.y-=n,a.x+=2*-t,a.y+=2*-n,function(){e.begin(),e.moveTo(c.x-i-o/2,c.y-o+i/2),e.lineTo(c.x,c.y),e.lineTo(c.x+o/2-i,c.y-o-i/2),e.stroke()}}),mxMarker.addMarker("oval",function(e,t,n,a,i,o,s,r,l,d){var c=s/2,m=a.clone();return a.x-=i*c,a.y-=o*c,function(){e.ellipse(m.x-c,m.y-c,s,s),d?e.fillAndStroke():e.stroke()}}),mxMarker.addMarker("diamond",t),mxMarker.addMarker("diamondThin",t)}(),mxUtils.extend(mxActor,mxShape),mxActor.prototype.paintVertexShape=function(e,t,n,a,i){e.translate(t,n),e.begin(),this.redrawPath(e,t,n,a,i),e.fillAndStroke()},mxActor.prototype.redrawPath=function(e,t,n,a,i){t=a/3,e.moveTo(0,i),e.curveTo(0,3*i/5,0,2*i/5,a/2,2*i/5),e.curveTo(a/2-t,2*i/5,a/2-t,0,a/2,0),e.curveTo(a/2+t,0,a/2+t,2*i/5,a/2,2*i/5),e.curveTo(a,2*i/5,a,3*i/5,a,i),e.close()},mxUtils.extend(mxCloud,mxActor),mxCloud.prototype.redrawPath=function(e,t,n,a,i){e.moveTo(.25*a,.25*i),e.curveTo(.05*a,.25*i,0,.5*i,.16*a,.55*i),e.curveTo(0,.66*i,.18*a,.9*i,.31*a,.8*i),e.curveTo(.4*a,i,.7*a,i,.8*a,.8*i),e.curveTo(a,.8*i,a,.6*i,.875*a,.5*i),e.curveTo(a,.3*i,.8*a,.1*i,.625*a,.2*i),e.curveTo(.5*a,.05*i,.3*a,.05*i,.25*a,.25*i),e.close()},mxUtils.extend(mxRectangleShape,mxShape),mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.isRounded&&!this.glass&&0==this.rotation},mxRectangleShape.prototype.paintBackground=function(e,t,n,a,i){if(this.isRounded){var o=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;o=Math.min(a*o,i*o);e.roundrect(t,n,a,i,o,o)}else e.rect(t,n,a,i);e.fillAndStroke()},mxRectangleShape.prototype.paintForeground=function(e,t,n,a,i){this.glass&&this.paintGlassEffect(e,t,n,a,i,this.getArcSize(a+this.strokewidth,i+this.strokewidth))},mxRectangleShape.prototype.redrawHtmlShape=function(){this.updateHtmlBounds(this.node),this.updateHtmlFilters(this.node),this.updateHtmlColors(this.node)},mxRectangleShape.prototype.updateHtmlBounds=function(e){var t=9<=document.documentMode?0:Math.ceil(this.strokewidth*this.scale);e.style.borderWidth=Math.max(1,t)+"px",e.style.overflow="hidden",e.style.left=Math.round(this.bounds.x-t/2)+"px",e.style.top=Math.round(this.bounds.y-t/2)+"px","CSS1Compat"==document.compatMode&&(t=-t),e.style.width=Math.round(Math.max(0,this.bounds.width+t))+"px",e.style.height=Math.round(Math.max(0,this.bounds.height+t))+"px"},mxRectangleShape.prototype.updateHtmlColors=function(e){var t=this.stroke;null!=t&&t!=mxConstants.NONE?(e.style.borderColor=t,this.isDashed?e.style.borderStyle="dashed":0<this.strokewidth&&(e.style.borderStyle="solid"),e.style.borderWidth=Math.max(1,Math.ceil(this.strokewidth*this.scale))+"px"):e.style.borderWidth="0px",null!=(t=this.fill)&&t!=mxConstants.NONE?(e.style.backgroundColor=t,e.style.backgroundImage="none"):this.pointerEvents?e.style.backgroundColor="transparent":8==document.documentMode?mxUtils.addTransparentBackgroundFilter(e):this.setTransparentBackgroundImage(e)},mxRectangleShape.prototype.updateHtmlFilters=function(e){var t="";if(this.opacity<100&&(t+="alpha(opacity="+this.opacity+")"),this.isShadow&&(t+="progid:DXImageTransform.Microsoft.dropShadow (OffX='"+Math.round(mxConstants.SHADOW_OFFSET_X*this.scale)+"', OffY='"+Math.round(mxConstants.SHADOW_OFFSET_Y*this.scale)+"', Color='"+mxConstants.SHADOWCOLOR+"')"),this.gradient){var n=this.fill,a=this.gradient,i="0",o={east:0,south:1,west:2,north:3},s=null!=this.direction?o[this.direction]:0;null!=this.gradientDirection&&(s=mxUtils.mod(s+o[this.gradientDirection]-1,4)),1==s?(i="1",o=n,n=a,a=o):2==s?(o=n,n=a,a=o):3==s&&(i="1"),t+="progid:DXImageTransform.Microsoft.gradient(startColorStr='"+n+"', endColorStr='"+a+"', gradientType='"+i+"')"}e.style.filter=t},mxUtils.extend(mxEllipse,mxShape),mxEllipse.prototype.paintVertexShape=function(e,t,n,a,i){e.ellipse(t,n,a,i),e.fillAndStroke()},mxUtils.extend(mxDoubleEllipse,mxShape),mxDoubleEllipse.prototype.vmlScale=10,mxDoubleEllipse.prototype.paintBackground=function(e,t,n,a,i){e.ellipse(t,n,a,i),e.fillAndStroke()},mxDoubleEllipse.prototype.paintForeground=function(e,t,n,a,i){var o=Math.min(4,Math.min(a/5,i/5));i-=2*o,0<(a-=2*o)&&0<i&&e.ellipse(t+o,n+o,a,i),e.stroke()},mxUtils.extend(mxRhombus,mxShape),mxRhombus.prototype.paintVertexShape=function(e,t,n,a,i){var o=a/2,s=i/2;e.begin(),e.moveTo(t+o,n),e.lineTo(t+a,n+s),e.lineTo(t+o,n+i),e.lineTo(t,n+s),e.close(),e.fillAndStroke()},mxUtils.extend(mxPolyline,mxShape),mxPolyline.prototype.getRotation=function(){return 0},mxPolyline.prototype.paintEdgeShape=function(e,t){this.paintLine(e,t,this.isRounded)},mxPolyline.prototype.paintLine=function(e,t,n){var a=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,i=t[0],o=t[t.length-1];e.begin(),e.moveTo(i.x,i.y);for(var s=1;s<t.length-1;s++){var r=t[s],l=i.x-r.x;i=i.y-r.y;if(n&&s<t.length-1&&(0!=l||0!=i)){var d=Math.sqrt(l*l+i*i);l=l*Math.min(a,d/2)/d,i=i*Math.min(a,d/2)/d;e.lineTo(r.x+l,r.y+i),l=(i=t[s+1]).x-r.x,i=i.y-r.y,d=Math.max(1,Math.sqrt(l*l+i*i)),l=l*Math.min(a,d/2)/d,i=i*Math.min(a,d/2)/d,l=r.x+l,i=r.y+i,e.quadTo(r.x,r.y,l,i),r=new mxPoint(l,i)}else e.lineTo(r.x,r.y);i=r}e.lineTo(o.x,o.y),e.stroke()},mxUtils.extend(mxArrow,mxShape),mxArrow.prototype.paintEdgeShape=function(e,t){var n=mxConstants.ARROW_SPACING,a=mxConstants.ARROW_WIDTH,i=mxConstants.ARROW_SIZE,o=t[0],s=t[t.length-1],r=s.x-o.x,l=s.y-o.y,d=(c=Math.sqrt(r*r+l*l))-2*n-i,c=(r=r/c,a*(l=l/c)/3),m=(a=-a*r/3,(i=o.x-c/2+n*r)+c),u=(o=o.y-a/2+n*l)+a,p=m+d*r,g=p+c,v=(d=u+d*l)+a,h=g-3*c,b=v-3*a;e.begin(),e.moveTo(i,o),e.lineTo(m,u),e.lineTo(p,d),e.lineTo(g,v),e.lineTo(s.x-n*r,s.y-n*l),e.lineTo(h,b),e.lineTo(h+c,b+a),e.close(),e.fillAndStroke()},mxUtils.extend(mxText,mxShape),mxText.prototype.baseSpacingTop=0,mxText.prototype.baseSpacingBottom=0,mxText.prototype.baseSpacingLeft=0,mxText.prototype.baseSpacingRight=0,mxText.prototype.replaceLinefeeds=!0,mxText.prototype.verticalTextRotation=-90,mxText.prototype.ignoreClippedStringSize=!0,mxText.prototype.ignoreStringSize=!1,mxText.prototype.isParseVml=function(){return!1},mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode},mxText.prototype.getSvgScreenOffset=function(){return 0},mxText.prototype.checkBounds=function(){return!(null==this.bounds||isNaN(this.bounds.x)||isNaN(this.bounds.y)||isNaN(this.bounds.width)||isNaN(this.bounds.height))},mxText.prototype.updateBoundingBox=function(){var e=this.node;8==document.documentMode&&null!=e.firstChild&&(null!=(e=e.firstChild).firstChild&&(e=e.firstChild)),this.boundingBox=this.bounds.clone();var t=this.getTextRotation();if(this.ignoreStringSize||null==e||"fill"==this.overflow||this.clipped&&this.ignoreClippedStringSize)this.boundingBox.x+=this.margin.x*this.boundingBox.width,this.boundingBox.y+=this.margin.y*this.boundingBox.height;else{var n=null,a=null;if(null!=e.ownerSVGElement)if(null!=e.firstChild&&null!=e.firstChild.firstChild&&"foreignObject"==e.firstChild.firstChild.nodeName)e=e.firstChild.firstChild,n=this.wrap?this.bounds.width:parseInt(e.getAttribute("width"))*this.scale,a=parseInt(e.getAttribute("height"))*this.scale;else{if(0==(t=e.getBBox()).width&&0==t.height)return;this.boundingBox=new mxRectangle(t.x,t.y,t.width,t.height),t=0}else a=this.state.view.textDiv,null!=this.offsetWidth&&null!=this.offsetHeight?(n=this.wrap?this.bounds.width:this.offsetWidth*this.scale,a=this.offsetHeight*this.scale):null!=a?(this.updateFont(a),this.updateSize(a),mxUtils.isNode(this.value)?a.innerHTML=this.value.outerHTML:(n=this.replaceLinefeeds?this.value.replace(/\n/g,"<br/>"):this.value,a.innerHTML=n),n=this.wrap?this.bounds.width:a.offsetWidth*this.scale,a=a.offsetHeight*this.scale):(n=this.wrap?this.bounds.width:e.offsetWidth*this.scale,a=e.offsetHeight*this.scale);null!=n&&null!=a&&(this.boundingBox=new mxRectangle(this.bounds.x+this.margin.x*n,this.bounds.y+this.margin.y*a,n,a))}null!=this.boundingBox&&(0!=t&&(t=mxUtils.getBoundingBox(this.boundingBox,t),this.boundingBox.x=t.x,this.boundingBox.y=t.y,mxClient.IS_QUIRKS||(this.boundingBox.width=t.width,this.boundingBox.height=t.height)),this.boundingBox.x=Math.floor(this.boundingBox.x),this.boundingBox.y=Math.floor(this.boundingBox.y),this.boundingBox.width=Math.ceil(this.boundingBox.width),this.boundingBox.height=Math.ceil(this.boundingBox.height))},mxText.prototype.getShapeRotation=function(){return 0},mxText.prototype.getTextRotation=function(){return null!=this.state&&null!=this.state.shape?this.state.shape.getTextRotation():0},mxText.prototype.isPaintBoundsInverted=function(){return!this.horizontal&&null!=this.state&&this.state.view.graph.model.isVertex(this.state.cell)},mxText.prototype.configureCanvas=function(e,t,n,a,i){mxShape.prototype.configureCanvas.apply(this,arguments),e.setFontColor(this.color),e.setFontBackgroundColor(this.background),e.setFontBorderColor(this.border),e.setFontFamily(this.family),e.setFontSize(this.size),e.setFontStyle(this.fontStyle)},mxText.prototype.updateVmlContainer=function(){this.node.style.left=Math.round(this.bounds.x)+"px",this.node.style.top=Math.round(this.bounds.y)+"px",this.node.style.width="1px",this.node.style.height="1px",this.node.style.overflow="visible"},mxText.prototype.paint=function(e){var t=this.scale,n=this.bounds.x/t,a=this.bounds.y/t,i=this.bounds.width/t;t=this.bounds.height/t;this.updateTransform(e,n,a,i,t),this.configureCanvas(e,n,a,i,t);var o=mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML,s=o||e instanceof mxVmlCanvas2D?"html":"",r=this.value;!o&&"html"==s&&(r=mxUtils.htmlEntities(r,!1)),r=!mxUtils.isNode(this.value)&&this.replaceLinefeeds&&"html"==s?r.replace(/\n/g,"<br/>"):r,e.text(n,a,i,t,r,this.align,this.valign,this.wrap,s,"fill"==this.overflow,this.clipped,this.getTextRotation())},mxText.prototype.redrawHtmlShape=function(){var e=this.node.style;e.opacity=this.opacity<1?this.opacity:"",e.overflow="",e.width="",e.height="",this.updateFont(this.node),this.updateSize(this.node),this.updateValue(),this.offsetHeight=this.offsetWidth=null,null!=mxClient.CSS_PREFIX?this.updateHtmlTransform():this.updateHtmlFilter()},mxText.prototype.updateHtmlTransform=function(){var e=this.getTextRotation(),t=this.node.style,n=this.margin.x,a=this.margin.y;0!=e?(t[mxClient.CSS_PREFIX+"TransformOrigin"]=100*-n+"% "+100*-a+"%",t[mxClient.CSS_PREFIX+"Transform"]="translate("+100*n+"%,"+100*a+"%)scale("+this.scale+") rotate("+e+"deg)"):(t[mxClient.CSS_PREFIX+"TransformOrigin"]="0% 0%",t[mxClient.CSS_PREFIX+"Transform"]="scale("+this.scale+")translate("+100*n+"%,"+100*a+"%)"),t.left=Math.round(this.bounds.x)+"px",t.top=Math.round(this.bounds.y)+"px"},mxText.prototype.updateHtmlFilter=function(){var e=this.node.style,t=this.margin.x,n=this.margin.y,a=this.scale;e.filter="";var i=0,o=0;if(null!=(r=null!=this.state?this.state.view.textDiv:null)){if(r.style.overflow="",r.style.height="",r.style.width="",this.updateFont(r),this.updateSize(r),mxUtils.isNode(this.value))r.innerHTML=this.value.outerHTML;else{var s=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(s=mxUtils.htmlEntities(s,!1)),s=this.replaceLinefeeds?s.replace(/\n/g,"<br/>"):s,r.innerHTML=s}i=r.offsetWidth+2,o=r.offsetHeight+2}else i=this.node.offsetWidth,o=this.node.offsetHeight+1;this.offsetWidth=i,this.offsetHeight=o,r=this.bounds.width/a,s=this.bounds.height/a,mxClient.IS_QUIRKS&&(this.clipped||"fill"==this.overflow)&&0<s?(s=Math.min(s,o),e.height=Math.round(s+1)+"px"):s=o,"fill"!=this.overflow&&(mxClient.IS_QUIRKS&&(this.clipped||this.wrap)&&0<r?(r=Math.min(r,i),e.width=Math.round(r)+"px"):r=i);s*=a;var r=r*a,l=(i=this.getTextRotation()*(Math.PI/180),o=parseFloat(parseFloat(Math.cos(i)).toFixed(8)),parseFloat(parseFloat(Math.sin(-i)).toFixed(8)));(i=i%(2*Math.PI))<0&&(i+=2*Math.PI),(i%=Math.PI)>Math.PI/2&&(i=Math.PI-i);var d=Math.cos(i),c=Math.sin(-i),m=(s-s*d+r*c)/2+l*(t=r*-(t+.5))-o*(n=s*-(n+.5));0!=i&&(e.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+o+", M12="+l+", M21="+-l+", M22="+o+", sizingMethod='auto expand')"),e.zoom=a,e.left=Math.round(this.bounds.x+((r-r*d+s*c)/2-o*t-l*n)-r/2)+"px",e.top=Math.round(this.bounds.y+m-s/2)+"px"},mxText.prototype.updateValue=function(){if(mxUtils.isNode(this.value))this.node.innerHTML="",this.node.appendChild(this.value);else{var e=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(e=mxUtils.htmlEntities(e,!1));e=this.replaceLinefeeds?e.replace(/\n/g,"<br/>"):e;var t=null!=this.background&&this.background!=mxConstants.NONE?this.background:null,n=null!=this.border&&this.border!=mxConstants.NONE?this.border:null;if(null!=t||null!=n)if("fill"==this.overflow)null!=t&&(this.node.style.backgroundColor=t),null!=n&&(this.node.style.border="1px solid "+n);else{var a="";null!=t&&(a+="background-color:"+t+";"),null!=n&&(a+="border:1px solid "+n+";"),e='<div style="zoom:1;'+a+"display:inline-block;_display:inline;padding-bottom:1px;padding-right:1px;line-height:"+this.node.style.lineHeight+'">'+e+"</div>",this.node.style.lineHeight=""}this.node.innerHTML=e}},mxText.prototype.updateFont=function(e){(e=e.style).lineHeight=Math.round(this.size*mxConstants.LINE_HEIGHT)+"px",e.fontSize=Math.round(this.size)+"px",e.fontFamily=this.family,e.verticalAlign="top",e.color=this.color,e.fontWeight=(this.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?"bold":"",e.fontStyle=(this.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?"italic":"",e.fontDecoration=(this.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE?"underline":"",e.textAlign=this.align==mxConstants.ALIGN_CENTER?"center":this.align==mxConstants.ALIGN_RIGHT?"right":"left"},mxText.prototype.updateSize=function(e){var t=Math.round(this.bounds.width/this.scale),n=Math.round(this.bounds.height/this.scale);e=e.style,this.clipped?(e.overflow="hidden",0<n&&(e.maxHeight=n+"px"),0<t&&(e.width=t+"px")):"fill"==this.overflow&&(e.width=t+"px",0<n&&(e.maxHeight=n+"px")),this.wrap?(!this.clipped&&0<t&&(e.width=t+"px"),e.whiteSpace="normal"):e.whiteSpace="nowrap"},mxText.prototype.updateMargin=function(){this.margin=mxUtils.getAlignmentAsPoint(this.align,this.valign)},mxText.prototype.getSpacing=function(){return new mxPoint(this.align==mxConstants.ALIGN_CENTER?(this.spacingLeft-this.spacingRight)/2:this.align==mxConstants.ALIGN_RIGHT?-this.spacingRight-this.baseSpacingRight:this.spacingLeft+this.baseSpacingLeft,this.valign==mxConstants.ALIGN_MIDDLE?(this.spacingTop-this.spacingBottom)/2:this.valign==mxConstants.ALIGN_BOTTOM?-this.spacingBottom-this.baseSpacingBottom:this.spacingTop+this.baseSpacingTop)},mxUtils.extend(mxTriangle,mxActor),mxTriangle.prototype.redrawPath=function(e,t,n,a,i){e.moveTo(0,0),e.lineTo(a,.5*i),e.lineTo(0,i),e.close()},mxUtils.extend(mxHexagon,mxActor),mxHexagon.prototype.redrawPath=function(e,t,n,a,i){e.moveTo(.25*a,0),e.lineTo(.75*a,0),e.lineTo(a,.5*i),e.lineTo(.75*a,i),e.lineTo(.25*a,i),e.lineTo(0,.5*i),e.close()},mxUtils.extend(mxLine,mxShape),mxLine.prototype.paintVertexShape=function(e,t,n,a,i){n+=i/2,e.begin(),e.moveTo(t,n),e.lineTo(t+a,n),e.stroke()},mxUtils.extend(mxImageShape,mxRectangleShape),mxImageShape.prototype.preserveImageAspect=!0,mxImageShape.prototype.getSvgScreenOffset=function(){return mxClient.IS_IE?0:.5},mxImageShape.prototype.apply=function(e){mxShape.prototype.apply.apply(this,arguments),this.gradient=this.stroke=this.fill=null,null!=this.style&&(this.fill=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND),this.stroke=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER),this.preserveImageAspect=1==mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_ASPECT,1),this.flipH=this.flipH||1==mxUtils.getValue(this.style,"imageFlipH",0),this.flipV=this.flipV||1==mxUtils.getValue(this.style,"imageFlipV",0))},mxImageShape.prototype.isHtmlAllowed=function(){return!this.preserveImageAspect},mxImageShape.prototype.createHtml=function(){var e=document.createElement("div");return e.style.position="absolute",e},mxImageShape.prototype.paintVertexShape=function(e,t,n,a,i){if(null!=this.image){var o=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND,null),s=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER,null);null==o&&null==s||(e.setFillColor(o),e.setStrokeColor(s),e.rect(t,n,a,i),e.fillAndStroke()),e.image(t,n,a,i,this.image,this.preserveImageAspect,!1,!1)}else mxRectangleShape.prototype.paintBackground.apply(this,arguments)},mxImageShape.prototype.redrawHtmlShape=function(){if(this.node.style.left=Math.round(this.bounds.x)+"px",this.node.style.top=Math.round(this.bounds.y)+"px",this.node.style.width=Math.max(0,Math.round(this.bounds.width))+"px",this.node.style.height=Math.max(0,Math.round(this.bounds.height))+"px",this.node.style.backgroundColor=this.fill||"",this.node.style.borderColor=this.stroke||"",this.node.innerHTML="",null!=this.image){var e=document.createElement(mxClient.IS_IE6||null==mxClient.CSS_PREFIX&&0!=this.rotation?mxClient.VML_PREFIX+":image":"img");e.style.position="absolute",e.src=this.image;var t=this.opacity<100?"alpha(opacity="+this.opacity+")":"";this.node.style.filter=t,this.flipH&&this.flipV?t+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2)":this.flipH?t+="progid:DXImageTransform.Microsoft.BasicImage(mirror=1)":this.flipV&&(t+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"),e.style.filter!=t&&(e.style.filter=t),"image"==e.nodeName?e.style.rotation=this.rotation:e.style[mxClient.CSS_PREFIX+"Transform"]="rotate("+this.rotation+"deg)",e.style.width=this.node.style.width,e.style.height=this.node.style.height,this.node.style.backgroundImage="",this.node.appendChild(e)}else this.setTransparentBackgroundImage(this.node)},mxUtils.extend(mxLabel,mxRectangleShape),mxLabel.prototype.imageSize=mxConstants.DEFAULT_IMAGESIZE,mxLabel.prototype.spacing=2,mxLabel.prototype.indicatorSize=10,mxLabel.prototype.indicatorSpacing=2,mxLabel.prototype.init=function(e){mxShape.prototype.init.apply(this,arguments),null!=this.indicatorColor&&null!=this.indicatorShape&&(this.indicator=new this.indicatorShape,this.indicator.dialect=this.dialect,this.indicator.bounds=this.bounds,this.indicator.fill=this.indicatorColor,this.indicator.stroke=this.indicatorColor,this.indicator.gradient=this.indicatorGradientColor,this.indicator.direction=this.indicatorDirection,this.indicator.init(this.node))},mxLabel.prototype.redraw=function(){null!=this.indicator&&(this.indicator.fill=this.indicatorColor,this.indicator.stroke=this.indicatorColor,this.indicator.gradient=this.indicatorGradientColor,this.indicator.direction=this.indicatorDirection),mxShape.prototype.redraw.apply(this,arguments)},mxLabel.prototype.isHtmlAllowed=function(){return mxRectangleShape.prototype.isHtmlAllowed.apply(this,arguments)&&null==this.indicatorColor&&null==this.indicatorShape},mxLabel.prototype.paintForeground=function(e,t,n,a,i){this.paintImage(e,t,n,a,i),this.paintIndicator(e,t,n,a,i),mxRectangleShape.prototype.paintForeground.apply(this,arguments)},mxLabel.prototype.paintImage=function(e,t,n,a,i){null!=this.image&&(t=this.getImageBounds(t,n,a,i),e.image(t.x,t.y,t.width,t.height,this.image,!1,!1,!1))},mxLabel.prototype.getImageBounds=function(e,t,n,a){var i=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),o=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),s=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_WIDTH,mxConstants.DEFAULT_IMAGESIZE),r=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_HEIGHT,mxConstants.DEFAULT_IMAGESIZE),l=mxUtils.getNumber(this.style,mxConstants.STYLE_SPACING,this.spacing)+5;return new mxRectangle(e=i==mxConstants.ALIGN_CENTER?e+(n-s)/2:i==mxConstants.ALIGN_RIGHT?e+(n-s-l):e+l,t=o==mxConstants.ALIGN_TOP?t+l:o==mxConstants.ALIGN_BOTTOM?t+(a-r-l):t+(a-r)/2,s,r)},mxLabel.prototype.paintIndicator=function(e,t,n,a,i){null!=this.indicator?(this.indicator.bounds=this.getIndicatorBounds(t,n,a,i),this.indicator.paint(e)):null!=this.indicatorImage&&(t=this.getIndicatorBounds(t,n,a,i),e.image(t.x,t.y,t.width,t.height,this.indicatorImage,!1,!1,!1))},mxLabel.prototype.getIndicatorBounds=function(e,t,n,a){var i=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),o=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),s=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_WIDTH,this.indicatorSize),r=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_HEIGHT,this.indicatorSize),l=this.spacing+5;return new mxRectangle(e=i==mxConstants.ALIGN_RIGHT?e+(n-s-l):i==mxConstants.ALIGN_CENTER?e+(n-s)/2:e+l,t=o==mxConstants.ALIGN_BOTTOM?t+(a-r-l):o==mxConstants.ALIGN_TOP?t+l:t+(a-r)/2,s,r)},mxLabel.prototype.redrawHtmlShape=function(){for(mxRectangleShape.prototype.redrawHtmlShape.apply(this,arguments);this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);if(null!=this.image){var e=document.createElement("img");e.style.position="relative",e.setAttribute("border","0");var t=this.getImageBounds(this.bounds.x,this.bounds.y,this.bounds.width,this.bounds.height);t.x-=this.bounds.x,t.y-=this.bounds.y,e.style.left=Math.round(t.x)+"px",e.style.top=Math.round(t.y)+"px",e.style.width=Math.round(t.width)+"px",e.style.height=Math.round(t.height)+"px",e.src=this.image,this.node.appendChild(e)}},mxUtils.extend(mxCylinder,mxShape),mxCylinder.prototype.maxHeight=40,mxCylinder.prototype.svgStrokeTolerance=0,mxCylinder.prototype.paintVertexShape=function(e,t,n,a,i){e.translate(t,n),e.begin(),this.redrawPath(e,t,n,a,i,!1),e.fillAndStroke(),e.setShadow(!1),e.begin(),this.redrawPath(e,t,n,a,i,!0),e.stroke()},mxCylinder.prototype.redrawPath=function(e,t,n,a,i,o){t=Math.min(this.maxHeight,Math.round(i/5)),(o&&null!=this.fill||!o&&null==this.fill)&&(e.moveTo(0,t),e.curveTo(0,2*t,a,2*t,a,t),o||(e.stroke(),e.begin())),o||(e.moveTo(0,t),e.curveTo(0,-t/3,a,-t/3,a,t),e.lineTo(a,i-t),e.curveTo(a,i+t/3,0,i+t/3,0,i-t),e.close())},mxUtils.extend(mxConnector,mxPolyline),mxConnector.prototype.paintEdgeShape=function(e,t){var n=this.createMarker(e,t,!0),a=this.createMarker(e,t,!1);null==this.style||1!=this.style[mxConstants.STYLE_CURVED]?this.paintLine(e,t,this.isRounded):this.paintCurvedLine(e,t),e.setFillColor(this.stroke),e.setShadow(!1),e.setDashed(!1),null!=n&&n(),null!=a&&a()},mxConnector.prototype.paintCurvedLine=function(e,t){e.begin();var n=t[0],a=t.length;for(e.moveTo(n.x,n.y),n=1;n<a-2;n++){var i=t[n],o=t[n+1];e.quadTo(i.x,i.y,(i.x+o.x)/2,(i.y+o.y)/2)}i=t[a-2],o=t[a-1],e.quadTo(i.x,i.y,o.x,o.y),e.stroke()},mxConnector.prototype.createMarker=function(e,t,n){var a=t.length,i=n?t[1]:t[a-2],o=(a=(t=n?t[0]:t[a-1]).x-i.x,t.y-i.y),s=(i=a/(s=Math.max(1,Math.sqrt(a*a+o*o))),a=o/s,o=mxUtils.getNumber(this.style,n?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE),mxUtils.getValue(this.style,n?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW));return mxMarker.createMarker(e,this,s,t,i,a,o,n,this.strokewidth,0!=this.style[n?mxConstants.STYLE_STARTFILL:mxConstants.STYLE_ENDFILL])},mxConnector.prototype.augmentBoundingBox=function(e){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var t=0;mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(t=mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)+1),mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(t=Math.max(t,mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE))+1),e.grow(Math.ceil(t*this.scale))},mxUtils.extend(mxSwimlane,mxShape),mxSwimlane.prototype.imageSize=16,mxSwimlane.prototype.getGradientBounds=function(e,t,n,a,i){return new mxRectangle(t,n,a,Math.min(i,mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)))},mxSwimlane.prototype.getRotation=function(){var e=mxShape.prototype.getRotation.apply(this,arguments);return 1!=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)&&(e+=mxText.prototype.verticalTextRotation),e},mxSwimlane.prototype.getTextRotation=function(){return this.getRotation()},mxSwimlane.prototype.isPaintBoundsInverted=function(){return mxShape.prototype.isPaintBoundsInverted.apply(this,arguments)||1!=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)},mxSwimlane.prototype.getArcSize=function(e,t,n){return 3*n*(mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100)},mxSwimlane.prototype.paintVertexShape=function(e,t,n,a,i){var o=Math.min(i,mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),s=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE),r=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_LINE,1),l=0;e.translate(t,n),this.isRounded?(l=this.getArcSize(a,i,o),this.paintRoundedSwimlane(e,t,n,a,i,o,l,s,r)):this.paintSwimlane(e,t,n,a,i,o,s,r),s=mxUtils.getValue(this.style,mxConstants.STYLE_SEPARATORCOLOR,mxConstants.NONE),this.paintSeparator(e,a,o,i,s),null!=this.image&&(i=this.getImageBounds(t,o,a,i),e.image(i.x-t,i.y-n,i.width,i.height,this.image,!1,!1,!1)),this.glass&&(e.setShadow(!1),this.paintGlassEffect(e,0,0,a,o,l))},mxSwimlane.prototype.paintSwimlane=function(e,t,n,a,i,o,s,r){s!=mxConstants.NONE&&(e.save(),e.setFillColor(s),e.rect(0,0,a,i),e.fillAndStroke(),e.restore(),e.setShadow(!1)),e.begin(),e.moveTo(0,o),e.lineTo(0,0),e.lineTo(a,0),e.lineTo(a,o),r&&e.close(),e.fillAndStroke(),o<i&&s==mxConstants.NONE&&(e.pointerEvents=!1,e.begin(),e.moveTo(0,o),e.lineTo(0,i),e.lineTo(a,i),e.lineTo(a,o),e.stroke())},mxSwimlane.prototype.paintRoundedSwimlane=function(e,t,n,a,i,o,s,r,l){r!=mxConstants.NONE&&(e.save(),e.setFillColor(r),e.roundrect(0,0,a,i,s,s),e.fillAndStroke(),e.restore(),e.setShadow(!1)),e.begin(),e.moveTo(a,o),e.lineTo(a,s),e.quadTo(a,0,a-Math.min(a/2,s),0),e.lineTo(Math.min(a/2,s),0),e.quadTo(0,0,0,s),e.lineTo(0,o),l&&e.close(),e.fillAndStroke(),o<i&&r==mxConstants.NONE&&(e.pointerEvents=!1,e.begin(),e.moveTo(0,o),e.lineTo(0,i-s),e.quadTo(0,i,Math.min(a/2,s),i),e.lineTo(a-Math.min(a/2,s),i),e.quadTo(a,i,a,i-s),e.lineTo(a,o),e.stroke())},mxSwimlane.prototype.paintSeparator=function(e,t,n,a,i){i!=mxConstants.NONE&&(e.setStrokeColor(i),e.setDashed(!0),e.begin(),e.moveTo(t,n),e.lineTo(t,a),e.stroke(),e.setDashed(!1))},mxSwimlane.prototype.getImageBounds=function(e,t,n,a){return new mxRectangle(e+n-this.imageSize,t,this.imageSize,this.imageSize)},mxGraphLayout.prototype.graph=null,mxGraphLayout.prototype.useBoundingBox=!0,mxGraphLayout.prototype.parent=null,mxGraphLayout.prototype.moveCell=function(e,t,n){},mxGraphLayout.prototype.execute=function(e){},mxGraphLayout.prototype.getGraph=function(){return this.graph},mxGraphLayout.prototype.getConstraint=function(e,t,n,a){return null!=(t=null!=(n=this.graph.view.getState(t))?n.style:this.graph.getCellStyle(t))?t[e]:null},mxGraphLayout.traverse=function(e,t,n,a,i){if(null!=n&&null!=e){t=null==t||t,i=i||[];var o=mxCellPath.create(e);if(null==i[o]&&(null==(a=n(i[o]=e,a))||a)&&0<(a=this.graph.model.getEdgeCount(e)))for(o=0;o<a;o++){var s=this.graph.model.getEdgeAt(e,o),r=this.graph.model.getTerminal(s,!0)==e;t&&!r||(r=this.graph.view.getVisibleTerminal(s,!r),this.traverse(r,t,n,s,i))}}},mxGraphLayout.prototype.isVertexMovable=function(e){return this.graph.isCellMovable(e)},mxGraphLayout.prototype.isVertexIgnored=function(e){return!this.graph.getModel().isVertex(e)||!this.graph.isCellVisible(e)},mxGraphLayout.prototype.isEdgeIgnored=function(e){var t=this.graph.getModel();return!t.isEdge(e)||!this.graph.isCellVisible(e)||null==t.getTerminal(e,!0)||null==t.getTerminal(e,!1)},mxGraphLayout.prototype.setEdgeStyleEnabled=function(e,t){this.graph.setCellStyles(mxConstants.STYLE_NOEDGESTYLE,t?"0":"1",[e])},mxGraphLayout.prototype.setOrthogonalEdge=function(e,t){this.graph.setCellStyles(mxConstants.STYLE_ORTHOGONAL,t?"1":"0",[e])},mxGraphLayout.prototype.getParentOffset=function(e){var t=new mxPoint;if(null!=e&&e!=this.parent){var n=this.graph.getModel();if(n.isAncestor(this.parent,e))for(var a=n.getGeometry(e);e!=this.parent;)t.x+=a.x,t.y+=a.y,e=n.getParent(e),a=n.getGeometry(e)}return t},mxGraphLayout.prototype.setEdgePoints=function(e,t){if(null!=e){var n=this.graph.model,a=n.getGeometry(e);if(null==a?(a=new mxGeometry).setRelative(!0):a=a.clone(),null!=this.parent&&null!=t)for(var i=n.getParent(e),o=(i=this.getParentOffset(i),0);o<t.length;o++)t[o].x-=i.x,t[o].y-=i.y;a.points=t,n.setGeometry(e,a)}},mxGraphLayout.prototype.setVertexLocation=function(e,t,n){var a=this.graph.getModel(),i=a.getGeometry(e),o=null;if(null!=i){if(o=new mxRectangle(t,n,i.width,i.height),this.useBoundingBox){var s=this.graph.getView().getState(e);if(null!=s&&null!=s.text&&null!=s.text.boundingBox){var r=this.graph.getView().scale,l=s.text.boundingBox;s.text.boundingBox.x<s.x&&(t+=(s.x-l.x)/r,o.width=l.width),s.text.boundingBox.y<s.y&&(n+=(s.y-l.y)/r,o.height=l.height)}}null!=this.parent&&(null!=(s=a.getParent(e))&&s!=this.parent&&(t-=(s=this.getParentOffset(s)).x,n-=s.y)),i.x==t&&i.y==n||((i=i.clone()).x=t,i.y=n,a.setGeometry(e,i))}return o},mxGraphLayout.prototype.getVertexBounds=function(e){var t=this.graph.getModel().getGeometry(e);if(this.useBoundingBox&&(null!=(r=this.graph.getView().getState(e))&&null!=r.text&&null!=r.text.boundingBox)){var n=this.graph.getView().scale,a=r.text.boundingBox,i=Math.max(r.x-a.x,0)/n,o=Math.max(r.y-a.y,0)/n,s=Math.max(a.x+a.width-(r.x+r.width),0)/n,r=Math.max(a.y+a.height-(r.y+r.height),0)/n;t=new mxRectangle(t.x-i,t.y-o,t.width+i+s,t.height+o+r)}return null!=this.parent&&(e=this.graph.getModel().getParent(e),t=t.clone(),null!=e&&e!=this.parent&&(e=this.getParentOffset(e),t.x+=e.x,t.y+=e.y)),new mxRectangle(t.x,t.y,t.width,t.height)},mxGraphLayout.prototype.arrangeGroups=function(e,t){this.graph.getModel().beginUpdate();try{for(var n=e.length-1;0<=n;n--){var a=e[n],i=this.graph.getChildVertices(a),o=this.graph.getBoundingBoxFromGeometry(i),s=this.graph.getCellGeometry(a),r=0,l=0;if(this.graph.isSwimlane(a)){var d=this.graph.getStartSize(a);r=d.width,l=d.height}null!=o&&null!=s&&((s=s.clone()).x=s.x+o.x-t-r,s.y=s.y+o.y-t-l,s.width=o.width+2*t+r,s.height=o.height+2*t+l,this.graph.getModel().setGeometry(a,s),this.graph.moveCells(i,t+r-o.x,t+l-o.y))}}finally{this.graph.getModel().endUpdate()}},mxStackLayout.prototype=new mxGraphLayout,mxStackLayout.prototype.constructor=mxStackLayout,mxStackLayout.prototype.horizontal=null,mxStackLayout.prototype.spacing=null,mxStackLayout.prototype.x0=null,mxStackLayout.prototype.y0=null,mxStackLayout.prototype.border=0,mxStackLayout.prototype.keepFirstLocation=!1,mxStackLayout.prototype.fill=!1,mxStackLayout.prototype.resizeParent=!1,mxStackLayout.prototype.resizeLast=!1,mxStackLayout.prototype.wrap=null,mxStackLayout.prototype.isHorizontal=function(){return this.horizontal},mxStackLayout.prototype.moveCell=function(e,t,n){var a=this.graph.getModel(),i=a.getParent(e),o=this.isHorizontal();if(null!=e&&null!=i){var s=0,r=0,l=a.getChildCount(i);for(t=o?t:n,null!=(s=this.graph.getView().getState(i))&&(t-=o?s.x:s.y),s=0;s<l;s++)if((n=a.getChildAt(i,s))!=e&&null!=(n=a.getGeometry(n))){if(n=o?n.x+n.width/2:n.y+n.height/2,r<t&&t<n)break;r=n}o=i.getIndex(e),o=Math.max(0,s-(o<s?1:0)),a.add(i,e,o)}},mxStackLayout.prototype.getParentSize=function(e){var t=this.graph.getModel(),n=t.getGeometry(e);return null!=this.graph.container&&(null==n&&t.isLayer(e)||e==this.graph.getView().currentRoot)&&(n=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1)),n},mxStackLayout.prototype.execute=function(e){if(null!=e){var t=this.isHorizontal(),n=this.graph.getModel(),a=this.getParentSize(e),i=0;null!=a&&(i=t?a.height:a.width);i=i-(2*this.spacing+2*this.border);var o=this.x0+this.border,s=this.y0+this.border;if(this.graph.isSwimlane(e)){var r=this.graph.getCellStyle(e),l=mxUtils.getValue(r,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);t==(r=mxUtils.getValue(r,mxConstants.STYLE_HORIZONTAL,!0))&&(i-=l),t?s+=l:o+=l}n.beginUpdate();try{l=0,r=null;for(var d=n.getChildCount(e),c=0;c<d;c++){var m=n.getChildAt(e,c);if(!this.isVertexIgnored(m)&&this.isVertexMovable(m)){var u=n.getGeometry(m);null!=u&&(u=u.clone(),null!=this.wrap&&null!=r&&(t&&r.x+r.width+u.width+2*this.spacing>this.wrap||!t&&r.y+r.height+u.height+2*this.spacing>this.wrap)&&(r=null,t?s+=l+this.spacing:o+=l+this.spacing,l=0),l=Math.max(l,t?u.height:u.width),null!=r?t?u.x=r.x+r.width+this.spacing:u.y=r.y+r.height+this.spacing:this.keepFirstLocation||(t?u.x=o:u.y=s),t?u.y=s:u.x=o,this.fill&&0<i&&(t?u.height=i:u.width=i),n.setGeometry(m,u),r=u)}}this.resizeParent&&null!=a&&null!=r&&!this.graph.isCellCollapsed(e)?(a=a.clone(),t?a.width=r.x+r.width+this.spacing:a.height=r.y+r.height+this.spacing,n.setGeometry(e,a)):this.resizeLast&&null!=a&&null!=r&&(t?r.width=a.width-r.x-this.spacing:r.height=a.height-r.y-this.spacing)}finally{n.endUpdate()}}},mxPartitionLayout.prototype=new mxGraphLayout,mxPartitionLayout.prototype.constructor=mxPartitionLayout,mxPartitionLayout.prototype.horizontal=null,mxPartitionLayout.prototype.spacing=null,mxPartitionLayout.prototype.border=null,mxPartitionLayout.prototype.resizeVertices=!0,mxPartitionLayout.prototype.isHorizontal=function(){return this.horizontal},mxPartitionLayout.prototype.moveCell=function(e,t,n){var a=(n=this.graph.getModel()).getParent(e);if(null!=e&&null!=a){var i=0,o=0,s=n.getChildCount(a);for(i=0;i<s;i++){var r=n.getChildAt(a,i);if(null!=(r=this.getVertexBounds(r))){if(r=r.x+r.width/2,o<t&&t<r)break;o=r}}t=a.getIndex(e),t=Math.max(0,i-(t<i?1:0)),n.add(a,e,t)}},mxPartitionLayout.prototype.execute=function(e){var t=this.isHorizontal(),n=this.graph.getModel(),a=n.getGeometry(e);if(null!=this.graph.container&&(null==a&&n.isLayer(e)||e==this.graph.getView().currentRoot)&&(a=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1)),null!=a){for(var i=[],o=n.getChildCount(e),s=0;s<o;s++){var r=n.getChildAt(e,s);!this.isVertexIgnored(r)&&this.isVertexMovable(r)&&i.push(r)}if(0<(o=i.length)){var l=this.border,d=this.border,c=(c=t?a.height:a.width)-2*this.border;if(e=this.graph.isSwimlane(e)?this.graph.getStartSize(e):new mxRectangle,c-=t?e.height:e.width,l+=e.width,d+=e.height,e=this.border+(o-1)*this.spacing,0<(a=t?(a.width-l-e)/o:(a.height-d-e)/o)){n.beginUpdate();try{for(s=0;s<o;s++){r=i[s];var m=n.getGeometry(r);null!=m&&((m=m.clone()).x=l,m.y=d,t?(this.resizeVertices&&(m.width=a,m.height=c),l+=a+this.spacing):(this.resizeVertices&&(m.height=a,m.width=c),d+=a+this.spacing),n.setGeometry(r,m))}}finally{n.endUpdate()}}}}},mxCompactTreeLayout.prototype=new mxGraphLayout,mxCompactTreeLayout.prototype.constructor=mxCompactTreeLayout,mxCompactTreeLayout.prototype.horizontal=null,mxCompactTreeLayout.prototype.invert=null,mxCompactTreeLayout.prototype.resizeParent=!0,mxCompactTreeLayout.prototype.groupPadding=10,mxCompactTreeLayout.prototype.parentsChanged=null,mxCompactTreeLayout.prototype.moveTree=!1,mxCompactTreeLayout.prototype.levelDistance=10,mxCompactTreeLayout.prototype.nodeDistance=20,mxCompactTreeLayout.prototype.resetEdges=!0,mxCompactTreeLayout.prototype.prefHozEdgeSep=5,mxCompactTreeLayout.prototype.prefVertEdgeOff=4,mxCompactTreeLayout.prototype.minEdgeJetty=8,mxCompactTreeLayout.prototype.channelBuffer=4,mxCompactTreeLayout.prototype.edgeRouting=!0,mxCompactTreeLayout.prototype.isVertexIgnored=function(e){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(e).length},mxCompactTreeLayout.prototype.isHorizontal=function(){return this.horizontal},mxCompactTreeLayout.prototype.execute=function(e,t){this.parent=e;var n=this.graph.getModel();if(null==t)if(0<this.graph.getEdges(e,n.getParent(e),this.invert,!this.invert,!1).length)t=e;else{if(0<(s=this.graph.findTreeRoots(e,!0,this.invert)).length)for(var a=0;a<s.length;a++)if(!this.isVertexIgnored(s[a])&&0<this.graph.getEdges(s[a],null,this.invert,!this.invert,!1).length){t=s[a];break}}if(null!=t){this.parentsChanged=this.resizeParent?{}:null,n.beginUpdate();try{var i=this.dfs(t,e);if(null!=i){this.layout(i);var o=this.graph.gridSize,s=o;if(!this.moveTree){var r=this.getVertexBounds(t);null!=r&&(o=r.x,s=r.y)}if((r=null)!=(r=this.isHorizontal()?this.horizontalLayout(i,o,s):this.verticalLayout(i,null,o,s))){var l=a=0;r.x<0&&(a=Math.abs(o-r.x)),r.y<0&&(l=Math.abs(s-r.y)),(0!=a||0!=l)&&this.moveNode(i,a,l),this.resizeParent&&this.adjustParents(),this.edgeRouting&&this.localEdgeProcessing(i)}}}finally{n.endUpdate()}}},mxCompactTreeLayout.prototype.moveNode=function(e,t,n){for(e.x+=t,e.y+=n,this.apply(e),e=e.child;null!=e;)this.moveNode(e,t,n),e=e.next},mxCompactTreeLayout.prototype.dfs=function(e,t,n){n=null!=n?n:[];var a=mxCellPath.create(e),i=null;if(null!=e&&null==n[a]&&!this.isVertexIgnored(e)){n[a]=e;i=this.createNode(e),a=this.graph.getModel();var o=null;e=this.graph.getEdges(e,t,this.invert,!this.invert,!1,!0);for(var s=this.graph.getView(),r=0;r<e.length;r++){var l=e[r];if(!this.isEdgeIgnored(l)){this.resetEdges&&this.setEdgePoints(l,null),this.edgeRouting&&(this.setEdgeStyleEnabled(l,!1),this.setEdgePoints(l,null));var d;l=null!=(d=s.getState(l))?d.getVisibleTerminal(this.invert):s.getVisibleTerminal(l,this.invert);null!=(d=this.dfs(l,t,n))&&null!=a.getGeometry(l)&&(null==o?i.child=d:o.next=d,o=d)}}}return i},mxCompactTreeLayout.prototype.layout=function(e){if(null!=e){for(var t=e.child;null!=t;)this.layout(t),t=t.next;null!=e.child?this.attachParent(e,this.join(e)):this.layoutLeaf(e)}},mxCompactTreeLayout.prototype.horizontalLayout=function(e,t,n,a){if(e.x+=t+e.offsetX,e.y+=n+e.offsetY,a=this.apply(e,a),null!=(t=e.child)){a=this.horizontalLayout(t,e.x,e.y,a),n=e.y+t.offsetY;for(var i=t.next;null!=i;)a=this.horizontalLayout(i,e.x+t.offsetX,n,a),n+=i.offsetY,i=i.next}return a},mxCompactTreeLayout.prototype.verticalLayout=function(e,t,n,a,i){if(e.x+=n+e.offsetY,e.y+=a+e.offsetX,i=this.apply(e,i),null!=(t=e.child))for(i=this.verticalLayout(t,e,e.x,e.y,i),n=e.x+t.offsetY,a=t.next;null!=a;)i=this.verticalLayout(a,e,n,e.y+t.offsetX,i),n+=a.offsetY,a=a.next;return i},mxCompactTreeLayout.prototype.attachParent=function(e,t){var n=this.nodeDistance+this.levelDistance,a=(t-e.width)/2-this.nodeDistance,i=a+e.width+2*this.nodeDistance-t;e.child.offsetX=n+e.height,e.child.offsetY=i,e.contour.upperHead=this.createLine(e.height,0,this.createLine(n,i,e.contour.upperHead)),e.contour.lowerHead=this.createLine(e.height,0,this.createLine(n,a,e.contour.lowerHead))},mxCompactTreeLayout.prototype.layoutLeaf=function(e){var t=2*this.nodeDistance;e.contour.upperTail=this.createLine(e.height+t,0),e.contour.upperHead=e.contour.upperTail,e.contour.lowerTail=this.createLine(0,-e.width-t),e.contour.lowerHead=this.createLine(e.height+t,0,e.contour.lowerTail)},mxCompactTreeLayout.prototype.join=function(e){var t=2*this.nodeDistance,n=e.child;e.contour=n.contour;var a=n.width+t,i=a;for(n=n.next;null!=n;){var o=this.merge(e.contour,n.contour);n.offsetY=o+a,n.offsetX=0,i+=o+(a=n.width+t),n=n.next}return i},mxCompactTreeLayout.prototype.merge=function(e,t){for(var n=0,a=0,i=0,o=e.lowerHead,s=t.upperHead;null!=s&&null!=o;){var r=this.offset(n,a,s.dx,s.dy,o.dx,o.dy);a=a+r,i=i+r;n+s.dx<=o.dx?(n+=s.dx,a+=s.dy,s=s.next):(n-=o.dx,a-=o.dy,o=o.next)}return null!=s?(n=this.bridge(e.upperTail,0,0,s,n,a),e.upperTail=null!=n.next?t.upperTail:n,e.lowerTail=t.lowerTail):null==(n=this.bridge(t.lowerTail,n,a,o,0,0)).next&&(e.lowerTail=n),e.lowerHead=t.lowerHead,i},mxCompactTreeLayout.prototype.offset=function(e,t,n,a,i,o){var s;return i<=e||e+n<=0?0:0<(s=0<i*a-n*o?e<0?e*a/n-t:0<e?e*o/i-t:-t:i<e+n?o-(t+(i-e)*a/n):e+n<i?(n+e)*o/i-(t+a):o-(t+a))?s:0},mxCompactTreeLayout.prototype.bridge=function(e,t,n,a,i,o){return t=i+a.dx-t,i=i=0,0==a.dx?i=a.dy:(i=t*a.dy,i/=a.dx),t=this.createLine(t,i,a.next),e.next=this.createLine(0,o+a.dy-i-n,t),t},mxCompactTreeLayout.prototype.createNode=function(e){var t={};return t.cell=e,t.x=0,t.y=0,t.width=0,t.height=0,null!=(e=this.getVertexBounds(e))&&(this.isHorizontal()?(t.width=e.height,t.height=e.width):(t.width=e.width,t.height=e.height)),t.offsetX=0,t.offsetY=0,t.contour={},t},mxCompactTreeLayout.prototype.apply=function(e,t){var n=this.graph.getModel(),a=e.cell,i=n.getGeometry(a);return null!=a&&null!=i&&(this.isVertexMovable(a)&&(i=this.setVertexLocation(a,e.x,e.y),this.resizeParent&&(n=n.getParent(a),a=mxCellPath.create(n),null==this.parentsChanged[a]&&(this.parentsChanged[a]=n))),t=null==t?new mxRectangle(i.x,i.y,i.width,i.height):new mxRectangle(Math.min(t.x,i.x),Math.min(t.y,i.y),Math.max(t.x+t.width,i.x+i.width),Math.max(t.y+t.height,i.y+i.height))),t},mxCompactTreeLayout.prototype.createLine=function(e,t,n){var a={};return a.dx=e,a.dy=t,a.next=n,a},mxCompactTreeLayout.prototype.adjustParents=function(){var e,t=[];for(e in this.parentsChanged)t.push(this.parentsChanged[e]);this.arrangeGroups(mxUtils.sortCells(t,!0),this.groupPadding)},mxCompactTreeLayout.prototype.localEdgeProcessing=function(e){for(this.processNodeOutgoing(e),e=e.child;null!=e;)this.localEdgeProcessing(e),e=e.next},mxCompactTreeLayout.prototype.processNodeOutgoing=function(e){for(var t=e.child,n=e.cell,a=0,i=[];null!=t;){a++;var o=t.x;this.horizontal&&(o=t.y),i.push(new WeightedCellSorter(t,o)),t=t.next}i.sort(WeightedCellSorter.prototype.compare),(o=e.width)>(s=(a+1)*this.prefHozEdgeSep)+2*this.prefHozEdgeSep&&(o-=2*this.prefHozEdgeSep),t=(e=o/a)/2,o>s+2*this.prefHozEdgeSep&&(t+=this.prefHozEdgeSep);o=this.minEdgeJetty-this.prefVertEdgeOff;for(var s=0,r=this.getVertexBounds(n),l=0;l<i.length;l++){for(var d=i[l].cell.cell,c=this.getVertexBounds(d),m=(d=this.graph.getEdgesBetween(n,d,!1),[]),u=0,p=0,g=0;g<d.length;g++)this.horizontal?(u=r.x+r.width,p=r.y+t,m.push(new mxPoint(u,p)),u=r.x+r.width+o,m.push(new mxPoint(u,p)),p=c.y+c.height/2):(u=r.x+t,p=r.y+r.height,m.push(new mxPoint(u,p)),p=r.y+r.height+o,m.push(new mxPoint(u,p)),u=c.x+c.width/2),m.push(new mxPoint(u,p)),this.setEdgePoints(d[g],m);l<a/2?o+=this.prefVertEdgeOff:a/2<l&&(o-=this.prefVertEdgeOff),t+=e,s=Math.max(s,o)}},WeightedCellSorter.prototype.weightedValue=0,WeightedCellSorter.prototype.nudge=!1,WeightedCellSorter.prototype.visited=!1,WeightedCellSorter.prototype.rankIndex=null,WeightedCellSorter.prototype.cell=null,WeightedCellSorter.prototype.compare=function(e,t){return null!=e&&null!=t?t.weightedValue>e.weightedValue?1:t.weightedValue<e.weightedValue?-1:t.nudge?1:-1:0},mxFastOrganicLayout.prototype=new mxGraphLayout,mxFastOrganicLayout.prototype.constructor=mxFastOrganicLayout,mxFastOrganicLayout.prototype.useInputOrigin=!0,mxFastOrganicLayout.prototype.resetEdges=!0,mxFastOrganicLayout.prototype.disableEdgeStyle=!0,mxFastOrganicLayout.prototype.forceConstant=50,mxFastOrganicLayout.prototype.forceConstantSquared=0,mxFastOrganicLayout.prototype.minDistanceLimit=2,mxFastOrganicLayout.prototype.maxDistanceLimit=500,mxFastOrganicLayout.prototype.minDistanceLimitSquared=4,mxFastOrganicLayout.prototype.initialTemp=200,mxFastOrganicLayout.prototype.temperature=0,mxFastOrganicLayout.prototype.maxIterations=0,mxFastOrganicLayout.prototype.iteration=0,mxFastOrganicLayout.prototype.allowedToRun=!0,mxFastOrganicLayout.prototype.isVertexIgnored=function(e){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(e).length},mxFastOrganicLayout.prototype.execute=function(e){var t=this.graph.getModel();this.vertexArray=[];for(var n=this.graph.getChildVertices(e),a=0;a<n.length;a++)this.isVertexIgnored(n[a])||this.vertexArray.push(n[a]);var i=this.useInputOrigin?this.graph.view.getBounds(this.vertexArray):null,o=this.vertexArray.length;for(this.indices=[],this.dispX=[],this.dispY=[],this.cellLocation=[],this.isMoveable=[],this.neighbours=[],this.radius=[],this.radiusSquared=[],this.forceConstant<.001&&(this.forceConstant=.001),this.forceConstantSquared=this.forceConstant*this.forceConstant,a=0;a<this.vertexArray.length;a++){var s=this.vertexArray[a];this.cellLocation[a]=[];var r=mxCellPath.create(s);this.indices[r]=a;var l=this.getVertexBounds(s),d=l.width,c=l.height,m=l.x,u=l.y;this.cellLocation[a][0]=m+d/2,this.cellLocation[a][1]=u+c/2,this.radius[a]=Math.min(d,c),this.radiusSquared[a]=this.radius[a]*this.radius[a]}t.beginUpdate();try{for(a=0;a<o;a++){this.dispX[a]=0,this.dispY[a]=0,this.isMoveable[a]=this.isVertexMovable(this.vertexArray[a]);var p=this.graph.getConnections(this.vertexArray[a],e);n=this.graph.getOpposites(p,this.vertexArray[a]);for(this.neighbours[a]=[],d=0;d<n.length;d++){this.resetEdges&&this.graph.resetEdge(p[d]),this.disableEdgeStyle&&this.setEdgeStyleEnabled(p[d],!1);r=mxCellPath.create(n[d]);var g=this.indices[r];this.neighbours[a][d]=null!=g?g:a}}for(this.temperature=this.initialTemp,0==this.maxIterations&&(this.maxIterations=20*Math.sqrt(o)),this.iteration=0;this.iteration<this.maxIterations;this.iteration++){if(!this.allowedToRun)return;this.calcRepulsion(),this.calcAttraction(),this.calcPositions(),this.reduceTemperature()}for(e=n=null,a=0;a<this.vertexArray.length;a++)s=this.vertexArray[a],this.isVertexMovable(s)&&(null!=(l=this.getVertexBounds(s))&&(this.cellLocation[a][0]-=l.width/2,this.cellLocation[a][1]-=l.height/2,m=this.graph.snap(this.cellLocation[a][0]),u=this.graph.snap(this.cellLocation[a][1]),this.setVertexLocation(s,m,u),n=null==n?m:Math.min(n,m),e=null==e?u:Math.min(e,u)));a=1-(n||0),s=1-(e||0),null!=i&&(a+=i.x,s+=i.y),this.graph.moveCells(this.vertexArray,a,s)}finally{t.endUpdate()}},mxFastOrganicLayout.prototype.calcPositions=function(){for(var e=0;e<this.vertexArray.length;e++)if(this.isMoveable[e]){(n=Math.sqrt(this.dispX[e]*this.dispX[e]+this.dispY[e]*this.dispY[e]))<.001&&(n=.001);var t=this.dispX[e]/n*Math.min(n,this.temperature),n=this.dispY[e]/n*Math.min(n,this.temperature);this.dispX[e]=0,this.dispY[e]=0,this.cellLocation[e][0]+=t,this.cellLocation[e][1]+=n}},mxFastOrganicLayout.prototype.calcAttraction=function(){for(var e=0;e<this.vertexArray.length;e++)for(var t=0;t<this.neighbours[e].length;t++){var n=this.neighbours[e][t];if(e!=n&&this.isMoveable[e]&&this.isMoveable[n]){(a=(o=this.cellLocation[e][0]-this.cellLocation[n][0])*o+(s=this.cellLocation[e][1]-this.cellLocation[n][1])*s-this.radiusSquared[e]-this.radiusSquared[n])<this.minDistanceLimitSquared&&(a=this.minDistanceLimitSquared);var a,i=Math.sqrt(a),o=o/i*(a=a/this.forceConstant),s=s/i*a;this.dispX[e]-=o,this.dispY[e]-=s,this.dispX[n]+=o,this.dispY[n]+=s}}},mxFastOrganicLayout.prototype.calcRepulsion=function(){for(var e=this.vertexArray.length,t=0;t<e;t++)for(var n=t;n<e;n++){if(!this.allowedToRun)return;if(n!=t&&this.isMoveable[t]&&this.isMoveable[n]){var a=this.cellLocation[t][0]-this.cellLocation[n][0],i=this.cellLocation[t][1]-this.cellLocation[n][1];0==a&&(a=.01+Math.random()),0==i&&(i=.01+Math.random());var o=Math.sqrt(a*a+i*i),s=o-this.radius[t]-this.radius[n];s>this.maxDistanceLimit||(s<this.minDistanceLimit&&(s=this.minDistanceLimit),a=a/o*(s=this.forceConstantSquared/s),i=i/o*s,this.dispX[t]+=a,this.dispY[t]+=i,this.dispX[n]-=a,this.dispY[n]-=i)}}},mxFastOrganicLayout.prototype.reduceTemperature=function(){this.temperature=this.initialTemp*(1-this.iteration/this.maxIterations)},mxCircleLayout.prototype=new mxGraphLayout,mxCircleLayout.prototype.constructor=mxCircleLayout,mxCircleLayout.prototype.radius=null,mxCircleLayout.prototype.moveCircle=!1,mxCircleLayout.prototype.x0=0,mxCircleLayout.prototype.y0=0,mxCircleLayout.prototype.resetEdges=!0,mxCircleLayout.prototype.disableEdgeStyle=!0,mxCircleLayout.prototype.execute=function(e){var t=this.graph.getModel();t.beginUpdate();try{for(var n=0,a=null,i=null,o=[],s=t.getChildCount(e),r=0;r<s;r++){var l=t.getChildAt(e,r);if(this.isVertexIgnored(l))this.isEdgeIgnored(l)||(this.resetEdges&&this.graph.resetEdge(l),this.disableEdgeStyle&&this.setEdgeStyleEnabled(l,!1));else{o.push(l);var d=this.getVertexBounds(l);a=null==a?d.y:Math.min(a,d.y),i=null==i?d.x:Math.min(i,d.x),n=Math.max(n,Math.max(d.width,d.height))}}var c=this.getRadius(o.length,n);this.moveCircle&&(i=this.x0,a=this.y0),this.circle(o,c,i,a)}finally{t.endUpdate()}},mxCircleLayout.prototype.getRadius=function(e,t){return Math.max(e*t/Math.PI,this.radius)},mxCircleLayout.prototype.circle=function(e,t,n,a){for(var i=e.length,o=2*Math.PI/i,s=0;s<i;s++)this.isVertexMovable(e[s])&&this.setVertexLocation(e[s],n+t+t*Math.sin(s*o),a+t+t*Math.cos(s*o))},mxParallelEdgeLayout.prototype=new mxGraphLayout,mxParallelEdgeLayout.prototype.constructor=mxParallelEdgeLayout,mxParallelEdgeLayout.prototype.spacing=20,mxParallelEdgeLayout.prototype.execute=function(e){e=this.findParallels(e),this.graph.model.beginUpdate();try{for(var t in e){var n=e[t];1<n.length&&this.layout(n)}}finally{this.graph.model.endUpdate()}},mxParallelEdgeLayout.prototype.findParallels=function(e){for(var t=this.graph.getModel(),n=[],a=t.getChildCount(e),i=0;i<a;i++){var o=t.getChildAt(e,i);if(!this.isEdgeIgnored(o)){var s=this.getEdgeId(o);null!=s&&(null==n[s]&&(n[s]=[]),n[s].push(o))}}return n},mxParallelEdgeLayout.prototype.getEdgeId=function(e){var t=this.graph.getView(),n=t.getState(e),a=null!=n?n.getVisibleTerminal(!0):t.getVisibleTerminal(e,!0);return e=null!=n?n.getVisibleTerminal(!1):t.getVisibleTerminal(e,!1),null!=a&&null!=e?(a=mxCellPath.create(a),(e=mxCellPath.create(e))<a?e+"-"+a:a+"-"+e):null},mxParallelEdgeLayout.prototype.layout=function(e){var t=e[0];if((s=(n=this.graph.getModel()).getGeometry(n.getTerminal(t,!0)))==(o=n.getGeometry(n.getTerminal(t,!1)))){t=s.x+s.width+this.spacing;for(var n=s.y+s.height/2,a=0;a<e.length;a++)this.route(e[a],t,n),t+=this.spacing}else if(null!=s&&null!=o){t=s.x+s.width/2,n=s.y+s.height/2,a=o.x+o.width/2-t;var i=o.y+o.height/2-n,o=Math.sqrt(a*a+i*i),s=i*this.spacing/o;for(o=a*this.spacing/o,t=t+a/2+s*(e.length-1)/2,n=n+i/2-o*(e.length-1)/2,a=0;a<e.length;a++)this.route(e[a],t,n),t-=s,n+=o}},mxParallelEdgeLayout.prototype.route=function(e,t,n){this.graph.isCellMovable(e)&&this.setEdgePoints(e,[new mxPoint(t,n)])},mxCompositeLayout.prototype=new mxGraphLayout,mxCompositeLayout.prototype.constructor=mxCompositeLayout,mxCompositeLayout.prototype.layouts=null,mxCompositeLayout.prototype.master=null,mxCompositeLayout.prototype.moveCell=function(e,t,n){null!=this.master?this.master.move.apply(this.master,arguments):this.layouts[0].move.apply(this.layouts[0],arguments)},mxCompositeLayout.prototype.execute=function(e){var t=this.graph.getModel();t.beginUpdate();try{for(var n=0;n<this.layouts.length;n++)this.layouts[n].execute.apply(this.layouts[n],arguments)}finally{t.endUpdate()}},mxEdgeLabelLayout.prototype=new mxGraphLayout,mxEdgeLabelLayout.prototype.constructor=mxEdgeLabelLayout,mxEdgeLabelLayout.prototype.execute=function(e){for(var t=this.graph.view,n=this.graph.getModel(),a=[],i=[],o=n.getChildCount(e),s=0;s<o;s++){var r=n.getChildAt(e,s),l=t.getState(r);null!=l&&(this.isVertexIgnored(r)?this.isEdgeIgnored(r)||a.push(l):i.push(l))}this.placeLabels(i,a)},mxEdgeLabelLayout.prototype.placeLabels=function(e,t){var n=this.graph.getModel();n.beginUpdate();try{for(var a=0;a<t.length;a++){var i=t[a];if(null!=i&&null!=i.text&&null!=i.text.boundingBox)for(var o=0;o<e.length;o++){var s=e[o];null!=s&&this.avoid(i,s)}}}finally{n.endUpdate()}},mxEdgeLabelLayout.prototype.avoid=function(e,t){var n=this.graph.getModel(),a=e.text.boundingBox;if(mxUtils.intersects(a,t)){var i=-a.y-a.height+t.y,o=-a.y+t.y+t.height;i=Math.abs(i)<Math.abs(o)?i:o,o=-a.x-a.width+t.x,a=-a.x+t.x+t.width,a=Math.abs(o)<Math.abs(a)?o:a;Math.abs(a)<Math.abs(i)?i=0:a=0,null!=(o=n.getGeometry(e.cell))&&(null!=(o=o.clone()).offset?(o.offset.x+=a,o.offset.y+=i):o.offset=new mxPoint(a,i),n.setGeometry(e.cell,o))}},mxGraphAbstractHierarchyCell.prototype.maxRank=-1,mxGraphAbstractHierarchyCell.prototype.minRank=-1,mxGraphAbstractHierarchyCell.prototype.x=null,mxGraphAbstractHierarchyCell.prototype.y=null,mxGraphAbstractHierarchyCell.prototype.width=0,mxGraphAbstractHierarchyCell.prototype.height=0,mxGraphAbstractHierarchyCell.prototype.nextLayerConnectedCells=null,mxGraphAbstractHierarchyCell.prototype.previousLayerConnectedCells=null,mxGraphAbstractHierarchyCell.prototype.temp=null,mxGraphAbstractHierarchyCell.prototype.getNextLayerConnectedCells=function(e){return null},mxGraphAbstractHierarchyCell.prototype.getPreviousLayerConnectedCells=function(e){return null},mxGraphAbstractHierarchyCell.prototype.isEdge=function(){return!1},mxGraphAbstractHierarchyCell.prototype.isVertex=function(){return!1},mxGraphAbstractHierarchyCell.prototype.getGeneralPurposeVariable=function(e){return null},mxGraphAbstractHierarchyCell.prototype.setGeneralPurposeVariable=function(e,t){return null},mxGraphAbstractHierarchyCell.prototype.setX=function(e,t){this.isVertex()?this.x[0]=t:this.isEdge()&&(this.x[e-this.minRank-1]=t)},mxGraphAbstractHierarchyCell.prototype.getX=function(e){return this.isVertex()?this.x[0]:this.isEdge()?this.x[e-this.minRank-1]:0},mxGraphAbstractHierarchyCell.prototype.setY=function(e,t){this.isVertex()?this.y[0]=t:this.isEdge()&&(this.y[e-this.minRank-1]=t)},mxGraphHierarchyNode.prototype=new mxGraphAbstractHierarchyCell,mxGraphHierarchyNode.prototype.constructor=mxGraphHierarchyNode,mxGraphHierarchyNode.prototype.cell=null,mxGraphHierarchyNode.prototype.connectsAsTarget=[],mxGraphHierarchyNode.prototype.connectsAsSource=[],mxGraphHierarchyNode.prototype.hashCode=!1,mxGraphHierarchyNode.prototype.getRankValue=function(e){return this.maxRank},mxGraphHierarchyNode.prototype.getNextLayerConnectedCells=function(e){if(null==this.nextLayerConnectedCells){this.nextLayerConnectedCells=[],this.nextLayerConnectedCells[0]=[];for(var t=0;t<this.connectsAsTarget.length;t++){var n=this.connectsAsTarget[t];-1==n.maxRank||n.maxRank==e+1?this.nextLayerConnectedCells[0].push(n.source):this.nextLayerConnectedCells[0].push(n)}}return this.nextLayerConnectedCells[0]},mxGraphHierarchyNode.prototype.getPreviousLayerConnectedCells=function(e){if(null==this.previousLayerConnectedCells){this.previousLayerConnectedCells=[],this.previousLayerConnectedCells[0]=[];for(var t=0;t<this.connectsAsSource.length;t++){var n=this.connectsAsSource[t];-1==n.minRank||n.minRank==e-1?this.previousLayerConnectedCells[0].push(n.target):this.previousLayerConnectedCells[0].push(n)}}return this.previousLayerConnectedCells[0]},mxGraphHierarchyNode.prototype.isVertex=function(){return!0},mxGraphHierarchyNode.prototype.getGeneralPurposeVariable=function(e){return this.temp[0]},mxGraphHierarchyNode.prototype.setGeneralPurposeVariable=function(e,t){this.temp[0]=t},mxGraphHierarchyNode.prototype.isAncestor=function(e){if(null!=e&&null!=this.hashCode&&null!=e.hashCode&&this.hashCode.length<e.hashCode.length){if(this.hashCode==e.hashCode)return!0;if(null==this.hashCode||null==this.hashCode)return!1;for(var t=0;t<this.hashCode.length;t++)if(this.hashCode[t]!=e.hashCode[t])return!1;return!0}return!1},mxGraphHierarchyNode.prototype.getCoreCell=function(){return this.cell},mxGraphHierarchyEdge.prototype=new mxGraphAbstractHierarchyCell,mxGraphHierarchyEdge.prototype.constructor=mxGraphHierarchyEdge,mxGraphHierarchyEdge.prototype.edges=null,mxGraphHierarchyEdge.prototype.source=null,mxGraphHierarchyEdge.prototype.target=null,mxGraphHierarchyEdge.prototype.isReversed=!1,mxGraphHierarchyEdge.prototype.invert=function(e){e=this.source,this.source=this.target,this.target=e,this.isReversed=!this.isReversed},mxGraphHierarchyEdge.prototype.getNextLayerConnectedCells=function(e){if(null==this.nextLayerConnectedCells){this.nextLayerConnectedCells=[];for(var t=0;t<this.temp.length;t++)this.nextLayerConnectedCells[t]=[],t==this.temp.length-1?this.nextLayerConnectedCells[t].push(this.source):this.nextLayerConnectedCells[t].push(this)}return this.nextLayerConnectedCells[e-this.minRank-1]},mxGraphHierarchyEdge.prototype.getPreviousLayerConnectedCells=function(e){if(null==this.previousLayerConnectedCells){this.previousLayerConnectedCells=[];for(var t=0;t<this.temp.length;t++)this.previousLayerConnectedCells[t]=[],0==t?this.previousLayerConnectedCells[t].push(this.target):this.previousLayerConnectedCells[t].push(this)}return this.previousLayerConnectedCells[e-this.minRank-1]},mxGraphHierarchyEdge.prototype.isEdge=function(){return!0},mxGraphHierarchyEdge.prototype.getGeneralPurposeVariable=function(e){return this.temp[e-this.minRank-1]},mxGraphHierarchyEdge.prototype.setGeneralPurposeVariable=function(e,t){this.temp[e-this.minRank-1]=t},mxGraphHierarchyEdge.prototype.getCoreCell=function(){return null!=this.edges&&0<this.edges.length?this.edges[0]:null},mxGraphHierarchyModel.prototype.maxRank=null,mxGraphHierarchyModel.prototype.vertexMapper=null,mxGraphHierarchyModel.prototype.edgeMapper=null,mxGraphHierarchyModel.prototype.ranks=null,mxGraphHierarchyModel.prototype.roots=null,mxGraphHierarchyModel.prototype.parent=null,mxGraphHierarchyModel.prototype.dfsCount=0,mxGraphHierarchyModel.prototype.SOURCESCANSTARTRANK=1e8,mxGraphHierarchyModel.prototype.tightenToSource=!1,mxGraphHierarchyModel.prototype.createInternalCells=function(e,t,n){for(var a=e.getGraph(),i=0;i<t.length;i++){n[i]=new mxGraphHierarchyNode(t[i]);var o=mxCellPath.create(t[i]);this.vertexMapper[o]=n[i],o=e.getEdges(t[i]),n[i].connectsAsSource=[];for(var s=0;s<o.length;s++){if((d=e.getVisibleTerminal(o[s],!1))!=t[i]&&d!=t[i]&&e.graph.model.isVertex(d)&&!e.isVertexIgnored(d)){var r=e.getEdgesBetween(t[i],d,!1),l=e.getEdgesBetween(t[i],d,!0),d=mxCellPath.create(r[0]);if(null!=r&&0<r.length&&null==this.edgeMapper[d]&&2*l.length>=r.length){l=new mxGraphHierarchyEdge(r);for(var c=0;c<r.length;c++){var m=r[c];d=mxCellPath.create(m);this.edgeMapper[d]=l,a.resetEdge(m),e.disableEdgeStyle&&(e.setEdgeStyleEnabled(m,!1),e.setOrthogonalEdge(m,!0))}l.source=n[i],mxUtils.indexOf(n[i].connectsAsSource,l)<0&&n[i].connectsAsSource.push(l)}}}n[i].temp[0]=0}},mxGraphHierarchyModel.prototype.initialRank=function(){var e=[];if(null!=this.roots)for(var t=0;t<this.roots.length;t++){var n=mxCellPath.create(this.roots[t]);null!=(n=this.vertexMapper[n])&&e.push(n)}for(var a in this.vertexMapper)(n=this.vertexMapper[a]).temp[0]=-1;for(var i=e.slice();0<e.length;){var o,s;o=(n=e[0]).connectsAsTarget,s=n.connectsAsSource;var r=!0,l=this.SOURCESCANSTARTRANK;for(t=0;t<o.length;t++){var d=o[t];if(5270620!=d.temp[0]){r=!1;break}d=d.source,l=Math.min(l,d.temp[0]-1)}if(r){if(n.temp[0]=l,this.maxRank=Math.min(this.maxRank,l),null!=s)for(t=0;t<s.length;t++)(d=s[t]).temp[0]=5270620,-1==(d=d.target).temp[0]&&(e.push(d),d.temp[0]=-2);e.shift()}else if(t=e.shift(),e.push(n),t==n&&1==e.length)break}for(a in this.vertexMapper)(n=this.vertexMapper[a]).temp[0]-=this.maxRank;for(t=0;t<i.length;t++)for(e=0,o=(n=i[t]).connectsAsSource,a=0;a<o.length;a++)d=(d=o[a]).target,n.temp[0]=Math.max(e,d.temp[0]+1),e=n.temp[0];this.maxRank=this.SOURCESCANSTARTRANK-this.maxRank},mxGraphHierarchyModel.prototype.fixRanks=function(){var o=[];this.ranks=[];for(var e=0;e<this.maxRank+1;e++)o[e]=[],this.ranks[e]=o[e];var t=null;if(null!=this.roots){var n=this.roots;for(t=[],e=0;e<n.length;e++){var a=mxCellPath.create(n[e]);t[e]=this.vertexMapper[a]}}this.visit(function(e,t,n,a,i){if(0==i&&t.maxRank<0&&t.minRank<0&&(o[t.temp[0]].push(t),t.maxRank=t.temp[0],t.minRank=t.temp[0],t.temp[0]=o[t.maxRank].length-1),null!=e&&null!=n&&1<e.maxRank-t.maxRank)for(n.maxRank=e.maxRank,n.minRank=t.maxRank,n.temp=[],n.x=[],n.y=[],e=n.minRank+1;e<n.maxRank;e++)o[e].push(n),n.setGeneralPurposeVariable(e,o[e].length-1)},t,!1,null)},mxGraphHierarchyModel.prototype.visit=function(e,t,n,a){if(null!=t){for(var i=0;i<t.length;i++){var o=t[i];null!=o&&(null==a&&(a={}),n?(o.hashCode=[],o.hashCode[0]=this.dfsCount,o.hashCode[1]=i,this.extendedDfs(null,o,null,e,a,o.hashCode,i,0)):this.dfs(null,o,null,e,a,0))}this.dfsCount++}},mxGraphHierarchyModel.prototype.dfs=function(e,t,n,a,i,o){if(null!=t){var s=mxCellPath.create(t.cell);if(null==i[s])for(a(e,i[s]=t,n,o,0),e=t.connectsAsSource.slice(),n=0;n<e.length;n++)s=e[n],this.dfs(t,s.target,s,a,i,o+1);else a(e,t,n,o,1)}},mxGraphHierarchyModel.prototype.extendedDfs=function(e,t,n,a,i,o,s,r){if(null!=t)if(null==e||null!=t.hashCode&&t.hashCode[0]==e.hashCode[0]||(o=e.hashCode.length+1,t.hashCode=e.hashCode.slice(),t.hashCode[o-1]=s),null==i[s=mxCellPath.create(t.cell)])for(a(e,i[s]=t,n,r,0),e=t.connectsAsSource.slice(),n=0;n<e.length;n++)s=e[n],this.extendedDfs(t,s.target,s,a,i,t.hashCode,n,r+1);else a(e,t,n,r,1)},mxHierarchicalLayoutStage.prototype.execute=function(e){},mxMedianHybridCrossingReduction.prototype=new mxHierarchicalLayoutStage,mxMedianHybridCrossingReduction.prototype.constructor=mxMedianHybridCrossingReduction,mxMedianHybridCrossingReduction.prototype.layout=null,mxMedianHybridCrossingReduction.prototype.maxIterations=24,mxMedianHybridCrossingReduction.prototype.nestedBestRanks=null,mxMedianHybridCrossingReduction.prototype.currentBestCrossings=0,mxMedianHybridCrossingReduction.prototype.iterationsWithoutImprovement=0,mxMedianHybridCrossingReduction.prototype.maxNoImprovementIterations=2,mxMedianHybridCrossingReduction.prototype.execute=function(e){e=this.layout.getModel(),this.nestedBestRanks=[];for(var t=0;t<e.ranks.length;t++)this.nestedBestRanks[t]=e.ranks[t].slice();var n=0,a=this.calculateCrossings(e);for(t=0;t<this.maxIterations&&n<this.maxNoImprovementIterations;t++){this.weightedMedian(t,e),this.transpose(t,e);var i=this.calculateCrossings(e);if(i<a)for(a=i,i=n=0;i<this.nestedBestRanks.length;i++)for(var o=e.ranks[i],s=0;s<o.length;s++){var r=o[s];this.nestedBestRanks[i][r.getGeneralPurposeVariable(i)]=r}else for(n++,i=0;i<this.nestedBestRanks.length;i++)for(o=e.ranks[i],s=0;s<o.length;s++)(r=o[s]).setGeneralPurposeVariable(i,s);if(0==a)break}for(n=[],a=[],t=0;t<e.maxRank+1;t++)a[t]=[],n[t]=a[t];for(t=0;t<this.nestedBestRanks.length;t++)for(i=0;i<this.nestedBestRanks[t].length;i++)a[t].push(this.nestedBestRanks[t][i]);e.ranks=n},mxMedianHybridCrossingReduction.prototype.calculateCrossings=function(e){for(var t=e.ranks.length,n=0,a=1;a<t;a++)n+=this.calculateRankCrossing(a,e);return n},mxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(e,t){for(var n=0,a=t.ranks[e],i=a.length,o=t.ranks[e-1].length,s=[],r=0;r<i;r++)s[r]=[];for(r=0;r<a.length;r++)for(var l=(c=a[r]).getGeneralPurposeVariable(e),d=c.getPreviousLayerConnectedCells(e),c=0;c<d.length;c++){var m=d[c].getGeneralPurposeVariable(e-1);s[l][m]=201207}for(r=0;r<i;r++)for(c=0;c<o;c++)if(201207==s[r][c]){for(a=r+1;a<i;a++)for(l=0;l<c;l++)201207==s[a][l]&&n++;for(a=0;a<r;a++)for(l=c+1;l<o;l++)201207==s[a][l]&&n++}return n/2},mxMedianHybridCrossingReduction.prototype.transpose=function(e,t){for(var n=!0,a=0;n&&a++<10;)for(var i=1==e%2&&1==a%2,o=(n=!1,0);o<t.ranks.length;o++){for(var s=t.ranks[o],r=[],l=0;l<s.length;l++){(f=(b=s[l]).getGeneralPurposeVariable(o))<0&&(f=l),r[f]=b}var d=f=b=null,c=null,m=null,u=null,p=null,g=null,v=null,h=null;for(l=0;l<s.length-1;l++){if(0==l){for(var b=(v=r[l]).getNextLayerConnectedCells(o),f=v.getPreviousLayerConnectedCells(o),A=(m=[],u=[],0);A<b.length;A++)m[A]=b[A].getGeneralPurposeVariable(o+1);for(A=0;A<f.length;A++)u[A]=f[A].getGeneralPurposeVariable(o-1)}else b=d,f=c,m=p,u=g,v=h;for(d=(h=r[l+1]).getNextLayerConnectedCells(o),c=h.getPreviousLayerConnectedCells(o),p=[],g=[],A=0;A<d.length;A++)p[A]=d[A].getGeneralPurposeVariable(o+1);for(A=0;A<c.length;A++)g[A]=c[A].getGeneralPurposeVariable(o-1);var E=0,y=0;for(A=0;A<m.length;A++)for(var S=0;S<p.length;S++)m[A]>p[S]&&E++,m[A]<p[S]&&y++;for(A=0;A<u.length;A++)for(S=0;S<g.length;S++)u[A]>g[S]&&E++,u[A]<g[S]&&y++;(y<E||y==E&&i)&&(d=v.getGeneralPurposeVariable(o),v.setGeneralPurposeVariable(o,h.getGeneralPurposeVariable(o)),h.setGeneralPurposeVariable(o,d),d=b,c=f,p=m,g=u,h=v,i||(n=!0))}}},mxMedianHybridCrossingReduction.prototype.weightedMedian=function(e,t){var n=0==e%2;if(n)for(var a=t.maxRank-1;0<=a;a--)this.medianRank(a,n);else for(a=1;a<t.maxRank;a++)this.medianRank(a,n)},mxMedianHybridCrossingReduction.prototype.medianRank=function(e,t){for(var n=this.nestedBestRanks[e].length,a=[],i=[],o=0;o<n;o++){var s,r,l=this.nestedBestRanks[e][o],d=new MedianCellSorter;d.cell=l,r=t?e+1:e-1,null!=(s=t?l.getNextLayerConnectedCells(e):l.getPreviousLayerConnectedCells(e))&&0!=s.length?(d.medianValue=this.medianValue(s,r),a.push(d)):i[l.getGeneralPurposeVariable(e)]=!0}for(a.sort(MedianCellSorter.prototype.compare),o=0;o<n;o++)null==i[o]&&(l=a.shift().cell).setGeneralPurposeVariable(e,o)},mxMedianHybridCrossingReduction.prototype.medianValue=function(e,t){for(var n=[],a=0,i=0;i<e.length;i++){var o=e[i];n[a++]=o.getGeneralPurposeVariable(t)}return n.sort(function(e,t){return e-t}),1==a%2?n[Math.floor(a/2)]:2==a?(n[0]+n[1])/2:(o=n[(i=a/2)-1]-n[0],a=n[a-1]-n[i],(n[i-1]*a+n[i]*o)/(o+a))},MedianCellSorter.prototype.medianValue=0,MedianCellSorter.prototype.cell=!1,MedianCellSorter.prototype.compare=function(e,t){return null!=e&&null!=t?t.medianValue>e.medianValue?-1:t.medianValue<e.medianValue?1:0:0},mxMinimumCycleRemover.prototype=new mxHierarchicalLayoutStage,mxMinimumCycleRemover.prototype.constructor=mxMinimumCycleRemover,mxMinimumCycleRemover.prototype.layout=null,mxMinimumCycleRemover.prototype.execute=function(e){var t=this.layout.getModel(),o={},s=mxUtils.clone(t.vertexMapper,null,!0),n=null;if(null!=t.roots){var a=t.roots;n=[];for(e=0;e<a.length;e++){var i=mxCellPath.create(a[e]);n[e]=t.vertexMapper[i]}}if(t.visit(function(e,t,n,a,i){t.isAncestor(e)&&(n.invert(),mxUtils.remove(n,e.connectsAsSource),e.connectsAsTarget.push(n),mxUtils.remove(n,t.connectsAsTarget),t.connectsAsSource.push(n)),e=mxCellPath.create(t.cell),o[e]=t,delete s[e]},n,!0,null),n=null,0<s.lenth&&(n=mxUtils.clone(s,null,!0)),e=mxUtils.clone(o,null,!0),t.visit(function(e,t,n,a,i){t.isAncestor(e)&&(n.invert(),mxUtils.remove(n,e.connectsAsSource),t.connectsAsSource.push(n),e.connectsAsTarget.push(n),mxUtils.remove(n,t.connectsAsTarget)),e=mxCellPath.create(t.cell),o[e]=t,delete s[e]},s,!0,e),a=this.layout.getGraph(),null!=n&&0<n.length)for(t=t.roots,e=0;e<n.length;e++)i=n[e].cell,0==a.getIncomingEdges(i).length&&t.push(i)};var mxHierarchicalEdgeStyle={ORTHOGONAL:1,POLYLINE:2,STRAIGHT:3,CURVE:4};function WeightedCellSorter(e,t){this.cell=e,this.weightedValue=t}function mxHierarchicalLayout(e,t,n){mxGraphLayout.call(this,e),this.orientation=null!=t?t:mxConstants.DIRECTION_NORTH,this.deterministic=null==n||n}function mxGraphModel(e){this.currentEdit=this.createUndoableEdit(),null!=e?this.setRoot(e):this.clear()}function mxRootChange(e,t){this.model=e,this.previous=this.root=t}function mxChildChange(e,t,n,a){this.model=e,this.previous=this.parent=t,this.child=n,this.previousIndex=this.index=a}function mxTerminalChange(e,t,n,a){this.model=e,this.cell=t,this.previous=this.terminal=n,this.source=a}function mxValueChange(e,t,n){this.model=e,this.cell=t,this.previous=this.value=n}function mxStyleChange(e,t,n){this.model=e,this.cell=t,this.previous=this.style=n}function mxGeometryChange(e,t,n){this.model=e,this.cell=t,this.previous=this.geometry=n}function mxCollapseChange(e,t,n){this.model=e,this.cell=t,this.previous=this.collapsed=n}function mxVisibleChange(e,t,n){this.model=e,this.cell=t,this.previous=this.visible=n}function mxCellAttributeChange(e,t,n){this.cell=e,this.attribute=t,this.previous=this.value=n}function mxCell(e,t,n){this.value=e,this.setGeometry(t),this.setStyle(n),null!=this.onInit&&this.onInit()}function mxGeometry(e,t,n,a){mxRectangle.call(this,e,t,n,a)}mxCoordinateAssignment.prototype=new mxHierarchicalLayoutStage,mxCoordinateAssignment.prototype.constructor=mxCoordinateAssignment,mxCoordinateAssignment.prototype.layout=null,mxCoordinateAssignment.prototype.intraCellSpacing=30,mxCoordinateAssignment.prototype.interRankCellSpacing=100,mxCoordinateAssignment.prototype.parallelEdgeSpacing=10,mxCoordinateAssignment.prototype.maxIterations=8,mxCoordinateAssignment.prototype.prefHozEdgeSep=5,mxCoordinateAssignment.prototype.prefVertEdgeOff=2,mxCoordinateAssignment.prototype.minEdgeJetty=12,mxCoordinateAssignment.prototype.channelBuffer=4,mxCoordinateAssignment.prototype.jettyPositions=null,mxCoordinateAssignment.prototype.orientation=mxConstants.DIRECTION_NORTH,mxCoordinateAssignment.prototype.initialX=null,mxCoordinateAssignment.prototype.limitX=null,mxCoordinateAssignment.prototype.currentXDelta=null,mxCoordinateAssignment.prototype.widestRank=null,mxCoordinateAssignment.prototype.rankTopY=null,mxCoordinateAssignment.prototype.rankBottomY=null,mxCoordinateAssignment.prototype.widestRankValue=null,mxCoordinateAssignment.prototype.rankWidths=null,mxCoordinateAssignment.prototype.rankY=null,mxCoordinateAssignment.prototype.fineTuning=!0,mxCoordinateAssignment.prototype.edgeStyle=mxHierarchicalEdgeStyle.POLYLINE,mxCoordinateAssignment.prototype.nextLayerConnectedCache=null,mxCoordinateAssignment.prototype.previousLayerConnectedCache=null,mxCoordinateAssignment.prototype.groupPadding=10,mxCoordinateAssignment.prototype.printStatus=function(){var e=this.layout.getModel();mxLog.show(),mxLog.writeln("======Coord assignment debug=======");for(var t=0;t<e.ranks.length;t++){mxLog.write("Rank ",t," : ");for(var n=e.ranks[t],a=0;a<n.length;a++)mxLog.write(n[a].getGeneralPurposeVariable(t),"  ");mxLog.writeln()}mxLog.writeln("====================================")},mxCoordinateAssignment.prototype.execute=function(e){this.jettyPositions=[],e=this.layout.getModel(),this.currentXDelta=0,this.initialCoords(this.layout.getGraph(),e),this.fineTuning&&this.minNode(e);var t=1e8;if(this.fineTuning)for(var n=0;n<this.maxIterations;n++){if(0!=n&&(this.medianPos(n,e),this.minNode(e)),this.currentXDelta<t){for(var a=0;a<e.ranks.length;a++)for(var i=e.ranks[a],o=0;o<i.length;o++){var s=i[o];s.setX(a,s.getGeneralPurposeVariable(a))}t=this.currentXDelta}else for(a=0;a<e.ranks.length;a++)for(i=e.ranks[a],o=0;o<i.length;o++)(s=i[o]).setGeneralPurposeVariable(a,s.getX(a));this.minPath(this.layout.getGraph(),e),this.currentXDelta=0}this.setCellLocations(this.layout.getGraph(),e)},mxCoordinateAssignment.prototype.minNode=function(e){for(var t=[],n=[],a=[],i=0;i<=e.maxRank;i++){a[i]=e.ranks[i];for(var o=0;o<a[i].length;o++){var s=a[i][o];(r=new WeightedCellSorter(s,i)).rankIndex=o,r.visited=!0,t.push(r),n[s=mxCellPath.create(s.getCoreCell())]=r}}for(e=10*t.length,o=0;0<t.length&&o<=e;){i=(r=t.shift()).cell;var r,l=r.weightedValue,d=parseInt(r.rankIndex),c=(s=i.getNextLayerConnectedCells(l),i.getPreviousLayerConnectedCells(l)),m=s.length,u=c.length,p=this.medianXValue(s,l+1),g=this.medianXValue(c,l-1),v=m+u,h=i.getGeneralPurposeVariable(l),b=h;if(0<v&&(b=(p*m+g*u)/v),m=!1,b<h-1?0==d?(i.setGeneralPurposeVariable(l,b),m=!0):(h=(h=(d=a[l][d-1]).getGeneralPurposeVariable(l))+d.width/2+this.intraCellSpacing+i.width/2)<b?(i.setGeneralPurposeVariable(l,b),m=!0):h<i.getGeneralPurposeVariable(l)-1&&(i.setGeneralPurposeVariable(l,h),m=!0):h+1<b&&(d==a[l].length-1?(i.setGeneralPurposeVariable(l,b),m=!0):b<(h=(h=(d=a[l][d+1]).getGeneralPurposeVariable(l))-d.width/2-this.intraCellSpacing-i.width/2)?(i.setGeneralPurposeVariable(l,b),m=!0):h>i.getGeneralPurposeVariable(l)+1&&(i.setGeneralPurposeVariable(l,h),m=!0)),m){for(i=0;i<s.length;i++)l=s[i],null!=(l=n[l=mxCellPath.create(l.getCoreCell())])&&0==l.visited&&(l.visited=!0,t.push(l));for(i=0;i<c.length;i++)l=c[i],null!=(l=n[l=mxCellPath.create(l.getCoreCell())])&&0==l.visited&&(l.visited=!0,t.push(l))}r.visited=!1,o++}},mxCoordinateAssignment.prototype.medianPos=function(e,t){if(0==e%2)for(var n=t.maxRank;0<n;n--)this.rankMedianPosition(n-1,t,n);else for(n=0;n<t.maxRank-1;n++)this.rankMedianPosition(n+1,t,n)},mxCoordinateAssignment.prototype.rankMedianPosition=function(e,t,n){t=t.ranks[e];for(var a=[],i=[],o=0;o<t.length;o++){var s=t[o];a[o]=new WeightedCellSorter,a[o].cell=s,a[o].rankIndex=o;var r=mxCellPath.create(s.getCoreCell());i[r]=a[o];var l=null;l=n<e?s.getPreviousLayerConnectedCells(e):s.getNextLayerConnectedCells(e);a[o].weightedValue=this.calculatedWeightedValue(s,l)}for(a.sort(WeightedCellSorter.prototype.compare),o=0;o<a.length;o++){r=0,s=a[o].cell,r=0,null!=(l=n<e?s.getPreviousLayerConnectedCells(e).slice():s.getNextLayerConnectedCells(e).slice())&&(r=0<(r=l.length)?this.medianXValue(l,n):s.getGeneralPurposeVariable(e));for(var d=0,c=(l=-1e8,a[o].rankIndex-1);0<=c;){var m;if(null!=(m=i[m=mxCellPath.create(t[c].getCoreCell())])){var u=m.cell;m.visited?(l=u.getGeneralPurposeVariable(e)+u.width/2+this.intraCellSpacing+d+s.width/2,c=-1):(d+=u.width+this.intraCellSpacing,c--)}}for(d=0,u=1e8,c=a[o].rankIndex+1;c<a.length;)if(null!=(m=i[m=mxCellPath.create(t[c].getCoreCell())])){var p=m.cell;m.visited?(u=p.getGeneralPurposeVariable(e)-p.width/2-this.intraCellSpacing-d-s.width/2,c=a.length):(d+=p.width+this.intraCellSpacing,c++)}l<=r&&r<=u?s.setGeneralPurposeVariable(e,r):r<l?(s.setGeneralPurposeVariable(e,l),this.currentXDelta+=l-r):u<r&&(s.setGeneralPurposeVariable(e,u),this.currentXDelta+=r-u),a[o].visited=!0}},mxCoordinateAssignment.prototype.calculatedWeightedValue=function(e,t){for(var n=0,a=0;a<t.length;a++){var i=t[a];e.isVertex()&&i.isVertex()?n++:n=e.isEdge()&&i.isEdge()?n+8:n+2}return n},mxCoordinateAssignment.prototype.medianXValue=function(e,t){if(0==e.length)return 0;for(var n=[],a=0;a<e.length;a++)n[a]=e[a].getGeneralPurposeVariable(t);return n.sort(function(e,t){return e-t}),1==e.length%2?n[Math.floor(e.length/2)]:(n[(a=e.length/2)-1]+n[a])/2},mxCoordinateAssignment.prototype.initialCoords=function(e,t){this.calculateWidestRank(e,t);for(var n=this.widestRank;0<=n;n--)n<t.maxRank&&this.rankCoordinates(n,e,t);for(n=this.widestRank+1;n<=t.maxRank;n++)0<n&&this.rankCoordinates(n,e,t)},mxCoordinateAssignment.prototype.rankCoordinates=function(e,t,n){t=n.ranks[e],n=0;for(var a=this.initialX+(this.widestRankValue-this.rankWidths[e])/2,i=!1,o=0;o<t.length;o++){var s=t[o];if(s.isVertex()){var r=this.layout.getVertexBounds(s.cell);null!=r?this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(s.width=r.width,s.height=r.height):(s.width=r.height,s.height=r.width):i=!0,n=Math.max(n,s.height)}else s.isEdge()&&(r=1,null!=s.edges?r=s.edges.length:mxLog.warn("edge.edges is null"),s.width=(r-1)*this.parallelEdgeSpacing);a+=s.width/2,s.setX(e,a),s.setGeneralPurposeVariable(e,a),a+=s.width/2,a+=this.intraCellSpacing}1==i&&mxLog.warn("At least one cell has no bounds")},mxCoordinateAssignment.prototype.calculateWidestRank=function(e,t){var n=-this.interRankCellSpacing,a=0;this.rankWidths=[],this.rankY=[];for(var i=t.maxRank;0<=i;i--){for(var o=0,s=t.ranks[i],r=this.initialX,l=!1,d=0;d<s.length;d++){var c=s[d];if(c.isVertex()){var m=this.layout.getVertexBounds(c.cell);null!=m?this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(c.width=m.width,c.height=m.height):(c.width=m.height,c.height=m.width):l=!0,o=Math.max(o,c.height)}else c.isEdge()&&(m=1,null!=c.edges?m=c.edges.length:mxLog.warn("edge.edges is null"),c.width=(m-1)*this.parallelEdgeSpacing);r+=c.width/2,c.setX(i,r),c.setGeneralPurposeVariable(i,r),r+=c.width/2,(r+=this.intraCellSpacing)>this.widestRankValue&&(this.widestRankValue=r,this.widestRank=i),this.rankWidths[i]=r}for(1==l&&mxLog.warn("At least one cell has no bounds"),this.rankY[i]=n,r=o/2+a/2+this.interRankCellSpacing,a=o,n=this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_WEST?n+r:n-r,d=0;d<s.length;d++)s[d].setY(i,n)}},mxCoordinateAssignment.prototype.minPath=function(e,t){var n,a=t.edgeMapper;for(n in a){var i=a[n];if(!(i.maxRank-i.minRank-1<1)){for(var o=i.getGeneralPurposeVariable(i.minRank+1),s=!0,r=0,l=i.minRank+2;l<i.maxRank;l++){o!=(d=i.getGeneralPurposeVariable(l))?(s=!1,o=d):r++}if(!s){s=o=0;var d=[],c=[],m=i.getGeneralPurposeVariable(i.minRank+1);for(l=i.minRank+1;l<i.maxRank-1;l++){var u=i.getX(l+1);m==u?(d[l-i.minRank-1]=m,o++):this.repositionValid(t,i,l+1,m)?(d[l-i.minRank-1]=m,o++):m=d[l-i.minRank-1]=u}for(m=i.getX(l),l=i.maxRank-1;l>i.minRank+1;l--)m==(u=i.getX(l-1))?(c[l-i.minRank-2]=m,s++):this.repositionValid(t,i,l-1,m)?(c[l-i.minRank-2]=m,s++):(c[l-i.minRank-2]=i.getX(l-1),m=u);if(r<s||r<o)if(o<=s)for(l=i.maxRank-2;l>i.minRank;l--)i.setX(l,c[l-i.minRank-1]);else if(s<o)for(l=i.minRank+2;l<i.maxRank;l++)i.setX(l,d[l-i.minRank-2])}}}},mxCoordinateAssignment.prototype.repositionValid=function(e,t,n,a){e=e.ranks[n];for(var i=-1,o=0;o<e.length;o++)if(t==e[o]){i=o;break}if(i<0)return!1;if(a<(o=t.getGeneralPurposeVariable(n))){if(0==i)return!0;if(!((n=(n=(e=e[i-1]).getGeneralPurposeVariable(n))+e.width/2+this.intraCellSpacing+t.width/2)<=a))return!1}else if(o<a){if(i==e.length-1)return!0;if(!(a<=(n=(n=(e=e[i+1]).getGeneralPurposeVariable(n))-e.width/2-this.intraCellSpacing-t.width/2)))return!1}return!0},mxCoordinateAssignment.prototype.setCellLocations=function(e,t){this.rankTopY=[],this.rankBottomY=[];for(var n=0;n<t.ranks.length;n++)this.rankTopY[n]=Number.MAX_VALUE,this.rankBottomY[n]=0;n=null,this.layout.resizeParent&&(n={});var a,i=t.edgeMapper,o=t.vertexMapper;for(a in o){var s=o[a];if(this.setVertexLocation(s),this.layout.resizeParent){s=e.model.getParent(s.cell);var r=mxCellPath.create(s);null==n[r]&&(n[r]=s)}}for(a in this.layout.resizeParent&&null!=n&&this.adjustParents(n),(this.edgeStyle==mxHierarchicalEdgeStyle.ORTHOGONAL||this.edgeStyle==mxHierarchicalEdgeStyle.POLYLINE||this.edgeStyle==mxHierarchicalEdgeStyle.CURVE)&&this.localEdgeProcessing(t),i)this.setEdgePosition(i[a])},mxCoordinateAssignment.prototype.adjustParents=function(e){var t,n=[];for(t in e)n.push(e[t]);this.layout.arrangeGroups(mxUtils.sortCells(n,!0),this.groupPadding)},mxCoordinateAssignment.prototype.localEdgeProcessing=function(e){for(var t=0;t<e.ranks.length;t++)for(var n=e.ranks[t],a=0;a<n.length;a++){var i=n[a];if(i.isVertex())for(var o=i.getPreviousLayerConnectedCells(t),s=t-1,r=0;r<2;r++){if(-1<s&&s<e.ranks.length&&null!=o&&0<o.length){for(var l=[],d=0;d<o.length;d++){var c=new WeightedCellSorter(o[d],o[d].getX(s));l.push(c)}l.sort(WeightedCellSorter.prototype.compare);var m=(c=i.x[0]-i.width/2)+i.width,u=o=0;for(s=[],d=0;d<l.length;d++){var p,g=l[d].cell;if(g.isVertex()){p=0==r?i.connectsAsSource:i.connectsAsTarget;for(var v=0;v<p.length;v++)p[v].source!=g&&p[v].target!=g||(o+=p[v].edges.length,u++,s.push(p[v]))}else o+=g.edges.length,u++,s.push(g)}for(i.width>(o+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(c+=this.prefHozEdgeSep,m-=this.prefHozEdgeSep),c+=(l=(m-c)/o)/2,m=this.minEdgeJetty-this.prefVertEdgeOff,d=u=0;d<s.length;d++){for(g=s[d].edges.length,v=mxCellPath.create(s[d].edges[0]),null==(p=this.jettyPositions[v])&&(p=[],this.jettyPositions[v]=p),d<o/2?m+=this.prefVertEdgeOff:o/2<d&&(m-=this.prefVertEdgeOff),v=0;v<g;v++)p[4*v+2*r]=c,c+=l,p[4*v+2*r+1]=m;u=Math.max(u,m)}}o=i.getNextLayerConnectedCells(t),s=t+1}}},mxCoordinateAssignment.prototype.setEdgePosition=function(e){var t=0;if(101207!=e.temp[0]){var n=e.maxRank,a=e.minRank;n==a&&(n=e.source.maxRank,a=e.target.minRank);for(var i=0,o=mxCellPath.create(e.edges[0]),s=(o=this.jettyPositions[o],e.isReversed?e.target.cell:e.source.cell),r=this.layout.graph,l=0;l<e.edges.length;l++){var d=e.edges[l],c=this.layout.getVisibleTerminal(d,!0),m=r.model.getTerminal(d,!0),u=[],p=e.isReversed;if(c!=s&&(p=!p),null!=o){var g=p?2:0,v=p?this.rankTopY[a]:this.rankBottomY[n],h=o[4*i+1+g];p&&(h=-h),v+=h,g=o[4*i+g],m=r.model.getTerminal(d,!0),this.layout.isPort(m)&&r.model.getParent(m)==c&&(g=null!=(g=r.view.getState(m))?g.x:c.geometry.x+e.source.width*m.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(u.push(new mxPoint(g,v)),this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&u.push(new mxPoint(g,v+h))):(u.push(new mxPoint(v,g)),this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&u.push(new mxPoint(v+h,g)))}for(g=e.x.length-1,v=h=-1,c=e.maxRank-1,p&&(g=0,h=e.x.length,v=1,c=e.minRank+1);e.maxRank!=e.minRank&&g!=h;g+=v){m=e.x[g]+t;var b=(this.rankTopY[c]+this.rankBottomY[c+1])/2,f=(this.rankTopY[c-1]+this.rankBottomY[c])/2;if(p){var A=b;b=f,f=A}this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(u.push(new mxPoint(m,b)),u.push(new mxPoint(m,f))):(u.push(new mxPoint(b,m)),u.push(new mxPoint(f,m))),this.limitX=Math.max(this.limitX,m),c+=v}null!=o&&(g=p?2:0,v=p?this.rankBottomY[n]:this.rankTopY[a],h=o[4*i+3-g],p&&(h=-h),v-=h,g=o[4*i+2-g],p=r.model.getTerminal(d,!1),c=this.layout.getVisibleTerminal(d,!1),this.layout.isPort(p)&&r.model.getParent(p)==c&&(g=null!=(g=r.view.getState(p))?g.x:c.geometry.x+e.target.width*p.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&u.push(new mxPoint(g,v-h)),u.push(new mxPoint(g,v))):(this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&u.push(new mxPoint(v-h,g)),u.push(new mxPoint(v,g)))),e.isReversed&&this.processReversedEdge(e,d),this.layout.setEdgePoints(d,u),t=0==t?this.parallelEdgeSpacing:0<t?-t:-t+this.parallelEdgeSpacing,i++}e.temp[0]=101207}},mxCoordinateAssignment.prototype.setVertexLocation=function(e){var t=e.cell,n=e.x[0]-e.width/2,a=e.y[0]-e.height/2;this.rankTopY[e.minRank]=Math.min(this.rankTopY[e.minRank],a),this.rankBottomY[e.minRank]=Math.max(this.rankBottomY[e.minRank],a+e.height),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?this.layout.setVertexLocation(t,n,a):this.layout.setVertexLocation(t,a,n),this.limitX=Math.max(this.limitX,n+e.width)},mxCoordinateAssignment.prototype.processReversedEdge=function(e,t){},WeightedCellSorter.prototype.weightedValue=0,WeightedCellSorter.prototype.nudge=!1,WeightedCellSorter.prototype.visited=!1,WeightedCellSorter.prototype.rankIndex=null,WeightedCellSorter.prototype.cell=null,WeightedCellSorter.prototype.compare=function(e,t){return null!=e&&null!=t?t.weightedValue>e.weightedValue?-1:t.weightedValue<e.weightedValue?1:t.nudge?-1:1:0},mxHierarchicalLayout.prototype=new mxGraphLayout,mxHierarchicalLayout.prototype.constructor=mxHierarchicalLayout,mxHierarchicalLayout.prototype.roots=null,mxHierarchicalLayout.prototype.resizeParent=!1,mxHierarchicalLayout.prototype.moveParent=!1,mxHierarchicalLayout.prototype.parentBorder=0,mxHierarchicalLayout.prototype.intraCellSpacing=30,mxHierarchicalLayout.prototype.interRankCellSpacing=100,mxHierarchicalLayout.prototype.interHierarchySpacing=60,mxHierarchicalLayout.prototype.parallelEdgeSpacing=10,mxHierarchicalLayout.prototype.orientation=mxConstants.DIRECTION_NORTH,mxHierarchicalLayout.prototype.fineTuning=!0,mxHierarchicalLayout.prototype.tightenToSource=!0,mxHierarchicalLayout.prototype.disableEdgeStyle=!0,mxHierarchicalLayout.prototype.traverseAncestors=!0,mxHierarchicalLayout.prototype.model=null,mxHierarchicalLayout.prototype.edgesCache=null,mxHierarchicalLayout.prototype.getModel=function(){return this.model},mxHierarchicalLayout.prototype.execute=function(e,t){this.parent=e;var n=this.graph.model;if(this.edgesCache={},null!=t||null!=e){if(null!=t&&null!=e){for(var a=[],i=0;i<t.length;i++)n.isAncestor(e,t[i])&&a.push(t[i]);this.roots=a}else this.roots=t;n.beginUpdate();try{this.run(e),this.resizeParent&&!this.graph.isCellCollapsed(e)&&this.graph.updateGroupBounds([e],this.parentBorder,this.moveParent)}finally{n.endUpdate()}}},mxHierarchicalLayout.prototype.findRoots=function(e,t){var n=[];if(null!=e&&null!=t){var a,i=this.graph.model,o=null,s=-1e5;for(a in t){var r=t[a];if(i.isVertex(r)&&this.graph.isCellVisible(r)){for(var l=this.getEdges(r),d=0,c=0,m=0;m<l.length;m++)this.getVisibleTerminal(l[m],!0)==r?d++:c++;0==c&&0<d&&n.push(r),s<(l=d-c)&&(s=l,o=r)}}0==n.length&&null!=o&&n.push(o)}return n},mxHierarchicalLayout.prototype.getEdges=function(e){var t=mxCellPath.create(e);if(null!=this.edgesCache[t])return this.edgesCache[t];for(var n=this.graph.model,a=[],i=this.graph.isCellCollapsed(e),o=n.getChildCount(e),s=0;s<o;s++){var r=n.getChildAt(e,s);this.isPort(r)?a=a.concat(n.getEdges(r,!0,!0)):!i&&this.graph.isCellVisible(r)||(a=a.concat(n.getEdges(r,!0,!0)))}for(a=a.concat(n.getEdges(e,!0,!0)),n=[],s=0;s<a.length;s++)((i=this.getVisibleTerminal(a[s],!0))==(o=this.getVisibleTerminal(a[s],!1))||i!=o&&(o==e&&(null==this.parent||this.graph.isValidAncestor(i,this.parent,this.traverseAncestors))||i==e&&(null==this.parent||this.graph.isValidAncestor(o,this.parent,this.traverseAncestors))))&&n.push(a[s]);return this.edgesCache[t]=n},mxHierarchicalLayout.prototype.getVisibleTerminal=function(e,t){var n=null!=(n=this.graph.view.getState(e))?n.getVisibleTerminal(t):this.graph.view.getVisibleTerminal(e,t);return this.isPort(n)&&(n=this.graph.model.getParent(n)),n},mxHierarchicalLayout.prototype.run=function(e){var t=[],n=[];if(null==this.roots&&null!=e){var a={};this.filterDescendants(e,a),this.roots=[];var i,o=!0;for(i in a)if(null!=a[i]){o=!1;break}for(;!o;){var s=this.findRoots(e,a);for(o=0;o<s.length;o++){var r=[];t.push(r),this.traverse(s[o],!0,null,n,r,t,a)}for(o=0;o<s.length;o++)this.roots.push(s[o]);for(i in o=!0,a)if(null!=a[i]){o=!1;break}}}else for(o=0;o<roots.length;o++)r=[],t.push(r),traverse(roots.get(o),!0,null,n,r,t,null);for(o=n=0;o<t.length;o++){for(i in a=[],r=t[o])a.push(r[i]);this.model=new mxGraphHierarchyModel(this,a,this.roots,e,this.tightenToSource),this.cycleStage(e),this.layeringStage(),this.crossingStage(e),n=this.placementStage(n,e)}},mxHierarchicalLayout.prototype.filterDescendants=function(e,t){var n=this.graph.model;if(n.isVertex(e)&&e!=this.parent&&this.graph.isCellVisible(e)&&(t[mxCellPath.create(e)]=e),this.traverseAncestors||e==this.parent&&this.graph.isCellVisible(e))for(var a=n.getChildCount(e),i=0;i<a;i++){var o=n.getChildAt(e,i);this.isPort(o)||this.filterDescendants(o,t)}},mxHierarchicalLayout.prototype.isPort=function(e){return!!e.geometry.relative},mxHierarchicalLayout.prototype.getEdgesBetween=function(e,t,n){n=null!=n&&n;for(var a=this.getEdges(e),i=[],o=0;o<a.length;o++){var s=this.getVisibleTerminal(a[o],!0),r=this.getVisibleTerminal(a[o],!1);(s==e&&r==t||!n&&s==t&&r==e)&&i.push(a[o])}return i},mxHierarchicalLayout.prototype.traverse=function(e,t,n,a,i,o,s){if(null!=e&&null!=a){var r=mxCellPath.create(e);if(null!=a[r]||null!=s&&null==s[r]){if(null==i[r])for(n=0;n<o.length;n++)if(null!=(e=o[n])[r]){for(l in i)e[l]=i[l];return o.pop(),e}}else{null==i[r]&&(i[r]=e),null==a[r]&&(a[r]=e),delete s[r];var l=this.getEdges(e);for(n=0;n<l.length;n++)r=this.getVisibleTerminal(l[n],!0)==e,(!t||r)&&(r=this.getVisibleTerminal(l[n],!r),i=this.traverse(r,t,l[n],a,i,o,s))}}return i},mxHierarchicalLayout.prototype.cycleStage=function(e){new mxMinimumCycleRemover(this).execute(e)},mxHierarchicalLayout.prototype.layeringStage=function(){this.model.initialRank(),this.model.fixRanks()},mxHierarchicalLayout.prototype.crossingStage=function(e){new mxMedianHybridCrossingReduction(this).execute(e)},mxHierarchicalLayout.prototype.placementStage=function(e,t){var n=new mxCoordinateAssignment(this,this.intraCellSpacing,this.interRankCellSpacing,this.orientation,e,this.parallelEdgeSpacing);return n.fineTuning=this.fineTuning,n.execute(t),n.limitX+this.interHierarchySpacing},mxGraphModel.prototype=new mxEventSource,mxGraphModel.prototype.constructor=mxGraphModel,mxGraphModel.prototype.root=null,mxGraphModel.prototype.cells=null,mxGraphModel.prototype.maintainEdgeParent=!0,mxGraphModel.prototype.createIds=!0,mxGraphModel.prototype.prefix="",mxGraphModel.prototype.postfix="",mxGraphModel.prototype.nextId=0,mxGraphModel.prototype.currentEdit=null,mxGraphModel.prototype.updateLevel=0,mxGraphModel.prototype.endingUpdate=!1,mxGraphModel.prototype.clear=function(){this.setRoot(this.createRoot())},mxGraphModel.prototype.isCreateIds=function(){return this.createIds},mxGraphModel.prototype.setCreateIds=function(e){this.createIds=e},mxGraphModel.prototype.createRoot=function(){var e=new mxCell;return e.insert(new mxCell),e},mxGraphModel.prototype.getCell=function(e){return null!=this.cells?this.cells[e]:null},mxGraphModel.prototype.filterCells=function(e,t){var n=null;if(null!=e){n=[];for(var a=0;a<e.length;a++)t(e[a])&&n.push(e[a])}return n},mxGraphModel.prototype.getDescendants=function(e){return this.filterDescendants(null,e)},mxGraphModel.prototype.filterDescendants=function(e,t){var n=[];t=t||this.getRoot(),(null==e||e(t))&&n.push(t);for(var a=this.getChildCount(t),i=0;i<a;i++){var o=this.getChildAt(t,i);n=n.concat(this.filterDescendants(e,o))}return n},mxGraphModel.prototype.getRoot=function(e){var t=e||this.root;if(null!=e)for(;null!=e;)t=e,e=this.getParent(e);return t},mxGraphModel.prototype.setRoot=function(e){return this.execute(new mxRootChange(this,e)),e},mxGraphModel.prototype.rootChanged=function(e){var t=this.root;return this.root=e,this.nextId=0,this.cells=null,this.cellAdded(e),t},mxGraphModel.prototype.isRoot=function(e){return null!=e&&this.root==e},mxGraphModel.prototype.isLayer=function(e){return this.isRoot(this.getParent(e))},mxGraphModel.prototype.isAncestor=function(e,t){for(;null!=t&&t!=e;)t=this.getParent(t);return t==e},mxGraphModel.prototype.contains=function(e){return this.isAncestor(this.root,e)},mxGraphModel.prototype.getParent=function(e){return null!=e?e.getParent():null},mxGraphModel.prototype.add=function(e,t,n){if(t!=e&&null!=e&&null!=t){null==n&&(n=this.getChildCount(e));var a=e!=this.getParent(t);this.execute(new mxChildChange(this,e,t,n)),this.maintainEdgeParent&&a&&this.updateEdgeParents(t)}return t},mxGraphModel.prototype.cellAdded=function(e){if(null!=e){if(null==e.getId()&&this.createIds&&e.setId(this.createId(e)),null!=e.getId())if((t=this.getCell(e.getId()))!=e){for(;null!=t;)e.setId(this.createId(e)),t=this.getCell(e.getId());null==this.cells&&(this.cells={}),this.cells[e.getId()]=e}mxUtils.isNumeric(e.getId())&&(this.nextId=Math.max(this.nextId,e.getId()));for(var t=this.getChildCount(e),n=0;n<t;n++)this.cellAdded(this.getChildAt(e,n))}},mxGraphModel.prototype.createId=function(e){return e=this.nextId,this.nextId++,this.prefix+e+this.postfix},mxGraphModel.prototype.updateEdgeParents=function(e,t){t=t||this.getRoot(e);for(var n=this.getChildCount(e),a=0;a<n;a++){var i=this.getChildAt(e,a);this.updateEdgeParents(i,t)}for(i=this.getEdgeCount(e),n=[],a=0;a<i;a++)n.push(this.getEdgeAt(e,a));for(a=0;a<n.length;a++)i=n[a],this.isAncestor(t,i)&&this.updateEdgeParent(i,t)},mxGraphModel.prototype.updateEdgeParent=function(e,t){for(var n=this.getTerminal(e,!0),a=this.getTerminal(e,!1),i=null;null!=n&&!this.isEdge(n)&&null!=n.geometry&&n.geometry.relative;)n=this.getParent(n);for(;null!=a&&!this.isEdge(a)&&null!=a.geometry&&a.geometry.relative;)a=this.getParent(a);if(this.isAncestor(t,n)&&this.isAncestor(t,a)&&(null!=(i=n==a?this.getParent(n):this.getNearestCommonAncestor(n,a))&&(this.getParent(i)!=this.root||this.isAncestor(i,e))&&this.getParent(e)!=i)){if(null!=(n=this.getGeometry(e))){var o=this.getOrigin(this.getParent(e)),s=this.getOrigin(i);a=s.x-o.x,o=s.y-o.y;(n=n.clone()).translate(-a,-o),this.setGeometry(e,n)}this.add(i,e,this.getChildCount(i))}},mxGraphModel.prototype.getOrigin=function(e){var t=null;return null!=e?(t=this.getOrigin(this.getParent(e)),this.isEdge(e)||null!=(e=this.getGeometry(e))&&(t.x+=e.x,t.y+=e.y)):t=new mxPoint,t},mxGraphModel.prototype.getNearestCommonAncestor=function(e,t){if(null!=e&&null!=t&&(null!=(o=mxCellPath.create(t))&&0<o.length)){var n=e,a=mxCellPath.create(n);if(o.length<a.length){n=t;var i=a,o=(a=o,i)}for(;null!=n;){if(i=this.getParent(n),0==o.indexOf(a+mxCellPath.PATH_SEPARATOR)&&null!=i)return n;a=mxCellPath.getParentPath(a),n=i}}return null},mxGraphModel.prototype.remove=function(e){return e==this.root?this.setRoot(null):null!=this.getParent(e)&&this.execute(new mxChildChange(this,null,e)),e},mxGraphModel.prototype.cellRemoved=function(e){if(null!=e&&null!=this.cells){for(var t=this.getChildCount(e)-1;0<=t;t--)this.cellRemoved(this.getChildAt(e,t));null!=this.cells&&null!=e.getId()&&delete this.cells[e.getId()]}},mxGraphModel.prototype.parentForCellChanged=function(e,t,n){var a=this.getParent(e);return null!=t?(t!=a||a.getIndex(e)!=n)&&t.insert(e,n):null!=a&&(n=a.getIndex(e),a.remove(n)),this.contains(a)||null==t?null==t&&this.cellRemoved(e):this.cellAdded(e),a},mxGraphModel.prototype.getChildCount=function(e){return null!=e?e.getChildCount():0},mxGraphModel.prototype.getChildAt=function(e,t){return null!=e?e.getChildAt(t):null},mxGraphModel.prototype.getChildren=function(e){return null!=e?e.children:null},mxGraphModel.prototype.getChildVertices=function(e){return this.getChildCells(e,!0,!1)},mxGraphModel.prototype.getChildEdges=function(e){return this.getChildCells(e,!1,!0)},mxGraphModel.prototype.getChildCells=function(e,t,n){t=null!=t&&t,n=null!=n&&n;for(var a=this.getChildCount(e),i=[],o=0;o<a;o++){var s=this.getChildAt(e,o);(!n&&!t||n&&this.isEdge(s)||t&&this.isVertex(s))&&i.push(s)}return i},mxGraphModel.prototype.getTerminal=function(e,t){return null!=e?e.getTerminal(t):null},mxGraphModel.prototype.setTerminal=function(e,t,n){var a=t!=this.getTerminal(e,n);return this.execute(new mxTerminalChange(this,e,t,n)),this.maintainEdgeParent&&a&&this.updateEdgeParent(e,this.getRoot()),t},mxGraphModel.prototype.setTerminals=function(e,t,n){this.beginUpdate();try{this.setTerminal(e,t,!0),this.setTerminal(e,n,!1)}finally{this.endUpdate()}},mxGraphModel.prototype.terminalForCellChanged=function(e,t,n){var a=this.getTerminal(e,n);return null!=t?t.insertEdge(e,n):null!=a&&a.removeEdge(e,n),a},mxGraphModel.prototype.getEdgeCount=function(e){return null!=e?e.getEdgeCount():0},mxGraphModel.prototype.getEdgeAt=function(e,t){return null!=e?e.getEdgeAt(t):null},mxGraphModel.prototype.getDirectedEdgeCount=function(e,t,n){for(var a=0,i=this.getEdgeCount(e),o=0;o<i;o++){var s=this.getEdgeAt(e,o);s!=n&&this.getTerminal(s,t)==e&&a++}return a},mxGraphModel.prototype.getConnections=function(e){return this.getEdges(e,!0,!0,!1)},mxGraphModel.prototype.getIncomingEdges=function(e){return this.getEdges(e,!0,!1,!1)},mxGraphModel.prototype.getOutgoingEdges=function(e){return this.getEdges(e,!1,!0,!1)},mxGraphModel.prototype.getEdges=function(e,t,n,a){t=null==t||t,n=null==n||n,a=null==a||a;for(var i=this.getEdgeCount(e),o=[],s=0;s<i;s++){var r=this.getEdgeAt(e,s),l=this.getTerminal(r,!0),d=this.getTerminal(r,!1);(a&&l==d||l!=d&&(t&&d==e||n&&l==e))&&o.push(r)}return o},mxGraphModel.prototype.getEdgesBetween=function(e,t,n){n=null!=n&&n;var a=this.getEdgeCount(e),i=this.getEdgeCount(t),o=e,s=a;for(i<a&&(s=i,o=t),a=[],i=0;i<s;i++){var r=this.getEdgeAt(o,i),l=this.getTerminal(r,!0),d=this.getTerminal(r,!1);(l==e&&d==t||!n&&(d==e&&l==t))&&a.push(r)}return a},mxGraphModel.prototype.getOpposites=function(e,t,n,a){n=null==n||n,a=null==a||a;var i=[];if(null!=e)for(var o=0;o<e.length;o++){var s=this.getTerminal(e[o],!0),r=this.getTerminal(e[o],!1);s==t&&null!=r&&r!=t&&a?i.push(r):r==t&&null!=s&&s!=t&&n&&i.push(s)}return i},mxGraphModel.prototype.getTopmostCells=function(e){for(var t=[],n=0;n<e.length;n++){for(var a=e[n],i=!0,o=this.getParent(a);null!=o;){if(0<=mxUtils.indexOf(e,o)){i=!1;break}o=this.getParent(o)}i&&t.push(a)}return t},mxGraphModel.prototype.isVertex=function(e){return null!=e&&e.isVertex()},mxGraphModel.prototype.isEdge=function(e){return null!=e&&e.isEdge()},mxGraphModel.prototype.isConnectable=function(e){return null!=e&&e.isConnectable()},mxGraphModel.prototype.getValue=function(e){return null!=e?e.getValue():null},mxGraphModel.prototype.setValue=function(e,t){return this.execute(new mxValueChange(this,e,t)),t},mxGraphModel.prototype.valueForCellChanged=function(e,t){return e.valueChanged(t)},mxGraphModel.prototype.getGeometry=function(e,t){return null!=e?e.getGeometry():null},mxGraphModel.prototype.setGeometry=function(e,t){return t!=this.getGeometry(e)&&this.execute(new mxGeometryChange(this,e,t)),t},mxGraphModel.prototype.geometryForCellChanged=function(e,t){var n=this.getGeometry(e);return e.setGeometry(t),n},mxGraphModel.prototype.getStyle=function(e){return null!=e?e.getStyle():null},mxGraphModel.prototype.setStyle=function(e,t){return t!=this.getStyle(e)&&this.execute(new mxStyleChange(this,e,t)),t},mxGraphModel.prototype.styleForCellChanged=function(e,t){var n=this.getStyle(e);return e.setStyle(t),n},mxGraphModel.prototype.isCollapsed=function(e){return null!=e&&e.isCollapsed()},mxGraphModel.prototype.setCollapsed=function(e,t){return t!=this.isCollapsed(e)&&this.execute(new mxCollapseChange(this,e,t)),t},mxGraphModel.prototype.collapsedStateForCellChanged=function(e,t){var n=this.isCollapsed(e);return e.setCollapsed(t),n},mxGraphModel.prototype.isVisible=function(e){return null!=e&&e.isVisible()},mxGraphModel.prototype.setVisible=function(e,t){return t!=this.isVisible(e)&&this.execute(new mxVisibleChange(this,e,t)),t},mxGraphModel.prototype.visibleStateForCellChanged=function(e,t){var n=this.isVisible(e);return e.setVisible(t),n},mxGraphModel.prototype.execute=function(e){e.execute(),this.beginUpdate(),this.currentEdit.add(e),this.fireEvent(new mxEventObject(mxEvent.EXECUTE,"change",e)),this.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",e)),this.endUpdate()},mxGraphModel.prototype.beginUpdate=function(){this.updateLevel++,this.fireEvent(new mxEventObject(mxEvent.BEGIN_UPDATE)),1==this.updateLevel&&this.fireEvent(new mxEventObject(mxEvent.START_EDIT))},mxGraphModel.prototype.endUpdate=function(){if(this.updateLevel--,0==this.updateLevel&&this.fireEvent(new mxEventObject(mxEvent.END_EDIT)),!this.endingUpdate){this.endingUpdate=0==this.updateLevel,this.fireEvent(new mxEventObject(mxEvent.END_UPDATE,"edit",this.currentEdit));try{if(this.endingUpdate&&!this.currentEdit.isEmpty()){this.fireEvent(new mxEventObject(mxEvent.BEFORE_UNDO,"edit",this.currentEdit));var e=this.currentEdit;this.currentEdit=this.createUndoableEdit(),e.notify(),this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",e))}}finally{this.endingUpdate=!1}}},mxGraphModel.prototype.createUndoableEdit=function(){var e=new mxUndoableEdit(this,!0);return e.notify=function(){e.source.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",e,"changes",e.changes)),e.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,"edit",e,"changes",e.changes))},e},mxGraphModel.prototype.mergeChildren=function(e,t,n){n=null==n||n,this.beginUpdate();try{var a={};for(var i in this.mergeChildrenImpl(e,t,n,a),a){var o=a[i],s=this.getTerminal(o,!0);null!=s&&(s=a[mxCellPath.create(s)],this.setTerminal(o,s,!0)),null!=(s=this.getTerminal(o,!1))&&(s=a[mxCellPath.create(s)],this.setTerminal(o,s,!1))}}finally{this.endUpdate()}},mxGraphModel.prototype.mergeChildrenImpl=function(e,t,n,a){this.beginUpdate();try{for(var i=e.getChildCount(),o=0;o<i;o++){var s=e.getChildAt(o);if("function"==typeof s.getId){var r=s.getId(),l=null==r||this.isEdge(s)&&n?null:this.getCell(r);if(null==l){var d=s.clone();d.setId(r),d.setTerminal(s.getTerminal(!0),!0),d.setTerminal(s.getTerminal(!1),!1),l=t.insert(d),this.cellAdded(l)}a[mxCellPath.create(s)]=l,this.mergeChildrenImpl(s,l,n,a)}}}finally{this.endUpdate()}},mxGraphModel.prototype.getParents=function(e){var t=[];if(null!=e)for(var n={},a=0;a<e.length;a++){var i=this.getParent(e[a]);if(null!=i){var o=mxCellPath.create(i);null==n[o]&&(n[o]=i,t.push(i))}}return t},mxGraphModel.prototype.cloneCell=function(e){return null!=e?this.cloneCells([e],!0)[0]:null},mxGraphModel.prototype.cloneCells=function(e,t){for(var n={},a=[],i=0;i<e.length;i++)null!=e[i]?a.push(this.cloneCellImpl(e[i],n,t)):a.push(null);for(i=0;i<a.length;i++)null!=a[i]&&this.restoreClone(a[i],e[i],n);return a},mxGraphModel.prototype.cloneCellImpl=function(e,t,n){var a=this.cellCloned(e);if(t[mxObjectIdentity.get(e)]=a,n){n=this.getChildCount(e);for(var i=0;i<n;i++){var o=this.cloneCellImpl(this.getChildAt(e,i),t,!0);a.insert(o)}}return a},mxGraphModel.prototype.cellCloned=function(e){return e.clone()},mxGraphModel.prototype.restoreClone=function(e,t,n){null!=(a=this.getTerminal(t,!0))&&(null!=(a=n[mxObjectIdentity.get(a)])&&a.insertEdge(e,!0)),null!=(a=this.getTerminal(t,!1))&&(null!=(a=n[mxObjectIdentity.get(a)])&&a.insertEdge(e,!1));for(var a=this.getChildCount(e),i=0;i<a;i++)this.restoreClone(this.getChildAt(e,i),this.getChildAt(t,i),n)},mxRootChange.prototype.execute=function(){this.root=this.previous,this.previous=this.model.rootChanged(this.previous)},mxChildChange.prototype.execute=function(){var e=this.model.getParent(this.child),t=null!=e?e.getIndex(this.child):0;null==this.previous&&this.connect(this.child,!1),e=this.model.parentForCellChanged(this.child,this.previous,this.previousIndex),null!=this.previous&&this.connect(this.child,!0),this.parent=this.previous,this.previous=e,this.index=this.previousIndex,this.previousIndex=t},mxChildChange.prototype.connect=function(e,t){t=null==t||t;var n=e.getTerminal(!0),a=e.getTerminal(!1);for(null!=n&&(t?this.model.terminalForCellChanged(e,n,!0):this.model.terminalForCellChanged(e,null,!0)),null!=a&&(t?this.model.terminalForCellChanged(e,a,!1):this.model.terminalForCellChanged(e,null,!1)),e.setTerminal(n,!0),e.setTerminal(a,!1),n=this.model.getChildCount(e),a=0;a<n;a++)this.connect(this.model.getChildAt(e,a),t)},mxTerminalChange.prototype.execute=function(){this.terminal=this.previous,this.previous=this.model.terminalForCellChanged(this.cell,this.previous,this.source)},mxValueChange.prototype.execute=function(){this.value=this.previous,this.previous=this.model.valueForCellChanged(this.cell,this.previous)},mxStyleChange.prototype.execute=function(){this.style=this.previous,this.previous=this.model.styleForCellChanged(this.cell,this.previous)},mxGeometryChange.prototype.execute=function(){this.geometry=this.previous,this.previous=this.model.geometryForCellChanged(this.cell,this.previous)},mxCollapseChange.prototype.execute=function(){this.collapsed=this.previous,this.previous=this.model.collapsedStateForCellChanged(this.cell,this.previous)},mxVisibleChange.prototype.execute=function(){this.visible=this.previous,this.previous=this.model.visibleStateForCellChanged(this.cell,this.previous)},mxCellAttributeChange.prototype.execute=function(){var e=this.cell.getAttribute(this.attribute);null==this.previous?this.cell.value.removeAttribute(this.attribute):this.cell.setAttribute(this.attribute,this.previous),this.previous=e},mxCell.prototype.id=null,mxCell.prototype.value=null,mxCell.prototype.geometry=null,mxCell.prototype.style=null,mxCell.prototype.vertex=!1,mxCell.prototype.edge=!1,mxCell.prototype.connectable=!0,mxCell.prototype.visible=!0,mxCell.prototype.collapsed=!1,mxCell.prototype.parent=null,mxCell.prototype.source=null,mxCell.prototype.target=null,mxCell.prototype.children=null,mxCell.prototype.edges=null,mxCell.prototype.mxTransient="id value parent source target children edges".split(" "),mxCell.prototype.getId=function(){return this.id},mxCell.prototype.setId=function(e){this.id=e},mxCell.prototype.getValue=function(){return this.value},mxCell.prototype.setValue=function(e){this.value=e},mxCell.prototype.valueChanged=function(e){var t=this.getValue();return this.setValue(e),t},mxCell.prototype.getGeometry=function(){return this.geometry},mxCell.prototype.setGeometry=function(e){this.geometry=e},mxCell.prototype.getStyle=function(){return this.style},mxCell.prototype.setStyle=function(e){this.style=e},mxCell.prototype.isVertex=function(){return this.vertex},mxCell.prototype.setVertex=function(e){this.vertex=e},mxCell.prototype.isEdge=function(){return this.edge},mxCell.prototype.setEdge=function(e){this.edge=e},mxCell.prototype.isConnectable=function(){return this.connectable},mxCell.prototype.setConnectable=function(e){this.connectable=e},mxCell.prototype.isVisible=function(){return this.visible},mxCell.prototype.setVisible=function(e){this.visible=e},mxCell.prototype.isCollapsed=function(){return this.collapsed},mxCell.prototype.setCollapsed=function(e){this.collapsed=e},mxCell.prototype.getParent=function(){return this.parent},mxCell.prototype.setParent=function(e){this.parent=e},mxCell.prototype.getTerminal=function(e){return e?this.source:this.target},mxCell.prototype.setTerminal=function(e,t){return t?this.source=e:this.target=e,e},mxCell.prototype.getChildCount=function(){return null==this.children?0:this.children.length},mxCell.prototype.getIndex=function(e){return mxUtils.indexOf(this.children,e)},mxCell.prototype.getChildAt=function(e){return null==this.children?null:this.children[e]},mxCell.prototype.insert=function(e,t){return null!=e&&(null==t&&(t=this.getChildCount(),e.getParent()==this&&t--),e.removeFromParent(),e.setParent(this),null==this.children?(this.children=[],this.children.push(e)):this.children.splice(t,0,e)),e},mxCell.prototype.remove=function(e){var t=null;return null!=this.children&&0<=e&&(null!=(t=this.getChildAt(e))&&(this.children.splice(e,1),t.setParent(null))),t},mxCell.prototype.removeFromParent=function(){if(null!=this.parent){var e=this.parent.getIndex(this);this.parent.remove(e)}},mxCell.prototype.getEdgeCount=function(){return null==this.edges?0:this.edges.length},mxCell.prototype.getEdgeIndex=function(e){return mxUtils.indexOf(this.edges,e)},mxCell.prototype.getEdgeAt=function(e){return null==this.edges?null:this.edges[e]},mxCell.prototype.insertEdge=function(e,t){return null!=e&&(e.removeFromTerminal(t),e.setTerminal(this,t),null==this.edges||e.getTerminal(!t)!=this||mxUtils.indexOf(this.edges,e)<0)&&(null==this.edges&&(this.edges=[]),this.edges.push(e)),e},mxCell.prototype.removeEdge=function(e,t){if(null!=e){if(e.getTerminal(!t)!=this&&null!=this.edges){var n=this.getEdgeIndex(e);0<=n&&this.edges.splice(n,1)}e.setTerminal(null,t)}return e},mxCell.prototype.removeFromTerminal=function(e){var t=this.getTerminal(e);null!=t&&t.removeEdge(this,e)},mxCell.prototype.getAttribute=function(e,t){var n=this.getValue();return(null!=n&&n.nodeType==mxConstants.NODETYPE_ELEMENT?n.getAttribute(e):null)||t},mxCell.prototype.setAttribute=function(e,t){var n=this.getValue();null!=n&&n.nodeType==mxConstants.NODETYPE_ELEMENT&&n.setAttribute(e,t)},mxCell.prototype.clone=function(){var e=mxUtils.clone(this,this.mxTransient);return e.setValue(this.cloneValue()),e},mxCell.prototype.cloneValue=function(){var e=this.getValue();return null!=e&&("function"==typeof e.clone?e=e.clone():isNaN(e.nodeType)||(e=e.cloneNode(!0))),e},mxGeometry.prototype=new mxRectangle,mxGeometry.prototype.constructor=mxGeometry,mxGeometry.prototype.TRANSLATE_CONTROL_POINTS=!0,mxGeometry.prototype.alternateBounds=null,mxGeometry.prototype.sourcePoint=null,mxGeometry.prototype.targetPoint=null,mxGeometry.prototype.points=null,mxGeometry.prototype.offset=null,mxGeometry.prototype.relative=!1,mxGeometry.prototype.swap=function(){if(null!=this.alternateBounds){var e=new mxRectangle(this.x,this.y,this.width,this.height);this.x=this.alternateBounds.x,this.y=this.alternateBounds.y,this.width=this.alternateBounds.width,this.height=this.alternateBounds.height,this.alternateBounds=e}},mxGeometry.prototype.getTerminalPoint=function(e){return e?this.sourcePoint:this.targetPoint},mxGeometry.prototype.setTerminalPoint=function(e,t){return t?this.sourcePoint=e:this.targetPoint=e,e},mxGeometry.prototype.translate=function(e,t){if(this.clone(),this.relative||(this.x+=e,this.y+=t),null!=this.sourcePoint&&(this.sourcePoint.x+=e,this.sourcePoint.y+=t),null!=this.targetPoint&&(this.targetPoint.x+=e,this.targetPoint.y+=t),this.TRANSLATE_CONTROL_POINTS&&null!=this.points)for(var n=this.points.length,a=0;a<n;a++){var i=this.points[a];null!=i&&(i.x+=e,i.y+=t)}};var mxCellPath={PATH_SEPARATOR:".",create:function(e){var t="";if(null!=e)for(var n=e.getParent();null!=n;)t=n.getIndex(e)+mxCellPath.PATH_SEPARATOR+t,n=(e=n).getParent();return 1<(e=t.length)&&(t=t.substring(0,e-1)),t},getParentPath:function(e){if(null!=e){var t=e.lastIndexOf(mxCellPath.PATH_SEPARATOR);if(0<=t)return e.substring(0,t);if(0<e.length)return""}return null},resolve:function(e,t){var n=e;if(null!=t)for(var a=t.split(mxCellPath.PATH_SEPARATOR),i=0;i<a.length;i++)n=n.getChildAt(parseInt(a[i]));return n},compare:function(e,t){for(var n=Math.min(e.length,t.length),a=0,i=0;i<n;i++)if(e[i]!=t[i]){0==e[i].length||0==t[i].length?a=e[i]==t[i]?0:e[i]>t[i]?1:-1:a=(n=parseInt(e[i]))==(i=parseInt(t[i]))?0:i<n?1:-1;break}return 0==a&&((n=e.length)!=(i=t.length)&&(a=i<n?1:-1)),a}},mxPerimeter={RectanglePerimeter:function(e,t,n,a){t=e.getCenterX();var i=e.getCenterY(),o=Math.atan2(n.y-i,n.x-t),s=new mxPoint(0,0),r=Math.PI,l=Math.PI/2-o,d=Math.atan2(e.height,e.width);return o<-r+d||r-d<o?(s.x=e.x,s.y=i-e.width*Math.tan(o)/2):o<-d?(s.y=e.y,s.x=t-e.height*Math.tan(l)/2):o<d?(s.x=e.x+e.width,s.y=i+e.width*Math.tan(o)/2):(s.y=e.y+e.height,s.x=t+e.height*Math.tan(l)/2),a&&(n.x>=e.x&&n.x<=e.x+e.width?s.x=n.x:n.y>=e.y&&n.y<=e.y+e.height&&(s.y=n.y),n.x<e.x?s.x=e.x:n.x>e.x+e.width&&(s.x=e.x+e.width),n.y<e.y?s.y=e.y:n.y>e.y+e.height&&(s.y=e.y+e.height)),s},EllipsePerimeter:function(e,t,n,a){var i=e.x,o=e.y,s=e.width/2,r=e.height/2,l=i+s,d=o+r;t=n.x,n=n.y;var c=parseInt(t-l),m=parseInt(n-d);if(0==c&&0!=m)return new mxPoint(l,d+r*m/Math.abs(m));if(0==c&&0==m)return new mxPoint(t,n);if(a){if(o<=n&&n<=o+e.height)return e=n-d,e=Math.sqrt(s*s*(1-e*e/(r*r)))||0,t<=i&&(e=-e),new mxPoint(l+e,n);if(i<=t&&t<=i+e.width)return e=t-l,e=Math.sqrt(r*r*(1-e*e/(s*s)))||0,n<=o&&(e=-e),new mxPoint(t,d+e)}return d-=(i=m/c)*l,l=i*(s=(-(e=-2*l*(o=s*s*i*i+r*r))+(r=Math.sqrt(e*e-4*o*(s*s*i*i*l*l+r*r*l*l-s*s*r*r))))/(2*o))+d,d=i*(r=(-e-r)/(2*o))+d,i=Math.sqrt(Math.pow(s-t,2)+Math.pow(l-n,2)),t=Math.sqrt(Math.pow(r-t,2)+Math.pow(d-n,2)),o=n=0,i<t?(n=s,o=l):(n=r,o=d),new mxPoint(n,o)},RhombusPerimeter:function(e,t,n,a){t=e.x;var i=e.y,o=e.width,s=t+o/2,r=i+(e=e.height)/2,l=n.x;if(n=n.y,s==l)return new mxPoint(s,n<r?i:i+e);if(r==n)return new mxPoint(l<s?t:t+o,r);var d=s,c=r;return a&&(t<=l&&l<=t+o?d=l:i<=n&&n<=i+e&&(c=n)),l<s?n<r?mxUtils.intersection(l,n,d,c,s,i,t,r):mxUtils.intersection(l,n,d,c,s,i+e,t,r):n<r?mxUtils.intersection(l,n,d,c,s,i,t+o,r):mxUtils.intersection(l,n,d,c,s,i+e,t+o,r)},TrianglePerimeter:function(e,t,n,a){var i=(t=null!=t?t.style[mxConstants.STYLE_DIRECTION]:null)==mxConstants.DIRECTION_NORTH||t==mxConstants.DIRECTION_SOUTH,o=e.x,s=e.y,r=e.width,l=o+r/2,d=s+(e=e.height)/2,c=new mxPoint(o,s),m=new mxPoint(o+r,d),u=new mxPoint(o,s+e);t==mxConstants.DIRECTION_NORTH?(c=u,m=new mxPoint(l,s),u=new mxPoint(o+r,s+e)):t==mxConstants.DIRECTION_SOUTH?(m=new mxPoint(l,s+e),u=new mxPoint(o+r,s)):t==mxConstants.DIRECTION_WEST&&(c=new mxPoint(o+r,s),m=new mxPoint(o,d),u=new mxPoint(o+r,s+e));var p=n.x-l,g=n.y-d,v=(p=i?Math.atan2(p,g):Math.atan2(g,p),i?Math.atan2(r,e):Math.atan2(e,r));g=!1,g=t==mxConstants.DIRECTION_NORTH||t==mxConstants.DIRECTION_WEST?-v<p&&p<v:p<-Math.PI+v||p>Math.PI-v,v=null;return g?v=a&&(i&&n.x>=c.x&&n.x<=u.x||!i&&n.y>=c.y&&n.y<=u.y)?i?new mxPoint(n.x,c.y):new mxPoint(c.x,n.y):t==mxConstants.DIRECTION_NORTH?new mxPoint(o+r/2+e*Math.tan(p)/2,s+e):t==mxConstants.DIRECTION_SOUTH?new mxPoint(o+r/2-e*Math.tan(p)/2,s):t==mxConstants.DIRECTION_WEST?new mxPoint(o+r,s+e/2+r*Math.tan(p)/2):new mxPoint(o,s+e/2-r*Math.tan(p)/2):(a&&(a=new mxPoint(l,d),n.y>=s&&n.y<=s+e?(a.x=i?l:t==mxConstants.DIRECTION_WEST?o+r:o,a.y=n.y):n.x>=o&&n.x<=o+r&&(a.x=n.x,a.y=i?t==mxConstants.DIRECTION_NORTH?s+e:s:d),l=a.x,d=a.y),v=i&&n.x<=o+r/2||!i&&n.y<=s+e/2?mxUtils.intersection(n.x,n.y,l,d,c.x,c.y,m.x,m.y):mxUtils.intersection(n.x,n.y,l,d,m.x,m.y,u.x,u.y)),null==v&&(v=new mxPoint(l,d)),v}};function mxPrintPreview(e,t,n,a,i,o,s,r,l){this.graph=e,this.scale=null!=t?t:1/e.pageScale,this.border=null!=a?a:0,this.pageFormat=null!=n?n:e.pageFormat,this.title=null!=r?r:"Printer-friendly version",this.x0=null!=i?i:0,this.y0=null!=o?o:0,this.borderColor=s,this.pageSelector=null==l||l}function mxStylesheet(){this.styles={},this.putDefaultVertexStyle(this.createDefaultVertexStyle()),this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())}function mxCellState(e,t,n){this.view=e,this.cell=t,this.style=n,this.origin=new mxPoint,this.absoluteOffset=new mxPoint}function mxGraphSelectionModel(e){this.graph=e,this.cells=[]}function mxSelectionChange(e,t,n){this.selectionModel=e,this.added=null!=t?t.slice():null,this.removed=null!=n?n.slice():null}function mxCellEditor(e){this.graph=e}function mxCellRenderer(){}mxPrintPreview.prototype.graph=null,mxPrintPreview.prototype.pageFormat=null,mxPrintPreview.prototype.scale=null,mxPrintPreview.prototype.border=0,mxPrintPreview.prototype.x0=0,mxPrintPreview.prototype.y0=0,mxPrintPreview.prototype.autoOrigin=!0,mxPrintPreview.prototype.printOverlays=!1,mxPrintPreview.prototype.borderColor=null,mxPrintPreview.prototype.title=null,mxPrintPreview.prototype.pageSelector=null,mxPrintPreview.prototype.wnd=null,mxPrintPreview.prototype.pageCount=0,mxPrintPreview.prototype.getWindow=function(){return this.wnd},mxPrintPreview.prototype.getDoctype=function(){var e="";return 8==document.documentMode&&(e='<meta http-equiv="X-UA-Compatible" content="IE=8">'),e},mxPrintPreview.prototype.open=function(e){var t=this.graph.cellRenderer.initializeOverlay,n=null;try{if(this.printOverlays&&(this.graph.cellRenderer.initializeOverlay=function(e,t){t.init(e.view.getDrawPane())}),null==this.wnd){this.wnd=window.open();var a=this.wnd.document,i=this.getDoctype();null!=i&&0<i.length&&a.writeln(i),a.writeln("<html>"),a.writeln("<head>"),this.writeHead(a,e),a.writeln("</head>"),a.writeln('<body class="mxPage">'),mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a),mxClient.IS_VML&&(a.namespaces.add("v","urn:schemas-microsoft-com:vml"),a.namespaces.add("o","urn:schemas-microsoft-com:office:office"),a.createStyleSheet().cssText="v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}",mxClient.link("stylesheet",mxClient.basePath+"/css/explorer.css",a));var o=this.graph.getGraphBounds().clone(),s=this.graph.getView().getScale(),r=s/this.scale,l=this.graph.getView().getTranslate();this.autoOrigin||(this.x0=-l.x*this.scale,this.y0=-l.y*this.scale,o.width+=o.x,o.height+=o.y,o.x=0,this.border=o.y=0),o.width/=r,o.height/=r;var d=this.pageFormat.width-2*this.border,c=this.pageFormat.height-2*this.border,m=Math.max(1,Math.ceil((o.width+this.x0)/d)),u=Math.max(1,Math.ceil((o.height+this.y0)/c));this.pageCount=m*u;var p=mxUtils.bind(this,function(){if(this.pageSelector&&(1<u||1<m)){var e=this.createPageSelector(u,m);if(a.body.appendChild(e),mxClient.IS_IE){e.style.position="absolute";var t=function(){e.style.top=a.body.scrollTop+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(e){t()}),mxEvent.addListener(this.wnd,"resize",function(e){t()})}}});if(e=function(e,t){if(null!=this.borderColor&&(e.style.borderColor=this.borderColor,e.style.borderStyle="solid",e.style.borderWidth="1px"),e.style.background="white",t&&(e.style.pageBreakAfter="always"),mxClient.IS_IE?(a.writeln(e.outerHTML),e.parentNode.removeChild(e)):(e.parentNode.removeChild(e),a.body.appendChild(e)),t){var n=a.createElement("hr");n.className="mxPageBreak",a.body.appendChild(n)}},null!=(b=this.getCoverPages(this.pageFormat.width,this.pageFormat.height)))for(var g=0;g<b.length;g++)e(b[g],!0);var v=this.getAppendices(this.pageFormat.width,this.pageFormat.height);for(g=0;g<u;g++)for(var h=g*c/this.scale-this.y0/this.scale+(o.y-l.y*s)/s,b=0;b<m;b++){if(null==this.wnd)return null;var f=b*d/this.scale-this.x0/this.scale+(o.x-l.x*s)/s,A=g*m+b+1;(n=this.renderPage(this.pageFormat.width,this.pageFormat.height,mxUtils.bind(this,function(e){this.addGraphFragment(-f,-h,this.scale,A,e)}))).setAttribute("id","mxPage-"+A),e(n,null!=v||g<u-1||b<m-1)}if(null!=v)for(g=0;g<v.length;g++)e(v[g],g<v.length);a.writeln("</body>"),a.writeln("</html>"),a.close(),p(),mxEvent.release(a.body)}this.wnd.focus()}catch(e){null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n)}finally{this.graph.cellRenderer.initializeOverlay=t}return this.wnd},mxPrintPreview.prototype.writeHead=function(e,t){null!=this.title&&e.writeln("<title>"+this.title+"</title>"),e.writeln('<style type="text/css">'),e.writeln("@media print {"),e.writeln("  table.mxPageSelector { display: none; }"),e.writeln("  hr.mxPageBreak { display: none; }"),e.writeln("}"),e.writeln("@media screen {"),e.writeln("  table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }"),e.writeln("  table.mxPageSelector td { border: solid 1px gray; padding:4px; }"),e.writeln("  body.mxPage { background: gray; }"),e.writeln("}"),null!=t&&e.writeln(t),e.writeln("</style>")},mxPrintPreview.prototype.createPageSelector=function(e,t){var n=this.wnd.document,a=n.createElement("table");a.className="mxPageSelector",a.setAttribute("border","0");for(var i=n.createElement("tbody"),o=0;o<e;o++){for(var s=n.createElement("tr"),r=0;r<t;r++){var l=o*t+r+1,d=n.createElement("td");if(!mxClient.IS_NS||mxClient.IS_SF||mxClient.IS_GC){var c=n.createElement("a");c.setAttribute("href","#mxPage-"+l),mxUtils.write(c,l,n),d.appendChild(c)}else mxUtils.write(d,l,n);s.appendChild(d)}i.appendChild(s)}return a.appendChild(i),a},mxPrintPreview.prototype.renderPage=function(e,t,n){var a=document.createElement("div");try{a.style.width=e+"px",a.style.height=t+"px",a.style.overflow="hidden",a.style.pageBreakInside="avoid",a.style.position="relative";var i=document.createElement("div");i.style.top=this.border+"px",i.style.left=this.border+"px",i.style.width=e-2*this.border+"px",i.style.height=t-2*this.border+"px",i.style.overflow="hidden",this.graph.dialect==mxConstants.DIALECT_VML&&(i.style.position="absolute"),a.appendChild(i),document.body.appendChild(a),n(i)}catch(e){throw a.parentNode.removeChild(a),e}return a},mxPrintPreview.prototype.addGraphFragment=function(e,t,n,a,i){a=this.graph.getView();var o=this.graph.container;this.graph.container=i;var s=a.getCanvas(),r=a.getBackgroundPane(),l=a.getDrawPane(),d=a.getOverlayPane();this.graph.dialect==mxConstants.DIALECT_SVG?a.createSvg():this.graph.dialect==mxConstants.DIALECT_VML?a.createVml():a.createHtml();var c=a.isEventsEnabled();a.setEventsEnabled(!1);var m=this.graph.isEnabled();this.graph.setEnabled(!1);var u=a.getTranslate();a.translate=new mxPoint(e,t),e=null;try{var p=[this.graph.getModel().getRoot()];e=new mxTemporaryCellStates(a,n,p)}finally{if(mxClient.IS_IE)a.overlayPane.innerHTML="";else for(n=i.firstChild;null!=n;)p=n.nextSibling,"svg"==(t=n.nodeName.toLowerCase())?(n.setAttribute("width",parseInt(i.style.width)),n.setAttribute("height",parseInt(i.style.height))):"default"!=n.style.cursor&&"table"!=t&&n.parentNode.removeChild(n),n=p;a.overlayPane.parentNode.removeChild(a.overlayPane),this.graph.setEnabled(m),this.graph.container=o,a.canvas=s,a.backgroundPane=r,a.drawPane=l,a.overlayPane=d,a.translate=u,e.destroy(),a.setEventsEnabled(c)}},mxPrintPreview.prototype.getCoverPages=function(){return null},mxPrintPreview.prototype.getAppendices=function(){return null},mxPrintPreview.prototype.print=function(){var e=this.open();null!=e&&e.print()},mxPrintPreview.prototype.close=function(){null!=this.wnd&&(this.wnd.close(),this.wnd=null)},mxStylesheet.prototype.createDefaultVertexStyle=function(){var e={};return e[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_RECTANGLE,e[mxConstants.STYLE_PERIMETER]=mxPerimeter.RectanglePerimeter,e[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE,e[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER,e[mxConstants.STYLE_FILLCOLOR]="#C3D9FF",e[mxConstants.STYLE_STROKECOLOR]="#6482B9",e[mxConstants.STYLE_FONTCOLOR]="#774400",e},mxStylesheet.prototype.createDefaultEdgeStyle=function(){var e={};return e[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_CONNECTOR,e[mxConstants.STYLE_ENDARROW]=mxConstants.ARROW_CLASSIC,e[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE,e[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER,e[mxConstants.STYLE_STROKECOLOR]="#6482B9",e[mxConstants.STYLE_FONTCOLOR]="#446299",e},mxStylesheet.prototype.putDefaultVertexStyle=function(e){this.putCellStyle("defaultVertex",e)},mxStylesheet.prototype.putDefaultEdgeStyle=function(e){this.putCellStyle("defaultEdge",e)},mxStylesheet.prototype.getDefaultVertexStyle=function(){return this.styles.defaultVertex},mxStylesheet.prototype.getDefaultEdgeStyle=function(){return this.styles.defaultEdge},mxStylesheet.prototype.putCellStyle=function(e,t){this.styles[e]=t},mxStylesheet.prototype.getCellStyle=function(e,t){var n=t;if(null!=e&&0<e.length)for(var a=e.split(";"),i=(n=null!=n&&";"!=e.charAt(0)?mxUtils.clone(n):{},0);i<a.length;i++){var o=(s=a[i]).indexOf("=");if(0<=o){var s,r=s.substring(0,o);(s=s.substring(o+1))==mxConstants.NONE?delete n[r]:mxUtils.isNumeric(s)?n[r]=parseFloat(s):n[r]=s}else if(null!=(s=this.styles[s]))for(r in s)n[r]=s[r]}return n},mxCellState.prototype=new mxRectangle,mxCellState.prototype.constructor=mxCellState,mxCellState.prototype.view=null,mxCellState.prototype.cell=null,mxCellState.prototype.style=null,mxCellState.prototype.invalid=!0,mxCellState.prototype.invalidOrder=!1,mxCellState.prototype.orderChanged=!1,mxCellState.prototype.origin=null,mxCellState.prototype.absolutePoints=null,mxCellState.prototype.absoluteOffset=null,mxCellState.prototype.visibleSourceState=null,mxCellState.prototype.visibleTargetState=null,mxCellState.prototype.terminalDistance=0,mxCellState.prototype.length=0,mxCellState.prototype.segments=null,mxCellState.prototype.shape=null,mxCellState.prototype.text=null,mxCellState.prototype.getPerimeterBounds=function(e,t){if(e=e||0,t=null!=t?t:new mxRectangle(this.x,this.y,this.width,this.height),null!=this.shape&&null!=this.shape.stencil){var n=this.shape.stencil.computeAspect(this.style,t.x,t.y,t.width,t.height);t.x=n.x,t.y=n.y,t.width=this.shape.stencil.w0*n.width,t.height=this.shape.stencil.h0*n.height}return 0!=e&&t.grow(e),t},mxCellState.prototype.setAbsoluteTerminalPoint=function(e,t){t?(null==this.absolutePoints&&(this.absolutePoints=[]),0==this.absolutePoints.length?this.absolutePoints.push(e):this.absolutePoints[0]=e):null==this.absolutePoints?(this.absolutePoints=[],this.absolutePoints.push(null),this.absolutePoints.push(e)):1==this.absolutePoints.length?this.absolutePoints.push(e):this.absolutePoints[this.absolutePoints.length-1]=e},mxCellState.prototype.setCursor=function(e){null!=this.shape&&this.shape.setCursor(e),null!=this.text&&this.text.setCursor(e)},mxCellState.prototype.getVisibleTerminal=function(e){return null!=(e=this.getVisibleTerminalState(e))?e.cell:null},mxCellState.prototype.getVisibleTerminalState=function(e){return e?this.visibleSourceState:this.visibleTargetState},mxCellState.prototype.setVisibleTerminalState=function(e,t){t?this.visibleSourceState=e:this.visibleTargetState=e},mxCellState.prototype.destroy=function(){this.view.graph.cellRenderer.destroy(this)},mxCellState.prototype.clone=function(){var e=new mxCellState(this.view,this.cell,this.style);if(null!=this.absolutePoints){e.absolutePoints=[];for(var t=0;t<this.absolutePoints.length;t++)e.absolutePoints[t]=this.absolutePoints[t].clone()}return null!=this.origin&&(e.origin=this.origin.clone()),null!=this.absoluteOffset&&(e.absoluteOffset=this.absoluteOffset.clone()),null!=this.boundingBox&&(e.boundingBox=this.boundingBox.clone()),e.terminalDistance=this.terminalDistance,e.segments=this.segments,e.length=this.length,e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e},mxGraphSelectionModel.prototype=new mxEventSource,mxGraphSelectionModel.prototype.constructor=mxGraphSelectionModel,mxGraphSelectionModel.prototype.doneResource="none"!=mxClient.language?"done":"",mxGraphSelectionModel.prototype.updatingSelectionResource="none"!=mxClient.language?"updatingSelection":"",mxGraphSelectionModel.prototype.graph=null,mxGraphSelectionModel.prototype.singleSelection=!1,mxGraphSelectionModel.prototype.isSingleSelection=function(){return this.singleSelection},mxGraphSelectionModel.prototype.setSingleSelection=function(e){this.singleSelection=e},mxGraphSelectionModel.prototype.isSelected=function(e){return null!=e&&0<=mxUtils.indexOf(this.cells,e)},mxGraphSelectionModel.prototype.isEmpty=function(){return 0==this.cells.length},mxGraphSelectionModel.prototype.clear=function(){this.changeSelection(null,this.cells)},mxGraphSelectionModel.prototype.setCell=function(e){null!=e&&this.setCells([e])},mxGraphSelectionModel.prototype.setCells=function(e){if(null!=e){this.singleSelection&&(e=[this.getFirstSelectableCell(e)]);for(var t=[],n=0;n<e.length;n++)this.graph.isCellSelectable(e[n])&&t.push(e[n]);this.changeSelection(t,this.cells)}},mxGraphSelectionModel.prototype.getFirstSelectableCell=function(e){if(null!=e)for(var t=0;t<e.length;t++)if(this.graph.isCellSelectable(e[t]))return e[t];return null},mxGraphSelectionModel.prototype.addCell=function(e){null!=e&&this.addCells([e])},mxGraphSelectionModel.prototype.addCells=function(e){if(null!=e){var t=null;this.singleSelection&&(t=this.cells,e=[this.getFirstSelectableCell(e)]);for(var n=[],a=0;a<e.length;a++)!this.isSelected(e[a])&&this.graph.isCellSelectable(e[a])&&n.push(e[a]);this.changeSelection(n,t)}},mxGraphSelectionModel.prototype.removeCell=function(e){null!=e&&this.removeCells([e])},mxGraphSelectionModel.prototype.removeCells=function(e){if(null!=e){for(var t=[],n=0;n<e.length;n++)this.isSelected(e[n])&&t.push(e[n]);this.changeSelection(null,t)}},mxGraphSelectionModel.prototype.changeSelection=function(e,t){if(null!=e&&0<e.length&&null!=e[0]||null!=t&&0<t.length&&null!=t[0]){var n=new mxSelectionChange(this,e,t);n.execute();var a=new mxUndoableEdit(this,!1);a.add(n),this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",a))}},mxGraphSelectionModel.prototype.cellAdded=function(e){null!=e&&!this.isSelected(e)&&this.cells.push(e)},mxGraphSelectionModel.prototype.cellRemoved=function(e){null!=e&&(0<=(e=mxUtils.indexOf(this.cells,e))&&this.cells.splice(e,1))},mxSelectionChange.prototype.execute=function(){var e=mxLog.enter("mxSelectionChange.execute");if(window.status=mxResources.get(this.selectionModel.updatingSelectionResource)||this.selectionModel.updatingSelectionResource,null!=this.removed)for(var t=0;t<this.removed.length;t++)this.selectionModel.cellRemoved(this.removed[t]);if(null!=this.added)for(t=0;t<this.added.length;t++)this.selectionModel.cellAdded(this.added[t]);t=this.added,this.added=this.removed,this.removed=t,window.status=mxResources.get(this.selectionModel.doneResource)||this.selectionModel.doneResource,mxLog.leave("mxSelectionChange.execute",e),this.selectionModel.fireEvent(new mxEventObject(mxEvent.CHANGE,"added",this.added,"removed",this.removed))},mxCellEditor.prototype.graph=null,mxCellEditor.prototype.textarea=null,mxCellEditor.prototype.editingCell=null,mxCellEditor.prototype.trigger=null,mxCellEditor.prototype.modified=!1,mxCellEditor.prototype.autoSize=!0,mxCellEditor.prototype.emptyLabelText="",mxCellEditor.prototype.textNode="",mxCellEditor.prototype.init=function(){this.textarea=document.createElement("textarea"),this.textarea.className="mxCellEditor",this.textarea.style.position="absolute",this.textarea.style.overflow="visible",this.textarea.setAttribute("cols","20"),this.textarea.setAttribute("rows","4"),mxClient.IS_NS&&(this.textarea.style.resize="none"),mxEvent.addListener(this.textarea,"blur",mxUtils.bind(this,function(e){this.focusLost()})),mxEvent.addListener(this.textarea,"keydown",mxUtils.bind(this,function(e){mxEvent.isConsumed(e)||(113==e.keyCode||this.graph.isEnterStopsCellEditing()&&13==e.keyCode&&!mxEvent.isControlDown(e)&&!mxEvent.isShiftDown(e)?(this.graph.stopEditing(!1),mxEvent.consume(e)):27==e.keyCode?(this.graph.stopEditing(!0),mxEvent.consume(e)):(this.clearOnChange&&(this.clearOnChange=!1,this.textarea.value=""),this.setModified(!0)))})),mxEvent.addListener(this.textarea,"keypress",mxUtils.bind(this,function(e){this.autoSize&&!mxEvent.isConsumed(e)&&setTimeout(mxUtils.bind(this,function(){this.resize()}),0)}))},mxCellEditor.prototype.resize=function(){if(null!=this.textDiv){var e=this.graph.getView().getState(this.editingCell),t=this.graph.isLabelClipped(e.cell),n=this.graph.isWrapping(e.cell);if(this.graph.getModel().isEdge(e.cell))this.bounds.x=e.absoluteOffset.x,this.bounds.y=e.absoluteOffset.y,this.bounds.width=0,this.bounds.height=0;else if(null!=this.bounds){this.bounds.x=e.x,this.bounds.y=e.y,this.bounds.width=e.width,this.bounds.height=e.height,(a=mxUtils.getValue(e.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER))==mxConstants.ALIGN_LEFT?this.bounds.x-=e.width:a==mxConstants.ALIGN_RIGHT&&(this.bounds.x+=e.width),(a=mxUtils.getValue(e.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE))==mxConstants.ALIGN_TOP?this.bounds.y-=e.height:a==mxConstants.ALIGN_BOTTOM&&(this.bounds.y+=e.height)}"\n"!=(a=this.textarea.value).charAt(a.length-1)&&""!=a||(a+="&nbsp;"),a=mxUtils.htmlEntities(a,!1),n?(this.textDiv.style.whiteSpace="normal",this.textDiv.style.width=this.bounds.width+"px"):a=a.replace(/ /g,"&nbsp;"),a=a.replace(/\n/g,"<br/>"),this.textDiv.innerHTML=a;var a=this.textDiv.offsetWidth+30,i=this.textDiv.offsetHeight+16;a=Math.max(a,40),i=Math.max(i,20);t&&(a=Math.min(this.bounds.width-4,a),i=Math.min(this.bounds.height,i));var o=null!=e.text?e.text.margin:null;null==o&&(o=mxUtils.getValue(e.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),e=mxUtils.getValue(e.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),o=mxUtils.getAlignmentAsPoint(o,e)),null!=o&&(!t&&n||(this.textarea.style.left=Math.max(0,Math.round(this.bounds.x-o.x*this.bounds.width+o.x*a)-3)+"px"),this.textarea.style.top=Math.max(0,Math.round(this.bounds.y-o.y*this.bounds.height+o.y*i)+4)+"px"),!t&&n||(this.textarea.style.width=a+"px"),this.textarea.style.height=i+"px"}},mxCellEditor.prototype.isModified=function(){return this.modified},mxCellEditor.prototype.setModified=function(e){this.modified=e},mxCellEditor.prototype.focusLost=function(){this.stopEditing(!this.graph.isInvokesStopCellEditing())},mxCellEditor.prototype.startEditing=function(e,t){null==this.textarea&&this.init(),this.stopEditing(!0);var n=this.graph.getView().getState(e);if(null!=n){this.editingCell=e,this.trigger=t,(this.textNode=null)!=n.text&&this.isHideLabel(n)&&(this.textNode=n.text.node,this.textNode.style.visibility="hidden");var a=this.graph.getView().scale,i=(a=mxUtils.getValue(n.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE)*a,mxUtils.getValue(n.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY)),o=mxUtils.getValue(n.style,mxConstants.STYLE_FONTCOLOR,"black"),s=mxUtils.getValue(n.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),r=(mxUtils.getValue(n.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,l=(mxUtils.getValue(n.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,d=(mxUtils.getValue(n.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.fontSize=Math.round(a)+"px",this.textarea.style.lineHeight=Math.round(a*mxConstants.LINE_HEIGHT)+"px",this.textarea.style.fontFamily=i,this.textarea.style.textAlign=s,this.textarea.style.color=o,this.textarea.style.fontWeight=r?"bold":"normal",this.textarea.style.fontStyle=l?"italic":"",this.textarea.style.textDecoration=d?"underline":"",this.textarea.style.overflow="auto",this.textarea.style.outline="none",this.bounds=a=this.getEditorBounds(n),this.textarea.style.left=a.x+"px",this.textarea.style.top=a.y+"px",this.textarea.style.width=a.width+"px",this.textarea.style.height=a.height+"px",this.textarea.style.zIndex=5,null==(n=this.getInitialValue(n,t))||0==n.length?(n=this.getEmptyLabelText(),this.clearOnChange=!0):this.clearOnChange=!1,this.setModified(!1),this.textarea.value=n,this.graph.container.appendChild(this.textarea),"none"!=this.textarea.style.display&&(this.autoSize&&(this.textDiv=this.createTextDiv(),document.body.appendChild(this.textDiv),this.resize()),this.textarea.focus(),this.textarea.select())}},mxCellEditor.prototype.createTextDiv=function(){var e=document.createElement("div"),t=e.style;return t.position="absolute",t.whiteSpace="nowrap",t.visibility="hidden",t.display=mxClient.IS_QUIRKS?"inline":"inline-block",t.zoom="1",t.verticalAlign="top",t.lineHeight=this.textarea.style.lineHeight,t.fontSize=this.textarea.style.fontSize,t.fontFamily=this.textarea.style.fontFamily,t.fontWeight=this.textarea.style.fontWeight,t.textAlign=this.textarea.style.textAlign,t.fontStyle=this.textarea.style.fontStyle,t.textDecoration=this.textarea.style.textDecoration,e},mxCellEditor.prototype.stopEditing=function(e){null!=this.editingCell&&(null!=this.textNode&&(this.textNode.style.visibility="visible",this.textNode=null),!e&&this.isModified()&&this.graph.labelChanged(this.editingCell,this.getCurrentValue(),this.trigger),null!=this.textDiv&&(document.body.removeChild(this.textDiv),this.textDiv=null),this.bounds=this.trigger=this.editingCell=null,this.textarea.blur(),this.textarea.parentNode.removeChild(this.textarea))},mxCellEditor.prototype.getInitialValue=function(e,t){return this.graph.getEditingValue(e.cell,t)},mxCellEditor.prototype.getCurrentValue=function(){return this.textarea.value.replace(/\r/g,"")},mxCellEditor.prototype.isHideLabel=function(e){return!0},mxCellEditor.prototype.getMinimumSize=function(e){var t=this.graph.getView().scale;return new mxRectangle(0,0,null==e.text?30:e.text.size*t+20,"left"==this.textarea.style.textAlign?120:40)},mxCellEditor.prototype.getEditorBounds=function(e){var t=this.graph.getModel().isEdge(e.cell),n=this.graph.getView().scale,a=(i=this.getMinimumSize(e)).width,i=i.height,o=parseInt(e.style[mxConstants.STYLE_SPACING]||2)*n,s=parseInt(e.style[mxConstants.STYLE_SPACING_TOP]||0)*n+o,r=parseInt(e.style[mxConstants.STYLE_SPACING_RIGHT]||0)*n+o,l=parseInt(e.style[mxConstants.STYLE_SPACING_BOTTOM]||0)*n+o;n=parseInt(e.style[mxConstants.STYLE_SPACING_LEFT]||0)*n+o,r=new mxRectangle(e.x,e.y,Math.max(a,e.width-n-r),Math.max(i,e.height-s-l));return t?(r.x=e.absoluteOffset.x,r.y=e.absoluteOffset.y,null!=e.text&&null!=e.text.boundingBox&&(0<e.text.boundingBox.x&&(r.x=e.text.boundingBox.x),0<e.text.boundingBox.y&&(r.y=e.text.boundingBox.y))):null!=e.text&&null!=e.text.boundingBox&&(r.x=Math.min(r.x,e.text.boundingBox.x),r.y=Math.min(r.y,e.text.boundingBox.y)),r.x+=n,r.y+=s,null!=e.text&&null!=e.text.boundingBox&&(t?(r.width=Math.max(a,e.text.boundingBox.width),r.height=Math.max(i,e.text.boundingBox.height)):(r.width=Math.max(r.width,e.text.boundingBox.width),r.height=Math.max(r.height,e.text.boundingBox.height))),this.graph.getModel().isVertex(e.cell)&&((t=mxUtils.getValue(e.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER))==mxConstants.ALIGN_LEFT?r.x-=e.width:t==mxConstants.ALIGN_RIGHT&&(r.x+=e.width),(t=mxUtils.getValue(e.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE))==mxConstants.ALIGN_TOP?r.y-=e.height:t==mxConstants.ALIGN_BOTTOM&&(r.y+=e.height)),r},mxCellEditor.prototype.getEmptyLabelText=function(e){return this.emptyLabelText},mxCellEditor.prototype.getEditingCell=function(){return this.editingCell},mxCellEditor.prototype.destroy=function(){null!=this.textarea&&(mxEvent.release(this.textarea),null!=this.textarea.parentNode&&this.textarea.parentNode.removeChild(this.textarea),this.textarea=null)},mxCellRenderer.prototype.defaultEdgeShape=mxConnector,mxCellRenderer.prototype.defaultVertexShape=mxRectangleShape,mxCellRenderer.prototype.defaultTextShape=mxText,mxCellRenderer.prototype.legacyControlPosition=!0,mxCellRenderer.prototype.defaultShapes={},mxCellRenderer.registerShape=function(e,t){mxCellRenderer.prototype.defaultShapes[e]=t},mxCellRenderer.registerShape(mxConstants.SHAPE_RECTANGLE,mxRectangleShape),mxCellRenderer.registerShape(mxConstants.SHAPE_ELLIPSE,mxEllipse),mxCellRenderer.registerShape(mxConstants.SHAPE_RHOMBUS,mxRhombus),mxCellRenderer.registerShape(mxConstants.SHAPE_CYLINDER,mxCylinder),mxCellRenderer.registerShape(mxConstants.SHAPE_CONNECTOR,mxConnector),mxCellRenderer.registerShape(mxConstants.SHAPE_ACTOR,mxActor),mxCellRenderer.registerShape(mxConstants.SHAPE_TRIANGLE,mxTriangle),mxCellRenderer.registerShape(mxConstants.SHAPE_HEXAGON,mxHexagon),mxCellRenderer.registerShape(mxConstants.SHAPE_CLOUD,mxCloud),mxCellRenderer.registerShape(mxConstants.SHAPE_LINE,mxLine),mxCellRenderer.registerShape(mxConstants.SHAPE_ARROW,mxArrow),mxCellRenderer.registerShape(mxConstants.SHAPE_DOUBLE_ELLIPSE,mxDoubleEllipse),mxCellRenderer.registerShape(mxConstants.SHAPE_SWIMLANE,mxSwimlane),mxCellRenderer.registerShape(mxConstants.SHAPE_IMAGE,mxImageShape),mxCellRenderer.registerShape(mxConstants.SHAPE_LABEL,mxLabel),mxCellRenderer.prototype.initialize=function(e,t){var n=e.view.graph.getModel();null!=e.view.graph.container&&null==e.shape&&e.cell!=e.view.currentRoot&&(n.isVertex(e.cell)||n.isEdge(e.cell))&&(this.createShape(e),null==e.shape||null!=t&&!t||(this.initializeShape(e),e.view.graph.ordered||n.isEdge(e.cell)?e.invalidOrder=!0:e.view.graph.keepEdgesInForeground&&null!=this.firstEdge&&(this.firstEdge.parentNode==e.shape.node.parentNode?this.insertState(e,this.firstEdge):this.firstEdge=null),e.shape.scale=e.view.scale,this.createCellOverlays(e),this.installListeners(e)))},mxCellRenderer.prototype.initializeShape=function(e){e.shape.init(e.view.getDrawPane())},mxCellRenderer.prototype.getPreviousStateInContainer=function(e,t){for(var n=null,a=e.view.graph,i=a.getModel(),o=e.cell,s=i.getParent(o);null!=s&&null==n;)n=this.findPreviousStateInContainer(a,s,o,t),o=s,s=i.getParent(o);return n},mxCellRenderer.prototype.findPreviousStateInContainer=function(e,t,n,a){var i=null,o=e.getModel();for(n=null!=n?t.getIndex(n)-1:o.getChildCount(t)-1;0<=n&&null==i;n--)i=this.findPreviousStateInContainer(e,o.getChildAt(t,n),null,a);return null!=i||(null==(i=e.view.getState(t))||null!=i.shape&&null!=i.shape.node&&i.shape.node.parentNode==a)||(i=null),i},mxCellRenderer.prototype.order=function(e){var t=e.shape.node.parentNode,n=this.getPreviousStateInContainer(e,t),a=t.firstChild;null!=n&&(a=n.shape.node,null!=n.text&&null!=n.text.node&&n.text.node.parentNode==t&&(a=n.text.node),a=a.nextSibling),this.insertState(e,a)},mxCellRenderer.prototype.orderEdge=function(e){var t=(n=e.view).graph.getModel();if(n.graph.keepEdgesInForeground)null!=this.firstEdge&&null!=this.firstEdge.parentNode&&this.firstEdge.parentNode==e.shape.node.parentNode||(this.firstEdge=e.shape.node);else if(n.graph.keepEdgesInBackground){var n,a=e.shape.node,i=a.parentNode;t=t.getParent(e.cell);null!=(i=null!=(n=n.getState(t))&&null!=n.shape&&null!=n.shape.node?n.shape.node.nextSibling:i.firstChild)&&i!=a&&this.insertState(e,i)}},mxCellRenderer.prototype.insertState=function(e,t){e.shape.node.parentNode.insertBefore(e.shape.node,t),null!=e.text&&null!=e.text.node&&e.text.node.parentNode==e.shape.node.parentNode&&e.shape.node.parentNode.insertBefore(e.text.node,e.shape.node.nextSibling)},mxCellRenderer.prototype.createShape=function(e){if(null!=e.style){var t=mxStencilRegistry.getStencil(e.style[mxConstants.STYLE_SHAPE]);null!=t?e.shape=new mxShape(t):(t=this.getShapeConstructor(e),e.shape=new t),e.shape.points=e.absolutePoints,e.shape.bounds=new mxRectangle(e.x,e.y,e.width,e.height),e.shape.dialect=e.view.graph.dialect,this.configureShape(e)}},mxCellRenderer.prototype.getShape=function(e){return null!=e?mxCellRenderer.prototype.defaultShapes[e]:null},mxCellRenderer.prototype.getShapeConstructor=function(e){var t=this.getShape(e.style[mxConstants.STYLE_SHAPE]);return null==t&&(t=e.view.graph.getModel().isEdge(e.cell)?this.defaultEdgeShape:this.defaultVertexShape),t},mxCellRenderer.prototype.configureShape=function(e){e.shape.apply(e),e.shape.image=e.view.graph.getImage(e),e.shape.indicatorShape=this.getShape(e.view.graph.getIndicatorShape(e)),e.shape.indicatorColor=e.view.graph.getIndicatorColor(e),e.shape.indicatorGradientColor=e.view.graph.getIndicatorGradientColor(e),e.shape.indicatorDirection=e.style[mxConstants.STYLE_INDICATOR_DIRECTION],e.shape.indicatorImage=e.view.graph.getIndicatorImage(e),this.postConfigureShape(e)},mxCellRenderer.prototype.postConfigureShape=function(e){null!=e.shape&&(this.resolveColor(e,"indicatorColor",mxConstants.STYLE_FILLCOLOR),this.resolveColor(e,"indicatorGradientColor",mxConstants.STYLE_GRADIENTCOLOR),this.resolveColor(e,"fill",mxConstants.STYLE_FILLCOLOR),this.resolveColor(e,"stroke",mxConstants.STYLE_STROKECOLOR),this.resolveColor(e,"gradient",mxConstants.STYLE_GRADIENTCOLOR))},mxCellRenderer.prototype.resolveColor=function(e,t,n){var a=e.shape[t],i=e.view.graph,o=null;"inherit"==a?o=i.model.getParent(e.cell):"swimlane"==a?(o=null!=i.model.getTerminal(e.cell,!1)?i.model.getTerminal(e.cell,!1):e.cell,o=i.getSwimlane(o),n=i.swimlaneIndicatorColorAttribute):"indicated"==a&&(e.shape[t]=e.shape.indicatorColor),null!=o&&(a=i.getView().getState(o),(e.shape[t]=null)!=a&&(e.shape[t]=null!=a.shape&&"indicatorColor"!=t?a.shape[t]:a.style[n]))},mxCellRenderer.prototype.getLabelValue=function(e){return e.view.graph.getLabel(e.cell)},mxCellRenderer.prototype.createLabel=function(n,e){var a=n.view.graph;if(a.getModel().isEdge(n.cell),0<n.style[mxConstants.STYLE_FONTSIZE]||null==n.style[mxConstants.STYLE_FONTSIZE]){var t=a.isHtmlLabel(n.cell)||null!=e&&mxUtils.isNode(e);n.text=new this.defaultTextShape(e,new mxRectangle,n.style[mxConstants.STYLE_ALIGN]||mxConstants.ALIGN_CENTER,a.getVerticalAlign(n),n.style[mxConstants.STYLE_FONTCOLOR],n.style[mxConstants.STYLE_FONTFAMILY],n.style[mxConstants.STYLE_FONTSIZE],n.style[mxConstants.STYLE_FONTSTYLE],n.style[mxConstants.STYLE_SPACING],n.style[mxConstants.STYLE_SPACING_TOP],n.style[mxConstants.STYLE_SPACING_RIGHT],n.style[mxConstants.STYLE_SPACING_BOTTOM],n.style[mxConstants.STYLE_SPACING_LEFT],n.style[mxConstants.STYLE_HORIZONTAL],n.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],n.style[mxConstants.STYLE_LABEL_BORDERCOLOR],a.isWrapping(n.cell)&&a.isHtmlLabel(n.cell),a.isLabelClipped(n.cell),n.style[mxConstants.STYLE_OVERFLOW],n.style[mxConstants.STYLE_LABEL_PADDING]),n.text.opacity=mxUtils.getValue(n.style,mxConstants.STYLE_TEXT_OPACITY,100),n.text.dialect=t?mxConstants.DIALECT_STRICTHTML:n.view.graph.dialect,n.text.state=n,this.initializeLabel(n);var i=!1,o=function(e){var t=n;return(mxClient.IS_TOUCH||i)&&(t=mxEvent.getClientX(e),e=mxEvent.getClientY(e),e=mxUtils.convertPoint(a.container,t,e),t=a.view.getState(a.getCellAt(e.x,e.y))),t};mxEvent.addGestureListeners(n.text.node,mxUtils.bind(this,function(e){this.isLabelEvent(n,e)&&(a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e,n)),i=a.dialect!=mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(e).nodeName)}),mxUtils.bind(this,function(e){this.isLabelEvent(n,e)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,o(e)))}),mxUtils.bind(this,function(e){this.isLabelEvent(n,e)&&(a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e,o(e))),i=!1)})),mxEvent.addListener(n.text.node,"dblclick",mxUtils.bind(this,function(e){this.isLabelEvent(n,e)&&(a.dblClick(e,n.cell),mxEvent.consume(e))}))}},mxCellRenderer.prototype.initializeLabel=function(e){var t=e.view.graph;e.text.dialect!=mxConstants.DIALECT_SVG&&(mxClient.IS_SVG&&mxClient.NO_FO?e.text.init(t.container):mxUtils.isVml(e.view.getDrawPane())&&(null!=e.shape.label?e.text.init(e.shape.label):e.text.init(e.shape.node))),null==e.text.node&&(e.text.init(e.view.getDrawPane()),null!=e.shape&&null!=e.text&&e.shape.node.parentNode.insertBefore(e.text.node,e.shape.node.nextSibling))},mxCellRenderer.prototype.createCellOverlays=function(e){var t=e.view.graph.getCellOverlays(e.cell),n=null;if(null!=t){n=new mxDictionary;for(var a=0;a<t.length;a++){var i=null!=e.overlays?e.overlays.remove(t[a]):null;null==i&&((i=new mxImageShape(new mxRectangle,t[a].image.src)).dialect=e.view.graph.dialect,i.preserveImageAspect=!1,i.overlay=t[a],this.initializeOverlay(e,i),this.installCellOverlayListeners(e,t[a],i),null!=t[a].cursor&&(i.node.style.cursor=t[a].cursor)),n.put(t[a],i)}}null!=e.overlays&&e.overlays.visit(function(e,t){t.destroy()}),e.overlays=n},mxCellRenderer.prototype.initializeOverlay=function(e,t){t.init(e.view.getOverlayPane())},mxCellRenderer.prototype.installCellOverlayListeners=function(t,n,e){var a=t.view.graph;mxEvent.addListener(e.node,"click",function(e){a.isEditing()&&a.stopEditing(!a.isInvokesStopCellEditing()),n.fireEvent(new mxEventObject(mxEvent.CLICK,"event",e,"cell",t.cell))}),mxEvent.addGestureListeners(e.node,function(e){mxEvent.consume(e)},function(e){a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,t))}),mxClient.IS_TOUCH&&mxEvent.addListener(e.node,"touchend",function(e){n.fireEvent(new mxEventObject(mxEvent.CLICK,"event",e,"cell",t.cell))})},mxCellRenderer.prototype.createControl=function(n){var a=n.view.graph,e=a.getFoldingImage(n);if(a.foldingEnabled&&null!=e){if(null==n.control){var t=new mxRectangle(0,0,e.width,e.height);n.control=new mxImageShape(t,e.src),n.control.preserveImageAspect=!1,n.control.dialect=a.dialect,this.initControl(n,n.control,!0,function(e){if(a.isEnabled()){var t=!a.isCellCollapsed(n.cell);a.foldCells(t,!1,[n.cell]),mxEvent.consume(e)}})}}else null!=n.control&&(n.control.destroy(),n.control=null)},mxCellRenderer.prototype.initControl=function(t,e,n,a){var i=t.view.graph;return i.isHtmlLabel(t.cell)&&mxClient.NO_FO&&i.dialect==mxConstants.DIALECT_SVG?(e.dialect=mxConstants.DIALECT_PREFERHTML,e.init(i.container),e.node.style.zIndex=1):e.init(t.view.getOverlayPane()),e=e.innerNode||e.node,a&&(i.isEnabled()&&(e.style.cursor="pointer"),mxEvent.addListener(e,"click",a)),n&&mxEvent.addGestureListeners(e,function(e){i.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e,t)),mxEvent.consume(e)},function(e){i.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,t))}),e},mxCellRenderer.prototype.isShapeEvent=function(e,t){return!0},mxCellRenderer.prototype.isLabelEvent=function(e,t){return!0},mxCellRenderer.prototype.installListeners=function(n){var a=n.view.graph,t=function(e){var t=n;return(a.dialect!=mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(e).nodeName||mxClient.IS_TOUCH)&&(t=mxEvent.getClientX(e),e=mxEvent.getClientY(e),e=mxUtils.convertPoint(a.container,t,e),t=a.view.getState(a.getCellAt(e.x,e.y))),t},i=!1;mxEvent.addListener(n.shape.node,"gesturestart",mxUtils.bind(this,function(e){a.lastTouchTime=0,i=!0,mxEvent.consume(e)})),mxEvent.addGestureListeners(n.shape.node,mxUtils.bind(this,function(e){this.isShapeEvent(n,e)&&!i?a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e,null!=n.shape&&mxEvent.getSource(e)==n.shape.content?null:n)):i&&mxEvent.consume(e)}),mxUtils.bind(this,function(e){this.isShapeEvent(n,e)&&!i?a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,null!=n.shape&&mxEvent.getSource(e)==n.shape.content?null:t(e))):i&&mxEvent.consume(e)}),mxUtils.bind(this,function(e){this.isShapeEvent(n,e)&&!i?a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e,null!=n.shape&&mxEvent.getSource(e)==n.shape.content?null:t(e))):i&&mxEvent.consume(e)}));var o=mxClient.IS_TOUCH?"gestureend":"dblclick";mxEvent.addListener(n.shape.node,o,mxUtils.bind(this,function(e){i=!1,"gestureend"==o?(a.lastTouchTime=0,a.gestureEnabled&&(a.handleGesture(n,e),mxEvent.consume(e))):this.isShapeEvent(n,e)&&(a.dblClick(e,null!=n.shape&&mxEvent.getSource(e)==n.shape.content?null:n.cell),mxEvent.consume(e))}))},mxCellRenderer.prototype.redrawLabel=function(e,t){var n=this.getLabelValue(e);if(null==e.text&&null!=n&&(mxUtils.isNode(n)||0<n.length)?this.createLabel(e,n):null==e.text||null!=n&&0!=n.length||(e.text.destroy(),e.text=null),null!=e.text){var a=(i=e.view.graph).isWrapping(e.cell),i=i.isLabelClipped(e.cell),o=this.getLabelBounds(e);!t&&e.text.value==n&&e.text.isWrapping==a&&e.text.isClipping==i&&e.text.scale==e.view.scale&&e.text.bounds.equals(o)||(e.text.value=n,e.text.bounds=o,e.text.scale=this.getTextScale(e),e.text.isWrapping=a,e.text.isClipping=i,e.text.redraw())}},mxCellRenderer.prototype.getTextScale=function(e){return e.view.scale},mxCellRenderer.prototype.getLabelBounds=function(e){var t=e.view.graph,n=e.view.scale,a=t.getModel().isEdge(e.cell),i=new mxRectangle(e.absoluteOffset.x,e.absoluteOffset.y);return e.text.updateMargin(),a?(a=e.text.getSpacing(),i.x+=a.x*n,i.y+=a.y*n,null!=(t=t.getCellGeometry(e.cell))&&(i.width=Math.max(0,e.text.margin.x*t.width*n-e.text.spacingLeft*n-e.text.spacingRight*n),i.height=Math.max(0,e.text.margin.y*t.height*n-e.text.spacingTop*n-e.text.spacingBottom*n))):(e.text.isPaintBoundsInverted()&&(a=i.x,i.x=i.y,i.y=a),i.x+=e.x,i.y+=e.y,i.width=Math.max(1,e.width),i.height=Math.max(1,e.height),t.isSwimlane(e.cell)&&(0<(t=t.getStartSize(e.cell)).width?(a=Math.min(i.width,t.width*n),e.shape.flipH&&(i.x+=i.width-a),i.width=a):0<t.height&&(a=Math.min(i.height,t.height*n),e.shape.flipV&&(i.y+=i.height-a),i.height=a)),this.rotateLabelBounds(e,i)),i},mxCellRenderer.prototype.rotateLabelBounds=function(e,t){if(e.text.isPaintBoundsInverted()){var n=(e.width-e.height)/2;t.x+=n,t.y-=n,n=t.width,t.width=t.height,t.height=n}if(t.x-=e.text.margin.x*t.width,t.y-=e.text.margin.y*t.height,"fill"!=e.style[mxConstants.STYLE_OVERFLOW]){n=e.view.scale;var a=e.text.getSpacing();t.x+=a.x*n,t.y+=a.y*n,t.width=Math.max(0,t.width-e.text.spacingLeft*n-e.text.spacingRight*n),t.height=Math.max(0,t.height-e.text.spacingTop*n-e.text.spacingBottom*n)}var i=e.text.getTextRotation();0!=i&&null!=e&&e.view.graph.model.isVertex(e.cell)&&(n=e.getCenterX(),a=e.getCenterY(),t.x!=n||t.y!=a)&&(i*=Math.PI/180,pt=mxUtils.getRotatedPoint(new mxPoint(t.x,t.y),Math.cos(i),Math.sin(i),new mxPoint(n,a)),t.x=pt.x,t.y=pt.y)},mxCellRenderer.prototype.redrawCellOverlays=function(o,s){if(this.createCellOverlays(o),null!=o.overlays){var r=mxUtils.mod(mxUtils.getValue(o.style,mxConstants.STYLE_ROTATION,0),90),e=mxUtils.toRadians(r),l=Math.cos(e),d=Math.sin(e);o.overlays.visit(function(e,t){var n=t.overlay.getBounds(o);if(!o.view.graph.getModel().isEdge(o.cell)&&null!=o.shape&&0!=r){var a=n.getCenterX(),i=n.getCenterY();a=(i=mxUtils.getRotatedPoint(new mxPoint(a,i),l,d,new mxPoint(o.getCenterX(),o.getCenterY()))).x,i=i.y;n.x=Math.round(a-n.width/2),n.y=Math.round(i-n.height/2)}!s&&null!=t.bounds&&t.scale==o.view.scale&&t.bounds.equals(n)||(t.bounds=n,t.scale=o.view.scale,t.redraw())})}},mxCellRenderer.prototype.redrawControl=function(e,t){if(null!=e.control){var n=this.getControlBounds(e),a=this.legacyControlPosition?mxUtils.getValue(e.style,mxConstants.STYLE_ROTATION,0):e.shape.getTextRotation(),i=e.view.scale;!t&&e.control.scale==i&&e.control.bounds.equals(n)&&e.control.rotation==a||(e.control.rotation=a,e.control.bounds=n,e.control.scale=i,e.control.redraw())}},mxCellRenderer.prototype.getControlBounds=function(e){if(null!=e.control){var t=e.control.scale,n=e.control.bounds.width/t,a=(t=e.control.bounds.height/t,e.view.scale),i=e.getCenterX(),o=e.getCenterY();if(!e.view.graph.getModel().isEdge(e.cell)&&(i=e.x+n*a,o=e.y+t*a,null!=e.shape)){var s=e.shape.getShapeRotation();if(this.legacyControlPosition)s=mxUtils.getValue(e.style,mxConstants.STYLE_ROTATION,0);else if(e.shape.isPaintBoundsInverted()){var r=(e.width-e.height)/2;i=i+r,o=o-r}0!=s&&(r=mxUtils.toRadians(s),s=Math.cos(r),r=Math.sin(r),i=(o=mxUtils.getRotatedPoint(new mxPoint(i,o),s,r,new mxPoint(e.getCenterX(),e.getCenterY()))).x,o=o.y)}return e.view.graph.getModel().isEdge(e.cell),new mxRectangle(Math.round(i-n/2*a),Math.round(o-t/2*a),Math.round(n*a),Math.round(t*a))}return null},mxCellRenderer.prototype.redraw=function(e,t,n){if(null!=e.shape){var a=!1;e.view.graph.getModel().isEdge(e.cell),reconfigure=null!=t&&t,this.createControl(e),(e.orderChanged||e.invalidOrder)&&(e.view.graph.ordered?this.order(e):this.orderEdge(e)),!e.orderChanged&&mxUtils.equalEntries(e.shape.style,e.style)||(this.configureShape(e),t=!0),delete e.invalidOrder,delete e.orderChanged,!t&&null!=e.shape.bounds&&e.shape.scale==e.view.scale&&e.shape.bounds.equals(e)&&mxUtils.equalPoints(e.shape.points,e.absolutePoints)||(a=!0,e.shape.points=null!=e.absolutePoints?e.absolutePoints.slice():null,e.shape.bounds=new mxRectangle(e.x,e.y,e.width,e.height),e.shape.scale=e.view.scale,null==n||n?e.shape.redraw():e.shape.updateBoundingBox()),(null==n||n)&&(this.redrawLabel(e,a),this.redrawCellOverlays(e,a),this.redrawControl(e,a))}},mxCellRenderer.prototype.destroy=function(e){null!=e.shape&&(null!=e.text&&(e.text.destroy(),e.text=null),null!=e.overlays&&(e.overlays.visit(function(e,t){t.destroy()}),e.overlays=null),null!=e.control&&(e.control.destroy(),e.control=null),e.shape.destroy(),e.shape=null)};var mxEdgeStyle={EntityRelation:function(e,t,n,a,i){var o=e.view,s=o.graph;a=mxUtils.getValue(e.style,mxConstants.STYLE_SEGMENT,mxConstants.ENTITY_SEGMENT)*o.scale;var r=(d=e.absolutePoints)[0],l=d[d.length-1],d=!1;if(null!=r)(t=new mxCellState).x=r.x,t.y=r.y;else{if(null==t)return;var c=mxUtils.getPortConstraints(t,e,!0,mxConstants.DIRECTION_MASK_NONE);c!=mxConstants.DIRECTION_MASK_NONE?d=c==mxConstants.DIRECTION_MASK_WEST:(r=s.getCellGeometry(t.cell)).relative?d=r.x<=.5:null!=n&&(d=n.x+n.width<t.x)}r=!0,null!=l?((n=new mxCellState).x=l.x,n.y=l.y):null!=n&&((c=mxUtils.getPortConstraints(n,e,!1,mxConstants.DIRECTION_MASK_NONE))!=mxConstants.DIRECTION_MASK_NONE?r=c==mxConstants.DIRECTION_MASK_WEST:(e=s.getCellGeometry(n.cell)).relative?r=e.x<=.5:null!=t&&(r=t.x+t.width<n.x)),null!=t&&null!=n&&(e=d?t.x:t.x+t.width,t=o.getRoutingCenterY(t),s=r?n.x:n.x+n.width,n=o.getRoutingCenterY(n),o=new mxPoint(e+(d?-a:a),t),l=new mxPoint(s+(r?-a:a),n),d==r?(a=d?Math.min(e,s)-a:Math.max(e,s)+a,i.push(new mxPoint(a,t)),i.push(new mxPoint(a,n))):(o.x<l.x==d?(a=t+(n-t)/2,i.push(o),i.push(new mxPoint(o.x,a)),i.push(new mxPoint(l.x,a))):i.push(o),i.push(l)))},Loop:function(e,t,n,a,i){if(null!=t){var o=(n=e.view).graph;null!=(a=null!=a&&0<a.length?a[0]:null)&&(a=n.transformControlPoint(e,a),mxUtils.contains(t,a.x,a.y)&&(a=null));var s=0,r=0,l=0,d=0;o=mxUtils.getValue(e.style,mxConstants.STYLE_SEGMENT,o.gridSize)*n.scale;(e=mxUtils.getValue(e.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_WEST))==mxConstants.DIRECTION_NORTH||e==mxConstants.DIRECTION_SOUTH?(s=n.getRoutingCenterX(t),r=o):(l=n.getRoutingCenterY(t),d=o),null==a||a.x<t.x||a.x>t.x+t.width?null!=a?(s=a.x,d=Math.max(Math.abs(l-a.y),d)):e==mxConstants.DIRECTION_NORTH?l=t.y-2*r:e==mxConstants.DIRECTION_SOUTH?l=t.y+t.height+2*r:s=e==mxConstants.DIRECTION_EAST?t.x-2*d:t.x+t.width+2*d:null!=a&&(s=n.getRoutingCenterX(t),r=Math.max(Math.abs(s-a.x),d),l=a.y,d=0),i.push(new mxPoint(s-r,l-d)),i.push(new mxPoint(s+r,l+d))}},ElbowConnector:function(e,t,n,a,i){var o=null!=a&&0<a.length?a[0]:null,s=!1,r=!1;if(null!=t&&null!=n)if(null!=o){var l=Math.min(t.x,n.x),d=Math.max(t.x+t.width,n.x+n.width),c=(r=Math.min(t.y,n.y),Math.max(t.y+t.height,n.y+n.height));s=(o=e.view.transformControlPoint(e,o)).y<r||o.y>c,r=o.x<l||o.x>d}else(s=(l=Math.max(t.x,n.x))==(d=Math.min(t.x+t.width,n.x+n.width)))||(r=(r=Math.max(t.y,n.y))==(c=Math.min(t.y+t.height,n.y+n.height)));r||!s&&e.style[mxConstants.STYLE_ELBOW]!=mxConstants.ELBOW_VERTICAL?mxEdgeStyle.SideToSide(e,t,n,a,i):mxEdgeStyle.TopToBottom(e,t,n,a,i)},SideToSide:function(e,t,n,a,i){var o=e.view;a=null!=a&&0<a.length?a[0]:null;var s=(r=e.absolutePoints)[0],r=r[r.length-1];null!=a&&(a=o.transformControlPoint(e,a)),null!=s&&((t=new mxCellState).x=s.x,t.y=s.y),null!=r&&((n=new mxCellState).x=r.x,n.y=r.y),null!=t&&null!=n&&(e=Math.max(t.x,n.x),s=Math.min(t.x+t.width,n.x+n.width),e=null!=a?a.x:s+(e-s)/2,s=o.getRoutingCenterY(t),o=o.getRoutingCenterY(n),null!=a&&(a.y>=t.y&&a.y<=t.y+t.height&&(s=a.y),a.y>=n.y&&a.y<=n.y+n.height&&(o=a.y)),!mxUtils.contains(n,e,s)&&!mxUtils.contains(t,e,s)&&i.push(new mxPoint(e,s)),!mxUtils.contains(n,e,o)&&!mxUtils.contains(t,e,o)&&i.push(new mxPoint(e,o)),1==i.length&&(null!=a?!mxUtils.contains(n,e,a.y)&&!mxUtils.contains(t,e,a.y)&&i.push(new mxPoint(e,a.y)):(o=Math.max(t.y,n.y),t=Math.min(t.y+t.height,n.y+n.height),i.push(new mxPoint(e,o+(t-o)/2)))))},TopToBottom:function(e,t,n,a,i){var o=e.view;a=null!=a&&0<a.length?a[0]:null;var s=(r=e.absolutePoints)[0],r=r[r.length-1];null!=a&&(a=o.transformControlPoint(e,a)),null!=s&&((t=new mxCellState).x=s.x,t.y=s.y),null!=r&&((n=new mxCellState).x=r.x,n.y=r.y),null!=t&&null!=n&&(s=Math.max(t.y,n.y),r=Math.min(t.y+t.height,n.y+n.height),e=o.getRoutingCenterX(t),null!=a&&a.x>=t.x&&a.x<=t.x+t.width&&(e=a.x),s=null!=a?a.y:r+(s-r)/2,!mxUtils.contains(n,e,s)&&!mxUtils.contains(t,e,s)&&i.push(new mxPoint(e,s)),e=null!=a&&a.x>=n.x&&a.x<=n.x+n.width?a.x:o.getRoutingCenterX(n),!mxUtils.contains(n,e,s)&&!mxUtils.contains(t,e,s)&&i.push(new mxPoint(e,s)),1==i.length&&(null!=a&&1==i.length?!mxUtils.contains(n,a.x,s)&&!mxUtils.contains(t,a.x,s)&&i.push(new mxPoint(a.x,s)):(o=Math.max(t.x,n.x),t=Math.min(t.x+t.width,n.x+n.width),i.push(new mxPoint(o+(t-o)/2,s)))))},SegmentConnector:function(e,t,n,a,i){var o=e.absolutePoints,s=!0,r=null,l=o[0];null==l&&null!=t?l=new mxPoint(e.view.getRoutingCenterX(t),e.view.getRoutingCenterY(t)):null!=l&&(l=l.clone());var d=o.length-1;if(null!=a&&0<a.length){r=e.view.transformControlPoint(e,a[0]);for(var c=t,m=o[0],u=!1,p=!1,g=(u=r,a.length),v=0;v<2;v++){var h=null!=m&&m.x==u.x,b=null!=m&&m.y==u.y,f=null!=c&&u.y>=c.y&&u.y<=c.y+c.height;c=null!=c&&u.x>=c.x&&u.x<=c.x+c.width,u=b||null==m&&f,p=h||null==m&&c;if(null!=m&&!b&&!h&&(f||c)){s=!f;break}if(p||u){s=u,1==v&&(s=0==a.length%2?u:p);break}c=n,m=o[d],u=e.view.transformControlPoint(e,a[g-1])}for(s&&(null!=o[0]&&o[0].y!=r.y||null==o[0]&&null!=t&&(r.y<t.y||r.y>t.y+t.height))?i.push(new mxPoint(l.x,r.y)):!s&&(null!=o[0]&&o[0].x!=r.x||null==o[0]&&null!=t&&(r.x<t.x||r.x>t.x+t.width))&&i.push(new mxPoint(r.x,l.y)),s?l.y=r.y:l.x=r.x,v=0;v<a.length;v++)s=!s,r=e.view.transformControlPoint(e,a[v]),s?l.y=r.y:l.x=r.x,i.push(l.clone())}else r=l,s=!0;if(null==(l=o[d])&&null!=n&&(l=new mxPoint(e.view.getRoutingCenterX(n),e.view.getRoutingCenterY(n))),s&&(null!=o[d]&&o[d].y!=r.y||null==o[d]&&null!=n&&(r.y<n.y||r.y>n.y+n.height))?i.push(new mxPoint(l.x,r.y)):!s&&(null!=o[d]&&o[d].x!=r.x||null==o[d]&&null!=n&&(r.x<n.x||r.x>n.x+n.width))&&i.push(new mxPoint(r.x,l.y)),null==o[0]&&null!=t)for(;1<i.length&&mxUtils.contains(t,i[1].x,i[1].y);)i=i.splice(1,1);if(null==o[d]&&null!=n)for(;1<i.length&&mxUtils.contains(n,i[i.length-1].x,i[i.length-1].y);)i=i.splice(i.length-1,1)},orthBuffer:10,dirVectors:[[-1,0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,2568]],[[2081,2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,VERTEX_MASK:3072,OrthConnector:function(e,t,n,a,i){var o=e.view.graph,s=null!=t&&o.getModel().isEdge(t.cell);o=null!=n&&o.getModel().isEdge(n.cell);if(null!=a&&0<a.length||s||o)mxEdgeStyle.SegmentConnector(e,t,n,a,i);else{var r=(a=e.absolutePoints)[0],l=a[a.length-1];a=null!=t?t.x:r.x;s=null!=t?t.y:r.y;var d=null!=t?t.width:1,c=null!=t?t.height:1,m=null!=n?n.x:l.x,u=null!=n?n.y:l.y,p=null!=n?n.width:1,g=null!=n?n.height:1,v=(o=e.view.scale*mxEdgeStyle.orthBuffer,[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL]);for(null!=t&&(v[0]=mxUtils.getPortConstraints(t,e,!0,mxConstants.DIRECTION_MASK_ALL)),null!=n&&(v[1]=mxUtils.getPortConstraints(n,e,!1,mxConstants.DIRECTION_MASK_ALL)),e=[0,0],a=[[a,s,d,c],[m,u,p,g]],d=0;d<2;d++)mxEdgeStyle.limits[d][1]=a[d][0]-o,mxEdgeStyle.limits[d][2]=a[d][1]-o,mxEdgeStyle.limits[d][4]=a[d][0]+a[d][2]+o,mxEdgeStyle.limits[d][8]=a[d][1]+a[d][3]+o;for(d=a[0][0]+a[0][2]/2-(a[1][0]+a[1][2]/2),c=a[0][1]+a[0][3]/2-(a[1][1]+a[1][3]/2),d<(s=0)?s=c<0?2:1:c<=0&&(s=3,0==d&&(s=2)),(c=null)!=t&&(c=r),t=[[.5,.5],[.5,.5]],d=0;d<2;d++)null!=c&&(t[d][0]=(c.x-a[d][0])/a[d][2],t[d][0]<.01?e[d]=mxConstants.DIRECTION_MASK_WEST:.99<t[d][0]&&(e[d]=mxConstants.DIRECTION_MASK_EAST),t[d][1]=(c.y-a[d][1])/a[d][3],t[d][1]<.01?e[d]=mxConstants.DIRECTION_MASK_NORTH:.99<t[d][1]&&(e[d]=mxConstants.DIRECTION_MASK_SOUTH)),(c=null)!=n&&(c=l);for(d=a[0][1]-(a[1][1]+a[1][3]),c=a[0][0]-(a[1][0]+a[1][2]),m=a[1][1]-(a[0][1]+a[0][3]),u=a[1][0]-(a[0][0]+a[0][2]),mxEdgeStyle.vertexSeperations[1]=Math.max(c-2*o,0),mxEdgeStyle.vertexSeperations[2]=Math.max(d-2*o,0),mxEdgeStyle.vertexSeperations[4]=Math.max(m-2*o,0),mxEdgeStyle.vertexSeperations[3]=Math.max(u-2*o,0),n=[],l=[],(r=[])[0]=u<=c?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST,l[0]=m<=d?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH,r[1]=mxUtils.reversePortConstraints(r[0]),l[1]=mxUtils.reversePortConstraints(l[0]),c=u<=c?c:u,m=m<=d?d:m,p=!(u=[[0,0],[0,0]]),d=0;d<2;d++)0==e[d]&&(0==(r[d]&v[d])&&(r[d]=mxUtils.reversePortConstraints(r[d])),0==(l[d]&v[d])&&(l[d]=mxUtils.reversePortConstraints(l[d])),u[d][0]=l[d],u[d][1]=r[d]);for(2*o<m&&2*o<c&&(0<(r[0]&v[0])&&0<(l[1]&v[1])?(u[0][0]=r[0],u[0][1]=l[0],u[1][0]=l[1],u[1][1]=r[1],p=!0):0<(l[0]&v[0])&&0<(r[1]&v[1])&&(u[0][0]=l[0],u[0][1]=r[0],u[1][0]=r[1],u[1][1]=l[1],p=!0)),2*o<m&&!p&&(u[0][0]=l[0],u[0][1]=r[0],u[1][0]=l[1],u[1][1]=r[1],p=!0),2*o<c&&!p&&(u[0][0]=r[0],u[0][1]=l[0],u[1][0]=r[1],u[1][1]=l[1]),d=0;d<2;d++)0==e[d]&&(0==(u[d][0]&v[d])&&(u[d][0]=u[d][1]),n[d]=u[d][0]&v[d],n[d]|=(u[d][1]&v[d])<<8,n[d]|=(u[1-d][d]&v[d])<<16,n[d]|=(u[1-d][1-d]&v[d])<<24,0==(15&n[d])&&(n[d]<<=8),0==(3840&n[d])&&(n[d]=15&n[d]|n[d]>>8),0==(983040&n[d])&&(n[d]=65535&n[d]|(251658240&n[d])>>8),e[d]=15&n[d],v[d]==mxConstants.DIRECTION_MASK_WEST||v[d]==mxConstants.DIRECTION_MASK_NORTH||v[d]==mxConstants.DIRECTION_MASK_EAST||v[d]==mxConstants.DIRECTION_MASK_SOUTH)&&(e[d]=v[d]);switch(d=e[0]==mxConstants.DIRECTION_MASK_EAST?3:e[0],v=e[1]==mxConstants.DIRECTION_MASK_EAST?3:e[1],(d-=s)<1&&(d+=4),(v-=s)<1&&(v+=4),v=mxEdgeStyle.routePatterns[d-1][v-1],mxEdgeStyle.wayPoints1[0][0]=a[0][0],mxEdgeStyle.wayPoints1[0][1]=a[0][1],e[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=o,mxEdgeStyle.wayPoints1[0][1]+=t[0][1]*a[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=t[0][0]*a[0][2],mxEdgeStyle.wayPoints1[0][1]+=a[0][3]+o;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=a[0][2]+o,mxEdgeStyle.wayPoints1[0][1]+=t[0][1]*a[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=t[0][0]*a[0][2],mxEdgeStyle.wayPoints1[0][1]-=o}for(r=n=(o=0)<(e[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?0:1,d=l=0;d<v.length;d++){g=(l=15&v[d])==mxConstants.DIRECTION_MASK_EAST?3:l,4<(g+=s)&&(g-=4),c=mxEdgeStyle.dirVectors[g-1],(l=0<g%2?0:1)!=n&&(o++,mxEdgeStyle.wayPoints1[o][0]=mxEdgeStyle.wayPoints1[o-1][0],mxEdgeStyle.wayPoints1[o][1]=mxEdgeStyle.wayPoints1[o-1][1]);var h=0<(v[d]&mxEdgeStyle.TARGET_MASK);p=0<(v[d]&mxEdgeStyle.SOURCE_MASK);15<(m=(m=(v[d]&mxEdgeStyle.SIDE_MASK)>>5)<<s)&&(m>>=4),u=0<(v[d]&mxEdgeStyle.CENTER_MASK),(p||h)&&m<9?(g=0,p=p?0:1,g=u&&0==l?a[p][0]+t[p][0]*a[p][2]:u?a[p][1]+t[p][1]*a[p][3]:mxEdgeStyle.limits[p][m],0==l?0<(m=(g-mxEdgeStyle.wayPoints1[o][0])*c[0])&&(mxEdgeStyle.wayPoints1[o][0]+=c[0]*m):0<(m=(g-mxEdgeStyle.wayPoints1[o][1])*c[1])&&(mxEdgeStyle.wayPoints1[o][1]+=c[1]*m)):u&&(mxEdgeStyle.wayPoints1[o][0]+=c[0]*Math.abs(mxEdgeStyle.vertexSeperations[g]/2),mxEdgeStyle.wayPoints1[o][1]+=c[1]*Math.abs(mxEdgeStyle.vertexSeperations[g]/2)),0<o&&mxEdgeStyle.wayPoints1[o][l]==mxEdgeStyle.wayPoints1[o-1][l]?o--:n=l}for(d=0;d<=o&&(d!=o||((0<(e[1]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?0:1)==r?0:1)==(o+1)%2);d++)i.push(new mxPoint(mxEdgeStyle.wayPoints1[d][0],mxEdgeStyle.wayPoints1[d][1]))}},getRoutePattern:function(e,t,n,a){var i=e[0]==mxConstants.DIRECTION_MASK_EAST?3:e[0];return e=e[1]==mxConstants.DIRECTION_MASK_EAST?3:e[1],(i-=t)<1&&(i+=4),(e-=t)<1&&(e+=4),t=routePatterns[i-1][e-1],0!=n&&0!=a||null!=inlineRoutePatterns[i-1][e-1]&&(t=inlineRoutePatterns[i-1][e-1]),t}},mxStyleRegistry={values:[],putValue:function(e,t){mxStyleRegistry.values[e]=t},getValue:function(e){return mxStyleRegistry.values[e]},getName:function(e){for(var t in mxStyleRegistry.values)if(mxStyleRegistry.values[t]==e)return t;return null}};function mxGraphView(e){this.graph=e,this.translate=new mxPoint,this.graphBounds=new mxRectangle,this.states=new mxDictionary}function mxCurrentRootChange(e,t){if(this.view=e,this.previous=this.root=t,this.isUp=null==t,!this.isUp)for(var n=this.view.currentRoot,a=this.view.graph.getModel();null!=n;){if(n==t){this.isUp=!0;break}n=a.getParent(n)}}function mxGraph(e,t,n,a){this.mouseListeners=null,this.renderHint=n,this.dialect=mxClient.IS_SVG?mxConstants.DIALECT_SVG:n==mxConstants.RENDERING_HINT_EXACT&&mxClient.IS_VML?mxConstants.DIALECT_VML:n==mxConstants.RENDERING_HINT_FASTEST?mxConstants.DIALECT_STRICTHTML:n==mxConstants.RENDERING_HINT_FASTER?mxConstants.DIALECT_PREFERHTML:mxConstants.DIALECT_MIXEDHTML,this.model=null!=t?t:new mxGraphModel,this.multiplicities=[],this.imageBundles=[],this.cellRenderer=this.createCellRenderer(),this.setSelectionModel(this.createSelectionModel()),this.setStylesheet(null!=a?a:this.createStylesheet()),this.view=this.createGraphView(),this.graphModelChangeListener=mxUtils.bind(this,function(e,t){this.graphModelChanged(t.getProperty("edit").changes)}),this.model.addListener(mxEvent.CHANGE,this.graphModelChangeListener),this.createHandlers(),null!=e&&this.init(e),this.view.revalidate()}function mxCellOverlay(e,t,n,a,i,o){this.image=e,this.tooltip=t,this.align=null!=n?n:this.align,this.verticalAlign=null!=a?a:this.verticalAlign,this.offset=null!=i?i:new mxPoint,this.cursor=null!=o?o:"help"}function mxOutline(e,t){this.source=e,null!=t&&this.init(t)}function mxMultiplicity(e,t,n,a,i,o,s,r,l,d){this.source=e,this.type=t,this.attr=n,this.value=a,this.min=null!=i?i:0,this.max=null!=o?o:"n",this.validNeighbors=s,this.countError=mxResources.get(r)||r,this.typeError=mxResources.get(l)||l,this.validNeighborsAllowed=null==d||d}function mxLayoutManager(e){this.undoHandler=mxUtils.bind(this,function(e,t){this.isEnabled()&&this.beforeUndo(t.getProperty("edit"))}),this.moveHandler=mxUtils.bind(this,function(e,t){this.isEnabled()&&this.cellsMoved(t.getProperty("cells"),t.getProperty("event"))}),this.setGraph(e)}function mxSpaceManager(e,t,n,a){this.resizeHandler=mxUtils.bind(this,function(e,t){this.isEnabled()&&this.cellsResized(t.getProperty("cells"))}),this.foldHandler=mxUtils.bind(this,function(e,t){this.isEnabled()&&this.cellsResized(t.getProperty("cells"))}),this.shiftRightwards=null==t||t,this.shiftDownwards=null==n||n,this.extendParents=null==a||a,this.setGraph(e)}function mxSwimlaneManager(e,t,n,a){this.horizontal=null==t||t,this.addEnabled=null==n||n,this.resizeEnabled=null==a||a,this.addHandler=mxUtils.bind(this,function(e,t){this.isEnabled()&&this.isAddEnabled()&&this.cellsAdded(t.getProperty("cells"))}),this.resizeHandler=mxUtils.bind(this,function(e,t){this.isEnabled()&&this.isResizeEnabled()&&this.cellsResized(t.getProperty("cells"))}),this.setGraph(e)}function mxTemporaryCellStates(e,t,n){if(this.view=e,t=null!=t?t:1,this.oldBounds=e.getGraphBounds(),this.oldStates=e.getStates(),this.oldScale=e.getScale(),e.setStates(new mxDictionary),e.setScale(t),null!=n){t=e.createState(new mxCell);for(var a=0;a<n.length;a++)e.validateBounds(t,n[a]);var i=null;for(a=0;a<n.length;a++){var o=e.validatePoints(t,n[a]);null==i?i=o:i.add(o)}null==i&&(i=new mxRectangle),e.setGraphBounds(i)}}function mxCellStatePreview(e){this.graph=e,this.deltas={}}function mxConnectionConstraint(e,t){this.point=e,this.perimeter=null==t||t}function mxGraphHandler(e){this.graph=e,this.graph.addMouseListener(this),this.panHandler=mxUtils.bind(this,function(){this.updatePreviewShape()}),this.graph.addListener(mxEvent.PAN,this.panHandler)}function mxPanningHandler(e,t){null!=e&&(this.graph=e,this.factoryMethod=t,this.graph.addMouseListener(this),this.init())}function mxCellMarker(e,t,n,a){mxEventSource.call(this),null!=e&&(this.graph=e,this.validColor=null!=t?t:mxConstants.DEFAULT_VALID_COLOR,this.invalidColor=null!=t?n:mxConstants.DEFAULT_INVALID_COLOR,this.hotspot=null!=a?a:mxConstants.DEFAULT_HOTSPOT,this.highlight=new mxCellHighlight(e))}function mxSelectionCellsHandler(e){mxEventSource.call(this),this.graph=e,this.handlers=new mxDictionary,this.graph.addMouseListener(this),this.refreshHandler=mxUtils.bind(this,function(e,t){this.isEnabled()&&this.refresh()}),this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.refreshHandler),this.graph.getModel().addListener(mxEvent.CHANGE,this.refreshHandler),this.graph.getView().addListener(mxEvent.SCALE,this.refreshHandler),this.graph.getView().addListener(mxEvent.TRANSLATE,this.refreshHandler),this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.refreshHandler),this.graph.getView().addListener(mxEvent.DOWN,this.refreshHandler),this.graph.getView().addListener(mxEvent.UP,this.refreshHandler)}function mxConnectionHandler(e,t){mxEventSource.call(this),null!=e&&(this.graph=e,this.factoryMethod=t,this.init())}function mxConstraintHandler(e){this.graph=e}function mxRubberband(e){null!=e&&(this.graph=e,this.graph.addMouseListener(this),this.panHandler=mxUtils.bind(this,function(){this.repaint()}),this.graph.addListener(mxEvent.PAN,this.panHandler),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})))}function mxVertexHandler(e){null!=e&&(this.state=e,this.init())}function mxEdgeHandler(e){null!=e&&(this.state=e,this.init())}function mxElbowEdgeHandler(e){mxEdgeHandler.call(this,e)}function mxEdgeSegmentHandler(e){mxEdgeHandler.call(this,e)}function mxKeyHandler(e,t){null!=e&&(this.graph=e,this.target=t||document.documentElement,this.normalKeys=[],this.shiftKeys=[],this.controlKeys=[],this.controlShiftKeys=[],mxEvent.addListener(this.target,"keydown",mxUtils.bind(this,function(e){this.keyDown(e)})),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})))}function mxTooltipHandler(e,t){null!=e&&(this.graph=e,this.delay=t||500,this.graph.addMouseListener(this))}function mxCellTracker(e,t,n){mxCellMarker.call(this,e,t),this.graph.addMouseListener(this),null!=n&&(this.getCell=n),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()}))}function mxCellHighlight(e,t,n,a){null!=e&&(this.graph=e,this.highlightColor=null!=t?t:mxConstants.DEFAULT_VALID_COLOR,this.strokeWidth=null!=n?n:mxConstants.HIGHLIGHT_STROKEWIDTH,this.dashed=null!=a&&a,this.repaintHandler=mxUtils.bind(this,function(){this.repaint()}),this.graph.getView().addListener(mxEvent.SCALE,this.repaintHandler),this.graph.getView().addListener(mxEvent.TRANSLATE,this.repaintHandler),this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler),this.graph.getModel().addListener(mxEvent.CHANGE,this.repaintHandler),this.resetHandler=mxUtils.bind(this,function(){this.hide()}),this.graph.getView().addListener(mxEvent.DOWN,this.resetHandler),this.graph.getView().addListener(mxEvent.UP,this.resetHandler))}function mxDefaultKeyHandler(t){if(null!=t){this.editor=t,this.handler=new mxKeyHandler(t.graph);var n=this.handler.escape;this.handler.escape=function(e){n.apply(this,arguments),t.hideProperties(),t.fireEvent(new mxEventObject(mxEvent.ESCAPE,"event",e))}}}function mxDefaultPopupMenu(e){this.config=e}function mxDefaultToolbar(e,t){this.editor=t,null!=e&&null!=t&&this.init(e)}function mxEditor(e){this.actions=[],this.addActions(),null!=document.body&&(this.cycleAttributeValues=[],this.popupHandler=new mxDefaultPopupMenu,this.undoManager=new mxUndoManager,this.graph=this.createGraph(),this.toolbar=this.createToolbar(),this.keyHandler=new mxDefaultKeyHandler(this),this.configure(e),this.graph.swimlaneIndicatorColorAttribute=this.cycleAttributeName,!mxClient.IS_LOCAL&&null!=this.urlInit&&(this.session=this.createSession()),null!=this.onInit&&this.onInit(),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})))}mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector),mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation),mxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop),mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide),mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom),mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector),mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector),mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter),mxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter),mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter),mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter),mxGraphView.prototype=new mxEventSource,mxGraphView.prototype.constructor=mxGraphView,mxGraphView.prototype.EMPTY_POINT=new mxPoint,mxGraphView.prototype.doneResource="none"!=mxClient.language?"done":"",mxGraphView.prototype.updatingDocumentResource="none"!=mxClient.language?"updatingDocument":"",mxGraphView.prototype.allowEval=!1,mxGraphView.prototype.captureDocumentGesture=!0,mxGraphView.prototype.optimizeVmlReflows=!0,mxGraphView.prototype.rendering=!0,mxGraphView.prototype.graph=null,mxGraphView.prototype.currentRoot=null,mxGraphView.prototype.graphBounds=null,mxGraphView.prototype.scale=1,mxGraphView.prototype.translate=null,mxGraphView.prototype.updateStyle=!1,mxGraphView.prototype.getGraphBounds=function(){return this.graphBounds},mxGraphView.prototype.setGraphBounds=function(e){this.graphBounds=e},mxGraphView.prototype.getBounds=function(e){var t=null;if(null!=e&&0<e.length)for(var n=this.graph.getModel(),a=0;a<e.length;a++)if(n.isVertex(e[a])||n.isEdge(e[a])){var i=this.getState(e[a]);null!=i&&(null==t?t=new mxRectangle(i.x,i.y,i.width,i.height):t.add(i))}return t},mxGraphView.prototype.setCurrentRoot=function(e){if(this.currentRoot!=e){var t=new mxCurrentRootChange(this,e);t.execute();var n=new mxUndoableEdit(this,!1);n.add(t),this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",n)),this.graph.sizeDidChange()}return e},mxGraphView.prototype.scaleAndTranslate=function(e,t,n){var a=this.scale,i=new mxPoint(this.translate.x,this.translate.y);this.scale==e&&this.translate.x==t&&this.translate.y==n||(this.scale=e,this.translate.x=t,this.translate.y=n,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange())),this.fireEvent(new mxEventObject(mxEvent.SCALE_AND_TRANSLATE,"scale",e,"previousScale",a,"translate",this.translate,"previousTranslate",i))},mxGraphView.prototype.getScale=function(){return this.scale},mxGraphView.prototype.setScale=function(e){var t=this.scale;this.scale!=e&&(this.scale=e,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange())),this.fireEvent(new mxEventObject(mxEvent.SCALE,"scale",e,"previousScale",t))},mxGraphView.prototype.getTranslate=function(){return this.translate},mxGraphView.prototype.setTranslate=function(e,t){var n=new mxPoint(this.translate.x,this.translate.y);this.translate.x==e&&this.translate.y==t||(this.translate.x=e,this.translate.y=t,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange())),this.fireEvent(new mxEventObject(mxEvent.TRANSLATE,"translate",this.translate,"previousTranslate",n))},mxGraphView.prototype.refresh=function(){null!=this.currentRoot&&this.clear(),this.revalidate()},mxGraphView.prototype.revalidate=function(){this.invalidate(),this.validate()},mxGraphView.prototype.clear=function(e,t,n){var a=this.graph.getModel();if(e=e||a.getRoot(),t=null!=t&&t,n=null==n||n,this.removeState(e),n&&(t||e!=this.currentRoot)){n=a.getChildCount(e);for(var i=0;i<n;i++)this.clear(a.getChildAt(e,i),t)}else this.invalidate(e)},mxGraphView.prototype.invalidate=function(e,t,n,a){var i=this.graph.getModel();if(e=e||i.getRoot(),t=null==t||t,n=null==n||n,a=null!=a&&a,null!=(s=this.getState(e))&&(s.invalid=!0,a&&(s.orderChanged=!0)),t)for(var o=i.getChildCount(e),s=0;s<o;s++){var r=i.getChildAt(e,s);this.invalidate(r,t,n,a)}if(n)for(a=i.getEdgeCount(e),s=0;s<a;s++)this.invalidate(i.getEdgeAt(e,s),t,n)},mxGraphView.prototype.validate=function(e){var t=mxLog.enter("mxGraphView.validate");window.status=mxResources.get(this.updatingDocumentResource)||this.updatingDocumentResource;var n=null;if(this.optimizeVmlReflows&&null!=this.canvas&&null==this.textDiv&&(8==document.documentMode||mxClient.IS_QUIRKS)){n=this.canvas.style.display,this.canvas.style.display="none";var a=document.createElement("div");a.style.position="absolute",a.style.whiteSpace="nowrap",a.style.visibility="hidden",a.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",a.style.zoom="1",document.body.appendChild(a),this.textDiv=a}e=e||(null!=this.currentRoot?this.currentRoot:this.graph.getModel().getRoot()),this.validateBounds(null,e),null==(e=this.validatePoints(null,e))&&(e=new mxRectangle),this.setGraphBounds(e),this.validateBackground(),null!=n&&(this.canvas.style.display=n,document.body.removeChild(this.textDiv),this.textDiv=null),window.status=mxResources.get(this.doneResource)||this.doneResource,mxLog.leave("mxGraphView.validate",t)},mxGraphView.prototype.createBackgroundPageShape=function(e){return new mxRectangleShape(e,"white","black")},mxGraphView.prototype.validateBackground=function(){var e=this.graph.getBackgroundImage();if(null!=e){if(null==this.backgroundImage||this.backgroundImage.image!=e.src){null!=this.backgroundImage&&this.backgroundImage.destroy();var t=new mxRectangle(0,0,1,1);this.backgroundImage=new mxImageShape(t,e.src),this.backgroundImage.dialect=this.graph.dialect,this.backgroundImage.init(this.backgroundPane),this.backgroundImage.redraw()}this.redrawBackgroundImage(this.backgroundImage,e)}else null!=this.backgroundImage&&(this.backgroundImage.destroy(),this.backgroundImage=null);this.graph.pageVisible?(t=this.getBackgroundPageBounds(),null==this.backgroundPageShape?(this.backgroundPageShape=this.createBackgroundPageShape(t),this.backgroundPageShape.scale=this.scale,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=this.graph.dialect,this.backgroundPageShape.init(this.backgroundPane),this.backgroundPageShape.redraw(),mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(e){this.graph.dblClick(e)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(e){this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e))}),mxUtils.bind(this,function(e){null!=this.graph.tooltipHandler&&this.graph.tooltipHandler.isHideOnHover()&&this.graph.tooltipHandler.hide(),this.graph.isMouseDown&&!mxEvent.isConsumed(e)&&this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e))}),mxUtils.bind(this,function(e){this.graph.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e))}))):(this.backgroundPageShape.scale=this.scale,this.backgroundPageShape.bounds=t,this.backgroundPageShape.redraw())):null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null)},mxGraphView.prototype.getBackgroundPageBounds=function(){var e=this.graph.pageFormat,t=this.scale*this.graph.pageScale;return new mxRectangle(this.scale*this.translate.x,this.scale*this.translate.y,e.width*t,e.height*t)},mxGraphView.prototype.redrawBackgroundImage=function(e,t){e.scale=this.scale,e.bounds.x=this.scale*this.translate.x,e.bounds.y=this.scale*this.translate.y,e.bounds.width=this.scale*t.width,e.bounds.height=this.scale*t.height,e.redraw()},mxGraphView.prototype.validateBounds=function(e,t){var n=this.graph.getModel(),a=this.getState(t,!0);if(null!=a&&a.invalid){if(this.graph.isCellVisible(t)){if(t!=this.currentRoot&&null!=e)if(a.absoluteOffset.x=0,a.absoluteOffset.y=0,a.origin.x=e.origin.x,a.origin.y=e.origin.y,null!=(o=this.graph.getCellGeometry(t))){if(!n.isEdge(t)){var i=o.offset||this.EMPTY_POINT;o.relative?(a.origin.x+=o.x*e.width/this.scale+i.x,a.origin.y+=o.y*e.height/this.scale+i.y):(a.absoluteOffset.x=this.scale*i.x,a.absoluteOffset.y=this.scale*i.y,a.origin.x+=o.x,a.origin.y+=o.y)}if(a.x=this.scale*(this.translate.x+a.origin.x),a.y=this.scale*(this.translate.y+a.origin.y),a.width=this.scale*o.width,a.height=this.scale*o.height,n.isVertex(t)){if(o.relative&&0!=(i=mxUtils.toRadians(e.style[mxConstants.STYLE_ROTATION]||"0"))){var o=Math.cos(i),s=(i=Math.sin(i),new mxPoint(a.getCenterX(),a.getCenterY())),r=new mxPoint(e.getCenterX(),e.getCenterY());o=mxUtils.getRotatedPoint(s,o,i,r);a.x=o.x-a.width/2,a.y=o.y-a.height/2}this.updateVertexLabelOffset(a)}}}else this.removeState(t);null!=(i=this.graph.getChildOffsetForCell(t))&&(a.origin.x+=i.x,a.origin.y+=i.y)}if(null!=a&&(!this.graph.isCellCollapsed(t)||t==this.currentRoot))for(o=n.getChildCount(t),i=0;i<o;i++)s=n.getChildAt(t,i),this.validateBounds(a,s)},mxGraphView.prototype.updateVertexLabelOffset=function(e){var t=mxUtils.getValue(e.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);t==mxConstants.ALIGN_LEFT?e.absoluteOffset.x-=e.width:t==mxConstants.ALIGN_RIGHT&&(e.absoluteOffset.x+=e.width),(t=mxUtils.getValue(e.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE))==mxConstants.ALIGN_TOP?e.absoluteOffset.y-=e.height:t==mxConstants.ALIGN_BOTTOM&&(e.absoluteOffset.y+=e.height)},mxGraphView.prototype.validatePoints=function(e,t){var n=this.graph.getModel(),a=this.getState(t),i=null;if(null!=a){if(a.invalid){var o=this.graph.getCellGeometry(t);if(null!=o&&n.isEdge(t)){var s=this.getState(this.getVisibleTerminal(t,!0));if(a.setVisibleTerminalState(s,!0),null!=s&&n.isEdge(s.cell)&&!n.isAncestor(s.cell,t)){var r=this.getState(n.getParent(s.cell));this.validatePoints(r,s.cell)}var l=this.getState(this.getVisibleTerminal(t,!1));a.setVisibleTerminalState(l,!1),null!=l&&n.isEdge(l.cell)&&!n.isAncestor(l.cell,t)&&(r=this.getState(n.getParent(l.cell)),this.validatePoints(r,l.cell)),this.updateFixedTerminalPoints(a,s,l),this.updatePoints(a,o.points,s,l),this.updateFloatingTerminalPoints(a,s,l),this.updateEdgeBounds(a),this.updateEdgeLabelOffset(a)}else null!=o&&o.relative&&null!=e&&n.isEdge(e.cell)&&(null!=(o=this.getPoint(e,o))&&(a.x=o.x,a.y=o.y,o.x=o.x/this.scale-this.translate.x,o.y=o.y/this.scale-this.translate.y,a.origin=o,this.childMoved(e,a)));a.invalid=!1,t!=this.currentRoot&&this.graph.cellRenderer.redraw(a,!1,this.isRendering())}(n.isEdge(t)||n.isVertex(t))&&(null!=a.shape&&null!=a.shape.boundingBox&&(i=a.shape.boundingBox.clone()),null!=a.text&&!this.graph.isLabelClipped(a.cell)&&null!=a.text.boundingBox&&(null!=i?i.add(a.text.boundingBox):i=a.text.boundingBox.clone()))}if(null!=a&&(!this.graph.isCellCollapsed(t)||t==this.currentRoot))for(o=n.getChildCount(t),s=0;s<o;s++)r=n.getChildAt(t,s),null!=(r=this.validatePoints(a,r))&&(null==i?i=r:i.add(r));return i},mxGraphView.prototype.childMoved=function(e,t){var n=t.cell;if(!this.graph.isCellCollapsed(n)||n==this.currentRoot)for(var a=this.graph.getModel(),i=a.getChildCount(n),o=0;o<i;o++)this.validateBounds(t,a.getChildAt(n,o))},mxGraphView.prototype.updateFixedTerminalPoints=function(e,t,n){this.updateFixedTerminalPoint(e,t,!0,this.graph.getConnectionConstraint(e,t,!0)),this.updateFixedTerminalPoint(e,n,!1,this.graph.getConnectionConstraint(e,n,!1))},mxGraphView.prototype.updateFixedTerminalPoint=function(e,t,n,a){var i=null;if(null!=a&&(i=this.graph.getConnectionPoint(t,a)),null==i&&null==t){t=this.scale,a=this.translate;var o=e.origin;null!=(i=this.graph.getCellGeometry(e.cell).getTerminalPoint(n))&&(i=new mxPoint(t*(a.x+i.x+o.x),t*(a.y+i.y+o.y)))}e.setAbsoluteTerminalPoint(i,n)},mxGraphView.prototype.updatePoints=function(e,t,n,a){if(null!=e){var i=[];i.push(e.absolutePoints[0]);var o=this.getEdgeStyle(e,t,n,a);if(null!=o)o(e,n=this.getTerminalPort(e,n,!0),a=this.getTerminalPort(e,a,!1),t,i);else if(null!=t)for(o=0;o<t.length;o++)null!=t[o]&&(a=mxUtils.clone(t[o]),i.push(this.transformControlPoint(e,a)));t=e.absolutePoints,i.push(t[t.length-1]),e.absolutePoints=i}},mxGraphView.prototype.transformControlPoint=function(e,t){var n=e.origin;return new mxPoint(this.scale*(t.x+this.translate.x+n.x),this.scale*(t.y+this.translate.y+n.y))},mxGraphView.prototype.getEdgeStyle=function(e,t,n,a){return"string"==typeof(e=null!=n&&n==a?mxUtils.getValue(e.style,mxConstants.STYLE_LOOP,this.graph.defaultLoopStyle):mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,!1)?null:e.style[mxConstants.STYLE_EDGE])&&(null==(t=mxStyleRegistry.getValue(e))&&this.isAllowEval()&&(t=mxUtils.eval(e)),e=t),"function"==typeof e?e:null},mxGraphView.prototype.updateFloatingTerminalPoints=function(e,t,n){var a=e.absolutePoints,i=a[0];null==a[a.length-1]&&null!=n&&this.updateFloatingTerminalPoint(e,n,t,!1),null==i&&null!=t&&this.updateFloatingTerminalPoint(e,t,n,!0)},mxGraphView.prototype.updateFloatingTerminalPoint=function(e,t,n,a){t=this.getTerminalPort(e,t,a);var i=this.getNextPoint(e,n,a),o=this.graph.isOrthogonal(e);n=mxUtils.toRadians(Number(t.style[mxConstants.STYLE_ROTATION]||"0"));var s=new mxPoint(t.getCenterX(),t.getCenterY());if(0!=n){var r=Math.cos(-n),l=Math.sin(-n);i=mxUtils.getRotatedPoint(i,r,l,s)}r=parseFloat(e.style[mxConstants.STYLE_PERIMETER_SPACING]||0),r+=parseFloat(e.style[a?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0),t=this.getPerimeterPoint(t,i,0==n&&o,r),0!=n&&(r=Math.cos(n),l=Math.sin(n),t=mxUtils.getRotatedPoint(t,r,l,s)),e.setAbsoluteTerminalPoint(t,a)},mxGraphView.prototype.getTerminalPort=function(e,t,n){return null!=(e=mxUtils.getValue(e.style,n?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT))&&(null!=(e=this.getState(this.graph.getModel().getCell(e)))&&(t=e)),t},mxGraphView.prototype.getPerimeterPoint=function(e,t,n,a){var i=null;if(null!=e){var o=this.getPerimeterFunction(e);null!=o&&null!=t&&(0<(a=this.getPerimeterBounds(e,a)).width||0<a.height)&&(i=o(a,e,t,n)),null==i&&(i=this.getPoint(e))}return i},mxGraphView.prototype.getRoutingCenterX=function(e){var t=null!=e.style&&parseFloat(e.style[mxConstants.STYLE_ROUTING_CENTER_X])||0;return e.getCenterX()+t*e.width},mxGraphView.prototype.getRoutingCenterY=function(e){var t=null!=e.style&&parseFloat(e.style[mxConstants.STYLE_ROUTING_CENTER_Y])||0;return e.getCenterY()+t*e.height},mxGraphView.prototype.getPerimeterBounds=function(e,t){return t=null!=t?t:0,null!=e&&(t+=parseFloat(e.style[mxConstants.STYLE_PERIMETER_SPACING]||0)),e.getPerimeterBounds(t*this.scale)},mxGraphView.prototype.getPerimeterFunction=function(e){if("string"==typeof(e=e.style[mxConstants.STYLE_PERIMETER])){var t=mxStyleRegistry.getValue(e);null==t&&this.isAllowEval()&&(t=mxUtils.eval(e)),e=t}return"function"==typeof e?e:null},mxGraphView.prototype.getNextPoint=function(e,t,n){var a=null;return null!=(e=e.absolutePoints)&&(n||2<e.length||null==t)&&(a=e.length,a=e[n?Math.min(1,a-1):Math.max(0,a-2)]),null==a&&null!=t&&(a=new mxPoint(t.getCenterX(),t.getCenterY())),a},mxGraphView.prototype.getVisibleTerminal=function(e,t){for(var n=this.graph.getModel(),a=n.getTerminal(e,t),i=a;null!=a&&a!=this.currentRoot;)this.graph.isCellVisible(i)&&!this.graph.isCellCollapsed(a)||(i=a),a=n.getParent(a);return n.getParent(i)==n.getRoot()&&(i=null),i},mxGraphView.prototype.updateEdgeBounds=function(e){var t=e.absolutePoints;if(e.length=0,null!=t&&0<t.length){var n=t[0],a=t[t.length-1];if(null==n||null==a)e.cell!=this.currentRoot&&this.clear(e.cell,!0);else{if(n.x!=a.x||n.y!=a.y){var i=a.x-n.x,o=a.y-n.y;e.terminalDistance=Math.sqrt(i*i+o*o)}else e.terminalDistance=0;a=0;var s=[];if(null!=(o=n)){n=o.x;for(var r=o.y,l=n,d=r,c=1;c<t.length;c++){var m=t[c];null!=m&&(i=o.x-m.x,o=o.y-m.y,i=Math.sqrt(i*i+o*o),s.push(i),a+=i,o=m,n=Math.min(o.x,n),r=Math.min(o.y,r),l=Math.max(o.x,l),d=Math.max(o.y,d))}e.length=a,e.segments=s,e.x=n,e.y=r,e.width=Math.max(1,l-n),e.height=Math.max(1,d-r)}}}},mxGraphView.prototype.getPoint=function(e,t){var n=e.getCenterX(),a=e.getCenterY();if(null==e.segments||null!=t&&!t.relative)null!=t&&(null!=(d=t.offset)&&(n+=d.x,a+=d.y));else{for(var i=e.absolutePoints.length,o=(.5+(null!=t?t.x/2:0))*e.length,s=e.segments[0],r=0,l=1;r+s<o&&l<i-1;)r+=s,s=e.segments[l++];if(i=0==s?0:(o-r)/s,o=e.absolutePoints[l-1],l=e.absolutePoints[l],null!=o&&null!=l){if(r=n=a=0,null!=t){a=t.y;var d=t.offset;null!=d&&(n=d.x,r=d.y)}d=l.x-o.x,l=l.y-o.y,n=o.x+d*i+((0==s?0:l/s)*a+n)*this.scale,a=o.y+l*i-((0==s?0:d/s)*a-r)*this.scale}}return new mxPoint(n,a)},mxGraphView.prototype.getRelativePoint=function(e,t,n){if(null!=(i=this.graph.getModel().getGeometry(e.cell))){var a=e.absolutePoints.length;if(i.relative&&1<a){for(var i=e.length,o=e.segments,s=e.absolutePoints[0],r=e.absolutePoints[1],l=mxUtils.ptSegDistSq(s.x,s.y,r.x,r.y,t,n),d=0,c=0,m=0,u=2;u<a;u++)c+=o[u-2],r=e.absolutePoints[u],(s=mxUtils.ptSegDistSq(s.x,s.y,r.x,r.y,t,n))<=l&&(l=s,d=u-1,m=c),s=r;return a=o[d],s=e.absolutePoints[d],l=(r=e.absolutePoints[d+1]).x,o=r.y,o=(l=(e=s.x-l)-(l=t-l))*e+(o=(d=s.y-o)-(o=n-o))*d,a<(e=Math.sqrt(o<=0?0:o*o/(e*e+d*d)))&&(e=a),a=Math.sqrt(mxUtils.ptSegDistSq(s.x,s.y,r.x,r.y,t,n)),-1==mxUtils.relativeCcw(s.x,s.y,r.x,r.y,t,n)&&(a=-a),new mxPoint((i/2-m-e)/i*-2,a/this.scale)}}return new mxPoint},mxGraphView.prototype.updateEdgeLabelOffset=function(e){var t=e.absolutePoints;if(e.absoluteOffset.x=e.getCenterX(),e.absoluteOffset.y=e.getCenterY(),null!=t&&0<t.length&&null!=e.segments)if((i=this.graph.getCellGeometry(e.cell)).relative){null!=(n=this.getPoint(e,i))&&(e.absoluteOffset=n)}else{var n=t[0],a=t[t.length-1];if(null!=n&&null!=a){t=a.x-n.x;var i,o=a.y-n.y,s=a=0;null!=(i=i.offset)&&(a=i.x,s=i.y),i=n.y+o/2+s*this.scale,e.absoluteOffset.x=n.x+t/2+a*this.scale,e.absoluteOffset.y=i}}},mxGraphView.prototype.getState=function(e,t){t=t||!1;var n=null;return null!=e&&(n=this.states.get(e),this.graph.isCellVisible(e)&&(null==n&&t&&this.graph.isCellVisible(e)?(n=this.createState(e),this.states.put(e,n)):t&&null!=n&&this.updateStyle&&(n.style=this.graph.getCellStyle(e)))),n},mxGraphView.prototype.isRendering=function(){return this.rendering},mxGraphView.prototype.setRendering=function(e){this.rendering=e},mxGraphView.prototype.isAllowEval=function(){return this.allowEval},mxGraphView.prototype.setAllowEval=function(e){this.allowEval=e},mxGraphView.prototype.getStates=function(){return this.states},mxGraphView.prototype.setStates=function(e){this.states=e},mxGraphView.prototype.getCellStates=function(e){if(null==e)return this.states;for(var t=[],n=0;n<e.length;n++){var a=this.getState(e[n]);null!=a&&t.push(a)}return t},mxGraphView.prototype.removeState=function(e){var t=null;return null!=e&&(null!=(t=this.states.remove(e))&&(this.graph.cellRenderer.destroy(t),t.destroy())),t},mxGraphView.prototype.createState=function(e){return e=new mxCellState(this,e,this.graph.getCellStyle(e)),this.graph.cellRenderer.initialize(e,this.isRendering()),e},mxGraphView.prototype.getCanvas=function(){return this.canvas},mxGraphView.prototype.getBackgroundPane=function(){return this.backgroundPane},mxGraphView.prototype.getDrawPane=function(){return this.drawPane},mxGraphView.prototype.getOverlayPane=function(){return this.overlayPane},mxGraphView.prototype.isContainerEvent=function(e){return(e=mxEvent.getSource(e))==this.graph.container||e.parentNode==this.backgroundPane||null!=e.parentNode&&e.parentNode.parentNode==this.backgroundPane||e==this.canvas.parentNode||e==this.canvas||e==this.backgroundPane||e==this.drawPane||e==this.overlayPane},mxGraphView.prototype.isScrollEvent=function(e){var t=mxUtils.getOffset(this.graph.container);e=new mxPoint(e.clientX-t.x,e.clientY-t.y);t=this.graph.container.offsetWidth;var n=this.graph.container.clientWidth;return n<t&&e.x>n+2&&e.x<=t||(t=this.graph.container.offsetHeight,(n=this.graph.container.clientHeight)<t&&e.y>n+2&&e.y<=t)},mxGraphView.prototype.init=function(){this.installListeners();var e=this.graph;e.dialect==mxConstants.DIALECT_SVG?this.createSvg():e.dialect==mxConstants.DIALECT_VML?this.createVml():this.createHtml()},mxGraphView.prototype.installListeners=function(){var a=this.graph,i=a.container;if(null!=i){mxEvent.addGestureListeners(i,mxUtils.bind(this,function(e){mxClient.IS_TOUCH&&a.isEditing()&&a.stopEditing(!a.isInvokesStopCellEditing()),this.isContainerEvent(e)&&(!mxClient.IS_IE&&!mxClient.IS_GC&&!mxClient.IS_OP&&!mxClient.IS_SF||!this.isScrollEvent(e))&&a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e))}),mxUtils.bind(this,function(e){this.isContainerEvent(e)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e))}),mxUtils.bind(this,function(e){this.isContainerEvent(e)&&a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e))})),mxEvent.addListener(i,"dblclick",mxUtils.bind(this,function(e){a.dblClick(e)}));a.addMouseListener({mouseDown:function(e,t){a.panningHandler.hideMenu()},mouseMove:function(){},mouseUp:function(){}}),this.moveHandler=mxUtils.bind(this,function(e){var t,n;null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide(),this.captureDocumentGesture&&a.isMouseDown&&!mxEvent.isConsumed(e)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,(t=e,n=null,mxClient.IS_TOUCH&&(n=mxEvent.getClientX(t),t=mxEvent.getClientY(t),t=mxUtils.convertPoint(i,n,t),n=a.view.getState(a.getCellAt(t.x,t.y))),n)))}),this.endHandler=mxUtils.bind(this,function(e){this.captureDocumentGesture&&a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e))}),mxEvent.addGestureListeners(document,null,this.moveHandler,this.endHandler)}},mxGraphView.prototype.createHtml=function(){var e=this.graph.container;null!=e&&(this.canvas=this.createHtmlPane("100%","100%"),this.backgroundPane=this.createHtmlPane("1px","1px"),this.drawPane=this.createHtmlPane("1px","1px"),this.overlayPane=this.createHtmlPane("1px","1px"),this.canvas.appendChild(this.backgroundPane),this.canvas.appendChild(this.drawPane),this.canvas.appendChild(this.overlayPane),e.appendChild(this.canvas),mxClient.IS_QUIRKS&&(e=mxUtils.bind(this,function(e){e=this.getGraphBounds(),this.updateHtmlCanvasSize(e.x+e.width+this.graph.border,e.y+e.height+this.graph.border)}),mxEvent.addListener(window,"resize",e)))},mxGraphView.prototype.updateHtmlCanvasSize=function(e,t){if(null!=this.graph.container){var n=this.graph.container.offsetHeight;this.canvas.style.width=this.graph.container.offsetWidth<e?e+"px":"100%",this.canvas.style.height=n<t?t+"px":"100%"}},mxGraphView.prototype.createHtmlPane=function(e,t){var n=document.createElement("DIV");return null!=e&&null!=t?(n.style.position="absolute",n.style.left="0px",n.style.top="0px",n.style.width=e,n.style.height=t):n.style.position="relative",n},mxGraphView.prototype.createVml=function(){var e=this.graph.container;if(null!=e){var t=e.offsetWidth,n=e.offsetHeight;this.canvas=this.createVmlPane(t,n),this.backgroundPane=this.createVmlPane(t,n),this.drawPane=this.createVmlPane(t,n),this.overlayPane=this.createVmlPane(t,n),this.canvas.appendChild(this.backgroundPane),this.canvas.appendChild(this.drawPane),this.canvas.appendChild(this.overlayPane),e.appendChild(this.canvas)}},mxGraphView.prototype.createVmlPane=function(e,t){var n=document.createElement(mxClient.VML_PREFIX+":group");return n.style.position="absolute",n.style.left="0px",n.style.top="0px",n.style.width=e+"px",n.style.height=t+"px",n.setAttribute("coordsize",e+","+t),n.setAttribute("coordorigin","0,0"),n},mxGraphView.prototype.createSvg=function(){var e=this.graph.container;this.canvas=document.createElementNS(mxConstants.NS_SVG,"g"),this.backgroundPane=document.createElementNS(mxConstants.NS_SVG,"g"),this.canvas.appendChild(this.backgroundPane),this.drawPane=document.createElementNS(mxConstants.NS_SVG,"g"),this.canvas.appendChild(this.drawPane),this.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g"),this.canvas.appendChild(this.overlayPane);var t=document.createElementNS(mxConstants.NS_SVG,"svg");t.style.width="100%",t.style.height="100%",t.style.display="block",t.appendChild(this.canvas),null!=e&&(e.appendChild(t),"static"==mxUtils.getCurrentStyle(e).position&&(e.style.position="relative"))},mxGraphView.prototype.destroy=function(){var e=null!=this.canvas?this.canvas.ownerSVGElement:null;null==e&&(e=this.canvas),null!=e&&null!=e.parentNode&&(this.clear(this.currentRoot,!0),mxEvent.removeGestureListeners(document,null,this.moveHandler,this.endHandler),mxEvent.release(this.graph.container),e.parentNode.removeChild(e),this.overlayPane=this.drawPane=this.backgroundPane=this.canvas=this.endHandler=this.moveHandler=null)},mxCurrentRootChange.prototype.execute=function(){var e=this.view.currentRoot;this.view.currentRoot=this.previous,this.previous=e,null!=(e=this.view.graph.getTranslateForRoot(this.view.currentRoot))&&(this.view.translate=new mxPoint(-e.x,-e.y)),this.view.fireEvent(new mxEventObject(this.isUp?mxEvent.UP:mxEvent.DOWN,"root",this.view.currentRoot,"previous",this.previous)),this.isUp?(this.view.clear(this.view.currentRoot,!0),this.view.validate()):this.view.refresh(),this.isUp=!this.isUp},mxLoadResources&&mxResources.add(mxClient.basePath+"/resources/graph"),mxGraph.prototype=new mxEventSource,mxGraph.prototype.constructor=mxGraph,mxGraph.prototype.EMPTY_ARRAY=[],mxGraph.prototype.mouseListeners=null,mxGraph.prototype.isMouseDown=!1,mxGraph.prototype.model=null,mxGraph.prototype.view=null,mxGraph.prototype.stylesheet=null,mxGraph.prototype.selectionModel=null,mxGraph.prototype.cellEditor=null,mxGraph.prototype.cellRenderer=null,mxGraph.prototype.multiplicities=null,mxGraph.prototype.renderHint=null,mxGraph.prototype.dialect=null,mxGraph.prototype.gridSize=10,mxGraph.prototype.gridEnabled=!0,mxGraph.prototype.portsEnabled=!0,mxGraph.prototype.doubleTapEnabled=!0,mxGraph.prototype.doubleTapTimeout=700,mxGraph.prototype.doubleTapTolerance=25,mxGraph.prototype.lastTouchY=0,mxGraph.prototype.lastTouchY=0,mxGraph.prototype.lastTouchTime=0,mxGraph.prototype.gestureEnabled=!0,mxGraph.prototype.tolerance=4,mxGraph.prototype.defaultOverlap=.5,mxGraph.prototype.defaultParent=null,mxGraph.prototype.alternateEdgeStyle=null,mxGraph.prototype.backgroundImage=null,mxGraph.prototype.pageVisible=!1,mxGraph.prototype.pageBreaksVisible=!1,mxGraph.prototype.pageBreakColor="gray",mxGraph.prototype.pageBreakDashed=!0,mxGraph.prototype.minPageBreakDist=20,mxGraph.prototype.preferPageSize=!1,mxGraph.prototype.pageFormat=mxConstants.PAGE_FORMAT_A4_PORTRAIT,mxGraph.prototype.pageScale=1.5,mxGraph.prototype.enabled=!0,mxGraph.prototype.escapeEnabled=!0,mxGraph.prototype.invokesStopCellEditing=!0,mxGraph.prototype.enterStopsCellEditing=!1,mxGraph.prototype.useScrollbarsForPanning=!0,mxGraph.prototype.exportEnabled=!0,mxGraph.prototype.importEnabled=!0,mxGraph.prototype.cellsLocked=!1,mxGraph.prototype.cellsCloneable=!0,mxGraph.prototype.foldingEnabled=!0,mxGraph.prototype.cellsEditable=!0,mxGraph.prototype.cellsDeletable=!0,mxGraph.prototype.cellsMovable=!0,mxGraph.prototype.edgeLabelsMovable=!0,mxGraph.prototype.vertexLabelsMovable=!1,mxGraph.prototype.dropEnabled=!1,mxGraph.prototype.splitEnabled=!0,mxGraph.prototype.cellsResizable=!0,mxGraph.prototype.cellsBendable=!0,mxGraph.prototype.cellsSelectable=!0,mxGraph.prototype.cellsDisconnectable=!0,mxGraph.prototype.autoSizeCells=!1,mxGraph.prototype.autoScroll=!0,mxGraph.prototype.timerAutoScroll=!1,mxGraph.prototype.allowAutoPanning=!1,mxGraph.prototype.ignoreScrollbars=!1,mxGraph.prototype.autoExtend=!0,mxGraph.prototype.maximumGraphBounds=null,mxGraph.prototype.minimumGraphSize=null,mxGraph.prototype.minimumContainerSize=null,mxGraph.prototype.maximumContainerSize=null,mxGraph.prototype.resizeContainer=!1,mxGraph.prototype.border=0,mxGraph.prototype.ordered=!0,mxGraph.prototype.keepEdgesInForeground=!1,mxGraph.prototype.keepEdgesInBackground=!0,mxGraph.prototype.allowNegativeCoordinates=!0,mxGraph.prototype.constrainChildren=!0,mxGraph.prototype.extendParents=!0,mxGraph.prototype.extendParentsOnAdd=!0,mxGraph.prototype.collapseToPreferredSize=!0,mxGraph.prototype.zoomFactor=1.2,mxGraph.prototype.keepSelectionVisibleOnZoom=!1,mxGraph.prototype.centerZoom=!0,mxGraph.prototype.resetViewOnRootChange=!0,mxGraph.prototype.resetEdgesOnResize=!1,mxGraph.prototype.resetEdgesOnMove=!1,mxGraph.prototype.resetEdgesOnConnect=!0,mxGraph.prototype.allowLoops=!1,mxGraph.prototype.defaultLoopStyle=mxEdgeStyle.Loop,mxGraph.prototype.multigraph=!0,mxGraph.prototype.connectableEdges=!1,mxGraph.prototype.allowDanglingEdges=!0,mxGraph.prototype.cloneInvalidEdges=!1,mxGraph.prototype.disconnectOnMove=!0,mxGraph.prototype.labelsVisible=!0,mxGraph.prototype.htmlLabels=!1,mxGraph.prototype.swimlaneSelectionEnabled=!0,mxGraph.prototype.swimlaneNesting=!0,mxGraph.prototype.swimlaneIndicatorColorAttribute=mxConstants.STYLE_FILLCOLOR,mxGraph.prototype.imageBundles=null,mxGraph.prototype.minFitScale=.1,mxGraph.prototype.maxFitScale=8,mxGraph.prototype.panDx=0,mxGraph.prototype.panDy=0,mxGraph.prototype.collapsedImage=new mxImage(mxClient.imageBasePath+"/collapsed.gif",9,9),mxGraph.prototype.expandedImage=new mxImage(mxClient.imageBasePath+"/expanded.gif",9,9),mxGraph.prototype.warningImage=new mxImage("/assets/plugins/mxgraph/images/warning.gif",16,16),mxGraph.prototype.alreadyConnectedResource="none"!=mxClient.language?"alreadyConnected":"",mxGraph.prototype.containsValidationErrorsResource="none"!=mxClient.language?"containsValidationErrors":"",mxGraph.prototype.collapseExpandResource="none"!=mxClient.language?"collapse-expand":"",mxGraph.prototype.init=function(e){this.container=e,this.cellEditor=this.createCellEditor(),this.view.init(),this.sizeDidChange(),mxClient.IS_IE&&(mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})),mxEvent.addListener(e,"selectstart",mxUtils.bind(this,function(){return this.isEditing()}))),8==document.documentMode&&e.insertAdjacentHTML("beforeend",'<v:group style="DISPLAY: none;"></v:group>')},mxGraph.prototype.createHandlers=function(e){this.tooltipHandler=new mxTooltipHandler(this),this.tooltipHandler.setEnabled(!1),this.panningHandler=new mxPanningHandler(this),this.panningHandler.panningEnabled=!1,this.selectionCellsHandler=new mxSelectionCellsHandler(this),this.connectionHandler=new mxConnectionHandler(this),this.connectionHandler.setEnabled(!1),this.graphHandler=new mxGraphHandler(this)},mxGraph.prototype.createSelectionModel=function(){return new mxGraphSelectionModel(this)},mxGraph.prototype.createStylesheet=function(){return new mxStylesheet},mxGraph.prototype.createGraphView=function(){return new mxGraphView(this)},mxGraph.prototype.createCellRenderer=function(){return new mxCellRenderer},mxGraph.prototype.createCellEditor=function(){return new mxCellEditor(this)},mxGraph.prototype.getModel=function(){return this.model},mxGraph.prototype.getView=function(){return this.view},mxGraph.prototype.getStylesheet=function(){return this.stylesheet},mxGraph.prototype.setStylesheet=function(e){this.stylesheet=e},mxGraph.prototype.getSelectionModel=function(){return this.selectionModel},mxGraph.prototype.setSelectionModel=function(e){this.selectionModel=e},mxGraph.prototype.getSelectionCellsForChanges=function(e){for(var t=[],n=0;n<e.length;n++){var a=e[n];if(a.constructor!=mxRootChange){var i=null;a instanceof mxChildChange&&null==a.previous?i=a.child:null!=a.cell&&a.cell instanceof mxCell&&(i=a.cell),null!=i&&mxUtils.indexOf(t,i)<0&&t.push(i)}}return this.getModel().getTopmostCells(t)},mxGraph.prototype.graphModelChanged=function(e){for(var t=0;t<e.length;t++)this.processChange(e[t]);this.removeSelectionCells(this.getRemovedCellsForChanges(e)),this.view.validate(),this.sizeDidChange()},mxGraph.prototype.getRemovedCellsForChanges=function(e){for(var t=[],n=0;n<e.length;n++){var a=e[n];if(a instanceof mxRootChange)break;a instanceof mxChildChange?null!=a.previous&&null==a.parent&&(t=t.concat(this.model.getDescendants(a.child))):a instanceof mxVisibleChange&&(t=t.concat(this.model.getDescendants(a.cell)))}return t},mxGraph.prototype.processChange=function(e){if(e instanceof mxRootChange)this.clearSelection(),this.removeStateForCell(e.previous),this.resetViewOnRootChange&&(this.view.scale=1,this.view.translate.x=0,this.view.translate.y=0),this.fireEvent(new mxEventObject(mxEvent.ROOT));else if(e instanceof mxChildChange){var t=this.model.getParent(e.child);null!=t?this.view.invalidate(e.child,!0,!1,null!=e.previous):(this.removeStateForCell(e.child),this.view.currentRoot==e.child&&this.home()),t!=e.previous&&(null!=t&&this.view.invalidate(t,!1,!1),null!=e.previous&&this.view.invalidate(e.previous,!1,!1))}else e instanceof mxTerminalChange||e instanceof mxGeometryChange?this.view.invalidate(e.cell):e instanceof mxValueChange?this.view.invalidate(e.cell,!1,!1):e instanceof mxStyleChange?(this.view.invalidate(e.cell,!0,!0,!1),this.view.removeState(e.cell)):null!=e.cell&&e.cell instanceof mxCell&&this.removeStateForCell(e.cell)},mxGraph.prototype.removeStateForCell=function(e){for(var t=this.model.getChildCount(e),n=0;n<t;n++)this.removeStateForCell(this.model.getChildAt(e,n));this.view.removeState(e)},mxGraph.prototype.addCellOverlay=function(e,t){null==e.overlays&&(e.overlays=[]),e.overlays.push(t);var n=this.view.getState(e);return null!=n&&this.cellRenderer.redraw(n),this.fireEvent(new mxEventObject(mxEvent.ADD_OVERLAY,"cell",e,"overlay",t)),t},mxGraph.prototype.getCellOverlays=function(e){return e.overlays},mxGraph.prototype.removeCellOverlay=function(e,t){if(null==t)this.removeCellOverlays(e);else{var n=mxUtils.indexOf(e.overlays,t);0<=n?(e.overlays.splice(n,1),0==e.overlays.length&&(e.overlays=null),null!=(n=this.view.getState(e))&&this.cellRenderer.redraw(n),this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,"cell",e,"overlay",t))):t=null}return t},mxGraph.prototype.removeCellOverlays=function(e){var t=e.overlays;if(null!=t){e.overlays=null;var n=this.view.getState(e);for(null!=n&&this.cellRenderer.redraw(n),n=0;n<t.length;n++)this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,"cell",e,"overlay",t[n]))}return t},mxGraph.prototype.clearCellOverlays=function(e){e=null!=e?e:this.model.getRoot(),this.removeCellOverlays(e);for(var t=this.model.getChildCount(e),n=0;n<t;n++){var a=this.model.getChildAt(e,n);this.clearCellOverlays(a)}},mxGraph.prototype.setCellWarning=function(n,e,t,a){return null!=e&&0<e.length?(e=new mxCellOverlay(t=null!=t?t:this.warningImage,"<font color=red>"+e+"</font>"),a&&e.addListener(mxEvent.CLICK,mxUtils.bind(this,function(e,t){this.isEnabled()&&this.setSelectionCell(n)})),this.addCellOverlay(n,e)):(this.removeCellOverlays(n),null)},mxGraph.prototype.startEditing=function(e){this.startEditingAtCell(null,e)},mxGraph.prototype.startEditingAtCell=function(e,t){null==e&&(null!=(e=this.getSelectionCell())&&!this.isCellEditable(e)&&(e=null)),null!=e&&(this.fireEvent(new mxEventObject(mxEvent.START_EDITING,"cell",e,"event",t)),this.cellEditor.startEditing(e,t))},mxGraph.prototype.getEditingValue=function(e,t){return this.convertValueToString(e)},mxGraph.prototype.stopEditing=function(e){this.cellEditor.stopEditing(e)},mxGraph.prototype.labelChanged=function(e,t,n){this.model.beginUpdate();try{this.cellLabelChanged(e,t,this.isAutoSizeCell(e)),this.fireEvent(new mxEventObject(mxEvent.LABEL_CHANGED,"cell",e,"value",t,"event",n))}finally{this.model.endUpdate()}return e},mxGraph.prototype.cellLabelChanged=function(e,t,n){this.model.beginUpdate();try{this.model.setValue(e,t),n&&this.cellSizeUpdated(e,!1)}finally{this.model.endUpdate()}},mxGraph.prototype.escape=function(e){this.stopEditing(!0),this.connectionHandler.reset(),this.graphHandler.reset(),e=this.getSelectionCells();for(var t=0;t<e.length;t++){var n=this.view.getState(e[t]);null!=n&&null!=n.handler&&n.handler.reset()}},mxGraph.prototype.click=function(e){var t=e.getEvent(),n=e.getCell(),a=new mxEventObject(mxEvent.CLICK,"event",t,"cell",n);e.isConsumed()&&a.consume(),this.fireEvent(a),this.isEnabled()&&!mxEvent.isConsumed(t)&&!a.isConsumed()&&(null!=n?this.selectCellForEvent(n,t):(n=null,this.isSwimlaneSelectionEnabled()&&(n=this.getSwimlaneAt(e.getGraphX(),e.getGraphY())),null!=n?this.selectCellForEvent(n,t):this.isToggleEvent(t)||this.clearSelection()))},mxGraph.prototype.dblClick=function(e,t){var n=new mxEventObject(mxEvent.DOUBLE_CLICK,"event",e,"cell",t);this.fireEvent(n),this.isEnabled()&&!mxEvent.isConsumed(e)&&!n.isConsumed()&&null!=t&&this.isCellEditable(t)&&this.startEditingAtCell(t,e)},mxGraph.prototype.scrollPointToVisible=function(e,t,n,a){if(this.timerAutoScroll||!this.ignoreScrollbars&&!mxUtils.hasScrollbars(this.container))this.allowAutoPanning&&!this.panningHandler.active&&(null==this.panningManager&&(this.panningManager=this.createPanningManager()),this.panningManager.panTo(e+this.panDx,t+this.panDy));else{var i=this.container;if(a=null!=a?a:20,e>=i.scrollLeft&&t>=i.scrollTop&&e<=i.scrollLeft+i.clientWidth&&t<=i.scrollTop+i.clientHeight){var o=i.scrollLeft+i.clientWidth-e;if(o<a){if(e=i.scrollLeft,i.scrollLeft+=a-o,n&&e==i.scrollLeft){if(this.dialect==mxConstants.DIALECT_SVG){e=this.view.getDrawPane().ownerSVGElement;var s=this.container.scrollWidth+a-o}else s=Math.max(i.clientWidth,i.scrollWidth)+a-o,e=this.view.getCanvas();e.style.width=s+"px",i.scrollLeft+=a-o}}else(o=e-i.scrollLeft)<a&&(i.scrollLeft-=a-o);(o=i.scrollTop+i.clientHeight-t)<a?(e=i.scrollTop,i.scrollTop+=a-o,e==i.scrollTop&&n&&(this.dialect==mxConstants.DIALECT_SVG?(e=this.view.getDrawPane().ownerSVGElement,t=this.container.scrollHeight+a-o):(t=Math.max(i.clientHeight,i.scrollHeight)+a-o,e=this.view.getCanvas()),e.style.height=t+"px",i.scrollTop+=a-o)):(o=t-i.scrollTop)<a&&(i.scrollTop-=a-o)}}},mxGraph.prototype.createPanningManager=function(){return new mxPanningManager(this)},mxGraph.prototype.getBorderSizes=function(){function e(e){var t=0;t="thin"==e?2:"medium"==e?4:"thick"==e?6:parseInt(e);return isNaN(t)&&(t=0),t}var t=mxUtils.getCurrentStyle(this.container),n=new mxRectangle;return n.x=e(t.borderLeftWidth)+parseInt(t.paddingLeft||0),n.y=e(t.borderTopWidth)+parseInt(t.paddingTop||0),n.width=e(t.borderRightWidth)+parseInt(t.paddingRight||0),n.height=e(t.borderBottomWidth)+parseInt(t.paddingBottom||0),n},mxGraph.prototype.getPreferredPageSize=function(e,t,n){e=this.view.scale;var a=this.view.translate,i=this.pageFormat,o=e*this.pageScale;i=new mxRectangle(0,0,i.width*o,i.height*o);return t=this.pageBreaksVisible?Math.ceil(t/i.width):1,n=this.pageBreaksVisible?Math.ceil(n/i.height):1,new mxRectangle(0,0,t*i.width+2+a.x/e,n*i.height+2+a.y/e)},mxGraph.prototype.sizeDidChange=function(){var e=this.getGraphBounds();if(null!=this.container){var t=this.getBorder(),n=Math.max(0,e.x+e.width+1+t);t=Math.max(0,e.y+e.height+1+t);if(null!=this.minimumContainerSize&&(n=Math.max(n,this.minimumContainerSize.width),t=Math.max(t,this.minimumContainerSize.height)),this.resizeContainer&&this.doResizeContainer(n,t),this.preferPageSize||!mxClient.IS_IE&&this.pageVisible){var a=this.getPreferredPageSize(e,n,t);null!=a&&(n=a.width,t=a.height)}null!=this.minimumGraphSize&&(n=Math.max(n,this.minimumGraphSize.width*this.view.scale),t=Math.max(t,this.minimumGraphSize.height*this.view.scale)),n=Math.ceil(n-1),t=Math.ceil(t-1),this.dialect==mxConstants.DIALECT_SVG?((a=this.view.getDrawPane().ownerSVGElement).style.minWidth=Math.max(1,n)+"px",a.style.minHeight=Math.max(1,t)+"px",a.style.width="100%",a.style.height="100%"):mxClient.IS_QUIRKS?this.view.updateHtmlCanvasSize(Math.max(1,n),Math.max(1,t)):(this.view.canvas.style.minWidth=Math.max(1,n)+"px",this.view.canvas.style.minHeight=Math.max(1,t)+"px"),this.updatePageBreaks(this.pageBreaksVisible,n-1,t-1)}this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",e))},mxGraph.prototype.doResizeContainer=function(e,t){if(mxClient.IS_IE)if(mxClient.IS_QUIRKS){var n=this.getBorderSizes();e+=Math.max(2,n.x+n.width+1),t+=Math.max(2,n.y+n.height+1)}else 9<=document.documentMode?(e+=3,t+=5):(e+=1,t+=1);else t+=1;null!=this.maximumContainerSize&&(e=Math.min(this.maximumContainerSize.width,e),t=Math.min(this.maximumContainerSize.height,t)),this.container.style.width=Math.ceil(e)+"px",this.container.style.height=Math.ceil(t)+"px"},mxGraph.prototype.updatePageBreaks=function(e,t,n){var a=this.view.scale,i=this.view.translate,o=this.pageFormat,s=a*this.pageScale;i=new mxRectangle(a*i.x,a*i.y,o.width*s,o.height*s);if(e=e&&Math.min(i.width,i.height)>this.minPageBreakDist,i.x=mxUtils.mod(i.x,i.width),i.y=mxUtils.mod(i.y,i.height),o=e?Math.ceil((t-i.x)/i.width):0,e=e?Math.ceil((n-i.y)/i.height):0,null==this.horizontalPageBreaks&&0<o&&(this.horizontalPageBreaks=[]),null!=this.horizontalPageBreaks){for(s=0;s<=o;s++){var r=[new mxPoint(i.x+s*i.width,1),new mxPoint(i.x+s*i.width,n)];null!=this.horizontalPageBreaks[s]?(this.horizontalPageBreaks[s].scale=1,this.horizontalPageBreaks[s].points=r,this.horizontalPageBreaks[s].redraw()):((r=new mxPolyline(r,this.pageBreakColor,this.scale)).dialect=this.dialect,r.isDashed=this.pageBreakDashed,r.scale=a,r.init(this.view.backgroundPane),r.redraw(),this.horizontalPageBreaks[s]=r)}for(s=o;s<this.horizontalPageBreaks.length;s++)this.horizontalPageBreaks[s].destroy();this.horizontalPageBreaks.splice(o,this.horizontalPageBreaks.length-o)}if(null==this.verticalPageBreaks&&0<e&&(this.verticalPageBreaks=[]),null!=this.verticalPageBreaks){for(s=0;s<=e;s++)r=[new mxPoint(1,i.y+s*i.height),new mxPoint(t,i.y+s*i.height)],null!=this.verticalPageBreaks[s]?(this.verticalPageBreaks[s].scale=1,this.verticalPageBreaks[s].points=r,this.verticalPageBreaks[s].redraw()):((r=new mxPolyline(r,this.pageBreakColor,a)).dialect=this.dialect,r.isDashed=this.pageBreakDashed,r.scale=a,r.init(this.view.backgroundPane),r.redraw(),this.verticalPageBreaks[s]=r);for(s=e;s<this.verticalPageBreaks.length;s++)this.verticalPageBreaks[s].destroy();this.verticalPageBreaks.splice(e,this.verticalPageBreaks.length-e)}},mxGraph.prototype.getCellStyle=function(e){var t=this.model.getStyle(e),n=null;n=this.model.isEdge(e)?this.stylesheet.getDefaultEdgeStyle():this.stylesheet.getDefaultVertexStyle();return null!=t&&(n=this.postProcessCellStyle(this.stylesheet.getCellStyle(t,n))),null==n&&(n=mxGraph.prototype.EMPTY_ARRAY),n},mxGraph.prototype.postProcessCellStyle=function(e){if(null!=e){var t=e[mxConstants.STYLE_IMAGE],n=this.getImageFromBundles(t);null!=n?e[mxConstants.STYLE_IMAGE]=n:n=t,null!=n&&"data:image/"==n.substring(0,11)&&(0<(t=n.indexOf(","))&&(n=n.substring(0,t)+";base64,"+n.substring(t+1)),e[mxConstants.STYLE_IMAGE]=n)}return e},mxGraph.prototype.setCellStyle=function(e,t){if(null!=(t=t||this.getSelectionCells())){this.model.beginUpdate();try{for(var n=0;n<t.length;n++)this.model.setStyle(t[n],e)}finally{this.model.endUpdate()}}},mxGraph.prototype.toggleCellStyle=function(e,t,n){n=n||this.getSelectionCell(),this.toggleCellStyles(e,t,[n])},mxGraph.prototype.toggleCellStyles=function(e,t,n){var a;(t=null!=t&&t,null!=(n=n||this.getSelectionCells())&&0<n.length)&&(null!=(a=null!=(a=this.view.getState(n[0]))?a.style:this.getCellStyle(n[0]))&&(t=mxUtils.getValue(a,e,t)?0:1,this.setCellStyles(e,t,n)))},mxGraph.prototype.setCellStyles=function(e,t,n){n=n||this.getSelectionCells(),mxUtils.setCellStyles(this.model,n,e,t)},mxGraph.prototype.toggleCellStyleFlags=function(e,t,n){this.setCellStyleFlags(e,t,null,n)},mxGraph.prototype.setCellStyleFlags=function(e,t,n,a){if(null!=(a=a||this.getSelectionCells())&&0<a.length){var i;if(null==n)null!=(i=null!=(i=this.view.getState(a[0]))?i.style:this.getCellStyle(a[0]))&&(n=(parseInt(i[e]||0)&t)!=t);mxUtils.setCellStyleFlags(this.model,a,e,t,n)}},mxGraph.prototype.alignCells=function(e,t,n){if(null==t&&(t=this.getSelectionCells()),null!=t&&1<t.length){if(null==n)for(var a=0;a<t.length;a++){var i=this.getCellGeometry(t[a]);if(null!=i&&!this.model.isEdge(t[a]))if(null==n){if(e==mxConstants.ALIGN_CENTER){n=i.x+i.width/2;break}if(e==mxConstants.ALIGN_RIGHT)n=i.x+i.width;else if(e==mxConstants.ALIGN_TOP)n=i.y;else{if(e==mxConstants.ALIGN_MIDDLE){n=i.y+i.height/2;break}n=e==mxConstants.ALIGN_BOTTOM?i.y+i.height:i.x}}else n=e==mxConstants.ALIGN_RIGHT?Math.max(n,i.x+i.width):e==mxConstants.ALIGN_TOP?Math.min(n,i.y):e==mxConstants.ALIGN_BOTTOM?Math.max(n,i.y+i.height):Math.min(n,i.x)}if(null!=n){this.model.beginUpdate();try{for(a=0;a<t.length;a++)null!=(i=this.getCellGeometry(t[a]))&&!this.model.isEdge(t[a])&&(i=i.clone(),e==mxConstants.ALIGN_CENTER?i.x=n-i.width/2:e==mxConstants.ALIGN_RIGHT?i.x=n-i.width:e==mxConstants.ALIGN_TOP?i.y=n:e==mxConstants.ALIGN_MIDDLE?i.y=n-i.height/2:e==mxConstants.ALIGN_BOTTOM?i.y=n-i.height:i.x=n,this.model.setGeometry(t[a],i));this.fireEvent(new mxEventObject(mxEvent.ALIGN_CELLS,"align",e,"cells",t))}finally{this.model.endUpdate()}}}return t},mxGraph.prototype.flipEdge=function(e){if(null!=e&&null!=this.alternateEdgeStyle){this.model.beginUpdate();try{var t=this.model.getStyle(e);null==t||0==t.length?this.model.setStyle(e,this.alternateEdgeStyle):this.model.setStyle(e,null),this.resetEdge(e),this.fireEvent(new mxEventObject(mxEvent.FLIP_EDGE,"edge",e))}finally{this.model.endUpdate()}}return e},mxGraph.prototype.addImageBundle=function(e){this.imageBundles.push(e)},mxGraph.prototype.removeImageBundle=function(e){for(var t=[],n=0;n<this.imageBundles.length;n++)this.imageBundles[n]!=e&&t.push(this.imageBundles[n]);this.imageBundles=t},mxGraph.prototype.getImageFromBundles=function(e){if(null!=e)for(var t=0;t<this.imageBundles.length;t++){var n=this.imageBundles[t].getImage(e);if(null!=n)return n}return null},mxGraph.prototype.orderCells=function(e,t){null==t&&(t=mxUtils.sortCells(this.getSelectionCells(),!0)),this.model.beginUpdate();try{this.cellsOrdered(t,e),this.fireEvent(new mxEventObject(mxEvent.ORDER_CELLS,"back",e,"cells",t))}finally{this.model.endUpdate()}return t},mxGraph.prototype.cellsOrdered=function(e,t){if(null!=e){this.model.beginUpdate();try{for(var n=0;n<e.length;n++){var a=this.model.getParent(e[n]);t?this.model.add(a,e[n],n):this.model.add(a,e[n],this.model.getChildCount(a)-1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ORDERED,"back",t,"cells",e))}finally{this.model.endUpdate()}}},mxGraph.prototype.groupCells=function(e,t,n){null==n&&(n=mxUtils.sortCells(this.getSelectionCells(),!0)),n=this.getCellsForGroup(n),null==e&&(e=this.createGroupCell(n));var a=this.getBoundsForGroup(e,n,t);if(0<n.length&&null!=a){var i=this.model.getParent(e);null==i&&(i=this.model.getParent(n[0])),this.model.beginUpdate();try{null==this.getCellGeometry(e)&&this.model.setGeometry(e,new mxGeometry);var o=this.model.getChildCount(i);this.cellsAdded([e],i,o,null,null,!1),o=this.model.getChildCount(e),this.cellsAdded(n,e,o,null,null,!1,!1),this.cellsMoved(n,-a.x,-a.y,!1,!0),this.cellsResized([e],[a]),this.fireEvent(new mxEventObject(mxEvent.GROUP_CELLS,"group",e,"border",t,"cells",n))}finally{this.model.endUpdate()}}return e},mxGraph.prototype.getCellsForGroup=function(e){var t=[];if(null!=e&&0<e.length){var n=this.model.getParent(e[0]);t.push(e[0]);for(var a=1;a<e.length;a++)this.model.getParent(e[a])==n&&t.push(e[a])}return t},mxGraph.prototype.getBoundsForGroup=function(e,t,n){return null!=(t=this.getBoundingBoxFromGeometry(t))&&(this.isSwimlane(e)&&(e=this.getStartSize(e),t.x-=e.width,t.y-=e.height,t.width+=e.width,t.height+=e.height),t.x-=n,t.y-=n,t.width+=2*n,t.height+=2*n),t},mxGraph.prototype.createGroupCell=function(e){return(e=new mxCell("")).setVertex(!0),e.setConnectable(!1),e},mxGraph.prototype.ungroupCells=function(e){var t=[];if(null==e){e=this.getSelectionCells();for(var n=[],a=0;a<e.length;a++)0<this.model.getChildCount(e[a])&&n.push(e[a]);e=n}if(null!=e&&0<e.length){this.model.beginUpdate();try{for(a=0;a<e.length;a++){if(null!=(i=this.model.getChildren(e[a]))&&0<i.length){var i=i.slice(),o=this.model.getParent(e[a]),s=this.model.getChildCount(o);this.cellsAdded(i,o,s,null,null,!0),t=t.concat(i)}}this.cellsRemoved(this.addAllEdges(e)),this.fireEvent(new mxEventObject(mxEvent.UNGROUP_CELLS,"cells",e))}finally{this.model.endUpdate()}}return t},mxGraph.prototype.removeCellsFromParent=function(e){null==e&&(e=this.getSelectionCells()),this.model.beginUpdate();try{var t=this.getDefaultParent(),n=this.model.getChildCount(t);this.cellsAdded(e,t,n,null,null,!0),this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS_FROM_PARENT,"cells",e))}finally{this.model.endUpdate()}return e},mxGraph.prototype.updateGroupBounds=function(e,t,n){null==e&&(e=this.getSelectionCells()),t=null!=t?t:0,n=null!=n&&n,this.model.beginUpdate();try{for(var a=0;a<e.length;a++){if(null!=(r=this.getCellGeometry(e[a]))){var i=this.getChildCells(e[a]);if(null!=i&&0<i.length){var o=this.getBoundingBoxFromGeometry(i);if(0<o.width&&0<o.height){var s=this.isSwimlane(e[a])?this.getStartSize(e[a]):new mxRectangle,r=r.clone();n&&(r.x+=o.x-s.width-t,r.y+=o.y-s.height-t),r.width=o.width+s.width+2*t,r.height=o.height+s.height+2*t,this.model.setGeometry(e[a],r),this.moveCells(i,-o.x+s.width+t,-o.y+s.height+t)}}}}}finally{this.model.endUpdate()}return e},mxGraph.prototype.cloneCells=function(e,t){t=null==t||t;var n=null;if(null!=e){for(var a={},i=(n=[],0);i<e.length;i++){a[o=mxCellPath.create(e[i])]=e[i],n.push(e[i])}if(0<n.length){var o=this.view.scale,s=this.view.translate;for(n=this.model.cloneCells(e,!0),i=0;i<e.length;i++)if(!t&&this.model.isEdge(n[i])&&null!=this.getEdgeValidationError(n[i],this.model.getTerminal(n[i],!0),this.model.getTerminal(n[i],!1)))n[i]=null;else{var r=this.model.getGeometry(n[i]);if(null!=r){var l=this.view.getState(e[i]),d=this.view.getState(this.model.getParent(e[i]));if(null!=l&&null!=d){var c=d.origin.x;d=d.origin.y;if(this.model.isEdge(n[i])){l=l.absolutePoints;for(var m=this.model.getTerminal(e[i],!0),u=mxCellPath.create(m);null!=m&&null==a[u];)m=this.model.getParent(m),u=mxCellPath.create(m);for(null==m&&r.setTerminalPoint(new mxPoint(l[0].x/o-s.x,l[0].y/o-s.y),!0),m=this.model.getTerminal(e[i],!1),u=mxCellPath.create(m);null!=m&&null==a[u];)m=this.model.getParent(m),u=mxCellPath.create(m);if(null==m&&(m=l.length-1,r.setTerminalPoint(new mxPoint(l[m].x/o-s.x,l[m].y/o-s.y),!1)),null!=(r=r.points))for(l=0;l<r.length;l++)r[l].x+=c,r[l].y+=d}else r.x+=c,r.y+=d}}}}else n=[]}return n},mxGraph.prototype.insertVertex=function(e,t,n,a,i,o,s,r,l){return t=this.createVertex(e,t,n,a,i,o,s,r,l),this.addCell(t,e)},mxGraph.prototype.createVertex=function(e,t,n,a,i,o,s,r,l){return(e=new mxGeometry(a,i,o,s)).relative=null!=l&&l,(n=new mxCell(n,e,r)).setId(t),n.setVertex(!0),n.setConnectable(!0),n},mxGraph.prototype.insertEdge=function(e,t,n,a,i,o){return t=this.createEdge(e,t,n,a,i,o),this.addEdge(t,e,a,i)},mxGraph.prototype.createEdge=function(e,t,n,a,i,o){return(e=new mxCell(n,new mxGeometry,o)).setId(t),e.setEdge(!0),e.geometry.relative=!0,e},mxGraph.prototype.addEdge=function(e,t,n,a,i){return this.addCell(e,t,i,n,a)},mxGraph.prototype.addCell=function(e,t,n,a,i){return this.addCells([e],t,n,a,i)[0]},mxGraph.prototype.addCells=function(e,t,n,a,i){null==t&&(t=this.getDefaultParent()),null==n&&(n=this.model.getChildCount(t)),this.model.beginUpdate();try{this.cellsAdded(e,t,n,a,i,!1,!0),this.fireEvent(new mxEventObject(mxEvent.ADD_CELLS,"cells",e,"parent",t,"index",n,"source",a,"target",i))}finally{this.model.endUpdate()}return e},mxGraph.prototype.cellsAdded=function(e,t,n,a,i,o,s){if(null!=e&&null!=t&&null!=n){this.model.beginUpdate();try{for(var r=null!=(d=o?this.view.getState(t):null)?d.origin:null,l=new mxPoint(0,0),d=0;d<e.length;d++)if(null==e[d])n--;else{var c=this.model.getParent(e[d]);if(null!=r&&e[d]!=t&&t!=c){var m=this.view.getState(c),u=null!=m?m.origin:l;if(null!=(p=this.model.getGeometry(e[d]))){var p,g=u.x-r.x,v=u.y-r.y;(p=p.clone()).translate(g,v),!p.relative&&this.model.isVertex(e[d])&&!this.isAllowNegativeCoordinates()&&(p.x=Math.max(0,p.x),p.y=Math.max(0,p.y)),this.model.setGeometry(e[d],p)}}t==c&&n+d>this.model.getChildCount(t)&&n--,this.model.add(t,e[d],n+d),this.isExtendParentsOnAdd()&&this.isExtendParent(e[d])&&this.extendParent(e[d]),(null==s||s)&&this.constrainChild(e[d]),null!=a&&this.cellConnected(e[d],a,!0),null!=i&&this.cellConnected(e[d],i,!1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",e,"parent",t,"index",n,"source",a,"target",i,"absolute",o))}finally{this.model.endUpdate()}}},mxGraph.prototype.removeCells=function(e,t){t=null==t||t,null==e&&(e=this.getDeletableCells(this.getSelectionCells())),t&&(e=this.getDeletableCells(this.addAllEdges(e))),this.model.beginUpdate();try{this.cellsRemoved(e),this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS,"cells",e,"includeEdges",t))}finally{this.model.endUpdate()}return e},mxGraph.prototype.cellsRemoved=function(e){if(null!=e&&0<e.length){var t=this.view.scale,n=this.view.translate;this.model.beginUpdate();try{for(var a={},i=0;i<e.length;i++){var o=mxCellPath.create(e[i]);a[o]=e[i]}for(i=0;i<e.length;i++){for(var s=this.getConnections(e[i]),r=0;r<s.length;r++)if(null==a[o=mxCellPath.create(s[r])]){if(null!=(d=this.model.getGeometry(s[r]))){var l=this.view.getState(s[r]);if(null!=l){var d=d.clone(),c=l.getVisibleTerminal(!0)==e[i],m=l.absolutePoints,u=c?0:m.length-1;d.setTerminalPoint(new mxPoint(m[u].x/t-n.x,m[u].y/t-n.y),c),this.model.setTerminal(s[r],null,c),this.model.setGeometry(s[r],d)}}}this.model.remove(e[i])}this.fireEvent(new mxEventObject(mxEvent.CELLS_REMOVED,"cells",e))}finally{this.model.endUpdate()}}},mxGraph.prototype.splitEdge=function(e,t,n,a,i){a=a||0,i=i||0,null==n&&(n=this.cloneCells([e])[0]);var o=this.model.getParent(e),s=this.model.getTerminal(e,!0);this.model.beginUpdate();try{this.cellsMoved(t,a,i,!1,!1),this.cellsAdded(t,o,this.model.getChildCount(o),null,null,!0),this.cellsAdded([n],o,this.model.getChildCount(o),s,t[0],!1),this.cellConnected(e,t[0],!0),this.fireEvent(new mxEventObject(mxEvent.SPLIT_EDGE,"edge",e,"cells",t,"newEdge",n,"dx",a,"dy",i))}finally{this.model.endUpdate()}return n},mxGraph.prototype.toggleCells=function(e,t,n){null==t&&(t=this.getSelectionCells()),n&&(t=this.addAllEdges(t)),this.model.beginUpdate();try{this.cellsToggled(t,e),this.fireEvent(new mxEventObject(mxEvent.TOGGLE_CELLS,"show",e,"cells",t,"includeEdges",n))}finally{this.model.endUpdate()}return t},mxGraph.prototype.cellsToggled=function(e,t){if(null!=e&&0<e.length){this.model.beginUpdate();try{for(var n=0;n<e.length;n++)this.model.setVisible(e[n],t)}finally{this.model.endUpdate()}}},mxGraph.prototype.foldCells=function(e,t,n,a){t=null!=t&&t,null==n&&(n=this.getFoldableCells(this.getSelectionCells(),e)),this.stopEditing(!1),this.model.beginUpdate();try{this.cellsFolded(n,e,t,a),this.fireEvent(new mxEventObject(mxEvent.FOLD_CELLS,"collapse",e,"recurse",t,"cells",n))}finally{this.model.endUpdate()}return n},mxGraph.prototype.cellsFolded=function(e,t,n,a){if(null!=e&&0<e.length){this.model.beginUpdate();try{for(var i=0;i<e.length;i++)if((!a||this.isCellFoldable(e[i],t))&&t!=this.isCellCollapsed(e[i])&&(this.model.setCollapsed(e[i],t),this.swapBounds(e[i],t),this.isExtendParent(e[i])&&this.extendParent(e[i]),n)){var o=this.model.getChildren(e[i]);this.foldCells(o,t,n)}this.fireEvent(new mxEventObject(mxEvent.CELLS_FOLDED,"cells",e,"collapse",t,"recurse",n))}finally{this.model.endUpdate()}}},mxGraph.prototype.swapBounds=function(e,t){if(null!=e){var n=this.model.getGeometry(e);null!=n&&(n=n.clone(),this.updateAlternateBounds(e,n,t),n.swap(),this.model.setGeometry(e,n))}},mxGraph.prototype.updateAlternateBounds=function(e,t,n){if(null!=e&&null!=t){if(n=null!=(n=this.view.getState(e))?n.style:this.getCellStyle(e),null==t.alternateBounds){var a=t;this.collapseToPreferredSize&&(null!=(e=this.getPreferredSizeForCell(e))&&(a=e,0<(e=mxUtils.getValue(n,mxConstants.STYLE_STARTSIZE))&&(a.height=Math.max(a.height,e)))),t.alternateBounds=new mxRectangle(0,0,a.width,a.height)}if(null!=t.alternateBounds){t.alternateBounds.x=t.x,t.alternateBounds.y=t.y;var i=mxUtils.toRadians(n[mxConstants.STYLE_ROTATION]||"0");0!=i&&(e=t.alternateBounds.getCenterX()-t.getCenterX(),n=t.alternateBounds.getCenterY()-t.getCenterY(),a=Math.cos(i),i=Math.sin(i),t.alternateBounds.x+=a*e-i*n-e,t.alternateBounds.y+=i*e+a*n-n)}}},mxGraph.prototype.addAllEdges=function(e){var t=e.slice();return t.concat(this.getAllEdges(e))},mxGraph.prototype.getAllEdges=function(e){var t=[];if(null!=e)for(var n=0;n<e.length;n++){for(var a=this.model.getEdgeCount(e[n]),i=0;i<a;i++)t.push(this.model.getEdgeAt(e[n],i));a=this.model.getChildren(e[n]),t=t.concat(this.getAllEdges(a))}return t},mxGraph.prototype.updateCellSize=function(e,t){t=null!=t&&t,this.model.beginUpdate();try{this.cellSizeUpdated(e,t),this.fireEvent(new mxEventObject(mxEvent.UPDATE_CELL_SIZE,"cell",e,"ignoreChildren",t))}finally{this.model.endUpdate()}return e},mxGraph.prototype.cellSizeUpdated=function(e,t){if(null!=e){this.model.beginUpdate();try{var n=this.getPreferredSizeForCell(e),a=this.model.getGeometry(e);if(null!=n&&null!=a){var i=this.isCellCollapsed(e);a=a.clone();if(this.isSwimlane(e)){var o=this.view.getState(e),s=null!=o?o.style:this.getCellStyle(e),r=this.model.getStyle(e);null==r&&(r=""),mxUtils.getValue(s,mxConstants.STYLE_HORIZONTAL,!0)?(r=mxUtils.setStyle(r,mxConstants.STYLE_STARTSIZE,n.height+8),i&&(a.height=n.height+8),a.width=n.width):(r=mxUtils.setStyle(r,mxConstants.STYLE_STARTSIZE,n.width+8),i&&(a.width=n.width+8),a.height=n.height),this.model.setStyle(e,r)}else a.width=n.width,a.height=n.height;if(!t&&!i){var l=this.view.getBounds(this.model.getChildren(e));if(null!=l){var d=this.view.translate,c=this.view.scale,m=(l.y+l.height)/c-a.y-d.y;a.width=Math.max(a.width,(l.x+l.width)/c-a.x-d.x),a.height=Math.max(a.height,m)}}this.cellsResized([e],[a])}}finally{this.model.endUpdate()}}},mxGraph.prototype.getPreferredSizeForCell=function(e){var t=null;if(null!=e){var n=this.view.getState(e),a=null!=n?n.style:this.getCellStyle(e);if(null!=a&&!this.model.isEdge(e)){var i=a[mxConstants.STYLE_FONTSIZE]||mxConstants.DEFAULT_FONTSIZE,o=0;t=0;null==this.getImage(n)&&null==a[mxConstants.STYLE_IMAGE]||a[mxConstants.STYLE_SHAPE]!=mxConstants.SHAPE_LABEL||(a[mxConstants.STYLE_VERTICAL_ALIGN]==mxConstants.ALIGN_MIDDLE&&(o+=parseFloat(a[mxConstants.STYLE_IMAGE_WIDTH])||mxLabel.prototype.imageSize),a[mxConstants.STYLE_ALIGN]!=mxConstants.ALIGN_CENTER&&(t+=parseFloat(a[mxConstants.STYLE_IMAGE_HEIGHT])||mxLabel.prototype.imageSize)),o+=2*(a[mxConstants.STYLE_SPACING]||0),o+=a[mxConstants.STYLE_SPACING_LEFT]||0,o+=a[mxConstants.STYLE_SPACING_RIGHT]||0,t+=2*(a[mxConstants.STYLE_SPACING]||0),t+=a[mxConstants.STYLE_SPACING_TOP]||0,t+=a[mxConstants.STYLE_SPACING_BOTTOM]||0,null!=(n=this.getFoldingImage(n))&&(o+=n.width+8),null!=(n=this.getLabel(e))&&0<n.length?(this.isHtmlLabel(e)||(n=n.replace(/\n/g,"<br>")),e=(i=mxUtils.getSizeForString(n,i,a[mxConstants.STYLE_FONTFAMILY])).width+o,t=i.height+t,mxUtils.getValue(a,mxConstants.STYLE_HORIZONTAL,!0)||(a=t,t=e,e=a),this.gridEnabled&&(e=this.snap(e+this.gridSize/2),t=this.snap(t+this.gridSize/2)),t=new mxRectangle(0,0,e,t)):t=new mxRectangle(0,0,a=4*this.gridSize,a)}}return t},mxGraph.prototype.handleGesture=function(e,t){if(.2<Math.abs(1-t.scale)){var n=this.view.scale,a=this.view.translate,i=e.width*t.scale,o=e.height*t.scale,s=e.y-(o-e.height)/2;n=new mxRectangle(this.snap((e.x-(i-e.width)/2)/n)-a.x,this.snap(s/n)-a.y,this.snap(i/n),this.snap(o/n));this.resizeCell(e.cell,n)}},mxGraph.prototype.resizeCell=function(e,t){return this.resizeCells([e],[t])[0]},mxGraph.prototype.resizeCells=function(e,t){this.model.beginUpdate();try{this.cellsResized(e,t),this.fireEvent(new mxEventObject(mxEvent.RESIZE_CELLS,"cells",e,"bounds",t))}finally{this.model.endUpdate()}return e},mxGraph.prototype.cellsResized=function(e,t){if(null!=e&&null!=t&&e.length==t.length){this.model.beginUpdate();try{for(var n=0;n<e.length;n++){var a=t[n],i=this.model.getGeometry(e[n]);if(null!=i&&(i.x!=a.x||i.y!=a.y||i.width!=a.width||i.height!=a.height)){if((i=i.clone()).relative){var o=i.offset;null!=o&&(o.x+=a.x-i.x,o.y+=a.y-i.y)}else i.x=a.x,i.y=a.y;i.width=a.width,i.height=a.height,!i.relative&&this.model.isVertex(e[n])&&!this.isAllowNegativeCoordinates()&&(i.x=Math.max(0,i.x),i.y=Math.max(0,i.y)),this.model.setGeometry(e[n],i),this.isExtendParent(e[n])&&this.extendParent(e[n])}}this.resetEdgesOnResize&&this.resetEdges(e),this.fireEvent(new mxEventObject(mxEvent.CELLS_RESIZED,"cells",e,"bounds",t))}finally{this.model.endUpdate()}}},mxGraph.prototype.extendParent=function(e){if(null!=e){var t=this.model.getParent(e),n=this.model.getGeometry(t);null!=t&&null!=n&&!this.isCellCollapsed(t)&&(null!=(e=this.model.getGeometry(e))&&(n.width<e.x+e.width||n.height<e.y+e.height))&&((n=n.clone()).width=Math.max(n.width,e.x+e.width),n.height=Math.max(n.height,e.y+e.height),this.cellsResized([t],[n]))}},mxGraph.prototype.importCells=function(e,t,n,a,i){return this.moveCells(e,t,n,!0,a,i)},mxGraph.prototype.moveCells=function(e,t,n,a,i,o){if(t=null!=t?t:0,n=null!=n?n:0,a=null!=a&&a,null!=e&&(0!=t||0!=n||a||null!=i)){this.model.beginUpdate();try{a&&(e=this.cloneCells(e,this.isCloneInvalidEdges()),null==i&&(i=this.getDefaultParent()));var s=this.isAllowNegativeCoordinates();if(null!=i&&this.setAllowNegativeCoordinates(!0),this.cellsMoved(e,t,n,!a&&this.isDisconnectOnMove()&&this.isAllowDanglingEdges(),null==i),this.setAllowNegativeCoordinates(s),null!=i){var r=this.model.getChildCount(i);this.cellsAdded(e,i,r,null,null,!0)}this.fireEvent(new mxEventObject(mxEvent.MOVE_CELLS,"cells",e,"dx",t,"dy",n,"clone",a,"target",i,"event",o))}finally{this.model.endUpdate()}}return e},mxGraph.prototype.cellsMoved=function(e,t,n,a,i){if(null!=e&&(0!=t||0!=n)){this.model.beginUpdate();try{a&&this.disconnectGraph(e);for(var o=0;o<e.length;o++)this.translateCell(e[o],t,n),i&&this.constrainChild(e[o]);this.resetEdgesOnMove&&this.resetEdges(e),this.fireEvent(new mxEventObject(mxEvent.CELLS_MOVED,"cells",e,"dx",n,"dy",n,"disconnect",a))}finally{this.model.endUpdate()}}},mxGraph.prototype.translateCell=function(e,t,n){var a=this.model.getGeometry(e);null!=a&&((a=a.clone()).translate(t,n),!a.relative&&this.model.isVertex(e)&&!this.isAllowNegativeCoordinates()&&(a.x=Math.max(0,a.x),a.y=Math.max(0,a.y)),a.relative&&!this.model.isEdge(e)&&(null==a.offset?a.offset=new mxPoint(t,n):(a.offset.x+=t,a.offset.y+=n)),this.model.setGeometry(e,a))},mxGraph.prototype.getCellContainmentArea=function(e){if(null!=e&&!this.model.isEdge(e)){var t=this.model.getParent(e);if(t==this.getDefaultParent()||t==this.getCurrentRoot())return this.getMaximumGraphBounds();if(null!=t&&t!=this.getDefaultParent())if(null!=(i=this.model.getGeometry(t))){var n=e=0,a=i.width,i=i.height;return this.isSwimlane(t)&&(e=(t=this.getStartSize(t)).width,a-=t.width,n=t.height,i-=t.height),new mxRectangle(e,n,a,i)}}return null},mxGraph.prototype.getMaximumGraphBounds=function(){return this.maximumGraphBounds},mxGraph.prototype.constrainChild=function(e){if(null!=e){var t=this.model.getGeometry(e),n=this.isConstrainChild(e)?this.getCellContainmentArea(e):this.getMaximumGraphBounds();null!=t&&null!=n&&!t.relative&&(t.x<n.x||t.y<n.y||n.width<t.x+t.width||n.height<t.y+t.height)&&(e=this.getOverlap(e),0<n.width&&(t.x=Math.min(t.x,n.x+n.width-(1-e)*t.width)),0<n.height&&(t.y=Math.min(t.y,n.y+n.height-(1-e)*t.height)),t.x=Math.max(t.x,n.x-t.width*e),t.y=Math.max(t.y,n.y-t.height*e))}},mxGraph.prototype.resetEdges=function(e){if(null!=e){for(var t={},n=0;n<e.length;n++){var a=mxCellPath.create(e[n]);t[a]=e[n]}this.model.beginUpdate();try{for(n=0;n<e.length;n++){var i=this.model.getEdges(e[n]);if(null!=i)for(a=0;a<i.length;a++){var o=this.view.getState(i[a]),s=null!=o?o.getVisibleTerminal(!0):this.view.getVisibleTerminal(i[a],!0),r=null!=o?o.getVisibleTerminal(!1):this.view.getVisibleTerminal(i[a],!1),l=mxCellPath.create(s),d=mxCellPath.create(r);(null==t[l]||null==t[d])&&this.resetEdge(i[a])}this.resetEdges(this.model.getChildren(e[n]))}}finally{this.model.endUpdate()}}},mxGraph.prototype.resetEdge=function(e){var t=this.model.getGeometry(e);return null!=t&&null!=t.points&&0<t.points.length&&((t=t.clone()).points=[],this.model.setGeometry(e,t)),e},mxGraph.prototype.getAllConnectionConstraints=function(e,t){return null!=e&&null!=e.shape&&null!=e.shape.stencil?e.shape.stencil.constraints:null},mxGraph.prototype.getConnectionConstraint=function(e,t,n){t=null;var a=e.style[n?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X];if(null!=a){var i=e.style[n?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y];null!=i&&(t=new mxPoint(parseFloat(a),parseFloat(i)))}return a=!1,null!=t&&(a=mxUtils.getValue(e.style,n?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,!0)),new mxConnectionConstraint(t,a)},mxGraph.prototype.setConnectionConstraint=function(e,t,n,a){if(null!=a){this.model.beginUpdate();try{null==a||null==a.point?(this.setCellStyles(n?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X,null,[e]),this.setCellStyles(n?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y,null,[e]),this.setCellStyles(n?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,null,[e])):null!=a.point&&(this.setCellStyles(n?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X,a.point.x,[e]),this.setCellStyles(n?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y,a.point.y,[e]),a.perimeter?this.setCellStyles(n?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,null,[e]):this.setCellStyles(n?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,"0",[e]))}finally{this.model.endUpdate()}}},mxGraph.prototype.getConnectionPoint=function(e,t){var n=null;if(null!=e){var a=this.view.getPerimeterBounds(e),i=new mxPoint(a.getCenterX(),a.getCenterY()),o=e.style[mxConstants.STYLE_DIRECTION],s=0;if(null!=o&&("north"==o?s+=270:"west"==o?s+=180:"south"==o&&(s+=90),"north"==o||"south"==o)){a.x+=a.width/2-a.height/2,a.y+=a.height/2-a.width/2;var r=a.width;a.width=a.height,a.height=r}if(null!=t.point){var l=n=1,d=0,c=0;if(this.getModel().isVertex(e.cell)){var m=e.style[mxConstants.STYLE_FLIPH],u=e.style[mxConstants.STYLE_FLIPV];null!=e.shape.stencil&&(m=1==mxUtils.getValue(e.style,"stencilFlipH",0)||m,u=1==mxUtils.getValue(e.style,"stencilFlipV",0)||u),"north"!=o&&"south"!=o||(r=m,m=u,u=r),m&&(n=-1,d=-a.width),u&&(l=-1,c=-a.height)}n=new mxPoint(a.x+t.point.x*a.width*n-d,a.y+t.point.y*a.height*l-c)}o=e.style[mxConstants.STYLE_ROTATION]||0,t.perimeter?(0!=s&&null!=n&&(r=a=0,90==s?r=1:180==s?a=-1:270==o&&(r=-1),n=mxUtils.getRotatedPoint(n,a,r,i)),null!=n&&t.perimeter&&(n=this.view.getPerimeterPoint(e,n,!1))):o+=s,0!=o&&null!=n&&(s=mxUtils.toRadians(o),a=Math.cos(s),r=Math.sin(s),n=mxUtils.getRotatedPoint(n,a,r,i))}return n},mxGraph.prototype.connectCell=function(e,t,n,a){this.model.beginUpdate();try{var i=this.model.getTerminal(e,n);this.cellConnected(e,t,n,a),this.fireEvent(new mxEventObject(mxEvent.CONNECT_CELL,"edge",e,"terminal",t,"source",n,"previous",i))}finally{this.model.endUpdate()}return e},mxGraph.prototype.cellConnected=function(e,t,n,a){if(null!=e){this.model.beginUpdate();try{var i=this.model.getTerminal(e,n);this.setConnectionConstraint(e,t,n,a),this.isPortsEnabled()&&(a=null,this.isPort(t)&&(a=t.getId(),t=this.getTerminalForPort(t,n)),this.setCellStyles(n?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT,a,[e])),this.model.setTerminal(e,t,n),this.resetEdgesOnConnect&&this.resetEdge(e),this.fireEvent(new mxEventObject(mxEvent.CELL_CONNECTED,"edge",e,"terminal",t,"source",n,"previous",i))}finally{this.model.endUpdate()}}},mxGraph.prototype.disconnectGraph=function(e){if(null!=e){this.model.beginUpdate();try{for(var t=this.view.scale,n=this.view.translate,a={},i=0;i<e.length;i++){a[mxCellPath.create(e[i])]=e[i]}for(i=0;i<e.length;i++)if(this.model.isEdge(e[i])){if(null!=(r=this.model.getGeometry(e[i]))){var o=this.view.getState(e[i]),s=this.view.getState(this.model.getParent(e[i]));if(null!=o&&null!=s){var r=r.clone(),l=-s.origin.x,d=-s.origin.y,c=o.absolutePoints,m=this.model.getTerminal(e[i],!0);if(null!=m&&this.isCellDisconnectable(e[i],m,!0)){for(var u=mxCellPath.create(m);null!=m&&null==a[u];)m=this.model.getParent(m),u=mxCellPath.create(m);null==m&&(r.setTerminalPoint(new mxPoint(c[0].x/t-n.x+l,c[0].y/t-n.y+d),!0),this.model.setTerminal(e[i],null,!0))}var p=this.model.getTerminal(e[i],!1);if(null!=p&&this.isCellDisconnectable(e[i],p,!1)){for(var g=mxCellPath.create(p);null!=p&&null==a[g];)p=this.model.getParent(p),g=mxCellPath.create(p);if(null==p){var v=c.length-1;r.setTerminalPoint(new mxPoint(c[v].x/t-n.x+l,c[v].y/t-n.y+d),!1),this.model.setTerminal(e[i],null,!1)}}this.model.setGeometry(e[i],r)}}}}finally{this.model.endUpdate()}}},mxGraph.prototype.getCurrentRoot=function(){return this.view.currentRoot},mxGraph.prototype.getTranslateForRoot=function(e){return null},mxGraph.prototype.isPort=function(e){return!1},mxGraph.prototype.getTerminalForPort=function(e,t){return this.model.getParent(e)},mxGraph.prototype.getChildOffsetForCell=function(e){return null},mxGraph.prototype.enterGroup=function(e){null!=(e=e||this.getSelectionCell())&&this.isValidRoot(e)&&(this.view.setCurrentRoot(e),this.clearSelection())},mxGraph.prototype.exitGroup=function(){var e=this.model.getRoot(),t=this.getCurrentRoot();if(null!=t){for(var n=this.model.getParent(t);n!=e&&!this.isValidRoot(n)&&this.model.getParent(n)!=e;)n=this.model.getParent(n);n==e||this.model.getParent(n)==e?this.view.setCurrentRoot(null):this.view.setCurrentRoot(n),null!=this.view.getState(t)&&this.setSelectionCell(t)}},mxGraph.prototype.home=function(){var e=this.getCurrentRoot();null!=e&&(this.view.setCurrentRoot(null),null!=this.view.getState(e)&&this.setSelectionCell(e))},mxGraph.prototype.isValidRoot=function(e){return null!=e},mxGraph.prototype.getGraphBounds=function(){return this.view.getGraphBounds()},mxGraph.prototype.getCellBounds=function(e,t,n){var a=[e];if(t&&(a=a.concat(this.model.getEdges(e))),a=this.view.getBounds(a),n){n=this.model.getChildCount(e);for(var i=0;i<n;i++){var o=this.getCellBounds(this.model.getChildAt(e,i),t,!0);null!=a?a.add(o):a=o}}return a},mxGraph.prototype.getBoundingBoxFromGeometry=function(e,t){t=null!=t&&t;var n=null;if(null!=e)for(var a=0;a<e.length;a++)if(t||this.model.isVertex(e[a])){var i=this.getCellGeometry(e[a]);if(null!=i){var o=i.points;if(null!=o&&0<o.length){for(var s=new mxRectangle(o[0].x,o[0].y,0,0),r=function(e){null!=e&&s.add(new mxRectangle(e.x,e.y,0,0))},l=1;l<o.length;l++)r(o[l]);r(i.getTerminalPoint(!0)),r(i.getTerminalPoint(!1))}null==n?n=new mxRectangle(i.x,i.y,i.width,i.height):n.add(i)}}return n},mxGraph.prototype.refresh=function(e){this.view.clear(e,null==e),this.view.validate(),this.sizeDidChange(),this.fireEvent(new mxEventObject(mxEvent.REFRESH))},mxGraph.prototype.snap=function(e){return this.gridEnabled&&(e=Math.round(e/this.gridSize)*this.gridSize),e},mxGraph.prototype.panGraph=function(e,t){if(this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container))this.container.scrollLeft=-e,this.container.scrollTop=-t;else{var n=this.view.getCanvas();if(this.dialect==mxConstants.DIALECT_SVG)if(0==e&&0==t){if(mxClient.IS_IE?n.setAttribute("transform","translate("+e+","+t+")"):n.removeAttribute("transform"),null!=this.shiftPreview1){for(var a=this.shiftPreview1.firstChild;null!=a;){var i=a.nextSibling;this.container.appendChild(a),a=i}for(this.shiftPreview1.parentNode.removeChild(this.shiftPreview1),this.shiftPreview1=null,this.container.appendChild(n.parentNode),a=this.shiftPreview2.firstChild;null!=a;)i=a.nextSibling,this.container.appendChild(a),a=i;this.shiftPreview2.parentNode.removeChild(this.shiftPreview2),this.shiftPreview2=null}}else{if(n.setAttribute("transform","translate("+e+","+t+")"),null==this.shiftPreview1){this.shiftPreview1=document.createElement("div"),this.shiftPreview1.style.position="absolute",this.shiftPreview1.style.overflow="visible",this.shiftPreview2=document.createElement("div"),this.shiftPreview2.style.position="absolute",this.shiftPreview2.style.overflow="visible";var o=this.shiftPreview1;for(a=this.container.firstChild;null!=a;)i=a.nextSibling,a!=n.parentNode?o.appendChild(a):o=this.shiftPreview2,a=i;this.container.insertBefore(this.shiftPreview1,n.parentNode),this.container.appendChild(this.shiftPreview2)}this.shiftPreview1.style.left=e+"px",this.shiftPreview1.style.top=t+"px",this.shiftPreview2.style.left=e+"px",this.shiftPreview2.style.top=t+"px"}else n.style.left=e+"px",n.style.top=t+"px";this.panDx=e,this.panDy=t,this.fireEvent(new mxEventObject(mxEvent.PAN))}},mxGraph.prototype.zoomIn=function(){this.zoom(this.zoomFactor)},mxGraph.prototype.zoomOut=function(){this.zoom(1/this.zoomFactor)},mxGraph.prototype.zoomActual=function(){1==this.view.scale?this.view.setTranslate(0,0):(this.view.translate.x=0,this.view.translate.y=0,this.view.setScale(1))},mxGraph.prototype.zoomTo=function(e,t){this.zoom(e/this.view.scale,t)},mxGraph.prototype.zoom=function(e,t){t=null!=t?t:this.centerZoom;var n=this.view.scale*e,a=this.view.getState(this.getSelectionCell());if(this.keepSelectionVisibleOnZoom&&null!=a)a=new mxRectangle(a.x*e,a.y*e,a.width*e,a.height*e),this.view.scale=n,this.scrollRectToVisible(a)||(this.view.revalidate(),this.view.setScale(n));else if(t&&!mxUtils.hasScrollbars(this.container)){a=this.container.offsetWidth;var i=this.container.offsetHeight;if(1<e){var o=(e-1)/(2*n);a=a*-o,i=i*-o}else a*=o=(1/e-1)/(2*this.view.scale),i*=o;this.view.scaleAndTranslate(n,this.view.translate.x+a,this.view.translate.y+i)}else this.view.setScale(n),mxUtils.hasScrollbars(this.container)&&(i=a=0,t&&(a=this.container.offsetWidth*(e-1)/2,i=this.container.offsetHeight*(e-1)/2),this.container.scrollLeft=Math.round(this.container.scrollLeft*e+a),this.container.scrollTop=Math.round(this.container.scrollTop*e+i))},mxGraph.prototype.zoomToRect=function(e){var t=this.container.clientWidth/e.width/(this.container.clientHeight/e.height);e.x=Math.max(0,e.x),e.y=Math.max(0,e.y);var n=Math.min(this.container.scrollWidth,e.x+e.width),a=Math.min(this.container.scrollHeight,e.y+e.height);e.width=n-e.x,e.height=a-e.y,t<1?(n=((t=e.height/t)-e.height)/2,e.height=t,t=Math.min(e.y,n),e.y-=t,a=Math.min(this.container.scrollHeight,e.y+e.height),e.height=a-e.y):(n=((t*=e.width)-e.width)/2,e.width=t,t=Math.min(e.x,n),e.x-=t,n=Math.min(this.container.scrollWidth,e.x+e.width),e.width=n-e.x),t=this.container.clientWidth/e.width,n=this.view.scale*t,mxUtils.hasScrollbars(this.container)?(this.view.setScale(n),this.container.scrollLeft=Math.round(e.x*t),this.container.scrollTop=Math.round(e.y*t)):this.view.scaleAndTranslate(n,this.view.translate.x-e.x/this.view.scale,this.view.translate.y-e.y/this.view.scale)},mxGraph.prototype.fit=function(e,t){if(null!=this.container){e=null!=e?e:0,t=null!=t&&t;var n=this.container.clientWidth,a=this.container.clientHeight,i=this.view.getGraphBounds();t&&null!=i.x&&null!=i.y&&(i.width+=i.x,i.height+=i.y,i.x=0,i.y=0);var o=this.view.scale,s=i.width/o,r=i.height/o;null!=this.backgroundImage&&(s=Math.max(s,this.backgroundImage.width-i.x/o),r=Math.max(r,this.backgroundImage.height-i.y/o));var l=t?e:2*e;n=Math.floor(100*Math.min(n/(s+l),a/(r+l)))/100;null!=this.minFitScale&&(n=Math.max(n,this.minFitScale)),null!=this.maxFitScale&&(n=Math.min(n,this.maxFitScale)),t?this.view.scale!=n&&this.view.setScale(n):mxUtils.hasScrollbars(this.container)?(this.view.setScale(n),null!=i.x&&(this.container.scrollLeft=Math.round(i.x/o)*n-e-Math.max(0,(this.container.clientWidth-s*n)/2)),null!=i.y&&(this.container.scrollTop=Math.round(i.y/o)*n-e-Math.max(0,(this.container.clientHeight-r*n)/2))):this.view.scaleAndTranslate(n,null!=i.x?Math.floor(this.view.translate.x-i.x/o+e+1):e,null!=i.y?Math.floor(this.view.translate.y-i.y/o+e+1):e)}return this.view.scale},mxGraph.prototype.scrollCellToVisible=function(e,t){var n=-this.view.translate.x,a=-this.view.translate.y,i=this.view.getState(e);null!=i&&(n=new mxRectangle(n+i.x,a+i.y,i.width,i.height),t&&null!=this.container&&(a=this.container.clientWidth,i=this.container.clientHeight,n.x=n.getCenterX()-a/2,n.width=a,n.y=n.getCenterY()-i/2,n.height=i),this.scrollRectToVisible(n)&&this.view.setTranslate(this.view.translate.x,this.view.translate.y))},mxGraph.prototype.scrollRectToVisible=function(e){var t=!1;if(null!=e){var n=this.container.offsetWidth,a=this.container.offsetHeight,i=Math.min(n,e.width),o=Math.min(a,e.height);if(mxUtils.hasScrollbars(this.container)){n=this.container,e.x+=this.view.translate.x,e.y+=this.view.translate.y;var s=n.scrollLeft-e.x;a=Math.max(s-n.scrollLeft,0);0<s?n.scrollLeft-=s+2:0<(s=e.x+i-n.scrollLeft-n.clientWidth)&&(n.scrollLeft+=s+2),i=n.scrollTop-e.y,s=Math.max(0,i-n.scrollTop),0<i?n.scrollTop-=i+2:0<(i=e.y+o-n.scrollTop-n.clientHeight)&&(n.scrollTop+=i+2),!this.useScrollbarsForPanning&&(0!=a||0!=s)&&this.view.setTranslate(a,s)}else{s=-this.view.translate.x;var r=-this.view.translate.y,l=this.view.scale;e.x+i>s+n&&(this.view.translate.x-=(e.x+i-n-s)/l,t=!0),e.y+o>r+a&&(this.view.translate.y-=(e.y+o-a-r)/l,t=!0),e.x<s&&(this.view.translate.x+=(s-e.x)/l,t=!0),e.y<r&&(this.view.translate.y+=(r-e.y)/l,t=!0),t&&(this.view.refresh(),null!=this.selectionCellsHandler&&this.selectionCellsHandler.refresh())}}return t},mxGraph.prototype.getCellGeometry=function(e){return this.model.getGeometry(e)},mxGraph.prototype.isCellVisible=function(e){return this.model.isVisible(e)},mxGraph.prototype.isCellCollapsed=function(e){return this.model.isCollapsed(e)},mxGraph.prototype.isCellConnectable=function(e){return this.model.isConnectable(e)},mxGraph.prototype.isOrthogonal=function(e){var t=e.style[mxConstants.STYLE_ORTHOGONAL];return null!=t?t:(e=this.view.getEdgeStyle(e))==mxEdgeStyle.SegmentConnector||e==mxEdgeStyle.ElbowConnector||e==mxEdgeStyle.SideToSide||e==mxEdgeStyle.TopToBottom||e==mxEdgeStyle.EntityRelation||e==mxEdgeStyle.OrthConnector},mxGraph.prototype.isLoop=function(e){var t=e.getVisibleTerminalState(!0);return e=e.getVisibleTerminalState(!1),null!=t&&t==e},mxGraph.prototype.isCloneEvent=function(e){return mxEvent.isControlDown(e)},mxGraph.prototype.isToggleEvent=function(e){return mxClient.IS_MAC?mxEvent.isMetaDown(e):mxEvent.isControlDown(e)},mxGraph.prototype.isGridEnabledEvent=function(e){return null!=e&&!mxEvent.isAltDown(e)},mxGraph.prototype.isConstrainedEvent=function(e){return mxEvent.isShiftDown(e)},mxGraph.prototype.isForceMarqueeEvent=function(e){return mxEvent.isAltDown(e)},mxGraph.prototype.validationAlert=function(e){mxUtils.alert(e)},mxGraph.prototype.isEdgeValid=function(e,t,n){return null==this.getEdgeValidationError(e,t,n)},mxGraph.prototype.getEdgeValidationError=function(e,t,n){if(null!=e&&!this.isAllowDanglingEdges()&&(null==t||null==n))return"";if(null!=e&&null==this.model.getTerminal(e,!0)&&null==this.model.getTerminal(e,!1))return null;if(!this.allowLoops&&t==n&&null!=t||!this.isValidConnection(t,n))return"";if(null!=t&&null!=n){var a="";if(!this.multigraph)(1<(i=this.model.getEdgesBetween(t,n,!0)).length||1==i.length&&i[0]!=e)&&(a+=(mxResources.get(this.alreadyConnectedResource)||this.alreadyConnectedResource)+"\n");var i=this.model.getDirectedEdgeCount(t,!0,e),o=this.model.getDirectedEdgeCount(n,!1,e);if(null!=this.multiplicities)for(var s=0;s<this.multiplicities.length;s++){var r=this.multiplicities[s].check(this,e,t,n,i,o);null!=r&&(a+=r)}return null!=(r=this.validateEdge(e,t,n))&&(a+=r),0<a.length?a:null}return this.allowDanglingEdges?null:""},mxGraph.prototype.validateEdge=function(e,t,n){return null},mxGraph.prototype.validateGraph=function(e,t){e=null!=e?e:this.model.getRoot(),t=null!=t?t:{};for(var n=!0,a=this.model.getChildCount(e),i=0;i<a;i++){var o=this.model.getChildAt(e,i),s=t;this.isValidRoot(o)&&(s={}),null!=(s=this.validateGraph(o,s))?this.setCellWarning(o,s.replace(/\n/g,"<br>")):this.setCellWarning(o,null),n=n&&null==s}return a="",this.isCellCollapsed(e)&&!n&&(a+=(mxResources.get(this.containsValidationErrorsResource)||this.containsValidationErrorsResource)+"\n"),a=this.model.isEdge(e)?a+(this.getEdgeValidationError(e,this.model.getTerminal(e,!0),this.model.getTerminal(e,!1))||""):a+(this.getCellValidationError(e)||""),null!=(i=this.validateCell(e,t))&&(a+=i),null==this.model.getParent(e)&&this.view.validate(),0<a.length||!n?a:null},mxGraph.prototype.getCellValidationError=function(e){var t=this.model.getDirectedEdgeCount(e,!0),n=this.model.getDirectedEdgeCount(e,!1);e=this.model.getValue(e);var a="";if(null!=this.multiplicities)for(var i=0;i<this.multiplicities.length;i++){var o=this.multiplicities[i];o.source&&mxUtils.isNode(e,o.type,o.attr,o.value)&&(0==o.max&&0<t||1==o.min&&0==t||1==o.max&&1<t)?a+=o.countError+"\n":!o.source&&mxUtils.isNode(e,o.type,o.attr,o.value)&&(0==o.max&&0<n||1==o.min&&0==n||1==o.max&&1<n)&&(a+=o.countError+"\n")}return 0<a.length?a:null},mxGraph.prototype.validateCell=function(e,t){return null},mxGraph.prototype.getBackgroundImage=function(){return this.backgroundImage},mxGraph.prototype.setBackgroundImage=function(e){this.backgroundImage=e},mxGraph.prototype.getFoldingImage=function(e){if(null!=e&&this.foldingEnabled&&!this.getModel().isEdge(e.cell)){var t=this.isCellCollapsed(e.cell);if(this.isCellFoldable(e.cell,!t))return t?this.collapsedImage:this.expandedImage}return null},mxGraph.prototype.convertValueToString=function(e){if(null!=(e=this.model.getValue(e))){if(mxUtils.isNode(e))return e.nodeName;if("function"==typeof e.toString)return e.toString()}return""},mxGraph.prototype.getLabel=function(e){var t="";if(this.labelsVisible&&null!=e){var n=null!=(n=this.view.getState(e))?n.style:this.getCellStyle(e);mxUtils.getValue(n,mxConstants.STYLE_NOLABEL,!1)||(t=this.convertValueToString(e))}return t},mxGraph.prototype.isHtmlLabel=function(e){return this.isHtmlLabels()},mxGraph.prototype.isHtmlLabels=function(){return this.htmlLabels},mxGraph.prototype.setHtmlLabels=function(e){this.htmlLabels=e},mxGraph.prototype.isWrapping=function(e){var t=this.view.getState(e);return null!=(e=null!=t?t.style:this.getCellStyle(e))&&"wrap"==e[mxConstants.STYLE_WHITE_SPACE]},mxGraph.prototype.isLabelClipped=function(e){var t=this.view.getState(e);return null!=(e=null!=t?t.style:this.getCellStyle(e))&&"hidden"==e[mxConstants.STYLE_OVERFLOW]},mxGraph.prototype.getTooltip=function(e,n,t,a){var i=null;return null!=e&&(null==e.control||n!=e.control.node&&n.parentNode!=e.control.node||(i=this.collapseExpandResource,i=mxResources.get(i)||i),null==i&&null!=e.overlays&&e.overlays.visit(function(e,t){null!=i||n!=t.node&&n.parentNode!=t.node||(i=t.overlay.toString())}),null==i&&(null!=(t=this.selectionCellsHandler.getHandler(e.cell))&&"function"==typeof t.getTooltipForNode&&(i=t.getTooltipForNode(n))),null==i&&(i=this.getTooltipForCell(e.cell))),i},mxGraph.prototype.getTooltipForCell=function(e){return null!=e&&null!=e.getTooltip?e.getTooltip():this.convertValueToString(e)},mxGraph.prototype.getCursorForCell=function(e){return null},mxGraph.prototype.getStartSize=function(e){var t=new mxRectangle,n=this.view.getState(e);return null!=(e=null!=n?n.style:this.getCellStyle(e))&&(n=parseInt(mxUtils.getValue(e,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),mxUtils.getValue(e,mxConstants.STYLE_HORIZONTAL,!0)?t.height=n:t.width=n),t},mxGraph.prototype.getImage=function(e){return null!=e&&null!=e.style?e.style[mxConstants.STYLE_IMAGE]:null},mxGraph.prototype.getVerticalAlign=function(e){return null!=e&&null!=e.style?e.style[mxConstants.STYLE_VERTICAL_ALIGN]||mxConstants.ALIGN_MIDDLE:null},mxGraph.prototype.getIndicatorColor=function(e){return null!=e&&null!=e.style?e.style[mxConstants.STYLE_INDICATOR_COLOR]:null},mxGraph.prototype.getIndicatorGradientColor=function(e){return null!=e&&null!=e.style?e.style[mxConstants.STYLE_INDICATOR_GRADIENTCOLOR]:null},mxGraph.prototype.getIndicatorShape=function(e){return null!=e&&null!=e.style?e.style[mxConstants.STYLE_INDICATOR_SHAPE]:null},mxGraph.prototype.getIndicatorImage=function(e){return null!=e&&null!=e.style?e.style[mxConstants.STYLE_INDICATOR_IMAGE]:null},mxGraph.prototype.getBorder=function(){return this.border},mxGraph.prototype.setBorder=function(e){this.border=e},mxGraph.prototype.isSwimlane=function(e){var t;if(null!=e&&this.model.getParent(e)!=this.model.getRoot()&&(null!=(t=null!=(t=this.view.getState(e))?t.style:this.getCellStyle(e))&&!this.model.isEdge(e)))return t[mxConstants.STYLE_SHAPE]==mxConstants.SHAPE_SWIMLANE;return!1},mxGraph.prototype.isResizeContainer=function(){return this.resizeContainer},mxGraph.prototype.setResizeContainer=function(e){this.resizeContainer=e},mxGraph.prototype.isEnabled=function(){return this.enabled},mxGraph.prototype.setEnabled=function(e){this.enabled=e},mxGraph.prototype.isEscapeEnabled=function(){return this.escapeEnabled},mxGraph.prototype.setEscapeEnabled=function(e){this.escapeEnabled=e},mxGraph.prototype.isInvokesStopCellEditing=function(){return this.invokesStopCellEditing},mxGraph.prototype.setInvokesStopCellEditing=function(e){this.invokesStopCellEditing=e},mxGraph.prototype.isEnterStopsCellEditing=function(){return this.enterStopsCellEditing},mxGraph.prototype.setEnterStopsCellEditing=function(e){this.enterStopsCellEditing=e},mxGraph.prototype.isCellLocked=function(e){var t=this.model.getGeometry(e);return this.isCellsLocked()||null!=t&&this.model.isVertex(e)&&t.relative},mxGraph.prototype.isCellsLocked=function(){return this.cellsLocked},mxGraph.prototype.setCellsLocked=function(e){this.cellsLocked=e},mxGraph.prototype.getCloneableCells=function(e){return this.model.filterCells(e,mxUtils.bind(this,function(e){return this.isCellCloneable(e)}))},mxGraph.prototype.isCellCloneable=function(e){var t=this.view.getState(e);return e=null!=t?t.style:this.getCellStyle(e),this.isCellsCloneable()&&0!=e[mxConstants.STYLE_CLONEABLE]},mxGraph.prototype.isCellsCloneable=function(){return this.cellsCloneable},mxGraph.prototype.setCellsCloneable=function(e){this.cellsCloneable=e},mxGraph.prototype.getExportableCells=function(e){return this.model.filterCells(e,mxUtils.bind(this,function(e){return this.canExportCell(e)}))},mxGraph.prototype.canExportCell=function(e){return this.exportEnabled},mxGraph.prototype.getImportableCells=function(e){return this.model.filterCells(e,mxUtils.bind(this,function(e){return this.canImportCell(e)}))},mxGraph.prototype.canImportCell=function(e){return this.importEnabled},mxGraph.prototype.isCellSelectable=function(e){return this.isCellsSelectable()},mxGraph.prototype.isCellsSelectable=function(){return this.cellsSelectable},mxGraph.prototype.setCellsSelectable=function(e){this.cellsSelectable=e},mxGraph.prototype.getDeletableCells=function(e){return this.model.filterCells(e,mxUtils.bind(this,function(e){return this.isCellDeletable(e)}))},mxGraph.prototype.isCellDeletable=function(e){var t=this.view.getState(e);return e=null!=t?t.style:this.getCellStyle(e),this.isCellsDeletable()&&0!=e[mxConstants.STYLE_DELETABLE]},mxGraph.prototype.isCellsDeletable=function(){return this.cellsDeletable},mxGraph.prototype.setCellsDeletable=function(e){this.cellsDeletable=e},mxGraph.prototype.isLabelMovable=function(e){return!this.isCellLocked(e)&&(this.model.isEdge(e)&&this.edgeLabelsMovable||this.model.isVertex(e)&&this.vertexLabelsMovable)},mxGraph.prototype.getMovableCells=function(e){return this.model.filterCells(e,mxUtils.bind(this,function(e){return this.isCellMovable(e)}))},mxGraph.prototype.isCellMovable=function(e){var t=null!=(t=this.view.getState(e))?t.style:this.getCellStyle(e);return this.isCellsMovable()&&!this.isCellLocked(e)&&0!=t[mxConstants.STYLE_MOVABLE]},mxGraph.prototype.isCellsMovable=function(){return this.cellsMovable},mxGraph.prototype.setCellsMovable=function(e){this.cellsMovable=e},mxGraph.prototype.isGridEnabled=function(){return this.gridEnabled},mxGraph.prototype.setGridEnabled=function(e){this.gridEnabled=e},mxGraph.prototype.isPortsEnabled=function(){return this.portsEnabled},mxGraph.prototype.setPortsEnabled=function(e){this.portsEnabled=e},mxGraph.prototype.getGridSize=function(){return this.gridSize},mxGraph.prototype.setGridSize=function(e){this.gridSize=e},mxGraph.prototype.getTolerance=function(){return this.tolerance},mxGraph.prototype.setTolerance=function(e){this.tolerance=e},mxGraph.prototype.isVertexLabelsMovable=function(){return this.vertexLabelsMovable},mxGraph.prototype.setVertexLabelsMovable=function(e){this.vertexLabelsMovable=e},mxGraph.prototype.isEdgeLabelsMovable=function(){return this.edgeLabelsMovable},mxGraph.prototype.setEdgeLabelsMovable=function(e){this.edgeLabelsMovable=e},mxGraph.prototype.isSwimlaneNesting=function(){return this.swimlaneNesting},mxGraph.prototype.setSwimlaneNesting=function(e){this.swimlaneNesting=e},mxGraph.prototype.isSwimlaneSelectionEnabled=function(){return this.swimlaneSelectionEnabled},mxGraph.prototype.setSwimlaneSelectionEnabled=function(e){this.swimlaneSelectionEnabled=e},mxGraph.prototype.isMultigraph=function(){return this.multigraph},mxGraph.prototype.setMultigraph=function(e){this.multigraph=e},mxGraph.prototype.isAllowLoops=function(){return this.allowLoops},mxGraph.prototype.setAllowDanglingEdges=function(e){this.allowDanglingEdges=e},mxGraph.prototype.isAllowDanglingEdges=function(){return this.allowDanglingEdges},mxGraph.prototype.setConnectableEdges=function(e){this.connectableEdges=e},mxGraph.prototype.isConnectableEdges=function(){return this.connectableEdges},mxGraph.prototype.setCloneInvalidEdges=function(e){this.cloneInvalidEdges=e},mxGraph.prototype.isCloneInvalidEdges=function(){return this.cloneInvalidEdges},mxGraph.prototype.setAllowLoops=function(e){this.allowLoops=e},mxGraph.prototype.isDisconnectOnMove=function(){return this.disconnectOnMove},mxGraph.prototype.setDisconnectOnMove=function(e){this.disconnectOnMove=e},mxGraph.prototype.isDropEnabled=function(){return this.dropEnabled},mxGraph.prototype.setDropEnabled=function(e){this.dropEnabled=e},mxGraph.prototype.isSplitEnabled=function(){return this.splitEnabled},mxGraph.prototype.setSplitEnabled=function(e){this.splitEnabled=e},mxGraph.prototype.isCellResizable=function(e){var t=null!=(t=this.view.getState(e))?t.style:this.getCellStyle(e);return this.isCellsResizable()&&!this.isCellLocked(e)&&0!=t[mxConstants.STYLE_RESIZABLE]},mxGraph.prototype.isCellsResizable=function(){return this.cellsResizable},mxGraph.prototype.setCellsResizable=function(e){this.cellsResizable=e},mxGraph.prototype.isTerminalPointMovable=function(e,t){return!0},mxGraph.prototype.isCellBendable=function(e){var t=null!=(t=this.view.getState(e))?t.style:this.getCellStyle(e);return this.isCellsBendable()&&!this.isCellLocked(e)&&0!=t[mxConstants.STYLE_BENDABLE]},mxGraph.prototype.isCellsBendable=function(){return this.cellsBendable},mxGraph.prototype.setCellsBendable=function(e){this.cellsBendable=e},mxGraph.prototype.isCellEditable=function(e){var t=null!=(t=this.view.getState(e))?t.style:this.getCellStyle(e);return this.isCellsEditable()&&!this.isCellLocked(e)&&0!=t[mxConstants.STYLE_EDITABLE]},mxGraph.prototype.isCellsEditable=function(){return this.cellsEditable},mxGraph.prototype.setCellsEditable=function(e){this.cellsEditable=e},mxGraph.prototype.isCellDisconnectable=function(e,t,n){return this.isCellsDisconnectable()&&!this.isCellLocked(e)},mxGraph.prototype.isCellsDisconnectable=function(){return this.cellsDisconnectable},mxGraph.prototype.setCellsDisconnectable=function(e){this.cellsDisconnectable=e},mxGraph.prototype.isValidSource=function(e){return null==e&&this.allowDanglingEdges||null!=e&&(!this.model.isEdge(e)||this.connectableEdges)&&this.isCellConnectable(e)},mxGraph.prototype.isValidTarget=function(e){return this.isValidSource(e)},mxGraph.prototype.isValidConnection=function(e,t){return this.isValidSource(e)&&this.isValidTarget(t)},mxGraph.prototype.setConnectable=function(e){this.connectionHandler.setEnabled(e)},mxGraph.prototype.isConnectable=function(e){return this.connectionHandler.isEnabled()},mxGraph.prototype.setTooltips=function(e){this.tooltipHandler.setEnabled(e)},mxGraph.prototype.setPanning=function(e){this.panningHandler.panningEnabled=e},mxGraph.prototype.isEditing=function(e){if(null!=this.cellEditor){var t=this.cellEditor.getEditingCell();return null==e?null!=t:e==t}return!1},mxGraph.prototype.isAutoSizeCell=function(e){var t=this.view.getState(e);return e=null!=t?t.style:this.getCellStyle(e),this.isAutoSizeCells()||1==e[mxConstants.STYLE_AUTOSIZE]},mxGraph.prototype.isAutoSizeCells=function(){return this.autoSizeCells},mxGraph.prototype.setAutoSizeCells=function(e){this.autoSizeCells=e},mxGraph.prototype.isExtendParent=function(e){return!this.getModel().isEdge(e)&&this.isExtendParents()},mxGraph.prototype.isExtendParents=function(){return this.extendParents},mxGraph.prototype.setExtendParents=function(e){this.extendParents=e},mxGraph.prototype.isExtendParentsOnAdd=function(){return this.extendParentsOnAdd},mxGraph.prototype.setExtendParentsOnAdd=function(e){this.extendParentsOnAdd=e},mxGraph.prototype.isConstrainChild=function(e){return this.isConstrainChildren()&&!this.getModel().isEdge(this.getModel().getParent(e))},mxGraph.prototype.isConstrainChildren=function(){return this.constrainChildren},mxGraph.prototype.setConstrainChildren=function(e){this.constrainChildren=e},mxGraph.prototype.isAllowNegativeCoordinates=function(){return this.allowNegativeCoordinates},mxGraph.prototype.setAllowNegativeCoordinates=function(e){this.allowNegativeCoordinates=e},mxGraph.prototype.getOverlap=function(e){return this.isAllowOverlapParent(e)?this.defaultOverlap:0},mxGraph.prototype.isAllowOverlapParent=function(e){return!1},mxGraph.prototype.getFoldableCells=function(e,t){return this.model.filterCells(e,mxUtils.bind(this,function(e){return this.isCellFoldable(e,t)}))},mxGraph.prototype.isCellFoldable=function(e,t){var n=null!=(n=this.view.getState(e))?n.style:this.getCellStyle(e);return 0<this.model.getChildCount(e)&&0!=n[mxConstants.STYLE_FOLDABLE]},mxGraph.prototype.isValidDropTarget=function(e,t,n){return null!=e&&(this.isSplitEnabled()&&this.isSplitTarget(e,t,n)||!this.model.isEdge(e)&&(this.isSwimlane(e)||0<this.model.getChildCount(e)&&!this.isCellCollapsed(e)))},mxGraph.prototype.isSplitTarget=function(e,t,n){return!(!this.model.isEdge(e)||null==t||1!=t.length||!this.isCellConnectable(t[0])||null!=this.getEdgeValidationError(e,this.model.getTerminal(e,!0),t[0]))&&(n=this.model.getTerminal(e,!0),e=this.model.getTerminal(e,!1),!this.model.isAncestor(t[0],n)&&!this.model.isAncestor(t[0],e))},mxGraph.prototype.getDropTarget=function(e,t,n){if(!this.isSwimlaneNesting())for(var a=0;a<e.length;a++)if(this.isSwimlane(e[a]))return null;if((a=mxUtils.convertPoint(this.container,mxEvent.getClientX(t),mxEvent.getClientY(t))).x-=this.panDx,a.y-=this.panDy,a=this.getSwimlaneAt(a.x,a.y),null==n)n=a;else if(null!=a){for(var i=this.model.getParent(a);null!=i&&this.isSwimlane(i)&&i!=n;)i=this.model.getParent(i);i==n&&(n=a)}for(;null!=n&&!this.isValidDropTarget(n,e,t)&&!this.model.isLayer(n);)n=this.model.getParent(n);return!this.model.isLayer(n)&&mxUtils.indexOf(e,n)<0?n:null},mxGraph.prototype.getDefaultParent=function(){var e=this.defaultParent;return null==e&&(null==(e=this.getCurrentRoot())&&(e=this.model.getRoot(),e=this.model.getChildAt(e,0))),e},mxGraph.prototype.setDefaultParent=function(e){this.defaultParent=e},mxGraph.prototype.getSwimlane=function(e){for(;null!=e&&!this.isSwimlane(e);)e=this.model.getParent(e);return e},mxGraph.prototype.getSwimlaneAt=function(e,t,n){if(null!=(n=n||this.getDefaultParent()))for(var a=this.model.getChildCount(n),i=0;i<a;i++){var o=this.model.getChildAt(n,i),s=this.getSwimlaneAt(e,t,o);if(null!=s)return s;if(this.isSwimlane(o)&&(s=this.view.getState(o),this.intersects(s,e,t)))return o}return null},mxGraph.prototype.getCellAt=function(e,t,n,a,i){if(a=null==a||a,i=null==i||i,null!=(n=null!=n?n:this.getDefaultParent()))for(var o=this.model.getChildCount(n)-1;0<=o;o--){var s=this.model.getChildAt(n,o),r=this.getCellAt(e,t,s,a,i);if(null!=r)return r;if(this.isCellVisible(s)&&(i&&this.model.isEdge(s)||a&&this.model.isVertex(s))&&(r=this.view.getState(s),this.intersects(r,e,t)))return s}return null},mxGraph.prototype.intersects=function(e,t,n){if(null!=e){var a=e.absolutePoints;if(null!=a){e=this.tolerance*this.tolerance;for(var i=a[0],o=1;o<a.length;o++){var s=a[o];if(mxUtils.ptSegDistSq(i.x,i.y,s.x,s.y,t,n)<=e)return!0;i=s}}else if(0!=(i=mxUtils.toRadians(mxUtils.getValue(e.style,mxConstants.STYLE_ROTATION)||0))&&(a=Math.cos(-i),i=Math.sin(-i),o=new mxPoint(e.getCenterX(),e.getCenterY()),t=(i=mxUtils.getRotatedPoint(new mxPoint(t,n),a,i,o)).x,n=i.y),mxUtils.contains(e,t,n))return!0}return!1},mxGraph.prototype.hitsSwimlaneContent=function(e,t,n){var a=this.getView().getState(e);if(e=this.getStartSize(e),null!=a){var i=this.getView().getScale();if(t-=a.x,n-=a.y,0<e.width&&0<t&&t>e.width*i||0<e.height&&0<n&&n>e.height*i)return!0}return!1},mxGraph.prototype.getChildVertices=function(e){return this.getChildCells(e,!0,!1)},mxGraph.prototype.getChildEdges=function(e){return this.getChildCells(e,!1,!0)},mxGraph.prototype.getChildCells=function(e,t,n){for(e=null!=e?e:this.getDefaultParent(),e=this.model.getChildCells(e,null!=t&&t,null!=n&&n),t=[],n=0;n<e.length;n++)this.isCellVisible(e[n])&&t.push(e[n]);return t},mxGraph.prototype.getConnections=function(e,t){return this.getEdges(e,t,!0,!0,!1)},mxGraph.prototype.getIncomingEdges=function(e,t){return this.getEdges(e,t,!0,!1,!1)},mxGraph.prototype.getOutgoingEdges=function(e,t){return this.getEdges(e,t,!1,!0,!1)},mxGraph.prototype.getEdges=function(e,t,n,a,i,o){n=null==n||n,a=null==a||a,i=null==i||i,o=null!=o&&o;for(var s=[],r=this.isCellCollapsed(e),l=this.model.getChildCount(e),d=0;d<l;d++){var c=this.model.getChildAt(e,d);!r&&this.isCellVisible(c)||(s=s.concat(this.model.getEdges(c,n,a)))}for(s=s.concat(this.model.getEdges(e,n,a)),r=[],d=0;d<s.length;d++)l=null!=(c=this.view.getState(s[d]))?c.getVisibleTerminal(!0):this.view.getVisibleTerminal(s[d],!0),c=null!=c?c.getVisibleTerminal(!1):this.view.getVisibleTerminal(s[d],!1),(i&&l==c||l!=c&&(n&&c==e&&(null==t||this.isValidAncestor(l,t,o))||a&&l==e&&(null==t||this.isValidAncestor(c,t,o))))&&r.push(s[d]);return r},mxGraph.prototype.isValidAncestor=function(e,t,n){return n?this.model.isAncestor(t,e):this.model.getParent(e)==t},mxGraph.prototype.getOpposites=function(e,t,n,a){n=null==n||n,a=null==a||a;var i=[],o={};if(null!=e)for(var s=0;s<e.length;s++){var r=null!=(l=this.view.getState(e[s]))?l.getVisibleTerminal(!0):this.view.getVisibleTerminal(e[s],!0),l=null!=l?l.getVisibleTerminal(!1):this.view.getVisibleTerminal(e[s],!1);if(r==t&&null!=l&&l!=t&&a){var d=mxCellPath.create(l);null==o[d]&&(o[d]=l,i.push(l))}else l==t&&null!=r&&r!=t&&n&&(null==o[d=mxCellPath.create(r)]&&(o[d]=r,i.push(r)))}return i},mxGraph.prototype.getEdgesBetween=function(e,t,n){n=null!=n&&n;for(var a=this.getEdges(e),i=[],o=0;o<a.length;o++){var s=null!=(r=this.view.getState(a[o]))?r.getVisibleTerminal(!0):this.view.getVisibleTerminal(a[o],!0),r=null!=r?r.getVisibleTerminal(!1):this.view.getVisibleTerminal(a[o],!1);(s==e&&r==t||!n&&s==t&&r==e)&&i.push(a[o])}return i},mxGraph.prototype.getPointForEvent=function(e,t){var n=mxUtils.convertPoint(this.container,mxEvent.getClientX(e),mxEvent.getClientY(e)),a=this.view.scale,i=this.view.translate,o=0!=t?this.gridSize/2:0;return n.x=this.snap(n.x/a-i.x-o),n.y=this.snap(n.y/a-i.y-o),n},mxGraph.prototype.getCells=function(e,t,n,a,i,o){if(o=null!=o?o:[],0<n||0<a){var s=e+n,r=t+a;if(null!=(i=i||this.getDefaultParent()))for(var l=this.model.getChildCount(i),d=0;d<l;d++){var c=this.model.getChildAt(i,d),m=this.view.getState(c);if(this.isCellVisible(c)&&null!=m){var u=m;0!=(m=mxUtils.getValue(m.style,mxConstants.STYLE_ROTATION)||0)&&(u=mxUtils.getBoundingBox(u,m)),u.x>=e&&u.y+u.height<=r&&u.y>=t&&u.x+u.width<=s?o.push(c):this.getCells(e,t,n,a,c,o)}}}return o},mxGraph.prototype.getCellsBeyond=function(e,t,n,a,i){var o=[];if((a||i)&&(null==n&&(n=this.getDefaultParent()),null!=n))for(var s=this.model.getChildCount(n),r=0;r<s;r++){var l=this.model.getChildAt(n,r),d=this.view.getState(l);this.isCellVisible(l)&&null!=d&&(!a||d.x>=e)&&(!i||d.y>=t)&&o.push(l)}return o},mxGraph.prototype.findTreeRoots=function(e,t,n){t=null!=t&&t,n=null!=n&&n;var a=[];if(null!=e){for(var i=this.getModel(),o=i.getChildCount(e),s=null,r=0,l=0;l<o;l++){var d=i.getChildAt(e,l);if(this.model.isVertex(d)&&this.isCellVisible(d)){for(var c=this.getConnections(d,t?e:null),m=0,u=0,p=0;p<c.length;p++)this.view.getVisibleTerminal(c[p],!0)==d?m++:u++;(n&&0==m&&0<u||!n&&0==u&&0<m)&&a.push(d),r<(c=n?u-m:m-u)&&(r=c,s=d)}}0==a.length&&null!=s&&a.push(s)}return a},mxGraph.prototype.traverse=function(e,t,n,a,i){if(null!=n&&null!=e){t=null==t||t,i=i||[];var o=mxCellPath.create(e);if(null==i[o]&&(null==(a=n(i[o]=e,a))||a)&&0<(a=this.model.getEdgeCount(e)))for(o=0;o<a;o++){var s=this.model.getEdgeAt(e,o),r=this.model.getTerminal(s,!0)==e;t&&!r||(r=this.model.getTerminal(s,!r),this.traverse(r,t,n,s,i))}}},mxGraph.prototype.isCellSelected=function(e){return this.getSelectionModel().isSelected(e)},mxGraph.prototype.isSelectionEmpty=function(){return this.getSelectionModel().isEmpty()},mxGraph.prototype.clearSelection=function(){return this.getSelectionModel().clear()},mxGraph.prototype.getSelectionCount=function(){return this.getSelectionModel().cells.length},mxGraph.prototype.getSelectionCell=function(){return this.getSelectionModel().cells[0]},mxGraph.prototype.getSelectionCells=function(){return this.getSelectionModel().cells.slice()},mxGraph.prototype.setSelectionCell=function(e){this.getSelectionModel().setCell(e)},mxGraph.prototype.setSelectionCells=function(e){this.getSelectionModel().setCells(e)},mxGraph.prototype.addSelectionCell=function(e){this.getSelectionModel().addCell(e)},mxGraph.prototype.addSelectionCells=function(e){this.getSelectionModel().addCells(e)},mxGraph.prototype.removeSelectionCell=function(e){this.getSelectionModel().removeCell(e)},mxGraph.prototype.removeSelectionCells=function(e){this.getSelectionModel().removeCells(e)},mxGraph.prototype.selectRegion=function(e,t){var n=this.getCells(e.x,e.y,e.width,e.height);return this.selectCellsForEvent(n,t),n},mxGraph.prototype.selectNextCell=function(){this.selectCell(!0)},mxGraph.prototype.selectPreviousCell=function(){this.selectCell()},mxGraph.prototype.selectParentCell=function(){this.selectCell(!1,!0)},mxGraph.prototype.selectChildCell=function(){this.selectCell(!1,!1,!0)},mxGraph.prototype.selectCell=function(e,t,n){var a=0<(i=this.selectionModel).cells.length?i.cells[0]:null;1<i.cells.length&&i.clear();var i=null!=a?this.model.getParent(a):this.getDefaultParent(),o=this.model.getChildCount(i);null==a&&0<o?(e=this.model.getChildAt(i,0),this.setSelectionCell(e)):null!=a&&!t||null==this.view.getState(i)||null==this.model.getGeometry(i)?null!=a&&n?0<this.model.getChildCount(a)&&(e=this.model.getChildAt(a,0),this.setSelectionCell(e)):0<o&&(t=i.getIndex(a),e?(t++,e=this.model.getChildAt(i,t%o)):(t--,e=this.model.getChildAt(i,t<0?o-1:t)),this.setSelectionCell(e)):this.getCurrentRoot()!=i&&this.setSelectionCell(i)},mxGraph.prototype.selectAll=function(e){e=e||this.getDefaultParent(),null!=(e=this.model.getChildren(e))&&this.setSelectionCells(e)},mxGraph.prototype.selectVertices=function(e){this.selectCells(!0,!1,e)},mxGraph.prototype.selectEdges=function(e){this.selectCells(!1,!0,e)},mxGraph.prototype.selectCells=function(t,n,e){e=e||this.getDefaultParent();var a=mxUtils.bind(this,function(e){return null!=this.view.getState(e)&&0==this.model.getChildCount(e)&&(this.model.isVertex(e)&&t||this.model.isEdge(e)&&n)});e=this.model.filterDescendants(a,e),this.setSelectionCells(e)},mxGraph.prototype.selectCellForEvent=function(e,t){var n=this.isCellSelected(e);this.isToggleEvent(t)?n?this.removeSelectionCell(e):this.addSelectionCell(e):(!n||1!=this.getSelectionCount())&&this.setSelectionCell(e)},mxGraph.prototype.selectCellsForEvent=function(e,t){this.isToggleEvent(t)?this.addSelectionCells(e):this.setSelectionCells(e)},mxGraph.prototype.createHandler=function(e){var t=null;return null!=e&&(this.model.isEdge(e.cell)?(t=this.view.getEdgeStyle(e),t=this.isLoop(e)||t==mxEdgeStyle.ElbowConnector||t==mxEdgeStyle.SideToSide||t==mxEdgeStyle.TopToBottom?new mxElbowEdgeHandler(e):t==mxEdgeStyle.SegmentConnector||t==mxEdgeStyle.OrthConnector?new mxEdgeSegmentHandler(e):new mxEdgeHandler(e)):t=new mxVertexHandler(e)),t},mxGraph.prototype.addMouseListener=function(e){null==this.mouseListeners&&(this.mouseListeners=[]),this.mouseListeners.push(e)},mxGraph.prototype.removeMouseListener=function(e){if(null!=this.mouseListeners)for(var t=0;t<this.mouseListeners.length;t++)if(this.mouseListeners[t]==e){this.mouseListeners.splice(t,1);break}},mxGraph.prototype.updateMouseEvent=function(e){if(null==e.graphX||null==e.graphY){var t=mxUtils.convertPoint(this.container,e.getX(),e.getY());e.graphX=t.x-this.panDx,e.graphY=t.y-this.panDy}},mxGraph.prototype.fireMouseEvent=function(e,t,n){if(null==n&&(n=this),this.updateMouseEvent(t),e==mxEvent.MOUSE_DOWN&&(this.isMouseDown=!0),mxClient.IS_TOUCH&&this.doubleTapEnabled&&e==mxEvent.MOUSE_DOWN){var a=(new Date).getTime();a-this.lastTouchTime<this.doubleTapTimeout&&Math.abs(this.lastTouchX-t.getX())<this.doubleTapTolerance&&Math.abs(this.lastTouchY-t.getY())<this.doubleTapTolerance?(this.lastTouchTime=0,this.dblClick(t.getEvent(),t.getCell()),t.getEvent().cancelBubble=!0):(this.lastTouchX=t.getX(),this.lastTouchY=t.getY(),this.lastTouchTime=a)}if(a=2!=t.getEvent().detail,mxClient.IS_IE&&"CSS1Compat"==document.compatMode&&((null!=this.lastMouseX&&Math.abs(this.lastMouseX-t.getX())>this.doubleTapTolerance||null!=this.lastMouseY&&Math.abs(this.lastMouseY-t.getY())>this.doubleTapTolerance)&&(a=!0),e==mxEvent.MOUSE_UP&&(this.lastMouseX=t.getX(),this.lastMouseY=t.getY())),(e!=mxEvent.MOUSE_UP||this.isMouseDown)&&a){if(e==mxEvent.MOUSE_UP&&(this.isMouseDown=!1),!this.isEditing()&&(mxClient.IS_OP||mxClient.IS_SF||mxClient.IS_GC||mxClient.IS_IE&&mxClient.IS_SVG||t.getEvent().target!=this.container)){if(e==mxEvent.MOUSE_MOVE&&this.isMouseDown&&this.autoScroll&&this.scrollPointToVisible(t.getGraphX(),t.getGraphY(),this.autoExtend),null!=this.mouseListeners)for(n=[n,t],t.getEvent().returnValue=!0,a=0;a<this.mouseListeners.length;a++){var i=this.mouseListeners[a];e==mxEvent.MOUSE_DOWN?i.mouseDown.apply(i,n):e==mxEvent.MOUSE_MOVE?i.mouseMove.apply(i,n):e==mxEvent.MOUSE_UP&&i.mouseUp.apply(i,n)}e==mxEvent.MOUSE_UP&&this.click(t)}}else e==mxEvent.MOUSE_UP&&(this.isMouseDown=!1)},mxGraph.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tooltipHandler&&this.tooltipHandler.destroy(),null!=this.selectionCellsHandler&&this.selectionCellsHandler.destroy(),null!=this.panningHandler&&this.panningHandler.destroy(),null!=this.connectionHandler&&this.connectionHandler.destroy(),null!=this.graphHandler&&this.graphHandler.destroy(),null!=this.cellEditor&&this.cellEditor.destroy(),null!=this.view&&this.view.destroy(),null!=this.model&&null!=this.graphModelChangeListener&&(this.model.removeListener(this.graphModelChangeListener),this.graphModelChangeListener=null),this.container=null)},mxCellOverlay.prototype=new mxEventSource,mxCellOverlay.prototype.constructor=mxCellOverlay,mxCellOverlay.prototype.image=null,mxCellOverlay.prototype.tooltip=null,mxCellOverlay.prototype.align=mxConstants.ALIGN_RIGHT,mxCellOverlay.prototype.verticalAlign=mxConstants.ALIGN_BOTTOM,mxCellOverlay.prototype.offset=null,mxCellOverlay.prototype.cursor=null,mxCellOverlay.prototype.defaultOverlap=.5,mxCellOverlay.prototype.getBounds=function(e){var t=e.view.graph.getModel().isEdge(e.cell),n=e.view.scale,a=null,i=this.image.width,o=this.image.height;return t?1==(t=e.absolutePoints).length%2?a=t[Math.floor(t.length/2)]:(e=t[(a=t.length/2)-1],t=t[a],a=new mxPoint(e.x+(t.x-e.x)/2,e.y+(t.y-e.y)/2)):((a=new mxPoint).x=this.align==mxConstants.ALIGN_LEFT?e.x:this.align==mxConstants.ALIGN_CENTER?e.x+e.width/2:e.x+e.width,a.y=this.verticalAlign==mxConstants.ALIGN_TOP?e.y:this.verticalAlign==mxConstants.ALIGN_MIDDLE?e.y+e.height/2:e.y+e.height),new mxRectangle(Math.round(a.x-(i*this.defaultOverlap-this.offset.x)*n),Math.round(a.y-(o*this.defaultOverlap-this.offset.y)*n),i*n,o*n)},mxCellOverlay.prototype.toString=function(){return this.tooltip},mxOutline.prototype.source=null,mxOutline.prototype.outline=null,mxOutline.prototype.graphRenderHint=mxConstants.RENDERING_HINT_FASTER,mxOutline.prototype.enabled=!0,mxOutline.prototype.showViewport=!0,mxOutline.prototype.border=10,mxOutline.prototype.sizerSize=8,mxOutline.prototype.updateOnPan=!1,mxOutline.prototype.sizerImage=null,mxOutline.prototype.suspended=!1,mxOutline.prototype.init=function(e){this.outline=new mxGraph(e,this.source.getModel(),this.graphRenderHint,this.source.getStylesheet()),this.outline.foldingEnabled=!1,this.outline.autoScroll=!1;var t=this.outline.graphModelChanged;this.outline.graphModelChanged=mxUtils.bind(this,function(e){!this.suspended&&null!=this.outline&&t.apply(this.outline,arguments)}),mxClient.IS_SVG&&((e=this.outline.getView().getCanvas().parentNode).setAttribute("shape-rendering","optimizeSpeed"),e.setAttribute("image-rendering","optimizeSpeed")),this.outline.labelsVisible=!1,this.outline.setEnabled(!1),this.updateHandler=mxUtils.bind(this,function(e,t){!this.suspended&&!this.active&&this.update()}),this.source.getModel().addListener(mxEvent.CHANGE,this.updateHandler),this.outline.addMouseListener(this),(e=this.source.getView()).addListener(mxEvent.SCALE,this.updateHandler),e.addListener(mxEvent.TRANSLATE,this.updateHandler),e.addListener(mxEvent.SCALE_AND_TRANSLATE,this.updateHandler),e.addListener(mxEvent.DOWN,this.updateHandler),e.addListener(mxEvent.UP,this.updateHandler),mxEvent.addListener(this.source.container,"scroll",this.updateHandler),this.panHandler=mxUtils.bind(this,function(e){this.updateOnPan&&this.updateHandler.apply(this,arguments)}),this.source.addListener(mxEvent.PAN,this.panHandler),this.refreshHandler=mxUtils.bind(this,function(e){this.outline.setStylesheet(this.source.getStylesheet()),this.outline.refresh()}),this.source.addListener(mxEvent.REFRESH,this.refreshHandler),this.bounds=new mxRectangle(0,0,0,0),this.selectionBorder=new mxRectangleShape(this.bounds,null,mxConstants.OUTLINE_COLOR,mxConstants.OUTLINE_STROKEWIDTH),this.selectionBorder.dialect=this.outline.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.selectionBorder.init(this.outline.getView().getOverlayPane()),mxEvent.redirectMouseEvents(this.selectionBorder.node,this.outline),this.selectionBorder.node.style.background="",this.sizer=this.createSizer(),this.sizer.init(this.outline.getView().getOverlayPane()),this.enabled&&(this.sizer.node.style.cursor="pointer"),mxEvent.addListener(this.sizer.node,mxClient.IS_TOUCH?"touchstart":"mousedown",mxUtils.bind(this,function(e){this.outline.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e))})),this.selectionBorder.node.style.display=this.showViewport?"":"none",this.sizer.node.style.display=this.selectionBorder.node.style.display,this.selectionBorder.node.style.cursor="move",this.update(!1)},mxOutline.prototype.isEnabled=function(){return this.enabled},mxOutline.prototype.setEnabled=function(e){this.enabled=e},mxOutline.prototype.setZoomEnabled=function(e){this.sizer.node.style.visibility=e?"visible":"hidden"},mxOutline.prototype.refresh=function(){this.update(!0)},mxOutline.prototype.createSizer=function(){var e=null!=this.sizerImage?new mxImageShape(new mxRectangle(0,0,this.sizerImage.width,this.sizerImage.height),this.sizerImage.src):new mxRectangleShape(new mxRectangle(0,0,this.sizerSize,this.sizerSize),mxConstants.OUTLINE_HANDLE_FILLCOLOR,mxConstants.OUTLINE_HANDLE_STROKECOLOR);return e.dialect=this.outline.dialect,e},mxOutline.prototype.getSourceContainerSize=function(){return new mxRectangle(0,0,this.source.container.scrollWidth,this.source.container.scrollHeight)},mxOutline.prototype.getOutlineOffset=function(e){return null},mxOutline.prototype.update=function(e){if(null!=this.source){var t=this.source.view.scale,n=new mxRectangle((n=this.source.getGraphBounds()).x/t+this.source.panDx,n.y/t+this.source.panDy,n.width/t,n.height/t),a=new mxRectangle(0,0,this.source.container.clientWidth/t,this.source.container.clientHeight/t);(o=n.clone()).add(a);var i=this.getSourceContainerSize(),o=(a=Math.max(i.width/t,o.width),t=Math.max(i.height/t,o.height),Math.max(0,this.outline.container.clientWidth-this.border));i=Math.max(0,this.outline.container.clientHeight-this.border);if(0<(o=Math.min(o/a,i/t))){this.outline.getView().scale!=o&&(this.outline.getView().scale=o,e=!0),(a=this.outline.getView()).currentRoot!=this.source.getView().currentRoot&&a.setCurrentRoot(this.source.getView().currentRoot);i=(t=this.source.view.translate).x+this.source.panDx;var s=t.y+this.source.panDy;null!=(o=this.getOutlineOffset(o))&&(i+=o.x,s+=o.y),n.x<0&&(i-=n.x),n.y<0&&(s-=n.y),a.translate.x==i&&a.translate.y==s||(a.translate.x=i,a.translate.y=s,e=!0);n=a.translate,i=(o=this.source.getView().scale)/a.scale,s=1/a.scale;var r=this.source.container;this.bounds=new mxRectangle((n.x-t.x-this.source.panDx)/s,(n.y-t.y-this.source.panDy)/s,r.clientWidth/i,r.clientHeight/i),this.bounds.x+=this.source.container.scrollLeft*a.scale/o,this.bounds.y+=this.source.container.scrollTop*a.scale/o,(n=this.selectionBorder.bounds).x==this.bounds.x&&n.y==this.bounds.y&&n.width==this.bounds.width&&n.height==this.bounds.height||(this.selectionBorder.bounds=this.bounds,this.selectionBorder.redraw()),n=this.sizer.bounds,a=new mxRectangle(this.bounds.x+this.bounds.width-n.width/2,this.bounds.y+this.bounds.height-n.height/2,n.width,n.height),n.x==a.x&&n.y==a.y&&n.width==a.width&&n.height==a.height||(this.sizer.bounds=a,"hidden"!=this.sizer.node.style.visibility&&this.sizer.redraw()),e&&this.outline.view.revalidate()}}},mxOutline.prototype.mouseDown=function(e,t){this.enabled&&this.showViewport&&(this.zoom=t.isSource(this.sizer),this.startX=t.getX(),this.startY=t.getY(),this.active=!0,this.source.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.source.container)?(this.dx0=this.source.container.scrollLeft,this.dy0=this.source.container.scrollTop):this.dy0=this.dx0=0),t.consume()},mxOutline.prototype.mouseMove=function(e,t){if(this.active){this.selectionBorder.node.style.display=this.showViewport?"":"none",this.sizer.node.style.display=this.selectionBorder.node.style.display;var n=t.getX()-this.startX,a=t.getY()-this.startY,i=null;if(this.zoom)a=n/((i=this.source.container).clientWidth/i.clientHeight),i=new mxRectangle(this.bounds.x,this.bounds.y,Math.max(1,this.bounds.width+n),Math.max(1,this.bounds.height+a)),this.selectionBorder.bounds=i,this.selectionBorder.redraw();else{var o=this.outline.getView().scale;i=new mxRectangle(this.bounds.x+n,this.bounds.y+a,this.bounds.width,this.bounds.height);this.selectionBorder.bounds=i,this.selectionBorder.redraw(),n=n/o*this.source.getView().scale,a=a/o*this.source.getView().scale,this.source.panGraph(-n-this.dx0,-a-this.dy0)}n=this.sizer.bounds,this.sizer.bounds=new mxRectangle(i.x+i.width-n.width/2,i.y+i.height-n.height/2,n.width,n.height),"hidden"!=this.sizer.node.style.visibility&&this.sizer.redraw(),t.consume()}},mxOutline.prototype.mouseUp=function(e,t){if(this.active){var n=t.getX()-this.startX,a=t.getY()-this.startY;if(0<Math.abs(n)||0<Math.abs(a)){if(this.zoom){a=this.selectionBorder.bounds.width;var i=this.source.getView().scale;this.source.zoomTo(i-n*i/a,!1)}else this.source.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.source.container)||(this.source.panGraph(0,0),n/=this.outline.getView().scale,a/=this.outline.getView().scale,i=this.source.getView().translate,this.source.getView().setTranslate(i.x-n,i.y-a));this.update(),t.consume()}this.index=null,this.active=!1}},mxOutline.prototype.destroy=function(){null!=this.source&&(this.source.removeListener(this.panHandler),this.source.removeListener(this.refreshHandler),this.source.getModel().removeListener(this.updateHandler),this.source.getView().removeListener(this.updateHandler),mxEvent.addListener(this.source.container,"scroll",this.updateHandler),this.source=null),null!=this.outline&&(this.outline.removeMouseListener(this),this.outline.destroy(),this.outline=null),null!=this.selectionBorder&&(this.selectionBorder.destroy(),this.selectionBorder=null),null!=this.sizer&&(this.sizer.destroy(),this.sizer=null)},mxMultiplicity.prototype.type=null,mxMultiplicity.prototype.attr=null,mxMultiplicity.prototype.value=null,mxMultiplicity.prototype.source=null,mxMultiplicity.prototype.min=null,mxMultiplicity.prototype.max=null,mxMultiplicity.prototype.validNeighbors=null,mxMultiplicity.prototype.validNeighborsAllowed=!0,mxMultiplicity.prototype.countError=null,mxMultiplicity.prototype.typeError=null,mxMultiplicity.prototype.check=function(e,t,n,a,i,o){var s="";return(this.source&&this.checkTerminal(e,n,t)||!this.source&&this.checkTerminal(e,a,t))&&(null!=this.countError&&(this.source&&(0==this.max||i>=this.max)||!this.source&&(0==this.max||o>=this.max))&&(s+=this.countError+"\n"),null!=this.validNeighbors&&null!=this.typeError&&0<this.validNeighbors.length&&(this.checkNeighbors(e,t,n,a)||(s+=this.typeError+"\n"))),0<s.length?s:null},mxMultiplicity.prototype.checkNeighbors=function(e,t,n,a){t=e.model.getValue(n),a=e.model.getValue(a),n=!this.validNeighborsAllowed;for(var i=this.validNeighbors,o=0;o<i.length;o++){if(this.source&&this.checkType(e,a,i[o])){n=this.validNeighborsAllowed;break}if(!this.source&&this.checkType(e,t,i[o])){n=this.validNeighborsAllowed;break}}return n},mxMultiplicity.prototype.checkTerminal=function(e,t,n){return t=e.model.getValue(t),this.checkType(e,t,this.type,this.attr,this.value)},mxMultiplicity.prototype.checkType=function(e,t,n,a,i){return null!=t&&(isNaN(t.nodeType)?t==n:mxUtils.isNode(t,n,a,i))},mxLayoutManager.prototype=new mxEventSource,mxLayoutManager.prototype.constructor=mxLayoutManager,mxLayoutManager.prototype.graph=null,mxLayoutManager.prototype.bubbling=!0,mxLayoutManager.prototype.enabled=!0,mxLayoutManager.prototype.updateHandler=null,mxLayoutManager.prototype.moveHandler=null,mxLayoutManager.prototype.isEnabled=function(){return this.enabled},mxLayoutManager.prototype.setEnabled=function(e){this.enabled=e},mxLayoutManager.prototype.isBubbling=function(){return this.bubbling},mxLayoutManager.prototype.setBubbling=function(e){this.bubbling=e},mxLayoutManager.prototype.getGraph=function(){return this.graph},mxLayoutManager.prototype.setGraph=function(e){if(null!=this.graph){var t=this.graph.getModel();t.removeListener(this.undoHandler),this.graph.removeListener(this.moveHandler)}this.graph=e,null!=this.graph&&((t=this.graph.getModel()).addListener(mxEvent.BEFORE_UNDO,this.undoHandler),this.graph.addListener(mxEvent.MOVE_CELLS,this.moveHandler))},mxLayoutManager.prototype.getLayout=function(e){return null},mxLayoutManager.prototype.beforeUndo=function(e){e=this.getCellsForChanges(e.changes);var t=this.getGraph().getModel();if(this.isBubbling())for(var n=t.getParents(e);0<n.length;)e=e.concat(n),n=t.getParents(n);this.layoutCells(mxUtils.sortCells(e,!1))},mxLayoutManager.prototype.cellsMoved=function(e,t){if(null!=e&&null!=t)for(var n=mxUtils.convertPoint(this.getGraph().container,mxEvent.getClientX(t),mxEvent.getClientY(t)),a=this.getGraph().getModel(),i=0;i<e.length;i++){var o=this.getLayout(a.getParent(e[i]));null!=o&&o.moveCell(e[i],n.x,n.y)}},mxLayoutManager.prototype.getCellsForChanges=function(e){for(var t=[],n={},a=0;a<e.length;a++){if((i=e[a])instanceof mxRootChange)return[];for(var i=this.getCellsForChange(i),o=0;o<i.length;o++)if(null!=i[o]){var s=mxCellPath.create(i[o]);null==n[s]&&(n[s]=i[o],t.push(i[o]))}}return t},mxLayoutManager.prototype.getCellsForChange=function(e){var t=this.getGraph().getModel();return e instanceof mxChildChange?[e.child,e.previous,t.getParent(e.child)]:e instanceof mxTerminalChange||e instanceof mxGeometryChange?[e.cell,t.getParent(e.cell)]:[]},mxLayoutManager.prototype.layoutCells=function(e){if(0<e.length){var t=this.getGraph().getModel();t.beginUpdate();try{for(var n=null,a=0;a<e.length;a++)e[a]!=t.getRoot()&&e[a]!=n&&(n=e[a],this.executeLayout(this.getLayout(n),n));this.fireEvent(new mxEventObject(mxEvent.LAYOUT_CELLS,"cells",e))}finally{t.endUpdate()}}},mxLayoutManager.prototype.executeLayout=function(e,t){null!=e&&null!=t&&e.execute(t)},mxLayoutManager.prototype.destroy=function(){this.setGraph(null)},mxSpaceManager.prototype=new mxEventSource,mxSpaceManager.prototype.constructor=mxSpaceManager,mxSpaceManager.prototype.graph=null,mxSpaceManager.prototype.enabled=!0,mxSpaceManager.prototype.shiftRightwards=!0,mxSpaceManager.prototype.shiftDownwards=!0,mxSpaceManager.prototype.extendParents=!0,mxSpaceManager.prototype.resizeHandler=null,mxSpaceManager.prototype.foldHandler=null,mxSpaceManager.prototype.isCellIgnored=function(e){return!this.getGraph().getModel().isVertex(e)},mxSpaceManager.prototype.isCellShiftable=function(e){return this.getGraph().getModel().isVertex(e)&&this.getGraph().isCellMovable(e)},mxSpaceManager.prototype.isEnabled=function(){return this.enabled},mxSpaceManager.prototype.setEnabled=function(e){this.enabled=e},mxSpaceManager.prototype.isShiftRightwards=function(){return this.shiftRightwards},mxSpaceManager.prototype.setShiftRightwards=function(e){this.shiftRightwards=e},mxSpaceManager.prototype.isShiftDownwards=function(){return this.shiftDownwards},mxSpaceManager.prototype.setShiftDownwards=function(e){this.shiftDownwards=e},mxSpaceManager.prototype.isExtendParents=function(){return this.extendParents},mxSpaceManager.prototype.setExtendParents=function(e){this.extendParents=e},mxSpaceManager.prototype.getGraph=function(){return this.graph},mxSpaceManager.prototype.setGraph=function(e){null!=this.graph&&(this.graph.removeListener(this.resizeHandler),this.graph.removeListener(this.foldHandler)),this.graph=e,null!=this.graph&&(this.graph.addListener(mxEvent.RESIZE_CELLS,this.resizeHandler),this.graph.addListener(mxEvent.FOLD_CELLS,this.foldHandler))},mxSpaceManager.prototype.cellsResized=function(e){if(null!=e){var t=this.graph.getModel();t.beginUpdate();try{for(var n=0;n<e.length;n++)if(!this.isCellIgnored(e[n])){this.cellResized(e[n]);break}}finally{t.endUpdate()}}},mxSpaceManager.prototype.cellResized=function(e){var t=this.getGraph(),n=t.getView(),a=t.getModel(),i=n.getState(e),o=n.getState(a.getParent(e));if(null!=i&&null!=o){var s=this.getCellsToShift(i),r=a.getGeometry(e);if(null!=s&&null!=r){var l=n.translate,d=n.scale,c=(n=i.x-o.origin.x-l.x*d,o=i.y-o.origin.y-l.y*d,l=i.x+i.width,i.y+i.height),m=i.width-r.width*d+n-r.x*d,u=i.height-r.height*d+o-r.y*d,p=1-r.width*d/i.width;i=1-r.height*d/i.height;a.beginUpdate();try{for(r=0;r<s.length;r++)s[r]!=e&&this.isCellShiftable(s[r])&&this.shiftCell(s[r],m,u,n,o,l,c,p,i,this.isExtendParents()&&t.isExtendParent(s[r]))}finally{a.endUpdate()}}}},mxSpaceManager.prototype.shiftCell=function(e,t,n,a,i,o,s,r,l,d){var c=(a=this.getGraph()).getView().getState(e);if(null!=c){var m=a.getModel();if(null!=(p=m.getGeometry(e))){m.beginUpdate();try{if(this.isShiftRightwards())if(c.x>=o)(p=p.clone()).translate(-t,0);else{var u=Math.max(0,c.x-x0);(p=p.clone()).translate(-r*u,0)}if(this.isShiftDownwards())if(c.y>=s)(p=p.clone()).translate(0,-n);else{var p,g=Math.max(0,c.y-i);(p=p.clone()).translate(0,-l*g)}p!=m.getGeometry(e)&&(m.setGeometry(e,p),d&&a.extendParent(e))}finally{m.endUpdate()}}}},mxSpaceManager.prototype.getCellsToShift=function(e){var t=this.getGraph(),n=t.getModel().getParent(e.cell),a=this.isShiftDownwards(),i=this.isShiftRightwards();return t.getCellsBeyond(e.x+(a?0:e.width),e.y+(a&&i?0:e.height),n,i,a)},mxSpaceManager.prototype.destroy=function(){this.setGraph(null)},mxSwimlaneManager.prototype=new mxEventSource,mxSwimlaneManager.prototype.constructor=mxSwimlaneManager,mxSwimlaneManager.prototype.graph=null,mxSwimlaneManager.prototype.enabled=!0,mxSwimlaneManager.prototype.horizontal=!0,mxSwimlaneManager.prototype.addEnabled=!0,mxSwimlaneManager.prototype.resizeEnabled=!0,mxSwimlaneManager.prototype.addHandler=null,mxSwimlaneManager.prototype.resizeHandler=null,mxSwimlaneManager.prototype.isEnabled=function(){return this.enabled},mxSwimlaneManager.prototype.setEnabled=function(e){this.enabled=e},mxSwimlaneManager.prototype.isHorizontal=function(){return this.horizontal},mxSwimlaneManager.prototype.setHorizontal=function(e){this.horizontal=e},mxSwimlaneManager.prototype.isAddEnabled=function(){return this.addEnabled},mxSwimlaneManager.prototype.setAddEnabled=function(e){this.addEnabled=e},mxSwimlaneManager.prototype.isResizeEnabled=function(){return this.resizeEnabled},mxSwimlaneManager.prototype.setResizeEnabled=function(e){this.resizeEnabled=e},mxSwimlaneManager.prototype.getGraph=function(){return this.graph},mxSwimlaneManager.prototype.setGraph=function(e){null!=this.graph&&(this.graph.removeListener(this.addHandler),this.graph.removeListener(this.resizeHandler)),this.graph=e,null!=this.graph&&(this.graph.addListener(mxEvent.ADD_CELLS,this.addHandler),this.graph.addListener(mxEvent.CELLS_RESIZED,this.resizeHandler))},mxSwimlaneManager.prototype.isSwimlaneIgnored=function(e){return!this.getGraph().isSwimlane(e)},mxSwimlaneManager.prototype.isCellHorizontal=function(e){if(this.graph.isSwimlane(e)){var t=this.graph.view.getState(e);return e=null!=t?t.style:this.graph.getCellStyle(e),1==mxUtils.getValue(e,mxConstants.STYLE_HORIZONTAL,1)}return!this.isHorizontal()},mxSwimlaneManager.prototype.cellsAdded=function(e){if(null!=e){var t=this.getGraph().getModel();t.beginUpdate();try{for(var n=0;n<e.length;n++)this.isSwimlaneIgnored(e[n])||this.swimlaneAdded(e[n])}finally{t.endUpdate()}}},mxSwimlaneManager.prototype.swimlaneAdded=function(e){for(var t=this.getGraph().getModel(),n=t.getParent(e),a=t.getChildCount(n),i=null,o=0;o<a;o++){var s=t.getChildAt(n,o);if(s!=e&&!this.isSwimlaneIgnored(s)&&null!=(i=t.getGeometry(s)))break}null!=i&&this.resizeSwimlane(e,i.width,i.height)},mxSwimlaneManager.prototype.cellsResized=function(e){if(null!=e){var t=this.getGraph().getModel();t.beginUpdate();try{for(var n=0;n<e.length;n++)if(!this.isSwimlaneIgnored(e[n])){var a=t.getGeometry(e[n]);if(null!=a){for(var i=new mxRectangle(0,0,a.width,a.height),o=s=e[n];null!=o;){var s=o,r=(o=t.getParent(o),this.graph.isSwimlane(o)?this.graph.getStartSize(o):new mxRectangle);i.width+=r.width,i.height+=r.height}this.resizeSwimlane(s,i.width,i.height)}}}finally{t.endUpdate()}}},mxSwimlaneManager.prototype.resizeSwimlane=function(e,t,n){var a=this.getGraph().getModel();a.beginUpdate();try{if(!this.isSwimlaneIgnored(e))if(null!=(r=a.getGeometry(e))){var i=this.isCellHorizontal(e);(i&&r.height!=n||!i&&r.width!=t)&&(r=r.clone(),i?r.height=n:r.width=t,a.setGeometry(e,r))}var o=this.graph.isSwimlane(e)?this.graph.getStartSize(e):new mxRectangle;t-=o.width,n-=o.height;for(var s=a.getChildCount(e),r=0;r<s;r++){var l=a.getChildAt(e,r);this.resizeSwimlane(l,t,n)}}finally{a.endUpdate()}},mxSwimlaneManager.prototype.destroy=function(){this.setGraph(null)},mxTemporaryCellStates.prototype.view=null,mxTemporaryCellStates.prototype.oldStates=null,mxTemporaryCellStates.prototype.oldBounds=null,mxTemporaryCellStates.prototype.oldScale=null,mxTemporaryCellStates.prototype.destroy=function(){this.view.setScale(this.oldScale),this.view.setStates(this.oldStates),this.view.setGraphBounds(this.oldBounds)},mxCellStatePreview.prototype.graph=null,mxCellStatePreview.prototype.deltas=null,mxCellStatePreview.prototype.count=0,mxCellStatePreview.prototype.isEmpty=function(){return 0==this.count},mxCellStatePreview.prototype.moveState=function(e,t,n,a,i){a=null==a||a,i=null==i||i;var o=mxCellPath.create(e.cell),s=this.deltas[o];return null==s?(s=new mxPoint(t,n),this.deltas[o]=s,this.count++):a?(s.X+=t,s.Y+=n):(s.X=t,s.Y=n),i&&this.addEdges(e),s},mxCellStatePreview.prototype.show=function(e){var t,n=this.graph.getModel(),a=n.getRoot();for(t in this.deltas){var i=mxCellPath.resolve(a,t),o=this.graph.view.getState(i),s=this.deltas[t];i=this.graph.view.getState(n.getParent(i));this.translateState(i,o,s.x,s.y)}for(t in this.deltas)i=mxCellPath.resolve(a,t),o=this.graph.view.getState(i),s=this.deltas[t],i=this.graph.view.getState(n.getParent(i)),this.revalidateState(i,o,s.x,s.y,e)},mxCellStatePreview.prototype.translateState=function(e,t,n,a){if(null!=t){var i=this.graph.getModel();if(i.isVertex(t.cell)){t.invalid=!0,this.graph.view.validateBounds(e,t.cell),e=i.getGeometry(t.cell);var o=mxCellPath.create(t.cell);0==n&&0==a||null==e||e.relative&&null==this.deltas[o]||(t.x+=n,t.y+=a)}for(e=i.getChildCount(t.cell),o=0;o<e;o++)this.translateState(t,this.graph.view.getState(i.getChildAt(t.cell,o)),n,a)}},mxCellStatePreview.prototype.revalidateState=function(e,t,n,a,i){if(null!=t){t.invalid=!0,this.graph.view.validatePoints(e,t.cell);var o=mxCellPath.create(t.cell),s=this.graph.getModel(),r=this.graph.getCellGeometry(t.cell);for(0==n&&0==a||null==r||!r.relative||!s.isVertex(t.cell)||null!=e&&!s.isVertex(e.cell)&&null==this.deltas[o]||(t.x+=n,t.y+=a,this.graph.cellRenderer.redraw(t)),null!=i&&i(t),e=s.getChildCount(t.cell),o=0;o<e;o++)this.revalidateState(t,this.graph.view.getState(s.getChildAt(t.cell,o)),n,a,i)}},mxCellStatePreview.prototype.addEdges=function(e){for(var t=this.graph.getModel(),n=t.getEdgeCount(e.cell),a=0;a<n;a++){var i=this.graph.view.getState(t.getEdgeAt(e.cell,a));null!=i&&this.moveState(i,0,0)}},mxConnectionConstraint.prototype.point=null,mxConnectionConstraint.prototype.perimeter=null,mxGraphHandler.prototype.graph=null,mxGraphHandler.prototype.maxCells=mxClient.IS_IE?20:50,mxGraphHandler.prototype.enabled=!0,mxGraphHandler.prototype.highlightEnabled=!0,mxGraphHandler.prototype.cloneEnabled=!0,mxGraphHandler.prototype.moveEnabled=!0,mxGraphHandler.prototype.guidesEnabled=!1,mxGraphHandler.prototype.guide=null,mxGraphHandler.prototype.currentDx=null,mxGraphHandler.prototype.currentDy=null,mxGraphHandler.prototype.updateCursor=!0,mxGraphHandler.prototype.selectEnabled=!0,mxGraphHandler.prototype.removeCellsFromParent=!0,mxGraphHandler.prototype.connectOnDrop=!1,mxGraphHandler.prototype.scrollOnMove=!0,mxGraphHandler.prototype.minimumSize=6,mxGraphHandler.prototype.previewColor="black",mxGraphHandler.prototype.htmlPreview=!1,mxGraphHandler.prototype.shape=null,mxGraphHandler.prototype.scaleGrid=!1,mxGraphHandler.prototype.rotationEnabled=!0,mxGraphHandler.prototype.isEnabled=function(){return this.enabled},mxGraphHandler.prototype.setEnabled=function(e){this.enabled=e},mxGraphHandler.prototype.isCloneEnabled=function(){return this.cloneEnabled},mxGraphHandler.prototype.setCloneEnabled=function(e){this.cloneEnabled=e},mxGraphHandler.prototype.isMoveEnabled=function(){return this.moveEnabled},mxGraphHandler.prototype.setMoveEnabled=function(e){this.moveEnabled=e},mxGraphHandler.prototype.isSelectEnabled=function(){return this.selectEnabled},mxGraphHandler.prototype.setSelectEnabled=function(e){this.selectEnabled=e},mxGraphHandler.prototype.isRemoveCellsFromParent=function(){return this.removeCellsFromParent},mxGraphHandler.prototype.setRemoveCellsFromParent=function(e){this.removeCellsFromParent=e},mxGraphHandler.prototype.getInitialCellForEvent=function(e){return e.getCell()},mxGraphHandler.prototype.isDelayedSelection=function(e){return this.graph.isCellSelected(e)},mxGraphHandler.prototype.mouseDown=function(e,t){if(!t.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&!this.graph.isForceMarqueeEvent(t.getEvent())&&null!=t.getState()){var n=this.getInitialCellForEvent(t);if(this.cell=null,this.delayedSelection=this.isDelayedSelection(n),this.isSelectEnabled()&&!this.delayedSelection&&this.graph.selectCellForEvent(n,t.getEvent()),this.isMoveEnabled()){var a=this.graph.model,i=a.getGeometry(n);this.graph.isCellMovable(n)&&(!a.isEdge(n)||1<this.graph.getSelectionCount()||null!=i.points&&0<i.points.length||null==a.getTerminal(n,!0)||null==a.getTerminal(n,!1)||this.graph.allowDanglingEdges||this.graph.isCloneEvent(t.getEvent())&&this.graph.isCellsCloneable())&&this.start(n,t.getX(),t.getY()),this.cellWasClicked=!0,!mxClient.IS_SF&&!mxClient.IS_GC||"SELECT"!=t.getSource().nodeName?t.consume():mxClient.IS_SF&&"SELECT"==t.getSource().nodeName&&(this.cellWasClicked=!1,this.first=null)}}},mxGraphHandler.prototype.getGuideStates=function(){var e=this.graph.getDefaultParent(),t=this.graph.getModel(),n=mxUtils.bind(this,function(e){return null!=this.graph.view.getState(e)&&t.isVertex(e)&&null!=t.getGeometry(e)&&!t.getGeometry(e).relative});return this.graph.view.getCellStates(t.filterDescendants(n,e))},mxGraphHandler.prototype.getCells=function(e){return!this.delayedSelection&&this.graph.isCellMovable(e)?[e]:this.graph.getMovableCells(this.graph.getSelectionCells())},mxGraphHandler.prototype.getPreviewBounds=function(e){return null!=(e=this.getBoundingBox(e))&&(e.grow(-1,-1),e.width<this.minimumSize&&(e.x-=(this.minimumSize-e.width)/2,e.width=this.minimumSize),e.height<this.minimumSize&&(e.y-=(this.minimumSize-e.height)/2,e.height=this.minimumSize)),e},mxGraphHandler.prototype.getBoundingBox=function(e){var t=null;if(null!=e&&0<e.length)for(var n=this.graph.getModel(),a=0;a<e.length;a++)if(n.isVertex(e[a])||n.isEdge(e[a])){var i=this.graph.view.getState(e[a]);if(null!=i){var o=i;n.isVertex(e[a])&&null!=i.shape&&null!=i.shape.boundingBox&&(o=i.shape.boundingBox),null==t?t=new mxRectangle(o.x,o.y,o.width,o.height):t.add(o)}}return t},mxGraphHandler.prototype.createPreviewShape=function(e){return(e=new mxRectangleShape(e,null,this.previewColor)).isDashed=!0,this.htmlPreview?(e.dialect=mxConstants.DIALECT_STRICTHTML,e.init(this.graph.container)):(e.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,e.init(this.graph.getView().getOverlayPane()),e.pointerEvents=!1),e},mxGraphHandler.prototype.start=function(e,t,n){this.cell=e,this.first=mxUtils.convertPoint(this.graph.container,t,n),this.cells=this.getCells(this.cell),this.bounds=this.graph.getView().getBounds(this.cells),this.pBounds=this.getPreviewBounds(this.cells),this.guidesEnabled&&(this.guide=new mxGuide(this.graph,this.getGuideStates()))},mxGraphHandler.prototype.useGuidesForEvent=function(e){return null==this.guide||this.guide.isEnabledForEvent(e.getEvent())},mxGraphHandler.prototype.snap=function(e){var t=this.scaleGrid?this.graph.view.scale:1;return e.x=this.graph.snap(e.x/t)*t,e.y=this.graph.snap(e.y/t)*t,e},mxGraphHandler.prototype.mouseMove=function(e,t){var n=this.graph;if(!t.isConsumed()&&n.isMouseDown&&null!=this.cell&&null!=this.first&&null!=this.bounds){var a=(o=mxUtils.convertPoint(n.container,t.getX(),t.getY())).x-this.first.x,i=o.y-this.first.y,o=n.tolerance;if(null!=this.shape||Math.abs(a)>o||Math.abs(i)>o){null==this.highlight&&(this.highlight=new mxCellHighlight(this.graph,mxConstants.DROP_TARGET_COLOR,3)),null==this.shape&&(this.shape=this.createPreviewShape(this.bounds));var s=n.isGridEnabledEvent(t.getEvent());o=!0;if(null!=this.guide&&this.useGuidesForEvent(t))o=!1,a=(i=this.guide.move(this.bounds,new mxPoint(a,i),s)).x,i=i.y;else if(s){var r=n.getView().translate,l=n.getView().scale;s=this.bounds.x-(n.snap(this.bounds.x/l-r.x)+r.x)*l,r=this.bounds.y-(n.snap(this.bounds.y/l-r.y)+r.y)*l,a=(i=this.snap(new mxPoint(a,i))).x-s,i=i.y-r}for(null!=this.guide&&o&&this.guide.hide(),n.isConstrainedEvent(t.getEvent())&&(Math.abs(a)>Math.abs(i)?i=0:a=0),this.currentDx=a,this.currentDy=i,this.updatePreviewShape(),o=null,i=t.getCell(),n.isDropEnabled()&&this.highlightEnabled&&(o=n.getDropTarget(this.cells,t.getEvent(),i)),s=o,r=n.getModel();null!=s&&s!=this.cells[0];)s=r.getParent(s);l=n.isCloneEvent(t.getEvent())&&n.isCellsCloneable()&&this.isCloneEnabled();var d=!1;null==(a=n.getView().getState(o))||null!=s||r.getParent(this.cell)==o&&!l?(this.target=null,this.connectOnDrop&&null!=i&&1==this.cells.length&&n.getModel().isVertex(i)&&n.isCellConnectable(i)&&(null!=(a=n.getView().getState(i))&&(n=null==n.getEdgeValidationError(null,this.cell,i)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR,this.setHighlightColor(n),d=!0))):(this.target!=o&&(this.target=o,this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)),d=!0),null!=a&&d?this.highlight.highlight(a):this.highlight.hide()}t.consume(),mxEvent.consume(t.getEvent())}else!this.isMoveEnabled()&&!this.isCloneEnabled()||!this.updateCursor||t.isConsumed()||null==t.getState()||n.isMouseDown||(null==(a=n.getCursorForCell(t.getCell()))&&n.isEnabled()&&n.isCellMovable(t.getCell())&&(a=n.getModel().isEdge(t.getCell())?mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),t.getState().setCursor(a),t.consume())},mxGraphHandler.prototype.updatePreviewShape=function(){null!=this.shape&&(this.shape.bounds=new mxRectangle(Math.round(this.pBounds.x+this.currentDx-this.graph.panDx),Math.round(this.pBounds.y+this.currentDy-this.graph.panDy),this.pBounds.width,this.pBounds.height),this.shape.redraw())},mxGraphHandler.prototype.setHighlightColor=function(e){null!=this.highlight&&this.highlight.setHighlightColor(e)},mxGraphHandler.prototype.mouseUp=function(e,t){if(!t.isConsumed()){var n=this.graph;if(null!=this.cell&&null!=this.first&&null!=this.shape&&null!=this.currentDx&&null!=this.currentDy){var a=n.getView().scale,i=n.isCloneEvent(t.getEvent())&&n.isCellsCloneable()&&this.isCloneEnabled(),o=this.currentDx/a,s=(a=this.currentDy/a,t.getCell());this.connectOnDrop&&null==this.target&&null!=s&&n.getModel().isVertex(s)&&n.isCellConnectable(s)&&n.isEdgeValid(null,this.cell,s)?n.connectionHandler.connect(this.cell,s,t.getEvent()):(s=this.target,n.isSplitEnabled()&&n.isSplitTarget(s,this.cells,t.getEvent())?n.splitEdge(s,this.cells,null,o,a):this.moveCells(this.cells,o,a,i,this.target,t.getEvent()))}else this.isSelectEnabled()&&this.delayedSelection&&null!=this.cell&&this.selectDelayed(t)}this.cellWasClicked&&t.consume(),this.reset()},mxGraphHandler.prototype.selectDelayed=function(e){this.graph.selectCellForEvent(this.cell,e.getEvent())},mxGraphHandler.prototype.reset=function(){this.destroyShapes(),this.delayedSelection=this.cellWasClicked=!1,this.target=this.cell=this.first=this.guides=this.currentDy=this.currentDx=null},mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(e,t,n){if(this.graph.getModel().isVertex(e)){if(e=this.graph.getView().getState(e),n=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(n),mxEvent.getClientY(n)),0!=(a=mxUtils.toRadians(mxUtils.getValue(e.style,mxConstants.STYLE_ROTATION)||0))){t=Math.cos(-a);var a=Math.sin(-a),i=new mxPoint(e.getCenterX(),e.getCenterY());n=mxUtils.getRotatedPoint(n,t,a,i)}return null!=e&&!mxUtils.contains(e,n.x,n.y)}return!1},mxGraphHandler.prototype.moveCells=function(e,t,n,a,i,o){a&&(e=this.graph.getCloneableCells(e)),null==i&&this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(this.graph.getModel().getParent(this.cell),e,o)&&(i=this.graph.getDefaultParent()),e=this.graph.moveCells(e,t-this.graph.panDx/this.graph.view.scale,n-this.graph.panDy/this.graph.view.scale,a,i,o),this.isSelectEnabled()&&this.scrollOnMove&&this.graph.scrollCellToVisible(e[0]),a&&this.graph.setSelectionCells(e)},mxGraphHandler.prototype.destroyShapes=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null),null!=this.guide&&(this.guide.destroy(),this.guide=null),null!=this.highlight&&(this.highlight.destroy(),this.highlight=null)},mxGraphHandler.prototype.destroy=function(){this.graph.removeMouseListener(this),this.graph.removeListener(this.panHandler),this.destroyShapes()},mxPanningHandler.prototype=new mxPopupMenu,mxPanningHandler.prototype.constructor=mxPanningHandler,mxPanningHandler.prototype.graph=null,mxPanningHandler.prototype.triggerX=null,mxPanningHandler.prototype.triggerY=null,mxPanningHandler.prototype.usePopupTrigger=!0,mxPanningHandler.prototype.useLeftButtonForPanning=!1,mxPanningHandler.prototype.selectOnPopup=!0,mxPanningHandler.prototype.clearSelectionOnBackground=!0,mxPanningHandler.prototype.ignoreCell=!1,mxPanningHandler.prototype.previewEnabled=!0,mxPanningHandler.prototype.useGrid=!1,mxPanningHandler.prototype.panningEnabled=!0,mxPanningHandler.prototype.isPanningEnabled=function(){return this.panningEnabled},mxPanningHandler.prototype.setPanningEnabled=function(e){this.panningEnabled=e},mxPanningHandler.prototype.init=function(){mxPopupMenu.prototype.init.apply(this),mxEvent.addListener(this.div,mxClient.IS_TOUCH?"touchmove":"mousemove",mxUtils.bind(this,function(e){this.graph.tooltipHandler.hide()}))},mxPanningHandler.prototype.isPanningTrigger=function(e){var t=e.getEvent();return this.useLeftButtonForPanning&&(this.ignoreCell||null==e.getState())&&mxEvent.isLeftMouseButton(t)||mxEvent.isControlDown(t)&&mxEvent.isShiftDown(t)||this.usePopupTrigger&&mxEvent.isPopupTrigger(t)},mxPanningHandler.prototype.mouseDown=function(e,t){if(!t.isConsumed()&&this.isEnabled()){this.hideMenu(),this.dx0=-this.graph.container.scrollLeft,this.dy0=-this.graph.container.scrollTop;var n=mxUtils.convertPoint(this.graph.container,t.getX(),t.getY());this.triggerX=n.x,this.triggerY=n.y,this.popupTrigger=this.isPopupTrigger(t),this.panningTrigger=this.isPanningEnabled()&&this.isPanningTrigger(t),this.startX=t.getX(),this.startY=t.getY(),this.panningTrigger&&this.consumePanningTrigger(t)}},mxPanningHandler.prototype.consumePanningTrigger=function(e){e.consume()},mxPanningHandler.prototype.mouseMove=function(e,t){var n=t.getX()-this.startX,a=t.getY()-this.startY;if(this.active)this.previewEnabled&&(this.useGrid&&(n=this.graph.snap(n),a=this.graph.snap(a)),this.graph.panGraph(n+this.dx0,a+this.dy0)),this.fireEvent(new mxEventObject(mxEvent.PAN,"event",t)),t.consume();else if(this.panningTrigger){var i=this.active;this.active=Math.abs(n)>this.graph.tolerance||Math.abs(a)>this.graph.tolerance,!i&&this.active&&this.fireEvent(new mxEventObject(mxEvent.PAN_START,"event",t))}},mxPanningHandler.prototype.mouseUp=function(e,t){var n=Math.abs(t.getX()-this.startX),a=Math.abs(t.getY()-this.startY);if(this.active){if(!this.graph.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.graph.container)){n=t.getX()-this.startX,a=t.getY()-this.startY,this.useGrid&&(n=this.graph.snap(n),a=this.graph.snap(a));var i=this.graph.getView().scale,o=this.graph.getView().translate;this.graph.panGraph(0,0),this.panGraph(o.x+n/i,o.y+a/i)}this.active=!1,this.fireEvent(new mxEventObject(mxEvent.PAN_END,"event",t)),t.consume()}else this.popupTrigger&&n<this.graph.tolerance&&a<this.graph.tolerance&&(n=this.getCellForPopupEvent(t),this.graph.isEnabled()&&this.selectOnPopup&&null!=n&&!this.graph.isCellSelected(n)?this.graph.setSelectionCell(n):this.clearSelectionOnBackground&&null==n&&this.graph.clearSelection(),this.graph.tooltipHandler.hide(),a=mxUtils.getScrollOrigin(),a=new mxPoint(t.getX()+a.x,t.getY()+a.y),this.popup(a.x+1,a.y+1,n,t.getEvent()),t.consume());this.popupTrigger=this.panningTrigger=!1},mxPanningHandler.prototype.getCellForPopupEvent=function(e){return e.getCell()},mxPanningHandler.prototype.panGraph=function(e,t){this.graph.getView().setTranslate(e,t)},mxPanningHandler.prototype.destroy=function(){this.graph.removeMouseListener(this),mxPopupMenu.prototype.destroy.apply(this)},mxUtils.extend(mxCellMarker,mxEventSource),mxCellMarker.prototype.graph=null,mxCellMarker.prototype.enabled=!0,mxCellMarker.prototype.hotspot=mxConstants.DEFAULT_HOTSPOT,mxCellMarker.prototype.hotspotEnabled=!1,mxCellMarker.prototype.validColor=null,mxCellMarker.prototype.invalidColor=null,mxCellMarker.prototype.currentColor=null,mxCellMarker.prototype.validState=null,mxCellMarker.prototype.markedState=null,mxCellMarker.prototype.setEnabled=function(e){this.enabled=e},mxCellMarker.prototype.isEnabled=function(){return this.enabled},mxCellMarker.prototype.setHotspot=function(e){this.hotspot=e},mxCellMarker.prototype.getHotspot=function(){return this.hotspot},mxCellMarker.prototype.setHotspotEnabled=function(e){this.hotspotEnabled=e},mxCellMarker.prototype.isHotspotEnabled=function(){return this.hotspotEnabled},mxCellMarker.prototype.hasValidState=function(){return null!=this.validState},mxCellMarker.prototype.getValidState=function(){return this.validState},mxCellMarker.prototype.getMarkedState=function(){return this.markedState},mxCellMarker.prototype.reset=function(){(this.validState=null)!=this.markedState&&(this.markedState=null,this.unmark())},mxCellMarker.prototype.process=function(e){var t=null;if(this.isEnabled()){var n=null!=(t=this.getState(e))&&this.isValidState(t);e=this.getMarkerColor(e.getEvent(),t,n),this.validState=n?t:null,t==this.markedState&&e==this.currentColor||(this.currentColor=e,null!=t&&null!=this.currentColor?(this.markedState=t,this.mark()):null!=this.markedState&&(this.markedState=null,this.unmark()))}return t},mxCellMarker.prototype.markCell=function(e,t){var n=this.graph.getView().getState(e);null!=n&&(this.currentColor=null!=t?t:this.validColor,this.markedState=n,this.mark())},mxCellMarker.prototype.mark=function(){this.highlight.setHighlightColor(this.currentColor),this.highlight.highlight(this.markedState),this.fireEvent(new mxEventObject(mxEvent.MARK,"state",this.markedState))},mxCellMarker.prototype.unmark=function(){this.mark()},mxCellMarker.prototype.isValidState=function(e){return!0},mxCellMarker.prototype.getMarkerColor=function(e,t,n){return n?this.validColor:this.invalidColor},mxCellMarker.prototype.getState=function(e){var t=this.graph.getView();return cell=this.getCell(e),null!=(t=this.getStateToMark(t.getState(cell)))&&this.intersects(t,e)?t:null},mxCellMarker.prototype.getCell=function(e){return e.getCell()},mxCellMarker.prototype.getStateToMark=function(e){return e},mxCellMarker.prototype.intersects=function(e,t){return!this.hotspotEnabled||mxUtils.intersectsHotspot(e,t.getGraphX(),t.getGraphY(),this.hotspot,mxConstants.MIN_HOTSPOT_SIZE,mxConstants.MAX_HOTSPOT_SIZE)},mxCellMarker.prototype.destroy=function(){this.graph.getView().removeListener(this.resetHandler),this.graph.getModel().removeListener(this.resetHandler),this.highlight.destroy()},mxUtils.extend(mxSelectionCellsHandler,mxEventSource),mxSelectionCellsHandler.prototype.graph=null,mxSelectionCellsHandler.prototype.enabled=!0,mxSelectionCellsHandler.prototype.refreshHandler=null,mxSelectionCellsHandler.prototype.maxHandlers=100,mxSelectionCellsHandler.prototype.handlers=null,mxSelectionCellsHandler.prototype.isEnabled=function(){return this.enabled},mxSelectionCellsHandler.prototype.setEnabled=function(e){this.enabled=e},mxSelectionCellsHandler.prototype.getHandler=function(e){return this.handlers.get(e)},mxSelectionCellsHandler.prototype.reset=function(){this.handlers.visit(function(e,t){t.reset.apply(t)})},mxSelectionCellsHandler.prototype.refresh=function(){var e=this.handlers;this.handlers=new mxDictionary;for(var t=this.graph.getSelectionCells(),n=0;n<t.length;n++){var a=this.graph.view.getState(t[n]);if(null!=a){var i=e.remove(t[n]);null!=i&&(i.state!=a?(i.destroy(),i=null):i.redraw()),null==i&&(i=this.graph.createHandler(a),this.fireEvent(new mxEventObject(mxEvent.ADD,"state",a))),null!=i&&this.handlers.put(t[n],i)}}e.visit(mxUtils.bind(this,function(e,t){this.fireEvent(new mxEventObject(mxEvent.REMOVE,"state",t.state)),t.destroy()}))},mxSelectionCellsHandler.prototype.mouseDown=function(e,t){if(this.graph.isEnabled()&&this.isEnabled()){var n=[e,t];this.handlers.visit(function(e,t){t.mouseDown.apply(t,n)})}},mxSelectionCellsHandler.prototype.mouseMove=function(e,t){if(this.graph.isEnabled()&&this.isEnabled()){var n=[e,t];this.handlers.visit(function(e,t){t.mouseMove.apply(t,n)})}},mxSelectionCellsHandler.prototype.mouseUp=function(e,t){if(this.graph.isEnabled()&&this.isEnabled()){var n=[e,t];this.handlers.visit(function(e,t){t.mouseUp.apply(t,n)})}},mxSelectionCellsHandler.prototype.destroy=function(){this.graph.removeMouseListener(this),null!=this.refreshHandler&&(this.graph.getSelectionModel().removeListener(this.refreshHandler),this.graph.getModel().removeListener(this.refreshHandler),this.graph.getView().removeListener(this.refreshHandler),this.refreshHandler=null)},mxUtils.extend(mxConnectionHandler,mxEventSource),mxConnectionHandler.prototype.graph=null,mxConnectionHandler.prototype.factoryMethod=!0,mxConnectionHandler.prototype.moveIconFront=!1,mxConnectionHandler.prototype.moveIconBack=!1,mxConnectionHandler.prototype.connectImage=null,mxConnectionHandler.prototype.targetConnectImage=!1,mxConnectionHandler.prototype.enabled=!0,mxConnectionHandler.prototype.select=!0,mxConnectionHandler.prototype.createTarget=!1;mxConnectionHandler.prototype.marker=null,mxConnectionHandler.prototype.constraintHandler=null,mxConnectionHandler.prototype.error=null,mxConnectionHandler.prototype.waypointsEnabled=!1,mxConnectionHandler.prototype.tapAndHoldEnabled=!0,mxConnectionHandler.prototype.tapAndHoldDelay=500,mxConnectionHandler.prototype.tapAndHoldInProgress=!1,mxConnectionHandler.prototype.tapAndHoldValid=!1,mxConnectionHandler.prototype.tapAndHoldTolerance=4,mxConnectionHandler.prototype.initialTouchX=0,mxConnectionHandler.prototype.initialTouchY=0,mxConnectionHandler.prototype.ignoreMouseDown=!1,mxConnectionHandler.prototype.first=null,mxConnectionHandler.prototype.connectIconOffset=new mxPoint(0,mxConstants.TOOLTIP_VERTICAL_OFFSET),mxConnectionHandler.prototype.edgeState=null,mxConnectionHandler.prototype.changeHandler=null,mxConnectionHandler.prototype.drillHandler=null,mxConnectionHandler.prototype.mouseDownCounter=0,mxConnectionHandler.prototype.movePreviewAway=mxClient.IS_VML,mxConnectionHandler.prototype.isEnabled=function(){return this.enabled},mxConnectionHandler.prototype.setEnabled=function(e){this.enabled=e},mxConnectionHandler.prototype.isCreateTarget=function(){return this.createTarget},mxConnectionHandler.prototype.setCreateTarget=function(e){this.createTarget=e},mxConnectionHandler.prototype.createShape=function(){var e=new mxPolyline([],mxConstants.INVALID_COLOR);if(e.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,e.init(this.graph.getView().getOverlayPane()),e.svgStrokeTolerance=0,e.pointerEvents=!1,e.isDashed=!0,this.graph.dialect==mxConstants.DIALECT_SVG)e.node.setAttribute("pointer-events","none");else{var t=mxUtils.bind(this,function(e){return e=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e)),this.graph.view.getState(this.graph.getCellAt(e.x,e.y))});mxEvent.redirectMouseEvents(e.node,this.graph,t)}return e},mxConnectionHandler.prototype.init=function(){this.graph.addMouseListener(this),this.marker=this.createMarker(),this.constraintHandler=new mxConstraintHandler(this.graph),this.changeHandler=mxUtils.bind(this,function(e){null!=this.iconState&&(this.iconState=this.graph.getView().getState(this.iconState.cell)),null!=this.iconState?this.redrawIcons(this.icons,this.iconState):(this.destroyIcons(this.icons),this.previous=null),this.constraintHandler.reset()}),this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler),this.graph.getView().addListener(mxEvent.SCALE,this.changeHandler),this.graph.getView().addListener(mxEvent.TRANSLATE,this.changeHandler),this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.changeHandler),this.drillHandler=mxUtils.bind(this,function(e){this.destroyIcons(this.icons)}),this.graph.addListener(mxEvent.START_EDITING,this.drillHandler),this.graph.getView().addListener(mxEvent.DOWN,this.drillHandler),this.graph.getView().addListener(mxEvent.UP,this.drillHandler)},mxConnectionHandler.prototype.isConnectableCell=function(e){return!0},mxConnectionHandler.prototype.createMarker=function(){var a=new mxCellMarker(this.graph);return a.hotspotEnabled=!0,a.getCell=mxUtils.bind(this,function(e,t){return t=mxCellMarker.prototype.getCell.apply(a,arguments),this.error=null,this.isConnectableCell(t)?(null!=t?this.isConnecting()?null!=this.previous&&(this.error=this.validateConnection(this.previous.cell,t),null!=this.error&&0==this.error.length&&(t=null,this.isCreateTarget()&&(this.error=null))):this.isValidSource(t)||(t=null):this.isConnecting()&&!this.isCreateTarget()&&!this.graph.allowDanglingEdges&&(this.error=""),t):null}),a.isValidState=mxUtils.bind(this,function(e){return this.isConnecting()?null==this.error:mxCellMarker.prototype.isValidState.apply(a,arguments)}),a.getMarkerColor=mxUtils.bind(this,function(e,t,n){return null==this.connectImage||this.isConnecting()?mxCellMarker.prototype.getMarkerColor.apply(a,arguments):null}),a.intersects=mxUtils.bind(this,function(e,t){return!(null==this.connectImage&&!this.isConnecting())||mxCellMarker.prototype.intersects.apply(a,arguments)}),a},mxConnectionHandler.prototype.start=function(e,t,n,a){this.previous=e,this.first=new mxPoint(t,n),this.edgeState=null!=a?a:this.createEdgeState(null),this.marker.currentColor=this.marker.validColor,this.marker.markedState=e,this.marker.mark(),this.fireEvent(new mxEventObject(mxEvent.START,"state",this.previous))},mxConnectionHandler.prototype.isConnecting=function(){return null!=this.first&&null!=this.shape},mxConnectionHandler.prototype.isValidSource=function(e){return this.graph.isValidSource(e)},mxConnectionHandler.prototype.isValidTarget=function(e){return!0},mxConnectionHandler.prototype.validateConnection=function(e,t){return this.isValidTarget(t)?this.graph.getEdgeValidationError(null,e,t):""},mxConnectionHandler.prototype.getConnectImage=function(e){return this.connectImage},mxConnectionHandler.prototype.isMoveIconToFrontForState=function(e){return null!=e.text&&e.text.node.parentNode==this.graph.container||this.moveIconFront},mxConnectionHandler.prototype.createIcons=function(e){if(null!=(i=this.getConnectImage(e))&&null!=e){this.iconState=e;var t=[],n=new mxImageShape(new mxRectangle(0,0,i.width,i.height),i.src,null,null,0);n.preserveImageAspect=!1,this.isMoveIconToFrontForState(e)?(n.dialect=mxConstants.DIALECT_STRICTHTML,n.init(this.graph.container)):(n.dialect=this.graph.dialect==mxConstants.DIALECT_SVG?mxConstants.DIALECT_SVG:mxConstants.DIALECT_VML,n.init(this.graph.getView().getOverlayPane()),this.moveIconBack&&null!=n.node.previousSibling&&n.node.parentNode.insertBefore(n.node,n.node.parentNode.firstChild)),n.node.style.cursor=mxConstants.CURSOR_CONNECT;var a=mxUtils.bind(this,function(){return null!=this.currentState?this.currentState:e}),i=mxUtils.bind(this,function(e){mxEvent.isConsumed(e)||(this.icon=n,this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e,a())))});return mxEvent.redirectMouseEvents(n.node,this.graph,a,i),t.push(n),this.redrawIcons(t,this.iconState),t}return null},mxConnectionHandler.prototype.redrawIcons=function(e,t){if(null!=e&&null!=e[0]&&null!=t){var n=this.getIconPosition(e[0],t);e[0].bounds.x=n.x,e[0].bounds.y=n.y,e[0].redraw()}},mxConnectionHandler.prototype.getIconPosition=function(e,t){var n=this.graph.getView().scale,a=t.getCenterX(),i=t.getCenterY();if(this.graph.isSwimlane(t.cell)){a=0!=(o=this.graph.getStartSize(t.cell)).width?t.x+o.width*n/2:a,i=0!=o.height?t.y+o.height*n/2:i;if(0!=(o=mxUtils.toRadians(mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0))){n=Math.cos(o);var o=Math.sin(o),s=new mxPoint(t.getCenterX(),t.getCenterY());a=(i=mxUtils.getRotatedPoint(new mxPoint(a,i),n,o,s)).x,i=i.y}}return new mxPoint(a-e.bounds.width/2,i-e.bounds.height/2)},mxConnectionHandler.prototype.destroyIcons=function(e){if(null!=e){this.iconState=null;for(var t=0;t<e.length;t++)e[t].destroy()}},mxConnectionHandler.prototype.isStartEvent=function(e){return!this.graph.isForceMarqueeEvent(e.getEvent())&&(null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentConstraint||null!=this.previous&&null==this.error&&(null==this.icons||null!=this.icons&&null!=this.icon))},mxConnectionHandler.prototype.mouseDown=function(e,t){if(this.mouseDownCounter++,this.isEnabled()&&this.graph.isEnabled()&&!t.isConsumed()&&!this.isConnecting()&&this.isStartEvent(t)){if(null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint?(this.sourceConstraint=this.constraintHandler.currentConstraint,this.previous=this.constraintHandler.currentFocus,this.first=this.constraintHandler.currentPoint.clone()):this.first=new mxPoint(t.getGraphX(),t.getGraphY()),this.edgeState=this.createEdgeState(t),this.mouseDownCounter=1,this.waypointsEnabled&&null==this.shape&&(this.waypoints=null,this.shape=this.createShape()),null==this.previous&&null!=this.edgeState){var n=this.graph.getPointForEvent(t.getEvent());this.edgeState.cell.geometry.setTerminalPoint(n,!0)}this.fireEvent(new mxEventObject(mxEvent.START,"state",this.previous)),t.consume()}else if(mxClient.IS_TOUCH&&this.tapAndHoldEnabled&&!this.tapAndHoldInProgress&&this.isEnabled()&&this.graph.isEnabled()&&!this.isConnecting()){this.tapAndHoldInProgress=!0,this.initialTouchX=t.getX(),this.initialTouchY=t.getY();var a=this.graph.view.getState(this.marker.getCell(t));this.tapAndHoldThread&&window.clearTimeout(this.tapAndHoldThread),this.tapAndHoldThread=window.setTimeout(mxUtils.bind(this,function(){this.tapAndHoldValid&&this.tapAndHold(t,a),this.tapAndHoldValid=this.tapAndHoldInProgress=!1}),this.tapAndHoldDelay),this.tapAndHoldValid=!0}this.selectedIcon=this.icon,this.icon=null},mxConnectionHandler.prototype.tapAndHold=function(e,t){null!=t&&(this.marker.currentColor=this.marker.validColor,this.marker.markedState=t,this.marker.mark(),this.first=new mxPoint(e.getGraphX(),e.getGraphY()),this.edgeState=this.createEdgeState(e),this.previous=t,this.fireEvent(new mxEventObject(mxEvent.START,"state",this.previous)))},mxConnectionHandler.prototype.isImmediateConnectSource=function(e){return!this.graph.isCellMovable(e.cell)},mxConnectionHandler.prototype.createEdgeState=function(e){return null},mxConnectionHandler.prototype.updateCurrentState=function(e){var t=this.marker.process(e);this.constraintHandler.update(e,null==this.first),this.currentState=t},mxConnectionHandler.prototype.convertWaypoint=function(e){var t=this.graph.getView().getScale(),n=this.graph.getView().getTranslate();e.x=e.x/t-n.x,e.y=e.y/t-n.y},mxConnectionHandler.prototype.mouseMove=function(e,t){if(this.tapAndHoldValid&&(this.tapAndHoldValid=Math.abs(this.initialTouchX-t.getX())<this.tapAndHoldTolerance&&Math.abs(this.initialTouchY-t.getY())<this.tapAndHoldTolerance),t.isConsumed()||!this.ignoreMouseDown&&null==this.first&&this.graph.isMouseDown)this.constraintHandler.reset();else{if(!this.isEnabled()&&null!=this.currentState&&(this.destroyIcons(this.icons),this.currentState=null),(null!=this.first||this.isEnabled()&&this.graph.isEnabled())&&this.updateCurrentState(t),null!=this.first){var n=this.graph.getView().scale,a=null,i=n=new mxPoint(this.graph.snap(t.getGraphX()/n)*n,this.graph.snap(t.getGraphY()/n)*n);null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint&&(a=this.constraintHandler.currentConstraint,i=this.constraintHandler.currentPoint.clone());var o=this.first;if(null!=this.selectedIcon){var s=this.selectedIcon.bounds.width,r=this.selectedIcon.bounds.height;null!=this.currentState&&this.targetConnectImage?(s=this.getIconPosition(this.selectedIcon,this.currentState),this.selectedIcon.bounds.x=s.x,this.selectedIcon.bounds.y=s.y):(s=new mxRectangle(t.getGraphX()+this.connectIconOffset.x,t.getGraphY()+this.connectIconOffset.y,s,r),this.selectedIcon.bounds=s),this.selectedIcon.redraw()}if(null!=this.edgeState){if(this.edgeState.absolutePoints=[null,null!=this.currentState?null:i],this.graph.view.updateFixedTerminalPoint(this.edgeState,this.previous,!0,this.sourceConstraint),null!=this.currentState&&(null==a&&(a=this.graph.getConnectionConstraint(this.edgeState,this.previous,!1)),this.edgeState.setAbsoluteTerminalPoint(null,!1),this.graph.view.updateFixedTerminalPoint(this.edgeState,this.currentState,!1,a)),(o=null)!=this.waypoints)for(o=[],i=0;i<this.waypoints.length;i++)a=this.waypoints[i].clone(),this.convertWaypoint(a),o[i]=a;this.graph.view.updatePoints(this.edgeState,o,this.previous,this.currentState),this.graph.view.updateFloatingTerminalPoints(this.edgeState,this.previous,this.currentState),i=this.edgeState.absolutePoints[this.edgeState.absolutePoints.length-1],o=this.edgeState.absolutePoints[0]}else null!=this.currentState&&null==this.constraintHandler.currentConstraint&&(null!=(s=this.getTargetPerimeterPoint(this.currentState,t))&&(i=s)),null==this.sourceConstraint&&null!=this.previous&&(null!=(s=this.getSourcePerimeterPoint(this.previous,null!=this.waypoints&&0<this.waypoints.length?this.waypoints[0]:i,t))&&(o=s));if(null==this.currentState&&this.movePreviewAway){if(s=o,null!=this.edgeState&&2<this.edgeState.absolutePoints.length&&(null!=(a=this.edgeState.absolutePoints[this.edgeState.absolutePoints.length-2])&&(s=a)),a=i.x-s.x,s=i.y-s.y,0==(r=Math.sqrt(a*a+s*s)))return;i.x-=4*a/r,i.y-=4*s/r}null==this.shape&&(a=Math.abs(n.x-this.first.x),s=Math.abs(n.y-this.first.y),a>this.graph.tolerance||s>this.graph.tolerance)&&(this.shape=this.createShape(),this.updateCurrentState(t)),null!=this.shape&&(null!=this.edgeState?this.shape.points=this.edgeState.absolutePoints:(n=[o],null!=this.waypoints&&(n=n.concat(this.waypoints)),n.push(i),this.shape.points=n),this.drawPreview()),mxEvent.consume(t.getEvent()),t.consume()}else this.isEnabled()&&this.graph.isEnabled()?this.previous!=this.currentState&&null==this.edgeState?(this.destroyIcons(this.icons),(this.icons=null)!=this.currentState&&null==this.error&&(this.icons=this.createIcons(this.currentState),null==this.icons&&(this.currentState.setCursor(mxConstants.CURSOR_CONNECT),t.consume())),this.previous=this.currentState):this.previous==this.currentState&&null!=this.currentState&&null==this.icons&&!this.graph.isMouseDown&&t.consume():this.constraintHandler.reset();if(null!=this.constraintHandler.currentConstraint&&this.marker.reset(),!this.graph.isMouseDown&&null!=this.currentState&&null!=this.icons){for(n=!1,o=t.getSource(),i=0;i<this.icons.length&&!n;i++)n=o==this.icons[i].node||o.parentNode==this.icons[i].node;n||this.updateIcons(this.currentState,this.icons,t)}}},mxConnectionHandler.prototype.getTargetPerimeterPoint=function(e,t){var n=null,a=(i=e.view).getPerimeterFunction(e);if(null!=a){var i,o=null!=this.waypoints&&0<this.waypoints.length?this.waypoints[this.waypoints.length-1]:new mxPoint(this.previous.getCenterX(),this.previous.getCenterY());null!=(i=a(i.getPerimeterBounds(e),this.edgeState,o,!1))&&(n=i)}else n=new mxPoint(e.getCenterX(),e.getCenterY());return n},mxConnectionHandler.prototype.getSourcePerimeterPoint=function(e,t,n){n=null;var a=e.view,i=a.getPerimeterFunction(e),o=new mxPoint(e.getCenterX(),e.getCenterY());if(null!=i){var s=mxUtils.getValue(e.style,mxConstants.STYLE_ROTATION,0),r=-s*(Math.PI/180);0!=s&&(t=mxUtils.getRotatedPoint(new mxPoint(t.x,t.y),Math.cos(r),Math.sin(r),o)),null!=(e=i(a.getPerimeterBounds(e),e,t,!1))&&(0!=s&&(e=mxUtils.getRotatedPoint(new mxPoint(e.x,e.y),Math.cos(-r),Math.sin(-r),o)),n=e)}else n=o;return n},mxConnectionHandler.prototype.updateIcons=function(e,t,n){},mxConnectionHandler.prototype.isStopEvent=function(e){return null!=e.getState()},mxConnectionHandler.prototype.addWaypointForEvent=function(e){var t=mxUtils.convertPoint(this.graph.container,e.getX(),e.getY()),n=Math.abs(t.x-this.first.x);t=Math.abs(t.y-this.first.y);(null!=this.waypoints||1<this.mouseDownCounter&&(n>this.graph.tolerance||t>this.graph.tolerance))&&(null==this.waypoints&&(this.waypoints=[]),n=this.graph.view.scale,t=new mxPoint(this.graph.snap(e.getGraphX()/n)*n,this.graph.snap(e.getGraphY()/n)*n),this.waypoints.push(t))},mxConnectionHandler.prototype.mouseUp=function(e,t){if(!t.isConsumed()&&this.isConnecting()){if(this.waypointsEnabled&&!this.isStopEvent(t))return this.addWaypointForEvent(t),void t.consume();if(null==this.error){var n=null!=this.previous?this.previous.cell:null,a=null;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(a=this.constraintHandler.currentFocus.cell),null==a&&this.marker.hasValidState()&&(a=this.marker.validState.cell),this.connect(n,a,t.getEvent(),t.getCell())}else null!=this.previous&&null!=this.marker.validState&&this.previous.cell==this.marker.validState.cell&&this.graph.selectCellForEvent(this.marker.source,evt),0<this.error.length&&this.graph.validationAlert(this.error);this.destroyIcons(this.icons),t.consume()}null!=this.first&&this.reset(),this.tapAndHoldValid=this.tapAndHoldInProgress=!1},mxConnectionHandler.prototype.reset=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null),this.destroyIcons(this.icons),this.icons=null,this.marker.reset(),this.constraintHandler.reset(),this.sourceConstraint=this.error=this.previous=this.edgeState=this.selectedIcon=null,this.mouseDownCounter=0,this.icon=this.first=null,this.fireEvent(new mxEventObject(mxEvent.RESET))},mxConnectionHandler.prototype.drawPreview=function(){var e=null==this.error;this.shape.strokewidth=this.getEdgeWidth(e),e=this.getEdgeColor(e),this.shape.stroke=e,this.shape.redraw()},mxConnectionHandler.prototype.getEdgeColor=function(e){return e?mxConstants.VALID_COLOR:mxConstants.INVALID_COLOR},mxConnectionHandler.prototype.getEdgeWidth=function(e){return e?3:1},mxConnectionHandler.prototype.connect=function(e,t,n,a){if(null!=t||this.isCreateTarget()||this.graph.allowDanglingEdges){var i=this.graph.getModel(),o=null;i.beginUpdate();try{if(null!=e&&null==t&&this.isCreateTarget()&&null!=(t=this.createTargetVertex(n,e))){if(null!=(a=this.graph.getDropTarget([t],n,a))&&this.graph.getModel().isEdge(a))a=this.graph.getDefaultParent();else{var s=this.graph.getView().getState(a);if(null!=s){var r=i.getGeometry(t);r.x-=s.origin.x,r.y-=s.origin.y}}this.graph.addCell(t,a)}var l=this.graph.getDefaultParent();if(null!=e&&null!=t&&i.getParent(e)==i.getParent(t)&&i.getParent(i.getParent(e))!=i.getRoot()&&(l=i.getParent(e),null!=e.geometry&&e.geometry.relative&&null!=t.geometry&&t.geometry.relative&&(l=i.getParent(l))),r=s=null,null!=this.edgeState&&(s=this.edgeState.cell.value,r=this.edgeState.cell.style),null!=(o=this.insertEdge(l,null,s,e,t,r))){this.graph.setConnectionConstraint(o,e,!0,this.sourceConstraint),this.graph.setConnectionConstraint(o,t,!1,this.constraintHandler.currentConstraint),null!=this.edgeState&&i.setGeometry(o,this.edgeState.cell.geometry);var d=i.getGeometry(o);if(null==d&&((d=new mxGeometry).relative=!0,i.setGeometry(o,d)),null!=this.waypoints&&0<this.waypoints.length){var c=this.graph.view.scale,m=this.graph.view.translate;for(d.points=[],e=0;e<this.waypoints.length;e++){var u=this.waypoints[e];d.points.push(new mxPoint(u.x/c-m.x,u.y/c-m.y))}}null==t&&((u=this.graph.getPointForEvent(n,!1)).x-=this.graph.panDx/this.graph.view.scale,u.y-=this.graph.panDy/this.graph.view.scale,d.setTerminalPoint(u,!1)),this.fireEvent(new mxEventObject(mxEvent.CONNECT,"cell",o,"event",n,"target",a))}}catch(e){mxLog.show(),mxLog.debug(e.message)}finally{i.endUpdate()}this.select&&this.selectCells(o,t)}},mxConnectionHandler.prototype.selectCells=function(e,t){this.graph.setSelectionCell(e)},mxConnectionHandler.prototype.insertEdge=function(e,t,n,a,i,o){return null==this.factoryMethod?this.graph.insertEdge(e,t,n,a,i,o):(t=this.createEdge(n,a,i,o),this.graph.addEdge(t,e,a,i))},mxConnectionHandler.prototype.createTargetVertex=function(e,t){for(var n=this.graph.getCellGeometry(t);null!=n&&n.relative;)t=this.graph.getModel().getParent(t),n=this.graph.getCellGeometry(t);var a=this.graph.cloneCells([t])[0];if(null!=(n=this.graph.getModel().getGeometry(a))){var i=this.graph.getPointForEvent(e);if(n.x=this.graph.snap(i.x-n.width/2)-this.graph.panDx/this.graph.view.scale,n.y=this.graph.snap(i.y-n.height/2)-this.graph.panDy/this.graph.view.scale,null!=this.first){var o=this.graph.view.getState(t);if(null!=o){var s=this.getAlignmentTolerance();Math.abs(this.graph.snap(this.first.x)-this.graph.snap(i.x))<=s?n.x=o.x:Math.abs(this.graph.snap(this.first.y)-this.graph.snap(i.y))<=s&&(n.y=o.y)}}}return a},mxConnectionHandler.prototype.getAlignmentTolerance=function(){return this.graph.isGridEnabled()?this.graph.gridSize:this.graph.tolerance},mxConnectionHandler.prototype.createEdge=function(e,t,n,a){var i=null;return null!=this.factoryMethod&&(i=this.factoryMethod(t,n,a)),null==i&&((i=new mxCell(e||"")).setEdge(!0),i.setStyle(a),(e=new mxGeometry).relative=!0,i.setGeometry(e)),i},mxConnectionHandler.prototype.destroy=function(){this.graph.removeMouseListener(this),null!=this.shape&&(this.shape.destroy(),this.shape=null),null!=this.marker&&(this.marker.destroy(),this.marker=null),null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null),null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getView().removeListener(this.changeHandler),this.changeHandler=null),null!=this.drillHandler&&(this.graph.removeListener(this.drillHandler),this.graph.getView().removeListener(this.drillHandler),this.drillHandler=null)},mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5),mxConstraintHandler.prototype.graph=null,mxConstraintHandler.prototype.enabled=!0,mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR,mxConstraintHandler.prototype.isEnabled=function(){return this.enabled},mxConstraintHandler.prototype.setEnabled=function(e){this.enabled=e},mxConstraintHandler.prototype.reset=function(){if(null!=this.focusIcons){for(var e=0;e<this.focusIcons.length;e++)this.focusIcons[e].destroy();this.focusIcons=null}null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null),this.focusPoints=this.currentFocus=this.currentPoint=this.currentFocusArea=this.currentConstraint=null},mxConstraintHandler.prototype.getTolerance=function(){return this.graph.getTolerance()},mxConstraintHandler.prototype.getImageForConstraint=function(e,t,n){return this.pointImage},mxConstraintHandler.prototype.isEventIgnored=function(e,t){return!1},mxConstraintHandler.prototype.update=function(e,t){if(this.isEnabled()&&!this.isEventIgnored(e)){var n=this.getTolerance(),a=new mxRectangle(e.getGraphX()-n,e.getGraphY()-n,2*n,2*n),i=null!=e.getCell()&&this.graph.isCellConnectable(e.getCell());if((null==this.currentFocusArea||!mxUtils.intersects(this.currentFocusArea,a)||null!=e.getState()&&null!=this.currentFocus&&i)&&(this.currentFocusArea=null,e.getState()!=this.currentFocus))if(this.currentFocus=null,this.constraints=null!=e.getState()&&i?this.graph.getAllConnectionConstraints(e.getState(),t):null,null!=this.constraints){if(this.currentFocus=e.getState(),this.currentFocusArea=new mxRectangle(e.getState().x,e.getState().y,e.getState().width,e.getState().height),null!=this.focusIcons){for(i=0;i<this.focusIcons.length;i++)this.focusIcons[i].destroy();this.focusPoints=this.focusIcons=null}for(this.focusIcons=[],this.focusPoints=[],i=0;i<this.constraints.length;i++){var o,s=this.graph.getConnectionPoint(e.getState(),this.constraints[i]),r=(o=this.getImageForConstraint(e.getState(),this.constraints[i],s)).src;(o=new mxImageShape(o=new mxRectangle(s.x-o.width/2,s.y-o.height/2,o.width,o.height),r)).dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,o.preserveImageAspect=!1,o.init(this.graph.getView().getOverlayPane()),null!=o.node.previousSibling&&o.node.parentNode.insertBefore(o.node,o.node.parentNode.firstChild),r=mxUtils.bind(this,function(){return null!=this.currentFocus?this.currentFocus:e.getState()}),o.redraw(),mxEvent.redirectMouseEvents(o.node,this.graph,r),this.currentFocusArea.add(o.bounds),this.focusIcons.push(o),this.focusPoints.push(s)}this.currentFocusArea.grow(n)}else if(null!=this.focusIcons){for(null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null),i=0;i<this.focusIcons.length;i++)this.focusIcons[i].destroy();this.focusPoints=this.focusIcons=null}if(this.currentPoint=this.currentConstraint=null,null!=this.focusIcons&&null!=this.constraints&&(null==e.getState()||this.currentFocus==e.getState()))for(i=0;i<this.focusIcons.length;i++)if(mxUtils.intersects(this.focusIcons[i].bounds,a)){this.currentConstraint=this.constraints[i],this.currentPoint=this.focusPoints[i],(n=this.focusIcons[i].bounds.clone()).grow(mxClient.IS_IE?3:2),mxClient.IS_IE&&(n.width-=1,n.height-=1),null==this.focusHighlight?((n=new mxRectangleShape(n,null,this.highlightColor,3)).dialect=this.graph.dialect==mxConstants.DIALECT_SVG?mxConstants.DIALECT_SVG:mxConstants.DIALECT_VML,n.init(this.graph.getView().getOverlayPane()),this.focusHighlight=n,r=mxUtils.bind(this,function(){return null!=this.currentFocus?this.currentFocus:e.getState()}),mxEvent.redirectMouseEvents(n.node,this.graph,r)):(this.focusHighlight.bounds=n,this.focusHighlight.redraw());break}null==this.currentConstraint&&null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null)}},mxConstraintHandler.prototype.destroy=function(){this.reset()},mxRubberband.prototype.defaultOpacity=20,mxRubberband.prototype.enabled=!0,mxRubberband.prototype.div=null,mxRubberband.prototype.sharedDiv=null,mxRubberband.prototype.currentX=0,mxRubberband.prototype.currentY=0,mxRubberband.prototype.isEnabled=function(){return this.enabled},mxRubberband.prototype.setEnabled=function(e){this.enabled=e},mxRubberband.prototype.mouseDown=function(e,t){if(!t.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&(this.graph.isForceMarqueeEvent(t.getEvent())||null==t.getState())){var n=mxUtils.getOffset(this.graph.container),a=mxUtils.getScrollOrigin(this.graph.container);if(a.x-=n.x,a.y-=n.y,this.start(t.getX()+a.x,t.getY()+a.y),mxClient.IS_NS&&!mxClient.IS_SF&&!mxClient.IS_GC){var i=this.graph.container,o=function(e){e=new mxMouseEvent(e);var t=mxUtils.convertPoint(i,e.getX(),e.getY());return e.graphX=t.x,e.graphY=t.y,e};this.dragHandler=mxUtils.bind(this,function(e){this.mouseMove(this.graph,o(e))}),this.dropHandler=mxUtils.bind(this,function(e){this.mouseUp(this.graph,o(e))}),mxEvent.addListener(document,"mousemove",this.dragHandler),mxEvent.addListener(document,"mouseup",this.dropHandler)}t.consume(!1)}},mxRubberband.prototype.start=function(e,t){this.first=new mxPoint(e,t)},mxRubberband.prototype.mouseMove=function(e,t){if(!t.isConsumed()&&null!=this.first){var n=mxUtils.getScrollOrigin(this.graph.container),a=mxUtils.getOffset(this.graph.container);n.x-=a.x,n.y-=a.y;a=t.getX()+n.x,n=t.getY()+n.y;var i=this.first.x-a,o=this.first.y-n,s=this.graph.tolerance;(null!=this.div||Math.abs(i)>s||Math.abs(o)>s)&&(null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(a,n),t.consume())}},mxRubberband.prototype.createShape=function(){return null==this.sharedDiv&&(this.sharedDiv=document.createElement("div"),this.sharedDiv.className="mxRubberband",mxUtils.setOpacity(this.sharedDiv,this.defaultOpacity)),this.graph.container.appendChild(this.sharedDiv),this.sharedDiv},mxRubberband.prototype.mouseUp=function(e,t){var n=null!=this.div;this.reset(),n&&(n=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(n,t.getEvent()),t.consume())},mxRubberband.prototype.reset=function(){null!=this.div&&this.div.parentNode.removeChild(this.div),null!=this.dragHandler&&(mxEvent.removeListener(document,"mousemove",this.dragHandler),this.dragHandler=null),null!=this.dropHandler&&(mxEvent.removeListener(document,"mouseup",this.dropHandler),this.dropHandler=null),this.currentY=this.currentX=0,this.div=this.first=null},mxRubberband.prototype.update=function(e,t){this.currentX=e,this.currentY=t,this.repaint()},mxRubberband.prototype.repaint=function(){if(null!=this.div){var e=this.currentX-this.graph.panDx,t=this.currentY-this.graph.panDy;this.x=Math.min(this.first.x,e),this.y=Math.min(this.first.y,t),this.width=Math.max(this.first.x,e)-this.x,this.height=Math.max(this.first.y,t)-this.y,e=mxClient.IS_VML?this.graph.panDy:0,this.div.style.left=this.x+(mxClient.IS_VML?this.graph.panDx:0)+"px",this.div.style.top=this.y+e+"px",this.div.style.width=Math.max(1,this.width)+"px",this.div.style.height=Math.max(1,this.height)+"px"}},mxRubberband.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),this.graph.removeListener(this.panHandler),this.reset(),null!=this.sharedDiv&&(this.sharedDiv=null))},mxVertexHandler.prototype.graph=null,mxVertexHandler.prototype.state=null,mxVertexHandler.prototype.singleSizer=!1,mxVertexHandler.prototype.index=null,mxVertexHandler.prototype.allowHandleBoundsCheck=!0,mxVertexHandler.prototype.handleImage=null,mxVertexHandler.prototype.tolerance=0,mxVertexHandler.prototype.rotationEnabled=!1,mxVertexHandler.prototype.rotationRaster=!0,mxVertexHandler.prototype.init=function(){if(this.graph=this.state.view.graph,this.selectionBounds=this.getSelectionBounds(this.state),this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height),this.selectionBorder=this.createSelectionShape(this.bounds),this.selectionBorder.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.selectionBorder.pointerEvents=!1,this.selectionBorder.init(this.graph.getView().getOverlayPane()),this.graph.isCellMovable(this.state.cell)&&(this.selectionBorder.node.style.cursor=mxConstants.CURSOR_MOVABLE_VERTEX),mxEvent.redirectMouseEvents(this.selectionBorder.node,this.graph,this.state),mxGraphHandler.prototype.maxCells<=0||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells){var e=this.graph.isCellResizable(this.state.cell);if(this.sizers=[],e||this.graph.isLabelMovable(this.state.cell)&&2<=this.state.width&&2<=this.state.height){var t=0;e&&(this.singleSizer||(this.sizers.push(this.createSizer("nw-resize",t++)),this.sizers.push(this.createSizer("n-resize",t++)),this.sizers.push(this.createSizer("ne-resize",t++)),this.sizers.push(this.createSizer("w-resize",t++)),this.sizers.push(this.createSizer("e-resize",t++)),this.sizers.push(this.createSizer("sw-resize",t++)),this.sizers.push(this.createSizer("s-resize",t++))),this.sizers.push(this.createSizer("se-resize",t++))),null!=(e=this.graph.model.getGeometry(this.state.cell))&&!e.relative&&!this.graph.isSwimlane(this.state.cell)&&this.graph.isLabelMovable(this.state.cell)&&(this.labelShape=this.createSizer(mxConstants.CURSOR_LABEL_HANDLE,mxEvent.LABEL_HANDLE,mxConstants.LABEL_HANDLE_SIZE,mxConstants.LABEL_HANDLE_FILLCOLOR),this.sizers.push(this.labelShape))}else this.graph.isCellMovable(this.state.cell)&&!this.graph.isCellResizable(this.state.cell)&&this.state.width<2&&this.state.height<2&&(this.labelShape=this.createSizer(mxConstants.CURSOR_MOVABLE_VERTEX,null,null,mxConstants.LABEL_HANDLE_FILLCOLOR),this.sizers.push(this.labelShape))}this.rotationEnabled&&(mxGraphHandler.prototype.maxCells<=0||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)&&(this.rotationShape=this.createSizer("pointer",mxEvent.ROTATION_HANDLE,mxConstants.HANDLE_SIZE+3,mxConstants.HANDLE_FILLCOLOR),this.sizers.push(this.rotationShape)),this.redraw()},mxVertexHandler.prototype.getSelectionBounds=function(e){return new mxRectangle(Math.round(e.x),Math.round(e.y),Math.round(e.width),Math.round(e.height))},mxVertexHandler.prototype.createSelectionShape=function(e){return(e=new mxRectangleShape(e,null,this.getSelectionColor())).strokewidth=this.getSelectionStrokeWidth(),e.isDashed=this.isSelectionDashed(),e},mxVertexHandler.prototype.getSelectionColor=function(){return mxConstants.VERTEX_SELECTION_COLOR},mxVertexHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.VERTEX_SELECTION_STROKEWIDTH},mxVertexHandler.prototype.isSelectionDashed=function(){return mxConstants.VERTEX_SELECTION_DASHED},mxVertexHandler.prototype.createSizer=function(e,t,n,a){return n=new mxRectangle(0,0,n=n||mxConstants.HANDLE_SIZE,n),(a=this.createSizerShape(n,t,a)).isHtmlAllowed()&&null!=this.state.text&&this.state.text.node.parentNode==this.graph.container?(a.bounds.height-=1,a.bounds.width-=1,a.dialect=mxConstants.DIALECT_STRICTHTML,a.init(this.graph.container)):(a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,a.init(this.graph.getView().getOverlayPane())),mxEvent.redirectMouseEvents(a.node,this.graph,this.state),this.graph.isEnabled()&&(a.node.style.cursor=e),this.isSizerVisible(t)||(a.node.style.visibility="hidden"),a},mxVertexHandler.prototype.isSizerVisible=function(e){return!0},mxVertexHandler.prototype.createSizerShape=function(e,t,n){return null!=this.handleImage?(e.width=this.handleImage.width,e.height=this.handleImage.height,new mxImageShape(e,this.handleImage.src)):t==mxEvent.ROTATION_HANDLE?new mxEllipse(e,n||mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR):new mxRectangleShape(e,n||mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)},mxVertexHandler.prototype.moveSizerTo=function(e,t,n){null!=e&&(e.bounds.x=Math.round(t-e.bounds.width/2),e.bounds.y=Math.round(n-e.bounds.height/2),e.redraw())},mxVertexHandler.prototype.getHandleForEvent=function(e){if(e.isSource(this.rotationShape))return mxEvent.ROTATION_HANDLE;if(e.isSource(this.labelShape))return mxEvent.LABEL_HANDLE;if(null!=this.sizers)for(var t=this.tolerance,n=(t=this.allowHandleBoundsCheck&&(mxClient.IS_IE||0<t)?new mxRectangle(e.getGraphX()-t,e.getGraphY()-t,2*t,2*t):null,0);n<this.sizers.length;n++)if(e.isSource(this.sizers[n])||null!=t&&mxUtils.intersects(this.sizers[n].bounds,t))return n;return null},mxVertexHandler.prototype.mouseDown=function(e,t){if(!t.isConsumed()&&this.graph.isEnabled()&&!this.graph.isForceMarqueeEvent(t.getEvent())&&(0<this.tolerance||t.getState()==this.state)){var n=this.getHandleForEvent(t);null!=n&&(this.start(t.getX(),t.getY(),n),t.consume())}},mxVertexHandler.prototype.start=function(e,t,n){e=mxUtils.convertPoint(this.graph.container,e,t),this.startX=e.x,this.startY=e.y,this.index=n,this.selectionBorder.node.style.display=n==mxEvent.ROTATION_HANDLE?"inline":"none",this.preview=this.createSelectionShape(this.bounds),mxClient.IS_SVG&&0!=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0")||null==this.state.text||this.state.text.node.parentNode!=this.graph.container?(this.preview.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.preview.init(this.graph.view.getOverlayPane())):(this.preview.dialect=mxConstants.DIALECT_STRICTHTML,this.preview.init(this.graph.container))},mxVertexHandler.prototype.mouseMove=function(e,t){if(t.isConsumed()||null==this.index)null!=this.getHandleForEvent(t)&&t.consume(!1);else{var n=new mxPoint(t.getGraphX(),t.getGraphY()),a=this.graph.isGridEnabledEvent(t.getEvent()),i=this.graph.getView().scale;if(this.index==mxEvent.LABEL_HANDLE)a&&(n.x=this.graph.snap(n.x/i)*i,n.y=this.graph.snap(n.y/i)*i),this.moveSizerTo(this.sizers[this.sizers.length-1],n.x,n.y);else if(this.index==mxEvent.ROTATION_HANDLE){var o=this.state.x+this.state.width/2-n.x,s=this.state.y+this.state.height/2-n.y;this.currentAlpha=0!=o?180*Math.atan(s/o)/Math.PI+90:s<0?180:0,0<o&&(this.currentAlpha-=180),this.rotationRaster&&(o=n.x-this.state.getCenterX(),s=n.y-this.state.getCenterY(),o=Math.abs(Math.sqrt(o*o+s*s)-this.state.height/2-20),o=Math.max(1,5*Math.min(3,Math.max(0,Math.round(80/Math.abs(o))))),this.currentAlpha=Math.round(this.currentAlpha/o)*o),this.selectionBorder.rotation=this.currentAlpha,this.selectionBorder.redraw()}else{var r=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),l=Math.cos(-r),d=Math.sin(-r),c=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),m=(o=n.x-this.startX,s=n.y-this.startY,n=this.graph.view.translate,d*o+l*s);o=l*o-d*s;this.bounds=this.union(this.selectionBounds,o,m,this.index,a,i,n),l=Math.cos(r),c=(d=Math.sin(r))*(o=(s=new mxPoint(this.bounds.getCenterX(),this.bounds.getCenterY())).x-c.x)+l*(s=s.y-c.y)-s,this.bounds.x+=l*o-d*s-o,this.bounds.y+=c,this.drawPreview()}t.consume()}},mxVertexHandler.prototype.mouseUp=function(e,t){if(!t.isConsumed()&&null!=this.index&&null!=this.state){var n=new mxPoint(t.getGraphX(),t.getGraphY());this.graph.getModel().beginUpdate();try{if(this.index==mxEvent.ROTATION_HANDLE)null!=this.currentAlpha&&this.rotateCell(this.state.cell,this.currentAlpha-(this.state.style[mxConstants.STYLE_ROTATION]||0));else{var a=this.graph.isGridEnabledEvent(t.getEvent()),i=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),o=Math.cos(-i),s=Math.sin(-i),r=(n=s*(r=n.x-this.startX)+o*(l=n.y-this.startY),o*r-s*l),l=n,d=this.graph.view.scale;this.resizeCell(this.state.cell,r/d,l/d,this.index,a)}}finally{this.graph.getModel().endUpdate()}this.reset(),t.consume()}},mxVertexHandler.prototype.rotateCell=function(e,t){var n=this.graph.getModel();if(n.isVertex(e)){if(null!=(o=e==this.state?this.state:this.graph.view.getState(e))&&this.graph.setCellStyles(mxConstants.STYLE_ROTATION,(o.style[mxConstants.STYLE_ROTATION]||0)+t,[e]),this.state.cell!=e&&(null!=(o=this.graph.getCellGeometry(e))&&!o.relative))if(0!=t){var a=this.graph.getModel().getParent(e),i=this.graph.getCellGeometry(a);if(!o.relative&&null!=i){var o,s=mxUtils.toRadians(t),r=(a=Math.cos(s),s=Math.sin(s),new mxPoint(o.getCenterX(),o.getCenterY()));i=new mxPoint(i.width/2,i.height/2),a=mxUtils.getRotatedPoint(r,a,s,i);(o=o.clone()).x=a.x-o.width/2,o.y=a.y-o.height/2,n.setGeometry(e,o)}}else(o=o.clone()).x+=dx,o.y+=dy,n.setGeometry(e,o);for(o=n.getChildCount(e),a=0;a<o;a++)this.rotateCell(n.getChildAt(e,a),t)}},mxVertexHandler.prototype.reset=function(){this.index=this.currentAlpha=null,null!=this.preview&&(this.preview.destroy(),this.preview=null),null!=this.selectionBorder&&(this.selectionBorder.node.style.display="inline",this.selectionBounds=this.getSelectionBounds(this.state),this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height),this.drawPreview())},mxVertexHandler.prototype.resizeCell=function(e,t,n,a,i){var o=this.graph.model.getGeometry(e);if(null!=o)if(a==mxEvent.LABEL_HANDLE)a=this.graph.view.scale,t=(this.labelShape.bounds.getCenterX()-this.startX)/a,n=(this.labelShape.bounds.getCenterY()-this.startY)/a,null==(o=o.clone()).offset?o.offset=new mxPoint(t,n):(o.offset.x+=t,o.offset.y+=n),this.graph.model.setGeometry(e,o);else{if(a=this.union(o,t,n,a,i,1,new mxPoint(0,0)),0!=(r=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"))){t=a.getCenterX()-o.getCenterX(),n=a.getCenterY()-o.getCenterY(),i=Math.cos(r);var s=Math.sin(r),r=i*t-s*n-t;t=s*t+i*n-n,n=a.x-o.x;var l=a.y-o.y,d=i*n-s*l;i=s*n+i*l,a.x+=r,a.y+=t,this.graph.isCellCollapsed(e)||0==r&&0==t||(n=o.x-a.x+d,l=o.y-a.y+i,this.moveChildren(e,n,l))}this.graph.resizeCell(e,a)}},mxVertexHandler.prototype.moveChildren=function(e,t,n){for(var a=this.graph.getModel(),i=a.getChildCount(e),o=0;o<i;o++){var s=a.getChildAt(e,o);if(a.isVertex(s)){var r=this.graph.getCellGeometry(s);null!=r&&!r.relative&&((r=r.clone()).x+=t,r.y+=n,a.setGeometry(s,r))}}},mxVertexHandler.prototype.union=function(e,t,n,a,i,o,s){if(this.singleSizer){s=e.x+e.width+t;var r=e.y+e.height+n;return i&&(s=this.graph.snap(s/o)*o,r=this.graph.snap(r/o)*o),(o=new mxRectangle(e.x,e.y,0,0)).add(new mxRectangle(s,r,0,0)),o}var l=(r=e.x-s.x*o)+e.width,d=e.y-s.y*o;return e=d+e.height,4<a?(e+=n,i&&(e=this.graph.snap(e/o)*o)):a<3&&(d+=n,i&&(d=this.graph.snap(d/o)*o)),0==a||3==a||5==a?(r+=t,i&&(r=this.graph.snap(r/o)*o)):2!=a&&4!=a&&7!=a||(l+=t,i&&(l=this.graph.snap(l/o)*o)),e-=d,(i=l-r)<0&&(r+=i,i=Math.abs(i)),e<0&&(d+=e,e=Math.abs(e)),new mxRectangle(r+s.x*o,d+s.y*o,i,e)},mxVertexHandler.prototype.redraw=function(){this.selectionBounds=this.getSelectionBounds(this.state),this.bounds=new mxRectangle(this.state.x,this.state.y,this.state.width,this.state.height);var e=this.state;if(null!=this.sizers){var t=e.x+e.width,n=e.y+e.height;if(this.singleSizer)this.moveSizerTo(this.sizers[0],t,n);else{var a=e.x+e.width/2,i=e.y+e.height/2;if(1<this.sizers.length){var o=mxUtils.toRadians(e.style[mxConstants.STYLE_ROTATION]||"0"),s=Math.cos(o),r=(o=Math.sin(o),new mxPoint(e.getCenterX(),e.getCenterY())),l=mxUtils.getRotatedPoint(new mxPoint(e.x,e.y),s,o,r);this.moveSizerTo(this.sizers[0],l.x,l.y),l.x=a,l.y=e.y,l=mxUtils.getRotatedPoint(l,s,o,r),this.moveSizerTo(this.sizers[1],l.x,l.y),l.x=t,l.y=e.y,l=mxUtils.getRotatedPoint(l,s,o,r),this.moveSizerTo(this.sizers[2],l.x,l.y),l.x=e.x,l.y=i,l=mxUtils.getRotatedPoint(l,s,o,r),this.moveSizerTo(this.sizers[3],l.x,l.y),l.x=t,l.y=i,l=mxUtils.getRotatedPoint(l,s,o,r),this.moveSizerTo(this.sizers[4],l.x,l.y),l.x=e.x,l.y=n,l=mxUtils.getRotatedPoint(l,s,o,r),this.moveSizerTo(this.sizers[5],l.x,l.y),l.x=a,l.y=n,l=mxUtils.getRotatedPoint(l,s,o,r),this.moveSizerTo(this.sizers[6],l.x,l.y),l.x=t,l.y=n,l=mxUtils.getRotatedPoint(l,s,o,r),this.moveSizerTo(this.sizers[7],l.x,l.y),this.moveSizerTo(this.sizers[8],a+e.absoluteOffset.x,i+e.absoluteOffset.y)}else 2<=this.state.width&&2<=this.state.height?this.moveSizerTo(this.sizers[0],a+e.absoluteOffset.x,i+e.absoluteOffset.y):this.moveSizerTo(this.sizers[0],e.x,e.y)}}null!=this.rotationShape&&(o=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),s=Math.cos(o),o=Math.sin(o),r=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),l=mxUtils.getRotatedPoint(new mxPoint(e.x+e.width/2,e.y-16),s,o,r),this.moveSizerTo(this.rotationShape,l.x,l.y)),this.selectionBorder.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"),this.drawPreview()},mxVertexHandler.prototype.drawPreview=function(){null!=this.preview&&(this.preview.bounds=this.bounds,this.preview.node.parentNode==this.graph.container&&(this.preview.bounds.width=Math.max(0,this.preview.bounds.width-1),this.preview.bounds.height=Math.max(0,this.preview.bounds.height-1)),this.preview.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"),this.preview.redraw()),this.selectionBorder.bounds=this.bounds,this.selectionBorder.redraw()},mxVertexHandler.prototype.destroy=function(){if(null!=this.preview&&(this.preview.destroy(),this.preview=null),this.selectionBorder.destroy(),this.labelShape=this.selectionBorder=null,null!=this.sizers)for(var e=0;e<this.sizers.length;e++)this.sizers[e].destroy(),this.sizers[e]=null},mxEdgeHandler.prototype.graph=null,mxEdgeHandler.prototype.state=null,mxEdgeHandler.prototype.marker=null,mxEdgeHandler.prototype.constraintHandler=null,mxEdgeHandler.prototype.error=null,mxEdgeHandler.prototype.shape=null,mxEdgeHandler.prototype.bends=null,mxEdgeHandler.prototype.labelShape=null,mxEdgeHandler.prototype.cloneEnabled=!0,mxEdgeHandler.prototype.addEnabled=!1,mxEdgeHandler.prototype.removeEnabled=!1,mxEdgeHandler.prototype.preferHtml=!1,mxEdgeHandler.prototype.allowHandleBoundsCheck=!0,mxEdgeHandler.prototype.snapToTerminals=!1,mxEdgeHandler.prototype.handleImage=null,mxEdgeHandler.prototype.tolerance=0,mxEdgeHandler.prototype.init=function(){if(this.graph=this.state.view.graph,this.marker=this.createMarker(),this.constraintHandler=new mxConstraintHandler(this.graph),this.points=[],this.abspoints=this.getSelectionPoints(this.state),this.shape=this.createSelectionShape(this.abspoints),this.shape.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,this.shape.init(this.graph.getView().getOverlayPane()),this.shape.svgStrokeTolerance=0,this.shape.node.style.cursor=mxConstants.CURSOR_MOVABLE_EDGE,mxEvent.addListener(this.shape.node,"dblclick",mxUtils.bind(this,function(e){this.graph.dblClick(e,this.state.cell)})),mxEvent.addGestureListeners(this.shape.node,mxUtils.bind(this,function(e){this.addEnabled&&this.isAddPointEvent(e)?this.addPoint(this.state,e):this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e,this.state))}),mxUtils.bind(this,function(e){var t=this.state.cell;if(null!=this.index){var n=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));t=this.graph.getCellAt(n.x,n.y);this.graph.isSwimlane(t)&&this.graph.hitsSwimlaneContent(t,n.x,n.y)&&(t=null)}this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,this.graph.getView().getState(t)))}),mxUtils.bind(this,function(e){this.graph.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e,this.state))})),this.preferHtml=null!=this.state.text&&this.state.text.node.parentNode==this.graph.container,!this.preferHtml){var e=this.state.getVisibleTerminalState(!0);null!=e&&(this.preferHtml=null!=e.text&&e.text.node.parentNode==this.graph.container),this.preferHtml||null!=(e=this.state.getVisibleTerminalState(!1))&&(this.preferHtml=null!=e.text&&e.text.node.parentNode==this.graph.container)}(this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells||mxGraphHandler.prototype.maxCells<=0)&&(this.bends=this.createBends()),this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y),this.labelShape=new mxRectangleShape(new mxRectangle,mxConstants.LABEL_HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR),this.labelShape.pointerEvents=!1,this.initBend(this.labelShape),this.labelShape.node.style.cursor=mxConstants.CURSOR_LABEL_HANDLE,mxEvent.redirectMouseEvents(this.labelShape.node,this.graph,this.state),this.redraw()},mxEdgeHandler.prototype.isAddPointEvent=function(e){return mxEvent.isShiftDown(e)},mxEdgeHandler.prototype.isRemovePointEvent=function(e){return mxEvent.isShiftDown(e)},mxEdgeHandler.prototype.getSelectionPoints=function(e){return e.absolutePoints},mxEdgeHandler.prototype.createSelectionShape=function(e){return(e=new mxPolyline(e,this.getSelectionColor())).strokewidth=this.getSelectionStrokeWidth(),e.isDashed=this.isSelectionDashed(),e},mxEdgeHandler.prototype.getSelectionColor=function(){return mxConstants.EDGE_SELECTION_COLOR},mxEdgeHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.EDGE_SELECTION_STROKEWIDTH},mxEdgeHandler.prototype.isSelectionDashed=function(){return mxConstants.EDGE_SELECTION_DASHED},mxEdgeHandler.prototype.isConnectableCell=function(e){return!0},mxEdgeHandler.prototype.createMarker=function(){var e=new mxCellMarker(this.graph),a=this;return e.getCell=function(e){var t=mxCellMarker.prototype.getCell.apply(this,arguments);if(!a.isConnectableCell(t))return null;var n=a.graph.getModel();return(t==a.state.cell||null!=t&&!a.graph.connectableEdges&&n.isEdge(t))&&(t=null),t},e.isValidState=function(e){var t=a.graph.getModel();t=null!=(t=a.graph.view.getTerminalPort(e,a.graph.view.getState(t.getTerminal(a.state.cell,!a.isSource)),!a.isSource))?t.cell:null;return a.error=a.validateConnection(a.isSource?e.cell:t,a.isSource?t:e.cell),null==a.error},e},mxEdgeHandler.prototype.validateConnection=function(e,t){return this.graph.getEdgeValidationError(this.state.cell,e,t)},mxEdgeHandler.prototype.createBends=function(){for(var e=this.state.cell,t=[],n=0;n<this.abspoints.length;n++)if(this.isHandleVisible(n)){var a=n==this.abspoints.length-1;if((a=0==n||a)||this.graph.isCellBendable(e)){var i=this.createHandleShape(n);if(this.initBend(i),mxClient.IS_TOUCH&&i.node.setAttribute("pointer-events","none"),this.isHandleEnabled(n))if(mxClient.IS_TOUCH){var o=mxUtils.bind(this,function(e){return e=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e)),this.graph.view.getState(this.graph.getCellAt(e.x,e.y))});mxEvent.redirectMouseEvents(i.node,this.graph,o)}else i.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE,mxEvent.redirectMouseEvents(i.node,this.graph,this.state);t.push(i),a||(this.points.push(new mxPoint(0,0)),i.node.style.visibility="hidden")}}return t},mxEdgeHandler.prototype.isHandleEnabled=function(e){return!0},mxEdgeHandler.prototype.isHandleVisible=function(e){return!0},mxEdgeHandler.prototype.createHandleShape=function(e){return null!=this.handleImage?new mxImageShape(new mxRectangle(0,0,this.handleImage.width,this.handleImage.height),this.handleImage.src):(e=mxConstants.HANDLE_SIZE,this.preferHtml&&(e-=1),new mxRectangleShape(new mxRectangle(0,0,e,e),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR))},mxEdgeHandler.prototype.initBend=function(e){this.preferHtml?(e.dialect=mxConstants.DIALECT_STRICTHTML,e.init(this.graph.container)):(e.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,e.init(this.graph.getView().getOverlayPane()))},mxEdgeHandler.prototype.getHandleForEvent=function(e){if(null!=this.bends)for(var t=this.tolerance,n=(t=this.allowHandleBoundsCheck&&(mxClient.IS_IE||0<t)?new mxRectangle(e.getGraphX()-t,e.getGraphY()-t,2*t,2*t):null,0);n<this.bends.length;n++)if((e.isSource(this.bends[n])||null!=t&&mxUtils.intersects(this.bends[n].bounds,t))&&"hidden"!=this.bends[n].node.style.visibility)return n;return!(e.isSource(this.labelShape)&&"hidden"!=this.labelShape.node.style.visibility||e.isSource(this.state.text))||(mxClient.IS_SF||mxClient.IS_GC)&&"SELECT"==e.getSource().nodeName?null:mxEvent.LABEL_HANDLE},mxEdgeHandler.prototype.mouseDown=function(e,t){var n=null;null!=(n=this.getHandleForEvent(t))&&!t.isConsumed()&&this.graph.isEnabled()&&!this.graph.isForceMarqueeEvent(t.getEvent())&&(this.removeEnabled&&this.isRemovePointEvent(t.getEvent())?this.removePoint(this.state,n):(n!=mxEvent.LABEL_HANDLE||this.graph.isLabelMovable(t.getCell()))&&this.start(t.getX(),t.getY(),n),t.consume())},mxEdgeHandler.prototype.start=function(e,t,n){this.startX=e,this.startY=t,this.isSource=null!=this.bends&&0==n,this.isTarget=null!=this.bends&&n==this.bends.length-1,this.isLabel=n==mxEvent.LABEL_HANDLE,this.isSource||this.isTarget?(e=this.state.cell,(null==(t=this.graph.model.getTerminal(e,this.isSource))&&this.graph.isTerminalPointMovable(e,this.isSource)||null!=t&&this.graph.isCellDisconnectable(e,t,this.isSource))&&(this.index=n)):this.index=n},mxEdgeHandler.prototype.clonePreviewState=function(e,t){return this.state.clone()},mxEdgeHandler.prototype.getSnapToTerminalTolerance=function(){return this.graph.gridSize*this.graph.view.scale/2},mxEdgeHandler.prototype.getPointForEvent=function(e){var n=new mxPoint(e.getGraphX(),e.getGraphY()),a=this.getSnapToTerminalTolerance(),t=this.graph.getView(),i=!1,o=!1;if(this.snapToTerminals&&0<a){var s=function(e){if(null!=e){var t=e.x;Math.abs(n.x-t)<a&&(n.x=t,i=!0),e=e.y,Math.abs(n.y-e)<a&&(n.y=e,o=!0)}},r=function(e){null!=e&&s.call(this,new mxPoint(t.getRoutingCenterX(e),t.getRoutingCenterY(e)))};if(r.call(this,this.state.getVisibleTerminalState(!0)),r.call(this,this.state.getVisibleTerminalState(!1)),null!=this.abspoints)for(r=0;r<this.abspoints;r++)r!=this.index&&s.call(this,this.abspoints[r])}return this.graph.isGridEnabledEvent(e.getEvent())&&(e=t.scale,r=t.translate,i||(n.x=(this.graph.snap(n.x/e-r.x)+r.x)*e),o||(n.y=(this.graph.snap(n.y/e-r.y)+r.y)*e)),n},mxEdgeHandler.prototype.getPreviewTerminalState=function(e){this.constraintHandler.update(e,this.isSource),this.marker.process(e),e=this.marker.getValidState();var t=null;return null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentConstraint&&this.marker.reset(),null!=e?t=e:null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(t=this.constraintHandler.currentFocus),t},mxEdgeHandler.prototype.getPreviewPoints=function(e){var t=null!=(t=this.graph.getCellGeometry(this.state.cell)).points?t.points.slice():null;return this.isSource||this.isTarget?this.graph.resetEdgesOnConnect&&(t=null):(this.convertPoint(e,!1),null==t?t=[e]:t[this.index-1]=e),t},mxEdgeHandler.prototype.updatePreviewState=function(e,t,n){var a=this.isSource?n:this.state.getVisibleTerminalState(!0),i=this.isTarget?n:this.state.getVisibleTerminalState(!1),o=this.graph.getConnectionConstraint(e,a,!0),s=this.graph.getConnectionConstraint(e,i,!1),r=this.constraintHandler.currentConstraint;null==r&&(r=new mxConnectionConstraint),this.isSource?o=r:this.isTarget&&(s=r),(!this.isSource||null!=a)&&e.view.updateFixedTerminalPoint(e,a,!0,o),(!this.isTarget||null!=i)&&e.view.updateFixedTerminalPoint(e,i,!1,s),(this.isSource||this.isTarget)&&null==n&&(e.setAbsoluteTerminalPoint(t,this.isSource),null==this.marker.getMarkedState()&&(this.error=this.graph.allowDanglingEdges?null:"")),e.view.updatePoints(e,this.points,a,i),e.view.updateFloatingTerminalPoints(e,a,i)},mxEdgeHandler.prototype.mouseMove=function(e,t){if(null!=this.index&&null!=this.marker){var n=this.getPointForEvent(t);if(this.isLabel)this.label.x=n.x,this.label.y=n.y;else{this.points=this.getPreviewPoints(n);var a=this.isSource||this.isTarget?this.getPreviewTerminalState(t):null,i=this.clonePreviewState(n,null!=a?a.cell:null);this.updatePreviewState(i,n,a),this.setPreviewColor(null==this.error?this.marker.validColor:this.marker.invalidColor),this.abspoints=i.absolutePoints,this.active=!0}this.drawPreview(),mxEvent.consume(t.getEvent()),t.consume()}else mxClient.IS_IE&&null!=this.getHandleForEvent(t)&&t.consume(!1)},mxEdgeHandler.prototype.mouseUp=function(e,t){if(null!=this.index&&null!=this.marker){var n=this.state.cell;if(t.getX()!=this.startX||t.getY()!=this.startY)if(null!=this.error)0<this.error.length&&this.graph.validationAlert(this.error);else if(this.isLabel)this.moveLabel(this.state,this.label.x,this.label.y);else if(this.isSource||this.isTarget){var a=null;if(null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(a=this.constraintHandler.currentFocus.cell),null==a&&this.marker.hasValidState()&&(a=this.marker.validState.cell),null!=a)n=this.connect(n,a,this.isSource,this.graph.isCloneEvent(t.getEvent())&&this.cloneEnabled&&this.graph.isCellsCloneable(),t);else if(this.graph.isAllowDanglingEdges()){(a=this.abspoints[this.isSource?0:this.abspoints.length-1]).x=a.x/this.graph.view.scale-this.graph.view.translate.x,a.y=a.y/this.graph.view.scale-this.graph.view.translate.y;var i=this.graph.getView().getState(this.graph.getModel().getParent(n));null!=i&&(a.x-=i.origin.x,a.y-=i.origin.y),a.x-=this.graph.panDx/this.graph.view.scale,a.y-=this.graph.panDy/this.graph.view.scale,this.changeTerminalPoint(n,a,this.isSource)}}else this.active?this.changePoints(n,this.points):(this.graph.getView().invalidate(this.state.cell),this.graph.getView().revalidate(this.state.cell));null!=this.marker&&(this.reset(),n!=this.state.cell&&this.graph.setSelectionCell(n)),t.consume()}},mxEdgeHandler.prototype.reset=function(){this.points=this.label=this.index=this.error=null,this.isTarget=this.isSource=this.isLabel=this.active=!1,this.marker.reset(),this.constraintHandler.reset(),this.setPreviewColor(mxConstants.EDGE_SELECTION_COLOR),this.redraw()},mxEdgeHandler.prototype.setPreviewColor=function(e){null!=this.shape&&(this.shape.stroke=e)},mxEdgeHandler.prototype.convertPoint=function(e,t){var n=this.graph.getView().getScale(),a=this.graph.getView().getTranslate();return t&&(e.x=this.graph.snap(e.x),e.y=this.graph.snap(e.y)),e.x=Math.round(e.x/n-a.x),e.y=Math.round(e.y/n-a.y),null!=(n=this.graph.getView().getState(this.graph.getModel().getParent(this.state.cell)))&&(e.x-=n.origin.x,e.y-=n.origin.y),e},mxEdgeHandler.prototype.moveLabel=function(e,t,n){var a=this.graph.getModel();if(null!=(i=a.getGeometry(e.cell))){var i=i.clone(),o=this.graph.getView().getRelativePoint(e,t,n);i.x=o.x,i.y=o.y;var s=this.graph.getView().scale;i.offset=new mxPoint(0,0),o=this.graph.view.getPoint(e,i),i.offset=new mxPoint((t-o.x)/s,(n-o.y)/s),a.setGeometry(e.cell,i)}},mxEdgeHandler.prototype.connect=function(e,t,n,a,i){var o=(i=this.graph.getModel()).getParent(e);i.beginUpdate();try{if(a){var s=e.clone();i.add(o,s,i.getChildCount(o));var r=i.getTerminal(e,!n);this.graph.connectCell(s,r,!n),e=s}var l=this.constraintHandler.currentConstraint;null==l&&(l=new mxConnectionConstraint),this.graph.connectCell(e,t,n,l)}finally{i.endUpdate()}return e},mxEdgeHandler.prototype.changeTerminalPoint=function(e,t,n){var a=this.graph.getModel(),i=a.getGeometry(e);if(null!=i){a.beginUpdate();try{(i=i.clone()).setTerminalPoint(t,n),a.setGeometry(e,i),this.graph.connectCell(e,null,n,new mxConnectionConstraint)}finally{a.endUpdate()}}},mxEdgeHandler.prototype.changePoints=function(e,t){var n=this.graph.getModel(),a=n.getGeometry(e);null!=a&&((a=a.clone()).points=t,n.setGeometry(e,a))},mxEdgeHandler.prototype.addPoint=function(e,t){var n=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(t),mxEvent.getClientY(t)),a=this.graph.isGridEnabledEvent(t);this.convertPoint(n,a),this.addPointAt(e,n.x,n.y),mxEvent.consume(t)},mxEdgeHandler.prototype.addPointAt=function(e,t,n){var a=this.graph.getCellGeometry(e.cell);if(t=new mxPoint(t,n),null!=a){a=a.clone(),n=this.graph.view.translate;var i=this.graph.view.scale;n=mxUtils.findNearestSegment(e,(t.x+n.x)*i,(t.y+n.y)*i),null==a.points?a.points=[t]:a.points.splice(n,0,t),this.graph.getModel().setGeometry(e.cell,a),this.destroy(),this.init()}},mxEdgeHandler.prototype.removePoint=function(e,t){if(0<t&&t<this.abspoints.length-1){var n=this.graph.getCellGeometry(this.state.cell);null!=n&&null!=n.points&&((n=n.clone()).points.splice(t-1,1),this.graph.getModel().setGeometry(e.cell,n),this.destroy(),this.init())}},mxEdgeHandler.prototype.getHandleFillColor=function(e){e=0==e;var t=this.state.cell,n=this.graph.getModel().getTerminal(t,e),a=mxConstants.HANDLE_FILLCOLOR;return null!=n&&!this.graph.isCellDisconnectable(t,n,e)||null==n&&!this.graph.isTerminalPointMovable(t,e)?a=mxConstants.LOCKED_HANDLE_FILLCOLOR:null!=n&&this.graph.isCellDisconnectable(t,n,e)&&(a=mxConstants.CONNECT_HANDLE_FILLCOLOR),a},mxEdgeHandler.prototype.redraw=function(){this.abspoints=this.state.absolutePoints.slice();var e=this.state.cell,t=mxConstants.LABEL_HANDLE_SIZE;if(this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y),this.labelShape.bounds=new mxRectangle(Math.round(this.label.x-t/2),Math.round(this.label.y-t/2),t,t),this.labelShape.redraw(),null!=(t=this.graph.getLabel(e))&&0<t.length&&this.graph.isLabelMovable(e)?this.labelShape.node.style.visibility="visible":this.labelShape.node.style.visibility="hidden",null!=this.bends&&0<this.bends.length){var n=this.abspoints.length-1,a=(e=this.abspoints[0],this.abspoints[0].y);t=this.bends[0].bounds;this.bends[0].bounds=new mxRectangle(Math.round(this.abspoints[0].x-t.width/2),Math.round(a-t.height/2),t.width,t.height),this.bends[0].fill=this.getHandleFillColor(0),this.bends[0].redraw();a=this.abspoints[n];var i=this.abspoints[n].x,o=(n=this.abspoints[n].y,this.bends.length-1);t=this.bends[o].bounds;this.bends[o].bounds=new mxRectangle(Math.round(i-t.width/2),Math.round(n-t.height/2),t.width,t.height),this.bends[o].fill=this.getHandleFillColor(o),this.bends[o].redraw(),this.redrawInnerBends(e,a)}this.drawPreview()},mxEdgeHandler.prototype.redrawInnerBends=function(e,t){var n=this.graph.getModel().getGeometry(this.state.cell).points;if(null!=n){null==this.points&&(this.points=[]);for(var a=1;a<this.bends.length-1;a++)if(null!=this.bends[a])if(null!=this.abspoints[a]){var i=this.abspoints[a].x,o=this.abspoints[a].y,s=this.bends[a].bounds;this.bends[a].node.style.visibility="visible",this.bends[a].bounds=new mxRectangle(Math.round(i-s.width/2),Math.round(o-s.height/2),s.width,s.height),this.bends[a].redraw(),this.points[a-1]=n[a-1]}else this.bends[a].destroy(),this.bends[a]=null}},mxEdgeHandler.prototype.drawPreview=function(){if(this.isLabel){var e=mxConstants.LABEL_HANDLE_SIZE;e=new mxRectangle(Math.round(this.label.x-e/2),Math.round(this.label.y-e/2),e,e);this.labelShape.bounds=e,this.labelShape.redraw()}else this.shape.points=this.abspoints,this.shape.redraw()},mxEdgeHandler.prototype.destroy=function(){if(null!=this.marker&&(this.marker.destroy(),this.marker=null),null!=this.shape&&(this.shape.destroy(),this.shape=null),null!=this.labelShape&&(this.labelShape.destroy(),this.labelShape=null),null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null),null!=this.bends)for(var e=0;e<this.bends.length;e++)null!=this.bends[e]&&(this.bends[e].destroy(),this.bends[e]=null)},mxUtils.extend(mxElbowEdgeHandler,mxEdgeHandler),mxElbowEdgeHandler.prototype=new mxEdgeHandler,mxElbowEdgeHandler.prototype.constructor=mxElbowEdgeHandler,mxElbowEdgeHandler.prototype.flipEnabled=!0,mxElbowEdgeHandler.prototype.doubleClickOrientationResource="none"!=mxClient.language?"doubleClickOrientation":"",mxElbowEdgeHandler.prototype.createBends=function(){var e=[],t=this.createHandleShape(0);return this.initBend(t),t.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE,mxEvent.redirectMouseEvents(t.node,this.graph,this.state),e.push(t),mxClient.IS_TOUCH&&t.node.setAttribute("pointer-events","none"),e.push(this.createVirtualBend()),this.points.push(new mxPoint(0,0)),t=this.createHandleShape(2),this.initBend(t),t.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE,mxEvent.redirectMouseEvents(t.node,this.graph,this.state),e.push(t),mxClient.IS_TOUCH&&t.node.setAttribute("pointer-events","none"),e},mxElbowEdgeHandler.prototype.createVirtualBend=function(){var e=this.createHandleShape();this.initBend(e);var t=this.getCursorForBend();return e.node.style.cursor=t,t=mxUtils.bind(this,function(e){!mxEvent.isConsumed(e)&&this.flipEnabled&&(this.graph.flipEdge(this.state.cell,e),mxEvent.consume(e))}),mxEvent.redirectMouseEvents(e.node,this.graph,this.state,null,null,null,t),this.graph.isCellBendable(this.state.cell)||(e.node.style.display="none"),e},mxElbowEdgeHandler.prototype.getCursorForBend=function(){return this.state.style[mxConstants.STYLE_EDGE]==mxEdgeStyle.TopToBottom||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.EDGESTYLE_TOPTOBOTTOM||(this.state.style[mxConstants.STYLE_EDGE]==mxEdgeStyle.ElbowConnector||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.EDGESTYLE_ELBOW)&&this.state.style[mxConstants.STYLE_ELBOW]==mxConstants.ELBOW_VERTICAL?"row-resize":"col-resize"},mxElbowEdgeHandler.prototype.getTooltipForNode=function(e){var t=null;return null==this.bends||null==this.bends[1]||e!=this.bends[1].node&&e.parentNode!=this.bends[1].node||(t=this.doubleClickOrientationResource,t=mxResources.get(t)||t),t},mxElbowEdgeHandler.prototype.convertPoint=function(e,t){var n=this.graph.getView().getScale(),a=this.graph.getView().getTranslate(),i=this.state.origin;t&&(e.x=this.graph.snap(e.x),e.y=this.graph.snap(e.y)),e.x=Math.round(e.x/n-a.x-i.x),e.y=Math.round(e.y/n-a.y-i.y)},mxElbowEdgeHandler.prototype.redrawInnerBends=function(e,t){var n=null==(n=null!=(n=this.graph.getModel().getGeometry(this.state.cell).points)?n[0]:null)?new mxPoint(e.x+(t.x-e.x)/2,e.y+(t.y-e.y)/2):new mxPoint(this.graph.getView().scale*(n.x+this.graph.getView().translate.x+this.state.origin.x),this.graph.getView().scale*(n.y+this.graph.getView().translate.y+this.state.origin.y)),a=(i=this.bends[1].bounds).width,i=i.height;null==this.handleImage&&(i=a=mxConstants.HANDLE_SIZE);var o=new mxRectangle(Math.round(n.x-a/2),Math.round(n.y-i/2),a,i);null==this.handleImage&&"hidden"!=this.labelShape.node.style.visibility&&mxUtils.intersects(o,this.labelShape.bounds)&&(a+=3,i+=3,o=new mxRectangle(Math.round(n.x-a/2),Math.round(n.y-i/2),a,i)),this.bends[1].bounds=o,this.bends[1].redraw()},mxUtils.extend(mxEdgeSegmentHandler,mxEdgeHandler),mxEdgeSegmentHandler.prototype=new mxElbowEdgeHandler,mxEdgeSegmentHandler.prototype.constructor=mxEdgeSegmentHandler,mxEdgeSegmentHandler.prototype.getPreviewPoints=function(e){if(this.isSource||this.isTarget)return mxElbowEdgeHandler.prototype.getPreviewPoints.apply(this,arguments);this.convertPoint(e,!1);var t=this.state.absolutePoints,n=t[0].clone();this.convertPoint(n,!1);for(var a=[],i=1;i<t.length;i++){var o=t[i].clone();this.convertPoint(o,!1),i==this.index&&(n.x==o.x?(n.x=e.x,o.x=e.x):(n.y=e.y,o.y=e.y)),i<t.length-1&&a.push(o),n=o}if(1==a.length){if(n=this.state.view,i=this.state.getVisibleTerminalState(!0),null!=(o=this.state.getVisibleTerminalState(!1))&null!=i){var s=this.state.origin.x,r=this.state.origin.y;mxUtils.contains(o,a[0].x+s,a[0].y+r)?t[1].y==t[2].y?a[0].y=n.getRoutingCenterY(i)-r:a[0].x=n.getRoutingCenterX(i)-s:mxUtils.contains(i,a[0].x+s,a[0].y+r)&&(t[1].y==t[0].y?a[0].y=n.getRoutingCenterY(o)-r:a[0].x=n.getRoutingCenterX(o)-s)}}else 0==a.length&&(a=[e]);return a},mxEdgeSegmentHandler.prototype.createBends=function(){var e=[],t=this.createHandleShape(0);this.initBend(t),t.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE,mxEvent.redirectMouseEvents(t.node,this.graph,this.state),e.push(t),mxClient.IS_TOUCH&&t.node.setAttribute("pointer-events","none");var n=this.state.absolutePoints;if(this.graph.isCellBendable(this.state.cell)){null==this.points&&(this.points=[]);for(var a=0;a<n.length-1;a++)t=this.createVirtualBend(),e.push(t),t.node.style.cursor=0==n[a].x-n[a+1].x?"col-resize":"row-resize",this.points.push(new mxPoint(0,0)),mxClient.IS_TOUCH&&t.node.setAttribute("pointer-events","none")}return t=this.createHandleShape(n.length),this.initBend(t),t.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE,mxEvent.redirectMouseEvents(t.node,this.graph,this.state),e.push(t),mxClient.IS_TOUCH&&t.node.setAttribute("pointer-events","none"),e},mxEdgeSegmentHandler.prototype.redraw=function(){this.refresh(),mxEdgeHandler.prototype.redraw.apply(this,arguments)},mxEdgeSegmentHandler.prototype.refresh=function(){if(null!=this.bends){for(var e=0;e<this.bends.length;e++)null!=this.bends[e]&&(this.bends[e].destroy(),this.bends[e]=null);this.bends=this.createBends()}},mxEdgeSegmentHandler.prototype.redrawInnerBends=function(e,t){if(this.graph.isCellBendable(this.state.cell)){var n=mxConstants.HANDLE_SIZE,a=this.state.absolutePoints;if(null!=a&&1<a.length)for(var i=0;i<this.state.absolutePoints.length-1;i++)if(null!=this.bends[i+1]){e=a[i],t=a[i+1];var o=new mxPoint(e.x+(t.x-e.x)/2,e.y+(t.y-e.y)/2);this.bends[i+1].bounds=new mxRectangle(Math.round(o.x-n/2),Math.round(o.y-n/2),n,n),this.bends[i+1].redraw()}}},mxEdgeSegmentHandler.prototype.changePoints=function(e,t){t=[];var n=this.abspoints;if(1<n.length)for(var a=n[0],i=n[1],o=2;o<n.length;o++){var s=n[o];Math.round(a.x)==Math.round(i.x)&&Math.round(i.x)==Math.round(s.x)||Math.round(a.y)==Math.round(i.y)&&Math.round(i.y)==Math.round(s.y)||(i=(a=i).clone(),this.convertPoint(i,!1),t.push(i)),i=s}mxElbowEdgeHandler.prototype.changePoints.apply(this,arguments)},mxKeyHandler.prototype.graph=null,mxKeyHandler.prototype.target=null,mxKeyHandler.prototype.normalKeys=null,mxKeyHandler.prototype.shiftKeys=null,mxKeyHandler.prototype.controlKeys=null,mxKeyHandler.prototype.controlShiftKeys=null,mxKeyHandler.prototype.enabled=!0,mxKeyHandler.prototype.isEnabled=function(){return this.enabled},mxKeyHandler.prototype.setEnabled=function(e){this.enabled=e},mxKeyHandler.prototype.bindKey=function(e,t){this.normalKeys[e]=t},mxKeyHandler.prototype.bindShiftKey=function(e,t){this.shiftKeys[e]=t},mxKeyHandler.prototype.bindControlKey=function(e,t){this.controlKeys[e]=t},mxKeyHandler.prototype.bindControlShiftKey=function(e,t){this.controlShiftKeys[e]=t},mxKeyHandler.prototype.isControlDown=function(e){return mxEvent.isControlDown(e)},mxKeyHandler.prototype.getFunction=function(e){return null!=e?this.isControlDown(e)?mxEvent.isShiftDown(e)?this.controlShiftKeys[e.keyCode]:this.controlKeys[e.keyCode]:mxEvent.isShiftDown(e)?this.shiftKeys[e.keyCode]:this.normalKeys[e.keyCode]:null},mxKeyHandler.prototype.isGraphEvent=function(e){if((e=mxEvent.getSource(e))==this.target||e.parentNode==this.target||null!=this.graph.cellEditor&&e==this.graph.cellEditor.textarea)return!0;for(;null!=e;){if(e==this.graph.container)return!0;e=e.parentNode}return!1},mxKeyHandler.prototype.keyDown=function(e){if(this.graph.isEnabled()&&!mxEvent.isConsumed(e)&&this.isGraphEvent(e)&&this.isEnabled())if(27==e.keyCode)this.escape(e);else if(!this.graph.isEditing()){var t=this.getFunction(e);null!=t&&(t(e),mxEvent.consume(e))}},mxKeyHandler.prototype.escape=function(e){this.graph.isEscapeEnabled()&&this.graph.escape(e)},mxKeyHandler.prototype.destroy=function(){this.target=null},mxTooltipHandler.prototype.zIndex=10005,mxTooltipHandler.prototype.graph=null,mxTooltipHandler.prototype.delay=null,mxTooltipHandler.prototype.hideOnHover=!1,mxTooltipHandler.prototype.enabled=!0,mxTooltipHandler.prototype.isEnabled=function(){return this.enabled},mxTooltipHandler.prototype.setEnabled=function(e){this.enabled=e},mxTooltipHandler.prototype.isHideOnHover=function(){return this.hideOnHover},mxTooltipHandler.prototype.setHideOnHover=function(e){this.hideOnHover=e},mxTooltipHandler.prototype.init=function(){null!=document.body&&(this.div=document.createElement("div"),this.div.className="mxTooltip",this.div.style.visibility="hidden",this.div.style.zIndex=this.zIndex,document.body.appendChild(this.div),mxEvent.addListener(this.div,"mousedown",mxUtils.bind(this,function(e){this.hideTooltip()})))},mxTooltipHandler.prototype.mouseDown=function(e,t){this.reset(t,!1),this.hideTooltip()},mxTooltipHandler.prototype.mouseMove=function(e,t){t.getX()==this.lastX&&t.getY()==this.lastY||(this.reset(t,!0),(this.isHideOnHover()||t.getState()!=this.state||t.getSource()!=this.node&&(!this.stateSource||null!=t.getState()&&this.stateSource==(t.isSource(t.getState().shape)||!t.isSource(t.getState().text))))&&this.hideTooltip()),this.lastX=t.getX(),this.lastY=t.getY()},mxTooltipHandler.prototype.mouseUp=function(e,t){this.reset(t,!0),this.hideTooltip()},mxTooltipHandler.prototype.resetTimer=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null)},mxTooltipHandler.prototype.reset=function(e,t){if(this.resetTimer(),t&&this.isEnabled()&&null!=e.getState()&&(null==this.div||"hidden"==this.div.style.visibility)){var n=e.getState(),a=e.getSource(),i=e.getX(),o=e.getY(),s=e.isSource(n.shape)||e.isSource(n.text);this.thread=window.setTimeout(mxUtils.bind(this,function(){if(!this.graph.isEditing()&&!this.graph.panningHandler.isMenuShowing()){var e=this.graph.getTooltip(n,a,i,o);this.show(e,i,o),this.state=n,this.node=a,this.stateSource=s}}),this.delay)}},mxTooltipHandler.prototype.hide=function(){this.resetTimer(),this.hideTooltip()},mxTooltipHandler.prototype.hideTooltip=function(){null!=this.div&&(this.div.style.visibility="hidden")},mxTooltipHandler.prototype.show=function(e,t,n){if(null!=e&&0<e.length){null==this.div&&this.init();var a=mxUtils.getScrollOrigin();this.div.style.left=t+a.x+"px",this.div.style.top=n+mxConstants.TOOLTIP_VERTICAL_OFFSET+a.y+"px",mxUtils.isNode(e)?(this.div.innerHTML="",this.div.appendChild(e)):this.div.innerHTML=e.replace(/\n/g,"<br>"),this.div.style.visibility="",mxUtils.fit(this.div)}},mxTooltipHandler.prototype.destroy=function(){this.graph.removeMouseListener(this),mxEvent.release(this.div),null!=this.div&&null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.div=null},mxUtils.extend(mxCellTracker,mxCellMarker),mxCellTracker.prototype.mouseDown=function(e,t){},mxCellTracker.prototype.mouseMove=function(e,t){this.isEnabled()&&this.process(t)},mxCellTracker.prototype.mouseUp=function(e,t){this.reset()},mxCellTracker.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),mxCellMarker.prototype.destroy.apply(this))},mxCellHighlight.prototype.keepOnTop=!1,mxCellHighlight.prototype.graph=!0,mxCellHighlight.prototype.state=null,mxCellHighlight.prototype.spacing=2,mxCellHighlight.prototype.resetHandler=null,mxCellHighlight.prototype.setHighlightColor=function(e){this.highlightColor=e,null!=this.shape&&(this.shape.stroke=e)},mxCellHighlight.prototype.drawHighlight=function(){this.shape=this.createShape(),this.repaint(),!this.keepOnTop&&this.shape.node.parentNode.firstChild!=this.shape.node&&this.shape.node.parentNode.insertBefore(this.shape.node,this.shape.node.parentNode.firstChild)},mxCellHighlight.prototype.createShape=function(){var e=null;return(e=this.graph.model.isEdge(this.state.cell)?new mxPolyline(this.state.absolutePoints,this.highlightColor,this.strokeWidth):new mxRectangleShape(new mxRectangle,null,this.highlightColor,this.strokeWidth)).dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,e.init(this.graph.getView().getOverlayPane()),mxEvent.redirectMouseEvents(e.node,this.graph,this.state),e.svgStrokeTolerance=0,e.pointerEvents=!1,e.isDashed=this.dashed,e},mxCellHighlight.prototype.repaint=function(){if(null!=this.state&&null!=this.shape){var e=0;this.graph.model.isEdge(this.state.cell)?this.shape.points=this.state.absolutePoints:(this.shape.bounds=new mxRectangle(this.state.x-this.spacing,this.state.y-this.spacing,this.state.width+2*this.spacing,this.state.height+2*this.spacing),e=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0")),null!=this.state.shape&&this.shape.setCursor(this.state.shape.getCursor()),0!=e&&(this.shape.rotation=e),this.shape.redraw()}},mxCellHighlight.prototype.hide=function(){this.highlight(null)},mxCellHighlight.prototype.highlight=function(e){this.state!=e&&(null!=this.shape&&(this.shape.destroy(),this.shape=null),this.state=e,null!=this.state&&this.drawHighlight())},mxCellHighlight.prototype.destroy=function(){this.graph.getView().removeListener(this.repaintHandler),this.graph.getModel().removeListener(this.repaintHandler),this.graph.getView().removeListener(this.resetHandler),this.graph.getModel().removeListener(this.resetHandler),null!=this.shape&&(this.shape.destroy(),this.shape=null)},mxDefaultKeyHandler.prototype.editor=null,mxDefaultKeyHandler.prototype.handler=null,mxDefaultKeyHandler.prototype.bindAction=function(e,t,n){var a=mxUtils.bind(this,function(){this.editor.execute(t)});n?this.handler.bindControlKey(e,a):this.handler.bindKey(e,a)},mxDefaultKeyHandler.prototype.destroy=function(){this.handler.destroy(),this.handler=null},mxDefaultPopupMenu.prototype.imageBasePath=null,mxDefaultPopupMenu.prototype.config=null,mxDefaultPopupMenu.prototype.createMenu=function(e,t,n,a){if(null!=this.config){var i=this.createConditions(e,n,a);this.addItems(e,t,n,a,i,this.config.firstChild,null)}},mxDefaultPopupMenu.prototype.addItems=function(e,t,n,a,i,o,s){for(var r=!1;null!=o;){if("add"==o.nodeName){if(null==(l=o.getAttribute("if"))||i[l]){var l=o.getAttribute("as"),d=(l=mxResources.get(l)||l,mxUtils.eval(mxUtils.getTextContent(o))),c=o.getAttribute("action"),m=o.getAttribute("icon"),u=o.getAttribute("iconCls");r&&(t.addSeparator(s),r=!1),null!=m&&this.imageBasePath&&(m=this.imageBasePath+m),l=this.addAction(t,e,l,m,d,c,n,s,u),this.addItems(e,t,n,a,i,o.firstChild,l)}}else"separator"==o.nodeName&&(r=!0);o=o.nextSibling}},mxDefaultPopupMenu.prototype.addAction=function(e,t,n,a,i,o,s,r,l){return e.addItem(n,a,function(e){"function"==typeof i&&i.call(t,t,s,e),null!=o&&t.execute(o,s,e)},r,l)},mxDefaultPopupMenu.prototype.createConditions=function(e,t,n){var a=e.graph.getModel(),i=a.getChildCount(t),o=[];for(o.nocell=null==t,o.ncells=1<e.graph.getSelectionCount(),o.notRoot=a.getRoot()!=a.getParent(e.graph.getDefaultParent()),o.cell=null!=t,a=null!=t&&1==e.graph.getSelectionCount(),o.nonEmpty=a&&0<i,o.expandable=a&&e.graph.isCellFoldable(t,!1),o.collapsable=a&&e.graph.isCellFoldable(t,!0),o.validRoot=a&&e.graph.isValidRoot(t),o.emptyValidRoot=o.validRoot&&0==i,o.swimlane=a&&e.graph.isSwimlane(t),i=this.config.getElementsByTagName("condition"),a=0;a<i.length;a++){var s=mxUtils.eval(mxUtils.getTextContent(i[a])),r=i[a].getAttribute("name");null!=r&&"function"==typeof s&&(o[r]=s(e,t,n))}return o},mxDefaultToolbar.prototype.editor=null,mxDefaultToolbar.prototype.toolbar=null,mxDefaultToolbar.prototype.resetHandler=null,mxDefaultToolbar.prototype.spacing=4,mxDefaultToolbar.prototype.connectOnDrop=!1,mxDefaultToolbar.prototype.init=function(e){null!=e&&(this.toolbar=new mxToolbar(e),this.toolbar.addListener(mxEvent.SELECT,mxUtils.bind(this,function(e,t){var n=t.getProperty("function");this.editor.insertFunction=null!=n?mxUtils.bind(this,function(){n.apply(this,arguments),this.toolbar.resetMode()}):null})),this.resetHandler=mxUtils.bind(this,function(){null!=this.toolbar&&this.toolbar.resetMode(!0)}),this.editor.graph.addListener(mxEvent.DOUBLE_CLICK,this.resetHandler),this.editor.addListener(mxEvent.ESCAPE,this.resetHandler))},mxDefaultToolbar.prototype.addItem=function(e,t,n,a){var i=mxUtils.bind(this,function(){null!=n&&0<n.length&&this.editor.execute(n)});return this.toolbar.addItem(e,t,i,a)},mxDefaultToolbar.prototype.addSeparator=function(e){e=e||mxClient.imageBasePath+"/separator.gif",this.toolbar.addSeparator(e)},mxDefaultToolbar.prototype.addCombo=function(){return this.toolbar.addCombo()},mxDefaultToolbar.prototype.addActionCombo=function(e){return this.toolbar.addActionCombo(e)},mxDefaultToolbar.prototype.addActionOption=function(e,t,n){var a=mxUtils.bind(this,function(){this.editor.execute(n)});this.addOption(e,t,a)},mxDefaultToolbar.prototype.addOption=function(e,t,n){return this.toolbar.addOption(e,t,n)},mxDefaultToolbar.prototype.addMode=function(e,t,n,a,i){var o=mxUtils.bind(this,function(){this.editor.setMode(n),null!=i&&i(this.editor)});return this.toolbar.addSwitchMode(e,t,o,a)},mxDefaultToolbar.prototype.addPrototype=function(e,t,n,a,i,o){var s=function(){return"function"==typeof n?n():null!=n?n.clone():null},r=mxUtils.bind(this,function(e,t){"function"==typeof i?i(this.editor,s(),e,t):this.drop(s(),e,t),this.toolbar.resetMode(),mxEvent.consume(e)});return e=this.toolbar.addMode(e,t,r,a,null,o),this.installDropHandler(e,function(e,t,n){r(t,n)}),e},mxDefaultToolbar.prototype.drop=function(e,t,n){var a=this.editor.graph,i=a.getModel();if(null!=n&&!i.isEdge(n)&&this.connectOnDrop&&a.isCellConnectable(n))this.connect(e,t,n);else{for(;null!=n&&!a.isValidDropTarget(n,[e],t);)n=i.getParent(n);this.insert(e,t,n)}},mxDefaultToolbar.prototype.insert=function(e,t,n){var a=this.editor.graph;if(a.canImportCell(e)){var i=mxEvent.getClientX(t),o=mxEvent.getClientY(t);i=mxUtils.convertPoint(a.container,i,o);return a.isSplitEnabled()&&a.isSplitTarget(n,[e],t)?a.splitEdge(n,[e],null,i.x,i.y):this.editor.addVertex(n,e,i.x,i.y)}return null},mxDefaultToolbar.prototype.connect=function(e,t,n){var a=(t=this.editor.graph).getModel();if(null!=n&&t.isCellConnectable(e)&&t.isEdgeValid(null,n,e)){var i=null;a.beginUpdate();try{var o=a.getGeometry(n),s=a.getGeometry(e).clone();s.x=o.x+(o.width-s.width)/2,s.y=o.y+(o.height-s.height)/2;var r=this.spacing*t.gridSize,l=20*a.getDirectedEdgeCount(n,!0);this.editor.horizontalFlow?s.x+=(s.width+o.width)/2+r+l:s.y+=(s.height+o.height)/2+r+l,e.setGeometry(s);var d=a.getParent(n);if(t.addCell(e,d),t.constrainChild(e),i=this.editor.createEdge(n,e),null==a.getGeometry(i)){var c=new mxGeometry;c.relative=!0,a.setGeometry(i,c)}t.addEdge(i,d,n,e)}finally{a.endUpdate()}t.setSelectionCells([e,i]),t.scrollCellToVisible(e)}},mxDefaultToolbar.prototype.installDropHandler=function(t,n){var a=document.createElement("img");a.setAttribute("src",t.getAttribute("src"));var i=mxUtils.bind(this,function(e){a.style.width=2*t.offsetWidth+"px",a.style.height=2*t.offsetHeight+"px",mxUtils.makeDraggable(t,this.editor.graph,n,a),mxEvent.removeListener(a,"load",i)});mxClient.IS_IE?i():mxEvent.addListener(a,"load",i)},mxDefaultToolbar.prototype.destroy=function(){null!=this.resetHandler&&(this.editor.graph.removeListener("dblclick",this.resetHandler),this.editor.removeListener("escape",this.resetHandler),this.resetHandler=null),null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null)},mxLoadResources&&mxResources.add(mxClient.basePath+"/resources/editor"),mxEditor.prototype=new mxEventSource,mxEditor.prototype.constructor=mxEditor,mxEditor.prototype.askZoomResource="none"!=mxClient.language?"askZoom":"",mxEditor.prototype.lastSavedResource="none"!=mxClient.language?"lastSaved":"",mxEditor.prototype.currentFileResource="none"!=mxClient.language?"currentFile":"",mxEditor.prototype.propertiesResource="none"!=mxClient.language?"properties":"",mxEditor.prototype.tasksResource="none"!=mxClient.language?"tasks":"",mxEditor.prototype.helpResource="none"!=mxClient.language?"help":"",mxEditor.prototype.outlineResource="none"!=mxClient.language?"outline":"",mxEditor.prototype.outline=null,mxEditor.prototype.graph=null,mxEditor.prototype.graphRenderHint=null,mxEditor.prototype.toolbar=null,mxEditor.prototype.session=null,mxEditor.prototype.status=null,mxEditor.prototype.popupHandler=null,mxEditor.prototype.undoManager=null,mxEditor.prototype.keyHandler=null,mxEditor.prototype.actions=null,mxEditor.prototype.dblClickAction="edit",mxEditor.prototype.swimlaneRequired=!1,mxEditor.prototype.disableContextMenu=!0,mxEditor.prototype.insertFunction=null,mxEditor.prototype.forcedInserting=!1,mxEditor.prototype.templates=null,mxEditor.prototype.defaultEdge=null,mxEditor.prototype.defaultEdgeStyle=null,mxEditor.prototype.defaultGroup=null,mxEditor.prototype.groupBorderSize=null,mxEditor.prototype.filename=null,mxEditor.prototype.linefeed="&#xa;",mxEditor.prototype.postParameterName="xml",mxEditor.prototype.escapePostData=!0,mxEditor.prototype.urlPost=null,mxEditor.prototype.urlImage=null,mxEditor.prototype.urlInit=null,mxEditor.prototype.urlNotify=null,mxEditor.prototype.urlPoll=null,mxEditor.prototype.horizontalFlow=!1,mxEditor.prototype.layoutDiagram=!1,mxEditor.prototype.swimlaneSpacing=0,mxEditor.prototype.maintainSwimlanes=!1,mxEditor.prototype.layoutSwimlanes=!1,mxEditor.prototype.cycleAttributeValues=null,mxEditor.prototype.cycleAttributeIndex=0,mxEditor.prototype.cycleAttributeName="fillColor",mxEditor.prototype.tasks=null,mxEditor.prototype.tasksWindowImage=null,mxEditor.prototype.tasksTop=20,mxEditor.prototype.help=null,mxEditor.prototype.helpWindowImage=null,mxEditor.prototype.urlHelp=null,mxEditor.prototype.helpWidth=300,mxEditor.prototype.helpHeight=260,mxEditor.prototype.propertiesWidth=240,mxEditor.prototype.propertiesHeight=null,mxEditor.prototype.movePropertiesDialog=!1,mxEditor.prototype.validating=!1,mxEditor.prototype.modified=!1,mxEditor.prototype.isModified=function(){return this.modified},mxEditor.prototype.setModified=function(e){this.modified=e},mxEditor.prototype.addActions=function(){this.addAction("save",function(e){e.save()}),this.addAction("print",function(e){new mxPrintPreview(e.graph,1).open()}),this.addAction("show",function(e){mxUtils.show(e.graph,null,10,10)}),this.addAction("exportImage",function(e){var t=e.getUrlImage();if(null==t||mxClient.IS_LOCAL)e.execute("show");else{var n=mxUtils.getViewXml(e.graph,1);n=mxUtils.getXml(n,"\n");mxUtils.submit(t,e.postParameterName+"="+encodeURIComponent(n),document,"_blank")}}),this.addAction("refresh",function(e){e.graph.refresh()}),this.addAction("cut",function(e){e.graph.isEnabled()&&mxClipboard.cut(e.graph)}),this.addAction("copy",function(e){e.graph.isEnabled()&&mxClipboard.copy(e.graph)}),this.addAction("paste",function(e){e.graph.isEnabled()&&mxClipboard.paste(e.graph)}),this.addAction("delete",function(e){e.graph.isEnabled()&&e.graph.removeCells()}),this.addAction("group",function(e){e.graph.isEnabled()&&e.graph.setSelectionCell(e.groupCells())}),this.addAction("ungroup",function(e){e.graph.isEnabled()&&e.graph.setSelectionCells(e.graph.ungroupCells())}),this.addAction("removeFromParent",function(e){e.graph.isEnabled()&&e.graph.removeCellsFromParent()}),this.addAction("undo",function(e){e.graph.isEnabled()&&e.undo()}),this.addAction("redo",function(e){e.graph.isEnabled()&&e.redo()}),this.addAction("zoomIn",function(e){e.graph.zoomIn()}),this.addAction("zoomOut",function(e){e.graph.zoomOut()}),this.addAction("actualSize",function(e){e.graph.zoomActual()}),this.addAction("fit",function(e){e.graph.fit()}),this.addAction("showProperties",function(e,t){e.showProperties(t)}),this.addAction("selectAll",function(e){e.graph.isEnabled()&&e.graph.selectAll()}),this.addAction("selectNone",function(e){e.graph.isEnabled()&&e.graph.clearSelection()}),this.addAction("selectVertices",function(e){e.graph.isEnabled()&&e.graph.selectVertices()}),this.addAction("selectEdges",function(e){e.graph.isEnabled()&&e.graph.selectEdges()}),this.addAction("edit",function(e,t){e.graph.isEnabled()&&e.graph.isCellEditable(t)&&e.graph.startEditingAtCell(t)}),this.addAction("toBack",function(e,t){e.graph.isEnabled()&&e.graph.orderCells(!0)}),this.addAction("toFront",function(e,t){e.graph.isEnabled()&&e.graph.orderCells(!1)}),this.addAction("enterGroup",function(e,t){e.graph.enterGroup(t)}),this.addAction("exitGroup",function(e){e.graph.exitGroup()}),this.addAction("home",function(e){e.graph.home()}),this.addAction("selectPrevious",function(e){e.graph.isEnabled()&&e.graph.selectPreviousCell()}),this.addAction("selectNext",function(e){e.graph.isEnabled()&&e.graph.selectNextCell()}),this.addAction("selectParent",function(e){e.graph.isEnabled()&&e.graph.selectParentCell()}),this.addAction("selectChild",function(e){e.graph.isEnabled()&&e.graph.selectChildCell()}),this.addAction("collapse",function(e){e.graph.isEnabled()&&e.graph.foldCells(!0)}),this.addAction("collapseAll",function(e){if(e.graph.isEnabled()){var t=e.graph.getChildVertices();e.graph.foldCells(!0,!1,t)}}),this.addAction("expand",function(e){e.graph.isEnabled()&&e.graph.foldCells(!1)}),this.addAction("expandAll",function(e){if(e.graph.isEnabled()){var t=e.graph.getChildVertices();e.graph.foldCells(!1,!1,t)}}),this.addAction("bold",function(e){e.graph.isEnabled()&&e.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_BOLD)}),this.addAction("italic",function(e){e.graph.isEnabled()&&e.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_ITALIC)}),this.addAction("underline",function(e){e.graph.isEnabled()&&e.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_UNDERLINE)}),this.addAction("shadow",function(e){e.graph.isEnabled()&&e.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_SHADOW)}),this.addAction("alignCellsLeft",function(e){e.graph.isEnabled()&&e.graph.alignCells(mxConstants.ALIGN_LEFT)}),this.addAction("alignCellsCenter",function(e){e.graph.isEnabled()&&e.graph.alignCells(mxConstants.ALIGN_CENTER)}),this.addAction("alignCellsRight",function(e){e.graph.isEnabled()&&e.graph.alignCells(mxConstants.ALIGN_RIGHT)}),this.addAction("alignCellsTop",function(e){e.graph.isEnabled()&&e.graph.alignCells(mxConstants.ALIGN_TOP)}),this.addAction("alignCellsMiddle",function(e){e.graph.isEnabled()&&e.graph.alignCells(mxConstants.ALIGN_MIDDLE)}),this.addAction("alignCellsBottom",function(e){e.graph.isEnabled()&&e.graph.alignCells(mxConstants.ALIGN_BOTTOM)}),this.addAction("alignFontLeft",function(e){e.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT)}),this.addAction("alignFontCenter",function(e){e.graph.isEnabled()&&e.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER)}),this.addAction("alignFontRight",function(e){e.graph.isEnabled()&&e.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_RIGHT)}),this.addAction("alignFontTop",function(e){e.graph.isEnabled()&&e.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_TOP)}),this.addAction("alignFontMiddle",function(e){e.graph.isEnabled()&&e.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)}),this.addAction("alignFontBottom",function(e){e.graph.isEnabled()&&e.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_BOTTOM)}),this.addAction("zoom",function(e){var t=100*e.graph.getView().scale;t=parseFloat(mxUtils.prompt(mxResources.get(e.askZoomResource)||e.askZoomResource,t))/100;isNaN(t)||e.graph.getView().setScale(t)}),this.addAction("toggleTasks",function(e){null!=e.tasks?e.tasks.setVisible(!e.tasks.isVisible()):e.showTasks()}),this.addAction("toggleHelp",function(e){null!=e.help?e.help.setVisible(!e.help.isVisible()):e.showHelp()}),this.addAction("toggleOutline",function(e){null==e.outline?e.showOutline():e.outline.setVisible(!e.outline.isVisible())}),this.addAction("toggleConsole",function(e){mxLog.setVisible(!mxLog.isVisible())})},mxEditor.prototype.createSession=function(){var e=mxUtils.bind(this,function(e){this.fireEvent(new mxEventObject(mxEvent.SESSION,"session",e))});return this.connect(this.urlInit,this.urlPoll,this.urlNotify,e)},mxEditor.prototype.configure=function(e){null!=e&&(new mxCodec(e.ownerDocument).decode(e,this),this.resetHistory())},mxEditor.prototype.resetFirstTime=function(){document.cookie="mxgraph=seen; expires=Fri, 27 Jul 2001 02:47:11 UTC; path=/"},mxEditor.prototype.resetHistory=function(){this.lastSnapshot=(new Date).getTime(),this.undoManager.clear(),this.ignoredChanges=0,this.setModified(!1)},mxEditor.prototype.addAction=function(e,t){this.actions[e]=t},mxEditor.prototype.execute=function(t,e,n){var a=this.actions[t];if(null!=a)try{var i=arguments;i[0]=this,a.apply(this,i)}catch(e){throw mxUtils.error("Cannot execute "+t+": "+e.message,280,!0),e}else mxUtils.error("Cannot find action "+t,280,!0)},mxEditor.prototype.addTemplate=function(e,t){this.templates[e]=t},mxEditor.prototype.getTemplate=function(e){return this.templates[e]},mxEditor.prototype.createGraph=function(){var e=new mxGraph(null,null,this.graphRenderHint);return e.setTooltips(!0),e.setPanning(!0),this.installDblClickHandler(e),this.installUndoHandler(e),this.installDrillHandler(e),this.installChangeHandler(e),this.installInsertHandler(e),e.panningHandler.factoryMethod=mxUtils.bind(this,function(e,t,n){return this.createPopupMenu(e,t,n)}),e.connectionHandler.factoryMethod=mxUtils.bind(this,function(e,t){return this.createEdge(e,t)}),this.createSwimlaneManager(e),this.createLayoutManager(e),e},mxEditor.prototype.createSwimlaneManager=function(e){return(e=new mxSwimlaneManager(e,!1)).isHorizontal=mxUtils.bind(this,function(){return this.horizontalFlow}),e.isEnabled=mxUtils.bind(this,function(){return this.maintainSwimlanes}),e},mxEditor.prototype.createLayoutManager=function(a){var e=new mxLayoutManager(a),i=this;return e.getLayout=function(e){var t=null,n=i.graph.getModel();return null!=n.getParent(e)&&(i.layoutSwimlanes&&a.isSwimlane(e)?(null==i.swimlaneLayout&&(i.swimlaneLayout=i.createSwimlaneLayout()),t=i.swimlaneLayout):i.layoutDiagram&&(a.isValidRoot(e)||null==n.getParent(n.getParent(e)))&&(null==i.diagramLayout&&(i.diagramLayout=i.createDiagramLayout()),t=i.diagramLayout)),t},e},mxEditor.prototype.setGraphContainer=function(e){null==this.graph.container&&(this.graph.init(e),this.rubberband=new mxRubberband(this.graph),this.disableContextMenu&&mxEvent.disableContextMenu(e),mxClient.IS_QUIRKS&&new mxDivResizer(e))},mxEditor.prototype.installDblClickHandler=function(a){a.addListener(mxEvent.DOUBLE_CLICK,mxUtils.bind(this,function(e,t){var n=t.getProperty("cell");null!=n&&a.isEnabled()&&null!=this.dblClickAction&&(this.execute(this.dblClickAction,n),t.consume())}))},mxEditor.prototype.installUndoHandler=function(a){var e=mxUtils.bind(this,function(e,t){var n=t.getProperty("edit");this.undoManager.undoableEditHappened(n)});a.getModel().addListener(mxEvent.UNDO,e),a.getView().addListener(mxEvent.UNDO,e),e=function(e,t){var n=t.getProperty("edit").changes;a.setSelectionCells(a.getSelectionCellsForChanges(n))},this.undoManager.addListener(mxEvent.UNDO,e),this.undoManager.addListener(mxEvent.REDO,e)},mxEditor.prototype.installDrillHandler=function(e){var t=mxUtils.bind(this,function(e){this.fireEvent(new mxEventObject(mxEvent.ROOT))});e.getView().addListener(mxEvent.DOWN,t),e.getView().addListener(mxEvent.UP,t)},mxEditor.prototype.installChangeHandler=function(o){var e=mxUtils.bind(this,function(e,t){this.setModified(!0),1==this.validating&&o.validateGraph();for(var n=t.getProperty("edit").changes,a=0;a<n.length;a++){var i=n[a];if(i instanceof mxRootChange||i instanceof mxValueChange&&i.cell==this.graph.model.root||i instanceof mxCellAttributeChange&&i.cell==this.graph.model.root){this.fireEvent(new mxEventObject(mxEvent.ROOT));break}}});o.getModel().addListener(mxEvent.CHANGE,e)},mxEditor.prototype.installInsertHandler=function(e){var n=this;e.addMouseListener({mouseDown:function(e,t){null==n.insertFunction||t.isPopupTrigger()||!n.forcedInserting&&null!=t.getState()||(n.graph.clearSelection(),n.insertFunction(t.getEvent(),t.getCell()),this.isActive=!0,t.consume())},mouseMove:function(e,t){this.isActive&&t.consume()},mouseUp:function(e,t){this.isActive&&(this.isActive=!1,t.consume())}})},mxEditor.prototype.createDiagramLayout=function(){var e=this.graph.gridSize,t=new mxStackLayout(this.graph,!this.horizontalFlow,this.swimlaneSpacing,2*e,2*e);return t.isVertexIgnored=function(e){return!t.graph.isSwimlane(e)},t},mxEditor.prototype.createSwimlaneLayout=function(){return new mxCompactTreeLayout(this.graph,this.horizontalFlow)},mxEditor.prototype.createToolbar=function(){return new mxDefaultToolbar(null,this)},mxEditor.prototype.setToolbarContainer=function(e){this.toolbar.init(e),mxClient.IS_QUIRKS&&new mxDivResizer(e)},mxEditor.prototype.setStatusContainer=function(e){null==this.status&&(this.status=e,this.addListener(mxEvent.SAVE,mxUtils.bind(this,function(){var e=(new Date).toLocaleString();this.setStatus((mxResources.get(this.lastSavedResource)||this.lastSavedResource)+": "+e)})),this.addListener(mxEvent.OPEN,mxUtils.bind(this,function(){this.setStatus((mxResources.get(this.currentFileResource)||this.currentFileResource)+": "+this.filename)})),mxClient.IS_QUIRKS&&new mxDivResizer(e))},mxEditor.prototype.setStatus=function(e){null!=this.status&&null!=e&&(this.status.innerHTML=e)},mxEditor.prototype.setTitleContainer=function(t){this.addListener(mxEvent.ROOT,mxUtils.bind(this,function(e){t.innerHTML=this.getTitle()})),mxClient.IS_QUIRKS&&new mxDivResizer(t)},mxEditor.prototype.treeLayout=function(e,t){null!=e&&new mxCompactTreeLayout(this.graph,t).execute(e)},mxEditor.prototype.getTitle=function(){for(var e="",t=this.graph,n=t.getCurrentRoot();null!=n&&null!=t.getModel().getParent(t.getModel().getParent(n));)t.isValidRoot(n)&&(e=" > "+t.convertValueToString(n)+e),n=t.getModel().getParent(n);return this.getRootTitle()+e},mxEditor.prototype.getRootTitle=function(){var e=this.graph.getModel().getRoot();return this.graph.convertValueToString(e)},mxEditor.prototype.undo=function(){this.undoManager.undo()},mxEditor.prototype.redo=function(){this.undoManager.redo()},mxEditor.prototype.groupCells=function(){var e=null!=this.groupBorderSize?this.groupBorderSize:this.graph.gridSize;return this.graph.groupCells(this.createGroup(),e)},mxEditor.prototype.createGroup=function(){return this.graph.getModel().cloneCell(this.defaultGroup)},mxEditor.prototype.open=function(e){if(null!=e){var t=mxUtils.load(e).getXml();this.readGraphModel(t.documentElement),this.filename=e,this.fireEvent(new mxEventObject(mxEvent.OPEN,"filename",e))}},mxEditor.prototype.readGraphModel=function(e){new mxCodec(e.ownerDocument).decode(e,this.graph.getModel()),this.resetHistory()},mxEditor.prototype.save=function(e,t){if(null!=(e=e||this.getUrlPost())&&0<e.length){var n=this.writeGraphModel(t);this.postDiagram(e,n),this.setModified(!1)}this.fireEvent(new mxEventObject(mxEvent.SAVE,"url",e))},mxEditor.prototype.postDiagram=function(t,n){this.escapePostData&&(n=encodeURIComponent(n)),mxUtils.post(t,this.postParameterName+"="+n,mxUtils.bind(this,function(e){this.fireEvent(new mxEventObject(mxEvent.POST,"request",e,"url",t,"data",n))}))},mxEditor.prototype.writeGraphModel=function(e){e=null!=e?e:this.linefeed;var t=(new mxCodec).encode(this.graph.getModel());return mxUtils.getXml(t,e)},mxEditor.prototype.getUrlPost=function(){return this.urlPost},mxEditor.prototype.getUrlImage=function(){return this.urlImage},mxEditor.prototype.connect=function(e,t,n,a){var i=null;return mxClient.IS_LOCAL||((i=new mxSession(this.graph.getModel(),e,t,n)).addListener(mxEvent.RECEIVE,mxUtils.bind(this,function(e,t){null!=t.getProperty("node").getAttribute("namespace")&&this.resetHistory()})),i.addListener(mxEvent.DISCONNECT,a),i.addListener(mxEvent.CONNECT,a),i.addListener(mxEvent.NOTIFY,a),i.addListener(mxEvent.GET,a),i.start()),i},mxEditor.prototype.swapStyles=function(e,t){var n=this.graph.getStylesheet().styles[t];this.graph.getView().getStylesheet().putCellStyle(t,this.graph.getStylesheet().styles[e]),this.graph.getStylesheet().putCellStyle(e,n),this.graph.refresh()},mxEditor.prototype.showProperties=function(e){if(null==(e=e||this.graph.getSelectionCell())&&(null==(e=this.graph.getCurrentRoot())&&(e=this.graph.getModel().getRoot())),null!=e){this.graph.stopEditing(!0);var t=(n=mxUtils.getOffset(this.graph.container)).x+10,n=n.y;if(null==this.properties||this.movePropertiesDialog){var a=this.graph.getCellBounds(e);null!=a&&(t+=a.x+Math.min(200,a.width),n+=a.y)}else t=this.properties.getX(),n=this.properties.getY();this.hideProperties(),null!=(e=this.createProperties(e))&&(this.properties=new mxWindow(mxResources.get(this.propertiesResource)||this.propertiesResource,e,t,n,this.propertiesWidth,this.propertiesHeight,!1),this.properties.setVisible(!0))}},mxEditor.prototype.isPropertiesVisible=function(){return null!=this.properties},mxEditor.prototype.createProperties=function(n){var a=this.graph.getModel(),e=a.getValue(n);if(mxUtils.isNode(e)){var t=new mxForm("properties");t.addText("ID",n.getId()).setAttribute("readonly","true");var i=null,o=null,s=null,r=null,l=null;a.isVertex(n)&&(null!=(i=a.getGeometry(n))&&(o=t.addText("top",i.y),s=t.addText("left",i.x),r=t.addText("width",i.width),l=t.addText("height",i.height)));var d=a.getStyle(n),c=t.addText("Style",d||""),m=e.attributes,u=[];for(e=0;e<m.length;e++)u[e]=t.addTextarea(m[e].nodeName,m[e].nodeValue,"label"==m[e].nodeName?4:2);return e=mxUtils.bind(this,function(){this.hideProperties(),a.beginUpdate();try{null!=i&&((i=i.clone()).x=parseFloat(s.value),i.y=parseFloat(o.value),i.width=parseFloat(r.value),i.height=parseFloat(l.value),a.setGeometry(n,i)),0<c.value.length?a.setStyle(n,c.value):a.setStyle(n,null);for(var e=0;e<m.length;e++){var t=new mxCellAttributeChange(n,m[e].nodeName,u[e].value);a.execute(t)}this.graph.isAutoSizeCell(n)&&this.graph.updateCellSize(n)}finally{a.endUpdate()}}),d=mxUtils.bind(this,function(){this.hideProperties()}),t.addButtons(e,d),t.table}return null},mxEditor.prototype.hideProperties=function(){null!=this.properties&&(this.properties.destroy(),this.properties=null)},mxEditor.prototype.showTasks=function(){if(null==this.tasks){var t=document.createElement("div");t.style.padding="4px",t.style.paddingLeft="20px";var e=document.body.clientWidth;(e=new mxWindow(mxResources.get(this.tasksResource)||this.tasksResource,t,e-220,this.tasksTop,200)).setClosable(!0),e.destroyOnClose=!1;var n=mxUtils.bind(this,function(e){mxEvent.release(t),t.innerHTML="",this.createTasks(t)});this.graph.getModel().addListener(mxEvent.CHANGE,n),this.graph.getSelectionModel().addListener(mxEvent.CHANGE,n),this.graph.addListener(mxEvent.ROOT,n),null!=this.tasksWindowImage&&e.setImage(this.tasksWindowImage),this.tasks=e,this.createTasks(t)}this.tasks.setVisible(!0)},mxEditor.prototype.refreshTasks=function(e){null!=this.tasks&&(e=this.tasks.content,mxEvent.release(e),e.innerHTML="",this.createTasks(e))},mxEditor.prototype.createTasks=function(e){},mxEditor.prototype.showHelp=function(e){if(null==this.help){var t=document.createElement("iframe");t.setAttribute("src",mxResources.get("urlHelp")||this.urlHelp),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("frameBorder","0"),t.style.backgroundColor="white",e=document.body.clientWidth;var n=document.body.clientHeight||document.documentElement.clientHeight,a=new mxWindow(mxResources.get(this.helpResource)||this.helpResource,t,(e-this.helpWidth)/2,(n-this.helpHeight)/3,this.helpWidth,this.helpHeight);a.setMaximizable(!0),a.setClosable(!0),a.destroyOnClose=!1,a.setResizable(!0),null!=this.helpWindowImage&&a.setImage(this.helpWindowImage),mxClient.IS_NS&&(e=function(e){t.setAttribute("height",a.div.offsetHeight-26+"px")},a.addListener(mxEvent.RESIZE_END,e),a.addListener(mxEvent.MAXIMIZE,e),a.addListener(mxEvent.NORMALIZE,e),a.addListener(mxEvent.SHOW,e)),this.help=a}this.help.setVisible(!0)},mxEditor.prototype.showOutline=function(){if(null==this.outline){var e=document.createElement("div");e.style.overflow="hidden",e.style.width="100%",e.style.height="100%",e.style.background="white",e.style.cursor="move";var t=new mxWindow(mxResources.get(this.outlineResource)||this.outlineResource,e,600,480,200,200,!1),n=new mxOutline(this.graph,e);t.setClosable(!0),t.setResizable(!0),t.destroyOnClose=!1,t.addListener(mxEvent.RESIZE_END,function(){n.update()}),this.outline=t,this.outline.outline=n}this.outline.setVisible(!0),this.outline.outline.update(!0)},mxEditor.prototype.setMode=function(e){"select"==e?(this.graph.panningHandler.useLeftButtonForPanning=!1,this.graph.setConnectable(!1)):"connect"==e?(this.graph.panningHandler.useLeftButtonForPanning=!1,this.graph.setConnectable(!0)):"pan"==e&&(this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.setConnectable(!1))},mxEditor.prototype.createPopupMenu=function(e,t,n){this.popupHandler.createMenu(this,e,t,n)},mxEditor.prototype.createEdge=function(e,t){var n=null;if(null!=this.defaultEdge)n=this.graph.getModel().cloneCell(this.defaultEdge);else{(n=new mxCell("")).setEdge(!0);var a=new mxGeometry;a.relative=!0,n.setGeometry(a)}return null!=(a=this.getEdgeStyle())&&n.setStyle(a),n},mxEditor.prototype.getEdgeStyle=function(){return this.defaultEdgeStyle},mxEditor.prototype.consumeCycleAttribute=function(e){return null!=this.cycleAttributeValues&&0<this.cycleAttributeValues.length&&this.graph.isSwimlane(e)?this.cycleAttributeValues[this.cycleAttributeIndex++%this.cycleAttributeValues.length]:null},mxEditor.prototype.cycleAttribute=function(e){if(null!=this.cycleAttributeName){var t=this.consumeCycleAttribute(e);null!=t&&e.setStyle(e.getStyle()+";"+this.cycleAttributeName+"="+t)}},mxEditor.prototype.addVertex=function(e,t,n,a){for(var i=this.graph.getModel();null!=e&&!this.graph.isValidDropTarget(e);)e=i.getParent(e);e=null!=e?e:this.graph.getSwimlaneAt(n,a);var o=this.graph.getView().scale,s=i.getGeometry(t),r=i.getGeometry(e);if(this.graph.isSwimlane(t)&&!this.graph.swimlaneNesting)e=null;else{if(null==e&&this.swimlaneRequired)return null;if(null!=e&&null!=r){var l=this.graph.getView().getState(e);if(null!=l){if(n-=l.origin.x*o,a-=l.origin.y*o,this.graph.isConstrainedMoving){r=s.width;var d=s.height,c=l.x+l.width;c<n+r&&(n-=n+r-c),(c=l.y+l.height)<a+d&&(a-=a+d-c)}}else null!=r&&(n-=r.x*o,a-=r.y*o)}}(s=s.clone()).x=this.graph.snap(n/o-this.graph.getView().translate.x-this.graph.gridSize/2),s.y=this.graph.snap(a/o-this.graph.getView().translate.y-this.graph.gridSize/2),t.setGeometry(s),null==e&&(e=this.graph.getDefaultParent()),this.cycleAttribute(t),this.fireEvent(new mxEventObject(mxEvent.BEFORE_ADD_VERTEX,"vertex",t,"parent",e)),i.beginUpdate();try{null!=(t=this.graph.addCell(t,e))&&(this.graph.constrainChild(t),this.fireEvent(new mxEventObject(mxEvent.ADD_VERTEX,"vertex",t)))}finally{i.endUpdate()}return null!=t&&(this.graph.setSelectionCell(t),this.graph.scrollCellToVisible(t),this.fireEvent(new mxEventObject(mxEvent.AFTER_ADD_VERTEX,"vertex",t))),t},mxEditor.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tasks&&this.tasks.destroy(),null!=this.outline&&this.outline.destroy(),null!=this.properties&&this.properties.destroy(),null!=this.keyHandler&&this.keyHandler.destroy(),null!=this.rubberband&&this.rubberband.destroy(),null!=this.toolbar&&this.toolbar.destroy(),null!=this.graph&&this.graph.destroy(),this.templates=this.status=null)};var mxCodecRegistry={codecs:[],aliases:[],register:function(e){if(null!=e){var t=e.getName();mxCodecRegistry.codecs[t]=e;var n=mxUtils.getFunctionName(e.template.constructor);n!=t&&mxCodecRegistry.addAlias(n,t)}return e},addAlias:function(e,t){mxCodecRegistry.aliases[e]=t},getCodec:function(e){var t=null;if(null!=e){t=mxUtils.getFunctionName(e);var n=mxCodecRegistry.aliases[t];if(null!=n&&(t=n),null==(t=mxCodecRegistry.codecs[t]))try{t=new mxObjectCodec(new e),mxCodecRegistry.register(t)}catch(e){}}return t}};function mxCodec(e){this.document=e||mxUtils.createXmlDocument(),this.objects=[]}function mxObjectCodec(e,t,n,a){for(var i in this.template=e,this.exclude=null!=t?t:[],this.idrefs=null!=n?n:[],this.mapping=null!=a?a:[],this.reverse={},this.mapping)this.reverse[this.mapping[i]]=i}mxCodec.prototype.document=null,mxCodec.prototype.objects=null,mxCodec.prototype.encodeDefaults=!1,mxCodec.prototype.putObject=function(e,t){return this.objects[e]=t},mxCodec.prototype.getObject=function(e){var t=null;return null!=e&&(null==(t=this.objects[e])&&(null==(t=this.lookup(e))&&(null!=(e=this.getElementById(e))&&(t=this.decode(e))))),t},mxCodec.prototype.lookup=function(e){return null},mxCodec.prototype.getElementById=function(e,t){return mxUtils.findNodeByAttribute(this.document.documentElement,null!=t?t:"id",e)},mxCodec.prototype.getId=function(e){var t=null;return null!=e&&(null==(t=this.reference(e))&&e instanceof mxCell&&(null==(t=e.getId())&&(0==(t=mxCellPath.create(e)).length&&(t="root")))),t},mxCodec.prototype.reference=function(e){return null},mxCodec.prototype.encode=function(e){var t=null;if(null!=e&&null!=e.constructor){var n=mxCodecRegistry.getCodec(e.constructor);null!=n?t=n.encode(this,e):mxUtils.isNode(e)?t=mxClient.IS_IE?e.cloneNode(!0):this.document.importNode(e,!0):mxLog.warn("mxCodec.encode: No codec for "+mxUtils.getFunctionName(e.constructor))}return t},mxCodec.prototype.decode=function(a,b){var c=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){var d=null;try{d=eval(a.nodeName)}catch(e){}try{var f=mxCodecRegistry.getCodec(d);null!=f?c=f.decode(this,a,b):(c=a.cloneNode(!0),c.removeAttribute("as"))}catch(e){mxLog.debug("Cannot decode "+a.nodeName+": "+e.message)}}return c},mxCodec.prototype.encodeCell=function(e,t,n){if(t.appendChild(this.encode(e)),null==n||n){n=e.getChildCount();for(var a=0;a<n;a++)this.encodeCell(e.getChildAt(a),t)}},mxCodec.prototype.isCellCodec=function(e){return null!=e&&"function"==typeof e.isCellCodec&&e.isCellCodec()},mxCodec.prototype.decodeCell=function(e,t){t=null==t||t;var n=null;if(null!=e&&e.nodeType==mxConstants.NODETYPE_ELEMENT){if(n=mxCodecRegistry.getCodec(e.nodeName),!this.isCellCodec(n))for(var a=e.firstChild;null!=a&&!this.isCellCodec(n);)n=mxCodecRegistry.getCodec(a.nodeName),a=a.nextSibling;this.isCellCodec(n)||(n=mxCodecRegistry.getCodec(mxCell)),n=n.decode(this,e),t&&this.insertIntoGraph(n)}return n},mxCodec.prototype.insertIntoGraph=function(e){var t=e.parent,n=e.getTerminal(!0),a=e.getTerminal(!1);e.setTerminal(null,!1),e.setTerminal(null,!0),(e.parent=null)!=t&&t.insert(e),null!=n&&n.insertEdge(e,!0),null!=a&&a.insertEdge(e,!1)},mxCodec.prototype.setAttribute=function(e,t,n){null!=t&&null!=n&&e.setAttribute(t,n)},mxObjectCodec.prototype.template=null,mxObjectCodec.prototype.exclude=null,mxObjectCodec.prototype.idrefs=null,mxObjectCodec.prototype.mapping=null,mxObjectCodec.prototype.reverse=null,mxObjectCodec.prototype.getName=function(){return mxUtils.getFunctionName(this.template.constructor)},mxObjectCodec.prototype.cloneTemplate=function(){return new this.template.constructor},mxObjectCodec.prototype.getFieldName=function(e){if(null!=e){var t=this.reverse[e];null!=t&&(e=t)}return e},mxObjectCodec.prototype.getAttributeName=function(e){if(null!=e){var t=this.mapping[e];null!=t&&(e=t)}return e},mxObjectCodec.prototype.isExcluded=function(e,t,n,a){return t==mxObjectIdentity.FIELD_NAME||0<=mxUtils.indexOf(this.exclude,t)},mxObjectCodec.prototype.isReference=function(e,t,n,a){return 0<=mxUtils.indexOf(this.idrefs,t)},mxObjectCodec.prototype.encode=function(e,t){var n=e.document.createElement(this.getName());return t=this.beforeEncode(e,t,n),this.encodeObject(e,t,n),this.afterEncode(e,t,n)},mxObjectCodec.prototype.encodeObject=function(e,t,n){for(var a in e.setAttribute(n,"id",e.getId(t)),t){var i=a,o=t[i];null!=o&&!this.isExcluded(t,i,o,!0)&&(mxUtils.isNumeric(i)&&(i=null),this.encodeValue(e,t,i,o,n))}},mxObjectCodec.prototype.encodeValue=function(e,t,n,a,i){if(null!=a){if(this.isReference(t,n,a,!0)){var o=e.getId(a);if(null==o)return void mxLog.warn("mxObjectCodec.encode: No ID for "+this.getName()+"."+n+"="+a);a=o}o=this.template[n],(null==n||e.encodeDefaults||o!=a)&&(n=this.getAttributeName(n),this.writeAttribute(e,t,n,a,i))}},mxObjectCodec.prototype.writeAttribute=function(e,t,n,a,i){"object"!=typeof a?this.writePrimitiveAttribute(e,t,n,a,i):this.writeComplexAttribute(e,t,n,a,i)},mxObjectCodec.prototype.writePrimitiveAttribute=function(e,t,n,a,i){a=this.convertValueToXml(a),null==n?(t=e.document.createElement("add"),"function"==typeof a?t.appendChild(e.document.createTextNode(a)):e.setAttribute(t,"value",a),i.appendChild(t)):"function"!=typeof a&&e.setAttribute(i,n,a)},mxObjectCodec.prototype.writeComplexAttribute=function(e,t,n,a,i){null!=(e=e.encode(a))?(null!=n&&e.setAttribute("as",n),i.appendChild(e)):mxLog.warn("mxObjectCodec.encode: No node for "+this.getName()+"."+n+": "+a)},mxObjectCodec.prototype.convertValueToXml=function(e){return void 0!==e.length||1!=e&&0!=e||(e=1==e?"1":"0"),e},mxObjectCodec.prototype.convertValueFromXml=function(e){return mxUtils.isNumeric(e)&&(e=parseFloat(e)),e},mxObjectCodec.prototype.beforeEncode=function(e,t,n){return t},mxObjectCodec.prototype.afterEncode=function(e,t,n){return n},mxObjectCodec.prototype.decode=function(e,t,n){var a=t.getAttribute("id"),i=e.objects[a];return null==i&&(i=n||this.cloneTemplate(),null!=a&&e.putObject(a,i)),t=this.beforeDecode(e,t,i),this.decodeNode(e,t,i),this.afterDecode(e,t,i)},mxObjectCodec.prototype.decodeNode=function(e,t,n){null!=t&&(this.decodeAttributes(e,t,n),this.decodeChildren(e,t,n))},mxObjectCodec.prototype.decodeAttributes=function(e,t,n){if(null!=(t=t.attributes))for(var a=0;a<t.length;a++)this.decodeAttribute(e,t[a],n)},mxObjectCodec.prototype.decodeAttribute=function(e,t,n){var a=t.nodeName;if("as"!=a&&"id"!=a){t=this.convertValueFromXml(t.nodeValue);var i=this.getFieldName(a);if(this.isReference(n,i,t,!1)){if(null==(e=e.getObject(t)))return void mxLog.warn("mxObjectCodec.decode: No object for "+this.getName()+"."+a+"="+t);t=e}this.isExcluded(n,a,t,!1)||(n[a]=t)}},mxObjectCodec.prototype.decodeChildren=function(e,t,n){for(t=t.firstChild;null!=t;){var a=t.nextSibling;t.nodeType==mxConstants.NODETYPE_ELEMENT&&!this.processInclude(e,t,n)&&this.decodeChild(e,t,n),t=a}},mxObjectCodec.prototype.decodeChild=function(e,t,n){var a=this.getFieldName(t.getAttribute("as"));if(null==a||!this.isExcluded(n,a,t,!1)){var i=this.getFieldTemplate(n,a,t),o=null;"add"==t.nodeName?null==(o=t.getAttribute("value"))&&(o=mxUtils.eval(mxUtils.getTextContent(t))):o=e.decode(t,i),this.addObjectValue(n,a,o,i)}},mxObjectCodec.prototype.getFieldTemplate=function(e,t,n){return(e=e[t])instanceof Array&&0<e.length&&(e=null),e},mxObjectCodec.prototype.addObjectValue=function(e,t,n,a){null!=n&&n!=a&&(null!=t&&0<t.length?e[t]=n:e.push(n))},mxObjectCodec.prototype.processInclude=function(e,t,n){if("include"==t.nodeName){if(null!=(t=t.getAttribute("name")))try{var a=mxUtils.load(t).getDocumentElement();null!=a&&e.decode(a,n)}catch(e){}return!0}return!1},mxObjectCodec.prototype.beforeDecode=function(e,t,n){return t},mxObjectCodec.prototype.afterDecode=function(e,t,n){return n},mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxCell,["children","edges","overlays","mxTransient"],["parent","source","target"]);return e.isCellCodec=function(){return!0},e.isExcluded=function(e,t,n,a){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||a&&"value"==t&&n.nodeType==mxConstants.NODETYPE_ELEMENT},e.afterEncode=function(e,t,n){if(null!=t.value&&t.value.nodeType==mxConstants.NODETYPE_ELEMENT){var a=n;(n=mxClient.IS_IE?t.value.cloneNode(!0):e.document.importNode(t.value,!0)).appendChild(a),e=a.getAttribute("id"),n.setAttribute("id",e),a.removeAttribute("id")}return n},e.beforeDecode=function(e,t,n){var a=t,i=this.getName();if(t.nodeName!=i?(null!=(a=t.getElementsByTagName(i)[0])&&a.parentNode==t?(mxUtils.removeWhitespace(a,!0),mxUtils.removeWhitespace(a,!1),a.parentNode.removeChild(a)):a=null,n.value=t.cloneNode(!0),null!=(t=n.value.getAttribute("id"))&&(n.setId(t),n.value.removeAttribute("id"))):n.setId(t.getAttribute("id")),null!=a)for(t=0;t<this.idrefs.length;t++){i=this.idrefs[t];var o=a.getAttribute(i);if(null!=o){a.removeAttribute(i);var s=e.objects[o]||e.lookup(o);null==s&&(null!=(o=e.getElementById(o))&&(s=(mxCodecRegistry.codecs[o.nodeName]||this).decode(e,o))),n[i]=s}}return a},e}()),mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxGraphModel);return e.encodeObject=function(e,t,n){var a=e.document.createElement("root");e.encodeCell(t.getRoot(),a),n.appendChild(a)},e.decodeChild=function(e,t,n){"root"==t.nodeName?this.decodeRoot(e,t,n):mxObjectCodec.prototype.decodeChild.apply(this,arguments)},e.decodeRoot=function(e,t,n){var a=null;for(t=t.firstChild;null!=t;){var i=e.decodeCell(t);null!=i&&null==i.getParent()&&(a=i),t=t.nextSibling}null!=a&&n.setRoot(a)},e}()),mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxRootChange,["model","previous","root"]);return e.afterEncode=function(e,t,n){return e.encodeCell(t.root,n),n},e.beforeDecode=function(e,t,n){if(null!=t.firstChild&&t.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT){var a=(t=t.cloneNode(!0)).firstChild;for(n.root=e.decodeCell(a,!1),n=a.nextSibling,a.parentNode.removeChild(a),a=n;null!=a;)n=a.nextSibling,e.decodeCell(a),a.parentNode.removeChild(a),a=n}return t},e.afterDecode=function(e,t,n){return n.previous=n.root,n},e}()),mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxChildChange,["model","child","previousIndex"],["parent","previous"]);return e.isReference=function(e,t,n,a){return!("child"!=t||null==e.previous&&a)||0<=mxUtils.indexOf(this.idrefs,t)},e.afterEncode=function(e,t,n){return this.isReference(t,"child",t.child,!0)?n.setAttribute("child",e.getId(t.child)):e.encodeCell(t.child,n),n},e.beforeDecode=function(e,t,n){if(null!=t.firstChild&&t.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT){var a=(t=t.cloneNode(!0)).firstChild;for(n.child=e.decodeCell(a,!1),n=a.nextSibling,a.parentNode.removeChild(a),a=n;null!=a;){if(n=a.nextSibling,a.nodeType==mxConstants.NODETYPE_ELEMENT){var i=a.getAttribute("id");null==e.lookup(i)&&e.decodeCell(a)}a.parentNode.removeChild(a),a=n}}else a=t.getAttribute("child"),n.child=e.getObject(a);return t},e.afterDecode=function(e,t,n){return n.child.parent=n.previous,n.previous=n.parent,n.previousIndex=n.index,n},e}()),mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxTerminalChange,["model","previous"],["cell","terminal"]);return e.afterDecode=function(e,t,n){return n.previous=n.terminal,n},e}());var mxGenericChangeCodec=function(e,a){var t=new mxObjectCodec(e,["model","previous"],["cell"]);return t.afterDecode=function(e,t,n){return mxUtils.isNode(n.cell)&&(n.cell=e.decodeCell(n.cell,!1)),n.previous=n[a],n},t};mxCodecRegistry.register(mxGenericChangeCodec(new mxValueChange,"value")),mxCodecRegistry.register(mxGenericChangeCodec(new mxStyleChange,"style")),mxCodecRegistry.register(mxGenericChangeCodec(new mxGeometryChange,"geometry")),mxCodecRegistry.register(mxGenericChangeCodec(new mxCollapseChange,"collapsed")),mxCodecRegistry.register(mxGenericChangeCodec(new mxVisibleChange,"visible")),mxCodecRegistry.register(mxGenericChangeCodec(new mxCellAttributeChange,"value")),mxCodecRegistry.register(new mxObjectCodec(new mxGraph,"graphListeners eventListeners view container cellRenderer editor selection".split(" "))),mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxGraphView);return e.encode=function(e,t){return this.encodeCell(e,t,t.graph.getModel().getRoot())},e.encodeCell=function(e,t,n){var a=t.graph.getModel(),i=t.getState(n),o=a.getParent(n);if(null==o||null!=i){var s=a.getChildCount(n),r=t.graph.getCellGeometry(n),l=null;if(o==a.getRoot()?l="layer":null==o?l="graph":a.isEdge(n)?l="edge":0<s&&null!=r?l="group":a.isVertex(n)&&(l="vertex"),null!=l){var d=e.document.createElement(l);if(null!=t.graph.getLabel(n)&&(d.setAttribute("label",t.graph.getLabel(n)),t.graph.isHtmlLabel(n)&&d.setAttribute("html",!0)),null==o){var c=t.getGraphBounds();null!=c&&(d.setAttribute("x",Math.round(c.x)),d.setAttribute("y",Math.round(c.y)),d.setAttribute("width",Math.round(c.width)),d.setAttribute("height",Math.round(c.height))),d.setAttribute("scale",t.scale)}else if(null!=i&&null!=r){for(c in i.style)"function"==typeof(o=i.style[c])&&"object"==typeof o&&(o=mxStyleRegistry.getName(o)),null!=o&&"function"!=typeof o&&"object"!=typeof o&&d.setAttribute(c,o);if(null!=(o=i.absolutePoints)&&0<o.length){for(r=Math.round(o[0].x)+","+Math.round(o[0].y),c=1;c<o.length;c++)r+=" "+Math.round(o[c].x)+","+Math.round(o[c].y);d.setAttribute("points",r)}else d.setAttribute("x",Math.round(i.x)),d.setAttribute("y",Math.round(i.y)),d.setAttribute("width",Math.round(i.width)),d.setAttribute("height",Math.round(i.height));null!=(c=i.absoluteOffset)&&(0!=c.x&&d.setAttribute("dx",Math.round(c.x)),0!=c.y&&d.setAttribute("dy",Math.round(c.y)))}for(c=0;c<s;c++)null!=(i=this.encodeCell(e,t,a.getChildAt(n,c)))&&d.appendChild(i)}}return d},e}()),mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxStylesheet);return e.encode=function(e,t){var n,a=e.document.createElement(this.getName());for(n in t.styles){var i=t.styles[n],o=e.document.createElement("add");if(null!=n){for(var s in o.setAttribute("as",n),i){var r=this.getStringValue(s,i[s]);if(null!=r){var l=e.document.createElement("add");l.setAttribute("value",r),l.setAttribute("as",s),o.appendChild(l)}}0<o.childNodes.length&&a.appendChild(o)}}return a},e.getStringValue=function(e,t){var n=typeof t;return"function"==n?t=mxStyleRegistry.getName(style[j]):"object"==n&&(t=null),t},e.decode=function(e,t,n){n=n||new this.template.constructor;var a=t.getAttribute("id");for(null!=a&&(e.objects[a]=n),t=t.firstChild;null!=t;){if(!this.processInclude(e,t,n)&&"add"==t.nodeName&&null!=(a=t.getAttribute("as"))){var i=t.getAttribute("extend"),o=null!=i?mxUtils.clone(n.styles[i]):null;for(null==o&&(null!=i&&mxLog.warn("mxStylesheetCodec.decode: stylesheet "+i+" not found to extend"),o={}),i=t.firstChild;null!=i;){if(i.nodeType==mxConstants.NODETYPE_ELEMENT){var s=i.getAttribute("as");if("add"==i.nodeName){var r=mxUtils.getTextContent(i),l=null;null!=r&&0<r.length?l=mxUtils.eval(r):(l=i.getAttribute("value"),mxUtils.isNumeric(l)&&(l=parseFloat(l))),null!=l&&(o[s]=l)}else"remove"==i.nodeName&&delete o[s]}i=i.nextSibling}n.putCellStyle(a,o)}t=t.nextSibling}return n},e}()),mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxDefaultKeyHandler);return e.encode=function(e,t){return null},e.decode=function(e,t,n){if(null!=n)for(t=t.firstChild;null!=t;){if(!this.processInclude(e,t,n)&&"add"==t.nodeName){var a=t.getAttribute("as"),i=t.getAttribute("action"),o=t.getAttribute("control");n.bindAction(a,i,o)}t=t.nextSibling}return n},e}()),mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxDefaultToolbar);return e.encode=function(e,t){return null},e.decode=function(e,t,n){if(null!=n){var a=n.editor;for(t=t.firstChild;null!=t;){if(t.nodeType==mxConstants.NODETYPE_ELEMENT&&!this.processInclude(e,t,n))if("separator"==t.nodeName)n.addSeparator();else if("br"==t.nodeName)n.toolbar.addBreak();else if("hr"==t.nodeName)n.toolbar.addLine();else if("add"==t.nodeName){var i=t.getAttribute("as"),o=(i=mxResources.get(i)||i,t.getAttribute("icon")),s=t.getAttribute("pressedIcon"),r=t.getAttribute("action"),l=t.getAttribute("mode"),d=t.getAttribute("template"),c="0"!=t.getAttribute("toggle"),m=mxUtils.getTextContent(t),u=null;if(null!=r)u=n.addItem(i,o,r,s);else if(null!=l){var p=mxUtils.eval(m);u=n.addMode(i,o,l,s,p)}else if(null!=d||null!=m&&0<m.length)u=a.templates[d],d=t.getAttribute("style"),null!=u&&null!=d&&(u=u.clone()).setStyle(d),(d=null)!=m&&0<m.length&&(d=mxUtils.eval(m)),u=n.addPrototype(i,o,u,s,d,c);else if(0<(s=mxUtils.getChildNodes(t)).length)if(null==o)for(d=n.addActionCombo(i),i=0;i<s.length;i++)"separator"==(c=s[i]).nodeName?n.addOption(d,"---"):"add"==c.nodeName&&(o=c.getAttribute("as"),c=c.getAttribute("action"),n.addActionOption(d,o,c));else{var g=null,v=n.addPrototype(i,o,function(){if(null!=(e=a.templates[g.value])){var e=e.clone(),t=g.options[g.selectedIndex].cellStyle;return null!=t&&e.setStyle(t),e}return mxLog.warn("Template "+e+" not found"),null},null,null,c);g=n.addCombo();for(mxEvent.addListener(g,"change",function(){n.toolbar.selectMode(v,function(e){return e=mxUtils.convertPoint(a.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e)),a.addVertex(null,p(),e.x,e.y)}),n.toolbar.noReset=!1}),i=0;i<s.length;i++)"separator"==(c=s[i]).nodeName?n.addOption(g,"---"):"add"==c.nodeName&&(o=c.getAttribute("as"),m=c.getAttribute("template"),n.addOption(g,o,m||d).cellStyle=c.getAttribute("style"))}null!=u&&(null!=(d=t.getAttribute("id"))&&0<d.length&&u.setAttribute("id",d))}t=t.nextSibling}}return n},e}()),mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxDefaultPopupMenu);return e.encode=function(e,t){return null},e.decode=function(e,t,n){var a=t.getElementsByTagName("include")[0];return null!=a?this.processInclude(e,a,n):null!=n&&(n.config=t),n},e}()),mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxEditor,"modified lastSnapshot ignoredChanges undoManager graphContainer toolbarContainer".split(" "));return e.afterDecode=function(e,t,n){return null!=(e=t.getAttribute("defaultEdge"))&&(t.removeAttribute("defaultEdge"),n.defaultEdge=n.templates[e]),null!=(e=t.getAttribute("defaultGroup"))&&(t.removeAttribute("defaultGroup"),n.defaultGroup=n.templates[e]),n},e.decodeChild=function(e,t,n){if("Array"==t.nodeName){if("templates"==t.getAttribute("as"))return void this.decodeTemplates(e,t,n)}else if("ui"==t.nodeName)return void this.decodeUi(e,t,n);mxObjectCodec.prototype.decodeChild.apply(this,arguments)},e.decodeUi=function(e,t,n){for(e=t.firstChild;null!=e;){if("add"==e.nodeName){t=e.getAttribute("as");var a=e.getAttribute("element"),i=e.getAttribute("style"),o=null;if(null!=a)null!=(o=document.getElementById(a))&&null!=i&&(o.style.cssText+=";"+i);else{a=parseInt(e.getAttribute("x"));var s=parseInt(e.getAttribute("y")),r=e.getAttribute("width"),l=e.getAttribute("height");(o=document.createElement("div")).style.cssText=i,new mxWindow(mxResources.get(t)||t,o,a,s,r,l,!1,!0).setVisible(!0)}"graph"==t?n.setGraphContainer(o):"toolbar"==t?n.setToolbarContainer(o):"title"==t?n.setTitleContainer(o):"status"==t?n.setStatusContainer(o):"map"==t&&n.setMapContainer(o)}else"resource"==e.nodeName?mxResources.add(e.getAttribute("basename")):"stylesheet"==e.nodeName&&mxClient.link("stylesheet",e.getAttribute("name"));e=e.nextSibling}},e.decodeTemplates=function(e,t,n){null==n.templates&&(n.templates=[]),t=mxUtils.getChildNodes(t);for(var a=0;a<t.length;a++){for(var i=t[a].getAttribute("as"),o=t[a].firstChild;null!=o&&1!=o.nodeType;)o=o.nextSibling;null!=o&&(n.templates[i]=e.decodeCell(o))}},e}()),EditorUi=function(e,t,n){this.projectDesignController=e,this.editor=t||new Editor,this.container=n||document.body;var a=t.graph,i=this;this.container.style.overflow="hidden",(new Image).src=mxPopupMenu.prototype.submenuImage,null!=mxConnectionHandler.prototype.connectImage&&((new Image).src=mxConnectionHandler.prototype.connectImage.src),this.actions=new Actions(this),this.menus=new Menus(this),this.createDivs(),this.refresh(),this.createUi();var o=mxUtils.bind(this,function(e){return null==e&&(e=window.event),!!this.isSelectionAllowed(e)||a.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=o,this.menubarContainer.onmousedown=o,this.toolbarContainer.onselectstart=o,this.toolbarContainer.onmousedown=o,this.diagramContainer.onselectstart=o,this.diagramContainer.onmousedown=o,this.sidebarContainer.onselectstart=o,this.sidebarContainer.onmousedown=o,this.footerContainer.onselectstart=o,this.footerContainer.onmousedown=o),mxClient.IS_IE&&(void 0===document.documentMode||document.documentMode<9)?(mxEvent.addListener(this.diagramContainer,"contextmenu",o),mxEvent.addListener(this.sidebarContainer,"contextmenu",o)):(this.diagramContainer.oncontextmenu=o,this.sidebarContainer.oncontextmenu=o),a.init(this.diagramContainer),a.refresh(),a.container.setAttribute("tabindex","0"),a.container.style.cursor="default",a.container.style.backgroundImage="url("+t.gridImage+")",a.container.style.backgroundPosition="-1px -1px",a.container.focus();var s=a.fireMouseEvent;a.fireMouseEvent=function(e,t,n){e==mxEvent.MOUSE_DOWN&&this.container.focus(),s.apply(this,arguments)},this.createMultiplicities(a.multiplicities,["start","finally","end"],[[1,1],[1,1],[0,0]],[[0,0],[0,0],[1,"n"]]),this.createMultiplicities(a.multiplicities,["answer","hangup","dial","ext_dial","queue","voicemail","callback"],[[1,1],[0,0],[0,1],[0,1],[0,1],[1,1],[0,1]],[[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"]]),this.createMultiplicities(a.multiplicities,["login","pause","unpause","logout"],[[1,2],[1,2],[1,2],[1,2]],[[1,"n"],[1,"n"],[1,"n"],[1,"n"]]),this.createMultiplicities(a.multiplicities,["set","math"],[[1,1],[1,1]],[[1,"n"],[1,"n"]]),this.createMultiplicities(a.multiplicities,["background","playback","menu","saydigits","saynumber","sayphonetic","tts","ispeechtts","awspolly","getdigits","getsecretdigits","lumenvoxtts"],[[1,"n"],[1,1],[1,"n"],[1,1],[1,1],[1,1],[1,1],[1,1],[1,1],[1,"n"],[1,"n"],[1,1]],[[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"]]),this.createMultiplicities(a.multiplicities,["record"],[[1,1]],[[1,"n"]]),this.createMultiplicities(a.multiplicities,["database","ispeechasr","sendSMS","sendMail","sendFax","googleasr","lumenvoxasr","tildeasr"],[[1,1],[1,1],[1,1],[1,1],[1,1],[1,1],[1,1],[1,1]],[[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"]]),this.createMultiplicities(a.multiplicities,["gotoc","gotoif","gotoiftime","vswitch"],[[0,0],[1,2],[1,2],[1,"n"]],[[1,"n"],[1,"n"],[1,"n"],[1,"n"]]),this.createMultiplicities(a.multiplicities,["queuelog","goal"],[[1,1],[1,1]],[[1,"n"],[1,"n"]]),this.createMultiplicities(a.multiplicities,["noop","system","agi","subproject","custom_app"],[[1,1],[1,1],[0,1],[0,1],[0,1]],[[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"]]),a.dblClick=function(e,n){var t=new mxEventObject(mxEvent.DOUBLE_CLICK,"event",e,"cell",n);this.fireEvent(t),!this.isEnabled()||mxEvent.isConsumed(e)||t.isConsumed()||(this.getModel().isEdge(n)?0<=["background","gotoif","gotoiftime","menu","getdigits","getsecretdigits","vswitch","login","pause","unpause","logout"].indexOf(n.source.value.tagName)&&this.startEditingAtCell(n):this.getModel().isVertex(n)&&i.projectDesignController.openDialog(n.getValue(),function(e){for(var t=0;t<e.length;t+=1)n.setAttribute(e[t].name,e[t].value);a.refresh(n)}),t.consume())},a.panningHandler.autoExpand=!0,a.panningHandler.factoryMethod=mxUtils.bind(this,function(e,t,n){this.menus.createPopupMenu(e,t,n)}),t.outline.init(this.outlineContainer),mxEvent.addGestureListeners(document,mxUtils.bind(this,function(e){a.panningHandler.hideMenu()})),mxClient.IS_TOUCH&&(mxEvent.addListener(a.container,"gesturechange",mxUtils.bind(this,function(e){a.view.getDrawPane().setAttribute("transform","scale("+e.scale+")"),a.view.getOverlayPane().style.visibility="hidden"})),mxEvent.addListener(a.container,"gestureend",mxUtils.bind(this,function(e){a.view.getDrawPane().removeAttribute("transform"),a.zoomToCenter=!0,a.zoom(e.scale),a.view.getOverlayPane().style.visibility="visible"})));var r=this.createKeyHandler(t);this.getKeyHandler=function(){return r},mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.refresh(),a.sizeDidChange(),this.editor.outline.update(!1),this.editor.outline.outline.sizeDidChange()})),this.init(),this.open(),this.refresh()},EditorUi.prototype.splitSize=mxClient.IS_TOUCH?16:8,EditorUi.prototype.menubarHeight=33,EditorUi.prototype.toolbarHeight=36,EditorUi.prototype.footerHeight=0,EditorUi.prototype.hsplitPosition=204,EditorUi.prototype.vsplitPosition=190,EditorUi.prototype.init=function(){this.addUndoListener(),this.addSelectionListener();var e=this.actions.get("paste"),t=function(){e.setEnabled(!mxClipboard.isEmpty())},n=mxClipboard.cut;mxClipboard.cut=function(){n.apply(this,arguments),t()};var a=mxClipboard.copy;mxClipboard.copy=function(){a.apply(this,arguments),t()}},EditorUi.prototype.isSelectionAllowed=function(e){return!1},EditorUi.prototype.exportXML=function(e){var t=window.document.createElement("a");t.href="data:attachment/text;charset=utf-8,"+encodeURI(e),t.download=this.editor.filename+".xml",t.target="_self",t.click()},EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(e,t){try{var n=mxUtils.parseXml(e);this.editor.setGraphXml(n.documentElement),this.editor.modified=!1,this.editor.undoManager.clear(),null!=t&&(this.editor.filename=t)}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}))}catch(e){}},EditorUi.prototype.openString=function(e,t,n){try{var a=mxUtils.parseXml(e);this.editor.setGraphXml(a.documentElement),this.editor.modified=!1,this.editor.undoManager.clear(),null!=t&&(this.editor.filename=t),null!=n&&(this.editor.data=n)}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}},EditorUi.prototype.validate=function(e,t){for(var n=this.editor.graph,a=(e=null!=e?e:n.model.getRoot(),t=null!=t?t:{},!0),i=n.model.getChildCount(e),o=0;o<i;o++){var s=n.model.getChildAt(e,o),r=t;n.isValidRoot(s)&&(r={}),null!=(r=this.validate(s,r))?n.setCellWarning(s,r.replace(/\n/g,"<br>")):n.setCellWarning(s,null),a=a&&null==r}if(i="",n.model.isVertex(e))switch(e.value.nodeName){case"start":i=this.validateBlock("start")?"":"Only one Start block is allowed\n";break;case"finally":i=this.validateBlock("finally")?"":"Only one Finally block is allowed\n";break;case"playback":i=0<e.value.getAttribute("file_id")?"":mxResources.get("noAudioSelected")+"\n";break;case"answer":i=0<=e.value.getAttribute("timeout")?"":mxResources.get("invalidTimeout")+"\n";break;case"menu":i=0<e.value.getAttribute("file_id")?"":mxResources.get("noAudioSelected")+"\n",i+=0<e.value.getAttribute("digit")?"":mxResources.get("wrongMaxDigit")+"\n",i+=0<=e.value.getAttribute("response")?"":mxResources.get("invalidTimeout")+"\n",i+=0<=e.value.getAttribute("retry")?"":mxResources.get("invalidRetry")+"\n";break;case"getdigits":i=0<e.value.getAttribute("file_id")?"":mxResources.get("noAudioSelected")+"\n",i+=0<e.value.getAttribute("variable_id")?"":mxResources.get("noVariableSelected")+"\n",i+=0<e.value.getAttribute("mindigit")?"":mxResources.get("wrongMinDigit")+"\n",i+=0<e.value.getAttribute("maxdigit")?"":mxResources.get("wrongMaxDigit")+"\n",i+=0<=e.value.getAttribute("retry")?"":mxResources.get("invalidRetry")+"\n";break;case"getsecretdigits":i=0<e.value.getAttribute("file_id")?"":mxResources.get("noAudioSelected")+"\n",i+=0<e.value.getAttribute("variable_id")?"":mxResources.get("noVariableSelected")+"\n",i+=0<e.value.getAttribute("mindigit")?"":mxResources.get("wrongMinDigit")+"\n",i+=0<e.value.getAttribute("maxdigit")?"":mxResources.get("wrongMaxDigit")+"\n",i+=0<=e.value.getAttribute("hiddendigitsnum")?"":mxResources.get("wrongHiddenDigitsnum")+"\n",i+=0<=e.value.getAttribute("retry")?"":mxResources.get("invalidRetry")+"\n";break;case"vswitch":i=0<e.value.getAttribute("variable_id")?"":mxResources.get("noVariableSelected")+"\n";break;case"database":i=0<e.value.getAttribute("odbc_id")?"":mxResources.get("noDatabaseSelected")+"\n",i+=""!==e.value.getAttribute("query")?"":mxResources.get("missingQuery")+"\n";break;case"set":case"math":i=0<e.value.getAttribute("variable_id")?"":mxResources.get("noVariableSelected")+"\n";break;case"gotoc":i=""!==e.value.getAttribute("context")?"":mxResources.get("noContextSelected")+"\n",i+=""!==e.value.getAttribute("extension")?"":mxResources.get("noExtensionSelected")+"\n",i+=1<=e.value.getAttribute("priority")?"":mxResources.get("invalidPriority")+"\n";break;case"system":case"agi":i=""!==e.value.getAttribute("command")?"":mxResources.get("noCommandSelected")+"\n";break;case"gotoif":i=""!==e.value.getAttribute("condition")?"":mxResources.get("noConditionSelected")+"\n";break;case"saydigits":i=""!==e.value.getAttribute("digits")?"":mxResources.get("noDigitsSelected")+"\n";break;case"saynumber":i=""!==e.value.getAttribute("number")?"":mxResources.get("noNumberSelected")+"\n";break;case"sayphonetic":i=""!==e.value.getAttribute("text")?"":mxResources.get("noTextSelected")+"\n";break;case"record":i=""!==e.value.getAttribute("file")?"":mxResources.get("noFileSelected")+"\n",i+=-1<=e.value.getAttribute("timeout")?"":mxResources.get("invalidTimeout")+"\n";break;case"goal":i=""!==e.value.getAttribute("goalname")?"":mxResources.get("noGoalSelected")+"\n";break;case"ext_dial":i="-1"!==e.value.getAttribute("trunk_name")?"":mxResources.get("noTrunkSelected")+"\n",i+=""!==e.value.getAttribute("phone")?"":mxResources.get("noIdentifierSelected")+"\n",i+=0<=e.value.getAttribute("timeout")?"":mxResources.get("invalidTimeout")+"\n";break;case"dial":i=0<e.value.getAttribute("sip_id")?"":mxResources.get("noIdentifierSelected")+"\n",i+=0<=e.value.getAttribute("timeout")?"":mxResources.get("invalidTimeout")+"\n";break;case"queue":i="-1"!==e.value.getAttribute("queue_id")?"":mxResources.get("noQueueSelected")+"\n",i+=0<=e.value.getAttribute("timeout")?"":mxResources.get("invalidTimeout")+"\n";break;case"callback":i="-1"!==e.value.getAttribute("list_id")?"":mxResources.get("noListSelected")+"\n",i+=""!==e.value.getAttribute("name")?"":mxResources.get("noFirstNameSelected")+"\n",i+=""!==e.value.getAttribute("phone")?"":mxResources.get("noPhoneSelected")+"\n",i+=0<=e.value.getAttribute("delay")?"":mxResources.get("invalidDelay")+"\n";break;case"gotoiftime":i=0<e.value.getAttribute("interval_id")?"":mxResources.get("noIntervalSelected")+"\n";break;case"voicemail":i=""!==e.value.getAttribute("mailbox")?"":mxResources.get("noBoxNumberSelected")+"\n";break;case"subproject":i=0<e.value.getAttribute("project_id")?"":mxResources.get("noProjectSelected")+"\n";break;case"sendSMS":i=0<e.value.getAttribute("sms_account_id")?"":mxResources.get("noAccountSelected")+"\n",i+=""!==e.value.getAttribute("to")?"":mxResources.get("noRecipientSelected")+"\n",i+=""!==e.value.getAttribute("sms_text")?"":mxResources.get("noTextSelected")+"\n";break;case"sendMail":i=0<e.value.getAttribute("account_id")?"":mxResources.get("noAccountSelected")+"\n",i+=""!==e.value.getAttribute("to")?"":mxResources.get("noRecipientSelected")+"\n";break;case"sendFax":i=0<e.value.getAttribute("account_id")?"":mxResources.get("noAccountSelected")+"\n",i+=""!==e.value.getAttribute("to")?"":mxResources.get("noRecipientSelected")+"\n",i+=""!==e.value.getAttribute("attachment_path")?"":mxResources.get("noAttachmentSelected")+"\n";break;case"tts":i=""!==e.value.getAttribute("text")?"":mxResources.get("noTextSelected")+"\n";break;case"awspolly":i=""!==e.value.getAttribute("text")?"":mxResources.get("noTextSelected")+"\n",i=""!==e.value.getAttribute("aws_access_key_id")?"":mxResources.get("noAccessKeySelected")+"\n",i=""!==e.value.getAttribute("aws_secret_access_key")?"":mxResources.get("noSecretAccessKeySelected")+"\n";break;case"ispeechtts":i=""!==e.value.getAttribute("text")?"":mxResources.get("noTextSelected")+"\n",i+=""!==e.value.getAttribute("key")?"":mxResources.get("noKeySelected")+"\n",i+=-10<=e.value.getAttribute("speed")&&e.value.getAttribute("speed")<=10?"":mxResources.get("invalidSpeed")+"\n";break;case"lumenvoxtts":i=""!==e.value.getAttribute("text")?"":mxResources.get("noTextSelected")+"\n";break;case"lumenvoxasr":i=""!==e.value.getAttribute("grammar")?"":mxResources.get("noGrammarSelected")+"\n";break;case"ispeechasr":case"googleasr":i=""!==e.value.getAttribute("key")?"":mxResources.get("noKeySelected")+"\n",i+=-1<=e.value.getAttribute("timeout")?"":mxResources.get("invalidTimeout")+"\n";break;case"tildeasr":i=""!==e.value.getAttribute("appid")?"":mxResources.get("noAppIdInserted")+"\n",i+=""!==e.value.getAttribute("appsecret")?"":mxResources.get("noAppSecretInserted")+"\n",i+=""!==e.value.getAttribute("uri")?"":mxResources.get("noUriInserted")+"\n";break;case"custom_app":i=""!==e.value.getAttribute("application")?"":mxResources.get("noApplicationSelected")+"\n";break;case"login":case"pause":case"unpause":case"logout":i=""!==e.value.getAttribute("findBy")?"":mxResources.get("noFindBySelected")+"\n"}if(n.model.isEdge(e))switch(n.model.getCell(e.source.getId()).value.nodeName){case"background":i+=(l=/^[0-9]{1,45}$|^[i]{1}$|^[t]{1}$|^[*]{1}$|^[#]{1}$/).test(String(e.getValue()))?"":mxResources.get("numberOrInvalidOrTimeout")+"\n";break;case"menu":if(e.getValue()){var l=/^[0-9]+$|^[-]{1}$|^[i]{1}$|^[t]{1}$|^[*]{1}$|^[#]{1}$/;String(e.getValue()).split(",").forEach(function(e){i+=l.test(e)?"":mxResources.get("numberOrAll")+"\n"})}else i=i+mxResources.get("numberOrAll")+"\n";break;case"getsecretdigits":case"getdigits":if(e.getValue())i+=(l=/^(x|i|-)$/).test(String(e.getValue()))?"":mxResources.get("numberOrInvalidOrDefault")+"\n";else i=i+mxResources.get("numberOrInvalidOrDefault")+"\n";break;case"gotoif":case"gotoiftime":if(e.getValue())i+=(l=/^(true){1}$|^(false){1}$/).test(String(e.getValue()))?"":mxResources.get("trueOrFalse")+"\n";else i=i+mxResources.get("trueOrFalse")+"\n";break;case"login":case"pause":case"unpause":case"logout":if(e.getValue())i+=(l=/^(success){1}$|^(failure){1}$/).test(String(e.getValue()))?"":mxResources.get("successOrFailure")+"\n";else i=i+mxResources.get("successOrFailure")+"\n"}return n.isCellCollapsed(e)&&!a&&(i+=(mxResources.get(n.containsValidationErrorsResource)||n.containsValidationErrorsResource)+"\n"),i=n.model.isEdge(e)?i+(n.getEdgeValidationError(e,n.model.getTerminal(e,!0),n.model.getTerminal(e,!1))||""):i+(n.getCellValidationError(e)||""),null!=(o=n.validateCell(e,t))&&(i+=o),null==n.model.getParent(e)&&n.view.validate(),0<i.length||!a?i:null},EditorUi.prototype.validateBlock=function(t){var n=this.editor.graph,e=n.getDefaultParent(),a=0;return e.children.forEach(function(e){n.model.isVertex(e)&&e.value.nodeName==t&&a++}),!(1<a)},EditorUi.prototype.getUrl=function(e){var t=null!=e?e:window.location.pathname,n=0<t.indexOf("?")?1:0;for(var a in urlParams)t+=0==n?"?":"&",t+=a+"="+urlParams[a],n++;return t},EditorUi.prototype.addUndoListener=function(){var e=this.actions.get("undo"),t=this.actions.get("redo"),n=this.editor.undoManager,a=function(){e.setEnabled(n.canUndo()),t.setEnabled(n.canRedo())};n.addListener(mxEvent.ADD,a),n.addListener(mxEvent.UNDO,a),n.addListener(mxEvent.REDO,a),n.addListener(mxEvent.CLEAR,a),a()},EditorUi.prototype.addSelectionListener=function(){var e=mxUtils.bind(this,function(){var e=this.editor.graph,t=!e.isSelectionEmpty(),n=!1,a=!1,i=e.getSelectionCells();if(null!=i)for(var o=0;o<i.length;o++){var s=i[o];if(e.getModel().isEdge(s)&&(a=!0),e.getModel().isVertex(s)&&(n=!0),a&&n)break}var r=["cut","copy","delete","duplicate","bold","italic","style","underline","toFront","toBack","dashed","rounded","shadow","tilt","autosize"];for(o=0;o<r.length;o++)this.actions.get(r[o]).setEnabled(t);this.actions.get("curved").setEnabled(a),this.actions.get("rotation").setEnabled(n),this.actions.get("wordWrap").setEnabled(n),this.actions.get("group").setEnabled(1<e.getSelectionCount()),this.actions.get("ungroup").setEnabled(1==e.getSelectionCount()&&0<e.getModel().getChildCount(e.getSelectionCell()));var l=n&&1==e.getSelectionCount();this.actions.get("removeFromGroup").setEnabled(l&&e.getModel().isVertex(e.getModel().getParent(e.getSelectionCell())));var d=["fontFamily","fontSize","alignment","position","text","format","arrange","linewidth","spacing"];for(o=0;o<d.length;o++)this.menus.get(d[o]).setEnabled(t);d=["line","lineend","linestart"];for(o=0;o<d.length;o++)this.menus.get(d[o]).setEnabled(a);this.actions.get("setAsDefaultEdge").setEnabled(a),this.menus.get("align").setEnabled(1<e.getSelectionCount()),this.menus.get("direction").setEnabled(n||a&&e.isLoop(e.view.getState(e.getSelectionCell()))),this.menus.get("navigation").setEnabled(e.foldingEnabled&&(null!=e.view.currentRoot||1==e.getSelectionCount()&&e.isValidRoot(e.getSelectionCell()))),this.actions.get("home").setEnabled(null!=e.view.currentRoot),this.actions.get("exitGroup").setEnabled(null!=e.view.currentRoot);var c=1==e.getSelectionCount()&&e.isValidRoot(e.getSelectionCell());this.actions.get("enterGroup").setEnabled(c),this.actions.get("expand").setEnabled(c),this.actions.get("collapse").setEnabled(c),this.actions.get("editLink").setEnabled(1==e.getSelectionCount()),this.actions.get("openLink").setEnabled(1==e.getSelectionCount()&&null!=e.getLinkForCell(e.getSelectionCell()))});this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,e),e()},EditorUi.prototype.refresh=function(){var e=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),t=this.container.clientWidth+390,n=this.container.clientHeight+190;this.container==document.body&&(t=document.body.clientWidth||document.documentElement.clientWidth,n=e&&document.body.clientHeight||document.documentElement.clientHeight);var a=Math.max(0,Math.min(this.hsplitPosition,t-this.splitSize-20)),i=Math.max(0,Math.min(this.vsplitPosition,n-this.menubarHeight-this.toolbarHeight-this.splitSize-1));this.menubarContainer.style.height=this.menubarHeight+"px",this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px";var o=this.menubarHeight+this.toolbarHeight;if(mxClient.IS_QUIRKS||(o+=1),this.sidebarContainer.style.top=o+"px",this.sidebarContainer.style.width=a+"px",this.outlineContainer.style.width=a+"px",this.outlineContainer.style.height=i+"px",this.diagramContainer.style.left=a+this.splitSize+"px",this.diagramContainer.style.top=this.sidebarContainer.style.top,this.hsplit.style.top=this.sidebarContainer.style.top,this.hsplit.style.bottom=this.outlineContainer.style.bottom,this.hsplit.style.left=a+"px",this.vsplit.style.width=this.sidebarContainer.style.width,this.vsplit.style.bottom=i+this.footerHeight+"px",e){this.menubarContainer.style.width=t+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width;var s=n-i-this.splitSize-this.menubarHeight-this.toolbarHeight;this.sidebarContainer.style.height=s+"px",this.diagramContainer.style.width=t-a-this.splitSize+"px";var r=n-this.menubarHeight-this.toolbarHeight;this.diagramContainer.style.height=r+"px",this.hsplit.style.height=r+"px"}else this.sidebarContainer.style.bottom=i+this.splitSize+"px",this.diagramContainer.style.bottom=this.outlineContainer.style.bottom},EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer"),this.toolbarContainer=this.createDiv("geToolbarContainer"),this.sidebarContainer=this.createDiv("geSidebarContainer"),this.outlineContainer=this.createDiv("geOutlineContainer"),this.diagramContainer=this.createDiv("geDiagramContainer"),this.footerContainer=this.createDiv("geFooterContainer"),this.hsplit=this.createDiv("geHsplit"),this.vsplit=this.createDiv("geVsplit"),this.menubarContainer.style.top="0px",this.menubarContainer.style.left="0px",this.menubarContainer.style.right="0px",this.toolbarContainer.style.left="0px",this.toolbarContainer.style.right="0px",this.sidebarContainer.style.left="0px",this.outlineContainer.style.bottom="0px",this.outlineContainer.style.left="0px",this.diagramContainer.style.overflow="scroll",this.diagramContainer.style.right="0px",this.footerContainer.style.left="0px",this.footerContainer.style.right="0px",this.footerContainer.style.bottom="0px",this.vsplit.style.left="0px",this.vsplit.style.height=this.splitSize+"px",this.hsplit.style.width=this.splitSize+"px"},EditorUi.prototype.createUi=function(){this.menubar=this.menus.createMenubar(this.createDiv("geMenubar")),this.menubarContainer.appendChild(this.menubar.container),this.toolbar=this.createToolbar(this.createDiv("geToolbar")),this.toolbarContainer.appendChild(this.toolbar.container),this.sidebar=this.createSidebar(this.sidebarContainer),this.footerContainer.appendChild(this.createFooter()),this.statusContainer=this.createStatusContainer(),this.editor.addListener("statusChanged",mxUtils.bind(this,function(){this.setStatusText(this.editor.getStatus())})),this.setStatusText(this.editor.getStatus()),this.menubar.container.appendChild(this.statusContainer),this.container.appendChild(this.menubarContainer),this.container.appendChild(this.toolbarContainer),this.container.appendChild(this.sidebarContainer),this.container.appendChild(this.outlineContainer),this.container.appendChild(this.diagramContainer),this.container.appendChild(this.footerContainer),this.container.appendChild(this.hsplit),this.container.appendChild(this.vsplit),this.addSplitHandler(this.hsplit,!0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e,this.refresh(),this.editor.graph.sizeDidChange(),this.editor.outline.update(!1),this.editor.outline.outline.sizeDidChange()})),this.addSplitHandler(this.vsplit,!1,this.footerHeight,mxUtils.bind(this,function(e){this.vsplitPosition=e,this.refresh(),this.editor.outline.update(!1),this.editor.outline.outline.sizeDidChange()}))},EditorUi.prototype.createStatusContainer=function(){var e=document.createElement("a");return e.className="geItem geStatus",e},EditorUi.prototype.createStatusContainer=function(){var e=document.createElement("a");return e.className="geItem geStatus",e},EditorUi.prototype.setStatusText=function(e){this.statusContainer.innerHTML=e},EditorUi.prototype.createToolbar=function(e){return new Toolbar(this,e)},EditorUi.prototype.createSidebar=function(e){return new Sidebar(this,e)},EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")},EditorUi.prototype.createDiv=function(e){var t=document.createElement("div");return t.className=e,t},EditorUi.prototype.createHeader=function(e){return document.createElement(e)},EditorUi.prototype.createForm=function(e){var t=document.createElement("form");return t.className=e,t},EditorUi.prototype.addSplitHandler=function(t,n,a,i){var o=null,s=null;function r(e){if(null!=o){var t=new mxPoint(mxEvent.getClientX(e),mxEvent.getClientY(e));i(Math.max(0,s+(n?t.x-o.x:o.y-t.y)-a)),mxEvent.consume(e)}}function e(e){r(e),s=o=null}mxEvent.addGestureListeners(t,function(e){o=new mxPoint(mxEvent.getClientX(e),mxEvent.getClientY(e)),s=parseInt(n?t.style.left:t.style.bottom),mxEvent.consume(e)}),mxEvent.addListener(document,"mousemove",r),mxEvent.addListener(document,"touchmove",r),mxEvent.addListener(document,"mouseup",e),mxEvent.addListener(document,"touchend",e)},EditorUi.prototype.executeLayout=function(e,t,n){var a=this.editor.graph,i=a.getSelectionCell();t=null!=this.animate?this.animate:t,a.getModel().beginUpdate();try{e.execute(a.getDefaultParent(),i)}catch(e){throw e}finally{if(t&&navigator.userAgent.indexOf("Camino")<0){var o=new mxMorphing(a);o.addListener(mxEvent.DONE,mxUtils.bind(this,function(){a.getModel().endUpdate()})),o.startAnimation()}else a.getModel().endUpdate()}},EditorUi.prototype.createKeyHandler=function(e){var a=this.editor.graph,s=new mxKeyHandler(a);function t(e){if(!a.isSelectionEmpty()){var t=0,n=0;37==e?t=-1:38==e?n=-1:39==e?t=1:40==e&&(n=1),a.moveCells(a.getSelectionCells(),t,n),a.scrollCellToVisible(a.getSelectionCell())}}s.isControlDown=function(e){return mxEvent.isControlDown(e)||mxClient.IS_MAC&&e.metaKey};var n=mxUtils.bind(this,function(e,t,n,a){var i=this.actions.get(n);if(null!=i){var o=function(){i.enabled&&i.funct()};t?a?s.bindControlShiftKey(e,o):s.bindControlKey(e,o):a?s.bindShiftKey(e,o):s.bindKey(e,o)}});return s.enter=function(){},s.bindKey(8,function(){a.foldCells(!0)}),s.bindKey(13,function(){a.foldCells(!1)}),s.bindKey(33,function(){a.exitGroup()}),s.bindKey(34,function(){a.enterGroup()}),s.bindKey(36,function(){a.home()}),s.bindKey(35,function(){a.refresh()}),s.bindKey(37,function(){t(37)}),s.bindKey(38,function(){t(38)}),s.bindKey(39,function(){t(39)}),s.bindKey(40,function(){t(40)}),s.bindKey(113,function(){a.startEditingAtCell()}),n(46,!1,"delete"),n(82,!0,"tilt"),n(83,!0,"save"),n(83,!0,"saveAs",!0),n(107,!1,"zoomIn"),n(109,!1,"zoomOut"),n(65,!0,"selectAll"),n(86,!0,"selectVertices",!0),n(69,!0,"selectEdges",!0),n(69,!0,"export"),n(66,!0,"toBack"),n(70,!0,"toFront"),n(68,!0,"duplicate"),n(90,!0,"undo"),n(89,!0,"redo"),n(88,!0,"cut"),n(67,!0,"copy"),n(81,!0,"connect"),n(86,!0,"paste"),n(71,!0,"group"),n(71,!0,"grid",!0),n(85,!0,"ungroup"),n(112,!1,"about"),n(80,!0,"publish",!0),s},EditorUi.prototype.createMultiplicities=function(e,t,n,a){for(var i=0;i<t.length;i++)e.push(new mxMultiplicity(!0,t[i],null,null,n[i][0],n[i][1],null,mxResources.get(t[i])+mxResources.get("musthave")+n[i][0]+mxResources.get("outgoingedge"),null)),e.push(new mxMultiplicity(!1,t[i],null,null,a[i][0],a[i][1],null,mxResources.get(t[i])+mxResources.get("musthave")+a[i][0]+mxResources.get("incomingedge"),null))};var useLocalStorage=(mxClient.IS_TOUCH||"local"==urlParams.storage)&&"undefined"!=typeof localStorage,fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList,touchStyle=mxClient.IS_TOUCH||"1"==urlParams.touch,counter=0;try{for(var op=window;null!=op.opener&&!isNaN(op.opener.counter);)op=op.opener;null!=op&&(op.counter++,counter=op.counter)}catch(e){}function Sidebar(e,t){this.editorUi=e,this.container=t,this.palettes=new Object,this.taglist=new Object,this.showTooltips=!0,this.graph=new Graph(document.createElement("div"),null,null,this.editorUi.editor.graph.getStylesheet()),this.graph.resetViewOnRootChange=!1,this.graph.foldingEnabled=!1,this.graph.setConnectable(!1),this.graph.autoScroll=!1,this.graph.setTooltips(!1),this.graph.setEnabled(!1),this.graph.container.style.visibility="hidden",this.graph.container.style.position="absolute",this.graph.container.style.overflow="hidden",this.graph.container.style.height="1px",this.graph.container.style.width="1px",mxClient.IS_IE||mxClient.IS_IE11||(this.graph.container.style.display="none"),document.body.appendChild(this.graph.container),this.pointerUpHandler=mxUtils.bind(this,function(){this.showTooltips=!0}),mxEvent.addListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerDownHandler=mxUtils.bind(this,function(){this.showTooltips=!1,this.hideTooltip()}),mxEvent.addListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler),this.pointerMoveHandler=mxUtils.bind(this,function(e){for(var t=mxEvent.getSource(e);null!=t;){if(t==this.currentElt)return;t=t.parentNode}this.hideTooltip()}),mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerOutHandler=mxUtils.bind(this,function(e){null==e.toElement&&null==e.relatedTarget&&this.hideTooltip()}),mxEvent.addListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),mxEvent.addListener(t,"scroll",mxUtils.bind(this,function(){this.showTooltips=!0})),this.init(),mxClient.IS_SVG||((new Image).src=IMAGE_PATH+"/tooltip.png")}function Actions(e){this.editorUi=e,this.actions=new Object,this.init()}function Action(e,t,n,a,i){mxEventSource.call(this),this.label=e,this.funct=t,this.enabled=null==n||n,this.iconCls=a,this.shortcut=i}function Menubar(e,t){this.editorUi=e,this.container=t,mxEvent.addGestureListeners(document,mxUtils.bind(this,function(e){this.hideMenu()}))}function Menu(e,t){mxEventSource.call(this),this.funct=e,this.enabled=null==t||t}function Toolbar(e,t){this.editorUi=e,this.container=t,this.init(),mxEvent.addGestureListeners(document,mxUtils.bind(this,function(e){this.hideMenu()}))}function createCheckbox(e){var t=document.createElement("input");return t.setAttribute("type","checkbox"),e&&t.setAttribute("checked",!0),t}function createDropdownFromApi(e,n,a,i,t,o,s,r){var l=new XMLHttpRequest;l.open("GET",e,!1),l.setRequestHeader("Authorization","Bearer "+t.editor.data.token),l.send(null);var d=[];200===l.status&&(d=JSON.parse(l.response));var c=document.createElement("select"),m=document.createElement("option");return m.text="-- None --",m.value="-1",c.appendChild(m),d.rows.forEach(function(t){r&&t[a]==r||((m=document.createElement("option")).text=t[a],o&&s?(m.value=s,o.forEach(function(e){m.value=m.value.replace("%"+e+"%",t[e])}),m.selected=m.value==n):(m.value=t[i],m.selected=t[i]==n),c.appendChild(m))}),c.className="form-control select2",c}function createDropdownWithOptgroupFromApi(e,t,n,a,i,o){var s=new XMLHttpRequest;s.open("GET",e,!1),s.setRequestHeader("Authorization","Bearer "+i.editor.data.token),s.send(null);var r=[];200===s.status&&(r=JSON.parse(s.response));var l=document.createElement("select"),d=document.createElement("option");d.text="-- None --",d.value="-1",l.appendChild(d);var c=_.groupBy(r.rows,o);for(var m in c)if(c.hasOwnProperty(m)){var u=document.createElement("optgroup");u.label=_.capitalize(m),c[m].forEach(function(e){(d=document.createElement("option")).text=e[n],d.value=e[a],d.selected=e[a]==t,u.appendChild(d)}),l.appendChild(u)}return l.className="form-control select2",l}function createGroupedDropdownFromApi(e,t,n,a,i,o){var s=new XMLHttpRequest;s.open("GET",e,!1),s.setRequestHeader("Authorization","Bearer "+i.editor.data.token),s.send(null);var r=[];200===s.status&&(r=JSON.parse(s.response));var l=document.createElement("select"),d=document.createElement("option");return d.text="-- None --",d.value="0",l.appendChild(d),r.rows.forEach(function(e){(d=document.createElement("option")).className="select-group-father",d.text=e[n].toUpperCase(),d.value=e[a],d.selected=e[a]==t,l.appendChild(d),e[o].forEach(function(e){(d=document.createElement("option")).className="select-group-son",d.text="-"+_.capitalize(e[n]),d.value=e[a],d.selected=e[a]==t,l.appendChild(d)})}),l.className="form-control select2",l}function createDropdownFromArray(e,t){var n=document.createElement("select");for(var a in e){var i=document.createElement("option");i.text=e[a],i.value=a,(0<t||""!=t)&&(i.selected=t===a),n.appendChild(i)}return n.className="form-control select2",n}function createDropdownFromTigerDialList(e){var t=document.createElement("select"),n=[],a=new XMLHttpRequest;try{if(a.open("POST","/api/rest/list/list",!1),a.send(JSON.stringify({page:1,size:6e5})),200===a.status){var i=JSON.parse(a.response);if(0<i.status){var o=i.response.RMI.rows;for(var s in o)n[o[s].id]=o[s].name}}}catch(e){console.log(e)}for(var r in n){var l=document.createElement("option");l.text=n[r],l.value=r,(0<e||""!=e)&&(l.selected=e===r),t.appendChild(l)}return t.className="form-control select2",t}function Dialog(e,t,n,a,i,o,s){var r=0;mxClient.IS_IE&&9!=document.documentMode&&(r=60),n+=r,a+=r;Math.max(0,Math.round((document.body.scrollWidth-n)/2)),Math.max(0,Math.round((Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)-a)/3));var l=e.createDiv("geDialog");l.className="modal fade in center",l.style.display="block",l.style.paddingRight="12px";var d=e.createDiv("geModalDialog");d.className="modal-dialog",d.appendChild(t),l.appendChild(d),null==this.bg&&(this.bg=e.createDiv("background"),this.bg.className="modal-backdrop fade in",mxClient.IS_QUIRKS&&new mxDivResizer(this.bg)),i&&document.body.appendChild(this.bg),document.body.appendChild(l),this.onDialogClose=s,this.container=l}function ImportDialog(n){var e=n.createDiv("modal-content"),t=n.createDiv("modal-header"),a=n.createDiv("modal-body"),i=n.createDiv("modal-footer"),o=n.createHeader("h4");mxUtils.write(o,mxResources.get("import")+" XML");var s=mxUtils.button("",function(){n.hideDialog()});s.className="close",t.appendChild(s),t.appendChild(o);var r=n.createDiv("row"),l=n.createDiv("col-md-12"),d=document.createElement("textarea");d.style.width="100%",d.style.height="374px";var c=document.createElement("input");c.type="file",c.setAttribute("accept","text/xml"),c.addEventListener("change",function(e){var t=e.target.files[0];if(console.log(t),t)if("text/xml"===t.type){var n=new FileReader;n.onload=function(e){var t=e.target.result;mxUtils.write(d,t)},n.readAsText(t)}else alert("Failed to load format file");else alert("Failed to load file")},!1),l.appendChild(c),l.appendChild(d),r.appendChild(l),a.appendChild(r);var m=mxUtils.button(mxResources.get("import"),mxUtils.bind(this,function(e){var t=mxUtils.parseXml(d.value);n.editor.setGraphXml(t.documentElement),n.hideDialog()}));m.className="btn blue";var u=mxUtils.button(mxResources.get("cancel"),function(){n.hideDialog()});u.className="btn default",i.appendChild(m),i.appendChild(u),e.appendChild(t),e.appendChild(a),e.appendChild(i),this.container=e}function AboutDialog(e){var t=e.createDiv("modal-content"),n=e.createDiv("modal-header"),a=e.createDiv("modal-body"),i=e.createDiv("modal-footer"),o=e.createHeader("h4");mxUtils.write(o,mxResources.get("about")+" Cally Square");var s=mxUtils.button("",function(){e.hideDialog()});s.className="close",n.appendChild(s),n.appendChild(o);var r=document.createElement("img");r.style.border="0px",r.setAttribute("width","176"),r.setAttribute("width","151"),r.setAttribute("src",IMAGE_PATH+"/logo.png"),a.appendChild(r),mxUtils.br(a),mxUtils.write(a,"Powered by Xenialab "+mxClient.VERSION),mxUtils.br(a);var l=document.createElement("a");l.setAttribute("href","http://www.callysquare.com/"),l.setAttribute("target","_blank"),mxUtils.write(l,"www.callysquare.com"),a.appendChild(l),mxUtils.br(a),mxUtils.br(a);var d=mxUtils.button(mxResources.get("close"),function(){e.hideDialog()});d.className="btn default",i.appendChild(d),t.appendChild(n),t.appendChild(a),t.appendChild(i),this.container=t}function SaveDialog(e){var t=e.createDiv("modal-content"),n=e.createDiv("modal-header"),a=e.createDiv("modal-body"),i=e.createDiv("modal-footer"),o=e.createHeader("h4");mxUtils.write(o,mxResources.get("saveAs"));var s=mxUtils.button("",function(){e.hideDialog()});s.className="close",n.appendChild(s),n.appendChild(o);var r=e.editor.getOrCreateFilename(),l=e.createDiv("row"),d=e.createDiv("col-md-4"),c=e.createDiv("col-md-8"),m=document.createElement("label");m.className="control-label pull-right",mxUtils.write(m,mxResources.get("name")),d.appendChild(m);var u=document.createElement("input");u.setAttribute("value",r+"_copy"),u.setAttribute("id","_name"),u.className="form-control",c.appendChild(u),l.appendChild(d),l.appendChild(c),a.appendChild(l);var p=mxUtils.button(mxResources.get("save"),function(){e.saveAs(u.value),e.hideDialog()});p.className="btn blue";var g=mxUtils.button(mxResources.get("cancel"),function(){e.hideDialog()});g.className="btn default",i.appendChild(p),i.appendChild(g),t.appendChild(n),t.appendChild(a),t.appendChild(i),this.container=t}function NewDialog(e){var t=e.createDiv("modal-content"),n=e.createDiv("modal-header"),a=e.createDiv("modal-body"),i=e.createDiv("modal-footer"),o=e.createHeader("h4");mxUtils.write(o,mxResources.get("new"));var s=mxUtils.button("",function(){e.hideDialog()});s.className="close",n.appendChild(s),n.appendChild(o);var r=e.editor.getOrCreateFilename(),l=e.createDiv("row"),d=e.createDiv("col-md-4"),c=e.createDiv("col-md-8"),m=document.createElement("label");m.className="control-label pull-right",mxUtils.write(m,mxResources.get("name")),d.appendChild(m);var u=document.createElement("input");u.setAttribute("value",r+"_new"),u.setAttribute("id","_name"),u.className="form-control",c.appendChild(u),l.appendChild(d),l.appendChild(c),a.appendChild(l);var p=mxUtils.button(mxResources.get("new"),function(){e.new(u.value),e.hideDialog()});p.className="btn blue";var g=mxUtils.button(mxResources.get("cancel"),function(){e.hideDialog()});g.className="btn default",i.appendChild(p),i.appendChild(g),t.appendChild(n),t.appendChild(a),t.appendChild(i),this.container=t}function DescriptionDialog(e){console.log(e.editor.data);var t=e.createDiv("modal-content"),n=e.createDiv("modal-header"),a=e.createDiv("modal-body"),i=e.createDiv("modal-footer"),o=e.createHeader("h4");mxUtils.write(o,mxResources.get("description"));var s=mxUtils.button("",function(){e.hideDialog()});s.className="close",n.appendChild(s),n.appendChild(o);var r=e.createDiv("form-horizontal form-row-seperated"),l="description",d=e.editor.data.description||"",c=e.createDiv("form-group"),m=document.createElement("label");m.className="col-sm-4 control-label",mxUtils.write(m,mxResources.get(l)),c.appendChild(m);var u=document.createElement("input");u.setAttribute("value",d),u.className="form-control",u.setAttribute("id","_description");var p=e.createDiv("col-sm-8");p.appendChild(u),c.appendChild(p),r.appendChild(c),a.appendChild(r);var g=mxUtils.button(mxResources.get("update"),function(){e.description(u.value),e.hideDialog()});g.className="btn blue";var v=mxUtils.button(mxResources.get("cancel"),function(){e.hideDialog()});v.className="btn default",i.appendChild(g),i.appendChild(v),t.appendChild(n),t.appendChild(a),t.appendChild(i),this.container=t}function VariableDialog(e){var t=e.createDiv("modal-content"),n=e.createDiv("modal-header"),a=e.createDiv("modal-body"),i=e.createDiv("modal-footer"),o=e.createHeader("h4");mxUtils.write(o,mxResources.get("variable"));var s=mxUtils.button("",function(){e.hideDialog()});s.className="close",n.appendChild(s),n.appendChild(o);var r=e.createDiv("form-horizontal form-row-seperated"),l="name",d="_"+l,c="variable name",m=e.createDiv("form-group"),u=document.createElement("label");u.className="col-sm-4 control-label",mxUtils.write(u,mxResources.get(l)),m.appendChild(u);var p=document.createElement("input");p.setAttribute("value",c),p.className="form-control",p.setAttribute("id",d);var g=e.createDiv("col-sm-8");g.appendChild(p),m.appendChild(g),r.appendChild(m),d="_"+(l="description"),c="variable description",m=e.createDiv("form-group last"),(u=document.createElement("label")).className="col-sm-4 control-label",mxUtils.write(u,mxResources.get(l)),m.appendChild(u);var v=document.createElement("input");v.setAttribute("value",c),v.className="form-control",v.setAttribute("id",d),(g=e.createDiv("col-sm-8")).appendChild(v),m.appendChild(g),r.appendChild(m),a.appendChild(r);var h=mxUtils.button(mxResources.get("new"),function(){e.variable(p.value,v.value),e.hideDialog()});h.className="btn blue";var b=mxUtils.button(mxResources.get("cancel"),function(){e.hideDialog()});b.className="btn default",i.appendChild(h),i.appendChild(b),t.appendChild(n),t.appendChild(a),t.appendChild(i),this.container=t}function OpenDialog(e){var t=e.createDiv("modal-content"),n=e.createDiv("modal-header"),a=e.createDiv("modal-body"),i=e.createDiv("modal-footer"),o=e.createHeader("h4");mxUtils.write(o,mxResources.get("open"));var s=mxUtils.button("",function(){e.hideDialog()});s.className="close",n.appendChild(s),n.appendChild(o);var r=e.createDiv("row"),l=e.createDiv("col-md-4"),d=e.createDiv("col-md-8"),c=document.createElement("label");c.className="control-label pull-right",mxUtils.write(c,mxResources.get("name")),l.appendChild(c);var m=new XMLHttpRequest;m.open("GET","/api/square/projects",!1),m.setRequestHeader("Authorization","Bearer "+e.editor.data.token),m.send(null);var u=[];200===m.status&&(u=JSON.parse(m.response));for(var p=document.createElement("select"),g=0;g<u.length;g++){var v=document.createElement("option");v.text=u[g].name,v.value=u[g].id,p.appendChild(v)}p.className="form-control",d.appendChild(p),r.appendChild(l),r.appendChild(d),a.appendChild(r);var h=mxUtils.button(mxResources.get("open"),function(){console.log(p),console.log(p.value),window.open("square/project/"+p.value,"_blank"),e.hideDialog()});h.className="btn blue";var b=mxUtils.button(mxResources.get("cancel"),function(){e.hideDialog()});b.className="btn default",i.appendChild(h),i.appendChild(b),t.appendChild(n),t.appendChild(a),t.appendChild(i),this.container=t}function RenameDialog(n){var e=n.createDiv("modal-content"),t=n.createDiv("modal-header"),a=n.createDiv("modal-body"),i=n.createDiv("modal-footer"),o=n.createHeader("h4");mxUtils.write(o,mxResources.get("rename"));var s=mxUtils.button("",function(){n.hideDialog()});s.className="close",t.appendChild(s),t.appendChild(o);var r=n.createDiv("row"),l=n.createDiv("col-md-4"),d=n.createDiv("col-md-8"),c=document.createElement("label");c.className="control-label pull-right",mxUtils.write(c,mxResources.get("name")),l.appendChild(c);var m=n.editor.filename,u=document.createElement("input");u.setAttribute("value",m),u.className="form-control",d.appendChild(u),r.appendChild(l),r.appendChild(d),a.appendChild(r);var p=mxUtils.button(mxResources.get("save"),function(){var t=new XMLHttpRequest;t.open("PUT",SAVE_URL+n.editor.data.id,!0),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),t.setRequestHeader("Authorization","Bearer "+n.editor.data.token),t.send("name="+u.value),t.onload=function(e){200===t.status?(n.editor.setStatus("Project successfully renamed"),n.editor.filename=u.value):(console.log(t.response),n.editor.setStatus(JSON.parse(t.response).errors[0].message))},t.onerror=function(e){mxUtils.alert(t.statusText)},n.hideDialog()});p.className="btn blue";var g=mxUtils.button(mxResources.get("cancel"),function(){n.hideDialog()});g.className="btn default",i.appendChild(p),i.appendChild(g),e.appendChild(t),e.appendChild(a),e.appendChild(i),this.container=e}function EditFileDialog(t){var e=t.createDiv("modal-content"),n=t.createDiv("modal-header"),a=t.createDiv("modal-body"),i=t.createDiv("modal-footer"),o=t.createHeader("h4");mxUtils.write(o,mxResources.get("edit"));var s=mxUtils.button("",function(){t.hideDialog()});s.className="close",n.appendChild(s),n.appendChild(o);var r=t.createDiv("row"),l=t.createDiv("col-md-12"),d=document.createElement("textarea");if(d.style.width="100%",d.style.height="374px",d.value=mxUtils.getPrettyXml(t.editor.getGraphXml()),fileSupport){d.addEventListener("dragover",function(e){e.stopPropagation(),e.preventDefault()},!1),d.addEventListener("drop",function(e){if(e.stopPropagation(),e.preventDefault(),0<e.dataTransfer.files.length){var t=e.dataTransfer.files[0],n=new FileReader;n.onload=function(e){d.value=e.target.result},n.readAsText(t)}},!1)}l.appendChild(d),r.appendChild(l),a.appendChild(r);var c=mxUtils.button(mxResources.get("save"),function(){var e=mxUtils.parseXml(d.value);t.editor.setGraphXml(e.documentElement),t.hideDialog()});c.className="btn blue";var m=mxUtils.button(mxResources.get("cancel"),function(){t.hideDialog()});m.className="btn default",i.appendChild(c),i.appendChild(m),e.appendChild(n),e.appendChild(a),e.appendChild(i),this.container=e}function ExportDialog(t){var e=t.createDiv("modal-content"),n=t.createDiv("modal-header"),a=t.createDiv("modal-body form"),i=t.createDiv("modal-footer"),o=t.createHeader("h4");mxUtils.write(o,mxResources.get("export")+" XML");var s=mxUtils.button("",function(){t.hideDialog()});s.className="close",n.appendChild(s),n.appendChild(o);var r=t.createDiv("form-horizontal form-row-seperated"),l=t.createDiv("form-group last"),d=document.createElement("label");d.className="col-sm-4 control-label",mxUtils.write(d,mxResources.get("filename"));var c=document.createElement("input");c.setAttribute("value",t.editor.getOrCreateFilename()),c.className="form-control";var m=t.createDiv("col-sm-8");m.appendChild(c),l.appendChild(d),l.appendChild(m),r.appendChild(l),a.appendChild(r);var u=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(e){t.save(!1);encodeURIComponent(mxUtils.getXml(t.editor.getGraphXml()));new mxXmlRequest(SAVE_URL+t.editor.data.id+"/download","filename="+c.value,"GET").simulate(document,"_blank"),t.hideDialog()}));u.className="btn blue";var p=mxUtils.button(mxResources.get("cancel"),function(){t.hideDialog()});p.className="btn default",i.appendChild(u),i.appendChild(p),e.appendChild(n),e.appendChild(a),e.appendChild(i),this.container=e}function GeneralDialog(i,o){console.log("general");var s=i.editor.graph,e=i.createDiv("md-dialog"),t=i.createDiv("md-toolbar"),n=i.createDiv("md-dialog-content"),a=i.createDiv("md-dialog-actions"),r=i.createHeader("h4");mxUtils.write(r,mxResources.get("edit")+" "+mxResources.get(o.value.nodeName));var l=mxUtils.button("",function(){i.hideDialog()});l.className="close",t.appendChild(l),t.appendChild(r);for(var d=o.value.attributes.length,c=i.createDiv("form-horizontal form-row-seperated"),m=0;m<d;m++){var u,p=o.value.attributes[m].name,g="_"+p,v=o.value.attributes[m].value,h=i.createDiv(m==d-1?"form-group last":"form-group"),b=document.createElement("label");switch(b.className="col-sm-4 control-label",mxUtils.write(b,mxResources.get(p)),h.appendChild(b),p){case"sip_id":u=createDropdownWithOptgroupFromApi("/api/users/all",v,"fullname","id",i,"role");break;case"queue_id":u=createDropdownFromApi("/api/voice/queues",v,"name","name",i);break;case"trunk_name":u=createDropdownFromApi("/api/trunks",v,"name","name",i);break;case"variable_id":u=createDropdownFromApi("/api/variables",v,"name","id",i);break;case"account_id":u="sendMail"==o.value.nodeName?createDropdownFromApi("/api/mail/servers/out",v,"username","id",i):createDropdownFromApi("/api/sms/accounts",v,"name","id",i);break;case"template_id":u=createDropdownFromApi("/api/templates",v,"name","id",i);break;case"context":u=createDropdownFromApi("/api/voice/contexts",v,"name","name",i);break;case"mailbox":u=createDropdownFromApi("/api/voice/voicemails",v,"mailbox","id",i,["mailbox","context"],"%mailbox%@%context%");break;case"model":u=createDropdownFromArray(ISPEECHASRMODEL,v);break;case"ispeech_asr_language":u=createDropdownFromArray(ISPEECHASRLANG,v);break;case"beep":u=createDropdownFromArray(ISPEECHBEEP,v);break;case"hiddendigitspos":u=createDropdownFromArray(SECRETDIGITSPOS,v);break;case"ispeech_tts_language":u=createDropdownFromArray(ISPEECHLANG,v);break;case"google_tts_language":u=createDropdownFromArray(GOOGLETTSLANG,v);break;case"intKey":u=createDropdownFromArray(ASRINTKEYS,v);break;case"recordingFormat":u=createDropdownFromArray(RECORDINGFORMAT,v);break;case"answer":u=createDropdownFromArray(BOOLSELECT,v);break;case"list_id":u=createDropdownFromTigerDialList(v);break;case"interval_id":u=createGroupedDropdownFromApi("/api/intervals",v,"name","id",i,"SubIntervals");break;case"project_id":u=createDropdownFromApi("/api/square/projects",v,"name","id",i,null,null,i.editor.getOrCreateFilename());break;case"odbc_id":u=createDropdownFromApi("/api/square/odbc",v,"name","id",i);break;case"file_id":u=createDropdownFromApi("/api/sounds",v,"display_name","id",i);break;case"timeout":case"digit":case"mindigit":case"maxdigit":case"response":case"retry":case"speed":(u=document.createElement("input")).setAttribute("type","number"),u.setAttribute("min",0),u.setAttribute("max",1e3),u.setAttribute("value",v),u.className="form-control";break;case"text":case"key":case"query":case"condition":case"command":case"body":(u=document.createElement("textarea")).innerHTML=v,u.className="form-control";break;case"sms_text":(u=document.createElement("textarea")).innerHTML=v,u.className="form-control",u.setAttribute("maxlength","160");break;default:(u=document.createElement("input")).setAttribute("value",v),u.className="form-control"}u.setAttribute("id",g);var f=i.createDiv("col-sm-8");if(f.appendChild(u),mxResources.get("help_"+p)){var A=i.createDiv("p");A.className="help-block",mxUtils.write(A,mxResources.get("help_"+p)),f.appendChild(A)}h.appendChild(f),c.appendChild(h)}n.appendChild(c);var E=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(e){for(var t=0;t<o.value.attributes.length;t++){var n="_"+o.value.attributes[t].name,a=o.value.attributes[t].name;o.setAttribute(a,document.getElementById(n).value)}s.refresh(o),i.hideDialog()}));E.className="btn blue";var y=mxUtils.button(mxResources.get("cancel"),function(){i.hideDialog()});y.className="btn default",a.appendChild(E),a.appendChild(y),e.appendChild(t),e.appendChild(n),e.appendChild(a),this.container=e}Editor=function(){mxEventSource.call(this),this.init(),this.initStencilRegistry(),this.graph=new Graph,this.outline=new mxOutline(this.graph),this.outline.updateOnPan=!0,this.undoManager=this.createUndoManager(),this.status="",this.filename=null,this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[counter])+".xml"},this.getFilename=function(){return this.filename},this.setStatus=function(e){this.status=e,this.fireEvent(new mxEventObject("statusChanged"))},this.getStatus=function(){return this.status},this.modified=!1,this.graphChangeListener=function(){this.modified=!0},this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)})),window.onbeforeunload=mxUtils.bind(this,function(){if(this.modified)return mxResources.get("allChangesLost")}),this.graph.resetViewOnRootChange=!1,this.graph.scrollbars=!0,this.graph.background=null},mxUtils.extend(Editor,mxEventSource),Editor.prototype.gridImage=IMAGE_PATH+"/grid.gif",Editor.prototype.transparentImage=IMAGE_PATH+"/transparent.gif",Editor.prototype.setGraphXml=function(e){var t=new mxCodec(e.ownerDocument);if("mxGraphModel"==e.nodeName){this.graph.view.scale=Number(e.getAttribute("scale")||1),this.graph.gridEnabled="0"!=e.getAttribute("grid"),this.graph.graphHandler.guidesEnabled="0"!=e.getAttribute("guides"),this.graph.setTooltips("0"!=e.getAttribute("tooltips")),this.graph.setConnectable("0"!=e.getAttribute("connect")),this.graph.foldingEnabled="0"!=e.getAttribute("fold"),this.graph.scrollbars="0"!=e.getAttribute("scrollbars"),this.graph.scrollbars||(this.graph.container.scrollLeft=0,this.graph.container.scrollTop=0,this.graph.view.translate.x=Number(e.getAttribute("dx")||0),this.graph.view.translate.y=Number(e.getAttribute("dy")||0)),this.graph.pageVisible="1"==e.getAttribute("page"),this.graph.pageBreaksVisible=this.graph.pageVisible,this.graph.preferPageSize=this.graph.pageBreaksVisible;var n=e.getAttribute("pageScale");this.graph.pageScale=null!=n?n:1.5;var a=e.getAttribute("pageWidth"),i=e.getAttribute("pageHeight");null!=a&&null!=i&&(this.graph.pageFormat=new mxRectangle(0,0,parseFloat(a),parseFloat(i)),this.outline.outline.pageFormat=this.graph.pageFormat);var o=e.getAttribute("background");null!=o&&0<o.length&&(this.graph.background=o),t.decode(e,this.graph.getModel()),this.updateGraphComponents()}},Editor.prototype.getGraphXml=function(){var e=new mxCodec(mxUtils.createXmlDocument()).encode(this.graph.getModel());return 0==this.graph.view.translate.x&&0==this.graph.view.translate.y||(e.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),e.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100)),1!=this.graph.view.scale&&e.setAttribute("scale",Math.round(1e3*this.graph.view.scale)/1e3),e.setAttribute("grid",this.graph.isGridEnabled()?"1":"0"),e.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0"),e.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0"),e.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0"),e.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0"),e.setAttribute("fold",this.graph.foldingEnabled?"1":"0"),e.setAttribute("page",this.graph.pageVisible?"1":"0"),e.setAttribute("pageScale",this.graph.pageScale),e.setAttribute("pageWidth",this.graph.pageFormat.width),e.setAttribute("pageHeight",this.graph.pageFormat.height),this.graph.scrollbars||e.setAttribute("scrollbars","0"),null!=this.graph.background&&e.setAttribute("background",this.graph.background),e},Editor.prototype.updateGraphComponents=function(){var e=this.graph,t=this.outline;if(null!=e.container&&null!=t.outline.container){null!=e.background?"none"==e.background?e.container.style.backgroundColor="transparent":(null!=e.view.backgroundPageShape&&(e.view.backgroundPageShape.fill=e.background,e.view.backgroundPageShape.reconfigure()),e.container.style.backgroundColor=e.background):e.container.style.backgroundColor="",e.pageVisible?(e.container.style.backgroundColor="#ebebeb",e.container.style.borderStyle="solid",e.container.style.borderColor="#e5e5e5",e.container.style.borderTopWidth="1px",e.container.style.borderLeftWidth="1px",e.container.style.borderRightWidth="0px",e.container.style.borderBottomWidth="0px"):e.container.style.border="",t.outline.container.style.backgroundColor=e.container.style.backgroundColor,t.outline.pageVisible==e.pageVisible&&t.outline.pageScale==e.pageScale||(t.outline.pageScale=e.pageScale,t.outline.pageVisible=e.pageVisible,t.outline.view.validate()),e.scrollbars&&"hidden"==e.container.style.overflow&&!touchStyle?e.container.style.overflow="auto":e.scrollbars&&!touchStyle||(e.container.style.overflow="hidden");var n=mxClient.IS_IE&&9<=document.documentMode?"url("+this.transparentImage+")":"none";e.container.style.backgroundImage=!e.pageVisible&&e.isGridEnabled()?"url("+this.gridImage+")":n,null!=e.view.backgroundPageShape&&(e.view.backgroundPageShape.node.style.backgroundImage=this.graph.isGridEnabled()?"url("+this.gridImage+")":"none")}},Editor.prototype.init=function(){mxClient.IS_IE6&&mxClient.link("stylesheet",CSS_PATH+"/grapheditor-ie6.css"),mxResources.loadDefaultBundle=!1,mxResources.add(RESOURCE_BASE),mxConstants.DEFAULT_HOTSPOT=.3;var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var n=e.apply(this,arguments);return n.intersects=mxUtils.bind(this,function(e,t){return!!this.isConnecting()||mxCellMarker.prototype.intersects.apply(n,arguments)}),n},mxConstants.SHADOWCOLOR="#d0d0d0",mxConstants.HANDLE_FILLCOLOR="#99ccff",mxConstants.HANDLE_STROKECOLOR="#0088cf",mxConstants.VERTEX_SELECTION_COLOR="#00a8ff",mxConstants.OUTLINE_COLOR="#00a8ff",mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff",mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff",mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff",mxConstants.EDGE_SELECTION_COLOR="#00a8ff",mxConstants.DEFAULT_VALID_COLOR="#00a8ff",mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff",mxConstants.GUIDE_COLOR="#0088cf",mxGraph.prototype.pageBreakColor="#c0c0c0",mxGraph.prototype.pageScale=1,mxRubberband.prototype.defaultOpacity=30,mxGraphView.prototype.createBackgroundPageShape=function(e){return new mxRectangleShape(e,this.graph.background||"white","#cacaca")},mxGraphView.prototype.getBackgroundPageBounds=function(){var e=this.getGraphBounds(),t=0<e.width?e.x/this.scale-this.translate.x:0,n=0<e.height?e.y/this.scale-this.translate.y:0,a=e.width/this.scale,i=e.height/this.scale,o=this.graph.pageFormat,s=this.graph.pageScale,r=o.width*s,l=o.height*s,d=Math.floor(Math.min(0,t)/r),c=Math.floor(Math.min(0,n)/l),m=Math.ceil(Math.max(1,t+a)/r)-d,u=Math.ceil(Math.max(1,n+i)/l)-c;return new mxRectangle(this.scale*(this.translate.x+d*r),this.scale*(this.translate.y+c*l),this.scale*m*r,this.scale*u*l)};var n=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(e,t){n.apply(this,arguments),this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=e+"px",this.view.backgroundPageShape.node.style.marginTop=t+"px")};var a=this;mxGraphView.prototype.validateBackground=function(){var e=this.graph.getBackgroundImage();if(null!=e){if(null==this.backgroundImage||this.backgroundImage.image!=e.src){null!=this.backgroundImage&&this.backgroundImage.destroy();var t=new mxRectangle(0,0,1,1);this.backgroundImage=new mxImageShape(t,e.src),this.backgroundImage.dialect=this.graph.dialect,this.backgroundImage.init(this.backgroundPane),this.backgroundImage.redraw()}this.redrawBackgroundImage(this.backgroundImage,e)}else null!=this.backgroundImage&&(this.backgroundImage.destroy(),this.backgroundImage=null);if(this.graph.pageVisible){t=this.getBackgroundPageBounds();null==this.backgroundPageShape?(this.backgroundPageShape=this.createBackgroundPageShape(t),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(this.graph.container),this.graph.container.firstChild.style.position="absolute",this.graph.container.insertBefore(this.backgroundPageShape.node,this.graph.container.firstChild),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",this.backgroundPageShape.node.style.backgroundPosition="-1px -1px",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(e){this.graph.dblClick(e)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(e){this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e))}),mxUtils.bind(this,function(e){null!=this.graph.tooltipHandler&&this.graph.tooltipHandler.isHideOnHover()&&this.graph.tooltipHandler.hide(),this.graph.isMouseDown&&!mxEvent.isConsumed(e)&&this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e))}),mxUtils.bind(this,function(e){this.graph.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e))}))):(this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=t,this.backgroundPageShape.redraw()),this.backgroundPageShape.node.style.backgroundImage=this.graph.isGridEnabled()?"url("+a.gridImage+")":"none"}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null)},mxGraph.prototype.updatePageBreaks=function(e,t,n){var a=this.view.scale,i=this.view.translate,o=this.pageFormat,s=a*this.pageScale,r=this.view.getBackgroundPageBounds();t=r.width,n=r.height;var l=new mxRectangle(a*i.x,a*i.y,o.width*s,o.height*s),d=(e=e&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(t/l.width)-1:0,c=e?Math.ceil(n/l.height)-1:0,m=r.x+t,u=r.y+n;if(null==this.horizontalPageBreaks&&0<d&&(this.horizontalPageBreaks=[]),null!=this.horizontalPageBreaks){for(var p=0;p<=d;p++){var g=[new mxPoint(r.x+(p+1)*l.width,r.y),new mxPoint(r.x+(p+1)*l.width,u)];if(null!=this.horizontalPageBreaks[p])this.horizontalPageBreaks[p].scale=1,this.horizontalPageBreaks[p].points=g,this.horizontalPageBreaks[p].redraw();else(v=new mxPolyline(g,this.pageBreakColor,this.scale)).dialect=this.dialect,v.isDashed=this.pageBreakDashed,v.addPipe=!1,v.scale=a,v.init(this.view.backgroundPane),v.redraw(),this.horizontalPageBreaks[p]=v}for(p=d;p<this.horizontalPageBreaks.length;p++)this.horizontalPageBreaks[p].destroy();this.horizontalPageBreaks.splice(d,this.horizontalPageBreaks.length-d)}if(null==this.verticalPageBreaks&&0<c&&(this.verticalPageBreaks=[]),null!=this.verticalPageBreaks){for(p=0;p<=c;p++){var v;g=[new mxPoint(r.x,r.y+(p+1)*l.height),new mxPoint(m,r.y+(p+1)*l.height)];if(null!=this.verticalPageBreaks[p])this.verticalPageBreaks[p].scale=1,this.verticalPageBreaks[p].points=g,this.verticalPageBreaks[p].redraw();else(v=new mxPolyline(g,this.pageBreakColor,a)).dialect=this.dialect,v.isDashed=this.pageBreakDashed,v.addPipe=!1,v.scale=a,v.init(this.view.backgroundPane),v.redraw(),this.verticalPageBreaks[p]=v}for(p=c;p<this.verticalPageBreaks.length;p++)this.verticalPageBreaks[p].destroy();this.verticalPageBreaks.splice(c,this.verticalPageBreaks.length-c)}},mxEdgeHandler.prototype.snapToTerminals=!0,mxGraphHandler.prototype.guidesEnabled=!0;var o=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(e,t,n){for(var a=0;a<t.length;a++)if(this.graph.getModel().isVertex(t[a])){var i=this.graph.getCellGeometry(t[a]);if(null!=i&&i.relative)return!1}return o.apply(this,arguments)},mxGuide.prototype.isEnabledForEvent=function(e){return!mxEvent.isAltDown(e)};var r=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,t,n,a,i,o){var s=r.apply(this,arguments);return null==o||o||mxEvent.addListener(s,"mousedown",function(e){mxEvent.consume(e)}),s};var s=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(e){var t=this.graph.getModel(),n=t.getParent(this.graph.getSelectionCell()),a=s.apply(this,arguments),i=t.getParent(a);if(null==n||n!=a&&n!=i)for(;!this.graph.isCellSelected(a)&&!this.graph.isCellSelected(i)&&t.isVertex(i)&&!this.graph.isValidRoot(i);)a=i,i=this.graph.getModel().getParent(a);return a};var l=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(e){var t=l.apply(this,arguments),n=this.graph.getModel(),a=n.getParent(this.graph.getSelectionCell()),i=n.getParent(e);return(null==a||a!=e&&a!=i)&&(this.graph.isCellSelected(e)||!n.isVertex(i)||this.graph.isValidRoot(i)||(t=!0)),t},mxGraphHandler.prototype.selectDelayed=function(e){var t=e.getCell();null==t&&(t=this.cell);for(var n=this.graph.getModel(),a=n.getParent(t);this.graph.isCellSelected(t)&&n.isVertex(a)&&!this.graph.isValidRoot(a);)t=a,a=n.getParent(t);this.graph.selectCellForEvent(t,e.getEvent())},mxPanningHandler.prototype.getCellForPopupEvent=function(e){for(var t=e.getCell(),n=this.graph.getModel(),a=n.getParent(t);n.isVertex(a)&&!this.graph.isValidRoot(a);)this.graph.isCellSelected(a)&&(t=a),a=n.getParent(a);return t}},Editor.prototype.createUndoManager=function(){var o=this.graph,n=new mxUndoManager,e=function(e,t){n.undoableEditHappened(t.getProperty("edit"))};o.getModel().addListener(mxEvent.UNDO,e),o.getView().addListener(mxEvent.UNDO,e);var t=function(e,t){for(var n=o.getSelectionCellsForChanges(t.getProperty("edit").changes),a=[],i=1;i<n.length;i++)null!=o.view.getState(n[i])&&a.push(n[i]);o.setSelectionCells(a)};return n.addListener(mxEvent.UNDO,t),n.addListener(mxEvent.REDO,t),n},Editor.prototype.initStencilRegistry=function(){mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/general.xml")},mxStencilRegistry.libraries={},mxStencilRegistry.packages=[],mxStencilRegistry.getStencil=function(e){var t=mxStencilRegistry.stencils[e];if(null==t){var n=mxStencilRegistry.getBasenameForStencil(e);if(null!=n){var a=mxStencilRegistry.libraries[n];if(null!=a){if(null==mxStencilRegistry.packages[n]){mxStencilRegistry.packages[n]=1;for(var i=0;i<a.length;i++){var o=a[i];if(".xml"==o.toLowerCase().substring(o.length-4,o.length))mxStencilRegistry.loadStencilSet(o,null);else if(".js"==o.toLowerCase().substring(o.length-3,o.length)){var s=mxUtils.load(o);null!=s&&eval.call(window,s.getText())}}}}else mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+n+".xml",null);t=mxStencilRegistry.stencils[e]}}return t},mxStencilRegistry.getBasenameForStencil=function(e){var t=e.split("."),n=null;if(0<t.length&&"mxgraph"==t[0]){n=t[1];for(var a=2;a<t.length-1;a++)n+="/"+t[a]}return n},mxStencilRegistry.loadStencilSet=function(e,t,n){n=null!=n&&n;var a=mxStencilRegistry.packages[e];if(n||null==a){var i=!1;null==a&&(a=mxUtils.load(e).getXml(),mxStencilRegistry.packages[e]=a,i=!0),mxStencilRegistry.parseStencilSet(a,t,i)}},mxStencilRegistry.parseStencilSet=function(e,t,n){n=null==n||n;var a=e.documentElement,i=a.firstChild,o="",s=a.getAttribute("name");for(null!=s&&(o=s+".");null!=i;){if(i.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=(s=i.getAttribute("name"))){o=o.toLowerCase();var r=s.replace(/ /g,"_");if(n&&mxStencilRegistry.addStencil(o+r.toLowerCase(),new mxStencil(i)),null!=t){var l=i.getAttribute("w"),d=i.getAttribute("h");t(o,r,s,l=null==l?80:parseInt(l,10),d=null==d?80:parseInt(d,10))}}i=i.nextSibling}},OpenFile=function(e){this.producer=null,this.consumer=null,this.done=e},OpenFile.prototype.setConsumer=function(e){this.consumer=e,this.execute()},OpenFile.prototype.setData=function(e,t){this.data=e,this.filename=t,this.execute()},OpenFile.prototype.error=function(e){this.cancel(),mxUtils.alert(e)},OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.data&&(this.consumer(this.data,this.filename),this.cancel())},OpenFile.prototype.cancel=function(){null!=this.done&&this.done()},Sidebar.prototype.init=function(){var e=STENCIL_PATH;this.addSearchPalette(!0),this.addImagePalette("entry",mxResources.get("entry"),e+"/entry/","_128x128.png",["start","finally","end"],[mxResources.get("start"),mxResources.get("finally"),mxResources.get("end")]),this.addImagePalette("call_management",mxResources.get("call_management"),e+"/call_management/","_128x128.png",["answer","hangup","dial","ext_dial","queue","voicemail","callback"],[mxResources.get("answer"),mxResources.get("hangup"),mxResources.get("dial"),mxResources.get("ext_dial"),mxResources.get("queue"),mxResources.get("voicemail"),mxResources.get("callback")]),this.addImagePalette("agent_management",mxResources.get("agent_management"),e+"/agent_management/","_128x128.png",["login","pause","unpause","logout"],[mxResources.get("login"),mxResources.get("pause"),mxResources.get("unpause"),mxResources.get("logout")]),this.addImagePalette("variable",mxResources.get("variable"),e+"/variable/","_128x128.png",["set","math"],[mxResources.get("set"),mxResources.get("math")]),this.addImagePalette("playback",mxResources.get("playback"),e+"/playback/","_128x128.png",["playback","menu","saydigits","saynumber","sayphonetic","getdigits","getsecretdigits"],[mxResources.get("playback"),mxResources.get("menu"),mxResources.get("saydigits"),mxResources.get("saynumber"),mxResources.get("sayphonetic"),mxResources.get("getdigits"),mxResources.get("getsecretdigits")]),this.addImagePalette("recording",mxResources.get("recording"),e+"/recording/","_128x128.png",["record"],[mxResources.get("record")]),this.addImagePalette("tts","TTS",e+"/tts/","_128x128.png",["tts","ispeechtts","awspolly","lumenvoxtts"],["GoogleTTS","ISpeechTTS","AWSPolly","LumenvoxTTS"]),this.addImagePalette("asr","ASR",e+"/asr/","_128x128.png",["googleasr","ispeechasr","lumenvoxasr","tildeasr"],["GoogleASR","ISpeechASR","LumenvoxASR","TildeASR"]),this.addImagePalette("integrationServer",mxResources.get("integrationServer"),e+"/integration_server/","_128x128.png",["database","sendMail","sendSMS"],[mxResources.get("database"),mxResources.get("sendMail"),mxResources.get("sendSMS")]),this.addImagePalette("callflow",mxResources.get("callflow"),e+"/callflow/","_128x128.png",["gotoc","gotoif","gotoiftime","vswitch"],[mxResources.get("gotoc"),mxResources.get("gotoif"),mxResources.get("gotoiftime"),mxResources.get("vswitch")]),this.addImagePalette("stats",mxResources.get("stats"),e+"/stats/","_128x128.png",["goal"],[mxResources.get("goal")]),this.addImagePalette("general",mxResources.get("general"),e+"/general/","_128x128.png",["noop","system","agi","subproject","custom_app"],[mxResources.get("noop"),mxResources.get("system"),mxResources.get("agi"),mxResources.get("subproject"),mxResources.get("custom_app")])},Sidebar.prototype.collapsedImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQANAIABAJmZmf///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozNUQyRTJFNjZGNUYxMUU1QjZEOThCNDYxMDQ2MzNCQiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDozNUQyRTJFNzZGNUYxMUU1QjZEOThCNDYxMDQ2MzNCQiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjFERjc3MEUxNkY1RjExRTVCNkQ5OEI0NjEwNDYzM0JCIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjFERjc3MEUyNkY1RjExRTVCNkQ5OEI0NjEwNDYzM0JCIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAQAsAAAAAA0ADQAAAhSMj6lrwAjcC1GyahV+dcZJgeIIFgA7":IMAGE_PATH+"/collapsed.gif",Sidebar.prototype.expandedImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQANAIABAJmZmf///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxREY3NzBERjZGNUYxMUU1QjZEOThCNDYxMDQ2MzNCQiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxREY3NzBFMDZGNUYxMUU1QjZEOThCNDYxMDQ2MzNCQiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjFERjc3MERENkY1RjExRTVCNkQ5OEI0NjEwNDYzM0JCIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjFERjc3MERFNkY1RjExRTVCNkQ5OEI0NjEwNDYzM0JCIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAQAsAAAAAA0ADQAAAhGMj6nL3QAjVHIu6azbvPtWAAA7":IMAGE_PATH+"/expanded.gif",Sidebar.prototype.tooltipImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAbCAMAAAB7jU7LAAAACVBMVEX///+ZmZn///9Y2COLAAAAA3RSTlP//wDXyg1BAAAAOElEQVR42mXQMQ4AMAgDsWv//+iutcJmIQSk+9dJpVKpVCqVSqVSqZTdncWzF8/NeP7FkxWenPEDOnUBiL3jWx0AAAAASUVORK5CYII=":IMAGE_PATH+"/tooltip.png",Sidebar.prototype.searchImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAEaSURBVHjabNGxS5VxFIfxz71XaWuQUJCG/gCHhgTD9VpEETg4aMOlQRp0EoezObgcd220KQiXmpretTAHQRBdojlQEJyukPdt+b1ywfvAGc7wnHP4nlZd1yKijQW8xzNc4Su+ZOYfQ3T6/f4YNvEJYzjELXp4VVXVz263+7cR2niBxAFeZ2YPi3iHR/gYERPDwhpOsd6sz8x/mfkNG3iOlWFhFj8y89J9KvzGXER0GuEaD42mgwHqUtoljbcRsTBCeINpfM/MgZLKPpaxFxGbOCqDXmILN7hoJrTKH+axhxmcYRxP0MIDnOBDZv5q1XUNIuJxifJp+UNV7t7BFM6xeic0RMQ4Bpl5W/ol7GISx/eEUUTECrbx+f8A8xhiZht9zsgAAAAASUVORK5CYII=":IMAGE_PATH+"/search.png",Sidebar.prototype.enableTooltips=!0,Sidebar.prototype.tooltipBorder=16,Sidebar.prototype.tooltipDelay=300,Sidebar.prototype.dropTargetDelay=200,Sidebar.prototype.thumbWidth=36,Sidebar.prototype.thumbHeight=36,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2,Sidebar.prototype.sidebarTitleSize=9,Sidebar.prototype.sidebarTitles=!1,Sidebar.prototype.tooltipTitles=!0,Sidebar.prototype.maxTooltipWidth=400,Sidebar.prototype.maxTooltipHeight=400,Sidebar.prototype.addStencilsToIndex=!0,Sidebar.prototype.defaultImageWidth=80,Sidebar.prototype.defaultImageHeight=80,Sidebar.prototype.getOffset=function(e){return{left:(e=e.getBoundingClientRect()).left+window.scrollX,top:e.top+window.scrollY}},Sidebar.prototype.showTooltip=function(c,m,u,p,g,v){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=c){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var e=mxUtils.bind(this,function(){null==this.tooltip&&(this.tooltip=document.createElement("div"),this.tooltip.className="geSidebarTooltip",this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1,document.body.appendChild(this.tooltip),this.graph2=new Graph(this.tooltip,null,null,this.editorUi.editor.graph.getStylesheet()),this.graph2.resetViewOnRootChange=!1,this.graph2.foldingEnabled=!1,this.graph2.gridEnabled=!1,this.graph2.autoScroll=!1,this.graph2.setTooltips(!1),this.graph2.setConnectable(!1),this.graph2.setEnabled(!1),mxClient.IS_SVG||(this.graph2.view.canvas.style.position="relative"),this.tooltipImage=mxUtils.createImage(this.tooltipImage),this.tooltipImage.className="geSidebarTooltipImage",this.tooltipImage.style.zIndex=mxPopupMenu.prototype.zIndex-1,this.tooltipImage.style.position="absolute",this.tooltipImage.style.width="14px",this.tooltipImage.style.height="27px",document.body.appendChild(this.tooltipImage)),this.graph2.model.clear(),this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder),u>this.maxTooltipWidth||p>this.maxTooltipHeight?this.graph2.view.scale=Math.round(100*Math.min(this.maxTooltipWidth/u,this.maxTooltipHeight/p))/100:this.graph2.view.scale=1,this.tooltip.style.display="block",this.graph2.labelsVisible=null==v||v,this.graph2.addCells(m);var e=this.graph2.getGraphBounds(),t=e.width+2*this.tooltipBorder+4,n=e.height+2*this.tooltipBorder;if(mxClient.IS_QUIRKS?(n+=4,this.tooltip.style.overflow="hidden"):this.tooltip.style.overflow="visible",this.tooltipImage.style.visibility="visible",this.tooltip.style.width=t+"px",this.tooltipTitles&&null!=g&&0<g.length){null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.style.borderTop="1px solid gray",this.tooltipTitle.style.textAlign="center",this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",mxClient.IS_SVG||(this.tooltipTitle.style.position="absolute"),this.tooltipTitle.style.paddingTop="6px",this.tooltip.appendChild(this.tooltipTitle)):this.tooltipTitle.innerHTML="",this.tooltipTitle.style.display="",mxUtils.write(this.tooltipTitle,g);var a=this.tooltipTitle.offsetHeight+10;n+=a,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-a+"px":(n-=6,this.tooltipTitle.style.top=n-a+"px")}else null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");this.tooltip.style.height=n+"px";var i=-Math.round(e.x-this.tooltipBorder),o=-Math.round(e.y-this.tooltipBorder),s=document.body,r=document.documentElement,l=(s.clientHeight||r.clientHeight,document.getElementById("vertical-navigation").offsetWidth+this.container.clientWidth),d=Math.max(0,this.getOffset(c).top-this.container.scrollTop-n/2+16);mxClient.IS_SVG?0!=i||0!=o?this.graph2.view.canvas.setAttribute("transform","translate("+i+","+o+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=i+"px",this.graph2.view.drawPane.style.top=o+"px"),this.tooltip.style.position="absolute",this.tooltip.style.left=l+"px",this.tooltip.style.top=d+"px",this.tooltipImage.style.left=l-13+"px",this.tooltipImage.style.top=d+n/2-13+"px"});null!=this.tooltip&&"none"!=this.tooltip.style.display?e():this.thread=window.setTimeout(e,this.tooltipDelay),this.currentElt=c}},Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null),null!=this.tooltip&&(this.tooltip.style.display="none",this.tooltipImage.style.visibility="hidden",this.currentElt=null)},Sidebar.prototype.addEntry=function(e,t){if(null!=this.taglist&&null!=e&&0<e.length)for(var n=e.toLowerCase().replace(/[\/\,\(\)]/g," ").split(" "),a=0;a<n.length;a++)if(n[a]=n[a].replace(/\.*\d*$/,""),1<n[a].length){var i=this.taglist[n[a]];null==i&&(i={entries:[],dict:new mxDictionary},this.taglist[n[a]]=i),null==i.dict.get(t)&&(i.dict.put(t,t),i.entries.push(t))}return t},Sidebar.prototype.searchEntries=function(e,t,n,a,i){if(null!=this.taglist&&null!=e){for(var o=e.toLowerCase().split(" "),s=new mxDictionary,r=(n+1)*t,l=[],d=0,c=0;c<o.length;c++)if(0<o[c].length){var m=this.taglist[o[c]],u=new mxDictionary;if(null!=m){var p=m.entries;l=[];for(var g=0;g<p.length;g++){m=p[g];if(0==d==(null==s.get(m))&&(u.put(m,m),l.push(m),c==o.length-1&&l.length==r))return void a(l.slice(n*t,r),r,!0)}}else l=[];s=u,d++}var v=l.length;a(l.slice(n*t,(n+1)*t),v,!1)}else a([])},Sidebar.prototype.filterTags=function(e){if(null!=e){for(var t=e.split(" "),n=[],a={},i=0;i<t.length;i++)null==a[t[i]]&&(a[t[i]]="1",n.push(t[i]));return n.join(" ")}return null},Sidebar.prototype.cloneCell=function(e,t){var n=e.clone();return null!=t&&(n.value=t),n},Sidebar.prototype.addSearchPalette=function(e){var t=document.createElement("div");t.style.visibility="hidden",this.container.appendChild(t);var r=document.createElement("div");r.className="geSidebar",r.style.boxSizing="border-box",r.style.overflow="hidden",r.style.width="100%",r.style.padding="8px",r.style.paddingTop="14px",r.style.paddingBottom="0px",e||(r.style.display="none");var n=document.createElement("div");n.style.whiteSpace="nowrap",n.style.textOverflow="clip",n.style.paddingBottom="8px",n.style.cursor="default";var a=document.createElement("input");a.setAttribute("placeholder",mxResources.get("searchShapes")),a.setAttribute("type","text"),a.style.fontSize="12px",a.style.overflow="hidden",a.style.boxSizing="border-box",a.style.border="solid 1px #d5d5d5",a.style.borderRadius="4px",a.style.width="100%",a.style.outline="none",a.style.padding="6px",n.appendChild(a);var i,o=document.createElement("img");o.setAttribute("src",Sidebar.prototype.searchImage),o.setAttribute("title",mxResources.get("search")),o.style.position="relative",o.style.left="-18px",mxClient.IS_QUIRKS?(a.style.height="28px",o.style.top="-4px"):o.style.top="2px",o.style.background="url('"+this.editorUi.editor.transparentImage+"')",n.appendChild(o),r.appendChild(n);var l=document.createElement("center"),d=mxUtils.button(mxResources.get("moreResults"),function(){i()});d.style.display="none",d.style.lineHeight="normal",d.style.marginTop="4px",d.style.marginBottom="8px",l.style.paddingTop="4px",l.style.paddingBottom="8px",l.appendChild(d),r.appendChild(l);var c="",m=!1,u=!1,p=0,g=new Object,v=12,h=mxUtils.bind(this,function(){m=!1,this.currentSearch=null;for(var e=r.firstChild;null!=e;){var t=e.nextSibling;e!=n&&e!=l&&e.parentNode.removeChild(e),e=t}});i=mxUtils.bind(this,function(){if(v=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10))),this.hideTooltip(),""!=a.value){if(null!=l.parentNode&&(c!=a.value&&(h(),c=a.value,g=new Object,u=!1,p=0),!m&&!u)){d.setAttribute("disabled","true"),d.style.display="",d.style.cursor="wait",d.innerHTML=mxResources.get("loading")+"...",m=!0;var s=new Object;this.currentSearch=s,this.searchEntries(c,v,p,mxUtils.bind(this,function(e,t,n){if(this.currentSearch==s){e=null!=e?e:[],m=!1,p++,l.parentNode.removeChild(l);for(var a=0;a<e.length;a++){var i=e[a]();null==g[i.innerHTML]&&(g[i.innerHTML]="1",r.appendChild(e[a]()))}if(n?(d.removeAttribute("disabled"),d.innerHTML=mxResources.get("moreResults")):(d.innerHTML=mxResources.get("reset"),d.style.display="none",u=!0),d.style.cursor="",0==e.length&&1==p){var o=document.createElement("div");o.className="geTitle",o.style.backgroundColor="transparent",o.style.borderColor="transparent",o.style.color="gray",o.style.padding="0px",o.style.margin="0px 8px 0px 8px",o.style.paddingTop="6px",o.style.textAlign="center",o.style.cursor="default",mxUtils.write(o,mxResources.get("noResultsFor",[c])),r.appendChild(o)}r.appendChild(l)}}),mxUtils.bind(this,function(){d.style.cursor=""}))}}else h(),a.value="",c="",g=new Object,d.style.display="none",u=!1,a.focus()}),mxEvent.addListener(a,"keydown",mxUtils.bind(this,function(e){13==e.keyCode&&i()})),mxEvent.addListener(a,"focus",function(){a.style.paddingRight="",o.style.display="none"}),mxEvent.addListener(a,"blur",function(){a.style.paddingRight="20px",o.style.display=""}),a.style.paddingRight="20px",mxEvent.addListener(a,"keyup",mxUtils.bind(this,function(e){""==a.value?(u=!0,d.style.display="none"):a.value!=c?(d.style.display="none",u=!1):m||(d.style.display=u?"none":"")})),mxEvent.addListener(a,"mousedown",function(e){e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0}),mxEvent.addListener(a,"selectstart",function(e){e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0});var s=document.createElement("div");s.appendChild(r),this.container.appendChild(s),this.palettes.search=[t,s]},Sidebar.prototype.createTitle=function(e){var t=document.createElement("a");return t.setAttribute("href","javascript:void(0);"),t.setAttribute("title",mxResources.get("sidebarTooltip")),t.className="geTitle",mxUtils.write(t,e),t},Sidebar.prototype.createThumb=function(e,t,n,a,i,o,s,r,l){this.graph.labelsVisible=null==o||o;var d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject,this.graph.view.scaleAndTranslate(1,0,0),this.graph.addCells(e);var c=this.graph.getGraphBounds(),m=Math.floor(100*Math.min((t-2*this.thumbBorder)/c.width,(n-2*this.thumbBorder)/c.height))/100;this.graph.view.scaleAndTranslate(m,Math.floor((t-c.width*m)/2/m-c.x),Math.floor((n-c.height*m)/2/m-c.y));var u=null;if(this.graph.dialect!=mxConstants.DIALECT_SVG||mxClient.NO_FO?(u=this.graph.container.cloneNode(!1)).innerHTML=this.graph.container.innerHTML:u=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0),this.graph.getModel().clear(),mxClient.NO_FO=d,mxClient.IS_IE6&&(a.style.backgroundImage="url("+this.editorUi.editor.transparentImage+")"),u.style.position="relative",u.style.overflow="hidden",u.style.cursor="move",u.style.left=this.thumbBorder+"px",u.style.top=this.thumbBorder+"px",u.style.width=t+"px",u.style.height=n+"px",u.style.visibility="",u.style.minWidth="",u.style.minHeight="",a.appendChild(u),this.sidebarTitles&&null!=i&&0!=s){var p=mxClient.IS_QUIRKS?2*this.thumbPadding+2:0;a.style.height=this.thumbHeight+p+this.sidebarTitleSize+8+"px";var g=document.createElement("div");g.style.fontSize=this.sidebarTitleSize+"px",g.style.color="#303030",g.style.textAlign="center",g.style.whiteSpace="nowrap",mxClient.IS_IE&&(g.style.height=this.sidebarTitleSize+12+"px"),g.style.paddingTop="4px",mxUtils.write(g,i),a.appendChild(g)}return c},Sidebar.prototype.createItem=function(t,n,a,e,i,o,s){var r=document.createElement("a");r.setAttribute("href","javascript:void(0);"),r.className="geItem",r.style.overflow="hidden";var l=mxClient.IS_QUIRKS?8+2*this.thumbPadding:2*this.thumbBorder;r.style.width=this.thumbWidth+l+"px",r.style.height=this.thumbHeight+l+"px",r.style.padding=this.thumbPadding+"px",mxEvent.addListener(r,"click",function(e){mxEvent.consume(e)}),this.createThumb(t,this.thumbWidth,this.thumbHeight,r,n,a,e,i,o);var d=new mxRectangle(0,0,i,o);if(1<t.length||t[0].vertex){var c=this.createDragSource(r,this.createDropHandler(t,!0,s,d),this.createDragPreview(i,o),t,d);this.addClickHandler(r,c,t),c.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})}else if(null!=t[0]&&t[0].edge){c=this.createDragSource(r,this.createDropHandler(t,!1,s,d),this.createDragPreview(i,o),t,d);this.addClickHandler(r,c,t)}return mxClient.IS_IOS||mxEvent.addGestureListeners(r,null,mxUtils.bind(this,function(e){this.showTooltip(r,t,d.width,d.height,n,a)})),r},Sidebar.prototype.createDropHandler=function(g,v,h,b){return h=null==h||h,mxUtils.bind(this,function(e,t,n,a,i){if(e.isEnabled()){if(0<(g=e.getImportableCells(g)).length){e.stopEditing();var o=null!=n&&e.isValidDropTarget(n,g,t),s=null;if(null==n||o||(n=null),!e.isCellLocked(n||e.getDefaultParent())){e.model.beginUpdate();try{if(a=Math.round(a),i=Math.round(i),v&&e.isSplitTarget(n,g,t)){var r=e.cloneCells(g);e.splitEdge(n,r,null,a-b.width/2,i-b.height/2),s=r}else 0<g.length&&(s=e.importCells(g,a,i,n));if(null!=e.layoutManager){var l=e.layoutManager.getLayout(n);if(null!=l)for(var d=e.view.scale,c=e.view.translate,m=(a+c.x)*d,u=(i+c.y)*d,p=0;p<s.length;p++)l.moveCell(s[p],m,u)}h&&e.fireEvent(new mxEventObject("cellsInserted","cells",s))}finally{e.model.endUpdate()}null!=s&&0<s.length&&(e.scrollCellToVisible(s[0]),e.setSelectionCells(s))}}mxEvent.consume(t)}})},Sidebar.prototype.createDragPreview=function(e,t){var n=document.createElement("div");return n.style.border="1px dashed black",n.style.width=e+"px",n.style.height=t+"px",n},Sidebar.prototype.createDragSource=function(e,t,n){var a=mxUtils.makeDraggable(e,this.editorUi.editor.graph,t,n,0,0,this.editorUi.editor.graph.autoscroll,!0,!0);return a.getDropTarget=function(e,t,n){var a=mxDragSource.prototype.getDropTarget.apply(this,arguments);return e.isValidRoot(a)||(a=null),a},a},Sidebar.prototype.addClickHandler=function(e,a){var i=this.editorUi.editor.graph,o=null;mxEvent.addGestureListeners(e,function(e){o=new mxPoint(mxEvent.getClientX(e),mxEvent.getClientY(e))});var s=a.mouseUp;a.mouseUp=function(e){if(!mxEvent.isPopupTrigger(e)&&null==this.currentGraph&&null!=o){var t=i.tolerance;if(Math.abs(o.x-mxEvent.getClientX(e))<=t&&Math.abs(o.y-mxEvent.getClientY(e))<=t){var n=i.getGridSize();a.drop(i,e,null,n,n)}}s.apply(this,arguments),o=null}},Sidebar.prototype.createVertexTemplateEntry=function(e,t,n,a,i,o,s,r){return r=null!=r&&0<r.length?r:i.toLowerCase(),this.addEntry(r,mxUtils.bind(this,function(){return this.createVertexTemplate(e,t,n,a,i,o,s)}))},Sidebar.prototype.createXmlDocument=function(e,t,n,a){var i=mxUtils.createXmlDocument().createElement(e);return i.setAttribute("label",t),n.forEach(function(e,t){i.setAttribute(e,a[t]?a[t]:"")}),i},Sidebar.prototype.createVertexTemplate=function(e,t,n,a,i,o,s,r){var l=[],d=[];switch(a){case"answer":l=["timeout"],d=["0"];break;case"start":l=["answer"],d=["yes"];break;case"googleasr":l=["key","google_asr_language","timeout","intKey","beep"],d=["","it-IT","10","#","BEEP"];break;case"tildeasr":l=["uri","appid","appsecret","timeout","intKey","beep"],d=["wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE","","","10","#","BEEP"];break;case"ispeechasr":l=["key","model","ispeech_asr_language","timeout","intKey","beep"],d=["","","it-IT","10","#","BEEP"];break;case"playback":l=["file_id","opts"],d=["0"];break;case"background":l=["file_id","response","digit"],d=["0","5","1"];break;case"menu":l=["file_id","response","digit","retry","variable_id"],d=["0","5","1","1","0"];break;case"getdigits":l=["file_id","response","mindigit","maxdigit","retry","variable_id"],d=["0","5","1","10","1","0"];break;case"getsecretdigits":l=["file_id","response","mindigit","maxdigit","retry","hiddendigitsnum","hiddendigitspos","variable_id"],d=["0","5","1","10","1","0","first","0"];break;case"custom_app":l=["application","options"],d=["",""];break;case"set":l=["variable_id","variable_value"],d=["0",""];break;case"database":l=["odbc_id","query","variable_id"],d=["0","",""];break;case"noop":l=["output"],d=[];break;case"gotoc":l=["context","extension","priority"],d=["","","1"];break;case"system":l=["variable_id","command"],d=[];break;case"agi":l=["command","args"],d=[];break;case"gotoif":l=["condition"],d=[];break;case"gotoiftime":l=["interval_id"],d=["0"];break;case"vswitch":l=["variable_id"],d=["0"];break;case"saydigits":l=["digits","escape_digits"],d=["","#"];break;case"saynumber":l=["number","escape_digits"],d=["","#"];break;case"sayphonetic":l=["text","escape_digits"],d=["","#"];break;case"record":l=["file","recordingFormat","timeout","escape_digits"],d=["","wav","-1","#"];break;case"dial":l=["sip_id","timeout","opts","url"],d=["0","60"];break;case"ext_dial":l=["phone","trunk_name","timeout","opts","url"],d=["","-1","60"];break;case"tts":l=["text","google_tts_language"],d=["","it"];break;case"ispeechtts":l=["text","key","ispeech_tts_language","speed","intKey"],d=["","","euritalianfemale","0","#"];break;case"lumenvoxtts":l=["text","options"],d=["",""];break;case"lumenvoxasr":l=["grammar","options"],d=["",""];break;case"awspolly":l=["aws_access_key_id","aws_secret_access_key","aws_polly_region","aws_polly_voice","text"],d=["","","eu-west-1","Amy",""];break;case"queue":l=["queue_id","opts","url","file_id","timeout","agi","macro","gosub","position"],d=["-1","xX","","","300"];break;case"voicemail":l=["mailbox","options"],d=["",""];break;case"subproject":l=["project_id"],d=["0"];break;case"math":l=["operation","variable_id"],d=["","0"];break;case"queuelog":l=["queuename","agent","queue_event","data1","data2","data3","data4","data5"],d=[];break;case"goal":l=["goalname"],d=[];break;case"callback":l=["name","lastName","phone","list_id","delay","callback_priority"],d=["{CALLERID(name)}","","{CALLERID(num)}","-1","5","2"];break;case"sendSMS":l=["sms_account_id","to","sms_text"],d=["0"];break;case"sendMail":l=["account_id","to","cc","bcc","subject","text"],d=["0"];break;case"sendFax":l=["account_id","to","choose_attachment","attachment_name","attachment_type","attachment_path"],d=["0"];break;case"login":case"unpause":case"logout":l=["findBy"],d=["internal"];break;case"pause":l=["findBy","pause_id"],d=["internal",""];break;default:l=[],d=[]}var c=[new mxCell(this.createXmlDocument(a,i,l,d),new mxGeometry(0,0,t,n),e)];return c[0].vertex=!0,this.createVertexTemplateFromCells(c,t,n,i,o,s,r)},Sidebar.prototype.createVertexTemplateFromCells=function(e,t,n,a,i,o,s){return this.createItem(e,a,i,o,t,n,s)},Sidebar.prototype.createEdgeTemplate=function(e,t,n,a,i,o,s){var r=new mxCell(null!=a?a:"",new mxGeometry(0,0,t,n),e);return r.geometry.setTerminalPoint(new mxPoint(0,n),!0),r.geometry.setTerminalPoint(new mxPoint(t,0),!1),r.geometry.relative=!0,r.edge=!0,this.createEdgeTemplateFromCells([r],t,n,i,o,s)},Sidebar.prototype.createEdgeTemplateFromCells=function(e,t,n,a,i,o){return this.createItem(e,a,i,!0,t,n,o)},Sidebar.prototype.addPaletteFunctions=function(e,t,n,a){this.addPalette(e,t,n,mxUtils.bind(this,function(e){for(var t=0;t<a.length;t++)e.appendChild(a[t](e))}))},Sidebar.prototype.addPalette=function(e,t,n,a){var i=this.createTitle(t);this.container.appendChild(i);var o=document.createElement("div");o.className="geSidebar",mxClient.IS_POINTER&&(o.style.touchAction="none"),mxEvent.addListener(o,"mousemove",mxUtils.bind(this,function(e){mxEvent.getSource(e)==o?o.setAttribute("title",mxResources.get("sidebarTooltip")):o.removeAttribute("title")})),n?(a(o),a=null):o.style.display="none",this.addFoldingHandler(i,o,a);var s=document.createElement("div");return s.appendChild(o),this.container.appendChild(s),null!=e&&(this.palettes[e]=[i,s]),o},Sidebar.prototype.addFoldingHandler=function(n,a,i){var o=!1;(!mxClient.IS_IE||8<=document.documentMode)&&(n.style.backgroundImage="none"==a.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')"),n.style.backgroundRepeat="no-repeat",n.style.backgroundPosition="0% 50%",mxEvent.addListener(n,"click",mxUtils.bind(this,function(e){if("none"==a.style.display){if(o)a.style.display="block";else if(o=!0,null!=i){n.style.cursor="wait";var t=n.innerHTML;n.innerHTML=mxResources.get("loading")+"...",window.setTimeout(function(){var e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject,i(a),mxClient.NO_FO=e,a.style.display="block",n.style.cursor="",n.innerHTML=t},0)}else a.style.display="block";n.style.backgroundImage="url('"+this.expandedImage+"')"}else n.style.backgroundImage="url('"+this.collapsedImage+"')",a.style.display="none";mxEvent.consume(e)}))},Sidebar.prototype.addImagePalette=function(e,t,o,s,r,n,a){for(var l=[],d=0;d<r.length;d++)mxUtils.bind(this,function(e,t,n){if(null==n){var a=e.lastIndexOf("/"),i=e.lastIndexOf(".");n=e.substring(0<=a?a+1:0,0<=i?i:e.length).replace(/[-_]/g," ")}l.push(this.createVertexTemplateEntry("image;html=1;labelBackgroundColor=#ffffff;image="+o+e+s,this.defaultImageWidth,this.defaultImageHeight,r[d],t,!1,!0,this.filterTags(n)))})(r[d],null!=n?n[d]:null,null!=a?a[r[d]]:null);this.addPaletteFunctions(e,t,!1,l)},"undefined"!=typeof html4&&(html4.ATTRIBS["a::target"]=0),mxConstants.SHADOW_OPACITY=.25,mxConstants.SHADOWCOLOR="#000000",mxConstants.VML_SHADOWCOLOR="#d0d0d0",mxGraph.prototype.pageBreakColor="#c0c0c0",mxGraph.prototype.pageScale=1,function(){try{if(null!=navigator&&null!=navigator.language){var e=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===e||"en-ca"===e||"es-mx"===e?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}}(),mxText.prototype.baseSpacingTop=5,mxText.prototype.baseSpacingBottom=1,mxGraphModel.prototype.ignoreRelativeEdgeParent=!1,mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif",mxGraphView.prototype.gridSteps=4,mxGraphView.prototype.minGridSize=4,mxGraphView.prototype.gridColor="#e0e0e0",mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]",Graph=function(e,t,n,a){mxGraph.call(this,e,t,n,a),this.setConnectable(!0),this.setDropEnabled(!1),this.setPanning(!0),this.setTooltips(!mxClient.IS_TOUCH),this.setAllowLoops(!1),this.setMultigraph(!1),this.allowAutoPanning=!0,this.resetEdgesOnConnect=!1,this.constrainChildren=!1,this.connectionHandler.targetConnectImage=!0,this.setAllowDanglingEdges(!1),this.connectionHandler.setCreateTarget(!1),this.connectionHandler.isValidSource=function(){return mxConnectionHandler.prototype.isValidSource.apply(this,arguments)&&"2"!=urlParams.connect},this.alternateEdgeStyle="vertical",null==a&&this.loadStylesheet();var i=new mxRubberband(this);this.getRubberband=function(){return i},this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.container.style.cursor="pointer"})),this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.container.style.cursor="default"})),this.isHtmlLabel=function(e){var t=this.view.getState(e),n=null!=t?t.style:this.getCellStyle(e);return"1"==n.html||"wrap"==n.whiteSpace},this.cellRenderer.getLabelValue=function(e){var t=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);return"wrap"==e.style.whiteSpace&&1!=e.style.html&&(t=mxUtils.htmlEntities(t,!1)),t},this.isCellLocked=function(e){return!1},this.connectionHandler.tapAndHoldTolerance=16;var o=this.connectionHandler.tapAndHold;this.connectionHandler.tapAndHold=function(e,t){null==t?this.graph.panningHandler.active||(i.start(e.getGraphX(),e.getGraphY()),this.graph.panningHandler.panningTrigger=!1):tapAndHoldStartsConnection?o.apply(this,arguments):this.graph.isCellSelected(t.cell)&&1<this.graph.getSelectionCount()&&this.graph.removeSelectionCell(t.cell)},touchStyle&&this.initTouch()},mxUtils.extend(Graph,mxGraph),Graph.prototype.minFitScale=null,Graph.prototype.maxFitScale=null,Graph.prototype.loadStylesheet=function(){var e=mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement();new mxCodec(e.ownerDocument).decode(e,this.getStylesheet())},Graph.prototype.flipEdge=function(e){if(null!=e){var t=this.view.getState(e),n=null!=t?t.style:this.getCellStyle(e);if(null!=n){var a=mxUtils.getValue(n,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,a,[e])}}},Graph.prototype.setDefaultEdge=function(e){if(null!=e&&this.getModel().isEdge(e)){var t=this.getModel().cloneCells([e])[0];null!=t.geometry&&(t.geometry.points=null);var n=t.getStyle();n=mxUtils.setStyle(n,mxConstants.STYLE_ENTRY_X,null),n=mxUtils.setStyle(n,mxConstants.STYLE_ENTRY_Y,null),n=mxUtils.setStyle(n,mxConstants.STYLE_EXIT_X,null),n=mxUtils.setStyle(n,mxConstants.STYLE_EXIT_Y,null),t.setStyle(n),this.connectionHandler.createEdgeState=function(e){return this.graph.view.createState(t)},this.connectionHandler.factoryMethod=function(){return this.graph.cloneCells([t])[0]}}},Graph.prototype.isCellFoldable=function(e){return this.foldingEnabled&&this.isSwimlane(e)},Graph.prototype.isValidRoot=function(e){return this.isSwimlane(e)},Graph.prototype.createGroupCell=function(){var e=mxGraph.prototype.createGroupCell.apply(this,arguments);return e.setStyle("group"),e},Graph.prototype.getTooltipForCell=function(e){var t="";return this.getModel().isVertex(e)?t+=mxResources.get("description_"+e.value.nodeName)||"":this.getModel().isEdge(e)&&(t=mxGraph.prototype.getTooltipForCell.apply(this,arguments)),t},Graph.prototype.convertValueToString=function(e){return null!=e.value&&"object"==typeof e.value?e.value.getAttribute("label"):mxGraph.prototype.convertValueToString.apply(this,arguments)},Graph.prototype.cellLabelChanged=function(e,t,n){if(null!=e.value&&"object"==typeof e.value){var a=e.value.cloneNode(!0);a.setAttribute("label",t),t=a}mxGraph.prototype.cellLabelChanged.apply(this,arguments)},Graph.prototype.setLinkForCell=function(e,t){var n=null;null!=e.value&&"object"==typeof e.value?n=e.value.cloneNode(!0):(n=mxUtils.createXmlDocument().createElement("UserObject")).setAttribute("label",e.value);null!=t&&0<t.length?n.setAttribute("link",t):n.removeAttribute("link"),this.model.setValue(e,n)},Graph.prototype.getLinkForCell=function(e){return null!=e.value&&"object"==typeof e.value?e.value.getAttribute("link"):null},Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first},this.addListener(mxEvent.START_EDITING,function(e,t){this.panningHandler.hideMenu()});var o=!1,s=null;this.updateMouseEvent=function(e){if(mxGraph.prototype.updateMouseEvent.apply(this,arguments),null==e.getState()){var t=this.getCellAt(e.graphX,e.graphY);this.getModel().isEdge(t)&&(e.state=this.view.getState(t),null!=e.state&&null!=e.state.shape&&(this.container.style.cursor=e.state.shape.node.style.cursor))}null==e.getState()&&(this.container.style.cursor="default")},this.fireMouseEvent=function(e,t,n){if(e==mxEvent.MOUSE_DOWN)this.panningHandler.isMenuShowing()?(o=!1,s=null):(s=t.getCell(),o=null!=s?this.isCellSelected(s):this.isSelectionEmpty());else if(e==mxEvent.MOUSE_UP){if(o&&!this.isEditing()){if(!this.panningHandler.isMenuShowing()){var a=mxEvent.getClientX(t.getEvent()),i=mxEvent.getClientY(t.getEvent());this.panningHandler.popup(a+16,i,s,t.getEvent())}return o=!1,s=null,void t.consume()}o=!1,s=null}mxGraph.prototype.fireMouseEvent.apply(this,arguments),e==mxEvent.MOUSE_MOVE&&t.isConsumed()&&(o=!1,s=null)}},function(){if(mxVertexHandler.prototype.rotationEnabled=!0,mxText.prototype.baseSpacingTop=5,mxText.prototype.baseSpacingBottom=1,touchStyle){mxConstants.HANDLE_SIZE=16,mxConstants.LABEL_HANDLE_SIZE=7,mxClient.IS_TOUCH&&(mxVertexHandler.prototype.tolerance=4,mxEdgeHandler.prototype.tolerance=6,Graph.prototype.tolerance=14,Graph.prototype.gridSize=20,mxPanningHandler.prototype.selectOnPopup=!1,mxPanningHandler.prototype.useLeftButtonForPanning=!0,mxPanningHandler.prototype.isPanningTrigger=function(e){var t=e.getEvent();return this.useLeftButtonForPanning&&(this.ignoreCell||null==e.getState())||mxEvent.isControlDown(t)&&mxEvent.isShiftDown(t)||this.usePopupTrigger&&mxEvent.isPopupTrigger(t)});var n=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(e,t){n.apply(this,arguments),this.graph.isCellSelected(t.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)},Graph.prototype.createHandlers=function(e){this.tooltipHandler=new mxTooltipHandler(this),this.tooltipHandler.setEnabled(!1),this.selectionCellsHandler=new mxSelectionCellsHandler(this),this.panningHandler=new mxPanningHandler(this),this.panningHandler.panningEnabled=!1,this.connectionHandler=new mxConnectionHandler(this),this.connectionHandler.setEnabled(!1),this.graphHandler=new mxGraphHandler(this)},mxConnectionHandler.prototype.selectCells=function(e,t){touchStyle&&null!=t?this.graph.setSelectionCell(t):this.graph.setSelectionCell(e)};var a=mxGraph.prototype.dblClick;Graph.prototype.dblClick=function(e,t){if(null==t){var n=mxUtils.convertPoint(this.container,mxEvent.getClientX(e),mxEvent.getClientY(e));t=this.getCellAt(n.x,n.y)}a.call(this,e,t)};var e=new mxImage(IMAGE_PATH+"/touch-handle.png",16,16);mxVertexHandler.prototype.handleImage=e,mxEdgeHandler.prototype.handleImage=e,mxOutline.prototype.sizerImage=e,(new Image).src=e.src;var t=IMAGE_PATH+"/touch-connector.png",i=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){i.apply(this,arguments),showConnectorImg&&this.graph.connectionHandler.isEnabled()&&this.graph.isCellConnectable(this.state.cell)&&!this.graph.isValidRoot(this.state.cell)&&1==this.graph.getSelectionCount()&&(this.connectorImg=mxUtils.createImage(t),this.connectorImg.style.cursor="pointer",this.connectorImg.style.width="29px",this.connectorImg.style.height="29px",this.connectorImg.style.position="absolute",mxClient.IS_TOUCH||(this.connectorImg.setAttribute("title",mxResources.get("connect")),mxEvent.redirectMouseEvents(this.connectorImg,this.graph,this.state)),this.connectorImg.style.padding="2px",mxEvent.addGestureListeners(this.connectorImg,mxUtils.bind(this,function(e){this.graph.panningHandler.hideMenu();var t=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));this.graph.connectionHandler.start(this.state,t.x,t.y),this.graph.isMouseDown=!0,mxEvent.consume(e)})),this.graph.container.appendChild(this.connectorImg)),this.redrawTools()};var o=mxVertexHandler.prototype.redraw;mxVertexHandler.prototype.redraw=function(){o.apply(this),this.redrawTools()},mxVertexHandler.prototype.redrawTools=function(){null!=this.state&&null!=this.connectorImg&&(mxVertexHandler.prototype.singleSizer?(this.connectorImg.style.left=this.state.x+this.state.width-this.connectorImg.offsetWidth/2+"px",this.connectorImg.style.top=this.state.y-this.connectorImg.offsetHeight/2+"px"):(this.connectorImg.style.left=this.state.x+this.state.width+mxConstants.HANDLE_SIZE/2+4+"px",this.connectorImg.style.top=this.state.y+(this.state.height-this.connectorImg.offsetHeight)/2+"px"))};var s=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(e,t){s.apply(this,arguments),null!=this.connectorImg&&(this.connectorImg.parentNode.removeChild(this.connectorImg),this.connectorImg=null)},(new Image).src=t}else{var r=new mxImage(IMAGE_PATH+"/connector.png",15,15);if(mxConnectionHandler.prototype.connectImage=r,(new Image).src=r.src,"2"==urlParams.connect){r=new mxImage(IMAGE_PATH+"/connector.png",15,15),i=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){i.apply(this,arguments),showConnectorImg&&this.graph.connectionHandler.isEnabled()&&this.graph.isCellConnectable(this.state.cell)&&!this.graph.isValidRoot(this.state.cell)&&1==this.graph.getSelectionCount()&&(mxClient.IS_IE&&!mxClient.IS_SVG?(this.connectorImg=document.createElement("div"),this.connectorImg.style.backgroundImage="url("+r.src+")",this.connectorImg.style.backgroundPosition="center",this.connectorImg.style.backgroundRepeat="no-repeat",this.connectorImg.style.width=r.width+4+"px",this.connectorImg.style.height=r.height+4+"px",this.connectorImg.style.display=mxClient.IS_QUIRKS?"inline":"inline-block"):(this.connectorImg=mxUtils.createImage(r.src),this.connectorImg.style.width=r.width+"px",this.connectorImg.style.height=r.height+"px"),this.connectorImg.style.cursor="pointer",this.connectorImg.style.position="absolute",this.connectorImg.setAttribute("title",mxResources.get("connect")),mxEvent.redirectMouseEvents(this.connectorImg,this.graph,this.state),this.connectorImg.style.padding="2px",mxEvent.addListener(this.connectorImg,"mousedown",mxUtils.bind(this,function(e){this.graph.panningHandler.hideMenu();var t=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));this.graph.connectionHandler.start(this.state,t.x,t.y),this.graph.isMouseDown=!0,mxEvent.consume(e)})),this.graph.container.appendChild(this.connectorImg)),this.redrawTools()};o=mxVertexHandler.prototype.redraw;mxVertexHandler.prototype.redraw=function(){o.apply(this),this.redrawTools()},mxVertexHandler.prototype.redrawTools=function(){null!=this.state&&null!=this.connectorImg&&(mxVertexHandler.prototype.singleSizer?(this.connectorImg.style.left=this.state.x+this.state.width-this.connectorImg.offsetWidth/2+"px",this.connectorImg.style.top=this.state.y-this.connectorImg.offsetHeight/2+"px"):(this.connectorImg.style.left=this.state.x+this.state.width+mxConstants.HANDLE_SIZE/2+2+"px",this.connectorImg.style.top=this.state.y+(this.state.height-this.connectorImg.offsetHeight)/2+"px"))};s=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(e,t){s.apply(this,arguments),null!=this.connectorImg&&(this.connectorImg.parentNode.removeChild(this.connectorImg),this.connectorImg=null)}}}}(),Actions.prototype.init=function(){var t=this.editorUi,l=t.editor,d=l.graph;this.addAction("new",function(){t.projectDesignController.newProject()}),this.addAction("open",function(){t.projectDesignController.openProject()}),this.addAction("save",function(){t.projectDesignController.saveOrPublishProject(mxUtils.getPrettyXml(l.getGraphXml())),t.editor.modified=!1},null,null,"Ctrl+S"),this.addAction("saveAs",function(){t.projectDesignController.saveProjectAs(mxUtils.getPrettyXml(l.getGraphXml()))},null,null,"Ctrl+Shift+S"),this.addAction("publish",function(){t.editor.setStatus(""),null===t.validate()?(t.projectDesignController.saveOrPublishProject(mxUtils.getPrettyXml(l.getGraphXml()),!0),t.editor.modified=!1):(t.editor.setStatus("...Error publishing! Please check the project and try again!"),setTimeout(function(){t.editor.setStatus("")},3e3))},null,null,"Ctrl+Shift+P"),this.addAction("variable",function(){t.projectDesignController.newVariable()}),this.addAction("import",function(){t.projectDesignController.importXML(function(e){l.setGraphXml(mxUtils.parseXml(e).documentElement)})}),this.addAction("export",function(){t.exportXML(mxUtils.getPrettyXml(l.getGraphXml()))},null,null,"Ctrl+E"),this.addAction("editFile",function(){t.projectDesignController.editXML(mxUtils.getPrettyXml(l.getGraphXml()),function(e){l.setGraphXml(mxUtils.parseXml(e).documentElement)})}),this.addAction("print",function(){mxUtils.printScreen(d)},null,"sprite-print","Ctrl+P"),this.addAction("preview",function(){mxUtils.show(d,null,10,10)}),this.addAction("undo",function(){l.undoManager.undo()},null,"sprite-undo","Ctrl+Z"),this.addAction("redo",function(){l.undoManager.redo()},null,"sprite-redo","Ctrl+Y"),this.addAction("cut",function(){mxClipboard.cut(d)},null,"sprite-cut","Ctrl+X"),this.addAction("copy",function(){mxClipboard.copy(d)},null,"sprite-copy","Ctrl+C"),this.addAction("paste",function(){mxClipboard.paste(d)},!1,"sprite-paste","Ctrl+V"),this.addAction("delete",function(){d.removeCells()},null,null,"Delete"),this.addAction("duplicate",function(){var e=d.gridSize;d.setSelectionCells(d.moveCells(d.getSelectionCells(),e,e,!0))},null,null,"Ctrl+D"),this.addAction("selectVertices",function(){d.selectVertices()},null,null,"Ctrl+Shift+V"),this.addAction("selectEdges",function(){d.selectEdges()},null,null,"Ctrl+Shift+E"),this.addAction("selectAll",function(){d.selectAll()},null,null,"Ctrl+A"),this.addAction("home",function(){d.home()},null,null,"Home"),this.addAction("exitGroup",function(){d.exitGroup()},null,null,"Page Up"),this.addAction("enterGroup",function(){d.enterGroup()},null,null,"Page Down"),this.addAction("expand",function(){d.foldCells(!1)},null,null,"Enter"),this.addAction("collapse",function(){d.foldCells(!0)},null,null,"Backspace"),this.addAction("toFront",function(){d.orderCells(!1)},null,null,"Ctrl+F"),this.addAction("toBack",function(){d.orderCells(!0)},null,null,"Ctrl+B"),this.addAction("group",function(){d.setSelectionCell(d.groupCells(null,0))},null,null,"Ctrl+G"),this.addAction("ungroup",function(){d.setSelectionCells(d.ungroupCells())},null,null,"Ctrl+U"),this.addAction("removeFromGroup",function(){d.removeCellsFromParent()}),this.addAction("editLink",function(){var e=d.getSelectionCell(),t=d.getLinkForCell(e);null==t&&(t=""),null!=(t=mxUtils.prompt(mxResources.get("enterValue"),t))&&d.setLinkForCell(e,t)}),this.addAction("openLink",function(){var e=d.getSelectionCell(),t=d.getLinkForCell(e);null!=t&&window.open(t)}),this.addAction("autosize",function(){var e=d.getSelectionCells();if(null!=e){d.getModel().beginUpdate();try{for(var t=0;t<e.length;t++){var n=e[t];d.getModel().getChildCount(n)?d.updateGroupBounds([n],20):d.updateCellSize(n)}}finally{d.getModel().endUpdate()}}}),this.addAction("wordWrap",function(){var e=d.getView().getState(d.getSelectionCell()),t="wrap";null!=e&&"wrap"==e.style[mxConstants.STYLE_WHITE_SPACE]&&(t=null),d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,t)}),this.addAction("rotation",function(){var e="0",t=d.getView().getState(d.getSelectionCell());null!=t&&(e=t.style[mxConstants.STYLE_ROTATION]||e),null!=(e=mxUtils.prompt(mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)",e))&&d.setCellStyles(mxConstants.STYLE_ROTATION,e)}),this.addAction("tilt",function(){var e=d.getSelectionCells();if(null!=e){d.getModel().beginUpdate();try{for(var t=0;t<e.length;t++){var n=e[t];if(d.getModel().isVertex(n)&&0==d.getModel().getChildCount(n)){var a=d.getCellGeometry(n);if(null!=a){(a=a.clone()).x+=a.width/2-a.height/2,a.y+=a.height/2-a.width/2;var i=a.width;a.width=a.height,a.height=i,d.getModel().setGeometry(n,a);var o=d.view.getState(n);if(null!=o){var s=o.style[mxConstants.STYLE_DIRECTION]||"east";"east"==s?s="south":"south"==s?s="west":"west"==s?s="north":"north"==s&&(s="east"),d.setCellStyles(mxConstants.STYLE_DIRECTION,s,[n])}}}}}finally{d.getModel().endUpdate()}}},null,null,"Ctrl+R"),this.addAction("actualSize",function(){d.zoomTo(1)}),this.addAction("zoomIn",function(){d.zoomIn()},null,null,"Add"),this.addAction("zoomOut",function(){d.zoomOut()},null,null,"Subtract"),this.addAction("fitWindow",function(){d.fit()}),this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var e=d.pageFormat,t=d.pageScale,n=d.container.clientWidth-20,a=d.container.clientHeight-20,i=Math.floor(100*Math.min(n/e.width/t,a/e.height/t))/100;d.zoomTo(i),d.container.scrollLeft=Math.round(d.view.translate.x*i-Math.max(10,(d.container.clientWidth-e.width*t*i)/2)),d.container.scrollTop=Math.round(d.view.translate.y*i-Math.max(10,(d.container.clientHeight-e.height*t*i)/2))})),this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var e=d.pageFormat,t=d.pageScale,n=d.container.clientWidth-20,a=Math.floor(100*n/e.width/t)/100;d.zoomTo(a),d.container.scrollLeft=Math.round(d.view.translate.x*a-Math.max(10,(d.container.clientWidth-e.width*t*a)/2)),d.container.scrollTop=Math.round(d.view.translate.y*a-Math.max(10,(d.container.clientHeight-e.height*t*a)/2))})),this.put("customZoom",new Action(mxResources.get("custom"),function(){var e=mxUtils.prompt(mxResources.get("enterValue")+" (%)",parseInt(100*d.getView().getScale()));null!=e&&0<e.length&&!isNaN(parseInt(e))&&d.zoomTo(parseInt(e)/100)}));var e=null;(e=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled()),l.updateGraphComponents()},null,null,"Ctrl+Shift+G")).setToggleAction(!0),e.setSelectedCallback(function(){return d.isGridEnabled()}),(e=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled})).setToggleAction(!0),e.setSelectedCallback(function(){return d.graphHandler.guidesEnabled}),(e=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())})).setToggleAction(!0),e.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()}),(e=this.addAction("navigation",function(){d.foldingEnabled=!d.foldingEnabled,d.view.revalidate()})).setToggleAction(!0),e.setSelectedCallback(function(){return d.foldingEnabled}),(e=this.addAction("scrollbars",function(){if(d.scrollbars=!d.scrollbars,l.updateGraphComponents(),d.scrollbars){var e=d.view.translate.x,t=d.view.translate.y;d.view.translate.x=0,d.view.translate.y=0,d.sizeDidChange(),d.container.scrollLeft-=Math.round(e*d.view.scale),d.container.scrollTop-=Math.round(t*d.view.scale)}else{var n=d.view.translate;d.view.setTranslate(n.x-d.container.scrollLeft/d.view.scale,n.y-d.container.scrollTop/d.view.scale),d.container.scrollLeft=0,d.container.scrollTop=0,d.sizeDidChange()}},!mxClient.IS_TOUCH)).setToggleAction(!0),e.setSelectedCallback(function(){return"auto"==d.container.style.overflow}),(e=this.addAction("pageView",mxUtils.bind(this,function(){d.pageVisible=!d.pageVisible,d.pageBreaksVisible=d.pageVisible,d.preferPageSize=d.pageBreaksVisible,d.view.validate(),d.sizeDidChange(),l.updateGraphComponents(),l.outline.update(),mxUtils.hasScrollbars(d.container)&&(d.pageVisible?(d.container.scrollLeft-=20,d.container.scrollTop-=20):(d.container.scrollLeft+=20,d.container.scrollTop+=20))}))).setToggleAction(!0),e.setSelectedCallback(function(){return d.pageVisible}),(e=this.addAction("connect",function(){d.setConnectable(!d.connectionHandler.isEnabled())},null,null,"Ctrl+Q")).setToggleAction(!0),e.setSelectedCallback(function(){return d.connectionHandler.isEnabled()}),(e=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget())})).setToggleAction(!0),e.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()}),this.addAction("help",function(){window.open("https://wiki.xcallymotion.com/display/XMV/Cally+Square")}),this.put("about",new Action(mxResources.get("about")+" Cally Square",function(){window.open("http://callysquare.com/")},null,null,null));var n=mxUtils.bind(this,function(e,t){this.addAction(e,function(){d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,t)})});n("bold",mxConstants.FONT_BOLD),n("italic",mxConstants.FONT_ITALIC),n("underline",mxConstants.FONT_UNDERLINE),this.addAction("shadow",function(){d.toggleCellStyles(mxConstants.STYLE_SHADOW)}),this.addAction("dashed",function(){d.toggleCellStyles(mxConstants.STYLE_DASHED)}),this.addAction("rounded",function(){d.toggleCellStyles(mxConstants.STYLE_ROUNDED)}),this.addAction("curved",function(){d.toggleCellStyles(mxConstants.STYLE_CURVED)}),this.addAction("style",function(){var e=d.getSelectionCells();if(null!=e&&0<e.length){var t=d.getModel(),n=mxUtils.prompt(mxResources.get("enterValue")+" ("+mxResources.get("style")+")",t.getStyle(e[0])||"");null!=n&&d.setCellStyle(n,e)}}),this.addAction("setAsDefaultEdge",function(){d.setDefaultEdge(d.getSelectionCell())}),this.addAction("addWaypoint",function(){var e=d.getSelectionCell();if(null!=e&&d.getModel().isEdge(e)){var t=l.graph.selectionCellsHandler.getHandler(e);if(t instanceof mxEdgeHandler){var n=d.view.translate,a=d.view.scale,i=n.x,o=n.y,s=d.getModel().getParent(e),r=d.getCellGeometry(s);d.getModel().isVertex(s)&&null!=r&&(i+=r.x,o+=r.y),t.addPointAt(t.state,d.panningHandler.triggerX/a-i,d.panningHandler.triggerY/a-o)}}}),this.addAction("removeWaypoint",function(){var e=t.actions.get("removeWaypoint");null!=e.handler&&e.handler.removePoint(e.handler.state,e.index)}),this.addAction("image",function(){var e="",t=d.getView().getState(d.getSelectionCell());if(null!=t&&(e=t.style[mxConstants.STYLE_IMAGE]||e),null!=(e=mxUtils.prompt(mxResources.get("enterValue")+" ("+mxResources.get("url")+")",e))&&0<e.length){var n=new Image;n.onload=function(){!function(e,t,n){var a=null,i=d.getSelectionCells();d.getModel().beginUpdate();try{if(0==i.length){var o=d.getGridSize();a=i=[d.insertVertex(d.getDefaultParent(),null,"",o,o,t,n)]}if(d.setCellStyles(mxConstants.STYLE_IMAGE,e,i),d.setCellStyles(mxConstants.STYLE_SHAPE,"image",i),1==d.getSelectionCount()&&null!=t&&null!=n){var s=i[0],r=d.getModel().getGeometry(s);null!=r&&((r=r.clone()).width=t,r.height=n,d.getModel().setGeometry(s,r))}}finally{d.getModel().endUpdate()}null!=a&&(d.setSelectionCells(a),d.scrollCellToVisible(a[0]))}(e,n.width,n.height)},n.onerror=function(){mxUtils.alert(mxResources.get("fileNotFound"))},n.src=e}})},Actions.prototype.addAction=function(e,t,n,a,i){return this.put(e,new Action(mxResources.get(e),t,n,a,i))},Actions.prototype.put=function(e,t){return this.actions[e]=t},Actions.prototype.get=function(e){return this.actions[e]},mxUtils.extend(Action,mxEventSource),Action.prototype.setEnabled=function(e){this.enabled!=e&&(this.enabled=e,this.fireEvent(new mxEventObject("stateChanged")))},Action.prototype.setToggleAction=function(e){this.toggleAction=e},Action.prototype.setSelectedCallback=function(e){this.selectedCallback=e},Action.prototype.isSelected=function(){return this.selectedCallback()},Menus=function(e){this.editorUi=e,this.menus=new Object,this.init(),(new Image).src=IMAGE_PATH+"/checkmark.gif"},Menus.prototype.init=function(){var i=this.editorUi.editor.graph;this.put("fontFamily",new Menu(mxUtils.bind(this,function(e,t){for(var n=["Helvetica","Verdana","Times New Roman","Garamond","Comic Sans MS","Courier New","Georgia","Lucida Console","Tahoma"],a=0;a<n.length;a++){this.styleChange(e,n[a],[mxConstants.STYLE_FONTFAMILY],[n[a]],null,t).firstChild.nextSibling.style.fontFamily=n[a]}e.addSeparator(t),this.promptChange(e,mxResources.get("custom"),"",mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,t)}))),this.put("fontSize",new Menu(mxUtils.bind(this,function(e,t){for(var n=[6,8,9,10,11,12,14,18,24,36,48,72],a=0;a<n.length;a++)this.styleChange(e,n[a],[mxConstants.STYLE_FONTSIZE],[n[a]],null,t);e.addSeparator(t),this.promptChange(e,mxResources.get("custom"),"(pt)","12",mxConstants.STYLE_FONTSIZE,t)}))),this.put("linewidth",new Menu(mxUtils.bind(this,function(e,t){for(var n=[1,2,3,4,8,12,16,24],a=0;a<n.length;a++)this.styleChange(e,n[a]+"px",[mxConstants.STYLE_STROKEWIDTH],[n[a]],null,t);e.addSeparator(t),this.promptChange(e,mxResources.get("custom"),"(px)","1",mxConstants.STYLE_STROKEWIDTH,t)}))),this.put("line",new Menu(mxUtils.bind(this,function(e,t){this.styleChange(e,mxResources.get("straight"),[mxConstants.STYLE_EDGE],[null],null,t),this.styleChange(e,mxResources.get("entityRelation"),[mxConstants.STYLE_EDGE],["entityRelationEdgeStyle"],null,t),e.addSeparator(t),this.styleChange(e,mxResources.get("horizontal"),[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW],["elbowEdgeStyle","horizontal"],null,t),this.styleChange(e,mxResources.get("vertical"),[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW],["elbowEdgeStyle","vertical"],null,t),e.addSeparator(t),this.styleChange(e,mxResources.get("manual"),[mxConstants.STYLE_EDGE],["segmentEdgeStyle"],null,t),this.styleChange(e,mxResources.get("automatic"),[mxConstants.STYLE_EDGE],["orthogonalEdgeStyle"],null,t)}))),this.put("lineend",new Menu(mxUtils.bind(this,function(e,t){this.styleChange(e,mxResources.get("classic"),[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_CLASSIC],null,t),this.styleChange(e,mxResources.get("openArrow"),[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_OPEN],null,t),this.styleChange(e,mxResources.get("block"),[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],null,t),e.addSeparator(t),this.styleChange(e,mxResources.get("oval"),[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_OVAL],null,t),this.styleChange(e,mxResources.get("diamond"),[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_DIAMOND],null,t),this.styleChange(e,mxResources.get("diamondThin"),[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_DIAMOND_THIN],null,t),e.addSeparator(t),this.styleChange(e,mxResources.get("none"),[mxConstants.STYLE_ENDARROW],[mxConstants.NONE],null,t),e.addSeparator(t),e.addItem(mxResources.get("transparent"),null,function(){i.toggleCellStyles("endFill",!0)},t,null,!0),e.addSeparator(t),this.promptChange(e,mxResources.get("size"),"(px)",mxConstants.DEFAULT_MARKERSIZE,mxConstants.STYLE_ENDSIZE,t)}))),this.put("linestart",new Menu(mxUtils.bind(this,function(e,t){this.styleChange(e,mxResources.get("classic"),[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_CLASSIC],null,t),this.styleChange(e,mxResources.get("openArrow"),[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_OPEN],null,t),this.styleChange(e,mxResources.get("block"),[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],null,t),e.addSeparator(t),this.styleChange(e,mxResources.get("oval"),[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_OVAL],null,t),this.styleChange(e,mxResources.get("diamond"),[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_DIAMOND],null,t),this.styleChange(e,mxResources.get("diamondThin"),[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_DIAMOND_THIN],null,t),e.addSeparator(t),this.styleChange(e,mxResources.get("none"),[mxConstants.STYLE_STARTARROW],[mxConstants.NONE],null,t),e.addSeparator(t),e.addItem(mxResources.get("transparent"),null,function(){i.toggleCellStyles("startFill",!0)},t,null,!0),e.addSeparator(t),this.promptChange(e,mxResources.get("size"),"(px)",mxConstants.DEFAULT_MARKERSIZE,mxConstants.STYLE_STARTSIZE,t)}))),this.put("spacing",new Menu(mxUtils.bind(this,function(e,t){var n=this.editorUi.actions.get("shadow").enabled,a=this.get("line").enabled;(n||e.showDisabled)&&(this.promptChange(e,mxResources.get("top"),"(px)","0",mxConstants.STYLE_SPACING_TOP,t,n),this.promptChange(e,mxResources.get("right"),"(px)","0",mxConstants.STYLE_SPACING_RIGHT,t,n),this.promptChange(e,mxResources.get("bottom"),"(px)","0",mxConstants.STYLE_SPACING_BOTTOM,t,n),this.promptChange(e,mxResources.get("left"),"(px)","0",mxConstants.STYLE_SPACING_LEFT,t,n),e.addSeparator(t),this.promptChange(e,mxResources.get("global"),"(px)","0",mxConstants.STYLE_SPACING,t,n),this.promptChange(e,mxResources.get("perimeter"),"(px)","0",mxConstants.STYLE_PERIMETER_SPACING,t,n)),(a||e.showDisabled)&&(e.addSeparator(t),this.promptChange(e,mxResources.get("sourceSpacing"),"(px)","0",mxConstants.STYLE_SOURCE_PERIMETER_SPACING,t,a),this.promptChange(e,mxResources.get("targetSpacing"),"(px)","0",mxConstants.STYLE_TARGET_PERIMETER_SPACING,t,a))}))),this.put("format",new Menu(mxUtils.bind(this,function(e,t){this.addMenuItem(e,"style",t)}))),this.put("text",new Menu(mxUtils.bind(this,function(e,t){var n=this.get("text").enabled;e.addSeparator(t),this.addSubmenu("fontFamily",e,t),this.addSubmenu("fontSize",e,t),this.addMenuItems(e,["-","bold","italic","underline","-"],t),this.addSubmenu("alignment",e,t),this.addMenuItem(e,"wordWrap",t),e.addSeparator(t),this.promptChange(e,mxResources.get("textOpacity"),"(%)","100",mxConstants.STYLE_TEXT_OPACITY,t,n),e.addItem(mxResources.get("hide"),null,function(){i.toggleCellStyles(mxConstants.STYLE_NOLABEL,!1)},t,null,n)}))),this.put("alignment",new Menu(mxUtils.bind(this,function(e,t){this.styleChange(e,mxResources.get("leftAlign"),[mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT],null,t),this.styleChange(e,mxResources.get("center"),[mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER],null,t),this.styleChange(e,mxResources.get("rightAlign"),[mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT],null,t),e.addSeparator(t),this.styleChange(e,mxResources.get("topAlign"),[mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP],null,t),this.styleChange(e,mxResources.get("middle"),[mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE],null,t),this.styleChange(e,mxResources.get("bottomAlign"),[mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM],null,t),e.addSeparator(t),this.addSubmenu("position",e,t),this.addSubmenu("spacing",e,t),e.addSeparator(t);var n=this.get("text").enabled;e.addItem(mxResources.get("vertical"),null,function(){i.toggleCellStyles(mxConstants.STYLE_HORIZONTAL,!0)},t,null,n)}))),this.put("position",new Menu(mxUtils.bind(this,function(e,t){this.styleChange(e,mxResources.get("left"),[mxConstants.STYLE_LABEL_POSITION,mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_RIGHT],null,t),this.styleChange(e,mxResources.get("center"),[mxConstants.STYLE_LABEL_POSITION,mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_CENTER],null,t),this.styleChange(e,mxResources.get("right"),[mxConstants.STYLE_LABEL_POSITION,mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_LEFT],null,t),e.addSeparator(t),this.styleChange(e,mxResources.get("top"),[mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP,mxConstants.ALIGN_BOTTOM],null,t),this.styleChange(e,mxResources.get("middle"),[mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_MIDDLE],null,t),this.styleChange(e,mxResources.get("bottom"),[mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_TOP],null,t)}))),this.put("direction",new Menu(mxUtils.bind(this,function(e,t){e.addItem(mxResources.get("flipH"),null,function(){i.toggleCellStyles(mxConstants.STYLE_FLIPH,!1)},t),e.addItem(mxResources.get("flipV"),null,function(){i.toggleCellStyles(mxConstants.STYLE_FLIPV,!1)},t),this.addMenuItems(e,["-","tilt","rotation"],t)}))),this.put("align",new Menu(mxUtils.bind(this,function(e,t){e.addItem(mxResources.get("leftAlign"),null,function(){i.alignCells(mxConstants.ALIGN_LEFT)},t),e.addItem(mxResources.get("center"),null,function(){i.alignCells(mxConstants.ALIGN_CENTER)},t),e.addItem(mxResources.get("rightAlign"),null,function(){i.alignCells(mxConstants.ALIGN_RIGHT)},t),e.addSeparator(t),e.addItem(mxResources.get("topAlign"),null,function(){i.alignCells(mxConstants.ALIGN_TOP)},t),e.addItem(mxResources.get("middle"),null,function(){i.alignCells(mxConstants.ALIGN_MIDDLE)},t),e.addItem(mxResources.get("bottomAlign"),null,function(){i.alignCells(mxConstants.ALIGN_BOTTOM)},t)}))),this.put("layout",new Menu(mxUtils.bind(this,function(e,t){e.addItem(mxResources.get("horizontalFlow"),null,mxUtils.bind(this,function(){var e=new mxHierarchicalLayout(i,mxConstants.DIRECTION_WEST);this.editorUi.executeLayout(e,!0,!0)}),t),e.addItem(mxResources.get("verticalFlow"),null,mxUtils.bind(this,function(){var e=new mxHierarchicalLayout(i,mxConstants.DIRECTION_NORTH);this.editorUi.executeLayout(e,!0,!0)}),t)}))),this.put("navigation",new Menu(mxUtils.bind(this,function(e,t){this.addMenuItems(e,["home","-","exitGroup","enterGroup","-","expand","collapse"],t)}))),this.put("arrange",new Menu(mxUtils.bind(this,function(e,t){this.addMenuItems(e,["toFront","toBack","-"],t),this.addSubmenu("layout",e,t),e.addSeparator(t),this.addMenuItems(e,["-","group","ungroup","removeFromGroup"],t)}))),this.put("view",new Menu(mxUtils.bind(this,function(t,n){this.addMenuItems(t,["actualSize"],n),t.addSeparator();for(var e=[.25,.5,.75,1,2,4],a=0;a<e.length;a++)!function(e){t.addItem(100*e+"%",null,function(){i.zoomTo(e)},n)}(e[a]);this.addMenuItems(t,["-","zoomIn","zoomOut","-","fitWindow","customZoom","-","fitPage","fitPageWidth"],n)}))),this.put("file",new Menu(mxUtils.bind(this,function(e,t){this.addMenuItems(e,["new","open","-","save","saveAs","publish","-","variable","-","import","export","-","editFile","description","-","print"],t)}))),this.put("edit",new Menu(mxUtils.bind(this,function(e,t){this.addMenuItems(e,["undo","redo","-","cut","copy","paste","delete","-","duplicate","-","selectVertices","selectEdges","selectAll"])}))),this.put("help",new Menu(mxUtils.bind(this,function(e,t){this.addMenuItems(e,["help","-","about"])})))},Menus.prototype.put=function(e,t){this.menus[e]=t},Menus.prototype.get=function(e){return this.menus[e]},Menus.prototype.addSubmenu=function(e,t,n){var a=this.get(e).enabled;if(t.showDisabled||a){var i=t.addItem(mxResources.get(e),null,null,n,null,a);this.addMenu(e,t,i)}},Menus.prototype.addMenu=function(e,t,n){var a=this.get(e);null!=a&&(t.showDisabled||a.enabled)&&this.get(e).execute(t,n)},Menus.prototype.styleChange=function(e,t,n,a,i,o){return e.addItem(t,null,mxUtils.bind(this,function(){var e=this.editorUi.editor.graph;e.getModel().beginUpdate();try{for(var t=0;t<n.length;t++)e.setCellStyles(n[t],a[t])}finally{e.getModel().endUpdate()}}),o,i)},Menus.prototype.promptChange=function(e,t,a,i,o,n,s){return e.addItem(t,null,mxUtils.bind(this,function(){var e=this.editorUi.editor.graph,t=i,n=e.getView().getState(e.getSelectionCell());null!=n&&(t=n.style[o]||t),null!=(t=mxUtils.prompt(mxResources.get("enterValue")+(0<a.length?" "+a:""),t))&&0<t.length&&e.setCellStyles(o,t)}),n,null,s)},Menus.prototype.addMenuItem=function(e,t,n){var a=this.editorUi.actions.get(t);if(null!=a&&(e.showDisabled||a.enabled)){var i=e.addItem(a.label,null,a.funct,n,null,a.enabled);return a.toggleAction&&a.isSelected()&&this.addCheckmark(i),this.addShortcut(i,a),i}return null},Menus.prototype.addShortcut=function(e,t){if(null!=t.shortcut){var n=e.firstChild.nextSibling.nextSibling,a=document.createElement("span");a.style.color="gray",mxUtils.write(a,t.shortcut),n.appendChild(a)}},Menus.prototype.addCheckmark=function(e){var t=e.firstChild.nextSibling;t.style.backgroundImage="url("+IMAGE_PATH+"/checkmark.gif)",t.style.backgroundRepeat="no-repeat",t.style.backgroundPosition="2px 50%"},Menus.prototype.addMenuItems=function(e,t,n){for(var a=0;a<t.length;a++)"-"==t[a]?e.addSeparator(n):this.addMenuItem(e,t[a],n)},Menus.prototype.createPopupMenu=function(e,t,n){var a=this.editorUi.editor.graph;if(e.smartSeparators=!0,a.isSelectionEmpty()?this.addMenuItems(e,["undo","redo","-","paste","-"]):(this.addMenuItems(e,["delete","-","cut","copy","-","duplicate"]),1==a.getSelectionCount()&&a.getModel().isEdge(a.getSelectionCell())&&this.addMenuItems(e,["setAsDefaultEdge"]),e.addSeparator()),0<a.getSelectionCount()){if(this.addMenuItems(e,["toFront","toBack","-"]),a.getModel().isEdge(a.getSelectionCell())){var i=!1;if(null!=(t=a.getSelectionCell())&&a.getModel().isEdge(t)){var o=a.selectionCellsHandler.getHandler(t);if(o instanceof mxEdgeHandler&&null!=o.bends&&2<o.bends.length){var s=o.getHandleForEvent(new mxMouseEvent(n)),r=this.editorUi.actions.get("removeWaypoint");r.handler=o,i=0<(r.index=s)&&s<o.bends.length}}this.addMenuItems(e,["-",i?"removeWaypoint":"addWaypoint"])}else 1<a.getSelectionCount()&&(e.addSeparator(),this.addMenuItems(e,["group"]));if(e.addSeparator(),1==a.getSelectionCount())null!=a.getLinkForCell(a.getSelectionCell())&&this.addMenuItems(e,["openLink"])}else this.addMenuItems(e,["-","selectVertices","selectEdges","-","selectAll"])},Menus.prototype.createMenubar=function(e){for(var t=new Menubar(this.editorUi,e),n=["file","edit","view","format","text","arrange","help"],a=0;a<n.length;a++)t.addMenu(mxResources.get(n[a]),this.get(n[a]).funct);return t},Menubar.prototype.hideMenu=function(){null!=this.currentMenu&&this.currentMenu.hideMenu()},Menubar.prototype.addMenu=function(e,t){var n=document.createElement("a");return n.setAttribute("href","javascript:void(0);"),n.className="geItem",mxUtils.write(n,e),this.addMenuHandler(n,t),this.container.appendChild(n),n},Menubar.prototype.getOffset=function(e){return{left:(e=e.getBoundingClientRect()).left+window.scrollX,top:e.top+window.scrollY}},Menubar.prototype.addMenuHandler=function(i,o){if(null!=o){var s=!0,t=mxUtils.bind(this,function(e){if(s&&null==i.enabled||i.enabled){this.editorUi.editor.graph.panningHandler.hideMenu();var t=new mxPopupMenu(o);t.div.className+=" geMenubarMenu",t.smartSeparators=!0,t.showDisabled=!0,t.autoExpand=!0,t.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(t,arguments),t.destroy(),this.currentMenu=null,this.currentElt=null});var n=this.getOffset(i).left,a=this.getOffset(i).top+i.offsetHeight;t.popup(n,a,null,e),this.currentMenu=t,this.currentElt=i}s=!0,mxEvent.consume(e)});mxEvent.addListener(i,"mousemove",mxUtils.bind(this,function(e){null!=this.currentMenu&&this.currentElt!=i&&(this.hideMenu(),t(e))})),mxEvent.addListener(i,"mousedown",mxUtils.bind(this,function(){s=this.currentElt!=i})),mxEvent.addListener(i,"click",t)}},mxUtils.extend(Menu,mxEventSource),Menu.prototype.setEnabled=function(e){this.enabled!=e&&(this.enabled=e,this.fireEvent(new mxEventObject("stateChanged")))},Menu.prototype.execute=function(e,t){this.funct(e,t)},Toolbar.prototype.init=function(){this.addItems(["save","publish","-","print","undo","redo","-","copy","cut","paste","delete","-","duplicate","-","actualSize","zoomIn","zoomOut","-"]);this.editorUi.editor.graph},Toolbar.prototype.hideMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.currentMenu.destroy(),this.currentMenu=null)},Toolbar.prototype.addMenu=function(e,t,n,a){var i=this.editorUi.menus.get(a),o=this.addMenuFunction(e,t,n,i.funct);return i.addListener("stateChanged",function(){o.setEnabled(i.enabled)}),o},Toolbar.prototype.addMenuFunction=function(e,t,n,a){var i=n?this.createLabel(e):this.createButton(e);return this.initElement(i,t),this.addMenuHandler(i,n,a),this.container.appendChild(i),i},Toolbar.prototype.addSeparator=function(){var e=document.createElement("div");return e.className="geSeparator",this.container.appendChild(e),e},Toolbar.prototype.addItems=function(e){for(var t=0;t<e.length;t++){var n=e[t];"-"==n?this.addSeparator():this.addItem("geSprite-"+n.toLowerCase(),n)}},Toolbar.prototype.addItem=function(e,t){var n=this.editorUi.actions.get(t),a=null;return null!=n&&((a=this.addButton(e,n.label,n.funct)).setEnabled(n.enabled),n.addListener("stateChanged",function(){a.setEnabled(n.enabled)})),a},Toolbar.prototype.addButton=function(e,t,n){var a=this.createButton(e);return this.initElement(a,t),this.addClickHandler(a,n),this.container.appendChild(a),a},Toolbar.prototype.addSelectionHandler=function(n){var a=this.editorUi.editor.graph,e=function(){for(var e=!a.isSelectionEmpty(),t=0;t<n.length;t++)n[t].setEnabled(e)};a.getSelectionModel().addListener(mxEvent.CHANGE,e),e()},Toolbar.prototype.addEdgeSelectionHandler=function(a){var i=this.editorUi.editor.graph,e=function(){var e=!1;if(!i.isSelectionEmpty())for(var t=i.getSelectionCells(),n=0;n<t.length;n++)if(i.getModel().isEdge(t[n])){e=!0;break}for(n=0;n<a.length;n++)a[n].setEnabled(e)};i.getSelectionModel().addListener(mxEvent.CHANGE,e),e()},Toolbar.prototype.initElement=function(e,t){e.setAttribute("tabindex","0"),null!=t&&e.setAttribute("title",t),this.addEnabledState(e)},Toolbar.prototype.addEnabledState=function(t){var n=t.className;t.setEnabled=function(e){t.enabled=e,t.className=e?n:n+" geDisabled"},t.setEnabled(!0)},Toolbar.prototype.addClickHandler=function(t,n){null!=n&&mxEvent.addListener(t,"click",function(e){t.enabled&&n(e),mxEvent.consume(e)})},Toolbar.prototype.createButton=function(e){var t=document.createElement("a");t.setAttribute("href","javascript:void(0);"),t.className="geButton";var n=document.createElement("div");return n.className="geSprite "+e,t.appendChild(n),t},Toolbar.prototype.createLabel=function(e,t){var n=document.createElement("a");return n.setAttribute("href","javascript:void(0);"),n.className="geLabel",mxUtils.write(n,e),n},Toolbar.prototype.addMenuHandler=function(t,n,a,i){if(null!=a){var o=this.editorUi.editor.graph,s=null;mxEvent.addListener(t,"click",mxUtils.bind(this,function(e){(null==t.enabled||t.enabled)&&(o.panningHandler.hideMenu(),(s=new mxPopupMenu(a)).div.className+=" geToolbarMenu",s.showDisabled=i,s.labels=n,s.autoExpand=!0,s.popup(t.offsetLeft,t.offsetTop+t.offsetHeight+34,null,e),this.currentMenu=s),mxEvent.consume(e)}))}},Dialog.prototype.close=function(){null!=this.onDialogClose&&(this.onDialogClose(),this.onDialogClose=null),this.container.parentNode.removeChild(this.container),this.bg.parentNode.removeChild(this.bg)},angular.module("motion").run(["$templateCache",function(e){"use strict";e.put("app/core/directives/ms-card/templates/template-1/template-1.html",'<div class="template-1">\n    <div class="media">\n        <img class="image" ng-src="{{card.media.image.src}}" alt="{{card.media.image.alt}}" ng-show="card.media.image">\n    </div>\n\n    <div class="content pv-24 ph-16">\n        <div class="title h1" ng-if="card.title">\n            {{card.title}}\n        </div>\n\n        <div class="subtitle secondary-text" ng-if="card.subtitle">\n            {{card.subtitle}}\n        </div>\n\n        <div class="text pt-16" ng-if="card.text">\n            {{card.text}}\n        </div>\n    </div>\n</div>'),e.put("app/core/directives/ms-card/templates/template-10/template-10.html",'<div class="template-10 p-16">\n    <div class="pb-16" layout="row" layout-align="space-between center">\n        <div class="info">\n            <div class="title secondary-text" ng-if="card.title">\n                {{card.title}}\n            </div>\n\n            <div class="subtitle h2" ng-if="card.subtitle">\n                {{card.subtitle}}\n            </div>\n        </div>\n\n        <div class="media ml-16">\n            <img class="image" ng-src="{{card.media.image.src}}" alt="{{card.media.image.alt}}" ng-show="card.media.image">\n        </div>\n    </div>\n\n    <div class="text">\n        {{card.text}}\n    </div>\n</div>'),e.put("app/core/directives/ms-card/templates/template-2/template-2.html",'<div class="template-2">\n    <div class="header p-16" layout="row" layout-align="start center">\n        <div ng-if="card.avatar">\n            <img class="avatar mr-16" ng-src="{{card.avatar.src}}" alt="{{card.avatar.alt}}">\n        </div>\n\n        <div class="info">\n            <div class="title" ng-if="card.title">\n                {{card.title}}\n            </div>\n\n            <div class="subtitle secondary-text" ng-if="card.subtitle">\n                {{card.subtitle}}\n            </div>\n        </div>\n    </div>\n\n    <div class="media">\n        <img class="image" ng-src="{{card.media.image.src}}" alt="{{card.media.image.alt}}" ng-show="card.media.image">\n    </div>\n\n    <div class="text p-16" ng-if="card.text">\n        {{card.text}}\n    </div>\n</div>'),e.put("app/core/directives/ms-card/templates/template-3/template-3.html",'<div class="template-3 p-16 teal-bg white-fg" layout="row" layout-align="space-between">\n    <div layout="column" layout-align="space-between">\n        <div class="info">\n            <div class="title h1" ng-if="card.title">\n                {{card.title}}\n            </div>\n\n            <div class="subtitle h3 secondary-text" ng-if="card.subtitle">\n                {{card.subtitle}}\n            </div>\n        </div>\n\n        <div class="cta">\n            <md-button class="m-0">{{card.cta}}</md-button>\n        </div>\n    </div>\n\n    <div class="media pl-16">\n        <img class="image" ng-src="{{card.media.image.src}}" alt="{{card.media.image.alt}}" ng-show="card.media.image">\n    </div>\n</div>'),e.put("app/core/directives/ms-card/templates/template-4/template-4.html",'<div class="template-4">\n    <div class="info white-fg ph-16 pv-24">\n        <div class="title h1" ng-if="card.title">\n            {{card.title}}\n        </div>\n\n        <div class="text" ng-if="card.text">\n            {{card.text}}\n        </div>\n    </div>\n\n    <div class="media">\n        <img class="image" ng-src="{{card.media.image.src}}" alt="{{card.media.image.alt}}" ng-show="card.media.image">\n    </div>\n</div>'),e.put("app/core/directives/ms-card/templates/template-5/template-5.html",'<div class="template-5 p-16" layout="row" layout-align="space-between start">\n    <div class="info">\n        <div class="title secondary-text" ng-if="card.title">\n            {{card.title}}\n        </div>\n\n        <div class="event h2" ng-if="card.event">\n            {{card.event}}\n        </div>\n    </div>\n\n    <div class="media ml-16">\n        <img class="image" ng-src="{{card.media.image.src}}" alt="{{card.media.image.alt}}" ng-show="card.media.image">\n    </div>\n</div>'),e.put("app/core/directives/ms-card/templates/template-6/template-6.html",'<div class="template-6">\n    <div class="content pv-24 ph-16">\n        <div class="subtitle secondary-text" ng-if="card.subtitle">\n            {{card.subtitle}}\n        </div>\n\n        <div class="title h2" ng-if="card.title">\n            {{card.title}}\n        </div>\n\n        <div class="text pt-8" ng-if="card.text">\n            {{card.text}}\n        </div>\n    </div>\n</div>'),e.put("app/core/directives/ms-card/templates/template-7/template-7.html",'<div class="template-7" layout="row" layout-align="space-between">\n    <div class="info" layout="column" layout-align="space-between" layout-fill flex>\n        <div class="p-16">\n            <div class="title h1" ng-if="card.title">\n                {{card.title}}\n            </div>\n\n            <div class="subtitle h4 secondary-text" ng-if="card.subtitle">\n                {{card.subtitle}}\n            </div>\n\n            <div class="text h4 pt-8" ng-if="card.text">\n                {{card.text}}\n            </div>\n        </div>\n\n        <div>\n            <md-divider></md-divider>\n            <div class="p-8" layout="row">\n                <md-icon md-font-icon="icon-star-outline" class="mh-5"></md-icon>\n                <md-icon md-font-icon="icon-star-outline" class="mh-5"></md-icon>\n                <md-icon md-font-icon="icon-star-outline" class="mh-5"></md-icon>\n                <md-icon md-font-icon="icon-star-outline" class="mh-5"></md-icon>\n                <md-icon md-font-icon="icon-star-outline" class="mh-5"></md-icon>\n            </div>\n        </div>\n    </div>\n\n    <div class="media">\n        <img class="image" ng-src="{{card.media.image.src}}" alt="{{card.media.image.alt}}" ng-show="card.media.image">\n    </div>\n</div>'),e.put("app/core/directives/ms-card/templates/template-8/template-8.html",'<div class="template-8">\n    <div class="media">\n        <img class="image" ng-src="{{card.media.image.src}}" alt="{{card.media.image.alt}}" ng-show="card.media.image">\n    </div>\n\n    <div class="content pv-24 ph-16">\n        <div class="title h1" ng-if="card.title">\n            {{card.title}}\n        </div>\n\n        <div class="subtitle secondary-text" ng-if="card.subtitle">\n            {{card.subtitle}}\n        </div>\n\n        <div class="buttons pt-16">\n            <md-button class="m-0">{{card.button1}}</md-button>\n            <md-button class="m-0 md-accent">{{card.button2}}</md-button>\n        </div>\n\n        <div class="text pt-16" ng-if="card.text">\n            {{card.text}}\n        </div>\n    </div>\n</div>'),e.put("app/core/directives/ms-card/templates/template-9/template-9.html",'<div class="template-9">\n    <div class="header p-16" layout="row" layout-align="start center">\n        <div ng-if="card.avatar">\n            <img class="avatar mr-16" ng-src="{{card.avatar.src}}" alt="{{card.avatar.alt}}">\n        </div>\n\n        <div class="info">\n            <div class="title" ng-if="card.title">\n                {{card.title}}\n            </div>\n\n            <div class="subtitle secondary-text" ng-if="card.subtitle">\n                {{card.subtitle}}\n            </div>\n\n        </div>\n    </div>\n\n    <div class="text ph-16 pb-16" ng-if="card.text">\n        {{card.text}}\n    </div>\n\n    <div class="media">\n        <img class="image" ng-src="{{card.media.image.src}}" alt="{{card.media.image.alt}}" ng-show="card.media.image">\n    </div>\n\n    <div class="buttons m-8">\n        <md-button class="md-icon-button mr-16" aria-label="Favorite">\n            <md-icon md-font-icon="icon-heart-outline" class="s24"></md-icon>\n        </md-button>\n        <md-button class="md-icon-button" aria-label="Share">\n            <md-icon md-font-icon="icon-share" class="s24"></md-icon>\n        </md-button>\n    </div>\n\n</div>'),e.put("app/core/directives/ms-click-to-call/ms-click-to-call.html",'<section ng-if="type !== \'button\'">\n    <span ng-if="!showMenu()">{{target}}</span>\n\n    <md-menu ng-if="showMenu()">\n        <a aria-label="Target" ng-click="$mdOpenMenu($event)">\n            <span ng-if="prefix">{{prefix}}-</span>{{target}}\n        </a>\n\n        <md-menu-content width="2">\n            <md-menu-item>\n                <md-button ng-click="call(prefix ? prefix + target : target)">\n                    {{\'DASHBOARDS.CALL_NUMBER\' | translate}} ({{prefix ? prefix + \'-\' + target : target}})\n                </md-button>\n            </md-menu-item>\n            <md-menu-item>\n                <md-button ng-click="transfer(prefix ? prefix + target : target)">\n                    {{\'DASHBOARDS.TRANSFER_NUMBER\' | translate}} ({{prefix ? prefix + \'-\' + target : target}})\n                </md-button>\n            </md-menu-item>\n        </md-menu-content>\n    </md-menu>\n</section>\n\n<section ng-if="type === \'button\'">\n    <md-button ng-if="!showMenu()" ng-disabled="true" class="md-icon-button md-raised md-accent ng-scope md-ink-ripple" title="NEW CALL" aria-label="NEW CALL">\n        <md-icon md-font-icon="icon-phone"></md-icon>\n    </md-button>\n\n    <md-menu ng-if="showMenu()">\n        <md-button class="md-icon-button md-raised md-accent ng-scope md-ink-ripple" title="NEW CALL" ng-click="$mdOpenMenu($event)" aria-label="NEW CALL">\n            <md-icon md-font-icon="icon-phone"></md-icon>\n        </md-button>\n\n        <md-menu-content width="2">\n            <md-menu-item>\n                <md-button ng-click="call(prefix ? prefix + target : target)">\n                    {{\'DASHBOARDS.CALL_NUMBER\' | translate}} ({{prefix ? prefix + \'-\' + target : target}})\n                </md-button>\n            </md-menu-item>\n            <md-menu-item>\n                <md-button ng-click="transfer(target)">\n'+"                    {{'DASHBOARDS.TRANSFER_NUMBER' | translate}} ({{prefix ? prefix + '-' + target : target}})\n                </md-button>\n            </md-menu-item>\n        </md-menu-content>\n    </md-menu>\n</section>"),e.put("app/core/directives/ms-dual-multiselect/ms-dual-multiselect.html",'<div ng-cloak layout-gt-sm="row" layout="column">\n    <div flex-gt-sm="50" flex="45">\n        <md-input-container class="md-icon-float md-block margin-0">\n            <md-icon md-font-icon="icon-magnify" aria-label="swap"></md-icon>\n            <input ng-model="query" type="text" placeholder="Search...">\n        </md-input-container>\n        <md-content class="border h-300">\n            <md-list class="md-dense" layout-fill layout-align="center center">\n                <md-list-item class="md-3-line" ng-repeat="item in options.items | filter: query | orderBy: options.orderBy" ng-click="transfer(options.items, options.selectedItems, options.items.indexOf(item), false)">\n                    <div class="md-list-item-text" layout="column">\n                        <h3 ng-if="options.line1">{{getLine(item, options.line1)}}</h3>\n                        <h4 ng-if="options.line2">{{getLine(item, options.line2)}}</h4>\n                        <p ng-if="options.line3">{{getLine(item, options.line3)}}</p>\n                    </div>\n                    <md-icon md-font-icon="icon-arrow-right-bold" aria-label="swap"></md-icon>\n                    <md-divider></md-divider>\n                </md-list-item>\n            </md-list>\n        </md-content>\n        <div class="margin-10" layout="row">\n            <span class="h4" flex>{{options.labelAll || \'All Items\'}} ({{options.items.length}})</span>\n            <md-icon ng-show="options.showSelectAndDeselectAll" md-font-icon="icon-chevron-double-right" aria-label="swap" ng-click="transfer(options.items, options.selectedItems, -1, false)"></md-icon>\n        </div>\n    </div>\n\n    <div flex="10" layout="row" layout-align="center center">\n        <md-icon md-font-icon="icon-swap-horizontal" aria-label="swap"></md-icon>\n    </div>\n\n    <div flex-gt-sm="50" flex="45">\n        <md-input-container class="md-icon-float md-block margin-0">\n            <md-icon md-font-icon="icon-magnify" aria-label="swap"></md-icon>\n            <input ng-model="selectedQuery" type="text" placeholder="Search...">\n        </md-input-container>\n        <md-content class="border h-300">\n            <md-list class="md-dense" layout-fill layout-align="center center">\n                <md-list-item class="md-3-line" ng-repeat="item in options.selectedItems | filter: selectedQuery | orderBy: options.orderBy" ng-click="transfer(options.selectedItems, options.items, options.selectedItems.indexOf(item), true)">\n                    <md-icon md-font-icon="icon-arrow-left-bold" aria-label="swap"></md-icon>\n                    <div class="md-list-item-text" layout="column">\n                        <h3 ng-if="options.line1">{{getLine(item, options.line1)}}</h3>\n                        <h4 ng-if="options.line2">{{getLine(item, options.line2)}}</h4>\n                        <p ng-if="options.line3">{{getLine(item, options.line3)}}</p>\n                    </div>\n                    <md-divider></md-divider>\n                </md-list-item>\n            </md-list>\n        </md-content>\n        <div class="margin-10" layout="row">\n            <md-icon ng-show="options.showSelectAndDeselectAll" md-font-icon="icon-chevron-double-left" aria-label="swap" flex ng-click="transfer(options.selectedItems, options.items, -1, true)"></md-icon>\n            <span class="h4">{{options.labelSelected || \'Selected Items\'}} ({{options.selectedItems.length}})</span>\n        </div>\n    </div>\n</div>'),e.put("app/core/directives/ms-font-family/ms-font-family.html",'<md-select ng-model="ngModel" class="no-margin">\n    <md-option ng-repeat="font in fonts" ng-value="font.value" <span ng-style="{\'font-family\': font.value}">{{font.option}}</span>\n    </md-option>\n</md-select>'),e.put("app/core/directives/ms-info-bar/ms-info-bar.html",'<div id="ms-info-bar" layout="row" layout-align="start center" flex>\n    <div id="ms-info-bar-message" ng-transclude flex></div>\n    <md-button id="ms-info-bar-close" class="md-icon-button" aria-label="Close" ng-click="removeInfoBar()">\n        <md-icon md-font-icon="icon-close s20"></md-icon>\n    </md-button>\n</div>'),e.put("app/core/directives/ms-material-color-picker/ms-material-color-picker.html",'<md-menu md-position-mode="target-right target">\n\n    <div ng-click="$mdOpenMenu($event)">\n        <ms-color-picker-button>\n            <md-button aria-label="Row Color" md-menu-origin ng-click="$mdOpenMenu($event)" ng-class="vm.selectedColor.class">\n\n                <span ng-show="vm.selectedColor.palette">\n                    {{vm.selectedColor.palette}} {{vm.selectedColor.hue}}\n                </span>\n                <span ng-show="!vm.selectedColor.palette">\n                    Select Color\n                </span>\n            </md-button>\n        </ms-color-picker-button>\n    </div>\n\n    <md-menu-content class="ms-material-color-picker-menu-content" layout-column>\n\n        <header ng-class="vm.selectedColor.class || \'md-accent-bg\'" class="md-whiteframe-4dp" layout="row" layout-align="space-between center">\n            <md-button md-prevent-menu-close ng-click="vm.activateHueSelection(false,false)" class="md-icon-button" ng-class="{\'hidden\':!vm.selectedPalette}" aria-label="Palette">\n                <md-icon md-font-icon="icon-arrow-left" class="s20"></md-icon>\n            </md-button>\n\n            <span ng-if="vm.selectedColor.palette">\n                {{vm.selectedColor.palette}} {{vm.selectedColor.hue}}\n            </span>\n\n            <span ng-if="!vm.selectedColor.palette">\n                Select Color\n            </span>\n\n            <md-button class="remove-color-button md-icon-button" ng-click="vm.removeColor()" aria-label="Remove Color">\n                <md-icon md-font-icon="icon-delete" class="s20"></md-icon>\n            </md-button>\n        </header>\n\n        <div class="colors" ms-scroll>\n            <div ng-show="!vm.selectedPalette" layout="row" layout-wrap>\n                <div class="color" ng-class="\'md-\'+palette+\'-500-bg\'" ng-repeat="(palette, hues) in vm.palettes" ng-click="vm.activateHueSelection(palette,hues)" layout="row" layout-align="start end" md-prevent-menu-close md-ink-ripple>\n                    <span class="label">\n                        {{palette}}\n                    </span>\n                </div>\n            </div>\n\n            <div ng-show="vm.selectedPalette" layout="row" layout-wrap>\n                <div class="color" ng-class="\'md-\'+vm.selectedPalette+\'-\'+hue+\'-bg\'" ng-repeat="(hue, values) in vm.selectedHues" ng-click="vm.selectColor(vm.selectedPalette,hue)" layout="row" layout-align="start end" md-ink-ripple>\n                    <span class="label">\n                        {{hue}}\n                    </span>\n                    <i ng-if="vm.selectedPalette == vm.selectedColor.palette && hue == vm.selectedColor.hue" class="s16 icon-check">\n                    </i>\n                </div>\n            </div>\n\n        </div>\n\n    </md-menu-content>\n</md-menu>'),e.put("app/core/directives/ms-navigation/templates/horizontal.html",'<div class="navigation-toggle" hide-gt-sm>\n    <md-button class="md-icon-button" ng-click="vm.toggleHorizontalMobileMenu()" aria-label="Toggle Mobile Navigation">\n        <md-icon md-font-icon="icon-menu"></md-icon>\n    </md-button>\n</div>\n\n<ul class="horizontal">\n    <li ng-repeat="node in vm.navigation" ms-navigation-horizontal-node="node" ng-class="{\'has-children\': vm.hasChildren}" ng-include="\'navigation-horizontal-nested.html\'"></li>\n</ul>\n\n\x3c!-- Nested horizontal navigation template --\x3e\n<script type="text/ng-template" id="navigation-horizontal-nested.html">\n\n    <div ms-navigation-horizontal-item layout="row" ng-if="!vm.isHidden()">\n\n        <div class="ms-navigation-horizontal-button" ng-if="!node.uisref && node.title" ng-class="{\'active md-accent-bg md-accent-fg\': vm.isActive}">\n            <i class="icon s18 {{node.icon}}" ng-if="node.icon"></i>\n            <span class="title" translate="{{node.translate}}" flex>{{node.title}}</span>\n            <span class="badge white-fg" style="background: {{node.badge.color}}" ng-if="node.badge">{{node.badge.content}}</span>\n            <i class="icon-chevron-right s18 arrow" ng-if="vm.hasChildren"></i>\n        </div>\n\n        <a class="ms-navigation-horizontal-button" ui-sref="{{node.uisref}}" ui-sref-active="active md-accent-bg" ng-class="{\'active md-accent-bg md-accent-fg\': vm.isActive}" ng-if="node.uisref && node.title">\n            <i class="icon s18 {{node.icon}}" ng-if="node.icon"></i>\n            <span class="title" translate="{{node.translate}}" flex>{{node.title}}</span>\n            <span class="badge white-fg" style="background: {{node.badge.color}}" ng-if="node.badge">{{node.badge.content}}</span>\n            <i class="icon-chevron-right s18 arrow" ng-if="vm.hasChildren"></i>\n        </a>\n\n    </div>\n\n    <ul ng-if="vm.hasChildren && !vm.isHidden()">\n        <li ng-repeat="node in node.children" ms-navigation-horizontal-node="node" ng-class="{\'has-children\': vm.hasChildren}" ng-include="\'navigation-horizontal-nested.html\'"></li>\n    </ul>\n\n<\/script>\n\x3c!-- / Nested navigation template --\x3e'),e.put("app/core/directives/ms-navigation/templates/vertical.html",'<ul>\n    <li ng-repeat="node in vm.navigation" ms-navigation-node="node" ng-class="{\'collapsed\': vm.collapsed, \'has-children\': vm.hasChildren}" ng-include="\'navigation-nested.html\'"></li>\n</ul>\n\n\x3c!-- Nested navigation template --\x3e\n<script type="text/ng-template" id="navigation-nested.html">\n\n    <div ms-navigation-item layout="row" ng-if="!vm.isHidden()">\n\n        <div class="ms-navigation-button" ng-if="!node.uisref && node.title">\n            <i class="icon s16 {{node.icon}}" ng-if="node.icon"></i>\n            <span class="title" translate="{{node.translate}}" flex>{{node.title}}</span>\n            <span class="badge white-fg margin-right-20" ng-style="{\'background\': node.badge.color}" ng-if="node.badge">{{node.badge.content}}</span>\n            <i class="icon-chevron-right s16 arrow" ng-if="vm.collapsable && vm.hasChildren"></i>\n        </div>\n\n        <a class="ms-navigation-button" ui-sref="{{node.uisref}}" ui-sref-active="active md-accent-bg" ng-if="node.uisref && node.title">\n            <i class="icon s16 {{node.icon}}" ng-if="node.icon"></i>\n            <span class="title" translate="{{node.translate}}" flex>{{node.title}}</span>\n            <span class="badge white-fg margin-right-20" ng-style="{\'background\': node.badge.color}" ng-if="node.badge">{{node.badge.content}}</span>\n            <i class="icon-chevron-right s16 arrow" ng-if="vm.collapsable && vm.hasChildren"></i>\n        </a>\n\n    </div>\n\n    <ul ng-if="vm.hasChildren && !vm.isHidden()">\n        <li ng-repeat="node in node.children" ms-navigation-node="node" ng-class="{\'collapsed\': vm.collapsed, \'has-children\': vm.hasChildren}" ng-include="\'navigation-nested.html\'"></li>\n    </ul>\n\n<\/script>\n\x3c!-- / Nested navigation template --\x3e'),e.put("assets/ms-phonebar/ms-phonebar-dialpad.html",'\x3c!-- Dialpad --\x3e\n<md-content ng-if="vm_pb.showDialpad" class="num-pad" layout="column">\n    <section layout="row" layout-align="start center">\n        <span><img class="num-pad-logo" layout-padding src="/api/settings/1/logo" alt="logo" /></span>\n        <span class="md-subhead">Dialpad</span>\n        <div layout="row" layout-align="end center" flex>\n            <md-button class="md-icon-button" ng-click="vm_pb.closeDialpad()">\n                <md-icon md-font-icon="icon-close"></md-icon>\n            </md-button>\n        </div>\n    </section>\n    <md-divider></md-divider>\n    <section layout="row">\n        <div class="span4" ng-repeat="item in ::[{n: 1, l: []}, {n: 2, l: [\'a\', \'b\', \'c\']}, {n: 3, l: [\'d\', \'e\', \'f\']}]" ng-click="vm_pb.type(item.n, true)">\n            <div class="num">\n                <div class="txt">\n                    {{item.n}} <span class="small">\n                  <p>\n                  <span ng-repeat="l in ::item.l">{{l | uppercase}}</span>\n                    </p>\n                    </span>\n                </div>\n            </div>\n        </div>\n    </section>\n    <section layout="row">\n        <div class="span4" ng-repeat="item in ::[{n: 4, l: [\'g\', \'h\', \'i\']}, {n: 5, l: [\'j\', \'k\', \'l\']}, {n: 6, l: [\'m\', \'n\', \'o\']}]" ng-click="vm_pb.type(item.n, true)">\n            <div class="num">\n                <div class="txt">\n                    {{item.n}} <span class="small">\n                  <p>\n                    <span ng-repeat="l in ::item.l">{{l | uppercase}}</span>\n                    </p>\n                    </span>\n                </div>\n            </div>\n        </div>\n    </section>\n    <section layout="row">\n        <div class="span4" ng-repeat="item in ::[{n: 7, l: [\'p\', \'q\', \'r\', \'s\']}, {n: 8, l: [\'t\', \'u\', \'v\']}, {n: 9, l: [\'w\', \'x\', \'y\', \'z\']}]" ng-click="vm_pb.type(item.n, true)">\n            <div class="num">\n                <div class="txt">\n                    {{item.n}} <span class="small">\n                  <p>\n                    <span ng-repeat="l in ::item.l">{{l | uppercase}}</span>\n                    </p>\n                    </span>\n                </div>\n            </div>\n        </div>\n    </section>\n    <section layout="row">\n        <div class="span4" ng-repeat="item in ::[{n: \'*\', l: []}]" ng-click="vm_pb.type(item.n, true)">\n            <div class="num" layout="column" layout-align="center center">\n                <div class="txt" layout="column" layout-align="center center">\n                    {{item.n}}\n                </div>\n            </div>\n        </div>\n        <div class="span4" ng-repeat="item in ::[{n: 0, l: [\'+\']}]" ng-click="vm_pb.type(item.n, true)">\n            <div class="num">\n                <div class="txt">\n                    {{item.n}} <span class="small">\n                <p>\n                  <span ng-repeat="l in ::item.l">{{l | uppercase}}</span>\n                    </p>\n                    </span>\n                </div>\n            </div>\n        </div>\n        <div class="span4" ng-repeat="item in ::[{n: \'#\', l: []}]" ng-click="vm_pb.type(item.n, true)">\n            <div class="num" layout="column" layout-align="center center">\n                <div class="txt" layout="column" layout-align="center center">\n                    {{item.n}}\n                </div>\n            </div>\n        </div>\n    </section>\n</md-content>\n\x3c!-- Dialpad --\x3e\n\n\x3c!-- Input Area --\x3e\n<div layout="row" layout-align="start center">\n    <div layout="row" layout-align="center center">\n        \x3c!-- START Ringing Tone--\x3e\n        <md-button class="md-fab md-mini white-bg width-25 height-25 margin-5" aria-label="Ringing" ng-click="vm_pb.toggleVolume(\'ringing\')" ng-disabled="!vm_pb.registered">\n            <md-icon md-font-icon="{{vm_pb.conf.ringingMute ? \'icon-bell-off\' : \'icon-bell-ring\'}}" class="icon s14" ng-class="vm_pb.conf.ringingMute ? \'red-fg\' : \'grey-fg\'">\n                <md-tooltip><span translate="TOOLBAR.RINGING">Ringing</span></md-tooltip>\n            </md-icon>\n        </md-button>\n        \x3c!-- END Ringing Tone --\x3e\n\n        \x3c!-- START Speaker --\x3e\n        <md-button class="md-fab md-mini white-bg width-25 height-25 margin-5" aria-label="Speaker" ng-click="vm_pb.toggleVolume(\'speaker\')" ng-disabled="!vm_pb.registered">\n            <md-icon md-font-icon="{{vm_pb.conf.speakerMute ? \'icon-volume-off\' : \'icon-volume\'}}" class="icon s14" ng-class="vm_pb.conf.speakerMute ? \'red-fg\' : \'grey-fg\'">\n                <md-tooltip><span translate="TOOLBAR.SPEAKER">Speaker</span></md-tooltip>\n            </md-icon>\n        </md-button>\n        \x3c!-- END Speaker --\x3e\n\n        \x3c!-- START Microphone --\x3e\n        <md-button class="md-fab md-mini white-bg width-25 height-25 margin-5" aria-label="Microphone" ng-click="vm_pb.toggleVolume(\'microphone\')" ng-disabled="!vm_pb.registered">\n            <md-icon md-font-icon="{{vm_pb.conf.microphoneMute ? \'icon-microphone-off\' : \'icon-microphone\'}}" class="icon s14" ng-class="vm_pb.conf.microphoneMute ? \'red-fg\' : \'grey-fg\'">\n                <md-tooltip><span translate="TOOLBAR.MICROPHONE">Microphone</span></md-tooltip>\n            </md-icon>\n        </md-button>\n        \x3c!-- END Microphone --\x3e\n\n        \x3c!-- START Registered --\x3e\n        <span>\n        <span class="quantity-indicator md-red-500-bg" ng-class="vm_pb.registered ? \'md-green-500-bg\' : \'md-red-500-bg\'"></span>\n        <md-tooltip><span>{{vm_pb.conf.license ? (vm_pb.registered ? \'TOOLBAR.REGISTERED\' : \'TOOLBAR.NOT_REGISTERED\') : \'TOOLBAR.WEBRTC_LICENSE_NOT_ENABELD\' | translate}} <timer ng-if="vm_pb.registered" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer></span></span>\n        </md-tooltip>\n        </span>\n        \x3c!-- END Registered --\x3e\n    </div>\n    <div layout="column" layout-align="center start">\n        <div layout="row" layout-align="start center">\n            \x3c!-- START Target --\x3e\n            <angucomplete-alt id="ms-target-wrap" pause="10" local-data="vm_pb.calls" search-fields="target" title-field="target" minlength="0" input-class="input-number" disable-input="!vm_pb.registered" match-class="highlight" template-url="assets/ms-phonebar/ms-phonebar-input.html"\n                input-changed="vm_pb.targetChanged" selected-object="vm_pb.targetSelected" clear-selected="true" ng-keypress="vm_pb.typeWrapper($event)" focus-first="true" />\n            \x3c!-- END Target --\x3e\n\n            \x3c!-- Auto Answer --\x3e\n            <div ng-if="vm_pb.conf.autoAnswer" class="red-fg" style="padding-left: 10px;">\n                <span class="font-size-20">A<span class="font-size-16">A</span></span>\n            </div>\n            \x3c!-- Auto Answer --\x3e\n\n            <md-button class="md-fab md-mini white-bg width-30 height-30" aria-label="Dialpad" ng-click="vm_pb.toggleDialpad()" ng-disabled="!vm_pb.registered">\n                <md-icon md-font-icon="icon-apps" class="icon grey-fg s16"></md-icon>\n            </md-button>\n            <md-button ng-if="vm_pb.target" class="md-fab md-mini white-bg width-25 height-25" aria-label="Call" style="margin-left: 0px;" ng-click="vm_pb.call()">\n                <md-icon md-font-icon="icon-phone" class="icon green-fg s12"></md-icon>\n            </md-button>\n        </div>\n    </div>\n</div>\n\x3c!-- Input Area --\x3e\n\n<div class="toolbar-separator"></div>\n\n\x3c!-- Sessions Area --\x3e\n<div class="sessions" layout="row" layout-align="start center" flex>\n    <div layout="row" layout-align="center center" ng-if="!vm_pb.conf.license">\n        <md-icon md-font-icon="icon-account-alert" class="icon s36 red-fg"></md-icon>\n        <span layout-margin translate="TOOLBAR.WEBRTC_LICENSE_NOT_ENABELD"></span>\n    </div>\n\n    <div ng-repeat="session in vm_pb.sessions" class="session" layout="row" ng-click="(vm_pb.sessions.length > 1) && vm_pb.selectSession(session)">\n        <md-button ng-if="vm_pb.conf.recording && session.confirmed" class="md-fab md-mini white-bg width-25 height-25 margin-5" aria-label="Record" ng-click="vm_pb.record(session); $event.stopPropagation();">\n            <md-icon md-font-icon="icon-radiobox-marked" class="icon s14" ng-class="session.monitor ? \'red-fg\' : \'grey-fg\'"></md-icon>\n        </md-button>\n        <div layout="column" layout-align="center start">\n            <span class="session-info">{{ (session.user == session.name) ? session.user : (session.name + \' \' + session.user) }}</span>\n            <span class="session-info" layout="row" layout="start center"><timer interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer></span>\n        </div>\n\n        \x3c!-- START Answer --\x3e\n        <md-button ng-if="session.incoming && !session.confirmed" class="md-fab md-mini white-bg width-25 height-25 margin-5" aria-label="Hold" ng-click="vm_pb.answer(session); $event.stopPropagation();">\n            <md-icon md-font-icon="icon-phone" class="icon green-fg s12"></md-icon>\n        </md-button>\n        \x3c!-- END Answer --\x3e\n\n        \x3c!-- START Hangup --\x3e\n        <md-button class="md-fab md-mini white-bg width-25 height-25 margin-5" aria-label="Terminate" ng-click="vm_pb.terminate(session); $event.stopPropagation();">\n            <md-icon md-font-icon="icon-phone-hangup" class="icon red-fg s12"></md-icon>\n        </md-button>\n        \x3c!-- END Hangup --\x3e\n\n        \x3c!-- START Hold/Unhold --\x3e\n        <md-button ng-if="session.confirmed" class="md-fab md-mini white-bg width-25 height-25 margin-5" aria-label="Hold" ng-click="(session.localHold ? vm_pb.unhold(session) : vm_pb.hold(session)); $event.stopPropagation();">\n            <md-icon md-font-icon="{{session.localHold ? \'icon-play\' : \'icon-pause\'}}" class="icon grey-fg s12"></md-icon>\n        </md-button>\n        \x3c!-- END Hold/Unhold --\x3e\n\n        \x3c!-- START Transfer --\x3e\n        <md-button ng-if="session.confirmed && !session.localHold && vm_pb.sessions.length == 1" class="md-fab md-mini white-bg width-25 height-25 margin-5" aria-label="Refer" ng-click="vm_pb.refer(session);  $event.stopPropagation();">\n            <md-icon md-font-icon="icon-phone-forward" class="icon purple-fg s12"></md-icon>\n        </md-button>\n        \x3c!-- END transfer --\x3e\n\n        \x3c!-- START Attended Transfer --\x3e\n        <md-button ng-if="session.confirmed && !session.localHold && vm_pb.sessions.length > 1" class="md-fab md-mini white-bg width-25 height-25 margin-5" aria-label="Refer Attended" ng-click="vm_pb.referAttended(session);  $event.stopPropagation();">\n            <md-icon md-font-icon="icon-phone-forward" class="icon purple-fg s12"></md-icon>\n        </md-button>\n        \x3c!-- END Attended Transfer --\x3e\n    </div>\n</div>\n\x3c!-- Sessions Area --\x3e'),e.put("assets/ms-phonebar/ms-phonebar-input.html",'<div class="angucomplete-holder" ng-class="{\'angucomplete-dropdown-visible\': showDropdown}">\n    <input id="ms-target" ng-model="searchStr" ng-disabled="disableInput" type="text" placeholder="{{placeholder}}" ng-focus="onFocusHandler()" class="{{inputClass}}" ng-focus="resetHideResults()" ng-blur="hideResults($event)" autocapitalize="off" autocorrect="off"\n        autocomplete="off" ng-change="inputChangeHandler(searchStr)" />\n    <div class="angucomplete-dropdown" ng-show="showDropdown && !(!searching && (!results || results.length == 0))">\n        <div class="angucomplete-row" ng-repeat="result in results" ng-click="selectResult(result)" ng-mouseenter="hoverRow($index)" ng-class="{\'angucomplete-selected-row\': $index == currentIndex}">\n            <div layout="row" layout-align="start center">\n                <md-icon md-font-icon="{{result.originalObject.inbound ? \'icon-arrow-bottom-left\' : \'icon-arrow-top-right\'}}" class="icon no-margin s22"></md-icon>\n                <span style="margin-left: 8px;">({{result.originalObject.time}}) - <span class="angucomplete-title" ng-if="matchClass" ng-bind-html="result.title"></span></span>\n            </div>\n        </div>\n    </div>\n</div>'),e.put("assets/ms-phonebar/ms-phonebar.html",'<div layout="row" layout-align="start center" flex>\n    \x3c!-- Audio stream --\x3e\n    <audio id="remote-audio" autoplay hidden=true></audio>\n    \x3c!-- Audio stream --\x3e\n\n    \x3c!-- WebRtc PhoneBar --\x3e\n    <div class="phonebar-container" ng-include="\'assets/ms-phonebar/ms-phonebar-dialpad.html\'" layout="row" layout-align="start center" flex></div>\n    \x3c!-- WebRtc PhoneBar --\x3e\n</div>'),e.put("assets/ms-phonebar/record/dialog.html",'<md-dialog aria-label="Recording" ng-init="vm.onInit()">\n    <form ng-cloak>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <div flex>\n                    <span class="title" translate="TOOLBAR.RECORDING">Recording</span>\n                </div>\n                <div layout="row" layout-align="end center">\n                    <md-button class="md-icon-button no-margin no-padding">\n                        <md-icon class="no-margin" md-font-icon="icon-plus" aria-label="Add" ng-click="vm.addRecording()"></md-icon>\n                    </md-button>\n                    <md-button class="md-icon-button no-margin no-padding" ng-click="vm.closeDialog()">\n                        <md-icon class="no-margin" md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-toolbar>\n\n        <md-table-container>\n            <table md-table layout-padding>\n                <thead md-head>\n                    <tr md-row>\n                        <th md-column><span translate="TOOLBAR.FILENAME">File name</span></th>\n                        <th md-column><span translate="TOOLBAR.STATUS">Status</span></th>\n                        <th md-column><span translate="TOOLBAR.ACTIONS">Actions</span></th>\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm.session.monitors.length">\n                        <td md-cell colspan="3">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="TOOLBAR.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="monitor in vm.session.monitors">\n                        <td md-cell>{{monitor.filename}}</td>\n                        <td md-cell class="no-padding">\n                            <md-icon md-font-icon="icon-radiobox-marked" class="icon s16" ng-class="(monitor.status == \'rec\') ? \'red-fg ms-blink\' : \'grey-fg\'"></md-icon>\n                        </td>\n                        <td md-cell class="no-padding">\n                            <md-button class="md-fab md-mini white-bg width-35 height-35 margin-5" aria-label="Record" ng-click="(monitor.status == \'rec\') ? vm.stop(monitor) : vm.start(monitor)">\n'+"                                <md-icon md-font-icon=\"{{monitor.status == 'rec' ? 'icon-stop' : 'icon-play'}}\" class=\"icon s16\" ng-class=\"monitor.status == 'rec' ? 'grey-fg' : 'red-fg'\"></md-icon>\n                            </md-button>\n                        </td>\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n    </form>\n</md-dialog>"),e.put("assets/ms-phonebar/referAttended/dialog.html",'<md-dialog aria-label="Transfer">\n    <form ng-cloak>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <div flex>\n                    <span class="title" translate="TOOLBAR.ATTENDED_TRANSFER">Transfer</span>\n                </div>\n                <div layout="row" layout-align="end center">\n                    <md-button class="md-icon-button no-margin no-padding" ng-click="vm.closeDialog()">\n                        <md-icon class="no-margin" md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content>\n            <label translate="TOOLBAR.TARGET">Target</label>\n            <md-input-container class="md-block">\n                <md-select ng-model="vm.target">\n                    <md-option ng-repeat="session in vm.sessions" ng-value="session.user">\n                        {{ session.name }}\n                    </md-option>\n                </md-select>\n            </md-input-container>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row">\n            <md-button ng-click="vm.transfer()" class="send-button md-accent md-raised" aria-label="transfer" ng-disabled="!vm.target && !vm.sessionId">\n                <span translate="TOOLBAR.TRANSFER">TRANSFER</span>\n            </md-button>\n            <md-button ng-click="vm.closeDialog()" class="send-button md-accent md-raised" aria-label="cancel">\n                <span translate="TOOLBAR.CANCEL">Cancel</span>\n            </md-button>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("assets/ms-phonebar/settings/settings.html",'<md-dialog class="md-phonebar-dialog" aria-label="{{vm.name}}">\n    <form name="settingsForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title" translate="TOOLBAR.SETTINGS">Settings</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content class="no-padding" ms-scroll>\n            <md-tabs md-no-pagination md-stretch-tabs="always">\n                <md-tab label="{{ \'TOOLBAR.PROFILE\' | translate}}">\n                    <md-content layout-padding layout="column">\n                        <span><span translate="TOOLBAR.FULLNAME">Fullname</span>: {{vm.conf.fullname}}</span>\n                        <span><span translate="TOOLBAR.NAME">Name</span>: {{vm.conf.name}}</span>\n                        <span><span translate="TOOLBAR.INTERNAL">Internal</span>: {{vm.conf.internal}}</span>\n                        <span><span translate="TOOLBAR.BROWSER">Browser</span>: {{vm.conf.browserName}} {{vm.conf.browserVersion}}</span>\n                        <span><span translate="TOOLBAR.OS">OS</span>: {{vm.conf.osName}} {{vm.conf.osVersion}}</span>\n                    </md-content>\n                </md-tab>\n                <md-tab label="{{ \'TOOLBAR.SERVICES\' | translate}}">\n                    <md-content layout-padding>\n                        <md-input-container class="md-block">\n                            <md-switch ng-model="vm.conf.autoAnswer" aria-label="Auto Answer">\n                                <span translate="TOOLBAR.AUTOANSWER">Auto Answer</span>\n                                <span>{{ vm.conf.autoAnswerDelay }} [s]</span>\n                            </md-switch>\n                        </md-input-container>\n                    </md-content>\n                </md-tab>\n                <md-tab label="{{ \'TOOLBAR.AUDIO\' | translate}}">\n                    <md-content layout-padding>\n                        <div class="border brad-5" layout-margin>\n                            <md-input-container class="md-block" ng-if="(vm.devices | filter: { kind: \'audiooutput\', deviceId: \'!default\' }).length">\n                                <label translate="TOOLBAR.RINGINGDEVICE">Ringing Device</label>\n                                <md-select name="ringingDevice" ng-model="vm.conf.ringingId" required>\n                                    <md-option ng-value="device.deviceId" ng-repeat="device in vm.devices | filter: { kind: \'audiooutput\', deviceId: \'!default\' }">{{ device.label || (\'Speaker \' + ($index + 1)) }}</md-option>\n                                </md-select>\n                                <div ng-messages="settingsForm[\'ringingDevice\'].$error" ng-show="settingsForm[\'ringingDevice\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLBAR.ERRORS.FIELD_REQUIRED">Field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <div layout="row" layout-align="space-between center">\n                                <md-switch ng-model="vm.conf.ringingMute" aria-label="Mute">\n                                    Mute\n                                </md-switch>\n\n                                <md-slider-container flex="80">\n                                    <md-slider flex step="0.1" min="0" max="1" ng-model="vm.conf.ringingVolume" aria-label="volume"></md-slider>\n                                </md-slider-container>\n                            </div>\n                        </div>\n\n                        <div class="border brad-5" layout-margin>\n                            <md-input-container class="md-block" ng-if="(vm.devices | filter: { kind: \'audiooutput\', deviceId: \'!default\' }).length">\n                                <label translate="TOOLBAR.SPEAKERDEVICE">Speaker Device</label>\n                                <md-select name="speakerDevice" ng-model="vm.conf.speakerId" required>\n                                    <md-option ng-value="device.deviceId" ng-repeat="device in vm.devices | filter: { kind: \'audiooutput\', deviceId: \'!default\' }">{{ device.label || (\'Speaker \' + ($index + 1)) }}</md-option>\n                                </md-select>\n                                <div ng-messages="settingsForm[\'speakerDevice\'].$error" ng-show="settingsForm[\'speakerDevice\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLBAR.ERRORS.FIELD_REQUIRED">Field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <div layout="row" layout-align="space-between cetner">\n                                <md-switch ng-model="vm.conf.speakerMute" aria-label="Mute">\n                                    Mute\n                                </md-switch>\n\n                                <md-slider-container flex="80">\n                                    <md-slider flex step="0.1" min="0" max="1" ng-model="vm.conf.speakerVolume" aria-label="volume"></md-slider>\n                                </md-slider-container>\n                            </div>\n                        </div>\n\n                        <div class="border brad-5" layout-margin>\n                            <md-input-container class="md-block" ng-if="(vm.devices | filter: { kind: \'audioinput\', deviceId: \'!default\' }).length">\n                                <label translate="TOOLBAR.MICROPHONEDEVICE">Microphone Device</label>\n                                <md-select name="microphoneDevice" ng-model="vm.conf.microphoneId" required>\n                                    <md-option ng-value="device.deviceId" ng-repeat="device in vm.devices | filter: { kind: \'audioinput\', deviceId: \'!default\' }">{{ device.label || (\'Microphone \' + ($index + 1))}}</md-option>\n                                </md-select>\n                                <div ng-messages="settingsForm[\'microphoneDevice\'].$error" ng-show="settingsForm[\'microphoneDevice\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLBAR.ERRORS.FIELD_REQUIRED">Field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <div layout="row" layout-align="space-between center">\n                                <md-switch ng-model="vm.conf.microphoneMute" aria-label="Mute">\n                                    Mute\n                                </md-switch>\n                            </div>\n                        </div>\n                    </md-content>\n                </md-tab>\n                <md-tab label="{{ \'TOOLBAR.REQUIREMENTS\' | translate}}">\n                    <md-content layout-padding>\n                        <md-list>\n                            <md-list-item>\n                                <h3 translate="TOOLBAR.LICENSE">License</h3>\n                                <md-icon class="md-secondary" ng-class="vm.conf.license ? \'green-fg\' : \'red-fg\'" md-font-icon="{{vm.conf.license ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            </md-list-item>\n                            <md-list-item>\n                                <h3 translate="TOOLBAR.BROWSER_COMPATIBILITY">Browser Compatibility</h3>\n                                <md-icon class="md-secondary" ng-class="vm.isCompatibleBrowser() ? \'green-fg\' : \'red-fg\'" md-font-icon="{{vm.isCompatibleBrowser() ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            </md-list-item>\n                            <md-list-item>\n                                <h3 translate="TOOLBAR.HTTPS">HTTPS</h3>\n                                <md-icon class="md-secondary" ng-class="vm.conf.protocol === \'https\' ? \'green-fg\' : \'red-fg\'" md-font-icon="{{vm.conf.protocol === \'https\' ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            </md-list-item>\n                            <md-list-item>\n                                <h3 translate="TOOLBAR.WEBRTCSUPPORT">WebRTC Support</h3>\n                                <md-icon class="md-secondary" ng-class="vm.conf.isWebRTCSupported ? \'green-fg\' : \'red-fg\'" md-font-icon="{{vm.conf.isWebRTCSupported ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            </md-list-item>\n                            <md-list-item>\n                                <h3 translate="TOOLBAR.MICROPHONE">Microphone</h3>\n                                <md-icon class="md-secondary" ng-class="vm.conf.hasMicrophone ? \'green-fg\' : \'red-fg\'" md-font-icon="{{vm.conf.hasMicrophone ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            </md-list-item>\n                            <md-list-item>\n                                <h3 translate="TOOLBAR.SPEAKER">Speaker</h3>\n                                <md-icon class="md-secondary" ng-class="vm.conf.hasSpeakers ? \'green-fg\' : \'red-fg\'" md-font-icon="{{vm.conf.hasSpeakers ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            </md-list-item>\n                        </md-list>\n                    </md-content>\n                </md-tab>\n            </md-tabs>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveSettings()" class="send-button md-accent md-raised" ng-disabled="settingsForm.$invalid || settingsForm.$pristine" aria-label="SAVE" translate="TOOLBAR.SAVE" translate-attr-aria-label="TOOLBAR.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/core/directives/ms-search-bar/ms-search-bar.html",'<div flex layout="row" layout-align="start center">\n    <label for="ms-search-bar-input">\n        <md-button class="ms-search-bar-expander md-icon-button" aria-label="Expand Search Bar"\n                   ng-click="MsSearchBar.expand()"\n                   ng-if="!MsSearchBar.resultsLoading || MsSearchBar.collapsed">\n            <md-icon md-font-icon="icon-magnify" class="icon s24"></md-icon>\n        </md-button>\n        <div class="ms-search-bar-loader" layout="row" layout-align="center center"\n             ng-if="MsSearchBar.resultsLoading && !MsSearchBar.collapsed">\n            <md-progress-circular class="md-accent" md-diameter="32" md-mode="indeterminate"></md-progress-circular>\n        </div>\n    </label>\n    <input id="ms-search-bar-input" type="text" placeholder="Search" flex ng-model="MsSearchBar.query" ng-model-options="MsSearchBar.queryOptions" ng-blur="MsSearchBar.blurCollapse()" ng-keydown="MsSearchBar.handleKeydown($event)">\n    <md-button class="ms-search-bar-collapser md-icon-button" ng-click="MsSearchBar.collapse()" aria-label="Collapse Search Bar">\n        <md-icon md-font-icon="icon-close" class="icon s24"></md-icon>\n    </md-button>\n\n    <div class="ms-search-bar-results" ng-if="MsSearchBar.results" ms-scroll>\n        <div class="no-results" ng-if="MsSearchBar.results.length === 0">No Results!</div>\n\n        <div class="result" ng-repeat="result in MsSearchBar.results" ng-click="MsSearchBar.handleResultClick(result)" ng-mouseenter="MsSearchBar.handleMouseenter($index)" ng-mousedown="MsSearchBar.absorbEvent($event)" ng-class="{\'selected\': $index == MsSearchBar.selectedResultIndex}"\n            md-ink-ripple>\n            <div layout="row" layout-align="start center">\n                <div class="icon-container" layout="row" layout-align="center center">\n                    <i ng-if="result.icon" class="icon {{result.icon}}"></i>\n                    <div ng-if="!result.icon" class="square md-accent-bg"></div>\n                </div>\n                <div>\n                    <div class="title">{{result.title}}</div>\n                    <div class="description" ng-if="result.description">{{result.description}}</div>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>'),e.put("app/core/directives/ms-shortcuts/ms-shortcuts.html",'<div class="shortcuts-container" layout="row" layout-align="space-between center" flex ng-class="{\'mobile-bar-active\': MsShortcuts.mobileBarActive}">\n\n    <div class="flex-noshrink" layout="row" layout-align="start center" flex>\n        <div class="shortcuts hide show-gt-xs" layout="row" layout-align="start center" ms-scroll ng-if="MsShortcuts.shortcuts.length > 0" ng-sortable="MsShortcuts.sortableOptions">\n            <div ng-repeat="shortcut in MsShortcuts.shortcuts" layout="row" layout-align="center center">\n                <md-button class="md-icon-button shortcut" aria-label="{{shortcut.title}}" ui-sref="{{shortcut.uisref}}">\n                    <md-icon ng-if="shortcut.icon" md-font-icon="{{shortcut.icon}}" class="icon s24"></md-icon>\n                    <div ng-if="!shortcut.icon" class="first-letter">{{shortcut.title.charAt(0)}}</div>\n                    <md-tooltip md-direction="bottom">{{shortcut.title}}</md-tooltip>\n                </md-button>\n            </div>\n        </div>\n\n        \x3c!-- <md-menu md-offset="8 56" class="shortcut-menu hide show-gt-xs">\n            <md-button class="md-icon-button add-shortcut-button" aria-label="Add shortcut"\n                       ng-click="$mdOpenMenu($event)">\n                <md-icon md-menu-origin md-font-icon="icon-star" class="icon amber-600-fg s24"></md-icon>\n                <md-tooltip md-direction="bottom">Click to add/remove shortcut</md-tooltip>\n            </md-button>\n\n            <md-menu-content>\n                <div id="ms-shortcut-add-menu">\n                    <div class="shortcut-search" layout="row" layout-align="start center">\n                        <div class="search-icon" layout="row" layout-align="center center"\n                             ng-if="!MsShortcuts.resultsLoading">\n                            <md-icon md-menu-align-target md-font-icon="icon-magnify" class="icon s24"></md-icon>\n                        </div>\n                        <div class="shortcut-loader" layout="row" layout-align="center center"\n                             ng-if="MsShortcuts.resultsLoading">\n                            <md-progress-circular class="md-accent" md-diameter="20" md-mode="indeterminate">\n                            </md-progress-circular>\n                        </div>\n\n                        <input type="text" placeholder="Search" flex\n                               ng-model="MsShortcuts.query"\n                               ng-model-options="MsShortcuts.queryOptions"\n                               ng-keydown="MsShortcuts.handleKeydown($event)">\n                    </div>\n\n                    <div class="results" ng-if="MsShortcuts.results" ms-scroll>\n                        <div class="no-results" ng-if="MsShortcuts.results.length === 0">No Results!</div>\n\n                        <div class="result" ng-repeat="result in MsShortcuts.results"\n                             ng-click="MsShortcuts.handleResultClick(result)"\n                             ng-mouseenter="MsShortcuts.handleMouseenter($index)"\n                             ng-mousedown="MsShortcuts.absorbEvent($event)"\n                             ng-class="{\'selected\': $index == MsShortcuts.selectedResultIndex}"\n                             md-prevent-menu-close="md-prevent-menu-close"\n                             md-ink-ripple>\n                            <div layout="row" layout-align="start space-between">\n                                <div layout="row" layout-align="start center" flex>\n                                    <div class="icon icon-container" layout="row" layout-align="center center">\n                                        <i ng-if="result.icon" class="{{result.icon}}"></i>\n                                        <div ng-if="!result.icon" class="square md-accent-bg"></div>\n                                    </div>\n                                    <div>\n                                        <div class="title">{{result.title}}</div>\n                                    </div>\n                                </div>\n                                <md-icon md-font-icon="icon-pin" class="icon s18"\n                                         ng-class="{\'fade-text\': !result.hasShortcut}"></md-icon>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n            </md-menu-content>\n        </md-menu> --\x3e\n    </div>\n\n    <md-button class="md-icon-button toggle-mobile-menu hide-gt-xs" aria-label="Add shortcut" ng-click="MsShortcuts.toggleMobileBar()">\n        <md-icon md-menu-origin md-font-icon="icon-star" class="icon amber-600-fg s24" ng-hide="MsShortcuts.mobileBarActive"></md-icon>\n        <md-icon md-menu-origin md-font-icon="icon-close" class="icon s24" ng-hide="!MsShortcuts.mobileBarActive"></md-icon>\n    </md-button>\n</div>'),e.put("app/core/directives/ms-stepper/templates/horizontal/horizontal.html",'<div class="ms-stepper-horizontal">\n    <div class="ms-stepper-navigation-wrapper">\n        <div class="ms-stepper-navigation" layout="row" layout-align="center center">\n            <md-button class="ms-stepper-navigation-item" ng-class="{\'current\': MsStepper.isStepCurrent(step.stepNumber), \'valid\': MsStepper.isStepValid(step.stepNumber), \'disabled\': MsStepper.isStepDisabled(step.stepNumber), \'optional\': MsStepper.isStepOptional(step.stepNumber)}"\n                ng-click="MsStepper.gotoStep(step.stepNumber)" ng-disabled="MsStepper.isStepDisabled(step.stepNumber)" ng-repeat="step in MsStepper.steps | filter:MsStepper.filterHiddenStep" layout="row" layout-align="start center">\n\n                <div class="step md-accent-bg" layout="row" layout-align="center center">\n                    <span ng-if="!MsStepper.isStepValid(step.stepNumber) || MsStepper.isStepOptional(step.stepNumber)">\n                    {{$index + 1}}\n                </span>\n                    <span ng-if="MsStepper.isStepValid(step.stepNumber) && !MsStepper.isStepOptional(step.stepNumber)">\n                    <i class="icon icon-check s18"></i>\n                </span>\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="title" translate="{{step.stepTitleTranslate}}">{{step.stepTitle}}</div>\n                    <div class="subtitle" ng-if="MsStepper.isStepOptional(step.stepNumber)">Optional</div>\n                </div>\n            </md-button>\n        </div>\n    </div>\n\n    <div class="ms-stepper-steps" ng-transclude></div>\n\n    <div class="ms-stepper-controls" layout="row" layout-align="center center">\n        <md-button class="md-accent md-raised" ng-disabled="MsStepper.isFirstStep()" ng-click="MsStepper.gotoPreviousStep()">\n            Back\n        </md-button>\n\n        <div class="ms-stepper-dots">\n            <span ng-repeat="step in MsStepper.steps" ng-hide="MsStepper.isStepHidden(step.stepNumber)" ng-class="{\'selected md-accent-bg\':MsStepper.currentStepNumber === $index + 1}">\n            </span>\n        </div>\n\n        <md-button class="md-accent md-raised" ng-if="!MsStepper.isLastStep()" ng-disabled="!MsStepper.isStepValid(MsStepper.currentStepNumber)" ng-click="MsStepper.gotoNextStep()">\n            Next\n        </md-button>\n\n        <md-button type="submit" class="md-accent md-raised" ng-click="MsStepper.resetForm()" ng-if="MsStepper.isLastStep()" ng-disabled="!MsStepper.isFormValid()">\n            Submit\n        </md-button>\n    </div>\n</div>'),e.put("app/core/directives/ms-stepper/templates/vertical/step/vertical-step.html","<md-button class=\"ms-stepper-navigation-item\" ng-class=\"{'current': MsStepper.isStepCurrent(stepInfo.stepNumber), 'valid': MsStepper.isStepValid(stepInfo.stepNumber), 'disabled': MsStepper.isStepDisabled(stepInfo.stepNumber), 'optional': MsStepper.isStepOptional(stepInfo.stepNumber)}\"\n"+'    ng-click="MsStepper.gotoStep(stepInfo.stepNumber)" ng-disabled="MsStepper.isStepDisabled(stepInfo.stepNumber)" ng-hide="MsStepper.isStepHidden(stepInfo.stepNumber)" aria-label="Stepper navigation button" layout="row" layout-align="start center">\n\n    <div class="step" layout="row" layout-align="center center">\n        <span ng-if="!MsStepper.isStepValid(stepInfo.stepNumber) || MsStepper.isStepOptional(stepInfo.stepNumber)">\n            <i class="icon icon-checkbox-blank-circle-outline s18 md-accent-fg"></i>\n        </span>\n        <span ng-if="MsStepper.isStepValid(stepInfo.stepNumber) && !MsStepper.isStepOptional(stepInfo.stepNumber)">\n            <i class="icon icon-check-circle s18 md-accent-fg"></i>\n        </span>\n    </div>\n\n    <div layout="column" layout-align="start start">\n        <div class="title" ng-if="stepInfo.stepTitleTranslate">{{stepInfo.stepTitleTranslate | translate }}</div>\n        <div class="title" ng-if="!stepInfo.stepTitleTranslate">{{stepInfo.stepTitle}}</div>\n        <div class="subtitle" ng-if="MsStepper.isStepOptional(stepInfo.stepNumber)">Optional</div>\n    </div>\n</md-button>\n\n<div class="ms-stepper-step-content" ng-transclude></div>\n\n<div class="ms-stepper-controls" layout="row" layout-align="start center" ng-show="MsStepper.isStepCurrent(stepInfo.stepNumber)">\n    <md-button class="md-accent md-raised" ng-disabled="MsStepper.isFirstStep()" ng-click="MsStepper.gotoPreviousStep()">\n        Back\n    </md-button>\n\n    <md-button class="md-accent md-raised" ng-if="!MsStepper.isLastStep()" ng-disabled="!MsStepper.isStepValid(MsStepper.currentStepNumber)" ng-click="MsStepper.gotoNextStep()">\n        Next\n    </md-button>\n\n    <md-button type="submit" class="md-accent md-raised" ng-click="MsStepper.resetForm()" ng-if="MsStepper.isLastStep()" ng-disabled="!MsStepper.isFormValid()">\n        Submit\n    </md-button>\n</div>'),e.put("app/core/directives/ms-stepper/templates/vertical/vertical.html",'<div class="ms-stepper-vertical">\n    <div class="ms-stepper-vertical-line"></div>\n    <div class="ms-stepper-steps" ng-transclude></div>\n</div>'),e.put("app/core/directives/ms-timezone/ms-timezone.html",'<md-select ng-model="ngModel" class="no-margin">\n    <md-option ng-value="null">NONE</md-option>\n    <md-option ng-repeat="t in timezone | orderBy:\'utcOffset\'" value="{{t.name}}">{{t.name}} ({{t.offsetStr}})</md-option>\n</md-select>'),e.put("app/core/directives/ms-widget-engine/ms-widget-engine-counter/ms-widget-engine.counter.html",'<div class="pt-8 pb-32" layout="column" layout-align="center center" layout-fill ng-controller="MsWidgetEngineCounterController as vm">\n    <div ng-class="\'font-size-\' + (vm.fontSize * 3)" ng-style="{\'color\': widget.foreground}">\n        {{ vm.getCount(widget) }}\n    </div>\n    <div ng-class="\'font-size-\' + vm.fontSize" ng-style="{\'color\': widget.foreground}">{{ \'TOOLS.\' + widget.attrs[0].value | uppercase | translate }}<span ng-if="vm.filtered">*</span></div>\n</div>'),e.put("app/core/directives/ms-widget-engine/ms-widget-engine-multibar-chart/ms-widget-engine.multibar-chart.html",'<div ng-controller="MsWidgetEngineMultibarChartController as vm" ng-init="vm.getMultiBarChart(widget)" layout="column" layout-fill>\n\n    <span ng-show="false">{{ vm.getMultiBarChart(widget)}}</span>\n\n    <canvas style="overflow:scroll" id="bar" class="chart-horizontal-bar" chart-data="vm.multiBarChart.data" chart-options="vm.multiBarChart.options" chart-series="vm.multiBarChart.series" chart-labels="vm.multiBarChart.labels">\n    </canvas>\n</div>'),e.put("app/core/directives/ms-widget-engine/ms-widget-engine-pie-chart/ms-widget-engine.pie-chart.html",'<div ng-controller="MsWidgetEnginePieChartController as vm" ng-init="vm.getPieChart(widget)" layout="column" layout-fill>\n\n    <span ng-show="false">{{ vm.getPieChart(widget)}}</span>\n\n    <canvas style="overflow:scroll" id="pie" class="chart-pie" chart-data="vm.pieChart.data" chart-labels="vm.pieChart.labels" chart-options="vm.pieChart.options">\n    </canvas>\n</div>'),e.put("app/core/directives/ms-widget-engine/ms-widget-engine-web-report/ms-widget-engine.web-report.html",'<div ng-controller="MsWidgetEngineWebReportController as vm" ng-init="vm.onInit(widget)">\n    <dl ng-if="vm.error">\n        <dt class="text-bold">Query Error</dt>\n        <dd>{{vm.error.sql}}</dd>\n        <dt>Message</dt>\n        <dd>{{vm.error.msg}}</dd>\n    </dl>\n    <md-toolbar class="md-table-toolbar md-default">\n        <div class="md-toolbar-tools">\n            <span class="md-subhead">{{vm.title}}</span>\n            <div flex></div>\n            <md-button class="md-icon-button" ng-click="vm.onInit(widget)" aria-label="refresh">\n                <md-icon md-font-icon="icon-refresh"></md-icon>\n            </md-button>\n            <span ng-if="vm.refresh && vm.countDown" class="md-subhead blue-fg">{{vm.countDown}}</span>\n        </div>\n    </md-toolbar>\n    <md-table-container ng-if="!vm.error">\n        <table md-table md-progress="vm.promise">\n            <thead md-head>\n                <tr md-row>\n                    <th md-column ng-repeat="column in vm.columns">{{column.alias || column.field}}</th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-repeat="row in vm.results.rows">\n                    <td md-cell ng-repeat="(key, value) in row">{{ vm.valueReplacer(key, value) }}</td>\n                </tr>\n                <tr md-row ng-if="!vm.results.rows.length">\n                    <td md-cell colspan="{{vm.columns.length}}">\n                        <div layout="row" layout-align="center center">\n                            <span>No Data</span>\n                        </div>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.results.count}}" md-on-paginate="vm.getResults" md-page-select></md-table-pagination>\n</div>'),e.put("app/core/directives/ms-widget-engine/ms-widget-engine.html",'<div gridster="vm.config">\n    <ul>\n        <li gridster-item="widget" ng-repeat="widget in vm.config.widgets">\n            <md-card layout-fill>\n                <md-toolbar class="height-40" ng-style="{\'background-color\': widget.background, \'color\': widget.foreground }">\n                    <div class="md-toolbar-tools height-40 no-margin" layout="row" layout-align="start center">\n                        <a ng-href="{{widget.link ? widget.link : \'javascript:void(0)\'}}" ng-style="{\'color\': widget.foreground}" class="text-truncate" flex>\n                            {{ widget.title || \'No Title\' }}\n                        </a>\n                        <md-button ng-if="!vm.config.preview" class="draggable md-icon-button width-30 no-margin no-padding" aria-label="Move">\n                            <md-tooltip><span translate="TOOLS.MOVE_WIDGET">Move</span></md-tooltip>\n                            <md-icon md-font-icon="icon-cursor-move" class="s20" ng-style="{\'color\': widget.foreground}"></md-icon>\n                        </md-button>\n                        <md-menu ng-if="!vm.config.preview">\n                            <md-button ng-click="$mdOpenMenu($event)" class="md-icon-button width-30 no-margin no-padding" aria-label="More">\n                                <md-icon md-font-icon="icon-dots-vertical" class="s20" ng-style="{\'color\': widget.foreground}"></md-icon>\n                            </md-button>\n                            <md-menu-content>\n                                <md-menu-item>\n                                    <md-button ng-click="vm.onEdit({widget: widget})" translate="TOOLS.EDIT_WIDGET">Edit</md-button>\n                                </md-menu-item>\n                                <md-menu-item>\n                                    <md-button ng-click="vm.onDelete({widget: widget})" translate="TOOLS.DELETE_WIDGET">Delete</md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n\n                    </div>\n                </md-toolbar>\n                <md-card-content class="resizable" layout="column" layout-align="center center" flex ng-style="{\'background-color\': widget.background, \'color\': widget.foreground}">\n                    <div ng-switch="widget.type" layout-fill>\n                        <iframe ng-switch-when="iframe|custom" ng-switch-when-separator="|" ng-src="{{vm.getTrustedURL(widget.attrs[0].value)}}" frameborder=0 style="border:0px; width:100%; height:100%;"></iframe>\n                        <ds-widget-clock ng-class="\'font-size-\' + (widget.attrs[2].value || 12)" ng-switch-when="clock" digital-format="widget.attrs[0].value" gmt-offset="widget.attrs[1].value" data-show-digital show-gmt-info></ds-widget-clock>\n                        <div ng-switch-default layout-fill>\n                            <div ng-include="widget.templateUrl" layout-fill></div>\n                        </div>\n                    </div>\n                </md-card-content>\n            </md-card>\n        </li>\n    </ul>\n</div>'),e.put("app/core/layouts/content-only.html",'<div id="layout-content-only" class="template-layout" layout="column" flex>\n    <md-content id="content" class="animate-slide-up md-hue-2" ui-view="content" flex></md-content>\n</div>'),e.put("app/core/layouts/content-with-toolbar.html",'<div id="layout-content-with-toolbar" class="template-layout" layout="column" flex>\n    <md-toolbar id="toolbar" class="md-menu-toolbar md-whiteframe-1dp" ui-view="toolbar"></md-toolbar>\n    <md-content id="content" class="animate-slide-up md-hue-2" ui-view="content" flex></md-content>\n\n    <md-sidenav id="quick-panel" class="md-sidenav-right md-whiteframe-4dp" md-component-id="quick-panel" ms-scroll ui-view="quickPanel"></md-sidenav>\n</div>'),e.put("app/core/layouts/horizontal-navigation.html",'<div id="layout-horizontal-navigation" class="template-layout" layout="column" flex>\n\n    <div id="toolbar-navigation-container" class="md-whiteframe-1dp" layout="column" layout-align="space-between start">\n        <md-toolbar id="toolbar" class="md-menu-toolbar md-whiteframe-1dp" ui-view="toolbar"></md-toolbar>\n        <div id="horizontal-navigation" ui-view="navigation" layout="row" layout-align="start end" flex></div>\n    </div>\n\n    <div id="content-container" flex layout="column">\n        <md-content id="content" class="animate-slide-up md-hue-2" ms-scroll ui-view="content" flex></md-content>\n    </div>\n\n    <md-sidenav id="quick-panel" class="md-sidenav-right md-whiteframe-4dp" md-component-id="quick-panel" ms-scroll ui-view="quickPanel"></md-sidenav>\n\n</div>'),e.put("app/core/layouts/vertical-navigation-fullwidth-toolbar-2.html",'<div id="layout-vertical-navigation-fullwidth-toolbar-2" class="template-layout" layout="column" flex>\n\n    <md-toolbar id="toolbar" class="md-menu-toolbar md-whiteframe-1dp md-accent" ui-view="toolbar"></md-toolbar>\n\n    <div id="main-container" layout="row" flex>\n        <md-sidenav id="vertical-navigation" class="md-primary-bg" md-is-locked-open="$mdMedia(\'gt-sm\')" md-component-id="navigation" ms-scroll ui-view="navigation"></md-sidenav>\n\n        <div id="content-container" flex layout="column">\n            <md-content id="content" class="animate-slide-up md-hue-2" ms-scroll ui-view="content" flex></md-content>\n        </div>\n\n        <md-sidenav id="quick-panel" class="md-sidenav-right md-whiteframe-4dp" md-component-id="quick-panel" ms-scroll ui-view="quickPanel"></md-sidenav>\n    </div>\n\n\n</div>'),e.put("app/core/layouts/vertical-navigation-fullwidth-toolbar.html",'<div id="layout-vertical-navigation-fullwidth-toolbar" class="template-layout" layout="column" flex>\n\n    <md-toolbar id="toolbar" class="md-menu-toolbar md-whiteframe-1dp md-accent" ui-view="toolbar"></md-toolbar>\n\n    <div id="main-container" layout="row" flex>\n        <md-sidenav id="vertical-navigation" class="md-primary-bg" md-is-locked-open="$mdMedia(\'gt-sm\')" md-component-id="navigation" ms-scroll ui-view="navigation"></md-sidenav>\n\n        <div id="content-container" flex layout="column">\n            <md-content id="content" class="animate-slide-up md-hue-2" ms-scroll ui-view="content" flex></md-content>\n        </div>\n\n        <md-sidenav id="quick-panel" class="md-sidenav-right md-whiteframe-4dp" md-component-id="quick-panel" ms-scroll ui-view="quickPanel"></md-sidenav>\n    </div>\n\n\n</div>'),e.put("app/core/layouts/vertical-navigation.html",'<div id="header" ui-view="header"></div>\n\n<div id="layout-vertical-navigation" class="template-layout" layout="row" flex>\n\n    <md-sidenav id="vertical-navigation" class="md-primary-bg" md-is-locked-open="$mdMedia(\'gt-sm\')" md-component-id="navigation" ms-scroll ui-view="navigation" ng-if="!vm.isAgent()"></md-sidenav>\n\n    <div id="content-container" flex layout="column">\n        <md-toolbar id="toolbar" class="md-menu-toolbar md-whiteframe-1dp" ui-view="toolbar"></md-toolbar>\n\n        <md-content id="content" class="animate-slide-up md-hue-2" ms-scroll ui-view="content" flex></md-content>\n    </div>\n\n    <md-sidenav id="quick-panel" class="md-sidenav-right md-whiteframe-4dp" md-component-id="quick-panel" ms-scroll ui-view="quickPanel"></md-sidenav>\n\n</div>\n\n<div id="footer" ui-view="footer"></div>'),e.put("app/core/theme-options/theme-options.html",'<div class="ms-theme-options-button md-primary-bg" ng-click="toggleOptionsSidenav()">\n    <md-icon md-font-icon="icon-cog" class="white-text"></md-icon>\n</div>\n\n<md-sidenav md-component-id="motion-theme-options" class="md-sidenav-right">\n\n    <div class="ms-theme-options-list" layout="column">\n        <div class="theme-option layout-options">\n            <div class="option-title">Layout Style:</div>\n            <md-radio-group layout="row" layout-align="start start" layout-wrap ng-model="vm.layoutStyle" ng-change="vm.updateLayoutStyle()">\n                <md-radio-button ng-repeat="layoutStyle in vm.layoutStyles" ng-value="layoutStyle.value">\n                    <div layout="column" layout-align="center center">\n                        <img ng-src="{{layoutStyle.figure}}">\n                        <span class="text-center font-size-12 mt-8">{{layoutStyle.label}}</span>\n                    </div>\n                </md-radio-button>\n            </md-radio-group>\n        </div>\n\n        <md-divider></md-divider>\n\n        <div class="theme-option">\n            <div class="option-title">Layout Mode:</div>\n            <md-radio-group layout="row" layout-align="start center" ng-model="vm.layoutMode" ng-change="vm.updateLayoutMode()">\n                <md-radio-button ng-repeat="layoutMode in vm.layoutModes" ng-value="layoutMode.value">\n                    {{layoutMode.label}}\n                </md-radio-button>\n            </md-radio-group>\n        </div>\n\n        <md-divider></md-divider>\n\n        <div class="theme-option color-palettes">\n            <div class="option-title">Color Palette:</div>\n            <div layout="row" layout-align="start start" layout-wrap>\n                <md-button ng-repeat="(themeName, theme) in vm.themes.list" class="md-raised theme-button" layout="row" layout-align="center center" aria-label="{{themeName}}" ng-click="vm.setActiveTheme(themeName)" ng-style="{\'background-color\': theme.primary.color,\'border-color\': theme.accent.color,\'color\': theme.primary.contrast1}"\n                    ng-class="{active: vm.getActiveTheme().name === themeName}">\n                    <md-icon ng-style="{\'color\': theme.primary.contrast1}" md-font-icon="icon-palette" class="icon s32"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n</md-sidenav>'),e.put("app/errors/404/error-404.html",'<div id="error-404" layout="column" layout-align="center center">\n    <div class="content" layout="column" layout-align="center center">\n        <div class="error-code" translate="ERROR404.CODE">404</div>\n\n        <div class="message" translate="ERROR404.MESSAGE">Sorry but we couldn’t find the page you are looking for</div>\n        <ms-search-bar on-search="vm.search(query)" on-result-click="vm.searchResultClick(item)" debounce="300">Search for anything</ms-search-bar>\n\n        \x3c!-- <div class="search md-whiteframe-1dp" layout="row" layout-align="start center">\n            <md-icon md-font-icon="icon-magnify" class="icon s24"></md-icon>\n            <input ng-model="vm.search" type="text" placeholder="Search for anything" translate translate-attr-placeholder="ERROR404.SEARCH" flex>\n        </div> --\x3e\n\n        <a class="md-button md-raised md-primary back-link" href="/" translate="ERROR404.GO_BACK">Go back to dashboard</a>\n    </div>\n</div>'),e.put("app/errors/500/error-500.html",'<div id="error-500" layout="column" layout-align="center center">\n    <div ng-if="!vm.send" class="content" layout="column" layout-align="center center">\n        <div class="error-code" translate="ERROR500.CODE">500</div>\n        <div class="message" translate="ERROR500.MESSAGE">Well, you broke the internet!</div>\n        <div class="sub-message" translate="ERROR500.SUBMESSAGE">Just kidding, looks like we have an internal issue, please try again in couple minutes\n        </div>\n        <a class="md-button md-raised md-primary back-link" href="/" translate="ERROR500.GO_BACK">Go back to dashboard</a>\n        <md-button class="md-raised md-warn" ng-click="vm.sendReport()" translate="ERROR500.REPORT">Report this problem</md-button>\n    </div>\n    <pre ng-if="!vm.send">\n      {{vm.error}}\n    </pre>\n    <div ng-if="vm.send" class="content" layout="column" layout-align="center center">\n        <div class="error-code">#{{vm.code}}</div>\n        <div class="message" translate="ERROR500.JIRA_MESSAGE">Your request has been received and will be processed shortly.</div>\n        <div class="sub-message" translate="ERROR500.JIRA_SUBMESSAGE">Sorry for the inconvenience. If you have any questions or concerns, please do not hesitate to contact us.</div>\n        <a class="md-button md-raised md-primary back-link" href="/" translate="ERROR500.GO_BACK">Go back to dashboard</a>\n    </div>\n</div>'),e.put("app/footer/layouts/vertical-navigation/footer.html",'<div layout="row" layout-align="start center">\n    <ms-info-bar ng-if="!vm.cookieAlertHide" on-close="vm.cookieAlertOnClose()" class="grey-100-bg">\n        <div layout="row" layout-align="start center">\n            <span translate="FOOTER.COOKIE_LAW" flex class="text-center grey-600-fg"></span>\n        </div>\n    </ms-info-bar>\n</div>'),e.put("app/forgot/forgot.html",'<div id="forgot-password" class="flex-scrollable" layout="column" ms-scroll ng-init="vm.onInit()">\n    <div id="forgot-password-form-wrapper" layout="column" layout-align="center center">\n        <div id="forgot-password-form" class="md-whiteframe-8dp">\n\n            <img src="/api/settings/1/logo_login" alt="logo_login" class="logo_login" />\n\n            <div class="title" translate="FORGOTPASSWORD.TITLE">Recover your password</div>\n\n            <form name="forgotPasswordForm" novalidate>\n                <md-input-container class="md-block" md-no-float>\n                    <input type="email" name="email" ng-model="vm.form.email" placeholder="Email address" translate translate-attr-placeholder="FORGOTPASSWORD.EMAIL_ADRESS" ng-pattern="/^.+@.+\\..+$/" required>\n                    <div ng-messages="forgotPasswordForm.email.$error" role="alert" multiple>\n                        <div ng-message="required">\n                            <span translate="FORGOTPASSWORD.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                        </div>\n                        <div ng-message="pattern">\n                            <span translate="FORGOTPASSWORD.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                        </div>\n                    </div>\n                </md-input-container>\n\n                <md-button type="button" ng-click="vm.forgotPassword()" class="md-raised md-accent submit-button" aria-label="RESET MY PASSWORD" ng-disabled="forgotPasswordForm.$invalid || forgotPasswordForm.$pristine" translate="FORGOTPASSWORD.SEND_RESET_LINK" translate-attr-aria-label="FORGOTPASSWORD.SEND_RESET_LINK">\n                    SEND RESET LINK\n                </md-button>\n            </form>\n\n            <div class="login" layout="row" layout-align="center center">\n                <a class="link" ui-sref="app.login" translate="FORGOTPASSWORD.GO_BACK">Go back to login</a>\n            </div>\n        </div>\n    </div>\n</div>'),e.put("app/header/layouts/vertical-navigation/header.html",'\x3c!-- <div layout="row" layout-align="start center">\n    <ms-info-bar ng-if="vm.currentUser.role == \'admin\' && !vm.newsAlertHide" on-close="vm.newsAlertOnClose()" class="green-600-bg white-fg">\n        <div layout="row" layout-align="start center">\n            <md-icon md-font-icon="icon-message-text-outline" class="icon margin-right-10 s20"></md-icon>\n            <div flex hide-xs translate="HEADER.NEWS"></div>\n        </div>\n    </ms-info-bar>\n</div> --\x3e'),e.put("app/login/login.html",'<div id="login" class="flex-scrollable" layout="column" ms-scroll>\n    <div id="login-form-wrapper" layout="column" layout-align="center center">\n        <div id="login-form" class="md-whiteframe-8dp">\n\n            <img src="/api/settings/1/logo_login" alt="logo_login" class="logo_login" />\n            \x3c!-- <img src="assets/images/logos/login.png" alt="motion_logo_login" /> --\x3e\n\n            <div class="md-subhead padding-top-45" translate="LOGIN.TITLE">Log in to your account</div>\n\n            <form name="loginForm" novalidate ng-if="!vm.progressLogin">\n                <md-input-container class="md-block" md-no-float>\n                    <input type="input" name="name" ng-model="vm.form.name" autofocus aria-label="username" translate translate-attr-placeholder="LOGIN.USERNAME" required>\n                    <div ng-messages="loginForm.name.$error" role="alert" multiple>\n                        <div ng-message="required">\n                            <span translate="LOGIN.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                        </div>\n                    </div>\n                </md-input-container>\n\n                <md-input-container class="md-block" md-no-float>\n                    <input type="password" name="password" ng-model="vm.form.password" aria-label="password" translate translate-attr-placeholder="LOGIN.PASSWORD" required>\n                    <div ng-messages="loginForm.password.$error" role="alert" multiple>\n                        <div ng-message="required">\n                            <span translate="LOGIN.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                        </div>\n                    </div>\n                </md-input-container>\n\n                <div class="remember-forgot-password" layout="row" layout-xs="column" layout-align="end center">\n                    \x3c!-- <md-checkbox class="remember-me" ng-model="data.cb1" aria-label="Remember Me">\n                        <span translate="LOGIN.REMEMBER_ME">Remember Me</span>\n                    </md-checkbox> --\x3e\n                    <a ui-sref="app.forgot" class="forgot-password md-accent-color" style="cursor:pointer;" translate="LOGIN.FORGOT_PASSWORD">Forgot Password?</a>\n                </div>\n\n                <b layout="row" layout-align="center center" class="md-padding" ng-if="vm.message"><font color="red">{{vm.message}}</font></b>\n                <md-button type="submit" ng-click="vm.login()" class="md-raised md-accent submit-button" aria-label="LOGIN" translate="LOGIN.LOG_IN" translate-attr-aria-label="LOGIN.LOG_IN">\n                    LOG IN\n                </md-button>\n            </form>\n\n            <md-progress-circular ng-if="vm.progressLogin" md-diameter="96"></md-progress-circular>\n\n            <div class="separator">\n                <span class="text" translate="LOGIN.OR">OR</span>\n            </div>\n\n            <md-button ng-click="vm.loginOauth(\'google\')" class="md-raised google">\n                <div layout="row" layout-align="center center">\n                    <span>\n                        <md-icon md-font-icon="icon-google-plus" class="s16"></md-icon>\n                        <span translate="LOGIN.WITH_GOOGLE">Log in with Google</span>\n                    </span>\n                </div>\n            </md-button>\n        </div>\n    </div>\n</div>'),e.put("app/main/apps/analytics/views/extractedReports/create/dialog.html",'<md-dialog class="extractedReport-dialog" aria-label="New ExtractedReport">\n    <form name="extractedReportForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.REPORTNAME">ReportName</label>\n                <input type="" name="name" ng-model="vm.extractedReport.name" ng-required="true" autofocus>\n                <div ng-messages="extractedReportForm[\'name\'].$error" ng-show="extractedReportForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.REPORTNAME_REQUIRED">ReportName field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.NAME">Name</label>\n                <input type="" name="basename" ng-model="vm.extractedReport.basename" ng-required="true">\n                <div ng-messages="extractedReportForm[\'basename\'].$error" ng-show="extractedReportForm[\'basename\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newExtractedReport" ng-click="vm.saveExtractedReport()" class="send-button md-accent md-raised" ng-disabled="extractedReportForm.$invalid || extractedReportForm.$pristine" aria-label="SAVE" translate="ANALYTICS.SAVE"\n                    translate-attr-aria-label="ANALYTICS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newExtractedReport" ng-click="vm.addNewExtractedReport()" class="send-button md-accent md-raised" ng-disabled="extractedReportForm.$invalid" aria-label="ADD" translate="ANALYTICS.ADD_EXTRACTEDREPORT" translate-attr-aria-label="ANALYTICS.ADD_EXTRACTEDREPORT">\n                    ADD EXTRACTEDREPORT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newExtractedReport" ng-click="vm.deleteExtractedReport($event)" aria-label="DELETE" translate translate-attr-aria-label="ANALYTICS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="ANALYTICS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/analytics/views/extractedReports/extractedReports.html",'<div id="extractedReports" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-chart-line" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="ANALYTICS.EXTRACTEDREPORTS">ExtractedReports</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="ANALYTICS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedExtractedReports.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedExtractedReports =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="ANALYTICS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-extractedReports-count">\n                    <span>{{vm.selectedExtractedReports.length}}</span>\n                <span translate="ANALYTICS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="EXTRACTEDREPORTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllExtractedReports()" translate="ANALYTICS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectExtractedReports()" translate="ANALYTICS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedExtractedReports" csv-label="true" filename="extractedReports.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedExtractedReports($event)" aria-label="delete selected" translate translate-attr-label="EXTRACTEDREPORTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- EXTRACTEDREPORT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedExtractedReports" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getExtractedReports">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'ANALYTICS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'ANALYTICS.REPORTNAME\' | translate }}</th>\n                                <th md-column md-order-by="basename">{{ \'ANALYTICS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="type">{{ \'ANALYTICS.TYPE\' | translate }}</th>\n                                <th md-column md-order-by="startDate">{{ \'ANALYTICS.DATE_RANGE_FROM\' | translate }}</th>\n                                <th md-column md-order-by="endDate">{{ \'ANALYTICS.DATE_RANGE_TO\' | translate }}</th>\n                                <th md-column md-order-by="createdAt">{{ \'ANALYTICS.GENERATED_AT\' | translate }}</th>\n                                <th md-column md-order-by="status">{{ \'ANALYTICS.STATUS\' | translate }}</th>\n                                <th md-column md-order-by="output">{{ \'ANALYTICS.OUTPUT\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.extractedReports.rows.length">\n                                <td md-cell colspan="10">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="ANALYTICS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="extractedReport" md-select-id="id" ng-repeat="extractedReport in vm.extractedReports.rows">\n                                <td md-cell ng-if="extractedReport.userpic"><img class="avatar" alt="{{extractedReport.name}}" ng-src="api/users/{{extractedReport.id}}/avatar" /></td>\n                                <td md-cell ng-if="!extractedReport.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{extractedReport.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="id ">{{extractedReport.id}}</td>\n                                <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="name ">{{extractedReport.name}}</td>\n                                <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="basename ">{{extractedReport.basename}}</td>\n                                <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="type ">{{extractedReport.type}}</td>\n                                <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="startDate ">{{extractedReport.startDate | date:\'medium\' }}</td>\n                                <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="endDate ">{{extractedReport.endDate | date:\'medium\' }}</td>\n                                <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="createdAt ">{{extractedReport.createdAt | date:\'medium\' }}</td>\n                                <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="status ">{{extractedReport.status}}</td>\n                                <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="output ">{{extractedReport.output}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="ANALYTICS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(extractedReport, $event)" translate="ANALYTICS.EDIT_EXTRACTEDREPORT">\n                                                    Edit ExtractedReport\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="extractedReport.status == \'Completed\'">\n                                                <md-button ng-click="vm.downloadfile2(extractedReport, $event)" translate="ANALYTICS.DOWNLOAD_EXTRACTEDREPORT">\n                                                    Download ExtractedReport\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(extractedReport, $event)" translate="ANALYTICS.DELETE_EXTRACTEDREPORT">\n                                                    Delete ExtractedReport\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'ANALYTICS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'ANALYTICS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'ANALYTICS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.extractedReports.count}}" md-on-paginate="vm.getExtractedReports" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / EXTRACTEDREPORT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- NO ADD BUTTON BUTTON --\x3e\n</div>'),e.put("app/main/apps/analytics/views/metrics/create/dialog.html",'<md-dialog class="metric-dialog" aria-label="New Metric">\n    <form name="metricForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.metric.name" ng-required="true" autofocus>\n                <div ng-messages="metricForm[\'name\'].$error" ng-show="metricForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.TABLE">Table</label>\n                <md-select name="table" ng-model="vm.metric.table" required>\n                    <md-option ng-value="\'report_agent\'">Agent Report</md-option>\n                    <md-option ng-value="\'report_call\'">Call Report</md-option>\n                    <md-option ng-value="\'cm_contacts\'">Contacts</md-option>\n                    <md-option ng-value="\'report_square\'">CSquare Report</md-option>\n                    <md-option ng-value="\'report_square_details\'">CSquare Details Report</md-option>\n                    <md-option ng-value="\'cm_hopper\'">Dialer Hopper Processing</md-option>\n                    <md-option ng-value="\'cm_hopper_history\'">Dialer Hopper Logs</md-option>\n                    <md-option ng-value="\'cm_hopper_final\'">Dialer Hopper Final</md-option>\n                    <md-option ng-value="\'report_integration\'">Integration Report</md-option>\n                    <md-option ng-value="\'report_jscripty_sessions\'">Jscripty Sessions</md-option>\n                    <md-option ng-value="\'report_jscripty_questions\'">Jscripty Questions</md-option>\n                    <md-option ng-value="\'report_jscripty_answers\'">Jscripty Answers</md-option>\n                    <md-option ng-value="\'report_member\'">Member Report</md-option>\n                    <md-option ng-value="\'report_queue\'">Queue Report</md-option>\n                    <md-option ng-value="\'users\'">Users</md-option>\n                    <md-option ng-value="\'voice_recordings\'">Voice Recordings</md-option>\n                </md-select>\n                <div ng-messages="metricForm[\'table\'].$error" ng-show="metricForm[\'table\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.TABLE_REQUIRED">Table field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.METRIC">Metric</label>\n                <input type="text" name="metric" ng-model="vm.metric.metric" ng-required="true">\n                <div ng-messages="metricForm[\'metric\'].$error" ng-show="metricForm[\'metric\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.METRIC_REQUIRED">Metric field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.metric.description">\n                <div ng-messages="metricForm[\'description\'].$error" ng-show="metricForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newMetric" ng-click="vm.saveMetric()" class="send-button md-accent md-raised" ng-disabled="metricForm.$invalid || metricForm.$pristine" aria-label="SAVE" translate="ANALYTICS.SAVE" translate-attr-aria-label="ANALYTICS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newMetric" ng-click="vm.addNewMetric()" class="send-button md-accent md-raised" ng-disabled="metricForm.$invalid" aria-label="ADD" translate="ANALYTICS.ADD_METRIC" translate-attr-aria-label="ANALYTICS.ADD_METRIC">\n                    ADD METRIC\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newMetric" ng-click="vm.deleteMetric($event)" aria-label="DELETE" translate translate-attr-aria-label="ANALYTICS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="ANALYTICS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/analytics/views/metrics/metrics.html",'<div id="metrics" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-chart-line" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="ANALYTICS.METRICS">Metrics</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="ANALYTICS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedMetrics.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedMetrics =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="ANALYTICS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-metrics-count">\n                    <span>{{vm.selectedMetrics.length}}</span>\n                <span translate="ANALYTICS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="METRICS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllMetrics()" translate="ANALYTICS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectMetrics()" translate="ANALYTICS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedMetrics" csv-label="true" filename="metrics.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedMetrics($event)" aria-label="delete selected" translate translate-attr-label="METRICS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- METRIC TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedMetrics" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getMetrics">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'ANALYTICS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'ANALYTICS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="table">{{ \'ANALYTICS.TABLE\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'ANALYTICS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.metrics.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="ANALYTICS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="metric" md-select-id="id" ng-repeat="metric in vm.metrics.rows">\n                                <td md-cell ng-if="metric.userpic"><img class="avatar" alt="{{metric.name}}" ng-src="api/users/{{metric.id}}/avatar" /></td>\n                                <td md-cell ng-if="!metric.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{metric.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditMetric($event, metric)" md-cell class="id ">{{metric.id}}</td>\n                                <td ng-click="vm.createOrEditMetric($event, metric)" md-cell class="name ">{{metric.name}}</td>\n                                <td ng-click="vm.createOrEditMetric($event, metric)" md-cell class="table ">{{ vm.arraytable[metric.table].option }}</td>\n                                <td ng-click="vm.createOrEditMetric($event, metric)" md-cell class="description ">{{metric.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="ANALYTICS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(metric, $event)" translate="ANALYTICS.EDIT_METRIC">\n                                                    Edit Metric\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(metric, $event)" translate="ANALYTICS.DELETE_METRIC">\n                                                    Delete Metric\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'ANALYTICS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'ANALYTICS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'ANALYTICS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.metrics.count}}" md-on-paginate="vm.getMetrics" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / METRIC TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD METRIC BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-metric-button" ng-click="vm.createOrEditMetric($event)" aria-label="add metric" translate translate-attr-aria-label="ANALYTICS.ADD_METRIC">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD METRIC BUTTON --\x3e\n</div>'),e.put("app/main/apps/analytics/views/reports/copy/dialog.html",'<md-dialog class="report-dialog" aria-label="Run Report">\n    <form name="reportForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title" translate="ANALYTICS.COPY_REPORT">Copy Report</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.NAME">Name</label>\n                <input name="name" ng-model="vm.report.name" required md-autofocus>\n                <div ng-messages="reportForm.name.$error" ng-show="reportForm.name.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div class="md-block">\n                <label translate="ANALYTICS.SELECT_NODE">Select Node</label>\n                <div js-tree="vm.treeCustomConfig" tree-events-obj="vm.treeCustomEvents" ng-model="vm.treeCustomData" tree="vm.treeCustomInstance"></div>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.copyReport()" class="send-button md-accent md-raised" ng-disabled="!vm.currentNode" aria-label="COPY" translate="ANALYTICS.COPY_REPORT" translate-attr-aria-label="ANALYTICS.COPY_REPORT">\n                    COPY REPORT\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/analytics/views/reports/create/dialog.html",'<md-dialog class="report-dialog" aria-label="New Report">\n    <form name="reportForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.report.name" required md-autofocus>\n                <div ng-messages="reportForm.name.$error" ng-show="reportForm.name.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.newReport">\n                <label translate="ANALYTICS.TABLE">Table</label>\n                <md-select ng-model="vm.report.table" required>\n                    <md-option ng-repeat="table in vm.tables | orderBy:\'name\'" ng-value="table.name">{{table.name}}</md-option>\n                </md-select>\n                <div ng-messages="reportForm.table.$error" ng-show="reportForm.table.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.TABLE_REQUIRED">Table field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.report.description">\n                <div ng-messages="reportForm.description.$error" ng-show="reportForm.description.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-autocomplete ng-if="vm.newReport" md-selected-item="vm.selectedItem" md-search-text="vm.searchText" md-items="table in vm.tables | filter:vm.searchText" md-item-text="table.name" md-min-length="0" md-selected-item-change="vm.selectedTableChange(table)"\n                placeholder="Select the table to Join">\n                <md-item-template>\n                    <span md-highlight-text="vm.searchText" md-highlight-flags="^i">{{table.name}}</span>\n                </md-item-template>\n                <md-not-found>\n                    No states matching "{{vm.searchText}}" were found.\n                </md-not-found>\n            </md-autocomplete>\n\n            <md-card ng-if="vm.newReport" md-theme="default" md-theme-watch ng-repeat="table in vm.joinTables">\n                <md-card-title>\n                    <md-card-title-text layout="row">\n                        <div layout="row" flex="50">\n                            <span class="md-subhead">{{table.name}}</span>\n                        </div>\n                        <div layout="row" layout-align="end center" flex>\n                            <md-button class="md-icon-button" ng-click="vm.removeJoin($index)">\n                                <md-icon md-font-icon="icon-delete" aria-label="alert error"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-card-title-text>\n                </md-card-title>\n                <md-card-content>\n                    <md-select ng-model="table.parentKey" placeholder="Select the parent key" ng-init="table.parentFields = []; vm.getFields(table, \'parentFields\', vm.report.table)" required>\n                        <md-option ng-repeat="field in table.parentFields" ng-value="field">{{field}}</md-option>\n                    </md-select>\n                    <md-select ng-model="table.foreignKey" placeholder="Select the foreign key" ng-init="table.foreignFields = []; vm.getFields(table, \'foreignFields\', table.name)" required>\n                        <md-option ng-repeat="field in table.foreignFields" ng-value="field">{{field}}</md-option>\n                    </md-select>\n                    <md-select ng-model="table.type" placeholder="Select join type" required>\n                        <md-option ng-repeat="join in vm.joinTypes" ng-value="join.key">{{join.value}}</md-option>\n                    </md-select>\n                </md-card-content>\n            </md-card>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newReport" ng-click="vm.saveReport()" class="send-button md-accent md-raised" ng-disabled="reportForm.$invalid || reportForm.$pristine" aria-label="SAVE" translate="ANALYTICS.SAVE" translate-attr-aria-label="ANALYTICS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newReport" ng-click="vm.addNewReport()" class="send-button md-accent md-raised" ng-disabled="reportForm.$invalid || reportForm.$pristine" aria-label="ADD" translate="ANALYTICS.ADD_REPORT" translate-attr-aria-label="ANALYTICS.ADD_REPORT">\n                    ADD REPORT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newReport" ng-click="vm.deleteReport($event)" aria-label="DELETE" translate translate-attr-aria-label="ANALYTICS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="ANALYTICS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/analytics/views/reports/edit/condition/group.html",'<md-card class="padding-horizontal-15 padding-top-15">\n    <div layout="row">\n        <md-input-container class="md-block" flex>\n            <label translate="ANALYTICS.OPERATOR">Operator</label>\n            <md-select ng-model="group.operator" required>\n                <md-option value="AND">AND</md-option>\n                <md-option value="OR">OR</md-option>\n            </md-select>\n            <div ng-messages="conditionsForm.operator.$error" ng-show="conditionsForm.operator.$touched" role="alert">\n                <div ng-message="required">\n                    <span translate="ANALYTICS.ERRORS.OPERATOR_REQUIRED">Operator field is required</span>\n                </div>\n            </div>\n        </md-input-container>\n        <md-input-container class="md-block">\n            <md-button class="md-raised md-accent" ng-click="vm_rc.addCondition(group.rules)">\n                <md-icon md-font-icon="icon-plus"></md-icon> {{\'ANALYTICS.CONDITION\' | translate}}</md-button>\n        </md-input-container>\n        <md-input-container class="md-block">\n            <md-button class="md-raised md-accent" ng-click="vm_rc.addGroup(group.rules)">\n                <md-icon md-font-icon="icon-plus"></md-icon> {{\'ANALYTICS.GROUP\' | translate}}</md-button>\n        </md-input-container>\n        <div flex></div>\n        <md-input-container class="md-block" ng-if="parent">\n            <md-button class="md-raised md-warn" ng-click="vm_rc.deleteConfirm(parent, index, $event)">\n                <md-icon md-font-icon="icon-delete"></md-icon> {{\'ANALYTICS.GROUP\' | translate}}</md-button>\n        </md-input-container>\n    </div>\n    <div layout="column" ng-repeat="rule in group.rules track by $index">\n        <div layout="row" ng-if="!rule.group">\n            <md-input-container class="md-block" flex>\n                <label translate="ANALYTICS.COLUMN">COLUMN</label>\n                <md-select name="field" ng-model="rule.field" required>\n                    <md-optgroup label="{{vm_rc.report.table}}">\n                        <md-option ng-repeat="column in vm_rc.columns" value="{{vm_rc.report.table}}.{{column}}">{{column}}</md-option>\n                    </md-optgroup>\n                    <md-optgroup ng-if="vm_rc.report.joins" ng-repeat="join in vm_rc.report.joins" label="{{join.foreignTable}}">\n                        <md-option ng-repeat="field in join.foreignTableFields" value="{{join.foreignTable}}.{{field}}">{{field}}</md-option>\n                    </md-optgroup>\n                </md-select>\n                <div ng-messages="conditionsForm.field.$error" ng-show="conditionsForm.field.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.COLUMN_REQUIRED">Column field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" flex>\n                <label translate="ANALYTICS.CONDITION">CONDITION</label>\n                <md-select name="condition" ng-model="rule.condition" required>\n                    <md-option ng-repeat="condition in vm_rc.conditions" ng-value="condition">{{condition}}</md-option>\n                </md-select>\n                <div ng-messages="conditionsForm.condition.$error" ng-show="conditionsForm.condition.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.CONDITION_REQUIRED">Condition field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm_rc.isValueByCondition(rule.condition)" class="md-block" flex>\n                <label translate="ANALYTICS.VALUE">VALUE</label>\n                <input type="text" name="value" ng-model="rule.value" required md-autofocus>\n                <div ng-messages="conditionsForm.value.$error" ng-show="conditionsForm.value.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" flex>\n                <md-button class="md-fab md-mini md-warn" aria-label="Delete row" ng-click="vm_rc.deleteConfirm(group.rules, $index, $event)">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </md-input-container>\n        </div>\n        <div ng-if="rule.group" ng-include="\'app/main/apps/analytics/views/reports/edit/condition/group.html\'" ng-init="parent=group.rules;index=$index;group=rule.group"></div>\n    </div>\n</md-card>'),e.put("app/main/apps/analytics/views/reports/edit/field/dialog.html",'<md-dialog class="reportField-dialog" aria-label="New Report Field">\n    <form name="reportFieldForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{vm.title}}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <pre></pre>\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.reportField.type" ng-change="vm.reportField.field = undefined" required>\n                    <md-option value="column">Select a column</md-option>\n                    <md-option value="metric">Select an existing metric</md-option>\n                    <md-option value="custom">Write a custom metric</md-option>\n                </md-select>\n                <div ng-messages="reportForm.type.$error" ng-show="reportForm.type.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div ng-switch on="vm.reportField.type">\n                <md-input-container class="md-block" ng-switch-when="column">\n                    <label translate="ANALYTICS.COLUMN">Column Name</label>\n                    <md-select name="column" ng-model="vm.reportField.field" required>\n                        <md-optgroup label="{{vm.report.table}}">\n                            <md-option ng-repeat="column in vm.columns" value="{{vm.report.table}}.{{column}}">{{column}}</md-option>\n                            \x3c!-- <md-option ng-repeat="column in vm.columns" ng-value="">{{column}}</md-option> --\x3e\n                        </md-optgroup>\n                        <md-optgroup ng-if="vm.report.joins" ng-repeat="join in vm.report.joins" label="{{join.foreignTable}}">\n                            <md-option ng-repeat="field in join.foreignTableFields" value="{{join.foreignTable}}.{{field}}">{{field}}</md-option>\n                        </md-optgroup>\n                    </md-select>\n                    <div ng-messages="reportForm.column.$error" ng-show="reportForm.column.$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="ANALYTICS.ERRORS.COLUMN_REQUIRED">Column field is required</span>\n                        </div>\n                    </div>\n                </md-input-container>\n                <md-input-container class="md-block" ng-switch-when="metric">\n                    <label translate="ANALYTICS.METRIC_NAME">Metric Name</label>\n                    <md-select name="metric" ng-model="vm.reportField.MetricId" required>\n                        <md-option ng-repeat="metric in vm.metrics" ng-value="metric.id">{{metric.name}}</md-option>\n                    </md-select>\n                    <div ng-messages="reportForm.metric.$error" ng-show="reportForm.metric.$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="ANALYTICS.ERRORS.METRIC_REQUIRED">Metric field is required</span>\n                        </div>\n                    </div>\n                </md-input-container>\n                <md-input-container class="md-block" ng-switch-when="custom">\n                    <label translate="ANALYTICS.CUSTOM_METRIC">Custom Metric</label>\n                    <input type="text" name="field" ng-model="vm.reportField.field" required md-autofocus>\n                    <div ng-messages="reportFieldForm.field.$error" ng-show="reportFieldForm.field.$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="ANALYTICS.ERRORS.CUSTOM_METRIC_REQUIRED">Custom Metric field is required</span>\n                        </div>\n                    </div>\n                </md-input-container>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.ALIAS">Alias</label>\n                <input type="text" name="alias" ng-model="vm.reportField.alias" ng-required="vm.reportField.type === \'custom\' || vm.reportField.type === \'metric\'">\n                <div ng-messages="reportFieldForm.alias.$error" ng-show="reportFieldForm.alias.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.ALIAS_REQUIRED">Alias field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.reportField.type !== \'metric\'">\n                <label translate="ANALYTICS.FUNCTION">Function</label>\n                <md-select name="function" ng-model="vm.reportField.function">\n                    <md-option ng-value="null">No Function</md-option>\n                    <md-option ng-repeat="function in vm.sqlUtil.getFunctions" ng-value="function.value">{{function.value}}</md-option>\n                </md-select>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.reportField.type !== \'metric\'">\n                <label translate="ANALYTICS.FORMAT">Format</label>\n                <md-select name="format" ng-model="vm.reportField.format">\n                    <md-option ng-value="null">No Format</md-option>\n                    <md-option ng-repeat="format in vm.sqlUtil.getFormats" ng-value="format.value">{{format.value}}</md-option>\n                </md-select>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.GROUP_BY">Group By</label>\n                <md-select name="groupBy" ng-model="vm.reportField.groupBy">\n                    <md-option ng-repeat="gb in vm.sqlUtil.getGroupBy" ng-value="gb.value">{{gb.value ? \'Yes\' : \'No\'}}</md-option>\n                </md-select>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.ORDER_BY">Order By</label>\n                <md-select name="orderBy" ng-model="vm.reportField.orderBy">\n                    <md-option ng-value="null">No Order</md-option>\n                    <md-option ng-repeat="ob in vm.sqlUtil.getOrderBy" ng-value="ob.value">{{ob.value}}</md-option>\n                </md-select>\n            </md-input-container>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newReportField" ng-click="vm.saveReportField()" class="send-button md-accent md-raised" ng-disabled="reportFieldForm.$invalid || reportFieldForm.$pristine" aria-label="SAVE" translate="ANALYTICS.SAVE" translate-attr-aria-label="ANALYTICS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newReportField" ng-click="vm.addNewReportField()" class="send-button md-accent md-raised" ng-disabled="reportFieldForm.$invalid || reportFieldForm.$pristine" aria-label="ADD" translate="ANALYTICS.ADD_REPORTFIELD" translate-attr-aria-label="ANALYTICS.ADD_REPORTFIELD">\n                    ADD REPORT FIELD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newReportField" ng-click="vm.deleteReportField($event)" aria-label="DELETE" translate translate-attr-aria-label="ANALYTICS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="ANALYTICS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/analytics/views/reports/edit/view.html",'<div id="analytics-report" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-reports-button md-icon-button" aria-label="Go to reports" ng-click="vm.gotoReports()" translate translate-attr-aria-label="ANALYTICS.GO_TO_ANALYTICSQUEUES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="report-image" hide-xs>\n                    <img ng-src="assets/images/business/reports.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.report.id}} {{vm.report.name}}\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="ANALYTICS.CREATED_AT"></span> <span>{{vm.report.createdAt | date:\'medium\'}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span>{{vm.report.description}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveReport()" ng-disabled="generalForm.$pristine && conditionsForm.$pristine" class="send-button md-accent md-raised" translate="ANALYTICS.SAVE" translate-attr-aria-label="ANALYTICS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="ANALYTICS.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="report-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="ANALYTICS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="ANALYTICS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.report.name" required md-autofocus>\n                                <div ng-messages="generalForm.name.$error" ng-show="generalForm.name.$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="ANALYTICS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="ANALYTICS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.report.description">\n                                <div ng-messages="generalForm.description.$error" ng-show="generalForm.description.$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="ANALYTICS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="ANALYTICS.FIELDS">FIELDS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="report-detail-form-container fields md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="ReportFieldsController as vm_rf" ng-init="vm_rf.init(vm.report)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_rf.selectedReportFields.length">\n                                <div class="md-toolbar-tools">\n                                    <div layout="row" layout-align="start center">\n                                        <div layout="column" layout-align="start start">\n                                            <div class="md-subhead" translate="ANALYTICS.FIELDS">\n                                                <span translate="ANALYTICS.FIELDS">FIELDS</span>\n                                            </div>\n                                            <div class="h4">\n                                                <span translate="ANALYTICS.TABLE">TABLE</span> <span class="text-bold">{{vm.report.table}}</span>\n                                            </div>\n                                            <div class="h4" ng-if="vm.report.joins && vm.report.joins.length && vm.isArray(vm.report.joins)">\n                                                <span>Join</span> <span class="text-bold">{{ vm.mapArray(vm.report.joins, \'foreignTable\') }}</span>\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_rf.query.filter = query" on-collapse="vm_rf.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_rf.createOrEditReportField($event)" aria-label="add field" translate translate-attr-label="ANALYTICS.ADD_FIELD">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_rf.selectedReportFields.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_rf.selectedReportFields.length}} {{vm_rf.selectedReportFields.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <md-button class="md-icon-button" ng-click="vm_rf.deleteSelectedReportFields($event)" aria-label="delete selected" translate translate-attr-label="ANALYTICS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_rf.selectedReportFields" md-progress="vm_rf.promise">\n                                    <thead md-head md-order="vm_rf.query.sort" md-on-reorder="vm_rf.getReportFields">\n                                        <tr md-row>\n                                            <th md-column width="10px">\n                                                <md-icon md-font-icon="icon-drag-vertical"></md-icon>\n                                            </th>\n                                            <th md-column>Type</th>\n                                            <th md-column>Column or Metric</th>\n                                            <th md-column>Alias</th>\n                                            <th md-column>Function</th>\n                                            <th md-column>Format</th>\n                                            <th md-column>Group By</th>\n                                            <th md-column>Order By</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body ng-sortable="vm_rf.sortableTable">\n                                        <tr md-row md-select="reportField" md-select-id="id" ng-repeat="reportField in vm_rf.reportFields.rows">\n                                            <td md-cell class="handle">\n                                                <md-icon md-font-icon="icon-drag-vertical" class="s16">\n                                            </td>\n                                            <td md-cell>\n                                                <div ng-if="reportField.MetricId && !reportField.custom" ng-click="vm_rf.createOrEditReportField($event, reportField)" class="icon icon-shape-plus s16"></div>\n                                                <div ng-if="!reportField.MetricId && reportField.custom" ng-click="vm_rf.createOrEditReportField($event, reportField)" class="icon icon-pencil-box-outline s16"></div>\n                                                <div ng-if="!reportField.MetricId && !reportField.custom" ng-click="vm_rf.createOrEditReportField($event, reportField)" class="icon icon-view-column s16"></div>\n                                            </td>\n                                            <td md-cell ng-click="vm_rf.createOrEditReportField($event, reportField)">{{reportField.MetricId ? vm_rf.getMetricName(reportField.MetricId) : reportField.field}}</td>\n                                            <td md-cell ng-click="vm_rf.createOrEditReportField($event, reportField)">{{reportField.alias}}</td>\n                                            <td md-cell ng-click="vm_rf.createOrEditReportField($event, reportField)"><span class="text-boxed blue-bg white-fg" ng-if="reportField.function">{{reportField.function}}</span><span ng-if="!reportField.function">--</span></td>\n                                            <td md-cell ng-click="vm_rf.createOrEditReportField($event, reportField)"><span class="text-boxed blue-bg white-fg" ng-if="reportField.format">{{reportField.format}}</span><span ng-if="!reportField.format">--</span></td>\n                                            <td md-cell ng-click="vm_rf.createOrEditReportField($event, reportField)"><span class="text-boxed blue-bg white-fg" ng-if="reportField.groupBy">YES</span><span ng-if="!reportField.groupBy">--</span></td>\n                                            <td md-cell ng-click="vm_rf.createOrEditReportField($event, reportField)"><span class="text-boxed blue-bg white-fg" ng-if="reportField.orderBy">{{reportField.orderBy}}</span><span ng-if="!reportField.orderBy">--</span></td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="ANALYTICS.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_rf.createOrEditReportField($event, reportField)" translate="ANALYTICS.EDIT_REPORTFIELD">\n                                                                Edit Report\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_rf.deleteConfirm(reportField, $event)" translate="ANALYTICS.DELETE_REPORTFIELD">\n                                                                Delete Report\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                        </div>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="ANALYTICS.CONDITIONS">CONDITIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="report-detail-form-container conditions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="ReportConditionsController as vm_rc" ng-init="vm_rc.init(vm.report)">\n                            <div class="pb-16" layout="row" layout-align="start center">\n                                <div class="h2 secondary-text" translate="ANALYTICS.CONDITION">CONDITION</div>\n                            </div>\n                            <form name="conditionsForm" novalidate>\n                                <div ng-if="vm_rc.report.condition.group" ng-include="\'app/main/apps/analytics/views/reports/edit/condition/group.html\'" ng-init="group=vm_rc.report.condition.group"></div>\n                            </form>\n                        </div>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab md-on-select="vm.previewReport()">\n                <md-tab-label>\n                    <span translate="ANALYTICS.PREVIEW">PREVIEW</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="report-detail-form-container result md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div ng-if="vm.error" class="h2 secondary-text" translate="ANALYTICS.ERROR">ERROR</div>\n                            <div ng-if="!vm.error" class="h2 secondary-text" translate="ANALYTICS.LIMITED_RESULT">LIMITED RESULT</div>\n                        </div>\n                        <dl ng-if="vm.error">\n                            <dt class="text-bold" translate="ANALYTICS.QUERY_ERROR">Query Error</dt>\n                            <dd>{{vm.error.sql}}</dd>\n                            <dt translate="ANALYTICS.MESSAGE">Message</dt>\n                            <dd>{{vm.error.msg}}</dd>\n                        </dl>\n                        <md-table-container ng-if="!vm.error">\n                            <table md-table>\n                                <thead md-head>\n                                    <tr md-row>\n                                        <th ng-repeat="column in vm.columns">{{column.alias || column.field}}</th>\n                                    </tr>\n                                </thead>\n                                <tbody md-body>\n                                    <tr md-row ng-repeat="row in vm.rows">\n                                        <td md-cell ng-repeat="(key, value) in row">{{ vm.valueReplacer(key, value) }}</td>\n                                    </tr>\n                                    <tr md-row ng-if="!vm.rows.length">\n                                        <td md-cell colspan="{{vm.columns.length}}"><span translate="ANALYTICS.NO_DATA">NO DATA</span></td>\n                                    </tr>\n                                </tbody>\n                            </table>\n                        </md-table-container>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab md-on-select="vm.queryReport()">\n                <md-tab-label>\n                    <span>Query</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="report-detail-form-container result md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div ng-if="vm.error" class="h2 secondary-text" translate="ANALYTICS.ERROR">ERROR</div>\n                            <div ng-if="!vm.error" class="h2 secondary-text">SQL</div>\n                        </div>\n                        <dl ng-if="vm.error">\n                            <dt class="text-bold" translate="ANALYTICS.QUERY_ERROR">Query Error</dt>\n                            <dd>{{vm.error.sql}}</dd>\n                            <dt translate="ANALYTICS.MESSAGE">Message</dt>\n                            <dd>{{vm.error.msg}}</dd>\n                        </dl>\n                        <div ng-if="!vm.error">\n                            {{vm.queryResult}}\n                        </div>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/analytics/views/reports/preview/dialog.html",'<md-dialog aria-label="Run Report">\n    <form name="reportForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title" translate="ANALYTICS.PREVIEW_REPORT">Preview Report</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <div class="md-block">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div ng-if="vm.error" class="h2 secondary-text" translate="ANALYTICS.ERROR">ERROR</div>\n                    <div ng-if="!vm.error" class="h2 secondary-text" translate="ANALYTICS.LIMITED_RESULT">LIMITED RESULT</div>\n                </div>\n                <dl ng-if="vm.error">\n                    <dt class="text-bold" translate="ANALYTICS.QUERY_ERROR">Query Error</dt>\n                    <dd>{{vm.error.sql}}</dd>\n                    <dt translate="ANALYTICS.MESSAGE">Message</dt>\n                    <dd>{{vm.error.msg}}</dd>\n                </dl>\n                <md-table-container ng-if="!vm.error">\n                    <table md-table md-progress="vm.promise">\n                        <thead md-head>\n                            <tr md-row>\n                                <th md-column ng-repeat="column in vm.columns">{{column.alias || column.field}}</th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-repeat="row in vm.rows">\n                                <td md-cell ng-repeat="(key, value) in row">{{ vm.valueReplacer(key, value) }}</td>\n                            </tr>\n                            <tr md-row ng-if="!vm.rows.length">\n                                <td md-cell colspan="{{vm.columns.length}}"><span translate="ANALYTICS.NO_DATA">NO DATA</span></td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div flex></div>\n            <md-button type="submit" ng-click="vm.closeDialog()" class="md-raised" aria-label="CLOSE" translate="ANALYTICS.CLOSE" translate-attr-aria-label="ANALYTICS.CLOSE">\n                CLOSE\n            </md-button>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/analytics/views/reports/reports.html",'<div id="reports" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-chart-line" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="ANALYTICS.REPORTS">Reports</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedReports.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedReports =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="ANALYTICS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-reports-count">\n                    <span>{{vm.selectedReports.length}}</span>\n                <span translate="ANALYTICS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="ANALYTICS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllReports()" translate="ANALYTICS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectReports()" translate="ANALYTICS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedReports" csv-label="true" filename="reports.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button ng-if="vm.currentNode.custom && (vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\')" class="md-icon-button" ng-click="vm.deleteSelectedReports($event)" aria-label="delete selected" translate translate-attr-label="ANALYTICS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div layout="column" flex="30">\n            <md-card class="padding-top-5 padding-horizontal-10 padding-bottom-0">\n                \x3c!-- SEARCH --\x3e\n                <div layout="row" layout-align="start center">\n                    <label for="searchFolder" class="m-0">\n                        <md-icon md-font-icon="icon-magnify"></md-icon>\n                    </label>\n                    <md-input-container md-no-float class="margin-horizontal-0 margin-bottom-0 margin-top-10" flex>\n                        <input id="searchFolder" placeholder="Search folder" type="text" ng-model="vm.search" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="ANALYTICS.SEARCH_FOR_FOLDER">\n                    </md-input-container>\n                </div>\n                \x3c!-- / SEARCH --\x3e\n            </md-card>\n            <md-card class="padding-10 scrollable" ms-scroll>\n                <div js-tree="vm.treeDefaultConfig" tree-events-obj="vm.treeDefaultEvents" ng-model="vm.treeDefaultData" tree="vm.treeDefaultInstance"></div>\n            </md-card>\n            <md-card class="padding-10 scrollable" ms-scroll>\n                <div js-tree="vm.treeCustomConfig" tree-events-obj="vm.treeCustomEvents" ng-model="vm.treeCustomData" tree="vm.treeCustomInstance"></div>\n            </md-card>\n        </div>\n        <md-card flex="70">\n            <md-toolbar class="md-table-toolbar md-default">\n                <div class="md-toolbar-tools">\n                    <span class="h2 secondary-text">{{vm.currentNode.text}}</span>\n                    <p ng-if="vm.currentPath">\n                        <span class="text-boxed">{{vm.currentPath}}</span>\n                    </p>\n                    <div flex></div>\n                    <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n                    <div flow-init flow-file-added="vm.importReport($file, $event, $flow)">\n                        <md-button ng-if="vm.currentNode.custom" class="md-icon-button" aria-label="import report" translate translate-attr-label="ANALYTICS.IMPORT_REPORT" flow-btn>\n                            <md-icon md-font-icon="icon-upload"></md-icon>\n                        </md-button>\n                    </div>\n                    <md-button ng-if="vm.currentNode.custom" class="md-icon-button" ng-click="vm.createOrEditReport($event)" aria-label="add report" translate translate-attr-label="ANALYTICS.ADD_REPORT">\n                        <md-icon md-font-icon="icon-plus"></md-icon>\n                    </md-button>\n                </div>\n            </md-toolbar>\n            <md-table-container>\n                <table md-table md-row-select multiple ng-model="vm.selectedReports" md-progress="vm.promise">\n                    <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getReports">\n                        <tr md-row>\n                            <th md-column md-order-by="id" width="10px">{{ \'ANALYTICS.ID\' | translate }}</th>\n                            <th md-column md-order-by="name">{{ \'ANALYTICS.NAME\' | translate }}</th>\n                            <th md-column md-order-by="description">{{ \'ANALYTICS.DESCRIPTION\' | translate }}</th>\n                            <th md-column md-order-by="createdAt">{{ \'ANALYTICS.CREATED_AT\' | translate }}</th>\n                            <th md-column width="10px"></th>\n                        </tr>\n                    </thead>\n                    <tbody md-body>\n                        <tr md-row ng-hide="vm.reports.rows.length">\n                            <td md-cell colspan="5">\n                                <div layout="row" layout-align="center center">\n                                    <span tranlsate="ANALYTICS.NO_AVAILABLE_INFO">No Available Info</span>\n                                </div>\n                            </td>\n                        </tr>\n                        <tr md-row md-select="report" md-select-id="id" ng-repeat="report in vm.reports.rows">\n                            <td ng-click="vm.currentNode.custom && vm.createOrEditReport($event, report)" md-cell class="id">{{report.id}}</td>\n                            <td ng-click="vm.currentNode.custom && vm.createOrEditReport($event, report)" md-cell class="name">{{report.name}}</td>\n                            <td ng-click="vm.currentNode.custom && vm.createOrEditReport($event, report)" md-cell class="description">{{report.description}}</td>\n                            <td ng-click="vm.currentNode.custom && vm.createOrEditReport($event, report)" md-cell class="createdAt">{{report.createdAt | date:\'medium\'}}</td>\n                            <td md-cell class="actions">\n                                <md-menu>\n                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="ANALYTICS.MORE" ng-click="$mdOpenMenu($event)">\n                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                    </md-button>\n\n                                    <md-menu-content width="3">\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.copydialog(report, $event)" translate="ANALYTICS.COPY_REPORT">\n                                                Copy Report\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.previewdialog(report, $event)" translate="ANALYTICS.PREVIEW_REPORT">\n                                                Preview Report\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.rundialog(report, $event)" translate="ANALYTICS.RUN_REPORT">\n                                                Run Report\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.downloadfile(report, $event)" translate="ANALYTICS.DOWNLOAD_JSON_REPORT">\n                                                Download Json Report\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-divider ng-if="vm.currentNode.custom"></md-menu-divider>\n                                        <md-menu-item ng-if="vm.currentNode.custom">\n                                            <md-button ng-click="vm.editstate(report, $event)" translate="ANALYTICS.EDIT_REPORT">\n                                                Edit Report\n                                            </md-button>\n                                        </md-menu-item>\n\n                                        <md-menu-item ng-if="vm.currentNode.custom && (vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\')">\n                                            <md-button ng-click="vm.deleteconfirm(report, $event)" translate="ANALYTICS.DELETE_REPORT">\n                                                Delete Report\n                                            </md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </td>\n                        </tr>\n                    </tbody>\n                </table>\n            </md-table-container>\n\n            <md-table-pagination md-label="{page: \'{{\'ANALYTICS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'ANALYTICS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'ANALYTICS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                md-total="{{vm.reports.count}}" md-on-paginate="vm.getReports" md-page-select></md-table-pagination>\n        </md-card>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- NO ADD BUTTON BUTTON --\x3e\n</div>'),e.put("app/main/apps/analytics/views/reports/run/dialog.html",'<md-dialog class="report-dialog" aria-label="Run Report">\n    <form name="reportForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title" translate="ANALYTICS.RUN_REPORT">Run Report</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.NAME">Name</label>\n                <input name="name" ng-model="vm.export.name" required md-autofocus>\n                <div ng-messages="reportForm.name.$error" ng-show="reportForm.name.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.FORMAT">FORMAT</label>\n                <md-select name="format" ng-model="vm.export.output" required>\n                    <md-option value="csv">CSV</md-option>\n                    <md-option value="xlsx">Excel (XLSX)</md-option>\n                    <md-option value="pdf">PDF</md-option>\n                    <md-option value="web">Web</md-option>\n                </md-select>\n                <div ng-messages="reportForm.format.$error" ng-show="reportForm.format.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.FORMAT_REQUIRED">Format field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div layout="row">\n                <div class="md-block" flex>\n                    <mdp-date-picker mdp-open-on-click required name="dateRangeFrom" mdp-placeholder="Date Range From" mdp-format="YYYY-MM-DD" mdp-max-date="vm.dateRangeTo" ng-model="vm.export.startDate">\n                        <div ng-messages="reportForm.dateRangeFrom.$error" ng-show="reportForm.dateRangeFrom.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="ANALYTICS.ERRORS.DATE_RANGE_FROM_REQUIRED">Date Range From field is required</span>\n                            </div>\n                            <div ng-message="format">\n                                <span translate="ANALYTICS.ERRORS.DATE_RANGE_FROM_INVALID">Date Range From field is invalid</span>\n                            </div>\n                            <div ng-message="maxDate">\n                                <span translate="ANALYTICS.ERRORS.DATE_RANGE_FROM_MAX_INVALID">Date Range From Max field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-date-picker>\n                </div>\n                <div class="md-block" flex>\n                    <mdp-date-picker mdp-open-on-click required name="dateRangeTo" mdp-placeholder="Date Range To" mdp-format="YYYY-MM-DD" mdp-min-date="vm.dateRangeFrom" ng-model="vm.export.endDate">\n                        <div ng-messages="reportForm.dateRangeTo.$error" ng-show="reportForm.dateRangeTo.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="ANALYTICS.ERRORS.DATE_RANGE_TO_REQUIRED">Date Range From field is required</span>\n                            </div>\n                            <div ng-message="format">\n                                <span translate="ANALYTICS.ERRORS.DATE_RANGE_TO_INVALID">Date Range From field is invalid</span>\n                            </div>\n                            <div ng-message="minDate">\n                                <span translate="ANALYTICS.ERRORS.DATE_RANGE_FROM_MIN_INVALID">Date Range From Min field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-date-picker>\n                </div>\n            </div>\n            <div layout="row">\n                <div class="md-block" flex>\n                    <mdp-time-picker required name="timeRangeFrom" mdp-placeholder="Time Range From" mdp-format="HH:mm:ss" mdp-auto-switch="true" mdp-max-date="vm.dateRangeTo" ng-model="vm.export.startDate">\n                        <div ng-messages="reportForm.timeRangeFrom.$error" ng-show="reportForm.timeRangeFrom.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="ANALYTICS.ERRORS.TIME_RANGE_FROM_REQUIRED">Time Range From field is required</span>\n                            </div>\n                            <div ng-message="format">\n                                <span translate="ANALYTICS.ERRORS.TIME_RANGE_FROM_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n                <div class="md-block" flex>\n                    <mdp-time-picker required name="timeRangeTo" mdp-placeholder="Time Range To" mdp-format="HH:mm:ss" mdp-auto-switch="true" mdp-min-date="vm.dateRangeFrom" ng-model="vm.export.endDate">\n                        <div ng-messages="reportForm.timeRangeTo.$error" ng-show="reportForm.timeRangeTo.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="ANALYTICS.ERRORS.TIME_RANGE_TO_REQUIRED">Time Range From field is required</span>\n                            </div>\n                            <div ng-message="format">\n                                <span translate="ANALYTICS.ERRORS.TIME_RANGE_TO_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.runReport($event)" class="send-button md-accent md-raised" ng-disabled="reportForm.$invalid" aria-label="RUN" translate="ANALYTICS.RUN_REPORT" translate-attr-aria-label="ANALYTICS.RUN_REPORT">\n                    RUN REPORT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-click="vm.refreshDate()" aria-label="REFRESH" translate translate-attr-aria-label="ANALYTICS.REFRESH">\n                    <md-icon md-font-icon="icon-refresh"></md-icon>\n                    <md-tooltip><span translate="ANALYTICS.REFRESH">REFRESH</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/analytics/views/reports/run/web/dialog.html",'<md-dialog class="web-dialog" aria-label="Show Report">\n    <form name="reportForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title" translate="ANALYTICS.PREVIEW_REPORT">Web Report</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <div class="md-block">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div ng-if="vm.error" class="h2 secondary-text" translate="ANALYTICS.ERROR">ERROR</div>\n                </div>\n                <dl ng-if="vm.error">\n                    <dt class="text-bold" translate="ANALYTICS.QUERY_ERROR">Query Error</dt>\n                    <dd>{{vm.error.sql}}</dd>\n                    <dt translate="ANALYTICS.MESSAGE">Message</dt>\n                    <dd>{{vm.error.msg}}</dd>\n                </dl>\n                <md-table-container ng-if="!vm.error">\n                    <table md-table md-progress="vm.promise">\n                        <thead md-head>\n                            <tr md-row>\n                                <th md-column ng-repeat="column in vm.columns">{{column.alias || column.field}}</th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-repeat="row in vm.results.rows">\n                                <td md-cell ng-repeat="(key, value) in row">{{ vm.valueReplacer(key, value) }}</td>\n                            </tr>\n                            <tr md-row ng-if="!vm.results.rows.length">\n                                <td md-cell colspan="{{vm.columns.length}}">\n                                    <div layout="row" layout-align="center center">\n                                        <span translate="ANALYTICS.NO_DATA">NO DATA</span>\n                                    </div>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'ANALYTICS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'ANALYTICS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'ANALYTICS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.results.count}}" md-on-paginate="vm.getResults" md-page-select></md-table-pagination>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div flex></div>\n            <md-button type="submit" ng-click="vm.closeDialog()" class="md-raised" aria-label="CLOSE" translate="ANALYTICS.CLOSE" translate-attr-aria-label="ANALYTICS.CLOSE">\n                CLOSE\n            </md-button>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/callysquare/views/odbcs/create/dialog.html",'<md-dialog class="odbc-dialog" aria-label="New Odbc">\n    <form name="odbcForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CALLYSQUARE.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.odbc.name" ng-required="true" autofocus>\n                <div ng-messages="odbcForm[\'name\'].$error" ng-show="odbcForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CALLYSQUARE.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CALLYSQUARE.DSN">DSN</label>\n                <input type="text" name="dsn" ng-model="vm.odbc.dsn" ng-required="true">\n                <div class="hint"><span translate="CALLYSQUARE.HELP.DSN"></span></div>\n                <div ng-messages="odbcForm[\'dsn\'].$error" ng-show="odbcForm[\'dsn\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CALLYSQUARE.ERRORS.DSN_REQUIRED">DSN field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CALLYSQUARE.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.odbc.description">\n                <div ng-messages="odbcForm[\'description\'].$error" ng-show="odbcForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CALLYSQUARE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newOdbc" ng-click="vm.saveOdbc()" class="send-button md-accent md-raised" ng-disabled="odbcForm.$invalid || odbcForm.$pristine" aria-label="SAVE" translate="CALLYSQUARE.SAVE" translate-attr-aria-label="CALLYSQUARE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newOdbc" ng-click="vm.addNewOdbc()" class="send-button md-accent md-raised" ng-disabled="odbcForm.$invalid" aria-label="ADD" translate="CALLYSQUARE.ADD_ODBC" translate-attr-aria-label="CALLYSQUARE.ADD_ODBC">\n                    ADD ODBC\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newOdbc" ng-click="vm.deleteOdbc($event)" aria-label="DELETE" translate translate-attr-aria-label="CALLYSQUARE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CALLYSQUARE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/callysquare/views/odbcs/odbcs.html",'<div id="odbcs" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-sitemap" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="CALLYSQUARE.ODBC">ODBC</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="CALLYSQUARE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedODBC.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedODBC =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="CALLYSQUARE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-odbcs-count">\n                    <span>{{vm.selectedODBC.length}}</span>\n                <span translate="CALLYSQUARE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="ODBC.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllODBC()" translate="CALLYSQUARE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectODBC()" translate="CALLYSQUARE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedODBC" csv-label="true" filename="odbcs.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedODBC($event)" aria-label="delete selected" translate translate-attr-label="ODBC.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- ODBC TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedODBC" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getODBC">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'CALLYSQUARE.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'CALLYSQUARE.NAME\' | translate }}</th>\n                                <th md-column md-order-by="dsn">{{ \'CALLYSQUARE.DSN\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'CALLYSQUARE.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.odbcs.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="CALLYSQUARE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="odbc" md-select-id="id" ng-repeat="odbc in vm.odbcs.rows">\n                                <td md-cell ng-if="odbc.userpic"><img class="avatar" alt="{{odbc.name}}" ng-src="api/users/{{odbc.id}}/avatar" /></td>\n                                <td md-cell ng-if="!odbc.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{odbc.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditOdbc($event, odbc)" md-cell class="id ">{{odbc.id}}</td>\n                                <td ng-click="vm.createOrEditOdbc($event, odbc)" md-cell class="name ">{{odbc.name}}</td>\n                                <td ng-click="vm.createOrEditOdbc($event, odbc)" md-cell class="dsn ">{{odbc.dsn}}</td>\n                                <td ng-click="vm.createOrEditOdbc($event, odbc)" md-cell class="description ">{{odbc.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CALLYSQUARE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(odbc, $event)" translate="CALLYSQUARE.EDIT_ODBC">\n                                                    Edit Odbc\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.testtestOdbc(odbc, $event)" translate="CALLYSQUARE.TEST_ODBC">\n                                                    Test Odbc\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(odbc, $event)" translate="CALLYSQUARE.DELETE_ODBC">\n                                                    Delete Odbc\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'CALLYSQUARE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CALLYSQUARE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CALLYSQUARE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.odbcs.count}}" md-on-paginate="vm.getODBC" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / ODBC TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD ODBC BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-odbc-button" ng-click="vm.createOrEditOdbc($event)" aria-label="add odbc" translate translate-attr-aria-label="CALLYSQUARE.ADD_ODBC">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD ODBC BUTTON --\x3e\n</div>'),e.put("app/main/apps/callysquare/views/projects/create/dialog.html",'<md-dialog class="project-dialog" aria-label="New Project">\n    <form name="projectForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{vm.title | translate}}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CALLYSQUARE.NAME">Name</label>\n                <input name="name" ng-model="vm.project.name" required md-autofocus ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-disabled="!vm.newProject">\n                <div ng-messages="projectForm.name.$error" ng-show="projectForm.name.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CALLYSQUARE.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="VOICE.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CALLYSQUARE.DESCRIPTION">Description</label>\n                <input name="description" ng-model="vm.project.description">\n                <div ng-messages="projectForm.description.$error" ng-show="projectForm.description.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CALLYSQUARE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.openFromEditor" class="md-block">\n                \x3c!-- Added to check if I\'m opening the dialog directly from the square editor --\x3e\n                <md-switch ng-model="vm.newWindow" aria-label="{{\'CALLYSQUARE.OPEN_NEW_WINDOW\' | translate }}"><span translate="CALLYSQUARE.OPEN_NEW_WINDOW"></span></md-switch>\n            </md-input-container>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newProject" ng-click="vm.saveProject()" class="send-button md-accent md-raised" ng-disabled="projectForm.$invalid || projectForm.$pristine" aria-label="SAVE" translate="CALLYSQUARE.SAVE" translate-attr-aria-label="CALLYSQUARE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newProject" ng-click="vm.addNewProject()" class="send-button md-accent md-raised" ng-disabled="projectForm.$invalid || projectForm.$pristine" aria-label="ADD" translate="CALLYSQUARE.ADD_PROJECT" translate-attr-aria-label="CALLYSQUARE.ADD_PROJECT">\n                    ADD PROJECT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newProject" ng-click="vm.deleteProject($event)" aria-label="DELETE" translate translate-attr-aria-label="CALLYSQUARE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CALLYSQUARE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/callysquare/views/projects/edit/dialog/dialog.html",'<md-dialog class="project-dialog" aria-label="New dialog">\n    <form name="dialogForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title"><span translate="CALLYSQUARE.EDIT"></span> <span translate="CALLYSQUARE.{{vm.cellName | uppercase}}"></span></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content ms-scroll>\n            <md-input-container class="md-block" ng-repeat="attribute in vm.attributes" ng-switch="attribute.name">\n                <label translate="CALLYSQUARE.{{attribute.name | uppercase}}">{{attribute.name  | ucfirst }}</label>\n\n                \x3c!--  START SELECT INPUT --\x3e\n                <md-select name="{{attribute.name}}" ng-model="attribute.value" ng-switch-when-separator="|" ng-switch-when="answer|trunk_name|trunk_id|queue_id|file_id|variable_id|google_tts_language|ispeech_tts_language|ispeech_asr_language|google_asr_language|hiddendigitspos|odbc_id|project_id|beep|account_id|interval_id|template_id|list_id|recordingFormat|callback_priority|aws_polly_voice|aws_polly_region|sms_account_id|findBy|pause_id"\n                    ng-required="attribute.required">\n                    <md-option ng-if="attribute.defaultValue" ng-value="\'\'"> - None - </md-option>\n                    <md-option value="{{v.value}}" ng-repeat="v in vm.values[attribute.name]">{{v.option}}</md-option>\n                    <md-option ng-if="!vm.values[attribute.name].length" value="-1">No {{attribute.name}} available!</md-option>\n                </md-select>\n                \x3c!--  END SELECT INPUT --\x3e\n\n                \x3c!--  START SELECT INPUT --\x3e\n                <md-select name="{{attribute.name}}" ng-model="attribute.value" ng-switch-when-separator="|" ng-switch-when="sip_id" ng-required="attribute.required">\n                    <md-optgroup label="{{\'CALLYSQUARE.AGENTS\' | translate}}">\n                        <md-option value="{{v.value}}" ng-repeat="v in vm.values[attribute.name]" ng-if="v.group === \'agent\'">{{v.option}}</md-option>\n                    </md-optgroup>\n                    <md-optgroup label="{{\'CALLYSQUARE.TELEPHONES\' | translate}}">\n                        <md-option value="{{v.value}}" ng-repeat="v in vm.values[attribute.name]" ng-if="v.group === \'telephone\'">{{v.option}}</md-option>\n                    </md-optgroup>\n                    <md-optgroup label="{{\'CALLYSQUARE.USERS\' | translate}}">\n                        <md-option value="{{v.value}}" ng-repeat="v in vm.values[attribute.name]" ng-if="v.group === \'admin\' || v.group === \'user\'">{{v.option}}</md-option>\n                    </md-optgroup>\n                    <md-option ng-if="!vm.values[attribute.name].length" value="-1">No {{attribute.name}} available!</md-option>\n                </md-select>\n                \x3c!--  END SELECT INPUT --\x3e\n\n                \x3c!--  START NUMBER INPUT --\x3e\n                <div ng-switch-when="timeout">\n                    <div ng-switch="vm.cellName">\n                        <input ng-switch-when-separator="|" ng-switch-when="answer|ext_dial|dial|queue" type="number" step="any" name="{{attribute.name}}" min="0" ng-model="attribute.value" ng-required="attribute.required" string-to-number>\n                        <input ng-switch-when-separator="|" ng-switch-when="record|ispeechasr|googleasr" type="number" step="any" name="{{attribute.name}}" min="-1" ng-model="attribute.value" ng-required="attribute.required" string-to-number>\n                        <input ng-switch-default type="number" step="any" name="{{attribute.name}}" min="0" ng-model="attribute.value" ng-required="attribute.required" string-to-number>\n                    </div>\n                </div>\n                <input ng-switch-when-separator="|" ng-switch-when="speed" type="number" step="any" name="{{attribute.name}}" min="-10" max="-10" ng-model="attribute.value" ng-required="attribute.required" string-to-number>\n                <input ng-switch-when-separator="|" ng-switch-when="maxdigit|mindigit|digit" type="number" step="any" name="{{attribute.name}}" min="1" ng-model="attribute.value" ng-required="attribute.required" string-to-number>\n                <input ng-switch-when-separator="|" ng-switch-when="retry|response|hiddendigitsnum|priority|delay" type="number" step="any" name="{{attribute.name}}" min="1" ng-model="attribute.value" ng-required="attribute.required" string-to-number>\n                \x3c!--  END NUMBER INPUT --\x3e\n\n                \x3c!--  START TEXTAREA INPUT --\x3e\n                <textarea name="{{attribute.name}}" ng-model="attribute.value" ng-switch-when-separator="|" ng-switch-when="query|sms_text|condition|text" ng-required="attribute.required"></textarea>\n                \x3c!--  END TEXTAREA INPUT --\x3e\n\n                \x3c!--  START TEXT INPUT --\x3e\n                <input ng-switch-default name="{{attribute.name}}" ng-model="attribute.value" ng-required="attribute.required">\n                \x3c!--  END TEXT INPUT--\x3e\n\n                <div class="hint" ng-if="attribute.help">\n                    <span translate="CALLYSQUARE.HELP.{{attribute.name | uppercase}}"></span>\n                </div>\n                <div ng-messages="dialogForm[attribute.name].$error" ng-show="dialogForm[attribute.name].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CALLYSQUARE.ERRORS.FIELD_REQUIRED">The field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.closeDialog(true)" class="send-button md-accent md-raised" ng-disabled="dialogForm.$invalid || dialogForm.$pristine" aria-label="SAVE" translate="CALLYSQUARE.SAVE" translate-attr-aria-label="CALLYSQUARE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/callysquare/views/projects/edit/edit/edit.html",'<md-dialog class="project-dialog" aria-label="New dialog">\n    <form name="editForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title"><span translate="CALLYSQUARE.EDIT_XML"></span></span>\n                </span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label>XML</label>\n                <textarea name="preproduction" ng-model="vm.project.preproduction"></textarea>\n            </md-input-container>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.closeDialog(true)" class="send-button md-accent md-raised" ng-disabled="editForm.$invalid" aria-label="SAVE" translate="CALLYSQUARE.SAVE" translate-attr-aria-label="CALLYSQUARE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/callysquare/views/projects/edit/import/import.html",'<md-dialog class="project-dialog" aria-label="New dialog">\n    <form name="importForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title"><span translate="CALLYSQUARE.IMPORT_XML"></span></span>\n                </span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <div id="xml-uploader" flow-init="vm.ngFlowOptions" flow-name="vm.ngFlow.flow" flow-file-added="vm.fileAdded($file)" flow-drop flow-drag-enter="vm.dropping=true" flow-drag-leave="vm.dropping=false" ng-class="{\'dropping\':vm.dropping}">\n\n                <div class="drop-text hint-text" layout="row" layout-align="center center">\n                    <span translate="CALLYSQUARE.DROP_TO_UPLOAD">Drop to upload</span>\n                </div>\n\n                <div class="upload-button" layout="column" layout-align="center center">\n                    <md-button class="md-accent md-raised" flow-btn>\n                        Upload\n                    </md-button>\n                    <span class="secondary-text mt-8" translate="CALLYSQUARE.DROP_TO_UPLOAD_MESSAGE">You can also drop files here to upload. Only XML - Max. 5MB</span>\n                </div>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.closeDialog()" class="send-button md-accent md-raised" ng-disabled="importForm.$invalid" aria-label="CLOSE" translate="CALLYSQUARE.CLOSE" translate-attr-aria-label="CALLYSQUARE.CLOSE">\n                    CLOSE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/callysquare/views/projects/edit/info/info.html",'<md-dialog class="project-dialog" aria-label="New dialog">\n    <form name="descriptionFrom" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title"><span translate="CALLYSQUARE.UPDATE_INFO"></span></span>\n                </span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CALLYSQUARE.DESCRIPTION">Description</label>\n                <input name="description" ng-model="vm.project.description" md-autofocus>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CALLYSQUARE.NOTES">Description</label>\n                <textarea name="notes" ng-model="vm.project.notes"></textarea>\n            </md-input-container>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.save()" class="send-button md-accent md-raised" ng-disabled="descriptionFrom.$invalid" aria-label="SAVE" translate="CALLYSQUARE.UPDATE_INFO" translate-attr-aria-label="CALLYSQUARE.UPDATE">\n                    UPDATE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/callysquare/views/projects/edit/open/open.html",'<md-dialog class="project-dialog" aria-label="New dialog">\n    <form name="openForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title"><span translate="CALLYSQUARE.OPEN_PROJECT"></span></span>\n                </span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CALLYSQUARE.PROJECT">Project</label>\n                <md-select name="id" ng-model="vm.id" required>\n                    <md-option value="{{p.id}}" ng-repeat="p in vm.projects">{{p.name}}</md-option>\n                </md-select>\n                <div ng-messages="openForm.id.$error" ng-show="openForm.id.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CALLYSQUARE.ERRORS.PROJECT_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.newWindow" aria-label="{{\'CALLYSQUARE.OPEN_NEW_WINDOW\' | translate }}"><span translate="CALLYSQUARE.OPEN_NEW_WINDOW"></span></md-switch>\n            </md-input-container>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.closeDialog(true)" class="send-button md-accent md-raised" ng-disabled="openForm.$invalid" aria-label="SAVE" translate="CALLYSQUARE.OPEN_PROJECT" translate-attr-aria-label="CALLYSQUARE.OPEN">\n                    OPEN\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/callysquare/views/projects/edit/saveAs/saveAs.html",'<md-dialog class="project-dialog" aria-label="New dialog">\n    <form name="newForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title"><span translate="CALLYSQUARE.COPY_PROJECT"></span></span>\n                </span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CALLYSQUARE.NAME">Name</label>\n                <input name="name" ng-model="vm.project.name" required md-autofocus>\n                <div ng-messages="newForm.name.$error" ng-show="newForm.name.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CALLYSQUARE.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.newWindow" aria-label="{{\'CALLYSQUARE.OPEN_NEW_WINDOW\' | translate }}"><span translate="CALLYSQUARE.OPEN_NEW_WINDOW"></span></md-switch>\n            </md-input-container>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.save()" class="send-button md-accent md-raised" ng-disabled="newForm.$invalid" aria-label="SAVE" translate="CALLYSQUARE.COPY_PROJECT" translate-attr-aria-label="CALLYSQUARE.COPY">\n                    COPY\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/callysquare/views/projects/edit/view.html",'<div id="callysquare-project" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-projects-button md-icon-button" aria-label="Go to projects" ng-click="vm.gotoProjects()" translate translate-attr-aria-label="CALLYSQUARE.GO_TO_PROJECTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="project-image" hide-xs>\n                    <img ng-src="assets/images/business/cprojects.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.project.id}} {{vm.project.name}}\n                    </div>\n                    <div class="subtitle secondary-text text-truncate">\n                        <span ng-if="vm.project.description">{{vm.project.description}}  - </span><span translate="CALLYSQUARE.CREATED_AT"></span> <span>{{vm.project.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.updateInfo($event)" class="md-fab md-yellow-700-bg md-icon-button" aria-label="edit">\n                <md-icon md-font-icon="icon-tooltip-edit"></md-icon>\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <md-content class="callysquare-content">\n\n        <div id="geEditor" class="geEditor"></div>\n\n    </md-content>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/callysquare/views/projects/projects.html",'<div id="projects" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-vector-square" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="CALLYSQUARE.PROJECTS">Projects</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        \x3c!-- SEARCH --\x3e\n        <div class="search-input-wrapper" layout="row" layout-align="start center">\n            <label for="search">\n                <md-icon md-font-icon="icon-magnify"></md-icon>\n            </label>\n            <md-input-container md-no-float class="m-0">\n                <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="CALLYSQUARE.SEARCH_FOR_ANYONE">\n            </md-input-container>\n        </div>\n        \x3c!-- / SEARCH --\x3e\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedProjects.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedProjects =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="CALLYSQUARE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-projects-count">\n                    <span>{{vm.selectedProjects.length}}</span>\n                <span translate="CALLYSQUARE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="CALLYSQUARE.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllProjects()" translate="CALLYSQUARE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectProjects()" translate="CALLYSQUARE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedProjects" csv-label="true" filename="projects.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm.deleteSelectedProjects($event)" aria-label="delete selected" translate translate-attr-label="CALLYSQUARE.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- PROJECT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedProjects" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getProjects">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'CALLYSQUARE.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'CALLYSQUARE.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'CALLYSQUARE.DESCRIPTION\' | translate }}</th>\n                                <th md-column md-order-by="notes">{{ \'CALLYSQUARE.NOTES\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.projects.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="CALLYSQUARE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="project" md-select-id="id" ng-repeat="project in vm.projects.rows">\n                                <td md-cell ng-if="project.userpic"><img class="avatar" alt="{{project.name}}" ng-src="api/users/{{project.id}}/avatar" /></td>\n                                <td md-cell ng-if="!project.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{project.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditProject($event, project)" md-cell class="id ">{{project.id}}</td>\n                                <td ng-click="vm.createOrEditProject($event, project)" md-cell class="name ">{{project.name}}</td>\n                                <td ng-click="vm.createOrEditProject($event, project)" md-cell class="description ">{{project.description}}</td>\n                                <td ng-click="vm.createOrEditProject($event, project)" md-cell class="notes ">{{project.notes}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CALLYSQUARE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(project, ev)" translate="CALLYSQUARE.EDIT_PROJECT">\n                                                    Edit Project\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(project, ev)" translate="CALLYSQUARE.DELETE_PROJECT">\n                                                    Delete Project\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'CALLYSQUARE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CALLYSQUARE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CALLYSQUARE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.projects.count}}" md-on-paginate="vm.getProjects" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / PROJECT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD PROJECT BUTTON --\x3e\n    <md-button class="md-fab md-accent md-icon-button" id="add-project-button" ng-click="vm.createOrEditProject($event)" aria-label="add project" translate translate-attr-aria-label="CALLYSQUARE.ADD_PROJECT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD PROJECT BUTTON --\x3e\n\n</div>'),e.put("app/main/apps/callysquare/views/squareRecordings/create/dialog.html",'<md-dialog class="squareRecording-dialog" aria-label="New SquareRecording">\n    <form name="squareRecordingForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CALLYSQUARE.FILENAME">Filename</label>\n                <input type="" name="filename" ng-model="vm.squareRecording.filename" ng-required="true" autofocus>\n                <div ng-messages="squareRecordingForm[\'filename\'].$error" ng-show="squareRecordingForm[\'filename\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CALLYSQUARE.ERRORS.FILENAME_REQUIRED">Filename field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSquareRecording" ng-click="vm.saveSquareRecording()" class="send-button md-accent md-raised" ng-disabled="squareRecordingForm.$invalid || squareRecordingForm.$pristine" aria-label="SAVE" translate="CALLYSQUARE.SAVE"\n                    translate-attr-aria-label="CALLYSQUARE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSquareRecording" ng-click="vm.addNewSquareRecording()" class="send-button md-accent md-raised" ng-disabled="squareRecordingForm.$invalid" aria-label="ADD" translate="CALLYSQUARE.ADD_SQUARERECORDING" translate-attr-aria-label="CALLYSQUARE.ADD_SQUARERECORDING">\n                    ADD SQUARERECORDING\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSquareRecording" ng-click="vm.deleteSquareRecording($event)" aria-label="DELETE" translate translate-attr-aria-label="CALLYSQUARE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CALLYSQUARE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/callysquare/views/squareRecordings/squareRecordings.html",'<div id="squareRecordings" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-sitemap" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="CALLYSQUARE.SQUARERECORDINGS">SquareRecordings</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="CALLYSQUARE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedSquareRecordings.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedSquareRecordings =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="CALLYSQUARE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-squareRecordings-count">\n                    <span>{{vm.selectedSquareRecordings.length}}</span>\n                <span translate="CALLYSQUARE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="SQUARERECORDINGS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllSquareRecordings()" translate="CALLYSQUARE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectSquareRecordings()" translate="CALLYSQUARE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedSquareRecordings" csv-label="true" filename="squareRecordings.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedSquareRecordings($event)" aria-label="delete selected" translate translate-attr-label="SQUARERECORDINGS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- SQUARERECORDING TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedSquareRecordings" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getSquareRecordings">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="filename">{{ \'CALLYSQUARE.FILENAME\' | translate }}</th>\n                                <th md-column md-order-by="projectName">{{ \'CALLYSQUARE.PROJECT\' | translate }}</th>\n                                <th md-column md-order-by="uniqueid">{{ \'CALLYSQUARE.UNIQUEID\' | translate }}</th>\n                                <th md-column md-order-by="callerid">{{ \'CALLYSQUARE.PHONE\' | translate }}</th>\n                                <th md-column md-order-by="extension">{{ \'CALLYSQUARE.EXTEN\' | translate }}</th>\n                                <th md-column md-order-by="audio">{{ \'CALLYSQUARE.AUDIO\' | translate }}</th>\n                                <th md-column md-order-by="createdAt">{{ \'CALLYSQUARE.CREATED_AT\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.squareRecordings.rows.length">\n                                <td md-cell colspan="8">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="CALLYSQUARE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="squareRecording" md-select-id="id" ng-repeat="squareRecording in vm.squareRecordings.rows">\n                                <td md-cell ng-if="squareRecording.userpic"><img class="avatar" alt="{{squareRecording.name}}" ng-src="api/users/{{squareRecording.id}}/avatar" /></td>\n                                <td md-cell ng-if="!squareRecording.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{squareRecording.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditSquareRecording($event, squareRecording)" md-cell class="filename ">{{squareRecording.filename}}</td>\n                                <td ng-click="vm.createOrEditSquareRecording($event, squareRecording)" md-cell class="projectName ">{{squareRecording.projectName}}</td>\n                                <td ng-click="vm.createOrEditSquareRecording($event, squareRecording)" md-cell class="uniqueid ">{{squareRecording.uniqueid}}</td>\n                                <td ng-click="vm.createOrEditSquareRecording($event, squareRecording)" md-cell class="callerid ">{{squareRecording.callerid}}</td>\n                                <td ng-click="vm.createOrEditSquareRecording($event, squareRecording)" md-cell class="extension ">{{squareRecording.extension}}</td>\n                                <td md-cell class="audio ">\n                                    \x3c!-- audio recording directive --\x3e\n                                    <ms-recording id="squareRecording.id" model="\'squareRecording\'"></ms-recording>\n                                    \x3c!-- / audio recording directive --\x3e\n                                </td>\n                                <td ng-click="vm.createOrEditSquareRecording($event, squareRecording)" md-cell class="createdAt ">{{squareRecording.createdAt | date:\'medium\' }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CALLYSQUARE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.downloadfile2(squareRecording, $event)" translate="CALLYSQUARE.DOWNLOAD_SQUARERECORDING">\n                                                    Download SquareRecording\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(squareRecording, $event)" translate="CALLYSQUARE.DELETE_SQUARERECORDING">\n                                                    Delete SquareRecording\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'CALLYSQUARE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CALLYSQUARE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CALLYSQUARE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.squareRecordings.count}}" md-on-paginate="vm.getSquareRecordings" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / SQUARERECORDING TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- NO ADD BUTTON BUTTON --\x3e\n</div>'),e.put("app/main/apps/chat/views/chatQueues/chatQueues.html",'<div id="chatQueues" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-hangouts" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="CHAT.CHATQUEUES">ChatQueues</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="CHAT.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedChatQueues.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedChatQueues =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="CHAT.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-chatQueues-count">\n                    <span>{{vm.selectedChatQueues.length}}</span>\n                <span translate="CHAT.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="CHATQUEUES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllChatQueues()" translate="CHAT.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectChatQueues()" translate="CHAT.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedChatQueues" csv-label="true" filename="chatQueues.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedChatQueues($event)" aria-label="delete selected" translate translate-attr-label="CHATQUEUES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- CHATQUEUE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedChatQueues" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getChatQueues">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'CHAT.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'CHAT.NAME\' | translate }}</th>\n                                <th md-column md-order-by="strategy">{{ \'CHAT.STRATEGY\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.chatQueues.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="CHAT.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="chatQueue" md-select-id="id" ng-repeat="chatQueue in vm.chatQueues.rows">\n                                <td md-cell ng-if="chatQueue.userpic"><img class="avatar" alt="{{chatQueue.name}}" ng-src="api/users/{{chatQueue.id}}/avatar" /></td>\n                                <td md-cell ng-if="!chatQueue.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{chatQueue.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditChatQueue($event, chatQueue)" md-cell class="id ">{{chatQueue.id}}</td>\n                                <td ng-click="vm.createOrEditChatQueue($event, chatQueue)" md-cell class="name ">{{chatQueue.name}}</td>\n                                <td ng-click="vm.createOrEditChatQueue($event, chatQueue)" md-cell class="strategy ">{{ vm.arraystrategy[chatQueue.strategy].option }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CHAT.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(chatQueue, $event)" translate="CHAT.EDIT_CHATQUEUE">\n                                                    Edit ChatQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.teamadddialog(chatQueue, $event)" translate="CHAT.TEAMADD_CHATQUEUE">\n                                                    teamadd ChatQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.agentadddialog(chatQueue, $event)" translate="CHAT.AGENTADD_CHATQUEUE">\n                                                    agentadd ChatQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(chatQueue, $event)" translate="CHAT.DELETE_CHATQUEUE">\n                                                    Delete ChatQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(chatQueue, $event)" translate="CHAT.GOTOREALTIME_CHATQUEUE">\n                                                    goToRealtime ChatQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'CHAT.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CHAT.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CHAT.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.chatQueues.count}}" md-on-paginate="vm.getChatQueues" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / CHATQUEUE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD CHATQUEUE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-chatQueue-button" ng-click="vm.createOrEditChatQueue($event)" aria-label="add chatQueue" translate translate-attr-aria-label="CHAT.ADD_CHATQUEUE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD CHATQUEUE BUTTON --\x3e\n</div>'),e.put("app/main/apps/chat/views/chatQueues/create/dialog.html",'<md-dialog class="chatQueue-dialog" aria-label="New ChatQueue">\n    <form name="chatQueueForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.chatQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newChatQueue">\n                <div class="hint"><span translate="CHAT.HELP.NAME"></span></div>\n                <div ng-messages="chatQueueForm[\'name\'].$error" ng-show="chatQueueForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="CHAT.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.STRATEGY">Strategy</label>\n                <md-select name="strategy" ng-model="vm.chatQueue.strategy" required>\n                    <md-option ng-value="\'beepall\'">Beepall</md-option>\n                    <md-option ng-value="\'rrmemory\'">RR Memory</md-option>\n                </md-select>\n                <div ng-messages="chatQueueForm[\'strategy\'].$error" ng-show="chatQueueForm[\'strategy\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.AGENT_TIMEOUT">Agent_Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.chatQueue.timeout" min="1" max="2147483" ng-required="true">\n                <div ng-messages="chatQueueForm[\'timeout\'].$error" ng-show="chatQueueForm[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.AGENT_TIMEOUT_REQUIRED">Agent_Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="CHAT.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="CHAT.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.chatQueue.description">\n                <div ng-messages="chatQueueForm[\'description\'].$error" ng-show="chatQueueForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newChatQueue" ng-click="vm.saveChatQueue()" class="send-button md-accent md-raised" ng-disabled="chatQueueForm.$invalid || chatQueueForm.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newChatQueue" ng-click="vm.addNewChatQueue()" class="send-button md-accent md-raised" ng-disabled="chatQueueForm.$invalid" aria-label="ADD" translate="CHAT.ADD_CHATQUEUE" translate-attr-aria-label="CHAT.ADD_CHATQUEUE">\n                    ADD CHATQUEUE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newChatQueue" ng-click="vm.deleteChatQueue($event)" aria-label="DELETE" translate translate-attr-aria-label="CHAT.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CHAT.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatQueues/edit/agentadd/agentadd.html",'<md-dialog class="chatQueue-dialog" aria-label="chatQueue">\n    <form name="chatQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="CHAT.AGENTADD_CHATQUEUE">Add Agent to chatQueue</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatQueues/edit/teamadd/teamadd.html",'<md-dialog class="chatQueue-dialog" aria-label="chatQueue">\n    <form name="chatQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="CHAT.TEAMADD_CHATQUEUE">Add Team in CHATQUEUE</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatQueues/edit/view.html",'<div id="chat-chatQueue" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-chatQueues-button md-icon-button" aria-label="Go to chatQueues" ng-click="vm.gotoChatQueues()" translate translate-attr-aria-label="CHAT.GO_TO_CHATQUEUES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="chatQueue-image" hide-xs>\n                    <img ng-src="assets/images/business/chatQueues.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.chatQueue.id}}\n                        <span ng-if="vm.chatQueue.name">{{vm.chatQueue.name}}</span>\n                        <span ng-if="vm.chatQueue.exten">{{vm.chatQueue.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="CHAT.CREATED_AT"></span> <span>{{vm.chatQueue.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.teamadddialog(vm.chatQueue, $event)" class="md-fab md-orange-500-bg md-icon-button" aria-label="teamadd">\n                <md-tooltip><span translate="CHAT.TEAMADD_CHATQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-multiple-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.agentadddialog(vm.chatQueue, $event)" class="md-fab md-purple-500-bg md-icon-button" aria-label="agentadd">\n                <md-tooltip><span translate="CHAT.AGENTADD_CHATQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-plus"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveChatQueue()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid)" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CHAT.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="chatQueue-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="CHAT.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.chatQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="CHAT.HELP.NAME"></span></div>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="CHAT.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.STRATEGY">Strategy</label>\n                                <md-select name="strategy" ng-model="vm.chatQueue.strategy" required>\n                                    <md-option ng-value="\'beepall\'">Beepall</md-option>\n                                    <md-option ng-value="\'rrmemory\'">RR Memory</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'strategy\'].$error" ng-show="generalForm[\'strategy\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.AGENT_TIMEOUT">Agent_Timeout</label>\n                                <input type="number" name="timeout" ng-model="vm.chatQueue.timeout" min="1" max="2147483" ng-required="true">\n                                <div ng-messages="generalForm[\'timeout\'].$error" ng-show="generalForm[\'timeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.AGENT_TIMEOUT_REQUIRED">Agent_Timeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="CHAT.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="CHAT.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.chatQueue.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/chat/views/chatWebsites/chatWebsites.html",'<div id="chatWebsites" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-hangouts" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="CHAT.CHATWEBSITES">ChatWebsites</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="CHAT.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedChatWebsites.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedChatWebsites =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="CHAT.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-chatWebsites-count">\n                    <span>{{vm.selectedChatWebsites.length}}</span>\n                <span translate="CHAT.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="CHATWEBSITES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllChatWebsites()" translate="CHAT.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectChatWebsites()" translate="CHAT.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedChatWebsites" csv-label="true" filename="chatWebsites.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedChatWebsites($event)" aria-label="delete selected" translate translate-attr-label="CHATWEBSITES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- CHATWEBSITE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedChatWebsites" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getChatWebsites">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'CHAT.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'CHAT.NAME\' | translate }}</th>\n                                <th md-column md-order-by="key">{{ \'CHAT.KEY\' | translate }}</th>\n                                <th md-column md-order-by="address">{{ \'CHAT.MOTIONADDRESS\' | translate }}</th>\n                                <th md-column md-order-by="remote">{{ \'CHAT.MOTIONPROXY\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'CHAT.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.chatWebsites.rows.length">\n                                <td md-cell colspan="7">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="CHAT.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="chatWebsite" md-select-id="id" ng-repeat="chatWebsite in vm.chatWebsites.rows">\n                                <td md-cell ng-if="chatWebsite.userpic"><img class="avatar" alt="{{chatWebsite.name}}" ng-src="api/users/{{chatWebsite.id}}/avatar" /></td>\n                                <td md-cell ng-if="!chatWebsite.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{chatWebsite.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditChatWebsite($event, chatWebsite)" md-cell class="id ">{{chatWebsite.id}}</td>\n                                <td ng-click="vm.createOrEditChatWebsite($event, chatWebsite)" md-cell class="name ">{{chatWebsite.name}}</td>\n                                <td ng-click="vm.createOrEditChatWebsite($event, chatWebsite)" md-cell class="key ">{{chatWebsite.key}}</td>\n                                <td ng-click="vm.createOrEditChatWebsite($event, chatWebsite)" md-cell class="address ">{{chatWebsite.address}}</td>\n                                <td ng-click="vm.createOrEditChatWebsite($event, chatWebsite)" md-cell class="remote ">{{chatWebsite.remote}}</td>\n                                <td ng-click="vm.createOrEditChatWebsite($event, chatWebsite)" md-cell class="description ">{{chatWebsite.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CHAT.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(chatWebsite, $event)" translate="CHAT.EDIT_CHATWEBSITE">\n                                                    Edit ChatWebsite\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.interactionsgoto(chatWebsite, $event)" translate="CHAT.INTERACTIONS_CHATWEBSITE">\n                                                    Interactions ChatWebsite\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.offlinemessagesgoto(chatWebsite, $event)" translate="CHAT.OFFLINEMESSAGES_CHATWEBSITE">\n                                                    OfflineMessages ChatWebsite\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(chatWebsite, $event)" translate="CHAT.DELETE_CHATWEBSITE">\n                                                    Delete ChatWebsite\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'CHAT.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CHAT.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CHAT.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.chatWebsites.count}}" md-on-paginate="vm.getChatWebsites" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / CHATWEBSITE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD CHATWEBSITE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-chatWebsite-button" ng-click="vm.createOrEditChatWebsite($event)" aria-label="add chatWebsite" translate translate-attr-aria-label="CHAT.ADD_CHATWEBSITE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD CHATWEBSITE BUTTON --\x3e\n</div>'),e.put("app/main/apps/chat/views/chatWebsites/create/dialog.html",'<md-dialog class="chatWebsite-dialog" aria-label="New ChatWebsite">\n    <form name="chatWebsiteForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.chatWebsite.name" ng-required="true" autofocus ng-disabled="!vm.newChatWebsite">\n                <div ng-messages="chatWebsiteForm[\'name\'].$error" ng-show="chatWebsiteForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.KEY">key</label>\n                <input type="text" name="key" ng-model="vm.chatWebsite.key" md-maxlength="5" ng-required="true">\n                <div ng-messages="chatWebsiteForm[\'key\'].$error" ng-show="chatWebsiteForm[\'key\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.KEY_REQUIRED">key field is required</span>\n                    </div>\n\n                    <div ng-message="md-maxlength">\n                        <span translate="CHAT.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 5}\'>key must have a maximum length equal to 5</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.MOTIONADDRESS">MotionAddress</label>\n                <input type="url" name="address" ng-model="vm.chatWebsite.address" md-maxlength="255" ng-required="true">\n                <div ng-messages="chatWebsiteForm[\'address\'].$error" ng-show="chatWebsiteForm[\'address\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.MOTIONADDRESS_REQUIRED">MotionAddress field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="CHAT.ERRORS.MOTIONADDRESS_MUST_VALID_URL">MotionAddress must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                    <div ng-message="md-maxlength">\n                        <span translate="CHAT.ERRORS.MOTIONADDRESS_MAX_LENGTH" translate-values=\'{max: 255}\'>MotionAddress must have a maximum length equal to 255</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.MOTIONPROXY">MotionProxy</label>\n                <input type="url" name="remote" ng-model="vm.chatWebsite.remote" md-maxlength="255" ng-required="true">\n                <div class="hint"><span translate="CHAT.HELP.MOTIONPROXY"></span></div>\n                <div ng-messages="chatWebsiteForm[\'remote\'].$error" ng-show="chatWebsiteForm[\'remote\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.MOTIONPROXY_REQUIRED">MotionProxy field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="CHAT.ERRORS.MOTIONPROXY_MUST_VALID_URL">MotionProxy must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                    <div ng-message="md-maxlength">\n                        <span translate="CHAT.ERRORS.MOTIONPROXY_MAX_LENGTH" translate-values=\'{max: 255}\'>MotionProxy must have a maximum length equal to 255</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.LIST">List</label>\n                <md-select name="ListId" ng-model="vm.chatWebsite.ListId" required>\n                    <md-option ng-value="ListId.id" ng-repeat="ListId in vm.lists">{{ ListId.name }}</md-option>\n                </md-select>\n                <div class="hint"><span translate="CHAT.HELP.LIST"></span></div>\n                <div ng-messages="chatWebsiteForm[\'ListId\'].$error" ng-show="chatWebsiteForm[\'ListId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.LIST_REQUIRED">List field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.INTERVAL">Interval</label>\n                <md-select name="IntervalId" ng-model="vm.chatWebsite.IntervalId">\n                    <md-option ng-value="IntervalId.id" ng-repeat="IntervalId in vm.interval">{{ IntervalId.name }}</md-option>\n                    <md-option ng-value="null">Always</md-option>\n                </md-select>\n                <div ng-messages="chatWebsiteForm[\'IntervalId\'].$error" ng-show="chatWebsiteForm[\'IntervalId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.INTERVAL_REQUIRED">Interval field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.chatWebsite.description">\n                <div ng-messages="chatWebsiteForm[\'description\'].$error" ng-show="chatWebsiteForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newChatWebsite" ng-click="vm.saveChatWebsite()" class="send-button md-accent md-raised" ng-disabled="chatWebsiteForm.$invalid || chatWebsiteForm.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newChatWebsite" ng-click="vm.addNewChatWebsite()" class="send-button md-accent md-raised" ng-disabled="chatWebsiteForm.$invalid" aria-label="ADD" translate="CHAT.ADD_CHATWEBSITE" translate-attr-aria-label="CHAT.ADD_CHATWEBSITE">\n                    ADD CHATWEBSITE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newChatWebsite" ng-click="vm.deleteChatWebsite($event)" aria-label="DELETE" translate translate-attr-aria-label="CHAT.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CHAT.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/apps/agent/dialog.html",'<md-dialog class="chatWebsite-dialog" aria-label="New ChatWebsite">\n    <form name="chatWebsiteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.AGENT">Agent</label>\n                <md-select name="agent" ng-model="vm.agent.agent" required autofocus>\n                    <md-option ng-value="agent.name" ng-repeat="agent in vm.agents">{{ agent.name }}</md-option>\n                </md-select>\n                <div ng-messages="chatWebsiteFormApp[\'agent\'].$error" ng-show="chatWebsiteFormApp[\'agent\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.AGENT_REQUIRED">Agent field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.agent.timeout" min="0" max="2147483" ng-required="true">\n                <div ng-messages="chatWebsiteFormApp[\'timeout\'].$error" ng-show="chatWebsiteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="CHAT.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="CHAT.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveChatWebsiteApp()" class="send-button md-accent md-raised" ng-disabled="chatWebsiteFormApp.$invalid || chatWebsiteFormApp.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/apps/autoreply/dialog.html",'<md-dialog class="chatWebsite-dialog" aria-label="New ChatWebsite">\n    <form name="chatWebsiteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.TIMES">times</label>\n                <md-select name="times" ng-model="vm.autoreply.times" required autofocus>\n                    <md-option ng-value="1">One Time</md-option>\n                    <md-option ng-value="0">Always</md-option>\n                </md-select>\n                <div ng-messages="chatWebsiteFormApp[\'times\'].$error" ng-show="chatWebsiteFormApp[\'times\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.TIMES_REQUIRED">times field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.TEXT">Text</label>\n                <textarea name="text" ng-model="vm.autoreply.text" md-maxlength="255" required></textarea>\n\n                <div ng-messages="chatWebsiteFormApp[\'text\'].$error" ng-show="chatWebsiteFormApp[\'text\'].$touched" role="alert">\n\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.TEXT_REQUIRED">Text field is required</span>\n                    </div>\n\n\n                    <div ng-message="md-maxlength">\n                        <span translate="CHAT.ERRORS.TEXT_MAX_LENGTH" translate-values=\'{max: 255}\'>Text must have a maximum length equal to 255</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveChatWebsiteApp()" class="send-button md-accent md-raised" ng-disabled="chatWebsiteFormApp.$invalid || chatWebsiteFormApp.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/apps/close/dialog.html",'<md-dialog class="chatWebsite-dialog" aria-label="New ChatWebsite">\n    <form name="chatWebsiteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.DISPOSITION">Disposition</label>\n                <input type="text" name="disposition" ng-model="vm.close.disposition" ng-required="true" autofocus>\n                <div ng-messages="chatWebsiteFormApp[\'disposition\'].$error" ng-show="chatWebsiteFormApp[\'disposition\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.DISPOSITION_REQUIRED">Disposition field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveChatWebsiteApp()" class="send-button md-accent md-raised" ng-disabled="chatWebsiteFormApp.$invalid || chatWebsiteFormApp.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/apps/gotoif/dialog.html",'<md-dialog class="chatWebsite-dialog" aria-label="New ChatWebsite">\n    <form name="chatWebsiteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.CONDITION">Condition</label>\n                <input type="text" name="condition" ng-model="vm.gotoif.condition" ng-required="true" autofocus>\n                <div ng-messages="chatWebsiteFormApp[\'condition\'].$error" ng-show="chatWebsiteFormApp[\'condition\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.CONDITION_REQUIRED">Condition field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.TRUEPRIORITY">truepriority</label>\n                <input type="number" name="truepriority" ng-model="vm.gotoif.truepriority" min="1" ng-required="true">\n                <div ng-messages="chatWebsiteFormApp[\'truepriority\'].$error" ng-show="chatWebsiteFormApp[\'truepriority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.TRUEPRIORITY_REQUIRED">truepriority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="CHAT.ERRORS.TRUEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">truepriority must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.FALSEPRIORITY">falsepriority</label>\n                <input type="number" name="falsepriority" ng-model="vm.gotoif.falsepriority" min="1" ng-required="true">\n                <div ng-messages="chatWebsiteFormApp[\'falsepriority\'].$error" ng-show="chatWebsiteFormApp[\'falsepriority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.FALSEPRIORITY_REQUIRED">falsepriority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="CHAT.ERRORS.FALSEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">falsepriority must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveChatWebsiteApp()" class="send-button md-accent md-raised" ng-disabled="chatWebsiteFormApp.$invalid || chatWebsiteFormApp.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/apps/gotop/dialog.html",'<md-dialog class="chatWebsite-dialog" aria-label="New ChatWebsite">\n    <form name="chatWebsiteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.PRIORITY">Priority</label>\n                <input type="number" name="priority" ng-model="vm.gotop.priority" min="0" ng-required="true" autofocus>\n                <div ng-messages="chatWebsiteFormApp[\'priority\'].$error" ng-show="chatWebsiteFormApp[\'priority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.PRIORITY_REQUIRED">Priority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="CHAT.ERRORS.PRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Priority must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveChatWebsiteApp()" class="send-button md-accent md-raised" ng-disabled="chatWebsiteFormApp.$invalid || chatWebsiteFormApp.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/apps/interval/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select ng-model="vm.type">\n                    <md-option ng-value="type" ng-repeat=\'type in vm.types\'>{{ type | ucfirst }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.type === \'list\'">\n                <label translate="TOOLS.INTERVALS">Intervals</label>\n                <md-select ng-model="vm.interval.IntervalId">\n                    <md-option ng-value="interval.id" ng-repeat="interval in vm.intervals.rows">{{ interval.name }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            \x3c!-- TIMERANGE START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.TIME_RANGE">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <div class="md-block" flex>\n                    <mdp-time-picker name="timeRangeFrom" mdp-placeholder="FROM" ng-model="vm.timeRangeFrom" mdp-format="HH:mm" mdp-auto-switch="true">\n                        <div ng-messages="intervalForm.timeRangeFrom.$error" ng-show="intervalForm.timeRangeFrom.$touched" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_FROM_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n                <div class="md-block" flex ng-if="vm.timeRangeFrom">\n                    <mdp-time-picker name="timeRangeTo" mdp-placeholder="TO*" ng-model="vm.timeRangeTo" mdp-format="HH:mm" mdp-auto-switch="true" required>\n                        <div ng-messages="intervalForm.timeRangeTo.$error" ng-show="intervalForm.timeRangeTo.$invalid" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_INVALID">Time Range To field is invalid</span>\n                            </div>\n                            <div ng-message="required">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_REQUIRED">Time Range To field is required</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n            \x3c!-- TIMERANGE END --\x3e\n\n            \x3c!-- DAYSOFWEEK START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.WEEK_DAYS">Week Days</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.dayOfWeekFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex class="md-block" ng-if="vm.dayOfWeekFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="dayOfWeekTo" ng-model="vm.dayOfWeekTo">\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.dayOfWeekTo.$error" ng-show="intervalForm.dayOfWeekTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- DAYSOFWEEK END --\x3e\n\n            \x3c!-- MONTHDAY START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTH_DAYS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthDayFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthDayFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthDayTo" ng-model="vm.monthDayTo">\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthDayTo.$error" ng-show="intervalForm.monthDayTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTHDAY END --\x3e\n\n            \x3c!-- MONTH START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTHS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthTo" ng-model="vm.monthTo">\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthTo.$error" ng-show="intervalForm.monthTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTH END --\x3e\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/apps/noop/dialog.html",'<md-dialog class="chatWebsite-dialog" aria-label="New ChatWebsite">\n    <form name="chatWebsiteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.VALUE">Value</label>\n                <input type="text" name="value" ng-model="vm.noop.value" autofocus>\n                <div ng-messages="chatWebsiteFormApp[\'value\'].$error" ng-show="chatWebsiteFormApp[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveChatWebsiteApp()" class="send-button md-accent md-raised" ng-disabled="chatWebsiteFormApp.$invalid || chatWebsiteFormApp.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/apps/queue/dialog.html",'<md-dialog class="chatWebsite-dialog" aria-label="New ChatWebsite">\n    <form name="chatWebsiteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.QUEUE">Queue</label>\n                <md-select name="queue" ng-model="vm.queue.queue" required autofocus>\n                    <md-option ng-value="queue.name" ng-repeat="queue in vm.queues">{{ queue.name }}</md-option>\n                </md-select>\n                <div ng-messages="chatWebsiteFormApp[\'queue\'].$error" ng-show="chatWebsiteFormApp[\'queue\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.QUEUE_REQUIRED">Queue field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.queue.timeout" min="0" max="2147483" ng-required="true">\n                <div ng-messages="chatWebsiteFormApp[\'timeout\'].$error" ng-show="chatWebsiteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="CHAT.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="CHAT.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveChatWebsiteApp()" class="send-button md-accent md-raised" ng-disabled="chatWebsiteFormApp.$invalid || chatWebsiteFormApp.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/apps/system/dialog.html",'<md-dialog class="chatWebsite-dialog" aria-label="New ChatWebsite">\n    <form name="chatWebsiteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.COMMAND">Command</label>\n                <input type="text" name="command" ng-model="vm.system.command" ng-required="true" autofocus>\n                <div ng-messages="chatWebsiteFormApp[\'command\'].$error" ng-show="chatWebsiteFormApp[\'command\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.COMMAND_REQUIRED">Command field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.VARIABLE">Variable</label>\n                <md-select name="variable" ng-model="vm.system.variable">\n                    <md-option ng-value="variable.name" ng-repeat="variable in vm.variables">{{ variable.name }}</md-option>\n                    <md-option ng-value="\'\'">None</md-option>\n                </md-select>\n                <div ng-messages="chatWebsiteFormApp[\'variable\'].$error" ng-show="chatWebsiteFormApp[\'variable\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.VARIABLE_REQUIRED">Variable field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveChatWebsiteApp()" class="send-button md-accent md-raised" ng-disabled="chatWebsiteFormApp.$invalid || chatWebsiteFormApp.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/chatCannedAnswers/dialog.html",'<md-dialog class="chatCannedAnswer-dialog" aria-label="New ChatCannedAnswer">\n    <form name="chatCannedAnswerForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.KEY">Key</label>\n                <input type="" name="key" ng-model="vm.chatCannedAnswer.key" md-maxlength="255" ng-required="true" autofocus>\n                <div ng-messages="chatCannedAnswerForm[\'key\'].$error" ng-show="chatCannedAnswerForm[\'key\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.KEY_REQUIRED">Key field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.VALUE">Value</label>\n                <textarea name="value" ng-model="vm.chatCannedAnswer.value" required></textarea>\n\n                <div ng-messages="chatCannedAnswerForm[\'value\'].$error" ng-show="chatCannedAnswerForm[\'value\'].$touched" role="alert">\n\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.chatCannedAnswer.description">\n                <div ng-messages="chatCannedAnswerForm[\'description\'].$error" ng-show="chatCannedAnswerForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newChatCannedAnswer" ng-click="vm.saveChatCannedAnswer()" class="send-button md-accent md-raised" ng-disabled="chatCannedAnswerForm.$invalid || chatCannedAnswerForm.$pristine" aria-label="SAVE" translate="CHAT.SAVE"\n                    translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newChatCannedAnswer" ng-click="vm.addNewChatCannedAnswer()" class="send-button md-accent md-raised" ng-disabled="chatCannedAnswerForm.$invalid" aria-label="ADD" translate="CHAT.ADD_CHATCANNEDANSWER" translate-attr-aria-label="CHAT.ADD_CHATCANNEDANSWER">\n                    ADD CHATCANNEDANSWER\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newChatCannedAnswer" ng-click="vm.deleteChatCannedAnswer($event)" aria-label="DELETE" translate translate-attr-aria-label="CHAT.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CHAT.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/chatDispositions/dialog.html",'<md-dialog class="chatDisposition-dialog" aria-label="New ChatDisposition">\n    <form name="chatDispositionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.chatDisposition.name" md-maxlength="255" ng-required="true" autofocus>\n                <div ng-messages="chatDispositionForm[\'name\'].$error" ng-show="chatDispositionForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newChatDisposition" ng-click="vm.saveChatDisposition()" class="send-button md-accent md-raised" ng-disabled="chatDispositionForm.$invalid || chatDispositionForm.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newChatDisposition" ng-click="vm.addNewChatDisposition()" class="send-button md-accent md-raised" ng-disabled="chatDispositionForm.$invalid" aria-label="ADD" translate="CHAT.ADD_CHATDISPOSITION" translate-attr-aria-label="CHAT.ADD_CHATDISPOSITION">\n                    ADD CHATDISPOSITION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newChatDisposition" ng-click="vm.deleteChatDisposition($event)" aria-label="DELETE" translate translate-attr-aria-label="CHAT.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CHAT.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/offlineMessages/dialog.html",'<md-dialog class="offlineMessage-dialog" aria-label="New OfflineMessage">\n    <md-toolbar class="md-accent md-hue-2">\n        <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n            <span class="title">{{ vm.title | translate }}</span>\n            <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n            </md-button>\n        </div>\n    </md-toolbar>\n\n    <md-content flex layout-padding>\n        <pre>{{vm.message.body}}</pre>\n    </md-content>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/proactive/dialog.html",'<md-dialog class="chatProactiveAction-dialog" aria-label="New ChatProactiveAction">\n    <form name="chatProactiveActionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.chatProactiveAction.name" ng-required="true" autofocus>\n                <div ng-messages="chatProactiveActionForm[\'name\'].$error" ng-show="chatProactiveActionForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.chatProactiveAction.type">\n\n                    <md-option ng-value="\'mouseOver\'"> {{ \'CHAT.MOUSEOVER\' | translate }}</md-option>\n\n                    <md-option ng-value="\'timeout\'"> {{ \'CHAT.TIMEOUT\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="chatProactiveActionForm[\'type\'].$error" ng-show="chatProactiveActionForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.chatProactiveAction.type === \'mouseOver\'" class="md-block">\n                <label translate="CHAT.SELECTOR">Selector</label>\n                <input type="" name="selector" ng-model="vm.chatProactiveAction.selector" ng-required="true">\n                <div ng-messages="chatProactiveActionForm[\'selector\'].$error" ng-show="chatProactiveActionForm[\'selector\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.SELECTOR_REQUIRED">Selector field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.chatProactiveAction.type === \'timeout\'" class="md-block">\n                <label translate="CHAT.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.chatProactiveAction.timeout" min="1" ng-required="true">\n                <div ng-messages="chatProactiveActionForm[\'timeout\'].$error" ng-show="chatProactiveActionForm[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="CHAT.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newChatProactiveAction" ng-click="vm.saveChatProactiveAction()" class="send-button md-accent md-raised" ng-disabled="chatProactiveActionForm.$invalid || chatProactiveActionForm.$pristine" aria-label="SAVE" translate="CHAT.SAVE"\n                    translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newChatProactiveAction" ng-click="vm.addNewChatProactiveAction()" class="send-button md-accent md-raised" ng-disabled="chatProactiveActionForm.$invalid" aria-label="ADD" translate="CHAT.ADD_CHATPROACTIVEACTION" translate-attr-aria-label="CHAT.ADD_CHATPROACTIVEACTION">\n                    ADD CHATPROACTIVEACTION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newChatProactiveAction" ng-click="vm.deleteChatProactiveAction($event)" aria-label="DELETE" translate translate-attr-aria-label="CHAT.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CHAT.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/view.html",'<div id="chat-chatWebsite" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-chatWebsites-button md-icon-button" aria-label="Go to chatWebsites" ng-click="vm.gotoChatWebsites()" translate translate-attr-aria-label="CHAT.GO_TO_CHATWEBSITES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="chatWebsite-image" hide-xs>\n                    <img ng-src="assets/images/business/chatWebsites.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.chatWebsite.id}}\n                        <span ng-if="vm.chatWebsite.name">{{vm.chatWebsite.name}}</span>\n                        <span ng-if="vm.chatWebsite.exten">{{vm.chatWebsite.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="CHAT.CREATED_AT"></span> <span>{{vm.chatWebsite.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveChatWebsite()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (notificationForm.$invalid) || (scriptForm.$invalid) || (intervalForm.$invalid) || (appearanceForm.$invalid) || (onlinestatusForm.$invalid) || (offlinestatusForm.$invalid) || (closingformForm.$invalid) || (unmanagedstatusForm.$invalid) || (interactionForm.$invalid) || (whitelabelForm.$invalid) || (logoForm.$invalid) || (agentAvatarForm.$invalid) || (chatFormOnlineForm.$invalid) || (chatFormOfflineForm.$invalid) || (proactiveForm.$invalid) || (chatDispositionsForm.$invalid) || (chatCannedAnswersForm.$invalid) || (actionsForm.$invalid) || (interactionsForm.$invalid) || (offlineMessagesForm.$invalid)"\n                translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CHAT.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="chatWebsite-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="CHAT.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.chatWebsite.name" ng-required="true" autofocus ng-disabled="true">\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.KEY">key</label>\n                                <input type="text" name="key" ng-model="vm.chatWebsite.key" md-maxlength="5" ng-required="true">\n                                <div ng-messages="generalForm[\'key\'].$error" ng-show="generalForm[\'key\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.KEY_REQUIRED">key field is required</span>\n                                    </div>\n\n                                    <div ng-message="md-maxlength">\n                                        <span translate="CHAT.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 5}\'>key must have a maximum length equal to 5</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.MOTIONADDRESS">MotionAddress</label>\n                                <input type="url" name="address" ng-model="vm.chatWebsite.address" md-maxlength="255" ng-required="true">\n                                <div ng-messages="generalForm[\'address\'].$error" ng-show="generalForm[\'address\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.MOTIONADDRESS_REQUIRED">MotionAddress field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="CHAT.ERRORS.MOTIONADDRESS_MUST_VALID_URL">MotionAddress must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                    <div ng-message="md-maxlength">\n                                        <span translate="CHAT.ERRORS.MOTIONADDRESS_MAX_LENGTH" translate-values=\'{max: 255}\'>MotionAddress must have a maximum length equal to 255</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.LIST">List</label>\n                                <md-select name="ListId" ng-model="vm.chatWebsite.ListId" required>\n                                    <md-option ng-value="ListId.id" ng-repeat="ListId in vm.lists">{{ ListId.name }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="CHAT.HELP.LIST"></span></div>\n                                <div ng-messages="generalForm[\'ListId\'].$error" ng-show="generalForm[\'ListId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.LIST_REQUIRED">List field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.chatWebsite.fidelity" class="md-block">\n                                <label translate="CHAT.TIMEOUT">Timeout</label>\n                                <input type="number" name="timeout" ng-model="vm.chatWebsite.timeout" ng-required="true">\n                                <div ng-messages="generalForm[\'timeout\'].$error" ng-show="generalForm[\'timeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.WAITFORTHEASSIGNEDAGENT">WaitForTheAssignedAgent</label>\n                                <input type="number" name="waitForTheAssignedAgent" ng-model="vm.chatWebsite.waitForTheAssignedAgent" min="1" max="2147483" ng-required="true">\n                                <div ng-messages="generalForm[\'waitForTheAssignedAgent\'].$error" ng-show="generalForm[\'waitForTheAssignedAgent\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.WAITFORTHEASSIGNEDAGENT_REQUIRED">WaitForTheAssignedAgent field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="CHAT.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">WaitForTheAssignedAgent must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="CHAT.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_LESS_THAN_OR_EQUAL_TO">WaitForTheAssignedAgent must be a valid greater or equal than</span> <span>2147483</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.chatWebsite.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="chatWebsite-detail-form-container notification md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="CHAT.NOTIFICATION">NOTIFICATION</div>\n                        </div>\n                        <form name="notificationForm" novalidate>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.chatWebsite.notificationSound" aria-label="notificationSound"><span translate="CHAT.NOTIFICATIONSOUND">notificationSound</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.chatWebsite.notificationShake" aria-label="notificationShake"><span translate="CHAT.NOTIFICATIONSHAKE">notificationShake</span></md-switch>\n                            </md-input-container>\n                            <div class="md-block">\n                                <label class="md-caption grey-fg" translate="CHAT.NOTIFICATIONTEMPLATE">notificationTemplate</label>\n                                <textarea aria-label="notificationTemplate notificationTemplate" ckeditor="{ skin: \'office2013\', language: \'en\', allowedContent: true, extraPlugins: \'font,colorbutton,autoembed,autocorrect,googlethisterm,pastebase64\', toolbarGroups: [{ name: \'styles\', groups: [\'styles\'] }, { name: \'clipboard\', groups: [\'undo\'] }, { name: \'colors\', groups: [\'colors\'] }, { name: \'basicstyles\', groups: [\'basicstyles\'] }, { name: \'paragraph\', groups: [\'list\', \'indent\', \'align\'] }, { name: \'mode\' }], autocorrect_enabled: true, disableNativeSpellChecker: false, removePlugins: \'magicline\' }"\n                                    ng-model="vm.chatWebsite.notificationTemplate"></textarea>\n                            </div>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CHAT.ADVANCED">ADVANCED</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="chatWebsite-detail-form-container script md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="ChatWebsiteScriptController as vm_ac" ng-init="vm_ac.init(vm.chatWebsite)" class="content" md-background-bg>\n                            <div class="pb-16" layout="row" layout-align="start center">\n                                <div class="h2 secondary-text" translate="CHAT.SCRIPT">SCRIPT</div>\n                            </div>\n\n                            <form name="scriptForm" flex="100" novalidate>\n                                <md-input-container class="md-block">\n                                    <label translate="CHAT.TOKEN">Token</label>\n                                    <input type="text" name="token" ng-model="vm_ac.chatWebsite.token" autofocus ng-disabled="true">\n                                </md-input-container>\n                                <md-input-container class="md-block">\n                                    <label translate="CHAT.MOTIONPROXY">MotionProxy</label>\n                                    <input type="url" name="remote" ng-model="vm_ac.chatWebsite.remote" required>\n                                    <div class="hint"><span translate="CHAT.HELP.MOTIONPROXY"></span></div>\n                                    <div ng-messages="scriptForm[\'remote\'].$error" ng-show="scriptForm[\'remote\'].$touched" role="alert">\n                                        <div ng-message="required">\n                                            <span translate="CHAT.ERRORS.MOTIONPROXY_REQUIRED">Motion Proxy field is required</span>\n                                        </div>\n                                        <div ng-message="url">\n                                            <span translate="CHAT.ERRORS.MOTIONPROXY_MUST_VALID_URL">Motion Proxy must be a valid url e.g.: http://www.xcally.com</span>\n                                        </div>\n                                    </div>\n                                </md-input-container>\n                                <md-input-container class="md-block">\n                                    <label translate="CHAT.WEBSITESCRIPT">WebsiteScript</label>\n                                    <div>\n                                        <pre style="font-size: 13px;">\n            {{vm_ac.start}} {{vm_ac.script}} {{vm_ac.end}}\n          </pre>\n                                    </div>\n                                    <div class="hint"><span translate="CHAT.HELP.COPYSCRIPTTOCLIPBOARD"></span></div>\n                                </md-input-container>\n                            </form>\n                        </div>\n\n                    </div>\n                    <div class="chatWebsite-detail-form-container interval md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="CHAT.INTERVAL">INTERVAL</div>\n                        </div>\n                        <form name="intervalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.INTERVAL">Interval</label>\n                                <md-select name="IntervalId" ng-model="vm.chatWebsite.IntervalId" autofocus>\n                                    <md-option ng-value="IntervalId.id" ng-repeat="IntervalId in vm.interval">{{ IntervalId.name }}</md-option>\n                                    <md-option ng-value="null">Always</md-option>\n                                </md-select>\n                                <div ng-messages="intervalForm[\'IntervalId\'].$error" ng-show="intervalForm[\'IntervalId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.INTERVAL_REQUIRED">Interval field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.TIMEZONE">Timezone</label>\n                                <ms-timezone name="timezone" ng-model="vm.chatWebsite.timezone">\n                                    < <div class="hint"><span translate="CHAT.HELP.TIMEZONE"></span></div>\n                    <div ng-messages="intervalForm[\'timezone\'].$error" ng-show="intervalForm[timezone].$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="CHAT.ERRORS.TIMEZONE_REQUIRED">Timezone field is required</span>\n                        </div>\n                    </div>\n                    </md-input-container>\n\n                    </form>\n    </div>\n    </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="CHAT.SNIPPET">SNIPPET</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="chatWebsite-detail-form-container appearance md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="CHAT.APPEARANCE">APPEARANCE</div>\n                </div>\n                <form name="appearanceForm" novalidate>\n                    <div flex md-color-picker ng-model="vm.chatWebsite.color" label="{{\'CHAT.MAINCOLOR\' | translate}}" md-color-hex="true" md-color-rgb="false" md-color-hsl="false" md-color-history="false" md-color-material-palette="false" md-color-alpha-channel="false"\n                        open-on-input="true"></div>\n                    <div flex md-color-picker ng-model="vm.chatWebsite.color_button" label="{{\'CHAT.BUTTONCOLOR\' | translate}}" md-color-hex="true" md-color-rgb="false" md-color-hsl="false" md-color-history="false" md-color-material-palette="false" md-color-alpha-channel="false"\n                        open-on-input="true"></div>\n                    <div flex md-color-picker ng-model="vm.chatWebsite.textColor" label="{{\'CHAT.TEXTCOLOR\' | translate}}" md-color-hex="true" md-color-rgb="false" md-color-hsl="false" md-color-history="false" md-color-material-palette="false" md-color-alpha-channel="false"\n                        open-on-input="true"></div>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.FONTSIZE">fontSize</label>\n                        <input type="number" name="fontSize" ng-model="vm.chatWebsite.fontSize" min="0" ng-required="true">\n                        <div ng-messages="appearanceForm[\'fontSize\'].$error" ng-show="appearanceForm[\'fontSize\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.FONTSIZE_REQUIRED">fontSize field is required</span>\n                            </div>\n                            <div ng-message="min">\n                                <span translate="CHAT.ERRORS.FONTSIZE_MUST_BE_GREATER_THAN_OR_EQUAL_TO">fontSize must be a valid greater or equal than</span> <span>0</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.HEADERSHAPE">headershape</label>\n                        <md-select name="header_shape" ng-model="vm.chatWebsite.header_shape">\n\n                            <md-option ng-value="\'rounded\'"> {{ \'CHAT.ROUNDED\' | translate }}</md-option>\n\n                            <md-option ng-value="\'squared\'"> {{ \'CHAT.SQUARED\' | translate }}</md-option>\n                        </md-select>\n                        <div ng-messages="appearanceForm[\'header_shape\'].$error" ng-show="appearanceForm[\'header_shape\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.HEADERSHAPE_REQUIRED">headershape field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.showAgentAvatar" aria-label="ShowAgentAvatar"><span translate="CHAT.SHOWAGENTAVATAR">ShowAgentAvatar</span></md-switch>\n                    </md-input-container>\n\n                </form>\n            </div>\n            <div class="chatWebsite-detail-form-container onlinestatus md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="CHAT.ONLINESTATUS">ONLINESTATUS</div>\n                </div>\n                <form name="onlinestatusForm" novalidate>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.HEADER_ONLINE">header_online</label>\n                        <input type="text" name="header_online" ng-model="vm.chatWebsite.header_online" md-maxlength="255" autofocus>\n                        <div ng-messages="onlinestatusForm[\'header_online\'].$error" ng-show="onlinestatusForm[\'header_online\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.HEADER_ONLINE_REQUIRED">header_online field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.HEADER_ONLINE_MAX_LENGTH" translate-values=\'{max: 255}\'>header_online must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.START_CHAT_BUTTON">start_chat_button</label>\n                        <input type="text" name="start_chat_button" ng-model="vm.chatWebsite.start_chat_button" md-maxlength="255">\n                        <div ng-messages="onlinestatusForm[\'start_chat_button\'].$error" ng-show="onlinestatusForm[\'start_chat_button\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.START_CHAT_BUTTON_REQUIRED">start_chat_button field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.START_CHAT_BUTTON_MAX_LENGTH" translate-values=\'{max: 255}\'>start_chat_button must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n\n                </form>\n            </div>\n            <div class="chatWebsite-detail-form-container offlinestatus md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="CHAT.OFFLINESTATUS">OFFLINESTATUS</div>\n                </div>\n                <form name="offlinestatusForm" novalidate>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.hideWhenOffline" aria-label="hideWhenOffline"><span translate="CHAT.HIDEWHENOFFLINE">hideWhenOffline</span></md-switch>\n                        <div class="hint"><span translate="CHAT.HELP.HIDEWHENOFFLINE"></span></div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.HEADER_OFFLINE">header_offline</label>\n                        <input type="text" name="header_offline" ng-model="vm.chatWebsite.header_offline" md-maxlength="255">\n                        <div ng-messages="offlinestatusForm[\'header_offline\'].$error" ng-show="offlinestatusForm[\'header_offline\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.HEADER_OFFLINE_REQUIRED">header_offline field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.HEADER_OFFLINE_MAX_LENGTH" translate-values=\'{max: 255}\'>header_offline must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.OFFLINE_CHAT_BUTTON">offline_chat_button</label>\n                        <input type="text" name="offline_chat_button" ng-model="vm.chatWebsite.offline_chat_button" md-maxlength="255">\n                        <div ng-messages="offlinestatusForm[\'offline_chat_button\'].$error" ng-show="offlinestatusForm[\'offline_chat_button\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.OFFLINE_CHAT_BUTTON_REQUIRED">offline_chat_button field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.OFFLINE_CHAT_BUTTON_MAX_LENGTH" translate-values=\'{max: 255}\'>offline_chat_button must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.OFFLINEMESSAGESUBJECT">offlineMessageSubject</label>\n                        <input type="text" name="offlineMessageSubject" ng-model="vm.chatWebsite.offlineMessageSubject" md-maxlength="255">\n                        <div ng-messages="offlinestatusForm[\'offlineMessageSubject\'].$error" ng-show="offlinestatusForm[\'offlineMessageSubject\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.OFFLINEMESSAGESUBJECT_REQUIRED">offlineMessageSubject field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.OFFLINEMESSAGESUBJECT_MAX_LENGTH" translate-values=\'{max: 255}\'>offlineMessageSubject must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.OFFLINEMESSAGEBODY">offlineMessageBody</label>\n                        <input type="text" name="offlineMessageBody" ng-model="vm.chatWebsite.offlineMessageBody" md-maxlength="255">\n                        <div ng-messages="offlinestatusForm[\'offlineMessageBody\'].$error" ng-show="offlinestatusForm[\'offlineMessageBody\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.OFFLINEMESSAGEBODY_REQUIRED">offlineMessageBody field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.OFFLINEMESSAGEBODY_MAX_LENGTH" translate-values=\'{max: 255}\'>offlineMessageBody must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n\n                </form>\n            </div>\n            <div class="chatWebsite-detail-form-container closingform md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="CHAT.CLOSINGFORM">CLOSINGFORM</div>\n                </div>\n                <form name="closingformForm" novalidate>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.CLOSINGMESSAGE">closingMessage</label>\n                        <textarea name="closingMessage" ng-model="vm.chatWebsite.closingMessage" md-maxlength="255" required autofocus></textarea>\n\n                        <div ng-messages="closingformForm[\'closingMessage\'].$error" ng-show="closingformForm[\'closingMessage\'].$touched" role="alert">\n\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.CLOSINGMESSAGE_REQUIRED">closingMessage field is required</span>\n                            </div>\n\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.CLOSINGMESSAGE_MAX_LENGTH" translate-values=\'{max: 255}\'>closingMessage must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.SKIPMESSAGEBUTTON">skipMessageButton</label>\n                        <input type="text" name="skipMessageButton" ng-model="vm.chatWebsite.skipMessageButton" md-maxlength="255">\n                        <div ng-messages="closingformForm[\'skipMessageButton\'].$error" ng-show="closingformForm[\'skipMessageButton\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.SKIPMESSAGEBUTTON_REQUIRED">skipMessageButton field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.SKIPMESSAGEBUTTON_MAX_LENGTH" translate-values=\'{max: 255}\'>skipMessageButton must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.enableRating" aria-label="enableRating"><span translate="CHAT.ENABLERATING">enableRating</span></md-switch>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.chatWebsite.enableRating" class="md-block">\n                        <label translate="CHAT.RATINGTYPE">ratingType</label>\n                        <md-select name="ratingType" ng-model="vm.chatWebsite.ratingType">\n                            <md-option ng-value="\'star\'">Star</md-option>\n                            <md-option ng-value="\'thumb\'">Thumb</md-option>\n                        </md-select>\n                        <div ng-messages="closingformForm[\'ratingType\'].$error" ng-show="closingformForm[\'ratingType\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.RATINGTYPE_REQUIRED">ratingType field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.chatWebsite.enableRating && vm.chatWebsite.ratingType === \'star\'" class="md-block">\n                        <label translate="CHAT.RATINGSTARSNUMBER">ratingStarsNumber</label>\n                        <input type="number" name="ratingStarsNumber" ng-model="vm.chatWebsite.ratingStarsNumber" min="2" max="5" ng-required="true">\n                        <div ng-messages="closingformForm[\'ratingStarsNumber\'].$error" ng-show="closingformForm[\'ratingStarsNumber\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.RATINGSTARSNUMBER_REQUIRED">ratingStarsNumber field is required</span>\n                            </div>\n                            <div ng-message="min">\n                                <span translate="CHAT.ERRORS.RATINGSTARSNUMBER_MUST_BE_GREATER_THAN_OR_EQUAL_TO">ratingStarsNumber must be a valid greater or equal than</span> <span>2</span>\n                            </div>\n                            <div ng-message="max">\n                                <span translate="CHAT.ERRORS.RATINGSTARSNUMBER_MUST_BE_LESS_THAN_OR_EQUAL_TO">ratingStarsNumber must be a valid greater or equal than</span> <span>5</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.enableFeedback" aria-label="enableFeedback"><span translate="CHAT.ENABLEFEEDBACK">enableFeedback</span></md-switch>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.forwardTranscript" aria-label="forwardTranscript"><span translate="CHAT.FORWARDTRANSCRIPT">forwardTranscript</span></md-switch>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.chatWebsite.forwardTranscript" class="md-block">\n                        <label translate="CHAT.FORWARDTRANSCRIPTMESSAGE">forwardTranscriptMessage</label>\n                        <input type="text" name="forwardTranscriptMessage" ng-model="vm.chatWebsite.forwardTranscriptMessage" md-maxlength="255">\n                        <div ng-messages="closingformForm[\'forwardTranscriptMessage\'].$error" ng-show="closingformForm[\'forwardTranscriptMessage\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.FORWARDTRANSCRIPTMESSAGE_REQUIRED">forwardTranscriptMessage field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.FORWARDTRANSCRIPTMESSAGE_MAX_LENGTH" translate-values=\'{max: 255}\'>forwardTranscriptMessage must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.CLOSINGMESSAGEBUTTON">closingMessageButton</label>\n                        <input type="text" name="closingMessageButton" ng-model="vm.chatWebsite.closingMessageButton" md-maxlength="255" ng-required="true">\n                        <div ng-messages="closingformForm[\'closingMessageButton\'].$error" ng-show="closingformForm[\'closingMessageButton\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.CLOSINGMESSAGEBUTTON_REQUIRED">closingMessageButton field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.CLOSINGMESSAGEBUTTON_MAX_LENGTH" translate-values=\'{max: 255}\'>closingMessageButton must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n\n                </form>\n            </div>\n            <div class="chatWebsite-detail-form-container unmanagedstatus md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="CHAT.UNMANAGEDSTATUS">UNMANAGEDSTATUS</div>\n                </div>\n                <form name="unmanagedstatusForm" novalidate>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.autoclose" aria-label="autoclose"><span translate="CHAT.AUTOCLOSE">autoclose</span></md-switch>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.enableUnmanagedNote" aria-label="enableUnmanagedNote"><span translate="CHAT.ENABLEUNMANAGEDNOTE">enableUnmanagedNote</span></md-switch>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.UNMANAGEDMESSAGE">unmanagedMessage</label>\n                        <input type="text" name="unmanagedMessage" ng-model="vm.chatWebsite.unmanagedMessage" md-maxlength="255">\n                        <div ng-messages="unmanagedstatusForm[\'unmanagedMessage\'].$error" ng-show="unmanagedstatusForm[\'unmanagedMessage\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.UNMANAGEDMESSAGE_REQUIRED">unmanagedMessage field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.UNMANAGEDMESSAGE_MAX_LENGTH" translate-values=\'{max: 255}\'>unmanagedMessage must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.SKIPUNMANAGED">skipUnmanaged</label>\n                        <input type="text" name="skipUnmanaged" ng-model="vm.chatWebsite.skipUnmanaged" md-maxlength="255">\n                        <div ng-messages="unmanagedstatusForm[\'skipUnmanaged\'].$error" ng-show="unmanagedstatusForm[\'skipUnmanaged\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.SKIPUNMANAGED_REQUIRED">skipUnmanaged field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.SKIPUNMANAGED_MAX_LENGTH" translate-values=\'{max: 255}\'>skipUnmanaged must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.chatWebsite.enableUnmanagedNote" class="md-block">\n                        <label translate="CHAT.SENDUNMANAGED">sendUnmanaged</label>\n                        <input type="text" name="sendUnmanaged" ng-model="vm.chatWebsite.sendUnmanaged" md-maxlength="255" ng-required="true">\n                        <div ng-messages="unmanagedstatusForm[\'sendUnmanaged\'].$error" ng-show="unmanagedstatusForm[\'sendUnmanaged\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.SENDUNMANAGED_REQUIRED">sendUnmanaged field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.SENDUNMANAGED_MAX_LENGTH" translate-values=\'{max: 255}\'>sendUnmanaged must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n\n                </form>\n            </div>\n            <div class="chatWebsite-detail-form-container interaction md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="CHAT.INTERACTION">INTERACTION</div>\n                </div>\n                <form name="interactionForm" novalidate>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.AGENTIDENTIFIER">agentIdentifier</label>\n                        <md-select name="agentIdentifier" ng-model="vm.chatWebsite.agentIdentifier" autofocus>\n\n                            <md-option ng-value="\'website_alias\'"> {{ \'CHAT.WEBSITEALIAS\' | translate }}</md-option>\n\n                            <md-option ng-value="\'agent_alias\'"> {{ \'CHAT.AGENTALIAS\' | translate }}</md-option>\n\n                            <md-option ng-value="\'agent_fullname\'"> {{ \'CHAT.AGENTFULLNAME\' | translate }}</md-option>\n                        </md-select>\n                        <div class="hint"><span translate="CHAT.HELP.AGENTIDENTIFIER"></span></div>\n                        <div ng-messages="interactionForm[\'agentIdentifier\'].$error" ng-show="interactionForm[\'agentIdentifier\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.AGENTIDENTIFIER_REQUIRED">agentIdentifier field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.chatWebsite.agentIdentifier === \'website_alias\'" class="md-block">\n                        <label translate="CHAT.WEBSITEALIAS">WebsiteAlias</label>\n                        <input type="text" name="agentAlias" ng-model="vm.chatWebsite.agentAlias" md-maxlength="255">\n                        <div class="hint"><span translate="CHAT.HELP.WEBSITEALIAS"></span></div>\n                        <div ng-messages="interactionForm[\'agentAlias\'].$error" ng-show="interactionForm[\'agentAlias\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.WEBSITEALIAS_REQUIRED">WebsiteAlias field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.WEBSITEALIAS_MAX_LENGTH" translate-values=\'{max: 255}\'>WebsiteAlias must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.CLOSINGQUESTION">closingQuestion</label>\n                        <input type="text" name="closingQuestion" ng-model="vm.chatWebsite.closingQuestion" md-maxlength="255">\n                        <div ng-messages="interactionForm[\'closingQuestion\'].$error" ng-show="interactionForm[\'closingQuestion\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.CLOSINGQUESTION_REQUIRED">closingQuestion field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.CLOSINGQUESTION_MAX_LENGTH" translate-values=\'{max: 255}\'>closingQuestion must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.FORMSUBMITSUCCESSMESSAGE">formSubmitSuccessMessage</label>\n                        <input type="text" name="formSubmitSuccessMessage" ng-model="vm.chatWebsite.formSubmitSuccessMessage" md-maxlength="255">\n                        <div ng-messages="interactionForm[\'formSubmitSuccessMessage\'].$error" ng-show="interactionForm[\'formSubmitSuccessMessage\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.FORMSUBMITSUCCESSMESSAGE_REQUIRED">formSubmitSuccessMessage field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.FORMSUBMITSUCCESSMESSAGE_MAX_LENGTH" translate-values=\'{max: 255}\'>formSubmitSuccessMessage must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.FORMSUBMITFAILUREMESSAGE">formSubmitFailureMessage</label>\n                        <input type="text" name="formSubmitFailureMessage" ng-model="vm.chatWebsite.formSubmitFailureMessage" md-maxlength="255">\n                        <div ng-messages="interactionForm[\'formSubmitFailureMessage\'].$error" ng-show="interactionForm[\'formSubmitFailureMessage\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.FORMSUBMITFAILUREMESSAGE_REQUIRED">formSubmitFailureMessage field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.FORMSUBMITFAILUREMESSAGE_MAX_LENGTH" translate-values=\'{max: 255}\'>formSubmitFailureMessage must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.enableCustomerWriting" aria-label="enableCustomerWriting"><span translate="CHAT.ENABLECUSTOMERWRITING">enableCustomerWriting</span></md-switch>\n                    </md-input-container>\n                    <md-input-container ng-if="!vm.chatWebsite.enableCustomerWriting" class="md-block">\n                        <label translate="CHAT.WAITINGTITLE">waitingTitle</label>\n                        <input type="text" name="waitingTitle" ng-model="vm.chatWebsite.waitingTitle" md-maxlength="255" ng-required="true">\n                        <div ng-messages="interactionForm[\'waitingTitle\'].$error" ng-show="interactionForm[\'waitingTitle\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.WAITINGTITLE_REQUIRED">waitingTitle field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.WAITINGTITLE_MAX_LENGTH" translate-values=\'{max: 255}\'>waitingTitle must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container ng-if="!vm.chatWebsite.enableCustomerWriting" class="md-block">\n                        <label translate="CHAT.WAITINGMESSAGE">waitingMessage</label>\n                        <textarea name="waitingMessage" ng-model="vm.chatWebsite.waitingMessage" md-maxlength="255" required></textarea>\n\n                        <div ng-messages="interactionForm[\'waitingMessage\'].$error" ng-show="interactionForm[\'waitingMessage\'].$touched" role="alert">\n\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.WAITINGMESSAGE_REQUIRED">waitingMessage field is required</span>\n                            </div>\n\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.WAITINGMESSAGE_MAX_LENGTH" translate-values=\'{max: 255}\'>waitingMessage must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.NOTETITLE">noteTitle</label>\n                        <input type="text" name="noteTitle" ng-model="vm.chatWebsite.noteTitle" md-maxlength="255">\n                        <div ng-messages="interactionForm[\'noteTitle\'].$error" ng-show="interactionForm[\'noteTitle\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.NOTETITLE_REQUIRED">noteTitle field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.NOTETITLE_MAX_LENGTH" translate-values=\'{max: 255}\'>noteTitle must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.PLACEHOLDERMESSAGE">placeholderMessage</label>\n                        <input type="text" name="placeholderMessage" ng-model="vm.chatWebsite.placeholderMessage" md-maxlength="255">\n                        <div ng-messages="interactionForm[\'placeholderMessage\'].$error" ng-show="interactionForm[\'placeholderMessage\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.PLACEHOLDERMESSAGE_REQUIRED">placeholderMessage field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.PLACEHOLDERMESSAGE_MAX_LENGTH" translate-values=\'{max: 255}\'>placeholderMessage must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.download_transcript" aria-label="downloadTranscript"><span translate="CHAT.DOWNLOADTRANSCRIPT">downloadTranscript</span></md-switch>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.enableCustomerAttachment" aria-label="enableCustomerAttachment"><span translate="CHAT.ENABLECUSTOMERATTACHMENT">enableCustomerAttachment</span></md-switch>\n                    </md-input-container>\n\n                </form>\n            </div>\n            <div ng-if="vm.license.custom" class="chatWebsite-detail-form-container whitelabel md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="CHAT.WHITELABEL">WHITELABEL</div>\n                </div>\n                <form name="whitelabelForm" novalidate>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.defaultWhiteLabel" aria-label="default"><span translate="CHAT.DEFAULT">default</span></md-switch>\n                    </md-input-container>\n                    <md-input-container ng-if="!vm.chatWebsite.defaultWhiteLabel" class="md-block">\n                        <label translate="CHAT.WHITELABEL">whiteLabel</label>\n                        <textarea name="whiteLabel" ng-model="vm.chatWebsite.whiteLabel" md-maxlength="255" required></textarea>\n\n                        <div ng-messages="whitelabelForm[\'whiteLabel\'].$error" ng-show="whitelabelForm[\'whiteLabel\'].$touched" role="alert">\n\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.WHITELABEL_REQUIRED">whiteLabel field is required</span>\n                            </div>\n\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.WHITELABEL_MAX_LENGTH" translate-values=\'{max: 255}\'>whiteLabel must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n\n                </form>\n            </div>\n            <div ng-if="vm.license.custom" class="chatWebsite-detail-form-container logo md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="CHAT.LOGO">LOGO</div>\n                </div>\n                <div ng-controller="ChatWebsitelogoController as vm_ca" ng-init="vm_ca.init(vm.chatWebsite)" class="chatWebsite-detail-form-container md-background-bg md-whiteframe-1dp">\n\n                    <div id="chatWebsite-image-uploader" flow-init="vm_ca.ngFlowOptions" flow-name="vm_ca.ngFlow.flow" flow-files-submitted="vm_ca.upload()" flow-file-added="vm_ca.fileAdded($file)" flow-file-success="vm_ca.fileSuccess($file, $message)" flow-complete="vm_ca.uploadComplete()"\n                        flow-drop flow-drag-enter="vm_ca.dropping=true" flow-drag-leave="vm_ca.dropping=false" ng-class="{\'dropping\':vm.dropping}">\n\n                        <div class="drop-text hint-text" layout="row" layout-align="center center">\n                            <span translate="EC.DROP_TO_UPLOAD">Drop to upload</span>\n                        </div>\n\n                        <div class="upload-button" layout="column" layout-align="center center">\n                            <md-button class="md-accent md-raised" flow-btn>\n                                Upload\n                            </md-button>\n                            <span class="secondary-text mt-8">You can also drop images here to upload. Only PNG, JPG - Max. 8MB</span>\n                        </div>\n\n                        <div layout="row" layout-align="start start" layout-wrap>\n                            <div ng-repeat="logoimage in vm_ca.chatWebsite.images" ng-switch="logoimage.type">\n                                <div class="chatWebsite-image uploading" ng-switch-when="uploading" layout="row" layout-align="center center">\n                                    <div class="overlay" layout="column" layout-align="center center">\n                                        <md-progress-linear md-mode="determinate" value="{{logoimage.file.progress() * 100}}">\n                                        </md-progress-linear>\n                                    </div>\n                                    <img class="media" flow-img="logoimage.file">\n                                </div>\n\n                                <div class="chatWebsite-image" ng-switch-when="image" layout="row" layout-align="center center">\n                                    <img class="media" ng-src="{{logoimage.url}}">\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n\n            </div>\n            <div class="chatWebsite-detail-form-container agentavatar md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="CHAT.AGENTAVATAR">AGENTAVATAR</div>\n                </div>\n                <div ng-controller="ChatWebsiteagentAvatarController as vm_ca" ng-init="vm_ca.init(vm.chatWebsite)" class="chatWebsite-detail-form-container md-background-bg md-whiteframe-1dp">\n\n                    <div id="chatWebsite-image-uploader" flow-init="vm_ca.ngFlowOptions" flow-name="vm_ca.ngFlow.flow" flow-files-submitted="vm_ca.upload()" flow-file-added="vm_ca.fileAdded($file)" flow-file-success="vm_ca.fileSuccess($file, $message)" flow-complete="vm_ca.uploadComplete()"\n                        flow-drop flow-drag-enter="vm_ca.dropping=true" flow-drag-leave="vm_ca.dropping=false" ng-class="{\'dropping\':vm.dropping}">\n\n                        <div class="drop-text hint-text" layout="row" layout-align="center center">\n                            <span translate="EC.DROP_TO_UPLOAD">Drop to upload</span>\n                        </div>\n\n                        <div class="upload-button" layout="column" layout-align="center center">\n                            <md-button class="md-accent md-raised" flow-btn>\n                                Upload\n                            </md-button>\n                            <span class="secondary-text mt-8">You can also drop images here to upload. Only PNG, JPG - Max. 8MB</span>\n                        </div>\n\n                        <div layout="row" layout-align="start start" layout-wrap>\n                            <div ng-repeat="agentAvatarimage in vm_ca.chatWebsite.images" ng-switch="agentAvatarimage.type">\n                                <div class="chatWebsite-image uploading" ng-switch-when="uploading" layout="row" layout-align="center center">\n                                    <div class="overlay" layout="column" layout-align="center center">\n                                        <md-progress-linear md-mode="determinate" value="{{agentAvatarimage.file.progress() * 100}}">\n                                        </md-progress-linear>\n                                    </div>\n                                    <img class="media" flow-img="agentAvatarimage.file">\n                                </div>\n\n                                <div class="chatWebsite-image" ng-switch-when="image" layout="row" layout-align="center center">\n                                    <img class="media" ng-src="{{agentAvatarimage.url}}">\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="CHAT.ONLINE">ONLINE</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="chatWebsite-detail-form-container chatformonline md-background-bg md-whiteframe-1dp">\n                <div ng-controller="ChatWebsiteonlineFormController as vm_fonc" ng-init="vm_fonc.init(vm.chatWebsite)" class="content" md-background-bg layout="column">\n                    <div flex>\n                        \x3c!-- START Buttons --\x3e\n                        <md-button aria-label="comment" class="md-fab md-mini" ng-click="vm_fonc.add(button.type)" ng-repeat="button in vm_fonc.buttons">\n                            <md-tooltip md-direction="top">{{button.name}}</md-tooltip>\n                            <md-icon md-font-icon="{{button.icon}}"></md-icon>\n                        </md-button>\n                        \x3c!-- END Buttons --\x3e\n                    </div>\n\n                    <div layout="row" flex>\n                        <div flex="50">\n                            <md-card>\n                                <md-card-title>\n                                    <md-card-title-text>\n                                        <div class="pb-16" layout="row" layout-align="start center">\n                                            <div class="h2 secondary-text" translate="CHAT.BUILDER">BUILDER</div>\n                                        </div>\n                                    </md-card-title-text>\n                                </md-card-title>\n                                <md-card-content>\n\n                                    <form name="onlineForm" novalidate>\n\n                                        \x3c!-- START MapKey --\x3e\n                                        <md-input-container class="md-block" ng-if="vm_fonc.chatWebsite.onlineForm.items.length">\n                                            <label translate="CHAT.HELP.MAPKEY">MapKey</label>\n                                            <md-select ng-model="vm_fonc.chatWebsite.mapKey">\n                                                <md-option ng-value="null">None</md-option>\n\n                                                <md-optgroup label="standard">\n                                                    <md-option ng-repeat="field in vm_fonc.fields" ng-value="field.key">{{ field.value }}</md-option>\n                                                </md-optgroup>\n\n                                                <md-optgroup label="custom" ng-if="vm_fonc.customFields.length">\n                                                    <md-option ng-repeat="field in vm_fonc.customFields" ng-value="field.key">{{ field.value }}</md-option>\n                                                </md-optgroup>\n                                            </md-select>\n                                        </md-input-container>\n                                        \x3c!-- END MapKey --\x3e\n\n                                        \x3c!-- START FromKey --\x3e\n                                        <md-input-container class="md-block" ng-if="vm_fonc.chatWebsite.onlineForm.items.length">\n                                            <label translate="CHAT.HELP.FROMKEY">FromKey</label>\n                                            <md-select ng-model="vm_fonc.chatWebsite.onlineForm.fromKey" md-selected-text="vm_fonc.chatWebsite.onlineForm.fromKey != null ? vm_fonc.chatWebsite.onlineForm.items[vm_fonc.chatWebsite.onlineForm.fromKey].props.title : \'None\'">\n                                                <md-option ng-value="null">None</md-option>\n                                                <md-option ng-repeat="item in vm_fonc.chatWebsite.onlineForm.items" ng-if="item.props.title" ng-value="$index">{{ item.props.title }}</md-option>\n                                            </md-select>\n                                        </md-input-container>\n                                        \x3c!-- END FromKey --\x3e\n\n                                        \x3c!-- START EXPANSION PANELS --\x3e\n                                        <md-expansion-panel ng-repeat="item in vm_fonc.chatWebsite.onlineForm.items track by $index" md-component-id="{{\'onlinePanel\' + $index}}">\n                                            <md-expansion-panel-collapsed md-no-sticky="true">\n                                                <md-button class="md-icon-button" aria-label="Down" ng-click="vm_fonc.down(item, $index); $event.stopPropagation()">\n                                                    <md-icon md-font-icon="icon-arrow-down-bold-circle-outline"></md-icon>\n                                                </md-button>\n                                                <md-button class="md-icon-button" aria-label="Up" ng-click="vm_fonc.up(item, $index); $event.stopPropagation()">\n                                                    <md-icon md-font-icon="icon-arrow-up-bold-circle-outline"></md-icon>\n                                                </md-button>\n\n                                                <div class="md-title">{{item.props.title || item.type}}</div>\n\n                                                <div flex></div>\n                                                <md-button class="md-icon-button" aria-label="Collapse" ng-click="$panel.collapse()">\n                                                    <md-icon md-font-icon="icon-chevron-down"></md-icon>\n                                                </md-button>\n                                            </md-expansion-panel-collapsed>\n\n                                            <md-expansion-panel-expanded>\n                                                <md-expansion-panel-header>\n                                                    <md-button class="md-icon-button" aria-label="Down" ng-click="vm_fonc.down(item, $index)">\n                                                        <md-icon md-font-icon="icon-arrow-down-bold-circle-outline"></md-icon>\n                                                    </md-button>\n                                                    <md-button class="md-icon-button" aria-label="Up" ng-click="vm_fonc.up(item, $index)">\n                                                        <md-icon md-font-icon="icon-arrow-up-bold-circle-outline"></md-icon>\n                                                    </md-button>\n\n                                                    <div class="md-title">{{item.props.title || item.type}}</div>\n\n                                                    <div flex></div>\n\n                                                    <md-button class="md-icon-button md-warn" aria-label="Remove" ng-click="vm_fonc.remove($index)">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                    <md-button class="md-icon-button" aria-label="Collapse" ng-click="$panel.collapse()">\n                                                        <md-icon md-font-icon="icon-chevron-up"></md-icon>\n                                                    </md-button>\n                                                </md-expansion-panel-header>\n\n                                                <md-expansion-panel-content>\n                                                    <form-item type="{{item.type}}" item="item" index="$index"></form-item>\n\n                                                    <md-input-container class="md-block">\n                                                        <label translate="CHAT.VARIABLE">Variable</label>\n                                                        <md-select ng-model="item.variable">\n                                                            <md-option ng-value="null">None</md-option>\n                                                            <md-option ng-repeat="variable in vm_fonc.variables" ng-value="variable.name">{{ variable.name }}</md-option>\n                                                        </md-select>\n                                                    </md-input-container>\n\n                                                    <md-input-container class="md-block">\n                                                        <label translate="CHAT.CM_FIELD">Contact Manager Field</label>\n                                                        <md-select ng-model="item.cmField">\n                                                            <md-option ng-value="null">None</md-option>\n\n                                                            <md-optgroup label="standard">\n                                                                <md-option ng-repeat="field in vm_fonc.fields" ng-value="field.key">{{ field.value }}</md-option>\n                                                            </md-optgroup>\n\n                                                            <md-optgroup label="custom" ng-if="vm_fonc.customFields.length">\n                                                                <md-option ng-repeat="field in vm_fonc.customFields" ng-value="field.key">{{ field.value }}</md-option>\n                                                            </md-optgroup>\n                                                        </md-select>\n                                                    </md-input-container>\n                                                </md-expansion-panel-content>\n\n                                            </md-expansion-panel-expanded>\n                                        </md-expansion-panel>\n                                        \x3c!-- END EXPANSION PANELS --\x3e\n                                    </form>\n\n                                </md-card-content>\n                            </md-card>\n                        </div>\n                        <div flex="50">\n                            <md-card>\n                                <md-card-title>\n                                    <md-card-title-text>\n                                        <div class="pb-16" layout="row" layout-align="start center">\n                                            <div class="h2 secondary-text" translate="CHAT.PREVIEW">PREVIEW</div>\n                                        </div>\n                                    </md-card-title-text>\n                                </md-card-title>\n                                <md-card-content flex>\n                                    <form-view form="vm_fonc.chatWebsite.onlineForm" flex="100"></form-view>\n                                </md-card-content>\n                            </md-card>\n                        </div>\n                    </div>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="CHAT.OFFLINE">OFFLINE</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="chatWebsite-detail-form-container chatformoffline md-background-bg md-whiteframe-1dp">\n                <div ng-controller="ChatWebsiteofflineFormController as vm_fonc" ng-init="vm_fonc.init(vm.chatWebsite)" class="content" md-background-bg layout="column">\n                    <div flex>\n                        \x3c!-- START Buttons --\x3e\n                        <md-button aria-label="comment" class="md-fab md-mini" ng-click="vm_fonc.add(button.type)" ng-repeat="button in vm_fonc.buttons">\n                            <md-tooltip md-direction="top">{{button.name}}</md-tooltip>\n                            <md-icon md-font-icon="{{button.icon}}"></md-icon>\n                        </md-button>\n                        \x3c!-- END Buttons --\x3e\n                    </div>\n\n                    <div layout="row" flex>\n                        <div flex="50">\n                            <md-card>\n                                <md-card-title>\n                                    <md-card-title-text>\n                                        <div class="pb-16" layout="row" layout-align="start center">\n                                            <div class="h2 secondary-text" translate="CHAT.BUILDER">BUILDER</div>\n                                        </div>\n                                    </md-card-title-text>\n                                </md-card-title>\n                                <md-card-content>\n\n                                    <form name="offlineForm" novalidate>\n                                        <md-input-container class="md-block">\n                                            <md-switch ng-model="vm_fonc.chatWebsite.forwardOffline" aria-label="forwardOffline"><span translate="CHAT.FORWARD_OFFLINE">forwardOffline</span></md-switch>\n                                        </md-input-container>\n\n                                        <md-input-container class="md-block" ng-if="vm_fonc.chatWebsite.forwardOffline">\n                                            <label translate="CHAT.FORWARD_OFFLINE_ADDRESS">FORWARD OFFLINE ADDRESS</label>\n                                            <input type="text" name="forwardOfflineAddress" ng-model="vm_fonc.chatWebsite.forwardOfflineAddress">\n                                            <div class="hint"><span translate="CHAT.HELP.FORWARD_OFFLINE"></span></div>\n                                            <div ng-messages="offlineForm[\'forwardOfflineAddress\'].$error" ng-show="offlineForm[\'forwardOfflineAddress\'].$touched" role="alert">\n                                                <div ng-message="email">\n                                                    <span translate="CHAT.ERRORS.EMAIL_MUST_BE_VALID">forwardOffline must be a valid e-mail address</span>\n                                                </div>\n                                            </div>\n                                        </md-input-container>\n\n                                        \x3c!-- START MapKey --\x3e\n                                        <md-input-container class="md-block" ng-if="vm_fonc.chatWebsite.offlineForm.items.length">\n                                            <label translate="CHAT.HELP.MAPKEY">MapKey</label>\n                                            <md-select ng-model="vm_fonc.chatWebsite.mapKeyOffline">\n                                                <md-option ng-value="null">None</md-option>\n\n                                                <md-optgroup label="standard">\n                                                    <md-option ng-repeat="field in vm_fonc.fields" ng-value="field.key">{{ field.value }}</md-option>\n                                                </md-optgroup>\n\n                                                <md-optgroup label="custom" ng-if="vm_fonc.customFields.length">\n                                                    <md-option ng-repeat="field in vm_fonc.customFields" ng-value="field.key">{{ field.value }}</md-option>\n                                                </md-optgroup>\n                                            </md-select>\n                                        </md-input-container>\n                                        \x3c!-- END MapKey --\x3e\n\n                                        \x3c!-- START FromKey --\x3e\n                                        <md-input-container class="md-block" ng-if="vm_fonc.chatWebsite.offlineForm.items.length">\n                                            <label translate="CHAT.HELP.FROMKEY">FromKey</label>\n                                            <md-select ng-model="vm_fonc.chatWebsite.offlineForm.fromKey" md-selected-text="vm_fonc.chatWebsite.offlineForm.fromKey != null ? vm_fonc.chatWebsite.offlineForm.items[vm_fonc.chatWebsite.offlineForm.fromKey].props.title : \'None\'">\n                                                <md-option ng-value="null">None</md-option>\n                                                <md-option ng-repeat="item in vm_fonc.chatWebsite.offlineForm.items" ng-if="item.props.title" ng-value="$index">{{ item.props.title }}</md-option>\n                                            </md-select>\n                                        </md-input-container>\n                                        \x3c!-- END FromKey --\x3e\n\n                                        \x3c!-- START EXPANSION PANELS --\x3e\n                                        <md-expansion-panel ng-repeat="item in vm_fonc.chatWebsite.offlineForm.items track by $index" md-component-id="{{\'offlinePanel\' + $index}}">\n                                            <md-expansion-panel-collapsed md-no-sticky="true">\n                                                <md-button class="md-icon-button" aria-label="Down" ng-click="vm_fonc.down(item, $index); $event.stopPropagation()">\n                                                    <md-icon md-font-icon="icon-arrow-down-bold-circle-outline"></md-icon>\n                                                </md-button>\n                                                <md-button class="md-icon-button" aria-label="Up" ng-click="vm_fonc.up(item, $index); $event.stopPropagation()">\n                                                    <md-icon md-font-icon="icon-arrow-up-bold-circle-outline"></md-icon>\n                                                </md-button>\n\n                                                <div class="md-title">{{item.props.title || item.type}}</div>\n\n                                                <div flex></div>\n                                                <md-button class="md-icon-button" aria-label="Collapse" ng-click="$panel.collapse()">\n                                                    <md-icon md-font-icon="icon-chevron-down"></md-icon>\n                                                </md-button>\n                                            </md-expansion-panel-collapsed>\n\n                                            <md-expansion-panel-expanded>\n                                                <md-expansion-panel-header>\n                                                    <md-button class="md-icon-button" aria-label="Down" ng-click="vm_fonc.down(item, $index)">\n                                                        <md-icon md-font-icon="icon-arrow-down-bold-circle-outline"></md-icon>\n                                                    </md-button>\n                                                    <md-button class="md-icon-button" aria-label="Up" ng-click="vm_fonc.up(item, $index)">\n                                                        <md-icon md-font-icon="icon-arrow-up-bold-circle-outline"></md-icon>\n                                                    </md-button>\n\n                                                    <div class="md-title">{{item.props.title || item.type}}</div>\n\n                                                    <div flex></div>\n\n                                                    <md-button class="md-icon-button md-warn" aria-label="Remove" ng-click="vm_fonc.remove($index)">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                    <md-button class="md-icon-button" aria-label="Collapse" ng-click="$panel.collapse()">\n                                                        <md-icon md-font-icon="icon-chevron-up"></md-icon>\n                                                    </md-button>\n                                                </md-expansion-panel-header>\n\n                                                <md-expansion-panel-content>\n                                                    <form-item type="{{item.type}}" item="item" index="$index"></form-item>\n\n\n                                                    <md-input-container class="md-block">\n                                                        <label translate="CHAT.CM_FIELD">Contact Manager Field</label>\n                                                        <md-select ng-model="item.cmField">\n                                                            <md-option ng-value="null">None</md-option>\n\n                                                            <md-optgroup label="standard">\n                                                                <md-option ng-repeat="field in vm_fonc.fields" ng-value="field.key">{{ field.value }}</md-option>\n                                                            </md-optgroup>\n\n                                                            <md-optgroup label="custom" ng-if="vm_fonc.customFields.length">\n                                                                <md-option ng-repeat="field in vm_fonc.customFields" ng-value="field.key">{{ field.value }}</md-option>\n                                                            </md-optgroup>\n                                                        </md-select>\n                                                    </md-input-container>\n                                                </md-expansion-panel-content>\n\n                                            </md-expansion-panel-expanded>\n                                        </md-expansion-panel>\n                                        \x3c!-- END EXPANSION PANELS --\x3e\n                                    </form>\n\n                                </md-card-content>\n                            </md-card>\n                        </div>\n                        <div flex="50">\n                            <md-card>\n                                <md-card-title>\n                                    <md-card-title-text>\n                                        <div class="pb-16" layout="row" layout-align="start center">\n                                            <div class="h2 secondary-text" translate="CHAT.PREVIEW">PREVIEW</div>\n                                        </div>\n                                    </md-card-title-text>\n                                </md-card-title>\n                                <md-card-content flex>\n                                    <form-view form="vm_fonc.chatWebsite.offlineForm" flex="100"></form-view>\n                                </md-card-content>\n                            </md-card>\n                        </div>\n                    </div>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="CHAT.PROACTIVEACTIONS">PROACTIVEACTIONS</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="chatWebsite-detail-form-container proactive md-background-bg md-whiteframe-1dp">\n                <div ng-controller="ChatWebsiteProactiveActionsController as vm_dc" ng-init="vm_dc.init(vm.chatWebsite)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedChatWebsiteProactiveActions.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="CHAT.PROACTIVEACTIONS">ProactiveActions</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                            <md-button class="md-icon-button" ng-click="vm_dc.createOrEditChatWebsiteChatProactiveAction($event)" aria-label="add chatProactiveAction" translate translate-attr-label="CHAT.ADD_CHATPROACTIVEACTION">\n                                <md-icon md-font-icon="icon-plus"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedChatWebsiteProactiveActions.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedChatWebsiteProactiveActions.length}} {{vm_dc.selectedChatWebsiteProactiveActions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedChatWebsiteProactiveActions" csv-label="true" filename="chatWebsites.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                            <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedChatWebsiteProactiveActions($event)" aria-label="delete selected" translate translate-attr-label="CHATWEBSITES.DELETE_SELECTED">\n                                <md-icon md-font-icon="icon-delete"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedChatWebsiteProactiveActions" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getChatWebsiteProactiveActions">\n                                <tr md-row>\n                                    <th md-column md-order-by="id">{{ \'CHAT.ID\' | translate }}</th>\n                                    <th md-column md-order-by="name">{{ \'CHAT.NAME\' | translate }}</th>\n                                    <th md-column md-order-by="type">{{ \'CHAT.TYPE\' | translate }}</th>\n                                    <th md-column md-order-by="selector">{{ \'CHAT.SELECTOR\' | translate }}</th>\n                                    <th md-column md-order-by="timeout">{{ \'CHAT.TIMEOUT\' | translate }}</th>\n                                    <th md-column md-order-by="createdAt">{{ \'CHAT.CREATED_AT\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="chatProactiveAction" md-select-id="id" ng-repeat="chatProactiveAction in vm_dc.chatWebsiteProactiveActions.rows">\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatProactiveAction($event, chatProactiveAction)" md-cell>{{chatProactiveAction.id}}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatProactiveAction($event, chatProactiveAction)" md-cell>{{chatProactiveAction.name}}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatProactiveAction($event, chatProactiveAction)" md-cell>{{ \'CHAT.\' + vm_dc.arraytype[chatProactiveAction.type].option | uppercase | translate }}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatProactiveAction($event, chatProactiveAction)" md-cell>{{chatProactiveAction.selector}}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatProactiveAction($event, chatProactiveAction)" md-cell>{{chatProactiveAction.timeout}}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatProactiveAction($event, chatProactiveAction)" md-cell>{{chatProactiveAction.createdAt | date:\'medium\'}}</td>\n                                    <td md-cell class="actions">\n                                        <md-menu>\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CHAT.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_dc.createOrEditChatWebsiteChatProactiveAction($event, chatProactiveAction)" translate="CHAT.EDIT_CHATPROACTIVEACTION">\n                                                        Edit ChatProactiveAction\n                                                    </md-button>\n                                                </md-menu-item>\n                                                <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                    <md-button ng-click="vm_dc.deleteConfirm(chatProactiveAction, $event)" translate="CHAT.DELETE_CHATPROACTIVEACTION">\n                                                        Delete ChatProactiveAction\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.chatWebsiteProactiveActions.rows.length">\n                                    <td md-cell colspan="8">\n                                        <span class="text-boxed-ligth" translate="CHAT.NO_CHATPROACTIVEACTION_AVAILABLE">No chatproactiveaction available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'CHAT.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CHAT.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CHAT.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                        md-total="{{vm_dc.chatWebsiteProactiveActions.count}}" md-on-paginate="vm_dc.getChatWebsiteProactiveActions" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="CHAT.DISPOSITIONS">DISPOSITIONS</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="chatWebsite-detail-form-container chatdispositions md-background-bg md-whiteframe-1dp">\n                <div ng-controller="ChatWebsiteChatDispositionsController as vm_dc" ng-init="vm_dc.init(vm.chatWebsite)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedChatWebsiteChatDispositions.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="CHAT.CHATDISPOSITIONS">ChatDispositions</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                            <md-button class="md-icon-button" ng-click="vm_dc.createOrEditChatWebsiteChatDisposition($event)" aria-label="add chatDisposition" translate translate-attr-label="CHAT.ADD_CHATDISPOSITION">\n                                <md-icon md-font-icon="icon-plus"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedChatWebsiteChatDispositions.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedChatWebsiteChatDispositions.length}} {{vm_dc.selectedChatWebsiteChatDispositions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedChatWebsiteChatDispositions" csv-label="true" filename="chatWebsites.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                            <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedChatWebsiteChatDispositions($event)" aria-label="delete selected" translate translate-attr-label="CHATWEBSITES.DELETE_SELECTED">\n                                <md-icon md-font-icon="icon-delete"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedChatWebsiteChatDispositions" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getChatWebsiteChatDispositions">\n                                <tr md-row>\n                                    <th md-column md-order-by="id">{{ \'CHAT.ID\' | translate }}</th>\n                                    <th md-column md-order-by="name">{{ \'CHAT.NAME\' | translate }}</th>\n                                    <th md-column md-order-by="createdAt">{{ \'CHAT.CREATED_AT\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="chatDisposition" md-select-id="id" ng-repeat="chatDisposition in vm_dc.chatWebsiteChatDispositions.rows">\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatDisposition($event, chatDisposition)" md-cell>{{chatDisposition.id}}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatDisposition($event, chatDisposition)" md-cell>{{chatDisposition.name}}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatDisposition($event, chatDisposition)" md-cell>{{chatDisposition.createdAt | date:\'medium\'}}</td>\n                                    <td md-cell class="actions">\n                                        <md-menu>\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CHAT.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_dc.createOrEditChatWebsiteChatDisposition($event, chatDisposition)" translate="CHAT.EDIT_CHATDISPOSITION">\n                                                        Edit ChatDisposition\n                                                    </md-button>\n                                                </md-menu-item>\n                                                <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                    <md-button ng-click="vm_dc.deleteConfirm(chatDisposition, $event)" translate="CHAT.DELETE_CHATDISPOSITION">\n                                                        Delete ChatDisposition\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.chatWebsiteChatDispositions.rows.length">\n                                    <td md-cell colspan="5">\n                                        <span class="text-boxed-ligth" translate="CHAT.NO_CHATDISPOSITION_AVAILABLE">No chatdisposition available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'CHAT.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CHAT.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CHAT.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                        md-total="{{vm_dc.chatWebsiteChatDispositions.count}}" md-on-paginate="vm_dc.getChatWebsiteChatDispositions" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="CHAT.CANNEDANSWERS">CANNEDANSWERS</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="chatWebsite-detail-form-container chatcannedanswers md-background-bg md-whiteframe-1dp">\n                <div ng-controller="ChatWebsiteChatCannedAnswersController as vm_dc" ng-init="vm_dc.init(vm.chatWebsite)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedChatWebsiteChatCannedAnswers.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="CHAT.CHATCANNEDANSWERS">ChatCannedAnswers</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                            <md-button class="md-icon-button" ng-click="vm_dc.createOrEditChatWebsiteChatCannedAnswer($event)" aria-label="add chatCannedAnswer" translate translate-attr-label="CHAT.ADD_CHATCANNEDANSWER">\n                                <md-icon md-font-icon="icon-plus"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedChatWebsiteChatCannedAnswers.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedChatWebsiteChatCannedAnswers.length}} {{vm_dc.selectedChatWebsiteChatCannedAnswers.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedChatWebsiteChatCannedAnswers" csv-label="true" filename="chatWebsites.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                            <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedChatWebsiteChatCannedAnswers($event)" aria-label="delete selected" translate translate-attr-label="CHATWEBSITES.DELETE_SELECTED">\n                                <md-icon md-font-icon="icon-delete"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedChatWebsiteChatCannedAnswers" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getChatWebsiteChatCannedAnswers">\n                                <tr md-row>\n                                    <th md-column md-order-by="id">{{ \'CHAT.ID\' | translate }}</th>\n                                    <th md-column md-order-by="key">{{ \'CHAT.KEY\' | translate }}</th>\n                                    <th md-column md-order-by="value">{{ \'CHAT.VALUE\' | translate }}</th>\n                                    <th md-column md-order-by="description">{{ \'CHAT.DESCRIPTION\' | translate }}</th>\n                                    <th md-column md-order-by="createdAt">{{ \'CHAT.CREATED_AT\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="chatCannedAnswer" md-select-id="id" ng-repeat="chatCannedAnswer in vm_dc.chatWebsiteChatCannedAnswers.rows">\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatCannedAnswer($event, chatCannedAnswer)" md-cell>{{chatCannedAnswer.id}}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatCannedAnswer($event, chatCannedAnswer)" md-cell>{{chatCannedAnswer.key}}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatCannedAnswer($event, chatCannedAnswer)" md-cell>{{chatCannedAnswer.value}}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatCannedAnswer($event, chatCannedAnswer)" md-cell>{{chatCannedAnswer.description}}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatCannedAnswer($event, chatCannedAnswer)" md-cell>{{chatCannedAnswer.createdAt | date:\'medium\'}}</td>\n                                    <td md-cell class="actions">\n                                        <md-menu>\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CHAT.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_dc.createOrEditChatWebsiteChatCannedAnswer($event, chatCannedAnswer)" translate="CHAT.EDIT_CHATCANNEDANSWER">\n                                                        Edit ChatCannedAnswer\n                                                    </md-button>\n                                                </md-menu-item>\n                                                <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                    <md-button ng-click="vm_dc.deleteConfirm(chatCannedAnswer, $event)" translate="CHAT.DELETE_CHATCANNEDANSWER">\n                                                        Delete ChatCannedAnswer\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.chatWebsiteChatCannedAnswers.rows.length">\n                                    <td md-cell colspan="7">\n                                        <span class="text-boxed-ligth" translate="CHAT.NO_CHATCANNEDANSWER_AVAILABLE">No chatcannedanswer available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'CHAT.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CHAT.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CHAT.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                        md-total="{{vm_dc.chatWebsiteChatCannedAnswers.count}}" md-on-paginate="vm_dc.getChatWebsiteChatCannedAnswers" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="CHAT.ACTIONS">ACTIONS</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="chatWebsite-detail-form-container actions md-background-bg md-whiteframe-1dp">\n                <div ng-controller="ChatWebsiteActionsController as vm_ac" ng-init="vm_ac.init(vm.chatWebsite)" class="content" md-background-bg layout="row" layout-align="start start">\n                    \x3c!-- SIDENAV --\x3e\n                    <div class="navigation-simple sidenav main-sidenav md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="20">\n                        \x3c!-- SIDENAV CONTENT --\x3e\n                        <md-list class="no-padding">\n                            <md-subheader class="md-no-sticky">\n                                <span translate="VOICE.APPLICATIONS_LIST">\n          Applications List\n        </span>\n                            </md-subheader>\n                        </md-list>\n                        <md-divider></md-divider>\n                        <md-list ng-sortable="vm_ac.list">\n                            <md-list-item class="handle" ng-repeat="a in vm_ac.apps">\n                                <md-icon md-font-icon="{{a.icon}}" class="s16"></md-icon>\n                                <p class="text-truncate" translate="CHAT.{{(a.alias || a.appType) | uppercase}}">{{a.alias || a.appType}}</p>\n                            </md-list-item>\n                        </md-list>\n                        \x3c!-- / SIDENAV CONTENT --\x3e\n                    </div>\n                    \x3c!-- / SIDENAV --\x3e\n                    <div flex></div>\n                    \x3c!-- MAIN --\x3e\n                    <div class="main scrollable md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="75">\n                        <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_ac.selectedChatWebsiteApps.length">\n                            <div class="md-toolbar-tools">\n                                <span class="md-subhead">Drag & Drop Routing</span>\n                                <div flex></div>\n                                <ms-search-bar on-search="vm_ac.query.filter = query" on-collapse="vm_ac.query.filter = undefined" debounce="300"></ms-search-bar>\n                            </div>\n                        </md-toolbar>\n                        <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_ac.selectedChatWebsiteApps.length">\n                            <div class="md-toolbar-tools">\n                                <span class="md-subhead">{{vm_ac.selectedChatWebsiteApps.length}} {{vm_ac.selectedChatWebsiteApps.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                <div flex></div>\n                                <md-button ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_ac.deleteSelectedChatWebsiteApps($event)" aria-label="delete selected" translate translate-attr-label="CHAT.DELETE_SELECTED">\n                                    <md-icon md-font-icon="icon-delete"></md-icon>\n                                </md-button>\n                            </div>\n                        </md-toolbar>\n\n                        \x3c!-- QUEUES TABLE --\x3e\n                        <md-table-container>\n                            <table md-table md-row-select multiple ng-model="vm_ac.selectedChatWebsiteApps">\n                                <thead md-head>\n                                    <tr md-row>\n                                        <th md-column width="10px"></th>\n                                        <th md-column width="10px">\n                                            <span translate="VOICE.PRIORITY">Priority</span>\n                                        </th>\n                                        <th md-column>\n                                            <span>Type</span>\n                                        </th>\n                                        <th md-column>\n                                            <span>Appdata</span>\n                                        </th>\n                                        <th md-column>\n                                            <span>Interval</span>\n                                        </th>\n                                        <th md-column width="10px"></th>\n                                        <th md-column width="10px"></th>\n                                    </tr>\n                                </thead>\n                                <tbody md-body ng-sortable="vm_ac.applications">\n                                    <tr md-row md-select="app" md-select-id="id" ng-repeat="app in vm_ac.chatWebsiteApps.rows | filter: vm_ac.query.filter">\n                                        <td md-cell>\n                                            <md-icon md-font-icon="icon-drag-vertical" class="s16 handle"></md-icon>\n                                        </td>\n                                        <td md-cell ng-click="vm_ac.editChatWebsiteApp($event, $index)"><span>{{app.priority}}</span></td>\n                                        <td md-cell ng-click="vm_ac.editChatWebsiteApp($event, $index)">{{app.app.toLowerCase() === \'agi\' ? \'Cally-Square\' : app.app | ucfirst}}<span ng-if="app.appType.toLowerCase() === \'custom\'">*</span></td>\n                                        <td md-cell ng-click="vm_ac.editChatWebsiteApp($event, $index)"><span class="text-truncate" style="width:200px">{{app.appdata}}</span></td>\n                                        <td md-cell ng-click="vm_ac.editInterval($event, $index)">{{app.IntervalId ? \'From List\' : app.interval}}</td>\n                                        <td md-cell>\n                                            <md-button ng-click="vm_ac.editInterval($event, $index)" class="md-icon-button" aria-label="Interval">\n                                                <md-icon md-font-icon="icon-timer"></md-icon>\n                                                <md-tooltip>\n                                                    {{app.IntervalId ? \'From List\' : (app.interval === \'*,*,*,*\' ? \'Always\' : \'Custom\')}}\n                                                </md-tooltip>\n                                            </md-button>\n                                        </td>\n                                        <td md-cell class="actions">\n                                            <md-menu>\n                                                <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                                    <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                </md-button>\n\n                                                <md-menu-content width="3">\n                                                    <md-menu-item>\n                                                        <md-button ng-click="vm_ac.editChatWebsiteApp($event, $index)" translate="VOICE.EDIT_APP">\n                                                            Edit App\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                    <md-menu-item>\n                                                        <md-button ng-click="vm_ac.editInterval($event, $index)" translate="VOICE.EDIT_INTERVAL">\n                                                            Edit Interval\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                    <md-menu-item ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'">\n                                                        <md-button ng-click="vm_ac.deleteConfirm(app, $index, $event)" translate="VOICE.DELETE_APP">\n                                                            Delete App\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                </md-menu-content>\n                                            </md-menu>\n                                        </td>\n                                    </tr>\n                                    <tr md-row ng-hide="vm_ac.chatWebsiteApps.rows.length">\n                                        <td md-cell colspan="7">\n                                            <span class="text-boxed-ligth" translate="VOICE.NO_APPS_AVAILABLE">No apps available</span>\n                                        </td>\n                                    </tr>\n                                </tbody>\n                            </table>\n                        </md-table-container>\n                        \x3c!-- / QUEUES TABLE --\x3e\n\n                        \x3c!-- NO RESULTS --\x3e\n\n                        \x3c!-- / NO RESULTS --\x3e\n                    </div>\n                    \x3c!-- / MAIN --\x3e\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="CHAT.INTERACTIONS">INTERACTIONS</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="chatWebsite-detail-form-container interactions md-background-bg md-whiteframe-1dp">\n                <div ng-controller="ChatWebsiteInteractionsController as vm_dc" ng-init="vm_dc.init(vm.chatWebsite)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedChatWebsiteInteractions.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="CHAT.INTERACTIONS">Interactions</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                            <md-button class="md-icon-button" ng-click="vm_dc.getChatWebsiteInteractions()" aria-label="refresh Interactions" translate translate-attr-label="CHAT.REFRESH_INTERACTIONS">\n                                <md-icon md-font-icon="icon-refresh"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedChatWebsiteInteractions.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedChatWebsiteInteractions.length}} {{vm_dc.selectedChatWebsiteInteractions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedChatWebsiteInteractions" csv-label="true" filename="chatWebsites.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                            <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedChatWebsiteInteractions($event)" aria-label="delete selected" translate translate-attr-label="CHATWEBSITES.DELETE_SELECTED">\n                                <md-icon md-font-icon="icon-delete"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedChatWebsiteInteractions" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getChatWebsiteInteractions">\n                                <tr md-row>\n                                    <th md-column md-order-by="id">{{ \'CHAT.ID\' | translate }}</th>\n                                    <th md-column md-order-by="createdAt">{{ \'CHAT.STARTEDAT\' | translate }}</th>\n                                    <th md-column md-order-by="closedAt">{{ \'CHAT.CLOSEDAT\' | translate }}</th>\n                                    <th md-column>{{ \'CHAT.CONTACT\' | translate }}</th>\n                                    <th md-column>{{ \'CHAT.AGENT\' | translate }}</th>\n                                    <th md-column md-order-by="disposition">{{ \'CHAT.DISPOSITION\' | translate }}</th>\n                                    <th md-column md-order-by="ratingValue">{{ \'CHAT.RATING\' | translate }}</th>\n                                    <th md-column md-order-by="note">{{ \'CHAT.NOTES\' | translate }}</th>\n                                    <th md-column md-order-by="tag">{{ \'CHAT.TAGS\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="interaction" md-select-id="id" ng-repeat="interaction in vm_dc.chatWebsiteInteractions.rows">\n                                    <td md-cell>{{interaction.id}}</td>\n                                    <td md-cell>{{interaction.createdAt | date:\'medium\'}}</td>\n                                    <td md-cell>{{interaction.closedAt | date:\'medium\'}}</td>\n                                    <td md-cell>{{interaction.Contact.firstName}}</td>\n                                    <td md-cell>{{interaction.Owner.name}}</td>\n                                    <td md-cell>{{interaction.disposition}}</td>\n                                    <td md-cell>\n                                        <md-icon md-font-icon="icon-star" style="color:red" ng-show="interaction.ratingValue != null && (!interaction.ratingType || interaction.ratingType == \'star\')" ng-repeat="ratingValue in [1,2,3,4,5] | limitTo:interaction.ratingValue"></md-icon>\n                                        <md-icon md-font-icon="icon-thumb-up" style="color:green" ng-show="interaction.ratingValue != null && interaction.ratingType && interaction.ratingType == \'thumb\' && interaction.ratingValue == 1"></md-icon>\n                                        <md-icon md-font-icon="icon-thumb-down" style="color:red" ng-show="interaction.ratingValue != null && interaction.ratingType && interaction.ratingType == \'thumb\' && interaction.ratingValue == 0"></md-icon><span ng-show="interaction.ratingValue == null" translate="CHAT.NO_RATINGVALUE">No ratingValue</span></td>\n                                    <td md-cell>{{interaction.note}}</td>\n                                    <td md-cell>\n                                        <div ng-if="interaction.Tags.length">\n                                            <md-tooltip md-direction="left" layout="row">\n                                                <span ng-repeat="tag in interaction.Tags">{{tag.name}}<span ng-if="!$last">, </span></span>\n                                            </md-tooltip>\n                                            <md-icon md-font-icon="icon-tag"></md-icon>\n                                        </div>\n                                    </td>\n                                    <td md-cell class="actions">\n                                        <md-menu>\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CHAT.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_dc.spychatInteraction($event, interaction)" translate="CHAT.SPYINTERACTION">\n                                                        Spy Interaction\n                                                    </md-button>\n                                                </md-menu-item>\n                                                <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                    <md-button ng-click="vm_dc.deleteConfirm(interaction, $event)" translate="CHAT.DELETE_INTERACTION">\n                                                        Delete Interaction\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.chatWebsiteInteractions.rows.length">\n                                    <td md-cell colspan="15">\n                                        <span class="text-boxed-ligth" translate="CHAT.NO_INTERACTION_AVAILABLE">No interaction available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'CHAT.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CHAT.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CHAT.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                        md-total="{{vm_dc.chatWebsiteInteractions.count}}" md-on-paginate="vm_dc.getChatWebsiteInteractions" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="CHAT.OFFLINEMESSAGES">OFFLINEMESSAGES</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="chatWebsite-detail-form-container offlinemessages md-background-bg md-whiteframe-1dp">\n                <div ng-controller="ChatWebsiteOfflineMessagesController as vm_dc" ng-init="vm_dc.init(vm.chatWebsite)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedChatWebsiteOfflineMessages.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="CHAT.OFFLINEMESSAGES">OfflineMessages</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedChatWebsiteOfflineMessages.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedChatWebsiteOfflineMessages.length}} {{vm_dc.selectedChatWebsiteOfflineMessages.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedChatWebsiteOfflineMessages" csv-label="true" filename="chatWebsites.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                            <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedChatWebsiteOfflineMessages($event)" aria-label="delete selected" translate translate-attr-label="CHATWEBSITES.DELETE_SELECTED">\n                                <md-icon md-font-icon="icon-delete"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedChatWebsiteOfflineMessages" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getChatWebsiteOfflineMessages">\n                                <tr md-row>\n                                    <th md-column md-order-by="id">{{ \'CHAT.ID\' | translate }}</th>\n                                    <th md-column md-order-by="ContactId">{{ \'CHAT.CONTACT\' | translate }}</th>\n                                    <th md-column md-order-by="createdAt">{{ \'CHAT.CREATED_AT\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="offlineMessage" md-select-id="id" ng-repeat="offlineMessage in vm_dc.chatWebsiteOfflineMessages.rows">\n                                    <td md-cell>{{offlineMessage.id}}</td>\n                                    <td md-cell>{{ ContactId = vm_dc.contacts[offlineMessage.ContactId]; ContactId.firstName }}</td>\n                                    <td md-cell>{{offlineMessage.createdAt | date:\'medium\'}}</td>\n                                    <td md-cell class="actions">\n                                        <md-menu>\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CHAT.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_dc.showOfflineMessageChatWebsiteOfflineMessage($event, offlineMessage)" translate="CHAT.SHOW_OFFLINEMESSAGE">\n                                                        SHOW OfflineMessage\n                                                    </md-button>\n                                                </md-menu-item>\n                                                <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                    <md-button ng-click="vm_dc.deleteConfirm(offlineMessage, $event)" translate="CHAT.DELETE_OFFLINEMESSAGE">\n                                                        Delete OfflineMessage\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.chatWebsiteOfflineMessages.rows.length">\n                                    <td md-cell colspan="5">\n                                        <span class="text-boxed-ligth" translate="CHAT.NO_OFFLINEMESSAGE_AVAILABLE">No offlinemessage available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'CHAT.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CHAT.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CHAT.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                        md-total="{{vm_dc.chatWebsiteOfflineMessages.count}}" md-on-paginate="vm_dc.getChatWebsiteOfflineMessages" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    </md-tabs>\n\n</div>\n\x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/chat/views/realtime/agents/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="CHAT.AGENTS">Agents</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query; vm.onInit()" on-collapse="vm.query.filter = undefined; vm.onInit()" debounce="300"></ms-search-bar>\n        \x3c!-- <md-button class="md-icon-button" ng-click="vm.showInfo($event)">\n      <i class="icon-information-outline grey-600-fg">\n        <md-tooltip>{{\'VOICE.INFO\' | translate}}</md-tooltip>\n      </i>\n    </md-button> --\x3e\n        <md-select ng-model="vm.query.globalStatusFilter" class="md-caption" ng-change="vm.query.pauseTypeFilter = \'\'; vm.onInit()">\n            <md-option ng-value="\'\'">{{ \'CHAT.ALL\' | translate }}</md-option>\n            <md-option value="pause">{{ \'CHAT.PAUSE\' | translate }}</md-option>\n            <md-option value="*pause">{{ \'CHAT.PARTIALPAUSE\' | translate }}</md-option>\n            <md-option value="busy">{{ \'CHAT.BUSY\' | translate }}</md-option>\n            <md-option value="idle">{{ \'CHAT.IDLE\' | translate }}</md-option>\n        </md-select>\n\n        <md-select ng-if="vm.isPause(vm.query.globalStatusFilter)" ng-model="vm.query.pauseTypeFilter" class="md-caption" ng-change="vm.onInit()">\n            <md-option ng-value="\'\'">All</md-option>\n            <md-option value="DEFAULT PAUSE">DEFAULT PAUSE</md-option>\n            <md-option value="ACW">ACW</md-option>\n            <md-option value="LOGININPAUSE">LOGININPAUSE</md-option>\n            <md-option value="Auto-Pause">AUTOPAUSE</md-option>\n            <md-option ng-value="pause.name" ng-repeat="pause in vm.pauses.rows">{{pause.name}}</md-option>\n        </md-select>\n    </div>\n</md-toolbar>\n\n\x3c!-- AGENT TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.order" md-on-reorder="vm.onInit">\n            <tr md-row border="1">\n                <th class="bv text-center" colspan="3">{{ \'CHAT.AGENT\' | translate }}</th>\n                <th class="bv bl text-center" colspan="2">{{ \'VOICE.VOICE\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="bv bl text-center" colspan="2">{{ \'CHAT.CHAT\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="bv bl text-center" colspan="2">{{ \'MAIL.MAIL\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="bv bl text-center" colspan="2">{{ \'SMS.SMS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="bv bl text-center" colspan="2">{{ \'OPENCHANNEL.OPENCHANNEL\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="bv bl text-center" colspan="2">{{ \'FAX.FAX\' | translate }}</th>\n                <th width="10px" class="bt bl" rowspan="2"></th>\n                \x3c!-- <th md-column>{{ \'VOICE.PHONE_STATE\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PHONE_STATUS\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PAUSE\' | translate }}</th>\n                <th md-column width="10px"></th> --\x3e\n            </tr>\n            <tr md-row>\n                <th class="bl" md-column md-order-by="fullname">{{ \'CHAT.NAME\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatus">{{ \'CHAT.STATUS\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatusTime">{{ \'CHAT.TIMER\' | translate }}</th>\n\n                <th class="bl custom-column">{{ \'VOICE.STATUS\' | translate }}</th>\n                <th class="bl custom-column">Info</th>\n\n                <th ng-if="vm.license.chat" class="bl text-center">{{ \'CHAT.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'CHAT.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.mail" class="bl text-center">{{ \'MAIL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'MAIL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.messaging" class="bl text-center">{{ \'SMS.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'SMS.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.openchannel" class="bl text-center">{{ \'OPENCHANNEL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'OPENCHANNEL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.fax" class="bl text-center">{{ \'FAX.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'FAX.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.order.length">\n                <td md-cell colspan="17">\n                    <div layout="row" layout-align="center center">\n                        <span>{{ \'CHAT.NO_AGENT_ONLINE\' | translate }}</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-select="vm.agents[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td class="bt padding-5">\n                    <div layout="row" layout-align="start center">\n                        <img class="avatar" ng-src="{{vm.agents[value].userpic && \'api/users/\'+vm.agents[value].id+\'/avatar\' || \'assets/images/avatars/profile.png\'}}">\n                        <div layout="column">\n                            <span>{{vm.agents[value].fullname}}</span>\n                            <span>{{vm.agents[value].internal}}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt">\n                    <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'busy\':\'indigo-100-bg\',\'*pause\':\'amber-50-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].globalStatus]">{{ vm.isPause(vm.agents[value].globalStatus) ? \'\' : vm.agents[value].globalStatus | uppercase }} {{ vm.isPause(vm.agents[value].globalStatus) ? (vm.isPartialPause(vm.agents[value].globalStatus) ? \'*\'+vm.agents[value].pauseType || \'DEFAULT PAUSE\'  : vm.agents[value].pauseType || \'DEFAULT PAUSE\') : \'\'}}</span>\n                </td>\n                <td class="bt custom-column">\n                    <timer start-time="vm.agents[value].globalStatusTime" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                </td>\n                <td class="bt bl">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'talking\':\'indigo-100-bg\',\'ringing\':\'orange-400-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].voiceStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt bl">\n                    <div layout="column">\n                        <span ng-if="vm.agents[value].queue" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].queue }}</span>\n                        <span ng-if="vm.agents[value].destconnectedlinenum" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].destconnectedlinenum }}</span>\n                        <span class="padding-5" ng-if="vm.agents[value].queue || vm.agents[value].destconnectedlinenum">\n                            <timer start-time="vm.agents[value].voiceStatusTime" interval="1000" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                        </span>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt">--</td>\n                <td class="bt">--</td> --\x3e\n                <td class="bt bl" ng-if="vm.license.chat">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt padding-5 text-center">{{ agent.chatCurrentCapacity }}/{{ agent.chatCapacity > 0 ? agent.chatCapacity : \'∞\' }}</td> --\x3e\n                <td md-number class="bt text-center font-size-20" ng-if="vm.license.chat" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.mail">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.mail" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.messaging">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.messaging" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.openchannel">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">4</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">89</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.openchannel" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.fax">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">7</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">2</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.fax" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxCurrentCapacity }}</td>\n                <td class="bl bt padding-5 text-center">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="4">\n                            <md-menu-item>\n                                <md-button ng-click="vm.logout(vm.agents[value], $event)" translate="CHAT.LOGOUT">\n                                    Logout\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.queueAdd(vm.agents[value], $event)" translate="CHAT.AGENTADD_QUEUE">\n                                    Add Agent In Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="CHAT.PAUSE">Pause</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item>\n                                            <md-button ng-disabled=" vm.agents[value].voicePause && \'DEFAULT PAUSE\' === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value])"><em translate="CHAT.DEFAULT_PAUSE">Default Pause</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.pauses.rows.length" ng-repeat="pause in vm.pauses.rows">\n                                            <md-button ng-disabled="vm.agents[value].voicePause && pause.name === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value], pause.name)">{{pause.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                            <md-menu-item ng-if="vm.isPause(vm.agents[value].globalStatus)">\n                                <md-button ng-click="vm.unPause(vm.agents[value])" translate="CHAT.UNPAUSE">\n                                    Unpause\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'CHAT.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CHAT.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CHAT.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.filteredAgents.length}}" md-on-paginate="vm.onInit" md-page-select></md-table-pagination>\n\x3c!-- / AGENT TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/chat/views/realtime/queues/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="CHAT.QUEUES">Queues</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUE TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getQueues">\n            <tr md-row>\n                <th md-column md-order-by="name">{{ \'CHAT.NAME\' | translate }}</th>\n                <th md-column>{{ \'CHAT.LOGGED_IN\' | translate }}</th>\n                <th md-column>{{ \'CHAT.PAUSED\' | translate }}</th>\n                <th md-column>{{ \'CHAT.READY\' | translate }}</th>\n                <th md-column>{{ \'CHAT.WAITING\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.queues">\n                <td md-cell colspan="7">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="CHAT.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row md-select="vm.queues[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td md-cell>{{vm.queues[value].name}}</td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].loggedInDb || 0}} ({{vm.queues[value].loggedIn || 0}})</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].paused || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].available || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].waiting || 0}}</span>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CHAT.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="3">\n                            <md-menu-item>\n                                <md-button ng-click="vm.createOrEditChatQueue($event, vm.queues[value])" translate="CHAT.EDIT_QUEUE">\n                                    Edit Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.agentAdd($event, vm.queues[value])" translate="CHAT.AGENTSADD_QUEUE">\n                                    Add Agents to queue\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'CHAT.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CHAT.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CHAT.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.count}}" md-on-paginate="vm.getQueues" md-page-select></md-table-pagination>\n\x3c!-- / QUEUE TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/chat/views/realtime/realtime.html",'<div id="realtime" class="page-layout simple tabbed" layout="column" ng-cloak>\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CHAT.AGENTS">Agents</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CHAT.QUEUES">Queues</span>\n                </md-tab-label>\n            </md-tab>\n        </md-tabs>\n\n        <md-card ui-view></md-card>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n</div>'),e.put("app/main/apps/contactmanager/views/companies/companies.html",'<div id="companies" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-account-circle" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="CONTACTMANAGER.COMPANIES">Companies</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="CONTACTMANAGER.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedCompanies.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedCompanies =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="CONTACTMANAGER.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-companies-count">\n                    <span>{{vm.selectedCompanies.length}}</span>\n                <span translate="CONTACTMANAGER.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="COMPANIES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllCompanies()" translate="CONTACTMANAGER.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectCompanies()" translate="CONTACTMANAGER.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedCompanies" csv-label="true" filename="companies.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedCompanies($event)" aria-label="delete selected" translate translate-attr-label="COMPANIES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- COMPANY TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedCompanies" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getCompanies">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'CONTACTMANAGER.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'CONTACTMANAGER.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'CONTACTMANAGER.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.companies.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="CONTACTMANAGER.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="company" md-select-id="id" ng-repeat="company in vm.companies.rows">\n                                <td md-cell ng-if="company.userpic"><img class="avatar" alt="{{company.name}}" ng-src="api/users/{{company.id}}/avatar" /></td>\n                                <td md-cell ng-if="!company.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{company.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditCompany($event, company)" md-cell class="id ">{{company.id}}</td>\n                                <td ng-click="vm.createOrEditCompany($event, company)" md-cell class="name ">{{company.name}}</td>\n                                <td ng-click="vm.createOrEditCompany($event, company)" md-cell class="description ">{{company.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CONTACTMANAGER.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(company, $event)" translate="CONTACTMANAGER.EDIT_COMPANY">\n                                                    Edit Company\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotocontactsgoto(company, $event)" translate="CONTACTMANAGER.GOTOCONTACTS_COMPANY">\n                                                    goToContacts Company\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(company, $event)" translate="CONTACTMANAGER.DELETE_COMPANY">\n                                                    Delete Company\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'CONTACTMANAGER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CONTACTMANAGER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CONTACTMANAGER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.companies.count}}" md-on-paginate="vm.getCompanies" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / COMPANY TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD COMPANY BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-company-button" ng-click="vm.createOrEditCompany($event)" aria-label="add company" translate translate-attr-aria-label="CONTACTMANAGER.ADD_COMPANY">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD COMPANY BUTTON --\x3e\n</div>'),e.put("app/main/apps/contactmanager/views/companies/create/dialog.html",'<md-dialog class="company-dialog" aria-label="New Company">\n    <form name="companyForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.company.name" ng-required="true" autofocus>\n                <div ng-messages="companyForm[\'name\'].$error" ng-show="companyForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.PHONE">Phone</label>\n                <input type="text" name="phone" ng-model="vm.company.phone">\n                <div ng-messages="companyForm[\'phone\'].$error" ng-show="companyForm[\'phone\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.PHONE_REQUIRED">Phone field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.VAT">Vat</label>\n                <input type="text" name="vat" ng-model="vm.company.vat">\n                <div ng-messages="companyForm[\'vat\'].$error" ng-show="companyForm[\'vat\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.VAT_REQUIRED">Vat field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.FAX">Fax</label>\n                <input type="text" name="fax" ng-model="vm.company.fax">\n                <div ng-messages="companyForm[\'fax\'].$error" ng-show="companyForm[\'fax\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.FAX_REQUIRED">Fax field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.COMPANYID">CompanyId</label>\n                <input type="text" name="companyId" ng-model="vm.company.companyId">\n                <div ng-messages="companyForm[\'companyId\'].$error" ng-show="companyForm[\'companyId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.COMPANYID_REQUIRED">CompanyId field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.TYPE">Type</label>\n                <input type="text" name="type" ng-model="vm.company.type">\n                <div ng-messages="companyForm[\'type\'].$error" ng-show="companyForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.WEBSITE">Website</label>\n                <input type="text" name="website" ng-model="vm.company.website" md-maxlength="255">\n                <div ng-messages="companyForm[\'website\'].$error" ng-show="companyForm[\'website\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.WEBSITE_REQUIRED">Website field is required</span>\n                    </div>\n\n                    <div ng-message="md-maxlength">\n                        <span translate="CONTACTMANAGER.ERRORS.WEBSITE_MAX_LENGTH" translate-values=\'{max: 255}\'>Website must have a maximum length equal to 255</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.EMAIL_DOMAIN">Email_Domain</label>\n                <input type="text" name="emailDomain" ng-model="vm.company.emailDomain">\n                <div ng-messages="companyForm[\'emailDomain\'].$error" ng-show="companyForm[\'emailDomain\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.EMAIL_DOMAIN_REQUIRED">Email_Domain field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.EMAIL">Email</label>\n                <input type="email" name="email" ng-model="vm.company.email">\n                <div ng-messages="companyForm[\'email\'].$error" ng-show="companyForm[\'email\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                    </div>\n                    <div ng-message="email">\n                        <span translate="CONTACTMANAGER.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.company.description">\n                <div ng-messages="companyForm[\'description\'].$error" ng-show="companyForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newCompany" ng-click="vm.saveCompany()" class="send-button md-accent md-raised" ng-disabled="companyForm.$invalid || companyForm.$pristine" aria-label="SAVE" translate="CONTACTMANAGER.SAVE" translate-attr-aria-label="CONTACTMANAGER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newCompany" ng-click="vm.addNewCompany()" class="send-button md-accent md-raised" ng-disabled="companyForm.$invalid" aria-label="ADD" translate="CONTACTMANAGER.ADD_COMPANY" translate-attr-aria-label="CONTACTMANAGER.ADD_COMPANY">\n                    ADD COMPANY\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newCompany" ng-click="vm.deleteCompany($event)" aria-label="DELETE" translate translate-attr-aria-label="CONTACTMANAGER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CONTACTMANAGER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/companies/edit/view.html",'<div id="contactmanager-company" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-companies-button md-icon-button" aria-label="Go to companies" ng-click="vm.gotoCompanies()" translate translate-attr-aria-label="CONTACTMANAGER.GO_TO_COMPANIES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="company-image" hide-xs>\n                    <img ng-src="assets/images/business/companies.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.company.id}}\n                        <span ng-if="vm.company.name">{{vm.company.name}}</span>\n                        <span ng-if="vm.company.exten">{{vm.company.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="CONTACTMANAGER.CREATED_AT"></span> <span>{{vm.company.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.gotogoto(vm.company, $event)" class="md-fab md-warn md-icon-button" aria-label="goto">\n                <md-tooltip><span translate="CONTACTMANAGER.GOTO_COMPANY"></span></md-tooltip>\n                <md-icon md-font-icon="icon-forward"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveCompany()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (addressForm.$invalid) || (shipmentAddressForm.$invalid)" translate="CONTACTMANAGER.SAVE" translate-attr-aria-label="CONTACTMANAGER.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CONTACTMANAGER.GENERAL">GENERAL</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="company-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="CONTACTMANAGER.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.company.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.PHONE">Phone</label>\n                                <input type="text" name="phone" ng-model="vm.company.phone">\n                                <div ng-messages="generalForm[\'phone\'].$error" ng-show="generalForm[\'phone\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.PHONE_REQUIRED">Phone field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.VAT">Vat</label>\n                                <input type="text" name="vat" ng-model="vm.company.vat">\n                                <div ng-messages="generalForm[\'vat\'].$error" ng-show="generalForm[\'vat\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.VAT_REQUIRED">Vat field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.FAX">Fax</label>\n                                <input type="text" name="fax" ng-model="vm.company.fax">\n                                <div ng-messages="generalForm[\'fax\'].$error" ng-show="generalForm[\'fax\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.FAX_REQUIRED">Fax field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.COMPANYID">CompanyId</label>\n                                <input type="text" name="companyId" ng-model="vm.company.companyId">\n                                <div ng-messages="generalForm[\'companyId\'].$error" ng-show="generalForm[\'companyId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.COMPANYID_REQUIRED">CompanyId field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.TYPE">Type</label>\n                                <input type="text" name="type" ng-model="vm.company.type">\n                                <div ng-messages="generalForm[\'type\'].$error" ng-show="generalForm[\'type\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.WEBSITE">Website</label>\n                                <input type="text" name="website" ng-model="vm.company.website" md-maxlength="255">\n                                <div ng-messages="generalForm[\'website\'].$error" ng-show="generalForm[\'website\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.WEBSITE_REQUIRED">Website field is required</span>\n                                    </div>\n\n                                    <div ng-message="md-maxlength">\n                                        <span translate="CONTACTMANAGER.ERRORS.WEBSITE_MAX_LENGTH" translate-values=\'{max: 255}\'>Website must have a maximum length equal to 255</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.EMAIL_DOMAIN">Email_Domain</label>\n                                <input type="text" name="emailDomain" ng-model="vm.company.emailDomain">\n                                <div ng-messages="generalForm[\'emailDomain\'].$error" ng-show="generalForm[\'emailDomain\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.EMAIL_DOMAIN_REQUIRED">Email_Domain field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.EMAIL">Email</label>\n                                <input type="email" name="email" ng-model="vm.company.email">\n                                <div ng-messages="generalForm[\'email\'].$error" ng-show="generalForm[\'email\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                                    </div>\n                                    <div ng-message="email">\n                                        <span translate="CONTACTMANAGER.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.company.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CONTACTMANAGER.ADDRESS">ADDRESS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="company-detail-form-container address md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="CONTACTMANAGER.ADDRESS">ADDRESS</div>\n                        </div>\n                        <form name="addressForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.STREET">Street</label>\n                                <input type="text" name="street" ng-model="vm.company.street" autofocus>\n                                <div ng-messages="addressForm[\'street\'].$error" ng-show="addressForm[\'street\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.STREET_REQUIRED">Street field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.POSTAL_CODE">Postal_Code</label>\n                                <input type="text" name="postalCode" ng-model="vm.company.postalCode">\n                                <div ng-messages="addressForm[\'postalCode\'].$error" ng-show="addressForm[\'postalCode\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.POSTAL_CODE_REQUIRED">Postal_Code field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.CITY">City</label>\n                                <input type="text" name="city" ng-model="vm.company.city">\n                                <div ng-messages="addressForm[\'city\'].$error" ng-show="addressForm[\'city\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.CITY_REQUIRED">City field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.COUNTRY">Country</label>\n                                <input type="text" name="country" ng-model="vm.company.country">\n                                <div ng-messages="addressForm[\'country\'].$error" ng-show="addressForm[\'country\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.COUNTRY_REQUIRED">Country field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CONTACTMANAGER.SHIPMENTADDRESS">SHIPMENTADDRESS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="company-detail-form-container shipmentaddress md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="CONTACTMANAGER.SHIPMENTADDRESS">SHIPMENTADDRESS</div>\n                        </div>\n                        <form name="shipmentAddressForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.STREET">Street</label>\n                                <input type="text" name="sStreet" ng-model="vm.company.sStreet" autofocus>\n                                <div ng-messages="shipmentAddressForm[\'sStreet\'].$error" ng-show="shipmentAddressForm[\'sStreet\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.STREET_REQUIRED">Street field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.POSTAL_CODE">Postal_Code</label>\n                                <input type="text" name="sPostalCode" ng-model="vm.company.sPostalCode">\n                                <div ng-messages="shipmentAddressForm[\'sPostalCode\'].$error" ng-show="shipmentAddressForm[\'sPostalCode\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.POSTAL_CODE_REQUIRED">Postal_Code field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.CITY">City</label>\n                                <input type="text" name="sCity" ng-model="vm.company.sCity">\n                                <div ng-messages="shipmentAddressForm[\'sCity\'].$error" ng-show="shipmentAddressForm[\'sCity\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.CITY_REQUIRED">City field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.COUNTRY">Country</label>\n                                <input type="text" name="sCountry" ng-model="vm.company.sCountry">\n                                <div ng-messages="shipmentAddressForm[\'sCountry\'].$error" ng-show="shipmentAddressForm[\'sCountry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.COUNTRY_REQUIRED">Country field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/contactmanager/views/contacts/contacts.html",'<div id="contacts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-account-multiple" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="CONTACTMANAGER.CONTACTS">Contacts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        \x3c!-- SEARCH --\x3e\n        <div class="search-input-wrapper" layout="row" layout-align="start center">\n            <label for="search">\n                <md-icon md-font-icon="icon-magnify"></md-icon>\n            </label>\n            <md-input-container md-no-float class="m-0">\n                <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="CONTACTMANAGER.SEARCH_FOR_ANYONE">\n            </md-input-container>\n        </div>\n        \x3c!-- / SEARCH --\x3e\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedContacts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedContacts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="CONTACTMANAGER.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-contacts-count">\n                    <span>{{vm.selectedContacts.length}}</span>\n                <span translate="CONTACTMANAGER.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="CONTACTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllContacts()" translate="CONTACTMANAGER.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectContacts()" translate="CONTACTMANAGER.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedContacts" csv-label="true" filename="contacts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm.deleteSelectedContacts($event)" aria-label="delete selected" translate translate-attr-label="CONTACTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n            <div layout="row">\n                <div class="column" flex="20">\n                    <md-card>\n                        <md-card-content>\n                            <button layout-align="center center" md-mini-fab ng-click="vm.selectedList = null; vm.selectedCompany = null; vm.selectedTags = []"><md-icon md-font-icon="icon-refresh"></md-icon>{{ \'CONTACTMANAGER.ALL_CONTACTS\' | translate }}</button>\n                        </md-card-content>\n                    </md-card>\n                    <md-card>\n                        <md-card-content>\n                            <md-input-container class="md-block" flex-gt-sm="">\n                                <label translate="CONTACTMANAGER.SELECT_LIST">Select a list</label>\n                                <md-select placeholder="Select a list" ng-model="vm.selectedList">\n                                    <md-optgroup label="Lists">\n                                        <md-option ng-value="null"><em translate="CONTACTMANAGER.NONE">None</em></md-option>\n                                        <md-option ng-value="list.id" ng-repeat="list in vm.lists.rows">{{list.name}}</md-option>\n                                    </md-optgroup>\n                                </md-select>\n                            </md-input-container>\n                        </md-card-content>\n                    </md-card>\n                    <md-card>\n                        <md-card-content>\n                            <md-input-container class="md-block" flex-gt-sm="">\n                                <label translate="CONTACTMANAGER.SELECT_COMPANY">Select a company</label>\n                                <md-select placeholder="Select a companie" flex="100" ng-model="vm.selectedCompany">\n                                    <md-optgroup label="Companies">\n                                        <md-option ng-value="null"><em translate="CONTACTMANAGER.NONE">None</em></md-option>\n                                        <md-option ng-value="company.id" ng-repeat="company in vm.companies.rows">{{company.name}}</md-option>\n                                    </md-optgroup>\n                                </md-select>\n                            </md-input-container>\n\n                        </md-card-content>\n                    </md-card>\n                    <md-card>\n                        <md-card-content>\n                            <md-input-container class="md-block" flex-gt-sm="">\n                                <label translate="CONTACTMANAGER.SELECT_TAGS">Select one or more tags</label>\n                                <md-select placeholder="Select one or more tags" flex="100" ng-model="vm.selectedTags" multiple>\n                                    <md-optgroup label="Tags">\n                                        <md-option ng-value="tag.name" ng-repeat="tag in vm.tags.rows">{{tag.name}}</md-option>\n                                    </md-optgroup>\n                                </md-select>\n                            </md-input-container>\n                        </md-card-content>\n                    </md-card>\n                </div>\n\n\n                \x3c!-- USER TABLE --\x3e\n                <md-card flex="80">\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm.selectedContacts" md-progress="vm.promise">\n                            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getContacts">\n                                <tr md-row>\n                                    <th md-column md-order-by="id">ID</th>\n                                    <th md-column md-order-by="firstName">{{\'CONTACTMANAGER.FULLNAME\' | translate}}</th>\n                                    <th md-column md-order-by="phone">{{\'CONTACTMANAGER.PHONE\' | translate}}</th>\n                                    <th md-column md-order-by="email">{{\'CONTACTMANAGER.EMAIL\' | translate}}</th>\n                                    <th md-column md-order-by="ListId">{{\'CONTACTMANAGER.LIST\' | translate}}</th>\n                                    <th md-column md-order-by="CompanyId">{{\'CONTACTMANAGER.COMPANY\' | translate}}</th>\n                                    <th md-column md-order-by="tags">{{\'CONTACTMANAGER.TAGS\' | translate}}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row ng-hide="vm.contacts.rows.length">\n                                    <td md-cell colspan="6">\n                                        <div layout="row" layout-align="center center">\n                                            <span tranlsate="CONTACTMANAGER.NO_AVAILABLE_INFO">No Available Info</span>\n                                        </div>\n                                    </td>\n                                </tr>\n                                <tr md-row md-select="contact" md-select-id="id" ng-repeat="contact in vm.contacts.rows">\n                                    <td ng-click="vm.createOrEditContact($event, contact)" md-cell class="id">{{contact.id}}</td>\n                                    <td ng-click="vm.createOrEditContact($event, contact)" md-cell class="firstName">{{contact.firstName}} {{contact.lastName}}</td>\n                                    <td ng-click="vm.createOrEditContact($event, contact)" md-cell class="phone">{{contact.phone}}</td>\n                                    <td ng-click="vm.createOrEditContact($event, contact)" md-cell class="email">{{contact.email}}</td>\n                                    <td ng-click="vm.createOrEditContact($event, contact)" md-cell class="list">{{vm.listsMap[contact.ListId]}}</td>\n                                    <td ng-click="vm.createOrEditContact($event, contact)" md-cell class="company">{{vm.companiesMap[contact.CompanyId]}}</td>\n                                    <td md-cell class="tags">\n                                        <div ng-if="contact.tags.length">\n                                            <md-tooltip md-direction="left" layout="row">\n                                                <span ng-repeat="tag in contact.tags">{{tag}}<span ng-if="!$last">, </span></span>\n                                            </md-tooltip>\n                                            <md-icon md-font-icon="icon-tag"></md-icon>\n                                        </div>\n                                    </td>\n                                    <td md-cell class="actions">\n                                        <md-menu>\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CONTACTMANAGER.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm.editdialog(contact, ev)" translate="CONTACTMANAGER.EDIT_CONTACT">\n                                                        Edit Contact\n                                                    </md-button>\n                                                </md-menu-item>\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm.mergeContact(ev, contact)" translate="CONTACTMANAGER.MERGE_CONTACT">\n                                                        Merge Contact\n                                                    </md-button>\n                                                </md-menu-item>\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm.duplicateContact(ev, contact)" translate="CONTACTMANAGER.DUPLICATE_CONTACT">\n                                                        Duplicate Contact\n                                                    </md-button>\n                                                </md-menu-item>\n                                                <md-menu-divider></md-menu-divider>\n                                                <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                    <md-button ng-click="vm.deleteconfirm(contact, ev)" translate="CONTACTMANAGER.DELETE_CONTACT">\n                                                        Delete Contact\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n\n                    <md-table-pagination md-label="{page: \'{{\'CONTACTMANAGER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CONTACTMANAGER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CONTACTMANAGER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                        md-page="vm.query.page" md-total="{{vm.contacts.count}}" md-on-paginate="vm.getContacts" md-page-select></md-table-pagination>\n                </md-card>\n                \x3c!-- / USER TABLE --\x3e\n            </div>\n        </div>\n        \x3c!-- / MAIN --\x3e\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD USER BUTTON --\x3e\n    <md-fab-speed-dial id="add-contact-button" ng-hide="vm.options.hidden" md-direction="up" md-open="vm.options.isOpen" class="md-scale md-fab" ng-class="{ \'md-hover-full\': vm.options.hover }" ng-mouseenter="vm.options.isOpen=true" ng-mouseleave="vm.options.isOpen=false">\n        <md-fab-trigger>\n            <md-button aria-label="menu" class="md-fab md-accent">\n                <md-icon md-font-icon="icon-plus"></md-icon>\n            </md-button>\n        </md-fab-trigger>\n        <md-fab-actions>\n            \x3c!-- OLD IMPORT --\x3e\n            \x3c!-- <md-button class="md-fab md-mini md-warn" ng-click="vm.uploadContacts($event)" aria-label="add contact" translate translate-attr-aria-label="CONTACTMANAGER.UPLOAD_CSV">\n                <md-tooltip md-direction="left" md-visible="tooltipVisible" md-autohide="false">\n                    {{\'CONTACTMANAGER.UPLOAD_CSV\' | translate}}\n                </md-tooltip>\n                <md-icon md-font-icon="icon-upload"></md-icon>\n            </md-button> --\x3e\n            \x3c!-- NEW IMPORT --\x3e\n            <md-button class="md-fab md-mini md-warn" flow-btn flow-init="vm.ngFlowOptions" flow-files-submitted="$flow.upload()" flow-file-success="vm.importContacts($file, $message, $flow)" flow-file-added="!!{csv:1}[$file.getExtension()]" aria-label="Select File"\n                translate translate-attr-aria-label="CONTACTMANAGER.IMPORT_CONTACTS">\n                <md-tooltip md-direction="left" md-visible="tooltipVisible" md-autohide="false">\n                    {{\'CONTACTMANAGER.IMPORT_CONTACTS\' | translate}}\n                </md-tooltip>\n                <md-icon md-font-icon="icon-upload"></md-icon>\n            </md-button>\n            <md-button class="md-fab md-mini md-accent" ng-click="vm.createOrEditContact($event)" aria-label="add contact" translate translate-attr-aria-label="CONTACTMANAGER.ADD_CONTACT">\n                <md-tooltip md-direction="left" md-visible="tooltipVisible" md-autohide="false">\n                    {{\'CONTACTMANAGER.ADD_CONTACT\' | translate}}\n                </md-tooltip>\n                <md-icon md-font-icon="icon-account-plus"></md-icon>\n            </md-button>\n        </md-fab-actions>\n    </md-fab-speed-dial>\n    \x3c!-- / ADD USER BUTTON --\x3e\n</div>'),e.put("app/main/apps/contactmanager/views/contacts/create/dialog.html",'<md-dialog class="cm-contact-dialog" aria-label="New Contact">\n    <form name="contactForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.FIRSTNAME">First name</label>\n                <input name="firstName" ng-model="vm.contact.firstName" required md-autofocus>\n\n                <div ng-messages="contactForm.firstName.$error" ng-show="contactForm.firstName.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.FIRSTNAME_REQUIRED">First name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.LASTNAME">Last name</label>\n                <input name="lastName" ng-model="vm.contact.lastName">\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.PHONE">Phone</label>\n                <input name="phone" ng-model="vm.contact.phone" required>\n\n                <div ng-messages="contactForm.phone.$error" ng-show="contactForm.phone.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.PHONE_REQUIRED">Phone field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.EMAIL">Email</label>\n                <input name="email" type="email" ng-model="vm.contact.email">\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.MOBILE">Mobile</label>\n                <input name="mobile" ng-model="vm.contact.mobile">\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.FAX">Fax</label>\n                <input name="fax" ng-model="vm.contact.fax">\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.LIST">List</label>\n                <md-select name="list" ng-model="vm.contact.ListId" ng-disabled="vm.contact.id && vm.contact.ListId" ng-init="vm.getCustomFields(vm.contact.ListId)" ng-change="vm.getCustomFields(vm.contact.ListId)" required>\n                    <md-optgroup label="Lists">\n                        <md-option ng-value="list.id" ng-repeat="list in vm.lists.rows">{{list.name}}</md-option>\n                        <md-option ng-value="null"><em translate="CONTACTMANAGER.NONE">None</em></md-option>\n                    </md-optgroup>\n                </md-select>\n\n                <div ng-messages="contactForm.list.$error" ng-show="contactForm.list.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.LIST_REQUIRED">List field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div ng-repeat="customField in vm.customFields.rows" class="md-block" ng-switch="customField.type">\n                <div ng-switch-when="datetime">\n                    <label>{{customField.alias}}</label>\n\n                    <div ng-init="vm.contact[\'cf_\' + customField.id] = vm.getDateFromString(vm.contact[\'cf_\' + customField.id])">\n                        <mdp-date-picker mdp-open-on-click ng-required="customField.required" mdp-format="YYYY-MM-DD" ng-model="vm.contact[\'cf_\' + customField.id]"></mdp-date-picker>\n                        <mdp-time-picker mdp-open-on-click mdp-placeholder="Time" ng-required="customField.required" mdp-format="HH:mm:ss" mdp-auto-switch="true" ng-model="vm.contact[\'cf_\' + customField.id]"></mdp-time-picker>\n                    </div>\n                </div>\n\n                <div ng-switch-when="select">\n                    <label>{{customField.alias}}</label>\n\n                    <md-select ng-model="vm.contact[\'cf_\' + customField.id]" ng-required="customField.required">\n                        <md-option ng-repeat="value in customField.values" ng-value="value.value">{{value.value}}</md-option>\n                        <md-option ng-value="null"><em translate="CONTACTMANAGER.NONE">None</em></md-option>\n                    </md-select>\n                </div>\n\n                <div ng-switch-when="switch">\n                    <md-switch aria-label="{{customField.alias}}" ng-model="vm.contact[\'cf_\' + customField.id]" ng-true-value="1" ng-false-value="0">\n                        {{customField.alias}}\n                    </md-switch>\n                </div>\n\n                <md-input-container ng-switch-default>\n                    <label>{{customField.alias}}</label>\n\n                    <input type="{{customField.type}}" ng-model="vm.contact[\'cf_\' + customField.id]" ng-required="customField.required">\n                </md-input-container>\n            </div>\n\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.COMPANY">Company</label>\n                <md-select name="company" ng-model="vm.contact.CompanyId">\n                    <md-optgroup label="Companies">\n                        <md-option ng-value="company.id" ng-repeat="company in vm.companies.rows">{{company.name}}</md-option>\n                    </md-optgroup>\n                </md-select>\n            </md-input-container>\n\n            <div ng-if="!vm.allFields" layout="row" layout-align="center center">\n                <md-button class="md-accent" ng-click="vm.allFields = true" translate="CONTACTMANAGER.SHOW_ALL_FIELDS">Show All Fields</md-button>\n            </div>\n\n            <md-input-container class="md-block" ng-if="vm.allFields" flex-gt-sm="" ng-init="vm.contact.dateOfBirth = vm.getDateFromString(vm.contact.dateOfBirth)">\n                <label translate="CONTACTMANAGER.DATE_OF_BIRTH">Date of Birth</label>\n                <mdp-date-picker mdp-open-on-click mdp-format="YYYY-MM-DD" name="dateOfBirth" ng-model="vm.contact.dateOfBirth"></mdp-date-picker>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.allFields">\n                <label translate="CONTACTMANAGER.COUNTRY">Country</label>\n                <input type="text" name="country" ng-model="vm.contact.country">\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.allFields">\n                <label translate="CONTACTMANAGER.CITY">City</label>\n                <input type="text" name="city" ng-model="vm.contact.city">\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.allFields">\n                <label translate="CONTACTMANAGER.STREET">Street</label>\n                <input type="text" name="street" ng-model="vm.contact.street">\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.allFields">\n                <label translate="CONTACTMANAGER.POSTAL_CODE">Postal Code</label>\n                <input type="text" name="postalCode" ng-model="vm.contact.postalCode">\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.allFields">\n                <label translate="CONTACTMANAGER.NOTES">Notes</label>\n                <input type="text" name="description" ng-model="vm.contact.description">\n            </md-input-container>\n\n            <div ng-if="vm.allFields" layout="row" layout-align="center center">\n                <md-button class="md-accent" ng-click="vm.allFields = false" translate="CONTACTMANAGER.FEWER_FIELDS">Fewer Fields</md-button>\n            </div>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newContact" ng-click="vm.saveContact()" class="send-button md-accent md-raised" ng-disabled="contactForm.$invalid || contactForm.$pristine" aria-label="SAVE" translate="CONTACTMANAGER.SAVE" translate-attr-aria-label="CONTACTMANAGER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newContact" ng-click="vm.addNewContact()" class="send-button md-accent md-raised" ng-disabled="contactForm.$invalid || contactForm.$pristine" aria-label="ADD" translate="CONTACTMANAGER.ADD_CONTACT" translate-attr-aria-label="CONTACTMANAGER.ADD_CONTACT">\n                    ADD CONTACT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newContact" ng-click="vm.deleteContact($event)" aria-label="DELETE" translate translate-attr-aria-label="CONTACTMANAGER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CONTACTMANAGER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/contacts/duplicate/dialog.html",'<md-dialog class="cm-contact-dialog" aria-label="{{ \'CONTACTMANAGER.DUPLICATE_CONTACT\' | translate }}">\n    <form name="contactForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.LIST">List</label>\n                <md-select name="list" ng-model="vm.contact.ListId">\n                    <md-optgroup label="Lists">\n                        <md-option ng-value="list.id" ng-repeat="list in vm.lists.rows">{{list.name}}</md-option>\n                    </md-optgroup>\n                </md-select>\n\n                <div ng-messages="contactForm.list.$error" ng-show="contactForm.list.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.LIST_REQUIRED">List field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.addNewContact()" class="send-button md-accent md-raised" ng-disabled="contactForm.$invalid" aria-label="ADD" translate="CONTACTMANAGER.ADD_CONTACT" translate-attr-aria-label="CONTACTMANAGER.ADD_CONTACT">\n                    ADD CONTACT\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/contacts/edit/hoppers/dialog.html",'<md-dialog class="hopper-dialog" aria-label="New Hopper">\n    <form name="hopperForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <div flex class="md-block">\n                <mdp-date-picker mdp-open-on-click name="scheduledatDate" mdp-placeholder="Date" mdp-format="YYYY-MM-DD" ng-model="vm.hopper.scheduledat" ng-init="vm.hopper.scheduledat = vm.getDateFromString(vm.hopper.scheduledat)">\n                    <div ng-messages="hopperForm.dateRangeFrom.$error" ng-show="hopperForm.dateRangeFrom.$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="CONTACTMANAGER.ERRORS.DATE_REQUIRED">Date is required</span>\n                        </div>\n                        <div ng-message="format">\n                            <span translate="CONTACTMANAGER.ERRORS.DATE_INVALID">Date is invalid</span>\n                        </div>\n                    </div>\n                </mdp-date-picker>\n            </div>\n\n            <div flex class="md-block">\n                <mdp-time-picker mdp-open-on-click name="scheduledatTime" mdp-placeholder="Time" mdp-format="HH:mm:ss" mdp-auto-switch="true" ng-model="vm.hopper.scheduledat" ng-init="vm.hopper.scheduledat = vm.getDateFromString(vm.hopper.scheduledat)">\n                    <div ng-messages="hopperForm.timeRangeFrom.$error" ng-show="hopperForm.timeRangeFrom.$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="CONTACTMANAGER.ERRORS.TIME_REQUIRED">Time is required</span>\n                        </div>\n                        <div ng-message="format">\n                            <span translate="CONTACTMANAGER.ERRORS.TIME_INVALID">Time is invalid</span>\n                        </div>\n                    </div>\n                </mdp-time-picker>\n            </div>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newHopper" ng-click="vm.saveHopper()" class="send-button md-accent md-raised" ng-disabled="hopperForm.$invalid || hopperForm.$pristine" aria-label="SAVE" translate="CONTACTMANAGER.SAVE" translate-attr-aria-label="CONTACTMANAGER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newHopper" ng-click="vm.addNewHopper()" class="send-button md-accent md-raised" ng-disabled="hopperForm.$invalid" aria-label="ADD" translate="CONTACTMANAGER.ADD_HOPPER" translate-attr-aria-label="CONTACTMANAGER.ADD_HOPPER">\n                    ADD HOPPER\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newHopper" ng-click="vm.deleteHopper($event)" aria-label="DELETE" translate translate-attr-aria-label="CONTACTMANAGER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CONTACTMANAGER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/contacts/edit/view.html",'<div id="cm-contact" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-contacts-button md-icon-button" aria-label="Go to contacts" ng-click="vm.gotoContacts()" translate translate-attr-aria-label="CONTACTMANAGER.GO_TO_CONTACTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="contact-image" hide-xs>\n                    <img ng-src="assets/images/business/contacts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.contact.id}} {{vm.contact.firstName}} {{vm.contact.lastName}}\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="CONTACTMANAGER.CREATED_AT"></span> <span>{{vm.contact.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div ng-if="vm.contact.role && vm.contact.role !== \'admin\'" ng-controller="ContactQueueAddButtonController as vm_contact_qa" ng-cloak>\n            <md-fab-speed-dial ng-hide="vm_contact_qa.hidden" md-direction="left" md-open="vm_contact_qa.isOpen" class="md-scale md-fab" ng-class="{ \'md-hover-full\': vm_contact_qa.hover }" ng-mouseenter="vm_contact_qa.isOpen=true" ng-mouseleave="vm_contact_qa.isOpen=false">\n                <md-fab-trigger>\n                    <md-button aria-label="menu" class="md-fab md-primary md-icon-button">\n                        <md-tooltip md-direction="top" md-visible="tooltipVisible">Channels</md-tooltip>\n                        <md-icon md-font-icon="icon-eye" aria-label="channels"></md-icon>\n                    </md-button>\n                </md-fab-trigger>\n                <md-fab-actions>\n                    <div ng-repeat="channel in vm_contact_qa.channels">\n                        <md-button aria-label="{{channel.name}}" class="md-fab md-raised md-icon-button md-mini" ng-click="vm_contact_qa.openDialog($event, vm.contact, channel)">\n                            <md-tooltip md-direction="{{channel.direction}}" md-visible="tooltipVisible" md-autohide="false">\n                                {{channel.name}}\n                            </md-tooltip>\n                            <md-icon md-font-icon="{{channel.icon}}" aria-label="{{channel.name}}"></md-icon>\n                        </md-button>\n                    </div>\n                </md-fab-actions>\n            </md-fab-speed-dial>\n        </div>\n\n        <div>\n            <md-button ng-click="vm.duplicateContact($event)" class="md-fab md-warn md-icon-button" aria-label="DUPLICATE">\n                <md-icon md-font-icon="icon-file-multiple"></md-icon>\n            </md-button>\n            <md-button type="submit" ng-click="vm.saveContact()" class="send-button md-accent md-raised" ng-disabled="detailForm.$pristine && customFieldsForm.$pristine" translate="CONTACTMANAGER.SAVE" translate-attr-aria-label="CONTACTMANAGER.SAVE">\n                SAVE\n            </md-button>\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CONTACTMANAGER.DETAIL">DETAIL</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div layout="row">\n                        <div layout="column" flex="70">\n                            <md-card class="contact-detail-form-container personal_info md-background-bg md-whiteframe-1dp">\n                                <div class="pb-16" layout="row" layout-align="start center">\n                                    <div class="h2 secondary-text text-truncate" translate="CONTACTMANAGER.PERSONAL_INFO">PERSONAL_INFO</div>\n                                </div>\n                                <form name="detailForm" novalidate>\n                                    <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                        \x3c!-- fistName --\x3e\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="CONTACTMANAGER.FIRSTNAME">First Name</label>\n                                            <md-icon md-font-icon="icon-account" class="firstname"></md-icon>\n                                            <input type="text" name="firstName" ng-model="vm.contact.firstName" class="text-truncate" required>\n\n                                            <div ng-messages="detailForm.firstName.$error" ng-show="detailForm.firstName.$touched" role="alert">\n                                                <div ng-message="required">\n                                                    <span translate="CONTACTMANAGER.ERRORS.FIRSTNAME_REQUIRED">First name field is required</span>\n                                                </div>\n                                            </div>\n                                        </md-input-container>\n                                        <div flex="5"></div>\n                                        \x3c!-- lastName --\x3e\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="CONTACTMANAGER.LASTNAME">Last Name</label>\n                                            <input type="text" name="lastName" ng-model="vm.contact.lastName" class="text-truncate">\n                                        </md-input-container>\n\n                                    </div>\n\n                                    <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                        \x3c!-- phone --\x3e\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="CONTACTMANAGER.PHONE">Phone</label>\n                                            <md-icon md-font-icon="icon-phone"></md-icon>\n                                            <input type="text" name="phone" ng-model="vm.contact.phone" class="text-truncate" required>\n\n                                            <div ng-messages="detailForm.phone.$error" ng-show="detailForm.phone.$touched" role="alert">\n                                                <div ng-message="required">\n                                                    <span translate="CONTACTMANAGER.ERRORS.PHONE_REQUIRED">Phone name field is required</span>\n                                                </div>\n                                            </div>\n                                        </md-input-container>\n                                        <div flex="5"></div>\n                                        \x3c!-- mobile --\x3e\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="CONTACTMANAGER.MOBILE">Mobile</label>\n                                            <md-icon md-font-icon="icon-cellphone-iphone"></md-icon>\n                                            <input type="text" name="mobile" ng-model="vm.contact.mobile" class="text-truncate">\n                                        </md-input-container>\n                                    </div>\n\n                                    <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                        \x3c!-- email --\x3e\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="CONTACTMANAGER.EMAIL">Email</label>\n                                            <md-icon md-font-icon="icon-email" class="email"></md-icon>\n                                            <input type="email" name="email" ng-model="vm.contact.email" class="text-truncate">\n                                            <div ng-messages="detailForm.firstName.$error" ng-show="detailForm.firstName.$touched" role="alert">\n                                                <div ng-message="email">\n                                                    <span translate="CONTACTMANAGER.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                                                </div>\n                                            </div>\n                                        </md-input-container>\n                                        <div flex="5"></div>\n                                        \x3c!-- fax --\x3e\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="CONTACTMANAGER.FAX">Fax</label>\n                                            <md-icon md-font-icon="icon-deskphone"></md-icon>\n                                            <input type="text" name="fax" ng-model="vm.contact.fax">\n                                        </md-input-container>\n                                    </div>\n\n                                    <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                        \x3c!-- date of birdth --\x3e\n                                        \x3c!-- <md-input-container class="md-block" flex-gt-sm="">\n                                      <mdp-date-picker mdp-open-on-click name="dateOfBirth" mdp-placeholder="Date Of Birth" mdp-format="YYYY-MM-DD" ng-model="vm.contact.dateOfBirth">\n                                          <div ng-messages="detailForm.dateOfBirth.$error" ng-show="reportForm.dateOfBirth.$touched" role="alert">\n                                              <div ng-message="format">\n                                                  <span translate="CONTACTMANAGER.ERRORS.DATE_OF_RANGE_FROM_INVALID">Date Range From field is invalid</span>\n                                              </div>\n                                          </div>\n                                      </mdp-date-picker>\n                                    </md-input-container> --\x3e\n\n                                        <md-input-container class="md-block" flex-gt-sm="" ng-init="vm.contact.dateOfBirth = vm.getDateFromString(vm.contact.dateOfBirth)">\n                                            <label translate="CONTACTMANAGER.DATE_OF_BIRTH">Date of Birth</label>\n                                            <mdp-date-picker mdp-open-on-click mdp-format="YYYY-MM-DD" name="dateOfBirth" ng-model="vm.contact.dateOfBirth"></mdp-date-picker>\n                                        </md-input-container>\n                                    </div>\n\n                                    <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                        <md-input-container ng-if="vm.companies.rows.length" class="md-block" flex-gt-sm="">\n                                            <label translate="CONTACTMANAGER.COMPANY">Company</label>\n                                            <md-icon md-font-icon="icon-domain"></md-icon>\n                                            <md-select name="company" ng-model="vm.contact.CompanyId">\n                                                <md-optgroup label="Companies">\n                                                    <md-option ng-value="company.id" ng-repeat="company in vm.companies.rows">{{company.name}}</md-option>\n                                                    <md-option ng-value="null"><em translate="CONTACTMANAGER.NONE">None</em></md-option>\n                                                </md-optgroup>\n                                            </md-select>\n                                            <md-icon class="pointer" ng-show="vm.contact.CompanyId" md-font-icon="icon-information-outline" ng-click="vm.editCompany($event, vm.contact.CompanyId)"></md-icon>\n                                        </md-input-container>\n                                        <section ng-if="!vm.companies.rows.length" flex-gt-sm="">\n                                            <md-icon md-font-icon="icon-briefcase"></md-icon>\n                                            <label translate="CONTACTMANAGER.NO_COMPANIES">No Companies</label>\n                                            <md-button class="md-accent" translate="CONTACTMANAGER.ADD_COMPANY">Add Company</md-button>\n                                        </section>\n                                    </div>\n\n                                    <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                        <md-input-container ng-if="vm.tags.rows.length" class="md-block" flex-gt-sm="">\n                                            <label translate="CONTACTMANAGER.TAGS">Tags</label>\n                                            <md-icon md-font-icon="icon-tag"></md-icon>\n                                            <md-select ng-model="vm.contact.tags" multiple>\n                                                <md-optgroup label="Tags">\n                                                    <md-option ng-value="tag.name" ng-repeat="tag in vm.tags.rows">{{tag.name}}</md-option>\n                                                </md-optgroup>\n                                            </md-select>\n                                        </md-input-container>\n                                        <section ng-if="!vm.tags.rows.length" flex-gt-sm="">\n                                            <md-icon md-font-icon="icon-tag"></md-icon>\n                                            <label translate="CONTACTMANAGER.NO_TAGS">No Tags</label>\n                                            <md-button class="md-accent" translate="CONTACTMANAGER.ADD_TAG">Add Tag</md-button>\n                                        </section>\n                                    </div>\n\n                                    <div ng-if="!vm.allFields" layout="row" layout-align="center center">\n                                        <md-button class="md-accent" ng-click="vm.allFields = true" translate="CONTACTMANAGER.SHOW_ALL_FIELDS">Show All Fields</md-button>\n                                    </div>\n\n                                    <div ng-if="vm.allFields">\n                                        <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                            \x3c!-- country --\x3e\n                                            <md-input-container class="md-block" flex-gt-sm="">\n                                                <label translate="CONTACTMANAGER.COUNTRY">Country</label>\n                                                <md-icon md-font-icon="icon-home" class="country"></md-icon>\n                                                <input type="text" name="country" ng-model="vm.contact.country" class="text-truncate">\n                                            </md-input-container>\n                                            <div flex="5"></div>\n                                            \x3c!-- city --\x3e\n                                            <md-input-container class="md-block" flex-gt-sm="">\n                                                <label translate="CONTACTMANAGER.CITY">City</label>\n                                                <input type="text" name="city" ng-model="vm.contact.city">\n                                            </md-input-container>\n                                        </div>\n\n                                        <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                            <div flex="5"></div>\n                                            \x3c!-- street --\x3e\n                                            <md-input-container class="md-block" flex-gt-sm="">\n                                                <label translate="CONTACTMANAGER.STREET">Street</label>\n                                                <input type="text" name="street" ng-model="vm.contact.street">\n                                            </md-input-container>\n                                            <div flex="5"></div>\n                                            \x3c!-- postalCode --\x3e\n                                            <md-input-container class="md-block" flex-gt-sm="">\n                                                <label translate="CONTACTMANAGER.POSTALCODE">Postal Code</label>\n                                                <input type="text" name="postalCode" ng-model="vm.contact.postalCode">\n                                            </md-input-container>\n                                        </div>\n\n                                        <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                            <md-input-container class="md-block" flex-gt-sm="">\n                                                <label translate translate-attr-placeholder="CONTACTMANAGER.NOTES">Notes</label>\n                                                <md-icon md-font-icon="icon-note"></md-icon>\n                                                <textarea ng-model="vm.contact.description" type="text" max-rows="4"></textarea>\n                                            </md-input-container>\n                                        </div>\n\n                                        <div layout="row" layout-align="center center">\n                                            <md-button class="md-accent" ng-click="vm.allFields = false" translate="CONTACTMANAGER.FEWER_FIELDS">Fewer Fields\n                                            </md-button>\n                                        </div>\n\n                                    </div>\n                                </form>\n                            </md-card>\n                            <md-card class="contact-detail-form-container personal_info md-background-bg md-whiteframe-1dp">\n                                <div class="pb-16" layout="row" layout-align="start center">\n                                    <div class="h2 secondary-text text-truncate" translate="CONTACTMANAGER.SOCIAL">Social</div>\n                                </div>\n                                <form name="socialForm" novalidate>\n                                    <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                        \x3c!-- fistName --\x3e\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label>Facebook</label>\n                                            <md-icon md-font-icon="icon-facebook" class="facebook"></md-icon>\n                                            <input type="text" name="facebook" ng-model="vm.contact.facebook" class="text-truncate">\n                                        </md-input-container>\n                                        <div flex="5"></div>\n                                        \x3c!-- lastName --\x3e\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label>Twitter</label>\n                                            <md-icon md-font-icon="icon-twitter" class="twitter"></md-icon>\n                                            <input type="text" name="twitter" ng-model="vm.contact.twitter" class="text-truncate">\n                                        </md-input-container>\n\n                                    </div>\n                                </form>\n                            </md-card>\n                        </div>\n\n                        <div flex></div>\n\n                        <div class="contact-detail-form-container personal_info md-background-bg md-whiteframe-1dp" flex="25">\n                            <div class="pb-16" layout="row" layout-align="start center">\n                                <div class="h2 secondary-text text-truncate" translate="CONTACTMANAGER.CUSTOM_FIELDS">CUSTOM FIELDS</div>\n                            </div>\n                            <form name="customFieldsForm" novalidate>\n                                <md-input-container class="md-block">\n                                    <label translate translate-attr-placeholder="CONTACTMANAGER.LIST">List</label>\n                                    <md-select name="list" ng-model="vm.contact.ListId" md-on-close="vm.onSelectList($event)" ng-disabled="vm.contact.ListId">\n                                        <md-optgroup label="Lists">\n                                            <md-option ng-value="list.id" ng-repeat="list in vm.lists.rows">#{{list.id}} - {{list.name}}</md-option>\n                                            <md-option ng-value="null"><em translate="CONTACTMANAGER.NONE">None</em></md-option>\n                                        </md-optgroup>\n                                    </md-select>\n                                </md-input-container>\n                                <div ng-repeat="customField in vm.customFields.rows" ng-switch="customField.type">\n                                    <md-input-container class="md-block" ng-switch-when="datetime">\n                                        <label>{{customField.alias}}</label>\n                                        <div ng-init="vm.contact[\'cf_\' + customField.id] = vm.getDateFromString(vm.contact[\'cf_\' + customField.id])">\n                                            <mdp-date-picker mdp-open-on-click ng-required="customField.required" mdp-format="YYYY-MM-DD" ng-model="vm.contact[\'cf_\' + customField.id]"></mdp-date-picker>\n                                            <mdp-time-picker mdp-open-on-click mdp-placeholder="Time" ng-required="customField.required" mdp-format="HH:mm:ss" mdp-auto-switch="true" ng-model="vm.contact[\'cf_\' + customField.id]"></mdp-time-picker>\n                                        </div>\n                                    </md-input-container>\n\n                                    <md-input-container class="md-block" ng-switch-when="select">\n                                        <label>{{customField.alias}}</label>\n                                        <md-select ng-model="vm.contact[\'cf_\' + customField.id]" ng-required="customField.required">\n                                            <md-option ng-repeat="value in customField.values" ng-value="value.value">{{value.value}}</md-option>\n                                            <md-option ng-value="null"><em translate="CONTACTMANAGER.NONE">None</em></md-option>\n                                        </md-select>\n                                    </md-input-container>\n\n                                    <md-input-container class="md-block" ng-switch-when="switch">\n                                        <md-switch aria-label="{{customField.alias}}" ng-model="vm.contact[\'cf_\' + customField.id]" ng-true-value="1" ng-false-value="0">\n                                            {{customField.alias}}\n                                        </md-switch>\n                                    </md-input-container>\n\n                                    <md-input-container class="md-block" ng-switch-default>\n                                        <label>{{customField.alias}}</label>\n                                        <input type="{{customField.type}}" ng-model="vm.contact[\'cf_\' + customField.id]" ng-required="customField.required">\n                                    </md-input-container>\n                                </div>\n                            </form>\n                        </div>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n\n            <md-tab ng-if="vm.license.dialer">\n                <md-tab-label>\n                    <span translate="CONTACTMANAGER.MOTION_BULL">MOTION BULL</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div layout="row">\n                        <div class="contact-detail-form-container personal_info md-background-bg md-whiteframe-1dp" flex>\n                            <md-toolbar class="md-table-toolbar md-default">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="CONTACTMANAGER.HOPPER">Hopper</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm.queryHopper.filter = query;" on-collapse="vm.queryHopper.filter = undefined;" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm.getHoppers()" aria-label="reload" translate translate-attr-label="CONTACTMANAGER.RELOAD">\n                                        <md-tooltip>{{\'CONTACTMANAGER.RELOAD\' | translate}}</md-tooltip>\n                                        <md-icon md-font-icon="icon-reload"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n\n                            \x3c!-- HOPPER TABLE --\x3e\n                            <md-table-container>\n                                <table md-table multiple md-progress="vm.promise">\n                                    <thead md-head md-order="vm.queryHopper.sort" md-on-reorder="vm.getHoppers">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'CONTACTMANAGER.ID\' | translate }}</th>\n                                            <th md-column md-order-by="phone">{{ \'CONTACTMANAGER.PHONE\' | translate }}</th>\n                                            <th md-column md-order-by="scheduledat">{{ \'CONTACTMANAGER.SCHEDULEDAT\' | translate }}</th>\n                                            <th md-column md-order-by="priority">{{ \'MOTIONDIALER.PRIORITY\' | translate }}</th>\n                                            <th md-column md-order-by="scheduledat">{{ \'CONTACTMANAGER.SCHEDULEDAT\' | translate }}</th>\n                                            <th md-column md-order-by="VoiceQueueId">{{ \'CONTACTMANAGER.VOICEQUEUEID\' | translate }}</th>\n                                            <th md-column md-order-by="CampaignId">{{ \'CONTACTMANAGER.CAMPAIGNID\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row ng-hide="vm.hoppers.count">\n                                            <td md-cell colspan="4">\n                                                <div layout="row" layout-align="center center">\n                                                    <span tranlsate="CONTACTMANAGER.NO_AVAILABLE_INFO">No Available Info</span>\n                                                </div>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-repeat="(id, hopper) in vm.hoppers.rows">\n                                            <td md-cell>{{hopper.id}}</td>\n                                            <td md-cell>{{hopper.phone}}</td>\n                                            <td md-cell>{{hopper.scheduledat | date:\'medium\'}}</td>\n                                            <td md-cell>{{ vm.arraypriority[hopper.priority].option }}</td>\n                                            <td md-cell class="recallme ">\n                                                <md-icon md-colors="{color: {{hopper.recallme ? \'\\\'green\\\'\' : \'\\\'red\\\'\'}}}" md-font-icon="{{hopper.recallme? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                            </td>\n                                            <td md-cell>{{hopper.VoiceQueueId}}</td>\n                                            <td md-cell>{{hopper.CampaignId}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CONTACTMANAGER.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="2">\n                                                        <md-menu-item>\n                                                            <md-button ng-if="hopper.VoiceQueueId" ng-click="vm.editHopper($event, hopper)" translate="CONTACTMANAGER.EDIT_HOPPER">\n                                                                Edit Hopper\n                                                            </md-button>\n                                                            <md-button ng-if="hopper.CampaignId" ng-click="vm.createOrEditIvrCampaignHopper($event, hopper)" translate="CONTACTMANAGER.EDIT_HOPPER">\n                                                                Edit Hopper\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm.deleteconfirm(hopper, $event)" translate="CONTACTMANAGER.DELETE_HOPPER">\n                                                                Delete Hopper\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n\n                            <md-table-pagination md-label="{page: \'{{\'CONTACTMANAGER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CONTACTMANAGER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CONTACTMANAGER.OF\' | translate}}\'}" md-limit="vm.queryHopper.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                                md-page="vm.queryHopper.page" md-total="{{vm.hoppers.count}}" md-on-paginate="vm.getHoppers" md-page-select></md-table-pagination>\n                            \x3c!-- / HOPPER TABLE --\x3e\n                        </div>\n                    </div>\n\n                    <div layout="row">\n                        <div class="contact-detail-form-container personal_info md-background-bg md-whiteframe-1dp" flex>\n                            <md-toolbar class="md-table-toolbar md-default">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="CONTACTMANAGER.FINAL">Final</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm.queryFinal.filter = query;" on-collapse="vm.queryFinal.filter = undefined;" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm.getFinals()" aria-label="reload" translate translate-attr-label="CONTACTMANAGER.RELOAD">\n                                        <md-tooltip>{{\'CONTACTMANAGER.RELOAD\' | translate}}</md-tooltip>\n                                        <md-icon md-font-icon="icon-reload"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n\n                            \x3c!-- HOPPER TABLE --\x3e\n                            <md-table-container>\n                                <table md-table multiple md-progress="vm.promise">\n                                    <thead md-head md-order="vm.queryFinal.sort" md-on-reorder="vm.getFinals">\n                                        <tr md-row>\n                                            <th md-column md-order-by="uniqueid">{{ \'CONTACTMANAGER.UNIQUEID\' | translate }}</th>\n                                            <th md-column md-order-by="calleridnum">{{ \'CONTACTMANAGER.PHONE\' | translate }}</th>\n                                            <th md-column md-order-by="state">{{ \'CONTACTMANAGER.STATE\' | translate }}</th>\n                                            <th md-column md-order-by="starttime">{{ \'CONTACTMANAGER.STARTTIME\' | translate }}</th>\n                                            <th md-column md-order-by="disposition">{{ \'CONTACTMANAGER.DISPOSITION\' | translate }}</th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row ng-hide="vm.finals.count">\n                                            <td md-cell colspan="5">\n                                                <div layout="row" layout-align="center center">\n                                                    <span tranlsate="CONTACTMANAGER.NO_AVAILABLE_INFO">No Available Info</span>\n                                                </div>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-repeat="(id, final) in vm.finals.rows">\n                                            <td md-cell>{{final.uniqueid}}</td>\n                                            <td md-cell>{{final.calleridnum}}</td>\n                                            <td md-cell>{{final.statedesc}}</td>\n                                            <td md-cell>{{final.starttime | date:\'medium\'}}</td>\n                                            <td md-cell>{{final.disposition}}</td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n\n                            <md-table-pagination md-label="{page: \'{{\'CONTACTMANAGER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CONTACTMANAGER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CONTACTMANAGER.OF\' | translate}}\'}" md-limit="vm.queryFinal.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                                md-page="vm.queryFinal.page" md-total="{{vm.finals.count}}" md-on-paginate="vm.getFinals" md-page-select></md-table-pagination>\n                            \x3c!-- / HOPPER TABLE --\x3e\n                        </div>\n                    </div>\n\n                    <div layout="row">\n                        <div class="contact-detail-form-container personal_info md-background-bg md-whiteframe-1dp" flex>\n                            <md-toolbar class="md-table-toolbar md-default">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="CONTACTMANAGER.HISTORY">History</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm.queryHistory.filter = query;" on-collapse="vm.queryHistory.filter = undefined;" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm.getHistories()" aria-label="reload" translate translate-attr-label="CONTACTMANAGER.RELOAD">\n                                        <md-tooltip>{{\'CONTACTMANAGER.RELOAD\' | translate}}</md-tooltip>\n                                        <md-icon md-font-icon="icon-reload"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n\n                            \x3c!-- HOPPER TABLE --\x3e\n                            <md-table-container>\n                                <table md-table multiple md-progress="vm.promise">\n                                    <thead md-head md-order="vm.queryHistory.sort" md-on-reorder="vm.getHistories">\n                                        <tr md-row>\n                                            <th md-column md-order-by="uniqueid">{{ \'CONTACTMANAGER.UNIQUEID\' | translate }}</th>\n                                            <th md-column md-order-by="calleridnum">{{ \'CONTACTMANAGER.PHONE\' | translate }}</th>\n                                            <th md-column md-order-by="state">{{ \'CONTACTMANAGER.STATE\' | translate }}</th>\n                                            <th md-column md-order-by="scheduledat">{{ \'CONTACTMANAGER.SCHEDULEDAT\' | translate }}</th>\n                                            <th md-column md-order-by="starttime">{{ \'CONTACTMANAGER.STARTTIME\' | translate }}</th>\n                                            <th md-column md-order-by="endtime">{{ \'CONTACTMANAGER.ENDTIME\' | translate }}</th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row ng-hide="vm.histories.count">\n                                            <td md-cell colspan="7">\n                                                <div layout="row" layout-align="center center">\n                                                    <span tranlsate="CONTACTMANAGER.NO_AVAILABLE_INFO">No Available Info</span>\n                                                </div>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-repeat="(id, history) in vm.histories.rows">\n                                            <td md-cell>{{history.uniqueid}}</td>\n                                            <td md-cell>{{history.calleridnum}}</td>\n                                            <td md-cell>{{history.statedesc}}</td>\n                                            <td md-cell>{{history.scheduledat | date:\'medium\'}}</td>\n                                            <td md-cell>{{history.starttime | date:\'medium\'}}</td>\n                                            <td md-cell>{{history.endtime | date:\'medium\'}}</td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n\n                            <md-table-pagination md-label="{page: \'{{\'CONTACTMANAGER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CONTACTMANAGER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CONTACTMANAGER.OF\' | translate}}\'}" md-limit="vm.queryHistory.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                                md-page="vm.queryHistory.page" md-total="{{vm.histories.count}}" md-on-paginate="vm.getHistories" md-page-select></md-table-pagination>\n                            \x3c!-- / HOPPER TABLE --\x3e\n                        </div>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n\n            <md-tab ng-if="vm.license.jscripty">\n                <md-tab-label>\n                    <span translate="CONTACTMANAGER.JSCRIPTY">JSCRIPTY</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div layout="row">\n                        <div class="contact-detail-form-container personal_info md-background-bg md-whiteframe-1dp" flex>\n                            <md-toolbar class="md-table-toolbar md-default">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="CONTACTMANAGER.SESSIONS">Sessions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm.queryJscriptySession.filter = query;" on-collapse="vm.queryJscriptySession.filter = undefined;" debounce="300"></ms-search-bar>\n                                </div>\n                            </md-toolbar>\n\n                            \x3c!-- SESSION TABLE --\x3e\n                            <md-table-container>\n                                <table md-table multiple md-progress="vm.promise">\n                                    <thead md-head md-order="vm.queryJscriptySession.sort" md-on-reorder="vm.getJscriptySessions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'CONTACTMANAGER.ID\' | translate }}</th>\n                                            <th md-column md-order-by="starttime">{{ \'CONTACTMANAGER.STARTTIME\' | translate }}</th>\n                                            <th md-column md-order-by="endtime">{{ \'CONTACTMANAGER.ENDTIME\' | translate }}</th>\n                                            <th md-column md-order-by="agent">{{ \'CONTACTMANAGER.AGENT\' | translate }}</th>\n                                            <th md-column md-order-by="project">{{ \'CONTACTMANAGER.PROJECT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row ng-hide="vm.jscriptySessions.count">\n                                            <td md-cell colspan="6">\n                                                <div layout="row" layout-align="center center">\n                                                    <span tranlsate="CONTACTMANAGER.NO_AVAILABLE_INFO">No Available Info</span>\n                                                </div>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-repeat="(id, session) in vm.jscriptySessions.rows">\n                                            <td md-cell>{{session.id}}</td>\n                                            <td md-cell>{{session.starttime | date:\'medium\'}}</td>\n                                            <td md-cell>{{session.endtime | date:\'medium\'}}</td>\n                                            <td md-cell>{{session.membername}}</td>\n                                            <td md-cell>{{session.projectname}}</td>\n                                            <td md-cell class="actions">\n                                                \x3c!-- <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CONTACTMANAGER.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical" ></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="2">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm.editHopper($event, hopper)" translate="CONTACTMANAGER.EDIT_HOPPER">\n                                                                Edit Hopper\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm.deleteconfirm(hopper, $event)" translate="CONTACTMANAGER.DELETE_HOPPER">\n                                                                Delete Hopper\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu> --\x3e\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n\n                            <md-table-pagination md-label="{page: \'{{\'CONTACTMANAGER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CONTACTMANAGER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CONTACTMANAGER.OF\' | translate}}\'}" md-limit="vm.queryHopper.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                                md-page="vm.queryHopper.page" md-total="{{vm.hoppers.count}}" md-on-paginate="vm.getHoppers" md-page-select></md-table-pagination>\n                            \x3c!-- / SESSION TABLE --\x3e\n                        </div>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n\n            \x3c!-- <md-tab>\n                <md-tab-label>\n                    <span translate="CONTACTMANAGER.CUSTOMER_JOURNEY">CUSTOMER JOURNEY</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div layout="row">\n                        <div class="contact-detail-form-container personal_info md-background-bg md-whiteframe-1dp" flex>\n\n                        </div>\n                    </div>\n                </md-tab-body>\n            </md-tab> --\x3e\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/contactmanager/views/contacts/import/import.html",'<md-dialog class="import-dialog" aria-label="Import contact">\n    <form name="importForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title" translate="CONTACTMANAGER.IMPORT_CONTACTS">Import Contacts</span>\n                <md-button ng-if="vm.result.finish || !vm.processing" class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <div md-background-bg layout="row" layout-align="start start">\n            <md-progress-linear ng-disabled="!vm.processing || vm.result.finish" md-mode="indeterminate" class="md-warn"></md-progress-linear>\n        </div>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <div>\n                <md-content ng-show="!vm.processing">\n                    <div class="form-title" translate="CONTACTMANAGER.CONTACTMANAGER">CONTACT MANAGER</div>\n\n                    <md-input-container class="md-icon-float md-block" ng-repeat="contactField in vm.contactFields">\n                        <label>{{\'CONTACTMANAGER.\' + contactField.key | uppercase | translate}}</label>\n                        <md-select name="{{contactField.key}}" ng-model="vm.binding[contactField.key]" placeholder="{{\'CONTACTMANAGER.\' + contactField.key | uppercase | translate}}" ng-required="contactField.required">\n                            <md-option ng-value="field" ng-repeat="field in vm.fields">{{ field }}</md-option>\n                            <md-option ng-value="null" ng-hide="contactField.required">\n                                <em>{{ \'CONTACTMANAGER.NONE\' | translate }}</em>\n                            </md-option>\n                        </md-select>\n                    </md-input-container>\n\n                    <md-input-container class="md-icon-float md-block">\n                        <label translate="CONTACTMANAGER.LIST">List</label>\n                        <md-select name="list" ng-model="vm.ListId" placeholder="Select a list" ng-change="vm.onChangeList()" required>\n                            <md-option ng-value="list.id" ng-repeat="list in vm.lists.rows">{{list.name}}</md-option>\n                        </md-select>\n                    </md-input-container>\n\n                    <md-input-container class="md-icon-float md-block" ng-repeat="customField in vm.customFields.rows">\n                        <label>{{customField.alias}}</label>\n                        <md-select ng-model="vm.binding[\'cf_\' + customField.id]" placeholder="{{customField.alias}}" ng-required="customField.required">\n                            <md-option ng-value="field" ng-repeat="field in vm.fields">{{ field }}</md-option>\n                            <md-option ng-value="null" ng-hide="customField.required">\n                                <em>{{ \'CONTACTMANAGER.NONE\' | translate }}</em>\n                            </md-option>\n                        </md-select>\n                    </md-input-container>\n\n                    <md-input-container class="md-icon-float md-block">\n                        <label translate="CONTACTMANAGER.COMPANY">Company</label>\n                        <md-select name="company" ng-model="vm.CompanyId" placeholder="Select a company">\n                            <md-option ng-value="company.id" ng-repeat="company in vm.companies.rows">{{company.name}}</md-option>\n                            <md-option ng-value="null">\n                                <em translate="CONTACTMANAGER.NONE">None</em>\n                            </md-option>\n                        </md-select>\n                    </md-input-container>\n\n                    <md-input-container class="md-icon-float md-block">\n                        <md-select ng-model="vm.duplicates" placeholder="{{ \'CONTACTMANAGER.CHECK_DUPLICATES\' | translate}}" multiple>\n                            <md-option ng-value="contactField.key" ng-repeat="contactField in vm.contactFields">{{ \'CONTACTMANAGER.\' + contactField.key | uppercase | translate}}</md-option>\n                        </md-select>\n                    </md-input-container>\n\n                    <div ng-if="vm.license.dialer">\n                        <div class="form-title" translate="CONTACTMANAGER.MOTIONDIALER">MOTION BULL</div>\n\n                        <md-input-container class="md-icon-float md-block" ng-repeat="motionBullField in vm.motionBullFields">\n                            <label>{{\'CONTACTMANAGER.\' + motionBullField.key | uppercase | translate}}</label>\n                            <md-select name="{{motionBullField.key}}" ng-model="vm.binding[motionBullField.key]" placeholder="{{\'CONTACTMANAGER.\' + motionBullField.key | uppercase | translate}}" ng-required="motionBullField.required">\n                                <md-option ng-value="field" ng-repeat="field in vm.fields">{{ field }}</md-option>\n                                <md-option ng-value="null" ng-hide="contactField.required">\n                                    <em>{{ \'CONTACTMANAGER.NONE\' | translate }}</em>\n                                </md-option>\n                            </md-select>\n                        </md-input-container>\n                    </div>\n\n                </md-content>\n\n                <div class="error-list" ng-if="vm.result.finish">\n                    <div class="info" layout="row" layout-align="space-between center">\n                        <div>\n                            <div class="message">{{\'CONTACTMANAGER.UPLOAD_COMPLETED\' | translate | uppercase}} ({{vm.result.elapsed}}s)</div>\n                        </div>\n                        <md-button class="md-icon-button">\n                            <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                        </md-button>\n                    </div>\n                </div>\n\n                <div layout="row" ng-if="vm.processing">\n                    \x3c!-- WIDGET PROCESSING --\x3e\n                    <ms-widget ng-if="!vm.result.finish" class="h-140" flex>\n                        \x3c!-- Front --\x3e\n                        <ms-widget-front class="p-16 white-bg">\n                            <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                <div class="md-display-1 pb-8 orange-fg">\n                                    <span ng-bind="vm.result.rows"></span>\n                                </div>\n                                <div ng-if="vm.processing" class="font-weight-500 secondary-text">Please wait, we are processing your contacts...</div>\n                            </div>\n                        </ms-widget-front>\n                        \x3c!-- / Front --\x3e\n                    </ms-widget>\n                    \x3c!-- / WIDGET PROCESSING --\x3e\n                    \x3c!-- WIDGET SUCCESS --\x3e\n                    <ms-widget ng-if="vm.result.finish" class="h-140" flex>\n                        \x3c!-- Front --\x3e\n                        <ms-widget-front class="p-16 white-bg">\n                            <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                <div class="md-display-1 pb-8 green-fg">\n                                    <span ng-bind="vm.result.affectedRows"></span>\n                                </div>\n                                <div class="font-weight-500 secondary-text" translate="CONTACTMANAGER.SUCCESS">Success</div>\n                            </div>\n                        </ms-widget-front>\n                        \x3c!-- / Front --\x3e\n                    </ms-widget>\n                    \x3c!-- / WIDGET SUCCESS --\x3e\n\n                    \x3c!-- WIDGET FAILURE --\x3e\n                    <ms-widget ng-if="vm.result.finish" class="h-140" flex>\n                        \x3c!-- Front --\x3e\n                        <ms-widget-front class="p-16 white-bg">\n                            <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                <div class="md-display-1 pb-8 red-fg">\n                                    <span ng-bind="vm.result.failedRows"></span>\n                                </div>\n                                <div class="font-weight-500 secondary-text" translate="CONTACTMANAGER.FAILURE">Failure</div>\n                            </div>\n                        </ms-widget-front>\n                        \x3c!-- / Front --\x3e\n                    </ms-widget>\n                    \x3c!-- / WIDGET FAILURE --\x3e\n\n                    \x3c!-- WIDGET DUPLICATES --\x3e\n                    <ms-widget ng-if="vm.result.duplicatedRows && vm.result.finish" class="h-140" flex>\n                        \x3c!-- Front --\x3e\n                        <ms-widget-front class="p-16 white-bg">\n                            <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                <div class="md-display-1 pb-8 orange-fg">\n                                    <span ng-bind="vm.result.duplicatedRows"></span>\n                                </div>\n                                <div class="font-weight-500 secondary-text" translate="CONTACTMANAGER.DUPLICATES">Duplicates</div>\n                            </div>\n                        </ms-widget-front>\n                        \x3c!-- / Front --\x3e\n                    </ms-widget>\n                    \x3c!-- / WIDGET DUPLICATES --\x3e\n                </div>\n\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row">\n                <md-button ng-if="!vm.processing" ng-disabled="importForm.$invalid || importForm.$pristine" ng-click="vm.uploadCsv()" class="md-accent md-raised" aria-label="UPLOAD" translate="CONTACTMANAGER.UPLOAD" translate-attr-aria-label="CONTACTMANAGER.IMPORT">\n                    IMPORT\n                </md-button>\n                <md-button ng-if="vm.processing && !vm.result.finish && !vm.stopping" ng-click="vm.stopUpload()" class="md-accent md-raised" aria-label="Stop Upload" translate="CONTACTMANAGER.STOP" translate-attr-aria-label="CONTACTMANAGER.STOP">\n                    STOP\n                </md-button>\n                <md-button ng-if="vm.result.finish && vm.result.errors.length" ng-csv="vm.getArrayErrors()" csv-header="vm.getHeaderErrors()" class="md-accent md-raised" aria-label="Export Errors" filename="contacts_import_errors.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon> {{\'CONTACTMANAGER.EXPORT_ERRORS\' | translate}}\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/contacts/merge/dialog.html",'<md-dialog class="cm-contact-dialog" aria-label="Merge Contact">\n    <form name="contactForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <md-input-container class="md-block" flex-gt-sm>\n                <label>Filter</label>\n                <input ng-model="vm.searchTerm" name="searchTerm" ng-model-options="{ debounce: 300 }" ng-change="vm.change()">\n            </md-input-container>\n\n            <md-list flex>\n                <md-subheader class="md-no-sticky" ng-hide="vm.contacts.length"><em>Filter doesn\'t match any contact</em></md-subheader>\n                <md-list-item class="md-3-line" ng-repeat="contact in vm.contacts | filter:{ id: \'!\' + vm.contact.id}" ng-click="vm.showConfirm($event, vm.contact, contact)">\n                    <img ng-src="assets/images/avatars/profile.png" class="md-avatar" alt="{{contact.who}}" />\n                    <div class="md-list-item-text" layout="column">\n                        <h3>#{{ contact.id }} - {{ contact.firstName }} {{ contact.lastName }}</h3>\n                        <h4>{{ contact.email }}</h4>\n                        <p>{{ contact.phone }}</p>\n                    </div>\n                </md-list-item>\n            </md-list>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/contacts/upload/upload.html",'<md-dialog class="upload-dialog" aria-label="Upload contact">\n    <form name="uploadForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title" translate="CONTACTMANAGER.UPLOAD_CONTACTS">Upload Contacts</span>\n                <md-button ng-if="vm.finished || !vm.uploading" class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <div md-background-bg layout="row" layout-align="start start">\n            <md-progress-linear ng-disabled="!vm.uploading" md-mode="indeterminate" class="md-warn"></md-progress-linear>\n        </div>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <div layout="row" layout-align="center center" ng-show="!vm.fileSelected">\n                <md-button flow-init="vm.ngFlowOptions" flow-name="vm.ngFlow.flow" flow-btn flow-file-added="vm.fileAdded($event, $file, $flow)" flow-file-success="vm.fileSuccess($file, $message, $flow)" class="md-accent md-raised md-warn" aria-label="Select File" translate\n                    translate-attr-aria-label="CONTACTMANAGER.SELECT_FILE">\n                    <span translate="CONTACTMANAGER.SELECT_FILE">Select File</span>\n                    <md-icon md-font-icon="icon-upload"></md-icon>\n                </md-button>\n            </div>\n\n            <div>\n                <md-content ng-show="!vm.uploading && !vm.finished && vm.fileSelected">\n                    <md-input-container class="md-icon-float md-block" ng-repeat="contactField in vm.contactFields">\n                        <label>{{\'CONTACTMANAGER.\' + contactField.key | uppercase | translate}}</label>\n                        <md-select name="{{contactField.key}}" ng-model="vm.binding[contactField.key]" placeholder="{{\'CONTACTMANAGER.\' + contactField.key | uppercase | translate}}" ng-required="contactField.required">\n                            <md-option ng-value="field" ng-repeat="field in vm.fields">{{ field }}</md-option>\n                            <md-option ng-value="null" ng-hide="contactField.required"><em>{{ \'CONTACTMANAGER.NONE\' | translate }}</em></md-option>\n                        </md-select>\n                    </md-input-container>\n\n                    <md-input-container class="md-icon-float md-block">\n                        <label translate="CONTACTMANAGER.LIST">List</label>\n                        <md-select name="list" ng-model="vm.ListId" placeholder="Select a list" ng-change="vm.onChangeList()" required>\n                            <md-option ng-value="list.id" ng-repeat="list in vm.lists.rows">{{list.name}}</md-option>\n                        </md-select>\n                    </md-input-container>\n\n                    <md-input-container class="md-icon-float md-block" ng-repeat="customField in vm.customFields.rows">\n                        <label>{{customField.alias}}</label>\n                        <md-select ng-model="vm.binding[\'cf_\' + customField.id]" placeholder="{{customField.alias}}" ng-required="customField.required">\n                            <md-option ng-value="field" ng-repeat="field in vm.fields">{{ field }}</md-option>\n                            <md-option ng-value="null" ng-hide="customField.required"><em>{{ \'CONTACTMANAGER.NONE\' | translate }}</em></md-option>\n                        </md-select>\n                    </md-input-container>\n\n                    <md-input-container class="md-icon-float md-block">\n                        <label translate="CONTACTMANAGER.COMPANY">Company</label>\n                        <md-select name="company" ng-model="vm.CompanyId" placeholder="Select a company">\n                            <md-option ng-value="company.id" ng-repeat="company in vm.companies.rows">{{company.name}}</md-option>\n                            <md-option ng-value="null"><em translate="CONTACTMANAGER.NONE">None</em></md-option>\n                        </md-select>\n                    </md-input-container>\n\n                    <md-input-container class="md-icon-float md-block">\n                        <md-select ng-model="vm.duplicates" placeholder="{{ \'CONTACTMANAGER.CHECK_DUPLICATES\' | translate}}" multiple>\n                            <md-option ng-value="contactField.key" ng-repeat="contactField in vm.contactFields">{{ \'CONTACTMANAGER.\' + contactField.key | uppercase | translate}}</md-option>\n                        </md-select>\n                    </md-input-container>\n                </md-content>\n\n                <div layout="row" ng-if="vm.uploading || vm.finished">\n                    \x3c!-- WIDGET SUCCESS --\x3e\n                    <ms-widget class="h-140" flex>\n                        \x3c!-- Front --\x3e\n                        <ms-widget-front class="p-16 white-bg">\n                            <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                <div class="md-display-1 pb-8 green-fg"><span ng-bind="vm.success"></span></div>\n                                <div class="font-weight-500 secondary-text" translate="CONTACTMANAGER.SUCCESS">Success</div>\n                            </div>\n                        </ms-widget-front>\n                        \x3c!-- / Front --\x3e\n                    </ms-widget>\n                    \x3c!-- / WIDGET SUCCESS --\x3e\n\n                    \x3c!-- WIDGET FAILURE --\x3e\n                    <ms-widget class="h-140" flex>\n                        \x3c!-- Front --\x3e\n                        <ms-widget-front class="p-16 white-bg">\n                            <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                <div class="md-display-1 pb-8 red-fg"><span ng-bind="vm.errors"></span></div>\n                                <div class="font-weight-500 secondary-text" translate="CONTACTMANAGER.FAILURE">Failure</div>\n                            </div>\n                        </ms-widget-front>\n                        \x3c!-- / Front --\x3e\n                    </ms-widget>\n                    \x3c!-- / WIDGET FAILURE --\x3e\n\n                    \x3c!-- WIDGET DUPLICATES --\x3e\n                    <ms-widget class="h-140" flex ng-if="vm.duplicate">\n                        \x3c!-- Front --\x3e\n                        <ms-widget-front class="p-16 white-bg">\n                            <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                <div class="md-display-1 pb-8 orange-fg"><span ng-bind="vm.duplicate"></span></div>\n                                <div class="font-weight-500 secondary-text" translate="CONTACTMANAGER.DUPLICATES">Duplicates</div>\n                            </div>\n                        </ms-widget-front>\n                        \x3c!-- / Front --\x3e\n                    </ms-widget>\n                    \x3c!-- / WIDGET DUPLICATES --\x3e\n                </div>\n\n                <div class="error-list" ng-if="vm.finished">\n                    <div class="info" layout="row" layout-align="space-between center">\n                        <div>\n                            <div class="message">{{\'CONTACTMANAGER.UPLOAD_COMPLETED\' | translate | uppercase}}</div>\n                        </div>\n                        <md-button class="md-icon-button">\n                            <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                        </md-button>\n                    </div>\n                </div>\n\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row">\n                <md-button ng-disabled="uploadForm.$invalid || uploadForm.$pristine || vm.uploading || vm.finished || !vm.fileSelected" ng-click="vm.uploadCsv()" class="md-accent md-raised" aria-label="UPLOAD" translate="CONTACTMANAGER.UPLOAD" translate-attr-aria-label="CONTACTMANAGER.UPLOAD">\n                    UPLOAD\n                </md-button>\n                <md-button ng-if="vm.showStopButton && !vm.finished" ng-disabled="vm.disableStopButton" ng-click="vm.stopUpload()" class="md-accent md-raised" aria-label="Stop Upload" translate="CONTACTMANAGER.STOP" translate-attr-aria-label="CONTACTMANAGER.STOP">\n                    STOP\n                </md-button>\n                <md-button ng-if="vm.rows.length" ng-csv="vm.exportErrors()" class="md-accent md-raised" aria-label="Export Errors" filename="contacts_upload_errors.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon> {{\'CONTACTMANAGER.EXPORT_ERRORS\' | translate}}\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/globalCustomFields/create/dialog.html",'<md-dialog class="globalCustomField-dialog" aria-label="New GlobalCustomField">\n    <form name="globalCustomFieldForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.ALIAS">Alias</label>\n                <input type="" name="alias" ng-model="vm.globalCustomField.alias" ng-required="true" autofocus>\n                <div ng-messages="globalCustomFieldForm[\'alias\'].$error" ng-show="globalCustomFieldForm[\'alias\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.ALIAS_REQUIRED">Alias field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.globalCustomField.type" required ng-disabled="!vm.newGlobalCustomField">\n                    <md-option ng-value="\'text\'">Text</md-option>\n                    <md-option ng-value="\'select\'">Select</md-option>\n                    <md-option ng-value="\'number\'">Number</md-option>\n                    <md-option ng-value="\'switch\'">Switch</md-option>\n                    <md-option ng-value="\'datetime\'">Datetime</md-option>\n                </md-select>\n                <div ng-messages="globalCustomFieldForm[\'type\'].$error" ng-show="globalCustomFieldForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div ng-if="vm.globalCustomField.type == \'select\'" class="md-block">\n                <md-list>\n                    <md-list-item layout-margin>\n                        <md-button class="md-fab md-mini md-secondary" ng-click="vm.addItem(vm.globalCustomField.values);">\n                            <md-tooltip><span translate="CONTACTMANAGER.ADD">ADD</span></md-tooltip>\n                            <md-icon md-font-icon="icon-plus" aria-label="alert error"></md-icon>\n                        </md-button>\n                        <md-button ng-if="vm.globalCustomField.values.length" class="md-fab md-mini md-warn md-secondary" ng-click="vm.removeItems(vm.globalCustomField.values);">\n                            <md-tooltip><span translate="CONTACTMANAGER.DELETE_ALL">Delete All</span></md-tooltip>\n                            <md-icon md-font-icon="icon-delete" aria-label="alert error"></md-icon>\n                        </md-button>\n                    </md-list-item>\n                </md-list>\n                <md-list ng-sortable="vm.sortable">\n                    <md-list-item ng-repeat="item in vm.globalCustomField.values" style="border: 1px solid #ccc!important; border-radius: 7px;" layout-margin>\n                        <div>\n                            <md-icon class="s24" style="cursor:move" md-font-icon="icon-drag" aria-label="drag"></md-icon>\n                            <input type="text" ng-model="item.value" flex>\n                        </div>\n                        <md-button class="md-fab md-mini md-warn md-secondary" ng-click="vm.removeItem(vm.globalCustomField.values, $index);">\n                            <md-tooltip><span translate="CONTACTMANAGER.DELETE">DELETE</span></md-tooltip>\n                            <md-icon md-font-icon="icon-delete" aria-label="alert error"></md-icon>\n                        </md-button>\n                    </md-list-item>\n                </md-list>\n                <md-list>\n                    <md-list-item ng-if="!vm.globalCustomField.values.length" layout="row" layout-align="center center">\n                        <em translate="CONTACTMANAGER.NO_AVAILABLE_ITEMS">No Available Items</em>\n                    </md-list-item>\n                </md-list>\n            </div>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.globalCustomField.required" aria-label="Required"><span translate="CONTACTMANAGER.REQUIRED">Required</span></md-switch>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newGlobalCustomField" ng-click="vm.saveGlobalCustomField()" class="send-button md-accent md-raised" ng-disabled="globalCustomFieldForm.$invalid || globalCustomFieldForm.$pristine" aria-label="SAVE" translate="CONTACTMANAGER.SAVE"\n                    translate-attr-aria-label="CONTACTMANAGER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newGlobalCustomField" ng-click="vm.addNewGlobalCustomField()" class="send-button md-accent md-raised" ng-disabled="globalCustomFieldForm.$invalid" aria-label="ADD" translate="CONTACTMANAGER.ADD_GLOBALCUSTOMFIELD" translate-attr-aria-label="CONTACTMANAGER.ADD_GLOBALCUSTOMFIELD">\n                    ADD GLOBALCUSTOMFIELD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newGlobalCustomField" ng-click="vm.deleteGlobalCustomField($event)" aria-label="DELETE" translate translate-attr-aria-label="CONTACTMANAGER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CONTACTMANAGER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/globalCustomFields/globalCustomFields.html",'<div id="globalCustomFields" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-account-circle" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="CONTACTMANAGER.GLOBALCUSTOMFIELDS">GlobalCustomFields</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="CONTACTMANAGER.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedGlobalCustomFields.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedGlobalCustomFields =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="CONTACTMANAGER.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-globalCustomFields-count">\n                    <span>{{vm.selectedGlobalCustomFields.length}}</span>\n                <span translate="CONTACTMANAGER.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="GLOBALCUSTOMFIELDS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllGlobalCustomFields()" translate="CONTACTMANAGER.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectGlobalCustomFields()" translate="CONTACTMANAGER.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedGlobalCustomFields" csv-label="true" filename="globalCustomFields.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedGlobalCustomFields($event)" aria-label="delete selected" translate translate-attr-label="GLOBALCUSTOMFIELDS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- GLOBALCUSTOMFIELD TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedGlobalCustomFields" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getGlobalCustomFields">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'CONTACTMANAGER.ID\' | translate }}</th>\n                                <th md-column md-order-by="alias">{{ \'CONTACTMANAGER.ALIAS\' | translate }}</th>\n                                <th md-column md-order-by="type">{{ \'CONTACTMANAGER.TYPE\' | translate }}</th>\n                                <th md-column md-order-by="required">{{ \'CONTACTMANAGER.REQUIRED\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.globalCustomFields.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="CONTACTMANAGER.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="globalCustomField" md-select-id="id" ng-repeat="globalCustomField in vm.globalCustomFields.rows">\n                                <td md-cell ng-if="globalCustomField.userpic"><img class="avatar" alt="{{globalCustomField.name}}" ng-src="api/users/{{globalCustomField.id}}/avatar" /></td>\n                                <td md-cell ng-if="!globalCustomField.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{globalCustomField.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditGlobalCustomField($event, globalCustomField)" md-cell class="id ">{{globalCustomField.id}}</td>\n                                <td ng-click="vm.createOrEditGlobalCustomField($event, globalCustomField)" md-cell class="alias ">{{globalCustomField.alias}}</td>\n                                <td ng-click="vm.createOrEditGlobalCustomField($event, globalCustomField)" md-cell class="type ">{{ vm.arraytype[globalCustomField.type].option }}</td>\n                                <td ng-click="vm.createOrEditGlobalCustomField($event, globalCustomField)" md-cell class="required ">\n                                    <md-icon md-colors="{color: {{globalCustomField.required ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{globalCustomField.required ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                </td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CONTACTMANAGER.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(globalCustomField, $event)" translate="CONTACTMANAGER.EDIT_GLOBALCUSTOMFIELD">\n                                                    Edit GlobalCustomField\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(globalCustomField, $event)" translate="CONTACTMANAGER.DELETE_GLOBALCUSTOMFIELD">\n                                                    Delete GlobalCustomField\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'CONTACTMANAGER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CONTACTMANAGER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CONTACTMANAGER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.globalCustomFields.count}}" md-on-paginate="vm.getGlobalCustomFields" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / GLOBALCUSTOMFIELD TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD GLOBALCUSTOMFIELD BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-globalCustomField-button" ng-click="vm.createOrEditGlobalCustomField($event)" aria-label="add globalCustomField" translate translate-attr-aria-label="CONTACTMANAGER.ADD_GLOBALCUSTOMFIELD">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD GLOBALCUSTOMFIELD BUTTON --\x3e\n</div>'),e.put("app/main/apps/contactmanager/views/lists/create/dialog.html",'<md-dialog class="list-dialog" aria-label="New List">\n    <form name="listForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.list.name" ng-required="true" autofocus>\n                <div ng-messages="listForm[\'name\'].$error" ng-show="listForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.list.description">\n                <div ng-messages="listForm[\'description\'].$error" ng-show="listForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newList" ng-click="vm.saveList()" class="send-button md-accent md-raised" ng-disabled="listForm.$invalid || listForm.$pristine" aria-label="SAVE" translate="CONTACTMANAGER.SAVE" translate-attr-aria-label="CONTACTMANAGER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newList" ng-click="vm.addNewList()" class="send-button md-accent md-raised" ng-disabled="listForm.$invalid" aria-label="ADD" translate="CONTACTMANAGER.ADD_LIST" translate-attr-aria-label="CONTACTMANAGER.ADD_LIST">\n                    ADD LIST\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newList" ng-click="vm.deleteList($event)" aria-label="DELETE" translate translate-attr-aria-label="CONTACTMANAGER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CONTACTMANAGER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/lists/edit/agentadd/agentadd.html",'<md-dialog class="list-dialog" aria-label="list">\n    <form name="listForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="CONTACTMANAGER.AGENTADD_LIST">Add Agent to list</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/lists/edit/customFields/dialog.html",'<md-dialog class="customField-dialog" aria-label="New CustomField">\n    <form name="customFieldForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.ALIAS">Alias</label>\n                <input type="" name="alias" ng-model="vm.customField.alias" ng-required="true" autofocus>\n                <div ng-messages="customFieldForm[\'alias\'].$error" ng-show="customFieldForm[\'alias\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.ALIAS_REQUIRED">Alias field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.customField.type" required ng-disabled="!vm.newCustomField">\n                    <md-option ng-value="\'text\'">Text</md-option>\n                    <md-option ng-value="\'select\'">Select</md-option>\n                    <md-option ng-value="\'number\'">Number</md-option>\n                    <md-option ng-value="\'switch\'">Switch</md-option>\n                    <md-option ng-value="\'datetime\'">Datetime</md-option>\n                </md-select>\n                <div ng-messages="customFieldForm[\'type\'].$error" ng-show="customFieldForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div ng-if="vm.customField.type == \'select\'" class="md-block">\n                <md-list>\n                    <md-list-item layout-margin>\n                        <md-button class="md-fab md-mini md-secondary" ng-click="vm.addItem(vm.customField.values);">\n                            <md-tooltip><span translate="CONTACTMANAGER.ADD">ADD</span></md-tooltip>\n                            <md-icon md-font-icon="icon-plus" aria-label="alert error"></md-icon>\n                        </md-button>\n                        <md-button ng-if="vm.customField.values.length" class="md-fab md-mini md-warn md-secondary" ng-click="vm.removeItems(vm.customField.values);">\n                            <md-tooltip><span translate="CONTACTMANAGER.DELETE_ALL">Delete All</span></md-tooltip>\n                            <md-icon md-font-icon="icon-delete" aria-label="alert error"></md-icon>\n                        </md-button>\n                    </md-list-item>\n                </md-list>\n                <md-list ng-sortable="vm.sortable">\n                    <md-list-item ng-repeat="item in vm.customField.values" style="border: 1px solid #ccc!important; border-radius: 7px;" layout-margin>\n                        <div>\n                            <md-icon class="s24" style="cursor:move" md-font-icon="icon-drag" aria-label="drag"></md-icon>\n                            <input type="text" ng-model="item.value" flex>\n                        </div>\n                        <md-button class="md-fab md-mini md-warn md-secondary" ng-click="vm.removeItem(vm.customField.values, $index);">\n                            <md-tooltip><span translate="CONTACTMANAGER.DELETE">DELETE</span></md-tooltip>\n                            <md-icon md-font-icon="icon-delete" aria-label="alert error"></md-icon>\n                        </md-button>\n                    </md-list-item>\n                </md-list>\n                <md-list>\n                    <md-list-item ng-if="!vm.customField.values.length" layout="row" layout-align="center center">\n                        <em translate="CONTACTMANAGER.NO_AVAILABLE_ITEMS">No Available Items</em>\n                    </md-list-item>\n                </md-list>\n            </div>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.customField.required" aria-label="Required"><span translate="CONTACTMANAGER.REQUIRED">Required</span></md-switch>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newCustomField" ng-click="vm.saveCustomField()" class="send-button md-accent md-raised" ng-disabled="customFieldForm.$invalid || customFieldForm.$pristine" aria-label="SAVE" translate="CONTACTMANAGER.SAVE" translate-attr-aria-label="CONTACTMANAGER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newCustomField" ng-click="vm.addNewCustomField()" class="send-button md-accent md-raised" ng-disabled="customFieldForm.$invalid" aria-label="ADD" translate="CONTACTMANAGER.ADD_CUSTOMFIELD" translate-attr-aria-label="CONTACTMANAGER.ADD_CUSTOMFIELD">\n                    ADD CUSTOMFIELD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newCustomField" ng-click="vm.deleteCustomField($event)" aria-label="DELETE" translate translate-attr-aria-label="CONTACTMANAGER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CONTACTMANAGER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/lists/edit/view.html",'<div id="contactmanager-list" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-lists-button md-icon-button" aria-label="Go to lists" ng-click="vm.gotoLists()" translate translate-attr-aria-label="CONTACTMANAGER.GO_TO_LISTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="list-image" hide-xs>\n                    <img ng-src="assets/images/business/lists.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.list.id}}\n                        <span ng-if="vm.list.name">{{vm.list.name}}</span>\n                        <span ng-if="vm.list.exten">{{vm.list.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="CONTACTMANAGER.CREATED_AT"></span> <span>{{vm.list.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.gotogoto(vm.list, $event)" class="md-fab md-warn md-icon-button" aria-label="goto">\n                <md-tooltip><span translate="CONTACTMANAGER.GOTO_LIST"></span></md-tooltip>\n                <md-icon md-font-icon="icon-forward"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.agentadddialog(vm.list, $event)" class="md-fab md-warn md-icon-button" aria-label="agentadd">\n                <md-tooltip><span translate="CONTACTMANAGER.AGENTADD_LIST"></span></md-tooltip>\n                <md-icon md-font-icon="icon-eye"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveList()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (customFieldsForm.$invalid) || (voiceDispositionsForm.$invalid)" translate="CONTACTMANAGER.SAVE" translate-attr-aria-label="CONTACTMANAGER.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CONTACTMANAGER.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="list-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="CONTACTMANAGER.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.list.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.list.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.PREFIX">Prefix</label>\n                                <input type="text" name="dialPrefix" ng-model="vm.list.dialPrefix">\n                                <div ng-messages="generalForm[\'dialPrefix\'].$error" ng-show="generalForm[\'dialPrefix\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.PREFIX_REQUIRED">Prefix field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CONTACTMANAGER.CUSTOMFIELDS">CUSTOMFIELDS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="list-detail-form-container customfields md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="ListCustomFieldsController as vm_dc" ng-init="vm_dc.init(vm.list)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedListCustomFields.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="CONTACTMANAGER.CUSTOMFIELDS">CustomFields</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditListCustomField($event)" aria-label="add customField" translate translate-attr-label="CONTACTMANAGER.ADD_CUSTOMFIELD">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedListCustomFields.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedListCustomFields.length}} {{vm_dc.selectedListCustomFields.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedListCustomFields" csv-label="true" filename="lists.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedListCustomFields($event)" aria-label="delete selected" translate translate-attr-label="LISTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedListCustomFields" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getListCustomFields">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'CONTACTMANAGER.ID\' | translate }}</th>\n                                            <th md-column md-order-by="alias">{{ \'CONTACTMANAGER.ALIAS\' | translate }}</th>\n                                            <th md-column md-order-by="type">{{ \'CONTACTMANAGER.TYPE\' | translate }}</th>\n                                            <th md-column md-order-by="required">{{ \'CONTACTMANAGER.REQUIRED\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="customField" md-select-id="id" ng-repeat="customField in vm_dc.listCustomFields.rows">\n                                            <td ng-click="vm_dc.createOrEditListCustomField($event, customField)" md-cell>{{customField.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditListCustomField($event, customField)" md-cell>{{customField.alias}}</td>\n                                            <td ng-click="vm_dc.createOrEditListCustomField($event, customField)" md-cell>{{ vm_dc.arraytype[customField.type].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditListCustomField($event, customField)" md-cell class="required ">\n                                                <md-icon md-colors="{color: {{customField.required ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{customField.required? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                            </td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CONTACTMANAGER.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditListCustomField($event, customField)" translate="CONTACTMANAGER.EDIT_CUSTOMFIELD">\n                                                                Edit CustomField\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(customField, $event)" translate="CONTACTMANAGER.DELETE_CUSTOMFIELD">\n                                                                Delete CustomField\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.listCustomFields.rows.length">\n                                            <td md-cell colspan="7">\n                                                <span class="text-boxed-ligth" translate="CONTACTMANAGER.NO_CUSTOMFIELD_AVAILABLE">No customfield available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'CONTACTMANAGER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CONTACTMANAGER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CONTACTMANAGER.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                                md-page="vm_dc.query.page" md-total="{{vm_dc.listCustomFields.count}}" md-on-paginate="vm_dc.getListCustomFields" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CONTACTMANAGER.DISPOSITIONS">DISPOSITIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="list-detail-form-container voicedispositions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="ListVoiceDispositionsController as vm_dc" ng-init="vm_dc.init(vm.list)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedListVoiceDispositions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="CONTACTMANAGER.VOICEDISPOSITIONS">VoiceDispositions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditListVoiceDisposition($event)" aria-label="add voiceDisposition" translate translate-attr-label="CONTACTMANAGER.ADD_VOICEDISPOSITION">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedListVoiceDispositions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedListVoiceDispositions.length}} {{vm_dc.selectedListVoiceDispositions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedListVoiceDispositions" csv-label="true" filename="lists.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedListVoiceDispositions($event)" aria-label="delete selected" translate translate-attr-label="LISTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedListVoiceDispositions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getListVoiceDispositions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'CONTACTMANAGER.ID\' | translate }}</th>\n                                            <th md-column md-order-by="name">{{ \'CONTACTMANAGER.NAME\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'CONTACTMANAGER.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="voiceDisposition" md-select-id="id" ng-repeat="voiceDisposition in vm_dc.listVoiceDispositions.rows">\n                                            <td ng-click="vm_dc.createOrEditListVoiceDisposition($event, voiceDisposition)" md-cell>{{voiceDisposition.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditListVoiceDisposition($event, voiceDisposition)" md-cell>{{voiceDisposition.name}}</td>\n                                            <td ng-click="vm_dc.createOrEditListVoiceDisposition($event, voiceDisposition)" md-cell>{{voiceDisposition.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CONTACTMANAGER.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditListVoiceDisposition($event, voiceDisposition)" translate="CONTACTMANAGER.EDIT_VOICEDISPOSITION">\n                                                                Edit VoiceDisposition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(voiceDisposition, $event)" translate="CONTACTMANAGER.DELETE_VOICEDISPOSITION">\n                                                                Delete VoiceDisposition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.listVoiceDispositions.rows.length">\n                                            <td md-cell colspan="5">\n                                                <span class="text-boxed-ligth" translate="CONTACTMANAGER.NO_VOICEDISPOSITION_AVAILABLE">No voicedisposition available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'CONTACTMANAGER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CONTACTMANAGER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CONTACTMANAGER.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                                md-page="vm_dc.query.page" md-total="{{vm_dc.listVoiceDispositions.count}}" md-on-paginate="vm_dc.getListVoiceDispositions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/contactmanager/views/lists/edit/voiceDispositions/dialog.html",'<md-dialog class="voiceDisposition-dialog" aria-label="New VoiceDisposition">\n    <form name="voiceDispositionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.voiceDisposition.name" ng-required="true" autofocus>\n                <div ng-messages="voiceDispositionForm[\'name\'].$error" ng-show="voiceDispositionForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newVoiceDisposition" ng-click="vm.saveVoiceDisposition()" class="send-button md-accent md-raised" ng-disabled="voiceDispositionForm.$invalid || voiceDispositionForm.$pristine" aria-label="SAVE" translate="CONTACTMANAGER.SAVE"\n                    translate-attr-aria-label="CONTACTMANAGER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newVoiceDisposition" ng-click="vm.addNewVoiceDisposition()" class="send-button md-accent md-raised" ng-disabled="voiceDispositionForm.$invalid" aria-label="ADD" translate="CONTACTMANAGER.ADD_VOICEDISPOSITION" translate-attr-aria-label="CONTACTMANAGER.ADD_VOICEDISPOSITION">\n                    ADD VOICEDISPOSITION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newVoiceDisposition" ng-click="vm.deleteVoiceDisposition($event)" aria-label="DELETE" translate translate-attr-aria-label="CONTACTMANAGER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CONTACTMANAGER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/lists/lists.html",'<div id="lists" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-account-circle" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="CONTACTMANAGER.LISTS">Lists</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="CONTACTMANAGER.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedLists.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedLists =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="CONTACTMANAGER.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-lists-count">\n                    <span>{{vm.selectedLists.length}}</span>\n                <span translate="CONTACTMANAGER.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="LISTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllLists()" translate="CONTACTMANAGER.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectLists()" translate="CONTACTMANAGER.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedLists" csv-label="true" filename="lists.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedLists($event)" aria-label="delete selected" translate translate-attr-label="LISTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- LIST TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedLists" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getLists">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'CONTACTMANAGER.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'CONTACTMANAGER.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'CONTACTMANAGER.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.lists.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="CONTACTMANAGER.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="list" md-select-id="id" ng-repeat="list in vm.lists.rows">\n                                <td md-cell ng-if="list.userpic"><img class="avatar" alt="{{list.name}}" ng-src="api/users/{{list.id}}/avatar" /></td>\n                                <td md-cell ng-if="!list.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{list.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditList($event, list)" md-cell class="id ">{{list.id}}</td>\n                                <td ng-click="vm.createOrEditList($event, list)" md-cell class="name ">{{list.name}}</td>\n                                <td ng-click="vm.createOrEditList($event, list)" md-cell class="description ">{{list.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CONTACTMANAGER.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(list, $event)" translate="CONTACTMANAGER.EDIT_LIST">\n                                                    Edit List\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotocontactsgoto(list, $event)" translate="CONTACTMANAGER.GOTOCONTACTS_LIST">\n                                                    goToContacts List\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.exportcsvcontactsexport(list, $event)" translate="CONTACTMANAGER.EXPORTCSVCONTACTS_LIST">\n                                                    exportCsvContacts List\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.agentadddialog(list, $event)" translate="CONTACTMANAGER.AGENTADD_LIST">\n                                                    AgentAdd List\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(list, $event)" translate="CONTACTMANAGER.DELETE_LIST">\n                                                    Delete List\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'CONTACTMANAGER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CONTACTMANAGER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CONTACTMANAGER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.lists.count}}" md-on-paginate="vm.getLists" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / LIST TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD LIST BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-list-button" ng-click="vm.createOrEditList($event)" aria-label="add list" translate translate-attr-aria-label="CONTACTMANAGER.ADD_LIST">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD LIST BUTTON --\x3e\n</div>'),e.put("app/main/apps/dashboards/views/custom/custom.html",'<div ng-if="!vm.customDashboard">\n    <p>Custom Dashboard not available...</p>\n</div>\n<div id="dashboard-custom" ng-if="vm.customDashboard" ng-cloak layout-fill>\n    <md-content>\n        <md-toolbar class="md-default md-accent filter-header">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead">{{vm.customDashboard.name}}</span>\n                <div flex></div>\n                <div layout="column">\n                    <span class="font-size-10" translate="DASHBOARDS.FILTER_VOICE_QUEUES">Filter Voice Queues</span>\n                    <md-select placeholder="Select one or more queues" class="font-size-12 no-margin w-200" md-on-close="vm.onChangeVoiceQueues()" ng-model="vm.voiceQueuesSelected" multiple aria-label="voiceQueues">\n                        <md-option ng-value="voiceQueue.id" ng-repeat="voiceQueue in vm.voiceQueues.rows">{{ voiceQueue.name }}</md-option>\n                    </md-select>\n                </div>\n                <md-button ng-if="vm.currentUser.role == \'admin\'" class="md-icon-button" ng-click="vm.goToEdit()" aria-label="goToEdit">\n                    <md-tooltip md-direction="top"><span translate="DASHBOARDS.EDIT"></span></md-tooltip>\n                    <md-icon md-font-icon="icon-table-edit"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <ms-widget-engine config="vm.customDashboard"></ms-widget-engine>\n    </md-content>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/agent.general.html",'<div id="agent-general" layout="column">\n    <div layout="row" layout-align="start center" class="md-primary-bg">\n        <md-button class="md-raised no-margin width-50" style="border-radius: 0px" ng-class="{\'md-primary\': !vm.isActiveTab(0)}" ng-click="vm.onClickTab(0)" aria-label="home">\n            <md-tooltip md-direction="bottom" md-delay="500">Home</md-tooltip>\n            <md-icon md-font-icon="icon-home" class="icon"></md-icon>\n        </md-button>\n\n        <div layout="row" layout-align="start center" ms-scroll>\n            <div style="height: 36px" layout="column" ng-repeat="(key, tab) in vm.tabs" ng-click="vm.onClickTab(tab.id)" ng-class="{\'grey-50-bg\': vm.isActiveTab(tab.id)}">\n                <div style="height: 34px" layout="row" layout-align="space-between center">\n                    <md-icon md-font-icon="{{tab.icon}}" class="icon s16 margin-horizontal-5" ng-class="tab.color + \'-fg\'"></md-icon>\n                    <span class="text-truncate font-size-12" ng-class="vm.isActiveTab(tab.id) ? \'black-fg\' : \'grey-300-fg\'"> {{tab.title}} <span ng-if="tab.badges" class="badge md-white-fg md-red-bg">{{tab.badges}}</span></span>\n                    <md-button class="md-icon-button md-mini no-margin" ng-class="vm.isActiveTab(tab.id) ? \'md-primary\' : \'grey-300-fg\'" aria-label="close" ng-click="vm.closeTab(tab)">\n                        <md-icon md-font-icon="icon-close-circle-outline" class="icon s16"></md-icon>\n                    </md-button>\n                </div>\n                <div style="height: 2px" ng-class="vm.isActiveTab(tab.id) ? tab.color + \'-bg\' : \'\'"></div>\n            </div>\n        </div>\n    </div>\n    <div layout="row" class="agent-content" ng-if="vm.isActiveTab(0)" ng-style="{\'top\': vm.detectBrowser.browser == \'safari\' ? \'100px\' : \'36px\'}" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.html\'" ng-controller="AgentGeneralHomeController as vm_home"\n        ng-init="vm_home.init(vm.license)"></div>\n    <div ng-if="!vm.isActiveTab(0)" ng-repeat="(key, tab) in vm.tabs" ng-switch="tab.type">\n        <div ng-switch-when="contact">\n            <div class="agent-content" ms-scroll ng-if="vm.isActiveTab(tab.id)" ng-style="{\'top\': vm.detectBrowser.browser == \'safari\' ? \'100px\' : \'36px\'}" ng-include="\'app/main/apps/dashboards/views/general/agent/contact/agent.general.contact.html\'" ng-controller="AgentGeneralContactController as vm"\n                ng-init="vm.init(tab,$parent.vm.license)"></div>\n        </div>\n        <div ng-switch-when="popup">\n            <div ng-if="vm.isActiveTab(tab.id)" ms-scroll ng-include="\'app/main/apps/dashboards/views/general/agent/popup/agent.general.popup.html\'" ng-controller="AgentGeneralPopupController as vm" ng-init="vm.init(tab)"></div>\n        </div>\n        <div ng-switch-when="jscripty">\n            <div class="agent-content" ms-scroll ng-if="vm.isActiveTab(tab.id)" ng-style="{\'top\': vm.detectBrowser.browser == \'safari\' ? \'100px\' : \'36px\'}" ng-include="\'app/main/apps/dashboards/views/general/agent/jscripty/agent.general.jscripty.html\'" ng-controller="AgentGeneralJscriptyController as vm"\n                ng-init="vm.init(tab)"></div>\n        </div>\n        <div ng-switch-when="interaction">\n            <div id="interaction-app" ng-if="vm.isActiveTab(tab.id)" class="agent-content" ng-style="{\'top\': vm.detectBrowser.browser == \'safari\' ? \'100px\' : \'36px\'}" ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/agent.general.interaction.html\'"\n                ng-controller="AgentGeneralInteractionController as vm" ng-init="vm.init(tab)"></div>\n        </div>\n    </div>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/contact/agent.general.contact.html",'<md-tabs md-selected="vm.currentTab" md-dynamic-height>\n    <md-tab>\n        <md-tab-label>\n            <span translate="DASHBOARDS.DETAIL">Detail</span>\n        </md-tab-label>\n        <md-tab-body>\n            <md-content>\n                <div layout="row">\n                    \x3c!-- MS-CARD --\x3e\n                    <md-card class="template-7" layout="row" layout-align="space-between" ng-repeat="call in vm.tab.calls track by call.uniqueid">\n                        <div class="info" layout="column" layout-align="space-between" layout-fill flex>\n                            <div layout="row">\n                                <span ng-if="call.answeredAt" class="text-boxed indigo-100-bg"><timer start-time="call.answeredAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer></span>\n                                <div flex></div>\n                                <span ng-if="call.disposedAt" class="text-boxed amber-200-bg"><timer start-time="call.disposedAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer></span>\n                            </div>\n                            <div class="p-16">\n                                <div class="title h1">\n                                    <md-icon ng-if="!call.routeId" md-font-icon="icon-phone-incoming"></md-icon>\n                                    <md-icon ng-if="call.routeId" md-font-icon="icon-phone-outgoing"></md-icon>\n                                    {{ call.routeId ? call.destcalleridnum : call.calleridnum }}\n                                </div>\n\n                                <div class="subtitle h4 secondary-text" ng-if="call.calleridname && call.calleridname != \'<unknown>\' && !call.routeId">\n                                    <md-icon md-font-icon="icon-account"></md-icon>\n                                    Name: {{ call.calleridname }}\n                                </div>\n\n                                <div class="text h4 pt-8" ng-if="call.queue">\n                                    <md-icon md-font-icon="icon-stackoverflow"></md-icon>\n                                    Queue: {{call.queue}}\n                                </div>\n                                <div class="text h4 pt-8" ng-if="call.variables.extravar">\n                                    <md-icon md-font-icon="icon-minus"></md-icon>\n                                    Extra: {{call.variables.extravar}}\n                                </div>\n                            </div>\n                            <div layout="row" layout-align="end center">\n                                <md-button ng-if="call.disposedAt" type="submit" ng-click="vm.disposeCall($event, call)" class="send-button md-accent md-raised">\n                                    {{ \'DASHBOARDS.DISPOSE\' | translate}}\n                                </md-button>\n                            </div>\n                        </div>\n                    </md-card>\n                    \x3c!-- / MS-CARD --\x3e\n                    <div flex layout="row" layout-align="end center">\n                        <md-button type="submit" ng-click="vm.mergeContact($event)" class="send-button md-raised md-accent ng-scope" ng-if="!vm.newContact" ng-disabled="vm.detailForm.$invalid || vm.customFieldsForm.$invalid" aria-label="merge">\n                            <md-tooltip md-direction="top"><span translate="DASHBOARDS.MERGE"></span></md-tooltip>\n                            <md-icon md-font-icon="icon-source-fork"></md-icon>\n                        </md-button>\n                        <md-button type="submit" ng-click="vm.duplicateContact($event)" class="send-button md-raised md-accent ng-scope" ng-if="!vm.newContact" ng-disabled="vm.detailForm.$invalid || vm.customFieldsForm.$invalid" aria-label="duplicate">\n                            <md-tooltip md-direction="top"><span translate="DASHBOARDS.DUPLICATE"></span></md-tooltip>\n                            <md-icon md-font-icon="icon-content-duplicate"></md-icon>\n                        </md-button>\n                        <md-button type="submit" ng-click="vm.addNewContact($event)" class="send-button md-accent md-raised" ng-if="vm.newContact" ng-disabled="vm.detailForm.$invalid || vm.customFieldsForm.$invalid" aria-label="add">\n                            {{ \'DASHBOARDS.ADD\'| translate }}\n                        </md-button>\n                        <md-button type="submit" ng-click="vm.saveContact($event)" class="send-button md-accent md-raised" ng-if="!vm.newContact" ng-disabled="vm.detailForm.$invalid || vm.customFieldsForm.$invalid" aria-label="save">\n                            {{ \'DASHBOARDS.SAVE\' | translate }}\n                        </md-button>\n                    </div>\n                </div>\n                <div layout="row">\n                    <div layout="column" flex="75">\n                        <md-card layout-padding>\n                            <div class="h2 secondary-text text-truncate" translate="DASHBOARDS.PERSONAL_INFO">PERSONAL_INFO</div>\n                            <div class="subtitle secondary-text">\n                                <span translate="CONTACTMANAGER.CREATED_AT"></span> <span>{{vm.contact.createdAt | date:\'medium\'}}</span>\n                            </div>\n\n                            <form name="vm.detailForm" novalidate>\n                                <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                    <div layout="row" flex>\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="DASHBOARDS.FIRSTNAME">First Name</label>\n                                            <md-icon md-font-icon="icon-account" class="firstname"></md-icon>\n                                            <input type="text" name="firstName" ng-model="vm.contact.firstName" class="text-truncate" required>\n                                            <div ng-messages="vm.detailForm.firstName.$error" ng-show="vm.detailForm.firstName.$touched" role="alert">\n                                                <div ng-message="required">\n                                                    <span translate="DASHBOARDS.ERRORS.FIRSTNAME_REQUIRED">First name field is required</span>\n                                                </div>\n                                            </div>\n                                        </md-input-container>\n                                        <div>\n                                            <md-menu ng-if="!vm.newContact">\n                                                <md-button ng-disabled="!vm.license.jscripty" class="md-icon-button md-raised md-accent ng-scope md-ink-ripple" title="JSCRIPTY PROJECTS" ng-click="$mdOpenMenu($event)" aria-label="jscripty">\n                                                    <md-icon md-font-icon="icon-script"></md-icon>\n                                                </md-button>\n\n                                                <md-menu-content>\n                                                    <md-menu-item ng-if="vm.jscriptyProjects && vm.jscriptyProjects.rows.length" ng-repeat="project in vm.jscriptyProjects.rows">\n                                                        <md-button ng-click="vm.addJscriptyTab(project, $event)">\n                                                            <md-icon md-font-icon="icon-script"></md-icon> {{project.name}}\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                    <md-menu-item ng-if="!vm.jscriptyProjects || !vm.jscriptyProjects.rows.length">\n                                                        <md-button disabled="disabled" translate="DASHBOARDS.NO_JSCRIPTY_PROJECTS_AVAILABLE">\n                                                            <md-icon md-font-icon="icon-script"></md-icon> No jscripty projects available\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                </md-menu-content>\n                                            </md-menu>\n                                        </div>\n                                    </div>\n                                    <div flex="5"></div>\n                                    <md-input-container class="md-block" flex-gt-sm="">\n                                        <label translate="DASHBOARDS.LASTNAME">Last Name</label>\n                                        <input type="text" name="lastName" ng-model="vm.contact.lastName" class="text-truncate">\n                                    </md-input-container>\n                                </div>\n\n                                <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                    <div layout="row" flex>\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="DASHBOARDS.PHONE">Phone</label>\n                                            <md-icon md-font-icon="icon-phone"></md-icon>\n                                            <input type="text" name="phone" ng-model="vm.contact.phone" class="text-truncate" required>\n                                            <div class="hint"><span ng-show="!vm.user.phoneBarRemoteControl || !vm.contact.phone" translate="CONTACTMANAGER.HELP.PHONEBAR_API"></span></div>\n                                            <div ng-messages="vm.detailForm.phone.$error" ng-show="vm.detailForm.phone.$touched" role="alert">\n                                                <div ng-message="required">\n                                                    <span translate="DASHBOARDS.ERRORS.PHONE_REQUIRED">Phone name field is required</span>\n                                                </div>\n                                            </div>\n                                        </md-input-container>\n                                        <div>\n                                            \x3c!-- click to call directive --\x3e\n                                            <ms-click-to-call target="vm.contact.phone" prefix="vm.list ? vm.list.dialPrefix : null" license="vm.license" type="\'button\'"></ms-click-to-call>\n                                            \x3c!--  / click to call directive --\x3e\n                                        </div>\n                                    </div>\n                                    <div flex="5"></div>\n                                    <div layout="row" flex>\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="DASHBOARDS.MOBILE">Mobile</label>\n                                            <md-icon md-font-icon="icon-cellphone-iphone"></md-icon>\n                                            <input type="text" name="mobile" ng-model="vm.contact.mobile" class="text-truncate">\n                                            <div class="hint"><span ng-show="!vm.user.phoneBarRemoteControl || !vm.contact.mobile" translate="CONTACTMANAGER.HELP.PHONEBAR_API"></span></div>\n                                        </md-input-container>\n                                        <div>\n                                            \x3c!-- click to call directive --\x3e\n                                            <ms-click-to-call target="vm.contact.mobile" prefix="vm.list ? vm.list.dialPrefix : null" license="vm.license" type="\'button\'"></ms-click-to-call>\n                                            \x3c!--  / click to call directive --\x3e\n                                        </div>\n                                        <div>\n                                            <md-menu ng-if="!vm.newContact">\n                                                <md-button ng-disabled="!vm.license.messaging || !vm.hasPermission(107) || !vm.contact.mobile" class="md-icon-button md-raised md-accent ng-scope md-ink-ripple" title="NEW SMS" ng-click="$mdOpenMenu($event)" aria-label="sms">\n                                                    <md-icon md-font-icon="icon-message-text"></md-icon>\n                                                </md-button>\n\n                                                <md-menu-content>\n                                                    <md-menu-item ng-if="vm.smsAccounts && vm.smsAccounts.rows.length" ng-repeat="account in vm.smsAccounts.rows">\n                                                        <md-button ng-click="vm.composeInteraction($event, \'Sms\', account, vm.contact.mobile)">\n                                                            <md-icon md-font-icon="icon-message-text"></md-icon> {{account.name}}\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                    <md-menu-item ng-if="!vm.smsAccounts || !vm.smsAccounts.rows.length">\n                                                        <md-button disabled="disabled" translate="DASHBOARDS.NO_SMS_ACCOUNTS_AVAILABLE">\n                                                            <md-icon md-font-icon="icon-message-text"></md-icon> No sms accounts available\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                </md-menu-content>\n                                            </md-menu>\n                                        </div>\n                                    </div>\n                                </div>\n\n                                <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                    <div layout="row" flex>\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="DASHBOARDS.EMAIL">Email</label>\n                                            <md-icon md-font-icon="icon-email" class="email"></md-icon>\n                                            <input type="email" name="email" ng-model="vm.contact.email" class="text-truncate">\n                                            <div ng-messages="vm.detailForm.firstName.$error" ng-show="vm.detailForm.firstName.$touched" role="alert">\n                                                <div ng-message="email">\n                                                    <span translate="DASHBOARDS.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                                                </div>\n                                            </div>\n                                        </md-input-container>\n                                        <div>\n                                            <md-menu ng-if="!vm.newContact">\n                                                <md-button ng-disabled="!vm.license.mail || !vm.hasPermission(106) || !vm.contact.email" class="md-icon-button md-raised md-accent ng-scope md-ink-ripple" title="NEW EMAIL" ng-click="$mdOpenMenu($event)" aria-label="email">\n                                                    <md-icon md-font-icon="icon-email"></md-icon>\n                                                </md-button>\n\n                                                <md-menu-content>\n                                                    <md-menu-item ng-if="vm.mailAccounts && vm.mailAccounts.rows.length" ng-repeat="account in vm.mailAccounts.rows">\n                                                        <md-button ng-click="vm.composeInteraction($event, \'Mail\', account, vm.contact.email)">\n                                                            <md-icon md-font-icon="icon-email"></md-icon> {{account.name}}\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                    <md-menu-item ng-if="!vm.mailAccounts || !vm.mailAccounts.rows.length">\n                                                        <md-button disabled="disabled" translate="DASHBOARDS.NO_MAIL_ACCOUNTS_AVAILABLE">\n                                                            <md-icon md-font-icon="icon-email"></md-icon> No email accounts available\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                </md-menu-content>\n                                            </md-menu>\n                                        </div>\n                                    </div>\n                                    <div flex="5"></div>\n                                    <div layout="row" flex>\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="DASHBOARDS.FAX">Fax</label>\n                                            <md-icon md-font-icon="icon-deskphone"></md-icon>\n                                            <input type="text" name="fax" ng-model="vm.contact.fax">\n                                        </md-input-container>\n                                        <div>\n                                            <md-menu ng-if="!vm.newContact">\n                                                <md-button ng-disabled="!vm.license.fax || !vm.hasPermission(109) || !vm.contact.fax" class="md-icon-button md-raised md-accent ng-scope md-ink-ripple" title="NEW FAX" ng-click="$mdOpenMenu($event)" aria-label="fax">\n                                                    <md-icon md-font-icon="icon-deskphone"></md-icon>\n                                                </md-button>\n\n                                                <md-menu-content>\n                                                    <md-menu-item ng-if="vm.faxAccounts && vm.faxAccounts.rows.length" ng-repeat="account in vm.faxAccounts.rows">\n                                                        <md-button ng-click="vm.composeInteraction($event, \'Fax\', account, vm.contact.fax)">\n                                                            <md-icon md-font-icon="icon-deskphone"></md-icon> {{account.name}}\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                    <md-menu-item ng-if="!vm.faxAccounts || !vm.faxAccounts.rows.length">\n                                                        <md-button disabled="disabled" translate="DASHBOARDS.NO_FAX_ACCOUNTS_AVAILABLE">\n                                                            <md-icon md-font-icon="icon-deskphone"></md-icon> No fax accounts available\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                </md-menu-content>\n                                            </md-menu>\n                                        </div>\n                                    </div>\n                                </div>\n\n                                <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                    <md-input-container class="md-block" flex-gt-sm="" ng-init="vm.contact.dateOfBirth = vm.getDateFromString(vm.contact.dateOfBirth)">\n                                        <label translate="DASHBOARDS.DATE_OF_BIRTH">Date of Birth</label>\n                                        <mdp-date-picker mdp-open-on-click mdp-format="YYYY-MM-DD" name="dateOfBirth" ng-model="vm.contact.dateOfBirth"></mdp-date-picker>\n                                    </md-input-container>\n                                </div>\n\n                                <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                    <md-input-container class="md-block" flex-gt-sm="">\n                                        <label translate="DASHBOARDS.COMPANY">Company</label>\n                                        <md-icon md-font-icon="icon-domain" class="email"></md-icon>\n                                        <md-select name="company" ng-model="vm.contact.CompanyId">\n                                            <md-option ng-value="company.id" ng-repeat="company in vm.tab.companies.rows">{{company.name}}</md-option>\n                                            <md-option ng-value="null"><em translate="DASHBOARDS.NONE">None</em></md-option>\n                                        </md-select>\n                                    </md-input-container>\n                                    <div flex="5"></div>\n                                    <md-input-container class="md-block" flex-gt-sm="">\n                                        <label translate="DASHBOARDS.TAG">TAG</label>\n                                        <md-icon md-font-icon="icon-tag"></md-icon>\n                                        <md-select ng-model="vm.contact.tags" multiple>\n                                            <md-option ng-value="tag.name" ng-repeat="tag in vm.tab.tags.rows">{{tag.name}}</md-option>\n                                        </md-select>\n                                    </md-input-container>\n                                </div>\n\n                                <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                    <md-input-container class="md-block" flex-gt-sm="">\n                                        <label translate="DASHBOARDS.COUNTRY">Country</label>\n                                        <md-icon md-font-icon="icon-home" class="country"></md-icon>\n                                        <input type="text" name="country" ng-model="vm.contact.country" class="text-truncate">\n                                    </md-input-container>\n                                    <div flex="5"></div>\n                                    <md-input-container class="md-block" flex-gt-sm="">\n                                        <label translate="DASHBOARDS.CITY">City</label>\n                                        <input type="text" name="city" ng-model="vm.contact.city">\n                                    </md-input-container>\n                                </div>\n\n                                <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                    <md-input-container class="md-block" flex-gt-sm="">\n                                        <label translate="DASHBOARDS.STREET">Street</label>\n                                        <input type="text" name="street" ng-model="vm.contact.street">\n                                    </md-input-container>\n                                    <div flex="5"></div>\n                                    <md-input-container class="md-block" flex-gt-sm="">\n                                        <label translate="DASHBOARDS.POSTALCODE">Postal Code</label>\n                                        <input type="text" name="postalCode" ng-model="vm.contact.postalCode">\n                                    </md-input-container>\n                                </div>\n\n                                <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                    <md-input-container class="md-block" flex-gt-sm="">\n                                        <label translate translate-attr-placeholder="DASHBOARDS.NOTES">Notes</label>\n                                        <md-icon md-font-icon="icon-note"></md-icon>\n                                        <textarea ng-model="vm.contact.description" type="text" max-rows="4"></textarea>\n                                    </md-input-container>\n                                </div>\n                            </form>\n                        </md-card>\n                        <md-card>\n                            <div class="h2 secondary-text text-truncate" translate="DASHBOARDS.SOCIAL">Social</div>\n                            <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                <md-input-container class="md-block" flex-gt-sm="">\n                                    <label>Facebook</label>\n                                    <md-icon md-font-icon="icon-facebook" class="facebook"></md-icon>\n                                    <input type="text" name="facebook" ng-model="vm.contact.facebook" class="text-truncate">\n                                </md-input-container>\n                                <div flex="5"></div>\n                                <md-input-container class="md-block" flex-gt-sm="">\n                                    <label>Twitter</label>\n                                    <md-icon md-font-icon="icon-twitter" class="twitter"></md-icon>\n                                    <input type="text" name="twitter" ng-model="vm.contact.twitter" class="text-truncate">\n                                </md-input-container>\n                            </div>\n                        </md-card>\n                    </div>\n                    <div flex="25" layout="column" layout-padding>\n                        <md-card flex="100">\n                            <div class="h2 secondary-text text-truncate" translate="DASHBOARDS.CUSTOM_FIELDS">CUSTOM FIELDS</div>\n                            <form name="vm.customFieldsForm" novalidate>\n\n                                \x3c!-- START INPUT LIST --\x3e\n                                <md-input-container class="md-block" ng-if="!vm.contact.ListId">\n                                    <label translate translate-attr-placeholder="DASHBOARDS.LIST">List</label>\n                                    <md-select name="list" ng-model="vm.contact.ListId" ng-change="vm.getCustomFields(vm.contact.ListId)" required>\n                                        <md-optgroup label="Lists">\n                                            <md-option ng-value="list.id" ng-repeat="list in vm.tab.userLists.rows">#{{list.id}} - {{list.name}}</md-option>\n                                        </md-optgroup>\n                                    </md-select>\n                                </md-input-container>\n                                <md-input-container class="md-block" ng-if="vm.contact.ListId">\n                                    <label translate translate-attr-placeholder="DASHBOARDS.LIST">List</label>\n                                    <md-select ng-disabled="!vm.newContact" name="list" ng-model="vm.contact.ListId" required>\n                                        <md-optgroup label="Lists">\n                                            <md-option ng-value="list.id" ng-repeat="list in vm.tab.lists.rows">#{{list.id}} - {{list.name}}</md-option>\n                                        </md-optgroup>\n                                    </md-select>\n                                </md-input-container>\n                                \x3c!-- END INPUT LIST --\x3e\n\n                                <div ng-repeat="customField in vm.tab.customFields.rows" ng-switch="customField.type">\n                                    <md-input-container class="md-block" ng-switch-when="datetime">\n                                        <label>{{customField.alias}}<span ng-if="customField.required">*</span></label>\n                                        <div ng-init="vm.contact[\'cf_\' + customField.id] = vm.getDateFromString(vm.contact[\'cf_\' + customField.id])">\n                                            <mdp-date-picker mdp-open-on-click ng-required="customField.required" mdp-format="YYYY-MM-DD" ng-model="vm.contact[\'cf_\' + customField.id]"></mdp-date-picker>\n                                            <mdp-time-picker mdp-open-on-click mdp-placeholder="Time" ng-required="customField.required" mdp-format="HH:mm:ss" mdp-auto-switch="true" ng-model="vm.contact[\'cf_\' + customField.id]"></mdp-time-picker>\n                                        </div>\n                                    </md-input-container>\n\n                                    <md-input-container class="md-block" ng-switch-when="select">\n                                        <label>{{customField.alias}}<span ng-if="customField.required">*</span></label>\n                                        <md-select ng-model="vm.contact[\'cf_\' + customField.id]" ng-required="customField.required">\n                                            <md-option ng-repeat="value in customField.values" ng-value="value.value">{{value.value}}</md-option>\n                                            <md-option ng-value="null"><em translate="CONTACTMANAGER.NONE">None</em></md-option>\n                                        </md-select>\n                                    </md-input-container>\n\n                                    <md-input-container class="md-block" ng-switch-when="switch">\n                                        <md-switch aria-label="{{customField.alias}}" ng-model="vm.contact[\'cf_\' + customField.id]" ng-true-value="1" ng-false-value="0">\n                                            {{customField.alias}}<span ng-if="customField.required">*</span>\n                                        </md-switch>\n                                    </md-input-container>\n\n                                    <md-input-container class="md-block" ng-switch-default>\n                                        <label>{{customField.alias}}<span ng-if="customField.required">*</span></label>\n                                        <input type="{{customField.type}}" ng-model="vm.contact[\'cf_\' + customField.id]" ng-required="customField.required">\n                                    </md-input-container>\n                                </div>\n                            </form>\n                        </md-card>\n                    </div>\n                </div>\n            </md-content>\n        </md-tab-body>\n    </md-tab>\n</md-tabs>'),e.put("app/main/apps/dashboards/views/general/agent/contact/dispose/dialog.html",'<md-dialog class="agent-dialog" aria-label="agent dispose">\n    <md-toolbar class="md-background-bg">\n        <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n            <span class="title" translate="DASHBOARDS.DISPOSE"></span>\n            <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n            </md-button>\n        </div>\n    </md-toolbar>\n    <md-dialog-content ms-scroll>\n        <div ng-if="!vm.isReschedule">\n            <md-input-container class="md-block">\n                <label translate="DASHBOARDS.DISPOSITIONS">Dispositions</label>\n                <md-select name="disposition" ng-model="vm.choice" required>\n                    <md-optgroup ng-if="vm.dispositions.rows.length" label="Custom">\n                        <md-option ng-value="disposition.name" ng-repeat="disposition in vm.dispositions.rows">{{ disposition.name }}</md-option>\n                    </md-optgroup>\n                    <md-optgroup label="Default">\n                        <md-option ng-value="null">NONE</md-option>\n                        <md-option value="fax"><span translate="DASHBOARDS.FAX">Fax</span></md-option>\n                        <md-option value="amd"><span translate="DASHBOARDS.ANSWER_MACHINE">Answer Machine</span></md-option>\n                        <md-option value="interested"><span translate="DASHBOARDS.INTERESTED">Interested</span></md-option>\n                        <md-option value="notinterested"><span translate="DASHBOARDS.NOT_INTERESTED">Not Interested</span></md-option>\n                        <md-option value="sold"><span translate="DASHBOARDS.SOLD">Sold</span></md-option>\n                        <md-option value="special"><span translate="DASHBOARDS.SPECIAL">Special</span></md-option>\n                    </md-optgroup>\n                </md-select>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="DASHBOARDS.NOTE">Note</label>\n                <textarea ng-model="vm.note" md-maxlength="255" max-rows="5" autofocus></textarea>\n            </md-input-container>\n        </div>\n        <div ng-if="vm.isReschedule" layout="row">\n            <div flex class="md-block">\n                <mdp-date-picker mdp-open-on-click required name="date" mdp-placeholder="Date" mdp-format="YYYY-MM-DD" mdp-min-date="vm.hopper.minDate" ng-model="vm.hopper.dateTime">\n                    <div ng-messages="dateTime.date.$error" ng-show="dateTime.date.$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="DASHBOARDS.ERRORS.DATE_REQUIRED">Date is required</span>\n                        </div>\n                        <div ng-message="format">\n                            <span translate="DASHBOARDS.ERRORS.DATE_INVALID">Date is invalid</span>\n                        </div>\n                    </div>\n                </mdp-date-picker>\n            </div>\n\n            <div flex class="md-block">\n                <mdp-time-picker mdp-open-on-click required name="time" mdp-placeholder="Time" mdp-format="HH:mm:ss" mdp-auto-switch="true" ng-model="vm.hopper.dateTime">\n                    <div ng-messages="dateTime.time.$error" ng-show="dateTime.time.$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="DASHBOARDS.ERRORS.TIME_REQUIRED">Time is required</span>\n                        </div>\n                        <div ng-message="format">\n                            <span translate="DASHBOARDS.ERRORS.TIME_INVALID">Time is invalid</span>\n                        </div>\n                    </div>\n                </mdp-time-picker>\n            </div>\n        </div>\n    </md-dialog-content>\n    <md-dialog-actions ng-if="!vm.isReschedule" layout="row">\n        <md-button ng-disabled="!(vm.choice || vm.note)" class="send-button md-raised md-accent" ng-click="vm.saveDisposition()">\n            {{(vm.choice ? \'DASHBOARDS.DISPOSE\' : \'DASHBOARDS.SAVE\') | translate}}\n        </md-button>\n        <md-button ng-if="vm.dialerCall" class="send-button md-raised md-primary" translate="DASHBOARDS.RESCHEDULE" ng-click="vm.saveDisposition(\'reschedule\')">\n            Reschedule\n        </md-button>\n        <md-button ng-if="vm.dialerCall" class="send-button md-accent md-raised" translate="DASHBOARDS.RECALLME" ng-click="vm.saveDisposition(\'recallme\')">\n            Recall Me\n        </md-button>\n        <span flex></span>\n        <md-button ng-if="vm.dialerCall" class="md-raised md-warn" translate="DASHBOARDS.BLACKLIST" ng-click="vm.saveDisposition(\'blacklist\')">\n            Blacklist\n        </md-button>\n    </md-dialog-actions>\n    <md-dialog-actions ng-if="vm.isReschedule" layout="row" layout-align="space-between center">\n        <div layout="row" layout-align="start center">\n            <md-button type="submit" ng-disabled="vm.disable" ng-click="vm.saveReschedule()" class="send-button md-accent md-raised" ng-disabled="dateTime.$invalid || dateTime.$pristine" aria-label="SAVE" translate="DASHBOARDS.SAVE" translate-attr-aria-label="DASHBOARDS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n    </md-dialog-actions>\n</md-dialog>'),e.put("app/main/apps/dashboards/views/general/agent/contact/reschedule/dialog.html",'<md-dialog class="agent-dialog" aria-label="New Agent">\n    <form name="dateTime" class="md-inline-form" novalidate>\n        <md-toolbar class="md-background-bg">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <div layout="row">\n                <div flex class="md-block">\n                    <mdp-date-picker mdp-open-on-click required name="date" mdp-placeholder="Date" mdp-format="YYYY-MM-DD" mdp-min-date="vm.hopper.minDate" ng-model="vm.hopper.dateTime">\n                        <div ng-messages="dateTime.date.$error" ng-show="dateTime.date.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="DASHBOARDS.ERRORS.DATE_REQUIRED">Date is required</span>\n                            </div>\n                            <div ng-message="format">\n                                <span translate="DASHBOARDS.ERRORS.DATE_INVALID">Date is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-date-picker>\n                </div>\n\n                <div flex class="md-block">\n                    <mdp-time-picker mdp-open-on-click required name="time" mdp-placeholder="Time" mdp-format="HH:mm:ss" mdp-auto-switch="true" ng-model="vm.hopper.dateTime">\n                        <div ng-messages="dateTime.time.$error" ng-show="dateTime.time.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="DASHBOARDS.ERRORS.TIME_REQUIRED">Time is required</span>\n                            </div>\n                            <div ng-message="format">\n                                <span translate="DASHBOARDS.ERRORS.TIME_INVALID">Time is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-disabled="vm.disable" ng-click="vm.saveDialog()" class="send-button md-accent md-raised" ng-disabled="dateTime.$invalid || dateTime.$pristine" aria-label="SAVE" translate="DASHBOARDS.SAVE" translate-attr-aria-label="DASHBOARDS.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/dashboards/views/general/agent/home/abandoned/agent.general.abandoned.html",'<div ng-cloak>\n    <md-content>\n        <md-tabs md-selected="vm.selectedTab" md-dynamic-height md-border-bottom>\n            <md-tab ng-if="vm_home.hasPermission(110)" label="Voice">\n                <div ng-controller="AgentHomeAbandonedVoiceController as vm_voice">\n                    <md-content ng-if="vm.selectedTab==0" ng-include="\'app/main/apps/dashboards/views/general/agent/home/abandoned/voice/agent.general.abandoned.voice.html\'" class="md-padding">\n                    </md-content>\n                </div>\n            </md-tab>\n            <md-tab ng-if="vm_home.hasPermission(110) && vm_home.license.dialer" label="Bull">\n                <div ng-controller="AgentHomeAbandonedBullController as vm_bull">\n                    <md-content ng-if="vm.selectedTab==1" ng-include="\'app/main/apps/dashboards/views/general/agent/home/abandoned/bull/agent.general.abandoned.bull.html\'" class="md-padding">\n                    </md-content>\n                </div>\n            </md-tab>\n        </md-tabs>\n    </md-content>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/home/abandoned/bull/agent.general.abandoned.bull.html",'<md-card ngCloak>\n    <md-toolbar class="md-table-toolbar md-default table-header blue-bg">\n        <div class="md-toolbar-tools" layout="row" layout-align="center center">\n            <span class="md-subhead" translate="DASHBOARDS.ABANDONEDQUEUECALLS">ABANDONED QUEUE CALLS</span>\n            <ms-search-bar on-search="vm_bull.query.filter = query" on-collapse="vm_bull.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div class="padding-horizontal-20" layout="column" layout-align="center center">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_DATE">Select a date</span>\n                <div layout="row" layout-align="center center">\n                    <md-button ng-if="vm_bull.pickerModel.dateStart" ng-click="vm_bull.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                        <md-tooltip>{{ \'DASHBOARDS.DELETE\' | translate }}</md-tooltip>\n                        <md-icon md-font-icon="icon-close" class="s16 white-fg"></md-icon>\n                    </md-button>\n                    <md-date-range localization-map="vm_bull.localizationMap" ng-model="vm_bull.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm_bull.getContacts()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n                </div>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_AGENT">Select an agent</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm_bull.query.lastAssignedTo" ng-change="vm_bull.getContacts()">\n                    <md-option ng-value="vm_bull.currentUser.name" translate="DASHBOARDS.ME"></md-option>\n                    <md-option ng-value="\'null\'" translate="DASHBOARDS.NOT_ASSIGNED"></md-option>\n                    <md-option ng-value="undefined" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div ng-if="vm_bull.queues.count" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_CAMPAIGN">Select a Campaign</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm_bull.query.queue" ng-change="vm_bull.getContacts()">\n                    <md-option ng-value="vm_bull.defaultQueues" ng-if="vm_bull.queues.count > 1"><em translate="DASHBOARDS.ALL">All</em></md-option>\n                    <md-option ng-value="queue.name" ng-repeat="queue in vm_bull.queues.rows">{{queue.name}}</md-option>\n                </md-select>\n            </div>\n            <md-button class="md-icon-button" ng-click="vm_bull.refresh && vm_bull.refreshContacts($event)" aria-label="refresh Contacts" translate translate-attr-label="DASHBOARDS.REFRESH_CONTACTS">\n                <md-icon md-font-icon="icon-reload"></md-icon>\n                <md-tooltip ng-if="vm_bull.showTooltip" md-visible="vm_bull.showTooltip">{{\'DASHBOARDS.CLICKRELOAD\' | translate}}</md-tooltip>\n            </md-button>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm_bull.promise">\n            <thead md-head md-order="vm_bull.query.sort" md-on-reorder="vm_bull.getContacts">\n                <tr md-row>\n                    <th md-column md-order-by="id">ID</th>\n                    <th md-column md-order-by="calleridname">{{\'DASHBOARDS.FULLNAME\' | translate}}</th>\n                    <th md-column md-order-by="calleridnum">{{\'DASHBOARDS.PHONE\' | translate}}</th>\n                    <th md-column md-order-by="queue">{{\'DASHBOARDS.QUEUE\' | translate}}</th>\n                    <th md-column md-order-by="queuecallerabandonAt">{{\'DASHBOARDS.ABANDONAT\' | translate}}</th>\n                    <th md-column md-order-by="queuecallerexitAt">{{\'DASHBOARDS.QUEUECALLEREXITAT\' | translate}}</th>\n                    <th md-column md-order-by="queuecallerexitreason">{{\'DASHBOARDS.QUEUECALLEREXITREASON\' | translate}}</th>\n                    <th md-column md-order-by="disposition">{{\'DASHBOARDS.DISPOSITION\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.RESERVED\' | translate}}</th>\n                    <th md-column md-order-by="lastAssignedTo">{{\'DASHBOARDS.LASTASSIGNEDTO\' | translate}}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm_bull.contacts.rows.length">\n                    <td md-cell colspan="10">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="contact in vm_bull.contacts.rows">\n                    <td md-cell class="id">{{contact.id}}</td>\n                    <td md-cell class="firstName">{{contact.calleridname}}</td>\n                    <td md-cell class="phone">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="contact.calleridnum" license="vm_home.license" disabled="contact.lastAssignedTo !== vm_bull.currentUser.name"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td md-cell class="list">{{vm_bull.queuesMap[contact.queue]}}</td>\n                    <td md-cell class="list">{{contact.queuecallerabandonAt ? (contact.queuecallerabandonAt | formatdate) : undefined }}</td>\n                    <td md-cell class="list">{{contact.queuecallerexitAt ? (contact.queuecallerexitAt | formatdate) : undefined }}</td>\n                    <td md-cell class="list">{{contact.queuecallerexitreason}}</td>\n                    <td md-cell class="list">{{contact.disposition}}</td>\n                    <td md-cell class="actions">\n                        <md-switch no-margin ng-if="contact.lastAssignedTo === vm_bull.currentUser.name || !contact.lastAssignedTo" ng-disabled="vm_bull.disable[contact.id]" ng-model="contact.assigned" aria-label="reserved" ng-change="vm_bull.reserved(contact, contact.disposition)">\n                            \x3c!-- <span>{{ contact.assigned ? \'DASHBOARDS.RESERVED\' : \'DASHBOARDS.FREE\' | translate }}</span> --\x3e\n                        </md-switch>\n                    </td>\n                    <td md-cell class="list">{{contact.lastAssignedTo}}</td>\n                    <td md-cell class="actions">\n                        <md-menu ng-if="contact.lastAssignedTo === vm_bull.currentUser.name">\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n                            <md-menu-content width="1">\n                                <md-menu-item>\n                                    <md-menu>\n                                        <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="DASHBOARDS.DISPOSE">Dispose</md-button>\n                                        <md-menu-content>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_bull.reserved(contact, null)"><em translate="DASHBOARDS.NONE">NONE</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_bull.reserved(contact, \'fax\')"><em translate="DASHBOARDS.FAX">FAX</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_bull.reserved(contact, \'Answer Machine\')"><em translate="DASHBOARDS.ANSWER_MACHINE">ANSWER_MACHINE</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_bull.reserved(contact, \'Interested\')"><em translate="DASHBOARDS.INTERESTED">INTERESTED</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_bull.reserved(contact, \'Not Interested\')"><em translate="DASHBOARDS.NOT_INTERESTED">NOT_INTERESTED</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_bull.reserved(contact, \'Sold\')"><em translate="DASHBOARDS.SOLD">SOLD</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_bull.reserved(contact, \'Special\')"><em translate="DASHBOARDS.SPECIAL">SPECIAL</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm_bull.disposition.length" ng-repeat="disposition in vm_bull.disposition">\n                                                <md-button ng-click="vm_bull.reserved(contact, disposition.name)">{{disposition.name}}</md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-limit="vm_bull.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_bull.query.page" md-total="{{vm_bull.contacts.count}}" md-on-paginate="vm_bull.getContacts" md-page-select></md-table-pagination>\n\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/abandoned/voice/agent.general.abandoned.voice.html",'<md-card ngCloak>\n    <md-toolbar class="md-table-toolbar md-default table-header blue-bg">\n        <div class="md-toolbar-tools" layout="row" layout-align="center center">\n            <span class="md-subhead" translate="DASHBOARDS.ABANDONEDQUEUECALLS">ABANDONED QUEUE CALLS</span>\n            <ms-search-bar on-search="vm_voice.query.filter = query" on-collapse="vm_voice.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div class="padding-horizontal-20" layout="column" layout-align="center center">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_DATE">Select a date</span>\n                <div layout="row" layout-align="center center">\n                    <md-button ng-if="vm_voice.pickerModel.dateStart" ng-click="vm_voice.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                        <md-tooltip>{{ \'DASHBOARDS.DELETE\' | translate }}</md-tooltip>\n                        <md-icon md-font-icon="icon-close" class="s16 white-fg"></md-icon>\n                    </md-button>\n                    <md-date-range localization-map="vm_voice.localizationMap" ng-model="vm_voice.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm_voice.getContacts()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n                </div>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_AGENT">Select an agent</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm_voice.query.lastAssignedTo" ng-change="vm_voice.getContacts()">\n                    <md-option ng-value="vm_voice.currentUser.name" translate="DASHBOARDS.ME"></md-option>\n                    <md-option ng-value="\'null\'" translate="DASHBOARDS.NOT_ASSIGNED"></md-option>\n                    <md-option ng-value="undefined" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div ng-if="vm_voice.queues.count" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_CAMPAIGN">Select a Campaign</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm_voice.query.queue" ng-change="vm_voice.getContacts()">\n                    <md-option ng-value="vm_voice.defaultQueues" ng-if="vm_voice.queues.count > 1"><em translate="DASHBOARDS.ALL">All</em></md-option>\n                    <md-option ng-value="queue.name" ng-repeat="queue in vm_voice.queues.rows">{{queue.name}}</md-option>\n                </md-select>\n            </div>\n            <md-button class="md-icon-button" ng-click="vm_voice.refresh && vm_voice.refreshContacts($event)" aria-label="refresh Contacts" translate translate-attr-label="DASHBOARDS.REFRESH_CONTACTS">\n                <md-icon md-font-icon="icon-reload"></md-icon>\n                <md-tooltip ng-if="vm_voice.showTooltip" md-visible="vm_voice.showTooltip">{{\'DASHBOARDS.CLICKRELOAD\' | translate}}</md-tooltip>\n            </md-button>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm_voice.promise">\n            <thead md-head md-order="vm_voice.query.sort" md-on-reorder="vm_voice.getContacts">\n                <tr md-row>\n                    <th md-column md-order-by="id">ID</th>\n                    <th md-column md-order-by="calleridname">{{\'DASHBOARDS.FULLNAME\' | translate}}</th>\n                    <th md-column md-order-by="calleridnum">{{\'DASHBOARDS.PHONE\' | translate}}</th>\n                    <th md-column md-order-by="queue">{{\'DASHBOARDS.QUEUE\' | translate}}</th>\n                    <th md-column md-order-by="queuecallerabandonAt">{{\'DASHBOARDS.ABANDONAT\' | translate}}</th>\n                    <th md-column md-order-by="disposition">{{\'DASHBOARDS.DISPOSITION\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.RESERVED\' | translate}}</th>\n                    <th md-column md-order-by="lastAssignedTo">{{\'DASHBOARDS.LASTASSIGNEDTO\' | translate}}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm_voice.contacts.rows.length">\n                    <td md-cell colspan="10">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="contact in vm_voice.contacts.rows">\n                    <td md-cell class="id">{{contact.id}}</td>\n                    <td md-cell class="firstName">{{contact.calleridname}}</td>\n                    <td md-cell class="phone">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="contact.calleridnum" license="vm_home.license" disabled="contact.lastAssignedTo !== vm_voice.currentUser.name"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td md-cell class="list">{{vm_voice.queuesMap[contact.queue]}}</td>\n                    <td md-cell class="list">{{contact.queuecallerabandonAt ? (contact.queuecallerabandonAt | formatdate) : undefined }}</td>\n                    <td md-cell class="list">{{contact.disposition}}</td>\n                    <td md-cell class="actions">\n                        <md-switch no-margin ng-if="contact.lastAssignedTo === vm_voice.currentUser.name || !contact.lastAssignedTo" ng-disabled="vm_voice.disable[contact.id]" ng-model="contact.assigned" aria-label="reserved" ng-change="vm_voice.reserved(contact, contact.disposition)">\n                            \x3c!-- <span>{{ contact.assigned ? \'DASHBOARDS.RESERVED\' : \'DASHBOARDS.FREE\' | translate }}</span> --\x3e\n                        </md-switch>\n                    </td>\n                    <td md-cell class="list">{{contact.lastAssignedTo}}</td>\n                    <td md-cell class="actions">\n                        <md-menu ng-if="contact.lastAssignedTo === vm_voice.currentUser.name">\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n                            <md-menu-content width="1">\n                                <md-menu-item>\n                                    <md-menu>\n                                        <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="DASHBOARDS.DISPOSE">Dispose</md-button>\n                                        <md-menu-content>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_voice.reserved(contact, null)"><em translate="DASHBOARDS.NONE">NONE</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_voice.reserved(contact, \'fax\')"><em translate="DASHBOARDS.FAX">FAX</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_voice.reserved(contact, \'Answer Machine\')"><em translate="DASHBOARDS.ANSWER_MACHINE">ANSWER_MACHINE</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_voice.reserved(contact, \'Interested\')"><em translate="DASHBOARDS.INTERESTED">INTERESTED</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_voice.reserved(contact, \'Not Interested\')"><em translate="DASHBOARDS.NOT_INTERESTED">NOT_INTERESTED</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_voice.reserved(contact, \'Sold\')"><em translate="DASHBOARDS.SOLD">SOLD</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_voice.reserved(contact, \'Special\')"><em translate="DASHBOARDS.SPECIAL">SPECIAL</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm_voice.disposition.length" ng-repeat="disposition in vm_voice.disposition">\n                                                <md-button ng-click="vm_voice.reserved(contact, disposition.name)">{{disposition.name}}</md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-limit="vm_voice.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_voice.query.page" md-total="{{vm_voice.contacts.count}}" md-on-paginate="vm_voice.getContacts" md-page-select></md-table-pagination>\n\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/agent.general.home.html",'<div layout="column" layout-align="start center" class="md-primary-bg width-50">\n    <div ng-repeat="node in vm_home.navigation">\n        <div ng-repeat="home in node.children">\n            <md-button ng-repeat="button in home.children" ng-if="!button.hidden()" class="md-raised width-50 height-50 no-margin" style="border-radius: 0px" aria-label="{{button.state}}" ng-click="vm_home.changeSidebarTab(button.state)" ng-class="{\'md-primary\': vm_home.sidebar != button.state}">\n                <md-tooltip md-direction="right" md-delay="500"><span translate="{{button.translate}}"></span></md-tooltip>\n                <md-icon md-font-icon="{{button.icon}}" ng-class="button.iconClass"></md-icon>\n            </md-button>\n        </div>\n    </div>\n</div>\n<div ng-switch="vm_home.sidebar" style="overflow-y: auto" flex>\n    <div ng-switch-when="contacts">\n        <div ng-if="vm_home.hasPermission(102)" ng-include="\'app/main/apps/dashboards/views/general/agent/home/contacts/agent.general.contacts.html\'" ng-controller="AgentHomeContactsController as vm"></div>\n        <div ng-if="!vm_home.hasPermission(102)" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n    <div ng-switch-when="mycontacts">\n        <div ng-if="vm_home.hasPermission(103) && vm_home.license.cm" ng-include="\'app/main/apps/dashboards/views/general/agent/home/mycontacts/agent.general.mycontacts.html\'" ng-controller="AgentHomeMyContactsController as vm"></div>\n        <div ng-if="!vm_home.hasPermission(103) || !vm_home.license.cm" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n    <div ng-switch-when="voice">\n        <div ng-if="vm_home.hasPermission(110)" ng-include="\'app/main/apps/dashboards/views/general/agent/home/voice/agent.general.voice.html\'" ng-controller="AgentHomeVoiceController as vm"></div>\n        <div ng-if="!vm_home.hasPermission(110)" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n    <div ng-switch-when="abandoned">\n        <div ng-if="vm_home.hasPermission(111)" ng-include="\'app/main/apps/dashboards/views/general/agent/home/abandoned/agent.general.abandoned.html\'" ng-controller="AgentHomeAbandonedController as vm"></div>\n        <div ng-if="!vm_home.hasPermission(111)" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n    <div ng-switch-when="recordings">\n        <div ng-if="vm_home.hasPermission(104)" ng-include="\'app/main/apps/dashboards/views/general/agent/home/recordings/agent.general.recordings.html\'" ng-controller="AgentHomeRecordingsController as vm"></div>\n        <div ng-if="!vm_home.hasPermission(104)" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n    <div ng-switch-when="chat">\n        <div ng-if="vm_home.hasPermission(105) && vm_home.license.chat" ng-include="\'app/main/apps/dashboards/views/general/agent/home/chat/agent.general.chat.html\'" ng-controller="AgentHomeChatController as vm"></div>\n        <div ng-if="!vm_home.hasPermission(105) || !vm_home.license.chat" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n    <div ng-switch-when="mail">\n        <div ng-if="vm_home.hasPermission(106) && vm_home.license.mail" ng-include="\'app/main/apps/dashboards/views/general/agent/home/mail/agent.general.mail.html\'" ng-controller="AgentHomeMailController as vm"></div>\n        <div ng-if="!vm_home.hasPermission(106) || !vm_home.license.mail" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n    <div ng-switch-when="sms">\n        <div ng-if="vm_home.hasPermission(107) && vm_home.license.messaging" ng-include="\'app/main/apps/dashboards/views/general/agent/home/sms/agent.general.sms.html\'" ng-controller="AgentHomeSmsController as vm"></div>\n        <div ng-if="!vm_home.hasPermission(107) || !vm_home.license.messaging" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n    <div ng-switch-when="openchannel">\n        <div ng-if="vm_home.hasPermission(108) && vm_home.license.openchannel" ng-include="\'app/main/apps/dashboards/views/general/agent/home/openchannel/agent.general.openchannel.html\'" ng-controller="AgentHomeOpenchannelController as vm"></div>\n        <div ng-if="!vm_home.hasPermission(108) || !vm_home.license.openchannel" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n    <div ng-switch-when="fax">\n        <div ng-if="vm_home.hasPermission(109) && vm_home.license.fax" ng-include="\'app/main/apps/dashboards/views/general/agent/home/fax/agent.general.fax.html\'" ng-controller="AgentHomeFaxController as vm"></div>\n        <div ng-if="!vm_home.hasPermission(109) || !vm_home.license.fax" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n    <div ng-switch-default>\n        <div ng-if="vm_home.hasPermission(101)" ng-include="\'app/main/apps/dashboards/views/general/agent/home/dashboard/agent.general.dashboard.html\'" ng-controller=" AgentHomeDashboardController  as vm"></div>\n        <div ng-if="!vm_home.hasPermission(101)" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/home/chat/agent.general.chat.html",'<md-card ngCloak>\n    <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm.getColorByChannel(\'chat\')">\n        <div class="md-toolbar-tools">\n            <span class="md-subhead" translate="DASHBOARDS.INTERACTIONS">Interactions</span>\n            <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div class="padding-horizontal-20" layout="column" layout-align="center center">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_DATE">Select a date</span>\n                <div layout="row" layout-align="center center">\n                    <md-button ng-if="vm.pickerModel.dateStart" ng-click="vm.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                        <md-tooltip>{{ \'DASHBOARDS.DELETE\' | translate }}</md-tooltip>\n                        <md-icon md-font-icon="icon-close" class="s16 white-fg"></md-icon>\n                    </md-button>\n                    <md-date-range localization-map="vm.localizationMap" ng-model="vm.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm.getChatInteractions()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n                </div>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_READ_UNREAD">Select Read/Unread</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.read" ng-change="vm.getChatInteractions()">\n                    <md-option value="0" translate="DASHBOARDS.UNREAD">READ</md-option>\n                    <md-option value="1" translate="DASHBOARDS.READ">UNREAD</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_STATUS">Select a status</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.closed" ng-change="vm.getChatInteractions()">\n                    <md-option value="0" translate="DASHBOARDS.OPENED">OPENED</md-option>\n                    <md-option value="1" translate="DASHBOARDS.CLOSED">CLOSED</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_WEBSITE">Select an account</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.ChatWebsiteId" ng-change="vm.getChatInteractions()">\n                    <md-option ng-value="chatAccount.id" ng-repeat="chatAccount in vm.chatAccounts.rows">{{chatAccount.name}}</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_AGENT">Select an agent</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.UserId" ng-change="vm.getChatInteractions()">\n                    <md-option ng-value="vm.user.id" translate="DASHBOARDS.ME"></md-option>\n                    <md-option ng-value="\'null\'" translate="DASHBOARDS.NOT_ASSIGNED"></md-option>\n                    <md-option ng-value="undefined" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_TAG">Select a tag</span>\n                <md-select id="tags" placeholder="Tags" multiple="true" class="font-size-12 no-margin" ng-model="vm.query.tag" ng-change="vm.getChatInteractions()" style="color:white;">\n                    <md-option ng-repeat="tag in vm.tags.rows" ng-value="tag.id">{{tag.name}}</md-option>\n                </md-select>\n            </div>\n            <div layout="column">\n                <md-button class="md-icon-button" aria-label="Reload" translate translate-attr-aria-label="DASHBOARDS.RELOAD" ng-click="vm.getChatInteractions()">\n                    <md-icon md-font-icon="icon-reload"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm.promise">\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getChatInteractions">\n                <tr md-row>\n                    <th md-column md-order-by="id">ID</th>\n                    <th md-column style="width:15px">\n                        <md-icon md-font-icon="icon-eye" class="s16"></md-icon>\n                    </th>\n                    <th md-column style="width:180px">{{\'DASHBOARDS.CONTACT\' | translate}}</th>\n                    <th md-column md-order-by="createdAt">{{\'DASHBOARDS.STARTEDAT\' | translate}}</th>\n                    <th md-column md-order-by="lastMsgAt">{{\'DASHBOARDS.LAST_MESSAGE\' | translate}}</th>\n                    <th md-column md-order-by="closed">{{\'DASHBOARDS.STATUS\' | translate}}</th>\n                    <th md-column style="width:80px">{{\'DASHBOARDS.AGENT\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.WEBSITE\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.TAGS\' | translate}}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.chatInteractions.rows.length">\n                    <td md-cell colspan="8">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="DASHBOARDS.NO_AVAILABLE_INTERACTION">No Available Interaction</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="chatInteraction in vm.chatInteractions.rows" ng-class="{\'text-bold text-italic\': chatInteraction.unread}">\n                    <td ng-click="vm.showChatInteraction($event, chatInteraction)" md-cell class="id">\n                        <div layout="row" layout-align="start center">\n                            <span class="font-size-10">{{chatInteraction.id}}</span>\n                        </div>\n                    </td>\n                    <td md-cell>\n                        <div ng-if="!chatInteraction.closed && chatInteraction.Users.length">\n                            <md-icon md-font-icon="icon-eye" class="s16"></md-icon>\n                            <md-tooltip>\n                                <span ng-repeat="u in chatInteraction.Users">{{ (u.id == vm.user.id) ? \'DASHBOARDS.ME\' : vm.usersByKey[u.id].fullname | translate }}<span ng-if="!$last">, </span></span>\n                            </md-tooltip>\n                        </div>\n                    </td>\n                    <td ng-click="vm.showChatInteraction($event, chatInteraction)" md-cell>\n                        <div layout="row" layout-align="start center">\n                            <div layout="column">\n                                <span ng-if="!chatInteraction.closed && chatInteraction.unread" class="badge white-fg" ng-class="vm.getColorByChannel(\'chat\')" layout-margin>{{chatInteraction.unread}}</span>\n                                <md-icon ng-if="chatInteraction.attach" md-font-icon="icon-paperclip" class="s16"></md-icon>\n                            </div>\n                            <span class="font-size-12 text-truncate" style="width:180px" layout-margin>{{vm.getContactLabel(chatInteraction)}}</span>\n                        </div>\n                    </td>\n                    <td ng-click="vm.showChatInteraction($event, chatInteraction)" md-cell>\n                        <span class="font-size-10 text-truncate">{{chatInteraction.createdAt | formatdate }}</span>\n                    </td>\n                    <td ng-click="vm.showChatInteraction($event, chatInteraction)" md-cell>\n                        <div layout="row" ng-if="chatInteraction.lastMsgAt">\n                            <span><md-icon md-font-icon="{{chatInteraction.lastMsgDirection == \'in\' ? \'icon-arrow-down-bold blue-grey-800-fg\' : \'icon-arrow-up-bold blue-grey-300-fg\'}}"></md-icon></span>\n                            <div layout="column" layout-align="center center">\n                                <span class="font-size-10 text-truncate">{{chatInteraction.lastMsgAt | formatdate }}</span>\n                            </div </div>\n                            <span ng-if="!chatInteraction.lastMsgAt">No messages</span>\n                    </td>\n                    <td ng-click="vm.showChatInteraction($event, chatInteraction)" md-cell>\n                        <span ng-if="chatInteraction.closed" class="red-fg font-size-12">{{ \'DASHBOARDS.CLOSED\' | translate}} <span ng-if="chatInteraction.disposition">- {{chatInteraction.disposition}}</span></span>\n                        <md-tooltip ng-if="chatInteraction.closed">{{chatInteraction.closedAt | formatdate }}</md-tooltip>\n                        <span ng-if="!chatInteraction.closed" class="green-fg font-size-12"><span translate="DASHBOARDS.OPENED"></span><span ng-if="chatInteraction.substatus"> - {{chatInteraction.substatus}}</span></span>\n                    </td>\n                    <td ng-click="vm.showChatInteraction($event, chatInteraction)" md-cell class="user">\n                        <span class="font-size-12 text-truncate" style="width:120px">{{vm.getUserLabel(chatInteraction)}}</span>\n                    </td>\n                    <td ng-click="vm.showChatInteraction($event, chatInteraction)" md-cell class="chatAccount">\n                        {{ vm.getChatWebsiteLabel(chatInteraction) }}\n                    </td>\n                    <td md-cell>\n                        <div ng-if="chatInteraction.Tags.length">\n                            <div ng-if="chatInteraction.Tags.length == 1" layout="column" layout-align="center center">\n                                <md-icon md-font-icon="icon-tag" ng-style="{\'color\': chatInteraction.Tags[0].color }"></md-icon>\n                                <span class="text-truncate">{{chatInteraction.Tags[0].name}}</span>\n                            </div>\n                            <div ng-if="chatInteraction.Tags.length > 1" layout="column" layout-align="center center">\n                                <md-tooltip md-direction="left" layout="row">\n                                    <span ng-repeat="tag in chatInteraction.Tags">{{tag.name}}<span ng-if="!$last">, </span></span>\n                                </md-tooltip>\n                                <md-icon md-font-icon="icon-tag"></md-icon>\n                            </div>\n                        </div>\n                    </td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="3">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.showChatInteraction($event, chatInteraction)" translate="DASHBOARDS.SHOW">\n                                        Show Chat\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-label="{page: \'{{\'DASHBOARDS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'DASHBOARDS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'DASHBOARDS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n        md-total="{{vm.chatInteractions.count}}" md-on-paginate="vm.getChatInteractions" md-page-select></md-table-pagination>\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/contacts/agent.general.contacts.html",'<md-card>\n    <md-toolbar class="md-table-toolbar md-default table-header red-bg">\n        <div class="md-toolbar-tools" layout="row" layout-align="center center">\n            <span class="md-subhead" translate="DASHBOARDS.CONTACTS">Contacts</span>\n            <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div layout="column">\n                <span class="font-size-10" translate="CONTACTMANAGER.SELECT_LIST">Select a list</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.ListId" ng-change="vm.getContacts()">\n                    <md-option ng-value="vm.defaultLists" ng-if="vm.lists.count > 1"><em translate="CONTACTMANAGER.ALL_CONTACTS">All</em></md-option>\n                    <md-option ng-value="list.id" ng-repeat="list in vm.lists.rows">{{list.name}}</md-option>\n                </md-select>\n            </div>\n            <md-button class="md-icon-button" ng-click="vm.refreshContacts($event)" aria-label="refresh Contacts" translate translate-attr-label="DASHBOARDS.REFRESH_CONTACTS">\n                <md-icon md-font-icon="icon-reload"></md-icon>\n            </md-button>\n            <md-button class="md-icon-button" ng-click="vm.openContact($event)" aria-label="add contact" translate translate-attr-label="DASHBOARDS.ADD_CONTACT">\n                <md-icon md-font-icon="icon-plus"></md-icon>\n            </md-button>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm.promise">\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getContacts">\n                <tr md-row>\n                    <th md-column md-order-by="id">ID</th>\n                    <th md-column md-order-by="firstName">{{\'DASHBOARDS.FULLNAME\' | translate}}</th>\n                    <th md-column md-order-by="phone">{{\'DASHBOARDS.PHONE\' | translate}}</th>\n                    <th md-column md-order-by="mobile">{{\'DASHBOARDS.MOBILE\' | translate}}</th>\n                    <th md-column md-order-by="fax">{{\'DASHBOARDS.FAX\' | translate}}</th>\n                    <th md-column md-order-by="email">{{\'DASHBOARDS.EMAIL\' | translate}}</th>\n                    <th md-column md-order-by="ListId">{{\'DASHBOARDS.LIST\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.TAGS\' | translate}}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.contacts.rows.length">\n                    <td md-cell colspan="10">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="contact in vm.contacts.rows">\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="id">{{contact.id}}</td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="firstName">{{contact.firstName}} {{contact.lastName}}</td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="phone">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="contact.phone" prefix="vm.listsMap[contact.ListId].dialPrefix" license="vm_home.license"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="mobile">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="contact.mobile" prefix="vm.listsMap[contact.ListId].dialPrefix" license="vm_home.license"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="fax">{{contact.fax}}</td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="email">{{contact.email}}</td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="list">{{vm.listsMap[contact.ListId].name}}</td>\n                    <td md-cell class="tags">\n                        <div ng-if="contact.tags.length">\n                            <md-tooltip md-direction="left" layout="row">\n                                <span ng-repeat="tag in contact.tags">{{tag}}<span ng-if="!$last">, </span></span>\n                            </md-tooltip>\n                            <md-icon md-font-icon="icon-tag"></md-icon>\n                        </div>\n                    </td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="3">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.openContact($event, contact)" translate="DASHBOARDS.EDIT">\n                                        Edit Contact\n                                    </md-button>\n                                </md-menu-item>\n                                <md-menu-item>\n                                    <md-button ng-click="vm.mergeContact($event, contact)" translate="DASHBOARDS.MERGE">\n                                        Merge Contact\n                                    </md-button>\n                                </md-menu-item>\n                                <md-menu-item>\n                                    <md-button ng-click="vm.duplicateContact($event, contact)" translate="DASHBOARDS.DUPLICATE">\n                                        Duplicate Contact\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.contacts.count}}" md-on-paginate="vm.getContacts" md-page-select></md-table-pagination>\n\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/dashboard/agent.general.dashboard.html",'<div ng-cloak>\n    <md-content>\n        <md-tabs md-dynamic-height md-border-bottom>\n            <md-tab ng-if="vm_home.hasPermission(110)" label="Voice">\n                <md-content ng-include="\'app/main/apps/dashboards/views/general/agent/home/dashboard/voice/agent.general.dashboard.voice.html\'" ng-controller="AgentHomeDashboardVoiceController as vm_voice" class="md-padding">\n                </md-content>\n            </md-tab>\n            <md-tab ng-if="vm_home.hasPermission(110) && vm_home.license.dialer" label="Bull">\n                <md-content ng-include="\'app/main/apps/dashboards/views/general/agent/home/dashboard/bull/agent.general.dashboard.bull.html\'" ng-controller="AgentHomeDashboardBullController as vm_bull" class="md-padding">\n                </md-content>\n            </md-tab>\n            <md-tab ng-if="vm_home.hasPermission(105) && vm_home.license.chat" label="Chat">\n                <md-content ng-include="\'app/main/apps/dashboards/views/general/agent/home/dashboard/chat/agent.general.dashboard.chat.html\'" ng-controller="AgentHomeDashboardMultiChannelChatController as vm_chat" class="md-padding">\n                </md-content>\n            </md-tab>\n            <md-tab ng-if="vm_home.hasPermission(106) && vm_home.license.mail" label="Email">\n                <md-content ng-include="\'app/main/apps/dashboards/views/general/agent/home/dashboard/mail/agent.general.dashboard.mail.html\'" ng-controller="AgentHomeDashboardMultiChannelMailController as vm_mail" class="md-padding">\n                </md-content>\n            </md-tab>\n            <md-tab ng-if="vm_home.hasPermission(107) && vm_home.license.messaging" label="Sms">\n                <md-content ng-include="\'app/main/apps/dashboards/views/general/agent/home/dashboard/sms/agent.general.dashboard.sms.html\'" ng-controller="AgentHomeDashboardMultiChannelSmsController as vm_sms" class="md-padding">\n                </md-content>\n            </md-tab>\n            <md-tab ng-if="vm_home.hasPermission(108) && vm_home.license.openchannel" label="Open Channel">\n                <md-content ng-include="\'app/main/apps/dashboards/views/general/agent/home/dashboard/openchannel/agent.general.dashboard.openchannel.html\'" ng-controller="AgentHomeDashboardMultiChannelOpenchannelController as vm_openchannel" class="md-padding">\n                </md-content>\n            </md-tab>\n            <md-tab ng-if="vm_home.hasPermission(109) && vm_home.license.fax" label="Fax">\n                <md-content ng-include="\'app/main/apps/dashboards/views/general/agent/home/dashboard/fax/agent.general.dashboard.fax.html\'" ng-controller="AgentHomeDashboardMultiChannelFaxController as vm_fax" class="md-padding">\n                </md-content>\n            </md-tab>\n        </md-tabs>\n    </md-content>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/home/dashboard/bull/agent.general.dashboard.bull.html",'<div layout="row" ngCloak>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header red-900-bg">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="VOICE.QUEUES">Queues</span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table md-progress="vm_bull.promise">\n                <thead md-head md-order="vm_bull.query.sort" md-on-reorder="vm_bull.getVoiceQueues">\n                    <tr md-row>\n                        <th md-column>{{ \'VOICE.NAME\' | translate }}</th>\n                        <th md-column>{{ \'VOICE.TYPE\' | translate }}</th>\n                        <th md-column>{{ \'VOICE.WAITING\' | translate }}</th>\n                        <th ng-if="voiceQueue.type === \'outbound\'" md-column>{{ \'VOICE.ACTIVE\' | translate }}</th>\n                        \x3c!-- <th md-column md-order-by="active">{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_bull.getSize(vm_bull.voiceQueues)">\n                        <td md-cell colspan="4">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, voiceQueue) in vm_bull.voiceQueues">\n                        <td md-cell class="name">{{voiceQueue.name}}</td>\n                        <td ng-if="voiceQueue.type === \'outbound\'" md-cell class="waiting">{{voiceQueue.dialMethod}}</td>\n                        <td md-cell class="waiting">{{voiceQueue.waiting || 0}}</td>\n                        <td md-cell ng-if="voiceQueue.type === \'outbound\'" class="dialActive ">\n                            <md-icon md-colors="{color: {{voiceQueue.dialActive ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{voiceQueue.dialActive ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                        </td>\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_bull.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_bull.query.page" md-total="{{vm_bull.voiceQueuesTotal}}" md-on-paginate="vm_bull.getVoiceQueues" md-page-select></md-table-pagination>\n    </md-card>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header red-900-bg">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.WAITING_TEXT"></span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table>\n                <thead md-head>\n                    <tr md-row>\n                        <th md-column>{{ \'VOICE.DID\' | translate }}</th>\n                        <th md-column>{{ \'VOICE.QUEUE\' | translate }}</th>\n                        <th md-column>{{ \'VOICE.CALLER\' | translate }}</th>\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_bull.getSize(vm_bull.rpcVoiceQueuesChannels)">\n                        <td md-cell colspan="3">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, channel) in vm_bull.rpcVoiceQueuesChannels | limitObjectFromTo: vm_bull.queryChannels.limit:(vm_bull.queryChannels.page - 1) * vm_bull.queryChannels.limit">\n                        <td md-cell>{{channel.exten}}</td>\n                        <td md-cell>{{channel.queue}}</td>\n                        <td md-cell>{{channel.calleridnum}}</td>\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_bull.queryChannels.limit" md-page="vm_bull.queryChannels.page" md-limit-options="[10, 15, 20, 50, 100, 250]" md-total="{{vm_bull.getSize(vm_bull.rpcVoiceQueuesChannels)}}" md-page-select></md-table-pagination>\n    </md-card>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/home/dashboard/chat/agent.general.dashboard.chat.html",'<div layout="row" ngCloak>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm_chat.getColorByChannel(\'chat\')">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.QUEUES">Queues</span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table md-progress="vm_chat.promise">\n                <thead md-head md-order="vm_chat.query.sort" md-on-reorder="vm_chat.getChatQueues">\n                    <tr md-row>\n                        <th md-column>{{ \'DASHBOARDS.NAME\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.WAITING\' | translate }}</th>\n                        \x3c!-- <th md-column>{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                        \x3c!-- <th md-column md-order-by="active">{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_chat.getSize(vm_chat.chatQueues)">\n                        <td md-cell colspan="2">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="DASHBOARDS.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, queue) in vm_chat.chatQueues">\n                        <td md-cell class="name">{{queue.name}}</td>\n                        <td md-cell class="waiting">{{queue.waiting || 0}}</td>\n                        \x3c!-- <td md-cell class="dialActive ">\n                            <md-icon ng-if="queue.type === \'outbound\'" md-colors="{color: {{queue.dialActive ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{queue.dialActive ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            <md-icon ng-if="queue.type === \'inbound\'" md-colors="{color: \'green\'}" md-font-icon="icon-check"></md-icon>\n                        </td> --\x3e\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_chat.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_chat.query.page" md-total="{{vm_chat.chatQueuesTotal}}" md-on-paginate="vm_chat.getChatQueues" md-page-select></md-table-pagination>\n    </md-card>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm_chat.getColorByChannel(\'chat\')">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.CHANNEL_WAITING_TEXT"></span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table>\n                <thead md-head>\n                    <tr md-row>\n                        <th md-column>{{ \'DASHBOARDS.ACCOUNT\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.CHANNEL_QUEUE\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.CHANNEL_FROM\' | translate }}</th>\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_chat.paginatedInteractions.length">\n                        <td md-cell colspan="3">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="DASHBOARDS.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, interaction) in vm_chat.interactions">\n                        <td md-cell>{{interaction.account}}</td>\n                        <td md-cell>{{interaction.queue}}</td>\n                        <td md-cell>{{interaction.from}}</td>\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_chat.queryChannels.limit" md-page="vm_chat.queryChannels.page" md-limit-options="[10, 15, 20, 50, 100, 250]" md-total="{{vm_chat.paginatedInteractions.length}}" md-on-paginate="vm_chat.paginate" md-page-select></md-table-pagination>\n    </md-card>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/home/dashboard/fax/agent.general.dashboard.fax.html",'<div layout="row" ngCloak>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm_fax.getColorByChannel(\'fax\')">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.QUEUES">Queues</span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table md-progress="vm_fax.promise">\n                <thead md-head md-order="vm_fax.query.sort" md-on-reorder="vm_fax.getFaxQueues">\n                    <tr md-row>\n                        <th md-column>{{ \'DASHBOARDS.NAME\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.WAITING\' | translate }}</th>\n                        \x3c!-- <th md-column>{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                        \x3c!-- <th md-column md-order-by="active">{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_fax.getSize(vm_fax.faxQueues)">\n                        <td md-cell colspan="2">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="DASHBOARDS.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, queue) in vm_fax.faxQueues">\n                        <td md-cell class="name">{{queue.name}}</td>\n                        <td md-cell class="waiting">{{queue.waiting || 0}}</td>\n                        \x3c!-- <td md-cell class="dialActive ">\n                            <md-icon ng-if="queue.type === \'outbound\'" md-colors="{color: {{queue.dialActive ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{queue.dialActive ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            <md-icon ng-if="queue.type === \'inbound\'" md-colors="{color: \'green\'}" md-font-icon="icon-check"></md-icon>\n                        </td> --\x3e\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_fax.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_fax.query.page" md-total="{{vm_fax.faxQueuesTotal}}" md-on-paginate="vm_fax.getFaxQueues" md-page-select></md-table-pagination>\n    </md-card>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm_fax.getColorByChannel(\'fax\')">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.CHANNEL_WAITING_TEXT"></span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table>\n                <thead md-head>\n                    <tr md-row>\n                        <th md-column>{{ \'DASHBOARDS.ACCOUNT\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.CHANNEL_QUEUE\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.CHANNEL_FROM\' | translate }}</th>\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_fax.paginatedInteractions.length">\n                        <td md-cell colspan="3">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="DASHBOARDS.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, interaction) in vm_fax.interactions">\n                        <td md-cell>{{interaction.account}}</td>\n                        <td md-cell>{{interaction.queue}}</td>\n                        <td md-cell>{{interaction.from}}</td>\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_fax.queryChannels.limit" md-page="vm_fax.queryChannels.page" md-limit-options="[10, 15, 20, 50, 100, 250]" md-total="{{vm_fax.paginatedInteractions.length}}" md-on-paginate="vm_fax.paginate" md-page-select></md-table-pagination>\n    </md-card>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/home/dashboard/mail/agent.general.dashboard.mail.html",'<div layout="row" ngCloak>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm_mail.getColorByChannel(\'mail\')">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.QUEUES">Queues</span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table md-progress="vm_mail.promise">\n                <thead md-head md-order="vm_mail.query.sort" md-on-reorder="vm_mail.getMailQueues">\n                    <tr md-row>\n                        <th md-column>{{ \'DASHBOARDS.NAME\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.WAITING\' | translate }}</th>\n                        \x3c!-- <th md-column>{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                        \x3c!-- <th md-column md-order-by="active">{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_mail.getSize(vm_mail.mailQueues)">\n                        <td md-cell colspan="2">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="DASHBOARDS.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, queue) in vm_mail.mailQueues">\n                        <td md-cell class="name">{{queue.name}}</td>\n                        <td md-cell class="waiting">{{queue.waiting || 0}}</td>\n                        \x3c!-- <td md-cell class="dialActive ">\n                            <md-icon ng-if="queue.type === \'outbound\'" md-colors="{color: {{queue.dialActive ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{queue.dialActive ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            <md-icon ng-if="queue.type === \'inbound\'" md-colors="{color: \'green\'}" md-font-icon="icon-check"></md-icon>\n                        </td> --\x3e\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_mail.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_mail.query.page" md-total="{{vm_mail.mailQueuesTotal}}" md-on-paginate="vm_mail.getMailQueues" md-page-select></md-table-pagination>\n    </md-card>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm_mail.getColorByChannel(\'mail\')">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.CHANNEL_WAITING_TEXT"></span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table>\n                <thead md-head>\n                    <tr md-row>\n                        <th md-column>{{ \'DASHBOARDS.ACCOUNT\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.CHANNEL_QUEUE\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.CHANNEL_FROM\' | translate }}</th>\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_mail.paginatedInteractions.length">\n                        <td md-cell colspan="3">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="DASHBOARDS.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, interaction) in vm_mail.interactions">\n                        <td md-cell>{{interaction.account}}</td>\n                        <td md-cell>{{interaction.queue}}</td>\n                        <td md-cell>{{interaction.from}}</td>\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_mail.queryChannels.limit" md-page="vm_mail.queryChannels.page" md-limit-options="[10, 15, 20, 50, 100, 250]" md-total="{{vm_mail.paginatedInteractions.length}}" md-on-paginate="vm_mail.paginate" md-page-select></md-table-pagination>\n    </md-card>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/home/dashboard/openchannel/agent.general.dashboard.openchannel.html",'<div layout="row" ngCloak>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm_openchannel.getColorByChannel(\'openchannel\')">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.QUEUES">Queues</span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table md-progress="vm_openchannel.promise">\n                <thead md-head md-order="vm_openchannel.query.sort" md-on-reorder="vm_openchannel.getOpenchannelQueues">\n                    <tr md-row>\n                        <th md-column>{{ \'DASHBOARDS.NAME\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.WAITING\' | translate }}</th>\n                        \x3c!-- <th md-column>{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                        \x3c!-- <th md-column md-order-by="active">{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_openchannel.getSize(vm_openchannel.openchannelQueues)">\n                        <td md-cell colspan="2">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="DASHBOARDS.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, queue) in vm_openchannel.openchannelQueues">\n                        <td md-cell class="name">{{queue.name}}</td>\n                        <td md-cell class="waiting">{{queue.waiting || 0}}</td>\n                        \x3c!-- <td md-cell class="dialActive ">\n                            <md-icon ng-if="queue.type === \'outbound\'" md-colors="{color: {{queue.dialActive ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{queue.dialActive ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            <md-icon ng-if="queue.type === \'inbound\'" md-colors="{color: \'green\'}" md-font-icon="icon-check"></md-icon>\n                        </td> --\x3e\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_openchannel.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_openchannel.query.page" md-total="{{vm_openchannel.openchannelQueuesTotal}}" md-on-paginate="vm_openchannel.getOpenchannelQueues" md-page-select></md-table-pagination>\n    </md-card>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm_openchannel.getColorByChannel(\'openchannel\')">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.CHANNEL_WAITING_TEXT"></span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table>\n                <thead md-head>\n                    <tr md-row>\n                        <th md-column>{{ \'DASHBOARDS.ACCOUNT\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.CHANNEL_QUEUE\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.CHANNEL_FROM\' | translate }}</th>\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_openchannel.paginatedInteractions.length">\n                        <td md-cell colspan="3">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="DASHBOARDS.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, interaction) in vm_openchannel.interactions">\n                        <td md-cell>{{interaction.account}}</td>\n                        <td md-cell>{{interaction.queue}}</td>\n                        <td md-cell>{{interaction.from}}</td>\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_openchannel.queryChannels.limit" md-page="vm_openchannel.queryChannels.page" md-limit-options="[10, 15, 20, 50, 100, 250]" md-total="{{vm_openchannel.paginatedInteractions.length}}" md-on-paginate="vm_openchannel.paginate"\n            md-page-select></md-table-pagination>\n    </md-card>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/home/dashboard/sms/agent.general.dashboard.sms.html",'<div layout="row" ngCloak>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm_sms.getColorByChannel(\'sms\')">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.QUEUES">Queues</span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table md-progress="vm_sms.promise">\n                <thead md-head md-order="vm_sms.query.sort" md-on-reorder="vm_sms.getSmsQueues">\n                    <tr md-row>\n                        <th md-column>{{ \'DASHBOARDS.NAME\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.WAITING\' | translate }}</th>\n                        \x3c!-- <th md-column>{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                        \x3c!-- <th md-column md-order-by="active">{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_sms.getSize(vm_sms.smsQueues)">\n                        <td md-cell colspan="2">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="DASHBOARDS.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, queue) in vm_sms.smsQueues">\n                        <td md-cell class="name">{{queue.name}}</td>\n                        <td md-cell class="waiting">{{queue.waiting || 0}}</td>\n                        \x3c!-- <td md-cell class="dialActive ">\n                            <md-icon ng-if="queue.type === \'outbound\'" md-colors="{color: {{queue.dialActive ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{queue.dialActive ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            <md-icon ng-if="queue.type === \'inbound\'" md-colors="{color: \'green\'}" md-font-icon="icon-check"></md-icon>\n                        </td> --\x3e\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_sms.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_sms.query.page" md-total="{{vm_sms.smsQueuesTotal}}" md-on-paginate="vm_sms.getSmsQueues" md-page-select></md-table-pagination>\n    </md-card>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm_sms.getColorByChannel(\'sms\')">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.CHANNEL_WAITING_TEXT"></span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table>\n                <thead md-head>\n                    <tr md-row>\n                        <th md-column>{{ \'DASHBOARDS.ACCOUNT\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.CHANNEL_QUEUE\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.CHANNEL_FROM\' | translate }}</th>\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_sms.paginatedInteractions.length">\n                        <td md-cell colspan="3">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="DASHBOARDS.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, interaction) in vm_sms.interactions">\n                        <td md-cell>{{interaction.account}}</td>\n                        <td md-cell>{{interaction.queue}}</td>\n                        <td md-cell>{{interaction.from}}</td>\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_sms.queryChannels.limit" md-page="vm_sms.queryChannels.page" md-limit-options="[10, 15, 20, 50, 100, 250]" md-total="{{vm_sms.paginatedInteractions.length}}" md-on-paginate="vm_sms.paginate" md-page-select></md-table-pagination>\n    </md-card>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/home/dashboard/voice/agent.general.dashboard.voice.html",'<div layout="row" ngCloak>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header blue-A700-bg ">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="VOICE.QUEUES">Queues</span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table md-progress="vm_voice.promise">\n                <thead md-head md-order="vm_voice.query.sort" md-on-reorder="vm_voice.getVoiceQueues">\n                    <tr md-row>\n                        <th md-column>{{ \'VOICE.NAME\' | translate }}</th>\n                        <th md-column>{{ \'VOICE.WAITING\' | translate }}</th>\n                        <th ng-if="voiceQueue.type === \'outbound\'" md-column>{{ \'VOICE.ACTIVE\' | translate }}</th>\n                        \x3c!-- <th md-column md-order-by="active">{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_voice.getSize(vm_voice.voiceQueues)">\n                        <td md-cell colspan="2">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, voiceQueue) in vm_voice.voiceQueues">\n                        <td md-cell class="name">{{voiceQueue.name}}</td>\n                        <td ng-if="voiceQueue.type === \'outbound\'" md-cell class="waiting">{{voiceQueue.dialMethod}}</td>\n                        <td md-cell class="waiting">{{voiceQueue.waiting || 0}}</td>\n                        <td md-cell ng-if="voiceQueue.type === \'outbound\'" class="dialActive ">\n                            <md-icon md-colors="{color: {{voiceQueue.dialActive ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{voiceQueue.dialActive ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                        </td>\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_voice.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_voice.query.page" md-total="{{vm_voice.voiceQueuesTotal}}" md-on-paginate="vm_voice.getVoiceQueues" md-page-select></md-table-pagination>\n    </md-card>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header blue-A700-bg ">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.WAITING_TEXT"></span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table>\n                <thead md-head>\n                    <tr md-row>\n                        <th md-column>{{ \'VOICE.DID\' | translate }}</th>\n                        <th md-column>{{ \'VOICE.QUEUE\' | translate }}</th>\n                        <th md-column>{{ \'VOICE.CALLER\' | translate }}</th>\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_voice.getSize(vm_voice.rpcVoiceQueuesChannels)">\n                        <td md-cell colspan="3">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, channel) in vm_voice.rpcVoiceQueuesChannels | limitObjectFromTo: vm_voice.queryChannels.limit:(vm_voice.queryChannels.page - 1) * vm_voice.queryChannels.limit">\n                        <td md-cell>{{channel.exten}}</td>\n                        <td md-cell>{{channel.queue}}</td>\n                        <td md-cell>{{channel.calleridnum}}</td>\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_voice.queryChannels.limit" md-page="vm_voice.queryChannels.page" md-limit-options="[10, 15, 20, 50, 100, 250]" md-total="{{vm_voice.getSize(vm_voice.rpcVoiceQueuesChannels)}}" md-page-select></md-table-pagination>\n    </md-card>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/home/fax/agent.general.fax.html",'<md-card ngCloak>\n    <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm.getColorByChannel(\'fax\')">\n        <div class="md-toolbar-tools">\n            <span class="md-subhead" translate="DASHBOARDS.INTERACTIONS">Interactions</span>\n            <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div class="padding-horizontal-20" layout="column" layout-align="center center">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_DATE">Select a date</span>\n                <div layout="row" layout-align="center center">\n                    <md-button ng-if="vm.pickerModel.dateStart" ng-click="vm.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                        <md-tooltip>{{ \'DASHBOARDS.DELETE\' | translate }}</md-tooltip>\n                        <md-icon md-font-icon="icon-close" class="s16 white-fg"></md-icon>\n                    </md-button>\n                    <md-date-range localization-map="vm.localizationMap" ng-model="vm.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm.getFaxInteractions()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n                </div>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_READ_UNREAD">Select Read/Unread</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.read" ng-change="vm.getFaxInteractions()">\n                    <md-option value="0" translate="DASHBOARDS.UNREAD">READ</md-option>\n                    <md-option value="1" translate="DASHBOARDS.READ">UNREAD</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_STATUS">Select a status</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.closed" ng-change="vm.getFaxInteractions()">\n                    <md-option value="0" translate="DASHBOARDS.OPENED">OPENED</md-option>\n                    <md-option value="1" translate="DASHBOARDS.CLOSED">CLOSED</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_ACCOUNT">Select an account</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.FaxAccountId" ng-change="vm.getFaxInteractions()">\n                    <md-option ng-value="faxAccount.id" ng-repeat="faxAccount in vm.faxAccounts.rows">{{faxAccount.name}}</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_AGENT">Select an agent</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.UserId" ng-change="vm.getFaxInteractions()">\n                    <md-option ng-value="vm.user.id" translate="DASHBOARDS.ME"></md-option>\n                    <md-option ng-value="\'null\'" translate="DASHBOARDS.NOT_ASSIGNED"></md-option>\n                    <md-option ng-value="undefined" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_TAG">Select a tag</span>\n                <md-select id="tags" placeholder="Tags" multiple="true" class="font-size-12 no-margin" ng-model="vm.query.tag" ng-change="vm.getFaxInteractions()" style="color:white;">\n                    <md-option ng-repeat="tag in vm.tags.rows" ng-value="tag.id">{{tag.name}}</md-option>\n                </md-select>\n            </div>\n            <div layout="column">\n                <md-button class="md-icon-button" aria-label="Reload" translate translate-attr-aria-label="DASHBOARDS.RELOAD" ng-click="vm.getFaxInteractions()">\n                    <md-icon md-font-icon="icon-reload"></md-icon>\n                </md-button>\n            </div>\n            <md-menu ng-if="vm.faxAccounts.rows && vm.faxAccounts.rows.length">\n                <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                    <md-icon md-font-icon="icon-plus"></md-icon>\n                </md-button>\n                <md-menu-content width="3">\n                    <md-menu-item ng-repeat="faxAccount in vm.faxAccounts.rows">\n                        <md-button aria-label="compose" ng-click="vm.composeFaxInteraction($event, faxAccount)">{{ faxAccount.name }} ({{ faxAccount.key }})</md-button>\n                    </md-menu-item>\n                </md-menu-content>\n            </md-menu>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm.promise">\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getFaxInteractions">\n                <tr md-row>\n                    <th md-column md-order-by="id">ID</th>\n                    <th md-column style="width:15px">\n                        <md-icon md-font-icon="icon-eye" class="s16"></md-icon>\n                    </th>\n                    <th md-column style="width:180px">{{\'DASHBOARDS.CONTACT\' | translate}}</th>\n                    <th md-column md-order-by="createdAt">{{\'DASHBOARDS.STARTEDAT\' | translate}}</th>\n                    <th md-column md-order-by="lastMsgAt">{{\'DASHBOARDS.LAST_MESSAGE\' | translate}}</th>\n                    <th md-column md-order-by="closed">{{\'DASHBOARDS.STATUS\' | translate}}</th>\n                    <th md-column style="width:80px">{{\'DASHBOARDS.AGENT\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.ACCOUNT\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.TAGS\' | translate}}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.faxInteractions.rows.length">\n                    <td md-cell colspan="8">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="DASHBOARDS.NO_AVAILABLE_INTERACTION">No Available Interaction</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="faxInteraction in vm.faxInteractions.rows" ng-class="{\'text-bold text-italic\': faxInteraction.unread}">\n                    <td ng-click="vm.showFaxInteraction($event, faxInteraction)" md-cell class="id">\n                        <div layout="row" layout-align="start center">\n                            <span class="font-size-10">{{faxInteraction.id}}</span>\n                        </div>\n                    </td>\n                    <td md-cell>\n                        <div ng-if="!faxInteraction.closed && faxInteraction.Users.length">\n                            <md-icon md-font-icon="icon-eye" class="s16"></md-icon>\n                            <md-tooltip>\n                                <span ng-repeat="u in faxInteraction.Users">{{ (u.id == vm.user.id) ? \'DASHBOARDS.ME\' : vm.usersByKey[u.id].fullname | translate }}<span ng-if="!$last">, </span></span>\n                            </md-tooltip>\n                        </div>\n                    </td>\n                    <td ng-click="vm.showFaxInteraction($event, faxInteraction)" md-cell>\n                        <div layout="row" layout-align="start center">\n                            <div layout="column">\n                                <span ng-if="!faxInteraction.closed && faxInteraction.unread" class="badge white-fg" ng-class="vm.getColorByChannel(\'fax\')" layout-margin>{{faxInteraction.unread}}</span>\n                                <md-icon ng-if="faxInteraction.attach" md-font-icon="icon-paperclip" class="s16"></md-icon>\n                            </div>\n                            <span class="font-size-12 text-truncate" style="width:180px" layout-margin>{{vm.getContactLabel(faxInteraction)}}</span>\n                        </div>\n                    </td>\n                    <td ng-click="vm.showFaxInteraction($event, faxInteraction)" md-cell>\n                        <span class="font-size-10 text-truncate">{{faxInteraction.createdAt | formatdate }}</span>\n                    </td>\n                    <td ng-click="vm.showFaxInteraction($event, faxInteraction)" md-cell>\n                        <div layout="row" ng-if="faxInteraction.lastMsgAt">\n                            <span><md-icon md-font-icon="{{faxInteraction.lastMsgDirection == \'in\' ? \'icon-arrow-down-bold blue-grey-800-fg\' : \'icon-arrow-up-bold blue-grey-300-fg\'}}"></md-icon></span>\n                            <div layout="column" layout-align="center center">\n                                <span class="font-size-10 text-truncate">{{faxInteraction.lastMsgAt | formatdate }}</span>\n                            </div </div>\n                            <span ng-if="!faxInteraction.lastMsgAt">No messages</span>\n                    </td>\n                    <td ng-click="vm.showFaxInteraction($event, faxInteraction)" md-cell>\n                        <span ng-if="faxInteraction.closed" class="red-fg font-size-12">{{ \'DASHBOARDS.CLOSED\' | translate}} <span ng-if="faxInteraction.disposition">- {{faxInteraction.disposition}}</span></span>\n                        <md-tooltip ng-if="faxInteraction.closed">{{faxInteraction.closedAt | formatdate }}</md-tooltip>\n                        <span ng-if="!faxInteraction.closed" class="green-fg font-size-12"><span translate="DASHBOARDS.OPENED"></span><span ng-if="faxInteraction.substatus"> - {{faxInteraction.substatus}}</span></span>\n                    </td>\n                    <td ng-click="vm.showFaxInteraction($event, faxInteraction)" md-cell class="user">\n                        <span class="font-size-12 text-truncate" style="width:120px">{{vm.getUserLabel(faxInteraction)}}</span>\n                    </td>\n                    <td ng-click="vm.showFaxInteraction($event, faxInteraction)" md-cell class="faxAccount">\n                        {{ vm.getFaxAccountLabel(faxInteraction) }}\n                    </td>\n                    <td md-cell>\n                        <div ng-if="faxInteraction.Tags.length">\n                            <div ng-if="faxInteraction.Tags.length == 1" layout="column" layout-align="center center">\n                                <md-icon md-font-icon="icon-tag" ng-style="{\'color\': faxInteraction.Tags[0].color }"></md-icon>\n                                <span class="text-truncate">{{faxInteraction.Tags[0].name}}</span>\n                            </div>\n                            <div ng-if="faxInteraction.Tags.length > 1" layout="column" layout-align="center center">\n                                <md-tooltip md-direction="left" layout="row">\n                                    <span ng-repeat="tag in faxInteraction.Tags">{{tag.name}}<span ng-if="!$last">, </span></span>\n                                </md-tooltip>\n                                <md-icon md-font-icon="icon-tag"></md-icon>\n                            </div>\n                        </div>\n                    </td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="3">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.showFaxInteraction($event, faxInteraction)" translate="DASHBOARDS.SHOW">\n                                        Show Fax\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-label="{page: \'{{\'DASHBOARDS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'DASHBOARDS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'DASHBOARDS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n        md-total="{{vm.faxInteractions.count}}" md-on-paginate="vm.getFaxInteractions" md-page-select></md-table-pagination>\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/mail/agent.general.mail.html",'<md-card ngCloak>\n    <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm.getColorByChannel(\'mail\')">\n        <div class="md-toolbar-tools">\n            <span class="md-subhead" translate="DASHBOARDS.INTERACTIONS">Interactions</span>\n            <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div class="padding-horizontal-20" layout="column" layout-align="center center">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_DATE">Select a date</span>\n                <div layout="row" layout-align="center center">\n                    <md-button ng-if="vm.pickerModel.dateStart" ng-click="vm.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                        <md-tooltip>{{ \'DASHBOARDS.DELETE\' | translate }}</md-tooltip>\n                        <md-icon md-font-icon="icon-close" class="s16 white-fg"></md-icon>\n                    </md-button>\n                    <md-date-range localization-map="vm.localizationMap" ng-model="vm.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm.getMailInteractions()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n                </div>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_READ_UNREAD">Select Read/Unread</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.read" ng-change="vm.getMailInteractions()">\n                    <md-option value="0" translate="DASHBOARDS.UNREAD">READ</md-option>\n                    <md-option value="1" translate="DASHBOARDS.READ">UNREAD</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_STATUS">Select a status</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.closed" ng-change="vm.getMailInteractions()">\n                    <md-option value="0" translate="DASHBOARDS.OPENED">OPENED</md-option>\n                    <md-option value="1" translate="DASHBOARDS.CLOSED">CLOSED</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column" ng-if="vm.query.closed == 0">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_SUBSTATUS">Select a sub status</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.substatus" ng-change="vm.getMailInteractions()">\n                    <md-option ng-repeat="subStatus in vm.subStatuses.rows" ng-value="subStatus.name">{{subStatus.name}}</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_ACCOUNT">Select an account</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.MailAccountId" ng-change="vm.getMailInteractions()">\n                    <md-option ng-value="mailAccount.id" ng-repeat="mailAccount in vm.mailAccounts.rows">{{mailAccount.name}}</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_AGENT">Select an agent</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.UserId" ng-change="vm.getMailInteractions()">\n                    <md-option ng-value="vm.user.id" translate="DASHBOARDS.ME"></md-option>\n                    <md-option ng-value="\'null\'" translate="DASHBOARDS.NOT_ASSIGNED"></md-option>\n                    <md-option ng-value="undefined" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_TAG">Select a tag</span>\n                <md-select id="tags" placeholder="Tags" multiple="true" class="font-size-12 no-margin" ng-model="vm.query.tag" ng-change="vm.getMailInteractions()" style="color:white;">\n                    <md-option ng-repeat="tag in vm.tags.rows" ng-value="tag.id">{{tag.name}}</md-option>\n                </md-select>\n            </div>\n            <div layout="column">\n                <md-button class="md-icon-button" aria-label="Reload" translate translate-attr-aria-label="DASHBOARDS.RELOAD" ng-click="vm.getMailInteractions()">\n                    <md-icon md-font-icon="icon-reload"></md-icon>\n                </md-button>\n            </div>\n            <md-menu ng-if="vm.mailAccounts.rows && vm.mailAccounts.rows.length">\n                <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                    <md-icon md-font-icon="icon-plus"></md-icon>\n                </md-button>\n                <md-menu-content width="3">\n                    <md-menu-item ng-repeat="mailAccount in vm.mailAccounts.rows">\n                        <md-button aria-label="compose" ng-click="vm.composeMailInteraction($event, mailAccount)">{{ mailAccount.name }} ({{ mailAccount.key }})</md-button>\n                    </md-menu-item>\n                </md-menu-content>\n            </md-menu>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm.promise">\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getMailInteractions">\n                <tr md-row>\n                    <th md-column md-order-by="id">ID</th>\n                    <th md-column style="width:15px">\n                        <md-icon md-font-icon="icon-eye" class="s16"></md-icon>\n                    </th>\n                    <th md-column style="width:180px">{{\'DASHBOARDS.CONTACT\' | translate}}</th>\n                    <th md-column md-order-by="subject" style="width:200px">{{\'DASHBOARDS.SUBJECT\' | translate}}</th>\n                    <th md-column md-order-by="createdAt">{{\'DASHBOARDS.STARTEDAT\' | translate}}</th>\n                    <th md-column md-order-by="lastMsgAt">{{\'DASHBOARDS.LAST_MESSAGE\' | translate}}</th>\n                    <th md-column md-order-by="closed">{{\'DASHBOARDS.STATUS\' | translate}}</th>\n                    <th md-column style="width:80px">{{\'DASHBOARDS.AGENT\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.ACCOUNT\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.TAGS\' | translate}}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.mailInteractions.rows.length">\n                    <td md-cell colspan="9">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="DASHBOARDS.NO_AVAILABLE_INTERACTION">No Available Interaction</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="mailInteraction in vm.mailInteractions.rows" ng-class="{\'text-bold text-italic\': mailInteraction.unread}">\n                    <td ng-click="vm.showMailInteraction($event, mailInteraction)" md-cell class="id">\n                        <div layout="row" layout-align="start center">\n                            <span class="font-size-10">{{mailInteraction.id}}</span>\n                        </div>\n                    </td>\n                    <td md-cell>\n                        <div ng-if="!mailInteraction.closed && mailInteraction.Users.length">\n                            <md-icon md-font-icon="icon-eye" class="s16"></md-icon>\n                            <md-tooltip>\n                                <span ng-repeat="u in mailInteraction.Users">{{ (u.id == vm.user.id) ? \'DASHBOARDS.ME\' : vm.usersByKey[u.id].fullname | translate }}<span ng-if="!$last">, </span></span>\n                            </md-tooltip>\n                        </div>\n                    </td>\n                    <td ng-click="vm.showMailInteraction($event, mailInteraction)" md-cell>\n                        <div layout="row" layout-align="start center">\n                            <div layout="column">\n                                <span ng-if="!mailInteraction.closed && mailInteraction.unread" class="badge white-fg" ng-class="vm.getColorByChannel(\'mail\')" layout-margin>{{mailInteraction.unread}}</span>\n                                <md-icon ng-if="mailInteraction.attach" md-font-icon="icon-paperclip" class="s16"></md-icon>\n                            </div>\n                            <span class="font-size-12 text-truncate" style="width:180px" layout-margin>{{vm.getContactLabel(mailInteraction)}}</span>\n                        </div>\n                    </td>\n                    <td ng-click="vm.showMailInteraction($event, mailInteraction)" md-cell>\n                        <span class="text-truncate font-size-12" style="width:200px">{{mailInteraction.subject}}</span>\n                    </td>\n                    <td ng-click="vm.showMailInteraction($event, mailInteraction)" md-cell>\n                        <span class="font-size-10 text-truncate">{{mailInteraction.createdAt | formatdate }}</span>\n                    </td>\n                    <td ng-click="vm.showMailInteraction($event, mailInteraction)" md-cell>\n                        <div layout="row" ng-if="mailInteraction.lastMsgAt">\n                            <span><md-icon md-font-icon="{{mailInteraction.lastMsgDirection == \'in\' ? \'icon-arrow-down-bold blue-grey-800-fg\' : \'icon-arrow-up-bold blue-grey-300-fg\'}}"></md-icon></span>\n                            <div layout="column" layout-align="center center">\n                                <span class="font-size-10 text-truncate">{{mailInteraction.lastMsgAt | formatdate }}</span>\n                            </div </div>\n                            <span ng-if="!mailInteraction.lastMsgAt">No messages</span>\n                    </td>\n                    <td ng-click="vm.showMailInteraction($event, mailInteraction)" md-cell>\n                        <span ng-if="mailInteraction.closed" class="red-fg font-size-12">{{ \'DASHBOARDS.CLOSED\' | translate}} <span ng-if="mailInteraction.disposition">- {{mailInteraction.disposition}}</span></span>\n                        <md-tooltip ng-if="mailInteraction.closed">{{mailInteraction.closedAt | formatdate }}</md-tooltip>\n                        <span ng-if="!mailInteraction.closed" class="green-fg font-size-12"><span translate="DASHBOARDS.OPENED"></span><span ng-if="mailInteraction.substatus"> - {{mailInteraction.substatus}}</span></span>\n                    </td>\n                    <td ng-click="vm.showMailInteraction($event, mailInteraction)" md-cell class="user">\n                        <span class="font-size-12 text-truncate" style="width:120px">{{vm.getUserLabel(mailInteraction)}}</span>\n                    </td>\n                    <td ng-click="vm.showMailInteraction($event, mailInteraction)" md-cell class="mailAccount">\n                        {{ vm.getMailAccountLabel(mailInteraction) }}\n                    </td>\n                    <td md-cell>\n                        <div ng-if="mailInteraction.Tags.length">\n                            <div ng-if="mailInteraction.Tags.length == 1" layout="column" layout-align="center center">\n                                <md-icon md-font-icon="icon-tag" ng-style="{\'color\': mailInteraction.Tags[0].color }"></md-icon>\n                                <span class="text-truncate">{{mailInteraction.Tags[0].name}}</span>\n                            </div>\n                            <div ng-if="mailInteraction.Tags.length > 1" layout="column" layout-align="center center">\n                                <md-tooltip md-direction="left" layout="row">\n                                    <span ng-repeat="tag in mailInteraction.Tags">{{tag.name}}<span ng-if="!$last">, </span></span>\n                                </md-tooltip>\n                                <md-icon md-font-icon="icon-tag"></md-icon>\n                            </div>\n                        </div>\n                    </td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="3">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.showMailInteraction($event, mailInteraction)" translate="DASHBOARDS.SHOW">\n                                        Show Mail\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-label="{page: \'{{\'DASHBOARDS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'DASHBOARDS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'DASHBOARDS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n        md-total="{{vm.mailInteractions.count}}" md-on-paginate="vm.getMailInteractions" md-page-select></md-table-pagination>\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/mycontacts/agent.general.mycontacts.html",'<md-card ng-init="vm.onInit()">\n    <md-toolbar class="md-table-toolbar md-default table-header red-bg">\n        <div class="md-toolbar-tools" layout="row" layout-align="center center">\n            <span class="md-subhead" translate="DASHBOARDS.MYCONTACTS">My Contacts</span>\n            <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div layout="column">\n                <span class="font-size-10" translate="CONTACTMANAGER.SELECT_LIST">Select a list</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.ListId" ng-change="vm.getContacts()">\n                    <md-option ng-value="list.id" ng-repeat="list in vm.lists.rows">{{list.name}}</md-option>\n                    <md-option ng-value="vm.defaultLists" ng-if="vm.lists.count > 1"><em translate="CONTACTMANAGER.ALL_CONTACTS">All</em></md-option>\n                </md-select>\n            </div>\n            <md-button class="md-icon-button" ng-click="vm.refreshContacts($event)" aria-label="refresh Contacts" translate translate-attr-label="DASHBOARDS.REFRESH_CONTACTS">\n                <md-icon md-font-icon="icon-reload"></md-icon>\n            </md-button>\n            <md-button class="md-icon-button" ng-click="vm.openContact($event)" aria-label="add contact" translate translate-attr-label="DASHBOARDS.ADD_CONTACT">\n                <md-icon md-font-icon="icon-plus"></md-icon>\n            </md-button>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm.promise">\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getContacts">\n                <tr md-row>\n                    <th md-column md-order-by="id">ID</th>\n                    <th md-column md-order-by="firstName">{{\'DASHBOARDS.FULLNAME\' | translate}}</th>\n                    <th md-column md-order-by="phone">{{\'DASHBOARDS.PHONE\' | translate}}</th>\n                    <th md-column md-order-by="mobile">{{\'DASHBOARDS.MOBILE\' | translate}}</th>\n                    <th md-column md-order-by="fax">{{\'DASHBOARDS.FAX\' | translate}}</th>\n                    <th md-column md-order-by="email">{{\'DASHBOARDS.EMAIL\' | translate}}</th>\n                    <th md-column md-order-by="ListId">{{\'DASHBOARDS.LIST\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.TAGS\' | translate}}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.contacts.rows.length">\n                    <td md-cell colspan="10">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="contact in vm.contacts.rows">\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="id">{{contact.id}}</td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="firstName">{{contact.firstName}} {{contact.lastName}}</td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="phone">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="contact.phone" prefix="vm.listsMap[contact.ListId].dialPrefix" license="vm_home.license"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="mobile">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="contact.mobile" prefix="vm.listsMap[contact.ListId].dialPrefix" license="vm_home.license"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="fax">{{contact.fax}}</td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="email">{{contact.email}}</td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="list">{{vm.listsMap[contact.ListId].name}}</td>\n                    <td md-cell class="tags">\n                        <div ng-if="contact.tags.length">\n                            <md-tooltip md-direction="left" layout="row">\n                                <span ng-repeat="tag in contact.tags">{{tag}}<span ng-if="!$last">, </span></span>\n                            </md-tooltip>\n                            <md-icon md-font-icon="icon-tag"></md-icon>\n                        </div>\n                    </td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="3">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.openContact($event, contact)" translate="DASHBOARDS.EDIT">\n                                        Edit Contact\n                                    </md-button>\n                                </md-menu-item>\n                                <md-menu-item>\n                                    <md-button ng-click="vm.mergeContact($event, contact)" translate="DASHBOARDS.MERGE">\n                                        Merge Contact\n                                    </md-button>\n                                </md-menu-item>\n                                <md-menu-item>\n                                    <md-button ng-click="vm.duplicateContact($event, contact)" translate="DASHBOARDS.DUPLICATE">\n                                        Duplicate Contact\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.contacts.count}}" md-on-paginate="vm.getContacts" md-page-select></md-table-pagination>\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/openchannel/agent.general.openchannel.html",'<md-card ngCloak>\n    <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm.getColorByChannel(\'openchannel\')">\n        <div class="md-toolbar-tools">\n            <span class="md-subhead" translate="DASHBOARDS.INTERACTIONS">Interactions</span>\n            <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div class="padding-horizontal-20" layout="column" layout-align="center center">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_DATE">Select a date</span>\n                <div layout="row" layout-align="center center">\n                    <md-button ng-if="vm.pickerModel.dateStart" ng-click="vm.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                        <md-tooltip>{{ \'DASHBOARDS.DELETE\' | translate }}</md-tooltip>\n                        <md-icon md-font-icon="icon-close" class="s16 white-fg"></md-icon>\n                    </md-button>\n                    <md-date-range localization-map="vm.localizationMap" ng-model="vm.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm.getOpenchannelInteractions()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n                </div>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_READ_UNREAD">Select Read/Unread</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.read" ng-change="vm.getOpenchannelInteractions()">\n                    <md-option value="0" translate="DASHBOARDS.UNREAD">READ</md-option>\n                    <md-option value="1" translate="DASHBOARDS.READ">UNREAD</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_STATUS">Select a status</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.closed" ng-change="vm.getOpenchannelInteractions()">\n                    <md-option value="0" translate="DASHBOARDS.OPENED">OPENED</md-option>\n                    <md-option value="1" translate="DASHBOARDS.CLOSED">CLOSED</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_ACCOUNT">Select an account</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.OpenchannelAccountId" ng-change="vm.getOpenchannelInteractions()">\n                    <md-option ng-value="openchannelAccount.id" ng-repeat="openchannelAccount in vm.openchannelAccounts.rows">{{openchannelAccount.name}}</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_AGENT">Select an agent</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.UserId" ng-change="vm.getOpenchannelInteractions()">\n                    <md-option ng-value="vm.user.id" translate="DASHBOARDS.ME"></md-option>\n                    <md-option ng-value="\'null\'" translate="DASHBOARDS.NOT_ASSIGNED"></md-option>\n                    <md-option ng-value="undefined" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_TAG">Select a tag</span>\n                <md-select id="tags" placeholder="Tags" multiple="true" class="font-size-12 no-margin" ng-model="vm.query.tag" ng-change="vm.getOpenchannelInteractions()" style="color:white;">\n                    <md-option ng-repeat="tag in vm.tags.rows" ng-value="tag.id">{{tag.name}}</md-option>\n                </md-select>\n            </div>\n            <div layout="column">\n                <md-button class="md-icon-button" aria-label="Reload" translate translate-attr-aria-label="DASHBOARDS.RELOAD" ng-click="vm.getOpenchannelInteractions()">\n                    <md-icon md-font-icon="icon-reload"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm.promise">\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getOpenchannelInteractions">\n                <tr md-row>\n                    <th md-column md-order-by="id">ID</th>\n                    <th md-column style="width:15px">\n                        <md-icon md-font-icon="icon-eye" class="s16"></md-icon>\n                    </th>\n                    <th md-column style="width:180px">{{\'DASHBOARDS.CONTACT\' | translate}}</th>\n                    <th md-column md-order-by="createdAt">{{\'DASHBOARDS.STARTEDAT\' | translate}}</th>\n                    <th md-column md-order-by="lastMsgAt">{{\'DASHBOARDS.LAST_MESSAGE\' | translate}}</th>\n                    <th md-column md-order-by="closed">{{\'DASHBOARDS.STATUS\' | translate}}</th>\n                    <th md-column style="width:80px">{{\'DASHBOARDS.AGENT\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.ACCOUNT\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.TAGS\' | translate}}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.openchannelInteractions.rows.length">\n                    <td md-cell colspan="8">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="DASHBOARDS.NO_AVAILABLE_INTERACTION">No Available Interaction</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="openchannelInteraction in vm.openchannelInteractions.rows" ng-class="{\'text-bold text-italic\': openchannelInteraction.unread}">\n                    <td ng-click="vm.showOpenchannelInteraction($event, openchannelInteraction)" md-cell class="id">\n                        <div layout="row" layout-align="start center">\n                            <span class="font-size-10">{{openchannelInteraction.id}}</span>\n                        </div>\n                    </td>\n                    <td md-cell>\n                        <div ng-if="!openchannelInteraction.closed && openchannelInteraction.Users.length">\n                            <md-icon md-font-icon="icon-eye" class="s16"></md-icon>\n                            <md-tooltip>\n                                <span ng-repeat="u in openchannelInteraction.Users">{{ (u.id == vm.user.id) ? \'DASHBOARDS.ME\' : vm.usersByKey[u.id].fullname | translate }}<span ng-if="!$last">, </span></span>\n                            </md-tooltip>\n                        </div>\n                    </td>\n                    <td ng-click="vm.showOpenchannelInteraction($event, openchannelInteraction)" md-cell>\n                        <div layout="row" layout-align="start center">\n                            <div layout="column">\n                                <span ng-if="!openchannelInteraction.closed && openchannelInteraction.unread" class="badge white-fg" ng-class="vm.getColorByChannel(\'openchannel\')" layout-margin>{{openchannelInteraction.unread}}</span>\n                                <md-icon ng-if="openchannelInteraction.attach" md-font-icon="icon-paperclip" class="s16"></md-icon>\n                            </div>\n                            <span class="font-size-12 text-truncate" style="width:180px" layout-margin>{{vm.getContactLabel(openchannelInteraction)}}</span>\n                        </div>\n                    </td>\n                    <td ng-click="vm.showOpenchannelInteraction($event, openchannelInteraction)" md-cell>\n                        <span class="font-size-10 text-truncate">{{openchannelInteraction.createdAt | formatdate }}</span>\n                    </td>\n                    <td ng-click="vm.showOpenchannelInteraction($event, openchannelInteraction)" md-cell>\n                        <div layout="row" ng-if="openchannelInteraction.lastMsgAt">\n                            <span><md-icon md-font-icon="{{openchannelInteraction.lastMsgDirection == \'in\' ? \'icon-arrow-down-bold blue-grey-800-fg\' : \'icon-arrow-up-bold blue-grey-300-fg\'}}"></md-icon></span>\n                            <div layout="column" layout-align="center center">\n                                <span class="font-size-10 text-truncate">{{openchannelInteraction.lastMsgAt | formatdate }}</span>\n                            </div </div>\n                            <span ng-if="!openchannelInteraction.lastMsgAt">No messages</span>\n                    </td>\n                    <td ng-click="vm.showOpenchannelInteraction($event, openchannelInteraction)" md-cell>\n                        <span ng-if="openchannelInteraction.closed" class="red-fg font-size-12">{{ \'DASHBOARDS.CLOSED\' | translate}} <span ng-if="openchannelInteraction.disposition">- {{openchannelInteraction.disposition}}</span></span>\n                        <md-tooltip ng-if="openchannelInteraction.closed">{{openchannelInteraction.closedAt | formatdate }}</md-tooltip>\n                        <span ng-if="!openchannelInteraction.closed" class="green-fg font-size-12"><span translate="DASHBOARDS.OPENED"></span><span ng-if="openchannelInteraction.substatus"> - {{openchannelInteraction.substatus}}</span></span>\n                    </td>\n                    <td ng-click="vm.showOpenchannelInteraction($event, openchannelInteraction)" md-cell class="user">\n                        <span class="font-size-12 text-truncate" style="width:120px">{{vm.getUserLabel(openchannelInteraction)}}</span>\n                    </td>\n                    <td ng-click="vm.showOpenchannelInteraction($event, openchannelInteraction)" md-cell class="openchannelAccount">\n                        {{ vm.getOpenchannelAccountLabel(openchannelInteraction) }}\n                    </td>\n                    <td md-cell>\n                        <div ng-if="openchannelInteraction.Tags.length">\n                            <div ng-if="openchannelInteraction.Tags.length == 1" layout="column" layout-align="center center">\n                                <md-icon md-font-icon="icon-tag" ng-style="{\'color\': openchannelInteraction.Tags[0].color }"></md-icon>\n                                <span class="text-truncate">{{openchannelInteraction.Tags[0].name}}</span>\n                            </div>\n                            <div ng-if="openchannelInteraction.Tags.length > 1" layout="column" layout-align="center center">\n                                <md-tooltip md-direction="left" layout="row">\n                                    <span ng-repeat="tag in openchannelInteraction.Tags">{{tag.name}}<span ng-if="!$last">, </span></span>\n                                </md-tooltip>\n                                <md-icon md-font-icon="icon-tag"></md-icon>\n                            </div>\n                        </div>\n                    </td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="3">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.showOpenchannelInteraction($event, openchannelInteraction)" translate="DASHBOARDS.SHOW">\n                                        Show Openchannel\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-label="{page: \'{{\'DASHBOARDS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'DASHBOARDS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'DASHBOARDS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n        md-total="{{vm.openchannelInteractions.count}}" md-on-paginate="vm.getOpenchannelInteractions" md-page-select></md-table-pagination>\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/recordings/agent.general.recordings.html",'<md-card ng-init="vm.onInit()">\n    <md-toolbar class="md-table-toolbar md-default table-header indigo-A100-bg">\n        <div class="md-toolbar-tools">\n            <span class="md-subhead" translate="VOICE.RECORDINGS">Recordings</span>\n            <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div class="padding-horizontal-20" layout="column" layout-align="center center">\n                <span class="font-size-10" translate="VOICE.SELECT_DATE">Select a date</span>\n                <div layout="row" layout-align="center center">\n                    <md-button ng-if="vm.pickerModel.dateStart" ng-click="vm.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                        <md-tooltip>{{ \'VOICE.DELETE\' | translate }}</md-tooltip>\n                        <md-icon md-font-icon="icon-close" class="s16 white-fg"></md-icon>\n                    </md-button>\n                    <md-date-range localization-map="vm.localizationMap" ng-model="vm.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm.getVoiceRecordings()" placeholder="{{ \'VOICE.ALL\' | translate }}"></md-date-range>\n                </div>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="VOICE.SELECT_TYPE">Select a type</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.type" ng-change="vm.getVoiceRecordings()">\n                    <md-option value="internal" translate="VOICE.INTERNAL">Internal</md-option>\n                    <md-option value="inbound">Inbound</md-option>\n                    <md-option value="outbound">Outbound</md-option>\n                    <md-option ng-value="null" translate="VOICE.ALL">All</md-option>\n                </md-select>\n            </div>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm.promise">\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getVoiceRecordings">\n                <tr md-row>\n                    <th md-column md-order-by="type">{{ \'VOICE.TYPE\' | translate }}</th>\n                    <th md-column md-order-by="uniqueid">{{ \'VOICE.UNIQUEID\' | translate }}</th>\n                    <th md-column md-order-by="calleridnum">{{ \'VOICE.CALLER\' | translate }}</th>\n                    <th md-column md-order-by="exten">{{ \'VOICE.CALLED\' | translate }}</th>\n                    <th md-column md-order-by="connectedlinenum">{{ \'VOICE.CONNECTED\' | translate }}</th>\n                    <th md-column md-order-by="queue">{{ \'VOICE.QUEUE\' | translate }}</th>\n                    <th md-column md-order-by="rating">{{ \'VOICE.RATING\' | translate }}</th>\n                    <th md-column>{{ \'VOICE.AUDIO\' | translate }}</th>\n                    <th md-column md-order-by="createdAt">{{ \'VOICE.DATE\' | translate }}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.voiceRecordings.rows.length">\n                    <td md-cell colspan="10">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="voiceRecording in vm.voiceRecordings.rows">\n                    <td md-cell class="type">{{voiceRecording.type}}</td>\n                    <td md-cell class="uniqueid">{{voiceRecording.uniqueid}}</td>\n                    <td md-cell class="calleridnum">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="voiceRecording.calleridnum" license="vm_home.license"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td md-cell class="exten">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="voiceRecording.exten" license="vm_home.license"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td md-cell class="connectedlinenum">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="voiceRecording.connectedlinenum" license="vm_home.license"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td md-cell class="queue">{{voiceRecording.queue}}</td>\n                    <td md-cell class="rating">\n                        <md-icon md-font-icon="icon-star" style="color:red" ng-show="voiceRecording.rating" ng-repeat="rating in [1,2,3,4,5] | limitTo:voiceRecording.rating"></md-icon><span ng-hide="voiceRecording.rating" translate="VOICE.NO_RATING">No rating</span></td>\n                    <td md-cell class="audio" ng-switch="voiceRecording.format">\n                        \x3c!-- audio recording directive --\x3e\n                        <ms-recording ng-switch-when=".wav" id="voiceRecording.id"></ms-recording>\n                        \x3c!-- / audio recording directive --\x3e\n                        <span ng-switch-when=".gsm">\n                        <em>{{ \'VOICE.CANT_PLAY_GSM_AUDIO_FILES\' | translate }}</em>\n                      </span>\n                    </td>\n                    <td md-cell class="createdAt ">{{voiceRecording.createdAt | date:\'medium\' }}</td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="3">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.downloadfile(voiceRecording, $event)" translate="VOICE.DOWNLOAD_VOICERECORDING">\n                                        Download VoiceRecording\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.voiceRecordings.count}}" md-on-paginate="vm.getVoiceRecordings" md-page-select></md-table-pagination>\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/sms/agent.general.sms.html",'<md-card ngCloak>\n    <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm.getColorByChannel(\'sms\')">\n        <div class="md-toolbar-tools">\n            <span class="md-subhead" translate="DASHBOARDS.INTERACTIONS">Interactions</span>\n            <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div class="padding-horizontal-20" layout="column" layout-align="center center">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_DATE">Select a date</span>\n                <div layout="row" layout-align="center center">\n                    <md-button ng-if="vm.pickerModel.dateStart" ng-click="vm.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                        <md-tooltip>{{ \'DASHBOARDS.DELETE\' | translate }}</md-tooltip>\n                        <md-icon md-font-icon="icon-close" class="s16 white-fg"></md-icon>\n                    </md-button>\n                    <md-date-range localization-map="vm.localizationMap" ng-model="vm.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm.getSmsInteractions()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n                </div>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_READ_UNREAD">Select Read/Unread</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.read" ng-change="vm.getSmsInteractions()">\n                    <md-option value="0" translate="DASHBOARDS.UNREAD">READ</md-option>\n                    <md-option value="1" translate="DASHBOARDS.READ">UNREAD</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_STATUS">Select a status</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.closed" ng-change="vm.getSmsInteractions()">\n                    <md-option value="0" translate="DASHBOARDS.OPENED">OPENED</md-option>\n                    <md-option value="1" translate="DASHBOARDS.CLOSED">CLOSED</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_ACCOUNT">Select an account</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.SmsAccountId" ng-change="vm.getSmsInteractions()">\n                    <md-option ng-value="smsAccount.id" ng-repeat="smsAccount in vm.smsAccounts.rows">{{smsAccount.name}}</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_AGENT">Select an agent</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.UserId" ng-change="vm.getSmsInteractions()">\n                    <md-option ng-value="vm.user.id" translate="DASHBOARDS.ME"></md-option>\n                    <md-option ng-value="\'null\'" translate="DASHBOARDS.NOT_ASSIGNED"></md-option>\n                    <md-option ng-value="undefined" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_TAG">Select a tag</span>\n                <md-select id="tags" placeholder="Tags" multiple="true" class="font-size-12 no-margin" ng-model="vm.query.tag" ng-change="vm.getSmsInteractions()" style="color:white;">\n                    <md-option ng-repeat="tag in vm.tags.rows" ng-value="tag.id">{{tag.name}}</md-option>\n                </md-select>\n            </div>\n            <div layout="column">\n                <md-button class="md-icon-button" aria-label="Reload" translate translate-attr-aria-label="DASHBOARDS.RELOAD" ng-click="vm.getSmsInteractions()">\n                    <md-icon md-font-icon="icon-reload"></md-icon>\n                </md-button>\n            </div>\n            <md-menu ng-if="vm.smsAccounts.rows && vm.smsAccounts.rows.length">\n                <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                    <md-icon md-font-icon="icon-plus"></md-icon>\n                </md-button>\n                <md-menu-content width="3">\n                    <md-menu-item ng-repeat="smsAccount in vm.smsAccounts.rows">\n                        <md-button aria-label="compose" ng-click="vm.composeSmsInteraction($event, smsAccount)">{{ smsAccount.name }} ({{ smsAccount.key }})</md-button>\n                    </md-menu-item>\n                </md-menu-content>\n            </md-menu>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm.promise">\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getSmsInteractions">\n                <tr md-row>\n                    <th md-column md-order-by="id">ID</th>\n                    <th md-column style="width:15px">\n                        <md-icon md-font-icon="icon-eye" class="s16"></md-icon>\n                    </th>\n                    <th md-column style="width:180px">{{\'DASHBOARDS.CONTACT\' | translate}}</th>\n                    <th md-column md-order-by="createdAt">{{\'DASHBOARDS.STARTEDAT\' | translate}}</th>\n                    <th md-column md-order-by="lastMsgAt">{{\'DASHBOARDS.LAST_MESSAGE\' | translate}}</th>\n                    <th md-column md-order-by="closed">{{\'DASHBOARDS.STATUS\' | translate}}</th>\n                    <th md-column style="width:80px">{{\'DASHBOARDS.AGENT\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.ACCOUNT\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.TAGS\' | translate}}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.smsInteractions.rows.length">\n                    <td md-cell colspan="8">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="DASHBOARDS.NO_AVAILABLE_INTERACTION">No Available Interaction</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="smsInteraction in vm.smsInteractions.rows" ng-class="{\'text-bold text-italic\': smsInteraction.unread}">\n                    <td ng-click="vm.showSmsInteraction($event, smsInteraction)" md-cell class="id">\n                        <div layout="row" layout-align="start center">\n                            <span class="font-size-10">{{smsInteraction.id}}</span>\n                        </div>\n                    </td>\n                    <td md-cell>\n                        <div ng-if="!smsInteraction.closed && smsInteraction.Users.length">\n                            <md-icon md-font-icon="icon-eye" class="s16"></md-icon>\n                            <md-tooltip>\n                                <span ng-repeat="u in smsInteraction.Users">{{ (u.id == vm.user.id) ? \'DASHBOARDS.ME\' : vm.usersByKey[u.id].fullname | translate }}<span ng-if="!$last">, </span></span>\n                            </md-tooltip>\n                        </div>\n                    </td>\n                    <td ng-click="vm.showSmsInteraction($event, smsInteraction)" md-cell>\n                        <div layout="row" layout-align="start center">\n                            <div layout="column">\n                                <span ng-if="!smsInteraction.closed && smsInteraction.unread" class="badge white-fg" ng-class="vm.getColorByChannel(\'sms\')" layout-margin>{{smsInteraction.unread}}</span>\n                                <md-icon ng-if="smsInteraction.attach" md-font-icon="icon-paperclip" class="s16"></md-icon>\n                            </div>\n                            <span class="font-size-12 text-truncate" style="width:180px" layout-margin>{{vm.getContactLabel(smsInteraction)}}</span>\n                        </div>\n                    </td>\n                    <td ng-click="vm.showSmsInteraction($event, smsInteraction)" md-cell>\n                        <span class="font-size-10 text-truncate">{{smsInteraction.createdAt | formatdate }}</span>\n                    </td>\n                    <td ng-click="vm.showSmsInteraction($event, smsInteraction)" md-cell>\n                        <div layout="row" ng-if="smsInteraction.lastMsgAt">\n                            <span><md-icon md-font-icon="{{smsInteraction.lastMsgDirection == \'in\' ? \'icon-arrow-down-bold blue-grey-800-fg\' : \'icon-arrow-up-bold blue-grey-300-fg\'}}"></md-icon></span>\n                            <div layout="column" layout-align="center center">\n                                <span class="font-size-10 text-truncate">{{smsInteraction.lastMsgAt | formatdate }}</span>\n                            </div </div>\n                            <span ng-if="!smsInteraction.lastMsgAt">No messages</span>\n                    </td>\n                    <td ng-click="vm.showSmsInteraction($event, smsInteraction)" md-cell>\n                        <span ng-if="smsInteraction.closed" class="red-fg font-size-12">{{ \'DASHBOARDS.CLOSED\' | translate}} <span ng-if="smsInteraction.disposition">- {{smsInteraction.disposition}}</span></span>\n                        <md-tooltip ng-if="smsInteraction.closed">{{smsInteraction.closedAt | formatdate }}</md-tooltip>\n                        <span ng-if="!smsInteraction.closed" class="green-fg font-size-12"><span translate="DASHBOARDS.OPENED"></span><span ng-if="smsInteraction.substatus"> - {{smsInteraction.substatus}}</span></span>\n                    </td>\n                    <td ng-click="vm.showSmsInteraction($event, smsInteraction)" md-cell class="user">\n                        <span class="font-size-12 text-truncate" style="width:120px">{{vm.getUserLabel(smsInteraction)}}</span>\n                    </td>\n                    <td ng-click="vm.showSmsInteraction($event, smsInteraction)" md-cell class="smsAccount">\n                        {{ vm.getSmsAccountLabel(smsInteraction) }}\n                    </td>\n                    <td md-cell>\n                        <div ng-if="smsInteraction.Tags.length">\n                            <div ng-if="smsInteraction.Tags.length == 1" layout="column" layout-align="center center">\n                                <md-icon md-font-icon="icon-tag" ng-style="{\'color\': smsInteraction.Tags[0].color }"></md-icon>\n                                <span class="text-truncate">{{smsInteraction.Tags[0].name}}</span>\n                            </div>\n                            <div ng-if="smsInteraction.Tags.length > 1" layout="column" layout-align="center center">\n                                <md-tooltip md-direction="left" layout="row">\n                                    <span ng-repeat="tag in smsInteraction.Tags">{{tag.name}}<span ng-if="!$last">, </span></span>\n                                </md-tooltip>\n                                <md-icon md-font-icon="icon-tag"></md-icon>\n                            </div>\n                        </div>\n                    </td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="3">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.showSmsInteraction($event, smsInteraction)" translate="DASHBOARDS.SHOW">\n                                        Show Sms\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-label="{page: \'{{\'DASHBOARDS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'DASHBOARDS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'DASHBOARDS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n        md-total="{{vm.smsInteractions.count}}" md-on-paginate="vm.getSmsInteractions" md-page-select></md-table-pagination>\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/voice/agent.general.voice.html",'<md-card ng-init="vm.onInit()">\n    <md-toolbar class="md-table-toolbar md-default table-header blue-A700-bg">\n        <div class="md-toolbar-tools">\n            <span class="md-subhead" translate="VOICE.CALLS">Calls</span>\n            <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div class="padding-horizontal-20" layout="column" layout-align="center center">\n                <span class="font-size-10" translate="VOICE.SELECT_DATE">Select a date</span>\n                <div layout="row" layout-align="center center">\n                    <md-button ng-if="vm.pickerModel.dateStart" ng-click="vm.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                        <md-tooltip>{{ \'VOICE.DELETE\' | translate }}</md-tooltip>\n                        <md-icon md-font-icon="icon-close" class="s16 white-fg"></md-icon>\n                    </md-button>\n                    <md-date-range localization-map="vm.localizationMap" ng-model="vm.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm.getVoiceCalls()" placeholder="{{ \'VOICE.ALL\' | translate }}"></md-date-range>\n                </div>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="VOICE.SELECT_TYPE">Select a type</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.type" ng-change="vm.getVoiceCalls()">\n                    <md-option value="internal" translate="VOICE.INTERNAL">Internal</md-option>\n                    <md-option value="inbound">Inbound</md-option>\n                    <md-option value="outbound">Outbound</md-option>\n                    <md-option ng-value="null" translate="VOICE.ALL">All</md-option>\n                </md-select>\n            </div>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm.promise">\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getVoiceCalls">\n                <tr md-row>\n                    <th md-column md-order-by="id">ID</th>\n                    <th md-column md-order-by="type">{{ \'VOICE.TYPE\' | translate }}</th>\n                    <th md-column md-order-by="source">{{ \'VOICE.SOURCE\' | translate }}</th>\n                    <th md-column md-order-by="destination">{{ \'VOICE.DESTINATION\' | translate }}</th>\n                    <th md-column md-order-by="starttime">{{ \'VOICE.STARTEDAT\' | translate }}</th>\n                    <th md-column md-order-by="endtime">{{ \'VOICE.ENDEDAT\' | translate }}</th>\n                    <th md-column md-order-by="userDisposition">{{ \'VOICE.DISPOSITION\' | translate }}</th>\n                    <th md-column>{{ \'VOICE.NOTE\' | translate }}</th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.voiceCalls.rows.length">\n                    <td md-cell colspan="8">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="voiceCall in vm.voiceCalls.rows" ng-click="vm.showDetails(voiceCall, $event)">\n                    <td md-cell class="type">{{voiceCall.id}}</td>\n                    <td md-cell class="type">{{voiceCall.type}}</td>\n                    <td md-cell class="source">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="voiceCall.source" license="vm_home.license"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td md-cell class="destination">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="voiceCall.destination" license="vm_home.license"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td md-cell class="starttime">{{voiceCall.starttime | date:\'medium\' }}</td>\n                    <td md-cell class="endtime">{{voiceCall.endtime | date:\'medium\' }}</td>\n                    <td md-cell class="disposition">{{voiceCall.userDisposition}}</td>\n                    <td md-cell class="note">\n                        <md-icon ng-if="voiceCall.note" md-font-icon="icon-clipboard-outline"></md-icon>\n                    </td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="3">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.showDetails(voiceCall, $event)" translate="VOICE.DETAILS">\n                                        Show Details\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.voiceCalls.count}}" md-on-paginate="vm.getVoiceCalls" md-page-select></md-table-pagination>\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/voice/details/dialog.html",'<md-dialog class="details-dialog" aria-label="details">\n    <md-toolbar class="md-background-bg">\n        <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n            <span ng-if="!vm.interaction.closed" class="title" translate="VOICE.DETAILS"></span>\n            <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n            </md-button>\n        </div>\n    </md-toolbar>\n\n    <md-dialog-content>\n        <md-list flex>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.UNIQUEID">Uniqueid</p>\n                    <h4>{{vm.call.uniqueid}}</h4>\n                </div>\n            </md-list-item>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.TYPE">Type</p>\n                    <h4>{{vm.call.type ? vm.call.type : \'no type\'}}</h4>\n                </div>\n            </md-list-item>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.SOURCE">Source</p>\n                    <h4>{{vm.call.source ? vm.call.source : \'unknown\'}}</h4>\n                </div>\n            </md-list-item>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.DESTINATION">Destination</p>\n                    <h4>{{vm.call.destination ? vm.call.destination : \'unknown\'}}</h4>\n                </div>\n            </md-list-item>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.STARTEDAT">Started At</p>\n                    <h4>{{vm.call.starttime | date:\'medium\'}}</h4>\n                </div>\n            </md-list-item>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.ANSWEREDAT">Answered At</p>\n                    <h4>{{vm.call.answertime ? (vm.call.answertime | date:\'medium\') : \'--\'}}</h4>\n                </div>\n            </md-list-item>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.ENDEDAT">Ended At</p>\n                    <h4>{{vm.call.endtime ? (vm.call.endtime | date:\'medium\') : \'--\'}}</h4>\n                </div>\n            </md-list-item>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.DURATION">Duration</p>\n                    <h4>{{vm.call.duration ? vm.call.duration : \'--\'}}s</h4>\n                </div>\n            </md-list-item>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.BILLABLESECONDS">Billable Seconds</p>\n                    <h4>{{vm.call.billableseconds ? vm.call.billableseconds : \'--\'}}s</h4>\n                </div>\n            </md-list-item>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.DISPOSITION">Disposition</p>\n                    <h4>{{vm.call.userDisposition ? vm.call.userDisposition : \'--\'}}</h4>\n                </div>\n            </md-list-item>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.NOTE">Note</p>\n                    <h4>{{vm.call.note ? vm.call.note : \'--\'}}</h4>\n                </div>\n            </md-list-item>\n        </md-list>\n    </md-dialog-content>\n\n    <md-dialog-actions layout="row" layout-align="space-between center">\n        <md-button type="button" ng-click="vm.closeDialog()" class="send-button md-accent md-raised" aria-label="DISPOSE" translate="VOICE.CLOSE" translate-attr-aria-label="VOICE.DISPOSE">\n            CLOSE\n        </md-button>\n    </md-dialog-actions>\n</md-dialog>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/agent.general.interaction.dialog.html",'<md-dialog id="agent-general-dialog" aria-label="Spy Dialog">\n    <div id="interaction-app" class="agent-content" ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/agent.general.interaction.html\'"></div>\n</md-dialog>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/agent.general.interaction.html",'\x3c!-- CONTENT CARD --\x3e\n<md-content class="content-card" layout="row" layout-fill>\n\n    <div ng-if="!vm.showInteraction" class="start-point" flex layout="column" layout-align="center center" ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.loading.html\'"></div>\n\n    <div ng-if="vm.showInteraction" flex layout="row">\n\n        <md-card flex="75" class="interaction">\n\n            <md-content class="interaction-agents" layout="row" layout-align="start center" ng-if="!vm.interaction.closed && vm.interaction.Users.length">\n                <strong layout-margin translate="DASHBOARDS.CURRENTLY_IN_USE_BY">Currently in use by </strong>\n\n                <div ng-repeat="u in vm.interaction.Users">\n                    <img class="avatar-small" ng-src="api/users/{{u.id}}/avatar">\n                    <md-tooltip> {{ (u.id == vm.user.id) ? \'DASHBOARDS.ME\' : vm.usersMap[u.id] | translate }} </md-tooltip>\n                </div>\n            </md-content>\n\n            \x3c!-- TOOLBAR --\x3e\n            <md-toolbar class="interaction-toolbar" ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.toolbar.html\'"></md-toolbar>\n            \x3c!-- / TOOLBAR --\x3e\n\n            \x3c!-- CONTENT --\x3e\n            <md-content id="interaction-content" name="{{\'interaction-content-\' + vm.tab.id}}" flex ms-scroll layout-wrap>\n                <div class="interaction-messages" ng-switch="vm.tab.channel">\n                    <div ng-switch-when="mail">\n                        <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.interaction.mail.html\'"></div>\n                    </div>\n                    <div ng-switch-default>\n                        <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.interaction.html\'"></div>\n                    </div>\n                </div>\n            </md-content>\n            \x3c!-- / CONTENT --\x3e\n\n            \x3c!-- FOOTER --\x3e\n            <div ng-if="!vm.interaction.closed && vm.tab.channel != \'mail\' && vm.tab.channel !== \'fax\' && (vm.tab.channel != \'sms\' || !vm.tab.spy)" class="interaction-footer flex-noshrink" layout="row" ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.footer.html\'"></div>\n            \x3c!-- / FOOTER--\x3e\n        </md-card>\n\n        <md-card layout="column" flex class="info" ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.html\'"></md-card>\n    </div>\n</md-content>\n\x3c!-- / CONTENT CARD --\x3e'),e.put("app/main/apps/dashboards/views/general/agent/interaction/composeFax/dialog.html",'<md-dialog class="compose-dialog-fax" aria-label="New Message">\n    <form class="md-inline-form" name="composeForm" novalidate>\n        <md-toolbar class="md-background-bg">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <div layout="row">\n                    <md-button ng-click="vm.send()" class="md-raised md-blue-bg white-fg" aria-label="Send message">\n                        <span translate="FAX.SEND">SEND</span>\n                    </md-button>\n                    <md-button ng-disabled="vm.message.attachments.length === 1" class="md-fab md-mini md-white-bg" aria-label="attachment" translate-attr-aria-label="DASHBOARDS.ATTACHMENT" flow-btn flow-name="vm.ngFlow.flow" flow-files-submitted="vm.upload()" flow-init="vm.ngFlowOptions"\n                        flow-file-added="vm.fileAdded($file)" flow-file-success="vm.fileSuccess($file, $message)">\n                        <md-icon md-font-icon="icon-paperclip" class="red-fg"></md-icon>\n                    </md-button>\n                </div>\n                <span class="title">{{vm.message.from}}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()" aria-label="Close dialog" tranlate translate-aria-label="FAX.CLOSE_DIALOG">\n                    <md-icon md-font-icon="icon-close"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <md-input-container class="md-block to">\n                <label translate="FAX.TO">To</label>\n                <md-chips name="to" ng-model="vm.message.to" md-transform-chip="vm.transformContact($chip)" md-separator-keys="vm.separatorKeys" md-require-match="false" md-max-chips="1" required>\n                    \x3c!-- <input ng-model="vm.message.subject" type="text"> --\x3e\n                    <md-autocomplete ng-hide="vm.message.to.length === 1" md-search-text="vm.searchTo" md-items="contact in vm.contactSearch(vm.searchTo)" md-item-text="contact.fax" md-min-length="3">\n                        <md-item-template>\n                            <span>{{ vm.getContact(contact) }}</span>\n                        </md-item-template>\n                    </md-autocomplete>\n                </md-chips>\n                <div ng-messages="composeForm.to.$error" ng-if="composeForm.$dirty">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.TO_REQUIRED">To field is required</span>\n                    </div>\n                    <div ng-message="md-max-chips">You reached the maximum amount of chips</div>\n                </div>\n            </md-input-container>\n\n            <div class="attachment-list" ng-if="vm.message.attachments.length" layout="row" layout-wrap>\n                <div class="attachment" layout="row" layout-align="space-between center" ng-repeat="attachment in vm.message.attachments">\n                    <div>\n                        <md-icon md-font-icon="icon-paperclip" class="s16"></md-icon>\n                        <span class="filename">{{attachment.name}}</span>\n                        <span class="size">({{attachment.size | byteFmt: 0}})</span>\n                    </div>\n\n                    <md-button class="md-icon-button" aria-label="Delete attachment" translate translate-attr-aria-label="FAX.DELETE_ATTACHMENT">\n                        \x3c!-- <md-icon md-font-icon="icon-close" class="s16"></md-icon> --\x3e\n                    </md-button>\n                </div>\n            </div>\n\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/composeMail/dialog.html",'<md-dialog class="compose-dialog" aria-label="New Message" ng-style="{\n      \'max-width\':  {true: \'620px\', false: \'90%\'}[ vm.secret ],\n      \'width\': {true: \'620px\', false: \'100%\'}[ vm.secret ],\n      \'max-height\': {true: undefined, false: \'97%\'}[ vm.secret ]\n    }">\n    <form class="md-inline-form" name="composeForm" novalidate>\n        <md-toolbar ng-class="md-background-bg">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <div layout="row">\n                    <div ng-if="!vm.secret" class="md-button md-raised blue-bg no-padding">\n                        <button class="white-fg margin-horizontal-10" aria-label="Send message" ng-disabled="!vm.verifySmtp" ng-click="vm.send($event, false, null)">\n                        <span>{{ \'MAIL.SEND\' | translate | uppercase }}</span>\n                      </button>\n                        <span class="white-fg secondary-text vertical-divider"></span>\n                        <md-menu>\n                            <button ng-disabled="!vm.verifySmtp" class="white-fg margin-left-0" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                          <md-icon md-font-icon="icon-menu-down" class="icon s24"></md-icon>\n                        </button>\n\n                            <md-menu-content width="2">\n                                <md-menu-item ng-if="vm.subStatuses.rows.length">\n                                    <md-menu>\n                                        <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="MAIL.SEND_AS">\n                                            Send as\n                                        </md-button>\n                                        <md-menu-content>\n                                            <md-menu-item ng-repeat="subStatus in vm.subStatuses.rows">\n                                                <md-button ng-click="vm.send($event, false, subStatus.name)">\n                                                    {{subStatus.name}}\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </md-menu-item>\n                                <md-menu-item>\n                                    <md-button ng-click="vm.send($event, true, null)" translate="MAIL.SEND_AND_CLOSE">\n                                        Send and Close\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </div>\n                    <md-button ng-if="vm.secret" ng-click="vm.addNote()" class="md-raised md-blue-bg white-fg" aria-label="Send message">\n                        <span translate="MAIL.ADD_NOTE">Add note</span>\n                    </md-button>\n                    <md-button ng-disabled="!vm.verifySmtp" class="md-fab md-mini md-white-bg" aria-label="attachment" translate-attr-aria-label="DASHBOARDS.ATTACHMENT" flow-btn flow-name="vm.ngFlow.flow" flow-files-submitted="vm.upload($files)" flow-init="vm.ngFlowOptions"\n                        flow-file-success="vm.fileSuccess($file, $message)">\n                        <md-icon md-font-icon="icon-paperclip" class="red-fg"></md-icon>\n                    </md-button>\n                </div>\n                <span ng-if="!vm.secret" class="title">{{vm.message.from}}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()" aria-label="Close dialog" tranlate translate-aria-label="MAIL.CLOSE_DIALOG">\n                    <md-icon md-font-icon="icon-close"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container ng-if="!vm.secret" class="md-block to" ng-class="{\'hidden-cc\': vm.hiddenCC, \'hidden-bcc\': vm.hiddenBCC}">\n                <label translate="MAIL.TO">To</label>\n                <md-chips name="to" ng-model="vm.message.to" md-transform-chip="vm.transformContact($chip)" md-separator-keys="vm.separatorKeys" md-require-match="false" required>\n                    <md-autocomplete md-search-text="vm.searchTo" md-items="contact in vm.contactSearch(vm.searchTo)" md-item-text="contact.email" md-min-length="3">\n                        <md-item-template>\n                            <span>{{ vm.getContact(contact) }}</span>\n                        </md-item-template>\n                    </md-autocomplete>\n                </md-chips>\n                <div ng-messages="composeForm.to.$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.TO_REQUIRED">To field is required</span>\n                    </div>\n                </div>\n\n                <div class="cc-bcc" layout="row" layout-align="start center">\n                    <div class="show-cc" ng-show="vm.hiddenCC" ng-click="vm.hiddenCC = false">CC</div>\n                    <div class="show-bcc" ng-show="vm.hiddenBCC" ng-click="vm.hiddenBCC = false">BCC</div>\n                </div>\n            </md-input-container>\n\n            <md-input-container ng-if="!vm.secret" class="md-block" ng-hide="vm.hiddenCC">\n                <label translate="MAIL.CC">Cc</label>\n                <md-chips name="cc" ng-model="vm.message.cc" md-transform-chip="vm.transformContact($chip)" md-separator-keys="vm.separatorKeys" md-require-match="false" required>\n                    <md-autocomplete md-search-text="vm.searchCc" md-items="contact in vm.contactSearch(vm.searchCc)" md-item-text="contact.email" md-min-length="3">\n                        <md-item-template>\n                            <span>{{ vm.getContact(contact) }}</span>\n                        </md-item-template>\n                    </md-autocomplete>\n                </md-chips>\n            </md-input-container>\n\n            <md-input-container ng-if="!vm.secret" class="md-block" ng-hide="vm.hiddenBCC">\n                <label translate="MAIL.BCC">Bcc</label>\n                <md-chips name="bcc" ng-model="vm.message.bcc" md-transform-chip="vm.transformContact($chip)" md-separator-keys="vm.separatorKeys" md-require-match="false" required>\n                    <md-autocomplete md-search-text="vm.searchBcc" md-items="contact in vm.contactSearch(vm.searchBcc)" md-item-text="contact.email" md-min-length="3">\n                        <md-item-template>\n                            <span>{{ vm.getContact(contact) }}</span>\n                        </md-item-template>\n                    </md-autocomplete>\n                </md-chips>\n            </md-input-container>\n\n            <md-input-container ng-if="!vm.secret" class="md-block no-margin">\n                <label translate="MAIL.SUBJECT">Subject</label>\n                <input ng-model="vm.message.subject" type="text">\n            </md-input-container>\n\n            <div class="attachment-list" ng-if="vm.message.attachments.length" layout="row" layout-wrap>\n                <div class="attachment" layout="row" layout-align="space-between center" ng-repeat="attachment in vm.message.attachments">\n                    <div>\n                        <md-icon md-font-icon="icon-paperclip" class="s16"></md-icon>\n                        <span class="filename">{{attachment.name}}</span>\n                        <span class="size" ng-if="attachment.size">({{attachment.size | byteFmt: 0}})</span>\n                    </div>\n\n                    <md-button ng-click="vm.deleteAttachment(attachment)" class="md-icon-button" aria-label="Delete attachment" translate translate-attr-aria-label="MAIL.DELETE_ATTACHMENT">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <div class="padding-top-5">\n                <textarea ckeditor="vm.ckeditor" id="html-area" ng-model="vm.message.body" md-select-on-focus="" ready="vm.onReadyEditor()"></textarea>\n            </div>\n\n            <md-switch ng-if="!vm.message.showLastMessage && !vm.secret" ng-model="vm.message.showLastMessage" ng-change="vm.loadLastMessage()" aria-label="load last message"><span translate="MAIL.SHOW_ORIGINAL_MESSAGE">Show original message</span></md-switch>\n\n            <md-autocomplete ng-if="!vm.secret" md-selected-item="vm.selectedItem" md-search-text="vm.searchText" md-selected-item-change="vm.selectedItemChange(item)" md-items="item in vm.searchTextChange(vm.searchText)" md-item-text="item.value" md-min-length="1"\n                md-floating-label="{{ \'MAIL.CANNED_ANSWER_SEARCH\' | translate}}" class="input-show-hide no-container-margin">\n                <md-item-template>\n                    <md-icon ng-if="!item.MailAccountId" md-font-icon="icon-earth" aria-label="alert email" class="s16"></md-icon>\n                    <md-icon ng-if="item.MailAccountId" md-font-icon="icon-email" aria-label="alert email" class="s16 teal-fg"></md-icon>\n                    <span md-highlight-text="vm.searchText" md-highlight-flags="^i">{{item.key}} - {{item.value}}</span>\n                </md-item-template>\n\n                <md-not-found>\n                    <span translate="MAIL.CANNED_ANSWER_NOT_FOUND">No canned answers were found</span>\n                </md-not-found>\n            </md-autocomplete>\n\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/composeSms/dialog.html",'<md-dialog class="compose-dialog" aria-label="New Message">\n    <form class="md-inline-form" name="composeForm" novalidate>\n        <md-toolbar class="md-background-bg">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <div layout="row">\n                    <md-button ng-if="!vm.secret" ng-click="vm.send()" class="md-raised md-blue-bg white-fg" aria-label="Send message">\n                        <span translate="SMS.SEND">SEND</span>\n                    </md-button>\n                    <md-button ng-if="vm.secret" ng-click="vm.addNote()" class="md-raised md-blue-bg white-fg" aria-label="Add note">\n                        <span translate="SMS.ADD_NOTE">Add note</span>\n                    </md-button>\n                </div>\n                <span ng-if="!vm.secret" class="title">{{vm.message.from}}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()" aria-label="Close dialog" tranlate translate-aria-label="SMS.CLOSE_DIALOG">\n                    <md-icon md-font-icon="icon-close"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <md-input-container ng-if="!vm.secret" class="md-block to">\n                <label translate="SMS.TO">To</label>\n                <md-chips name="to" ng-model="vm.message.to" md-transform-chip="vm.transformContact($chip)" md-separator-keys="vm.separatorKeys" md-require-match="false" md-max-chips="1" required>\n                    <md-autocomplete md-search-text="vm.searchTo" md-items="contact in vm.contactSearch(vm.searchTo)" md-item-text="contact.mobile" md-min-length="3">\n                        <md-item-template>\n                            <span>{{ vm.getContact(contact) }}</span>\n                        </md-item-template>\n                    </md-autocomplete>\n                </md-chips>\n                <div ng-messages="composeForm.to.$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.TO_REQUIRED">To field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            \x3c!-- msEmojyArea directive --\x3e\n            <ms-emoji-area ng-if="vm.tab.channel != \'fax\'" on-reply="vm.reply(event, body)" set-text="vm.setTextWrapper(dirFn)" get-text="vm.getTextWrapper(dirFn)" picker-position="\'bottom\'" search="false" recent-emojis="false" placeholder="\'SMS.INSERT_MESSAGE_HERE\'"></ms-emoji-area>\n            \x3c!-- / msEmojyArea directive --\x3e\n\n            <md-autocomplete ng-if="!vm.secret" class="padding-top-5" md-selected-item="vm.selectedItem" md-search-text="vm.searchText" md-selected-item-change="vm.selectedItemChange(item)" md-items="item in vm.searchTextChange(vm.searchText)" md-item-text="item.value"\n                md-min-length="1" md-floating-label="{{ \'SMS.CANNED_ANSWER_SEARCH\' | translate}}" class="input-show-hide no-container-margin">\n                <md-item-template>\n                    <md-icon ng-if="!item.SmsAccountId" md-font-icon="icon-earth" aria-label="alert sms" class="s16"></md-icon>\n                    <md-icon ng-if="item.SmsAccountId" md-font-icon="icon-message-text" aria-label="alert sms" class="s16 orange-fg"></md-icon>\n                    <span md-highlight-text="vm.searchText" md-highlight-flags="^i">{{item.key}} - {{item.value}}</span>\n                </md-item-template>\n\n                <md-not-found>\n                    <span translate="SMS.CANNED_ANSWER_NOT_FOUND">No canned answers were found</span>\n                </md-not-found>\n            </md-autocomplete>\n\n\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/dispose/dialog.html",'<md-dialog class="disposition-dialog" aria-label="disposition">\n    <form name="dispositionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-background-bg">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span ng-if="!vm.interaction.closed" class="title" translate="DASHBOARDS.DISPOSE"></span>\n                <span ng-if="vm.interaction.closed" class="title" translate="DASHBOARDS.INFO"></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="DASHBOARDS.DISPOSITIONS">Dispositions</label>\n                <md-select name="disposition" ng-model="vm.interaction.disposition" required>\n                    \x3c!-- <md-select ng-disabled="vm.interaction.closed && vm.interaction.disposition" name="disposition" ng-model="vm.interaction.disposition" required> --\x3e\n                    <md-option ng-value="null">NONE</md-option>\n                    <md-option ng-value="disposition.name" ng-repeat="disposition in vm.dispositions.rows">{{ disposition.name }}</md-option>\n                </md-select>\n                <div ng-messages="dispositionForm.disposition.$error" ng-show="dispositionForm.disposition.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="DASHBOARDS.ERRORS.DISPOSITION_REQUIRED">Disposition field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="DASHBOARDS.NOTE">Note</label>\n                \x3c!-- <textarea ng-disabled="vm.interaction.closed && vm.interaction.disposition" ng-model="vm.interaction.note" md-maxlength="255" max-rows="5" autofocus></textarea> --\x3e\n                <textarea ng-model="vm.interaction.note" md-maxlength="255" max-rows="5" autofocus></textarea>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        \x3c!-- <md-dialog-actions ng-if="!vm.interaction.closed || !vm.interaction.disposition" layout="row" layout-align="space-between center"> --\x3e\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveDisposition(true)" class="send-button md-accent md-raised" ng-if="!vm.interaction.closed && vm.interaction.disposition" aria-label="CLOSE_AND_DISPOSE" translate="DASHBOARDS.CLOSE_AND_DISPOSE" translate-attr-aria-label="DASHBOARDS.CLOSE_AND_DISPOSE">\n                    CLOSE AND DISPOSE\n                </md-button>\n                <md-button type="submit" ng-click="vm.saveDisposition(false)" class="send-button md-accent md-raised" ng-if="!vm.interaction.closed && !vm.interaction.disposition" aria-label="CLOSE_WITHOUT_DISPOSE" translate="DASHBOARDS.CLOSE_WITHOUT_DISPOSE" translate-attr-aria-label="DASHBOARDS.CLOSE_WITHOUT_DISPOSE">\n                    CLOSE WITHOUT DISPOSE\n                </md-button>\n                <md-button type="submit" ng-click="vm.saveDisposition(false)" class="send-button md-accent md-raised" ng-if="vm.interaction.closed" aria-label="DISPOSE" translate="DASHBOARDS.DISPOSE" translate-attr-aria-label="DASHBOARDS.DISPOSE">\n                    DISPOSE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/tag/dialog.html",'<md-dialog class="tag-dialog" aria-label="tag">\n    <form name="tagForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-background-bg">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title" translate="DASHBOARDS.TAGS"></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <md-chips ng-model="vm.interaction.Tags" md-autocomplete-snap md-require-match="vm.autocompleteRequireMatch">\n                    <md-autocomplete ng-blur="vm.searchText = \'\'" md-min-length="0" md-selected-item-change="vm.selectedItemChange" md-selected-item="vm.selectedItem" md-search-text="vm.searchText" md-items="item in vm.tags.rows | filter:{ name: vm.searchText }" md-item-text="item.name"\n                        placeholder="Search for a tag">\n                        <span md-highlight-text="vm.searchText">{{item.name}}</span>\n                    </md-autocomplete>\n                    <md-chip-template>\n                        <span>\n                    <strong>{{$chip.name}}</strong>\n                  </span>\n                    </md-chip-template>\n                </md-chips>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveTag(false)" ng-disabled="tagForm.$pristine" class="send-button md-accent md-raised" aria-label="TAG" translate="DASHBOARDS.SAVE" translate-attr-aria-label="DASHBOARDS.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.footer.html",'\x3c!-- REPLY FORM --\x3e\n<div ng-show="vm.showFooter" layout="column" layout-align "center center" flex>\n    <div layout="row" layout-align="center center" flex>\n        \x3c!-- msEmojyArea directive --\x3e\n        <ms-emoji-area ng-if="vm.tab.channel != \'fax\'" on-reply="vm.reply(event, body)" set-text="vm.setTextWrapper(dirFn)" get-text="vm.getTextWrapper(dirFn)" placeholder="vm.tab.channel.toUpperCase() + \'.INSERT_MESSAGE_HERE\'"></ms-emoji-area>\n        \x3c!-- / msEmojyArea directive --\x3e\n\n        <div layout="row" layout-align="end center">\n            <md-button ng-if="vm.tab.channel != \'fax\'" style="margin:1px;" class="md-icon-button md-mini" ng-click="vm.changeDisplayCannedAnswerInputValue()" aria-label="Search canned answer" translate translate-attr-aria-label="DASHBOARDS.SEND_MESSAGE">\n                <md-icon md-font-icon="icon-auto-fix" class="green-fg"></md-icon>\n            </md-button>\n\n            <md-button ng-if="vm.tab.channel == \'openchannel\' || vm.tab.channel == \'chat\' || vm.tab.channel == \'fax\'" style="margin:1px;" class="md-icon-button md-warn md-mini" aria-label="attachment" translate-attr-aria-label="DASHBOARDS.ATTACHMENT" flow-btn flow-name="vm.ngFlow.flow"\n                flow-files-submitted="vm.upload()" flow-init="vm.ngFlowOptions" flow-file-added="vm.fileAdded($file)" flow-file-success="vm.fileSuccess($file, $message)">\n                <md-icon md-font-icon="icon-paperclip"></md-icon>\n            </md-button>\n        </div>\n    </div>\n\n    <md-autocomplete ng-hide="!vm.displayCannedAnswerInput" md-selected-item="vm.selectedItem" md-search-text="vm.searchText" md-selected-item-change="vm.selectedItemChange(item)" md-items="item in vm.searchTextChange(vm.searchText)" md-item-text="item.value"\n        md-min-length="1" placeholder="{{ \'DASHBOARDS.CANNED_ANSWER_SEARCH\' | translate}}" class="cannedarea input-show-hide">\n        <md-item-template>\n            <md-icon ng-if="!item[vm.tab.channel === \'chat\' ? \'ChatWebsiteId\' : _.capitalize(vm.tab.channel) + \'AccountId\']" md-font-icon="icon-earth" aria-label="alert channel" class="s16"></md-icon>\n            <md-icon ng-if="item[vm.tab.channel === \'chat\' ? \'ChatWebsiteId\' : _.capitalize(vm.tab.channel) + \'AccountId\']" md-font-icon="{{vm.getIconByChannel(vm.tab.channel)}}" aria-label="alert channel" class="s16" ng-class="vm.getColorByChannel(vm.tab.channel) + \'-fg\'"></md-icon>\n            <span md-highlight-text="vm.searchText" md-highlight-flags="^i">{{item.key}} - {{item.value}}</span>\n        </md-item-template>\n\n        <md-not-found>\n            <span translate="DASHBOARDS.CANNED_ANSWER_NOT_FOUND">No canned answers were found</span>\n        </md-not-found>\n    </md-autocomplete>\n</div>\n\x3c!-- / REPLY FORM --\x3e'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.chat.html",'<div ng-init="item = item || vm.interaction">\n    <md-list-item class="md-2-line" ng-if="item.browserName">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.BROWSER_NAME">Browser Name</p>\n            <h4>{{item.browserName}}</h4>\n        </div>\n    </md-list-item>\n    <md-list-item class="md-2-line" ng-if="item.osName">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.OS_NAME">OS Name</p>\n            <h4>{{item.osName}}</h4>\n        </div>\n    </md-list-item>\n    <md-list-item class="md-2-line" ng-if="item.deviceModel">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.DEVICE_MODEL">Device Model</p>\n            <h4>{{item.deviceModel}}</h4>\n        </div>\n    </md-list-item>\n    <md-list-item class="md-2-line" ng-if="item.referer">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.REFERER">Referer</p>\n            <h4>{{item.referer}}</h4>\n        </div>\n    </md-list-item>\n    <md-list-item class="md-2-line" ng-if="item.customerIp">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.CUSTOMER_IP">Customer IP</p>\n            <h4>{{item.customerIp}}</h4>\n        </div>\n    </md-list-item>\n    <md-divider></md-divider>\n    <md-list-item class="md-2-line" ng-if="item.closed && item.ratingValue != null">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.RATING">Rating</p>\n            <md-icon md-font-icon="icon-star" style="color:red" ng-show="!item.ratingType || item.ratingType == \'star\'" ng-repeat="ratingValue in [1,2,3,4,5] | limitTo:item.ratingValue"></md-icon>\n            <md-icon md-font-icon="icon-thumb-up" style="color:green" ng-show="item.ratingType && item.ratingType == \'thumb\' && item.ratingValue == 1"></md-icon>\n            <md-icon md-font-icon="icon-thumb-down" style="color:red" ng-show="item.ratingType && item.ratingType == \'thumb\' && item.ratingValue == 0"></md-icon>\n        </div>\n    </md-list-item>\n    <md-list-item class="md-2-line" ng-if="item.ratingMessage">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.FEEDBACK">Feedback</p>\n            <h4 style="overflow-wrap: break-word; white-space: normal">{{item.ratingMessage}}</h4>\n        </div>\n    </md-list-item>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.html",'<md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex>\n    <md-tab>\n        <md-tab-label>\n            <span translate="DASHBOARDS.CONTACT">Contact</span>\n        </md-tab-label>\n        <md-tab-body>\n            <md-content class="md-padding">\n                <form name="contactForm" class="md-inline-form" novalidate>\n                    <md-input-container class="md-block">\n                        <md-icon md-font-icon="icon-account"></md-icon>\n                        <label translate="DASHBOARDS.NAME">Name</label>\n                        <input type="text" name="firstName" ng-model="vm.contact.firstName" disabled>\n                    </md-input-container>\n\n                    <md-input-container class="md-block">\n                        <md-icon md-font-icon="icon-email"></md-icon>\n                        <label translate="DASHBOARDS.EMAIL">Email</label>\n                        <input type="email" name="email" ng-model="vm.contact.email" disabled>\n                    </md-input-container>\n\n                    <md-input-container ng-if="vm.tab.channel != \'fax\'" class="md-block">\n                        <md-icon md-font-icon="icon-phone"></md-icon>\n                        <label translate="DASHBOARDS.PHONE">Phone</label>\n                        <input type="text" name="phone" ng-model="vm.contact.phone" disabled>\n                    </md-input-container>\n\n                    <md-input-container ng-if="vm.tab.channel == \'fax\'" class="md-block">\n                        <md-icon md-font-icon="icon-deskphone"></md-icon>\n                        <label translate="DASHBOARDS.FAX">Fax</label>\n                        <input type="text" name="fax" ng-model="vm.contact.fax" disabled>\n                    </md-input-container>\n\n                    <div ng-if="!vm.tab.spy" layout="row" layout-align="center center">\n                        <md-button class="md-raised md-accent" ng-click="vm.openContact(ev)" translate="DASHBOARDS.MORE">\n                            More\n                        </md-button>\n                    </div>\n                </form>\n            </md-content>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="DASHBOARDS.INTERACTION">Interaction</span>\n        </md-tab-label>\n        <md-tab-body>\n            <div layout="column" layout-align="space-between center" class="md-padding">\n                <md-icon class="s42" md-font-icon="{{vm.getIconByChannel(vm.tab.channel)}}" ng-class="vm.getColorByChannel(vm.tab.channel) + \'-fg\'"></md-icon>\n                <span ng-if="vm.interaction.closed" class="md-background-bg red-fg font-size-14">#{{vm.interaction.id}} - <span translate="DASHBOARDS.CLOSED"></span></span>\n                <span ng-if="!vm.interaction.closed" class="md-background-bg green-fg font-size-14">#{{vm.interaction.id}} - <span translate="DASHBOARDS.OPENED"></span></span>\n                <span ng-if="!vm.interaction.closed && vm.interaction.substatus" class="md-background-bg green-fg font-size-14">{{ \'DASHBOARDS.\' + vm.interaction.substatus.toUpperCase() | translate }}</span>\n            </div>\n            <md-divider></md-divider>\n            <md-list flex>\n                <md-list-item class="md-2-line">\n                    <div class="md-list-item-text">\n                        <p translate="DASHBOARDS.WEBSITE" ng-if="vm.tab.channel == \'chat\'">Website</p>\n                        <p translate="DASHBOARDS.ACCOUNT" ng-if="vm.tab.channel != \'chat\'">Account</p>\n                        <h4>{{vm.account.name}}</h4>\n                    </div>\n                </md-list-item>\n\n                <md-list-item class="md-2-line">\n                    <div class="md-list-item-text">\n                        <p translate="DASHBOARDS.AGENT">Agent</p>\n                        <h4>{{vm.agent.fullname || vm.usersMap[vm.interaction.UserId]}}</h4>\n                    </div>\n                </md-list-item>\n\n                <md-list-item class="md-2-line" ng-if="vm.interaction.externalUrl">\n                    <div class="md-list-item-text">\n                        <p translate="DASHBOARDS.EXTERNAL_URL">External URL</p>\n                        <a href="{{vm.interaction.externalUrl}}" target="_blank">\n                            <h4>{{vm.interaction.externalUrl}}</h4>\n                        </a>\n                    </div>\n                </md-list-item>\n\n                <md-list-item class="md-2-line">\n                    <div class="md-list-item-text">\n                        <p translate="DASHBOARDS.CREATED_AT">Created At</p>\n                        <h4>{{vm.interaction.createdAt | date: \'medium\'}}</h4>\n                    </div>\n                </md-list-item>\n\n                <div ng-switch="vm.tab.channel">\n                    <div ng-switch-when="chat">\n                        <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.chat.html\'"></div>\n                    </div>\n                    <div ng-switch-when="mail">\n                        <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.mail.html\'"></div>\n                    </div>\n                </div>\n\n                <md-list-item class="md-2-line" ng-if="vm.interaction.Tags.length">\n                    <div class="md-list-item-text">\n                        <p translate="DASHBOARDS.TAGS">Tags</p>\n                        <div class="tags padding-bottom-5" layout="row" layout-align="start center" layout-wrap>\n                            <div class="tag margin-right-5 margin-top-5 margin-bottom-5" layout="row" layout-align="center center" ng-repeat="tag in vm.interaction.Tags">\n                                <div class="tag-color" ng-style="{\'background\': tag.color}"></div>\n                                <div class="tag-label">{{tag.name}}</div>\n                            </div>\n                        </div>\n                    </div>\n                </md-list-item>\n\n                <md-divider ng-if="vm.interaction.closed"></md-divider>\n\n                <md-list-item class="md-2-line" ng-if="vm.interaction.closed">\n                    <div class="md-list-item-text">\n                        <p translate="DASHBOARDS.CLOSED_AT">Closed At</p>\n                        <h4>{{vm.interaction.closedAt | date: \'medium\'}}</h4>\n                    </div>\n                </md-list-item>\n                <md-list-item class="md-2-line" ng-if="vm.interaction.closed && vm.interaction.disposition">\n                    <div class="md-list-item-text">\n                        <p translate="DASHBOARDS.DISPOSITION">Disposition</p>\n                        <h4>{{ vm.interaction.disposition }}</h4>\n                    </div>\n                </md-list-item>\n                <md-list-item class="md-3-line md-long-text" ng-if="vm.interaction.closed && vm.interaction.note">\n                    <div class="md-list-item-text">\n                        <p translate="DASHBOARDS.NOTE">NOTE</p>\n                        <h4 style="overflow-wrap: break-word; white-space: normal">{{ vm.interaction.note }}</h4>\n                    </div>\n                </md-list-item>\n            </md-list>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span>Journey (beta)</span>\n        </md-tab-label>\n        <md-tab-body>\n            <md-content class="md-padding">\n                <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.journey.html\'"></div>\n            </md-content>\n        </md-tab-body>\n    </md-tab>\n</md-tabs>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.journey.all.html",'<md-divider></md-divider>\n\n<md-list flex>\n    <md-list-item class="md-2-line">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.AGENT">Agent</p>\n            <h4>{{vm.agent.fullname || vm.usersMap[item.UserId]}}</h4>\n        </div>\n    </md-list-item>\n\n    <md-list-item class="md-2-line" ng-if="item.externalUrl">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.EXTERNAL_URL">External URL</p>\n            <a href="{{item.externalUrl}}" target="_blank">\n                <h4>{{item.externalUrl}}</h4>\n            </a>\n        </div>\n    </md-list-item>\n\n    <md-list-item class="md-2-line">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.CREATED_AT">Created At</p>\n            <h4>{{item.createdAt | date: \'medium\'}}</h4>\n        </div>\n    </md-list-item>\n\n    <div ng-if="item.ChatWebsiteId">\n        <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.chat.html\'"></div>\n    </div>\n    <div ng-if="item.MailAccountId">\n        <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.mail.html\'"></div>\n    </div>\n\n    <md-divider ng-if="item.closed"></md-divider>\n    <md-list-item class="md-2-line" ng-if="item.closed">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.CLOSED_AT">Closed At</p>\n            <h4>{{item.closedAt | date: \'medium\'}}</h4>\n        </div>\n    </md-list-item>\n    <md-list-item class="md-2-line" ng-if="item.closed && item.disposition">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.DISPOSITION">Disposition</p>\n            <h4>{{ item.disposition }}</h4>\n        </div>\n    </md-list-item>\n    <md-list-item class="md-3-line md-long-text" ng-if="item.closed && item.note">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.NOTE">NOTE</p>\n            <h4 style="overflow-wrap: break-word; white-space: normal">{{ item.note }}</h4>\n        </div>\n    </md-list-item>\n\n    <p class="padding-horizontal-15 grey-fg">Tags</p>\n    <md-list-item ng-if="item.Tags.length">\n        <div class="tags padding-bottom-5" layout="row" layout-align="start center" layout-wrap>\n            <div class="tag margin-right-5 margin-top-5 margin-bottom-5" layout="row" layout-align="center center" ng-repeat="tag in item.Tags">\n                <div class="tag-color" ng-style="{\'background\': tag.color}"></div>\n                <div class="tag-label">{{tag.name}}</div>\n            </div>\n        </div>\n    </md-list-item>\n</md-list>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.journey.html",'<div id="timeline" ms-timeline layout="column">\n    \x3c!-- TIMELINE ITEM --\x3e\n    <div class="ms-timeline-item" layout-align="center center" ng-repeat="item in vm.journey | orderBy:\'-createdAt\'">\n        <div class="timeline-card">\n            <md-card class="channel" ng-class="{\'md-grey-200-bg\': item.id == vm.interaction.id}">\n                <div class="header p-6" layout="row" layout-align="space-between center">\n\n                    <md-button class="md-fab md-mini" aria-label="icon-channel" ng-class="vm.getColorByItem(item) + \'-bg\'">\n                        <md-icon ng-if="item.FaxAccountId" md-font-icon="icon-deskphone"></md-icon>\n                        <md-icon ng-if="item.OpenchannelAccountId" md-font-icon="icon-google-earth"></md-icon>\n                        <md-icon ng-if="item.SmsAccountId" md-font-icon="icon-message-text"></md-icon>\n                        <md-icon ng-if="item.MailAccountId" md-font-icon="icon-email"></md-icon>\n                        <md-icon ng-if="item.ChatWebsiteId" md-font-icon="icon-hangouts"></md-icon>\n                        <md-icon ng-if="item.amaflags" md-font-icon="icon-phone"></md-icon>\n                    </md-button>\n\n                    <div class="info" layout="column" ng-init="item.showMore = false">\n                        <span class="font-size-12 text-truncate">#{{item.id}} - {{ item.Account.key || item.destination }}</span>\n                        <span class="font-size-10">{{item.createdAt | date: \'medium\'}}</span>\n                        <span>\n                          <a class="toggle-details md-accent-color" ng-hide="item.showMore" ng-click="item.showMore = !item.showMore" translate="DASHBOARDS.SHOW_DETAILS">\n                            Show Details\n                          </a>\n                          <a class="toggle-details md-accent-color" ng-show="item.showMore" ng-click="item.showMore = !item.showMore" translate="DASHBOARDS.HIDE_DETAILS">\n                            Hide Details\n                          </a>\n                        </span>\n                    </div>\n\n                    <span>\n                        <img ng-if="item.UserId" class="avatar" ng-src="api/users/{{item.UserId}}/avatar">\n                        <md-tooltip md-direction="left">{{item.Owner.fullname || item.User.fullname}}</md-tooltip>\n                    </span>\n\n                </div>\n\n                <div ng-if="item.showMore">\n                    <div ng-if="!item.amaflags" ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.journey.all.html\'"></div>\n                    <div ng-if="item.amaflags" ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.journey.voice.html\'"></div>\n                </div>\n\n                <md-divider></md-divider>\n\n                <div ng-if="item.id != vm.interaction.id" layout="row" layout-align="space-around center">\n                    <div ng-if="item.closed && !amaflags" class="text-truncate white-fg">\n                        <span class="text-boxed md-background-bg red-fg" title="{{ \'DASHBOARDS.STATUS\' | translate}}: {{ \'DASHBOARDS.CLOSED\' | translate}} {{ item.disposition }}">{{ \'DASHBOARDS.STATUS\' | translate}}: {{ \'DASHBOARDS.CLOSED\' | translate}} {{ item.disposition }}</span>\n                    </div>\n                    <span class="text-boxed md-background-bg green-fg" ng-if="!item.closed && !item.amaflags" title="{{ \'DASHBOARDS.STATUS\' | translate}}: {{ \'DASHBOARDS.OPENED\' | translate}}">{{ \'DASHBOARDS.STATUS\' | translate}}: {{ \'DASHBOARDS.OPENED\' | translate}}<span ng-if="item.substatus"> - {{ \'DASHBOARDS.\' + item.substatus.toUpperCase() | translate }}</span></span>\n                    <span ng-if="item.amaflags" class="text-boxed md-background-bg red-fg" title="{{ \'DASHBOARDS.DISPOSITION\' | translate}}: {{ item.userDisposition || \'No Dispose\'}}">{{ \'DASHBOARDS.DISPOSITION\' | translate}}: {{ item.userDisposition || \'No Dispose\'}}</span>\n                    <div flex></div>\n                    <md-button ng-if="!vm.tab.spy" ng-disabled="item.amaflags" class="md-icon-button" aria-label="go" ng-click="vm.openInteraction($event, item)">\n                        <md-icon md-font-icon="icon-open-in-new" class="s20"></md-icon>\n                    </md-button>\n\n                </div>\n            </md-card>\n        </div>\n    </div>\n    \x3c!-- / TIMELINE ITEM --\x3e\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.journey.voice.html",'<md-divider></md-divider>\n\n<md-list flex>\n    <md-list-item class="md-2-line">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.TYPE">Type</p>\n            <h4>{{item.type ? item.type : \'no type\'}}</h4>\n        </div>\n    </md-list-item>\n\n    <md-list-item class="md-2-line">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.SOURCE">Source</p>\n            <h4>{{item.source ? item.source : \'unknown\'}}</h4>\n        </div>\n    </md-list-item>\n\n    <md-list-item class="md-2-line">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.DESTINATION">Destination</p>\n            <h4>{{item.destination ? item.destination : \'unknown\'}}</h4>\n        </div>\n    </md-list-item>\n\n    <md-list-item class="md-2-line">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.CALLERID">Caller Id</p>\n            <h4>{{item.callerid ? item.callerid : \'unknown\'}}</h4>\n        </div>\n    </md-list-item>\n\n    <md-list-item class="md-2-line">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.STARTEDAT">Started At</p>\n            <h4>{{item.starttime | date:\'medium\'}}</h4>\n        </div>\n    </md-list-item>\n\n    <md-list-item class="md-2-line">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.END_AT">End At</p>\n            <h4>{{item.endtime | date:\'medium\'}}</h4>\n        </div>\n    </md-list-item>\n\n    <md-list-item class="md-2-line">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.DURATION">Duration</p>\n            <h4>{{item.duration ? item.duration : \'--\'}}s</h4>\n        </div>\n    </md-list-item>\n\n    <md-list-item class="md-2-line">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.NOTE">Note</p>\n            <h4>{{item.note ? item.note : \'--\'}}</h4>\n        </div>\n    </md-list-item>\n</md-list>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.mail.html",'<div ng-init="item = item || vm.interaction">\n    <md-list-item class="md-2-line" ng-if="item.subject">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.SUBJECT">Subject</p>\n            <h4>{{item.subject}}</h4>\n        </div>\n    </md-list-item>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.interaction.html",'\x3c!-- MESSAGES --\x3e\n<div layout="row" ng-repeat="message in vm.messages.rows" class="md-padding message-row" ng-class="message.secret && vm.user.id != message.UserId ? \'in\' : message.direction">\n    <img ng-if="message.direction ===\'in\'" src="assets/images/avatars/customer.png" class="avatar" />\n    <img ng-if="message.direction ===\'out\' && message.UserId && !message.secret" ng-src="api/users/{{message.UserId}}/avatar" class="avatar" />\n    <img ng-if="message.direction ===\'out\' && message.UserId && message.secret" ng-src="api/users/{{message.UserId}}/avatar" class="avatar" />\n    <img ng-if="message.direction ===\'out\' && !message.UserId" class="avatar" src="assets/images/avatars/robot.png">\n\n    <div class="bubble" ng-class="{\'md-yellow-200-bg\': message.secret}" ng-switch="message.direction">\n        <div ng-if="message.secret">\n            <div class="time secondary-text" layout="row" layout-align="end center">\n                <div layout-padding>\n                    {{ vm.getLabelByMessage(message) }} - {{message.createdAt | date: \'medium\'}}\n                </div>\n                <div ng-if="message.id">\n                    <md-icon class="s18" md-font-icon="icon-lock"></md-icon>\n                </div>\n            </div>\n        </div>\n        <div ng-if="!message.secret">\n            <div ng-switch-when="in" class="time secondary-text" ng-click="message.Contact && vm.openContact(ev, message.Contact)">{{ vm.getLabelByMessage(message) }} - {{message.createdAt | date: \'medium\'}}</div>\n            <div ng-switch-when="out" class="time secondary-text" layout="row" layout-align="end center">\n                <div layout-padding>\n                    {{ vm.getLabelByMessage(message) }} - {{message.createdAt | date: \'medium\'}}\n                </div>\n                <div ng-if="message.id && vm.tab.channel !== \'fax\'">\n                    <md-icon ng-if="!message.read" class="s18" md-font-icon="icon-check"></md-icon>\n                    <md-icon ng-if="message.read" class="s18" md-font-icon="icon-check-all md-accent"></md-icon>\n                </div>\n                <div ng-if="message.id && vm.tab.channel === \'fax\'">\n                    <md-icon ng-if="!message.read && !(message.failMessage )" class="s18" md-font-icon="icon-check"></md-icon>\n                    <md-icon ng-if="message.read" class="s18" md-font-icon="icon-check-all md-accent"></md-icon>\n                    <span ng-if="!message.read && message.failMessage" class="s18 red-900-fg"> {{ message.failMessage }}</span>\n                    <md-icon ng-if="!message.read && message.failMessage" class="s18 red-900-fg" md-font-icon="icon-close md-accent"></md-icon>\n                </div>\n            </div>\n        </div>\n        <div ng-if="message.AttachmentId" layout="row" layout-align="end center">\n            <md-button class="md-raised md-accent" ng-click="vm.getAttachment({id: message.AttachmentId, name: vm.htmlToPlaintext(message.body)})">\n                <span>{{vm.htmlToPlaintext(message.body)}}</span>\n                <md-icon md-font-icon="icon-download"></md-icon>\n            </md-button>\n        </div>\n        <div ng-if="!message.AttachmentId" ng-bind-html="message.body | embed:vm.emojiOptions" class="message" layout="row" layout-align="end center"></div>\n    </div>\n</div>\n\x3c!-- / MESSAGES --\x3e'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.interaction.mail.html",'<div ms-timeline="vm.timelineOptions" ms-timeline-load-more="vm.loadNextPage()">\n    <div ng-repeat="message in vm.messages.rows track by message.id" ng-init="vm.selectedMailShowSystemMessage[message.id] = false">\n        <md-card ng-if="message.secret" class="md-padding md-yellow-100-bg" layout="column">\n            <div layout="row" layout-align="start center">\n                <img class="avatar" ng-src="api/users/{{message.UserId}}/avatar">\n                <div layout="column">\n                    <span class="grey-fg">{{vm.agent.fullname || vm.usersMap[message.UserId]}}</span>\n                    <span class="grey-fg">{{message.createdAt | date:\'medium\'}}</span>\n                </div>\n            </div>\n            <div layout="row" layout-align="center center" layout-fill ng-if="message.attach">\n                <div flex>\n                    <md-divider></md-divider>\n                </div>\n                <md-menu>\n                    <md-button aria-label="attachments" class="md-icon-button" ng-click="vm.getAttachments(message); $mdOpenMenu($event);">\n                        <md-tooltip md-direction="bottom"><span translate="MAIL.ATTACHMENTS">Attachments</span></md-tooltip>\n                        <div layout="row" layout-align="start center">\n                            <md-icon md-font-icon="icon-paperclip" class="icon s24"></md-icon><span>{{message.attach}}</span>\n                        </div>\n                    </md-button>\n                    <md-menu-content width="4">\n                        <div layout="column" layout-align="center center" ng-if="!message.attachments">\n                            <md-progress-circular md-mode="indeterminate"></md-progress-circular>\n                            <span translate="MAIL.ATTACHMENTS">Attachments</span>\n                        </div>\n                        <md-menu-item ng-if="message.attachments" ng-repeat="attachment in message.attachments">\n                            <md-button ng-click="vm.getAttachment(attachment)">{{ attachment.name || (\'attachment-\' + $index) }}</md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n                <div flex>\n                    <md-divider></md-divider>\n                </div>\n            </div>\n            <div class="padding-top-5" ng-bind-html-unsafe="message.body"></div>\n        </md-card>\n        <div ng-if="!message.secret">\n            <div layout="row" layout-align="center center" ng-if="message.direction == \'out\' && !message.UserId && !vm.selectedMailShowSystemMessage[message.id]">\n                <md-button class="md-raised blue-grey-300-bg white-fg" ng-click="vm.selectedMailShowSystemMessage[message.id] = !vm.selectedMailShowSystemMessage[message.id]">[{{message.createdAt | date: \'medium\'}}] {{ \'MAIL.SHOW_AUTOREPLY\' | translate }}</md-button>\n            </div>\n            <md-card layout="column" class="md-padding message-row" ng-if="message.direction == \'in\' || (message.direction == \'out\' && (message.UserId || vm.selectedMailShowSystemMessage[message.id]))">\n                <md-content class="mail-content">\n                    <div class="info" layout="row" layout-align="space-between start">\n\n                        <div layout="column" layout-align="start start">\n                            <div layout="row" layout-align="start start">\n                                \x3c!-- <div>\n                                <img ng-if="message.direction ===\'in\'" ng-src="assets/images/avatars/customer.png" class="avatar" alt="customer" />\n\n                                <img ng-if="message.direction ===\'out\' && message.UserId" class="avatar" ng-src="api/users/{{message.UserId}}/avatar">\n                                <img ng-if="message.direction ===\'out\' && !message.UserId" class="avatar" src="assets/images/avatars/robot.png">\n                            </div> --\x3e\n\n                                <div layout="column" layout-align="start start">\n                                    <div class="name" ng-click="message.Contact && vm.openContact(ev, message.Contact)"><strong>{{message.from}}</strong>\n                                        <md-icon ng-if="message.attach" md-font-icon="icon-paperclip" class="s16"></md-icon>\n                                    </div>\n                                    <div class="name">\n                                        <div>{{message.subject}}</div>\n                                    </div>\n                                    <div class="name" layout="row" layout-align="start center"><span translate="MAIL.TO">To</span>: <span class="padding-left-5 subject text-truncate">{{message.to}}</span></div>\n                                </div>\n                            </div>\n\n                            <a class="toggle-details md-accent-color" ng-hide="vm.selectedMailShowDetails[message.id]" ng-click="vm.selectedMailShowDetails[message.id] = !vm.selectedMailShowDetails[message.id]" translate="MAIL.SHOW_DETAILS">\n                        Show Details\n                    </a>\n                            <a class="toggle-details md-accent-color" ng-show="vm.selectedMailShowDetails[message.id]" ng-click="vm.selectedMailShowDetails[message.id] = !vm.selectedMailShowDetails[message.id]" translate="MAIL.HIDE_DETAILS">\n                        Hide Details\n                    </a>\n\n                            <div ng-show="vm.selectedMailShowDetails[message.id]" class="details" layout="row" layout-align="start start">\n                                <div layout="column">\n                                    <span class="title" translate="MAIL.DATE">Date:</span>\n                                    <span class="title" translate="MAIL.FROM">From:</span>\n                                    <span class="title" translate="MAIL.TO">To:</span>\n                                    <span class="title" translate="MAIL.CC" ng-if="message.cc">Cc:</span>\n                                    <span class="title" translate="MAIL.ACCEPTED" ng-if="message.UserId && message.direction ===\'in\'">Accepted:</span>\n                                </div>\n\n                                <div layout="column">\n                                    <span class="detail">{{message.createdAt | date:\'medium\'}}</span>\n                                    <span class="detail">{{message.from}}</span>\n                                    <span class="detail">{{message.to}}</span>\n                                    <span class="detail" ng-if="message.cc">{{message.cc}}</span>\n                                    <span class="detail" ng-if="message.UserId && message.direction ===\'in\'">{{vm.usersMap[message.UserId]}}</span>\n                                </div>\n                            </div>\n                        </div>\n\n                        <div layout="row" layout-align="center center">\n                            <div layout="column" layout-align="center end" class="md-padding">\n                                <span class="grey-fg" ng-if="message.direction ===\'in\'">{{message.from.indexOf(vm.contact.email) >= 0 ? vm.contact.firstName + \' \' + vm.contact.lastName : \'*\' + message.from}}</span>\n\n                                <span class="grey-fg" ng-if="message.direction ===\'out\' && message.UserId">{{vm.agent.fullname || vm.usersMap[message.UserId]}}</span>\n                                <span class="grey-fg" ng-if="message.direction ===\'out\' && !message.UserId">System</span>\n\n                                <span class="grey-fg">{{message.createdAt | date:\'medium\'}}</span>\n                            </div>\n                            <img ng-if="message.direction ===\'in\'" ng-src="assets/images/avatars/customer.png" class="avatar" alt="customer" />\n\n                            <img ng-if="message.direction ===\'out\' && message.UserId" class="avatar" ng-src="api/users/{{message.UserId}}/avatar">\n                            <img ng-if="message.direction ===\'out\' && !message.UserId" class="avatar" src="assets/images/avatars/robot.png">\n\n\n                            \x3c!-- <md-menu>\n                        <md-button aria-label="More" class="md-icon-button"\n                                   ng-click="$mdOpenMenu($event)"\n                                   translate translate-aria-label="MAIL.MORE">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="3">\n                            <md-menu-item>\n                                <md-button aria-label="Print" translate-aria-label="MAIL.PRINT">\n                                    <md-icon md-font-icon="icon-printer"></md-icon>\n                                    <span translate="MAIL.PRINT">Print</span>\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu> --\x3e\n                        </div>\n\n\n                    </div>\n\n                    <div layout="row" layout-align="center center" layout-fill>\n                        <div flex>\n                            <md-divider></md-divider>\n                        </div>\n                        <div>\n                            <md-button ng-if="!vm.interaction.closed && !vm.tab.spy" class="md-icon-button" aria-label="reply" ng-click="vm.composeMailInteraction(\'reply\', message)">\n                                <md-tooltip md-direction="bottom"><span translate="MAIL.REPLY">Reply</span></md-tooltip>\n                                <md-icon md-font-icon="icon-reply" class="icon s24"></md-icon>\n                            </md-button>\n                            <md-button ng-if="!vm.interaction.closed && !vm.tab.spy" class="md-icon-button" aria-label="replyAll" ng-click="vm.composeMailInteraction(\'replyAll\', message)">\n                                <md-tooltip md-direction="bottom"><span translate="MAIL.REPLY_ALL">Reply All</span></md-tooltip>\n                                <md-icon md-font-icon="icon-reply-all" class="icon s24"></md-icon>\n                            </md-button>\n                            <md-button ng-if="!vm.interaction.closed && !vm.tab.spy" class="md-icon-button" aria-label="forward" ng-click="vm.composeMailInteraction(\'forward\', message)">\n                                <md-tooltip md-direction="bottom"><span translate="MAIL.FORWARD">Forward</span></md-tooltip>\n                                <md-icon md-font-icon="icon-forward" class="icon s24"></md-icon>\n                            </md-button>\n                            <md-menu ng-if="message.attach">\n                                <md-button aria-label="attachments" class="md-icon-button" ng-click="vm.getAttachments(message); $mdOpenMenu($event);">\n                                    <md-tooltip md-direction="bottom"><span translate="MAIL.ATTACHMENTS">Attachments</span></md-tooltip>\n                                    <div layout="row" layout-align="start center">\n                                        <md-icon md-font-icon="icon-paperclip" class="icon s24"></md-icon><span>{{message.attach}}</span>\n                                    </div>\n                                </md-button>\n                                <md-menu-content width="4">\n                                    <div layout="column" layout-align="center center" ng-if="!message.attachments">\n                                        <md-progress-circular md-mode="indeterminate"></md-progress-circular>\n                                        <span translate="MAIL.ATTACHMENTS">Attachments</span>\n                                    </div>\n                                    <md-menu-item ng-if="message.attachments" ng-repeat="attachment in message.attachments">\n                                        <md-button ng-click="vm.getAttachment(attachment)">{{ attachment.name || (\'attachment-\' + $index) }}</md-button>\n                                    </md-menu-item>\n                                </md-menu-content>\n                            </md-menu>\n                        </div>\n                        <div flex>\n                            <md-divider></md-divider>\n                        </div>\n                    </div>\n\n                    <md-content ng-bind-html-unsafe="message.body"></md-content>\n                </md-content>\n            </md-card>\n        </div>\n    </div>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.loading.html",'<div class="big-circle md-whiteframe-4dp">\n    <md-icon class="s128 md-accent" md-font-icon="{{vm.getIconByChannel(vm.tab.channel)}}" ng-class="vm.getColorByChannel(vm.tab.channel) + \'-fg\'"></md-icon>\n</div>\n<span class="app-title" translate="DASHBOARDS.WAITING">Waiting</span>\n<span class="hide show-gt-md secondary-text" translate="DASHBOARDS.LOADING_INTERACTION">We are loading the interaction...</span>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.toolbar.fax.html",'<md-button ng-if="!vm.interaction.closed && !vm.tab.spy" class="md-icon-button" aria-label="reply" ng-click="vm.composeFaxInteraction(\'new\')">\n    <md-tooltip md-direction="bottom"><span translate="FAX.REPLY">Reply</span></md-tooltip>\n    <md-icon md-font-icon="icon-reply" class="icon s24"></md-icon>\n</md-button>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.toolbar.html",'<div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n    <md-icon md-font-icon="{{vm.getIconByChannel(vm.tab.channel)}}" class="s20" ng-class="vm.getColorByChannel(vm.tab.channel) + \'-fg\'"></md-icon>\n    <div class="padding-left-10" layout="column" layout-align="center start" flex>\n        <div class="font-size-14" layout="row" layout-align="start center" layout-fill>\n            <span>#{{vm.interaction.id}} - {{vm.account.key}}</span>\n            <div layout="row" layout-align="center center">\n                <md-icon ng-if="vm.interaction.attach" md-font-icon="icon-paperclip" class="s16"></md-icon>\n            </div>\n            <span class="red-fg padding-left-25" ng-if="vm.interaction.closed" translate="DASHBOARDS.CLOSED">CLOSED</span>\n            <span class="green-fg padding-left-25" ng-if="!vm.interaction.closed"><span translate="DASHBOARDS.OPENED">OPENED</span><span ng-if="vm.interaction.substatus"> - {{vm.interaction.substatus}}</span></span>\n            <div layout="row" layout-align="center center" class="blue-grey-300-fg padding-left-40" ng-if="!vm.interaction.closed">\n                <timer start-time="vm.interaction.createdAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                <md-icon md-font-icon="icon-timelapse" class="s16 padding-left-5"></md-icon>\n            </div>\n        </div>\n        <div class="tags" layout="row" layout-align="start center" ng-if="vm.interaction.Tags.length" ng-class="{\'padding-top-5\': vm.interaction.Tags.length}">\n            <div class="tag margin-right-5" layout="row" layout-align="center center" ng-repeat="tag in vm.interaction.Tags">\n                <div class="tag-color" ng-style="{\'background\': tag.color}"></div>\n                <div class="tag-label">{{tag.name}}</div>\n            </div>\n        </div>\n    </div>\n    <div layout="row" layout-align="end center">\n        <div ng-switch="vm.tab.channel">\n            <div ng-switch-when="mail">\n                <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.toolbar.mail.html\'"></div>\n            </div>\n            <div ng-switch-when="fax">\n                <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.toolbar.fax.html\'"></div>\n            </div>\n            <div ng-switch-when="sms">\n                <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.toolbar.sms.html\'"></div>\n            </div>\n        </div>\n        <md-menu class="no-margin" ng-if="!vm.interaction.disposition" md-position-mode="target-right target">\n            <md-button class="md-icon-button" ng-click="$mdOpenMenu()" aria-label="more">\n                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n            </md-button>\n\n            <md-menu-content width="2">\n                <md-menu-item>\n                    <md-button ng-click="vm.tagInteraction()" translate="DASHBOARDS.TAG">\n                        Tag\n                    </md-button>\n                </md-menu-item>\n                <md-menu-item ng-if="!vm.interaction.closed && vm.tab.channel == \'mail\' && (vm.subStatuses.rows.length || vm.interaction.substatus != null)">\n                    <md-menu>\n                        <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="DASHBOARDS.SET_AS">\n                            Set as\n                        </md-button>\n                        <md-menu-content>\n                            <md-menu-item ng-if="vm.interaction.substatus != null">\n                                <md-button ng-click="vm.setAs(null)" translate="DASHBOARDS.NONE">\n                                    None\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item ng-repeat="subStatus in vm.subStatuses.rows">\n                                <md-button ng-click="vm.setAs(subStatus.name)">\n                                    {{subStatus.name}}\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </md-menu-item>\n                <md-menu-item ng-if="!vm.interaction.closed && vm.tab.channel == \'mail\' && vm.account.markAsUnread">\n                    <md-button ng-click="vm.markAsUnread()" translate="DASHBOARDS.MARK_AS_UNREAD">\n                        Unread\n                    </md-button>\n                </md-menu-item>\n                <md-menu-item ng-if="!vm.tab.spy && !vm.interaction.closed">\n                    <md-button ng-click="vm.disposeInteraction()" translate="DASHBOARDS.CLOSE_AND_DISPOSE">\n                        Close and Dispose\n                    </md-button>\n                </md-menu-item>\n                <md-menu-item ng-if="!vm.tab.spy && vm.interaction.closed && !vm.interaction.disposition">\n                    <md-button ng-click="vm.disposeInteraction(ev)" translate="DASHBOARDS.DISPOSE">\n                        Dispose\n                    </md-button>\n                </md-menu-item>\n            </md-menu-content>\n        </md-menu>\n    </div>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.toolbar.mail.html",'<md-button ng-if="!vm.interaction.closed && !vm.tab.spy" class="md-icon-button" aria-label="reply" ng-click="vm.composeMailInteraction(\'reply\', vm.interaction)">\n    <md-tooltip md-direction="bottom"><span translate="MAIL.REPLY">Reply</span></md-tooltip>\n    <md-icon md-font-icon="icon-reply" class="icon s24"></md-icon>\n</md-button>\n<md-button ng-if="!vm.interaction.closed && !vm.tab.spy" class="md-icon-button" aria-label="replyAll" ng-click="vm.composeMailInteraction(\'replyAll\', vm.interaction)">\n    <md-tooltip md-direction="bottom"><span translate="MAIL.REPLY_ALL">Reply All</span></md-tooltip>\n    <md-icon md-font-icon="icon-reply-all" class="icon s24"></md-icon>\n</md-button>\n<md-button ng-if="!vm.interaction.closed && !vm.tab.spy" class="md-icon-button" aria-label="forward" ng-click="vm.composeMailInteraction(\'forward\', vm.interaction)">\n    <md-tooltip md-direction="bottom"><span translate="MAIL.FORWARD">Forward</span></md-tooltip>\n    <md-icon md-font-icon="icon-forward" class="icon s24"></md-icon>\n</md-button>\n<md-button class="md-icon-button" aria-label="note" ng-click="vm.composeMailInteraction(\'note\', vm.interaction)">\n    <md-tooltip md-direction="bottom"><span translate="MAIL.NOTE">Note</span></md-tooltip>\n    <md-icon md-font-icon="icon-note-outline" class="icon s24"></md-icon>\n</md-button>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.toolbar.sms.html",'<md-button class="md-icon-button" aria-label="note" ng-click="vm.composeSmsInteraction(\'note\', vm.interaction)">\n    <md-tooltip md-direction="bottom"><span translate="SMS.NOTE">Note</span></md-tooltip>\n    <md-icon md-font-icon="icon-note-outline" class="icon s24"></md-icon>\n</md-button>'),e.put("app/main/apps/dashboards/views/general/agent/jscripty/agent.general.jscripty.html",'<md-content class="md-padding" layout="column" layout-align="center center">\n    <div layout="row" layout-align="center center">\n        <span ng-if="!vm.tab.saved" class="text-boxed md-green-bg"><timer start-time="vm.starttime" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer></span>\n        <span ng-if="vm.contact" class="text-boxed md-gray-bg font-weight-900">{{vm.contact.firstName}} {{vm.contact.lastName}} {{vm.contact.phone}}</span>\n        <md-button ng-if="vm.showResetButton" ng-click="vm.resetViewer()" md-no-ink class="md-raised md-accent orange-bg">\n            <md-icon md-font-icon="icon-rotate-left" class="icon s16"></md-icon> {{\'JSCRIPTY.RESET_SESSION\' | translate}}</md-button>\n        <md-button ng-if="vm.contact" ng-click="vm.openContact($event, vm.contact)" md-no-ink class="md-raised md-accent" translate="JSCRIPTY.OPEN_CONTACT"></md-button>\n        <md-button ng-if="vm.showIncompleteSubmitButton" ng-click="vm.onSubmit($event, true)" md-no-ink class="md-raised md-accent green-bg" translate="JSCRIPTY.SUBMIT"></md-button>\n    </div>\n    <h1 ng-if="!vm.project.formData"><span translate="JSCRIPTY.PROJECT_NOT_AVAILABLE">Project is not available. Please contact the administrator</span></h1>\n    <mw-form-viewer ng-if="vm.project.formData" form-data="vm.project.formData" response-data="vm.project.responseData" on-submit="vm.onSubmit($event)" template-data="call" api="vm.formViewer"></mw-form-viewer>\n</md-content>'),e.put("app/main/apps/dashboards/views/general/agent/notification/dialog.html",'\x3c!-- <md-toast> --\x3e\n<div class="md-padding" layout="column" layout-align="center center">\n    <span class="md-title">#{{vm.notification.id}} {{vm.notification.title}}</span>\n    <span class="md-subhead" ng-if="vm.notification.queue">{{vm.notification.queue}}</span>\n    <div class="padding-top-5" layout="row">\n        <md-button class="md-raised md-accent" ng-click="vm.accept($event)" translate="DASHBOARDS.ACCEPT">\n            ACCEPT\n        </md-button>\n        <md-button class="md-raised md-warn" ng-click="vm.reject($event)" translate="DASHBOARDS.REJECT">\n            REJECT\n        </md-button>\n    </div>\n</div>\n\x3c!-- </md-toast> --\x3e'),e.put("app/main/apps/dashboards/views/general/agent/popup/agent.general.popup.html",'<md-content class="md-padding" flex>\n    <div ng-if="vm.html" ng-bind-html="vm.html"></div>\n    <h1 ng-if="!vm.html">Template is empty. Please contact the administrator</h1>\n</md-content>'),e.put("app/main/apps/dashboards/views/general/user/dialer/user.general.dialer.html",'\x3c!-- WIDGET INBOUND --\x3e\n<div class="dashboard-container md-background-bg md-whiteframe-1dp">\n    <div class="pb-16" layout="row" layout-align="start center">\n        <md-icon md-font-icon="icon-phone-outgoing" class="m-0 mr-16"></md-icon>\n        <div class="h2 secondary-text" translate="DASHBOARDS.TODAY_MOTION_BULL_STATS">Today Motion Bull STATS</div>\n    </div>\n\n    \x3c!-- WIDGET GROUP --\x3e\n    <div class="widget-group" layout="row" flex="100" layout-wrap>\n\n        \x3c!-- WIDGET 1 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="ph-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-timelapse"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="light-blue-fg font-size-52 line-height-72">\n                        {{vm.inbound.waiting || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.WAITING\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 light-blue-fg secondary-text text-truncate">{{\'DASHBOARDS.WAITING_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.WAITING\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 1 --\x3e\n\n        \x3c!-- WIDGET 3 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-in-talk"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="orange-fg font-size-52 line-height-72">\n                        {{(vm.inbound.talking || 0) + (vm.inbound.pTalking || 0)}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.TALKING\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 orange-fg secondary-text text-truncate">{{\'DASHBOARDS.TALKING_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.TALKING\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 3 --\x3e\n\n        \x3c!-- WIDGET 2 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="ph-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="red-fg font-size-52 line-height-72">\n                        {{vm.inbound.answered || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.INBOUND_ANSWERED\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 red-fg secondary-text text-truncate">{{\'DASHBOARDS.INBOUND_ANSWERED_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.INBOUND_ANSWERED\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 2 --\x3e\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-missed"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-grey-fg font-size-52 line-height-72">\n                        {{vm.inbound.outboundDropCallsDayCallersExit || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.ABANDONED\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-grey-fg secondary-text text-truncate">{{\'DASHBOARDS.ABANDONED_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.ABANDONED\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-outgoing"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-green-fg font-size-52 line-height-72">\n                        {{vm.inbound.outboundDropCallsDayTimeout || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.DROPPED\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-green-fg secondary-text text-truncate">{{\'DASHBOARDS.DROPPED_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.DROPPED\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n    </div>\n    \x3c!-- / WIDGET GROUP --\x3e\n\n    \x3c!-- WIDGET GROUP --\x3e\n    <div class="widget-group" layout="row" flex="100" layout-wrap>\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-dots"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-green-fg font-size-52 line-height-72">\n                        {{vm.inbound.originated || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.ORIGINATED\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-green-fg secondary-text text-truncate">{{\'DASHBOARDS.ORIGINATED_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.ORIGINATED\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n        \x3c!-- WIDGET 3 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-in-talk"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="orange-fg font-size-42 line-height-72">\n                        {{ vm.inbound.avgTalkTime || \'00:00:00\' }}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.AVG_TALK_TIME\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 orange-fg secondary-text text-truncate">{{\'DASHBOARDS.AVG_TALK_TIME_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.AVG_TALK_TIME\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 3 --\x3e\n\n        \x3c!-- WIDGET 2 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="ph-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-percent"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="red-fg font-size-42 line-height-72">\n                        {{ vm.inbound.outboundanswerRate || 0 |number : 1}}%\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.INBOUND_ANSWER_RATE\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 red-fg secondary-text text-truncate">{{\'DASHBOARDS.INBOUND_ANSWER_RATE_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.INBOUND_ANSWER_RATE\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 2 --\x3e\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-percent"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-grey-fg font-size-42 line-height-72">\n                        {{ vm.inbound.outboundAbandonRate || 0}}%\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.ABANDON_RATE\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-grey-fg secondary-text text-truncate">{{\'DASHBOARDS.ABANDON_RATE_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.ABANDON_RATE\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-percent"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-grey-fg font-size-42 line-height-72">\n                        {{ vm.inbound.outboundDropRate }}%\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.DROP_RATE\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-grey-fg secondary-text text-truncate">{{\'DASHBOARDS.DROP_RATE_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.DROP_RATE\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n    </div>\n    \x3c!-- / WIDGET GROUP --\x3e\n</div>\n\x3c!-- / WIDGET OUTBOUND --\x3e\n\n\x3c!-- WIDGET INBOUND --\x3e\n<div class="dashboard-container md-background-bg md-whiteframe-1dp">\n    <div class="pb-16" layout="row" layout-align="start center">\n        <md-icon md-font-icon="icon-phone-outgoing" class="m-0 mr-16"></md-icon>\n        <div class="h2 secondary-text" translate="DASHBOARDS.TODAY_IVR_CAMPAIGNS_STATS">Today IVR campaigns stats</div>\n    </div>\n\n    \x3c!-- WIDGET GROUP --\x3e\n    <div class="widget-group" layout="row" flex="100" layout-wrap>\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-dots"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-green-fg font-size-52 line-height-72">\n                        {{vm.ivr.originated || 0}}/{{vm.ivr.limitCalls || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.ORIGINATED\' | translate | uppercase}}/{{\'DASHBOARDS.LIMITED\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-green-fg secondary-text text-truncate">{{\'DASHBOARDS.LIMITED_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.ORIGINATEDLIMITED\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n    </div>\n    \x3c!-- / WIDGET GROUP --\x3e\n</div>\n\x3c!-- / WIDGET IVR --\x3e'),e.put("app/main/apps/dashboards/views/general/user/user.general.html",'<div id="dashboard-general" class="page-layout simple right-sidenav" layout="row">\n    \x3c!-- CENTER --\x3e\n    <div class="center" flex ms-scroll>\n        \x3c!-- CONTENT --\x3e\n        <div class="content">\n            \x3c!--  NOTE: aggoiungere nel controller ng-if="vm.hasPermission()" --\x3e\n            <md-tabs md-selected="vm.currentTab" ng-if="vm.hasPermission()" md-dynamic-height>\n                <md-tab label="{{\'DASHBOARDS.VOICE\' | translate}}" ui-sref="app.dashboards.general.voice">\n                    <div ui-view="voice"></div>\n                </md-tab>\n                <md-tab ng-if="vm.license.dialer" label="{{\'DASHBOARDS.MOTIONDIALER\' | translate}}" ui-sref="app.dashboards.general.dialer">\n                    <div ui-view="dialer"></div>\n                </md-tab>\n            </md-tabs>\n        </div>\n        \x3c!-- END CONTENT --\x3e\n\n        <md-content ng-if="!vm.hasPermission()" layout="row" layout-align="space-around center" flex layout-padding layout-wrap>\n            <div layout="column" layout-align="space-around center" flex="50">\n                <span class="font-size-40 text-center">{{ \'DASHBOARDS.WELCOME_TO_MOTION\' | translate }}!</span>\n                <span class="font-size-30 text-center" translate="DASHBOARDS.WELCOME_MESSAGE">Use the left sidebar to navigate through available sections.</span>\n            </div>\n\n            <div layout="column" flex="50">\n                <img src="assets/images/avatars/permissions.png" alt="permissions">\n            </div>\n        </md-content>\n    </div>\n</div>'),e.put("app/main/apps/dashboards/views/general/user/voice/user.general.voice.html",'\x3c!-- WIDGET INBOUND --\x3e\n<div class="dashboard-container md-background-bg md-whiteframe-1dp">\n    <div class="pb-16" layout="row" layout-align="start center">\n        <md-icon md-font-icon="icon-phone-incoming" class="m-0 mr-16"></md-icon>\n        <div class="h2 secondary-text" translate="DASHBOARDS.TODAY_INBOUND_STATS">Today Inbound STATS</div>\n    </div>\n\n    \x3c!-- WIDGET GROUP --\x3e\n    <div class="widget-group" layout="row" flex="100" layout-wrap>\n\n        \x3c!-- WIDGET 1 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="ph-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-timelapse"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="light-blue-fg font-size-52 line-height-72">\n                        {{vm.inbound.waiting || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.WAITING\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 light-blue-fg secondary-text text-truncate">{{\'DASHBOARDS.WAITING_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.WAITING\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 1 --\x3e\n\n        \x3c!-- WIDGET 3 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-in-talk"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="orange-fg font-size-52 line-height-72">\n                        {{vm.inbound.talking || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.TALKING\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 orange-fg secondary-text text-truncate">{{\'DASHBOARDS.TALKING_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.TALKING\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 3 --\x3e\n\n        \x3c!-- WIDGET 2 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="ph-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="red-fg font-size-52 line-height-72">\n                        {{vm.inbound.answered || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.INBOUND_ANSWERED\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 red-fg secondary-text text-truncate">{{\'DASHBOARDS.INBOUND_ANSWERED_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.INBOUND_ANSWERED\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 2 --\x3e\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-missed"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-grey-fg font-size-52 line-height-72">\n                        {{vm.inbound.abandoned || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.ABANDONED\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-grey-fg secondary-text text-truncate">{{\'DASHBOARDS.ABANDONED_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.ABANDONED\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-incoming"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-green-fg font-size-52 line-height-72">\n                        {{vm.inbound.total || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.TOTAL_OFFERED\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-green-fg secondary-text text-truncate">{{\'DASHBOARDS.TOTAL_OFFERED_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.TOTAL_OFFERED\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n    </div>\n    \x3c!-- / WIDGET GROUP --\x3e\n\n    \x3c!-- WIDGET GROUP --\x3e\n    <div class="widget-group" layout="row" flex="100" layout-wrap>\n\n        \x3c!-- WIDGET 1 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="ph-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-timer-sand"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="light-blue-fg font-size-42 line-height-72">\n                        {{ vm.inbound.avgHoldTime || \'00:00:00\' }}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.AVG_HOLD_TIME\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 light-blue-fg secondary-text text-truncate">{{\'DASHBOARDS.AVG_HOLD_TIME_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.AVG_HOLD_TIME\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 1 --\x3e\n\n        \x3c!-- WIDGET 3 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-in-talk"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="orange-fg font-size-42 line-height-72">\n                        {{ vm.inbound.avgTalkTime || \'00:00:00\' }}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.AVG_TALK_TIME\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 orange-fg secondary-text text-truncate">{{\'DASHBOARDS.AVG_TALK_TIME_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.AVG_TALK_TIME\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 3 --\x3e\n\n        \x3c!-- WIDGET 2 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="ph-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-percent"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="red-fg font-size-42 line-height-72">\n                        {{ vm.inbound.answerRate || 0 }}%\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.INBOUND_ANSWER_RATE\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 red-fg secondary-text text-truncate">{{\'DASHBOARDS.INBOUND_ANSWER_RATE_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.INBOUND_ANSWER_RATE\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 2 --\x3e\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-percent"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-grey-fg font-size-42 line-height-72">\n                        {{ vm.inbound.abandonRate || 0 }}%\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.ABANDON_RATE\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-grey-fg secondary-text text-truncate">{{\'DASHBOARDS.ABANDON_RATE_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.ABANDON_RATE\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-dots"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-green-fg font-size-52 line-height-72">\n                        {{vm.inbound.unmanaged || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.UNMANAGED\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-green-fg secondary-text text-truncate">{{\'DASHBOARDS.UNMANAGED_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.UNMANAGED\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n    </div>\n    \x3c!-- / WIDGET GROUP --\x3e\n</div>\n\x3c!-- / WIDGET INBOUND --\x3e\n\n\x3c!-- WIDGET OUTBOUND --\x3e\n<div class="dashboard-container md-background-bg md-whiteframe-1dp">\n    <div class="pb-16" layout="row" layout-align="start center">\n        <md-icon md-font-icon="icon-phone-outgoing" class="m-0 mr-16"></md-icon>\n        <div class="h2 secondary-text" translate="DASHBOARDS.TODAY_OUTBOUND_STATS">Today Outbound STATS</div>\n    </div>\n    \x3c!-- WIDGET GROUP --\x3e\n    <div class="widget-group" layout="row" flex="100" layout-wrap>\n\n        \x3c!-- WIDGET 1 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="ph-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-outgoing"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="light-blue-fg font-size-52 line-height-72">\n                        {{vm.outbound.total || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.TOTAL\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 light-blue-fg secondary-text text-truncate">{{\'DASHBOARDS.TOTAL_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.TOTAL\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 1 --\x3e\n\n        \x3c!-- WIDGET 2 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="ph-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="red-fg font-size-52 line-height-72">\n                        {{vm.outbound.answered || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.OUTBOUND_ANSWERED\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 red-fg secondary-text text-truncate">{{\'DASHBOARDS.OUTBOUND_ANSWERED_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.OUTBOUND_ANSWERED\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 2 --\x3e\n\n        \x3c!-- WIDGET 3 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-clock"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="orange-fg font-size-42 line-height-72">\n                        {{vm.outbound.sumDuration || 0 | secToTime | date:\'HH:mm:ss\'}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.TOT_DURATION\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 orange-fg secondary-text text-truncate">{{\'DASHBOARDS.TOT_DURATION_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.TOT_DURATION\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 3 --\x3e\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-division"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-grey-fg font-size-42 line-height-72">\n                        {{vm.outbound.total ? ((vm.outbound.sumDuration / vm.outbound.total) | number: 0) : 0 | secToTime | date:\'HH:mm:ss\'}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.AVG_DURATION\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-grey-fg secondary-text text-truncate">{{\'DASHBOARDS.AVG_DURATION_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.AVG_DURATION\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-percent"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-green-fg font-size-42 line-height-72">\n                        {{vm.outbound.total ? (vm.outbound.answered / vm.outbound.total * 100) : 0 | number: 1}}%\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.OUTBOUND_ANSWER_RATE\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-green-fg secondary-text text-truncate">{{\'DASHBOARDS.OUTBOUND_ANSWER_RATE_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.OUTBOUND_ANSWER_RATE\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n    </div>\n    \x3c!-- / WIDGET GROUP --\x3e\n</div>\n\x3c!-- / WIDGET OUTBOUND --\x3e'),e.put("app/main/apps/fax/views/faxAccounts/create/dialog.html",'<md-dialog class="faxAccount-dialog" aria-label="New FaxAccount">\n    <form name="faxAccountForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="FAX.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.faxAccount.name" ng-required="true" autofocus>\n                <div ng-messages="faxAccountForm[\'name\'].$error" ng-show="faxAccountForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.KEY">key</label>\n                <input type="text" name="key" ng-model="vm.faxAccount.key" md-maxlength="5" ng-required="true">\n                <div ng-messages="faxAccountForm[\'key\'].$error" ng-show="faxAccountForm[\'key\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.KEY_REQUIRED">key field is required</span>\n                    </div>\n\n                    <div ng-message="md-maxlength">\n                        <span translate="FAX.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 5}\'>key must have a maximum length equal to 5</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.TRUNK">trunk</label>\n                <md-select name="TrunkId" ng-model="vm.faxAccount.TrunkId" required>\n                    <md-option ng-value="TrunkId.id" ng-repeat="TrunkId in vm.trunks">{{ TrunkId.name }}</md-option>\n                </md-select>\n                <div ng-messages="faxAccountForm[\'TrunkId\'].$error" ng-show="faxAccountForm[\'TrunkId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.TRUNK_REQUIRED">trunk field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.LOCALSTATIONID">localstationid</label>\n                <input type="text" name="localstationid" ng-model="vm.faxAccount.localstationid" ng-required="true">\n                <div class="hint"><span translate="FAX.HELP.LOCALSTATIONID"></span></div>\n                <div ng-messages="faxAccountForm[\'localstationid\'].$error" ng-show="faxAccountForm[\'localstationid\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.LOCALSTATIONID_REQUIRED">localstationid field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.LIST">List</label>\n                <md-select name="ListId" ng-model="vm.faxAccount.ListId" required>\n                    <md-option ng-value="ListId.id" ng-repeat="ListId in vm.lists">{{ ListId.name }}</md-option>\n                </md-select>\n                <div ng-messages="faxAccountForm[\'ListId\'].$error" ng-show="faxAccountForm[\'ListId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.LIST_REQUIRED">List field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.faxAccount.description">\n                <div ng-messages="faxAccountForm[\'description\'].$error" ng-show="faxAccountForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newFaxAccount" ng-click="vm.saveFaxAccount()" class="send-button md-accent md-raised" ng-disabled="faxAccountForm.$invalid || faxAccountForm.$pristine" aria-label="SAVE" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newFaxAccount" ng-click="vm.addNewFaxAccount()" class="send-button md-accent md-raised" ng-disabled="faxAccountForm.$invalid" aria-label="ADD" translate="FAX.ADD_FAXACCOUNT" translate-attr-aria-label="FAX.ADD_FAXACCOUNT">\n                    ADD FAXACCOUNT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newFaxAccount" ng-click="vm.deleteFaxAccount($event)" aria-label="DELETE" translate translate-attr-aria-label="FAX.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="FAX.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxAccounts/edit/apps/agent/dialog.html",'<md-dialog class="faxAccount-dialog" aria-label="New FaxAccount">\n    <form name="faxAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="FAX.AGENT">Agent</label>\n                <md-select name="agent" ng-model="vm.agent.agent" required autofocus>\n                    <md-option ng-value="agent.name" ng-repeat="agent in vm.agents">{{ agent.name }}</md-option>\n                </md-select>\n                <div ng-messages="faxAccountFormApp[\'agent\'].$error" ng-show="faxAccountFormApp[\'agent\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.AGENT_REQUIRED">Agent field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.agent.timeout" min="0" max="2147483" ng-required="true">\n                <div ng-messages="faxAccountFormApp[\'timeout\'].$error" ng-show="faxAccountFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="FAX.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="FAX.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveFaxAccountApp()" class="send-button md-accent md-raised" ng-disabled="faxAccountFormApp.$invalid || faxAccountFormApp.$pristine" aria-label="SAVE" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxAccounts/edit/apps/close/dialog.html",'<md-dialog class="faxAccount-dialog" aria-label="New FaxAccount">\n    <form name="faxAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="FAX.DISPOSITION">Disposition</label>\n                <input type="text" name="disposition" ng-model="vm.close.disposition" ng-required="true" autofocus>\n                <div ng-messages="faxAccountFormApp[\'disposition\'].$error" ng-show="faxAccountFormApp[\'disposition\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.DISPOSITION_REQUIRED">Disposition field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveFaxAccountApp()" class="send-button md-accent md-raised" ng-disabled="faxAccountFormApp.$invalid || faxAccountFormApp.$pristine" aria-label="SAVE" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxAccounts/edit/apps/gotoif/dialog.html",'<md-dialog class="faxAccount-dialog" aria-label="New FaxAccount">\n    <form name="faxAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="FAX.CONDITION">Condition</label>\n                <input type="text" name="condition" ng-model="vm.gotoif.condition" ng-required="true" autofocus>\n                <div ng-messages="faxAccountFormApp[\'condition\'].$error" ng-show="faxAccountFormApp[\'condition\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.CONDITION_REQUIRED">Condition field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.TRUEPRIORITY">truepriority</label>\n                <input type="number" name="truepriority" ng-model="vm.gotoif.truepriority" min="1" ng-required="true">\n                <div ng-messages="faxAccountFormApp[\'truepriority\'].$error" ng-show="faxAccountFormApp[\'truepriority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.TRUEPRIORITY_REQUIRED">truepriority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="FAX.ERRORS.TRUEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">truepriority must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.FALSEPRIORITY">falsepriority</label>\n                <input type="number" name="falsepriority" ng-model="vm.gotoif.falsepriority" min="1" ng-required="true">\n                <div ng-messages="faxAccountFormApp[\'falsepriority\'].$error" ng-show="faxAccountFormApp[\'falsepriority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.FALSEPRIORITY_REQUIRED">falsepriority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="FAX.ERRORS.FALSEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">falsepriority must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveFaxAccountApp()" class="send-button md-accent md-raised" ng-disabled="faxAccountFormApp.$invalid || faxAccountFormApp.$pristine" aria-label="SAVE" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxAccounts/edit/apps/gotop/dialog.html",'<md-dialog class="faxAccount-dialog" aria-label="New FaxAccount">\n    <form name="faxAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="FAX.PRIORITY">Priority</label>\n                <input type="number" name="priority" ng-model="vm.gotop.priority" min="0" ng-required="true" autofocus>\n                <div ng-messages="faxAccountFormApp[\'priority\'].$error" ng-show="faxAccountFormApp[\'priority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.PRIORITY_REQUIRED">Priority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="FAX.ERRORS.PRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Priority must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveFaxAccountApp()" class="send-button md-accent md-raised" ng-disabled="faxAccountFormApp.$invalid || faxAccountFormApp.$pristine" aria-label="SAVE" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxAccounts/edit/apps/interval/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select ng-model="vm.type">\n                    <md-option ng-value="type" ng-repeat=\'type in vm.types\'>{{ type | ucfirst }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.type === \'list\'">\n                <label translate="TOOLS.INTERVALS">Intervals</label>\n                <md-select ng-model="vm.interval.IntervalId">\n                    <md-option ng-value="interval.id" ng-repeat="interval in vm.intervals.rows">{{ interval.name }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            \x3c!-- TIMERANGE START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.TIME_RANGE">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <div class="md-block" flex>\n                    <mdp-time-picker name="timeRangeFrom" mdp-placeholder="FROM" ng-model="vm.timeRangeFrom" mdp-format="HH:mm" mdp-auto-switch="true">\n                        <div ng-messages="intervalForm.timeRangeFrom.$error" ng-show="intervalForm.timeRangeFrom.$touched" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_FROM_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n                <div class="md-block" flex ng-if="vm.timeRangeFrom">\n                    <mdp-time-picker name="timeRangeTo" mdp-placeholder="TO*" ng-model="vm.timeRangeTo" mdp-format="HH:mm" mdp-auto-switch="true" required>\n                        <div ng-messages="intervalForm.timeRangeTo.$error" ng-show="intervalForm.timeRangeTo.$invalid" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_INVALID">Time Range To field is invalid</span>\n                            </div>\n                            <div ng-message="required">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_REQUIRED">Time Range To field is required</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n            \x3c!-- TIMERANGE END --\x3e\n\n            \x3c!-- DAYSOFWEEK START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.WEEK_DAYS">Week Days</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.dayOfWeekFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex class="md-block" ng-if="vm.dayOfWeekFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="dayOfWeekTo" ng-model="vm.dayOfWeekTo">\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.dayOfWeekTo.$error" ng-show="intervalForm.dayOfWeekTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- DAYSOFWEEK END --\x3e\n\n            \x3c!-- MONTHDAY START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTH_DAYS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthDayFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthDayFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthDayTo" ng-model="vm.monthDayTo">\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthDayTo.$error" ng-show="intervalForm.monthDayTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTHDAY END --\x3e\n\n            \x3c!-- MONTH START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTHS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthTo" ng-model="vm.monthTo">\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthTo.$error" ng-show="intervalForm.monthTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTH END --\x3e\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxAccounts/edit/apps/noop/dialog.html",'<md-dialog class="faxAccount-dialog" aria-label="New FaxAccount">\n    <form name="faxAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="FAX.VALUE">Value</label>\n                <input type="text" name="value" ng-model="vm.noop.value" autofocus>\n                <div ng-messages="faxAccountFormApp[\'value\'].$error" ng-show="faxAccountFormApp[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveFaxAccountApp()" class="send-button md-accent md-raised" ng-disabled="faxAccountFormApp.$invalid || faxAccountFormApp.$pristine" aria-label="SAVE" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxAccounts/edit/apps/queue/dialog.html",'<md-dialog class="faxAccount-dialog" aria-label="New FaxAccount">\n    <form name="faxAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="FAX.QUEUE">Queue</label>\n                <md-select name="queue" ng-model="vm.queue.queue" required autofocus>\n                    <md-option ng-value="queue.name" ng-repeat="queue in vm.queues">{{ queue.name }}</md-option>\n                </md-select>\n                <div ng-messages="faxAccountFormApp[\'queue\'].$error" ng-show="faxAccountFormApp[\'queue\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.QUEUE_REQUIRED">Queue field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.queue.timeout" min="0" max="2147483" ng-required="true">\n                <div ng-messages="faxAccountFormApp[\'timeout\'].$error" ng-show="faxAccountFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="FAX.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="FAX.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveFaxAccountApp()" class="send-button md-accent md-raised" ng-disabled="faxAccountFormApp.$invalid || faxAccountFormApp.$pristine" aria-label="SAVE" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxAccounts/edit/apps/system/dialog.html",'<md-dialog class="faxAccount-dialog" aria-label="New FaxAccount">\n    <form name="faxAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="FAX.COMMAND">Command</label>\n                <input type="text" name="command" ng-model="vm.system.command" ng-required="true" autofocus>\n                <div ng-messages="faxAccountFormApp[\'command\'].$error" ng-show="faxAccountFormApp[\'command\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.COMMAND_REQUIRED">Command field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.VARIABLE">Variable</label>\n                <md-select name="variable" ng-model="vm.system.variable">\n                    <md-option ng-value="variable.name" ng-repeat="variable in vm.variables">{{ variable.name }}</md-option>\n                    <md-option ng-value="\'\'">None</md-option>\n                </md-select>\n                <div ng-messages="faxAccountFormApp[\'variable\'].$error" ng-show="faxAccountFormApp[\'variable\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.VARIABLE_REQUIRED">Variable field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveFaxAccountApp()" class="send-button md-accent md-raised" ng-disabled="faxAccountFormApp.$invalid || faxAccountFormApp.$pristine" aria-label="SAVE" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxAccounts/edit/faxDispositions/dialog.html",'<md-dialog class="faxDisposition-dialog" aria-label="New FaxDisposition">\n    <form name="faxDispositionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="FAX.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.faxDisposition.name" ng-required="true" autofocus>\n                <div ng-messages="faxDispositionForm[\'name\'].$error" ng-show="faxDispositionForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newFaxDisposition" ng-click="vm.saveFaxDisposition()" class="send-button md-accent md-raised" ng-disabled="faxDispositionForm.$invalid || faxDispositionForm.$pristine" aria-label="SAVE" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newFaxDisposition" ng-click="vm.addNewFaxDisposition()" class="send-button md-accent md-raised" ng-disabled="faxDispositionForm.$invalid" aria-label="ADD" translate="FAX.ADD_FAXDISPOSITION" translate-attr-aria-label="FAX.ADD_FAXDISPOSITION">\n                    ADD FAXDISPOSITION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newFaxDisposition" ng-click="vm.deleteFaxDisposition($event)" aria-label="DELETE" translate translate-attr-aria-label="FAX.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="FAX.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxAccounts/edit/view.html",'<div id="fax-faxAccount" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-faxAccounts-button md-icon-button" aria-label="Go to faxAccounts" ng-click="vm.gotoFaxAccounts()" translate translate-attr-aria-label="FAX.GO_TO_FAXACCOUNTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="faxAccount-image" hide-xs>\n                    <img ng-src="assets/images/business/faxAccounts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.faxAccount.id}}\n                        <span ng-if="vm.faxAccount.name">{{vm.faxAccount.name}}</span>\n                        <span ng-if="vm.faxAccount.exten">{{vm.faxAccount.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="FAX.CREATED_AT"></span> <span>{{vm.faxAccount.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.gotogoto(vm.faxAccount, $event)" class="md-fab md-warn md-icon-button" aria-label="goto">\n                <md-tooltip><span translate="FAX.GOTO_FAXACCOUNT"></span></md-tooltip>\n                <md-icon md-font-icon="icon-cast"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveFaxAccount()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (notificationForm.$invalid) || (advancedForm.$invalid) || (faxDispositionsForm.$invalid) || (actionsForm.$invalid) || (interactionsForm.$invalid)"\n                translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="FAX.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="faxAccount-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="FAX.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.faxAccount.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.KEY">key</label>\n                                <input type="text" name="key" ng-model="vm.faxAccount.key" md-maxlength="5" ng-required="true">\n                                <div ng-messages="generalForm[\'key\'].$error" ng-show="generalForm[\'key\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.KEY_REQUIRED">key field is required</span>\n                                    </div>\n\n                                    <div ng-message="md-maxlength">\n                                        <span translate="FAX.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 5}\'>key must have a maximum length equal to 5</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.HEADERINFO">headerinfo</label>\n                                <input type="text" name="headerinfo" ng-model="vm.faxAccount.headerinfo" ng-required="true">\n                                <div class="hint"><span translate="FAX.HELP.HEADERINFO"></span></div>\n                                <div ng-messages="generalForm[\'headerinfo\'].$error" ng-show="generalForm[\'headerinfo\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.HEADERINFO_REQUIRED">headerinfo field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.TRUNK">trunk</label>\n                                <md-select name="TrunkId" ng-model="vm.faxAccount.TrunkId" required>\n                                    <md-option ng-value="TrunkId.id" ng-repeat="TrunkId in vm.trunks">{{ TrunkId.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'TrunkId\'].$error" ng-show="generalForm[\'TrunkId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.TRUNK_REQUIRED">trunk field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.LOCALSTATIONID">localstationid</label>\n                                <input type="text" name="localstationid" ng-model="vm.faxAccount.localstationid" ng-required="true">\n                                <div class="hint"><span translate="FAX.HELP.LOCALSTATIONID"></span></div>\n                                <div ng-messages="generalForm[\'localstationid\'].$error" ng-show="generalForm[\'localstationid\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.LOCALSTATIONID_REQUIRED">localstationid field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.LIST">List</label>\n                                <md-select name="ListId" ng-model="vm.faxAccount.ListId" required>\n                                    <md-option ng-value="ListId.id" ng-repeat="ListId in vm.lists">{{ ListId.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'ListId\'].$error" ng-show="generalForm[\'ListId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.LIST_REQUIRED">List field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.WAITFORTHEASSIGNEDAGENT">WaitForTheAssignedAgent</label>\n                                <input type="number" name="waitForTheAssignedAgent" ng-model="vm.faxAccount.waitForTheAssignedAgent" min="1" max="2147483" ng-required="true">\n                                <div ng-messages="generalForm[\'waitForTheAssignedAgent\'].$error" ng-show="generalForm[\'waitForTheAssignedAgent\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.WAITFORTHEASSIGNEDAGENT_REQUIRED">WaitForTheAssignedAgent field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="FAX.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">WaitForTheAssignedAgent must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="FAX.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_LESS_THAN_OR_EQUAL_TO">WaitForTheAssignedAgent must be a valid greater or equal than</span> <span>2147483</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.faxAccount.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="faxAccount-detail-form-container notification md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="FAX.NOTIFICATION">NOTIFICATION</div>\n                        </div>\n                        <form name="notificationForm" novalidate>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.faxAccount.notificationSound" aria-label="notificationSound"><span translate="FAX.NOTIFICATIONSOUND">notificationSound</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.faxAccount.notificationShake" aria-label="notificationShake"><span translate="FAX.NOTIFICATIONSHAKE">notificationShake</span></md-switch>\n                            </md-input-container>\n                            <div class="md-block">\n                                <label class="md-caption grey-fg" translate="FAX.NOTIFICATIONTEMPLATE">notificationTemplate</label>\n                                <textarea aria-label="notificationTemplate notificationTemplate" ckeditor="{ skin: \'office2013\', language: \'en\', allowedContent: true, extraPlugins: \'font,colorbutton,autoembed,autocorrect,googlethisterm,pastebase64\', toolbarGroups: [{ name: \'styles\', groups: [\'styles\'] }, { name: \'clipboard\', groups: [\'undo\'] }, { name: \'colors\', groups: [\'colors\'] }, { name: \'basicstyles\', groups: [\'basicstyles\'] }, { name: \'paragraph\', groups: [\'list\', \'indent\', \'align\'] }, { name: \'mode\' }], autocorrect_enabled: true, disableNativeSpellChecker: false, removePlugins: \'magicline\' }"\n                                    ng-model="vm.faxAccount.notificationTemplate"></textarea>\n                            </div>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="FAX.ADVANCED">ADVANCED</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="faxAccount-detail-form-container advanced md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="FAX.ADVANCED">ADVANCED</div>\n                        </div>\n                        <form name="advancedForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.ECM">ECM</label>\n                                <md-select name="ecm" ng-model="vm.faxAccount.ecm" required autofocus>\n                                    <md-option ng-value="\'yes\'">yes</md-option>\n                                    <md-option ng-value="\'no\'">no</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="FAX.HELP.ECM"></span></div>\n                                <div ng-messages="advancedForm[\'ecm\'].$error" ng-show="advancedForm[\'ecm\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.ECM_REQUIRED">ECM field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.MINRATE">minrate</label>\n                                <md-select name="minrate" ng-model="vm.faxAccount.minrate" required>\n                                    <md-option ng-value="\'2400\'">2400</md-option>\n                                    <md-option ng-value="\'4800\'">4800</md-option>\n                                    <md-option ng-value="\'7200\'">7200</md-option>\n                                    <md-option ng-value="\'9600\'">9600</md-option>\n                                    <md-option ng-value="\'12000\'">12000</md-option>\n                                    <md-option ng-value="\'14400\'">14400</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="FAX.HELP.MINRATE"></span></div>\n                                <div ng-messages="advancedForm[\'minrate\'].$error" ng-show="advancedForm[\'minrate\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.MINRATE_REQUIRED">minrate field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.MAXRATE">maxrate</label>\n                                <md-select name="maxrate" ng-model="vm.faxAccount.maxrate" required>\n                                    <md-option ng-value="\'2400\'">2400</md-option>\n                                    <md-option ng-value="\'4800\'">4800</md-option>\n                                    <md-option ng-value="\'7200\'">7200</md-option>\n                                    <md-option ng-value="\'9600\'">9600</md-option>\n                                    <md-option ng-value="\'12000\'">12000</md-option>\n                                    <md-option ng-value="\'14400\'">14400</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="FAX.HELP.MAXRATE"></span></div>\n                                <div ng-messages="advancedForm[\'maxrate\'].$error" ng-show="advancedForm[\'maxrate\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.MAXRATE_REQUIRED">maxrate field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.MODEM">modem</label>\n                                <input type="text" name="modem" ng-model="vm.faxAccount.modem" ng-required="true">\n                                <div class="hint"><span translate="FAX.HELP.MODEM"></span></div>\n                                <div ng-messages="advancedForm[\'modem\'].$error" ng-show="advancedForm[\'modem\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.MODEM_REQUIRED">modem field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.GATEWAY">gateway</label>\n                                <input type="text" name="gateway" ng-model="vm.faxAccount.gateway" ng-required="true">\n                                <div class="hint"><span translate="FAX.HELP.GATEWAY"></span></div>\n                                <div ng-messages="advancedForm[\'gateway\'].$error" ng-show="advancedForm[\'gateway\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.GATEWAY_REQUIRED">gateway field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.FAXDETECT">faxdetect</label>\n                                <input type="text" name="faxdetect" ng-model="vm.faxAccount.faxdetect" ng-required="true">\n                                <div class="hint"><span translate="FAX.HELP.FAXDETECT"></span></div>\n                                <div ng-messages="advancedForm[\'faxdetect\'].$error" ng-show="advancedForm[\'faxdetect\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.FAXDETECT_REQUIRED">faxdetect field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.T38TIMEOUT">t38timeout</label>\n                                <input type="number" name="t38timeout" ng-model="vm.faxAccount.t38timeout" ng-required="true">\n                                <div class="hint"><span translate="FAX.HELP.T38TIMEOUT"></span></div>\n                                <div ng-messages="advancedForm[\'t38timeout\'].$error" ng-show="advancedForm[\'t38timeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.T38TIMEOUT_REQUIRED">t38timeout field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.SIP">SIP</label>\n                                <md-select name="tech" ng-model="vm.faxAccount.tech" required>\n                                    <md-option ng-value="\'SIP\'">SIP</md-option>\n                                    <md-option ng-value="\'IAX\'">IAX</md-option>\n                                    <md-option ng-value="\'DADHI\'">DADHI</md-option>\n                                    <md-option ng-value="\'KHOMP\'">KHOMP</md-option>\n                                </md-select>\n                                <div ng-messages="advancedForm[\'tech\'].$error" ng-show="advancedForm[\'tech\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.SIP_REQUIRED">SIP field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="FAX.DISPOSITIONS">DISPOSITIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="faxAccount-detail-form-container faxdispositions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="FaxAccountFaxDispositionsController as vm_dc" ng-init="vm_dc.init(vm.faxAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedFaxAccountFaxDispositions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="FAX.FAXDISPOSITIONS">FaxDispositions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditFaxAccountFaxDisposition($event)" aria-label="add faxDisposition" translate translate-attr-label="FAX.ADD_FAXDISPOSITION">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedFaxAccountFaxDispositions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedFaxAccountFaxDispositions.length}} {{vm_dc.selectedFaxAccountFaxDispositions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedFaxAccountFaxDispositions" csv-label="true" filename="faxAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedFaxAccountFaxDispositions($event)" aria-label="delete selected" translate translate-attr-label="FAXACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedFaxAccountFaxDispositions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getFaxAccountFaxDispositions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'FAX.ID\' | translate }}</th>\n                                            <th md-column md-order-by="name">{{ \'FAX.NAME\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'FAX.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="faxDisposition" md-select-id="id" ng-repeat="faxDisposition in vm_dc.faxAccountFaxDispositions.rows">\n                                            <td ng-click="vm_dc.createOrEditFaxAccountFaxDisposition($event, faxDisposition)" md-cell>{{faxDisposition.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditFaxAccountFaxDisposition($event, faxDisposition)" md-cell>{{faxDisposition.name}}</td>\n                                            <td ng-click="vm_dc.createOrEditFaxAccountFaxDisposition($event, faxDisposition)" md-cell>{{faxDisposition.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="FAX.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditFaxAccountFaxDisposition($event, faxDisposition)" translate="FAX.EDIT_FAXDISPOSITION">\n                                                                Edit FaxDisposition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(faxDisposition, $event)" translate="FAX.DELETE_FAXDISPOSITION">\n                                                                Delete FaxDisposition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.faxAccountFaxDispositions.rows.length">\n                                            <td md-cell colspan="5">\n                                                <span class="text-boxed-ligth" translate="FAX.NO_FAXDISPOSITION_AVAILABLE">No faxdisposition available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'FAX.PAGE\' | translate}}:\', rowsPerPage: \'{{\'FAX.ROWSPERPAGE\' | translate}}:\', of: \'{{\'FAX.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.faxAccountFaxDispositions.count}}" md-on-paginate="vm_dc.getFaxAccountFaxDispositions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="FAX.ACTIONS">ACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="faxAccount-detail-form-container actions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="FaxAccountActionsController as vm_ac" ng-init="vm_ac.init(vm.faxAccount)" class="content" md-background-bg layout="row" layout-align="start start">\n                            \x3c!-- SIDENAV --\x3e\n                            <div class="navigation-simple sidenav main-sidenav md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="20">\n                                \x3c!-- SIDENAV CONTENT --\x3e\n                                <md-list class="no-padding">\n                                    <md-subheader class="md-no-sticky">\n                                        <span translate="VOICE.APPLICATIONS_LIST">\n          Applications List\n        </span>\n                                    </md-subheader>\n                                </md-list>\n                                <md-divider></md-divider>\n                                <md-list ng-sortable="vm_ac.list">\n                                    <md-list-item class="handle" ng-repeat="a in vm_ac.apps">\n                                        <md-icon md-font-icon="{{a.icon}}" class="s16"></md-icon>\n                                        <p class="text-truncate" translate="FAX.{{(a.alias || a.appType) | uppercase}}">{{a.alias || a.appType}}</p>\n                                    </md-list-item>\n                                </md-list>\n                                \x3c!-- / SIDENAV CONTENT --\x3e\n                            </div>\n                            \x3c!-- / SIDENAV --\x3e\n                            <div flex></div>\n                            \x3c!-- MAIN --\x3e\n                            <div class="main scrollable md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="75">\n                                <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_ac.selectedFaxAccountApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">Drag & Drop Routing</span>\n                                        <div flex></div>\n                                        <ms-search-bar on-search="vm_ac.query.filter = query" on-collapse="vm_ac.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    </div>\n                                </md-toolbar>\n                                <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_ac.selectedFaxAccountApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">{{vm_ac.selectedFaxAccountApps.length}} {{vm_ac.selectedFaxAccountApps.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                        <div flex></div>\n                                        <md-button ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_ac.deleteSelectedFaxAccountApps($event)" aria-label="delete selected" translate translate-attr-label="FAX.DELETE_SELECTED">\n                                            <md-icon md-font-icon="icon-delete"></md-icon>\n                                        </md-button>\n                                    </div>\n                                </md-toolbar>\n\n                                \x3c!-- QUEUES TABLE --\x3e\n                                <md-table-container>\n                                    <table md-table md-row-select multiple ng-model="vm_ac.selectedFaxAccountApps">\n                                        <thead md-head>\n                                            <tr md-row>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px">\n                                                    <span translate="VOICE.PRIORITY">Priority</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Type</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Appdata</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Interval</span>\n                                                </th>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px"></th>\n                                            </tr>\n                                        </thead>\n                                        <tbody md-body ng-sortable="vm_ac.applications">\n                                            <tr md-row md-select="app" md-select-id="id" ng-repeat="app in vm_ac.faxAccountApps.rows | filter: vm_ac.query.filter">\n                                                <td md-cell>\n                                                    <md-icon md-font-icon="icon-drag-vertical" class="s16 handle"></md-icon>\n                                                </td>\n                                                <td md-cell ng-click="vm_ac.editFaxAccountApp($event, $index)"><span>{{app.priority}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editFaxAccountApp($event, $index)">{{app.app.toLowerCase() === \'agi\' ? \'Cally-Square\' : app.app | ucfirst}}<span ng-if="app.appType.toLowerCase() === \'custom\'">*</span></td>\n                                                <td md-cell ng-click="vm_ac.editFaxAccountApp($event, $index)"><span class="text-truncate" style="width:200px">{{app.appdata}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editInterval($event, $index)">{{app.IntervalId ? \'From List\' : app.interval}}</td>\n                                                <td md-cell>\n                                                    <md-button ng-click="vm_ac.editInterval($event, $index)" class="md-icon-button" aria-label="Interval">\n                                                        <md-icon md-font-icon="icon-timer"></md-icon>\n                                                        <md-tooltip>\n                                                            {{app.IntervalId ? \'From List\' : (app.interval === \'*,*,*,*\' ? \'Always\' : \'Custom\')}}\n                                                        </md-tooltip>\n                                                    </md-button>\n                                                </td>\n                                                <td md-cell class="actions">\n                                                    <md-menu>\n                                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                        </md-button>\n\n                                                        <md-menu-content width="3">\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editFaxAccountApp($event, $index)" translate="VOICE.EDIT_APP">\n                                                                    Edit App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editInterval($event, $index)" translate="VOICE.EDIT_INTERVAL">\n                                                                    Edit Interval\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'">\n                                                                <md-button ng-click="vm_ac.deleteConfirm(app, $index, $event)" translate="VOICE.DELETE_APP">\n                                                                    Delete App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                        </md-menu-content>\n                                                    </md-menu>\n                                                </td>\n                                            </tr>\n                                            <tr md-row ng-hide="vm_ac.faxAccountApps.rows.length">\n                                                <td md-cell colspan="7">\n                                                    <span class="text-boxed-ligth" translate="VOICE.NO_APPS_AVAILABLE">No apps available</span>\n                                                </td>\n                                            </tr>\n                                        </tbody>\n                                    </table>\n                                </md-table-container>\n                                \x3c!-- / QUEUES TABLE --\x3e\n\n                                \x3c!-- NO RESULTS --\x3e\n\n                                \x3c!-- / NO RESULTS --\x3e\n                            </div>\n                            \x3c!-- / MAIN --\x3e\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="FAX.INTERACTIONS">INTERACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="faxAccount-detail-form-container interactions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="FaxAccountInteractionsController as vm_dc" ng-init="vm_dc.init(vm.faxAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedFaxAccountInteractions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="FAX.INTERACTIONS">Interactions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.getFaxAccountInteractions()" aria-label="refresh Interactions" translate translate-attr-label="FAX.REFRESH_INTERACTIONS">\n                                        <md-icon md-font-icon="icon-refresh"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedFaxAccountInteractions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedFaxAccountInteractions.length}} {{vm_dc.selectedFaxAccountInteractions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedFaxAccountInteractions" csv-label="true" filename="faxAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedFaxAccountInteractions($event)" aria-label="delete selected" translate translate-attr-label="FAXACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedFaxAccountInteractions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getFaxAccountInteractions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'FAX.ID\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'FAX.STARTEDAT\' | translate }}</th>\n                                            <th md-column>{{ \'FAX.CONTACT\' | translate }}</th>\n                                            <th md-column>{{ \'FAX.AGENT\' | translate }}</th>\n                                            <th md-column md-order-by="closedAt">{{ \'FAX.CLOSEDAT\' | translate }}</th>\n                                            <th md-column md-order-by="disposition">{{ \'FAX.DISPOSITION\' | translate }}</th>\n                                            <th md-column md-order-by="note">{{ \'FAX.NOTES\' | translate }}</th>\n                                            <th md-column md-order-by="tag">{{ \'FAX.TAGS\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="interaction" md-select-id="id" ng-repeat="interaction in vm_dc.faxAccountInteractions.rows">\n                                            <td md-cell>{{interaction.id}}</td>\n                                            <td md-cell>{{interaction.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell>{{interaction.Contact.firstName}}</td>\n                                            <td md-cell>{{interaction.Owner.name}}</td>\n                                            <td md-cell>{{interaction.closedAt | date:\'medium\'}}</td>\n                                            <td md-cell>{{interaction.disposition}}</td>\n                                            <td md-cell>{{interaction.note}}</td>\n                                            <td md-cell>\n                                                <div ng-if="interaction.Tags.length">\n                                                    <md-tooltip md-direction="left" layout="row">\n                                                        <span ng-repeat="tag in interaction.Tags">{{tag.name}}<span ng-if="!$last">, </span></span>\n                                                    </md-tooltip>\n                                                    <md-icon md-font-icon="icon-tag"></md-icon>\n                                                </div>\n                                            </td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="FAX.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.spyfaxInteraction($event, interaction)" translate="FAX.SPYINTERACTION">\n                                                                Spy Interaction\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(interaction, $event)" translate="FAX.DELETE_INTERACTION">\n                                                                Delete Interaction\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.faxAccountInteractions.rows.length">\n                                            <td md-cell colspan="13">\n                                                <span class="text-boxed-ligth" translate="FAX.NO_INTERACTION_AVAILABLE">No interaction available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'FAX.PAGE\' | translate}}:\', rowsPerPage: \'{{\'FAX.ROWSPERPAGE\' | translate}}:\', of: \'{{\'FAX.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.faxAccountInteractions.count}}" md-on-paginate="vm_dc.getFaxAccountInteractions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/fax/views/faxAccounts/faxAccounts.html",'<div id="faxAccounts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-deskphone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="FAX.FAXACCOUNTS">FaxAccounts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="FAX.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedFaxAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedFaxAccounts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="FAX.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-faxAccounts-count">\n                    <span>{{vm.selectedFaxAccounts.length}}</span>\n                <span translate="FAX.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="FAXACCOUNTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllFaxAccounts()" translate="FAX.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectFaxAccounts()" translate="FAX.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedFaxAccounts" csv-label="true" filename="faxAccounts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedFaxAccounts($event)" aria-label="delete selected" translate translate-attr-label="FAXACCOUNTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- FAXACCOUNT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedFaxAccounts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getFaxAccounts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'FAX.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'FAX.NAME\' | translate }}</th>\n                                <th md-column md-order-by="key">{{ \'FAX.KEY\' | translate }}</th>\n                                <th md-column md-order-by="TrunkId">{{ \'FAX.TRUNK\' | translate }}</th>\n                                <th md-column md-order-by="localstationid">{{ \'FAX.LOCALSTATIONID\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'FAX.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.faxAccounts.rows.length">\n                                <td md-cell colspan="7">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="FAX.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="faxAccount" md-select-id="id" ng-repeat="faxAccount in vm.faxAccounts.rows">\n                                <td md-cell ng-if="faxAccount.userpic"><img class="avatar" alt="{{faxAccount.name}}" ng-src="api/users/{{faxAccount.id}}/avatar" /></td>\n                                <td md-cell ng-if="!faxAccount.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{faxAccount.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditFaxAccount($event, faxAccount)" md-cell class="id ">{{faxAccount.id}}</td>\n                                <td ng-click="vm.createOrEditFaxAccount($event, faxAccount)" md-cell class="name ">{{faxAccount.name}}</td>\n                                <td ng-click="vm.createOrEditFaxAccount($event, faxAccount)" md-cell class="key ">{{faxAccount.key}}</td>\n                                <td ng-click="vm.createOrEditFaxAccount($event, faxAccount)" md-cell class="TrunkId ">{{ TrunkId = vm.trunks[faxAccount.TrunkId]; TrunkId.name }}</td>\n                                <td ng-click="vm.createOrEditFaxAccount($event, faxAccount)" md-cell class="localstationid ">{{faxAccount.localstationid}}</td>\n                                <td ng-click="vm.createOrEditFaxAccount($event, faxAccount)" md-cell class="description ">{{faxAccount.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="FAX.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(faxAccount, $event)" translate="FAX.EDIT_FAXACCOUNT">\n                                                    Edit FaxAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.interactionsgoto(faxAccount, $event)" translate="FAX.INTERACTIONS_FAXACCOUNT">\n                                                    Interactions FaxAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(faxAccount, $event)" translate="FAX.GOTOREALTIME_FAXACCOUNT">\n                                                    goToRealtime FaxAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(faxAccount, $event)" translate="FAX.DELETE_FAXACCOUNT">\n                                                    Delete FaxAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'FAX.PAGE\' | translate}}:\', rowsPerPage: \'{{\'FAX.ROWSPERPAGE\' | translate}}:\', of: \'{{\'FAX.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.faxAccounts.count}}"\n                    md-on-paginate="vm.getFaxAccounts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / FAXACCOUNT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD FAXACCOUNT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-faxAccount-button" ng-click="vm.createOrEditFaxAccount($event)" aria-label="add faxAccount" translate translate-attr-aria-label="FAX.ADD_FAXACCOUNT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD FAXACCOUNT BUTTON --\x3e\n</div>'),e.put("app/main/apps/fax/views/faxQueues/create/dialog.html",'<md-dialog class="faxQueue-dialog" aria-label="New FaxQueue">\n    <form name="faxQueueForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="FAX.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.faxQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newFaxQueue">\n                <div class="hint"><span translate="FAX.HELP.NAME"></span></div>\n                <div ng-messages="faxQueueForm[\'name\'].$error" ng-show="faxQueueForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="FAX.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.STRATEGY">Strategy</label>\n                <md-select name="strategy" ng-model="vm.faxQueue.strategy" required>\n                    <md-option ng-value="\'beepall\'">Beepall</md-option>\n                    <md-option ng-value="\'rrmemory\'">RR Memory</md-option>\n                </md-select>\n                <div ng-messages="faxQueueForm[\'strategy\'].$error" ng-show="faxQueueForm[\'strategy\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.AGENT_TIMEOUT">Agent_Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.faxQueue.timeout" min="1" max="2147483" ng-required="true">\n                <div ng-messages="faxQueueForm[\'timeout\'].$error" ng-show="faxQueueForm[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.AGENT_TIMEOUT_REQUIRED">Agent_Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="FAX.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="FAX.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.faxQueue.description">\n                <div ng-messages="faxQueueForm[\'description\'].$error" ng-show="faxQueueForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newFaxQueue" ng-click="vm.saveFaxQueue()" class="send-button md-accent md-raised" ng-disabled="faxQueueForm.$invalid || faxQueueForm.$pristine" aria-label="SAVE" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newFaxQueue" ng-click="vm.addNewFaxQueue()" class="send-button md-accent md-raised" ng-disabled="faxQueueForm.$invalid" aria-label="ADD" translate="FAX.ADD_FAXQUEUE" translate-attr-aria-label="FAX.ADD_FAXQUEUE">\n                    ADD FAXQUEUE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newFaxQueue" ng-click="vm.deleteFaxQueue($event)" aria-label="DELETE" translate translate-attr-aria-label="FAX.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="FAX.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxQueues/edit/agentadd/agentadd.html",'<md-dialog class="faxQueue-dialog" aria-label="faxQueue">\n    <form name="faxQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="FAX.AGENTADD_FAXQUEUE">Add Agent to faxQueue</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxQueues/edit/teamadd/teamadd.html",'<md-dialog class="faxQueue-dialog" aria-label="faxQueue">\n    <form name="faxQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="FAX.TEAMADD_FAXQUEUE">Add Team in FAXQUEUE</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxQueues/edit/view.html",'<div id="fax-faxQueue" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-faxQueues-button md-icon-button" aria-label="Go to faxQueues" ng-click="vm.gotoFaxQueues()" translate translate-attr-aria-label="FAX.GO_TO_FAXQUEUES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="faxQueue-image" hide-xs>\n                    <img ng-src="assets/images/business/faxQueues.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.faxQueue.id}}\n                        <span ng-if="vm.faxQueue.name">{{vm.faxQueue.name}}</span>\n                        <span ng-if="vm.faxQueue.exten">{{vm.faxQueue.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="FAX.CREATED_AT"></span> <span>{{vm.faxQueue.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.teamadddialog(vm.faxQueue, $event)" class="md-fab md-orange-500-bg md-icon-button" aria-label="teamadd">\n                <md-tooltip><span translate="FAX.TEAMADD_FAXQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-multiple-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.agentadddialog(vm.faxQueue, $event)" class="md-fab md-purple-500-bg md-icon-button" aria-label="agentadd">\n                <md-tooltip><span translate="FAX.AGENTADD_FAXQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-plus"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveFaxQueue()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid)" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="FAX.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="faxQueue-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="FAX.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.faxQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="FAX.HELP.NAME"></span></div>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="FAX.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.STRATEGY">Strategy</label>\n                                <md-select name="strategy" ng-model="vm.faxQueue.strategy" required>\n                                    <md-option ng-value="\'beepall\'">Beepall</md-option>\n                                    <md-option ng-value="\'rrmemory\'">RR Memory</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'strategy\'].$error" ng-show="generalForm[\'strategy\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.AGENT_TIMEOUT">Agent_Timeout</label>\n                                <input type="number" name="timeout" ng-model="vm.faxQueue.timeout" min="1" max="2147483" ng-required="true">\n                                <div ng-messages="generalForm[\'timeout\'].$error" ng-show="generalForm[\'timeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.AGENT_TIMEOUT_REQUIRED">Agent_Timeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="FAX.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="FAX.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.faxQueue.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/fax/views/faxQueues/faxQueues.html",'<div id="faxQueues" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-deskphone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="FAX.FAXQUEUES">FaxQueues</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="FAX.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedFaxQueues.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedFaxQueues =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="FAX.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-faxQueues-count">\n                    <span>{{vm.selectedFaxQueues.length}}</span>\n                <span translate="FAX.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="FAXQUEUES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllFaxQueues()" translate="FAX.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectFaxQueues()" translate="FAX.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedFaxQueues" csv-label="true" filename="faxQueues.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedFaxQueues($event)" aria-label="delete selected" translate translate-attr-label="FAXQUEUES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- FAXQUEUE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedFaxQueues" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getFaxQueues">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'FAX.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'FAX.NAME\' | translate }}</th>\n                                <th md-column md-order-by="strategy">{{ \'FAX.STRATEGY\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.faxQueues.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="FAX.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="faxQueue" md-select-id="id" ng-repeat="faxQueue in vm.faxQueues.rows">\n                                <td md-cell ng-if="faxQueue.userpic"><img class="avatar" alt="{{faxQueue.name}}" ng-src="api/users/{{faxQueue.id}}/avatar" /></td>\n                                <td md-cell ng-if="!faxQueue.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{faxQueue.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditFaxQueue($event, faxQueue)" md-cell class="id ">{{faxQueue.id}}</td>\n                                <td ng-click="vm.createOrEditFaxQueue($event, faxQueue)" md-cell class="name ">{{faxQueue.name}}</td>\n                                <td ng-click="vm.createOrEditFaxQueue($event, faxQueue)" md-cell class="strategy ">{{ vm.arraystrategy[faxQueue.strategy].option }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="FAX.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(faxQueue, $event)" translate="FAX.EDIT_FAXQUEUE">\n                                                    Edit FaxQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.teamadddialog(faxQueue, $event)" translate="FAX.TEAMADD_FAXQUEUE">\n                                                    teamadd FaxQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.agentadddialog(faxQueue, $event)" translate="FAX.AGENTADD_FAXQUEUE">\n                                                    agentadd FaxQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(faxQueue, $event)" translate="FAX.DELETE_FAXQUEUE">\n                                                    Delete FaxQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(faxQueue, $event)" translate="FAX.GOTOREALTIME_FAXQUEUE">\n                                                    goToRealtime FaxQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'FAX.PAGE\' | translate}}:\', rowsPerPage: \'{{\'FAX.ROWSPERPAGE\' | translate}}:\', of: \'{{\'FAX.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.faxQueues.count}}"\n                    md-on-paginate="vm.getFaxQueues" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / FAXQUEUE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD FAXQUEUE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-faxQueue-button" ng-click="vm.createOrEditFaxQueue($event)" aria-label="add faxQueue" translate translate-attr-aria-label="FAX.ADD_FAXQUEUE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD FAXQUEUE BUTTON --\x3e\n</div>'),e.put("app/main/apps/fax/views/realtime/accounts/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="FAX.ACCOUNTS">Accounts</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- AGENT TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getFaxAccounts">\n            <tr md-row>\n                <th md-column md-order-by="name">{{ \'FAX.NAME\' | translate }}</th>\n                <th md-column>{{ \'FAX.KEY\' | translate }}</th>\n                <th md-column>{{ \'FAX.TOTAL\' | translate }}</th>\n                <th md-column>{{ \'FAX.IN\' | translate }}</th>\n                <th md-column>{{ \'FAX.OUT\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.faxAccounts">\n                <td md-cell colspan="4">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="FAX.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row md-select="vm.faxAccounts[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td md-cell>{{vm.faxAccounts[value].name}}</td>\n                <td md-cell>{{vm.faxAccounts[value].key}}</td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{(vm.faxAccounts[value].in || 0) + (vm.faxAccounts[value].out || 0)}}</span>\n                </td>\n                <td md-cell>\n                    <div layout="row">\n                        <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                        <span class="md-capture blue-fg">{{vm.faxAccounts[value].in || 0}}</span>\n                        <span class="text-boxed" ng-if="mailAccount.in">{{vm.faxAccounts[value].lastIn ?  (vm.faxAccounts[value].lastIn | date: \'shortTime\') : \'\'}}</span>\n                    </div>\n                </td>\n                <td md-cell>\n                    <div layout="row">\n                        <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                        <span class="md-capture green-fg">{{vm.faxAccounts[value].out || 0}}</span>\n                        <span class="text-boxed" ng-if="mailAccount.out">{{vm.faxAccounts[value].lastOut ?  (vm.faxAccounts[value].lastOut | date: \'shortTime\') : \'\'}}</span>\n                    </div>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="4">\n                            <md-menu-item>\n                                <md-button ng-click="vm.goToFaxAccount($event, vm.faxAccounts[value])" translate="FAX.EDIT_ACCOUNT">\n                                    Edit Account\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'FAX.PAGE\' | translate}}:\', rowsPerPage: \'{{\'FAX.ROWSPERPAGE\' | translate}}:\', of: \'{{\'FAX.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.count}}"\n    md-on-paginate="vm.getfaxAccounts" md-page-select></md-table-pagination>\n\x3c!-- / AGENT TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/fax/views/realtime/agents/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="FAX.AGENTS">Agents</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query; vm.onInit()" on-collapse="vm.query.filter = undefined; vm.onInit()" debounce="300"></ms-search-bar>\n        \x3c!-- <md-button class="md-icon-button" ng-click="vm.showInfo($event)">\n      <i class="icon-information-outline grey-600-fg">\n        <md-tooltip>{{\'VOICE.INFO\' | translate}}</md-tooltip>\n      </i>\n    </md-button> --\x3e\n        <md-select ng-model="vm.query.globalStatusFilter" class="md-caption" ng-change="vm.query.pauseTypeFilter = \'\'; vm.onInit()">\n            <md-option ng-value="\'\'">{{ \'FAX.ALL\' | translate }}</md-option>\n            <md-option value="pause">{{ \'FAX.PAUSE\' | translate }}</md-option>\n            <md-option value="*pause">{{ \'FAX.PARTIALPAUSE\' | translate }}</md-option>\n            <md-option value="busy">{{ \'FAX.BUSY\' | translate }}</md-option>\n            <md-option value="idle">{{ \'FAX.IDLE\' | translate }}</md-option>\n        </md-select>\n\n        <md-select ng-if="vm.isPause(vm.query.globalStatusFilter)" ng-model="vm.query.pauseTypeFilter" class="md-caption" ng-change="vm.onInit()">\n            <md-option ng-value="\'\'">All</md-option>\n            <md-option value="DEFAULT PAUSE">DEFAULT PAUSE</md-option>\n            <md-option value="ACW">ACW</md-option>\n            <md-option value="LOGININPAUSE">LOGININPAUSE</md-option>\n            <md-option value="Auto-Pause">AUTOPAUSE</md-option>\n            <md-option ng-value="pause.name" ng-repeat="pause in vm.pauses.rows">{{pause.name}}</md-option>\n        </md-select>\n    </div>\n</md-toolbar>\n\n\x3c!-- AGENT TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.order" md-on-reorder="vm.onInit">\n            <tr md-row border="1">\n                <th class="bv text-center" colspan="3">{{ \'FAX.AGENT\' | translate }}</th>\n                <th class="bv bl text-center" colspan="2">{{ \'VOICE.VOICE\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="bv bl text-center" colspan="2">{{ \'CHAT.CHAT\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="bv bl text-center" colspan="2">{{ \'MAIL.MAIL\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="bv bl text-center" colspan="2">{{ \'SMS.SMS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="bv bl text-center" colspan="2">{{ \'OPENCHANNEL.OPENCHANNEL\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="bv bl text-center" colspan="2">{{ \'FAX.FAX\' | translate }}</th>\n                <th width="10px" class="bt bl" rowspan="2"></th>\n                \x3c!-- <th md-column>{{ \'VOICE.PHONE_STATE\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PHONE_STATUS\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PAUSE\' | translate }}</th>\n                <th md-column width="10px"></th> --\x3e\n            </tr>\n            <tr md-row>\n                <th class="bl" md-column md-order-by="fullname">{{ \'FAX.NAME\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatus">{{ \'FAX.STATUS\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatusTime">{{ \'FAX.TIMER\' | translate }}</th>\n\n                <th class="bl custom-column">{{ \'VOICE.STATUS\' | translate }}</th>\n                <th class="bl custom-column">Info</th>\n\n                <th ng-if="vm.license.chat" class="bl text-center">{{ \'CHAT.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'CHAT.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.mail" class="bl text-center">{{ \'MAIL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'MAIL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.messaging" class="bl text-center">{{ \'SMS.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'SMS.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.openchannel" class="bl text-center">{{ \'OPENCHANNEL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'OPENCHANNEL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.fax" class="bl text-center">{{ \'FAX.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'FAX.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.order.length">\n                <td md-cell colspan="17">\n                    <div layout="row" layout-align="center center">\n                        <span>{{ \'FAX.NO_AGENT_ONLINE\' | translate }}</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-select="vm.agents[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td class="bt padding-5">\n                    <div layout="row" layout-align="start center">\n                        <img class="avatar" ng-src="{{vm.agents[value].userpic && \'api/users/\'+vm.agents[value].id+\'/avatar\' || \'assets/images/avatars/profile.png\'}}">\n                        <div layout="column">\n                            <span>{{vm.agents[value].fullname}}</span>\n                            <span>{{vm.agents[value].internal}}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt">\n                    <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'busy\':\'indigo-100-bg\',\'*pause\':\'amber-50-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].globalStatus]">{{ vm.isPause(vm.agents[value].globalStatus) ? \'\' : vm.agents[value].globalStatus | uppercase }} {{ vm.isPause(vm.agents[value].globalStatus) ? (vm.isPartialPause(vm.agents[value].globalStatus) ? \'*\'+vm.agents[value].pauseType || \'DEFAULT PAUSE\'  : vm.agents[value].pauseType || \'DEFAULT PAUSE\') : \'\'}}</span>\n                </td>\n                <td class="bt custom-column">\n                    <timer start-time="vm.agents[value].globalStatusTime" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                </td>\n                <td class="bt bl">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'talking\':\'indigo-100-bg\',\'ringing\':\'orange-400-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].voiceStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt bl">\n                    <div layout="column">\n                        <span ng-if="vm.agents[value].queue" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].queue }}</span>\n                        <span ng-if="vm.agents[value].destconnectedlinenum" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].destconnectedlinenum }}</span>\n                        <span class="padding-5" ng-if="vm.agents[value].queue || vm.agents[value].destconnectedlinenum">\n                            <timer start-time="vm.agents[value].voiceStatusTime" interval="1000" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                        </span>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt">--</td>\n                <td class="bt">--</td> --\x3e\n                <td class="bt bl" ng-if="vm.license.chat">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt padding-5 text-center">{{ agent.chatCurrentCapacity }}/{{ agent.chatCapacity > 0 ? agent.chatCapacity : \'∞\' }}</td> --\x3e\n                <td md-number class="bt text-center font-size-20" ng-if="vm.license.chat" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.mail">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.mail" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.messaging">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.messaging" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.openchannel">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">4</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">89</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.openchannel" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.fax">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">7</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">2</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.fax" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxCurrentCapacity }}</td>\n                <td class="bl bt padding-5 text-center">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="4">\n                            <md-menu-item>\n                                <md-button ng-click="vm.logout(vm.agents[value], $event)" translate="FAX.LOGOUT">\n                                    Logout\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.queueAdd(vm.agents[value], $event)" translate="FAX.AGENTADD_QUEUE">\n                                    Add Agent In Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="FAX.PAUSE">Pause</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item>\n                                            <md-button ng-disabled=" vm.agents[value].voicePause && \'DEFAULT PAUSE\' === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value])"><em translate="FAX.DEFAULT_PAUSE">Default Pause</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.pauses.rows.length" ng-repeat="pause in vm.pauses.rows">\n                                            <md-button ng-disabled="vm.agents[value].voicePause && pause.name === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value], pause.name)">{{pause.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                            <md-menu-item ng-if="vm.isPause(vm.agents[value].globalStatus)">\n                                <md-button ng-click="vm.unPause(vm.agents[value])" translate="FAX.UNPAUSE">\n                                    Unpause\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'FAX.PAGE\' | translate}}:\', rowsPerPage: \'{{\'FAX.ROWSPERPAGE\' | translate}}:\', of: \'{{\'FAX.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.filteredAgents.length}}"\n    md-on-paginate="vm.onInit" md-page-select></md-table-pagination>\n\x3c!-- / AGENT TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/fax/views/realtime/queues/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="FAX.QUEUES">Queues</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUE TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getQueues">\n            <tr md-row>\n                <th md-column md-order-by="name">{{ \'FAX.NAME\' | translate }}</th>\n                <th md-column>{{ \'FAX.LOGGED_IN\' | translate }}</th>\n                <th md-column>{{ \'FAX.PAUSED\' | translate }}</th>\n                <th md-column>{{ \'FAX.READY\' | translate }}</th>\n                <th md-column>{{ \'FAX.WAITING\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.queues">\n                <td md-cell colspan="7">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="FAX.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row md-select="vm.queues[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td md-cell>{{vm.queues[value].name}}</td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].loggedInDb || 0}} ({{vm.queues[value].loggedIn || 0}})</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].paused || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].available || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].waiting || 0}}</span>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="FAX.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="3">\n                            <md-menu-item>\n                                <md-button ng-click="vm.createOrEditFaxQueue($event, vm.queues[value])" translate="FAX.EDIT_QUEUE">\n                                    Edit Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.agentAdd($event, vm.queues[value])" translate="FAX.AGENTSADD_QUEUE">\n                                    Add Agents to queue\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'FAX.PAGE\' | translate}}:\', rowsPerPage: \'{{\'FAX.ROWSPERPAGE\' | translate}}:\', of: \'{{\'FAX.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.count}}"\n    md-on-paginate="vm.getQueues" md-page-select></md-table-pagination>\n\x3c!-- / QUEUE TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/fax/views/realtime/realtime.html",'<div id="realtime" class="page-layout simple tabbed" layout="column" ng-cloak>\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="FAX.AGENTS">Agents</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="FAX.TRUNKS">Trunks</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="FAX.QUEUES">Queues</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="FAX.ACCOUNTS">Accounts</span>\n                </md-tab-label>\n            </md-tab>\n        </md-tabs>\n\n        <md-card ui-view></md-card>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n</div>'),e.put("app/main/apps/fax/views/realtime/trunks/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="FAX.TRUNKS">Telephones</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n        \x3c!-- <md-button class="md-icon-button" ng-click="vm.showInfo($event)">\n      <i class="icon-information-outline grey-600-fg">\n        <md-tooltip>{{\'FAX.INFO\' | translate}}</md-tooltip>\n      </i>\n    </md-button> --\x3e\n    </div>\n</md-toolbar>\n\n\x3c!-- TRUNKS TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head>\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getTrunks">\n                <tr md-row>\n                    <th md-column md-order-by="name">{{ \'FAX.NAME\' | translate }}</th>\n                    <th md-column>{{ \'FAX.TRUNK_STATUS\' | translate }}</th>\n                    <th md-column>{{ \'FAX.REGISTRY\' | translate }}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.trunks">\n                    <td md-cell colspan="3">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="FAX.NO_AVAILABLE_INFO">No Available Info</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="(id, trunk) in vm.trunks">\n                    <td md-cell>{{trunk.name}}</td>\n                    <td md-cell>\n                        <i ng-class="vm.statusClass[trunk.status.toLowerCase()]">\n            <md-tooltip>{{\'FAX.\' + trunk.status | uppercase | translate}}</md-tooltip>\n          </i>\n                        <span ng-if="trunk.status === \'registered\'" class="text-boxed">{{trunk.address}}</span>\n                    </td>\n                    <td md-cell>\n                        <i ng-if="trunk.registry" ng-class="(trunk.stateRegistry.toLowerCase() === \'registered\') ? \'green-300-fg icon-checkbox-marked-circle\' : \'red-300-fg icon-close-circle\'">\n            <md-tooltip>{{\'FAX.\' + trunk.stateRegistry | uppercase | translate}}</md-tooltip>\n          </i>\n                        <span ng-if="trunk.registry && trunk.host && trunk.port" class="text-boxed">{{trunk.host}}:{{trunk.port}}</span>\n                        <span ng-if="!trunk.registry" translate="FAX.NO_REGISTRY">\n            No Registry\n          </span>\n                    </td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="4">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.goToTrunk($event, trunk)" translate="FAX.EDIT_TRUNK">\n                                        Edit Trunk\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'FAX.PAGE\' | translate}}:\', rowsPerPage: \'{{\'FAX.ROWSPERPAGE\' | translate}}:\', of: \'{{\'FAX.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.count}}"\n    md-on-paginate="vm.getTrunks" md-page-select></md-table-pagination>\n\x3c!-- / TRUNKS TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/help/views/about/about.html",'<div id="maintenance" class="flex-scrollable" layout="column" ms-scroll>\n    <div id="maintenance-form-wrapper" layout="column" layout-align="center center">\n        <div id="maintenance-form" class="md-whiteframe-8dp">\n            <div>\n                <img src="/api/settings/1/logo_login" alt="logo_login" />\n            </div>\n\n            <br>\n\n            <div>\n                <div class="info-line">\n                    <div class="title">Useful pages</div>\n                </div>\n                <section layout="row" flex layout-sm="column" layout-align="center center" layout-wrap>\n                    <div layout="column" flex="25" layout-align="center center">\n                        <a class="md-fab md-mini md-button grey-bg" href="https://wiki.xcallymotion.com/display/XMV" target="_blank">\n                            <md-icon md-font-icon="icon-wikipedia"></md-icon>\n                        </a>\n                        <div class="info"><a href="https://wiki.xcallymotion.com/display/XMV" target="_blank">Wiki</a></div>\n                    </div>\n\n                    <div layout="column" flex="25" layout-align="center center">\n                        <a class="md-fab md-mini md-button md-accent" href="/apidoc" target="_blank">\n                            <md-icon md-font-icon="icon-apple-mobileme"></md-icon>\n                        </a>\n                        <div class="info"><a href="/apidoc" target="_blank">Motion API</a></div>\n                    </div>\n\n                    <div layout="column" flex="25" layout-align="center center">\n                        <a class="md-fab md-mini md-button orange-bg" href="http://www.xcally.com/bar/phonebar/Setup.msi" target="_blank">\n                            <md-icon md-font-icon="icon-headphones"></md-icon>\n                        </a>\n                        <div class="info"><a href="http://www.xcally.com/bar/phonebar/Setup.msi" target="_blank">Phonebar Download</a></div>\n                    </div>\n\n                    <div layout="column" flex="25" layout-align="center center">\n                        <a class="md-fab md-mini md-button green-bg" href="/demo" target="_blank">\n                            <md-icon md-font-icon="icon-console"></md-icon>\n                        </a>\n                        <div class="info"><a href="/demo" target="_blank">Playground</a></div>\n                    </div>\n\n                </section>\n\n                <br>\n\n                <div class="info-line" ng-if="!vm.license.custom">\n                    <div class="title">Follow us on</div>\n                </div>\n                <section ng-if="!vm.license.custom" layout="row" layout-sm="column" layout-align="center center" layout-wrap>\n                    <a class="md-fab md-mini md-button blue-900-bg" href="https://www.facebook.com/xcallymotion" target="_blank">\n                        <md-icon md-font-icon="icon-facebook"></md-icon>\n                    </a>\n\n                    <a class="md-fab md-mini md-button" href="https://twitter.com/xcallymotion" target="_blank">\n                        <md-icon md-font-icon="icon-twitter"></md-icon>\n                    </a>\n                    <a class="md-fab md-mini md-button md-warn" href="https://plus.google.com/+Xcally" target="_blank">\n                        <md-icon md-font-icon="icon-google-plus"></md-icon>\n                    </a>\n                    <a class="md-fab md-mini md-button light-blue-800-bg" href="https://www.linkedin.com/company/xcally" target="_blank">\n                        <md-icon md-font-icon="icon-linkedin"></md-icon>\n                    </a>\n                </section>\n\n                <br ng-if="!vm.license.custom">\n\n                <div class="info-line" ng-if="!vm.license.custom">\n                    <div class="title" translate="HELP.CONTACT_US">Contact Us</div>\n                </div>\n                <div class="info-line" ng-if="!vm.license.custom">\n                    <div class="info"><a href="mailto:support@xcally.com" target="_top">support@xcally.com</a></div>\n                </div>\n\n                <br ng-if="!vm.license.custom">\n\n                <div class="info">xCALLY Motion <u>{{vm.info.current}}</u> | <a href="https://wiki.xcallymotion.com/display/XMV/Motion+GUI#MotionGUI-Version{{vm.info.current}}" target="_blank">Changelog</a></div>\n\n                <br>\n\n                <div class="info" ng-if="!vm.license.custom">xCALLY© 2016 - 2018 | Powered by Xenialab | <a href="http://www.xcally.com/support/eula-xcally-license-en.pdf" target="_blank">EULA</a></div>\n\n                <br ng-if="!vm.license.custom">\n\n                <div class="info" ng-if="!vm.license.custom"><a href="https://www.xenialab.com/" target="_blank">www.xenialab.com</a> | <a href="https://www.xcallymotion.com/" target="_blank">www.xcallymotion.com</a></div>\n            </div>\n        </div>\n    </div>\n</div>'),e.put("app/main/apps/integrations/views/deskAccounts/create/dialog.html",'<md-dialog class="deskAccount-dialog" aria-label="New DeskAccount">\n    <form name="deskAccountForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.deskAccount.name" ng-required="true" autofocus>\n                <div ng-messages="deskAccountForm[\'name\'].$error" ng-show="deskAccountForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.deskAccount.type" required>\n\n                    <md-option ng-value="\'integrationTab\'"> {{ \'INTEGRATIONS.INTEGRATION_TAB\' | translate }}</md-option>\n\n                    <md-option ng-value="\'newTab\'"> {{ \'INTEGRATIONS.NEW_TAB\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="deskAccountForm[\'type\'].$error" ng-show="deskAccountForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.URI">Uri</label>\n                <input type="url" name="remoteUri" ng-model="vm.deskAccount.remoteUri" ng-required="true">\n                <div ng-messages="deskAccountForm[\'remoteUri\'].$error" ng-show="deskAccountForm[\'remoteUri\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED">Uri field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL">Uri must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.AUTHTYPE">AuthType</label>\n                <md-select name="authType" ng-model="vm.deskAccount.authType" required>\n                    <md-option ng-value="\'basic\'">Basic</md-option>\n                </md-select>\n                <div ng-messages="deskAccountForm[\'authType\'].$error" ng-show="deskAccountForm[\'authType\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.AUTHTYPE_REQUIRED">AuthType field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.deskAccount.authType == \'basic\'" class="md-block">\n                <label translate="INTEGRATIONS.USERNAME">Username</label>\n                <input type="text" name="username" ng-model="vm.deskAccount.username" ng-required="true">\n                <div ng-messages="deskAccountForm[\'username\'].$error" ng-show="deskAccountForm[\'username\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.deskAccount.authType == \'basic\'">\n                <label translate="INTEGRATIONS.PASSWORD">Password</label>\n                <input type="password" name="password" ng-model="vm.deskAccount.password" placeholder="Password" translate translate-attr-placeholder="INTEGRATIONS.PASSWORD" required>\n                <div ng-messages="deskAccountForm[\'password\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                <input type="url" name="serverUrl" ng-model="vm.deskAccount.serverUrl">\n                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                <div ng-messages="deskAccountForm[\'serverUrl\'].$error" ng-show="deskAccountForm[\'serverUrl\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.deskAccount.description">\n                <div ng-messages="deskAccountForm[\'description\'].$error" ng-show="deskAccountForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newDeskAccount" ng-click="vm.saveDeskAccount()" class="send-button md-accent md-raised" ng-disabled="deskAccountForm.$invalid || deskAccountForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newDeskAccount" ng-click="vm.addNewDeskAccount()" class="send-button md-accent md-raised" ng-disabled="deskAccountForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_DESKACCOUNT" translate-attr-aria-label="INTEGRATIONS.ADD_DESKACCOUNT">\n                    ADD DESKACCOUNT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newDeskAccount" ng-click="vm.deleteDeskAccount($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/deskAccounts/deskAccounts.html",'<div id="deskAccounts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-heart" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="INTEGRATIONS.DESKACCOUNTS">DeskAccounts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="INTEGRATIONS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedDeskAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedDeskAccounts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="INTEGRATIONS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-deskAccounts-count">\n                    <span>{{vm.selectedDeskAccounts.length}}</span>\n                <span translate="INTEGRATIONS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="DESKACCOUNTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllDeskAccounts()" translate="INTEGRATIONS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectDeskAccounts()" translate="INTEGRATIONS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedDeskAccounts" csv-label="true" filename="deskAccounts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedDeskAccounts($event)" aria-label="delete selected" translate translate-attr-label="DESKACCOUNTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- DESKACCOUNT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedDeskAccounts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getDeskAccounts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'INTEGRATIONS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="remoteUri">{{ \'INTEGRATIONS.URI\' | translate }}</th>\n                                <th md-column md-order-by="username">{{ \'INTEGRATIONS.USERNAME\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.deskAccounts.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="INTEGRATIONS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="deskAccount" md-select-id="id" ng-repeat="deskAccount in vm.deskAccounts.rows">\n                                <td md-cell ng-if="deskAccount.userpic"><img class="avatar" alt="{{deskAccount.name}}" ng-src="api/users/{{deskAccount.id}}/avatar" /></td>\n                                <td md-cell ng-if="!deskAccount.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{deskAccount.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditDeskAccount($event, deskAccount)" md-cell class="id ">{{deskAccount.id}}</td>\n                                <td ng-click="vm.createOrEditDeskAccount($event, deskAccount)" md-cell class="name ">{{deskAccount.name}}</td>\n                                <td ng-click="vm.createOrEditDeskAccount($event, deskAccount)" md-cell class="remoteUri ">{{deskAccount.remoteUri}}</td>\n                                <td ng-click="vm.createOrEditDeskAccount($event, deskAccount)" md-cell class="username ">{{deskAccount.username}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(deskAccount, $event)" translate="INTEGRATIONS.EDIT_DESKACCOUNT">\n                                                    Edit DeskAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.testtestintegrationaccount(deskAccount, $event)" translate="INTEGRATIONS.TEST_DESKACCOUNT">\n                                                    Test DeskAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(deskAccount, $event)" translate="INTEGRATIONS.DELETE_DESKACCOUNT">\n                                                    Delete DeskAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'INTEGRATIONS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'INTEGRATIONS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'INTEGRATIONS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.deskAccounts.count}}" md-on-paginate="vm.getDeskAccounts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / DESKACCOUNT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD DESKACCOUNT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-deskAccount-button" ng-click="vm.createOrEditDeskAccount($event)" aria-label="add deskAccount" translate translate-attr-aria-label="INTEGRATIONS.ADD_DESKACCOUNT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD DESKACCOUNT BUTTON --\x3e\n</div>'),e.put("app/main/apps/integrations/views/deskAccounts/edit/configurations/dialog.html",'<md-dialog class="deskConfiguration-dialog" aria-label="New DeskConfiguration">\n    <form name="deskConfigurationForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.deskConfiguration.name" ng-required="true" autofocus>\n                <div ng-messages="deskConfigurationForm[\'name\'].$error" ng-show="deskConfigurationForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.CHANNEL">Channel</label>\n                <md-select name="channel" ng-model="vm.deskConfiguration.channel" required>\n\n                    <md-option ng-value="\'voice\'"> {{ \'INTEGRATIONS.VOICE\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="deskConfigurationForm[\'channel\'].$error" ng-show="deskConfigurationForm[\'channel\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.CHANNEL_REQUIRED">Channel field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.deskConfiguration.type" required>\n\n                    <md-option ng-value="\'inbound\'"> {{ \'INTEGRATIONS.INBOUND_IN_QUEUE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'outbound\'"> {{ \'INTEGRATIONS.OUTBOUND_CALL\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="deskConfigurationForm[\'type\'].$error" ng-show="deskConfigurationForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newDeskConfiguration" ng-click="vm.saveDeskConfiguration()" class="send-button md-accent md-raised" ng-disabled="deskConfigurationForm.$invalid || deskConfigurationForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE"\n                    translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newDeskConfiguration" ng-click="vm.addNewDeskConfiguration()" class="send-button md-accent md-raised" ng-disabled="deskConfigurationForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_DESKCONFIGURATION" translate-attr-aria-label="INTEGRATIONS.ADD_DESKCONFIGURATION">\n                    ADD DESKCONFIGURATION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newDeskConfiguration" ng-click="vm.deleteDeskConfiguration($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/deskAccounts/edit/item/dialog.html",'<md-dialog class="deskAccount-item-dialog" aria-label="New Item">\n    <form name="deskAccountItemForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <div ng-switch="vm.type">\n                <div ng-switch-when="subject">\n                    \x3c!-- SUBJECT SECTION --\x3e\n                    <div ng-include="\'/subject.html\'"></div>\n                    \x3c!-- / SUBJECT SECTION --\x3e\n                </div>\n                <div ng-switch-when="description">\n                    \x3c!-- DESCRIPTION SECTION --\x3e\n                    <md-input-container class="md-block">\n                        <label translate="INTEGRATIONS.TYPE">Type</label>\n                        <md-select name="type" ng-model="vm.item.type" required>\n                            <md-option value="string">String</md-option>\n                            <md-option value="keyValue">Key Value</md-option>\n                        </md-select>\n                        <div ng-messages="deskAccountItemForm.type.$error" ng-show="deskAccountItemForm.type.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n                        <label translate="INTEGRATIONS.CONTENT">Content</label>\n                        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n                        <div ng-messages="deskAccountItemForm.content.$error" ng-show="deskAccountItemForm.content.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <div ng-if="vm.item.type == \'keyValue\'">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.KEY">Key</label>\n                            <input type="text" name="key" ng-model="vm.item.key" required md-autofocus>\n                            <div ng-messages="deskAccountItemForm.key.$error" ng-show="deskAccountItemForm.key.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.KEY_REQUIRED">Key field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.TYPE">Type</label>\n                            <md-select name="keyType" ng-model="vm.item.keyType" required>\n                                <md-option value="string">String</md-option>\n                                <md-option value="variable">Variable</md-option>\n                                <md-option value="customVariable">Custom Variable</md-option>\n                            </md-select>\n                            <div ng-messages="deskAccountItemForm.keyType.$error" ng-show="deskAccountItemForm.keyType.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'string\'">\n                            <label translate="INTEGRATIONS.CONTENT">Content</label>\n                            <input type="text" name="keyContent" ng-model="vm.item.keyContent" required md-autofocus>\n                            <div ng-messages="deskAccountItemForm.keyContent.$error" ng-show="deskAccountItemForm.keyContent.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'variable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n                                <md-optgroup label="Voice: Queue">\n                                    <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Voice: Outbound">\n                                    <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="deskAccountItemForm.variableName.$error" ng-show="deskAccountItemForm.variableName.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'customVariable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select ng-model="vm.item.VariableId" required>\n                                <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n                            </md-select>\n                        </md-input-container>\n                    </div>\n                    \x3c!-- / DESCRIPTION SECTION --\x3e\n                </div>\n                <div ng-switch-when="field">\n                    \x3c!-- FIELD SECTION --\x3e\n                    <div ng-if="vm.accountConnected">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.FIELD">FIELD</label>\n                            <md-select name="customField" ng-model="vm.customField" required>\n                                <md-optgroup label="Standard">\n                                    <md-option ng-value="standard" ng-repeat="standard in vm.fields | filter: {custom: false} ">{{standard.name}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Custom">\n                                    <md-option ng-value="custom" ng-repeat="custom in vm.fields | filter: {custom: true} ">{{custom.name}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="deskAccountItemForm.customField.$error" ng-show="deskAccountItemForm.customField.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.FIELD_REQUIRED">Field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- CUSTOM FIELD --\x3e\n                        <div ng-if="vm.customField && vm.customField.custom" ng-include="\'/subject.html\'"></div>\n                        \x3c!-- / CUSTOM FIELD --\x3e\n                        \x3c!-- STANDARD FIELD --\x3e\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="option" ng-model="vm.item.content" required>\n                                <md-option ng-value="option.value" ng-repeat="option in vm.customField.options">{{option.name}}</md-option>\n                            </md-select>\n                            <div ng-messages="deskAccountItemForm.option.$error" ng-show="deskAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && !vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <input type="text" name="option" ng-model="vm.item.content" required>\n                            <div ng-messages="deskAccountItemForm.option.$error" ng-show="deskAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- / STANDARD FIELD --\x3e\n                    </div>\n                    <div ng-if="!vm.accountConnected">\n                        <p>Account is not connected. Please check your configurations!</p>\n                    </div>\n                    \x3c!-- / FIELD SECTION --\x3e\n                </div>\n                <div ng-switch-default>\n                    <p>No Item</p>\n                </div>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newItem" ng-click="vm.saveItem()" class="send-button md-accent md-raised" ng-disabled="deskAccountItemForm.$invalid || deskAccountItemForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newItem" ng-click="vm.addNewItem()" class="send-button md-accent md-raised" ng-disabled="deskAccountItemForm.$invalid || deskAccountItemForm.$pristine" aria-label="ADD" translate="INTEGRATIONS.ADD" translate-attr-aria-label="INTEGRATIONS.ADD">\n                    ADD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newItem" ng-click="vm.deleteItem($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>\n\n<script type="text/ng-template" id="/subject.html">\n    <md-input-container class="md-block">\n        <label translate="INTEGRATIONS.TYPE">Type</label>\n        <md-select name="type" ng-model="vm.item.type" required>\n            <md-option value="string">String</md-option>\n            <md-option value="variable">Variable</md-option>\n            <md-option value="customVariable">Custom Variable</md-option>\n        </md-select>\n        <div ng-messages="deskAccountItemForm.type.$error" ng-show="deskAccountItemForm.type.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n        <label translate="INTEGRATIONS.CONTENT">Content</label>\n        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n        <div ng-messages="deskAccountItemForm.content.$error" ng-show="deskAccountItemForm.content.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'variable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n            <md-optgroup label="Voice: Queue">\n                <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n            </md-optgroup>\n            <md-optgroup label="Voice: Outbound">\n                <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n            </md-optgroup>\n        </md-select>\n        <div ng-messages="deskAccountItemForm.variableName.$error" ng-show="deskAccountItemForm.variableName.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'customVariable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select ng-model="vm.item.VariableId" required>\n            <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n        </md-select>\n    </md-input-container>\n<\/script>'),e.put("app/main/apps/integrations/views/deskAccounts/edit/view.html",'<div id="integrations-deskAccount" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-deskAccounts-button md-icon-button" aria-label="Go to deskAccounts" ng-click="vm.gotoDeskAccounts()" translate translate-attr-aria-label="INTEGRATIONS.GO_TO_DESKACCOUNTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="deskAccount-image" hide-xs>\n                    <img ng-src="assets/images/business/deskAccounts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.deskAccount.id}}\n                        <span ng-if="vm.deskAccount.name">{{vm.deskAccount.name}}</span>\n                        <span ng-if="vm.deskAccount.exten">{{vm.deskAccount.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="INTEGRATIONS.CREATED_AT"></span> <span>{{vm.deskAccount.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveDeskAccount()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (configurationsForm.$invalid)" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.ACCOUNT">ACCOUNT</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="deskAccount-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.deskAccount.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.TYPE">Type</label>\n                                <md-select name="type" ng-model="vm.deskAccount.type" required>\n\n                                    <md-option ng-value="\'integrationTab\'"> {{ \'INTEGRATIONS.INTEGRATION_TAB\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'newTab\'"> {{ \'INTEGRATIONS.NEW_TAB\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'type\'].$error" ng-show="generalForm[\'type\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.URI">Uri</label>\n                                <input type="url" name="remoteUri" ng-model="vm.deskAccount.remoteUri" ng-required="true">\n                                <div ng-messages="generalForm[\'remoteUri\'].$error" ng-show="generalForm[\'remoteUri\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED">Uri field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL">Uri must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.AUTHTYPE">AuthType</label>\n                                <md-select name="authType" ng-model="vm.deskAccount.authType" required>\n                                    <md-option ng-value="\'basic\'">Basic</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'authType\'].$error" ng-show="generalForm[\'authType\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.AUTHTYPE_REQUIRED">AuthType field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.deskAccount.authType == \'basic\'" class="md-block">\n                                <label translate="INTEGRATIONS.USERNAME">Username</label>\n                                <input type="text" name="username" ng-model="vm.deskAccount.username" ng-required="true">\n                                <div ng-messages="generalForm[\'username\'].$error" ng-show="generalForm[\'username\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block" ng-if="vm.deskAccount.authType == \'basic\'">\n                                <label translate="INTEGRATIONS.PASSWORD">Password</label>\n                                <input type="password" name="password" ng-model="vm.deskAccount.password" placeholder="Password" translate translate-attr-placeholder="INTEGRATIONS.PASSWORD" required>\n                                <div ng-messages="generalForm[\'password\'].$error" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                                <input type="url" name="serverUrl" ng-model="vm.deskAccount.serverUrl">\n                                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                                <div ng-messages="generalForm[\'serverUrl\'].$error" ng-show="generalForm[\'serverUrl\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.deskAccount.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="deskAccount-detail-form-container configurations md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</div>\n                        </div>\n                        <div ng-controller="DeskAccountConfigurationsController as vm_cc" ng-init="vm_cc.init(vm.deskAccount)" layout="row">\n                            <md-card class="md-whiteframe-1dp" flex="30">\n                                <div layout="row" layout-align="center center">\n                                    <md-subheader flex="75" class="md-no-sticky">{{ \'INTEGRATIONS.CONFIGURATIONS\' | translate }}</md-subheader>\n                                    <md-button flex="25" ng-click="vm_cc.createOrEditDeskConfiguration($event)" class="md-icon-button" aria-label="create deskConfiguration">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                                <md-list>\n                                    <md-list-item layout="row" layout-align="center center" ng-repeat="deskConfiguration in vm_cc.configurations" class="border-top" md-colors="{background: (vm_cc.selectedDeskConfiguration == $index ? \'accent\' : \'grey-A100\')}" ng-click="vm_cc.getDeskConfiguration($index)">\n                                        <span class="text-truncate" flex="80">{{ deskConfiguration.name }}</span>\n                                        <md-menu ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_cc.deleteDeskConfiguration($event, deskConfiguration)" translate="INTEGRATIONS.DELETE_DESKCONFIGURATION">\n                                                        Delete DeskConfiguration\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </md-list-item>\n                                </md-list>\n                            </md-card>\n                            <div flex></div>\n                            <md-card class="md-whiteframe-1dp" flex="65">\n                                <md-tabs ng-if="vm_cc.configurations.length" md-dynamic-height>\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.SUBJECTS">SUBJECTS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.subject = query" on-collapse="vm_cc.query.subject = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditSubject($event)" aria-label="add subject" translate translate-attr-label="INTEGRATIONS.ADD_SUBJECT">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedSubjects.length}} {{vm_cc.selectedSubjects.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedSubjects($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedSubjects">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="subject" md-select-id="id" ng-repeat="subject in vm_cc.subjects | filter: vm_cc.query.subject">\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="id ">{{subject.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="type ">\n                                                                <span ng-if="subject.FieldId">{{subject.nameField || subject.idField}}</span>\n                                                                <span ng-if="!subject.FieldId">{{subject.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="subject.type" ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell>\n                                                                <span ng-switch-when="string">{{subject.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{subject.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{subject.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{subject.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditSubject($event, subject)" translate="INTEGRATIONS.EDIT_SUBJECT">\n                                                                                Edit Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteSubjectConfirm($event, subject)" translate="INTEGRATIONS.DELETE_SUBJECT">\n                                                                                Delete Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.DESCRIPTIONS">DESCRIPTIONS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.description = query" on-collapse="vm_cc.query.description = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditDescription($event)" aria-label="add description" translate translate-attr-label="INTEGRATIONS.ADD_DESCRIPTION">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedDescriptions.length}} {{vm_cc.selectedDescriptions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedDescriptions($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedDescriptions">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="description" md-select-id="id" ng-repeat="description in vm_cc.descriptions | filter: vm_cc.query.description">\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="id ">{{description.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="type ">\n                                                                <span ng-if="description.FieldId">{{description.nameField || description.idField}}</span>\n                                                                <span ng-if="!description.FieldId">{{description.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="description.type" ng-click="vm_cc.createOrEditDescription($event, description)" md-cell>\n                                                                <span ng-switch-when="string">{{description.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{description.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{description.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{description.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditDescription($event, description)" translate="INTEGRATIONS.EDIT_DESCRIPTION">\n                                                                                Edit Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteDescriptionConfirm($event, description)" translate="INTEGRATIONS.DELETE_DESCRIPTION">\n                                                                                Delete Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.FIELDS">FIELDS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.field = query" on-collapse="vm_cc.query.field = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditField($event)" aria-label="add field" translate translate-attr-label="INTEGRATIONS.ADD_FIELD">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedFields.length}} {{vm_cc.selectedFields.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedFields($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedFields">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="field" md-select-id="id" ng-repeat="field in vm_cc.fields | filter: vm_cc.query.field">\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="id ">{{field.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="type ">\n                                                                <span ng-if="field.FieldId">{{field.nameField || field.idField}}</span>\n                                                                <span ng-if="!field.FieldId">{{field.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="field.type" ng-click="vm_cc.createOrEditField($event, field)" md-cell>\n                                                                <span ng-switch-when="string">{{field.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{field.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{field.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{field.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditField($event, field)" translate="INTEGRATIONS.EDIT_FIELD">\n                                                                                Edit Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteFieldConfirm($event, field)" translate="INTEGRATIONS.DELETE_FIELD">\n                                                                                Delete Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.TAGS">TAGS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-table-container class="md-whiteframe-1dp padding-20">\n                                                <md-input-container class="md-block">\n                                                    <label translate="INTEGRATIONS.TAGS">Tags</label>\n                                                    <md-select ng-model="vm_cc.selectedTags" ng-change="vm_cc.selectTagsChanged($event)" multiple>\n                                                        <md-option ng-value="tag.id" ng-repeat="tag in vm_cc.tags">{{ tag.name }}</md-option>\n                                                    </md-select>\n                                                </md-input-container>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n                                </md-tabs>\n                                <div class="padding-20" ng-if="!vm_cc.configurations.length" ng-click="vm_cc.createOrEditDeskConfiguration($event)" layout="row" layout-sm="column" layout-align="center center" layout-wrap>\n                                    <div class="padding-20 md-whiteframe-3dp md-accent-bg" layout="column" layout-align="center center">\n                                        <md-button class="md-icon-button">\n                                            <md-icon md-font-icon="icon-plus"></md-icon>\n                                        </md-button>\n                                        <span aria-label="add configuration" translate translate-attr-label="INTEGRATIONS.ADD_CONFIGURATION">ADD CONFIGURATION</span>\n                                    </div>\n                                </div>\n                            </md-card>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/integrations/views/freshdeskAccounts/create/dialog.html",'<md-dialog class="freshdeskAccount-dialog" aria-label="New FreshdeskAccount">\n    <form name="freshdeskAccountForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.freshdeskAccount.name" ng-required="true" autofocus>\n                <div ng-messages="freshdeskAccountForm[\'name\'].$error" ng-show="freshdeskAccountForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.USERNAME">Username</label>\n                <input type="text" name="username" ng-model="vm.freshdeskAccount.username" ng-required="true">\n                <div ng-messages="freshdeskAccountForm[\'username\'].$error" ng-show="freshdeskAccountForm[\'username\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.URI">Uri</label>\n                <input type="url" name="remoteUri" ng-model="vm.freshdeskAccount.remoteUri" ng-required="true">\n                <div ng-messages="freshdeskAccountForm[\'remoteUri\'].$error" ng-show="freshdeskAccountForm[\'remoteUri\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED">Uri field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL">Uri must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.APIKEY">ApiKey</label>\n                <input type="text" name="apiKey" ng-model="vm.freshdeskAccount.apiKey" ng-required="true">\n                <div ng-messages="freshdeskAccountForm[\'apiKey\'].$error" ng-show="freshdeskAccountForm[\'apiKey\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.APIKEY_REQUIRED">ApiKey field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                <input type="url" name="serverUrl" ng-model="vm.freshdeskAccount.serverUrl">\n                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                <div ng-messages="freshdeskAccountForm[\'serverUrl\'].$error" ng-show="freshdeskAccountForm[\'serverUrl\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.freshdeskAccount.description">\n                <div ng-messages="freshdeskAccountForm[\'description\'].$error" ng-show="freshdeskAccountForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newFreshdeskAccount" ng-click="vm.saveFreshdeskAccount()" class="send-button md-accent md-raised" ng-disabled="freshdeskAccountForm.$invalid || freshdeskAccountForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE"\n                    translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newFreshdeskAccount" ng-click="vm.addNewFreshdeskAccount()" class="send-button md-accent md-raised" ng-disabled="freshdeskAccountForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_FRESHDESKACCOUNT" translate-attr-aria-label="INTEGRATIONS.ADD_FRESHDESKACCOUNT">\n                    ADD FRESHDESKACCOUNT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newFreshdeskAccount" ng-click="vm.deleteFreshdeskAccount($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/freshdeskAccounts/edit/configurations/dialog.html",'<md-dialog class="freshdeskConfiguration-dialog" aria-label="New FreshdeskConfiguration">\n    <form name="freshdeskConfigurationForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.freshdeskConfiguration.name" ng-required="true" autofocus>\n                <div ng-messages="freshdeskConfigurationForm[\'name\'].$error" ng-show="freshdeskConfigurationForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.CHANNEL">Channel</label>\n                <md-select name="channel" ng-model="vm.freshdeskConfiguration.channel" required>\n\n                    <md-option ng-value="\'voice\'"> {{ \'INTEGRATIONS.VOICE\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="freshdeskConfigurationForm[\'channel\'].$error" ng-show="freshdeskConfigurationForm[\'channel\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.CHANNEL_REQUIRED">Channel field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.freshdeskConfiguration.type" required>\n\n                    <md-option ng-value="\'inbound\'"> {{ \'INTEGRATIONS.INBOUND_IN_QUEUE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'outbound\'"> {{ \'INTEGRATIONS.OUTBOUND_CALL\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="freshdeskConfigurationForm[\'type\'].$error" ng-show="freshdeskConfigurationForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newFreshdeskConfiguration" ng-click="vm.saveFreshdeskConfiguration()" class="send-button md-accent md-raised" ng-disabled="freshdeskConfigurationForm.$invalid || freshdeskConfigurationForm.$pristine" aria-label="SAVE"\n                    translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newFreshdeskConfiguration" ng-click="vm.addNewFreshdeskConfiguration()" class="send-button md-accent md-raised" ng-disabled="freshdeskConfigurationForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_FRESHDESKCONFIGURATION"\n                    translate-attr-aria-label="INTEGRATIONS.ADD_FRESHDESKCONFIGURATION">\n                    ADD FRESHDESKCONFIGURATION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newFreshdeskConfiguration" ng-click="vm.deleteFreshdeskConfiguration($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/freshdeskAccounts/edit/item/dialog.html",'<md-dialog class="freshdeskAccount-item-dialog" aria-label="New Item">\n    <form name="freshdeskAccountItemForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <div ng-switch="vm.type">\n                <div ng-switch-when="subject">\n                    \x3c!-- SUBJECT SECTION --\x3e\n                    <div ng-include="\'/subject.html\'"></div>\n                    \x3c!-- / SUBJECT SECTION --\x3e\n                </div>\n                <div ng-switch-when="description">\n                    \x3c!-- DESCRIPTION SECTION --\x3e\n                    <md-input-container class="md-block">\n                        <label translate="INTEGRATIONS.TYPE">Type</label>\n                        <md-select name="type" ng-model="vm.item.type" required>\n                            <md-option value="string">String</md-option>\n                            <md-option value="keyValue">Key Value</md-option>\n                        </md-select>\n                        <div ng-messages="freshdeskAccountItemForm.type.$error" ng-show="freshdeskAccountItemForm.type.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n                        <label translate="INTEGRATIONS.CONTENT">Content</label>\n                        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n                        <div ng-messages="freshdeskAccountItemForm.content.$error" ng-show="freshdeskAccountItemForm.content.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <div ng-if="vm.item.type == \'keyValue\'">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.KEY">Key</label>\n                            <input type="text" name="key" ng-model="vm.item.key" required md-autofocus>\n                            <div ng-messages="freshdeskAccountItemForm.key.$error" ng-show="freshdeskAccountItemForm.key.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.KEY_REQUIRED">Key field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.TYPE">Type</label>\n                            <md-select name="keyType" ng-model="vm.item.keyType" required>\n                                <md-option value="string">String</md-option>\n                                <md-option value="variable">Variable</md-option>\n                                <md-option value="customVariable">Custom Variable</md-option>\n                            </md-select>\n                            <div ng-messages="freshdeskAccountItemForm.keyType.$error" ng-show="freshdeskAccountItemForm.keyType.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'string\'">\n                            <label translate="INTEGRATIONS.CONTENT">Content</label>\n                            <input type="text" name="keyContent" ng-model="vm.item.keyContent" required md-autofocus>\n                            <div ng-messages="freshdeskAccountItemForm.keyContent.$error" ng-show="freshdeskAccountItemForm.keyContent.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'variable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n                                <md-optgroup label="Voice: Queue">\n                                    <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Voice: Outbound">\n                                    <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="freshdeskAccountItemForm.variableName.$error" ng-show="freshdeskAccountItemForm.variableName.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'customVariable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select ng-model="vm.item.VariableId" required>\n                                <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n                            </md-select>\n                        </md-input-container>\n                    </div>\n                    \x3c!-- / DESCRIPTION SECTION --\x3e\n                </div>\n                <div ng-switch-when="field">\n                    \x3c!-- FIELD SECTION --\x3e\n                    <div ng-if="vm.accountConnected">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.FIELD">FIELD</label>\n                            <md-select name="customField" ng-model="vm.customField" required>\n                                <md-optgroup label="Standard">\n                                    <md-option ng-value="standard" ng-repeat="standard in vm.fields | filter: {custom: false} ">{{standard.name}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Custom">\n                                    <md-option ng-value="custom" ng-repeat="custom in vm.fields | filter: {custom: true} ">{{custom.name}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="freshdeskAccountItemForm.customField.$error" ng-show="freshdeskAccountItemForm.customField.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.FIELD_REQUIRED">Field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- CUSTOM FIELD --\x3e\n                        <div ng-if="vm.customField && vm.customField.custom" ng-include="\'/subject.html\'"></div>\n                        \x3c!-- / CUSTOM FIELD --\x3e\n                        \x3c!-- STANDARD FIELD --\x3e\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="option" ng-model="vm.item.content" required>\n                                <md-option ng-value="option.value" ng-repeat="option in vm.customField.options">{{option.name}}</md-option>\n                            </md-select>\n                            <div ng-messages="freshdeskAccountItemForm.option.$error" ng-show="freshdeskAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && !vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <input type="text" name="option" ng-model="vm.item.content" required>\n                            <div ng-messages="freshdeskAccountItemForm.option.$error" ng-show="freshdeskAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- / STANDARD FIELD --\x3e\n                    </div>\n                    <div ng-if="!vm.accountConnected">\n                        <p>Account is not connected. Please check your configurations!</p>\n                    </div>\n                    \x3c!-- / FIELD SECTION --\x3e\n                </div>\n                <div ng-switch-default>\n                    <p>No Item</p>\n                </div>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newItem" ng-click="vm.saveItem()" class="send-button md-accent md-raised" ng-disabled="freshdeskAccountItemForm.$invalid || freshdeskAccountItemForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newItem" ng-click="vm.addNewItem()" class="send-button md-accent md-raised" ng-disabled="freshdeskAccountItemForm.$invalid || freshdeskAccountItemForm.$pristine" aria-label="ADD" translate="INTEGRATIONS.ADD" translate-attr-aria-label="INTEGRATIONS.ADD">\n                    ADD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newItem" ng-click="vm.deleteItem($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>\n\n<script type="text/ng-template" id="/subject.html">\n    <md-input-container class="md-block">\n        <label translate="INTEGRATIONS.TYPE">Type</label>\n        <md-select name="type" ng-model="vm.item.type" required>\n            <md-option value="string">String</md-option>\n            <md-option value="variable">Variable</md-option>\n            <md-option value="customVariable">Custom Variable</md-option>\n        </md-select>\n        <div ng-messages="freshdeskAccountItemForm.type.$error" ng-show="freshdeskAccountItemForm.type.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n        <label translate="INTEGRATIONS.CONTENT">Content</label>\n        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n        <div ng-messages="freshdeskAccountItemForm.content.$error" ng-show="freshdeskAccountItemForm.content.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'variable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n            <md-optgroup label="Voice: Queue">\n                <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n            </md-optgroup>\n            <md-optgroup label="Voice: Outbound">\n                <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n            </md-optgroup>\n        </md-select>\n        <div ng-messages="freshdeskAccountItemForm.variableName.$error" ng-show="freshdeskAccountItemForm.variableName.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'customVariable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select ng-model="vm.item.VariableId" required>\n            <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n        </md-select>\n    </md-input-container>\n<\/script>'),e.put("app/main/apps/integrations/views/freshdeskAccounts/edit/view.html",'<div id="integrations-freshdeskAccount" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-freshdeskAccounts-button md-icon-button" aria-label="Go to freshdeskAccounts" ng-click="vm.gotoFreshdeskAccounts()" translate translate-attr-aria-label="INTEGRATIONS.GO_TO_FRESHDESKACCOUNTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="freshdeskAccount-image" hide-xs>\n                    <img ng-src="assets/images/business/freshdeskAccounts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.freshdeskAccount.id}}\n                        <span ng-if="vm.freshdeskAccount.name">{{vm.freshdeskAccount.name}}</span>\n                        <span ng-if="vm.freshdeskAccount.exten">{{vm.freshdeskAccount.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="INTEGRATIONS.CREATED_AT"></span> <span>{{vm.freshdeskAccount.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveFreshdeskAccount()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (configurationsForm.$invalid)" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.ACCOUNT">ACCOUNT</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="freshdeskAccount-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.freshdeskAccount.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.USERNAME">Username</label>\n                                <input type="text" name="username" ng-model="vm.freshdeskAccount.username" ng-required="true">\n                                <div ng-messages="generalForm[\'username\'].$error" ng-show="generalForm[\'username\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.URI">Uri</label>\n                                <input type="url" name="remoteUri" ng-model="vm.freshdeskAccount.remoteUri" ng-required="true">\n                                <div ng-messages="generalForm[\'remoteUri\'].$error" ng-show="generalForm[\'remoteUri\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED">Uri field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL">Uri must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.APIKEY">ApiKey</label>\n                                <input type="text" name="apiKey" ng-model="vm.freshdeskAccount.apiKey" ng-required="true">\n                                <div ng-messages="generalForm[\'apiKey\'].$error" ng-show="generalForm[\'apiKey\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.APIKEY_REQUIRED">ApiKey field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                                <input type="url" name="serverUrl" ng-model="vm.freshdeskAccount.serverUrl">\n                                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                                <div ng-messages="generalForm[\'serverUrl\'].$error" ng-show="generalForm[\'serverUrl\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.freshdeskAccount.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="freshdeskAccount-detail-form-container configurations md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</div>\n                        </div>\n                        <div ng-controller="FreshdeskAccountConfigurationsController as vm_cc" ng-init="vm_cc.init(vm.freshdeskAccount)" layout="row">\n                            <md-card class="md-whiteframe-1dp" flex="30">\n                                <div layout="row" layout-align="center center">\n                                    <md-subheader flex="75" class="md-no-sticky">{{ \'INTEGRATIONS.CONFIGURATIONS\' | translate }}</md-subheader>\n                                    <md-button flex="25" ng-click="vm_cc.createOrEditFreshdeskConfiguration($event)" class="md-icon-button" aria-label="create freshdeskConfiguration">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                                <md-list>\n                                    <md-list-item layout="row" layout-align="center center" ng-repeat="freshdeskConfiguration in vm_cc.configurations" class="border-top" md-colors="{background: (vm_cc.selectedFreshdeskConfiguration == $index ? \'accent\' : \'grey-A100\')}" ng-click="vm_cc.getFreshdeskConfiguration($index)">\n                                        <span class="text-truncate" flex="80">{{ freshdeskConfiguration.name }}</span>\n                                        <md-menu ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_cc.deleteFreshdeskConfiguration($event, freshdeskConfiguration)" translate="INTEGRATIONS.DELETE_FRESHDESKCONFIGURATION">\n                                                        Delete FreshdeskConfiguration\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </md-list-item>\n                                </md-list>\n                            </md-card>\n                            <div flex></div>\n                            <md-card class="md-whiteframe-1dp" flex="65">\n                                <md-tabs ng-if="vm_cc.configurations.length" md-dynamic-height>\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.SUBJECTS">SUBJECTS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.subject = query" on-collapse="vm_cc.query.subject = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditSubject($event)" aria-label="add subject" translate translate-attr-label="INTEGRATIONS.ADD_SUBJECT">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedSubjects.length}} {{vm_cc.selectedSubjects.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedSubjects($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedSubjects">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="subject" md-select-id="id" ng-repeat="subject in vm_cc.subjects | filter: vm_cc.query.subject">\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="id ">{{subject.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="type ">\n                                                                <span ng-if="subject.FieldId">{{subject.nameField || subject.idField}}</span>\n                                                                <span ng-if="!subject.FieldId">{{subject.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="subject.type" ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell>\n                                                                <span ng-switch-when="string">{{subject.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{subject.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{subject.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{subject.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditSubject($event, subject)" translate="INTEGRATIONS.EDIT_SUBJECT">\n                                                                                Edit Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteSubjectConfirm($event, subject)" translate="INTEGRATIONS.DELETE_SUBJECT">\n                                                                                Delete Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.DESCRIPTIONS">DESCRIPTIONS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.description = query" on-collapse="vm_cc.query.description = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditDescription($event)" aria-label="add description" translate translate-attr-label="INTEGRATIONS.ADD_DESCRIPTION">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedDescriptions.length}} {{vm_cc.selectedDescriptions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedDescriptions($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedDescriptions">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="description" md-select-id="id" ng-repeat="description in vm_cc.descriptions | filter: vm_cc.query.description">\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="id ">{{description.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="type ">\n                                                                <span ng-if="description.FieldId">{{description.nameField || description.idField}}</span>\n                                                                <span ng-if="!description.FieldId">{{description.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="description.type" ng-click="vm_cc.createOrEditDescription($event, description)" md-cell>\n                                                                <span ng-switch-when="string">{{description.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{description.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{description.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{description.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditDescription($event, description)" translate="INTEGRATIONS.EDIT_DESCRIPTION">\n                                                                                Edit Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteDescriptionConfirm($event, description)" translate="INTEGRATIONS.DELETE_DESCRIPTION">\n                                                                                Delete Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.FIELDS">FIELDS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.field = query" on-collapse="vm_cc.query.field = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditField($event)" aria-label="add field" translate translate-attr-label="INTEGRATIONS.ADD_FIELD">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedFields.length}} {{vm_cc.selectedFields.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedFields($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedFields">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="field" md-select-id="id" ng-repeat="field in vm_cc.fields | filter: vm_cc.query.field">\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="id ">{{field.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="type ">\n                                                                <span ng-if="field.FieldId">{{field.nameField || field.idField}}</span>\n                                                                <span ng-if="!field.FieldId">{{field.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="field.type" ng-click="vm_cc.createOrEditField($event, field)" md-cell>\n                                                                <span ng-switch-when="string">{{field.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{field.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{field.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{field.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditField($event, field)" translate="INTEGRATIONS.EDIT_FIELD">\n                                                                                Edit Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteFieldConfirm($event, field)" translate="INTEGRATIONS.DELETE_FIELD">\n                                                                                Delete Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.TAGS">TAGS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-table-container class="md-whiteframe-1dp padding-20">\n                                                <md-input-container class="md-block">\n                                                    <label translate="INTEGRATIONS.TAGS">Tags</label>\n                                                    <md-select ng-model="vm_cc.selectedTags" ng-change="vm_cc.selectTagsChanged($event)" multiple>\n                                                        <md-option ng-value="tag.id" ng-repeat="tag in vm_cc.tags">{{ tag.name }}</md-option>\n                                                    </md-select>\n                                                </md-input-container>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n                                </md-tabs>\n                                <div class="padding-20" ng-if="!vm_cc.configurations.length" ng-click="vm_cc.createOrEditFreshdeskConfiguration($event)" layout="row" layout-sm="column" layout-align="center center" layout-wrap>\n                                    <div class="padding-20 md-whiteframe-3dp md-accent-bg" layout="column" layout-align="center center">\n                                        <md-button class="md-icon-button">\n                                            <md-icon md-font-icon="icon-plus"></md-icon>\n                                        </md-button>\n                                        <span aria-label="add configuration" translate translate-attr-label="INTEGRATIONS.ADD_CONFIGURATION">ADD CONFIGURATION</span>\n                                    </div>\n                                </div>\n                            </md-card>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/integrations/views/freshdeskAccounts/freshdeskAccounts.html",'<div id="freshdeskAccounts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-heart" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="INTEGRATIONS.FRESHDESKACCOUNTS">FreshdeskAccounts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="INTEGRATIONS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedFreshdeskAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedFreshdeskAccounts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="INTEGRATIONS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-freshdeskAccounts-count">\n                    <span>{{vm.selectedFreshdeskAccounts.length}}</span>\n                <span translate="INTEGRATIONS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="FRESHDESKACCOUNTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllFreshdeskAccounts()" translate="INTEGRATIONS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectFreshdeskAccounts()" translate="INTEGRATIONS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedFreshdeskAccounts" csv-label="true" filename="freshdeskAccounts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedFreshdeskAccounts($event)" aria-label="delete selected" translate translate-attr-label="FRESHDESKACCOUNTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- FRESHDESKACCOUNT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedFreshdeskAccounts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getFreshdeskAccounts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'INTEGRATIONS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="username">{{ \'INTEGRATIONS.USERNAME\' | translate }}</th>\n                                <th md-column md-order-by="remoteUri">{{ \'INTEGRATIONS.URI\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.freshdeskAccounts.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="INTEGRATIONS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="freshdeskAccount" md-select-id="id" ng-repeat="freshdeskAccount in vm.freshdeskAccounts.rows">\n                                <td md-cell ng-if="freshdeskAccount.userpic"><img class="avatar" alt="{{freshdeskAccount.name}}" ng-src="api/users/{{freshdeskAccount.id}}/avatar" /></td>\n                                <td md-cell ng-if="!freshdeskAccount.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{freshdeskAccount.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditFreshdeskAccount($event, freshdeskAccount)" md-cell class="id ">{{freshdeskAccount.id}}</td>\n                                <td ng-click="vm.createOrEditFreshdeskAccount($event, freshdeskAccount)" md-cell class="name ">{{freshdeskAccount.name}}</td>\n                                <td ng-click="vm.createOrEditFreshdeskAccount($event, freshdeskAccount)" md-cell class="username ">{{freshdeskAccount.username}}</td>\n                                <td ng-click="vm.createOrEditFreshdeskAccount($event, freshdeskAccount)" md-cell class="remoteUri ">{{freshdeskAccount.remoteUri}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(freshdeskAccount, $event)" translate="INTEGRATIONS.EDIT_FRESHDESKACCOUNT">\n                                                    Edit FreshdeskAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.testtestintegrationaccount(freshdeskAccount, $event)" translate="INTEGRATIONS.TEST_FRESHDESKACCOUNT">\n                                                    Test FreshdeskAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(freshdeskAccount, $event)" translate="INTEGRATIONS.DELETE_FRESHDESKACCOUNT">\n                                                    Delete FreshdeskAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'INTEGRATIONS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'INTEGRATIONS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'INTEGRATIONS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.freshdeskAccounts.count}}" md-on-paginate="vm.getFreshdeskAccounts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / FRESHDESKACCOUNT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD FRESHDESKACCOUNT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-freshdeskAccount-button" ng-click="vm.createOrEditFreshdeskAccount($event)" aria-label="add freshdeskAccount" translate translate-attr-aria-label="INTEGRATIONS.ADD_FRESHDESKACCOUNT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD FRESHDESKACCOUNT BUTTON --\x3e\n</div>'),e.put("app/main/apps/integrations/views/salesforceAccounts/create/dialog.html",'<md-dialog class="salesforceAccount-dialog" aria-label="New SalesforceAccount">\n    <form name="salesforceAccountForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.salesforceAccount.name" ng-required="true" autofocus>\n                <div ng-messages="salesforceAccountForm[\'name\'].$error" ng-show="salesforceAccountForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.salesforceAccount.type" required>\n\n                    <md-option ng-value="\'integrationTab\'"> {{ \'INTEGRATIONS.INTEGRATION_TAB\' | translate }}</md-option>\n\n                    <md-option ng-value="\'newTab\'"> {{ \'INTEGRATIONS.NEW_TAB\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="salesforceAccountForm[\'type\'].$error" ng-show="salesforceAccountForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.USERNAME">Username</label>\n                <input type="text" name="username" ng-model="vm.salesforceAccount.username" ng-required="true">\n                <div ng-messages="salesforceAccountForm[\'username\'].$error" ng-show="salesforceAccountForm[\'username\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.URI">Uri</label>\n                <input type="url" name="remoteUri" ng-model="vm.salesforceAccount.remoteUri" ng-required="true">\n                <div ng-messages="salesforceAccountForm[\'remoteUri\'].$error" ng-show="salesforceAccountForm[\'remoteUri\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED">Uri field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL">Uri must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.PASSWORD">Password</label>\n                <input type="password" name="password" ng-model="vm.salesforceAccount.password" placeholder="Password" translate translate-attr-placeholder="INTEGRATIONS.PASSWORD" required>\n                <div ng-messages="salesforceAccountForm[\'password\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.CLIENTID">ClientId</label>\n                <input type="text" name="clientId" ng-model="vm.salesforceAccount.clientId" ng-required="true">\n                <div ng-messages="salesforceAccountForm[\'clientId\'].$error" ng-show="salesforceAccountForm[\'clientId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.CLIENTID_REQUIRED">ClientId field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.CLIENTSECRET">ClientSecret</label>\n                <input type="text" name="clientSecret" ng-model="vm.salesforceAccount.clientSecret" ng-required="true">\n                <div ng-messages="salesforceAccountForm[\'clientSecret\'].$error" ng-show="salesforceAccountForm[\'clientSecret\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.CLIENTSECRET_REQUIRED">ClientSecret field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.SECURITYTOKEN">SecurityToken</label>\n                <input type="text" name="securityToken" ng-model="vm.salesforceAccount.securityToken" ng-required="true">\n                <div ng-messages="salesforceAccountForm[\'securityToken\'].$error" ng-show="salesforceAccountForm[\'securityToken\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.SECURITYTOKEN_REQUIRED">SecurityToken field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                <input type="url" name="serverUrl" ng-model="vm.salesforceAccount.serverUrl">\n                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                <div ng-messages="salesforceAccountForm[\'serverUrl\'].$error" ng-show="salesforceAccountForm[\'serverUrl\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.salesforceAccount.description">\n                <div ng-messages="salesforceAccountForm[\'description\'].$error" ng-show="salesforceAccountForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSalesforceAccount" ng-click="vm.saveSalesforceAccount()" class="send-button md-accent md-raised" ng-disabled="salesforceAccountForm.$invalid || salesforceAccountForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE"\n                    translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSalesforceAccount" ng-click="vm.addNewSalesforceAccount()" class="send-button md-accent md-raised" ng-disabled="salesforceAccountForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_SALESFORCEACCOUNT" translate-attr-aria-label="INTEGRATIONS.ADD_SALESFORCEACCOUNT">\n                    ADD SALESFORCEACCOUNT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSalesforceAccount" ng-click="vm.deleteSalesforceAccount($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/salesforceAccounts/edit/configurations/dialog.html",'<md-dialog class="salesforceConfiguration-dialog" aria-label="New SalesforceConfiguration">\n    <form name="salesforceConfigurationForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.salesforceConfiguration.name" ng-required="true" autofocus>\n                <div ng-messages="salesforceConfigurationForm[\'name\'].$error" ng-show="salesforceConfigurationForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.CHANNEL">Channel</label>\n                <md-select name="channel" ng-model="vm.salesforceConfiguration.channel" required>\n\n                    <md-option ng-value="\'voice\'"> {{ \'INTEGRATIONS.VOICE\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="salesforceConfigurationForm[\'channel\'].$error" ng-show="salesforceConfigurationForm[\'channel\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.CHANNEL_REQUIRED">Channel field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.salesforceConfiguration.type" required>\n\n                    <md-option ng-value="\'inbound\'"> {{ \'INTEGRATIONS.INBOUND_IN_QUEUE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'outbound\'"> {{ \'INTEGRATIONS.OUTBOUND_CALL\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="salesforceConfigurationForm[\'type\'].$error" ng-show="salesforceConfigurationForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSalesforceConfiguration" ng-click="vm.saveSalesforceConfiguration()" class="send-button md-accent md-raised" ng-disabled="salesforceConfigurationForm.$invalid || salesforceConfigurationForm.$pristine" aria-label="SAVE"\n                    translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSalesforceConfiguration" ng-click="vm.addNewSalesforceConfiguration()" class="send-button md-accent md-raised" ng-disabled="salesforceConfigurationForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_SALESFORCECONFIGURATION"\n                    translate-attr-aria-label="INTEGRATIONS.ADD_SALESFORCECONFIGURATION">\n                    ADD SALESFORCECONFIGURATION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSalesforceConfiguration" ng-click="vm.deleteSalesforceConfiguration($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/salesforceAccounts/edit/item/dialog.html",'<md-dialog class="salesforceAccount-item-dialog" aria-label="New Item">\n    <form name="salesforceAccountItemForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <div ng-switch="vm.type">\n                <div ng-switch-when="subject">\n                    \x3c!-- SUBJECT SECTION --\x3e\n                    <div ng-include="\'/subject.html\'"></div>\n                    \x3c!-- / SUBJECT SECTION --\x3e\n                </div>\n                <div ng-switch-when="description">\n                    \x3c!-- DESCRIPTION SECTION --\x3e\n                    <md-input-container class="md-block">\n                        <label translate="INTEGRATIONS.TYPE">Type</label>\n                        <md-select name="type" ng-model="vm.item.type" required>\n                            <md-option value="string">String</md-option>\n                            <md-option value="keyValue">Key Value</md-option>\n                        </md-select>\n                        <div ng-messages="salesforceAccountItemForm.type.$error" ng-show="salesforceAccountItemForm.type.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n                        <label translate="INTEGRATIONS.CONTENT">Content</label>\n                        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n                        <div ng-messages="salesforceAccountItemForm.content.$error" ng-show="salesforceAccountItemForm.content.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <div ng-if="vm.item.type == \'keyValue\'">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.KEY">Key</label>\n                            <input type="text" name="key" ng-model="vm.item.key" required md-autofocus>\n                            <div ng-messages="salesforceAccountItemForm.key.$error" ng-show="salesforceAccountItemForm.key.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.KEY_REQUIRED">Key field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.TYPE">Type</label>\n                            <md-select name="keyType" ng-model="vm.item.keyType" required>\n                                <md-option value="string">String</md-option>\n                                <md-option value="variable">Variable</md-option>\n                                <md-option value="customVariable">Custom Variable</md-option>\n                            </md-select>\n                            <div ng-messages="salesforceAccountItemForm.keyType.$error" ng-show="salesforceAccountItemForm.keyType.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'string\'">\n                            <label translate="INTEGRATIONS.CONTENT">Content</label>\n                            <input type="text" name="keyContent" ng-model="vm.item.keyContent" required md-autofocus>\n                            <div ng-messages="salesforceAccountItemForm.keyContent.$error" ng-show="salesforceAccountItemForm.keyContent.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'variable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n                                <md-optgroup label="Voice: Queue">\n                                    <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Voice: Outbound">\n                                    <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="salesforceAccountItemForm.variableName.$error" ng-show="salesforceAccountItemForm.variableName.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'customVariable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select ng-model="vm.item.VariableId" required>\n                                <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n                            </md-select>\n                        </md-input-container>\n                    </div>\n                    \x3c!-- / DESCRIPTION SECTION --\x3e\n                </div>\n                <div ng-switch-when="field">\n                    \x3c!-- FIELD SECTION --\x3e\n                    <div ng-if="vm.accountConnected">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.FIELD">FIELD</label>\n                            <md-select name="customField" ng-model="vm.customField" required>\n                                <md-optgroup label="Standard">\n                                    <md-option ng-value="standard" ng-repeat="standard in vm.fields | filter: {custom: false} ">{{standard.name}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Custom">\n                                    <md-option ng-value="custom" ng-repeat="custom in vm.fields | filter: {custom: true} ">{{custom.name}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="salesforceAccountItemForm.customField.$error" ng-show="salesforceAccountItemForm.customField.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.FIELD_REQUIRED">Field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- CUSTOM FIELD --\x3e\n                        <div ng-if="vm.customField && vm.customField.custom" ng-include="\'/subject.html\'"></div>\n                        \x3c!-- / CUSTOM FIELD --\x3e\n                        \x3c!-- STANDARD FIELD --\x3e\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="option" ng-model="vm.item.content" required>\n                                <md-option ng-value="option.value" ng-repeat="option in vm.customField.options">{{option.name}}</md-option>\n                            </md-select>\n                            <div ng-messages="salesforceAccountItemForm.option.$error" ng-show="salesforceAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && !vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <input type="text" name="option" ng-model="vm.item.content" required>\n                            <div ng-messages="salesforceAccountItemForm.option.$error" ng-show="salesforceAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- / STANDARD FIELD --\x3e\n                    </div>\n                    <div ng-if="!vm.accountConnected">\n                        <p>Account is not connected. Please check your configurations!</p>\n                    </div>\n                    \x3c!-- / FIELD SECTION --\x3e\n                </div>\n                <div ng-switch-default>\n                    <p>No Item</p>\n                </div>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newItem" ng-click="vm.saveItem()" class="send-button md-accent md-raised" ng-disabled="salesforceAccountItemForm.$invalid || salesforceAccountItemForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newItem" ng-click="vm.addNewItem()" class="send-button md-accent md-raised" ng-disabled="salesforceAccountItemForm.$invalid || salesforceAccountItemForm.$pristine" aria-label="ADD" translate="INTEGRATIONS.ADD" translate-attr-aria-label="INTEGRATIONS.ADD">\n                    ADD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newItem" ng-click="vm.deleteItem($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>\n\n<script type="text/ng-template" id="/subject.html">\n    <md-input-container class="md-block">\n        <label translate="INTEGRATIONS.TYPE">Type</label>\n        <md-select name="type" ng-model="vm.item.type" required>\n            <md-option value="string">String</md-option>\n            <md-option value="variable">Variable</md-option>\n            <md-option value="customVariable">Custom Variable</md-option>\n        </md-select>\n        <div ng-messages="salesforceAccountItemForm.type.$error" ng-show="salesforceAccountItemForm.type.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n        <label translate="INTEGRATIONS.CONTENT">Content</label>\n        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n        <div ng-messages="salesforceAccountItemForm.content.$error" ng-show="salesforceAccountItemForm.content.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'variable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n            <md-optgroup label="Voice: Queue">\n                <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n            </md-optgroup>\n            <md-optgroup label="Voice: Outbound">\n                <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n            </md-optgroup>\n        </md-select>\n        <div ng-messages="salesforceAccountItemForm.variableName.$error" ng-show="salesforceAccountItemForm.variableName.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'customVariable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select ng-model="vm.item.VariableId" required>\n            <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n        </md-select>\n    </md-input-container>\n<\/script>'),e.put("app/main/apps/integrations/views/salesforceAccounts/edit/view.html",'<div id="integrations-salesforceAccount" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-salesforceAccounts-button md-icon-button" aria-label="Go to salesforceAccounts" ng-click="vm.gotoSalesforceAccounts()" translate translate-attr-aria-label="INTEGRATIONS.GO_TO_SALESFORCEACCOUNTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="salesforceAccount-image" hide-xs>\n                    <img ng-src="assets/images/business/salesforceAccounts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.salesforceAccount.id}}\n                        <span ng-if="vm.salesforceAccount.name">{{vm.salesforceAccount.name}}</span>\n                        <span ng-if="vm.salesforceAccount.exten">{{vm.salesforceAccount.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="INTEGRATIONS.CREATED_AT"></span> <span>{{vm.salesforceAccount.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveSalesforceAccount()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (configurationsForm.$invalid)" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.ACCOUNT">ACCOUNT</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="salesforceAccount-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.salesforceAccount.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.TYPE">Type</label>\n                                <md-select name="type" ng-model="vm.salesforceAccount.type" required>\n\n                                    <md-option ng-value="\'integrationTab\'"> {{ \'INTEGRATIONS.INTEGRATION_TAB\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'newTab\'"> {{ \'INTEGRATIONS.NEW_TAB\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'type\'].$error" ng-show="generalForm[\'type\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.USERNAME">Username</label>\n                                <input type="text" name="username" ng-model="vm.salesforceAccount.username" ng-required="true">\n                                <div ng-messages="generalForm[\'username\'].$error" ng-show="generalForm[\'username\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.URI">Uri</label>\n                                <input type="url" name="remoteUri" ng-model="vm.salesforceAccount.remoteUri" ng-required="true">\n                                <div ng-messages="generalForm[\'remoteUri\'].$error" ng-show="generalForm[\'remoteUri\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED">Uri field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL">Uri must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.PASSWORD">Password</label>\n                                <input type="password" name="password" ng-model="vm.salesforceAccount.password" placeholder="Password" translate translate-attr-placeholder="INTEGRATIONS.PASSWORD" required>\n                                <div ng-messages="generalForm[\'password\'].$error" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.CLIENTID">ClientId</label>\n                                <input type="text" name="clientId" ng-model="vm.salesforceAccount.clientId" ng-required="true">\n                                <div ng-messages="generalForm[\'clientId\'].$error" ng-show="generalForm[\'clientId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.CLIENTID_REQUIRED">ClientId field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.CLIENTSECRET">ClientSecret</label>\n                                <input type="text" name="clientSecret" ng-model="vm.salesforceAccount.clientSecret" ng-required="true">\n                                <div ng-messages="generalForm[\'clientSecret\'].$error" ng-show="generalForm[\'clientSecret\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.CLIENTSECRET_REQUIRED">ClientSecret field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.SECURITYTOKEN">SecurityToken</label>\n                                <input type="text" name="securityToken" ng-model="vm.salesforceAccount.securityToken" ng-required="true">\n                                <div ng-messages="generalForm[\'securityToken\'].$error" ng-show="generalForm[\'securityToken\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.SECURITYTOKEN_REQUIRED">SecurityToken field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                                <input type="url" name="serverUrl" ng-model="vm.salesforceAccount.serverUrl">\n                                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                                <div ng-messages="generalForm[\'serverUrl\'].$error" ng-show="generalForm[\'serverUrl\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.salesforceAccount.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="salesforceAccount-detail-form-container configurations md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</div>\n                        </div>\n                        <div ng-controller="SalesforceAccountConfigurationsController as vm_cc" ng-init="vm_cc.init(vm.salesforceAccount)" layout="row">\n                            <md-card class="md-whiteframe-1dp" flex="30">\n                                <div layout="row" layout-align="center center">\n                                    <md-subheader flex="75" class="md-no-sticky">{{ \'INTEGRATIONS.CONFIGURATIONS\' | translate }}</md-subheader>\n                                    <md-button flex="25" ng-click="vm_cc.createOrEditSalesforceConfiguration($event)" class="md-icon-button" aria-label="create salesforceConfiguration">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                                <md-list>\n                                    <md-list-item layout="row" layout-align="center center" ng-repeat="salesforceConfiguration in vm_cc.configurations" class="border-top" md-colors="{background: (vm_cc.selectedSalesforceConfiguration == $index ? \'accent\' : \'grey-A100\')}" ng-click="vm_cc.getSalesforceConfiguration($index)">\n                                        <span class="text-truncate" flex="80">{{ salesforceConfiguration.name }}</span>\n                                        <md-menu ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_cc.deleteSalesforceConfiguration($event, salesforceConfiguration)" translate="INTEGRATIONS.DELETE_SALESFORCECONFIGURATION">\n                                                        Delete SalesforceConfiguration\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </md-list-item>\n                                </md-list>\n                            </md-card>\n                            <div flex></div>\n                            <md-card class="md-whiteframe-1dp" flex="65">\n                                <md-tabs ng-if="vm_cc.configurations.length" md-dynamic-height>\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.SUBJECTS">SUBJECTS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.subject = query" on-collapse="vm_cc.query.subject = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditSubject($event)" aria-label="add subject" translate translate-attr-label="INTEGRATIONS.ADD_SUBJECT">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedSubjects.length}} {{vm_cc.selectedSubjects.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedSubjects($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedSubjects">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="subject" md-select-id="id" ng-repeat="subject in vm_cc.subjects | filter: vm_cc.query.subject">\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="id ">{{subject.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="type ">\n                                                                <span ng-if="subject.FieldId">{{subject.nameField || subject.idField}}</span>\n                                                                <span ng-if="!subject.FieldId">{{subject.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="subject.type" ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell>\n                                                                <span ng-switch-when="string">{{subject.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{subject.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{subject.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{subject.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditSubject($event, subject)" translate="INTEGRATIONS.EDIT_SUBJECT">\n                                                                                Edit Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteSubjectConfirm($event, subject)" translate="INTEGRATIONS.DELETE_SUBJECT">\n                                                                                Delete Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.DESCRIPTIONS">DESCRIPTIONS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.description = query" on-collapse="vm_cc.query.description = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditDescription($event)" aria-label="add description" translate translate-attr-label="INTEGRATIONS.ADD_DESCRIPTION">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedDescriptions.length}} {{vm_cc.selectedDescriptions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedDescriptions($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedDescriptions">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="description" md-select-id="id" ng-repeat="description in vm_cc.descriptions | filter: vm_cc.query.description">\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="id ">{{description.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="type ">\n                                                                <span ng-if="description.FieldId">{{description.nameField || description.idField}}</span>\n                                                                <span ng-if="!description.FieldId">{{description.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="description.type" ng-click="vm_cc.createOrEditDescription($event, description)" md-cell>\n                                                                <span ng-switch-when="string">{{description.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{description.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{description.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{description.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditDescription($event, description)" translate="INTEGRATIONS.EDIT_DESCRIPTION">\n                                                                                Edit Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteDescriptionConfirm($event, description)" translate="INTEGRATIONS.DELETE_DESCRIPTION">\n                                                                                Delete Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.FIELDS">FIELDS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.field = query" on-collapse="vm_cc.query.field = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditField($event)" aria-label="add field" translate translate-attr-label="INTEGRATIONS.ADD_FIELD">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedFields.length}} {{vm_cc.selectedFields.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedFields($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedFields">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="field" md-select-id="id" ng-repeat="field in vm_cc.fields | filter: vm_cc.query.field">\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="id ">{{field.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="type ">\n                                                                <span ng-if="field.FieldId">{{field.nameField || field.idField}}</span>\n                                                                <span ng-if="!field.FieldId">{{field.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="field.type" ng-click="vm_cc.createOrEditField($event, field)" md-cell>\n                                                                <span ng-switch-when="string">{{field.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{field.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{field.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{field.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditField($event, field)" translate="INTEGRATIONS.EDIT_FIELD">\n                                                                                Edit Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteFieldConfirm($event, field)" translate="INTEGRATIONS.DELETE_FIELD">\n                                                                                Delete Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.ADVANCED">ADVANCED</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <div layout-margin>\n                                                <label translate="INTEGRATIONS.MODULE_SEARCH"></label>\n                                                <md-select ng-model="vm_cc.salesforceConfiguration.moduleSearch" ng-change="vm_cc.selectChangedAdvanced()">\n                                                    <md-option ng-value="option.key" ng-repeat="option in [{key: \'contact_lead\', value: \'Contact & Lead\'}, {key: \'contact\', value: \'Contact\'}, {key: \'lead\', value: \'Lead\'}]">{{ option.value }}</md-option>\n                                                </md-select>\n                                            </div>\n                                            <div layout-margin>\n                                                <label translate="INTEGRATIONS.MODULE_CREATE"></label>\n                                                <md-select ng-model="vm_cc.salesforceConfiguration.moduleCreate" ng-change="vm_cc.selectChangedAdvanced()">\n                                                    <md-option ng-value="option.key" ng-repeat="option in [{key: \'nothing\', value: \'Nothing\'}, {key: \'contact\', value: \'Contact\'}, {key: \'lead\', value: \'Lead\'}]">{{ option.value }}</md-option>\n                                                </md-select>\n                                            </div>\n                                        </md-tab-body>\n                                    </md-tab>\n\n\n                                </md-tabs>\n                                <div class="padding-20" ng-if="!vm_cc.configurations.length" ng-click="vm_cc.createOrEditSalesforceConfiguration($event)" layout="row" layout-sm="column" layout-align="center center" layout-wrap>\n                                    <div class="padding-20 md-whiteframe-3dp md-accent-bg" layout="column" layout-align="center center">\n                                        <md-button class="md-icon-button">\n                                            <md-icon md-font-icon="icon-plus"></md-icon>\n                                        </md-button>\n                                        <span aria-label="add configuration" translate translate-attr-label="INTEGRATIONS.ADD_CONFIGURATION">ADD CONFIGURATION</span>\n                                    </div>\n                                </div>\n                            </md-card>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/integrations/views/salesforceAccounts/salesforceAccounts.html",'<div id="salesforceAccounts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-heart" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="INTEGRATIONS.SALESFORCEACCOUNTS">SalesforceAccounts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="INTEGRATIONS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedSalesforceAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedSalesforceAccounts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="INTEGRATIONS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-salesforceAccounts-count">\n                    <span>{{vm.selectedSalesforceAccounts.length}}</span>\n                <span translate="INTEGRATIONS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="SALESFORCEACCOUNTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllSalesforceAccounts()" translate="INTEGRATIONS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectSalesforceAccounts()" translate="INTEGRATIONS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedSalesforceAccounts" csv-label="true" filename="salesforceAccounts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedSalesforceAccounts($event)" aria-label="delete selected" translate translate-attr-label="SALESFORCEACCOUNTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- SALESFORCEACCOUNT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedSalesforceAccounts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getSalesforceAccounts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'INTEGRATIONS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="username">{{ \'INTEGRATIONS.USERNAME\' | translate }}</th>\n                                <th md-column md-order-by="remoteUri">{{ \'INTEGRATIONS.URI\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.salesforceAccounts.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="INTEGRATIONS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="salesforceAccount" md-select-id="id" ng-repeat="salesforceAccount in vm.salesforceAccounts.rows">\n                                <td md-cell ng-if="salesforceAccount.userpic"><img class="avatar" alt="{{salesforceAccount.name}}" ng-src="api/users/{{salesforceAccount.id}}/avatar" /></td>\n                                <td md-cell ng-if="!salesforceAccount.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{salesforceAccount.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditSalesforceAccount($event, salesforceAccount)" md-cell class="id ">{{salesforceAccount.id}}</td>\n                                <td ng-click="vm.createOrEditSalesforceAccount($event, salesforceAccount)" md-cell class="name ">{{salesforceAccount.name}}</td>\n                                <td ng-click="vm.createOrEditSalesforceAccount($event, salesforceAccount)" md-cell class="username ">{{salesforceAccount.username}}</td>\n                                <td ng-click="vm.createOrEditSalesforceAccount($event, salesforceAccount)" md-cell class="remoteUri ">{{salesforceAccount.remoteUri}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(salesforceAccount, $event)" translate="INTEGRATIONS.EDIT_SALESFORCEACCOUNT">\n                                                    Edit SalesforceAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.testtestintegrationaccount(salesforceAccount, $event)" translate="INTEGRATIONS.TEST_SALESFORCEACCOUNT">\n                                                    Test SalesforceAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(salesforceAccount, $event)" translate="INTEGRATIONS.DELETE_SALESFORCEACCOUNT">\n                                                    Delete SalesforceAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'INTEGRATIONS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'INTEGRATIONS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'INTEGRATIONS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.salesforceAccounts.count}}" md-on-paginate="vm.getSalesforceAccounts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / SALESFORCEACCOUNT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD SALESFORCEACCOUNT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-salesforceAccount-button" ng-click="vm.createOrEditSalesforceAccount($event)" aria-label="add salesforceAccount" translate translate-attr-aria-label="INTEGRATIONS.ADD_SALESFORCEACCOUNT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD SALESFORCEACCOUNT BUTTON --\x3e\n</div>'),e.put("app/main/apps/integrations/views/sugarcrmAccounts/create/dialog.html",'<md-dialog class="sugarcrmAccount-dialog" aria-label="New SugarcrmAccount">\n    <form name="sugarcrmAccountForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.sugarcrmAccount.name" ng-required="true" autofocus>\n                <div ng-messages="sugarcrmAccountForm[\'name\'].$error" ng-show="sugarcrmAccountForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.USERNAME">Username</label>\n                <input type="text" name="username" ng-model="vm.sugarcrmAccount.username" ng-required="true">\n                <div ng-messages="sugarcrmAccountForm[\'username\'].$error" ng-show="sugarcrmAccountForm[\'username\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.URI">Uri</label>\n                <input type="url" name="remoteUri" ng-model="vm.sugarcrmAccount.remoteUri" ng-required="true">\n                <div ng-messages="sugarcrmAccountForm[\'remoteUri\'].$error" ng-show="sugarcrmAccountForm[\'remoteUri\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED">Uri field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL">Uri must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.PASSWORD">Password</label>\n                <input type="password" name="password" ng-model="vm.sugarcrmAccount.password" placeholder="Password" translate translate-attr-placeholder="INTEGRATIONS.PASSWORD" required>\n                <div ng-messages="sugarcrmAccountForm[\'password\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                <input type="url" name="serverUrl" ng-model="vm.sugarcrmAccount.serverUrl">\n                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                <div ng-messages="sugarcrmAccountForm[\'serverUrl\'].$error" ng-show="sugarcrmAccountForm[\'serverUrl\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.sugarcrmAccount.description">\n                <div ng-messages="sugarcrmAccountForm[\'description\'].$error" ng-show="sugarcrmAccountForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSugarcrmAccount" ng-click="vm.saveSugarcrmAccount()" class="send-button md-accent md-raised" ng-disabled="sugarcrmAccountForm.$invalid || sugarcrmAccountForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE"\n                    translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSugarcrmAccount" ng-click="vm.addNewSugarcrmAccount()" class="send-button md-accent md-raised" ng-disabled="sugarcrmAccountForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_SUGARCRMACCOUNT" translate-attr-aria-label="INTEGRATIONS.ADD_SUGARCRMACCOUNT">\n                    ADD SUGARCRMACCOUNT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSugarcrmAccount" ng-click="vm.deleteSugarcrmAccount($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/sugarcrmAccounts/edit/configurations/dialog.html",'<md-dialog class="sugarcrmConfiguration-dialog" aria-label="New SugarcrmConfiguration">\n    <form name="sugarcrmConfigurationForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.sugarcrmConfiguration.name" ng-required="true" autofocus>\n                <div ng-messages="sugarcrmConfigurationForm[\'name\'].$error" ng-show="sugarcrmConfigurationForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.CHANNEL">Channel</label>\n                <md-select name="channel" ng-model="vm.sugarcrmConfiguration.channel" required>\n\n                    <md-option ng-value="\'voice\'"> {{ \'INTEGRATIONS.VOICE\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="sugarcrmConfigurationForm[\'channel\'].$error" ng-show="sugarcrmConfigurationForm[\'channel\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.CHANNEL_REQUIRED">Channel field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.sugarcrmConfiguration.type" required>\n\n                    <md-option ng-value="\'inbound\'"> {{ \'INTEGRATIONS.INBOUND_IN_QUEUE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'outbound\'"> {{ \'INTEGRATIONS.OUTBOUND_CALL\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="sugarcrmConfigurationForm[\'type\'].$error" ng-show="sugarcrmConfigurationForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSugarcrmConfiguration" ng-click="vm.saveSugarcrmConfiguration()" class="send-button md-accent md-raised" ng-disabled="sugarcrmConfigurationForm.$invalid || sugarcrmConfigurationForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE"\n                    translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSugarcrmConfiguration" ng-click="vm.addNewSugarcrmConfiguration()" class="send-button md-accent md-raised" ng-disabled="sugarcrmConfigurationForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_SUGARCRMCONFIGURATION"\n                    translate-attr-aria-label="INTEGRATIONS.ADD_SUGARCRMCONFIGURATION">\n                    ADD SUGARCRMCONFIGURATION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSugarcrmConfiguration" ng-click="vm.deleteSugarcrmConfiguration($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/sugarcrmAccounts/edit/item/dialog.html",'<md-dialog class="sugarcrmAccount-item-dialog" aria-label="New Item">\n    <form name="sugarcrmAccountItemForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <div ng-switch="vm.type">\n                <div ng-switch-when="subject">\n                    \x3c!-- SUBJECT SECTION --\x3e\n                    <div ng-include="\'/subject.html\'"></div>\n                    \x3c!-- / SUBJECT SECTION --\x3e\n                </div>\n                <div ng-switch-when="description">\n                    \x3c!-- DESCRIPTION SECTION --\x3e\n                    <md-input-container class="md-block">\n                        <label translate="INTEGRATIONS.TYPE">Type</label>\n                        <md-select name="type" ng-model="vm.item.type" required>\n                            <md-option value="string">String</md-option>\n                            <md-option value="keyValue">Key Value</md-option>\n                        </md-select>\n                        <div ng-messages="sugarcrmAccountItemForm.type.$error" ng-show="sugarcrmAccountItemForm.type.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n                        <label translate="INTEGRATIONS.CONTENT">Content</label>\n                        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n                        <div ng-messages="sugarcrmAccountItemForm.content.$error" ng-show="sugarcrmAccountItemForm.content.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <div ng-if="vm.item.type == \'keyValue\'">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.KEY">Key</label>\n                            <input type="text" name="key" ng-model="vm.item.key" required md-autofocus>\n                            <div ng-messages="sugarcrmAccountItemForm.key.$error" ng-show="sugarcrmAccountItemForm.key.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.KEY_REQUIRED">Key field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.TYPE">Type</label>\n                            <md-select name="keyType" ng-model="vm.item.keyType" required>\n                                <md-option value="string">String</md-option>\n                                <md-option value="variable">Variable</md-option>\n                                <md-option value="customVariable">Custom Variable</md-option>\n                            </md-select>\n                            <div ng-messages="sugarcrmAccountItemForm.keyType.$error" ng-show="sugarcrmAccountItemForm.keyType.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'string\'">\n                            <label translate="INTEGRATIONS.CONTENT">Content</label>\n                            <input type="text" name="keyContent" ng-model="vm.item.keyContent" required md-autofocus>\n                            <div ng-messages="sugarcrmAccountItemForm.keyContent.$error" ng-show="sugarcrmAccountItemForm.keyContent.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'variable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n                                <md-optgroup label="Voice: Queue">\n                                    <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Voice: Outbound">\n                                    <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="sugarcrmAccountItemForm.variableName.$error" ng-show="sugarcrmAccountItemForm.variableName.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'customVariable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select ng-model="vm.item.VariableId" required>\n                                <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n                            </md-select>\n                        </md-input-container>\n                    </div>\n                    \x3c!-- / DESCRIPTION SECTION --\x3e\n                </div>\n                <div ng-switch-when="field">\n                    \x3c!-- FIELD SECTION --\x3e\n                    <div ng-if="vm.accountConnected">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.FIELD">FIELD</label>\n                            <md-select name="customField" ng-model="vm.customField" required>\n                                <md-optgroup label="Standard">\n                                    <md-option ng-value="standard" ng-repeat="standard in vm.fields | filter: {custom: false} ">{{standard.name}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Custom">\n                                    <md-option ng-value="custom" ng-repeat="custom in vm.fields | filter: {custom: true} ">{{custom.name}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="sugarcrmAccountItemForm.customField.$error" ng-show="sugarcrmAccountItemForm.customField.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.FIELD_REQUIRED">Field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- CUSTOM FIELD --\x3e\n                        <div ng-if="vm.customField && vm.customField.custom" ng-include="\'/subject.html\'"></div>\n                        \x3c!-- / CUSTOM FIELD --\x3e\n                        \x3c!-- STANDARD FIELD --\x3e\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="option" ng-model="vm.item.content" required>\n                                <md-option ng-value="option.value" ng-repeat="option in vm.customField.options">{{option.name}}</md-option>\n                            </md-select>\n                            <div ng-messages="sugarcrmAccountItemForm.option.$error" ng-show="sugarcrmAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && !vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <input type="text" name="option" ng-model="vm.item.content" required>\n                            <div ng-messages="sugarcrmAccountItemForm.option.$error" ng-show="sugarcrmAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- / STANDARD FIELD --\x3e\n                    </div>\n                    <div ng-if="!vm.accountConnected">\n                        <p>Account is not connected. Please check your configurations!</p>\n                    </div>\n                    \x3c!-- / FIELD SECTION --\x3e\n                </div>\n                <div ng-switch-default>\n                    <p>No Item</p>\n                </div>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newItem" ng-click="vm.saveItem()" class="send-button md-accent md-raised" ng-disabled="sugarcrmAccountItemForm.$invalid || sugarcrmAccountItemForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newItem" ng-click="vm.addNewItem()" class="send-button md-accent md-raised" ng-disabled="sugarcrmAccountItemForm.$invalid || sugarcrmAccountItemForm.$pristine" aria-label="ADD" translate="INTEGRATIONS.ADD" translate-attr-aria-label="INTEGRATIONS.ADD">\n                    ADD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newItem" ng-click="vm.deleteItem($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>\n\n<script type="text/ng-template" id="/subject.html">\n    <md-input-container class="md-block">\n        <label translate="INTEGRATIONS.TYPE">Type</label>\n        <md-select name="type" ng-model="vm.item.type" required>\n            <md-option value="string">String</md-option>\n            <md-option value="variable">Variable</md-option>\n            <md-option value="customVariable">Custom Variable</md-option>\n        </md-select>\n        <div ng-messages="sugarcrmAccountItemForm.type.$error" ng-show="sugarcrmAccountItemForm.type.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n        <label translate="INTEGRATIONS.CONTENT">Content</label>\n        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n        <div ng-messages="sugarcrmAccountItemForm.content.$error" ng-show="sugarcrmAccountItemForm.content.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'variable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n            <md-optgroup label="Voice: Queue">\n                <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n            </md-optgroup>\n            <md-optgroup label="Voice: Outbound">\n                <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n            </md-optgroup>\n        </md-select>\n        <div ng-messages="sugarcrmAccountItemForm.variableName.$error" ng-show="sugarcrmAccountItemForm.variableName.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'customVariable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select ng-model="vm.item.VariableId" required>\n            <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n        </md-select>\n    </md-input-container>\n<\/script>'),e.put("app/main/apps/integrations/views/sugarcrmAccounts/edit/view.html",'<div id="integrations-sugarcrmAccount" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-sugarcrmAccounts-button md-icon-button" aria-label="Go to sugarcrmAccounts" ng-click="vm.gotoSugarcrmAccounts()" translate translate-attr-aria-label="INTEGRATIONS.GO_TO_SUGARCRMACCOUNTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="sugarcrmAccount-image" hide-xs>\n                    <img ng-src="assets/images/business/sugarcrmAccounts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.sugarcrmAccount.id}}\n                        <span ng-if="vm.sugarcrmAccount.name">{{vm.sugarcrmAccount.name}}</span>\n                        <span ng-if="vm.sugarcrmAccount.exten">{{vm.sugarcrmAccount.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="INTEGRATIONS.CREATED_AT"></span> <span>{{vm.sugarcrmAccount.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveSugarcrmAccount()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (configurationsForm.$invalid)" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.ACCOUNT">ACCOUNT</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="sugarcrmAccount-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.sugarcrmAccount.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.USERNAME">Username</label>\n                                <input type="text" name="username" ng-model="vm.sugarcrmAccount.username" ng-required="true">\n                                <div ng-messages="generalForm[\'username\'].$error" ng-show="generalForm[\'username\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.URI">Uri</label>\n                                <input type="url" name="remoteUri" ng-model="vm.sugarcrmAccount.remoteUri" ng-required="true">\n                                <div ng-messages="generalForm[\'remoteUri\'].$error" ng-show="generalForm[\'remoteUri\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED">Uri field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL">Uri must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.PASSWORD">Password</label>\n                                <input type="password" name="password" ng-model="vm.sugarcrmAccount.password" placeholder="Password" translate translate-attr-placeholder="INTEGRATIONS.PASSWORD" required>\n                                <div ng-messages="generalForm[\'password\'].$error" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                                <input type="url" name="serverUrl" ng-model="vm.sugarcrmAccount.serverUrl">\n                                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                                <div ng-messages="generalForm[\'serverUrl\'].$error" ng-show="generalForm[\'serverUrl\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.sugarcrmAccount.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="sugarcrmAccount-detail-form-container configurations md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</div>\n                        </div>\n                        <div ng-controller="SugarcrmAccountConfigurationsController as vm_cc" ng-init="vm_cc.init(vm.sugarcrmAccount)" layout="row">\n                            <md-card class="md-whiteframe-1dp" flex="30">\n                                <div layout="row" layout-align="center center">\n                                    <md-subheader flex="75" class="md-no-sticky">{{ \'INTEGRATIONS.CONFIGURATIONS\' | translate }}</md-subheader>\n                                    <md-button flex="25" ng-click="vm_cc.createOrEditSugarcrmConfiguration($event)" class="md-icon-button" aria-label="create sugarcrmConfiguration">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                                <md-list>\n                                    <md-list-item layout="row" layout-align="center center" ng-repeat="sugarcrmConfiguration in vm_cc.configurations" class="border-top" md-colors="{background: (vm_cc.selectedSugarcrmConfiguration == $index ? \'accent\' : \'grey-A100\')}" ng-click="vm_cc.getSugarcrmConfiguration($index)">\n                                        <span class="text-truncate" flex="80">{{ sugarcrmConfiguration.name }}</span>\n                                        <md-menu ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_cc.deleteSugarcrmConfiguration($event, sugarcrmConfiguration)" translate="INTEGRATIONS.DELETE_SUGARCRMCONFIGURATION">\n                                                        Delete SugarcrmConfiguration\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </md-list-item>\n                                </md-list>\n                            </md-card>\n                            <div flex></div>\n                            <md-card class="md-whiteframe-1dp" flex="65">\n                                <md-tabs ng-if="vm_cc.configurations.length" md-dynamic-height>\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.SUBJECTS">SUBJECTS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.subject = query" on-collapse="vm_cc.query.subject = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditSubject($event)" aria-label="add subject" translate translate-attr-label="INTEGRATIONS.ADD_SUBJECT">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedSubjects.length}} {{vm_cc.selectedSubjects.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedSubjects($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedSubjects">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="subject" md-select-id="id" ng-repeat="subject in vm_cc.subjects | filter: vm_cc.query.subject">\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="id ">{{subject.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="type ">\n                                                                <span ng-if="subject.FieldId">{{subject.nameField || subject.idField}}</span>\n                                                                <span ng-if="!subject.FieldId">{{subject.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="subject.type" ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell>\n                                                                <span ng-switch-when="string">{{subject.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{subject.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{subject.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{subject.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditSubject($event, subject)" translate="INTEGRATIONS.EDIT_SUBJECT">\n                                                                                Edit Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteSubjectConfirm($event, subject)" translate="INTEGRATIONS.DELETE_SUBJECT">\n                                                                                Delete Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.DESCRIPTIONS">DESCRIPTIONS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.description = query" on-collapse="vm_cc.query.description = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditDescription($event)" aria-label="add description" translate translate-attr-label="INTEGRATIONS.ADD_DESCRIPTION">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedDescriptions.length}} {{vm_cc.selectedDescriptions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedDescriptions($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedDescriptions">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="description" md-select-id="id" ng-repeat="description in vm_cc.descriptions | filter: vm_cc.query.description">\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="id ">{{description.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="type ">\n                                                                <span ng-if="description.FieldId">{{description.nameField || description.idField}}</span>\n                                                                <span ng-if="!description.FieldId">{{description.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="description.type" ng-click="vm_cc.createOrEditDescription($event, description)" md-cell>\n                                                                <span ng-switch-when="string">{{description.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{description.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{description.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{description.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditDescription($event, description)" translate="INTEGRATIONS.EDIT_DESCRIPTION">\n                                                                                Edit Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteDescriptionConfirm($event, description)" translate="INTEGRATIONS.DELETE_DESCRIPTION">\n                                                                                Delete Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.FIELDS">FIELDS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.field = query" on-collapse="vm_cc.query.field = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditField($event)" aria-label="add field" translate translate-attr-label="INTEGRATIONS.ADD_FIELD">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedFields.length}} {{vm_cc.selectedFields.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedFields($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedFields">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="field" md-select-id="id" ng-repeat="field in vm_cc.fields | filter: vm_cc.query.field">\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="id ">{{field.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="type ">\n                                                                <span ng-if="field.FieldId">{{field.nameField || field.idField}}</span>\n                                                                <span ng-if="!field.FieldId">{{field.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="field.type" ng-click="vm_cc.createOrEditField($event, field)" md-cell>\n                                                                <span ng-switch-when="string">{{field.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{field.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{field.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{field.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditField($event, field)" translate="INTEGRATIONS.EDIT_FIELD">\n                                                                                Edit Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteFieldConfirm($event, field)" translate="INTEGRATIONS.DELETE_FIELD">\n                                                                                Delete Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n\n                                </md-tabs>\n                                <div class="padding-20" ng-if="!vm_cc.configurations.length" ng-click="vm_cc.createOrEditSugarcrmConfiguration($event)" layout="row" layout-sm="column" layout-align="center center" layout-wrap>\n                                    <div class="padding-20 md-whiteframe-3dp md-accent-bg" layout="column" layout-align="center center">\n                                        <md-button class="md-icon-button">\n                                            <md-icon md-font-icon="icon-plus"></md-icon>\n                                        </md-button>\n                                        <span aria-label="add configuration" translate translate-attr-label="INTEGRATIONS.ADD_CONFIGURATION">ADD CONFIGURATION</span>\n                                    </div>\n                                </div>\n                            </md-card>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/integrations/views/sugarcrmAccounts/sugarcrmAccounts.html",'<div id="sugarcrmAccounts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-heart" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="INTEGRATIONS.SUGARCRMACCOUNTS">SugarcrmAccounts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="INTEGRATIONS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedSugarcrmAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedSugarcrmAccounts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="INTEGRATIONS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-sugarcrmAccounts-count">\n                    <span>{{vm.selectedSugarcrmAccounts.length}}</span>\n                <span translate="INTEGRATIONS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="SUGARCRMACCOUNTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllSugarcrmAccounts()" translate="INTEGRATIONS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectSugarcrmAccounts()" translate="INTEGRATIONS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedSugarcrmAccounts" csv-label="true" filename="sugarcrmAccounts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedSugarcrmAccounts($event)" aria-label="delete selected" translate translate-attr-label="SUGARCRMACCOUNTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- SUGARCRMACCOUNT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedSugarcrmAccounts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getSugarcrmAccounts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'INTEGRATIONS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="username">{{ \'INTEGRATIONS.USERNAME\' | translate }}</th>\n                                <th md-column md-order-by="remoteUri">{{ \'INTEGRATIONS.URI\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.sugarcrmAccounts.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="INTEGRATIONS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="sugarcrmAccount" md-select-id="id" ng-repeat="sugarcrmAccount in vm.sugarcrmAccounts.rows">\n                                <td md-cell ng-if="sugarcrmAccount.userpic"><img class="avatar" alt="{{sugarcrmAccount.name}}" ng-src="api/users/{{sugarcrmAccount.id}}/avatar" /></td>\n                                <td md-cell ng-if="!sugarcrmAccount.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{sugarcrmAccount.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditSugarcrmAccount($event, sugarcrmAccount)" md-cell class="id ">{{sugarcrmAccount.id}}</td>\n                                <td ng-click="vm.createOrEditSugarcrmAccount($event, sugarcrmAccount)" md-cell class="name ">{{sugarcrmAccount.name}}</td>\n                                <td ng-click="vm.createOrEditSugarcrmAccount($event, sugarcrmAccount)" md-cell class="username ">{{sugarcrmAccount.username}}</td>\n                                <td ng-click="vm.createOrEditSugarcrmAccount($event, sugarcrmAccount)" md-cell class="remoteUri ">{{sugarcrmAccount.remoteUri}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(sugarcrmAccount, $event)" translate="INTEGRATIONS.EDIT_SUGARCRMACCOUNT">\n                                                    Edit SugarcrmAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.testtestintegrationaccount(sugarcrmAccount, $event)" translate="INTEGRATIONS.TEST_SUGARCRMACCOUNT">\n                                                    Test SugarcrmAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(sugarcrmAccount, $event)" translate="INTEGRATIONS.DELETE_SUGARCRMACCOUNT">\n                                                    Delete SugarcrmAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'INTEGRATIONS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'INTEGRATIONS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'INTEGRATIONS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.sugarcrmAccounts.count}}" md-on-paginate="vm.getSugarcrmAccounts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / SUGARCRMACCOUNT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD SUGARCRMACCOUNT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-sugarcrmAccount-button" ng-click="vm.createOrEditSugarcrmAccount($event)" aria-label="add sugarcrmAccount" translate translate-attr-aria-label="INTEGRATIONS.ADD_SUGARCRMACCOUNT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD SUGARCRMACCOUNT BUTTON --\x3e\n</div>'),e.put("app/main/apps/integrations/views/zendeskAccounts/create/dialog.html",'<md-dialog class="zendeskAccount-dialog" aria-label="New ZendeskAccount">\n    <form name="zendeskAccountForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.zendeskAccount.name" ng-required="true" autofocus>\n                <div ng-messages="zendeskAccountForm[\'name\'].$error" ng-show="zendeskAccountForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.zendeskAccount.type" required>\n\n                    <md-option ng-value="\'integrationTab\'"> {{ \'INTEGRATIONS.INTEGRATION_TAB\' | translate }}</md-option>\n\n                    <md-option ng-value="\'newTab\'"> {{ \'INTEGRATIONS.NEW_TAB\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="zendeskAccountForm[\'type\'].$error" ng-show="zendeskAccountForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.USERNAME">Username</label>\n                <input type="text" name="username" ng-model="vm.zendeskAccount.username" ng-required="true">\n                <div ng-messages="zendeskAccountForm[\'username\'].$error" ng-show="zendeskAccountForm[\'username\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.URI">Uri</label>\n                <input type="url" name="remoteUri" ng-model="vm.zendeskAccount.remoteUri" ng-required="true">\n                <div ng-messages="zendeskAccountForm[\'remoteUri\'].$error" ng-show="zendeskAccountForm[\'remoteUri\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED">Uri field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL">Uri must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.AUTHTYPE">AuthType</label>\n                <md-select name="authType" ng-model="vm.zendeskAccount.authType" required>\n                    <md-option ng-value="\'password\'">Password</md-option>\n                    <md-option ng-value="\'token\'">Token</md-option>\n                </md-select>\n                <div ng-messages="zendeskAccountForm[\'authType\'].$error" ng-show="zendeskAccountForm[\'authType\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.AUTHTYPE_REQUIRED">AuthType field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.zendeskAccount.authType == \'password\'">\n                <label translate="INTEGRATIONS.PASSWORD">Password</label>\n                <input type="password" name="password" ng-model="vm.zendeskAccount.password" placeholder="Password" translate translate-attr-placeholder="INTEGRATIONS.PASSWORD" required>\n                <div ng-messages="zendeskAccountForm[\'password\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container ng-if="vm.zendeskAccount.authType == \'token\'" class="md-block">\n                <label translate="INTEGRATIONS.TOKEN">Token</label>\n                <input type="text" name="token" ng-model="vm.zendeskAccount.token" ng-required="true">\n                <div ng-messages="zendeskAccountForm[\'token\'].$error" ng-show="zendeskAccountForm[\'token\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.TOKEN_REQUIRED">Token field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                <input type="url" name="serverUrl" ng-model="vm.zendeskAccount.serverUrl">\n                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                <div ng-messages="zendeskAccountForm[\'serverUrl\'].$error" ng-show="zendeskAccountForm[\'serverUrl\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.zendeskAccount.description">\n                <div ng-messages="zendeskAccountForm[\'description\'].$error" ng-show="zendeskAccountForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newZendeskAccount" ng-click="vm.saveZendeskAccount()" class="send-button md-accent md-raised" ng-disabled="zendeskAccountForm.$invalid || zendeskAccountForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE"\n                    translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newZendeskAccount" ng-click="vm.addNewZendeskAccount()" class="send-button md-accent md-raised" ng-disabled="zendeskAccountForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_ZENDESKACCOUNT" translate-attr-aria-label="INTEGRATIONS.ADD_ZENDESKACCOUNT">\n                    ADD ZENDESKACCOUNT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newZendeskAccount" ng-click="vm.deleteZendeskAccount($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/zendeskAccounts/edit/item/dialog.html",'<md-dialog class="zendeskAccount-item-dialog" aria-label="New Item">\n    <form name="zendeskAccountItemForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <div ng-switch="vm.type">\n                <div ng-switch-when="subject">\n                    \x3c!-- SUBJECT SECTION --\x3e\n                    <div ng-include="\'/subject.html\'"></div>\n                    \x3c!-- / SUBJECT SECTION --\x3e\n                </div>\n                <div ng-switch-when="description">\n                    \x3c!-- DESCRIPTION SECTION --\x3e\n                    <md-input-container class="md-block">\n                        <label translate="INTEGRATIONS.TYPE">Type</label>\n                        <md-select name="type" ng-model="vm.item.type" required>\n                            <md-option value="string">String</md-option>\n                            <md-option value="keyValue">Key Value</md-option>\n                        </md-select>\n                        <div ng-messages="zendeskAccountItemForm.type.$error" ng-show="zendeskAccountItemForm.type.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n                        <label translate="INTEGRATIONS.CONTENT">Content</label>\n                        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n                        <div ng-messages="zendeskAccountItemForm.content.$error" ng-show="zendeskAccountItemForm.content.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <div ng-if="vm.item.type == \'keyValue\'">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.KEY">Key</label>\n                            <input type="text" name="key" ng-model="vm.item.key" required md-autofocus>\n                            <div ng-messages="zendeskAccountItemForm.key.$error" ng-show="zendeskAccountItemForm.key.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.KEY_REQUIRED">Key field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.TYPE">Type</label>\n                            <md-select name="keyType" ng-model="vm.item.keyType" required>\n                                <md-option value="string">String</md-option>\n                                <md-option value="variable">Variable</md-option>\n                                <md-option value="customVariable">Custom Variable</md-option>\n                            </md-select>\n                            <div ng-messages="zendeskAccountItemForm.keyType.$error" ng-show="zendeskAccountItemForm.keyType.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'string\'">\n                            <label translate="INTEGRATIONS.CONTENT">Content</label>\n                            <input type="text" name="keyContent" ng-model="vm.item.keyContent" required md-autofocus>\n                            <div ng-messages="zendeskAccountItemForm.keyContent.$error" ng-show="zendeskAccountItemForm.keyContent.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'variable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n                                <md-optgroup label="Voice: Queue">\n                                    <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Voice: Outbound">\n                                    <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="zendeskAccountItemForm.variableName.$error" ng-show="zendeskAccountItemForm.variableName.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'customVariable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select ng-model="vm.item.VariableId" required>\n                                <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n                            </md-select>\n                        </md-input-container>\n                    </div>\n                    \x3c!-- / DESCRIPTION SECTION --\x3e\n                </div>\n                <div ng-switch-when="field">\n                    \x3c!-- FIELD SECTION --\x3e\n                    <div ng-if="vm.accountConnected">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.FIELD">FIELD</label>\n                            <md-select name="customField" ng-model="vm.customField" required>\n                                <md-optgroup label="Standard">\n                                    <md-option ng-value="standard" ng-repeat="standard in vm.fields | filter: {custom: false} ">{{standard.name}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Custom">\n                                    <md-option ng-value="custom" ng-repeat="custom in vm.fields | filter: {custom: true} ">{{custom.name}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="zendeskAccountItemForm.customField.$error" ng-show="zendeskAccountItemForm.customField.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.FIELD_REQUIRED">Field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- CUSTOM FIELD --\x3e\n                        <div ng-if="vm.customField && vm.customField.custom" ng-include="\'/subject.html\'"></div>\n                        \x3c!-- / CUSTOM FIELD --\x3e\n                        \x3c!-- STANDARD FIELD --\x3e\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="option" ng-model="vm.item.content" required>\n                                <md-option ng-value="option.value" ng-repeat="option in vm.customField.options">{{option.name}}</md-option>\n                            </md-select>\n                            <div ng-messages="zendeskAccountItemForm.option.$error" ng-show="zendeskAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && !vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <input type="text" name="option" ng-model="vm.item.content" required>\n                            <div ng-messages="zendeskAccountItemForm.option.$error" ng-show="zendeskAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- / STANDARD FIELD --\x3e\n                    </div>\n                    <div ng-if="!vm.accountConnected">\n                        <p>Account is not connected. Please check your configurations!</p>\n                    </div>\n                    \x3c!-- / FIELD SECTION --\x3e\n                </div>\n                <div ng-switch-default>\n                    <p>No Item</p>\n                </div>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newItem" ng-click="vm.saveItem()" class="send-button md-accent md-raised" ng-disabled="zendeskAccountItemForm.$invalid || zendeskAccountItemForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newItem" ng-click="vm.addNewItem()" class="send-button md-accent md-raised" ng-disabled="zendeskAccountItemForm.$invalid || zendeskAccountItemForm.$pristine" aria-label="ADD" translate="INTEGRATIONS.ADD" translate-attr-aria-label="INTEGRATIONS.ADD">\n                    ADD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newItem" ng-click="vm.deleteItem($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>\n\n<script type="text/ng-template" id="/subject.html">\n    <md-input-container class="md-block">\n        <label translate="INTEGRATIONS.TYPE">Type</label>\n        <md-select name="type" ng-model="vm.item.type" required>\n            <md-option value="string">String</md-option>\n            <md-option value="variable">Variable</md-option>\n            <md-option value="customVariable">Custom Variable</md-option>\n        </md-select>\n        <div ng-messages="zendeskAccountItemForm.type.$error" ng-show="zendeskAccountItemForm.type.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n        <label translate="INTEGRATIONS.CONTENT">Content</label>\n        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n        <div ng-messages="zendeskAccountItemForm.content.$error" ng-show="zendeskAccountItemForm.content.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'variable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n            <md-optgroup label="Voice: Queue">\n                <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n            </md-optgroup>\n            <md-optgroup label="Voice: Outbound">\n                <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n            </md-optgroup>\n        </md-select>\n        <div ng-messages="zendeskAccountItemForm.variableName.$error" ng-show="zendeskAccountItemForm.variableName.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'customVariable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select ng-model="vm.item.VariableId" required>\n            <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n        </md-select>\n    </md-input-container>\n<\/script>'),e.put("app/main/apps/integrations/views/zendeskAccounts/edit/view.html",'<div id="integrations-zendeskAccount" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-zendeskAccounts-button md-icon-button" aria-label="Go to zendeskAccounts" ng-click="vm.gotoZendeskAccounts()" translate translate-attr-aria-label="INTEGRATIONS.GO_TO_ZENDESKACCOUNTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="zendeskAccount-image" hide-xs>\n                    <img ng-src="assets/images/business/zendeskAccounts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.zendeskAccount.id}}\n                        <span ng-if="vm.zendeskAccount.name">{{vm.zendeskAccount.name}}</span>\n                        <span ng-if="vm.zendeskAccount.exten">{{vm.zendeskAccount.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="INTEGRATIONS.CREATED_AT"></span> <span>{{vm.zendeskAccount.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveZendeskAccount()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (zendeskConfigurationsForm.$invalid)" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.ACCOUNT">ACCOUNT</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="zendeskAccount-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.zendeskAccount.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.TYPE">Type</label>\n                                <md-select name="type" ng-model="vm.zendeskAccount.type" required>\n\n                                    <md-option ng-value="\'integrationTab\'"> {{ \'INTEGRATIONS.INTEGRATION_TAB\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'newTab\'"> {{ \'INTEGRATIONS.NEW_TAB\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'type\'].$error" ng-show="generalForm[\'type\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.USERNAME">Username</label>\n                                <input type="text" name="username" ng-model="vm.zendeskAccount.username" ng-required="true">\n                                <div ng-messages="generalForm[\'username\'].$error" ng-show="generalForm[\'username\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.URI">Uri</label>\n                                <input type="url" name="remoteUri" ng-model="vm.zendeskAccount.remoteUri" ng-required="true">\n                                <div ng-messages="generalForm[\'remoteUri\'].$error" ng-show="generalForm[\'remoteUri\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED">Uri field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL">Uri must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.AUTHTYPE">AuthType</label>\n                                <md-select name="authType" ng-model="vm.zendeskAccount.authType" required>\n                                    <md-option ng-value="\'password\'">Password</md-option>\n                                    <md-option ng-value="\'token\'">Token</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'authType\'].$error" ng-show="generalForm[\'authType\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.AUTHTYPE_REQUIRED">AuthType field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block" ng-if="vm.zendeskAccount.authType == \'password\'">\n                                <label translate="INTEGRATIONS.PASSWORD">Password</label>\n                                <input type="password" name="password" ng-model="vm.zendeskAccount.password" placeholder="Password" translate translate-attr-placeholder="INTEGRATIONS.PASSWORD" required>\n                                <div ng-messages="generalForm[\'password\'].$error" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <md-input-container ng-if="vm.zendeskAccount.authType == \'token\'" class="md-block">\n                                <label translate="INTEGRATIONS.TOKEN">Token</label>\n                                <input type="text" name="token" ng-model="vm.zendeskAccount.token" ng-required="true">\n                                <div ng-messages="generalForm[\'token\'].$error" ng-show="generalForm[\'token\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.TOKEN_REQUIRED">Token field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                                <input type="url" name="serverUrl" ng-model="vm.zendeskAccount.serverUrl">\n                                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                                <div ng-messages="generalForm[\'serverUrl\'].$error" ng-show="generalForm[\'serverUrl\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.zendeskAccount.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="zendeskAccount-detail-form-container zendeskconfigurations md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.ZENDESKCONFIGURATIONS">ZENDESKCONFIGURATIONS</div>\n                        </div>\n                        <div ng-controller="ZendeskAccountConfigurationsController as vm_cc" ng-init="vm_cc.init(vm.zendeskAccount)" layout="row">\n                            <md-card class="md-whiteframe-1dp" flex="30">\n                                <div layout="row" layout-align="center center">\n                                    <md-subheader flex="75" class="md-no-sticky">{{ \'INTEGRATIONS.CONFIGURATIONS\' | translate }}</md-subheader>\n                                    <md-button flex="25" ng-click="vm_cc.createOrEditZendeskConfiguration($event)" class="md-icon-button" aria-label="create zendeskConfiguration">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                                <md-list>\n                                    <md-list-item layout="row" layout-align="center center" ng-repeat="zendeskConfiguration in vm_cc.zendeskConfigurations" class="border-top" md-colors="{background: (vm_cc.selectedZendeskConfiguration == $index ? \'accent\' : \'grey-A100\')}" ng-click="vm_cc.getZendeskConfiguration($index)">\n                                        <span class="text-truncate" flex="80">{{ zendeskConfiguration.name }}</span>\n                                        <md-menu ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_cc.deleteZendeskConfiguration($event, zendeskConfiguration)" translate="INTEGRATIONS.DELETE_ZENDESKCONFIGURATION">\n                                                        Delete ZendeskConfiguration\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </md-list-item>\n                                </md-list>\n                            </md-card>\n                            <div flex></div>\n                            <md-card class="md-whiteframe-1dp" flex="65">\n                                <md-tabs ng-if="vm_cc.zendeskConfigurations.length" md-dynamic-height>\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.SUBJECTS">SUBJECTS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.subject = query" on-collapse="vm_cc.query.subject = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditSubject($event)" aria-label="add subject" translate translate-attr-label="INTEGRATIONS.ADD_SUBJECT">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedSubjects.length}} {{vm_cc.selectedSubjects.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedSubjects($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedSubjects">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="subject" md-select-id="id" ng-repeat="subject in vm_cc.subjects | filter: vm_cc.query.subject">\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="id ">{{subject.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="type ">\n                                                                <span ng-if="subject.FieldId">{{subject.nameField || subject.idField}}</span>\n                                                                <span ng-if="!subject.FieldId">{{subject.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="subject.type" ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell>\n                                                                <span ng-switch-when="string">{{subject.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{subject.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{subject.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{subject.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditSubject($event, subject)" translate="INTEGRATIONS.EDIT_SUBJECT">\n                                                                                Edit Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteSubjectConfirm($event, subject)" translate="INTEGRATIONS.DELETE_SUBJECT">\n                                                                                Delete Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.DESCRIPTIONS">DESCRIPTIONS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.description = query" on-collapse="vm_cc.query.description = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditDescription($event)" aria-label="add description" translate translate-attr-label="INTEGRATIONS.ADD_DESCRIPTION">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedDescriptions.length}} {{vm_cc.selectedDescriptions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedDescriptions($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedDescriptions">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="description" md-select-id="id" ng-repeat="description in vm_cc.descriptions | filter: vm_cc.query.description">\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="id ">{{description.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="type ">\n                                                                <span ng-if="description.FieldId">{{description.nameField || description.idField}}</span>\n                                                                <span ng-if="!description.FieldId">{{description.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="description.type" ng-click="vm_cc.createOrEditDescription($event, description)" md-cell>\n                                                                <span ng-switch-when="string">{{description.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{description.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{description.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{description.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditDescription($event, description)" translate="INTEGRATIONS.EDIT_DESCRIPTION">\n                                                                                Edit Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteDescriptionConfirm($event, description)" translate="INTEGRATIONS.DELETE_DESCRIPTION">\n                                                                                Delete Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.FIELDS">FIELDS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.field = query" on-collapse="vm_cc.query.field = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditField($event)" aria-label="add field" translate translate-attr-label="INTEGRATIONS.ADD_FIELD">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedFields.length}} {{vm_cc.selectedFields.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedFields($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedFields">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="field" md-select-id="id" ng-repeat="field in vm_cc.fields | filter: vm_cc.query.field">\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="id ">{{field.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="type ">\n                                                                <span ng-if="field.FieldId">{{field.nameField || field.idField}}</span>\n                                                                <span ng-if="!field.FieldId">{{field.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="field.type" ng-click="vm_cc.createOrEditField($event, field)" md-cell>\n                                                                <span ng-switch-when="string">{{field.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{field.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{field.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{field.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditField($event, field)" translate="INTEGRATIONS.EDIT_FIELD">\n                                                                                Edit Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteFieldConfirm($event, field)" translate="INTEGRATIONS.DELETE_FIELD">\n                                                                                Delete Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.TAGS">TAGS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-table-container class="md-whiteframe-1dp padding-20">\n                                                <md-input-container class="md-block">\n                                                    <label translate="INTEGRATIONS.TAGS">Tags</label>\n                                                    <md-select ng-model="vm_cc.selectedTags" ng-change="vm_cc.selectTagsChanged($event)" multiple>\n                                                        <md-option ng-value="tag.id" ng-repeat="tag in vm_cc.tags">{{ tag.name }}</md-option>\n                                                    </md-select>\n                                                </md-input-container>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n                                </md-tabs>\n                                <div class="padding-20" ng-if="!vm_cc.zendeskConfigurations.length" ng-click="vm_cc.createOrEditZendeskConfiguration($event)" layout="row" layout-sm="column" layout-align="center center" layout-wrap>\n                                    <div class="padding-20 md-whiteframe-3dp md-accent-bg" layout="column" layout-align="center center">\n                                        <md-button class="md-icon-button">\n                                            <md-icon md-font-icon="icon-plus"></md-icon>\n                                        </md-button>\n                                        <span aria-label="add configuration" translate translate-attr-label="INTEGRATIONS.ADD_CONFIGURATION">ADD CONFIGURATION</span>\n                                    </div>\n                                </div>\n                            </md-card>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/integrations/views/zendeskAccounts/edit/zendeskConfigurations/dialog.html",'<md-dialog class="zendeskConfiguration-dialog" aria-label="New ZendeskConfiguration">\n    <form name="zendeskConfigurationForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.zendeskConfiguration.name" ng-required="true" autofocus>\n                <div ng-messages="zendeskConfigurationForm[\'name\'].$error" ng-show="zendeskConfigurationForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.CHANNEL">Channel</label>\n                <md-select name="channel" ng-model="vm.zendeskConfiguration.channel" required>\n\n                    <md-option ng-value="\'voice\'"> {{ \'INTEGRATIONS.VOICE\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="zendeskConfigurationForm[\'channel\'].$error" ng-show="zendeskConfigurationForm[\'channel\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.CHANNEL_REQUIRED">Channel field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.zendeskConfiguration.type" required>\n\n                    <md-option ng-value="\'inbound\'"> {{ \'INTEGRATIONS.INBOUND_IN_QUEUE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'outbound\'"> {{ \'INTEGRATIONS.OUTBOUND_CALL\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="zendeskConfigurationForm[\'type\'].$error" ng-show="zendeskConfigurationForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newZendeskConfiguration" ng-click="vm.saveZendeskConfiguration()" class="send-button md-accent md-raised" ng-disabled="zendeskConfigurationForm.$invalid || zendeskConfigurationForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE"\n                    translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newZendeskConfiguration" ng-click="vm.addNewZendeskConfiguration()" class="send-button md-accent md-raised" ng-disabled="zendeskConfigurationForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_ZENDESKCONFIGURATION"\n                    translate-attr-aria-label="INTEGRATIONS.ADD_ZENDESKCONFIGURATION">\n                    ADD ZENDESKCONFIGURATION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newZendeskConfiguration" ng-click="vm.deleteZendeskConfiguration($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/zendeskAccounts/zendeskAccounts.html",'<div id="zendeskAccounts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-heart" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="INTEGRATIONS.ZENDESKACCOUNTS">ZendeskAccounts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="INTEGRATIONS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedZendeskAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedZendeskAccounts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="INTEGRATIONS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-zendeskAccounts-count">\n                    <span>{{vm.selectedZendeskAccounts.length}}</span>\n                <span translate="INTEGRATIONS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="ZENDESKACCOUNTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllZendeskAccounts()" translate="INTEGRATIONS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectZendeskAccounts()" translate="INTEGRATIONS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedZendeskAccounts" csv-label="true" filename="zendeskAccounts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedZendeskAccounts($event)" aria-label="delete selected" translate translate-attr-label="ZENDESKACCOUNTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- ZENDESKACCOUNT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedZendeskAccounts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getZendeskAccounts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'INTEGRATIONS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="username">{{ \'INTEGRATIONS.USERNAME\' | translate }}</th>\n                                <th md-column md-order-by="remoteUri">{{ \'INTEGRATIONS.URI\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.zendeskAccounts.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="INTEGRATIONS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="zendeskAccount" md-select-id="id" ng-repeat="zendeskAccount in vm.zendeskAccounts.rows">\n                                <td md-cell ng-if="zendeskAccount.userpic"><img class="avatar" alt="{{zendeskAccount.name}}" ng-src="api/users/{{zendeskAccount.id}}/avatar" /></td>\n                                <td md-cell ng-if="!zendeskAccount.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{zendeskAccount.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditZendeskAccount($event, zendeskAccount)" md-cell class="id ">{{zendeskAccount.id}}</td>\n                                <td ng-click="vm.createOrEditZendeskAccount($event, zendeskAccount)" md-cell class="name ">{{zendeskAccount.name}}</td>\n                                <td ng-click="vm.createOrEditZendeskAccount($event, zendeskAccount)" md-cell class="username ">{{zendeskAccount.username}}</td>\n                                <td ng-click="vm.createOrEditZendeskAccount($event, zendeskAccount)" md-cell class="remoteUri ">{{zendeskAccount.remoteUri}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(zendeskAccount, $event)" translate="INTEGRATIONS.EDIT_ZENDESKACCOUNT">\n                                                    Edit ZendeskAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.testtestintegrationaccount(zendeskAccount, $event)" translate="INTEGRATIONS.TEST_ZENDESKACCOUNT">\n                                                    Test ZendeskAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(zendeskAccount, $event)" translate="INTEGRATIONS.DELETE_ZENDESKACCOUNT">\n                                                    Delete ZendeskAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'INTEGRATIONS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'INTEGRATIONS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'INTEGRATIONS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.zendeskAccounts.count}}" md-on-paginate="vm.getZendeskAccounts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / ZENDESKACCOUNT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD ZENDESKACCOUNT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-zendeskAccount-button" ng-click="vm.createOrEditZendeskAccount($event)" aria-label="add zendeskAccount" translate translate-attr-aria-label="INTEGRATIONS.ADD_ZENDESKACCOUNT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD ZENDESKACCOUNT BUTTON --\x3e\n</div>'),e.put("app/main/apps/integrations/views/zohoAccounts/create/dialog.html",'<md-dialog class="zohoAccount-dialog" aria-label="New ZohoAccount">\n    <form name="zohoAccountForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.zohoAccount.name" ng-required="true" autofocus>\n                <div ng-messages="zohoAccountForm[\'name\'].$error" ng-show="zohoAccountForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.HOST">Host</label>\n                <md-select name="host" ng-model="vm.zohoAccount.host" required>\n                    <md-option ng-value="\'zoho.com\'">zoho.com</md-option>\n                    <md-option ng-value="\'zoho.eu\'">zoho.eu</md-option>\n                </md-select>\n                <div ng-messages="zohoAccountForm[\'host\'].$error" ng-show="zohoAccountForm[\'host\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.HOST_REQUIRED">Host field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.AUTHTOKEN">AuthToken</label>\n                <input type="text" name="authToken" ng-model="vm.zohoAccount.authToken" ng-required="true">\n                <div ng-messages="zohoAccountForm[\'authToken\'].$error" ng-show="zohoAccountForm[\'authToken\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.AUTHTOKEN_REQUIRED">AuthToken field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                <input type="url" name="serverUrl" ng-model="vm.zohoAccount.serverUrl">\n                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                <div ng-messages="zohoAccountForm[\'serverUrl\'].$error" ng-show="zohoAccountForm[\'serverUrl\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.zohoAccount.description">\n                <div ng-messages="zohoAccountForm[\'description\'].$error" ng-show="zohoAccountForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newZohoAccount" ng-click="vm.saveZohoAccount()" class="send-button md-accent md-raised" ng-disabled="zohoAccountForm.$invalid || zohoAccountForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newZohoAccount" ng-click="vm.addNewZohoAccount()" class="send-button md-accent md-raised" ng-disabled="zohoAccountForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_ZOHOACCOUNT" translate-attr-aria-label="INTEGRATIONS.ADD_ZOHOACCOUNT">\n                    ADD ZOHOACCOUNT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newZohoAccount" ng-click="vm.deleteZohoAccount($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/zohoAccounts/edit/configurations/dialog.html",'<md-dialog class="zohoConfiguration-dialog" aria-label="New ZohoConfiguration">\n    <form name="zohoConfigurationForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.zohoConfiguration.name" ng-required="true" autofocus>\n                <div ng-messages="zohoConfigurationForm[\'name\'].$error" ng-show="zohoConfigurationForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.CHANNEL">Channel</label>\n                <md-select name="channel" ng-model="vm.zohoConfiguration.channel" required>\n\n                    <md-option ng-value="\'voice\'"> {{ \'INTEGRATIONS.VOICE\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="zohoConfigurationForm[\'channel\'].$error" ng-show="zohoConfigurationForm[\'channel\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.CHANNEL_REQUIRED">Channel field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.zohoConfiguration.type" required>\n\n                    <md-option ng-value="\'inbound\'"> {{ \'INTEGRATIONS.INBOUND_IN_QUEUE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'outbound\'"> {{ \'INTEGRATIONS.OUTBOUND_CALL\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="zohoConfigurationForm[\'type\'].$error" ng-show="zohoConfigurationForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newZohoConfiguration" ng-click="vm.saveZohoConfiguration()" class="send-button md-accent md-raised" ng-disabled="zohoConfigurationForm.$invalid || zohoConfigurationForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE"\n                    translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newZohoConfiguration" ng-click="vm.addNewZohoConfiguration()" class="send-button md-accent md-raised" ng-disabled="zohoConfigurationForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_ZOHOCONFIGURATION" translate-attr-aria-label="INTEGRATIONS.ADD_ZOHOCONFIGURATION">\n                    ADD ZOHOCONFIGURATION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newZohoConfiguration" ng-click="vm.deleteZohoConfiguration($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/zohoAccounts/edit/item/dialog.html",'<md-dialog class="zohoAccount-item-dialog" aria-label="New Item">\n    <form name="zohoAccountItemForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <div ng-switch="vm.type">\n                <div ng-switch-when="subject">\n                    \x3c!-- SUBJECT SECTION --\x3e\n                    <div ng-include="\'/subject.html\'"></div>\n                    \x3c!-- / SUBJECT SECTION --\x3e\n                </div>\n                <div ng-switch-when="description">\n                    \x3c!-- DESCRIPTION SECTION --\x3e\n                    <md-input-container class="md-block">\n                        <label translate="INTEGRATIONS.TYPE">Type</label>\n                        <md-select name="type" ng-model="vm.item.type" required>\n                            <md-option value="string">String</md-option>\n                            <md-option value="keyValue">Key Value</md-option>\n                        </md-select>\n                        <div ng-messages="zohoAccountItemForm.type.$error" ng-show="zohoAccountItemForm.type.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n                        <label translate="INTEGRATIONS.CONTENT">Content</label>\n                        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n                        <div ng-messages="zohoAccountItemForm.content.$error" ng-show="zohoAccountItemForm.content.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <div ng-if="vm.item.type == \'keyValue\'">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.KEY">Key</label>\n                            <input type="text" name="key" ng-model="vm.item.key" required md-autofocus>\n                            <div ng-messages="zohoAccountItemForm.key.$error" ng-show="zohoAccountItemForm.key.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.KEY_REQUIRED">Key field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.TYPE">Type</label>\n                            <md-select name="keyType" ng-model="vm.item.keyType" required>\n                                <md-option value="string">String</md-option>\n                                <md-option value="variable">Variable</md-option>\n                                <md-option value="customVariable">Custom Variable</md-option>\n                            </md-select>\n                            <div ng-messages="zohoAccountItemForm.keyType.$error" ng-show="zohoAccountItemForm.keyType.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'string\'">\n                            <label translate="INTEGRATIONS.CONTENT">Content</label>\n                            <input type="text" name="keyContent" ng-model="vm.item.keyContent" required md-autofocus>\n                            <div ng-messages="zohoAccountItemForm.keyContent.$error" ng-show="zohoAccountItemForm.keyContent.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'variable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n                                <md-optgroup label="Voice: Queue">\n                                    <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Voice: Outbound">\n                                    <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="zohoAccountItemForm.variableName.$error" ng-show="zohoAccountItemForm.variableName.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'customVariable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select ng-model="vm.item.VariableId" required>\n                                <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n                            </md-select>\n                        </md-input-container>\n                    </div>\n                    \x3c!-- / DESCRIPTION SECTION --\x3e\n                </div>\n                <div ng-switch-when="field">\n                    \x3c!-- FIELD SECTION --\x3e\n                    <div ng-if="vm.accountConnected">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.FIELD">FIELD</label>\n                            <md-select name="customField" ng-model="vm.customField" required>\n                                <md-optgroup label="Standard">\n                                    <md-option ng-value="standard" ng-repeat="standard in vm.fields | filter: {custom: false} ">{{standard.name}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Custom">\n                                    <md-option ng-value="custom" ng-repeat="custom in vm.fields | filter: {custom: true} ">{{custom.name}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="zohoAccountItemForm.customField.$error" ng-show="zohoAccountItemForm.customField.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.FIELD_REQUIRED">Field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- CUSTOM FIELD --\x3e\n                        <div ng-if="vm.customField && vm.customField.custom" ng-include="\'/subject.html\'"></div>\n                        \x3c!-- / CUSTOM FIELD --\x3e\n                        \x3c!-- STANDARD FIELD --\x3e\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="option" ng-model="vm.item.content" required>\n                                <md-option ng-value="option.value" ng-repeat="option in vm.customField.options">{{option.name}}</md-option>\n                            </md-select>\n                            <div ng-messages="zohoAccountItemForm.option.$error" ng-show="zohoAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && !vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <input type="text" name="option" ng-model="vm.item.content" required>\n                            <div ng-messages="zohoAccountItemForm.option.$error" ng-show="zohoAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- / STANDARD FIELD --\x3e\n                    </div>\n                    <div ng-if="!vm.accountConnected">\n                        <p>Account is not connected. Please check your configurations!</p>\n                    </div>\n                    \x3c!-- / FIELD SECTION --\x3e\n                </div>\n                <div ng-switch-default>\n                    <p>No Item</p>\n                </div>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newItem" ng-click="vm.saveItem()" class="send-button md-accent md-raised" ng-disabled="zohoAccountItemForm.$invalid || zohoAccountItemForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newItem" ng-click="vm.addNewItem()" class="send-button md-accent md-raised" ng-disabled="zohoAccountItemForm.$invalid || zohoAccountItemForm.$pristine" aria-label="ADD" translate="INTEGRATIONS.ADD" translate-attr-aria-label="INTEGRATIONS.ADD">\n                    ADD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newItem" ng-click="vm.deleteItem($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>\n\n<script type="text/ng-template" id="/subject.html">\n    <md-input-container class="md-block">\n        <label translate="INTEGRATIONS.TYPE">Type</label>\n        <md-select name="type" ng-model="vm.item.type" required>\n            <md-option value="string">String</md-option>\n            <md-option value="variable">Variable</md-option>\n            <md-option value="customVariable">Custom Variable</md-option>\n        </md-select>\n        <div ng-messages="zohoAccountItemForm.type.$error" ng-show="zohoAccountItemForm.type.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n        <label translate="INTEGRATIONS.CONTENT">Content</label>\n        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n        <div ng-messages="zohoAccountItemForm.content.$error" ng-show="zohoAccountItemForm.content.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'variable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n            <md-optgroup label="Voice: Queue">\n                <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n            </md-optgroup>\n            <md-optgroup label="Voice: Outbound">\n                <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n            </md-optgroup>\n        </md-select>\n        <div ng-messages="zohoAccountItemForm.variableName.$error" ng-show="zohoAccountItemForm.variableName.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'customVariable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select ng-model="vm.item.VariableId" required>\n            <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n        </md-select>\n    </md-input-container>\n<\/script>'),e.put("app/main/apps/integrations/views/zohoAccounts/edit/view.html",'<div id="integrations-zohoAccount" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-zohoAccounts-button md-icon-button" aria-label="Go to zohoAccounts" ng-click="vm.gotoZohoAccounts()" translate translate-attr-aria-label="INTEGRATIONS.GO_TO_ZOHOACCOUNTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="zohoAccount-image" hide-xs>\n                    <img ng-src="assets/images/business/zohoAccounts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.zohoAccount.id}}\n                        <span ng-if="vm.zohoAccount.name">{{vm.zohoAccount.name}}</span>\n                        <span ng-if="vm.zohoAccount.exten">{{vm.zohoAccount.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="INTEGRATIONS.CREATED_AT"></span> <span>{{vm.zohoAccount.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveZohoAccount()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (configurationsForm.$invalid)" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.ACCOUNT">ACCOUNT</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="zohoAccount-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.zohoAccount.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.HOST">Host</label>\n                                <md-select name="host" ng-model="vm.zohoAccount.host" required>\n                                    <md-option ng-value="\'zoho.com\'">zoho.com</md-option>\n                                    <md-option ng-value="\'zoho.eu\'">zoho.eu</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'host\'].$error" ng-show="generalForm[\'host\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.HOST_REQUIRED">Host field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.AUTHTOKEN">AuthToken</label>\n                                <input type="text" name="authToken" ng-model="vm.zohoAccount.authToken" ng-required="true">\n                                <div ng-messages="generalForm[\'authToken\'].$error" ng-show="generalForm[\'authToken\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.AUTHTOKEN_REQUIRED">AuthToken field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                                <input type="url" name="serverUrl" ng-model="vm.zohoAccount.serverUrl">\n                                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                                <div ng-messages="generalForm[\'serverUrl\'].$error" ng-show="generalForm[\'serverUrl\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.zohoAccount.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="zohoAccount-detail-form-container configurations md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</div>\n                        </div>\n                        <div ng-controller="ZohoAccountConfigurationsController as vm_cc" ng-init="vm_cc.init(vm.zohoAccount)" layout="row">\n                            <md-card class="md-whiteframe-1dp" flex="30">\n                                <div layout="row" layout-align="center center">\n                                    <md-subheader flex="75" class="md-no-sticky">{{ \'INTEGRATIONS.CONFIGURATIONS\' | translate }}</md-subheader>\n                                    <md-button flex="25" ng-click="vm_cc.createOrEditZohoConfiguration($event)" class="md-icon-button" aria-label="create zohoConfiguration">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                                <md-list>\n                                    <md-list-item layout="row" layout-align="center center" ng-repeat="zohoConfiguration in vm_cc.configurations" class="border-top" md-colors="{background: (vm_cc.selectedZohoConfiguration == $index ? \'accent\' : \'grey-A100\')}" ng-click="vm_cc.getZohoConfiguration($index)">\n                                        <span class="text-truncate" flex="80">{{ zohoConfiguration.name }}</span>\n                                        <md-menu ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_cc.deleteZohoConfiguration($event, zohoConfiguration)" translate="INTEGRATIONS.DELETE_ZOHOCONFIGURATION">\n                                                        Delete ZohoConfiguration\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </md-list-item>\n                                </md-list>\n                            </md-card>\n                            <div flex></div>\n                            <md-card class="md-whiteframe-1dp" flex="65">\n                                <md-tabs ng-if="vm_cc.configurations.length" md-dynamic-height>\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.SUBJECTS">SUBJECTS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.subject = query" on-collapse="vm_cc.query.subject = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditSubject($event)" aria-label="add subject" translate translate-attr-label="INTEGRATIONS.ADD_SUBJECT">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedSubjects.length}} {{vm_cc.selectedSubjects.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedSubjects($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedSubjects">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="subject" md-select-id="id" ng-repeat="subject in vm_cc.subjects | filter: vm_cc.query.subject">\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="id ">{{subject.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="type ">\n                                                                <span ng-if="subject.FieldId">{{subject.nameField || subject.idField}}</span>\n                                                                <span ng-if="!subject.FieldId">{{subject.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="subject.type" ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell>\n                                                                <span ng-switch-when="string">{{subject.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{subject.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{subject.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{subject.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditSubject($event, subject)" translate="INTEGRATIONS.EDIT_SUBJECT">\n                                                                                Edit Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteSubjectConfirm($event, subject)" translate="INTEGRATIONS.DELETE_SUBJECT">\n                                                                                Delete Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.DESCRIPTIONS">DESCRIPTIONS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.description = query" on-collapse="vm_cc.query.description = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditDescription($event)" aria-label="add description" translate translate-attr-label="INTEGRATIONS.ADD_DESCRIPTION">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedDescriptions.length}} {{vm_cc.selectedDescriptions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedDescriptions($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedDescriptions">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="description" md-select-id="id" ng-repeat="description in vm_cc.descriptions | filter: vm_cc.query.description">\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="id ">{{description.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="type ">\n                                                                <span ng-if="description.FieldId">{{description.nameField || description.idField}}</span>\n                                                                <span ng-if="!description.FieldId">{{description.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="description.type" ng-click="vm_cc.createOrEditDescription($event, description)" md-cell>\n                                                                <span ng-switch-when="string">{{description.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{description.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{description.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{description.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditDescription($event, description)" translate="INTEGRATIONS.EDIT_DESCRIPTION">\n                                                                                Edit Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteDescriptionConfirm($event, description)" translate="INTEGRATIONS.DELETE_DESCRIPTION">\n                                                                                Delete Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.FIELDS">FIELDS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.field = query" on-collapse="vm_cc.query.field = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditField($event)" aria-label="add field" translate translate-attr-label="INTEGRATIONS.ADD_FIELD">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedFields.length}} {{vm_cc.selectedFields.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedFields($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedFields">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="field" md-select-id="id" ng-repeat="field in vm_cc.fields | filter: vm_cc.query.field">\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="id ">{{field.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="type ">\n                                                                <span ng-if="field.FieldId">{{field.nameField || field.idField}}</span>\n                                                                <span ng-if="!field.FieldId">{{field.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="field.type" ng-click="vm_cc.createOrEditField($event, field)" md-cell>\n                                                                <span ng-switch-when="string">{{field.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{field.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{field.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{field.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditField($event, field)" translate="INTEGRATIONS.EDIT_FIELD">\n                                                                                Edit Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteFieldConfirm($event, field)" translate="INTEGRATIONS.DELETE_FIELD">\n                                                                                Delete Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n\n                                </md-tabs>\n                                <div class="padding-20" ng-if="!vm_cc.configurations.length" ng-click="vm_cc.createOrEditZohoConfiguration($event)" layout="row" layout-sm="column" layout-align="center center" layout-wrap>\n                                    <div class="padding-20 md-whiteframe-3dp md-accent-bg" layout="column" layout-align="center center">\n                                        <md-button class="md-icon-button">\n                                            <md-icon md-font-icon="icon-plus"></md-icon>\n                                        </md-button>\n                                        <span aria-label="add configuration" translate translate-attr-label="INTEGRATIONS.ADD_CONFIGURATION">ADD CONFIGURATION</span>\n                                    </div>\n                                </div>\n                            </md-card>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/integrations/views/zohoAccounts/zohoAccounts.html",'<div id="zohoAccounts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-heart" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="INTEGRATIONS.ZOHOACCOUNTS">ZohoAccounts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="INTEGRATIONS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedZohoAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedZohoAccounts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="INTEGRATIONS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-zohoAccounts-count">\n                    <span>{{vm.selectedZohoAccounts.length}}</span>\n                <span translate="INTEGRATIONS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="ZOHOACCOUNTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllZohoAccounts()" translate="INTEGRATIONS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectZohoAccounts()" translate="INTEGRATIONS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedZohoAccounts" csv-label="true" filename="zohoAccounts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedZohoAccounts($event)" aria-label="delete selected" translate translate-attr-label="ZOHOACCOUNTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- ZOHOACCOUNT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedZohoAccounts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getZohoAccounts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'INTEGRATIONS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="host">{{ \'INTEGRATIONS.HOST\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.zohoAccounts.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="INTEGRATIONS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="zohoAccount" md-select-id="id" ng-repeat="zohoAccount in vm.zohoAccounts.rows">\n                                <td md-cell ng-if="zohoAccount.userpic"><img class="avatar" alt="{{zohoAccount.name}}" ng-src="api/users/{{zohoAccount.id}}/avatar" /></td>\n                                <td md-cell ng-if="!zohoAccount.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{zohoAccount.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditZohoAccount($event, zohoAccount)" md-cell class="id ">{{zohoAccount.id}}</td>\n                                <td ng-click="vm.createOrEditZohoAccount($event, zohoAccount)" md-cell class="name ">{{zohoAccount.name}}</td>\n                                <td ng-click="vm.createOrEditZohoAccount($event, zohoAccount)" md-cell class="host ">{{ vm.arrayhost[zohoAccount.host].option }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(zohoAccount, $event)" translate="INTEGRATIONS.EDIT_ZOHOACCOUNT">\n                                                    Edit ZohoAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.testtestintegrationaccount(zohoAccount, $event)" translate="INTEGRATIONS.TEST_ZOHOACCOUNT">\n                                                    Test ZohoAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(zohoAccount, $event)" translate="INTEGRATIONS.DELETE_ZOHOACCOUNT">\n                                                    Delete ZohoAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'INTEGRATIONS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'INTEGRATIONS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'INTEGRATIONS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.zohoAccounts.count}}" md-on-paginate="vm.getZohoAccounts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / ZOHOACCOUNT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD ZOHOACCOUNT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-zohoAccount-button" ng-click="vm.createOrEditZohoAccount($event)" aria-label="add zohoAccount" translate translate-attr-aria-label="INTEGRATIONS.ADD_ZOHOACCOUNT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD ZOHOACCOUNT BUTTON --\x3e\n</div>'),e.put("app/main/apps/jscripty/views/projects/create/dialog.html",'<md-dialog class="project-dialog" aria-label="New Project">\n    <form name="projectForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="JSCRIPTY.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.project.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newProject">\n                <div class="hint"><span translate="JSCRIPTY.HELP.NAME"></span></div>\n                <div ng-messages="projectForm[\'name\'].$error" ng-show="projectForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="JSCRIPTY.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="JSCRIPTY.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="JSCRIPTY.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.project.description">\n                <div ng-messages="projectForm[\'description\'].$error" ng-show="projectForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="JSCRIPTY.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newProject" ng-click="vm.saveProject()" class="send-button md-accent md-raised" ng-disabled="projectForm.$invalid || projectForm.$pristine" aria-label="SAVE" translate="JSCRIPTY.SAVE" translate-attr-aria-label="JSCRIPTY.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newProject" ng-click="vm.addNewProject()" class="send-button md-accent md-raised" ng-disabled="projectForm.$invalid" aria-label="ADD" translate="JSCRIPTY.ADD_PROJECT" translate-attr-aria-label="JSCRIPTY.ADD_PROJECT">\n                    ADD PROJECT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newProject" ng-click="vm.deleteProject($event)" aria-label="DELETE" translate translate-attr-aria-label="JSCRIPTY.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="JSCRIPTY.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/jscripty/views/projects/edit/clone/clone.html",'<md-dialog class="project-dialog" aria-label="Clone Project">\n    <form name="projectForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="JSCRIPTY.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.project.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newProject">\n                <div class="hint"><span translate="JSCRIPTY.HELP.NAME"></span></div>\n                <div ng-messages="projectForm[\'name\'].$error" ng-show="projectForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="JSCRIPTY.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="JSCRIPTY.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <md-button type="submit" ng-click="vm.cloneProject()" class="send-button md-accent md-raised" ng-disabled="projectForm.$invalid" aria-label="CLONE" translate="JSCRIPTY.CLONE_PROJECT" translate-attr-aria-label="JSCRIPTY.CLONE_PROJECT">\n                CLONE PROJECT\n            </md-button>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/jscripty/views/projects/edit/sessions/dialog.html",'<md-dialog class="session-dialog" aria-label="New Session">\n    <form name="sessionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <md-list>\n                <md-subheader class="md-no-sticky">\n                    <div class="margin-bottom-5"><span translate="JSCRIPTY.ANSWERS">Answers</span></div>\n                    <div class="subtitle secondary-text">\n                        <span translate="JSCRIPTY.STARTTIME" class="ng-scope font-weight-700">Start Time</span>: <span class="ng-binding">{{vm.session.starttime | date:\'medium\'}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="JSCRIPTY.MEMBERNAME" class="ng-scope font-weight-700">Member Name</span>: <span class="ng-binding">{{vm.session.membername}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="JSCRIPTY.PROJECT" class="ng-scope font-weight-700">Project</span>: <span class="ng-binding">{{vm.project.name}}</span>\n                    </div>\n                </md-subheader>\n                <md-list-item ng-if="vm.questions.rows.length" class="md-2-line contact-item" ng-repeat="question in vm.questions.rows">\n                    <div class="md-list-item-text compact">\n                        <h3>{{$index+1}}. {{question.question}}</h3>\n                        <p>{{question.answer}}</p>\n                    </div>\n                    <md-divider ng-if="!$last"></md-divider>\n                </md-list-item>\n                <md-list-item ng-if="!vm.questions.rows.length" class="md-2-line contact-item">\n                    <div class="md-list-item-text compact">\n                        <h3><span class="text-boxed-ligth" translate="JSCRIPTY.NO_RESULTS_AVAILABLE">No results available</span></h3>\n                    </div>\n                </md-list-item>\n            </md-list>\n\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/jscripty/views/projects/edit/view.html",'<div id="jscripty-project" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-projects-button md-icon-button" aria-label="Go to projects" ng-click="vm.gotoProjects()" translate translate-attr-aria-label="JSCRIPTY.GO_TO_PROJECTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="project-image" hide-xs>\n                    <img ng-src="assets/images/business/projects.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.project.id}}\n                        <span ng-if="vm.project.name">{{vm.project.name}}</span>\n                        <span ng-if="vm.project.exten">{{vm.project.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="JSCRIPTY.CREATED_AT"></span> <span>{{vm.project.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.clonedialog(vm.project, $event)" class="md-fab md-green-500-bg md-icon-button" aria-label="clone">\n                <md-tooltip><span translate="JSCRIPTY.CLONE_PROJECT"></span></md-tooltip>\n                <md-icon md-font-icon="icon-content-duplicate"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveProject()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (builderForm.$invalid) || (previewForm.$invalid) || (sessionsForm.$invalid) || (answersForm.$invalid)" translate="JSCRIPTY.SAVE"\n                translate-attr-aria-label="JSCRIPTY.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="JSCRIPTY.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="project-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="JSCRIPTY.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="JSCRIPTY.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.project.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="JSCRIPTY.HELP.NAME"></span></div>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="JSCRIPTY.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="JSCRIPTY.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.project.enableUncompleteSave" aria-label="EnableUncompleteSave"><span translate="JSCRIPTY.ENABLEUNCOMPLETESAVE">EnableUncompleteSave</span></md-switch>\n                                <div class="hint"><span translate="JSCRIPTY.HELP.ENABLEUNCOMPLETESAVE"></span></div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="JSCRIPTY.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.project.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="JSCRIPTY.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="JSCRIPTY.BUILDER">BUILDER</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="project-detail-form-container builder md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="ProjectBuilderController as vm_bc" ng-init="vm_bc.init(vm.project)">\n                            <mw-form-builder ng-if="vm_bc.project.formData" form-data="vm_bc.project.formData" options="vm_bc.optionsBuilder" read-only="false"></mw-form-builder>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="JSCRIPTY.PREVIEW">PREVIEW</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="project-detail-form-container preview md-background-bg md-whiteframe-1dp">\n                        <div layout="column" layout-align="center" ng-controller="ProjectViewerController as vm_vc" ng-init="vm_vc.init(vm.project)">\n                            <div layout="row" layout-align="center">\n                                <md-button class="md-raised md-accent" aria-label="Reset" ng-click="vm_vc.resetViewer()">\n                                    Reset\n                                </md-button>\n                            </div>\n                            <mw-form-viewer ng-if="vm_vc.project.formData" form-data="vm_vc.project.formData" response-data="vm_vc.responseData" on-submit="vm_vc.onSubmit($event)" api="vm_vc.formViewer"></mw-form-viewer>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="JSCRIPTY.SESSIONS">SESSIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="project-detail-form-container sessions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="ProjectSessionsController as vm_dc" ng-init="vm_dc.init(vm.project)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedProjectSessions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="JSCRIPTY.SESSIONS">Sessions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedProjectSessions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedProjectSessions.length}} {{vm_dc.selectedProjectSessions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedProjectSessions" csv-label="true" filename="projects.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedProjectSessions($event)" aria-label="delete selected" translate translate-attr-label="PROJECTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedProjectSessions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getProjectSessions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'JSCRIPTY.ID\' | translate }}</th>\n                                            <th md-column md-order-by="starttime">{{ \'JSCRIPTY.STARTTIME\' | translate }}</th>\n                                            <th md-column md-order-by="endtime">{{ \'JSCRIPTY.ENDTIME\' | translate }}</th>\n                                            <th md-column md-order-by="membername">{{ \'JSCRIPTY.MEMBERNAME\' | translate }}</th>\n                                            <th md-column md-order-by="calleridnum">{{ \'JSCRIPTY.CALLERIDNUM\' | translate }}</th>\n                                            <th md-column md-order-by="completed">{{ \'JSCRIPTY.COMPLETE\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="session" md-select-id="id" ng-repeat="session in vm_dc.projectSessions.rows">\n                                            <td md-cell>{{session.id}}</td>\n                                            <td md-cell>{{session.starttime | date:\'medium\'}}</td>\n                                            <td md-cell>{{session.endtime | date:\'medium\'}}</td>\n                                            <td md-cell>{{session.membername}}</td>\n                                            <td md-cell>{{session.calleridnum}}</td>\n                                            <td md-cell class="completed ">\n                                                <md-icon md-colors="{color: {{session.completed ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{session.completed? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                            </td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="JSCRIPTY.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.showQuestionsProjectSession($event, session)" translate="JSCRIPTY.SHOW_QUESTIONS_SESSION">\n                                                                Results Session\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(session, $event)" translate="JSCRIPTY.DELETE_SESSION">\n                                                                Delete Session\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.projectSessions.rows.length">\n                                            <td md-cell colspan="8">\n                                                <span class="text-boxed-ligth" translate="JSCRIPTY.NO_SESSION_AVAILABLE">No session available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'JSCRIPTY.PAGE\' | translate}}:\', rowsPerPage: \'{{\'JSCRIPTY.ROWSPERPAGE\' | translate}}:\', of: \'{{\'JSCRIPTY.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.projectSessions.count}}" md-on-paginate="vm_dc.getProjectSessions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="JSCRIPTY.ANSWERS">ANSWERS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="project-detail-form-container answers md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="ProjectAnswersController as vm_an" ng-init="vm_an.init(vm.project)">\n                            <div class="pb-16" layout="row" layout-align="space-between center">\n                                <div class="h2 secondary-text" translate="JSCRIPTY.ANSWERS">Answers</div>\n                                <md-date-range localization-map="vm_an.localizationMap" ng-model="vm_an.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm_an.getAnswers()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n                                <md-button type="button" ng-disabled="!vm_an.answers" ng-click="vm_an.getSummary($event)" class="md-accent md-raised md-button ng-scope md-default-theme md-ink-ripple md-green-500-bg md-icon-button" title="{{\'JSCRIPTY.EXPORT_TO_CSV\' | translate}}">\n                                    <md-icon md-font-icon="icon-file-excel" class="md-default-theme md-font material-icons icon-file-excel"></md-icon>\n                                </md-button>\n                            </div>\n                            <div layout="row">\n                                <md-card class="md-whiteframe-1dp" ng-if="vm_an.answers && vm_an.hasIdAnswers" flex>\n                                    <md-list>\n                                        <md-list-item class="md-2-line contact-item" ng-repeat="(key, question) in vm_an.answers">\n                                            <div class="md-list-item-text compact" layout-padding>\n                                                <h3>{{question.question}}</h3>\n                                                <md-table-container>\n                                                    <table md-table>\n                                                        <thead md-head>\n                                                            <tr md-row>\n                                                                <th md-column></th>\n                                                                <th md-column>#</th>\n                                                                <th md-column>%</th>\n                                                            </tr>\n                                                        </thead>\n                                                        <tbody md-body>\n                                                            <tr md-row ng-repeat="(key, value) in question.answers">\n                                                                <td md-cell>{{key}}</td>\n                                                                <td md-cell width="20px">{{value}}</td>\n                                                                <td md-cell width="20px">{{value*100/question.sum | number:1}}</td>\n                                                            </tr>\n                                                            <tr md-row>\n                                                                <td md-cell><b>{{\'JSCRIPTY.TOTAL\' | translate}}</b></td>\n                                                                <td md-cell width="20px"><b>{{question.sum}}</b></td>\n                                                                <td md-cell width="20px"><b>100</b></td>\n                                                            </tr>\n                                                        </tbody>\n                                                    </table>\n                                                </md-table-container>\n                                            </div>\n                                            <md-divider ng-if="!$last"></md-divider>\n                                        </md-list-item>\n                                    </md-list>\n                                </md-card>\n                                <span ng-if="!vm_an.answers || !vm_an.hasIdAnswers" class="text-boxed-ligth" translate="JSCRIPTY.NO_ANSWERS_AVAILABLE">No answers available</span>\n                            </div>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/jscripty/views/projects/projects.html",'<div id="projects" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-script" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="JSCRIPTY.PROJECTS">Projects</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="JSCRIPTY.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedProjects.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedProjects =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="JSCRIPTY.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-projects-count">\n                    <span>{{vm.selectedProjects.length}}</span>\n                <span translate="JSCRIPTY.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="PROJECTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllProjects()" translate="JSCRIPTY.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectProjects()" translate="JSCRIPTY.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedProjects" csv-label="true" filename="projects.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedProjects($event)" aria-label="delete selected" translate translate-attr-label="PROJECTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- PROJECT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedProjects" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getProjects">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'JSCRIPTY.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'JSCRIPTY.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'JSCRIPTY.DESCRIPTION\' | translate }}</th>\n                                <th md-column md-order-by="createdAt">{{ \'JSCRIPTY.CREATED_AT\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.projects.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="JSCRIPTY.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="project" md-select-id="id" ng-repeat="project in vm.projects.rows">\n                                <td md-cell ng-if="project.userpic"><img class="avatar" alt="{{project.name}}" ng-src="api/users/{{project.id}}/avatar" /></td>\n                                <td md-cell ng-if="!project.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{project.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditProject($event, project)" md-cell class="id ">{{project.id}}</td>\n                                <td ng-click="vm.createOrEditProject($event, project)" md-cell class="name ">{{project.name}}</td>\n                                <td ng-click="vm.createOrEditProject($event, project)" md-cell class="description ">{{project.description}}</td>\n                                <td ng-click="vm.createOrEditProject($event, project)" md-cell class="createdAt ">{{project.createdAt | date:\'medium\' }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="JSCRIPTY.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(project, $event)" translate="JSCRIPTY.EDIT_PROJECT">\n                                                    Edit Project\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.clonedialog(project, $event)" translate="JSCRIPTY.CLONE_PROJECT">\n                                                    clone Project\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.sessionsgoto(project, $event)" translate="JSCRIPTY.SESSIONS_PROJECT">\n                                                    Sessions Project\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(project, $event)" translate="JSCRIPTY.DELETE_PROJECT">\n                                                    Delete Project\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'JSCRIPTY.PAGE\' | translate}}:\', rowsPerPage: \'{{\'JSCRIPTY.ROWSPERPAGE\' | translate}}:\', of: \'{{\'JSCRIPTY.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.projects.count}}" md-on-paginate="vm.getProjects" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / PROJECT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD PROJECT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-project-button" ng-click="vm.createOrEditProject($event)" aria-label="add project" translate translate-attr-aria-label="JSCRIPTY.ADD_PROJECT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD PROJECT BUTTON --\x3e\n</div>'),e.put("app/main/apps/mail/views/mailAccounts/create/dialog.html",'<md-dialog class="mailAccount-dialog" aria-label="New MailAccount">\n    <form name="mailAccountForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.mailAccount.name" ng-required="true" autofocus>\n                <div ng-messages="mailAccountForm[\'name\'].$error" ng-show="mailAccountForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.KEY">key</label>\n                <input type="text" name="key" ng-model="vm.mailAccount.key" md-maxlength="5" ng-required="true">\n                <div ng-messages="mailAccountForm[\'key\'].$error" ng-show="mailAccountForm[\'key\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.KEY_REQUIRED">key field is required</span>\n                    </div>\n\n                    <div ng-message="md-maxlength">\n                        <span translate="MAIL.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 5}\'>key must have a maximum length equal to 5</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.EMAIL_ADDRESS">Email_Address</label>\n                <input type="email" name="email" ng-model="vm.mailAccount.email" ng-required="true">\n                <div ng-messages="mailAccountForm[\'email\'].$error" ng-show="mailAccountForm[\'email\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.EMAIL_ADDRESS_REQUIRED">Email_Address field is required</span>\n                    </div>\n                    <div ng-message="email">\n                        <span translate="MAIL.ERRORS.EMAIL_ADDRESS_MUST_VALID">Email_Address must be a valid e-mail address</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.LIST">List</label>\n                <md-select name="ListId" ng-model="vm.mailAccount.ListId" required>\n                    <md-option ng-value="ListId.id" ng-repeat="ListId in vm.lists">{{ ListId.name }}</md-option>\n                </md-select>\n                <div ng-messages="mailAccountForm[\'ListId\'].$error" ng-show="mailAccountForm[\'ListId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.LIST_REQUIRED">List field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.mailAccount.active" aria-label="Active"><span translate="MAIL.ACTIVE">Active</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="vm.newMailAccount" class="md-block">\n                <label translate="MAIL.SERVICE">Service</label>\n                <md-select name="cservice" ng-model="vm.mailAccount.cservice" required>\n                    <md-option ng-value="null">Custom</md-option>\n                    <md-option ng-value="\'gmail\'">Gmail</md-option>\n                    <md-option ng-value="\'hotmail\'">Hotmail</md-option>\n                    <md-option ng-value="\'yahoo\'">Yahoo</md-option>\n                    <md-option ng-value="\'outlook365\'">Outlook365</md-option>\n                </md-select>\n                <div ng-messages="mailAccountForm[\'cservice\'].$error" ng-show="mailAccountForm[\'cservice\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.SERVICE_REQUIRED">Service field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="(vm.newMailAccount && vm.mailAccount.cservice == null) || (vm.newMailAccount == undefined && vm.mailAccount.Imap.service == null)" class="md-block">\n                <label translate="MAIL.IMAP_HOST">IMAP_Host</label>\n                <input type="text" name="Imap.host" ng-model="vm.mailAccount.Imap.host" ng-required="true">\n                <div ng-messages="mailAccountForm[\'Imap.host\'].$error" ng-show="mailAccountForm[\'Imap.host\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.IMAP_HOST_REQUIRED">IMAP_Host field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="(vm.newMailAccount && vm.mailAccount.cservice == null) || (vm.newMailAccount == undefined && vm.mailAccount.Imap.service == null)" class="md-block">\n                <label translate="MAIL.IMAP_PORT">IMAP_Port</label>\n                <input type="number" name="Imap.port" ng-model="vm.mailAccount.Imap.port" ng-required="true">\n                <div ng-messages="mailAccountForm[\'Imap.port\'].$error" ng-show="mailAccountForm[\'Imap.port\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.IMAP_PORT_REQUIRED">IMAP_Port field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="(vm.newMailAccount && vm.mailAccount.cservice == null) || (vm.newMailAccount == undefined && vm.mailAccount.Smtp.service == null)" class="md-block">\n                <label translate="MAIL.SMTP_HOST">SMTP_Host</label>\n                <input type="text" name="Smtp.host" ng-model="vm.mailAccount.Smtp.host" ng-required="true">\n                <div ng-messages="mailAccountForm[\'Smtp.host\'].$error" ng-show="mailAccountForm[\'Smtp.host\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.SMTP_HOST_REQUIRED">SMTP_Host field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="(vm.newMailAccount && vm.mailAccount.cservice == null) || (vm.newMailAccount == undefined && vm.mailAccount.Smtp.service == null)" class="md-block">\n                <label translate="MAIL.SMTP_PORT">SMTP_Port</label>\n                <input type="number" name="Smtp.port" ng-model="vm.mailAccount.Smtp.port" ng-required="true">\n                <div ng-messages="mailAccountForm[\'Smtp.port\'].$error" ng-show="mailAccountForm[\'Smtp.port\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.SMTP_PORT_REQUIRED">SMTP_Port field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.mailAccount.cservice !== undefined && vm.mailAccount.cservice == null && vm.newMailAccount" class="md-block">\n                <md-switch ng-model="vm.mailAccount.cauthentication" aria-label="Authentication"><span translate="MAIL.AUTHENTICATION">Authentication</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="(vm.mailAccount.cauthentication == true || vm.mailAccount.cservice != null) && vm.newMailAccount" class="md-block">\n                <label translate="MAIL.USERNAME">Username</label>\n                <input type="text" name="cuser" ng-model="vm.mailAccount.cuser" ng-required="true">\n                <div class="hint"><span translate="MAIL.HELP.USERNAME"></span></div>\n                <div ng-messages="mailAccountForm[\'cuser\'].$error" ng-show="mailAccountForm[\'cuser\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="(vm.mailAccount.cauthentication == true || vm.mailAccount.cservice != null) && vm.newMailAccount">\n                <label translate="MAIL.PASSWORD">Password</label>\n                <input type="password" name="cpassword" ng-model="vm.mailAccount.cpassword" placeholder="Password" translate translate-attr-placeholder="MAIL.PASSWORD" required>\n                <div class="hint"><span translate="MAIL.HELP.PASSWORD"></span></div>\n                <div ng-messages="mailAccountForm[\'cpassword\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="MAIL.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="MAIL.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.mailAccount.description">\n                <div ng-messages="mailAccountForm[\'description\'].$error" ng-show="mailAccountForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newMailAccount" ng-click="vm.saveMailAccount()" class="send-button md-accent md-raised" ng-disabled="mailAccountForm.$invalid || mailAccountForm.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newMailAccount" ng-click="vm.addNewMailAccount()" class="send-button md-accent md-raised" ng-disabled="mailAccountForm.$invalid" aria-label="ADD" translate="MAIL.ADD_MAILACCOUNT" translate-attr-aria-label="MAIL.ADD_MAILACCOUNT">\n                    ADD MAILACCOUNT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newMailAccount" ng-click="vm.deleteMailAccount($event)" aria-label="DELETE" translate translate-attr-aria-label="MAIL.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="MAIL.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/apps/agent/dialog.html",'<md-dialog class="mailAccount-dialog" aria-label="New MailAccount">\n    <form name="mailAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.AGENT">Agent</label>\n                <md-select name="agent" ng-model="vm.agent.agent" required autofocus>\n                    <md-option ng-value="agent.name" ng-repeat="agent in vm.agents">{{ agent.name }}</md-option>\n                </md-select>\n                <div ng-messages="mailAccountFormApp[\'agent\'].$error" ng-show="mailAccountFormApp[\'agent\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.AGENT_REQUIRED">Agent field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.agent.timeout" min="0" max="2147483" ng-required="true">\n                <div ng-messages="mailAccountFormApp[\'timeout\'].$error" ng-show="mailAccountFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MAIL.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="MAIL.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveMailAccountApp()" class="send-button md-accent md-raised" ng-disabled="mailAccountFormApp.$invalid || mailAccountFormApp.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/apps/autoreply/dialog.html",'<md-dialog class="mailAccount-dialog" aria-label="New MailAccount">\n    <form name="mailAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.TIMES">times</label>\n                <md-select name="times" ng-model="vm.autoreply.times" required autofocus>\n                    <md-option ng-value="1">One Time</md-option>\n                    <md-option ng-value="0">Always</md-option>\n                </md-select>\n                <div ng-messages="mailAccountFormApp[\'times\'].$error" ng-show="mailAccountFormApp[\'times\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.TIMES_REQUIRED">times field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div class="md-block">\n                <label class="md-caption grey-fg" translate="MAIL.TEXT">Text</label>\n                <textarea aria-label="Text text" ckeditor="{ skin: \'office2013\', language: \'en\', allowedContent: true, extraPlugins: \'font,colorbutton,autoembed,autocorrect,googlethisterm,pastebase64\', toolbarGroups: [{ name: \'styles\', groups: [\'styles\'] }, { name: \'clipboard\', groups: [\'undo\'] }, { name: \'colors\', groups: [\'colors\'] }, { name: \'basicstyles\', groups: [\'basicstyles\'] }, { name: \'paragraph\', groups: [\'list\', \'indent\', \'align\'] }, { name: \'mode\' }], autocorrect_enabled: true, disableNativeSpellChecker: false, removePlugins: \'magicline\' }"\n                    ng-model="vm.autoreply.text"></textarea>\n            </div>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveMailAccountApp()" class="send-button md-accent md-raised" ng-disabled="mailAccountFormApp.$invalid || mailAccountFormApp.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/apps/close/dialog.html",'<md-dialog class="mailAccount-dialog" aria-label="New MailAccount">\n    <form name="mailAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.DISPOSITION">Disposition</label>\n                <input type="text" name="disposition" ng-model="vm.close.disposition" ng-required="true" autofocus>\n                <div ng-messages="mailAccountFormApp[\'disposition\'].$error" ng-show="mailAccountFormApp[\'disposition\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.DISPOSITION_REQUIRED">Disposition field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveMailAccountApp()" class="send-button md-accent md-raised" ng-disabled="mailAccountFormApp.$invalid || mailAccountFormApp.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/apps/gotoif/dialog.html",'<md-dialog class="mailAccount-dialog" aria-label="New MailAccount">\n    <form name="mailAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.CONDITION">Condition</label>\n                <input type="text" name="condition" ng-model="vm.gotoif.condition" ng-required="true" autofocus>\n                <div ng-messages="mailAccountFormApp[\'condition\'].$error" ng-show="mailAccountFormApp[\'condition\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.CONDITION_REQUIRED">Condition field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.TRUEPRIORITY">truepriority</label>\n                <input type="number" name="truepriority" ng-model="vm.gotoif.truepriority" min="1" ng-required="true">\n                <div ng-messages="mailAccountFormApp[\'truepriority\'].$error" ng-show="mailAccountFormApp[\'truepriority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.TRUEPRIORITY_REQUIRED">truepriority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MAIL.ERRORS.TRUEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">truepriority must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.FALSEPRIORITY">falsepriority</label>\n                <input type="number" name="falsepriority" ng-model="vm.gotoif.falsepriority" min="1" ng-required="true">\n                <div ng-messages="mailAccountFormApp[\'falsepriority\'].$error" ng-show="mailAccountFormApp[\'falsepriority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.FALSEPRIORITY_REQUIRED">falsepriority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MAIL.ERRORS.FALSEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">falsepriority must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveMailAccountApp()" class="send-button md-accent md-raised" ng-disabled="mailAccountFormApp.$invalid || mailAccountFormApp.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/apps/gotop/dialog.html",'<md-dialog class="mailAccount-dialog" aria-label="New MailAccount">\n    <form name="mailAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.PRIORITY">Priority</label>\n                <input type="number" name="priority" ng-model="vm.gotop.priority" min="0" ng-required="true" autofocus>\n                <div ng-messages="mailAccountFormApp[\'priority\'].$error" ng-show="mailAccountFormApp[\'priority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.PRIORITY_REQUIRED">Priority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MAIL.ERRORS.PRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Priority must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveMailAccountApp()" class="send-button md-accent md-raised" ng-disabled="mailAccountFormApp.$invalid || mailAccountFormApp.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/apps/interval/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select ng-model="vm.type">\n                    <md-option ng-value="type" ng-repeat=\'type in vm.types\'>{{ type | ucfirst }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.type === \'list\'">\n                <label translate="TOOLS.INTERVALS">Intervals</label>\n                <md-select ng-model="vm.interval.IntervalId">\n                    <md-option ng-value="interval.id" ng-repeat="interval in vm.intervals.rows">{{ interval.name }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            \x3c!-- TIMERANGE START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.TIME_RANGE">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <div class="md-block" flex>\n                    <mdp-time-picker name="timeRangeFrom" mdp-placeholder="FROM" ng-model="vm.timeRangeFrom" mdp-format="HH:mm" mdp-auto-switch="true">\n                        <div ng-messages="intervalForm.timeRangeFrom.$error" ng-show="intervalForm.timeRangeFrom.$touched" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_FROM_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n                <div class="md-block" flex ng-if="vm.timeRangeFrom">\n                    <mdp-time-picker name="timeRangeTo" mdp-placeholder="TO*" ng-model="vm.timeRangeTo" mdp-format="HH:mm" mdp-auto-switch="true" required>\n                        <div ng-messages="intervalForm.timeRangeTo.$error" ng-show="intervalForm.timeRangeTo.$invalid" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_INVALID">Time Range To field is invalid</span>\n                            </div>\n                            <div ng-message="required">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_REQUIRED">Time Range To field is required</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n            \x3c!-- TIMERANGE END --\x3e\n\n            \x3c!-- DAYSOFWEEK START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.WEEK_DAYS">Week Days</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.dayOfWeekFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex class="md-block" ng-if="vm.dayOfWeekFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="dayOfWeekTo" ng-model="vm.dayOfWeekTo">\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.dayOfWeekTo.$error" ng-show="intervalForm.dayOfWeekTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- DAYSOFWEEK END --\x3e\n\n            \x3c!-- MONTHDAY START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTH_DAYS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthDayFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthDayFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthDayTo" ng-model="vm.monthDayTo">\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthDayTo.$error" ng-show="intervalForm.monthDayTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTHDAY END --\x3e\n\n            \x3c!-- MONTH START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTHS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthTo" ng-model="vm.monthTo">\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthTo.$error" ng-show="intervalForm.monthTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTH END --\x3e\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/apps/noop/dialog.html",'<md-dialog class="mailAccount-dialog" aria-label="New MailAccount">\n    <form name="mailAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.VALUE">Value</label>\n                <input type="text" name="value" ng-model="vm.noop.value" autofocus>\n                <div ng-messages="mailAccountFormApp[\'value\'].$error" ng-show="mailAccountFormApp[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveMailAccountApp()" class="send-button md-accent md-raised" ng-disabled="mailAccountFormApp.$invalid || mailAccountFormApp.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/apps/queue/dialog.html",'<md-dialog class="mailAccount-dialog" aria-label="New MailAccount">\n    <form name="mailAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.QUEUE">Queue</label>\n                <md-select name="queue" ng-model="vm.queue.queue" required autofocus>\n                    <md-option ng-value="queue.name" ng-repeat="queue in vm.queues">{{ queue.name }}</md-option>\n                </md-select>\n                <div ng-messages="mailAccountFormApp[\'queue\'].$error" ng-show="mailAccountFormApp[\'queue\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.QUEUE_REQUIRED">Queue field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.queue.timeout" min="0" max="2147483" ng-required="true">\n                <div ng-messages="mailAccountFormApp[\'timeout\'].$error" ng-show="mailAccountFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MAIL.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="MAIL.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveMailAccountApp()" class="send-button md-accent md-raised" ng-disabled="mailAccountFormApp.$invalid || mailAccountFormApp.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/apps/system/dialog.html",'<md-dialog class="mailAccount-dialog" aria-label="New MailAccount">\n    <form name="mailAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.COMMAND">Command</label>\n                <input type="text" name="command" ng-model="vm.system.command" ng-required="true" autofocus>\n                <div ng-messages="mailAccountFormApp[\'command\'].$error" ng-show="mailAccountFormApp[\'command\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.COMMAND_REQUIRED">Command field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.VARIABLE">Variable</label>\n                <md-select name="variable" ng-model="vm.system.variable">\n                    <md-option ng-value="variable.name" ng-repeat="variable in vm.variables">{{ variable.name }}</md-option>\n                    <md-option ng-value="\'\'">None</md-option>\n                </md-select>\n                <div ng-messages="mailAccountFormApp[\'variable\'].$error" ng-show="mailAccountFormApp[\'variable\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.VARIABLE_REQUIRED">Variable field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveMailAccountApp()" class="send-button md-accent md-raised" ng-disabled="mailAccountFormApp.$invalid || mailAccountFormApp.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/mailCannedAnswers/dialog.html",'<md-dialog class="mailCannedAnswer-dialog" aria-label="New MailCannedAnswer">\n    <form name="mailCannedAnswerForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.KEY">Key</label>\n                <input type="" name="key" ng-model="vm.mailCannedAnswer.key" md-maxlength="255" ng-required="true" autofocus>\n                <div ng-messages="mailCannedAnswerForm[\'key\'].$error" ng-show="mailCannedAnswerForm[\'key\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.KEY_REQUIRED">Key field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.VALUE">Value</label>\n                <textarea name="value" ng-model="vm.mailCannedAnswer.value" required></textarea>\n\n                <div ng-messages="mailCannedAnswerForm[\'value\'].$error" ng-show="mailCannedAnswerForm[\'value\'].$touched" role="alert">\n\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.mailCannedAnswer.description">\n                <div ng-messages="mailCannedAnswerForm[\'description\'].$error" ng-show="mailCannedAnswerForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newMailCannedAnswer" ng-click="vm.saveMailCannedAnswer()" class="send-button md-accent md-raised" ng-disabled="mailCannedAnswerForm.$invalid || mailCannedAnswerForm.$pristine" aria-label="SAVE" translate="MAIL.SAVE"\n                    translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newMailCannedAnswer" ng-click="vm.addNewMailCannedAnswer()" class="send-button md-accent md-raised" ng-disabled="mailCannedAnswerForm.$invalid" aria-label="ADD" translate="MAIL.ADD_MAILCANNEDANSWER" translate-attr-aria-label="MAIL.ADD_MAILCANNEDANSWER">\n                    ADD MAILCANNEDANSWER\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newMailCannedAnswer" ng-click="vm.deleteMailCannedAnswer($event)" aria-label="DELETE" translate translate-attr-aria-label="MAIL.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="MAIL.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/mailDispositions/dialog.html",'<md-dialog class="mailDisposition-dialog" aria-label="New MailDisposition">\n    <form name="mailDispositionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.mailDisposition.name" ng-required="true" autofocus>\n                <div ng-messages="mailDispositionForm[\'name\'].$error" ng-show="mailDispositionForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newMailDisposition" ng-click="vm.saveMailDisposition()" class="send-button md-accent md-raised" ng-disabled="mailDispositionForm.$invalid || mailDispositionForm.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newMailDisposition" ng-click="vm.addNewMailDisposition()" class="send-button md-accent md-raised" ng-disabled="mailDispositionForm.$invalid" aria-label="ADD" translate="MAIL.ADD_MAILDISPOSITION" translate-attr-aria-label="MAIL.ADD_MAILDISPOSITION">\n                    ADD MAILDISPOSITION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newMailDisposition" ng-click="vm.deleteMailDisposition($event)" aria-label="DELETE" translate translate-attr-aria-label="MAIL.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="MAIL.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/view.html",'<div id="mail-mailAccount" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-mailAccounts-button md-icon-button" aria-label="Go to mailAccounts" ng-click="vm.gotoMailAccounts()" translate translate-attr-aria-label="MAIL.GO_TO_MAILACCOUNTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="mailAccount-image" hide-xs>\n                    <img ng-src="assets/images/business/mailAccounts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.mailAccount.id}}\n                        <span ng-if="vm.mailAccount.name">{{vm.mailAccount.name}}</span>\n                        <span ng-if="vm.mailAccount.exten">{{vm.mailAccount.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="MAIL.CREATED_AT"></span> <span>{{vm.mailAccount.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.gotogoto(vm.mailAccount, $event)" class="md-fab md-warn md-icon-button" aria-label="goto">\n                <md-tooltip><span translate="MAIL.GOTO_MAILACCOUNT"></span></md-tooltip>\n                <md-icon md-font-icon="icon-cast"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveMailAccount()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (notificationForm.$invalid) || (imapForm.$invalid) || (smtpForm.$invalid) || (mailDispositionsForm.$invalid) || (mailCannedAnswersForm.$invalid) || (actionsForm.$invalid) || (interactionsForm.$invalid)"\n                translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="mailAccount-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MAIL.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.mailAccount.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.KEY">key</label>\n                                <input type="text" name="key" ng-model="vm.mailAccount.key" md-maxlength="5" ng-required="true">\n                                <div ng-messages="generalForm[\'key\'].$error" ng-show="generalForm[\'key\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.KEY_REQUIRED">key field is required</span>\n                                    </div>\n\n                                    <div ng-message="md-maxlength">\n                                        <span translate="MAIL.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 5}\'>key must have a maximum length equal to 5</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.EMAIL_ADDRESS">Email_Address</label>\n                                <input type="email" name="email" ng-model="vm.mailAccount.email" ng-required="true">\n                                <div ng-messages="generalForm[\'email\'].$error" ng-show="generalForm[\'email\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.EMAIL_ADDRESS_REQUIRED">Email_Address field is required</span>\n                                    </div>\n                                    <div ng-message="email">\n                                        <span translate="MAIL.ERRORS.EMAIL_ADDRESS_MUST_VALID">Email_Address must be a valid e-mail address</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.LIST">List</label>\n                                <md-select name="ListId" ng-model="vm.mailAccount.ListId" required>\n                                    <md-option ng-value="ListId.id" ng-repeat="ListId in vm.lists">{{ ListId.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'ListId\'].$error" ng-show="generalForm[\'ListId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.LIST_REQUIRED">List field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.mailAccount.active" aria-label="Active"><span translate="MAIL.ACTIVE">Active</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.FONT_FAMILY">Font_Family</label>\n                                <ms-font-family name="fontFamily" ng-model="vm.mailAccount.fontFamily" required></ms-font-family>\n                                <div class="hint"><span translate="MAIL.HELP.FONT_FAMILY"></span></div>\n                                <div ng-messages="generalForm[\'fontFamily\'].$error" ng-show="generalForm[fontFamily].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.FONT_FAMILY_REQUIRED">Font_Family field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.FONT_SIZE">Font_Size</label>\n                                <input type="number" name="fontSize" ng-model="vm.mailAccount.fontSize" min="8" max="72" ng-required="true">\n                                <div class="hint"><span translate="MAIL.HELP.FONT_SIZE"></span></div>\n                                <div ng-messages="generalForm[\'fontSize\'].$error" ng-show="generalForm[\'fontSize\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.FONT_SIZE_REQUIRED">Font_Size field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MAIL.ERRORS.FONT_SIZE_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Font_Size must be a valid greater or equal than</span> <span>8</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MAIL.ERRORS.FONT_SIZE_MUST_BE_LESS_THAN_OR_EQUAL_TO">Font_Size must be a valid greater or equal than</span> <span>72</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <div class="md-block">\n                                <label class="md-caption grey-fg" translate="MAIL.TEMPLATE">Template</label>\n                                <textarea aria-label="Template template" ckeditor="{ skin: \'office2013\', language: \'en\', allowedContent: true, extraPlugins: \'font,colorbutton,autoembed,autocorrect,googlethisterm,pastebase64\', toolbarGroups: [{ name: \'styles\', groups: [\'styles\'] }, { name: \'clipboard\', groups: [\'undo\'] }, { name: \'colors\', groups: [\'colors\'] }, { name: \'basicstyles\', groups: [\'basicstyles\'] }, { name: \'paragraph\', groups: [\'list\', \'indent\', \'align\'] }, { name: \'mode\' }], autocorrect_enabled: true, disableNativeSpellChecker: false, removePlugins: \'magicline\' }"\n                                    ng-model="vm.mailAccount.template"></textarea>\n                            </div>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.mailAccount.markAsUnread" aria-label="mark_as_unread"><span translate="MAIL.MARK_AS_UNREAD">mark_as_unread</span></md-switch>\n                                <div class="hint"><span translate="MAIL.HELP.MARK_AS_UNREAD"></span></div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.WAITFORTHEASSIGNEDAGENT">WaitForTheAssignedAgent</label>\n                                <input type="number" name="waitForTheAssignedAgent" ng-model="vm.mailAccount.waitForTheAssignedAgent" min="1" max="2147483" ng-required="true">\n                                <div ng-messages="generalForm[\'waitForTheAssignedAgent\'].$error" ng-show="generalForm[\'waitForTheAssignedAgent\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.WAITFORTHEASSIGNEDAGENT_REQUIRED">WaitForTheAssignedAgent field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MAIL.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">WaitForTheAssignedAgent must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MAIL.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_LESS_THAN_OR_EQUAL_TO">WaitForTheAssignedAgent must be a valid greater or equal than</span> <span>2147483</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.mailAccount.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="mailAccount-detail-form-container notification md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MAIL.NOTIFICATION">NOTIFICATION</div>\n                        </div>\n                        <form name="notificationForm" novalidate>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.mailAccount.notificationSound" aria-label="notificationSound"><span translate="MAIL.NOTIFICATIONSOUND">notificationSound</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.mailAccount.notificationShake" aria-label="notificationShake"><span translate="MAIL.NOTIFICATIONSHAKE">notificationShake</span></md-switch>\n                            </md-input-container>\n                            <div class="md-block">\n                                <label class="md-caption grey-fg" translate="MAIL.NOTIFICATIONTEMPLATE">notificationTemplate</label>\n                                <textarea aria-label="notificationTemplate notificationTemplate" ckeditor="{ skin: \'office2013\', language: \'en\', allowedContent: true, extraPlugins: \'font,colorbutton,autoembed,autocorrect,googlethisterm,pastebase64\', toolbarGroups: [{ name: \'styles\', groups: [\'styles\'] }, { name: \'clipboard\', groups: [\'undo\'] }, { name: \'colors\', groups: [\'colors\'] }, { name: \'basicstyles\', groups: [\'basicstyles\'] }, { name: \'paragraph\', groups: [\'list\', \'indent\', \'align\'] }, { name: \'mode\' }], autocorrect_enabled: true, disableNativeSpellChecker: false, removePlugins: \'magicline\' }"\n                                    ng-model="vm.mailAccount.notificationTemplate"></textarea>\n                            </div>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.IMAP">IMAP</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="mailAccount-detail-form-container imap md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MAIL.IMAP">IMAP</div>\n                        </div>\n                        <form name="imapForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.SERVICE">Service</label>\n                                <md-select name="Imap.service" ng-model="vm.mailAccount.Imap.service" required autofocus>\n                                    <md-option ng-value="null">Custom</md-option>\n                                    <md-option ng-value="\'gmail\'">Gmail</md-option>\n                                    <md-option ng-value="\'hotmail\'">Hotmail</md-option>\n                                    <md-option ng-value="\'yahoo\'">Yahoo</md-option>\n                                    <md-option ng-value="\'outlook365\'">Outlook365</md-option>\n                                </md-select>\n                                <div ng-messages="imapForm[\'Imap.service\'].$error" ng-show="imapForm[\'Imap.service\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.SERVICE_REQUIRED">Service field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="(vm.newMailAccount && vm.mailAccount.cservice == null) || (vm.newMailAccount == undefined && vm.mailAccount.Imap.service == null)" class="md-block">\n                                <label translate="MAIL.IMAP_HOST">IMAP_Host</label>\n                                <input type="text" name="Imap.host" ng-model="vm.mailAccount.Imap.host" ng-required="true">\n                                <div ng-messages="imapForm[\'Imap.host\'].$error" ng-show="imapForm[\'Imap.host\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.IMAP_HOST_REQUIRED">IMAP_Host field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="(vm.newMailAccount && vm.mailAccount.cservice == null) || (vm.newMailAccount == undefined && vm.mailAccount.Imap.service == null)" class="md-block">\n                                <label translate="MAIL.IMAP_PORT">IMAP_Port</label>\n                                <input type="number" name="Imap.port" ng-model="vm.mailAccount.Imap.port" ng-required="true">\n                                <div ng-messages="imapForm[\'Imap.port\'].$error" ng-show="imapForm[\'Imap.port\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.IMAP_PORT_REQUIRED">IMAP_Port field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.mailAccount.Imap.tls" aria-label="ssl"><span translate="MAIL.SSL">ssl</span></md-switch>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.mailAccount.Imap.service == null" class="md-block">\n                                <md-switch ng-model="vm.mailAccount.Imap.authentication" aria-label="Authentication"><span translate="MAIL.AUTHENTICATION">Authentication</span></md-switch>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.mailAccount.Imap.authentication == true || vm.mailAccount.Imap.service != null" class="md-block">\n                                <label translate="MAIL.USERNAME">Username</label>\n                                <input type="text" name="Imap.user" ng-model="vm.mailAccount.Imap.user" ng-required="true">\n                                <div class="hint"><span translate="MAIL.HELP.USERNAME"></span></div>\n                                <div ng-messages="imapForm[\'Imap.user\'].$error" ng-show="imapForm[\'Imap.user\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block" ng-if="vm.mailAccount.Imap.authentication == true || vm.mailAccount.Imap.service != null">\n                                <label translate="MAIL.PASSWORD">Password</label>\n                                <input type="password" name="Imap.password" ng-model="vm.mailAccount.Imap.password" placeholder="Password" translate translate-attr-placeholder="MAIL.PASSWORD" required>\n                                <div class="hint"><span translate="MAIL.HELP.PASSWORD"></span></div>\n                                <div ng-messages="imapForm[\'Imap.password\'].$error" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="MAIL.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.MAILBOX">mailbox</label>\n                                <input type="text" name="Imap.mailbox" ng-model="vm.mailAccount.Imap.mailbox">\n                                <div ng-messages="imapForm[\'Imap.mailbox\'].$error" ng-show="imapForm[\'Imap.mailbox\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.MAILBOX_REQUIRED">mailbox field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.CONNTIMEOUT">connTimeout</label>\n                                <input type="number" name="Imap.connTimeout" ng-model="vm.mailAccount.Imap.connTimeout" min="1" ng-required="true">\n                                <div ng-messages="imapForm[\'Imap.connTimeout\'].$error" ng-show="imapForm[\'Imap.connTimeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.CONNTIMEOUT_REQUIRED">connTimeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MAIL.ERRORS.CONNTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">connTimeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.AUTHTIMEOUT">authTimeout</label>\n                                <input type="number" name="Imap.authTimeout" ng-model="vm.mailAccount.Imap.authTimeout" min="1" ng-required="true">\n                                <div ng-messages="imapForm[\'Imap.authTimeout\'].$error" ng-show="imapForm[\'Imap.authTimeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.AUTHTIMEOUT_REQUIRED">authTimeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MAIL.ERRORS.AUTHTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">authTimeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.SMTP">SMTP</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="mailAccount-detail-form-container smtp md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MAIL.SMTP">SMTP</div>\n                        </div>\n                        <form name="smtpForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.SERVICE">Service</label>\n                                <md-select name="Smtp.service" ng-model="vm.mailAccount.Smtp.service" required autofocus>\n                                    <md-option ng-value="null">Custom</md-option>\n                                    <md-option ng-value="\'gmail\'">Gmail</md-option>\n                                    <md-option ng-value="\'hotmail\'">Hotmail</md-option>\n                                    <md-option ng-value="\'yahoo\'">Yahoo</md-option>\n                                    <md-option ng-value="\'outlook365\'">Outlook365</md-option>\n                                </md-select>\n                                <div ng-messages="smtpForm[\'Smtp.service\'].$error" ng-show="smtpForm[\'Smtp.service\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.SERVICE_REQUIRED">Service field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="(vm.newMailAccount && vm.mailAccount.cservice == null) || (vm.newMailAccount == undefined && vm.mailAccount.Smtp.service == null)" class="md-block">\n                                <label translate="MAIL.SMTP_HOST">SMTP_Host</label>\n                                <input type="text" name="Smtp.host" ng-model="vm.mailAccount.Smtp.host" ng-required="true">\n                                <div ng-messages="smtpForm[\'Smtp.host\'].$error" ng-show="smtpForm[\'Smtp.host\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.SMTP_HOST_REQUIRED">SMTP_Host field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="(vm.newMailAccount && vm.mailAccount.cservice == null) || (vm.newMailAccount == undefined && vm.mailAccount.Smtp.service == null)" class="md-block">\n                                <label translate="MAIL.SMTP_PORT">SMTP_Port</label>\n                                <input type="number" name="Smtp.port" ng-model="vm.mailAccount.Smtp.port" ng-required="true">\n                                <div ng-messages="smtpForm[\'Smtp.port\'].$error" ng-show="smtpForm[\'Smtp.port\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.SMTP_PORT_REQUIRED">SMTP_Port field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.mailAccount.Smtp.service == null" class="md-block">\n                                <md-switch ng-model="vm.mailAccount.Smtp.secure" aria-label="Secure"><span translate="MAIL.SECURE">Secure</span></md-switch>\n                                <div class="hint"><span translate="MAIL.HELP.SECURE"></span></div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.mailAccount.Smtp.service == null" class="md-block">\n                                <md-switch ng-model="vm.mailAccount.Smtp.authentication" aria-label="Authentication"><span translate="MAIL.AUTHENTICATION">Authentication</span></md-switch>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.mailAccount.Smtp.authentication == true || vm.mailAccount.Smtp.service != null" class="md-block">\n                                <label translate="MAIL.USERNAME">Username</label>\n                                <input type="text" name="Smtp.user" ng-model="vm.mailAccount.Smtp.user" ng-required="true">\n                                <div class="hint"><span translate="MAIL.HELP.USERNAME"></span></div>\n                                <div ng-messages="smtpForm[\'Smtp.user\'].$error" ng-show="smtpForm[\'Smtp.user\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block" ng-if="vm.mailAccount.Smtp.authentication == true || vm.mailAccount.Smtp.service != null">\n                                <label translate="MAIL.PASSWORD">Password</label>\n                                <input type="password" name="Smtp.pass" ng-model="vm.mailAccount.Smtp.pass" placeholder="Password" translate translate-attr-placeholder="MAIL.PASSWORD" required>\n                                <div class="hint"><span translate="MAIL.HELP.PASSWORD"></span></div>\n                                <div ng-messages="smtpForm[\'Smtp.pass\'].$error" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="MAIL.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.DISPOSITIONS">DISPOSITIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="mailAccount-detail-form-container maildispositions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="MailAccountMailDispositionsController as vm_dc" ng-init="vm_dc.init(vm.mailAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedMailAccountMailDispositions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="MAIL.MAILDISPOSITIONS">MailDispositions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditMailAccountMailDisposition($event)" aria-label="add mailDisposition" translate translate-attr-label="MAIL.ADD_MAILDISPOSITION">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedMailAccountMailDispositions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedMailAccountMailDispositions.length}} {{vm_dc.selectedMailAccountMailDispositions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedMailAccountMailDispositions" csv-label="true" filename="mailAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedMailAccountMailDispositions($event)" aria-label="delete selected" translate translate-attr-label="MAILACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedMailAccountMailDispositions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getMailAccountMailDispositions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'MAIL.ID\' | translate }}</th>\n                                            <th md-column md-order-by="name">{{ \'MAIL.NAME\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'MAIL.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="mailDisposition" md-select-id="id" ng-repeat="mailDisposition in vm_dc.mailAccountMailDispositions.rows">\n                                            <td ng-click="vm_dc.createOrEditMailAccountMailDisposition($event, mailDisposition)" md-cell>{{mailDisposition.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditMailAccountMailDisposition($event, mailDisposition)" md-cell>{{mailDisposition.name}}</td>\n                                            <td ng-click="vm_dc.createOrEditMailAccountMailDisposition($event, mailDisposition)" md-cell>{{mailDisposition.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MAIL.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditMailAccountMailDisposition($event, mailDisposition)" translate="MAIL.EDIT_MAILDISPOSITION">\n                                                                Edit MailDisposition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(mailDisposition, $event)" translate="MAIL.DELETE_MAILDISPOSITION">\n                                                                Delete MailDisposition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.mailAccountMailDispositions.rows.length">\n                                            <td md-cell colspan="5">\n                                                <span class="text-boxed-ligth" translate="MAIL.NO_MAILDISPOSITION_AVAILABLE">No maildisposition available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'MAIL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MAIL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MAIL.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.mailAccountMailDispositions.count}}" md-on-paginate="vm_dc.getMailAccountMailDispositions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.CANNEDANSWERS">CANNEDANSWERS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="mailAccount-detail-form-container mailcannedanswers md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="MailAccountMailCannedAnswersController as vm_dc" ng-init="vm_dc.init(vm.mailAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedMailAccountMailCannedAnswers.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="MAIL.MAILCANNEDANSWERS">MailCannedAnswers</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditMailAccountMailCannedAnswer($event)" aria-label="add mailCannedAnswer" translate translate-attr-label="MAIL.ADD_MAILCANNEDANSWER">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedMailAccountMailCannedAnswers.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedMailAccountMailCannedAnswers.length}} {{vm_dc.selectedMailAccountMailCannedAnswers.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedMailAccountMailCannedAnswers" csv-label="true" filename="mailAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedMailAccountMailCannedAnswers($event)" aria-label="delete selected" translate translate-attr-label="MAILACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedMailAccountMailCannedAnswers" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getMailAccountMailCannedAnswers">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'MAIL.ID\' | translate }}</th>\n                                            <th md-column md-order-by="key">{{ \'MAIL.KEY\' | translate }}</th>\n                                            <th md-column md-order-by="value">{{ \'MAIL.VALUE\' | translate }}</th>\n                                            <th md-column md-order-by="description">{{ \'MAIL.DESCRIPTION\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'MAIL.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="mailCannedAnswer" md-select-id="id" ng-repeat="mailCannedAnswer in vm_dc.mailAccountMailCannedAnswers.rows">\n                                            <td ng-click="vm_dc.createOrEditMailAccountMailCannedAnswer($event, mailCannedAnswer)" md-cell>{{mailCannedAnswer.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditMailAccountMailCannedAnswer($event, mailCannedAnswer)" md-cell>{{mailCannedAnswer.key}}</td>\n                                            <td ng-click="vm_dc.createOrEditMailAccountMailCannedAnswer($event, mailCannedAnswer)" md-cell>{{mailCannedAnswer.value}}</td>\n                                            <td ng-click="vm_dc.createOrEditMailAccountMailCannedAnswer($event, mailCannedAnswer)" md-cell>{{mailCannedAnswer.description}}</td>\n                                            <td ng-click="vm_dc.createOrEditMailAccountMailCannedAnswer($event, mailCannedAnswer)" md-cell>{{mailCannedAnswer.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MAIL.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditMailAccountMailCannedAnswer($event, mailCannedAnswer)" translate="MAIL.EDIT_MAILCANNEDANSWER">\n                                                                Edit MailCannedAnswer\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(mailCannedAnswer, $event)" translate="MAIL.DELETE_MAILCANNEDANSWER">\n                                                                Delete MailCannedAnswer\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.mailAccountMailCannedAnswers.rows.length">\n                                            <td md-cell colspan="7">\n                                                <span class="text-boxed-ligth" translate="MAIL.NO_MAILCANNEDANSWER_AVAILABLE">No mailcannedanswer available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'MAIL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MAIL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MAIL.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.mailAccountMailCannedAnswers.count}}" md-on-paginate="vm_dc.getMailAccountMailCannedAnswers" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.ACTIONS">ACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="mailAccount-detail-form-container actions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="MailAccountActionsController as vm_ac" ng-init="vm_ac.init(vm.mailAccount)" class="content" md-background-bg layout="row" layout-align="start start">\n                            \x3c!-- SIDENAV --\x3e\n                            <div class="navigation-simple sidenav main-sidenav md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="20">\n                                \x3c!-- SIDENAV CONTENT --\x3e\n                                <md-list class="no-padding">\n                                    <md-subheader class="md-no-sticky">\n                                        <span translate="VOICE.APPLICATIONS_LIST">\n          Applications List\n        </span>\n                                    </md-subheader>\n                                </md-list>\n                                <md-divider></md-divider>\n                                <md-list ng-sortable="vm_ac.list">\n                                    <md-list-item class="handle" ng-repeat="a in vm_ac.apps">\n                                        <md-icon md-font-icon="{{a.icon}}" class="s16"></md-icon>\n                                        <p class="text-truncate" translate="MAIL.{{(a.alias || a.appType) | uppercase}}">{{a.alias || a.appType}}</p>\n                                    </md-list-item>\n                                </md-list>\n                                \x3c!-- / SIDENAV CONTENT --\x3e\n                            </div>\n                            \x3c!-- / SIDENAV --\x3e\n                            <div flex></div>\n                            \x3c!-- MAIN --\x3e\n                            <div class="main scrollable md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="75">\n                                <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_ac.selectedMailAccountApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">Drag & Drop Routing</span>\n                                        <div flex></div>\n                                        <ms-search-bar on-search="vm_ac.query.filter = query" on-collapse="vm_ac.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    </div>\n                                </md-toolbar>\n                                <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_ac.selectedMailAccountApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">{{vm_ac.selectedMailAccountApps.length}} {{vm_ac.selectedMailAccountApps.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                        <div flex></div>\n                                        <md-button ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_ac.deleteSelectedMailAccountApps($event)" aria-label="delete selected" translate translate-attr-label="MAIL.DELETE_SELECTED">\n                                            <md-icon md-font-icon="icon-delete"></md-icon>\n                                        </md-button>\n                                    </div>\n                                </md-toolbar>\n\n                                \x3c!-- QUEUES TABLE --\x3e\n                                <md-table-container>\n                                    <table md-table md-row-select multiple ng-model="vm_ac.selectedMailAccountApps">\n                                        <thead md-head>\n                                            <tr md-row>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px">\n                                                    <span translate="VOICE.PRIORITY">Priority</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Type</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Appdata</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Interval</span>\n                                                </th>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px"></th>\n                                            </tr>\n                                        </thead>\n                                        <tbody md-body ng-sortable="vm_ac.applications">\n                                            <tr md-row md-select="app" md-select-id="id" ng-repeat="app in vm_ac.mailAccountApps.rows | filter: vm_ac.query.filter">\n                                                <td md-cell>\n                                                    <md-icon md-font-icon="icon-drag-vertical" class="s16 handle"></md-icon>\n                                                </td>\n                                                <td md-cell ng-click="vm_ac.editMailAccountApp($event, $index)"><span>{{app.priority}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editMailAccountApp($event, $index)">{{app.app.toLowerCase() === \'agi\' ? \'Cally-Square\' : app.app | ucfirst}}<span ng-if="app.appType.toLowerCase() === \'custom\'">*</span></td>\n                                                <td md-cell ng-click="vm_ac.editMailAccountApp($event, $index)"><span class="text-truncate" style="width:200px">{{app.appdata}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editInterval($event, $index)">{{app.IntervalId ? \'From List\' : app.interval}}</td>\n                                                <td md-cell>\n                                                    <md-button ng-click="vm_ac.editInterval($event, $index)" class="md-icon-button" aria-label="Interval">\n                                                        <md-icon md-font-icon="icon-timer"></md-icon>\n                                                        <md-tooltip>\n                                                            {{app.IntervalId ? \'From List\' : (app.interval === \'*,*,*,*\' ? \'Always\' : \'Custom\')}}\n                                                        </md-tooltip>\n                                                    </md-button>\n                                                </td>\n                                                <td md-cell class="actions">\n                                                    <md-menu>\n                                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                        </md-button>\n\n                                                        <md-menu-content width="3">\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editMailAccountApp($event, $index)" translate="VOICE.EDIT_APP">\n                                                                    Edit App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editInterval($event, $index)" translate="VOICE.EDIT_INTERVAL">\n                                                                    Edit Interval\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'">\n                                                                <md-button ng-click="vm_ac.deleteConfirm(app, $index, $event)" translate="VOICE.DELETE_APP">\n                                                                    Delete App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                        </md-menu-content>\n                                                    </md-menu>\n                                                </td>\n                                            </tr>\n                                            <tr md-row ng-hide="vm_ac.mailAccountApps.rows.length">\n                                                <td md-cell colspan="7">\n                                                    <span class="text-boxed-ligth" translate="VOICE.NO_APPS_AVAILABLE">No apps available</span>\n                                                </td>\n                                            </tr>\n                                        </tbody>\n                                    </table>\n                                </md-table-container>\n                                \x3c!-- / QUEUES TABLE --\x3e\n\n                                \x3c!-- NO RESULTS --\x3e\n\n                                \x3c!-- / NO RESULTS --\x3e\n                            </div>\n                            \x3c!-- / MAIN --\x3e\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.INTERACTIONS">INTERACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="mailAccount-detail-form-container interactions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="MailAccountInteractionsController as vm_dc" ng-init="vm_dc.init(vm.mailAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedMailAccountInteractions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="MAIL.INTERACTIONS">Interactions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.getMailAccountInteractions()" aria-label="refresh Interactions" translate translate-attr-label="MAIL.REFRESH_INTERACTIONS">\n                                        <md-icon md-font-icon="icon-refresh"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedMailAccountInteractions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedMailAccountInteractions.length}} {{vm_dc.selectedMailAccountInteractions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedMailAccountInteractions" csv-label="true" filename="mailAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedMailAccountInteractions($event)" aria-label="delete selected" translate translate-attr-label="MAILACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedMailAccountInteractions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getMailAccountInteractions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'MAIL.ID\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'MAIL.STARTEDAT\' | translate }}</th>\n                                            <th md-column>{{ \'MAIL.CONTACT\' | translate }}</th>\n                                            <th md-column>{{ \'MAIL.AGENT\' | translate }}</th>\n                                            <th md-column md-order-by="closedAt">{{ \'MAIL.CLOSEDAT\' | translate }}</th>\n                                            <th md-column md-order-by="disposition">{{ \'MAIL.DISPOSITION\' | translate }}</th>\n                                            <th md-column md-order-by="note">{{ \'MAIL.NOTES\' | translate }}</th>\n                                            <th md-column md-order-by="tag">{{ \'MAIL.TAGS\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="interaction" md-select-id="id" ng-repeat="interaction in vm_dc.mailAccountInteractions.rows">\n                                            <td md-cell>{{interaction.id}}</td>\n                                            <td md-cell>{{interaction.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell>{{interaction.Contact.firstName}}</td>\n                                            <td md-cell>{{interaction.Owner.name}}</td>\n                                            <td md-cell>{{interaction.closedAt | date:\'medium\'}}</td>\n                                            <td md-cell>{{interaction.disposition}}</td>\n                                            <td md-cell>{{interaction.note}}</td>\n                                            <td md-cell>\n                                                <div ng-if="interaction.Tags.length">\n                                                    <md-tooltip md-direction="left" layout="row">\n                                                        <span ng-repeat="tag in interaction.Tags">{{tag.name}}<span ng-if="!$last">, </span></span>\n                                                    </md-tooltip>\n                                                    <md-icon md-font-icon="icon-tag"></md-icon>\n                                                </div>\n                                            </td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MAIL.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.spymailInteraction($event, interaction)" translate="MAIL.SPYINTERACTION">\n                                                                Spy Interaction\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(interaction, $event)" translate="MAIL.DELETE_INTERACTION">\n                                                                Delete Interaction\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.mailAccountInteractions.rows.length">\n                                            <td md-cell colspan="13">\n                                                <span class="text-boxed-ligth" translate="MAIL.NO_INTERACTION_AVAILABLE">No interaction available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'MAIL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MAIL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MAIL.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.mailAccountInteractions.count}}" md-on-paginate="vm_dc.getMailAccountInteractions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/mail/views/mailAccounts/mailAccounts.html",'<div id="mailAccounts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-email" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="MAIL.MAILACCOUNTS">MailAccounts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="MAIL.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedMailAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedMailAccounts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="MAIL.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-mailAccounts-count">\n                    <span>{{vm.selectedMailAccounts.length}}</span>\n                <span translate="MAIL.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="MAILACCOUNTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllMailAccounts()" translate="MAIL.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectMailAccounts()" translate="MAIL.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedMailAccounts" csv-label="true" filename="mailAccounts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedMailAccounts($event)" aria-label="delete selected" translate translate-attr-label="MAILACCOUNTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- MAILACCOUNT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedMailAccounts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getMailAccounts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'MAIL.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'MAIL.NAME\' | translate }}</th>\n                                <th md-column md-order-by="key">{{ \'MAIL.KEY\' | translate }}</th>\n                                <th md-column md-order-by="email">{{ \'MAIL.EMAIL_ADDRESS\' | translate }}</th>\n                                <th md-column md-order-by="active">{{ \'MAIL.ACTIVE\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'MAIL.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.mailAccounts.rows.length">\n                                <td md-cell colspan="7">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="MAIL.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="mailAccount" md-select-id="id" ng-repeat="mailAccount in vm.mailAccounts.rows">\n                                <td md-cell ng-if="mailAccount.userpic"><img class="avatar" alt="{{mailAccount.name}}" ng-src="api/users/{{mailAccount.id}}/avatar" /></td>\n                                <td md-cell ng-if="!mailAccount.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{mailAccount.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditMailAccount($event, mailAccount)" md-cell class="id ">{{mailAccount.id}}</td>\n                                <td ng-click="vm.createOrEditMailAccount($event, mailAccount)" md-cell class="name ">{{mailAccount.name}}</td>\n                                <td ng-click="vm.createOrEditMailAccount($event, mailAccount)" md-cell class="key ">{{mailAccount.key}}</td>\n                                <td ng-click="vm.createOrEditMailAccount($event, mailAccount)" md-cell class="email ">{{mailAccount.email}}</td>\n                                <td ng-click="vm.createOrEditMailAccount($event, mailAccount)" md-cell class="active ">\n                                    <md-icon md-colors="{color: {{mailAccount.active ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{mailAccount.active ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                </td>\n                                <td ng-click="vm.createOrEditMailAccount($event, mailAccount)" md-cell class="description ">{{mailAccount.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MAIL.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(mailAccount, $event)" translate="MAIL.EDIT_MAILACCOUNT">\n                                                    Edit MailAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.verifysmtpverifysmtp(mailAccount, $event)" translate="MAIL.VERIFYSMTP_MAILACCOUNT">\n                                                    verifysmtp MailAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.interactionsgoto(mailAccount, $event)" translate="MAIL.INTERACTIONS_MAILACCOUNT">\n                                                    Interactions MailAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(mailAccount, $event)" translate="MAIL.GOTOREALTIME_MAILACCOUNT">\n                                                    goToRealtime MailAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(mailAccount, $event)" translate="MAIL.DELETE_MAILACCOUNT">\n                                                    Delete MailAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'MAIL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MAIL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MAIL.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.mailAccounts.count}}" md-on-paginate="vm.getMailAccounts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / MAILACCOUNT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD MAILACCOUNT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-mailAccount-button" ng-click="vm.createOrEditMailAccount($event)" aria-label="add mailAccount" translate translate-attr-aria-label="MAIL.ADD_MAILACCOUNT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD MAILACCOUNT BUTTON --\x3e\n</div>'),e.put("app/main/apps/mail/views/mailQueues/create/dialog.html",'<md-dialog class="mailQueue-dialog" aria-label="New MailQueue">\n    <form name="mailQueueForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.mailQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newMailQueue">\n                <div class="hint"><span translate="MAIL.HELP.NAME"></span></div>\n                <div ng-messages="mailQueueForm[\'name\'].$error" ng-show="mailQueueForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="MAIL.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.STRATEGY">Strategy</label>\n                <md-select name="strategy" ng-model="vm.mailQueue.strategy" required>\n                    <md-option ng-value="\'beepall\'">Beepall</md-option>\n                    <md-option ng-value="\'rrmemory\'">RR Memory</md-option>\n                </md-select>\n                <div ng-messages="mailQueueForm[\'strategy\'].$error" ng-show="mailQueueForm[\'strategy\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.AGENT_TIMEOUT">Agent_Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.mailQueue.timeout" min="1" max="2147483" ng-required="true">\n                <div ng-messages="mailQueueForm[\'timeout\'].$error" ng-show="mailQueueForm[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.AGENT_TIMEOUT_REQUIRED">Agent_Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MAIL.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="MAIL.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.mailQueue.description">\n                <div ng-messages="mailQueueForm[\'description\'].$error" ng-show="mailQueueForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newMailQueue" ng-click="vm.saveMailQueue()" class="send-button md-accent md-raised" ng-disabled="mailQueueForm.$invalid || mailQueueForm.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newMailQueue" ng-click="vm.addNewMailQueue()" class="send-button md-accent md-raised" ng-disabled="mailQueueForm.$invalid" aria-label="ADD" translate="MAIL.ADD_MAILQUEUE" translate-attr-aria-label="MAIL.ADD_MAILQUEUE">\n                    ADD MAILQUEUE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newMailQueue" ng-click="vm.deleteMailQueue($event)" aria-label="DELETE" translate translate-attr-aria-label="MAIL.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="MAIL.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailQueues/edit/agentadd/agentadd.html",'<md-dialog class="mailQueue-dialog" aria-label="mailQueue">\n    <form name="mailQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="MAIL.AGENTADD_MAILQUEUE">Add Agent to mailQueue</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailQueues/edit/teamadd/teamadd.html",'<md-dialog class="mailQueue-dialog" aria-label="mailQueue">\n    <form name="mailQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="MAIL.TEAMADD_MAILQUEUE">Add Team in MAILQUEUE</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailQueues/edit/view.html",'<div id="mail-mailQueue" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-mailQueues-button md-icon-button" aria-label="Go to mailQueues" ng-click="vm.gotoMailQueues()" translate translate-attr-aria-label="MAIL.GO_TO_MAILQUEUES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="mailQueue-image" hide-xs>\n                    <img ng-src="assets/images/business/mailQueues.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.mailQueue.id}}\n                        <span ng-if="vm.mailQueue.name">{{vm.mailQueue.name}}</span>\n                        <span ng-if="vm.mailQueue.exten">{{vm.mailQueue.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="MAIL.CREATED_AT"></span> <span>{{vm.mailQueue.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.teamadddialog(vm.mailQueue, $event)" class="md-fab md-orange-500-bg md-icon-button" aria-label="teamadd">\n                <md-tooltip><span translate="MAIL.TEAMADD_MAILQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-multiple-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.agentadddialog(vm.mailQueue, $event)" class="md-fab md-purple-500-bg md-icon-button" aria-label="agentadd">\n                <md-tooltip><span translate="MAIL.AGENTADD_MAILQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-plus"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveMailQueue()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid)" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="mailQueue-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MAIL.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.mailQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="MAIL.HELP.NAME"></span></div>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="MAIL.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.STRATEGY">Strategy</label>\n                                <md-select name="strategy" ng-model="vm.mailQueue.strategy" required>\n                                    <md-option ng-value="\'beepall\'">Beepall</md-option>\n                                    <md-option ng-value="\'rrmemory\'">RR Memory</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'strategy\'].$error" ng-show="generalForm[\'strategy\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.AGENT_TIMEOUT">Agent_Timeout</label>\n                                <input type="number" name="timeout" ng-model="vm.mailQueue.timeout" min="1" max="2147483" ng-required="true">\n                                <div ng-messages="generalForm[\'timeout\'].$error" ng-show="generalForm[\'timeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.AGENT_TIMEOUT_REQUIRED">Agent_Timeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MAIL.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MAIL.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.mailQueue.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/mail/views/mailQueues/mailQueues.html",'<div id="mailQueues" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-email" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="MAIL.MAILQUEUES">MailQueues</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="MAIL.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedMailQueues.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedMailQueues =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="MAIL.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-mailQueues-count">\n                    <span>{{vm.selectedMailQueues.length}}</span>\n                <span translate="MAIL.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="MAILQUEUES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllMailQueues()" translate="MAIL.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectMailQueues()" translate="MAIL.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedMailQueues" csv-label="true" filename="mailQueues.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedMailQueues($event)" aria-label="delete selected" translate translate-attr-label="MAILQUEUES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- MAILQUEUE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedMailQueues" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getMailQueues">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'MAIL.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'MAIL.NAME\' | translate }}</th>\n                                <th md-column md-order-by="strategy">{{ \'MAIL.STRATEGY\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.mailQueues.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="MAIL.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="mailQueue" md-select-id="id" ng-repeat="mailQueue in vm.mailQueues.rows">\n                                <td md-cell ng-if="mailQueue.userpic"><img class="avatar" alt="{{mailQueue.name}}" ng-src="api/users/{{mailQueue.id}}/avatar" /></td>\n                                <td md-cell ng-if="!mailQueue.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{mailQueue.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditMailQueue($event, mailQueue)" md-cell class="id ">{{mailQueue.id}}</td>\n                                <td ng-click="vm.createOrEditMailQueue($event, mailQueue)" md-cell class="name ">{{mailQueue.name}}</td>\n                                <td ng-click="vm.createOrEditMailQueue($event, mailQueue)" md-cell class="strategy ">{{ vm.arraystrategy[mailQueue.strategy].option }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MAIL.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(mailQueue, $event)" translate="MAIL.EDIT_MAILQUEUE">\n                                                    Edit MailQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.teamadddialog(mailQueue, $event)" translate="MAIL.TEAMADD_MAILQUEUE">\n                                                    teamadd MailQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.agentadddialog(mailQueue, $event)" translate="MAIL.AGENTADD_MAILQUEUE">\n                                                    agentadd MailQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(mailQueue, $event)" translate="MAIL.DELETE_MAILQUEUE">\n                                                    Delete MailQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(mailQueue, $event)" translate="MAIL.GOTOREALTIME_MAILQUEUE">\n                                                    goToRealtime MailQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'MAIL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MAIL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MAIL.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.mailQueues.count}}" md-on-paginate="vm.getMailQueues" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / MAILQUEUE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD MAILQUEUE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-mailQueue-button" ng-click="vm.createOrEditMailQueue($event)" aria-label="add mailQueue" translate translate-attr-aria-label="MAIL.ADD_MAILQUEUE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD MAILQUEUE BUTTON --\x3e\n</div>'),e.put("app/main/apps/mail/views/mailSubtatuses/create/dialog.html",'<md-dialog class="mailSubstatus-dialog" aria-label="New MailSubstatus">\n    <form name="mailSubstatusForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.mailSubstatus.name" ng-required="true" autofocus>\n                <div ng-messages="mailSubstatusForm[\'name\'].$error" ng-show="mailSubstatusForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.mailSubstatus.description">\n                <div ng-messages="mailSubstatusForm[\'description\'].$error" ng-show="mailSubstatusForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newMailSubstatus" ng-click="vm.saveMailSubstatus()" class="send-button md-accent md-raised" ng-disabled="mailSubstatusForm.$invalid || mailSubstatusForm.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newMailSubstatus" ng-click="vm.addNewMailSubstatus()" class="send-button md-accent md-raised" ng-disabled="mailSubstatusForm.$invalid" aria-label="ADD" translate="MAIL.ADD_MAILSUBSTATUS" translate-attr-aria-label="MAIL.ADD_MAILSUBSTATUS">\n                    ADD MAILSUBSTATUS\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newMailSubstatus" ng-click="vm.deleteMailSubstatus($event)" aria-label="DELETE" translate translate-attr-aria-label="MAIL.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="MAIL.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailSubtatuses/mailSubtatuses.html",'<div id="mailSubtatuses" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-email" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="MAIL.MAILSUBSTATUSES">MailSubstatuses</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="MAIL.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedMailSubstatuses.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedMailSubstatuses =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="MAIL.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-mailSubtatuses-count">\n                    <span>{{vm.selectedMailSubstatuses.length}}</span>\n                <span translate="MAIL.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="MAILSUBSTATUSES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllMailSubstatuses()" translate="MAIL.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectMailSubstatuses()" translate="MAIL.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedMailSubstatuses" csv-label="true" filename="mailSubtatuses.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedMailSubstatuses($event)" aria-label="delete selected" translate translate-attr-label="MAILSUBSTATUSES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- MAILSUBSTATUS TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedMailSubstatuses" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getMailSubstatuses">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'MAIL.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'MAIL.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'MAIL.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.mailSubtatuses.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="MAIL.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="mailSubstatus" md-select-id="id" ng-repeat="mailSubstatus in vm.mailSubtatuses.rows">\n                                <td md-cell ng-if="mailSubstatus.userpic"><img class="avatar" alt="{{mailSubstatus.name}}" ng-src="api/users/{{mailSubstatus.id}}/avatar" /></td>\n                                <td md-cell ng-if="!mailSubstatus.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{mailSubstatus.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditMailSubstatus($event, mailSubstatus)" md-cell class="id ">{{mailSubstatus.id}}</td>\n                                <td ng-click="vm.createOrEditMailSubstatus($event, mailSubstatus)" md-cell class="name ">{{mailSubstatus.name}}</td>\n                                <td ng-click="vm.createOrEditMailSubstatus($event, mailSubstatus)" md-cell class="description ">{{mailSubstatus.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MAIL.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(mailSubstatus, $event)" translate="MAIL.EDIT_MAILSUBSTATUS">\n                                                    Edit MailSubstatus\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.deleteconfirm(mailSubstatus, $event)" translate="MAIL.DELETE_MAILSUBSTATUS">\n                                                    Delete MailSubstatus\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'MAIL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MAIL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MAIL.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.mailSubtatuses.count}}" md-on-paginate="vm.getMailSubstatuses" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / MAILSUBSTATUS TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD MAILSUBSTATUS BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-mailSubstatus-button" ng-click="vm.createOrEditMailSubstatus($event)" aria-label="add mailSubstatus" translate translate-attr-aria-label="MAIL.ADD_MAILSUBSTATUS">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD MAILSUBSTATUS BUTTON --\x3e\n</div>'),e.put("app/main/apps/mail/views/realtime/accounts/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="MAIL.ACCOUNTS">Accounts</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- AGENT TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getMailAccounts">\n            <tr md-row>\n                <th md-column md-order-by="name">{{ \'MAIL.NAME\' | translate }}</th>\n                <th md-column>{{ \'MAIL.KEY\' | translate }}</th>\n                <th md-column>{{ \'MAIL.TOTAL\' | translate }}</th>\n                <th md-column>{{ \'MAIL.IN\' | translate }}</th>\n                <th md-column>{{ \'MAIL.OUT\' | translate }}</th>\n                <th md-column>{{ \'MAIL.IMAP_STATUS\' | translate }}</th>\n                <th md-column>{{ \'MAIL.SMTP_STATUS\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.mailAccounts">\n                <td md-cell colspan="4">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="MAIL.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row md-select="vm.mailAccounts[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td md-cell>{{vm.mailAccounts[value].name}}</td>\n                <td md-cell>{{vm.mailAccounts[value].key}}</td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{(vm.mailAccounts[value].in || 0) + (vm.mailAccounts[value].out || 0)}}</span>\n                </td>\n                <td md-cell>\n                    <div layout="row">\n                        <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                        <span class="md-capture blue-fg">{{vm.mailAccounts[value].in || 0}}</span>\n                        <span class="text-boxed" ng-if="mailAccount.in">{{vm.mailAccounts[value].lastIn ?  (vm.mailAccounts[value].lastIn | date: \'shortTime\') : \'\'}}</span>\n                    </div>\n                </td>\n                <td md-cell>\n                    <div layout="row">\n                        <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                        <span class="md-capture green-fg">{{vm.mailAccounts[value].out || 0}}</span>\n                        <span class="text-boxed" ng-if="mailAccount.out">{{vm.mailAccounts[value].lastOut ?  (vm.mailAccounts[value].lastOut | date: \'shortTime\') : \'\'}}</span>\n                    </div>\n                </td>\n                <td md-cell>\n                    <div layout="row" layout-align="start center">\n                        <div layout="column" layout-align="center center">\n                            <md-button class="md-icon-button" aria-label="Status">\n                                <md-tooltip>{{vm.mailAccounts[value].Imap.messageStatus}}</md-tooltip>\n                                <div ng-switch="vm.mailAccounts[value].Imap.status">\n                                    <md-icon ng-switch-when="error" md-font-icon="icon-alert yellow-fg"></md-icon>\n                                    <md-icon ng-switch-when="disabled" md-font-icon="icon-close grey-fg"></md-icon>\n                                    <md-icon ng-switch-default md-font-icon="icon-checkbox-marked-circle-outline green-fg"></md-icon>\n                                </div>\n                            </md-button>\n                            <span class="md-caption grey-fg">{{ (\'MAIL.\' + vm.mailAccounts[value].Imap.status.toUpperCase()) | translate}}</span>\n                        </div>\n                        <span class="text-boxed" ng-if="vm.mailAccounts[value].active">{{vm.mailAccounts[value].Imap.lastSync | date: \'shortTime\'}}</span>\n                    </div>\n                </td>\n                <td md-cell>\n                    <div layout="row" layout-align="start center" ng-if="vm.mailAccounts[value].Smtp.status">\n                        <div layout="column" layout-align="center center">\n                            <md-button class="md-icon-button" aria-label="Status">\n                                <md-tooltip>{{vm.mailAccounts[value].Smtp.messageStatus}}</md-tooltip>\n                                <md-icon md-font-icon="{{ vm.mailAccounts[value].Smtp.status == \'error\' ? \'icon-alert yellow-fg\' : \'icon-checkbox-marked-circle-outline green-fg\'}}"></md-icon>\n                            </md-button>\n                            <span class="md-caption grey-fg">{{ (\'MAIL.\' + vm.mailAccounts[value].Smtp.status.toUpperCase()) | translate}}</span>\n                        </div>\n                        <span class="text-boxed">{{vm.mailAccounts[value].Smtp.lastSync | date: \'shortTime\'}}</span>\n                    </div>\n                    <span class="md-caption grey-fg" ng-if="!vm.mailAccounts[value].Smtp.status">{{ \'MAIL.NEVER_VERIFIED\' | translate }}</span>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="4">\n                            <md-menu-item>\n                                <md-button ng-click="vm.goToMailAccount($event, vm.mailAccounts[value])" translate="MAIL.EDIT_ACCOUNT">\n                                    Edit Account\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.verifySmtp($event, vm.mailAccounts[value])" translate="MAIL.VERIFY_SMTP">\n                                    Verify Smtp\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'MAIL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MAIL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MAIL.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.count}}" md-on-paginate="vm.getmailAccounts" md-page-select></md-table-pagination>\n\x3c!-- / AGENT TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/mail/views/realtime/agents/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="MAIL.AGENTS">Agents</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query; vm.onInit()" on-collapse="vm.query.filter = undefined; vm.onInit()" debounce="300"></ms-search-bar>\n        \x3c!-- <md-button class="md-icon-button" ng-click="vm.showInfo($event)">\n      <i class="icon-information-outline grey-600-fg">\n        <md-tooltip>{{\'VOICE.INFO\' | translate}}</md-tooltip>\n      </i>\n    </md-button> --\x3e\n        <md-select ng-model="vm.query.globalStatusFilter" class="md-caption" ng-change="vm.query.pauseTypeFilter = \'\'; vm.onInit()">\n            <md-option ng-value="\'\'">{{ \'MAIL.ALL\' | translate }}</md-option>\n            <md-option value="pause">{{ \'MAIL.PAUSE\' | translate }}</md-option>\n            <md-option value="*pause">{{ \'MAIL.PARTIALPAUSE\' | translate }}</md-option>\n            <md-option value="busy">{{ \'MAIL.BUSY\' | translate }}</md-option>\n            <md-option value="idle">{{ \'MAIL.IDLE\' | translate }}</md-option>\n        </md-select>\n\n        <md-select ng-if="vm.isPause(vm.query.globalStatusFilter)" ng-model="vm.query.pauseTypeFilter" class="md-caption" ng-change="vm.onInit()">\n            <md-option ng-value="\'\'">All</md-option>\n            <md-option value="DEFAULT PAUSE">DEFAULT PAUSE</md-option>\n            <md-option value="ACW">ACW</md-option>\n            <md-option value="LOGININPAUSE">LOGININPAUSE</md-option>\n            <md-option value="Auto-Pause">AUTOPAUSE</md-option>\n            <md-option ng-value="pause.name" ng-repeat="pause in vm.pauses.rows">{{pause.name}}</md-option>\n        </md-select>\n    </div>\n</md-toolbar>\n\n\x3c!-- AGENT TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.order" md-on-reorder="vm.onInit">\n            <tr md-row border="1">\n                <th class="bv text-center" colspan="3">{{ \'MAIL.AGENT\' | translate }}</th>\n                <th class="bv bl text-center" colspan="2">{{ \'VOICE.VOICE\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="bv bl text-center" colspan="2">{{ \'CHAT.CHAT\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="bv bl text-center" colspan="2">{{ \'MAIL.MAIL\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="bv bl text-center" colspan="2">{{ \'SMS.SMS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="bv bl text-center" colspan="2">{{ \'OPENCHANNEL.OPENCHANNEL\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="bv bl text-center" colspan="2">{{ \'FAX.FAX\' | translate }}</th>\n                <th width="10px" class="bt bl" rowspan="2"></th>\n                \x3c!-- <th md-column>{{ \'VOICE.PHONE_STATE\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PHONE_STATUS\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PAUSE\' | translate }}</th>\n                <th md-column width="10px"></th> --\x3e\n            </tr>\n            <tr md-row>\n                <th class="bl" md-column md-order-by="fullname">{{ \'MAIL.NAME\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatus">{{ \'MAIL.STATUS\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatusTime">{{ \'MAIL.TIMER\' | translate }}</th>\n\n                <th class="bl custom-column">{{ \'VOICE.STATUS\' | translate }}</th>\n                <th class="bl custom-column">Info</th>\n\n                <th ng-if="vm.license.chat" class="bl text-center">{{ \'CHAT.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'CHAT.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.mail" class="bl text-center">{{ \'MAIL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'MAIL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.messaging" class="bl text-center">{{ \'SMS.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'SMS.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.openchannel" class="bl text-center">{{ \'OPENCHANNEL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'OPENCHANNEL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.fax" class="bl text-center">{{ \'FAX.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'FAX.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.order.length">\n                <td md-cell colspan="17">\n                    <div layout="row" layout-align="center center">\n                        <span>{{ \'MAIL.NO_AGENT_ONLINE\' | translate }}</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-select="vm.agents[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td class="bt padding-5">\n                    <div layout="row" layout-align="start center">\n                        <img class="avatar" ng-src="{{vm.agents[value].userpic && \'api/users/\'+vm.agents[value].id+\'/avatar\' || \'assets/images/avatars/profile.png\'}}">\n                        <div layout="column">\n                            <span>{{vm.agents[value].fullname}}</span>\n                            <span>{{vm.agents[value].internal}}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt">\n                    <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'busy\':\'indigo-100-bg\',\'*pause\':\'amber-50-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].globalStatus]">{{ vm.isPause(vm.agents[value].globalStatus) ? \'\' : vm.agents[value].globalStatus | uppercase }} {{ vm.isPause(vm.agents[value].globalStatus) ? (vm.isPartialPause(vm.agents[value].globalStatus) ? \'*\'+vm.agents[value].pauseType || \'DEFAULT PAUSE\'  : vm.agents[value].pauseType || \'DEFAULT PAUSE\') : \'\'}}</span>\n                </td>\n                <td class="bt custom-column">\n                    <timer start-time="vm.agents[value].globalStatusTime" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                </td>\n                <td class="bt bl">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'talking\':\'indigo-100-bg\',\'ringing\':\'orange-400-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].voiceStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt bl">\n                    <div layout="column">\n                        <span ng-if="vm.agents[value].queue" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].queue }}</span>\n                        <span ng-if="vm.agents[value].destconnectedlinenum" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].destconnectedlinenum }}</span>\n                        <span class="padding-5" ng-if="vm.agents[value].queue || vm.agents[value].destconnectedlinenum">\n                            <timer start-time="vm.agents[value].voiceStatusTime" interval="1000" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                        </span>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt">--</td>\n                <td class="bt">--</td> --\x3e\n                <td class="bt bl" ng-if="vm.license.chat">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt padding-5 text-center">{{ agent.chatCurrentCapacity }}/{{ agent.chatCapacity > 0 ? agent.chatCapacity : \'∞\' }}</td> --\x3e\n                <td md-number class="bt text-center font-size-20" ng-if="vm.license.chat" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.mail">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.mail" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.messaging">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.messaging" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.openchannel">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">4</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">89</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.openchannel" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.fax">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">7</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">2</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.fax" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxCurrentCapacity }}</td>\n                <td class="bl bt padding-5 text-center">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="4">\n                            <md-menu-item>\n                                <md-button ng-click="vm.logout(vm.agents[value], $event)" translate="MAIL.LOGOUT">\n                                    Logout\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.queueAdd(vm.agents[value], $event)" translate="MAIL.AGENTADD_QUEUE">\n                                    Add Agent In Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="MAIL.PAUSE">Pause</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item>\n                                            <md-button ng-disabled=" vm.agents[value].voicePause && \'DEFAULT PAUSE\' === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value])"><em translate="MAIL.DEFAULT_PAUSE">Default Pause</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.pauses.rows.length" ng-repeat="pause in vm.pauses.rows">\n                                            <md-button ng-disabled="vm.agents[value].voicePause && pause.name === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value], pause.name)">{{pause.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                            <md-menu-item ng-if="vm.isPause(vm.agents[value].globalStatus)">\n                                <md-button ng-click="vm.unPause(vm.agents[value])" translate="MAIL.UNPAUSE">\n                                    Unpause\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'MAIL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MAIL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MAIL.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.filteredAgents.length}}" md-on-paginate="vm.onInit" md-page-select></md-table-pagination>\n\x3c!-- / AGENT TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/mail/views/realtime/queues/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="MAIL.QUEUES">Queues</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUE TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getQueues">\n            <tr md-row>\n                <th md-column md-order-by="name">{{ \'MAIL.NAME\' | translate }}</th>\n                <th md-column>{{ \'MAIL.LOGGED_IN\' | translate }}</th>\n                <th md-column>{{ \'MAIL.PAUSED\' | translate }}</th>\n                <th md-column>{{ \'MAIL.READY\' | translate }}</th>\n                <th md-column>{{ \'MAIL.WAITING\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.queues">\n                <td md-cell colspan="7">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="MAIL.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row md-select="vm.queues[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td md-cell>{{vm.queues[value].name}}</td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].loggedInDb || 0}} ({{vm.queues[value].loggedIn || 0}})</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].paused || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].available || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].waiting || 0}}</span>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MAIL.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="3">\n                            <md-menu-item>\n                                <md-button ng-click="vm.createOrEditMailQueue($event, vm.queues[value])" translate="MAIL.EDIT_QUEUE">\n                                    Edit Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.agentAdd($event, vm.queues[value])" translate="MAIL.AGENTSADD_QUEUE">\n                                    Add Agents to queue\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'MAIL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MAIL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MAIL.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.count}}" md-on-paginate="vm.getQueues" md-page-select></md-table-pagination>\n\x3c!-- / QUEUE TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/mail/views/realtime/realtime.html",'<div id="realtime" class="page-layout simple tabbed" layout="column" ng-cloak>\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.AGENTS">Agents</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.QUEUES">Queues</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.ACCOUNTS">Accounts</span>\n                </md-tab-label>\n            </md-tab>\n        </md-tabs>\n\n        <md-card ui-view></md-card>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n</div>'),e.put("app/main/apps/motiondialer/views/ivrCampaigns/create/dialog.html",'<md-dialog class="ivrCampaign-dialog" aria-label="New IvrCampaign">\n    <form name="ivrCampaignForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.ivrCampaign.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newIvrCampaign">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.NAME"></span></div>\n                <div ng-messages="ivrCampaignForm[\'name\'].$error" ng-show="ivrCampaignForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="MOTIONDIALER.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.ivrCampaign.active" aria-label="Active"><span translate="MOTIONDIALER.ACTIVE">Active</span></md-switch>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.TRUNK">Trunk</label>\n                <md-select name="TrunkId" ng-model="vm.ivrCampaign.TrunkId" required>\n                    <md-option ng-value="TrunkId.id" ng-repeat="TrunkId in vm.trunks">{{ TrunkId.name }}</md-option>\n                </md-select>\n                <div ng-messages="ivrCampaignForm[\'TrunkId\'].$error" ng-show="ivrCampaignForm[\'TrunkId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.TRUNK_REQUIRED">Trunk field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.INTERVAL">Interval</label>\n                <md-select name="IntervalId" ng-model="vm.ivrCampaign.IntervalId" required>\n                    <md-option ng-value="IntervalId.id" ng-repeat="IntervalId in vm.interval">{{ IntervalId.name }}</md-option>\n                </md-select>\n                <div ng-messages="ivrCampaignForm[\'IntervalId\'].$error" ng-show="ivrCampaignForm[\'IntervalId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.INTERVAL_REQUIRED">Interval field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.CHECKDUPLICATE">CheckDuplicate</label>\n                <md-select name="dialCheckDuplicateType" ng-model="vm.ivrCampaign.dialCheckDuplicateType" required>\n\n                    <md-option ng-value="\'always\'"> {{ \'MOTIONDIALER.ALWAYS\' | translate }}</md-option>\n\n                    <md-option ng-value="\'never\'"> {{ \'MOTIONDIALER.NEVER\' | translate }}</md-option>\n\n                    <md-option ng-value="\'onlyIfOpen\'"> {{ \'MOTIONDIALER.ONLY_IF_OPEN\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="ivrCampaignForm[\'dialCheckDuplicateType\'].$error" ng-show="ivrCampaignForm[\'dialCheckDuplicateType\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.CHECKDUPLICATE_REQUIRED">CheckDuplicate field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.CALLYSQUAREPROJECT">CallySquareProject</label>\n                <md-select name="SquareProjectId" ng-model="vm.ivrCampaign.SquareProjectId" required>\n                    <md-option ng-value="SquareProjectId.id" ng-repeat="SquareProjectId in vm.projects">{{ SquareProjectId.name }}</md-option>\n                </md-select>\n                <div ng-messages="ivrCampaignForm[\'SquareProjectId\'].$error" ng-show="ivrCampaignForm[\'SquareProjectId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.CALLYSQUAREPROJECT_REQUIRED">CallySquareProject field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.CONCURRENTCALLS">ConcurrentCalls</label>\n                <input type="number" name="limitCalls" ng-model="vm.ivrCampaign.limitCalls" min="1" max="200" ng-required="true">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.CONCURRENTCALLS"></span></div>\n                <div ng-messages="ivrCampaignForm[\'limitCalls\'].$error" ng-show="ivrCampaignForm[\'limitCalls\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.CONCURRENTCALLS_REQUIRED">ConcurrentCalls field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.CONCURRENTCALLS_MUST_BE_GREATER_THAN_OR_EQUAL_TO">ConcurrentCalls must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="MOTIONDIALER.ERRORS.CONCURRENTCALLS_MUST_BE_LESS_THAN_OR_EQUAL_TO">ConcurrentCalls must be a valid greater or equal than</span> <span>200</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.ivrCampaign.description">\n                <div ng-messages="ivrCampaignForm[\'description\'].$error" ng-show="ivrCampaignForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newIvrCampaign" ng-click="vm.saveIvrCampaign()" class="send-button md-accent md-raised" ng-disabled="ivrCampaignForm.$invalid || ivrCampaignForm.$pristine" aria-label="SAVE" translate="MOTIONDIALER.SAVE" translate-attr-aria-label="MOTIONDIALER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newIvrCampaign" ng-click="vm.addNewIvrCampaign()" class="send-button md-accent md-raised" ng-disabled="ivrCampaignForm.$invalid" aria-label="ADD" translate="MOTIONDIALER.ADD_IVRCAMPAIGN" translate-attr-aria-label="MOTIONDIALER.ADD_IVRCAMPAIGN">\n                    ADD IVRCAMPAIGN\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newIvrCampaign" ng-click="vm.deleteIvrCampaign($event)" aria-label="DELETE" translate translate-attr-aria-label="MOTIONDIALER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="MOTIONDIALER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/ivrCampaigns/edit/blacklistadd/blacklistadd.html",'<md-dialog class="ivrCampaign-dialog" aria-label="ivrCampaign">\n    <form name="ivrCampaignForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="MOTIONDIALER.BLACKLISTADD_IVRCAMPAIGN">Add List in IVRCAMPAIGN</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect ng-hide="vm.loading" options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n            <div ng-hide="!vm.loading" layout-fill style="min-height: 397px;" layout="row" layout-sm="column" layout-align="center center">\n                <md-progress-circular class="md-primary md-hue-1" md-diameter="96"></md-progress-circular>\n            </div>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/ivrCampaigns/edit/hoppers/dialog.html",'<md-dialog class="hopper-dialog" aria-label="New Hopper">\n    <form name="hopperForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <div class="md-block">\n                <label translate="MOTIONDIALER.SCHEDULEDAT">ScheduledAt</label>\n                <md-content layout="row" class="md-padding">\n                    <div flex class="md-block">\n                        <mdp-date-picker mdp-open-on-click name="scheduledatDate" mdp-placeholder="Date" mdp-format="YYYY-MM-DD" ng-model="vm.hopper.scheduledat" ng-init="vm.hopper.scheduledat = vm.getDateFromString(vm.hopper.scheduledat)">\n                            <div ng-messages="hopperForm.dateRangeFrom.$error" ng-show="hopperForm.dateRangeFrom.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="MOTIONDIALER.ERRORS.DATE_REQUIRED">Date is required</span>\n                                </div>\n                                <div ng-message="format">\n                                    <span translate="MOTIONDIALER.ERRORS.DATE_INVALID">Date is invalid</span>\n                                </div>\n                            </div>\n                        </mdp-date-picker>\n                    </div>\n                    <div flex class="md-block">\n                        <mdp-time-picker mdp-open-on-click name="scheduledatTime" mdp-placeholder="Time" mdp-format="HH:mm:ss" mdp-auto-switch="true" ng-model="vm.hopper.scheduledat" ng-init="vm.hopper.scheduledat = vm.getDateFromString(vm.hopper.scheduledat)">\n                            <div ng-messages="hopperForm.timeRangeFrom.$error" ng-show="hopperForm.timeRangeFrom.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="MOTIONDIALER.ERRORS.TIME_REQUIRED">Time is required</span>\n                                </div>\n                                <div ng-message="format">\n                                    <span translate="MOTIONDIALER.ERRORS.TIME_INVALID">Time is invalid</span>\n                                </div>\n                            </div>\n                        </mdp-time-picker>\n                    </div>\n                </md-content>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.PRIORITY">Priority</label>\n                <md-select name="priority" ng-model="vm.hopper.priority">\n                    <md-option ng-value="\'4\'">Highest</md-option>\n                    <md-option ng-value="\'3\'">High</md-option>\n                    <md-option ng-value="\'2\'">Medium</md-option>\n                    <md-option ng-value="\'1\'">Low</md-option>\n                    <md-option ng-value="\'0\'">Lowest</md-option>\n                </md-select>\n                <div class="hint"><span translate="MOTIONDIALER.HELP.PRIORITY"></span></div>\n                <div ng-messages="hopperForm[\'priority\'].$error" ng-show="hopperForm[\'priority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.PRIORITY_REQUIRED">Priority field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newHopper" ng-click="vm.saveHopper()" class="send-button md-accent md-raised" ng-disabled="hopperForm.$invalid || hopperForm.$pristine" aria-label="SAVE" translate="MOTIONDIALER.SAVE" translate-attr-aria-label="MOTIONDIALER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newHopper" ng-click="vm.addNewHopper()" class="send-button md-accent md-raised" ng-disabled="hopperForm.$invalid" aria-label="ADD" translate="MOTIONDIALER.ADD_HOPPER" translate-attr-aria-label="MOTIONDIALER.ADD_HOPPER">\n                    ADD HOPPER\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newHopper" ng-click="vm.deleteHopper($event)" aria-label="DELETE" translate translate-attr-aria-label="MOTIONDIALER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="MOTIONDIALER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/ivrCampaigns/edit/listadd/listadd.html",'<md-dialog class="ivrCampaign-dialog" aria-label="ivrCampaign">\n    <form name="ivrCampaignForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="MOTIONDIALER.LISTADD_IVRCAMPAIGN">Add List in IVRCAMPAIGN</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect ng-hide="vm.loading" options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n            <div ng-hide="!vm.loading" layout-fill style="min-height: 397px;" layout="row" layout-sm="column" layout-align="center center">\n                <md-progress-circular class="md-primary md-hue-1" md-diameter="96"></md-progress-circular>\n            </div>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/ivrCampaigns/edit/resetlist/resetlist.html",'<md-dialog class="queueCampaign-dialog" aria-label="queueCampaign">\n    <form name="queueCampaignForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="MOTIONDIALER.RESETLIST ">Reset List</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-disabled="vm.loading" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content ng-hide="vm.loading">\n            <div layout="row" layout-wrap flex>\n                <div flex-xs flex="50">\n                    <md-checkbox aria-label="Select All" ng-checked="vm.isChecked()" md-indeterminate="vm.isIndeterminate()" ng-click="vm.toggleAll()">\n                        <span ng-if="vm.isChecked()" translate="MOTIONDIALER.UNSELECTALL"></span>\n                        <span ng-if="!vm.isChecked()" translate="MOTIONDIALER.SELECTALL"></span>\n                    </md-checkbox>\n                </div>\n                <div flex-xs flex="50">\n                </div>\n                <div flex="{{vm.items.length > 10 ? 50 : 100 }}" ng-repeat="item in vm.items">\n                    <md-checkbox ng-checked="vm.exists(item, vm.selected)" ng-click="vm.toggle(item, vm.selected)">\n                        {{ item.name | limitTo:40 }}\n                    </md-checkbox>\n                </div>\n            </div>\n        </md-dialog-content>\n        <md-dialog-actions ng-hide="vm.loading" layout="row" layout-align="end center">\n            <div>\n            </div>\n            <md-button type="submit" ng-click="vm.listSelected()" class="send-button md-accent md-raised" ng-disabled="vm.loading" aria-label="RESET" translate="MOTIONDIALER.RESET" translate-attr-aria-label="MOTIONDIALER.RESET">\n                SAVE\n            </md-button>\n        </md-dialog-actions>\n        <div ng-hide="!vm.loading" layout-fill style="min-height: 397px;" layout="row" layout-sm="column" layout-align="center center">\n            <md-progress-circular class="md-primary md-hue-1" md-diameter="96"></md-progress-circular>\n        </div>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/ivrCampaigns/edit/view.html",'<div id="motiondialer-ivrCampaign" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-ivrCampaigns-button md-icon-button" aria-label="Go to ivrCampaigns" ng-click="vm.gotoIvrCampaigns()" translate translate-attr-aria-label="MOTIONDIALER.GO_TO_IVRCAMPAIGNS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="ivrCampaign-image" hide-xs>\n                    <img ng-src="assets/images/business/ivrCampaigns.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.ivrCampaign.id}}\n                        <span ng-if="vm.ivrCampaign.name">{{vm.ivrCampaign.name}}</span>\n                        <span ng-if="vm.ivrCampaign.exten">{{vm.ivrCampaign.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="MOTIONDIALER.CREATED_AT"></span> <span>{{vm.ivrCampaign.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.listadddialog(vm.ivrCampaign, $event)" class="md-fab md-green-500-bg md-icon-button" aria-label="listadd">\n                <md-tooltip><span translate="MOTIONDIALER.LISTADD_IVRCAMPAIGN"></span></md-tooltip>\n                <md-icon md-font-icon="icon-format-list-numbers"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.blacklistadddialog(vm.ivrCampaign, $event)" class="md-fab md-warn md-icon-button" aria-label="blacklistadd">\n                <md-tooltip><span translate="MOTIONDIALER.BLACKLISTADD_IVRCAMPAIGN"></span></md-tooltip>\n                <md-icon md-font-icon="icon-block-helper"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.resetlistdialog(vm.ivrCampaign, $event)" class="md-fab md-warn md-icon-button" aria-label="resetlist">\n                <md-tooltip><span translate="MOTIONDIALER.RESETLIST_IVRCAMPAIGN"></span></md-tooltip>\n                <md-icon md-font-icon="icon-restore"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.gotogoto(vm.ivrCampaign, $event)" class="md-fab md-warn md-icon-button" aria-label="goto">\n                <md-tooltip><span translate="MOTIONDIALER.GOTO_IVRCAMPAIGN"></span></md-tooltip>\n                <md-icon md-font-icon="icon-cast"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveIvrCampaign()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (campaignForm.$invalid) || (originateForm.$invalid) || (globalForm.$invalid) || (congestionForm.$invalid) || (busyForm.$invalid) || (noanswerForm.$invalid) || (advancedForm.$invalid) || (globalintervalForm.$invalid) || (timezoneForm.$invalid) || (amdForm.$invalid) || (hopperStatisticsForm.$invalid) || (hoppersForm.$invalid) || (hopperHistoriesForm.$invalid) || (hopperFinalsForm.$invalid) || (hopperBlacksForm.$invalid)"\n                translate="MOTIONDIALER.SAVE" translate-attr-aria-label="MOTIONDIALER.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="ivrCampaign-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.ivrCampaign.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.NAME"></span></div>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="MOTIONDIALER.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.ivrCampaign.active" aria-label="Active"><span translate="MOTIONDIALER.ACTIVE">Active</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.TRUNK">Trunk</label>\n                                <md-select name="TrunkId" ng-model="vm.ivrCampaign.TrunkId" required>\n                                    <md-option ng-value="TrunkId.id" ng-repeat="TrunkId in vm.trunks">{{ TrunkId.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'TrunkId\'].$error" ng-show="generalForm[\'TrunkId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.TRUNK_REQUIRED">Trunk field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.BACKUPTRUNK">BackupTrunk</label>\n                                <md-select name="TrunkBackupId" ng-model="vm.ivrCampaign.TrunkBackupId">\n                                    <md-option ng-value="TrunkBackupId.id" ng-repeat="TrunkBackupId in vm.trunks">{{ TrunkBackupId.name }}</md-option>\n                                    <md-option ng-value="null">None</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'TrunkBackupId\'].$error" ng-show="generalForm[\'TrunkBackupId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.BACKUPTRUNK_REQUIRED">BackupTrunk field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.INTERVAL">Interval</label>\n                                <md-select name="IntervalId" ng-model="vm.ivrCampaign.IntervalId" required>\n                                    <md-option ng-value="IntervalId.id" ng-repeat="IntervalId in vm.interval">{{ IntervalId.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'IntervalId\'].$error" ng-show="generalForm[\'IntervalId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.INTERVAL_REQUIRED">Interval field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.CHECKDUPLICATE">CheckDuplicate</label>\n                                <md-select name="dialCheckDuplicateType" ng-model="vm.ivrCampaign.dialCheckDuplicateType" required>\n\n                                    <md-option ng-value="\'always\'"> {{ \'MOTIONDIALER.ALWAYS\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'never\'"> {{ \'MOTIONDIALER.NEVER\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'onlyIfOpen\'"> {{ \'MOTIONDIALER.ONLY_IF_OPEN\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'dialCheckDuplicateType\'].$error" ng-show="generalForm[\'dialCheckDuplicateType\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CHECKDUPLICATE_REQUIRED">CheckDuplicate field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.ivrCampaign.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.CAMPAIGN">CAMPAIGN</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="ivrCampaign-detail-form-container campaign md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.CAMPAIGN">CAMPAIGN</div>\n                        </div>\n                        <form name="campaignForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.CALLYSQUAREPROJECT">CallySquareProject</label>\n                                <md-select name="SquareProjectId" ng-model="vm.ivrCampaign.SquareProjectId" required autofocus>\n                                    <md-option ng-value="SquareProjectId.id" ng-repeat="SquareProjectId in vm.projects">{{ SquareProjectId.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="campaignForm[\'SquareProjectId\'].$error" ng-show="campaignForm[\'SquareProjectId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CALLYSQUAREPROJECT_REQUIRED">CallySquareProject field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.CONCURRENTCALLS">ConcurrentCalls</label>\n                                <input type="number" name="limitCalls" ng-model="vm.ivrCampaign.limitCalls" min="1" max="200" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.CONCURRENTCALLS"></span></div>\n                                <div ng-messages="campaignForm[\'limitCalls\'].$error" ng-show="campaignForm[\'limitCalls\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CONCURRENTCALLS_REQUIRED">ConcurrentCalls field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.CONCURRENTCALLS_MUST_BE_GREATER_THAN_OR_EQUAL_TO">ConcurrentCalls must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.CONCURRENTCALLS_MUST_BE_LESS_THAN_OR_EQUAL_TO">ConcurrentCalls must be a valid greater or equal than</span> <span>200</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="ivrCampaign-detail-form-container originate md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.ORIGINATE">ORIGINATE</div>\n                        </div>\n                        <form name="originateForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.ORIGINATECALLERIDNAME">OriginateCallerIdName</label>\n                                <input type="text" name="dialOriginateCallerIdName" ng-model="vm.ivrCampaign.dialOriginateCallerIdName" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.ORIGINATECALLERIDNAME"></span></div>\n                                <div ng-messages="originateForm[\'dialOriginateCallerIdName\'].$error" ng-show="originateForm[\'dialOriginateCallerIdName\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.ORIGINATECALLERIDNAME_REQUIRED">OriginateCallerIdName field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.ORIGINATECALLERIDNUMBER">OriginateCallerIdNumber</label>\n                                <input type="text" name="dialOriginateCallerIdNumber" ng-model="vm.ivrCampaign.dialOriginateCallerIdNumber">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.ORIGINATECALLERIDNUMBER"></span></div>\n                                <div ng-messages="originateForm[\'dialOriginateCallerIdNumber\'].$error" ng-show="originateForm[\'dialOriginateCallerIdNumber\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.ORIGINATECALLERIDNUMBER_REQUIRED">OriginateCallerIdNumber field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.ORIGINATETIMEOUT">OriginateTimeout</label>\n                                <input type="number" name="dialOriginateTimeout" ng-model="vm.ivrCampaign.dialOriginateTimeout" min="1" max="999" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.ORIGINATETIMEOUT"></span></div>\n                                <div ng-messages="originateForm[\'dialOriginateTimeout\'].$error" ng-show="originateForm[\'dialOriginateTimeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.ORIGINATETIMEOUT_REQUIRED">OriginateTimeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.ORIGINATETIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">OriginateTimeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.ORIGINATETIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">OriginateTimeout must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.PREFIX">Prefix</label>\n                                <input type="text" name="dialPrefix" ng-model="vm.ivrCampaign.dialPrefix" ng-pattern="/^\\d+$/">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.PREFIX"></span></div>\n                                <div ng-messages="originateForm[\'dialPrefix\'].$error" ng-show="originateForm[\'dialPrefix\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.PREFIX_REQUIRED">Prefix field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="MOTIONDIALER.ERRORS.PREFIX_MUST_VALID_PATTERN" translate-values="{ regex: \'/^\\d+$/\' }">Prefix must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.RETRYANDFREQUENCY">RETRYANDFREQUENCY</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="ivrCampaign-detail-form-container global md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.GLOBAL">GLOBAL</div>\n                        </div>\n                        <form name="globalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.GLOBALMAXRETRY">GlobalMaxRetry</label>\n                                <input type="number" name="dialGlobalMaxRetry" ng-model="vm.ivrCampaign.dialGlobalMaxRetry" min="1" max="999" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.GLOBALMAXRETRY"></span></div>\n                                <div ng-messages="globalForm[\'dialGlobalMaxRetry\'].$error" ng-show="globalForm[\'dialGlobalMaxRetry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.GLOBALMAXRETRY_REQUIRED">GlobalMaxRetry field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.GLOBALMAXRETRY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">GlobalMaxRetry must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.GLOBALMAXRETRY_MUST_BE_LESS_THAN_OR_EQUAL_TO">GlobalMaxRetry must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="ivrCampaign-detail-form-container congestion md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.CONGESTION">CONGESTION</div>\n                        </div>\n                        <form name="congestionForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.CONGESTIONMAXRETRY">CongestionMaxRetry</label>\n                                <input type="number" name="dialCongestionMaxRetry" ng-model="vm.ivrCampaign.dialCongestionMaxRetry" min="1" max="999" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.CONGESTIONMAXRETRY"></span></div>\n                                <div ng-messages="congestionForm[\'dialCongestionMaxRetry\'].$error" ng-show="congestionForm[\'dialCongestionMaxRetry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONMAXRETRY_REQUIRED">CongestionMaxRetry field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONMAXRETRY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">CongestionMaxRetry must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONMAXRETRY_MUST_BE_LESS_THAN_OR_EQUAL_TO">CongestionMaxRetry must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.CONGESTIONRETRYTIME">CongestionRetryTime</label>\n                                <input type="number" name="dialCongestionRetryFrequency" ng-model="vm.ivrCampaign.dialCongestionRetryFrequency" min="1" max="99999" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.CONGESTIONRETRYTIME"></span></div>\n                                <div ng-messages="congestionForm[\'dialCongestionRetryFrequency\'].$error" ng-show="congestionForm[\'dialCongestionRetryFrequency\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONRETRYTIME_REQUIRED">CongestionRetryTime field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONRETRYTIME_MUST_BE_GREATER_THAN_OR_EQUAL_TO">CongestionRetryTime must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONRETRYTIME_MUST_BE_LESS_THAN_OR_EQUAL_TO">CongestionRetryTime must be a valid greater or equal than</span> <span>99999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="ivrCampaign-detail-form-container busy md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.BUSY">BUSY</div>\n                        </div>\n                        <form name="busyForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.BUSYMAXRETRY">BusyMaxRetry</label>\n                                <input type="number" name="dialBusyMaxRetry" ng-model="vm.ivrCampaign.dialBusyMaxRetry" min="1" max="999" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.BUSYMAXRETRY"></span></div>\n                                <div ng-messages="busyForm[\'dialBusyMaxRetry\'].$error" ng-show="busyForm[\'dialBusyMaxRetry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYMAXRETRY_REQUIRED">BusyMaxRetry field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYMAXRETRY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">BusyMaxRetry must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYMAXRETRY_MUST_BE_LESS_THAN_OR_EQUAL_TO">BusyMaxRetry must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.BUSYRETRYTIME">BusyRetryTime</label>\n                                <input type="number" name="dialBusyRetryFrequency" ng-model="vm.ivrCampaign.dialBusyRetryFrequency" min="1" max="99999" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.BUSYRETRYTIME"></span></div>\n                                <div ng-messages="busyForm[\'dialBusyRetryFrequency\'].$error" ng-show="busyForm[\'dialBusyRetryFrequency\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYRETRYTIME_REQUIRED">BusyRetryTime field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYRETRYTIME_MUST_BE_GREATER_THAN_OR_EQUAL_TO">BusyRetryTime must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYRETRYTIME_MUST_BE_LESS_THAN_OR_EQUAL_TO">BusyRetryTime must be a valid greater or equal than</span> <span>99999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="ivrCampaign-detail-form-container noanswer md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.NOANSWER">NOANSWER</div>\n                        </div>\n                        <form name="noanswerForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.NOANSWERMAXRETRY">NoAnswerMaxRetry</label>\n                                <input type="number" name="dialNoAnswerMaxRetry" ng-model="vm.ivrCampaign.dialNoAnswerMaxRetry" min="1" max="999" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.NOANSWERMAXRETRY"></span></div>\n                                <div ng-messages="noanswerForm[\'dialNoAnswerMaxRetry\'].$error" ng-show="noanswerForm[\'dialNoAnswerMaxRetry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERMAXRETRY_REQUIRED">NoAnswerMaxRetry field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERMAXRETRY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">NoAnswerMaxRetry must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERMAXRETRY_MUST_BE_LESS_THAN_OR_EQUAL_TO">NoAnswerMaxRetry must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.NOANSWERRETRYTIME">NoAnswerRetryTime</label>\n                                <input type="number" name="dialNoAnswerRetryFrequency" ng-model="vm.ivrCampaign.dialNoAnswerRetryFrequency" min="1" max="99999" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.NOANSWERRETRYTIME"></span></div>\n                                <div ng-messages="noanswerForm[\'dialNoAnswerRetryFrequency\'].$error" ng-show="noanswerForm[\'dialNoAnswerRetryFrequency\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERRETRYTIME_REQUIRED">NoAnswerRetryTime field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERRETRYTIME_MUST_BE_GREATER_THAN_OR_EQUAL_TO">NoAnswerRetryTime must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERRETRYTIME_MUST_BE_LESS_THAN_OR_EQUAL_TO">NoAnswerRetryTime must be a valid greater or equal than</span> <span>99999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.ADVANCED">ADVANCED</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="ivrCampaign-detail-form-container advanced md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.ADVANCED">ADVANCED</div>\n                        </div>\n                        <form name="advancedForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.DIALORDERBYSCHEDULEDAT">DialOrderByScheduledAt</label>\n                                <md-select name="dialOrderByScheduledAt" ng-model="vm.ivrCampaign.dialOrderByScheduledAt" autofocus>\n\n                                    <md-option ng-value="\'DESC\'"> {{ \'MOTIONDIALER.DESC\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'ASC\'"> {{ \'MOTIONDIALER.ASC\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.DIALORDERBYSCHEDULEDAT"></span></div>\n                                <div ng-messages="advancedForm[\'dialOrderByScheduledAt\'].$error" ng-show="advancedForm[\'dialOrderByScheduledAt\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.DIALORDERBYSCHEDULEDAT_REQUIRED">DialOrderByScheduledAt field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="ivrCampaign-detail-form-container globalinterval md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.GLOBALINTERVAL">GLOBALINTERVAL</div>\n                        </div>\n                        <form name="globalintervalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.GLOBALINTERVAL">GlobalInterval</label>\n                                <input type="text" name="dialGlobalInterval" ng-model="vm.ivrCampaign.dialGlobalInterval" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.GLOBALINTERVAL"></span></div>\n                                <div ng-messages="globalintervalForm[\'dialGlobalInterval\'].$error" ng-show="globalintervalForm[\'dialGlobalInterval\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.GLOBALINTERVAL_REQUIRED">GlobalInterval field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="ivrCampaign-detail-form-container timezone md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.TIMEZONE">TIMEZONE</div>\n                        </div>\n                        <form name="timezoneForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.TIMEZONE">Timezone</label>\n                                <ms-timezone name="dialTimezone" ng-model="vm.ivrCampaign.dialTimezone" autofocus>\n                                    < <div class="hint"><span translate="MOTIONDIALER.HELP.TIMEZONE"></span></div>\n                    <div ng-messages="timezoneForm[\'dialTimezone\'].$error" ng-show="timezoneForm[dialTimezone].$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="MOTIONDIALER.ERRORS.TIMEZONE_REQUIRED">Timezone field is required</span>\n                        </div>\n                    </div>\n                    </md-input-container>\n\n                    </form>\n    </div>\n    <div class="ivrCampaign-detail-form-container amd md-background-bg md-whiteframe-1dp">\n        <div class="pb-16" layout="row" layout-align="start center">\n            <div class="h2 secondary-text" translate="MOTIONDIALER.AMD">AMD</div>\n        </div>\n        <form name="amdForm" novalidate>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.ivrCampaign.dialAMDActive" aria-label="AMDActive"><span translate="MOTIONDIALER.AMDACTIVE">AMDActive</span></md-switch>\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDACTIVE"></span></div>\n            </md-input-container>\n            <md-input-container ng-if="vm.ivrCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDINITIALSILENCE">AMDInitialSilence</label>\n                <input type="number" name="dialAMDInitialSilence" ng-model="vm.ivrCampaign.dialAMDInitialSilence" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDINITIALSILENCE"></span></div>\n                <div ng-messages="amdForm[\'dialAMDInitialSilence\'].$error" ng-show="amdForm[\'dialAMDInitialSilence\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDINITIALSILENCE_REQUIRED">AMDInitialSilence field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDINITIALSILENCE_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDInitialSilence must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.ivrCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDGREETING">AMDGreeting</label>\n                <input type="number" name="dialAMDGreeting" ng-model="vm.ivrCampaign.dialAMDGreeting" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDGREETING"></span></div>\n                <div ng-messages="amdForm[\'dialAMDGreeting\'].$error" ng-show="amdForm[\'dialAMDGreeting\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDGREETING_REQUIRED">AMDGreeting field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDGREETING_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDGreeting must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.ivrCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDAFTERGREETINGSILENCE">AMDAfterGreetingSilence</label>\n                <input type="number" name="dialAMDAfterGreetingSilence" ng-model="vm.ivrCampaign.dialAMDAfterGreetingSilence" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDAFTERGREETINGSILENCE"></span></div>\n                <div ng-messages="amdForm[\'dialAMDAfterGreetingSilence\'].$error" ng-show="amdForm[\'dialAMDAfterGreetingSilence\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDAFTERGREETINGSILENCE_REQUIRED">AMDAfterGreetingSilence field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDAFTERGREETINGSILENCE_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDAfterGreetingSilence must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.ivrCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDTOTALANALYSISTIME">AMDTotalAnalysisTime</label>\n                <input type="number" name="dialAMDTotalAnalysisTime" ng-model="vm.ivrCampaign.dialAMDTotalAnalysisTime" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDTOTALANALYSISTIME"></span></div>\n                <div ng-messages="amdForm[\'dialAMDTotalAnalysisTime\'].$error" ng-show="amdForm[\'dialAMDTotalAnalysisTime\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDTOTALANALYSISTIME_REQUIRED">AMDTotalAnalysisTime field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDTOTALANALYSISTIME_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDTotalAnalysisTime must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.ivrCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDMINWORDLENGTH">AMDMinWordLength</label>\n                <input type="number" name="dialAMDMinWordLength" ng-model="vm.ivrCampaign.dialAMDMinWordLength" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDMINWORDLENGTH"></span></div>\n                <div ng-messages="amdForm[\'dialAMDMinWordLength\'].$error" ng-show="amdForm[\'dialAMDMinWordLength\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMINWORDLENGTH_REQUIRED">AMDMinWordLength field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMINWORDLENGTH_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDMinWordLength must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.ivrCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDBETWEENWORDSSILENCE">AMDBetweenWordsSilence</label>\n                <input type="number" name="dialAMDBetweenWordsSilence" ng-model="vm.ivrCampaign.dialAMDBetweenWordsSilence" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDBETWEENWORDSSILENCE"></span></div>\n                <div ng-messages="amdForm[\'dialAMDBetweenWordsSilence\'].$error" ng-show="amdForm[\'dialAMDBetweenWordsSilence\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDBETWEENWORDSSILENCE_REQUIRED">AMDBetweenWordsSilence field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDBETWEENWORDSSILENCE_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDBetweenWordsSilence must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.ivrCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDMAXIMUMNUMBEROFWORDS">AMDMaximumNumberOfWords</label>\n                <input type="number" name="dialAMDMaximumNumberOfWords" ng-model="vm.ivrCampaign.dialAMDMaximumNumberOfWords" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDMAXIMUMNUMBEROFWORDS"></span></div>\n                <div ng-messages="amdForm[\'dialAMDMaximumNumberOfWords\'].$error" ng-show="amdForm[\'dialAMDMaximumNumberOfWords\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMAXIMUMNUMBEROFWORDS_REQUIRED">AMDMaximumNumberOfWords field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMAXIMUMNUMBEROFWORDS_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDMaximumNumberOfWords must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.ivrCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDSILENCETHRESHOLD">AMDSilenceThreshold</label>\n                <input type="number" name="dialAMDSilenceThreshold" ng-model="vm.ivrCampaign.dialAMDSilenceThreshold" min="0" max="32767">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDSILENCETHRESHOLD"></span></div>\n                <div ng-messages="amdForm[\'dialAMDSilenceThreshold\'].$error" ng-show="amdForm[\'dialAMDSilenceThreshold\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDSILENCETHRESHOLD_REQUIRED">AMDSilenceThreshold field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDSILENCETHRESHOLD_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDSilenceThreshold must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="MOTIONDIALER.ERRORS.AMDSILENCETHRESHOLD_MUST_BE_LESS_THAN_OR_EQUAL_TO">AMDSilenceThreshold must be a valid greater or equal than</span> <span>32767</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.ivrCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDMAXIMUMWORDLENGTH">AMDMaximumWordLength</label>\n                <input type="number" name="dialAMDMaximumWordLength" ng-model="vm.ivrCampaign.dialAMDMaximumWordLength" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDMAXIMUMWORDLENGTH"></span></div>\n                <div ng-messages="amdForm[\'dialAMDMaximumWordLength\'].$error" ng-show="amdForm[\'dialAMDMaximumWordLength\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMAXIMUMWORDLENGTH_REQUIRED">AMDMaximumWordLength field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMAXIMUMWORDLENGTH_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDMaximumWordLength must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n        </form>\n    </div>\n    </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="MOTIONDIALER.HOPPERS">HOPPERS</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="ivrCampaign-detail-form-container hopperstatistics md-background-bg md-whiteframe-1dp">\n                <div ng-controller="IvrCampaignHopperStatisticsController as vm_hs" ng-init="vm_hs.init(vm.ivrCampaign)">\n                    <md-toolbar class="md-table-toolbar md-default">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="MOTIONDIALER.HOPPERWIDGET">Hoppers</span>\n                            <div flex></div>\n                            <md-button class="md-icon-button" ng-click="vm_hs.init(vm.ivrCampaign)" aria-label="refresh Hopper" translate translate-attr-label="MOTIONDIALER.REFRESH_HOPPERS">\n                                <md-icon md-font-icon="icon-refresh"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    \x3c!-- WIDGET GROUP --\x3e\n                    <div class="widget-group" layout="row" flex="100" layout-wrap>\n\n                        \x3c!-- WIDGET 1 --\x3e\n                        <ms-widget class="h-140" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="25">\n\n                            \x3c!-- Front --\x3e\n                            <ms-widget-front class="p-16 white-bg" layout="row" flex>\n                                <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                    <div class="md-display-1 pb-8">{{(vm_hs.total || 0) + (vm_hs.closed || 0)}}</div>\n                                    <div class="font-weight-500 secondary-text">{{ \'MOTIONDIALER.TOTAL\' | translate }}</div>\n                                </div>\n                            </ms-widget-front>\n                            \x3c!-- / Front --\x3e\n\n                        </ms-widget>\n                        \x3c!-- / WIDGET 1 --\x3e\n\n                        \x3c!-- WIDGET 2 --\x3e\n                        <ms-widget class="h-140" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="25">\n\n                            \x3c!-- Front --\x3e\n                            <ms-widget-front class="p-16 white-bg" layout="row" flex>\n                                <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                    <div class="md-display-1 pb-8">{{vm_hs.fresh || 0}} ({{vm_hs.total ? ((((vm_hs.fresh || 0) * 100)/((vm_hs.closed || 0) + (vm_hs.total || 0))) | number: 2) : 0}}%)</div>\n                                    <div class="font-weight-500 secondary-text">{{ \'MOTIONDIALER.FRESH\' | translate }}</div>\n                                </div>\n                            </ms-widget-front>\n                            \x3c!-- / Front --\x3e\n\n                        </ms-widget>\n                        \x3c!-- / WIDGET 2 --\x3e\n\n                        \x3c!-- WIDGET 3 --\x3e\n                        <ms-widget class="h-140" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="25">\n\n                            \x3c!-- Front --\x3e\n                            <ms-widget-front class="p-16 white-bg" layout="row" flex>\n                                <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                    <div class="md-display-1 pb-8">{{vm_hs.total ? (vm_hs.total - (vm_hs.fresh || 0)) : 0}} ({{vm_hs.total ? ((((vm_hs.total - (vm_hs.fresh || 0)) * 100)/((vm_hs.closed || 0) + (vm_hs.total || 0))) | number: 2) : 0}}%)</div>\n                                    <div class="font-weight-500 secondary-text">{{ \'MOTIONDIALER.OPEN\' | translate }}</div>\n                                </div>\n                            </ms-widget-front>\n                            \x3c!-- / Front --\x3e\n\n                        </ms-widget>\n                        \x3c!-- / WIDGET 3 --\x3e\n\n                        \x3c!-- WIDGET 3 --\x3e\n                        <ms-widget class="h-140" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="25">\n\n                            \x3c!-- Front --\x3e\n                            <ms-widget-front class="p-16 white-bg" layout="row" flex>\n                                <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                    <div class="md-display-1 pb-8">{{vm_hs.closed ? (vm_hs.closed || 0) : 0}} ({{vm_hs.closed ? ((((vm_hs.closed) * 100)/(vm_hs.closed + (vm_hs.total || 0))) | number: 2) : 0}}%)</div>\n                                    <div class="font-weight-500 secondary-text">{{ \'MOTIONDIALER.CLOSED\' | translate }}</div>\n                                </div>\n                            </ms-widget-front>\n                            \x3c!-- / Front --\x3e\n\n                        </ms-widget>\n                        \x3c!-- / WIDGET 3 --\x3e\n\n                    </div>\n                    \x3c!-- / WIDGET GROUP --\x3e\n                </div>\n\n            </div>\n            <div class="ivrCampaign-detail-form-container hoppers md-background-bg md-whiteframe-1dp">\n                <div ng-controller="IvrCampaignHoppersController as vm_dc" ng-init="vm_dc.init(vm.ivrCampaign)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedIvrCampaignHoppers.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="MOTIONDIALER.HOPPERS">Hoppers</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                            <md-button class="md-icon-button" ng-click="vm_dc.getIvrCampaignHoppers()" aria-label="refresh Hoppers" translate translate-attr-label="MOTIONDIALER.REFRESH_HOPPERS">\n                                <md-icon md-font-icon="icon-refresh"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedIvrCampaignHoppers.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedIvrCampaignHoppers.length}} {{vm_dc.selectedIvrCampaignHoppers.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedIvrCampaignHoppers" csv-label="true" filename="ivrCampaigns.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                            <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedIvrCampaignHoppers($event)" aria-label="delete selected" translate translate-attr-label="IVRCAMPAIGNS.DELETE_SELECTED">\n                                <md-icon md-font-icon="icon-delete"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedIvrCampaignHoppers" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getIvrCampaignHoppers">\n                                <tr md-row>\n                                    <th md-column md-order-by="ContactId">{{ \'MOTIONDIALER.CONTACTID\' | translate }}</th>\n                                    <th md-column md-order-by="phone">{{ \'MOTIONDIALER.PHONE\' | translate }}</th>\n                                    <th md-column md-order-by="countcongestionretry">{{ \'MOTIONDIALER.CONGESTION\' | translate }}</th>\n                                    <th md-column md-order-by="countbusyretry">{{ \'MOTIONDIALER.BUSY\' | translate }}</th>\n                                    <th md-column md-order-by="countnoanswerretry">{{ \'MOTIONDIALER.NOANSWER\' | translate }}</th>\n                                    <th md-column md-order-by="scheduledat">{{ \'MOTIONDIALER.SCHEDULEDAT\' | translate }}</th>\n                                    <th md-column md-order-by="priority">{{ \'MOTIONDIALER.PRIORITY\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="hopper" md-select-id="id" ng-repeat="hopper in vm_dc.ivrCampaignHoppers.rows">\n                                    <td ng-click="vm_dc.createOrEditIvrCampaignHopper($event, hopper)" md-cell>{{hopper.ContactId}}</td>\n                                    <td ng-click="vm_dc.createOrEditIvrCampaignHopper($event, hopper)" md-cell>{{hopper.phone}}</td>\n                                    <td ng-click="vm_dc.createOrEditIvrCampaignHopper($event, hopper)" md-cell>{{hopper.countcongestionretry}}</td>\n                                    <td ng-click="vm_dc.createOrEditIvrCampaignHopper($event, hopper)" md-cell>{{hopper.countbusyretry}}</td>\n                                    <td ng-click="vm_dc.createOrEditIvrCampaignHopper($event, hopper)" md-cell>{{hopper.countnoanswerretry}}</td>\n                                    <td ng-click="vm_dc.createOrEditIvrCampaignHopper($event, hopper)" md-cell>{{hopper.scheduledat | date:\'medium\'}}</td>\n                                    <td ng-click="vm_dc.createOrEditIvrCampaignHopper($event, hopper)" md-cell>{{ vm_dc.arraypriority[hopper.priority].option }}</td>\n                                    <td md-cell class="actions">\n                                        <md-menu>\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MOTIONDIALER.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_dc.createOrEditIvrCampaignHopper($event, hopper)" translate="MOTIONDIALER.EDIT_HOPPER">\n                                                        Edit Hopper\n                                                    </md-button>\n                                                </md-menu-item>\n                                                <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                    <md-button ng-click="vm_dc.deleteConfirm(hopper, $event)" translate="MOTIONDIALER.DELETE_HOPPER">\n                                                        Delete Hopper\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.ivrCampaignHoppers.rows.length">\n                                    <td md-cell colspan="10">\n                                        <span class="text-boxed-ligth" translate="MOTIONDIALER.NO_HOPPER_AVAILABLE">No hopper available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                        md-page="vm_dc.query.page" md-total="{{vm_dc.ivrCampaignHoppers.count}}" md-on-paginate="vm_dc.getIvrCampaignHoppers" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="MOTIONDIALER.HISTORY">HISTORY</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="ivrCampaign-detail-form-container hopperhistories md-background-bg md-whiteframe-1dp">\n                <div ng-controller="IvrCampaignHopperHistoriesController as vm_dc" ng-init="vm_dc.init(vm.ivrCampaign)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedIvrCampaignHopperHistories.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="MOTIONDIALER.HOPPERHISTORIES">HopperHistories</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                            <md-button class="md-icon-button" ng-click="vm_dc.getIvrCampaignHopperHistories()" aria-label="refresh HopperHistories" translate translate-attr-label="MOTIONDIALER.REFRESH_HOPPERHISTORIES">\n                                <md-icon md-font-icon="icon-refresh"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedIvrCampaignHopperHistories.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedIvrCampaignHopperHistories.length}} {{vm_dc.selectedIvrCampaignHopperHistories.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedIvrCampaignHopperHistories" csv-label="true" filename="ivrCampaigns.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedIvrCampaignHopperHistories" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getIvrCampaignHopperHistories">\n                                <tr md-row>\n                                    <th md-column md-order-by="uniqueid">{{ \'MOTIONDIALER.UNIQUEID\' | translate }}</th>\n                                    <th md-column md-order-by="ContactId">{{ \'MOTIONDIALER.CONTACTID\' | translate }}</th>\n                                    <th md-column md-order-by="calleridnum">{{ \'MOTIONDIALER.PHONE\' | translate }}</th>\n                                    <th md-column md-order-by="calleridname">{{ \'MOTIONDIALER.NAME\' | translate }}</th>\n                                    <th md-column md-order-by="statedesc">{{ \'MOTIONDIALER.STATUS\' | translate }}</th>\n                                    <th md-column md-order-by="scheduledat">{{ \'MOTIONDIALER.SCHEDULEDAT\' | translate }}</th>\n                                    <th md-column md-order-by="starttime">{{ \'MOTIONDIALER.STARTTIME\' | translate }}</th>\n                                    <th md-column md-order-by="endtime">{{ \'MOTIONDIALER.ENDTIME\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="hopperHistory" md-select-id="id" ng-repeat="hopperHistory in vm_dc.ivrCampaignHopperHistories.rows">\n                                    <td md-cell>{{hopperHistory.uniqueid}}</td>\n                                    <td md-cell>{{hopperHistory.ContactId}}</td>\n                                    <td md-cell>{{hopperHistory.calleridnum}}</td>\n                                    <td md-cell>{{hopperHistory.calleridname}}</td>\n                                    <td md-cell>{{hopperHistory.statedesc}}</td>\n                                    <td md-cell>{{hopperHistory.scheduledat | date:\'medium\'}}</td>\n                                    <td md-cell>{{hopperHistory.starttime | date:\'medium\'}}</td>\n                                    <td md-cell>{{hopperHistory.endtime | date:\'medium\'}}</td>\n                                    <td md-cell class="actions">\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.ivrCampaignHopperHistories.rows.length">\n                                    <td md-cell colspan="11">\n                                        <span class="text-boxed-ligth" translate="MOTIONDIALER.NO_HOPPERHISTORY_AVAILABLE">No hopperhistory available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                        md-page="vm_dc.query.page" md-total="{{vm_dc.ivrCampaignHopperHistories.count}}" md-on-paginate="vm_dc.getIvrCampaignHopperHistories" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="MOTIONDIALER.FINAL">FINAL</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="ivrCampaign-detail-form-container hopperfinals md-background-bg md-whiteframe-1dp">\n                <div ng-controller="IvrCampaignHopperFinalsController as vm_dc" ng-init="vm_dc.init(vm.ivrCampaign)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedIvrCampaignHopperFinals.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="MOTIONDIALER.HOPPERFINALS">HopperFinals</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                            <md-button class="md-icon-button" ng-click="vm_dc.getIvrCampaignHopperFinals()" aria-label="refresh HopperFinals" translate translate-attr-label="MOTIONDIALER.REFRESH_HOPPERFINALS">\n                                <md-icon md-font-icon="icon-refresh"></md-icon>\n                            </md-button>\n                            <td md-cell class="actions">\n                                <md-menu>\n                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MOTIONDIALER.MORE" ng-click="vm_dc.countContactsIvrCampaignHopperFinal(vm_dc.query.id); $mdOpenMenu($event);">\n                                        <md-icon md-font-icon="icon-backup-restore"></md-icon>\n                                        <md-tooltip><span translate="MOTIONDIALER.RESTORECONTACTS"></span></md-tooltip>\n                                    </md-button>\n                                    <md-menu-content width="3">\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsIvrCampaignHopperFinal(3)">\n                                                <span translate="MOTIONDIALER.NOANSWER ">NoAnswer</span>\n                                                <span class="badge">({{vm_dc.contacts.noAnswerContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsIvrCampaignHopperFinal(5)">\n                                                <span translate="MOTIONDIALER.BUSY ">Busy</span>\n                                                <span class="badge">({{vm_dc.contacts.busyContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsIvrCampaignHopperFinal(8)">\n                                                <span translate="MOTIONDIALER.CONGESTION ">Congestion</span>\n                                                <span class="badge">({{vm_dc.contacts.congestionContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsIvrCampaignHopperFinal(10)">\n                                                <span translate="MOTIONDIALER.DROPPED ">Drop</span>\n                                                <span class="badge">({{vm_dc.contacts.dropContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsIvrCampaignHopperFinal(11)">\n                                                <span translate="MOTIONDIALER.ABANDONED ">Abandoned</span>\n                                                <span class="badge">({{vm_dc.contacts.abandonedContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsIvrCampaignHopperFinal(22)">\n                                                <span translate="MOTIONDIALER.RECALLFAILEDTIMEOUT">Recall</span>\n                                                <span class="badge">({{vm_dc.contacts.reCallContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsIvrCampaignHopperFinal(0)">\n                                                <span translate="MOTIONDIALER.NO_SUCH_NUMBER">NoSuchNumber</span>\n                                                <span class="badge">({{vm_dc.contacts.noSuchContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </td>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedIvrCampaignHopperFinals.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedIvrCampaignHopperFinals.length}} {{vm_dc.selectedIvrCampaignHopperFinals.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedIvrCampaignHopperFinals" csv-label="true" filename="ivrCampaigns.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                            <md-button class="md-icon-button" ng-click="vm_dc.moveSelectedIvrCampaignHopperFinals($event)" aria-label="move selected" translate translate-attr-label="IVRCAMPAIGNS.MOVE_SELECTED">\n                                <md-icon md-font-icon="icon-restore"></md-icon>\n                                <md-tooltip><span translate="MOTIONDIALER.RESTORECONTACTS"></span></md-tooltip>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedIvrCampaignHopperFinals" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getIvrCampaignHopperFinals">\n                                <tr md-row>\n                                    <th md-column md-order-by="uniqueid">{{ \'MOTIONDIALER.UNIQUEID\' | translate }}</th>\n                                    <th md-column md-order-by="ContactId">{{ \'MOTIONDIALER.CONTACTID\' | translate }}</th>\n                                    <th md-column md-order-by="calleridnum">{{ \'MOTIONDIALER.PHONE\' | translate }}</th>\n                                    <th md-column md-order-by="calleridname">{{ \'MOTIONDIALER.NAME\' | translate }}</th>\n                                    <th md-column md-order-by="statedesc">{{ \'MOTIONDIALER.STATUS\' | translate }}</th>\n                                    <th md-column md-order-by="countcongestionretry">{{ \'MOTIONDIALER.CONGESTION\' | translate }}</th>\n                                    <th md-column md-order-by="countbusyretry">{{ \'MOTIONDIALER.BUSY\' | translate }}</th>\n                                    <th md-column md-order-by="countnoanswerretry">{{ \'MOTIONDIALER.NOANSWER\' | translate }}</th>\n                                    <th md-column md-order-by="starttime">{{ \'MOTIONDIALER.STARTTIME\' | translate }}</th>\n                                    <th md-column md-order-by="endtime">{{ \'MOTIONDIALER.ENDTIME\' | translate }}</th>\n                                    <th md-column md-order-by="disposition">{{ \'MOTIONDIALER.DISPOSITION\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="hopperFinal" md-select-id="id" ng-repeat="hopperFinal in vm_dc.ivrCampaignHopperFinals.rows">\n                                    <td md-cell>{{hopperFinal.uniqueid}}</td>\n                                    <td md-cell>{{hopperFinal.ContactId}}</td>\n                                    <td md-cell>{{hopperFinal.calleridnum}}</td>\n                                    <td md-cell>{{hopperFinal.calleridname}}</td>\n                                    <td md-cell>{{hopperFinal.statedesc}}</td>\n                                    <td md-cell>{{hopperFinal.countcongestionretry}}</td>\n                                    <td md-cell>{{hopperFinal.countbusyretry}}</td>\n                                    <td md-cell>{{hopperFinal.countnoanswerretry}}</td>\n                                    <td md-cell>{{hopperFinal.starttime | date:\'medium\'}}</td>\n                                    <td md-cell>{{hopperFinal.endtime | date:\'medium\'}}</td>\n                                    <td md-cell>{{hopperFinal.disposition}}</td>\n                                    <td md-cell class="actions">\n                                        <md-menu>\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MOTIONDIALER.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_dc.moveConfirm(hopperFinal, $event)" translate="MOTIONDIALER.MOVE_HOPPERFINAL">\n                                                        Move HopperFinal\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.ivrCampaignHopperFinals.rows.length">\n                                    <td md-cell colspan="23">\n                                        <span class="text-boxed-ligth" translate="MOTIONDIALER.NO_HOPPERFINAL_AVAILABLE">No hopperfinal available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                        md-page="vm_dc.query.page" md-total="{{vm_dc.ivrCampaignHopperFinals.count}}" md-on-paginate="vm_dc.getIvrCampaignHopperFinals" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="MOTIONDIALER.BLACKLIST">BLACKLIST</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="ivrCampaign-detail-form-container hopperblacks md-background-bg md-whiteframe-1dp">\n                <div ng-controller="IvrCampaignHopperBlacksController as vm_dc" ng-init="vm_dc.init(vm.ivrCampaign)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedIvrCampaignHopperBlacks.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="MOTIONDIALER.HOPPERBLACKS">HopperBlacks</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedIvrCampaignHopperBlacks.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedIvrCampaignHopperBlacks.length}} {{vm_dc.selectedIvrCampaignHopperBlacks.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedIvrCampaignHopperBlacks" csv-label="true" filename="ivrCampaigns.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedIvrCampaignHopperBlacks" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getIvrCampaignHopperBlacks">\n                                <tr md-row>\n                                    <th md-column md-order-by="ContactId">{{ \'MOTIONDIALER.CONTACTID\' | translate }}</th>\n                                    <th md-column md-order-by="phone">{{ \'MOTIONDIALER.PHONE\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="hopperBlack" md-select-id="id" ng-repeat="hopperBlack in vm_dc.ivrCampaignHopperBlacks.rows">\n                                    <td md-cell>{{hopperBlack.ContactId}}</td>\n                                    <td md-cell>{{hopperBlack.phone}}</td>\n                                    <td md-cell class="actions">\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.ivrCampaignHopperBlacks.rows.length">\n                                    <td md-cell colspan="4">\n                                        <span class="text-boxed-ligth" translate="MOTIONDIALER.NO_HOPPERBLACK_AVAILABLE">No hopperblack available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                        md-page="vm_dc.query.page" md-total="{{vm_dc.ivrCampaignHopperBlacks.count}}" md-on-paginate="vm_dc.getIvrCampaignHopperBlacks" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    </md-tabs>\n\n</div>\n\x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/motiondialer/views/ivrCampaigns/ivrCampaigns.html",'<div id="ivrCampaigns" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-fire" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="MOTIONDIALER.IVRCAMPAIGNS">IvrCampaigns</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="MOTIONDIALER.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedIvrCampaigns.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedIvrCampaigns =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="MOTIONDIALER.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-ivrCampaigns-count">\n                    <span>{{vm.selectedIvrCampaigns.length}}</span>\n                <span translate="MOTIONDIALER.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="IVRCAMPAIGNS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllIvrCampaigns()" translate="MOTIONDIALER.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectIvrCampaigns()" translate="MOTIONDIALER.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedIvrCampaigns" csv-label="true" filename="ivrCampaigns.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedIvrCampaigns($event)" aria-label="delete selected" translate translate-attr-label="IVRCAMPAIGNS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- IVRCAMPAIGN TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedIvrCampaigns" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getIvrCampaigns">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'MOTIONDIALER.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'MOTIONDIALER.NAME\' | translate }}</th>\n                                <th md-column md-order-by="active">{{ \'MOTIONDIALER.ACTIVE\' | translate }}</th>\n                                <th md-column md-order-by="TrunkId">{{ \'MOTIONDIALER.TRUNK\' | translate }}</th>\n                                <th md-column md-order-by="SquareProjectId">{{ \'MOTIONDIALER.CALLYSQUAREPROJECT\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.ivrCampaigns.rows.length">\n                                <td md-cell colspan="6">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="MOTIONDIALER.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="ivrCampaign" md-select-id="id" ng-repeat="ivrCampaign in vm.ivrCampaigns.rows">\n                                <td md-cell ng-if="ivrCampaign.userpic"><img class="avatar" alt="{{ivrCampaign.name}}" ng-src="api/users/{{ivrCampaign.id}}/avatar" /></td>\n                                <td md-cell ng-if="!ivrCampaign.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{ivrCampaign.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditIvrCampaign($event, ivrCampaign)" md-cell class="id ">{{ivrCampaign.id}}</td>\n                                <td ng-click="vm.createOrEditIvrCampaign($event, ivrCampaign)" md-cell class="name ">{{ivrCampaign.name}}</td>\n                                <td ng-click="vm.createOrEditIvrCampaign($event, ivrCampaign)" md-cell class="active ">\n                                    <md-icon md-colors="{color: {{ivrCampaign.active ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{ivrCampaign.active ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                </td>\n                                <td ng-click="vm.createOrEditIvrCampaign($event, ivrCampaign)" md-cell class="TrunkId ">{{ TrunkId = vm.trunks[ivrCampaign.TrunkId]; TrunkId.name }}</td>\n                                <td ng-click="vm.createOrEditIvrCampaign($event, ivrCampaign)" md-cell class="SquareProjectId ">{{ SquareProjectId = vm.projects[ivrCampaign.SquareProjectId]; SquareProjectId.name }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MOTIONDIALER.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(ivrCampaign, $event)" translate="MOTIONDIALER.EDIT_IVRCAMPAIGN">\n                                                    Edit IvrCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.listadddialog(ivrCampaign, $event)" translate="MOTIONDIALER.LISTADD_IVRCAMPAIGN">\n                                                    listadd IvrCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.blacklistadddialog(ivrCampaign, $event)" translate="MOTIONDIALER.BLACKLISTADD_IVRCAMPAIGN">\n                                                    blacklistadd IvrCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(ivrCampaign, $event)" translate="MOTIONDIALER.DELETE_IVRCAMPAIGN">\n                                                    Delete IvrCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(ivrCampaign, $event)" translate="MOTIONDIALER.GOTOREALTIME_IVRCAMPAIGN">\n                                                    goToRealtime IvrCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.ivrCampaigns.count}}" md-on-paginate="vm.getIvrCampaigns" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / IVRCAMPAIGN TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD IVRCAMPAIGN BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-ivrCampaign-button" ng-click="vm.createOrEditIvrCampaign($event)" aria-label="add ivrCampaign" translate translate-attr-aria-label="MOTIONDIALER.ADD_IVRCAMPAIGN">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD IVRCAMPAIGN BUTTON --\x3e\n</div>'),e.put("app/main/apps/motiondialer/views/queueCampaigns/create/dialog.html",'<md-dialog class="queueCampaign-dialog" aria-label="New QueueCampaign">\n    <form name="queueCampaignForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.queueCampaign.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newQueueCampaign">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.NAME"></span></div>\n                <div ng-messages="queueCampaignForm[\'name\'].$error" ng-show="queueCampaignForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="MOTIONDIALER.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.queueCampaign.dialActive" aria-label="Active"><span translate="MOTIONDIALER.ACTIVE">Active</span></md-switch>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.TRUNK">Trunk</label>\n                <md-select name="TrunkId" ng-model="vm.queueCampaign.TrunkId" required>\n                    <md-option ng-value="TrunkId.id" ng-repeat="TrunkId in vm.trunks">{{ TrunkId.name }}</md-option>\n                </md-select>\n                <div ng-messages="queueCampaignForm[\'TrunkId\'].$error" ng-show="queueCampaignForm[\'TrunkId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.TRUNK_REQUIRED">Trunk field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialMethod != \'preview\'" class="md-block">\n                <label translate="MOTIONDIALER.INTERVAL">Interval</label>\n                <md-select name="IntervalId" ng-model="vm.queueCampaign.IntervalId" required>\n                    <md-option ng-value="IntervalId.id" ng-repeat="IntervalId in vm.interval">{{ IntervalId.name }}</md-option>\n                </md-select>\n                <div ng-messages="queueCampaignForm[\'IntervalId\'].$error" ng-show="queueCampaignForm[\'IntervalId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.INTERVAL_REQUIRED">Interval field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.CHECKDUPLICATE">CheckDuplicate</label>\n                <md-select name="dialCheckDuplicateType" ng-model="vm.queueCampaign.dialCheckDuplicateType" required>\n\n                    <md-option ng-value="\'always\'"> {{ \'MOTIONDIALER.ALWAYS\' | translate }}</md-option>\n\n                    <md-option ng-value="\'never\'"> {{ \'MOTIONDIALER.NEVER\' | translate }}</md-option>\n\n                    <md-option ng-value="\'onlyIfOpen\'"> {{ \'MOTIONDIALER.ONLY_IF_OPEN\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="queueCampaignForm[\'dialCheckDuplicateType\'].$error" ng-show="queueCampaignForm[\'dialCheckDuplicateType\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.CHECKDUPLICATE_REQUIRED">CheckDuplicate field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.METHOD">Method</label>\n                <md-select name="dialMethod" ng-model="vm.queueCampaign.dialMethod" required>\n                    <md-option ng-value="\'progressive\'">Progressive</md-option>\n                    <md-option ng-value="\'power\'">PowerDialing</md-option>\n                    <md-option ng-value="\'predictive\'">Predictive</md-option>\n                    <md-option ng-value="\'preview\'">Preview</md-option>\n                    <md-option ng-value="\'booked\'">BookedProgressive</md-option>\n                </md-select>\n                <div class="hint"><span translate="MOTIONDIALER.HELP.METHOD"></span></div>\n                <div ng-messages="queueCampaignForm[\'dialMethod\'].$error" ng-show="queueCampaignForm[\'dialMethod\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.METHOD_REQUIRED">Method field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialMethod == \'power\'" class="md-block">\n                <span translate="MOTIONDIALER.POWERLEVEL">PowerLevel</span>\n                <div class="hint"><span translate="MOTIONDIALER.HELP.POWERLEVEL"></span></div>\n                <md-slider md-discrete flex ng-model="vm.queueCampaign.dialPowerLevel" min="1" max="10" step="0.1" class="md-accent">\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialMethod == \'predictive\'" class="md-block">\n                <label translate="MOTIONDIALER.PREDICTIVEOPTIMIZATION">PredictiveOptimization</label>\n                <md-select name="dialPredictiveOptimization" ng-model="vm.queueCampaign.dialPredictiveOptimization">\n\n                    <md-option ng-value="\'agentBusyFactor\'"> {{ \'MOTIONDIALER.AGENTBUSYFACTOR\' | translate }}</md-option>\n\n                    <md-option ng-value="\'dropRate\'"> {{ \'MOTIONDIALER.DROPRATE\' | translate }}</md-option>\n                </md-select>\n                <div class="hint"><span translate="MOTIONDIALER.HELP.PREDICTIVEOPTIMIZATION"></span></div>\n                <div ng-messages="queueCampaignForm[\'dialPredictiveOptimization\'].$error" ng-show="queueCampaignForm[\'dialPredictiveOptimization\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.PREDICTIVEOPTIMIZATION_REQUIRED">PredictiveOptimization field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialMethod == \'predictive\'" class="md-block">\n                <span translate="MOTIONDIALER.PREDICTIVEOPTIMIZATIONPERCENTAGE">PredictiveOptimizationPercentage</span>\n                <div class="hint"><span translate="MOTIONDIALER.HELP.PREDICTIVEOPTIMIZATIONPERCENTAGE"></span></div>\n                <md-slider md-discrete flex ng-model="vm.queueCampaign.dialPredictiveOptimizationPercentage" min="1" max="95" step="0.1" class="md-accent">\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialMethod == \'predictive\'" class="md-block">\n                <span translate="MOTIONDIALER.PREDICTIVEINTERVAL">PredictiveInterval</span>\n                <div class="hint"><span translate="MOTIONDIALER.HELP.PREDICTIVEINTERVAL"></span></div>\n                <md-slider md-discrete flex ng-model="vm.queueCampaign.dialPredictiveInterval" min="5" max="30" step="1" class="md-accent">\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialMethod != \'preview\'" class="md-block">\n                <label translate="MOTIONDIALER.MAXCONCURRENTCALLS">MaxConcurrentCalls</label>\n                <input type="number" name="dialLimitQueue" ng-model="vm.queueCampaign.dialLimitQueue" min="0" max="9999" ng-required="true">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.MAXCONCURRENTCALLS"></span></div>\n                <div ng-messages="queueCampaignForm[\'dialLimitQueue\'].$error" ng-show="queueCampaignForm[\'dialLimitQueue\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.MAXCONCURRENTCALLS_REQUIRED">MaxConcurrentCalls field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.MAXCONCURRENTCALLS_MUST_BE_GREATER_THAN_OR_EQUAL_TO">MaxConcurrentCalls must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="MOTIONDIALER.ERRORS.MAXCONCURRENTCALLS_MUST_BE_LESS_THAN_OR_EQUAL_TO">MaxConcurrentCalls must be a valid greater or equal than</span> <span>9999</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="md-block">\n                <label translate="MOTIONDIALER.QUEUETIMEOUT">QueueTimeout</label>\n                <input type="number" name="dialQueueTimeout" ng-model="vm.queueCampaign.dialQueueTimeout" min="1" max="999" ng-required="true">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.QUEUETIMEOUT"></span></div>\n                <div ng-messages="queueCampaignForm[\'dialQueueTimeout\'].$error" ng-show="queueCampaignForm[\'dialQueueTimeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.QUEUETIMEOUT_REQUIRED">QueueTimeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.QUEUETIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">QueueTimeout must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="MOTIONDIALER.ERRORS.QUEUETIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">QueueTimeout must be a valid greater or equal than</span> <span>999</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.AGENTTIMEOUT">AgentTimeout</label>\n                <input type="number" name="timeout" ng-model="vm.queueCampaign.timeout" min="0" ng-required="true">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AGENTTIMEOUT"></span></div>\n                <div ng-messages="queueCampaignForm[\'timeout\'].$error" ng-show="queueCampaignForm[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AGENTTIMEOUT_REQUIRED">AgentTimeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AGENTTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AgentTimeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.queueCampaign.description">\n                <div ng-messages="queueCampaignForm[\'description\'].$error" ng-show="queueCampaignForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newQueueCampaign" ng-click="vm.saveQueueCampaign()" class="send-button md-accent md-raised" ng-disabled="queueCampaignForm.$invalid || queueCampaignForm.$pristine" aria-label="SAVE" translate="MOTIONDIALER.SAVE" translate-attr-aria-label="MOTIONDIALER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newQueueCampaign" ng-click="vm.addNewQueueCampaign()" class="send-button md-accent md-raised" ng-disabled="queueCampaignForm.$invalid" aria-label="ADD" translate="MOTIONDIALER.ADD_QUEUECAMPAIGN" translate-attr-aria-label="MOTIONDIALER.ADD_QUEUECAMPAIGN">\n                    ADD QUEUECAMPAIGN\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newQueueCampaign" ng-click="vm.deleteQueueCampaign($event)" aria-label="DELETE" translate translate-attr-aria-label="MOTIONDIALER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="MOTIONDIALER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/queueCampaigns/edit/agentadd/agentadd.html",'<md-dialog class="queueCampaign-dialog" aria-label="queueCampaign">\n    <form name="queueCampaignForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="MOTIONDIALER.AGENTADD_QUEUECAMPAIGN">Add Agent to queueCampaign</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <md-input-container flex class="no-margin">\n                <label translate="MOTIONDIALER.PENALTY">Penalty</label>\n                <input name="penalty" ng-model="vm.penalty" placeholder="0" required md-minlength="0" md-maxlength="3">\n                <div ng-messages="queueCampaignForm.penalty.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span>You must supply a penalty.</span>\n                    </div>\n                    <div ng-message="md-minlength">\n                        <span>Min Penalty 0 characters.</span>\n                    </div>\n                    <div ng-message="md-maxlength">\n                        <span>Max Penalty 3 characters.</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/queueCampaigns/edit/blacklistadd/blacklistadd.html",'<md-dialog class="queueCampaign-dialog" aria-label="queueCampaign">\n    <form name="queueCampaignForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="MOTIONDIALER.BLACKLISTADD_QUEUECAMPAIGN">Add List in QUEUECAMPAIGN</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect ng-hide="vm.loading" options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n            <div ng-hide="!vm.loading" layout-fill style="min-height: 397px;" layout="row" layout-sm="column" layout-align="center center">\n                <md-progress-circular class="md-primary md-hue-1" md-diameter="96"></md-progress-circular>\n            </div>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/queueCampaigns/edit/hoppers/dialog.html",'<md-dialog class="hopper-dialog" aria-label="New Hopper">\n    <form name="hopperForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <div class="md-block">\n                <label translate="MOTIONDIALER.SCHEDULEDAT">ScheduledAt</label>\n                <md-content layout="row" class="md-padding">\n                    <div flex class="md-block">\n                        <mdp-date-picker mdp-open-on-click name="scheduledatDate" mdp-placeholder="Date" mdp-format="YYYY-MM-DD" ng-model="vm.hopper.scheduledat" ng-init="vm.hopper.scheduledat = vm.getDateFromString(vm.hopper.scheduledat)">\n                            <div ng-messages="hopperForm.dateRangeFrom.$error" ng-show="hopperForm.dateRangeFrom.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="MOTIONDIALER.ERRORS.DATE_REQUIRED">Date is required</span>\n                                </div>\n                                <div ng-message="format">\n                                    <span translate="MOTIONDIALER.ERRORS.DATE_INVALID">Date is invalid</span>\n                                </div>\n                            </div>\n                        </mdp-date-picker>\n                    </div>\n                    <div flex class="md-block">\n                        <mdp-time-picker mdp-open-on-click name="scheduledatTime" mdp-placeholder="Time" mdp-format="HH:mm:ss" mdp-auto-switch="true" ng-model="vm.hopper.scheduledat" ng-init="vm.hopper.scheduledat = vm.getDateFromString(vm.hopper.scheduledat)">\n                            <div ng-messages="hopperForm.timeRangeFrom.$error" ng-show="hopperForm.timeRangeFrom.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="MOTIONDIALER.ERRORS.TIME_REQUIRED">Time is required</span>\n                                </div>\n                                <div ng-message="format">\n                                    <span translate="MOTIONDIALER.ERRORS.TIME_INVALID">Time is invalid</span>\n                                </div>\n                            </div>\n                        </mdp-time-picker>\n                    </div>\n                </md-content>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.PRIORITY">Priority</label>\n                <md-select name="priority" ng-model="vm.hopper.priority">\n                    <md-option ng-value="\'4\'">Highest</md-option>\n                    <md-option ng-value="\'3\'">High</md-option>\n                    <md-option ng-value="\'2\'">Medium</md-option>\n                    <md-option ng-value="\'1\'">Low</md-option>\n                    <md-option ng-value="\'0\'">Lowest</md-option>\n                </md-select>\n                <div class="hint"><span translate="MOTIONDIALER.HELP.PRIORITY"></span></div>\n                <div ng-messages="hopperForm[\'priority\'].$error" ng-show="hopperForm[\'priority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.PRIORITY_REQUIRED">Priority field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.hopper.recallme" aria-label="RecallAgent"><span translate="MOTIONDIALER.RECALLAGENT">RecallAgent</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="vm.hopper.recallme" class="md-block">\n                <label translate="MOTIONDIALER.AGENT">Agent</label>\n                <md-select name="UserId" ng-model="vm.hopper.UserId" required>\n                    <md-option ng-value="UserId.id" ng-repeat="UserId in vm.agents">{{ UserId.name }}</md-option>\n                </md-select>\n                <div ng-messages="hopperForm[\'UserId\'].$error" ng-show="hopperForm[\'UserId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AGENT_REQUIRED">Agent field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newHopper" ng-click="vm.saveHopper()" class="send-button md-accent md-raised" ng-disabled="hopperForm.$invalid || hopperForm.$pristine" aria-label="SAVE" translate="MOTIONDIALER.SAVE" translate-attr-aria-label="MOTIONDIALER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newHopper" ng-click="vm.addNewHopper()" class="send-button md-accent md-raised" ng-disabled="hopperForm.$invalid" aria-label="ADD" translate="MOTIONDIALER.ADD_HOPPER" translate-attr-aria-label="MOTIONDIALER.ADD_HOPPER">\n                    ADD HOPPER\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newHopper" ng-click="vm.deleteHopper($event)" aria-label="DELETE" translate translate-attr-aria-label="MOTIONDIALER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="MOTIONDIALER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/queueCampaigns/edit/listadd/listadd.html",'<md-dialog class="queueCampaign-dialog" aria-label="queueCampaign">\n    <form name="queueCampaignForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="MOTIONDIALER.LISTADD_QUEUECAMPAIGN">Add List in QUEUECAMPAIGN</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect ng-hide="vm.loading" options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n            <div ng-hide="!vm.loading" layout-fill style="min-height: 397px;" layout="row" layout-sm="column" layout-align="center center">\n                <md-progress-circular class="md-primary md-hue-1" md-diameter="96"></md-progress-circular>\n            </div>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/queueCampaigns/edit/resetlist/resetlist.html",'<md-dialog class="queueCampaign-dialog" aria-label="queueCampaign">\n    <form name="queueCampaignForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="MOTIONDIALER.RESETLIST ">Reset List</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-disabled="vm.loading" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content ng-hide="vm.loading">\n            <div layout="row" layout-wrap flex>\n                <div flex-xs flex="50">\n                    <md-checkbox aria-label="Select All" ng-checked="vm.isChecked()" md-indeterminate="vm.isIndeterminate()" ng-click="vm.toggleAll()">\n                        <span ng-if="vm.isChecked()" translate="MOTIONDIALER.UNSELECTALL"></span>\n                        <span ng-if="!vm.isChecked()" translate="MOTIONDIALER.SELECTALL"></span>\n                    </md-checkbox>\n                </div>\n                <div flex-xs flex="50">\n                </div>\n                <div flex="{{vm.items.length > 10 ? 50 : 100 }}" ng-repeat="item in vm.items">\n                    <md-checkbox ng-checked="vm.exists(item, vm.selected)" ng-click="vm.toggle(item, vm.selected)">\n                        {{ item.name | limitTo:40 }}\n                    </md-checkbox>\n                </div>\n            </div>\n        </md-dialog-content>\n        <md-dialog-actions ng-hide="vm.loading" layout="row" layout-align="end center">\n            <div>\n            </div>\n            <md-button type="submit" ng-click="vm.listSelected()" class="send-button md-accent md-raised" ng-disabled="vm.loading" aria-label="RESET" translate="MOTIONDIALER.RESET" translate-attr-aria-label="MOTIONDIALER.RESET">\n                SAVE\n            </md-button>\n        </md-dialog-actions>\n        <div ng-hide="!vm.loading" layout-fill style="min-height: 397px;" layout="row" layout-sm="column" layout-align="center center">\n            <md-progress-circular class="md-primary md-hue-1" md-diameter="96"></md-progress-circular>\n        </div>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/queueCampaigns/edit/teamadd/teamadd.html",'<md-dialog class="queueCampaign-dialog" aria-label="queueCampaign">\n    <form name="queueCampaignForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="MOTIONDIALER.TEAMADD_QUEUECAMPAIGN">Add Team in QUEUECAMPAIGN</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <md-input-container flex class="no-margin">\n                <label translate="MOTIONDIALER.PENALTY">Penalty</label>\n                <input name="penalty" ng-model="vm.penalty" placeholder="0" required md-minlength="0" md-maxlength="3">\n                <div ng-messages="queueCampaignForm.penalty.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span>You must supply a penalty.</span>\n                    </div>\n                    <div ng-message="md-minlength">\n                        <span>Min Penalty 0 characters.</span>\n                    </div>\n                    <div ng-message="md-maxlength">\n                        <span>Max Penalty 3 characters.</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/queueCampaigns/edit/view.html",'<div id="motiondialer-queueCampaign" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-queueCampaigns-button md-icon-button" aria-label="Go to queueCampaigns" ng-click="vm.gotoQueueCampaigns()" translate translate-attr-aria-label="MOTIONDIALER.GO_TO_QUEUECAMPAIGNS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="queueCampaign-image" hide-xs>\n                    <img ng-src="assets/images/business/queueCampaigns.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.queueCampaign.id}}\n                        <span ng-if="vm.queueCampaign.name">{{vm.queueCampaign.name}}</span>\n                        <span ng-if="vm.queueCampaign.exten">{{vm.queueCampaign.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="MOTIONDIALER.CREATED_AT"></span> <span>{{vm.queueCampaign.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.listadddialog(vm.queueCampaign, $event)" class="md-fab md-green-500-bg md-icon-button" aria-label="listadd">\n                <md-tooltip><span translate="MOTIONDIALER.LISTADD_QUEUECAMPAIGN"></span></md-tooltip>\n                <md-icon md-font-icon="icon-format-list-numbers"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.blacklistadddialog(vm.queueCampaign, $event)" class="md-fab md-warn md-icon-button" aria-label="blacklistadd">\n                <md-tooltip><span translate="MOTIONDIALER.BLACKLISTADD_QUEUECAMPAIGN"></span></md-tooltip>\n                <md-icon md-font-icon="icon-block-helper"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.teamadddialog(vm.queueCampaign, $event)" class="md-fab md-orange-500-bg md-icon-button" aria-label="teamadd">\n                <md-tooltip><span translate="MOTIONDIALER.TEAMADD_QUEUECAMPAIGN"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-multiple-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.agentadddialog(vm.queueCampaign, $event)" class="md-fab md-purple-500-bg md-icon-button" aria-label="agentadd">\n                <md-tooltip><span translate="MOTIONDIALER.AGENTADD_QUEUECAMPAIGN"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.resetlistdialog(vm.queueCampaign, $event)" class="md-fab md-warn md-icon-button" aria-label="resetlist">\n                <md-tooltip><span translate="MOTIONDIALER.RESETLIST_QUEUECAMPAIGN"></span></md-tooltip>\n                <md-icon md-font-icon="icon-restore"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.gotogoto(vm.queueCampaign, $event)" class="md-fab md-warn md-icon-button" aria-label="goto">\n                <md-tooltip><span translate="MOTIONDIALER.GOTO_QUEUECAMPAIGN"></span></md-tooltip>\n                <md-icon md-font-icon="icon-cast"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveQueueCampaign()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (campaignForm.$invalid) || (queueForm.$invalid) || (originateForm.$invalid) || (globalForm.$invalid) || (congestionForm.$invalid) || (busyForm.$invalid) || (noanswerForm.$invalid) || (advancedForm.$invalid) || (advancedpreviewForm.$invalid) || (recallmeForm.$invalid) || (globalintervalForm.$invalid) || (timezoneForm.$invalid) || (amdForm.$invalid) || (hopperStatisticsForm.$invalid) || (hoppersForm.$invalid) || (hopperHistoriesForm.$invalid) || (hopperFinalsForm.$invalid) || (hopperBlacksForm.$invalid)"\n                translate="MOTIONDIALER.SAVE" translate-attr-aria-label="MOTIONDIALER.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="queueCampaign-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.queueCampaign.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.NAME"></span></div>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="MOTIONDIALER.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.queueCampaign.dialActive" aria-label="Active"><span translate="MOTIONDIALER.ACTIVE">Active</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.TRUNK">Trunk</label>\n                                <md-select name="TrunkId" ng-model="vm.queueCampaign.TrunkId" required>\n                                    <md-option ng-value="TrunkId.id" ng-repeat="TrunkId in vm.trunks">{{ TrunkId.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'TrunkId\'].$error" ng-show="generalForm[\'TrunkId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.TRUNK_REQUIRED">Trunk field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.BACKUPTRUNK">BackupTrunk</label>\n                                <md-select name="TrunkBackupId" ng-model="vm.queueCampaign.TrunkBackupId">\n                                    <md-option ng-value="TrunkBackupId.id" ng-repeat="TrunkBackupId in vm.trunks">{{ TrunkBackupId.name }}</md-option>\n                                    <md-option ng-value="null">None</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'TrunkBackupId\'].$error" ng-show="generalForm[\'TrunkBackupId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.BACKUPTRUNK_REQUIRED">BackupTrunk field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod != \'preview\'" class="md-block">\n                                <label translate="MOTIONDIALER.INTERVAL">Interval</label>\n                                <md-select name="IntervalId" ng-model="vm.queueCampaign.IntervalId" required>\n                                    <md-option ng-value="IntervalId.id" ng-repeat="IntervalId in vm.interval">{{ IntervalId.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'IntervalId\'].$error" ng-show="generalForm[\'IntervalId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.INTERVAL_REQUIRED">Interval field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.CHECKDUPLICATE">CheckDuplicate</label>\n                                <md-select name="dialCheckDuplicateType" ng-model="vm.queueCampaign.dialCheckDuplicateType" required>\n\n                                    <md-option ng-value="\'always\'"> {{ \'MOTIONDIALER.ALWAYS\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'never\'"> {{ \'MOTIONDIALER.NEVER\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'onlyIfOpen\'"> {{ \'MOTIONDIALER.ONLY_IF_OPEN\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'dialCheckDuplicateType\'].$error" ng-show="generalForm[\'dialCheckDuplicateType\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CHECKDUPLICATE_REQUIRED">CheckDuplicate field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.queueCampaign.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.CAMPAIGN">CAMPAIGN</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="queueCampaign-detail-form-container campaign md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.CAMPAIGN">CAMPAIGN</div>\n                        </div>\n                        <form name="campaignForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.METHOD">Method</label>\n                                <md-select name="dialMethod" ng-model="vm.queueCampaign.dialMethod" required autofocus>\n                                    <md-option ng-value="\'progressive\'">Progressive</md-option>\n                                    <md-option ng-value="\'power\'">PowerDialing</md-option>\n                                    <md-option ng-value="\'predictive\'">Predictive</md-option>\n                                    <md-option ng-value="\'preview\'">Preview</md-option>\n                                    <md-option ng-value="\'booked\'">BookedProgressive</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.METHOD"></span></div>\n                                <div ng-messages="campaignForm[\'dialMethod\'].$error" ng-show="campaignForm[\'dialMethod\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.METHOD_REQUIRED">Method field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod == \'power\'" class="md-block">\n                                <span translate="MOTIONDIALER.POWERLEVEL">PowerLevel</span>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.POWERLEVEL"></span></div>\n                                <md-slider md-discrete flex ng-model="vm.queueCampaign.dialPowerLevel" min="1" max="10" step="0.1" class="md-accent">\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod == \'predictive\'" class="md-block">\n                                <label translate="MOTIONDIALER.PREDICTIVEOPTIMIZATION">PredictiveOptimization</label>\n                                <md-select name="dialPredictiveOptimization" ng-model="vm.queueCampaign.dialPredictiveOptimization">\n\n                                    <md-option ng-value="\'agentBusyFactor\'"> {{ \'MOTIONDIALER.AGENTBUSYFACTOR\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'dropRate\'"> {{ \'MOTIONDIALER.DROPRATE\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.PREDICTIVEOPTIMIZATION"></span></div>\n                                <div ng-messages="campaignForm[\'dialPredictiveOptimization\'].$error" ng-show="campaignForm[\'dialPredictiveOptimization\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.PREDICTIVEOPTIMIZATION_REQUIRED">PredictiveOptimization field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod == \'predictive\'" class="md-block">\n                                <span translate="MOTIONDIALER.PREDICTIVEOPTIMIZATIONPERCENTAGE">PredictiveOptimizationPercentage</span>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.PREDICTIVEOPTIMIZATIONPERCENTAGE"></span></div>\n                                <md-slider md-discrete flex ng-model="vm.queueCampaign.dialPredictiveOptimizationPercentage" min="1" max="95" step="0.1" class="md-accent">\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod == \'predictive\'" class="md-block">\n                                <span translate="MOTIONDIALER.PREDICTIVEINTERVAL">PredictiveInterval</span>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.PREDICTIVEINTERVAL"></span></div>\n                                <md-slider md-discrete flex ng-model="vm.queueCampaign.dialPredictiveInterval" min="5" max="30" step="1" class="md-accent">\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod != \'preview\'" class="md-block">\n                                <label translate="MOTIONDIALER.MAXCONCURRENTCALLS">MaxConcurrentCalls</label>\n                                <input type="number" name="dialLimitQueue" ng-model="vm.queueCampaign.dialLimitQueue" min="0" max="9999" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.MAXCONCURRENTCALLS"></span></div>\n                                <div ng-messages="campaignForm[\'dialLimitQueue\'].$error" ng-show="campaignForm[\'dialLimitQueue\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.MAXCONCURRENTCALLS_REQUIRED">MaxConcurrentCalls field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.MAXCONCURRENTCALLS_MUST_BE_GREATER_THAN_OR_EQUAL_TO">MaxConcurrentCalls must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.MAXCONCURRENTCALLS_MUST_BE_LESS_THAN_OR_EQUAL_TO">MaxConcurrentCalls must be a valid greater or equal than</span> <span>9999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.AGENTTIMEOUT">AgentTimeout</label>\n                                <input type="number" name="timeout" ng-model="vm.queueCampaign.timeout" min="0" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.AGENTTIMEOUT"></span></div>\n                                <div ng-messages="campaignForm[\'timeout\'].$error" ng-show="campaignForm[\'timeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.AGENTTIMEOUT_REQUIRED">AgentTimeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.AGENTTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AgentTimeout must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="queueCampaign-detail-form-container queue md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.QUEUE">QUEUE</div>\n                        </div>\n                        <form name="queueForm" novalidate>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="md-block">\n                                <label translate="MOTIONDIALER.QUEUEOPTIONS">QueueOptions</label>\n                                <input type="text" name="dialQueueOptions" ng-model="vm.queueCampaign.dialQueueOptions" autofocus>\n                                <div ng-messages="queueForm[\'dialQueueOptions\'].$error" ng-show="queueForm[\'dialQueueOptions\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.QUEUEOPTIONS_REQUIRED">QueueOptions field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="md-block">\n                                <label translate="MOTIONDIALER.QUEUETIMEOUT">QueueTimeout</label>\n                                <input type="number" name="dialQueueTimeout" ng-model="vm.queueCampaign.dialQueueTimeout" min="1" max="999" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.QUEUETIMEOUT"></span></div>\n                                <div ng-messages="queueForm[\'dialQueueTimeout\'].$error" ng-show="queueForm[\'dialQueueTimeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.QUEUETIMEOUT_REQUIRED">QueueTimeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.QUEUETIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">QueueTimeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.QUEUETIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">QueueTimeout must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'booked\' || vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="md-block">\n                                <label translate="MOTIONDIALER.STRATEGY">Strategy</label>\n                                <md-select name="strategy" ng-model="vm.queueCampaign.strategy" required>\n                                    <md-option ng-value="\'rrmemory\'">Round Robin Memory</md-option>\n                                    <md-option ng-value="\'roundrobin\'" ng-if="vm.queueCampaign.dialMethod === \'booked\'">Round Robin</md-option>\n                                    <md-option ng-value="\'leastrecent\'" ng-if="vm.queueCampaign.dialMethod !== \'booked\'">Least Recent</md-option>\n                                    <md-option ng-value="\'fewestcalls\'" ng-if="vm.queueCampaign.dialMethod !== \'booked\'">Fewest Calls</md-option>\n                                    <md-option ng-value="\'random\'" ng-if="vm.queueCampaign.dialMethod !== \'booked\'">Random</md-option>\n                                    <md-option ng-value="\'linear\'" ng-if="vm.queueCampaign.dialMethod !== \'booked\'">Linear</md-option>\n                                    <md-option ng-value="\'wrandom\'" ng-if="vm.queueCampaign.dialMethod !== \'booked\'">Weight Random</md-option>\n                                </md-select>\n                                <div ng-messages="queueForm[\'strategy\'].$error" ng-show="queueForm[\'strategy\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="md-block">\n                                <label translate="MOTIONDIALER.RETRY">Retry</label>\n                                <input type="number" name="retry" ng-model="vm.queueCampaign.retry" min="0">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.RETRY"></span></div>\n                                <div ng-messages="queueForm[\'retry\'].$error" ng-show="queueForm[\'retry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.RETRY_REQUIRED">Retry field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.RETRY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Retry must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="md-block">\n                                <label translate="MOTIONDIALER.WRAPUPTIME">WrapupTime</label>\n                                <input type="number" name="wrapuptime" ng-model="vm.queueCampaign.wrapuptime" min="0">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.WRAPUPTIME"></span></div>\n                                <div ng-messages="queueForm[\'wrapuptime\'].$error" ng-show="queueForm[\'wrapuptime\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.WRAPUPTIME_REQUIRED">WrapupTime field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.WRAPUPTIME_MUST_BE_GREATER_THAN_OR_EQUAL_TO">WrapupTime must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="md-block">\n                                <label translate="MOTIONDIALER.WEIGHT">Weight</label>\n                                <input type="number" name="weight" ng-model="vm.queueCampaign.weight" min="0">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.WEIGHT"></span></div>\n                                <div ng-messages="queueForm[\'weight\'].$error" ng-show="queueForm[\'weight\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.WEIGHT_REQUIRED">Weight field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.WEIGHT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Weight must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="md-block">\n                                <label translate="MOTIONDIALER.MUSICONHOLD">MusicOnHold</label>\n                                <md-select name="musiconhold" ng-model="vm.queueCampaign.musiconhold">\n                                    <md-option ng-value="musiconhold.name" ng-repeat="musiconhold in vm.musiconholds">{{ musiconhold.name }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.MUSICONHOLD"></span></div>\n                                <div ng-messages="queueForm[\'musiconhold\'].$error" ng-show="queueForm[\'musiconhold\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.MUSICONHOLD_REQUIRED">MusicOnHold field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="md-block">\n                                <label translate="MOTIONDIALER.CALLYSQUAREPROJECT">CallySquareProject</label>\n                                <md-select name="dialQueueProject" ng-model="vm.queueCampaign.dialQueueProject">\n                                    <md-option ng-value="dialQueueProject.name" ng-repeat="dialQueueProject in vm.projects">{{ dialQueueProject.name }}</md-option>\n                                    <md-option ng-value="null">None</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.CALLYSQUAREPROJECT"></span></div>\n                                <div ng-messages="queueForm[\'dialQueueProject\'].$error" ng-show="queueForm[\'dialQueueProject\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CALLYSQUAREPROJECT_REQUIRED">CallySquareProject field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="md-block">\n                                <label translate="MOTIONDIALER.CALLYSQUAREPROJECT2">CallySquareProject2</label>\n                                <md-select name="dialQueueProject2" ng-model="vm.queueCampaign.dialQueueProject2">\n                                    <md-option ng-value="dialQueueProject2.name" ng-repeat="dialQueueProject2 in vm.projects">{{ dialQueueProject2.name }}</md-option>\n                                    <md-option ng-value="null">None</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.CALLYSQUAREPROJECT2"></span></div>\n                                <div ng-messages="queueForm[\'dialQueueProject2\'].$error" ng-show="queueForm[\'dialQueueProject2\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CALLYSQUAREPROJECT2_REQUIRED">CallySquareProject2 field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'preview\' || vm.queueCampaign.dialMethod === \'booked\'" class="md-block">\n                                <label translate="MOTIONDIALER.CALLYSQUAREPROJECTPREVIEW">CallySquareProjectPreview</label>\n                                <md-select name="dialQueueProject" ng-model="vm.queueCampaign.dialQueueProject">\n                                    <md-option ng-value="dialQueueProject.name" ng-repeat="dialQueueProject in vm.projects">{{ dialQueueProject.name }}</md-option>\n                                    <md-option ng-value="null">None</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.CALLYSQUAREPROJECTPREVIEW"></span></div>\n                                <div ng-messages="queueForm[\'dialQueueProject\'].$error" ng-show="queueForm[\'dialQueueProject\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CALLYSQUAREPROJECTPREVIEW_REQUIRED">CallySquareProjectPreview field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'preview\' || vm.queueCampaign.dialMethod === \'booked\'" class="md-block">\n                                <label translate="MOTIONDIALER.CALLYSQUAREPROJECTPREVIEW2">CallySquareProjectPreview2</label>\n                                <md-select name="dialQueueProject2" ng-model="vm.queueCampaign.dialQueueProject2">\n                                    <md-option ng-value="dialQueueProject2.name" ng-repeat="dialQueueProject2 in vm.projects">{{ dialQueueProject2.name }}</md-option>\n                                    <md-option ng-value="null">None</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.CALLYSQUAREPROJECTPREVIEW2"></span></div>\n                                <div ng-messages="queueForm[\'dialQueueProject2\'].$error" ng-show="queueForm[\'dialQueueProject2\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CALLYSQUAREPROJECTPREVIEW2_REQUIRED">CallySquareProjectPreview2 field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialQueueProject2 && (vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\')" class="md-block">\n                                <md-switch ng-model="vm.queueCampaign.dialAgiAfterHangupAgent" aria-label="RunIfHangupAgent"><span translate="MOTIONDIALER.RUNIFHANGUPAGENT">RunIfHangupAgent</span></md-switch>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.RUNIFHANGUPAGENT"></span></div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="queueCampaign-detail-form-container originate md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.ORIGINATE">ORIGINATE</div>\n                        </div>\n                        <form name="originateForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.ORIGINATECALLERIDNAME">OriginateCallerIdName</label>\n                                <input type="text" name="dialOriginateCallerIdName" ng-model="vm.queueCampaign.dialOriginateCallerIdName" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.ORIGINATECALLERIDNAME"></span></div>\n                                <div ng-messages="originateForm[\'dialOriginateCallerIdName\'].$error" ng-show="originateForm[\'dialOriginateCallerIdName\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.ORIGINATECALLERIDNAME_REQUIRED">OriginateCallerIdName field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.ORIGINATECALLERIDNUMBER">OriginateCallerIdNumber</label>\n                                <input type="text" name="dialOriginateCallerIdNumber" ng-model="vm.queueCampaign.dialOriginateCallerIdNumber">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.ORIGINATECALLERIDNUMBER"></span></div>\n                                <div ng-messages="originateForm[\'dialOriginateCallerIdNumber\'].$error" ng-show="originateForm[\'dialOriginateCallerIdNumber\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.ORIGINATECALLERIDNUMBER_REQUIRED">OriginateCallerIdNumber field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.ORIGINATETIMEOUT">OriginateTimeout</label>\n                                <input type="number" name="dialOriginateTimeout" ng-model="vm.queueCampaign.dialOriginateTimeout" min="1" max="999" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.ORIGINATETIMEOUT"></span></div>\n                                <div ng-messages="originateForm[\'dialOriginateTimeout\'].$error" ng-show="originateForm[\'dialOriginateTimeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.ORIGINATETIMEOUT_REQUIRED">OriginateTimeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.ORIGINATETIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">OriginateTimeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.ORIGINATETIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">OriginateTimeout must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.PREFIX">Prefix</label>\n                                <input type="text" name="dialPrefix" ng-model="vm.queueCampaign.dialPrefix" ng-pattern="/^\\d+$/">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.PREFIX"></span></div>\n                                <div ng-messages="originateForm[\'dialPrefix\'].$error" ng-show="originateForm[\'dialPrefix\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.PREFIX_REQUIRED">Prefix field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="MOTIONDIALER.ERRORS.PREFIX_MUST_VALID_PATTERN" translate-values="{ regex: \'/^\\d+$/\' }">Prefix must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.RETRYANDFREQUENCY">RETRYANDFREQUENCY</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="queueCampaign-detail-form-container global md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.GLOBAL">GLOBAL</div>\n                        </div>\n                        <form name="globalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.GLOBALMAXRETRY">GlobalMaxRetry</label>\n                                <input type="number" name="dialGlobalMaxRetry" ng-model="vm.queueCampaign.dialGlobalMaxRetry" min="1" max="999" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.GLOBALMAXRETRY"></span></div>\n                                <div ng-messages="globalForm[\'dialGlobalMaxRetry\'].$error" ng-show="globalForm[\'dialGlobalMaxRetry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.GLOBALMAXRETRY_REQUIRED">GlobalMaxRetry field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.GLOBALMAXRETRY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">GlobalMaxRetry must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.GLOBALMAXRETRY_MUST_BE_LESS_THAN_OR_EQUAL_TO">GlobalMaxRetry must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="queueCampaign-detail-form-container congestion md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.CONGESTION">CONGESTION</div>\n                        </div>\n                        <form name="congestionForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.CONGESTIONMAXRETRY">CongestionMaxRetry</label>\n                                <input type="number" name="dialCongestionMaxRetry" ng-model="vm.queueCampaign.dialCongestionMaxRetry" min="1" max="999" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.CONGESTIONMAXRETRY"></span></div>\n                                <div ng-messages="congestionForm[\'dialCongestionMaxRetry\'].$error" ng-show="congestionForm[\'dialCongestionMaxRetry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONMAXRETRY_REQUIRED">CongestionMaxRetry field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONMAXRETRY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">CongestionMaxRetry must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONMAXRETRY_MUST_BE_LESS_THAN_OR_EQUAL_TO">CongestionMaxRetry must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.CONGESTIONRETRYTIME">CongestionRetryTime</label>\n                                <input type="number" name="dialCongestionRetryFrequency" ng-model="vm.queueCampaign.dialCongestionRetryFrequency" min="1" max="99999" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.CONGESTIONRETRYTIME"></span></div>\n                                <div ng-messages="congestionForm[\'dialCongestionRetryFrequency\'].$error" ng-show="congestionForm[\'dialCongestionRetryFrequency\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONRETRYTIME_REQUIRED">CongestionRetryTime field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONRETRYTIME_MUST_BE_GREATER_THAN_OR_EQUAL_TO">CongestionRetryTime must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONRETRYTIME_MUST_BE_LESS_THAN_OR_EQUAL_TO">CongestionRetryTime must be a valid greater or equal than</span> <span>99999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="queueCampaign-detail-form-container busy md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.BUSY">BUSY</div>\n                        </div>\n                        <form name="busyForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.BUSYMAXRETRY">BusyMaxRetry</label>\n                                <input type="number" name="dialBusyMaxRetry" ng-model="vm.queueCampaign.dialBusyMaxRetry" min="1" max="999" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.BUSYMAXRETRY"></span></div>\n                                <div ng-messages="busyForm[\'dialBusyMaxRetry\'].$error" ng-show="busyForm[\'dialBusyMaxRetry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYMAXRETRY_REQUIRED">BusyMaxRetry field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYMAXRETRY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">BusyMaxRetry must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYMAXRETRY_MUST_BE_LESS_THAN_OR_EQUAL_TO">BusyMaxRetry must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.BUSYRETRYTIME">BusyRetryTime</label>\n                                <input type="number" name="dialBusyRetryFrequency" ng-model="vm.queueCampaign.dialBusyRetryFrequency" min="1" max="99999" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.BUSYRETRYTIME"></span></div>\n                                <div ng-messages="busyForm[\'dialBusyRetryFrequency\'].$error" ng-show="busyForm[\'dialBusyRetryFrequency\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYRETRYTIME_REQUIRED">BusyRetryTime field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYRETRYTIME_MUST_BE_GREATER_THAN_OR_EQUAL_TO">BusyRetryTime must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYRETRYTIME_MUST_BE_LESS_THAN_OR_EQUAL_TO">BusyRetryTime must be a valid greater or equal than</span> <span>99999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="queueCampaign-detail-form-container noanswer md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.NOANSWER">NOANSWER</div>\n                        </div>\n                        <form name="noanswerForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.NOANSWERMAXRETRY">NoAnswerMaxRetry</label>\n                                <input type="number" name="dialNoAnswerMaxRetry" ng-model="vm.queueCampaign.dialNoAnswerMaxRetry" min="1" max="999" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.NOANSWERMAXRETRY"></span></div>\n                                <div ng-messages="noanswerForm[\'dialNoAnswerMaxRetry\'].$error" ng-show="noanswerForm[\'dialNoAnswerMaxRetry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERMAXRETRY_REQUIRED">NoAnswerMaxRetry field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERMAXRETRY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">NoAnswerMaxRetry must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERMAXRETRY_MUST_BE_LESS_THAN_OR_EQUAL_TO">NoAnswerMaxRetry must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.NOANSWERRETRYTIME">NoAnswerRetryTime</label>\n                                <input type="number" name="dialNoAnswerRetryFrequency" ng-model="vm.queueCampaign.dialNoAnswerRetryFrequency" min="1" max="99999" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.NOANSWERRETRYTIME"></span></div>\n                                <div ng-messages="noanswerForm[\'dialNoAnswerRetryFrequency\'].$error" ng-show="noanswerForm[\'dialNoAnswerRetryFrequency\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERRETRYTIME_REQUIRED">NoAnswerRetryTime field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERRETRYTIME_MUST_BE_GREATER_THAN_OR_EQUAL_TO">NoAnswerRetryTime must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERRETRYTIME_MUST_BE_LESS_THAN_OR_EQUAL_TO">NoAnswerRetryTime must be a valid greater or equal than</span> <span>99999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.ADVANCED">ADVANCED</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="queueCampaign-detail-form-container advanced md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.ADVANCED">ADVANCED</div>\n                        </div>\n                        <form name="advancedForm" novalidate>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.queueCampaign.acw" aria-label="AfterCallWork"><span translate="MOTIONDIALER.AFTERCALLWORK">AfterCallWork</span></md-switch>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.AFTERCALLWORK"></span></div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.acw" class="md-block">\n                                <label translate="MOTIONDIALER.AFTERCALLWORKDURATION">AfterCallWorkDuration</label>\n                                <input type="number" name="acwTimeout" ng-model="vm.queueCampaign.acwTimeout" min="0" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.AFTERCALLWORKDURATION"></span></div>\n                                <div ng-messages="advancedForm[\'acwTimeout\'].$error" ng-show="advancedForm[\'acwTimeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.AFTERCALLWORKDURATION_REQUIRED">AfterCallWorkDuration field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.AFTERCALLWORKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AfterCallWorkDuration must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.AUTOPAUSE">AutoPause</label>\n                                <md-select name="autopause" ng-model="vm.queueCampaign.autopause">\n\n                                    <md-option ng-value="\'all\'"> {{ \'MOTIONDIALER.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'MOTIONDIALER.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.AUTOPAUSE"></span></div>\n                                <div ng-messages="advancedForm[\'autopause\'].$error" ng-show="advancedForm[\'autopause\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.AUTOPAUSE_REQUIRED">AutoPause field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.RINGINUSE">RingInUse</label>\n                                <md-select name="ringinuse" ng-model="vm.queueCampaign.ringinuse">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'MOTIONDIALER.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'MOTIONDIALER.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.RINGINUSE"></span></div>\n                                <div ng-messages="advancedForm[\'ringinuse\'].$error" ng-show="advancedForm[\'ringinuse\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.RINGINUSE_REQUIRED">RingInUse field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.MEMBERDELAY">MemberDelay</label>\n                                <input type="number" name="memberdelay" ng-model="vm.queueCampaign.memberdelay" min="0">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.MEMBERDELAY"></span></div>\n                                <div ng-messages="advancedForm[\'memberdelay\'].$error" ng-show="advancedForm[\'memberdelay\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.MEMBERDELAY_REQUIRED">MemberDelay field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.MEMBERDELAY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">MemberDelay must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.TIMEOUTRESTART">TimeoutRestart</label>\n                                <md-select name="timeoutrestart" ng-model="vm.queueCampaign.timeoutrestart">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'MOTIONDIALER.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'MOTIONDIALER.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.TIMEOUTRESTART"></span></div>\n                                <div ng-messages="advancedForm[\'timeoutrestart\'].$error" ng-show="advancedForm[\'timeoutrestart\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.TIMEOUTRESTART_REQUIRED">TimeoutRestart field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.MONITORFORMAT">MonitorFormat</label>\n                                <md-select name="monitor_format" ng-model="vm.queueCampaign.monitor_format">\n                                    <md-option ng-value="\'\'">Inactive</md-option>\n                                    <md-option ng-value="\'wav\'">wav</md-option>\n                                    <md-option ng-value="\'wav49\'">wav49</md-option>\n                                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.MONITORFORMAT"></span></div>\n                                <div ng-messages="advancedForm[\'monitor_format\'].$error" ng-show="advancedForm[\'monitor_format\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.MONITORFORMAT_REQUIRED">MonitorFormat field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.CONTEXT">Context</label>\n                                <input type="text" name="context" ng-model="vm.queueCampaign.context">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.CONTEXT"></span></div>\n                                <div ng-messages="advancedForm[\'context\'].$error" ng-show="advancedForm[\'context\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.SETINTERFACEVARIABLES">SetInterfaceVariables</label>\n                                <md-select name="setinterfacevar" ng-model="vm.queueCampaign.setinterfacevar">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'MOTIONDIALER.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'MOTIONDIALER.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.SETINTERFACEVARIABLES"></span></div>\n                                <div ng-messages="advancedForm[\'setinterfacevar\'].$error" ng-show="advancedForm[\'setinterfacevar\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.SETINTERFACEVARIABLES_REQUIRED">SetInterfaceVariables field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.SETQUEUEVARIABLES">SetQueueVariables</label>\n                                <md-select name="setqueuevar" ng-model="vm.queueCampaign.setqueuevar">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'MOTIONDIALER.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'MOTIONDIALER.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.SETQUEUEVARIABLES"></span></div>\n                                <div ng-messages="advancedForm[\'setqueuevar\'].$error" ng-show="advancedForm[\'setqueuevar\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.SETQUEUEVARIABLES_REQUIRED">SetQueueVariables field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.SETQUEUEENTRYVARIABLES">SetQueueEntryVariables</label>\n                                <md-select name="setqueueentryvar" ng-model="vm.queueCampaign.setqueueentryvar">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'MOTIONDIALER.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'MOTIONDIALER.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.SETQUEUEENTRYVARIABLES"></span></div>\n                                <div ng-messages="advancedForm[\'setqueueentryvar\'].$error" ng-show="advancedForm[\'setqueueentryvar\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.SETQUEUEENTRYVARIABLES_REQUIRED">SetQueueEntryVariables field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.DIALORDERBYSCHEDULEDAT">DialOrderByScheduledAt</label>\n                                <md-select name="dialOrderByScheduledAt" ng-model="vm.queueCampaign.dialOrderByScheduledAt">\n\n                                    <md-option ng-value="\'DESC\'"> {{ \'MOTIONDIALER.DESC\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'ASC\'"> {{ \'MOTIONDIALER.ASC\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.DIALORDERBYSCHEDULEDAT"></span></div>\n                                <div ng-messages="advancedForm[\'dialOrderByScheduledAt\'].$error" ng-show="advancedForm[\'dialOrderByScheduledAt\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.DIALORDERBYSCHEDULEDAT_REQUIRED">DialOrderByScheduledAt field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div ng-if="vm.queueCampaign.dialMethod === \'preview\' || vm.queueCampaign.dialMethod === \'booked\'" class="queueCampaign-detail-form-container advancedpreview md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.ADVANCEDPREVIEW">ADVANCEDPREVIEW</div>\n                        </div>\n                        <form name="advancedpreviewForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.MONITORFORMAT">MonitorFormat</label>\n                                <md-select name="monitor_format" ng-model="vm.queueCampaign.monitor_format" autofocus>\n                                    <md-option ng-value="\'\'">Inactive</md-option>\n                                    <md-option ng-value="\'wav\'">wav</md-option>\n                                    <md-option ng-value="\'wav49\'">wav49</md-option>\n                                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.MONITORFORMAT"></span></div>\n                                <div ng-messages="advancedpreviewForm[\'monitor_format\'].$error" ng-show="advancedpreviewForm[\'monitor_format\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.MONITORFORMAT_REQUIRED">MonitorFormat field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.DIALORDERBYSCHEDULEDAT">DialOrderByScheduledAt</label>\n                                <md-select name="dialOrderByScheduledAt" ng-model="vm.queueCampaign.dialOrderByScheduledAt">\n\n                                    <md-option ng-value="\'DESC\'"> {{ \'MOTIONDIALER.DESC\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'ASC\'"> {{ \'MOTIONDIALER.ASC\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.DIALORDERBYSCHEDULEDAT"></span></div>\n                                <div ng-messages="advancedpreviewForm[\'dialOrderByScheduledAt\'].$error" ng-show="advancedpreviewForm[\'dialOrderByScheduledAt\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.DIALORDERBYSCHEDULEDAT_REQUIRED">DialOrderByScheduledAt field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="queueCampaign-detail-form-container recallme md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.RECALLME">RECALLME</div>\n                        </div>\n                        <form name="recallmeForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.DIALRECALLMETIMEOUT">DialRecallMeTimeout</label>\n                                <input type="number" name="dialRecallMeTimeout" ng-model="vm.queueCampaign.dialRecallMeTimeout" min="1" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.DIALRECALLMETIMEOUT"></span></div>\n                                <div ng-messages="recallmeForm[\'dialRecallMeTimeout\'].$error" ng-show="recallmeForm[\'dialRecallMeTimeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.DIALRECALLMETIMEOUT_REQUIRED">DialRecallMeTimeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.DIALRECALLMETIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">DialRecallMeTimeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.queueCampaign.dialRecallInQueue" aria-label="DialRecallInQueue"><span translate="MOTIONDIALER.DIALRECALLINQUEUE">DialRecallInQueue</span></md-switch>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.DIALRECALLINQUEUE"></span></div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div ng-if="vm.queueCampaign.dialMethod != \'preview\'" class="queueCampaign-detail-form-container globalinterval md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.GLOBALINTERVAL">GLOBALINTERVAL</div>\n                        </div>\n                        <form name="globalintervalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.GLOBALINTERVAL">GlobalInterval</label>\n                                <input type="text" name="dialGlobalInterval" ng-model="vm.queueCampaign.dialGlobalInterval" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.GLOBALINTERVAL"></span></div>\n                                <div ng-messages="globalintervalForm[\'dialGlobalInterval\'].$error" ng-show="globalintervalForm[\'dialGlobalInterval\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.GLOBALINTERVAL_REQUIRED">GlobalInterval field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div ng-if="vm.queueCampaign.dialMethod != \'preview\'" class="queueCampaign-detail-form-container timezone md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.TIMEZONE">TIMEZONE</div>\n                        </div>\n                        <form name="timezoneForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.TIMEZONE">Timezone</label>\n                                <ms-timezone name="dialTimezone" ng-model="vm.queueCampaign.dialTimezone" autofocus>\n                                    < <div class="hint"><span translate="MOTIONDIALER.HELP.TIMEZONE"></span></div>\n                    <div ng-messages="timezoneForm[\'dialTimezone\'].$error" ng-show="timezoneForm[dialTimezone].$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="MOTIONDIALER.ERRORS.TIMEZONE_REQUIRED">Timezone field is required</span>\n                        </div>\n                    </div>\n                    </md-input-container>\n\n                    </form>\n    </div>\n    <div ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="queueCampaign-detail-form-container amd md-background-bg md-whiteframe-1dp">\n        <div class="pb-16" layout="row" layout-align="start center">\n            <div class="h2 secondary-text" translate="MOTIONDIALER.AMD">AMD</div>\n        </div>\n        <form name="amdForm" novalidate>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.queueCampaign.dialAMDActive" aria-label="AMDActive"><span translate="MOTIONDIALER.AMDACTIVE">AMDActive</span></md-switch>\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDACTIVE"></span></div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDINITIALSILENCE">AMDInitialSilence</label>\n                <input type="number" name="dialAMDInitialSilence" ng-model="vm.queueCampaign.dialAMDInitialSilence" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDINITIALSILENCE"></span></div>\n                <div ng-messages="amdForm[\'dialAMDInitialSilence\'].$error" ng-show="amdForm[\'dialAMDInitialSilence\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDINITIALSILENCE_REQUIRED">AMDInitialSilence field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDINITIALSILENCE_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDInitialSilence must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDGREETING">AMDGreeting</label>\n                <input type="number" name="dialAMDGreeting" ng-model="vm.queueCampaign.dialAMDGreeting" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDGREETING"></span></div>\n                <div ng-messages="amdForm[\'dialAMDGreeting\'].$error" ng-show="amdForm[\'dialAMDGreeting\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDGREETING_REQUIRED">AMDGreeting field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDGREETING_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDGreeting must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDAFTERGREETINGSILENCE">AMDAfterGreetingSilence</label>\n                <input type="number" name="dialAMDAfterGreetingSilence" ng-model="vm.queueCampaign.dialAMDAfterGreetingSilence" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDAFTERGREETINGSILENCE"></span></div>\n                <div ng-messages="amdForm[\'dialAMDAfterGreetingSilence\'].$error" ng-show="amdForm[\'dialAMDAfterGreetingSilence\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDAFTERGREETINGSILENCE_REQUIRED">AMDAfterGreetingSilence field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDAFTERGREETINGSILENCE_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDAfterGreetingSilence must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDTOTALANALYSISTIME">AMDTotalAnalysisTime</label>\n                <input type="number" name="dialAMDTotalAnalysisTime" ng-model="vm.queueCampaign.dialAMDTotalAnalysisTime" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDTOTALANALYSISTIME"></span></div>\n                <div ng-messages="amdForm[\'dialAMDTotalAnalysisTime\'].$error" ng-show="amdForm[\'dialAMDTotalAnalysisTime\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDTOTALANALYSISTIME_REQUIRED">AMDTotalAnalysisTime field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDTOTALANALYSISTIME_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDTotalAnalysisTime must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDMINWORDLENGTH">AMDMinWordLength</label>\n                <input type="number" name="dialAMDMinWordLength" ng-model="vm.queueCampaign.dialAMDMinWordLength" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDMINWORDLENGTH"></span></div>\n                <div ng-messages="amdForm[\'dialAMDMinWordLength\'].$error" ng-show="amdForm[\'dialAMDMinWordLength\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMINWORDLENGTH_REQUIRED">AMDMinWordLength field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMINWORDLENGTH_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDMinWordLength must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDBETWEENWORDSSILENCE">AMDBetweenWordsSilence</label>\n                <input type="number" name="dialAMDBetweenWordsSilence" ng-model="vm.queueCampaign.dialAMDBetweenWordsSilence" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDBETWEENWORDSSILENCE"></span></div>\n                <div ng-messages="amdForm[\'dialAMDBetweenWordsSilence\'].$error" ng-show="amdForm[\'dialAMDBetweenWordsSilence\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDBETWEENWORDSSILENCE_REQUIRED">AMDBetweenWordsSilence field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDBETWEENWORDSSILENCE_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDBetweenWordsSilence must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDMAXIMUMNUMBEROFWORDS">AMDMaximumNumberOfWords</label>\n                <input type="number" name="dialAMDMaximumNumberOfWords" ng-model="vm.queueCampaign.dialAMDMaximumNumberOfWords" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDMAXIMUMNUMBEROFWORDS"></span></div>\n                <div ng-messages="amdForm[\'dialAMDMaximumNumberOfWords\'].$error" ng-show="amdForm[\'dialAMDMaximumNumberOfWords\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMAXIMUMNUMBEROFWORDS_REQUIRED">AMDMaximumNumberOfWords field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMAXIMUMNUMBEROFWORDS_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDMaximumNumberOfWords must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDSILENCETHRESHOLD">AMDSilenceThreshold</label>\n                <input type="number" name="dialAMDSilenceThreshold" ng-model="vm.queueCampaign.dialAMDSilenceThreshold" min="0" max="32767">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDSILENCETHRESHOLD"></span></div>\n                <div ng-messages="amdForm[\'dialAMDSilenceThreshold\'].$error" ng-show="amdForm[\'dialAMDSilenceThreshold\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDSILENCETHRESHOLD_REQUIRED">AMDSilenceThreshold field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDSILENCETHRESHOLD_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDSilenceThreshold must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="MOTIONDIALER.ERRORS.AMDSILENCETHRESHOLD_MUST_BE_LESS_THAN_OR_EQUAL_TO">AMDSilenceThreshold must be a valid greater or equal than</span> <span>32767</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDMAXIMUMWORDLENGTH">AMDMaximumWordLength</label>\n                <input type="number" name="dialAMDMaximumWordLength" ng-model="vm.queueCampaign.dialAMDMaximumWordLength" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDMAXIMUMWORDLENGTH"></span></div>\n                <div ng-messages="amdForm[\'dialAMDMaximumWordLength\'].$error" ng-show="amdForm[\'dialAMDMaximumWordLength\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMAXIMUMWORDLENGTH_REQUIRED">AMDMaximumWordLength field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMAXIMUMWORDLENGTH_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDMaximumWordLength must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n        </form>\n    </div>\n    </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="MOTIONDIALER.HOPPERS">HOPPERS</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="queueCampaign-detail-form-container hopperstatistics md-background-bg md-whiteframe-1dp">\n                <div ng-controller="QueueCampaignHopperStatisticsController as vm_hs" ng-init="vm_hs.init(vm.queueCampaign)">\n                    <md-toolbar class="md-table-toolbar md-default">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="MOTIONDIALER.HOPPERWIDGET">Hoppers</span>\n                            <div flex></div>\n                            <md-button class="md-icon-button" ng-click="vm_hs.init(vm.queueCampaign)" aria-label="refresh Hopper" translate translate-attr-label="MOTIONDIALER.REFRESH_HOPPERS">\n                                <md-icon md-font-icon="icon-refresh"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    \x3c!-- WIDGET GROUP --\x3e\n                    <div class="widget-group" layout="row" flex="100" layout-wrap>\n\n                        \x3c!-- WIDGET 1 --\x3e\n                        <ms-widget class="h-140" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="25">\n\n                            \x3c!-- Front --\x3e\n                            <ms-widget-front class="p-16 white-bg" layout="row" flex>\n                                <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                    <div class="md-display-1 pb-8">{{(vm_hs.total || 0) + (vm_hs.closed || 0)}}</div>\n                                    <div class="font-weight-500 secondary-text">{{ \'MOTIONDIALER.TOTAL\' | translate }}</div>\n                                </div>\n                            </ms-widget-front>\n                            \x3c!-- / Front --\x3e\n\n                        </ms-widget>\n                        \x3c!-- / WIDGET 1 --\x3e\n\n                        \x3c!-- WIDGET 2 --\x3e\n                        <ms-widget class="h-140" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="25">\n\n                            \x3c!-- Front --\x3e\n                            <ms-widget-front class="p-16 white-bg" layout="row" flex>\n                                <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                    <div class="md-display-1 pb-8">{{vm_hs.fresh || 0}} ({{vm_hs.total ? ((((vm_hs.fresh || 0) * 100)/((vm_hs.closed || 0) + (vm_hs.total || 0))) | number: 2) : 0}}%)</div>\n                                    <div class="font-weight-500 secondary-text">{{ \'MOTIONDIALER.FRESH\' | translate }}</div>\n                                </div>\n                            </ms-widget-front>\n                            \x3c!-- / Front --\x3e\n\n                        </ms-widget>\n                        \x3c!-- / WIDGET 2 --\x3e\n\n                        \x3c!-- WIDGET 3 --\x3e\n                        <ms-widget class="h-140" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="25">\n\n                            \x3c!-- Front --\x3e\n                            <ms-widget-front class="p-16 white-bg" layout="row" flex>\n                                <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                    <div class="md-display-1 pb-8">{{vm_hs.total ? (vm_hs.total - (vm_hs.fresh || 0)) : 0}} ({{vm_hs.total ? ((((vm_hs.total - (vm_hs.fresh || 0)) * 100)/((vm_hs.closed || 0) + (vm_hs.total || 0))) | number: 2) : 0}}%)</div>\n                                    <div class="font-weight-500 secondary-text">{{ \'MOTIONDIALER.OPEN\' | translate }}</div>\n                                </div>\n                            </ms-widget-front>\n                            \x3c!-- / Front --\x3e\n\n                        </ms-widget>\n                        \x3c!-- / WIDGET 3 --\x3e\n\n                        \x3c!-- WIDGET 3 --\x3e\n                        <ms-widget class="h-140" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="25">\n\n                            \x3c!-- Front --\x3e\n                            <ms-widget-front class="p-16 white-bg" layout="row" flex>\n                                <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                    <div class="md-display-1 pb-8">{{vm_hs.closed ? (vm_hs.closed || 0) : 0}} ({{vm_hs.closed ? ((((vm_hs.closed) * 100)/(vm_hs.closed + (vm_hs.total || 0))) | number: 2) : 0}}%)</div>\n                                    <div class="font-weight-500 secondary-text">{{ \'MOTIONDIALER.CLOSED\' | translate }}</div>\n                                </div>\n                            </ms-widget-front>\n                            \x3c!-- / Front --\x3e\n\n                        </ms-widget>\n                        \x3c!-- / WIDGET 3 --\x3e\n\n                    </div>\n                    \x3c!-- / WIDGET GROUP --\x3e\n                </div>\n\n            </div>\n            <div class="queueCampaign-detail-form-container hoppers md-background-bg md-whiteframe-1dp">\n                <div ng-controller="QueueCampaignHoppersController as vm_dc" ng-init="vm_dc.init(vm.queueCampaign)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedQueueCampaignHoppers.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="MOTIONDIALER.HOPPERS">Hoppers</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                            <md-button class="md-icon-button" ng-click="vm_dc.getQueueCampaignHoppers()" aria-label="refresh Hoppers" translate translate-attr-label="MOTIONDIALER.REFRESH_HOPPERS">\n                                <md-icon md-font-icon="icon-refresh"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedQueueCampaignHoppers.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedQueueCampaignHoppers.length}} {{vm_dc.selectedQueueCampaignHoppers.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedQueueCampaignHoppers" csv-label="true" filename="queueCampaigns.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                            <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedQueueCampaignHoppers($event)" aria-label="delete selected" translate translate-attr-label="QUEUECAMPAIGNS.DELETE_SELECTED">\n                                <md-icon md-font-icon="icon-delete"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedQueueCampaignHoppers" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getQueueCampaignHoppers">\n                                <tr md-row>\n                                    <th md-column md-order-by="ContactId">{{ \'MOTIONDIALER.CONTACTID\' | translate }}</th>\n                                    <th md-column md-order-by="phone">{{ \'MOTIONDIALER.PHONE\' | translate }}</th>\n                                    <th md-column md-order-by="countcongestionretry">{{ \'MOTIONDIALER.CONGESTION\' | translate }}</th>\n                                    <th md-column md-order-by="countbusyretry">{{ \'MOTIONDIALER.BUSY\' | translate }}</th>\n                                    <th md-column md-order-by="countnoanswerretry">{{ \'MOTIONDIALER.NOANSWER\' | translate }}</th>\n                                    <th md-column md-order-by="scheduledat">{{ \'MOTIONDIALER.SCHEDULEDAT\' | translate }}</th>\n                                    <th md-column md-order-by="priority">{{ \'MOTIONDIALER.PRIORITY\' | translate }}</th>\n                                    <th md-column md-order-by="recallme">{{ \'MOTIONDIALER.RECALLAGENT\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="hopper" md-select-id="id" ng-repeat="hopper in vm_dc.queueCampaignHoppers.rows">\n                                    <td ng-click="vm_dc.createOrEditQueueCampaignHopper($event, hopper)" md-cell>{{hopper.ContactId}}</td>\n                                    <td ng-click="vm_dc.createOrEditQueueCampaignHopper($event, hopper)" md-cell>{{hopper.phone}}</td>\n                                    <td ng-click="vm_dc.createOrEditQueueCampaignHopper($event, hopper)" md-cell>{{hopper.countcongestionretry}}</td>\n                                    <td ng-click="vm_dc.createOrEditQueueCampaignHopper($event, hopper)" md-cell>{{hopper.countbusyretry}}</td>\n                                    <td ng-click="vm_dc.createOrEditQueueCampaignHopper($event, hopper)" md-cell>{{hopper.countnoanswerretry}}</td>\n                                    <td ng-click="vm_dc.createOrEditQueueCampaignHopper($event, hopper)" md-cell>{{hopper.scheduledat | date:\'medium\'}}</td>\n                                    <td ng-click="vm_dc.createOrEditQueueCampaignHopper($event, hopper)" md-cell>{{ vm_dc.arraypriority[hopper.priority].option }}</td>\n                                    <td ng-click="vm_dc.createOrEditQueueCampaignHopper($event, hopper)" md-cell class="recallme ">\n                                        <md-icon md-colors="{color: {{hopper.recallme ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{hopper.recallme? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                    </td>\n                                    <td md-cell class="actions">\n                                        <md-menu>\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MOTIONDIALER.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_dc.createOrEditQueueCampaignHopper($event, hopper)" translate="MOTIONDIALER.EDIT_HOPPER">\n                                                        Edit Hopper\n                                                    </md-button>\n                                                </md-menu-item>\n                                                <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                    <md-button ng-click="vm_dc.deleteConfirm(hopper, $event)" translate="MOTIONDIALER.DELETE_HOPPER">\n                                                        Delete Hopper\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.queueCampaignHoppers.rows.length">\n                                    <td md-cell colspan="12">\n                                        <span class="text-boxed-ligth" translate="MOTIONDIALER.NO_HOPPER_AVAILABLE">No hopper available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                        md-page="vm_dc.query.page" md-total="{{vm_dc.queueCampaignHoppers.count}}" md-on-paginate="vm_dc.getQueueCampaignHoppers" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="MOTIONDIALER.HISTORY">HISTORY</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="queueCampaign-detail-form-container hopperhistories md-background-bg md-whiteframe-1dp">\n                <div ng-controller="QueueCampaignHopperHistoriesController as vm_dc" ng-init="vm_dc.init(vm.queueCampaign)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedQueueCampaignHopperHistories.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="MOTIONDIALER.HOPPERHISTORIES">HopperHistories</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                            <md-button class="md-icon-button" ng-click="vm_dc.getQueueCampaignHopperHistories()" aria-label="refresh HopperHistories" translate translate-attr-label="MOTIONDIALER.REFRESH_HOPPERHISTORIES">\n                                <md-icon md-font-icon="icon-refresh"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedQueueCampaignHopperHistories.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedQueueCampaignHopperHistories.length}} {{vm_dc.selectedQueueCampaignHopperHistories.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedQueueCampaignHopperHistories" csv-label="true" filename="queueCampaigns.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedQueueCampaignHopperHistories" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getQueueCampaignHopperHistories">\n                                <tr md-row>\n                                    <th md-column md-order-by="uniqueid">{{ \'MOTIONDIALER.UNIQUEID\' | translate }}</th>\n                                    <th md-column md-order-by="ContactId">{{ \'MOTIONDIALER.CONTACTID\' | translate }}</th>\n                                    <th md-column md-order-by="calleridnum">{{ \'MOTIONDIALER.PHONE\' | translate }}</th>\n                                    <th md-column md-order-by="calleridname">{{ \'MOTIONDIALER.NAME\' | translate }}</th>\n                                    <th md-column md-order-by="statedesc">{{ \'MOTIONDIALER.STATUS\' | translate }}</th>\n                                    <th md-column md-order-by="scheduledat">{{ \'MOTIONDIALER.SCHEDULEDAT\' | translate }}</th>\n                                    <th md-column md-order-by="starttime">{{ \'MOTIONDIALER.STARTTIME\' | translate }}</th>\n                                    <th md-column md-order-by="endtime">{{ \'MOTIONDIALER.ENDTIME\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="hopperHistory" md-select-id="id" ng-repeat="hopperHistory in vm_dc.queueCampaignHopperHistories.rows">\n                                    <td md-cell>{{hopperHistory.uniqueid}}</td>\n                                    <td md-cell>{{hopperHistory.ContactId}}</td>\n                                    <td md-cell>{{hopperHistory.calleridnum}}</td>\n                                    <td md-cell>{{hopperHistory.calleridname}}</td>\n                                    <td md-cell>{{hopperHistory.statedesc}}</td>\n                                    <td md-cell>{{hopperHistory.scheduledat | date:\'medium\'}}</td>\n                                    <td md-cell>{{hopperHistory.starttime | date:\'medium\'}}</td>\n                                    <td md-cell>{{hopperHistory.endtime | date:\'medium\'}}</td>\n                                    <td md-cell class="actions">\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.queueCampaignHopperHistories.rows.length">\n                                    <td md-cell colspan="11">\n                                        <span class="text-boxed-ligth" translate="MOTIONDIALER.NO_HOPPERHISTORY_AVAILABLE">No hopperhistory available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                        md-page="vm_dc.query.page" md-total="{{vm_dc.queueCampaignHopperHistories.count}}" md-on-paginate="vm_dc.getQueueCampaignHopperHistories" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="MOTIONDIALER.FINAL">FINAL</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="queueCampaign-detail-form-container hopperfinals md-background-bg md-whiteframe-1dp">\n                <div ng-controller="QueueCampaignHopperFinalsController as vm_dc" ng-init="vm_dc.init(vm.queueCampaign)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedQueueCampaignHopperFinals.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="MOTIONDIALER.HOPPERFINALS">HopperFinals</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                            <md-button class="md-icon-button" ng-click="vm_dc.getQueueCampaignHopperFinals()" aria-label="refresh HopperFinals" translate translate-attr-label="MOTIONDIALER.REFRESH_HOPPERFINALS">\n                                <md-icon md-font-icon="icon-refresh"></md-icon>\n                            </md-button>\n                            <td md-cell class="actions">\n                                <md-menu>\n                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MOTIONDIALER.MORE" ng-click="vm_dc.countContactsQueueCampaignHopperFinal(vm_dc.query.id); $mdOpenMenu($event);">\n                                        <md-icon md-font-icon="icon-backup-restore"></md-icon>\n                                        <md-tooltip><span translate="MOTIONDIALER.RESTORECONTACTS"></span></md-tooltip>\n                                    </md-button>\n                                    <md-menu-content width="3">\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsQueueCampaignHopperFinal(3)">\n                                                <span translate="MOTIONDIALER.NOANSWER ">NoAnswer</span>\n                                                <span class="badge">({{vm_dc.contacts.noAnswerContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsQueueCampaignHopperFinal(5)">\n                                                <span translate="MOTIONDIALER.BUSY ">Busy</span>\n                                                <span class="badge">({{vm_dc.contacts.busyContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsQueueCampaignHopperFinal(8)">\n                                                <span translate="MOTIONDIALER.CONGESTION ">Congestion</span>\n                                                <span class="badge">({{vm_dc.contacts.congestionContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsQueueCampaignHopperFinal(10)">\n                                                <span translate="MOTIONDIALER.DROPPED ">Drop</span>\n                                                <span class="badge">({{vm_dc.contacts.dropContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsQueueCampaignHopperFinal(11)">\n                                                <span translate="MOTIONDIALER.ABANDONED ">Abandoned</span>\n                                                <span class="badge">({{vm_dc.contacts.abandonedContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsQueueCampaignHopperFinal(22)">\n                                                <span translate="MOTIONDIALER.RECALLFAILEDTIMEOUT">Recall</span>\n                                                <span class="badge">({{vm_dc.contacts.reCallContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsQueueCampaignHopperFinal(0)">\n                                                <span translate="MOTIONDIALER.NO_SUCH_NUMBER">NoSuchNumber</span>\n                                                <span class="badge">({{vm_dc.contacts.noSuchContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </td>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedQueueCampaignHopperFinals.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedQueueCampaignHopperFinals.length}} {{vm_dc.selectedQueueCampaignHopperFinals.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedQueueCampaignHopperFinals" csv-label="true" filename="queueCampaigns.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                            <md-button class="md-icon-button" ng-click="vm_dc.moveSelectedQueueCampaignHopperFinals($event)" aria-label="move selected" translate translate-attr-label="QUEUECAMPAIGNS.MOVE_SELECTED">\n                                <md-icon md-font-icon="icon-restore"></md-icon>\n                                <md-tooltip><span translate="MOTIONDIALER.RESTORECONTACTS"></span></md-tooltip>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedQueueCampaignHopperFinals" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getQueueCampaignHopperFinals">\n                                <tr md-row>\n                                    <th md-column md-order-by="uniqueid">{{ \'MOTIONDIALER.UNIQUEID\' | translate }}</th>\n                                    <th md-column md-order-by="ContactId">{{ \'MOTIONDIALER.CONTACTID\' | translate }}</th>\n                                    <th md-column md-order-by="calleridnum">{{ \'MOTIONDIALER.PHONE\' | translate }}</th>\n                                    <th md-column md-order-by="calleridname">{{ \'MOTIONDIALER.NAME\' | translate }}</th>\n                                    <th md-column md-order-by="statedesc">{{ \'MOTIONDIALER.STATUS\' | translate }}</th>\n                                    <th md-column md-order-by="countcongestionretry">{{ \'MOTIONDIALER.CONGESTION\' | translate }}</th>\n                                    <th md-column md-order-by="countbusyretry">{{ \'MOTIONDIALER.BUSY\' | translate }}</th>\n                                    <th md-column md-order-by="countnoanswerretry">{{ \'MOTIONDIALER.NOANSWER\' | translate }}</th>\n                                    <th md-column md-order-by="starttime">{{ \'MOTIONDIALER.STARTTIME\' | translate }}</th>\n                                    <th md-column md-order-by="endtime">{{ \'MOTIONDIALER.ENDTIME\' | translate }}</th>\n                                    <th md-column md-order-by="disposition">{{ \'MOTIONDIALER.DISPOSITION\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="hopperFinal" md-select-id="id" ng-repeat="hopperFinal in vm_dc.queueCampaignHopperFinals.rows">\n                                    <td md-cell>{{hopperFinal.uniqueid}}</td>\n                                    <td md-cell>{{hopperFinal.ContactId}}</td>\n                                    <td md-cell>{{hopperFinal.calleridnum}}</td>\n                                    <td md-cell>{{hopperFinal.calleridname}}</td>\n                                    <td md-cell>{{hopperFinal.statedesc}}</td>\n                                    <td md-cell>{{hopperFinal.countcongestionretry}}</td>\n                                    <td md-cell>{{hopperFinal.countbusyretry}}</td>\n                                    <td md-cell>{{hopperFinal.countnoanswerretry}}</td>\n                                    <td md-cell>{{hopperFinal.starttime | date:\'medium\'}}</td>\n                                    <td md-cell>{{hopperFinal.endtime | date:\'medium\'}}</td>\n                                    <td md-cell>{{hopperFinal.disposition}}</td>\n                                    <td md-cell class="actions">\n                                        <md-menu>\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MOTIONDIALER.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_dc.moveConfirm(hopperFinal, $event)" translate="MOTIONDIALER.MOVE_HOPPERFINAL">\n                                                        Move HopperFinal\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.queueCampaignHopperFinals.rows.length">\n                                    <td md-cell colspan="23">\n                                        <span class="text-boxed-ligth" translate="MOTIONDIALER.NO_HOPPERFINAL_AVAILABLE">No hopperfinal available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                        md-page="vm_dc.query.page" md-total="{{vm_dc.queueCampaignHopperFinals.count}}" md-on-paginate="vm_dc.getQueueCampaignHopperFinals" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="MOTIONDIALER.BLACKLIST">BLACKLIST</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="queueCampaign-detail-form-container hopperblacks md-background-bg md-whiteframe-1dp">\n                <div ng-controller="QueueCampaignHopperBlacksController as vm_dc" ng-init="vm_dc.init(vm.queueCampaign)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedQueueCampaignHopperBlacks.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="MOTIONDIALER.HOPPERBLACKS">HopperBlacks</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedQueueCampaignHopperBlacks.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedQueueCampaignHopperBlacks.length}} {{vm_dc.selectedQueueCampaignHopperBlacks.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedQueueCampaignHopperBlacks" csv-label="true" filename="queueCampaigns.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedQueueCampaignHopperBlacks" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getQueueCampaignHopperBlacks">\n                                <tr md-row>\n                                    <th md-column md-order-by="ContactId">{{ \'MOTIONDIALER.CONTACTID\' | translate }}</th>\n                                    <th md-column md-order-by="phone">{{ \'MOTIONDIALER.PHONE\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="hopperBlack" md-select-id="id" ng-repeat="hopperBlack in vm_dc.queueCampaignHopperBlacks.rows">\n                                    <td md-cell>{{hopperBlack.ContactId}}</td>\n                                    <td md-cell>{{hopperBlack.phone}}</td>\n                                    <td md-cell class="actions">\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.queueCampaignHopperBlacks.rows.length">\n                                    <td md-cell colspan="4">\n                                        <span class="text-boxed-ligth" translate="MOTIONDIALER.NO_HOPPERBLACK_AVAILABLE">No hopperblack available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                        md-page="vm_dc.query.page" md-total="{{vm_dc.queueCampaignHopperBlacks.count}}" md-on-paginate="vm_dc.getQueueCampaignHopperBlacks" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    </md-tabs>\n\n</div>\n\x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/motiondialer/views/queueCampaigns/queueCampaigns.html",'<div id="queueCampaigns" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-fire" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="MOTIONDIALER.QUEUECAMPAIGNS">QueueCampaigns</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="MOTIONDIALER.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedQueueCampaigns.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedQueueCampaigns =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="MOTIONDIALER.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-queueCampaigns-count">\n                    <span>{{vm.selectedQueueCampaigns.length}}</span>\n                <span translate="MOTIONDIALER.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="QUEUECAMPAIGNS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllQueueCampaigns()" translate="MOTIONDIALER.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectQueueCampaigns()" translate="MOTIONDIALER.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedQueueCampaigns" csv-label="true" filename="queueCampaigns.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedQueueCampaigns($event)" aria-label="delete selected" translate translate-attr-label="QUEUECAMPAIGNS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- QUEUECAMPAIGN TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedQueueCampaigns" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getQueueCampaigns">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'MOTIONDIALER.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'MOTIONDIALER.NAME\' | translate }}</th>\n                                <th md-column md-order-by="dialActive">{{ \'MOTIONDIALER.ACTIVE\' | translate }}</th>\n                                <th md-column md-order-by="TrunkId">{{ \'MOTIONDIALER.TRUNK\' | translate }}</th>\n                                <th md-column md-order-by="dialMethod">{{ \'MOTIONDIALER.METHOD\' | translate }}</th>\n                                <th md-column md-order-by="strategy">{{ \'MOTIONDIALER.STRATEGY\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.queueCampaigns.rows.length">\n                                <td md-cell colspan="7">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="MOTIONDIALER.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="queueCampaign" md-select-id="id" ng-repeat="queueCampaign in vm.queueCampaigns.rows">\n                                <td md-cell ng-if="queueCampaign.userpic"><img class="avatar" alt="{{queueCampaign.name}}" ng-src="api/users/{{queueCampaign.id}}/avatar" /></td>\n                                <td md-cell ng-if="!queueCampaign.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{queueCampaign.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditQueueCampaign($event, queueCampaign)" md-cell class="id ">{{queueCampaign.id}}</td>\n                                <td ng-click="vm.createOrEditQueueCampaign($event, queueCampaign)" md-cell class="name ">{{queueCampaign.name}}</td>\n                                <td ng-click="vm.createOrEditQueueCampaign($event, queueCampaign)" md-cell class="dialActive ">\n                                    <md-icon md-colors="{color: {{queueCampaign.dialActive ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{queueCampaign.dialActive ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                </td>\n                                <td ng-click="vm.createOrEditQueueCampaign($event, queueCampaign)" md-cell class="TrunkId ">{{ TrunkId = vm.trunks[queueCampaign.TrunkId]; TrunkId.name }}</td>\n                                <td ng-click="vm.createOrEditQueueCampaign($event, queueCampaign)" md-cell class="dialMethod ">{{ vm.arraydialMethod[queueCampaign.dialMethod].option }}</td>\n                                <td ng-click="vm.createOrEditQueueCampaign($event, queueCampaign)" md-cell class="strategy ">{{ vm.arraystrategy[queueCampaign.strategy].option }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MOTIONDIALER.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(queueCampaign, $event)" translate="MOTIONDIALER.EDIT_QUEUECAMPAIGN">\n                                                    Edit QueueCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.listadddialog(queueCampaign, $event)" translate="MOTIONDIALER.LISTADD_QUEUECAMPAIGN">\n                                                    listadd QueueCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.blacklistadddialog(queueCampaign, $event)" translate="MOTIONDIALER.BLACKLISTADD_QUEUECAMPAIGN">\n                                                    blacklistadd QueueCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.teamadddialog(queueCampaign, $event)" translate="MOTIONDIALER.TEAMADD_QUEUECAMPAIGN">\n                                                    teamadd QueueCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.agentadddialog(queueCampaign, $event)" translate="MOTIONDIALER.AGENTADD_QUEUECAMPAIGN">\n                                                    agentadd QueueCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(queueCampaign, $event)" translate="MOTIONDIALER.DELETE_QUEUECAMPAIGN">\n                                                    Delete QueueCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(queueCampaign, $event)" translate="MOTIONDIALER.GOTOREALTIME_QUEUECAMPAIGN">\n                                                    goToRealtime QueueCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.queueCampaigns.count}}" md-on-paginate="vm.getQueueCampaigns" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / QUEUECAMPAIGN TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD QUEUECAMPAIGN BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-queueCampaign-button" ng-click="vm.createOrEditQueueCampaign($event)" aria-label="add queueCampaign" translate translate-attr-aria-label="MOTIONDIALER.ADD_QUEUECAMPAIGN">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD QUEUECAMPAIGN BUTTON --\x3e\n</div>'),e.put("app/main/apps/motiondialer/views/realtime/abandonedcalls/view.html",'<md-toolbar class="md-table-toolbar md-default table-header">\n    <div class="md-toolbar-tools" layout="row" layout-align="center center">\n        <span class="md-subhead" translate="DASHBOARDS.ABANDONEDQUEUECALLS">ABANDONED QUEUE CALLS</span>\n        <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n        <div flex></div>\n        <div class="padding-horizontal-20" layout="column" layout-align="center center">\n            <span class="font-size-10" translate="DASHBOARDS.SELECT_DATE">Select a date</span>\n            <div layout="row" layout-align="center center">\n                <md-button ng-if="vm.pickerModel.dateStart" ng-click="vm.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                    <md-tooltip>{{ \'DASHBOARDS.DELETE\' | translate }}</md-tooltip>\n                    <md-icon md-font-icon="icon-close" class="s16 black-fg"></md-icon>\n                </md-button>\n                <md-date-range localization-map="vm.localizationMap" ng-model="vm.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm.getContacts()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n            </div>\n        </div>\n        <div class="padding-horizontal-20" layout="column">\n            <span class="font-size-10" translate="DASHBOARDS.SELECT_AGENT">Select an agent</span>\n            <md-select class="font-size-12 no-margin" ng-model="vm.query.lastAssignedTo" ng-change="vm.getContacts()">\n                <md-option ng-value="\'null\'" translate="DASHBOARDS.NOT_ASSIGNED"></md-option>\n                <md-option ng-value="undefined" translate="DASHBOARDS.ALL"></md-option>\n                <md-option ng-value="agent.name" ng-repeat="agent in vm.agents.rows">{{agent.name}}</md-option>\n            </md-select>\n        </div>\n        <div ng-if="vm.queues.count" layout="column">\n            <span class="font-size-10" translate="DASHBOARDS.SELECT_CAMPAIGN">Select a Campaign</span>\n            <md-select class="font-size-12 no-margin" ng-model="vm.query.queue" ng-change="vm.getContacts()">\n                <md-option ng-value="undefined" ng-if="vm.queues.count > 1"><em translate="DASHBOARDS.ALL">All</em></md-option>\n                <md-option ng-value="queue.name" ng-repeat="queue in vm.queues.rows">{{queue.name}}</md-option>\n            </md-select>\n        </div>\n        <md-button class="md-icon-button" ng-click="vm.refresh && vm.refreshContacts($event)" aria-label="refresh Contacts" translate translate-attr-label="DASHBOARDS.REFRESH_CONTACTS">\n            <md-icon md-font-icon="icon-reload"></md-icon>\n            <md-tooltip ng-if="vm.showTooltip" md-visible="vm.showTooltip">{{\'DASHBOARDS.CLICKRELOAD\' | translate}}</md-tooltip>\n        </md-button>\n    </div>\n</md-toolbar>\n<md-table-container>\n    <table md-table md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getContacts">\n            <tr md-row>\n                <th md-column md-order-by="id">ID</th>\n                <th md-column md-order-by="calleridname">{{\'DASHBOARDS.FULLNAME\' | translate}}</th>\n                <th md-column md-order-by="calleridnum">{{\'DASHBOARDS.PHONE\' | translate}}</th>\n                <th md-column md-order-by="queue">{{\'DASHBOARDS.QUEUE\' | translate}}</th>\n                <th md-column md-order-by="queuecallerabandonAt">{{\'DASHBOARDS.ABANDONAT\' | translate}}</th>\n                <th md-column md-order-by="queuecallerexitAt">{{\'DASHBOARDS.QUEUECALLEREXITAT\' | translate}}</th>\n                <th md-column md-order-by="queuecallerexitreason">{{\'DASHBOARDS.QUEUECALLEREXITREASON\' | translate}}</th>\n                <th md-column md-order-by="lastAssignedTo">{{\'DASHBOARDS.LASTASSIGNEDTO\' | translate}}</th>\n                <th md-column md-order-by="disposition">{{\'DASHBOARDS.DISPOSITION\' | translate}}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.contacts.rows.length">\n                <td md-cell colspan="10">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row ng-repeat="contact in vm.contacts.rows">\n                <td md-cell class="id">{{contact.id}}</td>\n                <td md-cell class="firstName">{{contact.calleridname}}</td>\n                <td md-cell class="list">{{contact.calleridnum}}</td>\n                <td md-cell class="list">{{vm.queuesMap[contact.queue]}}</td>\n                <td md-cell class="list">{{contact.queuecallerabandonAt ? (contact.queuecallerabandonAt | formatdate) : undefined }}</td>\n                <td md-cell class="list">{{contact.queuecallerexitAt ? (contact.queuecallerexitAt | formatdate) : undefined }}</td>\n                <td md-cell class="list">{{contact.queuecallerexitreason}}</td>\n                <td md-cell class="list">{{contact.lastAssignedTo}}</td>\n                <td md-cell class="list">{{contact.disposition}}</td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="2">\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="DASHBOARDS.ASSIGNTO">Assigned a</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item ng-if="contact.lastAssignedTo">\n                                            <md-button ng-click="vm.assignedA(contact)"><em translate="DASHBOARDS.NONE">Not Assigned</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.agents.rows.length" ng-repeat="agent in vm.agents.rows">\n                                            <md-button ng-click="vm.assignedA(contact,agent)">{{agent.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="DASHBOARDS.DISPOSE">Dispose</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, null)"><em translate="DASHBOARDS.NONE">NONE</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'fax\')"><em translate="DASHBOARDS.FAX">FAX</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'Answer Machine\')"><em translate="DASHBOARDS.ANSWER_MACHINE">ANSWER_MACHINE</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'Interested\')"><em translate="DASHBOARDS.INTERESTED">INTERESTED</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'Not Interested\')"><em translate="DASHBOARDS.NOT_INTERESTED">NOT_INTERESTED</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'Sold\')"><em translate="DASHBOARDS.SOLD">SOLD</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'Special\')"><em translate="DASHBOARDS.SPECIAL">SPECIAL</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.disposition.length" ng-repeat="disposition in vm.disposition">\n                                            <md-button ng-click="vm.disposed(contact, disposition.name)">{{disposition.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.contacts.count}}" md-on-paginate="vm.getContacts" md-page-select></md-table-pagination>'),e.put("app/main/apps/motiondialer/views/realtime/agents/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="MOTIONDIALER.AGENTS">Agents</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query; vm.onInit()" on-collapse="vm.query.filter = undefined; vm.onInit()" debounce="300"></ms-search-bar>\n        \x3c!-- <md-button class="md-icon-button" ng-click="vm.showInfo($event)">\n      <i class="icon-information-outline grey-600-fg">\n        <md-tooltip>{{\'VOICE.INFO\' | translate}}</md-tooltip>\n      </i>\n    </md-button> --\x3e\n        <md-select ng-model="vm.query.globalStatusFilter" class="md-caption" ng-change="vm.query.pauseTypeFilter = \'\'; vm.onInit()">\n            <md-option ng-value="\'\'">{{ \'MOTIONDIALER.ALL\' | translate }}</md-option>\n            <md-option value="pause">{{ \'MOTIONDIALER.PAUSE\' | translate }}</md-option>\n            <md-option value="*pause">{{ \'MOTIONDIALER.PARTIALPAUSE\' | translate }}</md-option>\n            <md-option value="busy">{{ \'MOTIONDIALER.BUSY\' | translate }}</md-option>\n            <md-option value="idle">{{ \'MOTIONDIALER.IDLE\' | translate }}</md-option>\n        </md-select>\n\n        <md-select ng-if="vm.isPause(vm.query.globalStatusFilter)" ng-model="vm.query.pauseTypeFilter" class="md-caption" ng-change="vm.onInit()">\n            <md-option ng-value="\'\'">All</md-option>\n            <md-option value="DEFAULT PAUSE">DEFAULT PAUSE</md-option>\n            <md-option value="ACW">ACW</md-option>\n            <md-option value="LOGININPAUSE">LOGININPAUSE</md-option>\n            <md-option value="Auto-Pause">AUTOPAUSE</md-option>\n            <md-option ng-value="pause.name" ng-repeat="pause in vm.pauses.rows">{{pause.name}}</md-option>\n        </md-select>\n    </div>\n</md-toolbar>\n\n\x3c!-- AGENT TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.order" md-on-reorder="vm.onInit">\n            <tr md-row border="1">\n                <th class="bv text-center" colspan="3">{{ \'MOTIONDIALER.AGENT\' | translate }}</th>\n                <th class="bv bl text-center" colspan="2">{{ \'VOICE.VOICE\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="bv bl text-center" colspan="2">{{ \'CHAT.CHAT\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="bv bl text-center" colspan="2">{{ \'MAIL.MAIL\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="bv bl text-center" colspan="2">{{ \'SMS.SMS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="bv bl text-center" colspan="2">{{ \'OPENCHANNEL.OPENCHANNEL\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="bv bl text-center" colspan="2">{{ \'FAX.FAX\' | translate }}</th>\n                <th width="10px" class="bt bl" rowspan="2"></th>\n                \x3c!-- <th md-column>{{ \'VOICE.PHONE_STATE\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PHONE_STATUS\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PAUSE\' | translate }}</th>\n                <th md-column width="10px"></th> --\x3e\n            </tr>\n            <tr md-row>\n                <th class="bl" md-column md-order-by="fullname">{{ \'MOTIONDIALER.NAME\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatus">{{ \'MOTIONDIALER.STATUS\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatusTime">{{ \'MOTIONDIALER.TIMER\' | translate }}</th>\n\n                <th class="bl custom-column">{{ \'VOICE.STATUS\' | translate }}</th>\n                <th class="bl custom-column">Info</th>\n\n                <th ng-if="vm.license.chat" class="bl text-center">{{ \'CHAT.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'CHAT.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.mail" class="bl text-center">{{ \'MAIL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'MAIL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.messaging" class="bl text-center">{{ \'SMS.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'SMS.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.openchannel" class="bl text-center">{{ \'OPENCHANNEL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'OPENCHANNEL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.fax" class="bl text-center">{{ \'FAX.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'FAX.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.order.length">\n                <td md-cell colspan="17">\n                    <div layout="row" layout-align="center center">\n                        <span>{{ \'MOTIONDIALER.NO_AGENT_ONLINE\' | translate }}</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-select="vm.agents[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td class="bt padding-5">\n                    <div layout="row" layout-align="start center">\n                        <img class="avatar" ng-src="{{vm.agents[value].userpic && \'api/users/\'+vm.agents[value].id+\'/avatar\' || \'assets/images/avatars/profile.png\'}}">\n                        <div layout="column">\n                            <span>{{vm.agents[value].fullname}}</span>\n                            <span>{{vm.agents[value].internal}}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt">\n                    <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'busy\':\'indigo-100-bg\',\'*pause\':\'amber-50-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].globalStatus]">{{ vm.isPause(vm.agents[value].globalStatus) ? \'\' : vm.agents[value].globalStatus | uppercase }} {{ vm.isPause(vm.agents[value].globalStatus) ? (vm.isPartialPause(vm.agents[value].globalStatus) ? \'*\'+vm.agents[value].pauseType || \'DEFAULT PAUSE\'  : vm.agents[value].pauseType || \'DEFAULT PAUSE\') : \'\'}}</span>\n                </td>\n                <td class="bt custom-column">\n                    <timer start-time="vm.agents[value].globalStatusTime" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                </td>\n                <td class="bt bl">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'talking\':\'indigo-100-bg\',\'ringing\':\'orange-400-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].voiceStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt bl">\n                    <div layout="column">\n                        <span ng-if="vm.agents[value].queue" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].queue }}</span>\n                        <span ng-if="vm.agents[value].destconnectedlinenum" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].destconnectedlinenum }}</span>\n                        <span class="padding-5" ng-if="vm.agents[value].queue || vm.agents[value].destconnectedlinenum">\n                            <timer start-time="vm.agents[value].voiceStatusTime" interval="1000" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                        </span>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt">--</td>\n                <td class="bt">--</td> --\x3e\n                <td class="bt bl" ng-if="vm.license.chat">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt padding-5 text-center">{{ agent.chatCurrentCapacity }}/{{ agent.chatCapacity > 0 ? agent.chatCapacity : \'∞\' }}</td> --\x3e\n                <td md-number class="bt text-center font-size-20" ng-if="vm.license.chat" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.mail">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.mail" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.messaging">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.messaging" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.openchannel">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">4</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">89</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.openchannel" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.fax">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">7</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">2</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.fax" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxCurrentCapacity }}</td>\n                <td class="bl bt padding-5 text-center">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="4">\n                            <md-menu-item>\n                                <md-button ng-click="vm.logout(vm.agents[value], $event)" translate="MOTIONDIALER.LOGOUT">\n                                    Logout\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.queueAdd(vm.agents[value], $event)" translate="MOTIONDIALER.AGENTADD_QUEUE">\n                                    Add Agent In Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="MOTIONDIALER.PAUSE">Pause</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item>\n                                            <md-button ng-disabled=" vm.agents[value].voicePause && \'DEFAULT PAUSE\' === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value])"><em translate="MOTIONDIALER.DEFAULT_PAUSE">Default Pause</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.pauses.rows.length" ng-repeat="pause in vm.pauses.rows">\n                                            <md-button ng-disabled="vm.agents[value].voicePause && pause.name === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value], pause.name)">{{pause.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                            <md-menu-item ng-if="vm.isPause(vm.agents[value].globalStatus)">\n                                <md-button ng-click="vm.unPause(vm.agents[value])" translate="MOTIONDIALER.UNPAUSE">\n                                    Unpause\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n    md-page="vm.query.page" md-total="{{vm.filteredAgents.length}}" md-on-paginate="vm.onInit" md-page-select></md-table-pagination>\n\x3c!-- / AGENT TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/motiondialer/views/realtime/ivr_campaigns/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="MOTIONDIALER.IVR_CAMPAIGNS">Ivr Campaigns</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUE TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getCampaigns">\n            <tr md-row>\n                <th md-column>{{\'MOTIONDIALER.NAME\' | translate}}</th>\n                <th md-column>{{\'MOTIONDIALER.TOTAL\' | translate}}</th>\n                <th md-column>{{\'MOTIONDIALER.TOTAL_MANAGED\' | translate}}</th>\n                <th md-column>{{\'MOTIONDIALER.LIMITED\' | translate}}</th>\n                <th md-column>{{\'MOTIONDIALER.ORIGINATED\' | translate}}</th>\n                <th md-column>{{\'MOTIONDIALER.MESSAGE\' | translate}}</th>\n                <th md-column>{{\'MOTIONDIALER.CALLYSQUAREPROJECT\' | translate}}</th>\n                <th md-column>{{ \'MOTIONDIALER.TRUNK\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.ACTIVE\' | translate }}</th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.campaigns">\n                <td md-cell colspan="8">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="MOTIONDIALER.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row ng-repeat="(id, campaign) in vm.campaigns">\n                <td md-cell>\n                    <span>{{campaign.name}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{campaign.ivrTotalCallsDays || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{campaign.ivrAnswerCallsDay || 0}} ({{(campaign.ivrTotalCallsDays) ? (campaign.ivrAnswerCallsDay || 0) * 100/(campaign.ivrTotalCallsDays ) : 0 | number:1}}%)</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{campaign.limitCalls || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{campaign.originated || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{campaign.message ? (\'MOTIONDIALER.\'+campaign.message | translate) : \'--\'}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{campaign.dialQueueProject || \'--\'}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{campaign.Trunk ? campaign.Trunk.name : \'--\'}}</span>\n                </td>\n                <td md-cell>\n                    <md-icon md-colors="{color: {{campaign.active ? \'\\\'green\\\'\' : \'\\\'red\\\'\'}}}" md-font-icon="{{campaign.active ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MOTIONDIALER.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="3">\n                            <md-menu-item>\n                                <md-button ng-click="vm.createOrEditIvrCampaign($event, campaign)" translate="MOTIONDIALER.EDIT_CAMPAIGN">\n                                    Edit Campaign\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n    md-page="vm.query.page" md-total="{{vm.count}}" md-on-paginate="vm.getCampaigns" md-page-select></md-table-pagination>\n\x3c!-- / QUEUE TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/motiondialer/views/realtime/queue_calls/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="MOTIONDIALER.QUEUE_CALLS">Queue Calls</span>\n        \x3c!-- <div flex></div>\n    <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar> --\x3e\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUES TABLE --\x3e\n<md-table-container>\n    <table md-table>\n        <thead md-head>\n            <tr md-row>\n                <th md-column width="30px"></th>\n                <th md-column>{{ \'MOTIONDIALER.DID\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.QUEUE\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.CALLER\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.AGENT\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.DURATION\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.getSize(vm.rpcVoiceQueuesChannels)">\n                <td md-cell colspan="6">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="MOTIONDIALER.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row ng-repeat="(key, channel) in vm.rpcVoiceQueuesChannels | limitObjectFromTo: vm.queryChannels.limit:(vm.queryChannels.page - 1) * vm.queryChannels.limit">\n                <td md-cell>\n                    <md-icon ng-if="channel.queuecallerleaveAt" md-font-icon="icon-phone-in-talk green-fg"></md-icon>\n                    <md-icon ng-if="!channel.queuecallerleaveAt" md-font-icon="icon-phone-incoming md-accent"></md-icon>\n                </td>\n                <td md-cell>{{channel.exten}}</td>\n                <td md-cell>{{channel.queue}}</td>\n                <td md-cell>{{channel.calleridnum}}</td>\n                <td md-cell>\n                    <span ng-if="channel.queuecallerleaveAt">\n              {{channel.connectedlinename}}, {{channel.connectedlinenum}}\n              <span class="text-boxed">\n                <timer start-time="channel.queuecallerleaveAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n              </span>\n                    </span>\n                    <span ng-if="!channel.queuecallerleaveAt" class="text-boxed">\n              {{ \'MOTIONDIALER.WAITING_FOR_AGENT\' | translate }}\n              <timer start-time="channel.queuecallerjoinAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n            </span>\n                </td>\n                <td md-cell>\n                    <span class="text-boxed">\n              <timer start-time="channel.queuecallerjoinAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n            </span>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="2">\n                            <md-menu-item>\n                                <md-button ng-click="vm.hangup(channel.uniqueid)" translate="MOTIONDIALER.HANGUP">\n                                    Hangup\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.redirectToNumber($event, channel.uniqueid)" translate="MOTIONDIALER.REDIRECT_TO_NUMBER">\n                                    Number\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" translate="MOTIONDIALER.REDIRECT_TO_AGENT">Redirect to Agent</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item ng-repeat="agent in vm.agents.rows">\n                                            <md-button ng-click="vm.redirectToAgent(channel.uniqueid, agent.name)">{{agent.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n            \x3c!-- <tr md-row ng-repeat="call in vm.calls.rows | filter: vm.query.filter | limitTo: vm.query.limit: (vm.query.page - 1) * vm.query.limit">\n        <td md-cell>\n          <i ng-class="vm.channelStatusClass[call.status.toLowerCase()]"></i>\n        </td>\n        <td md-cell>{{call.exten}}</td>\n        <td md-cell>{{call.queue}}</td>\n        <td md-cell><span ng-if="call.calleridname">{{call.calleridname}}, </span>{{call.calleridnum}}</td>\n        <td md-cell>\n          <span ng-if="call.queuecallerleaveAt">\n            {{call.connectedlinename}}, {{call.connectedlinenum}}\n            <span class="text-boxed">\n              <timer start-time="call.queuecallerleaveAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n            </span>\n          </span>\n          <span ng-if="!call.queuecallerleaveAt" class="text-boxed" translate="MOTIONDIALER.WAITING_FOR_AGENT">\n            Waiting for agent...\n            <span class="text-boxed">\n              <timer start-time="call.queuecallerjoinAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n            </span>\n          </span>\n        </td>\n        <td md-cell>\n          <span class="text-boxed">\n            <timer ng-if="call.queuecallerjoinAt" start-time="call.queuecallerjoinAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n            <span ng-if="call.queuecallercomplete || call.queuecallerabandon || call.queuecallerexit" translate="MOTIONDIALER.CLOSING">Closing</span>\n          </span>\n        </td>\n        <td md-cell class="actions">\n          <md-menu>\n            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n              <md-icon md-font-icon="icon-dots-vertical" ></md-icon>\n            </md-button>\n\n            <md-menu-content width="2">\n              <md-menu-item>\n                <md-button ng-click="vm.hangup(call.uniqueid)" translate="MOTIONDIALER.HANGUP">\n                  Hangup\n                </md-button>\n              </md-menu-item>\n              <md-menu-item>\n                <md-button ng-click="vm.redirectToNumber($event, call.uniqueid)" translate="MOTIONDIALER.REDIRECT_TO_NUMBER">\n                  Number\n                </md-button>\n              </md-menu-item>\n              <md-menu-item>\n                <md-menu>\n                  <md-button ng-click="$mdMenu.open()" translate="MOTIONDIALER.REDIRECT_TO_AGENT">Redirect to Agent</md-button>\n                  <md-menu-content>\n                    <md-menu-item ng-repeat="agent in vm.agents.rows">\n                      <md-button ng-click="vm.redirectToAgent(call.uniqueid, agent.name)">{{agent.name}}</md-button>\n                    </md-menu-item>\n                  </md-menu-content>\n                </md-menu>\n              </md-menu-item>\n            </md-menu-content>\n          </md-menu>\n        </td>\n      </tr> --\x3e\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm.queryChannels.limit" md-page="vm.queryChannels.page" md-limit-options="[10, 15, 20, 50, 100, 250]"\n    md-total="{{vm.getSize(vm.rpcVoiceQueuesChannels)}}" md-page-select></md-table-pagination>\n\x3c!-- / QUEUES TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/motiondialer/views/realtime/queue_params/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="MOTIONDIALER.QUEUE_PARAMETERS">Params</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUE TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getQueues">\n            <tr md-row>\n                <th md-column>{{\' MOTIONDIALER.NAME\' | translate}}</th>\n                <th md-column>{{\' MOTIONDIALER.TOTAL\' | translate}}</th>\n                <th md-column>{{\' MOTIONDIALER.TOTAL_OFFERED\' | translate}}</th>\n                <th md-column>{{\' MOTIONDIALER.MANAGED\' | translate}}</th>\n                <th md-column>{{\' MOTIONDIALER.ABANDONED\' | translate}}</th>\n                <th md-column>{{\' MOTIONDIALER.DROPPED\' | translate}}</th>\n                <th md-column>{{\' MOTIONDIALER.AVG_HOLD_TIME\' | translate}}</th>\n                <th md-column>{{\' MOTIONDIALER.AVG_DURATION\' | translate}}</th>\n                <th md-column>{{\' MOTIONDIALER.AVG_BILLABLE\' | translate}}</th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.queues">\n                <td md-cell colspan="8">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="MOTIONDIALER.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row ng-repeat="(id, queue) in vm.queues">\n                <td md-cell>\n                    <span>{{queue.name}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{(queue.answered + queue.outboundNoAnswerCallsDay + queue.outboundBusyCallsDay + queue.outboundCongestionCallsDay + queue.outboundNoSuchCallsDay + queue.outboundUnknownCallsDay + queue.outboundDropCallsDayTimeout + queue.outboundDropCallsDayCallersExit + queue.outboundBlacklistCallsDay + queue.outboundOriginateFailureCallsDay + queue.outboundAnswerAgiCallsDay + queue.outboundReCallsDay + queue.outboundRejectCallsDay )|| 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{queue.total || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.answered || 0}} ({{(queue.answered) ? (100 - (((queue.outboundDropCallsDayTimeout || 0) * 100/(queue.total)) | number:1 ) - (((queue.outboundDropCallsDayCallersExit || 0) * 100/(queue.total )) | number:1 )  ) : 0 | number:1}}%)</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.outboundDropCallsDayCallersExit || 0}} ({{(queue.outboundDropCallsDayCallersExit) ? (queue.outboundDropCallsDayCallersExit || 0) * 100/(queue.total ) : 0 | number:1}}%)</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.outboundDropCallsDayTimeout || 0}} ({{(queue.outboundDropCallsDayTimeout) ? (queue.outboundDropCallsDayTimeout || 0) * 100/(queue.total) : 0 | number:1}}%)</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.total ? (queue.sumHoldTime / queue.total) : 0 | number: 0 | secToTime | date:\'HH:mm:ss\'}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.total ? (queue.sumDuration / queue.total) : 0 | number: 0 | secToTime | date:\'HH:mm:ss\'}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.answered ? ((queue.sumBillable || 0) / queue.answered) : 0 | number: 0 | secToTime | date:\'HH:mm:ss\'}}</span>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n    md-page="vm.query.page" md-total="{{vm.count}}" md-on-paginate="vm.getQueues" md-page-select></md-table-pagination>\n\x3c!-- / QUEUE TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/motiondialer/views/realtime/queues/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="MOTIONDIALER.QUEUES">Queues</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUE TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getQueues">\n            <tr md-row>\n                <th md-column md-order-by="name">{{ \'MOTIONDIALER.NAME\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.LOGGED_IN\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.PAUSED\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.READY\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.WAITING\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.TALKING\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.ORIGINATED\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.MESSAGE\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.METHOD\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.TRUNK\' | translate }}</th>\n                <th md-column md-order-by="dialActive">{{ \'MOTIONDIALER.ACTIVE\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.queues">\n                <td md-cell colspan="12">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="MOTIONDIALER.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row md-select="vm.queues[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td md-cell>{{vm.queues[value].name}}</td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].loggedInDb || 0}} ({{vm.queues[value].loggedIn || 0}})</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].paused || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].available || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].waiting || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{(vm.queues[value].talking || 0)  +  (vm.queues[value].pTalking || 0)}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].originated || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].message ? (\'MOTIONDIALER.\'+vm.queues[value].message | translate) : \'--\'}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].dialMethod || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].Trunk ? vm.queues[value].Trunk.name : \'--\'}}</span>\n                </td>\n                <td md-cell>\n                    <md-icon md-colors="{color: {{vm.queues[value].dialActive ? \'\\\'green\\\'\' : \'\\\'red\\\'\'}}}" md-font-icon="{{vm.queues[value].dialActive ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MOTIONDIALER.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="3">\n                            <md-menu-item>\n                                <md-button ng-click="vm.createOrEditMotionDialerQueue($event, vm.queues[value])" translate="MOTIONDIALER.EDIT_QUEUE">\n                                    Edit Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.agentAdd($event, vm.queues[value])" translate="MOTIONDIALER.AGENTSADD_QUEUE">\n                                    Add Agents to queue\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n    md-page="vm.query.page" md-total="{{vm.count}}" md-on-paginate="vm.getQueues" md-page-select></md-table-pagination>\n\x3c!-- / QUEUE TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/motiondialer/views/realtime/realtime.html",'<div id="realtime" class="page-layout simple tabbed" layout="column" ng-cloak>\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.AGENTS">Agents</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.QUEUES">Queues</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.QUEUE_CALLS">Queue Calls</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.ABANDONEDCALLS">Abandoned Queue Calls</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.QUEUE_PARAMS">Queue Parameters</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.IVR_CAMPAIGNS">Ivr Campaigns</span>\n                </md-tab-label>\n            </md-tab>\n        </md-tabs>\n\n        <md-card ui-view></md-card>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n</div>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/create/dialog.html",'<md-dialog class="openchannelAccount-dialog" aria-label="New OpenchannelAccount">\n    <form name="openchannelAccountForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.openchannelAccount.name" ng-required="true" autofocus ng-disabled="!vm.newOpenchannelAccount">\n                <div ng-messages="openchannelAccountForm[\'name\'].$error" ng-show="openchannelAccountForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.KEY">key</label>\n                <input type="text" name="key" ng-model="vm.openchannelAccount.key" md-maxlength="5" ng-required="true">\n                <div ng-messages="openchannelAccountForm[\'key\'].$error" ng-show="openchannelAccountForm[\'key\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.KEY_REQUIRED">key field is required</span>\n                    </div>\n\n                    <div ng-message="md-maxlength">\n                        <span translate="OPENCHANNEL.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 5}\'>key must have a maximum length equal to 5</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.REPLYURI">replyUri</label>\n                <input type="url" name="replyUri" ng-model="vm.openchannelAccount.replyUri">\n                <div class="hint"><span translate="OPENCHANNEL.HELP.REPLYURI"></span></div>\n                <div ng-messages="openchannelAccountForm[\'replyUri\'].$error" ng-show="openchannelAccountForm[\'replyUri\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.REPLYURI_REQUIRED">replyUri field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="OPENCHANNEL.ERRORS.REPLYURI_MUST_VALID_URL">replyUri must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.LIST">List</label>\n                <md-select name="ListId" ng-model="vm.openchannelAccount.ListId" required>\n                    <md-option ng-value="ListId.id" ng-repeat="ListId in vm.lists">{{ ListId.name }}</md-option>\n                </md-select>\n                <div class="hint"><span translate="OPENCHANNEL.HELP.LIST"></span></div>\n                <div ng-messages="openchannelAccountForm[\'ListId\'].$error" ng-show="openchannelAccountForm[\'ListId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.LIST_REQUIRED">List field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.openchannelAccount.description">\n                <div ng-messages="openchannelAccountForm[\'description\'].$error" ng-show="openchannelAccountForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newOpenchannelAccount" ng-click="vm.saveOpenchannelAccount()" class="send-button md-accent md-raised" ng-disabled="openchannelAccountForm.$invalid || openchannelAccountForm.$pristine" aria-label="SAVE" translate="OPENCHANNEL.SAVE"\n                    translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newOpenchannelAccount" ng-click="vm.addNewOpenchannelAccount()" class="send-button md-accent md-raised" ng-disabled="openchannelAccountForm.$invalid" aria-label="ADD" translate="OPENCHANNEL.ADD_OPENCHANNELACCOUNT" translate-attr-aria-label="OPENCHANNEL.ADD_OPENCHANNELACCOUNT">\n                    ADD OPENCHANNELACCOUNT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newOpenchannelAccount" ng-click="vm.deleteOpenchannelAccount($event)" aria-label="DELETE" translate translate-attr-aria-label="OPENCHANNEL.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="OPENCHANNEL.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/apps/agent/dialog.html",'<md-dialog class="openchannelAccount-dialog" aria-label="New OpenchannelAccount">\n    <form name="openchannelAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.AGENT">Agent</label>\n                <md-select name="agent" ng-model="vm.agent.agent" required autofocus>\n                    <md-option ng-value="agent.name" ng-repeat="agent in vm.agents">{{ agent.name }}</md-option>\n                </md-select>\n                <div ng-messages="openchannelAccountFormApp[\'agent\'].$error" ng-show="openchannelAccountFormApp[\'agent\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.AGENT_REQUIRED">Agent field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.agent.timeout" min="0" max="2147483" ng-required="true">\n                <div ng-messages="openchannelAccountFormApp[\'timeout\'].$error" ng-show="openchannelAccountFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="OPENCHANNEL.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="OPENCHANNEL.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveOpenchannelAccountApp()" class="send-button md-accent md-raised" ng-disabled="openchannelAccountFormApp.$invalid || openchannelAccountFormApp.$pristine" aria-label="SAVE" translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/apps/autoreply/dialog.html",'<md-dialog class="openchannelAccount-dialog" aria-label="New OpenchannelAccount">\n    <form name="openchannelAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.TIMES">times</label>\n                <md-select name="times" ng-model="vm.autoreply.times" required autofocus>\n                    <md-option ng-value="1">One Time</md-option>\n                    <md-option ng-value="0">Always</md-option>\n                </md-select>\n                <div ng-messages="openchannelAccountFormApp[\'times\'].$error" ng-show="openchannelAccountFormApp[\'times\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.TIMES_REQUIRED">times field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.TEXT">Text</label>\n                <textarea name="text" ng-model="vm.autoreply.text" md-maxlength="255" required></textarea>\n\n                <div ng-messages="openchannelAccountFormApp[\'text\'].$error" ng-show="openchannelAccountFormApp[\'text\'].$touched" role="alert">\n\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.TEXT_REQUIRED">Text field is required</span>\n                    </div>\n\n\n                    <div ng-message="md-maxlength">\n                        <span translate="OPENCHANNEL.ERRORS.TEXT_MAX_LENGTH" translate-values=\'{max: 255}\'>Text must have a maximum length equal to 255</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveOpenchannelAccountApp()" class="send-button md-accent md-raised" ng-disabled="openchannelAccountFormApp.$invalid || openchannelAccountFormApp.$pristine" aria-label="SAVE" translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/apps/close/dialog.html",'<md-dialog class="openchannelAccount-dialog" aria-label="New OpenchannelAccount">\n    <form name="openchannelAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.DISPOSITION">Disposition</label>\n                <input type="text" name="disposition" ng-model="vm.close.disposition" ng-required="true" autofocus>\n                <div ng-messages="openchannelAccountFormApp[\'disposition\'].$error" ng-show="openchannelAccountFormApp[\'disposition\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.DISPOSITION_REQUIRED">Disposition field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveOpenchannelAccountApp()" class="send-button md-accent md-raised" ng-disabled="openchannelAccountFormApp.$invalid || openchannelAccountFormApp.$pristine" aria-label="SAVE" translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/apps/gotoif/dialog.html",'<md-dialog class="openchannelAccount-dialog" aria-label="New OpenchannelAccount">\n    <form name="openchannelAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.CONDITION">Condition</label>\n                <input type="text" name="condition" ng-model="vm.gotoif.condition" ng-required="true" autofocus>\n                <div ng-messages="openchannelAccountFormApp[\'condition\'].$error" ng-show="openchannelAccountFormApp[\'condition\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.CONDITION_REQUIRED">Condition field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.TRUEPRIORITY">truepriority</label>\n                <input type="number" name="truepriority" ng-model="vm.gotoif.truepriority" min="1" ng-required="true">\n                <div ng-messages="openchannelAccountFormApp[\'truepriority\'].$error" ng-show="openchannelAccountFormApp[\'truepriority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.TRUEPRIORITY_REQUIRED">truepriority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="OPENCHANNEL.ERRORS.TRUEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">truepriority must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.FALSEPRIORITY">falsepriority</label>\n                <input type="number" name="falsepriority" ng-model="vm.gotoif.falsepriority" min="1" ng-required="true">\n                <div ng-messages="openchannelAccountFormApp[\'falsepriority\'].$error" ng-show="openchannelAccountFormApp[\'falsepriority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.FALSEPRIORITY_REQUIRED">falsepriority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="OPENCHANNEL.ERRORS.FALSEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">falsepriority must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveOpenchannelAccountApp()" class="send-button md-accent md-raised" ng-disabled="openchannelAccountFormApp.$invalid || openchannelAccountFormApp.$pristine" aria-label="SAVE" translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/apps/gotop/dialog.html",'<md-dialog class="openchannelAccount-dialog" aria-label="New OpenchannelAccount">\n    <form name="openchannelAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.PRIORITY">Priority</label>\n                <input type="number" name="priority" ng-model="vm.gotop.priority" min="0" ng-required="true" autofocus>\n                <div ng-messages="openchannelAccountFormApp[\'priority\'].$error" ng-show="openchannelAccountFormApp[\'priority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.PRIORITY_REQUIRED">Priority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="OPENCHANNEL.ERRORS.PRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Priority must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveOpenchannelAccountApp()" class="send-button md-accent md-raised" ng-disabled="openchannelAccountFormApp.$invalid || openchannelAccountFormApp.$pristine" aria-label="SAVE" translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/apps/interval/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select ng-model="vm.type">\n                    <md-option ng-value="type" ng-repeat=\'type in vm.types\'>{{ type | ucfirst }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.type === \'list\'">\n                <label translate="TOOLS.INTERVALS">Intervals</label>\n                <md-select ng-model="vm.interval.IntervalId">\n                    <md-option ng-value="interval.id" ng-repeat="interval in vm.intervals.rows">{{ interval.name }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            \x3c!-- TIMERANGE START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.TIME_RANGE">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <div class="md-block" flex>\n                    <mdp-time-picker name="timeRangeFrom" mdp-placeholder="FROM" ng-model="vm.timeRangeFrom" mdp-format="HH:mm" mdp-auto-switch="true">\n                        <div ng-messages="intervalForm.timeRangeFrom.$error" ng-show="intervalForm.timeRangeFrom.$touched" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_FROM_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n                <div class="md-block" flex ng-if="vm.timeRangeFrom">\n                    <mdp-time-picker name="timeRangeTo" mdp-placeholder="TO*" ng-model="vm.timeRangeTo" mdp-format="HH:mm" mdp-auto-switch="true" required>\n                        <div ng-messages="intervalForm.timeRangeTo.$error" ng-show="intervalForm.timeRangeTo.$invalid" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_INVALID">Time Range To field is invalid</span>\n                            </div>\n                            <div ng-message="required">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_REQUIRED">Time Range To field is required</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n            \x3c!-- TIMERANGE END --\x3e\n\n            \x3c!-- DAYSOFWEEK START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.WEEK_DAYS">Week Days</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.dayOfWeekFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex class="md-block" ng-if="vm.dayOfWeekFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="dayOfWeekTo" ng-model="vm.dayOfWeekTo">\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.dayOfWeekTo.$error" ng-show="intervalForm.dayOfWeekTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- DAYSOFWEEK END --\x3e\n\n            \x3c!-- MONTHDAY START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTH_DAYS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthDayFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthDayFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthDayTo" ng-model="vm.monthDayTo">\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthDayTo.$error" ng-show="intervalForm.monthDayTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTHDAY END --\x3e\n\n            \x3c!-- MONTH START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTHS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthTo" ng-model="vm.monthTo">\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthTo.$error" ng-show="intervalForm.monthTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTH END --\x3e\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/apps/noop/dialog.html",'<md-dialog class="openchannelAccount-dialog" aria-label="New OpenchannelAccount">\n    <form name="openchannelAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.VALUE">Value</label>\n                <input type="text" name="value" ng-model="vm.noop.value" autofocus>\n                <div ng-messages="openchannelAccountFormApp[\'value\'].$error" ng-show="openchannelAccountFormApp[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveOpenchannelAccountApp()" class="send-button md-accent md-raised" ng-disabled="openchannelAccountFormApp.$invalid || openchannelAccountFormApp.$pristine" aria-label="SAVE" translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/apps/queue/dialog.html",'<md-dialog class="openchannelAccount-dialog" aria-label="New OpenchannelAccount">\n    <form name="openchannelAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.QUEUE">Queue</label>\n                <md-select name="queue" ng-model="vm.queue.queue" required autofocus>\n                    <md-option ng-value="queue.name" ng-repeat="queue in vm.queues">{{ queue.name }}</md-option>\n                </md-select>\n                <div ng-messages="openchannelAccountFormApp[\'queue\'].$error" ng-show="openchannelAccountFormApp[\'queue\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.QUEUE_REQUIRED">Queue field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.queue.timeout" min="0" max="2147483" ng-required="true">\n                <div ng-messages="openchannelAccountFormApp[\'timeout\'].$error" ng-show="openchannelAccountFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="OPENCHANNEL.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="OPENCHANNEL.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveOpenchannelAccountApp()" class="send-button md-accent md-raised" ng-disabled="openchannelAccountFormApp.$invalid || openchannelAccountFormApp.$pristine" aria-label="SAVE" translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/apps/system/dialog.html",'<md-dialog class="openchannelAccount-dialog" aria-label="New OpenchannelAccount">\n    <form name="openchannelAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.COMMAND">Command</label>\n                <input type="text" name="command" ng-model="vm.system.command" ng-required="true" autofocus>\n                <div ng-messages="openchannelAccountFormApp[\'command\'].$error" ng-show="openchannelAccountFormApp[\'command\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.COMMAND_REQUIRED">Command field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.VARIABLE">Variable</label>\n                <md-select name="variable" ng-model="vm.system.variable">\n                    <md-option ng-value="variable.name" ng-repeat="variable in vm.variables">{{ variable.name }}</md-option>\n                    <md-option ng-value="\'\'">None</md-option>\n                </md-select>\n                <div ng-messages="openchannelAccountFormApp[\'variable\'].$error" ng-show="openchannelAccountFormApp[\'variable\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.VARIABLE_REQUIRED">Variable field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveOpenchannelAccountApp()" class="send-button md-accent md-raised" ng-disabled="openchannelAccountFormApp.$invalid || openchannelAccountFormApp.$pristine" aria-label="SAVE" translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/openchannelCannedAnswers/dialog.html",'<md-dialog class="openchannelCannedAnswer-dialog" aria-label="New OpenchannelCannedAnswer">\n    <form name="openchannelCannedAnswerForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.KEY">Key</label>\n                <input type="" name="key" ng-model="vm.openchannelCannedAnswer.key" md-maxlength="255" ng-required="true" autofocus>\n                <div ng-messages="openchannelCannedAnswerForm[\'key\'].$error" ng-show="openchannelCannedAnswerForm[\'key\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.KEY_REQUIRED">Key field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.VALUE">Value</label>\n                <textarea name="value" ng-model="vm.openchannelCannedAnswer.value" required></textarea>\n\n                <div ng-messages="openchannelCannedAnswerForm[\'value\'].$error" ng-show="openchannelCannedAnswerForm[\'value\'].$touched" role="alert">\n\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.openchannelCannedAnswer.description">\n                <div ng-messages="openchannelCannedAnswerForm[\'description\'].$error" ng-show="openchannelCannedAnswerForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newOpenchannelCannedAnswer" ng-click="vm.saveOpenchannelCannedAnswer()" class="send-button md-accent md-raised" ng-disabled="openchannelCannedAnswerForm.$invalid || openchannelCannedAnswerForm.$pristine" aria-label="SAVE"\n                    translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newOpenchannelCannedAnswer" ng-click="vm.addNewOpenchannelCannedAnswer()" class="send-button md-accent md-raised" ng-disabled="openchannelCannedAnswerForm.$invalid" aria-label="ADD" translate="OPENCHANNEL.ADD_OPENCHANNELCANNEDANSWER"\n                    translate-attr-aria-label="OPENCHANNEL.ADD_OPENCHANNELCANNEDANSWER">\n                    ADD OPENCHANNELCANNEDANSWER\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newOpenchannelCannedAnswer" ng-click="vm.deleteOpenchannelCannedAnswer($event)" aria-label="DELETE" translate translate-attr-aria-label="OPENCHANNEL.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="OPENCHANNEL.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/openchannelDispositions/dialog.html",'<md-dialog class="openchannelDisposition-dialog" aria-label="New OpenchannelDisposition">\n    <form name="openchannelDispositionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.openchannelDisposition.name" ng-required="true" autofocus>\n                <div ng-messages="openchannelDispositionForm[\'name\'].$error" ng-show="openchannelDispositionForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newOpenchannelDisposition" ng-click="vm.saveOpenchannelDisposition()" class="send-button md-accent md-raised" ng-disabled="openchannelDispositionForm.$invalid || openchannelDispositionForm.$pristine" aria-label="SAVE"\n                    translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newOpenchannelDisposition" ng-click="vm.addNewOpenchannelDisposition()" class="send-button md-accent md-raised" ng-disabled="openchannelDispositionForm.$invalid" aria-label="ADD" translate="OPENCHANNEL.ADD_OPENCHANNELDISPOSITION"\n                    translate-attr-aria-label="OPENCHANNEL.ADD_OPENCHANNELDISPOSITION">\n                    ADD OPENCHANNELDISPOSITION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newOpenchannelDisposition" ng-click="vm.deleteOpenchannelDisposition($event)" aria-label="DELETE" translate translate-attr-aria-label="OPENCHANNEL.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="OPENCHANNEL.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/view.html",'<div id="openchannel-openchannelAccount" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-openchannelAccounts-button md-icon-button" aria-label="Go to openchannelAccounts" ng-click="vm.gotoOpenchannelAccounts()" translate translate-attr-aria-label="OPENCHANNEL.GO_TO_OPENCHANNELACCOUNTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="openchannelAccount-image" hide-xs>\n                    <img ng-src="assets/images/business/openchannelAccounts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.openchannelAccount.id}}\n                        <span ng-if="vm.openchannelAccount.name">{{vm.openchannelAccount.name}}</span>\n                        <span ng-if="vm.openchannelAccount.exten">{{vm.openchannelAccount.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="OPENCHANNEL.CREATED_AT"></span> <span>{{vm.openchannelAccount.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveOpenchannelAccount()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (notificationForm.$invalid) || (openchannelDispositionsForm.$invalid) || (openchannelCannedAnswersForm.$invalid) || (actionsForm.$invalid) || (interactionsForm.$invalid)"\n                translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="OPENCHANNEL.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="openchannelAccount-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="OPENCHANNEL.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.openchannelAccount.name" ng-required="true" autofocus ng-disabled="true">\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="OPENCHANNEL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.KEY">key</label>\n                                <input type="text" name="key" ng-model="vm.openchannelAccount.key" md-maxlength="5" ng-required="true">\n                                <div ng-messages="generalForm[\'key\'].$error" ng-show="generalForm[\'key\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="OPENCHANNEL.ERRORS.KEY_REQUIRED">key field is required</span>\n                                    </div>\n\n                                    <div ng-message="md-maxlength">\n                                        <span translate="OPENCHANNEL.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 5}\'>key must have a maximum length equal to 5</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.REPLYURI">replyUri</label>\n                                <input type="url" name="replyUri" ng-model="vm.openchannelAccount.replyUri">\n                                <div class="hint"><span translate="OPENCHANNEL.HELP.REPLYURI"></span></div>\n                                <div ng-messages="generalForm[\'replyUri\'].$error" ng-show="generalForm[\'replyUri\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="OPENCHANNEL.ERRORS.REPLYURI_REQUIRED">replyUri field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="OPENCHANNEL.ERRORS.REPLYURI_MUST_VALID_URL">replyUri must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.LIST">List</label>\n                                <md-select name="ListId" ng-model="vm.openchannelAccount.ListId" required>\n                                    <md-option ng-value="ListId.id" ng-repeat="ListId in vm.lists">{{ ListId.name }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="OPENCHANNEL.HELP.LIST"></span></div>\n                                <div ng-messages="generalForm[\'ListId\'].$error" ng-show="generalForm[\'ListId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="OPENCHANNEL.ERRORS.LIST_REQUIRED">List field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.WAITFORTHEASSIGNEDAGENT">WaitForTheAssignedAgent</label>\n                                <input type="number" name="waitForTheAssignedAgent" ng-model="vm.openchannelAccount.waitForTheAssignedAgent" min="1" max="2147483" ng-required="true">\n                                <div ng-messages="generalForm[\'waitForTheAssignedAgent\'].$error" ng-show="generalForm[\'waitForTheAssignedAgent\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="OPENCHANNEL.ERRORS.WAITFORTHEASSIGNEDAGENT_REQUIRED">WaitForTheAssignedAgent field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="OPENCHANNEL.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">WaitForTheAssignedAgent must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="OPENCHANNEL.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_LESS_THAN_OR_EQUAL_TO">WaitForTheAssignedAgent must be a valid greater or equal than</span> <span>2147483</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.openchannelAccount.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="OPENCHANNEL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.RECEIVEURI">receiveUri</label>\n                                <div layout="row" layout-align="center center">\n                                    <button class="md-button md-fab md-mini md-primary" ngclipboard data-clipboard-target="#copytoclipboard-receiveUri" ngclipboard-success="vm.alert({title: \'copied to clipboard\', msg: e.text});" ngclipboard-error="vm.alert({title: \'error\', msg: \'copy to clipboard failed\'});">\n                      <md-icon md-font-icon="icon-clipboard-text"></md-icon>\n                  </button>\n                                    <input class="md-input" type="text" id="copytoclipboard-receiveUri" name="receiveUri" ng-value="vm.location + \'/api/openchannel/accounts/\' + vm.openchannelAccount.id + \'/notify\'" ng-readonly="true">\n                                </div>\n                                <div class="hint"><span translate="OPENCHANNEL.HELP.RECEIVEURI"></span></div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="openchannelAccount-detail-form-container notification md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="OPENCHANNEL.NOTIFICATION">NOTIFICATION</div>\n                        </div>\n                        <form name="notificationForm" novalidate>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.openchannelAccount.notificationSound" aria-label="notificationSound"><span translate="OPENCHANNEL.NOTIFICATIONSOUND">notificationSound</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.openchannelAccount.notificationShake" aria-label="notificationShake"><span translate="OPENCHANNEL.NOTIFICATIONSHAKE">notificationShake</span></md-switch>\n                            </md-input-container>\n                            <div class="md-block">\n                                <label class="md-caption grey-fg" translate="OPENCHANNEL.NOTIFICATIONTEMPLATE">notificationTemplate</label>\n                                <textarea aria-label="notificationTemplate notificationTemplate" ckeditor="{ skin: \'office2013\', language: \'en\', allowedContent: true, extraPlugins: \'font,colorbutton,autoembed,autocorrect,googlethisterm,pastebase64\', toolbarGroups: [{ name: \'styles\', groups: [\'styles\'] }, { name: \'clipboard\', groups: [\'undo\'] }, { name: \'colors\', groups: [\'colors\'] }, { name: \'basicstyles\', groups: [\'basicstyles\'] }, { name: \'paragraph\', groups: [\'list\', \'indent\', \'align\'] }, { name: \'mode\' }], autocorrect_enabled: true, disableNativeSpellChecker: false, removePlugins: \'magicline\' }"\n                                    ng-model="vm.openchannelAccount.notificationTemplate"></textarea>\n                            </div>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="OPENCHANNEL.DISPOSITIONS">DISPOSITIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="openchannelAccount-detail-form-container openchanneldispositions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="OpenchannelAccountOpenchannelDispositionsController as vm_dc" ng-init="vm_dc.init(vm.openchannelAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedOpenchannelAccountOpenchannelDispositions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="OPENCHANNEL.OPENCHANNELDISPOSITIONS">OpenchannelDispositions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelDisposition($event)" aria-label="add openchannelDisposition" translate translate-attr-label="OPENCHANNEL.ADD_OPENCHANNELDISPOSITION">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedOpenchannelAccountOpenchannelDispositions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedOpenchannelAccountOpenchannelDispositions.length}} {{vm_dc.selectedOpenchannelAccountOpenchannelDispositions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedOpenchannelAccountOpenchannelDispositions" csv-label="true" filename="openchannelAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedOpenchannelAccountOpenchannelDispositions($event)" aria-label="delete selected" translate translate-attr-label="OPENCHANNELACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedOpenchannelAccountOpenchannelDispositions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getOpenchannelAccountOpenchannelDispositions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'OPENCHANNEL.ID\' | translate }}</th>\n                                            <th md-column md-order-by="name">{{ \'OPENCHANNEL.NAME\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'OPENCHANNEL.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="openchannelDisposition" md-select-id="id" ng-repeat="openchannelDisposition in vm_dc.openchannelAccountOpenchannelDispositions.rows">\n                                            <td ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelDisposition($event, openchannelDisposition)" md-cell>{{openchannelDisposition.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelDisposition($event, openchannelDisposition)" md-cell>{{openchannelDisposition.name}}</td>\n                                            <td ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelDisposition($event, openchannelDisposition)" md-cell>{{openchannelDisposition.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="OPENCHANNEL.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelDisposition($event, openchannelDisposition)" translate="OPENCHANNEL.EDIT_OPENCHANNELDISPOSITION">\n                                                                Edit OpenchannelDisposition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(openchannelDisposition, $event)" translate="OPENCHANNEL.DELETE_OPENCHANNELDISPOSITION">\n                                                                Delete OpenchannelDisposition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.openchannelAccountOpenchannelDispositions.rows.length">\n                                            <td md-cell colspan="5">\n                                                <span class="text-boxed-ligth" translate="OPENCHANNEL.NO_OPENCHANNELDISPOSITION_AVAILABLE">No openchanneldisposition available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'OPENCHANNEL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'OPENCHANNEL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'OPENCHANNEL.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                                md-page="vm_dc.query.page" md-total="{{vm_dc.openchannelAccountOpenchannelDispositions.count}}" md-on-paginate="vm_dc.getOpenchannelAccountOpenchannelDispositions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="OPENCHANNEL.CANNEDANSWERS">CANNEDANSWERS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="openchannelAccount-detail-form-container openchannelcannedanswers md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="OpenchannelAccountOpenchannelCannedAnswersController as vm_dc" ng-init="vm_dc.init(vm.openchannelAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedOpenchannelAccountOpenchannelCannedAnswers.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="OPENCHANNEL.OPENCHANNELCANNEDANSWERS">OpenchannelCannedAnswers</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelCannedAnswer($event)" aria-label="add openchannelCannedAnswer" translate translate-attr-label="OPENCHANNEL.ADD_OPENCHANNELCANNEDANSWER">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedOpenchannelAccountOpenchannelCannedAnswers.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedOpenchannelAccountOpenchannelCannedAnswers.length}} {{vm_dc.selectedOpenchannelAccountOpenchannelCannedAnswers.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedOpenchannelAccountOpenchannelCannedAnswers" csv-label="true" filename="openchannelAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedOpenchannelAccountOpenchannelCannedAnswers($event)" aria-label="delete selected" translate translate-attr-label="OPENCHANNELACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedOpenchannelAccountOpenchannelCannedAnswers" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getOpenchannelAccountOpenchannelCannedAnswers">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'OPENCHANNEL.ID\' | translate }}</th>\n                                            <th md-column md-order-by="key">{{ \'OPENCHANNEL.KEY\' | translate }}</th>\n                                            <th md-column md-order-by="value">{{ \'OPENCHANNEL.VALUE\' | translate }}</th>\n                                            <th md-column md-order-by="description">{{ \'OPENCHANNEL.DESCRIPTION\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'OPENCHANNEL.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="openchannelCannedAnswer" md-select-id="id" ng-repeat="openchannelCannedAnswer in vm_dc.openchannelAccountOpenchannelCannedAnswers.rows">\n                                            <td ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelCannedAnswer($event, openchannelCannedAnswer)" md-cell>{{openchannelCannedAnswer.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelCannedAnswer($event, openchannelCannedAnswer)" md-cell>{{openchannelCannedAnswer.key}}</td>\n                                            <td ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelCannedAnswer($event, openchannelCannedAnswer)" md-cell>{{openchannelCannedAnswer.value}}</td>\n                                            <td ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelCannedAnswer($event, openchannelCannedAnswer)" md-cell>{{openchannelCannedAnswer.description}}</td>\n                                            <td ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelCannedAnswer($event, openchannelCannedAnswer)" md-cell>{{openchannelCannedAnswer.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="OPENCHANNEL.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelCannedAnswer($event, openchannelCannedAnswer)" translate="OPENCHANNEL.EDIT_OPENCHANNELCANNEDANSWER">\n                                                                Edit OpenchannelCannedAnswer\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(openchannelCannedAnswer, $event)" translate="OPENCHANNEL.DELETE_OPENCHANNELCANNEDANSWER">\n                                                                Delete OpenchannelCannedAnswer\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.openchannelAccountOpenchannelCannedAnswers.rows.length">\n                                            <td md-cell colspan="7">\n                                                <span class="text-boxed-ligth" translate="OPENCHANNEL.NO_OPENCHANNELCANNEDANSWER_AVAILABLE">No openchannelcannedanswer available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'OPENCHANNEL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'OPENCHANNEL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'OPENCHANNEL.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                                md-page="vm_dc.query.page" md-total="{{vm_dc.openchannelAccountOpenchannelCannedAnswers.count}}" md-on-paginate="vm_dc.getOpenchannelAccountOpenchannelCannedAnswers" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="OPENCHANNEL.ACTIONS">ACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="openchannelAccount-detail-form-container actions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="OpenchannelAccountActionsController as vm_ac" ng-init="vm_ac.init(vm.openchannelAccount)" class="content" md-background-bg layout="row" layout-align="start start">\n                            \x3c!-- SIDENAV --\x3e\n                            <div class="navigation-simple sidenav main-sidenav md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="20">\n                                \x3c!-- SIDENAV CONTENT --\x3e\n                                <md-list class="no-padding">\n                                    <md-subheader class="md-no-sticky">\n                                        <span translate="VOICE.APPLICATIONS_LIST">\n          Applications List\n        </span>\n                                    </md-subheader>\n                                </md-list>\n                                <md-divider></md-divider>\n                                <md-list ng-sortable="vm_ac.list">\n                                    <md-list-item class="handle" ng-repeat="a in vm_ac.apps">\n                                        <md-icon md-font-icon="{{a.icon}}" class="s16"></md-icon>\n                                        <p class="text-truncate" translate="OPENCHANNEL.{{(a.alias || a.appType) | uppercase}}">{{a.alias || a.appType}}</p>\n                                    </md-list-item>\n                                </md-list>\n                                \x3c!-- / SIDENAV CONTENT --\x3e\n                            </div>\n                            \x3c!-- / SIDENAV --\x3e\n                            <div flex></div>\n                            \x3c!-- MAIN --\x3e\n                            <div class="main scrollable md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="75">\n                                <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_ac.selectedOpenchannelAccountApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">Drag & Drop Routing</span>\n                                        <div flex></div>\n                                        <ms-search-bar on-search="vm_ac.query.filter = query" on-collapse="vm_ac.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    </div>\n                                </md-toolbar>\n                                <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_ac.selectedOpenchannelAccountApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">{{vm_ac.selectedOpenchannelAccountApps.length}} {{vm_ac.selectedOpenchannelAccountApps.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                        <div flex></div>\n                                        <md-button ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_ac.deleteSelectedOpenchannelAccountApps($event)" aria-label="delete selected" translate translate-attr-label="OPENCHANNEL.DELETE_SELECTED">\n                                            <md-icon md-font-icon="icon-delete"></md-icon>\n                                        </md-button>\n                                    </div>\n                                </md-toolbar>\n\n                                \x3c!-- QUEUES TABLE --\x3e\n                                <md-table-container>\n                                    <table md-table md-row-select multiple ng-model="vm_ac.selectedOpenchannelAccountApps">\n                                        <thead md-head>\n                                            <tr md-row>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px">\n                                                    <span translate="VOICE.PRIORITY">Priority</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Type</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Appdata</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Interval</span>\n                                                </th>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px"></th>\n                                            </tr>\n                                        </thead>\n                                        <tbody md-body ng-sortable="vm_ac.applications">\n                                            <tr md-row md-select="app" md-select-id="id" ng-repeat="app in vm_ac.openchannelAccountApps.rows | filter: vm_ac.query.filter">\n                                                <td md-cell>\n                                                    <md-icon md-font-icon="icon-drag-vertical" class="s16 handle"></md-icon>\n                                                </td>\n                                                <td md-cell ng-click="vm_ac.editOpenchannelAccountApp($event, $index)"><span>{{app.priority}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editOpenchannelAccountApp($event, $index)">{{app.app.toLowerCase() === \'agi\' ? \'Cally-Square\' : app.app | ucfirst}}<span ng-if="app.appType.toLowerCase() === \'custom\'">*</span></td>\n                                                <td md-cell ng-click="vm_ac.editOpenchannelAccountApp($event, $index)"><span class="text-truncate" style="width:200px">{{app.appdata}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editInterval($event, $index)">{{app.IntervalId ? \'From List\' : app.interval}}</td>\n                                                <td md-cell>\n                                                    <md-button ng-click="vm_ac.editInterval($event, $index)" class="md-icon-button" aria-label="Interval">\n                                                        <md-icon md-font-icon="icon-timer"></md-icon>\n                                                        <md-tooltip>\n                                                            {{app.IntervalId ? \'From List\' : (app.interval === \'*,*,*,*\' ? \'Always\' : \'Custom\')}}\n                                                        </md-tooltip>\n                                                    </md-button>\n                                                </td>\n                                                <td md-cell class="actions">\n                                                    <md-menu>\n                                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                        </md-button>\n\n                                                        <md-menu-content width="3">\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editOpenchannelAccountApp($event, $index)" translate="VOICE.EDIT_APP">\n                                                                    Edit App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editInterval($event, $index)" translate="VOICE.EDIT_INTERVAL">\n                                                                    Edit Interval\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'">\n                                                                <md-button ng-click="vm_ac.deleteConfirm(app, $index, $event)" translate="VOICE.DELETE_APP">\n                                                                    Delete App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                        </md-menu-content>\n                                                    </md-menu>\n                                                </td>\n                                            </tr>\n                                            <tr md-row ng-hide="vm_ac.openchannelAccountApps.rows.length">\n                                                <td md-cell colspan="7">\n                                                    <span class="text-boxed-ligth" translate="VOICE.NO_APPS_AVAILABLE">No apps available</span>\n                                                </td>\n                                            </tr>\n                                        </tbody>\n                                    </table>\n                                </md-table-container>\n                                \x3c!-- / QUEUES TABLE --\x3e\n\n                                \x3c!-- NO RESULTS --\x3e\n\n                                \x3c!-- / NO RESULTS --\x3e\n                            </div>\n                            \x3c!-- / MAIN --\x3e\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="OPENCHANNEL.INTERACTIONS">INTERACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="openchannelAccount-detail-form-container interactions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="OpenchannelAccountInteractionsController as vm_dc" ng-init="vm_dc.init(vm.openchannelAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedOpenchannelAccountInteractions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="OPENCHANNEL.INTERACTIONS">Interactions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.getOpenchannelAccountInteractions()" aria-label="refresh Interactions" translate translate-attr-label="OPENCHANNEL.REFRESH_INTERACTIONS">\n                                        <md-icon md-font-icon="icon-refresh"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedOpenchannelAccountInteractions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedOpenchannelAccountInteractions.length}} {{vm_dc.selectedOpenchannelAccountInteractions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedOpenchannelAccountInteractions" csv-label="true" filename="openchannelAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedOpenchannelAccountInteractions($event)" aria-label="delete selected" translate translate-attr-label="OPENCHANNELACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedOpenchannelAccountInteractions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getOpenchannelAccountInteractions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'OPENCHANNEL.ID\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'OPENCHANNEL.STARTEDAT\' | translate }}</th>\n                                            <th md-column>{{ \'OPENCHANNEL.CONTACT\' | translate }}</th>\n                                            <th md-column>{{ \'OPENCHANNEL.AGENT\' | translate }}</th>\n                                            <th md-column md-order-by="closedAt">{{ \'OPENCHANNEL.CLOSEDAT\' | translate }}</th>\n                                            <th md-column md-order-by="disposition">{{ \'OPENCHANNEL.DISPOSITION\' | translate }}</th>\n                                            <th md-column md-order-by="note">{{ \'OPENCHANNEL.NOTES\' | translate }}</th>\n                                            <th md-column md-order-by="tag">{{ \'OPENCHANNEL.TAGS\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="interaction" md-select-id="id" ng-repeat="interaction in vm_dc.openchannelAccountInteractions.rows">\n                                            <td md-cell>{{interaction.id}}</td>\n                                            <td md-cell>{{interaction.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell>{{interaction.Contact.firstName}}</td>\n                                            <td md-cell>{{interaction.Owner.name}}</td>\n                                            <td md-cell>{{interaction.closedAt | date:\'medium\'}}</td>\n                                            <td md-cell>{{interaction.disposition}}</td>\n                                            <td md-cell>{{interaction.note}}</td>\n                                            <td md-cell>\n                                                <div ng-if="interaction.Tags.length">\n                                                    <md-tooltip md-direction="left" layout="row">\n                                                        <span ng-repeat="tag in interaction.Tags">{{tag.name}}<span ng-if="!$last">, </span></span>\n                                                    </md-tooltip>\n                                                    <md-icon md-font-icon="icon-tag"></md-icon>\n                                                </div>\n                                            </td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="OPENCHANNEL.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.spyopenchannelInteraction($event, interaction)" translate="OPENCHANNEL.SPYINTERACTION">\n                                                                Spy Interaction\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(interaction, $event)" translate="OPENCHANNEL.DELETE_INTERACTION">\n                                                                Delete Interaction\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.openchannelAccountInteractions.rows.length">\n                                            <td md-cell colspan="13">\n                                                <span class="text-boxed-ligth" translate="OPENCHANNEL.NO_INTERACTION_AVAILABLE">No interaction available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'OPENCHANNEL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'OPENCHANNEL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'OPENCHANNEL.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                                md-page="vm_dc.query.page" md-total="{{vm_dc.openchannelAccountInteractions.count}}" md-on-paginate="vm_dc.getOpenchannelAccountInteractions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/openchannelAccounts.html",'<div id="openchannelAccounts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-google-earth" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="OPENCHANNEL.OPENCHANNELACCOUNTS">OpenchannelAccounts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="OPENCHANNEL.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedOpenchannelAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedOpenchannelAccounts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="OPENCHANNEL.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-openchannelAccounts-count">\n                    <span>{{vm.selectedOpenchannelAccounts.length}}</span>\n                <span translate="OPENCHANNEL.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="OPENCHANNELACCOUNTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllOpenchannelAccounts()" translate="OPENCHANNEL.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectOpenchannelAccounts()" translate="OPENCHANNEL.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedOpenchannelAccounts" csv-label="true" filename="openchannelAccounts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedOpenchannelAccounts($event)" aria-label="delete selected" translate translate-attr-label="OPENCHANNELACCOUNTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- OPENCHANNELACCOUNT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedOpenchannelAccounts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getOpenchannelAccounts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'OPENCHANNEL.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'OPENCHANNEL.NAME\' | translate }}</th>\n                                <th md-column md-order-by="key">{{ \'OPENCHANNEL.KEY\' | translate }}</th>\n                                <th md-column md-order-by="replyUri">{{ \'OPENCHANNEL.REPLYURI\' | translate }}</th>\n                                <th md-column md-order-by="ListId">{{ \'OPENCHANNEL.LIST\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'OPENCHANNEL.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.openchannelAccounts.rows.length">\n                                <td md-cell colspan="7">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="OPENCHANNEL.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="openchannelAccount" md-select-id="id" ng-repeat="openchannelAccount in vm.openchannelAccounts.rows">\n                                <td md-cell ng-if="openchannelAccount.userpic"><img class="avatar" alt="{{openchannelAccount.name}}" ng-src="api/users/{{openchannelAccount.id}}/avatar" /></td>\n                                <td md-cell ng-if="!openchannelAccount.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{openchannelAccount.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditOpenchannelAccount($event, openchannelAccount)" md-cell class="id ">{{openchannelAccount.id}}</td>\n                                <td ng-click="vm.createOrEditOpenchannelAccount($event, openchannelAccount)" md-cell class="name ">{{openchannelAccount.name}}</td>\n                                <td ng-click="vm.createOrEditOpenchannelAccount($event, openchannelAccount)" md-cell class="key ">{{openchannelAccount.key}}</td>\n                                <td ng-click="vm.createOrEditOpenchannelAccount($event, openchannelAccount)" md-cell class="replyUri ">{{openchannelAccount.replyUri}}</td>\n                                <td ng-click="vm.createOrEditOpenchannelAccount($event, openchannelAccount)" md-cell class="ListId ">{{ ListId = vm.lists[openchannelAccount.ListId]; ListId.name }}</td>\n                                <td ng-click="vm.createOrEditOpenchannelAccount($event, openchannelAccount)" md-cell class="description ">{{openchannelAccount.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="OPENCHANNEL.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(openchannelAccount, $event)" translate="OPENCHANNEL.EDIT_OPENCHANNELACCOUNT">\n                                                    Edit OpenchannelAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.interactionsgoto(openchannelAccount, $event)" translate="OPENCHANNEL.INTERACTIONS_OPENCHANNELACCOUNT">\n                                                    Interactions OpenchannelAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(openchannelAccount, $event)" translate="OPENCHANNEL.DELETE_OPENCHANNELACCOUNT">\n                                                    Delete OpenchannelAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'OPENCHANNEL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'OPENCHANNEL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'OPENCHANNEL.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.openchannelAccounts.count}}" md-on-paginate="vm.getOpenchannelAccounts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / OPENCHANNELACCOUNT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD OPENCHANNELACCOUNT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-openchannelAccount-button" ng-click="vm.createOrEditOpenchannelAccount($event)" aria-label="add openchannelAccount" translate translate-attr-aria-label="OPENCHANNEL.ADD_OPENCHANNELACCOUNT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD OPENCHANNELACCOUNT BUTTON --\x3e\n</div>'),e.put("app/main/apps/openchannel/views/openchannelQueues/create/dialog.html",'<md-dialog class="openchannelQueue-dialog" aria-label="New OpenchannelQueue">\n    <form name="openchannelQueueForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.openchannelQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newOpenchannelQueue">\n                <div class="hint"><span translate="OPENCHANNEL.HELP.NAME"></span></div>\n                <div ng-messages="openchannelQueueForm[\'name\'].$error" ng-show="openchannelQueueForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="OPENCHANNEL.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.STRATEGY">Strategy</label>\n                <md-select name="strategy" ng-model="vm.openchannelQueue.strategy" required>\n                    <md-option ng-value="\'beepall\'">Beepall</md-option>\n                    <md-option ng-value="\'rrmemory\'">RR Memory</md-option>\n                </md-select>\n                <div ng-messages="openchannelQueueForm[\'strategy\'].$error" ng-show="openchannelQueueForm[\'strategy\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.AGENT_TIMEOUT">Agent_Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.openchannelQueue.timeout" min="1" max="2147483" ng-required="true">\n                <div ng-messages="openchannelQueueForm[\'timeout\'].$error" ng-show="openchannelQueueForm[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.AGENT_TIMEOUT_REQUIRED">Agent_Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="OPENCHANNEL.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="OPENCHANNEL.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.openchannelQueue.description">\n                <div ng-messages="openchannelQueueForm[\'description\'].$error" ng-show="openchannelQueueForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newOpenchannelQueue" ng-click="vm.saveOpenchannelQueue()" class="send-button md-accent md-raised" ng-disabled="openchannelQueueForm.$invalid || openchannelQueueForm.$pristine" aria-label="SAVE" translate="OPENCHANNEL.SAVE"\n                    translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newOpenchannelQueue" ng-click="vm.addNewOpenchannelQueue()" class="send-button md-accent md-raised" ng-disabled="openchannelQueueForm.$invalid" aria-label="ADD" translate="OPENCHANNEL.ADD_OPENCHANNELQUEUE" translate-attr-aria-label="OPENCHANNEL.ADD_OPENCHANNELQUEUE">\n                    ADD OPENCHANNELQUEUE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newOpenchannelQueue" ng-click="vm.deleteOpenchannelQueue($event)" aria-label="DELETE" translate translate-attr-aria-label="OPENCHANNEL.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="OPENCHANNEL.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelQueues/edit/agentadd/agentadd.html",'<md-dialog class="openchannelQueue-dialog" aria-label="openchannelQueue">\n    <form name="openchannelQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="OPENCHANNEL.AGENTADD_OPENCHANNELQUEUE">Add Agent to openchannelQueue</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelQueues/edit/teamadd/teamadd.html",'<md-dialog class="openchannelQueue-dialog" aria-label="openchannelQueue">\n    <form name="openchannelQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="OPENCHANNEL.TEAMADD_OPENCHANNELQUEUE">Add Team in OPENCHANNELQUEUE</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelQueues/edit/view.html",'<div id="openchannel-openchannelQueue" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-openchannelQueues-button md-icon-button" aria-label="Go to openchannelQueues" ng-click="vm.gotoOpenchannelQueues()" translate translate-attr-aria-label="OPENCHANNEL.GO_TO_OPENCHANNELQUEUES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="openchannelQueue-image" hide-xs>\n                    <img ng-src="assets/images/business/openchannelQueues.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.openchannelQueue.id}}\n                        <span ng-if="vm.openchannelQueue.name">{{vm.openchannelQueue.name}}</span>\n                        <span ng-if="vm.openchannelQueue.exten">{{vm.openchannelQueue.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="OPENCHANNEL.CREATED_AT"></span> <span>{{vm.openchannelQueue.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.teamadddialog(vm.openchannelQueue, $event)" class="md-fab md-orange-500-bg md-icon-button" aria-label="teamadd">\n                <md-tooltip><span translate="OPENCHANNEL.TEAMADD_OPENCHANNELQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-multiple-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.agentadddialog(vm.openchannelQueue, $event)" class="md-fab md-purple-500-bg md-icon-button" aria-label="agentadd">\n                <md-tooltip><span translate="OPENCHANNEL.AGENTADD_OPENCHANNELQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-plus"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveOpenchannelQueue()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid)" translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="OPENCHANNEL.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="openchannelQueue-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="OPENCHANNEL.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.openchannelQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="OPENCHANNEL.HELP.NAME"></span></div>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="OPENCHANNEL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="OPENCHANNEL.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.STRATEGY">Strategy</label>\n                                <md-select name="strategy" ng-model="vm.openchannelQueue.strategy" required>\n                                    <md-option ng-value="\'beepall\'">Beepall</md-option>\n                                    <md-option ng-value="\'rrmemory\'">RR Memory</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'strategy\'].$error" ng-show="generalForm[\'strategy\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="OPENCHANNEL.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.AGENT_TIMEOUT">Agent_Timeout</label>\n                                <input type="number" name="timeout" ng-model="vm.openchannelQueue.timeout" min="1" max="2147483" ng-required="true">\n                                <div ng-messages="generalForm[\'timeout\'].$error" ng-show="generalForm[\'timeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="OPENCHANNEL.ERRORS.AGENT_TIMEOUT_REQUIRED">Agent_Timeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="OPENCHANNEL.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="OPENCHANNEL.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.openchannelQueue.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="OPENCHANNEL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/openchannel/views/openchannelQueues/openchannelQueues.html",'<div id="openchannelQueues" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-google-earth" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="OPENCHANNEL.OPENCHANNELQUEUES">OpenchannelQueues</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="OPENCHANNEL.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedOpenchannelQueues.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedOpenchannelQueues =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="OPENCHANNEL.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-openchannelQueues-count">\n                    <span>{{vm.selectedOpenchannelQueues.length}}</span>\n                <span translate="OPENCHANNEL.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="OPENCHANNELQUEUES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllOpenchannelQueues()" translate="OPENCHANNEL.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectOpenchannelQueues()" translate="OPENCHANNEL.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedOpenchannelQueues" csv-label="true" filename="openchannelQueues.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedOpenchannelQueues($event)" aria-label="delete selected" translate translate-attr-label="OPENCHANNELQUEUES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- OPENCHANNELQUEUE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedOpenchannelQueues" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getOpenchannelQueues">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'OPENCHANNEL.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'OPENCHANNEL.NAME\' | translate }}</th>\n                                <th md-column md-order-by="strategy">{{ \'OPENCHANNEL.STRATEGY\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.openchannelQueues.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="OPENCHANNEL.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="openchannelQueue" md-select-id="id" ng-repeat="openchannelQueue in vm.openchannelQueues.rows">\n                                <td md-cell ng-if="openchannelQueue.userpic"><img class="avatar" alt="{{openchannelQueue.name}}" ng-src="api/users/{{openchannelQueue.id}}/avatar" /></td>\n                                <td md-cell ng-if="!openchannelQueue.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{openchannelQueue.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditOpenchannelQueue($event, openchannelQueue)" md-cell class="id ">{{openchannelQueue.id}}</td>\n                                <td ng-click="vm.createOrEditOpenchannelQueue($event, openchannelQueue)" md-cell class="name ">{{openchannelQueue.name}}</td>\n                                <td ng-click="vm.createOrEditOpenchannelQueue($event, openchannelQueue)" md-cell class="strategy ">{{ vm.arraystrategy[openchannelQueue.strategy].option }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="OPENCHANNEL.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(openchannelQueue, $event)" translate="OPENCHANNEL.EDIT_OPENCHANNELQUEUE">\n                                                    Edit OpenchannelQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.teamadddialog(openchannelQueue, $event)" translate="OPENCHANNEL.TEAMADD_OPENCHANNELQUEUE">\n                                                    teamadd OpenchannelQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.agentadddialog(openchannelQueue, $event)" translate="OPENCHANNEL.AGENTADD_OPENCHANNELQUEUE">\n                                                    agentadd OpenchannelQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(openchannelQueue, $event)" translate="OPENCHANNEL.DELETE_OPENCHANNELQUEUE">\n                                                    Delete OpenchannelQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(openchannelQueue, $event)" translate="OPENCHANNEL.GOTOREALTIME_OPENCHANNELQUEUE">\n                                                    goToRealtime OpenchannelQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'OPENCHANNEL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'OPENCHANNEL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'OPENCHANNEL.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.openchannelQueues.count}}" md-on-paginate="vm.getOpenchannelQueues" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / OPENCHANNELQUEUE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD OPENCHANNELQUEUE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-openchannelQueue-button" ng-click="vm.createOrEditOpenchannelQueue($event)" aria-label="add openchannelQueue" translate translate-attr-aria-label="OPENCHANNEL.ADD_OPENCHANNELQUEUE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD OPENCHANNELQUEUE BUTTON --\x3e\n</div>'),e.put("app/main/apps/openchannel/views/realtime/agents/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="OPENCHANNEL.AGENTS">Agents</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query; vm.onInit()" on-collapse="vm.query.filter = undefined; vm.onInit()" debounce="300"></ms-search-bar>\n        \x3c!-- <md-button class="md-icon-button" ng-click="vm.showInfo($event)">\n      <i class="icon-information-outline grey-600-fg">\n        <md-tooltip>{{\'VOICE.INFO\' | translate}}</md-tooltip>\n      </i>\n    </md-button> --\x3e\n        <md-select ng-model="vm.query.globalStatusFilter" class="md-caption" ng-change="vm.query.pauseTypeFilter = \'\'; vm.onInit()">\n            <md-option ng-value="\'\'">{{ \'OPENCHANNEL.ALL\' | translate }}</md-option>\n            <md-option value="pause">{{ \'OPENCHANNEL.PAUSE\' | translate }}</md-option>\n            <md-option value="*pause">{{ \'OPENCHANNEL.PARTIALPAUSE\' | translate }}</md-option>\n            <md-option value="busy">{{ \'OPENCHANNEL.BUSY\' | translate }}</md-option>\n            <md-option value="idle">{{ \'OPENCHANNEL.IDLE\' | translate }}</md-option>\n        </md-select>\n\n        <md-select ng-if="vm.isPause(vm.query.globalStatusFilter)" ng-model="vm.query.pauseTypeFilter" class="md-caption" ng-change="vm.onInit()">\n            <md-option ng-value="\'\'">All</md-option>\n            <md-option value="DEFAULT PAUSE">DEFAULT PAUSE</md-option>\n            <md-option value="ACW">ACW</md-option>\n            <md-option value="LOGININPAUSE">LOGININPAUSE</md-option>\n            <md-option value="Auto-Pause">AUTOPAUSE</md-option>\n            <md-option ng-value="pause.name" ng-repeat="pause in vm.pauses.rows">{{pause.name}}</md-option>\n        </md-select>\n    </div>\n</md-toolbar>\n\n\x3c!-- AGENT TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.order" md-on-reorder="vm.onInit">\n            <tr md-row border="1">\n                <th class="bv text-center" colspan="3">{{ \'OPENCHANNEL.AGENT\' | translate }}</th>\n                <th class="bv bl text-center" colspan="2">{{ \'VOICE.VOICE\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="bv bl text-center" colspan="2">{{ \'CHAT.CHAT\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="bv bl text-center" colspan="2">{{ \'MAIL.MAIL\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="bv bl text-center" colspan="2">{{ \'SMS.SMS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="bv bl text-center" colspan="2">{{ \'OPENCHANNEL.OPENCHANNEL\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="bv bl text-center" colspan="2">{{ \'FAX.FAX\' | translate }}</th>\n                <th width="10px" class="bt bl" rowspan="2"></th>\n                \x3c!-- <th md-column>{{ \'VOICE.PHONE_STATE\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PHONE_STATUS\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PAUSE\' | translate }}</th>\n                <th md-column width="10px"></th> --\x3e\n            </tr>\n            <tr md-row>\n                <th class="bl" md-column md-order-by="fullname">{{ \'OPENCHANNEL.NAME\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatus">{{ \'OPENCHANNEL.STATUS\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatusTime">{{ \'OPENCHANNEL.TIMER\' | translate }}</th>\n\n                <th class="bl custom-column">{{ \'VOICE.STATUS\' | translate }}</th>\n                <th class="bl custom-column">Info</th>\n\n                <th ng-if="vm.license.chat" class="bl text-center">{{ \'CHAT.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'CHAT.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.mail" class="bl text-center">{{ \'MAIL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'MAIL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.messaging" class="bl text-center">{{ \'SMS.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'SMS.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.openchannel" class="bl text-center">{{ \'OPENCHANNEL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'OPENCHANNEL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.fax" class="bl text-center">{{ \'FAX.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'FAX.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.order.length">\n                <td md-cell colspan="17">\n                    <div layout="row" layout-align="center center">\n                        <span>{{ \'OPENCHANNEL.NO_AGENT_ONLINE\' | translate }}</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-select="vm.agents[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td class="bt padding-5">\n                    <div layout="row" layout-align="start center">\n                        <img class="avatar" ng-src="{{vm.agents[value].userpic && \'api/users/\'+vm.agents[value].id+\'/avatar\' || \'assets/images/avatars/profile.png\'}}">\n                        <div layout="column">\n                            <span>{{vm.agents[value].fullname}}</span>\n                            <span>{{vm.agents[value].internal}}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt">\n                    <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'busy\':\'indigo-100-bg\',\'*pause\':\'amber-50-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].globalStatus]">{{ vm.isPause(vm.agents[value].globalStatus) ? \'\' : vm.agents[value].globalStatus | uppercase }} {{ vm.isPause(vm.agents[value].globalStatus) ? (vm.isPartialPause(vm.agents[value].globalStatus) ? \'*\'+vm.agents[value].pauseType || \'DEFAULT PAUSE\'  : vm.agents[value].pauseType || \'DEFAULT PAUSE\') : \'\'}}</span>\n                </td>\n                <td class="bt custom-column">\n                    <timer start-time="vm.agents[value].globalStatusTime" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                </td>\n                <td class="bt bl">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'talking\':\'indigo-100-bg\',\'ringing\':\'orange-400-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].voiceStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt bl">\n                    <div layout="column">\n                        <span ng-if="vm.agents[value].queue" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].queue }}</span>\n                        <span ng-if="vm.agents[value].destconnectedlinenum" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].destconnectedlinenum }}</span>\n                        <span class="padding-5" ng-if="vm.agents[value].queue || vm.agents[value].destconnectedlinenum">\n                            <timer start-time="vm.agents[value].voiceStatusTime" interval="1000" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                        </span>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt">--</td>\n                <td class="bt">--</td> --\x3e\n                <td class="bt bl" ng-if="vm.license.chat">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt padding-5 text-center">{{ agent.chatCurrentCapacity }}/{{ agent.chatCapacity > 0 ? agent.chatCapacity : \'∞\' }}</td> --\x3e\n                <td md-number class="bt text-center font-size-20" ng-if="vm.license.chat" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.mail">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.mail" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.messaging">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.messaging" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.openchannel">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">4</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">89</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.openchannel" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.fax">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">7</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">2</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.fax" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxCurrentCapacity }}</td>\n                <td class="bl bt padding-5 text-center">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="4">\n                            <md-menu-item>\n                                <md-button ng-click="vm.logout(vm.agents[value], $event)" translate="OPENCHANNEL.LOGOUT">\n                                    Logout\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.queueAdd(vm.agents[value], $event)" translate="OPENCHANNEL.AGENTADD_QUEUE">\n                                    Add Agent In Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="OPENCHANNEL.PAUSE">Pause</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item>\n                                            <md-button ng-disabled=" vm.agents[value].voicePause && \'DEFAULT PAUSE\' === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value])"><em translate="OPENCHANNEL.DEFAULT_PAUSE">Default Pause</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.pauses.rows.length" ng-repeat="pause in vm.pauses.rows">\n                                            <md-button ng-disabled="vm.agents[value].voicePause && pause.name === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value], pause.name)">{{pause.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                            <md-menu-item ng-if="vm.isPause(vm.agents[value].globalStatus)">\n                                <md-button ng-click="vm.unPause(vm.agents[value])" translate="OPENCHANNEL.UNPAUSE">\n                                    Unpause\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'OPENCHANNEL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'OPENCHANNEL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'OPENCHANNEL.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.filteredAgents.length}}" md-on-paginate="vm.onInit" md-page-select></md-table-pagination>\n\x3c!-- / AGENT TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/openchannel/views/realtime/queues/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="OPENCHANNEL.QUEUES">Queues</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUE TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getQueues">\n            <tr md-row>\n                <th md-column md-order-by="name">{{ \'OPENCHANNEL.NAME\' | translate }}</th>\n                <th md-column>{{ \'OPENCHANNEL.LOGGED_IN\' | translate }}</th>\n                <th md-column>{{ \'OPENCHANNEL.PAUSED\' | translate }}</th>\n                <th md-column>{{ \'OPENCHANNEL.READY\' | translate }}</th>\n                <th md-column>{{ \'OPENCHANNEL.WAITING\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.queues">\n                <td md-cell colspan="7">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="OPENCHANNEL.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row md-select="vm.queues[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td md-cell>{{vm.queues[value].name}}</td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].loggedInDb || 0}} ({{vm.queues[value].loggedIn || 0}})</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].paused || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].available || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].waiting || 0}}</span>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="OPENCHANNEL.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="3">\n                            <md-menu-item>\n                                <md-button ng-click="vm.createOrEditOpenchannelQueue($event, vm.queues[value])" translate="OPENCHANNEL.EDIT_QUEUE">\n                                    Edit Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.agentAdd($event, vm.queues[value])" translate="OPENCHANNEL.AGENTSADD_QUEUE">\n                                    Add Agents to queue\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'OPENCHANNEL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'OPENCHANNEL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'OPENCHANNEL.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.count}}" md-on-paginate="vm.getQueues" md-page-select></md-table-pagination>\n\x3c!-- / QUEUE TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/openchannel/views/realtime/realtime.html",'<div id="realtime" class="page-layout simple tabbed" layout="column" ng-cloak>\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="OPENCHANNEL.AGENTS">Agents</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="OPENCHANNEL.QUEUES">Queues</span>\n                </md-tab-label>\n            </md-tab>\n        </md-tabs>\n\n        <md-card ui-view></md-card>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n</div>'),e.put("app/main/apps/settings/views/customizations/create/dialog.html",'<md-dialog class="customization-dialog" aria-label="New Customization">\n    <form name="customizationForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.customization.defaultLogo" aria-label="Default_Logo"><span translate="SETTINGS.DEFAULT_LOGO">Default_Logo</span></md-switch>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.customization.defaultLoginLogo" aria-label="Default_Login_Logo"><span translate="SETTINGS.DEFAULT_LOGIN_LOGO">Default_Login_Logo</span></md-switch>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.customization.defaultHeaderWhiteLabel" aria-label="Default_Header_WhiteLabel"><span translate="SETTINGS.DEFAULT_HEADER_WHITELABEL">Default_Header_WhiteLabel</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="!vm.customization.defaultHeaderWhiteLabel" class="md-block">\n                <label translate="SETTINGS.HEADER_WHITELABEL">Header_WhiteLabel</label>\n                <input type="text" name="headerWhiteLabel" ng-model="vm.customization.headerWhiteLabel" ng-required="true">\n                <div ng-messages="customizationForm[\'headerWhiteLabel\'].$error" ng-show="customizationForm[\'headerWhiteLabel\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.HEADER_WHITELABEL_REQUIRED">Header_WhiteLabel field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.customization.defaultPageTitle" aria-label="Default_Page_Title"><span translate="SETTINGS.DEFAULT_PAGE_TITLE">Default_Page_Title</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="!vm.customization.defaultPageTitle" class="md-block">\n                <label translate="SETTINGS.PAGE_TITLE">Page_Title</label>\n                <input type="text" name="pageTitle" ng-model="vm.customization.pageTitle" ng-required="true">\n                <div ng-messages="customizationForm[\'pageTitle\'].$error" ng-show="customizationForm[\'pageTitle\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.PAGE_TITLE_REQUIRED">Page_Title field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newCustomization" ng-click="vm.saveCustomization()" class="send-button md-accent md-raised" ng-disabled="customizationForm.$invalid || customizationForm.$pristine" aria-label="SAVE" translate="SETTINGS.SAVE" translate-attr-aria-label="SETTINGS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newCustomization" ng-click="vm.addNewCustomization()" class="send-button md-accent md-raised" ng-disabled="customizationForm.$invalid" aria-label="ADD" translate="SETTINGS.ADD_CUSTOMIZATION" translate-attr-aria-label="SETTINGS.ADD_CUSTOMIZATION">\n                    ADD CUSTOMIZATION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newCustomization" ng-click="vm.deleteCustomization($event)" aria-label="DELETE" translate translate-attr-aria-label="SETTINGS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="SETTINGS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/settings/views/customizations/customizations.html",'<div id="customizations" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-cog" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="SETTINGS.CUSTOMIZATIONS">Customizations</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveCustomization()" ng-disabled="customizationForm.$pristine || customizationForm.$invalid" class="send-button md-accent md-raised" translate="SETTINGS.SAVE" translate-attr-aria-label="SETTINGS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            <div class="customization-detail-form-container customizations md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="SETTINGS.CUSTOMIZATIONS">CUSTOMIZATIONS</div>\n                </div>\n                <form name="customizationForm" novalidate>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.customization.defaultLogo" aria-label="Default_Logo"><span translate="SETTINGS.DEFAULT_LOGO">Default_Logo</span></md-switch>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.customization.defaultLoginLogo" aria-label="Default_Login_Logo"><span translate="SETTINGS.DEFAULT_LOGIN_LOGO">Default_Login_Logo</span></md-switch>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.customization.defaultHeaderWhiteLabel" aria-label="Default_Header_WhiteLabel"><span translate="SETTINGS.DEFAULT_HEADER_WHITELABEL">Default_Header_WhiteLabel</span></md-switch>\n                    </md-input-container>\n                    <md-input-container ng-if="!vm.customization.defaultHeaderWhiteLabel" class="md-block">\n                        <label translate="SETTINGS.HEADER_WHITELABEL">Header_WhiteLabel</label>\n                        <input type="text" name="headerWhiteLabel" ng-model="vm.customization.headerWhiteLabel" ng-required="true">\n                        <div ng-messages="customizationForm[\'headerWhiteLabel\'].$error" ng-show="customizationForm[\'headerWhiteLabel\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.HEADER_WHITELABEL_REQUIRED">Header_WhiteLabel field is required</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.customization.defaultPageTitle" aria-label="Default_Page_Title"><span translate="SETTINGS.DEFAULT_PAGE_TITLE">Default_Page_Title</span></md-switch>\n                    </md-input-container>\n                    <md-input-container ng-if="!vm.customization.defaultPageTitle" class="md-block">\n                        <label translate="SETTINGS.PAGE_TITLE">Page_Title</label>\n                        <input type="text" name="pageTitle" ng-model="vm.customization.pageTitle" ng-required="true">\n                        <div ng-messages="customizationForm[\'pageTitle\'].$error" ng-show="customizationForm[\'pageTitle\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.PAGE_TITLE_REQUIRED">Page_Title field is required</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n\n                </form>\n            </div>\n\n            <div ng-if="!vm.customization.defaultLogo" class="customization-detail-form-container logo md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="SETTINGS.LOGO">LOGO</div>\n                </div>\n                <div ng-controller="CustomizationlogoController as vm_cl" ng-init="vm_cl.init(vm.customization)" class="customization-detail-form-container md-background-bg md-whiteframe-1dp">\n\n                    <div id="customization-image-uploader" flow-init="vm_cl.ngFlowOptions" flow-name="vm_cl.ngFlow.flow" flow-files-submitted="vm_cl.upload()" flow-file-added="vm_cl.fileAdded($file)" flow-file-success="vm_cl.fileSuccess($file, $message)" flow-complete="vm_cl.uploadComplete()"\n                        flow-drop flow-drag-enter="vm_cl.dropping=true" flow-drag-leave="vm_cl.dropping=false" ng-class="{\'dropping\':vm.dropping}">\n\n                        <div class="drop-text hint-text" layout="row" layout-align="center center">\n                            <span translate="EC.DROP_TO_UPLOAD">Drop to upload</span>\n                        </div>\n\n                        <div class="upload-button" layout="column" layout-align="center center">\n                            <md-button class="md-accent md-raised" flow-btn>\n                                Upload\n                            </md-button>\n                            <span class="secondary-text mt-8">You can also drop images here to upload. Only PNG, JPG - Max. 8MB</span>\n                        </div>\n\n                        <div layout="row" layout-align="start start" layout-wrap>\n                            <div ng-repeat="logoimage in vm_cl.customization.images" ng-switch="logoimage.type">\n                                <div class="customization-image uploading" ng-switch-when="uploading" layout="row" layout-align="center center">\n                                    <div class="overlay" layout="column" layout-align="center center">\n                                        <md-progress-linear md-mode="determinate" value="{{logoimage.file.progress() * 100}}">\n                                        </md-progress-linear>\n                                    </div>\n                                    <img class="media" flow-img="logoimage.file">\n                                </div>\n\n                                <div class="customization-image" ng-switch-when="image" layout="row" layout-align="center center">\n                                    <img class="media" ng-src="{{logoimage.url}}">\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n\n            </div>\n\n            <div ng-if="!vm.customization.defaultLoginLogo" class="customization-detail-form-container logologin md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="SETTINGS.LOGOLOGIN">LOGOLOGIN</div>\n                </div>\n                <div ng-controller="CustomizationlogologinController as vm_cll" ng-init="vm_cll.init(vm.customization)" class="customization-detail-form-container md-background-bg md-whiteframe-1dp">\n\n                    <div id="customization-image-uploader" flow-init="vm_cll.ngFlowOptions" flow-name="vm_cll.ngFlow.flow" flow-files-submitted="vm_cll.upload()" flow-file-added="vm_cll.fileAdded($file)" flow-file-success="vm_cll.fileSuccess($file, $message)" flow-complete="vm_cll.uploadComplete()"\n                        flow-drop flow-drag-enter="vm_cll.dropping=true" flow-drag-leave="vm_cll.dropping=false" ng-class="{\'dropping\':vm.dropping}">\n\n                        <div class="drop-text hint-text" layout="row" layout-align="center center">\n                            <span translate="EC.DROP_TO_UPLOAD">Drop to upload</span>\n                        </div>\n\n                        <div class="upload-button" layout="column" layout-align="center center">\n                            <md-button class="md-accent md-raised" flow-btn>\n                                Upload\n                            </md-button>\n                            <span class="secondary-text mt-8">You can also drop images here to upload. Only PNG, JPG - Max. 8MB</span>\n                        </div>\n\n                        <div layout="row" layout-align="start start" layout-wrap>\n                            <div ng-repeat="logologinimage in vm_cll.customization.images" ng-switch="logologinimage.type">\n                                <div class="customization-image uploading" ng-switch-when="uploading" layout="row" layout-align="center center">\n                                    <div class="overlay" layout="column" layout-align="center center">\n                                        <md-progress-linear md-mode="determinate" value="{{logologinimage.file.progress() * 100}}">\n                                        </md-progress-linear>\n                                    </div>\n                                    <img class="media" flow-img="logologinimage.file">\n                                </div>\n\n                                <div class="customization-image" ng-switch-when="image" layout="row" layout-align="center center">\n                                    <img class="media" ng-src="{{logologinimage.url}}">\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n\n            </div>\n\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n</div>'),e.put("app/main/apps/settings/views/generals/create/dialog.html",'<md-dialog class="general-dialog" aria-label="New General">\n    <form name="generalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.MIN_INTERNAL">Min_Internal</label>\n                <input type="number" name="min_internal" ng-model="vm.general.min_internal" min="0" ng-required="true" autofocus>\n                <div ng-messages="generalForm[\'min_internal\'].$error" ng-show="generalForm[\'min_internal\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.MIN_INTERNAL_REQUIRED">Min_Internal field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="SETTINGS.ERRORS.MIN_INTERNAL_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Min_Internal must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.general.securePassword" aria-label="Security_Suite"><span translate="SETTINGS.SECURITY_SUITE">Security_Suite</span></md-switch>\n                <div class="hint"><span translate="SETTINGS.HELP.SECURITY_SUITE"></span></div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.general.callRecordingEncryption" aria-label="Call_Recording_Encryption"><span translate="SETTINGS.CALL_RECORDING_ENCRYPTION">Call_Recording_Encryption</span></md-switch>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.STUNADDR">Stunaddr</label>\n                <input type="text" name="stunaddr" ng-model="vm.general.stunaddr">\n                <div ng-messages="generalForm[\'stunaddr\'].$error" ng-show="generalForm[\'stunaddr\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.STUNADDR_REQUIRED">Stunaddr field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.TURNADDR">Turnaddr</label>\n                <input type="text" name="turnaddr" ng-model="vm.general.turnaddr">\n                <div ng-messages="generalForm[\'turnaddr\'].$error" ng-show="generalForm[\'turnaddr\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.TURNADDR_REQUIRED">Turnaddr field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.TURN_USERNAME">Turn_Username</label>\n                <input type="text" name="turnusername" ng-model="vm.general.turnusername">\n                <div ng-messages="generalForm[\'turnusername\'].$error" ng-show="generalForm[\'turnusername\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.TURN_USERNAME_REQUIRED">Turn_Username field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.TURN_PASSWORD">Turn_Password</label>\n                <input type="text" name="turnpassword" ng-model="vm.general.turnpassword">\n                <div ng-messages="generalForm[\'turnpassword\'].$error" ng-show="generalForm[\'turnpassword\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.TURN_PASSWORD_REQUIRED">Turn_Password field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newGeneral" ng-click="vm.saveGeneral()" class="send-button md-accent md-raised" ng-disabled="generalForm.$invalid || generalForm.$pristine" aria-label="SAVE" translate="SETTINGS.SAVE" translate-attr-aria-label="SETTINGS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newGeneral" ng-click="vm.addNewGeneral()" class="send-button md-accent md-raised" ng-disabled="generalForm.$invalid" aria-label="ADD" translate="SETTINGS.ADD_GENERAL" translate-attr-aria-label="SETTINGS.ADD_GENERAL">\n                    ADD GENERAL\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newGeneral" ng-click="vm.deleteGeneral($event)" aria-label="DELETE" translate translate-attr-aria-label="SETTINGS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="SETTINGS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/settings/views/generals/generals.html",'<div id="generals" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-cog" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="SETTINGS.GENERAL">General</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveGeneral()" ng-disabled="generalForm.$pristine || generalForm.$invalid" class="send-button md-accent md-raised" translate="SETTINGS.SAVE" translate-attr-aria-label="SETTINGS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            <div class="general-detail-form-container global md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="SETTINGS.GLOBAL">GLOBAL</div>\n                </div>\n                <form name="generalForm" novalidate>\n                    <md-input-container class="md-block">\n                        <label translate="SETTINGS.MIN_INTERNAL">Min_Internal</label>\n                        <input type="number" name="min_internal" ng-model="vm.general.min_internal" min="0" ng-required="true" autofocus>\n                        <div ng-messages="generalForm[\'min_internal\'].$error" ng-show="generalForm[\'min_internal\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.MIN_INTERNAL_REQUIRED">Min_Internal field is required</span>\n                            </div>\n                            <div ng-message="min">\n                                <span translate="SETTINGS.ERRORS.MIN_INTERNAL_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Min_Internal must be a valid greater or equal than</span> <span>0</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.general.securePassword" aria-label="Security_Suite"><span translate="SETTINGS.SECURITY_SUITE">Security_Suite</span></md-switch>\n                        <div class="hint"><span translate="SETTINGS.HELP.SECURITY_SUITE"></span></div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.general.callRecordingEncryption" aria-label="Call_Recording_Encryption"><span translate="SETTINGS.CALL_RECORDING_ENCRYPTION">Call_Recording_Encryption</span></md-switch>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="SETTINGS.STUNADDR">Stunaddr</label>\n                        <input type="text" name="stunaddr" ng-model="vm.general.stunaddr">\n                        <div ng-messages="generalForm[\'stunaddr\'].$error" ng-show="generalForm[\'stunaddr\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.STUNADDR_REQUIRED">Stunaddr field is required</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="SETTINGS.TURNADDR">Turnaddr</label>\n                        <input type="text" name="turnaddr" ng-model="vm.general.turnaddr">\n                        <div ng-messages="generalForm[\'turnaddr\'].$error" ng-show="generalForm[\'turnaddr\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.TURNADDR_REQUIRED">Turnaddr field is required</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="SETTINGS.TURN_USERNAME">Turn_Username</label>\n                        <input type="text" name="turnusername" ng-model="vm.general.turnusername">\n                        <div ng-messages="generalForm[\'turnusername\'].$error" ng-show="generalForm[\'turnusername\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.TURN_USERNAME_REQUIRED">Turn_Username field is required</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="SETTINGS.TURN_PASSWORD">Turn_Password</label>\n                        <input type="text" name="turnpassword" ng-model="vm.general.turnpassword">\n                        <div ng-messages="generalForm[\'turnpassword\'].$error" ng-show="generalForm[\'turnpassword\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.TURN_PASSWORD_REQUIRED">Turn_Password field is required</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n\n                </form>\n            </div>\n\n            <div class="general-detail-form-container motionbar md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="SETTINGS.MOTIONBAR">MOTIONBAR</div>\n                </div>\n                <form name="generalForm" novalidate>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.general.phoneBarAutoUpdater" aria-label="MotionbarAutoUpdater"><span translate="SETTINGS.MOTIONBARAUTOUPDATER">MotionbarAutoUpdater</span></md-switch>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.general.phoneBarAutoUpdater" class="md-block">\n                        <label translate="SETTINGS.MOTIONBARAUTOUPDATERURL">MotionbarAutoUpdaterUrl</label>\n                        <input type="url" name="phoneBarAutoUpdaterUrl" ng-model="vm.general.phoneBarAutoUpdaterUrl" ng-required="vm.general.phoneBarAutoUpdater">\n                        <div ng-messages="generalForm[\'phoneBarAutoUpdaterUrl\'].$error" ng-show="generalForm[\'phoneBarAutoUpdaterUrl\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.MOTIONBARAUTOUPDATERURL_REQUIRED">MotionbarAutoUpdaterUrl field is required</span>\n                            </div>\n                            <div ng-message="url">\n                                <span translate="SETTINGS.ERRORS.MOTIONBARAUTOUPDATERURL_MUST_VALID_URL">MotionbarAutoUpdaterUrl must be a valid url http://www.xcally.com</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n\n                </form>\n            </div>\n\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n</div>'),e.put("app/main/apps/settings/views/license/license.html",'<div id="license" class="page-layout simple fullwidth doc-page">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-cog" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="SETTINGS.LICENSE">LICENSE</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n        <div>\n            <md-button type="submit" ng-click="vm.requestLicense()" class="send-button md-raised" translate="SETTINGS.REQUEST_LICENSE" translate-attr-aria-label="SETTINGS.REQUEST_LICENSE">\n                REQUEST LICENSE\n            </md-button>\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n            \x3c!-- LICENSE CARD --\x3e\n            <div layout="row" flex>\n                <md-card class="md-whiteframe-1dp padding-20" flex>\n                    <div layout="row" layout-align="center">\n                        <div flex layout="row" layout-align="start center">\n                            <div ng-if="!vm.license.custom">\n                                <a href="https://www.xcallymotion.com/prices" target="_blank" class="md-button md-fab green-A700-bg" aria-label="Eat cake">\n                                    <md-tooltip><span translate="SETTINGS.PRICES">Prices</span></md-tooltip>\n                                    <md-icon md-font-icon="icon-coin"></md-icon>\n                                </a>\n                            </div>\n                        </div>\n                        <div flex>\n                            <div ng-switch="vm.license.months" class="text-center">\n                                <span ng-switch-when="1" class="md-title md-accent-fg text-bold">{{ \'SETTINGS.PLAN\' | translate }}: <span translate="SETTINGS.MONTH_TO_MONTH">MONTH TO MONTH</span></span>\n                                <span ng-switch-when="12" class="md-title md-accent-fg text-bold">{{ \'SETTINGS.PLAN\' | translate }}: <span translate="SETTINGS.ANNUALLY">ANNUALLY</span></span>\n                                <span ng-switch-when="36" class="md-title md-accent-fg text-bold">{{ \'SETTINGS.PLAN\' | translate }}: <span translate="SETTINGS.PERPETUAL">PERPETUAL</span></span>\n                            </div>\n                        </div>\n                        <div flex layout="row" layout-align="end center">\n                            <div>\n                                <md-button type="submit" ng-click="vm.updateLicense()" class="md-button md-fab md-accent">\n                                    <md-tooltip><span translate="SETTINGS.UPDATE_LICENSE">License</span></md-tooltip>\n                                    <md-icon md-font-icon="icon-pencil"></md-icon>\n                                </md-button>\n                            </div>\n                        </div>\n                    </div>\n\n                    <span ng-if="!vm.license.demo && !vm.license.gray" class="md-subhead md-warn-fg text-center">{{ \'SETTINGS.EXPIRATION_DATE\' | translate }}: {{vm.license.expiration | date: \'longDate\'}}</span>\n                    <span class="text-center padding-bottom-10"> {{ vm.license.machineUuid !== vm.license.uuid ? \'SETTINGS.OLD_TOKEN\' : \'SETTINGS.TOKEN\' | translate }}: <span class="text-italic text-bold">{{vm.license.uuid}}</span></span>\n\n                    <div layout="column">\n                        <span ng-if="vm.license.machineUuid !== vm.license.uuid" class="blink md-subhead md-warn-fg text-center">{{ \'SETTINGS.NEW_TOKEN_DETECTED\' | translate }}</span>\n                        <span ng-if="vm.license.machineUuid !== vm.license.uuid" class="text-center padding-bottom-10"> {{\'SETTINGS.NEW_TOKEN\' | translate }}: <span class="text-italic text-bold">{{vm.license.machineUuid}}</span></span>\n                        <span ng-if="vm.license.gray" class="blink md-subhead md-warn-fg text-center">{{ \'SETTINGS.EXPIRATION_GRAY_PERIOD\' | translate }}: {{vm.license.deadline | date: \'longDate\'}}</span>\n                        <span ng-if="vm.license.machineUuid !== vm.license.uuid || vm.license.gray" class="text-center padding-bottom-10 text-italic text-bold"> {{\'SETTINGS.EXPIRATION_REASON\' | translate }} </span>\n                        <span ng-if="vm.license.gray" class="text-center padding-bottom-10"> {{\'SETTINGS.EXPIRATION_REASON_MESSAGE_GRAY\' | translate }}</span>\n                        <span ng-if="vm.license.machineUuid !== vm.license.uuid" class="text-center padding-bottom-10"> {{\'SETTINGS.EXPIRATION_REASON_MESSAGE_CHANGED\' | translate }}</span>\n                        <span ng-if="vm.license.machineUuid !== vm.license.uuid || vm.license.gray" class="text-center padding-bottom-10 text-italic text-bold" translate="SETTINGS.CONTACT_XCALLY_MOTION_SUPPORT"> Contact xCALLY MOTION Support </span>\n                        <span ng-if="vm.license.machineUuid !== vm.license.uuid" class="text-center padding-bottom-10">{{ \'SETTINGS.SEND_EMAIL_TO\' | translate }}: <a href="mailto:license@xcally.com?subject=New%20token%20detected&body=Hi xCALLY, New Token: {{vm.license.machineUuid}}, Old token: {{vm.license.uuid}}">license@xcally.com</a>.</span>\n                        <span ng-if="vm.license.gray && vm.license.machineUuid === vm.license.uuid" class="text-center padding-bottom-10">{{ \'SETTINGS.SEND_EMAIL_TO\' | translate }}: <a href="mailto:license@xcally.com?subject=License%20expired%20or%20disabled&body=Hi xCALLY, My Token: {{vm.license.machineUuid}}">license@xcally.com</a>.</span>\n                    </div>\n\n                    <div ng-if="vm.license.demo" layout="column">\n                        <span class="md-subhead md-warn-fg text-center">{{ \'SETTINGS.TRIAL_VERSION\' | translate }}</span>\n                        <span class="md-subhead md-warn-fg text-center"><a href="https://www.xcallymotion.com/prices" target="_blank">{{ \'SETTINGS.PRICES\' | translate}}</a></span>\n                    </div>\n\n                    <md-subheader class="md-no-sticky">{{ \'SETTINGS.STAFF\' | translate }}</md-subheader>\n                    <md-divider></md-divider>\n                    <md-list layout="row">\n                        <md-list-item class="md-2-line" flex="33">\n                            <md-icon md-font-icon="icon-account" class="md-avatar-icon"></md-icon>\n                            <div class="md-list-item-text">\n                                <h3>{{ vm.license.users || 0 }} <span ng-class="{\'red-fg\': vm.license.users <= vm.users && vm.license.users > 0}">({{vm.license.users >= vm.users ? vm.users : vm.license.users}})</span></h3>\n                                <p translate="SETTINGS.USERS">Users</p>\n                            </div>\n                        </md-list-item>\n                        <md-list-item class="md-2-line" flex="33">\n                            <md-icon md-font-icon="icon-headphones" class="md-avatar-icon"></md-icon>\n                            <div class="md-list-item-text">\n                                <h3>{{ vm.license.agents || 0 }} <span ng-class="{\'red-fg\': (vm.license.agents <= vm.agents && vm.license.agents > 0) }">({{vm.license.agents >= vm.agents ? vm.agents : vm.license.agents}})</span></h3>\n                                <p translate="SETTINGS.AGENTS">Agents</p>\n                            </div>\n                        </md-list-item>\n                        <md-list-item class="md-2-line" flex="33">\n                            <md-icon md-font-icon="icon-phone" class="md-avatar-icon"></md-icon>\n                            <div class="md-list-item-text">\n                                <h3>{{ vm.license.telephones || 0 }} <span ng-class="{\'red-fg\': vm.license.telephones <= vm.telephones && vm.license.telephones > 0}">({{vm.license.telephones >= vm.telephones ? vm.telephones : vm.license.telephones}})</span></h3>\n                                <p translate="SETTINGS.TELEPHONES">Telephones</p>\n                            </div>\n                        </md-list-item>\n                    </md-list>\n\n                    <md-subheader class="md-no-sticky">{{ \'SETTINGS.CHANNELS\' | translate }}</md-subheader>\n                    <md-divider></md-divider>\n                    <md-list layout="row">\n                        <md-list-item class="md-2-line" ng-repeat="channel in vm.channels" flex="20">\n                            <md-icon md-font-icon="{{channel.icon}}" class="md-avatar-icon" ng-class="vm.license[channel.name] ? \'green-A700-bg\' : \'red-A700-bg\'"></md-icon>\n                            <div class="md-list-item-text">\n                                <h3 translate="SETTINGS.{{channel.name | uppercase}}"></h3>\n                                <p ng-class="vm.license[channel.name] ? \'green-A700-fg\' : \'red-A700-fg\'">{{ \'SETTINGS.\' + (vm.license[channel.name] ? \'ENABLED\' : \'DISABLED\') | translate }}</p>\n                            </div>\n                        </md-list-item>\n                    </md-list>\n\n                    <md-subheader class="md-no-sticky">{{ \'SETTINGS.MODULES\' | translate }}</md-subheader>\n                    <md-divider></md-divider>\n                    <md-list layout="row">\n                        <md-list-item class="md-2-line" ng-repeat="module in vm.modules" flex="33">\n                            <md-icon md-font-icon="{{module.icon}}" class="md-avatar-icon" ng-class="vm.license[module.name] ? \'green-A700-bg\' : \'red-A700-bg\'"></md-icon>\n                            <div class="md-list-item-text">\n                                <h3 translate="SETTINGS.{{module.name | uppercase}}"></h3>\n                                <p ng-class="vm.license[module.name] ? \'green-A700-fg\' : \'red-A700-fg\'">{{ \'SETTINGS.\' + (vm.license[module.name] ? \'ENABLED\' : \'DISABLED\') | translate }}</p>\n                            </div>\n                        </md-list-item>\n                    </md-list>\n\n                    <md-subheader class="md-no-sticky">{{ \'SETTINGS.OTHERS\' | translate }}</md-subheader>\n                    <md-divider></md-divider>\n                    <md-list layout="row">\n                        <div ng-repeat="other in vm.others" ng-switch="other.name" flex="33">\n                            <md-list-item class="md-2-line" ng-switch-when="callysquare">\n                                <md-icon md-font-icon="{{other.icon}}" class="md-avatar-icon green-A700-bg"></md-icon>\n                                <div class="md-list-item-text">\n                                    <div layout="row" layout="start center">\n                                        <h3>Cally Square</h3>\n                                        <button ng-click="vm.gotoProcess($event)" class="md-mini" aria-label="restart">\n                                          <md-tooltip>Restart</md-tooltip>\n                                          <md-icon md-font-icon="icon-reload"></md-icon>\n                                      </button>\n                                    </div>\n                                    <p ng-if="vm.license[other.name]" class="green-A700-fg">{{vm.license[other.name]}} {{ \'SETTINGS.CHANNELS\' | translate }}</p>\n                                    <p ng-if="!vm.license[other.name]" class="green-A700-fg" translate="SETTINGS.UNLIMITED_CHANNELS">UNLIMITED CHANNELS</p>\n                                </div>\n                            </md-list-item>\n                            <md-list-item class="md-2-line" ng-switch-default>\n                                <md-icon md-font-icon="{{other.icon}}" class="md-avatar-icon" ng-class="vm.license[other.name] ? \'green-A700-bg\' : \'red-A700-bg\'"></md-icon>\n                                <div class="md-list-item-text">\n                                    <h3 translate="SETTINGS.{{other.name | uppercase}}"></h3>\n'+"                                    <p ng-class=\"vm.license[other.name] ? 'green-A700-fg' : 'red-A700-fg'\">{{ 'SETTINGS.' + (vm.license[other.name] ? 'ENABLED' : 'DISABLED') | translate }}</p>\n                                </div>\n                            </md-list-item>\n                        </div>\n\n                    </md-list>\n                </md-card>\n            </div>\n            \x3c!-- / LICENSE CARD --\x3e\n\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- NO ADD BUTTON BUTTON --\x3e\n</div>"),e.put("app/main/apps/settings/views/license/request/dialog.html",'<md-dialog class="request-dialog" aria-label="Send Request">\n    <form name="requestForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title" translate="SETTINGS.REQUEST_LICENSE">Request License</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.license.name" required>\n                <div ng-messages="requestForm.name.$error" ng-show="requestForm.name.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.NAME_REQUIRED">Address field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.EMAIL">Email</label>\n                <input type="email" name="email" ng-model="vm.license.email" required>\n                <div ng-messages="requestForm.email.$error" ng-show="requestForm.email.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                    </div>\n                    <div ng-message="email">\n                        <span translate="SETTINGS.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.PLAN">Plan</label>\n                <md-select name="plan" ng-model="vm.license.months" required>\n                    <md-option ng-value="1"><span translate="SETTINGS.MONTH_TO_MONTH">MONTH TO MONTH</span></md-option>\n                    <md-option ng-value="12"><span translate="SETTINGS.ANNUALLY">ANNUALLY</span></md-option>\n                    <md-option ng-value="36"><span translate="SETTINGS.PERPETUAL">PERPETUAL</span></md-option>\n                </md-select>\n                <div ng-messages="requestForm.plan.$error" ng-show="requestForm.plan.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.PLAN_REQUIRED">Plan field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-subheader class="md-no-sticky">{{ \'SETTINGS.STAFF\' | translate }}</md-subheader>\n            <div layout="row" layout-align="space-between center">\n                <md-input-container class="md-block" flex>\n                    <label translate="SETTINGS.USERS">Users</label>\n                    <input type="number" name="users" ng-model="vm.license.users" required>\n                    <div ng-messages="requestForm.users.$error" ng-show="requestForm.users.$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="SETTINGS.ERRORS.USERS_REQUIRED">Users field is required</span>\n                        </div>\n                    </div>\n                </md-input-container>\n                <md-input-container class="md-block" flex>\n                    <label translate="SETTINGS.AGENTS">Agents</label>\n                    <input type="number" name="agents" ng-model="vm.license.agents" required>\n                    <div ng-messages="requestForm.agents.$error" ng-show="requestForm.agents.$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="SETTINGS.ERRORS.AGENTS_REQUIRED">Agents field is required</span>\n                        </div>\n                    </div>\n                </md-input-container>\n                <md-input-container class="md-block" flex>\n                    <label translate="SETTINGS.TELEPHONES">Telephones</label>\n                    <input type="number" name="telephones" ng-model="vm.license.telephones" required>\n                    <div ng-messages="requestForm.telephones.$error" ng-show="requestForm.telephones.$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="SETTINGS.ERRORS.TELEPHONES_REQUIRED">Telephones field is required</span>\n                        </div>\n                    </div>\n                </md-input-container>\n            </div>\n\n            <md-subheader class="md-no-sticky">{{ \'SETTINGS.CHANNELS\' | translate }}</md-subheader>\n            <div layout="row" layout-align="space-between center">\n                <md-switch ng-model="vm.license[channel.name]" aria-label="{{channel.name}}" ng-repeat="channel in vm.channels"><span translate="SETTINGS.{{channel.name | uppercase}}"></span></md-switch>\n            </div>\n\n            <md-subheader class="md-no-sticky">{{ \'SETTINGS.MODULES\' | translate }}</md-subheader>\n            <div layout="row" layout-align="space-between center">\n                <md-switch ng-model="vm.license[module.name]" aria-label="{{module.name}}" ng-repeat="module in vm.modules"><span translate="SETTINGS.{{module.name | uppercase}}"></span></md-switch>\n            </div>\n\n            <md-subheader class="md-no-sticky">{{ \'SETTINGS.OTHERS\' | translate }}</md-subheader>\n            <div layout="row" layout-align="space-between center">\n                <div ng-repeat="other in vm.others" ng-switch="other.name">\n                    <md-input-container class="md-block" flex ng-switch-when="callysquare">\n                        <label>Cally Square ({{ \'SETTINGS.CHANNELS\' | translate }})</label>\n                        <input type="number" name="callysquare" ng-model="vm.license.callysquare" required>\n                        <div class="hint"><span>0={{ \'SETTINGS.UNLIMITED_CHANNELS\' | translate }}</span></div>\n                        <div ng-messages="requestForm.users.$error" ng-show="requestForm.users.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.USERS_REQUIRED">Users field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <div ng-switch-default>\n                        <md-switch ng-model="vm.license[other.name]" aria-label="{{other.name}}"><span translate="SETTINGS.{{other.name | uppercase}}"></span></md-switch>\n                    </div>\n\n                </div>\n            </div>\n\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.DESCRIPTION">Description</label>\n                <textarea name="description" ng-model="vm.license.description"></textarea>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.sendRequest()" class="send-button md-accent md-raised" ng-disabled="requestForm.$invalid || requestForm.$pristine" aria-label="SEND" translate="SETTINGS.SEND" translate-attr-aria-label="SETTINGS.SEND">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/settings/views/networks/create/dialog.html",'<md-dialog class="network-dialog" aria-label="New Network">\n    <form name="networkForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.network.type" required autofocus>\n                    <md-option ng-value="\'localnet\'">LocalNET</md-option>\n                    <md-option ng-value="\'externip\'">ExternIP</md-option>\n                </md-select>\n                <div ng-messages="networkForm[\'type\'].$error" ng-show="networkForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.network.type == \'localnet\'" class="md-block">\n                <label translate="SETTINGS.LOCALNETADDRESS">localNetAddress</label>\n                <input type="text" name="value" ng-model="vm.network.value" ng-pattern="/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/"\n                    ng-required="true">\n                <div class="hint"><span translate="SETTINGS.HELP.LOCALNETADDRESS"></span></div>\n                <div ng-messages="networkForm[\'value\'].$error" ng-show="networkForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.LOCALNETADDRESS_REQUIRED">localNetAddress field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="SETTINGS.ERRORS.LOCALNETADDRESS_MUST_VALID_PATTERN" translate-values="{ regex: \'/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/\' }">localNetAddress must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.network.type == \'externip\'" class="md-block">\n                <label translate="SETTINGS.ADDRESS">Address</label>\n                <input type="text" name="value" ng-model="vm.network.value" ng-pattern="/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/" ng-required="true">\n                <div class="hint"><span translate="SETTINGS.HELP.ADDRESS"></span></div>\n                <div ng-messages="networkForm[\'value\'].$error" ng-show="networkForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.ADDRESS_REQUIRED">Address field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="SETTINGS.ERRORS.ADDRESS_MUST_VALID_PATTERN" translate-values="{ regex: \'/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/\' }">Address must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newNetwork" ng-click="vm.saveNetwork()" class="send-button md-accent md-raised" ng-disabled="networkForm.$invalid || networkForm.$pristine" aria-label="SAVE" translate="SETTINGS.SAVE" translate-attr-aria-label="SETTINGS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newNetwork" ng-click="vm.addNewNetwork()" class="send-button md-accent md-raised" ng-disabled="networkForm.$invalid" aria-label="ADD" translate="SETTINGS.ADD_NETWORK" translate-attr-aria-label="SETTINGS.ADD_NETWORK">\n                    ADD NETWORK\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newNetwork" ng-click="vm.deleteNetwork($event)" aria-label="DELETE" translate translate-attr-aria-label="SETTINGS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="SETTINGS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/settings/views/networks/networks.html",'<div id="networks" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-cog" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="SETTINGS.NETWORKS">Networks</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="SETTINGS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedNetworks.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedNetworks =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="SETTINGS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-networks-count">\n                    <span>{{vm.selectedNetworks.length}}</span>\n                <span translate="SETTINGS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="NETWORKS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllNetworks()" translate="SETTINGS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectNetworks()" translate="SETTINGS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedNetworks" csv-label="true" filename="networks.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedNetworks($event)" aria-label="delete selected" translate translate-attr-label="NETWORKS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- NETWORK TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedNetworks" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getNetworks">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'SETTINGS.ID\' | translate }}</th>\n                                <th md-column md-order-by="type">{{ \'SETTINGS.TYPE\' | translate }}</th>\n                                <th md-column md-order-by="value">{{ \'SETTINGS.ADDRESS\' | translate }}</th>\n                                <th md-column md-order-by="createdAt">{{ \'SETTINGS.CREATED_AT\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.networks.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="SETTINGS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="network" md-select-id="id" ng-repeat="network in vm.networks.rows">\n                                <td md-cell ng-if="network.userpic"><img class="avatar" alt="{{network.name}}" ng-src="api/users/{{network.id}}/avatar" /></td>\n                                <td md-cell ng-if="!network.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{network.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditNetwork($event, network)" md-cell class="id ">{{network.id}}</td>\n                                <td ng-click="vm.createOrEditNetwork($event, network)" md-cell class="type ">{{ vm.arraytype[network.type].option }}</td>\n                                <td ng-click="vm.createOrEditNetwork($event, network)" md-cell class="value ">{{network.value}}</td>\n                                <td ng-click="vm.createOrEditNetwork($event, network)" md-cell class="createdAt ">{{network.createdAt | date:\'medium\' }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="SETTINGS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(network, $event)" translate="SETTINGS.EDIT_NETWORK">\n                                                    Edit Network\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(network, $event)" translate="SETTINGS.DELETE_NETWORK">\n                                                    Delete Network\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'SETTINGS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'SETTINGS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'SETTINGS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.networks.count}}" md-on-paginate="vm.getNetworks" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / NETWORK TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD NETWORK BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-network-button" ng-click="vm.createOrEditNetwork($event)" aria-label="add network" translate translate-attr-aria-label="SETTINGS.ADD_NETWORK">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD NETWORK BUTTON --\x3e\n</div>'),e.put("app/main/apps/settings/views/smtps/create/dialog.html",'<md-dialog class="smtp-dialog" aria-label="New Smtp">\n    <form name="smtpForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.ACCOUNTNAME">AccountName</label>\n                <input type="text" name="name" ng-model="vm.smtp.name" ng-required="true" autofocus>\n                <div ng-messages="smtpForm[\'name\'].$error" ng-show="smtpForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.ACCOUNTNAME_REQUIRED">AccountName field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.EMAILADDRESS">EmailAddress</label>\n                <input type="email" name="email" ng-model="vm.smtp.email" ng-required="true">\n                <div class="hint"><span translate="SETTINGS.HELP.EMAILADDRESS"></span></div>\n                <div ng-messages="smtpForm[\'email\'].$error" ng-show="smtpForm[\'email\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.EMAILADDRESS_REQUIRED">EmailAddress field is required</span>\n                    </div>\n                    <div ng-message="email">\n                        <span translate="SETTINGS.ERRORS.EMAILADDRESS_MUST_VALID">EmailAddress must be a valid e-mail address</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.SMTP_SERVICE">SMTP_Service</label>\n                <md-select name="Smtp.service" ng-model="vm.smtp.Smtp.service" required>\n                    <md-option ng-value="null">Custom</md-option>\n                    <md-option ng-value="\'gmail\'">Gmail</md-option>\n                    <md-option ng-value="\'hotmail\'">Hotmail</md-option>\n                    <md-option ng-value="\'yahoo\'">Yahoo</md-option>\n                    <md-option ng-value="\'outlook365\'">Outlook365</md-option>\n                </md-select>\n                <div ng-messages="smtpForm[\'Smtp.service\'].$error" ng-show="smtpForm[\'Smtp.service\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.SMTP_SERVICE_REQUIRED">SMTP_Service field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.smtp.Smtp.service == null" class="md-block">\n                <label translate="SETTINGS.SMTP_HOST">SMTP_Host</label>\n                <input type="text" name="Smtp.host" ng-model="vm.smtp.Smtp.host" ng-required="true">\n                <div ng-messages="smtpForm[\'Smtp.host\'].$error" ng-show="smtpForm[\'Smtp.host\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.SMTP_HOST_REQUIRED">SMTP_Host field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.smtp.Smtp.service == null" class="md-block">\n                <label translate="SETTINGS.SMTP_PORT">SMTP_Port</label>\n                <input type="number" name="Smtp.port" ng-model="vm.smtp.Smtp.port" ng-required="true">\n                <div ng-messages="smtpForm[\'Smtp.port\'].$error" ng-show="smtpForm[\'Smtp.port\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.SMTP_PORT_REQUIRED">SMTP_Port field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.smtp.Smtp.service == null" class="md-block">\n                <md-switch ng-model="vm.smtp.Smtp.secure" aria-label="SMTP_Secure"><span translate="SETTINGS.SMTP_SECURE">SMTP_Secure</span></md-switch>\n                <div class="hint"><span translate="SETTINGS.HELP.SMTP_SECURE"></span></div>\n            </md-input-container>\n            <md-input-container ng-if="vm.smtp.Smtp.service == null" class="md-block">\n                <md-switch ng-model="vm.smtp.Smtp.authentication" aria-label="SMTP_Authentication"><span translate="SETTINGS.SMTP_AUTHENTICATION">SMTP_Authentication</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="vm.smtp.Smtp.authentication == true || vm.smtp.Smtp.service != null" class="md-block">\n                <label translate="SETTINGS.SMTP_USERNAME">SMTP_Username</label>\n                <input type="text" name="Smtp.user" ng-model="vm.smtp.Smtp.user" ng-required="true">\n                <div class="hint"><span translate="SETTINGS.HELP.SMTP_USERNAME"></span></div>\n                <div ng-messages="smtpForm[\'Smtp.user\'].$error" ng-show="smtpForm[\'Smtp.user\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.SMTP_USERNAME_REQUIRED">SMTP_Username field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.smtp.Smtp.authentication == true || vm.smtp.Smtp.service != null">\n                <label translate="SETTINGS.SMTP_PASSWORD">SMTP_Password</label>\n                <input type="password" name="Smtp.pass" ng-model="vm.smtp.Smtp.pass" placeholder="Password" translate translate-attr-placeholder="SETTINGS.PASSWORD" required>\n                <div class="hint"><span translate="SETTINGS.HELP.SMTP_PASSWORD"></span></div>\n                <div ng-messages="smtpForm[\'Smtp.pass\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="SETTINGS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.DESCRIPTION">Description</label>\n                <input type="" name="description" ng-model="vm.smtp.description">\n                <div ng-messages="smtpForm[\'description\'].$error" ng-show="smtpForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSmtp" ng-click="vm.saveSmtp()" class="send-button md-accent md-raised" ng-disabled="smtpForm.$invalid || smtpForm.$pristine" aria-label="SAVE" translate="SETTINGS.SAVE" translate-attr-aria-label="SETTINGS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSmtp" ng-click="vm.addNewSmtp()" class="send-button md-accent md-raised" ng-disabled="smtpForm.$invalid" aria-label="ADD" translate="SETTINGS.ADD_SMTP" translate-attr-aria-label="SETTINGS.ADD_SMTP">\n                    ADD SMTP\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSmtp" ng-click="vm.deleteSmtp($event)" aria-label="DELETE" translate translate-attr-aria-label="SETTINGS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="SETTINGS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/settings/views/smtps/smtps.html",'<div id="smtps" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-cog" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="SETTINGS.SMTP">Smtp</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div>\n            <md-button type="submit" ng-click="vm.verifySmtp()" ng-disabled="!vm.smtp.id" class="send-button md-accent md-raised" translate="SETTINGS.VERIFY" translate-attr-aria-label="SETTINGS.VERIFY">\n                VERIFY\n            </md-button>\n            <md-button type="submit" ng-click="vm.saveSmtp()" ng-disabled="smtpForm.$pristine || smtpForm.$invalid" class="send-button md-accent md-raised" translate="SETTINGS.SAVE" translate-attr-aria-label="SETTINGS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            <div class="smtp-detail-form-container general md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="SETTINGS.GENERAL">GENERAL</div>\n                </div>\n                <form name="smtpForm" novalidate>\n                    <md-input-container class="md-block">\n                        <label translate="SETTINGS.ACCOUNTNAME">AccountName</label>\n                        <input type="text" name="name" ng-model="vm.smtp.name" ng-required="true" autofocus>\n                        <div ng-messages="smtpForm[\'name\'].$error" ng-show="smtpForm[\'name\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.ACCOUNTNAME_REQUIRED">AccountName field is required</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="SETTINGS.EMAILADDRESS">EmailAddress</label>\n                        <input type="email" name="email" ng-model="vm.smtp.email" ng-required="true">\n                        <div class="hint"><span translate="SETTINGS.HELP.EMAILADDRESS"></span></div>\n                        <div ng-messages="smtpForm[\'email\'].$error" ng-show="smtpForm[\'email\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.EMAILADDRESS_REQUIRED">EmailAddress field is required</span>\n                            </div>\n                            <div ng-message="email">\n                                <span translate="SETTINGS.ERRORS.EMAILADDRESS_MUST_VALID">EmailAddress must be a valid e-mail address</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="SETTINGS.SMTP_SERVICE">SMTP_Service</label>\n                        <md-select name="Smtp.service" ng-model="vm.smtp.Smtp.service" required>\n                            <md-option ng-value="null">Custom</md-option>\n                            <md-option ng-value="\'gmail\'">Gmail</md-option>\n                            <md-option ng-value="\'hotmail\'">Hotmail</md-option>\n                            <md-option ng-value="\'yahoo\'">Yahoo</md-option>\n                            <md-option ng-value="\'outlook365\'">Outlook365</md-option>\n                        </md-select>\n                        <div ng-messages="smtpForm[\'Smtp.service\'].$error" ng-show="smtpForm[\'Smtp.service\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.SMTP_SERVICE_REQUIRED">SMTP_Service field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.smtp.Smtp.service == null" class="md-block">\n                        <label translate="SETTINGS.SMTP_HOST">SMTP_Host</label>\n                        <input type="text" name="Smtp.host" ng-model="vm.smtp.Smtp.host" ng-required="true">\n                        <div ng-messages="smtpForm[\'Smtp.host\'].$error" ng-show="smtpForm[\'Smtp.host\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.SMTP_HOST_REQUIRED">SMTP_Host field is required</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.smtp.Smtp.service == null" class="md-block">\n                        <label translate="SETTINGS.SMTP_PORT">SMTP_Port</label>\n                        <input type="number" name="Smtp.port" ng-model="vm.smtp.Smtp.port" ng-required="true">\n                        <div ng-messages="smtpForm[\'Smtp.port\'].$error" ng-show="smtpForm[\'Smtp.port\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.SMTP_PORT_REQUIRED">SMTP_Port field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.smtp.Smtp.service == null" class="md-block">\n                        <md-switch ng-model="vm.smtp.Smtp.secure" aria-label="SMTP_Secure"><span translate="SETTINGS.SMTP_SECURE">SMTP_Secure</span></md-switch>\n                        <div class="hint"><span translate="SETTINGS.HELP.SMTP_SECURE"></span></div>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.smtp.Smtp.service == null" class="md-block">\n                        <md-switch ng-model="vm.smtp.Smtp.authentication" aria-label="SMTP_Authentication"><span translate="SETTINGS.SMTP_AUTHENTICATION">SMTP_Authentication</span></md-switch>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.smtp.Smtp.authentication == true || vm.smtp.Smtp.service != null" class="md-block">\n                        <label translate="SETTINGS.SMTP_USERNAME">SMTP_Username</label>\n                        <input type="text" name="Smtp.user" ng-model="vm.smtp.Smtp.user" ng-required="true">\n                        <div class="hint"><span translate="SETTINGS.HELP.SMTP_USERNAME"></span></div>\n                        <div ng-messages="smtpForm[\'Smtp.user\'].$error" ng-show="smtpForm[\'Smtp.user\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.SMTP_USERNAME_REQUIRED">SMTP_Username field is required</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block" ng-if="vm.smtp.Smtp.authentication == true || vm.smtp.Smtp.service != null">\n                        <label translate="SETTINGS.SMTP_PASSWORD">SMTP_Password</label>\n                        <input type="password" name="Smtp.pass" ng-model="vm.smtp.Smtp.pass" placeholder="Password" translate translate-attr-placeholder="SETTINGS.PASSWORD" required>\n                        <div class="hint"><span translate="SETTINGS.HELP.SMTP_PASSWORD"></span></div>\n                        <div ng-messages="smtpForm[\'Smtp.pass\'].$error" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                            </div>\n                            <div ng-message="pattern">\n                                <span translate="SETTINGS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n\n                    <md-input-container class="md-block">\n                        <label translate="SETTINGS.DESCRIPTION">Description</label>\n                        <input type="" name="description" ng-model="vm.smtp.description">\n                        <div ng-messages="smtpForm[\'description\'].$error" ng-show="smtpForm[\'description\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n\n                </form>\n            </div>\n\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n</div>'),e.put("app/main/apps/settings/views/system/system.html",'<div id="system" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n          <md-icon md-font-icon="icon-cog" class="s24"></md-icon>\n        </span>\n                <span class="logo-text" translate="SETTINGS.SYSTEM">SYSTEM</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" md-border-bottom flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SETTINGS.GENERAL">GENERAL</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="system-detail-form-container personal_info md-background-bg md-whiteframe-1dp">\n                        <md-card class="md-whiteframe-1dp padding-20" layout="row" layout-xs="column" layout-wrap>\n                            <ms-widget flex="50" flex-xs="100">\n                                \x3c!-- Front --\x3e\n                                <ms-widget-front class="white-bg">\n                                    <div class="ph-16 pt-16 pb-8 md-accent-bg">\n                                        <div class="h3">OS</div>\n                                    </div>\n\n                                    <div layout="row" layout-align="start center" layout-wrap>\n                                        <div flex="100" flex-gt-md="100">\n                                            <div class="p-16 pb-32">\n                                                <div class="h4">{{vm.system.system.manufacturer}} {{vm.system.system.model}}</div>\n                                                <div class="h4">{{vm.system.cpu.manufacturer}} {{vm.system.cpu.brand}} - {{vm.system.cpu.speed}} GHz - {{vm.system.cpu.cores}} Cores</div>\n                                                <div class="h4">{{vm.system.os.distro}} - {{vm.system.os.release}} - Kernel: {{vm.system.os.kernel}}</div>\n                                                <div class="h4">Node.js: {{vm.system.node}}</div>\n                                                <div class="h4">Host: {{vm.system.os.hostname}} - Uptime: {{vm.system.time.uptime / 60 | number:0}} m</div>\n                                                <div class="h4">TimeZone: {{vm.system.time.timezone}} ({{vm.system.time.timezoneName}})</div>\n                                            </div>\n                                        </div>\n                                    </div>\n                                </ms-widget-front>\n                                \x3c!-- / Front --\x3e\n                            </ms-widget>\n                            <ms-widget flex="25" flex-xs="100">\n                                \x3c!-- Front --\x3e\n                                <ms-widget-front class="white-bg">\n                                    <div class="ph-16 pt-16 pb-8 md-accent-bg md-hue-1">\n                                        <div class="h3">CPU</div>\n                                    </div>\n\n                                    <div layout="row" layout-align="start center" layout-wrap>\n                                        <div flex="100" flex-gt-md="100">\n                                            <div class="p-16 pb-32">\n                                                <div class="pb-8" layout="row" layout-align="space-between start">\n                                                    <span class="h3" translate="SETTINGS.AVG_LOAD">AVG Load</span>\n                                                    <span class="h3 secondary-text font-weight-500">{{vm.system.currentLoad.avgload * 100 | number:0}}%</span>\n                                                </div>\n                                                <md-progress-linear class="red" md-mode="determinate" value="{{vm.system.currentLoad.avgload * 100 | number:0}}"></md-progress-linear>\n                                            </div>\n                                        </div>\n                                    </div>\n                                </ms-widget-front>\n                                \x3c!-- / Front --\x3e\n                            </ms-widget>\n                            <ms-widget flex="25" flex-xs="100">\n                                \x3c!-- Front --\x3e\n                                <ms-widget-front class="white-bg">\n                                    <div class="ph-16 pt-16 pb-8 md-accent-bg md-hue-3">\n                                        <div class="h3">MEM</div>\n                                    </div>\n\n                                    <div layout="row" layout-align="start center" layout-wrap>\n                                        <div flex="100" flex-gt-md="100">\n                                            <div class="p-16 pb-32">\n                                                <div class="h4">{{\'SETTINGS.TOTAL\' | translate}}: {{vm.system.mem.total / 1024 / 1024 / 1024 | number:0}} GB</div>\n                                                <div class="h4">{{\'SETTINGS.FREE\' | translate}}: {{vm.system.mem.available / 1024 / 1024 / 1024 | number:0}} GB</div>\n                                                <div class="h4">{{\'SETTINGS.USED\' | translate}}: {{vm.system.mem.active / 1024 / 1024 / 1024 | number:0}} GB</div>\n                                            </div>\n                                            <div class="p-16 pb-32">\n                                                <div class="pb-8" layout="row" layout-align="space-between start">\n                                                    <span class="h3" translate="SETTINGS.USED">Used</span>\n                                                    <span class="h3 secondary-text font-weight-500">{{(vm.system.mem.active / vm.system.mem.total) * 100 | number : 0}}%</span>\n                                                </div>\n                                                <md-progress-linear class="md-warn" md-mode="determinate" value="{{(vm.system.mem.active / vm.system.mem.total) * 100 | number : 0 }}"></md-progress-linear>\n\n                                            </div>\n                                        </div>\n                                    </div>\n                                </ms-widget-front>\n                                \x3c!-- / Front --\x3e\n                            </ms-widget>\n                        </md-card>\n\n                        <md-card class="md-whiteframe-1dp padding-20" layout="row" layout-xs="column" layout-wrap>\n                            <ms-widget ng-repeat="disk in vm.system.fsSize" flex="25" flex-xs="100">\n                                \x3c!-- Front --\x3e\n                                <ms-widget-front class="white-bg">\n                                    <div class="ph-16 pt-16 pb-8 md-accent-bg md-hue-3">\n                                        <div class="h3">DISK {{$index + 1}}</div>\n                                    </div>\n\n                                    <div layout="row" layout-align="start center" layout-wrap>\n                                        <div flex="100" flex-gt-md="100">\n                                            <div class="p-16 pb-32">\n                                                <div class="h4">{{\'SETTINGS.FILE_SYSTEM\' | translate}}: {{disk.fs}}</div>\n                                                <div class="h4">{{\'SETTINGS.MOUNT_POINT\' | translate}}: "{{disk.mount}}"</div>\n                                                <div class="h4">{{\'SETTINGS.TOTAL\' | translate}}: {{disk.size / 1024 / 1024 / 1024 | number:0}} GB</div>\n                                                <div class="h4">{{\'SETTINGS.USED\' | translate}}: {{disk.used / 1024 / 1024 / 1024 | number:0}} GB</div>\n                                            </div>\n                                            <div class="p-16 pb-32">\n                                                <div class="pb-8" layout="row" layout-align="space-between start">\n                                                    <span class="h3" translate="SETTINGS.USED">Used</span>\n                                                    <span class="h4 secondary-text font-weight-500">{{disk.use | number:0}}%</span>\n                                                </div>\n                                                <md-progress-linear class="red" md-mode="determinate" value="{{disk.use | number:0}}"></md-progress-linear>\n                                            </div>\n                                        </div>\n                                    </div>\n                                </ms-widget-front>\n                                \x3c!-- / Front --\x3e\n                            </ms-widget>\n                        </md-card>\n\n                        <md-card class="md-whiteframe-1dp padding-20" layout="row" layout-xs="column" layout-wrap>\n                            <ms-widget ng-repeat="net in vm.system.net" flex="25" flex-xs="100">\n                                \x3c!-- Front --\x3e\n                                <ms-widget-front class="white-bg">\n                                    <div class="ph-16 pt-16 pb-8 md-accent-bg md-hue-3">\n                                        <div class="h3">NET {{$index + 1}}</div>\n                                    </div>\n\n                                    <div layout="row" layout-align="start center" layout-wrap>\n                                        <div flex="100" flex-gt-md="100">\n                                            <div class="p-16 pb-32">\n                                                <div class="h4">{{\'SETTINGS.INTERFACE\' | translate}}: {{net.iface}}</div>\n                                                <div class="h4">IPv4: {{net.ip4}}</div>\n                                                <div class="h4">IPv6: {{net.ip6}}</div>\n                                                <div class="h4">MAC: {{net.mac}}</div>\n                                            </div>\n                                        </div>\n                                    </div>\n                                </ms-widget-front>\n                                \x3c!-- / Front --\x3e\n                            </ms-widget>\n                        </md-card>\n\n                        <md-card class="md-whiteframe-1dp padding-20" layout="row">\n                            <div flex>\n                                <md-toolbar class="md-table-toolbar md-default">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead" translate="SETTINGS.TOP_N_PROCESSES" translate-values="{value: vm.processLimit}"></span>\n                                        <div flex></div>\n                                        <ms-search-bar on-search="vm.searchTerm1 = query" on-collapse="vm.searchTerm1 = undefined" debounce="300"></ms-search-bar>\n                                    </div>\n                                </md-toolbar>\n                                <md-table-container>\n                                    <table md-table>\n                                        <thead md-head>\n                                            <tr md-row>\n                                                <th md-column>pid</th>\n                                                <th md-column>{{\'SETTINGS.NAME\' | translate}}</th>\n                                                <th md-column>{{\'SETTINGS.STATE\' | translate}}</th>\n                                                <th md-column>pmem</th>\n                                                <th md-column>pcpu</th>\n                                            </tr>\n                                        </thead>\n                                        <tbody md-body>\n                                            <tr md-row ng-repeat="process in vm.system.processes.list | limitTo: vm.processLimit | filter: vm.searchTerm1 | orderBy:\'-pcpu\'">\n                                                <td md-cell>{{process.pid}}</td>\n                                                <td md-cell>{{process.command}}</td>\n                                                <td md-cell>\n                                                    <span class="text-boxed white-fg" ng-class="{\n                          \'green-600-bg\': process.state == \'running\',\n                          \'yellow-600-bg\': process.state == \'sleeping\',\n                          \'red-600-bg\': process.state == \'blocked\'}">{{process.state | uppercase}}</span>\n                                                </td>\n                                                <td md-cell>{{process.pmem}}%</td>\n                                                <td md-cell>{{process.pcpu}}%</td>\n                                            </tr>\n                                        </tbody>\n                                    </table>\n                                </md-table-container>\n                            </div>\n                        </md-card>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SETTINGS.PROCESSES">PROCESSES</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="system-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <md-card class="md-whiteframe-1dp padding-20" flex>\n                            <md-toolbar class="md-table-toolbar md-default">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="SETTINGS.MOTION_PROCESS_MANAGEMENT"></span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm.searchTerm2 = query" on-collapse="vm.searchTerm2 = undefined" debounce="300"></ms-search-bar>\n                                    <md-button ng-click="vm.getProcesses()" class="md-icon-button" aria-label="Reload">\n                                        <md-icon md-font-icon="icon-reload" class="s24"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table>\n                                    <thead md-head>\n                                        <tr md-row>\n                                            <th md-column>id</th>\n                                            <th md-column>pid</th>\n                                            <th md-column>{{\'SETTINGS.NAME\' | translate}}</th>\n                                            <th md-column>{{\'SETTINGS.STATE\' | translate}}</th>\n                                            <th md-column>MEM</th>\n                                            <th md-column>CPU</th>\n                                            <th md-column width="20px">Actions</th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row ng-repeat="process in vm.processes | filter: vm.searchTerm2 | orderBy:\'-monit.cpu\'">\n                                            <td md-cell>{{process.pm_id}}</td>\n                                            <td md-cell>{{process.pid}}</td>\n                                            <td md-cell>{{process.name == \'agi\' ? \'agi (Cally Square IVR)\' : process.name}}</td>\n                                            <td md-cell>\n                                                <span class="text-boxed white-fg" ng-class="{\'green-600-bg\': process.pm2_env.status == \'online\', \'red-600-bg\': process.pm2_env.status == \'stopped\'}">{{process.pm2_env.status | uppercase}}</span>\n                                            </td>\n                                            <td md-cell>{{process.monit.memory / 1024 / 1024 | number:0}} MB</td>\n                                            <td md-cell>{{process.monit.cpu}}%</td>\n                                            <td md-cell>\n                                                <md-button ng-if="process.pm2_env.status !== \'online\'" ng-click="vm.updateProcess($event, process.pm_id, \'online\')" class="md-icon-button" aria-label="Play">\n                                                    <md-icon md-font-icon="icon-play" class="s24"></md-icon>\n                                                </md-button>\n                                                <md-button ng-if="process.pm2_env.status === \'online\'" ng-click="vm.updateProcess($event, process.pm_id, \'stopped\')" class="md-icon-button" aria-label="Stop">\n                                                    <md-icon md-font-icon="icon-stop" class="s24"></md-icon>\n                                                </md-button>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                    <tfoot md-foot>\n                                        <tr md-row>\n                                            <td md-cell></td>\n                                            <td md-cell></td>\n                                            <td md-cell></td>\n                                            <td md-cell></td>\n                                            <td md-cell>{{ (vm.processes | map: \'monit.memory\' | sum) / 1024 / 1024 | number:0 }} MB</td>\n                                            <td md-cell></td>\n                                            <td md-cell></td>\n                                        </tr>\n                                    </tfoot>\n                                </table>\n                            </md-table-container>\n                        </md-card>\n                        <md-card class="md-whiteframe-1dp padding-20" flex>\n                            <md-toolbar class="md-table-toolbar md-default">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="SETTINGS.USEFUL_COMMANDS"></span>\n                                    <div flex></div>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table>\n                                    <thead md-head>\n                                        <tr md-row>\n                                            <th md-column width="30%">{{\'SETTINGS.COMMAND\' | translate}}</th>\n                                            <th md-column>{{\'SETTINGS.DESCRIPTION\' | translate}}</th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr>\n                                            <td md-cell class="no-border">pm2 list</td>\n                                            <td md-cell class="no-border">{{ \'SETTINGS.PM2_LIST\' | translate}}</td>\n                                        </tr>\n                                        <tr>\n                                            <td md-cell class="no-border">pm2 start &lt;id | name&gt;</td>\n                                            <td md-cell class="no-border">{{ \'SETTINGS.PM2_START\' | translate}}</td>\n                                        </tr>\n                                        <tr>\n                                            <td md-cell class="no-border">pm2 stop &lt;id | name | all&gt;</td>\n                                            <td md-cell class="no-border">{{ \'SETTINGS.PM2_STOP\' | translate}}</td>\n                                        </tr>\n                                        <tr>\n                                            <td md-cell class="no-border">pm2 restart &lt;id | name&gt;</td>\n                                            <td md-cell class="no-border">{{ \'SETTINGS.PM2_RESTART\' | translate}}</td>\n                                        </tr>\n                                        <tr>\n                                            <td md-cell class="no-border">pm2 logs [id | name]</td>\n                                            <td md-cell class="no-border">{{ \'SETTINGS.PM2_LOGS\' | translate}}</td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                        </md-card>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/settings/views/updates/update/dialog.html",'<md-dialog aria-label="Update">\n    <form name="updateForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n            </div>\n        </md-toolbar>\n\n        <div md-background-bg layout="row" layout-align="start start">\n            <md-progress-linear md-mode="determinate" value="{{vm.progress}}" class="md-warn"></md-progress-linear>\n        </div>\n\n        <md-dialog-content ms-scroll>\n            <div layout="row" layout-align="center center">\n                <div ng-if="vm.updating" layout="column" layout-align="center center">\n                    <span class="text-center md-title">Grab a quick coffee and</span>\n                    <span class="text-center md-title">get back here as soon as completed!</span>\n                    <span class="text-center md-title">{{vm.output}}</span>\n                </div>\n                <div ng-if="!vm.updating">\n                    <div ng-if="vm.success" layout="column" layout-align="center center">\n                        <span class="text-center md-title">Update Completed! Thank you for your time.</span>\n                        <span class="text-center md-title">In order to complete the update,</span>\n                        <span class="text-center md-title">please click on reload button</span>\n                    </div>\n                    <div ng-if="!vm.success" layout="column" layout-align="center center">\n                        <span class="text-center md-title">Update Error!</span>\n                        <span class="text-center md-title">Please contact your administrator!</span>\n                        <span class="text-center md-title">{{vm.output}}</span>\n                    </div>\n                </div>\n                <img src="assets/images/business/users.jpg" alt="" width="128" height="128" />\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions ng-if="!vm.updating" layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.reload()" class="send-button md-warm md-raised" aria-label="RELOAD" translate="SETTINGS.RELOAD" translate-attr-aria-label="SETTINGS.RELOAD">\n                    RELOAD\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/settings/views/updates/updates.html",'<div id="updates" class="page-layout simple fullwidth doc-page">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-cog" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="SETTINGS.UPDATES">UPDATES</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- UPDATE CARD --\x3e\n            <div layout="row" ng-if="!vm.updating">\n                <md-card class="md-whiteframe-1dp padding-20" flex>\n                    <div layout="column" layout-align="center center">\n\n                        <span class="md-title md-accent-fg padding-20 text-bold" translate="SETTINGS.CURRENT_VERSION">CURRENT VERSION</span>\n\n                        <span class="md-display-3 padding-20">{{vm.version.current}}</span>\n\n                        <md-button href="https://wiki.xcallymotion.com/display/XMV/Motion+GUI#MotionGUI-Version{{vm.version.current}}" target="_blank" class="md-accent" title="CHANGELOG" aria-label="CHANGELOG" translate="SETTINGS.CHANGELOG" translate-attr-aria-label="SETTINGS.CHANGELOG">\n                            CHANGELOG\n                        </md-button>\n                    </div>\n                </md-card>\n                <md-card class="md-whiteframe-20dp padding-20" flex ng-if="vm.version.current != vm.version.latest">\n                    <div layout="column" layout-align="center center">\n\n                        <span class="md-title md-warn-fg padding-20 text-bold" translate="SETTINGS.NEW_VERSION">NEW VERSION</span>\n\n                        <span class="md-display-3 padding-20">{{vm.version.latest}}</span>\n\n                        <md-button href="https://wiki.xcallymotion.com/display/XMV/Motion+GUI#MotionGUI-Version{{vm.version.latest}}" target="_blank" class="md-accent" title="CHANGELOG" aria-label="CHANGELOG" translate="SETTINGS.CHANGELOG" translate-attr-aria-label="SETTINGS.CHANGELOG">\n                            CHANGELOG\n                        </md-button>\n                        <md-button ng-click="vm.updateConfirm($event)" class="md-raised md-warn" aria-label="CHANGELOG" translate="SETTINGS.UPDATE" translate-attr-aria-label="SETTINGS.UPDATE">UPDATE</md-button>\n                    </div>\n                </md-card>\n                <md-card class="md-whiteframe-1dp padding-20" flex ng-if="vm.version.current == vm.version.latest">\n                    <div layout="column" layout-align="center center">\n\n                        <span class="md-title md-warn-fg padding-20 text-bold" translate="SETTINGS.REMOTE_VERSION">REMOTE VERSION</span>\n\n                        <span class="md-subhead padding-20" translate="SETTINGS.NO_NEW_VERSION_AVAILABLE">NO NEW VERSION AVAILABLE</span>\n                    </div>\n                </md-card>\n            </div>\n            \x3c!-- / UPDATE CARD --\x3e\n\n            <div ng-if="vm.updating">\n                <md-card class="md-whiteframe-1dp padding-20" flex>\n                    <div layout="column" layout-align="center center">\n                        <span class="md-title md-accent-fg padding-20 text-bold" translate="SETTINGS.UPDATING">...</span>\n                        <md-progress-linear md-mode="determinate" class="md-accent padding-20" value="{{vm.progress}}"></md-progress-linear>\n                        <span class="md-display-1 padding-5 text-center">Grab a quick coffee and</span>\n                        <span class="md-display-1 padding-5 text-center">get back here as soon as completed</span>\n                        <img src="assets/images/business/users.jpg" alt="" width="40%" height="40%" />\n                    </div>\n                </md-card>\n            </div>\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- NO ADD BUTTON BUTTON --\x3e\n</div>'),e.put("app/main/apps/sms/views/realtime/agents/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="SMS.AGENTS">Agents</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query; vm.onInit()" on-collapse="vm.query.filter = undefined; vm.onInit()" debounce="300"></ms-search-bar>\n        \x3c!-- <md-button class="md-icon-button" ng-click="vm.showInfo($event)">\n      <i class="icon-information-outline grey-600-fg">\n        <md-tooltip>{{\'VOICE.INFO\' | translate}}</md-tooltip>\n      </i>\n    </md-button> --\x3e\n        <md-select ng-model="vm.query.globalStatusFilter" class="md-caption" ng-change="vm.query.pauseTypeFilter = \'\'; vm.onInit()">\n            <md-option ng-value="\'\'">{{ \'SMS.ALL\' | translate }}</md-option>\n            <md-option value="pause">{{ \'SMS.PAUSE\' | translate }}</md-option>\n            <md-option value="*pause">{{ \'SMS.PARTIALPAUSE\' | translate }}</md-option>\n            <md-option value="busy">{{ \'SMS.BUSY\' | translate }}</md-option>\n            <md-option value="idle">{{ \'SMS.IDLE\' | translate }}</md-option>\n        </md-select>\n\n        <md-select ng-if="vm.isPause(vm.query.globalStatusFilter)" ng-model="vm.query.pauseTypeFilter" class="md-caption" ng-change="vm.onInit()">\n            <md-option ng-value="\'\'">All</md-option>\n            <md-option value="DEFAULT PAUSE">DEFAULT PAUSE</md-option>\n            <md-option value="ACW">ACW</md-option>\n            <md-option value="LOGININPAUSE">LOGININPAUSE</md-option>\n            <md-option value="Auto-Pause">AUTOPAUSE</md-option>\n            <md-option ng-value="pause.name" ng-repeat="pause in vm.pauses.rows">{{pause.name}}</md-option>\n        </md-select>\n    </div>\n</md-toolbar>\n\n\x3c!-- AGENT TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.order" md-on-reorder="vm.onInit">\n            <tr md-row border="1">\n                <th class="bv text-center" colspan="3">{{ \'SMS.AGENT\' | translate }}</th>\n                <th class="bv bl text-center" colspan="2">{{ \'VOICE.VOICE\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="bv bl text-center" colspan="2">{{ \'CHAT.CHAT\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="bv bl text-center" colspan="2">{{ \'MAIL.MAIL\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="bv bl text-center" colspan="2">{{ \'SMS.SMS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="bv bl text-center" colspan="2">{{ \'OPENCHANNEL.OPENCHANNEL\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="bv bl text-center" colspan="2">{{ \'FAX.FAX\' | translate }}</th>\n                <th width="10px" class="bt bl" rowspan="2"></th>\n                \x3c!-- <th md-column>{{ \'VOICE.PHONE_STATE\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PHONE_STATUS\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PAUSE\' | translate }}</th>\n                <th md-column width="10px"></th> --\x3e\n            </tr>\n            <tr md-row>\n                <th class="bl" md-column md-order-by="fullname">{{ \'SMS.NAME\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatus">{{ \'SMS.STATUS\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatusTime">{{ \'SMS.TIMER\' | translate }}</th>\n\n                <th class="bl custom-column">{{ \'VOICE.STATUS\' | translate }}</th>\n                <th class="bl custom-column">Info</th>\n\n                <th ng-if="vm.license.chat" class="bl text-center">{{ \'CHAT.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'CHAT.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.mail" class="bl text-center">{{ \'MAIL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'MAIL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.messaging" class="bl text-center">{{ \'SMS.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'SMS.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.openchannel" class="bl text-center">{{ \'OPENCHANNEL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'OPENCHANNEL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.fax" class="bl text-center">{{ \'FAX.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'FAX.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.order.length">\n                <td md-cell colspan="17">\n                    <div layout="row" layout-align="center center">\n                        <span>{{ \'SMS.NO_AGENT_ONLINE\' | translate }}</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-select="vm.agents[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td class="bt padding-5">\n                    <div layout="row" layout-align="start center">\n                        <img class="avatar" ng-src="{{vm.agents[value].userpic && \'api/users/\'+vm.agents[value].id+\'/avatar\' || \'assets/images/avatars/profile.png\'}}">\n                        <div layout="column">\n                            <span>{{vm.agents[value].fullname}}</span>\n                            <span>{{vm.agents[value].internal}}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt">\n                    <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'busy\':\'indigo-100-bg\',\'*pause\':\'amber-50-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].globalStatus]">{{ vm.isPause(vm.agents[value].globalStatus) ? \'\' : vm.agents[value].globalStatus | uppercase }} {{ vm.isPause(vm.agents[value].globalStatus) ? (vm.isPartialPause(vm.agents[value].globalStatus) ? \'*\'+vm.agents[value].pauseType || \'DEFAULT PAUSE\'  : vm.agents[value].pauseType || \'DEFAULT PAUSE\') : \'\'}}</span>\n                </td>\n                <td class="bt custom-column">\n                    <timer start-time="vm.agents[value].globalStatusTime" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                </td>\n                <td class="bt bl">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'talking\':\'indigo-100-bg\',\'ringing\':\'orange-400-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].voiceStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt bl">\n                    <div layout="column">\n                        <span ng-if="vm.agents[value].queue" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].queue }}</span>\n                        <span ng-if="vm.agents[value].destconnectedlinenum" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].destconnectedlinenum }}</span>\n                        <span class="padding-5" ng-if="vm.agents[value].queue || vm.agents[value].destconnectedlinenum">\n                            <timer start-time="vm.agents[value].voiceStatusTime" interval="1000" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                        </span>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt">--</td>\n                <td class="bt">--</td> --\x3e\n                <td class="bt bl" ng-if="vm.license.chat">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt padding-5 text-center">{{ agent.chatCurrentCapacity }}/{{ agent.chatCapacity > 0 ? agent.chatCapacity : \'∞\' }}</td> --\x3e\n                <td md-number class="bt text-center font-size-20" ng-if="vm.license.chat" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.mail">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.mail" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.messaging">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.messaging" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.openchannel">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">4</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">89</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.openchannel" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.fax">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">7</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">2</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.fax" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxCurrentCapacity }}</td>\n                <td class="bl bt padding-5 text-center">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="4">\n                            <md-menu-item>\n                                <md-button ng-click="vm.logout(vm.agents[value], $event)" translate="SMS.LOGOUT">\n                                    Logout\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.queueAdd(vm.agents[value], $event)" translate="SMS.AGENTADD_QUEUE">\n                                    Add Agent In Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="SMS.PAUSE">Pause</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item>\n                                            <md-button ng-disabled=" vm.agents[value].voicePause && \'DEFAULT PAUSE\' === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value])"><em translate="SMS.DEFAULT_PAUSE">Default Pause</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.pauses.rows.length" ng-repeat="pause in vm.pauses.rows">\n                                            <md-button ng-disabled="vm.agents[value].voicePause && pause.name === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value], pause.name)">{{pause.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                            <md-menu-item ng-if="vm.isPause(vm.agents[value].globalStatus)">\n                                <md-button ng-click="vm.unPause(vm.agents[value])" translate="SMS.UNPAUSE">\n                                    Unpause\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'SMS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'SMS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'SMS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.filteredAgents.length}}"\n    md-on-paginate="vm.onInit" md-page-select></md-table-pagination>\n\x3c!-- / AGENT TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/sms/views/realtime/queues/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="SMS.QUEUES">Queues</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUE TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getQueues">\n            <tr md-row>\n                <th md-column md-order-by="name">{{ \'SMS.NAME\' | translate }}</th>\n                <th md-column>{{ \'SMS.LOGGED_IN\' | translate }}</th>\n                <th md-column>{{ \'SMS.PAUSED\' | translate }}</th>\n                <th md-column>{{ \'SMS.READY\' | translate }}</th>\n                <th md-column>{{ \'SMS.WAITING\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.queues">\n                <td md-cell colspan="7">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="SMS.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row md-select="vm.queues[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td md-cell>{{vm.queues[value].name}}</td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].loggedInDb || 0}} ({{vm.queues[value].loggedIn || 0}})</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].paused || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].available || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].waiting || 0}}</span>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="SMS.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="3">\n                            <md-menu-item>\n                                <md-button ng-click="vm.createOrEditSmsQueue($event, vm.queues[value])" translate="SMS.EDIT_QUEUE">\n                                    Edit Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.agentAdd($event, vm.queues[value])" translate="SMS.AGENTSADD_QUEUE">\n                                    Add Agents to queue\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'SMS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'SMS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'SMS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.count}}"\n    md-on-paginate="vm.getQueues" md-page-select></md-table-pagination>\n\x3c!-- / QUEUE TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/sms/views/realtime/realtime.html",'<div id="realtime" class="page-layout simple tabbed" layout="column" ng-cloak>\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SMS.AGENTS">Agents</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SMS.QUEUES">Queues</span>\n                </md-tab-label>\n            </md-tab>\n        </md-tabs>\n\n        <md-card ui-view></md-card>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n</div>'),e.put("app/main/apps/sms/views/smsAccounts/create/dialog.html",'<md-dialog class="smsAccount-dialog" aria-label="New SmsAccount">\n    <form name="smsAccountForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.smsAccount.name" ng-required="true" autofocus ng-disabled="!vm.newSmsAccount">\n                <div ng-messages="smsAccountForm[\'name\'].$error" ng-show="smsAccountForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.KEY">key</label>\n                <input type="text" name="key" ng-model="vm.smsAccount.key" md-maxlength="5" ng-required="true">\n                <div ng-messages="smsAccountForm[\'key\'].$error" ng-show="smsAccountForm[\'key\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.KEY_REQUIRED">key field is required</span>\n                    </div>\n\n                    <div ng-message="md-maxlength">\n                        <span translate="SMS.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 5}\'>key must have a maximum length equal to 5</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.MOTIONPROXY">MotionProxy</label>\n                <input type="url" name="remote" ng-model="vm.smsAccount.remote" md-maxlength="255" ng-required="true">\n                <div class="hint"><span translate="SMS.HELP.MOTIONPROXY"></span></div>\n                <div ng-messages="smsAccountForm[\'remote\'].$error" ng-show="smsAccountForm[\'remote\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.MOTIONPROXY_REQUIRED">MotionProxy field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="SMS.ERRORS.MOTIONPROXY_MUST_VALID_URL">MotionProxy must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                    <div ng-message="md-maxlength">\n                        <span translate="SMS.ERRORS.MOTIONPROXY_MAX_LENGTH" translate-values=\'{max: 255}\'>MotionProxy must have a maximum length equal to 255</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.LIST">List</label>\n                <md-select name="ListId" ng-model="vm.smsAccount.ListId" required>\n                    <md-option ng-value="ListId.id" ng-repeat="ListId in vm.lists">{{ ListId.name }}</md-option>\n                </md-select>\n                <div class="hint"><span translate="SMS.HELP.LIST"></span></div>\n                <div ng-messages="smsAccountForm[\'ListId\'].$error" ng-show="smsAccountForm[\'ListId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.LIST_REQUIRED">List field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.PHONE">Phone</label>\n                <input type="text" name="phone" ng-model="vm.smsAccount.phone" ng-required="true">\n                <div ng-messages="smsAccountForm[\'phone\'].$error" ng-show="smsAccountForm[\'phone\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.PHONE_REQUIRED">Phone field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.smsAccount.type" required>\n                    <md-option ng-value="\'twilio\'">Twilio</md-option>\n                    <md-option ng-value="\'skebby\'">Skebby</md-option>\n                    <md-option ng-value="\'connectel\'">Connectel</md-option>\n                    <md-option ng-value="\'clicksend\'">ClickSend</md-option>\n                    <md-option ng-value="\'plivo\'">Plivo</md-option>\n                </md-select>\n                <div ng-messages="smsAccountForm[\'type\'].$error" ng-show="smsAccountForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.smsAccount.type == \'twilio\'" class="md-block">\n                <label translate="SMS.ACCOUNTSID">AccountSID</label>\n                <input type="text" name="accountSid" ng-model="vm.smsAccount.accountSid" ng-required="true">\n                <div ng-messages="smsAccountForm[\'accountSid\'].$error" ng-show="smsAccountForm[\'accountSid\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.ACCOUNTSID_REQUIRED">AccountSID field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.smsAccount.type == \'plivo\'" class="md-block">\n                <label translate="SMS.AUTHID">AuthID</label>\n                <input type="text" name="authId" ng-model="vm.smsAccount.authId" ng-required="true">\n                <div ng-messages="smsAccountForm[\'authId\'].$error" ng-show="smsAccountForm[\'authId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.AUTHID_REQUIRED">AuthID field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.smsAccount.type == \'twilio\' || vm.smsAccount.type == \'connectel\' || vm.smsAccount.type == \'plivo\'" class="md-block">\n                <label translate="SMS.AUTHTOKEN">AuthToken</label>\n                <input type="text" name="authToken" ng-model="vm.smsAccount.authToken" ng-required="true">\n                <div ng-messages="smsAccountForm[\'authToken\'].$error" ng-show="smsAccountForm[\'authToken\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.AUTHTOKEN_REQUIRED">AuthToken field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.smsAccount.type == \'skebby\'" class="md-block">\n                <label translate="SMS.METHOD">Method</label>\n                <md-select name="smsMethod" ng-model="vm.smsAccount.smsMethod" required>\n                    <md-option ng-value="\'basic\'">Basic</md-option>\n                    <md-option ng-value="\'classic\'">Classic</md-option>\n                    <md-option ng-value="\'classic+\'">Classic+</md-option>\n                </md-select>\n                <div ng-messages="smsAccountForm[\'smsMethod\'].$error" ng-show="smsAccountForm[\'smsMethod\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.METHOD_REQUIRED">Method field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.smsAccount.type == \'skebby\' || vm.smsAccount.type == \'clicksend\'" class="md-block">\n                <label translate="SMS.USERNAME">Username</label>\n                <input type="text" name="username" ng-model="vm.smsAccount.username" ng-required="true">\n                <div ng-messages="smsAccountForm[\'username\'].$error" ng-show="smsAccountForm[\'username\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.smsAccount.type == \'skebby\' || vm.smsAccount.type == \'clicksend\'">\n                <label translate="SMS.PASSWORD">Password</label>\n                <input type="password" name="password" ng-model="vm.smsAccount.password" placeholder="Password" translate translate-attr-placeholder="SMS.PASSWORD" required>\n                <div ng-messages="smsAccountForm[\'password\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="SMS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="SMS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.smsAccount.description">\n                <div ng-messages="smsAccountForm[\'description\'].$error" ng-show="smsAccountForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSmsAccount" ng-click="vm.saveSmsAccount()" class="send-button md-accent md-raised" ng-disabled="smsAccountForm.$invalid || smsAccountForm.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSmsAccount" ng-click="vm.addNewSmsAccount()" class="send-button md-accent md-raised" ng-disabled="smsAccountForm.$invalid" aria-label="ADD" translate="SMS.ADD_SMSACCOUNT" translate-attr-aria-label="SMS.ADD_SMSACCOUNT">\n                    ADD SMSACCOUNT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSmsAccount" ng-click="vm.deleteSmsAccount($event)" aria-label="DELETE" translate translate-attr-aria-label="SMS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="SMS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/apps/agent/dialog.html",'<md-dialog class="smsAccount-dialog" aria-label="New SmsAccount">\n    <form name="smsAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.AGENT">Agent</label>\n                <md-select name="agent" ng-model="vm.agent.agent" required autofocus>\n                    <md-option ng-value="agent.name" ng-repeat="agent in vm.agents">{{ agent.name }}</md-option>\n                </md-select>\n                <div ng-messages="smsAccountFormApp[\'agent\'].$error" ng-show="smsAccountFormApp[\'agent\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.AGENT_REQUIRED">Agent field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.agent.timeout" min="0" max="2147483" ng-required="true">\n                <div ng-messages="smsAccountFormApp[\'timeout\'].$error" ng-show="smsAccountFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="SMS.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="SMS.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveSmsAccountApp()" class="send-button md-accent md-raised" ng-disabled="smsAccountFormApp.$invalid || smsAccountFormApp.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/apps/autoreply/dialog.html",'<md-dialog class="smsAccount-dialog" aria-label="New SmsAccount">\n    <form name="smsAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.TIMES">times</label>\n                <md-select name="times" ng-model="vm.autoreply.times" required autofocus>\n                    <md-option ng-value="1">One Time</md-option>\n                    <md-option ng-value="0">Always</md-option>\n                </md-select>\n                <div ng-messages="smsAccountFormApp[\'times\'].$error" ng-show="smsAccountFormApp[\'times\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.TIMES_REQUIRED">times field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.TEXT">Text</label>\n                <textarea name="text" ng-model="vm.autoreply.text" md-maxlength="255" required></textarea>\n\n                <div ng-messages="smsAccountFormApp[\'text\'].$error" ng-show="smsAccountFormApp[\'text\'].$touched" role="alert">\n\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.TEXT_REQUIRED">Text field is required</span>\n                    </div>\n\n\n                    <div ng-message="md-maxlength">\n                        <span translate="SMS.ERRORS.TEXT_MAX_LENGTH" translate-values=\'{max: 255}\'>Text must have a maximum length equal to 255</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveSmsAccountApp()" class="send-button md-accent md-raised" ng-disabled="smsAccountFormApp.$invalid || smsAccountFormApp.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/apps/close/dialog.html",'<md-dialog class="smsAccount-dialog" aria-label="New SmsAccount">\n    <form name="smsAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.DISPOSITION">Disposition</label>\n                <input type="text" name="disposition" ng-model="vm.close.disposition" ng-required="true" autofocus>\n                <div ng-messages="smsAccountFormApp[\'disposition\'].$error" ng-show="smsAccountFormApp[\'disposition\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.DISPOSITION_REQUIRED">Disposition field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveSmsAccountApp()" class="send-button md-accent md-raised" ng-disabled="smsAccountFormApp.$invalid || smsAccountFormApp.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/apps/gotoif/dialog.html",'<md-dialog class="smsAccount-dialog" aria-label="New SmsAccount">\n    <form name="smsAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.CONDITION">Condition</label>\n                <input type="text" name="condition" ng-model="vm.gotoif.condition" ng-required="true" autofocus>\n                <div ng-messages="smsAccountFormApp[\'condition\'].$error" ng-show="smsAccountFormApp[\'condition\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.CONDITION_REQUIRED">Condition field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.TRUEPRIORITY">truepriority</label>\n                <input type="number" name="truepriority" ng-model="vm.gotoif.truepriority" min="1" ng-required="true">\n                <div ng-messages="smsAccountFormApp[\'truepriority\'].$error" ng-show="smsAccountFormApp[\'truepriority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.TRUEPRIORITY_REQUIRED">truepriority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="SMS.ERRORS.TRUEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">truepriority must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.FALSEPRIORITY">falsepriority</label>\n                <input type="number" name="falsepriority" ng-model="vm.gotoif.falsepriority" min="1" ng-required="true">\n                <div ng-messages="smsAccountFormApp[\'falsepriority\'].$error" ng-show="smsAccountFormApp[\'falsepriority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.FALSEPRIORITY_REQUIRED">falsepriority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="SMS.ERRORS.FALSEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">falsepriority must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveSmsAccountApp()" class="send-button md-accent md-raised" ng-disabled="smsAccountFormApp.$invalid || smsAccountFormApp.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/apps/gotop/dialog.html",'<md-dialog class="smsAccount-dialog" aria-label="New SmsAccount">\n    <form name="smsAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.PRIORITY">Priority</label>\n                <input type="number" name="priority" ng-model="vm.gotop.priority" min="0" ng-required="true" autofocus>\n                <div ng-messages="smsAccountFormApp[\'priority\'].$error" ng-show="smsAccountFormApp[\'priority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.PRIORITY_REQUIRED">Priority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="SMS.ERRORS.PRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Priority must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveSmsAccountApp()" class="send-button md-accent md-raised" ng-disabled="smsAccountFormApp.$invalid || smsAccountFormApp.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/apps/interval/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select ng-model="vm.type">\n                    <md-option ng-value="type" ng-repeat=\'type in vm.types\'>{{ type | ucfirst }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.type === \'list\'">\n                <label translate="TOOLS.INTERVALS">Intervals</label>\n                <md-select ng-model="vm.interval.IntervalId">\n                    <md-option ng-value="interval.id" ng-repeat="interval in vm.intervals.rows">{{ interval.name }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            \x3c!-- TIMERANGE START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.TIME_RANGE">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <div class="md-block" flex>\n                    <mdp-time-picker name="timeRangeFrom" mdp-placeholder="FROM" ng-model="vm.timeRangeFrom" mdp-format="HH:mm" mdp-auto-switch="true">\n                        <div ng-messages="intervalForm.timeRangeFrom.$error" ng-show="intervalForm.timeRangeFrom.$touched" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_FROM_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n                <div class="md-block" flex ng-if="vm.timeRangeFrom">\n                    <mdp-time-picker name="timeRangeTo" mdp-placeholder="TO*" ng-model="vm.timeRangeTo" mdp-format="HH:mm" mdp-auto-switch="true" required>\n                        <div ng-messages="intervalForm.timeRangeTo.$error" ng-show="intervalForm.timeRangeTo.$invalid" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_INVALID">Time Range To field is invalid</span>\n                            </div>\n                            <div ng-message="required">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_REQUIRED">Time Range To field is required</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n            \x3c!-- TIMERANGE END --\x3e\n\n            \x3c!-- DAYSOFWEEK START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.WEEK_DAYS">Week Days</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.dayOfWeekFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex class="md-block" ng-if="vm.dayOfWeekFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="dayOfWeekTo" ng-model="vm.dayOfWeekTo">\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.dayOfWeekTo.$error" ng-show="intervalForm.dayOfWeekTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- DAYSOFWEEK END --\x3e\n\n            \x3c!-- MONTHDAY START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTH_DAYS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthDayFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthDayFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthDayTo" ng-model="vm.monthDayTo">\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthDayTo.$error" ng-show="intervalForm.monthDayTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTHDAY END --\x3e\n\n            \x3c!-- MONTH START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTHS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthTo" ng-model="vm.monthTo">\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthTo.$error" ng-show="intervalForm.monthTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTH END --\x3e\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/apps/noop/dialog.html",'<md-dialog class="smsAccount-dialog" aria-label="New SmsAccount">\n    <form name="smsAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.VALUE">Value</label>\n                <input type="text" name="value" ng-model="vm.noop.value" autofocus>\n                <div ng-messages="smsAccountFormApp[\'value\'].$error" ng-show="smsAccountFormApp[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveSmsAccountApp()" class="send-button md-accent md-raised" ng-disabled="smsAccountFormApp.$invalid || smsAccountFormApp.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/apps/queue/dialog.html",'<md-dialog class="smsAccount-dialog" aria-label="New SmsAccount">\n    <form name="smsAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.QUEUE">Queue</label>\n                <md-select name="queue" ng-model="vm.queue.queue" required autofocus>\n                    <md-option ng-value="queue.name" ng-repeat="queue in vm.queues">{{ queue.name }}</md-option>\n                </md-select>\n                <div ng-messages="smsAccountFormApp[\'queue\'].$error" ng-show="smsAccountFormApp[\'queue\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.QUEUE_REQUIRED">Queue field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.queue.timeout" min="0" max="2147483" ng-required="true">\n                <div ng-messages="smsAccountFormApp[\'timeout\'].$error" ng-show="smsAccountFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="SMS.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="SMS.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveSmsAccountApp()" class="send-button md-accent md-raised" ng-disabled="smsAccountFormApp.$invalid || smsAccountFormApp.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/apps/system/dialog.html",'<md-dialog class="smsAccount-dialog" aria-label="New SmsAccount">\n    <form name="smsAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.COMMAND">Command</label>\n                <input type="text" name="command" ng-model="vm.system.command" ng-required="true" autofocus>\n                <div ng-messages="smsAccountFormApp[\'command\'].$error" ng-show="smsAccountFormApp[\'command\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.COMMAND_REQUIRED">Command field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.VARIABLE">Variable</label>\n                <md-select name="variable" ng-model="vm.system.variable">\n                    <md-option ng-value="variable.name" ng-repeat="variable in vm.variables">{{ variable.name }}</md-option>\n                    <md-option ng-value="\'\'">None</md-option>\n                </md-select>\n                <div ng-messages="smsAccountFormApp[\'variable\'].$error" ng-show="smsAccountFormApp[\'variable\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.VARIABLE_REQUIRED">Variable field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveSmsAccountApp()" class="send-button md-accent md-raised" ng-disabled="smsAccountFormApp.$invalid || smsAccountFormApp.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/smsCannedAnswers/dialog.html",'<md-dialog class="smsCannedAnswer-dialog" aria-label="New SmsCannedAnswer">\n    <form name="smsCannedAnswerForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.KEY">Key</label>\n                <input type="" name="key" ng-model="vm.smsCannedAnswer.key" md-maxlength="255" ng-required="true" autofocus>\n                <div ng-messages="smsCannedAnswerForm[\'key\'].$error" ng-show="smsCannedAnswerForm[\'key\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.KEY_REQUIRED">Key field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.VALUE">Value</label>\n                <textarea name="value" ng-model="vm.smsCannedAnswer.value" required></textarea>\n\n                <div ng-messages="smsCannedAnswerForm[\'value\'].$error" ng-show="smsCannedAnswerForm[\'value\'].$touched" role="alert">\n\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.smsCannedAnswer.description">\n                <div ng-messages="smsCannedAnswerForm[\'description\'].$error" ng-show="smsCannedAnswerForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSmsCannedAnswer" ng-click="vm.saveSmsCannedAnswer()" class="send-button md-accent md-raised" ng-disabled="smsCannedAnswerForm.$invalid || smsCannedAnswerForm.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSmsCannedAnswer" ng-click="vm.addNewSmsCannedAnswer()" class="send-button md-accent md-raised" ng-disabled="smsCannedAnswerForm.$invalid" aria-label="ADD" translate="SMS.ADD_SMSCANNEDANSWER" translate-attr-aria-label="SMS.ADD_SMSCANNEDANSWER">\n                    ADD SMSCANNEDANSWER\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSmsCannedAnswer" ng-click="vm.deleteSmsCannedAnswer($event)" aria-label="DELETE" translate translate-attr-aria-label="SMS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="SMS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/smsDispositions/dialog.html",'<md-dialog class="smsDisposition-dialog" aria-label="New SmsDisposition">\n    <form name="smsDispositionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.smsDisposition.name" ng-required="true" autofocus>\n                <div ng-messages="smsDispositionForm[\'name\'].$error" ng-show="smsDispositionForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSmsDisposition" ng-click="vm.saveSmsDisposition()" class="send-button md-accent md-raised" ng-disabled="smsDispositionForm.$invalid || smsDispositionForm.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSmsDisposition" ng-click="vm.addNewSmsDisposition()" class="send-button md-accent md-raised" ng-disabled="smsDispositionForm.$invalid" aria-label="ADD" translate="SMS.ADD_SMSDISPOSITION" translate-attr-aria-label="SMS.ADD_SMSDISPOSITION">\n                    ADD SMSDISPOSITION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSmsDisposition" ng-click="vm.deleteSmsDisposition($event)" aria-label="DELETE" translate translate-attr-aria-label="SMS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="SMS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/view.html",'<div id="sms-smsAccount" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-smsAccounts-button md-icon-button" aria-label="Go to smsAccounts" ng-click="vm.gotoSmsAccounts()" translate translate-attr-aria-label="SMS.GO_TO_SMSACCOUNTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="smsAccount-image" hide-xs>\n                    <img ng-src="assets/images/business/smsAccounts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.smsAccount.id}}\n                        <span ng-if="vm.smsAccount.name">{{vm.smsAccount.name}}</span>\n                        <span ng-if="vm.smsAccount.exten">{{vm.smsAccount.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="SMS.CREATED_AT"></span> <span>{{vm.smsAccount.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveSmsAccount()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (notificationForm.$invalid) || (proxyForm.$invalid) || (smsDispositionsForm.$invalid) || (smsCannedAnswersForm.$invalid) || (actionsForm.$invalid) || (interactionsForm.$invalid)"\n                translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SMS.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="smsAccount-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="SMS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.smsAccount.name" ng-required="true" autofocus ng-disabled="true">\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.KEY">key</label>\n                                <input type="text" name="key" ng-model="vm.smsAccount.key" md-maxlength="5" ng-required="true">\n                                <div ng-messages="generalForm[\'key\'].$error" ng-show="generalForm[\'key\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.KEY_REQUIRED">key field is required</span>\n                                    </div>\n\n                                    <div ng-message="md-maxlength">\n                                        <span translate="SMS.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 5}\'>key must have a maximum length equal to 5</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.LIST">List</label>\n                                <md-select name="ListId" ng-model="vm.smsAccount.ListId" required>\n                                    <md-option ng-value="ListId.id" ng-repeat="ListId in vm.lists">{{ ListId.name }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="SMS.HELP.LIST"></span></div>\n                                <div ng-messages="generalForm[\'ListId\'].$error" ng-show="generalForm[\'ListId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.LIST_REQUIRED">List field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.PHONE">Phone</label>\n                                <input type="text" name="phone" ng-model="vm.smsAccount.phone" ng-required="true">\n                                <div ng-messages="generalForm[\'phone\'].$error" ng-show="generalForm[\'phone\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.PHONE_REQUIRED">Phone field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.TYPE">Type</label>\n                                <md-select name="type" ng-model="vm.smsAccount.type" required>\n                                    <md-option ng-value="\'twilio\'">Twilio</md-option>\n                                    <md-option ng-value="\'skebby\'">Skebby</md-option>\n                                    <md-option ng-value="\'connectel\'">Connectel</md-option>\n                                    <md-option ng-value="\'clicksend\'">ClickSend</md-option>\n                                    <md-option ng-value="\'plivo\'">Plivo</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'type\'].$error" ng-show="generalForm[\'type\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.smsAccount.type == \'twilio\'" class="md-block">\n                                <label translate="SMS.ACCOUNTSID">AccountSID</label>\n                                <input type="text" name="accountSid" ng-model="vm.smsAccount.accountSid" ng-required="true">\n                                <div ng-messages="generalForm[\'accountSid\'].$error" ng-show="generalForm[\'accountSid\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.ACCOUNTSID_REQUIRED">AccountSID field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.smsAccount.type == \'plivo\'" class="md-block">\n                                <label translate="SMS.AUTHID">AuthID</label>\n                                <input type="text" name="authId" ng-model="vm.smsAccount.authId" ng-required="true">\n                                <div ng-messages="generalForm[\'authId\'].$error" ng-show="generalForm[\'authId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.AUTHID_REQUIRED">AuthID field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.smsAccount.type == \'twilio\' || vm.smsAccount.type == \'connectel\' || vm.smsAccount.type == \'plivo\'" class="md-block">\n                                <label translate="SMS.AUTHTOKEN">AuthToken</label>\n                                <input type="text" name="authToken" ng-model="vm.smsAccount.authToken" ng-required="true">\n                                <div ng-messages="generalForm[\'authToken\'].$error" ng-show="generalForm[\'authToken\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.AUTHTOKEN_REQUIRED">AuthToken field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.smsAccount.type == \'skebby\'" class="md-block">\n                                <label translate="SMS.METHOD">Method</label>\n                                <md-select name="smsMethod" ng-model="vm.smsAccount.smsMethod" required>\n                                    <md-option ng-value="\'basic\'">Basic</md-option>\n                                    <md-option ng-value="\'classic\'">Classic</md-option>\n                                    <md-option ng-value="\'classic+\'">Classic+</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'smsMethod\'].$error" ng-show="generalForm[\'smsMethod\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.METHOD_REQUIRED">Method field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.smsAccount.type == \'skebby\' || vm.smsAccount.type == \'clicksend\'" class="md-block">\n                                <label translate="SMS.USERNAME">Username</label>\n                                <input type="text" name="username" ng-model="vm.smsAccount.username" ng-required="true">\n                                <div ng-messages="generalForm[\'username\'].$error" ng-show="generalForm[\'username\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block" ng-if="vm.smsAccount.type == \'skebby\' || vm.smsAccount.type == \'clicksend\'">\n                                <label translate="SMS.PASSWORD">Password</label>\n                                <input type="password" name="password" ng-model="vm.smsAccount.password" placeholder="Password" translate translate-attr-placeholder="SMS.PASSWORD" required>\n                                <div ng-messages="generalForm[\'password\'].$error" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="SMS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <md-input-container ng-if="(vm.smsAccount.type == \'skebby\' && vm.smsAccount.smsMethod == \'classic+\') || vm.smsAccount.type == \'connectel\' || vm.smsAccount.type == \'clicksend\' || vm.smsAccount.type == \'plivo\'" class="md-block">\n                                <label translate="SMS.SENDERSTRING">SenderString</label>\n                                <input type="text" name="senderString" ng-model="vm.smsAccount.senderString" md-maxlength="11" ng-pattern="/^[A-Za-z0-9\\.\\s]*$/i">\n                                <div ng-messages="generalForm[\'senderString\'].$error" ng-show="generalForm[\'senderString\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.SENDERSTRING_REQUIRED">SenderString field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="SMS.ERRORS.SENDERSTRING_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\s]*$/i\' }">SenderString must be valid pattern </span>\n                                    </div>\n\n                                    <div ng-message="md-maxlength">\n                                        <span translate="SMS.ERRORS.SENDERSTRING_MAX_LENGTH" translate-values=\'{max: 11}\'>SenderString must have a maximum length equal to 11</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="(vm.smsAccount.type == \'skebby\' && vm.smsAccount.smsMethod == \'classic+\') || vm.smsAccount.type == \'connectel\' || vm.smsAccount.type == \'clicksend\'" class="md-block">\n                                <md-switch ng-model="vm.smsAccount.deliveryReport" aria-label="deliveryReport"><span translate="SMS.DELIVERYREPORT">deliveryReport</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.WAITFORTHEASSIGNEDAGENT">WaitForTheAssignedAgent</label>\n                                <input type="number" name="waitForTheAssignedAgent" ng-model="vm.smsAccount.waitForTheAssignedAgent" min="1" max="2147483" ng-required="true">\n                                <div ng-messages="generalForm[\'waitForTheAssignedAgent\'].$error" ng-show="generalForm[\'waitForTheAssignedAgent\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.WAITFORTHEASSIGNEDAGENT_REQUIRED">WaitForTheAssignedAgent field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="SMS.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">WaitForTheAssignedAgent must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="SMS.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_LESS_THAN_OR_EQUAL_TO">WaitForTheAssignedAgent must be a valid greater or equal than</span> <span>2147483</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.smsAccount.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.RECEIVEURL">receiveUrl</label>\n                                <div layout="row" layout-align="center center">\n                                    <button class="md-button md-fab md-mini md-primary" ngclipboard data-clipboard-target="#copytoclipboard-receiveUrl" ngclipboard-success="vm.alert({title: \'copied to clipboard\', msg: e.text});" ngclipboard-error="vm.alert({title: \'error\', msg: \'copy to clipboard failed\'});">\n                      <md-icon md-font-icon="icon-clipboard-text"></md-icon>\n                  </button>\n                                    <input class="md-input" type="text" id="copytoclipboard-receiveUrl" name="receiveUrl" ng-value="vm.smsAccount.remote + \'/api/sms/accounts/\' + vm.smsAccount.id + \'/notify?token=\' + vm.smsAccount.token" ng-readonly="true">\n                                </div>\n                                <div class="hint"><span translate="SMS.HELP.RECEIVEURL"></span></div>\n                            </md-input-container>\n                            <md-input-container ng-if="( (vm.smsAccount.type == \'skebby\' && vm.smsAccount.smsMethod == \'classic+\') || vm.smsAccount.type == \'connectel\' || vm.smsAccount.type == \'clicksend\' ) && vm.smsAccount.deliveryReport" class="md-block">\n                                <label translate="SMS.DELIVERYREPORTURL">deliveryReportUrl</label>\n                                <div layout="row" layout-align="center center">\n                                    <button class="md-button md-fab md-mini md-primary" ngclipboard data-clipboard-target="#copytoclipboard-deliveryReportUrl" ngclipboard-success="vm.alert({title: \'copied to clipboard\', msg: e.text});" ngclipboard-error="vm.alert({title: \'error\', msg: \'copy to clipboard failed\'});">\n                      <md-icon md-font-icon="icon-clipboard-text"></md-icon>\n                  </button>\n                                    <input class="md-input" type="text" id="copytoclipboard-deliveryReportUrl" name="deliveryReportUrl" ng-value="vm.smsAccount.remote + \'/api/sms/accounts/\' + vm.smsAccount.id + \'/status?token=\' + vm.smsAccount.token" ng-readonly="true">\n                                </div>\n                                <div class="hint"><span translate="SMS.HELP.DELIVERYREPORTURL"></span></div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="smsAccount-detail-form-container notification md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="SMS.NOTIFICATION">NOTIFICATION</div>\n                        </div>\n                        <form name="notificationForm" novalidate>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.smsAccount.notificationSound" aria-label="notificationSound"><span translate="SMS.NOTIFICATIONSOUND">notificationSound</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.smsAccount.notificationShake" aria-label="notificationShake"><span translate="SMS.NOTIFICATIONSHAKE">notificationShake</span></md-switch>\n                            </md-input-container>\n                            <div class="md-block">\n                                <label class="md-caption grey-fg" translate="SMS.NOTIFICATIONTEMPLATE">notificationTemplate</label>\n                                <textarea aria-label="notificationTemplate notificationTemplate" ckeditor="{ skin: \'office2013\', language: \'en\', allowedContent: true, extraPlugins: \'font,colorbutton,autoembed,autocorrect,googlethisterm,pastebase64\', toolbarGroups: [{ name: \'styles\', groups: [\'styles\'] }, { name: \'clipboard\', groups: [\'undo\'] }, { name: \'colors\', groups: [\'colors\'] }, { name: \'basicstyles\', groups: [\'basicstyles\'] }, { name: \'paragraph\', groups: [\'list\', \'indent\', \'align\'] }, { name: \'mode\' }], autocorrect_enabled: true, disableNativeSpellChecker: false, removePlugins: \'magicline\' }"\n                                    ng-model="vm.smsAccount.notificationTemplate"></textarea>\n                            </div>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SMS.ADVANCED">ADVANCED</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="smsAccount-detail-form-container proxy md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="SMS.PROXY">PROXY</div>\n                        </div>\n                        <form name="proxyForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.TOKEN">token</label>\n                                <input type="text" name="token" ng-model="vm.smsAccount.token" autofocus ng-disabled="true">\n                                <div ng-messages="proxyForm[\'token\'].$error" ng-show="proxyForm[\'token\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.TOKEN_REQUIRED">token field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.MOTIONPROXY">MotionProxy</label>\n                                <input type="url" name="remote" ng-model="vm.smsAccount.remote" md-maxlength="255" ng-required="true">\n                                <div class="hint"><span translate="SMS.HELP.MOTIONPROXY"></span></div>\n                                <div ng-messages="proxyForm[\'remote\'].$error" ng-show="proxyForm[\'remote\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.MOTIONPROXY_REQUIRED">MotionProxy field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="SMS.ERRORS.MOTIONPROXY_MUST_VALID_URL">MotionProxy must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                    <div ng-message="md-maxlength">\n                                        <span translate="SMS.ERRORS.MOTIONPROXY_MAX_LENGTH" translate-values=\'{max: 255}\'>MotionProxy must have a maximum length equal to 255</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SMS.DISPOSITIONS">DISPOSITIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="smsAccount-detail-form-container smsdispositions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="SmsAccountSmsDispositionsController as vm_dc" ng-init="vm_dc.init(vm.smsAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedSmsAccountSmsDispositions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="SMS.SMSDISPOSITIONS">SmsDispositions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditSmsAccountSmsDisposition($event)" aria-label="add smsDisposition" translate translate-attr-label="SMS.ADD_SMSDISPOSITION">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedSmsAccountSmsDispositions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedSmsAccountSmsDispositions.length}} {{vm_dc.selectedSmsAccountSmsDispositions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedSmsAccountSmsDispositions" csv-label="true" filename="smsAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedSmsAccountSmsDispositions($event)" aria-label="delete selected" translate translate-attr-label="SMSACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedSmsAccountSmsDispositions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getSmsAccountSmsDispositions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'SMS.ID\' | translate }}</th>\n                                            <th md-column md-order-by="name">{{ \'SMS.NAME\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'SMS.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="smsDisposition" md-select-id="id" ng-repeat="smsDisposition in vm_dc.smsAccountSmsDispositions.rows">\n                                            <td ng-click="vm_dc.createOrEditSmsAccountSmsDisposition($event, smsDisposition)" md-cell>{{smsDisposition.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditSmsAccountSmsDisposition($event, smsDisposition)" md-cell>{{smsDisposition.name}}</td>\n                                            <td ng-click="vm_dc.createOrEditSmsAccountSmsDisposition($event, smsDisposition)" md-cell>{{smsDisposition.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="SMS.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditSmsAccountSmsDisposition($event, smsDisposition)" translate="SMS.EDIT_SMSDISPOSITION">\n                                                                Edit SmsDisposition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(smsDisposition, $event)" translate="SMS.DELETE_SMSDISPOSITION">\n                                                                Delete SmsDisposition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.smsAccountSmsDispositions.rows.length">\n                                            <td md-cell colspan="5">\n                                                <span class="text-boxed-ligth" translate="SMS.NO_SMSDISPOSITION_AVAILABLE">No smsdisposition available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'SMS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'SMS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'SMS.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.smsAccountSmsDispositions.count}}" md-on-paginate="vm_dc.getSmsAccountSmsDispositions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SMS.CANNEDANSWERS">CANNEDANSWERS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="smsAccount-detail-form-container smscannedanswers md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="SmsAccountSmsCannedAnswersController as vm_dc" ng-init="vm_dc.init(vm.smsAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedSmsAccountSmsCannedAnswers.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="SMS.SMSCANNEDANSWERS">SmsCannedAnswers</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditSmsAccountSmsCannedAnswer($event)" aria-label="add smsCannedAnswer" translate translate-attr-label="SMS.ADD_SMSCANNEDANSWER">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedSmsAccountSmsCannedAnswers.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedSmsAccountSmsCannedAnswers.length}} {{vm_dc.selectedSmsAccountSmsCannedAnswers.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedSmsAccountSmsCannedAnswers" csv-label="true" filename="smsAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedSmsAccountSmsCannedAnswers($event)" aria-label="delete selected" translate translate-attr-label="SMSACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedSmsAccountSmsCannedAnswers" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getSmsAccountSmsCannedAnswers">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'SMS.ID\' | translate }}</th>\n                                            <th md-column md-order-by="key">{{ \'SMS.KEY\' | translate }}</th>\n                                            <th md-column md-order-by="value">{{ \'SMS.VALUE\' | translate }}</th>\n                                            <th md-column md-order-by="description">{{ \'SMS.DESCRIPTION\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'SMS.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="smsCannedAnswer" md-select-id="id" ng-repeat="smsCannedAnswer in vm_dc.smsAccountSmsCannedAnswers.rows">\n                                            <td ng-click="vm_dc.createOrEditSmsAccountSmsCannedAnswer($event, smsCannedAnswer)" md-cell>{{smsCannedAnswer.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditSmsAccountSmsCannedAnswer($event, smsCannedAnswer)" md-cell>{{smsCannedAnswer.key}}</td>\n                                            <td ng-click="vm_dc.createOrEditSmsAccountSmsCannedAnswer($event, smsCannedAnswer)" md-cell>{{smsCannedAnswer.value}}</td>\n                                            <td ng-click="vm_dc.createOrEditSmsAccountSmsCannedAnswer($event, smsCannedAnswer)" md-cell>{{smsCannedAnswer.description}}</td>\n                                            <td ng-click="vm_dc.createOrEditSmsAccountSmsCannedAnswer($event, smsCannedAnswer)" md-cell>{{smsCannedAnswer.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="SMS.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditSmsAccountSmsCannedAnswer($event, smsCannedAnswer)" translate="SMS.EDIT_SMSCANNEDANSWER">\n                                                                Edit SmsCannedAnswer\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(smsCannedAnswer, $event)" translate="SMS.DELETE_SMSCANNEDANSWER">\n                                                                Delete SmsCannedAnswer\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.smsAccountSmsCannedAnswers.rows.length">\n                                            <td md-cell colspan="7">\n                                                <span class="text-boxed-ligth" translate="SMS.NO_SMSCANNEDANSWER_AVAILABLE">No smscannedanswer available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'SMS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'SMS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'SMS.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.smsAccountSmsCannedAnswers.count}}" md-on-paginate="vm_dc.getSmsAccountSmsCannedAnswers" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SMS.ACTIONS">ACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="smsAccount-detail-form-container actions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="SmsAccountActionsController as vm_ac" ng-init="vm_ac.init(vm.smsAccount)" class="content" md-background-bg layout="row" layout-align="start start">\n                            \x3c!-- SIDENAV --\x3e\n                            <div class="navigation-simple sidenav main-sidenav md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="20">\n                                \x3c!-- SIDENAV CONTENT --\x3e\n                                <md-list class="no-padding">\n                                    <md-subheader class="md-no-sticky">\n                                        <span translate="VOICE.APPLICATIONS_LIST">\n          Applications List\n        </span>\n                                    </md-subheader>\n                                </md-list>\n                                <md-divider></md-divider>\n                                <md-list ng-sortable="vm_ac.list">\n                                    <md-list-item class="handle" ng-repeat="a in vm_ac.apps">\n                                        <md-icon md-font-icon="{{a.icon}}" class="s16"></md-icon>\n                                        <p class="text-truncate" translate="SMS.{{(a.alias || a.appType) | uppercase}}">{{a.alias || a.appType}}</p>\n                                    </md-list-item>\n                                </md-list>\n                                \x3c!-- / SIDENAV CONTENT --\x3e\n                            </div>\n                            \x3c!-- / SIDENAV --\x3e\n                            <div flex></div>\n                            \x3c!-- MAIN --\x3e\n                            <div class="main scrollable md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="75">\n                                <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_ac.selectedSmsAccountApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">Drag & Drop Routing</span>\n                                        <div flex></div>\n                                        <ms-search-bar on-search="vm_ac.query.filter = query" on-collapse="vm_ac.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    </div>\n                                </md-toolbar>\n                                <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_ac.selectedSmsAccountApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">{{vm_ac.selectedSmsAccountApps.length}} {{vm_ac.selectedSmsAccountApps.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                        <div flex></div>\n                                        <md-button ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_ac.deleteSelectedSmsAccountApps($event)" aria-label="delete selected" translate translate-attr-label="SMS.DELETE_SELECTED">\n                                            <md-icon md-font-icon="icon-delete"></md-icon>\n                                        </md-button>\n                                    </div>\n                                </md-toolbar>\n\n                                \x3c!-- QUEUES TABLE --\x3e\n                                <md-table-container>\n                                    <table md-table md-row-select multiple ng-model="vm_ac.selectedSmsAccountApps">\n                                        <thead md-head>\n                                            <tr md-row>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px">\n                                                    <span translate="VOICE.PRIORITY">Priority</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Type</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Appdata</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Interval</span>\n                                                </th>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px"></th>\n                                            </tr>\n                                        </thead>\n                                        <tbody md-body ng-sortable="vm_ac.applications">\n                                            <tr md-row md-select="app" md-select-id="id" ng-repeat="app in vm_ac.smsAccountApps.rows | filter: vm_ac.query.filter">\n                                                <td md-cell>\n                                                    <md-icon md-font-icon="icon-drag-vertical" class="s16 handle"></md-icon>\n                                                </td>\n                                                <td md-cell ng-click="vm_ac.editSmsAccountApp($event, $index)"><span>{{app.priority}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editSmsAccountApp($event, $index)">{{app.app.toLowerCase() === \'agi\' ? \'Cally-Square\' : app.app | ucfirst}}<span ng-if="app.appType.toLowerCase() === \'custom\'">*</span></td>\n                                                <td md-cell ng-click="vm_ac.editSmsAccountApp($event, $index)"><span class="text-truncate" style="width:200px">{{app.appdata}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editInterval($event, $index)">{{app.IntervalId ? \'From List\' : app.interval}}</td>\n                                                <td md-cell>\n                                                    <md-button ng-click="vm_ac.editInterval($event, $index)" class="md-icon-button" aria-label="Interval">\n                                                        <md-icon md-font-icon="icon-timer"></md-icon>\n                                                        <md-tooltip>\n                                                            {{app.IntervalId ? \'From List\' : (app.interval === \'*,*,*,*\' ? \'Always\' : \'Custom\')}}\n                                                        </md-tooltip>\n                                                    </md-button>\n                                                </td>\n                                                <td md-cell class="actions">\n                                                    <md-menu>\n                                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                        </md-button>\n\n                                                        <md-menu-content width="3">\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editSmsAccountApp($event, $index)" translate="VOICE.EDIT_APP">\n                                                                    Edit App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editInterval($event, $index)" translate="VOICE.EDIT_INTERVAL">\n                                                                    Edit Interval\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'">\n                                                                <md-button ng-click="vm_ac.deleteConfirm(app, $index, $event)" translate="VOICE.DELETE_APP">\n                                                                    Delete App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                        </md-menu-content>\n                                                    </md-menu>\n                                                </td>\n                                            </tr>\n                                            <tr md-row ng-hide="vm_ac.smsAccountApps.rows.length">\n                                                <td md-cell colspan="7">\n                                                    <span class="text-boxed-ligth" translate="VOICE.NO_APPS_AVAILABLE">No apps available</span>\n                                                </td>\n                                            </tr>\n                                        </tbody>\n                                    </table>\n                                </md-table-container>\n                                \x3c!-- / QUEUES TABLE --\x3e\n\n                                \x3c!-- NO RESULTS --\x3e\n\n                                \x3c!-- / NO RESULTS --\x3e\n                            </div>\n                            \x3c!-- / MAIN --\x3e\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SMS.INTERACTIONS">INTERACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="smsAccount-detail-form-container interactions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="SmsAccountInteractionsController as vm_dc" ng-init="vm_dc.init(vm.smsAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedSmsAccountInteractions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="SMS.INTERACTIONS">Interactions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.getSmsAccountInteractions()" aria-label="refresh Interactions" translate translate-attr-label="SMS.REFRESH_INTERACTIONS">\n                                        <md-icon md-font-icon="icon-refresh"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedSmsAccountInteractions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedSmsAccountInteractions.length}} {{vm_dc.selectedSmsAccountInteractions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedSmsAccountInteractions" csv-label="true" filename="smsAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedSmsAccountInteractions($event)" aria-label="delete selected" translate translate-attr-label="SMSACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedSmsAccountInteractions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getSmsAccountInteractions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'SMS.ID\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'SMS.STARTEDAT\' | translate }}</th>\n                                            <th md-column>{{ \'SMS.CONTACT\' | translate }}</th>\n                                            <th md-column>{{ \'SMS.AGENT\' | translate }}</th>\n                                            <th md-column md-order-by="closedAt">{{ \'SMS.CLOSEDAT\' | translate }}</th>\n                                            <th md-column md-order-by="disposition">{{ \'SMS.DISPOSITION\' | translate }}</th>\n                                            <th md-column md-order-by="note">{{ \'SMS.NOTES\' | translate }}</th>\n                                            <th md-column md-order-by="tag">{{ \'SMS.TAGS\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="interaction" md-select-id="id" ng-repeat="interaction in vm_dc.smsAccountInteractions.rows">\n                                            <td md-cell>{{interaction.id}}</td>\n                                            <td md-cell>{{interaction.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell>{{interaction.Contact.firstName}}</td>\n                                            <td md-cell>{{interaction.Owner.name}}</td>\n                                            <td md-cell>{{interaction.closedAt | date:\'medium\'}}</td>\n                                            <td md-cell>{{interaction.disposition}}</td>\n                                            <td md-cell>{{interaction.note}}</td>\n                                            <td md-cell>\n                                                <div ng-if="interaction.Tags.length">\n                                                    <md-tooltip md-direction="left" layout="row">\n                                                        <span ng-repeat="tag in interaction.Tags">{{tag.name}}<span ng-if="!$last">, </span></span>\n                                                    </md-tooltip>\n                                                    <md-icon md-font-icon="icon-tag"></md-icon>\n                                                </div>\n                                            </td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="SMS.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.spysmsInteraction($event, interaction)" translate="SMS.SPYINTERACTION">\n                                                                Spy Interaction\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(interaction, $event)" translate="SMS.DELETE_INTERACTION">\n                                                                Delete Interaction\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.smsAccountInteractions.rows.length">\n                                            <td md-cell colspan="13">\n                                                <span class="text-boxed-ligth" translate="SMS.NO_INTERACTION_AVAILABLE">No interaction available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'SMS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'SMS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'SMS.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.smsAccountInteractions.count}}" md-on-paginate="vm_dc.getSmsAccountInteractions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/sms/views/smsAccounts/smsAccounts.html",'<div id="smsAccounts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-message-text" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="SMS.SMSACCOUNTS">SmsAccounts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="SMS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedSmsAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedSmsAccounts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="SMS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-smsAccounts-count">\n                    <span>{{vm.selectedSmsAccounts.length}}</span>\n                <span translate="SMS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="SMSACCOUNTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllSmsAccounts()" translate="SMS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectSmsAccounts()" translate="SMS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedSmsAccounts" csv-label="true" filename="smsAccounts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedSmsAccounts($event)" aria-label="delete selected" translate translate-attr-label="SMSACCOUNTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- SMSACCOUNT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedSmsAccounts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getSmsAccounts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'SMS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'SMS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="key">{{ \'SMS.KEY\' | translate }}</th>\n                                <th md-column md-order-by="ListId">{{ \'SMS.LIST\' | translate }}</th>\n                                <th md-column md-order-by="phone">{{ \'SMS.PHONE\' | translate }}</th>\n                                <th md-column md-order-by="type">{{ \'SMS.TYPE\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'SMS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.smsAccounts.rows.length">\n                                <td md-cell colspan="8">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="SMS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="smsAccount" md-select-id="id" ng-repeat="smsAccount in vm.smsAccounts.rows">\n                                <td md-cell ng-if="smsAccount.userpic"><img class="avatar" alt="{{smsAccount.name}}" ng-src="api/users/{{smsAccount.id}}/avatar" /></td>\n                                <td md-cell ng-if="!smsAccount.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{smsAccount.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditSmsAccount($event, smsAccount)" md-cell class="id ">{{smsAccount.id}}</td>\n                                <td ng-click="vm.createOrEditSmsAccount($event, smsAccount)" md-cell class="name ">{{smsAccount.name}}</td>\n                                <td ng-click="vm.createOrEditSmsAccount($event, smsAccount)" md-cell class="key ">{{smsAccount.key}}</td>\n                                <td ng-click="vm.createOrEditSmsAccount($event, smsAccount)" md-cell class="ListId ">{{ ListId = vm.lists[smsAccount.ListId]; ListId.name }}</td>\n                                <td ng-click="vm.createOrEditSmsAccount($event, smsAccount)" md-cell class="phone ">{{smsAccount.phone}}</td>\n                                <td ng-click="vm.createOrEditSmsAccount($event, smsAccount)" md-cell class="type ">{{ vm.arraytype[smsAccount.type].option }}</td>\n                                <td ng-click="vm.createOrEditSmsAccount($event, smsAccount)" md-cell class="description ">{{smsAccount.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="SMS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(smsAccount, $event)" translate="SMS.EDIT_SMSACCOUNT">\n                                                    Edit SmsAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.interactionsgoto(smsAccount, $event)" translate="SMS.INTERACTIONS_SMSACCOUNT">\n                                                    Interactions SmsAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(smsAccount, $event)" translate="SMS.DELETE_SMSACCOUNT">\n                                                    Delete SmsAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'SMS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'SMS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'SMS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.smsAccounts.count}}"\n                    md-on-paginate="vm.getSmsAccounts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / SMSACCOUNT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD SMSACCOUNT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-smsAccount-button" ng-click="vm.createOrEditSmsAccount($event)" aria-label="add smsAccount" translate translate-attr-aria-label="SMS.ADD_SMSACCOUNT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD SMSACCOUNT BUTTON --\x3e\n</div>'),e.put("app/main/apps/sms/views/smsQueues/create/dialog.html",'<md-dialog class="smsQueue-dialog" aria-label="New SmsQueue">\n    <form name="smsQueueForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.smsQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newSmsQueue">\n                <div class="hint"><span translate="SMS.HELP.NAME"></span></div>\n                <div ng-messages="smsQueueForm[\'name\'].$error" ng-show="smsQueueForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="SMS.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.STRATEGY">Strategy</label>\n                <md-select name="strategy" ng-model="vm.smsQueue.strategy" required>\n                    <md-option ng-value="\'beepall\'">Beepall</md-option>\n                    <md-option ng-value="\'rrmemory\'">RR Memory</md-option>\n                </md-select>\n                <div ng-messages="smsQueueForm[\'strategy\'].$error" ng-show="smsQueueForm[\'strategy\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.AGENT_TIMEOUT">Agent_Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.smsQueue.timeout" min="1" max="2147483" ng-required="true">\n                <div ng-messages="smsQueueForm[\'timeout\'].$error" ng-show="smsQueueForm[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.AGENT_TIMEOUT_REQUIRED">Agent_Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="SMS.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="SMS.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.smsQueue.description">\n                <div ng-messages="smsQueueForm[\'description\'].$error" ng-show="smsQueueForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSmsQueue" ng-click="vm.saveSmsQueue()" class="send-button md-accent md-raised" ng-disabled="smsQueueForm.$invalid || smsQueueForm.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSmsQueue" ng-click="vm.addNewSmsQueue()" class="send-button md-accent md-raised" ng-disabled="smsQueueForm.$invalid" aria-label="ADD" translate="SMS.ADD_SMSQUEUE" translate-attr-aria-label="SMS.ADD_SMSQUEUE">\n                    ADD SMSQUEUE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSmsQueue" ng-click="vm.deleteSmsQueue($event)" aria-label="DELETE" translate translate-attr-aria-label="SMS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="SMS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsQueues/edit/agentadd/agentadd.html",'<md-dialog class="smsQueue-dialog" aria-label="smsQueue">\n    <form name="smsQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="SMS.AGENTADD_SMSQUEUE">Add Agent to smsQueue</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsQueues/edit/teamadd/teamadd.html",'<md-dialog class="smsQueue-dialog" aria-label="smsQueue">\n    <form name="smsQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="SMS.TEAMADD_SMSQUEUE">Add Team in SMSQUEUE</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsQueues/edit/view.html",'<div id="sms-smsQueue" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-smsQueues-button md-icon-button" aria-label="Go to smsQueues" ng-click="vm.gotoSmsQueues()" translate translate-attr-aria-label="SMS.GO_TO_SMSQUEUES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="smsQueue-image" hide-xs>\n                    <img ng-src="assets/images/business/smsQueues.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.smsQueue.id}}\n                        <span ng-if="vm.smsQueue.name">{{vm.smsQueue.name}}</span>\n                        <span ng-if="vm.smsQueue.exten">{{vm.smsQueue.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="SMS.CREATED_AT"></span> <span>{{vm.smsQueue.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.teamadddialog(vm.smsQueue, $event)" class="md-fab md-orange-500-bg md-icon-button" aria-label="teamadd">\n                <md-tooltip><span translate="SMS.TEAMADD_SMSQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-multiple-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.agentadddialog(vm.smsQueue, $event)" class="md-fab md-purple-500-bg md-icon-button" aria-label="agentadd">\n                <md-tooltip><span translate="SMS.AGENTADD_SMSQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-plus"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveSmsQueue()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid)" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SMS.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="smsQueue-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="SMS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.smsQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="SMS.HELP.NAME"></span></div>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="SMS.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.STRATEGY">Strategy</label>\n                                <md-select name="strategy" ng-model="vm.smsQueue.strategy" required>\n                                    <md-option ng-value="\'beepall\'">Beepall</md-option>\n                                    <md-option ng-value="\'rrmemory\'">RR Memory</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'strategy\'].$error" ng-show="generalForm[\'strategy\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.AGENT_TIMEOUT">Agent_Timeout</label>\n                                <input type="number" name="timeout" ng-model="vm.smsQueue.timeout" min="1" max="2147483" ng-required="true">\n                                <div ng-messages="generalForm[\'timeout\'].$error" ng-show="generalForm[\'timeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.AGENT_TIMEOUT_REQUIRED">Agent_Timeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="SMS.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="SMS.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.smsQueue.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/sms/views/smsQueues/smsQueues.html",'<div id="smsQueues" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-message-text" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="SMS.SMSQUEUES">SmsQueues</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="SMS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedSmsQueues.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedSmsQueues =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="SMS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-smsQueues-count">\n                    <span>{{vm.selectedSmsQueues.length}}</span>\n                <span translate="SMS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="SMSQUEUES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllSmsQueues()" translate="SMS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectSmsQueues()" translate="SMS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedSmsQueues" csv-label="true" filename="smsQueues.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedSmsQueues($event)" aria-label="delete selected" translate translate-attr-label="SMSQUEUES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- SMSQUEUE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedSmsQueues" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getSmsQueues">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'SMS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'SMS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="strategy">{{ \'SMS.STRATEGY\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.smsQueues.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="SMS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="smsQueue" md-select-id="id" ng-repeat="smsQueue in vm.smsQueues.rows">\n                                <td md-cell ng-if="smsQueue.userpic"><img class="avatar" alt="{{smsQueue.name}}" ng-src="api/users/{{smsQueue.id}}/avatar" /></td>\n                                <td md-cell ng-if="!smsQueue.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{smsQueue.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditSmsQueue($event, smsQueue)" md-cell class="id ">{{smsQueue.id}}</td>\n                                <td ng-click="vm.createOrEditSmsQueue($event, smsQueue)" md-cell class="name ">{{smsQueue.name}}</td>\n                                <td ng-click="vm.createOrEditSmsQueue($event, smsQueue)" md-cell class="strategy ">{{ vm.arraystrategy[smsQueue.strategy].option }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="SMS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(smsQueue, $event)" translate="SMS.EDIT_SMSQUEUE">\n                                                    Edit SmsQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.teamadddialog(smsQueue, $event)" translate="SMS.TEAMADD_SMSQUEUE">\n                                                    teamadd SmsQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.agentadddialog(smsQueue, $event)" translate="SMS.AGENTADD_SMSQUEUE">\n                                                    agentadd SmsQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(smsQueue, $event)" translate="SMS.DELETE_SMSQUEUE">\n                                                    Delete SmsQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(smsQueue, $event)" translate="SMS.GOTOREALTIME_SMSQUEUE">\n                                                    goToRealtime SmsQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'SMS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'SMS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'SMS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.smsQueues.count}}"\n                    md-on-paginate="vm.getSmsQueues" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / SMSQUEUE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD SMSQUEUE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-smsQueue-button" ng-click="vm.createOrEditSmsQueue($event)" aria-label="add smsQueue" translate translate-attr-aria-label="SMS.ADD_SMSQUEUE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD SMSQUEUE BUTTON --\x3e\n</div>'),e.put("app/main/apps/staff/views/agents/agents.html",'<div id="agents" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-account-multiple" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="STAFF.AGENTS">Agents</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="STAFF.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedAgents.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedAgents =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="STAFF.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-agents-count">\n                    <span>{{vm.selectedAgents.length}}</span>\n                <span translate="STAFF.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="AGENTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllAgents()" translate="STAFF.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectAgents()" translate="STAFF.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedAgents" csv-label="true" filename="agents.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedAgents($event)" aria-label="delete selected" translate translate-attr-label="AGENTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- AGENT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedAgents" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getAgents">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="fullname">{{ \'STAFF.FULLNAME\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'STAFF.USERNAME\' | translate }}</th>\n                                <th md-column md-order-by="email">{{ \'STAFF.EMAIL\' | translate }}</th>\n                                <th md-column md-order-by="phone">{{ \'STAFF.PHONE\' | translate }}</th>\n                                <th md-column md-order-by="mobile">{{ \'STAFF.MOBILE\' | translate }}</th>\n                                <th md-column md-order-by="internal">{{ \'STAFF.INTERNAL\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.agents.rows.length">\n                                <td md-cell colspan="7">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="STAFF.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="agent" md-select-id="id" ng-repeat="agent in vm.agents.rows">\n                                <td md-cell ng-if="agent.userpic"><img class="avatar" alt="{{agent.name}}" ng-src="api/users/{{agent.id}}/avatar" /></td>\n                                <td md-cell ng-if="!agent.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{agent.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditAgent($event, agent)" md-cell class="fullname font-weight-600">{{agent.fullname}}</td>\n                                <td ng-click="vm.createOrEditAgent($event, agent)" md-cell class="name ">{{agent.name}}</td>\n                                <td ng-click="vm.createOrEditAgent($event, agent)" md-cell class="email ">{{agent.email}}</td>\n                                <td ng-click="vm.createOrEditAgent($event, agent)" md-cell class="phone ">{{agent.phone}}</td>\n                                <td ng-click="vm.createOrEditAgent($event, agent)" md-cell class="mobile ">{{agent.mobile}}</td>\n                                <td ng-click="vm.createOrEditAgent($event, agent)" md-cell class="internal ">{{agent.internal}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(agent, $event)" translate="STAFF.EDIT_AGENT">\n                                                    Edit Agent\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.teamadddialog(agent, $event)" translate="STAFF.TEAMADD_AGENT">\n                                                    teamadd Agent\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(agent, $event)" translate="STAFF.DELETE_AGENT">\n                                                    Delete Agent\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'STAFF.PAGE\' | translate}}:\', rowsPerPage: \'{{\'STAFF.ROWSPERPAGE\' | translate}}:\', of: \'{{\'STAFF.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.agents.count}}" md-on-paginate="vm.getAgents" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / AGENT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD AGENT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-agent-button" ng-click="vm.createOrEditAgent($event)" aria-label="add agent" translate translate-attr-aria-label="STAFF.ADD_AGENT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD AGENT BUTTON --\x3e\n</div>'),e.put("app/main/apps/staff/views/agents/create/dialog.html",'<md-dialog class="agent-dialog" aria-label="New Agent">\n    <form name="agentForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="STAFF.FULLNAME">Fullname</label>\n                <input type="text" name="fullname" ng-model="vm.agent.fullname" ng-required="true" autofocus>\n                <div ng-messages="agentForm[\'fullname\'].$error" ng-show="agentForm[\'fullname\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.FULLNAME_REQUIRED">Fullname field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.USERNAME">Username</label>\n                <input type="text" name="name" ng-model="vm.agent.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" ng-disabled="!vm.newAgent">\n                <div class="hint"><span translate="STAFF.HELP.USERNAME"></span></div>\n                <div ng-messages="agentForm[\'name\'].$error" ng-show="agentForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="STAFF.ERRORS.USERNAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Username must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.ALIAS">Alias</label>\n                <input type="text" name="alias" ng-model="vm.agent.alias">\n                <div ng-messages="agentForm[\'alias\'].$error" ng-show="agentForm[\'alias\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.ALIAS_REQUIRED">Alias field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.EMAIL">Email</label>\n                <input type="email" name="email" ng-model="vm.agent.email" ng-required="true">\n                <div ng-messages="agentForm[\'email\'].$error" ng-show="agentForm[\'email\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                    </div>\n                    <div ng-message="email">\n                        <span translate="STAFF.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.newAgent">\n                <label translate="STAFF.PASSWORD">Password</label>\n                <input type="password" name="password" ng-model="vm.agent.password" placeholder="Password" ng-pattern="vm.passwordPattern" translate translate-attr-placeholder="STAFF.PASSWORD" required>\n                <div ng-messages="agentForm[\'password\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="STAFF.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.newAgent  && (vm.newAgent)">\n                <label translate="STAFF.CONFIRM_PASSWORD">Confirm Password</label>\n                <input type="password" match-password="password" name="confirmPassword" ng-model="confirmPassword">\n                <div ng-messages="agentForm.confirmPassword.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.CONFIRM_REQUIRED">Confirm field is required</span>\n                    </div>\n                    <div ng-message="passwordMatch">\n                        <span translate="STAFF.ERRORS.CONFIRM_NOT_MATCH">Your password did not match</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="STAFF.SHOWWEBCONTROL">ShowWebControl</label>\n                <md-select name="showWebBar" ng-model="vm.agent.showWebBar">\n                    <md-option ng-value="0">Phonebar</md-option>\n                    <md-option ng-value="1">External</md-option>\n                    <md-option ng-value="2">WebRTC (rc-1)</md-option>\n                </md-select>\n                <div ng-messages="agentForm[\'showWebBar\'].$error" ng-show="agentForm[\'showWebBar\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.SHOWWEBCONTROL_REQUIRED">ShowWebControl field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.newAgent" class="md-block">\n                <md-switch ng-model="vm.agent.autointernal" aria-label="AutoInternal"><span translate="STAFF.AUTOINTERNAL">AutoInternal</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="!vm.agent.autointernal" class="md-block">\n                <label translate="STAFF.INTERNAL">Internal</label>\n                <input type="text" name="internal" ng-model="vm.agent.internal" ng-required="true" ng-disabled="!vm.newAgent">\n                <div ng-messages="agentForm[\'internal\'].$error" ng-show="agentForm[\'internal\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.INTERNAL_REQUIRED">Internal field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.agent.description">\n                <div ng-messages="agentForm[\'description\'].$error" ng-show="agentForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.newAgent" class="md-block">\n                <md-switch ng-model="vm.agent.voicemail" aria-label="Voicemail"><span translate="STAFF.VOICEMAIL">Voicemail</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="vm.agent.showWebBar == 0" class="md-block">\n                <md-switch ng-model="vm.agent.phoneBarRemoteControl" aria-label="RemoteControl"><span translate="STAFF.REMOTECONTROL">RemoteControl</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="vm.agent.showWebBar == 0" class="md-block">\n                <label translate="STAFF.REMOTECONTROLPORT">RemoteControlPort</label>\n                <input type="number" name="phoneBarRemoteControlPort" ng-model="vm.agent.phoneBarRemoteControlPort" ng-required="true">\n                <div ng-messages="agentForm[\'phoneBarRemoteControlPort\'].$error" ng-show="agentForm[\'phoneBarRemoteControlPort\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.REMOTECONTROLPORT_REQUIRED">RemoteControlPort field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.newUser" class="md-block">\n                <md-switch ng-model="vm.agent.voicemail" aria-label="Voicemail"><span translate="STAFF.VOICEMAIL">Voicemail</span></md-switch>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newAgent" ng-click="vm.saveAgent()" class="send-button md-accent md-raised" ng-disabled="agentForm.$invalid || agentForm.$pristine" aria-label="SAVE" translate="STAFF.SAVE" translate-attr-aria-label="STAFF.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newAgent" ng-click="vm.addNewAgent()" class="send-button md-accent md-raised" ng-disabled="agentForm.$invalid" aria-label="ADD" translate="STAFF.ADD_AGENT" translate-attr-aria-label="STAFF.ADD_AGENT">\n                    ADD AGENT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newAgent" ng-click="vm.deleteAgent($event)" aria-label="DELETE" translate translate-attr-aria-label="STAFF.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="STAFF.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/agents/edit/changepassword/changepassword.html",'<md-dialog class="agent-dialog" aria-label="{{vm.name}}">\n    <form name="agentForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ \'STAFF.CHANGE_PASSWORD\' | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="STAFF.NEW_PASSWORD">New Password</label>\n                <input type="password" name="password" ng-model="vm.password" placeholder="Password" translate ng-pattern="vm.passwordPattern" translate-attr-placeholder="STAFF.NEW_PASSWORD" required>\n                <div ng-messages="agentForm.password.$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n\n                    <div ng-message="pattern">\n                        <span translate="STAFF.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.CONFIRM_PASSWORD">Confirm Password</label>\n                <input type="password" match-password="password" name="confirmPassword" ng-model="confirmPassword">\n                <div ng-messages="agentForm.confirmPassword.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.CONFIRM_REQUIRED">Confirm field is required</span>\n                    </div>\n                    <div ng-message="passwordMatch">\n                        <span translate="STAFF.ERRORS.CONFIRM_NOT_MATCH">Your password did not match</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.savePassword()" class="send-button md-accent md-raised" ng-disabled="agentForm.$invalid || agentForm.$pristine" aria-label="SAVE" translate="STAFF.SAVE" translate-attr-aria-label="STAFF.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/agents/edit/queueadd/queueadd.html",'<md-dialog class="agent-dialog" aria-label="agent">\n    <form name="agentForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2>{{vm.title}}</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <md-input-container flex class="no-margin" ng-if="vm.agent.role === \'agent\' && vm.isVoiceChannel()">\n                <label translate="STAFF.PENALTY">Penalty</label>\n                <input name="penalty" ng-model="vm.penalty" placeholder="0" required md-minlength="0" md-maxlength="3">\n                <div ng-messages="agentForm.penalty.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span>You must supply a penalty.</span>\n                    </div>\n                    <div ng-message="md-minlength">\n                        <span>Min Penalty 0 characters.</span>\n                    </div>\n                    <div ng-message="md-maxlength">\n                        <span>Max Penalty 3 characters.</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/agents/edit/teamadd/teamadd.html",'<md-dialog class="agent-dialog" aria-label="agent">\n    <form name="agentForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="STAFF.TEAMADD_AGENT">Add Team in AGENT</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/agents/edit/view.html",'<div id="staff-agent" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-agents-button md-icon-button" aria-label="Go to agents" ng-click="vm.gotoAgents()" translate translate-attr-aria-label="STAFF.GO_TO_AGENTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="agent-image" hide-xs>\n                    <img ng-src="assets/images/business/agents.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.agent.id}}\n                        <span ng-if="vm.agent.name">{{vm.agent.name}}</span>\n                        <span ng-if="vm.agent.exten">{{vm.agent.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="STAFF.CREATED_AT"></span> <span>{{vm.agent.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div ng-cloak ng-if="vm.agent.role !== \'admin\'">\n            <md-fab-speed-dial md-direction="left" class="md-scale md-fab">\n                <md-fab-trigger>\n                    <md-button aria-label="menu" class="md-fab md-primary md-icon-button">\n                        <md-tooltip md-direction="top" md-visible="false"><span translate="STAFF.CHANNELS">Channels</span></md-tooltip>\n                        <md-icon md-font-icon="icon-stackoverflow" aria-label="queueadd"></md-icon>\n                    </md-button>\n                </md-fab-trigger>\n                <md-fab-actions>\n                    <md-button aria-label="voice" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.agent, \'voice\', $event, \'inbound\')">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="VOICE.VOICE">Voice</span></md-tooltip>\n                        <md-icon md-font-icon="icon-phone" aria-label="voice"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.dialer" aria-label="motion bull" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.agent, \'voice\', $event, \'outbound\')">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="MOTIONDIALER.MOTIONDIALER">Motion Bull</span></md-tooltip>\n                        <md-icon md-font-icon="icon-fire" aria-label="motion bull"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.chat" aria-label="chat" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.agent, \'chat\', $event)">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="CHAT.CHAT">Chat</span></md-tooltip>\n                        <md-icon md-font-icon="icon-hangouts" aria-label="chat"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.mail" aria-label="mail" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.agent, \'mail\', $event)">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="MAIL.MAIL">Email</span></md-tooltip>\n                        <md-icon md-font-icon="icon-email" aria-label="mail"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.messaging" aria-label="sms" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.agent, \'sms\', $event)">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="SMS.SMS">Sms</span></md-tooltip>\n                        <md-icon md-font-icon="icon-message-text" aria-label="sms"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.openchannel" aria-label="openchannel" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.agent, \'openchannel\', $event)">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="OPENCHANNEL.OPENCHANNEL">Openchannel</span></md-tooltip>\n                        <md-icon md-font-icon="icon-google-earth" aria-label="openchannel"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.fax" aria-label="fax" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.agent, \'fax\', $event)">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="FAX.FAX">Fax</span></md-tooltip>\n                        <md-icon md-font-icon="icon-deskphone" aria-label="fax"></md-icon>\n                    </md-button>\n                </md-fab-actions>\n            </md-fab-speed-dial>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.teamadddialog(vm.agent, $event)" class="md-fab md-orange-500-bg md-icon-button" aria-label="teamadd">\n                <md-tooltip><span translate="STAFF.TEAMADD_AGENT"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-multiple-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.changepassworddialog(vm.agent, $event)" class="md-fab md-warn md-icon-button" aria-label="changepassword">\n                <md-tooltip><span translate="STAFF.CHANGEPASSWORD_AGENT"></span></md-tooltip>\n                <md-icon md-font-icon="icon-key-variant"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveAgent()" class="send-button md-accent md-raised" ng-disabled="(personal_infoForm.$invalid) || (security_suiteForm.$invalid) || (change_avatarForm.$invalid) || (generalForm.$invalid) || (capacityForm.$invalid) || (settingsForm.$invalid) || (remote_controlForm.$invalid) || (sipForm.$invalid) || (callforwardingForm.$invalid) || (settings_webrtcForm.$invalid) || (sip_webrtcForm.$invalid) || (general_permissionsForm.$invalid) || (permissionsForm.$invalid)"\n                translate="STAFF.SAVE" translate-attr-aria-label="STAFF.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="STAFF.ACCOUNT">ACCOUNT</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="agent-detail-form-container personal_info md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.PERSONAL_INFO">PERSONAL_INFO</div>\n                        </div>\n                        <form name="personal_infoForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.FULLNAME">Fullname</label>\n                                <input type="text" name="fullname" ng-model="vm.agent.fullname" ng-required="true" autofocus>\n                                <div ng-messages="personal_infoForm[\'fullname\'].$error" ng-show="personal_infoForm[\'fullname\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.FULLNAME_REQUIRED">Fullname field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.USERNAME">Username</label>\n                                <input type="text" name="name" ng-model="vm.agent.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" ng-disabled="true">\n                                <div class="hint"><span translate="STAFF.HELP.USERNAME"></span></div>\n                                <div ng-messages="personal_infoForm[\'name\'].$error" ng-show="personal_infoForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="STAFF.ERRORS.USERNAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Username must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.ALIAS">Alias</label>\n                                <input type="text" name="alias" ng-model="vm.agent.alias">\n                                <div ng-messages="personal_infoForm[\'alias\'].$error" ng-show="personal_infoForm[\'alias\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.ALIAS_REQUIRED">Alias field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.EMAIL">Email</label>\n                                <input type="email" name="email" ng-model="vm.agent.email" ng-required="true">\n                                <div ng-messages="personal_infoForm[\'email\'].$error" ng-show="personal_infoForm[\'email\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                                    </div>\n                                    <div ng-message="email">\n                                        <span translate="STAFF.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.PHONE">Phone</label>\n                                <input type="text" name="phone" ng-model="vm.agent.phone">\n                                <div ng-messages="personal_infoForm[\'phone\'].$error" ng-show="personal_infoForm[\'phone\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.PHONE_REQUIRED">Phone field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.MOBILE">Mobile</label>\n                                <input type="text" name="mobile" ng-model="vm.agent.mobile">\n                                <div ng-messages="personal_infoForm[\'mobile\'].$error" ng-show="personal_infoForm[\'mobile\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.MOBILE_REQUIRED">Mobile field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.SHOWWEBCONTROL">ShowWebControl</label>\n                                <md-select name="showWebBar" ng-model="vm.agent.showWebBar">\n                                    <md-option ng-value="0">Phonebar</md-option>\n                                    <md-option ng-value="1">External</md-option>\n                                    <md-option ng-value="2">WebRTC (rc-1)</md-option>\n                                </md-select>\n                                <div ng-messages="personal_infoForm[\'showWebBar\'].$error" ng-show="personal_infoForm[\'showWebBar\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.SHOWWEBCONTROL_REQUIRED">ShowWebControl field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.loginInPause" aria-label="LoginInPause"><span translate="STAFF.LOGININPAUSE">LoginInPause</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.agent.description">\n                                <div ng-messages="personal_infoForm[\'description\'].$error" ng-show="personal_infoForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="agent-detail-form-container security_suite md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.SECURITY_SUITE">SECURITY_SUITE</div>\n                        </div>\n                        <form name="security_suiteForm" novalidate>\n                            <md-input-container ng-if="vm.agent.passwordResetAt != null" class="md-block">\n                                <label translate="STAFF.LAST_PASSWORD_RESET_AT">Last_Password_Reset_At</label>\n                                <input type="text" name="passwordResetAt" ng-model="vm.agent.passwordResetAt" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="STAFF.HELP.LAST_PASSWORD_RESET_AT"></span></div>\n                                <div ng-messages="security_suiteForm[\'passwordResetAt\'].$error" ng-show="security_suiteForm[\'passwordResetAt\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.LAST_PASSWORD_RESET_AT_REQUIRED">Last_Password_Reset_At field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.agent.passwordResetAt == null" class="md-block">\n                                <label translate="STAFF.NO_PASSWORD_CHANGE">No_Password_Change</label>\n                                <input type="text" name="passwordResetAt" ng-model="vm.agent.passwordResetAt" ng-disabled="true">\n                                <div ng-messages="security_suiteForm[\'passwordResetAt\'].$error" ng-show="security_suiteForm[\'passwordResetAt\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.NO_PASSWORD_CHANGE_REQUIRED">No_Password_Change field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="agent-detail-form-container change_avatar md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.CHANGE_AVATAR">CHANGE_AVATAR</div>\n                        </div>\n                        <div ng-controller="Agentchange_avatarController as vm_ca" ng-init="vm_ca.init(vm.agent)" class="agent-detail-form-container md-background-bg md-whiteframe-1dp">\n\n                            <div id="agent-image-uploader" flow-init="vm_ca.ngFlowOptions" flow-name="vm_ca.ngFlow.flow" flow-files-submitted="vm_ca.upload()" flow-file-added="vm_ca.fileAdded($file)" flow-file-success="vm_ca.fileSuccess($file, $message)" flow-complete="vm_ca.uploadComplete()"\n                                flow-drop flow-drag-enter="vm_ca.dropping=true" flow-drag-leave="vm_ca.dropping=false" ng-class="{\'dropping\':vm.dropping}">\n\n                                <div class="drop-text hint-text" layout="row" layout-align="center center">\n                                    <span translate="EC.DROP_TO_UPLOAD">Drop to upload</span>\n                                </div>\n\n                                <div class="upload-button" layout="column" layout-align="center center">\n                                    <md-button class="md-accent md-raised" flow-btn>\n                                        Upload\n                                    </md-button>\n                                    <span class="secondary-text mt-8">You can also drop images here to upload. Only PNG, JPG - Max. 8MB</span>\n                                </div>\n\n                                <div layout="row" layout-align="start start" layout-wrap>\n                                    <div ng-repeat="change_avatarimage in vm_ca.agent.images" ng-switch="change_avatarimage.type">\n                                        <div class="agent-image uploading" ng-switch-when="uploading" layout="row" layout-align="center center">\n                                            <div class="overlay" layout="column" layout-align="center center">\n                                                <md-progress-linear md-mode="determinate" value="{{change_avatarimage.file.progress() * 100}}">\n                                                </md-progress-linear>\n                                            </div>\n                                            <img class="media" flow-img="change_avatarimage.file">\n                                        </div>\n\n                                        <div class="agent-image" ng-switch-when="image" layout="row" layout-align="center center">\n                                            <img class="media" ng-src="{{change_avatarimage.url}}">\n                                        </div>\n                                    </div>\n                                </div>\n                            </div>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="STAFF.VOICE">VOICE</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="agent-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container ng-if="!vm.agent.autointernal" class="md-block">\n                                <label translate="STAFF.INTERNAL">Internal</label>\n                                <input type="text" name="internal" ng-model="vm.agent.internal" ng-required="true" autofocus ng-disabled="true">\n                                <div ng-messages="generalForm[\'internal\'].$error" ng-show="generalForm[\'internal\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.INTERNAL_REQUIRED">Internal field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.agent.showWebBar != 2" class="md-block">\n                                <label translate="STAFF.TRANSPORT">Transport</label>\n                                <md-select name="transport" ng-model="vm.agent.transport" multiple>\n                                    <md-option ng-value="\'udp\'">udp</md-option>\n                                    <md-option ng-value="\'tcp\'">tcp</md-option>\n                                    <md-option ng-value="\'ws\'" ng-if="vm.agent.showWebBar == 1">ws</md-option>\n                                    <md-option ng-value="\'wss\'" ng-if="vm.agent.showWebBar == 1">wss</md-option>\n                                    <md-option ng-value="\'tls\'" ng-if="vm.agent.showWebBar == 1">tls</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="STAFF.HELP.TRANSPORT"></span></div>\n                                <div ng-messages="generalForm[\'transport\'].$error" ng-show="generalForm[\'transport\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.TRANSPORT_REQUIRED">Transport field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.HOST">Host</label>\n                                <input type="text" name="host" ng-model="vm.agent.host" ng-required="true">\n                                <div class="hint"><span translate="STAFF.HELP.HOST"></span></div>\n                                <div ng-messages="generalForm[\'host\'].$error" ng-show="generalForm[\'host\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.HOST_REQUIRED">Host field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.NAT">NAT</label>\n                                <md-select name="nat" ng-model="vm.agent.nat" required multiple>\n                                    <md-option ng-value="\'force_rport\'">force_rport</md-option>\n                                    <md-option ng-value="\'comedia\'">comedia</md-option>\n                                    <md-option ng-value="\'yes\'">yes</md-option>\n                                    <md-option ng-value="\'no\'">no</md-option>\n                                    <md-option ng-value="\'never\'">never</md-option>\n                                    <md-option ng-value="\'route\'">route</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="STAFF.HELP.NAT"></span></div>\n                                <div ng-messages="generalForm[\'nat\'].$error" ng-show="generalForm[\'nat\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.NAT_REQUIRED">NAT field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.TYPE">Type</label>\n                                <md-select name="type" ng-model="vm.agent.type">\n                                    <md-option ng-value="\'friend\'">Friend</md-option>\n                                    <md-option ng-value="\'user\'">User</md-option>\n                                    <md-option ng-value="\'peer\'">Peer</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="STAFF.HELP.TYPE"></span></div>\n                                <div ng-messages="generalForm[\'type\'].$error" ng-show="generalForm[\'type\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.ALLOWCODECS">AllowCodecs</label>\n                                <md-select name="allow" ng-model="vm.agent.allow" required multiple>\n                                    <md-option ng-value="\'ulaw\'">ulaw</md-option>\n                                    <md-option ng-value="\'alaw\'">alaw</md-option>\n                                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                                    <md-option ng-value="\'g722\'">g722</md-option>\n                                    <md-option ng-value="\'g729\'">g729</md-option>\n                                    <md-option ng-value="\'opus\'">opus</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="STAFF.HELP.ALLOWCODECS"></span></div>\n                                <div ng-messages="generalForm[\'allow\'].$error" ng-show="generalForm[\'allow\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.ALLOWCODECS_REQUIRED">AllowCodecs field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.CALLERID">CallerId</label>\n                                <input type="text" name="callerid" ng-model="vm.agent.callerid">\n                                <div ng-messages="generalForm[\'callerid\'].$error" ng-show="generalForm[\'callerid\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.CALLERID_REQUIRED">CallerId field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.CONTEXT">Context</label>\n                                <md-select name="context" ng-model="vm.agent.context" required>\n                                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'context\'].$error" ng-show="generalForm[\'context\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.CALLGROUP">Callgroup</label>\n                                <input type="text" name="callgroup" ng-model="vm.agent.callgroup">\n                                <div class="hint"><span translate="STAFF.HELP.CALLGROUP"></span></div>\n                                <div ng-messages="generalForm[\'callgroup\'].$error" ng-show="generalForm[\'callgroup\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.CALLGROUP_REQUIRED">Callgroup field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.PICKUPGROUP">Pickupgroup</label>\n                                <input type="text" name="pickupgroup" ng-model="vm.agent.pickupgroup">\n                                <div class="hint"><span translate="STAFF.HELP.PICKUPGROUP"></span></div>\n                                <div ng-messages="generalForm[\'pickupgroup\'].$error" ng-show="generalForm[\'pickupgroup\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.PICKUPGROUP_REQUIRED">Pickupgroup field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.chanspy" aria-label="chanSpy"><span translate="STAFF.CHANSPY">chanSpy</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.MONITOREXTENSION">MonitorExtension</label>\n                                <md-select name="extensionMonitor" ng-model="vm.agent.extensionMonitor" required>\n                                    <md-option ng-value="\'\'">Inactive</md-option>\n                                    <md-option ng-value="\'wav\'">wav</md-option>\n                                    <md-option ng-value="\'WAV\'">wav49</md-option>\n                                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'extensionMonitor\'].$error" ng-show="generalForm[\'extensionMonitor\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.MONITOREXTENSION_REQUIRED">MonitorExtension field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="STAFF.OTHER_CHANNELS">OTHER_CHANNELS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="agent-detail-form-container capacity md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.CAPACITY">CAPACITY</div>\n                        </div>\n                        <form name="capacityForm" novalidate>\n                            <md-input-container ng-if="vm.license.chat" class="md-block">\n                                <label translate="STAFF.CHATCAPACITY">ChatCapacity</label>\n                                <input type="number" name="chatCapacity" ng-model="vm.agent.chatCapacity" min="0" ng-required="true" autofocus>\n                                <div class="hint"><span translate="STAFF.HELP.CHATCAPACITY"></span></div>\n                                <div ng-messages="capacityForm[\'chatCapacity\'].$error" ng-show="capacityForm[\'chatCapacity\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.CHATCAPACITY_REQUIRED">ChatCapacity field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="STAFF.ERRORS.CHATCAPACITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">ChatCapacity must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.license.mail" class="md-block">\n                                <label translate="STAFF.MAILCAPACITY">MailCapacity</label>\n                                <input type="number" name="mailCapacity" ng-model="vm.agent.mailCapacity" min="0" ng-required="true">\n                                <div class="hint"><span translate="STAFF.HELP.MAILCAPACITY"></span></div>\n                                <div ng-messages="capacityForm[\'mailCapacity\'].$error" ng-show="capacityForm[\'mailCapacity\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.MAILCAPACITY_REQUIRED">MailCapacity field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="STAFF.ERRORS.MAILCAPACITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">MailCapacity must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.license.fax" class="md-block">\n                                <label translate="STAFF.FAXCAPACITY">FaxCapacity</label>\n                                <input type="number" name="faxCapacity" ng-model="vm.agent.faxCapacity" min="0" ng-required="true">\n                                <div class="hint"><span translate="STAFF.HELP.FAXCAPACITY"></span></div>\n                                <div ng-messages="capacityForm[\'faxCapacity\'].$error" ng-show="capacityForm[\'faxCapacity\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.FAXCAPACITY_REQUIRED">FaxCapacity field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="STAFF.ERRORS.FAXCAPACITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">FaxCapacity must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.license.messaging" class="md-block">\n                                <label translate="STAFF.SMSCAPACITY">SMSCapacity</label>\n                                <input type="number" name="smsCapacity" ng-model="vm.agent.smsCapacity" min="0" ng-required="true">\n                                <div class="hint"><span translate="STAFF.HELP.SMSCAPACITY"></span></div>\n                                <div ng-messages="capacityForm[\'smsCapacity\'].$error" ng-show="capacityForm[\'smsCapacity\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.SMSCAPACITY_REQUIRED">SMSCapacity field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="STAFF.ERRORS.SMSCAPACITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">SMSCapacity must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.license.openchannel" class="md-block">\n                                <label translate="STAFF.OPENCHANNELCAPACITY">OpenchannelCapacity</label>\n                                <input type="number" name="openchannelCapacity" ng-model="vm.agent.openchannelCapacity" min="0" ng-required="true">\n                                <div class="hint"><span translate="STAFF.HELP.OPENCHANNELCAPACITY"></span></div>\n                                <div ng-messages="capacityForm[\'openchannelCapacity\'].$error" ng-show="capacityForm[\'openchannelCapacity\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.OPENCHANNELCAPACITY_REQUIRED">OpenchannelCapacity field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="STAFF.ERRORS.OPENCHANNELCAPACITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">OpenchannelCapacity must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab ng-if="vm.agent.showWebBar == 0">\n                <md-tab-label>\n                    <span translate="STAFF.MOTIONBAR">MOTIONBAR</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="agent-detail-form-container settings md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.SETTINGS">SETTINGS</div>\n                        </div>\n                        <form name="settingsForm" novalidate>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarEnableSettings" aria-label="EnableSettings"><span translate="STAFF.ENABLESETTINGS">EnableSettings</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarAutoAnswer" aria-label="AutoAnswer"><span translate="STAFF.AUTOANSWER">AutoAnswer</span></md-switch>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.agent.phoneBarAutoAnswer" class="md-block">\n                                <label translate="STAFF.AUTOANSWERDELAY">AutoAnswerDelay</label>\n                                <input type="number" name="phoneBarAutoAnswerDelay" ng-model="vm.agent.phoneBarAutoAnswerDelay" min="0" ng-required="true">\n                                <div ng-messages="settingsForm[\'phoneBarAutoAnswerDelay\'].$error" ng-show="settingsForm[\'phoneBarAutoAnswerDelay\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.AUTOANSWERDELAY_REQUIRED">AutoAnswerDelay field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="STAFF.ERRORS.AUTOANSWERDELAY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AutoAnswerDelay must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarRingInUse" aria-label="RingInUse"><span translate="STAFF.RINGINUSE">RingInUse</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarEnableRecording" aria-label="EnableRecording"><span translate="STAFF.ENABLERECORDING">EnableRecording</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarEnableDtmfTone" aria-label="EnableDtmfTone"><span translate="STAFF.ENABLEDTMFTONE">EnableDtmfTone</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarDnd" aria-label="Dnd"><span translate="STAFF.DND">Dnd</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarUnansweredCallBadge" aria-label="UnansweredCallBadge"><span translate="STAFF.UNANSWEREDCALLBADGE">UnansweredCallBadge</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarEnableJaws" aria-label="EnableJawsIntegration"><span translate="STAFF.ENABLEJAWSINTEGRATION">EnableJawsIntegration</span></md-switch>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="agent-detail-form-container remote_control md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.REMOTE_CONTROL">REMOTE_CONTROL</div>\n                        </div>\n                        <form name="remote_controlForm" novalidate>\n                            <md-input-container ng-if="vm.agent.showWebBar == 0" class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarRemoteControl" aria-label="RemoteControl"><span translate="STAFF.REMOTECONTROL">RemoteControl</span></md-switch>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.agent.showWebBar == 0" class="md-block">\n                                <label translate="STAFF.REMOTECONTROLPORT">RemoteControlPort</label>\n                                <input type="number" name="phoneBarRemoteControlPort" ng-model="vm.agent.phoneBarRemoteControlPort" ng-required="true">\n                                <div ng-messages="remote_controlForm[\'phoneBarRemoteControlPort\'].$error" ng-show="remote_controlForm[\'phoneBarRemoteControlPort\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.REMOTECONTROLPORT_REQUIRED">RemoteControlPort field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="agent-detail-form-container sip md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.SIP">SIP</div>\n                        </div>\n                        <form name="sipForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.SIPEXPIRES">SipExpires</label>\n                                <input type="number" name="phoneBarExpires" ng-model="vm.agent.phoneBarExpires" ng-required="true" autofocus>\n                                <div class="hint"><span translate="STAFF.HELP.SIPEXPIRES"></span></div>\n                                <div ng-messages="sipForm[\'phoneBarExpires\'].$error" ng-show="sipForm[\'phoneBarExpires\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.SIPEXPIRES_REQUIRED">SipExpires field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.SIPPORT">SipPort</label>\n                                <input type="number" name="phoneBarListenPort" ng-model="vm.agent.phoneBarListenPort" ng-required="true">\n                                <div class="hint"><span translate="STAFF.HELP.SIPPORT"></span></div>\n                                <div ng-messages="sipForm[\'phoneBarListenPort\'].$error" ng-show="sipForm[\'phoneBarListenPort\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.SIPPORT_REQUIRED">SipPort field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="agent-detail-form-container callforwarding md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.CALLFORWARDING">CALLFORWARDING</div>\n                        </div>\n                        <form name="callforwardingForm" novalidate>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarUnconditional" aria-label="Unconditional"><span translate="STAFF.UNCONDITIONAL">Unconditional</span></md-switch>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.agent.phoneBarUnconditional" class="md-block">\n                                <label translate="STAFF.UNCONDITIONALNUMBER">UnconditionalNumber</label>\n                                <input type="text" name="phoneBarUnconditionalNumber" ng-model="vm.agent.phoneBarUnconditionalNumber" ng-required="true">\n                                <div ng-messages="callforwardingForm[\'phoneBarUnconditionalNumber\'].$error" ng-show="callforwardingForm[\'phoneBarUnconditionalNumber\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.UNCONDITIONALNUMBER_REQUIRED">UnconditionalNumber field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab ng-if="vm.agent.showWebBar == 2">\n                <md-tab-label>\n                    <span translate="STAFF.WEBRTC">WEBRTC</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="agent-detail-form-container settings_webrtc md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.SETTINGS_WEBRTC">SETTINGS_WEBRTC</div>\n                        </div>\n                        <form name="settings_webrtcForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.DTLSCERTFILE">dtlscertfile</label>\n                                <input type="text" name="dtlscertfile" ng-model="vm.agent.dtlscertfile" ng-required="true" autofocus>\n                                <div class="hint"><span translate="STAFF.HELP.DTLSCERTFILE"></span></div>\n                                <div ng-messages="settings_webrtcForm[\'dtlscertfile\'].$error" ng-show="settings_webrtcForm[\'dtlscertfile\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.DTLSCERTFILE_REQUIRED">dtlscertfile field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.DTLSPRIVATEKEY">dtlsprivatekey</label>\n                                <input type="text" name="dtlsprivatekey" ng-model="vm.agent.dtlsprivatekey" ng-required="true">\n                                <div class="hint"><span translate="STAFF.HELP.DTLSPRIVATEKEY"></span></div>\n                                <div ng-messages="settings_webrtcForm[\'dtlsprivatekey\'].$error" ng-show="settings_webrtcForm[\'dtlsprivatekey\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.DTLSPRIVATEKEY_REQUIRED">dtlsprivatekey field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarEnableSettings" aria-label="EnableSettings"><span translate="STAFF.ENABLESETTINGS">EnableSettings</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarAutoAnswer" aria-label="AutoAnswer"><span translate="STAFF.AUTOANSWER">AutoAnswer</span></md-switch>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.agent.phoneBarAutoAnswer" class="md-block">\n                                <label translate="STAFF.AUTOANSWERDELAY">AutoAnswerDelay</label>\n                                <input type="number" name="phoneBarAutoAnswerDelay" ng-model="vm.agent.phoneBarAutoAnswerDelay" min="0" ng-required="true">\n                                <div ng-messages="settings_webrtcForm[\'phoneBarAutoAnswerDelay\'].$error" ng-show="settings_webrtcForm[\'phoneBarAutoAnswerDelay\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.AUTOANSWERDELAY_REQUIRED">AutoAnswerDelay field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="STAFF.ERRORS.AUTOANSWERDELAY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AutoAnswerDelay must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarEnableRecording" aria-label="EnableRecording"><span translate="STAFF.ENABLERECORDING">EnableRecording</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarEnableDtmfTone" aria-label="EnableDtmfTone"><span translate="STAFF.ENABLEDTMFTONE">EnableDtmfTone</span></md-switch>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="agent-detail-form-container sip_webrtc md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.SIP_WEBRTC">SIP_WEBRTC</div>\n                        </div>\n                        <form name="sip_webrtcForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.SIPEXPIRES">SipExpires</label>\n                                <input type="number" name="phoneBarExpires" ng-model="vm.agent.phoneBarExpires" ng-required="true" autofocus>\n                                <div class="hint"><span translate="STAFF.HELP.SIPEXPIRES"></span></div>\n                                <div ng-messages="sip_webrtcForm[\'phoneBarExpires\'].$error" ng-show="sip_webrtcForm[\'phoneBarExpires\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.SIPEXPIRES_REQUIRED">SipExpires field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="STAFF.PERMISSIONS">PERMISSIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="agent-detail-form-container general_permissions md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.GENERAL_PERMISSIONS">GENERAL_PERMISSIONS</div>\n                        </div>\n                        <form name="general_permissionsForm" novalidate>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.allowmessenger" aria-label="EnableMessenger"><span translate="STAFF.ENABLEMESSENGER">EnableMessenger</span></md-switch>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="agent-detail-form-container permissions md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.PERMISSIONS">PERMISSIONS</div>\n                        </div>\n                        <div ng-controller="AgentPermissionsController as vm_pc" ng-init="vm_pc.init(vm.agent)" class="agent-detail-form-container">\n                            <md-list ng-repeat="father in vm_pc.navigation[0].children" ng-include="\'permission-nested.html\'" ng-if="vm_pc.agent.role !== \'admin\' && !father.hidden()"></md-list>\n\n                            \x3c!-- Nested navigation template --\x3e\n                            <script type="text/ng-template" id="permission-nested.html">\n                                <md-list-item>\n                                    <md-icon md-font-icon="{{father.icon}}"></md-icon>\n                                    <p translate="{{father.translate}}">{{ father.title }}</p>\n                                    <md-switch class="md-secondary" ng-model="father.enabled" ng-change="vm_pc.onChange(father)" ng-init="father.enabled = vm_pc.agent.permissions.includes(father.id)"></md-switch>\n                                </md-list-item>\n\n                                <md-divider></md-divider>\n\n                                <md-list>\n                                    <md-list-item ng-repeat="child in father.children">\n                                        <md-icon ng-if="child.icon" md-font-icon="{{child.icon}}"></md-icon>\n                                        <p translate="{{child.translate}}">{{ child.title }}</p>\n                                        <md-switch class="md-secondary" ng-model="child.enabled" ng-change="vm_pc.onChange(father, child)" ng-init="child.enabled = vm_pc.agent.permissions.includes(child.id)"></md-switch>\n                                    </md-list-item>\n                                </md-list>\n                            <\/script>\n                            \x3c!-- / Nested navigation template --\x3e\n\n                            <span ng-if="vm_pc.agent.role === \'admin\'" class="md-headline" translate="STAFF.ALL_MODULES_AVAILABLE">All modules are already available.</span>\n\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/staff/views/teams/create/dialog.html",'<md-dialog class="team-dialog" aria-label="New Team">\n    <form name="teamForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="STAFF.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.team.name" ng-required="true" autofocus>\n                <div ng-messages="teamForm[\'name\'].$error" ng-show="teamForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.team.description">\n                <div ng-messages="teamForm[\'description\'].$error" ng-show="teamForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newTeam" ng-click="vm.saveTeam()" class="send-button md-accent md-raised" ng-disabled="teamForm.$invalid || teamForm.$pristine" aria-label="SAVE" translate="STAFF.SAVE" translate-attr-aria-label="STAFF.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newTeam" ng-click="vm.addNewTeam()" class="send-button md-accent md-raised" ng-disabled="teamForm.$invalid" aria-label="ADD" translate="STAFF.ADD_TEAM" translate-attr-aria-label="STAFF.ADD_TEAM">\n                    ADD TEAM\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newTeam" ng-click="vm.deleteTeam($event)" aria-label="DELETE" translate translate-attr-aria-label="STAFF.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="STAFF.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/teams/edit/agentadd/agentadd.html",'<md-dialog class="team-dialog" aria-label="team">\n    <form name="teamForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="STAFF.AGENTADD_TEAM">Add Agent to team</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/teams/teams.html",'<div id="teams" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-account-multiple" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="STAFF.TEAMS">Teams</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="STAFF.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedTeams.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedTeams =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="STAFF.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-teams-count">\n                    <span>{{vm.selectedTeams.length}}</span>\n                <span translate="STAFF.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="TEAMS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllTeams()" translate="STAFF.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectTeams()" translate="STAFF.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedTeams" csv-label="true" filename="teams.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedTeams($event)" aria-label="delete selected" translate translate-attr-label="TEAMS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- TEAM TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedTeams" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getTeams">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'STAFF.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'STAFF.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'STAFF.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.teams.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="STAFF.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="team" md-select-id="id" ng-repeat="team in vm.teams.rows">\n                                <td md-cell ng-if="team.userpic"><img class="avatar" alt="{{team.name}}" ng-src="api/users/{{team.id}}/avatar" /></td>\n                                <td md-cell ng-if="!team.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{team.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditTeam($event, team)" md-cell class="id ">{{team.id}}</td>\n                                <td ng-click="vm.createOrEditTeam($event, team)" md-cell class="name ">{{team.name}}</td>\n                                <td ng-click="vm.createOrEditTeam($event, team)" md-cell class="description ">{{team.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(team, $event)" translate="STAFF.EDIT_TEAM">\n                                                    Edit Team\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.agentadddialog(team, $event)" translate="STAFF.AGENTADD_TEAM">\n                                                    AgentAdd Team\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(team, $event)" translate="STAFF.DELETE_TEAM">\n                                                    Delete Team\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'STAFF.PAGE\' | translate}}:\', rowsPerPage: \'{{\'STAFF.ROWSPERPAGE\' | translate}}:\', of: \'{{\'STAFF.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.teams.count}}" md-on-paginate="vm.getTeams" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / TEAM TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD TEAM BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-team-button" ng-click="vm.createOrEditTeam($event)" aria-label="add team" translate translate-attr-aria-label="STAFF.ADD_TEAM">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD TEAM BUTTON --\x3e\n</div>'),e.put("app/main/apps/staff/views/telephones/create/dialog.html",'<md-dialog class="telephone-dialog" aria-label="New Telephone">\n    <form name="telephoneForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="STAFF.ACCOUNTNAME">Accountname</label>\n                <input type="text" name="fullname" ng-model="vm.telephone.fullname" ng-required="true" autofocus>\n                <div ng-messages="telephoneForm[\'fullname\'].$error" ng-show="telephoneForm[\'fullname\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.ACCOUNTNAME_REQUIRED">Accountname field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.USERNAME">Username</label>\n                <input type="text" name="name" ng-model="vm.telephone.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" ng-disabled="!vm.newTelephone">\n                <div class="hint"><span translate="STAFF.HELP.USERNAME"></span></div>\n                <div ng-messages="telephoneForm[\'name\'].$error" ng-show="telephoneForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="STAFF.ERRORS.USERNAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Username must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.EMAIL">Email</label>\n                <input type="email" name="email" ng-model="vm.telephone.email" ng-required="true">\n                <div ng-messages="telephoneForm[\'email\'].$error" ng-show="telephoneForm[\'email\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                    </div>\n                    <div ng-message="email">\n                        <span translate="STAFF.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.newTelephone">\n                <label translate="STAFF.PASSWORD">Password</label>\n                <input type="password" name="password" ng-model="vm.telephone.password" placeholder="Password" ng-pattern="vm.passwordPattern" translate translate-attr-placeholder="STAFF.PASSWORD" required>\n                <div ng-messages="telephoneForm[\'password\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="STAFF.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.newTelephone  && (vm.newTelephone)">\n                <label translate="STAFF.CONFIRM_PASSWORD">Confirm Password</label>\n                <input type="password" match-password="password" name="confirmPassword" ng-model="confirmPassword">\n                <div ng-messages="telephoneForm.confirmPassword.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.CONFIRM_REQUIRED">Confirm field is required</span>\n                    </div>\n                    <div ng-message="passwordMatch">\n                        <span translate="STAFF.ERRORS.CONFIRM_NOT_MATCH">Your password did not match</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="STAFF.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.telephone.description">\n                <div ng-messages="telephoneForm[\'description\'].$error" ng-show="telephoneForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.newTelephone" class="md-block">\n                <md-switch ng-model="vm.telephone.autointernal" aria-label="AutoInternal"><span translate="STAFF.AUTOINTERNAL">AutoInternal</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="!vm.telephone.autointernal" class="md-block">\n                <label translate="STAFF.INTERNAL">Internal</label>\n                <input type="text" name="internal" ng-model="vm.telephone.internal" ng-required="true" ng-disabled="!vm.newTelephone">\n                <div ng-messages="telephoneForm[\'internal\'].$error" ng-show="telephoneForm[\'internal\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.INTERNAL_REQUIRED">Internal field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.newTelephone" class="md-block">\n                <md-switch ng-model="vm.telephone.voicemail" aria-label="Voicemail"><span translate="STAFF.VOICEMAIL">Voicemail</span></md-switch>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newTelephone" ng-click="vm.saveTelephone()" class="send-button md-accent md-raised" ng-disabled="telephoneForm.$invalid || telephoneForm.$pristine" aria-label="SAVE" translate="STAFF.SAVE" translate-attr-aria-label="STAFF.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newTelephone" ng-click="vm.addNewTelephone()" class="send-button md-accent md-raised" ng-disabled="telephoneForm.$invalid" aria-label="ADD" translate="STAFF.ADD_TELEPHONE" translate-attr-aria-label="STAFF.ADD_TELEPHONE">\n                    ADD TELEPHONE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newTelephone" ng-click="vm.deleteTelephone($event)" aria-label="DELETE" translate translate-attr-aria-label="STAFF.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="STAFF.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/telephones/edit/changepassword/changepassword.html",'<md-dialog class="telephone-dialog" aria-label="{{vm.name}}">\n    <form name="telephoneForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ \'STAFF.CHANGE_PASSWORD\' | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="STAFF.NEW_PASSWORD">New Password</label>\n                <input type="password" name="password" ng-model="vm.password" placeholder="Password" translate ng-pattern="vm.passwordPattern" translate-attr-placeholder="STAFF.NEW_PASSWORD" required>\n                <div ng-messages="telephoneForm.password.$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n\n                    <div ng-message="pattern">\n                        <span translate="STAFF.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.CONFIRM_PASSWORD">Confirm Password</label>\n                <input type="password" match-password="password" name="confirmPassword" ng-model="confirmPassword">\n                <div ng-messages="telephoneForm.confirmPassword.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.CONFIRM_REQUIRED">Confirm field is required</span>\n                    </div>\n                    <div ng-message="passwordMatch">\n                        <span translate="STAFF.ERRORS.CONFIRM_NOT_MATCH">Your password did not match</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.savePassword()" class="send-button md-accent md-raised" ng-disabled="telephoneForm.$invalid || telephoneForm.$pristine" aria-label="SAVE" translate="STAFF.SAVE" translate-attr-aria-label="STAFF.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/telephones/edit/view.html",'<div id="staff-telephone" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-telephones-button md-icon-button" aria-label="Go to telephones" ng-click="vm.gotoTelephones()" translate translate-attr-aria-label="STAFF.GO_TO_TELEPHONES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="telephone-image" hide-xs>\n                    <img ng-src="assets/images/business/telephones.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.telephone.id}}\n                        <span ng-if="vm.telephone.name">{{vm.telephone.name}}</span>\n                        <span ng-if="vm.telephone.exten">{{vm.telephone.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="STAFF.CREATED_AT"></span> <span>{{vm.telephone.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.changepassworddialog(vm.telephone, $event)" class="md-fab md-warn md-icon-button" aria-label="changepassword">\n                <md-tooltip><span translate="STAFF.CHANGEPASSWORD_TELEPHONE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-key-variant"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveTelephone()" class="send-button md-accent md-raised" ng-disabled="(accountForm.$invalid) || (generalForm.$invalid)" translate="STAFF.SAVE" translate-attr-aria-label="STAFF.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="STAFF.ACCOUNT">ACCOUNT</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="telephone-detail-form-container account md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.ACCOUNT">ACCOUNT</div>\n                        </div>\n                        <form name="accountForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.ACCOUNTNAME">Accountname</label>\n                                <input type="text" name="fullname" ng-model="vm.telephone.fullname" ng-required="true" autofocus>\n                                <div ng-messages="accountForm[\'fullname\'].$error" ng-show="accountForm[\'fullname\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.ACCOUNTNAME_REQUIRED">Accountname field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.USERNAME">Username</label>\n                                <input type="text" name="name" ng-model="vm.telephone.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" ng-disabled="true">\n                                <div class="hint"><span translate="STAFF.HELP.USERNAME"></span></div>\n                                <div ng-messages="accountForm[\'name\'].$error" ng-show="accountForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="STAFF.ERRORS.USERNAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Username must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.EMAIL">Email</label>\n                                <input type="email" name="email" ng-model="vm.telephone.email" ng-required="true">\n                                <div ng-messages="accountForm[\'email\'].$error" ng-show="accountForm[\'email\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                                    </div>\n                                    <div ng-message="email">\n                                        <span translate="STAFF.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.telephone.description">\n                                <div ng-messages="accountForm[\'description\'].$error" ng-show="accountForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.PHONE">Phone</label>\n                                <input type="text" name="phone" ng-model="vm.telephone.phone">\n                                <div ng-messages="accountForm[\'phone\'].$error" ng-show="accountForm[\'phone\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.PHONE_REQUIRED">Phone field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.MOBILE">Mobile</label>\n                                <input type="text" name="mobile" ng-model="vm.telephone.mobile">\n                                <div ng-messages="accountForm[\'mobile\'].$error" ng-show="accountForm[\'mobile\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.MOBILE_REQUIRED">Mobile field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="STAFF.VOICE">VOICE</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="telephone-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container ng-if="!vm.telephone.autointernal" class="md-block">\n                                <label translate="STAFF.INTERNAL">Internal</label>\n                                <input type="text" name="internal" ng-model="vm.telephone.internal" ng-required="true" autofocus ng-disabled="true">\n                                <div ng-messages="generalForm[\'internal\'].$error" ng-show="generalForm[\'internal\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.INTERNAL_REQUIRED">Internal field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.TRANSPORT">Transport</label>\n                                <md-select name="transport" ng-model="vm.telephone.transport" required multiple>\n                                    <md-option ng-value="\'udp\'">udp</md-option>\n                                    <md-option ng-value="\'tcp\'">tcp</md-option>\n                                    <md-option ng-value="\'ws\'">ws</md-option>\n                                    <md-option ng-value="\'wss\'">wss</md-option>\n                                    <md-option ng-value="\'tls\'">tls</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="STAFF.HELP.TRANSPORT"></span></div>\n                                <div ng-messages="generalForm[\'transport\'].$error" ng-show="generalForm[\'transport\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.TRANSPORT_REQUIRED">Transport field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.NAT">NAT</label>\n                                <md-select name="nat" ng-model="vm.telephone.nat" required multiple>\n                                    <md-option ng-value="\'force_rport\'">force_rport</md-option>\n                                    <md-option ng-value="\'comedia\'">comedia</md-option>\n                                    <md-option ng-value="\'yes\'">yes</md-option>\n                                    <md-option ng-value="\'no\'">no</md-option>\n                                    <md-option ng-value="\'never\'">never</md-option>\n                                    <md-option ng-value="\'route\'">route</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="STAFF.HELP.NAT"></span></div>\n                                <div ng-messages="generalForm[\'nat\'].$error" ng-show="generalForm[\'nat\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.NAT_REQUIRED">NAT field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.ALLOWCODECS">AllowCodecs</label>\n                                <md-select name="allow" ng-model="vm.telephone.allow" required multiple>\n                                    <md-option ng-value="\'ulaw\'">ulaw</md-option>\n                                    <md-option ng-value="\'alaw\'">alaw</md-option>\n                                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                                    <md-option ng-value="\'g722\'">g722</md-option>\n                                    <md-option ng-value="\'g729\'">g729</md-option>\n                                    <md-option ng-value="\'opus\'">opus</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="STAFF.HELP.ALLOWCODECS"></span></div>\n                                <div ng-messages="generalForm[\'allow\'].$error" ng-show="generalForm[\'allow\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.ALLOWCODECS_REQUIRED">AllowCodecs field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.CALLERID">CallerId</label>\n                                <input type="text" name="callerid" ng-model="vm.telephone.callerid">\n                                <div ng-messages="generalForm[\'callerid\'].$error" ng-show="generalForm[\'callerid\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.CALLERID_REQUIRED">CallerId field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.CONTEXT">Context</label>\n                                <md-select name="context" ng-model="vm.telephone.context" required>\n                                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'context\'].$error" ng-show="generalForm[\'context\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.CALLGROUP">Callgroup</label>\n                                <input type="text" name="callgroup" ng-model="vm.telephone.callgroup">\n                                <div class="hint"><span translate="STAFF.HELP.CALLGROUP"></span></div>\n                                <div ng-messages="generalForm[\'callgroup\'].$error" ng-show="generalForm[\'callgroup\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.CALLGROUP_REQUIRED">Callgroup field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.PICKUPGROUP">Pickupgroup</label>\n                                <input type="text" name="pickupgroup" ng-model="vm.telephone.pickupgroup">\n                                <div class="hint"><span translate="STAFF.HELP.PICKUPGROUP"></span></div>\n                                <div ng-messages="generalForm[\'pickupgroup\'].$error" ng-show="generalForm[\'pickupgroup\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.PICKUPGROUP_REQUIRED">Pickupgroup field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.ENCRYPTION">Encryption</label>\n                                <md-select name="encryption" ng-model="vm.telephone.encryption" required>\n                                    <md-option ng-value="\'yes\'">yes</md-option>\n                                    <md-option ng-value="\'no\'">no</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="STAFF.HELP.ENCRYPTION"></span></div>\n                                <div ng-messages="generalForm[\'encryption\'].$error" ng-show="generalForm[\'encryption\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.ENCRYPTION_REQUIRED">Encryption field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/staff/views/telephones/telephones.html",'<div id="telephones" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-account-multiple" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="STAFF.TELEPHONES">Telephones</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="STAFF.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedTelephones.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedTelephones =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="STAFF.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-telephones-count">\n                    <span>{{vm.selectedTelephones.length}}</span>\n                <span translate="STAFF.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="TELEPHONES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllTelephones()" translate="STAFF.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectTelephones()" translate="STAFF.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedTelephones" csv-label="true" filename="telephones.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedTelephones($event)" aria-label="delete selected" translate translate-attr-label="TELEPHONES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- TELEPHONE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedTelephones" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getTelephones">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="fullname">{{ \'STAFF.ACCOUNTNAME\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'STAFF.USERNAME\' | translate }}</th>\n                                <th md-column md-order-by="email">{{ \'STAFF.EMAIL\' | translate }}</th>\n                                <th md-column md-order-by="internal">{{ \'STAFF.INTERNAL\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.telephones.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="STAFF.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="telephone" md-select-id="id" ng-repeat="telephone in vm.telephones.rows">\n                                <td md-cell ng-if="telephone.userpic"><img class="avatar" alt="{{telephone.name}}" ng-src="api/users/{{telephone.id}}/avatar" /></td>\n                                <td md-cell ng-if="!telephone.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{telephone.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditTelephone($event, telephone)" md-cell class="fullname font-weight-600">{{telephone.fullname}}</td>\n                                <td ng-click="vm.createOrEditTelephone($event, telephone)" md-cell class="name ">{{telephone.name}}</td>\n                                <td ng-click="vm.createOrEditTelephone($event, telephone)" md-cell class="email ">{{telephone.email}}</td>\n                                <td ng-click="vm.createOrEditTelephone($event, telephone)" md-cell class="internal ">{{telephone.internal}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(telephone, $event)" translate="STAFF.EDIT_TELEPHONE">\n                                                    Edit Telephone\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(telephone, $event)" translate="STAFF.DELETE_TELEPHONE">\n                                                    Delete Telephone\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'STAFF.PAGE\' | translate}}:\', rowsPerPage: \'{{\'STAFF.ROWSPERPAGE\' | translate}}:\', of: \'{{\'STAFF.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.telephones.count}}" md-on-paginate="vm.getTelephones" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / TELEPHONE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD TELEPHONE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-telephone-button" ng-click="vm.createOrEditTelephone($event)" aria-label="add telephone" translate translate-attr-aria-label="STAFF.ADD_TELEPHONE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD TELEPHONE BUTTON --\x3e\n</div>'),e.put("app/main/apps/staff/views/users/create/dialog.html",'<md-dialog class="user-dialog" aria-label="New User">\n    <form name="userForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="STAFF.ROLE">Role</label>\n                <md-select name="role" ng-model="vm.user.role" required autofocus ng-disabled="!vm.newUser">\n                    <md-option ng-value="\'admin\'">Admin</md-option>\n                    <md-option ng-value="\'user\'">User</md-option>\n                </md-select>\n                <div ng-messages="userForm[\'role\'].$error" ng-show="userForm[\'role\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.ROLE_REQUIRED">Role field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.FULLNAME">Fullname</label>\n                <input type="text" name="fullname" ng-model="vm.user.fullname" ng-required="true">\n                <div ng-messages="userForm[\'fullname\'].$error" ng-show="userForm[\'fullname\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.FULLNAME_REQUIRED">Fullname field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.USERNAME">Username</label>\n                <input type="text" name="name" ng-model="vm.user.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" ng-disabled="!vm.newUser">\n                <div class="hint"><span translate="STAFF.HELP.USERNAME"></span></div>\n                <div ng-messages="userForm[\'name\'].$error" ng-show="userForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="STAFF.ERRORS.USERNAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Username must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.EMAIL">Email</label>\n                <input type="email" name="email" ng-model="vm.user.email" ng-required="true">\n                <div ng-messages="userForm[\'email\'].$error" ng-show="userForm[\'email\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                    </div>\n                    <div ng-message="email">\n                        <span translate="STAFF.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.newUser">\n                <label translate="STAFF.PASSWORD">Password</label>\n                <input type="password" name="password" ng-model="vm.user.password" placeholder="Password" ng-pattern="vm.passwordPattern" translate translate-attr-placeholder="STAFF.PASSWORD" required>\n                <div ng-messages="userForm[\'password\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="STAFF.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.newUser  && (vm.newUser)">\n                <label translate="STAFF.CONFIRM_PASSWORD">Confirm Password</label>\n                <input type="password" match-password="password" name="confirmPassword" ng-model="confirmPassword">\n                <div ng-messages="userForm.confirmPassword.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.CONFIRM_REQUIRED">Confirm field is required</span>\n                    </div>\n                    <div ng-message="passwordMatch">\n                        <span translate="STAFF.ERRORS.CONFIRM_NOT_MATCH">Your password did not match</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="STAFF.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.user.description">\n                <div ng-messages="userForm[\'description\'].$error" ng-show="userForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.newUser" class="md-block">\n                <md-switch ng-model="vm.user.autointernal" aria-label="AutoInternal"><span translate="STAFF.AUTOINTERNAL">AutoInternal</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="!vm.user.autointernal" class="md-block">\n                <label translate="STAFF.INTERNAL">Internal</label>\n                <input type="text" name="internal" ng-model="vm.user.internal" ng-required="true" ng-disabled="!vm.newUser">\n                <div ng-messages="userForm[\'internal\'].$error" ng-show="userForm[\'internal\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.INTERNAL_REQUIRED">Internal field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newUser" ng-click="vm.saveUser()" class="send-button md-accent md-raised" ng-disabled="userForm.$invalid || userForm.$pristine" aria-label="SAVE" translate="STAFF.SAVE" translate-attr-aria-label="STAFF.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newUser" ng-click="vm.addNewUser()" class="send-button md-accent md-raised" ng-disabled="userForm.$invalid" aria-label="ADD" translate="STAFF.ADD_USER" translate-attr-aria-label="STAFF.ADD_USER">\n                    ADD USER\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newUser" ng-click="vm.deleteUser($event)" aria-label="DELETE" translate translate-attr-aria-label="STAFF.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="STAFF.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/users/edit/changepassword/changepassword.html",'<md-dialog class="user-dialog" aria-label="{{vm.name}}">\n    <form name="userForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ \'STAFF.CHANGE_PASSWORD\' | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="STAFF.NEW_PASSWORD">New Password</label>\n                <input type="password" name="password" ng-model="vm.password" placeholder="Password" translate ng-pattern="vm.passwordPattern" translate-attr-placeholder="STAFF.NEW_PASSWORD" required>\n                <div ng-messages="userForm.password.$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n\n                    <div ng-message="pattern">\n                        <span translate="STAFF.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.CONFIRM_PASSWORD">Confirm Password</label>\n                <input type="password" match-password="password" name="confirmPassword" ng-model="confirmPassword">\n                <div ng-messages="userForm.confirmPassword.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.CONFIRM_REQUIRED">Confirm field is required</span>\n                    </div>\n                    <div ng-message="passwordMatch">\n                        <span translate="STAFF.ERRORS.CONFIRM_NOT_MATCH">Your password did not match</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.savePassword()" class="send-button md-accent md-raised" ng-disabled="userForm.$invalid || userForm.$pristine" aria-label="SAVE" translate="STAFF.SAVE" translate-attr-aria-label="STAFF.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/users/edit/queueadd/queueadd.html",'<md-dialog class="user-dialog" aria-label="user">\n    <form name="userForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2>{{vm.title}}</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <md-input-container flex class="no-margin" ng-if="vm.user.role === \'agent\' && vm.isVoiceChannel()">\n                <label translate="STAFF.PENALTY">Penalty</label>\n                <input name="penalty" ng-model="vm.penalty" placeholder="0" required md-minlength="0" md-maxlength="3">\n                <div ng-messages="userForm.penalty.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span>You must supply a penalty.</span>\n                    </div>\n                    <div ng-message="md-minlength">\n                        <span>Min Penalty 0 characters.</span>\n                    </div>\n                    <div ng-message="md-maxlength">\n                        <span>Max Penalty 3 characters.</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/users/edit/view.html",'<div id="staff-user" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-users-button md-icon-button" aria-label="Go to users" ng-click="vm.gotoUsers()" translate translate-attr-aria-label="STAFF.GO_TO_USERS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="user-image" hide-xs>\n                    <img ng-src="assets/images/business/users.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.user.id}}\n                        <span ng-if="vm.user.name">{{vm.user.name}}</span>\n                        <span ng-if="vm.user.exten">{{vm.user.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="STAFF.CREATED_AT"></span> <span>{{vm.user.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div ng-cloak ng-if="vm.user.role !== \'admin\'">\n            <md-fab-speed-dial md-direction="left" class="md-scale md-fab">\n                <md-fab-trigger>\n                    <md-button aria-label="menu" class="md-fab md-primary md-icon-button">\n                        <md-tooltip md-direction="top" md-visible="false"><span translate="STAFF.CHANNELS">Channels</span></md-tooltip>\n                        <md-icon md-font-icon="icon-eye" aria-label="queueadd"></md-icon>\n                    </md-button>\n                </md-fab-trigger>\n                <md-fab-actions>\n                    <md-button aria-label="voice" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.user, \'voice\', $event, \'inbound\')">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="VOICE.VOICE">Voice</span></md-tooltip>\n                        <md-icon md-font-icon="icon-phone" aria-label="voice"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.dialer" aria-label="motion bull" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.user, \'voice\', $event, \'outbound\')">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="MOTIONDIALER.MOTIONDIALER">Motion Bull</span></md-tooltip>\n                        <md-icon md-font-icon="icon-fire" aria-label="motion bull"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.chat" aria-label="chat" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.user, \'chat\', $event)">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="CHAT.CHAT">Chat</span></md-tooltip>\n                        <md-icon md-font-icon="icon-hangouts" aria-label="chat"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.mail" aria-label="mail" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.user, \'mail\', $event)">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="MAIL.MAIL">Email</span></md-tooltip>\n                        <md-icon md-font-icon="icon-email" aria-label="mail"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.messaging" aria-label="sms" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.user, \'sms\', $event)">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="SMS.SMS">Sms</span></md-tooltip>\n                        <md-icon md-font-icon="icon-message-text" aria-label="sms"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.openchannel" aria-label="openchannel" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.user, \'openchannel\', $event)">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="OPENCHANNEL.OPENCHANNEL">Openchannel</span></md-tooltip>\n                        <md-icon md-font-icon="icon-google-earth" aria-label="openchannel"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.fax" aria-label="fax" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.user, \'fax\', $event)">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="FAX.FAX">Fax</span></md-tooltip>\n                        <md-icon md-font-icon="icon-deskphone" aria-label="fax"></md-icon>\n                    </md-button>\n                </md-fab-actions>\n            </md-fab-speed-dial>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.changepassworddialog(vm.user, $event)" class="md-fab md-warn md-icon-button" aria-label="changepassword">\n                <md-tooltip><span translate="STAFF.CHANGEPASSWORD_USER"></span></md-tooltip>\n                <md-icon md-font-icon="icon-key-variant"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveUser()" class="send-button md-accent md-raised" ng-disabled="(personal_infoForm.$invalid) || (security_suiteForm.$invalid) || (change_avatarForm.$invalid) || (generalForm.$invalid) || (general_permissionsForm.$invalid) || (permissionsForm.$invalid)"\n                translate="STAFF.SAVE" translate-attr-aria-label="STAFF.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="STAFF.ACCOUNT">ACCOUNT</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="user-detail-form-container personal_info md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.PERSONAL_INFO">PERSONAL_INFO</div>\n                        </div>\n                        <form name="personal_infoForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.ROLE">Role</label>\n                                <md-select name="role" ng-model="vm.user.role" required autofocus ng-disabled="true">\n                                    <md-option ng-value="\'admin\'">Admin</md-option>\n                                    <md-option ng-value="\'user\'">User</md-option>\n                                </md-select>\n                                <div ng-messages="personal_infoForm[\'role\'].$error" ng-show="personal_infoForm[\'role\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.ROLE_REQUIRED">Role field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.FULLNAME">Fullname</label>\n                                <input type="text" name="fullname" ng-model="vm.user.fullname" ng-required="true">\n                                <div ng-messages="personal_infoForm[\'fullname\'].$error" ng-show="personal_infoForm[\'fullname\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.FULLNAME_REQUIRED">Fullname field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.USERNAME">Username</label>\n                                <input type="text" name="name" ng-model="vm.user.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" ng-disabled="true">\n                                <div class="hint"><span translate="STAFF.HELP.USERNAME"></span></div>\n                                <div ng-messages="personal_infoForm[\'name\'].$error" ng-show="personal_infoForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="STAFF.ERRORS.USERNAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Username must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.EMAIL">Email</label>\n                                <input type="email" name="email" ng-model="vm.user.email" ng-required="true">\n                                <div ng-messages="personal_infoForm[\'email\'].$error" ng-show="personal_infoForm[\'email\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                                    </div>\n                                    <div ng-message="email">\n                                        <span translate="STAFF.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.PHONE">Phone</label>\n                                <input type="text" name="phone" ng-model="vm.user.phone">\n                                <div ng-messages="personal_infoForm[\'phone\'].$error" ng-show="personal_infoForm[\'phone\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.PHONE_REQUIRED">Phone field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.MOBILE">Mobile</label>\n                                <input type="text" name="mobile" ng-model="vm.user.mobile">\n                                <div ng-messages="personal_infoForm[\'mobile\'].$error" ng-show="personal_infoForm[\'mobile\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.MOBILE_REQUIRED">Mobile field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.user.description">\n                                <div ng-messages="personal_infoForm[\'description\'].$error" ng-show="personal_infoForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="user-detail-form-container security_suite md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.SECURITY_SUITE">SECURITY_SUITE</div>\n                        </div>\n                        <form name="security_suiteForm" novalidate>\n                            <md-input-container ng-if="vm.user.passwordResetAt != null" class="md-block">\n                                <label translate="STAFF.LAST_PASSWORD_RESET_AT">Last_Password_Reset_At</label>\n                                <input type="text" name="passwordResetAt" ng-model="vm.user.passwordResetAt" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="STAFF.HELP.LAST_PASSWORD_RESET_AT"></span></div>\n                                <div ng-messages="security_suiteForm[\'passwordResetAt\'].$error" ng-show="security_suiteForm[\'passwordResetAt\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.LAST_PASSWORD_RESET_AT_REQUIRED">Last_Password_Reset_At field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.user.passwordResetAt == null" class="md-block">\n                                <label translate="STAFF.NO_PASSWORD_CHANGE">No_Password_Change</label>\n                                <input type="text" name="passwordResetAt" ng-model="vm.user.passwordResetAt" ng-disabled="true">\n                                <div ng-messages="security_suiteForm[\'passwordResetAt\'].$error" ng-show="security_suiteForm[\'passwordResetAt\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.NO_PASSWORD_CHANGE_REQUIRED">No_Password_Change field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="user-detail-form-container change_avatar md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.CHANGE_AVATAR">CHANGE_AVATAR</div>\n                        </div>\n                        <div ng-controller="Userchange_avatarController as vm_ca" ng-init="vm_ca.init(vm.user)" class="user-detail-form-container md-background-bg md-whiteframe-1dp">\n\n                            <div id="user-image-uploader" flow-init="vm_ca.ngFlowOptions" flow-name="vm_ca.ngFlow.flow" flow-files-submitted="vm_ca.upload()" flow-file-added="vm_ca.fileAdded($file)" flow-file-success="vm_ca.fileSuccess($file, $message)" flow-complete="vm_ca.uploadComplete()"\n                                flow-drop flow-drag-enter="vm_ca.dropping=true" flow-drag-leave="vm_ca.dropping=false" ng-class="{\'dropping\':vm.dropping}">\n\n                                <div class="drop-text hint-text" layout="row" layout-align="center center">\n                                    <span translate="EC.DROP_TO_UPLOAD">Drop to upload</span>\n                                </div>\n\n                                <div class="upload-button" layout="column" layout-align="center center">\n                                    <md-button class="md-accent md-raised" flow-btn>\n                                        Upload\n                                    </md-button>\n                                    <span class="secondary-text mt-8">You can also drop images here to upload. Only PNG, JPG - Max. 8MB</span>\n                                </div>\n\n                                <div layout="row" layout-align="start start" layout-wrap>\n                                    <div ng-repeat="change_avatarimage in vm_ca.user.images" ng-switch="change_avatarimage.type">\n                                        <div class="user-image uploading" ng-switch-when="uploading" layout="row" layout-align="center center">\n                                            <div class="overlay" layout="column" layout-align="center center">\n                                                <md-progress-linear md-mode="determinate" value="{{change_avatarimage.file.progress() * 100}}">\n                                                </md-progress-linear>\n                                            </div>\n                                            <img class="media" flow-img="change_avatarimage.file">\n                                        </div>\n\n                                        <div class="user-image" ng-switch-when="image" layout="row" layout-align="center center">\n                                            <img class="media" ng-src="{{change_avatarimage.url}}">\n                                        </div>\n                                    </div>\n                                </div>\n                            </div>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="STAFF.VOICE">VOICE</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="user-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container ng-if="!vm.user.autointernal" class="md-block">\n                                <label translate="STAFF.INTERNAL">Internal</label>\n                                <input type="text" name="internal" ng-model="vm.user.internal" ng-required="true" autofocus ng-disabled="true">\n                                <div ng-messages="generalForm[\'internal\'].$error" ng-show="generalForm[\'internal\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.INTERNAL_REQUIRED">Internal field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.TRANSPORT">Transport</label>\n                                <md-select name="transport" ng-model="vm.user.transport" required multiple>\n                                    <md-option ng-value="\'udp\'">udp</md-option>\n                                    <md-option ng-value="\'tcp\'">tcp</md-option>\n                                    <md-option ng-value="\'ws\'">ws</md-option>\n                                    <md-option ng-value="\'wss\'">wss</md-option>\n                                    <md-option ng-value="\'tls\'">tls</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'transport\'].$error" ng-show="generalForm[\'transport\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.TRANSPORT_REQUIRED">Transport field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.NAT">NAT</label>\n                                <md-select name="nat" ng-model="vm.user.nat" required multiple>\n                                    <md-option ng-value="\'force_rport\'">force_rport</md-option>\n                                    <md-option ng-value="\'comedia\'">comedia</md-option>\n                                    <md-option ng-value="\'yes\'">yes</md-option>\n                                    <md-option ng-value="\'no\'">no</md-option>\n                                    <md-option ng-value="\'never\'">never</md-option>\n                                    <md-option ng-value="\'route\'">route</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="STAFF.HELP.NAT"></span></div>\n                                <div ng-messages="generalForm[\'nat\'].$error" ng-show="generalForm[\'nat\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.NAT_REQUIRED">NAT field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.ALLOWCODECS">AllowCodecs</label>\n                                <md-select name="allow" ng-model="vm.user.allow" required multiple>\n                                    <md-option ng-value="\'ulaw\'">ulaw</md-option>\n                                    <md-option ng-value="\'alaw\'">alaw</md-option>\n                                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                                    <md-option ng-value="\'g722\'">g722</md-option>\n                                    <md-option ng-value="\'g729\'">g729</md-option>\n                                    <md-option ng-value="\'opus\'">opus</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="STAFF.HELP.ALLOWCODECS"></span></div>\n                                <div ng-messages="generalForm[\'allow\'].$error" ng-show="generalForm[\'allow\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.ALLOWCODECS_REQUIRED">AllowCodecs field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.CONTEXT">Context</label>\n                                <md-select name="context" ng-model="vm.user.context" required>\n                                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'context\'].$error" ng-show="generalForm[\'context\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.CALLGROUP">Callgroup</label>\n                                <input type="text" name="callgroup" ng-model="vm.user.callgroup">\n                                <div class="hint"><span translate="STAFF.HELP.CALLGROUP"></span></div>\n                                <div ng-messages="generalForm[\'callgroup\'].$error" ng-show="generalForm[\'callgroup\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.CALLGROUP_REQUIRED">Callgroup field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.PICKUPGROUP">Pickupgroup</label>\n                                <input type="text" name="pickupgroup" ng-model="vm.user.pickupgroup">\n                                <div class="hint"><span translate="STAFF.HELP.PICKUPGROUP"></span></div>\n                                <div ng-messages="generalForm[\'pickupgroup\'].$error" ng-show="generalForm[\'pickupgroup\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.PICKUPGROUP_REQUIRED">Pickupgroup field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="STAFF.PERMISSIONS">PERMISSIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div ng-if="vm.currentUser.role === \'admin\' && vm.user.role !== \'admin\'" class="user-detail-form-container general_permissions md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.GENERAL_PERMISSIONS">GENERAL_PERMISSIONS</div>\n                        </div>\n                        <form name="general_permissionsForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.EDITPERMISSIONS">EditPermissions</label>\n                                <md-select name="crudPermissions" ng-model="vm.user.crudPermissions" autofocus>\n\n                                    <md-option ng-value="0"> {{ \'STAFF.READANDEDITANDDELETE\' | translate }}</md-option>\n\n                                    <md-option ng-value="1"> {{ \'STAFF.READANDEDIT\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="general_permissionsForm[\'crudPermissions\'].$error" ng-show="general_permissionsForm[\'crudPermissions\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.EDITPERMISSIONS_REQUIRED">EditPermissions field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="user-detail-form-container permissions md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.PERMISSIONS">PERMISSIONS</div>\n                        </div>\n                        <div ng-controller="UserPermissionsController as vm_pc" ng-init="vm_pc.init(vm.user)" class="user-detail-form-container">\n                            <md-list ng-repeat="father in vm_pc.navigation[0].children" ng-include="\'permission-nested.html\'" ng-if="vm_pc.user.role !== \'admin\' && !father.hidden()"></md-list>\n\n                            \x3c!-- Nested navigation template --\x3e\n                            <script type="text/ng-template" id="permission-nested.html">\n                                <md-list-item>\n                                    <md-icon md-font-icon="{{father.icon}}"></md-icon>\n                                    <p translate="{{father.translate}}">{{ father.title }}</p>\n                                    <md-switch class="md-secondary" ng-model="father.enabled" ng-change="vm_pc.onChange(father)" ng-init="father.enabled = vm_pc.user.permissions.includes(father.id)"></md-switch>\n                                </md-list-item>\n\n                                <md-divider></md-divider>\n\n                                <md-list>\n                                    <md-list-item ng-repeat="child in father.children">\n                                        <md-icon ng-if="child.icon" md-font-icon="{{child.icon}}"></md-icon>\n                                        <p translate="{{child.translate}}">{{ child.title }}</p>\n                                        <md-switch class="md-secondary" ng-model="child.enabled" ng-change="vm_pc.onChange(father, child)" ng-init="child.enabled = vm_pc.user.permissions.includes(child.id)"></md-switch>\n                                    </md-list-item>\n                                </md-list>\n                            <\/script>\n                            \x3c!-- / Nested navigation template --\x3e\n\n                            <span ng-if="vm_pc.user.role === \'admin\'" class="md-headline" translate="STAFF.ALL_MODULES_AVAILABLE">All modules are already available.</span>\n\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/staff/views/users/users.html",'<div id="users" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-account-multiple" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="STAFF.USERS">Users</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="STAFF.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedUsers.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedUsers =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="STAFF.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-users-count">\n                    <span>{{vm.selectedUsers.length}}</span>\n                <span translate="STAFF.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="USERS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllUsers()" translate="STAFF.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectUsers()" translate="STAFF.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedUsers" csv-label="true" filename="users.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- USER TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedUsers" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getUsers">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="role">{{ \'STAFF.ROLE\' | translate }}</th>\n                                <th md-column md-order-by="fullname">{{ \'STAFF.FULLNAME\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'STAFF.USERNAME\' | translate }}</th>\n                                <th md-column md-order-by="email">{{ \'STAFF.EMAIL\' | translate }}</th>\n                                <th md-column md-order-by="phone">{{ \'STAFF.PHONE\' | translate }}</th>\n                                <th md-column md-order-by="mobile">{{ \'STAFF.MOBILE\' | translate }}</th>\n                                <th md-column md-order-by="internal">{{ \'STAFF.INTERNAL\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.users.rows.length">\n                                <td md-cell colspan="8">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="STAFF.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="user" md-select-id="id" ng-repeat="user in vm.users.rows">\n                                <td md-cell ng-if="user.userpic"><img class="avatar" alt="{{user.name}}" ng-src="api/users/{{user.id}}/avatar" /></td>\n                                <td md-cell ng-if="!user.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{user.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditUser($event, user)" md-cell class="role ">{{ vm.arrayrole[user.role].option }}</td>\n                                <td ng-click="vm.createOrEditUser($event, user)" md-cell class="fullname font-weight-600">{{user.fullname}}</td>\n                                <td ng-click="vm.createOrEditUser($event, user)" md-cell class="name ">{{user.name}}</td>\n                                <td ng-click="vm.createOrEditUser($event, user)" md-cell class="email ">{{user.email}}</td>\n                                <td ng-click="vm.createOrEditUser($event, user)" md-cell class="phone ">{{user.phone}}</td>\n                                <td ng-click="vm.createOrEditUser($event, user)" md-cell class="mobile ">{{user.mobile}}</td>\n                                <td ng-click="vm.createOrEditUser($event, user)" md-cell class="internal ">{{user.internal}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(user, $event)" translate="STAFF.EDIT_USER">\n                                                    Edit User\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.role === \'admin\' && user.id !== vm.currentUser.id">\n                                                <md-button ng-click="vm.deleteconfirm(user, $event)" translate="STAFF.DELETE_USER">\n                                                    Delete User\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'STAFF.PAGE\' | translate}}:\', rowsPerPage: \'{{\'STAFF.ROWSPERPAGE\' | translate}}:\', of: \'{{\'STAFF.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.users.count}}" md-on-paginate="vm.getUsers" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / USER TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD USER BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-user-button" ng-click="vm.createOrEditUser($event)" aria-label="add user" translate translate-attr-aria-label="STAFF.ADD_USER">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD USER BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/cannedAnswers/cannedAnswers.html",'<div id="cannedAnswers" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.CANNEDANSWERS">CannedAnswers</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedCannedAnswers.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedCannedAnswers =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-cannedAnswers-count">\n                    <span>{{vm.selectedCannedAnswers.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="CANNEDANSWERS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllCannedAnswers()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectCannedAnswers()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedCannedAnswers" csv-label="true" filename="cannedAnswers.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedCannedAnswers($event)" aria-label="delete selected" translate translate-attr-label="CANNEDANSWERS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- CANNEDANSWER TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedCannedAnswers" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getCannedAnswers">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="key">{{ \'TOOLS.KEY\' | translate }}</th>\n                                <th md-column md-order-by="value">{{ \'TOOLS.VALUE\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.cannedAnswers.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="cannedAnswer" md-select-id="id" ng-repeat="cannedAnswer in vm.cannedAnswers.rows">\n                                <td md-cell ng-if="cannedAnswer.userpic"><img class="avatar" alt="{{cannedAnswer.name}}" ng-src="api/users/{{cannedAnswer.id}}/avatar" /></td>\n                                <td md-cell ng-if="!cannedAnswer.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{cannedAnswer.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditCannedAnswer($event, cannedAnswer)" md-cell class="id ">{{cannedAnswer.id}}</td>\n                                <td ng-click="vm.createOrEditCannedAnswer($event, cannedAnswer)" md-cell class="key ">{{cannedAnswer.key}}</td>\n                                <td ng-click="vm.createOrEditCannedAnswer($event, cannedAnswer)" md-cell class="value ">{{cannedAnswer.value}}</td>\n                                <td ng-click="vm.createOrEditCannedAnswer($event, cannedAnswer)" md-cell class="description ">{{cannedAnswer.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(cannedAnswer, $event)" translate="TOOLS.EDIT_CANNEDANSWER">\n                                                    Edit CannedAnswer\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(cannedAnswer, $event)" translate="TOOLS.DELETE_CANNEDANSWER">\n                                                    Delete CannedAnswer\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.cannedAnswers.count}}" md-on-paginate="vm.getCannedAnswers" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / CANNEDANSWER TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD CANNEDANSWER BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-cannedAnswer-button" ng-click="vm.createOrEditCannedAnswer($event)" aria-label="add cannedAnswer" translate translate-attr-aria-label="TOOLS.ADD_CANNEDANSWER">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD CANNEDANSWER BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/cannedAnswers/create/dialog.html",'<md-dialog class="cannedAnswer-dialog" aria-label="New CannedAnswer">\n    <form name="cannedAnswerForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.KEY">Key</label>\n                <input type="text" name="key" ng-model="vm.cannedAnswer.key" md-maxlength="255" ng-required="true" autofocus>\n                <div ng-messages="cannedAnswerForm[\'key\'].$error" ng-show="cannedAnswerForm[\'key\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.KEY_REQUIRED">Key field is required</span>\n                    </div>\n\n                    <div ng-message="md-maxlength">\n                        <span translate="TOOLS.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 255}\'>Key must have a maximum length equal to 255</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.VALUE">Value</label>\n                <textarea name="value" ng-model="vm.cannedAnswer.value" required></textarea>\n\n                <div ng-messages="cannedAnswerForm[\'value\'].$error" ng-show="cannedAnswerForm[\'value\'].$touched" role="alert">\n\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.cannedAnswer.description">\n                <div ng-messages="cannedAnswerForm[\'description\'].$error" ng-show="cannedAnswerForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newCannedAnswer" ng-click="vm.saveCannedAnswer()" class="send-button md-accent md-raised" ng-disabled="cannedAnswerForm.$invalid || cannedAnswerForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newCannedAnswer" ng-click="vm.addNewCannedAnswer()" class="send-button md-accent md-raised" ng-disabled="cannedAnswerForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_CANNEDANSWER" translate-attr-aria-label="TOOLS.ADD_CANNEDANSWER">\n                    ADD CANNEDANSWER\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newCannedAnswer" ng-click="vm.deleteCannedAnswer($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/customDashboards/create/dialog.html",'<md-dialog class="customDashboard-dialog" aria-label="New CustomDashboard">\n    <form name="customDashboardForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.customDashboard.name" ng-required="true" autofocus>\n                <div ng-messages="customDashboardForm[\'name\'].$error" ng-show="customDashboardForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.customDashboard.description">\n                <div ng-messages="customDashboardForm[\'description\'].$error" ng-show="customDashboardForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newCustomDashboard" ng-click="vm.saveCustomDashboard()" class="send-button md-accent md-raised" ng-disabled="customDashboardForm.$invalid || customDashboardForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newCustomDashboard" ng-click="vm.addNewCustomDashboard()" class="send-button md-accent md-raised" ng-disabled="customDashboardForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_CUSTOMDASHBOARD" translate-attr-aria-label="TOOLS.ADD_CUSTOMDASHBOARD">\n                    ADD CUSTOMDASHBOARD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newCustomDashboard" ng-click="vm.deleteCustomDashboard($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/customDashboards/customDashboards.html",'<div id="customDashboards" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.CUSTOMDASHBOARDS">CustomDashboards</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedCustomDashboards.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedCustomDashboards =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-customDashboards-count">\n                    <span>{{vm.selectedCustomDashboards.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="CUSTOMDASHBOARDS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllCustomDashboards()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectCustomDashboards()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedCustomDashboards" csv-label="true" filename="customDashboards.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedCustomDashboards($event)" aria-label="delete selected" translate translate-attr-label="CUSTOMDASHBOARDS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- CUSTOMDASHBOARD TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedCustomDashboards" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getCustomDashboards">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.customDashboards.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="customDashboard" md-select-id="id" ng-repeat="customDashboard in vm.customDashboards.rows">\n                                <td md-cell ng-if="customDashboard.userpic"><img class="avatar" alt="{{customDashboard.name}}" ng-src="api/users/{{customDashboard.id}}/avatar" /></td>\n                                <td md-cell ng-if="!customDashboard.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{customDashboard.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditCustomDashboard($event, customDashboard)" md-cell class="id ">{{customDashboard.id}}</td>\n                                <td ng-click="vm.createOrEditCustomDashboard($event, customDashboard)" md-cell class="name ">{{customDashboard.name}}</td>\n                                <td ng-click="vm.createOrEditCustomDashboard($event, customDashboard)" md-cell class="description ">{{customDashboard.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(customDashboard, $event)" translate="TOOLS.EDIT_CUSTOMDASHBOARD">\n                                                    Edit CustomDashboard\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.role == \'admin\'">\n                                                <md-button ng-click="vm.useradddialog(customDashboard, $event)" translate="TOOLS.USERADD_CUSTOMDASHBOARD">\n                                                    useradd CustomDashboard\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.clonedialog(customDashboard, $event)" translate="TOOLS.CLONE_CUSTOMDASHBOARD">\n                                                    clone CustomDashboard\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotodashboardgoto(customDashboard, $event)" translate="TOOLS.GOTODASHBOARD_CUSTOMDASHBOARD">\n                                                    goToDashboard CustomDashboard\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(customDashboard, $event)" translate="TOOLS.DELETE_CUSTOMDASHBOARD">\n                                                    Delete CustomDashboard\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.customDashboards.count}}" md-on-paginate="vm.getCustomDashboards" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / CUSTOMDASHBOARD TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD CUSTOMDASHBOARD BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-customDashboard-button" ng-click="vm.createOrEditCustomDashboard($event)" aria-label="add customDashboard" translate translate-attr-aria-label="TOOLS.ADD_CUSTOMDASHBOARD">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD CUSTOMDASHBOARD BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/customDashboards/edit/clone/clone.html",'<md-dialog class="customDashboard-dialog" aria-label="Clone CustomDashboard">\n    <form name="customDashboardForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.customDashboard.name" ng-required="true" autofocus>\n                <div ng-messages="customDashboardForm[\'name\'].$error" ng-show="customDashboardForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <md-button type="submit" ng-click="vm.cloneCustomDashboard()" class="send-button md-accent md-raised" ng-disabled="customDashboardForm.$invalid" aria-label="CLONE" translate="TOOLS.CLONE_CUSTOMDASHBOARD" translate-attr-aria-label="TOOLS.CLONE_CUSTOMDASHBOARD">\n                CLONE CUSTOMDASHBOARD\n            </md-button>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/customDashboards/edit/dashboard/dialog.html",'<md-dialog class="dashboarditem-dialog" aria-label="New DashboardItem">\n    <form name="dashboarditemForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.dashboarditem.type" autofocus ng-disabled="!vm.newDashboardItem">\n\n                    <md-option ng-value="\'counter\'"> {{ \'TOOLS.COUNTER\' | translate }}</md-option>\n\n                    <md-option ng-value="\'multibar-chart\'"> {{ \'TOOLS.MULTIBARCHART\' | translate }}</md-option>\n\n                    <md-option ng-value="\'pie-chart\'"> {{ \'TOOLS.PIECHART\' | translate }}</md-option>\n\n                    <md-option ng-value="\'web-report\'"> {{ \'TOOLS.WEBREPORT\' | translate }}</md-option>\n\n                    <md-option ng-value="\'iframe\'"> {{ \'TOOLS.IFRAME\' | translate }}</md-option>\n\n                    <md-option ng-value="\'clock\'"> {{ \'TOOLS.CLOCK\' | translate }}</md-option>\n\n                    <md-option ng-value="\'custom\'"> {{ \'TOOLS.CUSTOMTYPE\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="dashboarditemForm[\'type\'].$error" ng-show="dashboarditemForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TITLE">Title</label>\n                <input type="text" name="title" ng-model="vm.dashboarditem.title" ng-required="true">\n                <div ng-messages="dashboarditemForm[\'title\'].$error" ng-show="dashboarditemForm[\'title\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.TITLE_REQUIRED">Title field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.dashboarditem.type == \'iframe\'" class="md-block">\n                <label translate="TOOLS.URL">Url</label>\n                <input type="url" name="attrUrl" ng-model="vm.dashboarditem.attrUrl" ng-required="true">\n                <div ng-messages="dashboarditemForm[\'attrUrl\'].$error" ng-show="dashboarditemForm[\'attrUrl\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="TOOLS.ERRORS.URL_MUST_VALID_URL">Url must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.dashboarditem.type == \'custom\'" class="md-block">\n                <label translate="TOOLS.PATH">Path</label>\n                <input type="text" name="attrPath" ng-model="vm.dashboarditem.attrPath" ng-required="true">\n                <div ng-messages="dashboarditemForm[\'attrPath\'].$error" ng-show="dashboarditemForm[\'attrPath\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.PATH_REQUIRED">Path field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.dashboarditem.type == \'clock\'" class="md-block">\n                <label translate="TOOLS.FORMAT">Format</label>\n                <input type="text" name="attrHourFormat" ng-model="vm.dashboarditem.attrHourFormat" ng-required="true">\n                <div ng-messages="dashboarditemForm[\'attrHourFormat\'].$error" ng-show="dashboarditemForm[\'attrHourFormat\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.FORMAT_REQUIRED">Format field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.dashboarditem.type == \'clock\'" class="md-block">\n                <label translate="TOOLS.TIMEZONE">Timezone</label>\n                <md-select name="attrTimezone" ng-model="vm.dashboarditem.attrTimezone" required>\n                    <md-option ng-value="\'-12.00\'">GMT-12.00</md-option>\n                    <md-option ng-value="\'-11.00\'">GMT-11.00</md-option>\n                    <md-option ng-value="\'-10.00\'">GMT-10.00</md-option>\n                    <md-option ng-value="\'-9.00\'">GMT-9.00</md-option>\n                    <md-option ng-value="\'-8.00\'">GMT-8.00</md-option>\n                    <md-option ng-value="\'-7.00\'">GMT-7.00</md-option>\n                    <md-option ng-value="\'-6.00\'">GMT-6.00</md-option>\n                    <md-option ng-value="\'-5.00\'">GMT-5.00</md-option>\n                    <md-option ng-value="\'-4.00\'">GMT-4.00</md-option>\n                    <md-option ng-value="\'-3.30\'">GMT-3.30</md-option>\n                    <md-option ng-value="\'-3.00\'">GMT-3.00</md-option>\n                    <md-option ng-value="\'-2.00\'">GMT-2.00</md-option>\n                    <md-option ng-value="\'-1.00\'">GMT-1.00</md-option>\n                    <md-option ng-value="\'0.00\'">GMT 0.00</md-option>\n                    <md-option ng-value="\'1.00\'">GMT+1.00</md-option>\n                    <md-option ng-value="\'2.00\'">GMT+2.00</md-option>\n                    <md-option ng-value="\'3.00\'">GMT+3.00</md-option>\n                    <md-option ng-value="\'3.30\'">GMT+3.30</md-option>\n                    <md-option ng-value="\'4.00\'">GMT+4.00</md-option>\n                    <md-option ng-value="\'4.30\'">GMT+4.30</md-option>\n                    <md-option ng-value="\'5.00\'">GMT+5.00</md-option>\n                    <md-option ng-value="\'5.30\'">GMT+5.30</md-option>\n                    <md-option ng-value="\'5.45\'">GMT+5.45</md-option>\n                    <md-option ng-value="\'6.00\'">GMT+6.00</md-option>\n                    <md-option ng-value="\'6.30\'">GMT+6.30</md-option>\n                    <md-option ng-value="\'7.00\'">GMT+7.00</md-option>\n                    <md-option ng-value="\'8.00\'">GMT+8.00</md-option>\n                    <md-option ng-value="\'9.00\'">GMT+9.00</md-option>\n                    <md-option ng-value="\'9.30\'">GMT+9.30</md-option>\n                    <md-option ng-value="\'10.00\'">GMT+10.00</md-option>\n                    <md-option ng-value="\'11.00\'">GMT+11.00</md-option>\n                    <md-option ng-value="\'12.00\'">GMT+12.00</md-option>\n                    <md-option ng-value="\'13.00\'">GMT+13.00</md-option>\n                </md-select>\n                <div ng-messages="dashboarditemForm[\'attrTimezone\'].$error" ng-show="dashboarditemForm[\'attrTimezone\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.TIMEZONE_REQUIRED">Timezone field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.dashboarditem.type == \'counter\'" class="md-block">\n                <label translate="TOOLS.METRIC">Metric</label>\n                <md-select name="attrMetric" ng-model="vm.dashboarditem.attrMetric" required>\n\n                    <md-option ng-value="\'total\'"> {{ \'TOOLS.TOTAL\' | translate }}</md-option>\n\n                    <md-option ng-value="\'abandoned\'"> {{ \'TOOLS.ABANDONED\' | translate }}</md-option>\n\n                    <md-option ng-value="\'waiting\'"> {{ \'TOOLS.WAITING\' | translate }}</md-option>\n\n                    <md-option ng-value="\'talking\'"> {{ \'TOOLS.TALKING\' | translate }}</md-option>\n\n                    <md-option ng-value="\'answered\'"> {{ \'TOOLS.ANSWERED\' | translate }}</md-option>\n\n                    <md-option ng-value="\'unmanaged\'"> {{ \'TOOLS.UNMANAGED\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="dashboarditemForm[\'attrMetric\'].$error" ng-show="dashboarditemForm[\'attrMetric\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.METRIC_REQUIRED">Metric field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="[\'multibar-chart\', \'pie-chart\'].includes(vm.dashboarditem.type)" class="md-block">\n                <label translate="TOOLS.SERIE1">Serie1</label>\n                <md-select name="attrSerie1" ng-model="vm.dashboarditem.attrSerie1" required>\n\n                    <md-option ng-value="\'total\'"> {{ \'TOOLS.TOTAL\' | translate }}</md-option>\n\n                    <md-option ng-value="\'abandoned\'"> {{ \'TOOLS.ABANDONED\' | translate }}</md-option>\n\n                    <md-option ng-value="\'waiting\'"> {{ \'TOOLS.WAITING\' | translate }}</md-option>\n\n                    <md-option ng-value="\'talking\'"> {{ \'TOOLS.TALKING\' | translate }}</md-option>\n\n                    <md-option ng-value="\'answered\'"> {{ \'TOOLS.ANSWERED\' | translate }}</md-option>\n\n                    <md-option ng-value="\'unmanaged\'"> {{ \'TOOLS.UNMANAGED\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="dashboarditemForm[\'attrSerie1\'].$error" ng-show="dashboarditemForm[\'attrSerie1\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.SERIE1_REQUIRED">Serie1 field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="[\'multibar-chart\', \'pie-chart\'].includes(vm.dashboarditem.type)" class="md-block">\n                <label translate="TOOLS.SERIE2">Serie2</label>\n                <md-select name="attrSerie2" ng-model="vm.dashboarditem.attrSerie2">\n\n                    <md-option ng-value="\'null\'"> {{ \'TOOLS.NONE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'total\'"> {{ \'TOOLS.TOTAL\' | translate }}</md-option>\n\n                    <md-option ng-value="\'abandoned\'"> {{ \'TOOLS.ABANDONED\' | translate }}</md-option>\n\n                    <md-option ng-value="\'waiting\'"> {{ \'TOOLS.WAITING\' | translate }}</md-option>\n\n                    <md-option ng-value="\'talking\'"> {{ \'TOOLS.TALKING\' | translate }}</md-option>\n\n                    <md-option ng-value="\'answered\'"> {{ \'TOOLS.ANSWERED\' | translate }}</md-option>\n\n                    <md-option ng-value="\'unmanaged\'"> {{ \'TOOLS.UNMANAGED\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="dashboarditemForm[\'attrSerie2\'].$error" ng-show="dashboarditemForm[\'attrSerie2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.SERIE2_REQUIRED">Serie2 field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="[\'multibar-chart\', \'pie-chart\'].includes(vm.dashboarditem.type)" class="md-block">\n                <label translate="TOOLS.SERIE3">Serie3</label>\n                <md-select name="attrSerie3" ng-model="vm.dashboarditem.attrSerie3">\n\n                    <md-option ng-value="\'null\'"> {{ \'TOOLS.NONE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'total\'"> {{ \'TOOLS.TOTAL\' | translate }}</md-option>\n\n                    <md-option ng-value="\'abandoned\'"> {{ \'TOOLS.ABANDONED\' | translate }}</md-option>\n\n                    <md-option ng-value="\'waiting\'"> {{ \'TOOLS.WAITING\' | translate }}</md-option>\n\n                    <md-option ng-value="\'talking\'"> {{ \'TOOLS.TALKING\' | translate }}</md-option>\n\n                    <md-option ng-value="\'answered\'"> {{ \'TOOLS.ANSWERED\' | translate }}</md-option>\n\n                    <md-option ng-value="\'unmanaged\'"> {{ \'TOOLS.UNMANAGED\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="dashboarditemForm[\'attrSerie3\'].$error" ng-show="dashboarditemForm[\'attrSerie3\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.SERIE3_REQUIRED">Serie3 field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.dashboarditem.type == \'web-report\'" class="md-block">\n                <label translate="TOOLS.REFRESH">Refresh</label>\n                <input type="number" name="attrRefresh" ng-model="vm.dashboarditem.attrRefresh" min="5" ng-required="true">\n                <div ng-messages="dashboarditemForm[\'attrRefresh\'].$error" ng-show="dashboarditemForm[\'attrRefresh\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.REFRESH_REQUIRED">Refresh field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="TOOLS.ERRORS.REFRESH_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Refresh must be a valid greater or equal than</span> <span>5</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.dashboarditem.type == \'web-report\'" class="md-block">\n                <label translate="TOOLS.REPORT">Report</label>\n                <md-select name="attrReport" ng-model="vm.dashboarditem.attrReport" required>\n                    <md-option ng-value="attrReport.id" ng-repeat="attrReport in vm.customReports">{{ attrReport.name }}</md-option>\n                </md-select>\n                <div ng-messages="dashboarditemForm[\'attrReport\'].$error" ng-show="dashboarditemForm[\'attrReport\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.REPORT_REQUIRED">Report field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="[\'multibar-chart\', \'pie-chart\', \'counter\'].includes(vm.dashboarditem.type)" class="md-block">\n                <label translate="TOOLS.FILTERVOICEQUEUES">FilterVoiceQueues</label>\n                <md-select name="attrVoiceQueues" ng-model="vm.dashboarditem.attrVoiceQueues" multiple>\n                    <md-option ng-value="attrVoiceQueues.id" ng-repeat="attrVoiceQueues in vm.voiceQueues">{{ attrVoiceQueues.name }}</md-option>\n                </md-select>\n                <div ng-messages="dashboarditemForm[\'attrVoiceQueues\'].$error" ng-show="dashboarditemForm[\'attrVoiceQueues\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.FILTERVOICEQUEUES_REQUIRED">FilterVoiceQueues field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="[\'counter\', \'clock\'].includes(vm.dashboarditem.type)" class="md-block">\n                <label translate="TOOLS.FONTSIZE">FontSize</label>\n                <input type="number" name="attrFontSize" ng-model="vm.dashboarditem.attrFontSize" min="12" max="40" ng-required="true">\n                <div ng-messages="dashboarditemForm[\'attrFontSize\'].$error" ng-show="dashboarditemForm[\'attrFontSize\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.FONTSIZE_REQUIRED">FontSize field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="TOOLS.ERRORS.FONTSIZE_MUST_BE_GREATER_THAN_OR_EQUAL_TO">FontSize must be a valid greater or equal than</span> <span>12</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="TOOLS.ERRORS.FONTSIZE_MUST_BE_LESS_THAN_OR_EQUAL_TO">FontSize must be a valid greater or equal than</span> <span>40</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div flex md-color-picker ng-model="vm.dashboarditem.foreground" label="{{\'TOOLS.FOREGROUND\' | translate}}" md-color-hex="true" md-color-rgb="false" md-color-hsl="false" md-color-history="false" md-color-material-palette="false" md-color-alpha-channel="false"\n                open-on-input="true"></div>\n            <div flex md-color-picker ng-model="vm.dashboarditem.background" label="{{\'TOOLS.BACKGROUND\' | translate}}" md-color-hex="true" md-color-rgb="false" md-color-hsl="false" md-color-history="false" md-color-material-palette="false" md-color-alpha-channel="false"\n                open-on-input="true"></div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.LINK">link</label>\n                <input type="url" name="link" ng-model="vm.dashboarditem.link">\n                <div ng-messages="dashboarditemForm[\'link\'].$error" ng-show="dashboarditemForm[\'link\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.LINK_REQUIRED">link field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="TOOLS.ERRORS.LINK_MUST_VALID_URL">link must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newDashboardItem" ng-click="vm.saveDashboardItem()" class="send-button md-accent md-raised" ng-disabled="dashboarditemForm.$invalid || dashboarditemForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newDashboardItem" ng-click="vm.addNewDashboardItem()" class="send-button md-accent md-raised" ng-disabled="dashboarditemForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_DASHBOARDITEM" translate-attr-aria-label="TOOLS.ADD_DASHBOARDITEM">\n                    ADD DASHBOARDITEM\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newDashboardItem" ng-click="vm.deleteDashboardItem($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/customDashboards/edit/useradd/useradd.html",'<md-dialog class="customDashboard-dialog" aria-label="customDashboard">\n    <form name="customDashboardForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="TOOLS.USERADD_CUSTOMDASHBOARD">Add User to customDashboard</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/customDashboards/edit/view.html",'<div id="tools-customDashboard" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-customDashboards-button md-icon-button" aria-label="Go to customDashboards" ng-click="vm.gotoCustomDashboards()" translate translate-attr-aria-label="TOOLS.GO_TO_CUSTOMDASHBOARDS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="customDashboard-image" hide-xs>\n                    <img ng-src="assets/images/business/customDashboards.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.customDashboard.id}}\n                        <span ng-if="vm.customDashboard.name">{{vm.customDashboard.name}}</span>\n                        <span ng-if="vm.customDashboard.exten">{{vm.customDashboard.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="TOOLS.CREATED_AT"></span> <span>{{vm.customDashboard.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.useradddialog(vm.customDashboard, $event)" class="md-fab md-purple-500-bg md-icon-button" aria-label="useradd" ng-if="vm.currentUser.role == \'admin\'">\n                <md-tooltip><span translate="TOOLS.USERADD_CUSTOMDASHBOARD"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.clonedialog(vm.customDashboard, $event)" class="md-fab md-green-500-bg md-icon-button" aria-label="clone">\n                <md-tooltip><span translate="TOOLS.CLONE_CUSTOMDASHBOARD"></span></md-tooltip>\n                <md-icon md-font-icon="icon-content-duplicate"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.gotogoto(vm.customDashboard, $event)" class="md-fab md-warn md-icon-button" aria-label="goto">\n                <md-tooltip><span translate="TOOLS.GOTO_CUSTOMDASHBOARD"></span></md-tooltip>\n                <md-icon md-font-icon="icon-forward"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveCustomDashboard()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (dashboardForm.$invalid)" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="TOOLS.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="customDashboard-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="TOOLS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.customDashboard.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.customDashboard.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="TOOLS.DASHBOARD">DASHBOARD</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="customDashboard-detail-form-container dashboard md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="CustomDashboardItemsController as vm_cd" ng-init="vm_cd.init(vm.customDashboard)" class="customDashboard-detail-form-container no-padding no-margin" layout="column">\n                            <div ng-if="vm_cd.customDashboard.widgets.length">\n                                <md-button class="md-fab md-mini md-accent" ng-click="vm_cd.createOrEditWidget()" aria-label="add item">\n                                    <md-tooltip>{{ \'TOOLS.ADD_WIDGET\' | translate }}</md-tooltip>\n                                    <md-icon md-font-icon="icon-plus"></md-icon>\n                                </md-button>\n                                <md-content flex>\n                                    <ms-widget-engine config="vm_cd.customDashboard" on-edit="vm_cd.createOrEditWidget(widget)" on-delete="vm_cd.deleteWidget(widget)"></ms-widget-engine>\n                                </md-content>\n                            </div>\n                            <div ng-if="!vm_cd.customDashboard.widgets.length" layout="row" layout-align="center center" flex>\n                                <md-button class="width-130 height-130 md-accent md-raised" ng-click="vm_cd.createOrEditWidget()" aria-label="add item" layout="column">\n                                    <md-icon md-font-icon="icon-plus-circle" class="s50"></md-icon>\n                                    <span layout-wrap translate="TOOLS.ADD_WIDGET"></span>\n                                </md-button>\n                            </div>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/tools/views/intervals/create/dialog.html",'<md-dialog class="interval-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.interval.name" ng-required="true" autofocus>\n                <div ng-messages="intervalForm[\'name\'].$error" ng-show="intervalForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.interval.description">\n                <div ng-messages="intervalForm[\'description\'].$error" ng-show="intervalForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newInterval" ng-click="vm.deleteInterval($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/intervals/edit/apps/interval/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input ng-model="vm.interval.name" type="text" name="name" placeholder="{{\'TOOLS.NAME\' | translate}}" md-autofocus required>\n                <div ng-messages="intervalForm.name.$error" ng-show="intervalForm.name.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select ng-model="vm.type">\n                    <md-option ng-value="type" ng-repeat=\'type in vm.types\'>{{ type | ucfirst }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.type === \'list\'">\n                <label translate="TOOLS.INTERVALS">Intervals</label>\n                <md-select ng-model="vm.interval.IntervalId">\n                    <md-option ng-value="interval.id" ng-repeat="interval in vm.intervals.rows">{{ interval.name }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            \x3c!-- TIMERANGE START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.TIME_RANGE">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <div class="md-block" flex>\n                    <mdp-time-picker name="timeRangeFrom" mdp-placeholder="FROM" ng-model="vm.timeRangeFrom" mdp-format="HH:mm" mdp-auto-switch="true">\n                        <div ng-messages="intervalForm.timeRangeFrom.$error" ng-show="intervalForm.timeRangeFrom.$touched" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_FROM_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n                <div class="md-block" flex ng-if="vm.timeRangeFrom">\n                    <mdp-time-picker name="timeRangeTo" mdp-placeholder="TO*" ng-model="vm.timeRangeTo" mdp-format="HH:mm" mdp-auto-switch="true" required>\n                        <div ng-messages="intervalForm.timeRangeTo.$error" ng-show="intervalForm.timeRangeTo.$invalid" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_INVALID">Time Range To field is invalid</span>\n                            </div>\n                            <div ng-message="required">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_REQUIRED">Time Range To field is required</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n            \x3c!-- TIMERANGE END --\x3e\n\n            \x3c!-- DAYSOFWEEK START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.WEEK_DAYS">Week Days</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.dayOfWeekFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex class="md-block" ng-if="vm.dayOfWeekFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="dayOfWeekTo" ng-model="vm.dayOfWeekTo">\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.dayOfWeekTo.$error" ng-show="intervalForm.dayOfWeekTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- DAYSOFWEEK END --\x3e\n\n            \x3c!-- MONTHDAY START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTH_DAYS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthDayFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthDayFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthDayTo" ng-model="vm.monthDayTo">\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthDayTo.$error" ng-show="intervalForm.monthDayTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTHDAY END --\x3e\n\n            \x3c!-- MONTH START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTHS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthTo" ng-model="vm.monthTo">\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthTo.$error" ng-show="intervalForm.monthTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTH END --\x3e\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/intervals/edit/intervals/dialog.html",'<md-dialog class="interval-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.interval.name" ng-required="true" autofocus>\n                <div ng-messages="intervalForm[\'name\'].$error" ng-show="intervalForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newInterval" ng-click="vm.deleteInterval($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/intervals/edit/view.html",'<div id="tools-interval" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-intervals-button md-icon-button" aria-label="Go to intervals" ng-click="vm.gotoIntervals()" translate translate-attr-aria-label="TOOLS.GO_TO_INTERVALS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="interval-image" hide-xs>\n                    <img ng-src="assets/images/business/intervals.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.interval.id}}\n                        <span ng-if="vm.interval.name">{{vm.interval.name}}</span>\n                        <span ng-if="vm.interval.exten">{{vm.interval.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="TOOLS.CREATED_AT"></span> <span>{{vm.interval.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (intervalsForm.$invalid)" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="TOOLS.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="interval-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="TOOLS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.interval.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.interval.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="TOOLS.INTERVALS">INTERVALS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="interval-detail-form-container intervals md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="IntervalIntervalsController as vm_dc" ng-init="vm_dc.init(vm.interval)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedIntervalIntervals.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="TOOLS.INTERVALS">Intervals</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditIntervalInterval($event)" aria-label="add interval" translate translate-attr-label="TOOLS.ADD_INTERVAL">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedIntervalIntervals.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedIntervalIntervals.length}} {{vm_dc.selectedIntervalIntervals.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedIntervalIntervals" csv-label="true" filename="intervals.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedIntervalIntervals($event)" aria-label="delete selected" translate translate-attr-label="INTERVALS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedIntervalIntervals" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getIntervalIntervals">\n                                        <tr md-row>\n                                            <th md-column width="10px"></th>\n                                            <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                            <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                            <th md-column md-order-by="interval">{{ \'TOOLS.INTERVAL\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'TOOLS.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body ng-sortable="vm_dc.sortableTable">\n                                        <tr md-row md-select="interval" md-select-id="id" ng-repeat="interval in vm_dc.intervalIntervals.rows">\n                                            <td md-cell>\n                                                <md-icon md-font-icon="icon-drag-vertical" class="s16 handle"></md-icon>\n                                            </td>\n                                            <td ng-click="vm_dc.createOrEditIntervalInterval($event, interval)" md-cell>{{interval.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditIntervalInterval($event, interval)" md-cell>{{interval.name}}</td>\n                                            <td ng-click="vm_dc.createOrEditIntervalInterval($event, interval)" md-cell>{{interval.interval}}</td>\n                                            <td ng-click="vm_dc.createOrEditIntervalInterval($event, interval)" md-cell>{{interval.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditIntervalInterval($event, interval)" translate="TOOLS.EDIT_INTERVAL">\n                                                                Edit Interval\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(interval, $event)" translate="TOOLS.DELETE_INTERVAL">\n                                                                Delete Interval\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.intervalIntervals.rows.length">\n                                            <td md-cell colspan="7">\n                                                <span class="text-boxed-ligth" translate="TOOLS.NO_INTERVALS_AVAILABLE">No intervals available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/tools/views/intervals/intervals.html",'<div id="intervals" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.INTERVALS">Intervals</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedIntervals.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedIntervals =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-intervals-count">\n                    <span>{{vm.selectedIntervals.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="INTERVALS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllIntervals()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectIntervals()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedIntervals" csv-label="true" filename="intervals.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedIntervals($event)" aria-label="delete selected" translate translate-attr-label="INTERVALS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- INTERVAL TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedIntervals" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getIntervals">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.intervals.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="interval" md-select-id="id" ng-repeat="interval in vm.intervals.rows">\n                                <td md-cell ng-if="interval.userpic"><img class="avatar" alt="{{interval.name}}" ng-src="api/users/{{interval.id}}/avatar" /></td>\n                                <td md-cell ng-if="!interval.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{interval.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditInterval($event, interval)" md-cell class="id ">{{interval.id}}</td>\n                                <td ng-click="vm.createOrEditInterval($event, interval)" md-cell class="name ">{{interval.name}}</td>\n                                <td ng-click="vm.createOrEditInterval($event, interval)" md-cell class="description ">{{interval.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(interval, $event)" translate="TOOLS.EDIT_INTERVAL">\n                                                    Edit Interval\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(interval, $event)" translate="TOOLS.DELETE_INTERVAL">\n                                                    Delete Interval\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.intervals.count}}" md-on-paginate="vm.getIntervals" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / INTERVAL TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD INTERVAL BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-interval-button" ng-click="vm.createOrEditInterval($event)" aria-label="add interval" translate translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD INTERVAL BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/pauses/create/dialog.html",'<md-dialog class="pause-dialog" aria-label="New Pause">\n    <form name="pauseForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.pause.name" ng-required="true" autofocus>\n                <div ng-messages="pauseForm[\'name\'].$error" ng-show="pauseForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.pause.description">\n                <div ng-messages="pauseForm[\'description\'].$error" ng-show="pauseForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newPause" ng-click="vm.savePause()" class="send-button md-accent md-raised" ng-disabled="pauseForm.$invalid || pauseForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newPause" ng-click="vm.addNewPause()" class="send-button md-accent md-raised" ng-disabled="pauseForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_PAUSE" translate-attr-aria-label="TOOLS.ADD_PAUSE">\n                    ADD PAUSE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newPause" ng-click="vm.deletePause($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/pauses/pauses.html",'<div id="pauses" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.PAUSES">Pauses</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedPauses.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedPauses =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-pauses-count">\n                    <span>{{vm.selectedPauses.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="PAUSES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllPauses()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectPauses()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedPauses" csv-label="true" filename="pauses.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedPauses($event)" aria-label="delete selected" translate translate-attr-label="PAUSES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- PAUSE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedPauses" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getPauses">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.pauses.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="pause" md-select-id="id" ng-repeat="pause in vm.pauses.rows">\n                                <td md-cell ng-if="pause.userpic"><img class="avatar" alt="{{pause.name}}" ng-src="api/users/{{pause.id}}/avatar" /></td>\n                                <td md-cell ng-if="!pause.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{pause.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditPause($event, pause)" md-cell class="id ">{{pause.id}}</td>\n                                <td ng-click="vm.createOrEditPause($event, pause)" md-cell class="name ">{{pause.name}}</td>\n                                <td ng-click="vm.createOrEditPause($event, pause)" md-cell class="description ">{{pause.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(pause, $event)" translate="TOOLS.EDIT_PAUSE">\n                                                    Edit Pause\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(pause, $event)" translate="TOOLS.DELETE_PAUSE">\n                                                    Delete Pause\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.pauses.count}}" md-on-paginate="vm.getPauses" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / PAUSE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD PAUSE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-pause-button" ng-click="vm.createOrEditPause($event)" aria-label="add pause" translate translate-attr-aria-label="TOOLS.ADD_PAUSE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD PAUSE BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/schedules/create/dialog.html",'<md-dialog class="schedule-dialog" aria-label="New Schedule">\n    <form name="scheduleForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.schedule.name" ng-required="true" autofocus>\n                <div ng-messages="scheduleForm[\'name\'].$error" ng-show="scheduleForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.REPORTTYPE">ReportType</label>\n                <md-select name="type" ng-model="vm.schedule.type" required>\n                    <md-option ng-value="\'default\'">Default</md-option>\n                    <md-option ng-value="\'custom\'">Custom</md-option>\n                </md-select>\n                <div ng-messages="scheduleForm[\'type\'].$error" ng-show="scheduleForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.REPORTTYPE_REQUIRED">ReportType field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.schedule.type == \'default\'" class="md-block">\n                <label translate="TOOLS.REPORT">Report</label>\n                <md-select name="DefaultReportId" ng-model="vm.schedule.DefaultReportId" required>\n                    <md-option ng-value="DefaultReportId.id" ng-repeat="DefaultReportId in vm.defaultReports">{{ DefaultReportId.name }}</md-option>\n                </md-select>\n                <div ng-messages="scheduleForm[\'DefaultReportId\'].$error" ng-show="scheduleForm[\'DefaultReportId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.REPORT_REQUIRED">Report field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.schedule.type == \'custom\'" class="md-block">\n                <label translate="TOOLS.REPORT">Report</label>\n                <md-select name="CustomReportId" ng-model="vm.schedule.CustomReportId" required>\n                    <md-option ng-value="CustomReportId.id" ng-repeat="CustomReportId in vm.customReports">{{ CustomReportId.name }}</md-option>\n                </md-select>\n                <div ng-messages="scheduleForm[\'CustomReportId\'].$error" ng-show="scheduleForm[\'CustomReportId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.REPORT_REQUIRED">Report field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.OUTPUT">Output</label>\n                <md-select name="output" ng-model="vm.schedule.output" required>\n                    <md-option ng-value="\'csv\'">CSV</md-option>\n                    <md-option ng-value="\'pdf\'">PDF</md-option>\n                    <md-option ng-value="\'xlsx\'">Excel</md-option>\n                </md-select>\n                <div ng-messages="scheduleForm[\'output\'].$error" ng-show="scheduleForm[\'output\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.OUTPUT_REQUIRED">Output field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.schedule.active" aria-label="Active"><span translate="TOOLS.ACTIVE">Active</span></md-switch>\n            </md-input-container>\n            <div class="md-block">\n                <label translate="TOOLS.VALIDITYSTART">ValidityStart</label>\n                <md-content layout="row" class="md-padding">\n                    <div flex class="md-block">\n                        <mdp-date-picker mdp-open-on-click required name="startAtDate" mdp-placeholder="Date" mdp-format="YYYY-MM-DD" ng-model="vm.schedule.startAt" ng-init="vm.schedule.startAt = vm.getDateFromString(vm.schedule.startAt)">\n                            <div ng-messages="scheduleForm.dateRangeFrom.$error" ng-show="scheduleForm.dateRangeFrom.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="TOOLS.ERRORS.DATE_REQUIRED">Date is required</span>\n                                </div>\n                                <div ng-message="format">\n                                    <span translate="TOOLS.ERRORS.DATE_INVALID">Date is invalid</span>\n                                </div>\n                            </div>\n                        </mdp-date-picker>\n                    </div>\n                    <div flex class="md-block">\n                        <mdp-time-picker mdp-open-on-click required name="startAtTime" mdp-placeholder="Time" mdp-format="HH:mm:ss" mdp-auto-switch="true" ng-model="vm.schedule.startAt" ng-init="vm.schedule.startAt = vm.getDateFromString(vm.schedule.startAt)">\n                            <div ng-messages="scheduleForm.timeRangeFrom.$error" ng-show="scheduleForm.timeRangeFrom.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="TOOLS.ERRORS.TIME_REQUIRED">Time is required</span>\n                                </div>\n                                <div ng-message="format">\n                                    <span translate="TOOLS.ERRORS.TIME_INVALID">Time is invalid</span>\n                                </div>\n                            </div>\n                        </mdp-time-picker>\n                    </div>\n                </md-content>\n            </div>\n            <div class="md-block">\n                <label translate="TOOLS.VALIDITYEND">ValidityEnd</label>\n                <md-content layout="row" class="md-padding">\n                    <div flex class="md-block">\n                        <mdp-date-picker mdp-open-on-click required name="endAtDate" mdp-placeholder="Date" mdp-format="YYYY-MM-DD" ng-model="vm.schedule.endAt" ng-init="vm.schedule.endAt = vm.getDateFromString(vm.schedule.endAt)">\n                            <div ng-messages="scheduleForm.dateRangeFrom.$error" ng-show="scheduleForm.dateRangeFrom.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="TOOLS.ERRORS.DATE_REQUIRED">Date is required</span>\n                                </div>\n                                <div ng-message="format">\n                                    <span translate="TOOLS.ERRORS.DATE_INVALID">Date is invalid</span>\n                                </div>\n                            </div>\n                        </mdp-date-picker>\n                    </div>\n                    <div flex class="md-block">\n                        <mdp-time-picker mdp-open-on-click required name="endAtTime" mdp-placeholder="Time" mdp-format="HH:mm:ss" mdp-auto-switch="true" ng-model="vm.schedule.endAt" ng-init="vm.schedule.endAt = vm.getDateFromString(vm.schedule.endAt)">\n                            <div ng-messages="scheduleForm.timeRangeFrom.$error" ng-show="scheduleForm.timeRangeFrom.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="TOOLS.ERRORS.TIME_REQUIRED">Time is required</span>\n                                </div>\n                                <div ng-message="format">\n                                    <span translate="TOOLS.ERRORS.TIME_INVALID">Time is invalid</span>\n                                </div>\n                            </div>\n                        </mdp-time-picker>\n                    </div>\n                </md-content>\n            </div>\n            <div flex class="md-block">\n                <label> {{ \'TOOLS.CRON\' | translate }} ({{vm.schedule.cron}})</label>\n                <cron-selection name="cron" ng-model="vm.schedule.cron" template="assets/angular-cron-jobs/template.html" required></cron-selection>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.LAST">Last</label>\n                <input type="number" name="subtractNumber" ng-model="vm.schedule.subtractNumber" ng-required="true">\n                <div ng-messages="scheduleForm[\'subtractNumber\'].$error" ng-show="scheduleForm[\'subtractNumber\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.LAST_REQUIRED">Last field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.LASTUNIT">LastUnit</label>\n                <md-select name="subtractUnit" ng-model="vm.schedule.subtractUnit" required>\n                    <md-option ng-value="\'minutes\'">Minutes</md-option>\n                    <md-option ng-value="\'hours\'">Hours</md-option>\n                    <md-option ng-value="\'days\'">Days</md-option>\n                    <md-option ng-value="\'weeks\'">Weeks</md-option>\n                    <md-option ng-value="\'months\'">Months</md-option>\n                    <md-option ng-value="\'quarters\'">Quarters</md-option>\n                    <md-option ng-value="\'years\'">Years</md-option>\n                </md-select>\n                <div ng-messages="scheduleForm[\'subtractUnit\'].$error" ng-show="scheduleForm[\'subtractUnit\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.LASTUNIT_REQUIRED">LastUnit field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.schedule.sendMail" aria-label="SendMail"><span translate="TOOLS.SENDMAIL">SendMail</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="vm.schedule.sendMail" class="md-block">\n                <label translate="TOOLS.MAILACCOUNT">MailAccount</label>\n                <md-select name="MailAccountId" ng-model="vm.schedule.MailAccountId" required>\n                    <md-option ng-value="MailAccountId.id" ng-repeat="MailAccountId in vm.mailAccounts">{{ MailAccountId.name }}</md-option>\n                </md-select>\n                <div ng-messages="scheduleForm[\'MailAccountId\'].$error" ng-show="scheduleForm[\'MailAccountId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.MAILACCOUNT_REQUIRED">MailAccount field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.schedule.sendMail" class="md-block">\n                <label translate="TOOLS.EMAILADDRESS">EmailAddress</label>\n                <input type="text" name="email" ng-model="vm.schedule.email" ng-required="true">\n                <div class="hint"><span translate="TOOLS.HELP.EMAILADDRESS"></span></div>\n                <div ng-messages="scheduleForm[\'email\'].$error" ng-show="scheduleForm[\'email\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.EMAILADDRESS_REQUIRED">EmailAddress field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="" name="description" ng-model="vm.schedule.description">\n                <div ng-messages="scheduleForm[\'description\'].$error" ng-show="scheduleForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSchedule" ng-click="vm.saveSchedule()" class="send-button md-accent md-raised" ng-disabled="scheduleForm.$invalid || scheduleForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSchedule" ng-click="vm.addNewSchedule()" class="send-button md-accent md-raised" ng-disabled="scheduleForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_SCHEDULE" translate-attr-aria-label="TOOLS.ADD_SCHEDULE">\n                    ADD SCHEDULE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSchedule" ng-click="vm.deleteSchedule($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/schedules/schedules.html",'<div id="schedules" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.SCHEDULER">Scheduler</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedScheduler.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedScheduler =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-schedules-count">\n                    <span>{{vm.selectedScheduler.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="SCHEDULER.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllScheduler()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectScheduler()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedScheduler" csv-label="true" filename="schedules.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedScheduler($event)" aria-label="delete selected" translate translate-attr-label="SCHEDULER.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- SCHEDULE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedScheduler" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getScheduler">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="active">{{ \'TOOLS.ACTIVE\' | translate }}</th>\n                                <th md-column md-order-by="startAt">{{ \'TOOLS.VALIDITYSTART\' | translate }}</th>\n                                <th md-column md-order-by="endAt">{{ \'TOOLS.VALIDITYEND\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.schedules.rows.length">\n                                <td md-cell colspan="7">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="schedule" md-select-id="id" ng-repeat="schedule in vm.schedules.rows">\n                                <td md-cell ng-if="schedule.userpic"><img class="avatar" alt="{{schedule.name}}" ng-src="api/users/{{schedule.id}}/avatar" /></td>\n                                <td md-cell ng-if="!schedule.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{schedule.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditSchedule($event, schedule)" md-cell class="id ">{{schedule.id}}</td>\n                                <td ng-click="vm.createOrEditSchedule($event, schedule)" md-cell class="name ">{{schedule.name}}</td>\n                                <td ng-click="vm.createOrEditSchedule($event, schedule)" md-cell class="active ">\n                                    <md-icon md-colors="{color: {{schedule.active ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{schedule.active ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                </td>\n                                <td ng-click="vm.createOrEditSchedule($event, schedule)" md-cell class="startAt ">{{schedule.startAt | date:\'medium\' }}</td>\n                                <td ng-click="vm.createOrEditSchedule($event, schedule)" md-cell class="endAt ">{{schedule.endAt | date:\'medium\' }}</td>\n                                <td ng-click="vm.createOrEditSchedule($event, schedule)" md-cell class="description ">{{schedule.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(schedule, $event)" translate="TOOLS.EDIT_SCHEDULE">\n                                                    Edit Schedule\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(schedule, $event)" translate="TOOLS.DELETE_SCHEDULE">\n                                                    Delete Schedule\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.schedules.count}}" md-on-paginate="vm.getScheduler" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / SCHEDULE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD SCHEDULE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-schedule-button" ng-click="vm.createOrEditSchedule($event)" aria-label="add schedule" translate translate-attr-aria-label="TOOLS.ADD_SCHEDULE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD SCHEDULE BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/sounds/create/dialog.html",'<md-dialog class="sound-dialog" aria-label="New Sound">\n    <form name="soundForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.sound.name" ng-required="true" autofocus>\n                <div ng-messages="soundForm[\'name\'].$error" ng-show="soundForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.sound.description">\n                <div ng-messages="soundForm[\'description\'].$error" ng-show="soundForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSound" ng-click="vm.saveSound()" class="send-button md-accent md-raised" ng-disabled="soundForm.$invalid || soundForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSound" ng-click="vm.addNewSound()" class="send-button md-accent md-raised" ng-disabled="soundForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_SOUND" translate-attr-aria-label="TOOLS.ADD_SOUND">\n                    ADD SOUND\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSound" ng-click="vm.deleteSound($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/sounds/sounds.html",'<div id="sounds" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.SOUNDS">Sounds</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedSounds.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedSounds =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-sounds-count">\n                    <span>{{vm.selectedSounds.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="SOUNDS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllSounds()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectSounds()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedSounds" csv-label="true" filename="sounds.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedSounds($event)" aria-label="delete selected" translate translate-attr-label="SOUNDS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- SOUND TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedSounds" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getSounds">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="audio">{{ \'TOOLS.AUDIO\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.sounds.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="sound" md-select-id="id" ng-repeat="sound in vm.sounds.rows">\n                                <td md-cell ng-if="sound.userpic"><img class="avatar" alt="{{sound.name}}" ng-src="api/users/{{sound.id}}/avatar" /></td>\n                                <td md-cell ng-if="!sound.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{sound.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditSound($event, sound)" md-cell class="id ">{{sound.id}}</td>\n                                <td ng-click="vm.createOrEditSound($event, sound)" md-cell class="name ">{{sound.name}}</td>\n                                <td md-cell class="audio ">\n                                    \x3c!-- audio recording directive --\x3e\n                                    <ms-recording id="sound.id" model="\'sound\'"></ms-recording>\n                                    \x3c!-- / audio recording directive --\x3e\n                                </td>\n                                <td ng-click="vm.createOrEditSound($event, sound)" md-cell class="description ">{{sound.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(sound, $event)" translate="TOOLS.EDIT_SOUND">\n                                                    Edit Sound\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.downloadfile2(sound, $event)" translate="TOOLS.DOWNLOAD_SOUND">\n                                                    Download Sound\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(sound, $event)" translate="TOOLS.DELETE_SOUND">\n                                                    Delete Sound\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.sounds.count}}" md-on-paginate="vm.getSounds" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / SOUND TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD SOUND BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-sound-button" ng-click="vm.uploadSound($event)" aria-label="add sound" translate translate-attr-aria-label="SOUNDS.ADD_SOUND">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD SOUND BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/sounds/uploadsound/dialog.html",'<md-dialog class="upload-dialog" aria-label="Upload Sound">\n    <form name="uploadForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <div id="sound-uploader" flow-init="vm.ngFlowOptions" flow-name="vm.ngFlow.flow" flow-files-submitted="vm.upload()" flow-file-added="vm.fileAdded($file)" flow-file-success="vm.fileSuccess($file, $message)" flow-complete="vm.uploadComplete()" flow-drop\n                flow-drag-enter="vm.dropping=true" flow-drag-leave="vm.dropping=false" ng-class="{\'dropping\':vm.dropping}">\n\n                <div class="drop-text hint-text" layout="row" layout-align="center center">\n                    <span translate="TOOLS.DROP_TO_UPLOAD">Drop to upload</span>\n                </div>\n\n                <div class="upload-button" layout="column" layout-align="center center">\n                    <md-button class="md-accent md-raised" flow-btn>\n                        Upload\n                    </md-button>\n                    <span class="secondary-text mt-8" translate="TOOLS.DROP_TO_UPLOAD_MESSAGE">You can also drop audio here to upload. Only MP3, WAV, GSM - Max. 15MB</span>\n                </div>\n\n                <div layout="row" layout-align="start start">\n                    <div ng-repeat="sound in vm.uploadSounds | orderBy:\'-\'" ng-switch="sound.type">\n                        <div class="sound-image" ng-switch-when="uploading" flex>\n                            <img class="media" src="assets/images/music-player/uploading.png">\n                            <md-progress-linear md-mode="indeterminate"></md-progress-linear>\n                            <span class="text-truncate">{{sound.file.name}}</span>\n                        </div>\n                        <div class="sound-image" ng-switch-when="sound" flex>\n                            <img class="media" src="assets/images/music-player/success.png">\n                            <span class="text-truncate">{{sound.file.name}}</span>\n                        </div>\n                    </div>\n                </div>\n\n\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center"></div>\n            <div layout="row">\n                <md-button ng-click="vm.closeDialog()" class="md-accent md-raised" aria-label="FINISH" translate="TOOLS.FINISH" translate-attr-aria-label="TOOLS.FINISH">\n                    FINISH\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/tags/create/dialog.html",'<md-dialog class="tag-dialog" aria-label="New Tag">\n    <form name="tagForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.tag.name" ng-required="true" autofocus>\n                <div ng-messages="tagForm[\'name\'].$error" ng-show="tagForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.tag.description">\n                <div ng-messages="tagForm[\'description\'].$error" ng-show="tagForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <div flex md-color-picker ng-model="vm.tag.color" label="{{\'TOOLS.COLOR\' | translate}}" md-color-hex="true" md-color-rgb="false" md-color-hsl="false" md-color-history="false" md-color-material-palette="false" md-color-alpha-channel="false" open-on-input="true"></div>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newTag" ng-click="vm.saveTag()" class="send-button md-accent md-raised" ng-disabled="tagForm.$invalid || tagForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newTag" ng-click="vm.addNewTag()" class="send-button md-accent md-raised" ng-disabled="tagForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_TAG" translate-attr-aria-label="TOOLS.ADD_TAG">\n                    ADD TAG\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newTag" ng-click="vm.deleteTag($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/tags/tags.html",'<div id="tags" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.TAGS">Tags</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedTags.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedTags =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-tags-count">\n                    <span>{{vm.selectedTags.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="TAGS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllTags()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectTags()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedTags" csv-label="true" filename="tags.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedTags($event)" aria-label="delete selected" translate translate-attr-label="TAGS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- TAG TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedTags" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getTags">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column md-order-by="color">{{ \'TOOLS.COLOR\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.tags.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="tag" md-select-id="id" ng-repeat="tag in vm.tags.rows">\n                                <td md-cell ng-if="tag.userpic"><img class="avatar" alt="{{tag.name}}" ng-src="api/users/{{tag.id}}/avatar" /></td>\n                                <td md-cell ng-if="!tag.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{tag.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditTag($event, tag)" md-cell class="id ">{{tag.id}}</td>\n                                <td ng-click="vm.createOrEditTag($event, tag)" md-cell class="name ">{{tag.name}}</td>\n                                <td ng-click="vm.createOrEditTag($event, tag)" md-cell class="description ">{{tag.description}}</td>\n                                <td ng-click="vm.createOrEditTag($event, tag)" md-cell class="color ">{{tag.color}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(tag, $event)" translate="TOOLS.EDIT_TAG">\n                                                    Edit Tag\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(tag, $event)" translate="TOOLS.DELETE_TAG">\n                                                    Delete Tag\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.tags.count}}" md-on-paginate="vm.getTags" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / TAG TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD TAG BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-tag-button" ng-click="vm.createOrEditTag($event)" aria-label="add tag" translate translate-attr-aria-label="TOOLS.ADD_TAG">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD TAG BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/templates/create/dialog.html",'<md-dialog class="template-dialog" aria-label="New Template">\n    <form name="templateForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.template.name" ng-required="true" autofocus>\n                <div ng-messages="templateForm[\'name\'].$error" ng-show="templateForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <div class="md-block">\n                <label class="md-caption grey-fg" translate="TOOLS.CONTENT">Content</label>\n                <textarea aria-label="Content html" ckeditor="{ skin: \'office2013\', language: \'en\', allowedContent: true, extraPlugins: \'font,colorbutton,autoembed,autocorrect,googlethisterm,pastebase64\', toolbarGroups: [{ name: \'styles\', groups: [\'styles\'] }, { name: \'clipboard\', groups: [\'undo\'] }, { name: \'colors\', groups: [\'colors\'] }, { name: \'basicstyles\', groups: [\'basicstyles\'] }, { name: \'paragraph\', groups: [\'list\', \'indent\', \'align\'] }, { name: \'mode\' }], autocorrect_enabled: true, disableNativeSpellChecker: false, removePlugins: \'magicline\' }"\n                    ng-model="vm.template.html"></textarea>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.template.description">\n                <div ng-messages="templateForm[\'description\'].$error" ng-show="templateForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newTemplate" ng-click="vm.saveTemplate()" class="send-button md-accent md-raised" ng-disabled="templateForm.$invalid || templateForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newTemplate" ng-click="vm.addNewTemplate()" class="send-button md-accent md-raised" ng-disabled="templateForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_TEMPLATE" translate-attr-aria-label="TOOLS.ADD_TEMPLATE">\n                    ADD TEMPLATE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newTemplate" ng-click="vm.deleteTemplate($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/templates/templates.html",'<div id="templates" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.TEMPLATES">Templates</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedTemplates.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedTemplates =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-templates-count">\n                    <span>{{vm.selectedTemplates.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="TEMPLATES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllTemplates()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectTemplates()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedTemplates" csv-label="true" filename="templates.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedTemplates($event)" aria-label="delete selected" translate translate-attr-label="TEMPLATES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- TEMPLATE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedTemplates" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getTemplates">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.templates.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="template" md-select-id="id" ng-repeat="template in vm.templates.rows">\n                                <td md-cell ng-if="template.userpic"><img class="avatar" alt="{{template.name}}" ng-src="api/users/{{template.id}}/avatar" /></td>\n                                <td md-cell ng-if="!template.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{template.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditTemplate($event, template)" md-cell class="id ">{{template.id}}</td>\n                                <td ng-click="vm.createOrEditTemplate($event, template)" md-cell class="name ">{{template.name}}</td>\n                                <td ng-click="vm.createOrEditTemplate($event, template)" md-cell class="description ">{{template.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(template, $event)" translate="TOOLS.EDIT_TEMPLATE">\n                                                    Edit Template\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(template, $event)" translate="TOOLS.DELETE_TEMPLATE">\n                                                    Delete Template\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.templates.count}}" md-on-paginate="vm.getTemplates" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / TEMPLATE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD TEMPLATE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-template-button" ng-click="vm.createOrEditTemplate($event)" aria-label="add template" translate translate-attr-aria-label="TOOLS.ADD_TEMPLATE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD TEMPLATE BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/triggers/create/dialog.html",'<md-dialog class="trigger-dialog" aria-label="New Trigger">\n    <form name="triggerForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.trigger.name" ng-required="true" autofocus>\n                <div ng-messages="triggerForm[\'name\'].$error" ng-show="triggerForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.CHANNEL">Channel</label>\n                <md-select name="channel" ng-model="vm.trigger.channel" required ng-disabled="!vm.newTrigger">\n\n                    <md-option ng-value="\'voice\'"> {{ \'TOOLS.VOICE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'openchannel\'" ng-if="vm.license.openchannel"> {{ \'TOOLS.OPENCHANNEL\' | translate }}</md-option>\n\n                    <md-option ng-value="\'chat\'" ng-if="vm.license.chat"> {{ \'TOOLS.CHAT\' | translate }}</md-option>\n\n                    <md-option ng-value="\'mail\'" ng-if="vm.license.mail"> {{ \'TOOLS.MAIL\' | translate }}</md-option>\n\n                    <md-option ng-value="\'sms\'" ng-if="vm.license.messaging"> {{ \'TOOLS.SMS\' | translate }}</md-option>\n\n                    <md-option ng-value="\'fax\'" ng-if="vm.license.fax"> {{ \'TOOLS.FAX\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="triggerForm[\'channel\'].$error" ng-show="triggerForm[\'channel\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.CHANNEL_REQUIRED">Channel field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.trigger.status" aria-label="Status"><span translate="TOOLS.STATUS">Status</span></md-switch>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.trigger.description">\n                <div ng-messages="triggerForm[\'description\'].$error" ng-show="triggerForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newTrigger" ng-click="vm.saveTrigger()" class="send-button md-accent md-raised" ng-disabled="triggerForm.$invalid || triggerForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newTrigger" ng-click="vm.addNewTrigger()" class="send-button md-accent md-raised" ng-disabled="triggerForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_TRIGGER" translate-attr-aria-label="TOOLS.ADD_TRIGGER">\n                    ADD TRIGGER\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newTrigger" ng-click="vm.deleteTrigger($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/triggers/edit/actions/dialog.html",'<md-dialog class="action-dialog" aria-label="New Action">\n    <form name="actionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.ACTION">Action</label>\n                <md-select name="action" ng-model="vm.action.action" required autofocus ng-disabled="!vm.newAction">\n\n                    <md-option ng-value="\'contactManager\'" ng-if="vm.trigger.channel == \'voice\'"> {{ \'TOOLS.CONTACT_MANAGER\' | translate }}</md-option>\n\n                    <md-option ng-value="\'integration\'" ng-if="vm.trigger.channel == \'voice\'"> {{ \'TOOLS.INTEGRATIONS\' | translate }}</md-option>\n\n                    <md-option ng-value="\'motionbar\'"> {{ \'TOOLS.MOTION_BAR\' | translate }}</md-option>\n\n                    <md-option ng-value="\'jscripty\'" ng-if="vm.trigger.channel == \'voice\'"> {{ \'TOOLS.JSCRIPTY\' | translate }}</md-option>\n\n                    <md-option ng-value="\'urlForward\'"> {{ \'TOOLS.URL_FORWARD\' | translate }}</md-option>\n\n                    <md-option ng-value="\'browser\'"> {{ \'TOOLS.BROWSER\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'action\'].$error" ng-show="actionForm[\'action\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACTION_REQUIRED">Action field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'jscripty\'" class="md-block">\n                <label translate="TOOLS.PROJECT">Project</label>\n                <md-select name="data1" ng-model="vm.action.data1" required>\n                    <md-option ng-value="\'\'+data1.id" ng-repeat="data1 in vm.projects">{{ data1.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data1\'].$error" ng-show="actionForm[\'data1\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.PROJECT_REQUIRED">Project field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'browser\'" class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select name="data1" ng-model="vm.action.data1" required>\n                    <md-option ng-value="\'0\'">Popup</md-option>\n                    <md-option ng-value="\'1\'">CTI URL</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data1\'].$error" ng-show="actionForm[\'data1\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'contactManager\'" class="md-block">\n                <label translate="TOOLS.LIST">List</label>\n                <md-select name="data1" ng-model="vm.action.data1" required>\n                    <md-option ng-value="\'\'+data1.id" ng-repeat="data1 in vm.lists">{{ data1.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data1\'].$error" ng-show="actionForm[\'data1\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.LIST_REQUIRED">List field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'contactManager\'" class="md-block">\n                <label translate="TOOLS.AUTOCREATECONTACT">AutoCreateContact</label>\n                <md-select name="data2" ng-model="vm.action.data2" required>\n\n                    <md-option ng-value="\'1\'"> {{ \'TOOLS.YES\' | translate }}</md-option>\n\n                    <md-option ng-value="\'0\'"> {{ \'TOOLS.NO\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.AUTOCREATECONTACT_REQUIRED">AutoCreateContact field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'urlForward\'" class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select name="data1" ng-model="vm.action.data1" required>\n                    <md-option ng-value="\'GET\'">GET</md-option>\n                    <md-option ng-value="\'POST\'">POST</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data1\'].$error" ng-show="actionForm[\'data1\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'urlForward\'" class="md-block">\n                <label translate="TOOLS.URL">Url</label>\n                <input type="url" name="data2" ng-model="vm.action.data2" ng-required="true">\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="TOOLS.ERRORS.URL_MUST_VALID_URL">Url must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\'" class="md-block">\n                <label translate="TOOLS.INTEGRATION">Integration</label>\n                <md-select name="data1" ng-model="vm.action.data1" required>\n                    <md-option ng-value="\'zendesk\'">Zendesk</md-option>\n                    <md-option ng-value="\'salesforce\'">Salesforce</md-option>\n                    <md-option ng-value="\'sugarcrm\'">SugarCRM</md-option>\n                    <md-option ng-value="\'freshdesk\'">Freshdesk</md-option>\n                    <md-option ng-value="\'desk\'">Desk</md-option>\n                    <md-option ng-value="\'zoho\'">Zoho</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data1\'].$error" ng-show="actionForm[\'data1\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.INTEGRATION_REQUIRED">Integration field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'zendesk\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="data2" ng-model="vm.action.data2" required>\n                    <md-option ng-value="\'\'+data2.id" ng-repeat="data2 in vm.zendeskAccounts">{{ data2.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'desk\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="data2" ng-model="vm.action.data2" required>\n                    <md-option ng-value="\'\'+data2.id" ng-repeat="data2 in vm.deskAccounts">{{ data2.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'zoho\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="data2" ng-model="vm.action.data2" required>\n                    <md-option ng-value="\'\'+data2.id" ng-repeat="data2 in vm.zohoAccounts">{{ data2.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'salesforce\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="data2" ng-model="vm.action.data2" required>\n                    <md-option ng-value="\'\'+data2.id" ng-repeat="data2 in vm.salesforceAccounts">{{ data2.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'sugarcrm\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="data2" ng-model="vm.action.data2" required>\n                    <md-option ng-value="\'\'+data2.id" ng-repeat="data2 in vm.sugarcrmAccounts">{{ data2.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'freshdesk\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="data2" ng-model="vm.action.data2" required>\n                    <md-option ng-value="\'\'+data2.id" ng-repeat="data2 in vm.freshdeskAccounts">{{ data2.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'zendesk\' && vm.action.data2" class="md-block">\n                <label translate="TOOLS.CONFIGURATION">Configuration</label>\n                <md-select name="data3" ng-model="vm.action.data3" required>\n                    <md-option ng-value="\'\'+data3.id" ng-repeat="data3 in vm.zendeskConfigurations | filter:{AccountId:vm.action.data2}">{{ data3.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data3\'].$error" ng-show="actionForm[\'data3\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.CONFIGURATION_REQUIRED">Configuration field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'desk\' && vm.action.data2" class="md-block">\n                <label translate="TOOLS.CONFIGURATION">Configuration</label>\n                <md-select name="data3" ng-model="vm.action.data3" required>\n                    <md-option ng-value="\'\'+data3.id" ng-repeat="data3 in vm.deskConfigurations | filter:{AccountId:vm.action.data2}">{{ data3.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data3\'].$error" ng-show="actionForm[\'data3\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.CONFIGURATION_REQUIRED">Configuration field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'zoho\' && vm.action.data2" class="md-block">\n                <label translate="TOOLS.CONFIGURATION">Configuration</label>\n                <md-select name="data3" ng-model="vm.action.data3" required>\n                    <md-option ng-value="\'\'+data3.id" ng-repeat="data3 in vm.zohoConfigurations | filter:{AccountId:vm.action.data2}">{{ data3.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data3\'].$error" ng-show="actionForm[\'data3\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.CONFIGURATION_REQUIRED">Configuration field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'salesforce\' && vm.action.data2" class="md-block">\n                <label translate="TOOLS.CONFIGURATION">Configuration</label>\n                <md-select name="data3" ng-model="vm.action.data3" required>\n                    <md-option ng-value="\'\'+data3.id" ng-repeat="data3 in vm.salesforceConfigurations | filter:{AccountId:vm.action.data2}">{{ data3.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data3\'].$error" ng-show="actionForm[\'data3\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.CONFIGURATION_REQUIRED">Configuration field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'sugarcrm\' && vm.action.data2" class="md-block">\n                <label translate="TOOLS.CONFIGURATION">Configuration</label>\n                <md-select name="data3" ng-model="vm.action.data3" required>\n                    <md-option ng-value="\'\'+data3.id" ng-repeat="data3 in vm.sugarcrmConfigurations | filter:{AccountId:vm.action.data2}">{{ data3.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data3\'].$error" ng-show="actionForm[\'data3\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.CONFIGURATION_REQUIRED">Configuration field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'freshdesk\' && vm.action.data2" class="md-block">\n                <label translate="TOOLS.CONFIGURATION">Configuration</label>\n                <md-select name="data3" ng-model="vm.action.data3" required>\n                    <md-option ng-value="\'\'+data3.id" ng-repeat="data3 in vm.freshdeskConfigurations | filter:{AccountId:vm.action.data2}">{{ data3.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data3\'].$error" ng-show="actionForm[\'data3\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.CONFIGURATION_REQUIRED">Configuration field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'motionbar\'" class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select name="data1" ng-model="vm.action.data1" required>\n                    <md-option ng-value="\'0\'">Popup</md-option>\n                    <md-option ng-value="\'1\'">CTI URL</md-option>\n                    <md-option ng-value="\'2\'">Windows App</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data1\'].$error" ng-show="actionForm[\'data1\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'motionbar\' && vm.action.data1 == \'1\'" class="md-block">\n                <label translate="TOOLS.URL">Url</label>\n                <input type="url" name="data2" ng-model="vm.action.data2" ng-required="true">\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="TOOLS.ERRORS.URL_MUST_VALID_URL">Url must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'motionbar\' && vm.action.data1 == \'2\'" class="md-block">\n                <label translate="TOOLS.APPLICATION">Application</label>\n                <input type="text" name="data2" ng-model="vm.action.data2" ng-required="true">\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.APPLICATION_REQUIRED">Application field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'motionbar\' && vm.action.data1 == \'2\'" class="md-block">\n                <label translate="TOOLS.ARGUMENTS">Arguments</label>\n                <input type="text" name="data3" ng-model="vm.action.data3">\n                <div ng-messages="actionForm[\'data3\'].$error" ng-show="actionForm[\'data3\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ARGUMENTS_REQUIRED">Arguments field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'motionbar\' && vm.action.data1 == \'0\'" class="md-block">\n                <label translate="TOOLS.TEMPLATE">Template</label>\n                <md-select name="data2" ng-model="vm.action.data2" required>\n                    <md-option ng-value="\'\'+data2.id" ng-repeat="data2 in vm.templates">{{ data2.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.TEMPLATE_REQUIRED">Template field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'browser\' && vm.action.data1 == \'0\'" class="md-block">\n                <label translate="TOOLS.TEMPLATE">Template</label>\n                <md-select name="data2" ng-model="vm.action.data2" required>\n                    <md-option ng-value="\'\'+data2.id" ng-repeat="data2 in vm.templates">{{ data2.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.TEMPLATE_REQUIRED">Template field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'browser\' && vm.action.data1 == \'1\'" class="md-block">\n                <label translate="TOOLS.URL">Url</label>\n                <input type="url" name="data2" ng-model="vm.action.data2" ng-required="true">\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="TOOLS.ERRORS.URL_MUST_VALID_URL">Url must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="(vm.action.action == \'motionbar\' || vm.action.action == \'browser\') && vm.action.data1 == \'1\'" class="md-block">\n                <label translate="TOOLS.EVENTVARIABLES">EventVariables</label>\n                <md-select name="data3" ng-model="vm.action.data3" required>\n\n                    <md-option ng-value="\'1\'"> {{ \'TOOLS.YES\' | translate }}</md-option>\n\n                    <md-option ng-value="\'0\'"> {{ \'TOOLS.NO\' | translate }}</md-option>\n                </md-select>\n                <div class="hint"><span translate="TOOLS.HELP.EVENTVARIABLES"></span></div>\n                <div ng-messages="actionForm[\'data3\'].$error" ng-show="actionForm[\'data3\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.EVENTVARIABLES_REQUIRED">EventVariables field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'browser\' && vm.action.data1 == \'1\'" class="md-block">\n                <label translate="TOOLS.LOCATION">Location</label>\n                <md-select name="data4" ng-model="vm.action.data4" required>\n\n                    <md-option ng-value="\'0\'"> {{ \'TOOLS.NEW_TAB\' | translate }}</md-option>\n\n                    <md-option ng-value="\'1\'"> {{ \'TOOLS.NEW_WINDOW\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data4\'].$error" ng-show="actionForm[\'data4\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.LOCATION_REQUIRED">Location field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'browser\' && vm.action.data4 == \'1\'" class="md-block">\n                <label translate="TOOLS.WINDOWWIDTH">WindowWidth</label>\n                <input type="text" name="data5" ng-model="vm.action.data5">\n                <div ng-messages="actionForm[\'data5\'].$error" ng-show="actionForm[\'data5\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.WINDOWWIDTH_REQUIRED">WindowWidth field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'browser\' && vm.action.data4 == \'1\'" class="md-block">\n                <label translate="TOOLS.WINDOWHEIGHT">WindowHeight</label>\n                <input type="text" name="data6" ng-model="vm.action.data6">\n                <div ng-messages="actionForm[\'data6\'].$error" ng-show="actionForm[\'data6\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.WINDOWHEIGHT_REQUIRED">WindowHeight field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newAction" ng-click="vm.saveAction()" class="send-button md-accent md-raised" ng-disabled="actionForm.$invalid || actionForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newAction" ng-click="vm.addNewAction()" class="send-button md-accent md-raised" ng-disabled="actionForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_ACTION" translate-attr-aria-label="TOOLS.ADD_ACTION">\n                    ADD ACTION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newAction" ng-click="vm.deleteAction($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/triggers/edit/allconditions/dialog.html",'<md-dialog class="allCondition-dialog" aria-label="New AllCondition">\n    <form name="allConditionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.FIELD">Field</label>\n                <md-select name="field" ng-model="vm.allCondition.field" required autofocus>\n\n                    <md-option ng-value="\'queue\'" ng-if="vm.trigger.channel == \'voice\'"> {{ \'TOOLS.QUEUE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'lastevent\'" ng-if="vm.trigger.channel == \'voice\'"> {{ \'TOOLS.CALL_STATUS\' | translate }}</md-option>\n\n                    <md-option ng-value="\'routeId\'" ng-if="vm.trigger.channel == \'voice\'"> {{ \'TOOLS.OUTBOUNDROUTE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'account\'" ng-if="vm.trigger.channel != \'voice\'"> {{ \'TOOLS.ACCOUNT\' | translate }}</md-option>\n\n                    <md-option ng-value="\'interaction\'" ng-if="vm.trigger.channel != \'voice\'"> {{ \'TOOLS.INTERACTION\' | translate }}</md-option>\n\n                    <md-option ng-value="\'message\'" ng-if="vm.trigger.channel != \'voice\'"> {{ \'TOOLS.MESSAGE\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'field\'].$error" ng-show="allConditionForm[\'field\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.FIELD_REQUIRED">Field field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.OPERATOR">Operator</label>\n                <md-select name="operator" ng-model="vm.allCondition.operator" required>\n\n                    <md-option ng-value="\'equals\'"> {{ \'TOOLS.EQUALS\' | translate }}</md-option>\n\n                    <md-option ng-value="\'not_equals\'"> {{ \'TOOLS.NOT_EQUALS\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'operator\'].$error" ng-show="allConditionForm[\'operator\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.OPERATOR_REQUIRED">Operator field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.allCondition.field == \'account\' && vm.trigger.channel == \'chat\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="value" ng-model="vm.allCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.chatAccounts">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'value\'].$error" ng-show="allConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.allCondition.field == \'account\' && vm.trigger.channel == \'mail\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="value" ng-model="vm.allCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.mailAccounts">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'value\'].$error" ng-show="allConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.allCondition.field == \'account\' && vm.trigger.channel == \'sms\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="value" ng-model="vm.allCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.smsAccounts">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'value\'].$error" ng-show="allConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.allCondition.field == \'account\' && vm.trigger.channel == \'fax\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="value" ng-model="vm.allCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.faxAccounts">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'value\'].$error" ng-show="allConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.allCondition.field == \'account\' && vm.trigger.channel == \'openchannel\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="value" ng-model="vm.allCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.openchannelAccounts">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'value\'].$error" ng-show="allConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.allCondition.field == \'queue\' && vm.trigger.channel == \'voice\'" class="md-block">\n                <label translate="TOOLS.QUEUE">Queue</label>\n                <md-select name="value" ng-model="vm.allCondition.value" required>\n                    <md-option ng-value="value.name" ng-repeat="value in vm.queues">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'value\'].$error" ng-show="allConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.QUEUE_REQUIRED">Queue field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.allCondition.field == \'routeId\' && vm.trigger.channel == \'voice\'" class="md-block">\n                <label translate="TOOLS.OUTBOUNDROUTE">OutboundRoute</label>\n                <md-select name="value" ng-model="vm.allCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.outboundRoutes">{{ value.exten }}</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'value\'].$error" ng-show="allConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.OUTBOUNDROUTE_REQUIRED">OutboundRoute field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.allCondition.field == \'lastevent\'" class="md-block">\n                <label translate="TOOLS.VALUE">Value</label>\n                <md-select name="value" ng-model="vm.allCondition.value" required>\n                    <md-option ng-value="\'abandoned\'">Abandon</md-option>\n                    <md-option ng-value="\'complete\'">Hangup</md-option>\n                    <md-option ng-value="\'rejected\'">Reject</md-option>\n                    <md-option ng-value="\'called\'">Ring</md-option>\n                    <md-option ng-value="\'connect\'">Answer</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'value\'].$error" ng-show="allConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.allCondition.field == \'interaction\' && vm.trigger.channel != \'voice\'" class="md-block">\n                <label translate="TOOLS.VALUE">Value</label>\n                <md-select name="value" ng-model="vm.allCondition.value" required>\n                    <md-option ng-value="\'opened\'">Opened</md-option>\n                    <md-option ng-value="\'closed\'">Closed</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'value\'].$error" ng-show="allConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.allCondition.field == \'message\' && vm.trigger.channel != \'voice\'" class="md-block">\n                <label translate="TOOLS.VALUE">Value</label>\n                <md-select name="value" ng-model="vm.allCondition.value" required>\n                    <md-option ng-value="\'in\'">Incoming</md-option>\n                    <md-option ng-value="\'out\'">Outgoing</md-option>\n                    <md-option ng-value="\'accept\'">Accepted</md-option>\n                    <md-option ng-value="\'reject\'">Rejected</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'value\'].$error" ng-show="allConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newAllCondition" ng-click="vm.saveAllCondition()" class="send-button md-accent md-raised" ng-disabled="allConditionForm.$invalid || allConditionForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newAllCondition" ng-click="vm.addNewAllCondition()" class="send-button md-accent md-raised" ng-disabled="allConditionForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_ALLCONDITION" translate-attr-aria-label="TOOLS.ADD_ALLCONDITION">\n                    ADD ALLCONDITION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newAllCondition" ng-click="vm.deleteAllCondition($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/triggers/edit/anyconditions/dialog.html",'<md-dialog class="anyCondition-dialog" aria-label="New AnyCondition">\n    <form name="anyConditionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.FIELD">Field</label>\n                <md-select name="field" ng-model="vm.anyCondition.field" required autofocus>\n\n                    <md-option ng-value="\'queue\'" ng-if="vm.trigger.channel == \'voice\'"> {{ \'TOOLS.QUEUE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'lastevent\'" ng-if="vm.trigger.channel == \'voice\'"> {{ \'TOOLS.CALL_STATUS\' | translate }}</md-option>\n\n                    <md-option ng-value="\'routeId\'" ng-if="vm.trigger.channel == \'voice\'"> {{ \'TOOLS.OUTBOUNDROUTE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'account\'" ng-if="vm.trigger.channel != \'voice\'"> {{ \'TOOLS.ACCOUNT\' | translate }}</md-option>\n\n                    <md-option ng-value="\'interaction\'" ng-if="vm.trigger.channel != \'voice\'"> {{ \'TOOLS.INTERACTION\' | translate }}</md-option>\n\n                    <md-option ng-value="\'message\'" ng-if="vm.trigger.channel != \'voice\'"> {{ \'TOOLS.MESSAGE\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'field\'].$error" ng-show="anyConditionForm[\'field\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.FIELD_REQUIRED">Field field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.OPERATOR">Operator</label>\n                <md-select name="operator" ng-model="vm.anyCondition.operator" required>\n\n                    <md-option ng-value="\'equals\'"> {{ \'TOOLS.EQUALS\' | translate }}</md-option>\n\n                    <md-option ng-value="\'not_equals\'"> {{ \'TOOLS.NOT_EQUALS\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'operator\'].$error" ng-show="anyConditionForm[\'operator\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.OPERATOR_REQUIRED">Operator field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.anyCondition.field == \'account\' && vm.trigger.channel == \'chat\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="value" ng-model="vm.anyCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.chatAccounts">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'value\'].$error" ng-show="anyConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.anyCondition.field == \'account\' && vm.trigger.channel == \'mail\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="value" ng-model="vm.anyCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.mailAccounts">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'value\'].$error" ng-show="anyConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.anyCondition.field == \'account\' && vm.trigger.channel == \'sms\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="value" ng-model="vm.anyCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.smsAccounts">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'value\'].$error" ng-show="anyConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.anyCondition.field == \'account\' && vm.trigger.channel == \'fax\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="value" ng-model="vm.anyCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.faxAccounts">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'value\'].$error" ng-show="anyConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.anyCondition.field == \'account\' && vm.trigger.channel == \'openchannel\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="value" ng-model="vm.anyCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.openchannelAccounts">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'value\'].$error" ng-show="anyConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.anyCondition.field == \'queue\' && vm.trigger.channel == \'voice\'" class="md-block">\n                <label translate="TOOLS.QUEUE">Queue</label>\n                <md-select name="value" ng-model="vm.anyCondition.value" required>\n                    <md-option ng-value="value.name" ng-repeat="value in vm.queues">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'value\'].$error" ng-show="anyConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.QUEUE_REQUIRED">Queue field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.anyCondition.field == \'routeId\' && vm.trigger.channel == \'voice\'" class="md-block">\n                <label translate="TOOLS.OUTBOUNDROUTE">OutboundRoute</label>\n                <md-select name="value" ng-model="vm.anyCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.outboundRoutes">{{ value.exten }}</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'value\'].$error" ng-show="anyConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.OUTBOUNDROUTE_REQUIRED">OutboundRoute field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.anyCondition.field == \'lastevent\'" class="md-block">\n                <label translate="TOOLS.VALUE">Value</label>\n                <md-select name="value" ng-model="vm.anyCondition.value" required>\n                    <md-option ng-value="\'abandoned\'">Abandon</md-option>\n                    <md-option ng-value="\'complete\'">Hangup</md-option>\n                    <md-option ng-value="\'rejected\'">Reject</md-option>\n                    <md-option ng-value="\'called\'">Ring</md-option>\n                    <md-option ng-value="\'connect\'">Answer</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'value\'].$error" ng-show="anyConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.anyCondition.field == \'interaction\' && vm.trigger.channel != \'voice\'" class="md-block">\n                <label translate="TOOLS.VALUE">Value</label>\n                <md-select name="value" ng-model="vm.anyCondition.value" required>\n                    <md-option ng-value="\'opened\'">Opened</md-option>\n                    <md-option ng-value="\'closed\'">Closed</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'value\'].$error" ng-show="anyConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.anyCondition.field == \'message\' && vm.trigger.channel != \'voice\'" class="md-block">\n                <label translate="TOOLS.VALUE">Value</label>\n                <md-select name="value" ng-model="vm.anyCondition.value" required>\n                    <md-option ng-value="\'in\'">Incoming</md-option>\n                    <md-option ng-value="\'out\'">Outgoing</md-option>\n                    <md-option ng-value="\'accept\'">Accepted</md-option>\n                    <md-option ng-value="\'reject\'">Rejected</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'value\'].$error" ng-show="anyConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newAnyCondition" ng-click="vm.saveAnyCondition()" class="send-button md-accent md-raised" ng-disabled="anyConditionForm.$invalid || anyConditionForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newAnyCondition" ng-click="vm.addNewAnyCondition()" class="send-button md-accent md-raised" ng-disabled="anyConditionForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_ANYCONDITION" translate-attr-aria-label="TOOLS.ADD_ANYCONDITION">\n                    ADD ANYCONDITION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newAnyCondition" ng-click="vm.deleteAnyCondition($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/triggers/edit/view.html",'<div id="tools-trigger" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-triggers-button md-icon-button" aria-label="Go to triggers" ng-click="vm.gotoTriggers()" translate translate-attr-aria-label="TOOLS.GO_TO_TRIGGERS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="trigger-image" hide-xs>\n                    <img ng-src="assets/images/business/triggers.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.trigger.id}}\n                        <span ng-if="vm.trigger.name">{{vm.trigger.name}}</span>\n                        <span ng-if="vm.trigger.exten">{{vm.trigger.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="TOOLS.CREATED_AT"></span> <span>{{vm.trigger.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveTrigger()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (allconditionsForm.$invalid) || (anyconditionsForm.$invalid) || (actionsForm.$invalid)" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="TOOLS.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="trigger-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="TOOLS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.trigger.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.CHANNEL">Channel</label>\n                                <md-select name="channel" ng-model="vm.trigger.channel" required ng-disabled="true">\n\n                                    <md-option ng-value="\'voice\'"> {{ \'TOOLS.VOICE\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'openchannel\'" ng-if="vm.license.openchannel"> {{ \'TOOLS.OPENCHANNEL\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'chat\'" ng-if="vm.license.chat"> {{ \'TOOLS.CHAT\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'mail\'" ng-if="vm.license.mail"> {{ \'TOOLS.MAIL\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'sms\'" ng-if="vm.license.messaging"> {{ \'TOOLS.SMS\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'fax\'" ng-if="vm.license.fax"> {{ \'TOOLS.FAX\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'channel\'].$error" ng-show="generalForm[\'channel\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.CHANNEL_REQUIRED">Channel field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.trigger.status" aria-label="Status"><span translate="TOOLS.STATUS">Status</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.trigger.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="TOOLS.CONDITIONS&ACTIONS">CONDITIONS&ACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="trigger-detail-form-container allconditions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="TriggerAllConditionsController as vm_dc" ng-init="vm_dc.init(vm.trigger)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedTriggerAllConditions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="TOOLS.ALLCONDITIONS">AllConditions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditTriggerAllCondition($event)" aria-label="add allCondition" translate translate-attr-label="TOOLS.ADD_ALLCONDITION">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedTriggerAllConditions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedTriggerAllConditions.length}} {{vm_dc.selectedTriggerAllConditions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedTriggerAllConditions" csv-label="true" filename="triggers.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedTriggerAllConditions($event)" aria-label="delete selected" translate translate-attr-label="TRIGGERS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedTriggerAllConditions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getTriggerAllConditions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                            <th md-column md-order-by="field">{{ \'TOOLS.FIELD\' | translate }}</th>\n                                            <th md-column md-order-by="operator">{{ \'TOOLS.OPERATOR\' | translate }}</th>\n                                            <th md-column md-order-by="value">{{ \'TOOLS.VALUE\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'TOOLS.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="allCondition" md-select-id="id" ng-repeat="allCondition in vm_dc.triggerAllConditions.rows">\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" md-cell>{{allCondition.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" md-cell>{{ \'TOOLS.\' + vm_dc.arrayfield[allCondition.field].option | uppercase | translate }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" md-cell>{{ \'TOOLS.\' + vm_dc.arrayoperator[allCondition.operator].option | uppercase | translate }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="!allCondition.value" md-cell>{{allCondition.value}}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="vm.trigger.channel == \'chat\' && allCondition.field == \'account\'" md-cell>{{ value = vm_dc.chatAccounts[allCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="vm.trigger.channel == \'mail\' && allCondition.field == \'account\'" md-cell>{{ value = vm_dc.mailAccounts[allCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="vm.trigger.channel == \'sms\' && allCondition.field == \'account\'" md-cell>{{ value = vm_dc.smsAccounts[allCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="vm.trigger.channel == \'fax\' && allCondition.field == \'account\'" md-cell>{{ value = vm_dc.faxAccounts[allCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="vm.trigger.channel == \'openchannel\' && allCondition.field == \'account\'" md-cell>{{ value = vm_dc.openchannelAccounts[allCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="vm.trigger.channel == \'voice\' && allCondition.field == \'queue\'" md-cell>{{ value = vm_dc.queues[allCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="vm.trigger.channel == \'voice\' && allCondition.field == \'routeId\'" md-cell>{{ value = vm_dc.outboundRoutes[allCondition.value]; value.exten }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="vm.trigger.channel == \'voice\' && allCondition.field == \'lastevent\'" md-cell>{{ vm_dc.callStatusValues[allCondition.value].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="vm.trigger.channel != \'voice\' && allCondition.field == \'interaction\'" md-cell>{{ vm_dc.interactionStatusValues[allCondition.value].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="vm.trigger.channel != \'voice\' && allCondition.field == \'message\'" md-cell>{{ vm_dc.messageStatusValues[allCondition.value].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" md-cell>{{allCondition.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" translate="TOOLS.EDIT_ALLCONDITION">\n                                                                Edit AllCondition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(allCondition, $event)" translate="TOOLS.DELETE_ALLCONDITION">\n                                                                Delete AllCondition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.triggerAllConditions.rows.length">\n                                            <td md-cell colspan="17">\n                                                <span class="text-boxed-ligth" translate="TOOLS.NO_ALLCONDITION_AVAILABLE">No allcondition available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.triggerAllConditions.count}}" md-on-paginate="vm_dc.getTriggerAllConditions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                    <div class="trigger-detail-form-container anyconditions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="TriggerAnyConditionsController as vm_dc" ng-init="vm_dc.init(vm.trigger)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedTriggerAnyConditions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="TOOLS.ANYCONDITIONS">AnyConditions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditTriggerAnyCondition($event)" aria-label="add anyCondition" translate translate-attr-label="TOOLS.ADD_ANYCONDITION">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedTriggerAnyConditions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedTriggerAnyConditions.length}} {{vm_dc.selectedTriggerAnyConditions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedTriggerAnyConditions" csv-label="true" filename="triggers.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedTriggerAnyConditions($event)" aria-label="delete selected" translate translate-attr-label="TRIGGERS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedTriggerAnyConditions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getTriggerAnyConditions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                            <th md-column md-order-by="field">{{ \'TOOLS.FIELD\' | translate }}</th>\n                                            <th md-column md-order-by="operator">{{ \'TOOLS.OPERATOR\' | translate }}</th>\n                                            <th md-column md-order-by="value">{{ \'TOOLS.VALUE\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'TOOLS.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="anyCondition" md-select-id="id" ng-repeat="anyCondition in vm_dc.triggerAnyConditions.rows">\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" md-cell>{{anyCondition.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" md-cell>{{ \'TOOLS.\' + vm_dc.arrayfield[anyCondition.field].option | uppercase | translate }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" md-cell>{{ \'TOOLS.\' + vm_dc.arrayoperator[anyCondition.operator].option | uppercase | translate }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="!anyCondition.value" md-cell>{{anyCondition.value}}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="vm.trigger.channel == \'chat\' && anyCondition.field == \'account\'" md-cell>{{ value = vm_dc.chatAccounts[anyCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="vm.trigger.channel == \'mail\' && anyCondition.field == \'account\'" md-cell>{{ value = vm_dc.mailAccounts[anyCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="vm.trigger.channel == \'sms\' && anyCondition.field == \'account\'" md-cell>{{ value = vm_dc.smsAccounts[anyCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="vm.trigger.channel == \'fax\' && anyCondition.field == \'account\'" md-cell>{{ value = vm_dc.faxAccounts[anyCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="vm.trigger.channel == \'openchannel\' && anyCondition.field == \'account\'" md-cell>{{ value = vm_dc.openchannelAccounts[anyCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="vm.trigger.channel == \'voice\' && anyCondition.field == \'queue\'" md-cell>{{ value = vm_dc.queues[anyCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="vm.trigger.channel == \'voice\' && anyCondition.field == \'routeId\'" md-cell>{{ value = vm_dc.outboundRoutes[anyCondition.value]; value.exten }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="vm.trigger.channel == \'voice\' && anyCondition.field == \'lastevent\'" md-cell>{{ vm_dc.callStatusValues[anyCondition.value].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="vm.trigger.channel != \'voice\' && anyCondition.field == \'interaction\'" md-cell>{{ vm_dc.interactionStatusValues[anyCondition.value].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="vm.trigger.channel != \'voice\' && anyCondition.field == \'message\'" md-cell>{{ vm_dc.messageStatusValues[anyCondition.value].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" md-cell>{{anyCondition.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" translate="TOOLS.EDIT_ANYCONDITION">\n                                                                Edit AnyCondition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(anyCondition, $event)" translate="TOOLS.DELETE_ANYCONDITION">\n                                                                Delete AnyCondition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.triggerAnyConditions.rows.length">\n                                            <td md-cell colspan="17">\n                                                <span class="text-boxed-ligth" translate="TOOLS.NO_ANYCONDITION_AVAILABLE">No anycondition available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.triggerAnyConditions.count}}" md-on-paginate="vm_dc.getTriggerAnyConditions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                    <div class="trigger-detail-form-container actions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="TriggerActionsController as vm_dc" ng-init="vm_dc.init(vm.trigger)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedTriggerActions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="TOOLS.ACTIONS">Actions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditTriggerAction($event)" aria-label="add action" translate translate-attr-label="TOOLS.ADD_ACTION">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedTriggerActions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedTriggerActions.length}} {{vm_dc.selectedTriggerActions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedTriggerActions" csv-label="true" filename="triggers.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedTriggerActions($event)" aria-label="delete selected" translate translate-attr-label="TRIGGERS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedTriggerActions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getTriggerActions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                            <th md-column md-order-by="action">{{ \'TOOLS.ACTION\' | translate }}</th>\n                                            <th md-column md-order-by="data1">{{ \'TOOLS.TYPE\' | translate }}</th>\n                                            <th md-column md-order-by="data2">{{ \'TOOLS.INFO\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'TOOLS.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="action" md-select-id="id" ng-repeat="action in vm_dc.triggerActions.rows">\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" md-cell>{{action.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" md-cell>{{ \'TOOLS.\' + vm_dc.arrayaction[action.action].option | uppercase | translate }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'jscripty\'" md-cell>{{ data1 = vm_dc.projects[action.data1]; data1.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'browser\'" md-cell>{{ vm_dc.browserValues[action.data1].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'contactManager\'" md-cell>{{ data1 = vm_dc.lists[action.data1]; data1.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'contactManager\'" md-cell>{{ \'TOOLS.\' + vm_dc.autoCreateContact[action.data2].option | uppercase | translate }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'urlForward\'" md-cell>{{ vm_dc.urlForwardValues[action.data1].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="!action.data2" md-cell>{{action.data2}}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'urlForward\'" md-cell>{{action.data2}}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'integration\'" md-cell>{{ vm_dc.integrationValues[action.data1].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'integration\' && action.data1 == \'zendesk\'" md-cell>{{ data2 = vm_dc.zendeskAccounts[action.data2]; data2.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'integration\' && action.data1 == \'desk\'" md-cell>{{ data2 = vm_dc.deskAccounts[action.data2]; data2.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'integration\' && action.data1 == \'zoho\'" md-cell>{{ data2 = vm_dc.zohoAccounts[action.data2]; data2.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'integration\' && action.data1 == \'salesforce\'" md-cell>{{ data2 = vm_dc.salesforceAccounts[action.data2]; data2.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'integration\' && action.data1 == \'sugarcrm\'" md-cell>{{ data2 = vm_dc.sugarcrmAccounts[action.data2]; data2.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'integration\' && action.data1 == \'freshdesk\'" md-cell>{{ data2 = vm_dc.freshdeskAccounts[action.data2]; data2.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'motionbar\'" md-cell>{{ vm_dc.motionbarValues[action.data1].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'motionbar\' && action.data1 == \'1\'" md-cell>{{action.data2}}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'motionbar\' && action.data1 == \'2\'" md-cell>{{action.data2}}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'motionbar\' && action.data1 == \'0\'" md-cell>{{ data2 = vm_dc.templates[action.data2]; data2.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'browser\' && action.data1 == \'0\'" md-cell>{{ data2 = vm_dc.templates[action.data2]; data2.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'browser\' && action.data1 == \'1\'" md-cell>{{action.data2}}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" md-cell>{{action.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditTriggerAction($event, action)" translate="TOOLS.EDIT_ACTION">\n                                                                Edit Action\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(action, $event)" translate="TOOLS.DELETE_ACTION">\n                                                                Delete Action\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.triggerActions.rows.length">\n                                            <td md-cell colspan="36">\n                                                <span class="text-boxed-ligth" translate="TOOLS.NO_ACTION_AVAILABLE">No action available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.triggerActions.count}}" md-on-paginate="vm_dc.getTriggerActions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/tools/views/triggers/triggers.html",'<div id="triggers" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.TRIGGERS">Triggers</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedTriggers.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedTriggers =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-triggers-count">\n                    <span>{{vm.selectedTriggers.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="TRIGGERS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllTriggers()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectTriggers()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedTriggers" csv-label="true" filename="triggers.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedTriggers($event)" aria-label="delete selected" translate translate-attr-label="TRIGGERS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- TRIGGER TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedTriggers" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getTriggers">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="channel">{{ \'TOOLS.CHANNEL\' | translate }}</th>\n                                <th md-column md-order-by="status">{{ \'TOOLS.STATUS\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.triggers.rows.length">\n                                <td md-cell colspan="6">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="trigger" md-select-id="id" ng-repeat="trigger in vm.triggers.rows">\n                                <td md-cell ng-if="trigger.userpic"><img class="avatar" alt="{{trigger.name}}" ng-src="api/users/{{trigger.id}}/avatar" /></td>\n                                <td md-cell ng-if="!trigger.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{trigger.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditTrigger($event, trigger)" md-cell class="id ">{{trigger.id}}</td>\n                                <td ng-click="vm.createOrEditTrigger($event, trigger)" md-cell class="name ">{{trigger.name}}</td>\n                                <td ng-click="vm.createOrEditTrigger($event, trigger)" md-cell class="channel ">{{ \'TOOLS.\' + vm.arraychannel[trigger.channel].option | uppercase | translate }}</td>\n                                <td ng-click="vm.createOrEditTrigger($event, trigger)" md-cell class="status ">\n                                    <md-icon md-colors="{color: {{trigger.status ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{trigger.status ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                </td>\n                                <td ng-click="vm.createOrEditTrigger($event, trigger)" md-cell class="description ">{{trigger.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(trigger, $event)" translate="TOOLS.EDIT_TRIGGER">\n                                                    Edit Trigger\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(trigger, $event)" translate="TOOLS.DELETE_TRIGGER">\n                                                    Delete Trigger\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.triggers.count}}" md-on-paginate="vm.getTriggers" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / TRIGGER TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD TRIGGER BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-trigger-button" ng-click="vm.createOrEditTrigger($event)" aria-label="add trigger" translate translate-attr-aria-label="TOOLS.ADD_TRIGGER">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD TRIGGER BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/trunks/create/dialog.html",'<md-dialog class="trunk-dialog" aria-label="New Trunk">\n    <form name="trunkForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.trunk.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newTrunk">\n                <div class="hint"><span translate="TOOLS.HELP.NAME"></span></div>\n                <div ng-messages="trunkForm[\'name\'].$error" ng-show="trunkForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="TOOLS.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.trunk.active" aria-label="active"><span translate="TOOLS.ACTIVE">active</span></md-switch>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.HOST">host</label>\n                <input type="text" name="host" ng-model="vm.trunk.host" ng-required="true">\n                <div class="hint"><span translate="TOOLS.HELP.HOST"></span></div>\n                <div ng-messages="trunkForm[\'host\'].$error" ng-show="trunkForm[\'host\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.HOST_REQUIRED">host field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.SECRET">secret</label>\n                <input type="password" name="secret" ng-model="vm.trunk.secret" placeholder="Password" translate translate-attr-placeholder="TOOLS.PASSWORD">\n                <div class="hint"><span translate="TOOLS.HELP.SECRET"></span></div>\n                <div ng-messages="trunkForm[\'secret\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="TOOLS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DEFAULTUSER">defaultuser</label>\n                <input type="text" name="defaultuser" ng-model="vm.trunk.defaultuser">\n                <div class="hint"><span translate="TOOLS.HELP.DEFAULTUSER"></span></div>\n                <div ng-messages="trunkForm[\'defaultuser\'].$error" ng-show="trunkForm[\'defaultuser\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DEFAULTUSER_REQUIRED">defaultuser field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.REGISTRY">registry</label>\n                <input type="text" name="registry" ng-model="vm.trunk.registry">\n                <div class="hint"><span translate="TOOLS.HELP.REGISTRY"></span></div>\n                <div ng-messages="trunkForm[\'registry\'].$error" ng-show="trunkForm[\'registry\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.REGISTRY_REQUIRED">registry field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.trunk.description">\n                <div ng-messages="trunkForm[\'description\'].$error" ng-show="trunkForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newTrunk" ng-click="vm.saveTrunk()" class="send-button md-accent md-raised" ng-disabled="trunkForm.$invalid || trunkForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newTrunk" ng-click="vm.addNewTrunk()" class="send-button md-accent md-raised" ng-disabled="trunkForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_TRUNK" translate-attr-aria-label="TOOLS.ADD_TRUNK">\n                    ADD TRUNK\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newTrunk" ng-click="vm.deleteTrunk($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/trunks/edit/view.html",'<div id="tools-trunk" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-trunks-button md-icon-button" aria-label="Go to trunks" ng-click="vm.gotoTrunks()" translate translate-attr-aria-label="TOOLS.GO_TO_TRUNKS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="trunk-image" hide-xs>\n                    <img ng-src="assets/images/business/trunks.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.trunk.id}}\n                        <span ng-if="vm.trunk.name">{{vm.trunk.name}}</span>\n                        <span ng-if="vm.trunk.exten">{{vm.trunk.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="TOOLS.CREATED_AT"></span> <span>{{vm.trunk.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.gotogoto(vm.trunk, $event)" class="md-fab md-warn md-icon-button" aria-label="goto">\n                <md-tooltip><span translate="TOOLS.GOTO_TRUNK"></span></md-tooltip>\n                <md-icon md-font-icon="icon-cast"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveTrunk()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (advancedForm.$invalid) || (otherFieldsForm.$invalid)" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="TOOLS.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="trunk-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="TOOLS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.trunk.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="TOOLS.HELP.NAME"></span></div>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="TOOLS.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.trunk.active" aria-label="active"><span translate="TOOLS.ACTIVE">active</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.HOST">host</label>\n                                <input type="text" name="host" ng-model="vm.trunk.host" ng-required="true">\n                                <div class="hint"><span translate="TOOLS.HELP.HOST"></span></div>\n                                <div ng-messages="generalForm[\'host\'].$error" ng-show="generalForm[\'host\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.HOST_REQUIRED">host field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.SECRET">secret</label>\n                                <input type="password" name="secret" ng-model="vm.trunk.secret" placeholder="Password" translate translate-attr-placeholder="TOOLS.PASSWORD">\n                                <div class="hint"><span translate="TOOLS.HELP.SECRET"></span></div>\n                                <div ng-messages="generalForm[\'secret\'].$error" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="TOOLS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.DEFAULTUSER">defaultuser</label>\n                                <input type="text" name="defaultuser" ng-model="vm.trunk.defaultuser">\n                                <div class="hint"><span translate="TOOLS.HELP.DEFAULTUSER"></span></div>\n                                <div ng-messages="generalForm[\'defaultuser\'].$error" ng-show="generalForm[\'defaultuser\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.DEFAULTUSER_REQUIRED">defaultuser field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.CONTEXT">context</label>\n                                <md-select name="context" ng-model="vm.trunk.context" required>\n                                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.CONTEXT"></span></div>\n                                <div ng-messages="generalForm[\'context\'].$error" ng-show="generalForm[\'context\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.CONTEXT_REQUIRED">context field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.CALLERID">callerid</label>\n                                <input type="text" name="callerid" ng-model="vm.trunk.callerid" ng-required="true">\n                                <div class="hint"><span translate="TOOLS.HELP.CALLERID"></span></div>\n                                <div ng-messages="generalForm[\'callerid\'].$error" ng-show="generalForm[\'callerid\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.CALLERID_REQUIRED">callerid field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.TYPE">Type</label>\n                                <md-select name="type" ng-model="vm.trunk.type" required>\n                                    <md-option ng-value="\'friend\'">Friend</md-option>\n                                    <md-option ng-value="\'user\'">User</md-option>\n                                    <md-option ng-value="\'peer\'">Peer</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.TYPE"></span></div>\n                                <div ng-messages="generalForm[\'type\'].$error" ng-show="generalForm[\'type\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.DTMFMODE">dtmfmode</label>\n                                <md-select name="dtmfmode" ng-model="vm.trunk.dtmfmode" required>\n                                    <md-option ng-value="\'rfc2833\'">rfc2833</md-option>\n                                    <md-option ng-value="\'info\'">info</md-option>\n                                    <md-option ng-value="\'shortinfo\'">shortinfo</md-option>\n                                    <md-option ng-value="\'inband\'">inband</md-option>\n                                    <md-option ng-value="\'auto\'">auto</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.DTMFMODE"></span></div>\n                                <div ng-messages="generalForm[\'dtmfmode\'].$error" ng-show="generalForm[\'dtmfmode\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.DTMFMODE_REQUIRED">dtmfmode field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.NAT">nat</label>\n                                <md-select name="nat" ng-model="vm.trunk.nat" required multiple>\n                                    <md-option ng-value="\'force_rport\'">force_rport</md-option>\n                                    <md-option ng-value="\'comedia\'">comedia</md-option>\n                                    <md-option ng-value="\'yes\'">yes</md-option>\n                                    <md-option ng-value="\'no\'">no</md-option>\n                                    <md-option ng-value="\'never\'">never</md-option>\n                                    <md-option ng-value="\'route\'">route</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.NAT"></span></div>\n                                <div ng-messages="generalForm[\'nat\'].$error" ng-show="generalForm[\'nat\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.NAT_REQUIRED">nat field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.QUALIFY">qualify</label>\n                                <md-select name="qualify" ng-model="vm.trunk.qualify" required>\n\n                                    <md-option ng-value="\'yes\'"> {{ \'TOOLS.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'TOOLS.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.QUALIFY"></span></div>\n                                <div ng-messages="generalForm[\'qualify\'].$error" ng-show="generalForm[\'qualify\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.QUALIFY_REQUIRED">qualify field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.ALLOWCODECS">AllowCodecs</label>\n                                <md-select name="allow" ng-model="vm.trunk.allow" required multiple>\n                                    <md-option ng-value="\'ulaw\'">ulaw</md-option>\n                                    <md-option ng-value="\'alaw\'">alaw</md-option>\n                                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                                    <md-option ng-value="\'g723\'">g723</md-option>\n                                    <md-option ng-value="\'g726\'">g726</md-option>\n                                    <md-option ng-value="\'g722\'">g722</md-option>\n                                    <md-option ng-value="\'g729\'">g729</md-option>\n                                    <md-option ng-value="\'ilbc\'">ilbc</md-option>\n                                    <md-option ng-value="\'opus\'">opus</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.ALLOWCODECS"></span></div>\n                                <div ng-messages="generalForm[\'allow\'].$error" ng-show="generalForm[\'allow\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.ALLOWCODECS_REQUIRED">AllowCodecs field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.INSECURE">insecure</label>\n                                <md-select name="insecure" ng-model="vm.trunk.insecure" required multiple>\n                                    <md-option ng-value="\'port\'">port</md-option>\n                                    <md-option ng-value="\'invite\'">invite</md-option>\n                                    <md-option ng-value="\'very\'">very</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.INSECURE"></span></div>\n                                <div ng-messages="generalForm[\'insecure\'].$error" ng-show="generalForm[\'insecure\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.INSECURE_REQUIRED">insecure field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.CALL_LIMIT">call_limit</label>\n                                <input type="number" name="call_limit" ng-model="vm.trunk.call_limit">\n                                <div class="hint"><span translate="TOOLS.HELP.CALL_LIMIT"></span></div>\n                                <div ng-messages="generalForm[\'call_limit\'].$error" ng-show="generalForm[\'call_limit\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.CALL_LIMIT_REQUIRED">call_limit field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.trunk.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="TOOLS.ADVANCED">ADVANCED</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="trunk-detail-form-container advanced md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="TOOLS.ADVANCED">ADVANCED</div>\n                        </div>\n                        <form name="advancedForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.REGISTRY">registry</label>\n                                <input type="text" name="registry" ng-model="vm.trunk.registry" autofocus>\n                                <div class="hint"><span translate="TOOLS.HELP.REGISTRY"></span></div>\n                                <div ng-messages="advancedForm[\'registry\'].$error" ng-show="advancedForm[\'registry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.REGISTRY_REQUIRED">registry field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.DIRECTMEDIA">directmedia</label>\n                                <md-select name="directmedia" ng-model="vm.trunk.directmedia" required>\n                                    <md-option ng-value="\'yes\'">yes</md-option>\n                                    <md-option ng-value="\'no\'">no</md-option>\n                                    <md-option ng-value="\'nonat\'">nonat</md-option>\n                                    <md-option ng-value="\'update\'">update</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.DIRECTMEDIA"></span></div>\n                                <div ng-messages="advancedForm[\'directmedia\'].$error" ng-show="advancedForm[\'directmedia\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.DIRECTMEDIA_REQUIRED">directmedia field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.CALLCOUNTER">callcounter</label>\n                                <md-select name="callcounter" ng-model="vm.trunk.callcounter" required>\n\n                                    <md-option ng-value="\'yes\'"> {{ \'TOOLS.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'TOOLS.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.CALLCOUNTER"></span></div>\n                                <div ng-messages="advancedForm[\'callcounter\'].$error" ng-show="advancedForm[\'callcounter\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.CALLCOUNTER_REQUIRED">callcounter field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.FROMDOMAIN">fromdomain</label>\n                                <input type="text" name="fromdomain" ng-model="vm.trunk.fromdomain">\n                                <div class="hint"><span translate="TOOLS.HELP.FROMDOMAIN"></span></div>\n                                <div ng-messages="advancedForm[\'fromdomain\'].$error" ng-show="advancedForm[\'fromdomain\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.FROMDOMAIN_REQUIRED">fromdomain field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.FROMUSER">fromuser</label>\n                                <input type="text" name="fromuser" ng-model="vm.trunk.fromuser">\n                                <div class="hint"><span translate="TOOLS.HELP.FROMUSER"></span></div>\n                                <div ng-messages="advancedForm[\'fromuser\'].$error" ng-show="advancedForm[\'fromuser\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.FROMUSER_REQUIRED">fromuser field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.OUTBOUNDPROXY">outboundproxy</label>\n                                <input type="text" name="outboundproxy" ng-model="vm.trunk.outboundproxy">\n                                <div class="hint"><span translate="TOOLS.HELP.OUTBOUNDPROXY"></span></div>\n                                <div ng-messages="advancedForm[\'outboundproxy\'].$error" ng-show="advancedForm[\'outboundproxy\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.OUTBOUNDPROXY_REQUIRED">outboundproxy field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.ADD_PHONE_TO_URI">Add_phone_to_URI</label>\n                                <md-select name="usereqphone" ng-model="vm.trunk.usereqphone" required>\n\n                                    <md-option ng-value="\'yes\'"> {{ \'TOOLS.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'TOOLS.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.ADD_PHONE_TO_URI"></span></div>\n                                <div ng-messages="advancedForm[\'usereqphone\'].$error" ng-show="advancedForm[\'usereqphone\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.ADD_PHONE_TO_URI_REQUIRED">Add_phone_to_URI field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.TRUST_REMOTE_PARTY_ID">Trust_Remote_Party_ID</label>\n                                <md-select name="trustrpid" ng-model="vm.trunk.trustrpid" required>\n\n                                    <md-option ng-value="\'yes\'"> {{ \'TOOLS.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'TOOLS.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.TRUST_REMOTE_PARTY_ID"></span></div>\n                                <div ng-messages="advancedForm[\'trustrpid\'].$error" ng-show="advancedForm[\'trustrpid\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.TRUST_REMOTE_PARTY_ID_REQUIRED">Trust_Remote_Party_ID field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.SEND_REMOTE_PARTY_ID_HEADER">Send_Remote_Party_ID_header</label>\n                                <md-select name="sendrpid" ng-model="vm.trunk.sendrpid" required>\n\n                                    <md-option ng-value="\'yes\'"> {{ \'TOOLS.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'TOOLS.NO\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'pai\'"> {{ \'TOOLS.PAI\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.SEND_REMOTE_PARTY_ID_HEADER"></span></div>\n                                <div ng-messages="advancedForm[\'sendrpid\'].$error" ng-show="advancedForm[\'sendrpid\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.SEND_REMOTE_PARTY_ID_HEADER_REQUIRED">Send_Remote_Party_ID_header field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.ENCRYPTION">encryption</label>\n                                <md-select name="encryption" ng-model="vm.trunk.encryption" required>\n\n                                    <md-option ng-value="\'yes\'"> {{ \'TOOLS.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'TOOLS.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.ENCRYPTION"></span></div>\n                                <div ng-messages="advancedForm[\'encryption\'].$error" ng-show="advancedForm[\'encryption\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.ENCRYPTION_REQUIRED">encryption field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.PORT">port</label>\n                                <input type="number" name="port" ng-model="vm.trunk.port">\n                                <div class="hint"><span translate="TOOLS.HELP.PORT"></span></div>\n                                <div ng-messages="advancedForm[\'port\'].$error" ng-show="advancedForm[\'port\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.PORT_REQUIRED">port field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.TRANSPORT">Transport</label>\n                                <md-select name="transport" ng-model="vm.trunk.transport" required multiple>\n                                    <md-option ng-value="\'udp\'">udp</md-option>\n                                    <md-option ng-value="\'tcp\'">tcp</md-option>\n                                    <md-option ng-value="\'ws\'">ws</md-option>\n                                    <md-option ng-value="\'wss\'">wss</md-option>\n                                    <md-option ng-value="\'tls\'">tls</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.TRANSPORT"></span></div>\n                                <div ng-messages="advancedForm[\'transport\'].$error" ng-show="advancedForm[\'transport\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.TRANSPORT_REQUIRED">Transport field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.T38PT_UDPTL">t38pt_udptl</label>\n                                <input type="string" name="t38pt_udptl" ng-model="vm.trunk.t38pt_udptl">\n                                <div class="hint"><span translate="TOOLS.HELP.T38PT_UDPTL"></span></div>\n                                <div ng-messages="advancedForm[\'t38pt_udptl\'].$error" ng-show="advancedForm[\'t38pt_udptl\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.T38PT_UDPTL_REQUIRED">t38pt_udptl field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="TOOLS.OTHERFIELDS">OTHERFIELDS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="trunk-detail-form-container otherfields md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="TOOLS.OTHERFIELDS">OTHERFIELDS</div>\n                        </div>\n                        <form name="otherFieldsForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.OTHERFIELDS">otherFields</label>\n                                <textarea name="otherFields" ng-model="vm.trunk.otherFields" autofocus></textarea>\n                                <div class="hint"><span translate="TOOLS.HELP.OTHERFIELDS"></span></div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/tools/views/trunks/trunks.html",'<div id="trunks" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.TRUNKS">Trunks</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedTrunks.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedTrunks =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-trunks-count">\n                    <span>{{vm.selectedTrunks.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="TRUNKS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllTrunks()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectTrunks()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedTrunks" csv-label="true" filename="trunks.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedTrunks($event)" aria-label="delete selected" translate translate-attr-label="TRUNKS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- TRUNK TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedTrunks" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getTrunks">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="active">{{ \'TOOLS.ACTIVE\' | translate }}</th>\n                                <th md-column md-order-by="host">{{ \'TOOLS.HOST\' | translate }}</th>\n                                <th md-column md-order-by="registry">{{ \'TOOLS.REGISTRY\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.trunks.rows.length">\n                                <td md-cell colspan="7">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="trunk" md-select-id="id" ng-repeat="trunk in vm.trunks.rows">\n                                <td md-cell ng-if="trunk.userpic"><img class="avatar" alt="{{trunk.name}}" ng-src="api/users/{{trunk.id}}/avatar" /></td>\n                                <td md-cell ng-if="!trunk.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{trunk.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditTrunk($event, trunk)" md-cell class="id ">{{trunk.id}}</td>\n                                <td ng-click="vm.createOrEditTrunk($event, trunk)" md-cell class="name ">{{trunk.name}}</td>\n                                <td ng-click="vm.createOrEditTrunk($event, trunk)" md-cell class="active ">\n                                    <md-icon md-colors="{color: {{trunk.active ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{trunk.active ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                </td>\n                                <td ng-click="vm.createOrEditTrunk($event, trunk)" md-cell class="host ">{{trunk.host}}</td>\n                                <td ng-click="vm.createOrEditTrunk($event, trunk)" md-cell class="registry ">{{trunk.registry}}</td>\n                                <td ng-click="vm.createOrEditTrunk($event, trunk)" md-cell class="description ">{{trunk.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(trunk, $event)" translate="TOOLS.EDIT_TRUNK">\n                                                    Edit Trunk\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(trunk, $event)" translate="TOOLS.GOTOREALTIME_TRUNK">\n                                                    goToRealtime Trunk\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(trunk, $event)" translate="TOOLS.DELETE_TRUNK">\n                                                    Delete Trunk\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.trunks.count}}" md-on-paginate="vm.getTrunks" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / TRUNK TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD TRUNK BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-trunk-button" ng-click="vm.createOrEditTrunk($event)" aria-label="add trunk" translate translate-attr-aria-label="TOOLS.ADD_TRUNK">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD TRUNK BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/variables/create/dialog.html",'<md-dialog class="variable-dialog" aria-label="New Variable">\n    <form name="variableForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.variable.name" ng-required="true" autofocus>\n                <div ng-messages="variableForm[\'name\'].$error" ng-show="variableForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.variable.description">\n                <div ng-messages="variableForm[\'description\'].$error" ng-show="variableForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newVariable" ng-click="vm.saveVariable()" class="send-button md-accent md-raised" ng-disabled="variableForm.$invalid || variableForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newVariable" ng-click="vm.addNewVariable()" class="send-button md-accent md-raised" ng-disabled="variableForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_VARIABLE" translate-attr-aria-label="TOOLS.ADD_VARIABLE">\n                    ADD VARIABLE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newVariable" ng-click="vm.deleteVariable($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/variables/variables.html",'<div id="variables" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.VARIABLES">Variables</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedVariables.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedVariables =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-variables-count">\n                    <span>{{vm.selectedVariables.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="VARIABLES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllVariables()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectVariables()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedVariables" csv-label="true" filename="variables.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedVariables($event)" aria-label="delete selected" translate translate-attr-label="VARIABLES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- VARIABLE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedVariables" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getVariables">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.variables.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="variable" md-select-id="id" ng-repeat="variable in vm.variables.rows">\n                                <td md-cell ng-if="variable.userpic"><img class="avatar" alt="{{variable.name}}" ng-src="api/users/{{variable.id}}/avatar" /></td>\n                                <td md-cell ng-if="!variable.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{variable.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditVariable($event, variable)" md-cell class="id ">{{variable.id}}</td>\n                                <td ng-click="vm.createOrEditVariable($event, variable)" md-cell class="name ">{{variable.name}}</td>\n                                <td ng-click="vm.createOrEditVariable($event, variable)" md-cell class="description ">{{variable.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(variable, $event)" translate="TOOLS.EDIT_VARIABLE">\n                                                    Edit Variable\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(variable, $event)" translate="TOOLS.DELETE_VARIABLE">\n                                                    Delete Variable\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.variables.count}}" md-on-paginate="vm.getVariables" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / VARIABLE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD VARIABLE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-variable-button" ng-click="vm.createOrEditVariable($event)" aria-label="add variable" translate translate-attr-aria-label="TOOLS.ADD_VARIABLE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD VARIABLE BUTTON --\x3e\n</div>'),e.put("app/main/apps/voice/views/chanSpies/chanSpies.html",'<div id="chanSpies" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-phone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="VOICE.CHANSPIES">ChanSpies</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="VOICE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedChanSpies.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedChanSpies =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="VOICE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-chanSpies-count">\n                    <span>{{vm.selectedChanSpies.length}}</span>\n                <span translate="VOICE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="CHANSPIES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllChanSpies()" translate="VOICE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectChanSpies()" translate="VOICE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedChanSpies" csv-label="true" filename="chanSpies.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedChanSpies($event)" aria-label="delete selected" translate translate-attr-label="CHANSPIES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- CHANSPY TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedChanSpies" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getChanSpies">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'VOICE.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'VOICE.NAME\' | translate }}</th>\n                                <th md-column md-order-by="prefix">{{ \'VOICE.PREFIX\' | translate }}</th>\n                                <th md-column md-order-by="auth">{{ \'VOICE.AUTH\' | translate }}</th>\n                                <th md-column md-order-by="record">{{ \'VOICE.RECORD\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'VOICE.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.chanSpies.rows.length">\n                                <td md-cell colspan="7">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="chanSpy" md-select-id="id" ng-repeat="chanSpy in vm.chanSpies.rows">\n                                <td md-cell ng-if="chanSpy.userpic"><img class="avatar" alt="{{chanSpy.name}}" ng-src="api/users/{{chanSpy.id}}/avatar" /></td>\n                                <td md-cell ng-if="!chanSpy.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{chanSpy.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditchanSpy($event, chanSpy)" md-cell class="id ">{{chanSpy.id}}</td>\n                                <td ng-click="vm.createOrEditchanSpy($event, chanSpy)" md-cell class="name ">{{chanSpy.name}}</td>\n                                <td ng-click="vm.createOrEditchanSpy($event, chanSpy)" md-cell class="prefix ">{{chanSpy.prefix}}</td>\n                                <td ng-click="vm.createOrEditchanSpy($event, chanSpy)" md-cell class="auth ">\n                                    <md-icon md-colors="{color: {{chanSpy.auth ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{chanSpy.auth ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                </td>\n                                <td ng-click="vm.createOrEditchanSpy($event, chanSpy)" md-cell class="record ">\n                                    <md-icon md-colors="{color: {{chanSpy.record ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{chanSpy.record ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                </td>\n                                <td ng-click="vm.createOrEditchanSpy($event, chanSpy)" md-cell class="description ">{{chanSpy.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(chanSpy, $event)" translate="VOICE.EDIT_CHANSPY">\n                                                    Edit chanSpy\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(chanSpy, $event)" translate="VOICE.DELETE_CHANSPY">\n                                                    Delete chanSpy\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.chanSpies.count}}" md-on-paginate="vm.getChanSpies" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / CHANSPY TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD CHANSPY BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-chanSpy-button" ng-click="vm.createOrEditchanSpy($event)" aria-label="add chanSpy" translate translate-attr-aria-label="VOICE.ADD_CHANSPY">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD CHANSPY BUTTON --\x3e\n</div>'),e.put("app/main/apps/voice/views/chanSpies/create/dialog.html",'<md-dialog class="chanSpy-dialog" aria-label="New chanSpy">\n    <form name="chanSpyForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.chanSpy.name" ng-required="true" autofocus>\n                <div ng-messages="chanSpyForm[\'name\'].$error" ng-show="chanSpyForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PREFIX">Prefix</label>\n                <input type="text" name="prefix" ng-model="vm.chanSpy.prefix" ng-required="true">\n                <div ng-messages="chanSpyForm[\'prefix\'].$error" ng-show="chanSpyForm[\'prefix\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PREFIX_REQUIRED">Prefix field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <md-select name="options" ng-model="vm.chanSpy.options" required multiple>\n                    <md-option ng-value="\'b\'">b: Only spy on channels involved in a bridged call.</md-option>\n                    <md-option ng-value="\'B\'">B: Instead of whispering on a single channel barge in on both channels involved in the call.</md-option>\n                    <md-option ng-value="\'E\'">E: Exit when the spied-on channel hangs up.</md-option>\n                    <md-option ng-value="\'o\'">o: Only listen to audio coming from this channel.</md-option>\n                    <md-option ng-value="\'q\'">q: Don\'t play a beep when beginning to spy on a channel, or speak the selected channel name.</md-option>\n                    <md-option ng-value="\'s\'">s: Skip the playback of the channel type (i.e. SIP, IAX, etc) when speaking the selected channel name.</md-option>\n                    <md-option ng-value="\'S\'">S: Stop when no more channels are left to spy on.</md-option>\n                    <md-option ng-value="\'w\'">w: Enable whisper mode, so the spying channel can talk to the spied-on channel.</md-option>\n                    <md-option ng-value="\'W\'">W: Enable private whisper mode, so the spying channel can talk to the spied-on channel but cannot listen to that channel.</md-option>\n                </md-select>\n                <div ng-messages="chanSpyForm[\'options\'].$error" ng-show="chanSpyForm[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.chanSpy.auth" aria-label="Auth"><span translate="VOICE.AUTH">Auth</span></md-switch>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.chanSpy.auth">\n                <label translate="VOICE.PASSWORD">Password</label>\n                <input type="password" name="password" ng-model="vm.chanSpy.password" placeholder="Password" translate translate-attr-placeholder="VOICE.PASSWORD" required>\n                <div ng-messages="chanSpyForm[\'password\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="VOICE.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.chanSpy.record" aria-label="Record"><span translate="VOICE.RECORD">Record</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="vm.chanSpy.record" class="md-block">\n                <label translate="VOICE.RECORDINGFORMAT">recordingFormat</label>\n                <md-select name="recordingFormat" ng-model="vm.chanSpy.recordingFormat" required>\n                    <md-option ng-value="\'wav\'">wav</md-option>\n                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                    <md-option ng-value="\'WAV\'">wav49</md-option>\n                </md-select>\n                <div ng-messages="chanSpyForm[\'recordingFormat\'].$error" ng-show="chanSpyForm[\'recordingFormat\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.RECORDINGFORMAT_REQUIRED">recordingFormat field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.chanSpy.description">\n                <div ng-messages="chanSpyForm[\'description\'].$error" ng-show="chanSpyForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newchanSpy" ng-click="vm.savechanSpy()" class="send-button md-accent md-raised" ng-disabled="chanSpyForm.$invalid || chanSpyForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newchanSpy" ng-click="vm.addNewchanSpy()" class="send-button md-accent md-raised" ng-disabled="chanSpyForm.$invalid" aria-label="ADD" translate="VOICE.ADD_CHANSPY" translate-attr-aria-label="VOICE.ADD_CHANSPY">\n                    ADD CHANSPY\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newchanSpy" ng-click="vm.deletechanSpy($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/contexts/contexts.html",'<div id="contexts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-phone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="VOICE.CONTEXTS">Contexts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="VOICE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedContexts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedContexts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="VOICE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-contexts-count">\n                    <span>{{vm.selectedContexts.length}}</span>\n                <span translate="VOICE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="CONTEXTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllContexts()" translate="VOICE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectContexts()" translate="VOICE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedContexts" csv-label="true" filename="contexts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedContexts($event)" aria-label="delete selected" translate translate-attr-label="CONTEXTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- CONTEXT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedContexts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getContexts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'VOICE.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'VOICE.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'VOICE.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.contexts.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="context" md-select-id="id" ng-repeat="context in vm.contexts.rows">\n                                <td md-cell ng-if="context.userpic"><img class="avatar" alt="{{context.name}}" ng-src="api/users/{{context.id}}/avatar" /></td>\n                                <td md-cell ng-if="!context.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{context.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditContext($event, context)" md-cell class="id ">{{context.id}}</td>\n                                <td ng-click="vm.createOrEditContext($event, context)" md-cell class="name ">{{context.name}}</td>\n                                <td ng-click="vm.createOrEditContext($event, context)" md-cell class="description ">{{context.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(context, $event)" translate="VOICE.EDIT_CONTEXT">\n                                                    Edit Context\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(context, $event)" translate="VOICE.DELETE_CONTEXT">\n                                                    Delete Context\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.contexts.count}}" md-on-paginate="vm.getContexts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / CONTEXT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD CONTEXT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-context-button" ng-click="vm.createOrEditContext($event)" aria-label="add context" translate translate-attr-aria-label="VOICE.ADD_CONTEXT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD CONTEXT BUTTON --\x3e\n</div>'),e.put("app/main/apps/voice/views/contexts/create/dialog.html",'<md-dialog class="context-dialog" aria-label="New Context">\n    <form name="contextForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.context.name" ng-required="true" autofocus>\n                <div ng-messages="contextForm[\'name\'].$error" ng-show="contextForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.context.description">\n                <div ng-messages="contextForm[\'description\'].$error" ng-show="contextForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newContext" ng-click="vm.saveContext()" class="send-button md-accent md-raised" ng-disabled="contextForm.$invalid || contextForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newContext" ng-click="vm.addNewContext()" class="send-button md-accent md-raised" ng-disabled="contextForm.$invalid" aria-label="ADD" translate="VOICE.ADD_CONTEXT" translate-attr-aria-label="VOICE.ADD_CONTEXT">\n                    ADD CONTEXT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newContext" ng-click="vm.deleteContext($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/create/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PHONENUMBER">PhoneNumber</label>\n                <input type="text" name="exten" ng-model="vm.inboundroute.exten" ng-required="true" autofocus>\n                <div ng-messages="inboundrouteForm[\'exten\'].$error" ng-show="inboundrouteForm[\'exten\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PHONENUMBER_REQUIRED">PhoneNumber field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.CONTEXT">Context</label>\n                <md-select name="context" ng-model="vm.inboundroute.context" required>\n                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteForm[\'context\'].$error" ng-show="inboundrouteForm[\'context\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.inboundroute.description">\n                <div ng-messages="inboundrouteForm[\'description\'].$error" ng-show="inboundrouteForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInboundRoute" ng-click="vm.saveInboundRoute()" class="send-button md-accent md-raised" ng-disabled="inboundrouteForm.$invalid || inboundrouteForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInboundRoute" ng-click="vm.addNewInboundRoute()" class="send-button md-accent md-raised" ng-disabled="inboundrouteForm.$invalid" aria-label="ADD" translate="VOICE.ADD_INBOUNDROUTE" translate-attr-aria-label="VOICE.ADD_INBOUNDROUTE">\n                    ADD INBOUNDROUTE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newInboundRoute" ng-click="vm.deleteInboundRoute($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/agi/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PROJECT">Project</label>\n                <md-select name="project" ng-model="vm.agi.project" required autofocus>\n                    <md-option ng-value="\'agi://127.0.0.1/square,{{project.name}}\'" ng-repeat="project in vm.projects">{{ project.name }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'project\'].$error" ng-show="inboundrouteFormApp[\'project\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PROJECT_REQUIRED">Project field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/custom/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.APPLICATION_NAME">Application_Name</label>\n                <input type="text" name="app" ng-model="vm.custom.app" ng-required="true" autofocus>\n                <div ng-messages="inboundrouteFormApp[\'app\'].$error" ng-show="inboundrouteFormApp[\'app\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.APPLICATION_NAME_REQUIRED">Application_Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.ARGUMENTS">Arguments</label>\n                <input type="text" name="appdata" ng-model="vm.custom.appdata">\n                <div ng-messages="inboundrouteFormApp[\'appdata\'].$error" ng-show="inboundrouteFormApp[\'appdata\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.ARGUMENTS_REQUIRED">Arguments field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/dial/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TECHNOLOGY/RESOURCE">Technology/Resource</label>\n                <input type="text" name="tech" ng-model="vm.dial.tech" ng-required="true" autofocus>\n                <div ng-messages="inboundrouteFormApp[\'tech\'].$error" ng-show="inboundrouteFormApp[\'tech\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TECHNOLOGY/RESOURCE_REQUIRED">Technology/Resource field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.dial.timeout" min="0">\n                <div ng-messages="inboundrouteFormApp[\'timeout\'].$error" ng-show="inboundrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.dial.options">\n                <div ng-messages="inboundrouteFormApp[\'options\'].$error" ng-show="inboundrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="url" ng-model="vm.dial.url">\n                <div ng-messages="inboundrouteFormApp[\'url\'].$error" ng-show="inboundrouteFormApp[\'url\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/externaldial/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TRUNK">Trunk</label>\n                <md-select name="trunk" ng-model="vm.externaldial.trunk" required autofocus>\n                    <md-option ng-value="trunk.name" ng-repeat="trunk in vm.trunks">{{ trunk.name }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'trunk\'].$error" ng-show="inboundrouteFormApp[\'trunk\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TRUNK_REQUIRED">Trunk field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PHONE">Phone</label>\n                <input type="text" name="phone" ng-model="vm.externaldial.phone" ng-required="true">\n                <div ng-messages="inboundrouteFormApp[\'phone\'].$error" ng-show="inboundrouteFormApp[\'phone\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PHONE_REQUIRED">Phone field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.externaldial.timeout" min="0">\n                <div ng-messages="inboundrouteFormApp[\'timeout\'].$error" ng-show="inboundrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.externaldial.options">\n                <div ng-messages="inboundrouteFormApp[\'options\'].$error" ng-show="inboundrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="url" ng-model="vm.externaldial.url">\n                <div ng-messages="inboundrouteFormApp[\'url\'].$error" ng-show="inboundrouteFormApp[\'url\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/goto/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.CONTEXT">Context</label>\n                <md-select name="context" ng-model="vm.goto.context" required autofocus>\n                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'context\'].$error" ng-show="inboundrouteFormApp[\'context\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.EXTENSION">Extension</label>\n                <input type="text" name="extension" ng-model="vm.goto.extension" ng-required="true">\n                <div ng-messages="inboundrouteFormApp[\'extension\'].$error" ng-show="inboundrouteFormApp[\'extension\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.EXTENSION_REQUIRED">Extension field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PRIORITY">Priority</label>\n                <input type="text" name="priority" ng-model="vm.goto.priority" ng-required="true">\n                <div ng-messages="inboundrouteFormApp[\'priority\'].$error" ng-show="inboundrouteFormApp[\'priority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PRIORITY_REQUIRED">Priority field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/hangup/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.HANGUP_CAUSE">Hangup_Cause</label>\n                <md-select name="appdata" ng-model="vm.hangup.appdata" required autofocus>\n\n                    <md-option ng-value="\'1\'"> {{ \'VOICE.HANGUPCAUSE_1\' | translate }}</md-option>\n\n                    <md-option ng-value="\'16\'"> {{ \'VOICE.HANGUPCAUSE_16\' | translate }}</md-option>\n\n                    <md-option ng-value="\'17\'"> {{ \'VOICE.HANGUPCAUSE_17\' | translate }}</md-option>\n\n                    <md-option ng-value="\'18\'"> {{ \'VOICE.HANGUPCAUSE_18\' | translate }}</md-option>\n\n                    <md-option ng-value="\'21\'"> {{ \'VOICE.HANGUPCAUSE_21\' | translate }}</md-option>\n\n                    <md-option ng-value="\'22\'"> {{ \'VOICE.HANGUPCAUSE_22\' | translate }}</md-option>\n\n                    <md-option ng-value="\'27\'"> {{ \'VOICE.HANGUPCAUSE_27\' | translate }}</md-option>\n\n                    <md-option ng-value="\'38\'"> {{ \'VOICE.HANGUPCAUSE_38\' | translate }}</md-option>\n\n                    <md-option ng-value="\'41\'"> {{ \'VOICE.HANGUPCAUSE_41\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'appdata\'].$error" ng-show="inboundrouteFormApp[\'appdata\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.HANGUP_CAUSE_REQUIRED">Hangup_Cause field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/internaldial/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.USER">User</label>\n                <md-select name="user" ng-model="vm.internaldial.user" required autofocus>\n                    <md-option ng-value="\'SIP/{{user.name}}\'" ng-repeat="user in vm.users">{{ user.name }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'user\'].$error" ng-show="inboundrouteFormApp[\'user\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.USER_REQUIRED">User field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.internaldial.timeout" min="0">\n                <div ng-messages="inboundrouteFormApp[\'timeout\'].$error" ng-show="inboundrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.internaldial.options">\n                <div ng-messages="inboundrouteFormApp[\'options\'].$error" ng-show="inboundrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="url" ng-model="vm.internaldial.url">\n                <div ng-messages="inboundrouteFormApp[\'url\'].$error" ng-show="inboundrouteFormApp[\'url\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/interval/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select ng-model="vm.type">\n                    <md-option ng-value="type" ng-repeat=\'type in vm.types\'>{{ type | ucfirst }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.type === \'list\'">\n                <label translate="TOOLS.INTERVALS">Intervals</label>\n                <md-select ng-model="vm.interval.IntervalId">\n                    <md-option ng-value="interval.id" ng-repeat="interval in vm.intervals.rows">{{ interval.name }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            \x3c!-- TIMERANGE START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.TIME_RANGE">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <div class="md-block" flex>\n                    <mdp-time-picker name="timeRangeFrom" mdp-placeholder="FROM" ng-model="vm.timeRangeFrom" mdp-format="HH:mm" mdp-auto-switch="true">\n                        <div ng-messages="intervalForm.timeRangeFrom.$error" ng-show="intervalForm.timeRangeFrom.$touched" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_FROM_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n                <div class="md-block" flex ng-if="vm.timeRangeFrom">\n                    <mdp-time-picker name="timeRangeTo" mdp-placeholder="TO*" ng-model="vm.timeRangeTo" mdp-format="HH:mm" mdp-auto-switch="true" required>\n                        <div ng-messages="intervalForm.timeRangeTo.$error" ng-show="intervalForm.timeRangeTo.$invalid" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_INVALID">Time Range To field is invalid</span>\n                            </div>\n                            <div ng-message="required">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_REQUIRED">Time Range To field is required</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n            \x3c!-- TIMERANGE END --\x3e\n\n            \x3c!-- DAYSOFWEEK START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.WEEK_DAYS">Week Days</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.dayOfWeekFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex class="md-block" ng-if="vm.dayOfWeekFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="dayOfWeekTo" ng-model="vm.dayOfWeekTo">\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.dayOfWeekTo.$error" ng-show="intervalForm.dayOfWeekTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- DAYSOFWEEK END --\x3e\n\n            \x3c!-- MONTHDAY START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTH_DAYS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthDayFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthDayFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthDayTo" ng-model="vm.monthDayTo">\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthDayTo.$error" ng-show="intervalForm.monthDayTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTHDAY END --\x3e\n\n            \x3c!-- MONTH START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTHS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthTo" ng-model="vm.monthTo">\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthTo.$error" ng-show="intervalForm.monthTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTH END --\x3e\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/playback/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.AUDIO_FILES">Audio_Files</label>\n                <md-select name="appdata" ng-model="vm.playback.appdata" required autofocus>\n                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/{{appdata.save_name}}\'" ng-repeat="appdata in vm.sounds">{{ appdata.name }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'appdata\'].$error" ng-show="inboundrouteFormApp[\'appdata\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.AUDIO_FILES_REQUIRED">Audio_Files field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.playback.options">\n                <div ng-messages="inboundrouteFormApp[\'options\'].$error" ng-show="inboundrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.playback.answer" aria-label="Answer"><span translate="VOICE.ANSWER">Answer</span></md-switch>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/queue/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.QUEUE">Queue</label>\n                <md-select name="queue" ng-model="vm.queue.queue" required autofocus>\n                    <md-option ng-value="queue.name" ng-repeat="queue in vm.queues">{{ queue.name }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'queue\'].$error" ng-show="inboundrouteFormApp[\'queue\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.QUEUE_REQUIRED">Queue field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.queue.options">\n                <div ng-messages="inboundrouteFormApp[\'options\'].$error" ng-show="inboundrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="URL" ng-model="vm.queue.URL">\n                <div ng-messages="inboundrouteFormApp[\'URL\'].$error" ng-show="inboundrouteFormApp[\'URL\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.ANNOUNCE_OVERRIDES">Announce_Overrides</label>\n                <md-select name="sound" ng-model="vm.queue.sound">\n                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/{{sound.save_name}}\'" ng-repeat="sound in vm.sounds">{{ sound.name }}</md-option>\n                    <md-option ng-value="\'\'">None</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'sound\'].$error" ng-show="inboundrouteFormApp[\'sound\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.ANNOUNCE_OVERRIDES_REQUIRED">Announce_Overrides field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.queue.timeout" min="0">\n                <div ng-messages="inboundrouteFormApp[\'timeout\'].$error" ng-show="inboundrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.AGI">Agi</label>\n                <input type="text" name="agi" ng-model="vm.queue.agi">\n                <div ng-messages="inboundrouteFormApp[\'agi\'].$error" ng-show="inboundrouteFormApp[\'agi\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.AGI_REQUIRED">Agi field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.MACRO">Macro</label>\n                <input type="text" name="macro" ng-model="vm.queue.macro">\n                <div ng-messages="inboundrouteFormApp[\'macro\'].$error" ng-show="inboundrouteFormApp[\'macro\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.MACRO_REQUIRED">Macro field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.GOSUB">GoSub</label>\n                <input type="text" name="gosub" ng-model="vm.queue.gosub">\n                <div ng-messages="inboundrouteFormApp[\'gosub\'].$error" ng-show="inboundrouteFormApp[\'gosub\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.GOSUB_REQUIRED">GoSub field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.RULE">Rule</label>\n                <input type="text" name="rule" ng-model="vm.queue.rule">\n                <div ng-messages="inboundrouteFormApp[\'rule\'].$error" ng-show="inboundrouteFormApp[\'rule\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.RULE_REQUIRED">Rule field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.POSITION">Position</label>\n                <input type="number" name="position" ng-model="vm.queue.position" min="0">\n                <div ng-messages="inboundrouteFormApp[\'position\'].$error" ng-show="inboundrouteFormApp[\'position\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.POSITION_REQUIRED">Position field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.POSITION_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Position must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.queue.answer" aria-label="Answer"><span translate="VOICE.ANSWER">Answer</span></md-switch>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/ringgroup/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.USER">User</label>\n                <md-select name="multipleUsers" ng-model="vm.ringgroup.multipleUsers" required autofocus multiple>\n                    <md-option ng-value="\'SIP/{{multipleUsers.name}}\'" ng-repeat="multipleUsers in vm.users">{{ multipleUsers.name }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'multipleUsers\'].$error" ng-show="inboundrouteFormApp[\'multipleUsers\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.USER_REQUIRED">User field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.ringgroup.timeout" min="0">\n                <div ng-messages="inboundrouteFormApp[\'timeout\'].$error" ng-show="inboundrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.ringgroup.options">\n                <div ng-messages="inboundrouteFormApp[\'options\'].$error" ng-show="inboundrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="url" ng-model="vm.ringgroup.url">\n                <div ng-messages="inboundrouteFormApp[\'url\'].$error" ng-show="inboundrouteFormApp[\'url\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/set/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.VARIABLE">Variable</label>\n                <md-select name="name" ng-model="vm.set.name" required autofocus>\n                    <md-option ng-value="name.name" ng-repeat="name in vm.variables">{{ name.name }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'name\'].$error" ng-show="inboundrouteFormApp[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.VARIABLE_REQUIRED">Variable field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.VALUE">Value</label>\n                <input type="text" name="value" ng-model="vm.set.value" ng-required="true">\n                <div ng-messages="inboundrouteFormApp[\'value\'].$error" ng-show="inboundrouteFormApp[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/voicemail/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.MAILBOX@CONTEXT">Mailbox@Context</label>\n                <md-select name="voiceMail" ng-model="vm.voicemail.voiceMail" required autofocus>\n                    <md-option ng-value="\'{{voiceMail.mailbox}}@from-voicemail\'" ng-repeat="voiceMail in vm.voiceMails">{{ voiceMail.mailbox }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'voiceMail\'].$error" ng-show="inboundrouteFormApp[\'voiceMail\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.MAILBOX@CONTEXT_REQUIRED">Mailbox@Context field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.voicemail.options">\n                <div ng-messages="inboundrouteFormApp[\'options\'].$error" ng-show="inboundrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/view.html",'<div id="voice-inboundroute" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-inboundroutes-button md-icon-button" aria-label="Go to inboundroutes" ng-click="vm.gotoInboundRoutes()" translate translate-attr-aria-label="VOICE.GO_TO_INBOUNDROUTES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="inboundroute-image" hide-xs>\n                    <img ng-src="assets/images/business/inboundroutes.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.inboundroute.id}}\n                        <span ng-if="vm.inboundroute.name">{{vm.inboundroute.name}}</span>\n                        <span ng-if="vm.inboundroute.exten">{{vm.inboundroute.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="VOICE.CREATED_AT"></span> <span>{{vm.inboundroute.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveInboundRoute()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (actionsForm.$invalid)" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="inboundroute-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="VOICE.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.PHONENUMBER">PhoneNumber</label>\n                                <input type="text" name="exten" ng-model="vm.inboundroute.exten" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'exten\'].$error" ng-show="generalForm[\'exten\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.PHONENUMBER_REQUIRED">PhoneNumber field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.CONTEXT">Context</label>\n                                <md-select name="context" ng-model="vm.inboundroute.context" required>\n                                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'context\'].$error" ng-show="generalForm[\'context\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.inboundroute.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.ACTIONS">ACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="inboundroute-detail-form-container actions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="InboundRouteActionsController as vm_ac" ng-init="vm_ac.init(vm.inboundroute)" class="content" md-background-bg layout="row" layout-align="start start">\n                            \x3c!-- SIDENAV --\x3e\n                            <div class="navigation-simple sidenav main-sidenav md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="20">\n                                \x3c!-- SIDENAV CONTENT --\x3e\n                                <md-list class="no-padding">\n                                    <md-subheader class="md-no-sticky">\n                                        <span translate="VOICE.APPLICATIONS_LIST">\n          Applications List\n        </span>\n                                    </md-subheader>\n                                </md-list>\n                                <md-divider></md-divider>\n                                <md-list ng-sortable="vm_ac.list">\n                                    <md-list-item class="handle" ng-repeat="a in vm_ac.apps">\n                                        <md-icon md-font-icon="{{a.icon}}" class="s16"></md-icon>\n                                        <p class="text-truncate" translate="VOICE.{{(a.alias || a.appType) | uppercase}}">{{a.alias || a.appType}}</p>\n                                    </md-list-item>\n                                </md-list>\n                                \x3c!-- / SIDENAV CONTENT --\x3e\n                            </div>\n                            \x3c!-- / SIDENAV --\x3e\n                            <div flex></div>\n                            \x3c!-- MAIN --\x3e\n                            <div class="main scrollable md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="75">\n                                <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_ac.selectedInboundRouteApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">Drag & Drop Routing</span>\n                                        <div flex></div>\n                                        <ms-search-bar on-search="vm_ac.query.filter = query" on-collapse="vm_ac.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    </div>\n                                </md-toolbar>\n                                <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_ac.selectedInboundRouteApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">{{vm_ac.selectedInboundRouteApps.length}} {{vm_ac.selectedInboundRouteApps.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                        <div flex></div>\n                                        <md-button ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_ac.deleteSelectedInboundRouteApps($event)" aria-label="delete selected" translate translate-attr-label="VOICE.DELETE_SELECTED">\n                                            <md-icon md-font-icon="icon-delete"></md-icon>\n                                        </md-button>\n                                    </div>\n                                </md-toolbar>\n\n                                \x3c!-- QUEUES TABLE --\x3e\n                                <md-table-container>\n                                    <table md-table md-row-select multiple ng-model="vm_ac.selectedInboundRouteApps">\n                                        <thead md-head>\n                                            <tr md-row>\n                                                <th md-column width="10px"></th>\n                                                <th md-column>\n                                                    <span>Type</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Appdata</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Interval</span>\n                                                </th>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px"></th>\n                                            </tr>\n                                        </thead>\n                                        <tbody md-body ng-sortable="vm_ac.applications">\n                                            <tr md-row md-select="app" md-select-id="id" ng-repeat="app in vm_ac.inboundrouteApps.rows | filter: vm_ac.query.filter">\n                                                <td md-cell>\n                                                    <md-icon md-font-icon="icon-drag-vertical" class="s16 handle"></md-icon>\n                                                </td>\n                                                <td md-cell ng-click="vm_ac.editInboundRouteApp($event, $index)">{{app.app.toLowerCase() === \'agi\' ? \'Cally-Square\' : app.app | ucfirst}}<span ng-if="app.appType.toLowerCase() === \'custom\'">*</span></td>\n                                                <td md-cell ng-click="vm_ac.editInboundRouteApp($event, $index)"><span class="text-truncate" style="width:200px">{{app.appdata}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editInterval($event, $index)">{{app.IntervalId ? \'From List\' : app.interval}}</td>\n                                                <td md-cell>\n                                                    <md-button ng-click="vm_ac.editInterval($event, $index)" class="md-icon-button" aria-label="Interval">\n                                                        <md-icon md-font-icon="icon-timer"></md-icon>\n                                                        <md-tooltip>\n                                                            {{app.IntervalId ? \'From List\' : (app.interval === \'*,*,*,*\' ? \'Always\' : \'Custom\')}}\n                                                        </md-tooltip>\n                                                    </md-button>\n                                                </td>\n                                                <td md-cell class="actions">\n                                                    <md-menu>\n                                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                        </md-button>\n\n                                                        <md-menu-content width="3">\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editInboundRouteApp($event, $index)" translate="VOICE.EDIT_APP">\n                                                                    Edit App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editInterval($event, $index)" translate="VOICE.EDIT_INTERVAL">\n                                                                    Edit Interval\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'">\n                                                                <md-button ng-click="vm_ac.deleteConfirm(app, $index, $event)" translate="VOICE.DELETE_APP">\n                                                                    Delete App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                        </md-menu-content>\n                                                    </md-menu>\n                                                </td>\n                                            </tr>\n                                            <tr md-row ng-hide="vm_ac.inboundrouteApps.rows.length">\n                                                <td md-cell colspan="6">\n                                                    <span class="text-boxed-ligth" translate="VOICE.NO_APPS_AVAILABLE">No apps available</span>\n                                                </td>\n                                            </tr>\n                                        </tbody>\n                                        <tfoot md-foot>\n                                            <tr md-row>\n                                                <td md-cell colspan="6">\n                                                    <span><em translate="VOICE.LEGEND.CUSTOM_APPLICATION">(*) - Custom application.</em></span>\n                                                </td>\n                                            </tr>\n                                        </tfoot>\n                                    </table>\n                                </md-table-container>\n                                \x3c!-- / QUEUES TABLE --\x3e\n\n                                \x3c!-- NO RESULTS --\x3e\n\n                                \x3c!-- / NO RESULTS --\x3e\n                            </div>\n                            \x3c!-- / MAIN --\x3e\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/voice/views/inboundroutes/inboundroutes.html",'<div id="inboundroutes" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-phone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="VOICE.INBOUNDROUTES">InboundRoutes</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="VOICE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedInboundRoutes.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedInboundRoutes =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="VOICE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-inboundroutes-count">\n                    <span>{{vm.selectedInboundRoutes.length}}</span>\n                <span translate="VOICE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="INBOUNDROUTES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllInboundRoutes()" translate="VOICE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectInboundRoutes()" translate="VOICE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedInboundRoutes" csv-label="true" filename="inboundroutes.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedInboundRoutes($event)" aria-label="delete selected" translate translate-attr-label="INBOUNDROUTES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- INBOUNDROUTE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedInboundRoutes" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getInboundRoutes">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'VOICE.ID\' | translate }}</th>\n                                <th md-column md-order-by="exten">{{ \'VOICE.PHONENUMBER\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'VOICE.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.inboundroutes.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="inboundroute" md-select-id="id" ng-repeat="inboundroute in vm.inboundroutes.rows">\n                                <td md-cell ng-if="inboundroute.userpic"><img class="avatar" alt="{{inboundroute.name}}" ng-src="api/users/{{inboundroute.id}}/avatar" /></td>\n                                <td md-cell ng-if="!inboundroute.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{inboundroute.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditInboundRoute($event, inboundroute)" md-cell class="id ">{{inboundroute.id}}</td>\n                                <td ng-click="vm.createOrEditInboundRoute($event, inboundroute)" md-cell class="exten ">{{inboundroute.exten}}</td>\n                                <td ng-click="vm.createOrEditInboundRoute($event, inboundroute)" md-cell class="description ">{{inboundroute.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(inboundroute, $event)" translate="VOICE.EDIT_INBOUNDROUTE">\n                                                    Edit InboundRoute\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(inboundroute, $event)" translate="VOICE.DELETE_INBOUNDROUTE">\n                                                    Delete InboundRoute\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.inboundroutes.count}}" md-on-paginate="vm.getInboundRoutes" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / INBOUNDROUTE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD INBOUNDROUTE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-inboundroute-button" ng-click="vm.createOrEditInboundRoute($event)" aria-label="add inboundroute" translate translate-attr-aria-label="VOICE.ADD_INBOUNDROUTE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD INBOUNDROUTE BUTTON --\x3e\n</div>'),e.put("app/main/apps/voice/views/internalroutes/create/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PHONENUMBER">PhoneNumber</label>\n                <input type="text" name="exten" ng-model="vm.internalroute.exten" ng-required="true" autofocus>\n                <div ng-messages="internalrouteForm[\'exten\'].$error" ng-show="internalrouteForm[\'exten\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PHONENUMBER_REQUIRED">PhoneNumber field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.CONTEXT">Context</label>\n                <md-select name="context" ng-model="vm.internalroute.context" required>\n                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteForm[\'context\'].$error" ng-show="internalrouteForm[\'context\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.internalroute.description">\n                <div ng-messages="internalrouteForm[\'description\'].$error" ng-show="internalrouteForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInternalRoute" ng-click="vm.saveInternalRoute()" class="send-button md-accent md-raised" ng-disabled="internalrouteForm.$invalid || internalrouteForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInternalRoute" ng-click="vm.addNewInternalRoute()" class="send-button md-accent md-raised" ng-disabled="internalrouteForm.$invalid" aria-label="ADD" translate="VOICE.ADD_INTERNALROUTE" translate-attr-aria-label="VOICE.ADD_INTERNALROUTE">\n                    ADD INTERNALROUTE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newInternalRoute" ng-click="vm.deleteInternalRoute($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/agi/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PROJECT">Project</label>\n                <md-select name="project" ng-model="vm.agi.project" required autofocus>\n                    <md-option ng-value="\'agi://127.0.0.1/square,{{project.name}}\'" ng-repeat="project in vm.projects">{{ project.name }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'project\'].$error" ng-show="internalrouteFormApp[\'project\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PROJECT_REQUIRED">Project field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/custom/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.APPLICATION_NAME">Application_Name</label>\n                <input type="text" name="app" ng-model="vm.custom.app" ng-required="true" autofocus>\n                <div ng-messages="internalrouteFormApp[\'app\'].$error" ng-show="internalrouteFormApp[\'app\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.APPLICATION_NAME_REQUIRED">Application_Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.ARGUMENTS">Arguments</label>\n                <input type="text" name="appdata" ng-model="vm.custom.appdata">\n                <div ng-messages="internalrouteFormApp[\'appdata\'].$error" ng-show="internalrouteFormApp[\'appdata\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.ARGUMENTS_REQUIRED">Arguments field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/dial/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TECHNOLOGY/RESOURCE">Technology/Resource</label>\n                <input type="text" name="tech" ng-model="vm.dial.tech" ng-required="true" autofocus>\n                <div ng-messages="internalrouteFormApp[\'tech\'].$error" ng-show="internalrouteFormApp[\'tech\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TECHNOLOGY/RESOURCE_REQUIRED">Technology/Resource field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.dial.timeout" min="0">\n                <div ng-messages="internalrouteFormApp[\'timeout\'].$error" ng-show="internalrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.dial.options">\n                <div ng-messages="internalrouteFormApp[\'options\'].$error" ng-show="internalrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="url" ng-model="vm.dial.url">\n                <div ng-messages="internalrouteFormApp[\'url\'].$error" ng-show="internalrouteFormApp[\'url\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/externaldial/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TRUNK">Trunk</label>\n                <md-select name="trunk" ng-model="vm.externaldial.trunk" required autofocus>\n                    <md-option ng-value="trunk.name" ng-repeat="trunk in vm.trunks">{{ trunk.name }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'trunk\'].$error" ng-show="internalrouteFormApp[\'trunk\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TRUNK_REQUIRED">Trunk field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PHONE">Phone</label>\n                <input type="text" name="phone" ng-model="vm.externaldial.phone">\n                <div ng-messages="internalrouteFormApp[\'phone\'].$error" ng-show="internalrouteFormApp[\'phone\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PHONE_REQUIRED">Phone field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.externaldial.timeout" min="0">\n                <div ng-messages="internalrouteFormApp[\'timeout\'].$error" ng-show="internalrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.externaldial.options">\n                <div ng-messages="internalrouteFormApp[\'options\'].$error" ng-show="internalrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="url" ng-model="vm.externaldial.url">\n                <div ng-messages="internalrouteFormApp[\'url\'].$error" ng-show="internalrouteFormApp[\'url\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/goto/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.CONTEXT">Context</label>\n                <md-select name="context" ng-model="vm.goto.context" required autofocus>\n                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'context\'].$error" ng-show="internalrouteFormApp[\'context\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.EXTENSION">Extension</label>\n                <input type="text" name="extension" ng-model="vm.goto.extension" ng-required="true">\n                <div ng-messages="internalrouteFormApp[\'extension\'].$error" ng-show="internalrouteFormApp[\'extension\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.EXTENSION_REQUIRED">Extension field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PRIORITY">Priority</label>\n                <input type="text" name="priority" ng-model="vm.goto.priority" ng-required="true">\n                <div ng-messages="internalrouteFormApp[\'priority\'].$error" ng-show="internalrouteFormApp[\'priority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PRIORITY_REQUIRED">Priority field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/hangup/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.HANGUP_CAUSE">Hangup_Cause</label>\n                <md-select name="appdata" ng-model="vm.hangup.appdata" required autofocus>\n\n                    <md-option ng-value="\'1\'"> {{ \'VOICE.HANGUPCAUSE_1\' | translate }}</md-option>\n\n                    <md-option ng-value="\'16\'"> {{ \'VOICE.HANGUPCAUSE_16\' | translate }}</md-option>\n\n                    <md-option ng-value="\'17\'"> {{ \'VOICE.HANGUPCAUSE_17\' | translate }}</md-option>\n\n                    <md-option ng-value="\'18\'"> {{ \'VOICE.HANGUPCAUSE_18\' | translate }}</md-option>\n\n                    <md-option ng-value="\'21\'"> {{ \'VOICE.HANGUPCAUSE_21\' | translate }}</md-option>\n\n                    <md-option ng-value="\'22\'"> {{ \'VOICE.HANGUPCAUSE_22\' | translate }}</md-option>\n\n                    <md-option ng-value="\'27\'"> {{ \'VOICE.HANGUPCAUSE_27\' | translate }}</md-option>\n\n                    <md-option ng-value="\'38\'"> {{ \'VOICE.HANGUPCAUSE_38\' | translate }}</md-option>\n\n                    <md-option ng-value="\'41\'"> {{ \'VOICE.HANGUPCAUSE_41\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'appdata\'].$error" ng-show="internalrouteFormApp[\'appdata\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.HANGUP_CAUSE_REQUIRED">Hangup_Cause field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/internaldial/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.USER">User</label>\n                <md-select name="user" ng-model="vm.internaldial.user" required autofocus>\n                    <md-option ng-value="\'SIP/{{user.name}}\'" ng-repeat="user in vm.users">{{ user.name }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'user\'].$error" ng-show="internalrouteFormApp[\'user\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.USER_REQUIRED">User field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.internaldial.timeout" min="0">\n                <div ng-messages="internalrouteFormApp[\'timeout\'].$error" ng-show="internalrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.internaldial.options">\n                <div ng-messages="internalrouteFormApp[\'options\'].$error" ng-show="internalrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="url" ng-model="vm.internaldial.url">\n                <div ng-messages="internalrouteFormApp[\'url\'].$error" ng-show="internalrouteFormApp[\'url\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/interval/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select ng-model="vm.type">\n                    <md-option ng-value="type" ng-repeat=\'type in vm.types\'>{{ type | ucfirst }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.type === \'list\'">\n                <label translate="TOOLS.INTERVALS">Intervals</label>\n                <md-select ng-model="vm.interval.IntervalId">\n                    <md-option ng-value="interval.id" ng-repeat="interval in vm.intervals.rows">{{ interval.name }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            \x3c!-- TIMERANGE START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.TIME_RANGE">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <div class="md-block" flex>\n                    <mdp-time-picker name="timeRangeFrom" mdp-placeholder="FROM" ng-model="vm.timeRangeFrom" mdp-format="HH:mm" mdp-auto-switch="true">\n                        <div ng-messages="intervalForm.timeRangeFrom.$error" ng-show="intervalForm.timeRangeFrom.$touched" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_FROM_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n                <div class="md-block" flex ng-if="vm.timeRangeFrom">\n                    <mdp-time-picker name="timeRangeTo" mdp-placeholder="TO*" ng-model="vm.timeRangeTo" mdp-format="HH:mm" mdp-auto-switch="true" required>\n                        <div ng-messages="intervalForm.timeRangeTo.$error" ng-show="intervalForm.timeRangeTo.$invalid" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_INVALID">Time Range To field is invalid</span>\n                            </div>\n                            <div ng-message="required">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_REQUIRED">Time Range To field is required</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n            \x3c!-- TIMERANGE END --\x3e\n\n            \x3c!-- DAYSOFWEEK START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.WEEK_DAYS">Week Days</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.dayOfWeekFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex class="md-block" ng-if="vm.dayOfWeekFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="dayOfWeekTo" ng-model="vm.dayOfWeekTo">\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.dayOfWeekTo.$error" ng-show="intervalForm.dayOfWeekTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- DAYSOFWEEK END --\x3e\n\n            \x3c!-- MONTHDAY START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTH_DAYS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthDayFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthDayFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthDayTo" ng-model="vm.monthDayTo">\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthDayTo.$error" ng-show="intervalForm.monthDayTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTHDAY END --\x3e\n\n            \x3c!-- MONTH START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTHS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthTo" ng-model="vm.monthTo">\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthTo.$error" ng-show="intervalForm.monthTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTH END --\x3e\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/playback/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.AUDIO_FILES">Audio_Files</label>\n                <md-select name="appdata" ng-model="vm.playback.appdata" required autofocus>\n                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/{{appdata.save_name}}\'" ng-repeat="appdata in vm.sounds">{{ appdata.name }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'appdata\'].$error" ng-show="internalrouteFormApp[\'appdata\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.AUDIO_FILES_REQUIRED">Audio_Files field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.playback.options">\n                <div ng-messages="internalrouteFormApp[\'options\'].$error" ng-show="internalrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.playback.answer" aria-label="Answer"><span translate="VOICE.ANSWER">Answer</span></md-switch>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/queue/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.QUEUE">Queue</label>\n                <md-select name="queue" ng-model="vm.queue.queue" required autofocus>\n                    <md-option ng-value="queue.name" ng-repeat="queue in vm.queues">{{ queue.name }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'queue\'].$error" ng-show="internalrouteFormApp[\'queue\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.QUEUE_REQUIRED">Queue field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.queue.options">\n                <div ng-messages="internalrouteFormApp[\'options\'].$error" ng-show="internalrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="URL" ng-model="vm.queue.URL">\n                <div ng-messages="internalrouteFormApp[\'URL\'].$error" ng-show="internalrouteFormApp[\'URL\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.ANNOUNCE_OVERRIDES">Announce_Overrides</label>\n                <md-select name="sound" ng-model="vm.queue.sound">\n                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/{{sound.save_name}}\'" ng-repeat="sound in vm.sounds">{{ sound.name }}</md-option>\n                    <md-option ng-value="\'\'">None</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'sound\'].$error" ng-show="internalrouteFormApp[\'sound\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.ANNOUNCE_OVERRIDES_REQUIRED">Announce_Overrides field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.queue.timeout" min="0">\n                <div ng-messages="internalrouteFormApp[\'timeout\'].$error" ng-show="internalrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.AGI">Agi</label>\n                <input type="text" name="agi" ng-model="vm.queue.agi">\n                <div ng-messages="internalrouteFormApp[\'agi\'].$error" ng-show="internalrouteFormApp[\'agi\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.AGI_REQUIRED">Agi field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.MACRO">Macro</label>\n                <input type="text" name="macro" ng-model="vm.queue.macro">\n                <div ng-messages="internalrouteFormApp[\'macro\'].$error" ng-show="internalrouteFormApp[\'macro\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.MACRO_REQUIRED">Macro field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.GOSUB">GoSub</label>\n                <input type="text" name="gosub" ng-model="vm.queue.gosub">\n                <div ng-messages="internalrouteFormApp[\'gosub\'].$error" ng-show="internalrouteFormApp[\'gosub\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.GOSUB_REQUIRED">GoSub field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.RULE">Rule</label>\n                <input type="text" name="rule" ng-model="vm.queue.rule">\n                <div ng-messages="internalrouteFormApp[\'rule\'].$error" ng-show="internalrouteFormApp[\'rule\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.RULE_REQUIRED">Rule field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.POSITION">Position</label>\n                <input type="number" name="position" ng-model="vm.queue.position" min="0">\n                <div ng-messages="internalrouteFormApp[\'position\'].$error" ng-show="internalrouteFormApp[\'position\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.POSITION_REQUIRED">Position field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.POSITION_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Position must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.queue.answer" aria-label="Answer"><span translate="VOICE.ANSWER">Answer</span></md-switch>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/ringgroup/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.USER">User</label>\n                <md-select name="multipleUsers" ng-model="vm.ringgroup.multipleUsers" required autofocus multiple>\n                    <md-option ng-value="\'SIP/{{multipleUsers.name}}\'" ng-repeat="multipleUsers in vm.users">{{ multipleUsers.name }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'multipleUsers\'].$error" ng-show="internalrouteFormApp[\'multipleUsers\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.USER_REQUIRED">User field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.ringgroup.timeout" min="0">\n                <div ng-messages="internalrouteFormApp[\'timeout\'].$error" ng-show="internalrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.ringgroup.options">\n                <div ng-messages="internalrouteFormApp[\'options\'].$error" ng-show="internalrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="url" ng-model="vm.ringgroup.url">\n                <div ng-messages="internalrouteFormApp[\'url\'].$error" ng-show="internalrouteFormApp[\'url\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/set/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.VARIABLE">Variable</label>\n                <md-select name="name" ng-model="vm.set.name" required autofocus>\n                    <md-option ng-value="name.name" ng-repeat="name in vm.variables">{{ name.name }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'name\'].$error" ng-show="internalrouteFormApp[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.VARIABLE_REQUIRED">Variable field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.VALUE">Value</label>\n                <input type="text" name="value" ng-model="vm.set.value" ng-required="true">\n                <div ng-messages="internalrouteFormApp[\'value\'].$error" ng-show="internalrouteFormApp[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/voicemail/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.MAILBOX@CONTEXT">Mailbox@Context</label>\n                <md-select name="voiceMail" ng-model="vm.voicemail.voiceMail" required autofocus>\n                    <md-option ng-value="\'{{voiceMail.mailbox}}@from-voicemail\'" ng-repeat="voiceMail in vm.voiceMails">{{ voiceMail.mailbox }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'voiceMail\'].$error" ng-show="internalrouteFormApp[\'voiceMail\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.MAILBOX@CONTEXT_REQUIRED">Mailbox@Context field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.voicemail.options">\n                <div ng-messages="internalrouteFormApp[\'options\'].$error" ng-show="internalrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/view.html",'<div id="voice-internalroute" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-internalroutes-button md-icon-button" aria-label="Go to internalroutes" ng-click="vm.gotoInternalRoutes()" translate translate-attr-aria-label="VOICE.GO_TO_INTERNALROUTES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="internalroute-image" hide-xs>\n                    <img ng-src="assets/images/business/internalroutes.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.internalroute.id}}\n                        <span ng-if="vm.internalroute.name">{{vm.internalroute.name}}</span>\n                        <span ng-if="vm.internalroute.exten">{{vm.internalroute.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="VOICE.CREATED_AT"></span> <span>{{vm.internalroute.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveInternalRoute()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (actionsForm.$invalid)" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="internalroute-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="VOICE.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.PHONENUMBER">PhoneNumber</label>\n                                <input type="text" name="exten" ng-model="vm.internalroute.exten" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'exten\'].$error" ng-show="generalForm[\'exten\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.PHONENUMBER_REQUIRED">PhoneNumber field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.CONTEXT">Context</label>\n                                <md-select name="context" ng-model="vm.internalroute.context" required>\n                                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'context\'].$error" ng-show="generalForm[\'context\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.internalroute.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.ACTIONS">ACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="internalroute-detail-form-container actions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="InternalRouteActionsController as vm_ac" ng-init="vm_ac.init(vm.internalroute)" class="content" md-background-bg layout="row" layout-align="start start">\n                            \x3c!-- SIDENAV --\x3e\n                            <div class="navigation-simple sidenav main-sidenav md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="20">\n                                \x3c!-- SIDENAV CONTENT --\x3e\n                                <md-list class="no-padding">\n                                    <md-subheader class="md-no-sticky">\n                                        <span translate="VOICE.APPLICATIONS_LIST">\n          Applications List\n        </span>\n                                    </md-subheader>\n                                </md-list>\n                                <md-divider></md-divider>\n                                <md-list ng-sortable="vm_ac.list">\n                                    <md-list-item class="handle" ng-repeat="a in vm_ac.apps">\n                                        <md-icon md-font-icon="{{a.icon}}" class="s16"></md-icon>\n                                        <p class="text-truncate" translate="VOICE.{{(a.alias || a.appType) | uppercase}}">{{a.alias || a.appType}}</p>\n                                    </md-list-item>\n                                </md-list>\n                                \x3c!-- / SIDENAV CONTENT --\x3e\n                            </div>\n                            \x3c!-- / SIDENAV --\x3e\n                            <div flex></div>\n                            \x3c!-- MAIN --\x3e\n                            <div class="main scrollable md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="75">\n                                <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_ac.selectedInternalRouteApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">Drag & Drop Routing</span>\n                                        <div flex></div>\n                                        <ms-search-bar on-search="vm_ac.query.filter = query" on-collapse="vm_ac.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    </div>\n                                </md-toolbar>\n                                <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_ac.selectedInternalRouteApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">{{vm_ac.selectedInternalRouteApps.length}} {{vm_ac.selectedInternalRouteApps.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                        <div flex></div>\n                                        <md-button ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_ac.deleteSelectedInternalRouteApps($event)" aria-label="delete selected" translate translate-attr-label="VOICE.DELETE_SELECTED">\n                                            <md-icon md-font-icon="icon-delete"></md-icon>\n                                        </md-button>\n                                    </div>\n                                </md-toolbar>\n\n                                \x3c!-- QUEUES TABLE --\x3e\n                                <md-table-container>\n                                    <table md-table md-row-select multiple ng-model="vm_ac.selectedInternalRouteApps">\n                                        <thead md-head>\n                                            <tr md-row>\n                                                <th md-column width="10px"></th>\n                                                <th md-column>\n                                                    <span>Type</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Appdata</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Interval</span>\n                                                </th>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px"></th>\n                                            </tr>\n                                        </thead>\n                                        <tbody md-body ng-sortable="vm_ac.applications">\n                                            <tr md-row md-select="app" md-select-id="id" ng-repeat="app in vm_ac.internalrouteApps.rows | filter: vm_ac.query.filter">\n                                                <td md-cell>\n                                                    <md-icon md-font-icon="icon-drag-vertical" class="s16 handle"></md-icon>\n                                                </td>\n                                                <td md-cell ng-click="vm_ac.editInternalRouteApp($event, $index)">{{app.app.toLowerCase() === \'agi\' ? \'Cally-Square\' : app.app | ucfirst}}<span ng-if="app.appType.toLowerCase() === \'custom\'">*</span></td>\n                                                <td md-cell ng-click="vm_ac.editInternalRouteApp($event, $index)"><span class="text-truncate" style="width:200px">{{app.appdata}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editInterval($event, $index)">{{app.IntervalId ? \'From List\' : app.interval}}</td>\n                                                <td md-cell>\n                                                    <md-button ng-click="vm_ac.editInterval($event, $index)" class="md-icon-button" aria-label="Interval">\n                                                        <md-icon md-font-icon="icon-timer"></md-icon>\n                                                        <md-tooltip>\n                                                            {{app.IntervalId ? \'From List\' : (app.interval === \'*,*,*,*\' ? \'Always\' : \'Custom\')}}\n                                                        </md-tooltip>\n                                                    </md-button>\n                                                </td>\n                                                <td md-cell class="actions">\n                                                    <md-menu>\n                                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                        </md-button>\n\n                                                        <md-menu-content width="3">\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editInternalRouteApp($event, $index)" translate="VOICE.EDIT_APP">\n                                                                    Edit App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editInterval($event, $index)" translate="VOICE.EDIT_INTERVAL">\n                                                                    Edit Interval\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'">\n                                                                <md-button ng-click="vm_ac.deleteConfirm(app, $index, $event)" translate="VOICE.DELETE_APP">\n                                                                    Delete App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                        </md-menu-content>\n                                                    </md-menu>\n                                                </td>\n                                            </tr>\n                                            <tr md-row ng-hide="vm_ac.internalrouteApps.rows.length">\n                                                <td md-cell colspan="6">\n                                                    <span class="text-boxed-ligth" translate="VOICE.NO_APPS_AVAILABLE">No apps available</span>\n                                                </td>\n                                            </tr>\n                                        </tbody>\n                                        <tfoot md-foot>\n                                            <tr md-row>\n                                                <td md-cell colspan="6">\n                                                    <span><em translate="VOICE.LEGEND.CUSTOM_APPLICATION">(*) - Custom application.</em></span>\n                                                </td>\n                                            </tr>\n                                        </tfoot>\n                                    </table>\n                                </md-table-container>\n                                \x3c!-- / QUEUES TABLE --\x3e\n\n                                \x3c!-- NO RESULTS --\x3e\n\n                                \x3c!-- / NO RESULTS --\x3e\n                            </div>\n                            \x3c!-- / MAIN --\x3e\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/voice/views/internalroutes/internalroutes.html",'<div id="internalroutes" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-phone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="VOICE.INTERNALROUTES">InternalRoutes</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="VOICE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedInternalRoutes.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedInternalRoutes =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="VOICE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-internalroutes-count">\n                    <span>{{vm.selectedInternalRoutes.length}}</span>\n                <span translate="VOICE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="INTERNALROUTES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllInternalRoutes()" translate="VOICE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectInternalRoutes()" translate="VOICE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedInternalRoutes" csv-label="true" filename="internalroutes.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedInternalRoutes($event)" aria-label="delete selected" translate translate-attr-label="INTERNALROUTES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- INTERNALROUTE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedInternalRoutes" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getInternalRoutes">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'VOICE.ID\' | translate }}</th>\n                                <th md-column md-order-by="exten">{{ \'VOICE.PHONENUMBER\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'VOICE.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.internalroutes.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="internalroute" md-select-id="id" ng-repeat="internalroute in vm.internalroutes.rows">\n                                <td md-cell ng-if="internalroute.userpic"><img class="avatar" alt="{{internalroute.name}}" ng-src="api/users/{{internalroute.id}}/avatar" /></td>\n                                <td md-cell ng-if="!internalroute.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{internalroute.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditInternalRoute($event, internalroute)" md-cell class="id ">{{internalroute.id}}</td>\n                                <td ng-click="vm.createOrEditInternalRoute($event, internalroute)" md-cell class="exten ">{{internalroute.exten}}</td>\n                                <td ng-click="vm.createOrEditInternalRoute($event, internalroute)" md-cell class="description ">{{internalroute.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(internalroute, $event)" translate="VOICE.EDIT_INTERNALROUTE">\n                                                    Edit InternalRoute\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(internalroute, $event)" translate="VOICE.DELETE_INTERNALROUTE">\n                                                    Delete InternalRoute\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.internalroutes.count}}" md-on-paginate="vm.getInternalRoutes" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / INTERNALROUTE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD INTERNALROUTE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-internalroute-button" ng-click="vm.createOrEditInternalRoute($event)" aria-label="add internalroute" translate translate-attr-aria-label="VOICE.ADD_INTERNALROUTE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD INTERNALROUTE BUTTON --\x3e\n</div>'),e.put("app/main/apps/voice/views/musiconholds/create/dialog.html",'<md-dialog class="musiconhold-dialog" aria-label="New MusicOnHold">\n    <form name="musiconholdForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.musiconhold.name" ng-required="true" autofocus ng-disabled="!vm.newMusicOnHold">\n                <div ng-messages="musiconholdForm[\'name\'].$error" ng-show="musiconholdForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.MODE">Mode</label>\n                <md-select name="mode" ng-model="vm.musiconhold.mode" required ng-disabled="!vm.newMusicOnHold">\n\n                    <md-option ng-value="\'files\'"> {{ \'VOICE.FILES\' | translate }}</md-option>\n\n                    <md-option ng-value="\'custom\'"> {{ \'VOICE.CUSTOM\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="musiconholdForm[\'mode\'].$error" ng-show="musiconholdForm[\'mode\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.MODE_REQUIRED">Mode field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.musiconhold.mode == \'custom\'" class="md-block">\n                <label translate="VOICE.DIRECTORY">Directory</label>\n                <input type="" name="directory" ng-model="vm.musiconhold.directory">\n                <div ng-messages="musiconholdForm[\'directory\'].$error" ng-show="musiconholdForm[\'directory\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.DIRECTORY_REQUIRED">Directory field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.musiconhold.mode == \'custom\'" class="md-block">\n                <label translate="VOICE.APPLICATION">Application</label>\n                <input type="text" name="application" ng-model="vm.musiconhold.application" ng-required="true">\n                <div ng-messages="musiconholdForm[\'application\'].$error" ng-show="musiconholdForm[\'application\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.APPLICATION_REQUIRED">Application field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.musiconhold.mode == \'files\'" class="md-block">\n                <label translate="VOICE.SORT">Sort</label>\n                <md-select name="sort" ng-model="vm.musiconhold.sort">\n\n                    <md-option ng-value="\'random\'"> {{ \'VOICE.RANDOM\' | translate }}</md-option>\n\n                    <md-option ng-value="\'alpha\'"> {{ \'VOICE.ALPHABETICAL\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="musiconholdForm[\'sort\'].$error" ng-show="musiconholdForm[\'sort\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.SORT_REQUIRED">Sort field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newMusicOnHold" ng-click="vm.saveMusicOnHold()" class="send-button md-accent md-raised" ng-disabled="musiconholdForm.$invalid || musiconholdForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newMusicOnHold" ng-click="vm.addNewMusicOnHold()" class="send-button md-accent md-raised" ng-disabled="musiconholdForm.$invalid" aria-label="ADD" translate="VOICE.ADD_MUSICONHOLD" translate-attr-aria-label="VOICE.ADD_MUSICONHOLD">\n                    ADD MUSICONHOLD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newMusicOnHold" ng-click="vm.deleteMusicOnHold($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/musiconholds/edit/mohSounds/dialog.html",'<md-dialog class="mohSound-dialog" aria-label="New MohSound">\n    <form name="mohSoundForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.FILE">File</label>\n                <md-select name="id" ng-model="vm.mohSound.id" autofocus>\n                    <md-option ng-value="id.id" ng-repeat="id in vm.sounds">{{ id.name }}</md-option>\n                </md-select>\n                <div ng-messages="mohSoundForm[\'id\'].$error" ng-show="mohSoundForm[\'id\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.FILE_REQUIRED">File field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newMohSound" ng-click="vm.saveMohSound()" class="send-button md-accent md-raised" ng-disabled="mohSoundForm.$invalid || mohSoundForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newMohSound" ng-click="vm.addNewMohSound()" class="send-button md-accent md-raised" ng-disabled="mohSoundForm.$invalid" aria-label="ADD" translate="VOICE.ADD_MOHSOUND" translate-attr-aria-label="VOICE.ADD_MOHSOUND">\n                    ADD MOHSOUND\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newMohSound" ng-click="vm.deleteMohSound($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/musiconholds/edit/view.html",'<div id="voice-musiconhold" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-musiconholds-button md-icon-button" aria-label="Go to musiconholds" ng-click="vm.gotoMusicOnHolds()" translate translate-attr-aria-label="VOICE.GO_TO_MUSICONHOLDS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="musiconhold-image" hide-xs>\n                    <img ng-src="assets/images/business/musiconholds.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.musiconhold.id}}\n                        <span ng-if="vm.musiconhold.name">{{vm.musiconhold.name}}</span>\n                        <span ng-if="vm.musiconhold.exten">{{vm.musiconhold.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="VOICE.CREATED_AT"></span> <span>{{vm.musiconhold.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveMusicOnHold()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (mohSoundsForm.$invalid)" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="musiconhold-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="VOICE.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.musiconhold.name" ng-required="true" autofocus ng-disabled="true">\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MODE">Mode</label>\n                                <md-select name="mode" ng-model="vm.musiconhold.mode" required ng-disabled="true">\n\n                                    <md-option ng-value="\'files\'"> {{ \'VOICE.FILES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'custom\'"> {{ \'VOICE.CUSTOM\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'mode\'].$error" ng-show="generalForm[\'mode\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MODE_REQUIRED">Mode field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.musiconhold.mode == \'custom\'" class="md-block">\n                                <label translate="VOICE.DIRECTORY">Directory</label>\n                                <input type="" name="directory" ng-model="vm.musiconhold.directory">\n                                <div ng-messages="generalForm[\'directory\'].$error" ng-show="generalForm[\'directory\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.DIRECTORY_REQUIRED">Directory field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.musiconhold.mode == \'custom\'" class="md-block">\n                                <label translate="VOICE.APPLICATION">Application</label>\n                                <input type="text" name="application" ng-model="vm.musiconhold.application" ng-required="true">\n                                <div ng-messages="generalForm[\'application\'].$error" ng-show="generalForm[\'application\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.APPLICATION_REQUIRED">Application field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.musiconhold.mode == \'files\'" class="md-block">\n                                <label translate="VOICE.SORT">Sort</label>\n                                <md-select name="sort" ng-model="vm.musiconhold.sort">\n\n                                    <md-option ng-value="\'random\'"> {{ \'VOICE.RANDOM\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'alpha\'"> {{ \'VOICE.ALPHABETICAL\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'sort\'].$error" ng-show="generalForm[\'sort\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.SORT_REQUIRED">Sort field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.AUDIOFILES">AUDIOFILES</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="musiconhold-detail-form-container mohsounds md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="MusicOnHoldMohSoundsController as vm_dc" ng-init="vm_dc.init(vm.musiconhold)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedMusicOnHoldMohSounds.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="VOICE.MOHSOUNDS">MohSounds</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditMusicOnHoldMohSound($event)" aria-label="add mohSound" translate translate-attr-label="VOICE.ADD_MOHSOUND">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedMusicOnHoldMohSounds.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedMusicOnHoldMohSounds.length}} {{vm_dc.selectedMusicOnHoldMohSounds.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedMusicOnHoldMohSounds" csv-label="true" filename="musiconholds.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedMusicOnHoldMohSounds($event)" aria-label="delete selected" translate translate-attr-label="MUSICONHOLDS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedMusicOnHoldMohSounds" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getMusicOnHoldMohSounds">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'VOICE.ID\' | translate }}</th>\n                                            <th md-column md-order-by="audio">{{ \'VOICE.AUDIO\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'VOICE.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="mohSound" md-select-id="id" ng-repeat="mohSound in vm_dc.musiconholdMohSounds.rows">\n                                            <td md-cell>{{mohSound.id}}</td>\n                                            <td md-cell>\n                                                \x3c!-- audio recording directive --\x3e\n                                                <ms-recording id="mohSound.id" model="\'sound\'"></ms-recording>\n                                                \x3c!-- / audio recording directive --\x3e\n                                            </td>\n                                            <td md-cell>{{mohSound.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button class="md-primary" ng-click="vm_dc.voiceMusicOnHoldDownload(mohSound, $event)" translate="VOICE.DOWNLOAD_MOHSOUND">\n                                                                Download MohSound\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(mohSound, $event)" translate="VOICE.DELETE_MOHSOUND">\n                                                                Delete MohSound\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.musiconholdMohSounds.rows.length">\n                                            <td md-cell colspan="8">\n                                                <span class="text-boxed-ligth" translate="VOICE.NO_MOHSOUND_AVAILABLE">No mohsound available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.musiconholdMohSounds.count}}" md-on-paginate="vm_dc.getMusicOnHoldMohSounds" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/voice/views/musiconholds/musiconholds.html",'<div id="musiconholds" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-phone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="VOICE.MUSICONHOLDS">MusicOnHolds</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="VOICE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedMusicOnHolds.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedMusicOnHolds =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="VOICE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-musiconholds-count">\n                    <span>{{vm.selectedMusicOnHolds.length}}</span>\n                <span translate="VOICE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="MUSICONHOLDS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllMusicOnHolds()" translate="VOICE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectMusicOnHolds()" translate="VOICE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedMusicOnHolds" csv-label="true" filename="musiconholds.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedMusicOnHolds($event)" aria-label="delete selected" translate translate-attr-label="MUSICONHOLDS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- MUSICONHOLD TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedMusicOnHolds" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getMusicOnHolds">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'VOICE.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'VOICE.NAME\' | translate }}</th>\n                                <th md-column md-order-by="mode">{{ \'VOICE.MODE\' | translate }}</th>\n                                <th md-column md-order-by="sort">{{ \'VOICE.SORT\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.musiconholds.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="musiconhold" md-select-id="id" ng-repeat="musiconhold in vm.musiconholds.rows">\n                                <td md-cell ng-if="musiconhold.userpic"><img class="avatar" alt="{{musiconhold.name}}" ng-src="api/users/{{musiconhold.id}}/avatar" /></td>\n                                <td md-cell ng-if="!musiconhold.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{musiconhold.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditMusicOnHold($event, musiconhold)" md-cell class="id ">{{musiconhold.id}}</td>\n                                <td ng-click="vm.createOrEditMusicOnHold($event, musiconhold)" md-cell class="name ">{{musiconhold.name}}</td>\n                                <td ng-click="vm.createOrEditMusicOnHold($event, musiconhold)" md-cell class="mode ">{{ \'VOICE.\' + vm.arraymode[musiconhold.mode].option | uppercase | translate }}</td>\n                                <td ng-click="vm.createOrEditMusicOnHold($event, musiconhold)" md-cell class="sort ">{{ \'VOICE.\' + vm.arraysort[musiconhold.sort].option | uppercase | translate }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(musiconhold, $event)" translate="VOICE.EDIT_MUSICONHOLD">\n                                                    Edit MusicOnHold\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(musiconhold, $event)" translate="VOICE.DELETE_MUSICONHOLD">\n                                                    Delete MusicOnHold\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.musiconholds.count}}" md-on-paginate="vm.getMusicOnHolds" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / MUSICONHOLD TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD MUSICONHOLD BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-musiconhold-button" ng-click="vm.createOrEditMusicOnHold($event)" aria-label="add musiconhold" translate translate-attr-aria-label="VOICE.ADD_MUSICONHOLD">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD MUSICONHOLD BUTTON --\x3e\n</div>'),e.put("app/main/apps/voice/views/outboundroutes/create/dialog.html",'<md-dialog class="outboundroute-dialog" aria-label="New OutboundRoute">\n    <form name="outboundrouteForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PHONENUMBER">PhoneNumber</label>\n                <input type="text" name="exten" ng-model="vm.outboundroute.exten" ng-required="true" autofocus>\n                <div ng-messages="outboundrouteForm[\'exten\'].$error" ng-show="outboundrouteForm[\'exten\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PHONENUMBER_REQUIRED">PhoneNumber field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.CONTEXT">Context</label>\n                <md-select name="context" ng-model="vm.outboundroute.context" required>\n                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                </md-select>\n                <div ng-messages="outboundrouteForm[\'context\'].$error" ng-show="outboundrouteForm[\'context\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.RECORDING">Recording</label>\n                <md-select name="recordingFormat" ng-model="vm.outboundroute.recordingFormat" required>\n                    <md-option ng-value="\'none\'">none</md-option>\n                    <md-option ng-value="\'wav\'">wav</md-option>\n                    <md-option ng-value="\'WAV\'">wav49</md-option>\n                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                </md-select>\n                <div class="hint"><span translate="VOICE.HELP.RECORDING"></span></div>\n                <div ng-messages="outboundrouteForm[\'recordingFormat\'].$error" ng-show="outboundrouteForm[\'recordingFormat\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.RECORDING_REQUIRED">Recording field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.CUTDIGITS">CutDigits</label>\n                <input type="number" name="cutdigits" ng-model="vm.outboundroute.cutdigits" min="0">\n                <div ng-messages="outboundrouteForm[\'cutdigits\'].$error" ng-show="outboundrouteForm[\'cutdigits\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.CUTDIGITS_REQUIRED">CutDigits field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.CUTDIGITS_MUST_BE_GREATER_THAN_OR_EQUAL_TO">CutDigits must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.outboundroute.description">\n                <div ng-messages="outboundrouteForm[\'description\'].$error" ng-show="outboundrouteForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newOutboundRoute" ng-click="vm.saveOutboundRoute()" class="send-button md-accent md-raised" ng-disabled="outboundrouteForm.$invalid || outboundrouteForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newOutboundRoute" ng-click="vm.addNewOutboundRoute()" class="send-button md-accent md-raised" ng-disabled="outboundrouteForm.$invalid" aria-label="ADD" translate="VOICE.ADD_OUTBOUNDROUTE" translate-attr-aria-label="VOICE.ADD_OUTBOUNDROUTE">\n                    ADD OUTBOUNDROUTE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newOutboundRoute" ng-click="vm.deleteOutboundRoute($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/outboundroutes/edit/apps/custom/dialog.html",'<md-dialog class="outboundroute-dialog" aria-label="New OutboundRoute">\n    <form name="outboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.APPLICATION_NAME">Application_Name</label>\n                <input type="text" name="app" ng-model="vm.custom.app" ng-required="true" autofocus>\n                <div ng-messages="outboundrouteFormApp[\'app\'].$error" ng-show="outboundrouteFormApp[\'app\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.APPLICATION_NAME_REQUIRED">Application_Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.ARGUMENTS">Arguments</label>\n                <input type="text" name="appdata" ng-model="vm.custom.appdata">\n                <div ng-messages="outboundrouteFormApp[\'appdata\'].$error" ng-show="outboundrouteFormApp[\'appdata\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.ARGUMENTS_REQUIRED">Arguments field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveOutboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="outboundrouteFormApp.$invalid || outboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/outboundroutes/edit/apps/interval/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select ng-model="vm.type">\n                    <md-option ng-value="type" ng-repeat=\'type in vm.types\'>{{ type | ucfirst }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.type === \'list\'">\n                <label translate="TOOLS.INTERVALS">Intervals</label>\n                <md-select ng-model="vm.interval.IntervalId">\n                    <md-option ng-value="interval.id" ng-repeat="interval in vm.intervals.rows">{{ interval.name }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            \x3c!-- TIMERANGE START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.TIME_RANGE">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <div class="md-block" flex>\n                    <mdp-time-picker name="timeRangeFrom" mdp-placeholder="FROM" ng-model="vm.timeRangeFrom" mdp-format="HH:mm" mdp-auto-switch="true">\n                        <div ng-messages="intervalForm.timeRangeFrom.$error" ng-show="intervalForm.timeRangeFrom.$touched" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_FROM_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n                <div class="md-block" flex ng-if="vm.timeRangeFrom">\n                    <mdp-time-picker name="timeRangeTo" mdp-placeholder="TO*" ng-model="vm.timeRangeTo" mdp-format="HH:mm" mdp-auto-switch="true" required>\n                        <div ng-messages="intervalForm.timeRangeTo.$error" ng-show="intervalForm.timeRangeTo.$invalid" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_INVALID">Time Range To field is invalid</span>\n                            </div>\n                            <div ng-message="required">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_REQUIRED">Time Range To field is required</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n            \x3c!-- TIMERANGE END --\x3e\n\n            \x3c!-- DAYSOFWEEK START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.WEEK_DAYS">Week Days</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.dayOfWeekFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex class="md-block" ng-if="vm.dayOfWeekFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="dayOfWeekTo" ng-model="vm.dayOfWeekTo">\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.dayOfWeekTo.$error" ng-show="intervalForm.dayOfWeekTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- DAYSOFWEEK END --\x3e\n\n            \x3c!-- MONTHDAY START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTH_DAYS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthDayFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthDayFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthDayTo" ng-model="vm.monthDayTo">\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthDayTo.$error" ng-show="intervalForm.monthDayTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTHDAY END --\x3e\n\n            \x3c!-- MONTH START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTHS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthTo" ng-model="vm.monthTo">\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthTo.$error" ng-show="intervalForm.monthTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTH END --\x3e\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/outboundroutes/edit/apps/outbounddial/dialog.html",'<md-dialog class="outboundroute-dialog" aria-label="New OutboundRoute">\n    <form name="outboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TRUNK">Trunk</label>\n                <md-select name="trunk" ng-model="vm.outbounddial.trunk" required autofocus>\n                    <md-option ng-value="trunk.name" ng-repeat="trunk in vm.trunks">{{ trunk.name }}</md-option>\n                </md-select>\n                <div ng-messages="outboundrouteFormApp[\'trunk\'].$error" ng-show="outboundrouteFormApp[\'trunk\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TRUNK_REQUIRED">Trunk field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.CALLER_ID">Caller_ID</label>\n                <input type="text" name="callerID" ng-model="vm.outbounddial.callerID">\n                <div ng-messages="outboundrouteFormApp[\'callerID\'].$error" ng-show="outboundrouteFormApp[\'callerID\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.CALLER_ID_REQUIRED">Caller_ID field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PREFIX">Prefix</label>\n                <input type="text" name="prefix" ng-model="vm.outbounddial.prefix">\n                <div ng-messages="outboundrouteFormApp[\'prefix\'].$error" ng-show="outboundrouteFormApp[\'prefix\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PREFIX_REQUIRED">Prefix field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TAGS">Tags</label>\n                <md-select name="tag" ng-model="vm.outbounddial.tag">\n                    <md-option ng-value="tag.name" ng-repeat="tag in vm.tags">{{ tag.name }}</md-option>\n                    <md-option ng-value="\'--\'">None</md-option>\n                </md-select>\n                <div ng-messages="outboundrouteFormApp[\'tag\'].$error" ng-show="outboundrouteFormApp[\'tag\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TAGS_REQUIRED">Tags field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.outbounddial.timeout" min="0">\n                <div ng-messages="outboundrouteFormApp[\'timeout\'].$error" ng-show="outboundrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.outbounddial.options">\n                <div ng-messages="outboundrouteFormApp[\'options\'].$error" ng-show="outboundrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="url" ng-model="vm.outbounddial.url">\n                <div ng-messages="outboundrouteFormApp[\'url\'].$error" ng-show="outboundrouteFormApp[\'url\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveOutboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="outboundrouteFormApp.$invalid || outboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/outboundroutes/edit/view.html",'<div id="voice-outboundroute" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-outboundroutes-button md-icon-button" aria-label="Go to outboundroutes" ng-click="vm.gotoOutboundRoutes()" translate translate-attr-aria-label="VOICE.GO_TO_OUTBOUNDROUTES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="outboundroute-image" hide-xs>\n                    <img ng-src="assets/images/business/outboundroutes.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.outboundroute.id}}\n                        <span ng-if="vm.outboundroute.name">{{vm.outboundroute.name}}</span>\n                        <span ng-if="vm.outboundroute.exten">{{vm.outboundroute.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="VOICE.CREATED_AT"></span> <span>{{vm.outboundroute.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveOutboundRoute()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (actionsForm.$invalid)" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="outboundroute-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="VOICE.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.PHONENUMBER">PhoneNumber</label>\n                                <input type="text" name="exten" ng-model="vm.outboundroute.exten" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'exten\'].$error" ng-show="generalForm[\'exten\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.PHONENUMBER_REQUIRED">PhoneNumber field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.CONTEXT">Context</label>\n                                <md-select name="context" ng-model="vm.outboundroute.context" required>\n                                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'context\'].$error" ng-show="generalForm[\'context\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.RECORDING">Recording</label>\n                                <md-select name="recordingFormat" ng-model="vm.outboundroute.recordingFormat" required>\n                                    <md-option ng-value="\'none\'">none</md-option>\n                                    <md-option ng-value="\'wav\'">wav</md-option>\n                                    <md-option ng-value="\'WAV\'">wav49</md-option>\n                                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.RECORDING"></span></div>\n                                <div ng-messages="generalForm[\'recordingFormat\'].$error" ng-show="generalForm[\'recordingFormat\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.RECORDING_REQUIRED">Recording field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.CUTDIGITS">CutDigits</label>\n                                <input type="number" name="cutdigits" ng-model="vm.outboundroute.cutdigits" min="0">\n                                <div ng-messages="generalForm[\'cutdigits\'].$error" ng-show="generalForm[\'cutdigits\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.CUTDIGITS_REQUIRED">CutDigits field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.CUTDIGITS_MUST_BE_GREATER_THAN_OR_EQUAL_TO">CutDigits must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.outboundroute.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.ACTIONS">ACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="outboundroute-detail-form-container actions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="OutboundRouteActionsController as vm_ac" ng-init="vm_ac.init(vm.outboundroute)" class="content" md-background-bg layout="row" layout-align="start start">\n                            \x3c!-- SIDENAV --\x3e\n                            <div class="navigation-simple sidenav main-sidenav md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="20">\n                                \x3c!-- SIDENAV CONTENT --\x3e\n                                <md-list class="no-padding">\n                                    <md-subheader class="md-no-sticky">\n                                        <span translate="VOICE.APPLICATIONS_LIST">\n          Applications List\n        </span>\n                                    </md-subheader>\n                                </md-list>\n                                <md-divider></md-divider>\n                                <md-list ng-sortable="vm_ac.list">\n                                    <md-list-item class="handle" ng-repeat="a in vm_ac.apps">\n                                        <md-icon md-font-icon="{{a.icon}}" class="s16"></md-icon>\n                                        <p class="text-truncate" translate="VOICE.{{(a.alias || a.appType) | uppercase}}">{{a.alias || a.appType}}</p>\n                                    </md-list-item>\n                                </md-list>\n                                \x3c!-- / SIDENAV CONTENT --\x3e\n                            </div>\n                            \x3c!-- / SIDENAV --\x3e\n                            <div flex></div>\n                            \x3c!-- MAIN --\x3e\n                            <div class="main scrollable md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="75">\n                                <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_ac.selectedOutboundRouteApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">Drag & Drop Routing</span>\n                                        <div flex></div>\n                                        <ms-search-bar on-search="vm_ac.query.filter = query" on-collapse="vm_ac.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    </div>\n                                </md-toolbar>\n                                <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_ac.selectedOutboundRouteApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">{{vm_ac.selectedOutboundRouteApps.length}} {{vm_ac.selectedOutboundRouteApps.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                        <div flex></div>\n                                        <md-button ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_ac.deleteSelectedOutboundRouteApps($event)" aria-label="delete selected" translate translate-attr-label="VOICE.DELETE_SELECTED">\n                                            <md-icon md-font-icon="icon-delete"></md-icon>\n                                        </md-button>\n                                    </div>\n                                </md-toolbar>\n\n                                \x3c!-- QUEUES TABLE --\x3e\n                                <md-table-container>\n                                    <table md-table md-row-select multiple ng-model="vm_ac.selectedOutboundRouteApps">\n                                        <thead md-head>\n                                            <tr md-row>\n                                                <th md-column width="10px"></th>\n                                                <th md-column>\n                                                    <span>Type</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Appdata</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Interval</span>\n                                                </th>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px"></th>\n                                            </tr>\n                                        </thead>\n                                        <tbody md-body ng-sortable="vm_ac.applications">\n                                            <tr md-row md-select="app" md-select-id="id" ng-repeat="app in vm_ac.outboundrouteApps.rows | filter: vm_ac.query.filter">\n                                                <td md-cell>\n                                                    <md-icon md-font-icon="icon-drag-vertical" class="s16 handle"></md-icon>\n                                                </td>\n                                                <td md-cell ng-click="vm_ac.editOutboundRouteApp($event, $index)">{{app.app.toLowerCase() === \'agi\' ? \'Cally-Square\' : app.app | ucfirst}}<span ng-if="app.appType.toLowerCase() === \'custom\'">*</span></td>\n                                                <td md-cell ng-click="vm_ac.editOutboundRouteApp($event, $index)"><span class="text-truncate" style="width:200px">{{app.appdata}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editInterval($event, $index)">{{app.IntervalId ? \'From List\' : app.interval}}</td>\n                                                <td md-cell>\n                                                    <md-button ng-click="vm_ac.editInterval($event, $index)" class="md-icon-button" aria-label="Interval">\n                                                        <md-icon md-font-icon="icon-timer"></md-icon>\n                                                        <md-tooltip>\n                                                            {{app.IntervalId ? \'From List\' : (app.interval === \'*,*,*,*\' ? \'Always\' : \'Custom\')}}\n                                                        </md-tooltip>\n                                                    </md-button>\n                                                </td>\n                                                <td md-cell class="actions">\n                                                    <md-menu>\n                                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                        </md-button>\n\n                                                        <md-menu-content width="3">\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editOutboundRouteApp($event, $index)" translate="VOICE.EDIT_APP">\n                                                                    Edit App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editInterval($event, $index)" translate="VOICE.EDIT_INTERVAL">\n                                                                    Edit Interval\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'">\n                                                                <md-button ng-click="vm_ac.deleteConfirm(app, $index, $event)" translate="VOICE.DELETE_APP">\n                                                                    Delete App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                        </md-menu-content>\n                                                    </md-menu>\n                                                </td>\n                                            </tr>\n                                            <tr md-row ng-hide="vm_ac.outboundrouteApps.rows.length">\n                                                <td md-cell colspan="6">\n                                                    <span class="text-boxed-ligth" translate="VOICE.NO_APPS_AVAILABLE">No apps available</span>\n                                                </td>\n                                            </tr>\n                                        </tbody>\n                                        <tfoot md-foot>\n                                            <tr md-row>\n                                                <td md-cell colspan="6">\n                                                    <span><em translate="VOICE.LEGEND.CUSTOM_APPLICATION">(*) - Custom application.</em></span>\n                                                </td>\n                                            </tr>\n                                        </tfoot>\n                                    </table>\n                                </md-table-container>\n                                \x3c!-- / QUEUES TABLE --\x3e\n\n                                \x3c!-- NO RESULTS --\x3e\n\n                                \x3c!-- / NO RESULTS --\x3e\n                            </div>\n                            \x3c!-- / MAIN --\x3e\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/voice/views/outboundroutes/outboundroutes.html",'<div id="outboundroutes" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-phone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="VOICE.OUTBOUNDROUTES">OutboundRoutes</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="VOICE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedOutboundRoutes.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedOutboundRoutes =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="VOICE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-outboundroutes-count">\n                    <span>{{vm.selectedOutboundRoutes.length}}</span>\n                <span translate="VOICE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="OUTBOUNDROUTES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllOutboundRoutes()" translate="VOICE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectOutboundRoutes()" translate="VOICE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedOutboundRoutes" csv-label="true" filename="outboundroutes.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedOutboundRoutes($event)" aria-label="delete selected" translate translate-attr-label="OUTBOUNDROUTES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- OUTBOUNDROUTE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedOutboundRoutes" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getOutboundRoutes">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'VOICE.ID\' | translate }}</th>\n                                <th md-column md-order-by="exten">{{ \'VOICE.PHONENUMBER\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'VOICE.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.outboundroutes.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="outboundroute" md-select-id="id" ng-repeat="outboundroute in vm.outboundroutes.rows">\n                                <td md-cell ng-if="outboundroute.userpic"><img class="avatar" alt="{{outboundroute.name}}" ng-src="api/users/{{outboundroute.id}}/avatar" /></td>\n                                <td md-cell ng-if="!outboundroute.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{outboundroute.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditOutboundRoute($event, outboundroute)" md-cell class="id ">{{outboundroute.id}}</td>\n                                <td ng-click="vm.createOrEditOutboundRoute($event, outboundroute)" md-cell class="exten ">{{outboundroute.exten}}</td>\n                                <td ng-click="vm.createOrEditOutboundRoute($event, outboundroute)" md-cell class="description ">{{outboundroute.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(outboundroute, $event)" translate="VOICE.EDIT_OUTBOUNDROUTE">\n                                                    Edit OutboundRoute\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(outboundroute, $event)" translate="VOICE.DELETE_OUTBOUNDROUTE">\n                                                    Delete OutboundRoute\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.outboundroutes.count}}" md-on-paginate="vm.getOutboundRoutes" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / OUTBOUNDROUTE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD OUTBOUNDROUTE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-outboundroute-button" ng-click="vm.createOrEditOutboundRoute($event)" aria-label="add outboundroute" translate translate-attr-aria-label="VOICE.ADD_OUTBOUNDROUTE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD OUTBOUNDROUTE BUTTON --\x3e\n</div>'),e.put("app/main/apps/voice/views/realtime/abandonedcalls/view.html",'<md-toolbar class="md-table-toolbar md-default table-header">\n    <div class="md-toolbar-tools" layout="row" layout-align="center center">\n        <span class="md-subhead" translate="DASHBOARDS.ABANDONEDQUEUECALLS">ABANDONED QUEUE CALLS</span>\n        <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n        <div flex></div>\n        <div class="padding-horizontal-20" layout="column" layout-align="center center">\n            <span class="font-size-10" translate="DASHBOARDS.SELECT_DATE">Select a date</span>\n            <div layout="row" layout-align="center center">\n                <md-button ng-if="vm.pickerModel.dateStart" ng-click="vm.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                    <md-tooltip>{{ \'DASHBOARDS.DELETE\' | translate }}</md-tooltip>\n                    <md-icon md-font-icon="icon-close" class="s16 black-fg"></md-icon>\n                </md-button>\n                <md-date-range localization-map="vm.localizationMap" ng-model="vm.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm.getContacts()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n            </div>\n        </div>\n        <div class="padding-horizontal-20" layout="column">\n            <span class="font-size-10" translate="DASHBOARDS.SELECT_AGENT">Select an agent</span>\n            <md-select class="font-size-12 no-margin" ng-model="vm.query.lastAssignedTo" ng-change="vm.getContacts()">\n                <md-option ng-value="\'null\'" translate="DASHBOARDS.NOT_ASSIGNED"></md-option>\n                <md-option ng-value="undefined" translate="DASHBOARDS.ALL"></md-option>\n                <md-option ng-value="agent.name" ng-repeat="agent in vm.agents.rows">{{agent.name}}</md-option>\n            </md-select>\n        </div>\n        <div ng-if="vm.queues.count" layout="column">\n            <span class="font-size-10" translate="DASHBOARDS.SELECT_CAMPAIGN">Select a Campaign</span>\n            <md-select class="font-size-12 no-margin" ng-model="vm.query.queue" ng-change="vm.getContacts()">\n                <md-option ng-value="undefined" ng-if="vm.queues.count > 1"><em translate="DASHBOARDS.ALL">All</em></md-option>\n                <md-option ng-value="queue.name" ng-repeat="queue in vm.queues.rows">{{queue.name}}</md-option>\n            </md-select>\n        </div>\n        <md-button class="md-icon-button" ng-click="vm.refresh && vm.refreshContacts($event)" aria-label="refresh Contacts" translate translate-attr-label="DASHBOARDS.REFRESH_CONTACTS">\n            <md-icon md-font-icon="icon-reload"></md-icon>\n            <md-tooltip ng-if="vm.showTooltip" md-visible="vm.showTooltip">{{\'DASHBOARDS.CLICKRELOAD\' | translate}}</md-tooltip>\n        </md-button>\n    </div>\n</md-toolbar>\n<md-table-container>\n    <table md-table md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getContacts">\n            <tr md-row>\n                <th md-column md-order-by="id">ID</th>\n                <th md-column md-order-by="calleridname">{{\'DASHBOARDS.FULLNAME\' | translate}}</th>\n                <th md-column md-order-by="calleridnum">{{\'DASHBOARDS.PHONE\' | translate}}</th>\n                <th md-column md-order-by="queue">{{\'DASHBOARDS.QUEUE\' | translate}}</th>\n                <th md-column md-order-by="queuecallerabandonAt">{{\'DASHBOARDS.ABANDONAT\' | translate}}</th>\n                <th md-column md-order-by="lastAssignedTo">{{\'DASHBOARDS.LASTASSIGNEDTO\' | translate}}</th>\n                <th md-column md-order-by="disposition">{{\'DASHBOARDS.DISPOSITION\' | translate}}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.contacts.rows.length">\n                <td md-cell colspan="10">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row ng-repeat="contact in vm.contacts.rows">\n                <td md-cell class="id">{{contact.id}}</td>\n                <td md-cell class="firstName">{{contact.calleridname}}</td>\n                <td md-cell class="list">{{contact.calleridnum}}</td>\n                <td md-cell class="list">{{vm.queuesMap[contact.queue]}}</td>\n                <td md-cell class="list">{{contact.queuecallerabandonAt ? (contact.queuecallerabandonAt | formatdate) : undefined }}</td>\n                <td md-cell class="list">{{contact.lastAssignedTo}}</td>\n                <td md-cell class="list">{{contact.disposition}}</td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="2">\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="DASHBOARDS.ASSIGNTO">Assigned a</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item ng-if="contact.lastAssignedTo">\n                                            <md-button ng-click="vm.assignedA(contact)"><em translate="DASHBOARDS.NONE">Not Assigned</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.agents.rows.length" ng-repeat="agent in vm.agents.rows">\n                                            <md-button ng-click="vm.assignedA(contact,agent)">{{agent.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="DASHBOARDS.DISPOSE">Dispose</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, null)"><em translate="DASHBOARDS.NONE">NONE</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'fax\')"><em translate="DASHBOARDS.FAX">FAX</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'Answer Machine\')"><em translate="DASHBOARDS.ANSWER_MACHINE">ANSWER_MACHINE</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'Interested\')"><em translate="DASHBOARDS.INTERESTED">INTERESTED</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'Not Interested\')"><em translate="DASHBOARDS.NOT_INTERESTED">NOT_INTERESTED</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'Sold\')"><em translate="DASHBOARDS.SOLD">SOLD</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'Special\')"><em translate="DASHBOARDS.SPECIAL">SPECIAL</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.disposition.length" ng-repeat="disposition in vm.disposition">\n                                            <md-button ng-click="vm.disposed(contact, disposition.name)">{{disposition.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.contacts.count}}" md-on-paginate="vm.getContacts" md-page-select></md-table-pagination>'),e.put("app/main/apps/voice/views/realtime/agents/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="VOICE.AGENTS">Agents</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query; vm.onInit()" on-collapse="vm.query.filter = undefined; vm.onInit()" debounce="300"></ms-search-bar>\n        \x3c!-- <md-button class="md-icon-button" ng-click="vm.showInfo($event)">\n      <i class="icon-information-outline grey-600-fg">\n        <md-tooltip>{{\'VOICE.INFO\' | translate}}</md-tooltip>\n      </i>\n    </md-button> --\x3e\n        <md-select ng-model="vm.query.globalStatusFilter" class="md-caption" ng-change="vm.query.pauseTypeFilter = \'\'; vm.onInit()">\n            <md-option ng-value="\'\'">{{ \'VOICE.ALL\' | translate }}</md-option>\n            <md-option value="pause">{{ \'VOICE.PAUSE\' | translate }}</md-option>\n            <md-option value="*pause">{{ \'VOICE.PARTIALPAUSE\' | translate }}</md-option>\n            <md-option value="busy">{{ \'VOICE.BUSY\' | translate }}</md-option>\n            <md-option value="idle">{{ \'VOICE.IDLE\' | translate }}</md-option>\n        </md-select>\n\n        <md-select ng-if="vm.isPause(vm.query.globalStatusFilter)" ng-model="vm.query.pauseTypeFilter" class="md-caption" ng-change="vm.onInit()">\n            <md-option ng-value="\'\'">All</md-option>\n            <md-option value="DEFAULT PAUSE">DEFAULT PAUSE</md-option>\n            <md-option value="ACW">ACW</md-option>\n            <md-option value="LOGININPAUSE">LOGININPAUSE</md-option>\n            <md-option value="Auto-Pause">AUTOPAUSE</md-option>\n            <md-option ng-value="pause.name" ng-repeat="pause in vm.pauses.rows">{{pause.name}}</md-option>\n        </md-select>\n    </div>\n</md-toolbar>\n\n\x3c!-- AGENT TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.order" md-on-reorder="vm.onInit">\n            <tr md-row border="1">\n                <th class="bv text-center" colspan="3">{{ \'VOICE.AGENT\' | translate }}</th>\n                <th class="bv bl text-center" colspan="2">{{ \'VOICE.VOICE\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="bv bl text-center" colspan="2">{{ \'CHAT.CHAT\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="bv bl text-center" colspan="2">{{ \'MAIL.MAIL\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="bv bl text-center" colspan="2">{{ \'SMS.SMS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="bv bl text-center" colspan="2">{{ \'OPENCHANNEL.OPENCHANNEL\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="bv bl text-center" colspan="2">{{ \'FAX.FAX\' | translate }}</th>\n                <th width="10px" class="bt bl" rowspan="2"></th>\n                \x3c!-- <th md-column>{{ \'VOICE.PHONE_STATE\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PHONE_STATUS\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PAUSE\' | translate }}</th>\n                <th md-column width="10px"></th> --\x3e\n            </tr>\n            <tr md-row>\n                <th class="bl" md-column md-order-by="fullname">{{ \'VOICE.NAME\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatus">{{ \'VOICE.STATUS\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatusTime">{{ \'VOICE.TIMER\' | translate }}</th>\n\n                <th class="bl custom-column">{{ \'VOICE.STATUS\' | translate }}</th>\n                <th class="bl custom-column">Info</th>\n\n                <th ng-if="vm.license.chat" class="bl text-center">{{ \'CHAT.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'CHAT.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.mail" class="bl text-center">{{ \'MAIL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'MAIL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.messaging" class="bl text-center">{{ \'SMS.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'SMS.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.openchannel" class="bl text-center">{{ \'OPENCHANNEL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'OPENCHANNEL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.fax" class="bl text-center">{{ \'FAX.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'FAX.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.order.length">\n                <td md-cell colspan="17">\n                    <div layout="row" layout-align="center center">\n                        <span>{{ \'VOICE.NO_AGENT_ONLINE\' | translate }}</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-select="vm.agents[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td class="bt padding-5">\n                    <div layout="row" layout-align="start center">\n                        <img class="avatar" ng-src="{{vm.agents[value].userpic && \'api/users/\'+vm.agents[value].id+\'/avatar\' || \'assets/images/avatars/profile.png\'}}">\n                        <div layout="column">\n                            <span>{{vm.agents[value].fullname}}</span>\n                            <span>{{vm.agents[value].internal}}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt">\n                    <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'busy\':\'indigo-100-bg\',\'*pause\':\'amber-50-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].globalStatus]">{{ vm.isPause(vm.agents[value].globalStatus) ? \'\' : vm.agents[value].globalStatus | uppercase }} {{ vm.isPause(vm.agents[value].globalStatus) ? (vm.isPartialPause(vm.agents[value].globalStatus) ? \'*\'+vm.agents[value].pauseType || \'DEFAULT PAUSE\'  : vm.agents[value].pauseType || \'DEFAULT PAUSE\') : \'\'}}</span>\n                </td>\n                <td class="bt custom-column">\n                    <timer start-time="vm.agents[value].globalStatusTime" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                </td>\n                <td class="bt bl">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'talking\':\'indigo-100-bg\',\'ringing\':\'orange-400-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].voiceStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt bl">\n                    <div layout="column">\n                        <span ng-if="vm.agents[value].queue" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].queue }}</span>\n                        <span ng-if="vm.agents[value].destconnectedlinenum" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].destconnectedlinenum }}</span>\n                        <span class="padding-5" ng-if="vm.agents[value].queue || vm.agents[value].destconnectedlinenum">\n                            <timer start-time="vm.agents[value].voiceStatusTime" interval="1000" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                        </span>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt">--</td>\n                <td class="bt">--</td> --\x3e\n                <td class="bt bl" ng-if="vm.license.chat">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt padding-5 text-center">{{ agent.chatCurrentCapacity }}/{{ agent.chatCapacity > 0 ? agent.chatCapacity : \'∞\' }}</td> --\x3e\n                <td md-number class="bt text-center font-size-20" ng-if="vm.license.chat" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.mail">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.mail" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.messaging">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.messaging" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.openchannel">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">4</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">89</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.openchannel" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.fax">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">7</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">2</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.fax" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxCurrentCapacity }}</td>\n                <td class="bl bt padding-5 text-center">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="4">\n                            <md-menu-item>\n                                <md-button ng-click="vm.logout(vm.agents[value], $event)" translate="VOICE.LOGOUT">\n                                    Logout\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.queueAdd(vm.agents[value], $event)" translate="VOICE.AGENTADD_QUEUE">\n                                    Add Agent In Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="VOICE.PAUSE">Pause</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item>\n                                            <md-button ng-disabled=" vm.agents[value].voicePause && \'DEFAULT PAUSE\' === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value])"><em translate="VOICE.DEFAULT_PAUSE">Default Pause</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.pauses.rows.length" ng-repeat="pause in vm.pauses.rows">\n                                            <md-button ng-disabled="vm.agents[value].voicePause && pause.name === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value], pause.name)">{{pause.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                            <md-menu-item ng-if="vm.isPause(vm.agents[value].globalStatus)">\n                                <md-button ng-click="vm.unPause(vm.agents[value])" translate="VOICE.UNPAUSE">\n                                    Unpause\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.filteredAgents.length}}" md-on-paginate="vm.onInit" md-page-select></md-table-pagination>\n\x3c!-- / AGENT TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/voice/views/realtime/outbound_calls/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="VOICE.OUTBOUND_CALLS">Ooutbound Calls</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- OUTBOUNDS TABLE --\x3e\n<md-table-container>\n    <table md-table>\n        <thead md-head>\n            <tr md-row>\n                <th md-column width="30px"></th>\n                <th md-column>{{ \'VOICE.SOURCE\' | translate }}</th>\n                <th md-column>{{ \'VOICE.DESTINATION\' | translate }}</th>\n                <th md-column>{{ \'VOICE.DURATION\' | translate }}</th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.calls.rows.length">\n                <td md-cell colspan="4">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row ng-repeat="call in vm.calls.rows | filter: vm.query.filter | limitTo: vm.query.limit: (vm.query.page - 1) * vm.query.limit">\n                <td md-cell>\n                    <i ng-class="vm.channelStatus[call.channelstatedesc.toLowerCase()]"></i>\n                </td>\n                <td md-cell>\n                    {{call.calleridname}}, {{call.calleridnum}} <span class="text-boxed" ng-if="call.answered"><timer ng-if="call.answertime" start-time="call.answertime" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer></span>\n                </td>\n                <td md-cell>{{call.exten}}</td>\n                <td md-cell>\n                    <span class="text-boxed" ng-if="call.channelstatedesc.toLowerCase() !== \'hangup\'">\n                      <timer ng-if="call.starttime" start-time="call.starttime" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                    </span>\n                    <span class="text-boxed" ng-if="call.channelstatedesc.toLowerCase() === \'hangup\'" translate="VOICE.CLOSING">Closing</span>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.calls.count}}"></md-table-pagination>\n\x3c!-- / OUTBOUNDS TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/voice/views/realtime/queue_calls/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="VOICE.QUEUE_CALLS">Queue Calls</span>\n        \x3c!-- <div flex></div>\n    <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar> --\x3e\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUES TABLE --\x3e\n<md-table-container>\n    <table md-table>\n        <thead md-head>\n            <tr md-row>\n                <th md-column width="30px"></th>\n                <th md-column>{{ \'VOICE.DID\' | translate }}</th>\n                <th md-column>{{ \'VOICE.QUEUE\' | translate }}</th>\n                <th md-column>{{ \'VOICE.CALLER\' | translate }}</th>\n                <th md-column>{{ \'VOICE.AGENT\' | translate }}</th>\n                <th md-column>{{ \'VOICE.DURATION\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.getSize(vm.rpcVoiceQueuesChannels)">\n                <td md-cell colspan="6">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row ng-repeat="(key, channel) in vm.rpcVoiceQueuesChannels | limitObjectFromTo: vm.queryChannels.limit:(vm.queryChannels.page - 1) * vm.queryChannels.limit">\n                <td md-cell>\n                    <md-icon ng-if="channel.queuecallerleaveAt" md-font-icon="icon-phone-in-talk green-fg"></md-icon>\n                    <md-icon ng-if="!channel.queuecallerleaveAt" md-font-icon="icon-phone-incoming md-accent"></md-icon>\n                </td>\n                <td md-cell>{{channel.exten}}</td>\n                <td md-cell>{{channel.queue}}</td>\n                <td md-cell>{{channel.calleridnum}}</td>\n                <td md-cell>\n                    <span ng-if="channel.queuecallerleaveAt">\n              {{channel.connectedlinename}}, {{channel.connectedlinenum}}\n              <span class="text-boxed">\n                <timer start-time="channel.queuecallerleaveAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n              </span>\n                    </span>\n                    <span ng-if="!channel.queuecallerleaveAt" class="text-boxed">\n              {{ \'VOICE.WAITING_FOR_AGENT\' | translate }}\n              <timer start-time="channel.queuecallerjoinAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n            </span>\n                </td>\n                <td md-cell>\n                    <span class="text-boxed">\n              <timer start-time="channel.queuecallerjoinAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n            </span>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="2">\n                            <md-menu-item>\n                                <md-button ng-click="vm.hangup(channel.uniqueid)" translate="VOICE.HANGUP">\n                                    Hangup\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.redirectToNumber($event, channel.uniqueid)" translate="VOICE.REDIRECT_TO_NUMBER">\n                                    Number\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" translate="VOICE.REDIRECT_TO_AGENT">Redirect to Agent</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item ng-repeat="agent in vm.agents.rows">\n                                            <md-button ng-click="vm.redirectToAgent(channel.uniqueid, agent.name)">{{agent.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n            \x3c!-- <tr md-row ng-repeat="call in vm.calls.rows | filter: vm.query.filter | limitTo: vm.query.limit: (vm.query.page - 1) * vm.query.limit">\n        <td md-cell>\n          <i ng-class="vm.channelStatusClass[call.status.toLowerCase()]"></i>\n        </td>\n        <td md-cell>{{call.exten}}</td>\n        <td md-cell>{{call.queue}}</td>\n        <td md-cell><span ng-if="call.calleridname">{{call.calleridname}}, </span>{{call.calleridnum}}</td>\n        <td md-cell>\n          <span ng-if="call.queuecallerleaveAt">\n            {{call.connectedlinename}}, {{call.connectedlinenum}}\n            <span class="text-boxed">\n              <timer start-time="call.queuecallerleaveAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n            </span>\n          </span>\n          <span ng-if="!call.queuecallerleaveAt" class="text-boxed" translate="VOICE.WAITING_FOR_AGENT">\n            Waiting for agent...\n            <span class="text-boxed">\n              <timer start-time="call.queuecallerjoinAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n            </span>\n          </span>\n        </td>\n        <td md-cell>\n          <span class="text-boxed">\n            <timer ng-if="call.queuecallerjoinAt" start-time="call.queuecallerjoinAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n            <span ng-if="call.queuecallercomplete || call.queuecallerabandon || call.queuecallerexit" translate="VOICE.CLOSING">Closing</span>\n          </span>\n        </td>\n        <td md-cell class="actions">\n          <md-menu>\n            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n              <md-icon md-font-icon="icon-dots-vertical" ></md-icon>\n            </md-button>\n\n            <md-menu-content width="2">\n              <md-menu-item>\n                <md-button ng-click="vm.hangup(call.uniqueid)" translate="VOICE.HANGUP">\n                  Hangup\n                </md-button>\n              </md-menu-item>\n              <md-menu-item>\n                <md-button ng-click="vm.redirectToNumber($event, call.uniqueid)" translate="VOICE.REDIRECT_TO_NUMBER">\n                  Number\n                </md-button>\n              </md-menu-item>\n              <md-menu-item>\n                <md-menu>\n                  <md-button ng-click="$mdMenu.open()" translate="VOICE.REDIRECT_TO_AGENT">Redirect to Agent</md-button>\n                  <md-menu-content>\n                    <md-menu-item ng-repeat="agent in vm.agents.rows">\n                      <md-button ng-click="vm.redirectToAgent(call.uniqueid, agent.name)">{{agent.name}}</md-button>\n                    </md-menu-item>\n                  </md-menu-content>\n                </md-menu>\n              </md-menu-item>\n            </md-menu-content>\n          </md-menu>\n        </td>\n      </tr> --\x3e\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.queryChannels.limit" md-page="vm.queryChannels.page" md-limit-options="[10, 15, 20, 50, 100, 250]"\n    md-total="{{vm.getSize(vm.rpcVoiceQueuesChannels)}}" md-page-select></md-table-pagination>\n\x3c!-- / QUEUES TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/voice/views/realtime/queue_params/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="MOTIONDIALER.QUEUE_PARAMETERS">Params</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUE TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getQueues">\n            <tr md-row>\n                <th md-column>{{\' VOICE.NAME\' | translate}}</th>\n                <th md-column>{{\' VOICE.TOTAL_OFFERED\' | translate}}</th>\n                <th md-column>{{\' VOICE.ANSWERED\' | translate}}</th>\n                <th md-column>{{\' VOICE.ABANDONED\' | translate}}</th>\n                <th md-column>{{\' VOICE.UNMANAGED\' | translate}}</th>\n                <th md-column>{{\' VOICE.AVG_HOLD_TIME\' | translate}}</th>\n                <th md-column>{{\' VOICE.AVG_DURATION\' | translate}}</th>\n                <th md-column>{{\' VOICE.AVG_BILLABLE\' | translate}}</th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.queues">\n                <td md-cell colspan="8">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="MOTIONDIALER.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row ng-repeat="(id, queue) in vm.queues">\n                <td md-cell>\n                    <span>{{queue.name}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{queue.total || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.answered || 0}} ({{(queue.total) ? (queue.answered || 0) * 100/queue.total : 0 | number:1}}%)</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{(queue.total - queue.answered - queue.unmanaged) || 0}} ({{(queue.total) ? ((queue.total - queue.answered - queue.unmanaged) || 0) * 100/queue.total : 0 | number:1}}%)</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.unmanaged || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.total ? (queue.sumHoldTime / queue.total) : 0 | number: 0 | secToTime | date:\'HH:mm:ss\'}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.total ? (queue.sumDuration / queue.total) : 0 | number: 0 | secToTime | date:\'HH:mm:ss\'}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.answered ? ((queue.sumBillable || 0) / queue.answered) : 0 | number: 0 | secToTime | date:\'HH:mm:ss\'}}</span>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n    md-page="vm.query.page" md-total="{{vm.count}}" md-on-paginate="vm.getQueues" md-page-select></md-table-pagination>\n\x3c!-- / QUEUE TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/voice/views/realtime/queues/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="VOICE.QUEUES">Queues</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUE TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getQueues">\n            <tr md-row>\n                <th md-column md-order-by="name">{{ \'VOICE.NAME\' | translate }}</th>\n                <th md-column>{{ \'VOICE.LOGGED_IN\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PAUSED\' | translate }}</th>\n                <th md-column>{{ \'VOICE.READY\' | translate }}</th>\n                <th md-column>{{ \'VOICE.WAITING\' | translate }}</th>\n                <th md-column>{{ \'VOICE.TALKING\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.queues">\n                <td md-cell colspan="7">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row md-select="vm.queues[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td md-cell>{{vm.queues[value].name}}</td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].loggedInDb || 0}} ({{vm.queues[value].loggedIn || 0}})</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].paused || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].available || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].waiting || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{(vm.queues[value].talking || 0) }}</span>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="3">\n                            <md-menu-item>\n                                <md-button ng-click="vm.createOrEditVoiceQueue($event, vm.queues[value])" translate="VOICE.EDIT_QUEUE">\n                                    Edit Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.agentAdd($event, vm.queues[value])" translate="VOICE.AGENTSADD_QUEUE">\n                                    Add Agents to queue\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.count}}" md-on-paginate="vm.getQueues" md-page-select></md-table-pagination>\n\x3c!-- / QUEUE TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/voice/views/realtime/realtime.html",'<div id="realtime" class="page-layout simple tabbed" layout="column" ng-cloak>\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.AGENTS">Agents</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.TELEPHONES">Telephones</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.TRUNKS">Trunks</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.QUEUES">Queues</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.QUEUE_CALLS">Queue Calls</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.ABANDONEDCALLS">Abandoned Queue Calls</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.QUEUE_PARAMS">Queue Parameters</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.OUTBOUND_CALLS">Outbound Calls</span>\n                </md-tab-label>\n            </md-tab>\n        </md-tabs>\n\n        <md-card ui-view></md-card>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n</div>'),e.put("app/main/apps/voice/views/realtime/telephones/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="VOICE.TELEPHONES">Telephones</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n        \x3c!-- <md-button class="md-icon-button" ng-click="vm.showInfo($event)">\n            <i class="icon-information-outline grey-600-fg">\n              <md-tooltip>{{\'VOICE.INFO\' | translate}}</md-tooltip>\n            </i>\n        </md-button> --\x3e\n    </div>\n</md-toolbar>\n\n\x3c!-- AGENT TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getTelephones">\n            <tr md-row>\n                <th md-column md-order-by="fullname">{{ \'VOICE.ACCOUNTNAME\' | translate }}</th>\n                <th md-column md-order-by="internal">{{ \'VOICE.INTERNAL\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PHONE_STATE\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PHONE_STATUS\' | translate }}</th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.telephones">\n                <td md-cell colspan="4">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row md-select="telephone" md-select-id="id" ng-repeat="(id, telephone) in vm.telephones">\n                <td md-cell>{{telephone.fullname}}</td>\n                <td md-cell>{{telephone.internal}}</td>\n                <td md-cell>\n                    <i ng-class="vm.stateClass[telephone.state]">\n                    <md-tooltip>{{\'VOICE.\' + telephone.state | uppercase | translate}}</md-tooltip>\n                  </i>\n                </td>\n                <td md-cell>\n                    <i ng-class="vm.statusClass[telephone.status]">\n                    <md-tooltip>{{\'VOICE.\' + telephone.status | uppercase | translate}}</md-tooltip>\n                  </i>\n                    <span ng-if="telephone.status === \'registered\'" class="text-boxed">{{telephone.address}}</span>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.count}}" md-on-paginate="vm.getTelephones" md-page-select></md-table-pagination>\n\x3c!-- / AGENT TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/voice/views/realtime/trunks/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="VOICE.TRUNKS">Telephones</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n        \x3c!-- <md-button class="md-icon-button" ng-click="vm.showInfo($event)">\n      <i class="icon-information-outline grey-600-fg">\n        <md-tooltip>{{\'FAX.INFO\' | translate}}</md-tooltip>\n      </i>\n    </md-button> --\x3e\n    </div>\n</md-toolbar>\n\n\x3c!-- TRUNKS TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head>\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getTrunks">\n                <tr md-row>\n                    <th md-column md-order-by="name">{{ \'VOICE.NAME\' | translate }}</th>\n                    <th md-column>{{ \'VOICE.TRUNK_STATUS\' | translate }}</th>\n                    <th md-column>{{ \'VOICE.REGISTRY\' | translate }}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.trunks">\n                    <td md-cell colspan="3">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="(id, trunk) in vm.trunks">\n                    <td md-cell>{{trunk.name}}</td>\n                    <td md-cell>\n                        <i ng-class="vm.statusClass[trunk.status.toLowerCase()]">\n            <md-tooltip>{{\'VOICE.\' + trunk.status | uppercase | translate}}</md-tooltip>\n          </i>\n                        <span ng-if="trunk.status === \'registered\'" class="text-boxed">{{trunk.address}}</span>\n                    </td>\n                    <td md-cell>\n                        <i ng-if="trunk.registry" ng-class="(trunk.stateRegistry.toLowerCase() === \'registered\') ? \'green-300-fg icon-checkbox-marked-circle\' : \'red-300-fg icon-close-circle\'">\n            <md-tooltip>{{\'VOICE.\' + trunk.stateRegistry | uppercase | translate}}</md-tooltip>\n          </i>\n                        <span ng-if="trunk.registry && trunk.host && trunk.port" class="text-boxed">{{trunk.host}}:{{trunk.port}}</span>\n                        <span ng-if="!trunk.registry" translate="VOICE.NO_REGISTRY">\n            No Registry\n          </span>\n                    </td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="4">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.goToTrunk($event, trunk)" translate="VOICE.EDIT_TRUNK">\n                                        Edit Trunk\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.count}}" md-on-paginate="vm.getTrunks" md-page-select></md-table-pagination>\n\x3c!-- / TRUNKS TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/voice/views/voicemails/create/dialog.html",'<md-dialog class="voicemail-dialog" aria-label="New Voicemail">\n    <form name="voicemailForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.FULLNAME">FullName</label>\n                <input type="text" name="fullname" ng-model="vm.voicemail.fullname" ng-required="true" autofocus>\n                <div ng-messages="voicemailForm[\'fullname\'].$error" ng-show="voicemailForm[\'fullname\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.FULLNAME_REQUIRED">FullName field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.EMAIL">Email</label>\n                <input type="email" name="email" ng-model="vm.voicemail.email" ng-required="vm.voicemail.attach === \'yes\'">\n                <div ng-messages="voicemailForm[\'email\'].$error" ng-show="voicemailForm[\'email\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                    </div>\n                    <div ng-message="email">\n                        <span translate="VOICE.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PASSWORD">Password</label>\n                <input type="password" name="password" ng-model="vm.voicemail.password" placeholder="Password" translate translate-attr-placeholder="VOICE.PASSWORD" required>\n                <div ng-messages="voicemailForm[\'password\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="VOICE.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.newVoicemail ">\n                <label translate="VOICE.CONFIRM_PASSWORD">Confirm Password</label>\n                <input type="password" match-password="password" name="confirmPassword" ng-model="confirmPassword">\n                <div ng-messages="voicemailForm.confirmPassword.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.CONFIRM_REQUIRED">Confirm field is required</span>\n                    </div>\n                    <div ng-message="passwordMatch">\n                        <span translate="VOICE.ERRORS.CONFIRM_NOT_MATCH">Your password did not match</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="VOICE.MAILBOX">MailBox</label>\n                <input type="text" name="mailbox" ng-model="vm.voicemail.mailbox" ng-required="true" ng-disabled="!vm.newVoicemail">\n                <div ng-messages="voicemailForm[\'mailbox\'].$error" ng-show="voicemailForm[\'mailbox\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.MAILBOX_REQUIRED">MailBox field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.ATTACH">Attach</label>\n                <md-select name="attach" ng-model="vm.voicemail.attach">\n\n                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="voicemailForm[\'attach\'].$error" ng-show="voicemailForm[\'attach\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.ATTACH_REQUIRED">Attach field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newVoicemail" ng-click="vm.saveVoicemail()" class="send-button md-accent md-raised" ng-disabled="voicemailForm.$invalid || voicemailForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newVoicemail" ng-click="vm.addNewVoicemail()" class="send-button md-accent md-raised" ng-disabled="voicemailForm.$invalid" aria-label="ADD" translate="VOICE.ADD_VOICEMAIL" translate-attr-aria-label="VOICE.ADD_VOICEMAIL">\n                    ADD VOICEMAIL\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newVoicemail" ng-click="vm.deleteVoicemail($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/voicemails/edit/view.html",'<div id="voice-voicemail" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-voicemails-button md-icon-button" aria-label="Go to voicemails" ng-click="vm.gotoVoicemails()" translate translate-attr-aria-label="VOICE.GO_TO_VOICEMAILS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="voicemail-image" hide-xs>\n                    <img ng-src="assets/images/business/voicemails.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.voicemail.id}}\n                        <span ng-if="vm.voicemail.name">{{vm.voicemail.name}}</span>\n                        <span ng-if="vm.voicemail.exten">{{vm.voicemail.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="VOICE.CREATED_AT"></span> <span>{{vm.voicemail.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveVoicemail()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (advancedForm.$invalid) || (messagesForm.$invalid)" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="voicemail-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="VOICE.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.FULLNAME">FullName</label>\n                                <input type="text" name="fullname" ng-model="vm.voicemail.fullname" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'fullname\'].$error" ng-show="generalForm[\'fullname\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.FULLNAME_REQUIRED">FullName field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.EMAIL">Email</label>\n                                <input type="email" name="email" ng-model="vm.voicemail.email" ng-required="vm.voicemail.attach === \'yes\'">\n                                <div ng-messages="generalForm[\'email\'].$error" ng-show="generalForm[\'email\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                                    </div>\n                                    <div ng-message="email">\n                                        <span translate="VOICE.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.PASSWORD">Password</label>\n                                <input type="password" name="password" ng-model="vm.voicemail.password" placeholder="Password" translate translate-attr-placeholder="VOICE.PASSWORD" required>\n                                <div ng-messages="generalForm[\'password\'].$error" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="VOICE.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <md-input-container class="md-block" ng-if="vm.newVoicemail ">\n                                <label translate="VOICE.CONFIRM_PASSWORD">Confirm Password</label>\n                                <input type="password" match-password="password" name="confirmPassword" ng-model="confirmPassword">\n                                <div ng-messages="generalForm.confirmPassword.$error" role="alert" multiple>\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.CONFIRM_REQUIRED">Confirm field is required</span>\n                                    </div>\n                                    <div ng-message="passwordMatch">\n                                        <span translate="VOICE.ERRORS.CONFIRM_NOT_MATCH">Your password did not match</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MAILBOX">MailBox</label>\n                                <input type="text" name="mailbox" ng-model="vm.voicemail.mailbox" ng-required="true" ng-disabled="true">\n                                <div ng-messages="generalForm[\'mailbox\'].$error" ng-show="generalForm[\'mailbox\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MAILBOX_REQUIRED">MailBox field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.VOICEMAIL_CONTEXT">Voicemail_Context</label>\n                                <md-select name="context" ng-model="vm.voicemail.context" required>\n                                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.VOICEMAIL_CONTEXT"></span></div>\n                                <div ng-messages="generalForm[\'context\'].$error" ng-show="generalForm[\'context\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.VOICEMAIL_CONTEXT_REQUIRED">Voicemail_Context field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.ADVANCED">ADVANCED</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="voicemail-detail-form-container advanced md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="VOICE.ADVANCED">ADVANCED</div>\n                        </div>\n                        <form name="advancedForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.TIMEZONE">TimeZone</label>\n                                <input type="text" name="tz" ng-model="vm.voicemail.tz" ng-required="true" autofocus>\n                                <div ng-messages="advancedForm[\'tz\'].$error" ng-show="advancedForm[\'tz\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.TIMEZONE_REQUIRED">TimeZone field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.ATTACH">Attach</label>\n                                <md-select name="attach" ng-model="vm.voicemail.attach">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="advancedForm[\'attach\'].$error" ng-show="advancedForm[\'attach\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.ATTACH_REQUIRED">Attach field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.ENVELOPE">Envelope</label>\n                                <md-select name="envelope" ng-model="vm.voicemail.envelope">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="advancedForm[\'envelope\'].$error" ng-show="advancedForm[\'envelope\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.ENVELOPE_REQUIRED">Envelope field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.DELETE">Delete</label>\n                                <md-select name="delete" ng-model="vm.voicemail.delete">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="advancedForm[\'delete\'].$error" ng-show="advancedForm[\'delete\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.DELETE_REQUIRED">Delete field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.EMAILBODY">EmailBody</label>\n                                <input type="text" name="emailbody" ng-model="vm.voicemail.emailbody">\n                                <div ng-messages="advancedForm[\'emailbody\'].$error" ng-show="advancedForm[\'emailbody\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.EMAILBODY_REQUIRED">EmailBody field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.EMAILSUBJECT">EmailSubject</label>\n                                <input type="text" name="emailsubject" ng-model="vm.voicemail.emailsubject">\n                                <div ng-messages="advancedForm[\'emailsubject\'].$error" ng-show="advancedForm[\'emailsubject\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.EMAILSUBJECT_REQUIRED">EmailSubject field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MAXSECONDS">MaxSeconds</label>\n                                <input type="number" name="maxsecs" ng-model="vm.voicemail.maxsecs" min="0">\n                                <div ng-messages="advancedForm[\'maxsecs\'].$error" ng-show="advancedForm[\'maxsecs\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MAXSECONDS_REQUIRED">MaxSeconds field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.MAXSECONDS_MUST_BE_GREATER_THAN_OR_EQUAL_TO">MaxSeconds must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MAXMESSAGES">MaxMessages</label>\n                                <input type="number" name="maxmsg" ng-model="vm.voicemail.maxmsg" min="0" max="9999">\n                                <div ng-messages="advancedForm[\'maxmsg\'].$error" ng-show="advancedForm[\'maxmsg\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MAXMESSAGES_REQUIRED">MaxMessages field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.MAXMESSAGES_MUST_BE_GREATER_THAN_OR_EQUAL_TO">MaxMessages must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="VOICE.ERRORS.MAXMESSAGES_MUST_BE_LESS_THAN_OR_EQUAL_TO">MaxMessages must be a valid greater or equal than</span> <span>9999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.MESSAGES">MESSAGES</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="voicemail-detail-form-container messages md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="VoicemailMessagesController as vm_dc" ng-init="vm_dc.init(vm.voicemail)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedVoicemailMessages.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="VOICE.MESSAGES">Messages</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedVoicemailMessages.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedVoicemailMessages.length}} {{vm_dc.selectedVoicemailMessages.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedVoicemailMessages" csv-label="true" filename="voicemails.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedVoicemailMessages($event)" aria-label="delete selected" translate translate-attr-label="VOICEMAILS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedVoicemailMessages" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getVoicemailMessages">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'VOICE.ID\' | translate }}</th>\n                                            <th md-column md-order-by="callerid">{{ \'VOICE.CALLER_ID\' | translate }}</th>\n                                            <th md-column md-order-by="duration">{{ \'VOICE.DURATION\' | translate }}</th>\n                                            <th md-column md-order-by="audio">{{ \'VOICE.AUDIO\' | translate }}</th>\n                                            <th md-column md-order-by="stamp">{{ \'VOICE.RECEIVED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="message" md-select-id="id" ng-repeat="message in vm_dc.voicemailMessages.rows">\n                                            <td md-cell>{{message.id}}</td>\n                                            <td md-cell>{{message.callerid}}</td>\n                                            <td md-cell>{{message.duration}}</td>\n                                            <td md-cell>\n                                                \x3c!-- audio recording directive --\x3e\n                                                <ms-recording id="message.id" model="\'voiceMailMessage\'"></ms-recording>\n                                                \x3c!-- / audio recording directive --\x3e\n                                            </td>\n                                            <td md-cell>{{message.stamp | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button class="md-primary" ng-click="vm_dc.voiceMailMessageDownload(message, $event)" translate="VOICE.DOWNLOAD_MESSAGE">\n                                                                Download Message\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(message, $event)" translate="VOICE.DELETE_MESSAGE">\n                                                                Delete Message\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.voicemailMessages.rows.length">\n                                            <td md-cell colspan="8">\n                                                <span class="text-boxed-ligth" translate="VOICE.NO_MESSAGE_AVAILABLE">No message available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.voicemailMessages.count}}" md-on-paginate="vm_dc.getVoicemailMessages" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/voice/views/voicemails/voicemails.html",'<div id="voicemails" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-phone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="VOICE.VOICEMAILS">Voicemails</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="VOICE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedVoicemails.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedVoicemails =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="VOICE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-voicemails-count">\n                    <span>{{vm.selectedVoicemails.length}}</span>\n                <span translate="VOICE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="VOICEMAILS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllVoicemails()" translate="VOICE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectVoicemails()" translate="VOICE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedVoicemails" csv-label="true" filename="voicemails.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedVoicemails($event)" aria-label="delete selected" translate translate-attr-label="VOICEMAILS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- VOICEMAIL TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedVoicemails" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getVoicemails">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'VOICE.ID\' | translate }}</th>\n                                <th md-column md-order-by="fullname">{{ \'VOICE.FULLNAME\' | translate }}</th>\n                                <th md-column md-order-by="email">{{ \'VOICE.EMAIL\' | translate }}</th>\n                                <th md-column md-order-by="mailbox">{{ \'VOICE.MAILBOX\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.voicemails.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="voicemail" md-select-id="id" ng-repeat="voicemail in vm.voicemails.rows">\n                                <td md-cell ng-if="voicemail.userpic"><img class="avatar" alt="{{voicemail.name}}" ng-src="api/users/{{voicemail.id}}/avatar" /></td>\n                                <td md-cell ng-if="!voicemail.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{voicemail.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditVoicemail($event, voicemail)" md-cell class="id ">{{voicemail.id}}</td>\n                                <td ng-click="vm.createOrEditVoicemail($event, voicemail)" md-cell class="fullname ">{{voicemail.fullname}}</td>\n                                <td ng-click="vm.createOrEditVoicemail($event, voicemail)" md-cell class="email ">{{voicemail.email}}</td>\n                                <td ng-click="vm.createOrEditVoicemail($event, voicemail)" md-cell class="mailbox ">{{voicemail.mailbox}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(voicemail, $event)" translate="VOICE.EDIT_VOICEMAIL">\n                                                    Edit Voicemail\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(voicemail, $event)" translate="VOICE.DELETE_VOICEMAIL">\n                                                    Delete Voicemail\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.voicemails.count}}" md-on-paginate="vm.getVoicemails" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / VOICEMAIL TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD VOICEMAIL BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-voicemail-button" ng-click="vm.createOrEditVoicemail($event)" aria-label="add voicemail" translate translate-attr-aria-label="VOICE.ADD_VOICEMAIL">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD VOICEMAIL BUTTON --\x3e\n</div>'),e.put("app/main/apps/voice/views/voiceQueues/create/dialog.html",'<md-dialog class="voiceQueue-dialog" aria-label="New VoiceQueue">\n    <form name="voiceQueueForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.voiceQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newVoiceQueue">\n                <div class="hint"><span translate="VOICE.HELP.NAME"></span></div>\n                <div ng-messages="voiceQueueForm[\'name\'].$error" ng-show="voiceQueueForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="VOICE.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.STRATEGY">Strategy</label>\n                <md-select name="strategy" ng-model="vm.voiceQueue.strategy" required>\n                    <md-option ng-value="\'ringall\'">Ringall</md-option>\n                    <md-option ng-value="\'rrmemory\'">Round Robin Memory</md-option>\n                    <md-option ng-value="\'leastrecent\'">Least Recent</md-option>\n                    <md-option ng-value="\'fewestcalls\'">Fewest Calls</md-option>\n                    <md-option ng-value="\'random\'">Random</md-option>\n                    <md-option ng-value="\'linear\'">Linear</md-option>\n                    <md-option ng-value="\'wrandom\'">Weight Random</md-option>\n                </md-select>\n                <div ng-messages="voiceQueueForm[\'strategy\'].$error" ng-show="voiceQueueForm[\'strategy\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.voiceQueue.description">\n                <div ng-messages="voiceQueueForm[\'description\'].$error" ng-show="voiceQueueForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newVoiceQueue" ng-click="vm.saveVoiceQueue()" class="send-button md-accent md-raised" ng-disabled="voiceQueueForm.$invalid || voiceQueueForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newVoiceQueue" ng-click="vm.addNewVoiceQueue()" class="send-button md-accent md-raised" ng-disabled="voiceQueueForm.$invalid" aria-label="ADD" translate="VOICE.ADD_VOICEQUEUE" translate-attr-aria-label="VOICE.ADD_VOICEQUEUE">\n                    ADD VOICEQUEUE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newVoiceQueue" ng-click="vm.deleteVoiceQueue($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/voiceQueues/edit/agentadd/agentadd.html",'<md-dialog class="voiceQueue-dialog" aria-label="voiceQueue">\n    <form name="voiceQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="VOICE.AGENTADD_VOICEQUEUE">Add Agent to voiceQueue</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <md-input-container flex class="no-margin">\n                <label translate="VOICE.PENALTY">Penalty</label>\n                <input name="penalty" ng-model="vm.penalty" placeholder="0" required md-minlength="0" md-maxlength="3">\n                <div ng-messages="voiceQueueForm.penalty.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span>You must supply a penalty.</span>\n                    </div>\n                    <div ng-message="md-minlength">\n                        <span>Min Penalty 0 characters.</span>\n                    </div>\n                    <div ng-message="md-maxlength">\n                        <span>Max Penalty 3 characters.</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/voiceQueues/edit/teamadd/teamadd.html",'<md-dialog class="voiceQueue-dialog" aria-label="voiceQueue">\n    <form name="voiceQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="VOICE.TEAMADD_VOICEQUEUE">Add Team in VOICEQUEUE</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <md-input-container flex class="no-margin">\n                <label translate="VOICE.PENALTY">Penalty</label>\n                <input name="penalty" ng-model="vm.penalty" placeholder="0" required md-minlength="0" md-maxlength="3">\n                <div ng-messages="voiceQueueForm.penalty.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span>You must supply a penalty.</span>\n                    </div>\n                    <div ng-message="md-minlength">\n                        <span>Min Penalty 0 characters.</span>\n                    </div>\n                    <div ng-message="md-maxlength">\n                        <span>Max Penalty 3 characters.</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/voiceQueues/edit/view.html",'<div id="voice-voiceQueue" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-voiceQueues-button md-icon-button" aria-label="Go to voiceQueues" ng-click="vm.gotoVoiceQueues()" translate translate-attr-aria-label="VOICE.GO_TO_VOICEQUEUES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="voiceQueue-image" hide-xs>\n                    <img ng-src="assets/images/business/voiceQueues.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.voiceQueue.id}}\n                        <span ng-if="vm.voiceQueue.name">{{vm.voiceQueue.name}}</span>\n                        <span ng-if="vm.voiceQueue.exten">{{vm.voiceQueue.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="VOICE.CREATED_AT"></span> <span>{{vm.voiceQueue.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.teamadddialog(vm.voiceQueue, $event)" class="md-fab md-orange-500-bg md-icon-button" aria-label="teamadd">\n                <md-tooltip><span translate="VOICE.TEAMADD_VOICEQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-multiple-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.agentadddialog(vm.voiceQueue, $event)" class="md-fab md-purple-500-bg md-icon-button" aria-label="agentadd">\n                <md-tooltip><span translate="VOICE.AGENTADD_VOICEQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.gotogoto(vm.voiceQueue, $event)" class="md-fab md-warn md-icon-button" aria-label="goto">\n                <md-tooltip><span translate="VOICE.GOTO_VOICEQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-cast"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveVoiceQueue()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (settingsForm.$invalid) || (announcementsForm.$invalid) || (advancedForm.$invalid)" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="voiceQueue-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="VOICE.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.voiceQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="VOICE.HELP.NAME"></span></div>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="VOICE.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.STRATEGY">Strategy</label>\n                                <md-select name="strategy" ng-model="vm.voiceQueue.strategy" required>\n                                    <md-option ng-value="\'ringall\'">Ringall</md-option>\n                                    <md-option ng-value="\'rrmemory\'">Round Robin Memory</md-option>\n                                    <md-option ng-value="\'leastrecent\'">Least Recent</md-option>\n                                    <md-option ng-value="\'fewestcalls\'">Fewest Calls</md-option>\n                                    <md-option ng-value="\'random\'">Random</md-option>\n                                    <md-option ng-value="\'linear\'">Linear</md-option>\n                                    <md-option ng-value="\'wrandom\'">Weight Random</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'strategy\'].$error" ng-show="generalForm[\'strategy\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.TIMEOUT">Timeout</label>\n                                <input type="number" name="timeout" ng-model="vm.voiceQueue.timeout" min="0" ng-required="true">\n                                <div class="hint"><span translate="VOICE.HELP.TIMEOUT"></span></div>\n                                <div ng-messages="generalForm[\'timeout\'].$error" ng-show="generalForm[\'timeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MAXLENGTH">MaxLength</label>\n                                <input type="number" name="maxlen" ng-model="vm.voiceQueue.maxlen" min="0">\n                                <div class="hint"><span translate="VOICE.HELP.MAXLENGTH"></span></div>\n                                <div ng-messages="generalForm[\'maxlen\'].$error" ng-show="generalForm[\'maxlen\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MAXLENGTH_REQUIRED">MaxLength field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.MAXLENGTH_MUST_BE_GREATER_THAN_OR_EQUAL_TO">MaxLength must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.RETRY">Retry</label>\n                                <input type="number" name="retry" ng-model="vm.voiceQueue.retry" min="0">\n                                <div class="hint"><span translate="VOICE.HELP.RETRY"></span></div>\n                                <div ng-messages="generalForm[\'retry\'].$error" ng-show="generalForm[\'retry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.RETRY_REQUIRED">Retry field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.RETRY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Retry must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.WRAPUPTIME">WrapupTime</label>\n                                <input type="number" name="wrapuptime" ng-model="vm.voiceQueue.wrapuptime" min="0">\n                                <div class="hint"><span translate="VOICE.HELP.WRAPUPTIME"></span></div>\n                                <div ng-messages="generalForm[\'wrapuptime\'].$error" ng-show="generalForm[\'wrapuptime\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.WRAPUPTIME_REQUIRED">WrapupTime field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.WRAPUPTIME_MUST_BE_GREATER_THAN_OR_EQUAL_TO">WrapupTime must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.WEIGHT">Weight</label>\n                                <input type="number" name="weight" ng-model="vm.voiceQueue.weight" min="0">\n                                <div class="hint"><span translate="VOICE.HELP.WEIGHT"></span></div>\n                                <div ng-messages="generalForm[\'weight\'].$error" ng-show="generalForm[\'weight\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.WEIGHT_REQUIRED">Weight field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.WEIGHT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Weight must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.JOINWHENEMPTY">JoinWhenEmpty</label>\n                                <md-select name="joinempty" ng-model="vm.voiceQueue.joinempty" multiple>\n                                    <md-option ng-value="\'no\'">no</md-option>\n                                    <md-option ng-value="\'yes\'">yes</md-option>\n                                    <md-option ng-value="\'strict\'">strict</md-option>\n                                    <md-option ng-value="\'loose\'">loose</md-option>\n                                    <md-option ng-value="\'paused\'">paused</md-option>\n                                    <md-option ng-value="\'penalty\'">penalty</md-option>\n                                    <md-option ng-value="\'inuse\'">inuse</md-option>\n                                    <md-option ng-value="\'ringing\'">ringing</md-option>\n                                    <md-option ng-value="\'unavailable\'">unavailable</md-option>\n                                    <md-option ng-value="\'invalid\'">invalid</md-option>\n                                    <md-option ng-value="\'unknown\'">unknoww</md-option>\n                                    <md-option ng-value="\'wrapup\'">wrapup</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.JOINWHENEMPTY"></span></div>\n                                <div ng-messages="generalForm[\'joinempty\'].$error" ng-show="generalForm[\'joinempty\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.JOINWHENEMPTY_REQUIRED">JoinWhenEmpty field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.LEAVEWHENEMPTY">LeaveWhenEmpty</label>\n                                <md-select name="leavewhenempty" ng-model="vm.voiceQueue.leavewhenempty" multiple>\n                                    <md-option ng-value="\'no\'">no</md-option>\n                                    <md-option ng-value="\'yes\'">yes</md-option>\n                                    <md-option ng-value="\'strict\'">strict</md-option>\n                                    <md-option ng-value="\'loose\'">loose</md-option>\n                                    <md-option ng-value="\'paused\'">paused</md-option>\n                                    <md-option ng-value="\'penalty\'">penalty</md-option>\n                                    <md-option ng-value="\'inuse\'">inuse</md-option>\n                                    <md-option ng-value="\'ringing\'">ringing</md-option>\n                                    <md-option ng-value="\'unavailable\'">unavailable</md-option>\n                                    <md-option ng-value="\'invalid\'">invalid</md-option>\n                                    <md-option ng-value="\'unknown\'">unknoww</md-option>\n                                    <md-option ng-value="\'wrapup\'">wrapup</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.LEAVEWHENEMPTY"></span></div>\n                                <div ng-messages="generalForm[\'leavewhenempty\'].$error" ng-show="generalForm[\'leavewhenempty\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.LEAVEWHENEMPTY_REQUIRED">LeaveWhenEmpty field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MUSICONHOLD">MusicOnHold</label>\n                                <md-select name="musiconhold" ng-model="vm.voiceQueue.musiconhold">\n                                    <md-option ng-value="musiconhold.name" ng-repeat="musiconhold in vm.musiconholds">{{ musiconhold.name }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.MUSICONHOLD"></span></div>\n                                <div ng-messages="generalForm[\'musiconhold\'].$error" ng-show="generalForm[\'musiconhold\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MUSICONHOLD_REQUIRED">MusicOnHold field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.ANNOUNCETOAGENT">AnnounceToAgent</label>\n                                <md-select name="announce" ng-model="vm.voiceQueue.announce">\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + announce.save_name" ng-repeat="announce in vm.sounds">{{ announce.name }}</md-option>\n                                    <md-option ng-value="\'FALSE\'">None</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.ANNOUNCETOAGENT"></span></div>\n                                <div ng-messages="generalForm[\'announce\'].$error" ng-show="generalForm[\'announce\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.ANNOUNCETOAGENT_REQUIRED">AnnounceToAgent field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.voiceQueue.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.ANNOUNCEMENTS">ANNOUNCEMENTS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="voiceQueue-detail-form-container settings md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="VOICE.SETTINGS">SETTINGS</div>\n                        </div>\n                        <form name="settingsForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.ANNOUNCEFREQUENCY">AnnounceFrequency</label>\n                                <input type="number" name="announce_frequency" ng-model="vm.voiceQueue.announce_frequency" min="0" autofocus>\n                                <div class="hint"><span translate="VOICE.HELP.ANNOUNCEFREQUENCY"></span></div>\n                                <div ng-messages="settingsForm[\'announce_frequency\'].$error" ng-show="settingsForm[\'announce_frequency\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.ANNOUNCEFREQUENCY_REQUIRED">AnnounceFrequency field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.ANNOUNCEFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AnnounceFrequency must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MINANNOUNCEFREQUENCY">MinAnnounceFrequency</label>\n                                <input type="number" name="min_announce_frequency" ng-model="vm.voiceQueue.min_announce_frequency" min="0">\n                                <div class="hint"><span translate="VOICE.HELP.MINANNOUNCEFREQUENCY"></span></div>\n                                <div ng-messages="settingsForm[\'min_announce_frequency\'].$error" ng-show="settingsForm[\'min_announce_frequency\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MINANNOUNCEFREQUENCY_REQUIRED">MinAnnounceFrequency field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.MINANNOUNCEFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">MinAnnounceFrequency must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.PERIODICANNOUNCEFREQUENCY">PeriodicAnnounceFrequency</label>\n                                <input type="number" name="periodic_announce_frequency" ng-model="vm.voiceQueue.periodic_announce_frequency" min="0">\n                                <div class="hint"><span translate="VOICE.HELP.PERIODICANNOUNCEFREQUENCY"></span></div>\n                                <div ng-messages="settingsForm[\'periodic_announce_frequency\'].$error" ng-show="settingsForm[\'periodic_announce_frequency\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.PERIODICANNOUNCEFREQUENCY_REQUIRED">PeriodicAnnounceFrequency field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.PERIODICANNOUNCEFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">PeriodicAnnounceFrequency must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.RANDOMPERIODICANNOUNCE">RandomPeriodicAnnounce</label>\n                                <md-select name="random_periodic_announce" ng-model="vm.voiceQueue.random_periodic_announce">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.RANDOMPERIODICANNOUNCE"></span></div>\n                                <div ng-messages="settingsForm[\'random_periodic_announce\'].$error" ng-show="settingsForm[\'random_periodic_announce\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.RANDOMPERIODICANNOUNCE_REQUIRED">RandomPeriodicAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.ANNOUNCEHOLDTIME">AnnounceHoldtime</label>\n                                <md-select name="announce_holdtime" ng-model="vm.voiceQueue.announce_holdtime">\n                                    <md-option ng-value="\'yes\'">Yes</md-option>\n                                    <md-option ng-value="\'no\'">No</md-option>\n                                    <md-option ng-value="\'once\'">Once</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.ANNOUNCEHOLDTIME"></span></div>\n                                <div ng-messages="settingsForm[\'announce_holdtime\'].$error" ng-show="settingsForm[\'announce_holdtime\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.ANNOUNCEHOLDTIME_REQUIRED">AnnounceHoldtime field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.ANNOUNCECALLERPOSITION">AnnounceCallerPosition</label>\n                                <md-select name="announce_position" ng-model="vm.voiceQueue.announce_position">\n                                    <md-option ng-value="\'yes\'">Yes</md-option>\n                                    <md-option ng-value="\'no\'">No</md-option>\n                                    <md-option ng-value="\'limit\'">Limit</md-option>\n                                    <md-option ng-value="\'more\'">More</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.ANNOUNCECALLERPOSITION"></span></div>\n                                <div ng-messages="settingsForm[\'announce_position\'].$error" ng-show="settingsForm[\'announce_position\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.ANNOUNCECALLERPOSITION_REQUIRED">AnnounceCallerPosition field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.ANNOUNCEPOSITIONLIMIT">AnnouncePositionLimit</label>\n                                <input type="number" name="announce_position_limit" ng-model="vm.voiceQueue.announce_position_limit">\n                                <div class="hint"><span translate="VOICE.HELP.ANNOUNCEPOSITIONLIMIT"></span></div>\n                                <div ng-messages="settingsForm[\'announce_position_limit\'].$error" ng-show="settingsForm[\'announce_position_limit\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.ANNOUNCEPOSITIONLIMIT_REQUIRED">AnnouncePositionLimit field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.REPORTHOLDTIMEAGENT">ReportHoldtimeAgent</label>\n                                <md-select name="reportholdtime" ng-model="vm.voiceQueue.reportholdtime">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.REPORTHOLDTIMEAGENT"></span></div>\n                                <div ng-messages="settingsForm[\'reportholdtime\'].$error" ng-show="settingsForm[\'reportholdtime\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.REPORTHOLDTIMEAGENT_REQUIRED">ReportHoldtimeAgent field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="voiceQueue-detail-form-container announcements md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="VOICE.ANNOUNCEMENTS">ANNOUNCEMENTS</div>\n                        </div>\n                        <form name="announcementsForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.PERIODICANNOUNCE">PeriodicAnnounce</label>\n                                <md-select name="periodic_announce" ng-model="vm.voiceQueue.periodic_announce" autofocus multiple>\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + periodic_announce.save_name" ng-repeat="periodic_announce in vm.sounds">{{ periodic_announce.name }}</md-option>\n                                    <md-option ng-value="\'\'">Default</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.PERIODICANNOUNCE"></span></div>\n                                <div ng-messages="announcementsForm[\'periodic_announce\'].$error" ng-show="announcementsForm[\'periodic_announce\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.PERIODICANNOUNCE_REQUIRED">PeriodicAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.HOLDTIMEANNOUNCE">HoldTimeAnnounce</label>\n                                <md-select name="queue_reporthold" ng-model="vm.voiceQueue.queue_reporthold">\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + queue_reporthold.save_name" ng-repeat="queue_reporthold in vm.sounds">{{ queue_reporthold.name }}</md-option>\n                                    <md-option ng-value="null">Default</md-option>\n                                    <md-option ng-value="\'\'">Disabled</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.HOLDTIMEANNOUNCE"></span></div>\n                                <div ng-messages="announcementsForm[\'queue_reporthold\'].$error" ng-show="announcementsForm[\'queue_reporthold\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.HOLDTIMEANNOUNCE_REQUIRED">HoldTimeAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.YOUARENEXTANNOUNCE">YouareNextAnnounce</label>\n                                <md-select name="queue_youarenext" ng-model="vm.voiceQueue.queue_youarenext">\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + queue_youarenext.save_name" ng-repeat="queue_youarenext in vm.sounds">{{ queue_youarenext.name }}</md-option>\n                                    <md-option ng-value="null">Default</md-option>\n                                    <md-option ng-value="\'\'">Disabled</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.YOUARENEXTANNOUNCE"></span></div>\n                                <div ng-messages="announcementsForm[\'queue_youarenext\'].$error" ng-show="announcementsForm[\'queue_youarenext\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.YOUARENEXTANNOUNCE_REQUIRED">YouareNextAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.THEREAREANNOUNCE">ThereareAnnounce</label>\n                                <md-select name="queue_thereare" ng-model="vm.voiceQueue.queue_thereare">\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + queue_thereare.save_name" ng-repeat="queue_thereare in vm.sounds">{{ queue_thereare.name }}</md-option>\n                                    <md-option ng-value="null">Default</md-option>\n                                    <md-option ng-value="\'\'">Disabled</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.THEREAREANNOUNCE"></span></div>\n                                <div ng-messages="announcementsForm[\'queue_thereare\'].$error" ng-show="announcementsForm[\'queue_thereare\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.THEREAREANNOUNCE_REQUIRED">ThereareAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.WAITINGCALLSANNOUNCE">WaitingCallsAnnounce</label>\n                                <md-select name="queue_callswaiting" ng-model="vm.voiceQueue.queue_callswaiting">\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + queue_callswaiting.save_name" ng-repeat="queue_callswaiting in vm.sounds">{{ queue_callswaiting.name }}</md-option>\n                                    <md-option ng-value="null">Default</md-option>\n                                    <md-option ng-value="\'\'">Disabled</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.WAITINGCALLSANNOUNCE"></span></div>\n                                <div ng-messages="announcementsForm[\'queue_callswaiting\'].$error" ng-show="announcementsForm[\'queue_callswaiting\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.WAITINGCALLSANNOUNCE_REQUIRED">WaitingCallsAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.ESTIMATEDHOLDTIMEANNOUNCE">EstimatedHoldTimeAnnounce</label>\n                                <md-select name="queue_holdtime" ng-model="vm.voiceQueue.queue_holdtime">\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + queue_holdtime.save_name" ng-repeat="queue_holdtime in vm.sounds">{{ queue_holdtime.name }}</md-option>\n                                    <md-option ng-value="null">Default</md-option>\n                                    <md-option ng-value="\'\'">Disabled</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.ESTIMATEDHOLDTIMEANNOUNCE"></span></div>\n                                <div ng-messages="announcementsForm[\'queue_holdtime\'].$error" ng-show="announcementsForm[\'queue_holdtime\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.ESTIMATEDHOLDTIMEANNOUNCE_REQUIRED">EstimatedHoldTimeAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MINUTESANNOUNCE">MinutesAnnounce</label>\n                                <md-select name="queue_minutes" ng-model="vm.voiceQueue.queue_minutes">\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + queue_minutes.save_name" ng-repeat="queue_minutes in vm.sounds">{{ queue_minutes.name }}</md-option>\n                                    <md-option ng-value="null">Default</md-option>\n                                    <md-option ng-value="\'\'">Disabled</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.MINUTESANNOUNCE"></span></div>\n                                <div ng-messages="announcementsForm[\'queue_minutes\'].$error" ng-show="announcementsForm[\'queue_minutes\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MINUTESANNOUNCE_REQUIRED">MinutesAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MINUTEANNOUNCE">MinuteAnnounce</label>\n                                <md-select name="queue_minute" ng-model="vm.voiceQueue.queue_minute">\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + queue_minute.save_name" ng-repeat="queue_minute in vm.sounds">{{ queue_minute.name }}</md-option>\n                                    <md-option ng-value="null">Default</md-option>\n                                    <md-option ng-value="\'\'">Disabled</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.MINUTEANNOUNCE"></span></div>\n                                <div ng-messages="announcementsForm[\'queue_minute\'].$error" ng-show="announcementsForm[\'queue_minute\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MINUTEANNOUNCE_REQUIRED">MinuteAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.SECONDSANNOUNCE">SecondsAnnounce</label>\n                                <md-select name="queue_seconds" ng-model="vm.voiceQueue.queue_seconds">\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + queue_seconds.save_name" ng-repeat="queue_seconds in vm.sounds">{{ queue_seconds.name }}</md-option>\n                                    <md-option ng-value="null">Default</md-option>\n                                    <md-option ng-value="\'\'">Disabled</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.SECONDSANNOUNCE"></span></div>\n                                <div ng-messages="announcementsForm[\'queue_seconds\'].$error" ng-show="announcementsForm[\'queue_seconds\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.SECONDSANNOUNCE_REQUIRED">SecondsAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.THANKYOUANNOUNCE">ThankYouAnnounce</label>\n                                <md-select name="queue_thankyou" ng-model="vm.voiceQueue.queue_thankyou">\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + queue_thankyou.save_name" ng-repeat="queue_thankyou in vm.sounds">{{ queue_thankyou.name }}</md-option>\n                                    <md-option ng-value="null">Default</md-option>\n                                    <md-option ng-value="\'\'">Disabled</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.THANKYOUANNOUNCE"></span></div>\n                                <div ng-messages="announcementsForm[\'queue_thankyou\'].$error" ng-show="announcementsForm[\'queue_thankyou\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.THANKYOUANNOUNCE_REQUIRED">ThankYouAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.ADVANCED">ADVANCED</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="voiceQueue-detail-form-container advanced md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="VOICE.ADVANCED">ADVANCED</div>\n                        </div>\n                        <form name="advancedForm" novalidate>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.voiceQueue.acw" aria-label="AfterCallWork"><span translate="VOICE.AFTERCALLWORK">AfterCallWork</span></md-switch>\n                                <div class="hint"><span translate="VOICE.HELP.AFTERCALLWORK"></span></div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.voiceQueue.acw" class="md-block">\n                                <label translate="VOICE.AFTERCALLWORKDURATION">AfterCallWorkDuration</label>\n                                <input type="number" name="acwTimeout" ng-model="vm.voiceQueue.acwTimeout" min="0" ng-required="true">\n                                <div class="hint"><span translate="VOICE.HELP.AFTERCALLWORKDURATION"></span></div>\n                                <div ng-messages="advancedForm[\'acwTimeout\'].$error" ng-show="advancedForm[\'acwTimeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.AFTERCALLWORKDURATION_REQUIRED">AfterCallWorkDuration field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.AFTERCALLWORKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AfterCallWorkDuration must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.AUTOPAUSE">AutoPause</label>\n                                <md-select name="autopause" ng-model="vm.voiceQueue.autopause">\n\n                                    <md-option ng-value="\'all\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.AUTOPAUSE"></span></div>\n                                <div ng-messages="advancedForm[\'autopause\'].$error" ng-show="advancedForm[\'autopause\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.AUTOPAUSE_REQUIRED">AutoPause field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.RINGINUSE">RingInUse</label>\n                                <md-select name="ringinuse" ng-model="vm.voiceQueue.ringinuse">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.RINGINUSE"></span></div>\n                                <div ng-messages="advancedForm[\'ringinuse\'].$error" ng-show="advancedForm[\'ringinuse\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.RINGINUSE_REQUIRED">RingInUse field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MEMBERDELAY">MemberDelay</label>\n                                <input type="number" name="memberdelay" ng-model="vm.voiceQueue.memberdelay" min="0">\n                                <div class="hint"><span translate="VOICE.HELP.MEMBERDELAY"></span></div>\n                                <div ng-messages="advancedForm[\'memberdelay\'].$error" ng-show="advancedForm[\'memberdelay\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MEMBERDELAY_REQUIRED">MemberDelay field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.MEMBERDELAY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">MemberDelay must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.TIMEOUTRESTART">TimeoutRestart</label>\n                                <md-select name="timeoutrestart" ng-model="vm.voiceQueue.timeoutrestart">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.TIMEOUTRESTART"></span></div>\n                                <div ng-messages="advancedForm[\'timeoutrestart\'].$error" ng-show="advancedForm[\'timeoutrestart\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.TIMEOUTRESTART_REQUIRED">TimeoutRestart field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MONITORFORMAT">MonitorFormat</label>\n                                <md-select name="monitor_format" ng-model="vm.voiceQueue.monitor_format">\n                                    <md-option ng-value="\'\'">Inactive</md-option>\n                                    <md-option ng-value="\'wav\'">wav</md-option>\n                                    <md-option ng-value="\'wav49\'">wav49</md-option>\n                                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.MONITORFORMAT"></span></div>\n                                <div ng-messages="advancedForm[\'monitor_format\'].$error" ng-show="advancedForm[\'monitor_format\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MONITORFORMAT_REQUIRED">MonitorFormat field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.CONTEXT">Context</label>\n                                <input type="text" name="context" ng-model="vm.voiceQueue.context">\n                                <div class="hint"><span translate="VOICE.HELP.CONTEXT"></span></div>\n                                <div ng-messages="advancedForm[\'context\'].$error" ng-show="advancedForm[\'context\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.SETINTERFACEVARIABLES">SetInterfaceVariables</label>\n                                <md-select name="setinterfacevar" ng-model="vm.voiceQueue.setinterfacevar">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.SETINTERFACEVARIABLES"></span></div>\n                                <div ng-messages="advancedForm[\'setinterfacevar\'].$error" ng-show="advancedForm[\'setinterfacevar\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.SETINTERFACEVARIABLES_REQUIRED">SetInterfaceVariables field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.SETQUEUEVARIABLES">SetQueueVariables</label>\n                                <md-select name="setqueuevar" ng-model="vm.voiceQueue.setqueuevar">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.SETQUEUEVARIABLES"></span></div>\n                                <div ng-messages="advancedForm[\'setqueuevar\'].$error" ng-show="advancedForm[\'setqueuevar\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.SETQUEUEVARIABLES_REQUIRED">SetQueueVariables field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.SETQUEUEENTRYVARIABLES">SetQueueEntryVariables</label>\n                                <md-select name="setqueueentryvar" ng-model="vm.voiceQueue.setqueueentryvar">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.SETQUEUEENTRYVARIABLES"></span></div>\n                                <div ng-messages="advancedForm[\'setqueueentryvar\'].$error" ng-show="advancedForm[\'setqueueentryvar\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.SETQUEUEENTRYVARIABLES_REQUIRED">SetQueueEntryVariables field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/voice/views/voiceQueues/voiceQueues.html",'<div id="voiceQueues" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-phone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="VOICE.VOICEQUEUES">VoiceQueues</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="VOICE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedVoiceQueues.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedVoiceQueues =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="VOICE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-voiceQueues-count">\n                    <span>{{vm.selectedVoiceQueues.length}}</span>\n                <span translate="VOICE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="VOICEQUEUES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllVoiceQueues()" translate="VOICE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectVoiceQueues()" translate="VOICE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedVoiceQueues" csv-label="true" filename="voiceQueues.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedVoiceQueues($event)" aria-label="delete selected" translate translate-attr-label="VOICEQUEUES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- VOICEQUEUE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedVoiceQueues" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getVoiceQueues">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'VOICE.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'VOICE.NAME\' | translate }}</th>\n                                <th md-column md-order-by="strategy">{{ \'VOICE.STRATEGY\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'VOICE.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.voiceQueues.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="voiceQueue" md-select-id="id" ng-repeat="voiceQueue in vm.voiceQueues.rows">\n                                <td md-cell ng-if="voiceQueue.userpic"><img class="avatar" alt="{{voiceQueue.name}}" ng-src="api/users/{{voiceQueue.id}}/avatar" /></td>\n                                <td md-cell ng-if="!voiceQueue.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{voiceQueue.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditVoiceQueue($event, voiceQueue)" md-cell class="id ">{{voiceQueue.id}}</td>\n                                <td ng-click="vm.createOrEditVoiceQueue($event, voiceQueue)" md-cell class="name ">{{voiceQueue.name}}</td>\n                                <td ng-click="vm.createOrEditVoiceQueue($event, voiceQueue)" md-cell class="strategy ">{{ vm.arraystrategy[voiceQueue.strategy].option }}</td>\n                                <td ng-click="vm.createOrEditVoiceQueue($event, voiceQueue)" md-cell class="description ">{{voiceQueue.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(voiceQueue, $event)" translate="VOICE.EDIT_VOICEQUEUE">\n                                                    Edit VoiceQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.teamadddialog(voiceQueue, $event)" translate="VOICE.TEAMADD_VOICEQUEUE">\n                                                    teamadd VoiceQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.agentadddialog(voiceQueue, $event)" translate="VOICE.AGENTADD_VOICEQUEUE">\n                                                    agentadd VoiceQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(voiceQueue, $event)" translate="VOICE.DELETE_VOICEQUEUE">\n                                                    Delete VoiceQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(voiceQueue, $event)" translate="VOICE.GOTOREALTIME_VOICEQUEUE">\n                                                    goToRealtime VoiceQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.voiceQueues.count}}" md-on-paginate="vm.getVoiceQueues" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / VOICEQUEUE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD VOICEQUEUE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-voiceQueue-button" ng-click="vm.createOrEditVoiceQueue($event)" aria-label="add voiceQueue" translate translate-attr-aria-label="VOICE.ADD_VOICEQUEUE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD VOICEQUEUE BUTTON --\x3e\n</div>'),e.put("app/main/apps/voice/views/voiceRecordings/create/dialog.html",'<md-dialog class="voiceRecording-dialog" aria-label="New VoiceRecording">\n    <form name="voiceRecordingForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.RATING">Rating</label>\n                <md-select name="rating" ng-model="vm.voiceRecording.rating" autofocus>\n                    <md-option ng-value="null">{{\'VOICE.NO_RATING\' | translate}}</md-option>\n                    <md-option value="1">\n                        <md-icon md-font-icon="icon-star" style="color:red" ng-repeat="icon in [1]"></md-icon>\n                    </md-option>\n                    <md-option value="2">\n                        <md-icon md-font-icon="icon-star" style="color:red" ng-repeat="icon in [1,2]"></md-icon>\n                    </md-option>\n                    <md-option value="3">\n                        <md-icon md-font-icon="icon-star" style="color:red" ng-repeat="icon in [1,2,3]"></md-icon>\n                    </md-option>\n                    <md-option value="4">\n                        <md-icon md-font-icon="icon-star" style="color:red" ng-repeat="icon in [1,2,3,4]"></md-icon>\n                    </md-option>\n                    <md-option value="5">\n                        <md-icon md-font-icon="icon-star" style="color:red" ng-repeat="icon in [1,2,3,4,5]"></md-icon>\n                    </md-option>\n                </md-select>\n                <div ng-messages="voiceRecordingForm[\'rating\'].$error" ng-show="voiceRecordingForm[rating].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.RATING_REQUIRED">Rating field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newVoiceRecording" ng-click="vm.saveVoiceRecording()" class="send-button md-accent md-raised" ng-disabled="voiceRecordingForm.$invalid || voiceRecordingForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newVoiceRecording" ng-click="vm.addNewVoiceRecording()" class="send-button md-accent md-raised" ng-disabled="voiceRecordingForm.$invalid" aria-label="ADD" translate="VOICE.ADD_VOICERECORDING" translate-attr-aria-label="VOICE.ADD_VOICERECORDING">\n                    ADD VOICERECORDING\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newVoiceRecording" ng-click="vm.deleteVoiceRecording($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/voiceRecordings/voiceRecordings.html",'<div id="voiceRecordings" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-phone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="VOICE.VOICERECORDINGS">VoiceRecordings</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="VOICE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n            \x3c!-- DATE FILTER --\x3e\n            <div class="padding-horizontal-20" layout="column" layout-align="center center">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_DATE_RANGE">Select Date Range</span>\n                <div layout="row" layout-align="center center">\n                    <md-button ng-if="vm.pickerModel.dateStart" ng-click="vm.clearDateFilter()" class="md-icon-button no-padding width-20 height-20">\n                        <md-tooltip>{{ \'DASHBOARDS.CLEAR\' | translate }}</md-tooltip>\n                        <md-icon md-font-icon="icon-close" class="s16 white-fg"></md-icon>\n                    </md-button>\n                    <md-date-range localization-map="vm.localizationMap" ng-model="vm.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm.getVoiceRecordings()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n                </div>\n            </div>\n            \x3c!-- /DATE FILTER --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedVoiceRecordings.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedVoiceRecordings =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="VOICE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-voiceRecordings-count">\n                    <span>{{vm.selectedVoiceRecordings.length}}</span>\n                <span translate="VOICE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="VOICERECORDINGS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllVoiceRecordings()" translate="VOICE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectVoiceRecordings()" translate="VOICE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedVoiceRecordings" csv-label="true" filename="voiceRecordings.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedVoiceRecordings($event)" aria-label="delete selected" translate translate-attr-label="VOICERECORDINGS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- VOICERECORDING TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedVoiceRecordings" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getVoiceRecordings">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="type">{{ \'VOICE.TYPE\' | translate }}</th>\n                                <th md-column md-order-by="uniqueid">{{ \'VOICE.UNIQUEID\' | translate }}</th>\n                                <th md-column md-order-by="calleridnum">{{ \'VOICE.CALLER\' | translate }}</th>\n                                <th md-column md-order-by="exten">{{ \'VOICE.CALLED\' | translate }}</th>\n                                <th md-column md-order-by="connectedlinenum">{{ \'VOICE.CONNECTED\' | translate }}</th>\n                                <th md-column md-order-by="queue">{{ \'VOICE.QUEUE\' | translate }}</th>\n                                <th md-column md-order-by="membername">{{ \'VOICE.AGENT\' | translate }}</th>\n                                <th md-column md-order-by="rating">{{ \'VOICE.RATING\' | translate }}</th>\n                                <th md-column md-order-by="audio">{{ \'VOICE.AUDIO\' | translate }}</th>\n                                <th md-column md-order-by="createdAt">{{ \'VOICE.DATE\' | translate }}</th>\n                                <th md-column md-order-by="userDisposition">{{ \'VOICE.DISPOSITION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.voiceRecordings.rows.length">\n                                <td md-cell colspan="12">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="voiceRecording" md-select-id="id" ng-repeat="voiceRecording in vm.voiceRecordings.rows">\n                                <td md-cell ng-if="voiceRecording.userpic"><img class="avatar" alt="{{voiceRecording.name}}" ng-src="api/users/{{voiceRecording.id}}/avatar" /></td>\n                                <td md-cell ng-if="!voiceRecording.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{voiceRecording.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditVoiceRecording($event, voiceRecording)" md-cell class="type ">{{voiceRecording.type}}</td>\n                                <td ng-click="vm.createOrEditVoiceRecording($event, voiceRecording)" md-cell class="uniqueid ">{{voiceRecording.uniqueid}}</td>\n                                <td ng-click="vm.createOrEditVoiceRecording($event, voiceRecording)" md-cell class="calleridnum ">{{voiceRecording.calleridnum}}</td>\n                                <td ng-click="vm.createOrEditVoiceRecording($event, voiceRecording)" md-cell class="exten ">{{voiceRecording.exten}}</td>\n                                <td ng-click="vm.createOrEditVoiceRecording($event, voiceRecording)" md-cell class="connectedlinenum ">{{voiceRecording.connectedlinenum}}</td>\n                                <td ng-click="vm.createOrEditVoiceRecording($event, voiceRecording)" md-cell class="queue ">{{voiceRecording.queue}}</td>\n                                <td ng-click="vm.createOrEditVoiceRecording($event, voiceRecording)" md-cell class="membername ">{{voiceRecording.membername}}</td>\n                                <td ng-click="vm.createOrEditVoiceRecording($event, voiceRecording)" md-cell class="rating ">\n                                    <md-icon md-font-icon="icon-star" style="color:red" ng-show="voiceRecording.rating" ng-repeat="rating in [1,2,3,4,5] | limitTo:voiceRecording.rating"></md-icon><span ng-hide="voiceRecording.rating" translate="VOICE.NO_RATING">No rating</span></td>\n                                <td md-cell class="audio " ng-switch="voiceRecording.format">\n                                    \x3c!-- audio recording directive --\x3e\n                                    <ms-recording ng-switch-when=".wav" id="voiceRecording.id"></ms-recording>\n                                    \x3c!-- / audio recording directive --\x3e\n                                    <span ng-switch-when=".gsm|.WAV" ng-switch-when-separator="|">\n                                  <em>{{ \'VOICE.CANT_PLAY_GSM_AUDIO_FILES\' | translate }}</em>\n                                 </span>\n                                </td>\n                                <td ng-click="vm.createOrEditVoiceRecording($event, voiceRecording)" md-cell class="createdAt ">{{voiceRecording.createdAt | date:\'medium\' }}</td>\n                                <td ng-click="vm.createOrEditVoiceRecording($event, voiceRecording)" md-cell class="userDisposition ">{{voiceRecording.userDisposition}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.downloadfile2(voiceRecording, $event)" translate="VOICE.DOWNLOAD_VOICERECORDING">\n                                                    Download VoiceRecording\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(voiceRecording, $event)" translate="VOICE.DELETE_VOICERECORDING">\n                                                    Delete VoiceRecording\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.voiceRecordings.count}}" md-on-paginate="vm.getVoiceRecordings" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / VOICERECORDING TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- NO ADD BUTTON BUTTON --\x3e\n</div>'),e.put("app/navigation/layouts/horizontal-navigation/navigation.html",'<div layout="row" layout-align="start center">\n    <ms-navigation-horizontal></ms-navigation-horizontal>\n</div>'),e.put("app/navigation/layouts/vertical-navigation-fullwidth-toolbar-2/navigation.html",'<ms-navigation class="scrollable" folded="vm.folded" ms-scroll="vm.msScrollOptions">\n</ms-navigation>'),e.put("app/navigation/layouts/vertical-navigation/navigation.html",'<md-toolbar class="navigation-header md-whiteframe-1dp" layout="row" layout-align="space-between center">\n    <div class="logo" layout="row" layout-align="start center">\n        <span class="logo-image"><img src="/api/settings/1/logo" alt="logo" /></span>\n        \x3c!-- <span class="logo-image"><img src="assets/images/logos/whisker_32x32.png" alt="motion_whisker_32x32" /></span> --\x3e\n        <span class="logo-text text-truncate">{{vm.getLogo() | uppercase}}</span>\n    </div>\n    <md-icon class="fold-toggle s18" md-font-icon="icon-backburger" hide show-gt-sm ng-click="vm.toggleMsNavigationFolded()"></md-icon>\n</md-toolbar>\n\n<ms-navigation class="scrollable" folded="vm.folded" ms-scroll="vm.msScrollOptions"></ms-navigation>'),e.put("app/quick-panel/quick-panel.html",'<md-content>\n    <md-tabs md-no-pagination md-swipe-content md-stretch-tabs="always">\n        <md-tab>\n            <md-tab-label>\n                <span translate="QUICKPANEL.TODAY">TODAY</span>\n            </md-tab-label>\n            <md-tab-body>\n                <md-content class="today-tab scrollable" ms-scroll ng-include="\'app/quick-panel/tabs/today/today-tab.html\'"></md-content>\n            </md-tab-body>\n        </md-tab>\n        <md-tab ng-if="vm.currentUser.allowmessenger || vm.currentUser.role !== \'agent\'" ng-include="\'app/quick-panel/tabs/chat/chat-tab.html\'" ng-controller="ChatInternalController as vm_ct" ng-init="vm_ct.init(vm.license)" md-on-deselect="vm_ct.user = undefined">\n            <md-tab-label>\n                <div ng-if="vm.unreadTotalMessages" class="md-accent-bg unread-message-count-chat">{{vm.unreadTotalMessages}}</div>\n                <span>MESSENGER</span>\n            </md-tab-label>\n            <md-tab-body>\n                <md-content class="chat-tab scrollable" ms-scroll ng-include="\'app/quick-panel/tabs/chat/chat-tab.html\'"></md-content>\n            </md-tab-body>\n        </md-tab>\n        <md-tab ng-if="vm.currentUser.allowmessenger || vm.currentUser.role !== \'agent\'" ng-include="\'app/quick-panel/tabs/groups/group-tab.html\'" ng-controller="ChatGroupController as vm_cg" ng-init="vm_cg.init(vm.license)" md-on-deselect="vm_cg.group = undefined">\n            <md-tab-label>\n                <div ng-if="vm.unreadTotalGroupMessages" class="md-accent-bg unread-message-count-chat">{{vm.unreadTotalGroupMessages}}</div>\n                <span translate="QUICKPANEL.GROUPS">GROUPS</span>\n            </md-tab-label>\n            <md-tab-body>\n                <md-content class="group-tab scrollable" ms-scroll ng-include="\'app/quick-panel/tabs/groups/group-tab.html\'"></md-content>\n            </md-tab-body>\n        </md-tab>\n    </md-tabs>\n</md-content>'),e.put("app/quick-panel/tabs/activity/activity-tab.html",'<md-list class="friends">\n    <md-subheader class="md-no-sticky">\n        <span translate="QUICKPANEL.FRIENDS">Friends</span>\n    </md-subheader>\n\n    <md-list-item class="friend md-3-line" ng-repeat="friend in vm.activities.friends">\n        <img ng-src="{{friend.avatar}}" class="md-avatar" alt="{{friend.name}}" />\n\n        <div class="status {{friend.status}}"></div>\n\n        <div ng-if="contact.unread" class="md-accent-bg unread-message-count">{{contact.unread}}</div>\n\n        <div class="md-list-item-text">\n            <h3 class="message">{{friend.message}}</h3>\n            <p class="time">{{friend.time}}</p>\n        </div>\n    </md-list-item>\n</md-list>\n\n<md-divider></md-divider>\n\n<md-list class="servers">\n    <md-subheader class="md-no-sticky">\n        <span translate="QUICKPANEL.APP_SERVERS">Application Servers</span>\n    </md-subheader>\n\n    <md-list-item class="server md-3-line" ng-repeat="server in vm.activities.servers">\n        <md-icon md-font-icon="icon-checkbox-blank-circle" class="s16 status" ng-class="server.status"></md-icon>\n\n        <div class="md-list-item-text">\n            <h3>{{server.location}}</h3>\n            <p>{{server.detail}}</p>\n        </div>\n    </md-list-item>\n</md-list>\n\n<md-divider></md-divider>\n\n<md-list class="stats">\n    <md-subheader class="md-no-sticky">\n        <span translate="QUICKPANEL.USER_STATS">User Stats</span>\n    </md-subheader>\n\n    <md-list-item class="stat md-2-line" ng-repeat="stat in vm.activities.stats">\n        <div class="md-list-item-text">\n            <span>{{stat.title}} ({{stat.current}} / {{stat.total}})</span>\n            <md-progress-linear ng-class="stat.status" md-mode="determinate" value="{{stat.percent}}"></md-progress-linear>\n        </div>\n    </md-list-item>\n</md-list>'),e.put("app/quick-panel/tabs/chat/chat-tab.html",'<div class="main animate-slide-left" ng-hide="vm_ct.user">\n    <md-subheader class="md-no-sticky">\n        <div class="search" layout="row" layout-align="space-between center">\n            <md-icon md-font-icon="icon-magnify" class="icon search-icon"></md-icon>\n            <input class="search-input" ng-model="vm_ct.search.$" type="text" placeholder="Search by fullname.." translate translate-attr-placeholder="QUICKPANEL.SEARCH" flex>\n            <md-select ng-model="vm_ct.search.online" class="height-50 no-padding no-margin">\n                <md-option ng-value="undefined">All</md-option>\n                <md-option ng-value="true">\n                    <md-icon md-font-icon="icon-checkbox-blank-circle" class="s12 green-fg"></md-icon>Online</md-option>\n                <md-option ng-value="false">\n                    <md-icon md-font-icon="icon-checkbox-blank-circle" class="s12 red-fg"></md-icon>Offline</md-option>\n            </md-select>\n        </div>\n    </md-subheader>\n    \x3c!-- <select ng-model="vm_ct.filterOnline" class="height-50 no-padding no-margin">\n            <option ng-value="undefined">All</option>\n            <option ng-value="true"><md-icon md-font-icon="icon-checkbox-blank-circle" class="s12 green-fg"></md-icon>Online</option>\n            <option ng-value="false"><md-icon md-font-icon="icon-checkbox-blank-circle" class="s12 red-fg"></md-icon>Offline</option>\n        </select> --\x3e\n    <md-divider></md-divider>\n    <md-list class="recent">\n        <md-list-item class="contact md-3-line" ng-if="user.id != vm_ct.currentUser.id" ng-repeat="user in vm_ct.users.rows | orderBy: \'-lastMessageAt\' | filter:vm_ct.search" ng-click="vm_ct.toggleChat(user)">\n            <md-divider></md-divider>\n            <img ng-src="{{user.userpic ? \'api/users/\' + user.id + \'/avatar\' : \'assets/images/avatars/profile.png\'}}" class="md-avatar" alt="{{user.fullname}}" />\n            <div class="status" ng-class="{true: \'online\', false: \'offline\'}[user.online]"></div>\n            <div ng-if="vm_ct.unreadMessage[user.id]" class="md-accent-bg unread-message-count">{{vm_ct.unreadMessage[user.id]}}</div>\n            <div class="md-list-item-text">\n                <div layout="row">\n                    <h3>{{user.fullname}}</h3>\n                    <md-icon ng-if="!user.allowmessenger && user.role === \'agent\'" class="s16 margin-left-5" ng-style="{\'color\': \'red\' }" md-font-icon="icon-block-helper"></md-icon>\n                </div>\n                <p>{{user.name}} &#60;{{user.internal}}&#62;</p>\n                <div layout="row" layout-align="start center">\n                    <md-icon ng-if="!user.lastMessage.read && user.lastMessage.FromId === vm_ct.currentUser.id" class="s16 no-margin" md-font-icon="icon-check"></md-icon>\n                    <md-icon ng-if="user.lastMessage.read && user.lastMessage.FromId === vm_ct.currentUser.id" class="s16 no-margin" md-font-icon="icon-check-all md-accent"></md-icon>\n                    <p>{{user.lastMessage.body | limitTo:20 }}{{user.lastMessage.body.length > 20 ? \'...\' : \'\' }}</p>\n                    <span flex></span>\n                    <p class="last-message" ng-if="user.lastMessageAt != vm_ct.standardDate">{{user.lastMessageAt | formatdate}}</p>\n                </div>\n            </div>\n        </md-list-item>\n    </md-list>\n</div>\n\n<div class="chat animate-slide-right" ng-show="vm_ct.user" layout="column">\n    <md-toolbar class="md-accent">\n        <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n\n            <div layout="row" layout-align="start center">\n                <md-button class="md-icon-button" ng-click="vm_ct.toggleChat()" aria-label="Back" translate translate-attr-aria-label="QUICKPANEL.BACK">\n                    <md-icon md-font-icon="icon-keyboard-backspace"></md-icon>\n                </md-button>\n                <h4>\n                    <span>{{vm_ct.user.fullname}}</span>\n                </h4>\n            </div>\n\n            <div layout="row" layout-align="end center">\n                <md-button ng-if="vm_ct.license.webrtc && vm_ct.currentUser.role === \'agent\' && vm_ct.currentUser.showWebBar === 2 && vm_ct.user.role === \'agent\'" class="md-icon-button" aria-label="Call" translate translate-attr-aria-label="QUICKPANEL.CALL" ng-click="vm_ct.webcall(vm_ct.user.name)">\n                    <md-icon md-font-icon="icon-phone"></md-icon>\n                </md-button>\n                <md-menu ng-if="vm_ct.currentUser.phoneBarRemoteControl && vm_ct.currentUser.role === \'agent\' && vm_ct.currentUser.showWebBar === 0 && vm_ct.user.role === \'agent\'">\n                    <md-button class="md-icon-button" aria-label="Call" translate translate-attr-aria-label="QUICKPANEL.CALL" ng-click="$mdOpenMenu($event)">\n                        <md-icon md-font-icon="icon-phone"></md-icon>\n                    </md-button>\n\n                    <md-menu-content width="3">\n                        <md-menu-item ng-disabled="!vm_ct.currentUser.phoneBarRemoteControl">\n                            <md-button ng-click="vm_ct.call(vm_ct.user.name)">\n                                {{\'DASHBOARDS.CALL_NUMBER\' | translate}} ({{vm_ct.user.name}})\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item ng-disabled="!vm_ct.currentUser.phoneBarRemoteControl">\n                            <md-button ng-click="vm_ct.transfer(vm_ct.user.name)">\n                                {{\'DASHBOARDS.TRANSFER_NUMBER\' | translate}} ({{vm_ct.user.name}})\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n\n                \x3c!-- <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="QUICKPANEL.MORE">\n                    <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                </md-button> --\x3e\n            </div>\n        </div>\n\n    </md-toolbar>\n    <md-content flex layout-paddings ms-scroll id="chat-dialog">\n        <div layout="row" ng-repeat="message in vm_ct.user.messages.rows" class="md-padding message-row" ng-class="message.FromId === vm_ct.currentUser.id ? \'user\' : \'contact\'">\n            <img ng-if="message.FromId === vm_ct.user.id" ng-src="{{vm_ct.user.userpic ? \'api/users/\' + vm_ct.user.id + \'/avatar\' : \'assets/images/avatars/profile.png\'}}" class="avatar" alt="{{vm_ct.user.fullname}}" />\n            <img ng-if="message.FromId === vm_ct.currentUser.id" class="avatar" ng-src="{{vm_ct.currentUser.userpic ? \'api/users/\' + vm_ct.currentUser.id + \'/avatar\' : \'assets/images/avatars/profile.png\'}}">\n            <div class="bubble" flex>\n                <span class="message" ng-bind-html="message.body | embed:{linkTarget:\'_blank\',emoji:false,fontSmiley:false}"></span>\n                <div layout="row" layout-align="end center">\n                    <span class="time secondary-text">{{message.createdAt | formatdate }}</span>\n                    <md-icon ng-if="!message.read && message.FromId === vm_ct.currentUser.id" class="s16 margin-5" md-font-icon="icon-check"></md-icon>\n                    <md-icon ng-if="message.read && message.FromId === vm_ct.currentUser.id" class="s16 margin-5" md-font-icon="icon-check-all md-accent"></md-icon>\n                </div>\n            </div>\n        </div>\n    </md-content>\n\n    <form ng-submit="vm_ct.reply()" layout="row" class="reply" layout-align="start center">\n        <textarea ng-keyup="$event.keyCode == 13 && !vm_ct.disabled? vm_ct.reply() : null" flex ng-model="vm_ct.replyMessage" placeholder="Type and hit enter to send message" translate translate-attr-placeholder="QUICKPANEL.REPLY_PLACEHOLDER" autofocus></textarea>\n\n        <md-button ng-disable="vm_ct.disabled" class="md-fab md-mini" type="submit" aria-label="Send message" translate translate-attr-aria-label="QUICKPANEL.SEND_MESSAGE">\n            <md-icon md-font-icon="icon-send"></md-icon>\n        </md-button>\n    </form>\n</div>'),e.put("app/quick-panel/tabs/groups/create/dialog.html",'<md-dialog class="group-dialog" aria-label="New ChatGroup">\n    <form name="groupForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog(null)">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            \x3c!--START Error--\x3e\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            \x3c!--END Error--\x3e\n\n            \x3c!--START NAME--\x3e\n            <md-input-container class="md-block">\n                <label translate="QUICKPANEL.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.group.name" required autofocus>\n                <div ng-messages="groupForm[\'name\'].$error" ng-show="groupForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="QUICKPANEL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="QUICKPANEL.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n                </div>\n            </md-input-container>\n            \x3c!--END NAME--\x3e\n\n            \x3c!--START Members--\x3e\n            <md-input-container class="md-block">\n                <label translate="QUICKPANEL.MEMBERS">Members</label>\n                <md-contact-chips ng-model="vm.group.members" md-contacts="vm.querySearch($query)" md-contact-name="name" md-contact-image="image" md-require-match="true" md-highlight-flags="i" placeholder="{{\'QUICKPANEL.MEMBERS\' | translate}}">\n                </md-contact-chips>\n                <div ng-messages="groupForm[\'strategy\'].$error" ng-show="groupForm[\'strategy\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="QUICKPANEL.ERRORS.MEMBERS_REQUIRED">Members field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            \x3c!--END Members--\x3e\n\n            \x3c!--START Writing--\x3e\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.group.write" aria-label="Write">\n                    {{\'QUICKPANEL.ENABLE_WRITING\' | translate}}\n                </md-switch>\n            </md-input-container>\n            \x3c!--END Writing--\x3e\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="vm.newChatGroup" ng-click="vm.saveChatGroup()" class="send-button md-accent md-raised" ng-disabled="groupForm.$invalid || groupForm.$pristine || (vm.group.members.length < 1)" aria-label="SAVE" translate="QUICKPANEL.SAVE"\n                    translate-attr-aria-label="QUICKPANEL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/quick-panel/tabs/groups/group-tab.html",'<div class="main animate-slide-left" ng-if="!vm_cg.group">\n    <md-subheader>\n        <div layout="row">\n            \x3c!-- START Search --\x3e\n            <div class="search" layout="row" layout-align="start center" flex>\n                <md-icon md-font-icon="icon-magnify" class="icon search-icon"></md-icon>\n                <input ng-model="vm_cg.search" type="text" translate translate-attr-placeholder="QUICKPANEL.SEARCH" flex>\n            </div>\n            \x3c!-- END Search --\x3e\n\n            \x3c!-- START New Group --\x3e\n            <md-button ng-if="vm_cg.currentUser.role !== \'agent\'" class="md-icon-button" aria-label="New" ng-click="vm_cg.addGroup(null, $event)">\n                <md-icon md-font-icon="icon-account-multiple-plus" class="icon"></md-icon>\n            </md-button>\n            \x3c!-- END New Group --\x3e\n        </div>\n    </md-subheader>\n\n    <md-divider></md-divider>\n\n    \x3c!-- START Groups --\x3e\n    <md-list class="recent no-padding">\n        \x3c!-- START Group --\x3e\n        <md-list-item class="contact" ng-repeat="group in vm_cg.groupsToArray() | filter:vm_cg.search" ng-click="vm_cg.toggleChat(group)">\n            <img src="assets/images/avatars/group.png" class="md-avatar" alt="{{group.name}}" />\n            <div ng-if="group.unreadGroupMessages" class="md-accent-bg unread-message-count">{{group.unreadGroupMessages}}</div>\n            <div class="md-list-item-text">\n                <div layout="row">\n                    <h3>{{group.name}}</h3>\n                </div>\n            </div>\n\n            <md-button ng-if="vm_cg.currentUser.role !== \'agent\'" class="md-secondary md-icon-button" aria-label="Remove" ng-click="vm_cg.deleteGroup(group, $event)">\n                <md-icon md-font-icon="icon-delete" class="icon s18"></md-icon>\n            </md-button>\n\n            <md-divider ng-if="!$last"></md-divider>\n        </md-list-item>\n        <md-list-item>\n            <div ng-if="!vm_cg.groupsToArray().length" layout="row" layout-align="center center" flex>\n                <span>{{\'QUICKPANEL.NO_AVAILABLE_GROUPS\' | translate}}</span>\n            </div>\n        </md-list-item>\n        \x3c!-- END Group --\x3e\n    </md-list>\n    \x3c!-- END Groups --\x3e\n</div>\n\n<div class="chat animate-slide-right" ng-if="vm_cg.group" layout="column">\n    <md-toolbar class="md-accent">\n        <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n\n            <div layout="row" layout-align="start center">\n                <md-button class="md-icon-button" ng-click="vm_cg.back()" aria-label="Back" translate translate-attr-aria-label="QUICKPANEL.BACK">\n                    <md-icon md-font-icon="icon-keyboard-backspace"></md-icon>\n                </md-button>\n                <h4>\n                    <span translate="QUICKPANEL.YOU" translate-values=\'{participants: vm_cg.participants}\'></span>\n                </h4>\n            </div>\n\n            <div layout="row" layout-align="end center">\n                <md-button ng-if="vm_cg.license.webrtc && vm_cg.currentUser.role === \'agent\' && vm_cg.currentUser.showWebBar === 2 && vm_cg.user.role === \'agent\' && vm_cg.user.showWebBar === 2" class="md-icon-button" aria-label="Call" translate translate-attr-aria-label="QUICKPANEL.CALL"\n                    ng-click="vm_cg.webcall(vm_cg.user.name)">\n                    <md-icon md-font-icon="icon-phone"></md-icon>\n                </md-button>\n            </div>\n        </div>\n\n    </md-toolbar>\n    <md-content flex layout-paddings ms-scroll id="chat-group-dialog">\n        <div layout="row" ng-repeat="message in vm_cg.group.messages" class="message-row" ng-class="message.FromId === vm_cg.currentUser.id ? \'user\' : \'contact\'">\n            <img ng-if="message.FromId !== vm_cg.currentUser.id" ng-src="{{\'api/users/\' + message.FromId + \'/avatar\'}}" class="avatar" alt="{{vm_cg.user.fullname}}" />\n            <img ng-if="message.FromId === vm_cg.currentUser.id" class="avatar" ng-src="{{vm_cg.currentUser.userpic ? \'api/users/\' + vm_cg.currentUser.id + \'/avatar\' : \'assets/images/avatars/profile.png\'}}">\n            <div class="bubble" flex>\n                <div ng-if="message.FromId !== vm_cg.currentUser.id">\n                    <span style="font-size: 12px;">{{vm_cg.group.membersByKeys[message.FromId].fullname}}</span>\n                </div>\n                <span class="message" ng-bind-html="message.body | embed:{linkTarget:\'_blank\',emoji:false,fontSmiley:false}"></span>\n                <div layout="row" layout-align="end center">\n                    <span class="time secondary-text" style="margin-top: 0px;">{{message.createdAt | formatdate }}</span>\n                    <md-icon ng-if="message.FromId === vm_cg.currentUser.id" class="s16 margin-5" style="cursor: pointer;" md-font-icon="icon-information-outline" ng-click="vm_cg.showMessageInfo($event, message)"></md-icon>\n                </div>\n            </div>\n        </div>\n    </md-content>\n\n    <form ng-if="(vm_cg.currentUser.role !== \'agent\') || vm_cg.group.write" ng-submit="vm_cg.reply()" layout="row" class="reply" layout-align="start center">\n        <textarea ng-keyup="$event.keyCode == 13 ? vm_cg.reply() : null" flex ng-model="vm_cg.replyMessage" placeholder="Type and hit enter to send message" translate translate-attr-placeholder="QUICKPANEL.REPLY_PLACEHOLDER" autofocus></textarea>\n\n        <md-button class="md-fab md-mini" type="submit" aria-label="Send message" translate translate-attr-aria-label="QUICKPANEL.SEND_MESSAGE">\n            <md-icon md-font-icon="icon-send"></md-icon>\n        </md-button>\n    </form>\n</div>'),e.put("app/quick-panel/tabs/groups/info/dialog.html",'<md-dialog class="group-dialog" aria-label="New ChatGroup">\n    <form name="groupForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog(null)">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div ng-if="vm.data.messages[$index].FromId !== vm.data.messages[$index].ToId" ng-repeat="user in vm.data.users" layout-margin>\n                <div layout="row">\n                    <div layout="row" layout-align="start center">\n                        <img ng-src="{{user.userpic ? \'api/users/\' + user.id + \'/avatar\' : \'assets/images/avatars/profile.png\'}}" class="avatar" alt="{{user.fullname}}" />\n                        <span>{{user.fullname}}</span>\n                    </div>\n                    <div layout="row" layout-align="end center" flex>\n                        <md-icon class="s16 margin-5" md-font-icon="{{vm.data.messages[$index].read ? \'icon-check-all md-accent\' : \'icon-check\'}}"></md-icon>\n                        <span class="time secondary-text">{{vm.data.messages[$index].updatedAt | formatdate }}</span>\n                    </div>\n                </div>\n                <div>\n                    <md-divider ng-if="!$last"></md-divider>\n                </div>\n            </div>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/quick-panel/tabs/today/today-tab.html",'<md-list class="date">\n    <md-subheader class="md-no-sticky"><span translate="QUICKPANEL.TODAY">Today</span></md-subheader>\n    <md-list-item class="md-display-1 md-2-line">\n        <div class="secondary-text">\n            <div translate="QUICKPANEL.{{ (vm.date | date:\'EEEE\').toUpperCase() }}"></div>\n            <div layout="row" layout-align="start start">\n                <span> {{vm.date | date:\'d\'}}</span>\n                <span class="md-subhead">th</span>\n                <span translate="QUICKPANEL.{{ (vm.date | date:\'MMMM\').toUpperCase() }}"></span>\n            </div>\n        </div>\n    </md-list-item>\n</md-list>\n\n\x3c!-- <md-divider></md-divider>\n\n<md-list>\n    <md-subheader class="md-no-sticky"><span translate="QUICKPANEL.EVENTS">Events</span></md-subheader>\n\n    <md-list-item class="md-2-line" ng-repeat="event in vm.events" ng-click="dummyFunction()">\n        <div class="md-list-item-text">\n            <h3>{{event.title}}</h3>\n\n            <p>{{event.detail}}</p>\n        </div>\n    </md-list-item>\n</md-list>\n\n<md-divider></md-divider>\n\n<md-list>\n    <md-subheader class="md-no-sticky"><span translate="QUICKPANEL.NOTES">Notes</span></md-subheader>\n    <md-list-item class="md-2-line" ng-repeat="note in vm.notes" ng-click="dummyFunction()">\n        <div class="md-list-item-text">\n            <h3>{{note.title}}</h3>\n\n            <p>{{note.detail}}</p>\n        </div>\n    </md-list-item>\n</md-list>\n\n<md-divider></md-divider>\n\n<md-list>\n    <md-subheader class="md-no-sticky"><span translate="QUICKPANEL.QUICK_SETTINGS">Quick Settings</span></md-subheader>\n\n    <md-list-item>\n        <h3 translate="QUICKPANEL.NOTIFICATIONS">Notifications</h3>\n        <md-switch class="md-secondary" ng-model="vm.settings.notify" aria-label="Notifications" translate\n                   translate-attr-aria-label="QUICKPANEL.NOTIFICATIONS"></md-switch>\n    </md-list-item>\n\n    <md-list-item>\n        <h3 translate="QUICKPANEL.CLOUD_SYNC">Cloud Sync</h3>\n        <md-switch class="md-secondary" ng-model="vm.settings.cloud" aria-label="Cloud Sync" translate\n                   translate-attr-aria-label="QUICKPANEL.CLOUD_SYNC"></md-switch>\n    </md-list-item>\n\n    <md-list-item>\n        <h3 translate="QUICKPANEL.RETRO_THRUSTERS">Retro Thrusters</h3>\n        <md-switch class="md-secondary md-warn" ng-model="vm.settings.retro" aria-label="Retro Thrusters" translate\n                   translate-attr-aria-label="QUICKPANEL.RETRO_THRUSTERS"></md-switch>\n    </md-list-item>\n</md-list> --\x3e'),e.put("app/reset/reset.html",'<div id="reset-password" class="flex-scrollable" layout="column" ng-init="vm.onInit()" ms-scroll>\n    <div id="reset-password-form-wrapper" layout="column" layout-align="center center">\n        <div id="reset-password-form" class="md-whiteframe-8dp">\n\n            <img src="/api/settings/1/logo_login" alt="logo_login" class="logo_login" />\n\n            <div class="title" translate="RESETPASSWORD.TITLE">Reset your password</div>\n\n            <form name="resetPasswordForm" novalidate>\n\n                <md-input-container class="md-block" md-no-float>\n                    <input type="password" name="password" ng-model="vm.form.password" ng-pattern="vm.passwordPattern" placeholder="Password" translate translate-attr-placeholder="RESETPASSWORD.PASSWORD" required>\n                    <div ng-messages="resetPasswordForm.password.$error" role="alert">\n                        <div ng-message="required">\n                            <span translate="RESETPASSWORD.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                        </div>\n                        <div ng-message="pattern">\n                            <span translate="RESETPASSWORD.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                        </div>\n                    </div>\n                </md-input-container>\n\n                <md-input-container class="md-block" md-no-float>\n                    <input type="password" name="passwordConfirm" ng-model="vm.form.passwordConfirm" placeholder="Password (Confirm)" match-password="password" translate translate-attr-placeholder="RESETPASSWORD.PASSWORD_CONFIRM">\n                    <div ng-messages="resetPasswordForm.passwordConfirm.$error" role="alert">\n                        <div ng-message="passwordMatch">\n                            <span translate="TOOLBAR.ERRORS.CONFIRM_NOT_MATCH">Your password did not match</span>\n                        </div>\n                    </div>\n                </md-input-container>\n\n                <md-button type="button" ng-click="vm.resetPassword()" class="md-raised md-accent submit-button" aria-label="UPDATE MY PASSWORD" ng-disabled="resetPasswordForm.$invalid || resetPasswordForm.$pristine" translate="RESETPASSWORD.UPDATE_PASSWORD" translate-attr-aria-label="RESETPASSWORD.UPDATE_PASSWORD">\n                    RESET MY PASSWORD\n                </md-button>\n            </form>\n        </div>\n    </div>\n</div>'),e.put("app/toolbar/changepassword/changepassword.html",'<md-dialog class="user-dialog" aria-label="{{vm.name}}">\n    <form name="changePasswordForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span ng-if="vm.reset" class="title" translate="TOOLBAR.RESETPASSWORD">Reset Password</span>\n                <span ng-if="!vm.reset" class="title" translate="TOOLBAR.CHANGEPASSWORD">Change Password</span>\n                <md-button ng-if="!vm.reset" class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLBAR.OLD_PASSWORD">Old Password</label>\n                <input type="password" name="oldPassword" ng-model="vm.oldPassword" placeholder="Password" translate translate-attr-placeholder="TOOLBAR.OLD_PASSWORD" required>\n                <div ng-messages="changePasswordForm.password.$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLBAR.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLBAR.NEW_PASSWORD">New Password</label>\n                <input type="password" name="password" ng-model="vm.password" placeholder="Password" ng-pattern="vm.passwordPattern" translate translate-attr-placeholder="TOOLBAR.NEW_PASSWORD" required>\n                <div ng-messages="changePasswordForm.password.$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLBAR.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="TOOLBAR.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLBAR.CONFIRM_PASSWORD">Confirm Password</label>\n                <input type="password" match-password="password" name="confirmPassword" ng-model="confirmPassword">\n                <div ng-messages="changePasswordForm.confirmPassword.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span translate="TOOLBAR.ERRORS.CONFIRM_REQUIRED">Confirm field is required</span>\n                    </div>\n                    <div ng-message="passwordMatch">\n                        <span translate="TOOLBAR.ERRORS.CONFIRM_NOT_MATCH">Your password did not match</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.savePassword()" class="send-button md-accent md-raised" ng-disabled="changePasswordForm.$invalid || changePasswordForm.$pristine" aria-label="SAVE" translate="TOOLBAR.SAVE" translate-attr-aria-label="TOOLBAR.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/toolbar/layouts/vertical-navigation/toolbar.html",'<div layout="row" layout-align="start center">\n    <div layout="row" layout-align="start center" flex>\n        <md-button id="navigation-toggle" class="md-icon-button" ng-click="vm.toggleSidenav(\'navigation\')" hide-gt-sm aria-label="Toggle navigation" translate translate-attr-aria-label="TOOLBAR.TOGGLE_NAVIGATION">\n            <md-icon md-font-icon="icon-menu" class="icon"></md-icon>\n        </md-button>\n\n        <ms-shortcuts ng-if="!vm.isAgent()"></ms-shortcuts>\n\n        <div class="toolbar-separator"></div>\n\n        <div ng-if="vm.license.demo" class="blink md-padding">\n            <span class="md-warn-fg" translate="TOOLBAR.TRIAL_VERSION">Trial Version</span>\n        </div>\n\n        <div ng-if="vm.isAgent()" class="logo" layout-padding-left-8 layout="row" layout-align="start center">\n            <span class="logo-image"><img src="/api/settings/1/logo" alt="logo" /></span>\n            <span ng-show="vm.isAgent() && (vm.user.showWebBar != 2)" class="logo-text text-truncate">{{ vm.getLogo() | uppercase }}</span>\n        </div>\n\n        \x3c!-- phonebar directive WebRtc type--\x3e\n        <ms-phonebar class="ms-phonebar" ng-if="vm.isAgent() && (vm.user.showWebBar == 2)" conf="vm.conf" flex></ms-phonebar>\n        \x3c!-- phonebar directive --\x3e\n    </div>\n\n    <div layout="row" layout-align="start center">\n\n        <md-progress-circular id="toolbar-progress" ng-if="$root.loadingProgress" class="md-accent" md-diameter="32"></md-progress-circular>\n\n        \x3c!-- Pause Management --\x3e\n        <div ng-if="vm.isAgent() && (vm.user.showWebBar != 0)" layout="row" layout-align="end center">\n            <div class="toolbar-separator"></div>\n\n            <div class="border brad-5" layout="row" layout-align="center center" layout-margin>\n                <md-button ng-if="vm.user.voicePause" class="md-icon-button no-margin" ng-click="vm.unpause()">\n                    <md-icon md-font-icon="icon-play-circle-outline" class="icon s24"></md-icon>\n                    <md-tooltip md-direction="bottom">{{\'TOOLBAR.RESUME\' | translate}}</md-tooltip>\n                </md-button>\n\n                <md-button ng-disabled="vm.user.voicePause && \'DEFAULT PAUSE\' === vm.user.pauseType" class="md-icon-button no-margin" ng-click="vm.pause()">\n                    <md-icon md-font-icon="icon-pause-circle-outline" class="icon s24"></md-icon>\n                    <md-tooltip md-direction="bottom">{{\'TOOLBAR.PAUSE\' | translate}}</md-tooltip>\n                </md-button>\n\n                <md-menu>\n                    <md-button aria-label="Pauses" class="md-icon-button no-margin" ng-click="$mdOpenMenu($event)">\n                        <md-icon md-menu-origin md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-menu-content width="4">\n                        <md-menu-item ng-if="!vm.pauses.length">\n                            <md-button disabled="disabled">\n                                <md-icon md-font-icon="icon-pause-octagon" md-menu-align-target></md-icon>\n                                {{\'TOOLBAR.NO_PAUSES_AVAILABLE\' | translate}}\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item ng-repeat="pause in vm.pauses">\n                            <md-button ng-disabled="vm.user.voicePause && pause.name === vm.user.pauseType" ng-click="vm.pause(pause.name)">\n                                <md-icon md-font-icon="icon-pause-circle" md-menu-align-target></md-icon>\n                                {{pause.name}}\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n        </div>\n        \x3c!-- Pause Management --\x3e\n\n        <div class="h5 padding-10" ng-if="vm.isAgent() && (vm.user.showWebBar != 0)">\n            <div layout="row" layout-align="space-between center">\n                <timer ng-if="vm.user.lastLoginAt" start-time="vm.user.lastLoginAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                <md-tooltip>{{\'TOOLBAR.LOGIN_TIME\' | translate}}</md-tooltip>\n                <md-icon md-font-icon="icon-timelapse" class="icon s16"></md-icon>\n            </div>\n            <div layout="row" layout-align="center center" ng-if="vm.user.voicePause">\n                <timer start-time="vm.user.lastPauseAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                <md-tooltip>{{\'TOOLBAR.PAUSE_TIME\' | translate}}</md-tooltip>\n                <md-icon md-font-icon="icon-coffee" class="icon s16"></md-icon>\n            </div>\n            <div ng-if="vm.user.voicePause">\n                <span class="blink red-fg">{{vm.user.pauseType || \'default\' | uppercase}}</span>\n            </div>\n        </div>\n\n        <div class="toolbar-separator" ng-if="vm.isAgent() && (vm.user.showWebBar != 0)"></div>\n\n        <md-menu-bar id="user-menu">\n            <md-menu md-position-mode="left bottom">\n                <md-button class="user-button" ng-click="$mdOpenMenu()" aria-label="User settings" translate translate-attr-aria-label="TOOLBAR.USER_SETTINGS">\n                    <div layout="row" layout-align="space-between center">\n                        <div class="avatar-wrapper">\n                            <img md-menu-align-target class="avatar" src="assets/images/avatars/profile.png" ng-if="!vm.user.userpic">\n                            <img md-menu-align-target class="avatar" ng-src="api/users/{{vm.user.id}}/avatar" ng-if="vm.user.userpic">\n                            <md-icon md-font-icon ng-class="vm.userStatus.icon" ng-style="{\'color\': vm.userStatus.color }" class="icon status s16"></md-icon>\n                        </div>\n                        <div layout="column" layout-align="center center" class="padding-horizontal-5">\n                            <span class="font-size-14 md-subhead">{{vm.user.fullname}}</span>\n                            <span class="font-size-12 md-subhead">{{vm.user.name}} &#60;{{vm.user.internal}}&#62;</span>\n                        </div>\n\n                        <md-icon md-font-icon="icon-chevron-down" class="icon s16" hide-xs></md-icon>\n                    </div>\n                </md-button>\n\n                <md-menu-content width="3">\n                    <md-menu-item ng-if="vm.user.showWebBar == 2 && vm.user.phoneBarEnableSettings" class="md-indent">\n                        <md-icon md-font-icon="icon-cog" class="icon"></md-icon>\n                        <md-button ng-click="vm.openSettings($event)" ng-disabled="!vm.license.webrtc"><span translate="TOOLBAR.SETTINGS">SETTINGS</span></md-button>\n                    </md-menu-item>\n\n                    <md-menu-item class="md-indent">\n                        <md-icon md-font-icon="icon-key-variant" class="icon"></md-icon>\n                        <md-button ng-click="vm.changePassword($event)"><span translate="TOOLBAR.CHANGEPASSWORD">Change Password</span></md-button>\n                    </md-menu-item>\n\n                    <md-menu-divider></md-menu-divider>\n\n                    <md-menu-item class="md-indent">\n                        <md-icon md-font-icon="icon-logout" class="icon"></md-icon>\n                        <md-button ng-click="vm.logout()">Logout</md-button>\n                    </md-menu-item>\n                </md-menu-content>\n            </md-menu>\n        </md-menu-bar>\n\n        <div class="toolbar-separator"></div>\n\n        <md-button ng-if="vm.user.role === \'agent\' && vm.license.dialer" class="preview-button no-margin" ng-disabled="vm.disable" ng-click="vm.preview($event)" aria-label="Language" md-menu-origin md-menu-align-target>\n            <div ng-if="vm.contacts" class="md-accent-bg open-contact-count">{{vm.contacts > 99 ? \'99+\' : vm.contacts}}</div>\n            <md-icon md-font-icon="icon-fire" class="icon red-900-fg"></md-icon>\n            <md-tooltip><span translate="TOOLBAR.PREVIEW">Preview</span></md-tooltip>\n        </md-button>\n\n        <ms-search-bar ng-if="vm.user.role !== \'agent\'" on-search="vm.search(query)" on-result-click="vm.searchResultClick(item)" debounce="300" collapse-on-blur="true"></ms-search-bar>\n\n        <md-menu id="language-menu" md-offset="0 72" md-position-mode="target-right target" layout="column" layout-align="center center">\n            <md-button class="md-icon-button no-margin" ng-click="$mdOpenMenu()" aria-label="Language" md-menu-origin md-menu-align-target>\n                <div layout="row" layout-align="center center">\n                    <img class="flag" ng-src="assets/images/flags/{{vm.selectedLanguage.flag}}.png">\n                </div>\n            </md-button>\n\n            <md-menu-content width="3" id="language-menu-content">\n                <md-menu-item ng-repeat="(iso, lang) in vm.languages">\n                    <md-button ng-click="vm.changeLanguage(lang)" aria-label="{{lang.title}}" translate translate-attr-aria-label="{{lang.title}}">\n                        <span layout="row" layout-align="start center">\n                          <img class="flag" ng-src="assets/images/flags/{{lang.flag}}.png">\n                          <span translate="{{lang.translation}}">{{lang.title}}</span>\n                        </span>\n                    </md-button>\n                </md-menu-item>\n            </md-menu-content>\n        </md-menu>\n\n        <div class="toolbar-separator"></div>\n\n        <md-button ng-if="vm.license.gray && vm.user.role !== \'agent\'" class="md-icon-button" ui-sref="app.settings.license" aria-label="Toggle quick panel">\n            <md-icon md-font-icon="icon-alert" class="icon md-warn blink"></md-icon>\n        </md-button>\n        <md-button ng-if="vm.license.gray && vm.user.role === \'agent\'" class="md-icon-button" aria-label="Toggle quick panel">\n            <md-icon md-font-icon="icon-alert" class="icon md-warn blink"></md-icon>\n        </md-button>\n\n        <div ng-if="vm.license.gray" class="toolbar-separator"></div>\n\n        <md-button id="quick-panel-toggle" class="md-icon-button" ng-click="vm.toggleSidenav(\'quick-panel\')" aria-label="Toggle quick panel" translate translate-attr-aria-label="TOOLBAR.TOGGLE_QUICK_PANEL">\n            <div ng-if="(vm.unreadTotalMessages + vm.unreadTotalGroupMessages)" class="md-accent-bg unread-message-count">{{vm.unreadTotalMessages + vm.unreadTotalGroupMessages}}</div>\n            <md-icon md-font-icon="icon-format-list-bulleted" class="icon"></md-icon>\n        </md-button>\n    </div>\n</div>'),e.put("app/toolbar/preview/dialog.html",'<md-dialog class="preview-dialog" aria-label="preview">\n    <form name="previewForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-background-bg">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">Preview</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <div layout="row" ng-if="vm.preview">\n                <div class="md-padding" layout="column" flex="30">\n                    <md-input-container ng-if="vm.preview.Queue.name" class="md-block">\n                        <label translate="VOICE.QUEUE">Queue</label>\n                        <input type="text" ng-model="vm.preview.Queue.name" disabled="true">\n                    </md-input-container>\n                    <md-input-container ng-if="vm.preview.List.name" class="md-block">\n                        <label translate="CONTACTMANAGER.LIST">List</label>\n                        <input type="text" ng-model="vm.preview.List.name" disabled="true">\n                    </md-input-container>\n                </div>\n                <md-divider></md-divider>\n                <div class="md-padding" layout="column" flex="70">\n                    <md-input-container ng-if="vm.preview.Contact.firstName" class="md-block">\n                        <label translate="CONTACTMANAGER.FIRSTNAME">FirstName</label>\n                        <input type="text" ng-model="vm.preview.Contact.firstName" disabled="true">\n                    </md-input-container>\n                    <md-input-container ng-if="vm.preview.Contact.lastName" class="md-block">\n                        <label translate="CONTACTMANAGER.LASTNAME">LastName</label>\n                        <input type="text" ng-model="vm.preview.Contact.lastName" disabled="true">\n                    </md-input-container>\n                    <md-input-container ng-if="vm.preview.Contact.phone" class="md-block">\n                        <label translate="CONTACTMANAGER.PHONE">Phone</label>\n                        <input type="text" ng-model="vm.preview.Contact.phone" disabled="true">\n                    </md-input-container>\n                    <md-input-container ng-if="vm.preview.Contact.email" class="md-block">\n                        <label translate="CONTACTMANAGER.EMAIL">Email</label>\n                        <input type="text" ng-model="vm.preview.Contact.email" disabled="true">\n                    </md-input-container>\n                </div>\n            </div>\n            <div layout="row" ng-if="!vm.preview">\n                <span>no contacts available</span>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center" style="padding-right: 16px;">\n            <md-button type="submit" ng-disabled="vm.disable" ng-click="vm.originatePreview($event)" class="send-button md-accent md-raised" aria-label="CALL" translate="TOOLS.CALL" translate-attr-aria-label="TOOLS.CALL">\n                CALL\n            </md-button>\n            <md-button type="submit" ng-disabled="vm.disableGetContact" ng-click="vm.nextContact($event)" class="send-button md-accent md-raised" aria-label="NEXTCONTACT" translate="TOOLS.NEXTCONTACT" translate-attr-aria-label="TOOLS.NEXTCONTACT">\n                NEXTCONTACT\n            </md-button>\n        </md-dialog-actions>\n    </form>\n</md-dialog>')}]);
\ No newline at end of file
+!function(){"use strict";angular.module("app.auth",[])}(),function(){"use strict";angular.module("app.core",["ngAnimate","ngAria","ngCookies","ngMessages","ngResource","ngSanitize","ngMaterial","pascalprecht.translate","ui.router","gridster","ds.clock","angucomplete-alt"])}(),function(){"use strict";function e(e,t){e.state("app.errors_error-404",{url:"/errors/error-404",views:{"main@":{templateUrl:"app/core/layouts/content-only.html",controller:"MainController as vm"},"content@app.errors_error-404":{templateUrl:"app/errors/404/error-404.html",controller:"Error404Controller as vm"}},params:{status:404,statusText:"",data:{},config:{}},bodyClass:"error-404"}),t.addPart("app/errors/404")}e.$inject=["$stateProvider","$translatePartialLoaderProvider"],angular.module("app.errors.error-404",[]).config(e)}(),function(){"use strict";function e(e,t){e.state("app.errors_error-500",{url:"/errors/error-500",views:{"main@":{templateUrl:"app/core/layouts/content-only.html",controller:"MainController as vm"},"content@app.errors_error-500":{templateUrl:"app/errors/500/error-500.html",controller:"Error500Controller as vm"}},params:{status:500,statusText:"",data:{},config:{}},bodyClass:"error-500"}),t.addPart("app/errors/500")}e.$inject=["$stateProvider","$translatePartialLoaderProvider"],angular.module("app.errors.error-500",[]).config(e)}(),function(){"use strict";angular.module("app.errors",["app.errors.error-404","app.errors.error-500"])}(),function(){"use strict";function e(e){e.addPart("app/footer")}e.$inject=["$translatePartialLoaderProvider"],angular.module("app.footer",[]).config(e)}(),function(){"use strict";function e(e,t){e.state("app.forgot",{url:"/forgot",views:{"main@":{templateUrl:"app/core/layouts/content-only.html",controller:"MainController as vm"},"content@app.forgot":{templateUrl:"app/forgot/forgot.html",controller:"ForgotPasswordController as vm"}},bodyClass:"forgot"}),t.addPart("app/forgot")}e.$inject=["$stateProvider","$translatePartialLoaderProvider"],angular.module("app.forgot",[]).config(e)}(),function(){"use strict";function e(e){e.addPart("app/header")}e.$inject=["$translatePartialLoaderProvider"],angular.module("app.header",[]).config(e)}(),function(){"use strict";angular.module("motion",["angular-toasty","app.core","app.auth","app.navigation","app.toolbar","app.quick-panel","app.header","app.footer","app.dashboards","app.staff","app.contactmanager","app.voice","app.chat","app.mail","app.sms","app.openchannel","app.fax","app.tools","app.callysquare","app.analytics","app.integrations","app.settings","app.help","app.motiondialer","app.jscripty","app.login","app.forgot","app.reset","app.errors"])}(),function(){"use strict";function e(e,t){e.state("app.login",{url:"/login?token&userId",views:{"main@":{templateUrl:"app/core/layouts/content-only.html",controller:"MainController as vm"},"content@app.login":{templateUrl:"app/login/login.html",controller:"LoginController as vm"}},bodyClass:"login"}),t.addPart("app/login")}e.$inject=["$stateProvider","$translatePartialLoaderProvider"],angular.module("app.login",[]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.analytics",{abstract:!0,url:"/analytics"}).state("app.analytics.metrics",{url:"/metrics",views:{"content@app":{templateUrl:"app/main/apps/analytics/views/metrics/metrics.html",controller:"MetricsController as vm"}},resolve:{metrics:["apiResolver",function(e){return e.resolve("analyticMetric@get",{fields:"createdAt,updatedAt,id,name,table,metric,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1201,bodyClass:"analytics"}).state("app.analytics.extractedReports",{url:"/extractedReports",views:{"content@app":{templateUrl:"app/main/apps/analytics/views/extractedReports/extractedReports.html",controller:"ExtractedReportsController as vm"}},resolve:{extractedReports:["apiResolver",function(e){return e.resolve("analyticExtractedReport@get",{fields:"createdAt,updatedAt,id,name,basename,savename,type,startDate,endDate,createdAt,status,output",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1202,bodyClass:"analytics"}),t.addPart("app/main/apps/analytics")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.analytics",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.analytics.reports"]).config(e)}(),function(){"use strict";function e(e){e.state("app.analytics.reports",{url:"/reports",views:{"content@app":{templateUrl:"app/main/apps/analytics/views/reports/reports.html",controller:"ReportsController as vm"}},resolve:{treeReports:["apiResolver",function(e){return e.resolve("analyticTreeReport@get",{fields:"id,tree",limit:10,offset:0})}]},authenticate:!0,permissionId:1203,bodyClass:"analytics"}).state("app.analytics.reports.edit",{url:"/:id?tab",views:{"content@app":{templateUrl:"app/main/apps/analytics/views/reports/edit/view.html",controller:"ReportController as vm"}},resolve:{report:["apiResolver","$stateParams","$q","describeTable",function(e,t,a,i){var o;return e.resolve("analyticCustomReport@get",{fields:"createdAt,updatedAt,id,name,description,table,conditions,joins",id:t.id}).then(function(e){var t=[];if((o=e).joins)try{o.joins=JSON.parse(o.joins);for(var n=0;n<o.joins.length;n+=1)t.push(i.getColumns(o.joins[n].foreignTable))}catch(e){console.log(e)}return a.all(t)}).then(function(e){for(var t=0;t<e.length;t+=1)o.joins[t].foreignTableFields=_.difference(_.keys(e[t]),["$promise","$resolved"]);return o})}]},authenticate:!0,permissionId:1203,bodyClass:"analytics"})}e.$inject=["$stateProvider"],angular.module("app.analytics.reports",["ngJsTree"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.callysquare",{abstract:!0,url:"/callysquare"}).state("app.callysquare.odbcs",{url:"/odbcs",views:{"content@app":{templateUrl:"app/main/apps/callysquare/views/odbcs/odbcs.html",controller:"OdbcsController as vm"}},resolve:{odbcs:["apiResolver",function(e){return e.resolve("squareOdbc@get",{fields:"createdAt,updatedAt,id,name,dsn,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1101,bodyClass:"callysquare"}).state("app.callysquare.squareRecordings",{url:"/squareRecordings",views:{"content@app":{templateUrl:"app/main/apps/callysquare/views/squareRecordings/squareRecordings.html",controller:"SquareRecordingsController as vm"}},resolve:{squareRecordings:["apiResolver",function(e){return e.resolve("squareRecording@get",{fields:"createdAt,updatedAt,id,filename,projectName,uniqueid,callerid,extension,audio,createdAt",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1102,bodyClass:"callysquare"}),t.addPart("app/main/apps/callysquare")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.callysquare",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.callysquare.projects"]).config(e)}(),function(){"use strict";function e(e){e.state("app.callysquare.projects",{url:"/projects",views:{"content@app":{templateUrl:"app/main/apps/callysquare/views/projects/projects.html",controller:"ProjectsController as vm"}},resolve:{projects:["apiResolver",function(e){return e.resolve("squareProject@get",{fields:"id,name,description,notes",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1103,bodyClass:"callysquare"}).state("app.callysquare.projects.edit",{url:"/:id?tab",views:{"content@app":{templateUrl:"app/main/apps/callysquare/views/projects/edit/view.html",controller:"ProjectController as vm"}},resolve:{project:["apiResolver","$stateParams",function(e,t){return e.resolve("squareProject@get",{id:t.id})}],users:["apiResolver",function(e){return e.resolve("user@get",{fields:"id,fullname,role",sort:"name",nolimit:!0})}],trunks:["apiResolver",function(e){return e.resolve("trunk@get",{fields:"id,name",sort:"name",nolimit:!0})}],queues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("voiceQueue@get",{type:"inbound",fields:"id,name",sort:"name",nolimit:!0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,type:"inbound",fields:"id,name",sort:"name",nolimit:!0,channel:"voice"})}],sounds:["apiResolver",function(e){return e.resolve("sound@get",{fields:"id,name",sort:"name",nolimit:!0})}],variables:["apiResolver",function(e){return e.resolve("variable@get",{fields:"id,name",sort:"name",nolimit:!0})}],databases:["apiResolver",function(e){return e.resolve("squareOdbc@get",{fields:"id,name",sort:"name",nolimit:!0})}],projects:["apiResolver",function(e){return e.resolve("squareProject@get",{fields:"id,name",sort:"name",nolimit:!0})}],contexts:["apiResolver",function(e){return e.resolve("voiceContext@get",{fields:"id,name",sort:"name",nolimit:!0})}],intervals:["apiResolver",function(e){return e.resolve("interval@get",{fields:"id,name,IntervalId",sort:"name",nolimit:!0})}],mailAccounts:["apiResolver",function(e){return e.resolve("mailAccount@get",{fields:"id,name",sort:"name",nolimit:!0})}],templates:["apiResolver",function(e){return e.resolve("template@get",{fields:"id,name",sort:"name",nolimit:!0})}],lists:["apiResolver",function(e){return e.resolve("cmList@get",{fields:"id,name",sort:"name",nolimit:!0})}],smsAccounts:["apiResolver",function(e){return e.resolve("smsAccount@get",{fields:"id,name",sort:"name",nolimit:!0})}],pauses:["apiResolver",function(e){return e.resolve("pause@get",{fields:"id,name",sort:"name",nolimit:!0})}]},authenticate:!0,permissionId:1103,bodyClass:"callysquare"})}e.$inject=["$stateProvider"],angular.module("app.callysquare.projects",[]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.chat",{abstract:!0,url:"/chat"}).state("app.chat.chatQueues",{url:"/chatQueues",views:{"content@app":{templateUrl:"app/main/apps/chat/views/chatQueues/chatQueues.html",controller:"ChatQueuesController as vm"}},resolve:{chatQueues:["apiResolver",function(e){return e.resolve("chatQueue@get",{fields:"createdAt,updatedAt,id,name,strategy,timeout,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:501,bodyClass:"chat"}).state("app.chat.chatQueues.edit",{url:"/:id?tab",params:{chatQueue:void 0},views:{"content@app":{templateUrl:"app/main/apps/chat/views/chatQueues/edit/view.html",controller:"ChatQueueController as vm"}},resolve:{chatQueue:["apiResolver","$stateParams",function(e,t){return e.resolve("chatQueue@get",{fields:"createdAt,updatedAt,id,name,strategy,timeout,description",id:t.id})}]},authenticate:!0,permissionId:501,bodyClass:"chat"}).state("app.chat.chatWebsites",{url:"/chatWebsites",views:{"content@app":{templateUrl:"app/main/apps/chat/views/chatWebsites/chatWebsites.html",controller:"ChatWebsitesController as vm"}},resolve:{chatWebsites:["apiResolver",function(e){return e.resolve("chatWebsite@get",{fields:"createdAt,updatedAt,id,token,agentIdentifier,name,key,address,remote,ListId,fidelity,timeout,agentAlias,closingQuestion,formSubmitSuccessMessage,formSubmitFailureMessage,color,color_focus,color_button,textColor,fontSize,header_shape,showAgentAvatar,animation,defaultWhiteLabel,whiteLabel,defaultLogo,conditionAgreement,autoclose,enableUnmanagedNote,unmanagedMessage,skipUnmanaged,sendUnmanaged,enableCustomerWriting,waitingTitle,waitingMessage,closingMessage,noteTitle,placeholderMessage,skipMessageButton,enableRating,ratingType,ratingStarsNumber,enableFeedback,forwardTranscript,forwardTranscriptMessage,closingMessageButton,download_transcript,enableCustomerAttachment,enquiry_enable,enquiry_forwarding,enquiry_forwarding_address,name_title,username_placeholder,email_title,email_placeholder,header_online,hideWhenOffline,header_offline,start_chat_button,offline_chat_button,offlineMessageSubject,offlineMessageBody,header_offline,offline_message,message_title,enquiry_message_placeholder,enquiry_button,rating_message,rating_send,rating_skip,acceptMethod,acceptUrl,rejectMethod,rejectUrl,closeMethod,closeUrl,onlineForm,offlineForm,mapKey,mapKeyOffline,forwardTranscript,forwardOffline,forwardOfflineAddress,IntervalId,timezone,waitForTheAssignedAgent,description,notificationSound,notificationShake,notificationTemplate",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:502,bodyClass:"chat"}).state("app.chat.chatWebsites.edit",{url:"/:id?tab",params:{chatWebsite:void 0},views:{"content@app":{templateUrl:"app/main/apps/chat/views/chatWebsites/edit/view.html",controller:"ChatWebsiteController as vm"}},resolve:{chatWebsite:["apiResolver","$stateParams",function(e,t){return e.resolve("chatWebsite@get",{fields:"createdAt,updatedAt,id,token,agentIdentifier,name,key,address,remote,ListId,fidelity,timeout,agentAlias,closingQuestion,formSubmitSuccessMessage,formSubmitFailureMessage,color,color_focus,color_button,textColor,fontSize,header_shape,showAgentAvatar,animation,defaultWhiteLabel,whiteLabel,defaultLogo,conditionAgreement,autoclose,enableUnmanagedNote,unmanagedMessage,skipUnmanaged,sendUnmanaged,enableCustomerWriting,waitingTitle,waitingMessage,closingMessage,noteTitle,placeholderMessage,skipMessageButton,enableRating,ratingType,ratingStarsNumber,enableFeedback,forwardTranscript,forwardTranscriptMessage,closingMessageButton,download_transcript,enableCustomerAttachment,enquiry_enable,enquiry_forwarding,enquiry_forwarding_address,name_title,username_placeholder,email_title,email_placeholder,header_online,hideWhenOffline,header_offline,start_chat_button,offline_chat_button,offlineMessageSubject,offlineMessageBody,header_offline,offline_message,message_title,enquiry_message_placeholder,enquiry_button,rating_message,rating_send,rating_skip,acceptMethod,acceptUrl,rejectMethod,rejectUrl,closeMethod,closeUrl,onlineForm,offlineForm,mapKey,mapKeyOffline,forwardTranscript,forwardOffline,forwardOfflineAddress,IntervalId,timezone,waitForTheAssignedAgent,description,notificationSound,notificationShake,notificationTemplate",id:t.id})}]},authenticate:!0,permissionId:502,bodyClass:"chat"}),t.addPart("app/main/apps/chat")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.chat",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.chat.realtime"]).config(e)}(),function(){"use strict";function e(e){e.state("app.chat.realtime",{url:"/realtime",views:{"content@app":{templateUrl:"app/main/apps/chat/views/realtime/realtime.html",controller:"ChatRealtimeController as vm"}},authenticate:!0,permissionId:510}).state("app.chat.realtime.agents",{url:"/agents",controller:"AgentsChatRealtimeController as vm",templateUrl:"app/main/apps/chat/views/realtime/agents/view.html",resolve:{pauses:["apiResolver",function(e){return e.resolve("pause@get",{nolimit:!0})}],agents:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("user@get",{fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastPauseAt,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0}):e.resolve("user@getAgents",{id:t.getCurrentUser().id,fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0})}],rpcAgents:["apiResolver",function(e){return e.resolve("rpc@getAgents")}]},authenticate:!0,permissionId:510}).state("app.chat.realtime.queues",{url:"/queues",controller:"QueuesChatRealtimeController as vm",templateUrl:"app/main/apps/chat/views/realtime/queues/view.html",resolve:{queues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("chatQueue@get",{type:"inbound",sort:"-updatedAt",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,channel:"chat",type:"inbound",sort:"-updatedAt",limit:10,page:1})}],rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getChatQueues")}]},authenticate:!0,permissionId:510})}e.$inject=["$stateProvider"],angular.module("app.chat.realtime",["timer"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.contactmanager",{abstract:!0,url:"/contactmanager"}).state("app.contactmanager.lists",{url:"/lists",views:{"content@app":{templateUrl:"app/main/apps/contactmanager/views/lists/lists.html",controller:"ListsController as vm"}},resolve:{lists:["apiResolver",function(e){return e.resolve("cmList@get",{fields:"createdAt,updatedAt,id,name,description,dialPrefix",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:301,bodyClass:"contactmanager"}).state("app.contactmanager.lists.edit",{url:"/:id?tab",params:{list:void 0},views:{"content@app":{templateUrl:"app/main/apps/contactmanager/views/lists/edit/view.html",controller:"ListController as vm"}},resolve:{list:["apiResolver","$stateParams",function(e,t){return e.resolve("cmList@get",{fields:"createdAt,updatedAt,id,name,description,dialPrefix",id:t.id})}]},authenticate:!0,permissionId:301,bodyClass:"contactmanager"}).state("app.contactmanager.companies",{url:"/companies",views:{"content@app":{templateUrl:"app/main/apps/contactmanager/views/companies/companies.html",controller:"CompaniesController as vm"}},resolve:{companies:["apiResolver",function(e){return e.resolve("cmCompany@get",{fields:"createdAt,updatedAt,id,name,phone,vat,fax,companyId,type,website,emailDomain,email,description,sStreet,sPostalCode,sCity,sCountry,street,postalCode,city,country",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:302,bodyClass:"contactmanager"}).state("app.contactmanager.companies.edit",{url:"/:id?tab",params:{company:void 0},views:{"content@app":{templateUrl:"app/main/apps/contactmanager/views/companies/edit/view.html",controller:"CompanyController as vm"}},resolve:{company:["apiResolver","$stateParams",function(e,t){return e.resolve("cmCompany@get",{fields:"createdAt,updatedAt,id,name,phone,vat,fax,companyId,type,website,emailDomain,email,description,sStreet,sPostalCode,sCity,sCountry,street,postalCode,city,country",id:t.id})}]},authenticate:!0,permissionId:302,bodyClass:"contactmanager"}).state("app.contactmanager.globalCustomFields",{url:"/globalCustomFields",views:{"content@app":{templateUrl:"app/main/apps/contactmanager/views/globalCustomFields/globalCustomFields.html",controller:"GlobalCustomFieldsController as vm"}},resolve:{globalCustomFields:["apiResolver",function(e){return e.resolve("cmCustomField@get",{fields:"createdAt,updatedAt,id,alias,type,values,required",sort:"-updatedAt",ListId:"null",limit:10,offset:0})}]},authenticate:!0,permissionId:304,bodyClass:"contactmanager"}),t.addPart("app/main/apps/contactmanager")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.contactmanager",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.contactmanager.contacts"]).config(e)}(),function(){"use strict";function e(e){e.state("app.contactmanager.contacts",{url:"/contacts?ListId&CompanyId",views:{"content@app":{templateUrl:"app/main/apps/contactmanager/views/contacts/contacts.html",controller:"ContactsController as vm"}},resolve:{contacts:["apiResolver","$stateParams",function(e,t){return e.resolve("cmContact@get",_.merge({sort:"-updatedAt",limit:10,offset:0},t))}],lists:["apiResolver",function(e){return e.resolve("cmList@get",{fields:"id,name",sort:"name",nolimit:!0})}],listsMap:["lists",function(e){for(var t={},n=0;n<e.rows.length;n++)t[e.rows[n].id]=e.rows[n].name;return t}],companies:["apiResolver",function(e){return e.resolve("cmCompany@get",{fields:"id,name",sort:"name",nolimit:!0})}],companiesMap:["companies",function(e){for(var t={},n=0;n<e.rows.length;n++)t[e.rows[n].id]=e.rows[n].name;return t}],tags:["apiResolver",function(e){return e.resolve("tag@get",{fields:"id,name",sort:"name",nolimit:!0})}]},authenticate:!0,permissionId:300,bodyClass:"contactmanager"}).state("app.contactmanager.contacts.edit",{url:"/:id?tab",views:{"content@app":{templateUrl:"app/main/apps/contactmanager/views/contacts/edit/view.html",controller:"ContactController as vm"}},resolve:{contact:["apiResolver","$stateParams",function(e,t){return e.resolve("cmContact@get",{id:t.id}).then(function(e){return e.dateOfBirth&&(e.dateOfBirth=new Date(e.dateOfBirth)),e}).catch(function(e){console.error(e)})}],hoppers:["apiResolver","$stateParams",function(e,t){return e.resolve("cmContact@getHoppers",{id:t.id,fields:"id,phone,scheduledat,priority,recallme,VoiceQueueId,CampaignId,UserId",sort:"-updatedAt",limit:10,offset:0})}],finals:["apiResolver","$stateParams",function(e,t){return e.resolve("cmContact@getHopperFinals",{id:t.id,fields:"id,uniqueid,calleridnum,statedesc,starttime,disposition",sort:"-updatedAt",limit:10,offset:0})}],histories:["apiResolver","$stateParams",function(e,t){return e.resolve("cmContact@getHopperHistories",{id:t.id,fields:"id,uniqueid,calleridnum,statedesc,scheduledat,starttime,endtime",sort:"-updatedAt",limit:10,offset:0})}],jscriptySessions:["apiResolver","$stateParams",function(e,t){return e.resolve("cmContact@getJscriptySessions",{id:t.id,fields:"id,starttime,endtime,membername,projectname",sort:"-starttime",limit:10,offset:0})}],companies:["apiResolver","$stateParams",function(e,t){return e.resolve("cmCompany@get")}],lists:["apiResolver",function(e){return e.resolve("cmList@get",{fields:"id,name",sort:"-updatedAt",nolimit:!0})}],customFields:["apiResolver","contact",function(e,t){return t.ListId?e.resolve("cmList@getCustomFields",{id:t.ListId}):null}],tags:["apiResolver","$stateParams",function(e,t){return e.resolve("tag@get")}]},authenticate:!0,permissionId:300,bodyClass:"contactmanager"})}e.$inject=["$stateProvider"],angular.module("app.contactmanager.contacts",[]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.dashboards",{abstract:!0,url:"/dashboards"}),t.addPart("app/main/apps/dashboards")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.dashboards",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.dashboards.general","app.dashboards.custom"]).config(e)}(),function(){"use strict";function e(e){e.state("app.dashboards.custom",{url:"/custom/:id",views:{"content@app":{templateUrl:"app/main/apps/dashboards/views/custom/custom.html",controller:"DashboardCustomController as vm"}},resolve:{voiceQueues:["apiResolver","Auth",function(t,e){var a;return(e.hasRole("admin")?t.resolve("voiceQueue@get",{fields:"id,name",nolimit:!0}):t.resolve("user@getQueues",{id:e.getCurrentUser().id,fields:"id,name",channel:"voice",nolimit:!0})).then(function(e){return a=e,t.resolve("rpc@getVoiceQueues")}).then(function(e){if(e)for(var t,n=0;n<e.rows.length;n+=1)(t=_.find(a.rows,{id:e.rows[n].id}))&&_.merge(t,_.pick(e.rows[n],["waiting","total","talking","answered","unmanaged"]));return a})}]},authenticate:!0,bodyClass:"dashboards"})}e.$inject=["$stateProvider"],angular.module("app.dashboards.custom",[]).config(e)}(),function(){"use strict";function e(e){e.state("app.dashboards.general",{url:"/general",data:{selectedTab:0},views:{"content@app":{templateProvider:["$stateParams","$templateFactory","Auth",function(e,t,n){var a=n.getCurrentUser();return a&&"agent"===a.role?t.fromUrl("app/main/apps/dashboards/views/general/agent/agent.general.html",e):t.fromUrl("app/main/apps/dashboards/views/general/user/user.general.html",e)}],controllerProvider:["Auth",function(e){var t=e.getCurrentUser();return t&&"agent"===t.role?"AgentDashboardGeneralController as vm":"UserDashboardGeneralController as vm"}]}},resolve:{globalUserLists:["apiResolver","Auth",function(e,t){return e.resolve("user@getLists",{id:t.getCurrentUser().id,sort:"name",nolimit:!0})}],globalLists:["apiResolver","Auth",function(e,t){return e.resolve("cmList@get",{sort:"name",nolimit:!0})}],globalTags:["apiResolver",function(e){return e.resolve("tag@get",{sort:"name",nolimit:!0})}],globalCompanies:["apiResolver",function(e){return e.resolve("cmCompany@get",{sort:"name",nolimit:!0})}]},authenticate:!0,bodyClass:"dashboards"})}e.$inject=["$stateProvider"],angular.module("app.dashboards.general",["ngMaterialDateRangePicker","app.dashboards.general.user"]).config(e)}(),function(){"use strict";function e(e){e.state("app.dashboards.general.voice",{url:"/voice",data:{selectedTab:0},views:{voice:{templateUrl:"app/main/apps/dashboards/views/general/user/voice/user.general.voice.html",controller:"UserVoiceDashboardGeneralController as vm"}},resolve:{rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getVoiceQueues")}],inboundQueues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("voiceQueue@get",{fields:"id,name",type:"inbound",nolimit:!0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,fields:"id,name",channel:"voice",type:"inbound",nolimit:!0})}],outbound:["apiResolver",function(e){return e.resolve("rpc@getOutbound")}]},authenticate:!0,bodyClass:"dashboards"}).state("app.dashboards.general.dialer",{url:"/dialer",data:{selectedTab:1},views:{dialer:{templateUrl:"app/main/apps/dashboards/views/general/user/dialer/user.general.dialer.html",controller:"UserVoiceDashboardDialerController as vm"}},resolve:{rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getVoiceQueues")}],outboundQueues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("voiceQueue@get",{fields:"id,name",type:"outbound",nolimit:!0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,fields:"id,name",channel:"voice",type:"outbound",nolimit:!0})}],rpcCampaigns:["apiResolver",function(e){return e.resolve("rpc@getCampaigns")}]},authenticate:!0,bodyClass:"dashboards"})}e.$inject=["$stateProvider"],angular.module("app.dashboards.general.user",[]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.fax",{abstract:!0,url:"/fax"}).state("app.fax.faxQueues",{url:"/faxQueues",views:{"content@app":{templateUrl:"app/main/apps/fax/views/faxQueues/faxQueues.html",controller:"FaxQueuesController as vm"}},resolve:{faxQueues:["apiResolver",function(e){return e.resolve("faxQueue@get",{fields:"createdAt,updatedAt,id,name,strategy,timeout,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:901,bodyClass:"fax"}).state("app.fax.faxQueues.edit",{url:"/:id?tab",params:{faxQueue:void 0},views:{"content@app":{templateUrl:"app/main/apps/fax/views/faxQueues/edit/view.html",controller:"FaxQueueController as vm"}},resolve:{faxQueue:["apiResolver","$stateParams",function(e,t){return e.resolve("faxQueue@get",{fields:"createdAt,updatedAt,id,name,strategy,timeout,description",id:t.id})}]},authenticate:!0,permissionId:901,bodyClass:"fax"}).state("app.fax.faxAccounts",{url:"/faxAccounts",views:{"content@app":{templateUrl:"app/main/apps/fax/views/faxAccounts/faxAccounts.html",controller:"FaxAccountsController as vm"}},resolve:{faxAccounts:["apiResolver",function(e){return e.resolve("faxAccount@get",{fields:"createdAt,updatedAt,id,name,key,headerinfo,TrunkId,localstationid,ListId,waitForTheAssignedAgent,description,ecm,minrate,maxrate,modem,gateway,faxdetect,t38timeout,tech,acceptMethod,acceptUrl,rejectMethod,rejectUrl,closeMethod,closeUrl,notificationSound,notificationShake,notificationTemplate",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:902,bodyClass:"fax"}).state("app.fax.faxAccounts.edit",{url:"/:id?tab",params:{faxAccount:void 0},views:{"content@app":{templateUrl:"app/main/apps/fax/views/faxAccounts/edit/view.html",controller:"FaxAccountController as vm"}},resolve:{faxAccount:["apiResolver","$stateParams",function(e,t){return e.resolve("faxAccount@get",{fields:"createdAt,updatedAt,id,name,key,headerinfo,TrunkId,localstationid,ListId,waitForTheAssignedAgent,description,ecm,minrate,maxrate,modem,gateway,faxdetect,t38timeout,tech,acceptMethod,acceptUrl,rejectMethod,rejectUrl,closeMethod,closeUrl,notificationSound,notificationShake,notificationTemplate",id:t.id})}]},authenticate:!0,permissionId:902,bodyClass:"fax"}),t.addPart("app/main/apps/fax")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.fax",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.fax.realtime"]).config(e)}(),function(){"use strict";function e(e){e.state("app.fax.realtime",{url:"/realtime",views:{"content@app":{templateUrl:"app/main/apps/fax/views/realtime/realtime.html",controller:"FaxRealtimeController as vm"}},authenticate:!0,permissionId:910}).state("app.fax.realtime.agents",{url:"/agents",controller:"AgentsFaxRealtimeController as vm",templateUrl:"app/main/apps/fax/views/realtime/agents/view.html",resolve:{pauses:["apiResolver",function(e){return e.resolve("pause@get",{nolimit:!0})}],agents:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("user@get",{fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastPauseAt,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0}):e.resolve("user@getAgents",{id:t.getCurrentUser().id,fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0})}],rpcAgents:["apiResolver",function(e){return e.resolve("rpc@getAgents")}]},authenticate:!0,permissionId:910}).state("app.fax.realtime.trunks",{url:"/trunks",controller:"TrunksFaxRealtimeController as vm",templateUrl:"app/main/apps/fax/views/realtime/trunks/view.html",resolve:{trunks:["apiResolver",function(e){return e.resolve("trunk@get",{fields:"id,name",active:!0,sort:"-updatedAt",limit:10,offset:0})}],rpcTrunks:["apiResolver",function(e){return e.resolve("rpc@getTrunks")}]},authenticate:!0,permissionId:910}).state("app.fax.realtime.queues",{url:"/queues",controller:"QueuesFaxRealtimeController as vm",templateUrl:"app/main/apps/fax/views/realtime/queues/view.html",resolve:{queues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("faxQueue@get",{type:"inbound",sort:"-updatedAt",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,channel:"fax",type:"inbound",sort:"-updatedAt",limit:10,page:1})}],rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getFaxQueues")}]},authenticate:!0,permissionId:910}).state("app.fax.realtime.accounts",{url:"/accounts",controller:"FaxAccountsRealtimeController as vm",templateUrl:"app/main/apps/fax/views/realtime/accounts/view.html",resolve:{faxAccounts:["apiResolver",function(e){return e.resolve("faxAccount@get",{sort:"-name",limit:10,offset:0})}],rpcFaxAccounts:["apiResolver",function(e){return e.resolve("rpc@getFaxAccounts")}]},authenticate:!0,permissionId:910})}e.$inject=["$stateProvider"],angular.module("app.fax.realtime",["timer"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.help",{abstract:!0,url:"/help"}),t.addPart("app/main/apps/help")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.help",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.help.about"]).config(e)}(),function(){"use strict";function e(e){e.state("app.help.about",{url:"/about",views:{"content@app":{templateUrl:"app/main/apps/help/views/about/about.html",controller:"AboutController as vm"}},resolve:{info:["apiResolver",function(e){return e.resolve("version@get")}]},authenticate:!0,permissionId:1405,bodyClass:"help"})}e.$inject=["$stateProvider"],angular.module("app.help.about",[]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.integrations",{abstract:!0,url:"/integrations"}).state("app.integrations.zendeskAccounts",{url:"/zendeskAccounts",views:{"content@app":{templateUrl:"app/main/apps/integrations/views/zendeskAccounts/zendeskAccounts.html",controller:"ZendeskAccountsController as vm"}},resolve:{zendeskAccounts:["apiResolver",function(e){return e.resolve("intZendeskAccount@get",{fields:"createdAt,updatedAt,id,name,type,username,remoteUri,authType,password,token,serverUrl,description",limit:10,offset:0})}]},authenticate:!0,permissionId:1301,bodyClass:"integrations"}).state("app.integrations.zendeskAccounts.edit",{url:"/:id?tab",params:{zendeskAccount:void 0},views:{"content@app":{templateUrl:"app/main/apps/integrations/views/zendeskAccounts/edit/view.html",controller:"ZendeskAccountController as vm"}},resolve:{zendeskAccount:["apiResolver","$stateParams",function(e,t){return e.resolve("intZendeskAccount@get",{fields:"createdAt,updatedAt,id,name,type,username,remoteUri,authType,password,token,serverUrl,description",id:t.id})}]},authenticate:!0,permissionId:1301,bodyClass:"integrations"}).state("app.integrations.salesforceAccounts",{url:"/salesforceAccounts",views:{"content@app":{templateUrl:"app/main/apps/integrations/views/salesforceAccounts/salesforceAccounts.html",controller:"SalesforceAccountsController as vm"}},resolve:{salesforceAccounts:["apiResolver",function(e){return e.resolve("intSalesforceAccount@get",{fields:"createdAt,updatedAt,id,name,type,username,remoteUri,password,clientId,clientSecret,securityToken,serverUrl,description",limit:10,offset:0})}]},authenticate:!0,permissionId:1302,bodyClass:"integrations"}).state("app.integrations.salesforceAccounts.edit",{url:"/:id?tab",params:{salesforceAccount:void 0},views:{"content@app":{templateUrl:"app/main/apps/integrations/views/salesforceAccounts/edit/view.html",controller:"SalesforceAccountController as vm"}},resolve:{salesforceAccount:["apiResolver","$stateParams",function(e,t){return e.resolve("intSalesforceAccount@get",{fields:"createdAt,updatedAt,id,name,type,username,remoteUri,password,clientId,clientSecret,securityToken,serverUrl,description",id:t.id})}]},authenticate:!0,permissionId:1302,bodyClass:"integrations"}).state("app.integrations.freshdeskAccounts",{url:"/freshdeskAccounts",views:{"content@app":{templateUrl:"app/main/apps/integrations/views/freshdeskAccounts/freshdeskAccounts.html",controller:"FreshdeskAccountsController as vm"}},resolve:{freshdeskAccounts:["apiResolver",function(e){return e.resolve("intFreshdeskAccount@get",{fields:"createdAt,updatedAt,id,name,username,remoteUri,apiKey,serverUrl,description",limit:10,offset:0})}]},authenticate:!0,permissionId:1303,bodyClass:"integrations"}).state("app.integrations.freshdeskAccounts.edit",{url:"/:id?tab",params:{freshdeskAccount:void 0},views:{"content@app":{templateUrl:"app/main/apps/integrations/views/freshdeskAccounts/edit/view.html",controller:"FreshdeskAccountController as vm"}},resolve:{freshdeskAccount:["apiResolver","$stateParams",function(e,t){return e.resolve("intFreshdeskAccount@get",{fields:"createdAt,updatedAt,id,name,username,remoteUri,apiKey,serverUrl,description",id:t.id})}]},authenticate:!0,permissionId:1303,bodyClass:"integrations"}).state("app.integrations.sugarcrmAccounts",{url:"/sugarcrmAccounts",views:{"content@app":{templateUrl:"app/main/apps/integrations/views/sugarcrmAccounts/sugarcrmAccounts.html",controller:"SugarcrmAccountsController as vm"}},resolve:{sugarcrmAccounts:["apiResolver",function(e){return e.resolve("intSugarcrmAccount@get",{fields:"createdAt,updatedAt,id,name,username,remoteUri,password,serverUrl,description",limit:10,offset:0})}]},authenticate:!0,permissionId:1304,bodyClass:"integrations"}).state("app.integrations.sugarcrmAccounts.edit",{url:"/:id?tab",params:{sugarcrmAccount:void 0},views:{"content@app":{templateUrl:"app/main/apps/integrations/views/sugarcrmAccounts/edit/view.html",controller:"SugarcrmAccountController as vm"}},resolve:{sugarcrmAccount:["apiResolver","$stateParams",function(e,t){return e.resolve("intSugarcrmAccount@get",{fields:"createdAt,updatedAt,id,name,username,remoteUri,password,serverUrl,description",id:t.id})}]},authenticate:!0,permissionId:1304,bodyClass:"integrations"}).state("app.integrations.deskAccounts",{url:"/deskAccounts",views:{"content@app":{templateUrl:"app/main/apps/integrations/views/deskAccounts/deskAccounts.html",controller:"DeskAccountsController as vm"}},resolve:{deskAccounts:["apiResolver",function(e){return e.resolve("intDeskAccount@get",{fields:"createdAt,updatedAt,id,name,type,remoteUri,authType,username,password,serverUrl,description",limit:10,offset:0})}]},authenticate:!0,permissionId:1302,bodyClass:"integrations"}).state("app.integrations.deskAccounts.edit",{url:"/:id?tab",params:{deskAccount:void 0},views:{"content@app":{templateUrl:"app/main/apps/integrations/views/deskAccounts/edit/view.html",controller:"DeskAccountController as vm"}},resolve:{deskAccount:["apiResolver","$stateParams",function(e,t){return e.resolve("intDeskAccount@get",{fields:"createdAt,updatedAt,id,name,type,remoteUri,authType,username,password,serverUrl,description",id:t.id})}]},authenticate:!0,permissionId:1302,bodyClass:"integrations"}).state("app.integrations.zohoAccounts",{url:"/zohoAccounts",views:{"content@app":{templateUrl:"app/main/apps/integrations/views/zohoAccounts/zohoAccounts.html",controller:"ZohoAccountsController as vm"}},resolve:{zohoAccounts:["apiResolver",function(e){return e.resolve("intZohoAccount@get",{fields:"createdAt,updatedAt,id,name,host,authToken,serverUrl,description",limit:10,offset:0})}]},authenticate:!0,permissionId:1302,bodyClass:"integrations"}).state("app.integrations.zohoAccounts.edit",{url:"/:id?tab",params:{zohoAccount:void 0},views:{"content@app":{templateUrl:"app/main/apps/integrations/views/zohoAccounts/edit/view.html",controller:"ZohoAccountController as vm"}},resolve:{zohoAccount:["apiResolver","$stateParams",function(e,t){return e.resolve("intZohoAccount@get",{fields:"createdAt,updatedAt,id,name,host,authToken,serverUrl,description",id:t.id})}]},authenticate:!0,permissionId:1302,bodyClass:"integrations"}),t.addPart("app/main/apps/integrations")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.integrations",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.jscripty",{abstract:!0,url:"/jscripty"}).state("app.jscripty.projects",{url:"/projects",views:{"content@app":{templateUrl:"app/main/apps/jscripty/views/projects/projects.html",controller:"JscriptyProjectsController as vm"}},resolve:{projects:["apiResolver",function(e){return e.resolve("jscriptyProject@get",{fields:"createdAt,updatedAt,id,name,enableUncompleteSave,description,createdAt,formData",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1701,bodyClass:"jscripty"}).state("app.jscripty.projects.edit",{url:"/:id?tab",params:{project:void 0},views:{"content@app":{templateUrl:"app/main/apps/jscripty/views/projects/edit/view.html",controller:"JscriptyProjectController as vm"}},resolve:{project:["apiResolver","$stateParams",function(e,t){return e.resolve("jscriptyProject@get",{fields:"createdAt,updatedAt,id,name,enableUncompleteSave,description,createdAt,formData",id:t.id})}]},authenticate:!0,permissionId:1701,bodyClass:"jscripty"}),t.addPart("app/main/apps/jscripty")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.jscripty",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.mail",{abstract:!0,url:"/mail"}).state("app.mail.mailQueues",{url:"/mailQueues",views:{"content@app":{templateUrl:"app/main/apps/mail/views/mailQueues/mailQueues.html",controller:"MailQueuesController as vm"}},resolve:{mailQueues:["apiResolver",function(e){return e.resolve("mailQueue@get",{fields:"createdAt,updatedAt,id,name,strategy,timeout,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:601,bodyClass:"mail"}).state("app.mail.mailQueues.edit",{url:"/:id?tab",params:{mailQueue:void 0},views:{"content@app":{templateUrl:"app/main/apps/mail/views/mailQueues/edit/view.html",controller:"MailQueueController as vm"}},resolve:{mailQueue:["apiResolver","$stateParams",function(e,t){return e.resolve("mailQueue@get",{fields:"createdAt,updatedAt,id,name,strategy,timeout,description",id:t.id})}]},authenticate:!0,permissionId:601,bodyClass:"mail"}).state("app.mail.mailAccounts",{url:"/mailAccounts",views:{"content@app":{templateUrl:"app/main/apps/mail/views/mailAccounts/mailAccounts.html",controller:"MailAccountsController as vm"}},resolve:{mailAccounts:["apiResolver",function(e){return e.resolve("mailAccount@get",{fields:"createdAt,updatedAt,id,name,key,email,ListId,active,cservice,Imap.service,Imap.host,Imap.port,Imap.tls,Imap.authentication,Imap.user,Imap.password,Imap.mailbox,Imap.connTimeout,Imap.authTimeout,Smtp.service,Smtp.host,Smtp.port,Smtp.secure,Smtp.authentication,Smtp.user,Smtp.pass,cauthentication,cuser,cpassword,fontFamily,fontSize,template,markAsUnread,waitForTheAssignedAgent,description,notificationSound,notificationShake,notificationTemplate",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:602,bodyClass:"mail"}).state("app.mail.mailAccounts.edit",{url:"/:id?tab",params:{mailAccount:void 0},views:{"content@app":{templateUrl:"app/main/apps/mail/views/mailAccounts/edit/view.html",controller:"MailAccountController as vm"}},resolve:{mailAccount:["apiResolver","$stateParams",function(e,t){return e.resolve("mailAccount@get",{fields:"createdAt,updatedAt,id,name,key,email,ListId,active,cservice,Imap.service,Imap.host,Imap.port,Imap.tls,Imap.authentication,Imap.user,Imap.password,Imap.mailbox,Imap.connTimeout,Imap.authTimeout,Smtp.service,Smtp.host,Smtp.port,Smtp.secure,Smtp.authentication,Smtp.user,Smtp.pass,cauthentication,cuser,cpassword,fontFamily,fontSize,template,markAsUnread,waitForTheAssignedAgent,description,notificationSound,notificationShake,notificationTemplate",id:t.id})}]},authenticate:!0,permissionId:602,bodyClass:"mail"}).state("app.mail.mailSubtatuses",{url:"/mailSubtatuses",views:{"content@app":{templateUrl:"app/main/apps/mail/views/mailSubtatuses/mailSubtatuses.html",controller:"MailSubstatusesController as vm"}},resolve:{mailSubtatuses:["apiResolver",function(e){return e.resolve("mailSubstatus@get",{fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:603,bodyClass:"mail"}),t.addPart("app/main/apps/mail")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.mail",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.mail.realtime"]).config(e)}(),function(){"use strict";function e(e){e.state("app.mail.realtime",{url:"/realtime",views:{"content@app":{templateUrl:"app/main/apps/mail/views/realtime/realtime.html",controller:"MailRealtimeController as vm"}},authenticate:!0,permissionId:610}).state("app.mail.realtime.agents",{url:"/agents",controller:"AgentsMailRealtimeController as vm",templateUrl:"app/main/apps/mail/views/realtime/agents/view.html",resolve:{pauses:["apiResolver",function(e){return e.resolve("pause@get",{nolimit:!0})}],agents:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("user@get",{fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastPauseAt,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0}):e.resolve("user@getAgents",{id:t.getCurrentUser().id,fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0})}],rpcAgents:["apiResolver",function(e){return e.resolve("rpc@getAgents")}]},authenticate:!0,permissionId:610}).state("app.mail.realtime.queues",{url:"/queues",controller:"QueuesMailRealtimeController as vm",templateUrl:"app/main/apps/mail/views/realtime/queues/view.html",resolve:{queues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("mailQueue@get",{type:"inbound",sort:"-updatedAt",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,channel:"mail",type:"inbound",sort:"-updatedAt",limit:10,page:1})}],rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getMailQueues")}]},authenticate:!0,permissionId:610}).state("app.mail.realtime.accounts",{url:"/accounts",controller:"MailAccountsRealtimeController as vm",templateUrl:"app/main/apps/mail/views/realtime/accounts/view.html",resolve:{mailAccounts:["apiResolver",function(e){return e.resolve("mailAccount@get",{sort:"-name",limit:10,offset:0})}],rpcMailAccounts:["apiResolver",function(e){return e.resolve("rpc@getMailAccounts")}]},authenticate:!0,permissionId:610})}e.$inject=["$stateProvider"],angular.module("app.mail.realtime",["timer"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.motiondialer",{abstract:!0,url:"/motiondialer"}).state("app.motiondialer.queueCampaigns",{url:"/queueCampaigns",views:{"content@app":{templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/queueCampaigns.html",controller:"QueueCampaignsController as vm"}},resolve:{queueCampaigns:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("voiceQueue@get",{fields:"createdAt,updatedAt,id,name,dialActive,TrunkId,TrunkBackupId,type,IntervalId,dialCheckDuplicateType,acw,acwTimeout,autopause,ringinuse,memberdelay,timeoutrestart,monitor_format,context,setinterfacevar,setqueuevar,setqueueentryvar,dialOrderByScheduledAt,dialRecallMeTimeout,dialRecallInQueue,dialGlobalInterval,dialTimezone,dialAMDActive,dialAMDInitialSilence,dialAMDGreeting,dialAMDAfterGreetingSilence,dialAMDTotalAnalysisTime,dialAMDMinWordLength,dialAMDBetweenWordsSilence,dialAMDMaximumNumberOfWords,dialAMDSilenceThreshold,dialAMDMaximumWordLength,dialMethod,dialPowerLevel,dialPredictiveOptimization,dialPredictiveOptimizationPercentage,dialPredictiveInterval,dialLimitQueue,dialOriginateCallerIdName,dialOriginateCallerIdNumber,dialOriginateTimeout,dialPrefix,dialQueueOptions,dialQueueTimeout,strategy,timeout,retry,wrapuptime,weight,musiconhold,dialQueueProject,dialQueueProject2,dialQueueProject,dialQueueProject2,dialAgiAfterHangupAgent,dialGlobalMaxRetry,dialCongestionMaxRetry,dialCongestionRetryFrequency,dialBusyMaxRetry,dialBusyRetryFrequency,dialNoAnswerMaxRetry,dialNoAnswerRetryFrequency,description",type:"outbound",sort:"-updatedAt",channel:"voice",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,fields:"createdAt,updatedAt,id,name,dialActive,TrunkId,TrunkBackupId,type,IntervalId,dialCheckDuplicateType,acw,acwTimeout,autopause,ringinuse,memberdelay,timeoutrestart,monitor_format,context,setinterfacevar,setqueuevar,setqueueentryvar,dialOrderByScheduledAt,dialRecallMeTimeout,dialRecallInQueue,dialGlobalInterval,dialTimezone,dialAMDActive,dialAMDInitialSilence,dialAMDGreeting,dialAMDAfterGreetingSilence,dialAMDTotalAnalysisTime,dialAMDMinWordLength,dialAMDBetweenWordsSilence,dialAMDMaximumNumberOfWords,dialAMDSilenceThreshold,dialAMDMaximumWordLength,dialMethod,dialPowerLevel,dialPredictiveOptimization,dialPredictiveOptimizationPercentage,dialPredictiveInterval,dialLimitQueue,dialOriginateCallerIdName,dialOriginateCallerIdNumber,dialOriginateTimeout,dialPrefix,dialQueueOptions,dialQueueTimeout,strategy,timeout,retry,wrapuptime,weight,musiconhold,dialQueueProject,dialQueueProject2,dialQueueProject,dialQueueProject2,dialAgiAfterHangupAgent,dialGlobalMaxRetry,dialCongestionMaxRetry,dialCongestionRetryFrequency,dialBusyMaxRetry,dialBusyRetryFrequency,dialNoAnswerMaxRetry,dialNoAnswerRetryFrequency,description",type:"outbound",sort:"-updatedAt",channel:"voice",limit:10,offset:0})}]},authenticate:!0,permissionId:1501,bodyClass:"motiondialer"}).state("app.motiondialer.queueCampaigns.edit",{url:"/:id?tab",params:{queueCampaign:void 0},views:{"content@app":{templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/view.html",controller:"QueueCampaignController as vm"}},resolve:{queueCampaign:["apiResolver","$stateParams",function(e,t){return e.resolve("voiceQueue@get",{fields:"createdAt,updatedAt,id,name,dialActive,TrunkId,TrunkBackupId,type,IntervalId,dialCheckDuplicateType,acw,acwTimeout,autopause,ringinuse,memberdelay,timeoutrestart,monitor_format,context,setinterfacevar,setqueuevar,setqueueentryvar,dialOrderByScheduledAt,dialRecallMeTimeout,dialRecallInQueue,dialGlobalInterval,dialTimezone,dialAMDActive,dialAMDInitialSilence,dialAMDGreeting,dialAMDAfterGreetingSilence,dialAMDTotalAnalysisTime,dialAMDMinWordLength,dialAMDBetweenWordsSilence,dialAMDMaximumNumberOfWords,dialAMDSilenceThreshold,dialAMDMaximumWordLength,dialMethod,dialPowerLevel,dialPredictiveOptimization,dialPredictiveOptimizationPercentage,dialPredictiveInterval,dialLimitQueue,dialOriginateCallerIdName,dialOriginateCallerIdNumber,dialOriginateTimeout,dialPrefix,dialQueueOptions,dialQueueTimeout,strategy,timeout,retry,wrapuptime,weight,musiconhold,dialQueueProject,dialQueueProject2,dialQueueProject,dialQueueProject2,dialAgiAfterHangupAgent,dialGlobalMaxRetry,dialCongestionMaxRetry,dialCongestionRetryFrequency,dialBusyMaxRetry,dialBusyRetryFrequency,dialNoAnswerMaxRetry,dialNoAnswerRetryFrequency,description",id:t.id})}]},authenticate:!0,permissionId:1501,bodyClass:"motiondialer"}).state("app.motiondialer.ivrCampaigns",{url:"/ivrCampaigns",views:{"content@app":{templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/ivrCampaigns.html",controller:"IvrCampaignsController as vm"}},resolve:{ivrCampaigns:["apiResolver",function(e){return e.resolve("campaign@get",{fields:"createdAt,updatedAt,id,name,active,TrunkId,TrunkBackupId,type,IntervalId,dialCheckDuplicateType,SquareProjectId,limitCalls,description,dialOriginateCallerIdName,dialOriginateCallerIdNumber,dialOriginateTimeout,dialGlobalMaxRetry,dialCongestionMaxRetry,dialCongestionRetryFrequency,dialBusyMaxRetry,dialBusyRetryFrequency,dialNoAnswerMaxRetry,dialNoAnswerRetryFrequency,dialOrderByScheduledAt,dialGlobalInterval,dialTimezone,dialPrefix,dialAMDActive,dialAMDInitialSilence,dialAMDGreeting,dialAMDAfterGreetingSilence,dialAMDTotalAnalysisTime,dialAMDMinWordLength,dialAMDBetweenWordsSilence,dialAMDMaximumNumberOfWords,dialAMDSilenceThreshold,dialAMDMaximumWordLength",type:"ivr",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1502,bodyClass:"motiondialer"}).state("app.motiondialer.ivrCampaigns.edit",{url:"/:id?tab",params:{ivrCampaign:void 0},views:{"content@app":{templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/view.html",controller:"IvrCampaignController as vm"}},resolve:{ivrCampaign:["apiResolver","$stateParams",function(e,t){return e.resolve("campaign@get",{fields:"createdAt,updatedAt,id,name,active,TrunkId,TrunkBackupId,type,IntervalId,dialCheckDuplicateType,SquareProjectId,limitCalls,description,dialOriginateCallerIdName,dialOriginateCallerIdNumber,dialOriginateTimeout,dialGlobalMaxRetry,dialCongestionMaxRetry,dialCongestionRetryFrequency,dialBusyMaxRetry,dialBusyRetryFrequency,dialNoAnswerMaxRetry,dialNoAnswerRetryFrequency,dialOrderByScheduledAt,dialGlobalInterval,dialTimezone,dialPrefix,dialAMDActive,dialAMDInitialSilence,dialAMDGreeting,dialAMDAfterGreetingSilence,dialAMDTotalAnalysisTime,dialAMDMinWordLength,dialAMDBetweenWordsSilence,dialAMDMaximumNumberOfWords,dialAMDSilenceThreshold,dialAMDMaximumWordLength",id:t.id})}]},authenticate:!0,permissionId:1502,bodyClass:"motiondialer"}),t.addPart("app/main/apps/motiondialer")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.motiondialer",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.motiondialer.realtime"]).config(e)}(),function(){"use strict";function e(e){e.state("app.motiondialer.realtime",{url:"/realtime",views:{"content@app":{templateUrl:"app/main/apps/motiondialer/views/realtime/realtime.html",controller:"MotionDialerRealtimeController as vm"}},authenticate:!0,permissionId:1510}).state("app.motiondialer.realtime.agents",{url:"/agents",controller:"AgentsMotionDialerRealtimeController as vm",templateUrl:"app/main/apps/motiondialer/views/realtime/agents/view.html",resolve:{pauses:["apiResolver",function(e){return e.resolve("pause@get",{nolimit:!0})}],agents:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("user@get",{fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastPauseAt,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0}):e.resolve("user@getAgents",{id:t.getCurrentUser().id,fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0})}],rpcAgents:["apiResolver",function(e){return e.resolve("rpc@getAgents")}]},authenticate:!0,permissionId:1510}).state("app.motiondialer.realtime.queues",{url:"/queues",controller:"QueuesMotionDialerRealtimeController as vm",templateUrl:"app/main/apps/motiondialer/views/realtime/queues/view.html",resolve:{queues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("voiceQueue@get",{type:"outbound",sort:"-updatedAt",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,channel:"voice",type:"outbound",sort:"-updatedAt",limit:10,page:1})}],rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getVoiceQueues")}]},authenticate:!0,permissionId:1510}).state("app.motiondialer.realtime.queue_calls",{url:"/queue_calls",controller:"QueueCallsMotionDialerRealtimeController as vm",templateUrl:"app/main/apps/motiondialer/views/realtime/queue_calls/view.html",resolve:{agents:["apiResolver",function(e){return e.resolve("user@get",{fields:"id,name,role",role:"agent",nolimit:!0})}],rpcVoiceQueuesChannels:["apiResolver",function(e){return e.resolve("rpc@getVoiceQueuesChannels")}]},authenticate:!0,permissionId:1510}).state("app.motiondialer.realtime.abandonedcalls",{url:"/abandonedcalls",controller:"AbandonedCallsMotionDialerRealtimeController as vm",templateUrl:"app/main/apps/motiondialer/views/realtime/abandonedcalls/view.html",resolve:{agents:["apiResolver",function(e){return e.resolve("user@get",{fields:"id,name,role",role:"agent",nolimit:!0})}]},authenticate:!0,permissionId:1510}).state("app.motiondialer.realtime.queue_params",{url:"/queue_params",controller:"QueueParamsMotionDialerRealtimeController as vm",templateUrl:"app/main/apps/motiondialer/views/realtime/queue_params/view.html",resolve:{queues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("voiceQueue@get",{type:"outbound",fields:"id,name",sort:"-updatedAt",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,channel:"voice",type:"outbound",fields:"id,name",sort:"-updatedAt",limit:10,page:1})}],rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getVoiceQueues")}]},authenticate:!0,permissionId:1510}).state("app.motiondialer.realtime.ivr_campaigns",{url:"/ivr_campaigns",controller:"IvrCampaignsMotionDialerRealtimeController as vm",templateUrl:"app/main/apps/motiondialer/views/realtime/ivr_campaigns/view.html",resolve:{campaigns:["apiResolver",function(e){return e.resolve("campaign@get",{sort:"-updatedAt",limit:10,offset:0})}],rpcCampaigns:["apiResolver",function(e){return e.resolve("rpc@getCampaigns")}]},authenticate:!0,permissionId:1510})}e.$inject=["$stateProvider"],angular.module("app.motiondialer.realtime",["timer"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.openchannel",{abstract:!0,url:"/openchannel"}).state("app.openchannel.openchannelQueues",{url:"/openchannelQueues",views:{"content@app":{templateUrl:"app/main/apps/openchannel/views/openchannelQueues/openchannelQueues.html",controller:"OpenchannelQueuesController as vm"}},resolve:{openchannelQueues:["apiResolver",function(e){return e.resolve("openchannelQueue@get",{fields:"createdAt,updatedAt,id,name,strategy,timeout,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:801,bodyClass:"openchannel"}).state("app.openchannel.openchannelQueues.edit",{url:"/:id?tab",params:{openchannelQueue:void 0},views:{"content@app":{templateUrl:"app/main/apps/openchannel/views/openchannelQueues/edit/view.html",controller:"OpenchannelQueueController as vm"}},resolve:{openchannelQueue:["apiResolver","$stateParams",function(e,t){return e.resolve("openchannelQueue@get",{fields:"createdAt,updatedAt,id,name,strategy,timeout,description",id:t.id})}]},authenticate:!0,permissionId:801,bodyClass:"openchannel"}).state("app.openchannel.openchannelAccounts",{url:"/openchannelAccounts",views:{"content@app":{templateUrl:"app/main/apps/openchannel/views/openchannelAccounts/openchannelAccounts.html",controller:"OpenchannelAccountsController as vm"}},resolve:{openchannelAccounts:["apiResolver",function(e){return e.resolve("openchannelAccount@get",{fields:"createdAt,updatedAt,id,name,key,replyUri,ListId,waitForTheAssignedAgent,description,receiveUri,notificationSound,notificationShake,notificationTemplate",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:802,bodyClass:"openchannel"}).state("app.openchannel.openchannelAccounts.edit",{url:"/:id?tab",params:{openchannelAccount:void 0},views:{"content@app":{templateUrl:"app/main/apps/openchannel/views/openchannelAccounts/edit/view.html",controller:"OpenchannelAccountController as vm"}},resolve:{openchannelAccount:["apiResolver","$stateParams",function(e,t){return e.resolve("openchannelAccount@get",{fields:"createdAt,updatedAt,id,name,key,replyUri,ListId,waitForTheAssignedAgent,description,receiveUri,notificationSound,notificationShake,notificationTemplate",id:t.id})}]},authenticate:!0,permissionId:802,bodyClass:"openchannel"}),t.addPart("app/main/apps/openchannel")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.openchannel",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.openchannel.realtime"]).config(e)}(),function(){"use strict";function e(e){e.state("app.openchannel.realtime",{url:"/realtime",views:{"content@app":{templateUrl:"app/main/apps/openchannel/views/realtime/realtime.html",controller:"OpenchannelRealtimeController as vm"}},authenticate:!0,permissionId:810}).state("app.openchannel.realtime.agents",{url:"/agents",controller:"AgentsOpenchannelRealtimeController as vm",templateUrl:"app/main/apps/openchannel/views/realtime/agents/view.html",resolve:{pauses:["apiResolver",function(e){return e.resolve("pause@get",{nolimit:!0})}],agents:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("user@get",{fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastPauseAt,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0}):e.resolve("user@getAgents",{id:t.getCurrentUser().id,fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0})}],rpcAgents:["apiResolver",function(e){return e.resolve("rpc@getAgents")}]},authenticate:!0,permissionId:810}).state("app.openchannel.realtime.queues",{url:"/queues",controller:"QueuesOpenchannelRealtimeController as vm",templateUrl:"app/main/apps/openchannel/views/realtime/queues/view.html",resolve:{queues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("openchannelQueue@get",{type:"inbound",sort:"-updatedAt",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,channel:"openchannel",type:"inbound",sort:"-updatedAt",limit:10,page:1})}],rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getOpenchannelQueues")}]},authenticate:!0,permissionId:810})}e.$inject=["$stateProvider"],angular.module("app.openchannel.realtime",["timer"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.settings",{abstract:!0,url:"/settings"}).state("app.settings.generals",{url:"/generals",views:{"content@app":{templateUrl:"app/main/apps/settings/views/generals/generals.html",controller:"GeneralsController as vm"}},resolve:{generals:["apiResolver",function(e){return e.resolve("setting@get",{fields:"createdAt,updatedAt,id,min_internal,securePassword,callRecordingEncryption,stunaddr,turnaddr,turnusername,turnpassword,phoneBarAutoUpdater,phoneBarAutoUpdaterUrl",limit:10,offset:0})}]},authenticate:!0,permissionId:1401,bodyClass:"settings"}).state("app.settings.smtps",{url:"/smtps",views:{"content@app":{templateUrl:"app/main/apps/settings/views/smtps/smtps.html",controller:"SmtpController as vm"}},resolve:{smtps:["apiResolver",function(e){return e.resolve("mailAccount@get",{fields:"createdAt,updatedAt,id,service,name,email,Smtp.service,Smtp.host,Smtp.port,Smtp.secure,Smtp.authentication,Smtp.user,Smtp.pass,description",service:"1",limit:10,offset:0})}]},authenticate:!0,permissionId:1402,bodyClass:"settings"}).state("app.settings.networks",{url:"/networks",views:{"content@app":{templateUrl:"app/main/apps/settings/views/networks/networks.html",controller:"NetworksController as vm"}},resolve:{networks:["apiResolver",function(e){return e.resolve("network@get",{fields:"createdAt,updatedAt,id,type,value,value,createdAt",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1403,bodyClass:"settings"}).state("app.settings.customizations",{url:"/customizations",views:{"content@app":{templateUrl:"app/main/apps/settings/views/customizations/customizations.html",controller:"CustomizationsController as vm"}},resolve:{customizations:["apiResolver",function(e){return e.resolve("setting@get",{fields:"createdAt,updatedAt,id,defaultLogo,defaultLoginLogo,defaultHeaderWhiteLabel,headerWhiteLabel,defaultPageTitle,pageTitle",limit:10,offset:0})}]},authenticate:!0,permissionId:1407,bodyClass:"settings"}),t.addPart("app/main/apps/settings")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.settings",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.settings.updates","app.settings.license","app.settings.system"]).config(e)}(),function(){"use strict";function e(e){e.state("app.settings.license",{url:"/license",views:{"content@app":{templateUrl:"app/main/apps/settings/views/license/license.html",controller:"LicenseController as vm"}},authenticate:!0,permissionId:1405,bodyClass:"settings"})}e.$inject=["$stateProvider"],angular.module("app.settings.license",[]).config(e)}(),function(){"use strict";function e(e){e.state("app.settings.system",{url:"/system?tab",views:{"content@app":{templateUrl:"app/main/apps/settings/views/system/system.html",controller:"SystemController as vm"}},resolve:{system:["apiResolver",function(e){return e.resolve("system@get")}],processes:["apiResolver",function(e){return e.resolve("pm2@get")}]},authenticate:!0,permissionId:1406,bodyClass:"settings"})}e.$inject=["$stateProvider"],angular.module("app.settings.system",[]).config(e)}(),function(){"use strict";function e(e){e.state("app.settings.updates",{url:"/updates",views:{"content@app":{templateUrl:"app/main/apps/settings/views/updates/updates.html",controller:"UpdatesController as vm"}},resolve:{version:["apiResolver",function(e){return e.resolve("version@get",{latest:!0})}]},authenticate:!0,permissionId:1404,bodyClass:"settings"})}e.$inject=["$stateProvider"],angular.module("app.settings.updates",[]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.sms",{abstract:!0,url:"/sms"}).state("app.sms.smsQueues",{url:"/smsQueues",views:{"content@app":{templateUrl:"app/main/apps/sms/views/smsQueues/smsQueues.html",controller:"SmsQueuesController as vm"}},resolve:{smsQueues:["apiResolver",function(e){return e.resolve("smsQueue@get",{fields:"createdAt,updatedAt,id,name,strategy,timeout,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:701,bodyClass:"sms"}).state("app.sms.smsQueues.edit",{url:"/:id?tab",params:{smsQueue:void 0},views:{"content@app":{templateUrl:"app/main/apps/sms/views/smsQueues/edit/view.html",controller:"SmsQueueController as vm"}},resolve:{smsQueue:["apiResolver","$stateParams",function(e,t){return e.resolve("smsQueue@get",{fields:"createdAt,updatedAt,id,name,strategy,timeout,description",id:t.id})}]},authenticate:!0,permissionId:701,bodyClass:"sms"}).state("app.sms.smsAccounts",{url:"/smsAccounts",views:{"content@app":{templateUrl:"app/main/apps/sms/views/smsAccounts/smsAccounts.html",controller:"SmsAccountsController as vm"}},resolve:{smsAccounts:["apiResolver",function(e){return e.resolve("smsAccount@get",{fields:"createdAt,updatedAt,id,name,key,token,remote,ListId,phone,type,accountSid,authId,authToken,smsMethod,username,password,senderString,deliveryReport,waitForTheAssignedAgent,description,receiveUrl,deliveryReportUrl,notificationSound,notificationShake,notificationTemplate",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:702,bodyClass:"sms"}).state("app.sms.smsAccounts.edit",{url:"/:id?tab",params:{smsAccount:void 0},views:{"content@app":{templateUrl:"app/main/apps/sms/views/smsAccounts/edit/view.html",controller:"SmsAccountController as vm"}},resolve:{smsAccount:["apiResolver","$stateParams",function(e,t){return e.resolve("smsAccount@get",{fields:"createdAt,updatedAt,id,name,key,token,remote,ListId,phone,type,accountSid,authId,authToken,smsMethod,username,password,senderString,deliveryReport,waitForTheAssignedAgent,description,receiveUrl,deliveryReportUrl,notificationSound,notificationShake,notificationTemplate",id:t.id})}]},authenticate:!0,permissionId:702,bodyClass:"sms"}),t.addPart("app/main/apps/sms")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.sms",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.sms.realtime"]).config(e)}(),function(){"use strict";function e(e){e.state("app.sms.realtime",{url:"/realtime",views:{"content@app":{templateUrl:"app/main/apps/sms/views/realtime/realtime.html",controller:"SmsRealtimeController as vm"}},authenticate:!0,permissionId:710}).state("app.sms.realtime.agents",{url:"/agents",controller:"AgentsSmsRealtimeController as vm",templateUrl:"app/main/apps/sms/views/realtime/agents/view.html",resolve:{pauses:["apiResolver",function(e){return e.resolve("pause@get",{nolimit:!0})}],agents:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("user@get",{fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastPauseAt,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0}):e.resolve("user@getAgents",{id:t.getCurrentUser().id,fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0})}],rpcAgents:["apiResolver",function(e){return e.resolve("rpc@getAgents")}]},authenticate:!0,permissionId:710}).state("app.sms.realtime.queues",{url:"/queues",controller:"QueuesSmsRealtimeController as vm",templateUrl:"app/main/apps/sms/views/realtime/queues/view.html",resolve:{queues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("smsQueue@get",{type:"inbound",sort:"-updatedAt",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,channel:"sms",type:"inbound",sort:"-updatedAt",limit:10,page:1})}],rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getSmsQueues")}]},authenticate:!0,permissionId:710})}e.$inject=["$stateProvider"],angular.module("app.sms.realtime",["timer"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.staff",{abstract:!0,url:"/staff"}).state("app.staff.users",{url:"/users",views:{"content@app":{templateUrl:"app/main/apps/staff/views/users/users.html",controller:"UsersController as vm"}},resolve:{users:["apiResolver",function(e){return e.resolve("user@get",{fields:"createdAt,updatedAt,role,id,fullname,name,email,phone,mobile,userpic,password,description,autointernal,internal,transport,nat,allow,context,callgroup,pickupgroup,permissions,crudPermissions,passwordResetAt,passwordResetAt",role:"admin,user",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:201,bodyClass:"staff"}).state("app.staff.users.edit",{url:"/:id?tab",params:{user:void 0},views:{"content@app":{templateUrl:"app/main/apps/staff/views/users/edit/view.html",controller:"UserController as vm"}},resolve:{user:["apiResolver","$stateParams",function(e,t){return e.resolve("user@get",{fields:"createdAt,updatedAt,role,id,fullname,name,email,phone,mobile,userpic,password,description,autointernal,internal,transport,nat,allow,context,callgroup,pickupgroup,permissions,crudPermissions,passwordResetAt,passwordResetAt",id:t.id})}]},authenticate:!0,permissionId:201,bodyClass:"staff"}).state("app.staff.agents",{url:"/agents",views:{"content@app":{templateUrl:"app/main/apps/staff/views/agents/agents.html",controller:"AgentsController as vm"}},resolve:{agents:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("user@get",{fields:"createdAt,updatedAt,id,role,fullname,name,alias,email,phone,mobile,userpic,password,showWebBar,autointernal,internal,loginInPause,description,dtlscertfile,dtlsprivatekey,voicemail,transport,host,nat,type,allow,callerid,context,callgroup,pickupgroup,chanspy,extensionMonitor,chatCapacity,mailCapacity,faxCapacity,smsCapacity,openchannelCapacity,phoneBarEnableSettings,phoneBarAutoAnswer,phoneBarAutoAnswerDelay,phoneBarRingInUse,phoneBarEnableRecording,phoneBarEnableDtmfTone,phoneBarDnd,phoneBarUnansweredCallBadge,phoneBarEnableJaws,phoneBarOutboundProxy,phoneBarUnconditional,phoneBarUnconditionalNumber,phoneBarRemoteControl,phoneBarRemoteControlPort,voicemail,phoneBarExpires,phoneBarListenPort,permissions,allowmessenger,passwordResetAt,passwordResetAt",role:"agent",sort:"-updatedAt",limit:10,offset:0}):e.resolve("user@getAgents",{id:t.getCurrentUser().id,fields:"createdAt,updatedAt,id,role,fullname,name,alias,email,phone,mobile,userpic,password,showWebBar,autointernal,internal,loginInPause,description,dtlscertfile,dtlsprivatekey,voicemail,transport,host,nat,type,allow,callerid,context,callgroup,pickupgroup,chanspy,extensionMonitor,chatCapacity,mailCapacity,faxCapacity,smsCapacity,openchannelCapacity,phoneBarEnableSettings,phoneBarAutoAnswer,phoneBarAutoAnswerDelay,phoneBarRingInUse,phoneBarEnableRecording,phoneBarEnableDtmfTone,phoneBarDnd,phoneBarUnansweredCallBadge,phoneBarEnableJaws,phoneBarOutboundProxy,phoneBarUnconditional,phoneBarUnconditionalNumber,phoneBarRemoteControl,phoneBarRemoteControlPort,voicemail,phoneBarExpires,phoneBarListenPort,permissions,allowmessenger,passwordResetAt,passwordResetAt",role:"agent",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:202,bodyClass:"staff"}).state("app.staff.agents.edit",{url:"/:id?tab",params:{agent:void 0},views:{"content@app":{templateUrl:"app/main/apps/staff/views/agents/edit/view.html",controller:"AgentController as vm"}},resolve:{agent:["apiResolver","$stateParams",function(e,t){return e.resolve("user@get",{fields:"createdAt,updatedAt,id,role,fullname,name,alias,email,phone,mobile,userpic,password,showWebBar,autointernal,internal,loginInPause,description,dtlscertfile,dtlsprivatekey,voicemail,transport,host,nat,type,allow,callerid,context,callgroup,pickupgroup,chanspy,extensionMonitor,chatCapacity,mailCapacity,faxCapacity,smsCapacity,openchannelCapacity,phoneBarEnableSettings,phoneBarAutoAnswer,phoneBarAutoAnswerDelay,phoneBarRingInUse,phoneBarEnableRecording,phoneBarEnableDtmfTone,phoneBarDnd,phoneBarUnansweredCallBadge,phoneBarEnableJaws,phoneBarOutboundProxy,phoneBarUnconditional,phoneBarUnconditionalNumber,phoneBarRemoteControl,phoneBarRemoteControlPort,voicemail,phoneBarExpires,phoneBarListenPort,permissions,allowmessenger,passwordResetAt,passwordResetAt",id:t.id})}]},authenticate:!0,permissionId:202,bodyClass:"staff"}).state("app.staff.telephones",{url:"/telephones",views:{"content@app":{templateUrl:"app/main/apps/staff/views/telephones/telephones.html",controller:"TelephonesController as vm"}},resolve:{telephones:["apiResolver",function(e){return e.resolve("user@get",{fields:"createdAt,updatedAt,id,role,fullname,name,email,password,description,autointernal,internal,voicemail,transport,nat,allow,callerid,context,callgroup,pickupgroup,encryption,phone,mobile",role:"telephone",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:203,bodyClass:"staff"}).state("app.staff.telephones.edit",{url:"/:id?tab",params:{telephone:void 0},views:{"content@app":{templateUrl:"app/main/apps/staff/views/telephones/edit/view.html",controller:"TelephoneController as vm"}},resolve:{telephone:["apiResolver","$stateParams",function(e,t){return e.resolve("user@get",{fields:"createdAt,updatedAt,id,role,fullname,name,email,password,description,autointernal,internal,voicemail,transport,nat,allow,callerid,context,callgroup,pickupgroup,encryption,phone,mobile",id:t.id})}]},authenticate:!0,permissionId:203,bodyClass:"staff"}).state("app.staff.teams",{url:"/teams",views:{"content@app":{templateUrl:"app/main/apps/staff/views/teams/teams.html",controller:"TeamsController as vm"}},resolve:{teams:["apiResolver",function(e){return e.resolve("team@get",{fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:204,bodyClass:"staff"}),t.addPart("app/main/apps/staff")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.staff",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.tools",{abstract:!0,url:"/tools"}).state("app.tools.cannedAnswers",{url:"/cannedAnswers",views:{"content@app":{templateUrl:"app/main/apps/tools/views/cannedAnswers/cannedAnswers.html",controller:"CannedAnswersController as vm"}},resolve:{cannedAnswers:["apiResolver",function(e){return e.resolve("cannedAnswer@get",{fields:"createdAt,updatedAt,id,key,value,description",sort:"-updatedAt",MailAccountId:"null",FaxAccountId:"null",SmsAccountId:"null",OpenchannelAccountId:"null",ChatWebsiteId:"null",limit:10,offset:0})}]},authenticate:!0,permissionId:1002,bodyClass:"tools"}).state("app.tools.customDashboards",{url:"/customDashboards",views:{"content@app":{templateUrl:"app/main/apps/tools/views/customDashboards/customDashboards.html",controller:"CustomDashboardsController as vm"}},resolve:{customDashboards:["apiResolver",function(e){return e.resolve("dashboard@get",{fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1003,bodyClass:"tools"}).state("app.tools.customDashboards.edit",{url:"/:id?tab",params:{customDashboard:void 0},views:{"content@app":{templateUrl:"app/main/apps/tools/views/customDashboards/edit/view.html",controller:"CustomDashboardController as vm"}},resolve:{customDashboard:["apiResolver","$stateParams",function(e,t){return e.resolve("dashboard@get",{fields:"createdAt,updatedAt,id,name,description",id:t.id})}]},authenticate:!0,permissionId:1003,bodyClass:"tools"}).state("app.tools.intervals",{url:"/intervals",views:{"content@app":{templateUrl:"app/main/apps/tools/views/intervals/intervals.html",controller:"IntervalsController as vm"}},resolve:{intervals:["apiResolver",function(e){return e.resolve("interval@get",{fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",IntervalId:"null",limit:10,offset:0})}]},authenticate:!0,permissionId:1004,bodyClass:"tools"}).state("app.tools.intervals.edit",{url:"/:id?tab",params:{interval:void 0},views:{"content@app":{templateUrl:"app/main/apps/tools/views/intervals/edit/view.html",controller:"IntervalController as vm"}},resolve:{interval:["apiResolver","$stateParams",function(e,t){return e.resolve("interval@get",{fields:"createdAt,updatedAt,id,name,description",id:t.id})}]},authenticate:!0,permissionId:1004,bodyClass:"tools"}).state("app.tools.pauses",{url:"/pauses",views:{"content@app":{templateUrl:"app/main/apps/tools/views/pauses/pauses.html",controller:"PausesController as vm"}},resolve:{pauses:["apiResolver",function(e){return e.resolve("pause@get",{fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1005,bodyClass:"tools"}).state("app.tools.schedules",{url:"/schedules",views:{"content@app":{templateUrl:"app/main/apps/tools/views/schedules/schedules.html",controller:"SchedulesController as vm"}},resolve:{schedules:["apiResolver",function(e){return e.resolve("schedule@get",{fields:"createdAt,updatedAt,id,name,type,DefaultReportId,CustomReportId,output,active,startAt,endAt,cron,subtractNumber,subtractUnit,sendMail,MailAccountId,email,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:42,bodyClass:"tools"}).state("app.tools.sounds",{url:"/sounds",views:{"content@app":{templateUrl:"app/main/apps/tools/views/sounds/sounds.html",controller:"SoundsController as vm"}},resolve:{sounds:["apiResolver",function(e){return e.resolve("sound@get",{fields:"createdAt,updatedAt,id,save_name,converted_format,name,audio,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1006,bodyClass:"tools"}).state("app.tools.tags",{url:"/tags",views:{"content@app":{templateUrl:"app/main/apps/tools/views/tags/tags.html",controller:"TagsController as vm"}},resolve:{tags:["apiResolver",function(e){return e.resolve("tag@get",{fields:"createdAt,updatedAt,id,name,description,color",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1007,bodyClass:"tools"}).state("app.tools.templates",{url:"/templates",views:{"content@app":{templateUrl:"app/main/apps/tools/views/templates/templates.html",controller:"TemplatesController as vm"}},resolve:{templates:["apiResolver",function(e){return e.resolve("template@get",{fields:"createdAt,updatedAt,id,name,html,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1008,bodyClass:"tools"}).state("app.tools.triggers",{url:"/triggers",views:{"content@app":{templateUrl:"app/main/apps/tools/views/triggers/triggers.html",controller:"TriggersController as vm"}},resolve:{triggers:["apiResolver",function(e){return e.resolve("trigger@get",{fields:"createdAt,updatedAt,id,name,channel,status,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1009,bodyClass:"tools"}).state("app.tools.triggers.edit",{url:"/:id?tab",params:{trigger:void 0},views:{"content@app":{templateUrl:"app/main/apps/tools/views/triggers/edit/view.html",controller:"TriggerController as vm"}},resolve:{trigger:["apiResolver","$stateParams",function(e,t){return e.resolve("trigger@get",{fields:"createdAt,updatedAt,id,name,channel,status,description",id:t.id})}]},authenticate:!0,permissionId:1009,bodyClass:"tools"}).state("app.tools.trunks",{url:"/trunks",views:{"content@app":{templateUrl:"app/main/apps/tools/views/trunks/trunks.html",controller:"TrunksController as vm"}},resolve:{trunks:["apiResolver",function(e){return e.resolve("trunk@get",{fields:"createdAt,updatedAt,id,name,active,host,secret,defaultuser,context,callerid,type,dtmfmode,nat,qualify,allow,insecure,call_limit,registry,description,directmedia,callcounter,fromdomain,fromuser,outboundproxy,usereqphone,trustrpid,sendrpid,encryption,port,transport,t38pt_udptl,otherFields",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1010,bodyClass:"tools"}).state("app.tools.trunks.edit",{url:"/:id?tab",params:{trunk:void 0},views:{"content@app":{templateUrl:"app/main/apps/tools/views/trunks/edit/view.html",controller:"TrunkController as vm"}},resolve:{trunk:["apiResolver","$stateParams",function(e,t){return e.resolve("trunk@get",{fields:"createdAt,updatedAt,id,name,active,host,secret,defaultuser,context,callerid,type,dtmfmode,nat,qualify,allow,insecure,call_limit,registry,description,directmedia,callcounter,fromdomain,fromuser,outboundproxy,usereqphone,trustrpid,sendrpid,encryption,port,transport,t38pt_udptl,otherFields",id:t.id})}]},authenticate:!0,permissionId:1010,bodyClass:"tools"}).state("app.tools.variables",{url:"/variables",views:{"content@app":{templateUrl:"app/main/apps/tools/views/variables/variables.html",controller:"VariablesController as vm"}},resolve:{variables:["apiResolver",function(e){return e.resolve("variable@get",{fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:1011,bodyClass:"tools"}),t.addPart("app/main/apps/tools")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.tools",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter"]).config(e)}(),function(){"use strict";function e(e){e.state("app.voice.realtime",{url:"/realtime",views:{"content@app":{templateUrl:"app/main/apps/voice/views/realtime/realtime.html",controller:"VoiceRealtimeController as vm"}},authenticate:!0,permissionId:410}).state("app.voice.realtime.agents",{url:"/agents",controller:"AgentsVoiceRealtimeController as vm",templateUrl:"app/main/apps/voice/views/realtime/agents/view.html",resolve:{pauses:["apiResolver",function(e){return e.resolve("pause@get",{nolimit:!0})}],agents:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("user@get",{fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastPauseAt,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0}):e.resolve("user@getAgents",{id:t.getCurrentUser().id,fields:"id,fullname,role,userpic,internal,online,voicePause,openchannelPause,faxPause,chatPause,smsPause,mailPause,pauseType,lastLoginAt,lastPauseAt,chatCapacity,mailCapacity,openchannelCapacity,faxCapacity,smsCapacity",role:"agent",sort:"fullname",nolimit:!0})}],rpcAgents:["apiResolver",function(e){return e.resolve("rpc@getAgents")}]},authenticate:!0,permissionId:410}).state("app.voice.realtime.telephones",{url:"/telephones",controller:"TelephonesVoiceRealtimeController as vm",templateUrl:"app/main/apps/voice/views/realtime/telephones/view.html",resolve:{telephones:["apiResolver",function(e){return e.resolve("user@get",{fields:"id,fullname,userpic,internal",role:"telephone",sort:"-updatedAt",limit:10,offset:0})}],rpcTelephones:["apiResolver",function(e){return e.resolve("rpc@getTelephones")}]},authenticate:!0,permissionId:410}).state("app.voice.realtime.trunks",{url:"/trunks",controller:"TrunksVoiceRealtimeController as vm",templateUrl:"app/main/apps/voice/views/realtime/trunks/view.html",resolve:{trunks:["apiResolver",function(e){return e.resolve("trunk@get",{fields:"id,name",active:!0,sort:"-updatedAt",limit:10,offset:0})}],rpcTrunks:["apiResolver",function(e){return e.resolve("rpc@getTrunks")}]},authenticate:!0,permissionId:410}).state("app.voice.realtime.queues",{url:"/queues",controller:"QueuesVoiceRealtimeController as vm",templateUrl:"app/main/apps/voice/views/realtime/queues/view.html",resolve:{queues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("voiceQueue@get",{type:"inbound",sort:"-updatedAt",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,channel:"voice",type:"inbound",sort:"-updatedAt",limit:10,page:1})}],rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getVoiceQueues")}]},authenticate:!0,permissionId:410}).state("app.voice.realtime.queue_calls",{url:"/queue_calls",controller:"QueueCallsVoiceRealtimeController as vm",templateUrl:"app/main/apps/voice/views/realtime/queue_calls/view.html",resolve:{agents:["apiResolver",function(e){return e.resolve("user@get",{fields:"id,name,role",role:"agent",nolimit:!0})}],rpcVoiceQueuesChannels:["apiResolver",function(e){return e.resolve("rpc@getVoiceQueuesChannels")}]},authenticate:!0,permissionId:410}).state("app.voice.realtime.abandonedcalls",{url:"/abandonedcalls",controller:"AbandonedCallsVoiceRealtimeController as vm",templateUrl:"app/main/apps/voice/views/realtime/abandonedcalls/view.html",resolve:{agents:["apiResolver",function(e){return e.resolve("user@get",{fields:"id,name,role",role:"agent",nolimit:!0})}]},authenticate:!0,permissionId:410}).state("app.voice.realtime.queue_params",{url:"/queue_params",controller:"QueueParamsVoiceRealtimeController as vm",templateUrl:"app/main/apps/voice/views/realtime/queue_params/view.html",resolve:{queues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("voiceQueue@get",{type:"inbound",fields:"id,name",sort:"-updatedAt",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,channel:"voice",type:"inbound",fields:"id,name",sort:"-updatedAt",limit:10,page:1})}],rpcQueues:["apiResolver",function(e){return e.resolve("rpc@getVoiceQueues")}]},authenticate:!0,permissionId:410}).state("app.voice.realtime.outbound_calls",{url:"/outbound_calls",controller:"OutboundCallsVoiceRealtimeController as vm",templateUrl:"app/main/apps/voice/views/realtime/outbound_calls/view.html",resolve:{rpcCalls:["apiResolver",function(e){return e.resolve("rpc@getOutboundChannels")}]},authenticate:!0,permissionId:410})}e.$inject=["$stateProvider"],angular.module("app.voice.realtime",["timer"]).config(e)}(),function(){"use strict";function e(e,t,n,a){e.state("app.voice",{abstract:!0,url:"/voice"}).state("app.voice.voiceQueues",{url:"/voiceQueues",views:{"content@app":{templateUrl:"app/main/apps/voice/views/voiceQueues/voiceQueues.html",controller:"VoiceQueuesController as vm"}},resolve:{voiceQueues:["apiResolver","Auth",function(e,t){return t.hasRole("admin")?e.resolve("voiceQueue@get",{fields:"createdAt,updatedAt,id,name,type,strategy,timeout,maxlen,retry,wrapuptime,weight,joinempty,leavewhenempty,musiconhold,announce,description,periodic_announce,queue_reporthold,queue_youarenext,queue_thereare,queue_callswaiting,queue_holdtime,queue_minutes,queue_minute,queue_seconds,queue_thankyou,announce_frequency,min_announce_frequency,periodic_announce_frequency,random_periodic_announce,announce_holdtime,announce_position,announce_position_limit,reportholdtime,acw,acwTimeout,autopause,ringinuse,memberdelay,timeoutrestart,monitor_format,context,setinterfacevar,setqueuevar,setqueueentryvar",type:"inbound",sort:"-updatedAt",channel:"voice",limit:10,offset:0}):e.resolve("user@getQueues",{id:t.getCurrentUser().id,fields:"createdAt,updatedAt,id,name,type,strategy,timeout,maxlen,retry,wrapuptime,weight,joinempty,leavewhenempty,musiconhold,announce,description,periodic_announce,queue_reporthold,queue_youarenext,queue_thereare,queue_callswaiting,queue_holdtime,queue_minutes,queue_minute,queue_seconds,queue_thankyou,announce_frequency,min_announce_frequency,periodic_announce_frequency,random_periodic_announce,announce_holdtime,announce_position,announce_position_limit,reportholdtime,acw,acwTimeout,autopause,ringinuse,memberdelay,timeoutrestart,monitor_format,context,setinterfacevar,setqueuevar,setqueueentryvar",type:"inbound",sort:"-updatedAt",channel:"voice",limit:10,offset:0})}]},authenticate:!0,permissionId:401,bodyClass:"voice"}).state("app.voice.voiceQueues.edit",{url:"/:id?tab",params:{voiceQueue:void 0},views:{"content@app":{templateUrl:"app/main/apps/voice/views/voiceQueues/edit/view.html",controller:"VoiceQueueController as vm"}},resolve:{voiceQueue:["apiResolver","$stateParams",function(e,t){return e.resolve("voiceQueue@get",{fields:"createdAt,updatedAt,id,name,type,strategy,timeout,maxlen,retry,wrapuptime,weight,joinempty,leavewhenempty,musiconhold,announce,description,periodic_announce,queue_reporthold,queue_youarenext,queue_thereare,queue_callswaiting,queue_holdtime,queue_minutes,queue_minute,queue_seconds,queue_thankyou,announce_frequency,min_announce_frequency,periodic_announce_frequency,random_periodic_announce,announce_holdtime,announce_position,announce_position_limit,reportholdtime,acw,acwTimeout,autopause,ringinuse,memberdelay,timeoutrestart,monitor_format,context,setinterfacevar,setqueuevar,setqueueentryvar",id:t.id})}]},authenticate:!0,permissionId:401,bodyClass:"voice"}).state("app.voice.inboundroutes",{url:"/inboundroutes",views:{"content@app":{templateUrl:"app/main/apps/voice/views/inboundroutes/inboundroutes.html",controller:"InboundRoutesController as vm"}},resolve:{inboundroutes:["apiResolver",function(e){return e.resolve("voiceExtension@get",{fields:"createdAt,updatedAt,id,appdata,type,exten,context,description",type:"inbound",sort:"-updatedAt",VoiceExtensionId:"null",limit:10,offset:0})}]},authenticate:!0,permissionId:402,bodyClass:"voice"}).state("app.voice.inboundroutes.edit",{url:"/:id?tab",params:{inboundroute:void 0},views:{"content@app":{templateUrl:"app/main/apps/voice/views/inboundroutes/edit/view.html",controller:"InboundRouteController as vm"}},resolve:{inboundroute:["apiResolver","$stateParams",function(e,t){return e.resolve("voiceExtension@get",{fields:"createdAt,updatedAt,id,appdata,type,exten,context,description",id:t.id})}]},authenticate:!0,permissionId:402,bodyClass:"voice"}).state("app.voice.outboundroutes",{url:"/outboundroutes",views:{"content@app":{templateUrl:"app/main/apps/voice/views/outboundroutes/outboundroutes.html",controller:"OutboundRoutesController as vm"}},resolve:{outboundroutes:["apiResolver",function(e){return e.resolve("voiceExtension@get",{fields:"createdAt,updatedAt,id,appdata,type,exten,context,recordingFormat,cutdigits,description",type:"outbound",sort:"-updatedAt",VoiceExtensionId:"null",limit:10,offset:0})}]},authenticate:!0,permissionId:403,bodyClass:"voice"}).state("app.voice.outboundroutes.edit",{url:"/:id?tab",params:{outboundroute:void 0},views:{"content@app":{templateUrl:"app/main/apps/voice/views/outboundroutes/edit/view.html",controller:"OutboundRouteController as vm"}},resolve:{outboundroute:["apiResolver","$stateParams",function(e,t){return e.resolve("voiceExtension@get",{fields:"createdAt,updatedAt,id,appdata,type,exten,context,recordingFormat,cutdigits,description",id:t.id})}]},authenticate:!0,permissionId:403,bodyClass:"voice"}).state("app.voice.internalroutes",{url:"/internalroutes",views:{"content@app":{templateUrl:"app/main/apps/voice/views/internalroutes/internalroutes.html",controller:"InternalRoutesController as vm"}},resolve:{internalroutes:["apiResolver",function(e){return e.resolve("voiceExtension@get",{fields:"createdAt,updatedAt,id,appdata,type,exten,context,description",type:"internal",sort:"-updatedAt",VoiceExtensionId:"null",limit:10,offset:0})}]},authenticate:!0,permissionId:404,bodyClass:"voice"}).state("app.voice.internalroutes.edit",{url:"/:id?tab",params:{internalroute:void 0},views:{"content@app":{templateUrl:"app/main/apps/voice/views/internalroutes/edit/view.html",controller:"InternalRouteController as vm"}},resolve:{internalroute:["apiResolver","$stateParams",function(e,t){return e.resolve("voiceExtension@get",{fields:"createdAt,updatedAt,id,appdata,type,exten,context,description",id:t.id})}]},authenticate:!0,permissionId:404,bodyClass:"voice"}).state("app.voice.contexts",{url:"/contexts",views:{"content@app":{templateUrl:"app/main/apps/voice/views/contexts/contexts.html",controller:"ContextsController as vm"}},resolve:{contexts:["apiResolver",function(e){return e.resolve("voiceContext@get",{fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",defaultEntry:"false",limit:10,offset:0})}]},authenticate:!0,permissionId:405,bodyClass:"voice"}).state("app.voice.voicemails",{url:"/voicemails",views:{"content@app":{templateUrl:"app/main/apps/voice/views/voicemails/voicemails.html",controller:"VoicemailsController as vm"}},resolve:{voicemails:["apiResolver",function(e){return e.resolve("voiceMail@get",{fields:"createdAt,updatedAt,id,customer_id,fullname,email,password,mailbox,context,tz,attach,envelope,delete,emailbody,emailsubject,maxsecs,maxmsg",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:406,bodyClass:"voice"}).state("app.voice.voicemails.edit",{url:"/:id?tab",params:{voicemail:void 0},views:{"content@app":{templateUrl:"app/main/apps/voice/views/voicemails/edit/view.html",controller:"VoicemailController as vm"}},resolve:{voicemail:["apiResolver","$stateParams",function(e,t){return e.resolve("voiceMail@get",{fields:"createdAt,updatedAt,id,customer_id,fullname,email,password,mailbox,context,tz,attach,envelope,delete,emailbody,emailsubject,maxsecs,maxmsg",id:t.id})}]},authenticate:!0,permissionId:406,bodyClass:"voice"}).state("app.voice.musiconholds",{url:"/musiconholds",views:{"content@app":{templateUrl:"app/main/apps/voice/views/musiconholds/musiconholds.html",controller:"MusicOnHoldsController as vm"}},resolve:{musiconholds:["apiResolver",function(e){return e.resolve("voiceMusicOnHold@get",{fields:"createdAt,updatedAt,id,name,mode,directory,application,format,sort",defaultEntry:"false",limit:10,offset:0})}]},authenticate:!0,permissionId:407,bodyClass:"voice"}).state("app.voice.musiconholds.edit",{url:"/:id?tab",params:{musiconhold:void 0},views:{"content@app":{templateUrl:"app/main/apps/voice/views/musiconholds/edit/view.html",controller:"MusicOnHoldController as vm"}},resolve:{musiconhold:["apiResolver","$stateParams",function(e,t){return e.resolve("voiceMusicOnHold@get",{fields:"createdAt,updatedAt,id,name,mode,directory,application,format,sort",id:t.id})}]},authenticate:!0,permissionId:407,bodyClass:"voice"}).state("app.voice.voiceRecordings",{url:"/voiceRecordings",views:{"content@app":{templateUrl:"app/main/apps/voice/views/voiceRecordings/voiceRecordings.html",controller:"VoiceRecordingsController as vm"}},resolve:{voiceRecordings:["apiResolver",function(e){return e.resolve("voiceRecording@get",{fields:"createdAt,updatedAt,id,format,value,type,uniqueid,calleridnum,exten,connectedlinenum,queue,membername,rating,audio,createdAt,userDisposition",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:408,bodyClass:"voice"}).state("app.voice.chanSpies",{url:"/chanSpies",views:{"content@app":{templateUrl:"app/main/apps/voice/views/chanSpies/chanSpies.html",controller:"ChanSpiesController as vm"}},resolve:{chanSpies:["apiResolver",function(e){return e.resolve("voiceChanSpy@get",{fields:"createdAt,updatedAt,id,name,prefix,options,auth,password,record,recordingFormat,description",sort:"-updatedAt",limit:10,offset:0})}]},authenticate:!0,permissionId:409,bodyClass:"voice"}),t.addPart("app/main/apps/voice")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.voice",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.voice.realtime"]).config(e)}(),function(){"use strict";angular.module("app.navigation",[]).config(function(){})}(),function(){"use strict";function e(e,t){e.addPart("app/quick-panel")}e.$inject=["$translatePartialLoaderProvider","msApiProvider"],angular.module("app.quick-panel",[]).config(e)}(),function(){"use strict";function e(e,t){e.state("app.reset",{url:"/reset/:token",views:{"main@":{templateUrl:"app/core/layouts/content-only.html",controller:"MainController as vm"},"content@app.reset":{templateUrl:"app/reset/reset.html",controller:"ResetPasswordController as vm"}},bodyClass:"reset"}),t.addPart("app/reset")}e.$inject=["$stateProvider","$translatePartialLoaderProvider"],angular.module("app.reset",[]).config(e)}(),function(){"use strict";function e(e){e.addPart("app/toolbar")}e.$inject=["$translatePartialLoaderProvider"],angular.module("app.toolbar",[]).config(e)}(),function(){"use strict";function e(e){e.interceptors.push("authInterceptor")}e.$inject=["$httpProvider"],angular.module("app.auth").config(e)}(),function(){"use strict";function e(e,n,t,a){e.$on("$stateChangeStart",function(e,t){return t.hasOwnProperty("authenticate")&&t.authenticate&&!a.isLoggedIn()?(e.preventDefault(),n.go("app.login",{},{reload:!0,notify:!0})):a.isLoggedIn()&&t.hasOwnProperty("permissionId")&&t.permissionId&&!a.hasPermission(t.permissionId)&&!a.hasRole("admin")?(e.preventDefault(),n.go("app.dashboards.general",{},{reload:!0,notify:!0})):void 0})}e.$inject=["$rootScope","$state","$window","Auth"],angular.module("app.auth").run(e)}(),function(){"use strict";function e(e,a,i,o,t){var s,r=["id","role","fullname","name","internal","email","userpic","permissions","md5secret","phoneBarAutoAnswer","phoneBarAutoAnswerDelay","phoneBarEnableRecording","phoneBarEnableDtmfTone","voicePause","chatPause","mailPause","faxPause","smsPause","openchannelPause","phoneBarEnableSettings","phoneBarExpires","pauseType","showWebBar","phoneBarRemoteControlPort","phoneBarRemoteControl","lastLoginAt","lastPauseAt","crudPermissions","allowmessenger","passwordResetAt","alias"];function l(){var t=i.defer();return d("agent")&&0!==s.showWebBar?o.user.login({id:s.id}).$promise.then(function(){console.log("AGENT LOGGED IN"),t.resolve()}).catch(function(e){console.error(e),t.reject(e)}):d("admin")||d("user")?o.user.update({id:s.id},{online:!0,lastLoginAt:moment().format("YYYY-MM-DD HH:mm:ss")}).$promise.catch(function(e){console.error(e)}).finally(function(){t.resolve()}):t.resolve(),t.promise}function n(){if(a.remove("motion.user"),a.remove("motion.token"),s&&s.id){var e=s.id;s=null,t.localStorage.removeItem("motion.user:"+e)}}function d(e){return!!s&&s.role===e}function c(){return a.get("motion.token")}function m(e){return s=_.assign(s,_.pick(e,r)),a.put("motion.user",JSON.stringify(s)),s}return function(){if(a.get("motion.user"))s=JSON.parse(a.get("motion.user")),o.user.get({id:s.id,fields:r.join(",")}).$promise.then(function(e){if(e)return m(e)}).catch(function(e){console.log("Error retrieving user",e)})}(),{login:function(e){var t,n=i.defer();return o.auth.local(e).$promise.then(function(e){return t=e,a.put("motion.token",e.token),o.user.get({id:e.id,fields:r.join(",")}).$promise}).then(function(e){return(s=e).lastLoginAt=moment(),a.put("motion.user",JSON.stringify(e)),l()}).then(function(){n.resolve()}).catch(function(e){n.reject(e.data)}).finally(function(){return o.user.get({id:t.id,fields:r.join(",")}).$promise.then(function(e){s=e})}),n.promise},logout:function(e){var t;return i.defer(),e?(n(),i.resolve()):(t=i.defer(),d("agent")&&0!==s.showWebBar?o.user.logout({id:s.id}).$promise.then(function(){console.log("AGENT LOGGED OUT")}).catch(function(e){console.error(e)}).finally(function(){t.resolve()}):d("admin")||d("user")?o.user.update({id:s.id},{online:!1}).$promise.catch(function(e){console.error(e)}).finally(function(){t.resolve()}):t.resolve(),t.promise).then(n).catch(function(e){console.error(e)})},queueLogin:l,isLoggedIn:function(){return!(!s||!c())},hasRole:d,hasPermission:function(e){return!!s&&_.includes(s.permissions,e)},getToken:c,getCurrentUser:function(){return s},updateCurrentUser:m,removeCookies:n}}e.$inject=["$location","$cookies","$q","api","$window"],angular.module("app.auth").factory("Auth",e)}(),function(){"use strict";function e(e,t,n,a,i){var o;return{request:function(e){var t=n.get("motion.token");return e.headers=e.headers||{},i.isSameOrigin(e.url)&&t&&(e.headers.Authorization="Bearer "+t),e},responseError:function(e){switch(e.status){case 401:n.remove("motion.user"),n.remove("motion.token"),(o||(o=a.get("$state"))).go("app.login")}return t.reject(e)}}}e.$inject=["$rootScope","$q","$cookies","$injector","Util"],angular.module("app.auth").factory("authInterceptor",e)}(),function(){"use strict";function e(t){var n={safeCb:function(e){return angular.isFunction(e)?e:angular.noop},urlParse:function(e){var t=document.createElement("a");return t.href=e,""===t.host&&(t.href=t.href),t},isSameOrigin:function(i,e){return i=n.urlParse(i),(e=(e=e&&[].concat(e)||[]).map(n.urlParse)).push(t.location),1<=(e=e.filter(function(e){var t=i.hostname===e.hostname,n=i.protocol===e.protocol,a=i.port===e.port||""===e.port&&("80"===i.port||"443"===i.port);return t&&n&&a})).length}};return n}e.$inject=["$window"],angular.module("app.auth").factory("Util",e)}(),function(){"use strict";angular.module("app.core").provider("motionConfig",function(){var n={disableCustomScrollbars:!1,disableMdInkRippleOnMobile:!0,disableCustomScrollbarsOnMobile:!0};this.config=function(e){n=angular.extend({},n,e)},this.$get=function(){var e={getConfig:function(e){if(angular.isUndefined(n[e]))return!1;return n[e]},setConfig:function(e,t){n[e]=t}};return e}})}(),function(){"use strict";function e(e,t,n,a){t.debugEnabled(!0),e.config({tabindex:!1}),a.config({disableCustomScrollbars:!1,disableCustomScrollbarsOnMobile:!0,disableMdInkRippleOnMobile:!0}),n.config({wheelPropagation:!0})}e.$inject=["$ariaProvider","$logProvider","msScrollConfigProvider","motionConfigProvider"],angular.module("app.core").config(e)}(),function(){"use strict";function e(e,t,n){(t.generate(),n.getConfig("disableMdInkRippleOnMobile")&&e.isMobile())&&angular.element("body").attr("md-no-ink",!0);e.isMobile()&&angular.element("html").addClass("is-mobile");var a=e.detectBrowser();if(a){var i=a.browser+" "+a.version+" "+a.os;angular.element("html").addClass(i)}}e.$inject=["msUtils","motionGenerator","motionConfig"],angular.module("app.core").run(e)}(),function(){"use strict";function e(s,l,d){return{restrict:"E",compile:function(e,t){var o;return t.code||(o=e.html(),e.empty()),function(n,a,r){r.code&&(o=n.$eval(r.code));var i=n.$eval(r.shouldInterpolate);l.when(o).then(function(e){if(e){i&&(e=d(e)(n));var t=angular.element('<pre><code class="highlight" ng-non-bindable></code></pre>');a.append(t),s(function(){!function(e,t){var n=t.find("code"),a=e.split("\n"),i=(a=a.filter(function(e){return e.trim().length}))[0].match(/^\s*/)[0],o=new RegExp("^"+i);a=a.map(function(e){return e.replace(o,"").replace(/\s+$/,"")});var s=hljs.highlight(r.language||r.lang,a.join("\n"),!0);s.value=s.value.replace(/=<span class="hljs-value">""<\/span>/gi,"").replace("<head>","").replace("<head/>",""),n.append(s.value).addClass("highlight")}(e,t)},34,!1)}})}}}}e.$inject=["$timeout","$q","$interpolate"],angular.module("app.core").directive("hljs",e)}(),function(){"use strict";angular.module("app.core").directive("msCard",function(){return{restrict:"E",scope:{templatePath:"=template",card:"=ngModel",vm:"=viewModel"},template:'<div class="ms-card-content-wrapper" ng-include="templatePath" onload="cardTemplateLoaded()"></div>',compile:function(e){return e.addClass("ms-card"),function(e,t){e.cardTemplateLoaded=function(){e.$emit("msCard::cardTemplateLoaded",t)}}}}})}(),function(){"use strict";angular.module("app.core").directive("msClickToCall",function(){return{restrict:"E",scope:{type:"=",disabled:"=",target:"=",prefix:"=",license:"="},controller:["$scope","$rootScope","$http","$translate","Auth","toasty",function(t,n,a,i,e,o){function s(e){return _.isNil(e)?"":e.replace(/[^\w.+#*\-]+/g,"")}function r(e){return a.get(e).success(function(){o.success({title:"Successful call",msg:"Call properly handled!"})}).error(function(e){o.error({title:"PhoneBar API Error",msg:i.instant("CONTACTMANAGER.ERRORS.PHONEBAR_API")})})}t.currentUser=e.getCurrentUser(),t.showMenu=function(){return t.target&&t.target.indexOf("@")<0&&t.target!=t.currentUser.internal&&t.target!=t.currentUser.name&&(0==t.currentUser.showWebBar&&t.currentUser.phoneBarRemoteControl||2==t.currentUser.showWebBar&&t.license.webrtc)&&!t.disabled},t.call=function(e){switch(t.currentUser.showWebBar){case 0:return r("http://127.0.0.1:"+(t.currentUser.phoneBarRemoteControlPort||"9888")+"/api/originate/"+s(e));case 2:n.$broadcast("webrtc::call",{target:s(e)})}},t.transfer=function(e){switch(t.currentUser.showWebBar){case 0:return r("http://127.0.0.1:"+(t.currentUser.phoneBarRemoteControlPort||"9888")+"/api/transfer?number="+s(e));case 2:n.$broadcast("webrtc::transfer",{target:s(e)})}}}],templateUrl:"app/core/directives/ms-click-to-call/ms-click-to-call.html"}})}(),function(){"use strict";function e(i){return{require:"ngModel",priority:1,link:function(e,t,n,a){a.$formatters.push(i.formatter),a.$parsers.push(i.parser)}}}e.$inject=["msDatepickerFixConfig"],angular.module("app.core").provider("msDatepickerFixConfig",function(){var t={formatter:function(e){return e?""===e?e:new Date(e):""},parser:function(e){return e?moment(e).add(moment(e).utcOffset(),"m").toDate():""}};this.config=function(e){t=angular.extend({},t,e)},this.$get=function(){return t}}).directive("msDatepickerFix",e)}(),function(){"use strict";angular.module("app.core").directive("msDualMultiselect",function(){return{restrict:"E",scope:{options:"="},controller:["$scope",function(s){s.transfer=function(e,t,n,a){var i=[];if(0<=n)i.push(e[n]),t.push(e[n]),e.splice(n,1);else{for(var o=0;o<e.length;o+=1)t.push(e[o]);e.length=0,i=t}s.options.transferCallback&&s.options.transferCallback(i,a)},s.getLine=function(e,t){var n="";if(_.isNil(t))return n;if(_.isArray(t)){for(var a=0;a<t.length;a++)n+=" "+(e[t[a]]?e[t[a]]:"");return n}return e[t]?e[t]:""}}],templateUrl:"app/core/directives/ms-dual-multiselect/ms-dual-multiselect.html"}})}(),function(){"use strict";function e(e){return{restrict:"E",replace:!0,scope:{onReply:"&",setText:"&",getText:"&",pickerPosition:"=",search:"=",recentEmojis:"=",placeholder:"="},template:'<input class="emojionearea" type="text">',link:function(n,t){t.emojioneArea({pickerPosition:n.pickerPosition,search:n.search,recentEmojis:n.recentEmojis,placeholder:e.instant(n.placeholder||"Type a message"),events:{keyup:function(e,t){n.onReply({event:t,body:this.getText()})}}}),n.setText({dirFn:function(e){t[0].emojioneArea.setText(e||"")}}),n.getText({dirFn:function(){return t[0].emojioneArea.getText()}})}}}e.$inject=["$translate"],angular.module("app.core").directive("msEmojiArea",e)}(),function(){"use strict";angular.module("app.core").directive("msFontFamily",function(){return{restrict:"E",scope:{ngModel:"="},controller:["$scope",function(e){e.fonts=[{option:"Arial",value:"Arial,Helvetica,sans-serif"},{option:"Comic Sans MS",value:"Comic Sans MS,cursive"},{option:"Courier New",value:"Courier New,Courier,monospace"},{option:"Georgia",value:"Georgia,serif"},{option:"Lucida Sans Unicode",value:"Lucida Sans Unicode,Lucida Grande,sans-serif"},{option:"Tahoma",value:"Tahoma,Geneva,sans-serif"},{option:"Times New Roman",value:"Times New Roman,Times,serif"},{option:"Trebuchet MS",value:"Trebuchet MS,Helvetica,sans-serif"},{option:"Verdana",value:"Verdana,Geneva,sans-serif"}]}],templateUrl:"app/core/directives/ms-font-family/ms-font-family.html"}})}(),function(){"use strict";angular.module("app.core").controller("MsFormWizardController",function(){var t=this;function e(){return t.forms.length}function n(){return 0===t.selectedIndex}function a(){return t.selectedIndex===e()-1}t.forms=[],t.selectedIndex=0,t.registerForm=function(e){t.forms.push(e)},t.previousStep=function(){if(n())return;t.selectedIndex--},t.nextStep=function(){if(a())return;t.selectedIndex++},t.firstStep=function(){t.selectedIndex=0},t.lastStep=function(){t.selectedIndex=e()-1},t.totalSteps=e,t.isFirstStep=n,t.isLastStep=a,t.currentStepInvalid=function(){return angular.isDefined(t.forms[t.selectedIndex])&&t.forms[t.selectedIndex].$invalid},t.previousStepInvalid=function(){return 0<t.selectedIndex&&angular.isDefined(t.forms[t.selectedIndex-1])&&t.forms[t.selectedIndex-1].$invalid},t.formsIncomplete=function(){for(var e=0;e<t.forms.length;e++)if(t.forms[e].$invalid)return!0;return!1},t.resetForm=function(){for(var e=t.selectedIndex=0;e<t.forms.length;e++)t.forms[e].$setPristine(),t.forms[e].$setUntouched()}}).directive("msFormWizard",function(){return{restrict:"E",scope:!0,controller:"MsFormWizardController as msWizard",compile:function(e){return e.addClass("ms-form-wizard"),function(){}}}}).directive("msFormWizardForm",function(){return{restrict:"A",require:["form","^msFormWizard"],compile:function(e){return e.addClass("ms-form-wizard-form"),function(e,t,n,a){var i=a[0],o=a[1];o.registerForm(i)}}}})}(),function(){"use strict";function e(i){return{restrict:"E",scope:{onClose:"&"},transclude:!0,templateUrl:"app/core/directives/ms-info-bar/ms-info-bar.html",link:function(e,t){var n=i.find("ms-info-bar-active"),a="ms-info-bar-active";n.addClass(a),e.removeInfoBar=function(){n.removeClass(a),t.remove(),e.onClose&&e.onClose(),e.$destroy()}}}}e.$inject=["$document"],angular.module("app.core").directive("msInfoBar",e)}(),function(){"use strict";function e(r,a,l,e){var d=this,t={columnCount:5,respectItemOrder:!1,reLayoutDebounce:400,responsive:{md:3,sm:2,xs:1}},n=!0;function i(){n&&e.cancel(n),n=e(function(){!function(){d.containerPos=d.container[0].getBoundingClientRect(),function(){d.columnCount=d.options.columnCount,l("gt-md")?d.columnCount=d.options.columnCount:l("md")?d.columnCount=d.columnCount>d.options.responsive.md?d.options.responsive.md:d.columnCount:l("sm")?d.columnCount=d.columnCount>d.options.responsive.sm?d.options.responsive.sm:d.columnCount:d.columnCount=d.options.responsive.xs;d.columnWidth=d.containerPos.width/d.columnCount}(),r.$broadcast("msMasonry:relayoutStarted"),d.items=d.container.find("ms-masonry-item");for(var e=Array.apply(null,new Array(d.columnCount)).map(function(){return 0}),t=0;t<d.items.length;t++){var n,a,i,o,s=d.items[t];(s=angular.element(s)).scope()&&s.scope().$broadcast("msMasonryItem:startReLayout"),s.css({width:d.columnWidth}),d.options.respectItemOrder?(i=t%d.columnCount,o=e[i]):(o=Math.min.apply(Math,e),i=e.indexOf(o)),e[i]=o+s[0].getBoundingClientRect().height,n=Math.round(i*d.columnWidth),a=o,s.css({transform:"translate3d("+n+"px,"+a+"px,0px)"}),s.addClass("placed"),s.scope()&&s.scope().$broadcast("msMasonryItem:finishReLayout")}}(),r.$broadcast("msMasonry:relayoutFinished")},d.options.reLayoutDebounce)}d.options=null,d.container=[],d.containerPos="",d.columnWidth="",d.items=[],d.reLayout=i,d.initialize=function(){d.options=d.options?angular.extend(t,d.options):t,r.$watch(function(){return d.container.width()},function(e,t){e!==t&&i()})},d.waitImagesLoaded=function(e,t){if("undefined"!=typeof imagesLoaded){var n=a.imagesLoaded(e);n.on("done",function(){t()})}else t()},r.$on("msMasonry:relayout",function(){i()})}function t(s){return{restrict:"AEC",controller:"msMasonryController",compile:function(i,o){return{pre:function(e,t,n,a){a.options=angular.fromJson(o.options||"{}"),a.container=i},post:function(e,t,n,a){s(function(){a.initialize()})}}}}}e.$inject=["$scope","$window","$mdMedia","$timeout"],t.$inject=["$timeout"],angular.module("app.core").controller("msMasonryController",e).directive("msMasonry",t).directive("msMasonryItem",function(){return{restrict:"AEC",require:"^msMasonry",priority:1,link:function(e,t,n,a){a.waitImagesLoaded(t,function(){a.reLayout()}),e.$on("msMasonryItem:finishReLayout",function(){e.$watch(function(){return t.height()},function(e,t){e!==t&&a.reLayout()})}),t.on("$destroy",function(){a.reLayout()})}}})}(),function(){"use strict";function e(n,e,a,i){var o=this;function s(e,t){o.selectedPalette=e,o.selectedHues=t}function r(){s(!(o.selectedColor={palette:"",hue:"",class:""}),!1),d()}function l(e,t){o.selectedColor={palette:e,hue:t,class:"md-"+e+"-"+t+"-bg",bgColorValue:i.rgba(o.palettes[e][t].value),fgColorValue:i.rgba(o.palettes[e][t].contrast)},"obj"!==o.msModelType||angular.equals(o.selectedColor,o.modelCtrl.$viewValue)||d(),s(e,o.palettes[e]),n.$selectedColor=o.selectedColor}function d(){"class"===o.msModelType?o.modelCtrl.$setViewValue(o.selectedColor.class):"obj"===o.msModelType&&o.modelCtrl.$setViewValue(o.selectedColor)}o.palettes=e,o.selectedPalette=!1,o.selectedHues=!1,n.$selectedColor={},o.activateHueSelection=s,o.selectColor=function(e,t){l(e,t),d(),a.hide()},o.removeColor=r,n.$watch("ngModel",function(){if(!o.modelCtrl.$viewValue||""===o.modelCtrl.$viewValue)return void r();var e,t;if("class"===o.msModelType){var n=o.modelCtrl.$viewValue.split("-");5<=n.length?(e=n[1]+"-"+n[2],t=n[3]):(e=n[1],t=n[2])}else"obj"===o.msModelType&&(e=o.modelCtrl.$viewValue.palette,t=o.modelCtrl.$viewValue.hue||500);l(e,t)})}e.$inject=["$scope","$mdColorPalette","$mdMenu","motionGenerator"],angular.module("app.core").controller("msMaterialColorPickerController",e).directive("msMaterialColorPicker",function(){return{require:["msMaterialColorPicker","ngModel"],restrict:"E",scope:{ngModel:"=",msModelType:"@?"},controller:"msMaterialColorPickerController as vm",transclude:!0,templateUrl:"app/core/directives/ms-material-color-picker/ms-material-color-picker.html",link:function(e,t,n,a,i){var o=a[0];o.modelCtrl=a[1],o.msModelType=e.msModelType||"class",i(e,function(e){(e=e.filter(function(e,t){return 1===t.nodeType})).length&&t.find("ms-color-picker-button").replaceWith(e)})}}})}(),function(){"use strict";function e(p,g,v){return{restrict:"A",link:function(e,t,n){var a="true"===n.msNavIsFolded,i=!1,o=angular.element(p[0].body),s=angular.element('<div id="ms-nav-fold-open-overlay"></div>'),r=angular.element('<div id="ms-nav-fold-close-overlay"></div>'),l=t.parent();function d(){o.addClass("ms-nav-folded"),g.$broadcast("msNav::forceCollapse"),t.scrollTop(0),l.append(s),s.on("mouseenter touchstart",function(e){c(e),i=!0})}function c(e){angular.isDefined(e)&&e.preventDefault(),o.addClass("ms-nav-folded-open"),g.$broadcast("msNav::expandMatchingToggles"),l.find(s).remove(),l.parent().append(r),r.on("mouseenter touchstart",function(e){m(e),i=!1})}function m(e){angular.isDefined(e)&&e.preventDefault(),g.$broadcast("msNav::forceCollapse"),t.scrollTop(0),o.removeClass("ms-nav-folded-open"),l.parent().find(r).remove(),l.append(s),s.on("mouseenter touchstart",function(e){c(e),i=!0})}function u(){o.removeClass("ms-nav-folded ms-nav-folded-open"),g.$broadcast("msNav::expandMatchingToggles"),t.off("mouseenter mouseleave")}v.setFoldable(e,t,a),a?d():u(),e.toggleFold=function(){(a=!a)?d():u()},e.openFolded=c,e.closeFolded=m,e.isNavFoldedOpen=function(){return i},e.$on("$destroy",function(){s.off("mouseenter touchstart"),r.off("mouseenter touchstart"),t.off("mouseenter mouseleave")})}}}function t(n,a,i){return{restrict:"E",scope:{},controller:"MsNavController",compile:function(e){return e.addClass("ms-nav"),function(e){n.$broadcast("msNav::expandMatchingToggles");var t=n.$on("$stateChangeSuccess",function(){n.$broadcast("msNav::expandMatchingToggles"),a.when("navigation").then(function(e){e.close(),i.isNavFoldedOpen()&&i.closeFolded()})});e.$on("$destroy",function(){t()})}}}}function n(m,u,p,g){return{restrict:"A",require:"^msNav",scope:!0,compile:function(e,t){return e.addClass("ms-nav-toggle"),angular.isUndefined(t.collapsed)&&(t.collapsed=!0),e.attr("collapsed",t.collapsed),function(a,i,e,n){var o={expanded:"expanded",expandAnimation:"expand-animation",collapseAnimation:"collapse-animation"},t=i.find("a"),s=[],r=/\(.*\)/g;function l(){return"true"===i.attr("collapsed")}function d(){var e=u.defer();if(!l())return e.reject({error:!0}),e.promise;i.attr("collapsed",!1);var t=angular.element(i.find("ms-nav-toggle-items")[0]);t.css({position:"absolute",visibility:"hidden",display:"block",height:"auto"});var n=t[0].offsetHeight;return t.css({position:"",visibility:"",display:"",height:""}),a.$evalAsync(function(){p.animate(t,{display:"block",height:"0px"},{height:n+"px"},o.expandAnimation).then(function(){t.addClass(o.expanded),t.css({height:""}),e.resolve({success:!0})})}),e.promise}function c(){var e=u.defer();if(l())return e.reject({error:!0}),e.promise;i.attr("collapsed",!0);var t=angular.element(i.find("ms-nav-toggle-items")[0]),n=t[0].offsetHeight;return a.$evalAsync(function(){p.animate(t,{height:n+"px"},{height:"0px"},o.collapseAnimation).then(function(){t.removeClass(o.expanded),t.css({display:"",height:""}),e.resolve({success:!0})})}),e.promise}angular.forEach(t,function(e){var t=angular.element(e).attr("ui-sref");angular.isUndefined(t)||(t=t.replace(r,""),s.push(t))}),n.setToggleItem(i,a),i.children(".ms-nav-button").on("click",function(){if(n.isDisabled())return;n.disable(),l()?(n.clearLockedItems(),a.$emit("msNav::pushToLockedList"),m.$broadcast("msNav::collapse"),d().then(function(){n.enable()})):a.$broadcast("msNav::forceCollapse")}),a.$on("$destroy",function(){i.children(".ms-nav-button").off("click")}),a.$on("msNav::collapse",function(){var e=n.getLockedItems(),t=!1;angular.forEach(e,function(e){angular.equals(e.scope,a)&&(t=!0)}),t||c().then(function(){n.enable()})}),a.$on("msNav::forceCollapse",function(){c().then(function(){n.enable()})}),a.$on("msNav::expandMatchingToggles",function(){var t=g.current.name,n=!1;angular.forEach(s,function(e){t===e&&(n=!0)}),n?d():c()}),a.$on("msNav::pushToLockedList",function(){n.setLockedItem(i,a)})}}}}e.$inject=["$document","$rootScope","msNavFoldService"],t.$inject=["$rootScope","$mdComponentRegistry","msNavFoldService"],n.$inject=["$rootScope","$q","$animate","$state"],angular.module("app.core").factory("msNavFoldService",function(){var n={};return{setFoldable:function(e,t){n={scope:e,element:t}},isNavFoldedOpen:function(){return n.scope.isNavFoldedOpen()},toggleFold:function(){n.scope.toggleFold()},openFolded:function(){n.scope.openFolded()},closeFolded:function(){n.scope.closeFolded()}}}).directive("msNavIsFolded",e).controller("MsNavController",function(){var e=this,t=!1,n=[],a=[];e.isDisabled=function(){return t},e.enable=function(){t=!1},e.disable=function(){t=!0},e.setToggleItem=function(e,t){n.push({element:e,scope:t})},e.getLockedItems=function(){return a},e.setLockedItem=function(e,t){a.push({element:e,scope:t})},e.clearLockedItems=function(){a=[]}}).directive("msNav",t).directive("msNavTitle",function(){return{restrict:"A",compile:function(e){return e.addClass("ms-nav-title"),function(){}}}}).directive("msNavButton",function(){return{restrict:"AE",compile:function(e){return e.addClass("ms-nav-button"),function(){}}}}).directive("msNavToggle",n)}(),function(){"use strict";function e(e,t){e.root?this.navigation=t.getNavigation(e.root):this.navigation=t.getNavigation(),this.toggleHorizontalMobileMenu=function(){angular.element("body").toggleClass("ms-navigation-horizontal-mobile-menu-active")},t.sort()}function t(c,m,u,p){return{restrict:"E",scope:{folded:"=",root:"@"},controller:"MsNavigationController as vm",templateUrl:"app/core/directives/ms-navigation/templates/vertical.html",transclude:!0,compile:function(e){return e.addClass("ms-navigation"),function(e,t){var n=angular.element("body"),a=angular.element('<div id="ms-navigation-fold-expander"></div>'),i=angular.element('<div id="ms-navigation-fold-collapser"></div>'),o=u("navigation");function s(e){if(p.setFolded(e),e)c.$broadcast("msNavigation::collapse"),n.addClass("ms-navigation-folded"),r();else{var t=p.getActiveItem();t&&t.scope.$emit("msNavigation::stateMatched"),n.removeClass("ms-navigation-folded ms-navigation-folded-open"),i.remove()}}function r(){t.parent().append(a),m(function(){a.on("mouseenter touchstart",l)})}function l(e){e&&e.preventDefault(),p.setFoldedOpen(!0);var t=p.getActiveItem();t&&t.scope.$emit("msNavigation::stateMatched"),n.addClass("ms-navigation-folded-open"),a.remove(),n.find("#main").append(i),i.on("mouseenter touchstart",d)}function d(e){e&&e.preventDefault(),p.setFoldedOpen(!1),c.$broadcast("msNavigation::collapse"),n.removeClass("ms-navigation-folded-open"),i.remove(),r()}p.setNavigationScope(e),function(){null===p.getFolded()&&p.setFolded(e.folded);p.getFolded()&&(m(function(){c.$broadcast("msNavigation::collapse")}),n.addClass("ms-navigation-folded"),r())}(),e.$watch(function(){return o.isLockedOpen()},function(e,t){if(!angular.isUndefined(e)&&!angular.equals(e,t)&&p.getFolded())if(e)c.$broadcast("msNavigation::collapse");else{var n=p.getActiveItem();n&&n.scope.$emit("msNavigation::stateMatched")}}),e.$watch("folded",function(e,t){angular.isUndefined(e)||angular.equals(e,t)||s(e)}),e.toggleFolded=function(){s(!p.getFolded())},e.$on("$stateChangeStart",function(){o.close()}),e.$on("$destroy",function(){i.off("mouseenter touchstart"),a.off("mouseenter touchstart")})}}}}function n(n,e,a,i,t,o){var s=this;s.element=e,s.node=n.node,s.hasChildren=void 0,s.collapsed=void 0,s.collapsable=void 0,s.group=void 0,s.animateHeightClass="animate-height",s.toggleCollapsed=function(){s.collapsed?s.expand():s.collapse()},s.collapse=function(){var e=s.element.children("ul"),t=e[0].offsetHeight;n.$evalAsync(function(){s.collapsed=!0,s.element.addClass("collapsing"),i.animate(e,{display:"block",height:t+"px"},{height:"0px"},s.animateHeightClass).then(function(){e.css({display:"",height:""}),s.element.removeClass("collapsing")}),n.$broadcast("msNavigation::collapse")})},s.expand=function(){var e=s.element.children("ul");e.css({position:"absolute",visibility:"hidden",display:"block",height:"auto"});var t=e[0].offsetHeight;e.css({position:"",visibility:"",display:"",height:""}),n.$evalAsync(function(){s.collapsed=!1,s.element.addClass("expanding"),i.animate(e,{display:"block",height:"0px"},{height:t+"px"},s.animateHeightClass).then(function(){e.css({height:""}),s.element.removeClass("expanding")}),a.$broadcast("msNavigation::collapse",s.node._path)})},s.getClass=function(){return s.node.class},s.isHidden=function(){if(angular.isDefined(s.node.hidden)&&angular.isFunction(s.node.hidden))return s.node.hidden();return!1},function(){s.hasChildren=0<s.node.children.length,s.group=!(!angular.isDefined(s.node.group)||!0!==s.node.group),!s.hasChildren||s.group?s.collapsable=!1:s.collapsable=!(!angular.isUndefined(s.node.collapsable)&&"boolean"==typeof s.node.collapsable&&!0!==s.node.collapsable);s.collapsable?s.collapsed=!(!angular.isUndefined(s.node.collapsed)&&"boolean"==typeof s.node.collapsed&&!0!==s.node.collapsed):s.collapsed=!1;if(s.node.state===t.current.name||t.includes(s.node.state)){if(angular.isDefined(s.node.stateParams)&&angular.isDefined(t.params)&&!angular.equals(s.node.stateParams,t.params))return;n.$emit("msNavigation::stateMatched"),o.setActiveItem(s.node,n)}n.$on("msNavigation::stateMatched",function(){s.collapsable&&s.collapsed&&n.$evalAsync(function(){s.collapsed=!1})}),n.$on("msNavigation::collapse",function(e,t){if(!s.collapsed&&s.collapsable)if(angular.isUndefined(t))s.collapse();else{var n=t.split("."),a=[],i=o.getActiveItem();if(i&&(a=i.node._path.split(".")),-1<n.indexOf(s.node._id))return;if(-1<a.indexOf(s.node._id))return;s.collapse()}}),n.$on("$stateChangeSuccess",function(){if(s.node.state===t.current.name){if(angular.isDefined(s.node.stateParams)&&angular.isDefined(t.params)&&!angular.equals(s.node.stateParams,t.params))return;o.setActiveItem(s.node,n),a.$broadcast("msNavigation::collapse",s.node._path)}if(t.includes(s.node.state)){if(angular.isDefined(s.node.stateParams)&&angular.isDefined(t.params)&&!angular.equals(s.node.stateParams,t.params))return;n.$emit("msNavigation::stateMatched")}})}()}function a(t){return{restrict:"E",scope:{root:"@"},controller:"MsNavigationController as vm",templateUrl:"app/core/directives/ms-navigation/templates/horizontal.html",transclude:!0,compile:function(e){return e.addClass("ms-navigation-horizontal"),function(e){t.setNavigationScope(e)}}}}function i(n,e,t,a,i){var o=this;o.element=e,o.node=n.node,o.hasChildren=void 0,o.group=void 0,o.getClass=function(){return o.node.class},function(){if(o.isActive=!1,o.hasChildren=0<o.node.children.length,o.group=!(!angular.isDefined(o.node.group)||!0!==o.node.group),o.node.state===a.current.name||a.includes(o.node.state)){if(angular.isDefined(o.node.stateParams)&&angular.isDefined(a.params)&&!angular.equals(o.node.stateParams,a.params))return;n.$emit("msNavigation::stateMatched"),i.setActiveItem(o.node,n)}n.$on("msNavigation::stateMatched",function(){o.hasChildren&&n.$evalAsync(function(){o.isActive=!0})}),n.$on("msNavigation::clearActive",function(){if(o.hasChildren){var e=[],t=i.getActiveItem();t&&(e=t.node._path.split(".")),-1<e.indexOf(o.node._id)?n.$evalAsync(function(){o.isActive=!0}):n.$evalAsync(function(){o.isActive=!1})}}),n.$on("$stateChangeSuccess",function(){if(o.node.state===a.current.name||a.includes(o.node.state)){if(angular.isDefined(o.node.stateParams)&&angular.isDefined(a.params)&&!angular.equals(o.node.stateParams,a.params))return;i.setActiveItem(o.node,n),t.$broadcast("msNavigation::clearActive")}})}()}function o(i){return{restrict:"A",require:"^msNavigationHorizontalNode",compile:function(e){return e.addClass("ms-navigation-horizontal-item"),function(e,t,n,a){t.on("click",function(){if(!a.hasChildren||i("gt-md"))return;t.toggleClass("expanded")}),e.$on("$destroy",function(){t.off("click")})}}}}e.$inject=["$scope","msNavigationService"],t.$inject=["$rootScope","$timeout","$mdSidenav","msNavigationService"],n.$inject=["$scope","$element","$rootScope","$animate","$state","msNavigationService"],a.$inject=["msNavigationService"],i.$inject=["$scope","$element","$rootScope","$state","msNavigationService"],o.$inject=["$mdMedia"],angular.module("app.core").provider("msNavigationService",function(){var r=angular.injector(["ng"]).get("$log"),l=[];function s(e,t){if(angular.isString(e)){for(var n=e.split("."),a=n[n.length-1],i=function(e){var t=l;if(1===e.length)return t;e.pop();for(var n=0;n<e.length;n++){for(var a=e[n],i=!0,o=0;o<t.length;o++)if(t[o]._id===a){t=t[o].children,i=!1;break}if(i){var s={_id:a,_path:e.join("."),title:a,weight:1,children:[]};t.push(s),t=s.children}}return t}(n),o=!1,s=0;s<i.length;s++)if(i[s]._id===a){o=i[s];break}o?(angular.extend(o,t),o.uisref=m(o)):(t.children=[],!angular.isUndefined(t.weight)&&angular.isNumber(t.weight)||(t.weight=1),t._id=a,t._path=e,t.uisref=m(t),i.push(t))}else r.error("path must be a string (eg. `dashboard.project`)")}function d(e){if(angular.isString(e)){for(var t=l,n=e.split("."),a=0;a<n.length;a++)for(var i=n[a],o=0;o<t.length;o++)if(t[o]._id===i){if(t[o]._path===e)return t.splice(o,1),!0;t=t[o].children;break}return!1}r.error("path must be a string (eg. `dashboard.project`)")}function c(e){e||(e=l).sort(a);for(var t=0;t<e.length;t++){var n=e[t].children;1<n.length&&n.sort(a),0<n.length&&c(n)}}function a(e,t){return parseInt(e.weight)-parseInt(t.weight)}function m(e){var t="";return angular.isDefined(e.state)&&(t=e.state,angular.isDefined(e.stateParams)&&angular.isObject(e.stateParams)&&(t=t+"("+angular.toJson(e.stateParams)+")")),t}this.saveItem=s,this.deleteItem=d,this.sortByWeight=c,this.$get=function(){var n=null,t=null,a=null,i=null,e={saveItem:s,deleteItem:d,sort:c,clearNavigation:function(){l=[],t&&(t.vm.navigation=l)},setActiveItem:function(e,t){n={node:e,scope:t}},getActiveItem:function(){return n},getNavigation:o,getFlatNavigation:function(e){return function e(t){var n=[];for(var a=0;a<t.length;a++){var i=angular.copy(t[a]);i.children=[],n.push(i),0<t[a].children.length&&(n=n.concat(e(t[a].children)))}return n}(o(e))},setNavigationScope:function(e){t=e},setFolded:function(e){a=e},getFolded:function(){return a},setFoldedOpen:function(e){i=e},getFoldedOpen:function(){return i},toggleFolded:function(){t.toggleFolded()}};return e;function o(e){if(e){for(var t=0;t<l.length;t++)if(l[t]._id===e)return[l[t]];return null}return l}}}).controller("MsNavigationController",e).directive("msNavigation",t).controller("MsNavigationNodeController",n).directive("msNavigationNode",function(){return{restrict:"A",bindToController:{node:"=msNavigationNode"},controller:"MsNavigationNodeController as vm",compile:function(e){return e.addClass("ms-navigation-node"),function(e,t,n,a){t.addClass(a.getClass()),a.group&&t.addClass("group")}}}}).directive("msNavigationItem",function(){return{restrict:"A",require:"^msNavigationNode",compile:function(e){return e.addClass("ms-navigation-item"),function(e,t,n,a){a.collapsable&&t.on("click",a.toggleCollapsed),e.$on("$destroy",function(){t.off("click")})}}}}).directive("msNavigationHorizontal",a).controller("MsNavigationHorizontalNodeController",i).directive("msNavigationHorizontalNode",function(){return{restrict:"A",bindToController:{node:"=msNavigationHorizontalNode"},controller:"MsNavigationHorizontalNodeController as vm",compile:function(e){return e.addClass("ms-navigation-horizontal-node"),function(e,t,n,a){t.addClass(a.getClass()),a.group&&t.addClass("group")}}}}).directive("msNavigationHorizontalItem",o)}(),function(){"use strict";function e(i,t,o,e,n,s,a,r,l,d,c){var m=this,u=["ringingId","speakerId","microphoneId","ringingVolume","speakerVolume","microphoneVolume","ringingMute","speakerMute","microphoneMute"],p=JSON.parse(a.localStorage.getItem("motion2.user:"+m.conf.id))||{webrtc:{ringingVolume:.5,speakerVolume:.5,microphoneVolume:1,ringingMute:!1,speakerMute:!1,microphoneMute:!1}};function g(e){switch(e){case"ringing":m.conf.ringingMute&&m.soundPlayer.pause(),m.conf.ringingId&&m.soundPlayer.setSinkId(m.conf.ringingId).catch(function(e){console.info(e.message,m.conf.ringingId)});break;case"speaker":m.conf.speakerMute&&m.remotePlayer.pause(),m.conf.speakerId&&m.soundPlayer.setSinkId(m.conf.speakerId).catch(function(e){console.info(e.message,m.conf.speakerId)});break;case"microphone":if(m.conf.microphoneMute)for(var t=0;t<m.sessions.length;t+=1)m.sessions[t].mute();break;default:console.log("unknown device")}}function v(e,t,n){m.calls.unshift({target:e,fullname:n||e,inbound:t,time:moment().format("HH:mm")}),50<m.calls.length&&m.calls.pop()}function h(){return m.conf.license&&m.conf.isWebRTCSupported&&m.conf.hasMicrophone&&m.conf.hasSpeakers&&"https"===m.conf.protocol&&("chrome"===m.conf.browserName.toLowerCase()||"opera"===m.conf.browserName.toLowerCase()||"safari"===m.conf.browserName.toLowerCase())}function b(){p.webrtc=_.pick(m.conf,u),a.localStorage.setItem("motion2.user:"+m.conf.id,JSON.stringify(p))}function f(e){this.remotePlayer.srcObject=e.stream}function A(e){var t,n,a=e.session;switch(e.originator){case"local":a.outgoing=!0,a.name=e.request.ruri.user,a.user=e.request.ruri.user,v(a.user,!1);break;case"remote":a.incoming=!0,a.name=e.request.from.display_name,a.user=e.request.from.uri.user,t=e.session,n=t.name?t.name+" <"+t.user+">":t.user,c.create("Incoming call from: ",n,null,function(){t.answer(m.sessionConf)},function(){t.terminate()}).then(function(e){t.notification=e}).catch(function(e){console.error(e)}),v(e.session.user,!0),m.conf.autoAnswer&&o(function(){a.isInProgress()&&(a.autoAnswer=!0,m.conf.microphoneId?m.sessionConf.mediaConstraints.audio={deviceId:m.conf.microphoneId}:m.sessionConf.mediaConstraints.audio=!0,a.answer(m.sessionConf))},m.conf.autoAnswerDelay?1e3*m.conf.autoAnswerDelay:0)}a.call_id=e.request.call_id,a.connection&&(a.connection.onaddstream=f.bind(this)),a.on("progress",function(e,t){var n=!1;switch(t.originator){case"local":this.conf.ringingMute||(this.soundPlayer.setAttribute("src","assets/ms-phonebar/sounds/incoming-call.ogg"),n=!0);break;case"remote":this.putOtherCallsOnHold(e),this.soundPlayer.setAttribute("src","assets/ms-phonebar/sounds/outgoing-call.ogg"),n=!0}n&&(this.soundPlayer.loop="loop",this.soundPlayer.play().catch(function(e){console.log(e.message)}))}.bind(this,a)),a.on("confirmed",function(n,e){return n.confirmed=!0,"remote"===e.originator&&n.connection&&(n.connection.onaddstream=f.bind(this),_.head(n.connection.getRemoteStreams())&&(this.remotePlayer.srcObject=_.head(n.connection.getRemoteStreams()))),this.soundPlayer.pause(),this.soundPlayer.loop=null,this.putOtherCallsOnHold(n),g("speaker"),g("microphone"),n.autoAnswer&&(this.soundPlayer.setAttribute("src","assets/ms-phonebar/sounds/beep.ogg"),this.soundPlayer.play().catch(function(e){console.log(e.message)})),d.rpc.getVoiceChannels().$promise.then(function(e){var t=_.find(e.rows,function(e){return e.sipcalllinkedid===n.call_id?e:e.sipcalluniqueid===n.call_id?e:null});t&&(n.monitor=t.monitor,n.uniqueid=t.uniqueid,n.monitors=t.monitors)}).catch(function(e){console.error(e)})}.bind(this,a)),a.on("hold",function(e,t){"local"===t.originator&&(e.localHold=!0)}.bind(this,a)),a.on("unhold",function(e,t){"local"===t.originator&&(e.localHold=!1)}.bind(this,a)),a.on("ended",function(e,t){_.remove(this.sessions,{id:e.id})}.bind(this,a)),a.on("failed",function(e,t){this.soundPlayer.pause(),this.soundPlayer.loop=null,e.notification&&e.notification.close(),_.remove(this.sessions,{id:e.id})}.bind(this,a)),this.sessions.push(a)}function E(){m.target="",document.getElementById("ms-target").blur(),document.getElementById("ms-target").value="",i.$broadcast("angucomplete-alt:clearInput","ms-target-wrap")}function y(e,t,n,a){return function(){s.show(s.simple().textContent(t).position(n).hideDelay(a)),e.terminate()}}e(function(){},999),m.direction="right",m.selectedMode="md-scale",m.target="",m.showDialpad=!1,m.soundPlayer=document.createElement("audio"),m.remotePlayer=document.getElementById(m.conf.remotePlayerId),m.soundPlayer.volume=1,m.sessionConf={mediaConstraints:{audio:!0,video:!1}},m.sessions=[],m.calls=[],m.ua=new JsSIP.UA({sockets:[new JsSIP.WebSocketInterface("wss://"+m.conf.host+":8089/ws")],uri:new JsSIP.URI("sip",m.conf.name,m.conf.host,5060,null,null).toString(),authorization_user:m.conf.name,ha1:m.conf.ha1,realm:m.conf.realm,user_agent:m.conf.ua,session_timers_refresh_method:"invite",register_expires:m.conf.phoneBarExpires||60,register:!0}),m.conf=_.merge(p.webrtc,m.conf),t.bind("keyup",function(e){switch(e.keyCode){case 27:o(function(){m.showDialpad=!1})}}),m.$onInit=function(){g("ringing"),g("speaker"),b(),this.ua.on("registered",function(){console.log("registered"),this.registered=!0}.bind(this)),this.ua.on("unregistered",function(){console.log("unregistered"),this.registered=!1}.bind(this)),this.ua.on("newRTCSession",A.bind(this)),DetectRTC.load(function(){this.conf.hasMicrophone=DetectRTC.hasMicrophone,this.conf.hasSpeakers="Chrome"!==DetectRTC.browser.name&&"Edge"!==DetectRTC.browser.name&&"Opera"!==DetectRTC.browser.name||DetectRTC.hasSpeakers,this.conf.isWebRTCSupported=DetectRTC.isWebRTCSupported,this.conf.osName=DetectRTC.osName,this.conf.osVersion=DetectRTC.osVersion,this.conf.browserName=DetectRTC.browser.name,this.conf.browserVersion=DetectRTC.browser.version,h()?this.ua.start():this.conf.license||l.warning({title:r.instant("TOOLBAR.WARNING"),msg:r.instant("TOOLBAR.WEBRTC_LICENSE_NOT_ENABELD"),clickToClose:!0,showClose:!0,shake:!1,timeout:!1,position:"bottom-right"})}.bind(this))}.bind(this),m.type=function(e,t){var n=e;switch(m.target||(m.target=""),t&&(m.target+=e,i.$broadcast("angucomplete-alt:changeInput","ms-target-wrap",m.target)),e){case"*":n="asterisk";break;case"#":n="pound"}m.conf.enableDtmfTone&&(m.soundPlayer.setAttribute("src","assets/ms-phonebar/sounds/dialpad/"+n+".ogg"),m.soundPlayer.play().catch(function(e){console.log(e.message)}));for(var a=0;a<m.sessions.length;a+=1)m.sessions[a].isEstablished()&&!m.sessions[a].isOnHold().local&&m.sessions[a].sendDTMF(e)},m.call=function(){if(m.target&&m.target!==m.conf.name&&m.target!==m.conf.internal){m.conf.microphoneId?m.sessionConf.mediaConstraints.audio={deviceId:m.conf.microphoneId}:m.sessionConf.mediaConstraints.audio=!0;var e=m.target.replace(/ /g,"");e=(e=e.replace(/\(/g,"")).replace(/\)/g,""),m.ua.call(e,m.sessionConf)}E()},m.hold=function(e){e.hold({useUpdate:!1})},m.refer=function(t){var e=n.prompt().title("Transfer").textContent("Type the target").placeholder("Target").ariaLabel("Target").ok("Transfer").cancel("Cancel");n.show(e).then(function(e){t.refer(e,{eventHandlers:{requestSucceeded:y(t,"requestSucceeded","top right",3e3),requestFailed:y(t,"requestFailed","top right",3e3)}})})},m.record=function(e){n.show({controller:"RecordDialogController",controllerAs:"vm",templateUrl:"assets/ms-phonebar/record/dialog.html",parent:angular.element(t.body),clickOutsideToClose:!0,locals:{session:e,sessions:m.sessions}})},m.unhold=function(e){e.unhold({useUpdate:!1})},m.answer=function(e){e.answer(m.sessionConf)},m.terminate=function(e){e.terminate()},m.selectSession=function(e){e.unhold({useUpdate:!1}),m.putOtherCallsOnHold(e)},m.typeWrapper=function(e){switch(e.key.toLowerCase()){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"*":case"#":m.type(e.key);break;case"enter":m.call()}},m.toggleDialpad=function(){m.showDialpad=!m.showDialpad},m.referAttended=function(e){n.show({controller:"ReferAttendedDialogController",controllerAs:"vm",templateUrl:"assets/ms-phonebar/referAttended/dialog.html",parent:angular.element(t.body),clickOutsideToClose:!0,locals:{session:e,sessions:_.reject(m.sessions,{id:e.id})}})},m.toggleVolume=function(e){switch(e){case"ringing":m.conf.ringingMute=!m.conf.ringingMute;break;case"speaker":m.conf.speakerMute?(m.conf.speakerMute=!1,m.remotePlayer.play().catch(function(e){console.log(e.message)})):(m.conf.speakerMute=!0,m.remotePlayer.pause());break;case"microphone":m.conf.microphoneMute=!m.conf.microphoneMute;for(var t=0;t<m.sessions.length;t+=1)m.conf.microphoneMute?m.sessions[t].mute():m.sessions[t].unmute();break;default:console.log("unknown device")}b()},m.closeDialpad=function(){m.showDialpad=!1},m.putOtherCallsOnHold=function(e){if(1<m.sessions.length)for(var t=0;t<m.sessions.length;t+=1)m.sessions[t].id===e.id||m.sessions[t].isOnHold().remote||m.sessions[t].hold({useUpdate:!1})},m.targetChanged=function(e){e?/^(\w|\.|\+|#|\*|\(|\)|\s|\-)*$/.test(e)?(m.target=e,i.$broadcast("angucomplete-alt:changeInput","ms-target-wrap",m.target)):m.target?i.$broadcast("angucomplete-alt:changeInput","ms-target-wrap",m.target):E():E()},m.targetSelected=function(e){e&&(m.target=e.originalObject.target,m.call(),E())},i.$on("webrtc::settings",function(e){n.show({controller:"SettingsController",controllerAs:"vm",templateUrl:"assets/ms-phonebar/settings/settings.html",parent:angular.element(t.body),targetEvent:e,clickOutsideToClose:!0,resolve:{devices:function(){return navigator.mediaDevices.enumerateDevices()}},locals:{conf:m.conf}}).then(function(e){e&&(m.conf=e,g("ringing"),g("speaker"),b())})}),i.$on("webrtc::logout",function(){m.ua.stop()}),i.$on("webrtc::call",function(e,t){t.target&&(m.target=t.target,m.call())}),i.$on("webrtc::transfer",function(e,t){if(t.target)for(var n=0;n<m.sessions.length;n+=1)if(m.sessions[n].isEstablished()&&!m.sessions[n].isOnHold().local){m.sessions[n].refer(t.target,{eventHandlers:{requestSucceeded:y(m.sessions[n],"requestSucceeded","top right",3e3),requestFailed:y(m.sessions[n],"requestFailed","top right",3e3)}});break}})}e.$inject=["$scope","$document","$timeout","$interval","$mdDialog","$mdToast","$window","$translate","toasty","api","motNotification"],angular.module("app.core").controller("MsPhonebarController",e).directive("msPhonebar",function(){return{restrict:"E",scope:{conf:"="},require:"msPhonebar",controller:"MsPhonebarController",controllerAs:"vm_pb",bindToController:!0,templateUrl:"assets/ms-phonebar/ms-phonebar.html"}})}(),function(){"use strict";function e(i){return{restrict:"C",controller:["$scope","$element",function(e,t){function n(){t.css("display","inline"),i(a,1e3)}function a(){t.css("display","none"),i(n,1e3)}n()}],replace:!0}}function t(t,i,o,e,n){var s=this;function a(t,e){console.log("startMonitor");var n=i.defer(),a=(e||t.filename.replace(/^.*[\\\/]/,"")).split(".")[0];return o.rpc.startMonitor({uniqueid:s.session.uniqueid,filename:a,format:"wav"}).$promise.then(function(e){t.filename=a+".wav",t.mixmonitorid=e.mixmonitorid,t.status="rec",s.session.monitor=!0,n.resolve(t)}).catch(function(e){n.reject(e)}),n.promise}s.title="Record",s.sessions=e,s.session=n,s.closeDialog=function(){t.hide()},s.addRecording=function(){var e=t.prompt({skipHide:!0}).title("Start new recording").textContent("Type the file name.").placeholder("File name").ariaLabel("File name").initialValue(function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}()).ok("Start").cancel("Cancel");t.show(e).then(function(e){return a({},e)}).then(function(e){s.session.monitors.push(e)})},s.stop=function(t){return console.log("stopMonitor"),o.rpc.stopMonitor({uniqueid:s.session.uniqueid,mixmonitorid:t.mixmonitorid}).$promise.then(function(e){t.status="pause",s.session.monitor=_.includes(s.session.monitors,{status:"rec"})}).catch(function(e){console.error(e)})},s.start=a}e.$inject=["$timeout"],t.$inject=["$mdDialog","$q","api","sessions","session"],angular.module("app.core").directive("msBlink",e).controller("RecordDialogController",t)}(),function(){"use strict";function e(t,a,i,e){var o=this;function s(e){t.hide(e)}o.title="Refer Attended",o.sessions=i,o.session=e,o.sessionTarget=null,o.closeDialog=s,o.transfer=function(){var e,t,n=_.find(i,function(e){if(e.user===o.target)return e});n.outgoing?(e=n,t=o.session):(e=o.session,t=n);t.refer(e.user,{replaces:e,eventHandlers:{requestSucceeded:function(e){a.show(a.simple().textContent("requestSucceeded").position("top right").hideDelay(3e3)),s(),t.terminate()},requestFailed:function(e){a.show(a.simple().textContent("requestFailed").position("top right").hideDelay(3e3)),s(),t.terminate()}}})}}e.$inject=["$mdDialog","$mdToast","sessions","session"],angular.module("app.core").controller("ReferAttendedDialogController",e)}(),function(){"use strict";function e(e,o,t){var n=this;function a(e,t,n){var a;if(o[n]){if(a=_.find(e,function(e){return e.deviceId===o[n]}))return a.deviceId;var i=_.findIndex(e,function(e){return e.kind===t&&"default"!==e.deviceId});if(0<=i)return e[i].deviceId}else(a=_.find(e,function(e){return e.kind===t&&"default"!==e.deviceId}))&&(o[n]=a.deviceId);return o[n]||null}o.ringingId=a(t,"audiooutput","ringingId"),o.speakerId=a(t,"audiooutput","speakerId"),o.microphoneId=a(t,"audioinput","microphoneId"),o.ringingVolume=o.ringingVolume||.5,o.speakerVolume=o.speakerVolume||.5,o.microphoneVolume=o.microphoneVolume||1,o.ringingMute=o.ringingMute||!1,o.speakerMute=o.speakerMute||!1,o.microphoneMute=o.microphoneMute||!1,n.conf=angular.copy(o),n.devices=t,n.saveSettings=function(){e.hide(n.conf)},n.closeDialog=function(){e.hide()},n.isCompatibleBrowser=function(){return"chrome"===n.conf.browserName.toLowerCase()||"opera"===n.conf.browserName.toLowerCase()||"safari"===n.conf.browserName.toLowerCase()}}e.$inject=["$mdDialog","conf","devices"],angular.module("app.toolbar").controller("SettingsController",e)}(),function(){"use strict";angular.module("app.core").directive("msRandomClass",function(){return{restrict:"A",scope:{msRandomClass:"="},link:function(e,t){var n=e.msRandomClass[Math.floor(Math.random()*e.msRandomClass.length)];t.addClass(n)}}})}(),function(){"use strict";function e(i){return{restrict:"E",scope:{id:"=",model:"=",download:"="},replace:!0,link:function(t,e){var n=!1,a=document.createElement("audio");t.download||a.setAttribute("controlsList","nodownload"),a.setAttribute("preload","none"),a.setAttribute("controls",""),a.setAttribute("style","width: 265px;"),a.setAttribute("src"," "),a.onplay=function(e){n||(n=!0,e.preventDefault(),i[t.model||"voiceRecording"].download({id:t.id}).$promise.then(function(e){var t=[e.buffer],n=new Blob(t,{type:e.type});a.setAttribute("type",e.type),a.setAttribute("src",URL.createObjectURL(n)),a.play()}).catch(function(e){console.error(e)}))},e.append(a)}}}e.$inject=["api"],angular.module("app.core").directive("msRecording",e)}(),function(){"use strict";angular.module("app.core").directive("msResponsiveTable",function(){return{restrict:"A",link:function(e,t){var n=angular.element('<div class="ms-responsive-table-wrapper"></div>');t.after(n),n.append(t)}}})}(),function(){"use strict";function e(o,s,t,n){return{restrict:"AE",compile:function(e){if(!(n.getConfig("disableCustomScrollbars")||n.getConfig("disableCustomScrollbarsOnMobile")&&t.isMobile()))return e.addClass("ms-scroll"),function(e,t,n){var a={};function i(){PerfectScrollbar.update(t[0])}n.msScroll&&(a=e.$eval(n.msScroll)),a=angular.extend({},s.getConfig(),a),o(function(){PerfectScrollbar.initialize(t[0],a)},0),t.on("mouseenter",i),e.$watch(function(){return t.prop("scrollHeight")},function(e,t){angular.isUndefined(e)||angular.equals(e,t)||i()}),e.$watch(function(){return t.prop("scrollWidth")},function(e,t){angular.isUndefined(e)||angular.equals(e,t)||i()}),e.$on("$destroy",function(){t.off("mouseenter"),PerfectScrollbar.destroy(t[0])})}}}}e.$inject=["$timeout","msScrollConfig","msUtils","motionConfig"],angular.module("app.core").provider("msScrollConfig",function(){var t={wheelSpeed:1,wheelPropagation:!1,swipePropagation:!0,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,useKeyboard:!0,suppressScrollX:!1,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0,stopPropagationOnClick:!0};this.config=function(e){t=angular.extend({},t,e)},this.$get=function(){var e={getConfig:function(){return t}};return e}}).directive("msScroll",e)}(),function(){"use strict";function e(o,i,e){var s=this;s.collapsed=!0,s.query="",s.queryOptions={debounce:s.debounce||0};var t=!(!s.collapseOnBlur||"true"!=s.collapseOnBlur);s.resultsLoading=!1,s.results=null,s.selectedResultIndex=0,s.ignoreMouseEvents=!1,s.populateResults=function(e){if(s.collapsed)return;var t=angular.isArray(e),n=null===e;if(!t&&!n)return;s.selectedResultIndex=0,s.results=e},s.expand=function(){s.collapsed=!1,o.expand(),s.onExpand&&angular.isFunction(s.onExpand)&&s.onExpand()},s.collapse=function(){s.query="",s.populateResults(null),s.collapsed=!0,o.collapse(),s.onCollapse&&angular.isFunction(s.onCollapse)&&s.onCollapse()},s.blurCollapse=function(){if(!t)return;s.collapse()},s.absorbEvent=function(e){e.preventDefault()},s.handleKeydown=function(e){var t=e.keyCode;-1<[27,38,40].indexOf(t)&&e.preventDefault();switch(t){case 13:if(!s.results)return;s.handleResultClick(s.results[s.selectedResultIndex]);break;case 27:s.collapse();break;case 38:0<=s.selectedResultIndex-1&&(s.selectedResultIndex--,s.ensureSelectedResultIsVisible());break;case 40:if(!s.results)return;s.selectedResultIndex+1<s.results.length&&(s.selectedResultIndex++,s.ensureSelectedResultIsVisible())}},s.handleMouseenter=function(e){if(s.ignoreMouseEvents)return;s.selectedResultIndex=e},s.temporarilyIgnoreMouseEvents=function(){s.ignoreMouseEvents=!0,e.cancel(s.mouseEventIgnoreTimeout),s.mouseEventIgnoreTimeout=e(function(){s.ignoreMouseEvents=!1},250)},s.handleResultClick=function(e){s.onResultClick&&s.onResultClick({item:e});s.collapse()},s.ensureSelectedResultIsVisible=function(){var e=i.find(".ms-search-bar-results"),t=angular.element(e.find(".result")[s.selectedResultIndex]);if(e&&t){var n=t.position().top-8,a=t.position().top+t.outerHeight()+8;s.temporarilyIgnoreMouseEvents(),e.scrollTop()>n&&e.scrollTop(n),a>e.height()+e.scrollTop()&&e.scrollTop(a-e.height())}},o.$watch("MsSearchBar.query",function(e,t){if(!angular.isUndefined(e)&&!angular.equals(e,t)&&!s.collapsed){var n=o.$parent.$eval(s.onSearch,{query:e}),a=angular.isArray(n),i=n&&!!n.then;a&&s.populateResults(n),i&&(s.resultsLoading=!0,n.then(function(e){s.populateResults(e)},function(){s.populateResults([])}).finally(function(){s.resultsLoading=!1}))}})}function t(i){return{restrict:"E",scope:{},require:"msSearchBar",controller:"MsSearchBarController as MsSearchBar",bindToController:{debounce:"=?",onSearch:"@",onResultClick:"&?",onExpand:"&?",onCollapse:"&?",collapseOnBlur:"@"},templateUrl:"app/core/directives/ms-search-bar/ms-search-bar.html",compile:function(e){return e.addClass("ms-search-bar"),function(e,t){var n,a=i.find("body");e.collapse=function(){t.removeClass("expanded"),a.removeClass("ms-search-bar-expanded")},e.expand=function(){t.addClass("expanded"),a.addClass("ms-search-bar-expanded"),n.focus()},n=t.find("#ms-search-bar-input")}}}}e.$inject=["$scope","$element","$timeout"],t.$inject=["$document"],angular.module("app.core").controller("MsSearchBarController",e).directive("msSearchBar",t)}(),function(){"use strict";function e(e,n,i,s,r,l){var d=this;d.query="",d.queryOptions={debounce:300},d.resultsLoading=!1,d.selectedResultIndex=0,d.ignoreMouseEvents=!1,d.mobileBarActive=!1,d.results=null,d.shortcuts=[],d.sortableOptions={ghostClass:"ghost",forceFallback:!0,fallbackClass:"dragging",onSort:function(){d.saveShortcuts()}},d.populateResults=function(){for(var e=[],t=l.getFlatNavigation(),n=r.defer(),a=0;a<t.length;a++)t[a].uisref&&e.push(t[a]);if(d.query){e=e.filter(function(e){if(-1<angular.lowercase(e.title).search(angular.lowercase(d.query)))return!0});for(var i=0;i<e.length;i++){e[i].hasShortcut=!1;for(var o=0;o<d.shortcuts.length;o++)if(d.shortcuts[o]._id===e[i]._id){e[i].hasShortcut=!0;break}}}else 0<d.shortcuts.length&&(e=d.shortcuts);return d.selectedResultIndex=0,s(function(){n.resolve(e)},250),n.promise},d.loadShortcuts=function(){var e=r.defer(),t=angular.fromJson(n.get("motion.shortcuts"));angular.isUndefined(t)&&(t=[{title:"Agents",icon:"icon-account-multiple",state:"app.staff.agents",weight:5,children:[],uisref:"app.staff.agents",hasShortcut:!0},{title:"License",icon:"icon-cog",state:"app.settings.license",weight:10,children:[],uisref:"app.settings.license",hasShortcut:!0}],n.put("motion.shortcuts",angular.toJson(t)));return e.resolve(t),e.promise},d.saveShortcuts=function(){var e=r.defer();return n.put("motion.shortcuts",angular.toJson(d.shortcuts)),s(function(){e.resolve({success:!0})},250),e.promise},d.addShortcut=function(e){e.hasShortcut=!0,d.shortcuts.push(e),d.saveShortcuts()},d.removeShortcut=function(e){e.hasShortcut=!1;for(var t=0;t<d.shortcuts.length;t++)d.shortcuts[t]._id===e._id&&(d.shortcuts.splice(t,1),d.query||(0===d.shortcuts.length?d.results=null:t>=d.shortcuts.length&&(d.selectedResultIndex=d.shortcuts.length-1)));d.saveShortcuts()},d.handleResultClick=function(e){e.hasShortcut?d.removeShortcut(e):d.addShortcut(e)},d.absorbEvent=function(e){e.preventDefault()},d.handleKeydown=function(e){var t=e.keyCode;-1<[38,40].indexOf(t)&&e.preventDefault();switch(t){case 13:d.handleResultClick(d.results[d.selectedResultIndex]);break;case 38:0<=d.selectedResultIndex-1&&(d.selectedResultIndex--,d.ensureSelectedResultIsVisible());break;case 40:d.selectedResultIndex+1<d.results.length&&(d.selectedResultIndex++,d.ensureSelectedResultIsVisible())}},d.handleMouseenter=function(e){if(d.ignoreMouseEvents)return;d.selectedResultIndex=e},d.temporarilyIgnoreMouseEvents=function(){d.ignoreMouseEvents=!0,s.cancel(d.mouseEventIgnoreTimeout),d.mouseEventIgnoreTimeout=s(function(){d.ignoreMouseEvents=!1},250)},d.ensureSelectedResultIsVisible=function(){var e=i.find("#ms-shortcut-add-menu").find(".results"),t=angular.element(e.find(".result")[d.selectedResultIndex]);if(e&&t){var n=t.position().top-8,a=t.position().top+t.outerHeight()+8;d.temporarilyIgnoreMouseEvents(),e.scrollTop()>n&&e.scrollTop(n),a>e.height()+e.scrollTop()&&e.scrollTop(a-e.height())}},d.toggleMobileBar=function(){d.mobileBarActive=!d.mobileBarActive},d.loadShortcuts().then(function(e){d.shortcuts=e,0<d.shortcuts.length&&(d.results=e)}),e.$watch("MsShortcuts.query",function(e,t){angular.isUndefined(e)||angular.equals(e,t)||(d.resultsLoading=!0,d.populateResults().then(function(e){d.results=e},function(){d.results=[]}).finally(function(){d.resultsLoading=!1}))})}e.$inject=["$scope","$cookies","$document","$timeout","$q","msNavigationService"],angular.module("app.core").controller("MsShortcutsController",e).directive("msShortcuts",function(){return{restrict:"E",scope:{},require:"msShortcuts",controller:"MsShortcutsController as MsShortcuts",bindToController:{},templateUrl:"app/core/directives/ms-shortcuts/ms-shortcuts.html",compile:function(e){return e.addClass("ms-shortcuts"),function(e,t){}}}})}(),function(){"use strict";angular.module("app.core").directive("msSidenavHelper",function(){return{restrict:"A",require:"^mdSidenav",link:function(e,t,n,a){e.$watch(function(){return a.isOpen()&&!a.isLockedOpen()},function(e){angular.isUndefined(e)||(t.parent().toggleClass("full-height",e),angular.element("html").toggleClass("sidenav-open",e))})}}})}(),function(){"use strict";function e(a){return{restrict:"E",link:function(e,t){var n=e.$on("msSplashScreen::remove",function(){a.leave(t).then(function(){n(),e=t=null})})}}}e.$inject=["$animate"],angular.module("app.core").directive("msSplashScreen",e)}(),function(){"use strict";function e(e){var i=this;function t(){i.setCurrentStep(1)}function n(e){return s(e)?i.steps[e-1].scope.optionalStep:null}function a(e){return s(e)?!!i.steps[e-1].scope.hideStep:null}function o(e){return s(e)?!!n(e)||i.steps[e-1].form.$valid:null}function s(e){return!(angular.isUndefined(e)||e<1||e>i.steps.length)}i.mainForm=void 0,i.orientation="horizontal",i.steps=[],i.currentStep=void 0,i.currentStepNumber=1,i.setOrientation=function(e){i.orientation=e||"horizontal"},i.registerMainForm=function(e){i.mainForm=e},i.registerStep=function(e,t,n){var a={element:e,scope:t,form:n,stepNumber:t.step||i.steps.length+1,stepTitle:t.stepTitle,stepTitleTranslate:t.stepTitleTranslate};return i.steps.push(a),i.steps.sort(function(e,t){return e.stepNumber-t.stepNumber}),a},i.setupSteps=function(){i.setCurrentStep(i.currentStepNumber)},i.resetForm=function(){e(function(){for(var e=0;e<i.steps.length;e++)i.steps[e].form.$setPristine(),i.steps[e].form.$setUntouched();i.mainForm.$setPristine(),i.mainForm.$setUntouched(),t()})},i.setCurrentStep=function(e){if(!s(e))return;if(i.currentStepNumber=e,"horizontal"===i.orientation){for(var t=0;t<i.steps.length;t++)i.steps[t].element.hide();i.steps[i.currentStepNumber-1].element.show()}else if("vertical"===i.orientation){for(var n=0;n<i.steps.length;n++)i.steps[n].element.find(".ms-stepper-step-content").hide();i.steps[i.currentStepNumber-1].element.find(".ms-stepper-step-content").show()}},i.gotoStep=function(e){if(a(e))return;i.setCurrentStep(e)},i.gotoPreviousStep=function(){for(var e=i.currentStepNumber-1,t=e;1<=t;t--)if(!a(t)){e=t;break}i.setCurrentStep(e)},i.gotoNextStep=function(){for(var e=i.currentStepNumber+1,t=e;t<=i.steps.length;t++)if(!a(t)){e=t;break}i.setCurrentStep(e)},i.gotoFirstStep=t,i.gotoLastStep=function(){i.setCurrentStep(i.steps.length)},i.isFirstStep=function(){return 1===i.currentStepNumber},i.isLastStep=function(){return i.currentStepNumber===i.steps.length},i.isStepCurrent=function(e){if(!s(e))return null;return i.currentStepNumber===e},i.isStepDisabled=function(e){if(!s(e))return null;for(var t=!1,n=1;n<e;n++)if(!o(n)){t=!0;break}return t},i.isStepOptional=n,i.isStepHidden=a,i.filterHiddenStep=function(e){return!a(e.stepNumber)},i.isStepValid=o,i.isStepNumberValid=s,i.isFormValid=function(){return i.mainForm.$valid}}function t(s){return{restrict:"A",scope:{},require:["form","msVerticalStepper"],priority:1001,controller:"MsStepperController as MsStepper",bindToController:{model:"=ngModel"},transclude:!0,templateUrl:"app/core/directives/ms-stepper/templates/vertical/vertical.html",compile:function(e){return e.addClass("ms-stepper"),function(e,t,n,a){var i=a[0],o=a[1];s(function(){o.setOrientation("vertical"),o.registerMainForm(i),o.setupSteps()})}}}}e.$inject=["$timeout"],t.$inject=["$timeout"],angular.module("app.core").controller("MsStepperController",e).directive("msHorizontalStepper",function(){return{restrict:"A",scope:{},require:["form","msHorizontalStepper"],priority:1001,controller:"MsStepperController as MsStepper",bindToController:{model:"=ngModel"},transclude:!0,templateUrl:"app/core/directives/ms-stepper/templates/horizontal/horizontal.html",compile:function(e){return e.addClass("ms-stepper"),function(e,t,n,a){var i=a[0],o=a[1];o.setOrientation("horizontal"),o.registerMainForm(i),o.setupSteps()}}}}).directive("msHorizontalStepperStep",function(){return{restrict:"E",require:["form","^msHorizontalStepper"],priority:1e3,scope:{step:"=?",stepTitle:"=?",stepTitleTranslate:"=?",optionalStep:"=?",hideStep:"=?"},compile:function(e){return e.addClass("ms-stepper-step"),function(e,t,n,a){var i=a[0],o=a[1];e.optionalStep=angular.isDefined(n.optionalStep),o.registerStep(t,e,i),t.hide()}}}}).directive("msVerticalStepper",t).directive("msVerticalStepperStep",function(){return{restrict:"E",require:["form","^msVerticalStepper"],priority:1e3,scope:{step:"=?",stepTitle:"=?",stepTitleTranslate:"=?",optionalStep:"=?",hideStep:"=?"},transclude:!0,templateUrl:"app/core/directives/ms-stepper/templates/vertical/step/vertical-step.html",compile:function(e){return e.addClass("ms-stepper-step"),function(e,t,n,a){var i=a[0],o=a[1];e.optionalStep=angular.isDefined(n.optionalStep),e.stepInfo=o.registerStep(t,e,i),e.MsStepper=o,t.find(".ms-stepper-step-content").hide()}}}})}(),function(){"use strict";function e(m,u){return{scope:!0,require:"^msTimeline",compile:function(e){return e.addClass("ms-timeline-item").addClass("hidden"),function(e,n,t,a){var i=72,o=!1,s=!1,r=a.getScrollEl();!function(){n.find("ms-card")?e.$on("msCard::cardTemplateLoaded",function(e,t){var n=angular.element(t[0]);d(n).then(function(){m(function(){o=!0})})}):d(n).then(function(){m(function(){o=!0})});r.on("scroll",c),c()}();var l=e.$watch(function(){return o&&s},function(e,t){angular.equals(e,t)||e&&(n.removeClass("hidden").addClass("animate"),l())},!0);function d(e){var t=u.defer(),n=e.find("img");return 0<n.length?n.on("load",function(){t.resolve("Image is loaded")}):t.resolve("No images"),t.promise}function c(){r.scrollTop()+r.height()>n.position().top+i&&(m(function(){s=!0}),r.off("scroll",c))}}}}}e.$inject=["$timeout","$q"],angular.module("app.core").controller("MsTimelineController",function(){var t=this;t.scrollEl=void 0,t.setScrollEl=function(e){t.scrollEl=e},t.getScrollEl=function(){return t.scrollEl}}).directive("msTimeline",function(){return{scope:{msTimeline:"=?",loadMore:"&?msTimelineLoadMore"},controller:"MsTimelineController",compile:function(e){return e.addClass("ms-timeline"),function(e,t,n,a){var i=angular.element('<div class="ms-timeline-loader md-accent-bg md-whiteframe-4dp"><span class="spinner animate-rotate"></span></div>');t.append(i);var o={scrollEl:"#content"};o=angular.extend(o,e.msTimeline,{});var s=angular.element(o.scrollEl);a.setScrollEl(s);var r=144;function l(){s.scrollTop()+s.height()+r>i.position().top&&(i.addClass("show"),c(),e.loadMore().then(function(){i.removeClass("show"),d()},function(){i.remove()}))}function d(){s.on("scroll",l)}function c(){s.off("scroll",l)}d(),e.$on("$destroy",function(){c()})}}}}).directive("msTimelineItem",e)}(),function(){"use strict";angular.module("app.core").directive("msTimezone",function(){return{restrict:"E",scope:{ngModel:"="},controller:["$scope",function(e){e.timezone=[{name:"Europe/Andorra",utcOffset:60,offsetStr:"+01:00",countries:["AD"]},{name:"Asia/Dubai",utcOffset:240,offsetStr:"+04:00",countries:["AE","OM"]},{name:"Asia/Kabul",utcOffset:270,offsetStr:"+04:30",countries:["AF"]},{name:"Europe/Tirane",utcOffset:60,offsetStr:"+01:00",countries:["AL"]},{name:"Asia/Yerevan",utcOffset:240,offsetStr:"+04:00",countries:["AM"]},{name:"Antarctica/Rothera",utcOffset:-180,offsetStr:"-03:00",countries:["AQ"]},{name:"Antarctica/Palmer",utcOffset:-180,offsetStr:"-03:00",countries:["AQ"]},{name:"Antarctica/Mawson",utcOffset:300,offsetStr:"+05:00",countries:["AQ"]},{name:"Antarctica/Davis",utcOffset:420,offsetStr:"+07:00",countries:["AQ"]},{name:"Antarctica/Casey",utcOffset:480,offsetStr:"+08:00",countries:["AQ"]},{name:"Antarctica/Vostok",utcOffset:360,offsetStr:"+06:00",countries:["AQ"]},{name:"Antarctica/DumontDUrville",utcOffset:600,offsetStr:"+10:00",countries:["AQ"]},{name:"Antarctica/Syowa",utcOffset:180,offsetStr:"+03:00",countries:["AQ"]},{name:"Antarctica/Troll",utcOffset:0,offsetStr:"+00:00",countries:["AQ"]},{name:"America/Argentina/Buenos_Aires",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Cordoba",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Salta",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Jujuy",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Tucuman",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Catamarca",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/La_Rioja",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/San_Juan",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Mendoza",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/San_Luis",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Rio_Gallegos",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Ushuaia",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"Pacific/Pago_Pago",utcOffset:-660,offsetStr:"-11:00",countries:["AS","UM"]},{name:"Europe/Vienna",utcOffset:60,offsetStr:"+01:00",countries:["AT"]},{name:"Australia/Lord_Howe",utcOffset:660,offsetStr:"+11:00",countries:["AU"]},{name:"Antarctica/Macquarie",utcOffset:660,offsetStr:"+11:00",countries:["AU"]},{name:"Australia/Hobart",utcOffset:660,offsetStr:"+11:00",countries:["AU"]},{name:"Australia/Currie",utcOffset:660,offsetStr:"+11:00",countries:["AU"]},{name:"Australia/Melbourne",utcOffset:660,offsetStr:"+11:00",countries:["AU"]},{name:"Australia/Sydney",utcOffset:660,offsetStr:"+11:00",countries:["AU"]},{name:"Australia/Broken_Hill",utcOffset:630,offsetStr:"+10:30",countries:["AU"]},{name:"Australia/Brisbane",utcOffset:600,offsetStr:"+10:00",countries:["AU"]},{name:"Australia/Lindeman",utcOffset:600,offsetStr:"+10:00",countries:["AU"]},{name:"Australia/Adelaide",utcOffset:630,offsetStr:"+10:30",countries:["AU"]},{name:"Australia/Darwin",utcOffset:570,offsetStr:"+09:30",countries:["AU"]},{name:"Australia/Perth",utcOffset:480,offsetStr:"+08:00",countries:["AU"]},{name:"Australia/Eucla",utcOffset:525,offsetStr:"+08:45",countries:["AU"]},{name:"Asia/Baku",utcOffset:240,offsetStr:"+04:00",countries:["AZ"]},{name:"America/Barbados",utcOffset:-240,offsetStr:"-04:00",countries:["BB"]},{name:"Asia/Dhaka",utcOffset:360,offsetStr:"+06:00",countries:["BD"]},{name:"Europe/Brussels",utcOffset:60,offsetStr:"+01:00",countries:["BE"]},{name:"Europe/Sofia",utcOffset:120,offsetStr:"+02:00",countries:["BG"]},{name:"Atlantic/Bermuda",utcOffset:-240,offsetStr:"-04:00",countries:["BM"]},{name:"Asia/Brunei",utcOffset:480,offsetStr:"+08:00",countries:["BN"]},{name:"America/La_Paz",utcOffset:-240,offsetStr:"-04:00",countries:["BO"]},{name:"America/Noronha",utcOffset:-120,offsetStr:"-02:00",countries:["BR"]},{name:"America/Belem",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Fortaleza",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Recife",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Araguaina",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Maceio",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Bahia",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Sao_Paulo",utcOffset:-120,offsetStr:"-02:00",countries:["BR"]},{name:"America/Campo_Grande",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Cuiaba",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Santarem",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Porto_Velho",utcOffset:-240,offsetStr:"-04:00",countries:["BR"]},{name:"America/Boa_Vista",utcOffset:-240,offsetStr:"-04:00",countries:["BR"]},{name:"America/Manaus",utcOffset:-240,offsetStr:"-04:00",countries:["BR"]},{name:"America/Eirunepe",utcOffset:-300,offsetStr:"-05:00",countries:["BR"]},{name:"America/Rio_Branco",utcOffset:-300,offsetStr:"-05:00",countries:["BR"]},{name:"America/Nassau",utcOffset:-300,offsetStr:"-05:00",countries:["BS"]},{name:"Asia/Thimphu",utcOffset:360,offsetStr:"+06:00",countries:["BT"]},{name:"Europe/Minsk",utcOffset:180,offsetStr:"+03:00",countries:["BY"]},{name:"America/Belize",utcOffset:-360,offsetStr:"-06:00",countries:["BZ"]},{name:"America/St_Johns",utcOffset:-210,offsetStr:"-03:30",countries:["CA"]},{name:"America/Halifax",utcOffset:-240,offsetStr:"-04:00",countries:["CA"]},{name:"America/Glace_Bay",utcOffset:-240,offsetStr:"-04:00",countries:["CA"]},{name:"America/Moncton",utcOffset:-240,offsetStr:"-04:00",countries:["CA"]},{name:"America/Goose_Bay",utcOffset:-240,offsetStr:"-04:00",countries:["CA"]},{name:"America/Blanc-Sablon",utcOffset:-240,offsetStr:"-04:00",countries:["CA"]},{name:"America/Toronto",utcOffset:-300,offsetStr:"-05:00",countries:["CA"]},{name:"America/Nipigon",utcOffset:-300,offsetStr:"-05:00",countries:["CA"]},{name:"America/Thunder_Bay",utcOffset:-300,offsetStr:"-05:00",countries:["CA"]},{name:"America/Iqaluit",utcOffset:-300,offsetStr:"-05:00",countries:["CA"]},{name:"America/Pangnirtung",utcOffset:-300,offsetStr:"-05:00",countries:["CA"]},{name:"America/Resolute",utcOffset:-360,offsetStr:"-06:00",countries:["CA"]},{name:"America/Atikokan",utcOffset:-300,offsetStr:"-05:00",countries:["CA"]},{name:"America/Rankin_Inlet",utcOffset:-360,offsetStr:"-06:00",countries:["CA"]},{name:"America/Winnipeg",utcOffset:-360,offsetStr:"-06:00",countries:["CA"]},{name:"America/Rainy_River",utcOffset:-360,offsetStr:"-06:00",countries:["CA"]},{name:"America/Regina",utcOffset:-360,offsetStr:"-06:00",countries:["CA"]},{name:"America/Swift_Current",utcOffset:-360,offsetStr:"-06:00",countries:["CA"]},{name:"America/Edmonton",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Cambridge_Bay",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Yellowknife",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Inuvik",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Creston",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Dawson_Creek",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Fort_Nelson",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Vancouver",utcOffset:-480,offsetStr:"-08:00",countries:["CA"]},{name:"America/Whitehorse",utcOffset:-480,offsetStr:"-08:00",countries:["CA"]},{name:"America/Dawson",utcOffset:-480,offsetStr:"-08:00",countries:["CA"]},{name:"Indian/Cocos",utcOffset:390,offsetStr:"+06:30",countries:["CC"]},{name:"Europe/Zurich",utcOffset:60,offsetStr:"+01:00",countries:["CH","DE","LI"]},{name:"Africa/Abidjan",utcOffset:0,offsetStr:"+00:00",countries:["CI","BF","GM","GN","ML","MR","SH","SL","SN","ST","TG"]},{name:"Pacific/Rarotonga",utcOffset:-600,offsetStr:"-10:00",countries:["CK"]},{name:"America/Santiago",utcOffset:-180,offsetStr:"-03:00",countries:["CL"]},{name:"Pacific/Easter",utcOffset:-300,offsetStr:"-05:00",countries:["CL"]},{name:"Asia/Shanghai",utcOffset:480,offsetStr:"+08:00",countries:["CN"]},{name:"Asia/Urumqi",utcOffset:360,offsetStr:"+06:00",countries:["CN"]},{name:"America/Bogota",utcOffset:-300,offsetStr:"-05:00",countries:["CO"]},{name:"America/Costa_Rica",utcOffset:-360,offsetStr:"-06:00",countries:["CR"]},{name:"America/Havana",utcOffset:-300,offsetStr:"-05:00",countries:["CU"]},{name:"Atlantic/Cape_Verde",utcOffset:-60,offsetStr:"-01:00",countries:["CV"]},{name:"America/Curacao",utcOffset:-240,offsetStr:"-04:00",countries:["CW","AW","BQ","SX"]},{name:"Indian/Christmas",utcOffset:420,offsetStr:"+07:00",countries:["CX"]},{name:"Asia/Nicosia",utcOffset:120,offsetStr:"+02:00",countries:["CY"]},{name:"Europe/Prague",utcOffset:60,offsetStr:"+01:00",countries:["CZ","SK"]},{name:"Europe/Berlin",utcOffset:60,offsetStr:"+01:00",countries:["DE"]},{name:"Europe/Copenhagen",utcOffset:60,offsetStr:"+01:00",countries:["DK"]},{name:"America/Santo_Domingo",utcOffset:-240,offsetStr:"-04:00",countries:["DO"]},{name:"Africa/Algiers",utcOffset:60,offsetStr:"+01:00",countries:["DZ"]},{name:"America/Guayaquil",utcOffset:-300,offsetStr:"-05:00",countries:["EC"]},{name:"Pacific/Galapagos",utcOffset:-360,offsetStr:"-06:00",countries:["EC"]},{name:"Europe/Tallinn",utcOffset:120,offsetStr:"+02:00",countries:["EE"]},{name:"Africa/Cairo",utcOffset:120,offsetStr:"+02:00",countries:["EG"]},{name:"Africa/El_Aaiun",utcOffset:0,offsetStr:"+00:00",countries:["EH"]},{name:"Europe/Madrid",utcOffset:60,offsetStr:"+01:00",countries:["ES"]},{name:"Africa/Ceuta",utcOffset:60,offsetStr:"+01:00",countries:["ES"]},{name:"Atlantic/Canary",utcOffset:0,offsetStr:"+00:00",countries:["ES"]},{name:"Europe/Helsinki",utcOffset:120,offsetStr:"+02:00",countries:["FI","AX"]},{name:"Pacific/Fiji",utcOffset:720,offsetStr:"+12:00",countries:["FJ"]},{name:"Atlantic/Stanley",utcOffset:-180,offsetStr:"-03:00",countries:["FK"]},{name:"Pacific/Chuuk",utcOffset:600,offsetStr:"+10:00",countries:["FM"]},{name:"Pacific/Pohnpei",utcOffset:660,offsetStr:"+11:00",countries:["FM"]},{name:"Pacific/Kosrae",utcOffset:660,offsetStr:"+11:00",countries:["FM"]},{name:"Atlantic/Faroe",utcOffset:0,offsetStr:"+00:00",countries:["FO"]},{name:"Europe/Paris",utcOffset:60,offsetStr:"+01:00",countries:["FR"]},{name:"Europe/London",utcOffset:0,offsetStr:"+00:00",countries:["GB","GG","IM","JE"]},{name:"Asia/Tbilisi",utcOffset:240,offsetStr:"+04:00",countries:["GE"]},{name:"America/Cayenne",utcOffset:-180,offsetStr:"-03:00",countries:["GF"]},{name:"Africa/Accra",utcOffset:0,offsetStr:"+00:00",countries:["GH"]},{name:"Europe/Gibraltar",utcOffset:60,offsetStr:"+01:00",countries:["GI"]},{name:"America/Godthab",utcOffset:-180,offsetStr:"-03:00",countries:["GL"]},{name:"America/Danmarkshavn",utcOffset:0,offsetStr:"+00:00",countries:["GL"]},{name:"America/Scoresbysund",utcOffset:-60,offsetStr:"-01:00",countries:["GL"]},{name:"America/Thule",utcOffset:-240,offsetStr:"-04:00",countries:["GL"]},{name:"Europe/Athens",utcOffset:120,offsetStr:"+02:00",countries:["GR"]},{name:"Atlantic/South_Georgia",utcOffset:-120,offsetStr:"-02:00",countries:["GS"]},{name:"America/Guatemala",utcOffset:-360,offsetStr:"-06:00",countries:["GT"]},{name:"Pacific/Guam",utcOffset:600,offsetStr:"+10:00",countries:["GU","MP"]},{name:"Africa/Bissau",utcOffset:0,offsetStr:"+00:00",countries:["GW"]},{name:"America/Guyana",utcOffset:-240,offsetStr:"-04:00",countries:["GY"]},{name:"Asia/Hong_Kong",utcOffset:480,offsetStr:"+08:00",countries:["HK"]},{name:"America/Tegucigalpa",utcOffset:-360,offsetStr:"-06:00",countries:["HN"]},{name:"America/Port-au-Prince",utcOffset:-300,offsetStr:"-05:00",countries:["HT"]},{name:"Europe/Budapest",utcOffset:60,offsetStr:"+01:00",countries:["HU"]},{name:"Asia/Jakarta",utcOffset:420,offsetStr:"+07:00",countries:["ID"]},{name:"Asia/Pontianak",utcOffset:420,offsetStr:"+07:00",countries:["ID"]},{name:"Asia/Makassar",utcOffset:480,offsetStr:"+08:00",countries:["ID"]},{name:"Asia/Jayapura",utcOffset:540,offsetStr:"+09:00",countries:["ID"]},{name:"Europe/Dublin",utcOffset:0,offsetStr:"+00:00",countries:["IE"]},{name:"Asia/Jerusalem",utcOffset:120,offsetStr:"+02:00",countries:["IL"]},{name:"Asia/Kolkata",utcOffset:330,offsetStr:"+05:30",countries:["IN"]},{name:"Indian/Chagos",utcOffset:360,offsetStr:"+06:00",countries:["IO"]},{name:"Asia/Baghdad",utcOffset:180,offsetStr:"+03:00",countries:["IQ"]},{name:"Asia/Tehran",utcOffset:210,offsetStr:"+03:30",countries:["IR"]},{name:"Atlantic/Reykjavik",utcOffset:0,offsetStr:"+00:00",countries:["IS"]},{name:"Europe/Rome",utcOffset:60,offsetStr:"+01:00",countries:["IT","SM","VA"]},{name:"America/Jamaica",utcOffset:-300,offsetStr:"-05:00",countries:["JM"]},{name:"Asia/Amman",utcOffset:120,offsetStr:"+02:00",countries:["JO"]},{name:"Asia/Tokyo",utcOffset:540,offsetStr:"+09:00",countries:["JP"]},{name:"Africa/Nairobi",utcOffset:180,offsetStr:"+03:00",countries:["KE","DJ","ER","ET","KM","MG","SO","TZ","UG","YT"]},{name:"Asia/Bishkek",utcOffset:360,offsetStr:"+06:00",countries:["KG"]},{name:"Pacific/Tarawa",utcOffset:720,offsetStr:"+12:00",countries:["KI"]},{name:"Pacific/Enderbury",utcOffset:780,offsetStr:"+13:00",countries:["KI"]},{name:"Pacific/Kiritimati",utcOffset:840,offsetStr:"+14:00",countries:["KI"]},{name:"Asia/Pyongyang",utcOffset:510,offsetStr:"+08:30",countries:["KP"]},{name:"Asia/Seoul",utcOffset:540,offsetStr:"+09:00",countries:["KR"]},{name:"America/Cayman",utcOffset:-300,offsetStr:"-05:00",countries:["KY"]},{name:"Asia/Almaty",utcOffset:360,offsetStr:"+06:00",countries:["KZ"]},{name:"Asia/Qyzylorda",utcOffset:360,offsetStr:"+06:00",countries:["KZ"]},{name:"Asia/Aqtobe",utcOffset:300,offsetStr:"+05:00",countries:["KZ"]},{name:"Asia/Aqtau",utcOffset:300,offsetStr:"+05:00",countries:["KZ"]},{name:"Asia/Oral",utcOffset:300,offsetStr:"+05:00",countries:["KZ"]},{name:"Asia/Beirut",utcOffset:120,offsetStr:"+02:00",countries:["LB"]},{name:"Asia/Colombo",utcOffset:330,offsetStr:"+05:30",countries:["LK"]},{name:"Africa/Monrovia",utcOffset:0,offsetStr:"+00:00",countries:["LR"]},{name:"Europe/Vilnius",utcOffset:120,offsetStr:"+02:00",countries:["LT"]},{name:"Europe/Luxembourg",utcOffset:60,offsetStr:"+01:00",countries:["LU"]},{name:"Europe/Riga",utcOffset:120,offsetStr:"+02:00",countries:["LV"]},{name:"Africa/Tripoli",utcOffset:120,offsetStr:"+02:00",countries:["LY"]},{name:"Africa/Casablanca",utcOffset:0,offsetStr:"+00:00",countries:["MA"]},{name:"Europe/Monaco",utcOffset:60,offsetStr:"+01:00",countries:["MC"]},{name:"Europe/Chisinau",utcOffset:120,offsetStr:"+02:00",countries:["MD"]},{name:"Pacific/Majuro",utcOffset:720,offsetStr:"+12:00",countries:["MH"]},{name:"Pacific/Kwajalein",utcOffset:720,offsetStr:"+12:00",countries:["MH"]},{name:"Asia/Rangoon",utcOffset:390,offsetStr:"+06:30",countries:["MM"]},{name:"Asia/Ulaanbaatar",utcOffset:480,offsetStr:"+08:00",countries:["MN"]},{name:"Asia/Hovd",utcOffset:420,offsetStr:"+07:00",countries:["MN"]},{name:"Asia/Choibalsan",utcOffset:480,offsetStr:"+08:00",countries:["MN"]},{name:"Asia/Macau",utcOffset:480,offsetStr:"+08:00",countries:["MO"]},{name:"America/Martinique",utcOffset:-240,offsetStr:"-04:00",countries:["MQ"]},{name:"Europe/Malta",utcOffset:60,offsetStr:"+01:00",countries:["MT"]},{name:"Indian/Mauritius",utcOffset:240,offsetStr:"+04:00",countries:["MU"]},{name:"Indian/Maldives",utcOffset:300,offsetStr:"+05:00",countries:["MV"]},{name:"America/Mexico_City",utcOffset:-360,offsetStr:"-06:00",countries:["MX"]},{name:"America/Cancun",utcOffset:-300,offsetStr:"-05:00",countries:["MX"]},{name:"America/Merida",utcOffset:-360,offsetStr:"-06:00",countries:["MX"]},{name:"America/Monterrey",utcOffset:-360,offsetStr:"-06:00",countries:["MX"]},{name:"America/Matamoros",utcOffset:-360,offsetStr:"-06:00",countries:["MX"]},{name:"America/Mazatlan",utcOffset:-420,offsetStr:"-07:00",countries:["MX"]},{name:"America/Chihuahua",utcOffset:-420,offsetStr:"-07:00",countries:["MX"]},{name:"America/Ojinaga",utcOffset:-420,offsetStr:"-07:00",countries:["MX"]},{name:"America/Hermosillo",utcOffset:-420,offsetStr:"-07:00",countries:["MX"]},{name:"America/Tijuana",utcOffset:-480,offsetStr:"-08:00",countries:["MX"]},{name:"America/Santa_Isabel",utcOffset:-480,offsetStr:"-08:00",countries:["MX"]},{name:"America/Bahia_Banderas",utcOffset:-360,offsetStr:"-06:00",countries:["MX"]},{name:"Asia/Kuala_Lumpur",utcOffset:480,offsetStr:"+08:00",countries:["MY"]},{name:"Asia/Kuching",utcOffset:480,offsetStr:"+08:00",countries:["MY"]},{name:"Africa/Maputo",utcOffset:120,offsetStr:"+02:00",countries:["MZ","BI","BW","CD","MW","RW","ZM","ZW"]},{name:"Africa/Windhoek",utcOffset:120,offsetStr:"+02:00",countries:["NA"]},{name:"Pacific/Noumea",utcOffset:660,offsetStr:"+11:00",countries:["NC"]},{name:"Pacific/Norfolk",utcOffset:660,offsetStr:"+11:00",countries:["NF"]},{name:"Africa/Lagos",utcOffset:60,offsetStr:"+01:00",countries:["NG","AO","BJ","CD","CF","CG","CM","GA","GQ","NE"]},{name:"America/Managua",utcOffset:-360,offsetStr:"-06:00",countries:["NI"]},{name:"Europe/Amsterdam",utcOffset:60,offsetStr:"+01:00",countries:["NL"]},{name:"Europe/Oslo",utcOffset:60,offsetStr:"+01:00",countries:["NO","SJ"]},{name:"Asia/Kathmandu",utcOffset:345,offsetStr:"+05:45",countries:["NP"]},{name:"Pacific/Nauru",utcOffset:720,offsetStr:"+12:00",countries:["NR"]},{name:"Pacific/Niue",utcOffset:-660,offsetStr:"-11:00",countries:["NU"]},{name:"Pacific/Auckland",utcOffset:780,offsetStr:"+13:00",countries:["NZ","AQ"]},{name:"Pacific/Chatham",utcOffset:825,offsetStr:"+13:45",countries:["NZ"]},{name:"America/Panama",utcOffset:-300,offsetStr:"-05:00",countries:["PA"]},{name:"America/Lima",utcOffset:-300,offsetStr:"-05:00",countries:["PE"]},{name:"Pacific/Tahiti",utcOffset:-600,offsetStr:"-10:00",countries:["PF"]},{name:"Pacific/Marquesas",utcOffset:-570,offsetStr:"-09:30",countries:["PF"]},{name:"Pacific/Gambier",utcOffset:-540,offsetStr:"-09:00",countries:["PF"]},{name:"Pacific/Port_Moresby",utcOffset:600,offsetStr:"+10:00",countries:["PG"]},{name:"Pacific/Bougainville",utcOffset:660,offsetStr:"+11:00",countries:["PG"]},{name:"Asia/Manila",utcOffset:480,offsetStr:"+08:00",countries:["PH"]},{name:"Asia/Karachi",utcOffset:300,offsetStr:"+05:00",countries:["PK"]},{name:"Europe/Warsaw",utcOffset:60,offsetStr:"+01:00",countries:["PL"]},{name:"America/Miquelon",utcOffset:-180,offsetStr:"-03:00",countries:["PM"]},{name:"Pacific/Pitcairn",utcOffset:-480,offsetStr:"-08:00",countries:["PN"]},{name:"America/Puerto_Rico",utcOffset:-240,offsetStr:"-04:00",countries:["PR"]},{name:"Asia/Gaza",utcOffset:120,offsetStr:"+02:00",countries:["PS"]},{name:"Asia/Hebron",utcOffset:120,offsetStr:"+02:00",countries:["PS"]},{name:"Europe/Lisbon",utcOffset:0,offsetStr:"+00:00",countries:["PT"]},{name:"Atlantic/Madeira",utcOffset:0,offsetStr:"+00:00",countries:["PT"]},{name:"Atlantic/Azores",utcOffset:-60,offsetStr:"-01:00",countries:["PT"]},{name:"Pacific/Palau",utcOffset:540,offsetStr:"+09:00",countries:["PW"]},{name:"America/Asuncion",utcOffset:-180,offsetStr:"-03:00",countries:["PY"]},{name:"Asia/Qatar",utcOffset:180,offsetStr:"+03:00",countries:["QA","BH"]},{name:"Indian/Reunion",utcOffset:240,offsetStr:"+04:00",countries:["RE","TF"]},{name:"Europe/Bucharest",utcOffset:120,offsetStr:"+02:00",countries:["RO"]},{name:"Europe/Belgrade",utcOffset:60,offsetStr:"+01:00",countries:["RS","BA","HR","ME","MK","SI"]},{name:"Europe/Kaliningrad",utcOffset:120,offsetStr:"+02:00",countries:["RU"]},{name:"Europe/Moscow",utcOffset:180,offsetStr:"+03:00",countries:["RU"]},{name:"Europe/Simferopol",utcOffset:180,offsetStr:"+03:00",countries:["RU"]},{name:"Europe/Volgograd",utcOffset:180,offsetStr:"+03:00",countries:["RU"]},{name:"Europe/Samara",utcOffset:240,offsetStr:"+04:00",countries:["RU"]},{name:"Asia/Yekaterinburg",utcOffset:300,offsetStr:"+05:00",countries:["RU"]},{name:"Asia/Omsk",utcOffset:360,offsetStr:"+06:00",countries:["RU"]},{name:"Asia/Novosibirsk",utcOffset:360,offsetStr:"+06:00",countries:["RU"]},{name:"Asia/Novokuznetsk",utcOffset:420,offsetStr:"+07:00",countries:["RU"]},{name:"Asia/Krasnoyarsk",utcOffset:420,offsetStr:"+07:00",countries:["RU"]},{name:"Asia/Irkutsk",utcOffset:480,offsetStr:"+08:00",countries:["RU"]},{name:"Asia/Chita",utcOffset:480,offsetStr:"+08:00",countries:["RU"]},{name:"Asia/Yakutsk",utcOffset:540,offsetStr:"+09:00",countries:["RU"]},{name:"Asia/Khandyga",utcOffset:540,offsetStr:"+09:00",countries:["RU"]},{name:"Asia/Vladivostok",utcOffset:600,offsetStr:"+10:00",countries:["RU"]},{name:"Asia/Sakhalin",utcOffset:600,offsetStr:"+10:00",countries:["RU"]},{name:"Asia/Ust-Nera",utcOffset:600,offsetStr:"+10:00",countries:["RU"]},{name:"Asia/Magadan",utcOffset:600,offsetStr:"+10:00",countries:["RU"]},{name:"Asia/Srednekolymsk",utcOffset:660,offsetStr:"+11:00",countries:["RU"]},{name:"Asia/Kamchatka",utcOffset:720,offsetStr:"+12:00",countries:["RU"]},{name:"Asia/Anadyr",utcOffset:720,offsetStr:"+12:00",countries:["RU"]},{name:"Asia/Riyadh",utcOffset:180,offsetStr:"+03:00",countries:["SA","KW","YE"]},{name:"Pacific/Guadalcanal",utcOffset:660,offsetStr:"+11:00",countries:["SB"]},{name:"Indian/Mahe",utcOffset:240,offsetStr:"+04:00",countries:["SC"]},{name:"Africa/Khartoum",utcOffset:180,offsetStr:"+03:00",countries:["SD","SS"]},{name:"Europe/Stockholm",utcOffset:60,offsetStr:"+01:00",countries:["SE"]},{name:"Asia/Singapore",utcOffset:480,offsetStr:"+08:00",countries:["SG"]},{name:"America/Paramaribo",utcOffset:-180,offsetStr:"-03:00",countries:["SR"]},{name:"America/El_Salvador",utcOffset:-360,offsetStr:"-06:00",countries:["SV"]},{name:"Asia/Damascus",utcOffset:120,offsetStr:"+02:00",countries:["SY"]},{name:"America/Grand_Turk",utcOffset:-240,offsetStr:"-04:00",countries:["TC"]},{name:"Africa/Ndjamena",utcOffset:60,offsetStr:"+01:00",countries:["TD"]},{name:"Indian/Kerguelen",utcOffset:300,offsetStr:"+05:00",countries:["TF"]},{name:"Asia/Bangkok",utcOffset:420,offsetStr:"+07:00",countries:["TH","KH","LA","VN"]},{name:"Asia/Dushanbe",utcOffset:300,offsetStr:"+05:00",countries:["TJ"]},{name:"Pacific/Fakaofo",utcOffset:780,offsetStr:"+13:00",countries:["TK"]},{name:"Asia/Dili",utcOffset:540,offsetStr:"+09:00",countries:["TL"]},{name:"Asia/Ashgabat",utcOffset:300,offsetStr:"+05:00",countries:["TM"]},{name:"Africa/Tunis",utcOffset:60,offsetStr:"+01:00",countries:["TN"]},{name:"Pacific/Tongatapu",utcOffset:780,offsetStr:"+13:00",countries:["TO"]},{name:"Europe/Istanbul",utcOffset:120,offsetStr:"+02:00",countries:["TR"]},{name:"America/Port_of_Spain",utcOffset:-240,offsetStr:"-04:00",countries:["TT","AG","AI","BL","DM","GD","GP","KN","LC","MF","MS","VC","VG","VI"]},{name:"Pacific/Funafuti",utcOffset:720,offsetStr:"+12:00",countries:["TV"]},{name:"Asia/Taipei",utcOffset:480,offsetStr:"+08:00",countries:["TW"]},{name:"Europe/Kiev",utcOffset:120,offsetStr:"+02:00",countries:["UA"]},{name:"Europe/Uzhgorod",utcOffset:120,offsetStr:"+02:00",countries:["UA"]},{name:"Europe/Zaporozhye",utcOffset:120,offsetStr:"+02:00",countries:["UA"]},{name:"Pacific/Wake",utcOffset:720,offsetStr:"+12:00",countries:["UM"]},{name:"America/New_York",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Detroit",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Kentucky/Louisville",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Kentucky/Monticello",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Indiana/Indianapolis",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Indiana/Vincennes",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Indiana/Winamac",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Indiana/Marengo",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Indiana/Petersburg",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Indiana/Vevay",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Chicago",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/Indiana/Tell_City",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/Indiana/Knox",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/Menominee",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/North_Dakota/Center",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/North_Dakota/New_Salem",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/North_Dakota/Beulah",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/Denver",utcOffset:-420,offsetStr:"-07:00",countries:["US"]},{name:"America/Boise",utcOffset:-420,offsetStr:"-07:00",countries:["US"]},{name:"America/Phoenix",utcOffset:-420,offsetStr:"-07:00",countries:["US"]},{name:"America/Los_Angeles",utcOffset:-480,offsetStr:"-08:00",countries:["US"]},{name:"America/Metlakatla",utcOffset:-480,offsetStr:"-08:00",countries:["US"]},{name:"America/Anchorage",utcOffset:-540,offsetStr:"-09:00",countries:["US"]},{name:"America/Juneau",utcOffset:-540,offsetStr:"-09:00",countries:["US"]},{name:"America/Sitka",utcOffset:-540,offsetStr:"-09:00",countries:["US"]},{name:"America/Yakutat",utcOffset:-540,offsetStr:"-09:00",countries:["US"]},{name:"America/Nome",utcOffset:-540,offsetStr:"-09:00",countries:["US"]},{name:"America/Adak",utcOffset:-600,offsetStr:"-10:00",countries:["US"]},{name:"Pacific/Honolulu",utcOffset:-600,offsetStr:"-10:00",countries:["US","UM"]},{name:"America/Montevideo",utcOffset:-180,offsetStr:"-03:00",countries:["UY"]},{name:"Asia/Samarkand",utcOffset:300,offsetStr:"+05:00",countries:["UZ"]},{name:"Asia/Tashkent",utcOffset:300,offsetStr:"+05:00",countries:["UZ"]},{name:"America/Caracas",utcOffset:-270,offsetStr:"-04:30",countries:["VE"]},{name:"Asia/Ho_Chi_Minh",utcOffset:420,offsetStr:"+07:00",countries:["VN"]},{name:"Pacific/Efate",utcOffset:660,offsetStr:"+11:00",countries:["VU"]},{name:"Pacific/Wallis",utcOffset:720,offsetStr:"+12:00",countries:["WF"]},{name:"Pacific/Apia",utcOffset:840,offsetStr:"+14:00",countries:["WS"]},{name:"Africa/Johannesburg",utcOffset:120,offsetStr:"+02:00",countries:["ZA","LS","SZ"]}]}],templateUrl:"app/core/directives/ms-timezone/ms-timezone.html"}})}(),function(){"use strict";angular.module("app.core").controller("MsWidgetEngineCounterController",function(){var a=this;a.filter=[],a.filtered=!1,a.fontSize=20,a.getCount=function(e){var t=0;if(e){a.fontSize=e.attrs[2]&&e.attrs[2].value?parseInt(e.attrs[2].value)-parseInt(e.attrs[2].value)%2:20,e.attrs[1].value&&e.attrs[1].value.length?(a.filtered=!0,a.filter=_.intersection(e.voiceQueuesSelected,e.attrs[1].value)):(a.filtered=!1,a.filter=e.voiceQueuesSelected);for(var n=0;n<e.voiceQueues.rows.length;n+=1)_.includes(a.filter,e.voiceQueues.rows[n].id)&&("abandoned"===e.attrs[0].value?t+=parseInt(e.voiceQueues.rows[n].total)-parseInt(e.voiceQueues.rows[n].answered)-parseInt(e.voiceQueues.rows[n].unmanaged):t+=e.voiceQueues.rows[n][e.attrs[0].value]?parseInt(e.voiceQueues.rows[n][e.attrs[0].value]):0)}return t}})}(),function(){"use strict";function e(s,e){var r=this;r.filter=[],r.filtered=!1,r.properties=[],r.multiBarChart={labels:["QUEUE_NAME"],series:["TOTAL"],data:[[50]],options:{responsive:!0,legend:{display:!0,fontColor:"#2196f3"},scales:{xAxes:[{gridLines:{display:!0},ticks:{fontColor:"#2196f3",stepSize:1,beginAtZero:!0}}],yAxes:[{gridLines:{display:!1},ticks:{fontColor:"#2196f3"}}]}}},r.getMultiBarChart=function(e){e&&(e.attrs&&function(e){r.properties=_.map(_.filter(e.attrs,function(e){return e.name&&0<=e.name.indexOf("attrSerie")&&e.value&&"null"!==e.value}),"value"),e.attrs[3].value&&e.attrs[3].value.length?(r.filtered=!0,r.filter=_.intersection(e.voiceQueuesSelected,e.attrs[3].value)):(r.filtered=!1,r.filter=e.voiceQueuesSelected);if(r.multiBarChart.series.length>r.properties.length){var t=r.multiBarChart.series.length-r.properties.length;r.multiBarChart.series.splice(0,t),r.multiBarChart.data.splice(0,t)}for(var n=0;n<r.properties.length;n+=1){if(r.multiBarChart.series[n]=s.instant("TOOLS."+r.properties[n].toUpperCase()),_.isNil(r.multiBarChart.data[n])&&(r.multiBarChart.data[n]=[]),r.multiBarChart.labels.length>r.filter.length){var a=r.multiBarChart.labels.length-r.filter.length;r.multiBarChart.labels.splice(0,a),r.multiBarChart.data[n].splice(0,a)}for(var i=0,o=0;i<e.voiceQueues.rows.length;i+=1)_.includes(r.filter,e.voiceQueues.rows[i].id)&&(r.multiBarChart.labels[o]=e.voiceQueues.rows[i].name,"abandoned"===r.properties[n].toLowerCase()?r.multiBarChart.data[n][o]=parseInt(e.voiceQueues.rows[i].total)-parseInt(e.voiceQueues.rows[i].answered)-parseInt(e.voiceQueues.rows[i].unmanaged):r.multiBarChart.data[n][o]=e.voiceQueues.rows[i][r.properties[n]]?parseInt(e.voiceQueues.rows[i][r.properties[n]]):0,o+=1)}}(e),e.foreground&&function(e){r.multiBarChart.options.legend.fontColor=e.foreground;for(var t=0;t<r.multiBarChart.options.scales.xAxes.length;t+=1)r.multiBarChart.options.scales.xAxes[t].ticks.fontColor=e.foreground;for(var n=0;n<r.multiBarChart.options.scales.yAxes.length;n+=1)r.multiBarChart.options.scales.yAxes[n].ticks.fontColor=e.foreground}(e))}}e.$inject=["$translate","socket"],angular.module("app.core").controller("MsWidgetEngineMultibarChartController",e)}(),function(){"use strict";function e(o){var s=this;s.filter=[],s.filtered=!1,s.properties=[],s.pieChart={labels:["ANSWERED"],data:[30],options:{responsive:!0,legend:{display:!0}}},s.getPieChart=function(e){e&&(e.attrs&&function(e){s.properties=_.map(_.filter(e.attrs,function(e){return e.name&&0<=e.name.indexOf("attrSerie")&&e.value&&"null"!==e.value}),"value"),e.attrs[3].value&&e.attrs[3].value.length?(s.filtered=!0,s.filter=_.intersection(e.voiceQueuesSelected,e.attrs[3].value)):(s.filtered=!1,s.filter=e.voiceQueuesSelected);if(s.pieChart.labels.length>s.properties.length){var t=s.pieChart.labels.length-s.properties.length;s.pieChart.labels.splice(0,t),s.pieChart.data.splice(0,t)}for(var n=0,a=0;n<s.properties.length;n+=1){s.pieChart.labels[n]=o.instant("TOOLS."+s.properties[n].toUpperCase());for(var i=0;i<e.voiceQueues.rows.length;i+=1)_.includes(s.filter,e.voiceQueues.rows[i].id)&&("abandoned"===s.properties[n].toLowerCase()?a+=parseInt(e.voiceQueues.rows[i].total)-parseInt(e.voiceQueues.rows[i].answered)-parseInt(e.voiceQueues.rows[i].unmanaged):a+=e.voiceQueues.rows[i][s.properties[n]]?parseInt(e.voiceQueues.rows[i][s.properties[n]]):0);s.pieChart.data[n]=a,a=0}}(e),e.foreground&&(t=e,s.pieChart.options.legend.fontColor=t.foreground));var t}}e.$inject=["$translate"],angular.module("app.core").controller("MsWidgetEnginePieChartController",e)}(),function(){"use strict";function e(e,n,a,i){var o=this;function t(e){o.results=e||{count:0,rows:[]}}function s(){o.query.offset=(o.query.page-1)*o.query.limit,o.promise=i.analyticCustomReport.run(o.query,t).$promise}o.countDown=0,o.refresh=0,o.title="",o.columns=[],o.results={rows:[],count:0},o.query={limit:10,page:1,startDate:moment().startOf("day").format("YYYY-MM-DD HH:mm:ss"),endDate:moment().endOf("day").format("YYYY-MM-DD HH:mm:ss"),output:"web"},o.onInit=function e(t){t&&t.attrs&&(t.attrs[0]&&t.attrs[0].value&&(o.query.id=t.attrs[0].value,i.analyticFieldReport.get({fields:"field,alias",nolimit:!0,CustomReportId:t.attrs[0].value}).$promise.then(function(e){return e&&e.rows&&(o.columns=e.rows),i.analyticCustomReport.get({id:t.attrs[0].value,fields:"id,name"}).$promise}).then(function(e){e&&e.name&&(o.title=e.name),s()}).catch(function(e){console.log(e)})),t.attrs[1]&&t.attrs[1].value&&(o.refresh=parseInt(t.attrs[1].value),!_.isNaN(o.refresh)&&0<o.refresh?(o.countDown=parseInt(t.attrs[1].value),o.interval=a(function(){o.countDown-=1},1e3,0),o.timeout=n(function(){o.interval&&a.cancel(o.interval),e(t)},1e3*o.refresh)):(o.interval&&a.cancel(o.interval),o.timeout&&n.cancel(o.timeout))))},o.getResults=s,o.valueReplacer=function(e,t){moment(t,"YYYY-MM-DDTHH:mm:ssZ",!0).isValid()&&(t=moment(t,"").format("YYYY-MM-DD HH:mm:ss"));return t},e.$on("$destroy",function(){o.interval&&a.cancel(o.interval),o.timeout&&n.cancel(o.timeout)})}e.$inject=["$scope","$timeout","$interval","api"],angular.module("app.core").controller("MsWidgetEngineWebReportController",e)}(),function(){"use strict";function e(e,t){this.getTrustedURL=function(e){return t.trustAsResourceUrl(e)}}function t(e){return{restrict:"E",scope:{config:"=?",onEdit:"&?",onDelete:"&?"},require:"msWidgetEngine",controller:"MsWidgetEngineController",controllerAs:"vm",bindToController:!0,templateUrl:"app/core/directives/ms-widget-engine/ms-widget-engine.html"}}e.$inject=["$mdDialog","$sce"],t.$inject=["$document"],angular.module("app.core").controller("MsWidgetEngineController",e).directive("msWidgetEngine",t)}(),function(){"use strict";function e(e,t){var n=this;n.flipped=!1,n.flip=function(){if(!angular.isDefined(e.flippable)||!0!==e.flippable)return;n.flipped=!n.flipped,t.toggleClass("flipped",n.flipped)}}e.$inject=["$scope","$element"],angular.module("app.core").controller("MsWidgetController",e).directive("msWidget",function(){return{restrict:"E",scope:{flippable:"=?"},controller:"MsWidgetController",transclude:!0,compile:function(e){return e.addClass("ms-widget"),function(e,t,n,a,i){i(function(e){t.empty(),t.append(e)})}}}}).directive("msWidgetFront",function(){return{restrict:"E",require:"^msWidget",transclude:!0,compile:function(e){return e.addClass("ms-widget-front"),function(e,t,n,a,i){i(function(e){t.empty(),t.append(e)}),e.flipWidget=a.flip}}}}).directive("msWidgetBack",function(){return{restrict:"E",require:"^msWidget",transclude:!0,compile:function(e){return e.addClass("ms-widget-back"),function(e,t,n,a,i){i(function(e){t.empty(),t.append(e)}),e.flipWidget=a.flip}}}})}(),function(){"use strict";angular.module("app.core").filter("altDate",function(){return function(e){var t=Date.now()-new Date(e);return t<36e5?moment(e).fromNow():t<864e5?moment(e).format("HH:mm"):t<6048e5?moment(e).format("dddd"):moment(e).calendar()}})}(),function(){"use strict";function e(t){return function(e){return t.trustAsHtml(e)}}e.$inject=["$sce"],angular.module("app.core").filter("toTrusted",e).filter("htmlToPlaintext",function(){return function(e){return String(e).replace(/<[^>]+>/gm,"")}}).filter("nospace",function(){return function(e){return e?e.replace(/ /g,""):""}}).filter("humanizeDoc",function(){return function(e){if(e)return"directive"===e.type?e.name.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()}):e.label||e.name}})}(),function(){"use strict";angular.module("app.core").filter("filterByIds",function(){return function(e,t){if(0===e.length||!t)return e;if(0===t.length)return[];for(var n=[],a=0;a<e.length;a++){for(var i=e[a],o=!1,s=0;s<t.length;s++){var r=t[s];if(i.id===r){o=!0;break}}o&&n.push(i)}return n}})}(),function(){"use strict";angular.module("app.core").filter("filterByPropIds",function(){return function(e,t,n){if(0===e.length||!n||0===n.length)return e;for(var a=[],i=0;i<e.length;i++){for(var o=e[i],s=!1,r=0;r<n.length;r++){var l=n[r];if(-1<o[t].indexOf(l)){s=!0;break}}s&&a.push(o)}return a}})}(),function(){"use strict";angular.module("app.core").filter("filterByTags",function(){return function(e,n){if(0===e.length||0===n.length)return e;var a=[];return e.forEach(function(e){var t=n.every(function(t){var n=!1;return e.tags.forEach(function(e){e.name!==t.name||(n=!0)}),n});t&&a.push(e)}),a}}).filter("filterSingleByTags",function(){return function(e,t){if(0!==e.length&&0!==t.length){if(e.length<t.length)return[];var n=[],a=t.every(function(t){var n=!1;return e.forEach(function(e){e.name!==t.name||(n=!0)}),n});return a&&n.push(e),n}}})}(),function(){"use strict";function c(e,t,n,a){this.id=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),this.title=e,this.body=t,this.accept=n,this.reject=a,this.close=i}function m(){return/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}function i(){var n=this;navigator.serviceWorker.ready.then(function(e){e.getNotifications().then(function(e){var t=_.find(e,function(e){return e.data.id===n.id});t&&t.close()})})}angular.module("app.dashboards").provider("motNotification",function(){return{$get:[function(){var l,n,d=[];"serviceWorker"in navigator&&m()?navigator.serviceWorker.register("notification.js").then(function(e){(l=e).update(),l.installing?n=l.installing:l.waiting?n=l.waiting:l.active&&(n=l.active)}).catch(function(e){console.error("Service worker registration failed",e)}):console.error("Service Worker is not supported");return navigator.serviceWorker.addEventListener("message",function(e){if(e.source===n){var t=_.find(d,{id:e.data.id});if(t)switch(e.data.action){case"accept":t.accept&&t.accept();break;case"reject":t.reject&&t.reject()}}}),{create:function(e,i,o,s,r){return new Promise(function(t,n){var a;m()&&(window.document.hidden||window.document.mozHidden||window.document.webkitHidden)?(a=new c(e||"MyTitle",i||"MyBody",s,r),d.push(a),a?window.Notification.requestPermission().then(function(e){if("granted"===e)return l.showNotification(a.title,{body:a.body,requireInteraction:!0,icon:o||"assets/images/business/queueCampaigns.jpg",data:{id:a.id},actions:[{action:"accept",title:"Accept"},{action:"reject",title:"Reject"}]})}).then(function(e){t(a)}).catch(function(e){n(e)}):n(new Error("Notification creating error"))):t()})}}}]}})}(),function(){"use strict";function e(l,d,c){return{resolve:function(e,t){var n=e.split("@"),a=n[0],i=n[1],o=t||{};if(!a||!i)return d.error("apiResolver.resolve requires correct action parameter (ResourceName@methodName)"),!1;var s=l.defer(),r=function(e){for(var t=e.split("."),n=c,a=0;a<t.length;a++){if(angular.isUndefined(n[t[a]])){d.error('Resource part "'+t[a]+'" is not defined!'),n=!1;break}n=n[t[a]]}if(!n)return!1;return n}(a);r?r[i](o,function(e){s.resolve(e)},function(e){s.reject(e)}):(d.error('Resource "'+a+'" is not defined in the api service!'),s.reject('Resource "'+a+'" is not defined in the api service!'));return s.promise}}}e.$inject=["$q","$log","api"],angular.module("app.core").factory("apiResolver",e)}(),function(){"use strict";angular.module("app.core").provider("msApi",function(){var n=angular.injector(["ng"]).get("$log"),a="",v=[];function t(e){a=e}function i(){return a}function o(e,t){angular.isString(e)?angular.isArray(t)?v[e]={url:a+(t[0]||""),paramDefaults:t[1]||[],actions:t[2]||[],options:t[3]||{}}:n.error('"resource" must be an array and it must follow $resource definition'):n.error('"path" must be a string (eg. `dashboard.project`)')}this.setBaseUrl=t,this.getBaseUrl=i,this.getApiObject=function(){return v},this.register=o,this.$get=["$log","$q","$resource","$rootScope",function(m,u,p,g){var e={setBaseUrl:t,getBaseUrl:i,register:o,resolve:function(e,t){g.$broadcast("msApi::resolveStart");var n=e.split("@"),a=n[0],i=n[1],o=t||{};if(!a||!i)return m.error("msApi.resolve requires correct action parameter (resourceName@methodName)"),!1;var s=u.defer(),r=v[a];if(r){var l=p(r.url,r.paramDefaults,r.actions,r.options);l[i](o,function(e){s.resolve(e),g.$broadcast("msApi::resolveSuccess")},function(e){s.reject(e),g.$broadcast("msApi::resolveError")})}else m.error('Resource "'+a+'" is not defined in the api service!'),s.reject('Resource "'+a+'" is not defined in the api service!');return s.promise},request:function(e,t,n,a){g.$broadcast("msApi::requestStart");var i=e.split("@"),o=i[0],s=i[1],r=t||{};if(!o||!s)return m.error("msApi.resolve requires correct action parameter (resourceName@methodName)"),!1;var l=u.defer(),d=v[o];if(d){var c=p(d.url,d.paramDefaults,d.actions,d.options);c[s](r,function(e){g.$broadcast("msApi::requestSuccess"),l.resolve(e),angular.isDefined(n)&&angular.isFunction(n)&&n(e)},function(e){g.$broadcast("msApi::requestError"),l.reject(e),angular.isDefined(a)&&angular.isFunction(a)&&a(e)})}else m.error('Resource "'+o+'" is not defined in the api service!'),l.reject('Resource "'+o+'" is not defined in the api service!');return l.promise}};return e}]})}(),function(){"use strict";function e(l){var e=new MobileDetect(l.navigator.userAgent),d=null;return{exists:function(e,t){return-1<t.indexOf(e)},detectBrowser:function(){if(d)return d;var e=[{string:l.navigator.userAgent,subString:"Edge",versionSearch:"Edge",identity:"Edge"},{string:l.navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:l.navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:l.navigator.vendor,subString:"Apple",versionSearch:"Version",identity:"Safari"},{prop:l.opera,identity:"Opera"},{string:l.navigator.vendor,subString:"iCab",identity:"iCab"},{string:l.navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:l.navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:l.navigator.vendor,subString:"Camino",identity:"Camino"},{string:l.navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:l.navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:l.navigator.userAgent,subString:"Trident/7",identity:"Explorer",versionSearch:"rv"},{string:l.navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:l.navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],t=[{string:l.navigator.platform,subString:"Win",identity:"Windows"},{string:l.navigator.platform,subString:"Mac",identity:"Mac"},{string:l.navigator.platform,subString:"Linux",identity:"Linux"},{string:l.navigator.platform,subString:"iPhone",identity:"iPhone"},{string:l.navigator.platform,subString:"iPod",identity:"iPod"},{string:l.navigator.platform,subString:"iPad",identity:"iPad"},{string:l.navigator.platform,subString:"Android",identity:"Android"}],i="";function n(e){for(var t=0;t<e.length;t++){var n=e[t].string,a=e[t].prop;if(i=e[t].versionSearch||e[t].identity,n){if(-1!==n.indexOf(e[t].subString))return e[t].identity}else if(a)return e[t].identity}}function a(e){var t=e.indexOf(i);if(-1!==t)return parseInt(e.substring(t+i.length+1))}var o=n(e)||"unknown-browser",s=a(l.navigator.userAgent)||a(l.navigator.appVersion)||"unknown-version",r=n(t)||"unknown-os";return o=o.toLowerCase(),s=o+"-"+s,r=r.toLowerCase(),d={browser:o,version:s,os:r}},guidGenerator:function(){var e=function(){return(65536*(1+Math.random())||0).toString(16).substring(1)};return e()+e()+e()+e()+e()+e()},isMobile:function(){return e.mobile()},toggleInArray:function(e,t){-1===t.indexOf(e)?t.push(e):t.splice(t.indexOf(e),1)}}}e.$inject=["$window"],angular.module("app.core").factory("msUtils",e)}(),function(){"use strict";function e(e,t){var n=this;n.themes=t.themes,n.layoutModes=[{label:"Boxed",value:"boxed"},{label:"Wide",value:"wide"}],n.layoutStyles=[{label:"Vertical Navigation",value:"verticalNavigation",figure:"/assets/images/theme-options/vertical-nav.jpg"},{label:"Vertical Navigation with Fullwidth Toolbar",value:"verticalNavigationFullwidthToolbar",figure:"/assets/images/theme-options/vertical-nav-with-full-toolbar.jpg"},{label:"Vertical Navigation with Fullwidth Toolbar 2",value:"verticalNavigationFullwidthToolbar2",figure:"/assets/images/theme-options/vertical-nav-with-full-toolbar-2.jpg"},{label:"Horizontal Navigation",value:"horizontalNavigation",figure:"/assets/images/theme-options/horizontal-nav.jpg"},{label:"Content with Toolbar",value:"contentWithToolbar",figure:"/assets/images/theme-options/content-with-toolbar.jpg"},{label:"Content Only",value:"contentOnly",figure:"/assets/images/theme-options/content-only.jpg"}],n.layoutMode="wide",n.layoutStyle=e.get("motion.layoutStyle")||"verticalNavigation",n.setActiveTheme=function(e){t.setActiveTheme(e)},n.getActiveTheme=function(){return t.themes.active},n.updateLayoutMode=function(){angular.element("body").toggleClass("boxed","boxed"===n.layoutMode)},n.updateLayoutStyle=function(){e.put("motion.layoutStyle",n.layoutStyle),location.reload()}}function t(t){return{restrict:"E",scope:{},controller:"MsThemeOptionsController as vm",templateUrl:"app/core/theme-options/theme-options.html",compile:function(e){return e.addClass("ms-theme-options"),function(e){e.toggleOptionsSidenav=function(){t("motion-theme-options").toggle()}}}}}e.$inject=["$cookies","motionTheming"],t.$inject=["$mdSidenav"],angular.module("app.core").controller("MsThemeOptionsController",e).directive("msThemeOptions",t)}(),function(){"use strict";function e(i,a,o){var s={};return{generate:function(){var e=angular.copy(o.getRegisteredThemes()),a=angular.copy(o.getRegisteredPalettes());angular.forEach(e,function(n){s[n.name]={},angular.forEach(n.colors,function(e,t){s[n.name][t]={name:e.name,levels:{default:{color:l(a[e.name][e.hues.default].value),contrast1:l(a[e.name][e.hues.default].contrast,1),contrast2:l(a[e.name][e.hues.default].contrast,2),contrast3:l(a[e.name][e.hues.default].contrast,3),contrast4:l(a[e.name][e.hues.default].contrast,4)},hue1:{color:l(a[e.name][e.hues["hue-1"]].value),contrast1:l(a[e.name][e.hues["hue-1"]].contrast,1),contrast2:l(a[e.name][e.hues["hue-1"]].contrast,2),contrast3:l(a[e.name][e.hues["hue-1"]].contrast,3),contrast4:l(a[e.name][e.hues["hue-1"]].contrast,4)},hue2:{color:l(a[e.name][e.hues["hue-2"]].value),contrast1:l(a[e.name][e.hues["hue-2"]].contrast,1),contrast2:l(a[e.name][e.hues["hue-2"]].contrast,2),contrast3:l(a[e.name][e.hues["hue-2"]].contrast,3),contrast4:l(a[e.name][e.hues["hue-2"]].contrast,4)},hue3:{color:l(a[e.name][e.hues["hue-3"]].value),contrast1:l(a[e.name][e.hues["hue-3"]].contrast,1),contrast2:l(a[e.name][e.hues["hue-3"]].contrast,2),contrast3:l(a[e.name][e.hues["hue-3"]].contrast,3),contrast4:l(a[e.name][e.hues["hue-3"]].contrast,4)}}}})}),function(e){var t=angular.copy(e);angular.forEach(t,function(n){angular.forEach(n,function(e,t){n[t]=e.levels,n[t].color=e.levels.default.color,n[t].contrast1=e.levels.default.contrast1,n[t].contrast2=e.levels.default.contrast2,n[t].contrast3=e.levels.default.contrast3,n[t].contrast4=e.levels.default.contrast4,delete n[t].default})}),o.setThemesList(t);var n=i.get("motion.selectedTheme");n?o.setActiveTheme(n):o.setActiveTheme("default")}(s);var r={};angular.forEach(s,function(e,t){var n,a,i,o,s;(r={})["@themeName"]=t,angular.forEach(e,function(e,a){angular.forEach(e.levels,function(e,n){angular.forEach(e,function(e,t){r["@"+a+d(n)+d(t)]=e})})}),n=r,a=new RegExp(Object.keys(n).join("|"),"gi"),i='/* Content hack because they wont fix */\n/* https://github.com/angular/material/pull/8067 */\n[md-theme="@themeName"] md-content.md-hue-1,\nmd-content.md-@themeName-theme.md-hue-1 {\n    color: @backgroundHue1Contrast1;\n    background-color: @backgroundHue1Color;\n}\n\n[md-theme="@themeName"] md-content.md-hue-2,\nmd-content.md-@themeName-theme.md-hue-2 {\n    color: @backgroundHue2Contrast1;\n    background-color: @backgroundHue2Color;\n}\n\n[md-theme="@themeName"] md-content.md-hue-3,\n md-content.md-@themeName-theme.md-hue-3 {\n    color: @backgroundHue3Contrast1;\n    background-color: @backgroundHue3Color;\n}\n\n/* Text Colors */\n[md-theme="@themeName"] a {\n    color: @accentDefaultColor;\n}\n\n[md-theme="@themeName"] .secondary-text,\n[md-theme="@themeName"] .icon {\n    color: @backgroundDefaultContrast2;\n}\n\n[md-theme="@themeName"] .hint-text,\n[md-theme="@themeName"] .disabled-text {\n    color: @backgroundDefaultContrast3;\n}\n\n[md-theme="@themeName"] .fade-text,\n[md-theme="@themeName"] .divider {\n    color: @backgroundDefaultContrast4;\n}\n\n/* Primary */\n[md-theme="@themeName"] .md-primary-bg {\n    background-color: @primaryDefaultColor;\n    color: @primaryDefaultContrast1;\n}\n\n[md-theme="@themeName"] .md-primary-bg .secondary-text,\n[md-theme="@themeName"] .md-primary-bg .icon {\n    color: @primaryDefaultContrast2;\n}\n\n[md-theme="@themeName"] .md-primary-bg .hint-text,\n[md-theme="@themeName"] .md-primary-bg .disabled-text {\n    color: @primaryDefaultContrast3;\n}\n\n[md-theme="@themeName"] .md-primary-bg .fade-text,\n[md-theme="@themeName"] .md-primary-bg .divider {\n    color: @primaryDefaultContrast4;\n}\n\n/* Primary, Hue-1 */\n[md-theme="@themeName"] .md-primary-bg.md-hue-1 {\n    background-color: @primaryHue1Color;\n    color: @primaryHue1Contrast1;\n}\n\n[md-theme="@themeName"] .md-primary-bg.md-hue-1 .secondary-text,\n[md-theme="@themeName"] .md-primary-bg.md-hue-1 .icon {\n    color: @primaryHue1Contrast2;\n}\n\n[md-theme="@themeName"] .md-primary-bg.md-hue-1 .hint-text,\n[md-theme="@themeName"] .md-primary-bg.md-hue-1 .disabled-text {\n    color: @primaryHue1Contrast3;\n}\n\n[md-theme="@themeName"] .md-primary-bg.md-hue-1 .fade-text,\n[md-theme="@themeName"] .md-primary-bg.md-hue-1 .divider {\n    color: @primaryHue1Contrast4;\n}\n\n/* Primary, Hue-2 */\n[md-theme="@themeName"] .md-primary-bg.md-hue-2 {\n    background-color: @primaryHue2Color;\n    color: @primaryHue2Contrast1;\n}\n\n[md-theme="@themeName"] .md-primary-bg.md-hue-2 .secondary-text,\n[md-theme="@themeName"] .md-primary-bg.md-hue-2 .icon {\n    color: @primaryHue2Contrast2;\n}\n\n[md-theme="@themeName"] .md-primary-bg.md-hue-2 .hint-text,\n[md-theme="@themeName"] .md-primary-bg.md-hue-2 .disabled-text {\n    color: @primaryHue2Contrast3;\n}\n\n[md-theme="@themeName"] .md-primary-bg.md-hue-2 .fade-text,\n[md-theme="@themeName"] .md-primary-bg.md-hue-2 .divider {\n    color: @primaryHue2Contrast4;\n}\n\n/* Primary, Hue-3 */\n[md-theme="@themeName"] .md-primary-bg.md-hue-3 {\n    background-color: @primaryHue3Color;\n    color: @primaryHue3Contrast1;\n}\n\n[md-theme="@themeName"] .md-primary-bg.md-hue-3 .secondary-text,\n[md-theme="@themeName"] .md-primary-bg.md-hue-3 .icon {\n    color: @primaryHue3Contrast1;\n}\n\n[md-theme="@themeName"] .md-primary-bg.md-hue-3 .hint-text,\n[md-theme="@themeName"] .md-primary-bg.md-hue-3 .disabled-text {\n    color: @primaryHue3Contrast3;\n}\n\n[md-theme="@themeName"] .md-primary-bg.md-hue-3 .fade-text,\n[md-theme="@themeName"] .md-primary-bg.md-hue-3 .divider {\n    color: @primaryHue3Contrast4;\n}\n\n/* Primary foreground */\n[md-theme="@themeName"] .md-primary-fg {\n    color: @primaryDefaultColor !important;\n}\n\n/* Primary foreground, Hue-1 */\n[md-theme="@themeName"] .md-primary-fg.md-hue-1 {\n    color: @primaryHue1Color !important;\n}\n\n/* Primary foreground, Hue-2 */\n[md-theme="@themeName"] .md-primary-fg.md-hue-2 {\n    color: @primaryHue2Color !important;\n}\n\n/* Primary foreground, Hue-3 */\n[md-theme="@themeName"] .md-primary-fg.md-hue-3 {\n    color: @primaryHue3Color !important;\n}\n\n/* Accent */\n[md-theme="@themeName"] .md-accent-bg {\n    background-color: @accentDefaultColor;\n    color: @accentDefaultContrast1;\n}\n\n[md-theme="@themeName"] .md-accent-bg .secondary-text,\n[md-theme="@themeName"] .md-accent-bg .icon {\n    color: @accentDefaultContrast2;\n}\n\n[md-theme="@themeName"] .md-accent-bg .hint-text,\n[md-theme="@themeName"] .md-accent-bg .disabled-text {\n    color: @accentDefaultContrast3;\n}\n\n[md-theme="@themeName"] .md-accent-bg .fade-text,\n[md-theme="@themeName"] .md-accent-bg .divider {\n    color: @accentDefaultContrast4;\n}\n\n/* Accent, Hue-1 */\n[md-theme="@themeName"] .md-accent-bg.md-hue-1 {\n    background-color: @accentHue1Color;\n    color: @accentHue1Contrast1;\n}\n\n[md-theme="@themeName"] .md-accent-bg.md-hue-1 .secondary-text,\n[md-theme="@themeName"] .md-accent-bg.md-hue-1 .icon {\n    color: @accentHue1Contrast2;\n}\n\n[md-theme="@themeName"] .md-accent-bg.md-hue-1 .hint-text,\n[md-theme="@themeName"] .md-accent-bg.md-hue-1 .disabled-text {\n    color: @accentHue1Contrast3;\n}\n\n[md-theme="@themeName"] .md-accent-bg.md-hue-1 .fade-text,\n[md-theme="@themeName"] .md-accent-bg.md-hue-1 .divider {\n    color: @accentHue1Contrast4;\n}\n\n/* Accent, Hue-2 */\n[md-theme="@themeName"] .md-accent-bg.md-hue-2 {\n    background-color: @accentHue2Color;\n    color: @accentHue2Contrast1;\n}\n\n[md-theme="@themeName"] .md-accent-bg.md-hue-2 .secondary-text,\n[md-theme="@themeName"] .md-accent-bg.md-hue-2 .icon {\n    color: @accentHue2Contrast2;\n}\n\n[md-theme="@themeName"] .md-accent-bg.md-hue-2 .hint-text,\n[md-theme="@themeName"] .md-accent-bg.md-hue-2 .disabled-text {\n    color: @accentHue2Contrast3;\n}\n\n[md-theme="@themeName"] .md-accent-bg.md-hue-2 .fade-text,\n[md-theme="@themeName"] .md-accent-bg.md-hue-2 .divider {\n    color: @accentHue2Contrast4;\n}\n\n/* Accent, Hue-3 */\n[md-theme="@themeName"] .md-accent-bg.md-hue-3 {\n    background-color: @accentHue3Color;\n    color: @accentHue3Contrast1;\n}\n\n[md-theme="@themeName"] .md-accent-bg.md-hue-3 .secondary-text,\n[md-theme="@themeName"] .md-accent-bg.md-hue-3 .icon {\n    color: @accentHue3Contrast1;\n}\n\n[md-theme="@themeName"] .md-accent-bg.md-hue-3 .hint-text,\n[md-theme="@themeName"] .md-accent-bg.md-hue-3 .disabled-text {\n    color: @accentHue3Contrast3;\n}\n\n[md-theme="@themeName"] .md-accent-bg.md-hue-3 .fade-text,\n[md-theme="@themeName"] .md-accent-bg.md-hue-3 .divider {\n    color: @accentHue3Contrast4;\n}\n\n/* Accent foreground */\n[md-theme="@themeName"] .md-accent-fg {\n    color: @accentDefaultColor !important;\n}\n\n/* Accent foreground, Hue-1 */\n[md-theme="@themeName"] .md-accent-fg.md-hue-1 {\n    color: @accentHue1Color !important;\n}\n\n/* Accent foreground, Hue-2 */\n[md-theme="@themeName"] .md-accent-fg.md-hue-2 {\n    color: @accentHue2Color !important;\n}\n\n/* Accent foreground, Hue-3 */\n[md-theme="@themeName"] .md-accent-fg.md-hue-3 {\n    color: @accentHue3Color !important;\n}\n\n/* Warn */\n[md-theme="@themeName"] .md-warn-bg {\n    background-color: @warnDefaultColor;\n    color: @warnDefaultContrast1;\n}\n\n[md-theme="@themeName"] .md-warn-bg .secondary-text,\n[md-theme="@themeName"] .md-warn-bg .icon {\n    color: @warnDefaultContrast2;\n}\n\n[md-theme="@themeName"] .md-warn-bg .hint-text,\n[md-theme="@themeName"] .md-warn-bg .disabled-text {\n    color: @warnDefaultContrast3;\n}\n\n[md-theme="@themeName"] .md-warn-bg .fade-text,\n[md-theme="@themeName"] .md-warn-bg .divider {\n    color: @warnDefaultContrast4;\n}\n\n/* Warn, Hue-1 */\n[md-theme="@themeName"] .md-warn-bg.md-hue-1 {\n    background-color: @warnHue1Color;\n    color: @warnHue1Contrast1;\n}\n\n[md-theme="@themeName"] .md-warn-bg.md-hue-1 .secondary-text,\n[md-theme="@themeName"] .md-warn-bg.md-hue-1 .icon {\n    color: @warnHue1Contrast2;\n}\n\n[md-theme="@themeName"] .md-warn-bg.md-hue-1 .hint-text,\n[md-theme="@themeName"] .md-warn-bg.md-hue-1 .disabled-text {\n    color: @warnHue1Contrast3;\n}\n\n[md-theme="@themeName"] .md-warn-bg.md-hue-1 .fade-text,\n[md-theme="@themeName"] .md-warn-bg.md-hue-1 .divider {\n    color: @warnHue1Contrast4;\n}\n\n/* Warn, Hue-2 */\n[md-theme="@themeName"] .md-warn-bg.md-hue-2 {\n    background-color: @warnHue2Color;\n    color: @warnHue2Contrast1;\n}\n\n[md-theme="@themeName"] .md-warn-bg.md-hue-2 .secondary-text,\n[md-theme="@themeName"] .md-warn-bg.md-hue-2 .icon {\n    color: @warnHue2Contrast2;\n}\n\n[md-theme="@themeName"] .md-warn-bg.md-hue-2 .hint-text,\n[md-theme="@themeName"] .md-warn-bg.md-hue-2 .disabled-text {\n    color: @warnHue2Contrast3;\n}\n\n[md-theme="@themeName"] .md-warn-bg.md-hue-2 .fade-text,\n[md-theme="@themeName"] .md-warn-bg.md-hue-2 .divider {\n    color: @warnHue2Contrast4;\n}\n\n/* Warn, Hue-3 */\n[md-theme="@themeName"] .md-warn-bg.md-hue-3 {\n    background-color: @warnHue3Color;\n    color: @warnHue3Contrast1;\n}\n\n[md-theme="@themeName"] .md-warn-bg.md-hue-3 .secondary-text,\n[md-theme="@themeName"] .md-warn-bg.md-hue-3 .icon {\n    color: @warnHue3Contrast1;\n}\n\n[md-theme="@themeName"] .md-warn-bg.md-hue-3 .hint-text,\n[md-theme="@themeName"] .md-warn-bg.md-hue-3 .disabled-text {\n    color: @warnHue3Contrast3;\n}\n\n[md-theme="@themeName"] .md-warn-bg.md-hue-3 .fade-text,\n[md-theme="@themeName"] .md-warn-bg.md-hue-3 .divider {\n    color: @warnHue3Contrast4;\n}\n\n/* Warn foreground */\n[md-theme="@themeName"] .md-warn-fg {\n    color: @warnDefaultColor !important;\n}\n\n/* Warn foreground, Hue-1 */\n[md-theme="@themeName"] .md-warn-fg.md-hue-1 {\n    color: @warnHue1Color !important;\n}\n\n/* Warn foreground, Hue-2 */\n[md-theme="@themeName"] .md-warn-fg.md-hue-2 {\n    color: @warnHue2Color !important;\n}\n\n/* Warn foreground, Hue-3 */\n[md-theme="@themeName"] .md-warn-fg.md-hue-3 {\n    color: @warnHue3Color !important;\n}\n\n/* Background */\n[md-theme="@themeName"] .md-background-bg {\n    background-color: @backgroundDefaultColor;\n    color: @backgroundDefaultContrast1;\n}\n\n[md-theme="@themeName"] .md-background-bg .secondary-text,\n[md-theme="@themeName"] .md-background-bg .icon {\n    color: @backgroundDefaultContrast2;\n}\n\n[md-theme="@themeName"] .md-background-bg .hint-text,\n[md-theme="@themeName"] .md-background-bg .disabled-text {\n    color: @backgroundDefaultContrast3;\n}\n\n[md-theme="@themeName"] .md-background-bg .fade-text,\n[md-theme="@themeName"] .md-background-bg .divider {\n    color: @backgroundDefaultContrast4;\n}\n\n/* Background, Hue-1 */\n[md-theme="@themeName"] .md-background-bg.md-hue-1 {\n    background-color: @backgroundHue1Color;\n    color: @backgroundHue1Contrast1;\n}\n\n[md-theme="@themeName"] .md-background-bg.md-hue-1 .secondary-text,\n[md-theme="@themeName"] .md-background-bg.md-hue-1 .icon {\n    color: @backgroundHue1Contrast2;\n}\n\n[md-theme="@themeName"] .md-background-bg.md-hue-1 .hint-text,\n[md-theme="@themeName"] .md-background-bg.md-hue-1 .disabled-text {\n    color: @backgroundHue1Contrast3;\n}\n\n[md-theme="@themeName"] .md-background-bg.md-hue-1 .fade-text,\n[md-theme="@themeName"] .md-background-bg.md-hue-1 .divider {\n    color: @backgroundHue1Contrast4;\n}\n\n/* Background, Hue-2 */\n[md-theme="@themeName"] .md-background-bg.md-hue-2 {\n    background-color: @backgroundHue2Color;\n    color: @backgroundHue2Contrast1;\n}\n\n[md-theme="@themeName"] .md-background-bg.md-hue-2 .secondary-text,\n[md-theme="@themeName"] .md-background-bg.md-hue-2 .icon {\n    color: @backgroundHue2Contrast2;\n}\n\n[md-theme="@themeName"] .md-background-bg.md-hue-2 .hint-text,\n[md-theme="@themeName"] .md-background-bg.md-hue-2 .disabled-text {\n    color: @backgroundHue2Contrast3;\n}\n\n[md-theme="@themeName"] .md-background-bg.md-hue-2 .fade-text,\n[md-theme="@themeName"] .md-background-bg.md-hue-2 .divider {\n    color: @backgroundHue2Contrast4;\n}\n\n/* Background, Hue-3 */\n[md-theme="@themeName"] .md-background-bg.md-hue-3 {\n    background-color: @backgroundHue3Color;\n    color: @backgroundHue3Contrast1;\n}\n\n[md-theme="@themeName"] .md-background-bg.md-hue-3 .secondary-text,\n[md-theme="@themeName"] .md-background-bg.md-hue-3 .icon {\n    color: @backgroundHue3Contrast1;\n}\n\n[md-theme="@themeName"] .md-background-bg.md-hue-3 .hint-text,\n[md-theme="@themeName"] .md-background-bg.md-hue-3 .disabled-text {\n    color: @backgroundHue3Contrast3;\n}\n\n[md-theme="@themeName"] .md-background-bg.md-hue-3 .fade-text,\n[md-theme="@themeName"] .md-background-bg.md-hue-3 .divider {\n    color: @backgroundHue3Contrast4;\n}\n\n/* Background foreground */\n[md-theme="@themeName"] .md-background-fg {\n    color: @backgroundDefaultColor !important;\n}\n\n/* Background foreground, Hue-1 */\n[md-theme="@themeName"] .md-background-fg.md-hue-1 {\n    color: @backgroundHue1Color !important;\n}\n\n/* Background foreground, Hue-2 */\n[md-theme="@themeName"] .md-background-fg.md-hue-2 {\n    color: @backgroundHue2Color !important;\n}\n\n/* Background foreground, Hue-3 */\n[md-theme="@themeName"] .md-background-fg.md-hue-3 {\n    color: @backgroundHue3Color !important;\n}'.replace(a,function(e){return n[e]}),o=angular.element("head"),(s=angular.element('<style type="text/css"></style>')).html(i),o.append(s)})},rgba:l};function l(e,t){var n=t||!1;return 4===e.length&&255===e[0]&&255===e[1]&&255===e[2]&&e.splice(3,4),n&&(e=function(e,t){var n={white:{1:"1",2:"0.7",3:"0.3",4:"0.12"},black:{1:"0.87",2:"0.54",3:"0.26",4:"0.12"}};255===e[0]&&255===e[1]&&255===e[2]?e[3]=n.white[t]:0===e[0]&&0===e[1]&&0===e[2]&&(e[3]=n.black[t]);return e}(e,n)),3===e.length?"rgb("+e.join(",")+")":4===e.length?"rgba("+e.join(",")+")":void a.error("Invalid number of arguments supplied in the color array: "+e.length+"\nThe array must have 3 or 4 colors.")}function d(e){return e.charAt(0).toUpperCase()+e.slice(1)}}e.$inject=["$cookies","$log","motionTheming"],angular.module("app.core").factory("motionGenerator",e)}(),function(){"use strict";angular.module("app.core").constant("motionPalettes",[{name:"motion-blue",options:{50:"#ebf1fa",100:"#c2d4ef",200:"#9ab8e5",300:"#78a0dc",400:"#5688d3",500:"#3470ca",600:"#2e62b1",700:"#275498",800:"#21467e",900:"#1a3865",A100:"#c2d4ef",A200:"#9ab8e5",A400:"#5688d3",A700:"#275498",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400"}},{name:"motion-paleblue",options:{50:"#ececee",100:"#c5c6cb",200:"#9ea1a9",300:"#7d818c",400:"#5c616f",500:"#3c4252",600:"#353a48",700:"#2d323e",800:"#262933",900:"#1e2129",A100:"#c5c6cb",A200:"#9ea1a9",A400:"#5c616f",A700:"#2d323e",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400"}}])}(),function(){"use strict";angular.module("app.core").constant("motionThemes",{default:{primary:{name:"motion-paleblue",hues:{default:"700","hue-1":"500","hue-2":"600","hue-3":"400"}},accent:{name:"light-blue",hues:{default:"600","hue-1":"400","hue-2":"700","hue-3":"A100"}},warn:{name:"red"},background:{name:"grey",hues:{default:"A100","hue-1":"A100","hue-2":"100","hue-3":"300"}}},pinkTheme:{primary:{name:"blue-grey",hues:{default:"800","hue-1":"600","hue-2":"400","hue-3":"A100"}},accent:{name:"pink",hues:{default:"400","hue-1":"300","hue-2":"600","hue-3":"A100"}},warn:{name:"blue"},background:{name:"grey",hues:{default:"A100","hue-1":"A100","hue-2":"100","hue-3":"300"}}},tealTheme:{primary:{name:"motion-blue",hues:{default:"900","hue-1":"600","hue-2":"500","hue-3":"A100"}},accent:{name:"teal",hues:{default:"500","hue-1":"400","hue-2":"600","hue-3":"A100"}},warn:{name:"deep-orange"},background:{name:"grey",hues:{default:"A100","hue-1":"A100","hue-2":"100","hue-3":"300"}}}})}(),function(){"use strict";function e(n,e,t){var a;angular.injector(["ngCookies"]).invoke(["$cookies",function(e){a=e}]);var i=a.getObject("motion.customTheme");i&&(t.custom=i),n.alwaysWatchTheme(!0),angular.forEach(e,function(e){n.definePalette(e.name,e.options)}),angular.forEach(t,function(e,t){n.theme(t).primaryPalette(e.primary.name,e.primary.hues).accentPalette(e.accent.name,e.accent.hues).warnPalette(e.warn.name,e.warn.hues).backgroundPalette(e.background.name,e.background.hues)})}e.$inject=["$mdThemingProvider","motionPalettes","motionThemes"],angular.module("app.core").config(e)}(),function(){"use strict";function e(t,n,e){var a={getRegisteredPalettes:function(){return e.PALETTES},getRegisteredThemes:function(){return e.THEMES},setActiveTheme:function(e){if(angular.isUndefined(a.themes.list[e]))return angular.isUndefined(a.themes.list.default)?void n.error('You must have at least one theme named "default"'):(n.warn('The theme "'+e+'" does not exist! Falling back to the "default" theme.'),a.themes.active.name="default",a.themes.active.theme=a.themes.list.default,void t.put("motion.selectedTheme",a.themes.active.name));a.themes.active.name=e,a.themes.active.theme=a.themes.list[e],t.put("motion.selectedTheme",e)},setThemesList:function(e){a.themes.list=e},themes:{list:{},active:{name:"",theme:{}}}};return a}e.$inject=["$cookies","$log","$mdTheming"],angular.module("app.core").service("motionTheming",e)}(),function(){"use strict";function e(t,o,s,r){this.search=function(t){for(var e=[],n=r.getFlatNavigation(),a=s.defer(),i=0;i<n.length;i+=1)n[i].uisref&&e.push(n[i]);t&&(e=e.filter(function(e){if(-1<angular.lowercase(e.title).search(angular.lowercase(t)))return!0}));return o(function(){a.resolve(e)},1e3),a.promise},this.searchResultClick=function(e){e.uisref&&(e.stateParams?t.go(e.state,e.stateParams):t.go(e.state))}}e.$inject=["$state","$timeout","$q","msNavigationService"],angular.module("app.errors.error-404").controller("Error404Controller",e)}(),function(){"use strict";function e(e,t){var n=this;n.code="",n.send=!1,n.error=e.params,n.sendReport=function(){t.post("/api/jira",n.error).then(function(e){n.send=!0,e.data&&(n.code=e.data.id)},function(e){n.send=!1})}}e.$inject=["$state","$http"],angular.module("app.errors.error-500").controller("Error500Controller",e)}(),function(){"use strict";function e(e,t){var n=this;n.currentUser=e.getCurrentUser(),n.cookieAlertHide=t.get("motion.cookieAlertHide:"+n.currentUser.id)||!1,n.cookieAlertOnClose=function(){t.put("motion.cookieAlertHide:"+n.currentUser.id,!0)}}e.$inject=["Auth","$cookies"],angular.module("app.footer").controller("FooterController",e)}(),function(){"use strict";function e(e,t,n,a,i){var o=this;o.form={},o.forgotPassword=function(){return i.auth.forgot(o.form).$promise.then(function(){t.success({title:n.instant("FORGOTPASSWORD.LINK_SENT"),msg:n.instant("FORGOTPASSWORD.LINNK_SENT_MESSAGE")})}).catch(function(e){e&&t.error({title:n.instant("FORGOTPASSWORD.PASSWORD_RESET_ERROR"),msg:e.data?e.data.message||e.message||e:e.message||e})})},o.onInit=function(){e.isLoggedIn()&&a.go("app.dashboards.general")}}e.$inject=["Auth","toasty","$translate","$state","api"],angular.module("app.forgot").controller("ForgotPasswordController",e)}(),function(){"use strict";function e(e,t){var n=this;n.currentUser=e.getCurrentUser(),n.newsAlertHide=t.get("motion.newsAlertHide:"+n.currentUser.id)||!1,n.newsAlertOnClose=function(){t.put("motion.newsAlertHide:"+n.currentUser.id,!0)}}e.$inject=["Auth","$cookies"],angular.module("app.header").controller("HeaderController",e)}(),function(){"use strict";function e(e){var t={baseUrl:"api/"};return t.auth=e(t.baseUrl+"auth/local",{},{local:{method:"post",url:t.baseUrl+"auth/local"},forgot:{method:"post",url:t.baseUrl+"auth/local/forgot"},reset:{method:"post",url:t.baseUrl+"auth/local/reset/:token",params:{token:"@token"}},google:{method:"post",url:t.baseUrl+"auth/google"}}),t.jira=e(t.baseUrl+"jira"),t.rpc=e(t.baseUrl+"rpc",{},{startMonitor:{method:"get",url:t.baseUrl+"rpc/voice/channels/:uniqueid/mixmonitor",params:{uniqueid:"@uniqueid"}},stopMonitor:{method:"get",url:t.baseUrl+"rpc/voice/channels/:uniqueid/stopmixmonitor",params:{uniqueid:"@uniqueid"}},getVoiceChannels:{method:"get",url:t.baseUrl+"rpc/voice/channels"},getVoiceQueues:{method:"get",url:t.baseUrl+"rpc/voice/queues"},getChatQueues:{method:"get",url:t.baseUrl+"rpc/chat/queues"},getMailQueues:{method:"get",url:t.baseUrl+"rpc/mail/queues"},getSmsQueues:{method:"get",url:t.baseUrl+"rpc/sms/queues"},getOpenchannelQueues:{method:"get",url:t.baseUrl+"rpc/openchannel/queues"},getFaxQueues:{method:"get",url:t.baseUrl+"rpc/fax/queues"},getVoiceQueuesPreview:{method:"get",url:t.baseUrl+"rpc/voice/queues/preview/:id"},getVoiceQueuesChannels:{method:"get",url:t.baseUrl+"rpc/voice/queues/channels"},getVoiceQueuesChannel:{method:"get",url:t.baseUrl+"rpc/voice/queues/channels/:uniqueid"},getVoiceQueuesChannelHangup:{method:"get",url:t.baseUrl+"rpc/voice/queues/channels/:uniqueid/hangup"},getVoiceQueuesChannelRedirect:{method:"get",url:t.baseUrl+"rpc/voice/queues/channels/:uniqueid/redirect/:exten"},getOutbound:{method:"get",url:t.baseUrl+"rpc/outbound"},getOutboundChannels:{method:"get",url:t.baseUrl+"rpc/outbound/channels"},getAgents:{method:"get",url:t.baseUrl+"rpc/agents"},setAgentCapacity:{method:"put",url:t.baseUrl+"rpc/agents/:id/capacity",params:{id:"@id"}},getTelephones:{method:"get",url:t.baseUrl+"rpc/telephones"},getTrunks:{method:"get",url:t.baseUrl+"rpc/trunks"},getCampaigns:{method:"get",url:t.baseUrl+"rpc/campaigns"},getMailAccounts:{method:"get",url:t.baseUrl+"rpc/mail/accounts"},getFaxAccounts:{method:"get",url:t.baseUrl+"rpc/fax/accounts"},getChatQueuesWaitingInteractions:{method:"get",url:t.baseUrl+"rpc/chat/queues/waitinginteractions"},getMailQueuesWaitingInteractions:{method:"get",url:t.baseUrl+"rpc/mail/queues/waitinginteractions"},getOpenchannelQueuesWaitingInteractions:{method:"get",url:t.baseUrl+"rpc/openchannel/queues/waitinginteractions"},getSmsQueuesWaitingInteractions:{method:"get",url:t.baseUrl+"rpc/sms/queues/waitinginteractions"},getFaxQueuesWaitingInteractions:{method:"get",url:t.baseUrl+"rpc/fax/queues/waitinginteractions"}}),t.version=e(t.baseUrl+"version",{},{fetch:{method:"get",url:t.baseUrl+"version/fetch"},reset:{method:"get",url:t.baseUrl+"version/reset"},pull:{method:"get",url:t.baseUrl+"version/pull"},restart:{method:"get",url:t.baseUrl+"version/restart"},migrations:{method:"get",url:t.baseUrl+"version/migrations"}}),t.system=e(t.baseUrl+"system",{},{killProcess:{method:"get",url:t.baseUrl+"system/process/:pid/kill",params:{pid:"@pid"}}}),t.pm2=e(t.baseUrl+"pm2/:id",{id:"@id"},{update:{method:"put",isArray:!0}}),t.user=e(t.baseUrl+"users/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"users/describe"},clone:{method:"post",url:t.baseUrl+"users/:id/clone",params:{includeAll:"@includeAll"}},bulkCreate:{method:"post",url:t.baseUrl+"users/create_many",isArray:!0},addContacts:{isArray:!0,method:"post",url:t.baseUrl+"users/:id/contacts"},changePassword:{isArray:!1,method:"put",url:t.baseUrl+"users/:id/password"},addQueues:{isArray:!0,method:"post",url:t.baseUrl+"users/:id/queues"},removeQueues:{isArray:!1,method:"delete",url:t.baseUrl+"users/:id/queues"},addAvatar:{isArray:!1,method:"post",url:t.baseUrl+"users/:id/avatar"},getAvatar:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/avatar"},getContacts:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/contacts"},getQueues:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/queues"},getVoiceQueuesRt:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/queues_rt"},getGroups:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/groups"},getRecordings:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/recordings"},getChatInteractions:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/chat/interactions"},getOpenchannelInteractions:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/openchannel/interactions"},getMailInteractions:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/mail/interactions"},getSmsInteractions:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/sms/interactions"},getFaxInteractions:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/fax/interactions"},login:{isArray:!1,method:"post",url:t.baseUrl+"users/:id/login"},logout:{isArray:!1,method:"post",url:t.baseUrl+"users/:id/logout"},pause:{isArray:!1,method:"post",url:t.baseUrl+"users/:id/pause"},unpause:{isArray:!1,method:"post",url:t.baseUrl+"users/:id/unpause"},getTeams:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/teams"},addTeams:{isArray:!0,method:"post",url:t.baseUrl+"users/:id/teams"},removeTeams:{isArray:!1,method:"delete",url:t.baseUrl+"users/:id/teams"},getLists:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/lists"},getAgents:{isArray:!1,method:"get",url:t.baseUrl+"users/:id/agents"},addChatInteractions:{isArray:!0,method:"post",url:t.baseUrl+"users/:id/chat_interactions"},removeChatInteractions:{isArray:!1,method:"delete",url:t.baseUrl+"users/:id/chat_interactions"},addMailInteractions:{isArray:!0,method:"post",url:t.baseUrl+"users/:id/mail_interactions"},removeMailInteractions:{isArray:!1,method:"delete",url:t.baseUrl+"users/:id/mail_interactions"},addFaxInteractions:{isArray:!0,method:"post",url:t.baseUrl+"users/:id/fax_interactions"},removeFaxInteractions:{isArray:!1,method:"delete",url:t.baseUrl+"users/:id/fax_interactions"},addSmsInteractions:{isArray:!0,method:"post",url:t.baseUrl+"users/:id/sms_interactions"},removeSmsInteractions:{isArray:!1,method:"delete",url:t.baseUrl+"users/:id/sms_interactions"},addOpenchannelInteractions:{isArray:!0,method:"post",url:t.baseUrl+"users/:id/openchannel_interactions"},removeOpenchannelInteractions:{isArray:!1,method:"delete",url:t.baseUrl+"users/:id/openchannel_interactions"}}),t.voiceChanSpy=e(t.baseUrl+"voice/chanspy/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/chanspy/describe"},clone:{method:"post",url:t.baseUrl+"voice/chanspy/:id/clone",params:{includeAll:"@includeAll"}}}),t.voiceContext=e(t.baseUrl+"voice/contexts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/contexts/describe"},clone:{method:"post",url:t.baseUrl+"voice/contexts/:id/clone",params:{includeAll:"@includeAll"}}}),t.voiceDisposition=e(t.baseUrl+"voice/dispositions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/dispositions/describe"},clone:{method:"post",url:t.baseUrl+"voice/dispositions/:id/clone",params:{includeAll:"@includeAll"}}}),t.voiceExtension=e(t.baseUrl+"voice/extensions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/extensions/describe"},clone:{method:"post",url:t.baseUrl+"voice/extensions/:id/clone",params:{includeAll:"@includeAll"}},addApplications:{isArray:!1,method:"post",url:t.baseUrl+"voice/extensions/:id/applications"}}),t.voiceMusicOnHold=e(t.baseUrl+"voice/mohs/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/mohs/describe"},clone:{method:"post",url:t.baseUrl+"voice/mohs/:id/clone",params:{includeAll:"@includeAll"}},addSound:{isArray:!1,method:"post",url:t.baseUrl+"voice/mohs/:id/sounds"},removeSound:{isArray:!1,method:"delete",url:t.baseUrl+"voice/mohs/:id/sounds/:id2"},getSounds:{isArray:!1,method:"get",url:t.baseUrl+"voice/mohs/:id/sounds"}}),t.voiceQueue=e(t.baseUrl+"voice/queues/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/queues/describe"},clone:{method:"post",url:t.baseUrl+"voice/queues/:id/clone",params:{includeAll:"@includeAll"}},getHoppers:{isArray:!1,method:"get",url:t.baseUrl+"voice/queues/:id/hoppers"},getHopperHistories:{isArray:!1,method:"get",url:t.baseUrl+"voice/queues/:id/hopper_histories"},getHopperFinals:{isArray:!1,method:"get",url:t.baseUrl+"voice/queues/:id/hopper_finals"},getHopperBlacks:{isArray:!1,method:"get",url:t.baseUrl+"voice/queues/:id/hopper_black"},getTeams:{isArray:!1,method:"get",url:t.baseUrl+"voice/queues/:id/teams"},addTeams:{isArray:!0,method:"post",url:t.baseUrl+"voice/queues/:id/teams"},removeTeams:{isArray:!1,method:"delete",url:t.baseUrl+"voice/queues/:id/teams"},addAgents:{isArray:!0,method:"post",url:t.baseUrl+"voice/queues/:id/users"},removeAgents:{isArray:!1,method:"delete",url:t.baseUrl+"voice/queues/:id/users"},getAgents:{isArray:!1,method:"get",url:t.baseUrl+"voice/queues/:id/users"},getMembers:{isArray:!1,method:"get",url:t.baseUrl+"voice/queues/:id/members"},getLists:{isArray:!1,method:"get",url:t.baseUrl+"voice/queues/:id/lists"},addLists:{isArray:!0,method:"post",url:t.baseUrl+"voice/queues/:id/lists"},removeLists:{isArray:!0,method:"delete",url:t.baseUrl+"voice/queues/:id/lists"},getBlackLists:{isArray:!1,method:"get",url:t.baseUrl+"voice/queues/:id/blacklists"},addBlackLists:{isArray:!0,method:"post",url:t.baseUrl+"voice/queues/:id/blacklists"},removeBlackLists:{isArray:!0,method:"delete",url:t.baseUrl+"voice/queues/:id/blacklists"}}),t.voiceRecording=e(t.baseUrl+"voice/recordings/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/recordings/describe"},clone:{method:"post",url:t.baseUrl+"voice/recordings/:id/clone",params:{includeAll:"@includeAll"}},download:{isArray:!1,method:"get",url:t.baseUrl+"voice/recordings/:id/download",responseType:"arraybuffer",cache:!1,transformResponse:function(e,t){var n=t();return{type:n["content-type"],length:n["content-length"],buffer:e}}},downloads:{isArray:!1,method:"get",url:t.baseUrl+"voice/recordings/:id/downloads"}}),t.voiceMail=e(t.baseUrl+"voice/mails/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/mails/describe"},clone:{method:"post",url:t.baseUrl+"voice/mails/:id/clone",params:{includeAll:"@includeAll"}},getMessages:{isArray:!1,method:"get",url:t.baseUrl+"voice/mails/:id/messages"}}),t.voiceMailMessage=e(t.baseUrl+"voice/mails/messages/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/mails/messages/describe"},clone:{method:"post",url:t.baseUrl+"voice/mails/messages/:id/clone",params:{includeAll:"@includeAll"}},download:{isArray:!1,method:"get",url:t.baseUrl+"voice/mails/messages/:id/download",responseType:"arraybuffer",cache:!1,transformResponse:function(e,t){var n=t();return{type:n["content-type"],length:n["content-length"],buffer:e}}}}),t.voiceCallReport=e(t.baseUrl+"voice/calls/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/calls/reports/describe"},clone:{method:"post",url:t.baseUrl+"voice/calls/reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.voiceDialReport=e(t.baseUrl+"voice/dials/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/dials/reports/describe"},clone:{method:"post",url:t.baseUrl+"voice/dials/reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.voiceAgentReport=e(t.baseUrl+"voice/agents/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/agents/reports/describe"},clone:{method:"post",url:t.baseUrl+"voice/agents/reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.voiceQueueReport=e(t.baseUrl+"voice/queues/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/queues/reports/describe"},clone:{method:"post",url:t.baseUrl+"voice/queues/reports/:id/clone",params:{includeAll:"@includeAll"}},getVoiceQueuesReport:{isArray:!1,method:"get",url:t.baseUrl+"voice/queues/reports/index"}}),t.memberReport=e(t.baseUrl+"members/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"members/reports/describe"},clone:{method:"post",url:t.baseUrl+"members/reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.trunk=e(t.baseUrl+"trunks/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"trunks/describe"},clone:{method:"post",url:t.baseUrl+"trunks/:id/clone",params:{includeAll:"@includeAll"}}}),t.voiceTransferReport=e(t.baseUrl+"voice/transfers/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voice/transfers/reports/describe"},clone:{method:"post",url:t.baseUrl+"voice/transfers/reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.mailServerOut=e(t.baseUrl+"mail/out_servers/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"mail/out_servers/describe"},clone:{method:"post",url:t.baseUrl+"mail/out_servers/:id/clone",params:{includeAll:"@includeAll"}}}),t.mailAccount=e(t.baseUrl+"mail/accounts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"mail/accounts/describe"},clone:{method:"post",url:t.baseUrl+"mail/accounts/:id/clone",params:{includeAll:"@includeAll"}},addAnswer:{isArray:!1,method:"post",url:t.baseUrl+"mail/accounts/:id/canned_answers"},getAnswers:{isArray:!1,method:"get",url:t.baseUrl+"mail/accounts/:id/canned_answers"},removeAnswers:{isArray:!1,method:"delete",url:t.baseUrl+"mail/accounts/:id/canned_answers"},getImap:{isArray:!1,method:"get",url:t.baseUrl+"mail/accounts/:id/in_servers"},addImap:{isArray:!1,method:"post",url:t.baseUrl+"mail/accounts/:id/in_servers"},removeImap:{isArray:!1,method:"delete",url:t.baseUrl+"mail/accounts/:id/in_servers"},getSmtp:{isArray:!1,method:"get",url:t.baseUrl+"mail/accounts/:id/out_servers"},addSmtp:{isArray:!1,method:"post",url:t.baseUrl+"mail/accounts/:id/out_servers"},removeSmtp:{isArray:!1,method:"delete",url:t.baseUrl+"mail/accounts/:id/out_servers"},addInteraction:{isArray:!1,method:"post",url:t.baseUrl+"mail/accounts/:id/interactions"},getInteractions:{isArray:!1,method:"get",url:t.baseUrl+"mail/accounts/:id/interactions"},addApplications:{isArray:!1,method:"post",url:t.baseUrl+"mail/accounts/:id/applications"},getApplications:{isArray:!1,method:"get",url:t.baseUrl+"mail/accounts/:id/applications"},addDisposition:{isArray:!1,method:"post",url:t.baseUrl+"mail/accounts/:id/dispositions"},addDispositions:{isArray:!1,method:"post",url:t.baseUrl+"mail/accounts/:id/dispositions"},getDispositions:{isArray:!1,method:"get",url:t.baseUrl+"mail/accounts/:id/dispositions"},getMessages:{isArray:!1,method:"get",url:t.baseUrl+"mail/accounts/:id/messages"},send:{isArray:!1,method:"post",url:t.baseUrl+"mail/accounts/:id/send"},verifySmtp:{isArray:!1,method:"get",url:t.baseUrl+"mail/accounts/:id/verify"}}),t.mailQueue=e(t.baseUrl+"mail/queues/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"mail/queues/describe"},clone:{method:"post",url:t.baseUrl+"mail/queues/:id/clone",params:{includeAll:"@includeAll"}},getMembers:{isArray:!1,method:"get",url:t.baseUrl+"mail/queues/:id/members"},getTeams:{isArray:!1,method:"get",url:t.baseUrl+"mail/queues/:id/teams"},addTeams:{isArray:!0,method:"post",url:t.baseUrl+"mail/queues/:id/teams"},removeTeams:{isArray:!1,method:"delete",url:t.baseUrl+"mail/queues/:id/teams"},addAgents:{isArray:!0,method:"post",url:t.baseUrl+"mail/queues/:id/users"},removeAgents:{isArray:!1,method:"delete",url:t.baseUrl+"mail/queues/:id/users"},getAgents:{isArray:!1,method:"get",url:t.baseUrl+"mail/queues/:id/users"}}),t.mailSubstatus=e(t.baseUrl+"mail/substatuses/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"mail/substatuses/describe"},clone:{method:"post",url:t.baseUrl+"mail/substatuses/:id/clone",params:{includeAll:"@includeAll"}}}),t.mailInteraction=e(t.baseUrl+"mail/interactions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"mail/interactions/describe"},clone:{method:"post",url:t.baseUrl+"mail/interactions/:id/clone",params:{includeAll:"@includeAll"}},addMessage:{isArray:!1,method:"post",url:t.baseUrl+"mail/interactions/:id/messages"},getMessages:{isArray:!1,method:"get",url:t.baseUrl+"mail/interactions/:id/messages"},addTags:{isArray:!1,method:"post",url:t.baseUrl+"mail/interactions/:id/tags"},removeTags:{isArray:!1,method:"delete",url:t.baseUrl+"mail/interactions/:id/tags"}}),t.mailMessage=e(t.baseUrl+"mail/messages/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"mail/messages/describe"},clone:{method:"post",url:t.baseUrl+"mail/messages/:id/clone",params:{includeAll:"@includeAll"}},accept:{isArray:!1,method:"put",url:t.baseUrl+"mail/messages/:id/accept"},reject:{isArray:!1,method:"put",url:t.baseUrl+"mail/messages/:id/reject"}}),t.mailApplication=e(t.baseUrl+"mail/applications/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"mail/applications/describe"},clone:{method:"post",url:t.baseUrl+"mail/applications/:id/clone",params:{includeAll:"@includeAll"}}}),t.mailDisposition=e(t.baseUrl+"mail/dispositions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"mail/dispositions/describe"},clone:{method:"post",url:t.baseUrl+"mail/dispositions/:id/clone",params:{includeAll:"@includeAll"}}}),t.mailQueueReport=e(t.baseUrl+"mail/reports/queue/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"mail/reports/queue/describe"},clone:{method:"post",url:t.baseUrl+"mail/reports/queue/:id/clone",params:{includeAll:"@includeAll"}}}),t.dashboard=e(t.baseUrl+"dashboards/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"dashboards/describe"},clone:{method:"post",url:t.baseUrl+"dashboards/:id/clone",params:{includeAll:"@includeAll"}},addItem:{isArray:!1,method:"post",url:t.baseUrl+"dashboards/:id/items"},getItems:{isArray:!1,method:"get",url:t.baseUrl+"dashboards/:id/items"}}),t.dashboardItem=e(t.baseUrl+"dashboards/items/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"dashboards/items/describe"},clone:{method:"post",url:t.baseUrl+"dashboards/items/:id/clone",params:{includeAll:"@includeAll"}}}),t.faxAccount=e(t.baseUrl+"fax/accounts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"fax/accounts/describe"},clone:{method:"post",url:t.baseUrl+"fax/accounts/:id/clone",params:{includeAll:"@includeAll"}},addAnswer:{isArray:!1,method:"post",url:t.baseUrl+"fax/accounts/:id/canned_answers"},getAnswers:{isArray:!1,method:"get",url:t.baseUrl+"fax/accounts/:id/canned_answers"},removeAnswers:{isArray:!1,method:"delete",url:t.baseUrl+"fax/accounts/:id/canned_answers"},addInteraction:{isArray:!1,method:"post",url:t.baseUrl+"fax/accounts/:id/interactions"},getInteractions:{isArray:!1,method:"get",url:t.baseUrl+"fax/accounts/:id/interactions"},addApplications:{isArray:!1,method:"post",url:t.baseUrl+"fax/accounts/:id/applications"},getApplications:{isArray:!1,method:"get",url:t.baseUrl+"fax/accounts/:id/applications"},addDisposition:{isArray:!1,method:"post",url:t.baseUrl+"fax/accounts/:id/dispositions"},addDispositions:{isArray:!1,method:"post",url:t.baseUrl+"fax/accounts/:id/dispositions"},getDispositions:{isArray:!1,method:"get",url:t.baseUrl+"fax/accounts/:id/dispositions"},addAccountApplications:{isArray:!1,method:"post",url:t.baseUrl+"fax/accounts/addaccountapplications"},updateAccountApplications:{isArray:!1,method:"post",url:t.baseUrl+"fax/accounts/updateaccountapplications"},getMessages:{isArray:!1,method:"get",url:t.baseUrl+"fax/accounts/:id/messages"},send:{isArray:!1,method:"post",url:t.baseUrl+"fax/accounts/:id/send"}}),t.faxApplication=e(t.baseUrl+"fax/applications/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"fax/applications/describe"},clone:{method:"post",url:t.baseUrl+"fax/applications/:id/clone",params:{includeAll:"@includeAll"}}}),t.faxDisposition=e(t.baseUrl+"fax/dispositions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"fax/dispositions/describe"},clone:{method:"post",url:t.baseUrl+"fax/dispositions/:id/clone",params:{includeAll:"@includeAll"}}}),t.faxInteraction=e(t.baseUrl+"fax/interactions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"fax/interactions/describe"},clone:{method:"post",url:t.baseUrl+"fax/interactions/:id/clone",params:{includeAll:"@includeAll"}},addMessage:{isArray:!1,method:"post",url:t.baseUrl+"fax/interactions/:id/messages"},getMessages:{isArray:!1,method:"get",url:t.baseUrl+"fax/interactions/:id/messages"},addTags:{isArray:!1,method:"post",url:t.baseUrl+"fax/interactions/:id/tags"},removeTags:{isArray:!1,method:"delete",url:t.baseUrl+"fax/interactions/:id/tags"}}),t.faxMessage=e(t.baseUrl+"fax/messages/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"fax/messages/describe"},clone:{method:"post",url:t.baseUrl+"fax/messages/:id/clone",params:{includeAll:"@includeAll"}},accept:{isArray:!1,method:"put",url:t.baseUrl+"fax/messages/:id/accept"},reject:{isArray:!1,method:"put",url:t.baseUrl+"fax/messages/:id/reject"}}),t.faxQueue=e(t.baseUrl+"fax/queues/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"fax/queues/describe"},clone:{method:"post",url:t.baseUrl+"fax/queues/:id/clone",params:{includeAll:"@includeAll"}},getMembers:{isArray:!1,method:"get",url:t.baseUrl+"fax/queues/:id/members"},getTeams:{isArray:!1,method:"get",url:t.baseUrl+"fax/queues/:id/teams"},addTeams:{isArray:!0,method:"post",url:t.baseUrl+"fax/queues/:id/teams"},removeTeams:{isArray:!1,method:"delete",url:t.baseUrl+"fax/queues/:id/teams"},addAgents:{isArray:!0,method:"post",url:t.baseUrl+"fax/queues/:id/users"},removeAgents:{isArray:!1,method:"delete",url:t.baseUrl+"fax/queues/:id/users"},getAgents:{isArray:!1,method:"get",url:t.baseUrl+"fax/queues/:id/users"}}),t.faxQueueReport=e(t.baseUrl+"fax/reports/queue/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"fax/reports/queue/describe"},clone:{method:"post",url:t.baseUrl+"fax/reports/queue/:id/clone",params:{includeAll:"@includeAll"}}}),t.smsAccount=e(t.baseUrl+"sms/accounts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"sms/accounts/describe"},clone:{method:"post",url:t.baseUrl+"sms/accounts/:id/clone",params:{includeAll:"@includeAll"}},addAnswer:{isArray:!1,method:"post",url:t.baseUrl+"sms/accounts/:id/canned_answers"},getAnswers:{isArray:!1,method:"get",url:t.baseUrl+"sms/accounts/:id/canned_answers"},removeAnswers:{isArray:!1,method:"delete",url:t.baseUrl+"sms/accounts/:id/canned_answers"},notify:{isArray:!1,method:"post",url:t.baseUrl+"sms/accounts/:id/notify"},addApplications:{isArray:!1,method:"post",url:t.baseUrl+"sms/accounts/:id/applications"},getApplications:{isArray:!1,method:"get",url:t.baseUrl+"sms/accounts/:id/applications"},addDisposition:{isArray:!1,method:"post",url:t.baseUrl+"sms/accounts/:id/dispositions"},addDispositions:{isArray:!1,method:"post",url:t.baseUrl+"sms/accounts/:id/dispositions"},getDispositions:{isArray:!1,method:"get",url:t.baseUrl+"sms/accounts/:id/dispositions"},getInteractions:{isArray:!1,method:"get",url:t.baseUrl+"sms/accounts/:id/interactions"},send:{isArray:!1,method:"post",url:t.baseUrl+"sms/accounts/:id/send"},status:{isArray:!1,method:"post",url:t.baseUrl+"sms/accounts/:id/status"}}),t.smsApplication=e(t.baseUrl+"sms/applications/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"sms/applications/describe"},clone:{method:"post",url:t.baseUrl+"sms/applications/:id/clone",params:{includeAll:"@includeAll"}}}),t.smsDisposition=e(t.baseUrl+"sms/dispositions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"sms/dispositions/describe"},clone:{method:"post",url:t.baseUrl+"sms/dispositions/:id/clone",params:{includeAll:"@includeAll"}}}),t.smsInteraction=e(t.baseUrl+"sms/interactions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"sms/interactions/describe"},clone:{method:"post",url:t.baseUrl+"sms/interactions/:id/clone",params:{includeAll:"@includeAll"}},addMessage:{isArray:!1,method:"post",url:t.baseUrl+"sms/interactions/:id/messages"},getMessages:{isArray:!1,method:"get",url:t.baseUrl+"sms/interactions/:id/messages"},addTags:{isArray:!1,method:"post",url:t.baseUrl+"sms/interactions/:id/tags"},removeTags:{isArray:!1,method:"delete",url:t.baseUrl+"sms/interactions/:id/tags"}}),t.smsMessage=e(t.baseUrl+"sms/messages/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"sms/messages/describe"},clone:{method:"post",url:t.baseUrl+"sms/messages/:id/clone",params:{includeAll:"@includeAll"}},accept:{isArray:!1,method:"put",url:t.baseUrl+"sms/messages/:id/accept"},reject:{isArray:!1,method:"put",url:t.baseUrl+"sms/messages/:id/reject"},status:{isArray:!1,method:"post",url:t.baseUrl+"sms/messages/:id/status"}}),t.smsQueue=e(t.baseUrl+"sms/queues/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"sms/queues/describe"},clone:{method:"post",url:t.baseUrl+"sms/queues/:id/clone",params:{includeAll:"@includeAll"}},getMembers:{isArray:!1,method:"get",url:t.baseUrl+"sms/queues/:id/members"},getTeams:{isArray:!1,method:"get",url:t.baseUrl+"sms/queues/:id/teams"},addTeams:{isArray:!0,method:"post",url:t.baseUrl+"sms/queues/:id/teams"},removeTeams:{isArray:!1,method:"delete",url:t.baseUrl+"sms/queues/:id/teams"},addAgents:{isArray:!0,method:"post",url:t.baseUrl+"sms/queues/:id/users"},removeAgents:{isArray:!1,method:"delete",url:t.baseUrl+"sms/queues/:id/users"},getAgents:{isArray:!1,method:"get",url:t.baseUrl+"sms/queues/:id/users"}}),t.openchannelAccount=e(t.baseUrl+"openchannel/accounts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"openchannel/accounts/describe"},clone:{method:"post",url:t.baseUrl+"openchannel/accounts/:id/clone",params:{includeAll:"@includeAll"}},addAnswer:{isArray:!1,method:"post",url:t.baseUrl+"openchannel/accounts/:id/canned_answers"},getAnswers:{isArray:!1,method:"get",url:t.baseUrl+"openchannel/accounts/:id/canned_answers"},removeAnswers:{isArray:!1,method:"delete",url:t.baseUrl+"openchannel/accounts/:id/canned_answers"},notify:{isArray:!1,method:"post",url:t.baseUrl+"openchannel/accounts/:id/notify"},addApplications:{isArray:!1,method:"post",url:t.baseUrl+"openchannel/accounts/:id/applications"},getApplications:{isArray:!1,method:"get",url:t.baseUrl+"openchannel/accounts/:id/applications"},addDisposition:{isArray:!1,method:"post",url:t.baseUrl+"openchannel/accounts/:id/dispositions"},addDispositions:{isArray:!1,method:"post",url:t.baseUrl+"openchannel/accounts/:id/dispositions"},getDispositions:{isArray:!1,method:"get",url:t.baseUrl+"openchannel/accounts/:id/dispositions"},getInteractions:{isArray:!1,method:"get",url:t.baseUrl+"openchannel/accounts/:id/interactions"}}),t.openchannelApplication=e(t.baseUrl+"openchannel/applications/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"openchannel/applications/describe"},clone:{method:"post",url:t.baseUrl+"openchannel/applications/:id/clone",params:{includeAll:"@includeAll"}}}),t.openchannelDisposition=e(t.baseUrl+"openchannel/dispositions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"openchannel/dispositions/describe"},clone:{method:"post",url:t.baseUrl+"openchannel/dispositions/:id/clone",params:{includeAll:"@includeAll"}}}),t.openchannelInteraction=e(t.baseUrl+"openchannel/interactions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"openchannel/interactions/describe"},clone:{method:"post",url:t.baseUrl+"openchannel/interactions/:id/clone",params:{includeAll:"@includeAll"}},addMessage:{isArray:!1,method:"post",url:t.baseUrl+"openchannel/interactions/:id/messages"},getMessages:{isArray:!1,method:"get",url:t.baseUrl+"openchannel/interactions/:id/messages"},addTags:{isArray:!1,method:"post",url:t.baseUrl+"openchannel/interactions/:id/tags"},removeTags:{isArray:!1,method:"delete",url:t.baseUrl+"openchannel/interactions/:id/tags"}}),t.openchannelMessage=e(t.baseUrl+"openchannel/messages/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"openchannel/messages/describe"},clone:{method:"post",url:t.baseUrl+"openchannel/messages/:id/clone",params:{includeAll:"@includeAll"}},accept:{isArray:!1,method:"put",url:t.baseUrl+"openchannel/messages/:id/accept"},reject:{isArray:!1,method:"put",url:t.baseUrl+"openchannel/messages/:id/reject"}}),t.openchannelQueue=e(t.baseUrl+"openchannel/queues/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"openchannel/queues/describe"},clone:{method:"post",url:t.baseUrl+"openchannel/queues/:id/clone",params:{includeAll:"@includeAll"}},getMembers:{isArray:!1,method:"get",url:t.baseUrl+"openchannel/queues/:id/members"},getTeams:{isArray:!1,method:"get",url:t.baseUrl+"openchannel/queues/:id/teams"},addTeams:{isArray:!0,method:"post",url:t.baseUrl+"openchannel/queues/:id/teams"},removeTeams:{isArray:!1,method:"delete",url:t.baseUrl+"openchannel/queues/:id/teams"},addAgents:{isArray:!0,method:"post",url:t.baseUrl+"openchannel/queues/:id/users"},removeAgents:{isArray:!1,method:"delete",url:t.baseUrl+"openchannel/queues/:id/users"},getAgents:{isArray:!1,method:"get",url:t.baseUrl+"openchannel/queues/:id/users"}}),t.chatWebsite=e(t.baseUrl+"chat/websites/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/websites/describe"},clone:{method:"post",url:t.baseUrl+"chat/websites/:id/clone",params:{includeAll:"@includeAll"}},addAnswer:{isArray:!1,method:"post",url:t.baseUrl+"chat/websites/:id/canned_answers"},getAnswers:{isArray:!1,method:"get",url:t.baseUrl+"chat/websites/:id/canned_answers"},removeAnswers:{isArray:!1,method:"delete",url:t.baseUrl+"chat/websites/:id/canned_answers"},addLogo:{isArray:!1,method:"post",url:t.baseUrl+"chat/websites/:id/logo"},addAvatar:{isArray:!1,method:"post",url:t.baseUrl+"chat/websites/:id/avatar"},getLogo:{isArray:!1,method:"get",url:t.baseUrl+"chat/websites/:id/logo"},getAvatar:{isArray:!1,method:"get",url:t.baseUrl+"chat/websites/:id/avatar"},notify:{isArray:!1,method:"post",url:t.baseUrl+"chat/websites/:id/notify"},offline:{isArray:!1,method:"post",url:t.baseUrl+"chat/websites/:id/offline"},addInteraction:{isArray:!1,method:"post",url:t.baseUrl+"chat/websites/:id/interactions"},getInteractions:{isArray:!1,method:"get",url:t.baseUrl+"chat/websites/:id/interactions"},getSnippet:{isArray:!1,method:"get",url:t.baseUrl+"chat/websites/:id/snippet"},addApplications:{isArray:!1,method:"post",url:t.baseUrl+"chat/websites/:id/applications"},getApplications:{isArray:!1,method:"get",url:t.baseUrl+"chat/websites/:id/applications"},addDisposition:{isArray:!1,method:"post",url:t.baseUrl+"chat/websites/:id/dispositions"},addDispositions:{isArray:!1,method:"post",url:t.baseUrl+"chat/websites/:id/dispositions"},getDispositions:{isArray:!1,method:"get",url:t.baseUrl+"chat/websites/:id/dispositions"},addProactiveActions:{isArray:!1,method:"post",url:t.baseUrl+"chat/websites/:id/proactive_actions"},getProactiveActions:{isArray:!1,method:"get",url:t.baseUrl+"chat/websites/:id/proactive_actions"},getFields:{isArray:!1,method:"get",url:t.baseUrl+"chat/websites/:id/fields"},getOfflineMessages:{isArray:!1,method:"get",url:t.baseUrl+"chat/websites/:id/offline_messages"}}),t.openchannelQueueReport=e(t.baseUrl+"openchannel/reports/queue/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"openchannel/reports/queue/describe"},clone:{method:"post",url:t.baseUrl+"openchannel/reports/queue/:id/clone",params:{includeAll:"@includeAll"}}}),t.chatApplication=e(t.baseUrl+"chat/applications/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/applications/describe"},clone:{method:"post",url:t.baseUrl+"chat/applications/:id/clone",params:{includeAll:"@includeAll"}}}),t.chatDisposition=e(t.baseUrl+"chat/dispositions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/dispositions/describe"},clone:{method:"post",url:t.baseUrl+"chat/dispositions/:id/clone",params:{includeAll:"@includeAll"}}}),t.chatInteraction=e(t.baseUrl+"chat/interactions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/interactions/describe"},clone:{method:"post",url:t.baseUrl+"chat/interactions/:id/clone",params:{includeAll:"@includeAll"}},abandon:{isArray:!1,method:"put",url:t.baseUrl+"chat/interactions/:id/abandon"},attachmentUpload:{isArray:!1,method:"post",url:t.baseUrl+"chat/interactions/:id/attachment_upload"},attachmentDownload:{isArray:!1,method:"get",url:t.baseUrl+"chat/interactions/:id/attachment_download"},close:{isArray:!1,method:"put",url:t.baseUrl+"chat/interactions/:id/close"},addMessage:{isArray:!1,method:"post",url:t.baseUrl+"chat/interactions/:id/messages"},getMessages:{isArray:!1,method:"get",url:t.baseUrl+"chat/interactions/:id/messages"},getMyMessages:{isArray:!1,method:"get",url:t.baseUrl+"chat/interactions/:id/my_messages"},addTags:{isArray:!1,method:"post",url:t.baseUrl+"chat/interactions/:id/tags"},removeTags:{isArray:!1,method:"delete",url:t.baseUrl+"chat/interactions/:id/tags"}}),t.chatMessage=e(t.baseUrl+"chat/messages/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/messages/describe"},clone:{method:"post",url:t.baseUrl+"chat/messages/:id/clone",params:{includeAll:"@includeAll"}},accept:{isArray:!1,method:"put",url:t.baseUrl+"chat/messages/:id/accept"},reject:{isArray:!1,method:"put",url:t.baseUrl+"chat/messages/:id/reject"}}),t.chatOfflineMessage=e(t.baseUrl+"chat/offline_messages/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/offline_messages/describe"},clone:{method:"post",url:t.baseUrl+"chat/offline_messages/:id/clone",params:{includeAll:"@includeAll"}}}),t.chatQueue=e(t.baseUrl+"chat/queues/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/queues/describe"},clone:{method:"post",url:t.baseUrl+"chat/queues/:id/clone",params:{includeAll:"@includeAll"}},getMembers:{isArray:!1,method:"get",url:t.baseUrl+"chat/queues/:id/members"},getTeams:{isArray:!1,method:"get",url:t.baseUrl+"chat/queues/:id/teams"},addTeams:{isArray:!0,method:"post",url:t.baseUrl+"chat/queues/:id/teams"},removeTeams:{isArray:!1,method:"delete",url:t.baseUrl+"chat/queues/:id/teams"},addAgents:{isArray:!0,method:"post",url:t.baseUrl+"chat/queues/:id/users"},removeAgents:{isArray:!1,method:"delete",url:t.baseUrl+"chat/queues/:id/users"},getAgents:{isArray:!1,method:"get",url:t.baseUrl+"chat/queues/:id/users"}}),t.chatGroup=e(t.baseUrl+"chat/groups/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/groups/describe"},clone:{method:"post",url:t.baseUrl+"chat/groups/:id/clone",params:{includeAll:"@includeAll"}},getUnread:{isArray:!1,method:"get",url:t.baseUrl+"chat/groups/:id/unread"},addMembers:{isArray:!0,method:"post",url:t.baseUrl+"chat/groups/:id/members"},getMembers:{isArray:!1,method:"get",url:t.baseUrl+"chat/groups/:id/members"},removeMembers:{isArray:!1,method:"delete",url:t.baseUrl+"chat/groups/:id/members"},addMessage:{isArray:!1,method:"post",url:t.baseUrl+"chat/groups/:id/messages"},getMessages:{isArray:!1,method:"get",url:t.baseUrl+"chat/groups/:id/messages"}}),t.chatProactiveAction=e(t.baseUrl+"chat/proactive_actions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/proactive_actions/describe"},clone:{method:"post",url:t.baseUrl+"chat/proactive_actions/:id/clone",params:{includeAll:"@includeAll"}}}),t.cmCompany=e(t.baseUrl+"cm/companies/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"cm/companies/describe"},clone:{method:"post",url:t.baseUrl+"cm/companies/:id/clone",params:{includeAll:"@includeAll"}},addContacts:{isArray:!1,method:"post",url:t.baseUrl+"cm/companies/:id/contacts"},getContacts:{isArray:!1,method:"get",url:t.baseUrl+"cm/companies/:id/contacts"}}),t.cmContact=e(t.baseUrl+"cm/contacts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"cm/contacts/describe"},clone:{method:"post",url:t.baseUrl+"cm/contacts/:id/clone",params:{includeAll:"@includeAll"}},merge:{isArray:!1,method:"post",url:t.baseUrl+"cm/contacts/merge"},bulkCreate:{isArray:!1,method:"post",url:t.baseUrl+"cm/contacts/create_many"},getHoppers:{isArray:!1,method:"get",url:t.baseUrl+"cm/contacts/:id/hoppers"},getHopperHistories:{isArray:!1,method:"get",url:t.baseUrl+"cm/contacts/:id/hopper_histories"},getHopperFinals:{isArray:!1,method:"get",url:t.baseUrl+"cm/contacts/:id/hopper_finals"},getJscriptySessions:{isArray:!1,method:"get",url:t.baseUrl+"cm/contacts/:id/jscripty_sessions"},uploadCsv:{isArray:!1,method:"post",url:t.baseUrl+"cm/contacts/csv"},upload:{isArray:!1,method:"post",url:t.baseUrl+"cm/contacts/upload"},import:{isArray:!1,method:"post",url:t.baseUrl+"cm/contacts/upload/:id"}}),t.cmHopper=e(t.baseUrl+"cm/hopper/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"cm/hopper/describe"},clone:{method:"post",url:t.baseUrl+"cm/hopper/:id/clone",params:{includeAll:"@includeAll"}},getPreview:{isArray:!1,method:"post",url:t.baseUrl+"cm/hopper/preview"},getOpenContacts:{isArray:!1,method:"get",url:t.baseUrl+"cm/hopper/opencontacts"}}),t.cmHopperBlack=e(t.baseUrl+"cm/hopper_black/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"cm/hopper_black/describe"},clone:{method:"post",url:t.baseUrl+"cm/hopper_black/:id/clone",params:{includeAll:"@includeAll"}}}),t.cmHopperFinal=e(t.baseUrl+"cm/hopper_final/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"cm/hopper_final/describe"},clone:{method:"post",url:t.baseUrl+"cm/hopper_final/:id/clone",params:{includeAll:"@includeAll"}},countContactsQueueCampaignHopperFinal:{isArray:!0,method:"get",url:t.baseUrl+"cm/hopper_final/voice/queue/countAttributes/:id"},countContactsIvrCampaignHopperFinal:{isArray:!0,method:"get",url:t.baseUrl+"cm/hopper_final/campaign/countAttributes/:id"},moveContactsQueueCampaignHopperFinal:{isArray:!0,method:"post",url:t.baseUrl+"cm/hopper_final/voice/queue/moveContacts/:id"},moveContactsIvrCampaignHopperFinal:{isArray:!0,method:"post",url:t.baseUrl+"cm/hopper_final/voice/campaign/moveContacts/:id"},checkContactHopper:{isArray:!1,method:"post",url:t.baseUrl+"cm/hopper_final/checkContactHopper"}}),t.cmHopperHistory=e(t.baseUrl+"cm/hopper_history/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"cm/hopper_history/describe"},clone:{method:"post",url:t.baseUrl+"cm/hopper_history/:id/clone",params:{includeAll:"@includeAll"}}}),t.cmCustomField=e(t.baseUrl+"cm/custom_fields/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"cm/custom_fields/describe"},clone:{method:"post",url:t.baseUrl+"cm/custom_fields/:id/clone",params:{includeAll:"@includeAll"}}}),t.cmList=e(t.baseUrl+"cm/lists/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"cm/lists/describe"},clone:{method:"post",url:t.baseUrl+"cm/lists/:id/clone",params:{includeAll:"@includeAll"}},addDisposition:{isArray:!1,method:"post",url:t.baseUrl+"cm/lists/:id/dispositions"},getDispositions:{isArray:!1,method:"get",url:t.baseUrl+"cm/lists/:id/dispositions"},addContacts:{isArray:!1,method:"post",url:t.baseUrl+"cm/lists/:id/contacts"},getContacts:{isArray:!0,method:"get",url:t.baseUrl+"cm/lists/:id/contacts"},getContactsCsv:{isArray:!1,method:"get",url:t.baseUrl+"cm/lists/:id/contacts/csv"},addCustomField:{isArray:!1,method:"post",url:t.baseUrl+"cm/lists/:id/fields"},getCustomFields:{isArray:!1,method:"get",url:t.baseUrl+"cm/lists/:id/fields"},addAgents:{isArray:!0,method:"post",url:t.baseUrl+"cm/lists/:id/users"},removeAgents:{isArray:!1,method:"delete",url:t.baseUrl+"cm/lists/:id/users"},getAgents:{isArray:!1,method:"get",url:t.baseUrl+"cm/lists/:id/users"}}),t.action=e(t.baseUrl+"actions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"actions/describe"},clone:{method:"post",url:t.baseUrl+"actions/:id/clone",params:{includeAll:"@includeAll"}}}),t.automation=e(t.baseUrl+"automations/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"automations/describe"},clone:{method:"post",url:t.baseUrl+"automations/:id/clone",params:{includeAll:"@includeAll"}},addConditions:{isArray:!1,method:"post",url:t.baseUrl+"automations/:id/conditions"},getConditions:{isArray:!1,method:"get",url:t.baseUrl+"automations/:id/conditions"},addActions:{isArray:!1,method:"post",url:t.baseUrl+"automations/:id/actions"},getActions:{isArray:!1,method:"get",url:t.baseUrl+"automations/:id/actions"}}),t.cannedAnswer=e(t.baseUrl+"canned_answers/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"canned_answers/describe"},clone:{method:"post",url:t.baseUrl+"canned_answers/:id/clone",params:{includeAll:"@includeAll"}}}),t.condition=e(t.baseUrl+"conditions/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"conditions/describe"},clone:{method:"post",url:t.baseUrl+"conditions/:id/clone",params:{includeAll:"@includeAll"}}}),t.interval=e(t.baseUrl+"intervals/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"intervals/describe"},clone:{method:"post",url:t.baseUrl+"intervals/:id/clone",params:{includeAll:"@includeAll"}},addInterval:{isArray:!1,method:"post",url:t.baseUrl+"intervals/:id/sub_intervals"},getIntervals:{isArray:!1,method:"get",url:t.baseUrl+"intervals/:id/sub_intervals"},addIntervals:{isArray:!0,method:"post",url:t.baseUrl+"intervals/:id/sub_intervals/create_many"}}),t.pause=e(t.baseUrl+"pauses/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"pauses/describe"},clone:{method:"post",url:t.baseUrl+"pauses/:id/clone",params:{includeAll:"@includeAll"}}}),t.cdr=e(t.baseUrl+"cdr/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"cdr/describe"},clone:{method:"post",url:t.baseUrl+"cdr/:id/clone",params:{includeAll:"@includeAll"}}}),t.voiceQueuesLog=e(t.baseUrl+"voiceQueuesLog/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"voiceQueuesLog/describe"},clone:{method:"post",url:t.baseUrl+"voiceQueuesLog/:id/clone",params:{includeAll:"@includeAll"}}}),t.schedule=e(t.baseUrl+"schedules/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"schedules/describe"},clone:{method:"post",url:t.baseUrl+"schedules/:id/clone",params:{includeAll:"@includeAll"}}}),t.sound=e(t.baseUrl+"sounds/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"sounds/describe"},clone:{method:"post",url:t.baseUrl+"sounds/:id/clone",params:{includeAll:"@includeAll"}},download:{isArray:!1,method:"get",url:t.baseUrl+"sounds/:id/download",responseType:"arraybuffer",cache:!1,transformResponse:function(e,t){var n=t();return{type:n["content-type"],length:n["content-length"],buffer:e}}},delete:{isArray:!1,method:"delete",url:t.baseUrl+"sounds/:id"}}),t.tag=e(t.baseUrl+"tags/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"tags/describe"},clone:{method:"post",url:t.baseUrl+"tags/:id/clone",params:{includeAll:"@includeAll"}}}),t.template=e(t.baseUrl+"templates/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"templates/describe"},clone:{method:"post",url:t.baseUrl+"templates/:id/clone",params:{includeAll:"@includeAll"}}}),t.trigger=e(t.baseUrl+"triggers/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"triggers/describe"},clone:{method:"post",url:t.baseUrl+"triggers/:id/clone",params:{includeAll:"@includeAll"}},addAllCondition:{isArray:!1,method:"post",url:t.baseUrl+"triggers/:id/all_conditions"},addAnyCondition:{isArray:!1,method:"post",url:t.baseUrl+"triggers/:id/any_conditions"},getAllConditions:{isArray:!1,method:"get",url:t.baseUrl+"triggers/:id/all_conditions"},getAnyConditions:{isArray:!1,method:"get",url:t.baseUrl+"triggers/:id/any_conditions"},addAction:{isArray:!1,method:"post",url:t.baseUrl+"triggers/:id/actions"},getActions:{isArray:!1,method:"get",url:t.baseUrl+"triggers/:id/actions"}}),t.variable=e(t.baseUrl+"variables/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"variables/describe"},clone:{method:"post",url:t.baseUrl+"variables/:id/clone",params:{includeAll:"@includeAll"}}}),t.integration=e(t.baseUrl+"integrations/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/describe"},clone:{method:"post",url:t.baseUrl+"integrations/:id/clone",params:{includeAll:"@includeAll"}}}),t.integrationReport=e(t.baseUrl+"integrations/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/reports/describe"},clone:{method:"post",url:t.baseUrl+"integrations/reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.analyticCustomReport=e(t.baseUrl+"analytics/custom_reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"analytics/custom_reports/describe"},clone:{method:"post",url:t.baseUrl+"analytics/custom_reports/:id/clone",params:{includeAll:"@includeAll"}},preview:{isArray:!0,method:"get",url:t.baseUrl+"analytics/custom_reports/:id/preview"},run:{isArray:!1,method:"get",url:t.baseUrl+"analytics/custom_reports/:id/run"},query:{isArray:!1,method:"get",url:t.baseUrl+"analytics/custom_reports/:id/query"}}),t.analyticDefaultReport=e(t.baseUrl+"analytics/default_reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"analytics/default_reports/describe"},clone:{method:"post",url:t.baseUrl+"analytics/default_reports/:id/clone",params:{includeAll:"@includeAll"}},preview:{isArray:!0,method:"get",url:t.baseUrl+"analytics/default_reports/:id/preview"},run:{isArray:!1,method:"get",url:t.baseUrl+"analytics/default_reports/:id/run"},query:{isArray:!1,method:"get",url:t.baseUrl+"analytics/default_reports/:id/query"}}),t.analyticExtractedReport=e(t.baseUrl+"analytics/extracted_reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"analytics/extracted_reports/describe"},clone:{method:"post",url:t.baseUrl+"analytics/extracted_reports/:id/clone",params:{includeAll:"@includeAll"}},download:{isArray:!1,method:"get",url:t.baseUrl+"analytics/extracted_reports/:id/download",responseType:"arraybuffer",cache:!1,transformResponse:function(e,t){var n=t();return{type:n["content-type"],length:n["content-length"],buffer:e}}}}),t.analyticMetric=e(t.baseUrl+"analytics/metrics/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"analytics/metrics/describe"},clone:{method:"post",url:t.baseUrl+"analytics/metrics/:id/clone",params:{includeAll:"@includeAll"}}}),t.analyticFieldReport=e(t.baseUrl+"analytics/field_reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"analytics/field_reports/describe"},clone:{method:"post",url:t.baseUrl+"analytics/field_reports/:id/clone",params:{includeAll:"@includeAll"}},bulkCreate:{method:"post",url:t.baseUrl+"analytics/field_reports/create_many",isArray:!0},bulkDestroy:{method:"delete",url:t.baseUrl+"analytics/field_reports/destroy_many",isArray:!0},addFields:{isArray:!0,method:"post",url:t.baseUrl+"analytics/field_reports/:id/create_many"}}),t.analyticTreeReport=e(t.baseUrl+"analytics/tree_reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"analytics/tree_reports/describe"},clone:{method:"post",url:t.baseUrl+"analytics/tree_reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.intSalesforceAccount=e(t.baseUrl+"integrations/salesforce/accounts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/salesforce/accounts/describe"},clone:{method:"post",url:t.baseUrl+"integrations/salesforce/accounts/:id/clone",params:{includeAll:"@includeAll"}},getConfigurations:{isArray:!1,method:"get",url:t.baseUrl+"integrations/salesforce/accounts/:id/configurations"},addConfiguration:{isArray:!1,method:"post",url:t.baseUrl+"integrations/salesforce/accounts/:id/configurations"},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/salesforce/accounts/:id/fields"}}),t.intSalesforceConfiguration=e(t.baseUrl+"integrations/salesforce/configurations/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/salesforce/configurations/describe"},clone:{method:"post",url:t.baseUrl+"integrations/salesforce/configurations/:id/clone",params:{includeAll:"@includeAll"}},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/salesforce/configurations/:id/fields"},getSubjects:{isArray:!1,method:"get",url:t.baseUrl+"integrations/salesforce/configurations/:id/subjects"},getDescriptions:{isArray:!1,method:"get",url:t.baseUrl+"integrations/salesforce/configurations/:id/descriptions"}}),t.intSalesforceField=e(t.baseUrl+"integrations/salesforce/fields/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/salesforce/fields/describe"},clone:{method:"post",url:t.baseUrl+"integrations/salesforce/fields/:id/clone",params:{includeAll:"@includeAll"}}}),t.intSugarcrmAccount=e(t.baseUrl+"integrations/sugarcrm/accounts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/sugarcrm/accounts/describe"},clone:{method:"post",url:t.baseUrl+"integrations/sugarcrm/accounts/:id/clone",params:{includeAll:"@includeAll"}},getConfigurations:{isArray:!1,method:"get",url:t.baseUrl+"integrations/sugarcrm/accounts/:id/configurations"},addConfiguration:{isArray:!1,method:"post",url:t.baseUrl+"integrations/sugarcrm/accounts/:id/configurations"},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/sugarcrm/accounts/:id/fields"}}),t.intSugarcrmConfiguration=e(t.baseUrl+"integrations/sugarcrm/configurations/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/sugarcrm/configurations/describe"},clone:{method:"post",url:t.baseUrl+"integrations/sugarcrm/configurations/:id/clone",params:{includeAll:"@includeAll"}},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/sugarcrm/configurations/:id/fields"},getSubjects:{isArray:!1,method:"get",url:t.baseUrl+"integrations/sugarcrm/configurations/:id/subjects"},getDescriptions:{isArray:!1,method:"get",url:t.baseUrl+"integrations/sugarcrm/configurations/:id/descriptions"}}),t.intSugarcrmField=e(t.baseUrl+"integrations/sugarcrm/fields/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/sugarcrm/fields/describe"},clone:{method:"post",url:t.baseUrl+"integrations/sugarcrm/fields/:id/clone",params:{includeAll:"@includeAll"}}}),t.intDeskAccount=e(t.baseUrl+"integrations/desk/accounts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/desk/accounts/describe"},clone:{method:"post",url:t.baseUrl+"integrations/desk/accounts/:id/clone",params:{includeAll:"@includeAll"}},getConfigurations:{isArray:!1,method:"get",url:t.baseUrl+"integrations/desk/accounts/:id/configurations"},addConfiguration:{isArray:!1,method:"post",url:t.baseUrl+"integrations/desk/accounts/:id/configurations"},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/desk/accounts/:id/fields"}}),t.intDeskConfiguration=e(t.baseUrl+"integrations/desk/configurations/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/desk/configurations/describe"},clone:{method:"post",url:t.baseUrl+"integrations/desk/configurations/:id/clone",params:{includeAll:"@includeAll"}},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/desk/configurations/:id/fields"},getSubjects:{isArray:!1,method:"get",url:t.baseUrl+"integrations/desk/configurations/:id/subjects"},getDescriptions:{isArray:!1,method:"get",url:t.baseUrl+"integrations/desk/configurations/:id/descriptions"},getTags:{isArray:!1,method:"get",url:t.baseUrl+"integrations/desk/configurations/:id/tags"},setTags:{isArray:!0,method:"post",url:t.baseUrl+"integrations/desk/configurations/:id/tags"}}),t.intDeskField=e(t.baseUrl+"integrations/desk/fields/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/desk/fields/describe"},clone:{method:"post",url:t.baseUrl+"integrations/desk/fields/:id/clone",params:{includeAll:"@includeAll"}}}),t.intZohoAccount=e(t.baseUrl+"integrations/zoho/accounts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/zoho/accounts/describe"},clone:{method:"post",url:t.baseUrl+"integrations/zoho/accounts/:id/clone",params:{includeAll:"@includeAll"}},getConfigurations:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zoho/accounts/:id/configurations"},addConfiguration:{isArray:!1,method:"post",url:t.baseUrl+"integrations/zoho/accounts/:id/configurations"},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zoho/accounts/:id/fields"}}),t.intZohoConfiguration=e(t.baseUrl+"integrations/zoho/configurations/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/zoho/configurations/describe"},clone:{method:"post",url:t.baseUrl+"integrations/zoho/configurations/:id/clone",params:{includeAll:"@includeAll"}},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zoho/configurations/:id/fields"},getSubjects:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zoho/configurations/:id/subjects"},getDescriptions:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zoho/configurations/:id/descriptions"}}),t.intZohoField=e(t.baseUrl+"integrations/zoho/fields/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/zoho/fields/describe"},clone:{method:"post",url:t.baseUrl+"integrations/zoho/fields/:id/clone",params:{includeAll:"@includeAll"}}}),t.intZendeskAccount=e(t.baseUrl+"integrations/zendesk/accounts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/zendesk/accounts/describe"},clone:{method:"post",url:t.baseUrl+"integrations/zendesk/accounts/:id/clone",params:{includeAll:"@includeAll"}},getConfigurations:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zendesk/accounts/:id/configurations"},addConfiguration:{isArray:!1,method:"post",url:t.baseUrl+"integrations/zendesk/accounts/:id/configurations"},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zendesk/accounts/:id/fields"}}),t.intZendeskConfiguration=e(t.baseUrl+"integrations/zendesk/configurations/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/zendesk/configurations/describe"},clone:{method:"post",url:t.baseUrl+"integrations/zendesk/configurations/:id/clone",params:{includeAll:"@includeAll"}},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zendesk/configurations/:id/fields"},getSubjects:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zendesk/configurations/:id/subjects"},getDescriptions:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zendesk/configurations/:id/descriptions"},getTags:{isArray:!1,method:"get",url:t.baseUrl+"integrations/zendesk/configurations/:id/tags"},setTags:{isArray:!0,method:"post",url:t.baseUrl+"integrations/zendesk/configurations/:id/tags"}}),t.intZendeskField=e(t.baseUrl+"integrations/zendesk/fields/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/zendesk/fields/describe"},clone:{method:"post",url:t.baseUrl+"integrations/zendesk/fields/:id/clone",params:{includeAll:"@includeAll"}}}),t.intFreshdeskAccount=e(t.baseUrl+"integrations/freshdesk/accounts/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/freshdesk/accounts/describe"},clone:{method:"post",url:t.baseUrl+"integrations/freshdesk/accounts/:id/clone",params:{includeAll:"@includeAll"}},getConfigurations:{isArray:!1,method:"get",url:t.baseUrl+"integrations/freshdesk/accounts/:id/configurations"},addConfiguration:{isArray:!1,method:"post",url:t.baseUrl+"integrations/freshdesk/accounts/:id/configurations"},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/freshdesk/accounts/:id/fields"}}),t.intFreshdeskConfiguration=e(t.baseUrl+"integrations/freshdesk/configurations/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/freshdesk/configurations/describe"},clone:{method:"post",url:t.baseUrl+"integrations/freshdesk/configurations/:id/clone",params:{includeAll:"@includeAll"}},getFields:{isArray:!1,method:"get",url:t.baseUrl+"integrations/freshdesk/configurations/:id/fields"},getSubjects:{isArray:!1,method:"get",url:t.baseUrl+"integrations/freshdesk/configurations/:id/subjects"},getDescriptions:{isArray:!1,method:"get",url:t.baseUrl+"integrations/freshdesk/configurations/:id/descriptions"},getTags:{isArray:!1,method:"get",url:t.baseUrl+"integrations/freshdesk/configurations/:id/tags"},setTags:{isArray:!0,method:"post",url:t.baseUrl+"integrations/freshdesk/configurations/:id/tags"}}),t.intFreshdeskField=e(t.baseUrl+"integrations/freshdesk/fields/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"integrations/freshdesk/fields/describe"},clone:{method:"post",url:t.baseUrl+"integrations/freshdesk/fields/:id/clone",params:{includeAll:"@includeAll"}}}),t.network=e(t.baseUrl+"networks/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"networks/describe"},clone:{method:"post",url:t.baseUrl+"networks/:id/clone",params:{includeAll:"@includeAll"}}}),t.chatQueueReport=e(t.baseUrl+"chat/reports/queue/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/reports/queue/describe"},clone:{method:"post",url:t.baseUrl+"chat/reports/queue/:id/clone",params:{includeAll:"@includeAll"}}}),t.chatInternalMessage=e(t.baseUrl+"chat/internal/messages/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"chat/internal/messages/describe"},clone:{method:"post",url:t.baseUrl+"chat/internal/messages/:id/clone",params:{includeAll:"@includeAll"}},getUsers:{isArray:!1,method:"get",url:t.baseUrl+"chat/internal/messages/users"}}),t.jscriptyAnswerReport=e(t.baseUrl+"jscripty/answers/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"jscripty/answers/reports/describe"},clone:{method:"post",url:t.baseUrl+"jscripty/answers/reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.jscriptyQuestionReport=e(t.baseUrl+"jscripty/questions/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"jscripty/questions/reports/describe"},clone:{method:"post",url:t.baseUrl+"jscripty/questions/reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.jscriptySessionReport=e(t.baseUrl+"jscripty/sessions/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"jscripty/sessions/reports/describe"},clone:{method:"post",url:t.baseUrl+"jscripty/sessions/reports/:id/clone",params:{includeAll:"@includeAll"}},getQuestions:{isArray:!1,method:"get",url:t.baseUrl+"jscripty/sessions/reports/:id/questions"}}),t.smsQueueReport=e(t.baseUrl+"sms/reports/queue/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"sms/reports/queue/describe"},clone:{method:"post",url:t.baseUrl+"sms/reports/queue/:id/clone",params:{includeAll:"@includeAll"}}}),t.squareReport=e(t.baseUrl+"square/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"square/reports/describe"},clone:{method:"post",url:t.baseUrl+"square/reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.squareReportDetail=e(t.baseUrl+"square/details/reports/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"square/details/reports/describe"},clone:{method:"post",url:t.baseUrl+"square/details/reports/:id/clone",params:{includeAll:"@includeAll"}}}),t.jscriptyProject=e(t.baseUrl+"jscripty/projects/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"jscripty/projects/describe"},clone:{method:"post",url:t.baseUrl+"jscripty/projects/:id/clone",params:{includeAll:"@includeAll"}},getSessions:{isArray:!1,method:"get",url:t.baseUrl+"jscripty/projects/:id/sessions"},getAnswers:{isArray:!1,method:"get",url:t.baseUrl+"jscripty/projects/:id/answers"},getSummary:{isArray:!1,method:"get",url:t.baseUrl+"jscripty/projects/:id/summary"}}),t.setting=e(t.baseUrl+"settings/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"settings/describe"},clone:{method:"post",url:t.baseUrl+"settings/:id/clone",params:{includeAll:"@includeAll"}},addLogo:{isArray:!1,method:"post",url:t.baseUrl+"settings/:id/logo"},addLogoLogin:{isArray:!1,method:"post",url:t.baseUrl+"settings/:id/logo_login"},getLogo:{isArray:!1,method:"get",url:t.baseUrl+"settings/:id/logo"},getLogoLogin:{isArray:!1,method:"get",url:t.baseUrl+"settings/:id/logo_login"},gdpr:{isArray:!1,method:"get",url:t.baseUrl+"settings/:id/gdpr"}}),t.squareOdbc=e(t.baseUrl+"square/odbc/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"square/odbc/describe"},clone:{method:"post",url:t.baseUrl+"square/odbc/:id/clone",params:{includeAll:"@includeAll"}},test:{isArray:!1,method:"get",url:t.baseUrl+"square/odbc/:id/test"}}),t.squareProject=e(t.baseUrl+"square/projects/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"square/projects/describe"},clone:{method:"post",url:t.baseUrl+"square/projects/:id/clone",params:{includeAll:"@includeAll"}}}),t.squareRecording=e(t.baseUrl+"square/recordings/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"square/recordings/describe"},clone:{method:"post",url:t.baseUrl+"square/recordings/:id/clone",params:{includeAll:"@includeAll"}},download:{isArray:!1,method:"get",url:t.baseUrl+"square/recordings/:id/download",responseType:"arraybuffer",cache:!1,transformResponse:function(e,t){var n=t();return{type:n["content-type"],length:n["content-length"],buffer:e}}}}),t.team=e(t.baseUrl+"teams/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"teams/describe"},clone:{method:"post",url:t.baseUrl+"teams/:id/clone",params:{includeAll:"@includeAll"}},getQueues:{isArray:!0,method:"get",url:t.baseUrl+"teams/:id/queues"},addQueues:{isArray:!0,method:"post",url:t.baseUrl+"teams/:id/queues"},removeQueues:{isArray:!1,method:"delete",url:t.baseUrl+"teams/:id/queues"},addAgents:{isArray:!0,method:"post",url:t.baseUrl+"teams/:id/users"},removeAgents:{isArray:!1,method:"delete",url:t.baseUrl+"teams/:id/users"},getAgents:{isArray:!1,method:"get",url:t.baseUrl+"teams/:id/users"}}),t.license=e(t.baseUrl+"license/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"license/describe"},clone:{method:"post",url:t.baseUrl+"license/:id/clone",params:{includeAll:"@includeAll"}}}),t.campaign=e(t.baseUrl+"campaigns/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"campaigns/describe"},clone:{method:"post",url:t.baseUrl+"campaigns/:id/clone",params:{includeAll:"@includeAll"}},getHoppers:{isArray:!1,method:"get",url:t.baseUrl+"campaigns/:id/hoppers"},getHopperHistories:{isArray:!1,method:"get",url:t.baseUrl+"campaigns/:id/hopper_histories"},getHopperFinals:{isArray:!1,method:"get",url:t.baseUrl+"campaigns/:id/hopper_finals"},getHopperBlacks:{isArray:!1,method:"get",url:t.baseUrl+"campaigns/:id/hopper_black"},getLists:{isArray:!1,method:"get",url:t.baseUrl+"campaigns/:id/lists"},addLists:{isArray:!0,method:"post",url:t.baseUrl+"campaigns/:id/lists"},removeLists:{isArray:!0,method:"delete",url:t.baseUrl+"campaigns/:id/lists"},getBlackLists:{isArray:!1,method:"get",url:t.baseUrl+"campaigns/:id/blacklists"},addBlackLists:{isArray:!0,method:"post",url:t.baseUrl+"campaigns/:id/blacklists"},removeBlackLists:{isArray:!0,method:"delete",url:t.baseUrl+"campaigns/:id/blacklists"}}),t.migration=e(t.baseUrl+"migrations/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"migrations/describe"},clone:{method:"post",url:t.baseUrl+"migrations/:id/clone",params:{includeAll:"@includeAll"}}}),t.attachment=e(t.baseUrl+"attachments/:id",{id:"@id"},{update:{method:"put"},describe:{method:"get",url:t.baseUrl+"attachments/describe"},clone:{method:"post",url:t.baseUrl+"attachments/:id/clone",params:{includeAll:"@includeAll"}},download:{isArray:!1,method:"get",url:t.baseUrl+"attachments/:id/download",responseType:"arraybuffer",cache:!1,transformResponse:function(e,t){var n=t();return{type:n["content-type"],length:n["content-length"],buffer:e}}}}),t}e.$inject=["$resource"],angular.module("motion").factory("api",e)}(),function(){"use strict";function e(e,t){t.setConfig({position:"top-right",sound:!1,html:!0,theme:"material"}),e.useLoader("$translatePartialLoader",{urlTemplate:"{part}/i18n/{lang}.json"}),e.preferredLanguage("en"),e.useSanitizeValueStrategy(null)}e.$inject=["$translateProvider","toastyConfigProvider"],angular.module("motion").config(e)}(),function(){"use strict";angular.module("motion")}(),function(){"use strict";function e(e,t,n){this.themes=e.themes;var a=n.get("motion.language");a&&t.use(a)}e.$inject=["motionTheming","$translate","$cookies"],angular.module("motion").controller("IndexController",e)}(),function(){"use strict";function e(a,i){return function(e){var t=new Date,n=new Date(e);return n.getDate()===t.getDate()&&n.getMonth()===t.getMonth()&&n.getFullYear()===t.getFullYear()?a("date")(n.getTime(),"shortTime"):n.getDate()===t.getDate()-1&&n.getMonth()===t.getMonth()&&n.getFullYear()===t.getFullYear()?i.instant("DASHBOARDS.YESTERDAY")+" "+a("date")(n.getTime(),"shortTime"):a("date")(n.getTime(),"MMM d, y h:mm a")}}function t(e){return{Today:e.instant("DASHBOARDS.TODAY"),Yesterday:e.instant("DASHBOARDS.YESTERDAY"),"This Week":e.instant("DASHBOARDS.THIS_WEEK"),"Last Week":e.instant("DASHBOARDS.LAST_WEEK"),"This Month":e.instant("DASHBOARDS.THIS_MONTH"),"Last Month":e.instant("DASHBOARDS.LAST_MONTH"),"This Year":e.instant("DASHBOARDS.THIS_YEAR"),"Last Year":e.instant("DASHBOARDS.LAST_YEAR"),January:e.instant("DASHBOARDS.JANUARY"),February:e.instant("DASHBOARDS.FEBRUARY"),March:e.instant("DASHBOARDS.MARCH"),April:e.instant("DASHBOARDS.APRIL"),May:e.instant("DASHBOARDS.MAY"),June:e.instant("DASHBOARDS.JUNE"),July:e.instant("DASHBOARDS.JULY"),August:e.instant("DASHBOARDS.AUGUST"),September:e.instant("DASHBOARDS.SEPTEMBER"),October:e.instant("DASHBOARDS.OCTOBER"),November:e.instant("DASHBOARDS.NOVEMBER"),December:e.instant("DASHBOARDS.DECEMBER"),Mon:e.instant("DASHBOARDS.MON"),Tue:e.instant("DASHBOARDS.TUE"),Wed:e.instant("DASHBOARDS.WED"),Thu:e.instant("DASHBOARDS.THU"),Fri:e.instant("DASHBOARDS.FRI"),Sat:e.instant("DASHBOARDS.SAT"),Sun:e.instant("DASHBOARDS.SUN")}}e.$inject=["$filter","$translate"],t.$inject=["$translate"],angular.module("motion").filter("limitObjectFromTo",function(){return function(e,t,n){var a,i={},o=0;for(a in e)if(n<=o&&(i[a]=e[a]),++o===n+t)break;return i}}).filter("formatdate",e).factory("IndexFactory",function(){var e=[{value:"jan"},{value:"feb"},{value:"mar"},{value:"apr"},{value:"may"},{value:"jun"},{value:"jul"},{value:"aug"},{value:"sep"},{value:"oct"},{value:"nov"},{value:"dec"}],t=[{value:"1"},{value:"2"},{value:"3"},{value:"4"},{value:"5"},{value:"6"},{value:"7"},{value:"8"},{value:"9"},{value:"10"},{value:"11"},{value:"12"}],n=[{value:"mon"},{value:"tue"},{value:"wed"},{value:"thu"},{value:"fri"},{value:"sat"},{value:"sun"}],a=[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];return{getMonthName:function(){return e},getMonthNumber:function(){return t},getDaysOfWeek:function(){return n},getDaysOfMonth:function(){return a}}}).factory("dateFilterLocalizationFactory",t).factory("Sequence",function(){return{enqueue:function(e){this.tail=this.tail?this.tail.finally(e):e()}}})}(),function(){"use strict";function e(e,t,n){var a;n.html5Mode(!0),t.otherwise("/dashboards/general"),angular.injector(["ngCookies"]).invoke(["$cookies",function(e){a=e}]);var i=a.get("motion.layoutStyle")||"verticalNavigation",o={verticalNavigation:{main:"app/core/layouts/vertical-navigation.html",toolbar:"app/toolbar/layouts/vertical-navigation/toolbar.html",navigation:"app/navigation/layouts/vertical-navigation/navigation.html",header:"app/header/layouts/vertical-navigation/header.html",footer:"app/footer/layouts/vertical-navigation/footer.html"},verticalNavigationFullwidthToolbar:{main:"app/core/layouts/vertical-navigation-fullwidth-toolbar.html",toolbar:"app/toolbar/layouts/vertical-navigation-fullwidth-toolbar/toolbar.html",navigation:"app/navigation/layouts/vertical-navigation/navigation.html"},verticalNavigationFullwidthToolbar2:{main:"app/core/layouts/vertical-navigation-fullwidth-toolbar-2.html",toolbar:"app/toolbar/layouts/vertical-navigation-fullwidth-toolbar-2/toolbar.html",navigation:"app/navigation/layouts/vertical-navigation-fullwidth-toolbar-2/navigation.html"},horizontalNavigation:{main:"app/core/layouts/horizontal-navigation.html",toolbar:"app/toolbar/layouts/horizontal-navigation/toolbar.html",navigation:"app/navigation/layouts/horizontal-navigation/navigation.html"},contentOnly:{main:"app/core/layouts/content-only.html",toolbar:"",navigation:""},contentWithToolbar:{main:"app/core/layouts/content-with-toolbar.html",toolbar:"app/toolbar/layouts/content-with-toolbar/toolbar.html",navigation:""}};e.state("app",{abstract:!0,views:{"main@":{templateUrl:o[i].main,controller:"MainController as vm"},"toolbar@app":{templateUrl:o[i].toolbar,controller:"ToolbarController as vm"},"navigation@app":{templateUrl:o[i].navigation,controller:"NavigationController as vm"},"quickPanel@app":{templateUrl:"app/quick-panel/quick-panel.html",controller:"QuickPanelController as vm"},"header@app":{templateUrl:o[i].header,controller:"HeaderController as vm"},"footer@app":{templateUrl:o[i].footer,controller:"FooterController as vm"}},resolve:{license:["apiResolver",function(e){return e.resolve("license@get")}],setting:["apiResolver",function(e){return e.resolve("setting@get",{id:1})}]}})}e.$inject=["$stateProvider","$urlRouterProvider","$locationProvider"],angular.module("motion").config(e)}(),function(){"use strict";function e(e,t,n){var a=e.$on("$stateChangeStart",function(){e.loadingProgress=!0}),i=e.$on("$stateChangeSuccess",function(){t(function(){e.loadingProgress=!1})});e.state=n,e.$on("$destroy",function(){a(),i()})}e.$inject=["$rootScope","$timeout","$state"],angular.module("motion").run(e)}(),function(){"use strict";function e(a,e){var i;function o(){i=io({query:"id="+e.getCurrentUser().id,transports:["websocket","polling"]})}return{connect:o,on:function(e,t){t=t||angular.noop,i||o(),i.on(e,function(){var e=arguments;a.$apply(function(){t.apply(i,e)})})},onWithoutApply:function(e,t){t=t||angular.noop,i||o(),i.on(e,function(){t.apply(i,arguments)})},emit:function(e,t,n){n=n||angular.noop,i||o(),i.emit(e,t,function(){var e=arguments;a.$apply(function(){n.apply(i,e)})})},removeAllListeners:function(e){i||o(),i.removeAllListeners(e)},removeListener:function(e,t){i||o(),i.removeListener(e,t)},disconnect:function(){i||o(),i.disconnect()}}}e.$inject=["$rootScope","Auth"],angular.module("motion").factory("socket",e)}(),function(){"use strict";function e(t,n,e,a,i,o){var s=this;s.progresslogin=!1,s.login=function(){return s.progresslogin=!0,o.login(s.form).then(function(){return t.go("app.dashboards.general")}).catch(function(e){s.message=e.message}).finally(function(){s.progresslogin=!1})},s.loginOauth=function(e){n.location.href="/api/auth/"+e},s.onInit=function(){{if(t.params.token&&t.params.userId)return o.removeCookies(),s.progresslogin=!0,e.put("motion.token",t.params.token),i.user.get({id:t.params.userId}).$promise.then(function(e){e&&(o.updateCurrentUser(e),t.go("app.dashboards.general"))}).finally(function(){s.progresslogin=!1});o.isLoggedIn()&&t.go("app.dashboards.general")}},s.onInit()}e.$inject=["$state","$window","$cookies","$timeout","api","Auth"],angular.module("app.login").controller("LoginController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="ANALYTICS.EDIT_EXTRACTEDREPORT",m.extractedReport=angular.copy(s),m.extractedReports=o,m.newExtractedReport=!1,m.extractedReport||(m.extractedReport={},m.title="ANALYTICS.NEW_EXTRACTEDREPORT",m.newExtractedReport=!0),m.addNewExtractedReport=function(){m.errors=[],r.analyticExtractedReport.save(m.extractedReport).$promise.then(function(e){m.extractedReports.unshift(e.toJSON()),i.success({title:"ExtractedReport properly created",msg:m.extractedReport.name?m.extractedReport.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.analyticExtractedReport.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.analyticExtractedReport.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveExtractedReport=function(){m.errors=[],r.analyticExtractedReport.update({id:m.extractedReport.id},m.extractedReport).$promise.then(function(e){var t=_.find(m.extractedReports,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"ExtractedReport properly saved!",msg:m.extractedReport.name?m.extractedReport.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.analyticExtractedReport.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.analyticExtractedReport.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteExtractedReport=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The extractedReport will be deleted.").ariaLabel("Delete ExtractedReport").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.analyticExtractedReport.delete({id:m.extractedReport.id}).$promise.then(function(){_.remove(m.extractedReports,{id:m.extractedReport.id}),i.success({title:"ExtractedReport properly deleted!",msg:(m.extractedReport.name||"extractedReport")+" has been deleted!"}),u(m.extractedReport)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.analyticExtractedReport.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.analyticExtractedReport.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","extractedReports","extractedReport","api","Auth","license","setting"],angular.module("app.analytics").controller("CreateOrEditExtractedReportDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.extractedReports=r||{count:0,rows:[]},v.table="extractedReports",v.listOrder="",v.listOrderAsc=null,v.selectedExtractedReports=[],v.query={fields:"createdAt,updatedAt,id,name,basename,savename,type,startDate,endDate,createdAt,status,output",sort:"-updatedAt",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditExtractedReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/extractedReports/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{extractedReport:e,extractedReports:v.extractedReports.rows,license:v.license,setting:null}})},v.downloadfile2=function(o,e){return l.analyticExtractedReport.download({id:o.id}).$promise.then(function(e){var t=[e.buffer],n="download",a=new Blob(t,{type:e.type});n=o.savename;var i=window.document.createElement("a");i.setAttribute("href",URL.createObjectURL(a)),i.setAttribute("download",n),i.click()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.analyticExtractedReport.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the extractedReport?").htmlContent("<b>"+(e.name||"extractedReport")+"</b> will be deleted.").ariaLabel("delete extractedReport").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getExtractedReports=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.analyticExtractedReport.get(v.query,f).$promise},v.createOrEditExtractedReport=function(e,t){i.show({controller:"CreateOrEditExtractedReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/extractedReports/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{extractedReport:t,extractedReports:v.extractedReports.rows,license:v.license,setting:v.setting}})},v.deleteExtractedReport=A,v.exportSelectedExtractedReports=function(){var e=angular.copy(v.selectedExtractedReports);return v.selectedExtractedReports=[],e},v.deleteSelectedExtractedReports=function(e){var t=i.confirm().title("Are you sure want to delete the selected extractedReports?").htmlContent("<b>"+v.selectedExtractedReports.length+" selected</b> will be deleted.").ariaLabel("delete ExtractedReports").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedExtractedReports.forEach(function(e){A(e)}),v.selectedExtractedReports=[]})},v.deselectExtractedReports=function(){v.selectedExtractedReports=[]},v.selectAllExtractedReports=function(){v.selectedExtractedReports=v.extractedReports.rows};var h=!0,b=1;function f(e){v.extractedReports=e||{count:0,rows:[]}}function A(e){l.analyticExtractedReport.delete({id:e.id}).$promise.then(function(){_.remove(v.extractedReports.rows,{id:e.id}),v.extractedReports.count-=1,v.extractedReports.rows.length||v.getExtractedReports(),c.success({title:"ExtractedReport deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEanalyticExtractedReport"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEanalyticExtractedReport",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getExtractedReports())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","extractedReports","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.analytics").controller("ExtractedReportsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="ANALYTICS.EDIT_METRIC",m.metric=angular.copy(s),m.metrics=o,m.newMetric=!1,m.metric||(m.metric={table:"report_agent"},m.title="ANALYTICS.NEW_METRIC",m.newMetric=!0),m.addNewMetric=function(){m.errors=[],r.analyticMetric.save(m.metric).$promise.then(function(e){m.metrics.unshift(e.toJSON()),i.success({title:"Metric properly created",msg:m.metric.name?m.metric.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.analyticMetric.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.analyticMetric.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveMetric=function(){m.errors=[],r.analyticMetric.update({id:m.metric.id},m.metric).$promise.then(function(e){var t=_.find(m.metrics,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Metric properly saved!",msg:m.metric.name?m.metric.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.analyticMetric.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.analyticMetric.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteMetric=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The metric will be deleted.").ariaLabel("Delete Metric").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.analyticMetric.delete({id:m.metric.id}).$promise.then(function(){_.remove(m.metrics,{id:m.metric.id}),i.success({title:"Metric properly deleted!",msg:(m.metric.name||"metric")+" has been deleted!"}),u(m.metric)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.analyticMetric.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.analyticMetric.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","metrics","metric","api","Auth","license","setting"],angular.module("app.analytics").controller("CreateOrEditMetricDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.metrics=r||{count:0,rows:[]},v.table="metrics",v.listOrder="",v.listOrderAsc=null,v.selectedMetrics=[],v.query={fields:"createdAt,updatedAt,id,name,table,metric,description",sort:"-updatedAt",limit:10,page:1},v.arraytable=_.keyBy([{option:"Agent Report",value:"'report_agent'"},{option:"Call Report",value:"'report_call'"},{option:"Contacts",value:"'cm_contacts'"},{option:"CSquare Report",value:"'report_square'"},{option:"CSquare Details Report",value:"'report_square_details'"},{option:"Dialer Hopper Processing",value:"'cm_hopper'"},{option:"Dialer Hopper Logs",value:"'cm_hopper_history'"},{option:"Dialer Hopper Final",value:"'cm_hopper_final'"},{option:"Integration Report",value:"'report_integration'"},{option:"Jscripty Sessions",value:"'report_jscripty_sessions'"},{option:"Jscripty Questions",value:"'report_jscripty_questions'"},{option:"Jscripty Answers",value:"'report_jscripty_answers'"},{option:"Member Report",value:"'report_member'"},{option:"Queue Report",value:"'report_queue'"},{option:"Users",value:"'users'"},{option:"Voice Recordings",value:"'voice_recordings'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editdialog=function(e,t){i.show({controller:"CreateOrEditMetricDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/metrics/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{metric:e,metrics:v.metrics.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the metric?").htmlContent("<b>"+(e.name||"metric")+"</b> will be deleted.").ariaLabel("delete metric").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getMetrics=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.analyticMetric.get(v.query,f).$promise},v.createOrEditMetric=function(e,t){i.show({controller:"CreateOrEditMetricDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/metrics/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{metric:t,metrics:v.metrics.rows,license:v.license,setting:v.setting}})},v.deleteMetric=A,v.exportSelectedMetrics=function(){var e=angular.copy(v.selectedMetrics);return v.selectedMetrics=[],e},v.deleteSelectedMetrics=function(e){var t=i.confirm().title("Are you sure want to delete the selected metrics?").htmlContent("<b>"+v.selectedMetrics.length+" selected</b> will be deleted.").ariaLabel("delete Metrics").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedMetrics.forEach(function(e){A(e)}),v.selectedMetrics=[]})},v.deselectMetrics=function(){v.selectedMetrics=[]},v.selectAllMetrics=function(){v.selectedMetrics=v.metrics.rows};var h=!0,b=1;function f(e){v.metrics=e||{count:0,rows:[]}}function A(e){l.analyticMetric.delete({id:e.id}).$promise.then(function(){_.remove(v.metrics.rows,{id:e.id}),v.metrics.count-=1,v.metrics.rows.length||v.getMetrics(),c.success({title:"Metric deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEanalyticMetric"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEanalyticMetric",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getMetrics())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","metrics","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.analytics").controller("MetricsController",e)}(),function(){"use strict";function e(e,t,a,n,i,o,s){var r=this;function l(){t.hide()}r.errors=[],r.report=angular.copy(n),r.report.name+="-copy",r.treeCustomData=s,r.treeCustomConfig={core:{multiple:!1,animation:!0,error:function(e){console.error("treeCtrl: error from js tree - "+angular.toJson(e))},check_callback:!0,worker:!0},version:1,plugins:["wholerow"]},r.treeCustomEvents={select_node:function(e,t){r.currentNode=t.node}},r.copyReport=function(){var n;r.errors=[],i.analyticCustomReport.save({name:r.report.name,description:r.report.description,table:r.report.table,conditions:r.report.conditions,joins:r.report.joins,parent:r.currentNode.id}).$promise.then(function(e){n=e,a.success({title:"Report properly copied!",msg:r.report.name?r.report.name+" has been copied!":""});var t={fields:"field,alias,function,format,groupBy,orderBy,custom,MetricId",nolimit:!0};return t["analyticCustomReport"===o?"CustomReportId":"DefaultReportId"]=r.report.id,i.analyticFieldReport.get(t).$promise}).then(function(e){var e=_.map(e.rows,function(e){return _.extend({},e,{CustomReportId:n.id})});return i.analyticFieldReport.bulkCreate(e).$promise}).then(function(){a.success({title:"Fields copied!",msg:"Fields has been copied!"}),l()}).catch(function(e){a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:COPYREPORT",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},r.closeDialog=l}e.$inject=["$location","$mdDialog","toasty","report","api","apiName","treeCustomData"],angular.module("app.analytics").controller("CopyReportDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l){var d=this;function c(){t.hide()}d.errors=[],d.joinTables=[],d.title="ANALYTICS.EDIT_REPORT",d.report=angular.copy(i),d.reports=a,d.newReport=!1,d.tables=l.getMap(),d.joinTypes=[{key:"join",value:"Join"},{key:"left_join",value:"Left Join"},{key:"right_join",value:"Right Join"},{key:"outer_join",value:"Outer Join"},{key:"cross_join",value:"Cross Join"}],d.report||(d.report={name:"",table:"report_agent",description:"",parent:r.id},d.title="ANALYTICS.NEW_REPORT",d.newReport=!0),d.addNewReport=function(){d.errors=[],d.report.joins=_.map(d.joinTables||[],function(e){return{parentKey:e.parentKey,foreignTable:e.name,foreignKey:e.foreignKey,type:e.type.toLowerCase()}}),d.report.joins=JSON.stringify(d.report.joins),o[s].save(d.report).$promise.then(function(e){d.reports.unshift(e),n.success({title:"Report properly created",msg:d.report.name?d.report.name+" has been created!":""}),c()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){d.errors=e.data.errors||[{message:e.toString(),type:"api.analyticReport.save"}];for(var t=0;t<e.data.errors.length;t++)n.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.analyticReport.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},d.saveReport=function(){d.errors=[],o[s].update({id:d.report.id},d.report).$promise.then(function(e){var t=_.find(d.reports,{id:e.id});t&&_.merge(t,e),n.success({title:"Report properly saved!",msg:d.report.name?d.report.name+" has been saved!":""}),c()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){d.errors=e.data.errors||[{message:e.toString(),type:"api.analyticReport.update"}];for(var t=0;t<e.data.errors.length;t++)n.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.analyticReport.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},d.deleteReport=function(){d.errors=[];var e=t.confirm().title("Are you sure?").content("The report will be deleted.").ariaLabel("Delete Report").ok("Delete").cancel("Cancel").targetEvent(event);t.show(e).then(function(){o[s].delete({id:d.report.id}).$promise.then(function(){_.remove(d.reports,{id:d.report.id}),n.success({title:"Report properly deleted!",msg:d.report.name?d.report.name+" has been deleted!":""}),c()}).catch(function(e){d.errors=e.data.errors||[{message:e.toString(),type:"api.analyticReport.delete"}]})},function(){})},d.closeDialog=c,d.selectedTableChange=function(e){e&&(delete d.selectedItem,d.joinTables.push(e))},d.removeJoin=function(e){d.joinTables.splice(e,1)},d.getFields=function(t,n,e){var a=_.find(d.tables,{name:e});a&&a.api&&o[a.api].describe().$promise.then(function(e){t[n]=_.difference(_.keys(e),["$promise","$resolved"])}).catch(function(e){console.error(e)})}}e.$inject=["$location","$mdDialog","toasty","reports","report","api","apiName","currentNode","describeTable"],angular.module("app.analytics").controller("CreateOrEditReportDialogController",e)}(),function(){"use strict";function e(i,a,o,e){var s=this;s.report={},s.conditions=e.getConditions,s.init=function(e){s.report=e,s.report.condition=angular.fromJson(e.conditions)||{group:{operator:"AND",rules:[]}};for(var t=0;t<s.report.condition.group.rules.length;t++)if(s.report.condition.group.rules[t].field){var n=s.report.condition.group.rules[t].field.split(".");1===n.length&&(s.report.condition.group.rules[t].field=s.report.table+"."+s.report.condition.group.rules[t].field)}a.getColumns(s.report.table).then(function(e){s.columns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt"])}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DESCRIBE",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.addCondition=function(e){e.unshift({condition:"=",field:"",value:""})},s.addGroup=function(e){e.push({group:{operator:"AND",rules:[]}})},s.deleteConfirm=function(e,t,n){var a=i.confirm().title("Are you sure want to delete the item?").htmlContent("The item will be deleted.").ariaLabel("delete item").targetEvent(n).ok("OK").cancel("CANCEL");i.show(a).then(function(){e.splice(t,1)},function(){console.log("CANCEL")})},s.isValueByCondition=function(e){return!_.includes(["IS NULL","IS NOT NULL","IS EMPTY","IS NOT EMPTY"],e)}}e.$inject=["$mdDialog","describeTable","toasty","sqlUtil"],angular.module("app.analytics").controller("ReportConditionsController",e)}(),function(){"use strict";function e(t){var a={cm_contacts:"cmContact",cm_hopper:"cmHopper",cm_hopper_final:"cmHopperFinal",cm_hopper_history:"cmHopperHistory",chat_websites:"chatWebsite",chat_queues:"chatQueue",chat_interactions:"chatInteraction",chat_messages:"chatMessage",chat_offline_messages:"chatOfflineMessage",report_chat_queue:"chatQueueReport",mail_accounts:"mailAccount",mail_queues:"mailQueue",mail_interactions:"mailInteraction",mail_messages:"mailMessage",report_mail_queue:"mailQueueReport",openchannel_accounts:"openchannelAccount",openchannel_queues:"openchannelQueue",openchannel_interactions:"openchannelInteraction",openchannel_messages:"openchannelMessage",report_openchannel_queue:"openchannelQueueReport",sms_accounts:"smsAccount",sms_queues:"smsQueue",sms_interactions:"smsInteraction",sms_messages:"smsMessage",report_sms_queue:"smsQueueReport",fax_accounts:"faxAccount",fax_queues:"faxQueue",fax_interactions:"faxInteraction",fax_messages:"faxMessage",report_fax_queue:"faxQueueReport",report_call:"voiceCallReport",report_agent:"voiceAgentReport",report_square:"squareReport",report_member:"memberReport",report_queue:"voiceQueueReport",report_square_details:"squareReportDetail",report_jscripty_sessions:"jscriptySessionReport",report_jscripty_questions:"jscriptyQuestionReport",report_jscripty_answers:"jscriptyAnswerReport",users:"user",voice_recordings:"voiceRecording"};return{getMap:function(){var n=[];return _.forIn(a,function(e,t){n.push({name:t,api:e})}),n},getColumns:function(e){return t[a[e]].describe().$promise}}}e.$inject=["api"],angular.module("app.analytics").factory("describeTable",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;(m.errors=[],m.title="Edit Report Field",m.report=i,m.reportField=angular.copy(s),m.reportFields=o,m.metrics=r,m.columns=l,m.sqlUtil=d,m.newReportField=!1,m.reportField)?(m.reportField.type=m.reportField.custom?"custom":m.reportField.MetricId?"metric":"column",m.reportField.field&&!m.reportField.custom&&_.isNil(m.reportField.MetricId)&&1===m.reportField.field.split(".").length&&(m.reportField.field=m.report.table+"."+m.reportField.field)):(m.reportField={type:"column",function:null,format:null,groupBy:!1,orderBy:null},m.title="New Report Field",m.newReportField=!0);function u(){n.hide()}m.addNewReportField=function(){m.errors=[],m.reportField.custom="custom"===m.reportField.type,m.reportField.MetricId="metric"===m.reportField.type?m.reportField.MetricId:null,m.reportField.CustomReportId=m.report.id,c.analyticFieldReport.save(m.reportField).$promise.then(function(e){m.reportFields.push(e),a.success({title:"Report field properly created",msg:m.reportField.field?m.reportField.field+" has been created!":m.reportField.type+" has been created!"}),u()}).catch(function(e){m.errors=e.data.errors||[{message:e.toString(),type:"api.analyticFieldReport.save"}]})},m.saveReportField=function(){m.errors=[],m.reportField.custom="custom"===m.reportField.type,m.reportField.MetricId="metric"===m.reportField.type?m.reportField.MetricId:null,c.analyticFieldReport.update({id:m.reportField.id},m.reportField).$promise.then(function(e){var t=_.find(m.reportFields,{id:e.id});t&&_.merge(t,e),a.success({title:"Report Field properly saved!",msg:m.reportField.field?m.reportField.field+" has been saved!":""}),u()}).catch(function(e){m.errors=e.data.errors||[{message:e.toString(),type:"api.analyticFieldReport.update"}]})},m.deleteReportField=function(e){m.errors=[];var t=n.confirm().title("Are you sure?").content("The field will be deleted.").ariaLabel("Delete Report").ok("Delete").cancel("Cancel").targetEvent(e);n.show(t).then(function(){c.analyticFieldReport.delete({id:m.reportField.id}).$promise.then(function(){_.remove(m.reportFields,{id:m.reportField.id}),a.success({title:"Report Field properly deleted!",msg:m.reportField.field?m.reportField.field+" has been deleted!":""}),u()}).catch(function(e){m.errors=e.data.errors||[{message:e.toString(),type:"api.analyticReportField.delete"}]})},function(){})},m.closeDialog=u}e.$inject=["$scope","$location","$mdDialog","toasty","report","reportFields","reportField","metrics","columns","sqlUtil","api"],angular.module("app.analytics").controller("CreateOrEditReportFieldDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.report={},c.reportFields={count:0,rows:[]},c.functions=_.keyBy(l.getFunctions,"value"),c.formats=_.keyBy(l.getFormats,"value"),c.groupBy=_.keyBy(l.getGroupBy,"value"),c.orderBy=_.keyBy(l.getOrderBy,"value"),c.selectedReportFields=[],c.query={fields:"createdAt,updatedAt,id,field,alias,function,format,groupBy,orderBy,custom,MetricId",nolimit:!0},c.sortableTable={animation:100,onSort:function(e){s.analyticFieldReport.addFields({id:c.report.id},e.models).$promise.then(function(e){c.reportFields.rows=e}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:ADDFIELDS"})})}},c.init=function(e){c.report=e,c.query.CustomReportId=c.report.id,r.getColumns(c.report.table).then(function(e){return c.columns=_.difference(_.keys(e),["$promise","$resolved"]),s.analyticMetric.get({fields:"id,name,metric,table",nolimit:!0}).$promise}).then(function(e){c.metrics=e.rows}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DESCRIBE",msg:e.data?JSON.stringify(e.data):e.toString()})}),c.getReportFields()},c.deleteConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the field?").htmlContent("<b>"+e.field+"</b> will be deleted.").ariaLabel("delete field").targetEvent(t).ok("OK").cancel("CANCEL");a.show(n).then(function(){p(e)},function(){console.log("CANCEL")})},c.success=u,c.getReportFields=function(){c.promise=s.analyticFieldReport.get(c.query,u).$promise},c.createOrEditReportField=function(e,t){a.show({controller:"CreateOrEditReportFieldDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/edit/field/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{report:c.report,reportField:t,reportFields:c.reportFields.rows,metrics:c.metrics,columns:c.columns,setting:null}})},c.deleteReportField=p,c.deleteSelectedReportFields=function(e){var t=a.confirm().title("Are you sure want to delete the selected fields?").htmlContent("<b>"+c.selectedReportFields.length+" selected</b> will be deleted.").ariaLabel("delete fields").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){c.selectedReportFields.forEach(function(e){p(e)}),c.selectedReportFields=[]})},c.getMetricName=function(e){var t=_.find(c.metrics,{id:e});return t?t.name:d.instant("ANALYTICS.NO_METRIC_FOUND")},c.getMetricValue=function(e){var t=_.find(c.metrics,{id:e});return t?t.metric:d.instant("ANALYTICS.NO_METRIC_FOUND")};var m=!0;function u(e){c.reportFields=e||{count:0,rows:[]}}function p(e){s.analyticFieldReport.delete({id:e.id}).$promise.then(function(){c.selectedReportFields=[],_.remove(c.reportFields.rows,{id:e.id}),c.reportFields.count-=1,c.reportFields.rows.length||c.getReportFields(),o.success({title:"Field deleted!",msg:e.field?e.field+" has been deleted!":""})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}t.$watch("vm_rf.query.filter",function(e,t){m?n(function(){m=!1}):c.getReportFields()})}e.$inject=["$cookies","$scope","$timeout","$mdDialog","$document","toasty","api","describeTable","sqlUtil","$translate"],angular.module("app.analytics").controller("ReportFieldsController",e)}(),function(){"use strict";angular.module("app.analytics").factory("sqlUtil",function(){return{getFunctions:[{value:"SUM",option:function(e){return"SUM ("+e+")"}},{value:"COUNT",option:function(e){return"COUNT ("+e+")"}},{value:"COUNT DISTINCT",option:function(e){return"COUNT (DISTINCT "+e+")"}},{value:"MAX",option:function(e){return"MAX ("+e+")"}},{value:"MIN",option:function(e){return"MIN ("+e+")"}},{value:"AVG",option:function(e){return"AVG ("+e+")"}},{value:"GROUP_CONCAT",option:function(e){return"GROUP_CONCAT ("+e+")"}},{value:"GROUP_CONCAT ASC",option:function(e){return"GROUP_CONCAT ("+e+" ORDER BY "+e+" ASC)"}},{value:"GROUP_CONCAT DESC",option:function(e){return"GROUP_CONCAT ("+e+" ORDER BY "+e+" DESC)"}}],getFormats:[{value:"SEC_TO_TIME",option:function(e){return"SEC_TO_TIME ("+e+")"}},{value:"DATE",option:function(e){return"DATE ("+e+")"}},{value:"HOUR",option:function(e){return"HOUR ("+e+")"}},{value:"ROUND",option:function(e){return"ROUND ("+e+")"}},{value:"UNIX_TIMESTAMP",option:function(e){return"UNIX_TIMESTAMP ("+e+")"}}],getGroupBy:[{value:!1,option:function(){return"No"}},{value:!0,option:function(e){return"GROUP BY "+e}}],getOrderBy:[{value:"ASC",option:function(e){return"ORDER BY "+e+" ASC"}},{value:"DESC",option:function(e){return"ORDER BY "+e+" DESC"}}],getConditions:["=","!=","<","<=",">",">=","LIKE","NOT LIKE","IS NULL","IS NOT NULL","IS EMPTY","IS NOT EMPTY"]}})}(),function(){"use strict";function e(e,t,n,a){var i=this;function o(e){return _.isArray(e)}i.report=a||{},i.selectedTab=e.params.tab||0,i.gotoReports=function(){e.go("app.analytics.reports")},i.saveReport=function(){i.report.conditions=angular.toJson(i.report.condition),n.analyticCustomReport.update({id:i.report.id},_.omit(i.report,"joins")).$promise.then(function(){t.success({title:"Report updated!",msg:i.report.name?i.report.name+" has been updated!":""})}).catch(function(e){t.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETreport",msg:e.data?JSON.stringify(e.data):e.toString()})})},i.previewReport=function(){i.columns=[],i.rows=[],i.error=!1,n.analyticFieldReport.get({fields:"field,alias",nolimit:!0,CustomReportId:i.report.id}).$promise.then(function(e){return i.columns=e?e.rows:[],n.analyticCustomReport.preview({id:i.report.id}).$promise}).then(function(e){i.rows=e}).catch(function(e){console.log(e),i.error={title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:analyticFieldReport",msg:e.data?e.data.message:e.toString(),sql:e.data&&e.data.parent?e.data.parent.sql:"NO QUERY"},t.error(i.error)})},i.queryReport=function(){return i.queryResult="Loading...",n.analyticCustomReport.query({id:i.report.id}).$promise.then(function(e){i.queryResult=e.sql}).catch(function(e){i.queryResult="",console.log(e),i.error={title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:analyticFieldReport",msg:e.data?e.data.message:e.toString(),sql:e.data&&e.data.parent?e.data.parent.sql:"NO QUERY"},t.error(i.error)})},i.mapArray=function(e,t){if(o(e))return _.map(e,t).join(",");return""},i.isArray=o,i.valueReplacer=function(e,t){moment(t,"YYYY-MM-DDTHH:mm:ssZ",!0).isValid()&&(t=moment(t,"").format("YYYY-MM-DD HH:mm:ss"));return t}}e.$inject=["$state","toasty","api","report"],angular.module("app.analytics").controller("ReportController",e)}(),function(){"use strict";function e(e,t,n,a,i,o){var s=this;s.errors=[],s.report=angular.copy(a),s.valueReplacer=function(e,t){moment(t,"YYYY-MM-DDTHH:mm:ssZ",!0).isValid()&&(t=moment(t,"").format("YYYY-MM-DD HH:mm:ss"));return t},s.closeDialog=function(){t.hide()},function(){s.columns=[],s.rows=[],s.error=!1;var e={fields:"field,alias",nolimit:!0};e["analyticCustomReport"===o?"CustomReportId":"DefaultReportId"]=s.report.id,s.promise=i.analyticFieldReport.get(e).$promise.then(function(e){return s.columns=e?e.rows:[],i[o].preview({id:s.report.id}).$promise}).then(function(e){s.rows=e}).catch(function(e){console.log(e),s.error={title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:analyticFieldReport",msg:e.data?e.data.message:e.toString(),sql:e.data&&e.data.parent?e.data.parent.sql:"NO QUERY"},n.error(s.error)})}()}e.$inject=["$location","$mdDialog","toasty","report","api","apiName"],angular.module("app.analytics").controller("PreviewReportDialogController",e)}(),function(){"use strict";function e(e,n,a,i,o,s,t,r,l,d,c){var m=this;m.currentUser=c.getCurrentUser(),m.reports={count:0,rows:[]},m.selectedReports=[],m.query={fields:"createdAt,updatedAt,id,name,description,table,parent,conditions,joins",limit:10,page:1,sort:"-updatedAt"},m.apiName=null,m.currentPath="",m.customTree=!0,m.editstate=function(e,t){o.go("app.analytics.reports.edit",{id:e.id})},m.copydialog=function(e,t){i.show({controller:"CopyReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/copy/dialog.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{report:e,apiName:m.apiName,treeCustomData:m.treeCustomInstance.jstree(!0).get_json("#")}}).finally(function(){})},m.previewdialog=function(e,t){i.show({controller:"PreviewReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/preview/dialog.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{report:e,apiName:m.apiName}})},m.rundialog=function(e,t){i.show({controller:"RunReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/run/dialog.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{report:e,apiName:m.apiName,currentPath:m.currentPath}})},m.downloadfile=function(a,e){var i;r.analyticMetric.get({fields:"id,name,metric,table",nolimit:!0}).$promise.then(function(e){i=_.keyBy(e.rows,"id");var t={fields:"field,alias,function,format,groupBy,orderBy,custom,MetricId",nolimit:!0};return t["analyticCustomReport"===m.apiName?"CustomReportId":"DefaultReportId"]=a.id,r.analyticFieldReport.get(t).$promise}).then(function(e){for(var t=0;t<e.rows.length;t+=1)e.rows[t].MetricId&&(e.rows[t].field=i[e.rows[t].MetricId].metric,e.rows[t].custom=!0),delete e.rows[t].MetricId;var n=s.document.createElement("a");n.href="data:text/json;charset=utf-8,"+s.encodeURIComponent(angular.toJson({name:a.name,description:a.description,table:a.table,conditions:a.conditions,joins:a.joins,fields:e.rows})),n.download=a.name+".json",n.target="_self",n.click(),d.success({title:"Report downloaded!",msg:a.name?a.name+" has been downloaded!":""})}).catch(function(e){d.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DOWNLOADJSON",msg:e.data?JSON.stringify(e.data):e.toString()})})},m.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the report?").htmlContent("<b>"+e.name+"</b> will be deleted.").ariaLabel("delete report").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){h(e)},function(){console.log("CANCEL")})},m.success=g,m.getReports=v,m.createOrEditReport=function(e,t){i.show({controller:"CreateOrEditReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/create/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{report:t,reports:m.reports.rows,apiName:m.apiName,currentNode:m.currentNode,setting:null}})},m.importReport=function(e,t,n){if("application/json"===e.file.type){var a=new FileReader;a.onload=function(e){console.log(e.target.result);try{var n=atob(e.target.result.split(",")[1]);n=angular.fromJson(n),r.analyticCustomReport.save({name:n.name,description:n.description,table:n.table,conditions:n.conditions,joins:n.joins,parent:m.currentNode.id}).$promise.then(function(t){m.reports.rows.unshift(t),d.success({title:"Report saved!",msg:t.name?t.name+" has been saved!":""});var e=_.map(n.fields,function(e){return _.extend({},e,{CustomReportId:t.id})});return r.analyticFieldReport.bulkCreate(e).$promise}).then(function(e){d.success({title:"Fields saved!",msg:"Fields has been saved!"})}).catch(function(e){d.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETanalyticReport",msg:e.data?JSON.stringify(e.data):e.toString()})})}catch(e){console.error(e),d.error({title:"Decode File Error",msg:e.toString()})}},a.readAsDataURL(e.file)}else d.error({title:"Format Error",msg:"Please use only json files"})},m.deleteReport=h,m.exportSelectedReports=function(){var e=angular.copy(m.selectedReports);return m.selectedReports=[],e},m.deleteSelectedReports=function(e){var t=i.confirm().title("Are you sure want to delete the selected reports?").htmlContent("<b>"+m.selectedReports.length+" selected</b> will be deleted.").ariaLabel("delete Reports").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){m.selectedReports.forEach(function(e){h(e)}),m.selectedReports=[]})},m.deselectReports=function(){m.selectedReports=[]},m.selectAllReports=function(){m.selectedReports=m.reports.rows},m.treeDefaultData=l.rows[0]?angular.fromJson(l.rows[0].tree):[],m.treeCustomData=l.rows[1]?angular.fromJson(l.rows[1].tree):[],m.treeDefaultConfig=E(!1),m.treeCustomConfig=E(!0),m.treeDefaultEvents=y(!1),m.treeCustomEvents=y(!0);var u=!0,p=1;function g(e){m.reports=e||{count:0,rows:[]}}function v(){m.query.offset=(m.query.page-1)*m.query.limit,m.apiName&&(m.promise=r[m.apiName].get(m.query,g).$promise)}function h(e){m.apiName&&r[m.apiName].delete({id:e.id}).$promise.then(function(){_.remove(m.reports.rows,{id:e.id}),m.reports.count-=1,m.reports.rows.length||m.getReports(),d.success({title:"Report deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.analyticreport.delete"}];for(var t=0;t<e.data.errors.length;t++)d.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else d.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.analyticreport.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}function b(e,t){m.treeDefaultInstance.jstree(!0).deselect_all(),m.treeDefaultInstance.jstree(!0).close_all(),m.currentNode=t.node,m.currentNode.custom=!0,m.currentPath=m.treeCustomInstance.jstree(!0).get_path(m.currentNode).join("/ "),m.apiName="analyticCustomReport",m.query.parent=t.node.id,v()}function f(e,t){m.treeCustomInstance.jstree(!0).deselect_all(),m.treeCustomInstance.jstree(!0).close_all(),m.currentNode=t.node,m.currentNode.custom=!1,m.currentPath=m.treeDefaultInstance.jstree(!0).get_path(m.currentNode).join("/ "),m.apiName="analyticDefaultReport",m.query.parent=t.node.id,v()}function A(e,t){var n=angular.toJson(m.treeCustomInstance.jstree(!0).get_json("#"));r.analyticTreeReport.update({id:2,tree:n}).$promise.then(function(){l.rows[1]&&(l.rows[1].tree=n),d.success({title:"Node Updated",msg:t.node.text?t.node.text+" has been updated!":"Node has been updated!"})}).catch(function(e){d.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATEanalyticTreeReport",msg:e.data?JSON.stringify(e.data):e.toString()})})}function E(e){return{core:{multiple:!1,animation:!0,error:function(e){console.error("treeCtrl: error from js tree - "+angular.toJson(e))},check_callback:!0,worker:!0},version:1,plugins:e?["contextmenu","dnd","search","state","wholerow"]:["search","state","wholerow"],contextmenu:{items:function(n){return{create:{label:t.instant("ANALYTICS.CREATE"),action:function(){n=m.treeCustomInstance.jstree(!0).create_node(n),m.treeCustomInstance.jstree(!0).edit(n)}},rename:{_disabled:"#"===n.parent,label:t.instant("ANALYTICS.RENAME"),action:function(){m.treeCustomInstance.jstree(!0).edit(n)}},remove:{_disabled:"#"===n.parent||"admin"!==m.currentUser.role&&0!==m.currentUser.crudPermissions,label:t.instant("ANALYTICS.REMOVE"),action:function(){var e=i.confirm().title("Are you sure want to delete the node?").htmlContent("<b>"+(n.text?n.text:"Node")+"</b> and its subnode will be deleted.").ariaLabel("delete node").ok("OK").cancel("CANCEL");i.show(e).then(function(){var e,t=m.treeCustomInstance.jstree(!0).get_parent(n);t=m.treeCustomInstance.jstree(!0).get_node(t),m.treeCustomInstance.jstree(!0).delete_node(n),e=[n.id].concat(n.children_d||[]),r.analyticCustomReport.get({parent:e.join(","),fields:"id,name"}).$promise.then(function(e){e&&e.rows&&e.rows.forEach(function(e){h(e)})}).catch(function(e){d.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEreportsByParents",msg:e.data?JSON.stringify(e.data):e.toString()})}),m.treeCustomInstance.jstree(!0).select_node(t)})}}}}}}}function y(e){return e?{create_node:A,rename_node:A,move_node:A,delete_node:A,select_node:b}:{select_node:f}}e.$watch("vm.query.filter",function(e,t){u?n(function(){u=!1}):(t||(p=m.query.page),e!==t&&(m.query.page=1),e||(m.query.page=p),m.getReports())}),e.$watch("vm.search",function(e,t){m.treeDefaultInstance&&m.treeDefaultInstance.jstree(!0).search(e),m.treeCustomInstance&&m.treeCustomInstance.jstree(!0).search(e)})}e.$inject=["$scope","$timeout","$document","$mdDialog","$state","$window","$translate","api","treeReports","toasty","Auth"],angular.module("app.analytics").controller("ReportsController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r){var l=this;function d(){l.export={id:l.report.id,name:l.report.name,startDate:new Date(moment().startOf("day")),endDate:new Date(moment().endOf("day")),output:"xlsx",fullPath:r?r+"/"+l.report.name:l.report.name}}function c(){n.hide()}l.errors=[],l.report=angular.copy(t),l.export={},l.runReport=function(t){l.errors=[],l.exportDate=_.assign({},l.export,{startDate:moment(l.export.startDate).format("YYYY-MM-DD HH:mm:ss"),endDate:moment(l.export.endDate).format("YYYY-MM-DD HH:mm:ss")}),i[o].run(l.exportDate).$promise.then(function(e){"web"===l.export.output?n.show({controller:"WebReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/run/web/dialog.html",parent:angular.element(s.body),targetEvent:t,skipHide:!0,locals:{apiName:o,exportDate:l.exportDate,results:e},resolve:{columns:["apiResolver",function(e){var t={fields:"field,alias",nolimit:!0};return t["analyticCustomReport"===o?"CustomReportId":"DefaultReportId"]=l.report.id,e.resolve("analyticFieldReport@get",t)}]}}):(a.success({title:"Report properly run!",msg:l.report.name?l.report.name+" has been run!":""}),c())}).catch(function(e){a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DESCRIBE",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},l.closeDialog=c,(l.refreshDate=d)()}e.$inject=["$location","$mdDialog","toasty","report","api","apiName","$document","currentPath"],angular.module("app.analytics").controller("RunReportDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s){var r=this;function l(e){r.results=e||{count:0,rows:[]}}r.errors=[],r.columns=a?a.rows:[],r.results=i||{rows:[],count:0},r.query={limit:10,page:1},r.closeDialog=function(){e.hide()},r.getResults=function(){s.offset=(r.query.page-1)*r.query.limit,s.limit=r.query.limit,r.promise=n[o].run(s,l).$promise},r.valueReplacer=function(e,t){moment(t,"YYYY-MM-DDTHH:mm:ssZ",!0).isValid()&&(t=moment(t,"").format("YYYY-MM-DD HH:mm:ss"));return t}}e.$inject=["$mdDialog","toasty","api","columns","results","apiName","exportDate"],angular.module("app.analytics").controller("WebReportDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CALLYSQUARE.EDIT_ODBC",m.odbc=angular.copy(s),m.odbcs=o,m.newOdbc=!1,m.odbc||(m.odbc={},m.title="CALLYSQUARE.NEW_ODBC",m.newOdbc=!0),m.addNewOdbc=function(){m.errors=[],r.squareOdbc.save(m.odbc).$promise.then(function(e){m.odbcs.unshift(e.toJSON()),i.success({title:"Odbc properly created",msg:m.odbc.name?m.odbc.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.squareOdbc.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.squareOdbc.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveOdbc=function(){m.errors=[],r.squareOdbc.update({id:m.odbc.id},m.odbc).$promise.then(function(e){var t=_.find(m.odbcs,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Odbc properly saved!",msg:m.odbc.name?m.odbc.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.squareOdbc.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.squareOdbc.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteOdbc=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The odbc will be deleted.").ariaLabel("Delete Odbc").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.squareOdbc.delete({id:m.odbc.id}).$promise.then(function(){_.remove(m.odbcs,{id:m.odbc.id}),i.success({title:"Odbc properly deleted!",msg:(m.odbc.name||"odbc")+" has been deleted!"}),u(m.odbc)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.squareOdbc.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.squareOdbc.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","odbcs","odbc","api","Auth","license","setting"],angular.module("app.callysquare").controller("CreateOrEditOdbcDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.odbcs=r||{count:0,rows:[]},v.table="odbcs",v.listOrder="",v.listOrderAsc=null,v.selectedODBC=[],v.query={fields:"createdAt,updatedAt,id,name,dsn,description",sort:"-updatedAt",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditOdbcDialogController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/odbcs/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{odbc:e,odbcs:v.odbcs.rows,license:v.license,setting:null}})},v.testtestOdbc=function(e,t){return l.squareOdbc.test({id:e.id}).$promise.then(function(){c.success({title:"Square ODBC properly tested",msg:"Connection succeded!"})}).catch(function(e){c.error({title:"Square ODBC properly tested",msg:e.data?JSON.stringify(e.data):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the odbc?").htmlContent("<b>"+(e.name||"odbc")+"</b> will be deleted.").ariaLabel("delete odbc").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getODBC=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.squareOdbc.get(v.query,f).$promise},v.createOrEditOdbc=function(e,t){i.show({controller:"CreateOrEditOdbcDialogController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/odbcs/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{odbc:t,odbcs:v.odbcs.rows,license:v.license,setting:v.setting}})},v.deleteOdbc=A,v.exportSelectedODBC=function(){var e=angular.copy(v.selectedODBC);return v.selectedODBC=[],e},v.deleteSelectedODBC=function(e){var t=i.confirm().title("Are you sure want to delete the selected odbcs?").htmlContent("<b>"+v.selectedODBC.length+" selected</b> will be deleted.").ariaLabel("delete Odbcs").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedODBC.forEach(function(e){A(e)}),v.selectedODBC=[]})},v.deselectODBC=function(){v.selectedODBC=[]},v.selectAllODBC=function(){v.selectedODBC=v.odbcs.rows};var h=!0,b=1;function f(e){v.odbcs=e||{count:0,rows:[]}}function A(e){l.squareOdbc.delete({id:e.id}).$promise.then(function(){_.remove(v.odbcs.rows,{id:e.id}),v.odbcs.count-=1,v.odbcs.rows.length||v.getODBC(),c.success({title:"Odbc deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEsquareOdbc"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEsquareOdbc",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getODBC())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","odbcs","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.callysquare").controller("OdbcsController",e)}(),function(){"use strict";function e(t,n,e,a,i,o,s,r){var l=this;function d(e){t.hide(e)}l.errors=[],l.title="CALLYSQUARE.EDIT_PROJECT",l.project=angular.copy(a),l.newWindow=!0,l.projects=e,l.newProject=!1,l.openFromEditor=o,l.project||(l.project={name:"",description:""},l.title="CALLYSQUARE.NEW_PROJECT",l.newProject=!0),l.addNewProject=function(){l.errors=[],i.squareProject.save(l.project).$promise.then(function(e){l.projects.unshift(e),n.success({title:"Project properly created",msg:l.project.name?l.project.name+" has been created!":""}),d(e),l.openFromEditor&&(l.newWindow?s.open("/callysquare/projects/"+e.id,"_blank"):r.go("app.callysquare.projects.edit",{id:e.id}))}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){l.errors=e.data.errors||[{message:e.toString(),type:"api.squareProject.save"}];for(var t=0;t<e.data.errors.length;t++)n.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.squareProject.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},l.saveProject=function(){l.errors=[],i.squareProject.update({id:l.project.id},l.project).$promise.then(function(e){var t=_.find(l.projects,{id:e.id});t&&_.merge(t,e),n.success({title:"Project properly saved!",msg:l.project.name?l.project.name+" has been saved!":""}),d(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){l.errors=e.data.errors||[{message:e.toString(),type:"api.squareProject.update"}];for(var t=0;t<e.data.errors.length;t++)n.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.squareProject.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},l.deleteProject=function(){l.errors=[];var e=t.confirm().title("Are you sure?").content("The project will be deleted.").ariaLabel("Delete Project").ok("Delete").cancel("Cancel").targetEvent(event);t.show(e).then(function(){i.squareProject.delete({id:l.project.id}).$promise.then(function(){_.remove(l.projects,{id:l.project.id}),n.success({title:"Project properly deleted!",msg:l.project.name?l.project.name+" has been deleted!":""}),d(l.project)}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.squareProject.delete"}]})},function(){})},l.closeDialog=d}e.$inject=["$mdDialog","toasty","projects","project","api","openFromEditor","$window","$state"],angular.module("app.callysquare").controller("CreateOrEditSquareProjectDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i,o,s,r,l,d,c,m,u,p,g,v,h,b,f,A,E,y,S,T,C){var x,O,w,I,R,N,D=this,L={playback:["file_id"],answer:["timeout"],menu:["file_id","digit","response","retry"],getdigits:["file_id","variable_id","mindigit","maxdigit","retry"],getsecretdigits:["file_id","variable_id","mindigit","maxdigit","hiddendigitsnum","retry"],vswitch:["variable_id"],database:["odbc_id","query"],ext_dial:["trunk_name","phone","timeout"],set:["variable_id"],math:["variable_id"],gotoc:["context","extension","priority"],system:["command"],agi:["command"],gotoif:["condition"],saydigits:["digits"],saynumber:["number"],sayphonetic:["text"],record:["file","timeout"],goal:["goalname"],dial:["sip_id","timeout"],queue:["queue_id","timeout"],callback:["list_id","name","phone","delay"],gotoiftime:["interval_id"],voicemail:["mailbox"],subproject:["project_id"],sendSMS:["sms_account_id","to","sms_text"],sendMail:["account_id","to"],sendFax:["account_id","to","attachment_path"],tts:["text"],ispeechtts:["text","key","speed"],ispeechasr:["key","timeout"],custom_app:["application"],googleasr:["key","timeout"],awspolly:["aws_access_key_id","aws_secret_access_key","tts"],lumenvoxtts:["text"],lumenvoxasr:["grammar"],tildeasr:["appid","appsecret","uri"],login:["findBy"],pause:["findBy","pause_id"],unpause:["findBy"],logout:["findBy"]},M={queue:["file_id"],database:["variable_id"],pause:["pause_id"]},k={sendMail:["to","cc","bcc"],voicemail:["mailbox"]};function U(e,t,n,a){return _.map(e,function(e){return{value:e[t],option:e[n],group:a?e[a]:void 0}})}D.cellName=A.tagName,D.attributes=_.map(A.attributes,function(e){return{name:e.name,value:e.value,defaultValue:M[D.cellName]&&_.includes(M[D.cellName],e.name),required:L[D.cellName]&&_.includes(L[D.cellName],e.name),help:k[D.cellName]&&_.includes(k[D.cellName],e.name)}}),D.values={sip_id:U(r,"id","fullname","role"),trunk_name:U(l,"name","name"),trunk_id:U(l,"id","name"),queue_id:U(d,"id","name"),file_id:U(c,"id","name"),variable_id:U(m,"id","name"),odbc_id:U(u,"id","name"),project_id:U(p,"id","name"),context:U(g,"id","name"),interval_id:(x=v,O="id",w="name",I="IntervalId",R=_.filter(x,function(e){return null===e[I]}),N=[],_.forEach(R,function(t){N.push({value:t[O],option:t[w]});var e=_.filter(x,function(e){return e[I]===t.id});_.forEach(e,function(e){N.push({value:e[O],option:" - "+e[w]})})}),N),account_id:U(h,"id","name"),template_id:U(b,"id","name"),list_id:U(f,"id","name"),sms_account_id:U(T,"id","name"),pause_id:U(C,"id","name"),answer:[{value:"yes",option:"Yes"},{value:"no",option:"No"}],hiddendigitspos:[{value:"first",option:"First"},{value:"last",option:"Last"}],recordingFormat:[{value:"wav",option:"Wav"},{value:"gsm",option:"Gsm"}],intkey:[{value:"#",option:"#"},{value:"*",option:"*"}],beep:[{value:"BEEP",option:"Yes"},{value:"NOBEEP",option:"No"}],model:n,ispeech_asr_language:a,ispeech_tts_language:o,google_tts_language:s,google_asr_language:i,aws_polly_region:S,aws_polly_voice:y,callback_priority:[{option:"Highest",value:4},{option:"High",value:3},{option:"Medium",value:2},{option:"Low",value:1},{option:"Lowest",value:0}],findBy:[{value:"internal",option:"Internal"},{value:"phone",option:"Phone"},{value:"mobile",option:"Mobile"}]},D.closeDialog=function(e){e&&E(D.attributes),t.hide()},D.getMap=U}e.$inject=["$mdDialog","toasty","ispeechAsrModel","ispeechAsrLanguage","googleAsrLanguage","ispeechTtsLanguage","googleTtsLanguage","users","trunks","queues","sounds","variables","databases","projects","contexts","intervals","mailAccounts","templates","lists","cell","saveCallback","awsPollyVoice","awsPollyRegion","smsAccounts","pauses"],angular.module("app.callysquare").controller("MxGraphDialogController",e)}(),function(){"use strict";angular.module("app.callysquare").directive("stringToNumber",function(){return{require:"ngModel",link:function(e,t,n,a){a.$parsers.push(function(e){return""+e}),a.$formatters.push(function(e){return parseFloat(e)})}}})}(),function(){"use strict";angular.module("app.callysquare").factory("ispeechAsrModel",function(){return[{value:"0",option:"Default"},{value:"date",option:"Date"},{value:"usmoney",option:"US Money"},{value:"numbersto9",option:"Numbers to 9"},{value:"numbersto99",option:"Numbers to 99"},{value:"numbersto999",option:"Numbers to 999"},{value:"time",option:"Time"},{value:"phonenumber",option:"Phone number"},{value:"streets",option:"Streets"},{value:"citystate",option:"US City/States"}]}).factory("ispeechAsrLanguage",function(){return[{value:"en-US",option:"English (US)"},{value:"en-CA",option:"English (Canada)"},{value:"en-GB",option:"English (UK)"},{value:"en-AU",option:"English (Australia)"},{value:"es-ES",option:"Spanish (Spain)"},{value:"es-MX",option:"Spanish (Mexico)"},{value:"it-IT",option:"Italian (Italy) / Finnish (Finland)"},{value:"fr-FR",option:"German (Germany)"},{value:"fr-CA",option:"French (Canada)"},{value:"pl-PL",option:"Polish (Poland)"},{value:"pt-PT",option:"Portuguese (Portugal)"},{value:"ca-ES",option:"Catalan (Catalan)"},{value:"zh-TW",option:"Chinese (Taiwan)"},{value:"da-DK",option:"Danish (Denmark)"},{value:"ja-JP",option:"Japanese (Japan)"},{value:"ko-KR",option:"Korean (Korea)"},{value:"nl-NL",option:"Dutch (Netherlands)"},{value:"nb-NO",option:"Norwegian (Norway)"},{value:"pt-BR",option:"Portuguese (Brazil)"},{value:"ru-RU",option:"Russian (Russia)"},{value:"sv-SE",option:"Swedish (Sweden)"},{value:"zh-CN",option:"Chinese (China)"},{value:"zh-HK",option:"Chinese (Hong Kong)"}]}).factory("ispeechTtsLanguage",function(){return[{value:"usenglishfemale",option:"US English Female"},{value:"usenglishmale",option:"US English Male"},{value:"ukenglishfemale",option:"UK English Female"},{value:"ukenglishmale",option:"UK English Male"},{value:"auenglishfemale",option:"Australian English"},{value:"usspanishfemale",option:"US Spanish Female"},{value:"usspanishmale",option:"US Spanish Male"},{value:"chchinesefemale",option:"Chinese Female"},{value:"chchinesemale",option:"Chinese Male"},{value:"hkchinesefemale",option:"Hong Kong Cantonese Female"},{value:"twchinesefemale",option:"Taiwan Chinese Female"},{value:"jpjapanesefemale",option:"Japanese Female"},{value:"jpjapanesemale",option:"Japanese Male"},{value:"krkoreanfemale",option:"Korean Female"},{value:"krkoreanmale",option:"Korean Male"},{value:"caenglishfemale",option:"Canadian English Female"},{value:"huhungarianfemale",option:"Hungarian Female"},{value:"brportuguesefemale",option:"Brazilian Portuguese Female"},{value:"eurportuguesefemale",option:"European Portuguese Female"},{value:"eurportuguesemale",option:"European Portuguese Male"},{value:"eurspanishfemale",option:"European Spanish Female"},{value:"eurspanishmale",option:"European Spanish Male"},{value:"eurcatalanfemale",option:"European Catalan Female"},{value:"eurczechfemale",option:"European Czech Female"},{value:"eurdanishfemale",option:"European Danish Female"},{value:"eurfinnishfemale",option:"European Finnish Female"},{value:"eurfrenchfemale",option:"European French Female"},{value:"eurfrenchmale",option:"European French Male"},{value:"eurnorwegianfemale",option:"European Norwegian Female"},{value:"eurdutchfemale",option:"European Dutch Female"},{value:"eurpolishfemale",option:"European Polish Female"},{value:"euritalianfemale",option:"European Italian Female"},{value:"euritalianmale",option:"European Italian Male"},{value:"eurturkishfemale",option:"European Turkish Female"},{value:"eurturkishmale",option:"European Turkish Male"},{value:"eurgermanfemale",option:"European German Female"},{value:"eurgermanmale",option:"European German Male"},{value:"rurussianfemale",option:"Russian Female"},{value:"rurussianmale",option:"Russian Male"},{value:"swswedishfemale",option:"Swedish Female"},{value:"cafrenchfemale",option:"Canadian French Female"},{value:"cafrenchmale",option:"Canadian French Male"}]}).factory("googleTtsLanguage",function(){return[{value:"af",option:"Afrikaans"},{value:"sq",option:"Albanian"},{value:"am",option:"Amharic"},{value:"ar",option:"Arabic"},{value:"hy",option:"Armenian"},{value:"az",option:"Azerbaijani"},{value:"eu",option:"Basque"},{value:"be",option:"Belarusian"},{value:"bn",option:"Bengali"},{value:"bh",option:"Bihari"},{value:"bs",option:"Bosnian"},{value:"br",option:"Breton"},{value:"bg",option:"Bulgarian"},{value:"km",option:"Cambodian"},{value:"ca",option:"Catalan"},{value:"zh-CN",option:"Chinese (Simplified)"},{value:"zh-TW",option:"Chinese (Traditional)"},{value:"co",option:"Corsican"},{value:"hr",option:"Croatian"},{value:"cs",option:"Czech"},{value:"da",option:"Danish"},{value:"nl",option:"Dutch"},{value:"en",option:"English"},{value:"eo",option:"Esperanto"},{value:"et",option:"Estonian"},{value:"fo",option:"Faroese"},{value:"tl",option:"Filipino"},{value:"fi",option:"Finnish"},{value:"fr",option:"French"},{value:"fy",option:"Frisian"},{value:"gl",option:"Galician"},{value:"ka",option:"Georgian"},{value:"de",option:"German"},{value:"el",option:"Greek"},{value:"gn",option:"Guarani"},{value:"gu",option:"Gujarati"},{value:"xx-hacker",option:"Hacker"},{value:"ha",option:"Hausa"},{value:"iw",option:"Hebrew"},{value:"hi",option:"Hindi"},{value:"hu",option:"Hungarian"},{value:"is",option:"Icelandic"},{value:"id",option:"Indonesian"},{value:"ia",option:"Interlingua"},{value:"ga",option:"Irish"},{value:"it",option:"Italian"},{value:"jw",option:"Javanese"},{value:"ja",option:"Japanese"},{value:"kn",option:"Kannada"},{value:"kk",option:"Kazakh"},{value:"rw",option:"Kinyarwanda"},{value:"rn",option:"Kirundi"},{value:"xx-klingon",option:"Klingon"},{value:"ku",option:"Kurdish"},{value:"ko",option:"Korean"},{value:"ky",option:"Kyrgyz"},{value:"lo",option:"Laothian"},{value:"la",option:"Latin"},{value:"lv",option:"Latvian"},{value:"ln",option:"Lingala"},{value:"lt",option:"Lithuanian"},{value:"mk",option:"Macedonian"},{value:"mg",option:"Malagasy"},{value:"ml",option:"Malayalam"},{value:"mt",option:"Maltese"},{value:"mi",option:"Maori"},{value:"mr",option:"Marathi"},{value:"mo",option:"Moldavian"},{value:"mn",option:"Mongolian"},{value:"sr-ME",option:"Montenegrin"},{value:"ne",option:"Nepali"},{value:"no",option:"Norwegian"},{value:"nn",option:"Norwegian (Nynorsk)"},{value:"oc",option:"Occitan"},{value:"or",option:"Oriya"},{value:"om",option:"Oromo"},{value:"ps",option:"Pashto"},{value:"fa",option:"Persian"},{value:"xx-pirate",option:"Pirate"},{value:"pl",option:"Polish"},{value:"pt-BR",option:"Portuguese (Brazil)"},{value:"pt-PT",option:"Portuguese (Portugal)"},{value:"pa",option:"Punjabi"},{value:"qu",option:"Quechua"},{value:"ro",option:"Romanian"},{value:"rm",option:"Romansh"},{value:"ru",option:"Russian"},{value:"gd",option:"Scots Gaelic"},{value:"sr",option:"Serbian"},{value:"sh",option:"Serbo-Croatian"},{value:"st",option:"Sesotho"},{value:"sn",option:"Shona"},{value:"sd",option:"Sindhi"},{value:"si",option:"Sinhalese"},{value:"sk",option:"Slovak"},{value:"sl",option:"Slovenian"},{value:"so",option:"Somali"},{value:"es",option:"Spanish"},{value:"su",option:"Sundanese"},{value:"sw",option:"Swahili"},{value:"sv",option:"Swedish"},{value:"tg",option:"Tajik"},{value:"ta",option:"Tamil"},{value:"tt",option:"Tatar"},{value:"te",option:"Telugu"},{value:"th",option:"Thai"},{value:"ti",option:"Tigrinya"},{value:"to",option:"Tonga"},{value:"tr",option:"Turkish"},{value:"tk",option:"Turkmen"},{value:"tw",option:"Twi"},{value:"ug",option:"Uighur"},{value:"uk",option:"Ukrainian"},{value:"ur",option:"Urdu"},{value:"uz",option:"Uzbek"},{value:"vi",option:"Vietnamese"},{value:"cy",option:"Welsh"},{value:"xh",option:"Xhosa"},{value:"yi",option:"Yiddish"},{value:"yo",option:"Yoruba"},{value:"zu",option:"Zulu"}]}).factory("googleAsrLanguage",function(){return[{value:"af-ZA",option:"Afrikaans (South Africa)"},{value:"am-ET",option:"Amharic (Ethiopia)"},{value:"hy-AM",option:"Armenian (Armenia)"},{value:"az-AZ",option:"Azerbaijani (Azerbaijan)"},{value:"id-ID",option:"Indonesian (Indonesia)"},{value:"ms-MY",option:"Malay (Malaysia)"},{value:"bn-BD",option:"Bengali (Bangladesh)"},{value:"bn-IN",option:"Bengali (India)"},{value:"ca-ES",option:"Catalan (Spain)"},{value:"cs-CZ",option:"Czech (Czech Republic)"},{value:"da-DK",option:"Danish (Denmark)"},{value:"de-DE",option:"German (Germany)"},{value:"en-AU",option:"English (Australia)"},{value:"en-CA",option:"English (Canada)"},{value:"en-GH",option:"English (Ghana)"},{value:"en-GB",option:"English (United Kingdom)"},{value:"en-IN",option:"English (India)"},{value:"en-IE",option:"English (Ireland)"},{value:"en-KE",option:"English (Kenya)"},{value:"en-NZ",option:"English (New Zealand)"},{value:"en-NG",option:"English (Nigeria)"},{value:"en-PH",option:"English (Philippines)"},{value:"en-ZA",option:"English (South Africa)"},{value:"en-TZ",option:"English (Tanzania)"},{value:"en-US",option:"English (United States)"},{value:"es-AR",option:"Spanish (Argentina)"},{value:"es-BO",option:"Spanish (Bolivia)"},{value:"es-CL",option:"Spanish (Chile)"},{value:"es-CO",option:"Spanish (Colombia)"},{value:"es-CR",option:"Spanish (Costa Rica)"},{value:"es-EC",option:"Spanish (Ecuador)"},{value:"es-SV",option:"Spanish (El Salvador)"},{value:"es-ES",option:"Spanish (Spain)"},{value:"es-US",option:"Spanish (United States)"},{value:"es-GT",option:"Spanish (Guatemala)"},{value:"es-HN",option:"Spanish (Honduras)"},{value:"es-MX",option:"Spanish (Mexico)"},{value:"es-NI",option:"Spanish (Nicaragua)"},{value:"es-PA",option:"Spanish (Panama)"},{value:"es-PY",option:"Spanish (Paraguay)"},{value:"es-PE",option:"Spanish (Peru)"},{value:"es-PR",option:"Spanish (Puerto Rico)"},{value:"es-DO",option:"Spanish (Dominican Republic)"},{value:"es-UY",option:"Spanish (Uruguay)"},{value:"es-VE",option:"Spanish (Venezuela)"},{value:"eu-ES",option:"Basque (Spain)"},{value:"fil-PH",option:"Filipino (Philippines)"},{value:"fr-CA",option:"French (Canada)"},{value:"fr-FR",option:"French (France)"},{value:"gl-ES",option:"Galician (Spain)"},{value:"ka-GE",option:"Georgian (Georgia)"},{value:"gu-IN",option:"Gujarati (India)"},{value:"hr-HR",option:"Croatian (Croatia)"},{value:"zu-ZA",option:"Zulu (South Africa)"},{value:"is-IS",option:"Icelandic (Iceland)"},{value:"it-IT",option:"Italian (Italy)"},{value:"jv-ID",option:"Javanese (Indonesia)"},{value:"kn-IN",option:"Kannada (India)"},{value:"km-KH",option:"Khmer (Cambodia)"},{value:"lo-LA",option:"Lao (Laos)"},{value:"lv-LV",option:"Latvian (Latvia)"},{value:"lt-LT",option:"Lithuanian (Lithuania)"},{value:"hu-HU",option:"Hungarian (Hungary)"},{value:"ml-IN",option:"Malayalam (India)"},{value:"mr-IN",option:"Marathi (India)"},{value:"nl-NL",option:"Dutch (Netherlands)"},{value:"ne-NP",option:"Nepali (Nepal)"},{value:"nb-NO",option:"Norwegian Bokmal (Norway)"},{value:"pl-PL",option:"Polish (Poland)"},{value:"pt-BR",option:"Portuguese (Brazil)"},{value:"pt-PT",option:"Portuguese (Portugal)"},{value:"ro-RO",option:"Romanian (Romania)"},{value:"si-LK",option:"Sinhala (Srilanka)"},{value:"sk-SK",option:"Slovak (Slovakia)"},{value:"sl-SI",option:"Slovenian (Slovenia)"},{value:"su-ID",option:"Sundanese (Indonesia)"},{value:"sw-TZ",option:"Swahili (Tanzania)"},{value:"sw-KE",option:"Swahili (Kenya)"},{value:"fi-FI",option:"Finnish (Finland)"},{value:"sv-SE",option:"Swedish (Sweden)"},{value:"ta-IN",option:"Tamil (India)"},{value:"ta-SG",option:"Tamil (Singapore)"},{value:"ta-LK",option:"Tamil (Sri Lanka)"},{value:"ta-MY",option:"Tamil (Malaysia)"},{value:"te-IN",option:"Telugu (India)"},{value:"vi-VN",option:"Vietnamese (Vietnam)"},{value:"tr-TR",option:"Turkish (Turkey)"},{value:"ur-PK",option:"Urdu (Pakistan)"},{value:"ur-IN",option:"Urdu (India)"},{value:"el-GR",option:"Greek (Greece)"},{value:"bg-BG",option:"Bulgarian (Bulgaria)"},{value:"ru-RU",option:"Russian (Russia)"},{value:"sr-RS",option:"Serbian (Serbia)"},{value:"uk-UA",option:"Ukrainian (Ukraine)"},{value:"he-IL",option:"Hebrew (Israel)"},{value:"ar-IL",option:"Arabic (Israel)"},{value:"ar-JO",option:"Arabic (Jordan)"},{value:"ar-AE",option:"Arabic (United Arab Emirates)"},{value:"ar-BH",option:"Arabic (Bahrain)"},{value:"ar-DZ",option:"Arabic (Algeria)"},{value:"ar-SA",option:"Arabic (Saudi Arabia)"},{value:"ar-IQ",option:"Arabic (Iraq)"},{value:"ar-KW",option:"Arabic (Kuwait)"},{value:"ar-MA",option:"Arabic (Morocco)"},{value:"ar-TN",option:"Arabic (Tunisia)"},{value:"ar-OM",option:"Arabic (Oman)"},{value:"ar-PS",option:"Arabic (State of Palestine)"},{value:"ar-QA",option:"Arabic (Qatar)"},{value:"ar-LB",option:"Arabic (Lebanon)"},{value:"ar-EG",option:"Arabic (Egypt)"},{value:"fa-IR",option:"Persian (Iran)"},{value:"hi-IN",option:"Hindi (India)"},{value:"th-TH",option:"Thai (Thailand)"},{value:"ko-KR",option:"Korean (South Korea)"},{value:"cmn-Hant-TW",option:"Chinese, Mandarin (Traditional, Taiwan)"},{value:"yue-Hant-HK",option:"Chinese, Cantonese (Traditional, Hong Kong)"},{value:"ja-JP",option:"Japanese (Japan)"},{value:"cmn-Hans-HK",option:"Chinese, Mandarin (Simplified, Hong Kong)"},{value:"cmn-Hans-CN",option:"Chinese, Mandarin (Simplified, China)"}]}).factory("awsPollyVoice",function(){return[{value:"Amy",option:"Amy (English, British, Female)"},{value:"Astrid",option:"Astrid (Swedish, Female)"},{value:"Brian",option:"Brian (English, British, Male)"},{value:"Carla",option:"Carla (Italian, Female)"},{value:"Carmen",option:"Carmen (Romanian, Female)"},{value:"Celine",option:"Celine (French, Female)"},{value:"Chantal",option:"Chantal (French, Canadian, Female)"},{value:"Conchita",option:"Conchita (Spanish, Castilian, Female)"},{value:"Cristiano",option:"Cristiano (Portuguese, Male)"},{value:"Dora",option:"Dora (Icelandic, Female)"},{value:"Emma",option:"Emma (English, British, Female)"},{value:"Enrique",option:"Enrique (Spanish, Castilian, Male)"},{value:"Ewa",option:"Ewa (Polish, Female)"},{value:"Filiz",option:"Filiz (Turkish, Female)"},{value:"Geraint",option:"Geraint (English, Welsh, Male)"},{value:"Giorgio",option:"Giorgio (Italian, Male)"},{value:"Gwineth",option:"Gwineth (Welsh, Female)"},{value:"Hans",option:"Hans (German, Male)"},{value:"Ines",option:"Ines (Portuguese, Female)"},{value:"Ivy",option:"Ivy (English, US, Female)"},{value:"Jacek",option:"Jacek (Polish, Male)"},{value:"Jan",option:"Jan (Polish, Male)"},{value:"Joanna",option:"Joanna (English, US, Female)"},{value:"Joey",option:"Joey (English, US, Male)"},{value:"Justin",option:"Justin (English, US, Male)"},{value:"Karl",option:"Karl (Icelandic, Male)"},{value:"Kendra",option:"Kendra (English, US, Female)"},{value:"Kimberly",option:"Kimberly (English, US, Female)"},{value:"Liv",option:"Liv (Norwegian, Female)"},{value:"Lotte",option:"Lotte (Dutch, Female)"},{value:"Mads",option:"Mads (Danish, Male)"},{value:"Maja",option:"Maja (Polish, Female)"},{value:"Marlene",option:"Marlene (German, Female)"},{value:"Mathieu",option:"Mathieu (French, Male)"},{value:"Maxim",option:"Maxim (Russian, Male)"},{value:"Miguel",option:"Miguel (Spanish, US, Male)"},{value:"Mizuki",option:"Mizuki (Japanese, Female)"},{value:"Naja",option:"Naja (Danish, Female)"},{value:"Nicole",option:"Nicole (English, Austrialian, Female)"},{value:"Penelope",option:"Penelope (Spanish, US, Female)"},{value:"Raveena",option:"Raveena (English, Indian, Female)"},{value:"Ricardo",option:"Ricardo (Portuguese, Brazilian, Male)"},{value:"Ruben",option:"Ruben (Dutch, Male)"},{value:"Russell",option:"Russell (English, Austrialian, Male)"},{value:"Salli",option:"Salli (English, US, Female)"},{value:"Tatyana",option:"Tatyana (Russian, Female)"},{value:"Vitoria",option:"Vitoria (Portuguese, Brazilian, Female)"}]}).factory("awsPollyRegion",function(){return[{value:"us-east-1",option:"US East (N. Virginia)"},{value:"us-east-2",option:"US East (Ohio)"},{value:"us-west-1",option:"US West (N. California)"},{value:"us-west-2",option:"US West (Oregon)"},{value:"ca-central-1",option:"Canada (Central)"},{value:"eu-west-1",option:"EU (Ireland)"},{value:"eu-central-1",option:"EU (Frankfurt)"},{value:"eu-west-2",option:"EU (London)"},{value:"eu-west-3",option:"EU (Paris)"},{value:"ap-southeast-1",option:"Asia Pacific (Singapore)"},{value:"ap-southeast-2",option:"Asia Pacific (Sydney)"},{value:"ap-northeast-2",option:"Asia Pacific (Seoul)"},{value:"ap-northeast-1",option:"Asia Pacific (Tokyo)"},{value:"ap-south-1",option:"Asia Pacific (Mumbai)"},{value:"sa-east-1",option:"South America (São Paulo)"}]})}(),function(){"use strict";function e(t,e,n,a){var i=this;i.project={preproduction:n},i.closeDialog=function(e){e?(a(i.project.preproduction),t.hide(i.project.preproduction)):t.hide()}}e.$inject=["$mdDialog","toasty","currentXML","saveCallback"],angular.module("app.callysquare").controller("MxGraphEditXMLController",e)}(),function(){"use strict";function e(t,n){var a=this;function i(e){e?(n(e),t.hide(e)):t.hide()}a.errors=[],a.ngFlowOptions={chunkSize:5242880,maxChunkRetries:1,singleFile:!0,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,allowDuplicateUploads:!0},a.ngFlow={flow:{}},a.dropping=!1,a.closeDialog=i,a.fileAdded=function(e){a.errors=[],"text/xml"!==e.file.type&&a.errors.push({message:"The format "+e.file.type+" is not supported!"});5242880<e.file.size&&a.errors.push({message:"The file is too big. Max 5MB files are supported!"});if(!a.errors.length){var t=new FileReader;t.onload=function(e){i(e.target.result)},t.readAsText(e.file)}}}e.$inject=["$mdDialog","saveCallback"],angular.module("app.callysquare").controller("MxGraphImportXMLController",e)}(),function(){"use strict";function e(t,n,e,a){var i=this;i.project=_.clone(e),i.closeDialog=function(){t.hide()},i.save=function(){i.errors=[],a.squareProject.update({id:i.project.id},{notes:i.project.notes,description:i.project.description}).$promise.then(function(e){n.success({title:"Project updated!",msg:i.project.name?i.project.name+" has been updated!":""}),t.hide(e)}).catch(function(e){console.error(e),i.errors=e.data.errors||[{message:e.toString(),type:"api.squareProject.update"}]})}}e.$inject=["$mdDialog","toasty","project","api"],angular.module("app.callysquare").controller("MxGraphUpdateInfoController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;o.projects=n,o.id="",o.newWindow=!0,o.closeDialog=function(e){o.errors=[],e?(t.hide(),o.newWindow?a.open("/callysquare/projects/"+o.id,"_blank"):i.go("app.callysquare.projects.edit",{id:o.id})):t.hide()}}e.$inject=["$mdDialog","toasty","projects","$window","$state"],angular.module("app.callysquare").controller("MxGraphOpenProjectController",e)}(),function(){"use strict";function e(t,n,e,a,i,o,s){var r=this;r.project=angular.copy(e),r.project.name+="_new",r.project.preproduction=a,r.newWindow=!0,r.closeDialog=function(){t.hide()},r.save=function(){delete r.project.id,i.squareProject.save(r.project).$promise.then(function(e){n.success({title:"Project properly created",msg:r.project.name?r.project.name+" has been created!":""}),t.hide(e),r.newWindow?o.open("/callysquare/projects/"+e.id,"_blank"):s.go("app.callysquare.projects.edit",{id:e.id})}).catch(function(e){console.error(e),r.errors=e.data.errors||[{message:e.toString(),type:"api.squareProject.save"}]})}}e.$inject=["$mdDialog","toasty","project","currentXML","api","$window","$state"],angular.module("app.callysquare").controller("MxGraphSaveProjectAsController",e)}(),function(){"use strict";function e(e,n,a,i,o,t,s,r,l,d,c,m,u,p,g,v,h,b,f,A,E){var y=this;y.project=t||{},y.saveOrPublishProject=function(e,t){var n={preproduction:e};t&&(n.production=e);o.squareProject.update({id:y.project.id},n).$promise.then(function(e){i.success({title:"Project "+(t?"published":"saved")+"!",msg:y.project.name?y.project.name+" has been "+(t?"published":"saved")+"!":""}),y.project.preproduction=e.preproduction}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsquareProject",msg:e.data?JSON.stringify(e.data):e.toString()})})},y.$onInit=function(){new EditorUi(y,new Editor,document.getElementById("geEditor")).openString(y.project.preproduction,y.project.name,y.project)},y.openDialog=function(e,t){a.show({controller:"MxGraphDialogController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/projects/edit/dialog/dialog.html",parent:angular.element(n.body),clickOutsideToClose:!0,locals:{users:s.rows||[],trunks:r.rows||[],queues:l.rows||[],sounds:d.rows||[],variables:c.rows||[],databases:m.rows||[],contexts:u.rows||[],projects:p.rows||[],intervals:g.rows||[],mailAccounts:v.rows||[],smsAccounts:f.rows||[],pauses:A.rows||[],templates:h.rows||[],lists:b.rows||[],cell:e,saveCallback:t}})},y.newProject=function(e){a.show({controller:"CreateOrEditProjectDialogController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/projects/create/dialog.html",parent:angular.element(n.body),clickOutsideToClose:!0,locals:{project:e,projects:p.rows,openFromEditor:!0,setting:null}})},y.openProject=function(){a.show({controller:"MxGraphOpenProjectController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/projects/edit/open/open.html",parent:angular.element(n.body),clickOutsideToClose:!0,locals:{projects:p.rows||[]}})},y.saveProjectAs=function(e){a.show({controller:"MxGraphSaveProjectAsController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/projects/edit/saveAs/saveAs.html",parent:angular.element(n.body),clickOutsideToClose:!0,locals:{project:y.project,currentXML:e}}).then(function(e){e&&p.rows.push(e)})},y.newVariable=function(e){a.show({controller:"CreateOrEditVariableDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/variables/create/dialog.html",parent:angular.element(n.body),clickOutsideToClose:!0,locals:{variable:e,variables:c.rows,license:null,setting:null}})},y.updateInfo=function(e){a.show({controller:"MxGraphUpdateInfoController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/projects/edit/info/info.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{project:y.project}}).then(function(e){e&&_.merge(y.project,e)})},y.editXML=function(e,t){a.show({controller:"MxGraphEditXMLController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/projects/edit/edit/edit.html",parent:angular.element(n.body),clickOutsideToClose:!0,locals:{currentXML:e,saveCallback:t}}).then(function(e){e&&(y.project.preproduction=e)})},y.importXML=function(e){a.show({controller:"MxGraphImportXMLController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/projects/edit/import/import.html",parent:angular.element(n.body),clickOutsideToClose:!0,locals:{saveCallback:e}}).then(function(e){e&&(y.project.preproduction=e)})},y.gotoProjects=function(){e.go("app.callysquare.projects")}}e.$inject=["$state","$document","$mdDialog","toasty","api","project","users","trunks","queues","sounds","variables","databases","contexts","projects","intervals","mailAccounts","templates","lists","smsAccounts","pauses","$window"],angular.module("app.callysquare").controller("ProjectController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d,c){var m=this;m.currentUser=c.getCurrentUser(),m.projects=a||{count:0,rows:[]},m.table="projects",m.listOrder="",m.listOrderAsc=null,m.selectedProjects=[],m.query={fields:"id,name,description,notes",sort:"-updatedAt",limit:10,page:1},m.editstate=function(e,t){n.go("app.callysquare.projects.edit",{id:e.id})},m.deleteconfirm=function(e,t){var n=s.confirm().title("Are you sure want to delete the project?").htmlContent("<b>"+e.name+"</b> will be deleted.").ariaLabel("delete project").targetEvent(t).ok("OK").cancel("CANCEL");s.show(n).then(function(){v(e)},function(){console.log("CANCEL")})},m.success=g,m.getProjects=function(){m.query.offset=(m.query.page-1)*m.query.limit,m.promise=i.squareProject.get(m.query,g).$promise},m.createOrEditProject=function(e,t){s.show({controller:"CreateOrEditSquareProjectDialogController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/projects/create/dialog.html",parent:angular.element(r.body),targetEvent:e,clickOutsideToClose:!0,locals:{project:t,projects:m.projects.rows,openFromEditor:null,setting:null}})},m.deleteProject=v,m.exportSelectedProjects=function(){var e=angular.copy(m.selectedProjects);return m.selectedProjects=[],e},m.deleteSelectedProjects=function(e){var t=s.confirm().title("Are you sure want to delete the selected projects?").htmlContent("<b>"+m.selectedProjects.length+" selected</b> will be deleted.").ariaLabel("delete Projects").targetEvent(e).ok("OK").cancel("CANCEL");s.show(t).then(function(){m.selectedProjects.forEach(function(e){v(e)}),m.selectedProjects=[]})},m.deselectProjects=function(){m.selectedProjects=[]},m.selectAllProjects=function(){m.selectedProjects=m.projects.rows};var u=!0,p=1;function g(e){m.projects=e||{count:0,rows:[]}}function v(e){i.squareProject.delete({id:e.id}).$promise.then(function(){_.remove(m.projects.rows,{id:e.id}),m.projects.count-=1,m.projects.rows.length||m.getProjects(),d.success({title:"Project deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.project.delete"}];for(var t=0;t<e.data.errors.length;t++)d.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else d.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.project.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){u?l(function(){u=!1}):(t||(p=m.query.page),e!==t&&(m.query.page=1),e||(m.query.page=p),m.getProjects())})}e.$inject=["$scope","$state","$mdSidenav","projects","api","msUtils","$mdDialog","$document","$timeout","toasty","Auth"],angular.module("app.callysquare").controller("ProjectsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CALLYSQUARE.EDIT_SQUARERECORDING",m.squareRecording=angular.copy(s),m.squareRecordings=o,m.newSquareRecording=!1,m.squareRecording||(m.squareRecording={},m.title="CALLYSQUARE.NEW_SQUARERECORDING",m.newSquareRecording=!0),m.addNewSquareRecording=function(){m.errors=[],r.squareRecording.save(m.squareRecording).$promise.then(function(e){m.squareRecordings.unshift(e.toJSON()),i.success({title:"SquareRecording properly created",msg:m.squareRecording.name?m.squareRecording.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.squareRecording.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.squareRecording.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSquareRecording=function(){m.errors=[],r.squareRecording.update({id:m.squareRecording.id},m.squareRecording).$promise.then(function(e){var t=_.find(m.squareRecordings,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"SquareRecording properly saved!",msg:m.squareRecording.name?m.squareRecording.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.squareRecording.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.squareRecording.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSquareRecording=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The squareRecording will be deleted.").ariaLabel("Delete SquareRecording").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.squareRecording.delete({id:m.squareRecording.id}).$promise.then(function(){_.remove(m.squareRecordings,{id:m.squareRecording.id}),i.success({title:"SquareRecording properly deleted!",msg:(m.squareRecording.name||"squareRecording")+" has been deleted!"}),u(m.squareRecording)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.squareRecording.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.squareRecording.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","squareRecordings","squareRecording","api","Auth","license","setting"],angular.module("app.callysquare").controller("CreateOrEditSquareRecordingDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.squareRecordings=r||{count:0,rows:[]},v.table="squareRecordings",v.listOrder="",v.listOrderAsc=null,v.selectedSquareRecordings=[],v.query={fields:"createdAt,updatedAt,id,filename,projectName,uniqueid,callerid,extension,audio,createdAt",sort:"-updatedAt",limit:10,page:1},v.downloadfile2=function(o,e){return l.squareRecording.download({id:o.id}).$promise.then(function(e){var t=[e.buffer],n="download",a=new Blob(t,{type:e.type});n=o.uniqueid+".wav";var i=window.document.createElement("a");i.setAttribute("href",URL.createObjectURL(a)),i.setAttribute("download",n),i.click()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.squareRecording.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the squareRecording?").htmlContent("<b>"+(e.name||"squareRecording")+"</b> will be deleted.").ariaLabel("delete squareRecording").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getSquareRecordings=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.squareRecording.get(v.query,f).$promise},v.createOrEditSquareRecording=function(e,t){i.show({controller:"CreateOrEditSquareRecordingDialogController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/squareRecordings/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{squareRecording:t,squareRecordings:v.squareRecordings.rows,license:v.license,setting:v.setting}})},v.deleteSquareRecording=A,v.exportSelectedSquareRecordings=function(){var e=angular.copy(v.selectedSquareRecordings);return v.selectedSquareRecordings=[],e},v.deleteSelectedSquareRecordings=function(e){var t=i.confirm().title("Are you sure want to delete the selected squareRecordings?").htmlContent("<b>"+v.selectedSquareRecordings.length+" selected</b> will be deleted.").ariaLabel("delete SquareRecordings").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedSquareRecordings.forEach(function(e){A(e)}),v.selectedSquareRecordings=[]})},v.deselectSquareRecordings=function(){v.selectedSquareRecordings=[]},v.selectAllSquareRecordings=function(){v.selectedSquareRecordings=v.squareRecordings.rows};var h=!0,b=1;function f(e){v.squareRecordings=e||{count:0,rows:[]}}function A(e){l.squareRecording.delete({id:e.id}).$promise.then(function(){_.remove(v.squareRecordings.rows,{id:e.id}),v.squareRecordings.count-=1,v.squareRecordings.rows.length||v.getSquareRecordings(),c.success({title:"SquareRecording deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEsquareRecording"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEsquareRecording",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getSquareRecordings())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","squareRecordings","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.callysquare").controller("SquareRecordingsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.chatQueues=r||{count:0,rows:[]},v.table="chatQueues",v.listOrder="",v.listOrderAsc=null,v.selectedChatQueues=[],v.query={fields:"createdAt,updatedAt,id,name,strategy,timeout,description",sort:"-updatedAt",limit:10,page:1},v.arraystrategy=_.keyBy([{option:"Beepall",value:"'beepall'"},{option:"RR Memory",value:"'rrmemory'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.chat.chatQueues.edit",{id:e.id,chatQueue:e})},v.teamadddialog=function(e,t){i.show({controller:"ChatQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatQueues/edit/teamadd/teamadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{chatQueue:e,chatQueues:v.chatQueues?v.chatQueues.rows:[]}})},v.agentadddialog=function(e,t){i.show({controller:"ChatQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatQueues/edit/agentadd/agentadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{chatQueue:e,chatQueues:v.chatQueues?v.chatQueues.rows:[],realtime:!1}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the chatQueue?").htmlContent("<b>"+(e.name||"chatQueue")+"</b> will be deleted.").ariaLabel("delete chatQueue").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.gotorealtimegoto=function(e,t){n.go("app.chat.realtime.queues",{})},v.success=f,v.getChatQueues=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.chatQueue.get(v.query,f).$promise},v.createOrEditChatQueue=function(e,t){i.show({controller:"CreateOrEditChatQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatQueues/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatQueue:t,chatQueues:v.chatQueues.rows,license:v.license,setting:v.setting}})},v.deleteChatQueue=A,v.exportSelectedChatQueues=function(){var e=angular.copy(v.selectedChatQueues);return v.selectedChatQueues=[],e},v.deleteSelectedChatQueues=function(e){var t=i.confirm().title("Are you sure want to delete the selected chatQueues?").htmlContent("<b>"+v.selectedChatQueues.length+" selected</b> will be deleted.").ariaLabel("delete ChatQueues").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedChatQueues.forEach(function(e){A(e)}),v.selectedChatQueues=[]})},v.deselectChatQueues=function(){v.selectedChatQueues=[]},v.selectAllChatQueues=function(){v.selectedChatQueues=v.chatQueues.rows};var h=!0,b=1;function f(e){v.chatQueues=e||{count:0,rows:[]}}function A(e){l.chatQueue.delete({id:e.id}).$promise.then(function(){_.remove(v.chatQueues.rows,{id:e.id}),v.chatQueues.count-=1,v.chatQueues.rows.length||v.getChatQueues(),c.success({title:"ChatQueue deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEchatQueue"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEchatQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getChatQueues())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","chatQueues","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.chat").controller("ChatQueuesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CHAT.EDIT_CHATQUEUE",m.chatQueue=angular.copy(s),m.chatQueues=o,m.newChatQueue=!1,m.chatQueue||(m.chatQueue={strategy:"beepall",timeout:10},m.title="CHAT.NEW_CHATQUEUE",m.newChatQueue=!0),m.addNewChatQueue=function(){m.errors=[],r.chatQueue.save(m.chatQueue).$promise.then(function(e){m.chatQueues.unshift(e.toJSON()),i.success({title:"ChatQueue properly created",msg:m.chatQueue.name?m.chatQueue.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatQueue.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatQueue.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveChatQueue=function(){m.errors=[],r.chatQueue.update({id:m.chatQueue.id},m.chatQueue).$promise.then(function(e){var t=_.find(m.chatQueues,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"ChatQueue properly saved!",msg:m.chatQueue.name?m.chatQueue.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatQueue.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatQueue.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteChatQueue=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The chatQueue will be deleted.").ariaLabel("Delete ChatQueue").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.chatQueue.delete({id:m.chatQueue.id}).$promise.then(function(){_.remove(m.chatQueues,{id:m.chatQueue.id}),i.success({title:"ChatQueue properly deleted!",msg:(m.chatQueue.name||"chatQueue")+" has been deleted!"}),u(m.chatQueue)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatQueue.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatQueue.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","chatQueues","chatQueue","api","Auth","license","setting"],angular.module("app.chat").controller("CreateOrEditChatQueueDialogController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r){var l=this;function d(){return a.chatQueue[l.isVoiceRealtime()?"getMembers":"getAgents"]({id:l.chatQueue.id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){return l.isVoiceRealtime()?l.selectedItems=e.rows?_.map(e.rows,function(e){return e.id=e.UserId,e.fullname=e.membername,e.penalty=e.hasOwnProperty("penalty")?"penalty "+e.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[]:l.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserChatQueue?"penalty "+e.UserChatQueue.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.selectedItems=l.selectedItems,r.hasRole("admin")?a.user.get({fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise:a.user.getAgents({id:r.getCurrentUser().id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise}).then(function(e){l.items=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserChatQueue?"penalty "+e.UserChatQueue.penalty:"",e.internal=e.internal?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.items=_.differenceBy(l.items,l.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETUSERS.GETAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}l.chatQueue=t,l.penalty=0,l.items=[],l.selectedItems=[],l.closeDialog=function(){e.hide()},l.isVoiceRealtime=function(){return o},l.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"penalty",labelAll:s.instant("CHAT.ALL_AGENTS"),labelSelected:s.instant("CHAT.SELECTED_AGENTS"),transferCallback:function(e,t){a.chatQueue[t?"removeAgents":"addAgents"]({id:l.chatQueue.id,ids:_.map(e,l.isVoiceRealtime()&&t?"UserId":"id"),penalty:l.penalty||0,realtime:o||!1}).$promise.then(function(){n.success({title:"ChatQueue properly "+(t?"removed":"added"),msg:"ChatQueue has been "+(t?"removed":"added")+"!"}),t||d()}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:chatQueue.ADDAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d()}e.$inject=["$mdDialog","toasty","api","chatQueue","chatQueues","realtime","$translate","Auth"],angular.module("app.chat").controller("ChatQueueagentaddController",e)}(),function(){"use strict";function e(e,n,a,t,i){var o=this;o.chatQueue=t,o.penalty=0,o.items=[],o.selectedItems=[],o.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("CHAT.ALL_TEAMS"),labelSelected:i.instant("CHAT.SELECTED_TEAMS"),transferCallback:function(e,t){a.chatQueue[t?"removeTeams":"addTeams"]({id:o.chatQueue.id,ids:_.map(e,"id"),penalty:o.penalty||0}).$promise.then(function(){n.success({title:"Team properly "+(t?"removed":"added"),msg:"Team has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:chatQueue.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},o.closeDialog=function(){e.hide()},a.chatQueue.getTeams({id:o.chatQueue.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return o.selectedItems=e.rows?e.rows:[],o.dualMultiselectOptions.selectedItems=o.selectedItems,a.team.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){o.items=e.rows?e.rows:[],o.dualMultiselectOptions.items=_.differenceBy(o.items,o.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","chatQueue","$translate"],angular.module("app.chat").controller("ChatQueueteamaddController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.chatQueue=d||e.params.chatQueue||{},c.selectedTab=e.params.tab||0,c.teamadddialog=function(e,t){n.show({controller:"ChatQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatQueues/edit/teamadd/teamadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{chatQueue:e,chatQueues:c.chatQueues?c.chatQueues.rows:[]}})},c.agentadddialog=function(e,t){n.show({controller:"ChatQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatQueues/edit/agentadd/agentadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{chatQueue:e,chatQueues:c.chatQueues?c.chatQueues.rows:[],realtime:!1}})},c.alert=r.info,c.gotoChatQueues=function(){e.go("app.chat.chatQueues")},c.saveChatQueue=function(){s.chatQueue.update({id:c.chatQueue.id},c.chatQueue).$promise.then(function(){r.success({title:"ChatQueue updated!",msg:c.chatQueue.name?c.chatQueue.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatQueue",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","chatQueue"],angular.module("app.chat").controller("ChatQueueController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.chatWebsites=r||{count:0,rows:[]},v.table="chatWebsites",v.listOrder="",v.listOrderAsc=null,v.selectedChatWebsites=[],v.query={fields:"createdAt,updatedAt,id,token,agentIdentifier,name,key,address,remote,ListId,fidelity,timeout,agentAlias,closingQuestion,formSubmitSuccessMessage,formSubmitFailureMessage,color,color_focus,color_button,textColor,fontSize,header_shape,showAgentAvatar,animation,defaultWhiteLabel,whiteLabel,defaultLogo,conditionAgreement,autoclose,enableUnmanagedNote,unmanagedMessage,skipUnmanaged,sendUnmanaged,enableCustomerWriting,waitingTitle,waitingMessage,closingMessage,noteTitle,placeholderMessage,skipMessageButton,enableRating,ratingType,ratingStarsNumber,enableFeedback,forwardTranscript,forwardTranscriptMessage,closingMessageButton,download_transcript,enableCustomerAttachment,enquiry_enable,enquiry_forwarding,enquiry_forwarding_address,name_title,username_placeholder,email_title,email_placeholder,header_online,hideWhenOffline,header_offline,start_chat_button,offline_chat_button,offlineMessageSubject,offlineMessageBody,header_offline,offline_message,message_title,enquiry_message_placeholder,enquiry_button,rating_message,rating_send,rating_skip,acceptMethod,acceptUrl,rejectMethod,rejectUrl,closeMethod,closeUrl,onlineForm,offlineForm,mapKey,mapKeyOffline,forwardTranscript,forwardOffline,forwardOfflineAddress,IntervalId,timezone,waitForTheAssignedAgent,description,notificationSound,notificationShake,notificationTemplate",sort:"-updatedAt",limit:10,page:1},v.arrayagentIdentifier=_.keyBy([{option:"WebsiteAlias",value:"'website_alias'"},{option:"AgentAlias",value:"'agent_alias'"},{option:"AgentFullname",value:"'agent_fullname'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayheader_shape=_.keyBy([{option:"Rounded",value:"'rounded'"},{option:"Squared",value:"'squared'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayratingType=_.keyBy([{option:"Star",value:"'star'"},{option:"Thumb",value:"'thumb'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayacceptMethod=_.keyBy([{option:"HTTP GET",value:"'GET'"},{option:"HTTP POST",value:"'POST'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayrejectMethod=_.keyBy([{option:"HTTP GET",value:"'GET'"},{option:"HTTP POST",value:"'POST'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraycloseMethod=_.keyBy([{option:"HTTP GET",value:"'GET'"},{option:"HTTP POST",value:"'POST'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.chat.chatWebsites.edit",{id:e.id,chatWebsite:e})},v.interactionsgoto=function(e,t){n.go("app.chat.chatWebsites.edit",{id:e.id,tab:9})},v.offlinemessagesgoto=function(e,t){n.go("app.chat.chatWebsites.edit",{id:e.id,tab:10})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the chatWebsite?").htmlContent("<b>"+(e.name||"chatWebsite")+"</b> will be deleted.").ariaLabel("delete chatWebsite").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getChatWebsites=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.chatWebsite.get(v.query,f).$promise},v.createOrEditChatWebsite=function(e,t){i.show({controller:"CreateOrEditChatWebsiteDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:t,chatWebsites:v.chatWebsites.rows,license:v.license,setting:v.setting}})},v.deleteChatWebsite=A,v.exportSelectedChatWebsites=function(){var e=angular.copy(v.selectedChatWebsites);return v.selectedChatWebsites=[],e},v.deleteSelectedChatWebsites=function(e){var t=i.confirm().title("Are you sure want to delete the selected chatWebsites?").htmlContent("<b>"+v.selectedChatWebsites.length+" selected</b> will be deleted.").ariaLabel("delete ChatWebsites").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedChatWebsites.forEach(function(e){A(e)}),v.selectedChatWebsites=[]})},v.deselectChatWebsites=function(){v.selectedChatWebsites=[]},v.selectAllChatWebsites=function(){v.selectedChatWebsites=v.chatWebsites.rows},l.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.lists=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.interval.get({fields:"id,name",sort:"name",IntervalId:"null"}).$promise.then(function(e){v.interval=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.chatWebsites=e||{count:0,rows:[]}}function A(e){l.chatWebsite.delete({id:e.id}).$promise.then(function(){_.remove(v.chatWebsites.rows,{id:e.id}),v.chatWebsites.count-=1,v.chatWebsites.rows.length||v.getChatWebsites(),c.success({title:"ChatWebsite deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEchatWebsite"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEchatWebsite",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getChatWebsites())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","chatWebsites","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.chat").controller("ChatWebsitesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CHAT.EDIT_CHATWEBSITE",m.chatWebsite=angular.copy(s),m.chatWebsites=o,m.newChatWebsite=!1,m.chatWebsite||(m.chatWebsite={remote:n.protocol()+"://"+n.host()+(n.port()?":"+n.port():""),header_shape:"rounded",IntervalId:"null",timezone:"null",waitForTheAssignedAgent:10,notificationSound:!0},m.title="CHAT.NEW_CHATWEBSITE",m.newChatWebsite=!0),t.params.id&&(m.chatWebsite.ChatWebsiteId=t.params.id),m.addNewChatWebsite=function(){m.errors=[],r.chatWebsite.save(m.chatWebsite).$promise.then(function(e){m.chatWebsites.unshift(e.toJSON()),i.success({title:"ChatWebsite properly created",msg:m.chatWebsite.name?m.chatWebsite.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatWebsite.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatWebsite.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveChatWebsite=function(){m.errors=[],r.chatWebsite.update({id:m.chatWebsite.id},m.chatWebsite).$promise.then(function(e){var t=_.find(m.chatWebsites,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"ChatWebsite properly saved!",msg:m.chatWebsite.name?m.chatWebsite.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatWebsite.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatWebsite.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteChatWebsite=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The chatWebsite will be deleted.").ariaLabel("Delete ChatWebsite").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.chatWebsite.delete({id:m.chatWebsite.id}).$promise.then(function(){_.remove(m.chatWebsites,{id:m.chatWebsite.id}),i.success({title:"ChatWebsite properly deleted!",msg:(m.chatWebsite.name||"chatWebsite")+" has been deleted!"}),u(m.chatWebsite)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatWebsite.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatWebsite.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.lists=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})}),r.interval.get({fields:"id,name",sort:"name",IntervalId:"null"}).$promise.then(function(e){m.interval=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","chatWebsites","chatWebsite","api","Auth","license","setting"],angular.module("app.chat").controller("CreateOrEditChatWebsiteDialogController",e)}(),function(){"use strict";function e(s,i,a,o,e){var r=this;function t(e,t){if(r.chatWebsiteApps.rows.length){var n=r.chatWebsiteApps.rows[t]?r.chatWebsiteApps.rows[t]:r.chatWebsiteApps.rows[0];i.show({controller:"EditChatWebsiteApp"+(n.appType||n.app).toLowerCase()+"DialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/apps/"+(n.appType||n.app).toLowerCase()+"/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsiteApp:n,chatWebsite:r.chatWebsite}}).then(function(e){e&&(e.id?r.chatWebsiteApps.rows[t]=e:r.chatWebsiteApps.rows.splice(t,0,e),l())}).catch(function(e){e&&o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:EDITMODALSHOW",msg:e.data?JSON.stringify(e.data):e.toString()})})}}function l(){for(var e=1,t=[],n=0;n<r.chatWebsiteApps.rows.length;n++,0){var a=r.chatWebsiteApps.rows[n],i=[],o=[];a.intervals="*,*,*,*"!==a.interval?[a.interval]:a.IntervalId?_.map(_.filter(r.intervals.rows,{IntervalId:a.IntervalId}),"interval"):[],a.context=r.chatWebsite.context,a.exten=r.chatWebsite.exten,a.type&&(a.type=a.type.toLowerCase()),a.priority=i.length?_.last(i).priority+1:e,e=(o.length?_.last(o).priority:a.priority)+1,t=_.concat(t,i,[a],o)}s.chatWebsite.addApplications({id:r.chatWebsite.id},_.sortBy(t,"priority")).$promise.then(function(e){r.chatWebsiteApps.rows=e.rows}).catch(function(e){console.error(e)})}function n(e){r.chatWebsiteApps=e||{count:0,rows:[]}}r.currentUser=e.getCurrentUser(),r.chatWebsite={},r.chatWebsiteApps={count:0,rows:[]},r.selectedChatWebsiteApps=[],r.query={sort:"priority"},r.apps=_.reject(_.sortBy([{app:"Interval",appType:"interval",types:["always","custom","list"],fields:[],isApp:!1},{app:"noop",appType:"noop",type:"noop",icon:"icon-apps",interval:"*,*,*,*",required:!0,isApp:!0,fields:[{title:"Value",name:"value",type:"text",param:0}]},{app:"system",appType:"system",type:"system",icon:"icon-apps",interval:"*,*,*,*",required:!0,isApp:!0,extraApi:[{name:"variables",route:"variable",filters:{fields:"id,name",sort:"name",nolimit:!0}}],fields:[{title:"Command",name:"command",type:"text",required:!0,param:0},{title:"Variable",name:"variable",type:"apiselect",values:"variables",value:"variable.name",option:"variable.name",defaultValues:[{value:"''",option:"None"}],defaultValue:"''",param:1}]},{app:"gotop",appType:"gotop",type:"goto",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Priority",name:"priority",type:"number",required:!0,min:0,param:0}]},{app:"gotoif",appType:"gotoif",type:"gotoif",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Condition",name:"condition",type:"text",required:!0,param:0},{title:"truepriority",name:"truepriority",type:"number",min:1,required:!0,param:1},{title:"falsepriority",name:"falsepriority",type:"number",min:1,required:!0,param:2}]},{app:"queue",appType:"queue",foreignKey:"ChatQueueId",type:"queue",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"queues",route:"chatQueue",filters:{fields:"id,name,type",sort:"name",nolimit:!0}}],fields:[{title:"Queue",name:"queue",type:"apiselect",values:"queues",value:"queue.name",option:"queue.name",defaultValue:300,required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",max:2147483,min:0,required:!0,defaultValue:300,param:1}]},{app:"agent",appType:"agent",type:"agent",foreignKey:"UserId",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"agents",route:"user",filters:{fields:"id,name",role:"agent",sort:"name",nolimit:!0}}],fields:[{title:"Agent",name:"agent",type:"apiselect",values:"agents",value:"agent.name",option:"agent.name",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",max:2147483,min:0,required:!0,defaultValue:30,param:1}]},{app:"close",appType:"close",type:"close",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Disposition",name:"disposition",type:"text",required:!0,param:0}]},{app:"autoreply",appType:"autoreply",type:"autoreply",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"times",name:"times",type:"select",defaultValue:"1",values:[{option:"One Time",value:"1"},{option:"Always",value:"0"}],required:!0,param:0},{title:"Text",name:"text",type:"textarea",maxlength:255,required:!0,param:1}]}],["app"]),{isApp:!1}),r.list={group:{name:"opt1",pull:"clone"},animation:100,sort:!1},r.applications={group:{name:"opt2",put:"opt1"},animation:100,onAdd:function(e){t(e,e.newIndex)},onSort:function(e){l()}},r.init=function(e){r.chatWebsite=e,r.query.id=e.id,r.query.isApp=!0,r.query.nolimit=!0,r.getChatWebsiteApps(),r.getIntervals()},r.deleteConfirm=function(e,t,n){var a=i.confirm().title("Are you sure want to delete the application?").htmlContent("<b>"+e.app+"</b> will be deleted.").ariaLabel("delete application").targetEvent(n).ok("OK").cancel("CANCEL");i.show(a).then(function(){r.chatWebsiteApps.rows.splice(t,1),l()},function(){console.log("CANCEL")})},r.getChatWebsiteApps=function(){r.promise=s.chatWebsite.getApplications(r.query,n).$promise},r.editChatWebsiteApp=t,r.editInterval=function(e,t){if(r.chatWebsiteApps.rows.length){var n=r.chatWebsiteApps.rows[t]?r.chatWebsiteApps.rows[t]:r.chatWebsiteApps.rows[0];i.show({controller:"EditChatWebsiteAppintervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/apps/interval/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:{interval:n.interval,IntervalId:n.IntervalId,application:!0},intervals:[]}}).then(function(e){e&&(n.interval=e.interval||"*,*,*,*",n.IntervalId=e.IntervalId||null,l())})}},r.deleteChatWebsiteApp=function(e){_.remove(r.chatWebsiteApps.rows,{id:e.id}),l(),o.success({title:"App deleted!",msg:e.app?e.app+" has been deleted!":""})},r.deleteSelectedChatWebsiteApps=function(e){var t=i.confirm().title("Are you sure want to delete the selected applications?").htmlContent("<b>"+r.selectedChatWebsiteApps.length+" selected</b> will be deleted.").ariaLabel("delete applications").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){r.selectedChatWebsiteApps.forEach(function(e){_.remove(r.chatWebsiteApps.rows,{id:e.id})}),r.selectedChatWebsiteApps=[],l()})},r.rewriteRouting=l,r.getIntervals=function(){return s.interval.get({fields:"id,interval,IntervalId"}).$promise.then(function(e){r.intervals=e}).catch(function(e){console.error(e)})}}e.$inject=["api","$mdDialog","$document","toasty","Auth"],angular.module("app.chat").controller("ChatWebsiteActionsController",e)}(),function(){"use strict";function e(e,a){var i=this;i.chatWebsite={},i.ngFlowOptions={maxChunkRetries:1,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,allowDuplicateUploads:!0},i.ngFlow={flow:{}},i.dropping=!1,i.fileAdded=function(e){var t=["png","jpg"];if(!_.includes(t,e.getExtension()))return a.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported only: "+t.join()}),!1;if(8388608<e.size)return a.error({title:"File too big",msg:"The max allowed size for image files is 8 Mb"}),!1;var n={id:e.uniqueIdentifier,file:e,type:"uploading"};return i.chatWebsite.images.unshift(n),!0},i.upload=function(){i.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+e.get("motion.token")},i.ngFlow.flow.upload()},i.fileSuccess=function(a,e){angular.forEach(i.chatWebsite.images,function(t,e){if(t.id===a.uniqueIdentifier){var n=new FileReader;n.readAsDataURL(t.file.file),n.onload=function(e){t.url=e.target.result},t.type="image"}})},i.init=function(e){i.chatWebsite=angular.copy(e),i.ngFlowOptions.target="/api/chat/websites/:id/avatar".replace(":id",i.chatWebsite.id),i.chatWebsite.images=[]}}e.$inject=["$cookies","toasty"],angular.module("app.chat").controller("ChatWebsiteagentAvatarController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="CHAT.EDIT_"+(e.appType||e.app).toUpperCase(),o.agent=angular.copy(e),o.agent.appdata)switch(o.agent.appType?o.agent.appType.toLowerCase():o.agent.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.agent.appdata.split(",");o.agent.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.agent.text=s.slice(1,s.length).join(",");break;case"message":o.agent.text=o.agent.appdata;break;case"set":o.agent.name=o.agent.appdata.split("=")[0],o.agent.value=o.agent.appdata.split("=")[1];break;case"agi":o.agent.project=o.agent.appdata;break;default:var r=o.agent.appdata.split(",");o.agent.agent=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.agent.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.agent.timeout=30;function l(e){t.hide(e)}o.agent.type&&"outbound"===o.agent.type.toLowerCase()&&"outbounddial"===o.agent.appType.toLowerCase()&&(o.agent.prefix=o.agent.phone?o.agent.phone.split("$")[0]:void 0,o.agent.callerId=o.agent.callerID?"CALLERID(all)="+o.agent.callerID:void 0),o.saveChatWebsiteApp=function(){o.errors=[];var e=[];o.agent.type&&"outbound"===o.agent.type.toLowerCase()&&"outboundDial"===o.agent.appType&&(o.agent.phone=a.cutdigits?(o.agent.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.agent.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.agent.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.agent.options+="U(xcally-mixmonitor-context)"):o.agent.options=o.agent.options.replace("U(xcally-mixmonitor-context)",""));var t=_.find(o.agents,{name:o.agent.agent});t&&(o.agent.UserId=t.id);if(o.agent.appType&&"custom"===o.agent.appType);else switch((o.agent.app||o.agent.appType).toLowerCase()){case"set":o.agent.appdata=o.agent.name+"="+o.agent.value;break;case"custom":break;default:e[0]=o.agent.agent,e[1]=o.agent.timeout,o.agent.appdata=e.join(",")}l(o.agent)},o.closeDialog=l,i.user.get({fields:"id,name",role:"agent",sort:"name",nolimit:"true"}).$promise.then(function(e){o.agents=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETagents",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","chatWebsiteApp","chatWebsite","api"],angular.module("app.chat").controller("EditChatWebsiteAppagentDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="CHAT.EDIT_"+(n.appType||n.app).toUpperCase(),o.autoreply=angular.copy(n),o.autoreply.appdata)switch(o.autoreply.appType?o.autoreply.appType.toLowerCase():o.autoreply.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.autoreply.appdata.split(",");o.autoreply.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.autoreply.text=s.slice(1,s.length).join(",");break;case"message":o.autoreply.text=o.autoreply.appdata;break;case"set":o.autoreply.name=o.autoreply.appdata.split("=")[0],o.autoreply.value=o.autoreply.appdata.split("=")[1];break;case"agi":o.autoreply.project=o.autoreply.appdata;break;default:var r=o.autoreply.appdata.split(",");o.autoreply.times=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.autoreply.text=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.autoreply.times=1;function l(e){t.hide(e)}o.autoreply.type&&"outbound"===o.autoreply.type.toLowerCase()&&"outbounddial"===o.autoreply.appType.toLowerCase()&&(o.autoreply.prefix=o.autoreply.phone?o.autoreply.phone.split("$")[0]:void 0,o.autoreply.callerId=o.autoreply.callerID?"CALLERID(all)="+o.autoreply.callerID:void 0),o.saveChatWebsiteApp=function(){o.errors=[];var e=[];o.autoreply.type&&"outbound"===o.autoreply.type.toLowerCase()&&"outboundDial"===o.autoreply.appType&&(o.autoreply.phone=a.cutdigits?(o.autoreply.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.autoreply.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.autoreply.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.autoreply.options+="U(xcally-mixmonitor-context)"):o.autoreply.options=o.autoreply.options.replace("U(xcally-mixmonitor-context)",""));if(o.autoreply.appType&&"custom"===o.autoreply.appType);else switch((o.autoreply.app||o.autoreply.appType).toLowerCase()){case"set":o.autoreply.appdata=o.autoreply.name+"="+o.autoreply.value;break;case"custom":break;default:e[0]=o.autoreply.times,e[1]=o.autoreply.text,o.autoreply.appdata=e.join(",")}l(o.autoreply)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","chatWebsiteApp","chatWebsite","api"],angular.module("app.chat").controller("EditChatWebsiteAppautoreplyDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="CHAT.EDIT_"+(n.appType||n.app).toUpperCase(),o.close=angular.copy(n),o.close.appdata)switch(o.close.appType?o.close.appType.toLowerCase():o.close.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.close.appdata.split(",");o.close.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.close.text=s.slice(1,s.length).join(",");break;case"message":o.close.text=o.close.appdata;break;case"set":o.close.name=o.close.appdata.split("=")[0],o.close.value=o.close.appdata.split("=")[1];break;case"agi":o.close.project=o.close.appdata;break;default:var r=o.close.appdata.split(",");o.close.disposition=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.close.type&&"outbound"===o.close.type.toLowerCase()&&"outbounddial"===o.close.appType.toLowerCase()&&(o.close.prefix=o.close.phone?o.close.phone.split("$")[0]:void 0,o.close.callerId=o.close.callerID?"CALLERID(all)="+o.close.callerID:void 0),o.saveChatWebsiteApp=function(){o.errors=[];var e=[];o.close.type&&"outbound"===o.close.type.toLowerCase()&&"outboundDial"===o.close.appType&&(o.close.phone=a.cutdigits?(o.close.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.close.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.close.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.close.options+="U(xcally-mixmonitor-context)"):o.close.options=o.close.options.replace("U(xcally-mixmonitor-context)",""));if(o.close.appType&&"custom"===o.close.appType);else switch((o.close.app||o.close.appType).toLowerCase()){case"set":o.close.appdata=o.close.name+"="+o.close.value;break;case"custom":break;default:e[0]=o.close.disposition,o.close.appdata=e.join(",")}l(o.close)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","chatWebsiteApp","chatWebsite","api"],angular.module("app.chat").controller("EditChatWebsiteAppcloseDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="CHAT.EDIT_"+(n.appType||n.app).toUpperCase(),o.gotoif=angular.copy(n),o.gotoif.appdata)switch(o.gotoif.appType?o.gotoif.appType.toLowerCase():o.gotoif.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.gotoif.appdata.split(",");o.gotoif.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.gotoif.text=s.slice(1,s.length).join(",");break;case"message":o.gotoif.text=o.gotoif.appdata;break;case"set":o.gotoif.name=o.gotoif.appdata.split("=")[0],o.gotoif.value=o.gotoif.appdata.split("=")[1];break;case"agi":o.gotoif.project=o.gotoif.appdata;break;default:var r=o.gotoif.appdata.split(",");o.gotoif.condition=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.gotoif.truepriority=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.gotoif.falsepriority=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10)}function l(e){t.hide(e)}o.gotoif.type&&"outbound"===o.gotoif.type.toLowerCase()&&"outbounddial"===o.gotoif.appType.toLowerCase()&&(o.gotoif.prefix=o.gotoif.phone?o.gotoif.phone.split("$")[0]:void 0,o.gotoif.callerId=o.gotoif.callerID?"CALLERID(all)="+o.gotoif.callerID:void 0),o.saveChatWebsiteApp=function(){o.errors=[];var e=[];o.gotoif.type&&"outbound"===o.gotoif.type.toLowerCase()&&"outboundDial"===o.gotoif.appType&&(o.gotoif.phone=a.cutdigits?(o.gotoif.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.gotoif.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.gotoif.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.gotoif.options+="U(xcally-mixmonitor-context)"):o.gotoif.options=o.gotoif.options.replace("U(xcally-mixmonitor-context)",""));if(o.gotoif.appType&&"custom"===o.gotoif.appType);else switch((o.gotoif.app||o.gotoif.appType).toLowerCase()){case"set":o.gotoif.appdata=o.gotoif.name+"="+o.gotoif.value;break;case"custom":break;default:e[0]=o.gotoif.condition,e[1]=o.gotoif.truepriority,e[2]=o.gotoif.falsepriority,o.gotoif.appdata=e.join(",")}l(o.gotoif)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","chatWebsiteApp","chatWebsite","api"],angular.module("app.chat").controller("EditChatWebsiteAppgotoifDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="CHAT.EDIT_"+(n.appType||n.app).toUpperCase(),o.gotop=angular.copy(n),o.gotop.appdata)switch(o.gotop.appType?o.gotop.appType.toLowerCase():o.gotop.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.gotop.appdata.split(",");o.gotop.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.gotop.text=s.slice(1,s.length).join(",");break;case"message":o.gotop.text=o.gotop.appdata;break;case"set":o.gotop.name=o.gotop.appdata.split("=")[0],o.gotop.value=o.gotop.appdata.split("=")[1];break;case"agi":o.gotop.project=o.gotop.appdata;break;default:var r=o.gotop.appdata.split(",");o.gotop.priority=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.gotop.type&&"outbound"===o.gotop.type.toLowerCase()&&"outbounddial"===o.gotop.appType.toLowerCase()&&(o.gotop.prefix=o.gotop.phone?o.gotop.phone.split("$")[0]:void 0,o.gotop.callerId=o.gotop.callerID?"CALLERID(all)="+o.gotop.callerID:void 0),o.saveChatWebsiteApp=function(){o.errors=[];var e=[];o.gotop.type&&"outbound"===o.gotop.type.toLowerCase()&&"outboundDial"===o.gotop.appType&&(o.gotop.phone=a.cutdigits?(o.gotop.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.gotop.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.gotop.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.gotop.options+="U(xcally-mixmonitor-context)"):o.gotop.options=o.gotop.options.replace("U(xcally-mixmonitor-context)",""));if(o.gotop.appType&&"custom"===o.gotop.appType);else switch((o.gotop.app||o.gotop.appType).toLowerCase()){case"set":o.gotop.appdata=o.gotop.name+"="+o.gotop.value;break;case"custom":break;default:e[0]=o.gotop.priority,o.gotop.appdata=e.join(",")}l(o.gotop)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","chatWebsiteApp","chatWebsite","api"],angular.module("app.chat").controller("EditChatWebsiteAppgotopDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;if(l.errors=[],l.title="TOOLS.EDIT_INTERVAL",l.interval=angular.copy(i),l.intervals=o,l.newInterval=!1,l.types=["always","custom","list"],l.daysOfWeek=a.getDaysOfWeek(),l.monthNumber=a.getMonthNumber(),l.monthName=a.getMonthName(),l.daysOfMonth=a.getDaysOfMonth(),l.interval)if("*,*,*,*"!==l.interval.interval){l.type="custom";var d=l.interval.interval.split(","),c=d[0],m=d[1],u=d[2],p=d[3];if("*"!==c){var g,v=c.split("-")[0],h=c.split("-")[1];(g=new Date).setHours(Number(v.split(":")[0])),g.setMinutes(Number(v.split(":")[1])),l.timeRangeFrom=g,(g=new Date).setHours(Number(h.split(":")[0])),g.setMinutes(Number(h.split(":")[1])),l.timeRangeTo=g}"*"!==m&&(l.dayOfWeekFrom=m.split("-")[0],l.dayOfWeekTo=m.split("-")[1]),"*"!==u&&(l.monthDayFrom=u.split("-")[0],l.monthDayTo=u.split("-")[1]),"*"!==p&&(l.monthFrom=p.split("-")[0],l.monthTo=p.split("-")[1])}else l.type="always";else l.interval={interval:"*,*,*,*"},l.type="always",l.title="TOOLS.NEW_INTERVAL",l.newInterval=!0;function b(){switch(l.type){case"always":case"list":return"*,*,*,*";case"custom":var e=[];if("*"!==l.timeRangeFrom&&l.timeRangeFrom&&l.timeRangeTo){var t=(l.timeRangeFrom.getHours()<10?"0":"")+l.timeRangeFrom.getHours()+":"+(l.timeRangeFrom.getMinutes()<10?"0":"")+l.timeRangeFrom.getMinutes(),n=(l.timeRangeTo.getHours()<10?"0":"")+l.timeRangeTo.getHours()+":"+(l.timeRangeTo.getMinutes()<10?"0":"")+l.timeRangeTo.getMinutes();e.push(t+"-"+n)}else e.push("*");return l.dayOfWeekFrom?l.dayOfWeekTo?e.push(l.dayOfWeekFrom+"-"+l.dayOfWeekTo):e.push(l.dayOfWeekFrom):e.push("*"),l.monthDayFrom?l.monthDayTo?e.push(l.monthDayFrom+"-"+l.monthDayTo):e.push(l.monthDayFrom):e.push("*"),l.monthFrom?l.monthTo?e.push(l.monthFrom+"-"+l.monthTo):e.push(l.monthFrom):e.push("*"),e.join()}}function f(e){t.hide(e)}e.params.id&&!l.interval.application&&(l.interval.IntervalId=e.params.id),l.interval.IntervalId&&l.interval.application&&(l.type="list"),l.addNewInterval=function(){l.errors=[],l.interval.interval=b(),r.interval.save(l.interval).$promise.then(function(e){l.intervals.push(e),s.success({title:"Interval properly created",msg:l.interval.name?l.interval.name+" has been created!":""}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}]})},l.saveInterval=function(){l.errors=[],l.interval.interval=b(),l.interval.application?("list"!==l.type&&(l.interval.IntervalId=null),f(l.interval)):r.interval.update({id:l.interval.id},l.interval).$promise.then(function(e){var t=_.find(l.intervals,{id:e.id});t&&_.merge(t,e),s.success({title:"Interval properly saved!",msg:"Interval has been saved!"}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}]})},l.closeDialog=f,l.interval.application&&r.interval.get({fields:"id,name,interval,IntervalId",IntervalId:"null",nolimit:!0}).$promise.then(function(e){l.intervals=e}).catch(function(e){console.error(e)})}e.$inject=["$state","$mdDialog","$mdToast","IndexFactory","interval","intervals","toasty","api"],angular.module("app.voice").controller("EditChatWebsiteAppintervalDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="CHAT.EDIT_"+(n.appType||n.app).toUpperCase(),o.noop=angular.copy(n),o.noop.appdata)switch(o.noop.appType?o.noop.appType.toLowerCase():o.noop.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.noop.appdata.split(",");o.noop.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.noop.text=s.slice(1,s.length).join(",");break;case"message":o.noop.text=o.noop.appdata;break;case"set":o.noop.name=o.noop.appdata.split("=")[0],o.noop.value=o.noop.appdata.split("=")[1];break;case"agi":o.noop.project=o.noop.appdata;break;default:var r=o.noop.appdata.split(",");o.noop.value=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.noop.type&&"outbound"===o.noop.type.toLowerCase()&&"outbounddial"===o.noop.appType.toLowerCase()&&(o.noop.prefix=o.noop.phone?o.noop.phone.split("$")[0]:void 0,o.noop.callerId=o.noop.callerID?"CALLERID(all)="+o.noop.callerID:void 0),o.saveChatWebsiteApp=function(){o.errors=[];var e=[];o.noop.type&&"outbound"===o.noop.type.toLowerCase()&&"outboundDial"===o.noop.appType&&(o.noop.phone=a.cutdigits?(o.noop.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.noop.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.noop.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.noop.options+="U(xcally-mixmonitor-context)"):o.noop.options=o.noop.options.replace("U(xcally-mixmonitor-context)",""));if(o.noop.appType&&"custom"===o.noop.appType);else switch((o.noop.app||o.noop.appType).toLowerCase()){case"set":o.noop.appdata=o.noop.name+"="+o.noop.value;break;case"custom":break;default:e[0]=o.noop.value,o.noop.appdata=e.join(",")}l(o.noop)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","chatWebsiteApp","chatWebsite","api"],angular.module("app.chat").controller("EditChatWebsiteAppnoopDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="CHAT.EDIT_"+(e.appType||e.app).toUpperCase(),o.queue=angular.copy(e),o.queue.appdata)switch(o.queue.appType?o.queue.appType.toLowerCase():o.queue.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.queue.appdata.split(",");o.queue.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.queue.text=s.slice(1,s.length).join(",");break;case"message":o.queue.text=o.queue.appdata;break;case"set":o.queue.name=o.queue.appdata.split("=")[0],o.queue.value=o.queue.appdata.split("=")[1];break;case"agi":o.queue.project=o.queue.appdata;break;default:var r=o.queue.appdata.split(",");o.queue.queue=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.queue.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.queue.queue=300,o.queue.timeout=300;function l(e){t.hide(e)}o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outbounddial"===o.queue.appType.toLowerCase()&&(o.queue.prefix=o.queue.phone?o.queue.phone.split("$")[0]:void 0,o.queue.callerId=o.queue.callerID?"CALLERID(all)="+o.queue.callerID:void 0),o.saveChatWebsiteApp=function(){o.errors=[];var e=[];o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outboundDial"===o.queue.appType&&(o.queue.phone=a.cutdigits?(o.queue.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.queue.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.queue.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.queue.options+="U(xcally-mixmonitor-context)"):o.queue.options=o.queue.options.replace("U(xcally-mixmonitor-context)",""));var t=_.find(o.queues,{name:o.queue.queue});t&&(o.queue[_.capitalize("chat")+"QueueId"]=t.id);if(o.queue.appType&&"custom"===o.queue.appType);else switch((o.queue.app||o.queue.appType).toLowerCase()){case"set":o.queue.appdata=o.queue.name+"="+o.queue.value;break;case"custom":break;default:e[0]=o.queue.queue,e[1]=o.queue.timeout,o.queue.appdata=e.join(",")}l(o.queue)},o.closeDialog=l,i.chatQueue.get({fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){o.queues=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","chatWebsiteApp","chatWebsite","api"],angular.module("app.chat").controller("EditChatWebsiteAppqueueDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="CHAT.EDIT_"+(e.appType||e.app).toUpperCase(),o.system=angular.copy(e),o.system.appdata)switch(o.system.appType?o.system.appType.toLowerCase():o.system.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.system.appdata.split(",");o.system.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.system.text=s.slice(1,s.length).join(",");break;case"message":o.system.text=o.system.appdata;break;case"set":o.system.name=o.system.appdata.split("=")[0],o.system.value=o.system.appdata.split("=")[1];break;case"agi":o.system.project=o.system.appdata;break;default:var r=o.system.appdata.split(",");o.system.command=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.system.variable=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.system.variable="";function l(e){t.hide(e)}o.system.type&&"outbound"===o.system.type.toLowerCase()&&"outbounddial"===o.system.appType.toLowerCase()&&(o.system.prefix=o.system.phone?o.system.phone.split("$")[0]:void 0,o.system.callerId=o.system.callerID?"CALLERID(all)="+o.system.callerID:void 0),o.saveChatWebsiteApp=function(){o.errors=[];var e=[];o.system.type&&"outbound"===o.system.type.toLowerCase()&&"outboundDial"===o.system.appType&&(o.system.phone=a.cutdigits?(o.system.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.system.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.system.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.system.options+="U(xcally-mixmonitor-context)"):o.system.options=o.system.options.replace("U(xcally-mixmonitor-context)",""));if(o.system.appType&&"custom"===o.system.appType);else switch((o.system.app||o.system.appType).toLowerCase()){case"set":o.system.appdata=o.system.name+"="+o.system.value;break;case"custom":break;default:e[0]=o.system.command,e[1]=o.system.variable,o.system.appdata=e.join(",")}l(o.system)},o.closeDialog=l,i.variable.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){o.variables=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvariables",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","chatWebsiteApp","chatWebsite","api"],angular.module("app.chat").controller("EditChatWebsiteAppsystemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.chatWebsite={},c.chatWebsiteChatCannedAnswers={count:0,rows:[]},c.selectedChatWebsiteChatCannedAnswers=[],c.query={fields:"createdAt,updatedAt,id,key,value,description,createdAt",limit:10,page:1},c.init=function(e){c.chatWebsite=e,c.query.id=c.chatWebsite.id,c.query.ChatWebsiteId=c.chatWebsite.id,c.getChatWebsiteChatCannedAnswers()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the chatCannedAnswer?").htmlContent("<b>"+(e.name||"chatCannedAnswer")+"</b> will be deleted.").ariaLabel("delete chatCannedAnswer").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getChatWebsiteChatCannedAnswers=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.chatWebsite.getAnswers(c.query,p).$promise},c.createOrEditChatWebsiteChatCannedAnswer=function(e,t){o.show({controller:"CreateOrEditChatCannedAnswerDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/chatCannedAnswers/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:c.chatWebsite,chatCannedAnswer:t,chatCannedAnswers:c.chatWebsiteChatCannedAnswers.rows,license:null,setting:null}})},c.exportSelectedChatWebsiteChatCannedAnswers=function(){var e=angular.copy(c.selectedChatWebsiteChatCannedAnswers);return c.selectedChatWebsiteChatCannedAnswers=[],e},c.deleteChatWebsiteChatCannedAnswer=g,c.deleteSelectedChatWebsiteChatCannedAnswers=function(e){var t=o.confirm().title("Are you sure want to delete the selected chatCannedAnswers?").htmlContent("<b>"+c.selectedChatWebsiteChatCannedAnswers.length+" selected</b> will be deleted.").ariaLabel("delete chatCannedAnswers").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedChatWebsiteChatCannedAnswers.forEach(function(e){g(e)}),c.selectedChatWebsiteChatCannedAnswers=[]})};var m=!0,u=1;function p(e){c.chatWebsiteChatCannedAnswers=e||{count:0,rows:[]}}function g(e){l.cannedAnswer.delete({id:e.id}).$promise.then(function(){_.remove(c.chatWebsiteChatCannedAnswers.rows,{id:e.id}),c.chatWebsiteChatCannedAnswers.count-=1,c.chatWebsiteChatCannedAnswers.rows.length||c.getChatWebsiteChatCannedAnswers(),r.success({title:"ChatCannedAnswer deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETchatWebsite"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatWebsite",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getChatWebsiteChatCannedAnswers())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.chat").controller("ChatWebsiteChatCannedAnswersController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CHAT.EDIT_CHATCANNEDANSWER",m.chatCannedAnswer=angular.copy(s),m.chatCannedAnswers=o,m.newChatCannedAnswer=!1,m.chatCannedAnswer||(m.chatCannedAnswer={},m.title="CHAT.NEW_CHATCANNEDANSWER",m.newChatCannedAnswer=!0),t.params.id&&(m.chatCannedAnswer.ChatWebsiteId=t.params.id),m.addNewChatCannedAnswer=function(){m.errors=[],r.cannedAnswer.save(m.chatCannedAnswer).$promise.then(function(e){m.chatCannedAnswers.unshift(e.toJSON()),i.success({title:"ChatCannedAnswer properly created",msg:m.chatCannedAnswer.name?m.chatCannedAnswer.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveChatCannedAnswer=function(){m.errors=[],r.cannedAnswer.update({id:m.chatCannedAnswer.id},m.chatCannedAnswer).$promise.then(function(e){var t=_.find(m.chatCannedAnswers,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"ChatCannedAnswer properly saved!",msg:m.chatCannedAnswer.name?m.chatCannedAnswer.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteChatCannedAnswer=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The chatCannedAnswer will be deleted.").ariaLabel("Delete ChatCannedAnswer").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.cannedAnswer.delete({id:m.chatCannedAnswer.id}).$promise.then(function(){_.remove(m.chatCannedAnswers,{id:m.chatCannedAnswer.id}),i.success({title:"ChatCannedAnswer properly deleted!",msg:(m.chatCannedAnswer.name||"chatCannedAnswer")+" has been deleted!"}),u(m.chatCannedAnswer)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","chatCannedAnswers","chatCannedAnswer","api","Auth","license","setting"],angular.module("app.chat").controller("CreateOrEditChatCannedAnswerDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.chatWebsite={},c.chatWebsiteChatDispositions={count:0,rows:[]},c.selectedChatWebsiteChatDispositions=[],c.query={fields:"createdAt,updatedAt,id,name,createdAt",limit:10,page:1},c.init=function(e){c.chatWebsite=e,c.query.id=c.chatWebsite.id,c.query.ChatWebsiteId=c.chatWebsite.id,c.getChatWebsiteChatDispositions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the chatDisposition?").htmlContent("<b>"+(e.name||"chatDisposition")+"</b> will be deleted.").ariaLabel("delete chatDisposition").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getChatWebsiteChatDispositions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.chatWebsite.getDispositions(c.query,p).$promise},c.createOrEditChatWebsiteChatDisposition=function(e,t){o.show({controller:"CreateOrEditChatDispositionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/chatDispositions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:c.chatWebsite,chatDisposition:t,chatDispositions:c.chatWebsiteChatDispositions.rows,license:null,setting:null}})},c.exportSelectedChatWebsiteChatDispositions=function(){var e=angular.copy(c.selectedChatWebsiteChatDispositions);return c.selectedChatWebsiteChatDispositions=[],e},c.deleteChatWebsiteChatDisposition=g,c.deleteSelectedChatWebsiteChatDispositions=function(e){var t=o.confirm().title("Are you sure want to delete the selected chatDispositions?").htmlContent("<b>"+c.selectedChatWebsiteChatDispositions.length+" selected</b> will be deleted.").ariaLabel("delete chatDispositions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedChatWebsiteChatDispositions.forEach(function(e){g(e)}),c.selectedChatWebsiteChatDispositions=[]})};var m=!0,u=1;function p(e){c.chatWebsiteChatDispositions=e||{count:0,rows:[]}}function g(e){l.chatDisposition.delete({id:e.id}).$promise.then(function(){_.remove(c.chatWebsiteChatDispositions.rows,{id:e.id}),c.chatWebsiteChatDispositions.count-=1,c.chatWebsiteChatDispositions.rows.length||c.getChatWebsiteChatDispositions(),r.success({title:"ChatDisposition deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETchatWebsite"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatWebsite",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getChatWebsiteChatDispositions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.chat").controller("ChatWebsiteChatDispositionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CHAT.EDIT_CHATDISPOSITION",m.chatDisposition=angular.copy(s),m.chatDispositions=o,m.newChatDisposition=!1,m.chatDisposition||(m.chatDisposition={},m.title="CHAT.NEW_CHATDISPOSITION",m.newChatDisposition=!0),t.params.id&&(m.chatDisposition.ChatWebsiteId=t.params.id),m.addNewChatDisposition=function(){m.errors=[],r.chatDisposition.save(m.chatDisposition).$promise.then(function(e){m.chatDispositions.unshift(e.toJSON()),i.success({title:"ChatDisposition properly created",msg:m.chatDisposition.name?m.chatDisposition.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatDisposition.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatDisposition.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveChatDisposition=function(){m.errors=[],r.chatDisposition.update({id:m.chatDisposition.id},m.chatDisposition).$promise.then(function(e){var t=_.find(m.chatDispositions,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"ChatDisposition properly saved!",msg:m.chatDisposition.name?m.chatDisposition.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatDisposition.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatDisposition.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteChatDisposition=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The chatDisposition will be deleted.").ariaLabel("Delete ChatDisposition").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.chatDisposition.delete({id:m.chatDisposition.id}).$promise.then(function(){_.remove(m.chatDispositions,{id:m.chatDisposition.id}),i.success({title:"ChatDisposition properly deleted!",msg:(m.chatDisposition.name||"chatDisposition")+" has been deleted!"}),u(m.chatDisposition)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatDisposition.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatDisposition.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","chatDispositions","chatDisposition","api","Auth","license","setting"],angular.module("app.chat").controller("CreateOrEditChatDispositionDialogController",e)}(),function(){"use strict";function e(n,e,a){var i=this;i.chatWebsite={},i.offlineForm={},i.buttons=[{type:"label",name:"Label",icon:"icon-label"},{type:"chooseFromList",name:"Select",icon:"icon-playlist-plus"},{type:"input",name:"Input",icon:"icon-keyboard"},{type:"textarea",name:"Textarea",icon:"icon-format-text"},{type:"multipleChoices",name:"Radio Buttons",icon:"icon-radiobox-marked"},{type:"checkboxes",name:"Checkboxes",icon:"icon-checkbox-multiple-marked-outline"},{type:"agreement",name:"Agreement",icon:"icon-checkbox-marked-outline"}],i.init=function(e){i.fields=[],i.customFields=[],i.uselessFields=["id","createdAt","updatedAt","ListId","CompanyId","$promise","$resolved"],i.chatWebsite=e,_.isEmpty(i.chatWebsite.offlineForm)&&(i.chatWebsite.offlineForm={items:[],fromKey:null});a.cmList.getCustomFields({id:i.chatWebsite.ListId}).$promise.then(function(e){for(var t=0;t<e.rows.length;t++)i.customFields.push({key:"cf_"+e.rows[t].id,value:e.rows[t].alias});return a.cmContact.describe().$promise}).then(function(e){for(var t=_.keys(e),n=0;n<t.length;n++)_.includes(i.uselessFields,t[n])||_.startsWith(t[n],"cf_")||i.fields.unshift({key:t[n],value:t[n]});return a.variable.get().$promise}).then(function(e){i.variables=e.rows}).catch(function(e){console.error(e)})},i.up=function(e,t){if(0!==t){var n=i.chatWebsite.offlineForm.items[t-1];i.chatWebsite.offlineForm.items[t]=n,i.chatWebsite.offlineForm.items[t-1]=angular.copy(e),i.chatWebsite.offlineForm.fromKey===t?i.chatWebsite.offlineForm.fromKey--:i.chatWebsite.offlineForm.fromKey===t-1&&i.chatWebsite.offlineForm.fromKey++}},i.down=function(e,t){if(t!==i.chatWebsite.offlineForm.items.length-1){var n=i.chatWebsite.offlineForm.items[t+1];i.chatWebsite.offlineForm.items[t]=n,i.chatWebsite.offlineForm.items[t+1]=angular.copy(e),i.chatWebsite.offlineForm.fromKey===t?i.chatWebsite.offlineForm.fromKey++:i.chatWebsite.offlineForm.fromKey===t+1&&i.chatWebsite.offlineForm.fromKey--}},i.add=function(e){i.chatWebsite.offlineForm.items.push({type:e,cmField:null,variable:null})},i.remove=function(e){var t=n.confirm().title("The component will be deleted.").textContent("Are you sure?").ariaLabel("Lucky day").ok("Ok").cancel("Cancel");n.show(t).then(function(){i.chatWebsite.offlineForm.items.splice(e,1)})}}e.$inject=["$mdDialog","$document","api"],angular.module("app.chat").controller("ChatWebsiteofflineFormController",e)}(),function(){"use strict";function e(n,e,a){var i=this;i.chatWebsite={},i.onlineForm={},i.buttons=[{type:"label",name:"Label",icon:"icon-label"},{type:"chooseFromList",name:"Select",icon:"icon-playlist-plus"},{type:"input",name:"Input",icon:"icon-keyboard"},{type:"textarea",name:"Textarea",icon:"icon-format-text"},{type:"multipleChoices",name:"Radio Buttons",icon:"icon-radiobox-marked"},{type:"checkboxes",name:"Checkboxes",icon:"icon-checkbox-multiple-marked-outline"},{type:"agreement",name:"Agreement",icon:"icon-checkbox-marked-outline"}],i.init=function(e){i.fields=[],i.customFields=[],i.uselessFields=["id","createdAt","updatedAt","ListId","CompanyId","$promise","$resolved"],i.chatWebsite=e,_.isEmpty(i.chatWebsite.onlineForm)&&(i.chatWebsite.onlineForm={items:[],fromKey:null});a.cmList.getCustomFields({id:i.chatWebsite.ListId}).$promise.then(function(e){for(var t=0;t<e.rows.length;t++)i.customFields.push({key:"cf_"+e.rows[t].id,value:e.rows[t].alias});return a.cmContact.describe().$promise}).then(function(e){for(var t=_.keys(e),n=0;n<t.length;n++)_.includes(i.uselessFields,t[n])||_.startsWith(t[n],"cf_")||i.fields.unshift({key:t[n],value:t[n]});return a.variable.get().$promise}).then(function(e){i.variables=e.rows}).catch(function(e){console.error(e)})},i.up=function(e,t){if(0!==t){var n=i.chatWebsite.onlineForm.items[t-1];i.chatWebsite.onlineForm.items[t]=n,i.chatWebsite.onlineForm.items[t-1]=angular.copy(e),i.chatWebsite.onlineForm.fromKey===t?i.chatWebsite.onlineForm.fromKey--:i.chatWebsite.onlineForm.fromKey===t-1&&i.chatWebsite.onlineForm.fromKey++}},i.down=function(e,t){if(t!==i.chatWebsite.onlineForm.items.length-1){var n=i.chatWebsite.onlineForm.items[t+1];i.chatWebsite.onlineForm.items[t]=n,i.chatWebsite.onlineForm.items[t+1]=angular.copy(e),i.chatWebsite.onlineForm.fromKey===t?i.chatWebsite.onlineForm.fromKey++:i.chatWebsite.onlineForm.fromKey===t+1&&i.chatWebsite.onlineForm.fromKey--}},i.add=function(e){i.chatWebsite.onlineForm.items.push({type:e,cmField:null,variable:null})},i.remove=function(e){var t=n.confirm().title("The component will be deleted.").textContent("Are you sure?").ariaLabel("Lucky day").ok("Ok").cancel("Cancel");n.show(t).then(function(){i.chatWebsite.onlineForm.fromKey===e&&(i.chatWebsite.onlineForm.fromKey=null),i.chatWebsite.onlineForm.items.splice(e,1),i.chatWebsite.onlineForm.items.length||(i.chatWebsite.onlineForm.fromKey=null)})}}e.$inject=["$mdDialog","$document","api"],angular.module("app.chat").controller("ChatWebsiteonlineFormController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.chatWebsite={},c.chatWebsiteInteractions={count:0,rows:[]},c.selectedChatWebsiteInteractions=[],c.query={fields:"createdAt,updatedAt,UserId,ContactId,ChatWebsiteId,id,createdAt,closedAt,Contact.firstName,Owner.name,disposition,ratingValue,ratingType,note,tag",sort:"-createdAt",includeAll:"true",limit:10,page:1},c.init=function(e){c.chatWebsite=e,c.query.id=c.chatWebsite.id,c.getChatWebsiteInteractions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the interaction?").htmlContent("<b>"+(e.name||"interaction")+"</b> will be deleted.").ariaLabel("delete interaction").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getChatWebsiteInteractions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.chatWebsite.getInteractions(c.query,p).$promise},c.createOrEditChatWebsiteInteraction=function(e,t){o.show({controller:"CreateOrEditInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/interactions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:c.chatWebsite,interaction:t,interactions:c.chatWebsiteInteractions.rows,license:null,setting:null}})},c.spychatInteraction=function(e,n){o.show({controller:"AgentGeneralInteractionController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/agent.general.interaction.dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,onShowing:function(e,t){e.vm.init({id:1,channel:"chat",interaction:n,spy:!0})}})},c.exportSelectedChatWebsiteInteractions=function(){var e=angular.copy(c.selectedChatWebsiteInteractions);return c.selectedChatWebsiteInteractions=[],e},c.deleteChatWebsiteInteraction=g,c.deleteSelectedChatWebsiteInteractions=function(e){var t=o.confirm().title("Are you sure want to delete the selected interactions?").htmlContent("<b>"+c.selectedChatWebsiteInteractions.length+" selected</b> will be deleted.").ariaLabel("delete interactions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedChatWebsiteInteractions.forEach(function(e){g(e)}),c.selectedChatWebsiteInteractions=[]})};var m=!0,u=1;function p(e){c.chatWebsiteInteractions=e||{count:0,rows:[]}}function g(e){l.chatInteraction.delete({id:e.id}).$promise.then(function(){_.remove(c.chatWebsiteInteractions.rows,{id:e.id}),c.chatWebsiteInteractions.count-=1,c.chatWebsiteInteractions.rows.length||c.getChatWebsiteInteractions(),r.success({title:"Interaction deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETchatWebsite"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatWebsite",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getChatWebsiteInteractions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.chat").controller("ChatWebsiteInteractionsController",e)}(),function(){"use strict";function e(e,a){var i=this;i.chatWebsite={},i.ngFlowOptions={maxChunkRetries:1,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,allowDuplicateUploads:!0},i.ngFlow={flow:{}},i.dropping=!1,i.fileAdded=function(e){var t=["png","jpg"];if(!_.includes(t,e.getExtension()))return a.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported only: "+t.join()}),!1;if(8388608<e.size)return a.error({title:"File too big",msg:"The max allowed size for image files is 8 Mb"}),!1;var n={id:e.uniqueIdentifier,file:e,type:"uploading"};return i.chatWebsite.images.unshift(n),!0},i.upload=function(){i.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+e.get("motion.token")},i.ngFlow.flow.upload()},i.fileSuccess=function(a,e){angular.forEach(i.chatWebsite.images,function(t,e){if(t.id===a.uniqueIdentifier){var n=new FileReader;n.readAsDataURL(t.file.file),n.onload=function(e){t.url=e.target.result},t.type="image"}})},i.init=function(e){i.chatWebsite=angular.copy(e),i.ngFlowOptions.target="/api/chat/websites/:id/logo".replace(":id",i.chatWebsite.id),i.chatWebsite.images=[]}}e.$inject=["$cookies","toasty"],angular.module("app.chat").controller("ChatWebsitelogoController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.chatWebsite={},c.chatWebsiteOfflineMessages={count:0,rows:[]},c.selectedChatWebsiteOfflineMessages=[],c.query={fields:"createdAt,updatedAt,id,ContactId,createdAt",sort:"-createdAt",limit:10,page:1},c.init=function(e){c.chatWebsite=e,c.query.id=c.chatWebsite.id,c.getChatWebsiteOfflineMessages()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the offlineMessage?").htmlContent("<b>"+(e.name||"offlineMessage")+"</b> will be deleted.").ariaLabel("delete offlineMessage").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getChatWebsiteOfflineMessages=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.chatWebsite.getOfflineMessages(c.query,p).$promise},c.createOrEditChatWebsiteOfflineMessage=function(e,t){o.show({controller:"CreateOrEditOfflineMessageDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/offlineMessages/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:c.chatWebsite,offlineMessage:t,offlineMessages:c.chatWebsiteOfflineMessages.rows,license:null,setting:null}})},c.showOfflineMessageChatWebsiteOfflineMessage=function(e,n){o.show({controller:"ShowOfflineMessageOfflineMessageDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/offlineMessages/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,resolve:{message:["apiResolver","$stateParams",function(e,t){return e.resolve("chatOfflineMessage@get",{fields:"id,body",id:n.id})}]}})},c.exportSelectedChatWebsiteOfflineMessages=function(){var e=angular.copy(c.selectedChatWebsiteOfflineMessages);return c.selectedChatWebsiteOfflineMessages=[],e},c.deleteChatWebsiteOfflineMessage=g,c.deleteSelectedChatWebsiteOfflineMessages=function(e){var t=o.confirm().title("Are you sure want to delete the selected offlineMessages?").htmlContent("<b>"+c.selectedChatWebsiteOfflineMessages.length+" selected</b> will be deleted.").ariaLabel("delete offlineMessages").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedChatWebsiteOfflineMessages.forEach(function(e){g(e)}),c.selectedChatWebsiteOfflineMessages=[]})},l.cmContact.get({fields:"id,firstName,lastName",nolimit:"true"}).$promise.then(function(e){c.contacts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontacts",msg:e.data?JSON.stringify(e.data):e.toString()})});var m=!0,u=1;function p(e){c.chatWebsiteOfflineMessages=e||{count:0,rows:[]}}function g(e){l.chatOfflineMessage.delete({id:e.id}).$promise.then(function(){_.remove(c.chatWebsiteOfflineMessages.rows,{id:e.id}),c.chatWebsiteOfflineMessages.count-=1,c.chatWebsiteOfflineMessages.rows.length||c.getChatWebsiteOfflineMessages(),r.success({title:"OfflineMessage deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETchatWebsite"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatWebsite",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getChatWebsiteOfflineMessages())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.chat").controller("ChatWebsiteOfflineMessagesController",e)}(),function(){"use strict";function e(t,e){this.title="CHAT.OFFLINE_MESSAGE",this.message=e,this.closeDialog=function(e){t.hide(e)}}e.$inject=["$mdDialog","message"],angular.module("app.chat").controller("ShowOfflineMessageOfflineMessageDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.chatWebsite={},c.chatWebsiteProactiveActions={count:0,rows:[]},c.selectedChatWebsiteProactiveActions=[],c.query={fields:"createdAt,updatedAt,id,name,type,selector,timeout,createdAt",limit:10,page:1},c.arraytype=_.keyBy([{option:"MouseOver",value:"'mouseOver'"},{option:"Timeout",value:"'timeout'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.init=function(e){c.chatWebsite=e,c.query.id=c.chatWebsite.id,c.query.ChatWebsiteId=c.chatWebsite.id,c.getChatWebsiteProactiveActions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the chatProactiveAction?").htmlContent("<b>"+(e.name||"chatProactiveAction")+"</b> will be deleted.").ariaLabel("delete chatProactiveAction").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getChatWebsiteProactiveActions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.chatWebsite.getProactiveActions(c.query,p).$promise},c.createOrEditChatWebsiteChatProactiveAction=function(e,t){o.show({controller:"CreateOrEditChatProactiveActionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/proactive/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:c.chatWebsite,chatProactiveAction:t,proactive:c.chatWebsiteProactiveActions.rows,license:null,setting:null}})},c.exportSelectedChatWebsiteProactiveActions=function(){var e=angular.copy(c.selectedChatWebsiteProactiveActions);return c.selectedChatWebsiteProactiveActions=[],e},c.deleteChatWebsiteChatProactiveAction=g,c.deleteSelectedChatWebsiteProactiveActions=function(e){var t=o.confirm().title("Are you sure want to delete the selected proactive?").htmlContent("<b>"+c.selectedChatWebsiteProactiveActions.length+" selected</b> will be deleted.").ariaLabel("delete proactive").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedChatWebsiteProactiveActions.forEach(function(e){g(e)}),c.selectedChatWebsiteProactiveActions=[]})};var m=!0,u=1;function p(e){c.chatWebsiteProactiveActions=e||{count:0,rows:[]}}function g(e){l.chatProactiveAction.delete({id:e.id}).$promise.then(function(){_.remove(c.chatWebsiteProactiveActions.rows,{id:e.id}),c.chatWebsiteProactiveActions.count-=1,c.chatWebsiteProactiveActions.rows.length||c.getChatWebsiteProactiveActions(),r.success({title:"ChatProactiveAction deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETchatWebsite"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatWebsite",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getChatWebsiteProactiveActions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.chat").controller("ChatWebsiteProactiveActionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CHAT.EDIT_CHATPROACTIVEACTION",m.chatProactiveAction=angular.copy(s),m.proactive=o,m.newChatProactiveAction=!1,m.chatProactiveAction||(m.chatProactiveAction={type:"mouseOver"},m.title="CHAT.NEW_CHATPROACTIVEACTION",m.newChatProactiveAction=!0),t.params.id&&(m.chatProactiveAction.ChatWebsiteId=t.params.id),m.addNewChatProactiveAction=function(){m.errors=[],r.chatProactiveAction.save(m.chatProactiveAction).$promise.then(function(e){m.proactive.unshift(e.toJSON()),i.success({title:"ChatProactiveAction properly created",msg:m.chatProactiveAction.name?m.chatProactiveAction.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatProactiveAction.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatProactiveAction.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveChatProactiveAction=function(){m.errors=[],r.chatProactiveAction.update({id:m.chatProactiveAction.id},m.chatProactiveAction).$promise.then(function(e){var t=_.find(m.proactive,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"ChatProactiveAction properly saved!",msg:m.chatProactiveAction.name?m.chatProactiveAction.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatProactiveAction.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatProactiveAction.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteChatProactiveAction=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The chatProactiveAction will be deleted.").ariaLabel("Delete ChatProactiveAction").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.chatProactiveAction.delete({id:m.chatProactiveAction.id}).$promise.then(function(){_.remove(m.proactive,{id:m.chatProactiveAction.id}),i.success({title:"ChatProactiveAction properly deleted!",msg:(m.chatProactiveAction.name||"chatProactiveAction")+" has been deleted!"}),u(m.chatProactiveAction)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.chatProactiveAction.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatProactiveAction.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","proactive","chatProactiveAction","api","Auth","license","setting"],angular.module("app.chat").controller("CreateOrEditChatProactiveActionDialogController",e)}(),function(){"use strict";function e(e){var t=this;t.chatWebsite={},t.init=function(e){t.chatWebsite=e,t.start="\n\x3c!-- START Motion Chat Script --\x3e",t.script='\n    <script src="'+t.chatWebsite.remote+"/api/chat/websites/"+t.chatWebsite.id+"/snippet?token="+t.chatWebsite.token+'"><\/script>',t.end="\n\x3c!-- START Motion Chat Script --\x3e"},t.info={},e.$watch("vm_ac.chatWebsite.remote",function(e){t.script='\n    <script src="'+t.chatWebsite.remote+"/api/chat/websites/"+t.chatWebsite.id+"/snippet?token="+t.chatWebsite.token+'"><\/script>'})}e.$inject=["$scope"],angular.module("app.chat").controller("ChatWebsiteScriptController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.chatWebsite=d||e.params.chatWebsite||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoChatWebsites=function(){e.go("app.chat.chatWebsites")},c.saveChatWebsite=function(){s.chatWebsite.update({id:c.chatWebsite.id},c.chatWebsite).$promise.then(function(){r.success({title:"ChatWebsite updated!",msg:c.chatWebsite.name?c.chatWebsite.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatWebsite",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.lists=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.template.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.templates=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtemplates",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.interval.get({fields:"id,name",sort:"name",IntervalId:"null"}).$promise.then(function(e){c.interval=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","chatWebsite"],angular.module("app.chat").controller("ChatWebsiteController",e)}(),function(){"use strict";function e(e,s,t,n,a,i,o,r,l,d,c,m,u,p,g,v){var h=this,b=["userpic","online","lastLoginAt","lastPauseAt","pauseType","lastPauseAt","internal","address","chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","chatCapacity","openchannelCapacity","mailCapacity","smsCapacity","faxCapacity","chatCurrentCapacity","openchannelCurrentCapacity","mailCurrentCapacity","smsCurrentCapacity","faxCurrentCapacity","chatStatus","openchannelStatus","mailStatus","smsStatus","faxStatus","voiceStatus","chatStatusTime","openchannelStatusTime","mailStatusTime","smsStatusTime","faxStatusTime","voiceStatusTime","queue","destconnectedlinenum"],f=["chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","online"];for(var A in h.availableStates=["ringing","inuse","busy","onhold","not_inuse"],h.pauses=o||{count:0,rows:[]},h.license=g,h.agents=r?_.keyBy(r.rows?r.rows:[],"id"):{},h.rpcAgents=l?_.keyBy(l.rows?l.rows:[],"id"):{},h.paginatedAgents={},h.load=!1,h.order=[],h.agentInternal={},h.agents)h.agents.hasOwnProperty(A)&&(h.agents[A].init=!0);h.query={limit:10,page:1,order:"fullname",globalStatusFilter:"",pauseTypeFilter:""},h.logout=function(e,t){return d.user.logout({id:e.id}).$promise.then(function(){m.success({title:"Agent logout",msg:e.fullname+"  properly logout"}),h.agents[e.id]&&(h.agents[e.id].online=!1),h.rpcAgents[e.id]&&(h.rpcAgents[e.id].online=!1),y()}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.queueAdd=function(e,t){n.show({controller:"AgentqueueaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/queueadd/queueadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{agent:e,agents:[],channel:"chat",realtime:!0,direction:"inbound"}})},h.pause=function(t,e){return d.user.pause({id:t.id,type:e}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.unPause=function(t){return d.user.unpause({id:t.id}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.showInfo=function(e){n.show(n.alert().clickOutsideToClose(!0).title("Legend").htmlContent("<div>TODO legend status + state</div>").ok("Ok").targetEvent(e))},h.getAgentStatus=C,h.getAgentGlobalStatus=x,h.isPause=S,h.checkPause=function(e){return"pause"===e},h.isPartialPause=function(e){return"*pause"===e},h.onSave=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(_.omit(e,f),b)),_.merge(h.rpcAgents[e.id],_.pick(_.omit(e,f),b)),x(h.agents[e.id]))},h.onUpdate=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(e,b)),_.merge(h.rpcAgents[e.id],_.pick(e,b)),x(h.agents[e.id]))},h.onInit=y,h.onConnect=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(_.merge(h.agents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])),_.merge(h.rpcAgents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])))},h.onComplete=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(h.agents[h.agentInternal[e.destaccountcode]]=_.omit(h.agents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]),h.rpcAgents[h.agentInternal[e.destaccountcode]]=_.omit(h.rpcAgents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]))},c.on("user:save",h.onSave),c.on("user:update",h.onUpdate),c.on("user:agentconnect",h.onConnect),c.on("user:agentcomplete",h.onComplete),y();var E=v(function(){h.load&&(h.load=!1,y())},999);function y(e){h.load=!1;var t,n,a=s.defer();h.promise=a.promise,h.filteredAgents=[],h.order=[],_.forIn(h.agents,function(e,t){h.rpcAgents[t]&&_.merge(e,_.pick(_.omit(h.rpcAgents[t],f),b)),x(e),e.online?(h.filteredAgents.push(e),h.agentInternal[e.internal]=t):e.globalStatusTime=_.toNumber(moment().format("x"))}),h.query.globalStatusFilter&&_.remove(h.filteredAgents,function(e){return e.globalStatus!==h.query.globalStatusFilter}),h.query.pauseTypeFilter&&_.remove(h.filteredAgents,function(e){return e.pauseType!==h.query.pauseTypeFilter}),h.query.filter&&_.remove(h.filteredAgents,function(e){return e.fullname.toLowerCase().indexOf(h.query.filter.toLowerCase())<0}),h.filteredAgents=(t=h.filteredAgents,n=_.startsWith(h.query.order,"-")?"desc":"asc",_.orderBy(t,[h.query.order.replace("-","")],[n]));var i=(h.query.page-1)*h.query.limit;h.paginatedAgents=_.drop(h.filteredAgents,i).slice(0,h.query.limit);for(var o=0;o<h.paginatedAgents.length;o+=1)h.order.push(h.paginatedAgents[o].id);a.resolve(),h.load=!0}function S(e){return"pause"===e||"*pause"===e}function T(e){return"idle"===e||"unknown"===e||"unavailable"===e||"ringing"===e||_.isNil(e)}function C(e,t){return"voice"===t?"idle"!==e[t+"Status"]?e[t+"Status"]:e[t+"Pause"]?e[t+"Status"]="pause":"idle":e[t+"Pause"]?e[t+"Status"]="pause":e[t+"Status"]}function x(e){var t="unknown";t=_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"pause":_.some([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"*pause":_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],T)?"idle":"busy",e.globalStatus!==t&&(e.globalStatus=t,e.init?(e.init=!1,e.globalStatusTime=S(t)?_.toNumber(moment(e.lastPauseAt).format("x")):_.max([e.voiceStatusTime,e.chatStatusTime,e.mailStatusTime,e.smsStatusTime,e.openchannelStatusTime,e.faxStatusTime])):e.globalStatusTime=_.toNumber(moment().format("x")))}e.$on("$destroy",function(){c.removeAllListeners("user:save"),c.removeAllListeners("user:update"),c.removeAllListeners("user:agentconnect"),c.removeAllListeners("user:agentcomplete"),E&&(v.cancel(E),E=null)})}e.$inject=["$scope","$q","$timeout","$mdDialog","$document","$filter","pauses","agents","rpcAgents","api","socket","toasty","helperClasses","Auth","license","$interval"],angular.module("app.voice").controller("AgentsChatRealtimeController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r,l,d,c,m){var u=this,p=["loggedIn","available","waiting","talking","pTalking","originated","message","dialActive","dialMethod","Trunk","paused"];function g(){var n=[];return _.forIn(u.queues,function(e,t){e.paused=0,e.loggedInDb=0,u.queues[t].agents={},n.push(l.chatQueue.getMembers({id:t}).$promise),u.rpcQueues[t]&&_.merge(e,_.pick(u.rpcQueues[t],p))}),t.all(n).then(function(e){for(var t=0;t<e.length;t+=1)for(var n=0;n<e[t].rows.length;n++)e[t].rows[n].paused&&u.queues[e[t].rows[n].ChatQueueId].paused++,u.queues[e[t].rows[n].ChatQueueId].loggedInDb++,u.queues[e[t].rows[n].ChatQueueId].agents[e[t].rows[n].UserId]=e[t].rows[n].ChatQueueId}).catch(function(e){console.error(e)})}u.count=s.count?s.count:0,u.queues=s?_.keyBy(s.rows?s.rows:[],"id"):{},u.rpcQueues=r?_.keyBy(r.rows?r.rows:[],"id"):{},m.hasRole("admin")?u.query={type:"inbound",sort:"-updatedAt",limit:10,page:1}:u.query={id:m.getCurrentUser().id,channel:"chat",type:"inbound",sort:"-updatedAt",limit:10,page:1},u.success=b,u.getQueues=function(){u.query.offset=(u.query.page-1)*u.query.limit,m.hasRole("admin")?u.promise=l.chatQueue.get(u.query,b).$promise:u.promise=l.user.getQueues(u.query,b).$promise},u.createOrEditChatQueue=function(e,t){a.show({controller:"CreateOrEditChatQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatQueues/create/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatQueue:t,chatQueues:_.values(u.queues),license:null,setting:null}})},u.agentAdd=function(e,t){a.show({controller:"ChatQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatQueues/edit/agentadd/agentadd.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatQueue:t,chatQueues:u.queues?u.queues.rows:[],realtime:!1}})},u.updateQueue=function(e){return l.chatQueue.update(e).$promise.then(function(){c.success({title:"Queue properly updated!",msg:e.name?e.name+" has been updated!":""})}).catch(function(e){c.error({title:"Error creating queue!",msg:e.message})})},u.onSave=function(e){u.queues[e.id]&&_.merge(u.queues[e.id],_.pick(e,p))},u.onSaveMember=function(e){u.queues[e.ChatQueueId]&&u.queues[e.ChatQueueId].loggedInDb++},u.onRemoveMember=function(e){u.queues[e.ChatQueueId]&&u.queues[e.ChatQueueId].loggedInDb--},u.onPause=function(n){console.log("onPause",n),n.voicePause?_.forIn(u.queues,function(e,t){e.agents[n.id]&&(e.paused+=1,console.log("pause"))}):n.voicePause||_.forIn(u.queues,function(e,t){e.agents[n.id]&&0<e.paused&&(e.paused-=1,console.log("unpause"))})},u.onLogin=function(e){console.log("onLogged",e),u.queues[e.ChatQueueId]&&(u.queues[e.ChatQueueId].loggedInDb+=1,u.queues[e.ChatQueueId].agents[e.UserId]=e.ChatQueueId)},u.onLogout=function(e){console.log("onLogout",e),u.queues[e.ChatQueueId]&&0<u.queues[e.ChatQueueId].loggedInDb&&(u.queues[e.ChatQueueId].loggedInDb-=1,delete u.queues[e.ChatQueueId].agents[e.UserId])},u.$onInit=g,u.order=[],_.forIn(u.queues,function(e,t){u.order.push(e.id)}),d.on("chat_queue:save",u.onSave),d.on("userChatQueue:save",u.onSaveMember),d.on("userChatQueue:remove",u.onRemoveMember),d.on("user:update",u.onPause),d.on("userVoiceQueue:remove",u.onLogout),d.on("userVoiceQueue:save",u.onLogin);var v=!0,h=1;function b(e){if(u.count=e.count,u.queues=e?_.keyBy(e.rows?e.rows:[],"id"):{},e.rows){u.order=[];for(var t=0;t<e.rows.length;t++)u.order.push(e.rows[t].id)}g()}e.$watch("vm.query.filter",function(e,t){v?n(function(){v=!1}):(t||(h=u.query.page),e!==t&&(u.query.page=1),e||(u.query.page=h),u.getQueues())}),e.$on("$destroy",function(){d.removeAllListeners("chat_queue:save"),d.removeAllListeners("userChatQueue:remove"),d.removeAllListeners("userChatQueue:save"),d.removeAllListeners("user:update"),d.removeAllListeners("userVoiceQueue:remove"),d.removeAllListeners("userVoiceQueue:save")})}e.$inject=["$scope","$timeout","$mdDialog","$q","$document","$interval","queues","rpcQueues","api","socket","toasty","Auth"],angular.module("app.chat").controller("QueuesChatRealtimeController",e)}(),function(){"use strict";angular.module("app.auth").factory("helperClasses",function(){return{status:{registered:"green-300-fg icon-checkbox-marked-circle",unregistered:"red-300-fg icon-close-circle",lagged:"red-300-fg icon-close-circle",reachable:"green-300-fg icon-checkbox-marked-circle",unreachable:"red-300-fg icon-close-circle",unknown:"grey-fg icon-minus-circle"},state:{unknown:"grey-fg icon-phone-hangup",not_inuse:"green-300-fg icon-phone-hangup",inuse:"red-300-fg icon-phone-in-talk",busy:"red-300-fg icon-phone-locked",invalid:"grey-fg icon-phone-hangup",unavailable:"grey-fg icon-phone-hangup",ringing:"blue-300-fg icon-phone-incoming",ringinuse:"blue-300-fg icon-phone-incoming",onhold:"blue-300-fg icon-phone-paused"},channelStatus:{ring:"blue-300-fg icon-phone-incoming",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"},channelStatusOut:{ring:"blue-300-fg icon-phone-outgoing",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"}}})}(),function(){"use strict";function e(e,n,t){switch(t.disconnect(),t.connect(),this.selectedTab=0,n.current.name){case"app.chat.realtime.agents":this.selectedTab=0;break;case"app.chat.realtime.queues":this.selectedTab=1;break;default:this.selectedTab=0,n.go("app.chat.realtime.agents")}e.$watch("vm.selectedTab",function(e,t){if(e!==t)switch(e){case 0:n.go("app.chat.realtime.agents");break;case 1:n.go("app.chat.realtime.queues");break;default:n.go("app.chat.realtime.agents")}})}e.$inject=["$scope","$state","socket"],angular.module("app.chat").controller("ChatRealtimeController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.companies=r||{count:0,rows:[]},v.table="companies",v.listOrder="",v.listOrderAsc=null,v.selectedCompanies=[],v.query={fields:"createdAt,updatedAt,id,name,phone,vat,fax,companyId,type,website,emailDomain,email,description,sStreet,sPostalCode,sCity,sCountry,street,postalCode,city,country",sort:"-updatedAt",limit:10,page:1},v.editstate=function(e,t){n.go("app.contactmanager.companies.edit",{id:e.id,company:e})},v.gotocontactsgoto=function(e,t){n.go("app.contactmanager.contacts",{CompanyId:e.id})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the company?").htmlContent("<b>"+(e.name||"company")+"</b> will be deleted.").ariaLabel("delete company").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getCompanies=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.cmCompany.get(v.query,f).$promise},v.createOrEditCompany=function(e,t){i.show({controller:"CreateOrEditCompanyDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/companies/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{company:t,companies:v.companies.rows,license:v.license,setting:v.setting}})},v.deleteCompany=A,v.exportSelectedCompanies=function(){var e=angular.copy(v.selectedCompanies);return v.selectedCompanies=[],e},v.deleteSelectedCompanies=function(e){var t=i.confirm().title("Are you sure want to delete the selected companies?").htmlContent("<b>"+v.selectedCompanies.length+" selected</b> will be deleted.").ariaLabel("delete Companys").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedCompanies.forEach(function(e){A(e)}),v.selectedCompanies=[]})},v.deselectCompanies=function(){v.selectedCompanies=[]},v.selectAllCompanies=function(){v.selectedCompanies=v.companies.rows};var h=!0,b=1;function f(e){v.companies=e||{count:0,rows:[]}}function A(e){l.cmCompany.delete({id:e.id}).$promise.then(function(){_.remove(v.companies.rows,{id:e.id}),v.companies.count-=1,v.companies.rows.length||v.getCompanies(),c.success({title:"Company deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEcmCompany"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEcmCompany",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getCompanies())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","companies","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.contactmanager").controller("CompaniesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CONTACTMANAGER.EDIT_COMPANY",m.company=angular.copy(s),m.companies=o,m.newCompany=!1,m.company||(m.company={},m.title="CONTACTMANAGER.NEW_COMPANY",m.newCompany=!0),m.addNewCompany=function(){m.errors=[],r.cmCompany.save(m.company).$promise.then(function(e){m.companies.unshift(e.toJSON()),i.success({title:"Company properly created",msg:m.company.name?m.company.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmCompany.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmCompany.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveCompany=function(){m.errors=[],r.cmCompany.update({id:m.company.id},m.company).$promise.then(function(e){var t=_.find(m.companies,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Company properly saved!",msg:m.company.name?m.company.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmCompany.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmCompany.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteCompany=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The company will be deleted.").ariaLabel("Delete Company").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.cmCompany.delete({id:m.company.id}).$promise.then(function(){_.remove(m.companies,{id:m.company.id}),i.success({title:"Company properly deleted!",msg:(m.company.name||"company")+" has been deleted!"}),u(m.company)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmCompany.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmCompany.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","companies","company","api","Auth","license","setting"],angular.module("app.contactmanager").controller("CreateOrEditCompanyDialogController",e)}(),function(){"use strict";function e(n,e,t,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=e.protocol()+"://"+e.host(),c.company=d||n.params.company||{},c.selectedTab=n.params.tab||0,c.gotogoto=function(e,t){n.go("app.contactmanager.contacts",{CompanyId:e.id})},c.alert=r.info,c.gotoCompanies=function(){n.go("app.contactmanager.companies")},c.saveCompany=function(){s.cmCompany.update({id:c.company.id},c.company).$promise.then(function(){r.success({title:"Company updated!",msg:c.company.name?c.company.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcmCompany",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","company"],angular.module("app.contactmanager").controller("CompanyController",e)}(),function(){"use strict";function e(t,i,n,a,o,s,e,r,l,d,c,m,u,p,g,v){var h=this;h.currentUser=p.getCurrentUser();h.license=v,h.ngFlowOptions={target:"api/cm/contacts/upload",singleFile:!0,maxChunkRetries:1,chunkSize:62914560,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,allowDuplicateUploads:!0},h.contacts=e||{count:0,rows:[]},h.options={hidden:!1,hover:!1,isOpen:!1},h.table="cm_contacts",h.selectedContacts=[],h.lists=r||{rows:[],count:0},h.companies=d||{rows:[],count:0},h.tags=m||{rows:[],count:0},h.listsMap=l,h.companiesMap=c,h.selectedTags=[],h.selectedList=null,h.selectedCompany=null,h.query=_.merge({sort:"-updatedAt",limit:10,offset:0,page:1},g),h.editdialog=function(e,t){a.go("app.contactmanager.contacts.edit",{id:e.id})},h.deleteconfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the contact?").htmlContent("<b>"+(e.firstName||e.email||e.phone||"Contact")+"</b> will be deleted.").ariaLabel("delete contact").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){E(e)})},h.success=A,h.getContacts=function(){h.query.offset=(h.query.page-1)*h.query.limit,h.promise=s.cmContact.get(h.query,A).$promise},h.mergeContact=function(e,t){o.show({controller:"MergeContactDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/merge/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,resolve:{contact:["apiResolver",function(e){return e.resolve("cmContact@get",{id:t.id})}],lists:["apiResolver",function(e){return e.resolve("cmList@get",{fields:"id,name"})}]},locals:{contacts:h.contacts.rows}})},h.duplicateContact=function(e,t){o.show({controller:"DuplicateContactDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/duplicate/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,resolve:{contact:["apiResolver",function(e){return e.resolve("cmContact@get",{id:t.id})}],lists:["apiResolver",function(e){return e.resolve("cmList@get",{fields:"id,name"})}]},locals:{contacts:h.contacts.rows}})},h.createOrEditContact=function(e,t){t&&t.dateOfBirth&&(t.dateOfBirth=new Date(t.dateOfBirth));o.show({controller:"CreateOrEditContactDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/create/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{ListId:h.query.ListId||a.params.ListId,CompanyId:h.query.CompanyId||a.params.CompanyId,contact:t,contacts:h.contacts.rows,setting:null},resolve:{lists:["apiResolver",function(e){return e.resolve("cmList@get",{fields:"id,name"})}],companies:["apiResolver",function(e){return e.resolve("cmCompany@get",{fields:"id,name"})}]}})},h.deleteContact=E,h.exportSelectedContacts=function(){var e=angular.copy(h.selectedContacts);return h.selectedContacts=[],e},h.deleteSelectedContacts=function(e){var t=o.confirm().title("Are you sure want to delete the selected contacts?").htmlContent("<b>"+h.selectedContacts.length+" selected</b> will be deleted.").ariaLabel("delete Contacts").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){h.selectedContacts.forEach(function(e){E(e)}),h.selectedContacts=[]})},h.deselectContacts=function(){h.selectedContacts=[]},h.selectAllContacts=function(){h.selectedContacts=h.contacts.rows},h.createTag=function(e){var t=o.prompt().title("What would you name your tag?").placeholder("Tag name").ariaLabel("Tag name").targetEvent(e).ok("Ok").cancel("Cancel");return o.show(t).then(function(e){if(e)return s.tag.save({name:e});u.error({title:"Error creating tag!",msg:"Invalid tag name."})}).then(function(e){e&&(h.tags.rows.push(e),u.success({title:"Tag properly created!",msg:e.tag?e.name+" has been created!":""}))})},h.createList=function(e){var t=o.prompt().title("What would you name your list?").placeholder("List name").ariaLabel("List name").targetEvent(e).ok("Ok").cancel("Cancel");return o.show(t).then(function(e){if(e)return s.cmList.save({name:e});u.error({title:"Error creating list!",msg:"Invalid list name."})}).then(function(e){e&&(h.lists.rows.push(e),u.success({title:"List properly created!",msg:e.name?e.name+" has been created!":""}))})},h.createCompany=function(e){var t=o.prompt().title("What would you name your company?").placeholder("Company name").ariaLabel("Company name").targetEvent(e).ok("Ok").cancel("Cancel");return o.show(t).then(function(e){if(e)return s.cmCompany.save({name:e});u.error({title:"Error creating company!",msg:"Invalid company name."})}).then(function(e){e&&(h.companies.rows.push(e),u.success({title:"Company properly created!",msg:e.name?e.name+" has been created!":""}))})},h.uploadContacts=function(e){o.show({controller:"UploadContactsDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/upload/upload.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!1,locals:{lists:r,companies:d}}).then(function(){h.getContacts()}).catch(function(e){console.error()})},h.importContacts=function(e,t,n){var a=JSON.parse(t);o.show({controller:"ImportContactsDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/import/import.html",parent:angular.element(i.body),clickOutsideToClose:!1,locals:{lists:r,companies:d,file:a.file,fields:a.fields,license:h.license}}).then(function(){h.getContacts()}).catch(function(e){console.error()})},h.hasPermission=function(){return p.hasPermission(303)||p.hasRole("admin")},a.params.ListId&&(h.selectedList=a.params.ListId),a.params.CompanyId&&(h.selectedCompany=a.params.CompanyId),t.$watch("vm.options.isOpen",function(e){e?n(function(){t.tooltipVisible=h.options.isOpen},600):t.tooltipVisible=h.options.isOpen});var b=!0,f=1;function A(e){h.contacts=e||{count:0,rows:[]}}function E(e){s.cmContact.delete({id:e.id}).$promise.then(function(){_.remove(h.contacts.rows,{id:e.id}),h.contacts.count-=1,h.contacts.rows.length||h.getContacts(),u.success({title:"Contact deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){h.errors=e.data.errors||[{message:e.toString(),type:"api.contact.delete"}];for(var t=0;t<e.data.errors.length;t++)u.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else u.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.contact.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm.query.filter",function(e,t){b?n(function(){b=!1}):(t||(f=h.query.page),e!==t&&(h.query.page=1),e||(h.query.page=f),h.getContacts())},!0),t.$watch("vm.selectedList",function(e,t){e!==t&&(h.query.ListId=h.selectedList||void 0,h.getContacts())}),t.$watch("vm.selectedCompany",function(e,t){e!==t&&(h.query.CompanyId=h.selectedCompany||void 0,h.getContacts())}),t.$watch("vm.selectedTags",function(e,t){(e.length||t.length)&&(h.query.tags=h.selectedTags.length?h.selectedTags.join():void 0,h.getContacts())})}e.$inject=["$scope","$document","$timeout","$state","$mdDialog","api","contacts","lists","listsMap","companies","companiesMap","tags","toasty","Auth","$stateParams","license"],angular.module("app.contactmanager").controller("ContactsController",e)}(),function(){"use strict";function e(n,a,e,t,i,o,s,r,l){var d=this;function c(){n.hide()}d.errors=[],d.title="CONTACTMANAGER.EDIT_CONTACT",d.contact=angular.copy(o),d.contacts=e||{rows:[],count:0},d.lists=t||{rows:[],count:0},d.companies=i||{rows:[],count:0},d.customFields={rows:[],count:0},d.newContact=!1,d.contact?(delete d.contact.List,d.ListId=d.contact.ListId||void 0):(d.contact={ListId:s?parseInt(s,10):void 0,CompanyId:r?parseInt(r,10):void 0},d.title="CONTACTMANAGER.NEW_CONTACT",d.newContact=!0),d.addNewContact=function(){d.errors=[],l.cmContact.save(d.contact).$promise.then(function(e){d.contacts.unshift(e),a.success({title:"Contact properly created",msg:d.contact.name?d.contact.name+" has been created!":""}),c()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){d.errors=e.data.errors||[{message:e.toString(),type:"api.user.save"}];for(var t=0;t<e.data.errors.length;t++)a.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.contacts.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},d.saveContact=function(){d.errors=[],l.cmContact.update({id:d.contact.id},d.contact).$promise.then(function(e){var t=_.find(d.contacts,{id:e.id});t&&_.merge(t,e),a.success({title:"Contact properly saved!",msg:d.contact.name?d.contact.name+" has been saved!":""}),c()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){d.errors=e.data.errors||[{message:e.toString(),type:"api.contact.update"}];for(var t=0;t<e.data.errors.length;t++)a.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.contact.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},d.deleteContact=function(e){d.errors=[];var t=n.confirm().title("Are you sure?").content("The contact will be deleted.").ariaLabel("Delete Contact").ok("Delete").cancel("Cancel").targetEvent(e);n.show(t).then(function(){l.cmContact.delete({id:d.contact.id}).$promise.then(function(){_.remove(d.contacts,{id:d.contact.id}),a.success({title:"Contact properly deleted!",msg:d.contact.name?d.contact.name+" has been deleted!":""}),c()}).catch(function(e){console.error(e),d.errors=e.data.errors||[{message:e.toString(),type:"api.contact.delete"}]})},function(){})},d.closeDialog=c,d.getCustomFields=function(e){{if(e)return l.cmList.getCustomFields({id:e}).$promise.then(function(e){e&&(d.customFields=e)}).catch(function(e){console.error(e)});d.customFields={rows:[],count:0}}},d.getDateFromString=function(e){return new Date(e)}}e.$inject=["$mdDialog","toasty","contacts","lists","companies","contact","ListId","CompanyId","api"],angular.module("app.tools").controller("CreateOrEditContactDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o){var s=this;function r(){e.hide()}s.errors=[],s.title="CONTACTMANAGER.COPY_CONTACT",s.contact=angular.copy(n),s.lists=i||{rows:[],count:0},s.addNewContact=function(){s.errors=[],delete s.contact.id,s.contact.tags&&!s.contact.tags.length&&delete s.contact.tags;o.cmContact.save(s.contact).$promise.then(function(e){a.unshift(e),t.success({title:"Contact properly created",msg:s.contact.name?s.contact.name+" has been created!":""}),r()}).catch(function(e){console.error(e),s.errors=e.data.errors||[{message:e.toString(),type:"api.contact.save"}]})},s.closeDialog=r}e.$inject=["$mdDialog","toasty","contact","contacts","lists","api"],angular.module("app.tools").controller("DuplicateContactDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;function d(e){a.hide(e)}l.errors=[],l.title="CONTACTMANAGER.EDIT_HOPPER",l.hopper=angular.copy(s),l.hoppers=o,l.newHopper=!1,l.hopper||(l.hopper={},l.title="CONTACTMANAGER.NEW_HOPPER",l.newHopper=!0),l.saveHopper=function(){l.errors=[],r.cmHopper.update({id:l.hopper.id},l.hopper).$promise.then(function(e){var t=_.find(l.hoppers,{id:e.id});t&&_.merge(t,e),i.success({title:"Hopper properly saved!",msg:l.hopper.name?l.hopper.name+" has been saved!":""}),d(e)}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.cmHopper.update"}]})},l.getDateFromString=function(e){return new Date(e)},l.closeDialog=d}e.$inject=["$scope","$state","$location","$mdDialog","toasty","hoppers","hopper","api"],angular.module("app.contactmanager.contacts").controller("EditHopperDialogController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d,c,m,u,p,g,v,h,b){var f=this;f.license=b,f.journey=[],f.contact=r||{},f.hoppers=l||{rows:[],count:0},f.finals=d||{rows:[],count:0},f.histories=c||{rows:[],count:0},f.companies=u||{rows:[],count:0},f.lists=p||{rows:[],count:0},f.customFields=g||{rows:[],count:0},f.tags=v||{rows:[],count:0},f.jscriptySessions=h||{rows:[],count:0},f.timelineOptions={scrollEl:"#interaction-content"},f.arraypriority=_.keyBy([{option:"Highest",value:"'4'"},{option:"High",value:"'3'"},{option:"Medium",value:"'2'"},{option:"Low",value:"'1'"},{option:"Lowest",value:"'0'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),f.queryHopper={fields:"id,phone,scheduledat,priority,recallme,VoiceQueueId,CampaignId,UserId",sort:"-updatedAt",limit:10,page:1},f.queryFinal={fields:"id,uniqueid,calleridnum,statedesc,starttime,disposition",sort:"-id",limit:10,page:1},f.queryHistory={fields:"id,uniqueid,calleridnum,statedesc,scheduledat,starttime,endtime",sort:"-id",limit:10,page:1},f.queryJscriptySession={fields:"id,starttime,endtime,membername,projectname",sort:"-starttime",limit:10,page:1},f.selectedTab=t.params.tab||0,f.gotoContacts=function(){t.go("app.contactmanager.contacts",{},{reload:!0,notify:!0})},f.duplicateContact=function(e){i.show({controller:"DuplicateContactDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/duplicate/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,resolve:{lists:["apiResolver",function(e){return e.resolve("cmList@get",{fields:"id,name"})}]},locals:{contacts:m.rows,contact:r}})},f.saveContact=function(){s.cmContact.update({id:f.contact.id},f.contact).$promise.then(function(){o.success({title:"Contact updated!",msg:f.contact.name?f.contact.name+" has been updated!":""})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATEcontact",msg:e.data?JSON.stringify(e.data):e.toString()})})},f.editCompany=function(e,t){i.show({controller:"CreateOrEditCompanyDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/companies/create/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{companies:[],license:null,setting:null},resolve:{company:["apiResolver",function(e){return e.resolve("cmCompany@get",{id:t})}]}})},f.onSelectList=function(e){if(f.contact.ListId){var t=i.confirm().title("You are selecting the list number: "+f.contact.ListId).textContent("Warning! You won't select a different list for the contact "+f.contact.firstName||f.contact.lastName||f.contact.id).targetEvent(e).ok("Ok").cancel("Cancel");return i.show(t).then(f.onSelectListSuccess).catch(function(){f.contact.ListId=null})}},f.onSelectListSuccess=function(){return s.cmList.getCustomFields({id:f.contact.ListId}).$promise.then(function(e){f.customFields=e||{rows:[],count:0}}).catch(function(e){console.error(e)})},f.getDateFromString=function(e){return new Date(e)},f.getHoppers=function(){f.queryHopper.offset=(f.queryHopper.page-1)*f.queryHopper.limit,f.queryHopper.id=f.contact.id,f.promise=s.cmContact.getHoppers(f.queryHopper,y("hoppers")).$promise},f.getFinals=function(){f.queryFinal.offset=(f.queryFinal.page-1)*f.queryFinal.limit,f.queryFinal.id=f.contact.id,f.promise=s.cmContact.getHopperFinals(f.queryFinal,y("finals")).$promise},f.getHistories=function(){f.queryHistory.offset=(f.queryHistory.page-1)*f.queryHistory.limit,f.queryHistory.id=f.contact.id,f.promise=s.cmContact.getHopperHistories(f.queryHistory,y("histories")).$promise},f.getJscriptySessions=function(){f.queryJscriptySession.offset=(f.queryJscriptySession.page-1)*f.queryJscriptySession.limit,f.queryJscriptySession.id=f.contact.id,f.promise=s.cmContact.getJscriptySessions(f.queryJscriptySession,y("jscriptySessions")).$promise},f.deleteconfirm=function(t,e){var n=i.confirm().title("Are you sure want to delete the agent?").htmlContent("<b>"+(t.phone||"hopper")+"</b> will be deleted.").ariaLabel("delete hopper").targetEvent(e).ok("OK").cancel("CANCEL");i.show(n).then(function(){var e;e=t,s.cmHopper.delete({id:e.id}).$promise.then(function(){_.remove(f.hoppers.rows,{id:e.id}),f.hoppers.count--,f.hoppers.rows.length||f.getHoppers(),o.success({title:"Hopper deleted!",msg:e.phone?e.phone+" has been deleted!":""})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEhopper",msg:e.data?JSON.stringify(e.data):e.toString()})})},function(){console.log("CANCEL")})},f.editHopper=function(e,t){i.show({controller:"CreateOrEditHopperVoiceQueueIdDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/hoppers/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{hopper:t,hoppers:f.hoppers.rows,license:null,setting:null}})},f.createOrEditIvrCampaignHopper=function(e,t){i.show({controller:"CreateOrEditHopperCampaignIdDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/hoppers/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{hopper:t,hoppers:f.hoppers.rows,license:null,setting:null}})};var A=!0,E=1;function y(t){return function(e){f[t]=e||{count:0,rows:[]}}}function S(e){console.log(e),e&&e.count&&e.rows.length&&(f.journey=_.concat(f.journey,e.rows))}e.$watch("vm.queryHopper.filter",function(e,t){A?n(function(){A=!1}):(t||(E=f.queryHopper.page),e!==t&&(f.queryHopper.page=1),e||(f.queryHopper.page=E),f.getHoppers())}),e.$watch("vm.queryFinal.filter",function(e,t){A?n(function(){A=!1}):(t||(E=f.queryFinal.page),e!==t&&(f.queryFinal.page=1),e||(f.queryFinal.page=E),f.getFinals())}),e.$watch("vm.queryHistory.filter",function(e,t){A?n(function(){A=!1}):(t||(E=f.queryHistory.page),e!==t&&(f.queryHistory.page=1),e||(f.queryHistory.page=E),f.getHistories())}),s.user.get({fields:"id,fullname",nolimit:!0}).$promise.then(function(e){f.users=e||{count:0,rows:[]},f.usersMap=_.mapValues(_.keyBy(f.users.rows,"id"),"fullname")}).then(function(e){var t=["mail","chat","sms","openchannel","fax"];if(e&&e.id){for(var n=0;n<t.length;n++)s[t[n]+"Interaction"].get({ContactId:e.id,includeAll:!0}).$promise.then(S);s.voiceCallReport.get({ContactId:e.id,includeAll:!0}).$promise.then(S).catch(function(e){console.error(e)})}}(r))}e.$inject=["$scope","$timeout","$state","$document","$mdDialog","toasty","api","contact","hoppers","finals","histories","contacts","companies","lists","customFields","tags","jscriptySessions","license"],angular.module("app.contactmanager.contacts").controller("ContactController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p){var g=this;g.processing=!1,g.stopping=!0,g.license=p,g.pid=0,g.result={finish:!1,rows:0,affectedRows:0,failedRows:0,duplicatedRows:0,errors:[]},g.contactFields=[{key:"firstName",required:!0},{key:"lastName",required:!1},{key:"phone",required:!0},{key:"mobile",required:!1},{key:"email",required:!1},{key:"dateOfBirth",required:!1},{key:"country",required:!1},{key:"city",required:!1},{key:"street",required:!1},{key:"postalCode",required:!1},{key:"fax",required:!1}],g.motionBullFields=[{key:"UserId",required:!1},{key:"scheduledat",required:!1},{key:"priority",required:!1}],g.binding={},g.duplicate=[],g.lists=o||{rows:[],count:0},g.companies=s||{rows:[],count:0},g.customFields={rows:[],count:0},g.fields=u||[],g.closeDialog=function(){d.removeAllListeners("contact:import:"+v),t.hide()},g.onChangeList=function(){return l.cmList.getCustomFields({id:g.ListId}).$promise.then(function(e){g.customFields=e}).catch(function(e){console.error(e)})},g.uploadCsv=function(){g.processing=moment(),l.cmContact.import({id:m.filename,binding:g.binding,ListId:g.ListId,CompanyId:g.CompanyId,duplicates:g.duplicates,socket_timestamp:v}).$promise.then(function(e){g.stopping=!1,e&&e.pid&&(g.pid=e.pid)}).catch(function(e){g.processing=!1,r.error({title:"Import process failed!",msg:"Please retry with a new file"})})},g.getHeaderErrors=function(){var e=u;return e.push("contact_import_error"),e},g.getArrayErrors=function(){for(var e=[],t=0;t<g.result.errors.length;t+=1){var n=g.result.errors[t].row;n.contact_import_error=g.result.errors[t].message,e.push(n)}return e},g.stopUpload=function(){if(g.stopping=!0,g.pid)return l.system.killProcess({pid:g.pid}).$promise.then(function(e){r.success({title:"CSV import process stopped!",msg:"Import has been stopped!"})}).catch(function(e){r.error({title:"CSV stop import process failed!",msg:"pid is unknown"})})};var v=moment().unix();d.on("contact:import:"+v,function(n){i(function(){if(g.result.rows=n.rows,n.errors)for(var e=0;e<n.errors.length;e++)g.result.errors.push(n.errors[e]);if(n.finish){g.result.finish=!0,g.result.affectedRows=n.affectedRows,g.result.failedRows=g.result.errors.length;var t=g.result.rows-g.result.affectedRows-g.result.errors.length;t&&0<t&&(g.duplicates.length?g.result.duplicatedRows=t:g.result.failedRows+=t),g.result.elapsed=moment().diff(g.processing,"seconds")}})}),c.$on("$destroy",function(){d.removeAllListeners("contact:import:"+v)})}e.$inject=["$cookies","$mdDialog","$interval","$q","$timeout","lists","companies","toasty","api","socket","$scope","file","fields","license"],angular.module("app.tools").controller("ImportContactsDialogController",e)}(),function(){"use strict";function e(i,e,o,t,s,n,r){var a=this;a.errors=[],a.title="CONTACTMANAGER.MERGE_CONTACT",a.contact=angular.copy(t),a.lists=n||[],a.change=function(){a.searchTerm?r.cmContact.get({fields:"id,firstName,lastName,phone,email",filter:a.searchTerm,ListId:t.ListId}).$promise.then(function(e){a.contacts=e.rows}).catch(function(e){console.error(e)}):a.contacts=[]},a.showConfirm=function(e,t,n){var a=i.confirm().title("Would you like to merge your contacs?").textContent("All unfilled values of the contact #"+n.id+" will be overwritten by the fields of the contact #"+t.id+".").targetEvent(e).ok("Ok").cancel("Cancel");i.show(a).then(function(){return r.cmContact.merge({to:n.id,from:t.id}).$promise}).then(function(e){_.remove(s,{id:n.id}),_.remove(s,{id:t.id}),s.unshift(e)}).then(function(){o.success({title:"Contact properly merged!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:MERGE_CONTACT",msg:e.data?JSON.stringify(e.data):e.toString()})})},a.closeDialog=function(){i.hide()}}e.$inject=["$mdDialog","$scope","toasty","contact","contacts","lists","api"],angular.module("app.tools").controller("MergeContactDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this,u=moment().unix();d.on("contact:csv_"+u,function(t){i(function(){m.uploading=!0,m.success+=t.success,m.errors+=t.errors,m.duplicate+=t.duplicates;for(var e=0;e<t.rows.length;e+=1)m.rows.push(t.rows[e]);t.finished&&(m.uploading=!1,m.finished=!0,m.disableStopButton=!0)})}),m.uploading=!1,m.showStopButton=!1,m.success=0,m.errors=0,m.duplicate=0,m.rows=[],m.contactFields=[{key:"firstName",required:!0},{key:"lastName",required:!1},{key:"phone",required:!0},{key:"mobile",required:!1},{key:"email",required:!1},{key:"dateOfBirth",required:!1},{key:"country",required:!1},{key:"city",required:!1},{key:"street",required:!1},{key:"postalCode",required:!1},{key:"fax",required:!1}],m.binding={},m.lists=o||{rows:[],count:0},m.companies=s||{rows:[],count:0},m.customFields={rows:[],count:0},m.ngFlowOptions={maxChunkRetries:1,chunkSize:15728640,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,target:"api/cm/contacts/csv",allowDuplicateUploads:!0},m.ngFlow={flow:{}},m.closeDialog=function(){d.removeAllListeners("contact:csv_"+u),t.hide()},m.onChangeList=function(){return l.cmList.getCustomFields({id:m.ListId}).$promise.then(function(e){m.customFields=e}).catch(function(e){console.error(e)})},m.uploadCsv=function(){m.uploading=!0,m.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+e.get("motion.token")},m.ngFlow.flow.opts.query={},m.ngFlow.flow.opts.query.binding_keys=_.keys(m.binding),m.ngFlow.flow.opts.query.binding_values=_.values(m.binding),m.ngFlow.flow.opts.query.ListId=m.ListId,m.ngFlow.flow.opts.query.socket_timestamp=u,m.CompanyId&&(m.ngFlow.flow.opts.query.CompanyId=m.CompanyId);m.duplicates&&(m.ngFlow.flow.opts.query.duplicates=m.duplicates);console.log("Flow options are:",m.ngFlow.flow.opts),m.ngFlow.flow.upload()},m.exportErrors=function(){for(var e=angular.copy(m.rows),t=0;t<e.length;t+=1)e[t].contact&&(e[t].contact=JSON.stringify(e[t].contact));return angular.copy(e)},m.fileAdded=function(e,t,n){Papa.parse(t.file,{skipEmptyLines:!0,header:!0,complete:function(e){console.log("csv file resultss",e),m.fields=e.meta.fields,m.fileSelected=!0,c.$apply()}})},m.fileSuccess=function(e,t,n){console.log("filessuccess",e,t,n);try{var a=JSON.parse(t);if(!a.pid)throw new Error("No pid parameter from api response!");m.pid=a.pid,m.showStopButton=!0}catch(e){console.error("Unable to parse upload result",e)}},m.stopUpload=function(){if(m.disableStopButton=!1,m.pid)return l.system.killProcess({pid:m.pid}).$promise.then(function(e){console.log("CSV upload process stopped!")}).catch(function(e){console.error(e)});console.error("pid is not defined")},c.$on("$destroy",function(){d.removeAllListeners("contact:csv_"+u)})}e.$inject=["$cookies","$mdDialog","$interval","$q","$timeout","lists","companies","toasty","api","socket","$scope"],angular.module("app.tools").controller("UploadContactsDialogController",e)}(),function(){"use strict";function e(a,e,t,n,i,o,s,r,l,d,c){var m=this;function u(e){n.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CONTACTMANAGER.EDIT_GLOBALCUSTOMFIELD",m.sortable={animation:800,sort:!0,onSort:function(e){a.globalCustomFieldForm.$pristine=!1}},m.globalCustomField=s,m.globalCustomFields=o,m.newGlobalCustomField=!1,m.globalCustomField||(m.globalCustomField={type:"text"},m.title="CONTACTMANAGER.NEW_GLOBALCUSTOMFIELD",m.newGlobalCustomField=!0),a.$watch("vm.globalCustomField.type",function(e,t){if(e!==t)switch(e){case"text":m.globalCustomField.values="";break;case"select":m.globalCustomField.values=[]}}),m.addNewGlobalCustomField=function(){m.errors=[],r.cmCustomField.save(m.globalCustomField).$promise.then(function(e){m.globalCustomFields.unshift(e.toJSON()),i.success({title:"GlobalCustomField properly created",msg:m.globalCustomField.name?m.globalCustomField.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmCustomField.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmCustomField.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveGlobalCustomField=function(){m.errors=[],r.cmCustomField.update({id:m.globalCustomField.id},m.globalCustomField).$promise.then(function(e){var t=_.find(m.globalCustomFields,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"GlobalCustomField properly saved!",msg:m.globalCustomField.name?m.globalCustomField.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmCustomField.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmCustomField.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteGlobalCustomField=function(e){m.errors=[];var t=n.confirm().title("Are you sure?").content("The globalCustomField will be deleted.").ariaLabel("Delete GlobalCustomField").ok("Delete").cancel("Cancel").targetEvent(e);n.show(t).then(function(){r.cmCustomField.delete({id:m.globalCustomField.id}).$promise.then(function(){_.remove(m.globalCustomFields,{id:m.globalCustomField.id}),i.success({title:"GlobalCustomField properly deleted!",msg:(m.globalCustomField.name||"globalCustomField")+" has been deleted!"}),u(m.globalCustomField)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmCustomField.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmCustomField.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,m.addItem=function(e){e.push({value:"New Item"}),a.globalCustomFieldForm.$pristine=!1},m.removeItem=function(e,t){e.splice(t,1),a.globalCustomFieldForm.$pristine=!1},m.removeItems=function(e){for(var t=e.length,n=0;n<t;n++)e.splice(0,1);a.globalCustomFieldForm.$pristine=!1}}e.$inject=["$scope","$state","$location","$mdDialog","toasty","globalCustomFields","globalCustomField","api","Auth","license","setting"],angular.module("app.contactmanager").controller("CreateOrEditGlobalCustomFieldDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.globalCustomFields=r||{count:0,rows:[]},v.table="globalCustomFields",v.listOrder="",v.listOrderAsc=null,v.selectedGlobalCustomFields=[],v.query={fields:"createdAt,updatedAt,id,alias,type,values,required",sort:"-updatedAt",ListId:"null",limit:10,page:1},v.arraytype=_.keyBy([{option:"Text",value:"'text'"},{option:"Select",value:"'select'"},{option:"Number",value:"'number'"},{option:"Switch",value:"'switch'"},{option:"Datetime",value:"'datetime'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editdialog=function(e,t){i.show({controller:"CreateOrEditGlobalCustomFieldDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/globalCustomFields/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{globalCustomField:e,globalCustomFields:v.globalCustomFields.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the globalCustomField?").htmlContent("<b>"+(e.name||"globalCustomField")+"</b> will be deleted.").ariaLabel("delete globalCustomField").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getGlobalCustomFields=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.cmCustomField.get(v.query,f).$promise},v.createOrEditGlobalCustomField=function(e,t){i.show({controller:"CreateOrEditGlobalCustomFieldDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/globalCustomFields/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{globalCustomField:t,globalCustomFields:v.globalCustomFields.rows,license:v.license,setting:v.setting}})},v.deleteGlobalCustomField=A,v.exportSelectedGlobalCustomFields=function(){var e=angular.copy(v.selectedGlobalCustomFields);return v.selectedGlobalCustomFields=[],e},v.deleteSelectedGlobalCustomFields=function(e){var t=i.confirm().title("Are you sure want to delete the selected globalCustomFields?").htmlContent("<b>"+v.selectedGlobalCustomFields.length+" selected</b> will be deleted.").ariaLabel("delete GlobalCustomFields").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedGlobalCustomFields.forEach(function(e){A(e)}),v.selectedGlobalCustomFields=[]})},v.deselectGlobalCustomFields=function(){v.selectedGlobalCustomFields=[]},v.selectAllGlobalCustomFields=function(){v.selectedGlobalCustomFields=v.globalCustomFields.rows};var h=!0,b=1;function f(e){v.globalCustomFields=e||{count:0,rows:[]}}function A(e){l.cmCustomField.delete({id:e.id}).$promise.then(function(){_.remove(v.globalCustomFields.rows,{id:e.id}),v.globalCustomFields.count-=1,v.globalCustomFields.rows.length||v.getGlobalCustomFields(),c.success({title:"GlobalCustomField deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEcmCustomField"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEcmCustomField",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getGlobalCustomFields())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","globalCustomFields","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.contactmanager").controller("GlobalCustomFieldsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CONTACTMANAGER.EDIT_LIST",m.list=angular.copy(s),m.lists=o,m.newList=!1,m.list||(m.list={},m.title="CONTACTMANAGER.NEW_LIST",m.newList=!0),m.addNewList=function(){m.errors=[],r.cmList.save(m.list).$promise.then(function(e){m.lists.unshift(e.toJSON()),i.success({title:"List properly created",msg:m.list.name?m.list.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmList.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmList.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveList=function(){m.errors=[],r.cmList.update({id:m.list.id},m.list).$promise.then(function(e){var t=_.find(m.lists,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"List properly saved!",msg:m.list.name?m.list.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmList.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmList.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteList=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The list will be deleted.").ariaLabel("Delete List").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.cmList.delete({id:m.list.id}).$promise.then(function(){_.remove(m.lists,{id:m.list.id}),i.success({title:"List properly deleted!",msg:(m.list.name||"list")+" has been deleted!"}),u(m.list)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmList.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmList.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","lists","list","api","Auth","license","setting"],angular.module("app.contactmanager").controller("CreateOrEditListDialogController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r){var l=this;function d(){return a.cmList[l.isVoiceRealtime()?"getMembers":"getAgents"]({id:l.list.id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){return l.isVoiceRealtime()?l.selectedItems=e.rows?_.map(e.rows,function(e){return e.id=e.UserId,e.fullname=e.membername,e.penalty=e.hasOwnProperty("penalty")?"penalty "+e.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[]:l.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserList?"penalty "+e.UserList.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.selectedItems=l.selectedItems,r.hasRole("admin")?a.user.get({fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise:a.user.getAgents({id:r.getCurrentUser().id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise}).then(function(e){l.items=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserList?"penalty "+e.UserList.penalty:"",e.internal=e.internal?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.items=_.differenceBy(l.items,l.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETUSERS.GETAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}l.list=t,l.penalty=0,l.items=[],l.selectedItems=[],l.closeDialog=function(){e.hide()},l.isVoiceRealtime=function(){return o},l.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"penalty",labelAll:s.instant("CONTACTMANAGER.ALL_AGENTS"),labelSelected:s.instant("CONTACTMANAGER.SELECTED_AGENTS"),transferCallback:function(e,t){a.cmList[t?"removeAgents":"addAgents"]({id:l.list.id,ids:_.map(e,l.isVoiceRealtime()&&t?"UserId":"id"),penalty:l.penalty||0,realtime:o||!1}).$promise.then(function(){n.success({title:"List properly "+(t?"removed":"added"),msg:"List has been "+(t?"removed":"added")+"!"}),t||d()}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:cmList.ADDAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d()}e.$inject=["$mdDialog","toasty","api","list","lists","realtime","$translate","Auth"],angular.module("app.contactmanager").controller("ListagentaddController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.list={},c.listCustomFields={count:0,rows:[]},c.selectedListCustomFields=[],c.query={fields:"createdAt,updatedAt,id,alias,type,values,required",limit:10,page:1},c.arraytype=_.keyBy([{option:"Text",value:"'text'"},{option:"Select",value:"'select'"},{option:"Number",value:"'number'"},{option:"Switch",value:"'switch'"},{option:"Datetime",value:"'datetime'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.init=function(e){c.list=e,c.query.id=c.list.id,c.query.ListId=c.list.id,c.getListCustomFields()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the customField?").htmlContent("<b>"+(e.name||"customField")+"</b> will be deleted.").ariaLabel("delete customField").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getListCustomFields=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.cmList.getCustomFields(c.query,p).$promise},c.createOrEditListCustomField=function(e,t){o.show({controller:"CreateOrEditCustomFieldDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/lists/edit/customFields/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{list:c.list,customField:t,customFields:c.listCustomFields.rows,license:null,setting:null}})},c.exportSelectedListCustomFields=function(){var e=angular.copy(c.selectedListCustomFields);return c.selectedListCustomFields=[],e},c.deleteListCustomField=g,c.deleteSelectedListCustomFields=function(e){var t=o.confirm().title("Are you sure want to delete the selected customFields?").htmlContent("<b>"+c.selectedListCustomFields.length+" selected</b> will be deleted.").ariaLabel("delete customFields").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedListCustomFields.forEach(function(e){g(e)}),c.selectedListCustomFields=[]})};var m=!0,u=1;function p(e){c.listCustomFields=e||{count:0,rows:[]}}function g(e){l.cmCustomField.delete({id:e.id}).$promise.then(function(){_.remove(c.listCustomFields.rows,{id:e.id}),c.listCustomFields.count-=1,c.listCustomFields.rows.length||c.getListCustomFields(),r.success({title:"CustomField deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETcmList"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcmList",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getListCustomFields())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.contactmanager").controller("ListCustomFieldsController",e)}(),function(){"use strict";function e(a,e,t,n,i,o,s,r,l,d,c){var m=this;function u(e){n.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CONTACTMANAGER.EDIT_CUSTOMFIELD",m.sortable={animation:800,sort:!0,onSort:function(e){a.customFieldForm.$pristine=!1}},m.customField=s,m.customFields=o,m.newCustomField=!1,m.customField||(m.customField={type:"text"},m.title="CONTACTMANAGER.NEW_CUSTOMFIELD",m.newCustomField=!0),e.params.id&&(m.customField.ListId=e.params.id),a.$watch("vm.customField.type",function(e,t){if(e!==t)switch(e){case"text":m.customField.values="";break;case"select":m.customField.values=[]}}),m.addNewCustomField=function(){m.errors=[],r.cmList.addCustomField({id:e.params.id},m.customField).$promise.then(function(e){m.customFields.unshift(e.toJSON()),i.success({title:"CustomField properly created",msg:m.customField.name?m.customField.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmCustomField.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmCustomField.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveCustomField=function(){m.errors=[],r.cmCustomField.update({id:m.customField.id},m.customField).$promise.then(function(e){var t=_.find(m.customFields,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"CustomField properly saved!",msg:m.customField.name?m.customField.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmCustomField.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmCustomField.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteCustomField=function(e){m.errors=[];var t=n.confirm().title("Are you sure?").content("The customField will be deleted.").ariaLabel("Delete CustomField").ok("Delete").cancel("Cancel").targetEvent(e);n.show(t).then(function(){r.cmCustomField.delete({id:m.customField.id}).$promise.then(function(){_.remove(m.customFields,{id:m.customField.id}),i.success({title:"CustomField properly deleted!",msg:(m.customField.name||"customField")+" has been deleted!"}),u(m.customField)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmCustomField.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmCustomField.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,m.addItem=function(e){e.push({value:"New Item"}),a.customFieldForm.$pristine=!1},m.removeItem=function(e,t){e.splice(t,1),a.customFieldForm.$pristine=!1},m.removeItems=function(e){for(var t=e.length,n=0;n<t;n++)e.splice(0,1);a.customFieldForm.$pristine=!1}}e.$inject=["$scope","$state","$location","$mdDialog","toasty","customFields","customField","api","Auth","license","setting"],angular.module("app.contactmanager").controller("CreateOrEditCustomFieldDialogController",e)}(),function(){"use strict";function e(n,e,a,i,t,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=t,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=e.protocol()+"://"+e.host(),c.list=d||n.params.list||{},c.selectedTab=n.params.tab||0,c.gotogoto=function(e,t){n.go("app.contactmanager.contacts",{ListId:e.id})},c.agentadddialog=function(e,t){a.show({controller:"ListagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/lists/edit/agentadd/agentadd.html",parent:angular.element(i.body),targetEvent:t,clickOutsideToClose:!0,locals:{list:e,lists:c.lists?c.lists.rows:[],realtime:!1}})},c.alert=r.info,c.gotoLists=function(){n.go("app.contactmanager.lists")},c.saveList=function(){s.cmList.update({id:c.list.id},c.list).$promise.then(function(){r.success({title:"List updated!",msg:c.list.name?c.list.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcmList",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","list"],angular.module("app.contactmanager").controller("ListController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.list={},c.listVoiceDispositions={count:0,rows:[]},c.selectedListVoiceDispositions=[],c.query={fields:"createdAt,updatedAt,id,name,createdAt",limit:10,page:1},c.init=function(e){c.list=e,c.query.id=c.list.id,c.query.ListId=c.list.id,c.getListVoiceDispositions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the voiceDisposition?").htmlContent("<b>"+(e.name||"voiceDisposition")+"</b> will be deleted.").ariaLabel("delete voiceDisposition").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getListVoiceDispositions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.cmList.getDispositions(c.query,p).$promise},c.createOrEditListVoiceDisposition=function(e,t){o.show({controller:"CreateOrEditVoiceDispositionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/lists/edit/voiceDispositions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{list:c.list,voiceDisposition:t,voiceDispositions:c.listVoiceDispositions.rows,license:null,setting:null}})},c.exportSelectedListVoiceDispositions=function(){var e=angular.copy(c.selectedListVoiceDispositions);return c.selectedListVoiceDispositions=[],e},c.deleteListVoiceDisposition=g,c.deleteSelectedListVoiceDispositions=function(e){var t=o.confirm().title("Are you sure want to delete the selected voiceDispositions?").htmlContent("<b>"+c.selectedListVoiceDispositions.length+" selected</b> will be deleted.").ariaLabel("delete voiceDispositions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedListVoiceDispositions.forEach(function(e){g(e)}),c.selectedListVoiceDispositions=[]})};var m=!0,u=1;function p(e){c.listVoiceDispositions=e||{count:0,rows:[]}}function g(e){l.voiceDisposition.delete({id:e.id}).$promise.then(function(){_.remove(c.listVoiceDispositions.rows,{id:e.id}),c.listVoiceDispositions.count-=1,c.listVoiceDispositions.rows.length||c.getListVoiceDispositions(),r.success({title:"VoiceDisposition deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETcmList"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcmList",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getListVoiceDispositions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.contactmanager").controller("ListVoiceDispositionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="CONTACTMANAGER.EDIT_VOICEDISPOSITION",m.voiceDisposition=angular.copy(s),m.voiceDispositions=o,m.newVoiceDisposition=!1,m.voiceDisposition||(m.voiceDisposition={},m.title="CONTACTMANAGER.NEW_VOICEDISPOSITION",m.newVoiceDisposition=!0),t.params.id&&(m.voiceDisposition.ListId=t.params.id),m.addNewVoiceDisposition=function(){m.errors=[],r.voiceDisposition.save(m.voiceDisposition).$promise.then(function(e){m.voiceDispositions.unshift(e.toJSON()),i.success({title:"VoiceDisposition properly created",msg:m.voiceDisposition.name?m.voiceDisposition.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceDisposition.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceDisposition.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveVoiceDisposition=function(){m.errors=[],r.voiceDisposition.update({id:m.voiceDisposition.id},m.voiceDisposition).$promise.then(function(e){var t=_.find(m.voiceDispositions,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"VoiceDisposition properly saved!",msg:m.voiceDisposition.name?m.voiceDisposition.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceDisposition.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceDisposition.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteVoiceDisposition=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The voiceDisposition will be deleted.").ariaLabel("Delete VoiceDisposition").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceDisposition.delete({id:m.voiceDisposition.id}).$promise.then(function(){_.remove(m.voiceDispositions,{id:m.voiceDisposition.id}),i.success({title:"VoiceDisposition properly deleted!",msg:(m.voiceDisposition.name||"voiceDisposition")+" has been deleted!"}),u(m.voiceDisposition)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceDisposition.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceDisposition.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","voiceDispositions","voiceDisposition","api","Auth","license","setting"],angular.module("app.contactmanager").controller("CreateOrEditVoiceDispositionDialogController",e)}(),function(){"use strict";function e(e,a,n,t,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.lists=r||{count:0,rows:[]},v.table="lists",v.listOrder="",v.listOrderAsc=null,v.selectedLists=[],v.query={fields:"createdAt,updatedAt,id,name,description,dialPrefix",sort:"-updatedAt",limit:10,page:1},v.editstate=function(e,t){n.go("app.contactmanager.lists.edit",{id:e.id,list:e})},v.gotocontactsgoto=function(e,t){n.go("app.contactmanager.contacts",{ListId:e.id})},v.exportcsvcontactsexport=function(e,t){var n=a.document.createElement("a");n.href="/api/cm/lists/"+e.id+"/contacts/csv",n.target="_self",n.click()},v.agentadddialog=function(e,t){i.show({controller:"ListagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/lists/edit/agentadd/agentadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{list:e,lists:v.lists?v.lists.rows:[],realtime:!1}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the list?").htmlContent("<b>"+(e.name||"list")+"</b> will be deleted.").ariaLabel("delete list").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getLists=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.cmList.get(v.query,f).$promise},v.createOrEditList=function(e,t){i.show({controller:"CreateOrEditListDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/lists/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{list:t,lists:v.lists.rows,license:v.license,setting:v.setting}})},v.deleteList=A,v.exportSelectedLists=function(){var e=angular.copy(v.selectedLists);return v.selectedLists=[],e},v.deleteSelectedLists=function(e){var t=i.confirm().title("Are you sure want to delete the selected lists?").htmlContent("<b>"+v.selectedLists.length+" selected</b> will be deleted.").ariaLabel("delete Lists").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedLists.forEach(function(e){A(e)}),v.selectedLists=[]})},v.deselectLists=function(){v.selectedLists=[]},v.selectAllLists=function(){v.selectedLists=v.lists.rows};var h=!0,b=1;function f(e){v.lists=e||{count:0,rows:[]}}function A(e){l.cmList.delete({id:e.id}).$promise.then(function(){_.remove(v.lists.rows,{id:e.id}),v.lists.count-=1,v.lists.rows.length||v.getLists(),c.success({title:"List deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEcmList"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEcmList",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getLists())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","lists","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.contactmanager").controller("ListsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s){var r=this;r.currentUser=o.getCurrentUser(),r.customDashboard={},r.voiceQueues=s&&s.count?s:{count:0,rows:[]},r.voiceQueuesSelected=s&&s.count?_.map(s.rows,"id"):[],r.interval=t(function(){},1e3),r.onChangeVoiceQueues=function(){for(var e=0;e<r.customDashboard.widgets.length;e+=1)r.customDashboard.widgets[e].voiceQueuesSelected=r.voiceQueuesSelected},r.goToEdit=function(){e.go("app.tools.customDashboards.edit",{id:r.customDashboard.id,tab:1})},i.onWithoutApply("voice_queue:save",function(e){var t=_.find(r.voiceQueues.rows,{id:e.id});t&&_.merge(t,_.pick(e,_.keys(t)))}),a.dashboard.get({id:e.params.id}).$promise.then(function(e){if(e)return r.customDashboard=e,r.customDashboard.widgets=[],r.customDashboard.preview=!0,r.customDashboard.draggable={enabled:!1},r.customDashboard.resizable={enabled:!1},a.dashboard.getItems({id:r.customDashboard.id}).$promise}).then(function(e){if(e&&e.count&&e.rows)for(var t=0;t<e.rows.length;t+=1)e.rows[t].templateUrl="app/core/directives/ms-widget-engine/ms-widget-engine-"+e.rows[t].type+"/ms-widget-engine."+e.rows[t].type+".html",e.rows[t].voiceQueues=r.voiceQueues,e.rows[t].voiceQueuesSelected=r.voiceQueuesSelected,r.customDashboard.widgets.push(e.rows[t])}).catch(function(e){r.customDashboard=void 0}),n.$on("$destroy",function(){i.removeAllListeners("voice_queue:save"),r.interval&&t.cancel(r.interval)})}e.$inject=["$state","$interval","$scope","api","socket","Auth","voiceQueues"],angular.module("app.dashboards.custom").controller("DashboardCustomController",e)}(),function(){"use strict";function e(e,t,n,a,s,i,o,r,l,d,c,m,u,p,g,v,h,b,f,A,E,y,S,T){var C=this;C.license=E;function x(e){var t={};for(var n in C.tabs)C.tabs.hasOwnProperty(n)&&(t[n]=C.tabs[n],C.tabs[n].interaction&&(t[n].interaction=_.pick(C.tabs[n].interaction,["id","OpenchannelAccountId","MailAccountId","ChatWebsiteId","FaxAccountId","SmsAccountId","closed"])));a.localStorage.setItem("motion2.user:"+C.user.id,JSON.stringify({tabs:t,currentTab:C.currentTab})),O(e)}function O(e){if(_.isNil(e)||e&&"interaction"===e.type){var t={id:C.user.id,online:!0,capacity:{mail:0,fax:0,sms:0,openchannel:0,chat:0},interaction:{mail:[],fax:[],sms:[],openchannel:[],chat:[]}};for(var n in C.tabs)C.tabs.hasOwnProperty(n)&&t.capacity.hasOwnProperty(C.tabs[n].channel)&&C.tabs[n].interaction&&!C.tabs[n].interaction.closed&&(t.capacity[C.tabs[n].channel]+=1,t.interaction[C.tabs[n].channel].push(C.tabs[n].interaction.id));return p.rpc.setAgentCapacity(t)}console.log("No capacity updated")}function w(t){if(C.tabs[t.id]&&(function(e){if(e.channel&&e.interaction)p.user["remove"+_.upperFirst(e.channel)+"Interactions"]({id:C.user.id,ids:[e.interaction.id]}).$promise.catch(function(e){console.error(e)})}(C.tabs[t.id]),delete C.tabs[t.id],C.currentTab=0,x(t),"interaction"===t.type))return p[t.channel+"Interaction"].get({id:t.interaction.id}).$promise.then(function(e){return p.user["remove"+_.upperFirst(t.channel)+"Interactions"]({id:C.user.id,ids:[e.id]}).$promise}).catch(function(e){console.error(e)})}function I(e){e.id=_.random(1e10),e.openedAt=new Date,e.saved=!1,e.badges=0,C.tabs[e.id]=e,C.currentTab=e.id,x(e)}function R(t,n){var e={type:"interaction",title:t?t.toUpperCase():"openchannel",icon:function(e){switch(e){case"chat":return"icon-hangouts";case"mail":return"icon-email";case"sms":return"icon-message-text";case"openchannel":return"icon-google-earth";case"fax":return"icon-deskphone";default:return"icon-hangouts"}}(t),color:function(e){switch(e){case"chat":return"green-A700";case"mail":return"teal";case"sms":return"orange";case"openchannel":return"amber-A200";case"fax":return"blue-grey-A200";default:return"grey"}}(t),channel:t,interaction:n},a=_.find(C.tabs,function(e){return"interaction"===e.type&&e.interaction&&e.interaction.id===n.id&&e.channel===t});a?C.currentTab=a.id:I(e)}function N(e){e&&e.uniqueid&&C.notifications[e.uniqueid]&&(v.clear(C.notifications[e.uniqueid]),delete C.notifications[e.uniqueid])}function D(){return function(e){if(404===e.status)v.warning({title:s.instant("DASHBOARDS.ATTENTION"),msg:s.instant("DASHBOARDS.ACCEPT_ELSEWHERE")});else if(e.data&&e.data.errors&&e.data.errors.length){C.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelMessage.accept"}];for(var t=0;t<e.data.errors.length;t+=1)v.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else v.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelMessage.accept",msg:e.data?JSON.stringify(e.data.message):e.toString()})}}C.detectBrowser=T.detectBrowser(),C.user=u.getCurrentUser(),C.currentTab=0,C.notifications={},C.tabs={},C.globalUserLists=h||{count:0,rows:[]},C.globalLists=b||{count:0,rows:[]},C.globalCompanies=f||{count:0,rows:[]},C.globalTags=A||{count:0,rows:[]},C.onContactManager=function(t){var e={ListId:t.ListId,limit:1,offset:0,sort:"-updatedAt"},n=!1,a=t.calleridname&&"<unknown>"!==t.calleridname?t.calleridname:t.calleridnum||t.uniqueid,i=t.calleridnum;_.isNil(t["xmd-contactid"])?_.isNil(t.routeId)?e.phone=t.calleridnum:(e.phone=t.destcalleridnum,a=t.destcalleridname&&"<unknown>"!==t.destcalleridname?t.destcalleridname:t.destcalleridnum||t.uniqueid,i=t.destcalleridnum):(e.id=t["xmd-contactid"],n=!0,_.isNil(t["xmd-listid"])||parseInt(t["xmd-listid"],10)===t.ListId||t["xmd-contactid2"]&&(e.id=t["xmd-contactid2"]));return p.cmContact.get(e).$promise.then(function(e){n?e&&C.addContactTab(e,t):e.count&&e.rows[0]?C.addContactTab(e.rows[0],t):C.addContactTab({firstName:a,ListId:t.ListId,phone:i},t)}).catch(D())},C.onJscripty=function(n){return p.jscriptyProject.get({id:n.ProjectId}).$promise.then(function(t){if(t){if(!_.isUndefined(n["xmd-contactid"]))return p.cmContact.get({id:n["xmd-contactid"]}).$promise.then(function(e){I({type:"jscripty",title:t.name,icon:"icon-script",color:"grey",project:t,call:n,contact:e})}).catch(D());I({type:"jscripty",title:t.name,icon:"icon-script",color:"grey",project:t,call:n})}}).catch(D())},C.onBrowserUrl=function(e){if(e&&e.uri)if(e.uriLocation)switch(e.uriLocation){case"0":a.open(e.uri);break;case"1":a.open(e.uri,"_blank","width="+(e.windowWidth||"800")+",height="+e.windowHeight||"600");break;default:a.open(e.uri)}else a.open(e.uri)},C.onBrowserPopup=function(e){e&&e.html&&I({type:"popup",title:e.calleridnum||"popup",icon:"icon-tablet",color:"grey",html:e.html})},C.onNotificationSave=function(e){if(e&&e.uniqueid){n=e,y.isSupported()?y.requestPermission().then(function(){var e,t;t={autoClose:!0,duration:10,showOnPageHidden:!0,icon:"../../../../../../../assets/images/avatars/customer.png",body:(e=n).queue?"Queue: "+e.queue:"",focusOnclick:!0,closeOnClick:!0},y.show(e.title,t)},function(e){console.error("Please enable browser notifications!",e)}):console.error("Browser notifications are not supported by the browser. Normal notifications will be used.");var t=C.alreadyExistsTab(e);if(t){if(p[e.channel+"Message"])return C.currentTab!==t.id&&(t.badges+=1),p[e.channel+"Message"].accept({id:e.id,UserId:C.user.id}).$promise.catch(D())}else v.wait({title:e.title,msg:e.msg||"",showClose:!1,clickToClose:!1,timeout:!1,sound:e.sound,html:!0,shake:e.shake||!1,onAdd:function(){C.notifications[e.uniqueid]=this.id},onAccept:function(){if(N(e),p[e.channel+"Message"])return p[e.channel+"Message"].accept({id:e.id,UserId:C.user.id,manual:!0}).$promise.then(function(e){R(e.channel,e.interaction),v.success({title:"Message properly accepted!",msg:"Message has been accepted!"})}).catch(D())},onReject:function(){if(N(e),p[e.channel+"Message"])return p[e.channel+"Message"].reject({id:e.id,UserId:C.user.id}).$promise.then(function(e){v.success({title:"Message properly rejected!",msg:"Message has been rejected!"})}).catch(D())}})}var n},C.onNotificationRemove=N,C.onClickTab=function(e){C.currentTab=e,x(C.tabs[e])},C.isActiveTab=function(e){return e===C.currentTab},C.alreadyExistsTab=function(t){return _.find(C.tabs,function(e){return"interaction"===e.type&&e.interaction&&e.interaction.id==t.interactionId&&e.channel==t.channel})},C.addContactTab=function(t,n){var a={type:"contact",title:t?function(e){var t="";e&&(e.firstName||e.lastName?(e.firstName&&(t+=e.firstName+" "),e.lastName&&(t+=e.lastName)):e.phone&&(t=e.phone));return t}(t):s.instant("DASHBOARDS.NEW_CONTACT"),icon:"icon-account-circle",color:"red",contact:t,userLists:h,lists:b,companies:f,tags:A,calls:n?[n]:[],autoCreate:n?n.autoCreate:0};if(n){if(n["xmd-cdrtype"]&&"dialer"===n["xmd-cdrtype"])n.answeredAt=n.agentcalledAt?moment(n.agentcalledAt,"YYYY-MM-DD HH:mm:ss").toDate():new Date;else if(n.uniqueid){var e=n.uniqueid.split(".")[0];n.answeredAt=e?new Date(1e3*parseInt(e)):new Date}(n.agentcompleteAt||n.endtime)&&(n.disposedAt=new Date)}if(t){var i=_.find(C.tabs,function(e){return"contact"===e.type&&e.contact&&e.contact.id==t.id});if(i){if(n)if(i.calls){var o=_.find(i.calls,function(e){return e.uniqueid===n.uniqueid});o||i.calls.push(n)}else i.calls=[n];C.currentTab=i.id}else{if(t.ListId)return p.cmList.getDispositions({id:t.ListId}).$promise.then(function(e){return a.dispositions=e,p.cmList.getCustomFields({id:t.ListId}).$promise}).then(function(e){a.customFields=e}).catch(D()).finally(function(){I(a)});I(a)}}else I(a)},C.addInteractionTab=R,C.addTab=I,C.removeTab=w,C.updateLocalStorage=x,C.closeTab=function(e){var t=n.confirm().title("interaction"===e.type?"Do you want to close the interaction?":"Are you sure want to close the "+e.type+"?").textContent("interaction"===e.type?"":"The "+e.type+" has been modified. Closing will lose all changes!").ariaLabel("Close Contact").ok("interaction"===e.type?"YES":"OK").cancel("interaction"===e.type?"NO":"CANCEL");{if(!e.saved)return n.show(t).then(function(){"interaction"===e.type&&n.show({controller:"DisposeInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/dispose/dialog.html",parent:angular.element(o.body),clickOutsideToClose:!0,locals:{channel:e.channel,interaction:e.interaction}}),w(e)}).catch(function(){"interaction"===e.type&&w(e)});w(e)}},g.on("trigger:contactmanager",C.onContactManager),g.on("trigger:jscripty",C.onJscripty),g.on("trigger:browser:url",C.onBrowserUrl),g.on("trigger:browser:popup",C.onBrowserPopup),g.on("notification:save",C.onNotificationSave),g.on("notification:remove",C.onNotificationRemove),function(){var e=a.localStorage.getItem("motion2.user:"+C.user.id);if(e)try{e=JSON.parse(e),C.tabs=e.tabs?e.tabs:{},C.currentTab=e.currentTab?e.currentTab:0,O(C.tabs[C.currentTab])}catch(e){console.error(e)}}(),e.$on("$destroy",function(){for(var e in C.notifications)C.notifications.hasOwnProperty(e)&&N({uniqueid:e});g.removeAllListeners("trigger:contactmanager"),g.removeAllListeners("trigger:jscripty"),g.removeAllListeners("trigger:browser:url"),g.removeAllListeners("trigger:browser:popup"),g.removeAllListeners("notification:save"),g.removeAllListeners("notification:remove")})}e.$inject=["$scope","$state","$mdDialog","$window","$translate","$mdToast","$document","$templateCache","$rootScope","$controller","$compile","$templateRequest","Auth","api","socket","toasty","globalUserLists","globalLists","globalCompanies","globalTags","license","desktopNotification","$http","msUtils"],angular.module("app.dashboards").controller("AgentDashboardGeneralController",e)}(),function(){"use strict";angular.module("app.dashboards").provider("desktopNotification",function(){var b={autoClose:!0,duration:5,showOnPageHidden:!1};return{config:function(e){for(var t in e)b.hasOwnProperty(t)&&null!=e[t]&&(b[t]=e[t])},$get:["$q","$timeout","$window","PERMISSIONS",function(e,u,t,p){var g=t.Notification||t.mozNotification||t.webkitNotification;return{isSupported:v,currentPermission:h,requestPermission:function(){if(!v())return e.reject("Notification API not supported");var n=e.defer();Promise.resolve(g.requestPermission)==g.requestPermission?g.requestPermission().then(function(e){p.GRANTED===e?n.resolve(e):n.reject(e)}):g.requestPermission(function(e,t){p.GRANTED===e?n.resolve(e):n.reject(e)});return n.promise},show:function(e,t){if(t=t||{},!v()||(n=e,a=t,i=angular.isString(n),o=!a.onClick||angular.isFunction(a.onClick),!i||!o)||function(e){if(e||b.showOnPageHidden)return!(window.document.hidden||window.document.mozHidden||window.document.webkitHidden)}(t.showOnPageHidden)||h()!==p.GRANTED)return;var n,a,i,o;var s=new g(e,t),r=t.duration||b.duration,l=void 0===t.autoClose?b.autoClose:t.autoClose;s.onclick=function(){t.onClick&&t.onClick(),t.focusOnclick&&window.focus(),t.closeOnClick&&s.close()},l&&(d=s,c=r,m=1e3*c,u(d.close.bind(d),m,!1));var d,c,m;return s},permissions:{default:p.DEFAULT,granted:p.GRANTED,denied:p.DENIED}};function v(){return!(void 0===g)}function h(){return(g||{}).permission}}]}}).provider("msNavigationAgentService",function(){var r=angular.injector(["ng"]).get("$log"),l=[];function t(e,t){if(angular.isString(e)){for(var n=e.split("."),a=n[n.length-1],i=function(e){var t=l;if(1===e.length)return t;e.pop();for(var n=0;n<e.length;n++){for(var a=e[n],i=!0,o=0;o<t.length;o++)if(t[o]._id===a){t=t[o].children,i=!1;break}if(i){var s={_id:a,_path:e.join("."),title:a,weight:1,children:[]};t.push(s),t=s.children}}return t}(n),o=!1,s=0;s<i.length;s++)if(i[s]._id===a){o=i[s];break}o?(angular.extend(o,t),o.uisref=d(o)):(t.children=[],!angular.isUndefined(t.weight)&&angular.isNumber(t.weight)||(t.weight=1),t._id=a,t._path=e,t.uisref=d(t),i.push(t))}else r.error("path must be a string (eg. `dashboard.project`)")}function d(e){var t="";return angular.isDefined(e.state)&&(t=e.state,angular.isDefined(e.stateParams)&&angular.isObject(e.stateParams)&&(t=t+"("+angular.toJson(e.stateParams)+")")),t}this.saveItem=t,this.$get=function(){var e={saveItem:t,getNavigation:function(e){if(e){for(var t=0;t<l.length;t++)if(l[t]._id===e)return[l[t]];return null}return l}};return e}}).constant("PERMISSIONS",{DEFAULT:"default",GRANTED:"granted",DENIED:"denied"})}(),function(){"use strict";function e(s,r,i,l,d,c,t,e,n,a){var m=this;function o(e){e&&e.count&&e.rows.length&&(m.journey=_.concat(m.journey,e.rows))}m.user=t.getCurrentUser(),m.detectBrowser=a.detectBrowser(),m.journey=[],m.queryHopper={fields:"id,phone,scheduledat",sort:"-updatedAt",limit:10,page:1},m.queryFinal={fields:"uniqueid,calleridnum,statedesc,starttime,disposition",sort:"-updatedAt",limit:10,page:1},m.queryHistory={fields:"uniqueid,calleridnum,statedesc,scheduledat,starttime,endtime",sort:"-updatedAt",limit:10,page:1},m.hoppers={rows:[],count:0},m.finals={rows:[],count:0},m.histories={rows:[],count:0},m.addNewContact=function(){m.errors=[],d.cmContact.save(m.contact).$promise.then(function(e){return m.contact.id=e.id,m.newContact=!1,m.tab.title=e.firstName||e.phone,m.tab.contact=m.contact,d.user.addContacts({id:t.getCurrentUser().id,ids:[e.id]})}).then(function(){m.detailForm.$pristine=!0,m.customFieldsForm.$pristine=!0,c.success({title:"Contact properly created",msg:m.contact.firstName?m.contact.firstName+" has been created!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.contact.save"}];for(var t=0;t<e.data.errors.length;t+=1)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.contact.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveContact=function(){m.errors=[],d.cmContact.update({id:m.contact.id},m.contact).$promise.then(function(e){return m.tab.title=e.firstName||e.phone,m.tab.contact=m.contact,l.$parent.vm.updateLocalStorage(),d.user.addContacts({id:t.getCurrentUser().id,ids:[e.id]})}).then(function(){m.detailForm.$pristine=!0,m.customFieldsForm.$pristine=!0,c.success({title:"Contact properly updated!",msg:m.contact.name?m.contact.name+" has been updated!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.contact.save"}];for(var t=0;t<e.data.errors.length;t+=1)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.contact.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.getCustomFields=function(e){return d.cmList.getCustomFields({id:e}).$promise.then(function(e){m.tab.customFields=e}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"LIST:GETCustomFields",msg:e.data?JSON.stringify(e.data):e.toString()})})},m.call=l.$parent.vm.call,m.disposeCall=function(e,t){if(m.newContact)return void c.error({title:"ATTENTION",msg:"Before to dispose, please save the contact!"});s.show({controller:"DisposeCallDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/contact/dispose/dialog.html",parent:angular.element(r.body),targetEvent:t,clickOutsideToClose:!1,locals:{dispositions:m.tab.dispositions,contact:m.contact,call:t}}).then(function(e){e&&("BLACKLIST"===e?c.success({title:n.instant("DASHBOARDS.INFO"),msg:n.instant("DASHBOARDS.CALL_DISPOSED")+" "+e}):"RECALLME"===e||"RESCHEDULE"===e||c.success({title:n.instant("DASHBOARDS.INFO"),msg:n.instant("DASHBOARDS.CALL_SAVED")})),_.remove(m.tab.calls,function(e){return e.uniqueid==t.uniqueid})})},m.duplicateContact=function(e){s.show({controller:"DuplicateContactDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/duplicate/dialog.html",parent:angular.element(r.body),targetEvent:e,clickOutsideToClose:!0,resolve:{contact:["apiResolver",function(e){return e.resolve("cmContact@get",{id:m.contact.id})}],lists:["apiResolver",function(e){return e.resolve("user@getLists",{id:t.getCurrentUser().id,fields:"id,name"})}]},locals:{contacts:[]}})},m.mergeContact=function(e){s.show({controller:"MergeContactDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/merge/dialog.html",parent:angular.element(r.body),targetEvent:e,clickOutsideToClose:!0,resolve:{contact:["apiResolver",function(e){return e.resolve("cmContact@get",{id:m.contact.id})}],lists:["apiResolver",function(e){return e.resolve("user@getLists",{id:t.getCurrentUser().id,fields:"id,name"})}]},locals:{contacts:[]}})},m.getDateFromString=function(e){if(e)return new Date(e);return null},m.addJscriptyTab=function(e,t){try{l.$parent.$parent.$parent.vm.addTab({type:"jscripty",title:e.name,icon:"icon-script",color:"grey",project:e,contact:m.contact})}catch(e){c.error({title:"ERROR OPENING JSCRIPTY PROJECT",msg:"The project cannot be started"+JSON.stringify(e)})}},m.getHoppers=function(){m.contact&&m.contact.id&&(m.queryHopper.ContactId=m.contact.id,m.queryHopper.offset=(m.queryHopper.page-1)*m.queryHopper.limit,m.promise=d.cmHopper.get(m.queryHopper,g("hoppers")).$promise)},m.getFinals=function(){m.contact&&m.contact.id&&(m.queryFinal.ContactId=m.contact.id,m.queryFinal.offset=(m.queryFinal.page-1)*m.queryFinal.limit,m.promise=d.cmHopperFinal.get(m.queryFinal,g("finals")).$promise)},m.getHistories=function(){m.contact&&m.contact.id&&(m.queryHistory.ContactId=m.contact.id,m.queryHistory.offset=(m.queryHistory.page-1)*m.queryHistory.limit,m.promise=d.cmHopperHistory.get(m.queryHistory,g("histories")).$promise)},m.getJscriptyProjects=function(){d.jscriptyProject.get({fields:"createdAt,updatedAt,id,name,description,createdAt,formData,enableUncompleteSave",sort:"-updatedAt",nolimit:!0}).$promise.then(function(e){m.jscriptyProjects=e||{count:0,rows:[]}}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.jscripty.account"}];for(var t=0;t<e.data.errors.length;t+=1)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.jscripty.account",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.getMailAccounts=function(){d.mailAccount.get({nolimit:!0}).$promise.then(function(e){m.mailAccounts=e||{count:0,rows:[]}}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mail.account"}];for(var t=0;t<e.data.errors.length;t+=1)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mail.account",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.getFaxAccounts=function(){d.faxAccount.get({nolimit:!0}).$promise.then(function(e){m.faxAccounts=e||{count:0,rows:[]}}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.fax.account"}];for(var t=0;t<e.data.errors.length;t+=1)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.fax.account",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.getSmsAccounts=function(){d.smsAccount.get({nolimit:!0}).$promise.then(function(e){m.smsAccounts=e||{count:0,rows:[]}}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.sms.account"}];for(var t=0;t<e.data.errors.length;t+=1)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.sms.account",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.composeInteraction=function(e,i,t,n){var o=i.toLowerCase();s.show({controller:"Compose"+i+"InteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/compose"+i+"/dialog.html",parent:angular.element(r.body),clickOutsideToClose:!1,locals:{account:t,message:{to:"mail"==o?n:n.split(",")},type:"new",interaction:{Contact:m.contact}},fullscreen:!0}).then(function(a){return d[o+"Account"].send({id:t.id},a).$promise.then(function(e){if("Mail"===i){var t=e;if(t&&t.Messages&&t.Messages.length){if(a.attachments&&a.attachments.length)for(var n=0;n<a.attachments.length;n+=1)d.attachment.update({id:a.attachments[n].id},{MailMessageId:_.head(t.Messages).id});c.success({title:"Message properly sent!",msg:"Message has been sent!"}),t.closed?(t.disposition=null,s.show({controller:"DisposeInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/dispose/dialog.html",parent:angular.element(r.body),clickOutsideToClose:!0,locals:{channel:"mail",interaction:t}})):l.$parent.vm.addInteractionTab("mail",t)}}else c.success({title:"Message properly sent!",msg:"Message has been sent!"}),l.$parent.vm.addInteractionTab(o,e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t+=1)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else"fax"===o?c.error({title:"FAX:SEND",msg:e.data?JSON.stringify(e.data):e.message||e.toString()}):c.error({title:e.status?"API:"+e.status+" - "+e.statusText:i.toUpperCase()+"ACCOUNT:SEND",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})})},m.init=function(e,t){m.tab=e,l.$watchGroup(["vm.detailForm.$pristine","vm.customFieldsForm.$pristine"],function(e,t){m.tab.saved=e[0]&&e[1]}),m.license=t,m.contact=m.tab.contact,m.newContact=!1,m.currentTab=0,m.contact&&m.contact.id?(d.user.addContacts({id:m.user.id,ids:[m.contact.id]}),m.contact.ListId&&(m.tab.userLists.rows=_.unionBy(m.tab.userLists.rows,_.filter(m.tab.lists.rows,{id:m.contact.ListId}),"id"),m.list=_.find(m.tab.userLists.rows,{id:m.contact.ListId})),m.getHoppers(),m.getFinals(),m.getHistories(),m.getMailAccounts(),m.getFaxAccounts(),m.getSmsAccounts()):(m.newContact=!0,e.autoCreate&&(console.log("autoCreate"),m.addNewContact()));d.user.get({fields:"id,fullname",nolimit:!0}).$promise.then(function(e){m.users=e||{count:0,rows:[]},m.usersMap=_.mapValues(_.keyBy(m.users.rows,"id"),"fullname")}).then(function(e){var t=["mail","chat","sms","openchannel","fax"];if(e&&e.id){for(var n=0;n<t.length;n++)d[t[n]+"Interaction"].get({ContactId:e.id,includeAll:!0}).$promise.then(o);d.voiceCallReport.get({ContactId:e.id,includeAll:!0}).$promise.then(o).catch(function(e){console.error(e)})}}(m.contact))},m.hasPermission=function(e){return t.hasPermission(e)},m.openInteraction=function(e,t){try{if(t.MailAccountId)return l.$parent.$parent.$parent.vm.addInteractionTab("mail",t);if(t.ChatWebsiteId)return l.$parent.$parent.$parent.vm.addInteractionTab("chat",t);if(t.SmsAccountId)return l.$parent.$parent.$parent.vm.addInteractionTab("sms",t);if(t.OpenchannelAccountId)return l.$parent.$parent.$parent.vm.addInteractionTab("openchannel",t);if(t.FaxAccountId)return l.$parent.$parent.$parent.vm.addInteractionTab("fax",t)}catch(e){c.error({title:"ERROR OPEN INTERACTION",msg:"Customer Journey can't open the interaction"})}},e.on("voice_queue_channel:remove",v),e.on("voice_outbound_channel:remove",v),m.getJscriptyProjects(),l.$watch("currentTab",function(e,t){1===m.currentTab&&(m.getHoppers(),m.getFinals(),m.getHistories())});var u=!0,p=1;function g(t){return function(e){m[t]=e||{count:0,rows:[]}}}function v(t){var n,e,a=_.findLastIndex(m.tab.calls,function(e){return e.uniqueid===t.uniqueid});0<=a&&(m.tab.calls[a].disposedAt=new Date),m.contact&&m.contact.id&&i((n=t.uniqueid,e=m.contact.id,function(){if(_.find(m.tab.calls,function(e){return e.uniqueid===n}))return d.voiceCallReport.update({id:n,ContactId:e}).$promise.catch(function(e){console.error(e)})}),1e3)}l.$watch("queryHopper.filter",function(e,t){u?i(function(){u=!1}):(t||(p=m.queryHopper.page),e!==t&&(m.queryHopper.page=1),e||(m.queryHopper.page=p),m.getHoppers())}),l.$watch("queryFinal.filter",function(e,t){u?i(function(){u=!1}):(t||(p=m.queryFinal.page),e!==t&&(m.queryFinal.page=1),e||(m.queryFinal.page=p),m.getFinals())}),l.$watch("queryHistory.filter",function(e,t){u?i(function(){u=!1}):(t||(p=m.queryHistory.page),e!==t&&(m.queryHistory.page=1),e||(m.queryHistory.page=p),m.getHistories())}),l.$on("$destroy",function(){e.removeAllListeners("voice_queue_channel:remove"),e.removeAllListeners("voice_outbound_channel:remove")})}e.$inject=["$mdDialog","$document","$timeout","$scope","api","toasty","Auth","socket","$translate","msUtils"],angular.module("app.dashboards").controller("AgentGeneralContactController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p){var g=this;function v(){var e=g.choice?g.choice.toLowerCase():void 0;return{id:g.call.uniqueid,disposition:g.choice,dispositionat:moment(),amd:"amd"===e,fax:"fax"===e,blacklist:"blacklist"===e,recallme:"recallme"===e,UserId:"recallme"===e?u.getCurrentUser().id:null}}g.choice=null,g.isReschedule=!1,g.recallme=!1,g.dispositions=d,g.contact=m,g.call=c,g.note=g.call.note||void 0,g.dialerCall=!1,g.hopper={minDate:new Date,dateTime:new Date},g.call&&g.call.variables&&g.call.variables["xmd-voicequeueid"]&&(g.dialerCall=!0),g.saveDisposition=function(e){if(g.choice=_.isNil(e)?g.choice:e,g.call.note=g.note,l.voiceCallReport.update({id:g.call.uniqueid,userDisposition:g.choice,note:g.note,UserId:u.getCurrentUser().id,ContactId:g.contact.id}).$promise.catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATEVOICECALLREPORT",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.voiceRecording.get({uniqueid:g.call.uniqueid}).$promise.then(function(e){if(e)for(var t=0;t<e.rows.length;t+=1)l.voiceRecording.update({id:e.rows[t].id,userDisposition:g.choice}).$promise.catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATEVOICERECORDING",msg:e.data?JSON.stringify(e.data):e.toString()})})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATEVOICERECORDING",msg:e.data?JSON.stringify(e.data):e.toString()})}),g.dialerCall)if(l.cmHopperFinal.update(v()).$promise.catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATECMHOPPERFINAL",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.cmHopperHistory.update(v()).$promise.catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATECMHOPPERHISTORY",msg:e.data?JSON.stringify(e.data):e.toString()})}),_.isNil(g.choice))a.hide(g.choice?g.choice.toUpperCase():"");else switch(g.choice.toLowerCase()){case"blacklist":g.call&&g.call.variables&&g.call.variables["xmd-voicequeueid"]&&function(e){if(e)l.voiceQueue.getBlackLists({id:e,type:"outbound",fields:"id"}).$promise.then(function(e){var t=[];if(e&&0<e.count){for(var n=0;n<e.rows.length;n+=1){var a=angular.copy(g.contact);delete a.id,a.ListId=e.rows[n].id,t.push(l.cmContact.save(a).$promise)}return o.all(t)}return r.success({title:p.instant("DASHBOARDS.INFO"),msg:p.instant("DASHBOARDS.NOTAVAILABLE")+" "+g.choice}),void(g.choice=void 0)}).then(function(e){e&&a.hide(g.choice?g.choice.toUpperCase():"")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATEBLACKLIST",msg:e.data?JSON.stringify(e.data):e.toString()}),a.hide(g.choice?g.choice.toUpperCase():"")})}(g.call.variables["xmd-voicequeueid"]);break;case"reschedule":g.isReschedule=!0,g.recallme=!1;break;case"recallme":g.isReschedule=!0,g.recallme=!0;break;default:a.hide(g.choice?g.choice.toUpperCase():"")}else a.hide(g.choice?g.choice.toUpperCase():"")},g.closeDialog=function(){a.cancel()},g.saveReschedule=function(){return g.disable=!0,l.cmHopper.save({phone:g.contact.phone,UserId:g.recallme?u.getCurrentUser().id:null,ContactId:g.contact.id,ListId:g.contact.ListId,VoiceQueueId:Number(g.call["xmd-voicequeueid"]),scheduledat:moment(g.hopper.dateTime).format("YYYY-MM-DD HH:mm:ss"),priority:3,recallme:g.recallme}).$promise.then(function(){l.cmHopperFinal.update({id:g.call.uniqueid,rescheduled:!0,rescheduledat:moment(g.hopper.dateTime).format("YYYY-MM-DD HH:mm:ss"),recallme:g.recallme}).$promise.catch(function(e){console.log(e)})}).then(function(){r.success({title:p.instant("DASHBOARDS.INFO"),msg:p.instant("DASHBOARDS.CALL_DISPOSED")+" "+(g.recallme?p.instant("DASHBOARDS.RECALLME"):p.instant("DASHBOARDS.RESCHEDULE"))})}).catch(function(e){a.cancel(e)}).finally(function(){g.disable=!1,a.hide(g.choice?g.choice.toUpperCase():"")})}}e.$inject=["$scope","$state","$location","$mdDialog","$timeout","$q","$document","toasty","api","dispositions","call","contact","Auth","$translate"],angular.module("app.staff").controller("DisposeCallDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m){var u=this;u.call=l,u.contact=r,u.hopper={minDate:new Date,dateTime:new Date},u.closeDialog=function(){a.cancel()},u.saveDialog=function(){return u.disable=!0,s.cmHopper.save({phone:u.contact.phone,UserId:c?d.getCurrentUser().id:null,ContactId:u.contact.id,ListId:u.contact.ListId,VoiceQueueId:Number(u.call["xmd-voicequeueid"]),scheduledat:moment(u.hopper.dateTime).format("YYYY-MM-DD HH:mm:ss"),priority:3,recallme:c}).$promise.then(function(){s.cmHopperFinal.update({id:u.call.uniqueid,rescheduled:!0,rescheduledat:moment(u.hopper.dateTime).format("YYYY-MM-DD HH:mm:ss"),recallme:c}).$promise}).then(function(){o.success({title:m.instant("DASHBOARDS.INFO"),msg:m.instant("DASHBOARDS.CALL_DISPOSED")+" "+(c?m.instant("DASHBOARDS.RECALLME"):m.instant("DASHBOARDS.RESCHEDULE"))}),a.hide()}).catch(function(e){a.cancel(e)}).finally(function(){u.disable=!1})}}e.$inject=["$scope","$state","$location","$mdDialog","$timeout","toasty","api","contact","call","Auth","recallme","$translate"],angular.module("app.staff").controller("RescheduleCallDialogController",e)}(),function(){"use strict";function e(e,t){var n=t(function(){},999);e.$on("$destroy",function(){n&&(t.cancel(n),n=null)})}e.$inject=["$scope","$interval"],angular.module("app.dashboards").controller("AgentHomeAbandonedController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d,c){var m=this,u=!0;function p(){var e=i.localStorage.getItem("motion2.home.abandoned.bull.contacts:"+m.currentUser.id);e&&(e=JSON.parse(e))&&e.query&&(m.query=_.merge(e.query,_.omit(m.query,["sort","limit","page"])),m.query=_.omit(m.query,"filter")),s.voiceDisposition.get().$promise.then(function(e){m.disposition=e?e.rows:[]}).catch(function(e){console.log(e)}),s.user.getQueues({id:r.getCurrentUser().id,fields:"id,name",channel:"voice",type:"outbound",nolimit:!0}).$promise.then(function(e){m.queues=e||{count:0,rows:[]},m.queuesMap=_.mapValues(_.keyBy(m.queues.rows,"name"),"name"),m.defaultQueues=m.queues.rows?_.map(m.queues.rows,"name").join(","):void 0}).catch(function(e){console.error(e)}).finally(function(){m.getContacts()})}function g(e){m.contacts=e||{count:0,rows:[]},u=!1,m.refresh=!0}m.showTooltip=!1,m.refresh=!0,m.disable=[],m.disposition,m.currentUser=r.getCurrentUser(),m.localizationMap=c,m.pickerModel={dateStart:null,dateEnd:null},m.queues={},m.contacts={count:0,rows:[]},m.query={fields:"id,type,calleridnum,calleridname,queue,queuecallerabandonAt,queuecallerexitAt,queuecallerexitreason,assigned,lastAssignedTo,updatedAt,disposition",type:"outbound",queuecallerexitreason:"TIMEOUT,ABANDONED",sort:"-updatedAt",limit:10,page:1},m.clearAll=function(){m.query.dateStart=void 0,m.query.dateEnd=void 0,m.pickerModel={dateStart:null,dateEnd:null},m.getContacts()},m.getContacts=function(){m.query.dateStart=void 0,m.query.dateEnd=void 0,m.pickerModel.dateStart&&!u&&(m.query.dateStart=m.pickerModel.dateStart,m.query.dateEnd=m.pickerModel.dateEnd);m.query.queue=m.query.queue||m.defaultQueues,m.query.offset=(m.query.page-1)*m.query.limit,i.localStorage.setItem("motion2.home.abandoned.bull.contacts:"+m.currentUser.id,JSON.stringify({query:_.omit(m.query,"queue")})),m.promise=s.voiceQueueReport.getVoiceQueuesReport(m.query,g).$promise},m.refreshContacts=function(){m.showTooltip=!1,m.getContacts()},m.onInit=p,m.reserved=function(e,t){e&&(m.disable[e.id]=!0,s.voiceQueueReport.update({id:e.id,lastAssignedTo:e.assigned?m.currentUser.name:null,assigned:e.assigned,disposition:t||null}).$promise.catch(function(e){console.log(e)}).finally(function(){m.disable[e.id]=!1}))},m.onSavevoiceQueueReport=function(e){m.queuesMap&&"outbound"===e.type&&m.queuesMap[e.queue]&&(m.showTooltip=!0)},m.onUpdatevoiceQueueReport=function(e){if(e){var t=_.findIndex(m.contacts.rows,["id",e.id]);0<=t&&_.merge(m.contacts.rows[t],e)}},m.call=e.$parent.$parent.$parent.$parent.vm.call,m.transfer=e.$parent.$parent.$parent.$parent.vm.transfer,m.webcall=e.$parent.$parent.$parent.$parent.vm.webcall,m.webtransfer=e.$parent.$parent.$parent.$parent.vm.webtransfer,l.onWithoutApply("voiceQueueReport:save",m.onSavevoiceQueueReport),l.onWithoutApply("voiceQueueReport:update",m.onUpdatevoiceQueueReport),p();var v=!0,h=1;e.$watch("vm_bull.query.filter",function(e,t){v?n(function(){v=!1}):(t||(h=m.query.page),e!==t&&(m.query.page=1),e||(m.query.page=h),m.getContacts())}),e.$on("$destroy",function(){l.removeAllListeners("voiceQueueReport:save"),l.removeAllListeners("voiceQueueReport:update")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty","dateFilterLocalizationFactory"],angular.module("app.dashboards").controller("AgentHomeAbandonedBullController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d,c){var m=this,u=!0;function p(){var e=i.localStorage.getItem("motion2.home.abandoned.voice.contacts:"+m.currentUser.id);e&&(e=JSON.parse(e))&&e.query&&(m.query=_.merge(e.query,_.omit(m.query,["sort","limit","page"])),m.query=_.omit(m.query,"filter")),s.voiceDisposition.get().$promise.then(function(e){m.disposition=e?e.rows:[]}).catch(function(e){console.log(e)}),s.user.getQueues({id:r.getCurrentUser().id,fields:"id,name",channel:"voice",type:"inbound",nolimit:!0}).$promise.then(function(e){m.queues=e||{count:0,rows:[]},m.queuesMap=_.mapValues(_.keyBy(m.queues.rows,"name"),"name"),m.defaultQueues=m.queues.rows?_.map(m.queues.rows,"name").join(","):void 0}).catch(function(e){console.error(e)}).finally(function(){m.getContacts()})}function g(e){m.contacts=e||{count:0,rows:[]},u=!1,m.refresh=!0}m.showTooltip=!1,m.refresh=!0,m.disable=[],m.disposition,m.currentUser=r.getCurrentUser(),m.localizationMap=c,m.pickerModel={dateStart:null,dateEnd:null},m.queues={},m.contacts={count:0,rows:[]},m.query={fields:"id,type,calleridnum,calleridname,queue,queuecallerabandonAt,queuecallerexitAt,queuecallerexitreason,assigned,lastAssignedTo,updatedAt,disposition",type:"inbound",queuecallerexitreason:"TIMEOUT,ABANDONED",sort:"-updatedAt",limit:10,page:1},m.clearAll=function(){m.query.dateStart=void 0,m.query.dateEnd=void 0,m.pickerModel={dateStart:null,dateEnd:null},m.getContacts()},m.getContacts=function(){m.query.dateStart=void 0,m.query.dateEnd=void 0,m.pickerModel.dateStart&&!u&&(m.query.dateStart=m.pickerModel.dateStart,m.query.dateEnd=m.pickerModel.dateEnd);m.query.queue=m.query.queue||m.defaultQueues,m.query.offset=(m.query.page-1)*m.query.limit,i.localStorage.setItem("motion2.home.abandoned.voice.contacts:"+m.currentUser.id,JSON.stringify({query:_.omit(m.query,"queue")})),m.promise=s.voiceQueueReport.getVoiceQueuesReport(m.query,g).$promise},m.refreshContacts=function(){m.showTooltip=!1,m.getContacts()},m.onInit=p,m.reserved=function(e,t){e&&(m.disable[e.id]=!0,s.voiceQueueReport.update({id:e.id,lastAssignedTo:e.assigned?m.currentUser.name:null,assigned:e.assigned,disposition:t||null}).$promise.catch(function(e){console.log(e)}).finally(function(){m.disable[e.id]=!1}))},m.onSavevoiceQueueReport=function(e){m.queuesMap&&"inbound"===e.type&&m.queuesMap[e.queue]&&(m.showTooltip=!0)},m.onUpdatevoiceQueueReport=function(e){if(e){var t=_.findIndex(m.contacts.rows,["id",e.id]);0<=t&&_.merge(m.contacts.rows[t],e)}},m.call=e.$parent.$parent.$parent.$parent.vm.call,m.transfer=e.$parent.$parent.$parent.$parent.vm.transfer,m.webcall=e.$parent.$parent.$parent.$parent.vm.webcall,m.webtransfer=e.$parent.$parent.$parent.$parent.vm.webtransfer,l.onWithoutApply("voiceQueueReport:save",m.onSavevoiceQueueReport),l.onWithoutApply("voiceQueueReport:update",m.onUpdatevoiceQueueReport),p();var v=!0,h=1;e.$watch("vm_voice.query.filter",function(e,t){v?n(function(){v=!1}):(t||(h=m.query.page),e!==t&&(m.query.page=1),e||(m.query.page=h),m.getContacts())}),e.$on("$destroy",function(){l.removeAllListeners("voiceQueueReport:save"),l.removeAllListeners("voiceQueueReport:update")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty","dateFilterLocalizationFactory"],angular.module("app.dashboards").controller("AgentHomeAbandonedVoiceController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s){var r=this;r.user=i.getCurrentUser(),r.license={},r.sidebar="dashboard",r.navigation=s.getNavigation(),r.addContactTab=e.$parent.vm.addContactTab,r.addInteractionTab=e.$parent.vm.addInteractionTab,r.init=function(e){r.license=e;var t=n.localStorage.getItem("motion2.home:"+r.user.id);if(t)try{t=JSON.parse(t),r.sidebar=t.currentSidebarTab?t.currentSidebarTab:"dashboard"}catch(e){console.error(e),r.sidebar="dashboard"}},r.changeSidebarTab=function(e){r.sidebar=e,n.localStorage.setItem("motion2.home:"+r.user.id,JSON.stringify({currentSidebarTab:e}))},r.hasPermission=function(e){return i.hasPermission(e)}}e.$inject=["$scope","$timeout","$window","api","Auth","socket","msNavigationAgentService"],angular.module("app.dashboards").controller("AgentGeneralHomeController",e)}(),function(){"use strict";function e(n,a,e,t,i,o,s,r,l,d){var c=this;function m(e){c.chatInteractions=e||{count:0,rows:[]};for(var t=0;t<c.chatInteractions.rows.length;t+=1)p(c.chatInteractions.rows[t])}function u(){c.query.dateStart=void 0,c.query.dateEnd=void 0,c.pickerModel.dateStart&&(c.query.dateStart=c.pickerModel.dateStart,c.query.dateEnd=c.pickerModel.dateEnd),c.query.offset=(c.query.page-1)*c.query.limit,i.localStorage.setItem("motion2.home.chat:"+c.user.id,JSON.stringify({query:c.query})),c.promise=s.chatInteraction.get(c.query,m).$promise}function p(e){e&&e.Messages?e.unread=_.filter(e.Messages||[],{direction:"in",read:!1}).length:e.unread=0}c.user=r.getCurrentUser(),c.tags={count:0,rows:[]},c.chatInteractions={count:0,rows:[]},c.query={includeAll:!0,sort:"-updatedAt",limit:10,page:1,read:null,closed:null,substatus:null,ChatWebsiteId:null},c.success=m,c.getChatInteractions=u,c.showChatInteraction=function(e,t){n.$parent.vm.addInteractionTab("chat",t)},c.getContactLabel=function(e){if(e.Contact){var t="";t+=(e.Contact.firstName||"")+""+(e.Contact.lastName||"");var n=e.Account?e.Account.mapKey:void 0;return t+=n&&e.Contact[n]?" <"+e.Contact[n]+">":""}return o.instant("DASHBOARDS.UNKNOWN")},c.getUserLabel=function(e){if(e.UserId)return e.UserId===r.getCurrentUser().id?o.instant("DASHBOARDS.ME"):c.usersByKey[e.UserId].fullname+" <"+c.usersByKey[e.UserId].internal+">";return o.instant("DASHBOARDS.NOT_ASSIGNED")},c.getChatWebsiteLabel=function(e){if(e.Account)return e.Account.key;return o.instant("DASHBOARDS.UNKNOWN")},c.getColorByChannel=function(e){switch(e){case"chat":return"green-A700-bg";case"mail":return"teal-bg";case"sms":return"orange-bg";case"openchannel":return"amber-A200-bg";case"fax":return"blue-grey-A200-bg";default:return"white-bg"}},c.clearAll=function(){c.calendarModel={dateStart:null},c.pickerModel={dateStart:null},c.serviceModel={dateStart:null},c.getChatInteractions()},c.onInit=function(){return s.chatWebsite.get({nolimit:!0}).$promise.then(function(e){return c.chatAccounts=e||{count:0,rows:[]},s.tag.get().$promise}).then(function(e){c.tags=e||{count:0,rows:[]}}).then(function(){return s.user.get({nolimit:!0,fields:"id,fullname,userpic,internal"}).$promise}).then(function(e){c.usersByKey=_.keyBy(e.rows,"id")}).catch(function(e){console.error(e)}).finally(function(){var e=i.localStorage.getItem("motion2.home.chat:"+c.user.id);if(e)try{(e=JSON.parse(e)).query&&(c.query=_.merge(c.query,e.query),c.query=_.omit(c.query,"filter"),c.query.sort&&0<=c.query.sort.indexOf("lastMessage")&&(c.query=_.omit(c.query,"sort")),c.query.includeAll=!0)}catch(e){console.error(e)}l.on("chatInteraction:save",c.onChatInteractionSave),l.on("chatInteraction:update",c.onChatInteractionSave),l.on("chatInteractionTags:save",c.onChatInteractionTagsSave),l.on("chatMessage:save",c.onChatMessageSave),l.on("chatMessage:update",c.onChatMessageSave),l.on("user_has_chat_interactions:save",c.onChatInteractionOpen),l.on("user_has_chat_interactions:remove",c.onChatInteractionClose),c.getChatInteractions()})},c.onChatInteractionSave=function(e){if(e){var t=_.find(c.chatInteractions.rows,{id:e.id});t?_.merge(t,_.pick(e,_.keys(t))):u(),p(e)}},c.onChatInteractionTagsSave=function(e){if(e){var t=_.find(c.chatInteractions.rows,{id:e.id});t&&(t.Tags=e.tags||[],_.merge(t,_.pick(e,_.keys(t))))}},c.onChatMessageSave=function(e){if(e&&!e.secret){var t=_.find(c.chatInteractions.rows,{id:e.ChatInteractionId});if(t){var n=_.find(t.Messages,{id:e.id});n?_.merge(n,_.pick(e,_.keys(n))):(_.isNil(t.Messages)&&(t.Messages=[]),t.Messages.push(e)),p(t)}}},c.onChatInteractionOpen=function(e){var t=_.find(c.chatInteractions.rows,{id:e.ChatInteractionId});t&&t.Users&&(_.find(t.Users,{id:e.UserId})||t.Users.push({id:e.UserId}))},c.onChatInteractionClose=function(e){var t=_.find(c.chatInteractions.rows,{id:e.ChatInteractionId});t&&t.Users&&_.remove(t.Users,{id:e.UserId})},c.localizationMap={Today:o.instant("DASHBOARDS.TODAY"),Yesterday:o.instant("DASHBOARDS.YESTERDAY"),"This Week":o.instant("DASHBOARDS.THIS_WEEK"),"Last Week":o.instant("DASHBOARDS.LAST_WEEK"),"This Month":o.instant("DASHBOARDS.THIS_MONTH"),"Last Month":o.instant("DASHBOARDS.LAST_MONTH"),"This Year":o.instant("DASHBOARDS.THIS_YEAR"),"Last Year":o.instant("DASHBOARDS.LAST_YEAR"),January:o.instant("DASHBOARDS.JANUARY"),February:o.instant("DASHBOARDS.FEBRUARY"),March:o.instant("DASHBOARDS.MARCH"),April:o.instant("DASHBOARDS.APRIL"),May:o.instant("DASHBOARDS.MAY"),June:o.instant("DASHBOARDS.JUNE"),July:o.instant("DASHBOARDS.JULY"),August:o.instant("DASHBOARDS.AUGUST"),September:o.instant("DASHBOARDS.SEPTEMBER"),October:o.instant("DASHBOARDS.OCTOBER"),November:o.instant("DASHBOARDS.NOVEMBER"),December:o.instant("DASHBOARDS.DECEMBER"),Mon:o.instant("DASHBOARDS.MON"),Tue:o.instant("DASHBOARDS.TUE"),Wed:o.instant("DASHBOARDS.WED"),Thu:o.instant("DASHBOARDS.THU"),Fri:o.instant("DASHBOARDS.FRI"),Sat:o.instant("DASHBOARDS.SAT"),Sun:o.instant("DASHBOARDS.SUN")},c.pickerModel={dateStart:null},c.onInit();var g=!0,v=1;n.$watch("vm.query.filter",function(e,t){g?a(function(){g=!1}):(t||(v=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=v),c.getChatInteractions())}),n.$on("$destroy",function(){l.removeAllListeners("chatMessage:save"),l.removeAllListeners("chatMessage:update"),l.removeAllListeners("chatInteraction:save"),l.removeAllListeners("chatInteractionTags:save"),l.removeAllListeners("chatInteraction:update"),l.removeAllListeners("user_has_chat_interactions:save"),l.removeAllListeners("user_has_chat_interactions:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeChatController",e)}(),function(){"use strict";function e(n,a,i,o,e,t,s,r){var l=this;l.currentUser=t.getCurrentUser(),l.lists={},l.contacts={count:0,rows:[]},l.query={sort:"-updatedAt",limit:10,page:1},l.getContacts=function(){l.query.ListId=l.query.ListId||l.defaultLists,l.query.offset=(l.query.page-1)*l.query.limit,r.localStorage.setItem("motion2.home.contacts:"+l.currentUser.id,JSON.stringify({query:_.omit(l.query,"ListId")})),l.promise=s.cmContact.get(l.query,m).$promise},l.refreshContacts=function(){l.getContacts()},l.mergeContact=function(e,t){o.show({controller:"MergeContactDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/merge/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,resolve:{contact:["apiResolver",function(e){return e.resolve("cmContact@get",{id:t.id})}],lists:["apiResolver",function(e){return e.resolve("user@getLists",{id:l.currentUser.id,fields:"id,name"})}]},locals:{contacts:l.contacts.rows}})},l.duplicateContact=function(e,t){o.show({controller:"DuplicateContactDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/duplicate/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,resolve:{contact:["apiResolver",function(e){return e.resolve("cmContact@get",{id:t.id})}],lists:["apiResolver",function(e){return e.resolve("user@getLists",{id:l.currentUser.id,fields:"id,name"})}]},locals:{contacts:l.contacts.rows}})},l.openContact=function(e,t){a.$parent.vm.addContactTab(t)},l.call=a.$parent.vm.call,(l.onInit=u)();var d=!0,c=1;function m(e){l.contacts=e||{count:0,rows:[]}}function u(){var e=r.localStorage.getItem("motion2.home.contacts:"+l.currentUser.id);e&&(e=JSON.parse(e))&&e.query&&(l.query=_.merge(l.query,e.query),l.query=_.omit(l.query,"filter")),s.user.getLists({id:l.currentUser.id,fields:"id,name,dialPrefix",sort:"name",nolimit:!0}).$promise.then(function(e){l.lists=e||{count:0,rows:[]},l.listsMap=_.keyBy(l.lists.rows,"id"),l.defaultLists=l.lists.rows?_.map(l.lists.rows,"id").join(","):void 0}).catch(function(e){console.error(e)}).finally(function(){l.getContacts()})}a.$watch("vm.query.filter",function(e,t){d?i(function(){d=!1}):(t||(c=l.query.page),e!==t&&(l.query.page=1),e||(l.query.page=c),l.getContacts())})}e.$inject=["$document","$scope","$timeout","$mdDialog","$stateParams","Auth","api","$window"],angular.module("app.dashboards").controller("AgentHomeContactsController",e)}(),function(){"use strict";function e(e,t){var n=t(function(){},999);e.$on("$destroy",function(){n&&(t.cancel(n),n=null)})}e.$inject=["$scope","$interval"],angular.module("app.dashboards").controller("AgentHomeDashboardController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d){var c=this,m=["type","waiting","dialMethod","dialActive"];function u(e){c.voiceQueuesTotal=e.count?e.count:0,c.voiceQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},_.forIn(c.voiceQueues,function(e,t){c.rpcVoiceQueues[t]&&(c.voiceQueues[t].waiting=c.rpcVoiceQueues[t].waiting||0)})}c.voiceQueues={},c.voiceQueuesTotal=0,c.rpcVoiceQueues={},c.getVoiceQueues={},c.rpcVoiceQueuesChannels={},c.addVoiceQueuesChannels={},c.deleteVoiceQueuesChannels=[],c.load=!0,c.query={id:r.getCurrentUser().id,fields:"id,name,type,dialMethod,dialActive",channel:"voice",type:"outbound",limit:10,page:1},c.queryChannels={limit:10,page:1},c.success=u,c.getVoiceQueues=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=s.user.getQueues(c.query,u).$promise},c.getSize=function(e){return _.size(e)},c.onSaveQueue=function(e){c.voiceQueues[e.id]&&c.rpcVoiceQueues[e.id]&&(c.rpcVoiceQueues[e.id]=e,_.merge(c.voiceQueues[e.id],_.pick(e,m)))},c.onSaveChannel=function(e){"outbound"===e.type&&(e.queuecallerleaveAt?(delete c.rpcVoiceQueuesChannels[e.uniqueid],c.load&&c.deleteVoiceQueuesChannels.push(e.uniqueid)):(c.rpcVoiceQueuesChannels[e.uniqueid]=e,c.load&&(c.addVoiceQueuesChannels[e.uniqueid]=e)))},c.onUserVoiceQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getVoiceQueues()},c.onSaveVoiceQueue=function(e){_.isNil(e)||(c.rpcVoiceQueues[e.id]=_.pick(e,m))},c.onUpdateVoiceQueue=function(e){_.isNil(e)||(c.rpcVoiceQueues[e.id]&&_.merge(c.rpcVoiceQueues[e.id],_.pick(e,m)),c.voiceQueues[e.id]&&_.merge(c.voiceQueues[e.id],_.pick(e,m)))},c.onRemoveVoiceQueue=function(e){_.isNil(e)||(delete c.rpcVoiceQueues[e.id],delete c.voiceQueues[e.id])},l.onWithoutApply("voice_queue:save",c.onSaveQueue),l.onWithoutApply("voice_queue_channel:save",c.onSaveChannel),l.onWithoutApply("userVoiceQueue:save",c.onUserVoiceQueue),l.onWithoutApply("userVoiceQueue:remove",c.onUserVoiceQueue),l.onWithoutApply("voiceQueue:save",c.onSaveVoiceQueue),l.onWithoutApply("voiceQueue:remove",c.onRemoveVoiceQueue),l.onWithoutApply("voiceQueue:update",c.onUpdateVoiceQueue),s.rpc.getVoiceQueues().$promise.then(function(e){return c.rpcVoiceQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},s.rpc.getVoiceQueuesChannels().$promise}).then(function(e){c.rpcVoiceQueuesChannels=e?_.keyBy(e.rows?_.filter(e.rows,{type:"outbound",queuecallerleaveAt:null}):[],"uniqueid"):{}}).catch(function(e){console.error(e)}).finally(function(){_.merge(c.rpcVoiceQueuesChannels,c.addVoiceQueuesChannels);for(var e=0;e<c.deleteVoiceQueuesChannels.length;e+=1)delete c.rpcVoiceQueuesChannels[c.deleteVoiceQueuesChannels[e]];c.load=!1,c.addVoiceQueuesChannels={},c.deleteVoiceQueuesChannels=[],c.getVoiceQueues()});var p=!0,g=1;e.$watch("vm_dc.query.filter",function(e,t){p?n(function(){p=!1}):(t||(g=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=g),c.getVoiceQueues())}),e.$on("$destroy",function(){l.removeAllListeners("voice_queue:save"),l.removeAllListeners("voice_queue_channel:save"),l.removeAllListeners("userVoiceQueue:save"),l.removeAllListeners("userVoiceQueue:remove"),l.removeAllListeners("voiceQueue:save"),l.removeAllListeners("voiceQueue:update"),l.removeAllListeners("voiceQueue:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeDashboardBullController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d){var c=this,m=["id","name","mapAgentsId","waiting"],u=!0;function p(){var e=(c.queryChannels.page-1)*c.queryChannels.limit;c.paginatedInteractions=_.orderBy(c.rpcChatQueuesWaitingInteractions,["joinAt"],["desc"]),c.interactions=_.drop(c.paginatedInteractions,e).slice(0,c.queryChannels.limit)}function g(e){c.chatQueuesTotal=e.count?e.count:0,c.chatQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},_.forIn(c.chatQueues,function(e,t){c.rpcChatQueues[t]&&(c.chatQueues[t].waiting=c.rpcChatQueues[t].waiting||0)})}function v(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=s.user.getQueues(c.query,g).$promise}c.chatQueues={},c.chatQueuesTotal=0,c.rpcChatQueues={},c.paginatedInteractions=[],c.deleteChatQueuesWaitingInteractions=[],c.rpcChatQueuesWaitingInteractions={},c.query={id:r.getCurrentUser().id,channel:"chat",fields:"id,name,mapAgentsId,waiting",limit:10,page:1},c.queryChannels={limit:10,page:1},c.success=g,c.getChatQueues=v,c.getSize=function(e){return _.size(e)},c.getColorByChannel=function(e){switch(e){case"chat":return"green-A700-bg";case"mail":return"teal-bg";case"sms":return"orange-bg";case"openchannel":return"amber-A200-bg";case"fax":return"blue-grey-A200-bg";default:return"white-bg"}},c.paginate=p,c.onSaveQueue=function(e){c.chatQueues[e.id]&&c.rpcChatQueues[e.id]&&(_.merge(c.rpcChatQueues[e.id],_.pick(e,m)),_.merge(c.chatQueues[e.id],_.pick(e,m)))},c.onSaveChatQueue=function(e){_.isNil(e)||(c.rpcChatQueues[e.id]=_.pick(e,m))},c.onUpdateChatQueue=function(e){_.isNil(e)||(c.rpcChatQueues[e.id]&&_.merge(c.rpcChatQueues[e.id],_.pick(e,m)),c.chatQueues[e.id]&&_.merge(c.chatQueues[e.id],_.pick(e,m)))},c.onRemoveChatQueue=function(e){_.isNil(e)||(delete c.rpcChatQueues[e.id],delete c.chatQueues[e.id])},c.onSaveUserChatQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getChatQueues()},c.onRemoveUserChatQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getChatQueues()},c.onSaveChatQueueChannel=function(e){c.rpcChatQueuesWaitingInteractions[e.id]=e,p()},c.onRemoveChatQueueChannel=function(e){delete c.rpcChatQueuesWaitingInteractions[e.id],u&&c.deleteChatQueuesWaitingInteractions.push(e.id);p()},l.onWithoutApply("chat_queue:save",c.onSaveQueue),l.onWithoutApply("chatQueue:save",c.onSaveVoiceQueue),l.onWithoutApply("chatQueue:update",c.onUpdateVoiceQueue),l.onWithoutApply("chatQueue:remove",c.onRemoveVoiceQueue),l.onWithoutApply("userChatQueue:save",c.onSaveUserChatQueue),l.onWithoutApply("userChatQueue:remove",c.onRemoveUserChatQueue),l.onWithoutApply("chat_queue_waiting_interaction:save",c.onSaveChatQueueChannel),l.onWithoutApply("chat_queue_waiting_interaction:remove",c.onRemoveChatQueueChannel),s.rpc.getChatQueues().$promise.then(function(e){return c.rpcChatQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},s.rpc.getChatQueuesWaitingInteractions().$promise}).then(function(e){_.merge(c.rpcChatQueuesWaitingInteractions,e?_.keyBy(e.rows?e.rows:[],"id"):{})}).catch(function(e){console.error(e)}).finally(function(){for(var e=0;e<c.deleteChatQueuesWaitingInteractions.length;e+=1)delete c.rpcChatQueuesWaitingInteractions[c.deleteChatQueuesWaitingInteractions[e]];u=!1,c.deleteChatQueuesWaitingInteractions=[],v(),p()});var h=!0,b=1;e.$watch("vm_dc.query.filter",function(e,t){h?n(function(){h=!1}):(t||(b=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=b),c.getChatQueues())}),e.$on("$destroy",function(){l.removeAllListeners("chat_queue:save"),l.removeAllListeners("chatQueue:save"),l.removeAllListeners("chatQueue:update"),l.removeAllListeners("chatQueue:remove"),l.removeAllListeners("userChatQueue:save"),l.removeAllListeners("userChatQueue:remove"),l.removeAllListeners("chat_queue_waiting_interaction:save"),l.removeAllListeners("chat_queue_waiting_interaction:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeDashboardMultiChannelChatController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d){var c=this,m=["id","name","mapAgentsId","waiting"],u=!0;function p(){var e=(c.queryChannels.page-1)*c.queryChannels.limit;c.paginatedInteractions=_.orderBy(c.rpcFaxQueuesWaitingInteractions,["joinAt"],["desc"]),c.interactions=_.drop(c.paginatedInteractions,e).slice(0,c.queryChannels.limit)}function g(e){c.faxQueuesTotal=e.count?e.count:0,c.faxQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},_.forIn(c.faxQueues,function(e,t){c.rpcFaxQueues[t]&&(c.faxQueues[t].waiting=c.rpcFaxQueues[t].waiting||0)})}function v(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=s.user.getQueues(c.query,g).$promise}c.faxQueues={},c.faxQueuesTotal=0,c.rpcFaxQueues={},c.paginatedInteractions=[],c.deleteFaxQueuesWaitingInteractions=[],c.rpcFaxQueuesWaitingInteractions={},c.query={id:r.getCurrentUser().id,channel:"fax",fields:"id,name,mapAgentsId,waiting",limit:10,page:1},c.queryChannels={limit:10,page:1},c.success=g,c.getFaxQueues=v,c.getSize=function(e){return _.size(e)},c.getColorByChannel=function(e){switch(e){case"chat":return"green-A700-bg";case"mail":return"teal-bg";case"sms":return"orange-bg";case"openchannel":return"amber-A200-bg";case"fax":return"blue-grey-A200-bg";default:return"white-bg"}},c.paginate=p,c.onSaveQueue=function(e){c.faxQueues[e.id]&&c.rpcFaxQueues[e.id]&&(_.merge(c.rpcFaxQueues[e.id],_.pick(e,m)),_.merge(c.faxQueues[e.id],_.pick(e,m)))},c.onSaveFaxQueue=function(e){_.isNil(e)||(c.rpcFaxQueues[e.id]=_.pick(e,m))},c.onUpdateFaxQueue=function(e){_.isNil(e)||(c.rpcFaxQueues[e.id]&&_.merge(c.rpcFaxQueues[e.id],_.pick(e,m)),c.faxQueues[e.id]&&_.merge(c.faxQueues[e.id],_.pick(e,m)))},c.onRemoveFaxQueue=function(e){_.isNil(e)||(delete c.rpcFaxQueues[e.id],delete c.faxQueues[e.id])},c.onSaveUserFaxQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getFaxQueues()},c.onRemoveUserFaxQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getFaxQueues()},c.onSaveFaxQueueChannel=function(e){c.rpcFaxQueuesWaitingInteractions[e.id]=e,p()},c.onRemoveFaxQueueChannel=function(e){delete c.rpcFaxQueuesWaitingInteractions[e.id],u&&c.deleteFaxQueuesWaitingInteractions.push(e.id);p()},l.onWithoutApply("fax_queue:save",c.onSaveQueue),l.onWithoutApply("faxQueue:save",c.onSaveVoiceQueue),l.onWithoutApply("faxQueue:update",c.onUpdateVoiceQueue),l.onWithoutApply("faxQueue:remove",c.onRemoveVoiceQueue),l.onWithoutApply("userFaxQueue:save",c.onSaveUserFaxQueue),l.onWithoutApply("userFaxQueue:remove",c.onRemoveUserFaxQueue),l.onWithoutApply("fax_queue_waiting_interaction:save",c.onSaveFaxQueueChannel),l.onWithoutApply("fax_queue_waiting_interaction:remove",c.onRemoveFaxQueueChannel),s.rpc.getFaxQueues().$promise.then(function(e){return c.rpcFaxQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},s.rpc.getFaxQueuesWaitingInteractions().$promise}).then(function(e){_.merge(c.rpcFaxQueuesWaitingInteractions,e?_.keyBy(e.rows?e.rows:[],"id"):{})}).catch(function(e){console.error(e)}).finally(function(){for(var e=0;e<c.deleteFaxQueuesWaitingInteractions.length;e+=1)delete c.rpcFaxQueuesWaitingInteractions[c.deleteFaxQueuesWaitingInteractions[e]];u=!1,c.deleteFaxQueuesWaitingInteractions=[],v(),p()});var h=!0,b=1;e.$watch("vm_dc.query.filter",function(e,t){h?n(function(){h=!1}):(t||(b=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=b),c.getFaxQueues())}),e.$on("$destroy",function(){l.removeAllListeners("fax_queue:save"),l.removeAllListeners("faxQueue:save"),l.removeAllListeners("faxQueue:update"),l.removeAllListeners("faxQueue:remove"),l.removeAllListeners("userFaxQueue:save"),l.removeAllListeners("userFaxQueue:remove"),l.removeAllListeners("fax_queue_waiting_interaction:save"),l.removeAllListeners("fax_queue_waiting_interaction:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeDashboardMultiChannelFaxController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d){var c=this,m=["id","name","mapAgentsId","waiting"],u=!0;function p(){var e=(c.queryChannels.page-1)*c.queryChannels.limit;c.paginatedInteractions=_.orderBy(c.rpcMailQueuesWaitingInteractions,["joinAt"],["desc"]),c.interactions=_.drop(c.paginatedInteractions,e).slice(0,c.queryChannels.limit)}function g(e){c.mailQueuesTotal=e.count?e.count:0,c.mailQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},_.forIn(c.mailQueues,function(e,t){c.rpcMailQueues[t]&&(c.mailQueues[t].waiting=c.rpcMailQueues[t].waiting||0)})}function v(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=s.user.getQueues(c.query,g).$promise}c.mailQueues={},c.mailQueuesTotal=0,c.rpcMailQueues={},c.paginatedInteractions=[],c.deleteMailQueuesWaitingInteractions=[],c.rpcMailQueuesWaitingInteractions={},c.query={id:r.getCurrentUser().id,channel:"mail",fields:"id,name,mapAgentsId,waiting",limit:10,page:1},c.queryChannels={limit:10,page:1},c.success=g,c.getMailQueues=v,c.getSize=function(e){return _.size(e)},c.getColorByChannel=function(e){switch(e){case"chat":return"green-A700-bg";case"mail":return"teal-bg";case"sms":return"orange-bg";case"openchannel":return"amber-A200-bg";case"fax":return"blue-grey-A200-bg";default:return"white-bg"}},c.paginate=p,c.onSaveQueue=function(e){c.mailQueues[e.id]&&c.rpcMailQueues[e.id]&&(_.merge(c.rpcMailQueues[e.id],_.pick(e,m)),_.merge(c.mailQueues[e.id],_.pick(e,m)))},c.onSaveMailQueue=function(e){_.isNil(e)||(c.rpcMailQueues[e.id]=_.pick(e,m))},c.onUpdateMailQueue=function(e){_.isNil(e)||(c.rpcMailQueues[e.id]&&_.merge(c.rpcMailQueues[e.id],_.pick(e,m)),c.mailQueues[e.id]&&_.merge(c.mailQueues[e.id],_.pick(e,m)))},c.onRemoveMailQueue=function(e){_.isNil(e)||(delete c.rpcMailQueues[e.id],delete c.mailQueues[e.id])},c.onSaveUserMailQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getMailQueues()},c.onRemoveUserMailQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getMailQueues()},c.onSaveMailQueueChannel=function(e){c.rpcMailQueuesWaitingInteractions[e.id]=e,p()},c.onRemoveMailQueueChannel=function(e){delete c.rpcMailQueuesWaitingInteractions[e.id],u&&c.deleteMailQueuesWaitingInteractions.push(e.id);p()},l.onWithoutApply("mail_queue:save",c.onSaveQueue),l.onWithoutApply("mailQueue:save",c.onSaveVoiceQueue),l.onWithoutApply("mailQueue:update",c.onUpdateVoiceQueue),l.onWithoutApply("mailQueue:remove",c.onRemoveVoiceQueue),l.onWithoutApply("userMailQueue:save",c.onSaveUserMailQueue),l.onWithoutApply("userMailQueue:remove",c.onRemoveUserMailQueue),l.onWithoutApply("mail_queue_waiting_interaction:save",c.onSaveMailQueueChannel),l.onWithoutApply("mail_queue_waiting_interaction:remove",c.onRemoveMailQueueChannel),s.rpc.getMailQueues().$promise.then(function(e){return c.rpcMailQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},s.rpc.getMailQueuesWaitingInteractions().$promise}).then(function(e){_.merge(c.rpcMailQueuesWaitingInteractions,e?_.keyBy(e.rows?e.rows:[],"id"):{})}).catch(function(e){console.error(e)}).finally(function(){for(var e=0;e<c.deleteMailQueuesWaitingInteractions.length;e+=1)delete c.rpcMailQueuesWaitingInteractions[c.deleteMailQueuesWaitingInteractions[e]];u=!1,c.deleteMailQueuesWaitingInteractions=[],v(),p()});var h=!0,b=1;e.$watch("vm_dc.query.filter",function(e,t){h?n(function(){h=!1}):(t||(b=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=b),c.getMailQueues())}),e.$on("$destroy",function(){l.removeAllListeners("mail_queue:save"),l.removeAllListeners("mailQueue:save"),l.removeAllListeners("mailQueue:update"),l.removeAllListeners("mailQueue:remove"),l.removeAllListeners("userMailQueue:save"),l.removeAllListeners("userMailQueue:remove"),l.removeAllListeners("mail_queue_waiting_interaction:save"),l.removeAllListeners("mail_queue_waiting_interaction:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeDashboardMultiChannelMailController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d){var c=this,m=["id","name","mapAgentsId","waiting"],u=!0;function p(){var e=(c.queryChannels.page-1)*c.queryChannels.limit;c.paginatedInteractions=_.orderBy(c.rpcOpenchannelQueuesWaitingInteractions,["joinAt"],["desc"]),c.interactions=_.drop(c.paginatedInteractions,e).slice(0,c.queryChannels.limit)}function g(e){c.openchannelQueuesTotal=e.count?e.count:0,c.openchannelQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},_.forIn(c.openchannelQueues,function(e,t){c.rpcOpenchannelQueues[t]&&(c.openchannelQueues[t].waiting=c.rpcOpenchannelQueues[t].waiting||0)})}function v(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=s.user.getQueues(c.query,g).$promise}c.openchannelQueues={},c.openchannelQueuesTotal=0,c.rpcOpenchannelQueues={},c.paginatedInteractions=[],c.deleteOpenchannelQueuesWaitingInteractions=[],c.rpcOpenchannelQueuesWaitingInteractions={},c.query={id:r.getCurrentUser().id,channel:"openchannel",fields:"id,name,mapAgentsId,waiting",limit:10,page:1},c.queryChannels={limit:10,page:1},c.success=g,c.getOpenchannelQueues=v,c.getSize=function(e){return _.size(e)},c.getColorByChannel=function(e){switch(e){case"chat":return"green-A700-bg";case"mail":return"teal-bg";case"sms":return"orange-bg";case"openchannel":return"amber-A200-bg";case"fax":return"blue-grey-A200-bg";default:return"white-bg"}},c.paginate=p,c.onSaveQueue=function(e){c.openchannelQueues[e.id]&&c.rpcOpenchannelQueues[e.id]&&(_.merge(c.rpcOpenchannelQueues[e.id],_.pick(e,m)),_.merge(c.openchannelQueues[e.id],_.pick(e,m)))},c.onSaveOpenchannelQueue=function(e){_.isNil(e)||(c.rpcOpenchannelQueues[e.id]=_.pick(e,m))},c.onUpdateOpenchannelQueue=function(e){_.isNil(e)||(c.rpcOpenchannelQueues[e.id]&&_.merge(c.rpcOpenchannelQueues[e.id],_.pick(e,m)),c.openchannelQueues[e.id]&&_.merge(c.openchannelQueues[e.id],_.pick(e,m)))},c.onRemoveOpenchannelQueue=function(e){_.isNil(e)||(delete c.rpcOpenchannelQueues[e.id],delete c.openchannelQueues[e.id])},c.onSaveUserOpenchannelQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getOpenchannelQueues()},c.onRemoveUserOpenchannelQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getOpenchannelQueues()},c.onSaveOpenchannelQueueChannel=function(e){c.rpcOpenchannelQueuesWaitingInteractions[e.id]=e,p()},c.onRemoveOpenchannelQueueChannel=function(e){delete c.rpcOpenchannelQueuesWaitingInteractions[e.id],u&&c.deleteOpenchannelQueuesWaitingInteractions.push(e.id);p()},l.onWithoutApply("openchannel_queue:save",c.onSaveQueue),l.onWithoutApply("openchannelQueue:save",c.onSaveVoiceQueue),l.onWithoutApply("openchannelQueue:update",c.onUpdateVoiceQueue),l.onWithoutApply("openchannelQueue:remove",c.onRemoveVoiceQueue),l.onWithoutApply("userOpenchannelQueue:save",c.onSaveUserOpenchannelQueue),l.onWithoutApply("userOpenchannelQueue:remove",c.onRemoveUserOpenchannelQueue),l.onWithoutApply("openchannel_queue_waiting_interaction:save",c.onSaveOpenchannelQueueChannel),l.onWithoutApply("openchannel_queue_waiting_interaction:remove",c.onRemoveOpenchannelQueueChannel),s.rpc.getOpenchannelQueues().$promise.then(function(e){return c.rpcOpenchannelQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},s.rpc.getOpenchannelQueuesWaitingInteractions().$promise}).then(function(e){_.merge(c.rpcOpenchannelQueuesWaitingInteractions,e?_.keyBy(e.rows?e.rows:[],"id"):{})}).catch(function(e){console.error(e)}).finally(function(){for(var e=0;e<c.deleteOpenchannelQueuesWaitingInteractions.length;e+=1)delete c.rpcOpenchannelQueuesWaitingInteractions[c.deleteOpenchannelQueuesWaitingInteractions[e]];u=!1,c.deleteOpenchannelQueuesWaitingInteractions=[],v(),p()});var h=!0,b=1;e.$watch("vm_dc.query.filter",function(e,t){h?n(function(){h=!1}):(t||(b=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=b),c.getOpenchannelQueues())}),e.$on("$destroy",function(){l.removeAllListeners("openchannel_queue:save"),l.removeAllListeners("openchannelQueue:save"),l.removeAllListeners("openchannelQueue:update"),l.removeAllListeners("openchannelQueue:remove"),l.removeAllListeners("userOpenchannelQueue:save"),l.removeAllListeners("userOpenchannelQueue:remove"),l.removeAllListeners("openchannel_queue_waiting_interaction:save"),l.removeAllListeners("openchannel_queue_waiting_interaction:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeDashboardMultiChannelOpenchannelController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d){var c=this,m=["id","name","mapAgentsId","waiting"],u=!0;function p(){var e=(c.queryChannels.page-1)*c.queryChannels.limit;c.paginatedInteractions=_.orderBy(c.rpcSmsQueuesWaitingInteractions,["joinAt"],["desc"]),c.interactions=_.drop(c.paginatedInteractions,e).slice(0,c.queryChannels.limit)}function g(e){c.smsQueuesTotal=e.count?e.count:0,c.smsQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},_.forIn(c.smsQueues,function(e,t){c.rpcSmsQueues[t]&&(c.smsQueues[t].waiting=c.rpcSmsQueues[t].waiting||0)})}function v(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=s.user.getQueues(c.query,g).$promise}c.smsQueues={},c.smsQueuesTotal=0,c.rpcSmsQueues={},c.paginatedInteractions=[],c.deleteSmsQueuesWaitingInteractions=[],c.rpcSmsQueuesWaitingInteractions={},c.query={id:r.getCurrentUser().id,channel:"sms",fields:"id,name,mapAgentsId,waiting",limit:10,page:1},c.queryChannels={limit:10,page:1},c.success=g,c.getSmsQueues=v,c.getSize=function(e){return _.size(e)},c.getColorByChannel=function(e){switch(e){case"chat":return"green-A700-bg";case"mail":return"teal-bg";case"sms":return"orange-bg";case"openchannel":return"amber-A200-bg";case"fax":return"blue-grey-A200-bg";default:return"white-bg"}},c.paginate=p,c.onSaveQueue=function(e){c.smsQueues[e.id]&&c.rpcSmsQueues[e.id]&&(_.merge(c.rpcSmsQueues[e.id],_.pick(e,m)),_.merge(c.smsQueues[e.id],_.pick(e,m)))},c.onSaveSmsQueue=function(e){_.isNil(e)||(c.rpcSmsQueues[e.id]=_.pick(e,m))},c.onUpdateSmsQueue=function(e){_.isNil(e)||(c.rpcSmsQueues[e.id]&&_.merge(c.rpcSmsQueues[e.id],_.pick(e,m)),c.smsQueues[e.id]&&_.merge(c.smsQueues[e.id],_.pick(e,m)))},c.onRemoveSmsQueue=function(e){_.isNil(e)||(delete c.rpcSmsQueues[e.id],delete c.smsQueues[e.id])},c.onSaveUserSmsQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getSmsQueues()},c.onRemoveUserSmsQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getSmsQueues()},c.onSaveSmsQueueChannel=function(e){c.rpcSmsQueuesWaitingInteractions[e.id]=e,p()},c.onRemoveSmsQueueChannel=function(e){delete c.rpcSmsQueuesWaitingInteractions[e.id],u&&c.deleteSmsQueuesWaitingInteractions.push(e.id);p()},l.onWithoutApply("sms_queue:save",c.onSaveQueue),l.onWithoutApply("smsQueue:save",c.onSaveVoiceQueue),l.onWithoutApply("smsQueue:update",c.onUpdateVoiceQueue),l.onWithoutApply("smsQueue:remove",c.onRemoveVoiceQueue),l.onWithoutApply("userSmsQueue:save",c.onSaveUserSmsQueue),l.onWithoutApply("userSmsQueue:remove",c.onRemoveUserSmsQueue),l.onWithoutApply("sms_queue_waiting_interaction:save",c.onSaveSmsQueueChannel),l.onWithoutApply("sms_queue_waiting_interaction:remove",c.onRemoveSmsQueueChannel),s.rpc.getSmsQueues().$promise.then(function(e){return c.rpcSmsQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},s.rpc.getSmsQueuesWaitingInteractions().$promise}).then(function(e){_.merge(c.rpcSmsQueuesWaitingInteractions,e?_.keyBy(e.rows?e.rows:[],"id"):{})}).catch(function(e){console.error(e)}).finally(function(){for(var e=0;e<c.deleteSmsQueuesWaitingInteractions.length;e+=1)delete c.rpcSmsQueuesWaitingInteractions[c.deleteSmsQueuesWaitingInteractions[e]];u=!1,c.deleteSmsQueuesWaitingInteractions=[],v(),p()});var h=!0,b=1;e.$watch("vm_dc.query.filter",function(e,t){h?n(function(){h=!1}):(t||(b=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=b),c.getSmsQueues())}),e.$on("$destroy",function(){l.removeAllListeners("sms_queue:save"),l.removeAllListeners("smsQueue:save"),l.removeAllListeners("smsQueue:update"),l.removeAllListeners("smsQueue:remove"),l.removeAllListeners("userSmsQueue:save"),l.removeAllListeners("userSmsQueue:remove"),l.removeAllListeners("sms_queue_waiting_interaction:save"),l.removeAllListeners("sms_queue_waiting_interaction:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeDashboardMultiChannelSmsController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d){var c=this,m=["type","waiting","dialMethod","dialActive"];function u(e){c.voiceQueuesTotal=e.count?e.count:0,c.voiceQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},_.forIn(c.voiceQueues,function(e,t){c.rpcVoiceQueues[t]&&(c.voiceQueues[t].waiting=c.rpcVoiceQueues[t].waiting||0)})}c.voiceQueues={},c.voiceQueuesTotal=0,c.rpcVoiceQueues={},c.getVoiceQueues={},c.rpcVoiceQueuesChannels={},c.addVoiceQueuesChannels={},c.deleteVoiceQueuesChannels=[],c.load=!0,c.query={id:r.getCurrentUser().id,fields:"id,name,type,dialMethod,dialActive",channel:"voice",type:"inbound",limit:10,page:1},c.queryChannels={limit:10,page:1},c.success=u,c.getVoiceQueues=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=s.user.getQueues(c.query,u).$promise},c.getSize=function(e){return _.size(e)},c.onSaveQueue=function(e){c.voiceQueues[e.id]&&c.rpcVoiceQueues[e.id]&&(c.rpcVoiceQueues[e.id]=e,_.merge(c.voiceQueues[e.id],_.pick(e,m)))},c.onSaveChannel=function(e){"inbound"===e.type&&(e.queuecallerleaveAt?(delete c.rpcVoiceQueuesChannels[e.uniqueid],c.load&&c.deleteVoiceQueuesChannels.push(e.uniqueid)):(c.rpcVoiceQueuesChannels[e.uniqueid]=e,c.load&&(c.addVoiceQueuesChannels[e.uniqueid]=e)))},c.onUserVoiceQueue=function(e){_.toInteger(e.UserId)===r.getCurrentUser().id&&c.getVoiceQueues()},c.onSaveVoiceQueue=function(e){_.isNil(e)||(c.rpcVoiceQueues[e.id]=_.pick(e,m))},c.onUpdateVoiceQueue=function(e){_.isNil(e)||(c.rpcVoiceQueues[e.id]&&_.merge(c.rpcVoiceQueues[e.id],_.pick(e,m)),c.voiceQueues[e.id]&&_.merge(c.voiceQueues[e.id],_.pick(e,m)))},c.onRemoveVoiceQueue=function(e){_.isNil(e)||(delete c.rpcVoiceQueues[e.id],delete c.voiceQueues[e.id])},l.onWithoutApply("voice_queue:save",c.onSaveQueue),l.onWithoutApply("voice_queue_channel:save",c.onSaveChannel),l.onWithoutApply("userVoiceQueue:save",c.onUserVoiceQueue),l.onWithoutApply("userVoiceQueue:remove",c.onUserVoiceQueue),l.onWithoutApply("voiceQueue:save",c.onSaveVoiceQueue),l.onWithoutApply("voiceQueue:remove",c.onRemoveVoiceQueue),l.onWithoutApply("voiceQueue:update",c.onUpdateVoiceQueue),s.rpc.getVoiceQueues().$promise.then(function(e){return c.rpcVoiceQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{},s.rpc.getVoiceQueuesChannels().$promise}).then(function(e){c.rpcVoiceQueuesChannels=e?_.keyBy(e.rows?_.filter(e.rows,{type:"inbound",queuecallerleaveAt:null}):[],"uniqueid"):{}}).catch(function(e){console.error(e)}).finally(function(){_.merge(c.rpcVoiceQueuesChannels,c.addVoiceQueuesChannels);for(var e=0;e<c.deleteVoiceQueuesChannels.length;e+=1)delete c.rpcVoiceQueuesChannels[c.deleteVoiceQueuesChannels[e]];c.load=!1,c.addVoiceQueuesChannels={},c.deleteVoiceQueuesChannels=[],c.getVoiceQueues()});var p=!0,g=1;e.$watch("vm_dc.query.filter",function(e,t){p?n(function(){p=!1}):(t||(g=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=g),c.getVoiceQueues())}),e.$on("$destroy",function(){l.removeAllListeners("voice_queue:save"),l.removeAllListeners("voice_queue_channel:save"),l.removeAllListeners("userVoiceQueue:save"),l.removeAllListeners("userVoiceQueue:remove"),l.removeAllListeners("voiceQueue:save"),l.removeAllListeners("voiceQueue:update"),l.removeAllListeners("voiceQueue:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeDashboardVoiceController",e)}(),function(){"use strict";function e(n,a,i,o,t,s,r,l,d,c){var m=this;function e(e){m.faxInteractions=e||{count:0,rows:[]};for(var t=0;t<m.faxInteractions.rows.length;t+=1)p(m.faxInteractions.rows[t])}function u(){m.query.dateStart=void 0,m.query.dateEnd=void 0,m.pickerModel.dateStart&&(m.query.dateStart=m.pickerModel.dateStart,m.query.dateEnd=m.pickerModel.dateEnd),m.query.offset=(m.query.page-1)*m.query.limit,t.localStorage.setItem("motion2.home.fax:"+m.user.id,JSON.stringify({query:m.query})),m.promise=r.faxInteraction.get(m.query,e).$promise}function p(e){e&&e.Messages?e.unread=_.filter(e.Messages||[],{direction:"in",read:!1}).length:e.unread=0}m.user=l.getCurrentUser(),m.tags={count:0,rows:[]},m.faxInteractions={count:0,rows:[]},m.query={includeAll:!0,sort:"-updatedAt",limit:10,page:1,read:null,closed:null,substatus:null,FaxAccountId:null},m.success=e,m.getFaxInteractions=u,m.showFaxInteraction=function(e,t){n.$parent.vm.addInteractionTab("fax",t)},m.getContactLabel=function(e){if(e.Contact){var t="";return t+=(e.Contact.firstName||"")+""+(e.Contact.lastName||""),t+=" <"+(e.Contact.fax||"unknown")+">"}return s.instant("DASHBOARDS.UNKNOWN")},m.getUserLabel=function(e){if(e.UserId)return e.UserId===l.getCurrentUser().id?s.instant("DASHBOARDS.ME"):m.usersByKey[e.UserId].fullname+" <"+m.usersByKey[e.UserId].internal+">";return s.instant("DASHBOARDS.NOT_ASSIGNED")},m.getFaxAccountLabel=function(e){if(e.Account)return e.Account.key;return s.instant("DASHBOARDS.UNKNOWN")},m.getColorByChannel=function(e){switch(e){case"chat":return"green-A700-bg";case"mail":return"teal-bg";case"sms":return"orange-bg";case"openchannel":return"amber-A200-bg";case"fax":return"blue-grey-A200-bg";default:return"white-bg"}},m.clearAll=function(){m.calendarModel={dateStart:null},m.pickerModel={dateStart:null},m.serviceModel={dateStart:null},m.getFaxInteractions()},m.composeFaxInteraction=function(e,t){i.show({controller:"ComposeFaxInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/composeFax/dialog.html",parent:angular.element(o.body),clickOutsideToClose:!1,locals:{account:t,message:{},type:"new",interaction:{}},fullscreen:!0}).then(function(e){return r.faxAccount.send({id:t.id},e).$promise.then(function(e){c.success({title:"Message properly sent!",msg:"Message has been sent!"}),n.$parent.vm.addInteractionTab("fax",e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else c.error({title:"FAX:SEND",msg:e.data?JSON.stringify(e.data):e.message||e.toString()})})})},m.onInit=function(){return r.faxAccount.get({nolimit:!0}).$promise.then(function(e){return m.faxAccounts=e||{count:0,rows:[]},r.tag.get().$promise}).then(function(e){m.tags=e||{count:0,rows:[]}}).then(function(){return r.user.get({nolimit:!0,fields:"id,fullname,userpic,internal"}).$promise}).then(function(e){m.usersByKey=_.keyBy(e.rows,"id")}).catch(function(e){console.error(e)}).finally(function(){var e=t.localStorage.getItem("motion2.home.fax:"+m.user.id);if(e)try{(e=JSON.parse(e)).query&&(m.query=_.merge(m.query,e.query),m.query=_.omit(m.query,"filter"),m.query.sort&&0<=m.query.sort.indexOf("lastMessage")&&(m.query=_.omit(m.query,"sort")),m.query.includeAll=!0)}catch(e){console.error(e)}d.on("faxInteraction:save",m.onFaxInteractionSave),d.on("faxInteraction:update",m.onFaxInteractionSave),d.on("faxInteractionTags:save",m.onFaxInteractionTagsSave),d.on("faxMessage:save",m.onFaxMessageSave),d.on("faxMessage:update",m.onFaxMessageSave),d.on("user_has_fax_interactions:save",m.onFaxInteractionOpen),d.on("user_has_fax_interactions:remove",m.onFaxInteractionClose),m.getFaxInteractions()})},m.onFaxInteractionSave=function(e){if(e){var t=_.find(m.faxInteractions.rows,{id:e.id});t?_.merge(t,_.pick(e,_.keys(t))):u(),p(e)}},m.onFaxInteractionTagsSave=function(e){if(e){var t=_.find(m.faxInteractions.rows,{id:e.id});t&&(t.Tags=e.tags||[],_.merge(t,_.pick(e,_.keys(t))))}},m.onFaxMessageSave=function(e){if(e&&!e.secret){var t=_.find(m.faxInteractions.rows,{id:e.FaxInteractionId});if(t){var n=_.find(t.Messages,{id:e.id});n?_.merge(n,_.pick(e,_.keys(n))):(_.isNil(t.Messages)&&(t.Messages=[]),t.Messages.push(e)),p(t)}}},m.onFaxInteractionOpen=function(e){var t=_.find(m.faxInteractions.rows,{id:e.FaxInteractionId});t&&t.Users&&(_.find(t.Users,{id:e.UserId})||t.Users.push({id:e.UserId}))},m.onFaxInteractionClose=function(e){var t=_.find(m.faxInteractions.rows,{id:e.FaxInteractionId});t&&t.Users&&_.remove(t.Users,{id:e.UserId})},m.localizationMap={Today:s.instant("DASHBOARDS.TODAY"),Yesterday:s.instant("DASHBOARDS.YESTERDAY"),"This Week":s.instant("DASHBOARDS.THIS_WEEK"),"Last Week":s.instant("DASHBOARDS.LAST_WEEK"),"This Month":s.instant("DASHBOARDS.THIS_MONTH"),"Last Month":s.instant("DASHBOARDS.LAST_MONTH"),"This Year":s.instant("DASHBOARDS.THIS_YEAR"),"Last Year":s.instant("DASHBOARDS.LAST_YEAR"),January:s.instant("DASHBOARDS.JANUARY"),February:s.instant("DASHBOARDS.FEBRUARY"),March:s.instant("DASHBOARDS.MARCH"),April:s.instant("DASHBOARDS.APRIL"),May:s.instant("DASHBOARDS.MAY"),June:s.instant("DASHBOARDS.JUNE"),July:s.instant("DASHBOARDS.JULY"),August:s.instant("DASHBOARDS.AUGUST"),September:s.instant("DASHBOARDS.SEPTEMBER"),October:s.instant("DASHBOARDS.OCTOBER"),November:s.instant("DASHBOARDS.NOVEMBER"),December:s.instant("DASHBOARDS.DECEMBER"),Mon:s.instant("DASHBOARDS.MON"),Tue:s.instant("DASHBOARDS.TUE"),Wed:s.instant("DASHBOARDS.WED"),Thu:s.instant("DASHBOARDS.THU"),Fri:s.instant("DASHBOARDS.FRI"),Sat:s.instant("DASHBOARDS.SAT"),Sun:s.instant("DASHBOARDS.SUN")},m.pickerModel={dateStart:null},m.onInit();var g=!0,v=1;n.$watch("vm.query.filter",function(e,t){g?a(function(){g=!1}):(t||(v=m.query.page),e!==t&&(m.query.page=1),e||(m.query.page=v),m.getFaxInteractions())}),n.$on("$destroy",function(){d.removeAllListeners("faxMessage:save"),d.removeAllListeners("faxMessage:update"),d.removeAllListeners("faxInteraction:save"),d.removeAllListeners("faxInteractionTags:save"),d.removeAllListeners("faxInteraction:update"),d.removeAllListeners("user_has_fax_interactions:save"),d.removeAllListeners("user_has_fax_interactions:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeFaxController",e)}(),function(){"use strict";function e(a,n,i,o,t,s,r,l,d,c){var m=this;function e(e){m.mailInteractions=e||{count:0,rows:[]};for(var t=0;t<m.mailInteractions.rows.length;t+=1)p(m.mailInteractions.rows[t])}function u(){m.query.dateStart=void 0,m.query.dateEnd=void 0,m.pickerModel.dateStart&&(m.query.dateStart=m.pickerModel.dateStart,m.query.dateEnd=m.pickerModel.dateEnd),0!=m.query.closed&&(m.query.substatus=null),m.query.offset=(m.query.page-1)*m.query.limit,t.localStorage.setItem("motion2.home.mail:"+m.user.id,JSON.stringify({query:m.query})),m.promise=r.mailInteraction.get(m.query,e).$promise}function p(e){e&&e.Messages?e.unread=_.filter(e.Messages||[],{direction:"in",read:!1}).length:e.unread=0}m.user=l.getCurrentUser(),m.tags={count:0,rows:[]},m.mailInteractions={count:0,rows:[]},m.query={includeAll:!0,sort:"-updatedAt",limit:10,page:1,read:null,closed:null,substatus:null,MailAccountId:null},m.success=e,m.getMailInteractions=u,m.showMailInteraction=function(e,t){a.$parent.vm.addInteractionTab("mail",t)},m.getContactLabel=function(e){if(e.Contact){var t="";return t+=(e.Contact.firstName||"")+""+(e.Contact.lastName||""),e.to&&e.Account&&e.to.indexOf(e.Account.email)<0?t=e.to:t+=" <"+(e.Contact.email||"unknown")+">",t}return s.instant("DASHBOARDS.UNKNOWN")},m.getUserLabel=function(e){if(e.UserId)return e.UserId===l.getCurrentUser().id?s.instant("DASHBOARDS.ME"):m.usersByKey[e.UserId].fullname+" <"+m.usersByKey[e.UserId].internal+">";return s.instant("DASHBOARDS.NOT_ASSIGNED")},m.getMailAccountLabel=function(e){if(e.Account)return e.Account.key;return s.instant("DASHBOARDS.UNKNOWN")},m.getColorByChannel=function(e){switch(e){case"chat":return"green-A700-bg";case"mail":return"teal-bg";case"sms":return"orange-bg";case"openchannel":return"amber-A200-bg";case"fax":return"blue-grey-A200-bg";default:return"white-bg"}},m.clearAll=function(){m.calendarModel={dateStart:null},m.pickerModel={dateStart:null},m.serviceModel={dateStart:null},m.getMailInteractions()},m.composeMailInteraction=function(e,t){i.show({controller:"ComposeMailInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/composeMail/dialog.html",parent:angular.element(o.body),clickOutsideToClose:!1,locals:{account:t,message:{},type:"new",interaction:{}},fullscreen:!0}).then(function(n){return r.mailAccount.send({id:t.id},n).$promise.then(function(e){if(e&&e.Messages&&e.Messages.length){if(n.attachments&&n.attachments.length)for(var t=0;t<n.attachments.length;t+=1)r.attachment.update({id:n.attachments[t].id},{MailMessageId:_.head(e.Messages).id});c.success({title:"Message properly sent!",msg:"Message has been sent!"}),e.closed?(e.disposition=null,i.show({controller:"DisposeInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/dispose/dialog.html",parent:angular.element(o.body),clickOutsideToClose:!0,locals:{channel:"mail",interaction:e}})):a.$parent.vm.addInteractionTab("mail",e)}}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"MAILACCOUNT:SEND",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})})},m.onInit=function(){return r.mailAccount.get({nolimit:!0}).$promise.then(function(e){return m.mailAccounts=e||{count:0,rows:[]},r.tag.get().$promise}).then(function(e){m.tags=e||{count:0,rows:[]}}).then(function(){return r.user.get({nolimit:!0,fields:"id,fullname,userpic,internal"}).$promise}).then(function(e){m.usersByKey=_.keyBy(e.rows,"id")}).then(function(){return r.mailSubstatus.get({nolimit:!0}).$promise}).then(function(e){m.subStatuses=e||{count:0,rows:[]}}).catch(function(e){console.error(e)}).finally(function(){var e=t.localStorage.getItem("motion2.home.mail:"+m.user.id);if(e)try{(e=JSON.parse(e)).query&&(m.query=_.merge(m.query,e.query),m.query=_.omit(m.query,"filter"),m.query.sort&&0<=m.query.sort.indexOf("lastMessage")&&(m.query=_.omit(m.query,"sort")),m.query.includeAll=!0)}catch(e){console.error(e)}d.on("mailInteraction:save",m.onMailInteractionSave),d.on("mailInteraction:update",m.onMailInteractionSave),d.on("mailInteractionTags:save",m.onMailInteractionTagsSave),d.on("mailMessage:save",m.onMailMessageSave),d.on("mailMessage:update",m.onMailMessageSave),d.on("user_has_mail_interactions:save",m.onMailInteractionOpen),d.on("user_has_mail_interactions:remove",m.onMailInteractionClose),m.getMailInteractions()})},m.onMailInteractionSave=function(e){if(e){var t=_.find(m.mailInteractions.rows,{id:e.id});t?_.merge(t,_.pick(e,_.keys(t))):u(),p(e)}},m.onMailInteractionTagsSave=function(e){if(e){var t=_.find(m.mailInteractions.rows,{id:e.id});t&&(t.Tags=e.tags||[],_.merge(t,_.pick(e,_.keys(t))))}},m.onMailMessageSave=function(e){if(e&&!e.secret){var t=_.find(m.mailInteractions.rows,{id:e.MailInteractionId});if(t){var n=_.find(t.Messages,{id:e.id});n?_.merge(n,_.pick(e,_.keys(n))):(_.isNil(t.Messages)&&(t.Messages=[]),t.Messages.push(e)),p(t)}}},m.onMailInteractionOpen=function(e){var t=_.find(m.mailInteractions.rows,{id:e.MailInteractionId});t&&t.Users&&(_.find(t.Users,{id:e.UserId})||t.Users.push({id:e.UserId}))},m.onMailInteractionClose=function(e){var t=_.find(m.mailInteractions.rows,{id:e.MailInteractionId});t&&t.Users&&_.remove(t.Users,{id:e.UserId})},m.localizationMap={Today:s.instant("DASHBOARDS.TODAY"),Yesterday:s.instant("DASHBOARDS.YESTERDAY"),"This Week":s.instant("DASHBOARDS.THIS_WEEK"),"Last Week":s.instant("DASHBOARDS.LAST_WEEK"),"This Month":s.instant("DASHBOARDS.THIS_MONTH"),"Last Month":s.instant("DASHBOARDS.LAST_MONTH"),"This Year":s.instant("DASHBOARDS.THIS_YEAR"),"Last Year":s.instant("DASHBOARDS.LAST_YEAR"),January:s.instant("DASHBOARDS.JANUARY"),February:s.instant("DASHBOARDS.FEBRUARY"),March:s.instant("DASHBOARDS.MARCH"),April:s.instant("DASHBOARDS.APRIL"),May:s.instant("DASHBOARDS.MAY"),June:s.instant("DASHBOARDS.JUNE"),July:s.instant("DASHBOARDS.JULY"),August:s.instant("DASHBOARDS.AUGUST"),September:s.instant("DASHBOARDS.SEPTEMBER"),October:s.instant("DASHBOARDS.OCTOBER"),November:s.instant("DASHBOARDS.NOVEMBER"),December:s.instant("DASHBOARDS.DECEMBER"),Mon:s.instant("DASHBOARDS.MON"),Tue:s.instant("DASHBOARDS.TUE"),Wed:s.instant("DASHBOARDS.WED"),Thu:s.instant("DASHBOARDS.THU"),Fri:s.instant("DASHBOARDS.FRI"),Sat:s.instant("DASHBOARDS.SAT"),Sun:s.instant("DASHBOARDS.SUN")},m.pickerModel={dateStart:null},m.onInit();var g=!0,v=1;a.$watch("vm.query.filter",function(e,t){g?n(function(){g=!1}):(t||(v=m.query.page),e!==t&&(m.query.page=1),e||(m.query.page=v),m.getMailInteractions())}),a.$on("$destroy",function(){d.removeAllListeners("mailMessage:save"),d.removeAllListeners("mailMessage:update"),d.removeAllListeners("mailInteraction:save"),d.removeAllListeners("mailInteractionTags:save"),d.removeAllListeners("mailInteraction:update"),d.removeAllListeners("user_has_mail_interactions:save"),d.removeAllListeners("user_has_mail_interactions:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeMailController",e)}(),function(){"use strict";function e(n,a,i,o,e,t,s){var r=this;r.currentUser=e.getCurrentUser(),r.lists={},r.contacts={count:0,rows:[]},r.query={id:r.currentUser.id,sort:"-updatedAt",limit:10,page:1},r.getContacts=function(){r.query.ListId=r.query.ListId||r.defaultLists,r.query.offset=(r.query.page-1)*r.query.limit,s.localStorage.setItem("motion2.home.mycontacts:"+r.currentUser.id,JSON.stringify({query:r.query})),r.promise=t.user.getContacts(r.query,c).$promise},r.refreshContacts=function(){r.getContacts()},r.mergeContact=function(e,t){o.show({controller:"MergeContactDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/merge/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,resolve:{contact:["apiResolver",function(e){return e.resolve("cmContact@get",{id:t.id})}],lists:["apiResolver",function(e){return e.resolve("user@getLists",{id:r.currentUser.id,fields:"id,name"})}]},locals:{contacts:r.contacts.rows}})},r.duplicateContact=function(e,t){o.show({controller:"DuplicateContactDialogController",controllerAs:"vm",templateUrl:"app/main/apps/contactmanager/views/contacts/duplicate/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,resolve:{contact:["apiResolver",function(e){return e.resolve("cmContact@get",{id:t.id})}],lists:["apiResolver",function(e){return e.resolve("user@getLists",{id:r.currentUser.id,fields:"id,name"})}]},locals:{contacts:r.contacts.rows}})},r.openContact=function(e,t){a.$parent.vm.addContactTab(t)},r.call=a.$parent.vm.call,r.onInit=function(){var e=s.localStorage.getItem("motion2.home.mycontacts:"+r.currentUser.id);if(e)try{(e=JSON.parse(e)).query&&(r.query=_.omit(e.query,"filter"))}catch(e){console.error(e)}r.getContacts()},t.cmList.get({fields:"id,name,dialPrefix",sort:"name",nolimit:!0}).$promise.then(function(e){r.lists=e||{count:0,rows:[]},r.listsMap=_.keyBy(r.lists.rows,"id"),r.defaultLists=r.lists.rows?_.map(r.lists.rows,"id").join(","):void 0}).catch(function(e){console.error(e)}).finally(function(){r.getContacts()});var l=!0,d=1;function c(e){r.contacts=e||{count:0,rows:[]}}a.$watch("vm.query.filter",function(e,t){l?i(function(){l=!1}):(t||(d=r.query.page),e!==t&&(r.query.page=1),e||(r.query.page=d),r.getContacts())})}e.$inject=["$document","$scope","$timeout","$mdDialog","Auth","api","$window"],angular.module("app.dashboards").controller("AgentHomeMyContactsController",e)}(),function(){"use strict";function e(n,a,e,t,i,o,s,r,l,d){var c=this;function m(e){c.openchannelInteractions=e||{count:0,rows:[]};for(var t=0;t<c.openchannelInteractions.rows.length;t+=1)p(c.openchannelInteractions.rows[t])}function u(){c.query.dateStart=void 0,c.query.dateEnd=void 0,c.pickerModel.dateStart&&(c.query.dateStart=c.pickerModel.dateStart,c.query.dateEnd=c.pickerModel.dateEnd),c.query.offset=(c.query.page-1)*c.query.limit,i.localStorage.setItem("motion2.home.openchannel:"+c.user.id,JSON.stringify({query:c.query})),c.promise=s.openchannelInteraction.get(c.query,m).$promise}function p(e){e&&e.Messages?e.unread=_.filter(e.Messages||[],{direction:"in",read:!1}).length:e.unread=0}c.user=r.getCurrentUser(),c.tags={count:0,rows:[]},c.openchannelInteractions={count:0,rows:[]},c.query={includeAll:!0,sort:"-updatedAt",limit:10,page:1,read:null,closed:null,substatus:null,OpenchannelAccountId:null},c.success=m,c.getOpenchannelInteractions=u,c.showOpenchannelInteraction=function(e,t){n.$parent.vm.addInteractionTab("openchannel",t)},c.getContactLabel=function(e){if(e.Contact){var t="";return t+=(e.Contact.firstName||"")+""+(e.Contact.lastName||""),e.from&&(t=e.from),t}return o.instant("DASHBOARDS.UNKNOWN")},c.getUserLabel=function(e){if(e.UserId)return e.UserId===r.getCurrentUser().id?o.instant("DASHBOARDS.ME"):c.usersByKey[e.UserId].fullname+" <"+c.usersByKey[e.UserId].internal+">";return o.instant("DASHBOARDS.NOT_ASSIGNED")},c.getOpenchannelAccountLabel=function(e){if(e.Account)return e.Account.key;return o.instant("DASHBOARDS.UNKNOWN")},c.getColorByChannel=function(e){switch(e){case"chat":return"green-A700-bg";case"mail":return"teal-bg";case"sms":return"orange-bg";case"openchannel":return"amber-A200-bg";case"fax":return"blue-grey-A200-bg";default:return"white-bg"}},c.clearAll=function(){c.calendarModel={dateStart:null},c.pickerModel={dateStart:null},c.serviceModel={dateStart:null},c.getOpenchannelInteractions()},c.onInit=function(){return s.openchannelAccount.get({nolimit:!0}).$promise.then(function(e){return c.openchannelAccounts=e||{count:0,rows:[]},s.tag.get().$promise}).then(function(e){c.tags=e||{count:0,rows:[]}}).then(function(){return s.user.get({nolimit:!0,fields:"id,fullname,userpic,internal"}).$promise}).then(function(e){c.usersByKey=_.keyBy(e.rows,"id")}).catch(function(e){console.error(e)}).finally(function(){var e=i.localStorage.getItem("motion2.home.openchannel:"+c.user.id);if(e)try{(e=JSON.parse(e)).query&&(c.query=_.merge(c.query,e.query),c.query=_.omit(c.query,"filter"),c.query.sort&&0<=c.query.sort.indexOf("lastMessage")&&(c.query=_.omit(c.query,"sort")),c.query.includeAll=!0)}catch(e){console.error(e)}l.on("openchannelInteraction:save",c.onOpenchannelInteractionSave),l.on("openchannelInteraction:update",c.onOpenchannelInteractionSave),l.on("openchannelInteractionTags:save",c.onOpenchannelInteractionTagsSave),l.on("openchannelMessage:save",c.onOpenchannelMessageSave),l.on("openchannelMessage:update",c.onOpenchannelMessageSave),l.on("user_has_openchannel_interactions:save",c.onOpenchannelInteractionOpen),l.on("user_has_openchannel_interactions:remove",c.onOpenchannelInteractionClose),c.getOpenchannelInteractions()})},c.onOpenchannelInteractionSave=function(e){if(e){var t=_.find(c.openchannelInteractions.rows,{id:e.id});t?_.merge(t,_.pick(e,_.keys(t))):u(),p(e)}},c.onOpenchannelInteractionTagsSave=function(e){if(e){var t=_.find(c.openchannelInteractions.rows,{id:e.id});t&&(t.Tags=e.tags||[],_.merge(t,_.pick(e,_.keys(t))))}},c.onOpenchannelMessageSave=function(e){if(e&&!e.secret){var t=_.find(c.openchannelInteractions.rows,{id:e.OpenchannelInteractionId});if(t){var n=_.find(t.Messages,{id:e.id});n?_.merge(n,_.pick(e,_.keys(n))):(_.isNil(t.Messages)&&(t.Messages=[]),t.Messages.push(e)),p(t)}}},c.onOpenchannelInteractionOpen=function(e){var t=_.find(c.openchannelInteractions.rows,{id:e.OpenchannelInteractionId});t&&t.Users&&(_.find(t.Users,{id:e.UserId})||t.Users.push({id:e.UserId}))},c.onOpenchannelInteractionClose=function(e){var t=_.find(c.openchannelInteractions.rows,{id:e.OpenchannelInteractionId});t&&t.Users&&_.remove(t.Users,{id:e.UserId})},c.localizationMap={Today:o.instant("DASHBOARDS.TODAY"),Yesterday:o.instant("DASHBOARDS.YESTERDAY"),"This Week":o.instant("DASHBOARDS.THIS_WEEK"),"Last Week":o.instant("DASHBOARDS.LAST_WEEK"),"This Month":o.instant("DASHBOARDS.THIS_MONTH"),"Last Month":o.instant("DASHBOARDS.LAST_MONTH"),"This Year":o.instant("DASHBOARDS.THIS_YEAR"),"Last Year":o.instant("DASHBOARDS.LAST_YEAR"),January:o.instant("DASHBOARDS.JANUARY"),February:o.instant("DASHBOARDS.FEBRUARY"),March:o.instant("DASHBOARDS.MARCH"),April:o.instant("DASHBOARDS.APRIL"),May:o.instant("DASHBOARDS.MAY"),June:o.instant("DASHBOARDS.JUNE"),July:o.instant("DASHBOARDS.JULY"),August:o.instant("DASHBOARDS.AUGUST"),September:o.instant("DASHBOARDS.SEPTEMBER"),October:o.instant("DASHBOARDS.OCTOBER"),November:o.instant("DASHBOARDS.NOVEMBER"),December:o.instant("DASHBOARDS.DECEMBER"),Mon:o.instant("DASHBOARDS.MON"),Tue:o.instant("DASHBOARDS.TUE"),Wed:o.instant("DASHBOARDS.WED"),Thu:o.instant("DASHBOARDS.THU"),Fri:o.instant("DASHBOARDS.FRI"),Sat:o.instant("DASHBOARDS.SAT"),Sun:o.instant("DASHBOARDS.SUN")},c.pickerModel={dateStart:null},c.onInit();var g=!0,v=1;n.$watch("vm.query.filter",function(e,t){g?a(function(){g=!1}):(t||(v=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=v),c.getOpenchannelInteractions())}),n.$on("$destroy",function(){l.removeAllListeners("openchannelMessage:save"),l.removeAllListeners("openchannelMessage:update"),l.removeAllListeners("openchannelInteraction:save"),l.removeAllListeners("openchannelInteractionTags:save"),l.removeAllListeners("openchannelInteraction:update"),l.removeAllListeners("user_has_openchannel_interactions:save"),l.removeAllListeners("user_has_openchannel_interactions:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeOpenchannelController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u){var p=this;function g(e){p.voiceRecordings=e||{count:0,rows:[]}}p.currentUser=c.getCurrentUser(),p.voiceRecordings={},p.localizationMap=u,p.pickerModel={dateStart:null},p.table="voiceRecordings",p.query={UserId:p.currentUser.id,fields:"createdAt,updatedAt,id,format,value,type,uniqueid,calleridnum,exten,connectedlinenum,queue,rating,audio,UserId",sort:"-updatedAt",limit:10,page:1,type:null},p.downloadfile=function(i,e){return r.voiceRecording.download({id:i.id,exists:!0}).$promise.then(function(e){var t=[e.buffer],n=new Blob(t,{type:e.type}),a=window.document.createElement("a");a.setAttribute("href",URL.createObjectURL(n)),a.setAttribute("download",i.uniqueid+i.format),a.click()}).catch(function(e){d.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceRecording",msg:e.data?JSON.stringify(e.data):e.toString()})})},p.success=g,p.getVoiceRecordings=function(){p.query.dateStart=void 0,p.query.dateEnd=void 0,p.pickerModel.dateStart&&(p.query.dateStart=p.pickerModel.dateStart,p.query.dateEnd=p.pickerModel.dateEnd);p.query.offset=(p.query.page-1)*p.query.limit,t.localStorage.setItem("motion2.home.recordings:"+p.currentUser.id,JSON.stringify({query:p.query})),p.promise=r.voiceRecording.get(p.query,g).$promise},p.onInit=function(){var e=t.localStorage.getItem("motion2.home.recordings:"+p.currentUser.id);if(e)try{(e=JSON.parse(e)).query&&(p.query=_.omit(e.query,["filter","id"]),p.query.fields="createdAt,updatedAt,id,format,value,type,uniqueid,calleridnum,exten,connectedlinenum,queue,rating,audio,UserId",p.query.UserId=p.currentUser.id)}catch(e){console.error(e)}p.getVoiceRecordings()},p.clearAll=function(){p.pickerModel={dateStart:null},p.getVoiceRecordings()};var v=!0,h=1;e.$watch("vm.query.filter",function(e,t){v?s(function(){v=!1}):(t||(h=p.query.page),e!==t&&(p.query.page=1),e||(p.query.page=h),p.getVoiceRecordings())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","api","msUtils","toasty","Auth","$translate","dateFilterLocalizationFactory"],angular.module("app.dashboards").controller("AgentHomeRecordingsController",e)}(),function(){"use strict";function e(n,a,i,o,t,s,r,l,d,c){var m=this;function e(e){m.smsInteractions=e||{count:0,rows:[]};for(var t=0;t<m.smsInteractions.rows.length;t+=1)p(m.smsInteractions.rows[t])}function u(){m.query.dateStart=void 0,m.query.dateEnd=void 0,m.pickerModel.dateStart&&(m.query.dateStart=m.pickerModel.dateStart,m.query.dateEnd=m.pickerModel.dateEnd),m.query.offset=(m.query.page-1)*m.query.limit,t.localStorage.setItem("motion2.home.sms:"+m.user.id,JSON.stringify({query:m.query})),m.promise=r.smsInteraction.get(m.query,e).$promise}function p(e){e&&e.Messages?e.unread=_.filter(e.Messages||[],{direction:"in",read:!1}).length:e.unread=0}m.user=l.getCurrentUser(),m.tags={count:0,rows:[]},m.smsInteractions={count:0,rows:[]},m.query={includeAll:!0,sort:"-updatedAt",limit:10,page:1,read:null,closed:null,substatus:null,SmsAccountId:null},m.success=e,m.getSmsInteractions=u,m.showSmsInteraction=function(e,t){n.$parent.vm.addInteractionTab("sms",t)},m.getContactLabel=function(e){if(e.Contact){var t="";return t+=(e.Contact.firstName||"")+""+(e.Contact.lastName||""),t+=" <"+(e.Contact.mobile||"unknown")+">"}return s.instant("DASHBOARDS.UNKNOWN")},m.getUserLabel=function(e){if(e.UserId)return e.UserId===l.getCurrentUser().id?s.instant("DASHBOARDS.ME"):m.usersByKey[e.UserId].fullname+" <"+m.usersByKey[e.UserId].internal+">";return s.instant("DASHBOARDS.NOT_ASSIGNED")},m.getSmsAccountLabel=function(e){if(e.Account)return e.Account.key;return s.instant("DASHBOARDS.UNKNOWN")},m.getColorByChannel=function(e){switch(e){case"chat":return"green-A700-bg";case"mail":return"teal-bg";case"sms":return"orange-bg";case"openchannel":return"amber-A200-bg";case"fax":return"blue-grey-A200-bg";default:return"white-bg"}},m.clearAll=function(){m.calendarModel={dateStart:null},m.pickerModel={dateStart:null},m.serviceModel={dateStart:null},m.getSmsInteractions()},m.composeSmsInteraction=function(e,t){i.show({controller:"ComposeSmsInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/composeSms/dialog.html",parent:angular.element(o.body),clickOutsideToClose:!1,locals:{account:t,message:{},type:"new",interaction:{}},fullscreen:!0}).then(function(e){return r.smsAccount.send({id:t.id},e).$promise.then(function(e){c.success({title:"Message properly sent!",msg:"Message has been sent!"}),n.$parent.vm.addInteractionTab("sms",e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SMSACCOUNT:SEND",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})})},m.onInit=function(){return r.smsAccount.get({nolimit:!0}).$promise.then(function(e){return m.smsAccounts=e||{count:0,rows:[]},r.tag.get().$promise}).then(function(e){m.tags=e||{count:0,rows:[]}}).then(function(){return r.user.get({nolimit:!0,fields:"id,fullname,userpic,internal"}).$promise}).then(function(e){m.usersByKey=_.keyBy(e.rows,"id")}).catch(function(e){console.error(e)}).finally(function(){var e=t.localStorage.getItem("motion2.home.sms:"+m.user.id);if(e)try{(e=JSON.parse(e)).query&&(m.query=_.merge(m.query,e.query),m.query=_.omit(m.query,"filter"),m.query.sort&&0<=m.query.sort.indexOf("lastMessage")&&(m.query=_.omit(m.query,"sort")),m.query.includeAll=!0)}catch(e){console.error(e)}d.on("smsInteraction:save",m.onSmsInteractionSave),d.on("smsInteraction:update",m.onSmsInteractionSave),d.on("smsInteractionTags:save",m.onSmsInteractionTagsSave),d.on("smsMessage:save",m.onSmsMessageSave),d.on("smsMessage:update",m.onSmsMessageSave),d.on("user_has_sms_interactions:save",m.onSmsInteractionOpen),d.on("user_has_sms_interactions:remove",m.onSmsInteractionClose),m.getSmsInteractions()})},m.onSmsInteractionSave=function(e){if(e){var t=_.find(m.smsInteractions.rows,{id:e.id});t?_.merge(t,_.pick(e,_.keys(t))):u(),p(e)}},m.onSmsInteractionTagsSave=function(e){if(e){var t=_.find(m.smsInteractions.rows,{id:e.id});t&&(t.Tags=e.tags||[],_.merge(t,_.pick(e,_.keys(t))))}},m.onSmsMessageSave=function(e){if(e&&!e.secret){var t=_.find(m.smsInteractions.rows,{id:e.SmsInteractionId});if(t){var n=_.find(t.Messages,{id:e.id});n?_.merge(n,_.pick(e,_.keys(n))):(_.isNil(t.Messages)&&(t.Messages=[]),t.Messages.push(e)),p(t)}}},m.onSmsInteractionOpen=function(e){var t=_.find(m.smsInteractions.rows,{id:e.SmsInteractionId});t&&t.Users&&(_.find(t.Users,{id:e.UserId})||t.Users.push({id:e.UserId}))},m.onSmsInteractionClose=function(e){var t=_.find(m.smsInteractions.rows,{id:e.SmsInteractionId});t&&t.Users&&_.remove(t.Users,{id:e.UserId})},m.localizationMap={Today:s.instant("DASHBOARDS.TODAY"),Yesterday:s.instant("DASHBOARDS.YESTERDAY"),"This Week":s.instant("DASHBOARDS.THIS_WEEK"),"Last Week":s.instant("DASHBOARDS.LAST_WEEK"),"This Month":s.instant("DASHBOARDS.THIS_MONTH"),"Last Month":s.instant("DASHBOARDS.LAST_MONTH"),"This Year":s.instant("DASHBOARDS.THIS_YEAR"),"Last Year":s.instant("DASHBOARDS.LAST_YEAR"),January:s.instant("DASHBOARDS.JANUARY"),February:s.instant("DASHBOARDS.FEBRUARY"),March:s.instant("DASHBOARDS.MARCH"),April:s.instant("DASHBOARDS.APRIL"),May:s.instant("DASHBOARDS.MAY"),June:s.instant("DASHBOARDS.JUNE"),July:s.instant("DASHBOARDS.JULY"),August:s.instant("DASHBOARDS.AUGUST"),September:s.instant("DASHBOARDS.SEPTEMBER"),October:s.instant("DASHBOARDS.OCTOBER"),November:s.instant("DASHBOARDS.NOVEMBER"),December:s.instant("DASHBOARDS.DECEMBER"),Mon:s.instant("DASHBOARDS.MON"),Tue:s.instant("DASHBOARDS.TUE"),Wed:s.instant("DASHBOARDS.WED"),Thu:s.instant("DASHBOARDS.THU"),Fri:s.instant("DASHBOARDS.FRI"),Sat:s.instant("DASHBOARDS.SAT"),Sun:s.instant("DASHBOARDS.SUN")},m.pickerModel={dateStart:null},m.onInit();var g=!0,v=1;n.$watch("vm.query.filter",function(e,t){g?a(function(){g=!1}):(t||(v=m.query.page),e!==t&&(m.query.page=1),e||(m.query.page=v),m.getSmsInteractions())}),n.$on("$destroy",function(){d.removeAllListeners("smsMessage:save"),d.removeAllListeners("smsMessage:update"),d.removeAllListeners("smsInteraction:save"),d.removeAllListeners("smsInteractionTags:save"),d.removeAllListeners("smsInteraction:update"),d.removeAllListeners("user_has_sms_interactions:save"),d.removeAllListeners("user_has_sms_interactions:remove")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty"],angular.module("app.dashboards").controller("AgentHomeSmsController",e)}(),function(){"use strict";function e(t,n,e,a,i,o,s,r,l,d){var c=this;function m(e){c.voiceCalls=e||{count:0,rows:[]}}c.currentUser=i.getCurrentUser(),c.voiceCalls={},c.localizationMap=d,c.pickerModel={dateStart:null},c.table="voiceCalls",c.query={UserId:c.currentUser.id,fields:"id,type,uniqueid,tag,starttime,endtime,source,destination,userDisposition,note,duration,billableseconds,answertime",sort:"-updatedAt",limit:10,page:1,type:null},c.success=m,c.getVoiceCalls=function(){c.query.dateStart=void 0,c.query.dateEnd=void 0,c.pickerModel.dateStart&&(c.query.dateStart=c.pickerModel.dateStart,c.query.dateEnd=c.pickerModel.dateEnd);c.query.offset=(c.query.page-1)*c.query.limit,s.localStorage.setItem("motion2.home.voice:"+c.currentUser.id,JSON.stringify({query:c.query})),c.promise=e.voiceCallReport.get(c.query,m).$promise},c.onInit=function(){return e.tag.get().$promise.then(function(e){c.tags=e||{count:0,rows:[]}}).catch(function(e){a.error({title:"Init error",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()}),c.tags={count:0,rows:[]}}).finally(function(){var e=s.localStorage.getItem("motion2.home.voice:"+c.currentUser.id);if(e)try{(e=JSON.parse(e)).query&&(c.query=_.omit(e.query,"filter"))}catch(e){console.error(e)}c.getVoiceCalls()})},c.showDetails=function(e){t.show({controller:"AgentHomeVoiceDetailsController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/home/voice/details/dialog.html",parent:angular.element(n.body),clickOutsideToClose:!0,locals:{call:e}})},c.clearAll=function(){c.pickerModel={dateStart:null},c.getVoiceCalls()};var u=!0,p=1;r.$watch("vm.query.filter",function(e,t){u?l(function(){u=!1}):(t||(p=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=p),c.getVoiceCalls())})}e.$inject=["$mdDialog","$document","api","toasty","Auth","$translate","$window","$scope","$timeout","dateFilterLocalizationFactory"],angular.module("app.dashboards").controller("AgentHomeVoiceController",e)}(),function(){"use strict";function e(e,t){this.call=t,this.closeDialog=function(){e.hide()}}e.$inject=["$mdDialog","call"],angular.module("app.dashboards").controller("AgentHomeVoiceDetailsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p){var g=this;function v(){i.show({controller:"DisposeInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/dispose/dialog.html",parent:angular.element(n.body),clickOutsideToClose:!0,locals:{channel:g.tab.channel,interaction:g.tab.interaction}}).then(function(e){g.tab.saved=!!e,e&&a.$parent.$parent.$parent.vm.closeTab(g.tab)})}function h(e,t){i.show({controller:"ComposeMailInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/composeMail/dialog.html",parent:angular.element(n.body),clickOutsideToClose:!1,locals:{account:g.account,message:t,type:e,interaction:g.interaction},fullscreen:!0,skipHide:!!g.tab.spy}).then(function(t){t&&f(t),t.Interaction&&g.interaction&&g.interaction.id&&(t.Interaction.id=g.interaction.id,d.mailInteraction.update(t.Interaction).$promise.then(function(e){e&&e.closed?(g.tab.saved=!0,g.interaction.closed=!0,g.interaction.closedAt=e.closedAt,v()):null!==t.Interaction.substatus&&(g.tab.saved=!0,g.tab.interaction.substatus=t.Interaction.substatus,a.$parent.$parent.$parent.vm.closeTab(g.tab))}).catch(function(e){console.error(e)}))})}function b(){"mail"!==g.tab.channel&&t(function(){var e=angular.element(n.find("md-content[name*='interaction-content-"+g.tab.id+"']"));e&&e[0]&&(e[0].scrollTop=e[0].scrollHeight)},0)}function f(n){if(n)return n["chat"===g.tab.channel?"ChatWebsiteId":_.capitalize(g.tab.channel)+"AccountId"]=g.interaction["chat"===g.tab.channel?"ChatWebsiteId":_.capitalize(g.tab.channel)+"AccountId"],n[_.capitalize(g.tab.channel)+"InteractionId"]=g.interaction.id,n.UserId=g.user.id,n.ContactId=g.interaction.ContactId,n.direction="out",n.secret=!(!g.tab.spy&&!n.secret),d[g.tab.channel+"Message"].save(n).$promise.then(function(e){if(e&&e.id&&n.attachments&&n.attachments.length)for(var t=0;t<n.attachments.length;t+=1)d.attachment.update({id:n.attachments[t].id},{MailMessageId:e.id})}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:SENDMESSAGE",msg:e.data?JSON.stringify(e.data):e.toString()})}).finally(function(){g.setText(),b()})}function A(e){switch(e){case"chat":return"green-A700";case"mail":return"teal";case"sms":return"orange";case"openchannel":return"amber-A200";case"fax":return"blue-grey-A200";default:return"blue-A700"}}function E(e){e&&e.count&&e.rows.length&&(g.journey=_.concat(g.journey,e.rows))}g.showFooter=!1,g.showInteraction=!1,g.user=m.getCurrentUser(),g.detectBrowser=p.detectBrowser(),g.journey=[],g.acceptedMessages=[],g.omniChannels=["mail","chat","sms","openchannel","fax"],g.ngFlowOptions={maxChunkRetries:1,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,singleFile:!0,target:"api/attachments",allowDuplicateUploads:!0},g.ngFlow={flow:{}},g.selectedMailShowDetails={},g.selectedMailShowSystemMessage={},g.init=function(e){g.tab=e,g.tab.saved=!0,g.tab.badges=0,g.tab&&g.tab.channel&&g.tab.interaction&&(g.interaction=g.tab.interaction,d[g.tab.channel+"Interaction"].get({id:g.tab.interaction.id,includeAll:!0}).$promise.then(function(e){return e&&(g.interaction=e,g.tab.interaction=e),g.tab.saved=g.interaction.closed,g.queryMessage={id:g.interaction.id,includeAll:!0},"mail"===g.tab.channel?(g.queryMessage.sort="-id",g.queryMessage.offset=0,g.queryMessage.limit=3):(g.queryMessage.sort="id",g.queryMessage.nolimit=!0),d[g.tab.channel+"Interaction"].getMessages(g.queryMessage).$promise}).then(function(e){return g.messages=e||{count:0,rows:[]},d["chat"===g.tab.channel?"chatWebsite":g.tab.channel+"Account"].get({id:g.interaction["chat"===g.tab.channel?"ChatWebsiteId":_.capitalize(g.tab.channel)+"AccountId"]}).$promise}).then(function(e){return g.account=e,g.tab.title=g.account.key||g.account.name,d.cmContact.get({id:g.interaction.ContactId}).$promise}).then(function(e){return g.contact=e,g.showInteraction=!0,g.contact&&(!function(e){if(e&&e.id){for(var t=0;t<g.omniChannels.length;t++)d[g.omniChannels[t]+"Interaction"].get({ContactId:e.id,includeAll:!0}).$promise.then(E);d.voiceCallReport.get({ContactId:e.id,includeAll:!0}).$promise.then(E)}}(g.contact),g.tab.title+=" - "+g.contact.firstName),d.user.get({fields:"id,fullname",nolimit:!0}).$promise}).then(function(e){g.users=e||{count:0,rows:[]},g.usersMap=_.mapValues(_.keyBy(g.users.rows,"id"),"fullname")}).then(function(){if(g.tab.channel&&g.interaction)return d.user["add"+_.upperFirst(g.tab.channel)+"Interactions"]({id:g.user.id,ids:[g.interaction.id]})}).then(function(){return d.mailSubstatus.get({nolimit:!0}).$promise}).then(function(e){g.subStatuses=e||{count:0,rows:[]}}).catch(function(e){console.error(e),g.showInteraction=!0}).finally(function(){!function(){if(!g.tab.spy)for(var e=0;e<g.messages.rows.length;e+=1)"in"!==g.messages.rows[e].direction||g.messages.rows[e].read||(d[g.tab.channel+"Message"].accept({id:g.messages.rows[e].id,UserId:g.user.id}),g.acceptedMessages.push(g.messages.rows[e].id))}(),b(),u.on(g.tab.channel+"Message:save",g.onMessageSave),u.on(g.tab.channel+"Message:update",g.onMessageSave),u.on(g.tab.channel+"Interaction:save",g.onInteractionSave),u.on(g.tab.channel+"Interaction:update",g.onInteractionSave),u.on("user_has_"+g.tab.channel+"_interactions:save",g.onInteractionOpen),u.on("user_has_"+g.tab.channel+"_interactions:remove",g.onInteractionClose),g.showFooter=!0}))},g.getLabelByMessage=function(e){var t="loading...";if(e)return"in"===e.direction?e.Contact?e.Contact.firstName||"Anonymous":t:e.UserId?g.usersMap?g.usersMap[e.UserId]:t:"System"},g.openContact=function(e,t){try{a.$parent.$parent.$parent.vm.addContactTab(t||g.contact)}catch(e){c.error({title:"ERROR OPEN CONTACT",msg:"Jscripty can't open the contact"})}},g.openInteraction=function(e,t){try{if(t.MailAccountId)return a.$parent.$parent.$parent.vm.addInteractionTab("mail",t);if(t.ChatWebsiteId)return a.$parent.$parent.$parent.vm.addInteractionTab("chat",t);if(t.SmsAccountId)return a.$parent.$parent.$parent.vm.addInteractionTab("sms",t);if(t.OpenchannelAccountId)return a.$parent.$parent.$parent.vm.addInteractionTab("openchannel",t);if(t.FaxAccountId)return a.$parent.$parent.$parent.vm.addInteractionTab("fax",t)}catch(e){c.error({title:"ERROR OPEN INTERACTION",msg:"Customer Journey can't open the interaction"})}},g.disposeInteraction=v,g.tagInteraction=function(){i.show({controller:"TagInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/tag/dialog.html",parent:angular.element(n.body),clickOutsideToClose:!0,skipHide:!!g.tab.spy,resolve:{tags:["apiResolver",function(e){return e.resolve("tag@get",{nolimit:!0,fields:"id,name,color"})}]},locals:{channel:g.tab.channel,interaction:g.tab.interaction}})},g.composeMailInteraction=function(t,e){if(e.inReplyTo){var n=_.find(g.messages.rows,{messageId:e.inReplyTo});if(!n)return d.mailMessage.get({messageId:e.inReplyTo}).$promise.then(function(e){h(t,e&&e.count?e.rows[0]:void 0)}).catch(function(e){console.error(e),h(t,void 0)});h(t,n)}else h(t,e)},g.composeFaxInteraction=function(e){var t={to:[]};t.to.push(g.contact.fax),i.show({controller:"ComposeFaxInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/composeFax/dialog.html",parent:angular.element(n.body),clickOutsideToClose:!1,locals:{account:g.account,message:t,type:e},fullscreen:!0}).then(function(e){return d.faxAccount.send({id:g.account.id},e).$promise.then(function(e){c.success({title:"Message properly sent!",msg:"Message has been sent!"}),a.$parent.vm.addInteractionTab("fax",e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else c.error({title:"FAX:SEND",msg:e.data?JSON.stringify(e.data):e.message||e.toString()})})})},g.composeSmsInteraction=function(e,t){i.show({controller:"ComposeSmsInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/composeSms/dialog.html",parent:angular.element(n.body),clickOutsideToClose:!1,locals:{account:g.account,message:t,type:e},fullscreen:!0,skipHide:!!g.tab.spy}).then(function(e){e&&f(e)})},g.reply=function(e,t){if(e&&13===e.keyCode&&e.shiftKey)return;if(e&&13!==e.keyCode)return;if(""===t)return;f(function(e){var t={},n="chat"===g.tab.channel?"ChatWebsiteId":_.capitalize(g.tab.channel)+"AccountId";t[n]=g.interaction[n].toString(),t[_.capitalize(g.tab.channel)+"InteractionId"]=g.interaction.id,"sms"===g.tab.channel&&(t.phone=g.interaction.phone);e&&(t.UserId=g.user.id,t.ContactId=g.interaction.ContactId,t.body=e,t.createdAt=Date.now());return t}(t))},g.upload=function(){g.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+e.get("motion.token")},g.ngFlow.flow.upload()},g.setTextWrapper=function(e){g.setText=e},g.getTextWrapper=function(e){g.getText=e},g.fileAdded=function(e){{if("fax"===g.tab.channel){var t=["pdf","tif"];return!!_.includes(t,e.getExtension())||(c.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported only: "+t.join()}),!1)}return!0}},g.fileSuccess=function(e,t){var n=JSON.parse(t),a=n.name;"chat"===g.tab.channel&&(a='<a href="'+(g.account.remote?g.account.remote:l.protocol()+"://"+l.host())+"/api/chat/interactions/"+g.interaction.id+"/attachment_download?attachId="+n.id+"&token="+g.account.token+'" target="_self">'+n.name+"</a>");f({body:a,AttachmentId:n.id})},g.onMessageSave=function(e){if(e&&g.interaction.id!=e[_.capitalize(g.tab.channel)+"InteractionId"])return;var t=!1;g.messages?t=_.find(g.messages.rows,{id:e.id}):g.messages={rows:[],count:0};t?_.merge(t,e):("mail"===g.tab.channel?g.messages.rows.unshift(e):g.messages.rows.push(e),b())},g.onInteractionSave=function(e){if(e&&g.interaction.id!==e.id)return;_.merge(g.interaction,e)},g.searchTextChange=function(t){var n=o.defer(),a=[],e={},i="chat"===g.tab.channel?"ChatWebsiteId":_.capitalize(g.tab.channel)+"AccountId";return e.filter=t,e[i]=g.account.id,d.cannedAnswer.get(e).$promise.then(function(e){return a=_.concat(a,e.rows),d.cannedAnswer.get({filter:t}).$promise}).then(function(e){a=_.concat(a,_.filter(e.rows,function(e){return!(e.MailAccountId||e.FaxAccountId||e.SmsAccountId||e.OpenchannelAccountId||e.ChatWebsiteId)})),n.resolve(a)}).catch(function(e){n.reject(e)}),n.promise},g.selectedItemChange=function(t){if(t){var n=g.getText();try{_.templateSettings.interpolate=/{{([\s\S]+?)}}/g;var e=_.template(t.value),a={user:g.user,account:g.account,interaction:g.interaction,contact:g.interaction&&g.interaction.Contact?g.interaction.Contact:{}};g.setText(n+" "+e(a))}catch(e){g.setText(n+" "+t.value)}g.selectedItem=null,g.changeDisplayCannedAnswerInputValue()}},g.getIconByChannel=function(e){switch(e){case"chat":return"icon-hangouts";case"mail":return"icon-email";case"sms":return"icon-message-text";case"openchannel":return"icon-google-earth";case"fax":return"icon-deskphone";default:return"icon-hangouts"}},g.getColorByChannel=A,g.getColorByItem=function(e){var t="";e.FaxAccountId?t="fax":e.OpenchannelAccountId?t="openchannel":e.SmsAccountId?t="sms":e.MailAccountId?t="mail":e.ChatWebsiteId?t="chat":e.amaflags&&(t="voice");return A(t)},g.displayCannedAnswerInput=!1,g.changeDisplayCannedAnswerInputValue=function(){g.displayCannedAnswerInput=!g.displayCannedAnswerInput},g.setAs=function(e){g.tab.channel&&g.interaction&&g.interaction.id&&d[g.tab.channel+"Interaction"].update({id:g.interaction.id,substatus:e,substatusAt:Date.now()}).$promise.catch(function(e){console.error(e)})},g.markAsUnread=function(){if(g.tab.channel&&g.interaction&&g.interaction.id)if(g.acceptedMessages.length)for(var e=0;e<g.acceptedMessages.length;e+=1)d[g.tab.channel+"Message"].update({id:g.acceptedMessages[e],read:!1,UserId:null});else for(var t=0;t<g.messages.rows.length;t+=1)if("in"===g.messages.rows[t].direction){g.messages.rows[t].UserId===g.user.id?d[g.tab.channel+"Message"].update({id:g.messages.rows[t].id,read:!1,UserId:null}):c.error({title:"You can't mark as unread",msg:"You are not the owner of the last message!"});break}g.tab.saved=!0,a.$parent.$parent.$parent.vm.closeTab(g.tab)},g.getAttachments=function(t){return d.attachment.get({MailMessageId:t.id}).$promise.then(function(e){e&&e.rows&&(t.attachments=e.rows)}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"ATTACHMENTS:GET",msg:e.data?JSON.stringify(e.data):e.toString()})})},g.getAttachment=function(i){return d.attachment.download({id:i.id}).$promise.then(function(e){if(e){var t=new Blob([e.buffer],{type:e.type}),n=document.createElement("a"),a=window.URL.createObjectURL(t);n.href=a,n.target="_self",n.download=i.name,document.body.appendChild(n),n.click(),setTimeout(function(){document.body.removeChild(n),window.URL.revokeObjectURL(a)},100)}}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"ATTACHMENTS:GET",msg:e.data?JSON.stringify(e.data):e.toString()})})},g.htmlToPlaintext=function(e){return e?String(e).replace(/<[^>]+>/gm,""):""},g.onInteractionOpen=function(e){var t;g.interaction.id==e[_.upperFirst(g.tab.channel)+"InteractionId"]&&(g.interaction.Users&&(t=_.find(g.interaction.Users,{id:e.UserId})),t||g.interaction.Users.push({id:e.UserId}))},g.onInteractionClose=function(e){g.interaction.id==e[_.upperFirst(g.tab.channel)+"InteractionId"]&&g.interaction.Users&&_.remove(g.interaction.Users,{id:e.UserId})},g.loadNextPage=function(){var n=o.defer();return g.queryMessage?(g.queryMessage.offset=g.messages.rows.length,d[g.tab.channel+"Interaction"].getMessages(g.queryMessage).$promise.then(function(e){for(var t=0;t<e.rows.length;t+=1)g.messages.rows.push(e.rows[t]),"in"!==e.rows[t].direction||e.rows[t].read||(d[g.tab.channel+"Message"].accept({id:e.rows[t].id,UserId:g.user.id}),g.acceptedMessages.push(e.rows[t].id));return n.resolve(e)}).catch(function(e){return n.reject(e)})):n.reject()},g.timelineOptions={scrollEl:"#interaction-content"},a.$on("$destroy",function(){u.removeAllListeners(g.tab.channel+"Message:save"),u.removeAllListeners(g.tab.channel+"Message:update"),u.removeAllListeners(g.tab.channel+"Interaction:save"),u.removeAllListeners(g.tab.channel+"Interaction:update"),u.removeAllListeners("user_has_"+g.tab.channel+"_interactions:save"),u.removeAllListeners("user_has_"+g.tab.channel+"_interactions:remove")})}function t(a){return{scope:{ngBindHtmlUnsafe:"="},template:"<div ng-bind-html='trustedHtml'></div>",link:function(n){n.updateView=function(){var e,t=_.replace(n.ngBindHtmlUnsafe,'<div id="xm-mail-content"','<a style="cursor:pointer" class="toggle-details md-accent-color" onclick="document.getElementById(\''+(e="xm-mail-content-"+Math.floor(9999*Math.random()+1))+"').style.display='block'; this.parentNode.removeChild(this)\">See More</a><div id=\""+e+'" style="display:none"');n.trustedHtml=a.trustAsHtml(t)},n.$watch("ngBindHtmlUnsafe",function(e,t){n.updateView(e)})}}}e.$inject=["$cookies","$timeout","$document","$scope","$mdDialog","$q","$sce","$window","$location","api","toasty","Auth","socket","msUtils"],t.$inject=["$sce"],angular.module("app.dashboards").directive("ngBindHtmlUnsafe",t).controller("AgentGeneralInteractionController",e)}(),function(){"use strict";angular.module("app.dashboards").factory("Emojis",function(){return{watchEmbedData:!1,sanitizeHtml:!1,fontSmiley:!1,emoji:!0,link:!0,linkTarget:"_blank",pdf:{embed:!0},image:{embed:!0},audio:{embed:!0},basicVideo:!1,gdevAuth:"xxxxxxxx",video:{embed:!1,width:null,height:null,ytTheme:"dark",details:!1,thumbnailQuality:"medium",autoPlay:!0},twitchtvEmbed:!0,dailymotionEmbed:!0,tedEmbed:!0,dotsubEmbed:!0,liveleakEmbed:!0,ustreamEmbed:!0,soundCloudEmbed:!0,soundCloudOptions:{height:160,themeColor:"f50000",autoPlay:!1,hideRelated:!1,showComments:!0,showUser:!0,showReposts:!1,visual:!1,download:!1},spotifyEmbed:!0,tweetEmbed:!0,tweetOptions:{maxWidth:550,hideMedia:!1,hideThread:!1,align:"none",lang:"en"},code:{highlight:!0,lineNumbers:!1},codepenEmbed:!0,codepenHeight:300,jsfiddleEmbed:!0,jsfiddleHeight:300,jsbinEmbed:!0,jsbinHeight:300,plunkerEmbed:!0,githubgistEmbed:!0,ideoneEmbed:!0,ideoneHeight:300}})}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.separatorKeys=[a.KEY_CODE.ENTER,a.KEY_CODE.COMMA,a.KEY_CODE.TAB],c.fileAdded=function(e){var t=["pdf","tif"];if(!_.includes(t,e.getExtension()))return l.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported only: "+t.join()}),!1;return!0},c.message={from:i.localstationid,to:_.isNil(o.to)||_.isEmpty(o.to)?[]:o.to,attachments:[]},c.ngFlowOptions={maxChunkRetries:1,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,singleFile:!0,target:"api/attachments",allowDuplicateUploads:!0},c.ngFlow={flow:{}},c.send=function(e){1===c.message.attachments.length?c.message.to.length?(o.draft=void 0,n.hide({from:c.message.from,to:c.message.to,attach:c.message.attachments.length,attachments:c.message.attachments})):l.error("To is mandatory"):l.error("Attachment is mandatory")},c.upload=function(){c.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+e.get("motion.token")},c.ngFlow.flow.upload()},c.fileSuccess=function(e,t){try{(t=JSON.parse(t)).size=e.size,c.message.attachments.push(t)}catch(e){console.error(e)}},c.getContact=function(e){var t="";e.firstName&&e.firstName!==e.fax&&(t+=e.firstName+" ");e.lastName&&e.lastName!==e.fax&&(t+=e.lastName+" ");return t+="<"+e.fax+">"},c.contactSearch=function(e){return i&&i.ListId?r.cmContact.get({ListId:i.ListId,nolimit:!0,filter:e,fields:"firstName,lastName,fax"}).$promise.then(function(e){return e.rows}):[]},c.transformContact=function(e){var t=e;if(_.isObject(e))return e.fax;if(n=t,!/[&\/\\#,()$~%.'":;*?<>{}\s\\|a-zA-Z\pS!òàùè…_§°çéì-]/.test(n))return t;var n;return l.error("Fax "+t+" is not valid"),null},c.closeDialog=function(){o.draft=c.message,n.cancel()}}e.$inject=["$cookies","$window","$mdDialog","$mdConstant","account","message","type","api","toasty","$q"],angular.module("app.dashboards").controller("ComposeFaxInteractionDialogController",e)}(),function(){"use strict";function e(t,e,i,n,o,s,a,r,l,d,c,m){var u=this;switch(u.currentUser=c.getCurrentUser(),u.secret="note"===a,u.hiddenCC=!0,u.hiddenBCC=!0,u.verifySmtp=!0,u.errors=[],u.separatorKeys=[n.KEY_CODE.ENTER,n.KEY_CODE.COMMA,n.KEY_CODE.TAB],u.searchTextChange=function(t){var n=d.defer(),a=[];return r.cannedAnswer.get({filter:t,MailAccountId:o.id}).$promise.then(function(e){return a=_.concat(a,e.rows),r.cannedAnswer.get({filter:t}).$promise}).then(function(e){a=_.concat(a,_.filter(e.rows,function(e){return!(e.MailAccountId||e.FaxAccountId||e.SmsAccountId||e.OpenchannelAccountId||e.ChatWebsiteId)})),n.resolve(a)}).catch(function(e){n.reject(e)}),n.promise},u.selectedItemChange=function(t){if(t&&t.value&&u.ckEditorInstance)try{var e=_.template(t.value),n={user:u.currentUser,account:o,interaction:m,contact:m&&m.Contact?m.Contact:{}};u.ckEditorInstance.insertText(e(n))}catch(e){console.error(e),u.ckEditorInstance.insertText(t.value)}document.getElementById("html-area").focus(),u.selectedItem=null},u.onReadyEditor=function(e){try{u.ckEditorInstance=CKEDITOR.instances["html-area"]}catch(e){console.error("Unable to get Html Editor instance",e)}},_.templateSettings.interpolate=/{{([\s\S]+?)}}/g,u.replyTemplate=_.template("On {{ date }}, at {{ time }}, {{ from }} wrote:"),u.forwardTemplate=_.template("Begin forwarded message:<br><br><strong>From:</strong> {{ from }}<br><strong>Subject:</strong> {{ subject }}<br><strong>Date:</strong> {{ date }}, at {{ time }}<br><strong>To:</strong> {{ to }}"),u.message={from:o.email,to:[],cc:[],bcc:[],body:g(),type:a,attachments:[],showLastMessage:!0},u.ckeditor={skin:"office2013",startupFocus:!0,language:"en",allowedContent:!0,extraPlugins:"font,colorbutton,autogrow,autoembed,autocorrect,googlethisterm,pastebase64",toolbarGroups:[{name:"styles",groups:["styles"]},{name:"clipboard",groups:["undo"]},{name:"colors",groups:["colors"]},{name:"basicstyles",groups:["basicstyles"]},{name:"paragraph",groups:["list","indent","align"]}],autoGrow_onStartup:!0,autoGrow_minHeight:u.secret?160:300,autoGrow_maxHeight:e.innerHeight-400,autocorrect_enabled:!0,disableNativeSpellChecker:!1,font_defaultLabel:o.fontFamily?o.fontFamily.split(",")[0]:"Arial",fontSize_defaultLabel:o.fontSize||"12",removePlugins:"magicline"},u.ngFlowOptions={maxChunkRetries:1,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,singleFile:!0,target:"api/attachments",allowDuplicateUploads:!0},u.ngFlow={flow:{}},u.reply=function(e){angular.isDefined(s)&&(u.message.type="reply",u.message.to="in"===s.direction?s.from.split(","):s.to.split(","),u.message.subject=_.startsWith(s.subject,"Re:")?s.subject:"Re: "+s.subject,u.message.inReplyTo=s.messageId,u.message.body=s.draft&&s.draft.inReplyTo?s.draft.body:g(),u.message.attachments=s.draft?s.draft.attachments:[],e&&s.cc&&(u.hiddenCC=!1,u.message.cc=s.cc.split(",")),u.message.showLastMessage=!!s.draft&&s.draft.showLastMessage)},u.newMail=function(){angular.isDefined(s)&&(u.message.type="new",u.message.to=s.to?s.to.split(","):[])},u.forward=function(){if(angular.isDefined(s)){if(u.message.type="forward",u.message.subject=_.startsWith(s.subject,"Fwd:")?s.subject:"Fwd: "+s.subject,u.message.body=s.draft&&!s.draft.inReplyTo?s.draft.body:g(),s.Attachments&&s.Attachments.length)for(var e=0;e<s.Attachments.length;e++)u.message.attachments.push(s.Attachments[e]);u.message.showLastMessage=!!s.draft&&s.draft.showLastMessage}},u.send=function(e,t,n){if(u.message.to&&u.message.body)if(u.message.to.length)if(s.draft=void 0,_.isEmpty(u.message.subject)){var a=i.confirm({skipHide:!0}).title("Warning").textContent("This message has no subject. Are you sure you want to send it?").ariaLabel("Warning").targetEvent(e).ok("Send Anyway").cancel("Cancel");i.show(a).then(function(){p(t,n)})}else p(t,n);else l.error("To is mandatory")},u.note=function(){u.type="note",u.secret=!0,u.message.body='<div style="font-family:'+o.fontFamily+";font-size:"+o.fontSize+'px"><p></p></div>'},u.addNote=function(){u.message.body&&(u.message.draft=void 0,i.hide({secret:!0,body:u.message.body,attach:u.message.attachments.length,attachments:u.message.attachments}))},u.upload=function(e){u.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+t.get("motion.token")},u.ngFlow.flow.upload()},u.fileSuccess=function(e,t){try{(t=JSON.parse(t)).size=e.size,u.message.attachments.push(t)}catch(e){console.error(e)}},u.deleteAttachment=function(e){u.message.attachments=_.reject(u.message.attachments,{id:e.id}),r.attachment.delete({id:e.id}).$promise.then(function(){l.success({title:"Attachment deleted!",msg:e.name?e.name+" has been deleted!":""})})},u.getContact=function(e){var t="";e.firstName&&e.firstName!==e.email&&(t+=e.firstName+" ");e.lastName&&e.lastName!==e.email&&(t+=e.lastName+" ");return t+="<"+e.email+">"},u.contactSearch=function(e){return o&&o.ListId?r.cmContact.get({ListId:o.ListId,nolimit:!0,filter:e,fields:"firstName,lastName,email"}).$promise.then(function(e){return e.rows}):[]},u.transformContact=function(e){var t=e;if(_.isObject(e))return e.email;if(n=t,/^(([^<>()\[\]\\.,;:\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,}))$/.test(n))return t;var n;return l.error("Email "+t+" is not valid"),null},u.closeDialog=function(){angular.isDefined(s)&&(s.draft=u.message);i.cancel()},u.loadLastMessage=function(){u.message.body+=v(u.message.type)},a){case"reply":u.reply(!1);break;case"replyAll":u.reply(!0);break;case"forward":u.forward();break;case"new":u.newMail();break;case"note":u.note()}function p(e,t){var n={from:u.message.from,to:u.message.to.join(","),cc:u.message.cc.join(","),bcc:u.message.bcc.join(","),subject:u.message.subject,body:u.message.showLastMessage?u.message.body:u.message.body+v(u.message.type),inReplyTo:u.message.inReplyTo,attach:u.message.attachments.length,attachments:u.message.attachments,Interaction:{lastMsgAt:moment().format("YYYY-MM-DD HH:mm:ss"),lastMsgDirection:"out",lastMsgBody:u.message.body,substatus:t,substatusAt:moment().format("YYYY-MM-DD HH:mm:ss")}};n.html='<div id="xm-mail-content">'+_.replace(n.body,'<div id="xm-mail-content"',"<div")+"</div>",e&&(n.Interaction.closed=!0,n.Interaction.closedAt=moment().format("YYYY-MM-DD HH:mm:ss")),i.hide(n)}function g(){return'<div style="font-family:'+o.fontFamily+";font-size:"+o.fontSize+'px">'+function(){if(_.isNil(o.template))return"";try{return _.template(o.template)({user:u.currentUser,account:o,interaction:m,contact:m&&m.Contact?m.Contact:{}})}catch(e){return console.error(e),""}}()+"</div>"}function v(e){var t,n,a='<div id="xm-mail-content"><blockquote type="cite">';switch(e){case"reply":case"replyAll":a+=u.replyTemplate({date:moment(s.createdAt).format("D MMM YYYY")||"",time:moment(s.createdAt).format("HH:mm")||"",from:_.escape(s.from)||""});break;case"forward":a+=u.forwardTemplate({date:moment(s.createdAt).format("D MMM YYYY")||"",time:moment(s.createdAt).format("HH:mm")||"",from:_.escape(s.from)||"",to:_.escape(s.to)||"",subject:_.escape(s.subject)||""})}return a+="<br><br>",a+=(t=s.body?_.replace(s.body,'<div id="xm-mail-content"',"<div"):"",(n=t.match(/\<body[^>]*\>([^]*)\<\/body/m))?n[1]:t),a+="</blockquote></div>",e?a:""}r.mailSubstatus.get({nolimit:!0}).$promise.then(function(e){u.subStatuses=e||{count:0,rows:[]}}).catch(function(e){console.error(e)}),u.secret||r.mailAccount.verifySmtp({id:o.id}).$promise.catch(function(e){u.verifySmtp=!1,u.errors.push({message:e.data,type:e.status}),u.errors.push({message:"You can't reply or send an email. Please contact the administrator!",type:"500"})})}e.$inject=["$cookies","$window","$mdDialog","$mdConstant","account","message","type","api","toasty","$q","Auth","interaction"],angular.module("app.dashboards").controller("ComposeMailInteractionDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u){var p=this;switch(p.currentUser=u.getCurrentUser(),p.errors=[],p.separatorKeys=[i.KEY_CODE.ENTER,i.KEY_CODE.COMMA,i.KEY_CODE.TAB],p.searchTextChange=function(t){var n=c.defer(),a=[];return l.cannedAnswer.get({filter:t,SmsAccountId:o.id}).$promise.then(function(e){return a=_.concat(a,e.rows),l.cannedAnswer.get({filter:t}).$promise}).then(function(e){a=_.concat(a,_.filter(e.rows,function(e){return!(e.MailAccountId||e.FaxAccountId||e.SmsAccountId||e.OpenchannelAccountId||e.ChatWebsiteId)})),n.resolve(a)}).catch(function(e){n.reject(e)}),n.promise},p.selectedItemChange=function(t){if(t){var n=p.getText();try{_.templateSettings.interpolate=/{{([\s\S]+?)}}/g;var e=_.template(t.value),a={user:p.currentUser,account:o};p.setText(n+" "+e(a))}catch(e){p.setText(n+" "+t.value)}p.selectedItem=null}},p.note=function(){p.secret=!0},p.addNote=function(){var e=p.getText();e&&a.hide({secret:!0,body:e})},p.message={from:o.phone,to:_.isNil(s.to)||_.isEmpty(s.to)?[]:s.to,body:""},p.send=function(e){var t=p.getText();p.message.to&&t&&(p.message.to.length?(n=t,a.hide({to:p.message.to.join(","),body:n})):d.error("To is mandatory"));var n},p.getContact=function(e){var t="";e.firstName&&e.firstName!==e.mobile&&(t+=e.firstName+" ");e.lastName&&e.lastName!==e.mobile&&(t+=e.lastName+" ");return t+="<"+e.mobile+">"},p.closeDialog=function(){a.cancel()},p.contactSearch=function(e){return o&&o.ListId?l.cmContact.get({ListId:o.ListId,nolimit:!0,filter:e,fields:"firstName,lastName,mobile"}).$promise.then(function(e){return e.rows}):[]},p.setTextWrapper=function(e){p.setText=e},p.getTextWrapper=function(e){p.getText=e},p.transformContact=function(e){var t=e;if(_.isObject(t))return e.mobile;if(n=t,/^(\+|\d)[0-9]{7,16}$/.test(n))return t;var n;return d.error("Mobile "+t+" is not valid"),null},r){case"note":p.note()}}e.$inject=["$cookies","$timeout","$window","$mdDialog","$mdConstant","account","message","type","api","toasty","$q","$translate","Auth"],angular.module("app.dashboards").controller("ComposeSmsInteractionDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;function d(e){a.hide(e)}l.errors=[],l.interaction=angular.copy(s),l.interaction.disposition||(l.interaction.disposition=null),l.channel=r,l.saveDisposition=function(e){l.errors=[],l.interaction.closed||(l.interaction.closedAt=Date.now());l.interaction.closed=!0,o[l.interactionMethod]?o[l.interactionMethod].update(_.pick(l.interaction,["MailAccountId","closed","closedAt","disposition","id","note"])).$promise.then(function(e){l.interaction=e,i.success({title:"Interaction properly closed!",msg:"Interaction has been closed!"}),d(!0)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){l.errors=e.data.errors||[{message:e.toString(),type:"api.variable.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.variable.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})}):d(!1)},l.closeDialog=d,l.dispositionMethod="chat"===l.channel?"chatWebsite":l.channel+"Account",l.interactionMethod=l.channel+"Interaction",o[l.dispositionMethod]&&o[l.dispositionMethod].getDispositions({fields:"id,name",sort:"name",nolimit:!0,id:l.interaction["chat"===l.channel?"ChatWebsiteId":_.capitalize(l.channel)+"AccountId"]}).$promise.then(function(e){l.dispositions=e||{count:0,rows:[]}}).catch(function(e){console.error(e)})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","api","interaction","channel"],angular.module("app.dashboards").controller("DisposeInteractionDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i,o){var s=this;function r(e){t.hide(e)}s.errors=[],s.tags=o,s.interaction=angular.copy(a),s.interaction.Tags=_.map(s.interaction.Tags,function(e){return{id:e.id,name:e.name,color:e.color}}),s.channel=i,s.autocompleteRequireMatch=!0,s.saveTag=function(){{if(s.errors=[],e[s.interactionMethod])return e[s.interactionMethod].addTags({id:s.interaction.id,ids:_.map(s.interaction.Tags,"id")}).$promise.then(function(){n.success({title:"Interaction properly tagged!",msg:"Interaction has been tagged!"}),a.Tags=s.interaction.Tags,r(!0)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t+=1)n.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.variable.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})});r(!1)}},s.closeDialog=r,s.interactionMethod=s.channel+"Interaction"}e.$inject=["$mdDialog","toasty","api","interaction","channel","tags"],angular.module("app.dashboards").controller("TagInteractionDialogController",e)}(),function(){"use strict";function e(i,o,s,e,l,d,t,n,a,r,c){var m=this;function u(){try{i.$parent.$parent.$parent.vm.updateLocalStorage()}catch(e){d.error({title:"ERROR UPDATE LOCAL TABS",msg:"Error updating locally stored tabs"})}}function p(n,e){var r=t.getCurrentUser();l.jscriptySessionReport.save({starttime:m.starttime,membername:m.call&&m.call.membername?m.call.membername:r.name,calleridname:m.call&&m.call.calleridname?m.call.calleridname:void 0,calleridnum:m.call&&m.call.calleridnum?m.call.calleridnum:void 0,queue:m.call&&m.call.queue?m.call.queue:void 0,uniqueid:m.call&&m.call.uniqueid?m.call.uniqueid:void 0,VoiceQueueId:m.call&&m.call["xmd-voicequeueid"]?m.call["xmd-voicequeueid"]:void 0,ProjectId:m.project&&m.project.id?m.project.id:void 0,projectname:m.project&&m.project.name?m.project.name:void 0,ContactId:m.contact&&m.contact.id?m.contact.id:void 0,completed:e}).$promise.then(function(e){if(e)for(var t=m.getResponseSheetHeaders(),n=m.getResponseSheetRow(),a=m.getQuestionWithResponseList(),i=0;i<t.length;i+=1)if(!_.isEmpty(n[i])){l.jscriptyQuestionReport.save({question:t[i],answer:n[i],questionId:a[i].id,membername:m.call&&m.call.membername?m.call.membername:r.name,calleridname:m.call&&m.call.calleridname?m.call.calleridname:void 0,calleridnum:m.call&&m.call.calleridnum?m.call.calleridnum:void 0,queue:m.call&&m.call.queue?m.call.queue:void 0,uniqueid:m.call&&m.call.uniqueid?m.call.uniqueid:void 0,SessionId:e.id,ProjectId:m.project.id,projectname:m.project.name});for(var o=n[i].toString().split(";"),s=0;s<o.length;s+=1)l.jscriptyAnswerReport.save({question:t[i],questionId:a[i].id,answer:o[s].trim(),membername:m.call&&m.call.membername?m.call.membername:r.name,calleridname:m.call&&m.call.calleridname?m.call.calleridname:void 0,calleridnum:m.call&&m.call.calleridnum?m.call.calleridnum:void 0,queue:m.call&&m.call.queue?m.call.queue:void 0,uniqueid:m.call&&m.call.uniqueid?m.call.uniqueid:void 0,SessionId:e.id,ProjectId:m.project.id,projectname:m.project.name})}return e}).then(function(e){e?n.resolve(!0):n.reject()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.contact.save"}];for(var t=0;t<e.data.errors.length;t+=1)d.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else d.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.contact.save",msg:e.data?JSON.stringify(e.data.message):e.toString()});n.reject()})}m.formViewer={},m.showResetButton=!0,m.showIncompleteSubmitButton=!1,m.detectBrowser=c.detectBrowser(),m.onSubmit=function(e,t){var n=o.defer();if(t){var a=s.confirm().title("Would you like to save your survey?").textContent("").ariaLabel("survey").targetEvent(e).ok("YES").cancel("NO");s.show(a).then(function(){p(n,!1)},function(){n.resolve()})}else p(n,!0);return n.promise.then(function(e){e&&(d.success({title:"Session saved",msg:"Your survey session has been properly saved!"}),function(e){try{i.$parent.$parent.$parent.vm.removeTab(e)}catch(e){d.error({title:"ERROR REMOVE TAB",msg:"Error while removing tab"})}}(m.tab.id))}).catch(function(e){d.error({title:"Session save error",msg:"There has been an error while trying to save your survey session!"})})},m.openContact=function(e,t){try{i.$parent.$parent.$parent.vm.addContactTab(t)}catch(e){d.error({title:"ERROR OPEN CONTACT",msg:"Jscripty can't open the contact"})}},m.isJsonString=function(e){if(_.isNil(e))return!1;try{JSON.parse(e)}catch(e){return!1}return!0},m.getResponseSheet=function(){return e.getResponseSheet(m.project.formData,m.project.responseData,!1)},m.getResponseSheetRow=function(){return e.getResponseSheetRow(m.project.formData,m.project.responseData)},m.getResponseSheetHeaders=function(){return e.getResponseSheetHeaders(m.project.formData,!1)},m.getQuestionWithResponseList=function(){return e.getQuestionWithResponseList(m.project.formData,m.project.responseData)},m.init=function(e){m.tab=e,m.tab&&(m.call=m.tab.call,m.starttime=m.tab.openedAt,m.contact=m.tab.contact,m.project=m.tab.project,m.project&&(_.isObjectLike(m.project.formData)?m.project.formData=m.project.formData:m.isJsonString(m.project.formData)?m.project.formData=JSON.parse(m.project.formData):m.project.formData=void 0,m.project.responseData=m.project.responseData||{},void 0!==m.project.currentPage&&r(function(){a.$broadcast("mwForm.pageEvents.changePage",{page:m.project.currentPage})}),i.$on("mwForm.pageEvents.pageCurrentChanged",function(e,t){if(t.currentPage&&(m.project.currentPage=t.currentPage.number-1,u(),m.project.enableUncompleteSave&&(1<=t.currentPage.number&&t.currentPage.number<m.project.formData.pages.length?m.showIncompleteSubmitButton=!0:m.showIncompleteSubmitButton=!1),m.project.formData&&m.project.formData.pages))for(var n=0,a=m.project.formData.pages.length;n<a;n++)if(t.currentPage.number<n+1&&m.project.formData.pages[n].elements)for(var i=0,o=m.project.formData.pages[n].elements.length;i<o;i++)"question"===m.project.formData.pages[n].elements[i].type&&m.project.formData.pages[n].elements[i].question&&delete m.project.responseData[m.project.formData.pages[n].elements[i].question.id]})))},m.resetViewer=function(e){if(m.formViewer.reset){var t=s.confirm().title(n.instant("JSCRIPTY.DO_YOU_WANT_TO_RESET_SESSION")).content(n.instant("JSCRIPTY.ALL_SURVEY_DATA_WILL_BE_LOST")).textContent("").ariaLabel("survey").targetEvent(e).ok(n.instant("JSCRIPTY.YES")).cancel(n.instant("JSCRIPTY.NO"));s.show(t).then(function(){m.showIncompleteSubmitButton=!1,m.project.currentPage=void 0,u(),m.formViewer.reset()})}}}e.$inject=["$scope","$q","$mdDialog","mwFormResponseUtils","api","toasty","Auth","$translate","$rootScope","$timeout","msUtils"],angular.module("app.dashboards").controller("AgentGeneralJscriptyController",e)}(),function(){"use strict";function e(n,a,e,t,i){var o=this;function s(){return function(e){if(404===e.status)a.info({title:n.instant("DASHBOARDS.ATTENTION"),msg:n.instant("DASHBOARDS.ACCEPT_ELSEWHERE")});else if(e.data&&e.data.errors&&e.data.errors.length){o.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelMessage.accept"}];for(var t=0;t<e.data.errors.length;t+=1)a.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelMessage.accept",msg:e.data?JSON.stringify(e.data.message):e.toString()})}}o.notification=e,o.user=i.getCurrentUser(),o.accept=function(e){{if(t[o.notification.channel+"Message"])return t[o.notification.channel+"Message"].accept({id:o.notification.id,UserId:o.user.id,manual:!0}).$promise.then(function(e){a.success({title:"Message properly accepted!",msg:"Message has been accepted!"})}).catch(s());a.error({title:"API:ERROR",msg:"API accept message not found: "+o.notification.channel+"Message"})}},o.reject=function(e){{if(t[o.notification.channel+"Message"])return t[o.notification.channel+"Message"].reject({id:o.notification.id,UserId:o.user.id}).$promise.then(function(e){a.success({title:"Message properly rejected!",msg:"Message has been rejected!"})}).catch(s());a.error({title:"API:ERROR",msg:"API reject message not found: "+o.notification.channel+"Message"})}}}e.$inject=["$translate","toasty","notification","api","Auth"],angular.module("app.dashboards").controller("NotificationController",e)}(),function(){"use strict";angular.module("app.dashboards").controller("AgentGeneralPopupController",function(){var t=this;t.init=function(e){t.tab=e,t.tab&&(t.tab.saved=!0,t.html=t.tab.html)}})}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(){l({queues:m.outboundQueues,rpcQueues:m.rpcQueues}).then(function(e){m.inbound=e})}function p(){d({rpcCampaigns:m.rpcCampaigns}).then(function(e){m.ivr=e})}m.outboundQueues=s?_.keyBy(s.rows?s.rows:[],"id"):{},m.rpcQueues=r?_.keyBy(r.rows?r.rows:[],"id"):{},m.rpcCampaigns=c?_.keyBy(c.rows?c.rows:[],"id"):{},m.inbound={waiting:0,talking:0,pTalking:0,answered:0,abandoned:0,unmanaged:0,sumHoldTime:0,sumBillable:0,total:0,avgHoldTime:"00:00:00",avgTalkTime:"00:00:00",answerRate:0,abandonRate:0,outboundDropCallsDayCallersExit:0,outboundDropCallsDayTimeout:0},m.ivr={originated:0,limitCalls:0},m.onSaveQueue=function(e){m.outboundQueues[e.id]&&m.rpcQueues[e.id]&&(m.rpcQueues[e.id]=e)},m.onSaveCampaign=function(e){m.rpcCampaigns[e.id]&&(m.rpcCampaigns[e.id]=e)},i.onWithoutApply("voice_queue:save",m.onSaveQueue),m.interval=t(function(){u(),p()},999),i.onWithoutApply("campaign:save",m.onSaveCampaign),u(),p(),e.$on("$destroy",function(){i.removeAllListeners("voice_queue:save"),i.removeAllListeners("campaign:save"),m.interval&&t.cancel(m.interval)})}e.$inject=["$scope","$interval","$mdSidenav","Auth","socket","api","outboundQueues","rpcQueues","initializeRealtimeQueue","initializeRealtimeCampaign","rpcCampaigns"],angular.module("app.dashboards").controller("UserVoiceDashboardDialerController",e)}(),function(){"use strict";function e(n){var o=[],s=function(){var a=o[0],i={waiting:0,talking:0,pTalking:0,answered:0,abandoned:0,unmanaged:0,sumHoldTime:0,sumBillable:0,total:0,avgHoldTime:"00:00:00",avgTalkTime:"00:00:00",answerRate:0,abandonRate:0,originated:0,outboundDropCallsDayCallersExit:0,outboundDropCallsDayTimeout:0};_.forIn(a.queues,function(e,t){if(a.rpcQueues[t]){i.waiting+=a.rpcQueues[t].waiting||0,i.talking+=(a.rpcQueues[t].talking||0)+(a.rpcQueues[t].pTalking||0),i.answered+=a.rpcQueues[t].answered||0,i.unmanaged+=a.rpcQueues[t].unmanaged||0,i.sumHoldTime+=a.rpcQueues[t].sumHoldTime||0,i.sumBillable+=a.rpcQueues[t].sumBillable||0,i.total+=a.rpcQueues[t].total||0,i.originated+=a.rpcQueues[t].originated||0,i.outboundDropCallsDayCallersExit+=a.rpcQueues[t].outboundDropCallsDayCallersExit||0,i.outboundDropCallsDayTimeout+=a.rpcQueues[t].outboundDropCallsDayTimeout||0;var n=a.rpcQueues[t].total-a.rpcQueues[t].answered-a.rpcQueues[t].unmanaged;i.abandoned+=0<n?n:0}}),i.avgHoldTime=Math.round(0<i.total?i.sumHoldTime/i.total:0),i.avgHoldTime=new Date(1e3*i.avgHoldTime).toISOString().substr(11,8),i.avgTalkTime=Math.round(0<i.answered?i.sumBillable/i.answered:0),i.avgTalkTime=new Date(1e3*i.avgTalkTime).toISOString().substr(11,8),i.answerRate=Math.round((0<i.total?i.answered/i.total*100:0)*Math.pow(10,1))/Math.pow(10,1),i.abandonRate=Math.round((0<i.total?i.abandoned/i.total*100:0)*Math.pow(10,1))/Math.pow(10,1),i.outboundDropRate=Math.round((0<i.total?i.outboundDropCallsDayTimeout/i.total*100:0)*Math.pow(10,1))/Math.pow(10,1),i.outboundAbandonRate=Math.round((0<i.total?i.outboundDropCallsDayCallersExit/i.total*100:0)*Math.pow(10,1))/Math.pow(10,1),i.outboundanswerRate=0<100-i.outboundDropRate-i.outboundAbandonRate&&i.total?100-i.outboundDropRate-i.outboundAbandonRate:0,o.shift(),a.defer.resolve(i),0<o.length&&s()};return function(e){var t=n.defer();return o.push({queues:e.queues,rpcQueues:e.rpcQueues,defer:t}),1===o.length&&s(),t.promise}}function t(n){var i=[],o=function(){var n=i[0],a={originated:0,limitCalls:0};_.forIn(n.rpcCampaigns,function(e,t){n.rpcCampaigns[t]&&(a.originated+=n.rpcCampaigns[t].originated||0,a.limitCalls+=n.rpcCampaigns[t].limitCalls||0)}),i.shift(),n.defer.resolve(a),0<i.length&&o()};return function(e){var t=n.defer();return i.push({rpcCampaigns:e.rpcCampaigns,defer:t}),1===i.length&&o(),t.promise}}function n(e,o,t,n){var s=this;s.hasPermission=function(){return t.hasPermission(101)||t.hasRole("admin")},s.license=n,e.$on("$stateChangeSuccess",function(e,t,n,a,i){if(t.data)switch(s.currentTab=t.data.selectedTab,s.currentTab){case 1:o.go("app.dashboards.general.dialer");break;default:o.go("app.dashboards.general.voice")}})}e.$inject=["$q"],t.$inject=["$q"],n.$inject=["$scope","$state","Auth","license"],angular.module("app.dashboards").filter("secToTime",function(){return function(e){return new Date(1e3*e).toISOString().substr(11,8)}}).factory("initializeRealtimeQueue",e).factory("initializeRealtimeCampaign",t).controller("UserDashboardGeneralController",n)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;function m(){d({queues:c.inboundQueues,rpcQueues:c.rpcQueues}).then(function(e){c.inbound=e})}c.inboundQueues=s?_.keyBy(s.rows?s.rows:[],"id"):{},c.rpcQueues=r?_.keyBy(r.rows?r.rows:[],"id"):{},c.inbound={waiting:0,talking:0,answered:0,abandoned:0,unmanaged:0,sumHoldTime:0,sumBillable:0,total:0,avgHoldTime:"00:00:00",avgTalkTime:"00:00:00",answerRate:0,abandonRate:0},c.outbound=l||{answered:0,sumBillable:0,sumDuration:0,sumHoldTime:0,total:0},c.onSaveQueue=function(e){c.inboundQueues[e.id]&&c.rpcQueues[e.id]&&(c.rpcQueues[e.id]=e,m())},c.onSaveOutbound=function(e){c.outbound=e},i.on("voice_queue:save",c.onSaveQueue),i.on("voice_outbound:save",c.onSaveOutbound),m(),e.$on("$destroy",function(){i.removeAllListeners("voice_queue:save"),i.removeAllListeners("voice_outbound:save")})}e.$inject=["$scope","$interval","$mdSidenav","Auth","socket","api","inboundQueues","rpcQueues","outbound","initializeRealtimeQueue"],angular.module("app.dashboards").controller("UserVoiceDashboardGeneralController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="FAX.EDIT_FAXACCOUNT",m.faxAccount=angular.copy(s),m.faxAccounts=o,m.newFaxAccount=!1,m.faxAccount||(m.faxAccount={waitForTheAssignedAgent:10,notificationSound:!0},m.title="FAX.NEW_FAXACCOUNT",m.newFaxAccount=!0),t.params.id&&(m.faxAccount.FaxAccountId=t.params.id),m.addNewFaxAccount=function(){m.errors=[],r.faxAccount.addAccountApplications(m.faxAccount).$promise.then(function(e){m.faxAccounts.unshift(e.toJSON()),i.success({title:"FaxAccount properly created",msg:m.faxAccount.name?m.faxAccount.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.faxAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.faxAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveFaxAccount=function(){m.errors=[],r.faxAccount.updateAccountApplications(m.faxAccount).$promise.then(function(e){var t=_.find(m.faxAccounts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"FaxAccount properly saved!",msg:m.faxAccount.name?m.faxAccount.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.faxAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.faxAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteFaxAccount=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The faxAccount will be deleted.").ariaLabel("Delete FaxAccount").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.faxAccount.delete({id:m.faxAccount.id}).$promise.then(function(){_.remove(m.faxAccounts,{id:m.faxAccount.id}),i.success({title:"FaxAccount properly deleted!",msg:(m.faxAccount.name||"faxAccount")+" has been deleted!"}),u(m.faxAccount)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.faxAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.faxAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.trunk.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.trunks=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})}),r.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.lists=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","faxAccounts","faxAccount","api","Auth","license","setting"],angular.module("app.fax").controller("CreateOrEditFaxAccountDialogController",e)}(),function(){"use strict";function e(s,i,a,o,e){var r=this;function t(e,t){if(r.faxAccountApps.rows.length){var n=r.faxAccountApps.rows[t]?r.faxAccountApps.rows[t]:r.faxAccountApps.rows[0];i.show({controller:"EditFaxAccountApp"+(n.appType||n.app).toLowerCase()+"DialogController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxAccounts/edit/apps/"+(n.appType||n.app).toLowerCase()+"/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{faxAccountApp:n,faxAccount:r.faxAccount}}).then(function(e){e&&(e.id?r.faxAccountApps.rows[t]=e:r.faxAccountApps.rows.splice(t,0,e),l())}).catch(function(e){e&&o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:EDITMODALSHOW",msg:e.data?JSON.stringify(e.data):e.toString()})})}}function l(){for(var e=1,t=[],n=0;n<r.faxAccountApps.rows.length;n++,0){var a=r.faxAccountApps.rows[n],i=[],o=[];a.intervals="*,*,*,*"!==a.interval?[a.interval]:a.IntervalId?_.map(_.filter(r.intervals.rows,{IntervalId:a.IntervalId}),"interval"):[],a.context=r.faxAccount.context,a.exten=r.faxAccount.exten,a.type&&(a.type=a.type.toLowerCase()),a.priority=i.length?_.last(i).priority+1:e,e=(o.length?_.last(o).priority:a.priority)+1,t=_.concat(t,i,[a],o)}s.faxAccount.addApplications({id:r.faxAccount.id},_.sortBy(t,"priority")).$promise.then(function(e){r.faxAccountApps.rows=e.rows}).catch(function(e){console.error(e)})}function n(e){r.faxAccountApps=e||{count:0,rows:[]}}r.currentUser=e.getCurrentUser(),r.faxAccount={},r.faxAccountApps={count:0,rows:[]},r.selectedFaxAccountApps=[],r.query={sort:"priority"},r.apps=_.reject(_.sortBy([{app:"Interval",appType:"interval",types:["always","custom","list"],fields:[],isApp:!1},{app:"noop",appType:"noop",type:"noop",icon:"icon-apps",interval:"*,*,*,*",required:!0,isApp:!0,fields:[{title:"Value",name:"value",type:"text",param:0}]},{app:"system",appType:"system",type:"system",icon:"icon-apps",interval:"*,*,*,*",required:!0,isApp:!0,extraApi:[{name:"variables",route:"variable",filters:{fields:"id,name",sort:"name",nolimit:!0}}],fields:[{title:"Command",name:"command",type:"text",required:!0,param:0},{title:"Variable",name:"variable",type:"apiselect",values:"variables",value:"variable.name",option:"variable.name",defaultValues:[{value:"''",option:"None"}],defaultValue:"''",param:1}]},{app:"gotop",appType:"gotop",type:"goto",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Priority",name:"priority",type:"number",required:!0,min:0,param:0}]},{app:"gotoif",appType:"gotoif",type:"gotoif",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Condition",name:"condition",type:"text",required:!0,param:0},{title:"truepriority",name:"truepriority",type:"number",min:1,required:!0,param:1},{title:"falsepriority",name:"falsepriority",type:"number",min:1,required:!0,param:2}]},{app:"queue",appType:"queue",foreignKey:"FaxQueueId",type:"queue",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"queues",route:"faxQueue",filters:{fields:"id,name,type",sort:"name",nolimit:!0}}],fields:[{title:"Queue",name:"queue",type:"apiselect",values:"queues",value:"queue.name",option:"queue.name",defaultValue:300,required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",max:2147483,min:0,defaultValue:300,required:!0,param:1}]},{app:"agent",appType:"agent",type:"agent",foreignKey:"UserId",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"agents",route:"user",filters:{fields:"id,name",sort:"name",role:"agent",nolimit:!0}}],fields:[{title:"Agent",name:"agent",type:"apiselect",values:"agents",value:"agent.name",option:"agent.name",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",max:2147483,min:0,required:!0,defaultValue:30,param:1}]},{app:"close",appType:"close",type:"close",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Disposition",name:"disposition",type:"text",required:!0,param:0}]}],["app"]),{isApp:!1}),r.list={group:{name:"opt1",pull:"clone"},animation:100,sort:!1},r.applications={group:{name:"opt2",put:"opt1"},animation:100,onAdd:function(e){t(e,e.newIndex)},onSort:function(e){l()}},r.init=function(e){r.faxAccount=e,r.query.id=e.id,r.query.isApp=!0,r.query.nolimit=!0,r.getFaxAccountApps(),r.getIntervals()},r.deleteConfirm=function(e,t,n){var a=i.confirm().title("Are you sure want to delete the application?").htmlContent("<b>"+e.app+"</b> will be deleted.").ariaLabel("delete application").targetEvent(n).ok("OK").cancel("CANCEL");i.show(a).then(function(){r.faxAccountApps.rows.splice(t,1),l()},function(){console.log("CANCEL")})},r.getFaxAccountApps=function(){r.promise=s.faxAccount.getApplications(r.query,n).$promise},r.editFaxAccountApp=t,r.editInterval=function(e,t){if(r.faxAccountApps.rows.length){var n=r.faxAccountApps.rows[t]?r.faxAccountApps.rows[t]:r.faxAccountApps.rows[0];i.show({controller:"EditFaxAccountAppintervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxAccounts/edit/apps/interval/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:{interval:n.interval,IntervalId:n.IntervalId,application:!0},intervals:[]}}).then(function(e){e&&(n.interval=e.interval||"*,*,*,*",n.IntervalId=e.IntervalId||null,l())})}},r.deleteFaxAccountApp=function(e){_.remove(r.faxAccountApps.rows,{id:e.id}),l(),o.success({title:"App deleted!",msg:e.app?e.app+" has been deleted!":""})},r.deleteSelectedFaxAccountApps=function(e){var t=i.confirm().title("Are you sure want to delete the selected applications?").htmlContent("<b>"+r.selectedFaxAccountApps.length+" selected</b> will be deleted.").ariaLabel("delete applications").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){r.selectedFaxAccountApps.forEach(function(e){_.remove(r.faxAccountApps.rows,{id:e.id})}),r.selectedFaxAccountApps=[],l()})},r.rewriteRouting=l,r.getIntervals=function(){return s.interval.get({fields:"id,interval,IntervalId"}).$promise.then(function(e){r.intervals=e}).catch(function(e){console.error(e)})}}e.$inject=["api","$mdDialog","$document","toasty","Auth"],angular.module("app.fax").controller("FaxAccountActionsController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="FAX.EDIT_"+(e.appType||e.app).toUpperCase(),o.agent=angular.copy(e),o.agent.appdata)switch(o.agent.appType?o.agent.appType.toLowerCase():o.agent.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.agent.appdata.split(",");o.agent.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.agent.text=s.slice(1,s.length).join(",");break;case"message":o.agent.text=o.agent.appdata;break;case"set":o.agent.name=o.agent.appdata.split("=")[0],o.agent.value=o.agent.appdata.split("=")[1];break;case"agi":o.agent.project=o.agent.appdata;break;default:var r=o.agent.appdata.split(",");o.agent.agent=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.agent.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.agent.timeout=30;function l(e){t.hide(e)}o.agent.type&&"outbound"===o.agent.type.toLowerCase()&&"outbounddial"===o.agent.appType.toLowerCase()&&(o.agent.prefix=o.agent.phone?o.agent.phone.split("$")[0]:void 0,o.agent.callerId=o.agent.callerID?"CALLERID(all)="+o.agent.callerID:void 0),o.saveFaxAccountApp=function(){o.errors=[];var e=[];o.agent.type&&"outbound"===o.agent.type.toLowerCase()&&"outboundDial"===o.agent.appType&&(o.agent.phone=a.cutdigits?(o.agent.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.agent.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.agent.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.agent.options+="U(xcally-mixmonitor-context)"):o.agent.options=o.agent.options.replace("U(xcally-mixmonitor-context)",""));var t=_.find(o.agents,{name:o.agent.agent});t&&(o.agent.UserId=t.id);if(o.agent.appType&&"custom"===o.agent.appType);else switch((o.agent.app||o.agent.appType).toLowerCase()){case"set":o.agent.appdata=o.agent.name+"="+o.agent.value;break;case"custom":break;default:e[0]=o.agent.agent,e[1]=o.agent.timeout,o.agent.appdata=e.join(",")}l(o.agent)},o.closeDialog=l,i.user.get({fields:"id,name",sort:"name",role:"agent",nolimit:"true"}).$promise.then(function(e){o.agents=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETagents",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","faxAccountApp","faxAccount","api"],angular.module("app.fax").controller("EditFaxAccountAppagentDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="FAX.EDIT_"+(n.appType||n.app).toUpperCase(),o.close=angular.copy(n),o.close.appdata)switch(o.close.appType?o.close.appType.toLowerCase():o.close.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.close.appdata.split(",");o.close.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.close.text=s.slice(1,s.length).join(",");break;case"message":o.close.text=o.close.appdata;break;case"set":o.close.name=o.close.appdata.split("=")[0],o.close.value=o.close.appdata.split("=")[1];break;case"agi":o.close.project=o.close.appdata;break;default:var r=o.close.appdata.split(",");o.close.disposition=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.close.type&&"outbound"===o.close.type.toLowerCase()&&"outbounddial"===o.close.appType.toLowerCase()&&(o.close.prefix=o.close.phone?o.close.phone.split("$")[0]:void 0,o.close.callerId=o.close.callerID?"CALLERID(all)="+o.close.callerID:void 0),o.saveFaxAccountApp=function(){o.errors=[];var e=[];o.close.type&&"outbound"===o.close.type.toLowerCase()&&"outboundDial"===o.close.appType&&(o.close.phone=a.cutdigits?(o.close.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.close.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.close.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.close.options+="U(xcally-mixmonitor-context)"):o.close.options=o.close.options.replace("U(xcally-mixmonitor-context)",""));if(o.close.appType&&"custom"===o.close.appType);else switch((o.close.app||o.close.appType).toLowerCase()){case"set":o.close.appdata=o.close.name+"="+o.close.value;break;case"custom":break;default:e[0]=o.close.disposition,o.close.appdata=e.join(",")}l(o.close)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","faxAccountApp","faxAccount","api"],angular.module("app.fax").controller("EditFaxAccountAppcloseDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="FAX.EDIT_"+(n.appType||n.app).toUpperCase(),o.gotoif=angular.copy(n),o.gotoif.appdata)switch(o.gotoif.appType?o.gotoif.appType.toLowerCase():o.gotoif.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.gotoif.appdata.split(",");o.gotoif.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.gotoif.text=s.slice(1,s.length).join(",");break;case"message":o.gotoif.text=o.gotoif.appdata;break;case"set":o.gotoif.name=o.gotoif.appdata.split("=")[0],o.gotoif.value=o.gotoif.appdata.split("=")[1];break;case"agi":o.gotoif.project=o.gotoif.appdata;break;default:var r=o.gotoif.appdata.split(",");o.gotoif.condition=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.gotoif.truepriority=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.gotoif.falsepriority=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10)}function l(e){t.hide(e)}o.gotoif.type&&"outbound"===o.gotoif.type.toLowerCase()&&"outbounddial"===o.gotoif.appType.toLowerCase()&&(o.gotoif.prefix=o.gotoif.phone?o.gotoif.phone.split("$")[0]:void 0,o.gotoif.callerId=o.gotoif.callerID?"CALLERID(all)="+o.gotoif.callerID:void 0),o.saveFaxAccountApp=function(){o.errors=[];var e=[];o.gotoif.type&&"outbound"===o.gotoif.type.toLowerCase()&&"outboundDial"===o.gotoif.appType&&(o.gotoif.phone=a.cutdigits?(o.gotoif.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.gotoif.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.gotoif.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.gotoif.options+="U(xcally-mixmonitor-context)"):o.gotoif.options=o.gotoif.options.replace("U(xcally-mixmonitor-context)",""));if(o.gotoif.appType&&"custom"===o.gotoif.appType);else switch((o.gotoif.app||o.gotoif.appType).toLowerCase()){case"set":o.gotoif.appdata=o.gotoif.name+"="+o.gotoif.value;break;case"custom":break;default:e[0]=o.gotoif.condition,e[1]=o.gotoif.truepriority,e[2]=o.gotoif.falsepriority,o.gotoif.appdata=e.join(",")}l(o.gotoif)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","faxAccountApp","faxAccount","api"],angular.module("app.fax").controller("EditFaxAccountAppgotoifDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="FAX.EDIT_"+(n.appType||n.app).toUpperCase(),o.gotop=angular.copy(n),o.gotop.appdata)switch(o.gotop.appType?o.gotop.appType.toLowerCase():o.gotop.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.gotop.appdata.split(",");o.gotop.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.gotop.text=s.slice(1,s.length).join(",");break;case"message":o.gotop.text=o.gotop.appdata;break;case"set":o.gotop.name=o.gotop.appdata.split("=")[0],o.gotop.value=o.gotop.appdata.split("=")[1];break;case"agi":o.gotop.project=o.gotop.appdata;break;default:var r=o.gotop.appdata.split(",");o.gotop.priority=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.gotop.type&&"outbound"===o.gotop.type.toLowerCase()&&"outbounddial"===o.gotop.appType.toLowerCase()&&(o.gotop.prefix=o.gotop.phone?o.gotop.phone.split("$")[0]:void 0,o.gotop.callerId=o.gotop.callerID?"CALLERID(all)="+o.gotop.callerID:void 0),o.saveFaxAccountApp=function(){o.errors=[];var e=[];o.gotop.type&&"outbound"===o.gotop.type.toLowerCase()&&"outboundDial"===o.gotop.appType&&(o.gotop.phone=a.cutdigits?(o.gotop.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.gotop.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.gotop.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.gotop.options+="U(xcally-mixmonitor-context)"):o.gotop.options=o.gotop.options.replace("U(xcally-mixmonitor-context)",""));if(o.gotop.appType&&"custom"===o.gotop.appType);else switch((o.gotop.app||o.gotop.appType).toLowerCase()){case"set":o.gotop.appdata=o.gotop.name+"="+o.gotop.value;break;case"custom":break;default:e[0]=o.gotop.priority,o.gotop.appdata=e.join(",")}l(o.gotop)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","faxAccountApp","faxAccount","api"],angular.module("app.fax").controller("EditFaxAccountAppgotopDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;if(l.errors=[],l.title="TOOLS.EDIT_INTERVAL",l.interval=angular.copy(i),l.intervals=o,l.newInterval=!1,l.types=["always","custom","list"],l.daysOfWeek=a.getDaysOfWeek(),l.monthNumber=a.getMonthNumber(),l.monthName=a.getMonthName(),l.daysOfMonth=a.getDaysOfMonth(),l.interval)if("*,*,*,*"!==l.interval.interval){l.type="custom";var d=l.interval.interval.split(","),c=d[0],m=d[1],u=d[2],p=d[3];if("*"!==c){var g,v=c.split("-")[0],h=c.split("-")[1];(g=new Date).setHours(Number(v.split(":")[0])),g.setMinutes(Number(v.split(":")[1])),l.timeRangeFrom=g,(g=new Date).setHours(Number(h.split(":")[0])),g.setMinutes(Number(h.split(":")[1])),l.timeRangeTo=g}"*"!==m&&(l.dayOfWeekFrom=m.split("-")[0],l.dayOfWeekTo=m.split("-")[1]),"*"!==u&&(l.monthDayFrom=u.split("-")[0],l.monthDayTo=u.split("-")[1]),"*"!==p&&(l.monthFrom=p.split("-")[0],l.monthTo=p.split("-")[1])}else l.type="always";else l.interval={interval:"*,*,*,*"},l.type="always",l.title="TOOLS.NEW_INTERVAL",l.newInterval=!0;function b(){switch(l.type){case"always":case"list":return"*,*,*,*";case"custom":var e=[];if("*"!==l.timeRangeFrom&&l.timeRangeFrom&&l.timeRangeTo){var t=(l.timeRangeFrom.getHours()<10?"0":"")+l.timeRangeFrom.getHours()+":"+(l.timeRangeFrom.getMinutes()<10?"0":"")+l.timeRangeFrom.getMinutes(),n=(l.timeRangeTo.getHours()<10?"0":"")+l.timeRangeTo.getHours()+":"+(l.timeRangeTo.getMinutes()<10?"0":"")+l.timeRangeTo.getMinutes();e.push(t+"-"+n)}else e.push("*");return l.dayOfWeekFrom?l.dayOfWeekTo?e.push(l.dayOfWeekFrom+"-"+l.dayOfWeekTo):e.push(l.dayOfWeekFrom):e.push("*"),l.monthDayFrom?l.monthDayTo?e.push(l.monthDayFrom+"-"+l.monthDayTo):e.push(l.monthDayFrom):e.push("*"),l.monthFrom?l.monthTo?e.push(l.monthFrom+"-"+l.monthTo):e.push(l.monthFrom):e.push("*"),e.join()}}function f(e){t.hide(e)}e.params.id&&!l.interval.application&&(l.interval.IntervalId=e.params.id),l.interval.IntervalId&&l.interval.application&&(l.type="list"),l.addNewInterval=function(){l.errors=[],l.interval.interval=b(),r.interval.save(l.interval).$promise.then(function(e){l.intervals.push(e),s.success({title:"Interval properly created",msg:l.interval.name?l.interval.name+" has been created!":""}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}]})},l.saveInterval=function(){l.errors=[],l.interval.interval=b(),l.interval.application?("list"!==l.type&&(l.interval.IntervalId=null),f(l.interval)):r.interval.update({id:l.interval.id},l.interval).$promise.then(function(e){var t=_.find(l.intervals,{id:e.id});t&&_.merge(t,e),s.success({title:"Interval properly saved!",msg:"Interval has been saved!"}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}]})},l.closeDialog=f,l.interval.application&&r.interval.get({fields:"id,name,interval,IntervalId",IntervalId:"null",nolimit:!0}).$promise.then(function(e){l.intervals=e}).catch(function(e){console.error(e)})}e.$inject=["$state","$mdDialog","$mdToast","IndexFactory","interval","intervals","toasty","api"],angular.module("app.voice").controller("EditFaxAccountAppintervalDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="FAX.EDIT_"+(n.appType||n.app).toUpperCase(),o.noop=angular.copy(n),o.noop.appdata)switch(o.noop.appType?o.noop.appType.toLowerCase():o.noop.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.noop.appdata.split(",");o.noop.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.noop.text=s.slice(1,s.length).join(",");break;case"message":o.noop.text=o.noop.appdata;break;case"set":o.noop.name=o.noop.appdata.split("=")[0],o.noop.value=o.noop.appdata.split("=")[1];break;case"agi":o.noop.project=o.noop.appdata;break;default:var r=o.noop.appdata.split(",");o.noop.value=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.noop.type&&"outbound"===o.noop.type.toLowerCase()&&"outbounddial"===o.noop.appType.toLowerCase()&&(o.noop.prefix=o.noop.phone?o.noop.phone.split("$")[0]:void 0,o.noop.callerId=o.noop.callerID?"CALLERID(all)="+o.noop.callerID:void 0),o.saveFaxAccountApp=function(){o.errors=[];var e=[];o.noop.type&&"outbound"===o.noop.type.toLowerCase()&&"outboundDial"===o.noop.appType&&(o.noop.phone=a.cutdigits?(o.noop.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.noop.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.noop.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.noop.options+="U(xcally-mixmonitor-context)"):o.noop.options=o.noop.options.replace("U(xcally-mixmonitor-context)",""));if(o.noop.appType&&"custom"===o.noop.appType);else switch((o.noop.app||o.noop.appType).toLowerCase()){case"set":o.noop.appdata=o.noop.name+"="+o.noop.value;break;case"custom":break;default:e[0]=o.noop.value,o.noop.appdata=e.join(",")}l(o.noop)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","faxAccountApp","faxAccount","api"],angular.module("app.fax").controller("EditFaxAccountAppnoopDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="FAX.EDIT_"+(e.appType||e.app).toUpperCase(),o.queue=angular.copy(e),o.queue.appdata)switch(o.queue.appType?o.queue.appType.toLowerCase():o.queue.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.queue.appdata.split(",");o.queue.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.queue.text=s.slice(1,s.length).join(",");break;case"message":o.queue.text=o.queue.appdata;break;case"set":o.queue.name=o.queue.appdata.split("=")[0],o.queue.value=o.queue.appdata.split("=")[1];break;case"agi":o.queue.project=o.queue.appdata;break;default:var r=o.queue.appdata.split(",");o.queue.queue=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.queue.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.queue.queue=300,o.queue.timeout=300;function l(e){t.hide(e)}o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outbounddial"===o.queue.appType.toLowerCase()&&(o.queue.prefix=o.queue.phone?o.queue.phone.split("$")[0]:void 0,o.queue.callerId=o.queue.callerID?"CALLERID(all)="+o.queue.callerID:void 0),o.saveFaxAccountApp=function(){o.errors=[];var e=[];o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outboundDial"===o.queue.appType&&(o.queue.phone=a.cutdigits?(o.queue.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.queue.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.queue.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.queue.options+="U(xcally-mixmonitor-context)"):o.queue.options=o.queue.options.replace("U(xcally-mixmonitor-context)",""));var t=_.find(o.queues,{name:o.queue.queue});t&&(o.queue[_.capitalize("fax")+"QueueId"]=t.id);if(o.queue.appType&&"custom"===o.queue.appType);else switch((o.queue.app||o.queue.appType).toLowerCase()){case"set":o.queue.appdata=o.queue.name+"="+o.queue.value;break;case"custom":break;default:e[0]=o.queue.queue,e[1]=o.queue.timeout,o.queue.appdata=e.join(",")}l(o.queue)},o.closeDialog=l,i.faxQueue.get({fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){o.queues=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","faxAccountApp","faxAccount","api"],angular.module("app.fax").controller("EditFaxAccountAppqueueDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="FAX.EDIT_"+(e.appType||e.app).toUpperCase(),o.system=angular.copy(e),o.system.appdata)switch(o.system.appType?o.system.appType.toLowerCase():o.system.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.system.appdata.split(",");o.system.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.system.text=s.slice(1,s.length).join(",");break;case"message":o.system.text=o.system.appdata;break;case"set":o.system.name=o.system.appdata.split("=")[0],o.system.value=o.system.appdata.split("=")[1];break;case"agi":o.system.project=o.system.appdata;break;default:var r=o.system.appdata.split(",");o.system.command=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.system.variable=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.system.variable="";function l(e){t.hide(e)}o.system.type&&"outbound"===o.system.type.toLowerCase()&&"outbounddial"===o.system.appType.toLowerCase()&&(o.system.prefix=o.system.phone?o.system.phone.split("$")[0]:void 0,o.system.callerId=o.system.callerID?"CALLERID(all)="+o.system.callerID:void 0),o.saveFaxAccountApp=function(){o.errors=[];var e=[];o.system.type&&"outbound"===o.system.type.toLowerCase()&&"outboundDial"===o.system.appType&&(o.system.phone=a.cutdigits?(o.system.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.system.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.system.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.system.options+="U(xcally-mixmonitor-context)"):o.system.options=o.system.options.replace("U(xcally-mixmonitor-context)",""));if(o.system.appType&&"custom"===o.system.appType);else switch((o.system.app||o.system.appType).toLowerCase()){case"set":o.system.appdata=o.system.name+"="+o.system.value;break;case"custom":break;default:e[0]=o.system.command,e[1]=o.system.variable,o.system.appdata=e.join(",")}l(o.system)},o.closeDialog=l,i.variable.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){o.variables=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvariables",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","faxAccountApp","faxAccount","api"],angular.module("app.fax").controller("EditFaxAccountAppsystemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.faxAccount={},c.faxAccountFaxDispositions={count:0,rows:[]},c.selectedFaxAccountFaxDispositions=[],c.query={fields:"createdAt,updatedAt,id,name,createdAt",limit:10,page:1},c.init=function(e){c.faxAccount=e,c.query.id=c.faxAccount.id,c.query.FaxAccountId=c.faxAccount.id,c.getFaxAccountFaxDispositions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the faxDisposition?").htmlContent("<b>"+(e.name||"faxDisposition")+"</b> will be deleted.").ariaLabel("delete faxDisposition").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getFaxAccountFaxDispositions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.faxAccount.getDispositions(c.query,p).$promise},c.createOrEditFaxAccountFaxDisposition=function(e,t){o.show({controller:"CreateOrEditFaxDispositionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxAccounts/edit/faxDispositions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{faxAccount:c.faxAccount,faxDisposition:t,faxDispositions:c.faxAccountFaxDispositions.rows,license:null,setting:null}})},c.exportSelectedFaxAccountFaxDispositions=function(){var e=angular.copy(c.selectedFaxAccountFaxDispositions);return c.selectedFaxAccountFaxDispositions=[],e},c.deleteFaxAccountFaxDisposition=g,c.deleteSelectedFaxAccountFaxDispositions=function(e){var t=o.confirm().title("Are you sure want to delete the selected faxDispositions?").htmlContent("<b>"+c.selectedFaxAccountFaxDispositions.length+" selected</b> will be deleted.").ariaLabel("delete faxDispositions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedFaxAccountFaxDispositions.forEach(function(e){g(e)}),c.selectedFaxAccountFaxDispositions=[]})};var m=!0,u=1;function p(e){c.faxAccountFaxDispositions=e||{count:0,rows:[]}}function g(e){l.faxDisposition.delete({id:e.id}).$promise.then(function(){_.remove(c.faxAccountFaxDispositions.rows,{id:e.id}),c.faxAccountFaxDispositions.count-=1,c.faxAccountFaxDispositions.rows.length||c.getFaxAccountFaxDispositions(),r.success({title:"FaxDisposition deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETfaxAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfaxAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getFaxAccountFaxDispositions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.fax").controller("FaxAccountFaxDispositionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="FAX.EDIT_FAXDISPOSITION",m.faxDisposition=angular.copy(s),m.faxDispositions=o,m.newFaxDisposition=!1,m.faxDisposition||(m.faxDisposition={},m.title="FAX.NEW_FAXDISPOSITION",m.newFaxDisposition=!0),t.params.id&&(m.faxDisposition.FaxAccountId=t.params.id),m.addNewFaxDisposition=function(){m.errors=[],r.faxDisposition.save(m.faxDisposition).$promise.then(function(e){m.faxDispositions.unshift(e.toJSON()),i.success({title:"FaxDisposition properly created",msg:m.faxDisposition.name?m.faxDisposition.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.faxDisposition.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.faxDisposition.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveFaxDisposition=function(){m.errors=[],r.faxDisposition.update({id:m.faxDisposition.id},m.faxDisposition).$promise.then(function(e){var t=_.find(m.faxDispositions,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"FaxDisposition properly saved!",msg:m.faxDisposition.name?m.faxDisposition.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.faxDisposition.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.faxDisposition.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteFaxDisposition=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The faxDisposition will be deleted.").ariaLabel("Delete FaxDisposition").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.faxDisposition.delete({id:m.faxDisposition.id}).$promise.then(function(){_.remove(m.faxDispositions,{id:m.faxDisposition.id}),i.success({title:"FaxDisposition properly deleted!",msg:(m.faxDisposition.name||"faxDisposition")+" has been deleted!"}),u(m.faxDisposition)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.faxDisposition.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.faxDisposition.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","faxDispositions","faxDisposition","api","Auth","license","setting"],angular.module("app.fax").controller("CreateOrEditFaxDispositionDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.faxAccount={},c.faxAccountInteractions={count:0,rows:[]},c.selectedFaxAccountInteractions=[],c.query={fields:"createdAt,updatedAt,id,createdAt,Contact.firstName,Owner.name,closedAt,disposition,note,UserId,ContactId,FaxAccountId,tag",sort:"-createdAt",includeAll:"true",limit:10,page:1},c.init=function(e){c.faxAccount=e,c.query.id=c.faxAccount.id,c.getFaxAccountInteractions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the interaction?").htmlContent("<b>"+(e.name||"interaction")+"</b> will be deleted.").ariaLabel("delete interaction").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getFaxAccountInteractions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.faxAccount.getInteractions(c.query,p).$promise},c.createOrEditFaxAccountInteraction=function(e,t){o.show({controller:"CreateOrEditInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxAccounts/edit/interactions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{faxAccount:c.faxAccount,interaction:t,interactions:c.faxAccountInteractions.rows,license:null,setting:null}})},c.spyfaxInteraction=function(e,n){o.show({controller:"AgentGeneralInteractionController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/agent.general.interaction.dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,onShowing:function(e,t){e.vm.init({id:1,channel:"fax",interaction:n,spy:!0})}})},c.exportSelectedFaxAccountInteractions=function(){var e=angular.copy(c.selectedFaxAccountInteractions);return c.selectedFaxAccountInteractions=[],e},c.deleteFaxAccountInteraction=g,c.deleteSelectedFaxAccountInteractions=function(e){var t=o.confirm().title("Are you sure want to delete the selected interactions?").htmlContent("<b>"+c.selectedFaxAccountInteractions.length+" selected</b> will be deleted.").ariaLabel("delete interactions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedFaxAccountInteractions.forEach(function(e){g(e)}),c.selectedFaxAccountInteractions=[]})};var m=!0,u=1;function p(e){c.faxAccountInteractions=e||{count:0,rows:[]}}function g(e){l.faxInteraction.delete({id:e.id}).$promise.then(function(){_.remove(c.faxAccountInteractions.rows,{id:e.id}),c.faxAccountInteractions.count-=1,c.faxAccountInteractions.rows.length||c.getFaxAccountInteractions(),r.success({title:"Interaction deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETfaxAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfaxAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getFaxAccountInteractions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.fax").controller("FaxAccountInteractionsController",e)}(),function(){"use strict";function e(n,e,t,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=e.protocol()+"://"+e.host(),c.faxAccount=d||n.params.faxAccount||{},c.selectedTab=n.params.tab||0,c.gotogoto=function(e,t){n.go("app.fax.realtime.accounts",{})},c.alert=r.info,c.gotoFaxAccounts=function(){n.go("app.fax.faxAccounts")},c.saveFaxAccount=function(){s.faxAccount.updateAccountApplications(c.faxAccount).$promise.then(function(){r.success({title:"FaxAccount updated!",msg:c.faxAccount.name?c.faxAccount.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfaxAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.trunk.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.trunks=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.lists=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","faxAccount"],angular.module("app.fax").controller("FaxAccountController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.faxAccounts=r||{count:0,rows:[]},v.table="faxAccounts",v.listOrder="",v.listOrderAsc=null,v.selectedFaxAccounts=[],v.query={fields:"createdAt,updatedAt,id,name,key,headerinfo,TrunkId,localstationid,ListId,waitForTheAssignedAgent,description,ecm,minrate,maxrate,modem,gateway,faxdetect,t38timeout,tech,acceptMethod,acceptUrl,rejectMethod,rejectUrl,closeMethod,closeUrl,notificationSound,notificationShake,notificationTemplate",sort:"-updatedAt",limit:10,page:1},v.arrayecm=_.keyBy([{option:"yes",value:"'yes'"},{option:"no",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayminrate=_.keyBy([{option:"2400",value:"'2400'"},{option:"4800",value:"'4800'"},{option:"7200",value:"'7200'"},{option:"9600",value:"'9600'"},{option:"12000",value:"'12000'"},{option:"14400",value:"'14400'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraymaxrate=_.keyBy([{option:"2400",value:"'2400'"},{option:"4800",value:"'4800'"},{option:"7200",value:"'7200'"},{option:"9600",value:"'9600'"},{option:"12000",value:"'12000'"},{option:"14400",value:"'14400'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraytech=_.keyBy([{option:"SIP",value:"'SIP'"},{option:"IAX",value:"'IAX'"},{option:"DADHI",value:"'DADHI'"},{option:"KHOMP",value:"'KHOMP'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayacceptMethod=_.keyBy([{option:"HTTP GET",value:"'GET'"},{option:"HTTP POST",value:"'POST'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayrejectMethod=_.keyBy([{option:"HTTP GET",value:"'GET'"},{option:"HTTP POST",value:"'POST'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraycloseMethod=_.keyBy([{option:"HTTP GET",value:"'GET'"},{option:"HTTP POST",value:"'POST'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.fax.faxAccounts.edit",{id:e.id,faxAccount:e})},v.interactionsgoto=function(e,t){n.go("app.fax.faxAccounts.edit",{id:e.id,tab:5})},v.gotorealtimegoto=function(e,t){n.go("app.fax.realtime.accounts",{})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the faxAccount?").htmlContent("<b>"+(e.name||"faxAccount")+"</b> will be deleted.").ariaLabel("delete faxAccount").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getFaxAccounts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.faxAccount.get(v.query,f).$promise},v.createOrEditFaxAccount=function(e,t){i.show({controller:"CreateOrEditFaxAccountDialogController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxAccounts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{faxAccount:t,faxAccounts:v.faxAccounts.rows,license:v.license,setting:v.setting}})},v.deleteFaxAccount=A,v.exportSelectedFaxAccounts=function(){var e=angular.copy(v.selectedFaxAccounts);return v.selectedFaxAccounts=[],e},v.deleteSelectedFaxAccounts=function(e){var t=i.confirm().title("Are you sure want to delete the selected faxAccounts?").htmlContent("<b>"+v.selectedFaxAccounts.length+" selected</b> will be deleted.").ariaLabel("delete FaxAccounts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedFaxAccounts.forEach(function(e){A(e)}),v.selectedFaxAccounts=[]})},v.deselectFaxAccounts=function(){v.selectedFaxAccounts=[]},v.selectAllFaxAccounts=function(){v.selectedFaxAccounts=v.faxAccounts.rows},l.trunk.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.trunks=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.lists=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.faxAccounts=e||{count:0,rows:[]}}function A(e){l.faxAccount.delete({id:e.id}).$promise.then(function(){_.remove(v.faxAccounts.rows,{id:e.id}),v.faxAccounts.count-=1,v.faxAccounts.rows.length||v.getFaxAccounts(),c.success({title:"FaxAccount deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEfaxAccount"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEfaxAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getFaxAccounts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","faxAccounts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.fax").controller("FaxAccountsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="FAX.EDIT_FAXQUEUE",m.faxQueue=angular.copy(s),m.faxQueues=o,m.newFaxQueue=!1,m.faxQueue||(m.faxQueue={strategy:"beepall",timeout:10},m.title="FAX.NEW_FAXQUEUE",m.newFaxQueue=!0),m.addNewFaxQueue=function(){m.errors=[],r.faxQueue.save(m.faxQueue).$promise.then(function(e){m.faxQueues.unshift(e.toJSON()),i.success({title:"FaxQueue properly created",msg:m.faxQueue.name?m.faxQueue.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.faxQueue.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.faxQueue.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveFaxQueue=function(){m.errors=[],r.faxQueue.update({id:m.faxQueue.id},m.faxQueue).$promise.then(function(e){var t=_.find(m.faxQueues,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"FaxQueue properly saved!",msg:m.faxQueue.name?m.faxQueue.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.faxQueue.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.faxQueue.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteFaxQueue=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The faxQueue will be deleted.").ariaLabel("Delete FaxQueue").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.faxQueue.delete({id:m.faxQueue.id}).$promise.then(function(){_.remove(m.faxQueues,{id:m.faxQueue.id}),i.success({title:"FaxQueue properly deleted!",msg:(m.faxQueue.name||"faxQueue")+" has been deleted!"}),u(m.faxQueue)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.faxQueue.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.faxQueue.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","faxQueues","faxQueue","api","Auth","license","setting"],angular.module("app.fax").controller("CreateOrEditFaxQueueDialogController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r){var l=this;function d(){return a.faxQueue[l.isVoiceRealtime()?"getMembers":"getAgents"]({id:l.faxQueue.id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){return l.isVoiceRealtime()?l.selectedItems=e.rows?_.map(e.rows,function(e){return e.id=e.UserId,e.fullname=e.membername,e.penalty=e.hasOwnProperty("penalty")?"penalty "+e.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[]:l.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserFaxQueue?"penalty "+e.UserFaxQueue.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.selectedItems=l.selectedItems,r.hasRole("admin")?a.user.get({fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise:a.user.getAgents({id:r.getCurrentUser().id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise}).then(function(e){l.items=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserFaxQueue?"penalty "+e.UserFaxQueue.penalty:"",e.internal=e.internal?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.items=_.differenceBy(l.items,l.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETUSERS.GETAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}l.faxQueue=t,l.penalty=0,l.items=[],l.selectedItems=[],l.closeDialog=function(){e.hide()},l.isVoiceRealtime=function(){return o},l.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"penalty",labelAll:s.instant("FAX.ALL_AGENTS"),labelSelected:s.instant("FAX.SELECTED_AGENTS"),transferCallback:function(e,t){a.faxQueue[t?"removeAgents":"addAgents"]({id:l.faxQueue.id,ids:_.map(e,l.isVoiceRealtime()&&t?"UserId":"id"),penalty:l.penalty||0,realtime:o||!1}).$promise.then(function(){n.success({title:"FaxQueue properly "+(t?"removed":"added"),msg:"FaxQueue has been "+(t?"removed":"added")+"!"}),t||d()}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:faxQueue.ADDAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d()}e.$inject=["$mdDialog","toasty","api","faxQueue","faxQueues","realtime","$translate","Auth"],angular.module("app.fax").controller("FaxQueueagentaddController",e)}(),function(){"use strict";function e(e,n,a,t,i){var o=this;o.faxQueue=t,o.penalty=0,o.items=[],o.selectedItems=[],o.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("FAX.ALL_TEAMS"),labelSelected:i.instant("FAX.SELECTED_TEAMS"),transferCallback:function(e,t){a.faxQueue[t?"removeTeams":"addTeams"]({id:o.faxQueue.id,ids:_.map(e,"id"),penalty:o.penalty||0}).$promise.then(function(){n.success({title:"Team properly "+(t?"removed":"added"),msg:"Team has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:faxQueue.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},o.closeDialog=function(){e.hide()},a.faxQueue.getTeams({id:o.faxQueue.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return o.selectedItems=e.rows?e.rows:[],o.dualMultiselectOptions.selectedItems=o.selectedItems,a.team.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){o.items=e.rows?e.rows:[],o.dualMultiselectOptions.items=_.differenceBy(o.items,o.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","faxQueue","$translate"],angular.module("app.fax").controller("FaxQueueteamaddController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.faxQueue=d||e.params.faxQueue||{},c.selectedTab=e.params.tab||0,c.teamadddialog=function(e,t){n.show({controller:"FaxQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxQueues/edit/teamadd/teamadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{faxQueue:e,faxQueues:c.faxQueues?c.faxQueues.rows:[]}})},c.agentadddialog=function(e,t){n.show({controller:"FaxQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxQueues/edit/agentadd/agentadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{faxQueue:e,faxQueues:c.faxQueues?c.faxQueues.rows:[],realtime:!1}})},c.alert=r.info,c.gotoFaxQueues=function(){e.go("app.fax.faxQueues")},c.saveFaxQueue=function(){s.faxQueue.update({id:c.faxQueue.id},c.faxQueue).$promise.then(function(){r.success({title:"FaxQueue updated!",msg:c.faxQueue.name?c.faxQueue.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfaxQueue",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","faxQueue"],angular.module("app.fax").controller("FaxQueueController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.faxQueues=r||{count:0,rows:[]},v.table="faxQueues",v.listOrder="",v.listOrderAsc=null,v.selectedFaxQueues=[],v.query={fields:"createdAt,updatedAt,id,name,strategy,timeout,description",sort:"-updatedAt",limit:10,page:1},v.arraystrategy=_.keyBy([{option:"Beepall",value:"'beepall'"},{option:"RR Memory",value:"'rrmemory'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.fax.faxQueues.edit",{id:e.id,faxQueue:e})},v.teamadddialog=function(e,t){i.show({controller:"FaxQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxQueues/edit/teamadd/teamadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{faxQueue:e,faxQueues:v.faxQueues?v.faxQueues.rows:[]}})},v.agentadddialog=function(e,t){i.show({controller:"FaxQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxQueues/edit/agentadd/agentadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{faxQueue:e,faxQueues:v.faxQueues?v.faxQueues.rows:[],realtime:!1}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the faxQueue?").htmlContent("<b>"+(e.name||"faxQueue")+"</b> will be deleted.").ariaLabel("delete faxQueue").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.gotorealtimegoto=function(e,t){n.go("app.fax.realtime.queues",{})},v.success=f,v.getFaxQueues=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.faxQueue.get(v.query,f).$promise},v.createOrEditFaxQueue=function(e,t){i.show({controller:"CreateOrEditFaxQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxQueues/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{faxQueue:t,faxQueues:v.faxQueues.rows,license:v.license,setting:v.setting}})},v.deleteFaxQueue=A,v.exportSelectedFaxQueues=function(){var e=angular.copy(v.selectedFaxQueues);return v.selectedFaxQueues=[],e},v.deleteSelectedFaxQueues=function(e){var t=i.confirm().title("Are you sure want to delete the selected faxQueues?").htmlContent("<b>"+v.selectedFaxQueues.length+" selected</b> will be deleted.").ariaLabel("delete FaxQueues").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedFaxQueues.forEach(function(e){A(e)}),v.selectedFaxQueues=[]})},v.deselectFaxQueues=function(){v.selectedFaxQueues=[]},v.selectAllFaxQueues=function(){v.selectedFaxQueues=v.faxQueues.rows};var h=!0,b=1;function f(e){v.faxQueues=e||{count:0,rows:[]}}function A(e){l.faxQueue.delete({id:e.id}).$promise.then(function(){_.remove(v.faxQueues.rows,{id:e.id}),v.faxQueues.count-=1,v.faxQueues.rows.length||v.getFaxQueues(),c.success({title:"FaxQueue deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEfaxQueue"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEfaxQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getFaxQueues())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","faxQueues","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.fax").controller("FaxQueuesController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d){var c=this;function m(){_.forIn(c.faxAccounts,function(e,t){c.rpcFaxAccounts[t]&&_.merge(e,c.rpcFaxAccounts[t])}),_.forIn(c.faxAccounts,function(t,e){var n={id:e,sort:"-id",direction:"in",limit:1,offset:0,$gte:"createdAt,"+moment().startOf("day").format("YYYY-MM-DD HH:mm:ss")};o.faxAccount.getMessages(n).$promise.then(function(e){return e&&(t.in=e.count||0,t.lastIn=e.rows&&e.rows.length?e.rows[0].createdAt:void 0),n.direction="out",o.faxAccount.getMessages(n).$promise}).then(function(e){e&&(t.out=e.count||0,t.lastOut=e.rows&&e.rows.length?e.rows[0].createdAt:void 0)}).catch(function(e){console.log(e)})})}c.count=l&&l.count?l.count:0,c.faxAccounts=l?_.keyBy(l.rows?l.rows:[],"id"):{},c.rpcFaxAccounts=d?_.keyBy(d.rows?d.rows:[],"id"):{},c.query={sort:"-name",limit:10,page:1},c.success=g,c.$onInit=m,c.getFaxAccounts=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=o.faxAccount.get(c.query,g).$promise},c.onSave=function(e){c.faxAccounts[e.id]&&_.merge(c.faxAccounts[e.id],e)},c.onFaxMessageSave=function(e){c.faxAccounts[e.FaxAccountId]&&("in"==e.direction?(c.faxAccounts[e.FaxAccountId].in+=1,c.faxAccounts[e.FaxAccountId].lastIn=e.createdAt):(c.faxAccounts[e.FaxAccountId].out+=1,c.faxAccounts[e.FaxAccountId].lastOut=e.createdAt))},c.goToFaxAccount=function(e,t){i.go("app.fax.faxAccounts.edit",{id:t.id,faxAccount:t})},c.order=[],_.forIn(c.faxAccounts,function(e,t){c.order.push(e.id)}),s.on("faxAccount:save",c.onSave),s.on("faxAccount:update",c.onSave),s.on("faxMessage:save",c.onFaxMessageSave);var u=!0,p=1;function g(e){if(c.faxAccounts=e?_.keyBy(e.rows?e.rows:[],"id"):{},e.rows){c.order=[];for(var t=0;t<e.rows.length;t++)c.order.push(e.rows[t].id)}m()}e.$watch("vm.query.filter",function(e,t){u?n(function(){u=!1}):(t||(p=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=p),c.getFaxAccounts())}),e.$on("$destroy",function(){s.removeAllListeners("faxAccount:save"),s.removeAllListeners("faxAccount:update"),s.removeAllListeners("faxMessage:save")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$state","api","socket","toasty","faxAccounts","rpcFaxAccounts"],angular.module("app.fax").controller("FaxAccountsRealtimeController",e)}(),function(){"use strict";function e(e,s,t,n,a,i,o,r,l,d,c,m,u,p,g,v){var h=this,b=["userpic","online","lastLoginAt","lastPauseAt","pauseType","lastPauseAt","internal","address","chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","chatCapacity","openchannelCapacity","mailCapacity","smsCapacity","faxCapacity","chatCurrentCapacity","openchannelCurrentCapacity","mailCurrentCapacity","smsCurrentCapacity","faxCurrentCapacity","chatStatus","openchannelStatus","mailStatus","smsStatus","faxStatus","voiceStatus","chatStatusTime","openchannelStatusTime","mailStatusTime","smsStatusTime","faxStatusTime","voiceStatusTime","queue","destconnectedlinenum"],f=["chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","online"];for(var A in h.availableStates=["ringing","inuse","busy","onhold","not_inuse"],h.pauses=o||{count:0,rows:[]},h.license=g,h.agents=r?_.keyBy(r.rows?r.rows:[],"id"):{},h.rpcAgents=l?_.keyBy(l.rows?l.rows:[],"id"):{},h.paginatedAgents={},h.load=!1,h.order=[],h.agentInternal={},h.agents)h.agents.hasOwnProperty(A)&&(h.agents[A].init=!0);h.query={limit:10,page:1,order:"fullname",globalStatusFilter:"",pauseTypeFilter:""},h.logout=function(e,t){return d.user.logout({id:e.id}).$promise.then(function(){m.success({title:"Agent logout",msg:e.fullname+"  properly logout"}),h.agents[e.id]&&(h.agents[e.id].online=!1),h.rpcAgents[e.id]&&(h.rpcAgents[e.id].online=!1),y()}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.queueAdd=function(e,t){n.show({controller:"AgentqueueaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/queueadd/queueadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{agent:e,agents:[],channel:"fax",realtime:!0,direction:"inbound"}})},h.pause=function(t,e){return d.user.pause({id:t.id,type:e}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.unPause=function(t){return d.user.unpause({id:t.id}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.showInfo=function(e){n.show(n.alert().clickOutsideToClose(!0).title("Legend").htmlContent("<div>TODO legend status + state</div>").ok("Ok").targetEvent(e))},h.getAgentStatus=C,h.getAgentGlobalStatus=x,h.isPause=S,h.checkPause=function(e){return"pause"===e},h.isPartialPause=function(e){return"*pause"===e},h.onSave=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(_.omit(e,f),b)),_.merge(h.rpcAgents[e.id],_.pick(_.omit(e,f),b)),x(h.agents[e.id]))},h.onUpdate=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(e,b)),_.merge(h.rpcAgents[e.id],_.pick(e,b)),x(h.agents[e.id]))},h.onInit=y,h.onConnect=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(_.merge(h.agents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])),_.merge(h.rpcAgents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])))},h.onComplete=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(h.agents[h.agentInternal[e.destaccountcode]]=_.omit(h.agents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]),h.rpcAgents[h.agentInternal[e.destaccountcode]]=_.omit(h.rpcAgents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]))},c.on("user:save",h.onSave),c.on("user:update",h.onUpdate),c.on("user:agentconnect",h.onConnect),c.on("user:agentcomplete",h.onComplete),y();var E=v(function(){h.load&&(h.load=!1,y())},999);function y(e){h.load=!1;var t,n,a=s.defer();h.promise=a.promise,h.filteredAgents=[],h.order=[],_.forIn(h.agents,function(e,t){h.rpcAgents[t]&&_.merge(e,_.pick(_.omit(h.rpcAgents[t],f),b)),x(e),e.online?(h.filteredAgents.push(e),h.agentInternal[e.internal]=t):e.globalStatusTime=_.toNumber(moment().format("x"))}),h.query.globalStatusFilter&&_.remove(h.filteredAgents,function(e){return e.globalStatus!==h.query.globalStatusFilter}),h.query.pauseTypeFilter&&_.remove(h.filteredAgents,function(e){return e.pauseType!==h.query.pauseTypeFilter}),h.query.filter&&_.remove(h.filteredAgents,function(e){return e.fullname.toLowerCase().indexOf(h.query.filter.toLowerCase())<0}),h.filteredAgents=(t=h.filteredAgents,n=_.startsWith(h.query.order,"-")?"desc":"asc",_.orderBy(t,[h.query.order.replace("-","")],[n]));var i=(h.query.page-1)*h.query.limit;h.paginatedAgents=_.drop(h.filteredAgents,i).slice(0,h.query.limit);for(var o=0;o<h.paginatedAgents.length;o+=1)h.order.push(h.paginatedAgents[o].id);a.resolve(),h.load=!0}function S(e){return"pause"===e||"*pause"===e}function T(e){return"idle"===e||"unknown"===e||"unavailable"===e||"ringing"===e||_.isNil(e)}function C(e,t){return"voice"===t?"idle"!==e[t+"Status"]?e[t+"Status"]:e[t+"Pause"]?e[t+"Status"]="pause":"idle":e[t+"Pause"]?e[t+"Status"]="pause":e[t+"Status"]}function x(e){var t="unknown";t=_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"pause":_.some([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"*pause":_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],T)?"idle":"busy",e.globalStatus!==t&&(e.globalStatus=t,e.init?(e.init=!1,e.globalStatusTime=S(t)?_.toNumber(moment(e.lastPauseAt).format("x")):_.max([e.voiceStatusTime,e.chatStatusTime,e.mailStatusTime,e.smsStatusTime,e.openchannelStatusTime,e.faxStatusTime])):e.globalStatusTime=_.toNumber(moment().format("x")))}e.$on("$destroy",function(){c.removeAllListeners("user:save"),c.removeAllListeners("user:update"),c.removeAllListeners("user:agentconnect"),c.removeAllListeners("user:agentcomplete"),E&&(v.cancel(E),E=null)})}e.$inject=["$scope","$q","$timeout","$mdDialog","$document","$filter","pauses","agents","rpcAgents","api","socket","toasty","helperClasses","Auth","license","$interval"],angular.module("app.voice").controller("AgentsFaxRealtimeController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r,l,d,c,m){var u=this,p=["loggedIn","available","waiting","talking","pTalking","originated","message","dialActive","dialMethod","Trunk","paused"];function g(){var n=[];return _.forIn(u.queues,function(e,t){e.paused=0,e.loggedInDb=0,u.queues[t].agents={},n.push(l.faxQueue.getMembers({id:t}).$promise),u.rpcQueues[t]&&_.merge(e,_.pick(u.rpcQueues[t],p))}),t.all(n).then(function(e){for(var t=0;t<e.length;t+=1)for(var n=0;n<e[t].rows.length;n++)e[t].rows[n].paused&&u.queues[e[t].rows[n].FaxQueueId].paused++,u.queues[e[t].rows[n].FaxQueueId].loggedInDb++,u.queues[e[t].rows[n].FaxQueueId].agents[e[t].rows[n].UserId]=e[t].rows[n].FaxQueueId}).catch(function(e){console.error(e)})}u.count=s.count?s.count:0,u.queues=s?_.keyBy(s.rows?s.rows:[],"id"):{},u.rpcQueues=r?_.keyBy(r.rows?r.rows:[],"id"):{},m.hasRole("admin")?u.query={type:"inbound",sort:"-updatedAt",limit:10,page:1}:u.query={id:m.getCurrentUser().id,channel:"fax",type:"inbound",sort:"-updatedAt",limit:10,page:1},u.success=b,u.getQueues=function(){u.query.offset=(u.query.page-1)*u.query.limit,m.hasRole("admin")?u.promise=l.faxQueue.get(u.query,b).$promise:u.promise=l.user.getQueues(u.query,b).$promise},u.createOrEditFaxQueue=function(e,t){a.show({controller:"CreateOrEditFaxQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxQueues/create/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{faxQueue:t,faxQueues:_.values(u.queues),license:null,setting:null}})},u.agentAdd=function(e,t){a.show({controller:"FaxQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/fax/views/faxQueues/edit/agentadd/agentadd.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{faxQueue:t,faxQueues:u.queues?u.queues.rows:[],realtime:!1}})},u.updateQueue=function(e){return l.faxQueue.update(e).$promise.then(function(){c.success({title:"Queue properly updated!",msg:e.name?e.name+" has been updated!":""})}).catch(function(e){c.error({title:"Error creating queue!",msg:e.message})})},u.onSave=function(e){u.queues[e.id]&&_.merge(u.queues[e.id],_.pick(e,p))},u.onSaveMember=function(e){u.queues[e.FaxQueueId]&&u.queues[e.FaxQueueId].loggedInDb++},u.onRemoveMember=function(e){u.queues[e.FaxQueueId]&&u.queues[e.FaxQueueId].loggedInDb--},u.onPause=function(n){console.log("onPause",n),n.voicePause?_.forIn(u.queues,function(e,t){e.agents[n.id]&&(e.paused+=1,console.log("pause"))}):n.voicePause||_.forIn(u.queues,function(e,t){e.agents[n.id]&&0<e.paused&&(e.paused-=1,console.log("unpause"))})},u.onLogin=function(e){console.log("onLogged",e),u.queues[e.FaxQueueId]&&(u.queues[e.FaxQueueId].loggedInDb+=1,u.queues[e.FaxQueueId].agents[e.UserId]=e.FaxQueueId)},u.onLogout=function(e){console.log("onLogout",e),u.queues[e.FaxQueueId]&&0<u.queues[e.FaxQueueId].loggedInDb&&(u.queues[e.FaxQueueId].loggedInDb-=1,delete u.queues[e.FaxQueueId].agents[e.UserId])},u.$onInit=g,u.order=[],_.forIn(u.queues,function(e,t){u.order.push(e.id)}),d.on("fax_queue:save",u.onSave),d.on("userFaxQueue:save",u.onSaveMember),d.on("userFaxQueue:remove",u.onRemoveMember),d.on("user:update",u.onPause),d.on("userVoiceQueue:remove",u.onLogout),d.on("userVoiceQueue:save",u.onLogin);var v=!0,h=1;function b(e){if(u.count=e.count,u.queues=e?_.keyBy(e.rows?e.rows:[],"id"):{},e.rows){u.order=[];for(var t=0;t<e.rows.length;t++)u.order.push(e.rows[t].id)}g()}e.$watch("vm.query.filter",function(e,t){v?n(function(){v=!1}):(t||(h=u.query.page),e!==t&&(u.query.page=1),e||(u.query.page=h),u.getQueues())}),e.$on("$destroy",function(){d.removeAllListeners("fax_queue:save"),d.removeAllListeners("userFaxQueue:remove"),d.removeAllListeners("userFaxQueue:save"),d.removeAllListeners("user:update"),d.removeAllListeners("userVoiceQueue:remove"),d.removeAllListeners("userVoiceQueue:save")})}e.$inject=["$scope","$timeout","$mdDialog","$q","$document","$interval","queues","rpcQueues","api","socket","toasty","Auth"],angular.module("app.fax").controller("QueuesFaxRealtimeController",e)}(),function(){"use strict";angular.module("app.auth").factory("helperClasses",function(){return{status:{registered:"green-300-fg icon-checkbox-marked-circle",unregistered:"red-300-fg icon-close-circle",lagged:"red-300-fg icon-close-circle",reachable:"green-300-fg icon-checkbox-marked-circle",unreachable:"red-300-fg icon-close-circle",unknown:"grey-fg icon-minus-circle"},state:{unknown:"grey-fg icon-phone-hangup",not_inuse:"green-300-fg icon-phone-hangup",inuse:"red-300-fg icon-phone-in-talk",busy:"red-300-fg icon-phone-locked",invalid:"grey-fg icon-phone-hangup",unavailable:"grey-fg icon-phone-hangup",ringing:"blue-300-fg icon-phone-incoming",ringinuse:"blue-300-fg icon-phone-incoming",onhold:"blue-300-fg icon-phone-paused"},channelStatus:{ring:"blue-300-fg icon-phone-incoming",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"},channelStatusOut:{ring:"blue-300-fg icon-phone-outgoing",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"}}})}(),function(){"use strict";function e(e,n,t){switch(t.disconnect(),t.connect(),this.selectedTab=0,n.current.name){case"app.fax.realtime.agents":this.selectedTab=0;break;case"app.fax.realtime.trunks":this.selectedTab=1;break;case"app.fax.realtime.queues":this.selectedTab=2;break;case"app.fax.realtime.accounts":this.selectedTab=3;break;default:this.selectedTab=0,n.go("app.fax.realtime.agents")}e.$watch("vm.selectedTab",function(e,t){if(e!==t)switch(e){case 0:n.go("app.fax.realtime.agents");break;case 1:n.go("app.fax.realtime.trunks");break;case 2:n.go("app.fax.realtime.queues");break;case 3:n.go("app.fax.realtime.accounts");break;default:n.go("app.fax.realtime.agents")}})}e.$inject=["$scope","$state","socket"],angular.module("app.fax").controller("FaxRealtimeController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l){var d=this,c=["status","stateRegistry","registry","host","port","internal","state","status"];function m(){for(var e,t=0;t<d.trunks.length;t+=1)0<=(e=_.findIndex(d.rpcTrunks,["id",d.trunks[t].id]))&&_.merge(d.trunks[t],_.pick(d.rpcTrunks[e],c))}function u(e,t,n){0<=t&&_.merge(e[t],_.pick(n,c))}d.count=a.count,d.trunks=a?a.rows:[],d.rpcTrunks=i&&i.rows?i.rows:[],d.query={fields:"id,name",active:!0,sort:"-updatedAt",limit:10,page:1},d.statusClass=r.status,d.stateClass=r.state,d.success=v,d.$onInit=m,d.showInfo=function(e){t.show(t.alert().clickOutsideToClose(!0).title("Legend").htmlContent("<div>TODO legend status + state</div>").ok("Ok").targetEvent(e))},d.getTrunks=function(){d.query.offset=(d.query.page-1)*d.query.limit,d.promise=o.trunk.get(d.query,v).$promise},d.goToTrunk=function(e,t){l.go("app.tools.trunks.edit",{id:t.id})},d.onSave=function(e){var t=_.findIndex(d.trunks,["id",e.id]),n=_.findIndex(d.rpcTrunks,["id",e.id]);u(d.trunks,t,e),u(d.rpcTrunks,n,e)},s.on("trunk:save",d.onSave);var p=!0,g=1;function v(e){d.count=e.count,d.trunks=e&&e.rows?e.rows:[],m()}e.$watch("vm.query.filter",function(e,t){p?n(function(){p=!1}):(t||(g=d.query.page),e!==t&&(d.query.page=1),e||(d.query.page=g),d.getTrunks())}),e.$on("$destroy",function(){s.removeAllListeners("trunk:save")})}e.$inject=["$scope","$timeout","$mdDialog","trunks","rpcTrunks","api","socket","helperClasses","$state"],angular.module("app.fax").controller("TrunksFaxRealtimeController",e)}(),function(){"use strict";function e(e,t){this.info=e,this.license=t}e.$inject=["info","license"],angular.module("app.help.about").controller("AboutController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_DESKACCOUNT",m.deskAccount=angular.copy(s),m.deskAccounts=o,m.newDeskAccount=!1,m.deskAccount||(m.deskAccount={type:"integrationTab",authType:"basic",serverUrl:n.protocol()+"://"+n.host()+(n.port()?":"+n.port():"")},m.title="INTEGRATIONS.NEW_DESKACCOUNT",m.newDeskAccount=!0),m.addNewDeskAccount=function(){m.errors=[],r.intDeskAccount.save(m.deskAccount).$promise.then(function(e){m.deskAccounts.unshift(e.toJSON()),i.success({title:"DeskAccount properly created",msg:m.deskAccount.name?m.deskAccount.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intDeskAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intDeskAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveDeskAccount=function(){m.errors=[],r.intDeskAccount.update({id:m.deskAccount.id},m.deskAccount).$promise.then(function(e){var t=_.find(m.deskAccounts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"DeskAccount properly saved!",msg:m.deskAccount.name?m.deskAccount.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intDeskAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intDeskAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteDeskAccount=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The deskAccount will be deleted.").ariaLabel("Delete DeskAccount").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intDeskAccount.delete({id:m.deskAccount.id}).$promise.then(function(){_.remove(m.deskAccounts,{id:m.deskAccount.id}),i.success({title:"DeskAccount properly deleted!",msg:(m.deskAccount.name||"deskAccount")+" has been deleted!"}),u(m.deskAccount)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intDeskAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intDeskAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","deskAccounts","deskAccount","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditDeskAccountDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.deskAccounts=r||{count:0,rows:[]},v.table="deskAccounts",v.listOrder="",v.listOrderAsc=null,v.selectedDeskAccounts=[],v.query={fields:"createdAt,updatedAt,id,name,type,remoteUri,authType,username,password,serverUrl,description",limit:10,page:1},v.arraytype=_.keyBy([{option:"Integration_Tab",value:"'integrationTab'"},{option:"New_Tab",value:"'newTab'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayauthType=_.keyBy([{option:"Basic",value:"'basic'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.integrations.deskAccounts.edit",{id:e.id,deskAccount:e})},v.testtestintegrationaccount=function(e,t){return l.intDeskAccount.getFields({id:e.id,test:!0}).$promise.then(function(){c.success({title:"DeskAccount properly tested",msg:"Connection succeded!"})}).catch(function(e){c.error({title:"DeskAccount properly tested",msg:e.data?e.data.message?e.data.message:JSON.stringify(e.data):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the deskAccount?").htmlContent("<b>"+(e.name||"deskAccount")+"</b> will be deleted.").ariaLabel("delete deskAccount").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getDeskAccounts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.intDeskAccount.get(v.query,f).$promise},v.createOrEditDeskAccount=function(e,t){i.show({controller:"CreateOrEditDeskAccountDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/deskAccounts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{deskAccount:t,deskAccounts:v.deskAccounts.rows,license:v.license,setting:v.setting}})},v.deleteDeskAccount=A,v.exportSelectedDeskAccounts=function(){var e=angular.copy(v.selectedDeskAccounts);return v.selectedDeskAccounts=[],e},v.deleteSelectedDeskAccounts=function(e){var t=i.confirm().title("Are you sure want to delete the selected deskAccounts?").htmlContent("<b>"+v.selectedDeskAccounts.length+" selected</b> will be deleted.").ariaLabel("delete DeskAccounts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedDeskAccounts.forEach(function(e){A(e)}),v.selectedDeskAccounts=[]})},v.deselectDeskAccounts=function(){v.selectedDeskAccounts=[]},v.selectAllDeskAccounts=function(){v.selectedDeskAccounts=v.deskAccounts.rows};var h=!0,b=1;function f(e){v.deskAccounts=e||{count:0,rows:[]}}function A(e){l.intDeskAccount.delete({id:e.id}).$promise.then(function(){_.remove(v.deskAccounts.rows,{id:e.id}),v.deskAccounts.count-=1,v.deskAccounts.rows.length||v.getDeskAccounts(),c.success({title:"DeskAccount deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEintDeskAccount"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEintDeskAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getDeskAccounts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","deskAccounts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.integrations").controller("DeskAccountsController",e)}(),function(){"use strict";function e(a,n,i,o,e){var s=this;function r(e){i.intDeskField.delete({id:e.id}).$promise.then(function(){_.remove(s.subjects,{id:e.id}),o.success({title:"Subject deleted!",msg:"Subject has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function l(e){i.intDeskField.delete({id:e.id}).$promise.then(function(){_.remove(s.descriptions,{id:e.id}),o.success({title:"Description deleted!",msg:"Description has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function d(e){i.intDeskField.delete({id:e.id}).$promise.then(function(){_.remove(s.fields,{id:e.id}),o.success({title:"Field deleted!",msg:"Field has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}s.currentUser=e.getCurrentUser(),s.deskAccount={},s.deskConfiguration={},s.configurations=[],s.selectedDeskConfiguration=-1,s.init=function(e){s.deskAccount=e,i.intDeskAccount.getConfigurations({id:s.deskAccount.id,sort:"-updatedAt"}).$promise.then(function(e){return s.configurations=e.rows?e.rows:[],s.configurations.length&&s.getDeskConfiguration(0),i.variable.get({nolimit:!0,sort:"name"}).$promise}).then(function(e){s.variables=e.rows?e.rows:[],s.variablesById=_.keyBy(s.variables,"id")}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETCONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.getDeskConfiguration=function(e){s.deskConfiguration=s.configurations[e],s.selectedDeskConfiguration=e,i.intDeskConfiguration.getSubjects({id:s.deskConfiguration.id}).$promise.then(function(e){return s.subjects=e.rows?e.rows:[],i.intDeskConfiguration.getDescriptions({id:s.deskConfiguration.id}).$promise}).then(function(e){return s.descriptions=e.rows?e.rows:[],i.intDeskConfiguration.getFields({id:s.deskConfiguration.id}).$promise}).then(function(e){s.fields=e.rows?e.rows:[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),i.intDeskConfiguration.getTags({id:s.deskConfiguration.id}).$promise.then(function(e){s.selectedTags=e.rows?_.map(e.rows,"id"):[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.createOrEditDeskConfiguration=function(e,t){a.show({controller:"CreateOrEditDeskConfigurationDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/deskAccounts/edit/configurations/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{deskConfiguration:t,configurations:s.configurations,license:null,setting:null}}).finally(function(){s.getDeskConfiguration(0)})},s.deleteDeskConfiguration=function(e,t){var n=a.confirm().title("Are you sure want to delete the deskConfiguration?").htmlContent("<b>"+(t.name||"deskConfiguration")+"</b> will be deleted.").ariaLabel("delete deskConfiguration").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){i.intDeskConfiguration.delete({id:t.id}).$promise.then(function(){_.remove(s.configurations,{id:t.id}),o.success({title:"DeskConfiguration deleted!",msg:t.name?t.name+" has been deleted!":""})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})}).finally(function(){s.getDeskConfiguration(0)})},function(){console.log("CANCEL")})},s.selectChangedAdvanced=function(){return i.intSalesforceConfiguration.update({id:s.deskConfiguration.id},s.deskConfiguration).$promise.then(function(){o.success({title:"Module updated!",msg:"Module has been updated!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.selectedTags=[],s.selectTagsChanged=function(e){i.intDeskConfiguration.setTags({id:s.deskConfiguration.id,ids:s.selectedTags}).$promise.then(function(){o.success({title:"Tags set!",msg:"Tags has been set!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:ADDTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})})},i.tag.get({nolimit:!0,sort:"name"}).$promise.then(function(e){s.tags=e.rows?e.rows:[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.selectedSubjects=[],s.createOrEditSubject=function(e,t){a.show({controller:"CreateOrEditDeskAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/deskAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"subject",item:t,items:s.subjects,configuration:s.deskConfiguration,account:s.deskAccount,license:null,setting:null}})},s.deleteSubjectConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the subject?").htmlContent("<b>Subject</b> will be deleted.").ariaLabel("delete subject").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){r(t)},function(){console.log("CANCEL")})},s.deleteSelectedSubjects=function(e){var t=a.confirm().title("Are you sure want to delete the selected subjects?").htmlContent("<b>"+s.selectedSubjects.length+" selected</b> will be deleted.").ariaLabel("delete subjects").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedSubjects.forEach(function(e){r(e)}),s.selectedSubjects=[]})},s.selectedDescriptions=[],s.createOrEditDescription=function(e,t){a.show({controller:"CreateOrEditDeskAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/deskAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"description",item:t,items:s.descriptions,configuration:s.deskConfiguration,account:s.deskAccount,license:null,setting:null}})},s.deleteDescriptionConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the description?").htmlContent("<b>Description</b> will be deleted.").ariaLabel("delete description").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){l(t)},function(){console.log("CANCEL")})},s.deleteSelectedDescriptions=function(e){var t=a.confirm().title("Are you sure want to delete the selected descriptions?").htmlContent("<b>"+s.selectedDescriptions.length+" selected</b> will be deleted.").ariaLabel("delete descriptions").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedDescriptions.forEach(function(e){l(e)}),s.selectedDescriptions=[]})},s.selectedFields=[],s.createOrEditField=function(e,t){a.show({controller:"CreateOrEditDeskAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/deskAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"field",item:t,items:s.fields,configuration:s.deskConfiguration,account:s.deskAccount,license:null,setting:null}})},s.deleteFieldConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the field?").htmlContent("<b>Field</b> will be deleted.").ariaLabel("delete field").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){d(t)},function(){console.log("CANCEL")})},s.deleteSelectedFields=function(e){var t=a.confirm().title("Are you sure want to delete the selected fields?").htmlContent("<b>"+s.selectedFields.length+" selected</b> will be deleted.").ariaLabel("delete fields").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedFields.forEach(function(e){d(e)}),s.selectedFields=[]})}}e.$inject=["$mdDialog","$document","api","toasty","Auth"],angular.module("app.integrations").controller("DeskAccountConfigurationsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_DESKCONFIGURATION",m.deskConfiguration=angular.copy(s),m.configurations=o,m.newDeskConfiguration=!1,m.deskConfiguration||(m.deskConfiguration={channel:"voice",type:"inbound"},m.title="INTEGRATIONS.NEW_DESKCONFIGURATION",m.newDeskConfiguration=!0),m.addNewDeskConfiguration=function(){m.errors=[],r.intDeskAccount.addConfiguration({id:t.params.id},m.deskConfiguration).$promise.then(function(e){m.configurations.unshift(e.toJSON()),i.success({title:"DeskConfiguration properly created",msg:m.deskConfiguration.name?m.deskConfiguration.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intDeskConfiguration.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intDeskConfiguration.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveDeskConfiguration=function(){m.errors=[],r.intDeskConfiguration.update({id:m.deskConfiguration.id},m.deskConfiguration).$promise.then(function(e){var t=_.find(m.configurations,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"DeskConfiguration properly saved!",msg:m.deskConfiguration.name?m.deskConfiguration.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intDeskConfiguration.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intDeskConfiguration.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteDeskConfiguration=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The deskConfiguration will be deleted.").ariaLabel("Delete DeskConfiguration").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intDeskConfiguration.delete({id:m.deskConfiguration.id}).$promise.then(function(){_.remove(m.configurations,{id:m.deskConfiguration.id}),i.success({title:"DeskConfiguration properly deleted!",msg:(m.deskConfiguration.name||"deskConfiguration")+" has been deleted!"}),u(m.deskConfiguration)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intDeskConfiguration.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intDeskConfiguration.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configurations","deskConfiguration","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditDeskConfigurationDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(){a.hide()}m.errors=[],m.title="INTEGRATIONS.EDIT_"+_.toUpper(d),m.item=angular.copy(r),m.items=s,m.type=d,m.newItem=!1,m.item||(m.item={type:"string"},m.item[_.capitalize(d)+"Id"]=o.id,m.title="INTEGRATIONS.NEW_"+_.toUpper(d),m.newItem=!0),m.addNewItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intDeskField.save(m.item).$promise.then(function(e){m.items.unshift(e),i.success({title:_.capitalize(d)+" properly created",msg:_.capitalize(d)+" has been created!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.save"}]})},m.saveItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intDeskField.update({id:m.item.id},m.item).$promise.then(function(e){var t=_.find(m.items,{id:e.id});t&&_.merge(t,e),i.success({title:_.capitalize(d)+" properly saved!",msg:_.capitalize(d)+" has been saved!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.intItem.update"}]})},m.deleteItem=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The "+d+" will be deleted.").ariaLabel("Delete "+_.capitalize(d)).ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){c.intDeskField.delete({id:m.item.id}).$promise.then(function(){_.remove(m.items,{id:m.item.id}),i.success({title:_.capitalize(d)+" properly deleted!",msg:_.capitalize(d)+" has been deleted!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.delete"}]})},function(){})},m.getSelectedVariable=function(){return void 0!==m.item.variableName?m.item.variableName:"Please select a variable"},m.closeDialog=u,c.variable.get({nolimit:!0}).$promise.then(function(e){return m.variables=e.rows?e.rows:[],c.voiceAgentReport.describe().$promise}).then(function(e){return m.voiceAgentReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceAgentReportColumns.push("recordingURL"),c.voiceDialReport.describe().$promise}).then(function(e){m.voiceDialReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceDialReportColumns.push("recordingURL")}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETVARIABLES",msg:e.data?JSON.stringify(e.data):e.toString()})}),c.intDeskAccount.getFields({id:l.id}).$promise.then(function(e){m.accountConnected=!0,m.fields=e.rows?e.rows:[],m.item.idField&&(m.customField=_.find(m.fields,{id:m.item.idField}))}).catch(function(e){m.accountConnected=!1,console.error(e)})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configuration","items","item","account","type","api"],angular.module("app.integrations").controller("CreateOrEditDeskAccountItemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.deskAccount=d||e.params.deskAccount||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoDeskAccounts=function(){e.go("app.integrations.deskAccounts")},c.saveDeskAccount=function(){s.intDeskAccount.update({id:c.deskAccount.id},c.deskAccount).$promise.then(function(){r.success({title:"DeskAccount updated!",msg:c.deskAccount.name?c.deskAccount.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETintDeskAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","deskAccount"],angular.module("app.integrations").controller("DeskAccountController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_FRESHDESKACCOUNT",m.freshdeskAccount=angular.copy(s),m.freshdeskAccounts=o,m.newFreshdeskAccount=!1,m.freshdeskAccount||(m.freshdeskAccount={serverUrl:n.protocol()+"://"+n.host()+(n.port()?":"+n.port():"")},m.title="INTEGRATIONS.NEW_FRESHDESKACCOUNT",m.newFreshdeskAccount=!0),m.addNewFreshdeskAccount=function(){m.errors=[],r.intFreshdeskAccount.save(m.freshdeskAccount).$promise.then(function(e){m.freshdeskAccounts.unshift(e.toJSON()),i.success({title:"FreshdeskAccount properly created",msg:m.freshdeskAccount.name?m.freshdeskAccount.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intFreshdeskAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intFreshdeskAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveFreshdeskAccount=function(){m.errors=[],r.intFreshdeskAccount.update({id:m.freshdeskAccount.id},m.freshdeskAccount).$promise.then(function(e){var t=_.find(m.freshdeskAccounts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"FreshdeskAccount properly saved!",msg:m.freshdeskAccount.name?m.freshdeskAccount.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intFreshdeskAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intFreshdeskAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteFreshdeskAccount=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The freshdeskAccount will be deleted.").ariaLabel("Delete FreshdeskAccount").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intFreshdeskAccount.delete({id:m.freshdeskAccount.id}).$promise.then(function(){_.remove(m.freshdeskAccounts,{id:m.freshdeskAccount.id}),i.success({title:"FreshdeskAccount properly deleted!",msg:(m.freshdeskAccount.name||"freshdeskAccount")+" has been deleted!"}),u(m.freshdeskAccount)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intFreshdeskAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intFreshdeskAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","freshdeskAccounts","freshdeskAccount","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditFreshdeskAccountDialogController",e)}(),function(){"use strict";function e(a,n,i,o,e){var s=this;function r(e){i.intFreshdeskField.delete({id:e.id}).$promise.then(function(){_.remove(s.subjects,{id:e.id}),o.success({title:"Subject deleted!",msg:"Subject has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function l(e){i.intFreshdeskField.delete({id:e.id}).$promise.then(function(){_.remove(s.descriptions,{id:e.id}),o.success({title:"Description deleted!",msg:"Description has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function d(e){i.intFreshdeskField.delete({id:e.id}).$promise.then(function(){_.remove(s.fields,{id:e.id}),o.success({title:"Field deleted!",msg:"Field has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}s.currentUser=e.getCurrentUser(),s.freshdeskAccount={},s.freshdeskConfiguration={},s.configurations=[],s.selectedFreshdeskConfiguration=-1,s.init=function(e){s.freshdeskAccount=e,i.intFreshdeskAccount.getConfigurations({id:s.freshdeskAccount.id,sort:"-updatedAt"}).$promise.then(function(e){return s.configurations=e.rows?e.rows:[],s.configurations.length&&s.getFreshdeskConfiguration(0),i.variable.get({nolimit:!0,sort:"name"}).$promise}).then(function(e){s.variables=e.rows?e.rows:[],s.variablesById=_.keyBy(s.variables,"id")}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETCONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.getFreshdeskConfiguration=function(e){s.freshdeskConfiguration=s.configurations[e],s.selectedFreshdeskConfiguration=e,i.intFreshdeskConfiguration.getSubjects({id:s.freshdeskConfiguration.id}).$promise.then(function(e){return s.subjects=e.rows?e.rows:[],i.intFreshdeskConfiguration.getDescriptions({id:s.freshdeskConfiguration.id}).$promise}).then(function(e){return s.descriptions=e.rows?e.rows:[],i.intFreshdeskConfiguration.getFields({id:s.freshdeskConfiguration.id}).$promise}).then(function(e){s.fields=e.rows?e.rows:[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),i.intFreshdeskConfiguration.getTags({id:s.freshdeskConfiguration.id}).$promise.then(function(e){s.selectedTags=e.rows?_.map(e.rows,"id"):[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.createOrEditFreshdeskConfiguration=function(e,t){a.show({controller:"CreateOrEditFreshdeskConfigurationDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/freshdeskAccounts/edit/configurations/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{freshdeskConfiguration:t,configurations:s.configurations,license:null,setting:null}}).finally(function(){s.getFreshdeskConfiguration(0)})},s.deleteFreshdeskConfiguration=function(e,t){var n=a.confirm().title("Are you sure want to delete the freshdeskConfiguration?").htmlContent("<b>"+(t.name||"freshdeskConfiguration")+"</b> will be deleted.").ariaLabel("delete freshdeskConfiguration").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){i.intFreshdeskConfiguration.delete({id:t.id}).$promise.then(function(){_.remove(s.configurations,{id:t.id}),o.success({title:"FreshdeskConfiguration deleted!",msg:t.name?t.name+" has been deleted!":""})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})}).finally(function(){s.getFreshdeskConfiguration(0)})},function(){console.log("CANCEL")})},s.selectChangedAdvanced=function(){return i.intSalesforceConfiguration.update({id:s.freshdeskConfiguration.id},s.freshdeskConfiguration).$promise.then(function(){o.success({title:"Module updated!",msg:"Module has been updated!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.selectedTags=[],s.selectTagsChanged=function(e){i.intFreshdeskConfiguration.setTags({id:s.freshdeskConfiguration.id,ids:s.selectedTags}).$promise.then(function(){o.success({title:"Tags set!",msg:"Tags has been set!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:ADDTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})})},i.tag.get({nolimit:!0,sort:"name"}).$promise.then(function(e){s.tags=e.rows?e.rows:[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.selectedSubjects=[],s.createOrEditSubject=function(e,t){a.show({controller:"CreateOrEditFreshdeskAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/freshdeskAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"subject",item:t,items:s.subjects,configuration:s.freshdeskConfiguration,account:s.freshdeskAccount,license:null,setting:null}})},s.deleteSubjectConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the subject?").htmlContent("<b>Subject</b> will be deleted.").ariaLabel("delete subject").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){r(t)},function(){console.log("CANCEL")})},s.deleteSelectedSubjects=function(e){var t=a.confirm().title("Are you sure want to delete the selected subjects?").htmlContent("<b>"+s.selectedSubjects.length+" selected</b> will be deleted.").ariaLabel("delete subjects").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedSubjects.forEach(function(e){r(e)}),s.selectedSubjects=[]})},s.selectedDescriptions=[],s.createOrEditDescription=function(e,t){a.show({controller:"CreateOrEditFreshdeskAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/freshdeskAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"description",item:t,items:s.descriptions,configuration:s.freshdeskConfiguration,account:s.freshdeskAccount,license:null,setting:null}})},s.deleteDescriptionConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the description?").htmlContent("<b>Description</b> will be deleted.").ariaLabel("delete description").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){l(t)},function(){console.log("CANCEL")})},s.deleteSelectedDescriptions=function(e){var t=a.confirm().title("Are you sure want to delete the selected descriptions?").htmlContent("<b>"+s.selectedDescriptions.length+" selected</b> will be deleted.").ariaLabel("delete descriptions").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedDescriptions.forEach(function(e){l(e)}),s.selectedDescriptions=[]})},s.selectedFields=[],s.createOrEditField=function(e,t){a.show({controller:"CreateOrEditFreshdeskAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/freshdeskAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"field",item:t,items:s.fields,configuration:s.freshdeskConfiguration,account:s.freshdeskAccount,license:null,setting:null}})},s.deleteFieldConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the field?").htmlContent("<b>Field</b> will be deleted.").ariaLabel("delete field").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){d(t)},function(){console.log("CANCEL")})},s.deleteSelectedFields=function(e){var t=a.confirm().title("Are you sure want to delete the selected fields?").htmlContent("<b>"+s.selectedFields.length+" selected</b> will be deleted.").ariaLabel("delete fields").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedFields.forEach(function(e){d(e)}),s.selectedFields=[]})}}e.$inject=["$mdDialog","$document","api","toasty","Auth"],angular.module("app.integrations").controller("FreshdeskAccountConfigurationsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_FRESHDESKCONFIGURATION",m.freshdeskConfiguration=angular.copy(s),m.configurations=o,m.newFreshdeskConfiguration=!1,m.freshdeskConfiguration||(m.freshdeskConfiguration={channel:"voice",type:"inbound"},m.title="INTEGRATIONS.NEW_FRESHDESKCONFIGURATION",m.newFreshdeskConfiguration=!0),m.addNewFreshdeskConfiguration=function(){m.errors=[],r.intFreshdeskAccount.addConfiguration({id:t.params.id},m.freshdeskConfiguration).$promise.then(function(e){m.configurations.unshift(e.toJSON()),i.success({title:"FreshdeskConfiguration properly created",msg:m.freshdeskConfiguration.name?m.freshdeskConfiguration.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intFreshdeskConfiguration.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intFreshdeskConfiguration.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveFreshdeskConfiguration=function(){m.errors=[],r.intFreshdeskConfiguration.update({id:m.freshdeskConfiguration.id},m.freshdeskConfiguration).$promise.then(function(e){var t=_.find(m.configurations,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"FreshdeskConfiguration properly saved!",msg:m.freshdeskConfiguration.name?m.freshdeskConfiguration.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intFreshdeskConfiguration.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intFreshdeskConfiguration.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteFreshdeskConfiguration=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The freshdeskConfiguration will be deleted.").ariaLabel("Delete FreshdeskConfiguration").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intFreshdeskConfiguration.delete({id:m.freshdeskConfiguration.id}).$promise.then(function(){_.remove(m.configurations,{id:m.freshdeskConfiguration.id}),i.success({title:"FreshdeskConfiguration properly deleted!",msg:(m.freshdeskConfiguration.name||"freshdeskConfiguration")+" has been deleted!"}),u(m.freshdeskConfiguration)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intFreshdeskConfiguration.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intFreshdeskConfiguration.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configurations","freshdeskConfiguration","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditFreshdeskConfigurationDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(){a.hide()}m.errors=[],m.title="INTEGRATIONS.EDIT_"+_.toUpper(d),m.item=angular.copy(r),m.items=s,m.type=d,m.newItem=!1,m.item||(m.item={type:"string"},m.item[_.capitalize(d)+"Id"]=o.id,m.title="INTEGRATIONS.NEW_"+_.toUpper(d),m.newItem=!0),m.addNewItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intFreshdeskField.save(m.item).$promise.then(function(e){m.items.unshift(e),i.success({title:_.capitalize(d)+" properly created",msg:_.capitalize(d)+" has been created!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.save"}]})},m.saveItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intFreshdeskField.update({id:m.item.id},m.item).$promise.then(function(e){var t=_.find(m.items,{id:e.id});t&&_.merge(t,e),i.success({title:_.capitalize(d)+" properly saved!",msg:_.capitalize(d)+" has been saved!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.intItem.update"}]})},m.deleteItem=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The "+d+" will be deleted.").ariaLabel("Delete "+_.capitalize(d)).ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){c.intFreshdeskField.delete({id:m.item.id}).$promise.then(function(){_.remove(m.items,{id:m.item.id}),i.success({title:_.capitalize(d)+" properly deleted!",msg:_.capitalize(d)+" has been deleted!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.delete"}]})},function(){})},m.getSelectedVariable=function(){return void 0!==m.item.variableName?m.item.variableName:"Please select a variable"},m.closeDialog=u,c.variable.get({nolimit:!0}).$promise.then(function(e){return m.variables=e.rows?e.rows:[],c.voiceAgentReport.describe().$promise}).then(function(e){return m.voiceAgentReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceAgentReportColumns.push("recordingURL"),c.voiceDialReport.describe().$promise}).then(function(e){m.voiceDialReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceDialReportColumns.push("recordingURL")}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETVARIABLES",msg:e.data?JSON.stringify(e.data):e.toString()})}),c.intFreshdeskAccount.getFields({id:l.id}).$promise.then(function(e){m.accountConnected=!0,m.fields=e.rows?e.rows:[],m.item.idField&&(m.customField=_.find(m.fields,{id:m.item.idField}))}).catch(function(e){m.accountConnected=!1,console.error(e)})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configuration","items","item","account","type","api"],angular.module("app.integrations").controller("CreateOrEditFreshdeskAccountItemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.freshdeskAccount=d||e.params.freshdeskAccount||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoFreshdeskAccounts=function(){e.go("app.integrations.freshdeskAccounts")},c.saveFreshdeskAccount=function(){s.intFreshdeskAccount.update({id:c.freshdeskAccount.id},c.freshdeskAccount).$promise.then(function(){r.success({title:"FreshdeskAccount updated!",msg:c.freshdeskAccount.name?c.freshdeskAccount.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETintFreshdeskAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","freshdeskAccount"],angular.module("app.integrations").controller("FreshdeskAccountController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.freshdeskAccounts=r||{count:0,rows:[]},v.table="freshdeskAccounts",v.listOrder="",v.listOrderAsc=null,v.selectedFreshdeskAccounts=[],v.query={fields:"createdAt,updatedAt,id,name,username,remoteUri,apiKey,serverUrl,description",limit:10,page:1},v.editstate=function(e,t){n.go("app.integrations.freshdeskAccounts.edit",{id:e.id,freshdeskAccount:e})},v.testtestintegrationaccount=function(e,t){return l.intFreshdeskAccount.getFields({id:e.id,test:!0}).$promise.then(function(){c.success({title:"FreshdeskAccount properly tested",msg:"Connection succeded!"})}).catch(function(e){c.error({title:"FreshdeskAccount properly tested",msg:e.data?e.data.message?e.data.message:JSON.stringify(e.data):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the freshdeskAccount?").htmlContent("<b>"+(e.name||"freshdeskAccount")+"</b> will be deleted.").ariaLabel("delete freshdeskAccount").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getFreshdeskAccounts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.intFreshdeskAccount.get(v.query,f).$promise},v.createOrEditFreshdeskAccount=function(e,t){i.show({controller:"CreateOrEditFreshdeskAccountDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/freshdeskAccounts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{freshdeskAccount:t,freshdeskAccounts:v.freshdeskAccounts.rows,license:v.license,setting:v.setting}})},v.deleteFreshdeskAccount=A,v.exportSelectedFreshdeskAccounts=function(){var e=angular.copy(v.selectedFreshdeskAccounts);return v.selectedFreshdeskAccounts=[],e},v.deleteSelectedFreshdeskAccounts=function(e){var t=i.confirm().title("Are you sure want to delete the selected freshdeskAccounts?").htmlContent("<b>"+v.selectedFreshdeskAccounts.length+" selected</b> will be deleted.").ariaLabel("delete FreshdeskAccounts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedFreshdeskAccounts.forEach(function(e){A(e)}),v.selectedFreshdeskAccounts=[]})},v.deselectFreshdeskAccounts=function(){v.selectedFreshdeskAccounts=[]},v.selectAllFreshdeskAccounts=function(){v.selectedFreshdeskAccounts=v.freshdeskAccounts.rows};var h=!0,b=1;function f(e){v.freshdeskAccounts=e||{count:0,rows:[]}}function A(e){l.intFreshdeskAccount.delete({id:e.id}).$promise.then(function(){_.remove(v.freshdeskAccounts.rows,{id:e.id}),v.freshdeskAccounts.count-=1,v.freshdeskAccounts.rows.length||v.getFreshdeskAccounts(),c.success({title:"FreshdeskAccount deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEintFreshdeskAccount"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEintFreshdeskAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getFreshdeskAccounts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","freshdeskAccounts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.integrations").controller("FreshdeskAccountsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_SALESFORCEACCOUNT",m.salesforceAccount=angular.copy(s),m.salesforceAccounts=o,m.newSalesforceAccount=!1,m.salesforceAccount||(m.salesforceAccount={type:"integrationTab",serverUrl:n.protocol()+"://"+n.host()+(n.port()?":"+n.port():"")},m.title="INTEGRATIONS.NEW_SALESFORCEACCOUNT",m.newSalesforceAccount=!0),m.addNewSalesforceAccount=function(){m.errors=[],r.intSalesforceAccount.save(m.salesforceAccount).$promise.then(function(e){m.salesforceAccounts.unshift(e.toJSON()),i.success({title:"SalesforceAccount properly created",msg:m.salesforceAccount.name?m.salesforceAccount.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSalesforceAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSalesforceAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSalesforceAccount=function(){m.errors=[],r.intSalesforceAccount.update({id:m.salesforceAccount.id},m.salesforceAccount).$promise.then(function(e){var t=_.find(m.salesforceAccounts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"SalesforceAccount properly saved!",msg:m.salesforceAccount.name?m.salesforceAccount.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSalesforceAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSalesforceAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSalesforceAccount=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The salesforceAccount will be deleted.").ariaLabel("Delete SalesforceAccount").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intSalesforceAccount.delete({id:m.salesforceAccount.id}).$promise.then(function(){_.remove(m.salesforceAccounts,{id:m.salesforceAccount.id}),i.success({title:"SalesforceAccount properly deleted!",msg:(m.salesforceAccount.name||"salesforceAccount")+" has been deleted!"}),u(m.salesforceAccount)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSalesforceAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSalesforceAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","salesforceAccounts","salesforceAccount","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditSalesforceAccountDialogController",e)}(),function(){"use strict";function e(a,n,i,o,e){var s=this;function r(e){i.intSalesforceField.delete({id:e.id}).$promise.then(function(){_.remove(s.subjects,{id:e.id}),o.success({title:"Subject deleted!",msg:"Subject has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function l(e){i.intSalesforceField.delete({id:e.id}).$promise.then(function(){_.remove(s.descriptions,{id:e.id}),o.success({title:"Description deleted!",msg:"Description has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function d(e){i.intSalesforceField.delete({id:e.id}).$promise.then(function(){_.remove(s.fields,{id:e.id}),o.success({title:"Field deleted!",msg:"Field has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}s.currentUser=e.getCurrentUser(),s.salesforceAccount={},s.salesforceConfiguration={},s.configurations=[],s.selectedSalesforceConfiguration=-1,s.init=function(e){s.salesforceAccount=e,i.intSalesforceAccount.getConfigurations({id:s.salesforceAccount.id,sort:"-updatedAt"}).$promise.then(function(e){return s.configurations=e.rows?e.rows:[],s.configurations.length&&s.getSalesforceConfiguration(0),i.variable.get({nolimit:!0,sort:"name"}).$promise}).then(function(e){s.variables=e.rows?e.rows:[],s.variablesById=_.keyBy(s.variables,"id")}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETCONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.getSalesforceConfiguration=function(e){s.salesforceConfiguration=s.configurations[e],s.selectedSalesforceConfiguration=e,i.intSalesforceConfiguration.getSubjects({id:s.salesforceConfiguration.id}).$promise.then(function(e){return s.subjects=e.rows?e.rows:[],i.intSalesforceConfiguration.getDescriptions({id:s.salesforceConfiguration.id}).$promise}).then(function(e){return s.descriptions=e.rows?e.rows:[],i.intSalesforceConfiguration.getFields({id:s.salesforceConfiguration.id}).$promise}).then(function(e){s.fields=e.rows?e.rows:[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.createOrEditSalesforceConfiguration=function(e,t){a.show({controller:"CreateOrEditSalesforceConfigurationDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/salesforceAccounts/edit/configurations/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{salesforceConfiguration:t,configurations:s.configurations,license:null,setting:null}}).finally(function(){s.getSalesforceConfiguration(0)})},s.deleteSalesforceConfiguration=function(e,t){var n=a.confirm().title("Are you sure want to delete the salesforceConfiguration?").htmlContent("<b>"+(t.name||"salesforceConfiguration")+"</b> will be deleted.").ariaLabel("delete salesforceConfiguration").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){i.intSalesforceConfiguration.delete({id:t.id}).$promise.then(function(){_.remove(s.configurations,{id:t.id}),o.success({title:"SalesforceConfiguration deleted!",msg:t.name?t.name+" has been deleted!":""})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})}).finally(function(){s.getSalesforceConfiguration(0)})},function(){console.log("CANCEL")})},s.selectChangedAdvanced=function(){return i.intSalesforceConfiguration.update({id:s.salesforceConfiguration.id},s.salesforceConfiguration).$promise.then(function(){o.success({title:"Module updated!",msg:"Module has been updated!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.selectedSubjects=[],s.createOrEditSubject=function(e,t){a.show({controller:"CreateOrEditSalesforceAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/salesforceAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"subject",item:t,items:s.subjects,configuration:s.salesforceConfiguration,account:s.salesforceAccount,license:null,setting:null}})},s.deleteSubjectConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the subject?").htmlContent("<b>Subject</b> will be deleted.").ariaLabel("delete subject").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){r(t)},function(){console.log("CANCEL")})},s.deleteSelectedSubjects=function(e){var t=a.confirm().title("Are you sure want to delete the selected subjects?").htmlContent("<b>"+s.selectedSubjects.length+" selected</b> will be deleted.").ariaLabel("delete subjects").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedSubjects.forEach(function(e){r(e)}),s.selectedSubjects=[]})},s.selectedDescriptions=[],s.createOrEditDescription=function(e,t){a.show({controller:"CreateOrEditSalesforceAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/salesforceAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"description",item:t,items:s.descriptions,configuration:s.salesforceConfiguration,account:s.salesforceAccount,license:null,setting:null}})},s.deleteDescriptionConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the description?").htmlContent("<b>Description</b> will be deleted.").ariaLabel("delete description").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){l(t)},function(){console.log("CANCEL")})},s.deleteSelectedDescriptions=function(e){var t=a.confirm().title("Are you sure want to delete the selected descriptions?").htmlContent("<b>"+s.selectedDescriptions.length+" selected</b> will be deleted.").ariaLabel("delete descriptions").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedDescriptions.forEach(function(e){l(e)}),s.selectedDescriptions=[]})},s.selectedFields=[],s.createOrEditField=function(e,t){a.show({controller:"CreateOrEditSalesforceAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/salesforceAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"field",item:t,items:s.fields,configuration:s.salesforceConfiguration,account:s.salesforceAccount,license:null,setting:null}})},s.deleteFieldConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the field?").htmlContent("<b>Field</b> will be deleted.").ariaLabel("delete field").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){d(t)},function(){console.log("CANCEL")})},s.deleteSelectedFields=function(e){var t=a.confirm().title("Are you sure want to delete the selected fields?").htmlContent("<b>"+s.selectedFields.length+" selected</b> will be deleted.").ariaLabel("delete fields").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedFields.forEach(function(e){d(e)}),s.selectedFields=[]})}}e.$inject=["$mdDialog","$document","api","toasty","Auth"],angular.module("app.integrations").controller("SalesforceAccountConfigurationsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_SALESFORCECONFIGURATION",m.salesforceConfiguration=angular.copy(s),m.configurations=o,m.newSalesforceConfiguration=!1,m.salesforceConfiguration||(m.salesforceConfiguration={channel:"voice",type:"inbound"},m.title="INTEGRATIONS.NEW_SALESFORCECONFIGURATION",m.newSalesforceConfiguration=!0),m.addNewSalesforceConfiguration=function(){m.errors=[],r.intSalesforceAccount.addConfiguration({id:t.params.id},m.salesforceConfiguration).$promise.then(function(e){m.configurations.unshift(e.toJSON()),i.success({title:"SalesforceConfiguration properly created",msg:m.salesforceConfiguration.name?m.salesforceConfiguration.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSalesforceConfiguration.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSalesforceConfiguration.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSalesforceConfiguration=function(){m.errors=[],r.intSalesforceConfiguration.update({id:m.salesforceConfiguration.id},m.salesforceConfiguration).$promise.then(function(e){var t=_.find(m.configurations,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"SalesforceConfiguration properly saved!",msg:m.salesforceConfiguration.name?m.salesforceConfiguration.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSalesforceConfiguration.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSalesforceConfiguration.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSalesforceConfiguration=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The salesforceConfiguration will be deleted.").ariaLabel("Delete SalesforceConfiguration").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intSalesforceConfiguration.delete({id:m.salesforceConfiguration.id}).$promise.then(function(){_.remove(m.configurations,{id:m.salesforceConfiguration.id}),i.success({title:"SalesforceConfiguration properly deleted!",msg:(m.salesforceConfiguration.name||"salesforceConfiguration")+" has been deleted!"}),u(m.salesforceConfiguration)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSalesforceConfiguration.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSalesforceConfiguration.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configurations","salesforceConfiguration","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditSalesforceConfigurationDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(){a.hide()}m.errors=[],m.title="INTEGRATIONS.EDIT_"+_.toUpper(d),m.item=angular.copy(r),m.items=s,m.type=d,m.newItem=!1,m.item||(m.item={type:"string"},m.item[_.capitalize(d)+"Id"]=o.id,m.title="INTEGRATIONS.NEW_"+_.toUpper(d),m.newItem=!0),m.addNewItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intSalesforceField.save(m.item).$promise.then(function(e){m.items.unshift(e),i.success({title:_.capitalize(d)+" properly created",msg:_.capitalize(d)+" has been created!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.save"}]})},m.saveItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intSalesforceField.update({id:m.item.id},m.item).$promise.then(function(e){var t=_.find(m.items,{id:e.id});t&&_.merge(t,e),i.success({title:_.capitalize(d)+" properly saved!",msg:_.capitalize(d)+" has been saved!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.intItem.update"}]})},m.deleteItem=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The "+d+" will be deleted.").ariaLabel("Delete "+_.capitalize(d)).ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){c.intSalesforceField.delete({id:m.item.id}).$promise.then(function(){_.remove(m.items,{id:m.item.id}),i.success({title:_.capitalize(d)+" properly deleted!",msg:_.capitalize(d)+" has been deleted!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.delete"}]})},function(){})},m.getSelectedVariable=function(){return void 0!==m.item.variableName?m.item.variableName:"Please select a variable"},m.closeDialog=u,c.variable.get({nolimit:!0}).$promise.then(function(e){return m.variables=e.rows?e.rows:[],c.voiceAgentReport.describe().$promise}).then(function(e){return m.voiceAgentReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceAgentReportColumns.push("recordingURL"),c.voiceDialReport.describe().$promise}).then(function(e){m.voiceDialReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceDialReportColumns.push("recordingURL")}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETVARIABLES",msg:e.data?JSON.stringify(e.data):e.toString()})}),c.intSalesforceAccount.getFields({id:l.id}).$promise.then(function(e){m.accountConnected=!0,m.fields=e.rows?e.rows:[],m.item.idField&&(m.customField=_.find(m.fields,{id:m.item.idField}))}).catch(function(e){m.accountConnected=!1,console.error(e)})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configuration","items","item","account","type","api"],angular.module("app.integrations").controller("CreateOrEditSalesforceAccountItemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.salesforceAccount=d||e.params.salesforceAccount||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoSalesforceAccounts=function(){e.go("app.integrations.salesforceAccounts")},c.saveSalesforceAccount=function(){s.intSalesforceAccount.update({id:c.salesforceAccount.id},c.salesforceAccount).$promise.then(function(){r.success({title:"SalesforceAccount updated!",msg:c.salesforceAccount.name?c.salesforceAccount.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETintSalesforceAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","salesforceAccount"],angular.module("app.integrations").controller("SalesforceAccountController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.salesforceAccounts=r||{count:0,rows:[]},v.table="salesforceAccounts",v.listOrder="",v.listOrderAsc=null,v.selectedSalesforceAccounts=[],v.query={fields:"createdAt,updatedAt,id,name,type,username,remoteUri,password,clientId,clientSecret,securityToken,serverUrl,description",limit:10,page:1},v.arraytype=_.keyBy([{option:"Integration_Tab",value:"'integrationTab'"},{option:"New_Tab",value:"'newTab'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.integrations.salesforceAccounts.edit",{id:e.id,salesforceAccount:e})},v.testtestintegrationaccount=function(e,t){return l.intSalesforceAccount.getFields({id:e.id,test:!0}).$promise.then(function(){c.success({title:"SalesforceAccount properly tested",msg:"Connection succeded!"})}).catch(function(e){c.error({title:"SalesforceAccount properly tested",msg:e.data?e.data.message?e.data.message:JSON.stringify(e.data):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the salesforceAccount?").htmlContent("<b>"+(e.name||"salesforceAccount")+"</b> will be deleted.").ariaLabel("delete salesforceAccount").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getSalesforceAccounts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.intSalesforceAccount.get(v.query,f).$promise},v.createOrEditSalesforceAccount=function(e,t){i.show({controller:"CreateOrEditSalesforceAccountDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/salesforceAccounts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{salesforceAccount:t,salesforceAccounts:v.salesforceAccounts.rows,license:v.license,setting:v.setting}})},v.deleteSalesforceAccount=A,v.exportSelectedSalesforceAccounts=function(){var e=angular.copy(v.selectedSalesforceAccounts);return v.selectedSalesforceAccounts=[],e},v.deleteSelectedSalesforceAccounts=function(e){var t=i.confirm().title("Are you sure want to delete the selected salesforceAccounts?").htmlContent("<b>"+v.selectedSalesforceAccounts.length+" selected</b> will be deleted.").ariaLabel("delete SalesforceAccounts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedSalesforceAccounts.forEach(function(e){A(e)}),v.selectedSalesforceAccounts=[]})},v.deselectSalesforceAccounts=function(){v.selectedSalesforceAccounts=[]},v.selectAllSalesforceAccounts=function(){v.selectedSalesforceAccounts=v.salesforceAccounts.rows};var h=!0,b=1;function f(e){v.salesforceAccounts=e||{count:0,rows:[]}}function A(e){l.intSalesforceAccount.delete({id:e.id}).$promise.then(function(){_.remove(v.salesforceAccounts.rows,{id:e.id}),v.salesforceAccounts.count-=1,v.salesforceAccounts.rows.length||v.getSalesforceAccounts(),c.success({title:"SalesforceAccount deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEintSalesforceAccount"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEintSalesforceAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getSalesforceAccounts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","salesforceAccounts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.integrations").controller("SalesforceAccountsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_SUGARCRMACCOUNT",m.sugarcrmAccount=angular.copy(s),m.sugarcrmAccounts=o,m.newSugarcrmAccount=!1,m.sugarcrmAccount||(m.sugarcrmAccount={serverUrl:n.protocol()+"://"+n.host()+(n.port()?":"+n.port():"")},m.title="INTEGRATIONS.NEW_SUGARCRMACCOUNT",m.newSugarcrmAccount=!0),m.addNewSugarcrmAccount=function(){m.errors=[],r.intSugarcrmAccount.save(m.sugarcrmAccount).$promise.then(function(e){m.sugarcrmAccounts.unshift(e.toJSON()),i.success({title:"SugarcrmAccount properly created",msg:m.sugarcrmAccount.name?m.sugarcrmAccount.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSugarcrmAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSugarcrmAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSugarcrmAccount=function(){m.errors=[],r.intSugarcrmAccount.update({id:m.sugarcrmAccount.id},m.sugarcrmAccount).$promise.then(function(e){var t=_.find(m.sugarcrmAccounts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"SugarcrmAccount properly saved!",msg:m.sugarcrmAccount.name?m.sugarcrmAccount.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSugarcrmAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSugarcrmAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSugarcrmAccount=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The sugarcrmAccount will be deleted.").ariaLabel("Delete SugarcrmAccount").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intSugarcrmAccount.delete({id:m.sugarcrmAccount.id}).$promise.then(function(){_.remove(m.sugarcrmAccounts,{id:m.sugarcrmAccount.id}),i.success({title:"SugarcrmAccount properly deleted!",msg:(m.sugarcrmAccount.name||"sugarcrmAccount")+" has been deleted!"}),u(m.sugarcrmAccount)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSugarcrmAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSugarcrmAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","sugarcrmAccounts","sugarcrmAccount","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditSugarcrmAccountDialogController",e)}(),function(){"use strict";function e(a,n,i,o,e){var s=this;function r(e){i.intSugarcrmField.delete({id:e.id}).$promise.then(function(){_.remove(s.subjects,{id:e.id}),o.success({title:"Subject deleted!",msg:"Subject has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function l(e){i.intSugarcrmField.delete({id:e.id}).$promise.then(function(){_.remove(s.descriptions,{id:e.id}),o.success({title:"Description deleted!",msg:"Description has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function d(e){i.intSugarcrmField.delete({id:e.id}).$promise.then(function(){_.remove(s.fields,{id:e.id}),o.success({title:"Field deleted!",msg:"Field has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}s.currentUser=e.getCurrentUser(),s.sugarcrmAccount={},s.sugarcrmConfiguration={},s.configurations=[],s.selectedSugarcrmConfiguration=-1,s.init=function(e){s.sugarcrmAccount=e,i.intSugarcrmAccount.getConfigurations({id:s.sugarcrmAccount.id,sort:"-updatedAt"}).$promise.then(function(e){return s.configurations=e.rows?e.rows:[],s.configurations.length&&s.getSugarcrmConfiguration(0),i.variable.get({nolimit:!0,sort:"name"}).$promise}).then(function(e){s.variables=e.rows?e.rows:[],s.variablesById=_.keyBy(s.variables,"id")}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETCONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.getSugarcrmConfiguration=function(e){s.sugarcrmConfiguration=s.configurations[e],s.selectedSugarcrmConfiguration=e,i.intSugarcrmConfiguration.getSubjects({id:s.sugarcrmConfiguration.id}).$promise.then(function(e){return s.subjects=e.rows?e.rows:[],i.intSugarcrmConfiguration.getDescriptions({id:s.sugarcrmConfiguration.id}).$promise}).then(function(e){return s.descriptions=e.rows?e.rows:[],i.intSugarcrmConfiguration.getFields({id:s.sugarcrmConfiguration.id}).$promise}).then(function(e){s.fields=e.rows?e.rows:[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.createOrEditSugarcrmConfiguration=function(e,t){a.show({controller:"CreateOrEditSugarcrmConfigurationDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/sugarcrmAccounts/edit/configurations/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{sugarcrmConfiguration:t,configurations:s.configurations,license:null,setting:null}}).finally(function(){s.getSugarcrmConfiguration(0)})},s.deleteSugarcrmConfiguration=function(e,t){var n=a.confirm().title("Are you sure want to delete the sugarcrmConfiguration?").htmlContent("<b>"+(t.name||"sugarcrmConfiguration")+"</b> will be deleted.").ariaLabel("delete sugarcrmConfiguration").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){i.intSugarcrmConfiguration.delete({id:t.id}).$promise.then(function(){_.remove(s.configurations,{id:t.id}),o.success({title:"SugarcrmConfiguration deleted!",msg:t.name?t.name+" has been deleted!":""})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})}).finally(function(){s.getSugarcrmConfiguration(0)})},function(){console.log("CANCEL")})},s.selectChangedAdvanced=function(){return i.intSalesforceConfiguration.update({id:s.sugarcrmConfiguration.id},s.sugarcrmConfiguration).$promise.then(function(){o.success({title:"Module updated!",msg:"Module has been updated!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.selectedSubjects=[],s.createOrEditSubject=function(e,t){a.show({controller:"CreateOrEditSugarcrmAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/sugarcrmAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"subject",item:t,items:s.subjects,configuration:s.sugarcrmConfiguration,account:s.sugarcrmAccount,license:null,setting:null}})},s.deleteSubjectConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the subject?").htmlContent("<b>Subject</b> will be deleted.").ariaLabel("delete subject").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){r(t)},function(){console.log("CANCEL")})},s.deleteSelectedSubjects=function(e){var t=a.confirm().title("Are you sure want to delete the selected subjects?").htmlContent("<b>"+s.selectedSubjects.length+" selected</b> will be deleted.").ariaLabel("delete subjects").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedSubjects.forEach(function(e){r(e)}),s.selectedSubjects=[]})},s.selectedDescriptions=[],s.createOrEditDescription=function(e,t){a.show({controller:"CreateOrEditSugarcrmAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/sugarcrmAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"description",item:t,items:s.descriptions,configuration:s.sugarcrmConfiguration,account:s.sugarcrmAccount,license:null,setting:null}})},s.deleteDescriptionConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the description?").htmlContent("<b>Description</b> will be deleted.").ariaLabel("delete description").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){l(t)},function(){console.log("CANCEL")})},s.deleteSelectedDescriptions=function(e){var t=a.confirm().title("Are you sure want to delete the selected descriptions?").htmlContent("<b>"+s.selectedDescriptions.length+" selected</b> will be deleted.").ariaLabel("delete descriptions").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedDescriptions.forEach(function(e){l(e)}),s.selectedDescriptions=[]})},s.selectedFields=[],s.createOrEditField=function(e,t){a.show({controller:"CreateOrEditSugarcrmAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/sugarcrmAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"field",item:t,items:s.fields,configuration:s.sugarcrmConfiguration,account:s.sugarcrmAccount,license:null,setting:null}})},s.deleteFieldConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the field?").htmlContent("<b>Field</b> will be deleted.").ariaLabel("delete field").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){d(t)},function(){console.log("CANCEL")})},s.deleteSelectedFields=function(e){var t=a.confirm().title("Are you sure want to delete the selected fields?").htmlContent("<b>"+s.selectedFields.length+" selected</b> will be deleted.").ariaLabel("delete fields").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedFields.forEach(function(e){d(e)}),s.selectedFields=[]})}}e.$inject=["$mdDialog","$document","api","toasty","Auth"],angular.module("app.integrations").controller("SugarcrmAccountConfigurationsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_SUGARCRMCONFIGURATION",m.sugarcrmConfiguration=angular.copy(s),m.configurations=o,m.newSugarcrmConfiguration=!1,m.sugarcrmConfiguration||(m.sugarcrmConfiguration={channel:"voice",type:"inbound"},m.title="INTEGRATIONS.NEW_SUGARCRMCONFIGURATION",m.newSugarcrmConfiguration=!0),m.addNewSugarcrmConfiguration=function(){m.errors=[],r.intSugarcrmAccount.addConfiguration({id:t.params.id},m.sugarcrmConfiguration).$promise.then(function(e){m.configurations.unshift(e.toJSON()),i.success({title:"SugarcrmConfiguration properly created",msg:m.sugarcrmConfiguration.name?m.sugarcrmConfiguration.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSugarcrmConfiguration.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSugarcrmConfiguration.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSugarcrmConfiguration=function(){m.errors=[],r.intSugarcrmConfiguration.update({id:m.sugarcrmConfiguration.id},m.sugarcrmConfiguration).$promise.then(function(e){var t=_.find(m.configurations,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"SugarcrmConfiguration properly saved!",msg:m.sugarcrmConfiguration.name?m.sugarcrmConfiguration.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSugarcrmConfiguration.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSugarcrmConfiguration.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSugarcrmConfiguration=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The sugarcrmConfiguration will be deleted.").ariaLabel("Delete SugarcrmConfiguration").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intSugarcrmConfiguration.delete({id:m.sugarcrmConfiguration.id}).$promise.then(function(){_.remove(m.configurations,{id:m.sugarcrmConfiguration.id}),i.success({title:"SugarcrmConfiguration properly deleted!",msg:(m.sugarcrmConfiguration.name||"sugarcrmConfiguration")+" has been deleted!"}),u(m.sugarcrmConfiguration)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intSugarcrmConfiguration.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intSugarcrmConfiguration.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configurations","sugarcrmConfiguration","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditSugarcrmConfigurationDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(){a.hide()}m.errors=[],m.title="INTEGRATIONS.EDIT_"+_.toUpper(d),m.item=angular.copy(r),m.items=s,m.type=d,m.newItem=!1,m.item||(m.item={type:"string"},m.item[_.capitalize(d)+"Id"]=o.id,m.title="INTEGRATIONS.NEW_"+_.toUpper(d),m.newItem=!0),m.addNewItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intSugarcrmField.save(m.item).$promise.then(function(e){m.items.unshift(e),i.success({title:_.capitalize(d)+" properly created",msg:_.capitalize(d)+" has been created!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.save"}]})},m.saveItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intSugarcrmField.update({id:m.item.id},m.item).$promise.then(function(e){var t=_.find(m.items,{id:e.id});t&&_.merge(t,e),i.success({title:_.capitalize(d)+" properly saved!",msg:_.capitalize(d)+" has been saved!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.intItem.update"}]})},m.deleteItem=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The "+d+" will be deleted.").ariaLabel("Delete "+_.capitalize(d)).ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){c.intSugarcrmField.delete({id:m.item.id}).$promise.then(function(){_.remove(m.items,{id:m.item.id}),i.success({title:_.capitalize(d)+" properly deleted!",msg:_.capitalize(d)+" has been deleted!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.delete"}]})},function(){})},m.getSelectedVariable=function(){return void 0!==m.item.variableName?m.item.variableName:"Please select a variable"},m.closeDialog=u,c.variable.get({nolimit:!0}).$promise.then(function(e){return m.variables=e.rows?e.rows:[],c.voiceAgentReport.describe().$promise}).then(function(e){return m.voiceAgentReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceAgentReportColumns.push("recordingURL"),c.voiceDialReport.describe().$promise}).then(function(e){m.voiceDialReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceDialReportColumns.push("recordingURL")}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETVARIABLES",msg:e.data?JSON.stringify(e.data):e.toString()})}),c.intSugarcrmAccount.getFields({id:l.id}).$promise.then(function(e){m.accountConnected=!0,m.fields=e.rows?e.rows:[],m.item.idField&&(m.customField=_.find(m.fields,{id:m.item.idField}))}).catch(function(e){m.accountConnected=!1,console.error(e)})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configuration","items","item","account","type","api"],angular.module("app.integrations").controller("CreateOrEditSugarcrmAccountItemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.sugarcrmAccount=d||e.params.sugarcrmAccount||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoSugarcrmAccounts=function(){e.go("app.integrations.sugarcrmAccounts")},c.saveSugarcrmAccount=function(){s.intSugarcrmAccount.update({id:c.sugarcrmAccount.id},c.sugarcrmAccount).$promise.then(function(){r.success({title:"SugarcrmAccount updated!",msg:c.sugarcrmAccount.name?c.sugarcrmAccount.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETintSugarcrmAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","sugarcrmAccount"],angular.module("app.integrations").controller("SugarcrmAccountController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.sugarcrmAccounts=r||{count:0,rows:[]},v.table="sugarcrmAccounts",v.listOrder="",v.listOrderAsc=null,v.selectedSugarcrmAccounts=[],v.query={fields:"createdAt,updatedAt,id,name,username,remoteUri,password,serverUrl,description",limit:10,page:1},v.editstate=function(e,t){n.go("app.integrations.sugarcrmAccounts.edit",{id:e.id,sugarcrmAccount:e})},v.testtestintegrationaccount=function(e,t){return l.intSugarcrmAccount.getFields({id:e.id,test:!0}).$promise.then(function(){c.success({title:"SugarcrmAccount properly tested",msg:"Connection succeded!"})}).catch(function(e){c.error({title:"SugarcrmAccount properly tested",msg:e.data?e.data.message?e.data.message:JSON.stringify(e.data):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the sugarcrmAccount?").htmlContent("<b>"+(e.name||"sugarcrmAccount")+"</b> will be deleted.").ariaLabel("delete sugarcrmAccount").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getSugarcrmAccounts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.intSugarcrmAccount.get(v.query,f).$promise},v.createOrEditSugarcrmAccount=function(e,t){i.show({controller:"CreateOrEditSugarcrmAccountDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/sugarcrmAccounts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{sugarcrmAccount:t,sugarcrmAccounts:v.sugarcrmAccounts.rows,license:v.license,setting:v.setting}})},v.deleteSugarcrmAccount=A,v.exportSelectedSugarcrmAccounts=function(){var e=angular.copy(v.selectedSugarcrmAccounts);return v.selectedSugarcrmAccounts=[],e},v.deleteSelectedSugarcrmAccounts=function(e){var t=i.confirm().title("Are you sure want to delete the selected sugarcrmAccounts?").htmlContent("<b>"+v.selectedSugarcrmAccounts.length+" selected</b> will be deleted.").ariaLabel("delete SugarcrmAccounts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedSugarcrmAccounts.forEach(function(e){A(e)}),v.selectedSugarcrmAccounts=[]})},v.deselectSugarcrmAccounts=function(){v.selectedSugarcrmAccounts=[]},v.selectAllSugarcrmAccounts=function(){v.selectedSugarcrmAccounts=v.sugarcrmAccounts.rows};var h=!0,b=1;function f(e){v.sugarcrmAccounts=e||{count:0,rows:[]}}function A(e){l.intSugarcrmAccount.delete({id:e.id}).$promise.then(function(){_.remove(v.sugarcrmAccounts.rows,{id:e.id}),v.sugarcrmAccounts.count-=1,v.sugarcrmAccounts.rows.length||v.getSugarcrmAccounts(),c.success({title:"SugarcrmAccount deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEintSugarcrmAccount"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEintSugarcrmAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getSugarcrmAccounts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","sugarcrmAccounts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.integrations").controller("SugarcrmAccountsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_ZENDESKACCOUNT",m.zendeskAccount=angular.copy(s),m.zendeskAccounts=o,m.newZendeskAccount=!1,m.zendeskAccount||(m.zendeskAccount={type:"integrationTab",authType:"password",serverUrl:n.protocol()+"://"+n.host()+(n.port()?":"+n.port():"")},m.title="INTEGRATIONS.NEW_ZENDESKACCOUNT",m.newZendeskAccount=!0),m.addNewZendeskAccount=function(){m.errors=[],r.intZendeskAccount.save(m.zendeskAccount).$promise.then(function(e){m.zendeskAccounts.unshift(e.toJSON()),i.success({title:"ZendeskAccount properly created",msg:m.zendeskAccount.name?m.zendeskAccount.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZendeskAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZendeskAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveZendeskAccount=function(){m.errors=[],r.intZendeskAccount.update({id:m.zendeskAccount.id},m.zendeskAccount).$promise.then(function(e){var t=_.find(m.zendeskAccounts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"ZendeskAccount properly saved!",msg:m.zendeskAccount.name?m.zendeskAccount.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZendeskAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZendeskAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteZendeskAccount=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The zendeskAccount will be deleted.").ariaLabel("Delete ZendeskAccount").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intZendeskAccount.delete({id:m.zendeskAccount.id}).$promise.then(function(){_.remove(m.zendeskAccounts,{id:m.zendeskAccount.id}),i.success({title:"ZendeskAccount properly deleted!",msg:(m.zendeskAccount.name||"zendeskAccount")+" has been deleted!"}),u(m.zendeskAccount)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZendeskAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZendeskAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","zendeskAccounts","zendeskAccount","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditZendeskAccountDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(){a.hide()}m.errors=[],m.title="INTEGRATIONS.EDIT_"+_.toUpper(d),m.item=angular.copy(r),m.items=s,m.type=d,m.newItem=!1,m.item||(m.item={type:"string"},m.item[_.capitalize(d)+"Id"]=o.id,m.title="INTEGRATIONS.NEW_"+_.toUpper(d),m.newItem=!0),m.addNewItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intZendeskField.save(m.item).$promise.then(function(e){m.items.unshift(e),i.success({title:_.capitalize(d)+" properly created",msg:_.capitalize(d)+" has been created!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.save"}]})},m.saveItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intZendeskField.update({id:m.item.id},m.item).$promise.then(function(e){var t=_.find(m.items,{id:e.id});t&&_.merge(t,e),i.success({title:_.capitalize(d)+" properly saved!",msg:_.capitalize(d)+" has been saved!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.intItem.update"}]})},m.deleteItem=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The "+d+" will be deleted.").ariaLabel("Delete "+_.capitalize(d)).ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){c.intZendeskField.delete({id:m.item.id}).$promise.then(function(){_.remove(m.items,{id:m.item.id}),i.success({title:_.capitalize(d)+" properly deleted!",msg:_.capitalize(d)+" has been deleted!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.delete"}]})},function(){})},m.getSelectedVariable=function(){return void 0!==m.item.variableName?m.item.variableName:"Please select a variable"},m.closeDialog=u,c.variable.get({nolimit:!0}).$promise.then(function(e){return m.variables=e.rows?e.rows:[],c.voiceAgentReport.describe().$promise}).then(function(e){return m.voiceAgentReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceAgentReportColumns.push("recordingURL"),c.voiceDialReport.describe().$promise}).then(function(e){m.voiceDialReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceDialReportColumns.push("recordingURL")}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETVARIABLES",msg:e.data?JSON.stringify(e.data):e.toString()})}),c.intZendeskAccount.getFields({id:l.id}).$promise.then(function(e){m.accountConnected=!0,m.fields=e.rows?e.rows:[],m.item.idField&&(m.customField=_.find(m.fields,{id:m.item.idField}))}).catch(function(e){m.accountConnected=!1,console.error(e)})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configuration","items","item","account","type","api"],angular.module("app.integrations").controller("CreateOrEditZendeskAccountItemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.zendeskAccount=d||e.params.zendeskAccount||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoZendeskAccounts=function(){e.go("app.integrations.zendeskAccounts")},c.saveZendeskAccount=function(){s.intZendeskAccount.update({id:c.zendeskAccount.id},c.zendeskAccount).$promise.then(function(){r.success({title:"ZendeskAccount updated!",msg:c.zendeskAccount.name?c.zendeskAccount.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETintZendeskAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","zendeskAccount"],angular.module("app.integrations").controller("ZendeskAccountController",e)}(),function(){"use strict";function e(a,n,i,o,e){var s=this;function r(e){i.intZendeskField.delete({id:e.id}).$promise.then(function(){_.remove(s.subjects,{id:e.id}),o.success({title:"Subject deleted!",msg:"Subject has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function l(e){i.intZendeskField.delete({id:e.id}).$promise.then(function(){_.remove(s.descriptions,{id:e.id}),o.success({title:"Description deleted!",msg:"Description has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function d(e){i.intZendeskField.delete({id:e.id}).$promise.then(function(){_.remove(s.fields,{id:e.id}),o.success({title:"Field deleted!",msg:"Field has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}s.currentUser=e.getCurrentUser(),s.zendeskAccount={},s.zendeskConfiguration={},s.zendeskConfigurations=[],s.selectedZendeskConfiguration=-1,s.init=function(e){s.zendeskAccount=e,i.intZendeskAccount.getConfigurations({id:s.zendeskAccount.id,sort:"-updatedAt"}).$promise.then(function(e){return s.zendeskConfigurations=e.rows?e.rows:[],s.zendeskConfigurations.length&&s.getZendeskConfiguration(0),i.variable.get({nolimit:!0,sort:"name"}).$promise}).then(function(e){s.variables=e.rows?e.rows:[],s.variablesById=_.keyBy(s.variables,"id")}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETCONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.getZendeskConfiguration=function(e){s.zendeskConfiguration=s.zendeskConfigurations[e],s.selectedZendeskConfiguration=e,i.intZendeskConfiguration.getSubjects({id:s.zendeskConfiguration.id}).$promise.then(function(e){return s.subjects=e.rows?e.rows:[],i.intZendeskConfiguration.getDescriptions({id:s.zendeskConfiguration.id}).$promise}).then(function(e){return s.descriptions=e.rows?e.rows:[],i.intZendeskConfiguration.getFields({id:s.zendeskConfiguration.id}).$promise}).then(function(e){s.fields=e.rows?e.rows:[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),i.intZendeskConfiguration.getTags({id:s.zendeskConfiguration.id}).$promise.then(function(e){s.selectedTags=e.rows?_.map(e.rows,"id"):[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.createOrEditZendeskConfiguration=function(e,t){a.show({controller:"CreateOrEditZendeskConfigurationDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/zendeskAccounts/edit/zendeskConfigurations/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{zendeskConfiguration:t,zendeskConfigurations:s.zendeskConfigurations,license:null,setting:null}}).finally(function(){s.getZendeskConfiguration(0)})},s.deleteZendeskConfiguration=function(e,t){var n=a.confirm().title("Are you sure want to delete the zendeskConfiguration?").htmlContent("<b>"+(t.name||"zendeskConfiguration")+"</b> will be deleted.").ariaLabel("delete zendeskConfiguration").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){i.intZendeskConfiguration.delete({id:t.id}).$promise.then(function(){_.remove(s.zendeskConfigurations,{id:t.id}),o.success({title:"ZendeskConfiguration deleted!",msg:t.name?t.name+" has been deleted!":""})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})}).finally(function(){s.getZendeskConfiguration(0)})},function(){console.log("CANCEL")})},s.selectChangedAdvanced=function(){return i.intSalesforceConfiguration.update({id:s.zendeskConfiguration.id},s.zendeskConfiguration).$promise.then(function(){o.success({title:"Module updated!",msg:"Module has been updated!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.selectedTags=[],s.selectTagsChanged=function(e){i.intZendeskConfiguration.setTags({id:s.zendeskConfiguration.id,ids:s.selectedTags}).$promise.then(function(){o.success({title:"Tags set!",msg:"Tags has been set!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:ADDTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})})},i.tag.get({nolimit:!0,sort:"name"}).$promise.then(function(e){s.tags=e.rows?e.rows:[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.selectedSubjects=[],s.createOrEditSubject=function(e,t){a.show({controller:"CreateOrEditZendeskAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/zendeskAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"subject",item:t,items:s.subjects,configuration:s.zendeskConfiguration,account:s.zendeskAccount,license:null,setting:null}})},s.deleteSubjectConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the subject?").htmlContent("<b>Subject</b> will be deleted.").ariaLabel("delete subject").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){r(t)},function(){console.log("CANCEL")})},s.deleteSelectedSubjects=function(e){var t=a.confirm().title("Are you sure want to delete the selected subjects?").htmlContent("<b>"+s.selectedSubjects.length+" selected</b> will be deleted.").ariaLabel("delete subjects").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedSubjects.forEach(function(e){r(e)}),s.selectedSubjects=[]})},s.selectedDescriptions=[],s.createOrEditDescription=function(e,t){a.show({controller:"CreateOrEditZendeskAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/zendeskAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"description",item:t,items:s.descriptions,configuration:s.zendeskConfiguration,account:s.zendeskAccount,license:null,setting:null}})},s.deleteDescriptionConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the description?").htmlContent("<b>Description</b> will be deleted.").ariaLabel("delete description").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){l(t)},function(){console.log("CANCEL")})},s.deleteSelectedDescriptions=function(e){var t=a.confirm().title("Are you sure want to delete the selected descriptions?").htmlContent("<b>"+s.selectedDescriptions.length+" selected</b> will be deleted.").ariaLabel("delete descriptions").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedDescriptions.forEach(function(e){l(e)}),s.selectedDescriptions=[]})},s.selectedFields=[],s.createOrEditField=function(e,t){a.show({controller:"CreateOrEditZendeskAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/zendeskAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"field",item:t,items:s.fields,configuration:s.zendeskConfiguration,account:s.zendeskAccount,license:null,setting:null}})},s.deleteFieldConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the field?").htmlContent("<b>Field</b> will be deleted.").ariaLabel("delete field").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){d(t)},function(){console.log("CANCEL")})},s.deleteSelectedFields=function(e){var t=a.confirm().title("Are you sure want to delete the selected fields?").htmlContent("<b>"+s.selectedFields.length+" selected</b> will be deleted.").ariaLabel("delete fields").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedFields.forEach(function(e){d(e)}),s.selectedFields=[]})}}e.$inject=["$mdDialog","$document","api","toasty","Auth"],angular.module("app.integrations").controller("ZendeskAccountConfigurationsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_ZENDESKCONFIGURATION",m.zendeskConfiguration=angular.copy(s),m.zendeskConfigurations=o,m.newZendeskConfiguration=!1,m.zendeskConfiguration||(m.zendeskConfiguration={channel:"voice",type:"inbound"},m.title="INTEGRATIONS.NEW_ZENDESKCONFIGURATION",m.newZendeskConfiguration=!0),m.addNewZendeskConfiguration=function(){m.errors=[],r.intZendeskAccount.addConfiguration({id:t.params.id},m.zendeskConfiguration).$promise.then(function(e){m.zendeskConfigurations.unshift(e.toJSON()),i.success({title:"ZendeskConfiguration properly created",msg:m.zendeskConfiguration.name?m.zendeskConfiguration.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZendeskConfiguration.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZendeskConfiguration.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveZendeskConfiguration=function(){m.errors=[],r.intZendeskConfiguration.update({id:m.zendeskConfiguration.id},m.zendeskConfiguration).$promise.then(function(e){var t=_.find(m.zendeskConfigurations,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"ZendeskConfiguration properly saved!",msg:m.zendeskConfiguration.name?m.zendeskConfiguration.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZendeskConfiguration.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZendeskConfiguration.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteZendeskConfiguration=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The zendeskConfiguration will be deleted.").ariaLabel("Delete ZendeskConfiguration").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intZendeskConfiguration.delete({id:m.zendeskConfiguration.id}).$promise.then(function(){_.remove(m.zendeskConfigurations,{id:m.zendeskConfiguration.id}),i.success({title:"ZendeskConfiguration properly deleted!",msg:(m.zendeskConfiguration.name||"zendeskConfiguration")+" has been deleted!"}),u(m.zendeskConfiguration)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZendeskConfiguration.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZendeskConfiguration.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","zendeskConfigurations","zendeskConfiguration","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditZendeskConfigurationDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.zendeskAccounts=r||{count:0,rows:[]},v.table="zendeskAccounts",v.listOrder="",v.listOrderAsc=null,v.selectedZendeskAccounts=[],v.query={fields:"createdAt,updatedAt,id,name,type,username,remoteUri,authType,password,token,serverUrl,description",limit:10,page:1},v.arraytype=_.keyBy([{option:"Integration_Tab",value:"'integrationTab'"},{option:"New_Tab",value:"'newTab'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayauthType=_.keyBy([{option:"Password",value:"'password'"},{option:"Token",value:"'token'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.integrations.zendeskAccounts.edit",{id:e.id,zendeskAccount:e})},v.testtestintegrationaccount=function(e,t){return l.intZendeskAccount.getFields({id:e.id,test:!0}).$promise.then(function(){c.success({title:"ZendeskAccount properly tested",msg:"Connection succeded!"})}).catch(function(e){c.error({title:"ZendeskAccount properly tested",msg:e.data?e.data.message?e.data.message:JSON.stringify(e.data):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the zendeskAccount?").htmlContent("<b>"+(e.name||"zendeskAccount")+"</b> will be deleted.").ariaLabel("delete zendeskAccount").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getZendeskAccounts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.intZendeskAccount.get(v.query,f).$promise},v.createOrEditZendeskAccount=function(e,t){i.show({controller:"CreateOrEditZendeskAccountDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/zendeskAccounts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{zendeskAccount:t,zendeskAccounts:v.zendeskAccounts.rows,license:v.license,setting:v.setting}})},v.deleteZendeskAccount=A,v.exportSelectedZendeskAccounts=function(){var e=angular.copy(v.selectedZendeskAccounts);return v.selectedZendeskAccounts=[],e},v.deleteSelectedZendeskAccounts=function(e){var t=i.confirm().title("Are you sure want to delete the selected zendeskAccounts?").htmlContent("<b>"+v.selectedZendeskAccounts.length+" selected</b> will be deleted.").ariaLabel("delete ZendeskAccounts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedZendeskAccounts.forEach(function(e){A(e)}),v.selectedZendeskAccounts=[]})},v.deselectZendeskAccounts=function(){v.selectedZendeskAccounts=[]},v.selectAllZendeskAccounts=function(){v.selectedZendeskAccounts=v.zendeskAccounts.rows};var h=!0,b=1;function f(e){v.zendeskAccounts=e||{count:0,rows:[]}}function A(e){l.intZendeskAccount.delete({id:e.id}).$promise.then(function(){_.remove(v.zendeskAccounts.rows,{id:e.id}),v.zendeskAccounts.count-=1,v.zendeskAccounts.rows.length||v.getZendeskAccounts(),c.success({title:"ZendeskAccount deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEintZendeskAccount"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEintZendeskAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getZendeskAccounts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","zendeskAccounts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.integrations").controller("ZendeskAccountsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_ZOHOACCOUNT",m.zohoAccount=angular.copy(s),m.zohoAccounts=o,m.newZohoAccount=!1,m.zohoAccount||(m.zohoAccount={host:"zoho.com",serverUrl:n.protocol()+"://"+n.host()+(n.port()?":"+n.port():"")},m.title="INTEGRATIONS.NEW_ZOHOACCOUNT",m.newZohoAccount=!0),m.addNewZohoAccount=function(){m.errors=[],r.intZohoAccount.save(m.zohoAccount).$promise.then(function(e){m.zohoAccounts.unshift(e.toJSON()),i.success({title:"ZohoAccount properly created",msg:m.zohoAccount.name?m.zohoAccount.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZohoAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZohoAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveZohoAccount=function(){m.errors=[],r.intZohoAccount.update({id:m.zohoAccount.id},m.zohoAccount).$promise.then(function(e){var t=_.find(m.zohoAccounts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"ZohoAccount properly saved!",msg:m.zohoAccount.name?m.zohoAccount.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZohoAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZohoAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteZohoAccount=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The zohoAccount will be deleted.").ariaLabel("Delete ZohoAccount").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intZohoAccount.delete({id:m.zohoAccount.id}).$promise.then(function(){_.remove(m.zohoAccounts,{id:m.zohoAccount.id}),i.success({title:"ZohoAccount properly deleted!",msg:(m.zohoAccount.name||"zohoAccount")+" has been deleted!"}),u(m.zohoAccount)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZohoAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZohoAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","zohoAccounts","zohoAccount","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditZohoAccountDialogController",e)}(),function(){"use strict";function e(a,n,i,o,e){var s=this;function r(e){i.intZohoField.delete({id:e.id}).$promise.then(function(){_.remove(s.subjects,{id:e.id}),o.success({title:"Subject deleted!",msg:"Subject has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function l(e){i.intZohoField.delete({id:e.id}).$promise.then(function(){_.remove(s.descriptions,{id:e.id}),o.success({title:"Description deleted!",msg:"Description has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}function d(e){i.intZohoField.delete({id:e.id}).$promise.then(function(){_.remove(s.fields,{id:e.id}),o.success({title:"Field deleted!",msg:"Field has been deleted!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}s.currentUser=e.getCurrentUser(),s.zohoAccount={},s.zohoConfiguration={},s.configurations=[],s.selectedZohoConfiguration=-1,s.init=function(e){s.zohoAccount=e,i.intZohoAccount.getConfigurations({id:s.zohoAccount.id,sort:"-updatedAt"}).$promise.then(function(e){return s.configurations=e.rows?e.rows:[],s.configurations.length&&s.getZohoConfiguration(0),i.variable.get({nolimit:!0,sort:"name"}).$promise}).then(function(e){s.variables=e.rows?e.rows:[],s.variablesById=_.keyBy(s.variables,"id")}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETCONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.getZohoConfiguration=function(e){s.zohoConfiguration=s.configurations[e],s.selectedZohoConfiguration=e,i.intZohoConfiguration.getSubjects({id:s.zohoConfiguration.id}).$promise.then(function(e){return s.subjects=e.rows?e.rows:[],i.intZohoConfiguration.getDescriptions({id:s.zohoConfiguration.id}).$promise}).then(function(e){return s.descriptions=e.rows?e.rows:[],i.intZohoConfiguration.getFields({id:s.zohoConfiguration.id}).$promise}).then(function(e){s.fields=e.rows?e.rows:[]}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.createOrEditZohoConfiguration=function(e,t){a.show({controller:"CreateOrEditZohoConfigurationDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/zohoAccounts/edit/configurations/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{zohoConfiguration:t,configurations:s.configurations,license:null,setting:null}}).finally(function(){s.getZohoConfiguration(0)})},s.deleteZohoConfiguration=function(e,t){var n=a.confirm().title("Are you sure want to delete the zohoConfiguration?").htmlContent("<b>"+(t.name||"zohoConfiguration")+"</b> will be deleted.").ariaLabel("delete zohoConfiguration").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){i.intZohoConfiguration.delete({id:t.id}).$promise.then(function(){_.remove(s.configurations,{id:t.id}),o.success({title:"ZohoConfiguration deleted!",msg:t.name?t.name+" has been deleted!":""})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETECONFIGURATION",msg:e.data?JSON.stringify(e.data):e.toString()})}).finally(function(){s.getZohoConfiguration(0)})},function(){console.log("CANCEL")})},s.selectChangedAdvanced=function(){return i.intSalesforceConfiguration.update({id:s.zohoConfiguration.id},s.zohoConfiguration).$promise.then(function(){o.success({title:"Module updated!",msg:"Module has been updated!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATECONFIGURATIONFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.selectedSubjects=[],s.createOrEditSubject=function(e,t){a.show({controller:"CreateOrEditZohoAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/zohoAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"subject",item:t,items:s.subjects,configuration:s.zohoConfiguration,account:s.zohoAccount,license:null,setting:null}})},s.deleteSubjectConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the subject?").htmlContent("<b>Subject</b> will be deleted.").ariaLabel("delete subject").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){r(t)},function(){console.log("CANCEL")})},s.deleteSelectedSubjects=function(e){var t=a.confirm().title("Are you sure want to delete the selected subjects?").htmlContent("<b>"+s.selectedSubjects.length+" selected</b> will be deleted.").ariaLabel("delete subjects").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedSubjects.forEach(function(e){r(e)}),s.selectedSubjects=[]})},s.selectedDescriptions=[],s.createOrEditDescription=function(e,t){a.show({controller:"CreateOrEditZohoAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/zohoAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"description",item:t,items:s.descriptions,configuration:s.zohoConfiguration,account:s.zohoAccount,license:null,setting:null}})},s.deleteDescriptionConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the description?").htmlContent("<b>Description</b> will be deleted.").ariaLabel("delete description").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){l(t)},function(){console.log("CANCEL")})},s.deleteSelectedDescriptions=function(e){var t=a.confirm().title("Are you sure want to delete the selected descriptions?").htmlContent("<b>"+s.selectedDescriptions.length+" selected</b> will be deleted.").ariaLabel("delete descriptions").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedDescriptions.forEach(function(e){l(e)}),s.selectedDescriptions=[]})},s.selectedFields=[],s.createOrEditField=function(e,t){a.show({controller:"CreateOrEditZohoAccountItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/zohoAccounts/edit/item/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{type:"field",item:t,items:s.fields,configuration:s.zohoConfiguration,account:s.zohoAccount,license:null,setting:null}})},s.deleteFieldConfirm=function(e,t){var n=a.confirm().title("Are you sure want to delete the field?").htmlContent("<b>Field</b> will be deleted.").ariaLabel("delete field").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){d(t)},function(){console.log("CANCEL")})},s.deleteSelectedFields=function(e){var t=a.confirm().title("Are you sure want to delete the selected fields?").htmlContent("<b>"+s.selectedFields.length+" selected</b> will be deleted.").ariaLabel("delete fields").targetEvent(e).ok("OK").cancel("CANCEL");a.show(t).then(function(){s.selectedFields.forEach(function(e){d(e)}),s.selectedFields=[]})}}e.$inject=["$mdDialog","$document","api","toasty","Auth"],angular.module("app.integrations").controller("ZohoAccountConfigurationsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="INTEGRATIONS.EDIT_ZOHOCONFIGURATION",m.zohoConfiguration=angular.copy(s),m.configurations=o,m.newZohoConfiguration=!1,m.zohoConfiguration||(m.zohoConfiguration={channel:"voice",type:"inbound"},m.title="INTEGRATIONS.NEW_ZOHOCONFIGURATION",m.newZohoConfiguration=!0),m.addNewZohoConfiguration=function(){m.errors=[],r.intZohoAccount.addConfiguration({id:t.params.id},m.zohoConfiguration).$promise.then(function(e){m.configurations.unshift(e.toJSON()),i.success({title:"ZohoConfiguration properly created",msg:m.zohoConfiguration.name?m.zohoConfiguration.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZohoConfiguration.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZohoConfiguration.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveZohoConfiguration=function(){m.errors=[],r.intZohoConfiguration.update({id:m.zohoConfiguration.id},m.zohoConfiguration).$promise.then(function(e){var t=_.find(m.configurations,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"ZohoConfiguration properly saved!",msg:m.zohoConfiguration.name?m.zohoConfiguration.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZohoConfiguration.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZohoConfiguration.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteZohoConfiguration=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The zohoConfiguration will be deleted.").ariaLabel("Delete ZohoConfiguration").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.intZohoConfiguration.delete({id:m.zohoConfiguration.id}).$promise.then(function(){_.remove(m.configurations,{id:m.zohoConfiguration.id}),i.success({title:"ZohoConfiguration properly deleted!",msg:(m.zohoConfiguration.name||"zohoConfiguration")+" has been deleted!"}),u(m.zohoConfiguration)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.intZohoConfiguration.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.intZohoConfiguration.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configurations","zohoConfiguration","api","Auth","license","setting"],angular.module("app.integrations").controller("CreateOrEditZohoConfigurationDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(){a.hide()}m.errors=[],m.title="INTEGRATIONS.EDIT_"+_.toUpper(d),m.item=angular.copy(r),m.items=s,m.type=d,m.newItem=!1,m.item||(m.item={type:"string"},m.item[_.capitalize(d)+"Id"]=o.id,m.title="INTEGRATIONS.NEW_"+_.toUpper(d),m.newItem=!0),m.addNewItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intZohoField.save(m.item).$promise.then(function(e){m.items.unshift(e),i.success({title:_.capitalize(d)+" properly created",msg:_.capitalize(d)+" has been created!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.save"}]})},m.saveItem=function(){m.errors=[],m.customField&&(m.item.idField=m.customField.id,m.item.nameField=m.customField.name,m.item.customField=m.customField.custom);c.intZohoField.update({id:m.item.id},m.item).$promise.then(function(e){var t=_.find(m.items,{id:e.id});t&&_.merge(t,e),i.success({title:_.capitalize(d)+" properly saved!",msg:_.capitalize(d)+" has been saved!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.intItem.update"}]})},m.deleteItem=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The "+d+" will be deleted.").ariaLabel("Delete "+_.capitalize(d)).ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){c.intZohoField.delete({id:m.item.id}).$promise.then(function(){_.remove(m.items,{id:m.item.id}),i.success({title:_.capitalize(d)+" properly deleted!",msg:_.capitalize(d)+" has been deleted!"}),u()}).catch(function(e){console.error(e),m.errors=e.data.errors||[{message:e.toString(),type:"api.item.delete"}]})},function(){})},m.getSelectedVariable=function(){return void 0!==m.item.variableName?m.item.variableName:"Please select a variable"},m.closeDialog=u,c.variable.get({nolimit:!0}).$promise.then(function(e){return m.variables=e.rows?e.rows:[],c.voiceAgentReport.describe().$promise}).then(function(e){return m.voiceAgentReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceAgentReportColumns.push("recordingURL"),c.voiceDialReport.describe().$promise}).then(function(e){m.voiceDialReportColumns=_.difference(_.keys(e),["$promise","$resolved","createdAt","updatedAt","sourceid"]),m.voiceDialReportColumns.push("recordingURL")}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETVARIABLES",msg:e.data?JSON.stringify(e.data):e.toString()})}),c.intZohoAccount.getFields({id:l.id}).$promise.then(function(e){m.accountConnected=!0,m.fields=e.rows?e.rows:[],m.item.idField&&(m.customField=_.find(m.fields,{id:m.item.idField}))}).catch(function(e){m.accountConnected=!1,console.error(e)})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","configuration","items","item","account","type","api"],angular.module("app.integrations").controller("CreateOrEditZohoAccountItemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.zohoAccount=d||e.params.zohoAccount||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoZohoAccounts=function(){e.go("app.integrations.zohoAccounts")},c.saveZohoAccount=function(){s.intZohoAccount.update({id:c.zohoAccount.id},c.zohoAccount).$promise.then(function(){r.success({title:"ZohoAccount updated!",msg:c.zohoAccount.name?c.zohoAccount.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETintZohoAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","zohoAccount"],angular.module("app.integrations").controller("ZohoAccountController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.zohoAccounts=r||{count:0,rows:[]},v.table="zohoAccounts",v.listOrder="",v.listOrderAsc=null,v.selectedZohoAccounts=[],v.query={fields:"createdAt,updatedAt,id,name,host,authToken,serverUrl,description",limit:10,page:1},v.arrayhost=_.keyBy([{option:"zoho.com",value:"'zoho.com'"},{option:"zoho.eu",value:"'zoho.eu'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.integrations.zohoAccounts.edit",{id:e.id,zohoAccount:e})},v.testtestintegrationaccount=function(e,t){return l.intZohoAccount.getFields({id:e.id,test:!0}).$promise.then(function(){c.success({title:"ZohoAccount properly tested",msg:"Connection succeded!"})}).catch(function(e){c.error({title:"ZohoAccount properly tested",msg:e.data?e.data.message?e.data.message:JSON.stringify(e.data):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the zohoAccount?").htmlContent("<b>"+(e.name||"zohoAccount")+"</b> will be deleted.").ariaLabel("delete zohoAccount").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getZohoAccounts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.intZohoAccount.get(v.query,f).$promise},v.createOrEditZohoAccount=function(e,t){i.show({controller:"CreateOrEditZohoAccountDialogController",controllerAs:"vm",templateUrl:"app/main/apps/integrations/views/zohoAccounts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{zohoAccount:t,zohoAccounts:v.zohoAccounts.rows,license:v.license,setting:v.setting}})},v.deleteZohoAccount=A,v.exportSelectedZohoAccounts=function(){var e=angular.copy(v.selectedZohoAccounts);return v.selectedZohoAccounts=[],e},v.deleteSelectedZohoAccounts=function(e){var t=i.confirm().title("Are you sure want to delete the selected zohoAccounts?").htmlContent("<b>"+v.selectedZohoAccounts.length+" selected</b> will be deleted.").ariaLabel("delete ZohoAccounts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedZohoAccounts.forEach(function(e){A(e)}),v.selectedZohoAccounts=[]})},v.deselectZohoAccounts=function(){v.selectedZohoAccounts=[]},v.selectAllZohoAccounts=function(){v.selectedZohoAccounts=v.zohoAccounts.rows};var h=!0,b=1;function f(e){v.zohoAccounts=e||{count:0,rows:[]}}function A(e){l.intZohoAccount.delete({id:e.id}).$promise.then(function(){_.remove(v.zohoAccounts.rows,{id:e.id}),v.zohoAccounts.count-=1,v.zohoAccounts.rows.length||v.getZohoAccounts(),c.success({title:"ZohoAccount deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEintZohoAccount"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEintZohoAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getZohoAccounts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","zohoAccounts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.integrations").controller("ZohoAccountsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="JSCRIPTY.EDIT_PROJECT",m.project=angular.copy(s),m.projects=o,m.newProject=!1,m.project||(m.project={enableUncompleteSave:!0},m.title="JSCRIPTY.NEW_PROJECT",m.newProject=!0),m.addNewProject=function(){m.errors=[],r.jscriptyProject.save(m.project).$promise.then(function(e){m.projects.unshift(e.toJSON()),i.success({title:"Project properly created",msg:m.project.name?m.project.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.jscriptyProject.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.jscriptyProject.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveProject=function(){m.errors=[],r.jscriptyProject.update({id:m.project.id},m.project).$promise.then(function(e){var t=_.find(m.projects,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Project properly saved!",msg:m.project.name?m.project.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.jscriptyProject.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.jscriptyProject.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteProject=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The project will be deleted.").ariaLabel("Delete Project").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.jscriptyProject.delete({id:m.project.id}).$promise.then(function(){_.remove(m.projects,{id:m.project.id}),i.success({title:"Project properly deleted!",msg:(m.project.name||"project")+" has been deleted!"}),u(m.project)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.jscriptyProject.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.jscriptyProject.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","projects","project","api","Auth","license","setting"],angular.module("app.jscripty").controller("CreateOrEditProjectDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o){var s=this;s.project={},s.localizationMap=o;var r=new Date;r.setHours(0,0,0,0),s.pickerModel={dateStart:r,dateEnd:null,selectedTemplate:"TD"},s.init=function(e){s.project=e,s.getAnswers()},s.getSummary=function(){var e=n.document.createElement("a");e.href="/api/jscripty/projects/"+s.project.id+"/summary",e.target="_self",e.click()},s.getAnswers=function(){return s.hasIdAnswers=!1,a.jscriptyProject.getAnswers({id:s.project.id,sort:"-createdAt,questionId",dateStart:s.pickerModel.dateStart,dateEnd:s.pickerModel.dateEnd,nolimit:!0}).$promise.then(function(e){if(e&&e.rows&&e.hasOwnProperty("count")){s.answers={};for(var t=0,n=e.count;t<n;t++)e.rows[t].questionId&&(s.hasIdAnswers=!0,s.answers.hasOwnProperty(e.rows[t].questionId)||(s.answers[e.rows[t].questionId]={question:e.rows[t].question,answers:{},sum:0}),""===e.rows[t].answer&&(e.rows[t].answer="NO_ANSWER"),s.answers[e.rows[t].questionId].answers[e.rows[t].answer]?s.answers[e.rows[t].questionId].answers[e.rows[t].answer]+=1:s.answers[e.rows[t].questionId].answers[e.rows[t].answer]=1,s.answers[e.rows[t].questionId].sum+=1)}}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETANSWERS",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$mdDialog","$document","$window","api","toasty","dateFilterLocalizationFactory"],angular.module("app.jscripty").controller("ProjectAnswersController",e)}(),function(){"use strict";angular.module("app.jscripty").controller("ProjectBuilderController",function(){var t=this;t.project={},t.optionsBuilder={questionTypes:["text","textarea","radio","checkbox","select","number","date","time","email","range","url"],elementTypes:["question","paragraph"]},t.init=function(e){t.project=e,_.isObjectLike(e.formData)?t.project.formData=e.formData:t.isJsonString(e.formData)?t.project.formData=JSON.parse(e.formData):t.project.formData={}},t.isJsonString=function(e){if(_.isNil(e))return!1;try{JSON.parse(e)}catch(e){return!1}return!0}})}(),function(){"use strict";function e(t,n,a,e,i,o,s){var r=this;function l(e){t.hide(e)}r.newProject=!0,r.project=angular.copy(i),r.projects=o,r.title=s.instant("JSCRIPTY.CLONE_PROJECT"),i&&i.name&&(r.title+=": "+i.name),r.cloneProject=function(){return e.jscriptyProject.clone({id:i.id},r.project).$promise.then(function(e){r.projects.unshift(e.toJSON()),a.success({title:"Project properly cloned",msg:r.project.name?r.project.name+" has been cloned!":""}),n.go("app.jscripty.projects.edit",{id:e.id}),l(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){r.errors=e.data.errors||[{message:e.toString(),type:"api.jscriptyProject.clone"}];for(var t=0;t<e.data.errors.length;t+=1)a.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.jscriptyProject.clone",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},r.closeDialog=l}e.$inject=["$mdDialog","$state","toasty","api","project","projects","$translate"],angular.module("app.jscripty").controller("ProjectcloneController",e)}(),function(){"use strict";function e(a,i,t){var s=this;s.project={},s.responseData={},s.formViewer={},s.init=function(e){s.project=e,t.$on("mwForm.pageEvents.pageCurrentChanged",function(e,t){if(t.currentPage&&s.project.formData&&s.project.formData.pages)for(var n=0,a=s.project.formData.pages.length;n<a;n++)if(t.currentPage.number<n+1&&s.project.formData.pages[n].elements)for(var i=0,o=s.project.formData.pages[n].elements.length;i<o;i++)"question"===s.project.formData.pages[n].elements[i].type&&s.project.formData.pages[n].elements[i].question&&delete s.responseData[s.project.formData.pages[n].elements[i].question.id]})},s.onSubmit=function(e){var t=a.defer(),n=i.confirm().title("Would you like to save your survey?").textContent("").ariaLabel("survey").targetEvent(e).ok("SAVE").cancel("CANCEL");return i.show(n).then(function(){t.resolve(!0)},function(){t.reject()}),t.promise},s.resetViewer=function(){s.formViewer.reset&&s.formViewer.reset()}}e.$inject=["$q","$mdDialog","$scope"],angular.module("app.jscripty").controller("ProjectViewerController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.project={},c.projectSessions={count:0,rows:[]},c.selectedProjectSessions=[],c.query={fields:"createdAt,updatedAt,id,starttime,endtime,membername,calleridnum,completed",sort:"-starttime",limit:10,page:1},c.init=function(e){c.project=e,c.query.id=c.project.id,c.getProjectSessions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the session?").htmlContent("<b>"+(e.name||"session")+"</b> will be deleted.").ariaLabel("delete session").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getProjectSessions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.jscriptyProject.getSessions(c.query,p).$promise},c.createOrEditProjectSession=function(e,t){o.show({controller:"CreateOrEditSessionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/jscripty/views/projects/edit/sessions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{project:c.project,session:t,sessions:c.projectSessions.rows,license:null,setting:null}})},c.showQuestionsProjectSession=function(e,n){o.show({controller:"ShowQuestionsSessionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/jscripty/views/projects/edit/sessions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,resolve:{questions:["apiResolver","$stateParams",function(e,t){return e.resolve("jscriptySessionReport@getQuestions",{fields:"question,answer",sort:"id",id:n.id})}]},locals:{project:c.project,session:n}})},c.exportSelectedProjectSessions=function(){var e=angular.copy(c.selectedProjectSessions);return c.selectedProjectSessions=[],e},c.deleteProjectSession=g,c.deleteSelectedProjectSessions=function(e){var t=o.confirm().title("Are you sure want to delete the selected sessions?").htmlContent("<b>"+c.selectedProjectSessions.length+" selected</b> will be deleted.").ariaLabel("delete sessions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedProjectSessions.forEach(function(e){g(e)}),c.selectedProjectSessions=[]})};var m=!0,u=1;function p(e){c.projectSessions=e||{count:0,rows:[]}}function g(e){l.jscriptySessionReport.delete({id:e.id}).$promise.then(function(){_.remove(c.projectSessions.rows,{id:e.id}),c.projectSessions.count-=1,c.projectSessions.rows.length||c.getProjectSessions(),r.success({title:"Session deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETjscriptyProject"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETjscriptyProject",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getProjectSessions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.jscripty").controller("ProjectSessionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l){this.title="JSCRIPTY.SESSION_RESULTS",this.session=o,this.questions=s,this.project=r,this.closeDialog=function(e){a.hide(e)}}e.$inject=["$scope","$state","$location","$mdDialog","toasty","session","questions","project","api"],angular.module("app.jscripty").controller("ShowQuestionsSessionDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.project=d||e.params.project||{},c.selectedTab=e.params.tab||0,c.clonedialog=function(e,t){n.show({controller:"ProjectcloneController",controllerAs:"vm",templateUrl:"app/main/apps/jscripty/views/projects/edit/clone/clone.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{project:e,projects:c.projects?c.projects.rows:[]}})},c.alert=r.info,c.gotoProjects=function(){e.go("app.jscripty.projects")},c.saveProject=function(){s.jscriptyProject.update({id:c.project.id},c.project).$promise.then(function(){r.success({title:"Project updated!",msg:c.project.name?c.project.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETjscriptyProject",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","project"],angular.module("app.jscripty").controller("JscriptyProjectController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.projects=r||{count:0,rows:[]},v.table="projects",v.listOrder="",v.listOrderAsc=null,v.selectedProjects=[],v.query={fields:"createdAt,updatedAt,id,name,enableUncompleteSave,description,createdAt,formData",sort:"-updatedAt",limit:10,page:1},v.editstate=function(e,t){n.go("app.jscripty.projects.edit",{id:e.id,project:e})},v.clonedialog=function(e,t){i.show({controller:"ProjectcloneController",controllerAs:"vm",templateUrl:"app/main/apps/jscripty/views/projects/edit/clone/clone.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{project:e,projects:v.projects?v.projects.rows:[]}})},v.sessionsgoto=function(e,t){n.go("app.jscripty.projects.edit",{id:e.id,tab:3})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the project?").htmlContent("<b>"+(e.name||"project")+"</b> will be deleted.").ariaLabel("delete project").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getProjects=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.jscriptyProject.get(v.query,f).$promise},v.createOrEditProject=function(e,t){i.show({controller:"CreateOrEditProjectDialogController",controllerAs:"vm",templateUrl:"app/main/apps/jscripty/views/projects/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{project:t,projects:v.projects.rows,license:v.license,setting:v.setting}})},v.deleteProject=A,v.exportSelectedProjects=function(){var e=angular.copy(v.selectedProjects);return v.selectedProjects=[],e},v.deleteSelectedProjects=function(e){var t=i.confirm().title("Are you sure want to delete the selected projects?").htmlContent("<b>"+v.selectedProjects.length+" selected</b> will be deleted.").ariaLabel("delete Projects").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedProjects.forEach(function(e){A(e)}),v.selectedProjects=[]})},v.deselectProjects=function(){v.selectedProjects=[]},v.selectAllProjects=function(){v.selectedProjects=v.projects.rows};var h=!0,b=1;function f(e){v.projects=e||{count:0,rows:[]}}function A(e){l.jscriptyProject.delete({id:e.id}).$promise.then(function(){_.remove(v.projects.rows,{id:e.id}),v.projects.count-=1,v.projects.rows.length||v.getProjects(),c.success({title:"Project deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEjscriptyProject"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEjscriptyProject",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getProjects())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","projects","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.jscripty").controller("JscriptyProjectsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="MAIL.EDIT_MAILACCOUNT",m.mailAccount=angular.copy(s),m.mailAccounts=o,m.newMailAccount=!1,m.mailAccount||(m.mailAccount={active:!0,cservice:"null",cauthentication:!0,fontSize:13,waitForTheAssignedAgent:10,notificationSound:!0},m.title="MAIL.NEW_MAILACCOUNT",m.newMailAccount=!0),t.params.id&&(m.mailAccount.MailAccountId=t.params.id),m.addNewMailAccount=function(){m.errors=[],r.mailAccount.save(m.mailAccount).$promise.then(function(e){m.mailAccounts.unshift(e.toJSON()),i.success({title:"MailAccount properly created",msg:m.mailAccount.name?m.mailAccount.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveMailAccount=function(){m.errors=[],r.mailAccount.update({id:m.mailAccount.id},m.mailAccount).$promise.then(function(e){var t=_.find(m.mailAccounts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"MailAccount properly saved!",msg:m.mailAccount.name?m.mailAccount.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteMailAccount=function(e){if(m.mailAccount.service)return i.error({title:"Mail Account not deleted!",msg:"You can't remove service account"});m.errors=[];var t=a.confirm().title("Are you sure?").content("The mailAccount will be deleted.").ariaLabel("Delete MailAccount").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.mailAccount.delete({id:m.mailAccount.id}).$promise.then(function(){_.remove(m.mailAccounts,{id:m.mailAccount.id}),i.success({title:"MailAccount properly deleted!",msg:(m.mailAccount.name||"mailAccount")+" has been deleted!"}),u(m.mailAccount)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.lists=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","mailAccounts","mailAccount","api","Auth","license","setting"],angular.module("app.mail").controller("CreateOrEditMailAccountDialogController",e)}(),function(){"use strict";function e(s,i,a,o,e){var r=this;function t(e,t){if(r.mailAccountApps.rows.length){var n=r.mailAccountApps.rows[t]?r.mailAccountApps.rows[t]:r.mailAccountApps.rows[0];i.show({controller:"EditMailAccountApp"+(n.appType||n.app).toLowerCase()+"DialogController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailAccounts/edit/apps/"+(n.appType||n.app).toLowerCase()+"/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{mailAccountApp:n,mailAccount:r.mailAccount}}).then(function(e){e&&(e.id?r.mailAccountApps.rows[t]=e:r.mailAccountApps.rows.splice(t,0,e),l())}).catch(function(e){e&&o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:EDITMODALSHOW",msg:e.data?JSON.stringify(e.data):e.toString()})})}}function l(){for(var e=1,t=[],n=0;n<r.mailAccountApps.rows.length;n++,0){var a=r.mailAccountApps.rows[n],i=[],o=[];a.intervals="*,*,*,*"!==a.interval?[a.interval]:a.IntervalId?_.map(_.filter(r.intervals.rows,{IntervalId:a.IntervalId}),"interval"):[],a.context=r.mailAccount.context,a.exten=r.mailAccount.exten,a.type&&(a.type=a.type.toLowerCase()),a.priority=i.length?_.last(i).priority+1:e,e=(o.length?_.last(o).priority:a.priority)+1,t=_.concat(t,i,[a],o)}s.mailAccount.addApplications({id:r.mailAccount.id},_.sortBy(t,"priority")).$promise.then(function(e){r.mailAccountApps.rows=e.rows}).catch(function(e){console.error(e)})}function n(e){r.mailAccountApps=e||{count:0,rows:[]}}r.currentUser=e.getCurrentUser(),r.mailAccount={},r.mailAccountApps={count:0,rows:[]},r.selectedMailAccountApps=[],r.query={sort:"priority"},r.apps=_.reject(_.sortBy([{app:"Interval",appType:"interval",types:["always","custom","list"],fields:[],isApp:!1},{app:"noop",appType:"noop",type:"noop",icon:"icon-apps",interval:"*,*,*,*",required:!0,isApp:!0,fields:[{title:"Value",name:"value",type:"text",param:0}]},{app:"system",appType:"system",type:"system",icon:"icon-apps",interval:"*,*,*,*",required:!0,isApp:!0,extraApi:[{name:"variables",route:"variable",filters:{fields:"id,name",sort:"name",nolimit:!0}}],fields:[{title:"Command",name:"command",type:"text",required:!0,param:0},{title:"Variable",name:"variable",type:"apiselect",values:"variables",value:"variable.name",option:"variable.name",defaultValues:[{value:"''",option:"None"}],defaultValue:"''",param:1}]},{app:"gotop",appType:"gotop",type:"goto",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Priority",name:"priority",type:"number",required:!0,min:0,param:0}]},{app:"gotoif",appType:"gotoif",type:"gotoif",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Condition",name:"condition",type:"text",required:!0,param:0},{title:"truepriority",name:"truepriority",type:"number",min:1,required:!0,param:1},{title:"falsepriority",name:"falsepriority",type:"number",min:1,required:!0,param:2}]},{app:"queue",appType:"queue",foreignKey:"MailQueueId",type:"queue",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"queues",route:"mailQueue",filters:{fields:"id,name,type",sort:"name",nolimit:!0}}],fields:[{title:"Queue",name:"queue",type:"apiselect",values:"queues",value:"queue.name",option:"queue.name",defaultValue:300,required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",max:2147483,min:0,required:!0,defaultValue:300,param:1}]},{app:"agent",appType:"agent",type:"agent",foreignKey:"UserId",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"agents",route:"user",filters:{fields:"id,name",sort:"name",nolimit:!0,role:"agent"}}],fields:[{title:"Agent",name:"agent",type:"apiselect",values:"agents",value:"agent.name",option:"agent.name",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",max:2147483,min:0,required:!0,defaultValue:30,param:1}]},{app:"autoreply",appType:"autoreply",type:"autoreply",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"times",name:"times",type:"select",defaultValue:"1",values:[{option:"One Time",value:"1"},{option:"Always",value:"0"}],required:!0,param:0},{title:"Text",name:"text",type:"html",required:!0,param:1}]},{app:"close",appType:"close",type:"close",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Disposition",name:"disposition",type:"text",required:!0,param:0}]}],["app"]),{isApp:!1}),r.list={group:{name:"opt1",pull:"clone"},animation:100,sort:!1},r.applications={group:{name:"opt2",put:"opt1"},animation:100,onAdd:function(e){t(e,e.newIndex)},onSort:function(e){l()}},r.init=function(e){r.mailAccount=e,r.query.id=e.id,r.query.isApp=!0,r.query.nolimit=!0,r.getMailAccountApps(),r.getIntervals()},r.deleteConfirm=function(e,t,n){var a=i.confirm().title("Are you sure want to delete the application?").htmlContent("<b>"+e.app+"</b> will be deleted.").ariaLabel("delete application").targetEvent(n).ok("OK").cancel("CANCEL");i.show(a).then(function(){r.mailAccountApps.rows.splice(t,1),l()},function(){console.log("CANCEL")})},r.getMailAccountApps=function(){r.promise=s.mailAccount.getApplications(r.query,n).$promise},r.editMailAccountApp=t,r.editInterval=function(e,t){if(r.mailAccountApps.rows.length){var n=r.mailAccountApps.rows[t]?r.mailAccountApps.rows[t]:r.mailAccountApps.rows[0];i.show({controller:"EditMailAccountAppintervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailAccounts/edit/apps/interval/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:{interval:n.interval,IntervalId:n.IntervalId,application:!0},intervals:[]}}).then(function(e){e&&(n.interval=e.interval||"*,*,*,*",n.IntervalId=e.IntervalId||null,l())})}},r.deleteMailAccountApp=function(e){_.remove(r.mailAccountApps.rows,{id:e.id}),l(),o.success({title:"App deleted!",msg:e.app?e.app+" has been deleted!":""})},r.deleteSelectedMailAccountApps=function(e){var t=i.confirm().title("Are you sure want to delete the selected applications?").htmlContent("<b>"+r.selectedMailAccountApps.length+" selected</b> will be deleted.").ariaLabel("delete applications").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){r.selectedMailAccountApps.forEach(function(e){_.remove(r.mailAccountApps.rows,{id:e.id})}),r.selectedMailAccountApps=[],l()})},r.rewriteRouting=l,r.getIntervals=function(){return s.interval.get({fields:"id,interval,IntervalId"}).$promise.then(function(e){r.intervals=e}).catch(function(e){console.error(e)})}}e.$inject=["api","$mdDialog","$document","toasty","Auth"],angular.module("app.mail").controller("MailAccountActionsController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="MAIL.EDIT_"+(e.appType||e.app).toUpperCase(),o.agent=angular.copy(e),o.agent.appdata)switch(o.agent.appType?o.agent.appType.toLowerCase():o.agent.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.agent.appdata.split(",");o.agent.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.agent.text=s.slice(1,s.length).join(",");break;case"message":o.agent.text=o.agent.appdata;break;case"set":o.agent.name=o.agent.appdata.split("=")[0],o.agent.value=o.agent.appdata.split("=")[1];break;case"agi":o.agent.project=o.agent.appdata;break;default:var r=o.agent.appdata.split(",");o.agent.agent=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.agent.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.agent.timeout=30;function l(e){t.hide(e)}o.agent.type&&"outbound"===o.agent.type.toLowerCase()&&"outbounddial"===o.agent.appType.toLowerCase()&&(o.agent.prefix=o.agent.phone?o.agent.phone.split("$")[0]:void 0,o.agent.callerId=o.agent.callerID?"CALLERID(all)="+o.agent.callerID:void 0),o.saveMailAccountApp=function(){o.errors=[];var e=[];o.agent.type&&"outbound"===o.agent.type.toLowerCase()&&"outboundDial"===o.agent.appType&&(o.agent.phone=a.cutdigits?(o.agent.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.agent.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.agent.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.agent.options+="U(xcally-mixmonitor-context)"):o.agent.options=o.agent.options.replace("U(xcally-mixmonitor-context)",""));var t=_.find(o.agents,{name:o.agent.agent});t&&(o.agent.UserId=t.id);if(o.agent.appType&&"custom"===o.agent.appType);else switch((o.agent.app||o.agent.appType).toLowerCase()){case"set":o.agent.appdata=o.agent.name+"="+o.agent.value;break;case"custom":break;default:e[0]=o.agent.agent,e[1]=o.agent.timeout,o.agent.appdata=e.join(",")}l(o.agent)},o.closeDialog=l,i.user.get({fields:"id,name",sort:"name",nolimit:"true",role:"agent"}).$promise.then(function(e){o.agents=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETagents",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","mailAccountApp","mailAccount","api"],angular.module("app.mail").controller("EditMailAccountAppagentDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="MAIL.EDIT_"+(n.appType||n.app).toUpperCase(),o.autoreply=angular.copy(n),o.autoreply.appdata)switch(o.autoreply.appType?o.autoreply.appType.toLowerCase():o.autoreply.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.autoreply.appdata.split(",");o.autoreply.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.autoreply.text=s.slice(1,s.length).join(",");break;case"message":o.autoreply.text=o.autoreply.appdata;break;case"set":o.autoreply.name=o.autoreply.appdata.split("=")[0],o.autoreply.value=o.autoreply.appdata.split("=")[1];break;case"agi":o.autoreply.project=o.autoreply.appdata;break;default:var r=o.autoreply.appdata.split(",");o.autoreply.times=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.autoreply.text=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.autoreply.times=1;function l(e){t.hide(e)}o.autoreply.type&&"outbound"===o.autoreply.type.toLowerCase()&&"outbounddial"===o.autoreply.appType.toLowerCase()&&(o.autoreply.prefix=o.autoreply.phone?o.autoreply.phone.split("$")[0]:void 0,o.autoreply.callerId=o.autoreply.callerID?"CALLERID(all)="+o.autoreply.callerID:void 0),o.saveMailAccountApp=function(){o.errors=[];var e=[];o.autoreply.type&&"outbound"===o.autoreply.type.toLowerCase()&&"outboundDial"===o.autoreply.appType&&(o.autoreply.phone=a.cutdigits?(o.autoreply.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.autoreply.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.autoreply.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.autoreply.options+="U(xcally-mixmonitor-context)"):o.autoreply.options=o.autoreply.options.replace("U(xcally-mixmonitor-context)",""));if(o.autoreply.appType&&"custom"===o.autoreply.appType);else switch((o.autoreply.app||o.autoreply.appType).toLowerCase()){case"set":o.autoreply.appdata=o.autoreply.name+"="+o.autoreply.value;break;case"custom":break;default:e[0]=o.autoreply.times,e[1]=o.autoreply.text,o.autoreply.appdata=e.join(",")}l(o.autoreply)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","mailAccountApp","mailAccount","api"],angular.module("app.mail").controller("EditMailAccountAppautoreplyDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="MAIL.EDIT_"+(n.appType||n.app).toUpperCase(),o.close=angular.copy(n),o.close.appdata)switch(o.close.appType?o.close.appType.toLowerCase():o.close.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.close.appdata.split(",");o.close.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.close.text=s.slice(1,s.length).join(",");break;case"message":o.close.text=o.close.appdata;break;case"set":o.close.name=o.close.appdata.split("=")[0],o.close.value=o.close.appdata.split("=")[1];break;case"agi":o.close.project=o.close.appdata;break;default:var r=o.close.appdata.split(",");o.close.disposition=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.close.type&&"outbound"===o.close.type.toLowerCase()&&"outbounddial"===o.close.appType.toLowerCase()&&(o.close.prefix=o.close.phone?o.close.phone.split("$")[0]:void 0,o.close.callerId=o.close.callerID?"CALLERID(all)="+o.close.callerID:void 0),o.saveMailAccountApp=function(){o.errors=[];var e=[];o.close.type&&"outbound"===o.close.type.toLowerCase()&&"outboundDial"===o.close.appType&&(o.close.phone=a.cutdigits?(o.close.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.close.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.close.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.close.options+="U(xcally-mixmonitor-context)"):o.close.options=o.close.options.replace("U(xcally-mixmonitor-context)",""));if(o.close.appType&&"custom"===o.close.appType);else switch((o.close.app||o.close.appType).toLowerCase()){case"set":o.close.appdata=o.close.name+"="+o.close.value;break;case"custom":break;default:e[0]=o.close.disposition,o.close.appdata=e.join(",")}l(o.close)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","mailAccountApp","mailAccount","api"],angular.module("app.mail").controller("EditMailAccountAppcloseDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="MAIL.EDIT_"+(n.appType||n.app).toUpperCase(),o.gotoif=angular.copy(n),o.gotoif.appdata)switch(o.gotoif.appType?o.gotoif.appType.toLowerCase():o.gotoif.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.gotoif.appdata.split(",");o.gotoif.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.gotoif.text=s.slice(1,s.length).join(",");break;case"message":o.gotoif.text=o.gotoif.appdata;break;case"set":o.gotoif.name=o.gotoif.appdata.split("=")[0],o.gotoif.value=o.gotoif.appdata.split("=")[1];break;case"agi":o.gotoif.project=o.gotoif.appdata;break;default:var r=o.gotoif.appdata.split(",");o.gotoif.condition=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.gotoif.truepriority=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.gotoif.falsepriority=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10)}function l(e){t.hide(e)}o.gotoif.type&&"outbound"===o.gotoif.type.toLowerCase()&&"outbounddial"===o.gotoif.appType.toLowerCase()&&(o.gotoif.prefix=o.gotoif.phone?o.gotoif.phone.split("$")[0]:void 0,o.gotoif.callerId=o.gotoif.callerID?"CALLERID(all)="+o.gotoif.callerID:void 0),o.saveMailAccountApp=function(){o.errors=[];var e=[];o.gotoif.type&&"outbound"===o.gotoif.type.toLowerCase()&&"outboundDial"===o.gotoif.appType&&(o.gotoif.phone=a.cutdigits?(o.gotoif.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.gotoif.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.gotoif.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.gotoif.options+="U(xcally-mixmonitor-context)"):o.gotoif.options=o.gotoif.options.replace("U(xcally-mixmonitor-context)",""));if(o.gotoif.appType&&"custom"===o.gotoif.appType);else switch((o.gotoif.app||o.gotoif.appType).toLowerCase()){case"set":o.gotoif.appdata=o.gotoif.name+"="+o.gotoif.value;break;case"custom":break;default:e[0]=o.gotoif.condition,e[1]=o.gotoif.truepriority,e[2]=o.gotoif.falsepriority,o.gotoif.appdata=e.join(",")}l(o.gotoif)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","mailAccountApp","mailAccount","api"],angular.module("app.mail").controller("EditMailAccountAppgotoifDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="MAIL.EDIT_"+(n.appType||n.app).toUpperCase(),o.gotop=angular.copy(n),o.gotop.appdata)switch(o.gotop.appType?o.gotop.appType.toLowerCase():o.gotop.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.gotop.appdata.split(",");o.gotop.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.gotop.text=s.slice(1,s.length).join(",");break;case"message":o.gotop.text=o.gotop.appdata;break;case"set":o.gotop.name=o.gotop.appdata.split("=")[0],o.gotop.value=o.gotop.appdata.split("=")[1];break;case"agi":o.gotop.project=o.gotop.appdata;break;default:var r=o.gotop.appdata.split(",");o.gotop.priority=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.gotop.type&&"outbound"===o.gotop.type.toLowerCase()&&"outbounddial"===o.gotop.appType.toLowerCase()&&(o.gotop.prefix=o.gotop.phone?o.gotop.phone.split("$")[0]:void 0,o.gotop.callerId=o.gotop.callerID?"CALLERID(all)="+o.gotop.callerID:void 0),o.saveMailAccountApp=function(){o.errors=[];var e=[];o.gotop.type&&"outbound"===o.gotop.type.toLowerCase()&&"outboundDial"===o.gotop.appType&&(o.gotop.phone=a.cutdigits?(o.gotop.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.gotop.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.gotop.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.gotop.options+="U(xcally-mixmonitor-context)"):o.gotop.options=o.gotop.options.replace("U(xcally-mixmonitor-context)",""));if(o.gotop.appType&&"custom"===o.gotop.appType);else switch((o.gotop.app||o.gotop.appType).toLowerCase()){case"set":o.gotop.appdata=o.gotop.name+"="+o.gotop.value;break;case"custom":break;default:e[0]=o.gotop.priority,o.gotop.appdata=e.join(",")}l(o.gotop)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","mailAccountApp","mailAccount","api"],angular.module("app.mail").controller("EditMailAccountAppgotopDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;if(l.errors=[],l.title="TOOLS.EDIT_INTERVAL",l.interval=angular.copy(i),l.intervals=o,l.newInterval=!1,l.types=["always","custom","list"],l.daysOfWeek=a.getDaysOfWeek(),l.monthNumber=a.getMonthNumber(),l.monthName=a.getMonthName(),l.daysOfMonth=a.getDaysOfMonth(),l.interval)if("*,*,*,*"!==l.interval.interval){l.type="custom";var d=l.interval.interval.split(","),c=d[0],m=d[1],u=d[2],p=d[3];if("*"!==c){var g,v=c.split("-")[0],h=c.split("-")[1];(g=new Date).setHours(Number(v.split(":")[0])),g.setMinutes(Number(v.split(":")[1])),l.timeRangeFrom=g,(g=new Date).setHours(Number(h.split(":")[0])),g.setMinutes(Number(h.split(":")[1])),l.timeRangeTo=g}"*"!==m&&(l.dayOfWeekFrom=m.split("-")[0],l.dayOfWeekTo=m.split("-")[1]),"*"!==u&&(l.monthDayFrom=u.split("-")[0],l.monthDayTo=u.split("-")[1]),"*"!==p&&(l.monthFrom=p.split("-")[0],l.monthTo=p.split("-")[1])}else l.type="always";else l.interval={interval:"*,*,*,*"},l.type="always",l.title="TOOLS.NEW_INTERVAL",l.newInterval=!0;function b(){switch(l.type){case"always":case"list":return"*,*,*,*";case"custom":var e=[];if("*"!==l.timeRangeFrom&&l.timeRangeFrom&&l.timeRangeTo){var t=(l.timeRangeFrom.getHours()<10?"0":"")+l.timeRangeFrom.getHours()+":"+(l.timeRangeFrom.getMinutes()<10?"0":"")+l.timeRangeFrom.getMinutes(),n=(l.timeRangeTo.getHours()<10?"0":"")+l.timeRangeTo.getHours()+":"+(l.timeRangeTo.getMinutes()<10?"0":"")+l.timeRangeTo.getMinutes();e.push(t+"-"+n)}else e.push("*");return l.dayOfWeekFrom?l.dayOfWeekTo?e.push(l.dayOfWeekFrom+"-"+l.dayOfWeekTo):e.push(l.dayOfWeekFrom):e.push("*"),l.monthDayFrom?l.monthDayTo?e.push(l.monthDayFrom+"-"+l.monthDayTo):e.push(l.monthDayFrom):e.push("*"),l.monthFrom?l.monthTo?e.push(l.monthFrom+"-"+l.monthTo):e.push(l.monthFrom):e.push("*"),e.join()}}function f(e){t.hide(e)}e.params.id&&!l.interval.application&&(l.interval.IntervalId=e.params.id),l.interval.IntervalId&&l.interval.application&&(l.type="list"),l.addNewInterval=function(){l.errors=[],l.interval.interval=b(),r.interval.save(l.interval).$promise.then(function(e){l.intervals.push(e),s.success({title:"Interval properly created",msg:l.interval.name?l.interval.name+" has been created!":""}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}]})},l.saveInterval=function(){l.errors=[],l.interval.interval=b(),l.interval.application?("list"!==l.type&&(l.interval.IntervalId=null),f(l.interval)):r.interval.update({id:l.interval.id},l.interval).$promise.then(function(e){var t=_.find(l.intervals,{id:e.id});t&&_.merge(t,e),s.success({title:"Interval properly saved!",msg:"Interval has been saved!"}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}]})},l.closeDialog=f,l.interval.application&&r.interval.get({fields:"id,name,interval,IntervalId",IntervalId:"null",nolimit:!0}).$promise.then(function(e){l.intervals=e}).catch(function(e){console.error(e)})}e.$inject=["$state","$mdDialog","$mdToast","IndexFactory","interval","intervals","toasty","api"],angular.module("app.voice").controller("EditMailAccountAppintervalDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="MAIL.EDIT_"+(n.appType||n.app).toUpperCase(),o.noop=angular.copy(n),o.noop.appdata)switch(o.noop.appType?o.noop.appType.toLowerCase():o.noop.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.noop.appdata.split(",");o.noop.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.noop.text=s.slice(1,s.length).join(",");break;case"message":o.noop.text=o.noop.appdata;break;case"set":o.noop.name=o.noop.appdata.split("=")[0],o.noop.value=o.noop.appdata.split("=")[1];break;case"agi":o.noop.project=o.noop.appdata;break;default:var r=o.noop.appdata.split(",");o.noop.value=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.noop.type&&"outbound"===o.noop.type.toLowerCase()&&"outbounddial"===o.noop.appType.toLowerCase()&&(o.noop.prefix=o.noop.phone?o.noop.phone.split("$")[0]:void 0,o.noop.callerId=o.noop.callerID?"CALLERID(all)="+o.noop.callerID:void 0),o.saveMailAccountApp=function(){o.errors=[];var e=[];o.noop.type&&"outbound"===o.noop.type.toLowerCase()&&"outboundDial"===o.noop.appType&&(o.noop.phone=a.cutdigits?(o.noop.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.noop.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.noop.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.noop.options+="U(xcally-mixmonitor-context)"):o.noop.options=o.noop.options.replace("U(xcally-mixmonitor-context)",""));if(o.noop.appType&&"custom"===o.noop.appType);else switch((o.noop.app||o.noop.appType).toLowerCase()){case"set":o.noop.appdata=o.noop.name+"="+o.noop.value;break;case"custom":break;default:e[0]=o.noop.value,o.noop.appdata=e.join(",")}l(o.noop)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","mailAccountApp","mailAccount","api"],angular.module("app.mail").controller("EditMailAccountAppnoopDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="MAIL.EDIT_"+(e.appType||e.app).toUpperCase(),o.queue=angular.copy(e),o.queue.appdata)switch(o.queue.appType?o.queue.appType.toLowerCase():o.queue.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.queue.appdata.split(",");o.queue.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.queue.text=s.slice(1,s.length).join(",");break;case"message":o.queue.text=o.queue.appdata;break;case"set":o.queue.name=o.queue.appdata.split("=")[0],o.queue.value=o.queue.appdata.split("=")[1];break;case"agi":o.queue.project=o.queue.appdata;break;default:var r=o.queue.appdata.split(",");o.queue.queue=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.queue.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.queue.queue=300,o.queue.timeout=300;function l(e){t.hide(e)}o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outbounddial"===o.queue.appType.toLowerCase()&&(o.queue.prefix=o.queue.phone?o.queue.phone.split("$")[0]:void 0,o.queue.callerId=o.queue.callerID?"CALLERID(all)="+o.queue.callerID:void 0),o.saveMailAccountApp=function(){o.errors=[];var e=[];o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outboundDial"===o.queue.appType&&(o.queue.phone=a.cutdigits?(o.queue.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.queue.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.queue.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.queue.options+="U(xcally-mixmonitor-context)"):o.queue.options=o.queue.options.replace("U(xcally-mixmonitor-context)",""));var t=_.find(o.queues,{name:o.queue.queue});t&&(o.queue[_.capitalize("mail")+"QueueId"]=t.id);if(o.queue.appType&&"custom"===o.queue.appType);else switch((o.queue.app||o.queue.appType).toLowerCase()){case"set":o.queue.appdata=o.queue.name+"="+o.queue.value;break;case"custom":break;default:e[0]=o.queue.queue,e[1]=o.queue.timeout,o.queue.appdata=e.join(",")}l(o.queue)},o.closeDialog=l,i.mailQueue.get({fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){o.queues=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","mailAccountApp","mailAccount","api"],angular.module("app.mail").controller("EditMailAccountAppqueueDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="MAIL.EDIT_"+(e.appType||e.app).toUpperCase(),o.system=angular.copy(e),o.system.appdata)switch(o.system.appType?o.system.appType.toLowerCase():o.system.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.system.appdata.split(",");o.system.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.system.text=s.slice(1,s.length).join(",");break;case"message":o.system.text=o.system.appdata;break;case"set":o.system.name=o.system.appdata.split("=")[0],o.system.value=o.system.appdata.split("=")[1];break;case"agi":o.system.project=o.system.appdata;break;default:var r=o.system.appdata.split(",");o.system.command=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.system.variable=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.system.variable="";function l(e){t.hide(e)}o.system.type&&"outbound"===o.system.type.toLowerCase()&&"outbounddial"===o.system.appType.toLowerCase()&&(o.system.prefix=o.system.phone?o.system.phone.split("$")[0]:void 0,o.system.callerId=o.system.callerID?"CALLERID(all)="+o.system.callerID:void 0),o.saveMailAccountApp=function(){o.errors=[];var e=[];o.system.type&&"outbound"===o.system.type.toLowerCase()&&"outboundDial"===o.system.appType&&(o.system.phone=a.cutdigits?(o.system.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.system.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.system.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.system.options+="U(xcally-mixmonitor-context)"):o.system.options=o.system.options.replace("U(xcally-mixmonitor-context)",""));if(o.system.appType&&"custom"===o.system.appType);else switch((o.system.app||o.system.appType).toLowerCase()){case"set":o.system.appdata=o.system.name+"="+o.system.value;break;case"custom":break;default:e[0]=o.system.command,e[1]=o.system.variable,o.system.appdata=e.join(",")}l(o.system)},o.closeDialog=l,i.variable.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){o.variables=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvariables",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","mailAccountApp","mailAccount","api"],angular.module("app.mail").controller("EditMailAccountAppsystemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.mailAccount={},c.mailAccountInteractions={count:0,rows:[]},c.selectedMailAccountInteractions=[],c.query={fields:"createdAt,updatedAt,UserId,ContactId,MailAccountId,id,createdAt,Contact.firstName,Owner.name,closedAt,disposition,note,tag",sort:"-createdAt",includeAll:"true",limit:10,page:1},c.init=function(e){c.mailAccount=e,c.query.id=c.mailAccount.id,c.getMailAccountInteractions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the interaction?").htmlContent("<b>"+(e.name||"interaction")+"</b> will be deleted.").ariaLabel("delete interaction").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getMailAccountInteractions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.mailAccount.getInteractions(c.query,p).$promise},c.createOrEditMailAccountInteraction=function(e,t){o.show({controller:"CreateOrEditInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailAccounts/edit/interactions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{mailAccount:c.mailAccount,interaction:t,interactions:c.mailAccountInteractions.rows,license:null,setting:null}})},c.spymailInteraction=function(e,n){o.show({controller:"AgentGeneralInteractionController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/agent.general.interaction.dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,onShowing:function(e,t){e.vm.init({id:1,channel:"mail",interaction:n,spy:!0})}})},c.exportSelectedMailAccountInteractions=function(){var e=angular.copy(c.selectedMailAccountInteractions);return c.selectedMailAccountInteractions=[],e},c.deleteMailAccountInteraction=g,c.deleteSelectedMailAccountInteractions=function(e){var t=o.confirm().title("Are you sure want to delete the selected interactions?").htmlContent("<b>"+c.selectedMailAccountInteractions.length+" selected</b> will be deleted.").ariaLabel("delete interactions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedMailAccountInteractions.forEach(function(e){g(e)}),c.selectedMailAccountInteractions=[]})};var m=!0,u=1;function p(e){c.mailAccountInteractions=e||{count:0,rows:[]}}function g(e){l.mailInteraction.delete({id:e.id}).$promise.then(function(){_.remove(c.mailAccountInteractions.rows,{id:e.id}),c.mailAccountInteractions.count-=1,c.mailAccountInteractions.rows.length||c.getMailAccountInteractions(),r.success({title:"Interaction deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETmailAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getMailAccountInteractions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.mail").controller("MailAccountInteractionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.mailAccount={},c.mailAccountMailCannedAnswers={count:0,rows:[]},c.selectedMailAccountMailCannedAnswers=[],c.query={fields:"createdAt,updatedAt,id,key,value,description,createdAt",limit:10,page:1},c.init=function(e){c.mailAccount=e,c.query.id=c.mailAccount.id,c.query.MailAccountId=c.mailAccount.id,c.getMailAccountMailCannedAnswers()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the mailCannedAnswer?").htmlContent("<b>"+(e.name||"mailCannedAnswer")+"</b> will be deleted.").ariaLabel("delete mailCannedAnswer").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getMailAccountMailCannedAnswers=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.mailAccount.getAnswers(c.query,p).$promise},c.createOrEditMailAccountMailCannedAnswer=function(e,t){o.show({controller:"CreateOrEditMailCannedAnswerDialogController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailAccounts/edit/mailCannedAnswers/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{mailAccount:c.mailAccount,mailCannedAnswer:t,mailCannedAnswers:c.mailAccountMailCannedAnswers.rows,license:null,setting:null}})},c.exportSelectedMailAccountMailCannedAnswers=function(){var e=angular.copy(c.selectedMailAccountMailCannedAnswers);return c.selectedMailAccountMailCannedAnswers=[],e},c.deleteMailAccountMailCannedAnswer=g,c.deleteSelectedMailAccountMailCannedAnswers=function(e){var t=o.confirm().title("Are you sure want to delete the selected mailCannedAnswers?").htmlContent("<b>"+c.selectedMailAccountMailCannedAnswers.length+" selected</b> will be deleted.").ariaLabel("delete mailCannedAnswers").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedMailAccountMailCannedAnswers.forEach(function(e){g(e)}),c.selectedMailAccountMailCannedAnswers=[]})};var m=!0,u=1;function p(e){c.mailAccountMailCannedAnswers=e||{count:0,rows:[]}}function g(e){l.cannedAnswer.delete({id:e.id}).$promise.then(function(){_.remove(c.mailAccountMailCannedAnswers.rows,{id:e.id}),c.mailAccountMailCannedAnswers.count-=1,c.mailAccountMailCannedAnswers.rows.length||c.getMailAccountMailCannedAnswers(),r.success({title:"MailCannedAnswer deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETmailAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getMailAccountMailCannedAnswers())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.mail").controller("MailAccountMailCannedAnswersController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="MAIL.EDIT_MAILCANNEDANSWER",m.mailCannedAnswer=angular.copy(s),m.mailCannedAnswers=o,m.newMailCannedAnswer=!1,m.mailCannedAnswer||(m.mailCannedAnswer={},m.title="MAIL.NEW_MAILCANNEDANSWER",m.newMailCannedAnswer=!0),t.params.id&&(m.mailCannedAnswer.MailAccountId=t.params.id),m.addNewMailCannedAnswer=function(){m.errors=[],r.cannedAnswer.save(m.mailCannedAnswer).$promise.then(function(e){m.mailCannedAnswers.unshift(e.toJSON()),i.success({title:"MailCannedAnswer properly created",msg:m.mailCannedAnswer.name?m.mailCannedAnswer.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveMailCannedAnswer=function(){m.errors=[],r.cannedAnswer.update({id:m.mailCannedAnswer.id},m.mailCannedAnswer).$promise.then(function(e){var t=_.find(m.mailCannedAnswers,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"MailCannedAnswer properly saved!",msg:m.mailCannedAnswer.name?m.mailCannedAnswer.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteMailCannedAnswer=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The mailCannedAnswer will be deleted.").ariaLabel("Delete MailCannedAnswer").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.cannedAnswer.delete({id:m.mailCannedAnswer.id}).$promise.then(function(){_.remove(m.mailCannedAnswers,{id:m.mailCannedAnswer.id}),i.success({title:"MailCannedAnswer properly deleted!",msg:(m.mailCannedAnswer.name||"mailCannedAnswer")+" has been deleted!"}),u(m.mailCannedAnswer)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","mailCannedAnswers","mailCannedAnswer","api","Auth","license","setting"],angular.module("app.mail").controller("CreateOrEditMailCannedAnswerDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.mailAccount={},c.mailAccountMailDispositions={count:0,rows:[]},c.selectedMailAccountMailDispositions=[],c.query={fields:"createdAt,updatedAt,id,name,createdAt",limit:10,page:1},c.init=function(e){c.mailAccount=e,c.query.id=c.mailAccount.id,c.query.MailAccountId=c.mailAccount.id,c.getMailAccountMailDispositions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the mailDisposition?").htmlContent("<b>"+(e.name||"mailDisposition")+"</b> will be deleted.").ariaLabel("delete mailDisposition").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getMailAccountMailDispositions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.mailAccount.getDispositions(c.query,p).$promise},c.createOrEditMailAccountMailDisposition=function(e,t){o.show({controller:"CreateOrEditMailDispositionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailAccounts/edit/mailDispositions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{mailAccount:c.mailAccount,mailDisposition:t,mailDispositions:c.mailAccountMailDispositions.rows,license:null,setting:null}})},c.exportSelectedMailAccountMailDispositions=function(){var e=angular.copy(c.selectedMailAccountMailDispositions);return c.selectedMailAccountMailDispositions=[],e},c.deleteMailAccountMailDisposition=g,c.deleteSelectedMailAccountMailDispositions=function(e){var t=o.confirm().title("Are you sure want to delete the selected mailDispositions?").htmlContent("<b>"+c.selectedMailAccountMailDispositions.length+" selected</b> will be deleted.").ariaLabel("delete mailDispositions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedMailAccountMailDispositions.forEach(function(e){g(e)}),c.selectedMailAccountMailDispositions=[]})};var m=!0,u=1;function p(e){c.mailAccountMailDispositions=e||{count:0,rows:[]}}function g(e){l.mailDisposition.delete({id:e.id}).$promise.then(function(){_.remove(c.mailAccountMailDispositions.rows,{id:e.id}),c.mailAccountMailDispositions.count-=1,c.mailAccountMailDispositions.rows.length||c.getMailAccountMailDispositions(),r.success({title:"MailDisposition deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETmailAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getMailAccountMailDispositions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.mail").controller("MailAccountMailDispositionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="MAIL.EDIT_MAILDISPOSITION",m.mailDisposition=angular.copy(s),m.mailDispositions=o,m.newMailDisposition=!1,m.mailDisposition||(m.mailDisposition={},m.title="MAIL.NEW_MAILDISPOSITION",m.newMailDisposition=!0),t.params.id&&(m.mailDisposition.MailAccountId=t.params.id),m.addNewMailDisposition=function(){m.errors=[],r.mailDisposition.save(m.mailDisposition).$promise.then(function(e){m.mailDispositions.unshift(e.toJSON()),i.success({title:"MailDisposition properly created",msg:m.mailDisposition.name?m.mailDisposition.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailDisposition.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailDisposition.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveMailDisposition=function(){m.errors=[],r.mailDisposition.update({id:m.mailDisposition.id},m.mailDisposition).$promise.then(function(e){var t=_.find(m.mailDispositions,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"MailDisposition properly saved!",msg:m.mailDisposition.name?m.mailDisposition.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailDisposition.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailDisposition.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteMailDisposition=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The mailDisposition will be deleted.").ariaLabel("Delete MailDisposition").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.mailDisposition.delete({id:m.mailDisposition.id}).$promise.then(function(){_.remove(m.mailDispositions,{id:m.mailDisposition.id}),i.success({title:"MailDisposition properly deleted!",msg:(m.mailDisposition.name||"mailDisposition")+" has been deleted!"}),u(m.mailDisposition)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailDisposition.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailDisposition.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","mailDispositions","mailDisposition","api","Auth","license","setting"],angular.module("app.mail").controller("CreateOrEditMailDispositionDialogController",e)}(),function(){"use strict";function e(n,e,t,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=e.protocol()+"://"+e.host(),c.mailAccount=d||n.params.mailAccount||{},c.selectedTab=n.params.tab||0,c.gotogoto=function(e,t){n.go("app.mail.realtime.accounts",{})},c.alert=r.info,c.gotoMailAccounts=function(){n.go("app.mail.mailAccounts")},c.saveMailAccount=function(){s.mailAccount.update({id:c.mailAccount.id},c.mailAccount).$promise.then(function(){r.success({title:"MailAccount updated!",msg:c.mailAccount.name?c.mailAccount.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.lists=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","mailAccount"],angular.module("app.mail").controller("MailAccountController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.mailAccounts=r||{count:0,rows:[]},v.table="mailAccounts",v.listOrder="",v.listOrderAsc=null,v.selectedMailAccounts=[],v.query={fields:"createdAt,updatedAt,id,name,key,email,ListId,active,cservice,Imap.service,Imap.host,Imap.port,Imap.tls,Imap.authentication,Imap.user,Imap.password,Imap.mailbox,Imap.connTimeout,Imap.authTimeout,Smtp.service,Smtp.host,Smtp.port,Smtp.secure,Smtp.authentication,Smtp.user,Smtp.pass,cauthentication,cuser,cpassword,fontFamily,fontSize,template,markAsUnread,waitForTheAssignedAgent,description,notificationSound,notificationShake,notificationTemplate",sort:"-updatedAt",limit:10,page:1},v.arraycservice=_.keyBy([{option:"Custom",value:"null"},{option:"Gmail",value:"'gmail'"},{option:"Hotmail",value:"'hotmail'"},{option:"Yahoo",value:"'yahoo'"},{option:"Outlook365",value:"'outlook365'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v["arrayImap.service"]=_.keyBy([{option:"Custom",value:"null"},{option:"Gmail",value:"'gmail'"},{option:"Hotmail",value:"'hotmail'"},{option:"Yahoo",value:"'yahoo'"},{option:"Outlook365",value:"'outlook365'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v["arraySmtp.service"]=_.keyBy([{option:"Custom",value:"null"},{option:"Gmail",value:"'gmail'"},{option:"Hotmail",value:"'hotmail'"},{option:"Yahoo",value:"'yahoo'"},{option:"Outlook365",value:"'outlook365'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.mail.mailAccounts.edit",{id:e.id,mailAccount:e})},v.verifysmtpverifysmtp=function(e,t){{if(e&&e.id)return l.mailAccount.verifySmtp({id:e.id}).$promise.then(function(){c.success({title:"Smtp properly verified",msg:"Connection succeded!"})}).catch(function(e){c.error({title:"Smtp properly verified",msg:e.data?JSON.stringify(e.data):e.toString()})});c.error({title:"Smtp properly verified",msg:"Smpt id unknown"})}},v.interactionsgoto=function(e,t){n.go("app.mail.mailAccounts.edit",{id:e.id,tab:6})},v.gotorealtimegoto=function(e,t){n.go("app.mail.realtime.accounts",{})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the mailAccount?").htmlContent("<b>"+(e.name||"mailAccount")+"</b> will be deleted.").ariaLabel("delete mailAccount").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getMailAccounts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.mailAccount.get(v.query,f).$promise},v.createOrEditMailAccount=function(e,t){i.show({controller:"CreateOrEditMailAccountDialogController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailAccounts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{mailAccount:t,mailAccounts:v.mailAccounts.rows,license:v.license,setting:v.setting}})},v.deleteMailAccount=A,v.exportSelectedMailAccounts=function(){var e=angular.copy(v.selectedMailAccounts);return v.selectedMailAccounts=[],e},v.deleteSelectedMailAccounts=function(e){var t=i.confirm().title("Are you sure want to delete the selected mailAccounts?").htmlContent("<b>"+v.selectedMailAccounts.length+" selected</b> will be deleted.").ariaLabel("delete MailAccounts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedMailAccounts.forEach(function(e){A(e)}),v.selectedMailAccounts=[]})},v.deselectMailAccounts=function(){v.selectedMailAccounts=[]},v.selectAllMailAccounts=function(){v.selectedMailAccounts=v.mailAccounts.rows},l.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.lists=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.mailAccounts=e||{count:0,rows:[]}}function A(e){if(e.service)return c.error({title:"Mail Account not deleted!",msg:"You can't remove service account"});l.mailAccount.delete({id:e.id}).$promise.then(function(){_.remove(v.mailAccounts.rows,{id:e.id}),v.mailAccounts.count-=1,v.mailAccounts.rows.length||v.getMailAccounts(),c.success({title:"MailAccount deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEmailAccount"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEmailAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getMailAccounts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","mailAccounts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.mail").controller("MailAccountsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="MAIL.EDIT_MAILQUEUE",m.mailQueue=angular.copy(s),m.mailQueues=o,m.newMailQueue=!1,m.mailQueue||(m.mailQueue={strategy:"beepall",timeout:10},m.title="MAIL.NEW_MAILQUEUE",m.newMailQueue=!0),m.addNewMailQueue=function(){m.errors=[],r.mailQueue.save(m.mailQueue).$promise.then(function(e){m.mailQueues.unshift(e.toJSON()),i.success({title:"MailQueue properly created",msg:m.mailQueue.name?m.mailQueue.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailQueue.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailQueue.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveMailQueue=function(){m.errors=[],r.mailQueue.update({id:m.mailQueue.id},m.mailQueue).$promise.then(function(e){var t=_.find(m.mailQueues,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"MailQueue properly saved!",msg:m.mailQueue.name?m.mailQueue.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailQueue.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailQueue.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteMailQueue=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The mailQueue will be deleted.").ariaLabel("Delete MailQueue").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.mailQueue.delete({id:m.mailQueue.id}).$promise.then(function(){_.remove(m.mailQueues,{id:m.mailQueue.id}),i.success({title:"MailQueue properly deleted!",msg:(m.mailQueue.name||"mailQueue")+" has been deleted!"}),u(m.mailQueue)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailQueue.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailQueue.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","mailQueues","mailQueue","api","Auth","license","setting"],angular.module("app.mail").controller("CreateOrEditMailQueueDialogController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r){var l=this;function d(){return a.mailQueue[l.isVoiceRealtime()?"getMembers":"getAgents"]({id:l.mailQueue.id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){return l.isVoiceRealtime()?l.selectedItems=e.rows?_.map(e.rows,function(e){return e.id=e.UserId,e.fullname=e.membername,e.penalty=e.hasOwnProperty("penalty")?"penalty "+e.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[]:l.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserMailQueue?"penalty "+e.UserMailQueue.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.selectedItems=l.selectedItems,r.hasRole("admin")?a.user.get({fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise:a.user.getAgents({id:r.getCurrentUser().id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise}).then(function(e){l.items=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserMailQueue?"penalty "+e.UserMailQueue.penalty:"",e.internal=e.internal?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.items=_.differenceBy(l.items,l.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETUSERS.GETAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}l.mailQueue=t,l.penalty=0,l.items=[],l.selectedItems=[],l.closeDialog=function(){e.hide()},l.isVoiceRealtime=function(){return o},l.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"penalty",labelAll:s.instant("MAIL.ALL_AGENTS"),labelSelected:s.instant("MAIL.SELECTED_AGENTS"),transferCallback:function(e,t){a.mailQueue[t?"removeAgents":"addAgents"]({id:l.mailQueue.id,ids:_.map(e,l.isVoiceRealtime()&&t?"UserId":"id"),penalty:l.penalty||0,realtime:o||!1}).$promise.then(function(){n.success({title:"MailQueue properly "+(t?"removed":"added"),msg:"MailQueue has been "+(t?"removed":"added")+"!"}),t||d()}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:mailQueue.ADDAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d()}e.$inject=["$mdDialog","toasty","api","mailQueue","mailQueues","realtime","$translate","Auth"],angular.module("app.mail").controller("MailQueueagentaddController",e)}(),function(){"use strict";function e(e,n,a,t,i){var o=this;o.mailQueue=t,o.penalty=0,o.items=[],o.selectedItems=[],o.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("MAIL.ALL_TEAMS"),labelSelected:i.instant("MAIL.SELECTED_TEAMS"),transferCallback:function(e,t){a.mailQueue[t?"removeTeams":"addTeams"]({id:o.mailQueue.id,ids:_.map(e,"id"),penalty:o.penalty||0}).$promise.then(function(){n.success({title:"Team properly "+(t?"removed":"added"),msg:"Team has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:mailQueue.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},o.closeDialog=function(){e.hide()},a.mailQueue.getTeams({id:o.mailQueue.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return o.selectedItems=e.rows?e.rows:[],o.dualMultiselectOptions.selectedItems=o.selectedItems,a.team.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){o.items=e.rows?e.rows:[],o.dualMultiselectOptions.items=_.differenceBy(o.items,o.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","mailQueue","$translate"],angular.module("app.mail").controller("MailQueueteamaddController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.mailQueue=d||e.params.mailQueue||{},c.selectedTab=e.params.tab||0,c.teamadddialog=function(e,t){n.show({controller:"MailQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailQueues/edit/teamadd/teamadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{mailQueue:e,mailQueues:c.mailQueues?c.mailQueues.rows:[]}})},c.agentadddialog=function(e,t){n.show({controller:"MailQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailQueues/edit/agentadd/agentadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{mailQueue:e,mailQueues:c.mailQueues?c.mailQueues.rows:[],realtime:!1}})},c.alert=r.info,c.gotoMailQueues=function(){e.go("app.mail.mailQueues")},c.saveMailQueue=function(){s.mailQueue.update({id:c.mailQueue.id},c.mailQueue).$promise.then(function(){r.success({title:"MailQueue updated!",msg:c.mailQueue.name?c.mailQueue.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailQueue",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","mailQueue"],angular.module("app.mail").controller("MailQueueController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.mailQueues=r||{count:0,rows:[]},v.table="mailQueues",v.listOrder="",v.listOrderAsc=null,v.selectedMailQueues=[],v.query={fields:"createdAt,updatedAt,id,name,strategy,timeout,description",sort:"-updatedAt",limit:10,page:1},v.arraystrategy=_.keyBy([{option:"Beepall",value:"'beepall'"},{option:"RR Memory",value:"'rrmemory'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.mail.mailQueues.edit",{id:e.id,mailQueue:e})},v.teamadddialog=function(e,t){i.show({controller:"MailQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailQueues/edit/teamadd/teamadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{mailQueue:e,mailQueues:v.mailQueues?v.mailQueues.rows:[]}})},v.agentadddialog=function(e,t){i.show({controller:"MailQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailQueues/edit/agentadd/agentadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{mailQueue:e,mailQueues:v.mailQueues?v.mailQueues.rows:[],realtime:!1}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the mailQueue?").htmlContent("<b>"+(e.name||"mailQueue")+"</b> will be deleted.").ariaLabel("delete mailQueue").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.gotorealtimegoto=function(e,t){n.go("app.mail.realtime.queues",{})},v.success=f,v.getMailQueues=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.mailQueue.get(v.query,f).$promise},v.createOrEditMailQueue=function(e,t){i.show({controller:"CreateOrEditMailQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailQueues/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{mailQueue:t,mailQueues:v.mailQueues.rows,license:v.license,setting:v.setting}})},v.deleteMailQueue=A,v.exportSelectedMailQueues=function(){var e=angular.copy(v.selectedMailQueues);return v.selectedMailQueues=[],e},v.deleteSelectedMailQueues=function(e){var t=i.confirm().title("Are you sure want to delete the selected mailQueues?").htmlContent("<b>"+v.selectedMailQueues.length+" selected</b> will be deleted.").ariaLabel("delete MailQueues").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedMailQueues.forEach(function(e){A(e)}),v.selectedMailQueues=[]})},v.deselectMailQueues=function(){v.selectedMailQueues=[]},v.selectAllMailQueues=function(){v.selectedMailQueues=v.mailQueues.rows};var h=!0,b=1;function f(e){v.mailQueues=e||{count:0,rows:[]}}function A(e){l.mailQueue.delete({id:e.id}).$promise.then(function(){_.remove(v.mailQueues.rows,{id:e.id}),v.mailQueues.count-=1,v.mailQueues.rows.length||v.getMailQueues(),c.success({title:"MailQueue deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEmailQueue"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEmailQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getMailQueues())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","mailQueues","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.mail").controller("MailQueuesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="MAIL.EDIT_MAILSUBSTATUS",m.mailSubstatus=angular.copy(s),m.mailSubtatuses=o,m.newMailSubstatus=!1,m.mailSubstatus||(m.mailSubstatus={},m.title="MAIL.NEW_MAILSUBSTATUS",m.newMailSubstatus=!0),m.addNewMailSubstatus=function(){m.errors=[],r.mailSubstatus.save(m.mailSubstatus).$promise.then(function(e){m.mailSubtatuses.unshift(e.toJSON()),i.success({title:"MailSubstatus properly created",msg:m.mailSubstatus.name?m.mailSubstatus.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailSubstatus.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailSubstatus.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveMailSubstatus=function(){m.errors=[],r.mailSubstatus.update({id:m.mailSubstatus.id},m.mailSubstatus).$promise.then(function(e){var t=_.find(m.mailSubtatuses,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"MailSubstatus properly saved!",msg:m.mailSubstatus.name?m.mailSubstatus.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailSubstatus.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailSubstatus.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteMailSubstatus=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The mailSubstatus will be deleted.").ariaLabel("Delete MailSubstatus").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.mailSubstatus.delete({id:m.mailSubstatus.id}).$promise.then(function(){_.remove(m.mailSubtatuses,{id:m.mailSubstatus.id}),i.success({title:"MailSubstatus properly deleted!",msg:(m.mailSubstatus.name||"mailSubstatus")+" has been deleted!"}),u(m.mailSubstatus)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailSubstatus.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailSubstatus.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","mailSubtatuses","mailSubstatus","api","Auth","license","setting"],angular.module("app.mail").controller("CreateOrEditMailSubstatusDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.mailSubtatuses=r||{count:0,rows:[]},v.table="mailSubtatuses",v.listOrder="",v.listOrderAsc=null,v.selectedMailSubstatuses=[],v.query={fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditMailSubstatusDialogController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailSubtatuses/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{mailSubstatus:e,mailSubtatuses:v.mailSubtatuses.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the mailSubstatus?").htmlContent("<b>"+(e.name||"mailSubstatus")+"</b> will be deleted.").ariaLabel("delete mailSubstatus").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getMailSubstatuses=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.mailSubstatus.get(v.query,f).$promise},v.createOrEditMailSubstatus=function(e,t){i.show({controller:"CreateOrEditMailSubstatusDialogController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailSubtatuses/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{mailSubstatus:t,mailSubtatuses:v.mailSubtatuses.rows,license:v.license,setting:v.setting}})},v.deleteMailSubstatus=A,v.exportSelectedMailSubstatuses=function(){var e=angular.copy(v.selectedMailSubstatuses);return v.selectedMailSubstatuses=[],e},v.deleteSelectedMailSubstatuses=function(e){var t=i.confirm().title("Are you sure want to delete the selected mailSubtatuses?").htmlContent("<b>"+v.selectedMailSubstatuses.length+" selected</b> will be deleted.").ariaLabel("delete MailSubstatuss").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedMailSubstatuses.forEach(function(e){A(e)}),v.selectedMailSubstatuses=[]})},v.deselectMailSubstatuses=function(){v.selectedMailSubstatuses=[]},v.selectAllMailSubstatuses=function(){v.selectedMailSubstatuses=v.mailSubtatuses.rows};var h=!0,b=1;function f(e){v.mailSubtatuses=e||{count:0,rows:[]}}function A(e){l.mailSubstatus.delete({id:e.id}).$promise.then(function(){_.remove(v.mailSubtatuses.rows,{id:e.id}),v.mailSubtatuses.count-=1,v.mailSubtatuses.rows.length||v.getMailSubstatuses(),c.success({title:"MailSubstatus deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEmailSubstatus"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEmailSubstatus",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getMailSubstatuses())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","mailSubtatuses","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.mail").controller("MailSubstatusesController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d){var c=this;function m(){_.forIn(c.mailAccounts,function(e,t){c.rpcMailAccounts[t]&&_.merge(e,c.rpcMailAccounts[t])}),_.forIn(c.mailAccounts,function(t,e){var n={id:e,sort:"-id",direction:"in",limit:1,offset:0,$gte:"createdAt,"+moment().startOf("day").format("YYYY-MM-DD HH:mm:ss")};o.mailAccount.getMessages(n).$promise.then(function(e){return e&&(t.in=e.count||0,t.lastIn=e.rows&&e.rows.length?e.rows[0].createdAt:void 0),n.direction="out",o.mailAccount.getMessages(n).$promise}).then(function(e){e&&(t.out=e.count||0,t.lastOut=e.rows&&e.rows.length?e.rows[0].createdAt:void 0)}).catch(function(e){console.log(e)})})}c.count=l&&l.count?l.count:0,c.mailAccounts=l?_.keyBy(l.rows?l.rows:[],"id"):{},c.rpcMailAccounts=d?_.keyBy(d.rows?d.rows:[],"id"):{},c.query={sort:"-name",limit:10,page:1},c.success=g,c.$onInit=m,c.getMailAccounts=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=o.mailAccount.get(c.query,g).$promise},c.onSave=function(e){c.mailAccounts[e.id]&&_.merge(c.mailAccounts[e.id],e)},c.onMailMessageSave=function(e){c.mailAccounts[e.MailAccountId]&&("in"==e.direction?(c.mailAccounts[e.MailAccountId].in+=1,c.mailAccounts[e.MailAccountId].lastIn=e.createdAt):(c.mailAccounts[e.MailAccountId].out+=1,c.mailAccounts[e.MailAccountId].lastOut=e.createdAt))},c.goToMailAccount=function(e,t){i.go("app.mail.mailAccounts.edit",{id:t.id,mailAccount:t})},c.verifySmtp=function(e,t){{if(t&&t.id)return o.mailAccount.verifySmtp({id:t.id}).$promise.then(function(){r.success({title:"Smtp properly verified",msg:"Connection succeded!"})}).catch(function(e){r.error({title:"Smtp properly verified",msg:e.data?JSON.stringify(e.data):e.toString()})});r.error({title:"Smtp properly verified",msg:"Smpt id unknown"})}},c.order=[],_.forIn(c.mailAccounts,function(e,t){c.order.push(e.id)}),s.on("mailAccount:save",c.onSave),s.on("mailAccount:update",c.onSave),s.on("mailMessage:save",c.onMailMessageSave);var u=!0,p=1;function g(e){if(c.mailAccounts=e?_.keyBy(e.rows?e.rows:[],"id"):{},e.rows){c.order=[];for(var t=0;t<e.rows.length;t++)c.order.push(e.rows[t].id)}m()}e.$watch("vm.query.filter",function(e,t){u?n(function(){u=!1}):(t||(p=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=p),c.getMailAccounts())}),e.$on("$destroy",function(){s.removeAllListeners("mailAccount:save"),s.removeAllListeners("mailAccount:update"),s.removeAllListeners("mailMessage:save")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$state","api","socket","toasty","mailAccounts","rpcMailAccounts"],angular.module("app.mail").controller("MailAccountsRealtimeController",e)}(),function(){"use strict";function e(e,s,t,n,a,i,o,r,l,d,c,m,u,p,g,v){var h=this,b=["userpic","online","lastLoginAt","lastPauseAt","pauseType","lastPauseAt","internal","address","chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","chatCapacity","openchannelCapacity","mailCapacity","smsCapacity","faxCapacity","chatCurrentCapacity","openchannelCurrentCapacity","mailCurrentCapacity","smsCurrentCapacity","faxCurrentCapacity","chatStatus","openchannelStatus","mailStatus","smsStatus","faxStatus","voiceStatus","chatStatusTime","openchannelStatusTime","mailStatusTime","smsStatusTime","faxStatusTime","voiceStatusTime","queue","destconnectedlinenum"],f=["chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","online"];for(var A in h.availableStates=["ringing","inuse","busy","onhold","not_inuse"],h.pauses=o||{count:0,rows:[]},h.license=g,h.agents=r?_.keyBy(r.rows?r.rows:[],"id"):{},h.rpcAgents=l?_.keyBy(l.rows?l.rows:[],"id"):{},h.paginatedAgents={},h.load=!1,h.order=[],h.agentInternal={},h.agents)h.agents.hasOwnProperty(A)&&(h.agents[A].init=!0);h.query={limit:10,page:1,order:"fullname",globalStatusFilter:"",pauseTypeFilter:""},h.logout=function(e,t){return d.user.logout({id:e.id}).$promise.then(function(){m.success({title:"Agent logout",msg:e.fullname+"  properly logout"}),h.agents[e.id]&&(h.agents[e.id].online=!1),h.rpcAgents[e.id]&&(h.rpcAgents[e.id].online=!1),y()}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.queueAdd=function(e,t){n.show({controller:"AgentqueueaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/queueadd/queueadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{agent:e,agents:[],channel:"mail",realtime:!0,direction:"inbound"}})},h.pause=function(t,e){return d.user.pause({id:t.id,type:e}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.unPause=function(t){return d.user.unpause({id:t.id}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.showInfo=function(e){n.show(n.alert().clickOutsideToClose(!0).title("Legend").htmlContent("<div>TODO legend status + state</div>").ok("Ok").targetEvent(e))},h.getAgentStatus=C,h.getAgentGlobalStatus=x,h.isPause=S,h.checkPause=function(e){return"pause"===e},h.isPartialPause=function(e){return"*pause"===e},h.onSave=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(_.omit(e,f),b)),_.merge(h.rpcAgents[e.id],_.pick(_.omit(e,f),b)),x(h.agents[e.id]))},h.onUpdate=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(e,b)),_.merge(h.rpcAgents[e.id],_.pick(e,b)),x(h.agents[e.id]))},h.onInit=y,h.onConnect=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(_.merge(h.agents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])),_.merge(h.rpcAgents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])))},h.onComplete=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(h.agents[h.agentInternal[e.destaccountcode]]=_.omit(h.agents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]),h.rpcAgents[h.agentInternal[e.destaccountcode]]=_.omit(h.rpcAgents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]))},c.on("user:save",h.onSave),c.on("user:update",h.onUpdate),c.on("user:agentconnect",h.onConnect),c.on("user:agentcomplete",h.onComplete),y();var E=v(function(){h.load&&(h.load=!1,y())},999);function y(e){h.load=!1;var t,n,a=s.defer();h.promise=a.promise,h.filteredAgents=[],h.order=[],_.forIn(h.agents,function(e,t){h.rpcAgents[t]&&_.merge(e,_.pick(_.omit(h.rpcAgents[t],f),b)),x(e),e.online?(h.filteredAgents.push(e),h.agentInternal[e.internal]=t):e.globalStatusTime=_.toNumber(moment().format("x"))}),h.query.globalStatusFilter&&_.remove(h.filteredAgents,function(e){return e.globalStatus!==h.query.globalStatusFilter}),h.query.pauseTypeFilter&&_.remove(h.filteredAgents,function(e){return e.pauseType!==h.query.pauseTypeFilter}),h.query.filter&&_.remove(h.filteredAgents,function(e){return e.fullname.toLowerCase().indexOf(h.query.filter.toLowerCase())<0}),h.filteredAgents=(t=h.filteredAgents,n=_.startsWith(h.query.order,"-")?"desc":"asc",_.orderBy(t,[h.query.order.replace("-","")],[n]));var i=(h.query.page-1)*h.query.limit;h.paginatedAgents=_.drop(h.filteredAgents,i).slice(0,h.query.limit);for(var o=0;o<h.paginatedAgents.length;o+=1)h.order.push(h.paginatedAgents[o].id);a.resolve(),h.load=!0}function S(e){return"pause"===e||"*pause"===e}function T(e){return"idle"===e||"unknown"===e||"unavailable"===e||"ringing"===e||_.isNil(e)}function C(e,t){return"voice"===t?"idle"!==e[t+"Status"]?e[t+"Status"]:e[t+"Pause"]?e[t+"Status"]="pause":"idle":e[t+"Pause"]?e[t+"Status"]="pause":e[t+"Status"]}function x(e){var t="unknown";t=_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"pause":_.some([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"*pause":_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],T)?"idle":"busy",e.globalStatus!==t&&(e.globalStatus=t,e.init?(e.init=!1,e.globalStatusTime=S(t)?_.toNumber(moment(e.lastPauseAt).format("x")):_.max([e.voiceStatusTime,e.chatStatusTime,e.mailStatusTime,e.smsStatusTime,e.openchannelStatusTime,e.faxStatusTime])):e.globalStatusTime=_.toNumber(moment().format("x")))}e.$on("$destroy",function(){c.removeAllListeners("user:save"),c.removeAllListeners("user:update"),c.removeAllListeners("user:agentconnect"),c.removeAllListeners("user:agentcomplete"),E&&(v.cancel(E),E=null)})}e.$inject=["$scope","$q","$timeout","$mdDialog","$document","$filter","pauses","agents","rpcAgents","api","socket","toasty","helperClasses","Auth","license","$interval"],angular.module("app.voice").controller("AgentsMailRealtimeController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r,l,d,c,m){var u=this,p=["loggedIn","available","waiting","talking","pTalking","originated","message","dialActive","dialMethod","Trunk","paused"];function g(){var n=[];return _.forIn(u.queues,function(e,t){e.paused=0,e.loggedInDb=0,u.queues[t].agents={},n.push(l.mailQueue.getMembers({id:t}).$promise),u.rpcQueues[t]&&_.merge(e,_.pick(u.rpcQueues[t],p))}),t.all(n).then(function(e){for(var t=0;t<e.length;t+=1)for(var n=0;n<e[t].rows.length;n++)e[t].rows[n].paused&&u.queues[e[t].rows[n].MailQueueId].paused++,u.queues[e[t].rows[n].MailQueueId].loggedInDb++,u.queues[e[t].rows[n].MailQueueId].agents[e[t].rows[n].UserId]=e[t].rows[n].MailQueueId}).catch(function(e){console.error(e)})}u.count=s.count?s.count:0,u.queues=s?_.keyBy(s.rows?s.rows:[],"id"):{},u.rpcQueues=r?_.keyBy(r.rows?r.rows:[],"id"):{},m.hasRole("admin")?u.query={type:"inbound",sort:"-updatedAt",limit:10,page:1}:u.query={id:m.getCurrentUser().id,channel:"mail",type:"inbound",sort:"-updatedAt",limit:10,page:1},u.success=b,u.getQueues=function(){u.query.offset=(u.query.page-1)*u.query.limit,m.hasRole("admin")?u.promise=l.mailQueue.get(u.query,b).$promise:u.promise=l.user.getQueues(u.query,b).$promise},u.createOrEditMailQueue=function(e,t){a.show({controller:"CreateOrEditMailQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailQueues/create/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{mailQueue:t,mailQueues:_.values(u.queues),license:null,setting:null}})},u.agentAdd=function(e,t){a.show({controller:"MailQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/mail/views/mailQueues/edit/agentadd/agentadd.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{mailQueue:t,mailQueues:u.queues?u.queues.rows:[],realtime:!1}})},u.updateQueue=function(e){return l.mailQueue.update(e).$promise.then(function(){c.success({title:"Queue properly updated!",msg:e.name?e.name+" has been updated!":""})}).catch(function(e){c.error({title:"Error creating queue!",msg:e.message})})},u.onSave=function(e){u.queues[e.id]&&_.merge(u.queues[e.id],_.pick(e,p))},u.onSaveMember=function(e){u.queues[e.MailQueueId]&&u.queues[e.MailQueueId].loggedInDb++},u.onRemoveMember=function(e){u.queues[e.MailQueueId]&&u.queues[e.MailQueueId].loggedInDb--},u.onPause=function(n){console.log("onPause",n),n.voicePause?_.forIn(u.queues,function(e,t){e.agents[n.id]&&(e.paused+=1,console.log("pause"))}):n.voicePause||_.forIn(u.queues,function(e,t){e.agents[n.id]&&0<e.paused&&(e.paused-=1,console.log("unpause"))})},u.onLogin=function(e){console.log("onLogged",e),u.queues[e.MailQueueId]&&(u.queues[e.MailQueueId].loggedInDb+=1,u.queues[e.MailQueueId].agents[e.UserId]=e.MailQueueId)},u.onLogout=function(e){console.log("onLogout",e),u.queues[e.MailQueueId]&&0<u.queues[e.MailQueueId].loggedInDb&&(u.queues[e.MailQueueId].loggedInDb-=1,delete u.queues[e.MailQueueId].agents[e.UserId])},u.$onInit=g,u.order=[],_.forIn(u.queues,function(e,t){u.order.push(e.id)}),d.on("mail_queue:save",u.onSave),d.on("userMailQueue:save",u.onSaveMember),d.on("userMailQueue:remove",u.onRemoveMember),d.on("user:update",u.onPause),d.on("userVoiceQueue:remove",u.onLogout),d.on("userVoiceQueue:save",u.onLogin);var v=!0,h=1;function b(e){if(u.count=e.count,u.queues=e?_.keyBy(e.rows?e.rows:[],"id"):{},e.rows){u.order=[];for(var t=0;t<e.rows.length;t++)u.order.push(e.rows[t].id)}g()}e.$watch("vm.query.filter",function(e,t){v?n(function(){v=!1}):(t||(h=u.query.page),e!==t&&(u.query.page=1),e||(u.query.page=h),u.getQueues())}),e.$on("$destroy",function(){d.removeAllListeners("mail_queue:save"),d.removeAllListeners("userMailQueue:remove"),d.removeAllListeners("userMailQueue:save"),d.removeAllListeners("user:update"),d.removeAllListeners("userVoiceQueue:remove"),d.removeAllListeners("userVoiceQueue:save")})}e.$inject=["$scope","$timeout","$mdDialog","$q","$document","$interval","queues","rpcQueues","api","socket","toasty","Auth"],angular.module("app.mail").controller("QueuesMailRealtimeController",e)}(),function(){"use strict";angular.module("app.auth").factory("helperClasses",function(){return{status:{registered:"green-300-fg icon-checkbox-marked-circle",unregistered:"red-300-fg icon-close-circle",lagged:"red-300-fg icon-close-circle",reachable:"green-300-fg icon-checkbox-marked-circle",unreachable:"red-300-fg icon-close-circle",unknown:"grey-fg icon-minus-circle"},state:{unknown:"grey-fg icon-phone-hangup",not_inuse:"green-300-fg icon-phone-hangup",inuse:"red-300-fg icon-phone-in-talk",busy:"red-300-fg icon-phone-locked",invalid:"grey-fg icon-phone-hangup",unavailable:"grey-fg icon-phone-hangup",ringing:"blue-300-fg icon-phone-incoming",ringinuse:"blue-300-fg icon-phone-incoming",onhold:"blue-300-fg icon-phone-paused"},channelStatus:{ring:"blue-300-fg icon-phone-incoming",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"},channelStatusOut:{ring:"blue-300-fg icon-phone-outgoing",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"}}})}(),function(){"use strict";function e(e,n,t){switch(t.disconnect(),t.connect(),this.selectedTab=0,n.current.name){case"app.mail.realtime.agents":this.selectedTab=0;break;case"app.mail.realtime.queues":this.selectedTab=1;break;case"app.mail.realtime.accounts":this.selectedTab=2;break;default:this.selectedTab=0,n.go("app.mail.realtime.agents")}e.$watch("vm.selectedTab",function(e,t){if(e!==t)switch(e){case 0:n.go("app.mail.realtime.agents");break;case 1:n.go("app.mail.realtime.queues");break;case 2:n.go("app.mail.realtime.accounts");break;default:n.go("app.mail.realtime.agents")}})}e.$inject=["$scope","$state","socket"],angular.module("app.mail").controller("MailRealtimeController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="MOTIONDIALER.EDIT_IVRCAMPAIGN",m.ivrCampaign=angular.copy(s),m.ivrCampaigns=o,m.newIvrCampaign=!1,m.ivrCampaign||(m.ivrCampaign={active:!0,type:"ivr",dialCheckDuplicateType:"always",limitCalls:30,dialOriginateTimeout:30,dialGlobalMaxRetry:4,dialCongestionMaxRetry:3,dialCongestionRetryFrequency:150,dialBusyMaxRetry:3,dialBusyRetryFrequency:150,dialNoAnswerMaxRetry:3,dialNoAnswerRetryFrequency:150,dialOrderByScheduledAt:"ASC",dialGlobalInterval:"07:00-22:00,*,*,*",dialAMDInitialSilence:2500,dialAMDGreeting:1500,dialAMDAfterGreetingSilence:800,dialAMDTotalAnalysisTime:5e3,dialAMDMinWordLength:100,dialAMDBetweenWordsSilence:50,dialAMDMaximumNumberOfWords:3,dialAMDSilenceThreshold:256,dialAMDMaximumWordLength:5e3},m.title="MOTIONDIALER.NEW_IVRCAMPAIGN",m.newIvrCampaign=!0),m.addNewIvrCampaign=function(){m.errors=[],r.campaign.save(m.ivrCampaign).$promise.then(function(e){m.ivrCampaigns.unshift(e.toJSON()),i.success({title:"IvrCampaign properly created",msg:m.ivrCampaign.name?m.ivrCampaign.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.campaign.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.campaign.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveIvrCampaign=function(){m.errors=[],r.campaign.update({id:m.ivrCampaign.id},m.ivrCampaign).$promise.then(function(e){var t=_.find(m.ivrCampaigns,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"IvrCampaign properly saved!",msg:m.ivrCampaign.name?m.ivrCampaign.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.campaign.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.campaign.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteIvrCampaign=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The ivrCampaign will be deleted.").ariaLabel("Delete IvrCampaign").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.campaign.delete({id:m.ivrCampaign.id}).$promise.then(function(){_.remove(m.ivrCampaigns,{id:m.ivrCampaign.id}),i.success({title:"IvrCampaign properly deleted!",msg:(m.ivrCampaign.name||"ivrCampaign")+" has been deleted!"}),u(m.ivrCampaign)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.campaign.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.campaign.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.trunk.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.trunks=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})}),r.squareProject.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.projects=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETprojects",msg:e.data?JSON.stringify(e.data):e.toString()})}),r.interval.get({fields:"id,name",sort:"name",IntervalId:"null"}).$promise.then(function(e){m.interval=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","ivrCampaigns","ivrCampaign","api","Auth","license","setting"],angular.module("app.motiondialer").controller("CreateOrEditIvrCampaignDialogController",e)}(),function(){"use strict";function e(e,n,a,t,i,o){var s=this;s.ivrCampaign=t,s.items=[],s.selectedItems=[],s.loading=!1,s.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!1,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("MOTIONDIALER.ALL_LISTS"),labelSelected:i.instant("MOTIONDIALER.SELECTED_LISTS"),transferCallback:function(e,t){s.loading=!0,a.campaign[t?"removeBlackLists":"addBlackLists"]({id:s.ivrCampaign.id,ids:_.map(e,"id")}).$promise.then(function(){n.success({title:"List properly "+(t?"removed":"added"),msg:"List has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:ivrCampaign.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})}).finally(function(){s.loading=!1})}},s.closeDialog=function(){e.hide()},a.campaign.getBlackLists({id:s.ivrCampaign.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return s.selectedItems=e.rows?e.rows:[],s.dualMultiselectOptions.selectedItems=s.selectedItems,a.cmList.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){s.items=e.rows?e.rows:[],s.dualMultiselectOptions.items=_.differenceBy(s.items,s.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","ivrCampaign","$translate","$timeout"],angular.module("app.motiondialer").controller("IvrCampaignblacklistaddController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.ivrCampaign={},c.ivrCampaignHopperBlacks={count:0,rows:[]},c.selectedIvrCampaignHopperBlacks=[],c.query={fields:"createdAt,updatedAt,ContactId,phone",sort:"-id",limit:10,page:1},c.init=function(e){c.ivrCampaign=e,c.query.id=c.ivrCampaign.id,c.query.CampaignId=c.ivrCampaign.id,c.getIvrCampaignHopperBlacks()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the hopperBlack?").htmlContent("<b>"+(e.name||"hopperBlack")+"</b> will be deleted.").ariaLabel("delete hopperBlack").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getIvrCampaignHopperBlacks=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.campaign.getHopperBlacks(c.query,p).$promise},c.createOrEditIvrCampaignHopperBlack=function(e,t){o.show({controller:"CreateOrEditHopperBlackDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/hopperBlacks/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{ivrCampaign:c.ivrCampaign,hopperBlack:t,hopperBlacks:c.ivrCampaignHopperBlacks.rows,license:null,setting:null}})},c.exportSelectedIvrCampaignHopperBlacks=function(){var e=angular.copy(c.selectedIvrCampaignHopperBlacks);return c.selectedIvrCampaignHopperBlacks=[],e},c.deleteIvrCampaignHopperBlack=g,c.deleteSelectedIvrCampaignHopperBlacks=function(e){var t=o.confirm().title("Are you sure want to delete the selected hopperBlacks?").htmlContent("<b>"+c.selectedIvrCampaignHopperBlacks.length+" selected</b> will be deleted.").ariaLabel("delete hopperBlacks").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedIvrCampaignHopperBlacks.forEach(function(e){g(e)}),c.selectedIvrCampaignHopperBlacks=[]})};var m=!0,u=1;function p(e){c.ivrCampaignHopperBlacks=e||{count:0,rows:[]}}function g(e){l.hopperBlack.delete({id:e.id}).$promise.then(function(){_.remove(c.ivrCampaignHopperBlacks.rows,{id:e.id}),c.ivrCampaignHopperBlacks.count-=1,c.ivrCampaignHopperBlacks.rows.length||c.getIvrCampaignHopperBlacks(),r.success({title:"HopperBlack deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETcampaign"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcampaign",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getIvrCampaignHopperBlacks())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.motiondialer").controller("IvrCampaignHopperBlacksController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.contacts={},c.ivrCampaign={},c.ivrCampaignHopperFinals={count:0,rows:[]},c.selectedIvrCampaignHopperFinals=[],c.query={fields:"createdAt,updatedAt,uniqueid,ContactId,calleridnum,calleridname,statedesc,countcongestionretry,countbusyretry,countnoanswerretry,countglobal,scheduledat,starttime,responsetime,endtime,disposition,ListId,UserId,VoiceQueueId,CampaignId,recallme,deleted,campaign",sort:"-id",limit:10,page:1},c.init=function(e){c.ivrCampaign=e,c.query.id=c.ivrCampaign.id,c.query.CampaignId=c.ivrCampaign.id,c.getIvrCampaignHopperFinals()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the hopperFinal?").htmlContent("<b>"+(e.name||"hopperFinal")+"</b> will be deleted.").ariaLabel("delete hopperFinal").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getIvrCampaignHopperFinals=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.campaign.getHopperFinals(c.query,p).$promise},c.createOrEditIvrCampaignHopperFinal=function(e,t){o.show({controller:"CreateOrEditHopperFinalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/hopperFinals/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{ivrCampaign:c.ivrCampaign,hopperFinal:t,hopperFinals:c.ivrCampaignHopperFinals.rows,license:null,setting:null}})},c.exportSelectedIvrCampaignHopperFinals=function(){var e=angular.copy(c.selectedIvrCampaignHopperFinals);return c.selectedIvrCampaignHopperFinals=[],e},c.deleteIvrCampaignHopperFinal=g,c.deleteSelectedIvrCampaignHopperFinals=function(e){var t=o.confirm().title("Are you sure want to delete the selected hopperFinals?").htmlContent("<b>"+c.selectedIvrCampaignHopperFinals.length+" selected</b> will be deleted.").ariaLabel("delete hopperFinals").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedIvrCampaignHopperFinals.forEach(function(e){g(e)}),c.selectedIvrCampaignHopperFinals=[]})},c.moveIvrCampaignHopperFinal=v,c.moveContactsIvrCampaignHopperFinal=function(e){l.cmHopperFinal.moveContactsIvrCampaignHopperFinal({id:c.query.id,state:e}).$promise.then(function(e){_.isNil(e)&&_.isNil(e[0])?r.info({title:"Restored Contacts",msg:"0"}):r.info({title:"Restored Contacts",msg:JSON.stringify(e[0].affectedRows)})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},c.countContactsIvrCampaignHopperFinal=function(e){l.cmHopperFinal.countContactsIvrCampaignHopperFinal({id:e}).$promise.then(function(e){_.merge(c.contacts,e[0])}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcampaign",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},c.moveConfirm=function(e,t){var n=o.confirm().title("Are you sure want to restore the contact?").htmlContent("<b>Contact</b> will be restored.").ariaLabel("Restore Contact").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){v(e)},function(){console.log("CANCEL")})},c.moveSelectedIvrCampaignHopperFinals=function(e){var t=o.confirm().title("Are you sure want to restore the selected contacts?").htmlContent("<b> Contacts selected</b> will be restored.").ariaLabel("Restore Contacts").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedIvrCampaignHopperFinals.forEach(function(e){v(e)}),c.selectedIvrCampaignHopperFinals=[]})};var m=!0,u=1;function p(e){c.ivrCampaignHopperFinals=e||{count:0,rows:[]}}function g(e){l.hopperFinal.delete({id:e.id}).$promise.then(function(){_.remove(c.ivrCampaignHopperFinals.rows,{id:e.id}),c.ivrCampaignHopperFinals.count-=1,c.ivrCampaignHopperFinals.rows.length||c.getIvrCampaignHopperFinals(),r.success({title:"HopperFinal deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETcampaign"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcampaign",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}function v(a){l.cmHopperFinal.checkContactHopper(a).$promise.then(function(e){r.info({title:"The contact is in the hopper",msg:"Contact ID "+e.ContactId})}).catch(function(e){var t,n;"Not Found"===e.data?l.cmHopper.save((t=a,n={},n.phone=t.calleridnum,n.scheduledat=moment().format("YYYY-MM-DD HH:mm:ss"),n.countbusyretry=0,n.countcongestionretry=0,n.countnoanswerretry=0,n.countglobal=0,n.ContactId=t.ContactId,n.ListId=t.ListId,n.UserId=t.deleted?null:t.UserId,n.VoiceQueueId=t.VoiceQueueId,n.CampaignId=t.CampaignId,n.priority=t.recallme?3:2,n.recallme=!!t.recallme,n)).$promise.then(function(e){var t,n;r.info({title:"Restored Contact",msg:"Contact ID "+e.ContactId}),e.ContactId&&l.cmHopperHistory.save(((n={}).calleridnum=(t=a).calleridnum,n.calleridname=t.calleridname,n.scheduledat=moment().format("YYYY-MM-DD HH:mm:ss"),n.countbusyretry=t.countbusyretry,n.countcongestionretry=t.countcongestionretry,n.countnoanswerretry=t.countnoanswerretry,n.countglobal=t.countglobal,n.ContactId=t.ContactId,n.ListId=t.ListId,n.UserId=d.getCurrentUser().id,n.VoiceQueueId=t.VoiceQueueId,n.CampaignId=t.CampaignId,n.editedat=moment().format("YYYY-MM-DD HH:mm:ss"),n.edited=!0,n.state=25,n.statedesc="Restored",n.campaign=t.campaign,n.campaigntype=t.VoiceQueueId?"queue":"ivr",n))}).catch(function(e){_.isNil(e.data)||"Validation error"!==e.data.message?r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()}):r.info({title:"The contact is in the hopper",msg:"Contact ID "+a.ContactId})}):r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getIvrCampaignHopperFinals())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.motiondialer").controller("IvrCampaignHopperFinalsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.ivrCampaign={},c.ivrCampaignHopperHistories={count:0,rows:[]},c.selectedIvrCampaignHopperHistories=[],c.query={fields:"createdAt,updatedAt,uniqueid,ContactId,calleridnum,calleridname,statedesc,scheduledat,starttime,responsetime,endtime",sort:"-id",limit:10,page:1},c.init=function(e){c.ivrCampaign=e,c.query.id=c.ivrCampaign.id,c.query.CampaignId=c.ivrCampaign.id,c.getIvrCampaignHopperHistories()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the hopperHistory?").htmlContent("<b>"+(e.name||"hopperHistory")+"</b> will be deleted.").ariaLabel("delete hopperHistory").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getIvrCampaignHopperHistories=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.campaign.getHopperHistories(c.query,p).$promise},c.createOrEditIvrCampaignHopperHistory=function(e,t){o.show({controller:"CreateOrEditHopperHistoryDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/hopperHistories/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{ivrCampaign:c.ivrCampaign,hopperHistory:t,hopperHistories:c.ivrCampaignHopperHistories.rows,license:null,setting:null}})},c.exportSelectedIvrCampaignHopperHistories=function(){var e=angular.copy(c.selectedIvrCampaignHopperHistories);return c.selectedIvrCampaignHopperHistories=[],e},c.deleteIvrCampaignHopperHistory=g,c.deleteSelectedIvrCampaignHopperHistories=function(e){var t=o.confirm().title("Are you sure want to delete the selected hopperHistories?").htmlContent("<b>"+c.selectedIvrCampaignHopperHistories.length+" selected</b> will be deleted.").ariaLabel("delete hopperHistories").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedIvrCampaignHopperHistories.forEach(function(e){g(e)}),c.selectedIvrCampaignHopperHistories=[]})};var m=!0,u=1;function p(e){c.ivrCampaignHopperHistories=e||{count:0,rows:[]}}function g(e){l.hopperHistory.delete({id:e.id}).$promise.then(function(){_.remove(c.ivrCampaignHopperHistories.rows,{id:e.id}),c.ivrCampaignHopperHistories.count-=1,c.ivrCampaignHopperHistories.rows.length||c.getIvrCampaignHopperHistories(),r.success({title:"HopperHistory deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETcampaign"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcampaign",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getIvrCampaignHopperHistories())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.motiondialer").controller("IvrCampaignHopperHistoriesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.ivrCampaign={},c.ivrCampaignHoppers={count:0,rows:[]},c.selectedIvrCampaignHoppers=[],c.query={fields:"createdAt,updatedAt,id,ContactId,phone,countcongestionretry,countbusyretry,countnoanswerretry,scheduledat,priority",sort:"-updatedAt",limit:10,page:1},c.arraypriority=_.keyBy([{option:"Highest",value:"'4'"},{option:"High",value:"'3'"},{option:"Medium",value:"'2'"},{option:"Low",value:"'1'"},{option:"Lowest",value:"'0'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.init=function(e){c.ivrCampaign=e,c.query.id=c.ivrCampaign.id,c.query.CampaignId=c.ivrCampaign.id,c.getIvrCampaignHoppers()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the hopper?").htmlContent("<b>"+(e.name||"hopper")+"</b> will be deleted.").ariaLabel("delete hopper").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getIvrCampaignHoppers=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.campaign.getHoppers(c.query,p).$promise},c.createOrEditIvrCampaignHopper=function(e,t){o.show({controller:"CreateOrEditHopperCampaignIdDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/hoppers/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{ivrCampaign:c.ivrCampaign,hopper:t,hoppers:c.ivrCampaignHoppers.rows,license:null,setting:null}})},c.exportSelectedIvrCampaignHoppers=function(){var e=angular.copy(c.selectedIvrCampaignHoppers);return c.selectedIvrCampaignHoppers=[],e},c.deleteIvrCampaignHopper=g,c.deleteSelectedIvrCampaignHoppers=function(e){var t=o.confirm().title("Are you sure want to delete the selected hoppers?").htmlContent("<b>"+c.selectedIvrCampaignHoppers.length+" selected</b> will be deleted.").ariaLabel("delete hoppers").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedIvrCampaignHoppers.forEach(function(e){g(e)}),c.selectedIvrCampaignHoppers=[]})},l.user.get({fields:"id,name",role:"agent",sort:"name",nolimit:"true"}).$promise.then(function(e){c.agents=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETagents",msg:e.data?JSON.stringify(e.data):e.toString()})});var m=!0,u=1;function p(e){c.ivrCampaignHoppers=e||{count:0,rows:[]}}function g(e){l.cmHopper.delete({id:e.id}).$promise.then(function(){_.remove(c.ivrCampaignHoppers.rows,{id:e.id}),c.ivrCampaignHoppers.count-=1,c.ivrCampaignHoppers.rows.length||c.getIvrCampaignHoppers(),r.success({title:"Hopper deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETcampaign"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcampaign",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getIvrCampaignHoppers())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.motiondialer").controller("IvrCampaignHoppersController",e)}(),function(){"use strict";function e(e,t,n,a,s,i,o,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="MOTIONDIALER.EDIT_HOPPER",m.hopper=angular.copy(o),m.hoppers=i,m.newHopper=!1,m.hopper||(m.hopper={},m.title="MOTIONDIALER.NEW_HOPPER",m.newHopper=!0),t.params.id&&(m.hopper.CampaignId=t.params.id),m.addNewHopper=function(){m.errors=[],r.cmHopper.save(m.hopper).$promise.then(function(e){m.hoppers.unshift(e.toJSON()),s.success({title:"Hopper properly created",msg:m.hopper.name?m.hopper.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmHopper.save"}];for(var t=0;t<e.data.errors.length;t+=1)s.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else s.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmHopper.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveHopper=function(){var n,a,i,o;m.errors=[],m.hopper.UserId=m.hopper.recallme?m.hopper.UserId:null,r.cmHopper.get({id:m.hopper.id,attributes:["scheduledat"]}).$promise.then(function(e){n=_.isNil(e)||_.isEmpty(e)?moment().format("YYYY-MM-DD HH:mm:ss"):e.scheduledat}).finally(function(){r.cmHopper.update({id:m.hopper.id},_.omit(m.hopper,["VoiceQueueId","CampaignId","ContactId","ListId"])).$promise.then(function(e){a=e,r.cmContact.get({id:a.ContactId,attributes:["firstName","lastName"]}).$promise.then(function(e){_.isNil(e)||_.isNil(e.firstName)||(i=e.firstName,_.isNil(e.lastName)||(i+=" "+e.lastName))}).catch(function(){i=void 0}).finally(function(){r.campaign.get({raw:!1,id:a.CampaignId,attributes:["name"]}).$promise.then(function(e){o=e.name}).catch(function(e){o=void 0}).finally(function(){r.cmHopperHistory.save({state:24,statedesc:"Edited",scheduledat:n,calleridnum:a.phone,calleridname:i,campaigntype:a.VoiceQueueId?"queue":"ivr",campaign:o,editedat:moment().format("YYYY-MM-DD HH:mm:ss"),edited:!0,ListId:a.ListId,UserId:l.getCurrentUser().id,VoiceQueueId:a.VoiceQueueId,CampaignId:a.CampaignId,ContactId:a.ContactId,callback:a.callback,callbackuniqueid:a.callbackuniqueid,countbusyretry:a.countbusyretry,countcongestionretry:a.countcongestionretry,countglobal:a.countglobal,countnoanswerretry:a.countnoanswerretry,followuptime:a.followuptime,recallme:a.recallme})})});var t=_.find(m.hoppers,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),s.success({title:"Hopper properly saved!",msg:m.hopper.name?m.hopper.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmHopper.update"}];for(var t=0;t<e.data.errors.length;t++)s.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else s.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmHopper.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})})},m.deleteHopper=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The hopper will be deleted.").ariaLabel("Delete Hopper").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.cmHopper.delete({id:m.hopper.id}).$promise.then(function(){_.remove(m.hoppers,{id:m.hopper.id}),s.success({title:"Hopper properly deleted!",msg:(m.hopper.name||"hopper")+" has been deleted!"}),u(m.hopper)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmHopper.delete"}];for(var t=0;t<e.data.errors.length;t++)s.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else s.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmHopper.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.user.get({fields:"id,name",role:"agent",sort:"name",nolimit:"true"}).$promise.then(function(e){m.agents=e.rows||[]}).catch(function(e){s.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETagents",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","hoppers","hopper","api","Auth","license","setting"],angular.module("app.motiondialer").controller("CreateOrEditHopperCampaignIdDialogController",e)}(),function(){"use strict";function e(n,a){var i=this;i.ivrCampaign={},i.init=function(t){i.ivrCampaign=t,n.cmHopper.get({limit:0,CampaignId:t.id}).$promise.then(function(e){return i.total=e.count||0,n.cmHopper.get({limit:0,CampaignId:t.id,active:!1,countbusyretry:0,countcongestionretry:0,countnoanswerretry:0}).$promise}).then(function(e){return i.fresh=e.count||0,n.cmHopperFinal.get({limit:0,CampaignId:t.id}).$promise}).then(function(e){i.closed=e.count||0}).catch(function(e){a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["api","toasty"],angular.module("app.motiondialer").controller("IvrCampaignHopperStatisticsController",e)}(),function(){"use strict";function e(e,n,a,t,i,o){var s=this;s.ivrCampaign=t,s.items=[],s.selectedItems=[],s.loading=!1,s.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!1,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("MOTIONDIALER.ALL_LISTS"),labelSelected:i.instant("MOTIONDIALER.SELECTED_LISTS"),transferCallback:function(e,t){s.loading=!0,a.campaign[t?"removeLists":"addLists"]({id:s.ivrCampaign.id,ids:_.map(e,"id")}).$promise.then(function(){n.success({title:"List properly "+(t?"removed":"added"),msg:"List has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:ivrCampaign.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})}).finally(function(){s.loading=!1})}},s.closeDialog=function(){e.hide()},a.campaign.getLists({id:s.ivrCampaign.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return s.selectedItems=e.rows?e.rows:[],s.dualMultiselectOptions.selectedItems=s.selectedItems,a.cmList.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){s.items=e.rows?e.rows:[],s.dualMultiselectOptions.items=_.differenceBy(s.items,s.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","ivrCampaign","$translate","$timeout"],angular.module("app.motiondialer").controller("IvrCampaignlistaddController",e)}(),function(){"use strict";function e(e,t,a,i,o,n,s,r){var l=this;function d(){t.hide()}function c(e,t){var n=t.id;s.enqueue(function(){return i.campaign.removeLists({id:e,ids:n}).$promise.then(function(){return i.campaign.addLists({id:e,ids:n,dialCheckDuplicateType:"never"}).$promise}).then(function(){a.success({title:"Reset Succesfull",msg:"List "+t.name+" has been reset"})}).catch(function(e){a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:queueCampaign.RESETLIST",msg:e.status?JSON.stringify(e.data):e.toString()})})})}l.selected=[],l.items=n||[],l.loading=!1,l.closeDialog=d,l.exists=function(e,t){return-1<t.indexOf(e)},l.toggle=function(e,t){var n=t.indexOf(e);-1<n?t.splice(n,1):t.push(e)},l.isIndeterminate=function(){return 0!==l.selected.length&&l.selected.length!==l.items.length},l.isChecked=function(){return l.selected.length===l.items.length},l.toggleAll=function(){l.selected.length===l.items.length?l.selected=[]:(0===l.selected.length||0<l.selected.length)&&(l.selected=l.items.slice(0))},l.listSelected=function(){l.loading=!0,r(function(e,t){for(var n=0;n<l.selected.length;n+=1)c(o.id,l.selected[n]);var a;a=e,s.enqueue(function(){return a()})}).finally(function(){l.loading=!1,d()})}}e.$inject=["$scope","$mdDialog","toasty","api","ivrCampaign","listsCampaign","Sequence","$q"],angular.module("app.motiondialer").controller("IvrCampaignresetlistController",e)}(),function(){"use strict";function e(n,e,i,o,t,a,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=t,c.setting=a,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=e.protocol()+"://"+e.host(),c.ivrCampaign=d||n.params.ivrCampaign||{},c.selectedTab=n.params.tab||0,c.listadddialog=function(e,t){i.show({controller:"IvrCampaignlistaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/listadd/listadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{ivrCampaign:e,ivrCampaigns:c.ivrCampaigns?c.ivrCampaigns.rows:[]}})},c.blacklistadddialog=function(e,t){i.show({controller:"IvrCampaignblacklistaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/blacklistadd/blacklistadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{ivrCampaign:e,ivrCampaigns:c.ivrCampaigns?c.ivrCampaigns.rows:[]}})},c.resetlistdialog=function(t,n){s.campaign.getLists({id:t.id,fields:"id,name",nolimit:!0}).$promise.then(function(a){if(_.isNil(a.rows)||_.isEmpty(a.rows))r.info({title:"Campaign Without Lists"});else if(1===a.rows.length){var e=i.confirm().title("Are you sure want to reset the list "+a.rows[0].name+" ?").htmlContent("<b>"+a.rows[0].name+"</b> will be reset.").ariaLabel("Reset List").targetEvent(n).ok("OK").cancel("CANCEL");i.show(e).then(function(){var e,t,n;e=c.ivrCampaign.id,t=a.rows[0],n=t.id,s.campaign.removeLists({id:e,ids:n}).$promise.then(function(){return s.campaign.addLists({id:e,ids:n,dialCheckDuplicateType:"never"}).$promise}).then(function(){r.success({title:"Reset Succesfull",msg:"List "+t.name+" has been reset"})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:ivrCampaign.REMOVELIST",msg:e.status?JSON.stringify(e.data):e.toString()})})})}else i.show({controller:"IvrCampaignresetlistController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/resetlist/resetlist.html",parent:angular.element(o.body),targetEvent:n,clickOutsideToClose:!1,locals:{ivrCampaign:t,listsCampaign:a?a.rows:[]}})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:RESETLIST",msg:e.status?JSON.stringify(e.data):e.toString()})})},c.gotogoto=function(e,t){n.go("app.motiondialer.realtime.ivr_campaigns",{})},c.alert=r.info,c.gotoIvrCampaigns=function(){n.go("app.motiondialer.ivrCampaigns")},c.saveIvrCampaign=function(){s.campaign.update({id:c.ivrCampaign.id},c.ivrCampaign).$promise.then(function(){r.success({title:"IvrCampaign updated!",msg:c.ivrCampaign.name?c.ivrCampaign.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcampaign",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.trunk.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.trunks=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.squareProject.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.projects=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETprojects",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.interval.get({fields:"id,name",sort:"name",IntervalId:"null"}).$promise.then(function(e){c.interval=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","ivrCampaign"],angular.module("app.motiondialer").controller("IvrCampaignController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.ivrCampaigns=r||{count:0,rows:[]},v.table="ivrCampaigns",v.listOrder="",v.listOrderAsc=null,v.selectedIvrCampaigns=[],v.query={fields:"createdAt,updatedAt,id,name,active,TrunkId,TrunkBackupId,type,IntervalId,dialCheckDuplicateType,SquareProjectId,limitCalls,description,dialOriginateCallerIdName,dialOriginateCallerIdNumber,dialOriginateTimeout,dialGlobalMaxRetry,dialCongestionMaxRetry,dialCongestionRetryFrequency,dialBusyMaxRetry,dialBusyRetryFrequency,dialNoAnswerMaxRetry,dialNoAnswerRetryFrequency,dialOrderByScheduledAt,dialGlobalInterval,dialTimezone,dialPrefix,dialAMDActive,dialAMDInitialSilence,dialAMDGreeting,dialAMDAfterGreetingSilence,dialAMDTotalAnalysisTime,dialAMDMinWordLength,dialAMDBetweenWordsSilence,dialAMDMaximumNumberOfWords,dialAMDSilenceThreshold,dialAMDMaximumWordLength",type:"ivr",sort:"-updatedAt",limit:10,page:1},v.arraydialCheckDuplicateType=_.keyBy([{option:"ALWAYS",value:"'always'"},{option:"NEVER",value:"'never'"},{option:"ONLY_IF_OPEN",value:"'onlyIfOpen'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraydialOrderByScheduledAt=_.keyBy([{option:"DESC",value:"'DESC'"},{option:"ASC",value:"'ASC'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.motiondialer.ivrCampaigns.edit",{id:e.id,ivrCampaign:e})},v.listadddialog=function(e,t){i.show({controller:"IvrCampaignlistaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/listadd/listadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{ivrCampaign:e,ivrCampaigns:v.ivrCampaigns?v.ivrCampaigns.rows:[]}})},v.blacklistadddialog=function(e,t){i.show({controller:"IvrCampaignblacklistaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/edit/blacklistadd/blacklistadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{ivrCampaign:e,ivrCampaigns:v.ivrCampaigns?v.ivrCampaigns.rows:[]}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the ivrCampaign?").htmlContent("<b>"+(e.name||"ivrCampaign")+"</b> will be deleted.").ariaLabel("delete ivrCampaign").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.gotorealtimegoto=function(e,t){n.go("app.motiondialer.realtime.ivr_campaigns",{})},v.success=f,v.getIvrCampaigns=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.campaign.get(v.query,f).$promise},v.createOrEditIvrCampaign=function(e,t){i.show({controller:"CreateOrEditIvrCampaignDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{ivrCampaign:t,ivrCampaigns:v.ivrCampaigns.rows,license:v.license,setting:v.setting}})},v.deleteIvrCampaign=A,v.exportSelectedIvrCampaigns=function(){var e=angular.copy(v.selectedIvrCampaigns);return v.selectedIvrCampaigns=[],e},v.deleteSelectedIvrCampaigns=function(e){var t=i.confirm().title("Are you sure want to delete the selected ivrCampaigns?").htmlContent("<b>"+v.selectedIvrCampaigns.length+" selected</b> will be deleted.").ariaLabel("delete IvrCampaigns").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedIvrCampaigns.forEach(function(e){A(e)}),v.selectedIvrCampaigns=[]})},v.deselectIvrCampaigns=function(){v.selectedIvrCampaigns=[]},v.selectAllIvrCampaigns=function(){v.selectedIvrCampaigns=v.ivrCampaigns.rows},l.trunk.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.trunks=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.squareProject.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.projects=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETprojects",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.interval.get({fields:"id,name",sort:"name",IntervalId:"null"}).$promise.then(function(e){v.interval=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.ivrCampaigns=e||{count:0,rows:[]}}function A(e){l.campaign.delete({id:e.id}).$promise.then(function(){_.remove(v.ivrCampaigns.rows,{id:e.id}),v.ivrCampaigns.count-=1,v.ivrCampaigns.rows.length||v.getIvrCampaigns(),c.success({title:"IvrCampaign deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEcampaign"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEcampaign",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getIvrCampaigns())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","ivrCampaigns","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.motiondialer").controller("IvrCampaignsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="MOTIONDIALER.EDIT_QUEUECAMPAIGN",m.queueCampaign=angular.copy(s),m.queueCampaigns=o,m.newQueueCampaign=!1,m.queueCampaign||(m.queueCampaign={dialActive:!0,type:"outbound",dialCheckDuplicateType:"always",autopause:"no",ringinuse:"no",timeoutrestart:"no",setinterfacevar:"no",setqueuevar:"no",setqueueentryvar:"no",dialOrderByScheduledAt:"ASC",dialGlobalInterval:"07:00-22:00,*,*,*",dialAMDInitialSilence:2500,dialAMDGreeting:1500,dialAMDAfterGreetingSilence:800,dialAMDTotalAnalysisTime:5e3,dialAMDMinWordLength:100,dialAMDBetweenWordsSilence:50,dialAMDMaximumNumberOfWords:3,dialAMDSilenceThreshold:256,dialAMDMaximumWordLength:5e3,dialMethod:"progressive",dialPowerLevel:1,dialPredictiveOptimization:"dropRate",dialPredictiveOptimizationPercentage:3,dialPredictiveInterval:10,dialLimitQueue:0,dialOriginateTimeout:30,dialQueueOptions:"tTxX",dialQueueTimeout:3,strategy:"rrmemory",timeout:3,retry:3,weight:1,dialGlobalMaxRetry:4,dialCongestionMaxRetry:3,dialCongestionRetryFrequency:150,dialBusyMaxRetry:3,dialBusyRetryFrequency:150,dialNoAnswerMaxRetry:3,dialNoAnswerRetryFrequency:150},m.title="MOTIONDIALER.NEW_QUEUECAMPAIGN",m.newQueueCampaign=!0),m.addNewQueueCampaign=function(){m.errors=[],r.voiceQueue.save(m.queueCampaign).$promise.then(function(e){m.queueCampaigns.unshift(e.toJSON()),i.success({title:"QueueCampaign properly created",msg:m.queueCampaign.name?m.queueCampaign.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceQueue.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceQueue.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveQueueCampaign=function(){m.errors=[],r.voiceQueue.update({id:m.queueCampaign.id},m.queueCampaign).$promise.then(function(e){var t=_.find(m.queueCampaigns,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"QueueCampaign properly saved!",msg:m.queueCampaign.name?m.queueCampaign.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceQueue.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceQueue.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteQueueCampaign=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The queueCampaign will be deleted.").ariaLabel("Delete QueueCampaign").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceQueue.delete({id:m.queueCampaign.id}).$promise.then(function(){_.remove(m.queueCampaigns,{id:m.queueCampaign.id}),i.success({title:"QueueCampaign properly deleted!",msg:(m.queueCampaign.name||"queueCampaign")+" has been deleted!"}),u(m.queueCampaign)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceQueue.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceQueue.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.trunk.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.trunks=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})}),r.interval.get({fields:"id,name",sort:"name",IntervalId:"null"}).$promise.then(function(e){m.interval=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","queueCampaigns","queueCampaign","api","Auth","license","setting"],angular.module("app.motiondialer").controller("CreateOrEditQueueCampaignDialogController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r){var l=this;function d(){return a.voiceQueue[l.isVoiceRealtime()?"getMembers":"getAgents"]({id:l.queueCampaign.id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){return l.isVoiceRealtime()?l.selectedItems=e.rows?_.map(e.rows,function(e){return e.id=e.UserId,e.fullname=e.membername,e.penalty=e.hasOwnProperty("penalty")?"penalty "+e.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[]:l.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserQueueCampaign?"penalty "+e.UserQueueCampaign.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.selectedItems=l.selectedItems,r.hasRole("admin")?a.user.get({fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise:a.user.getAgents({id:r.getCurrentUser().id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise}).then(function(e){l.items=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserQueueCampaign?"penalty "+e.UserQueueCampaign.penalty:"",e.internal=e.internal?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.items=_.differenceBy(l.items,l.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETUSERS.GETAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}l.queueCampaign=t,l.penalty=0,l.items=[],l.selectedItems=[],l.closeDialog=function(){e.hide()},l.isVoiceRealtime=function(){return o},l.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"penalty",labelAll:s.instant("MOTIONDIALER.ALL_AGENTS"),labelSelected:s.instant("MOTIONDIALER.SELECTED_AGENTS"),transferCallback:function(e,t){a.voiceQueue[t?"removeAgents":"addAgents"]({id:l.queueCampaign.id,ids:_.map(e,l.isVoiceRealtime()&&t?"UserId":"id"),penalty:l.penalty||0,realtime:o||!1}).$promise.then(function(){n.success({title:"QueueCampaign properly "+(t?"removed":"added"),msg:"QueueCampaign has been "+(t?"removed":"added")+"!"}),t||d()}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:voiceQueue.ADDAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d()}e.$inject=["$mdDialog","toasty","api","queueCampaign","queueCampaigns","realtime","$translate","Auth"],angular.module("app.motiondialer").controller("QueueCampaignagentaddController",e)}(),function(){"use strict";function e(e,n,a,t,i,o){var s=this;s.queueCampaign=t,s.items=[],s.selectedItems=[],s.loading=!1,s.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!1,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("MOTIONDIALER.ALL_LISTS"),labelSelected:i.instant("MOTIONDIALER.SELECTED_LISTS"),transferCallback:function(e,t){s.loading=!0,a.voiceQueue[t?"removeBlackLists":"addBlackLists"]({id:s.queueCampaign.id,ids:_.map(e,"id")}).$promise.then(function(){n.success({title:"List properly "+(t?"removed":"added"),msg:"List has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:queueCampaign.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})}).finally(function(){s.loading=!1})}},s.closeDialog=function(){e.hide()},a.voiceQueue.getBlackLists({id:s.queueCampaign.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return s.selectedItems=e.rows?e.rows:[],s.dualMultiselectOptions.selectedItems=s.selectedItems,a.cmList.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){s.items=e.rows?e.rows:[],s.dualMultiselectOptions.items=_.differenceBy(s.items,s.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","queueCampaign","$translate","$timeout"],angular.module("app.motiondialer").controller("QueueCampaignblacklistaddController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.queueCampaign={},c.queueCampaignHopperBlacks={count:0,rows:[]},c.selectedQueueCampaignHopperBlacks=[],c.query={fields:"createdAt,updatedAt,ContactId,phone",sort:"-id",limit:10,page:1},c.init=function(e){c.queueCampaign=e,c.query.id=c.queueCampaign.id,c.query.VoiceQueueId=c.queueCampaign.id,c.getQueueCampaignHopperBlacks()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the hopperBlack?").htmlContent("<b>"+(e.name||"hopperBlack")+"</b> will be deleted.").ariaLabel("delete hopperBlack").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getQueueCampaignHopperBlacks=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.voiceQueue.getHopperBlacks(c.query,p).$promise},c.createOrEditQueueCampaignHopperBlack=function(e,t){o.show({controller:"CreateOrEditHopperBlackDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/hopperBlacks/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{queueCampaign:c.queueCampaign,hopperBlack:t,hopperBlacks:c.queueCampaignHopperBlacks.rows,license:null,setting:null}})},c.exportSelectedQueueCampaignHopperBlacks=function(){var e=angular.copy(c.selectedQueueCampaignHopperBlacks);return c.selectedQueueCampaignHopperBlacks=[],e},c.deleteQueueCampaignHopperBlack=g,c.deleteSelectedQueueCampaignHopperBlacks=function(e){var t=o.confirm().title("Are you sure want to delete the selected hopperBlacks?").htmlContent("<b>"+c.selectedQueueCampaignHopperBlacks.length+" selected</b> will be deleted.").ariaLabel("delete hopperBlacks").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedQueueCampaignHopperBlacks.forEach(function(e){g(e)}),c.selectedQueueCampaignHopperBlacks=[]})};var m=!0,u=1;function p(e){c.queueCampaignHopperBlacks=e||{count:0,rows:[]}}function g(e){l.hopperBlack.delete({id:e.id}).$promise.then(function(){_.remove(c.queueCampaignHopperBlacks.rows,{id:e.id}),c.queueCampaignHopperBlacks.count-=1,c.queueCampaignHopperBlacks.rows.length||c.getQueueCampaignHopperBlacks(),r.success({title:"HopperBlack deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETvoiceQueue"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getQueueCampaignHopperBlacks())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.motiondialer").controller("QueueCampaignHopperBlacksController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.contacts={},c.queueCampaign={},c.queueCampaignHopperFinals={count:0,rows:[]},c.selectedQueueCampaignHopperFinals=[],c.query={fields:"createdAt,updatedAt,uniqueid,ContactId,calleridnum,calleridname,statedesc,countcongestionretry,countbusyretry,countnoanswerretry,countglobal,scheduledat,starttime,responsetime,endtime,disposition,ListId,UserId,VoiceQueueId,CampaignId,recallme,deleted,campaign",sort:"-id",limit:10,page:1},c.init=function(e){c.queueCampaign=e,c.query.id=c.queueCampaign.id,c.query.VoiceQueueId=c.queueCampaign.id,c.getQueueCampaignHopperFinals()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the hopperFinal?").htmlContent("<b>"+(e.name||"hopperFinal")+"</b> will be deleted.").ariaLabel("delete hopperFinal").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getQueueCampaignHopperFinals=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.voiceQueue.getHopperFinals(c.query,p).$promise},c.createOrEditQueueCampaignHopperFinal=function(e,t){o.show({controller:"CreateOrEditHopperFinalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/hopperFinals/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{queueCampaign:c.queueCampaign,hopperFinal:t,hopperFinals:c.queueCampaignHopperFinals.rows,license:null,setting:null}})},c.exportSelectedQueueCampaignHopperFinals=function(){var e=angular.copy(c.selectedQueueCampaignHopperFinals);return c.selectedQueueCampaignHopperFinals=[],e},c.deleteQueueCampaignHopperFinal=g,c.deleteSelectedQueueCampaignHopperFinals=function(e){var t=o.confirm().title("Are you sure want to delete the selected hopperFinals?").htmlContent("<b>"+c.selectedQueueCampaignHopperFinals.length+" selected</b> will be deleted.").ariaLabel("delete hopperFinals").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedQueueCampaignHopperFinals.forEach(function(e){g(e)}),c.selectedQueueCampaignHopperFinals=[]})},c.moveQueueCampaignHopperFinal=v,c.moveContactsQueueCampaignHopperFinal=function(e){l.cmHopperFinal.moveContactsQueueCampaignHopperFinal({id:c.query.id,state:e}).$promise.then(function(e){_.isNil(e)&&_.isNil(e[0])?r.info({title:"Restored Contacts",msg:"0"}):r.info({title:"Restored Contacts",msg:JSON.stringify(e[0].affectedRows)})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},c.countContactsQueueCampaignHopperFinal=function(e){l.cmHopperFinal.countContactsQueueCampaignHopperFinal({id:e}).$promise.then(function(e){_.merge(c.contacts,e[0])}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},c.moveConfirm=function(e,t){var n=o.confirm().title("Are you sure want to restore the contact?").htmlContent("<b>Contact</b> will be restored.").ariaLabel("Restore Contact").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){v(e)},function(){console.log("CANCEL")})},c.moveSelectedQueueCampaignHopperFinals=function(e){var t=o.confirm().title("Are you sure want to restore the selected contacts?").htmlContent("<b> Contacts selected</b> will be restored.").ariaLabel("Restore Contacts").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedQueueCampaignHopperFinals.forEach(function(e){v(e)}),c.selectedQueueCampaignHopperFinals=[]})};var m=!0,u=1;function p(e){c.queueCampaignHopperFinals=e||{count:0,rows:[]}}function g(e){l.hopperFinal.delete({id:e.id}).$promise.then(function(){_.remove(c.queueCampaignHopperFinals.rows,{id:e.id}),c.queueCampaignHopperFinals.count-=1,c.queueCampaignHopperFinals.rows.length||c.getQueueCampaignHopperFinals(),r.success({title:"HopperFinal deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETvoiceQueue"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}function v(a){l.cmHopperFinal.checkContactHopper(a).$promise.then(function(e){r.info({title:"The contact is in the hopper",msg:"Contact ID "+e.ContactId})}).catch(function(e){var t,n;"Not Found"===e.data?l.cmHopper.save((t=a,n={},n.phone=t.calleridnum,n.scheduledat=moment().format("YYYY-MM-DD HH:mm:ss"),n.countbusyretry=0,n.countcongestionretry=0,n.countnoanswerretry=0,n.countglobal=0,n.ContactId=t.ContactId,n.ListId=t.ListId,n.UserId=t.deleted?null:t.UserId,n.VoiceQueueId=t.VoiceQueueId,n.CampaignId=t.CampaignId,n.priority=t.recallme?3:2,n.recallme=!!t.recallme,n)).$promise.then(function(e){var t,n;r.info({title:"Restored Contact",msg:"Contact ID "+e.ContactId}),e.ContactId&&l.cmHopperHistory.save(((n={}).calleridnum=(t=a).calleridnum,n.calleridname=t.calleridname,n.scheduledat=moment().format("YYYY-MM-DD HH:mm:ss"),n.countbusyretry=t.countbusyretry,n.countcongestionretry=t.countcongestionretry,n.countnoanswerretry=t.countnoanswerretry,n.countglobal=t.countglobal,n.ContactId=t.ContactId,n.ListId=t.ListId,n.UserId=d.getCurrentUser().id,n.VoiceQueueId=t.VoiceQueueId,n.CampaignId=t.CampaignId,n.editedat=moment().format("YYYY-MM-DD HH:mm:ss"),n.edited=!0,n.state=25,n.statedesc="Restored",n.campaign=t.campaign,n.campaigntype=t.VoiceQueueId?"queue":"ivr",n))}).catch(function(e){_.isNil(e.data)||"Validation error"!==e.data.message?r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()}):r.info({title:"The contact is in the hopper",msg:"Contact ID "+a.ContactId})}):r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getQueueCampaignHopperFinals())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.motiondialer").controller("QueueCampaignHopperFinalsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.queueCampaign={},c.queueCampaignHopperHistories={count:0,rows:[]},c.selectedQueueCampaignHopperHistories=[],c.query={fields:"createdAt,updatedAt,uniqueid,ContactId,calleridnum,calleridname,statedesc,scheduledat,starttime,responsetime,endtime",sort:"-id",limit:10,page:1},c.init=function(e){c.queueCampaign=e,c.query.id=c.queueCampaign.id,c.query.VoiceQueueId=c.queueCampaign.id,c.getQueueCampaignHopperHistories()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the hopperHistory?").htmlContent("<b>"+(e.name||"hopperHistory")+"</b> will be deleted.").ariaLabel("delete hopperHistory").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getQueueCampaignHopperHistories=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.voiceQueue.getHopperHistories(c.query,p).$promise},c.createOrEditQueueCampaignHopperHistory=function(e,t){o.show({controller:"CreateOrEditHopperHistoryDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/hopperHistories/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{queueCampaign:c.queueCampaign,hopperHistory:t,hopperHistories:c.queueCampaignHopperHistories.rows,license:null,setting:null}})},c.exportSelectedQueueCampaignHopperHistories=function(){var e=angular.copy(c.selectedQueueCampaignHopperHistories);return c.selectedQueueCampaignHopperHistories=[],e},c.deleteQueueCampaignHopperHistory=g,c.deleteSelectedQueueCampaignHopperHistories=function(e){var t=o.confirm().title("Are you sure want to delete the selected hopperHistories?").htmlContent("<b>"+c.selectedQueueCampaignHopperHistories.length+" selected</b> will be deleted.").ariaLabel("delete hopperHistories").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedQueueCampaignHopperHistories.forEach(function(e){g(e)}),c.selectedQueueCampaignHopperHistories=[]})};var m=!0,u=1;function p(e){c.queueCampaignHopperHistories=e||{count:0,rows:[]}}function g(e){l.hopperHistory.delete({id:e.id}).$promise.then(function(){_.remove(c.queueCampaignHopperHistories.rows,{id:e.id}),c.queueCampaignHopperHistories.count-=1,c.queueCampaignHopperHistories.rows.length||c.getQueueCampaignHopperHistories(),r.success({title:"HopperHistory deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETvoiceQueue"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getQueueCampaignHopperHistories())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.motiondialer").controller("QueueCampaignHopperHistoriesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.queueCampaign={},c.queueCampaignHoppers={count:0,rows:[]},c.selectedQueueCampaignHoppers=[],c.query={fields:"createdAt,updatedAt,id,ContactId,phone,countcongestionretry,countbusyretry,countnoanswerretry,scheduledat,priority,recallme,UserId",sort:"-updatedAt",limit:10,page:1},c.arraypriority=_.keyBy([{option:"Highest",value:"'4'"},{option:"High",value:"'3'"},{option:"Medium",value:"'2'"},{option:"Low",value:"'1'"},{option:"Lowest",value:"'0'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.init=function(e){c.queueCampaign=e,c.query.id=c.queueCampaign.id,c.query.VoiceQueueId=c.queueCampaign.id,c.getQueueCampaignHoppers()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the hopper?").htmlContent("<b>"+(e.name||"hopper")+"</b> will be deleted.").ariaLabel("delete hopper").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getQueueCampaignHoppers=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.voiceQueue.getHoppers(c.query,p).$promise},c.createOrEditQueueCampaignHopper=function(e,t){o.show({controller:"CreateOrEditHopperVoiceQueueIdDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/hoppers/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{queueCampaign:c.queueCampaign,hopper:t,hoppers:c.queueCampaignHoppers.rows,license:null,setting:null}})},c.exportSelectedQueueCampaignHoppers=function(){var e=angular.copy(c.selectedQueueCampaignHoppers);return c.selectedQueueCampaignHoppers=[],e},c.deleteQueueCampaignHopper=g,c.deleteSelectedQueueCampaignHoppers=function(e){var t=o.confirm().title("Are you sure want to delete the selected hoppers?").htmlContent("<b>"+c.selectedQueueCampaignHoppers.length+" selected</b> will be deleted.").ariaLabel("delete hoppers").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedQueueCampaignHoppers.forEach(function(e){g(e)}),c.selectedQueueCampaignHoppers=[]})},l.user.get({fields:"id,name",role:"agent",sort:"name",nolimit:"true"}).$promise.then(function(e){c.agents=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETagents",msg:e.data?JSON.stringify(e.data):e.toString()})});var m=!0,u=1;function p(e){c.queueCampaignHoppers=e||{count:0,rows:[]}}function g(e){l.cmHopper.delete({id:e.id}).$promise.then(function(){_.remove(c.queueCampaignHoppers.rows,{id:e.id}),c.queueCampaignHoppers.count-=1,c.queueCampaignHoppers.rows.length||c.getQueueCampaignHoppers(),r.success({title:"Hopper deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETvoiceQueue"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getQueueCampaignHoppers())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.motiondialer").controller("QueueCampaignHoppersController",e)}(),function(){"use strict";function e(e,t,n,a,s,i,o,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="MOTIONDIALER.EDIT_HOPPER",m.hopper=angular.copy(o),m.hoppers=i,m.newHopper=!1,m.hopper||(m.hopper={},m.title="MOTIONDIALER.NEW_HOPPER",m.newHopper=!0),t.params.id&&(m.hopper.VoiceQueueId=t.params.id),m.addNewHopper=function(){m.errors=[],r.cmHopper.save(m.hopper).$promise.then(function(e){m.hoppers.unshift(e.toJSON()),s.success({title:"Hopper properly created",msg:m.hopper.name?m.hopper.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmHopper.save"}];for(var t=0;t<e.data.errors.length;t+=1)s.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else s.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmHopper.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveHopper=function(){var n,a,i,o;m.errors=[],m.hopper.UserId=m.hopper.recallme?m.hopper.UserId:null,r.cmHopper.get({id:m.hopper.id,attributes:["scheduledat"]}).$promise.then(function(e){n=_.isNil(e)||_.isEmpty(e)?moment().format("YYYY-MM-DD HH:mm:ss"):e.scheduledat}).finally(function(){r.cmHopper.update({id:m.hopper.id},_.omit(m.hopper,["VoiceQueueId","CampaignId","ContactId","ListId"])).$promise.then(function(e){a=e,r.cmContact.get({id:a.ContactId,attributes:["firstName","lastName"]}).$promise.then(function(e){_.isNil(e)||_.isNil(e.firstName)||(i=e.firstName,_.isNil(e.lastName)||(i+=" "+e.lastName))}).catch(function(){i=void 0}).finally(function(){r.voiceQueue.get({raw:!1,id:a.VoiceQueueId,attributes:["name"]}).$promise.then(function(e){o=e.name}).catch(function(e){o=void 0}).finally(function(){r.cmHopperHistory.save({state:24,statedesc:"Edited",scheduledat:n,calleridnum:a.phone,calleridname:i,campaigntype:a.VoiceQueueId?"queue":"ivr",campaign:o,editedat:moment().format("YYYY-MM-DD HH:mm:ss"),edited:!0,ListId:a.ListId,UserId:l.getCurrentUser().id,VoiceQueueId:a.VoiceQueueId,CampaignId:a.CampaignId,ContactId:a.ContactId,callback:a.callback,callbackuniqueid:a.callbackuniqueid,countbusyretry:a.countbusyretry,countcongestionretry:a.countcongestionretry,countglobal:a.countglobal,countnoanswerretry:a.countnoanswerretry,followuptime:a.followuptime,recallme:a.recallme})})});var t=_.find(m.hoppers,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),s.success({title:"Hopper properly saved!",msg:m.hopper.name?m.hopper.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmHopper.update"}];for(var t=0;t<e.data.errors.length;t++)s.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else s.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmHopper.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})})},m.deleteHopper=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The hopper will be deleted.").ariaLabel("Delete Hopper").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.cmHopper.delete({id:m.hopper.id}).$promise.then(function(){_.remove(m.hoppers,{id:m.hopper.id}),s.success({title:"Hopper properly deleted!",msg:(m.hopper.name||"hopper")+" has been deleted!"}),u(m.hopper)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cmHopper.delete"}];for(var t=0;t<e.data.errors.length;t++)s.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else s.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cmHopper.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.user.get({fields:"id,name",role:"agent",sort:"name",nolimit:"true"}).$promise.then(function(e){m.agents=e.rows||[]}).catch(function(e){s.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETagents",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","hoppers","hopper","api","Auth","license","setting"],angular.module("app.motiondialer").controller("CreateOrEditHopperVoiceQueueIdDialogController",e)}(),function(){"use strict";function e(n,a){var i=this;i.queueCampaign={},i.init=function(t){i.queueCampaign=t,n.cmHopper.get({limit:0,VoiceQueueId:t.id}).$promise.then(function(e){return i.total=e.count||0,n.cmHopper.get({limit:0,VoiceQueueId:t.id,active:!1,countbusyretry:0,countcongestionretry:0,countnoanswerretry:0}).$promise}).then(function(e){return i.fresh=e.count||0,n.cmHopperFinal.get({limit:0,VoiceQueueId:t.id}).$promise}).then(function(e){i.closed=e.count||0}).catch(function(e){a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTAGS",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["api","toasty"],angular.module("app.motiondialer").controller("QueueCampaignHopperStatisticsController",e)}(),function(){"use strict";function e(e,n,a,t,i,o){var s=this;s.queueCampaign=t,s.items=[],s.selectedItems=[],s.loading=!1,s.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!1,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("MOTIONDIALER.ALL_LISTS"),labelSelected:i.instant("MOTIONDIALER.SELECTED_LISTS"),transferCallback:function(e,t){s.loading=!0,a.voiceQueue[t?"removeLists":"addLists"]({id:s.queueCampaign.id,ids:_.map(e,"id")}).$promise.then(function(){n.success({title:"List properly "+(t?"removed":"added"),msg:"List has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:queueCampaign.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})}).finally(function(){s.loading=!1})}},s.closeDialog=function(){e.hide()},a.voiceQueue.getLists({id:s.queueCampaign.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return s.selectedItems=e.rows?e.rows:[],s.dualMultiselectOptions.selectedItems=s.selectedItems,a.cmList.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){s.items=e.rows?e.rows:[],s.dualMultiselectOptions.items=_.differenceBy(s.items,s.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","queueCampaign","$translate","$timeout"],angular.module("app.motiondialer").controller("QueueCampaignlistaddController",e)}(),function(){"use strict";function e(e,t,a,i,o,n,s,r){var l=this;function d(){t.hide()}function c(e,t){var n=t.id;s.enqueue(function(){return i.voiceQueue.removeLists({id:e,ids:n}).$promise.then(function(){return i.voiceQueue.addLists({id:e,ids:n,dialCheckDuplicateType:"never"}).$promise}).then(function(){a.success({title:"Reset Succesfull",msg:"List "+t.name+" has been reset"})}).catch(function(e){a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:queueCampaign.RESETLIST",msg:e.status?JSON.stringify(e.data):e.toString()})})})}l.selected=[],l.items=n||[],l.loading=!1,l.closeDialog=d,l.exists=function(e,t){return-1<t.indexOf(e)},l.toggle=function(e,t){var n=t.indexOf(e);-1<n?t.splice(n,1):t.push(e)},l.isIndeterminate=function(){return 0!==l.selected.length&&l.selected.length!==l.items.length},l.isChecked=function(){return l.selected.length===l.items.length},l.toggleAll=function(){l.selected.length===l.items.length?l.selected=[]:(0===l.selected.length||0<l.selected.length)&&(l.selected=l.items.slice(0))},l.listSelected=function(){l.loading=!0,r(function(e,t){for(var n=0;n<l.selected.length;n+=1)c(o.id,l.selected[n]);var a;a=e,s.enqueue(function(){return a()})}).finally(function(){l.loading=!1,d()})}}e.$inject=["$scope","$mdDialog","toasty","api","queueCampaign","listsCampaign","Sequence","$q"],angular.module("app.motiondialer").controller("QueueCampaignresetlistController",e)}(),function(){"use strict";function e(e,n,a,t,i){var o=this;o.queueCampaign=t,o.penalty=0,o.items=[],o.selectedItems=[],o.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("MOTIONDIALER.ALL_TEAMS"),labelSelected:i.instant("MOTIONDIALER.SELECTED_TEAMS"),transferCallback:function(e,t){a.voiceQueue[t?"removeTeams":"addTeams"]({id:o.queueCampaign.id,ids:_.map(e,"id"),penalty:o.penalty||0}).$promise.then(function(){n.success({title:"Team properly "+(t?"removed":"added"),msg:"Team has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:queueCampaign.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},o.closeDialog=function(){e.hide()},a.voiceQueue.getTeams({id:o.queueCampaign.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return o.selectedItems=e.rows?e.rows:[],o.dualMultiselectOptions.selectedItems=o.selectedItems,a.team.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){o.items=e.rows?e.rows:[],o.dualMultiselectOptions.items=_.differenceBy(o.items,o.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","queueCampaign","$translate"],angular.module("app.motiondialer").controller("QueueCampaignteamaddController",e)}(),function(){"use strict";function e(n,e,i,o,t,a,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=t,c.setting=a,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=e.protocol()+"://"+e.host(),c.queueCampaign=d||n.params.queueCampaign||{},c.selectedTab=n.params.tab||0,c.listadddialog=function(e,t){i.show({controller:"QueueCampaignlistaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/listadd/listadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{queueCampaign:e,queueCampaigns:c.queueCampaigns?c.queueCampaigns.rows:[]}})},c.blacklistadddialog=function(e,t){i.show({controller:"QueueCampaignblacklistaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/blacklistadd/blacklistadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{queueCampaign:e,queueCampaigns:c.queueCampaigns?c.queueCampaigns.rows:[]}})},c.teamadddialog=function(e,t){i.show({controller:"QueueCampaignteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/teamadd/teamadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{queueCampaign:e,queueCampaigns:c.queueCampaigns?c.queueCampaigns.rows:[]}})},c.agentadddialog=function(e,t){i.show({controller:"QueueCampaignagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/agentadd/agentadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{queueCampaign:e,queueCampaigns:c.queueCampaigns?c.queueCampaigns.rows:[],realtime:!1}})},c.resetlistdialog=function(t,n){s.voiceQueue.getLists({id:t.id,fields:"id,name",nolimit:!0}).$promise.then(function(a){if(_.isNil(a.rows)||_.isEmpty(a.rows))r.info({title:"Campaign Without Lists"});else if(1===a.rows.length){var e=i.confirm().title("Are you sure want to reset the list "+a.rows[0].name+" ?").htmlContent("<b>"+a.rows[0].name+"</b> will be reset.").ariaLabel("Reset List").targetEvent(n).ok("OK").cancel("CANCEL");i.show(e).then(function(){var e,t,n;e=c.queueCampaign.id,t=a.rows[0],n=t.id,s.voiceQueue.removeLists({id:e,ids:n}).$promise.then(function(){return s.voiceQueue.addLists({id:e,ids:n,dialCheckDuplicateType:"never"}).$promise}).then(function(){r.success({title:"Reset Succesfull",msg:"List "+t.name+" has been reset"})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:queueCampaign.REMOVELIST",msg:e.status?JSON.stringify(e.data):e.toString()})})})}else i.show({controller:"QueueCampaignresetlistController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/resetlist/resetlist.html",parent:angular.element(o.body),targetEvent:n,clickOutsideToClose:!1,locals:{queueCampaign:t,listsCampaign:a?a.rows:[]}})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:RESETLIST",msg:e.status?JSON.stringify(e.data):e.toString()})})},c.gotogoto=function(e,t){n.go("app.motiondialer.realtime.queues",{})},c.alert=r.info,c.gotoQueueCampaigns=function(){n.go("app.motiondialer.queueCampaigns")},c.saveQueueCampaign=function(){s.voiceQueue.update({id:c.queueCampaign.id},c.queueCampaign).$promise.then(function(){r.success({title:"QueueCampaign updated!",msg:c.queueCampaign.name?c.queueCampaign.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.voiceMusicOnHold.get({fields:"name",nolimit:"true"}).$promise.then(function(e){c.musiconholds=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmusiconholds",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.trunk.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.trunks=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.squareProject.get({fields:"name",sort:"name"}).$promise.then(function(e){c.projects=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETprojects",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.interval.get({fields:"id,name",sort:"name",IntervalId:"null"}).$promise.then(function(e){c.interval=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","queueCampaign"],angular.module("app.motiondialer").controller("QueueCampaignController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.queueCampaigns=r||{count:0,rows:[]},v.table="queueCampaigns",v.listOrder="",v.listOrderAsc=null,v.selectedQueueCampaigns=[],v.query={fields:"createdAt,updatedAt,id,name,dialActive,TrunkId,TrunkBackupId,type,IntervalId,dialCheckDuplicateType,acw,acwTimeout,autopause,ringinuse,memberdelay,timeoutrestart,monitor_format,context,setinterfacevar,setqueuevar,setqueueentryvar,dialOrderByScheduledAt,dialRecallMeTimeout,dialRecallInQueue,dialGlobalInterval,dialTimezone,dialAMDActive,dialAMDInitialSilence,dialAMDGreeting,dialAMDAfterGreetingSilence,dialAMDTotalAnalysisTime,dialAMDMinWordLength,dialAMDBetweenWordsSilence,dialAMDMaximumNumberOfWords,dialAMDSilenceThreshold,dialAMDMaximumWordLength,dialMethod,dialPowerLevel,dialPredictiveOptimization,dialPredictiveOptimizationPercentage,dialPredictiveInterval,dialLimitQueue,dialOriginateCallerIdName,dialOriginateCallerIdNumber,dialOriginateTimeout,dialPrefix,dialQueueOptions,dialQueueTimeout,strategy,timeout,retry,wrapuptime,weight,musiconhold,dialQueueProject,dialQueueProject2,dialQueueProject,dialQueueProject2,dialAgiAfterHangupAgent,dialGlobalMaxRetry,dialCongestionMaxRetry,dialCongestionRetryFrequency,dialBusyMaxRetry,dialBusyRetryFrequency,dialNoAnswerMaxRetry,dialNoAnswerRetryFrequency,description",type:"outbound",sort:"-updatedAt",channel:"voice",limit:10,page:1},v.arraydialCheckDuplicateType=_.keyBy([{option:"ALWAYS",value:"'always'"},{option:"NEVER",value:"'never'"},{option:"ONLY_IF_OPEN",value:"'onlyIfOpen'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayautopause=_.keyBy([{option:"Yes",value:"'all'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayringinuse=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraytimeoutrestart=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraymonitor_format=_.keyBy([{option:"Inactive",value:"''"},{option:"wav",value:"'wav'"},{option:"wav49",value:"'wav49'"},{option:"gsm",value:"'gsm'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraysetinterfacevar=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraysetqueuevar=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraysetqueueentryvar=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraydialOrderByScheduledAt=_.keyBy([{option:"DESC",value:"'DESC'"},{option:"ASC",value:"'ASC'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraydialMethod=_.keyBy([{option:"Progressive",value:"'progressive'"},{option:"PowerDialing",value:"'power'"},{option:"Predictive",value:"'predictive'"},{option:"Preview",value:"'preview'"},{option:"BookedProgressive",value:"'booked'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraydialPredictiveOptimization=_.keyBy([{option:"AgentBusyFactor",value:"'agentBusyFactor'"},{option:"DropRate",value:"'dropRate'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraystrategy=_.keyBy([{option:"Round Robin Memory",value:"'rrmemory'"},{option:"Round Robin",value:"'roundrobin'",ngIf:"vm.queueCampaign.dialMethod === 'booked'"},{option:"Least Recent",value:"'leastrecent'",ngIf:"vm.queueCampaign.dialMethod !== 'booked'"},{option:"Fewest Calls",value:"'fewestcalls'",ngIf:"vm.queueCampaign.dialMethod !== 'booked'"},{option:"Random",value:"'random'",ngIf:"vm.queueCampaign.dialMethod !== 'booked'"},{option:"Linear",value:"'linear'",ngIf:"vm.queueCampaign.dialMethod !== 'booked'"},{option:"Weight Random",value:"'wrandom'",ngIf:"vm.queueCampaign.dialMethod !== 'booked'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.motiondialer.queueCampaigns.edit",{id:e.id,queueCampaign:e})},v.listadddialog=function(e,t){i.show({controller:"QueueCampaignlistaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/listadd/listadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{queueCampaign:e,queueCampaigns:v.queueCampaigns?v.queueCampaigns.rows:[]}})},v.blacklistadddialog=function(e,t){i.show({controller:"QueueCampaignblacklistaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/blacklistadd/blacklistadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{queueCampaign:e,queueCampaigns:v.queueCampaigns?v.queueCampaigns.rows:[]}})},v.teamadddialog=function(e,t){i.show({controller:"QueueCampaignteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/teamadd/teamadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{queueCampaign:e,queueCampaigns:v.queueCampaigns?v.queueCampaigns.rows:[]}})},v.agentadddialog=function(e,t){i.show({controller:"QueueCampaignagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/agentadd/agentadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{queueCampaign:e,queueCampaigns:v.queueCampaigns?v.queueCampaigns.rows:[],realtime:!1}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the queueCampaign?").htmlContent("<b>"+(e.name||"queueCampaign")+"</b> will be deleted.").ariaLabel("delete queueCampaign").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.gotorealtimegoto=function(e,t){n.go("app.motiondialer.realtime.queues",{})},v.success=f,v.getQueueCampaigns=function(){v.query.offset=(v.query.page-1)*v.query.limit,m.hasRole("admin")?v.promise=l.voiceQueue.get(v.query,f).$promise:(v.query.id=v.currentUser.id,v.promise=l.user.getQueues(v.query,f).$promise)},v.createOrEditQueueCampaign=function(e,t){i.show({controller:"CreateOrEditQueueCampaignDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{queueCampaign:t,queueCampaigns:v.queueCampaigns.rows,license:v.license,setting:v.setting}})},v.deleteQueueCampaign=A,v.exportSelectedQueueCampaigns=function(){var e=angular.copy(v.selectedQueueCampaigns);return v.selectedQueueCampaigns=[],e},v.deleteSelectedQueueCampaigns=function(e){var t=i.confirm().title("Are you sure want to delete the selected queueCampaigns?").htmlContent("<b>"+v.selectedQueueCampaigns.length+" selected</b> will be deleted.").ariaLabel("delete QueueCampaigns").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedQueueCampaigns.forEach(function(e){A(e)}),v.selectedQueueCampaigns=[]})},v.deselectQueueCampaigns=function(){v.selectedQueueCampaigns=[]},v.selectAllQueueCampaigns=function(){v.selectedQueueCampaigns=v.queueCampaigns.rows},l.trunk.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.trunks=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.interval.get({fields:"id,name",sort:"name",IntervalId:"null"}).$promise.then(function(e){v.interval=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.queueCampaigns=e||{count:0,rows:[]}}function A(e){l.voiceQueue.delete({id:e.id}).$promise.then(function(){_.remove(v.queueCampaigns.rows,{id:e.id}),v.queueCampaigns.count-=1,v.queueCampaigns.rows.length||v.getQueueCampaigns(),c.success({title:"QueueCampaign deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvoiceQueue"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getQueueCampaigns())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","queueCampaigns","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.motiondialer").controller("QueueCampaignsController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d,c,m){var u=this,p=!0;function g(){var e=i.localStorage.getItem("motion2.realtime.abandoned.bull.contacts:"+u.currentUser.id);e&&(e=JSON.parse(e))&&e.query&&(u.query=_.merge(e.query,_.omit(u.query,["sort","limit","page"])),u.query=_.omit(u.query,"filter")),s.voiceDisposition.get().$promise.then(function(e){u.disposition=e?e.rows:[]}).catch(function(e){console.log(e)}),s.user.getQueues({id:r.getCurrentUser().id,fields:"id,name",channel:"voice",type:"outbound",nolimit:!0}).$promise.then(function(e){u.queues=e||{count:0,rows:[]},u.queuesMap=_.mapValues(_.keyBy(u.queues.rows,"name"),"name")}).catch(function(e){console.error(e)}).finally(function(){u.getContacts()})}function v(e){u.contacts=e||{count:0,rows:[]},p=!1,u.refresh=!0}u.showTooltip=!1,u.refresh=!0,u.disable=[],u.agents=m||[],u.currentUser=r.getCurrentUser(),u.localizationMap=c,u.pickerModel={dateStart:null,dateEnd:null},u.queues={},u.contacts={count:0,rows:[]},u.query={fields:"id,type,calleridnum,calleridname,queue,queuecallerabandonAt,queuecallerexitAt,queuecallerexitreason,assigned,lastAssignedTo,updatedAt,disposition",type:"outbound",queuecallerexitreason:"TIMEOUT,ABANDONED",sort:"-updatedAt",limit:10,page:1},u.clearAll=function(){u.query.dateStart=void 0,u.query.dateEnd=void 0,u.pickerModel={dateStart:null,dateEnd:null},u.getContacts()},u.getContacts=function(){u.refresh=!1,u.query.dateStart=void 0,u.query.dateEnd=void 0,u.pickerModel.dateStart&&!p&&(u.query.dateStart=u.pickerModel.dateStart,u.query.dateEnd=u.pickerModel.dateEnd);u.query.queue=u.query.queue,u.query.offset=(u.query.page-1)*u.query.limit,i.localStorage.setItem("motion2.realtime.abandoned.bull.contacts:"+u.currentUser.id,JSON.stringify({query:_.omit(u.query,"queue")})),u.promise=s.voiceQueueReport.getVoiceQueuesReport(u.query,v).$promise},u.refreshContacts=function(){u.showTooltip=!1,u.getContacts()},u.onInit=g,u.assignedA=function(e,t){e&&(u.disable[e.id]=!0,s.voiceQueueReport.update({id:e.id,lastAssignedTo:t?t.name:null,assigned:!!t}).$promise.catch(function(e){console.log(e)}).finally(function(){u.disable[e.id]=!1}))},u.disposed=function(e,t){e&&s.voiceQueueReport.update({id:e.id,disposition:t||null}).$promise.catch(function(e){console.log(e)})},u.onSavevoiceQueueReport=function(e){e&&u.queuesMap&&"outbound"===e.type&&u.queuesMap[e.queue]&&(u.showTooltip=!0)},u.onUpdatevoiceQueueReport=function(e){if(e){var t=_.findIndex(u.contacts.rows,["id",e.id]);0<=t&&_.merge(u.contacts.rows[t],e)}},l.onWithoutApply("voiceQueueReport:save",u.onSavevoiceQueueReport),l.on("voiceQueueReport:update",u.onUpdatevoiceQueueReport),g();var h=!0,b=1;e.$watch("vm.query.filter",function(e,t){h?n(function(){h=!1}):(t||(b=u.query.page),e!==t&&(u.query.page=1),e||(u.query.page=b),u.getContacts())}),e.$on("$destroy",function(){l.removeAllListeners("voiceQueueReport:save"),l.removeAllListeners("voiceQueueReport:update")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty","dateFilterLocalizationFactory","agents"],angular.module("app.motiondialer").controller("AbandonedCallsMotionDialerRealtimeController",e)}(),function(){"use strict";function e(e,s,t,n,a,i,o,r,l,d,c,m,u,p,g,v){var h=this,b=["userpic","online","lastLoginAt","lastPauseAt","pauseType","lastPauseAt","internal","address","chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","chatCapacity","openchannelCapacity","mailCapacity","smsCapacity","faxCapacity","chatCurrentCapacity","openchannelCurrentCapacity","mailCurrentCapacity","smsCurrentCapacity","faxCurrentCapacity","chatStatus","openchannelStatus","mailStatus","smsStatus","faxStatus","voiceStatus","chatStatusTime","openchannelStatusTime","mailStatusTime","smsStatusTime","faxStatusTime","voiceStatusTime","queue","destconnectedlinenum"],f=["chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","online"];for(var A in h.availableStates=["ringing","inuse","busy","onhold","not_inuse"],h.pauses=o||{count:0,rows:[]},h.license=g,h.agents=r?_.keyBy(r.rows?r.rows:[],"id"):{},h.rpcAgents=l?_.keyBy(l.rows?l.rows:[],"id"):{},h.paginatedAgents={},h.load=!1,h.order=[],h.agentInternal={},h.agents)h.agents.hasOwnProperty(A)&&(h.agents[A].init=!0);h.query={limit:10,page:1,order:"fullname",globalStatusFilter:"",pauseTypeFilter:""},h.logout=function(e,t){return d.user.logout({id:e.id}).$promise.then(function(){m.success({title:"Agent logout",msg:e.fullname+"  properly logout"}),h.agents[e.id]&&(h.agents[e.id].online=!1),h.rpcAgents[e.id]&&(h.rpcAgents[e.id].online=!1),y()}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.queueAdd=function(e,t){n.show({controller:"AgentqueueaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/queueadd/queueadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{agent:e,agents:[],channel:"voice",realtime:!0,direction:"outbound"}})},h.pause=function(t,e){return d.user.pause({id:t.id,type:e}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.unPause=function(t){return d.user.unpause({id:t.id}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.showInfo=function(e){n.show(n.alert().clickOutsideToClose(!0).title("Legend").htmlContent("<div>TODO legend status + state</div>").ok("Ok").targetEvent(e))},h.getAgentStatus=C,h.getAgentGlobalStatus=x,h.isPause=S,h.checkPause=function(e){return"pause"===e},h.isPartialPause=function(e){return"*pause"===e},h.onSave=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(_.omit(e,f),b)),_.merge(h.rpcAgents[e.id],_.pick(_.omit(e,f),b)),x(h.agents[e.id]))},h.onUpdate=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(e,b)),_.merge(h.rpcAgents[e.id],_.pick(e,b)),x(h.agents[e.id]))},h.onInit=y,h.onConnect=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(_.merge(h.agents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])),_.merge(h.rpcAgents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])))},h.onComplete=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(h.agents[h.agentInternal[e.destaccountcode]]=_.omit(h.agents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]),h.rpcAgents[h.agentInternal[e.destaccountcode]]=_.omit(h.rpcAgents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]))},c.on("user:save",h.onSave),c.on("user:update",h.onUpdate),c.on("user:agentconnect",h.onConnect),c.on("user:agentcomplete",h.onComplete),y();var E=v(function(){h.load&&(h.load=!1,y())},999);function y(e){h.load=!1;var t,n,a=s.defer();h.promise=a.promise,h.filteredAgents=[],h.order=[],_.forIn(h.agents,function(e,t){h.rpcAgents[t]&&_.merge(e,_.pick(_.omit(h.rpcAgents[t],f),b)),x(e),e.online?(h.filteredAgents.push(e),h.agentInternal[e.internal]=t):e.globalStatusTime=_.toNumber(moment().format("x"))}),h.query.globalStatusFilter&&_.remove(h.filteredAgents,function(e){return e.globalStatus!==h.query.globalStatusFilter}),h.query.pauseTypeFilter&&_.remove(h.filteredAgents,function(e){return e.pauseType!==h.query.pauseTypeFilter}),h.query.filter&&_.remove(h.filteredAgents,function(e){return e.fullname.toLowerCase().indexOf(h.query.filter.toLowerCase())<0}),h.filteredAgents=(t=h.filteredAgents,n=_.startsWith(h.query.order,"-")?"desc":"asc",_.orderBy(t,[h.query.order.replace("-","")],[n]));var i=(h.query.page-1)*h.query.limit;h.paginatedAgents=_.drop(h.filteredAgents,i).slice(0,h.query.limit);for(var o=0;o<h.paginatedAgents.length;o+=1)h.order.push(h.paginatedAgents[o].id);a.resolve(),h.load=!0}function S(e){return"pause"===e||"*pause"===e}function T(e){return"idle"===e||"unknown"===e||"unavailable"===e||"ringing"===e||_.isNil(e)}function C(e,t){return"voice"===t?"idle"!==e[t+"Status"]?e[t+"Status"]:e[t+"Pause"]?e[t+"Status"]="pause":"idle":e[t+"Pause"]?e[t+"Status"]="pause":e[t+"Status"]}function x(e){var t="unknown";t=_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"pause":_.some([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"*pause":_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],T)?"idle":"busy",e.globalStatus!==t&&(e.globalStatus=t,e.init?(e.init=!1,e.globalStatusTime=S(t)?_.toNumber(moment(e.lastPauseAt).format("x")):_.max([e.voiceStatusTime,e.chatStatusTime,e.mailStatusTime,e.smsStatusTime,e.openchannelStatusTime,e.faxStatusTime])):e.globalStatusTime=_.toNumber(moment().format("x")))}e.$on("$destroy",function(){c.removeAllListeners("user:save"),c.removeAllListeners("user:update"),c.removeAllListeners("user:agentconnect"),c.removeAllListeners("user:agentcomplete"),E&&(v.cancel(E),E=null)})}e.$inject=["$scope","$q","$timeout","$mdDialog","$document","$filter","pauses","agents","rpcAgents","api","socket","toasty","helperClasses","Auth","license","$interval"],angular.module("app.voice").controller("AgentsMotionDialerRealtimeController",e)}(),function(){"use strict";function e(e,n,a,i,t,o,s,r,l,d){var c=this,m=["name","active","limitCalls","message","originated","IntervalId","SquareProjectId","Trunk","TrunkId","ivrAnswerCallsDay","dialQueueProject","ivrTotalCallsDays","description"];function u(){_.forIn(c.campaigns,function(e,t){c.rpcCampaigns[t]&&_.merge(e,_.pick(c.rpcCampaigns[t],m))})}c.count=s.count,c.campaigns=s?_.keyBy(s.rows?s.rows:[],"id"):{},c.rpcCampaigns=o?_.keyBy(o.rows?o.rows:[],"id"):{},c.query={sort:"-updatedAt",limit:10,page:1},c.success=v,c.getCampaigns=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=r.campaign.get(c.query,v).$promise},c.onSave=function(e){c.campaigns[e.id]&&(_.merge(c.campaigns[e.id],_.pick(e,m)),_.merge(c.rpcCampaigns[e.id],_.pick(e,m)))},c.$onInit=u,c.createOrEditIvrCampaign=function(e,t){a.show({controller:"CreateOrEditIvrCampaignDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/ivrCampaigns/create/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{ivrCampaign:t,ivrCampaigns:_.values(c.campaigns),license:null,setting:null}})},l.onWithoutApply("campaign:save",c.onSave),c.interval=t(function(){},999);var p=!0,g=1;function v(e){c.count=e.count,c.campaigns=e?_.keyBy(e.rows?e.rows:[],"id"):{},u()}e.$watch("vm.query.filter",function(e,t){p?n(function(){p=!1}):(t||(g=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=g),c.getCampaigns())}),e.$on("$destroy",function(){l.removeAllListeners("campaign:save"),c.interval&&t.cancel(c.interval)})}e.$inject=["$scope","$timeout","$mdDialog","$document","$interval","rpcCampaigns","campaigns","api","socket","Auth"],angular.module("app.motiondialer").controller("IvrCampaignsMotionDialerRealtimeController",e)}(),function(){"use strict";function e(e,t,a,n,i,o,s,r,l){var d=this;d.agents=n||{count:0,rows:[]},d.rpcVoiceQueuesChannels=i?_.keyBy(i.rows?_.filter(i.rows,{type:"outbound"}):[],"uniqueid"):{},d.queryChannels={limit:10,page:1},d.getSize=function(e){return _.size(e)},d.onSave=function(e){"outbound"===e.type&&(d.rpcVoiceQueuesChannels[e.uniqueid]=e)},d.onRemove=function(e){d.rpcVoiceQueuesChannels[e.uniqueid]&&delete d.rpcVoiceQueuesChannels[e.uniqueid]},d.hangup=function(t){return o.rpc.getVoiceQueuesChannelHangup({uniqueid:t}).$promise.then(function(e){l.success({title:"Channel "+t+" properly hangup!",msg:e.message||""})}).catch(function(e){l.error({title:e.status+" - "+e.statusText,msg:JSON.stringify(e.data)||e.message.join(" ")})})},d.redirectToAgent=function(t,e){return o.rpc.getVoiceQueuesChannelRedirect({uniqueid:t,exten:e}).$promise.then(function(e){l.success({title:"Channel "+t+" properly redirect!",msg:e.message||""})}).catch(function(e){l.error({title:e.status+" - "+e.statusText,msg:JSON.stringify(e.data)||e.message.join(" ")})})},d.redirectToNumber=function(e,t){var n=a.prompt().title("Which number do you want transfer the call to?").placeholder("Number").targetEvent(e).ok("Ok").cancel("Cancel");return a.show(n).then(function(e){return o.rpc.getVoiceQueuesChannelRedirect({uniqueid:t,exten:e}).$promise}).then(function(e){l.success({title:"Channel "+t+" properly redirect!",msg:e.message||""})}).catch(function(e){l.error({title:e.status+" - "+e.statusText,msg:JSON.stringify(e.data)||e.message.join(" ")})})},s.on("voice_queue_channel:save",d.onSave),s.on("voice_queue_channel:remove",d.onRemove),e.$on("$destroy",function(){s.removeAllListeners("voice_queue_channel:save"),s.removeAllListeners("voice_queue_channel:remove")})}e.$inject=["$scope","$timeout","$mdDialog","agents","rpcVoiceQueuesChannels","api","socket","helperClasses","toasty"],angular.module("app.motiondialer").controller("QueueCallsMotionDialerRealtimeController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r){var l=this,d=["total","answered","sumHoldTime","sumDuration","sumBillable","outboundNoAnswerCallsDay","outboundBusyCallsDay","outboundCongestionCallsDay","outboundNoSuchCallsDay","outboundUnknownCallsDay","outboundDropCallsDayTimeout","outboundDropCallsDayCallersExit","outboundBlacklistCallsDay","outboundOriginateFailureCallsDay","outboundAnswerAgiCallsDay","outboundReCallsDay","outboundRejectCallsDay"];function c(){_.forIn(l.queues,function(e,t){l.rpcQueues[t]&&_.merge(e,_.pick(l.rpcQueues[t],d))})}l.count=a.count,l.queues=a?_.keyBy(a.rows?a.rows:[],"id"):{},l.rpcQueues=i?_.keyBy(i.rows?i.rows:[],"id"):{},r.hasRole("admin")?l.query={type:"outbound",fields:"id,name",sort:"-updatedAt",limit:10,page:1}:l.query={id:r.getCurrentUser().id,channel:"voice",type:"outbound",fields:"id,name",sort:"-updatedAt",limit:10,page:1},l.success=p,l.getQueues=function(){l.query.offset=(l.query.page-1)*l.query.limit,r.hasRole("admin")?l.promise=o.voiceQueue.get(l.query,p).$promise:l.promise=o.user.getQueues(l.query,p).$promise},l.onSave=function(e){l.queues[e.id]&&_.merge(l.queues[e.id],_.pick(e,d))},l.$onInit=c,s.onWithoutApply("voice_queue:save",l.onSave),l.interval=t(function(){},999);var m=!0,u=1;function p(e){l.count=e.count,l.queues=e?_.keyBy(e.rows?e.rows:[],"id"):{},c()}e.$watch("vm.query.filter",function(e,t){m?n(function(){m=!1}):(t||(u=l.query.page),e!==t&&(l.query.page=1),e||(l.query.page=u),l.getQueues())}),e.$on("$destroy",function(){s.removeAllListeners("voice_queue:save"),l.interval&&t.cancel(l.interval)})}e.$inject=["$scope","$timeout","$interval","queues","rpcQueues","api","socket","Auth"],angular.module("app.motiondialer").controller("QueueParamsMotionDialerRealtimeController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r,l,d,c,m){var u=this,p=["loggedIn","available","waiting","talking","pTalking","originated","message","dialActive","dialMethod","Trunk","paused"];function g(){var n=[];return _.forIn(u.queues,function(e,t){e.paused=0,e.loggedInDb=0,u.queues[t].agents={},n.push(l.voiceQueue.getMembers({id:t}).$promise),u.rpcQueues[t]&&_.merge(e,_.pick(u.rpcQueues[t],p))}),t.all(n).then(function(e){for(var t=0;t<e.length;t+=1)for(var n=0;n<e[t].rows.length;n++)e[t].rows[n].paused&&u.queues[e[t].rows[n].VoiceQueueId].paused++,u.queues[e[t].rows[n].VoiceQueueId].loggedInDb++,u.queues[e[t].rows[n].VoiceQueueId].agents[e[t].rows[n].UserId]=e[t].rows[n].VoiceQueueId}).catch(function(e){console.error(e)})}u.count=s.count?s.count:0,u.queues=s?_.keyBy(s.rows?s.rows:[],"id"):{},u.rpcQueues=r?_.keyBy(r.rows?r.rows:[],"id"):{},m.hasRole("admin")?u.query={type:"outbound",sort:"-updatedAt",limit:10,page:1}:u.query={id:m.getCurrentUser().id,channel:"voice",type:"outbound",sort:"-updatedAt",limit:10,page:1},u.success=b,u.getQueues=function(){u.query.offset=(u.query.page-1)*u.query.limit,m.hasRole("admin")?u.promise=l.voiceQueue.get(u.query,b).$promise:u.promise=l.user.getQueues(u.query,b).$promise},u.createOrEditMotionDialerQueue=function(e,t){a.show({controller:"CreateOrEditQueueCampaignDialogController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/create/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{queueCampaign:t,queueCampaigns:_.values(u.queues),license:null,setting:null}})},u.agentAdd=function(e,t){a.show({controller:"QueueCampaignagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/motiondialer/views/queueCampaigns/edit/agentadd/agentadd.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{queueCampaign:t,queueCampaigns:u.queues?u.queues.rows:[],realtime:!0}})},u.updateQueue=function(e){return l.voiceQueue.update(e).$promise.then(function(){c.success({title:"Queue properly updated!",msg:e.name?e.name+" has been updated!":""})}).catch(function(e){c.error({title:"Error creating queue!",msg:e.message})})},u.onSave=function(e){u.queues[e.id]&&_.merge(u.queues[e.id],_.pick(e,p))},u.onSaveMember=function(e){u.queues[e.MotionDialerQueueId]&&u.queues[e.MotionDialerQueueId].loggedInDb++},u.onPause=function(n){console.log("onPause",n),n.voicePause?_.forIn(u.queues,function(e,t){e.agents[n.id]&&(e.paused+=1,console.log("pause"))}):n.voicePause||_.forIn(u.queues,function(e,t){e.agents[n.id]&&0<e.paused&&(e.paused-=1,console.log("unpause"))})},u.onLogin=function(e){console.log("onLogged",e),u.queues[e.VoiceQueueId]&&(u.queues[e.VoiceQueueId].loggedInDb+=1,u.queues[e.VoiceQueueId].agents[e.UserId]=e.VoiceQueueId)},u.onLogout=function(e){console.log("onLogout",e),u.queues[e.VoiceQueueId]&&0<u.queues[e.VoiceQueueId].loggedInDb&&(u.queues[e.VoiceQueueId].loggedInDb-=1,delete u.queues[e.VoiceQueueId].agents[e.UserId])},u.$onInit=g,u.order=[],_.forIn(u.queues,function(e,t){u.order.push(e.id)}),d.onWithoutApply("voice_queue:save",u.onSave),u.interval=o(function(){},999),d.on("userVoiceQueueRt:save",u.onSaveMember),d.on("user:update",u.onPause),d.on("userVoiceQueue:remove",u.onLogout),d.on("userVoiceQueue:save",u.onLogin);var v=!0,h=1;function b(e){if(u.count=e.count,u.queues=e?_.keyBy(e.rows?e.rows:[],"id"):{},e.rows){u.order=[];for(var t=0;t<e.rows.length;t++)u.order.push(e.rows[t].id)}g()}e.$watch("vm.query.filter",function(e,t){v?n(function(){v=!1}):(t||(h=u.query.page),e!==t&&(u.query.page=1),e||(u.query.page=h),u.getQueues())}),e.$on("$destroy",function(){d.removeAllListeners("voice_queue:save"),u.interval&&o.cancel(u.interval),d.removeAllListeners("userVoiceQueueRt:save"),d.removeAllListeners("user:update"),d.removeAllListeners("userVoiceQueue:remove"),d.removeAllListeners("userVoiceQueue:save")})}e.$inject=["$scope","$timeout","$mdDialog","$q","$document","$interval","queues","rpcQueues","api","socket","toasty","Auth"],angular.module("app.motiondialer").controller("QueuesMotionDialerRealtimeController",e)}(),function(){"use strict";angular.module("app.auth").factory("helperClasses",function(){return{status:{registered:"green-300-fg icon-checkbox-marked-circle",unregistered:"red-300-fg icon-close-circle",lagged:"red-300-fg icon-close-circle",reachable:"green-300-fg icon-checkbox-marked-circle",unreachable:"red-300-fg icon-close-circle",unknown:"grey-fg icon-minus-circle"},state:{unknown:"grey-fg icon-phone-hangup",not_inuse:"green-300-fg icon-phone-hangup",inuse:"red-300-fg icon-phone-in-talk",busy:"red-300-fg icon-phone-locked",invalid:"grey-fg icon-phone-hangup",unavailable:"grey-fg icon-phone-hangup",ringing:"blue-300-fg icon-phone-incoming",ringinuse:"blue-300-fg icon-phone-incoming",onhold:"blue-300-fg icon-phone-paused"},channelStatus:{ring:"blue-300-fg icon-phone-incoming",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"},channelStatusOut:{ring:"blue-300-fg icon-phone-outgoing",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"}}})}(),function(){"use strict";function e(e,n,t){switch(t.disconnect(),t.connect(),this.selectedTab=0,n.current.name){case"app.motiondialer.realtime.agents":this.selectedTab=0;break;case"app.motiondialer.realtime.queues":this.selectedTab=1;break;case"app.motiondialer.realtime.queue_calls":this.selectedTab=2;break;case"app.motiondialer.realtime.abandonedcalls":this.selectedTab=3;break;case"app.motiondialer.realtime.queue_params":this.selectedTab=4;break;case"app.motiondialer.realtime.ivr_campaigns":this.selectedTab=5;break;default:this.selectedTab=0,n.go("app.motiondialer.realtime.agents")}e.$watch("vm.selectedTab",function(e,t){if(e!==t)switch(e){case 0:n.go("app.motiondialer.realtime.agents");break;case 1:n.go("app.motiondialer.realtime.queues");break;case 2:n.go("app.motiondialer.realtime.queue_calls");break;case 3:n.go("app.motiondialer.realtime.abandonedcalls");break;case 4:n.go("app.motiondialer.realtime.queue_params");break;case 5:n.go("app.motiondialer.realtime.ivr_campaigns");break;default:n.go("app.motiondialer.realtime.agents")}})}e.$inject=["$scope","$state","socket"],angular.module("app.motiondialer").controller("MotionDialerRealtimeController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="OPENCHANNEL.EDIT_OPENCHANNELACCOUNT",m.openchannelAccount=angular.copy(s),m.openchannelAccounts=o,m.newOpenchannelAccount=!1,m.openchannelAccount||(m.openchannelAccount={waitForTheAssignedAgent:10,notificationSound:!0},m.title="OPENCHANNEL.NEW_OPENCHANNELACCOUNT",m.newOpenchannelAccount=!0),t.params.id&&(m.openchannelAccount.OpenchannelAccountId=t.params.id),m.addNewOpenchannelAccount=function(){m.errors=[],r.openchannelAccount.save(m.openchannelAccount).$promise.then(function(e){m.openchannelAccounts.unshift(e.toJSON()),i.success({title:"OpenchannelAccount properly created",msg:m.openchannelAccount.name?m.openchannelAccount.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveOpenchannelAccount=function(){m.errors=[],r.openchannelAccount.update({id:m.openchannelAccount.id},m.openchannelAccount).$promise.then(function(e){var t=_.find(m.openchannelAccounts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"OpenchannelAccount properly saved!",msg:m.openchannelAccount.name?m.openchannelAccount.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteOpenchannelAccount=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The openchannelAccount will be deleted.").ariaLabel("Delete OpenchannelAccount").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.openchannelAccount.delete({id:m.openchannelAccount.id}).$promise.then(function(){_.remove(m.openchannelAccounts,{id:m.openchannelAccount.id}),i.success({title:"OpenchannelAccount properly deleted!",msg:(m.openchannelAccount.name||"openchannelAccount")+" has been deleted!"}),u(m.openchannelAccount)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.lists=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","openchannelAccounts","openchannelAccount","api","Auth","license","setting"],angular.module("app.openchannel").controller("CreateOrEditOpenchannelAccountDialogController",e)}(),function(){"use strict";function e(s,i,a,o,e){var r=this;function t(e,t){if(r.openchannelAccountApps.rows.length){var n=r.openchannelAccountApps.rows[t]?r.openchannelAccountApps.rows[t]:r.openchannelAccountApps.rows[0];i.show({controller:"EditOpenchannelAccountApp"+(n.appType||n.app).toLowerCase()+"DialogController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelAccounts/edit/apps/"+(n.appType||n.app).toLowerCase()+"/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{openchannelAccountApp:n,openchannelAccount:r.openchannelAccount}}).then(function(e){e&&(e.id?r.openchannelAccountApps.rows[t]=e:r.openchannelAccountApps.rows.splice(t,0,e),l())}).catch(function(e){e&&o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:EDITMODALSHOW",msg:e.data?JSON.stringify(e.data):e.toString()})})}}function l(){for(var e=1,t=[],n=0;n<r.openchannelAccountApps.rows.length;n++,0){var a=r.openchannelAccountApps.rows[n],i=[],o=[];a.intervals="*,*,*,*"!==a.interval?[a.interval]:a.IntervalId?_.map(_.filter(r.intervals.rows,{IntervalId:a.IntervalId}),"interval"):[],a.context=r.openchannelAccount.context,a.exten=r.openchannelAccount.exten,a.type&&(a.type=a.type.toLowerCase()),a.priority=i.length?_.last(i).priority+1:e,e=(o.length?_.last(o).priority:a.priority)+1,t=_.concat(t,i,[a],o)}s.openchannelAccount.addApplications({id:r.openchannelAccount.id},_.sortBy(t,"priority")).$promise.then(function(e){r.openchannelAccountApps.rows=e.rows}).catch(function(e){console.error(e)})}function n(e){r.openchannelAccountApps=e||{count:0,rows:[]}}r.currentUser=e.getCurrentUser(),r.openchannelAccount={},r.openchannelAccountApps={count:0,rows:[]},r.selectedOpenchannelAccountApps=[],r.query={sort:"priority"},r.apps=_.reject(_.sortBy([{app:"Interval",appType:"interval",types:["always","custom","list"],fields:[],isApp:!1},{app:"noop",appType:"noop",type:"noop",icon:"icon-apps",interval:"*,*,*,*",required:!0,isApp:!0,fields:[{title:"Value",name:"value",type:"text",param:0}]},{app:"system",appType:"system",type:"system",icon:"icon-apps",interval:"*,*,*,*",required:!0,isApp:!0,extraApi:[{name:"variables",route:"variable",filters:{fields:"id,name",sort:"name",nolimit:!0}}],fields:[{title:"Command",name:"command",type:"text",required:!0,param:0},{title:"Variable",name:"variable",type:"apiselect",values:"variables",value:"variable.name",option:"variable.name",defaultValues:[{value:"''",option:"None"}],defaultValue:"''",param:1}]},{app:"gotop",appType:"gotop",type:"goto",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Priority",name:"priority",type:"number",required:!0,min:0,param:0}]},{app:"gotoif",appType:"gotoif",type:"gotoif",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Condition",name:"condition",type:"text",required:!0,param:0},{title:"truepriority",name:"truepriority",type:"number",min:1,required:!0,param:1},{title:"falsepriority",name:"falsepriority",type:"number",min:1,required:!0,param:2}]},{app:"queue",appType:"queue",foreignKey:"OpenchannelQueueId",type:"queue",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"queues",route:"openchannelQueue",filters:{fields:"id,name,type",sort:"name",nolimit:!0}}],fields:[{title:"Queue",name:"queue",type:"apiselect",values:"queues",value:"queue.name",option:"queue.name",defaultValue:300,required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",max:2147483,min:0,defaultValue:300,required:!0,param:1}]},{app:"agent",appType:"agent",type:"agent",foreignKey:"UserId",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"agents",route:"user",filters:{fields:"id,name",sort:"name",role:"agent",nolimit:!0}}],fields:[{title:"Agent",name:"agent",type:"apiselect",values:"agents",value:"agent.name",option:"agent.name",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",max:2147483,min:0,required:!0,defaultValue:30,param:1}]},{app:"autoreply",appType:"autoreply",type:"autoreply",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"times",name:"times",type:"select",defaultValue:"1",values:[{option:"One Time",value:"1"},{option:"Always",value:"0"}],required:!0,param:0},{title:"Text",name:"text",type:"textarea",maxlength:255,required:!0,param:1}]},{app:"close",appType:"close",type:"close",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Disposition",name:"disposition",type:"text",required:!0,param:0}]}],["app"]),{isApp:!1}),r.list={group:{name:"opt1",pull:"clone"},animation:100,sort:!1},r.applications={group:{name:"opt2",put:"opt1"},animation:100,onAdd:function(e){t(e,e.newIndex)},onSort:function(e){l()}},r.init=function(e){r.openchannelAccount=e,r.query.id=e.id,r.query.isApp=!0,r.query.nolimit=!0,r.getOpenchannelAccountApps(),r.getIntervals()},r.deleteConfirm=function(e,t,n){var a=i.confirm().title("Are you sure want to delete the application?").htmlContent("<b>"+e.app+"</b> will be deleted.").ariaLabel("delete application").targetEvent(n).ok("OK").cancel("CANCEL");i.show(a).then(function(){r.openchannelAccountApps.rows.splice(t,1),l()},function(){console.log("CANCEL")})},r.getOpenchannelAccountApps=function(){r.promise=s.openchannelAccount.getApplications(r.query,n).$promise},r.editOpenchannelAccountApp=t,r.editInterval=function(e,t){if(r.openchannelAccountApps.rows.length){var n=r.openchannelAccountApps.rows[t]?r.openchannelAccountApps.rows[t]:r.openchannelAccountApps.rows[0];i.show({controller:"EditOpenchannelAccountAppintervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelAccounts/edit/apps/interval/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:{interval:n.interval,IntervalId:n.IntervalId,application:!0},intervals:[]}}).then(function(e){e&&(n.interval=e.interval||"*,*,*,*",n.IntervalId=e.IntervalId||null,l())})}},r.deleteOpenchannelAccountApp=function(e){_.remove(r.openchannelAccountApps.rows,{id:e.id}),l(),o.success({title:"App deleted!",msg:e.app?e.app+" has been deleted!":""})},r.deleteSelectedOpenchannelAccountApps=function(e){var t=i.confirm().title("Are you sure want to delete the selected applications?").htmlContent("<b>"+r.selectedOpenchannelAccountApps.length+" selected</b> will be deleted.").ariaLabel("delete applications").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){r.selectedOpenchannelAccountApps.forEach(function(e){_.remove(r.openchannelAccountApps.rows,{id:e.id})}),r.selectedOpenchannelAccountApps=[],l()})},r.rewriteRouting=l,r.getIntervals=function(){return s.interval.get({fields:"id,interval,IntervalId"}).$promise.then(function(e){r.intervals=e}).catch(function(e){console.error(e)})}}e.$inject=["api","$mdDialog","$document","toasty","Auth"],angular.module("app.openchannel").controller("OpenchannelAccountActionsController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="OPENCHANNEL.EDIT_"+(e.appType||e.app).toUpperCase(),o.agent=angular.copy(e),o.agent.appdata)switch(o.agent.appType?o.agent.appType.toLowerCase():o.agent.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.agent.appdata.split(",");o.agent.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.agent.text=s.slice(1,s.length).join(",");break;case"message":o.agent.text=o.agent.appdata;break;case"set":o.agent.name=o.agent.appdata.split("=")[0],o.agent.value=o.agent.appdata.split("=")[1];break;case"agi":o.agent.project=o.agent.appdata;break;default:var r=o.agent.appdata.split(",");o.agent.agent=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.agent.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.agent.timeout=30;function l(e){t.hide(e)}o.agent.type&&"outbound"===o.agent.type.toLowerCase()&&"outbounddial"===o.agent.appType.toLowerCase()&&(o.agent.prefix=o.agent.phone?o.agent.phone.split("$")[0]:void 0,o.agent.callerId=o.agent.callerID?"CALLERID(all)="+o.agent.callerID:void 0),o.saveOpenchannelAccountApp=function(){o.errors=[];var e=[];o.agent.type&&"outbound"===o.agent.type.toLowerCase()&&"outboundDial"===o.agent.appType&&(o.agent.phone=a.cutdigits?(o.agent.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.agent.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.agent.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.agent.options+="U(xcally-mixmonitor-context)"):o.agent.options=o.agent.options.replace("U(xcally-mixmonitor-context)",""));var t=_.find(o.agents,{name:o.agent.agent});t&&(o.agent.UserId=t.id);if(o.agent.appType&&"custom"===o.agent.appType);else switch((o.agent.app||o.agent.appType).toLowerCase()){case"set":o.agent.appdata=o.agent.name+"="+o.agent.value;break;case"custom":break;default:e[0]=o.agent.agent,e[1]=o.agent.timeout,o.agent.appdata=e.join(",")}l(o.agent)},o.closeDialog=l,i.user.get({fields:"id,name",sort:"name",role:"agent",nolimit:"true"}).$promise.then(function(e){o.agents=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETagents",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","openchannelAccountApp","openchannelAccount","api"],angular.module("app.openchannel").controller("EditOpenchannelAccountAppagentDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="OPENCHANNEL.EDIT_"+(n.appType||n.app).toUpperCase(),o.autoreply=angular.copy(n),o.autoreply.appdata)switch(o.autoreply.appType?o.autoreply.appType.toLowerCase():o.autoreply.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.autoreply.appdata.split(",");o.autoreply.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.autoreply.text=s.slice(1,s.length).join(",");break;case"message":o.autoreply.text=o.autoreply.appdata;break;case"set":o.autoreply.name=o.autoreply.appdata.split("=")[0],o.autoreply.value=o.autoreply.appdata.split("=")[1];break;case"agi":o.autoreply.project=o.autoreply.appdata;break;default:var r=o.autoreply.appdata.split(",");o.autoreply.times=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.autoreply.text=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.autoreply.times=1;function l(e){t.hide(e)}o.autoreply.type&&"outbound"===o.autoreply.type.toLowerCase()&&"outbounddial"===o.autoreply.appType.toLowerCase()&&(o.autoreply.prefix=o.autoreply.phone?o.autoreply.phone.split("$")[0]:void 0,o.autoreply.callerId=o.autoreply.callerID?"CALLERID(all)="+o.autoreply.callerID:void 0),o.saveOpenchannelAccountApp=function(){o.errors=[];var e=[];o.autoreply.type&&"outbound"===o.autoreply.type.toLowerCase()&&"outboundDial"===o.autoreply.appType&&(o.autoreply.phone=a.cutdigits?(o.autoreply.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.autoreply.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.autoreply.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.autoreply.options+="U(xcally-mixmonitor-context)"):o.autoreply.options=o.autoreply.options.replace("U(xcally-mixmonitor-context)",""));if(o.autoreply.appType&&"custom"===o.autoreply.appType);else switch((o.autoreply.app||o.autoreply.appType).toLowerCase()){case"set":o.autoreply.appdata=o.autoreply.name+"="+o.autoreply.value;break;case"custom":break;default:e[0]=o.autoreply.times,e[1]=o.autoreply.text,o.autoreply.appdata=e.join(",")}l(o.autoreply)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","openchannelAccountApp","openchannelAccount","api"],angular.module("app.openchannel").controller("EditOpenchannelAccountAppautoreplyDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="OPENCHANNEL.EDIT_"+(n.appType||n.app).toUpperCase(),o.close=angular.copy(n),o.close.appdata)switch(o.close.appType?o.close.appType.toLowerCase():o.close.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.close.appdata.split(",");o.close.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.close.text=s.slice(1,s.length).join(",");break;case"message":o.close.text=o.close.appdata;break;case"set":o.close.name=o.close.appdata.split("=")[0],o.close.value=o.close.appdata.split("=")[1];break;case"agi":o.close.project=o.close.appdata;break;default:var r=o.close.appdata.split(",");o.close.disposition=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.close.type&&"outbound"===o.close.type.toLowerCase()&&"outbounddial"===o.close.appType.toLowerCase()&&(o.close.prefix=o.close.phone?o.close.phone.split("$")[0]:void 0,o.close.callerId=o.close.callerID?"CALLERID(all)="+o.close.callerID:void 0),o.saveOpenchannelAccountApp=function(){o.errors=[];var e=[];o.close.type&&"outbound"===o.close.type.toLowerCase()&&"outboundDial"===o.close.appType&&(o.close.phone=a.cutdigits?(o.close.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.close.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.close.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.close.options+="U(xcally-mixmonitor-context)"):o.close.options=o.close.options.replace("U(xcally-mixmonitor-context)",""));if(o.close.appType&&"custom"===o.close.appType);else switch((o.close.app||o.close.appType).toLowerCase()){case"set":o.close.appdata=o.close.name+"="+o.close.value;break;case"custom":break;default:e[0]=o.close.disposition,o.close.appdata=e.join(",")}l(o.close)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","openchannelAccountApp","openchannelAccount","api"],angular.module("app.openchannel").controller("EditOpenchannelAccountAppcloseDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="OPENCHANNEL.EDIT_"+(n.appType||n.app).toUpperCase(),o.gotoif=angular.copy(n),o.gotoif.appdata)switch(o.gotoif.appType?o.gotoif.appType.toLowerCase():o.gotoif.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.gotoif.appdata.split(",");o.gotoif.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.gotoif.text=s.slice(1,s.length).join(",");break;case"message":o.gotoif.text=o.gotoif.appdata;break;case"set":o.gotoif.name=o.gotoif.appdata.split("=")[0],o.gotoif.value=o.gotoif.appdata.split("=")[1];break;case"agi":o.gotoif.project=o.gotoif.appdata;break;default:var r=o.gotoif.appdata.split(",");o.gotoif.condition=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.gotoif.truepriority=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.gotoif.falsepriority=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10)}function l(e){t.hide(e)}o.gotoif.type&&"outbound"===o.gotoif.type.toLowerCase()&&"outbounddial"===o.gotoif.appType.toLowerCase()&&(o.gotoif.prefix=o.gotoif.phone?o.gotoif.phone.split("$")[0]:void 0,o.gotoif.callerId=o.gotoif.callerID?"CALLERID(all)="+o.gotoif.callerID:void 0),o.saveOpenchannelAccountApp=function(){o.errors=[];var e=[];o.gotoif.type&&"outbound"===o.gotoif.type.toLowerCase()&&"outboundDial"===o.gotoif.appType&&(o.gotoif.phone=a.cutdigits?(o.gotoif.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.gotoif.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.gotoif.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.gotoif.options+="U(xcally-mixmonitor-context)"):o.gotoif.options=o.gotoif.options.replace("U(xcally-mixmonitor-context)",""));if(o.gotoif.appType&&"custom"===o.gotoif.appType);else switch((o.gotoif.app||o.gotoif.appType).toLowerCase()){case"set":o.gotoif.appdata=o.gotoif.name+"="+o.gotoif.value;break;case"custom":break;default:e[0]=o.gotoif.condition,e[1]=o.gotoif.truepriority,e[2]=o.gotoif.falsepriority,o.gotoif.appdata=e.join(",")}l(o.gotoif)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","openchannelAccountApp","openchannelAccount","api"],angular.module("app.openchannel").controller("EditOpenchannelAccountAppgotoifDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="OPENCHANNEL.EDIT_"+(n.appType||n.app).toUpperCase(),o.gotop=angular.copy(n),o.gotop.appdata)switch(o.gotop.appType?o.gotop.appType.toLowerCase():o.gotop.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.gotop.appdata.split(",");o.gotop.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.gotop.text=s.slice(1,s.length).join(",");break;case"message":o.gotop.text=o.gotop.appdata;break;case"set":o.gotop.name=o.gotop.appdata.split("=")[0],o.gotop.value=o.gotop.appdata.split("=")[1];break;case"agi":o.gotop.project=o.gotop.appdata;break;default:var r=o.gotop.appdata.split(",");o.gotop.priority=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.gotop.type&&"outbound"===o.gotop.type.toLowerCase()&&"outbounddial"===o.gotop.appType.toLowerCase()&&(o.gotop.prefix=o.gotop.phone?o.gotop.phone.split("$")[0]:void 0,o.gotop.callerId=o.gotop.callerID?"CALLERID(all)="+o.gotop.callerID:void 0),o.saveOpenchannelAccountApp=function(){o.errors=[];var e=[];o.gotop.type&&"outbound"===o.gotop.type.toLowerCase()&&"outboundDial"===o.gotop.appType&&(o.gotop.phone=a.cutdigits?(o.gotop.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.gotop.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.gotop.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.gotop.options+="U(xcally-mixmonitor-context)"):o.gotop.options=o.gotop.options.replace("U(xcally-mixmonitor-context)",""));if(o.gotop.appType&&"custom"===o.gotop.appType);else switch((o.gotop.app||o.gotop.appType).toLowerCase()){case"set":o.gotop.appdata=o.gotop.name+"="+o.gotop.value;break;case"custom":break;default:e[0]=o.gotop.priority,o.gotop.appdata=e.join(",")}l(o.gotop)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","openchannelAccountApp","openchannelAccount","api"],angular.module("app.openchannel").controller("EditOpenchannelAccountAppgotopDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;if(l.errors=[],l.title="TOOLS.EDIT_INTERVAL",l.interval=angular.copy(i),l.intervals=o,l.newInterval=!1,l.types=["always","custom","list"],l.daysOfWeek=a.getDaysOfWeek(),l.monthNumber=a.getMonthNumber(),l.monthName=a.getMonthName(),l.daysOfMonth=a.getDaysOfMonth(),l.interval)if("*,*,*,*"!==l.interval.interval){l.type="custom";var d=l.interval.interval.split(","),c=d[0],m=d[1],u=d[2],p=d[3];if("*"!==c){var g,v=c.split("-")[0],h=c.split("-")[1];(g=new Date).setHours(Number(v.split(":")[0])),g.setMinutes(Number(v.split(":")[1])),l.timeRangeFrom=g,(g=new Date).setHours(Number(h.split(":")[0])),g.setMinutes(Number(h.split(":")[1])),l.timeRangeTo=g}"*"!==m&&(l.dayOfWeekFrom=m.split("-")[0],l.dayOfWeekTo=m.split("-")[1]),"*"!==u&&(l.monthDayFrom=u.split("-")[0],l.monthDayTo=u.split("-")[1]),"*"!==p&&(l.monthFrom=p.split("-")[0],l.monthTo=p.split("-")[1])}else l.type="always";else l.interval={interval:"*,*,*,*"},l.type="always",l.title="TOOLS.NEW_INTERVAL",l.newInterval=!0;function b(){switch(l.type){case"always":case"list":return"*,*,*,*";case"custom":var e=[];if("*"!==l.timeRangeFrom&&l.timeRangeFrom&&l.timeRangeTo){var t=(l.timeRangeFrom.getHours()<10?"0":"")+l.timeRangeFrom.getHours()+":"+(l.timeRangeFrom.getMinutes()<10?"0":"")+l.timeRangeFrom.getMinutes(),n=(l.timeRangeTo.getHours()<10?"0":"")+l.timeRangeTo.getHours()+":"+(l.timeRangeTo.getMinutes()<10?"0":"")+l.timeRangeTo.getMinutes();e.push(t+"-"+n)}else e.push("*");return l.dayOfWeekFrom?l.dayOfWeekTo?e.push(l.dayOfWeekFrom+"-"+l.dayOfWeekTo):e.push(l.dayOfWeekFrom):e.push("*"),l.monthDayFrom?l.monthDayTo?e.push(l.monthDayFrom+"-"+l.monthDayTo):e.push(l.monthDayFrom):e.push("*"),l.monthFrom?l.monthTo?e.push(l.monthFrom+"-"+l.monthTo):e.push(l.monthFrom):e.push("*"),e.join()}}function f(e){t.hide(e)}e.params.id&&!l.interval.application&&(l.interval.IntervalId=e.params.id),l.interval.IntervalId&&l.interval.application&&(l.type="list"),l.addNewInterval=function(){l.errors=[],l.interval.interval=b(),r.interval.save(l.interval).$promise.then(function(e){l.intervals.push(e),s.success({title:"Interval properly created",msg:l.interval.name?l.interval.name+" has been created!":""}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}]})},l.saveInterval=function(){l.errors=[],l.interval.interval=b(),l.interval.application?("list"!==l.type&&(l.interval.IntervalId=null),f(l.interval)):r.interval.update({id:l.interval.id},l.interval).$promise.then(function(e){var t=_.find(l.intervals,{id:e.id});t&&_.merge(t,e),s.success({title:"Interval properly saved!",msg:"Interval has been saved!"}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}]})},l.closeDialog=f,l.interval.application&&r.interval.get({fields:"id,name,interval,IntervalId",IntervalId:"null",nolimit:!0}).$promise.then(function(e){l.intervals=e}).catch(function(e){console.error(e)})}e.$inject=["$state","$mdDialog","$mdToast","IndexFactory","interval","intervals","toasty","api"],angular.module("app.voice").controller("EditOpenchannelAccountAppintervalDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="OPENCHANNEL.EDIT_"+(n.appType||n.app).toUpperCase(),o.noop=angular.copy(n),o.noop.appdata)switch(o.noop.appType?o.noop.appType.toLowerCase():o.noop.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.noop.appdata.split(",");o.noop.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.noop.text=s.slice(1,s.length).join(",");break;case"message":o.noop.text=o.noop.appdata;break;case"set":o.noop.name=o.noop.appdata.split("=")[0],o.noop.value=o.noop.appdata.split("=")[1];break;case"agi":o.noop.project=o.noop.appdata;break;default:var r=o.noop.appdata.split(",");o.noop.value=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.noop.type&&"outbound"===o.noop.type.toLowerCase()&&"outbounddial"===o.noop.appType.toLowerCase()&&(o.noop.prefix=o.noop.phone?o.noop.phone.split("$")[0]:void 0,o.noop.callerId=o.noop.callerID?"CALLERID(all)="+o.noop.callerID:void 0),o.saveOpenchannelAccountApp=function(){o.errors=[];var e=[];o.noop.type&&"outbound"===o.noop.type.toLowerCase()&&"outboundDial"===o.noop.appType&&(o.noop.phone=a.cutdigits?(o.noop.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.noop.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.noop.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.noop.options+="U(xcally-mixmonitor-context)"):o.noop.options=o.noop.options.replace("U(xcally-mixmonitor-context)",""));if(o.noop.appType&&"custom"===o.noop.appType);else switch((o.noop.app||o.noop.appType).toLowerCase()){case"set":o.noop.appdata=o.noop.name+"="+o.noop.value;break;case"custom":break;default:e[0]=o.noop.value,o.noop.appdata=e.join(",")}l(o.noop)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","openchannelAccountApp","openchannelAccount","api"],angular.module("app.openchannel").controller("EditOpenchannelAccountAppnoopDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="OPENCHANNEL.EDIT_"+(e.appType||e.app).toUpperCase(),o.queue=angular.copy(e),o.queue.appdata)switch(o.queue.appType?o.queue.appType.toLowerCase():o.queue.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.queue.appdata.split(",");o.queue.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.queue.text=s.slice(1,s.length).join(",");break;case"message":o.queue.text=o.queue.appdata;break;case"set":o.queue.name=o.queue.appdata.split("=")[0],o.queue.value=o.queue.appdata.split("=")[1];break;case"agi":o.queue.project=o.queue.appdata;break;default:var r=o.queue.appdata.split(",");o.queue.queue=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.queue.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.queue.queue=300,o.queue.timeout=300;function l(e){t.hide(e)}o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outbounddial"===o.queue.appType.toLowerCase()&&(o.queue.prefix=o.queue.phone?o.queue.phone.split("$")[0]:void 0,o.queue.callerId=o.queue.callerID?"CALLERID(all)="+o.queue.callerID:void 0),o.saveOpenchannelAccountApp=function(){o.errors=[];var e=[];o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outboundDial"===o.queue.appType&&(o.queue.phone=a.cutdigits?(o.queue.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.queue.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.queue.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.queue.options+="U(xcally-mixmonitor-context)"):o.queue.options=o.queue.options.replace("U(xcally-mixmonitor-context)",""));var t=_.find(o.queues,{name:o.queue.queue});t&&(o.queue[_.capitalize("openChannel")+"QueueId"]=t.id);if(o.queue.appType&&"custom"===o.queue.appType);else switch((o.queue.app||o.queue.appType).toLowerCase()){case"set":o.queue.appdata=o.queue.name+"="+o.queue.value;break;case"custom":break;default:e[0]=o.queue.queue,e[1]=o.queue.timeout,o.queue.appdata=e.join(",")}l(o.queue)},o.closeDialog=l,i.openchannelQueue.get({fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){o.queues=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","openchannelAccountApp","openchannelAccount","api"],angular.module("app.openchannel").controller("EditOpenchannelAccountAppqueueDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="OPENCHANNEL.EDIT_"+(e.appType||e.app).toUpperCase(),o.system=angular.copy(e),o.system.appdata)switch(o.system.appType?o.system.appType.toLowerCase():o.system.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.system.appdata.split(",");o.system.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.system.text=s.slice(1,s.length).join(",");break;case"message":o.system.text=o.system.appdata;break;case"set":o.system.name=o.system.appdata.split("=")[0],o.system.value=o.system.appdata.split("=")[1];break;case"agi":o.system.project=o.system.appdata;break;default:var r=o.system.appdata.split(",");o.system.command=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.system.variable=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.system.variable="";function l(e){t.hide(e)}o.system.type&&"outbound"===o.system.type.toLowerCase()&&"outbounddial"===o.system.appType.toLowerCase()&&(o.system.prefix=o.system.phone?o.system.phone.split("$")[0]:void 0,o.system.callerId=o.system.callerID?"CALLERID(all)="+o.system.callerID:void 0),o.saveOpenchannelAccountApp=function(){o.errors=[];var e=[];o.system.type&&"outbound"===o.system.type.toLowerCase()&&"outboundDial"===o.system.appType&&(o.system.phone=a.cutdigits?(o.system.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.system.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.system.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.system.options+="U(xcally-mixmonitor-context)"):o.system.options=o.system.options.replace("U(xcally-mixmonitor-context)",""));if(o.system.appType&&"custom"===o.system.appType);else switch((o.system.app||o.system.appType).toLowerCase()){case"set":o.system.appdata=o.system.name+"="+o.system.value;break;case"custom":break;default:e[0]=o.system.command,e[1]=o.system.variable,o.system.appdata=e.join(",")}l(o.system)},o.closeDialog=l,i.variable.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){o.variables=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvariables",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","openchannelAccountApp","openchannelAccount","api"],angular.module("app.openchannel").controller("EditOpenchannelAccountAppsystemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.openchannelAccount={},c.openchannelAccountInteractions={count:0,rows:[]},c.selectedOpenchannelAccountInteractions=[],c.query={fields:"createdAt,updatedAt,id,createdAt,Contact.firstName,Owner.name,closedAt,disposition,note,UserId,ContactId,OpenchannelAccountId,tag",sort:"-createdAt",includeAll:"true",limit:10,page:1},c.init=function(e){c.openchannelAccount=e,c.query.id=c.openchannelAccount.id,c.getOpenchannelAccountInteractions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the interaction?").htmlContent("<b>"+(e.name||"interaction")+"</b> will be deleted.").ariaLabel("delete interaction").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getOpenchannelAccountInteractions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.openchannelAccount.getInteractions(c.query,p).$promise},c.createOrEditOpenchannelAccountInteraction=function(e,t){o.show({controller:"CreateOrEditInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelAccounts/edit/interactions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{openchannelAccount:c.openchannelAccount,interaction:t,interactions:c.openchannelAccountInteractions.rows,license:null,setting:null}})},c.spyopenchannelInteraction=function(e,n){o.show({controller:"AgentGeneralInteractionController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/agent.general.interaction.dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,onShowing:function(e,t){e.vm.init({id:1,channel:"openchannel",interaction:n,spy:!0})}})},c.exportSelectedOpenchannelAccountInteractions=function(){var e=angular.copy(c.selectedOpenchannelAccountInteractions);return c.selectedOpenchannelAccountInteractions=[],e},c.deleteOpenchannelAccountInteraction=g,c.deleteSelectedOpenchannelAccountInteractions=function(e){var t=o.confirm().title("Are you sure want to delete the selected interactions?").htmlContent("<b>"+c.selectedOpenchannelAccountInteractions.length+" selected</b> will be deleted.").ariaLabel("delete interactions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedOpenchannelAccountInteractions.forEach(function(e){g(e)}),c.selectedOpenchannelAccountInteractions=[]})};var m=!0,u=1;function p(e){c.openchannelAccountInteractions=e||{count:0,rows:[]}}function g(e){l.openchannelInteraction.delete({id:e.id}).$promise.then(function(){_.remove(c.openchannelAccountInteractions.rows,{id:e.id}),c.openchannelAccountInteractions.count-=1,c.openchannelAccountInteractions.rows.length||c.getOpenchannelAccountInteractions(),r.success({title:"Interaction deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETopenchannelAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETopenchannelAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getOpenchannelAccountInteractions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.openchannel").controller("OpenchannelAccountInteractionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.openchannelAccount={},c.openchannelAccountOpenchannelCannedAnswers={count:0,rows:[]},c.selectedOpenchannelAccountOpenchannelCannedAnswers=[],c.query={fields:"createdAt,updatedAt,id,key,value,description,createdAt",limit:10,page:1},c.init=function(e){c.openchannelAccount=e,c.query.id=c.openchannelAccount.id,c.query.OpenchannelAccountId=c.openchannelAccount.id,c.getOpenchannelAccountOpenchannelCannedAnswers()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the openchannelCannedAnswer?").htmlContent("<b>"+(e.name||"openchannelCannedAnswer")+"</b> will be deleted.").ariaLabel("delete openchannelCannedAnswer").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getOpenchannelAccountOpenchannelCannedAnswers=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.openchannelAccount.getAnswers(c.query,p).$promise},c.createOrEditOpenchannelAccountOpenchannelCannedAnswer=function(e,t){o.show({controller:"CreateOrEditOpenchannelCannedAnswerDialogController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelAccounts/edit/openchannelCannedAnswers/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{openchannelAccount:c.openchannelAccount,openchannelCannedAnswer:t,openchannelCannedAnswers:c.openchannelAccountOpenchannelCannedAnswers.rows,license:null,setting:null}})},c.exportSelectedOpenchannelAccountOpenchannelCannedAnswers=function(){var e=angular.copy(c.selectedOpenchannelAccountOpenchannelCannedAnswers);return c.selectedOpenchannelAccountOpenchannelCannedAnswers=[],e},c.deleteOpenchannelAccountOpenchannelCannedAnswer=g,c.deleteSelectedOpenchannelAccountOpenchannelCannedAnswers=function(e){var t=o.confirm().title("Are you sure want to delete the selected openchannelCannedAnswers?").htmlContent("<b>"+c.selectedOpenchannelAccountOpenchannelCannedAnswers.length+" selected</b> will be deleted.").ariaLabel("delete openchannelCannedAnswers").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedOpenchannelAccountOpenchannelCannedAnswers.forEach(function(e){g(e)}),c.selectedOpenchannelAccountOpenchannelCannedAnswers=[]})};var m=!0,u=1;function p(e){c.openchannelAccountOpenchannelCannedAnswers=e||{count:0,rows:[]}}function g(e){l.cannedAnswer.delete({id:e.id}).$promise.then(function(){_.remove(c.openchannelAccountOpenchannelCannedAnswers.rows,{id:e.id}),c.openchannelAccountOpenchannelCannedAnswers.count-=1,c.openchannelAccountOpenchannelCannedAnswers.rows.length||c.getOpenchannelAccountOpenchannelCannedAnswers(),r.success({title:"OpenchannelCannedAnswer deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETopenchannelAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETopenchannelAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getOpenchannelAccountOpenchannelCannedAnswers())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.openchannel").controller("OpenchannelAccountOpenchannelCannedAnswersController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="OPENCHANNEL.EDIT_OPENCHANNELCANNEDANSWER",m.openchannelCannedAnswer=angular.copy(s),m.openchannelCannedAnswers=o,m.newOpenchannelCannedAnswer=!1,m.openchannelCannedAnswer||(m.openchannelCannedAnswer={},m.title="OPENCHANNEL.NEW_OPENCHANNELCANNEDANSWER",m.newOpenchannelCannedAnswer=!0),t.params.id&&(m.openchannelCannedAnswer.OpenchannelAccountId=t.params.id),m.addNewOpenchannelCannedAnswer=function(){m.errors=[],r.cannedAnswer.save(m.openchannelCannedAnswer).$promise.then(function(e){m.openchannelCannedAnswers.unshift(e.toJSON()),i.success({title:"OpenchannelCannedAnswer properly created",msg:m.openchannelCannedAnswer.name?m.openchannelCannedAnswer.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveOpenchannelCannedAnswer=function(){m.errors=[],r.cannedAnswer.update({id:m.openchannelCannedAnswer.id},m.openchannelCannedAnswer).$promise.then(function(e){var t=_.find(m.openchannelCannedAnswers,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"OpenchannelCannedAnswer properly saved!",msg:m.openchannelCannedAnswer.name?m.openchannelCannedAnswer.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteOpenchannelCannedAnswer=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The openchannelCannedAnswer will be deleted.").ariaLabel("Delete OpenchannelCannedAnswer").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.cannedAnswer.delete({id:m.openchannelCannedAnswer.id}).$promise.then(function(){_.remove(m.openchannelCannedAnswers,{id:m.openchannelCannedAnswer.id}),i.success({title:"OpenchannelCannedAnswer properly deleted!",msg:(m.openchannelCannedAnswer.name||"openchannelCannedAnswer")+" has been deleted!"}),u(m.openchannelCannedAnswer)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","openchannelCannedAnswers","openchannelCannedAnswer","api","Auth","license","setting"],angular.module("app.openchannel").controller("CreateOrEditOpenchannelCannedAnswerDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.openchannelAccount={},c.openchannelAccountOpenchannelDispositions={count:0,rows:[]},c.selectedOpenchannelAccountOpenchannelDispositions=[],c.query={fields:"createdAt,updatedAt,id,name,createdAt",limit:10,page:1},c.init=function(e){c.openchannelAccount=e,c.query.id=c.openchannelAccount.id,c.query.OpenchannelAccountId=c.openchannelAccount.id,c.getOpenchannelAccountOpenchannelDispositions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the openchannelDisposition?").htmlContent("<b>"+(e.name||"openchannelDisposition")+"</b> will be deleted.").ariaLabel("delete openchannelDisposition").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getOpenchannelAccountOpenchannelDispositions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.openchannelAccount.getDispositions(c.query,p).$promise},c.createOrEditOpenchannelAccountOpenchannelDisposition=function(e,t){o.show({controller:"CreateOrEditOpenchannelDispositionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelAccounts/edit/openchannelDispositions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{openchannelAccount:c.openchannelAccount,openchannelDisposition:t,openchannelDispositions:c.openchannelAccountOpenchannelDispositions.rows,license:null,setting:null}})},c.exportSelectedOpenchannelAccountOpenchannelDispositions=function(){var e=angular.copy(c.selectedOpenchannelAccountOpenchannelDispositions);return c.selectedOpenchannelAccountOpenchannelDispositions=[],e},c.deleteOpenchannelAccountOpenchannelDisposition=g,c.deleteSelectedOpenchannelAccountOpenchannelDispositions=function(e){var t=o.confirm().title("Are you sure want to delete the selected openchannelDispositions?").htmlContent("<b>"+c.selectedOpenchannelAccountOpenchannelDispositions.length+" selected</b> will be deleted.").ariaLabel("delete openchannelDispositions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedOpenchannelAccountOpenchannelDispositions.forEach(function(e){g(e)}),c.selectedOpenchannelAccountOpenchannelDispositions=[]})};var m=!0,u=1;function p(e){c.openchannelAccountOpenchannelDispositions=e||{count:0,rows:[]}}function g(e){l.openchannelDisposition.delete({id:e.id}).$promise.then(function(){_.remove(c.openchannelAccountOpenchannelDispositions.rows,{id:e.id}),c.openchannelAccountOpenchannelDispositions.count-=1,c.openchannelAccountOpenchannelDispositions.rows.length||c.getOpenchannelAccountOpenchannelDispositions(),r.success({title:"OpenchannelDisposition deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETopenchannelAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETopenchannelAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getOpenchannelAccountOpenchannelDispositions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.openchannel").controller("OpenchannelAccountOpenchannelDispositionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="OPENCHANNEL.EDIT_OPENCHANNELDISPOSITION",m.openchannelDisposition=angular.copy(s),m.openchannelDispositions=o,m.newOpenchannelDisposition=!1,m.openchannelDisposition||(m.openchannelDisposition={},m.title="OPENCHANNEL.NEW_OPENCHANNELDISPOSITION",m.newOpenchannelDisposition=!0),t.params.id&&(m.openchannelDisposition.OpenchannelAccountId=t.params.id),m.addNewOpenchannelDisposition=function(){m.errors=[],r.openchannelDisposition.save(m.openchannelDisposition).$promise.then(function(e){m.openchannelDispositions.unshift(e.toJSON()),i.success({title:"OpenchannelDisposition properly created",msg:m.openchannelDisposition.name?m.openchannelDisposition.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelDisposition.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelDisposition.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveOpenchannelDisposition=function(){m.errors=[],r.openchannelDisposition.update({id:m.openchannelDisposition.id},m.openchannelDisposition).$promise.then(function(e){var t=_.find(m.openchannelDispositions,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"OpenchannelDisposition properly saved!",msg:m.openchannelDisposition.name?m.openchannelDisposition.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelDisposition.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelDisposition.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteOpenchannelDisposition=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The openchannelDisposition will be deleted.").ariaLabel("Delete OpenchannelDisposition").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.openchannelDisposition.delete({id:m.openchannelDisposition.id}).$promise.then(function(){_.remove(m.openchannelDispositions,{id:m.openchannelDisposition.id}),i.success({title:"OpenchannelDisposition properly deleted!",msg:(m.openchannelDisposition.name||"openchannelDisposition")+" has been deleted!"}),u(m.openchannelDisposition)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelDisposition.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelDisposition.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","openchannelDispositions","openchannelDisposition","api","Auth","license","setting"],angular.module("app.openchannel").controller("CreateOrEditOpenchannelDispositionDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.openchannelAccount=d||e.params.openchannelAccount||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoOpenchannelAccounts=function(){e.go("app.openchannel.openchannelAccounts")},c.saveOpenchannelAccount=function(){s.openchannelAccount.update({id:c.openchannelAccount.id},c.openchannelAccount).$promise.then(function(){r.success({title:"OpenchannelAccount updated!",msg:c.openchannelAccount.name?c.openchannelAccount.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETopenchannelAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.lists=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","openchannelAccount"],angular.module("app.openchannel").controller("OpenchannelAccountController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.openchannelAccounts=r||{count:0,rows:[]},v.table="openchannelAccounts",v.listOrder="",v.listOrderAsc=null,v.selectedOpenchannelAccounts=[],v.query={fields:"createdAt,updatedAt,id,name,key,replyUri,ListId,waitForTheAssignedAgent,description,receiveUri,notificationSound,notificationShake,notificationTemplate",sort:"-updatedAt",limit:10,page:1},v.editstate=function(e,t){n.go("app.openchannel.openchannelAccounts.edit",{id:e.id,openchannelAccount:e})},v.interactionsgoto=function(e,t){n.go("app.openchannel.openchannelAccounts.edit",{id:e.id,tab:4})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the openchannelAccount?").htmlContent("<b>"+(e.name||"openchannelAccount")+"</b> will be deleted.").ariaLabel("delete openchannelAccount").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getOpenchannelAccounts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.openchannelAccount.get(v.query,f).$promise},v.createOrEditOpenchannelAccount=function(e,t){i.show({controller:"CreateOrEditOpenchannelAccountDialogController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelAccounts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{openchannelAccount:t,openchannelAccounts:v.openchannelAccounts.rows,license:v.license,setting:v.setting}})},v.deleteOpenchannelAccount=A,v.exportSelectedOpenchannelAccounts=function(){var e=angular.copy(v.selectedOpenchannelAccounts);return v.selectedOpenchannelAccounts=[],e},v.deleteSelectedOpenchannelAccounts=function(e){var t=i.confirm().title("Are you sure want to delete the selected openchannelAccounts?").htmlContent("<b>"+v.selectedOpenchannelAccounts.length+" selected</b> will be deleted.").ariaLabel("delete OpenchannelAccounts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedOpenchannelAccounts.forEach(function(e){A(e)}),v.selectedOpenchannelAccounts=[]})},v.deselectOpenchannelAccounts=function(){v.selectedOpenchannelAccounts=[]},v.selectAllOpenchannelAccounts=function(){v.selectedOpenchannelAccounts=v.openchannelAccounts.rows},l.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.lists=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.openchannelAccounts=e||{count:0,rows:[]}}function A(e){l.openchannelAccount.delete({id:e.id}).$promise.then(function(){_.remove(v.openchannelAccounts.rows,{id:e.id}),v.openchannelAccounts.count-=1,v.openchannelAccounts.rows.length||v.getOpenchannelAccounts(),c.success({title:"OpenchannelAccount deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEopenchannelAccount"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEopenchannelAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getOpenchannelAccounts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","openchannelAccounts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.openchannel").controller("OpenchannelAccountsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="OPENCHANNEL.EDIT_OPENCHANNELQUEUE",m.openchannelQueue=angular.copy(s),m.openchannelQueues=o,m.newOpenchannelQueue=!1,m.openchannelQueue||(m.openchannelQueue={strategy:"beepall",timeout:10},m.title="OPENCHANNEL.NEW_OPENCHANNELQUEUE",m.newOpenchannelQueue=!0),m.addNewOpenchannelQueue=function(){m.errors=[],r.openchannelQueue.save(m.openchannelQueue).$promise.then(function(e){m.openchannelQueues.unshift(e.toJSON()),i.success({title:"OpenchannelQueue properly created",msg:m.openchannelQueue.name?m.openchannelQueue.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelQueue.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelQueue.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveOpenchannelQueue=function(){m.errors=[],r.openchannelQueue.update({id:m.openchannelQueue.id},m.openchannelQueue).$promise.then(function(e){var t=_.find(m.openchannelQueues,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"OpenchannelQueue properly saved!",msg:m.openchannelQueue.name?m.openchannelQueue.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelQueue.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelQueue.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteOpenchannelQueue=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The openchannelQueue will be deleted.").ariaLabel("Delete OpenchannelQueue").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.openchannelQueue.delete({id:m.openchannelQueue.id}).$promise.then(function(){_.remove(m.openchannelQueues,{id:m.openchannelQueue.id}),i.success({title:"OpenchannelQueue properly deleted!",msg:(m.openchannelQueue.name||"openchannelQueue")+" has been deleted!"}),u(m.openchannelQueue)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelQueue.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelQueue.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","openchannelQueues","openchannelQueue","api","Auth","license","setting"],angular.module("app.openchannel").controller("CreateOrEditOpenchannelQueueDialogController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r){var l=this;function d(){return a.openchannelQueue[l.isVoiceRealtime()?"getMembers":"getAgents"]({id:l.openchannelQueue.id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){return l.isVoiceRealtime()?l.selectedItems=e.rows?_.map(e.rows,function(e){return e.id=e.UserId,e.fullname=e.membername,e.penalty=e.hasOwnProperty("penalty")?"penalty "+e.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[]:l.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserOpenchannelQueue?"penalty "+e.UserOpenchannelQueue.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.selectedItems=l.selectedItems,r.hasRole("admin")?a.user.get({fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise:a.user.getAgents({id:r.getCurrentUser().id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise}).then(function(e){l.items=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserOpenchannelQueue?"penalty "+e.UserOpenchannelQueue.penalty:"",e.internal=e.internal?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.items=_.differenceBy(l.items,l.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETUSERS.GETAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}l.openchannelQueue=t,l.penalty=0,l.items=[],l.selectedItems=[],l.closeDialog=function(){e.hide()},l.isVoiceRealtime=function(){return o},l.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"penalty",labelAll:s.instant("OPENCHANNEL.ALL_AGENTS"),labelSelected:s.instant("OPENCHANNEL.SELECTED_AGENTS"),transferCallback:function(e,t){a.openchannelQueue[t?"removeAgents":"addAgents"]({id:l.openchannelQueue.id,ids:_.map(e,l.isVoiceRealtime()&&t?"UserId":"id"),penalty:l.penalty||0,realtime:o||!1}).$promise.then(function(){n.success({title:"OpenchannelQueue properly "+(t?"removed":"added"),msg:"OpenchannelQueue has been "+(t?"removed":"added")+"!"}),t||d()}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:openchannelQueue.ADDAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d()}e.$inject=["$mdDialog","toasty","api","openchannelQueue","openchannelQueues","realtime","$translate","Auth"],angular.module("app.openchannel").controller("OpenchannelQueueagentaddController",e)}(),function(){"use strict";function e(e,n,a,t,i){var o=this;o.openchannelQueue=t,o.penalty=0,o.items=[],o.selectedItems=[],o.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("OPENCHANNEL.ALL_TEAMS"),labelSelected:i.instant("OPENCHANNEL.SELECTED_TEAMS"),transferCallback:function(e,t){a.openchannelQueue[t?"removeTeams":"addTeams"]({id:o.openchannelQueue.id,ids:_.map(e,"id"),penalty:o.penalty||0}).$promise.then(function(){n.success({title:"Team properly "+(t?"removed":"added"),msg:"Team has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:openchannelQueue.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},o.closeDialog=function(){e.hide()},a.openchannelQueue.getTeams({id:o.openchannelQueue.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return o.selectedItems=e.rows?e.rows:[],o.dualMultiselectOptions.selectedItems=o.selectedItems,a.team.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){o.items=e.rows?e.rows:[],o.dualMultiselectOptions.items=_.differenceBy(o.items,o.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","openchannelQueue","$translate"],angular.module("app.openchannel").controller("OpenchannelQueueteamaddController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.openchannelQueue=d||e.params.openchannelQueue||{},c.selectedTab=e.params.tab||0,c.teamadddialog=function(e,t){n.show({controller:"OpenchannelQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelQueues/edit/teamadd/teamadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{openchannelQueue:e,openchannelQueues:c.openchannelQueues?c.openchannelQueues.rows:[]}})},c.agentadddialog=function(e,t){n.show({controller:"OpenchannelQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelQueues/edit/agentadd/agentadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{openchannelQueue:e,openchannelQueues:c.openchannelQueues?c.openchannelQueues.rows:[],realtime:!1}})},c.alert=r.info,c.gotoOpenchannelQueues=function(){e.go("app.openchannel.openchannelQueues")},c.saveOpenchannelQueue=function(){s.openchannelQueue.update({id:c.openchannelQueue.id},c.openchannelQueue).$promise.then(function(){r.success({title:"OpenchannelQueue updated!",msg:c.openchannelQueue.name?c.openchannelQueue.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETopenchannelQueue",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","openchannelQueue"],angular.module("app.openchannel").controller("OpenchannelQueueController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.openchannelQueues=r||{count:0,rows:[]},v.table="openchannelQueues",v.listOrder="",v.listOrderAsc=null,v.selectedOpenchannelQueues=[],v.query={fields:"createdAt,updatedAt,id,name,strategy,timeout,description",sort:"-updatedAt",limit:10,page:1},v.arraystrategy=_.keyBy([{option:"Beepall",value:"'beepall'"},{option:"RR Memory",value:"'rrmemory'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.openchannel.openchannelQueues.edit",{id:e.id,openchannelQueue:e})},v.teamadddialog=function(e,t){i.show({controller:"OpenchannelQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelQueues/edit/teamadd/teamadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{openchannelQueue:e,openchannelQueues:v.openchannelQueues?v.openchannelQueues.rows:[]}})},v.agentadddialog=function(e,t){i.show({controller:"OpenchannelQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelQueues/edit/agentadd/agentadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{openchannelQueue:e,openchannelQueues:v.openchannelQueues?v.openchannelQueues.rows:[],realtime:!1}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the openchannelQueue?").htmlContent("<b>"+(e.name||"openchannelQueue")+"</b> will be deleted.").ariaLabel("delete openchannelQueue").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.gotorealtimegoto=function(e,t){n.go("app.openchannel.realtime.queues",{})},v.success=f,v.getOpenchannelQueues=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.openchannelQueue.get(v.query,f).$promise},v.createOrEditOpenchannelQueue=function(e,t){i.show({controller:"CreateOrEditOpenchannelQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelQueues/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{openchannelQueue:t,openchannelQueues:v.openchannelQueues.rows,license:v.license,setting:v.setting}})},v.deleteOpenchannelQueue=A,v.exportSelectedOpenchannelQueues=function(){var e=angular.copy(v.selectedOpenchannelQueues);return v.selectedOpenchannelQueues=[],e},v.deleteSelectedOpenchannelQueues=function(e){var t=i.confirm().title("Are you sure want to delete the selected openchannelQueues?").htmlContent("<b>"+v.selectedOpenchannelQueues.length+" selected</b> will be deleted.").ariaLabel("delete OpenchannelQueues").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedOpenchannelQueues.forEach(function(e){A(e)}),v.selectedOpenchannelQueues=[]})},v.deselectOpenchannelQueues=function(){v.selectedOpenchannelQueues=[]},v.selectAllOpenchannelQueues=function(){v.selectedOpenchannelQueues=v.openchannelQueues.rows};var h=!0,b=1;function f(e){v.openchannelQueues=e||{count:0,rows:[]}}function A(e){l.openchannelQueue.delete({id:e.id}).$promise.then(function(){_.remove(v.openchannelQueues.rows,{id:e.id}),v.openchannelQueues.count-=1,v.openchannelQueues.rows.length||v.getOpenchannelQueues(),c.success({title:"OpenchannelQueue deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEopenchannelQueue"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEopenchannelQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getOpenchannelQueues())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","openchannelQueues","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.openchannel").controller("OpenchannelQueuesController",e)}(),function(){"use strict";function e(e,s,t,n,a,i,o,r,l,d,c,m,u,p,g,v){var h=this,b=["userpic","online","lastLoginAt","lastPauseAt","pauseType","lastPauseAt","internal","address","chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","chatCapacity","openchannelCapacity","mailCapacity","smsCapacity","faxCapacity","chatCurrentCapacity","openchannelCurrentCapacity","mailCurrentCapacity","smsCurrentCapacity","faxCurrentCapacity","chatStatus","openchannelStatus","mailStatus","smsStatus","faxStatus","voiceStatus","chatStatusTime","openchannelStatusTime","mailStatusTime","smsStatusTime","faxStatusTime","voiceStatusTime","queue","destconnectedlinenum"],f=["chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","online"];for(var A in h.availableStates=["ringing","inuse","busy","onhold","not_inuse"],h.pauses=o||{count:0,rows:[]},h.license=g,h.agents=r?_.keyBy(r.rows?r.rows:[],"id"):{},h.rpcAgents=l?_.keyBy(l.rows?l.rows:[],"id"):{},h.paginatedAgents={},h.load=!1,h.order=[],h.agentInternal={},h.agents)h.agents.hasOwnProperty(A)&&(h.agents[A].init=!0);h.query={limit:10,page:1,order:"fullname",globalStatusFilter:"",pauseTypeFilter:""},h.logout=function(e,t){return d.user.logout({id:e.id}).$promise.then(function(){m.success({title:"Agent logout",msg:e.fullname+"  properly logout"}),h.agents[e.id]&&(h.agents[e.id].online=!1),h.rpcAgents[e.id]&&(h.rpcAgents[e.id].online=!1),y()}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.queueAdd=function(e,t){n.show({controller:"AgentqueueaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/queueadd/queueadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{agent:e,agents:[],channel:"openchannel",realtime:!0,direction:"inbound"}})},h.pause=function(t,e){return d.user.pause({id:t.id,type:e}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.unPause=function(t){return d.user.unpause({id:t.id}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.showInfo=function(e){n.show(n.alert().clickOutsideToClose(!0).title("Legend").htmlContent("<div>TODO legend status + state</div>").ok("Ok").targetEvent(e))},h.getAgentStatus=C,h.getAgentGlobalStatus=x,h.isPause=S,h.checkPause=function(e){return"pause"===e},h.isPartialPause=function(e){return"*pause"===e},h.onSave=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(_.omit(e,f),b)),_.merge(h.rpcAgents[e.id],_.pick(_.omit(e,f),b)),x(h.agents[e.id]))},h.onUpdate=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(e,b)),_.merge(h.rpcAgents[e.id],_.pick(e,b)),x(h.agents[e.id]))},h.onInit=y,h.onConnect=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(_.merge(h.agents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])),_.merge(h.rpcAgents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])))},h.onComplete=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(h.agents[h.agentInternal[e.destaccountcode]]=_.omit(h.agents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]),h.rpcAgents[h.agentInternal[e.destaccountcode]]=_.omit(h.rpcAgents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]))},c.on("user:save",h.onSave),c.on("user:update",h.onUpdate),c.on("user:agentconnect",h.onConnect),c.on("user:agentcomplete",h.onComplete),y();var E=v(function(){h.load&&(h.load=!1,y())},999);function y(e){h.load=!1;var t,n,a=s.defer();h.promise=a.promise,h.filteredAgents=[],h.order=[],_.forIn(h.agents,function(e,t){h.rpcAgents[t]&&_.merge(e,_.pick(_.omit(h.rpcAgents[t],f),b)),x(e),e.online?(h.filteredAgents.push(e),h.agentInternal[e.internal]=t):e.globalStatusTime=_.toNumber(moment().format("x"))}),h.query.globalStatusFilter&&_.remove(h.filteredAgents,function(e){return e.globalStatus!==h.query.globalStatusFilter}),h.query.pauseTypeFilter&&_.remove(h.filteredAgents,function(e){return e.pauseType!==h.query.pauseTypeFilter}),h.query.filter&&_.remove(h.filteredAgents,function(e){return e.fullname.toLowerCase().indexOf(h.query.filter.toLowerCase())<0}),h.filteredAgents=(t=h.filteredAgents,n=_.startsWith(h.query.order,"-")?"desc":"asc",_.orderBy(t,[h.query.order.replace("-","")],[n]));var i=(h.query.page-1)*h.query.limit;h.paginatedAgents=_.drop(h.filteredAgents,i).slice(0,h.query.limit);for(var o=0;o<h.paginatedAgents.length;o+=1)h.order.push(h.paginatedAgents[o].id);a.resolve(),h.load=!0}function S(e){return"pause"===e||"*pause"===e}function T(e){return"idle"===e||"unknown"===e||"unavailable"===e||"ringing"===e||_.isNil(e)}function C(e,t){return"voice"===t?"idle"!==e[t+"Status"]?e[t+"Status"]:e[t+"Pause"]?e[t+"Status"]="pause":"idle":e[t+"Pause"]?e[t+"Status"]="pause":e[t+"Status"]}function x(e){var t="unknown";t=_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"pause":_.some([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"*pause":_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],T)?"idle":"busy",e.globalStatus!==t&&(e.globalStatus=t,e.init?(e.init=!1,e.globalStatusTime=S(t)?_.toNumber(moment(e.lastPauseAt).format("x")):_.max([e.voiceStatusTime,e.chatStatusTime,e.mailStatusTime,e.smsStatusTime,e.openchannelStatusTime,e.faxStatusTime])):e.globalStatusTime=_.toNumber(moment().format("x")))}e.$on("$destroy",function(){c.removeAllListeners("user:save"),c.removeAllListeners("user:update"),c.removeAllListeners("user:agentconnect"),c.removeAllListeners("user:agentcomplete"),E&&(v.cancel(E),E=null)})}e.$inject=["$scope","$q","$timeout","$mdDialog","$document","$filter","pauses","agents","rpcAgents","api","socket","toasty","helperClasses","Auth","license","$interval"],angular.module("app.voice").controller("AgentsOpenchannelRealtimeController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r,l,d,c,m){var u=this,p=["loggedIn","available","waiting","talking","pTalking","originated","message","dialActive","dialMethod","Trunk","paused"];function g(){var n=[];return _.forIn(u.queues,function(e,t){e.paused=0,e.loggedInDb=0,u.queues[t].agents={},n.push(l.openchannelQueue.getMembers({id:t}).$promise),u.rpcQueues[t]&&_.merge(e,_.pick(u.rpcQueues[t],p))}),t.all(n).then(function(e){for(var t=0;t<e.length;t+=1)for(var n=0;n<e[t].rows.length;n++)e[t].rows[n].paused&&u.queues[e[t].rows[n].OpenchannelQueueId].paused++,u.queues[e[t].rows[n].OpenchannelQueueId].loggedInDb++,u.queues[e[t].rows[n].OpenchannelQueueId].agents[e[t].rows[n].UserId]=e[t].rows[n].OpenchannelQueueId}).catch(function(e){console.error(e)})}u.count=s.count?s.count:0,u.queues=s?_.keyBy(s.rows?s.rows:[],"id"):{},u.rpcQueues=r?_.keyBy(r.rows?r.rows:[],"id"):{},m.hasRole("admin")?u.query={type:"inbound",sort:"-updatedAt",limit:10,page:1}:u.query={id:m.getCurrentUser().id,channel:"openchannel",type:"inbound",sort:"-updatedAt",limit:10,page:1},u.success=b,u.getQueues=function(){u.query.offset=(u.query.page-1)*u.query.limit,m.hasRole("admin")?u.promise=l.openchannelQueue.get(u.query,b).$promise:u.promise=l.user.getQueues(u.query,b).$promise},u.createOrEditOpenchannelQueue=function(e,t){a.show({controller:"CreateOrEditOpenchannelQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelQueues/create/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{openchannelQueue:t,openchannelQueues:_.values(u.queues),license:null,setting:null}})},u.agentAdd=function(e,t){a.show({controller:"OpenchannelQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/openchannel/views/openchannelQueues/edit/agentadd/agentadd.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{openchannelQueue:t,openchannelQueues:u.queues?u.queues.rows:[],realtime:!1}})},u.updateQueue=function(e){return l.openchannelQueue.update(e).$promise.then(function(){c.success({title:"Queue properly updated!",msg:e.name?e.name+" has been updated!":""})}).catch(function(e){c.error({title:"Error creating queue!",msg:e.message})})},u.onSave=function(e){u.queues[e.id]&&_.merge(u.queues[e.id],_.pick(e,p))},u.onSaveMember=function(e){u.queues[e.OpenchannelQueueId]&&u.queues[e.OpenchannelQueueId].loggedInDb++},u.onRemoveMember=function(e){u.queues[e.OpenchannelQueueId]&&u.queues[e.OpenchannelQueueId].loggedInDb--},u.onPause=function(n){console.log("onPause",n),n.voicePause?_.forIn(u.queues,function(e,t){e.agents[n.id]&&(e.paused+=1,console.log("pause"))}):n.voicePause||_.forIn(u.queues,function(e,t){e.agents[n.id]&&0<e.paused&&(e.paused-=1,console.log("unpause"))})},u.onLogin=function(e){console.log("onLogged",e),u.queues[e.OpenchannelQueueId]&&(u.queues[e.OpenchannelQueueId].loggedInDb+=1,u.queues[e.OpenchannelQueueId].agents[e.UserId]=e.OpenchannelQueueId)},u.onLogout=function(e){console.log("onLogout",e),u.queues[e.OpenchannelQueueId]&&0<u.queues[e.OpenchannelQueueId].loggedInDb&&(u.queues[e.OpenchannelQueueId].loggedInDb-=1,delete u.queues[e.OpenchannelQueueId].agents[e.UserId])},u.$onInit=g,u.order=[],_.forIn(u.queues,function(e,t){u.order.push(e.id)}),d.on("openchannel_queue:save",u.onSave),d.on("userOpenchannelQueue:save",u.onSaveMember),d.on("userOpenchannelQueue:remove",u.onRemoveMember),d.on("user:update",u.onPause),d.on("userVoiceQueue:remove",u.onLogout),d.on("userVoiceQueue:save",u.onLogin);var v=!0,h=1;function b(e){if(u.count=e.count,u.queues=e?_.keyBy(e.rows?e.rows:[],"id"):{},e.rows){u.order=[];for(var t=0;t<e.rows.length;t++)u.order.push(e.rows[t].id)}g()}e.$watch("vm.query.filter",function(e,t){v?n(function(){v=!1}):(t||(h=u.query.page),e!==t&&(u.query.page=1),e||(u.query.page=h),u.getQueues())}),e.$on("$destroy",function(){d.removeAllListeners("openchannel_queue:save"),d.removeAllListeners("userOpenchannelQueue:remove"),d.removeAllListeners("userOpenchannelQueue:save"),d.removeAllListeners("user:update"),d.removeAllListeners("userVoiceQueue:remove"),d.removeAllListeners("userVoiceQueue:save")})}e.$inject=["$scope","$timeout","$mdDialog","$q","$document","$interval","queues","rpcQueues","api","socket","toasty","Auth"],angular.module("app.openchannel").controller("QueuesOpenchannelRealtimeController",e)}(),function(){"use strict";angular.module("app.auth").factory("helperClasses",function(){return{status:{registered:"green-300-fg icon-checkbox-marked-circle",unregistered:"red-300-fg icon-close-circle",lagged:"red-300-fg icon-close-circle",reachable:"green-300-fg icon-checkbox-marked-circle",unreachable:"red-300-fg icon-close-circle",unknown:"grey-fg icon-minus-circle"},state:{unknown:"grey-fg icon-phone-hangup",not_inuse:"green-300-fg icon-phone-hangup",inuse:"red-300-fg icon-phone-in-talk",busy:"red-300-fg icon-phone-locked",invalid:"grey-fg icon-phone-hangup",unavailable:"grey-fg icon-phone-hangup",ringing:"blue-300-fg icon-phone-incoming",ringinuse:"blue-300-fg icon-phone-incoming",onhold:"blue-300-fg icon-phone-paused"},channelStatus:{ring:"blue-300-fg icon-phone-incoming",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"},channelStatusOut:{ring:"blue-300-fg icon-phone-outgoing",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"}}})}(),function(){"use strict";function e(e,n,t){switch(t.disconnect(),t.connect(),this.selectedTab=0,n.current.name){case"app.openchannel.realtime.agents":this.selectedTab=0;break;case"app.openchannel.realtime.queues":this.selectedTab=1;break;default:this.selectedTab=0,n.go("app.openchannel.realtime.agents")}e.$watch("vm.selectedTab",function(e,t){if(e!==t)switch(e){case 0:n.go("app.openchannel.realtime.agents");break;case 1:n.go("app.openchannel.realtime.queues");break;default:n.go("app.openchannel.realtime.agents")}})}e.$inject=["$scope","$state","socket"],angular.module("app.openchannel").controller("OpenchannelRealtimeController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="SETTINGS.EDIT_CUSTOMIZATION",m.customization=angular.copy(s),m.customizations=o,m.newCustomization=!1,m.customization||(m.customization={},m.title="SETTINGS.NEW_CUSTOMIZATION",m.newCustomization=!0),m.addNewCustomization=function(){m.errors=[],r.setting.save(m.customization).$promise.then(function(e){m.customizations.unshift(e.toJSON()),i.success({title:"Customization properly created",msg:m.customization.name?m.customization.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.setting.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.setting.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveCustomization=function(){m.errors=[],r.setting.update({id:m.customization.id},m.customization).$promise.then(function(e){var t=_.find(m.customizations,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Customization properly saved!",msg:m.customization.name?m.customization.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.setting.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.setting.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteCustomization=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The customization will be deleted.").ariaLabel("Delete Customization").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.setting.delete({id:m.customization.id}).$promise.then(function(){_.remove(m.customizations,{id:m.customization.id}),i.success({title:"Customization properly deleted!",msg:(m.customization.name||"customization")+" has been deleted!"}),u(m.customization)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.setting.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.setting.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","customizations","customization","api","Auth","license","setting"],angular.module("app.settings").controller("CreateOrEditCustomizationDialogController",e)}(),function(){"use strict";function e(e,t,n){var a=this;a.customizations=e,a.customization={},a.customizations&&a.customizations.rows&&a.customizations.rows.length&&(a.customization=a.customizations.rows[0]),a.saveCustomization=function(){a.customization.id?t.setting.update({id:a.customization.id},a.customization).$promise.then(function(){n.success({title:"Customization updated!",msg:a.customization.name?a.customization.name+" has been updated!":""})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsetting",msg:e.data?JSON.stringify(e.data):e.toString()})}):t.setting.save(a.customization).$promise.then(function(e){_.merge(a.customization,e),n.success({title:"Customization updated!",msg:a.customization.name?a.customization.name+" has been updated!":""})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsetting",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["customizations","api","toasty"],angular.module("app.settings").controller("CustomizationsController",e)}(),function(){"use strict";function e(e,a){var i=this;i.customization={},i.ngFlowOptions={maxChunkRetries:1,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,allowDuplicateUploads:!0},i.ngFlow={flow:{}},i.dropping=!1,i.fileAdded=function(e){var t=["png","jpg"];if(!_.includes(t,e.getExtension()))return a.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported only: "+t.join()}),!1;if(8388608<e.size)return a.error({title:"File too big",msg:"The max allowed size for image files is 8 Mb"}),!1;var n={id:e.uniqueIdentifier,file:e,type:"uploading"};return i.customization.images.unshift(n),!0},i.upload=function(){i.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+e.get("motion.token")},i.ngFlow.flow.upload()},i.fileSuccess=function(a,e){angular.forEach(i.customization.images,function(t,e){if(t.id===a.uniqueIdentifier){var n=new FileReader;n.readAsDataURL(t.file.file),n.onload=function(e){t.url=e.target.result},t.type="image"}})},i.init=function(e){i.customization=angular.copy(e),i.ngFlowOptions.target="/api/settings/1/logo".replace(":id",i.customization.id),i.customization.images=[]}}e.$inject=["$cookies","toasty"],angular.module("app.settings").controller("CustomizationlogoController",e)}(),function(){"use strict";function e(e,a){var i=this;i.customization={},i.ngFlowOptions={maxChunkRetries:1,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,allowDuplicateUploads:!0},i.ngFlow={flow:{}},i.dropping=!1,i.fileAdded=function(e){var t=["png","jpg"];if(!_.includes(t,e.getExtension()))return a.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported only: "+t.join()}),!1;if(8388608<e.size)return a.error({title:"File too big",msg:"The max allowed size for image files is 8 Mb"}),!1;var n={id:e.uniqueIdentifier,file:e,type:"uploading"};return i.customization.images.unshift(n),!0},i.upload=function(){i.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+e.get("motion.token")},i.ngFlow.flow.upload()},i.fileSuccess=function(a,e){angular.forEach(i.customization.images,function(t,e){if(t.id===a.uniqueIdentifier){var n=new FileReader;n.readAsDataURL(t.file.file),n.onload=function(e){t.url=e.target.result},t.type="image"}})},i.init=function(e){i.customization=angular.copy(e),i.ngFlowOptions.target="/api/settings/1/logo_login".replace(":id",i.customization.id),i.customization.images=[]}}e.$inject=["$cookies","toasty"],angular.module("app.settings").controller("CustomizationlogologinController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="SETTINGS.EDIT_GENERAL",m.general=angular.copy(s),m.generals=o,m.newGeneral=!1,m.general||(m.general={min_internal:1e3,phoneBarAutoUpdater:!0,phoneBarAutoUpdaterUrl:"https://www.xcally.com/bar/phonebar/autoupdater.xml"},m.title="SETTINGS.NEW_GENERAL",m.newGeneral=!0),m.addNewGeneral=function(){m.errors=[],r.setting.save(m.general).$promise.then(function(e){m.generals.unshift(e.toJSON()),i.success({title:"General properly created",msg:m.general.name?m.general.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.setting.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.setting.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveGeneral=function(){m.errors=[],r.setting.update({id:m.general.id},m.general).$promise.then(function(e){var t=_.find(m.generals,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"General properly saved!",msg:m.general.name?m.general.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.setting.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.setting.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteGeneral=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The general will be deleted.").ariaLabel("Delete General").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.setting.delete({id:m.general.id}).$promise.then(function(){_.remove(m.generals,{id:m.general.id}),i.success({title:"General properly deleted!",msg:(m.general.name||"general")+" has been deleted!"}),u(m.general)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.setting.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.setting.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","generals","general","api","Auth","license","setting"],angular.module("app.settings").controller("CreateOrEditGeneralDialogController",e)}(),function(){"use strict";function e(e,t,n){var a=this;a.generals=e,a.general={},a.generals&&a.generals.rows&&a.generals.rows.length&&(a.general=a.generals.rows[0]),a.saveGeneral=function(){a.general.id?t.setting.update({id:a.general.id},a.general).$promise.then(function(){n.success({title:"General updated!",msg:a.general.name?a.general.name+" has been updated!":""})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsetting",msg:e.data?JSON.stringify(e.data):e.toString()})}):t.setting.save(a.general).$promise.then(function(e){_.merge(a.general,e),n.success({title:"General updated!",msg:a.general.name?a.general.name+" has been updated!":""})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsetting",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["generals","api","toasty"],angular.module("app.settings").controller("GeneralsController",e)}(),function(){"use strict";function e(t,n,a,i,o,s){var r=this;r.license=i||{},r.agents=0,r.users=0,r.telephones=0,r.license.gray&&(r.license.deadline=moment(r.license.gray).add(7,"days").format()),r.channels=[{name:"chat",icon:"icon-hangouts"},{name:"mail",icon:"icon-email"},{name:"messaging",icon:"icon-message-text"},{name:"fax",icon:"icon-deskphone"},{name:"openchannel",icon:"icon-google-earth"}],r.modules=[{name:"cm",icon:"icon-account-circle"},{name:"dialer",icon:"icon-crosshairs"},{name:"jscripty",icon:"icon-console"}],r.others=[{name:"callysquare",icon:"icon-sitemap"},{name:"webrtc",icon:"icon-server-plus"},{name:"jaws",icon:"icon-fish"},{name:"custom",icon:"icon-table-edit"},{name:"update",icon:"icon-cloud-download"}],r.requestLicense=function(e){n.show({controller:"RequestLicenseDialogController",controllerAs:"vm",templateUrl:"app/main/apps/settings/views/license/request/dialog.html",parent:angular.element(t.body),targetEvent:e,clickOutsideToClose:!0,locals:{license:i,channels:r.channels,modules:r.modules,others:r.others}})},r.updateLicense=function(e){var t=n.prompt().title("Do you want to update your license manually?").textContent("Enter your license.").targetEvent(e).ok("Ok").cancel("Cancel");n.show(t).then(function(e){if(e)return s.license.update({id:1,license:e}).$promise.then(function(){o.success({title:"License properly updated!",msg:"The license has been updated!"})}).catch(function(e){o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UPDATElicense",msg:e.data?JSON.stringify(e.data):e.toString()})})}).catch(function(e){e&&console.error(e)})},r.gotoProcess=function(e){a.go("app.settings.system",{tab:1})},s.user.get({fields:"id",role:"agent",online:!0}).$promise.then(function(e){return r.agents=e&&e.count?e.count:0,s.user.get({fields:"id",role:"user,admin"}).$promise}).then(function(e){return r.users=e&&e.count?e.count:0,s.user.get({fields:"id",role:"telephone"}).$promise}).then(function(e){r.telephones=e&&e.count?e.count:0}).catch(function(e){console.log(e)})}e.$inject=["$document","$mdDialog","$state","license","toasty","api"],angular.module("app.settings.license").controller("LicenseController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l){var d=this;function c(){e.hide()}d.errors=[],d.user=r.getCurrentUser(),d.license=angular.copy(n),d.channels=a,d.modules=i,d.others=o,d.license.name=d.user.fullname,d.license.email=d.user.email,d.sendRequest=function(){for(var e in d.errors=[],d.table="||FIELD||OLD||NEW||\n",d.license)d.license.hasOwnProperty(e)&&!_.includes(["$promise","$resolved"],e)&&(n[e]===d.license[e]?d.table+="|"+e+"|"+(void 0!==n[e]?n[e]:"")+"|"+d.license[e]+"|\n":d.table+="|"+e+"|{color:red}"+(void 0!==n[e]?n[e]:"")+"{color}|*"+d.license[e]+"*|\n");s.jira.save({key:"MOTLICENSE",summary:"Motion License Request",description:d.table,issuetype:"Task"}).$promise.then(function(e){t.success({title:"Request sent!",msg:l.instant("SETTINGS.LICENSE_REQUEST_SENT"),timeout:15e3}),c()}).catch(function(e){console.error(e),d.errors=[{message:l.instant("SETTINGS.JIRA_ERROR_MESSAGE"),type:"api.jira"}]})},d.closeDialog=c}e.$inject=["$mdDialog","toasty","license","channels","modules","others","api","Auth","$translate"],angular.module("app.settings.license").controller("RequestLicenseDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="SETTINGS.EDIT_NETWORK",m.network=angular.copy(s),m.networks=o,m.newNetwork=!1,m.network||(m.network={type:"localnet"},m.title="SETTINGS.NEW_NETWORK",m.newNetwork=!0),m.addNewNetwork=function(){m.errors=[],r.network.save(m.network).$promise.then(function(e){m.networks.unshift(e.toJSON()),i.success({title:"Network properly created",msg:m.network.name?m.network.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.network.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.network.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveNetwork=function(){m.errors=[],r.network.update({id:m.network.id},m.network).$promise.then(function(e){var t=_.find(m.networks,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Network properly saved!",msg:m.network.name?m.network.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.network.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.network.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteNetwork=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The network will be deleted.").ariaLabel("Delete Network").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.network.delete({id:m.network.id}).$promise.then(function(){_.remove(m.networks,{id:m.network.id}),i.success({title:"Network properly deleted!",msg:(m.network.name||"network")+" has been deleted!"}),u(m.network)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.network.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.network.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","networks","network","api","Auth","license","setting"],angular.module("app.settings").controller("CreateOrEditNetworkDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.networks=r||{count:0,rows:[]},v.table="networks",v.listOrder="",v.listOrderAsc=null,v.selectedNetworks=[],v.query={fields:"createdAt,updatedAt,id,type,value,value,createdAt",sort:"-updatedAt",limit:10,page:1},v.arraytype=_.keyBy([{option:"LocalNET",value:"'localnet'"},{option:"ExternIP",value:"'externip'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editdialog=function(e,t){i.show({controller:"CreateOrEditNetworkDialogController",controllerAs:"vm",templateUrl:"app/main/apps/settings/views/networks/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{network:e,networks:v.networks.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the network?").htmlContent("<b>"+(e.name||"network")+"</b> will be deleted.").ariaLabel("delete network").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getNetworks=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.network.get(v.query,f).$promise},v.createOrEditNetwork=function(e,t){i.show({controller:"CreateOrEditNetworkDialogController",controllerAs:"vm",templateUrl:"app/main/apps/settings/views/networks/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{network:t,networks:v.networks.rows,license:v.license,setting:v.setting}})},v.deleteNetwork=A,v.exportSelectedNetworks=function(){var e=angular.copy(v.selectedNetworks);return v.selectedNetworks=[],e},v.deleteSelectedNetworks=function(e){var t=i.confirm().title("Are you sure want to delete the selected networks?").htmlContent("<b>"+v.selectedNetworks.length+" selected</b> will be deleted.").ariaLabel("delete Networks").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedNetworks.forEach(function(e){A(e)}),v.selectedNetworks=[]})},v.deselectNetworks=function(){v.selectedNetworks=[]},v.selectAllNetworks=function(){v.selectedNetworks=v.networks.rows};var h=!0,b=1;function f(e){v.networks=e||{count:0,rows:[]}}function A(e){l.network.delete({id:e.id}).$promise.then(function(){_.remove(v.networks.rows,{id:e.id}),v.networks.count-=1,v.networks.rows.length||v.getNetworks(),c.success({title:"Network deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEnetwork"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEnetwork",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getNetworks())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","networks","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.settings").controller("NetworksController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="SETTINGS.EDIT_SMTP",m.smtp=angular.copy(s),m.smtps=o,m.newSmtp=!1,m.smtp||(m.smtp={service:!0},m.title="SETTINGS.NEW_SMTP",m.newSmtp=!0),m.addNewSmtp=function(){m.errors=[],r.mailAccount.save(m.smtp).$promise.then(function(e){m.smtps.unshift(e.toJSON()),i.success({title:"Smtp properly created",msg:m.smtp.name?m.smtp.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSmtp=function(){m.errors=[],r.mailAccount.update({id:m.smtp.id},m.smtp).$promise.then(function(e){var t=_.find(m.smtps,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Smtp properly saved!",msg:m.smtp.name?m.smtp.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSmtp=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The smtp will be deleted.").ariaLabel("Delete Smtp").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.mailAccount.delete({id:m.smtp.id}).$promise.then(function(){_.remove(m.smtps,{id:m.smtp.id}),i.success({title:"Smtp properly deleted!",msg:(m.smtp.name||"smtp")+" has been deleted!"}),u(m.smtp)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.mailAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.mailAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","smtps","smtp","api","Auth","license","setting"],angular.module("app.settings").controller("CreateOrEditSmtpDialogController",e)}(),function(){"use strict";function e(e,t,n){var a=this;a.smtps=e,a.smtp={},a.smtps&&a.smtps.rows&&a.smtps.rows.length?a.smtp=a.smtps.rows[0]:a.smtp={service:!0,Smtp:{service:null}},a.saveSmtp=function(){a.smtp.id?t.mailAccount.update({id:a.smtp.id},a.smtp).$promise.then(function(){n.success({title:"Smtp updated!",msg:a.smtp.name?a.smtp.name+" has been updated!":""})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccount",msg:e.data?JSON.stringify(e.data):e.toString()})}):t.mailAccount.save(a.smtp).$promise.then(function(e){_.merge(a.smtp,e),n.success({title:"Smtp updated!",msg:a.smtp.name?a.smtp.name+" has been updated!":""})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})},a.verifySmtp=function(){a.smtp.id&&t.mailAccount.verifySmtp({id:a.smtp.id}).$promise.then(function(){n.success({title:"Smtp verified!",msg:a.smtp.name?a.smtp.name+" has been verified!":""})}).catch(function(e){n.error({title:"Smtp not verified! Remember to save before to verify!",msg:e.data?JSON.stringify(e.data):e.toString(),timeout:1e4})})}}e.$inject=["smtps","api","toasty"],angular.module("app.settings").controller("SmtpController",e)}(),function(){"use strict";function e(e,i,o,t,n,a,s,r){var l,d=this;d.system=n||{},d.processes=a?a.rows:[],d.processLimit=7,d.selectedTab=t.params.tab||0,d.getInfo=function(){return r.system.get().$promise.then(function(e){_.merge(d.system,e)}).catch(d.cancelInterval)},d.getProcesses=function(){return r.pm2.get().$promise.then(function(e){_.merge(d.processes,e?e.rows:[])}).catch(d.cancelInterval)},d.cancelInterval=function(e){i.cancel(l)},d.updateProcess=function(e,t,n){var a=o.confirm().title("Would you like to change the status of the process #"+t+"?").textContent("The status will be changed to: "+n.toUpperCase()).ariaLabel("Lucky day").targetEvent(e).ok("Ok").cancel("Cancel");o.show(a).then(function(){return r.pm2.update({id:t,status:n})}).then(function(){i(d.getProcesses,1e3,1)}).then(function(){s.success({title:"Process updated!",msg:"Status properly changed to: "+n})})},l=i(d.getInfo,5e3),e.$on("$destroy",function(){d.cancelInterval()})}e.$inject=["$scope","$interval","$mdDialog","$state","system","processes","toasty","api"],angular.module("app.settings.system").controller("SystemController",e)}(),function(){"use strict";function e(e,t,n,a,i){var o=this;o.title="SETTINGS.UPDATE",o.progress=0,o.updating=!0,o.output="Waiting...",o.success=!0,o.interval=t(function(){o.progress<90&&(o.progress+=1)},1e3),o.closeDialog=function(){e.hide()},o.reload=function(){n.location.reload()},o.stopInterval=function(){angular.isDefined(o.interval)&&(t.cancel(o.interval),o.interval=void 0);o.progress=100,o.updating=!1},i.version.fetch().$promise.then(function(e){return o.output=e.output+"...",i.version.reset().$promise}).then(function(e){return o.output=e.output+"...",i.version.pull().$promise}).then(function(e){return o.output=e.output+"...",i.version.migrations().$promise}).then(function(e){return o.output=e.output+"...",i.version.restart().$promise}).then(function(e){o.output="Waiting to restart motion...",a(function(){o.stopInterval()},3e4)}).catch(function(e){o.success=!1,o.stopInterval(),o.output=JSON.stringify(e)})}e.$inject=["$mdDialog","$interval","$window","$timeout","api"],angular.module("app.settings").controller("UpdateDialogController",e)}(),function(){"use strict";function e(n,e,a,t,i){this.version=t||{},this.updateConfirm=function(e){var t=n.confirm().title("Would you like to update your system?").htmlContent('The system request time for the update should be below 1 minute.<br><br>Do you agree the terms of this <a href="http://www.xcally.com/support/eula-xcally-license-en.pdf" target="_blank">End User License Agreement<a>?').ariaLabel("").targetEvent(e).clickOutsideToClose(!0).parent(angular.element(a.body)).ok("I agree").cancel("Disagree");n.show(t).then(function(){n.show({controller:"UpdateDialogController",controllerAs:"vm",templateUrl:"app/main/apps/settings/views/updates/update/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!1})})}}e.$inject=["$mdDialog","$interval","$document","version","toasty"],angular.module("app.settings").controller("UpdatesController",e)}(),function(){"use strict";function e(e,s,t,n,a,i,o,r,l,d,c,m,u,p,g,v){var h=this,b=["userpic","online","lastLoginAt","lastPauseAt","pauseType","lastPauseAt","internal","address","chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","chatCapacity","openchannelCapacity","mailCapacity","smsCapacity","faxCapacity","chatCurrentCapacity","openchannelCurrentCapacity","mailCurrentCapacity","smsCurrentCapacity","faxCurrentCapacity","chatStatus","openchannelStatus","mailStatus","smsStatus","faxStatus","voiceStatus","chatStatusTime","openchannelStatusTime","mailStatusTime","smsStatusTime","faxStatusTime","voiceStatusTime","queue","destconnectedlinenum"],f=["chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","online"];for(var A in h.availableStates=["ringing","inuse","busy","onhold","not_inuse"],h.pauses=o||{count:0,rows:[]},h.license=g,h.agents=r?_.keyBy(r.rows?r.rows:[],"id"):{},h.rpcAgents=l?_.keyBy(l.rows?l.rows:[],"id"):{},h.paginatedAgents={},h.load=!1,h.order=[],h.agentInternal={},h.agents)h.agents.hasOwnProperty(A)&&(h.agents[A].init=!0);h.query={limit:10,page:1,order:"fullname",globalStatusFilter:"",pauseTypeFilter:""},h.logout=function(e,t){return d.user.logout({id:e.id}).$promise.then(function(){m.success({title:"Agent logout",msg:e.fullname+"  properly logout"}),h.agents[e.id]&&(h.agents[e.id].online=!1),h.rpcAgents[e.id]&&(h.rpcAgents[e.id].online=!1),y()}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.queueAdd=function(e,t){n.show({controller:"AgentqueueaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/queueadd/queueadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{agent:e,agents:[],channel:"sms",realtime:!0,direction:"inbound"}})},h.pause=function(t,e){return d.user.pause({id:t.id,type:e}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.unPause=function(t){return d.user.unpause({id:t.id}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.showInfo=function(e){n.show(n.alert().clickOutsideToClose(!0).title("Legend").htmlContent("<div>TODO legend status + state</div>").ok("Ok").targetEvent(e))},h.getAgentStatus=C,h.getAgentGlobalStatus=x,h.isPause=S,h.checkPause=function(e){return"pause"===e},h.isPartialPause=function(e){return"*pause"===e},h.onSave=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(_.omit(e,f),b)),_.merge(h.rpcAgents[e.id],_.pick(_.omit(e,f),b)),x(h.agents[e.id]))},h.onUpdate=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(e,b)),_.merge(h.rpcAgents[e.id],_.pick(e,b)),x(h.agents[e.id]))},h.onInit=y,h.onConnect=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(_.merge(h.agents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])),_.merge(h.rpcAgents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])))},h.onComplete=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(h.agents[h.agentInternal[e.destaccountcode]]=_.omit(h.agents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]),h.rpcAgents[h.agentInternal[e.destaccountcode]]=_.omit(h.rpcAgents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]))},c.on("user:save",h.onSave),c.on("user:update",h.onUpdate),c.on("user:agentconnect",h.onConnect),c.on("user:agentcomplete",h.onComplete),y();var E=v(function(){h.load&&(h.load=!1,y())},999);function y(e){h.load=!1;var t,n,a=s.defer();h.promise=a.promise,h.filteredAgents=[],h.order=[],_.forIn(h.agents,function(e,t){h.rpcAgents[t]&&_.merge(e,_.pick(_.omit(h.rpcAgents[t],f),b)),x(e),e.online?(h.filteredAgents.push(e),h.agentInternal[e.internal]=t):e.globalStatusTime=_.toNumber(moment().format("x"))}),h.query.globalStatusFilter&&_.remove(h.filteredAgents,function(e){return e.globalStatus!==h.query.globalStatusFilter}),h.query.pauseTypeFilter&&_.remove(h.filteredAgents,function(e){return e.pauseType!==h.query.pauseTypeFilter}),h.query.filter&&_.remove(h.filteredAgents,function(e){return e.fullname.toLowerCase().indexOf(h.query.filter.toLowerCase())<0}),h.filteredAgents=(t=h.filteredAgents,n=_.startsWith(h.query.order,"-")?"desc":"asc",_.orderBy(t,[h.query.order.replace("-","")],[n]));var i=(h.query.page-1)*h.query.limit;h.paginatedAgents=_.drop(h.filteredAgents,i).slice(0,h.query.limit);for(var o=0;o<h.paginatedAgents.length;o+=1)h.order.push(h.paginatedAgents[o].id);a.resolve(),h.load=!0}function S(e){return"pause"===e||"*pause"===e}function T(e){return"idle"===e||"unknown"===e||"unavailable"===e||"ringing"===e||_.isNil(e)}function C(e,t){return"voice"===t?"idle"!==e[t+"Status"]?e[t+"Status"]:e[t+"Pause"]?e[t+"Status"]="pause":"idle":e[t+"Pause"]?e[t+"Status"]="pause":e[t+"Status"]}function x(e){var t="unknown";t=_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"pause":_.some([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"*pause":_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],T)?"idle":"busy",e.globalStatus!==t&&(e.globalStatus=t,e.init?(e.init=!1,e.globalStatusTime=S(t)?_.toNumber(moment(e.lastPauseAt).format("x")):_.max([e.voiceStatusTime,e.chatStatusTime,e.mailStatusTime,e.smsStatusTime,e.openchannelStatusTime,e.faxStatusTime])):e.globalStatusTime=_.toNumber(moment().format("x")))}e.$on("$destroy",function(){c.removeAllListeners("user:save"),c.removeAllListeners("user:update"),c.removeAllListeners("user:agentconnect"),c.removeAllListeners("user:agentcomplete"),E&&(v.cancel(E),E=null)})}e.$inject=["$scope","$q","$timeout","$mdDialog","$document","$filter","pauses","agents","rpcAgents","api","socket","toasty","helperClasses","Auth","license","$interval"],angular.module("app.voice").controller("AgentsSmsRealtimeController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r,l,d,c,m){var u=this,p=["loggedIn","available","waiting","talking","pTalking","originated","message","dialActive","dialMethod","Trunk","paused"];function g(){var n=[];return _.forIn(u.queues,function(e,t){e.paused=0,e.loggedInDb=0,u.queues[t].agents={},n.push(l.smsQueue.getMembers({id:t}).$promise),u.rpcQueues[t]&&_.merge(e,_.pick(u.rpcQueues[t],p))}),t.all(n).then(function(e){for(var t=0;t<e.length;t+=1)for(var n=0;n<e[t].rows.length;n++)e[t].rows[n].paused&&u.queues[e[t].rows[n].SmsQueueId].paused++,u.queues[e[t].rows[n].SmsQueueId].loggedInDb++,u.queues[e[t].rows[n].SmsQueueId].agents[e[t].rows[n].UserId]=e[t].rows[n].SmsQueueId}).catch(function(e){console.error(e)})}u.count=s.count?s.count:0,u.queues=s?_.keyBy(s.rows?s.rows:[],"id"):{},u.rpcQueues=r?_.keyBy(r.rows?r.rows:[],"id"):{},m.hasRole("admin")?u.query={type:"inbound",sort:"-updatedAt",limit:10,page:1}:u.query={id:m.getCurrentUser().id,channel:"sms",type:"inbound",sort:"-updatedAt",limit:10,page:1},u.success=b,u.getQueues=function(){u.query.offset=(u.query.page-1)*u.query.limit,m.hasRole("admin")?u.promise=l.smsQueue.get(u.query,b).$promise:u.promise=l.user.getQueues(u.query,b).$promise},u.createOrEditSmsQueue=function(e,t){a.show({controller:"CreateOrEditSmsQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsQueues/create/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{smsQueue:t,smsQueues:_.values(u.queues),license:null,setting:null}})},u.agentAdd=function(e,t){a.show({controller:"SmsQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsQueues/edit/agentadd/agentadd.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{smsQueue:t,smsQueues:u.queues?u.queues.rows:[],realtime:!1}})},u.updateQueue=function(e){return l.smsQueue.update(e).$promise.then(function(){c.success({title:"Queue properly updated!",msg:e.name?e.name+" has been updated!":""})}).catch(function(e){c.error({title:"Error creating queue!",msg:e.message})})},u.onSave=function(e){u.queues[e.id]&&_.merge(u.queues[e.id],_.pick(e,p))},u.onSaveMember=function(e){u.queues[e.SmsQueueId]&&u.queues[e.SmsQueueId].loggedInDb++},u.onRemoveMember=function(e){u.queues[e.SmsQueueId]&&u.queues[e.SmsQueueId].loggedInDb--},u.onPause=function(n){console.log("onPause",n),n.voicePause?_.forIn(u.queues,function(e,t){e.agents[n.id]&&(e.paused+=1,console.log("pause"))}):n.voicePause||_.forIn(u.queues,function(e,t){e.agents[n.id]&&0<e.paused&&(e.paused-=1,console.log("unpause"))})},u.onLogin=function(e){console.log("onLogged",e),u.queues[e.SmsQueueId]&&(u.queues[e.SmsQueueId].loggedInDb+=1,u.queues[e.SmsQueueId].agents[e.UserId]=e.SmsQueueId)},u.onLogout=function(e){console.log("onLogout",e),u.queues[e.SmsQueueId]&&0<u.queues[e.SmsQueueId].loggedInDb&&(u.queues[e.SmsQueueId].loggedInDb-=1,delete u.queues[e.SmsQueueId].agents[e.UserId])},u.$onInit=g,u.order=[],_.forIn(u.queues,function(e,t){u.order.push(e.id)}),d.on("sms_queue:save",u.onSave),d.on("userSmsQueue:save",u.onSaveMember),d.on("userSmsQueue:remove",u.onRemoveMember),d.on("user:update",u.onPause),d.on("userVoiceQueue:remove",u.onLogout),d.on("userVoiceQueue:save",u.onLogin);var v=!0,h=1;function b(e){if(u.count=e.count,u.queues=e?_.keyBy(e.rows?e.rows:[],"id"):{},e.rows){u.order=[];for(var t=0;t<e.rows.length;t++)u.order.push(e.rows[t].id)}g()}e.$watch("vm.query.filter",function(e,t){v?n(function(){v=!1}):(t||(h=u.query.page),e!==t&&(u.query.page=1),e||(u.query.page=h),u.getQueues())}),e.$on("$destroy",function(){d.removeAllListeners("sms_queue:save"),d.removeAllListeners("userSmsQueue:remove"),d.removeAllListeners("userSmsQueue:save"),d.removeAllListeners("user:update"),d.removeAllListeners("userVoiceQueue:remove"),d.removeAllListeners("userVoiceQueue:save")})}e.$inject=["$scope","$timeout","$mdDialog","$q","$document","$interval","queues","rpcQueues","api","socket","toasty","Auth"],angular.module("app.sms").controller("QueuesSmsRealtimeController",e)}(),function(){"use strict";angular.module("app.auth").factory("helperClasses",function(){return{status:{registered:"green-300-fg icon-checkbox-marked-circle",unregistered:"red-300-fg icon-close-circle",lagged:"red-300-fg icon-close-circle",reachable:"green-300-fg icon-checkbox-marked-circle",unreachable:"red-300-fg icon-close-circle",unknown:"grey-fg icon-minus-circle"},state:{unknown:"grey-fg icon-phone-hangup",not_inuse:"green-300-fg icon-phone-hangup",inuse:"red-300-fg icon-phone-in-talk",busy:"red-300-fg icon-phone-locked",invalid:"grey-fg icon-phone-hangup",unavailable:"grey-fg icon-phone-hangup",ringing:"blue-300-fg icon-phone-incoming",ringinuse:"blue-300-fg icon-phone-incoming",onhold:"blue-300-fg icon-phone-paused"},channelStatus:{ring:"blue-300-fg icon-phone-incoming",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"},channelStatusOut:{ring:"blue-300-fg icon-phone-outgoing",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"}}})}(),function(){"use strict";function e(e,n,t){switch(t.disconnect(),t.connect(),this.selectedTab=0,n.current.name){case"app.sms.realtime.agents":this.selectedTab=0;break;case"app.sms.realtime.queues":this.selectedTab=1;break;default:this.selectedTab=0,n.go("app.sms.realtime.agents")}e.$watch("vm.selectedTab",function(e,t){if(e!==t)switch(e){case 0:n.go("app.sms.realtime.agents");break;case 1:n.go("app.sms.realtime.queues");break;default:n.go("app.sms.realtime.agents")}})}e.$inject=["$scope","$state","socket"],angular.module("app.sms").controller("SmsRealtimeController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="SMS.EDIT_SMSACCOUNT",m.smsAccount=angular.copy(s),m.smsAccounts=o,m.newSmsAccount=!1,m.smsAccount||(m.smsAccount={remote:n.protocol()+"://"+n.host()+(n.port()?":"+n.port():""),type:"twilio",waitForTheAssignedAgent:10,notificationSound:!0},m.title="SMS.NEW_SMSACCOUNT",m.newSmsAccount=!0),t.params.id&&(m.smsAccount.SmsAccountId=t.params.id),m.addNewSmsAccount=function(){m.errors=[],r.smsAccount.save(m.smsAccount).$promise.then(function(e){m.smsAccounts.unshift(e.toJSON()),i.success({title:"SmsAccount properly created",msg:m.smsAccount.name?m.smsAccount.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.smsAccount.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.smsAccount.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSmsAccount=function(){m.errors=[],r.smsAccount.update({id:m.smsAccount.id},m.smsAccount).$promise.then(function(e){var t=_.find(m.smsAccounts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"SmsAccount properly saved!",msg:m.smsAccount.name?m.smsAccount.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.smsAccount.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.smsAccount.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSmsAccount=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The smsAccount will be deleted.").ariaLabel("Delete SmsAccount").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.smsAccount.delete({id:m.smsAccount.id}).$promise.then(function(){_.remove(m.smsAccounts,{id:m.smsAccount.id}),i.success({title:"SmsAccount properly deleted!",msg:(m.smsAccount.name||"smsAccount")+" has been deleted!"}),u(m.smsAccount)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.smsAccount.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.smsAccount.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.lists=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","smsAccounts","smsAccount","api","Auth","license","setting"],angular.module("app.sms").controller("CreateOrEditSmsAccountDialogController",e)}(),function(){"use strict";function e(s,i,a,o,e){var r=this;function t(e,t){if(r.smsAccountApps.rows.length){var n=r.smsAccountApps.rows[t]?r.smsAccountApps.rows[t]:r.smsAccountApps.rows[0];i.show({controller:"EditSmsAccountApp"+(n.appType||n.app).toLowerCase()+"DialogController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsAccounts/edit/apps/"+(n.appType||n.app).toLowerCase()+"/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{smsAccountApp:n,smsAccount:r.smsAccount}}).then(function(e){e&&(e.id?r.smsAccountApps.rows[t]=e:r.smsAccountApps.rows.splice(t,0,e),l())}).catch(function(e){e&&o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:EDITMODALSHOW",msg:e.data?JSON.stringify(e.data):e.toString()})})}}function l(){for(var e=1,t=[],n=0;n<r.smsAccountApps.rows.length;n++,0){var a=r.smsAccountApps.rows[n],i=[],o=[];a.intervals="*,*,*,*"!==a.interval?[a.interval]:a.IntervalId?_.map(_.filter(r.intervals.rows,{IntervalId:a.IntervalId}),"interval"):[],a.context=r.smsAccount.context,a.exten=r.smsAccount.exten,a.type&&(a.type=a.type.toLowerCase()),a.priority=i.length?_.last(i).priority+1:e,e=(o.length?_.last(o).priority:a.priority)+1,t=_.concat(t,i,[a],o)}s.smsAccount.addApplications({id:r.smsAccount.id},_.sortBy(t,"priority")).$promise.then(function(e){r.smsAccountApps.rows=e.rows}).catch(function(e){console.error(e)})}function n(e){r.smsAccountApps=e||{count:0,rows:[]}}r.currentUser=e.getCurrentUser(),r.smsAccount={},r.smsAccountApps={count:0,rows:[]},r.selectedSmsAccountApps=[],r.query={sort:"priority"},r.apps=_.reject(_.sortBy([{app:"Interval",appType:"interval",types:["always","custom","list"],fields:[],isApp:!1},{app:"noop",appType:"noop",type:"noop",icon:"icon-apps",interval:"*,*,*,*",required:!0,isApp:!0,fields:[{title:"Value",name:"value",type:"text",param:0}]},{app:"system",appType:"system",type:"system",icon:"icon-apps",interval:"*,*,*,*",required:!0,isApp:!0,extraApi:[{name:"variables",route:"variable",filters:{fields:"id,name",sort:"name",nolimit:!0}}],fields:[{title:"Command",name:"command",type:"text",required:!0,param:0},{title:"Variable",name:"variable",type:"apiselect",values:"variables",value:"variable.name",option:"variable.name",defaultValues:[{value:"''",option:"None"}],defaultValue:"''",param:1}]},{app:"gotop",appType:"gotop",type:"goto",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Priority",name:"priority",type:"number",required:!0,min:0,param:0}]},{app:"gotoif",appType:"gotoif",type:"gotoif",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Condition",name:"condition",type:"text",required:!0,param:0},{title:"truepriority",name:"truepriority",type:"number",min:1,required:!0,param:1},{title:"falsepriority",name:"falsepriority",type:"number",min:1,required:!0,param:2}]},{app:"queue",appType:"queue",foreignKey:"SmsQueueId",type:"queue",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"queues",route:"smsQueue",filters:{fields:"id,name,type",sort:"name",nolimit:!0}}],fields:[{title:"Queue",name:"queue",type:"apiselect",values:"queues",value:"queue.name",option:"queue.name",defaultValue:300,required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",max:2147483,min:0,required:!0,defaultValue:300,param:1}]},{app:"agent",appType:"agent",type:"agent",foreignKey:"UserId",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"agents",route:"user",filters:{fields:"id,name",sort:"name",nolimit:!0,role:"agent"}}],fields:[{title:"Agent",name:"agent",type:"apiselect",values:"agents",value:"agent.name",option:"agent.name",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",max:2147483,min:0,required:!0,defaultValue:30,param:1}]},{app:"autoreply",appType:"autoreply",type:"autoreply",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"times",name:"times",type:"select",defaultValue:"1",values:[{option:"One Time",value:"1"},{option:"Always",value:"0"}],required:!0,param:0},{title:"Text",name:"text",type:"textarea",maxlength:255,required:!0,param:1}]},{app:"close",appType:"close",type:"close",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Disposition",name:"disposition",type:"text",required:!0,param:0}]}],["app"]),{isApp:!1}),r.list={group:{name:"opt1",pull:"clone"},animation:100,sort:!1},r.applications={group:{name:"opt2",put:"opt1"},animation:100,onAdd:function(e){t(e,e.newIndex)},onSort:function(e){l()}},r.init=function(e){r.smsAccount=e,r.query.id=e.id,r.query.isApp=!0,r.query.nolimit=!0,r.getSmsAccountApps(),r.getIntervals()},r.deleteConfirm=function(e,t,n){var a=i.confirm().title("Are you sure want to delete the application?").htmlContent("<b>"+e.app+"</b> will be deleted.").ariaLabel("delete application").targetEvent(n).ok("OK").cancel("CANCEL");i.show(a).then(function(){r.smsAccountApps.rows.splice(t,1),l()},function(){console.log("CANCEL")})},r.getSmsAccountApps=function(){r.promise=s.smsAccount.getApplications(r.query,n).$promise},r.editSmsAccountApp=t,r.editInterval=function(e,t){if(r.smsAccountApps.rows.length){var n=r.smsAccountApps.rows[t]?r.smsAccountApps.rows[t]:r.smsAccountApps.rows[0];i.show({controller:"EditSmsAccountAppintervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsAccounts/edit/apps/interval/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:{interval:n.interval,IntervalId:n.IntervalId,application:!0},intervals:[]}}).then(function(e){e&&(n.interval=e.interval||"*,*,*,*",n.IntervalId=e.IntervalId||null,l())})}},r.deleteSmsAccountApp=function(e){_.remove(r.smsAccountApps.rows,{id:e.id}),l(),o.success({title:"App deleted!",msg:e.app?e.app+" has been deleted!":""})},r.deleteSelectedSmsAccountApps=function(e){var t=i.confirm().title("Are you sure want to delete the selected applications?").htmlContent("<b>"+r.selectedSmsAccountApps.length+" selected</b> will be deleted.").ariaLabel("delete applications").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){r.selectedSmsAccountApps.forEach(function(e){_.remove(r.smsAccountApps.rows,{id:e.id})}),r.selectedSmsAccountApps=[],l()})},r.rewriteRouting=l,r.getIntervals=function(){return s.interval.get({fields:"id,interval,IntervalId"}).$promise.then(function(e){r.intervals=e}).catch(function(e){console.error(e)})}}e.$inject=["api","$mdDialog","$document","toasty","Auth"],angular.module("app.sms").controller("SmsAccountActionsController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="SMS.EDIT_"+(e.appType||e.app).toUpperCase(),o.agent=angular.copy(e),o.agent.appdata)switch(o.agent.appType?o.agent.appType.toLowerCase():o.agent.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.agent.appdata.split(",");o.agent.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.agent.text=s.slice(1,s.length).join(",");break;case"message":o.agent.text=o.agent.appdata;break;case"set":o.agent.name=o.agent.appdata.split("=")[0],o.agent.value=o.agent.appdata.split("=")[1];break;case"agi":o.agent.project=o.agent.appdata;break;default:var r=o.agent.appdata.split(",");o.agent.agent=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.agent.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.agent.timeout=30;function l(e){t.hide(e)}o.agent.type&&"outbound"===o.agent.type.toLowerCase()&&"outbounddial"===o.agent.appType.toLowerCase()&&(o.agent.prefix=o.agent.phone?o.agent.phone.split("$")[0]:void 0,o.agent.callerId=o.agent.callerID?"CALLERID(all)="+o.agent.callerID:void 0),o.saveSmsAccountApp=function(){o.errors=[];var e=[];o.agent.type&&"outbound"===o.agent.type.toLowerCase()&&"outboundDial"===o.agent.appType&&(o.agent.phone=a.cutdigits?(o.agent.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.agent.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.agent.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.agent.options+="U(xcally-mixmonitor-context)"):o.agent.options=o.agent.options.replace("U(xcally-mixmonitor-context)",""));var t=_.find(o.agents,{name:o.agent.agent});t&&(o.agent.UserId=t.id);if(o.agent.appType&&"custom"===o.agent.appType);else switch((o.agent.app||o.agent.appType).toLowerCase()){case"set":o.agent.appdata=o.agent.name+"="+o.agent.value;break;case"custom":break;default:e[0]=o.agent.agent,e[1]=o.agent.timeout,o.agent.appdata=e.join(",")}l(o.agent)},o.closeDialog=l,i.user.get({fields:"id,name",sort:"name",nolimit:"true",role:"agent"}).$promise.then(function(e){o.agents=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETagents",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","smsAccountApp","smsAccount","api"],angular.module("app.sms").controller("EditSmsAccountAppagentDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="SMS.EDIT_"+(n.appType||n.app).toUpperCase(),o.autoreply=angular.copy(n),o.autoreply.appdata)switch(o.autoreply.appType?o.autoreply.appType.toLowerCase():o.autoreply.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.autoreply.appdata.split(",");o.autoreply.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.autoreply.text=s.slice(1,s.length).join(",");break;case"message":o.autoreply.text=o.autoreply.appdata;break;case"set":o.autoreply.name=o.autoreply.appdata.split("=")[0],o.autoreply.value=o.autoreply.appdata.split("=")[1];break;case"agi":o.autoreply.project=o.autoreply.appdata;break;default:var r=o.autoreply.appdata.split(",");o.autoreply.times=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.autoreply.text=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.autoreply.times=1;function l(e){t.hide(e)}o.autoreply.type&&"outbound"===o.autoreply.type.toLowerCase()&&"outbounddial"===o.autoreply.appType.toLowerCase()&&(o.autoreply.prefix=o.autoreply.phone?o.autoreply.phone.split("$")[0]:void 0,o.autoreply.callerId=o.autoreply.callerID?"CALLERID(all)="+o.autoreply.callerID:void 0),o.saveSmsAccountApp=function(){o.errors=[];var e=[];o.autoreply.type&&"outbound"===o.autoreply.type.toLowerCase()&&"outboundDial"===o.autoreply.appType&&(o.autoreply.phone=a.cutdigits?(o.autoreply.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.autoreply.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.autoreply.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.autoreply.options+="U(xcally-mixmonitor-context)"):o.autoreply.options=o.autoreply.options.replace("U(xcally-mixmonitor-context)",""));if(o.autoreply.appType&&"custom"===o.autoreply.appType);else switch((o.autoreply.app||o.autoreply.appType).toLowerCase()){case"set":o.autoreply.appdata=o.autoreply.name+"="+o.autoreply.value;break;case"custom":break;default:e[0]=o.autoreply.times,e[1]=o.autoreply.text,o.autoreply.appdata=e.join(",")}l(o.autoreply)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","smsAccountApp","smsAccount","api"],angular.module("app.sms").controller("EditSmsAccountAppautoreplyDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="SMS.EDIT_"+(n.appType||n.app).toUpperCase(),o.close=angular.copy(n),o.close.appdata)switch(o.close.appType?o.close.appType.toLowerCase():o.close.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.close.appdata.split(",");o.close.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.close.text=s.slice(1,s.length).join(",");break;case"message":o.close.text=o.close.appdata;break;case"set":o.close.name=o.close.appdata.split("=")[0],o.close.value=o.close.appdata.split("=")[1];break;case"agi":o.close.project=o.close.appdata;break;default:var r=o.close.appdata.split(",");o.close.disposition=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.close.type&&"outbound"===o.close.type.toLowerCase()&&"outbounddial"===o.close.appType.toLowerCase()&&(o.close.prefix=o.close.phone?o.close.phone.split("$")[0]:void 0,o.close.callerId=o.close.callerID?"CALLERID(all)="+o.close.callerID:void 0),o.saveSmsAccountApp=function(){o.errors=[];var e=[];o.close.type&&"outbound"===o.close.type.toLowerCase()&&"outboundDial"===o.close.appType&&(o.close.phone=a.cutdigits?(o.close.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.close.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.close.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.close.options+="U(xcally-mixmonitor-context)"):o.close.options=o.close.options.replace("U(xcally-mixmonitor-context)",""));if(o.close.appType&&"custom"===o.close.appType);else switch((o.close.app||o.close.appType).toLowerCase()){case"set":o.close.appdata=o.close.name+"="+o.close.value;break;case"custom":break;default:e[0]=o.close.disposition,o.close.appdata=e.join(",")}l(o.close)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","smsAccountApp","smsAccount","api"],angular.module("app.sms").controller("EditSmsAccountAppcloseDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="SMS.EDIT_"+(n.appType||n.app).toUpperCase(),o.gotoif=angular.copy(n),o.gotoif.appdata)switch(o.gotoif.appType?o.gotoif.appType.toLowerCase():o.gotoif.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.gotoif.appdata.split(",");o.gotoif.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.gotoif.text=s.slice(1,s.length).join(",");break;case"message":o.gotoif.text=o.gotoif.appdata;break;case"set":o.gotoif.name=o.gotoif.appdata.split("=")[0],o.gotoif.value=o.gotoif.appdata.split("=")[1];break;case"agi":o.gotoif.project=o.gotoif.appdata;break;default:var r=o.gotoif.appdata.split(",");o.gotoif.condition=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.gotoif.truepriority=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.gotoif.falsepriority=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10)}function l(e){t.hide(e)}o.gotoif.type&&"outbound"===o.gotoif.type.toLowerCase()&&"outbounddial"===o.gotoif.appType.toLowerCase()&&(o.gotoif.prefix=o.gotoif.phone?o.gotoif.phone.split("$")[0]:void 0,o.gotoif.callerId=o.gotoif.callerID?"CALLERID(all)="+o.gotoif.callerID:void 0),o.saveSmsAccountApp=function(){o.errors=[];var e=[];o.gotoif.type&&"outbound"===o.gotoif.type.toLowerCase()&&"outboundDial"===o.gotoif.appType&&(o.gotoif.phone=a.cutdigits?(o.gotoif.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.gotoif.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.gotoif.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.gotoif.options+="U(xcally-mixmonitor-context)"):o.gotoif.options=o.gotoif.options.replace("U(xcally-mixmonitor-context)",""));if(o.gotoif.appType&&"custom"===o.gotoif.appType);else switch((o.gotoif.app||o.gotoif.appType).toLowerCase()){case"set":o.gotoif.appdata=o.gotoif.name+"="+o.gotoif.value;break;case"custom":break;default:e[0]=o.gotoif.condition,e[1]=o.gotoif.truepriority,e[2]=o.gotoif.falsepriority,o.gotoif.appdata=e.join(",")}l(o.gotoif)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","smsAccountApp","smsAccount","api"],angular.module("app.sms").controller("EditSmsAccountAppgotoifDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="SMS.EDIT_"+(n.appType||n.app).toUpperCase(),o.gotop=angular.copy(n),o.gotop.appdata)switch(o.gotop.appType?o.gotop.appType.toLowerCase():o.gotop.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.gotop.appdata.split(",");o.gotop.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.gotop.text=s.slice(1,s.length).join(",");break;case"message":o.gotop.text=o.gotop.appdata;break;case"set":o.gotop.name=o.gotop.appdata.split("=")[0],o.gotop.value=o.gotop.appdata.split("=")[1];break;case"agi":o.gotop.project=o.gotop.appdata;break;default:var r=o.gotop.appdata.split(",");o.gotop.priority=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.gotop.type&&"outbound"===o.gotop.type.toLowerCase()&&"outbounddial"===o.gotop.appType.toLowerCase()&&(o.gotop.prefix=o.gotop.phone?o.gotop.phone.split("$")[0]:void 0,o.gotop.callerId=o.gotop.callerID?"CALLERID(all)="+o.gotop.callerID:void 0),o.saveSmsAccountApp=function(){o.errors=[];var e=[];o.gotop.type&&"outbound"===o.gotop.type.toLowerCase()&&"outboundDial"===o.gotop.appType&&(o.gotop.phone=a.cutdigits?(o.gotop.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.gotop.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.gotop.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.gotop.options+="U(xcally-mixmonitor-context)"):o.gotop.options=o.gotop.options.replace("U(xcally-mixmonitor-context)",""));if(o.gotop.appType&&"custom"===o.gotop.appType);else switch((o.gotop.app||o.gotop.appType).toLowerCase()){case"set":o.gotop.appdata=o.gotop.name+"="+o.gotop.value;break;case"custom":break;default:e[0]=o.gotop.priority,o.gotop.appdata=e.join(",")}l(o.gotop)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","smsAccountApp","smsAccount","api"],angular.module("app.sms").controller("EditSmsAccountAppgotopDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;if(l.errors=[],l.title="TOOLS.EDIT_INTERVAL",l.interval=angular.copy(i),l.intervals=o,l.newInterval=!1,l.types=["always","custom","list"],l.daysOfWeek=a.getDaysOfWeek(),l.monthNumber=a.getMonthNumber(),l.monthName=a.getMonthName(),l.daysOfMonth=a.getDaysOfMonth(),l.interval)if("*,*,*,*"!==l.interval.interval){l.type="custom";var d=l.interval.interval.split(","),c=d[0],m=d[1],u=d[2],p=d[3];if("*"!==c){var g,v=c.split("-")[0],h=c.split("-")[1];(g=new Date).setHours(Number(v.split(":")[0])),g.setMinutes(Number(v.split(":")[1])),l.timeRangeFrom=g,(g=new Date).setHours(Number(h.split(":")[0])),g.setMinutes(Number(h.split(":")[1])),l.timeRangeTo=g}"*"!==m&&(l.dayOfWeekFrom=m.split("-")[0],l.dayOfWeekTo=m.split("-")[1]),"*"!==u&&(l.monthDayFrom=u.split("-")[0],l.monthDayTo=u.split("-")[1]),"*"!==p&&(l.monthFrom=p.split("-")[0],l.monthTo=p.split("-")[1])}else l.type="always";else l.interval={interval:"*,*,*,*"},l.type="always",l.title="TOOLS.NEW_INTERVAL",l.newInterval=!0;function b(){switch(l.type){case"always":case"list":return"*,*,*,*";case"custom":var e=[];if("*"!==l.timeRangeFrom&&l.timeRangeFrom&&l.timeRangeTo){var t=(l.timeRangeFrom.getHours()<10?"0":"")+l.timeRangeFrom.getHours()+":"+(l.timeRangeFrom.getMinutes()<10?"0":"")+l.timeRangeFrom.getMinutes(),n=(l.timeRangeTo.getHours()<10?"0":"")+l.timeRangeTo.getHours()+":"+(l.timeRangeTo.getMinutes()<10?"0":"")+l.timeRangeTo.getMinutes();e.push(t+"-"+n)}else e.push("*");return l.dayOfWeekFrom?l.dayOfWeekTo?e.push(l.dayOfWeekFrom+"-"+l.dayOfWeekTo):e.push(l.dayOfWeekFrom):e.push("*"),l.monthDayFrom?l.monthDayTo?e.push(l.monthDayFrom+"-"+l.monthDayTo):e.push(l.monthDayFrom):e.push("*"),l.monthFrom?l.monthTo?e.push(l.monthFrom+"-"+l.monthTo):e.push(l.monthFrom):e.push("*"),e.join()}}function f(e){t.hide(e)}e.params.id&&!l.interval.application&&(l.interval.IntervalId=e.params.id),l.interval.IntervalId&&l.interval.application&&(l.type="list"),l.addNewInterval=function(){l.errors=[],l.interval.interval=b(),r.interval.save(l.interval).$promise.then(function(e){l.intervals.push(e),s.success({title:"Interval properly created",msg:l.interval.name?l.interval.name+" has been created!":""}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}]})},l.saveInterval=function(){l.errors=[],l.interval.interval=b(),l.interval.application?("list"!==l.type&&(l.interval.IntervalId=null),f(l.interval)):r.interval.update({id:l.interval.id},l.interval).$promise.then(function(e){var t=_.find(l.intervals,{id:e.id});t&&_.merge(t,e),s.success({title:"Interval properly saved!",msg:"Interval has been saved!"}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}]})},l.closeDialog=f,l.interval.application&&r.interval.get({fields:"id,name,interval,IntervalId",IntervalId:"null",nolimit:!0}).$promise.then(function(e){l.intervals=e}).catch(function(e){console.error(e)})}e.$inject=["$state","$mdDialog","$mdToast","IndexFactory","interval","intervals","toasty","api"],angular.module("app.voice").controller("EditSmsAccountAppintervalDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="SMS.EDIT_"+(n.appType||n.app).toUpperCase(),o.noop=angular.copy(n),o.noop.appdata)switch(o.noop.appType?o.noop.appType.toLowerCase():o.noop.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.noop.appdata.split(",");o.noop.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.noop.text=s.slice(1,s.length).join(",");break;case"message":o.noop.text=o.noop.appdata;break;case"set":o.noop.name=o.noop.appdata.split("=")[0],o.noop.value=o.noop.appdata.split("=")[1];break;case"agi":o.noop.project=o.noop.appdata;break;default:var r=o.noop.appdata.split(",");o.noop.value=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.noop.type&&"outbound"===o.noop.type.toLowerCase()&&"outbounddial"===o.noop.appType.toLowerCase()&&(o.noop.prefix=o.noop.phone?o.noop.phone.split("$")[0]:void 0,o.noop.callerId=o.noop.callerID?"CALLERID(all)="+o.noop.callerID:void 0),o.saveSmsAccountApp=function(){o.errors=[];var e=[];o.noop.type&&"outbound"===o.noop.type.toLowerCase()&&"outboundDial"===o.noop.appType&&(o.noop.phone=a.cutdigits?(o.noop.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.noop.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.noop.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.noop.options+="U(xcally-mixmonitor-context)"):o.noop.options=o.noop.options.replace("U(xcally-mixmonitor-context)",""));if(o.noop.appType&&"custom"===o.noop.appType);else switch((o.noop.app||o.noop.appType).toLowerCase()){case"set":o.noop.appdata=o.noop.name+"="+o.noop.value;break;case"custom":break;default:e[0]=o.noop.value,o.noop.appdata=e.join(",")}l(o.noop)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","smsAccountApp","smsAccount","api"],angular.module("app.sms").controller("EditSmsAccountAppnoopDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="SMS.EDIT_"+(e.appType||e.app).toUpperCase(),o.queue=angular.copy(e),o.queue.appdata)switch(o.queue.appType?o.queue.appType.toLowerCase():o.queue.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.queue.appdata.split(",");o.queue.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.queue.text=s.slice(1,s.length).join(",");break;case"message":o.queue.text=o.queue.appdata;break;case"set":o.queue.name=o.queue.appdata.split("=")[0],o.queue.value=o.queue.appdata.split("=")[1];break;case"agi":o.queue.project=o.queue.appdata;break;default:var r=o.queue.appdata.split(",");o.queue.queue=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.queue.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.queue.queue=300,o.queue.timeout=300;function l(e){t.hide(e)}o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outbounddial"===o.queue.appType.toLowerCase()&&(o.queue.prefix=o.queue.phone?o.queue.phone.split("$")[0]:void 0,o.queue.callerId=o.queue.callerID?"CALLERID(all)="+o.queue.callerID:void 0),o.saveSmsAccountApp=function(){o.errors=[];var e=[];o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outboundDial"===o.queue.appType&&(o.queue.phone=a.cutdigits?(o.queue.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.queue.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.queue.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.queue.options+="U(xcally-mixmonitor-context)"):o.queue.options=o.queue.options.replace("U(xcally-mixmonitor-context)",""));var t=_.find(o.queues,{name:o.queue.queue});t&&(o.queue[_.capitalize("sms")+"QueueId"]=t.id);if(o.queue.appType&&"custom"===o.queue.appType);else switch((o.queue.app||o.queue.appType).toLowerCase()){case"set":o.queue.appdata=o.queue.name+"="+o.queue.value;break;case"custom":break;default:e[0]=o.queue.queue,e[1]=o.queue.timeout,o.queue.appdata=e.join(",")}l(o.queue)},o.closeDialog=l,i.smsQueue.get({fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){o.queues=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","smsAccountApp","smsAccount","api"],angular.module("app.sms").controller("EditSmsAccountAppqueueDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="SMS.EDIT_"+(e.appType||e.app).toUpperCase(),o.system=angular.copy(e),o.system.appdata)switch(o.system.appType?o.system.appType.toLowerCase():o.system.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.system.appdata.split(",");o.system.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.system.text=s.slice(1,s.length).join(",");break;case"message":o.system.text=o.system.appdata;break;case"set":o.system.name=o.system.appdata.split("=")[0],o.system.value=o.system.appdata.split("=")[1];break;case"agi":o.system.project=o.system.appdata;break;default:var r=o.system.appdata.split(",");o.system.command=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.system.variable=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}else o.system.variable="";function l(e){t.hide(e)}o.system.type&&"outbound"===o.system.type.toLowerCase()&&"outbounddial"===o.system.appType.toLowerCase()&&(o.system.prefix=o.system.phone?o.system.phone.split("$")[0]:void 0,o.system.callerId=o.system.callerID?"CALLERID(all)="+o.system.callerID:void 0),o.saveSmsAccountApp=function(){o.errors=[];var e=[];o.system.type&&"outbound"===o.system.type.toLowerCase()&&"outboundDial"===o.system.appType&&(o.system.phone=a.cutdigits?(o.system.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.system.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.system.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.system.options+="U(xcally-mixmonitor-context)"):o.system.options=o.system.options.replace("U(xcally-mixmonitor-context)",""));if(o.system.appType&&"custom"===o.system.appType);else switch((o.system.app||o.system.appType).toLowerCase()){case"set":o.system.appdata=o.system.name+"="+o.system.value;break;case"custom":break;default:e[0]=o.system.command,e[1]=o.system.variable,o.system.appdata=e.join(",")}l(o.system)},o.closeDialog=l,i.variable.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){o.variables=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvariables",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","smsAccountApp","smsAccount","api"],angular.module("app.sms").controller("EditSmsAccountAppsystemDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.smsAccount={},c.smsAccountInteractions={count:0,rows:[]},c.selectedSmsAccountInteractions=[],c.query={fields:"createdAt,updatedAt,id,createdAt,Contact.firstName,Owner.name,closedAt,disposition,note,UserId,ContactId,SmsAccountId,tag",sort:"-createdAt",includeAll:"true",limit:10,page:1},c.init=function(e){c.smsAccount=e,c.query.id=c.smsAccount.id,c.getSmsAccountInteractions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the interaction?").htmlContent("<b>"+(e.name||"interaction")+"</b> will be deleted.").ariaLabel("delete interaction").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getSmsAccountInteractions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.smsAccount.getInteractions(c.query,p).$promise},c.createOrEditSmsAccountInteraction=function(e,t){o.show({controller:"CreateOrEditInteractionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsAccounts/edit/interactions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{smsAccount:c.smsAccount,interaction:t,interactions:c.smsAccountInteractions.rows,license:null,setting:null}})},c.spysmsInteraction=function(e,n){o.show({controller:"AgentGeneralInteractionController",controllerAs:"vm",templateUrl:"app/main/apps/dashboards/views/general/agent/interaction/agent.general.interaction.dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,onShowing:function(e,t){e.vm.init({id:1,channel:"sms",interaction:n,spy:!0})}})},c.exportSelectedSmsAccountInteractions=function(){var e=angular.copy(c.selectedSmsAccountInteractions);return c.selectedSmsAccountInteractions=[],e},c.deleteSmsAccountInteraction=g,c.deleteSelectedSmsAccountInteractions=function(e){var t=o.confirm().title("Are you sure want to delete the selected interactions?").htmlContent("<b>"+c.selectedSmsAccountInteractions.length+" selected</b> will be deleted.").ariaLabel("delete interactions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedSmsAccountInteractions.forEach(function(e){g(e)}),c.selectedSmsAccountInteractions=[]})};var m=!0,u=1;function p(e){c.smsAccountInteractions=e||{count:0,rows:[]}}function g(e){l.smsInteraction.delete({id:e.id}).$promise.then(function(){_.remove(c.smsAccountInteractions.rows,{id:e.id}),c.smsAccountInteractions.count-=1,c.smsAccountInteractions.rows.length||c.getSmsAccountInteractions(),r.success({title:"Interaction deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETsmsAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsmsAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getSmsAccountInteractions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.sms").controller("SmsAccountInteractionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.smsAccount={},c.smsAccountSmsCannedAnswers={count:0,rows:[]},c.selectedSmsAccountSmsCannedAnswers=[],c.query={fields:"createdAt,updatedAt,id,key,value,description,createdAt",limit:10,page:1},c.init=function(e){c.smsAccount=e,c.query.id=c.smsAccount.id,c.query.SmsAccountId=c.smsAccount.id,c.getSmsAccountSmsCannedAnswers()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the smsCannedAnswer?").htmlContent("<b>"+(e.name||"smsCannedAnswer")+"</b> will be deleted.").ariaLabel("delete smsCannedAnswer").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getSmsAccountSmsCannedAnswers=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.smsAccount.getAnswers(c.query,p).$promise},c.createOrEditSmsAccountSmsCannedAnswer=function(e,t){o.show({controller:"CreateOrEditSmsCannedAnswerDialogController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsAccounts/edit/smsCannedAnswers/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{smsAccount:c.smsAccount,smsCannedAnswer:t,smsCannedAnswers:c.smsAccountSmsCannedAnswers.rows,license:null,setting:null}})},c.exportSelectedSmsAccountSmsCannedAnswers=function(){var e=angular.copy(c.selectedSmsAccountSmsCannedAnswers);return c.selectedSmsAccountSmsCannedAnswers=[],e},c.deleteSmsAccountSmsCannedAnswer=g,c.deleteSelectedSmsAccountSmsCannedAnswers=function(e){var t=o.confirm().title("Are you sure want to delete the selected smsCannedAnswers?").htmlContent("<b>"+c.selectedSmsAccountSmsCannedAnswers.length+" selected</b> will be deleted.").ariaLabel("delete smsCannedAnswers").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedSmsAccountSmsCannedAnswers.forEach(function(e){g(e)}),c.selectedSmsAccountSmsCannedAnswers=[]})};var m=!0,u=1;function p(e){c.smsAccountSmsCannedAnswers=e||{count:0,rows:[]}}function g(e){l.cannedAnswer.delete({id:e.id}).$promise.then(function(){_.remove(c.smsAccountSmsCannedAnswers.rows,{id:e.id}),c.smsAccountSmsCannedAnswers.count-=1,c.smsAccountSmsCannedAnswers.rows.length||c.getSmsAccountSmsCannedAnswers(),r.success({title:"SmsCannedAnswer deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETsmsAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsmsAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getSmsAccountSmsCannedAnswers())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.sms").controller("SmsAccountSmsCannedAnswersController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="SMS.EDIT_SMSCANNEDANSWER",m.smsCannedAnswer=angular.copy(s),m.smsCannedAnswers=o,m.newSmsCannedAnswer=!1,m.smsCannedAnswer||(m.smsCannedAnswer={},m.title="SMS.NEW_SMSCANNEDANSWER",m.newSmsCannedAnswer=!0),t.params.id&&(m.smsCannedAnswer.SmsAccountId=t.params.id),m.addNewSmsCannedAnswer=function(){m.errors=[],r.cannedAnswer.save(m.smsCannedAnswer).$promise.then(function(e){m.smsCannedAnswers.unshift(e.toJSON()),i.success({title:"SmsCannedAnswer properly created",msg:m.smsCannedAnswer.name?m.smsCannedAnswer.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSmsCannedAnswer=function(){m.errors=[],r.cannedAnswer.update({id:m.smsCannedAnswer.id},m.smsCannedAnswer).$promise.then(function(e){var t=_.find(m.smsCannedAnswers,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"SmsCannedAnswer properly saved!",msg:m.smsCannedAnswer.name?m.smsCannedAnswer.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSmsCannedAnswer=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The smsCannedAnswer will be deleted.").ariaLabel("Delete SmsCannedAnswer").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.cannedAnswer.delete({id:m.smsCannedAnswer.id}).$promise.then(function(){_.remove(m.smsCannedAnswers,{id:m.smsCannedAnswer.id}),i.success({title:"SmsCannedAnswer properly deleted!",msg:(m.smsCannedAnswer.name||"smsCannedAnswer")+" has been deleted!"}),u(m.smsCannedAnswer)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","smsCannedAnswers","smsCannedAnswer","api","Auth","license","setting"],angular.module("app.sms").controller("CreateOrEditSmsCannedAnswerDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.smsAccount={},c.smsAccountSmsDispositions={count:0,rows:[]},c.selectedSmsAccountSmsDispositions=[],c.query={fields:"createdAt,updatedAt,id,name,createdAt",limit:10,page:1},c.init=function(e){c.smsAccount=e,c.query.id=c.smsAccount.id,c.query.SmsAccountId=c.smsAccount.id,c.getSmsAccountSmsDispositions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the smsDisposition?").htmlContent("<b>"+(e.name||"smsDisposition")+"</b> will be deleted.").ariaLabel("delete smsDisposition").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getSmsAccountSmsDispositions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.smsAccount.getDispositions(c.query,p).$promise},c.createOrEditSmsAccountSmsDisposition=function(e,t){o.show({controller:"CreateOrEditSmsDispositionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsAccounts/edit/smsDispositions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{smsAccount:c.smsAccount,smsDisposition:t,smsDispositions:c.smsAccountSmsDispositions.rows,license:null,setting:null}})},c.exportSelectedSmsAccountSmsDispositions=function(){var e=angular.copy(c.selectedSmsAccountSmsDispositions);return c.selectedSmsAccountSmsDispositions=[],e},c.deleteSmsAccountSmsDisposition=g,c.deleteSelectedSmsAccountSmsDispositions=function(e){var t=o.confirm().title("Are you sure want to delete the selected smsDispositions?").htmlContent("<b>"+c.selectedSmsAccountSmsDispositions.length+" selected</b> will be deleted.").ariaLabel("delete smsDispositions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedSmsAccountSmsDispositions.forEach(function(e){g(e)}),c.selectedSmsAccountSmsDispositions=[]})};var m=!0,u=1;function p(e){c.smsAccountSmsDispositions=e||{count:0,rows:[]}}function g(e){l.smsDisposition.delete({id:e.id}).$promise.then(function(){_.remove(c.smsAccountSmsDispositions.rows,{id:e.id}),c.smsAccountSmsDispositions.count-=1,c.smsAccountSmsDispositions.rows.length||c.getSmsAccountSmsDispositions(),r.success({title:"SmsDisposition deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETsmsAccount"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsmsAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getSmsAccountSmsDispositions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.sms").controller("SmsAccountSmsDispositionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="SMS.EDIT_SMSDISPOSITION",m.smsDisposition=angular.copy(s),m.smsDispositions=o,m.newSmsDisposition=!1,m.smsDisposition||(m.smsDisposition={},m.title="SMS.NEW_SMSDISPOSITION",m.newSmsDisposition=!0),t.params.id&&(m.smsDisposition.SmsAccountId=t.params.id),m.addNewSmsDisposition=function(){m.errors=[],r.smsDisposition.save(m.smsDisposition).$promise.then(function(e){m.smsDispositions.unshift(e.toJSON()),i.success({title:"SmsDisposition properly created",msg:m.smsDisposition.name?m.smsDisposition.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.smsDisposition.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.smsDisposition.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSmsDisposition=function(){m.errors=[],r.smsDisposition.update({id:m.smsDisposition.id},m.smsDisposition).$promise.then(function(e){var t=_.find(m.smsDispositions,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"SmsDisposition properly saved!",msg:m.smsDisposition.name?m.smsDisposition.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.smsDisposition.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.smsDisposition.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSmsDisposition=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The smsDisposition will be deleted.").ariaLabel("Delete SmsDisposition").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.smsDisposition.delete({id:m.smsDisposition.id}).$promise.then(function(){_.remove(m.smsDispositions,{id:m.smsDisposition.id}),i.success({title:"SmsDisposition properly deleted!",msg:(m.smsDisposition.name||"smsDisposition")+" has been deleted!"}),u(m.smsDisposition)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.smsDisposition.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.smsDisposition.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","smsDispositions","smsDisposition","api","Auth","license","setting"],angular.module("app.sms").controller("CreateOrEditSmsDispositionDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.smsAccount=d||e.params.smsAccount||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoSmsAccounts=function(){e.go("app.sms.smsAccounts")},c.saveSmsAccount=function(){s.smsAccount.update({id:c.smsAccount.id},c.smsAccount).$promise.then(function(){r.success({title:"SmsAccount updated!",msg:c.smsAccount.name?c.smsAccount.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsmsAccount",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.lists=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","smsAccount"],angular.module("app.sms").controller("SmsAccountController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.smsAccounts=r||{count:0,rows:[]},v.table="smsAccounts",v.listOrder="",v.listOrderAsc=null,v.selectedSmsAccounts=[],v.query={fields:"createdAt,updatedAt,id,name,key,token,remote,ListId,phone,type,accountSid,authId,authToken,smsMethod,username,password,senderString,deliveryReport,waitForTheAssignedAgent,description,receiveUrl,deliveryReportUrl,notificationSound,notificationShake,notificationTemplate",sort:"-updatedAt",limit:10,page:1},v.arraytype=_.keyBy([{option:"Twilio",value:"'twilio'"},{option:"Skebby",value:"'skebby'"},{option:"Connectel",value:"'connectel'"},{option:"ClickSend",value:"'clicksend'"},{option:"Plivo",value:"'plivo'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraysmsMethod=_.keyBy([{option:"Basic",value:"'basic'"},{option:"Classic",value:"'classic'"},{option:"Classic+",value:"'classic+'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.sms.smsAccounts.edit",{id:e.id,smsAccount:e})},v.interactionsgoto=function(e,t){n.go("app.sms.smsAccounts.edit",{id:e.id,tab:5})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the smsAccount?").htmlContent("<b>"+(e.name||"smsAccount")+"</b> will be deleted.").ariaLabel("delete smsAccount").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getSmsAccounts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.smsAccount.get(v.query,f).$promise},v.createOrEditSmsAccount=function(e,t){i.show({controller:"CreateOrEditSmsAccountDialogController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsAccounts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{smsAccount:t,smsAccounts:v.smsAccounts.rows,license:v.license,setting:v.setting}})},v.deleteSmsAccount=A,v.exportSelectedSmsAccounts=function(){var e=angular.copy(v.selectedSmsAccounts);return v.selectedSmsAccounts=[],e},v.deleteSelectedSmsAccounts=function(e){var t=i.confirm().title("Are you sure want to delete the selected smsAccounts?").htmlContent("<b>"+v.selectedSmsAccounts.length+" selected</b> will be deleted.").ariaLabel("delete SmsAccounts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedSmsAccounts.forEach(function(e){A(e)}),v.selectedSmsAccounts=[]})},v.deselectSmsAccounts=function(){v.selectedSmsAccounts=[]},v.selectAllSmsAccounts=function(){v.selectedSmsAccounts=v.smsAccounts.rows},l.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.lists=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.smsAccounts=e||{count:0,rows:[]}}function A(e){l.smsAccount.delete({id:e.id}).$promise.then(function(){_.remove(v.smsAccounts.rows,{id:e.id}),v.smsAccounts.count-=1,v.smsAccounts.rows.length||v.getSmsAccounts(),c.success({title:"SmsAccount deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEsmsAccount"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEsmsAccount",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getSmsAccounts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","smsAccounts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.sms").controller("SmsAccountsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="SMS.EDIT_SMSQUEUE",m.smsQueue=angular.copy(s),m.smsQueues=o,m.newSmsQueue=!1,m.smsQueue||(m.smsQueue={strategy:"beepall",timeout:10},m.title="SMS.NEW_SMSQUEUE",m.newSmsQueue=!0),m.addNewSmsQueue=function(){m.errors=[],r.smsQueue.save(m.smsQueue).$promise.then(function(e){m.smsQueues.unshift(e.toJSON()),i.success({title:"SmsQueue properly created",msg:m.smsQueue.name?m.smsQueue.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.smsQueue.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.smsQueue.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSmsQueue=function(){m.errors=[],r.smsQueue.update({id:m.smsQueue.id},m.smsQueue).$promise.then(function(e){var t=_.find(m.smsQueues,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"SmsQueue properly saved!",msg:m.smsQueue.name?m.smsQueue.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.smsQueue.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.smsQueue.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSmsQueue=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The smsQueue will be deleted.").ariaLabel("Delete SmsQueue").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.smsQueue.delete({id:m.smsQueue.id}).$promise.then(function(){_.remove(m.smsQueues,{id:m.smsQueue.id}),i.success({title:"SmsQueue properly deleted!",msg:(m.smsQueue.name||"smsQueue")+" has been deleted!"}),u(m.smsQueue)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.smsQueue.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.smsQueue.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","smsQueues","smsQueue","api","Auth","license","setting"],angular.module("app.sms").controller("CreateOrEditSmsQueueDialogController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r){var l=this;function d(){return a.smsQueue[l.isVoiceRealtime()?"getMembers":"getAgents"]({id:l.smsQueue.id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){return l.isVoiceRealtime()?l.selectedItems=e.rows?_.map(e.rows,function(e){return e.id=e.UserId,e.fullname=e.membername,e.penalty=e.hasOwnProperty("penalty")?"penalty "+e.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[]:l.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserSmsQueue?"penalty "+e.UserSmsQueue.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.selectedItems=l.selectedItems,r.hasRole("admin")?a.user.get({fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise:a.user.getAgents({id:r.getCurrentUser().id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise}).then(function(e){l.items=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserSmsQueue?"penalty "+e.UserSmsQueue.penalty:"",e.internal=e.internal?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.items=_.differenceBy(l.items,l.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETUSERS.GETAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}l.smsQueue=t,l.penalty=0,l.items=[],l.selectedItems=[],l.closeDialog=function(){e.hide()},l.isVoiceRealtime=function(){return o},l.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"penalty",labelAll:s.instant("SMS.ALL_AGENTS"),labelSelected:s.instant("SMS.SELECTED_AGENTS"),transferCallback:function(e,t){a.smsQueue[t?"removeAgents":"addAgents"]({id:l.smsQueue.id,ids:_.map(e,l.isVoiceRealtime()&&t?"UserId":"id"),penalty:l.penalty||0,realtime:o||!1}).$promise.then(function(){n.success({title:"SmsQueue properly "+(t?"removed":"added"),msg:"SmsQueue has been "+(t?"removed":"added")+"!"}),t||d()}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:smsQueue.ADDAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d()}e.$inject=["$mdDialog","toasty","api","smsQueue","smsQueues","realtime","$translate","Auth"],angular.module("app.sms").controller("SmsQueueagentaddController",e)}(),function(){"use strict";function e(e,n,a,t,i){var o=this;o.smsQueue=t,o.penalty=0,o.items=[],o.selectedItems=[],o.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("SMS.ALL_TEAMS"),labelSelected:i.instant("SMS.SELECTED_TEAMS"),transferCallback:function(e,t){a.smsQueue[t?"removeTeams":"addTeams"]({id:o.smsQueue.id,ids:_.map(e,"id"),penalty:o.penalty||0}).$promise.then(function(){n.success({title:"Team properly "+(t?"removed":"added"),msg:"Team has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:smsQueue.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},o.closeDialog=function(){e.hide()},a.smsQueue.getTeams({id:o.smsQueue.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return o.selectedItems=e.rows?e.rows:[],o.dualMultiselectOptions.selectedItems=o.selectedItems,a.team.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){o.items=e.rows?e.rows:[],o.dualMultiselectOptions.items=_.differenceBy(o.items,o.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","smsQueue","$translate"],angular.module("app.sms").controller("SmsQueueteamaddController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.smsQueue=d||e.params.smsQueue||{},c.selectedTab=e.params.tab||0,c.teamadddialog=function(e,t){n.show({controller:"SmsQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsQueues/edit/teamadd/teamadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{smsQueue:e,smsQueues:c.smsQueues?c.smsQueues.rows:[]}})},c.agentadddialog=function(e,t){n.show({controller:"SmsQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsQueues/edit/agentadd/agentadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{smsQueue:e,smsQueues:c.smsQueues?c.smsQueues.rows:[],realtime:!1}})},c.alert=r.info,c.gotoSmsQueues=function(){e.go("app.sms.smsQueues")},c.saveSmsQueue=function(){s.smsQueue.update({id:c.smsQueue.id},c.smsQueue).$promise.then(function(){r.success({title:"SmsQueue updated!",msg:c.smsQueue.name?c.smsQueue.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsmsQueue",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","smsQueue"],angular.module("app.sms").controller("SmsQueueController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.smsQueues=r||{count:0,rows:[]},v.table="smsQueues",v.listOrder="",v.listOrderAsc=null,v.selectedSmsQueues=[],v.query={fields:"createdAt,updatedAt,id,name,strategy,timeout,description",sort:"-updatedAt",limit:10,page:1},v.arraystrategy=_.keyBy([{option:"Beepall",value:"'beepall'"},{option:"RR Memory",value:"'rrmemory'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.sms.smsQueues.edit",{id:e.id,smsQueue:e})},v.teamadddialog=function(e,t){i.show({controller:"SmsQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsQueues/edit/teamadd/teamadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{smsQueue:e,smsQueues:v.smsQueues?v.smsQueues.rows:[]}})},v.agentadddialog=function(e,t){i.show({controller:"SmsQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsQueues/edit/agentadd/agentadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{smsQueue:e,smsQueues:v.smsQueues?v.smsQueues.rows:[],realtime:!1}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the smsQueue?").htmlContent("<b>"+(e.name||"smsQueue")+"</b> will be deleted.").ariaLabel("delete smsQueue").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.gotorealtimegoto=function(e,t){n.go("app.sms.realtime.queues",{})},v.success=f,v.getSmsQueues=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.smsQueue.get(v.query,f).$promise},v.createOrEditSmsQueue=function(e,t){i.show({controller:"CreateOrEditSmsQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/sms/views/smsQueues/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{smsQueue:t,smsQueues:v.smsQueues.rows,license:v.license,setting:v.setting}})},v.deleteSmsQueue=A,v.exportSelectedSmsQueues=function(){var e=angular.copy(v.selectedSmsQueues);return v.selectedSmsQueues=[],e},v.deleteSelectedSmsQueues=function(e){var t=i.confirm().title("Are you sure want to delete the selected smsQueues?").htmlContent("<b>"+v.selectedSmsQueues.length+" selected</b> will be deleted.").ariaLabel("delete SmsQueues").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedSmsQueues.forEach(function(e){A(e)}),v.selectedSmsQueues=[]})},v.deselectSmsQueues=function(){v.selectedSmsQueues=[]},v.selectAllSmsQueues=function(){v.selectedSmsQueues=v.smsQueues.rows};var h=!0,b=1;function f(e){v.smsQueues=e||{count:0,rows:[]}}function A(e){l.smsQueue.delete({id:e.id}).$promise.then(function(){_.remove(v.smsQueues.rows,{id:e.id}),v.smsQueues.count-=1,v.smsQueues.rows.length||v.getSmsQueues(),c.success({title:"SmsQueue deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEsmsQueue"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEsmsQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getSmsQueues())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","smsQueues","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.sms").controller("SmsQueuesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.agents=r||{count:0,rows:[]},v.table="agents",v.listOrder="",v.listOrderAsc=null,v.selectedAgents=[],v.query={fields:"createdAt,updatedAt,id,role,fullname,name,alias,email,phone,mobile,userpic,password,showWebBar,autointernal,internal,loginInPause,description,dtlscertfile,dtlsprivatekey,voicemail,transport,host,nat,type,allow,callerid,context,callgroup,pickupgroup,chanspy,extensionMonitor,chatCapacity,mailCapacity,faxCapacity,smsCapacity,openchannelCapacity,phoneBarEnableSettings,phoneBarAutoAnswer,phoneBarAutoAnswerDelay,phoneBarRingInUse,phoneBarEnableRecording,phoneBarEnableDtmfTone,phoneBarDnd,phoneBarUnansweredCallBadge,phoneBarEnableJaws,phoneBarOutboundProxy,phoneBarUnconditional,phoneBarUnconditionalNumber,phoneBarRemoteControl,phoneBarRemoteControlPort,voicemail,phoneBarExpires,phoneBarListenPort,permissions,allowmessenger,passwordResetAt,passwordResetAt",role:"agent",sort:"-updatedAt",limit:10,page:1},v.arrayshowWebBar=_.keyBy([{option:"Phonebar",value:"0"},{option:"External",value:"1"},{option:"WebRTC (rc-1)",value:"2"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraytransport=_.keyBy([{option:"udp",value:"'udp'"},{option:"tcp",value:"'tcp'"},{option:"ws",value:"'ws'",ngIf:"vm.agent.showWebBar == 1"},{option:"wss",value:"'wss'",ngIf:"vm.agent.showWebBar == 1"},{option:"tls",value:"'tls'",ngIf:"vm.agent.showWebBar == 1"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraynat=_.keyBy([{option:"force_rport",value:"'force_rport'"},{option:"comedia",value:"'comedia'"},{option:"yes",value:"'yes'"},{option:"no",value:"'no'"},{option:"never",value:"'never'"},{option:"route",value:"'route'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraytype=_.keyBy([{option:"Friend",value:"'friend'"},{option:"User",value:"'user'"},{option:"Peer",value:"'peer'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayallow=_.keyBy([{option:"ulaw",value:"'ulaw'"},{option:"alaw",value:"'alaw'"},{option:"gsm",value:"'gsm'"},{option:"g722",value:"'g722'"},{option:"g729",value:"'g729'"},{option:"opus",value:"'opus'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayextensionMonitor=_.keyBy([{option:"Inactive",value:"''"},{option:"wav",value:"'wav'"},{option:"wav49",value:"'WAV'"},{option:"gsm",value:"'gsm'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.staff.agents.edit",{id:e.id,agent:e})},v.teamadddialog=function(e,t){i.show({controller:"AgentteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/teamadd/teamadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{agent:e,agents:v.agents?v.agents.rows:[]}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the agent?").htmlContent("<b>"+(e.name||"agent")+"</b> will be deleted.").ariaLabel("delete agent").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getAgents=function(){v.query.offset=(v.query.page-1)*v.query.limit,m.hasRole("admin")?v.promise=l.user.get(v.query,f).$promise:(v.query.id=v.currentUser.id,v.promise=l.user.getAgents(v.query,f).$promise)},v.createOrEditAgent=function(e,t){i.show({controller:"CreateOrEditAgentDialogController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{agent:t,agents:v.agents.rows,license:v.license,setting:v.setting}})},v.deleteAgent=A,v.exportSelectedAgents=function(){var e=angular.copy(v.selectedAgents);return v.selectedAgents=[],e},v.deleteSelectedAgents=function(e){var t=i.confirm().title("Are you sure want to delete the selected agents?").htmlContent("<b>"+v.selectedAgents.length+" selected</b> will be deleted.").ariaLabel("delete Agents").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedAgents.forEach(function(e){A(e)}),v.selectedAgents=[]})},v.deselectAgents=function(){v.selectedAgents=[]},v.selectAllAgents=function(){v.selectedAgents=v.agents.rows};var h=!0,b=1;function f(e){v.agents=e||{count:0,rows:[]}}function A(e){l.user.delete({id:e.id}).$promise.then(function(){_.remove(v.agents.rows,{id:e.id}),v.agents.count-=1,v.agents.rows.length||v.getAgents(),c.success({title:"Agent deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEuser"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEuser",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getAgents())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","agents","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.staff").controller("AgentsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="STAFF.EDIT_AGENT",m.agent=angular.copy(s),m.agents=o,m.newAgent=!1,m.agent||(m.agent={role:"agent",showWebBar:"0",autointernal:!0,type:"friend",context:"from-sip",phoneBarRemoteControl:!0,phoneBarRemoteControlPort:9888,allowmessenger:!0},m.title="STAFF.NEW_AGENT",m.newAgent=!0),m.addNewAgent=function(){m.errors=[],r.user.save(m.agent).$promise.then(function(e){m.agents.unshift(e.toJSON()),i.success({title:"Agent properly created",msg:m.agent.name?m.agent.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.user.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.user.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveAgent=function(){m.errors=[],r.user.update({id:m.agent.id},m.agent).$promise.then(function(e){var t=_.find(m.agents,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Agent properly saved!",msg:m.agent.name?m.agent.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.user.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.user.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteAgent=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The agent will be deleted.").ariaLabel("Delete Agent").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.user.delete({id:m.agent.id}).$promise.then(function(){_.remove(m.agents,{id:m.agent.id}),i.success({title:"Agent properly deleted!",msg:(m.agent.name||"agent")+" has been deleted!"}),u(m.agent)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.user.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.user.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","agents","agent","api","Auth","license","setting"],angular.module("app.staff").controller("CreateOrEditAgentDialogController",e)}(),function(){"use strict";function e(e,a){var i=this;i.agent={},i.ngFlowOptions={maxChunkRetries:1,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,allowDuplicateUploads:!0},i.ngFlow={flow:{}},i.dropping=!1,i.fileAdded=function(e){var t=["png","jpg"];if(!_.includes(t,e.getExtension()))return a.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported only: "+t.join()}),!1;if(8388608<e.size)return a.error({title:"File too big",msg:"The max allowed size for image files is 8 Mb"}),!1;var n={id:e.uniqueIdentifier,file:e,type:"uploading"};return i.agent.images.unshift(n),!0},i.upload=function(){i.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+e.get("motion.token")},i.ngFlow.flow.upload()},i.fileSuccess=function(a,e){angular.forEach(i.agent.images,function(t,e){if(t.id===a.uniqueIdentifier){var n=new FileReader;n.readAsDataURL(t.file.file),n.onload=function(e){t.url=e.target.result},t.type="image"}})},i.init=function(e){i.agent=angular.copy(e),i.ngFlowOptions.target="api/users/"+i.agent.id+"/avatar",i.agent.images=[]}}e.$inject=["$cookies","toasty"],angular.module("app.staff").controller("Agentchange_avatarController",e)}(),function(){"use strict";function e(e,t,n,a,i){var o=this;function s(){e.hide()}o.errors=[],o.setting=i,o.passwordPattern=o.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",o.agent=a,o.password="",o.savePassword=function(){o.errors=[],n.user.changePassword({id:o.agent.id,newPassword:o.password}).$promise.then(function(){t.success({title:"Agent password properly updated!"}),s()}).catch(function(e){console.error(e),o.errors=e.data.errors||[{message:e.toString(),type:"api.agent.changePassword"}]})},o.closeDialog=s}e.$inject=["$mdDialog","toasty","api","agent","setting"],angular.module("app.staff").controller("AgentchangepasswordController",e)}(),function(){"use strict";function e(i,e,t,o){var s=this;s.agent={},s.navigation=t.getNavigation(),s.init=function(e){s.agent=e},s.onChange=function(t,n){if((n||t).enabled){if(n)n.enabled=!0,s.agent.permissions.push(n.id);else for(var e=0;e<t.children.length;e++)t.children[e].enabled=!0,s.agent.permissions.push(t.children[e].id);t.enabled=!0,s.agent.permissions.push(t.id)}else if(n)n.enabled=!1,_.remove(s.agent.permissions,function(e){return n.id===e}),_.filter(t.children,{enabled:!1}).length===t.children.length&&(t.enabled=!1,_.remove(s.agent.permissions,function(e){return t.id===e}));else{t.enabled=!1,_.remove(s.agent.permissions,function(e){return t.id===e});for(var a=0;a<t.children.length;a++)t.children[a].enabled=!1,_.remove(s.agent.permissions,function(e){return t.children[a].id===e})}return i.user.update({id:s.agent.id,permissions:_.uniq(s.agent.permissions)}).$promise.then(function(){o.success({title:"agent updated!",msg:s.agent.name?s.agent.name+" has been updated!":""})}).catch(function(e){console.error(e)})}}e.$inject=["api","msNavigationService","msNavigationAgentService","toasty"],angular.module("app.staff").controller("AgentPermissionsController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r,l){var d=this;function c(){a.user[d.isVoiceRealtime()?"getVoiceQueuesRt":"getQueues"]({id:d.agent.id,fields:d.isVoiceRealtime()?"VoiceQueueId,queue_name,penalty":"id,name,strategy,type",channel:i,nolimit:!0}).$promise.then(function(e){return d.isVoiceRealtime()?d.selectedItems=e.rows?_.map(e.rows,function(e){return{id:e.VoiceQueueId,name:e.queue_name,penalty:e.hasOwnProperty("penalty")?"penalty "+e.penalty:"penalty 0",strategy:""}}):[]:d.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserVoiceQueue?"penalty "+e.UserVoiceQueue.penalty:"",e}):[],l.hasRole("admin")?a[d.apiname].get({fields:"id,name,strategy,type",nolimit:!0,type:s}).$promise:a.user.getQueues({id:l.getCurrentUser().id,fields:"id,name,strategy,type",nolimit:!0,type:s,channel:i}).$promise}).then(function(e){d.items=e.rows?e.rows:[],d.selectedItems=_.intersectionBy(d.selectedItems,d.items,"id"),d.dualMultiselectOptions.selectedItems=d.selectedItems,d.dualMultiselectOptions.items=_.differenceBy(d.items,d.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETQUEUES",msg:e.status?JSON.stringify(e.data):e.toString()})})}d.agent=t,d.penalty=0,d.apiname=i+"Queue",d.title=r.instant("STAFF.QUEUEADD_AGENT_"+i.toUpperCase()+"_"+s.toUpperCase()),d.items=[],d.selectedItems=[],d.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"name",line2:"type",line3:"agent"===d.agent.role?"penalty":"",labelAll:r.instant("STAFF.ALL_QUEUES_"+i.toUpperCase()+"_"+s.toUpperCase()),labelSelected:r.instant("STAFF.SELECTED_QUEUES_"+i.toUpperCase()+"_"+s.toUpperCase()),transferCallback:function(e,t){a.user[t?"removeQueues":"addQueues"]({id:d.agent.id,ids:_.map(e,"id"),channel:i,penalty:d.penalty||0,realtime:o}).$promise.then(function(){c(),n.success({title:"Queue properly "+(t?"removed":"added"),msg:"Queue has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:USER.ADDQUEUES",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d.closeDialog=function(){e.hide()},d.isVoiceRealtime=function(){return o&&"voice"===i},d.isVoiceChannel=function(){return"voice"===i},c()}e.$inject=["$mdDialog","toasty","api","agent","channel","realtime","direction","$translate","Auth"],angular.module("app.staff").controller("AgentqueueaddController",e)}(),function(){"use strict";function e(e,n,a,t,i){var o=this;o.agent=t,o.penalty=0,o.items=[],o.selectedItems=[],o.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("STAFF.ALL_TEAMS"),labelSelected:i.instant("STAFF.SELECTED_TEAMS"),transferCallback:function(e,t){a.user[t?"removeTeams":"addTeams"]({id:o.agent.id,ids:_.map(e,"id"),penalty:o.penalty||0}).$promise.then(function(){n.success({title:"Team properly "+(t?"removed":"added"),msg:"Team has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:agent.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},o.closeDialog=function(){e.hide()},a.user.getTeams({id:o.agent.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return o.selectedItems=e.rows?e.rows:[],o.dualMultiselectOptions.selectedItems=o.selectedItems,a.team.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){o.items=e.rows?e.rows:[],o.dualMultiselectOptions.items=_.differenceBy(o.items,o.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","agent","$translate"],angular.module("app.staff").controller("AgentteamaddController",e)}(),function(){"use strict";function e(e,t,i,o,n,a,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=n,c.setting=a,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.agent=d||e.params.agent||{},c.selectedTab=e.params.tab||0,c.queueaddchannel=function(e,t,n,a){i.show({controller:"AgentqueueaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/queueadd/queueadd.html",parent:angular.element(o.body),targetEvent:n,clickOutsideToClose:!0,locals:{agent:e,agents:c.agents?c.agents.rows:[],channel:t,realtime:!1,direction:a||"inbound"}})},c.teamadddialog=function(e,t){i.show({controller:"AgentteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/teamadd/teamadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{agent:e,agents:c.agents?c.agents.rows:[]}})},c.changepassworddialog=function(e,t){i.show({controller:"AgentchangepasswordController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/changepassword/changepassword.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{agent:e,setting:a,agents:c.agents?c.agents.rows:[]}})},c.alert=r.info,c.gotoAgents=function(){e.go("app.staff.agents")},c.saveAgent=function(){c.agent=_.omit(c.agent,"userpic"),s.user.update({id:c.agent.id},c.agent).$promise.then(function(){r.success({title:"Agent updated!",msg:c.agent.name?c.agent.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETuser",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){c.contexts=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","agent"],angular.module("app.staff").controller("AgentController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="STAFF.EDIT_TEAM",m.team=angular.copy(s),m.teams=o,m.newTeam=!1,m.team||(m.team={},m.title="STAFF.NEW_TEAM",m.newTeam=!0),m.addNewTeam=function(){m.errors=[],r.team.save(m.team).$promise.then(function(e){m.teams.unshift(e.toJSON()),i.success({title:"Team properly created",msg:m.team.name?m.team.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.team.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.team.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveTeam=function(){m.errors=[],r.team.update({id:m.team.id},m.team).$promise.then(function(e){var t=_.find(m.teams,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Team properly saved!",msg:m.team.name?m.team.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.team.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.team.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteTeam=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The team will be deleted.").ariaLabel("Delete Team").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.team.delete({id:m.team.id}).$promise.then(function(){_.remove(m.teams,{id:m.team.id}),i.success({title:"Team properly deleted!",msg:(m.team.name||"team")+" has been deleted!"}),u(m.team)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.team.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.team.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","teams","team","api","Auth","license","setting"],angular.module("app.staff").controller("CreateOrEditTeamDialogController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r){var l=this;function d(){return a.team[l.isVoiceRealtime()?"getMembers":"getAgents"]({id:l.team.id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){return l.isVoiceRealtime()?l.selectedItems=e.rows?_.map(e.rows,function(e){return e.id=e.UserId,e.fullname=e.membername,e.penalty=e.hasOwnProperty("penalty")?"penalty "+e.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[]:l.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserTeam?"penalty "+e.UserTeam.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.selectedItems=l.selectedItems,r.hasRole("admin")?a.user.get({fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise:a.user.getAgents({id:r.getCurrentUser().id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise}).then(function(e){l.items=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserTeam?"penalty "+e.UserTeam.penalty:"",e.internal=e.internal?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.items=_.differenceBy(l.items,l.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETUSERS.GETAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}l.team=t,l.penalty=0,l.items=[],l.selectedItems=[],l.closeDialog=function(){e.hide()},l.isVoiceRealtime=function(){return o},l.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"penalty",labelAll:s.instant("STAFF.ALL_AGENTS"),labelSelected:s.instant("STAFF.SELECTED_AGENTS"),transferCallback:function(e,t){a.team[t?"removeAgents":"addAgents"]({id:l.team.id,ids:_.map(e,l.isVoiceRealtime()&&t?"UserId":"id"),penalty:l.penalty||0,realtime:o||!1}).$promise.then(function(){n.success({title:"Team properly "+(t?"removed":"added"),msg:"Team has been "+(t?"removed":"added")+"!"}),t||d()}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:team.ADDAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d()}e.$inject=["$mdDialog","toasty","api","team","teams","realtime","$translate","Auth"],angular.module("app.staff").controller("TeamagentaddController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.teams=r||{count:0,rows:[]},v.table="teams",v.listOrder="",v.listOrderAsc=null,v.selectedTeams=[],v.query={fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditTeamDialogController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/teams/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{team:e,teams:v.teams.rows,license:v.license,setting:null}})},v.agentadddialog=function(e,t){i.show({controller:"TeamagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/teams/edit/agentadd/agentadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{team:e,teams:v.teams?v.teams.rows:[],realtime:!1}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the team?").htmlContent("<b>"+(e.name||"team")+"</b> will be deleted.").ariaLabel("delete team").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getTeams=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.team.get(v.query,f).$promise},v.createOrEditTeam=function(e,t){i.show({controller:"CreateOrEditTeamDialogController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/teams/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{team:t,teams:v.teams.rows,license:v.license,setting:v.setting}})},v.deleteTeam=A,v.exportSelectedTeams=function(){var e=angular.copy(v.selectedTeams);return v.selectedTeams=[],e},v.deleteSelectedTeams=function(e){var t=i.confirm().title("Are you sure want to delete the selected teams?").htmlContent("<b>"+v.selectedTeams.length+" selected</b> will be deleted.").ariaLabel("delete Teams").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedTeams.forEach(function(e){A(e)}),v.selectedTeams=[]})},v.deselectTeams=function(){v.selectedTeams=[]},v.selectAllTeams=function(){v.selectedTeams=v.teams.rows};var h=!0,b=1;function f(e){v.teams=e||{count:0,rows:[]}}function A(e){l.team.delete({id:e.id}).$promise.then(function(){_.remove(v.teams.rows,{id:e.id}),v.teams.count-=1,v.teams.rows.length||v.getTeams(),c.success({title:"Team deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEteam"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEteam",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getTeams())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","teams","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.staff").controller("TeamsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="STAFF.EDIT_TELEPHONE",m.telephone=angular.copy(s),m.telephones=o,m.newTelephone=!1,m.telephone||(m.telephone={role:"telephone",autointernal:!0,context:"from-sip"},m.title="STAFF.NEW_TELEPHONE",m.newTelephone=!0),m.addNewTelephone=function(){m.errors=[],r.user.save(m.telephone).$promise.then(function(e){m.telephones.unshift(e.toJSON()),i.success({title:"Telephone properly created",msg:m.telephone.name?m.telephone.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.user.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.user.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveTelephone=function(){m.errors=[],r.user.update({id:m.telephone.id},m.telephone).$promise.then(function(e){var t=_.find(m.telephones,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Telephone properly saved!",msg:m.telephone.name?m.telephone.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.user.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.user.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteTelephone=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The telephone will be deleted.").ariaLabel("Delete Telephone").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.user.delete({id:m.telephone.id}).$promise.then(function(){_.remove(m.telephones,{id:m.telephone.id}),i.success({title:"Telephone properly deleted!",msg:(m.telephone.name||"telephone")+" has been deleted!"}),u(m.telephone)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.user.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.user.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","telephones","telephone","api","Auth","license","setting"],angular.module("app.staff").controller("CreateOrEditTelephoneDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i){var o=this;function s(){e.hide()}o.errors=[],o.setting=i,o.passwordPattern=o.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",o.telephone=a,o.password="",o.savePassword=function(){o.errors=[],n.user.changePassword({id:o.telephone.id,newPassword:o.password}).$promise.then(function(){t.success({title:"Telephone password properly updated!"}),s()}).catch(function(e){console.error(e),o.errors=e.data.errors||[{message:e.toString(),type:"api.telephone.changePassword"}]})},o.closeDialog=s}e.$inject=["$mdDialog","toasty","api","telephone","setting"],angular.module("app.staff").controller("TelephonechangepasswordController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.telephone=d||e.params.telephone||{},c.selectedTab=e.params.tab||0,c.changepassworddialog=function(e,t){n.show({controller:"TelephonechangepasswordController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/telephones/edit/changepassword/changepassword.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{telephone:e,setting:o,telephones:c.telephones?c.telephones.rows:[]}})},c.alert=r.info,c.gotoTelephones=function(){e.go("app.staff.telephones")},c.saveTelephone=function(){s.user.update({id:c.telephone.id},c.telephone).$promise.then(function(){r.success({title:"Telephone updated!",msg:c.telephone.name?c.telephone.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETuser",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){c.contexts=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","telephone"],angular.module("app.staff").controller("TelephoneController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.telephones=r||{count:0,rows:[]},v.table="telephones",v.listOrder="",v.listOrderAsc=null,v.selectedTelephones=[],v.query={fields:"createdAt,updatedAt,id,role,fullname,name,email,password,description,autointernal,internal,voicemail,transport,nat,allow,callerid,context,callgroup,pickupgroup,encryption,phone,mobile",role:"telephone",sort:"-updatedAt",limit:10,page:1},v.arraytransport=_.keyBy([{option:"udp",value:"'udp'"},{option:"tcp",value:"'tcp'"},{option:"ws",value:"'ws'"},{option:"wss",value:"'wss'"},{option:"tls",value:"'tls'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraynat=_.keyBy([{option:"force_rport",value:"'force_rport'"},{option:"comedia",value:"'comedia'"},{option:"yes",value:"'yes'"},{option:"no",value:"'no'"},{option:"never",value:"'never'"},{option:"route",value:"'route'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayallow=_.keyBy([{option:"ulaw",value:"'ulaw'"},{option:"alaw",value:"'alaw'"},{option:"gsm",value:"'gsm'"},{option:"g722",value:"'g722'"},{option:"g729",value:"'g729'"},{option:"opus",value:"'opus'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayencryption=_.keyBy([{option:"yes",value:"'yes'"},{option:"no",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.staff.telephones.edit",{id:e.id,telephone:e})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the telephone?").htmlContent("<b>"+(e.name||"telephone")+"</b> will be deleted.").ariaLabel("delete telephone").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getTelephones=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.user.get(v.query,f).$promise},v.createOrEditTelephone=function(e,t){i.show({controller:"CreateOrEditTelephoneDialogController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/telephones/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{telephone:t,telephones:v.telephones.rows,license:v.license,setting:v.setting}})},v.deleteTelephone=A,v.exportSelectedTelephones=function(){var e=angular.copy(v.selectedTelephones);return v.selectedTelephones=[],e},v.deleteSelectedTelephones=function(e){var t=i.confirm().title("Are you sure want to delete the selected telephones?").htmlContent("<b>"+v.selectedTelephones.length+" selected</b> will be deleted.").ariaLabel("delete Telephones").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedTelephones.forEach(function(e){A(e)}),v.selectedTelephones=[]})},v.deselectTelephones=function(){v.selectedTelephones=[]},v.selectAllTelephones=function(){v.selectedTelephones=v.telephones.rows};var h=!0,b=1;function f(e){v.telephones=e||{count:0,rows:[]}}function A(e){l.user.delete({id:e.id}).$promise.then(function(){_.remove(v.telephones.rows,{id:e.id}),v.telephones.count-=1,v.telephones.rows.length||v.getTelephones(),c.success({title:"Telephone deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEuser"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEuser",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getTelephones())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","telephones","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.staff").controller("TelephonesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="STAFF.EDIT_USER",m.user=angular.copy(s),m.users=o,m.newUser=!1,m.user||(m.user={role:"user",autointernal:!0,context:"from-sip",crudPermissions:"0"},m.title="STAFF.NEW_USER",m.newUser=!0),m.addNewUser=function(){m.errors=[],r.user.save(m.user).$promise.then(function(e){m.users.unshift(e.toJSON()),i.success({title:"User properly created",msg:m.user.name?m.user.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.user.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.user.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveUser=function(){m.errors=[],r.user.update({id:m.user.id},m.user).$promise.then(function(e){var t=_.find(m.users,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"User properly saved!",msg:m.user.name?m.user.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.user.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.user.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteUser=function(e){if(l.getCurrentUser().id===m.user.id)return i.error({title:"User not deleted!",msg:"You can't remove yourself"});m.errors=[];var t=a.confirm().title("Are you sure?").content("The user will be deleted.").ariaLabel("Delete User").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.user.delete({id:m.user.id}).$promise.then(function(){_.remove(m.users,{id:m.user.id}),i.success({title:"User properly deleted!",msg:(m.user.name||"user")+" has been deleted!"}),u(m.user)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.user.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.user.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","users","user","api","Auth","license","setting"],angular.module("app.staff").controller("CreateOrEditUserDialogController",e)}(),function(){"use strict";function e(e,a){var i=this;i.user={},i.ngFlowOptions={maxChunkRetries:1,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,allowDuplicateUploads:!0},i.ngFlow={flow:{}},i.dropping=!1,i.fileAdded=function(e){var t=["png","jpg"];if(!_.includes(t,e.getExtension()))return a.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported only: "+t.join()}),!1;if(8388608<e.size)return a.error({title:"File too big",msg:"The max allowed size for image files is 8 Mb"}),!1;var n={id:e.uniqueIdentifier,file:e,type:"uploading"};return i.user.images.unshift(n),!0},i.upload=function(){i.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+e.get("motion.token")},i.ngFlow.flow.upload()},i.fileSuccess=function(a,e){angular.forEach(i.user.images,function(t,e){if(t.id===a.uniqueIdentifier){var n=new FileReader;n.readAsDataURL(t.file.file),n.onload=function(e){t.url=e.target.result},t.type="image"}})},i.init=function(e){i.user=angular.copy(e),i.ngFlowOptions.target="api/users/"+i.user.id+"/avatar",i.user.images=[]}}e.$inject=["$cookies","toasty"],angular.module("app.staff").controller("Userchange_avatarController",e)}(),function(){"use strict";function e(e,t,n,a,i){var o=this;function s(){e.hide()}o.errors=[],o.setting=i,o.passwordPattern=o.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",o.user=a,o.password="",o.savePassword=function(){o.errors=[],n.user.changePassword({id:o.user.id,newPassword:o.password}).$promise.then(function(){t.success({title:"User password properly updated!"}),s()}).catch(function(e){console.error(e),o.errors=e.data.errors||[{message:e.toString(),type:"api.user.changePassword"}]})},o.closeDialog=s}e.$inject=["$mdDialog","toasty","api","user","setting"],angular.module("app.staff").controller("UserchangepasswordController",e)}(),function(){"use strict";function e(i,e,t,o){var s=this;s.user={},s.navigation=e.getNavigation(),s.init=function(e){s.user=e},s.onChange=function(t,n){if((n||t).enabled){if(n)n.enabled=!0,s.user.permissions.push(n.id);else for(var e=0;e<t.children.length;e++)t.children[e].enabled=!0,s.user.permissions.push(t.children[e].id);t.enabled=!0,s.user.permissions.push(t.id)}else if(n)n.enabled=!1,_.remove(s.user.permissions,function(e){return n.id===e}),_.filter(t.children,{enabled:!1}).length===t.children.length&&(t.enabled=!1,_.remove(s.user.permissions,function(e){return t.id===e}));else{t.enabled=!1,_.remove(s.user.permissions,function(e){return t.id===e});for(var a=0;a<t.children.length;a++)t.children[a].enabled=!1,_.remove(s.user.permissions,function(e){return t.children[a].id===e})}return i.user.update({id:s.user.id,permissions:_.uniq(s.user.permissions)}).$promise.then(function(){o.success({title:"user updated!",msg:s.user.name?s.user.name+" has been updated!":""})}).catch(function(e){console.error(e)})}}e.$inject=["api","msNavigationService","msNavigationAgentService","toasty"],angular.module("app.staff").controller("UserPermissionsController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r,l){var d=this;function c(){a.user[d.isVoiceRealtime()?"getVoiceQueuesRt":"getQueues"]({id:d.user.id,fields:d.isVoiceRealtime()?"VoiceQueueId,queue_name,penalty":"id,name,strategy,type",channel:i,nolimit:!0}).$promise.then(function(e){return d.isVoiceRealtime()?d.selectedItems=e.rows?_.map(e.rows,function(e){return{id:e.VoiceQueueId,name:e.queue_name,penalty:e.hasOwnProperty("penalty")?"penalty "+e.penalty:"penalty 0",strategy:""}}):[]:d.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserVoiceQueue?"penalty "+e.UserVoiceQueue.penalty:"",e}):[],l.hasRole("admin")?a[d.apiname].get({fields:"id,name,strategy,type",nolimit:!0,type:s}).$promise:a.user.getQueues({id:l.getCurrentUser().id,fields:"id,name,strategy,type",nolimit:!0,type:s,channel:i}).$promise}).then(function(e){d.items=e.rows?e.rows:[],d.selectedItems=_.intersectionBy(d.selectedItems,d.items,"id"),d.dualMultiselectOptions.selectedItems=d.selectedItems,d.dualMultiselectOptions.items=_.differenceBy(d.items,d.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETQUEUES",msg:e.status?JSON.stringify(e.data):e.toString()})})}d.user=t,d.penalty=0,d.apiname=i+"Queue",d.title=r.instant("STAFF.QUEUEADD_USER_"+i.toUpperCase()+"_"+s.toUpperCase()),d.items=[],d.selectedItems=[],d.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"name",line2:"type",line3:"agent"===d.user.role?"penalty":"",labelAll:r.instant("STAFF.ALL_QUEUES_"+i.toUpperCase()+"_"+s.toUpperCase()),labelSelected:r.instant("STAFF.SELECTED_QUEUES_"+i.toUpperCase()+"_"+s.toUpperCase()),transferCallback:function(e,t){a.user[t?"removeQueues":"addQueues"]({id:d.user.id,ids:_.map(e,"id"),channel:i,penalty:d.penalty||0,realtime:o}).$promise.then(function(){c(),n.success({title:"Queue properly "+(t?"removed":"added"),msg:"Queue has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:USER.ADDQUEUES",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d.closeDialog=function(){e.hide()},d.isVoiceRealtime=function(){return o&&"voice"===i},d.isVoiceChannel=function(){return"voice"===i},c()}e.$inject=["$mdDialog","toasty","api","user","channel","realtime","direction","$translate","Auth"],angular.module("app.staff").controller("UserqueueaddController",e)}(),function(){"use strict";function e(e,t,i,o,n,a,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=n,c.setting=a,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.user=d||e.params.user||{},c.selectedTab=e.params.tab||0,c.queueaddchannel=function(e,t,n,a){i.show({controller:"UserqueueaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/users/edit/queueadd/queueadd.html",parent:angular.element(o.body),targetEvent:n,clickOutsideToClose:!0,locals:{user:e,users:c.users?c.users.rows:[],channel:t,realtime:!1,direction:a||"inbound"}})},c.changepassworddialog=function(e,t){i.show({controller:"UserchangepasswordController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/users/edit/changepassword/changepassword.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{user:e,setting:a,users:c.users?c.users.rows:[]}})},c.alert=r.info,c.gotoUsers=function(){e.go("app.staff.users")},c.saveUser=function(){c.user=_.omit(c.user,"userpic"),s.user.update({id:c.user.id},c.user).$promise.then(function(){r.success({title:"User updated!",msg:c.user.name?c.user.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETuser",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){c.contexts=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","user"],angular.module("app.staff").controller("UserController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.users=r||{count:0,rows:[]},v.table="users",v.listOrder="",v.listOrderAsc=null,v.selectedUsers=[],v.query={fields:"createdAt,updatedAt,role,id,fullname,name,email,phone,mobile,userpic,password,description,autointernal,internal,transport,nat,allow,context,callgroup,pickupgroup,permissions,crudPermissions,passwordResetAt,passwordResetAt",role:"admin,user",sort:"-updatedAt",limit:10,page:1},v.arrayrole=_.keyBy([{option:"Admin",value:"'admin'"},{option:"User",value:"'user'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraytransport=_.keyBy([{option:"udp",value:"'udp'"},{option:"tcp",value:"'tcp'"},{option:"ws",value:"'ws'"},{option:"wss",value:"'wss'"},{option:"tls",value:"'tls'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraynat=_.keyBy([{option:"force_rport",value:"'force_rport'"},{option:"comedia",value:"'comedia'"},{option:"yes",value:"'yes'"},{option:"no",value:"'no'"},{option:"never",value:"'never'"},{option:"route",value:"'route'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayallow=_.keyBy([{option:"ulaw",value:"'ulaw'"},{option:"alaw",value:"'alaw'"},{option:"gsm",value:"'gsm'"},{option:"g722",value:"'g722'"},{option:"g729",value:"'g729'"},{option:"opus",value:"'opus'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraycrudPermissions=_.keyBy([{option:"readAndEditAndDelete",value:"0"},{option:"readAndEdit",value:"1"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.staff.users.edit",{id:e.id,user:e})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the user?").htmlContent("<b>"+(e.name||"user")+"</b> will be deleted.").ariaLabel("delete user").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getUsers=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.user.get(v.query,f).$promise},v.createOrEditUser=function(e,t){i.show({controller:"CreateOrEditUserDialogController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/users/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{user:t,users:v.users.rows,license:v.license,setting:v.setting}})},v.deleteUser=A,v.exportSelectedUsers=function(){var e=angular.copy(v.selectedUsers);return v.selectedUsers=[],e},v.deleteSelectedUsers=function(e){var t=i.confirm().title("Are you sure want to delete the selected users?").htmlContent("<b>"+v.selectedUsers.length+" selected</b> will be deleted.").ariaLabel("delete Users").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedUsers.forEach(function(e){A(e)}),v.selectedUsers=[]})},v.deselectUsers=function(){v.selectedUsers=[]},v.selectAllUsers=function(){v.selectedUsers=v.users.rows};var h=!0,b=1;function f(e){v.users=e||{count:0,rows:[]}}function A(e){l.user.delete({id:e.id}).$promise.then(function(){_.remove(v.users.rows,{id:e.id}),v.users.count-=1,v.users.rows.length||v.getUsers(),c.success({title:"User deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEuser"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEuser",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getUsers())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","users","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.staff").controller("UsersController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.cannedAnswers=r||{count:0,rows:[]},v.table="cannedAnswers",v.listOrder="",v.listOrderAsc=null,v.selectedCannedAnswers=[],v.query={fields:"createdAt,updatedAt,id,key,value,description",sort:"-updatedAt",MailAccountId:"null",FaxAccountId:"null",SmsAccountId:"null",OpenchannelAccountId:"null",ChatWebsiteId:"null",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditCannedAnswerDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/cannedAnswers/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{cannedAnswer:e,cannedAnswers:v.cannedAnswers.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the cannedAnswer?").htmlContent("<b>"+(e.name||"cannedAnswer")+"</b> will be deleted.").ariaLabel("delete cannedAnswer").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getCannedAnswers=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.cannedAnswer.get(v.query,f).$promise},v.createOrEditCannedAnswer=function(e,t){i.show({controller:"CreateOrEditCannedAnswerDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/cannedAnswers/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{cannedAnswer:t,cannedAnswers:v.cannedAnswers.rows,license:v.license,setting:v.setting}})},v.deleteCannedAnswer=A,v.exportSelectedCannedAnswers=function(){var e=angular.copy(v.selectedCannedAnswers);return v.selectedCannedAnswers=[],e},v.deleteSelectedCannedAnswers=function(e){var t=i.confirm().title("Are you sure want to delete the selected cannedAnswers?").htmlContent("<b>"+v.selectedCannedAnswers.length+" selected</b> will be deleted.").ariaLabel("delete CannedAnswers").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedCannedAnswers.forEach(function(e){A(e)}),v.selectedCannedAnswers=[]})},v.deselectCannedAnswers=function(){v.selectedCannedAnswers=[]},v.selectAllCannedAnswers=function(){v.selectedCannedAnswers=v.cannedAnswers.rows};var h=!0,b=1;function f(e){v.cannedAnswers=e||{count:0,rows:[]}}function A(e){l.cannedAnswer.delete({id:e.id}).$promise.then(function(){_.remove(v.cannedAnswers.rows,{id:e.id}),v.cannedAnswers.count-=1,v.cannedAnswers.rows.length||v.getCannedAnswers(),c.success({title:"CannedAnswer deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEcannedAnswer"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEcannedAnswer",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getCannedAnswers())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","cannedAnswers","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("CannedAnswersController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_CANNEDANSWER",m.cannedAnswer=angular.copy(s),m.cannedAnswers=o,m.newCannedAnswer=!1,m.cannedAnswer||(m.cannedAnswer={},m.title="TOOLS.NEW_CANNEDANSWER",m.newCannedAnswer=!0),m.addNewCannedAnswer=function(){m.errors=[],r.cannedAnswer.save(m.cannedAnswer).$promise.then(function(e){m.cannedAnswers.unshift(e.toJSON()),i.success({title:"CannedAnswer properly created",msg:m.cannedAnswer.name?m.cannedAnswer.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveCannedAnswer=function(){m.errors=[],r.cannedAnswer.update({id:m.cannedAnswer.id},m.cannedAnswer).$promise.then(function(e){var t=_.find(m.cannedAnswers,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"CannedAnswer properly saved!",msg:m.cannedAnswer.name?m.cannedAnswer.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteCannedAnswer=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The cannedAnswer will be deleted.").ariaLabel("Delete CannedAnswer").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.cannedAnswer.delete({id:m.cannedAnswer.id}).$promise.then(function(){_.remove(m.cannedAnswers,{id:m.cannedAnswer.id}),i.success({title:"CannedAnswer properly deleted!",msg:(m.cannedAnswer.name||"cannedAnswer")+" has been deleted!"}),u(m.cannedAnswer)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.cannedAnswer.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","cannedAnswers","cannedAnswer","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditCannedAnswerDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_CUSTOMDASHBOARD",m.customDashboard=angular.copy(s),m.customDashboards=o,m.newCustomDashboard=!1,m.customDashboard||(m.customDashboard={},m.title="TOOLS.NEW_CUSTOMDASHBOARD",m.newCustomDashboard=!0),m.addNewCustomDashboard=function(){m.errors=[],r.dashboard.save(m.customDashboard).$promise.then(function(e){m.customDashboards.unshift(e.toJSON()),i.success({title:"CustomDashboard properly created",msg:m.customDashboard.name?m.customDashboard.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.dashboard.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.dashboard.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveCustomDashboard=function(){m.errors=[],r.dashboard.update({id:m.customDashboard.id},m.customDashboard).$promise.then(function(e){var t=_.find(m.customDashboards,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"CustomDashboard properly saved!",msg:m.customDashboard.name?m.customDashboard.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.dashboard.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.dashboard.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteCustomDashboard=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The customDashboard will be deleted.").ariaLabel("Delete CustomDashboard").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.dashboard.delete({id:m.customDashboard.id}).$promise.then(function(){_.remove(m.customDashboards,{id:m.customDashboard.id}),i.success({title:"CustomDashboard properly deleted!",msg:(m.customDashboard.name||"customDashboard")+" has been deleted!"}),u(m.customDashboard)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.dashboard.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.dashboard.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","customDashboards","customDashboard","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditCustomDashboardDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.customDashboards=r||{count:0,rows:[]},v.table="customDashboards",v.listOrder="",v.listOrderAsc=null,v.selectedCustomDashboards=[],v.query={fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",limit:10,page:1},v.editstate=function(e,t){n.go("app.tools.customDashboards.edit",{id:e.id,customDashboard:e})},v.useradddialog=function(e,t){i.show({controller:"CustomDashboarduseraddController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/customDashboards/edit/useradd/useradd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{customDashboard:e,customDashboards:v.customDashboards?v.customDashboards.rows:[]}})},v.clonedialog=function(e,t){i.show({controller:"CustomDashboardcloneController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/customDashboards/edit/clone/clone.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{customDashboard:e,customDashboards:v.customDashboards?v.customDashboards.rows:[]}})},v.gotodashboardgoto=function(e,t){n.go("app.dashboards.custom",{id:e.id})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the customDashboard?").htmlContent("<b>"+(e.name||"customDashboard")+"</b> will be deleted.").ariaLabel("delete customDashboard").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getCustomDashboards=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.dashboard.get(v.query,f).$promise},v.createOrEditCustomDashboard=function(e,t){i.show({controller:"CreateOrEditCustomDashboardDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/customDashboards/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{customDashboard:t,customDashboards:v.customDashboards.rows,license:v.license,setting:v.setting}})},v.deleteCustomDashboard=A,v.exportSelectedCustomDashboards=function(){var e=angular.copy(v.selectedCustomDashboards);return v.selectedCustomDashboards=[],e},v.deleteSelectedCustomDashboards=function(e){var t=i.confirm().title("Are you sure want to delete the selected customDashboards?").htmlContent("<b>"+v.selectedCustomDashboards.length+" selected</b> will be deleted.").ariaLabel("delete CustomDashboards").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedCustomDashboards.forEach(function(e){A(e)}),v.selectedCustomDashboards=[]})},v.deselectCustomDashboards=function(){v.selectedCustomDashboards=[]},v.selectAllCustomDashboards=function(){v.selectedCustomDashboards=v.customDashboards.rows};var h=!0,b=1;function f(e){v.customDashboards=e||{count:0,rows:[]}}function A(e){l.dashboard.delete({id:e.id}).$promise.then(function(){_.remove(v.customDashboards.rows,{id:e.id}),v.customDashboards.count-=1,v.customDashboards.rows.length||v.getCustomDashboards(),c.success({title:"CustomDashboard deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEdashboard"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEdashboard",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getCustomDashboards())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","customDashboards","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("CustomDashboardsController",e)}(),function(){"use strict";function e(t,n,a,e,i,o,s){var r=this;function l(e){t.hide(e)}r.newCustomDashboard=!0,r.customDashboard=angular.copy(i),r.customDashboards=o,r.title=s.instant("TOOLS.CLONE_CUSTOMDASHBOARD"),i&&i.name&&(r.title+=": "+i.name),r.cloneCustomDashboard=function(){return e.dashboard.clone({id:i.id,includeAll:!0},r.customDashboard).$promise.then(function(e){r.customDashboards.unshift(e.toJSON()),a.success({title:"CustomDashboard properly cloned",msg:r.customDashboard.name?r.customDashboard.name+" has been cloned!":""}),n.go("app.tools.customDashboards.edit",{id:e.id}),l(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){r.errors=e.data.errors||[{message:e.toString(),type:"api.dashboard.clone"}];for(var t=0;t<e.data.errors.length;t+=1)a.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.dashboard.clone",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},r.closeDialog=l}e.$inject=["$mdDialog","$state","toasty","api","customDashboard","customDashboards","$translate"],angular.module("app.tools").controller("CustomDashboardcloneController",e)}(),function(){"use strict";function e(n,a,e,i,o){var s=this;function t(e,t,n){return o.dashboardItem.update(n).$promise.catch(function(e){console.error(e)})}s.customDashboard={},s.voiceQueues=o.rpc.getVoiceQueues({fields:"id,name"}),s.init=function(e){return s.customDashboard=e,s.customDashboard.draggable={enabled:!0,handle:".draggable",stop:t},s.customDashboard.resizable={enabled:!0,handle:".resizable",stop:t},s.customDashboard.widgets=[],o.dashboard.getItems({id:e.id}).$promise.then(function(e){if(e&&e.count&&e.rows)for(var t=0;t<e.rows.length;t+=1)e.rows[t].voiceQueues=s.voiceQueues,e.rows[t].voiceQueuesSelected=_.map(s.voiceQueues.rows,"id"),e.rows[t].templateUrl="app/core/directives/ms-widget-engine/ms-widget-engine-"+e.rows[t].type+"/ms-widget-engine."+e.rows[t].type+".html",s.customDashboard.widgets.push(e.rows[t])}).catch(function(e){console.error(e)})},s.createOrEditWidget=function(e){if(e&&e.attrs)for(var t=0;t<e.attrs.length;t+=1)e[e.attrs[t].name]=e.attrs[t].value;n.show({controller:"CreateOrEditDashboardItemDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/customDashboards/edit/dashboard/dialog.html",parent:angular.element(a.body),clickOutsideToClose:!0,locals:{dashboarditem:e,dashboard:s.customDashboard.widgets,license:null,setting:null}}).then(function(e){for(var t=0;t<s.customDashboard.widgets.length;t+=1)s.customDashboard.widgets[t].id===e.id&&(s.customDashboard.widgets[t].attrs=e.attrs,s.customDashboard.widgets[t].voiceQueues=s.voiceQueues,s.customDashboard.widgets[t].voiceQueuesSelected=_.map(s.voiceQueues.rows,"id"),s.customDashboard.widgets[t].templateUrl="app/core/directives/ms-widget-engine/ms-widget-engine-"+s.customDashboard.widgets[t].type+"/ms-widget-engine."+s.customDashboard.widgets[t].type+".html")})},s.deleteWidget=function(t){var e=n.confirm().title("Would you like to delete "+t.title+"?").textContent("").ariaLabel("Delete Widget").ok("YES").cancel("NO");n.show(e).then(function(){return o.dashboardItem.delete({id:t.id}).$promise.then(function(e){_.remove(s.customDashboard.widgets,{id:t.id}),i.success({title:"Widget deleted!",msg:t.name?t.name+" has been deleted!":"Widget has been deleted!"})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){s.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETE.customDashboard"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEdashboard",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()});console.error(e)})})}}e.$inject=["$mdDialog","$document","socket","toasty","api"],angular.module("app.tools").controller("CustomDashboardItemsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_DASHBOARDITEM",m.dashboarditem=angular.copy(s),m.dashboard=o,m.newDashboardItem=!1,m.dashboarditem||(m.dashboarditem={type:"counter",attrUrl:"https://",attrHourFormat:"HH:mm:ss",attrTimezone:"0.00",attrMetric:"total",attrSerie1:"total",attrSerie2:"null",attrSerie3:"null",attrRefresh:10,attrFontSize:20,foreground:"#2196f3",background:"#ffffff"},m.title="TOOLS.NEW_DASHBOARDITEM",m.newDashboardItem=!0),m.addNewDashboardItem=function(){m.errors=[],r.dashboard.addItem({id:t.params.id},m.dashboarditem).$promise.then(function(e){m.dashboard.unshift(e.toJSON()),i.success({title:"DashboardItem properly created",msg:m.dashboarditem.name?m.dashboarditem.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.dashboardItem.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.dashboardItem.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveDashboardItem=function(){m.errors=[],r.dashboardItem.update({id:m.dashboarditem.id},m.dashboarditem).$promise.then(function(e){var t=_.find(m.dashboard,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"DashboardItem properly saved!",msg:m.dashboarditem.name?m.dashboarditem.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.dashboardItem.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.dashboardItem.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteDashboardItem=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The dashboarditem will be deleted.").ariaLabel("Delete DashboardItem").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.dashboardItem.delete({id:m.dashboarditem.id}).$promise.then(function(){_.remove(m.dashboard,{id:m.dashboarditem.id}),i.success({title:"DashboardItem properly deleted!",msg:(m.dashboarditem.name||"dashboarditem")+" has been deleted!"}),u(m.dashboarditem)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.dashboardItem.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.dashboardItem.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.analyticCustomReport.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){m.customReports=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcustomReports",msg:e.data?JSON.stringify(e.data):e.toString()})}),r.voiceQueue.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){m.voiceQueues=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueues",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","dashboard","dashboarditem","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditDashboardItemDialogController",e)}(),function(){"use strict";function e(e,i,o,s,t,n,a){var r=this;r.closeDialog=function(){e.hide()},r.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"penalty",labelAll:n.instant("TOOLS.ALL_USERS"),labelSelected:n.instant("TOOLS.SELECTED_USERS"),transferCallback:function(e,t){for(var n=0,a=0;n<e.length;n+=1)a=99999+s.id,e[n].permissions=t?_.without(e[n].permissions,a):_.concat(e[n].permissions,a),o.user.update(e[n]).$promise.then(function(){i.success({title:"User properly "+(t?"removed":"added"),msg:"User has been "+(t?"removed":"added")+"!"})}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:dashboard.ADDUSERS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},function(){if(s&&s.id){var t=99999+s.id;o.user.get({fields:"id,fullname,name,internal,permissions",role:"user",nolimit:!0}).$promise.then(function(e){r.dualMultiselectOptions.selectedItems=_.filter(e.rows,function(e){return _.includes(e.permissions,t)}),r.dualMultiselectOptions.items=_.differenceBy(e.rows,r.dualMultiselectOptions.selectedItems,"id")}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETUSERS.GETAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}}()}e.$inject=["$mdDialog","toasty","api","customDashboard","customDashboards","$translate","Auth"],angular.module("app.tools").controller("CustomDashboarduseraddController",e)}(),function(){"use strict";function e(n,e,a,i,t,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=t,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=e.protocol()+"://"+e.host(),c.customDashboard=d||n.params.customDashboard||{},c.selectedTab=n.params.tab||0,c.useradddialog=function(e,t){a.show({controller:"CustomDashboarduseraddController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/customDashboards/edit/useradd/useradd.html",parent:angular.element(i.body),targetEvent:t,clickOutsideToClose:!0,locals:{customDashboard:e,customDashboards:c.customDashboards?c.customDashboards.rows:[]}})},c.clonedialog=function(e,t){a.show({controller:"CustomDashboardcloneController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/customDashboards/edit/clone/clone.html",parent:angular.element(i.body),targetEvent:t,clickOutsideToClose:!0,locals:{customDashboard:e,customDashboards:c.customDashboards?c.customDashboards.rows:[]}})},c.gotogoto=function(e,t){n.go("app.dashboards.custom",{id:e.id})},c.alert=r.info,c.gotoCustomDashboards=function(){n.go("app.tools.customDashboards")},c.saveCustomDashboard=function(){s.dashboard.update({id:c.customDashboard.id},c.customDashboard).$promise.then(function(){r.success({title:"CustomDashboard updated!",msg:c.customDashboard.name?c.customDashboard.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETdashboard",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","customDashboard"],angular.module("app.tools").controller("CustomDashboardController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_INTERVAL",m.interval=angular.copy(s),m.intervals=o,m.newInterval=!1,m.interval||(m.interval={},m.title="TOOLS.NEW_INTERVAL",m.newInterval=!0),m.addNewInterval=function(){m.errors=[],r.interval.save(m.interval).$promise.then(function(e){m.intervals.unshift(e.toJSON()),i.success({title:"Interval properly created",msg:m.interval.name?m.interval.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.interval.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveInterval=function(){m.errors=[],r.interval.update({id:m.interval.id},m.interval).$promise.then(function(e){var t=_.find(m.intervals,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Interval properly saved!",msg:m.interval.name?m.interval.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.interval.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteInterval=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The interval will be deleted.").ariaLabel("Delete Interval").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.interval.delete({id:m.interval.id}).$promise.then(function(){_.remove(m.intervals,{id:m.interval.id}),i.success({title:"Interval properly deleted!",msg:(m.interval.name||"interval")+" has been deleted!"}),u(m.interval)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.interval.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.interval.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","intervals","interval","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditIntervalDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;if(l.errors=[],l.title="TOOLS.EDIT_INTERVAL",l.interval=angular.copy(i),l.intervals=o,l.newInterval=!1,l.types=["always","custom"],l.daysOfWeek=a.getDaysOfWeek(),l.monthNumber=a.getMonthNumber(),l.monthName=a.getMonthName(),l.daysOfMonth=a.getDaysOfMonth(),l.interval)if("*,*,*,*"!==l.interval.interval){l.type="custom";var d=l.interval.interval.split(","),c=d[0],m=d[1],u=d[2],p=d[3];if("*"!==c){var g,v=c.split("-")[0],h=c.split("-")[1];(g=new Date).setHours(Number(v.split(":")[0])),g.setMinutes(Number(v.split(":")[1])),l.timeRangeFrom=g,(g=new Date).setHours(Number(h.split(":")[0])),g.setMinutes(Number(h.split(":")[1])),l.timeRangeTo=g}"*"!==m&&(l.dayOfWeekFrom=m.split("-")[0],l.dayOfWeekTo=m.split("-")[1]),"*"!==u&&(l.monthDayFrom=u.split("-")[0],l.monthDayTo=u.split("-")[1]),"*"!==p&&(l.monthFrom=p.split("-")[0],l.monthTo=p.split("-")[1])}else l.type="always";else l.interval={interval:"*,*,*,*"},l.type="always",l.title="TOOLS.NEW_INTERVAL",l.newInterval=!0;function b(){switch(l.type){case"always":case"list":return"*,*,*,*";case"custom":var e=[];if("*"!==l.timeRangeFrom&&l.timeRangeFrom&&l.timeRangeTo){var t=(l.timeRangeFrom.getHours()<10?"0":"")+l.timeRangeFrom.getHours()+":"+(l.timeRangeFrom.getMinutes()<10?"0":"")+l.timeRangeFrom.getMinutes(),n=(l.timeRangeTo.getHours()<10?"0":"")+l.timeRangeTo.getHours()+":"+(l.timeRangeTo.getMinutes()<10?"0":"")+l.timeRangeTo.getMinutes();e.push(t+"-"+n)}else e.push("*");return l.dayOfWeekFrom?l.dayOfWeekTo?e.push(l.dayOfWeekFrom+"-"+l.dayOfWeekTo):e.push(l.dayOfWeekFrom):e.push("*"),l.monthDayFrom?l.monthDayTo?e.push(l.monthDayFrom+"-"+l.monthDayTo):e.push(l.monthDayFrom):e.push("*"),l.monthFrom?l.monthTo?e.push(l.monthFrom+"-"+l.monthTo):e.push(l.monthFrom):e.push("*"),e.join()}}function f(e){t.hide(e)}e.params.id&&!l.interval.application&&(l.interval.IntervalId=e.params.id),l.interval.IntervalId&&l.interval.application&&(l.type="list"),l.addNewInterval=function(){l.errors=[],l.interval.interval=b(),r.interval.save(l.interval).$promise.then(function(e){l.intervals.push(e),s.success({title:"Interval properly created",msg:l.interval.name?l.interval.name+" has been created!":""}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}]})},l.saveInterval=function(){l.errors=[],l.interval.interval=b(),l.interval.application?("list"!==l.type&&(l.interval.IntervalId=null),f(l.interval)):r.interval.update({id:l.interval.id},l.interval).$promise.then(function(e){var t=_.find(l.intervals,{id:e.id});t&&_.merge(t,e),s.success({title:"Interval properly saved!",msg:"Interval has been saved!"}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}]})},l.closeDialog=f,l.interval.application&&r.interval.get({fields:"id,name,interval,IntervalId",IntervalId:"null",nolimit:!0}).$promise.then(function(e){l.intervals=e}).catch(function(e){console.error(e)})}e.$inject=["$state","$mdDialog","$mdToast","IndexFactory","interval","intervals","toasty","api"],angular.module("app.voice").controller("EditAppintervalDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.interval={},c.intervalIntervals={count:0,rows:[]},c.selectedIntervalIntervals=[],c.sortableTable={animation:100,onSort:function(e){l.interval.addIntervals({id:c.interval.id},e.models).$promise.then(function(e){c.intervalIntervals.rows=e}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:SORTABLETABLE",msg:e.data?JSON.stringify(e.data):e.toString()})})}},c.query={fields:"createdAt,updatedAt,id,name,interval,createdAt",nolimit:"true",limit:10,page:1},c.init=function(e){c.interval=e,c.query.id=c.interval.id,c.getIntervalIntervals()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the interval?").htmlContent("<b>"+(e.name||"interval")+"</b> will be deleted.").ariaLabel("delete interval").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getIntervalIntervals=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.interval.getIntervals(c.query,p).$promise},c.createOrEditIntervalInterval=function(e,t){o.show({controller:"EditAppintervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/intervals/edit/apps/interval/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:c.interval,interval:t,intervals:c.intervalIntervals.rows,license:null,setting:null}})},c.exportSelectedIntervalIntervals=function(){var e=angular.copy(c.selectedIntervalIntervals);return c.selectedIntervalIntervals=[],e},c.deleteIntervalInterval=g,c.deleteSelectedIntervalIntervals=function(e){var t=o.confirm().title("Are you sure want to delete the selected intervals?").htmlContent("<b>"+c.selectedIntervalIntervals.length+" selected</b> will be deleted.").ariaLabel("delete intervals").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedIntervalIntervals.forEach(function(e){g(e)}),c.selectedIntervalIntervals=[]})};var m=!0,u=1;function p(e){c.intervalIntervals=e||{count:0,rows:[]}}function g(e){l.interval.delete({id:e.id}).$promise.then(function(){_.remove(c.intervalIntervals.rows,{id:e.id}),c.intervalIntervals.count-=1,c.intervalIntervals.rows.length||c.getIntervalIntervals(),r.success({title:"Interval deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETinterval"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getIntervalIntervals())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.tools").controller("IntervalIntervalsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_INTERVAL",m.interval=angular.copy(s),m.intervals=o,m.newInterval=!1,m.interval||(m.interval={},m.title="TOOLS.NEW_INTERVAL",m.newInterval=!0),m.addNewInterval=function(){m.errors=[],r.interval.save(m.interval).$promise.then(function(e){m.intervals.unshift(e.toJSON()),i.success({title:"Interval properly created",msg:m.interval.name?m.interval.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.interval.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveInterval=function(){m.errors=[],r.interval.update({id:m.interval.id},m.interval).$promise.then(function(e){var t=_.find(m.intervals,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Interval properly saved!",msg:m.interval.name?m.interval.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.interval.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteInterval=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The interval will be deleted.").ariaLabel("Delete Interval").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.interval.delete({id:m.interval.id}).$promise.then(function(){_.remove(m.intervals,{id:m.interval.id}),i.success({title:"Interval properly deleted!",msg:(m.interval.name||"interval")+" has been deleted!"}),u(m.interval)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.interval.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.interval.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","intervals","interval","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditIntervalDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.interval=d||e.params.interval||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoIntervals=function(){e.go("app.tools.intervals")},c.saveInterval=function(){s.interval.update({id:c.interval.id},c.interval).$promise.then(function(){r.success({title:"Interval updated!",msg:c.interval.name?c.interval.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETinterval",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","interval"],angular.module("app.tools").controller("IntervalController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.intervals=r||{count:0,rows:[]},v.table="intervals",v.listOrder="",v.listOrderAsc=null,v.selectedIntervals=[],v.query={fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",IntervalId:"null",limit:10,page:1},v.editstate=function(e,t){n.go("app.tools.intervals.edit",{id:e.id,interval:e})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the interval?").htmlContent("<b>"+(e.name||"interval")+"</b> will be deleted.").ariaLabel("delete interval").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getIntervals=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.interval.get(v.query,f).$promise},v.createOrEditInterval=function(e,t){i.show({controller:"CreateOrEditIntervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/intervals/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:t,intervals:v.intervals.rows,license:v.license,setting:v.setting}})},v.deleteInterval=A,v.exportSelectedIntervals=function(){var e=angular.copy(v.selectedIntervals);return v.selectedIntervals=[],e},v.deleteSelectedIntervals=function(e){var t=i.confirm().title("Are you sure want to delete the selected intervals?").htmlContent("<b>"+v.selectedIntervals.length+" selected</b> will be deleted.").ariaLabel("delete Intervals").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedIntervals.forEach(function(e){A(e)}),v.selectedIntervals=[]})},v.deselectIntervals=function(){v.selectedIntervals=[]},v.selectAllIntervals=function(){v.selectedIntervals=v.intervals.rows};var h=!0,b=1;function f(e){v.intervals=e||{count:0,rows:[]}}function A(e){l.interval.delete({id:e.id}).$promise.then(function(){_.remove(v.intervals.rows,{id:e.id}),v.intervals.count-=1,v.intervals.rows.length||v.getIntervals(),c.success({title:"Interval deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEinterval"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEinterval",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getIntervals())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","intervals","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("IntervalsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_PAUSE",m.pause=angular.copy(s),m.pauses=o,m.newPause=!1,m.pause||(m.pause={},m.title="TOOLS.NEW_PAUSE",m.newPause=!0),m.addNewPause=function(){m.errors=[],r.pause.save(m.pause).$promise.then(function(e){m.pauses.unshift(e.toJSON()),i.success({title:"Pause properly created",msg:m.pause.name?m.pause.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.pause.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.pause.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.savePause=function(){m.errors=[],r.pause.update({id:m.pause.id},m.pause).$promise.then(function(e){var t=_.find(m.pauses,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Pause properly saved!",msg:m.pause.name?m.pause.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.pause.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.pause.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deletePause=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The pause will be deleted.").ariaLabel("Delete Pause").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.pause.delete({id:m.pause.id}).$promise.then(function(){_.remove(m.pauses,{id:m.pause.id}),i.success({title:"Pause properly deleted!",msg:(m.pause.name||"pause")+" has been deleted!"}),u(m.pause)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.pause.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.pause.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","pauses","pause","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditPauseDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.pauses=r||{count:0,rows:[]},v.table="pauses",v.listOrder="",v.listOrderAsc=null,v.selectedPauses=[],v.query={fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditPauseDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/pauses/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{pause:e,pauses:v.pauses.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the pause?").htmlContent("<b>"+(e.name||"pause")+"</b> will be deleted.").ariaLabel("delete pause").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getPauses=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.pause.get(v.query,f).$promise},v.createOrEditPause=function(e,t){i.show({controller:"CreateOrEditPauseDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/pauses/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{pause:t,pauses:v.pauses.rows,license:v.license,setting:v.setting}})},v.deletePause=A,v.exportSelectedPauses=function(){var e=angular.copy(v.selectedPauses);return v.selectedPauses=[],e},v.deleteSelectedPauses=function(e){var t=i.confirm().title("Are you sure want to delete the selected pauses?").htmlContent("<b>"+v.selectedPauses.length+" selected</b> will be deleted.").ariaLabel("delete Pauses").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedPauses.forEach(function(e){A(e)}),v.selectedPauses=[]})},v.deselectPauses=function(){v.selectedPauses=[]},v.selectAllPauses=function(){v.selectedPauses=v.pauses.rows};var h=!0,b=1;function f(e){v.pauses=e||{count:0,rows:[]}}function A(e){l.pause.delete({id:e.id}).$promise.then(function(){_.remove(v.pauses.rows,{id:e.id}),v.pauses.count-=1,v.pauses.rows.length||v.getPauses(),c.success({title:"Pause deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEpause"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEpause",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getPauses())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","pauses","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("PausesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_SCHEDULE",m.schedule=angular.copy(s),m.schedules=o,m.newSchedule=!1,m.schedule||(m.schedule={type:"custom",output:"xlsx",active:!0,startAt:new Date,endAt:new Date(Date.now()+2592e6),cron:"0 0 * * *",subtractNumber:1,subtractUnit:"days",sendMail:!1},m.title="TOOLS.NEW_SCHEDULE",m.newSchedule=!0),m.addNewSchedule=function(){m.errors=[],r.schedule.save(m.schedule).$promise.then(function(e){m.schedules.unshift(e.toJSON()),i.success({title:"Schedule properly created",msg:m.schedule.name?m.schedule.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.schedule.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.schedule.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSchedule=function(){m.errors=[],r.schedule.update({id:m.schedule.id},m.schedule).$promise.then(function(e){var t=_.find(m.schedules,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Schedule properly saved!",msg:m.schedule.name?m.schedule.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.schedule.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.schedule.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSchedule=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The schedule will be deleted.").ariaLabel("Delete Schedule").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.schedule.delete({id:m.schedule.id}).$promise.then(function(){_.remove(m.schedules,{id:m.schedule.id}),i.success({title:"Schedule properly deleted!",msg:(m.schedule.name||"schedule")+" has been deleted!"}),u(m.schedule)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.schedule.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.schedule.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.analyticCustomReport.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.customReports=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcustomReports",msg:e.data?JSON.stringify(e.data):e.toString()})}),r.analyticDefaultReport.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.defaultReports=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETdefaultReports",msg:e.data?JSON.stringify(e.data):e.toString()})}),r.mailAccount.get({fields:"id,name",sort:"name"}).$promise.then(function(e){m.mailAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","schedules","schedule","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditScheduleDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.schedules=r||{count:0,rows:[]},v.table="schedules",v.listOrder="",v.listOrderAsc=null,v.selectedScheduler=[],v.query={fields:"createdAt,updatedAt,id,name,type,DefaultReportId,CustomReportId,output,active,startAt,endAt,cron,subtractNumber,subtractUnit,sendMail,MailAccountId,email,description",sort:"-updatedAt",limit:10,page:1},v.arraytype=_.keyBy([{option:"Default",value:"'default'"},{option:"Custom",value:"'custom'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayoutput=_.keyBy([{option:"CSV",value:"'csv'"},{option:"PDF",value:"'pdf'"},{option:"Excel",value:"'xlsx'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraysubtractUnit=_.keyBy([{option:"Minutes",value:"'minutes'"},{option:"Hours",value:"'hours'"},{option:"Days",value:"'days'"},{option:"Weeks",value:"'weeks'"},{option:"Months",value:"'months'"},{option:"Quarters",value:"'quarters'"},{option:"Years",value:"'years'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editdialog=function(e,t){i.show({controller:"CreateOrEditScheduleDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/schedules/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{schedule:e,schedules:v.schedules.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the schedule?").htmlContent("<b>"+(e.name||"schedule")+"</b> will be deleted.").ariaLabel("delete schedule").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getScheduler=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.schedule.get(v.query,f).$promise},v.createOrEditSchedule=function(e,t){i.show({controller:"CreateOrEditScheduleDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/schedules/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{schedule:t,schedules:v.schedules.rows,license:v.license,setting:v.setting}})},v.deleteSchedule=A,v.exportSelectedScheduler=function(){var e=angular.copy(v.selectedScheduler);return v.selectedScheduler=[],e},v.deleteSelectedScheduler=function(e){var t=i.confirm().title("Are you sure want to delete the selected schedules?").htmlContent("<b>"+v.selectedScheduler.length+" selected</b> will be deleted.").ariaLabel("delete Schedules").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedScheduler.forEach(function(e){A(e)}),v.selectedScheduler=[]})},v.deselectScheduler=function(){v.selectedScheduler=[]},v.selectAllScheduler=function(){v.selectedScheduler=v.schedules.rows},l.analyticCustomReport.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.customReports=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcustomReports",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.analyticDefaultReport.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.defaultReports=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETdefaultReports",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.mailAccount.get({fields:"id,name",sort:"name"}).$promise.then(function(e){v.mailAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.schedules=e||{count:0,rows:[]}}function A(e){l.schedule.delete({id:e.id}).$promise.then(function(){_.remove(v.schedules.rows,{id:e.id}),v.schedules.count-=1,v.schedules.rows.length||v.getScheduler(),c.success({title:"Schedule deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEschedule"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEschedule",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getScheduler())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","schedules","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("SchedulesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_SOUND",m.sound=angular.copy(s),m.sounds=o,m.newSound=!1,m.sound||(m.sound={},m.title="TOOLS.NEW_SOUND",m.newSound=!0),m.addNewSound=function(){m.errors=[],r.sound.save(m.sound).$promise.then(function(e){m.sounds.unshift(e.toJSON()),i.success({title:"Sound properly created",msg:m.sound.name?m.sound.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.sound.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.sound.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveSound=function(){m.errors=[],r.sound.update({id:m.sound.id},m.sound).$promise.then(function(e){var t=_.find(m.sounds,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Sound properly saved!",msg:m.sound.name?m.sound.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.sound.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.sound.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteSound=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The sound will be deleted.").ariaLabel("Delete Sound").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.sound.delete({id:m.sound.id}).$promise.then(function(){_.remove(m.sounds,{id:m.sound.id}),i.success({title:"Sound properly deleted!",msg:(m.sound.name||"sound")+" has been deleted!"}),u(m.sound)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.sound.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.sound.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","sounds","sound","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditSoundDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.sounds=r||{count:0,rows:[]},v.table="sounds",v.listOrder="",v.listOrderAsc=null,v.selectedSounds=[],v.query={fields:"createdAt,updatedAt,id,save_name,converted_format,name,audio,description",sort:"-updatedAt",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditSoundDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/sounds/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{sound:e,sounds:v.sounds.rows,license:v.license,setting:null}})},v.downloadfile2=function(o,e){return l.sound.download({id:o.id}).$promise.then(function(e){var t=[e.buffer],n="download",a=new Blob(t,{type:e.type});n=o.converted_format?o.save_name+"."+o.converted_format:o.save_name;var i=window.document.createElement("a");i.setAttribute("href",URL.createObjectURL(a)),i.setAttribute("download",n),i.click()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.sound.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the sound?").htmlContent("<b>"+(e.name||"sound")+"</b> will be deleted.").ariaLabel("delete sound").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getSounds=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.sound.get(v.query,f).$promise},v.createOrEditSound=function(e,t){i.show({controller:"CreateOrEditSoundDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/sounds/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{sound:t,sounds:v.sounds.rows,license:v.license,setting:v.setting}})},v.deleteSound=A,v.exportSelectedSounds=function(){var e=angular.copy(v.selectedSounds);return v.selectedSounds=[],e},v.deleteSelectedSounds=function(e){var t=i.confirm().title("Are you sure want to delete the selected sounds?").htmlContent("<b>"+v.selectedSounds.length+" selected</b> will be deleted.").ariaLabel("delete Sounds").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedSounds.forEach(function(e){A(e)}),v.selectedSounds=[]})},v.deselectSounds=function(){v.selectedSounds=[]},v.selectAllSounds=function(){v.selectedSounds=v.sounds.rows},v.uploadSound=function(e){i.show({controller:"UploadSoundDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/sounds/uploadsound/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{sounds:v.sounds.rows}})};var h=!0,b=1;function f(e){v.sounds=e||{count:0,rows:[]}}function A(e){l.sound.delete({id:e.id}).$promise.then(function(){_.remove(v.sounds.rows,{id:e.id}),v.sounds.count-=1,v.sounds.rows.length||v.getSounds(),c.success({title:"Sound deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEsound"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEsound",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getSounds())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","sounds","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("SoundsController",e)}(),function(){"use strict";function e(e,t,a,n,i){var o=this;o.errors=[],o.title="TOOLS.UPLOAD_SOUND",o.sounds=n,o.uploadSounds=[],o.sound={},o.ngFlowOptions={maxChunkRetries:1,chunkSize:15728640,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,target:"api/sounds",allowDuplicateUploads:!0},o.ngFlow={flow:{}},o.dropping=!1,o.fileAdded=function(e){var t=["wav","mp3","gsm"];if(!_.includes(t,e.getExtension()))return a.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported only: "+t.join()}),!1;if(15728640<e.size)return a.error({title:"File too big",msg:"The max allowed size for audio files is 15 Mb"}),!1;var n={id:e.uniqueIdentifier,file:e,type:"uploading"};return o.uploadSounds.unshift(n),!0},o.upload=function(){o.ngFlow.flow.opts.headers={"X-Requested-With":"XMLHttpRequest",Authorization:"Bearer "+e.get("motion.token")},o.ngFlow.flow.upload()},o.fileSuccess=function(a,e){o.sounds.unshift(JSON.parse(e)),angular.forEach(o.uploadSounds,function(t,e){if(t.id===a.uniqueIdentifier){var n=new FileReader;n.readAsDataURL(t.file.file),n.onload=function(e){t.url=e.target.result},t.type="sound"}})},o.closeDialog=function(){t.hide()}}e.$inject=["$cookies","$mdDialog","toasty","sounds","api"],angular.module("app.tools").controller("UploadSoundDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_TAG",m.tag=angular.copy(s),m.tags=o,m.newTag=!1,m.tag||(m.tag={},m.title="TOOLS.NEW_TAG",m.newTag=!0),m.addNewTag=function(){m.errors=[],r.tag.save(m.tag).$promise.then(function(e){m.tags.unshift(e.toJSON()),i.success({title:"Tag properly created",msg:m.tag.name?m.tag.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.tag.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.tag.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveTag=function(){m.errors=[],r.tag.update({id:m.tag.id},m.tag).$promise.then(function(e){var t=_.find(m.tags,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Tag properly saved!",msg:m.tag.name?m.tag.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.tag.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.tag.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteTag=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The tag will be deleted.").ariaLabel("Delete Tag").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.tag.delete({id:m.tag.id}).$promise.then(function(){_.remove(m.tags,{id:m.tag.id}),i.success({title:"Tag properly deleted!",msg:(m.tag.name||"tag")+" has been deleted!"}),u(m.tag)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.tag.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.tag.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","tags","tag","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditTagDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.tags=r||{count:0,rows:[]},v.table="tags",v.listOrder="",v.listOrderAsc=null,v.selectedTags=[],v.query={fields:"createdAt,updatedAt,id,name,description,color",sort:"-updatedAt",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditTagDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/tags/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{tag:e,tags:v.tags.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the tag?").htmlContent("<b>"+(e.name||"tag")+"</b> will be deleted.").ariaLabel("delete tag").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getTags=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.tag.get(v.query,f).$promise},v.createOrEditTag=function(e,t){i.show({controller:"CreateOrEditTagDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/tags/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{tag:t,tags:v.tags.rows,license:v.license,setting:v.setting}})},v.deleteTag=A,v.exportSelectedTags=function(){var e=angular.copy(v.selectedTags);return v.selectedTags=[],e},v.deleteSelectedTags=function(e){var t=i.confirm().title("Are you sure want to delete the selected tags?").htmlContent("<b>"+v.selectedTags.length+" selected</b> will be deleted.").ariaLabel("delete Tags").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedTags.forEach(function(e){A(e)}),v.selectedTags=[]})},v.deselectTags=function(){v.selectedTags=[]},v.selectAllTags=function(){v.selectedTags=v.tags.rows};var h=!0,b=1;function f(e){v.tags=e||{count:0,rows:[]}}function A(e){l.tag.delete({id:e.id}).$promise.then(function(){_.remove(v.tags.rows,{id:e.id}),v.tags.count-=1,v.tags.rows.length||v.getTags(),c.success({title:"Tag deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEtag"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEtag",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getTags())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","tags","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("TagsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_TEMPLATE",m.template=angular.copy(s),m.templates=o,m.newTemplate=!1,m.template||(m.template={},m.title="TOOLS.NEW_TEMPLATE",m.newTemplate=!0),m.addNewTemplate=function(){m.errors=[],r.template.save(m.template).$promise.then(function(e){m.templates.unshift(e.toJSON()),i.success({title:"Template properly created",msg:m.template.name?m.template.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.template.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.template.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveTemplate=function(){m.errors=[],r.template.update({id:m.template.id},m.template).$promise.then(function(e){var t=_.find(m.templates,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Template properly saved!",msg:m.template.name?m.template.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.template.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.template.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteTemplate=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The template will be deleted.").ariaLabel("Delete Template").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.template.delete({id:m.template.id}).$promise.then(function(){_.remove(m.templates,{id:m.template.id}),i.success({title:"Template properly deleted!",msg:(m.template.name||"template")+" has been deleted!"}),u(m.template)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.template.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.template.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","templates","template","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditTemplateDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.templates=r||{count:0,rows:[]},v.table="templates",v.listOrder="",v.listOrderAsc=null,v.selectedTemplates=[],v.query={fields:"createdAt,updatedAt,id,name,html,description",sort:"-updatedAt",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditTemplateDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/templates/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{template:e,templates:v.templates.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the template?").htmlContent("<b>"+(e.name||"template")+"</b> will be deleted.").ariaLabel("delete template").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getTemplates=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.template.get(v.query,f).$promise},v.createOrEditTemplate=function(e,t){i.show({controller:"CreateOrEditTemplateDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/templates/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{template:t,templates:v.templates.rows,license:v.license,setting:v.setting}})},v.deleteTemplate=A,v.exportSelectedTemplates=function(){var e=angular.copy(v.selectedTemplates);return v.selectedTemplates=[],e},v.deleteSelectedTemplates=function(e){var t=i.confirm().title("Are you sure want to delete the selected templates?").htmlContent("<b>"+v.selectedTemplates.length+" selected</b> will be deleted.").ariaLabel("delete Templates").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedTemplates.forEach(function(e){A(e)}),v.selectedTemplates=[]})},v.deselectTemplates=function(){v.selectedTemplates=[]},v.selectAllTemplates=function(){v.selectedTemplates=v.templates.rows};var h=!0,b=1;function f(e){v.templates=e||{count:0,rows:[]}}function A(e){l.template.delete({id:e.id}).$promise.then(function(){_.remove(v.templates.rows,{id:e.id}),v.templates.count-=1,v.templates.rows.length||v.getTemplates(),c.success({title:"Template deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEtemplate"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEtemplate",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getTemplates())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","templates","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("TemplatesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_TRIGGER",m.trigger=angular.copy(s),m.triggers=o,m.newTrigger=!1,m.trigger||(m.trigger={channel:"voice"},m.title="TOOLS.NEW_TRIGGER",m.newTrigger=!0),m.addNewTrigger=function(){m.errors=[],r.trigger.save(m.trigger).$promise.then(function(e){m.triggers.unshift(e.toJSON()),i.success({title:"Trigger properly created",msg:m.trigger.name?m.trigger.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.trigger.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.trigger.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveTrigger=function(){m.errors=[],r.trigger.update({id:m.trigger.id},m.trigger).$promise.then(function(e){var t=_.find(m.triggers,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Trigger properly saved!",msg:m.trigger.name?m.trigger.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.trigger.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.trigger.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteTrigger=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The trigger will be deleted.").ariaLabel("Delete Trigger").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.trigger.delete({id:m.trigger.id}).$promise.then(function(){_.remove(m.triggers,{id:m.trigger.id}),i.success({title:"Trigger properly deleted!",msg:(m.trigger.name||"trigger")+" has been deleted!"}),u(m.trigger)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.trigger.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.trigger.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","triggers","trigger","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditTriggerDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.trigger={},c.triggerActions={count:0,rows:[]},c.selectedTriggerActions=[],c.query={fields:"createdAt,updatedAt,id,action,data1,data1,data1,data2,data1,data2,data2,data1,data2,data2,data2,data2,data2,data2,data3,data3,data3,data3,data3,data3,data1,data2,data2,data3,data2,data2,data2,data3,data4,data5,data6,createdAt",limit:10,page:1},c.arrayaction=_.keyBy([{option:"CONTACT_MANAGER",value:"'contactManager'",ngIf:"vm.trigger.channel == 'voice'"},{option:"INTEGRATIONS",value:"'integration'",ngIf:"vm.trigger.channel == 'voice'"},{option:"MOTION_BAR",value:"'motionbar'"},{option:"JSCRIPTY",value:"'jscripty'",ngIf:"vm.trigger.channel == 'voice'"},{option:"URL_FORWARD",value:"'urlForward'"},{option:"BROWSER",value:"'browser'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.browserValues=_.keyBy([{option:"Popup",value:"'0'"},{option:"CTI URL",value:"'1'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.autoCreateContact=_.keyBy([{option:"yes",value:"'1'"},{option:"no",value:"'0'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.urlForwardValues=_.keyBy([{option:"GET",value:"'GET'"},{option:"POST",value:"'POST'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.integrationValues=_.keyBy([{option:"Zendesk",value:"'zendesk'"},{option:"Salesforce",value:"'salesforce'"},{option:"SugarCRM",value:"'sugarcrm'"},{option:"Freshdesk",value:"'freshdesk'"},{option:"Desk",value:"'desk'"},{option:"Zoho",value:"'zoho'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.motionbarValues=_.keyBy([{option:"Popup",value:"'0'"},{option:"CTI URL",value:"'1'"},{option:"Windows App",value:"'2'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.eventVariables=_.keyBy([{option:"yes",value:"'1'"},{option:"no",value:"'0'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.location=_.keyBy([{option:"NEW_TAB",value:"'0'"},{option:"NEW_WINDOW",value:"'1'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.init=function(e){c.trigger=e,c.query.id=c.trigger.id,c.query.ActionId=c.trigger.id,c.getTriggerActions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the action?").htmlContent("<b>"+(e.name||"action")+"</b> will be deleted.").ariaLabel("delete action").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getTriggerActions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.trigger.getActions(c.query,p).$promise},c.createOrEditTriggerAction=function(e,t){o.show({controller:"CreateOrEditActionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/triggers/edit/actions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{trigger:c.trigger,action:t,actions:c.triggerActions.rows,license:null,setting:null}})},c.exportSelectedTriggerActions=function(){var e=angular.copy(c.selectedTriggerActions);return c.selectedTriggerActions=[],e},c.deleteTriggerAction=g,c.deleteSelectedTriggerActions=function(e){var t=o.confirm().title("Are you sure want to delete the selected actions?").htmlContent("<b>"+c.selectedTriggerActions.length+" selected</b> will be deleted.").ariaLabel("delete actions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedTriggerActions.forEach(function(e){g(e)}),c.selectedTriggerActions=[]})},l.cmList.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){c.lists=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.jscriptyProject.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){c.projects=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETprojects",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intZendeskAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.zendeskAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETzendeskAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intDeskAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.deskAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETdeskAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intZohoAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.zohoAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETzohoAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intSalesforceAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.salesforceAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsalesforceAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intSugarcrmAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.sugarcrmAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsugarcrmAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intFreshdeskAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.freshdeskAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfreshdeskAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intZendeskConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){c.zendeskConfigurations=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETzendeskConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intDeskConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){c.deskConfigurations=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETdeskConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intZohoConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){c.zohoConfigurations=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETzohoConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intSalesforceConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){c.salesforceConfigurations=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsalesforceConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intSugarcrmConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){c.sugarcrmConfigurations=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsugarcrmConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intFreshdeskConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){c.freshdeskConfigurations=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfreshdeskConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.template.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.templates=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtemplates",msg:e.data?JSON.stringify(e.data):e.toString()})});var m=!0,u=1;function p(e){c.triggerActions=e||{count:0,rows:[]}}function g(e){l.action.delete({id:e.id}).$promise.then(function(){_.remove(c.triggerActions.rows,{id:e.id}),c.triggerActions.count-=1,c.triggerActions.rows.length||c.getTriggerActions(),r.success({title:"Action deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETtrigger"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrigger",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getTriggerActions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.tools").controller("TriggerActionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m){var u=this;function p(e){a.hide(e)}u.errors=[],u.setting=m,u.license=c,u.passwordPattern=u.setting&&u.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",u.title="TOOLS.EDIT_ACTION",u.action=angular.copy(s),u.actions=o,u.newAction=!1,u.trigger=angular.copy(r),u.action||(u.action={data3:"0",data4:"0",data5:"800",data6:"600"},u.title="TOOLS.NEW_ACTION",u.newAction=!0),t.params.id&&(u.action.ActionId=t.params.id),u.addNewAction=function(){u.errors=[],l.trigger.addAction({id:t.params.id},u.action).$promise.then(function(e){u.actions.unshift(e.toJSON()),i.success({title:"Action properly created",msg:u.action.name?u.action.name+" has been created!":""}),p(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.action.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.action.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},u.saveAction=function(){u.errors=[],l.action.update({id:u.action.id},u.action).$promise.then(function(e){var t=_.find(u.actions,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Action properly saved!",msg:u.action.name?u.action.name+" has been saved!":""}),p(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.action.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.action.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},u.deleteAction=function(e){u.errors=[];var t=a.confirm().title("Are you sure?").content("The action will be deleted.").ariaLabel("Delete Action").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){l.action.delete({id:u.action.id}).$promise.then(function(){_.remove(u.actions,{id:u.action.id}),i.success({title:"Action properly deleted!",msg:(u.action.name||"action")+" has been deleted!"}),p(u.action)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.action.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.action.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},u.getDateFromString=function(e){return new Date(e)},u.closeDialog=p,l.cmList.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){u.lists=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETlists",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.jscriptyProject.get({fields:"id,name",sort:"name",nolimit:"true"}).$promise.then(function(e){u.projects=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETprojects",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intZendeskAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.zendeskAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETzendeskAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intDeskAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.deskAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETdeskAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intZohoAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.zohoAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETzohoAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intSalesforceAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.salesforceAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsalesforceAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intSugarcrmAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.sugarcrmAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsugarcrmAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intFreshdeskAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.freshdeskAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfreshdeskAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intZendeskConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){u.zendeskConfigurations=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETzendeskConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intDeskConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){u.deskConfigurations=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETdeskConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intZohoConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){u.zohoConfigurations=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETzohoConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intSalesforceConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){u.salesforceConfigurations=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsalesforceConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intSugarcrmConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){u.sugarcrmConfigurations=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsugarcrmConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.intFreshdeskConfiguration.get({fields:"id,name,AccountId",sort:"id",nolimit:"true"}).$promise.then(function(e){u.freshdeskConfigurations=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfreshdeskConfigurations",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.template.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.templates=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtemplates",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","actions","action","trigger","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditActionDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.trigger={},c.triggerAllConditions={count:0,rows:[]},c.selectedTriggerAllConditions=[],c.query={fields:"createdAt,updatedAt,id,field,operator,value,value,value,value,value,value,value,value,value,value,value,createdAt",limit:10,page:1},c.arrayfield=_.keyBy([{option:"Queue",value:"'queue'",ngIf:"vm.trigger.channel == 'voice'"},{option:"Call_Status",value:"'lastevent'",ngIf:"vm.trigger.channel == 'voice'"},{option:"OutboundRoute",value:"'routeId'",ngIf:"vm.trigger.channel == 'voice'"},{option:"Account",value:"'account'",ngIf:"vm.trigger.channel != 'voice'"},{option:"Interaction",value:"'interaction'",ngIf:"vm.trigger.channel != 'voice'"},{option:"Message",value:"'message'",ngIf:"vm.trigger.channel != 'voice'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.arrayoperator=_.keyBy([{option:"Equals",value:"'equals'"},{option:"Not_Equals",value:"'not_equals'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.callStatusValues=_.keyBy([{option:"Abandon",value:"'abandoned'"},{option:"Hangup",value:"'complete'"},{option:"Reject",value:"'rejected'"},{option:"Ring",value:"'called'"},{option:"Answer",value:"'connect'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.interactionStatusValues=_.keyBy([{option:"Opened",value:"'opened'"},{option:"Closed",value:"'closed'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.messageStatusValues=_.keyBy([{option:"Incoming",value:"'in'"},{option:"Outgoing",value:"'out'"},{option:"Accepted",value:"'accept'"},{option:"Rejected",value:"'reject'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.init=function(e){c.trigger=e,c.query.id=c.trigger.id,c.query.TriggerAllId=c.trigger.id,c.getTriggerAllConditions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the allCondition?").htmlContent("<b>"+(e.name||"allCondition")+"</b> will be deleted.").ariaLabel("delete allCondition").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getTriggerAllConditions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.trigger.getAllConditions(c.query,p).$promise},c.createOrEditTriggerAllCondition=function(e,t){o.show({controller:"CreateOrEditAllConditionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/triggers/edit/allconditions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{trigger:c.trigger,allCondition:t,allconditions:c.triggerAllConditions.rows,license:null,setting:null}})},c.exportSelectedTriggerAllConditions=function(){var e=angular.copy(c.selectedTriggerAllConditions);return c.selectedTriggerAllConditions=[],e},c.deleteTriggerAllCondition=g,c.deleteSelectedTriggerAllConditions=function(e){var t=o.confirm().title("Are you sure want to delete the selected allconditions?").htmlContent("<b>"+c.selectedTriggerAllConditions.length+" selected</b> will be deleted.").ariaLabel("delete allconditions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedTriggerAllConditions.forEach(function(e){g(e)}),c.selectedTriggerAllConditions=[]})},l.chatWebsite.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.chatAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.mailAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.mailAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.smsAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.smsAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsmsAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.faxAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.faxAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfaxAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.openchannelAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.openchannelAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETopenchannelAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.voiceQueue.get({fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){c.queues=_.keyBy(e.rows||[],"name")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.voiceExtension.get({fields:"id,exten",type:"outbound",VoiceExtensionId:"null",nolimit:"true"}).$promise.then(function(e){c.outboundRoutes=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GEToutboundRoutes",msg:e.data?JSON.stringify(e.data):e.toString()})});var m=!0,u=1;function p(e){c.triggerAllConditions=e||{count:0,rows:[]}}function g(e){l.condition.delete({id:e.id}).$promise.then(function(){_.remove(c.triggerAllConditions.rows,{id:e.id}),c.triggerAllConditions.count-=1,c.triggerAllConditions.rows.length||c.getTriggerAllConditions(),r.success({title:"AllCondition deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETtrigger"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrigger",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getTriggerAllConditions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.tools").controller("TriggerAllConditionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m){var u=this;function p(e){a.hide(e)}u.errors=[],u.setting=m,u.license=c,u.passwordPattern=u.setting&&u.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",u.title="TOOLS.EDIT_ALLCONDITION",u.allCondition=angular.copy(s),u.allconditions=o,u.newAllCondition=!1,u.trigger=angular.copy(r),u.allCondition||(u.allCondition={field:"queue",operator:"equals",value:"abandoned",value:"opened",value:"in"},u.title="TOOLS.NEW_ALLCONDITION",u.newAllCondition=!0),t.params.id&&(u.allCondition.TriggerAllId=t.params.id),u.addNewAllCondition=function(){u.errors=[],l.trigger.addAllCondition({id:t.params.id},u.allCondition).$promise.then(function(e){u.allconditions.unshift(e.toJSON()),i.success({title:"AllCondition properly created",msg:u.allCondition.name?u.allCondition.name+" has been created!":""}),p(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.condition.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.condition.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},u.saveAllCondition=function(){u.errors=[],l.condition.update({id:u.allCondition.id},u.allCondition).$promise.then(function(e){var t=_.find(u.allconditions,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"AllCondition properly saved!",msg:u.allCondition.name?u.allCondition.name+" has been saved!":""}),p(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.condition.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.condition.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},u.deleteAllCondition=function(e){u.errors=[];var t=a.confirm().title("Are you sure?").content("The allCondition will be deleted.").ariaLabel("Delete AllCondition").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){l.condition.delete({id:u.allCondition.id}).$promise.then(function(){_.remove(u.allconditions,{id:u.allCondition.id}),i.success({title:"AllCondition properly deleted!",msg:(u.allCondition.name||"allCondition")+" has been deleted!"}),p(u.allCondition)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.condition.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.condition.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},u.getDateFromString=function(e){return new Date(e)},u.closeDialog=p,l.chatWebsite.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.chatAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.mailAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.mailAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.smsAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.smsAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsmsAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.faxAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.faxAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfaxAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.openchannelAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.openchannelAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETopenchannelAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.voiceQueue.get({fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){u.queues=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.voiceExtension.get({fields:"id,exten",type:"outbound",VoiceExtensionId:"null",nolimit:"true"}).$promise.then(function(e){u.outboundRoutes=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GEToutboundRoutes",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","allconditions","allCondition","trigger","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditAllConditionDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.trigger={},c.triggerAnyConditions={count:0,rows:[]},c.selectedTriggerAnyConditions=[],c.query={fields:"createdAt,updatedAt,id,field,operator,value,value,value,value,value,value,value,value,value,value,value,createdAt",limit:10,page:1},c.arrayfield=_.keyBy([{option:"Queue",value:"'queue'",ngIf:"vm.trigger.channel == 'voice'"},{option:"Call_Status",value:"'lastevent'",ngIf:"vm.trigger.channel == 'voice'"},{option:"OutboundRoute",value:"'routeId'",ngIf:"vm.trigger.channel == 'voice'"},{option:"Account",value:"'account'",ngIf:"vm.trigger.channel != 'voice'"},{option:"Interaction",value:"'interaction'",ngIf:"vm.trigger.channel != 'voice'"},{option:"Message",value:"'message'",ngIf:"vm.trigger.channel != 'voice'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.arrayoperator=_.keyBy([{option:"Equals",value:"'equals'"},{option:"Not_Equals",value:"'not_equals'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.callStatusValues=_.keyBy([{option:"Abandon",value:"'abandoned'"},{option:"Hangup",value:"'complete'"},{option:"Reject",value:"'rejected'"},{option:"Ring",value:"'called'"},{option:"Answer",value:"'connect'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.interactionStatusValues=_.keyBy([{option:"Opened",value:"'opened'"},{option:"Closed",value:"'closed'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.messageStatusValues=_.keyBy([{option:"Incoming",value:"'in'"},{option:"Outgoing",value:"'out'"},{option:"Accepted",value:"'accept'"},{option:"Rejected",value:"'reject'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),c.init=function(e){c.trigger=e,c.query.id=c.trigger.id,c.query.TriggerAnyId=c.trigger.id,c.getTriggerAnyConditions()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the anyCondition?").htmlContent("<b>"+(e.name||"anyCondition")+"</b> will be deleted.").ariaLabel("delete anyCondition").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.success=p,c.getTriggerAnyConditions=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.trigger.getAnyConditions(c.query,p).$promise},c.createOrEditTriggerAnyCondition=function(e,t){o.show({controller:"CreateOrEditAnyConditionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/triggers/edit/anyconditions/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{trigger:c.trigger,anyCondition:t,anyconditions:c.triggerAnyConditions.rows,license:null,setting:null}})},c.exportSelectedTriggerAnyConditions=function(){var e=angular.copy(c.selectedTriggerAnyConditions);return c.selectedTriggerAnyConditions=[],e},c.deleteTriggerAnyCondition=g,c.deleteSelectedTriggerAnyConditions=function(e){var t=o.confirm().title("Are you sure want to delete the selected anyconditions?").htmlContent("<b>"+c.selectedTriggerAnyConditions.length+" selected</b> will be deleted.").ariaLabel("delete anyconditions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedTriggerAnyConditions.forEach(function(e){g(e)}),c.selectedTriggerAnyConditions=[]})},l.chatWebsite.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.chatAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.mailAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.mailAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.smsAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.smsAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsmsAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.faxAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.faxAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfaxAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.openchannelAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){c.openchannelAccounts=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETopenchannelAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.voiceQueue.get({fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){c.queues=_.keyBy(e.rows||[],"name")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.voiceExtension.get({fields:"id,exten",type:"outbound",VoiceExtensionId:"null",nolimit:"true"}).$promise.then(function(e){c.outboundRoutes=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GEToutboundRoutes",msg:e.data?JSON.stringify(e.data):e.toString()})});var m=!0,u=1;function p(e){c.triggerAnyConditions=e||{count:0,rows:[]}}function g(e){l.condition.delete({id:e.id}).$promise.then(function(){_.remove(c.triggerAnyConditions.rows,{id:e.id}),c.triggerAnyConditions.count-=1,c.triggerAnyConditions.rows.length||c.getTriggerAnyConditions(),r.success({title:"AnyCondition deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETtrigger"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrigger",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getTriggerAnyConditions())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.tools").controller("TriggerAnyConditionsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m){var u=this;function p(e){a.hide(e)}u.errors=[],u.setting=m,u.license=c,u.passwordPattern=u.setting&&u.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",u.title="TOOLS.EDIT_ANYCONDITION",u.anyCondition=angular.copy(s),u.anyconditions=o,u.newAnyCondition=!1,u.trigger=angular.copy(r),u.anyCondition||(u.anyCondition={field:"queue",operator:"equals",value:"abandoned",value:"opened",value:"in"},u.title="TOOLS.NEW_ANYCONDITION",u.newAnyCondition=!0),t.params.id&&(u.anyCondition.TriggerAnyId=t.params.id),u.addNewAnyCondition=function(){u.errors=[],l.trigger.addAnyCondition({id:t.params.id},u.anyCondition).$promise.then(function(e){u.anyconditions.unshift(e.toJSON()),i.success({title:"AnyCondition properly created",msg:u.anyCondition.name?u.anyCondition.name+" has been created!":""}),p(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.condition.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.condition.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},u.saveAnyCondition=function(){u.errors=[],l.condition.update({id:u.anyCondition.id},u.anyCondition).$promise.then(function(e){var t=_.find(u.anyconditions,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"AnyCondition properly saved!",msg:u.anyCondition.name?u.anyCondition.name+" has been saved!":""}),p(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.condition.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.condition.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},u.deleteAnyCondition=function(e){u.errors=[];var t=a.confirm().title("Are you sure?").content("The anyCondition will be deleted.").ariaLabel("Delete AnyCondition").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){l.condition.delete({id:u.anyCondition.id}).$promise.then(function(){_.remove(u.anyconditions,{id:u.anyCondition.id}),i.success({title:"AnyCondition properly deleted!",msg:(u.anyCondition.name||"anyCondition")+" has been deleted!"}),p(u.anyCondition)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){u.errors=e.data.errors||[{message:e.toString(),type:"api.condition.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.condition.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},u.getDateFromString=function(e){return new Date(e)},u.closeDialog=p,l.chatWebsite.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.chatAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.mailAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.mailAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmailAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.smsAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.smsAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsmsAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.faxAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.faxAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETfaxAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.openchannelAccount.get({fields:"id,name",sort:"id",nolimit:"true"}).$promise.then(function(e){u.openchannelAccounts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETopenchannelAccounts",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.voiceQueue.get({fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){u.queues=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})}),l.voiceExtension.get({fields:"id,exten",type:"outbound",VoiceExtensionId:"null",nolimit:"true"}).$promise.then(function(e){u.outboundRoutes=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GEToutboundRoutes",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","anyconditions","anyCondition","trigger","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditAnyConditionDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.trigger=d||e.params.trigger||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoTriggers=function(){e.go("app.tools.triggers")},c.saveTrigger=function(){s.trigger.update({id:c.trigger.id},c.trigger).$promise.then(function(){r.success({title:"Trigger updated!",msg:c.trigger.name?c.trigger.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrigger",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","trigger"],angular.module("app.tools").controller("TriggerController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.triggers=r||{count:0,rows:[]},v.table="triggers",v.listOrder="",v.listOrderAsc=null,v.selectedTriggers=[],v.query={fields:"createdAt,updatedAt,id,name,channel,status,description",sort:"-updatedAt",limit:10,page:1},v.arraychannel=_.keyBy([{option:"Voice",value:"'voice'"},{option:"Openchannel",value:"'openchannel'",ngIf:"vm.license.openchannel"},{option:"Chat",value:"'chat'",ngIf:"vm.license.chat"},{option:"Mail",value:"'mail'",ngIf:"vm.license.mail"},{option:"Sms",value:"'sms'",ngIf:"vm.license.messaging"},{option:"Fax",value:"'fax'",ngIf:"vm.license.fax"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.tools.triggers.edit",{id:e.id,trigger:e})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the trigger?").htmlContent("<b>"+(e.name||"trigger")+"</b> will be deleted.").ariaLabel("delete trigger").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getTriggers=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.trigger.get(v.query,f).$promise},v.createOrEditTrigger=function(e,t){i.show({controller:"CreateOrEditTriggerDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/triggers/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{trigger:t,triggers:v.triggers.rows,license:v.license,setting:v.setting}})},v.deleteTrigger=A,v.exportSelectedTriggers=function(){var e=angular.copy(v.selectedTriggers);return v.selectedTriggers=[],e},v.deleteSelectedTriggers=function(e){var t=i.confirm().title("Are you sure want to delete the selected triggers?").htmlContent("<b>"+v.selectedTriggers.length+" selected</b> will be deleted.").ariaLabel("delete Triggers").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedTriggers.forEach(function(e){A(e)}),v.selectedTriggers=[]})},v.deselectTriggers=function(){v.selectedTriggers=[]},v.selectAllTriggers=function(){v.selectedTriggers=v.triggers.rows};var h=!0,b=1;function f(e){v.triggers=e||{count:0,rows:[]}}function A(e){l.trigger.delete({id:e.id}).$promise.then(function(){_.remove(v.triggers.rows,{id:e.id}),v.triggers.count-=1,v.triggers.rows.length||v.getTriggers(),c.success({title:"Trigger deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEtrigger"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEtrigger",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getTriggers())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","triggers","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("TriggersController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_TRUNK",m.trunk=angular.copy(s),m.trunks=o,m.newTrunk=!1,m.trunk||(m.trunk={active:!0,type:"friend",dtmfmode:"rfc2833",qualify:"yes",t38pt_udptl:"no"},m.title="TOOLS.NEW_TRUNK",m.newTrunk=!0),m.addNewTrunk=function(){m.errors=[],r.trunk.save(m.trunk).$promise.then(function(e){m.trunks.unshift(e.toJSON()),i.success({title:"Trunk properly created",msg:m.trunk.name?m.trunk.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.trunk.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.trunk.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveTrunk=function(){m.errors=[],r.trunk.update({id:m.trunk.id},m.trunk).$promise.then(function(e){var t=_.find(m.trunks,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Trunk properly saved!",msg:m.trunk.name?m.trunk.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.trunk.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.trunk.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteTrunk=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The trunk will be deleted.").ariaLabel("Delete Trunk").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.trunk.delete({id:m.trunk.id}).$promise.then(function(){_.remove(m.trunks,{id:m.trunk.id}),i.success({title:"Trunk properly deleted!",msg:(m.trunk.name||"trunk")+" has been deleted!"}),u(m.trunk)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.trunk.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.trunk.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","trunks","trunk","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditTrunkDialogController",e)}(),function(){"use strict";function e(n,e,t,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=e.protocol()+"://"+e.host(),c.trunk=d||n.params.trunk||{},c.selectedTab=n.params.tab||0,c.gotogoto=function(e,t){n.go("app.voice.realtime.trunks",{})},c.alert=r.info,c.gotoTrunks=function(){n.go("app.tools.trunks")},c.saveTrunk=function(){s.trunk.update({id:c.trunk.id},c.trunk).$promise.then(function(){r.success({title:"Trunk updated!",msg:c.trunk.name?c.trunk.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunk",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.voiceContext.get({fields:"id,name",sort:"name"}).$promise.then(function(e){c.contexts=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","trunk"],angular.module("app.tools").controller("TrunkController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.trunks=r||{count:0,rows:[]},v.table="trunks",v.listOrder="",v.listOrderAsc=null,v.selectedTrunks=[],v.query={fields:"createdAt,updatedAt,id,name,active,host,secret,defaultuser,context,callerid,type,dtmfmode,nat,qualify,allow,insecure,call_limit,registry,description,directmedia,callcounter,fromdomain,fromuser,outboundproxy,usereqphone,trustrpid,sendrpid,encryption,port,transport,t38pt_udptl,otherFields",sort:"-updatedAt",limit:10,page:1},v.arraytype=_.keyBy([{option:"Friend",value:"'friend'"},{option:"User",value:"'user'"},{option:"Peer",value:"'peer'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraydtmfmode=_.keyBy([{option:"rfc2833",value:"'rfc2833'"},{option:"info",value:"'info'"},{option:"shortinfo",value:"'shortinfo'"},{option:"inband",value:"'inband'"},{option:"auto",value:"'auto'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraynat=_.keyBy([{option:"force_rport",value:"'force_rport'"},{option:"comedia",value:"'comedia'"},{option:"yes",value:"'yes'"},{option:"no",value:"'no'"},{option:"never",value:"'never'"},{option:"route",value:"'route'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayqualify=_.keyBy([{option:"yes",value:"'yes'"},{option:"no",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayallow=_.keyBy([{option:"ulaw",value:"'ulaw'"},{option:"alaw",value:"'alaw'"},{option:"gsm",value:"'gsm'"},{option:"g723",value:"'g723'"},{option:"g726",value:"'g726'"},{option:"g722",value:"'g722'"},{option:"g729",value:"'g729'"},{option:"ilbc",value:"'ilbc'"},{option:"opus",value:"'opus'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayinsecure=_.keyBy([{option:"port",value:"'port'"},{option:"invite",value:"'invite'"},{option:"very",value:"'very'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraydirectmedia=_.keyBy([{option:"yes",value:"'yes'"},{option:"no",value:"'no'"},{option:"nonat",value:"'nonat'"},{option:"update",value:"'update'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraycallcounter=_.keyBy([{option:"yes",value:"'yes'"},{option:"no",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayusereqphone=_.keyBy([{option:"yes",value:"'yes'"},{option:"no",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraytrustrpid=_.keyBy([{option:"yes",value:"'yes'"},{option:"no",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraysendrpid=_.keyBy([{option:"yes",value:"'yes'"},{option:"no",value:"'no'"},{option:"pai",value:"'pai'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayencryption=_.keyBy([{option:"yes",value:"'yes'"},{option:"no",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraytransport=_.keyBy([{option:"udp",value:"'udp'"},{option:"tcp",value:"'tcp'"},{option:"ws",value:"'ws'"},{option:"wss",value:"'wss'"},{option:"tls",value:"'tls'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.tools.trunks.edit",{id:e.id,trunk:e})},v.gotorealtimegoto=function(e,t){n.go("app.voice.realtime.trunks",{})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the trunk?").htmlContent("<b>"+(e.name||"trunk")+"</b> will be deleted.").ariaLabel("delete trunk").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getTrunks=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.trunk.get(v.query,f).$promise},v.createOrEditTrunk=function(e,t){i.show({controller:"CreateOrEditTrunkDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/trunks/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{trunk:t,trunks:v.trunks.rows,license:v.license,setting:v.setting}})},v.deleteTrunk=A,v.exportSelectedTrunks=function(){var e=angular.copy(v.selectedTrunks);return v.selectedTrunks=[],e},v.deleteSelectedTrunks=function(e){var t=i.confirm().title("Are you sure want to delete the selected trunks?").htmlContent("<b>"+v.selectedTrunks.length+" selected</b> will be deleted.").ariaLabel("delete Trunks").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedTrunks.forEach(function(e){A(e)}),v.selectedTrunks=[]})},v.deselectTrunks=function(){v.selectedTrunks=[]},v.selectAllTrunks=function(){v.selectedTrunks=v.trunks.rows};var h=!0,b=1;function f(e){v.trunks=e||{count:0,rows:[]}}function A(e){l.trunk.delete({id:e.id}).$promise.then(function(){_.remove(v.trunks.rows,{id:e.id}),v.trunks.count-=1,v.trunks.rows.length||v.getTrunks(),c.success({title:"Trunk deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEtrunk"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEtrunk",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getTrunks())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","trunks","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("TrunksController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="TOOLS.EDIT_VARIABLE",m.variable=angular.copy(s),m.variables=o,m.newVariable=!1,m.variable||(m.variable={},m.title="TOOLS.NEW_VARIABLE",m.newVariable=!0),m.addNewVariable=function(){m.errors=[],r.variable.save(m.variable).$promise.then(function(e){m.variables.unshift(e.toJSON()),i.success({title:"Variable properly created",msg:m.variable.name?m.variable.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.variable.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.variable.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveVariable=function(){m.errors=[],r.variable.update({id:m.variable.id},m.variable).$promise.then(function(e){var t=_.find(m.variables,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Variable properly saved!",msg:m.variable.name?m.variable.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.variable.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.variable.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteVariable=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The variable will be deleted.").ariaLabel("Delete Variable").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.variable.delete({id:m.variable.id}).$promise.then(function(){_.remove(m.variables,{id:m.variable.id}),i.success({title:"Variable properly deleted!",msg:(m.variable.name||"variable")+" has been deleted!"}),u(m.variable)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.variable.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.variable.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","variables","variable","api","Auth","license","setting"],angular.module("app.tools").controller("CreateOrEditVariableDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.variables=r||{count:0,rows:[]},v.table="variables",v.listOrder="",v.listOrderAsc=null,v.selectedVariables=[],v.query={fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditVariableDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/variables/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{variable:e,variables:v.variables.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the variable?").htmlContent("<b>"+(e.name||"variable")+"</b> will be deleted.").ariaLabel("delete variable").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getVariables=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.variable.get(v.query,f).$promise},v.createOrEditVariable=function(e,t){i.show({controller:"CreateOrEditVariableDialogController",controllerAs:"vm",templateUrl:"app/main/apps/tools/views/variables/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{variable:t,variables:v.variables.rows,license:v.license,setting:v.setting}})},v.deleteVariable=A,v.exportSelectedVariables=function(){var e=angular.copy(v.selectedVariables);return v.selectedVariables=[],e},v.deleteSelectedVariables=function(e){var t=i.confirm().title("Are you sure want to delete the selected variables?").htmlContent("<b>"+v.selectedVariables.length+" selected</b> will be deleted.").ariaLabel("delete Variables").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedVariables.forEach(function(e){A(e)}),v.selectedVariables=[]})},v.deselectVariables=function(){v.selectedVariables=[]},v.selectAllVariables=function(){v.selectedVariables=v.variables.rows};var h=!0,b=1;function f(e){v.variables=e||{count:0,rows:[]}}function A(e){l.variable.delete({id:e.id}).$promise.then(function(){_.remove(v.variables.rows,{id:e.id}),v.variables.count-=1,v.variables.rows.length||v.getVariables(),c.success({title:"Variable deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvariable"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvariable",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getVariables())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","variables","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.tools").controller("VariablesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.chanSpies=r||{count:0,rows:[]},v.table="chanSpies",v.listOrder="",v.listOrderAsc=null,v.selectedChanSpies=[],v.query={fields:"createdAt,updatedAt,id,name,prefix,options,auth,password,record,recordingFormat,description",sort:"-updatedAt",limit:10,page:1},v.arrayoptions=_.keyBy([{option:"b: Only spy on channels involved in a bridged call.",value:"'b'"},{option:"B: Instead of whispering on a single channel barge in on both channels involved in the call.",value:"'B'"},{option:"E: Exit when the spied-on channel hangs up.",value:"'E'"},{option:"o: Only listen to audio coming from this channel.",value:"'o'"},{option:"q: Don't play a beep when beginning to spy on a channel, or speak the selected channel name.",value:"'q'"},{option:"s: Skip the playback of the channel type (i.e. SIP, IAX, etc) when speaking the selected channel name.",value:"'s'"},{option:"S: Stop when no more channels are left to spy on.",value:"'S'"},{option:"w: Enable whisper mode, so the spying channel can talk to the spied-on channel.",value:"'w'"},{option:"W: Enable private whisper mode, so the spying channel can talk to the spied-on channel but cannot listen to that channel.",value:"'W'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayrecordingFormat=_.keyBy([{option:"wav",value:"'wav'"},{option:"gsm",value:"'gsm'"},{option:"wav49",value:"'WAV'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editdialog=function(e,t){i.show({controller:"CreateOrEditchanSpyDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/chanSpies/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{chanSpy:e,chanSpies:v.chanSpies.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the chanSpy?").htmlContent("<b>"+(e.name||"chanSpy")+"</b> will be deleted.").ariaLabel("delete chanSpy").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getChanSpies=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.voiceChanSpy.get(v.query,f).$promise},v.createOrEditchanSpy=function(e,t){i.show({controller:"CreateOrEditchanSpyDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/chanSpies/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{chanSpy:t,chanSpies:v.chanSpies.rows,license:v.license,setting:v.setting}})},v.deletechanSpy=A,v.exportSelectedChanSpies=function(){var e=angular.copy(v.selectedChanSpies);return v.selectedChanSpies=[],e},v.deleteSelectedChanSpies=function(e){var t=i.confirm().title("Are you sure want to delete the selected chanSpies?").htmlContent("<b>"+v.selectedChanSpies.length+" selected</b> will be deleted.").ariaLabel("delete chanSpys").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedChanSpies.forEach(function(e){A(e)}),v.selectedChanSpies=[]})},v.deselectChanSpies=function(){v.selectedChanSpies=[]},v.selectAllChanSpies=function(){v.selectedChanSpies=v.chanSpies.rows};var h=!0,b=1;function f(e){v.chanSpies=e||{count:0,rows:[]}}function A(e){l.voiceChanSpy.delete({id:e.id}).$promise.then(function(){_.remove(v.chanSpies.rows,{id:e.id}),v.chanSpies.count-=1,v.chanSpies.rows.length||v.getChanSpies(),c.success({title:"chanSpy deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvoiceChanSpy"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvoiceChanSpy",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getChanSpies())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","chanSpies","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.voice").controller("ChanSpiesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="VOICE.EDIT_CHANSPY",m.chanSpy=angular.copy(s),m.chanSpies=o,m.newchanSpy=!1,m.chanSpy||(m.chanSpy={recordingFormat:"wav"},m.title="VOICE.NEW_CHANSPY",m.newchanSpy=!0),m.addNewchanSpy=function(){m.errors=[],r.voiceChanSpy.save(m.chanSpy).$promise.then(function(e){m.chanSpies.unshift(e.toJSON()),i.success({title:"chanSpy properly created",msg:m.chanSpy.name?m.chanSpy.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceChanSpy.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceChanSpy.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.savechanSpy=function(){m.errors=[],r.voiceChanSpy.update({id:m.chanSpy.id},m.chanSpy).$promise.then(function(e){var t=_.find(m.chanSpies,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"chanSpy properly saved!",msg:m.chanSpy.name?m.chanSpy.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceChanSpy.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceChanSpy.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deletechanSpy=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The chanSpy will be deleted.").ariaLabel("Delete chanSpy").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceChanSpy.delete({id:m.chanSpy.id}).$promise.then(function(){_.remove(m.chanSpies,{id:m.chanSpy.id}),i.success({title:"chanSpy properly deleted!",msg:(m.chanSpy.name||"chanSpy")+" has been deleted!"}),u(m.chanSpy)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceChanSpy.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceChanSpy.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","chanSpies","chanSpy","api","Auth","license","setting"],angular.module("app.voice").controller("CreateOrEditchanSpyDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.contexts=r||{count:0,rows:[]},v.table="contexts",v.listOrder="",v.listOrderAsc=null,v.selectedContexts=[],v.query={fields:"createdAt,updatedAt,id,name,description",sort:"-updatedAt",defaultEntry:"false",limit:10,page:1},v.editdialog=function(e,t){i.show({controller:"CreateOrEditContextDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/contexts/create/dialog.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{context:e,contexts:v.contexts.rows,license:v.license,setting:null}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the context?").htmlContent("<b>"+(e.name||"context")+"</b> will be deleted.").ariaLabel("delete context").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getContexts=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.voiceContext.get(v.query,f).$promise},v.createOrEditContext=function(e,t){i.show({controller:"CreateOrEditContextDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/contexts/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{context:t,contexts:v.contexts.rows,license:v.license,setting:v.setting}})},v.deleteContext=A,v.exportSelectedContexts=function(){var e=angular.copy(v.selectedContexts);return v.selectedContexts=[],e},v.deleteSelectedContexts=function(e){var t=i.confirm().title("Are you sure want to delete the selected contexts?").htmlContent("<b>"+v.selectedContexts.length+" selected</b> will be deleted.").ariaLabel("delete Contexts").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedContexts.forEach(function(e){A(e)}),v.selectedContexts=[]})},v.deselectContexts=function(){v.selectedContexts=[]},v.selectAllContexts=function(){v.selectedContexts=v.contexts.rows};var h=!0,b=1;function f(e){v.contexts=e||{count:0,rows:[]}}function A(e){l.voiceContext.delete({id:e.id}).$promise.then(function(){_.remove(v.contexts.rows,{id:e.id}),v.contexts.count-=1,v.contexts.rows.length||v.getContexts(),c.success({title:"Context deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvoiceContext"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvoiceContext",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getContexts())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","contexts","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.voice").controller("ContextsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="VOICE.EDIT_CONTEXT",m.context=angular.copy(s),m.contexts=o,m.newContext=!1,m.context||(m.context={},m.title="VOICE.NEW_CONTEXT",m.newContext=!0),m.addNewContext=function(){m.errors=[],r.voiceContext.save(m.context).$promise.then(function(e){m.contexts.unshift(e.toJSON()),i.success({title:"Context properly created",msg:m.context.name?m.context.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceContext.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceContext.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveContext=function(){m.errors=[],r.voiceContext.update({id:m.context.id},m.context).$promise.then(function(e){var t=_.find(m.contexts,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Context properly saved!",msg:m.context.name?m.context.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceContext.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceContext.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteContext=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The context will be deleted.").ariaLabel("Delete Context").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceContext.delete({id:m.context.id}).$promise.then(function(){_.remove(m.contexts,{id:m.context.id}),i.success({title:"Context properly deleted!",msg:(m.context.name||"context")+" has been deleted!"}),u(m.context)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceContext.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceContext.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","contexts","context","api","Auth","license","setting"],angular.module("app.voice").controller("CreateOrEditContextDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="VOICE.EDIT_INBOUNDROUTE",m.inboundroute=angular.copy(s),m.inboundroutes=o,m.newInboundRoute=!1,m.inboundroute||(m.inboundroute={appdata:"Inbound Call",type:"inbound",context:"from-voip-provider"},m.title="VOICE.NEW_INBOUNDROUTE",m.newInboundRoute=!0),m.addNewInboundRoute=function(){m.errors=[],r.voiceExtension.save(m.inboundroute).$promise.then(function(e){m.inboundroutes.unshift(e.toJSON()),i.success({title:"InboundRoute properly created",msg:m.inboundroute.name?m.inboundroute.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceExtension.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceExtension.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveInboundRoute=function(){m.errors=[],r.voiceExtension.update({id:m.inboundroute.id},m.inboundroute).$promise.then(function(e){var t=_.find(m.inboundroutes,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"InboundRoute properly saved!",msg:m.inboundroute.name?m.inboundroute.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceExtension.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceExtension.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteInboundRoute=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The inboundroute will be deleted.").ariaLabel("Delete InboundRoute").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceExtension.delete({id:m.inboundroute.id}).$promise.then(function(){_.remove(m.inboundroutes,{id:m.inboundroute.id}),i.success({title:"InboundRoute properly deleted!",msg:(m.inboundroute.name||"inboundroute")+" has been deleted!"}),u(m.inboundroute)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceExtension.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceExtension.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){m.contexts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","inboundroutes","inboundroute","api","Auth","license","setting"],angular.module("app.voice").controller("CreateOrEditInboundRouteDialogController",e)}(),function(){"use strict";function e(m,i,a,o,e){var u=this;function t(e,t){if(u.inboundrouteApps.rows.length){var n=u.inboundrouteApps.rows[t]?u.inboundrouteApps.rows[t]:u.inboundrouteApps.rows[0];i.show({controller:"EditInboundApp"+(n.appType||n.app).toLowerCase()+"DialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/inboundroutes/edit/apps/"+(n.appType||n.app).toLowerCase()+"/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{inboundrouteApp:n,inboundroute:u.inboundroute}}).then(function(e){e&&(e.id?u.inboundrouteApps.rows[t]=e:u.inboundrouteApps.rows.splice(t,0,e),s())}).catch(function(e){e&&o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:EDITMODALSHOW",msg:e.data?JSON.stringify(e.data):e.toString()})})}}function s(){var e=["queue","playback"],t=2,n=[];n.push({type:"inbound",app:"Set",appdata:"CDR(type)=inbound",context:u.inboundroute.context,exten:u.inboundroute.exten,priority:t++,VoiceExtensionId:u.inboundroute.id}),n.push({type:"inbound",app:"Set",appdata:"XCALLY-MOTION-ANSWER=0",context:u.inboundroute.context,exten:u.inboundroute.exten,priority:t++,VoiceExtensionId:u.inboundroute.id}),n.push({type:"inbound",app:"Set",appdata:"XCALLY-MOTION-PROGRESS=0",context:u.inboundroute.context,exten:u.inboundroute.exten,priority:t++,VoiceExtensionId:u.inboundroute.id}),n.push({type:"inbound",app:"Set",appdata:"MONITOR_OPTIONS=ab",context:u.inboundroute.context,exten:u.inboundroute.exten,priority:t++,VoiceExtensionId:u.inboundroute.id});for(var a=0,i=0;a<u.inboundrouteApps.rows.length;a++,i=0){var o=u.inboundrouteApps.rows[a],s=[],r=[];o.intervals="*,*,*,*"!==o.interval?[o.interval]:o.IntervalId?_.map(_.filter(u.intervals.rows,{IntervalId:o.IntervalId}),"interval"):[],o.context=u.inboundroute.context,o.exten=u.inboundroute.exten,o.type&&(o.type=o.type.toLowerCase()),o.hasOwnProperty("answer")&&e.includes(o.app.toLowerCase())&&"custom"!==o.appType&&(o.answer?(s.push({type:o.type.toLowerCase(),app:"ExecIf",appdata:"$[${XCALLY-MOTION-ANSWER}=0]?Answer",context:u.inboundroute.context,exten:u.inboundroute.exten,priority:o.intervals.length+t+i++,VoiceExtensionId:u.inboundroute.id}),s.push({type:o.type.toLowerCase(),app:"Set",appdata:"XCALLY-MOTION-ANSWER=1",context:u.inboundroute.context,exten:u.inboundroute.exten,priority:o.intervals.length+t+i++,VoiceExtensionId:u.inboundroute.id})):(s.push({type:o.type.toLowerCase(),app:"ExecIf",appdata:"$[${XCALLY-MOTION-PROGRESS}=0]?Progress",context:u.inboundroute.context,exten:u.inboundroute.exten,priority:o.intervals.length+t+i++,VoiceExtensionId:u.inboundroute.id}),s.push({type:o.type.toLowerCase(),app:"Set",appdata:"XCALLY-MOTION-PROGRESS=1",context:u.inboundroute.context,exten:u.inboundroute.exten,priority:o.intervals.length+t+i++,VoiceExtensionId:u.inboundroute.id})));for(var l=0;l<o.intervals.length;l++){var d=t+o.intervals.length,c=l===o.intervals.length-1?t+s.length+r.length+2:t+l+1;s.splice(l,0,{type:"inbound",app:"GotoIfTime",appdata:o.intervals[l]+"?"+u.inboundroute.context+",${EXTEN},"+d+":"+u.inboundroute.context+",${EXTEN},"+c,exten:u.inboundroute.exten,context:u.inboundroute.context,priority:t+l,VoiceExtensionId:u.inboundroute.id})}o.priority=s.length?_.last(s).priority+1:t,t=(r.length?_.last(r).priority:o.priority)+1,n=_.concat(n,s,[o],r)}n.push({type:"inbound",app:"Hangup",exten:u.inboundroute.exten,context:u.inboundroute.context,priority:t,VoiceExtensionId:u.inboundroute.id}),m.voiceExtension.addApplications({id:u.inboundroute.id},_.sortBy(n,"priority")).$promise.then(function(e){u.inboundrouteApps.rows=e.rows}).catch(function(e){console.error(e)})}function n(e){u.inboundrouteApps=e||{count:0,rows:[]}}u.currentUser=e.getCurrentUser(),u.inboundroute={},u.inboundrouteApps={count:0,rows:[]},u.selectedInboundRouteApps=[],u.query={sort:"priority"},u.apps=_.reject(_.sortBy([{app:"Interval",appType:"interval",types:["always","custom","list"],fields:[],isApp:!1},{app:"Queue",appType:"queue",context:"from-voip-provider",type:"Inbound",appdata:",xX,,,300,,,,,",icon:"icon-apps",options:"xX",interval:"*,*,*,*",answer:!0,isApp:!0,extraApi:[{name:"sounds",route:"sound",filters:{fields:"name,save_name",sort:"name"}},{name:"queues",route:"voiceQueue",filters:{type:"inbound",fields:"id,name,type",sort:"name",nolimit:!0}}],fields:[{title:"Queue",name:"queue",type:"apiselect",values:"queues",value:"queue.name",option:"queue.name",required:!0,param:0},{title:"Options",name:"options",type:"text",param:1},{title:"Url",name:"URL",type:"text",param:2},{title:"Announce_Overrides",name:"sound",type:"apiselect",values:"sounds",value:"'/var/opt/motion2/server/files/sounds/converted/{{sound.save_name}}'",option:"sound.name",defaultValues:[{value:"''",option:"None"}],param:3},{title:"Timeout",name:"timeout",type:"number",min:0,param:4},{title:"Agi",name:"agi",type:"text",param:5},{title:"Macro",name:"macro",type:"text",param:6},{title:"GoSub",name:"gosub",type:"text",param:7},{title:"Rule",name:"rule",type:"text",param:8},{title:"Position",name:"position",type:"number",min:0,param:9},{title:"Answer",name:"answer",type:"switch",general:!0}]},{app:"Playback",appType:"playback",context:"from-voip-provider",type:"Inbound",icon:"icon-apps",interval:"*,*,*,*",answer:!0,isApp:!0,extraApi:[{name:"sounds",route:"sound",filters:{fields:"name,save_name",sort:"name"}}],fields:[{title:"Audio_Files",name:"appdata",type:"apiselect",values:"sounds",value:"'/var/opt/motion2/server/files/sounds/converted/{{appdata.save_name}}'",option:"appdata.name",required:!0,param:0},{title:"Options",name:"options",type:"text",param:1},{title:"Answer",name:"answer",type:"switch",general:!0}]},{app:"Dial",appType:"dial",context:"from-voip-provider",type:"Inbound",icon:"icon-apps",interval:"*,*,*,*",options:"xX",isApp:!0,fields:[{title:"Technology/Resource",name:"tech",type:"text",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",min:0,param:1},{title:"Options",name:"options",type:"text",param:2},{title:"Url",name:"url",type:"text",param:3}]},{app:"Dial",appType:"internalDial",context:"from-voip-provider",type:"Inbound",icon:"icon-apps",interval:"*,*,*,*",options:"xX",isApp:!0,extraApi:[{name:"users",route:"user",filters:{fields:"name",sort:"name"}}],fields:[{title:"User",name:"user",type:"apiselect",values:"users",value:"'SIP/{{user.name}}'",option:"user.name",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",min:0,param:1},{title:"Options",name:"options",type:"text",param:2},{title:"Url",name:"url",type:"text",param:3}]},{app:"Dial",appType:"externalDial",context:"from-voip-provider",type:"inbound",icon:"icon-apps",interval:"*,*,*,*",options:"xX",isApp:!0,extraApi:[{name:"trunks",route:"trunk",filters:{fields:"name",sort:"name"}}],fields:[{title:"Trunk",name:"trunk",type:"apiselect",values:"trunks",value:"trunk.name",option:"trunk.name",required:!0,param:0},{title:"Phone",name:"phone",required:!0,type:"text"},{title:"Timeout",name:"timeout",type:"number",min:0,param:1},{title:"Options",name:"options",type:"text",param:2},{title:"Url",name:"url",type:"text",param:3}]},{app:"Dial",appType:"ringGroup",context:"from-voip-provider",type:"inbound",icon:"icon-apps",interval:"*,*,*,*",options:"xX",isApp:!0,extraApi:[{name:"users",route:"user",filters:{fields:"name",sort:"name"}}],fields:[{title:"User",name:"multipleUsers",type:"apiselect",multiple:!0,values:"users",value:"'SIP/{{multipleUsers.name}}'",option:"multipleUsers.name",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",min:0,param:1},{title:"Options",name:"options",type:"text",param:2},{title:"Url",name:"url",type:"text",param:3}]},{app:"AGI",alias:"CallySquare",appType:"agi",context:"from-voip-provider",type:"inbound",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"projects",route:"squareProject",filters:{fields:"name",sort:"name"}}],fields:[{title:"Project",name:"project",type:"apiselect",values:"projects",value:"'agi://127.0.0.1/square,{{project.name}}'",option:"project.name",required:!0,param:0}]},{app:"goto",appType:"goTo",context:"from-voip-provider",type:"Inbound",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"contexts",route:"voiceContext",filters:{fields:"name",sort:"name"}}],fields:[{title:"Context",name:"context",type:"apiselect",values:"contexts",value:"context.name",option:"context.name",required:!0,param:0},{title:"Extension",name:"extension",type:"text",required:!0,param:1},{title:"Priority",name:"priority",type:"text",required:!0,param:2}]},{app:"hangup",appType:"hangup",context:"from-voip-provider",type:"Inbound",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Hangup_Cause",name:"appdata",type:"select",param:0,values:[{option:"HANGUPCAUSE_1",value:"'1'"},{option:"HANGUPCAUSE_16",value:"'16'"},{option:"HANGUPCAUSE_17",value:"'17'"},{option:"HANGUPCAUSE_18",value:"'18'"},{option:"HANGUPCAUSE_21",value:"'21'"},{option:"HANGUPCAUSE_22",value:"'22'"},{option:"HANGUPCAUSE_27",value:"'27'"},{option:"HANGUPCAUSE_38",value:"'38'"},{option:"HANGUPCAUSE_41",value:"'41'"}],translate:!0,required:!0,general:!0}]},{app:"Set",appType:"set",context:"from-voip-provider",type:"Inbound",separator:"=",icon:"icon-apps",interval:"*,*,*,*",extraApi:[{name:"variables",route:"variable",filters:{fields:"name",sort:"name"}}],isApp:!0,fields:[{title:"Variable",name:"name",type:"apiselect",values:"variables",value:"name.name",option:"name.name",required:!0,param:0},{title:"Value",name:"value",type:"text",required:!0,param:1}]},{app:null,appType:"custom",icon:"icon-apps",type:"Inbound",interval:"*,*,*,*",isApp:!0,fields:[{title:"Application_Name",name:"app",type:"text",required:!0,param:0},{title:"Arguments",name:"appdata",type:"text",param:1}]},{app:"Voicemail",appType:"voicemail",context:"from-voip-provider",icon:"icon-apps",type:"Inbound",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"voiceMails",route:"voiceMail",filters:{fields:"mailbox",sort:"mailbox"}}],fields:[{title:"Mailbox@Context",name:"voiceMail",type:"apiselect",values:"voiceMails",value:"'{{voiceMail.mailbox}}@from-voicemail'",option:"voiceMail.mailbox",required:!0,param:0},{title:"Options",name:"options",type:"text",param:1}]}],["app"]),{isApp:!1}),u.list={group:{name:"opt1",pull:"clone"},animation:100,sort:!1},u.applications={group:{name:"opt2",put:"opt1"},animation:100,onAdd:function(e){t(e,e.newIndex)},onSort:function(e){s()}},u.init=function(e){u.inboundroute=e,u.query.VoiceExtensionId=e.id,u.query.isApp=!0,u.query.nolimit=!0,u.getInboundRouteApps(),u.getIntervals()},u.deleteConfirm=function(e,t,n){var a=i.confirm().title("Are you sure want to delete the application?").htmlContent("<b>"+e.app+"</b> will be deleted.").ariaLabel("delete application").targetEvent(n).ok("OK").cancel("CANCEL");i.show(a).then(function(){u.inboundrouteApps.rows.splice(t,1),s()},function(){console.log("CANCEL")})},u.getInboundRouteApps=function(){u.promise=m.voiceExtension.get(u.query,n).$promise},u.editInboundRouteApp=t,u.editInterval=function(e,t){if(u.inboundrouteApps.rows.length){var n=u.inboundrouteApps.rows[t]?u.inboundrouteApps.rows[t]:u.inboundrouteApps.rows[0];i.show({controller:"EditInboundAppintervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/inboundroutes/edit/apps/interval/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:{interval:n.interval,IntervalId:n.IntervalId,application:!0},intervals:[]}}).then(function(e){e&&(n.interval=e.interval||"*,*,*,*",n.IntervalId=e.IntervalId||null,s())})}},u.deleteInboundRouteApp=function(e){_.remove(u.inboundrouteApps.rows,{id:e.id}),s(),o.success({title:"App deleted!",msg:e.app?e.app+" has been deleted!":""})},u.deleteSelectedInboundRouteApps=function(e){var t=i.confirm().title("Are you sure want to delete the selected applications?").htmlContent("<b>"+u.selectedInboundRouteApps.length+" selected</b> will be deleted.").ariaLabel("delete applications").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){u.selectedInboundRouteApps.forEach(function(e){_.remove(u.inboundrouteApps.rows,{id:e.id})}),u.selectedInboundRouteApps=[],s()})},u.rewriteRouting=s,u.getIntervals=function(){return m.interval.get({fields:"id,interval,IntervalId"}).$promise.then(function(e){u.intervals=e}).catch(function(e){console.error(e)})}}e.$inject=["api","$mdDialog","$document","toasty","Auth"],angular.module("app.voice").controller("InboundRouteActionsController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.agi=angular.copy(e),o.agi.appdata)switch(o.agi.appType?o.agi.appType.toLowerCase():o.agi.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.agi.appdata.split(",");o.agi.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.agi.text=s.slice(1,s.length).join(",");break;case"message":o.agi.text=o.agi.appdata;break;case"set":o.agi.name=o.agi.appdata.split("=")[0],o.agi.value=o.agi.appdata.split("=")[1];break;case"agi":o.agi.project=o.agi.appdata;break;default:var r=o.agi.appdata.split(",");o.agi.project=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.agi.type&&"outbound"===o.agi.type.toLowerCase()&&"outbounddial"===o.agi.appType.toLowerCase()&&(o.agi.prefix=o.agi.phone?o.agi.phone.split("$")[0]:void 0,o.agi.callerId=o.agi.callerID?"CALLERID(all)="+o.agi.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.agi.type&&"outbound"===o.agi.type.toLowerCase()&&"outboundDial"===o.agi.appType&&(o.agi.phone=a.cutdigits?(o.agi.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.agi.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.agi.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.agi.options+="U(xcally-mixmonitor-context)"):o.agi.options=o.agi.options.replace("U(xcally-mixmonitor-context)",""));if(o.agi.appType&&"custom"===o.agi.appType);else switch((o.agi.app||o.agi.appType).toLowerCase()){case"set":o.agi.appdata=o.agi.name+"="+o.agi.value;break;case"custom":break;default:e[0]=o.agi.project,o.agi.appdata=e.join(",")}l(o.agi)},o.closeDialog=l,i.squareProject.get({fields:"name",sort:"name"}).$promise.then(function(e){o.projects=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETprojects",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppagiDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(n.appType||n.app).toUpperCase(),o.custom=angular.copy(n),o.custom.appdata)switch(o.custom.appType?o.custom.appType.toLowerCase():o.custom.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.custom.appdata.split(",");o.custom.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.custom.text=s.slice(1,s.length).join(",");break;case"message":o.custom.text=o.custom.appdata;break;case"set":o.custom.name=o.custom.appdata.split("=")[0],o.custom.value=o.custom.appdata.split("=")[1];break;case"agi":o.custom.project=o.custom.appdata;break;default:var r=o.custom.appdata.split(",");o.custom.app=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.custom.appdata=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}function l(e){t.hide(e)}o.custom.type&&"outbound"===o.custom.type.toLowerCase()&&"outbounddial"===o.custom.appType.toLowerCase()&&(o.custom.prefix=o.custom.phone?o.custom.phone.split("$")[0]:void 0,o.custom.callerId=o.custom.callerID?"CALLERID(all)="+o.custom.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.custom.type&&"outbound"===o.custom.type.toLowerCase()&&"outboundDial"===o.custom.appType&&(o.custom.phone=a.cutdigits?(o.custom.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.custom.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.custom.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.custom.options+="U(xcally-mixmonitor-context)"):o.custom.options=o.custom.options.replace("U(xcally-mixmonitor-context)",""));if(o.custom.appType&&"custom"===o.custom.appType);else switch((o.custom.app||o.custom.appType).toLowerCase()){case"set":o.custom.appdata=o.custom.name+"="+o.custom.value;break;case"custom":break;default:e[0]=o.custom.app,e[1]=o.custom.appdata,o.custom.appdata=e.join(",")}l(o.custom)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppcustomDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(n.appType||n.app).toUpperCase(),o.dial=angular.copy(n),o.dial.appdata)switch(o.dial.appType?o.dial.appType.toLowerCase():o.dial.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.dial.appdata.split(",");o.dial.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.dial.text=s.slice(1,s.length).join(",");break;case"message":o.dial.text=o.dial.appdata;break;case"set":o.dial.name=o.dial.appdata.split("=")[0],o.dial.value=o.dial.appdata.split("=")[1];break;case"agi":o.dial.project=o.dial.appdata;break;default:var r=o.dial.appdata.split(",");o.dial.tech=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.dial.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.dial.options=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.dial.url=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10)}function l(e){t.hide(e)}o.dial.type&&"outbound"===o.dial.type.toLowerCase()&&"outbounddial"===o.dial.appType.toLowerCase()&&(o.dial.prefix=o.dial.phone?o.dial.phone.split("$")[0]:void 0,o.dial.callerId=o.dial.callerID?"CALLERID(all)="+o.dial.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.dial.type&&"outbound"===o.dial.type.toLowerCase()&&"outboundDial"===o.dial.appType&&(o.dial.phone=a.cutdigits?(o.dial.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.dial.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.dial.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.dial.options+="U(xcally-mixmonitor-context)"):o.dial.options=o.dial.options.replace("U(xcally-mixmonitor-context)",""));if(o.dial.appType&&"custom"===o.dial.appType);else switch((o.dial.app||o.dial.appType).toLowerCase()){case"set":o.dial.appdata=o.dial.name+"="+o.dial.value;break;case"custom":break;default:e[0]=o.dial.tech,e[1]=o.dial.timeout,e[2]=o.dial.options,e[3]=o.dial.url,o.dial.appdata=e.join(",")}l(o.dial)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppdialDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.externaldial=angular.copy(e),o.externaldial.appdata)switch(o.externaldial.appType?o.externaldial.appType.toLowerCase():o.externaldial.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.externaldial.appdata.split(",");o.externaldial.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.externaldial.text=s.slice(1,s.length).join(",");break;case"message":o.externaldial.text=o.externaldial.appdata;break;case"set":o.externaldial.name=o.externaldial.appdata.split("=")[0],o.externaldial.value=o.externaldial.appdata.split("=")[1];break;case"agi":o.externaldial.project=o.externaldial.appdata;break;default:var r=o.externaldial.appdata.split(",");o.externaldial.trunk=r[0].split("/")[1],o.externaldial.phone=r[0].split("/")[2],o.externaldial.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.externaldial.options=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.externaldial.url=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10)}function l(e){t.hide(e)}o.externaldial.type&&"outbound"===o.externaldial.type.toLowerCase()&&"outbounddial"===o.externaldial.appType.toLowerCase()&&(o.externaldial.prefix=o.externaldial.phone?o.externaldial.phone.split("$")[0]:void 0,o.externaldial.callerId=o.externaldial.callerID?"CALLERID(all)="+o.externaldial.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.externaldial.type&&"outbound"===o.externaldial.type.toLowerCase()&&"outboundDial"===o.externaldial.appType&&(o.externaldial.phone=a.cutdigits?(o.externaldial.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.externaldial.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.externaldial.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.externaldial.options+="U(xcally-mixmonitor-context)"):o.externaldial.options=o.externaldial.options.replace("U(xcally-mixmonitor-context)",""));if(o.externaldial.appType&&"custom"===o.externaldial.appType);else switch((o.externaldial.app||o.externaldial.appType).toLowerCase()){case"set":o.externaldial.appdata=o.externaldial.name+"="+o.externaldial.value;break;case"custom":break;default:e[0]=["SIP",o.externaldial.trunk,o.externaldial.phone].join("/"),e[1]=o.externaldial.timeout,e[2]=o.externaldial.options,e[3]=o.externaldial.url,o.externaldial.appdata=e.join(",")}l(o.externaldial)},o.closeDialog=l,i.trunk.get({fields:"name",sort:"name"}).$promise.then(function(e){o.trunks=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppexternaldialDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.goto=angular.copy(e),o.goto.appdata)switch(o.goto.appType?o.goto.appType.toLowerCase():o.goto.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.goto.appdata.split(",");o.goto.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.goto.text=s.slice(1,s.length).join(",");break;case"message":o.goto.text=o.goto.appdata;break;case"set":o.goto.name=o.goto.appdata.split("=")[0],o.goto.value=o.goto.appdata.split("=")[1];break;case"agi":o.goto.project=o.goto.appdata;break;default:var r=o.goto.appdata.split(",");o.goto.context=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.goto.extension=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.goto.priority=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10)}function l(e){t.hide(e)}o.goto.type&&"outbound"===o.goto.type.toLowerCase()&&"outbounddial"===o.goto.appType.toLowerCase()&&(o.goto.prefix=o.goto.phone?o.goto.phone.split("$")[0]:void 0,o.goto.callerId=o.goto.callerID?"CALLERID(all)="+o.goto.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.goto.type&&"outbound"===o.goto.type.toLowerCase()&&"outboundDial"===o.goto.appType&&(o.goto.phone=a.cutdigits?(o.goto.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.goto.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.goto.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.goto.options+="U(xcally-mixmonitor-context)"):o.goto.options=o.goto.options.replace("U(xcally-mixmonitor-context)",""));if(o.goto.appType&&"custom"===o.goto.appType);else switch((o.goto.app||o.goto.appType).toLowerCase()){case"set":o.goto.appdata=o.goto.name+"="+o.goto.value;break;case"custom":break;default:e[0]=o.goto.context,e[1]=o.goto.extension,e[2]=o.goto.priority,o.goto.appdata=e.join(",")}l(o.goto)},o.closeDialog=l,i.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){o.contexts=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppgotoDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(n.appType||n.app).toUpperCase(),o.hangup=angular.copy(n),o.hangup.appdata)switch(o.hangup.appType?o.hangup.appType.toLowerCase():o.hangup.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.hangup.appdata.split(",");o.hangup.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.hangup.text=s.slice(1,s.length).join(",");break;case"message":o.hangup.text=o.hangup.appdata;break;case"set":o.hangup.name=o.hangup.appdata.split("=")[0],o.hangup.value=o.hangup.appdata.split("=")[1];break;case"agi":o.hangup.project=o.hangup.appdata;break;default:var r=o.hangup.appdata.split(",");o.hangup.appdata=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.hangup.type&&"outbound"===o.hangup.type.toLowerCase()&&"outbounddial"===o.hangup.appType.toLowerCase()&&(o.hangup.prefix=o.hangup.phone?o.hangup.phone.split("$")[0]:void 0,o.hangup.callerId=o.hangup.callerID?"CALLERID(all)="+o.hangup.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.hangup.type&&"outbound"===o.hangup.type.toLowerCase()&&"outboundDial"===o.hangup.appType&&(o.hangup.phone=a.cutdigits?(o.hangup.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.hangup.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.hangup.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.hangup.options+="U(xcally-mixmonitor-context)"):o.hangup.options=o.hangup.options.replace("U(xcally-mixmonitor-context)",""));if(o.hangup.appType&&"custom"===o.hangup.appType);else switch((o.hangup.app||o.hangup.appType).toLowerCase()){case"set":o.hangup.appdata=o.hangup.name+"="+o.hangup.value;break;case"custom":break;default:e[0]=o.hangup.appdata,o.hangup.appdata=e.join(",")}l(o.hangup)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundApphangupDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.internaldial=angular.copy(e),o.internaldial.appdata)switch(o.internaldial.appType?o.internaldial.appType.toLowerCase():o.internaldial.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.internaldial.appdata.split(",");o.internaldial.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.internaldial.text=s.slice(1,s.length).join(",");break;case"message":o.internaldial.text=o.internaldial.appdata;break;case"set":o.internaldial.name=o.internaldial.appdata.split("=")[0],o.internaldial.value=o.internaldial.appdata.split("=")[1];break;case"agi":o.internaldial.project=o.internaldial.appdata;break;default:var r=o.internaldial.appdata.split(",");o.internaldial.user=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.internaldial.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.internaldial.options=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.internaldial.url=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10)}function l(e){t.hide(e)}o.internaldial.type&&"outbound"===o.internaldial.type.toLowerCase()&&"outbounddial"===o.internaldial.appType.toLowerCase()&&(o.internaldial.prefix=o.internaldial.phone?o.internaldial.phone.split("$")[0]:void 0,o.internaldial.callerId=o.internaldial.callerID?"CALLERID(all)="+o.internaldial.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.internaldial.type&&"outbound"===o.internaldial.type.toLowerCase()&&"outboundDial"===o.internaldial.appType&&(o.internaldial.phone=a.cutdigits?(o.internaldial.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.internaldial.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.internaldial.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.internaldial.options+="U(xcally-mixmonitor-context)"):o.internaldial.options=o.internaldial.options.replace("U(xcally-mixmonitor-context)",""));if(o.internaldial.appType&&"custom"===o.internaldial.appType);else switch((o.internaldial.app||o.internaldial.appType).toLowerCase()){case"set":o.internaldial.appdata=o.internaldial.name+"="+o.internaldial.value;break;case"custom":break;default:e[0]=o.internaldial.user,e[1]=o.internaldial.timeout,e[2]=o.internaldial.options,e[3]=o.internaldial.url,o.internaldial.appdata=e.join(",")}l(o.internaldial)},o.closeDialog=l,i.user.get({fields:"name",sort:"name"}).$promise.then(function(e){o.users=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETusers",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppinternaldialDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;if(l.errors=[],l.title="TOOLS.EDIT_INTERVAL",l.interval=angular.copy(i),l.intervals=o,l.newInterval=!1,l.types=["always","custom","list"],l.daysOfWeek=a.getDaysOfWeek(),l.monthNumber=a.getMonthNumber(),l.monthName=a.getMonthName(),l.daysOfMonth=a.getDaysOfMonth(),l.interval)if("*,*,*,*"!==l.interval.interval){l.type="custom";var d=l.interval.interval.split(","),c=d[0],m=d[1],u=d[2],p=d[3];if("*"!==c){var g,v=c.split("-")[0],h=c.split("-")[1];(g=new Date).setHours(Number(v.split(":")[0])),g.setMinutes(Number(v.split(":")[1])),l.timeRangeFrom=g,(g=new Date).setHours(Number(h.split(":")[0])),g.setMinutes(Number(h.split(":")[1])),l.timeRangeTo=g}"*"!==m&&(l.dayOfWeekFrom=m.split("-")[0],l.dayOfWeekTo=m.split("-")[1]),"*"!==u&&(l.monthDayFrom=u.split("-")[0],l.monthDayTo=u.split("-")[1]),"*"!==p&&(l.monthFrom=p.split("-")[0],l.monthTo=p.split("-")[1])}else l.type="always";else l.interval={interval:"*,*,*,*"},l.type="always",l.title="TOOLS.NEW_INTERVAL",l.newInterval=!0;function b(){switch(l.type){case"always":case"list":return"*,*,*,*";case"custom":var e=[];if("*"!==l.timeRangeFrom&&l.timeRangeFrom&&l.timeRangeTo){var t=(l.timeRangeFrom.getHours()<10?"0":"")+l.timeRangeFrom.getHours()+":"+(l.timeRangeFrom.getMinutes()<10?"0":"")+l.timeRangeFrom.getMinutes(),n=(l.timeRangeTo.getHours()<10?"0":"")+l.timeRangeTo.getHours()+":"+(l.timeRangeTo.getMinutes()<10?"0":"")+l.timeRangeTo.getMinutes();e.push(t+"-"+n)}else e.push("*");return l.dayOfWeekFrom?l.dayOfWeekTo?e.push(l.dayOfWeekFrom+"-"+l.dayOfWeekTo):e.push(l.dayOfWeekFrom):e.push("*"),l.monthDayFrom?l.monthDayTo?e.push(l.monthDayFrom+"-"+l.monthDayTo):e.push(l.monthDayFrom):e.push("*"),l.monthFrom?l.monthTo?e.push(l.monthFrom+"-"+l.monthTo):e.push(l.monthFrom):e.push("*"),e.join()}}function f(e){t.hide(e)}e.params.id&&!l.interval.application&&(l.interval.IntervalId=e.params.id),l.interval.IntervalId&&l.interval.application&&(l.type="list"),l.addNewInterval=function(){l.errors=[],l.interval.interval=b(),r.interval.save(l.interval).$promise.then(function(e){l.intervals.push(e),s.success({title:"Interval properly created",msg:l.interval.name?l.interval.name+" has been created!":""}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}]})},l.saveInterval=function(){l.errors=[],l.interval.interval=b(),l.interval.application?("list"!==l.type&&(l.interval.IntervalId=null),f(l.interval)):r.interval.update({id:l.interval.id},l.interval).$promise.then(function(e){var t=_.find(l.intervals,{id:e.id});t&&_.merge(t,e),s.success({title:"Interval properly saved!",msg:"Interval has been saved!"}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}]})},l.closeDialog=f,l.interval.application&&r.interval.get({fields:"id,name,interval,IntervalId",IntervalId:"null",nolimit:!0}).$promise.then(function(e){l.intervals=e}).catch(function(e){console.error(e)})}e.$inject=["$state","$mdDialog","$mdToast","IndexFactory","interval","intervals","toasty","api"],angular.module("app.voice").controller("EditInboundAppintervalDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.playback=angular.copy(e),o.playback.appdata)switch(o.playback.appType?o.playback.appType.toLowerCase():o.playback.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.playback.appdata.split(",");o.playback.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.playback.text=s.slice(1,s.length).join(",");break;case"message":o.playback.text=o.playback.appdata;break;case"set":o.playback.name=o.playback.appdata.split("=")[0],o.playback.value=o.playback.appdata.split("=")[1];break;case"agi":o.playback.project=o.playback.appdata;break;default:var r=o.playback.appdata.split(",");o.playback.appdata=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.playback.options=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}function l(e){t.hide(e)}o.playback.type&&"outbound"===o.playback.type.toLowerCase()&&"outbounddial"===o.playback.appType.toLowerCase()&&(o.playback.prefix=o.playback.phone?o.playback.phone.split("$")[0]:void 0,o.playback.callerId=o.playback.callerID?"CALLERID(all)="+o.playback.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.playback.type&&"outbound"===o.playback.type.toLowerCase()&&"outboundDial"===o.playback.appType&&(o.playback.phone=a.cutdigits?(o.playback.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.playback.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.playback.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.playback.options+="U(xcally-mixmonitor-context)"):o.playback.options=o.playback.options.replace("U(xcally-mixmonitor-context)",""));if(o.playback.appType&&"custom"===o.playback.appType);else switch((o.playback.app||o.playback.appType).toLowerCase()){case"set":o.playback.appdata=o.playback.name+"="+o.playback.value;break;case"custom":break;default:e[0]=o.playback.appdata,e[1]=o.playback.options,o.playback.appdata=e.join(",")}l(o.playback)},o.closeDialog=l,i.sound.get({fields:"name,save_name",sort:"name"}).$promise.then(function(e){o.sounds=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsounds",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppplaybackDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.queue=angular.copy(e),o.queue.appdata)switch(o.queue.appType?o.queue.appType.toLowerCase():o.queue.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.queue.appdata.split(",");o.queue.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.queue.text=s.slice(1,s.length).join(",");break;case"message":o.queue.text=o.queue.appdata;break;case"set":o.queue.name=o.queue.appdata.split("=")[0],o.queue.value=o.queue.appdata.split("=")[1];break;case"agi":o.queue.project=o.queue.appdata;break;default:var r=o.queue.appdata.split(",");o.queue.queue=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.queue.options=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.queue.URL=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.queue.sound=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10),o.queue.timeout=_.isEmpty(r[4])?r[4]:isNaN(r[4])?r[4]:parseInt(r[4],10),o.queue.agi=_.isEmpty(r[5])?r[5]:isNaN(r[5])?r[5]:parseInt(r[5],10),o.queue.macro=_.isEmpty(r[6])?r[6]:isNaN(r[6])?r[6]:parseInt(r[6],10),o.queue.gosub=_.isEmpty(r[7])?r[7]:isNaN(r[7])?r[7]:parseInt(r[7],10),o.queue.rule=_.isEmpty(r[8])?r[8]:isNaN(r[8])?r[8]:parseInt(r[8],10),o.queue.position=_.isEmpty(r[9])?r[9]:isNaN(r[9])?r[9]:parseInt(r[9],10)}function l(e){t.hide(e)}o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outbounddial"===o.queue.appType.toLowerCase()&&(o.queue.prefix=o.queue.phone?o.queue.phone.split("$")[0]:void 0,o.queue.callerId=o.queue.callerID?"CALLERID(all)="+o.queue.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outboundDial"===o.queue.appType&&(o.queue.phone=a.cutdigits?(o.queue.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.queue.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.queue.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.queue.options+="U(xcally-mixmonitor-context)"):o.queue.options=o.queue.options.replace("U(xcally-mixmonitor-context)",""));if(o.queue.appType&&"custom"===o.queue.appType);else switch((o.queue.app||o.queue.appType).toLowerCase()){case"set":o.queue.appdata=o.queue.name+"="+o.queue.value;break;case"custom":break;default:e[0]=o.queue.queue,e[1]=o.queue.options,e[2]=o.queue.URL,e[3]=o.queue.sound,e[4]=o.queue.timeout,e[5]=o.queue.agi,e[6]=o.queue.macro,e[7]=o.queue.gosub,e[8]=o.queue.rule,e[9]=o.queue.position,o.queue.appdata=e.join(",")}l(o.queue)},o.closeDialog=l,i.sound.get({fields:"name,save_name",sort:"name"}).$promise.then(function(e){o.sounds=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsounds",msg:e.data?JSON.stringify(e.data):e.toString()})}),i.voiceQueue.get({type:"inbound",fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){o.queues=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppqueueDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.ringgroup=angular.copy(e),o.ringgroup.appdata)switch(o.ringgroup.appType?o.ringgroup.appType.toLowerCase():o.ringgroup.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.ringgroup.appdata.split(",");o.ringgroup.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.ringgroup.text=s.slice(1,s.length).join(",");break;case"message":o.ringgroup.text=o.ringgroup.appdata;break;case"set":o.ringgroup.name=o.ringgroup.appdata.split("=")[0],o.ringgroup.value=o.ringgroup.appdata.split("=")[1];break;case"agi":o.ringgroup.project=o.ringgroup.appdata;break;default:var r=o.ringgroup.appdata.split(",");o.ringgroup.multipleUsers=r[0].split("&"),o.ringgroup.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.ringgroup.options=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.ringgroup.url=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10)}function l(e){t.hide(e)}o.ringgroup.type&&"outbound"===o.ringgroup.type.toLowerCase()&&"outbounddial"===o.ringgroup.appType.toLowerCase()&&(o.ringgroup.prefix=o.ringgroup.phone?o.ringgroup.phone.split("$")[0]:void 0,o.ringgroup.callerId=o.ringgroup.callerID?"CALLERID(all)="+o.ringgroup.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.ringgroup.type&&"outbound"===o.ringgroup.type.toLowerCase()&&"outboundDial"===o.ringgroup.appType&&(o.ringgroup.phone=a.cutdigits?(o.ringgroup.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.ringgroup.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.ringgroup.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.ringgroup.options+="U(xcally-mixmonitor-context)"):o.ringgroup.options=o.ringgroup.options.replace("U(xcally-mixmonitor-context)",""));if(o.ringgroup.appType&&"custom"===o.ringgroup.appType);else switch((o.ringgroup.app||o.ringgroup.appType).toLowerCase()){case"set":o.ringgroup.appdata=o.ringgroup.name+"="+o.ringgroup.value;break;case"custom":break;default:e[0]=o.ringgroup.multipleUsers.join("&"),e[1]=o.ringgroup.timeout,e[2]=o.ringgroup.options,e[3]=o.ringgroup.url,o.ringgroup.appdata=e.join(",")}l(o.ringgroup)},o.closeDialog=l,i.user.get({fields:"name",sort:"name"}).$promise.then(function(e){o.users=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETusers",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppringgroupDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.set=angular.copy(e),o.set.appdata)switch(o.set.appType?o.set.appType.toLowerCase():o.set.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.set.appdata.split(",");o.set.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.set.text=s.slice(1,s.length).join(",");break;case"message":o.set.text=o.set.appdata;break;case"set":o.set.name=o.set.appdata.split("=")[0],o.set.value=o.set.appdata.split("=")[1];break;case"agi":o.set.project=o.set.appdata;break;default:var r=o.set.appdata.split("=");o.set.name=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.set.value=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}function l(e){t.hide(e)}o.set.type&&"outbound"===o.set.type.toLowerCase()&&"outbounddial"===o.set.appType.toLowerCase()&&(o.set.prefix=o.set.phone?o.set.phone.split("$")[0]:void 0,o.set.callerId=o.set.callerID?"CALLERID(all)="+o.set.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.set.type&&"outbound"===o.set.type.toLowerCase()&&"outboundDial"===o.set.appType&&(o.set.phone=a.cutdigits?(o.set.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.set.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.set.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.set.options+="U(xcally-mixmonitor-context)"):o.set.options=o.set.options.replace("U(xcally-mixmonitor-context)",""));if(o.set.appType&&"custom"===o.set.appType);else switch((o.set.app||o.set.appType).toLowerCase()){case"set":o.set.appdata=o.set.name+"="+o.set.value;break;case"custom":break;default:e[0]=o.set.name,e[1]=o.set.value,o.set.appdata=e.join("=")}l(o.set)},o.closeDialog=l,i.variable.get({fields:"name",sort:"name"}).$promise.then(function(e){o.variables=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvariables",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppsetDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.voicemail=angular.copy(e),o.voicemail.appdata)switch(o.voicemail.appType?o.voicemail.appType.toLowerCase():o.voicemail.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.voicemail.appdata.split(",");o.voicemail.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.voicemail.text=s.slice(1,s.length).join(",");break;case"message":o.voicemail.text=o.voicemail.appdata;break;case"set":o.voicemail.name=o.voicemail.appdata.split("=")[0],o.voicemail.value=o.voicemail.appdata.split("=")[1];break;case"agi":o.voicemail.project=o.voicemail.appdata;break;default:var r=o.voicemail.appdata.split(",");o.voicemail.voiceMail=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.voicemail.options=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}function l(e){t.hide(e)}o.voicemail.type&&"outbound"===o.voicemail.type.toLowerCase()&&"outbounddial"===o.voicemail.appType.toLowerCase()&&(o.voicemail.prefix=o.voicemail.phone?o.voicemail.phone.split("$")[0]:void 0,o.voicemail.callerId=o.voicemail.callerID?"CALLERID(all)="+o.voicemail.callerID:void 0),o.saveInboundRouteApp=function(){o.errors=[];var e=[];o.voicemail.type&&"outbound"===o.voicemail.type.toLowerCase()&&"outboundDial"===o.voicemail.appType&&(o.voicemail.phone=a.cutdigits?(o.voicemail.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.voicemail.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.voicemail.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.voicemail.options+="U(xcally-mixmonitor-context)"):o.voicemail.options=o.voicemail.options.replace("U(xcally-mixmonitor-context)",""));if(o.voicemail.appType&&"custom"===o.voicemail.appType);else switch((o.voicemail.app||o.voicemail.appType).toLowerCase()){case"set":o.voicemail.appdata=o.voicemail.name+"="+o.voicemail.value;break;case"custom":break;default:e[0]=o.voicemail.voiceMail,e[1]=o.voicemail.options,o.voicemail.appdata=e.join(",")}l(o.voicemail)},o.closeDialog=l,i.voiceMail.get({fields:"mailbox",sort:"mailbox"}).$promise.then(function(e){o.voiceMails=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceMails",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","inboundrouteApp","inboundroute","api"],angular.module("app.voice").controller("EditInboundAppvoicemailDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.inboundroute=d||e.params.inboundroute||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoInboundRoutes=function(){e.go("app.voice.inboundroutes")},c.saveInboundRoute=function(){s.voiceExtension.update({id:c.inboundroute.id},c.inboundroute).$promise.then(function(){r.success({title:"InboundRoute updated!",msg:c.inboundroute.name?c.inboundroute.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceExtension",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){c.contexts=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","inboundroute"],angular.module("app.voice").controller("InboundRouteController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.inboundroutes=r||{count:0,rows:[]},v.table="inboundroutes",v.listOrder="",v.listOrderAsc=null,v.selectedInboundRoutes=[],v.query={fields:"createdAt,updatedAt,id,appdata,type,exten,context,description",type:"inbound",sort:"-updatedAt",VoiceExtensionId:"null",limit:10,page:1},v.editstate=function(e,t){n.go("app.voice.inboundroutes.edit",{id:e.id,inboundroute:e})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the inboundroute?").htmlContent("<b>"+(e.name||"inboundroute")+"</b> will be deleted.").ariaLabel("delete inboundroute").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getInboundRoutes=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.voiceExtension.get(v.query,f).$promise},v.createOrEditInboundRoute=function(e,t){i.show({controller:"CreateOrEditInboundRouteDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/inboundroutes/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{inboundroute:t,inboundroutes:v.inboundroutes.rows,license:v.license,setting:v.setting}})},v.deleteInboundRoute=A,v.exportSelectedInboundRoutes=function(){var e=angular.copy(v.selectedInboundRoutes);return v.selectedInboundRoutes=[],e},v.deleteSelectedInboundRoutes=function(e){var t=i.confirm().title("Are you sure want to delete the selected inboundroutes?").htmlContent("<b>"+v.selectedInboundRoutes.length+" selected</b> will be deleted.").ariaLabel("delete InboundRoutes").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedInboundRoutes.forEach(function(e){A(e)}),v.selectedInboundRoutes=[]})},v.deselectInboundRoutes=function(){v.selectedInboundRoutes=[]},v.selectAllInboundRoutes=function(){v.selectedInboundRoutes=v.inboundroutes.rows},l.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){v.contexts=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.inboundroutes=e||{count:0,rows:[]}}function A(e){l.voiceExtension.delete({id:e.id}).$promise.then(function(){_.remove(v.inboundroutes.rows,{id:e.id}),v.inboundroutes.count-=1,v.inboundroutes.rows.length||v.getInboundRoutes(),c.success({title:"InboundRoute deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvoiceExtension"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvoiceExtension",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getInboundRoutes())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","inboundroutes","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.voice").controller("InboundRoutesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="VOICE.EDIT_INTERNALROUTE",m.internalroute=angular.copy(s),m.internalroutes=o,m.newInternalRoute=!1,m.internalroute||(m.internalroute={appdata:"Internal Call",type:"internal",context:"from-sip"},m.title="VOICE.NEW_INTERNALROUTE",m.newInternalRoute=!0),m.addNewInternalRoute=function(){m.errors=[],r.voiceExtension.save(m.internalroute).$promise.then(function(e){m.internalroutes.unshift(e.toJSON()),i.success({title:"InternalRoute properly created",msg:m.internalroute.name?m.internalroute.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceExtension.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceExtension.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveInternalRoute=function(){m.errors=[],r.voiceExtension.update({id:m.internalroute.id},m.internalroute).$promise.then(function(e){var t=_.find(m.internalroutes,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"InternalRoute properly saved!",msg:m.internalroute.name?m.internalroute.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceExtension.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceExtension.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteInternalRoute=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The internalroute will be deleted.").ariaLabel("Delete InternalRoute").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceExtension.delete({id:m.internalroute.id}).$promise.then(function(){_.remove(m.internalroutes,{id:m.internalroute.id}),i.success({title:"InternalRoute properly deleted!",msg:(m.internalroute.name||"internalroute")+" has been deleted!"}),u(m.internalroute)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceExtension.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceExtension.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){m.contexts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","internalroutes","internalroute","api","Auth","license","setting"],angular.module("app.voice").controller("CreateOrEditInternalRouteDialogController",e)}(),function(){"use strict";function e(m,i,a,o,e){var u=this;function t(e,t){if(u.internalrouteApps.rows.length){var n=u.internalrouteApps.rows[t]?u.internalrouteApps.rows[t]:u.internalrouteApps.rows[0];i.show({controller:"EditInternalApp"+(n.appType||n.app).toLowerCase()+"DialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/internalroutes/edit/apps/"+(n.appType||n.app).toLowerCase()+"/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{internalrouteApp:n,internalroute:u.internalroute}}).then(function(e){e&&(e.id?u.internalrouteApps.rows[t]=e:u.internalrouteApps.rows.splice(t,0,e),s())}).catch(function(e){e&&o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:EDITMODALSHOW",msg:e.data?JSON.stringify(e.data):e.toString()})})}}function s(){var e=["queue","playback"],t=2,n=[];n.push({type:"internal",app:"Set",appdata:"CDR(type)=internal",context:u.internalroute.context,exten:u.internalroute.exten,priority:t++,VoiceExtensionId:u.internalroute.id}),n.push({type:"internal",app:"Set",appdata:"XCALLY-MOTION-ANSWER=0",context:u.internalroute.context,exten:u.internalroute.exten,priority:t++,VoiceExtensionId:u.internalroute.id}),n.push({type:"internal",app:"Set",appdata:"XCALLY-MOTION-PROGRESS=0",context:u.internalroute.context,exten:u.internalroute.exten,priority:t++,VoiceExtensionId:u.internalroute.id}),n.push({type:"internal",app:"Set",appdata:"MONITOR_OPTIONS=ab",context:u.internalroute.context,exten:u.internalroute.exten,priority:t++,VoiceExtensionId:u.internalroute.id});for(var a=0,i=0;a<u.internalrouteApps.rows.length;a++,i=0){var o=u.internalrouteApps.rows[a],s=[],r=[];o.intervals="*,*,*,*"!==o.interval?[o.interval]:o.IntervalId?_.map(_.filter(u.intervals.rows,{IntervalId:o.IntervalId}),"interval"):[],o.context=u.internalroute.context,o.exten=u.internalroute.exten,o.type&&(o.type=o.type.toLowerCase()),o.hasOwnProperty("answer")&&e.includes(o.app.toLowerCase())&&"custom"!==o.appType&&(o.answer?(s.push({type:o.type.toLowerCase(),app:"ExecIf",appdata:"$[${XCALLY-MOTION-ANSWER}=0]?Answer",context:u.internalroute.context,exten:u.internalroute.exten,priority:o.intervals.length+t+i++,VoiceExtensionId:u.internalroute.id}),s.push({type:o.type.toLowerCase(),app:"Set",appdata:"XCALLY-MOTION-ANSWER=1",context:u.internalroute.context,exten:u.internalroute.exten,priority:o.intervals.length+t+i++,VoiceExtensionId:u.internalroute.id})):(s.push({type:o.type.toLowerCase(),app:"ExecIf",appdata:"$[${XCALLY-MOTION-PROGRESS}=0]?Progress",context:u.internalroute.context,exten:u.internalroute.exten,priority:o.intervals.length+t+i++,VoiceExtensionId:u.internalroute.id}),s.push({type:o.type.toLowerCase(),app:"Set",appdata:"XCALLY-MOTION-PROGRESS=1",context:u.internalroute.context,exten:u.internalroute.exten,priority:o.intervals.length+t+i++,VoiceExtensionId:u.internalroute.id})));for(var l=0;l<o.intervals.length;l++){var d=t+o.intervals.length,c=l===o.intervals.length-1?t+s.length+r.length+2:t+l+1;s.splice(l,0,{type:"internal",app:"GotoIfTime",appdata:o.intervals[l]+"?"+u.internalroute.context+",${EXTEN},"+d+":"+u.internalroute.context+",${EXTEN},"+c,exten:u.internalroute.exten,context:u.internalroute.context,priority:t+l,VoiceExtensionId:u.internalroute.id})}o.priority=s.length?_.last(s).priority+1:t,t=(r.length?_.last(r).priority:o.priority)+1,n=_.concat(n,s,[o],r)}n.push({type:"internal",app:"Hangup",exten:u.internalroute.exten,context:u.internalroute.context,priority:t,VoiceExtensionId:u.internalroute.id}),m.voiceExtension.addApplications({id:u.internalroute.id},_.sortBy(n,"priority")).$promise.then(function(e){u.internalrouteApps.rows=e.rows}).catch(function(e){console.error(e)})}function n(e){u.internalrouteApps=e||{count:0,rows:[]}}u.currentUser=e.getCurrentUser(),u.internalroute={},u.internalrouteApps={count:0,rows:[]},u.selectedInternalRouteApps=[],u.query={sort:"priority"},u.apps=_.reject(_.sortBy([{app:"Interval",appType:"interval",type:"Internal",types:["always","custom","list"],fields:[],isApp:!1},{app:"Queue",appType:"queue",context:"from-sip",type:"Internal",options:"xX",appdata:",xX,,,300,,,,,",icon:"icon-apps",interval:"*,*,*,*",answer:!0,isApp:!0,extraApi:[{name:"sounds",route:"sound",filters:{fields:"name,save_name",sort:"name"}},{name:"queues",route:"voiceQueue",filters:{type:"inbound",fields:"id,name,type",sort:"name",nolimit:!0}}],fields:[{title:"Queue",name:"queue",type:"apiselect",values:"queues",value:"queue.name",option:"queue.name",required:!0,param:0},{title:"Options",name:"options",type:"text",param:1},{title:"Url",name:"URL",type:"text",param:2},{title:"Announce_Overrides",name:"sound",type:"apiselect",values:"sounds",value:"'/var/opt/motion2/server/files/sounds/converted/{{sound.save_name}}'",option:"sound.name",defaultValues:[{value:"''",option:"None"}],param:3},{title:"Timeout",name:"timeout",type:"number",min:0,param:4},{title:"Agi",name:"agi",type:"text",param:5},{title:"Macro",name:"macro",type:"text",param:6},{title:"GoSub",name:"gosub",type:"text",param:7},{title:"Rule",name:"rule",type:"text",param:8},{title:"Position",name:"position",type:"number",min:0,param:9},{title:"Answer",name:"answer",type:"switch",general:!0}]},{app:"Playback",appType:"playback",context:"from-sip",type:"Internal",icon:"icon-apps",interval:"*,*,*,*",answer:!0,isApp:!0,extraApi:[{name:"sounds",route:"sound",filters:{fields:"name,save_name",sort:"name"}}],fields:[{title:"Audio_Files",name:"appdata",type:"apiselect",values:"sounds",value:"'/var/opt/motion2/server/files/sounds/converted/{{appdata.save_name}}'",option:"appdata.name",required:!0,param:0},{title:"Options",name:"options",type:"text",param:1},{title:"Answer",name:"answer",type:"switch",general:!0}]},{app:"Dial",appType:"dial",context:"from-sip",type:"Internal",icon:"icon-apps",options:"xX",interval:"*,*,*,*",isApp:!0,fields:[{title:"Technology/Resource",name:"tech",type:"text",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",min:0,param:1},{title:"Options",name:"options",type:"text",param:2},{title:"Url",name:"url",type:"text",param:3}]},{app:"Dial",appType:"internalDial",context:"from-sip",type:"Internal",icon:"icon-apps",options:"xX",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"users",route:"user",filters:{fields:"name",sort:"name"}}],fields:[{title:"User",name:"user",type:"apiselect",values:"users",value:"'SIP/{{user.name}}'",option:"user.name",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",min:0,param:1},{title:"Options",name:"options",type:"text",param:2},{title:"Url",name:"url",type:"text",param:3}]},{app:"Dial",appType:"externalDial",context:"from-sip",type:"Internal",icon:"icon-apps",interval:"*,*,*,*",options:"xX",isApp:!0,extraApi:[{name:"trunks",route:"trunk",filters:{fields:"name",sort:"name"}}],fields:[{title:"Trunk",name:"trunk",type:"apiselect",values:"trunks",value:"trunk.name",option:"trunk.name",required:!0,param:0},{title:"Phone",name:"phone",type:"text"},{title:"Timeout",name:"timeout",type:"number",min:0,param:1},{title:"Options",name:"options",type:"text",param:2},{title:"Url",name:"url",type:"text",param:3}]},{app:"Dial",appType:"ringGroup",context:"from-sip",type:"Internal",icon:"icon-apps",interval:"*,*,*,*",options:"xX",isApp:!0,extraApi:[{name:"users",route:"user",filters:{fields:"name",sort:"name"}}],fields:[{title:"User",name:"multipleUsers",type:"apiselect",multiple:!0,values:"users",value:"'SIP/{{multipleUsers.name}}'",option:"multipleUsers.name",required:!0,param:0},{title:"Timeout",name:"timeout",type:"number",min:0,param:1},{title:"Options",name:"options",type:"text",param:2},{title:"Url",name:"url",type:"text",param:3}]},{app:"AGI",alias:"CallySquare",appType:"agi",context:"from-sip",type:"Internal",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"projects",route:"squareProject",filters:{fields:"name",sort:"name"}}],fields:[{title:"Project",name:"project",type:"apiselect",values:"projects",value:"'agi://127.0.0.1/square,{{project.name}}'",option:"project.name",required:!0,param:0}]},{app:"goto",appType:"goTo",context:"from-sip",type:"Internal",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"contexts",route:"voiceContext",filters:{fields:"name",sort:"name"}}],fields:[{title:"Context",name:"context",type:"apiselect",values:"contexts",value:"context.name",option:"context.name",required:!0,param:0},{title:"Extension",name:"extension",type:"text",required:!0,param:1},{title:"Priority",name:"priority",type:"text",required:!0,param:2}]},{app:"hangup",appType:"hangup",context:"from-sip",type:"Internal",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Hangup_Cause",name:"appdata",type:"select",param:0,values:[{option:"HANGUPCAUSE_1",value:"'1'"},{option:"HANGUPCAUSE_16",value:"'16'"},{option:"HANGUPCAUSE_17",value:"'17'"},{option:"HANGUPCAUSE_18",value:"'18'"},{option:"HANGUPCAUSE_21",value:"'21'"},{option:"HANGUPCAUSE_22",value:"'22'"},{option:"HANGUPCAUSE_27",value:"'27'"},{option:"HANGUPCAUSE_38",value:"'38'"},{option:"HANGUPCAUSE_41",value:"'41'"}],translate:!0,required:!0,general:!0}]},{app:"Set",appType:"set",context:"from-sip",type:"Internal",separator:"=",icon:"icon-apps",interval:"*,*,*,*",extraApi:[{name:"variables",route:"variable",filters:{fields:"name",sort:"name"}}],isApp:!0,fields:[{title:"Variable",name:"name",type:"apiselect",values:"variables",value:"name.name",option:"name.name",required:!0,param:0},{title:"Value",name:"value",type:"text",required:!0,param:1}]},{app:null,appType:"custom",icon:"icon-apps",type:"Internal",interval:"*,*,*,*",isApp:!0,fields:[{title:"Application_Name",name:"app",type:"text",required:!0,param:0},{title:"Arguments",name:"appdata",type:"text",param:1}]},{app:"Voicemail",appType:"voicemail",context:"from-sip",icon:"icon-apps",type:"Internal",interval:"*,*,*,*",isApp:!0,extraApi:[{name:"voiceMails",route:"voiceMail",filters:{fields:"mailbox",sort:"mailbox"}}],fields:[{title:"Mailbox@Context",name:"voiceMail",type:"apiselect",values:"voiceMails",value:"'{{voiceMail.mailbox}}@from-voicemail'",option:"voiceMail.mailbox",required:!0,param:0},{title:"Options",name:"options",type:"text",param:1}]}],["app"]),{isApp:!1}),u.list={group:{name:"opt1",pull:"clone"},animation:100,sort:!1},u.applications={group:{name:"opt2",put:"opt1"},animation:100,onAdd:function(e){t(e,e.newIndex)},onSort:function(e){s()}},u.init=function(e){u.internalroute=e,u.query.VoiceExtensionId=e.id,u.query.isApp=!0,u.query.nolimit=!0,u.getInternalRouteApps(),u.getIntervals()},u.deleteConfirm=function(e,t,n){var a=i.confirm().title("Are you sure want to delete the application?").htmlContent("<b>"+e.app+"</b> will be deleted.").ariaLabel("delete application").targetEvent(n).ok("OK").cancel("CANCEL");i.show(a).then(function(){u.internalrouteApps.rows.splice(t,1),s()},function(){console.log("CANCEL")})},u.getInternalRouteApps=function(){u.promise=m.voiceExtension.get(u.query,n).$promise},u.editInternalRouteApp=t,u.editInterval=function(e,t){if(u.internalrouteApps.rows.length){var n=u.internalrouteApps.rows[t]?u.internalrouteApps.rows[t]:u.internalrouteApps.rows[0];i.show({controller:"EditInternalAppintervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/internalroutes/edit/apps/interval/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:{interval:n.interval,IntervalId:n.IntervalId,application:!0},intervals:[]}}).then(function(e){e&&(n.interval=e.interval||"*,*,*,*",n.IntervalId=e.IntervalId||null,s())})}},u.deleteInternalRouteApp=function(e){_.remove(u.internalrouteApps.rows,{id:e.id}),s(),o.success({title:"App deleted!",msg:e.app?e.app+" has been deleted!":""})},u.deleteSelectedInternalRouteApps=function(e){var t=i.confirm().title("Are you sure want to delete the selected applications?").htmlContent("<b>"+u.selectedInternalRouteApps.length+" selected</b> will be deleted.").ariaLabel("delete applications").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){u.selectedInternalRouteApps.forEach(function(e){_.remove(u.internalrouteApps.rows,{id:e.id})}),u.selectedInternalRouteApps=[],s()})},u.rewriteRouting=s,u.getIntervals=function(){return m.interval.get({fields:"id,interval,IntervalId"}).$promise.then(function(e){u.intervals=e}).catch(function(e){console.error(e)})}}e.$inject=["api","$mdDialog","$document","toasty","Auth"],angular.module("app.voice").controller("InternalRouteActionsController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.agi=angular.copy(e),o.agi.appdata)switch(o.agi.appType?o.agi.appType.toLowerCase():o.agi.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.agi.appdata.split(",");o.agi.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.agi.text=s.slice(1,s.length).join(",");break;case"message":o.agi.text=o.agi.appdata;break;case"set":o.agi.name=o.agi.appdata.split("=")[0],o.agi.value=o.agi.appdata.split("=")[1];break;case"agi":o.agi.project=o.agi.appdata;break;default:var r=o.agi.appdata.split(",");o.agi.project=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.agi.type&&"outbound"===o.agi.type.toLowerCase()&&"outbounddial"===o.agi.appType.toLowerCase()&&(o.agi.prefix=o.agi.phone?o.agi.phone.split("$")[0]:void 0,o.agi.callerId=o.agi.callerID?"CALLERID(all)="+o.agi.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.agi.type&&"outbound"===o.agi.type.toLowerCase()&&"outboundDial"===o.agi.appType&&(o.agi.phone=a.cutdigits?(o.agi.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.agi.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.agi.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.agi.options+="U(xcally-mixmonitor-context)"):o.agi.options=o.agi.options.replace("U(xcally-mixmonitor-context)",""));if(o.agi.appType&&"custom"===o.agi.appType);else switch((o.agi.app||o.agi.appType).toLowerCase()){case"set":o.agi.appdata=o.agi.name+"="+o.agi.value;break;case"custom":break;default:e[0]=o.agi.project,o.agi.appdata=e.join(",")}l(o.agi)},o.closeDialog=l,i.squareProject.get({fields:"name",sort:"name"}).$promise.then(function(e){o.projects=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETprojects",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppagiDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(n.appType||n.app).toUpperCase(),o.custom=angular.copy(n),o.custom.appdata)switch(o.custom.appType?o.custom.appType.toLowerCase():o.custom.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.custom.appdata.split(",");o.custom.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.custom.text=s.slice(1,s.length).join(",");break;case"message":o.custom.text=o.custom.appdata;break;case"set":o.custom.name=o.custom.appdata.split("=")[0],o.custom.value=o.custom.appdata.split("=")[1];break;case"agi":o.custom.project=o.custom.appdata;break;default:var r=o.custom.appdata.split(",");o.custom.app=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.custom.appdata=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}function l(e){t.hide(e)}o.custom.type&&"outbound"===o.custom.type.toLowerCase()&&"outbounddial"===o.custom.appType.toLowerCase()&&(o.custom.prefix=o.custom.phone?o.custom.phone.split("$")[0]:void 0,o.custom.callerId=o.custom.callerID?"CALLERID(all)="+o.custom.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.custom.type&&"outbound"===o.custom.type.toLowerCase()&&"outboundDial"===o.custom.appType&&(o.custom.phone=a.cutdigits?(o.custom.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.custom.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.custom.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.custom.options+="U(xcally-mixmonitor-context)"):o.custom.options=o.custom.options.replace("U(xcally-mixmonitor-context)",""));if(o.custom.appType&&"custom"===o.custom.appType);else switch((o.custom.app||o.custom.appType).toLowerCase()){case"set":o.custom.appdata=o.custom.name+"="+o.custom.value;break;case"custom":break;default:e[0]=o.custom.app,e[1]=o.custom.appdata,o.custom.appdata=e.join(",")}l(o.custom)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppcustomDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(n.appType||n.app).toUpperCase(),o.dial=angular.copy(n),o.dial.appdata)switch(o.dial.appType?o.dial.appType.toLowerCase():o.dial.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.dial.appdata.split(",");o.dial.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.dial.text=s.slice(1,s.length).join(",");break;case"message":o.dial.text=o.dial.appdata;break;case"set":o.dial.name=o.dial.appdata.split("=")[0],o.dial.value=o.dial.appdata.split("=")[1];break;case"agi":o.dial.project=o.dial.appdata;break;default:var r=o.dial.appdata.split(",");o.dial.tech=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.dial.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.dial.options=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.dial.url=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10)}function l(e){t.hide(e)}o.dial.type&&"outbound"===o.dial.type.toLowerCase()&&"outbounddial"===o.dial.appType.toLowerCase()&&(o.dial.prefix=o.dial.phone?o.dial.phone.split("$")[0]:void 0,o.dial.callerId=o.dial.callerID?"CALLERID(all)="+o.dial.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.dial.type&&"outbound"===o.dial.type.toLowerCase()&&"outboundDial"===o.dial.appType&&(o.dial.phone=a.cutdigits?(o.dial.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.dial.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.dial.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.dial.options+="U(xcally-mixmonitor-context)"):o.dial.options=o.dial.options.replace("U(xcally-mixmonitor-context)",""));if(o.dial.appType&&"custom"===o.dial.appType);else switch((o.dial.app||o.dial.appType).toLowerCase()){case"set":o.dial.appdata=o.dial.name+"="+o.dial.value;break;case"custom":break;default:e[0]=o.dial.tech,e[1]=o.dial.timeout,e[2]=o.dial.options,e[3]=o.dial.url,o.dial.appdata=e.join(",")}l(o.dial)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppdialDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.externaldial=angular.copy(e),o.externaldial.appdata)switch(o.externaldial.appType?o.externaldial.appType.toLowerCase():o.externaldial.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.externaldial.appdata.split(",");o.externaldial.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.externaldial.text=s.slice(1,s.length).join(",");break;case"message":o.externaldial.text=o.externaldial.appdata;break;case"set":o.externaldial.name=o.externaldial.appdata.split("=")[0],o.externaldial.value=o.externaldial.appdata.split("=")[1];break;case"agi":o.externaldial.project=o.externaldial.appdata;break;default:var r=o.externaldial.appdata.split(",");o.externaldial.trunk=r[0].split("/")[1],o.externaldial.phone=r[0].split("/")[2],o.externaldial.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.externaldial.options=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.externaldial.url=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10)}function l(e){t.hide(e)}o.externaldial.type&&"outbound"===o.externaldial.type.toLowerCase()&&"outbounddial"===o.externaldial.appType.toLowerCase()&&(o.externaldial.prefix=o.externaldial.phone?o.externaldial.phone.split("$")[0]:void 0,o.externaldial.callerId=o.externaldial.callerID?"CALLERID(all)="+o.externaldial.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.externaldial.type&&"outbound"===o.externaldial.type.toLowerCase()&&"outboundDial"===o.externaldial.appType&&(o.externaldial.phone=a.cutdigits?(o.externaldial.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.externaldial.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.externaldial.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.externaldial.options+="U(xcally-mixmonitor-context)"):o.externaldial.options=o.externaldial.options.replace("U(xcally-mixmonitor-context)",""));if(o.externaldial.appType&&"custom"===o.externaldial.appType);else switch((o.externaldial.app||o.externaldial.appType).toLowerCase()){case"set":o.externaldial.appdata=o.externaldial.name+"="+o.externaldial.value;break;case"custom":break;default:e[0]=["SIP",o.externaldial.trunk,o.externaldial.phone].join("/"),e[1]=o.externaldial.timeout,e[2]=o.externaldial.options,e[3]=o.externaldial.url,o.externaldial.appdata=e.join(",")}l(o.externaldial)},o.closeDialog=l,i.trunk.get({fields:"name",sort:"name"}).$promise.then(function(e){o.trunks=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppexternaldialDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.goto=angular.copy(e),o.goto.appdata)switch(o.goto.appType?o.goto.appType.toLowerCase():o.goto.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.goto.appdata.split(",");o.goto.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.goto.text=s.slice(1,s.length).join(",");break;case"message":o.goto.text=o.goto.appdata;break;case"set":o.goto.name=o.goto.appdata.split("=")[0],o.goto.value=o.goto.appdata.split("=")[1];break;case"agi":o.goto.project=o.goto.appdata;break;default:var r=o.goto.appdata.split(",");o.goto.context=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.goto.extension=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.goto.priority=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10)}function l(e){t.hide(e)}o.goto.type&&"outbound"===o.goto.type.toLowerCase()&&"outbounddial"===o.goto.appType.toLowerCase()&&(o.goto.prefix=o.goto.phone?o.goto.phone.split("$")[0]:void 0,o.goto.callerId=o.goto.callerID?"CALLERID(all)="+o.goto.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.goto.type&&"outbound"===o.goto.type.toLowerCase()&&"outboundDial"===o.goto.appType&&(o.goto.phone=a.cutdigits?(o.goto.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.goto.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.goto.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.goto.options+="U(xcally-mixmonitor-context)"):o.goto.options=o.goto.options.replace("U(xcally-mixmonitor-context)",""));if(o.goto.appType&&"custom"===o.goto.appType);else switch((o.goto.app||o.goto.appType).toLowerCase()){case"set":o.goto.appdata=o.goto.name+"="+o.goto.value;break;case"custom":break;default:e[0]=o.goto.context,e[1]=o.goto.extension,e[2]=o.goto.priority,o.goto.appdata=e.join(",")}l(o.goto)},o.closeDialog=l,i.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){o.contexts=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppgotoDialogController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(n.appType||n.app).toUpperCase(),o.hangup=angular.copy(n),o.hangup.appdata)switch(o.hangup.appType?o.hangup.appType.toLowerCase():o.hangup.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.hangup.appdata.split(",");o.hangup.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.hangup.text=s.slice(1,s.length).join(",");break;case"message":o.hangup.text=o.hangup.appdata;break;case"set":o.hangup.name=o.hangup.appdata.split("=")[0],o.hangup.value=o.hangup.appdata.split("=")[1];break;case"agi":o.hangup.project=o.hangup.appdata;break;default:var r=o.hangup.appdata.split(",");o.hangup.appdata=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10)}function l(e){t.hide(e)}o.hangup.type&&"outbound"===o.hangup.type.toLowerCase()&&"outbounddial"===o.hangup.appType.toLowerCase()&&(o.hangup.prefix=o.hangup.phone?o.hangup.phone.split("$")[0]:void 0,o.hangup.callerId=o.hangup.callerID?"CALLERID(all)="+o.hangup.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.hangup.type&&"outbound"===o.hangup.type.toLowerCase()&&"outboundDial"===o.hangup.appType&&(o.hangup.phone=a.cutdigits?(o.hangup.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.hangup.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.hangup.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.hangup.options+="U(xcally-mixmonitor-context)"):o.hangup.options=o.hangup.options.replace("U(xcally-mixmonitor-context)",""));if(o.hangup.appType&&"custom"===o.hangup.appType);else switch((o.hangup.app||o.hangup.appType).toLowerCase()){case"set":o.hangup.appdata=o.hangup.name+"="+o.hangup.value;break;case"custom":break;default:e[0]=o.hangup.appdata,o.hangup.appdata=e.join(",")}l(o.hangup)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalApphangupDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.internaldial=angular.copy(e),o.internaldial.appdata)switch(o.internaldial.appType?o.internaldial.appType.toLowerCase():o.internaldial.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.internaldial.appdata.split(",");o.internaldial.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.internaldial.text=s.slice(1,s.length).join(",");break;case"message":o.internaldial.text=o.internaldial.appdata;break;case"set":o.internaldial.name=o.internaldial.appdata.split("=")[0],o.internaldial.value=o.internaldial.appdata.split("=")[1];break;case"agi":o.internaldial.project=o.internaldial.appdata;break;default:var r=o.internaldial.appdata.split(",");o.internaldial.user=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.internaldial.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.internaldial.options=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.internaldial.url=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10)}function l(e){t.hide(e)}o.internaldial.type&&"outbound"===o.internaldial.type.toLowerCase()&&"outbounddial"===o.internaldial.appType.toLowerCase()&&(o.internaldial.prefix=o.internaldial.phone?o.internaldial.phone.split("$")[0]:void 0,o.internaldial.callerId=o.internaldial.callerID?"CALLERID(all)="+o.internaldial.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.internaldial.type&&"outbound"===o.internaldial.type.toLowerCase()&&"outboundDial"===o.internaldial.appType&&(o.internaldial.phone=a.cutdigits?(o.internaldial.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.internaldial.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.internaldial.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.internaldial.options+="U(xcally-mixmonitor-context)"):o.internaldial.options=o.internaldial.options.replace("U(xcally-mixmonitor-context)",""));if(o.internaldial.appType&&"custom"===o.internaldial.appType);else switch((o.internaldial.app||o.internaldial.appType).toLowerCase()){case"set":o.internaldial.appdata=o.internaldial.name+"="+o.internaldial.value;break;case"custom":break;default:e[0]=o.internaldial.user,e[1]=o.internaldial.timeout,e[2]=o.internaldial.options,e[3]=o.internaldial.url,o.internaldial.appdata=e.join(",")}l(o.internaldial)},o.closeDialog=l,i.user.get({fields:"name",sort:"name"}).$promise.then(function(e){o.users=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETusers",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppinternaldialDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;if(l.errors=[],l.title="TOOLS.EDIT_INTERVAL",l.interval=angular.copy(i),l.intervals=o,l.newInterval=!1,l.types=["always","custom","list"],l.daysOfWeek=a.getDaysOfWeek(),l.monthNumber=a.getMonthNumber(),l.monthName=a.getMonthName(),l.daysOfMonth=a.getDaysOfMonth(),l.interval)if("*,*,*,*"!==l.interval.interval){l.type="custom";var d=l.interval.interval.split(","),c=d[0],m=d[1],u=d[2],p=d[3];if("*"!==c){var g,v=c.split("-")[0],h=c.split("-")[1];(g=new Date).setHours(Number(v.split(":")[0])),g.setMinutes(Number(v.split(":")[1])),l.timeRangeFrom=g,(g=new Date).setHours(Number(h.split(":")[0])),g.setMinutes(Number(h.split(":")[1])),l.timeRangeTo=g}"*"!==m&&(l.dayOfWeekFrom=m.split("-")[0],l.dayOfWeekTo=m.split("-")[1]),"*"!==u&&(l.monthDayFrom=u.split("-")[0],l.monthDayTo=u.split("-")[1]),"*"!==p&&(l.monthFrom=p.split("-")[0],l.monthTo=p.split("-")[1])}else l.type="always";else l.interval={interval:"*,*,*,*"},l.type="always",l.title="TOOLS.NEW_INTERVAL",l.newInterval=!0;function b(){switch(l.type){case"always":case"list":return"*,*,*,*";case"custom":var e=[];if("*"!==l.timeRangeFrom&&l.timeRangeFrom&&l.timeRangeTo){var t=(l.timeRangeFrom.getHours()<10?"0":"")+l.timeRangeFrom.getHours()+":"+(l.timeRangeFrom.getMinutes()<10?"0":"")+l.timeRangeFrom.getMinutes(),n=(l.timeRangeTo.getHours()<10?"0":"")+l.timeRangeTo.getHours()+":"+(l.timeRangeTo.getMinutes()<10?"0":"")+l.timeRangeTo.getMinutes();e.push(t+"-"+n)}else e.push("*");return l.dayOfWeekFrom?l.dayOfWeekTo?e.push(l.dayOfWeekFrom+"-"+l.dayOfWeekTo):e.push(l.dayOfWeekFrom):e.push("*"),l.monthDayFrom?l.monthDayTo?e.push(l.monthDayFrom+"-"+l.monthDayTo):e.push(l.monthDayFrom):e.push("*"),l.monthFrom?l.monthTo?e.push(l.monthFrom+"-"+l.monthTo):e.push(l.monthFrom):e.push("*"),e.join()}}function f(e){t.hide(e)}e.params.id&&!l.interval.application&&(l.interval.IntervalId=e.params.id),l.interval.IntervalId&&l.interval.application&&(l.type="list"),l.addNewInterval=function(){l.errors=[],l.interval.interval=b(),r.interval.save(l.interval).$promise.then(function(e){l.intervals.push(e),s.success({title:"Interval properly created",msg:l.interval.name?l.interval.name+" has been created!":""}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}]})},l.saveInterval=function(){l.errors=[],l.interval.interval=b(),l.interval.application?("list"!==l.type&&(l.interval.IntervalId=null),f(l.interval)):r.interval.update({id:l.interval.id},l.interval).$promise.then(function(e){var t=_.find(l.intervals,{id:e.id});t&&_.merge(t,e),s.success({title:"Interval properly saved!",msg:"Interval has been saved!"}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}]})},l.closeDialog=f,l.interval.application&&r.interval.get({fields:"id,name,interval,IntervalId",IntervalId:"null",nolimit:!0}).$promise.then(function(e){l.intervals=e}).catch(function(e){console.error(e)})}e.$inject=["$state","$mdDialog","$mdToast","IndexFactory","interval","intervals","toasty","api"],angular.module("app.voice").controller("EditInternalAppintervalDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.playback=angular.copy(e),o.playback.appdata)switch(o.playback.appType?o.playback.appType.toLowerCase():o.playback.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.playback.appdata.split(",");o.playback.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.playback.text=s.slice(1,s.length).join(",");break;case"message":o.playback.text=o.playback.appdata;break;case"set":o.playback.name=o.playback.appdata.split("=")[0],o.playback.value=o.playback.appdata.split("=")[1];break;case"agi":o.playback.project=o.playback.appdata;break;default:var r=o.playback.appdata.split(",");o.playback.appdata=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.playback.options=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}function l(e){t.hide(e)}o.playback.type&&"outbound"===o.playback.type.toLowerCase()&&"outbounddial"===o.playback.appType.toLowerCase()&&(o.playback.prefix=o.playback.phone?o.playback.phone.split("$")[0]:void 0,o.playback.callerId=o.playback.callerID?"CALLERID(all)="+o.playback.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.playback.type&&"outbound"===o.playback.type.toLowerCase()&&"outboundDial"===o.playback.appType&&(o.playback.phone=a.cutdigits?(o.playback.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.playback.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.playback.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.playback.options+="U(xcally-mixmonitor-context)"):o.playback.options=o.playback.options.replace("U(xcally-mixmonitor-context)",""));if(o.playback.appType&&"custom"===o.playback.appType);else switch((o.playback.app||o.playback.appType).toLowerCase()){case"set":o.playback.appdata=o.playback.name+"="+o.playback.value;break;case"custom":break;default:e[0]=o.playback.appdata,e[1]=o.playback.options,o.playback.appdata=e.join(",")}l(o.playback)},o.closeDialog=l,i.sound.get({fields:"name,save_name",sort:"name"}).$promise.then(function(e){o.sounds=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsounds",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppplaybackDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.queue=angular.copy(e),o.queue.appdata)switch(o.queue.appType?o.queue.appType.toLowerCase():o.queue.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.queue.appdata.split(",");o.queue.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.queue.text=s.slice(1,s.length).join(",");break;case"message":o.queue.text=o.queue.appdata;break;case"set":o.queue.name=o.queue.appdata.split("=")[0],o.queue.value=o.queue.appdata.split("=")[1];break;case"agi":o.queue.project=o.queue.appdata;break;default:var r=o.queue.appdata.split(",");o.queue.queue=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.queue.options=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.queue.URL=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.queue.sound=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10),o.queue.timeout=_.isEmpty(r[4])?r[4]:isNaN(r[4])?r[4]:parseInt(r[4],10),o.queue.agi=_.isEmpty(r[5])?r[5]:isNaN(r[5])?r[5]:parseInt(r[5],10),o.queue.macro=_.isEmpty(r[6])?r[6]:isNaN(r[6])?r[6]:parseInt(r[6],10),o.queue.gosub=_.isEmpty(r[7])?r[7]:isNaN(r[7])?r[7]:parseInt(r[7],10),o.queue.rule=_.isEmpty(r[8])?r[8]:isNaN(r[8])?r[8]:parseInt(r[8],10),o.queue.position=_.isEmpty(r[9])?r[9]:isNaN(r[9])?r[9]:parseInt(r[9],10)}function l(e){t.hide(e)}o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outbounddial"===o.queue.appType.toLowerCase()&&(o.queue.prefix=o.queue.phone?o.queue.phone.split("$")[0]:void 0,o.queue.callerId=o.queue.callerID?"CALLERID(all)="+o.queue.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.queue.type&&"outbound"===o.queue.type.toLowerCase()&&"outboundDial"===o.queue.appType&&(o.queue.phone=a.cutdigits?(o.queue.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.queue.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.queue.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.queue.options+="U(xcally-mixmonitor-context)"):o.queue.options=o.queue.options.replace("U(xcally-mixmonitor-context)",""));if(o.queue.appType&&"custom"===o.queue.appType);else switch((o.queue.app||o.queue.appType).toLowerCase()){case"set":o.queue.appdata=o.queue.name+"="+o.queue.value;break;case"custom":break;default:e[0]=o.queue.queue,e[1]=o.queue.options,e[2]=o.queue.URL,e[3]=o.queue.sound,e[4]=o.queue.timeout,e[5]=o.queue.agi,e[6]=o.queue.macro,e[7]=o.queue.gosub,e[8]=o.queue.rule,e[9]=o.queue.position,o.queue.appdata=e.join(",")}l(o.queue)},o.closeDialog=l,i.sound.get({fields:"name,save_name",sort:"name"}).$promise.then(function(e){o.sounds=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsounds",msg:e.data?JSON.stringify(e.data):e.toString()})}),i.voiceQueue.get({type:"inbound",fields:"id,name,type",sort:"name",nolimit:"true"}).$promise.then(function(e){o.queues=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETqueues",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppqueueDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.ringgroup=angular.copy(e),o.ringgroup.appdata)switch(o.ringgroup.appType?o.ringgroup.appType.toLowerCase():o.ringgroup.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.ringgroup.appdata.split(",");o.ringgroup.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.ringgroup.text=s.slice(1,s.length).join(",");break;case"message":o.ringgroup.text=o.ringgroup.appdata;break;case"set":o.ringgroup.name=o.ringgroup.appdata.split("=")[0],o.ringgroup.value=o.ringgroup.appdata.split("=")[1];break;case"agi":o.ringgroup.project=o.ringgroup.appdata;break;default:var r=o.ringgroup.appdata.split(",");o.ringgroup.multipleUsers=r[0].split("&"),o.ringgroup.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.ringgroup.options=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.ringgroup.url=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10)}function l(e){t.hide(e)}o.ringgroup.type&&"outbound"===o.ringgroup.type.toLowerCase()&&"outbounddial"===o.ringgroup.appType.toLowerCase()&&(o.ringgroup.prefix=o.ringgroup.phone?o.ringgroup.phone.split("$")[0]:void 0,o.ringgroup.callerId=o.ringgroup.callerID?"CALLERID(all)="+o.ringgroup.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.ringgroup.type&&"outbound"===o.ringgroup.type.toLowerCase()&&"outboundDial"===o.ringgroup.appType&&(o.ringgroup.phone=a.cutdigits?(o.ringgroup.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.ringgroup.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.ringgroup.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.ringgroup.options+="U(xcally-mixmonitor-context)"):o.ringgroup.options=o.ringgroup.options.replace("U(xcally-mixmonitor-context)",""));if(o.ringgroup.appType&&"custom"===o.ringgroup.appType);else switch((o.ringgroup.app||o.ringgroup.appType).toLowerCase()){case"set":o.ringgroup.appdata=o.ringgroup.name+"="+o.ringgroup.value;break;case"custom":break;default:e[0]=o.ringgroup.multipleUsers.join("&"),e[1]=o.ringgroup.timeout,e[2]=o.ringgroup.options,e[3]=o.ringgroup.url,o.ringgroup.appdata=e.join(",")}l(o.ringgroup)},o.closeDialog=l,i.user.get({fields:"name",sort:"name"}).$promise.then(function(e){o.users=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETusers",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppringgroupDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.set=angular.copy(e),o.set.appdata)switch(o.set.appType?o.set.appType.toLowerCase():o.set.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.set.appdata.split(",");o.set.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.set.text=s.slice(1,s.length).join(",");break;case"message":o.set.text=o.set.appdata;break;case"set":o.set.name=o.set.appdata.split("=")[0],o.set.value=o.set.appdata.split("=")[1];break;case"agi":o.set.project=o.set.appdata;break;default:var r=o.set.appdata.split("=");o.set.name=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.set.value=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}function l(e){t.hide(e)}o.set.type&&"outbound"===o.set.type.toLowerCase()&&"outbounddial"===o.set.appType.toLowerCase()&&(o.set.prefix=o.set.phone?o.set.phone.split("$")[0]:void 0,o.set.callerId=o.set.callerID?"CALLERID(all)="+o.set.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.set.type&&"outbound"===o.set.type.toLowerCase()&&"outboundDial"===o.set.appType&&(o.set.phone=a.cutdigits?(o.set.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.set.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.set.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.set.options+="U(xcally-mixmonitor-context)"):o.set.options=o.set.options.replace("U(xcally-mixmonitor-context)",""));if(o.set.appType&&"custom"===o.set.appType);else switch((o.set.app||o.set.appType).toLowerCase()){case"set":o.set.appdata=o.set.name+"="+o.set.value;break;case"custom":break;default:e[0]=o.set.name,e[1]=o.set.value,o.set.appdata=e.join("=")}l(o.set)},o.closeDialog=l,i.variable.get({fields:"name",sort:"name"}).$promise.then(function(e){o.variables=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvariables",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppsetDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.voicemail=angular.copy(e),o.voicemail.appdata)switch(o.voicemail.appType?o.voicemail.appType.toLowerCase():o.voicemail.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.voicemail.appdata.split(",");o.voicemail.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.voicemail.text=s.slice(1,s.length).join(",");break;case"message":o.voicemail.text=o.voicemail.appdata;break;case"set":o.voicemail.name=o.voicemail.appdata.split("=")[0],o.voicemail.value=o.voicemail.appdata.split("=")[1];break;case"agi":o.voicemail.project=o.voicemail.appdata;break;default:var r=o.voicemail.appdata.split(",");o.voicemail.voiceMail=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.voicemail.options=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}function l(e){t.hide(e)}o.voicemail.type&&"outbound"===o.voicemail.type.toLowerCase()&&"outbounddial"===o.voicemail.appType.toLowerCase()&&(o.voicemail.prefix=o.voicemail.phone?o.voicemail.phone.split("$")[0]:void 0,o.voicemail.callerId=o.voicemail.callerID?"CALLERID(all)="+o.voicemail.callerID:void 0),o.saveInternalRouteApp=function(){o.errors=[];var e=[];o.voicemail.type&&"outbound"===o.voicemail.type.toLowerCase()&&"outboundDial"===o.voicemail.appType&&(o.voicemail.phone=a.cutdigits?(o.voicemail.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.voicemail.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.voicemail.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.voicemail.options+="U(xcally-mixmonitor-context)"):o.voicemail.options=o.voicemail.options.replace("U(xcally-mixmonitor-context)",""));if(o.voicemail.appType&&"custom"===o.voicemail.appType);else switch((o.voicemail.app||o.voicemail.appType).toLowerCase()){case"set":o.voicemail.appdata=o.voicemail.name+"="+o.voicemail.value;break;case"custom":break;default:e[0]=o.voicemail.voiceMail,e[1]=o.voicemail.options,o.voicemail.appdata=e.join(",")}l(o.voicemail)},o.closeDialog=l,i.voiceMail.get({fields:"mailbox",sort:"mailbox"}).$promise.then(function(e){o.voiceMails=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceMails",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","internalrouteApp","internalroute","api"],angular.module("app.voice").controller("EditInternalAppvoicemailDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.internalroute=d||e.params.internalroute||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoInternalRoutes=function(){e.go("app.voice.internalroutes")},c.saveInternalRoute=function(){s.voiceExtension.update({id:c.internalroute.id},c.internalroute).$promise.then(function(){r.success({title:"InternalRoute updated!",msg:c.internalroute.name?c.internalroute.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceExtension",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){c.contexts=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","internalroute"],angular.module("app.voice").controller("InternalRouteController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.internalroutes=r||{count:0,rows:[]},v.table="internalroutes",v.listOrder="",v.listOrderAsc=null,v.selectedInternalRoutes=[],v.query={fields:"createdAt,updatedAt,id,appdata,type,exten,context,description",type:"internal",sort:"-updatedAt",VoiceExtensionId:"null",limit:10,page:1},v.editstate=function(e,t){n.go("app.voice.internalroutes.edit",{id:e.id,internalroute:e})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the internalroute?").htmlContent("<b>"+(e.name||"internalroute")+"</b> will be deleted.").ariaLabel("delete internalroute").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getInternalRoutes=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.voiceExtension.get(v.query,f).$promise},v.createOrEditInternalRoute=function(e,t){i.show({controller:"CreateOrEditInternalRouteDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/internalroutes/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{internalroute:t,internalroutes:v.internalroutes.rows,license:v.license,setting:v.setting}})},v.deleteInternalRoute=A,v.exportSelectedInternalRoutes=function(){var e=angular.copy(v.selectedInternalRoutes);return v.selectedInternalRoutes=[],e},v.deleteSelectedInternalRoutes=function(e){var t=i.confirm().title("Are you sure want to delete the selected internalroutes?").htmlContent("<b>"+v.selectedInternalRoutes.length+" selected</b> will be deleted.").ariaLabel("delete InternalRoutes").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedInternalRoutes.forEach(function(e){A(e)}),v.selectedInternalRoutes=[]})},v.deselectInternalRoutes=function(){v.selectedInternalRoutes=[]},v.selectAllInternalRoutes=function(){v.selectedInternalRoutes=v.internalroutes.rows},l.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){v.contexts=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.internalroutes=e||{count:0,rows:[]}}function A(e){l.voiceExtension.delete({id:e.id}).$promise.then(function(){_.remove(v.internalroutes.rows,{id:e.id}),v.internalroutes.count-=1,v.internalroutes.rows.length||v.getInternalRoutes(),c.success({title:"InternalRoute deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvoiceExtension"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvoiceExtension",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getInternalRoutes())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","internalroutes","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.voice").controller("InternalRoutesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="VOICE.EDIT_MUSICONHOLD",m.musiconhold=angular.copy(s),m.musiconholds=o,m.newMusicOnHold=!1,m.musiconhold||(m.musiconhold={mode:"files"},m.title="VOICE.NEW_MUSICONHOLD",m.newMusicOnHold=!0),m.addNewMusicOnHold=function(){m.errors=[],r.voiceMusicOnHold.save(m.musiconhold).$promise.then(function(e){m.musiconholds.unshift(e.toJSON()),i.success({title:"MusicOnHold properly created",msg:m.musiconhold.name?m.musiconhold.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceMusicOnHold.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMusicOnHold.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveMusicOnHold=function(){m.errors=[],r.voiceMusicOnHold.update({id:m.musiconhold.id},m.musiconhold).$promise.then(function(e){var t=_.find(m.musiconholds,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"MusicOnHold properly saved!",msg:m.musiconhold.name?m.musiconhold.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceMusicOnHold.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMusicOnHold.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteMusicOnHold=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The musiconhold will be deleted.").ariaLabel("Delete MusicOnHold").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceMusicOnHold.delete({id:m.musiconhold.id}).$promise.then(function(){_.remove(m.musiconholds,{id:m.musiconhold.id}),i.success({title:"MusicOnHold properly deleted!",msg:(m.musiconhold.name||"musiconhold")+" has been deleted!"}),u(m.musiconhold)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceMusicOnHold.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMusicOnHold.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","musiconholds","musiconhold","api","Auth","license","setting"],angular.module("app.voice").controller("CreateOrEditMusicOnHoldDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.musiconhold={},c.musiconholdMohSounds={count:0,rows:[]},c.selectedMusicOnHoldMohSounds=[],c.query={fields:"createdAt,updatedAt,id,save_name,converted_format,audio,id,createdAt",limit:10,page:1},c.init=function(e){c.musiconhold=e,c.query.id=c.musiconhold.id,c.query.VoiceMusicOnHoldId=c.musiconhold.id,c.getMusicOnHoldMohSounds()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the mohSound?").htmlContent("<b>"+(e.name||"mohSound")+"</b> will be deleted.").ariaLabel("delete mohSound").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.voiceMusicOnHoldDownload=function(o,e){return l.sound.download({id:o.id,exists:!0}).$promise.then(function(e){var t=[e.buffer],n="mohSound"+o.id,a=new Blob(t,{type:e.type});n=o.converted_format?o.save_name+"."+o.converted_format:o.save_name;var i=window.document.createElement("a");i.setAttribute("href",URL.createObjectURL(a)),i.setAttribute("download",n),i.click()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t+=1)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMusicOnHold.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},c.success=p,c.getMusicOnHoldMohSounds=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.voiceMusicOnHold.getSounds(c.query,p).$promise},c.createOrEditMusicOnHoldMohSound=function(e,t){o.show({controller:"CreateOrEditMohSoundDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/musiconholds/edit/mohSounds/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{musiconhold:c.musiconhold,mohSound:t,mohSounds:c.musiconholdMohSounds.rows,license:null,setting:null}})},c.exportSelectedMusicOnHoldMohSounds=function(){var e=angular.copy(c.selectedMusicOnHoldMohSounds);return c.selectedMusicOnHoldMohSounds=[],e},c.deleteMusicOnHoldMohSound=g,c.deleteSelectedMusicOnHoldMohSounds=function(e){var t=o.confirm().title("Are you sure want to delete the selected mohSounds?").htmlContent("<b>"+c.selectedMusicOnHoldMohSounds.length+" selected</b> will be deleted.").ariaLabel("delete mohSounds").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedMusicOnHoldMohSounds.forEach(function(e){g(e)}),c.selectedMusicOnHoldMohSounds=[]})},l.sound.get({fields:"name,id",sort:"name"}).$promise.then(function(e){c.sounds=_.keyBy(e.rows||[],"id")}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsounds",msg:e.data?JSON.stringify(e.data):e.toString()})});var m=!0,u=1;function p(e){c.musiconholdMohSounds=e||{count:0,rows:[]}}function g(e){l.voiceMusicOnHold.removeSound({id:n.params.id,id2:e.id}).$promise.then(function(){_.remove(c.musiconholdMohSounds.rows,{id:e.id}),c.musiconholdMohSounds.count-=1,c.musiconholdMohSounds.rows.length||c.getMusicOnHoldMohSounds(),r.success({title:"MohSound deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETvoiceMusicOnHold"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceMusicOnHold",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getMusicOnHoldMohSounds())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.voice").controller("MusicOnHoldMohSoundsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="VOICE.EDIT_MOHSOUND",m.mohSound=angular.copy(s),m.mohSounds=o,m.newMohSound=!1,m.mohSound||(m.mohSound={},m.title="VOICE.NEW_MOHSOUND",m.newMohSound=!0),t.params.id&&(m.mohSound.VoiceMusicOnHoldId=t.params.id),m.addNewMohSound=function(){m.errors=[],r.voiceMusicOnHold.addSound({id:t.params.id},m.mohSound).$promise.then(function(e){m.mohSounds.unshift(e.toJSON()),i.success({title:"MohSound properly created",msg:m.mohSound.name?m.mohSound.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceMusicOnHold.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMusicOnHold.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveMohSound=function(){m.errors=[],r.voiceMusicOnHold.update({id:m.mohSound.id},m.mohSound).$promise.then(function(e){var t=_.find(m.mohSounds,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"MohSound properly saved!",msg:m.mohSound.name?m.mohSound.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceMusicOnHold.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMusicOnHold.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteMohSound=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The mohSound will be deleted.").ariaLabel("Delete MohSound").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceMusicOnHold.delete({id:m.mohSound.id}).$promise.then(function(){_.remove(m.mohSounds,{id:m.mohSound.id}),i.success({title:"MohSound properly deleted!",msg:(m.mohSound.name||"mohSound")+" has been deleted!"}),u(m.mohSound)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceMusicOnHold.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMusicOnHold.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.sound.get({fields:"name,id",sort:"name"}).$promise.then(function(e){m.sounds=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsounds",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","mohSounds","mohSound","api","Auth","license","setting"],angular.module("app.voice").controller("CreateOrEditMohSoundDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.musiconhold=d||e.params.musiconhold||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoMusicOnHolds=function(){e.go("app.voice.musiconholds")},c.saveMusicOnHold=function(){s.voiceMusicOnHold.update({id:c.musiconhold.id},c.musiconhold).$promise.then(function(){r.success({title:"MusicOnHold updated!",msg:c.musiconhold.name?c.musiconhold.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceMusicOnHold",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","musiconhold"],angular.module("app.voice").controller("MusicOnHoldController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.musiconholds=r||{count:0,rows:[]},v.table="musiconholds",v.listOrder="",v.listOrderAsc=null,v.selectedMusicOnHolds=[],v.query={fields:"createdAt,updatedAt,id,name,mode,directory,application,format,sort",defaultEntry:"false",limit:10,page:1},v.arraymode=_.keyBy([{option:"Files",value:"'files'"},{option:"Custom",value:"'custom'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraysort=_.keyBy([{option:"Random",value:"'random'"},{option:"Alphabetical",value:"'alpha'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.voice.musiconholds.edit",{id:e.id,musiconhold:e})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the musiconhold?").htmlContent("<b>"+(e.name||"musiconhold")+"</b> will be deleted.").ariaLabel("delete musiconhold").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getMusicOnHolds=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.voiceMusicOnHold.get(v.query,f).$promise},v.createOrEditMusicOnHold=function(e,t){i.show({controller:"CreateOrEditMusicOnHoldDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/musiconholds/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{musiconhold:t,musiconholds:v.musiconholds.rows,license:v.license,setting:v.setting}})},v.deleteMusicOnHold=A,v.exportSelectedMusicOnHolds=function(){var e=angular.copy(v.selectedMusicOnHolds);return v.selectedMusicOnHolds=[],e},v.deleteSelectedMusicOnHolds=function(e){var t=i.confirm().title("Are you sure want to delete the selected musiconholds?").htmlContent("<b>"+v.selectedMusicOnHolds.length+" selected</b> will be deleted.").ariaLabel("delete MusicOnHolds").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedMusicOnHolds.forEach(function(e){A(e)}),v.selectedMusicOnHolds=[]})},v.deselectMusicOnHolds=function(){v.selectedMusicOnHolds=[]},v.selectAllMusicOnHolds=function(){v.selectedMusicOnHolds=v.musiconholds.rows};var h=!0,b=1;function f(e){v.musiconholds=e||{count:0,rows:[]}}function A(e){l.voiceMusicOnHold.delete({id:e.id}).$promise.then(function(){_.remove(v.musiconholds.rows,{id:e.id}),v.musiconholds.count-=1,v.musiconholds.rows.length||v.getMusicOnHolds(),c.success({title:"MusicOnHold deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvoiceMusicOnHold"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvoiceMusicOnHold",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getMusicOnHolds())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","musiconholds","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.voice").controller("MusicOnHoldsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="VOICE.EDIT_OUTBOUNDROUTE",m.outboundroute=angular.copy(s),m.outboundroutes=o,m.newOutboundRoute=!1,m.outboundroute||(m.outboundroute={appdata:"Outbound Call",type:"outbound",context:"from-sip",recordingFormat:"none"},m.title="VOICE.NEW_OUTBOUNDROUTE",m.newOutboundRoute=!0),m.addNewOutboundRoute=function(){m.errors=[],r.voiceExtension.save(m.outboundroute).$promise.then(function(e){m.outboundroutes.unshift(e.toJSON()),i.success({title:"OutboundRoute properly created",msg:m.outboundroute.name?m.outboundroute.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceExtension.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceExtension.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveOutboundRoute=function(){m.errors=[],r.voiceExtension.update({id:m.outboundroute.id},m.outboundroute).$promise.then(function(e){var t=_.find(m.outboundroutes,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"OutboundRoute properly saved!",msg:m.outboundroute.name?m.outboundroute.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceExtension.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceExtension.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteOutboundRoute=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The outboundroute will be deleted.").ariaLabel("Delete OutboundRoute").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceExtension.delete({id:m.outboundroute.id}).$promise.then(function(){_.remove(m.outboundroutes,{id:m.outboundroute.id}),i.success({title:"OutboundRoute properly deleted!",msg:(m.outboundroute.name||"outboundroute")+" has been deleted!"}),u(m.outboundroute)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceExtension.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceExtension.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u,r.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){m.contexts=e.rows||[]}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","outboundroutes","outboundroute","api","Auth","license","setting"],angular.module("app.voice").controller("CreateOrEditOutboundRouteDialogController",e)}(),function(){"use strict";function e(b,i,a,o,t,e,n){var f=this;function s(e,t){if(f.outboundrouteApps.rows.length){var n=f.outboundrouteApps.rows[t]?f.outboundrouteApps.rows[t]:f.outboundrouteApps.rows[0];i.show({controller:"EditoutboundApp"+(n.appType||n.app).toLowerCase()+"DialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/outboundroutes/edit/apps/"+(n.appType||n.app).toLowerCase()+"/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{outboundrouteApp:n,outboundroute:f.outboundroute}}).then(function(e){e&&(e.id?f.outboundrouteApps.rows[t]=e:f.outboundrouteApps.rows.splice(t,0,e),r())}).catch(function(e){e&&o.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:EDITMODALSHOW",msg:e.data?JSON.stringify(e.data):e.toString()})})}}function r(e){var t=2,n=[];n.push({type:"outbound",app:"Set",appdata:"CDR(type)=outbound",context:f.outboundroute.context,exten:f.outboundroute.exten,priority:t++,VoiceExtensionId:f.outboundroute.id}),n.push({type:"outbound",app:"Set",appdata:"XCALLY-MOTION-ANSWER=0",context:f.outboundroute.context,exten:f.outboundroute.exten,priority:t++,VoiceExtensionId:f.outboundroute.id}),n.push({type:"outbound",app:"Set",appdata:"XCALLY-MOTION-PROGRESS=0",context:f.outboundroute.context,exten:f.outboundroute.exten,priority:t++,VoiceExtensionId:f.outboundroute.id}),n.push({type:"outbound",app:"Set",appdata:"MONITOR_OPTIONS=ab",context:f.outboundroute.context,exten:f.outboundroute.exten,priority:t++,VoiceExtensionId:f.outboundroute.id}),n.push({type:"outbound",app:"Set",appdata:"outboundrouteid="+f.outboundroute.id,context:f.outboundroute.context,exten:f.outboundroute.exten,priority:t++,VoiceExtensionId:f.outboundroute.id}),f.outboundroute.hasOwnProperty("recordingFormat")&&"none"!==f.outboundroute.recordingFormat&&(n.push({type:"outbound",app:"Set",appdata:"_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}",context:f.outboundroute.context,exten:f.outboundroute.exten,priority:t++,VoiceExtensionId:f.outboundroute.id}),n.push({type:"outbound",app:"Set",appdata:"_XCALLY_MIXMONITOR_FORMAT="+f.outboundroute.recordingFormat||"wav",context:f.outboundroute.context,exten:f.outboundroute.exten,priority:t++,VoiceExtensionId:f.outboundroute.id}));for(var a=0,i=0;a<f.outboundrouteApps.rows.length;a++,i=0){var o=f.outboundrouteApps.rows[a],s=[],r=[];o.intervals="*,*,*,*"!==o.interval?[o.interval]:o.IntervalId?_.map(_.filter(f.intervals.rows,{IntervalId:o.IntervalId}),"interval"):[],o.context=f.outboundroute.context,o.exten=f.outboundroute.exten,o.type&&(o.type=o.type.toLowerCase()),o.hasOwnProperty("tag")&&o.tag&&"--"!==o.tag&&s.push({type:o.type.toLowerCase(),app:"Set",appdata:"CDR(tag)="+o.tag,context:f.outboundroute.context,exten:f.outboundroute.exten,priority:o.intervals.length+t+i++,VoiceExtensionId:f.outboundroute.id}),o.hasOwnProperty("callerID")&&o.callerID&&s.push({type:o.type.toLowerCase(),app:"Set",appdata:"CALLERID(all)="+o.callerID,context:f.outboundroute.context,exten:f.outboundroute.exten,priority:o.intervals.length+t+i++,VoiceExtensionId:f.outboundroute.id});for(var l=0;l<o.intervals.length;l++){var d=t+o.intervals.length,c=l===o.intervals.length-1?t+s.length+r.length+2:t+l+1;s.splice(l,0,{type:"outbound",app:"GotoIfTime",appdata:o.intervals[l]+"?"+f.outboundroute.context+",${EXTEN},"+d+":"+f.outboundroute.context+",${EXTEN},"+c,exten:f.outboundroute.exten,context:f.outboundroute.context,priority:t+l,VoiceExtensionId:f.outboundroute.id})}if(e&&"outboundDial"===o.appType){var m=_.find(f.apps,{appType:"outboundDial"});if(m&&m.fields){for(var u={},p=o.appdata.split(","),g=[],v=0,h=m.fields.length;v<h;v++)if(m.fields[v].hasOwnProperty("param"))switch(m.fields[v].name){case"trunk":u.trunk=p[m.fields[v].param].split("/")[1],u.phone=p[m.fields[v].param].split("/")[2],u.prefix=u.phone?u.phone.split("$")[0]:void 0,u.phone=f.outboundroute.cutdigits?(u.prefix||"")+"${EXTEN:"+f.outboundroute.cutdigits+"}":(u.prefix||"")+"${EXTEN}",g[m.fields[v].param]=["SIP",u.trunk,u.phone].join("/");break;case"options":u.options=p[m.fields[v].param],"none"!==f.outboundroute.recordingFormat?u.options.indexOf("U(xcally-mixmonitor-context)")<0&&(u.options+="U(xcally-mixmonitor-context)"):u.options=u.options.replace("U(xcally-mixmonitor-context)",""),g[m.fields[v].param]=u.options;break;default:g[m.fields[v].param]=p[m.fields[v].param]}o.appdata=g.join(",")}}o.priority=s.length?_.last(s).priority+1:t,t=(r.length?_.last(r).priority:o.priority)+1,n=_.concat(n,s,[o],r)}n.push({type:"outbound",app:"Hangup",exten:f.outboundroute.exten,context:f.outboundroute.context,priority:t,VoiceExtensionId:f.outboundroute.id}),b.voiceExtension.addApplications({id:f.outboundroute.id},_.sortBy(n,"priority")).$promise.then(function(e){f.outboundrouteApps.rows=e.rows}).catch(function(e){console.error(e)})}function l(e){f.outboundrouteApps=e||{count:0,rows:[]}}f.currentUser=n.getCurrentUser(),f.outboundroute={},f.outboundrouteApps={count:0,rows:[]},f.selectedOutboundRouteApps=[],f.query={sort:"priority"},f.apps=_.reject(_.sortBy([{app:"Interval",appType:"interval",type:"Outbound",types:["always","custom","list"],fields:[],isApp:!1},{app:"Dial",appType:"outboundDial",context:"from-sip",type:"Outbound",icon:"icon-apps",interval:"*,*,*,*",options:"xX",isApp:!0,extraApi:[{name:"trunks",route:"trunk",filters:{fields:"name",sort:"name"}},{name:"tags",route:"tag",filters:{fields:"name",sort:"name"}}],fields:[{title:"Trunk",name:"trunk",type:"apiselect",values:"trunks",value:"trunk.name",option:"trunk.name",required:!0,param:0},{title:"Caller_ID",name:"callerID",type:"text"},{title:"Prefix",name:"prefix",type:"text"},{title:"Tags",name:"tag",type:"apiselect",values:"tags",value:"tag.name",option:"tag.name",defaultValues:[{value:"'--'",option:"None"}]},{title:"Timeout",name:"timeout",type:"number",min:0,param:1},{title:"Options",name:"options",type:"text",param:2},{title:"Url",name:"url",type:"text",param:3}]},{app:null,type:"Outbound",appType:"custom",icon:"icon-apps",interval:"*,*,*,*",isApp:!0,fields:[{title:"Application_Name",name:"app",type:"text",required:!0,param:0},{title:"Arguments",name:"appdata",type:"text",param:1}]}],["app"]),{isApp:!1}),f.list={group:{name:"opt1",pull:"clone"},animation:100,sort:!1},f.applications={group:{name:"opt2",put:"opt1"},animation:100,onAdd:function(e){s(e,e.newIndex)},onSort:function(e){r()}},f.init=function(e){f.outboundroute=e,t.on("voiceExtension:update",f.onVoiceExtensionUpdate),f.query.VoiceExtensionId=e.id,f.query.isApp=!0,f.query.nolimit=!0,f.getOutboundRouteApps(),f.getIntervals()},f.deleteConfirm=function(e,t,n){var a=i.confirm().title("Are you sure want to delete the application?").htmlContent("<b>"+e.app+"</b> will be deleted.").ariaLabel("delete application").targetEvent(n).ok("OK").cancel("CANCEL");i.show(a).then(function(){f.outboundrouteApps.rows.splice(t,1),r()},function(){console.log("CANCEL")})},f.getOutboundRouteApps=function(){f.promise=b.voiceExtension.get(f.query,l).$promise},f.editOutboundRouteApp=s,f.editInterval=function(e,t){if(f.outboundrouteApps.rows.length){var n=f.outboundrouteApps.rows[t]?f.outboundrouteApps.rows[t]:f.outboundrouteApps.rows[0];i.show({controller:"EditoutboundAppintervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/outboundroutes/edit/apps/interval/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:{interval:n.interval,IntervalId:n.IntervalId,application:!0},intervals:[]}}).then(function(e){e&&(n.interval=e.interval||"*,*,*,*",n.IntervalId=e.IntervalId||null,r())})}},f.deleteOutboundRouteApp=function(e){_.remove(f.outboundrouteApps.rows,{id:e.id}),r(),o.success({title:"App deleted!",msg:e.app?e.app+" has been deleted!":""})},f.deleteSelectedOutboundRouteApps=function(e){var t=i.confirm().title("Are you sure want to delete the selected applications?").htmlContent("<b>"+f.selectedOutboundRouteApps.length+" selected</b> will be deleted.").ariaLabel("delete applications").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){f.selectedOutboundRouteApps.forEach(function(e){_.remove(f.outboundrouteApps.rows,{id:e.id})}),f.selectedOutboundRouteApps=[],r()})},f.rewriteRouting=r,f.getIntervals=function(){return b.interval.get({fields:"id,interval,IntervalId"}).$promise.then(function(e){f.intervals=e}).catch(function(e){console.error(e)})},f.onVoiceExtensionUpdate=function(e){e.VoiceExtensionId===f.outboundroute.id&&r(!0)},e.$on("$destroy",function(){t.removeAllListeners("voiceExtension:update")})}e.$inject=["api","$mdDialog","$document","toasty","socket","$scope","Auth"],angular.module("app.voice").controller("OutboundRouteActionsController",e)}(),function(){"use strict";function e(t,e,n,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(n.appType||n.app).toUpperCase(),o.custom=angular.copy(n),o.custom.appdata)switch(o.custom.appType?o.custom.appType.toLowerCase():o.custom.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.custom.appdata.split(",");o.custom.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.custom.text=s.slice(1,s.length).join(",");break;case"message":o.custom.text=o.custom.appdata;break;case"set":o.custom.name=o.custom.appdata.split("=")[0],o.custom.value=o.custom.appdata.split("=")[1];break;case"agi":o.custom.project=o.custom.appdata;break;default:var r=o.custom.appdata.split(",");o.custom.app=_.isEmpty(r[0])?r[0]:isNaN(r[0])?r[0]:parseInt(r[0],10),o.custom.appdata=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10)}function l(e){t.hide(e)}o.custom.type&&"outbound"===o.custom.type.toLowerCase()&&"outbounddial"===o.custom.appType.toLowerCase()&&(o.custom.prefix=o.custom.phone?o.custom.phone.split("$")[0]:void 0,o.custom.callerId=o.custom.callerID?"CALLERID(all)="+o.custom.callerID:void 0),o.saveOutboundRouteApp=function(){o.errors=[];var e=[];o.custom.type&&"outbound"===o.custom.type.toLowerCase()&&"outboundDial"===o.custom.appType&&(o.custom.phone=a.cutdigits?(o.custom.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.custom.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.custom.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.custom.options+="U(xcally-mixmonitor-context)"):o.custom.options=o.custom.options.replace("U(xcally-mixmonitor-context)",""));if(o.custom.appType&&"custom"===o.custom.appType);else switch((o.custom.app||o.custom.appType).toLowerCase()){case"set":o.custom.appdata=o.custom.name+"="+o.custom.value;break;case"custom":break;default:e[0]=o.custom.app,e[1]=o.custom.appdata,o.custom.appdata=e.join(",")}l(o.custom)},o.closeDialog=l}e.$inject=["$mdDialog","toasty","outboundrouteApp","outboundroute","api"],angular.module("app.voice").controller("EditoutboundAppcustomDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){var l=this;if(l.errors=[],l.title="TOOLS.EDIT_INTERVAL",l.interval=angular.copy(i),l.intervals=o,l.newInterval=!1,l.types=["always","custom","list"],l.daysOfWeek=a.getDaysOfWeek(),l.monthNumber=a.getMonthNumber(),l.monthName=a.getMonthName(),l.daysOfMonth=a.getDaysOfMonth(),l.interval)if("*,*,*,*"!==l.interval.interval){l.type="custom";var d=l.interval.interval.split(","),c=d[0],m=d[1],u=d[2],p=d[3];if("*"!==c){var g,v=c.split("-")[0],h=c.split("-")[1];(g=new Date).setHours(Number(v.split(":")[0])),g.setMinutes(Number(v.split(":")[1])),l.timeRangeFrom=g,(g=new Date).setHours(Number(h.split(":")[0])),g.setMinutes(Number(h.split(":")[1])),l.timeRangeTo=g}"*"!==m&&(l.dayOfWeekFrom=m.split("-")[0],l.dayOfWeekTo=m.split("-")[1]),"*"!==u&&(l.monthDayFrom=u.split("-")[0],l.monthDayTo=u.split("-")[1]),"*"!==p&&(l.monthFrom=p.split("-")[0],l.monthTo=p.split("-")[1])}else l.type="always";else l.interval={interval:"*,*,*,*"},l.type="always",l.title="TOOLS.NEW_INTERVAL",l.newInterval=!0;function b(){switch(l.type){case"always":case"list":return"*,*,*,*";case"custom":var e=[];if("*"!==l.timeRangeFrom&&l.timeRangeFrom&&l.timeRangeTo){var t=(l.timeRangeFrom.getHours()<10?"0":"")+l.timeRangeFrom.getHours()+":"+(l.timeRangeFrom.getMinutes()<10?"0":"")+l.timeRangeFrom.getMinutes(),n=(l.timeRangeTo.getHours()<10?"0":"")+l.timeRangeTo.getHours()+":"+(l.timeRangeTo.getMinutes()<10?"0":"")+l.timeRangeTo.getMinutes();e.push(t+"-"+n)}else e.push("*");return l.dayOfWeekFrom?l.dayOfWeekTo?e.push(l.dayOfWeekFrom+"-"+l.dayOfWeekTo):e.push(l.dayOfWeekFrom):e.push("*"),l.monthDayFrom?l.monthDayTo?e.push(l.monthDayFrom+"-"+l.monthDayTo):e.push(l.monthDayFrom):e.push("*"),l.monthFrom?l.monthTo?e.push(l.monthFrom+"-"+l.monthTo):e.push(l.monthFrom):e.push("*"),e.join()}}function f(e){t.hide(e)}e.params.id&&!l.interval.application&&(l.interval.IntervalId=e.params.id),l.interval.IntervalId&&l.interval.application&&(l.type="list"),l.addNewInterval=function(){l.errors=[],l.interval.interval=b(),r.interval.save(l.interval).$promise.then(function(e){l.intervals.push(e),s.success({title:"Interval properly created",msg:l.interval.name?l.interval.name+" has been created!":""}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.save"}]})},l.saveInterval=function(){l.errors=[],l.interval.interval=b(),l.interval.application?("list"!==l.type&&(l.interval.IntervalId=null),f(l.interval)):r.interval.update({id:l.interval.id},l.interval).$promise.then(function(e){var t=_.find(l.intervals,{id:e.id});t&&_.merge(t,e),s.success({title:"Interval properly saved!",msg:"Interval has been saved!"}),f()}).catch(function(e){console.error(e),l.errors=e.data.errors||[{message:e.toString(),type:"api.interval.update"}]})},l.closeDialog=f,l.interval.application&&r.interval.get({fields:"id,name,interval,IntervalId",IntervalId:"null",nolimit:!0}).$promise.then(function(e){l.intervals=e}).catch(function(e){console.error(e)})}e.$inject=["$state","$mdDialog","$mdToast","IndexFactory","interval","intervals","toasty","api"],angular.module("app.voice").controller("EditoutboundAppintervalDialogController",e)}(),function(){"use strict";function e(t,n,e,a,i){var o=this;if(o.errors=[],o.title="VOICE.EDIT_"+(e.appType||e.app).toUpperCase(),o.outbounddial=angular.copy(e),o.outbounddial.appdata)switch(o.outbounddial.appType?o.outbounddial.appType.toLowerCase():o.outbounddial.app.toLowerCase()){case"custom":break;case"autoreply":var s=o.outbounddial.appdata.split(",");o.outbounddial.times=isNaN(s[0])?s[0]:parseInt(s[0],10),o.outbounddial.text=s.slice(1,s.length).join(",");break;case"message":o.outbounddial.text=o.outbounddial.appdata;break;case"set":o.outbounddial.name=o.outbounddial.appdata.split("=")[0],o.outbounddial.value=o.outbounddial.appdata.split("=")[1];break;case"agi":o.outbounddial.project=o.outbounddial.appdata;break;default:var r=o.outbounddial.appdata.split(",");o.outbounddial.trunk=r[0].split("/")[1],o.outbounddial.phone=r[0].split("/")[2],o.outbounddial.timeout=_.isEmpty(r[1])?r[1]:isNaN(r[1])?r[1]:parseInt(r[1],10),o.outbounddial.options=_.isEmpty(r[2])?r[2]:isNaN(r[2])?r[2]:parseInt(r[2],10),o.outbounddial.url=_.isEmpty(r[3])?r[3]:isNaN(r[3])?r[3]:parseInt(r[3],10)}function l(e){t.hide(e)}o.outbounddial.type&&"outbound"===o.outbounddial.type.toLowerCase()&&"outbounddial"===o.outbounddial.appType.toLowerCase()&&(o.outbounddial.prefix=o.outbounddial.phone?o.outbounddial.phone.split("$")[0]:void 0,o.outbounddial.callerId=o.outbounddial.callerID?"CALLERID(all)="+o.outbounddial.callerID:void 0),o.saveOutboundRouteApp=function(){o.errors=[];var e=[];o.outbounddial.type&&"outbound"===o.outbounddial.type.toLowerCase()&&"outboundDial"===o.outbounddial.appType&&(o.outbounddial.phone=a.cutdigits?(o.outbounddial.prefix||"")+"${EXTEN:"+a.cutdigits+"}":(o.outbounddial.prefix||"")+"${EXTEN}","none"!==a.recordingFormat?o.outbounddial.options.indexOf("U(xcally-mixmonitor-context)")<0&&(o.outbounddial.options+="U(xcally-mixmonitor-context)"):o.outbounddial.options=o.outbounddial.options.replace("U(xcally-mixmonitor-context)",""));if(o.outbounddial.appType&&"custom"===o.outbounddial.appType);else switch((o.outbounddial.app||o.outbounddial.appType).toLowerCase()){case"set":o.outbounddial.appdata=o.outbounddial.name+"="+o.outbounddial.value;break;case"custom":break;default:e[0]=["SIP",o.outbounddial.trunk,o.outbounddial.phone].join("/"),e[1]=o.outbounddial.timeout,e[2]=o.outbounddial.options,e[3]=o.outbounddial.url,o.outbounddial.appdata=e.join(",")}l(o.outbounddial)},o.closeDialog=l,i.trunk.get({fields:"name",sort:"name"}).$promise.then(function(e){o.trunks=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtrunks",msg:e.data?JSON.stringify(e.data):e.toString()})}),i.tag.get({fields:"name",sort:"name"}).$promise.then(function(e){o.tags=e.rows||[]}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETtags",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","outboundrouteApp","outboundroute","api"],angular.module("app.voice").controller("EditoutboundAppoutbounddialDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.outboundroute=d||e.params.outboundroute||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoOutboundRoutes=function(){e.go("app.voice.outboundroutes")},c.saveOutboundRoute=function(){s.voiceExtension.update({id:c.outboundroute.id},c.outboundroute).$promise.then(function(){r.success({title:"OutboundRoute updated!",msg:c.outboundroute.name?c.outboundroute.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceExtension",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){c.contexts=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","outboundroute"],angular.module("app.voice").controller("OutboundRouteController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.outboundroutes=r||{count:0,rows:[]},v.table="outboundroutes",v.listOrder="",v.listOrderAsc=null,v.selectedOutboundRoutes=[],v.query={fields:"createdAt,updatedAt,id,appdata,type,exten,context,recordingFormat,cutdigits,description",type:"outbound",sort:"-updatedAt",VoiceExtensionId:"null",limit:10,page:1},v.arrayrecordingFormat=_.keyBy([{option:"none",value:"'none'"},{option:"wav",value:"'wav'"},{option:"wav49",value:"'WAV'"},{option:"gsm",value:"'gsm'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.voice.outboundroutes.edit",{id:e.id,outboundroute:e})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the outboundroute?").htmlContent("<b>"+(e.name||"outboundroute")+"</b> will be deleted.").ariaLabel("delete outboundroute").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getOutboundRoutes=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.voiceExtension.get(v.query,f).$promise},v.createOrEditOutboundRoute=function(e,t){i.show({controller:"CreateOrEditOutboundRouteDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/outboundroutes/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{outboundroute:t,outboundroutes:v.outboundroutes.rows,license:v.license,setting:v.setting}})},v.deleteOutboundRoute=A,v.exportSelectedOutboundRoutes=function(){var e=angular.copy(v.selectedOutboundRoutes);return v.selectedOutboundRoutes=[],e},v.deleteSelectedOutboundRoutes=function(e){var t=i.confirm().title("Are you sure want to delete the selected outboundroutes?").htmlContent("<b>"+v.selectedOutboundRoutes.length+" selected</b> will be deleted.").ariaLabel("delete OutboundRoutes").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedOutboundRoutes.forEach(function(e){A(e)}),v.selectedOutboundRoutes=[]})},v.deselectOutboundRoutes=function(){v.selectedOutboundRoutes=[]},v.selectAllOutboundRoutes=function(){v.selectedOutboundRoutes=v.outboundroutes.rows},l.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){v.contexts=_.keyBy(e.rows||[],"id")}).catch(function(e){c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})});var h=!0,b=1;function f(e){v.outboundroutes=e||{count:0,rows:[]}}function A(e){l.voiceExtension.delete({id:e.id}).$promise.then(function(){_.remove(v.outboundroutes.rows,{id:e.id}),v.outboundroutes.count-=1,v.outboundroutes.rows.length||v.getOutboundRoutes(),c.success({title:"OutboundRoute deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvoiceExtension"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvoiceExtension",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getOutboundRoutes())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","outboundroutes","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.voice").controller("OutboundRoutesController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l,d,c,m){var u=this,p=!0;function g(){var e=i.localStorage.getItem("motion2.realtime.abandoned.voice.contacts:"+u.currentUser.id);e&&(e=JSON.parse(e))&&e.query&&(u.query=_.merge(e.query,_.omit(u.query,["sort","limit","page"])),u.query=_.omit(u.query,"filter")),s.voiceDisposition.get().$promise.then(function(e){u.disposition=e?e.rows:[]}).catch(function(e){console.log(e)}),s.user.getQueues({id:r.getCurrentUser().id,fields:"id,name",channel:"voice",type:"inbound",nolimit:!0}).$promise.then(function(e){u.queues=e||{count:0,rows:[]},u.queuesMap=_.mapValues(_.keyBy(u.queues.rows,"name"),"name")}).catch(function(e){console.error(e)}).finally(function(){u.getContacts()})}function v(e){u.contacts=e||{count:0,rows:[]},p=!1,u.refresh=!0}u.showTooltip=!1,u.refresh=!0,u.disable=[],u.agents=m||[],u.currentUser=r.getCurrentUser(),u.localizationMap=c,u.pickerModel={dateStart:null,dateEnd:null},u.queues={},u.contacts={count:0,rows:[]},u.query={fields:"id,type,calleridnum,calleridname,queue,queuecallerabandonAt,queuecallerexitAt,queuecallerexitreason,assigned,lastAssignedTo,updatedAt,disposition",type:"inbound",queuecallerexitreason:"TIMEOUT,ABANDONED",sort:"-updatedAt",limit:10,page:1},u.clearAll=function(){u.query.dateStart=void 0,u.query.dateEnd=void 0,u.pickerModel={dateStart:null,dateEnd:null},u.getContacts()},u.getContacts=function(){u.refresh=!1,u.query.dateStart=void 0,u.query.dateEnd=void 0,u.pickerModel.dateStart&&!p&&(u.query.dateStart=u.pickerModel.dateStart,u.query.dateEnd=u.pickerModel.dateEnd);u.query.queue=u.query.queue,u.query.offset=(u.query.page-1)*u.query.limit,i.localStorage.setItem("motion2.realtime.abandoned.voice.contacts:"+u.currentUser.id,JSON.stringify({query:_.omit(u.query,"queue")})),u.promise=s.voiceQueueReport.getVoiceQueuesReport(u.query,v).$promise},u.refreshContacts=function(){u.showTooltip=!1,u.getContacts()},u.onInit=g,u.assignedA=function(e,t){e&&(u.disable[e.id]=!0,s.voiceQueueReport.update({id:e.id,lastAssignedTo:t?t.name:null,assigned:!!t}).$promise.catch(function(e){console.log(e)}).finally(function(){u.disable[e.id]=!1}))},u.disposed=function(e,t){e&&s.voiceQueueReport.update({id:e.id,disposition:t||null}).$promise.catch(function(e){console.log(e)})},u.onSavevoiceQueueReport=function(e){e&&u.queuesMap&&"inbound"===e.type&&u.queuesMap[e.queue]&&(u.showTooltip=!0)},u.onUpdatevoiceQueueReport=function(e){if(e){var t=_.findIndex(u.contacts.rows,["id",e.id]);0<=t&&_.merge(u.contacts.rows[t],e)}},l.onWithoutApply("voiceQueueReport:save",u.onSavevoiceQueueReport),l.on("voiceQueueReport:update",u.onUpdatevoiceQueueReport),g();var h=!0,b=1;e.$watch("vm.query.filter",function(e,t){h?n(function(){h=!1}):(t||(b=u.query.page),e!==t&&(u.query.page=1),e||(u.query.page=b),u.getContacts())}),e.$on("$destroy",function(){l.removeAllListeners("voiceQueueReport:save"),l.removeAllListeners("voiceQueueReport:update")})}e.$inject=["$scope","$timeout","$mdDialog","$document","$window","$translate","api","Auth","socket","toasty","dateFilterLocalizationFactory","agents"],angular.module("app.voice").controller("AbandonedCallsVoiceRealtimeController",e)}(),function(){"use strict";function e(e,s,t,n,a,i,o,r,l,d,c,m,u,p,g,v){var h=this,b=["userpic","online","lastLoginAt","lastPauseAt","pauseType","lastPauseAt","internal","address","chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","chatCapacity","openchannelCapacity","mailCapacity","smsCapacity","faxCapacity","chatCurrentCapacity","openchannelCurrentCapacity","mailCurrentCapacity","smsCurrentCapacity","faxCurrentCapacity","chatStatus","openchannelStatus","mailStatus","smsStatus","faxStatus","voiceStatus","chatStatusTime","openchannelStatusTime","mailStatusTime","smsStatusTime","faxStatusTime","voiceStatusTime","queue","destconnectedlinenum"],f=["chatPause","openchannelPause","mailPause","smsPause","faxPause","voicePause","online"];for(var A in h.availableStates=["ringing","inuse","busy","onhold","not_inuse"],h.pauses=o||{count:0,rows:[]},h.license=g,h.agents=r?_.keyBy(r.rows?r.rows:[],"id"):{},h.rpcAgents=l?_.keyBy(l.rows?l.rows:[],"id"):{},h.paginatedAgents={},h.load=!1,h.order=[],h.agentInternal={},h.agents)h.agents.hasOwnProperty(A)&&(h.agents[A].init=!0);h.query={limit:10,page:1,order:"fullname",globalStatusFilter:"",pauseTypeFilter:""},h.logout=function(e,t){return d.user.logout({id:e.id}).$promise.then(function(){m.success({title:"Agent logout",msg:e.fullname+"  properly logout"}),h.agents[e.id]&&(h.agents[e.id].online=!1),h.rpcAgents[e.id]&&(h.rpcAgents[e.id].online=!1),y()}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.queueAdd=function(e,t){n.show({controller:"AgentqueueaddController",controllerAs:"vm",templateUrl:"app/main/apps/staff/views/agents/edit/queueadd/queueadd.html",parent:angular.element(a.body),targetEvent:t,clickOutsideToClose:!0,locals:{agent:e,agents:[],channel:"voice",realtime:!0,direction:"inbound"}})},h.pause=function(t,e){return d.user.pause({id:t.id,type:e}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.unPause=function(t){return d.user.unpause({id:t.id}).$promise.then(function(e){h.agents[t.id]&&_.merge(h.agents[t.id],_.pick(e,b)),h.rpcAgents[t.id]&&_.merge(h.rpcAgents[t.id],_.pick(e,b)),x(h.agents[t.id])}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.staff.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},h.showInfo=function(e){n.show(n.alert().clickOutsideToClose(!0).title("Legend").htmlContent("<div>TODO legend status + state</div>").ok("Ok").targetEvent(e))},h.getAgentStatus=C,h.getAgentGlobalStatus=x,h.isPause=S,h.checkPause=function(e){return"pause"===e},h.isPartialPause=function(e){return"*pause"===e},h.onSave=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(_.omit(e,f),b)),_.merge(h.rpcAgents[e.id],_.pick(_.omit(e,f),b)),x(h.agents[e.id]))},h.onUpdate=function(e){h.agents[e.id]&&(_.merge(h.agents[e.id],_.pick(e,b)),_.merge(h.rpcAgents[e.id],_.pick(e,b)),x(h.agents[e.id]))},h.onInit=y,h.onConnect=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(_.merge(h.agents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])),_.merge(h.rpcAgents[h.agentInternal[e.destaccountcode]],_.pick(e,["queue","destconnectedlinenum"])))},h.onComplete=function(e){h.agents[h.agentInternal[e.destaccountcode]]&&(h.agents[h.agentInternal[e.destaccountcode]]=_.omit(h.agents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]),h.rpcAgents[h.agentInternal[e.destaccountcode]]=_.omit(h.rpcAgents[h.agentInternal[e.destaccountcode]],["queue","destconnectedlinenum"]))},c.on("user:save",h.onSave),c.on("user:update",h.onUpdate),c.on("user:agentconnect",h.onConnect),c.on("user:agentcomplete",h.onComplete),y();var E=v(function(){h.load&&(h.load=!1,y())},999);function y(e){h.load=!1;var t,n,a=s.defer();h.promise=a.promise,h.filteredAgents=[],h.order=[],_.forIn(h.agents,function(e,t){h.rpcAgents[t]&&_.merge(e,_.pick(_.omit(h.rpcAgents[t],f),b)),x(e),e.online?(h.filteredAgents.push(e),h.agentInternal[e.internal]=t):e.globalStatusTime=_.toNumber(moment().format("x"))}),h.query.globalStatusFilter&&_.remove(h.filteredAgents,function(e){return e.globalStatus!==h.query.globalStatusFilter}),h.query.pauseTypeFilter&&_.remove(h.filteredAgents,function(e){return e.pauseType!==h.query.pauseTypeFilter}),h.query.filter&&_.remove(h.filteredAgents,function(e){return e.fullname.toLowerCase().indexOf(h.query.filter.toLowerCase())<0}),h.filteredAgents=(t=h.filteredAgents,n=_.startsWith(h.query.order,"-")?"desc":"asc",_.orderBy(t,[h.query.order.replace("-","")],[n]));var i=(h.query.page-1)*h.query.limit;h.paginatedAgents=_.drop(h.filteredAgents,i).slice(0,h.query.limit);for(var o=0;o<h.paginatedAgents.length;o+=1)h.order.push(h.paginatedAgents[o].id);a.resolve(),h.load=!0}function S(e){return"pause"===e||"*pause"===e}function T(e){return"idle"===e||"unknown"===e||"unavailable"===e||"ringing"===e||_.isNil(e)}function C(e,t){return"voice"===t?"idle"!==e[t+"Status"]?e[t+"Status"]:e[t+"Pause"]?e[t+"Status"]="pause":"idle":e[t+"Pause"]?e[t+"Status"]="pause":e[t+"Status"]}function x(e){var t="unknown";t=_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"pause":_.some([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],S)?"*pause":_.every([C(e,"voice"),C(e,"chat"),C(e,"mail"),C(e,"openchannel"),C(e,"sms"),C(e,"fax")],T)?"idle":"busy",e.globalStatus!==t&&(e.globalStatus=t,e.init?(e.init=!1,e.globalStatusTime=S(t)?_.toNumber(moment(e.lastPauseAt).format("x")):_.max([e.voiceStatusTime,e.chatStatusTime,e.mailStatusTime,e.smsStatusTime,e.openchannelStatusTime,e.faxStatusTime])):e.globalStatusTime=_.toNumber(moment().format("x")))}e.$on("$destroy",function(){c.removeAllListeners("user:save"),c.removeAllListeners("user:update"),c.removeAllListeners("user:agentconnect"),c.removeAllListeners("user:agentcomplete"),E&&(v.cancel(E),E=null)})}e.$inject=["$scope","$q","$timeout","$mdDialog","$document","$filter","pauses","agents","rpcAgents","api","socket","toasty","helperClasses","Auth","license","$interval"],angular.module("app.voice").controller("AgentsVoiceRealtimeController",e)}(),function(){"use strict";function e(e,n,t,a,i,o){var s=this;s.calls=i||{rows:[],count:0},s.query={limit:10,page:1},s.channelStatus=o.channelStatusOut,s.onSave=function(e){var t=_.find(s.calls.rows,{channel:e.channel});e.channelstatedesc=e.dialstatus?"up":"ring",t?_.merge(t,e):e.channel&&s.calls.rows.push(e)},s.onRemove=function(e){var t=_.findIndex(s.calls.rows,{channel:e.channel});0<=t&&(s.calls.rows[t].status="hangup");n(function(){s.calls.rows.splice(t,1)},5e3)},a.on("voice_outbound_channel:save",s.onSave),a.on("voice_outbound_channel:remove",s.onRemove),e.$on("$destroy",function(){a.removeAllListeners("voice_outbound_channel:save"),a.removeAllListeners("voice_outbound_channel:remove")})}e.$inject=["$scope","$timeout","api","socket","rpcCalls","helperClasses"],angular.module("app.voice").controller("OutboundCallsVoiceRealtimeController",e)}(),function(){"use strict";function e(e,t,a,n,i,o,s,r,l){var d=this;d.agents=n||{count:0,rows:[]},d.rpcVoiceQueuesChannels=i?_.keyBy(i.rows?_.filter(i.rows,{type:"inbound"}):[],"uniqueid"):{},d.queryChannels={limit:10,page:1},d.getSize=function(e){return _.size(e)},d.onSave=function(e){"inbound"===e.type&&(d.rpcVoiceQueuesChannels[e.uniqueid]=e)},d.onRemove=function(e){d.rpcVoiceQueuesChannels[e.uniqueid]&&delete d.rpcVoiceQueuesChannels[e.uniqueid]},d.hangup=function(t){return o.rpc.getVoiceQueuesChannelHangup({uniqueid:t}).$promise.then(function(e){l.success({title:"Channel "+t+" properly hangup!",msg:e.message||""})}).catch(function(e){l.error({title:e.status+" - "+e.statusText,msg:JSON.stringify(e.data)||e.message.join(" ")})})},d.redirectToAgent=function(t,e){return o.rpc.getVoiceQueuesChannelRedirect({uniqueid:t,exten:e}).$promise.then(function(e){l.success({title:"Channel "+t+" properly redirect!",msg:e.message||""})}).catch(function(e){l.error({title:e.status+" - "+e.statusText,msg:JSON.stringify(e.data)||e.message.join(" ")})})},d.redirectToNumber=function(e,t){var n=a.prompt().title("Which number do you want transfer the call to?").placeholder("Number").targetEvent(e).ok("Ok").cancel("Cancel");return a.show(n).then(function(e){return o.rpc.getVoiceQueuesChannelRedirect({uniqueid:t,exten:e}).$promise}).then(function(e){l.success({title:"Channel "+t+" properly redirect!",msg:e.message||""})}).catch(function(e){l.error({title:e.status+" - "+e.statusText,msg:JSON.stringify(e.data)||e.message.join(" ")})})},s.on("voice_queue_channel:save",d.onSave),s.on("voice_queue_channel:remove",d.onRemove),e.$on("$destroy",function(){s.removeAllListeners("voice_queue_channel:save"),s.removeAllListeners("voice_queue_channel:remove")})}e.$inject=["$scope","$timeout","$mdDialog","agents","rpcVoiceQueuesChannels","api","socket","helperClasses","toasty"],angular.module("app.voice").controller("QueueCallsVoiceRealtimeController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r){var l=this,d=["total","answered","unmanaged","sumHoldTime","sumDuration","sumBillable"];function c(){_.forIn(l.queues,function(e,t){l.rpcQueues[t]&&_.merge(e,_.pick(l.rpcQueues[t],d))})}l.count=a.count,l.queues=a?_.keyBy(a.rows?a.rows:[],"id"):{},l.rpcQueues=i?_.keyBy(i.rows?i.rows:[],"id"):{},r.hasRole("admin")?l.query={type:"inbound",fields:"id,name",sort:"-updatedAt",limit:10,page:1}:l.query={id:r.getCurrentUser().id,channel:"voice",type:"inbound",fields:"id,name",sort:"-updatedAt",limit:10,page:1},l.success=p,l.getQueues=function(){l.query.offset=(l.query.page-1)*l.query.limit,r.hasRole("admin")?l.promise=o.voiceQueue.get(l.query,p).$promise:l.promise=o.user.getQueues(l.query,p).$promise},l.onSave=function(e){l.queues[e.id]&&_.merge(l.queues[e.id],_.pick(e,d))},l.$onInit=c,s.onWithoutApply("voice_queue:save",l.onSave),l.interval=t(function(){},999);var m=!0,u=1;function p(e){l.count=e.count,l.queues=e?_.keyBy(e.rows?e.rows:[],"id"):{},c()}e.$watch("vm.query.filter",function(e,t){m?n(function(){m=!1}):(t||(u=l.query.page),e!==t&&(l.query.page=1),e||(l.query.page=u),l.getQueues())}),e.$on("$destroy",function(){s.removeAllListeners("voice_queue:save"),l.interval&&t.cancel(l.interval)})}e.$inject=["$scope","$timeout","$interval","queues","rpcQueues","api","socket","Auth"],angular.module("app.voice").controller("QueueParamsVoiceRealtimeController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r,l,d,c,m){var u=this,p=["loggedIn","available","waiting","talking","pTalking","originated","message","dialActive","dialMethod","Trunk","paused"];function g(){var n=[];return _.forIn(u.queues,function(e,t){e.paused=0,e.loggedInDb=0,u.queues[t].agents={},n.push(l.voiceQueue.getMembers({id:t}).$promise),u.rpcQueues[t]&&_.merge(e,_.pick(u.rpcQueues[t],p))}),t.all(n).then(function(e){for(var t=0;t<e.length;t+=1)for(var n=0;n<e[t].rows.length;n++)e[t].rows[n].paused&&u.queues[e[t].rows[n].VoiceQueueId].paused++,u.queues[e[t].rows[n].VoiceQueueId].loggedInDb++,u.queues[e[t].rows[n].VoiceQueueId].agents[e[t].rows[n].UserId]=e[t].rows[n].VoiceQueueId}).catch(function(e){console.error(e)})}u.count=s.count?s.count:0,u.queues=s?_.keyBy(s.rows?s.rows:[],"id"):{},u.rpcQueues=r?_.keyBy(r.rows?r.rows:[],"id"):{},m.hasRole("admin")?u.query={type:"inbound",sort:"-updatedAt",limit:10,page:1}:u.query={id:m.getCurrentUser().id,channel:"voice",type:"inbound",sort:"-updatedAt",limit:10,page:1},u.success=b,u.getQueues=function(){u.query.offset=(u.query.page-1)*u.query.limit,m.hasRole("admin")?u.promise=l.voiceQueue.get(u.query,b).$promise:u.promise=l.user.getQueues(u.query,b).$promise},u.createOrEditVoiceQueue=function(e,t){a.show({controller:"CreateOrEditVoiceQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/voiceQueues/create/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{voiceQueue:t,voiceQueues:_.values(u.queues),license:null,setting:null}})},u.agentAdd=function(e,t){a.show({controller:"VoiceQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/voiceQueues/edit/agentadd/agentadd.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{voiceQueue:t,voiceQueues:u.queues?u.queues.rows:[],realtime:!0}})},u.updateQueue=function(e){return l.voiceQueue.update(e).$promise.then(function(){c.success({title:"Queue properly updated!",msg:e.name?e.name+" has been updated!":""})}).catch(function(e){c.error({title:"Error creating queue!",msg:e.message})})},u.onSave=function(e){u.queues[e.id]&&_.merge(u.queues[e.id],_.pick(e,p))},u.onPause=function(n){console.log("onPause",n),n.voicePause?_.forIn(u.queues,function(e,t){e.agents[n.id]&&(e.paused+=1,console.log("pause"))}):n.voicePause||_.forIn(u.queues,function(e,t){e.agents[n.id]&&0<e.paused&&(e.paused-=1,console.log("unpause"))})},u.onLogin=function(e){console.log("onLogged",e),u.queues[e.VoiceQueueId]&&(u.queues[e.VoiceQueueId].loggedInDb+=1,u.queues[e.VoiceQueueId].agents[e.UserId]=e.VoiceQueueId)},u.onLogout=function(e){console.log("onLogout",e),u.queues[e.VoiceQueueId]&&0<u.queues[e.VoiceQueueId].loggedInDb&&(u.queues[e.VoiceQueueId].loggedInDb-=1,delete u.queues[e.VoiceQueueId].agents[e.UserId])},u.$onInit=g,u.order=[],_.forIn(u.queues,function(e,t){u.order.push(e.id)}),d.onWithoutApply("voice_queue:save",u.onSave),u.interval=o(function(){},999),d.on("user:update",u.onPause),d.on("userVoiceQueue:remove",u.onLogout),d.on("userVoiceQueue:save",u.onLogin);var v=!0,h=1;function b(e){if(u.count=e.count,u.queues=e?_.keyBy(e.rows?e.rows:[],"id"):{},e.rows){u.order=[];for(var t=0;t<e.rows.length;t++)u.order.push(e.rows[t].id)}g()}e.$watch("vm.query.filter",function(e,t){v?n(function(){v=!1}):(t||(h=u.query.page),e!==t&&(u.query.page=1),e||(u.query.page=h),u.getQueues())}),e.$on("$destroy",function(){d.removeAllListeners("voice_queue:save"),u.interval&&o.cancel(u.interval),d.removeAllListeners("user:update"),d.removeAllListeners("userVoiceQueue:remove"),d.removeAllListeners("userVoiceQueue:save")})}e.$inject=["$scope","$timeout","$mdDialog","$q","$document","$interval","queues","rpcQueues","api","socket","toasty","Auth"],angular.module("app.voice").controller("QueuesVoiceRealtimeController",e)}(),function(){"use strict";angular.module("app.auth").factory("helperClasses",function(){return{status:{registered:"green-300-fg icon-checkbox-marked-circle",unregistered:"red-300-fg icon-close-circle",lagged:"red-300-fg icon-close-circle",reachable:"green-300-fg icon-checkbox-marked-circle",unreachable:"red-300-fg icon-close-circle",unknown:"grey-fg icon-minus-circle"},state:{unknown:"grey-fg icon-phone-hangup",not_inuse:"green-300-fg icon-phone-hangup",inuse:"red-300-fg icon-phone-in-talk",busy:"red-300-fg icon-phone-locked",invalid:"grey-fg icon-phone-hangup",unavailable:"grey-fg icon-phone-hangup",ringing:"blue-300-fg icon-phone-incoming",ringinuse:"blue-300-fg icon-phone-incoming",onhold:"blue-300-fg icon-phone-paused"},channelStatus:{ring:"blue-300-fg icon-phone-incoming",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"},channelStatusOut:{ring:"blue-300-fg icon-phone-outgoing",up:"green-300-fg icon-phone-in-talk",hangup:"red-300-fg icon-phone-hangup"}}})}(),function(){"use strict";function e(e,n,t){var a=this;switch(t.disconnect(),t.connect(),a.selectedTab=0,n.current.name){case"app.voice.realtime.agents":a.selectedTab=0;break;case"app.voice.realtime.telephones":a.selectedTab=1;break;case"app.voice.realtime.trunks":a.selectedTab=2;break;case"app.voice.realtime.queues":a.selectedTab=3;break;case"app.voice.realtime.queue_calls":a.selectedTab=4;break;case"app.voice.realtime.abandonedcalls":a.selectedTab=5;break;case"app.voice.realtime.queue_params":a.selectedTab=6;break;case"app.voice.realtime.outbound_calls":a.selectedTab=7;break;default:a.selectedTab=0,n.go("app.voice.realtime.agents")}e.$watch("vm.selectedTab",function(e,t){if(e!==t)switch(e){case 0:n.go("app.voice.realtime.agents");break;case 1:n.go("app.voice.realtime.telephones");break;case 2:n.go("app.voice.realtime.trunks");break;case 3:n.go("app.voice.realtime.queues");break;case 4:n.go("app.voice.realtime.queue_calls");break;case 5:n.go("app.voice.realtime.abandonedcalls");break;case 6:n.go("app.voice.realtime.queue_params");break;case 7:n.go("app.voice.realtime.outbound_calls");break;default:n.go("app.voice.realtime.agents")}})}e.$inject=["$scope","$state","socket"],angular.module("app.voice").controller("VoiceRealtimeController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r){var l=this,d=["fullname","internal","state","status"];function c(){_.forIn(l.telephones,function(e,t){l.rpcTelephones[t]&&_.merge(e,_.pick(l.rpcTelephones[t],d))})}l.count=a.count,l.attributes=["fullname","internal","state","status","address"],l.telephones=a?_.keyBy(a.rows?a.rows:[],"id"):{},l.rpcTelephones=i?_.keyBy(i.rows?i.rows:[],"id"):{},l.query={fields:"id,fullname,internal",role:"telephone",sort:"-updatedAt",limit:10,page:1},l.statusClass=r.status,l.stateClass=r.state,l.success=p,l.$onInit=c,l.showInfo=function(e){t.show(t.alert().clickOutsideToClose(!0).title("Legend").htmlContent("<div>TODO legend status + state</div>").ok("Ok").targetEvent(e))},l.getTelephones=function(){l.query.offset=(l.query.page-1)*l.query.limit,l.promise=o.user.get(l.query,p).$promise},l.onSave=function(e){l.telephones[e.id]&&_.merge(l.telephones[e.id],_.pick(e,d))},s.on("telephone:save",l.onSave);var m=!0,u=1;function p(e){l.telephones=e?_.keyBy(e.rows?e.rows:[],"id"):{},c()}e.$watch("vm.query.filter",function(e,t){m?n(function(){m=!1}):(t||(u=l.query.page),e!==t&&(l.query.page=1),e||(l.query.page=u),l.getTelephones())}),e.$on("$destroy",function(){s.removeAllListeners("telephone:save")})}e.$inject=["$scope","$timeout","$mdDialog","telephones","rpcTelephones","api","socket","helperClasses"],angular.module("app.voice").controller("TelephonesVoiceRealtimeController",e)}(),function(){"use strict";function e(e,n,t,a,i,o,s,r,l){var d=this,c=["status","stateRegistry","registry","host","port","internal","state","status"];function m(){for(var e,t=0;t<d.trunks.length;t+=1)0<=(e=_.findIndex(d.rpcTrunks,["id",d.trunks[t].id]))&&_.merge(d.trunks[t],_.pick(d.rpcTrunks[e],c))}function u(e,t,n){0<=t&&_.merge(e[t],_.pick(n,c))}d.count=a.count,d.trunks=a?a.rows:[],d.rpcTrunks=i&&i.rows?i.rows:[],d.query={fields:"id,name",active:!0,sort:"-updatedAt",limit:10,page:1},d.statusClass=r.status,d.stateClass=r.state,d.success=v,d.$onInit=m,d.showInfo=function(e){t.show(t.alert().clickOutsideToClose(!0).title("Legend").htmlContent("<div>TODO legend status + state</div>").ok("Ok").targetEvent(e))},d.getTrunks=function(){d.query.offset=(d.query.page-1)*d.query.limit,d.promise=o.trunk.get(d.query,v).$promise},d.goToTrunk=function(e,t){l.go("app.tools.trunks.edit",{id:t.id})},d.onSave=function(e){var t=_.findIndex(d.trunks,["id",e.id]),n=_.findIndex(d.rpcTrunks,["id",e.id]);u(d.trunks,t,e),u(d.rpcTrunks,n,e)},s.on("trunk:save",d.onSave);var p=!0,g=1;function v(e){d.count=e.count,d.trunks=e&&e.rows?e.rows:[],m()}e.$watch("vm.query.filter",function(e,t){p?n(function(){p=!1}):(t||(g=d.query.page),e!==t&&(d.query.page=1),e||(d.query.page=g),d.getTrunks())}),e.$on("$destroy",function(){s.removeAllListeners("trunk:save")})}e.$inject=["$scope","$timeout","$mdDialog","trunks","rpcTrunks","api","socket","helperClasses","$state"],angular.module("app.voice").controller("TrunksVoiceRealtimeController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="VOICE.EDIT_VOICEMAIL",m.voicemail=angular.copy(s),m.voicemails=o,m.newVoicemail=!1,m.voicemail||(m.voicemail={attach:"no"},m.title="VOICE.NEW_VOICEMAIL",m.newVoicemail=!0),m.addNewVoicemail=function(){m.errors=[],r.voiceMail.save(m.voicemail).$promise.then(function(e){m.voicemails.unshift(e.toJSON()),i.success({title:"Voicemail properly created",msg:m.voicemail.name?m.voicemail.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceMail.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMail.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveVoicemail=function(){m.errors=[],r.voiceMail.update({id:m.voicemail.id},m.voicemail).$promise.then(function(e){var t=_.find(m.voicemails,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"Voicemail properly saved!",msg:m.voicemail.name?m.voicemail.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceMail.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMail.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteVoicemail=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The voicemail will be deleted.").ariaLabel("Delete Voicemail").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceMail.delete({id:m.voicemail.id}).$promise.then(function(){_.remove(m.voicemails,{id:m.voicemail.id}),i.success({title:"Voicemail properly deleted!",msg:(m.voicemail.name||"voicemail")+" has been deleted!"}),u(m.voicemail)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceMail.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMail.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","voicemails","voicemail","api","Auth","license","setting"],angular.module("app.voice").controller("CreateOrEditVoicemailDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=d.getCurrentUser(),c.voicemail={},c.voicemailMessages={count:0,rows:[]},c.selectedVoicemailMessages=[],c.query={fields:"createdAt,updatedAt,id,callerid,duration,audio,stamp,msg_id",sort:"-stamp",limit:10,page:1},c.init=function(e){c.voicemail=e,c.query.id=c.voicemail.id,c.getVoicemailMessages()},c.deleteConfirm=function(e,t){var n=o.confirm().title("Are you sure want to delete the message?").htmlContent("<b>"+(e.name||"message")+"</b> will be deleted.").ariaLabel("delete message").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){g(e)},function(){console.log("CANCEL")})},c.voiceMailMessageDownload=function(o,e){return l.voiceMailMessage.download({id:o.id,exists:!0}).$promise.then(function(e){var t=[e.buffer],n="message"+o.id,a=new Blob(t,{type:e.type});n=o.msg_id+".wav";var i=window.document.createElement("a");i.setAttribute("href",URL.createObjectURL(a)),i.setAttribute("download",n),i.click()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t+=1)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceMail.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},c.success=p,c.getVoicemailMessages=function(){c.query.offset=(c.query.page-1)*c.query.limit,c.promise=l.voiceMail.getMessages(c.query,p).$promise},c.createOrEditVoicemailMessage=function(e,t){o.show({controller:"CreateOrEditMessageDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/voicemails/edit/messages/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{voicemail:c.voicemail,message:t,messages:c.voicemailMessages.rows,license:null,setting:null}})},c.exportSelectedVoicemailMessages=function(){var e=angular.copy(c.selectedVoicemailMessages);return c.selectedVoicemailMessages=[],e},c.deleteVoicemailMessage=g,c.deleteSelectedVoicemailMessages=function(e){var t=o.confirm().title("Are you sure want to delete the selected messages?").htmlContent("<b>"+c.selectedVoicemailMessages.length+" selected</b> will be deleted.").ariaLabel("delete messages").targetEvent(e).ok("OK").cancel("CANCEL");o.show(t).then(function(){c.selectedVoicemailMessages.forEach(function(e){g(e)}),c.selectedVoicemailMessages=[]})};var m=!0,u=1;function p(e){c.voicemailMessages=e||{count:0,rows:[]}}function g(e){l.voiceMailMessage.delete({id:e.id}).$promise.then(function(){_.remove(c.voicemailMessages.rows,{id:e.id}),c.voicemailMessages.count-=1,c.voicemailMessages.rows.length||c.getVoicemailMessages(),r.success({title:"Message deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){vm.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETvoiceMail"}];for(var t=0;t<e.data.errors.length;t++)r.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceMail",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}t.$watch("vm_dc.query.filter",function(e,t){m?i(function(){m=!1}):(t||(u=c.query.page),e!==t&&(c.query.page=1),e||(c.query.page=u),c.getVoicemailMessages())})}e.$inject=["$cookies","$scope","$state","$q","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.voice").controller("VoicemailMessagesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=i,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=t.protocol()+"://"+t.host(),c.voicemail=d||e.params.voicemail||{},c.selectedTab=e.params.tab||0,c.alert=r.info,c.gotoVoicemails=function(){e.go("app.voice.voicemails")},c.saveVoicemail=function(){s.voiceMail.update({id:c.voicemail.id},c.voicemail).$promise.then(function(){r.success({title:"Voicemail updated!",msg:c.voicemail.name?c.voicemail.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceMail",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.voiceContext.get({fields:"name",sort:"name"}).$promise.then(function(e){c.contexts=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETcontexts",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","voicemail"],angular.module("app.voice").controller("VoicemailController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.voicemails=r||{count:0,rows:[]},v.table="voicemails",v.listOrder="",v.listOrderAsc=null,v.selectedVoicemails=[],v.query={fields:"createdAt,updatedAt,id,customer_id,fullname,email,password,mailbox,context,tz,attach,envelope,delete,emailbody,emailsubject,maxsecs,maxmsg",sort:"-updatedAt",limit:10,page:1},v.arrayattach=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayenvelope=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraydelete=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.voice.voicemails.edit",{id:e.id,voicemail:e})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the voicemail?").htmlContent("<b>"+(e.name||"voicemail")+"</b> will be deleted.").ariaLabel("delete voicemail").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getVoicemails=function(){v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.voiceMail.get(v.query,f).$promise},v.createOrEditVoicemail=function(e,t){i.show({controller:"CreateOrEditVoicemailDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/voicemails/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{voicemail:t,voicemails:v.voicemails.rows,license:v.license,setting:v.setting}})},v.deleteVoicemail=A,v.exportSelectedVoicemails=function(){var e=angular.copy(v.selectedVoicemails);return v.selectedVoicemails=[],e},v.deleteSelectedVoicemails=function(e){var t=i.confirm().title("Are you sure want to delete the selected voicemails?").htmlContent("<b>"+v.selectedVoicemails.length+" selected</b> will be deleted.").ariaLabel("delete Voicemails").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedVoicemails.forEach(function(e){A(e)}),v.selectedVoicemails=[]})},v.deselectVoicemails=function(){v.selectedVoicemails=[]},v.selectAllVoicemails=function(){v.selectedVoicemails=v.voicemails.rows};var h=!0,b=1;function f(e){v.voicemails=e||{count:0,rows:[]}}function A(e){l.voiceMail.delete({id:e.id}).$promise.then(function(){_.remove(v.voicemails.rows,{id:e.id}),v.voicemails.count-=1,v.voicemails.rows.length||v.getVoicemails(),c.success({title:"Voicemail deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvoiceMail"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvoiceMail",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getVoicemails())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","voicemails","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.voice").controller("VoicemailsController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="VOICE.EDIT_VOICEQUEUE",m.voiceQueue=angular.copy(s),m.voiceQueues=o,m.newVoiceQueue=!1,m.voiceQueue||(m.voiceQueue={type:"inbound",strategy:"ringall",timeout:15,retry:2,random_periodic_announce:"no",announce_holdtime:"no",announce_position:"no",reportholdtime:"no",autopause:"no",ringinuse:"no",timeoutrestart:"no",setinterfacevar:"no",setqueuevar:"no",setqueueentryvar:"no"},m.title="VOICE.NEW_VOICEQUEUE",m.newVoiceQueue=!0),m.addNewVoiceQueue=function(){m.errors=[],r.voiceQueue.save(m.voiceQueue).$promise.then(function(e){m.voiceQueues.unshift(e.toJSON()),i.success({title:"VoiceQueue properly created",msg:m.voiceQueue.name?m.voiceQueue.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceQueue.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceQueue.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveVoiceQueue=function(){m.errors=[],r.voiceQueue.update({id:m.voiceQueue.id},m.voiceQueue).$promise.then(function(e){var t=_.find(m.voiceQueues,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"VoiceQueue properly saved!",msg:m.voiceQueue.name?m.voiceQueue.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceQueue.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceQueue.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteVoiceQueue=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The voiceQueue will be deleted.").ariaLabel("Delete VoiceQueue").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceQueue.delete({id:m.voiceQueue.id}).$promise.then(function(){_.remove(m.voiceQueues,{id:m.voiceQueue.id}),i.success({title:"VoiceQueue properly deleted!",msg:(m.voiceQueue.name||"voiceQueue")+" has been deleted!"}),u(m.voiceQueue)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceQueue.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceQueue.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","voiceQueues","voiceQueue","api","Auth","license","setting"],angular.module("app.voice").controller("CreateOrEditVoiceQueueDialogController",e)}(),function(){"use strict";function e(e,n,a,t,i,o,s,r){var l=this;function d(){return a.voiceQueue[l.isVoiceRealtime()?"getMembers":"getAgents"]({id:l.voiceQueue.id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){return l.isVoiceRealtime()?l.selectedItems=e.rows?_.map(e.rows,function(e){return e.id=e.UserId,e.fullname=e.membername,e.penalty=e.hasOwnProperty("penalty")?"penalty "+e.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[]:l.selectedItems=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserVoiceQueue?"penalty "+e.UserVoiceQueue.penalty:"",e.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.selectedItems=l.selectedItems,r.hasRole("admin")?a.user.get({fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise:a.user.getAgents({id:r.getCurrentUser().id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise}).then(function(e){l.items=e.rows?_.map(e.rows,function(e){return e.penalty=e.UserVoiceQueue?"penalty "+e.UserVoiceQueue.penalty:"",e.internal=e.internal?"<"+e.internal+">":"",e}):[],l.dualMultiselectOptions.items=_.differenceBy(l.items,l.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETUSERS.GETAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}l.voiceQueue=t,l.penalty=0,l.items=[],l.selectedItems=[],l.closeDialog=function(){e.hide()},l.isVoiceRealtime=function(){return o},l.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!o,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"penalty",labelAll:s.instant("VOICE.ALL_AGENTS"),labelSelected:s.instant("VOICE.SELECTED_AGENTS"),transferCallback:function(e,t){a.voiceQueue[t?"removeAgents":"addAgents"]({id:l.voiceQueue.id,ids:_.map(e,l.isVoiceRealtime()&&t?"UserId":"id"),penalty:l.penalty||0,realtime:o||!1}).$promise.then(function(){n.success({title:"VoiceQueue properly "+(t?"removed":"added"),msg:"VoiceQueue has been "+(t?"removed":"added")+"!"}),t||d()}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:voiceQueue.ADDAGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},d()}e.$inject=["$mdDialog","toasty","api","voiceQueue","voiceQueues","realtime","$translate","Auth"],angular.module("app.voice").controller("VoiceQueueagentaddController",e)}(),function(){"use strict";function e(e,n,a,t,i){var o=this;o.voiceQueue=t,o.penalty=0,o.items=[],o.selectedItems=[],o.dualMultiselectOptions={items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:i.instant("VOICE.ALL_TEAMS"),labelSelected:i.instant("VOICE.SELECTED_TEAMS"),transferCallback:function(e,t){a.voiceQueue[t?"removeTeams":"addTeams"]({id:o.voiceQueue.id,ids:_.map(e,"id"),penalty:o.penalty||0}).$promise.then(function(){n.success({title:"Team properly "+(t?"removed":"added"),msg:"Team has been "+(t?"removed":"added")+"!"})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:voiceQueue.ADDTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}},o.closeDialog=function(){e.hide()},a.voiceQueue.getTeams({id:o.voiceQueue.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){return o.selectedItems=e.rows?e.rows:[],o.dualMultiselectOptions.selectedItems=o.selectedItems,a.team.get({fields:"id,name",nolimit:!0}).$promise}).then(function(e){o.items=e.rows?e.rows:[],o.dualMultiselectOptions.items=_.differenceBy(o.items,o.selectedItems,"id")}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETTEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})}e.$inject=["$mdDialog","toasty","api","voiceQueue","$translate"],angular.module("app.voice").controller("VoiceQueueteamaddController",e)}(),function(){"use strict";function e(n,e,a,i,t,o,s,r,l,d){var c=this;c.currentUser=l.getCurrentUser(),c.license=t,c.setting=o,c.passwordPattern=c.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",c.location=e.protocol()+"://"+e.host(),c.voiceQueue=d||n.params.voiceQueue||{},c.selectedTab=n.params.tab||0,c.teamadddialog=function(e,t){a.show({controller:"VoiceQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/voiceQueues/edit/teamadd/teamadd.html",parent:angular.element(i.body),targetEvent:t,clickOutsideToClose:!0,locals:{voiceQueue:e,voiceQueues:c.voiceQueues?c.voiceQueues.rows:[]}})},c.agentadddialog=function(e,t){a.show({controller:"VoiceQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/voiceQueues/edit/agentadd/agentadd.html",parent:angular.element(i.body),targetEvent:t,clickOutsideToClose:!0,locals:{voiceQueue:e,voiceQueues:c.voiceQueues?c.voiceQueues.rows:[],realtime:!1}})},c.gotogoto=function(e,t){n.go("app.voice.realtime.queues",{})},c.alert=r.info,c.gotoVoiceQueues=function(){n.go("app.voice.voiceQueues")},c.saveVoiceQueue=function(){s.voiceQueue.update({id:c.voiceQueue.id},c.voiceQueue).$promise.then(function(){r.success({title:"VoiceQueue updated!",msg:c.voiceQueue.name?c.voiceQueue.name+" has been updated!":""})}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETvoiceQueue",msg:e.data?JSON.stringify(e.data):e.toString()})})},s.voiceMusicOnHold.get({fields:"name",nolimit:"true"}).$promise.then(function(e){c.musiconholds=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETmusiconholds",msg:e.data?JSON.stringify(e.data):e.toString()})}),s.sound.get({fields:"name,save_name",sort:"name",nolimit:"true"}).$promise.then(function(e){c.sounds=e.rows||[]}).catch(function(e){r.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETsounds",msg:e.data?JSON.stringify(e.data):e.toString()})})}e.$inject=["$state","$location","$mdDialog","$document","license","setting","api","toasty","Auth","voiceQueue"],angular.module("app.voice").controller("VoiceQueueController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.voiceQueues=r||{count:0,rows:[]},v.table="voiceQueues",v.listOrder="",v.listOrderAsc=null,v.selectedVoiceQueues=[],v.query={fields:"createdAt,updatedAt,id,name,type,strategy,timeout,maxlen,retry,wrapuptime,weight,joinempty,leavewhenempty,musiconhold,announce,description,periodic_announce,queue_reporthold,queue_youarenext,queue_thereare,queue_callswaiting,queue_holdtime,queue_minutes,queue_minute,queue_seconds,queue_thankyou,announce_frequency,min_announce_frequency,periodic_announce_frequency,random_periodic_announce,announce_holdtime,announce_position,announce_position_limit,reportholdtime,acw,acwTimeout,autopause,ringinuse,memberdelay,timeoutrestart,monitor_format,context,setinterfacevar,setqueuevar,setqueueentryvar",type:"inbound",sort:"-updatedAt",channel:"voice",limit:10,page:1},v.arraystrategy=_.keyBy([{option:"Ringall",value:"'ringall'"},{option:"Round Robin Memory",value:"'rrmemory'"},{option:"Least Recent",value:"'leastrecent'"},{option:"Fewest Calls",value:"'fewestcalls'"},{option:"Random",value:"'random'"},{option:"Linear",value:"'linear'"},{option:"Weight Random",value:"'wrandom'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayjoinempty=_.keyBy([{option:"no",value:"'no'"},{option:"yes",value:"'yes'"},{option:"strict",value:"'strict'"},{option:"loose",value:"'loose'"},{option:"paused",value:"'paused'"},{option:"penalty",value:"'penalty'"},{option:"inuse",value:"'inuse'"},{option:"ringing",value:"'ringing'"},{option:"unavailable",value:"'unavailable'"},{option:"invalid",value:"'invalid'"},{option:"unknoww",value:"'unknown'"},{option:"wrapup",value:"'wrapup'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayleavewhenempty=_.keyBy([{option:"no",value:"'no'"},{option:"yes",value:"'yes'"},{option:"strict",value:"'strict'"},{option:"loose",value:"'loose'"},{option:"paused",value:"'paused'"},{option:"penalty",value:"'penalty'"},{option:"inuse",value:"'inuse'"},{option:"ringing",value:"'ringing'"},{option:"unavailable",value:"'unavailable'"},{option:"invalid",value:"'invalid'"},{option:"unknoww",value:"'unknown'"},{option:"wrapup",value:"'wrapup'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayrandom_periodic_announce=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayannounce_holdtime=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"},{option:"Once",value:"'once'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayannounce_position=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"},{option:"Limit",value:"'limit'"},{option:"More",value:"'more'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayreportholdtime=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayautopause=_.keyBy([{option:"Yes",value:"'all'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arrayringinuse=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraytimeoutrestart=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraymonitor_format=_.keyBy([{option:"Inactive",value:"''"},{option:"wav",value:"'wav'"},{option:"wav49",value:"'wav49'"},{option:"gsm",value:"'gsm'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraysetinterfacevar=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraysetqueuevar=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.arraysetqueueentryvar=_.keyBy([{option:"Yes",value:"'yes'"},{option:"No",value:"'no'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),v.editstate=function(e,t){n.go("app.voice.voiceQueues.edit",{id:e.id,voiceQueue:e})},v.teamadddialog=function(e,t){i.show({controller:"VoiceQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/voiceQueues/edit/teamadd/teamadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{voiceQueue:e,voiceQueues:v.voiceQueues?v.voiceQueues.rows:[]}})},v.agentadddialog=function(e,t){i.show({controller:"VoiceQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/voiceQueues/edit/agentadd/agentadd.html",parent:angular.element(o.body),targetEvent:t,clickOutsideToClose:!0,locals:{voiceQueue:e,voiceQueues:v.voiceQueues?v.voiceQueues.rows:[],realtime:!1}})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the voiceQueue?").htmlContent("<b>"+(e.name||"voiceQueue")+"</b> will be deleted.").ariaLabel("delete voiceQueue").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.gotorealtimegoto=function(e,t){n.go("app.voice.realtime.queues",{})},v.success=f,v.getVoiceQueues=function(){v.query.offset=(v.query.page-1)*v.query.limit,m.hasRole("admin")?v.promise=l.voiceQueue.get(v.query,f).$promise:(v.query.id=v.currentUser.id,v.promise=l.user.getQueues(v.query,f).$promise)},v.createOrEditVoiceQueue=function(e,t){i.show({controller:"CreateOrEditVoiceQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/voiceQueues/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{voiceQueue:t,voiceQueues:v.voiceQueues.rows,license:v.license,setting:v.setting}})},v.deleteVoiceQueue=A,v.exportSelectedVoiceQueues=function(){var e=angular.copy(v.selectedVoiceQueues);return v.selectedVoiceQueues=[],e},v.deleteSelectedVoiceQueues=function(e){var t=i.confirm().title("Are you sure want to delete the selected voiceQueues?").htmlContent("<b>"+v.selectedVoiceQueues.length+" selected</b> will be deleted.").ariaLabel("delete VoiceQueues").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedVoiceQueues.forEach(function(e){A(e)}),v.selectedVoiceQueues=[]})},v.deselectVoiceQueues=function(){v.selectedVoiceQueues=[]},v.selectAllVoiceQueues=function(){v.selectedVoiceQueues=v.voiceQueues.rows};var h=!0,b=1;function f(e){v.voiceQueues=e||{count:0,rows:[]}}function A(e){l.voiceQueue.delete({id:e.id}).$promise.then(function(){_.remove(v.voiceQueues.rows,{id:e.id}),v.voiceQueues.count-=1,v.voiceQueues.rows.length||v.getVoiceQueues(),c.success({title:"VoiceQueue deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvoiceQueue"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvoiceQueue",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getVoiceQueues())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","voiceQueues","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.voice").controller("VoiceQueuesController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c){var m=this;function u(e){a.hide(e)}m.errors=[],m.setting=c,m.license=d,m.passwordPattern=m.setting&&m.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",m.title="VOICE.EDIT_VOICERECORDING",m.voiceRecording=angular.copy(s),m.voiceRecordings=o,m.newVoiceRecording=!1,m.voiceRecording||(m.voiceRecording={},m.title="VOICE.NEW_VOICERECORDING",m.newVoiceRecording=!0),m.addNewVoiceRecording=function(){m.errors=[],r.voiceRecording.save(m.voiceRecording).$promise.then(function(e){m.voiceRecordings.unshift(e.toJSON()),i.success({title:"VoiceRecording properly created",msg:m.voiceRecording.name?m.voiceRecording.name+" has been created!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceRecording.save"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceRecording.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.saveVoiceRecording=function(){m.errors=[],r.voiceRecording.update({id:m.voiceRecording.id},m.voiceRecording).$promise.then(function(e){var t=_.find(m.voiceRecordings,{id:e.id});t&&_.merge(t,_.pick(e.toJSON(),_.keys(t))),i.success({title:"VoiceRecording properly saved!",msg:m.voiceRecording.name?m.voiceRecording.name+" has been saved!":""}),u(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceRecording.update"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceRecording.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},m.deleteVoiceRecording=function(e){m.errors=[];var t=a.confirm().title("Are you sure?").content("The voiceRecording will be deleted.").ariaLabel("Delete VoiceRecording").ok("Delete").cancel("Cancel").targetEvent(e);a.show(t).then(function(){r.voiceRecording.delete({id:m.voiceRecording.id}).$promise.then(function(){_.remove(m.voiceRecordings,{id:m.voiceRecording.id}),i.success({title:"VoiceRecording properly deleted!",msg:(m.voiceRecording.name||"voiceRecording")+" has been deleted!"}),u(m.voiceRecording)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"api.voiceRecording.delete"}];for(var t=0;t<e.data.errors.length;t++)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceRecording.delete",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})},function(){})},m.getDateFromString=function(e){return new Date(e)},m.closeDialog=u}e.$inject=["$scope","$state","$location","$mdDialog","toasty","voiceRecordings","voiceRecording","api","Auth","license","setting"],angular.module("app.voice").controller("CreateOrEditVoiceRecordingDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g){var v=this;v.license=u,v.setting=p,v.currentUser=m.getCurrentUser(),v.voiceRecordings=r||{count:0,rows:[]},v.table="voiceRecordings",v.listOrder="",v.listOrderAsc=null,v.selectedVoiceRecordings=[],v.query={fields:"createdAt,updatedAt,id,format,value,type,uniqueid,calleridnum,exten,connectedlinenum,queue,membername,rating,audio,createdAt,userDisposition",sort:"-updatedAt",limit:10,page:1},v.localizationMap=g,v.pickerModel={dateStart:null},v.downloadfile2=function(o,e){return l.voiceRecording.download({id:o.id}).$promise.then(function(e){var t=[e.buffer],n="download",a=new Blob(t,{type:e.type});n=o.uniqueid+o.format;var i=window.document.createElement("a");i.setAttribute("href",URL.createObjectURL(a)),i.setAttribute("download",n),i.click()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message});else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.voiceRecording.save",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},v.deleteconfirm=function(e,t){var n=i.confirm().title("Are you sure want to delete the voiceRecording?").htmlContent("<b>"+(e.name||"voiceRecording")+"</b> will be deleted.").ariaLabel("delete voiceRecording").targetEvent(t).ok("OK").cancel("CANCEL");i.show(n).then(function(){A(e)},function(){console.log("CANCEL")})},v.success=f,v.getVoiceRecordings=function(){v.query.dateStart=void 0,v.query.dateEnd=void 0,v.pickerModel.dateStart&&(v.query.dateStart=v.pickerModel.dateStart,v.query.dateEnd=v.pickerModel.dateEnd);v.query.offset=(v.query.page-1)*v.query.limit,v.promise=l.voiceRecording.get(v.query,f).$promise},v.createOrEditVoiceRecording=function(e,t){i.show({controller:"CreateOrEditVoiceRecordingDialogController",controllerAs:"vm",templateUrl:"app/main/apps/voice/views/voiceRecordings/create/dialog.html",parent:angular.element(o.body),targetEvent:e,clickOutsideToClose:!0,locals:{voiceRecording:t,voiceRecordings:v.voiceRecordings.rows,license:v.license,setting:v.setting}})},v.deleteVoiceRecording=A,v.exportSelectedVoiceRecordings=function(){var e=angular.copy(v.selectedVoiceRecordings);return v.selectedVoiceRecordings=[],e},v.deleteSelectedVoiceRecordings=function(e){var t=i.confirm().title("Are you sure want to delete the selected voiceRecordings?").htmlContent("<b>"+v.selectedVoiceRecordings.length+" selected</b> will be deleted.").ariaLabel("delete VoiceRecordings").targetEvent(e).ok("OK").cancel("CANCEL");i.show(t).then(function(){v.selectedVoiceRecordings.forEach(function(e){A(e)}),v.selectedVoiceRecordings=[]})},v.deselectVoiceRecordings=function(){v.selectedVoiceRecordings=[]},v.selectAllVoiceRecordings=function(){v.selectedVoiceRecordings=v.voiceRecordings.rows},v.clearDateFilter=function(){v.pickerModel={dateStart:null},v.getVoiceRecordings()};var h=!0,b=1;function f(e){v.voiceRecordings=e||{count:0,rows:[]}}function A(e){l.voiceRecording.delete({id:e.id}).$promise.then(function(){_.remove(v.voiceRecordings.rows,{id:e.id}),v.voiceRecordings.count-=1,v.voiceRecordings.rows.length||v.getVoiceRecordings(),c.success({title:"VoiceRecording deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){v.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEvoiceRecording"}];for(var t=0;t<e.data.errors.length;t++)c.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else c.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEvoiceRecording",msg:e.data?JSON.stringify(e.data.message):e.message||e.toString()})})}e.$watch("vm.query.filter",function(e,t){h?s(function(){h=!1}):(t||(b=v.query.page),e!==t&&(v.query.page=1),e||(v.query.page=b),v.getVoiceRecordings())})}e.$inject=["$scope","$window","$state","$mdSidenav","$mdDialog","$document","$timeout","voiceRecordings","api","msUtils","toasty","Auth","license","setting","dateFilterLocalizationFactory"],angular.module("app.voice").controller("VoiceRecordingsController",e)}(),function(){"use strict";function e(t,n,a,e,i,o,s,r){var l=this;function d(e,t){return{id:e,title:t.name||"NONAME",state:"app.dashboards.custom",stateParams:t,weight:2,hidden:function(){return i.hasRole("agent")||!i.hasPermission(e)&&!i.hasRole("admin")}}}l.isAgent=function(){return i.getCurrentUser()&&i.hasRole("agent")},a.saveItem("apps",{title:"APPS",group:!0,weight:1,hidden:function(){return i.hasRole("agent")}}),s.version.get().$promise.then(function(e){l.version=e&&e.current?e.current:"UNKNOWN"}).catch(function(e){l.version="UNKNOWN"}).finally(function(){a.saveItem("version",{title:"VERSION "+l.version,group:!0,weight:2,hidden:function(){return i.hasRole("agent")}})}),i.isLoggedIn()&&s.dashboard.get().$promise.then(function(e){for(var t=0,n=0;n<e.rows.length;n+=1)t=99999+e.rows[n].id,a.saveItem("apps.dashboards.custom_"+t,d(t,e.rows[n]))}),o.custom&&!r.defaultPageTitle&&r.pageTitle&&angular.element("#pageTitle").html(r.pageTitle),a.saveItem("apps.dashboards",{id:100,title:"Dashboards",translate:"DASHBOARDS.DASHBOARDS",icon:"icon-tile-four",weight:2,hidden:function(){return i.hasRole("agent")||!i.hasPermission(100)&&!i.hasRole("admin")}}),a.saveItem("apps.dashboards.general",{id:101,title:"General",translate:"DASHBOARDS.GENERAL",state:"app.dashboards.general",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(101)&&!i.hasRole("admin")}}),a.saveItem("apps.staff",{id:200,title:"Staff",translate:"STAFF.STAFF",icon:"icon-account-multiple",weight:3,hidden:function(){return i.hasRole("agent")||!i.hasPermission(200)&&!i.hasRole("admin")}}),a.saveItem("apps.staff.users",{id:201,title:"Users",translate:"STAFF.USERS",state:"app.staff.users",weight:1,hidden:function(){return i.hasRole("agent")||i.hasRole("user")||!i.hasPermission(201)&&!i.hasRole("admin")}}),a.saveItem("apps.staff.agents",{id:202,title:"Agents",translate:"STAFF.AGENTS",state:"app.staff.agents",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(202)&&!i.hasRole("admin")}}),a.saveItem("apps.staff.telephones",{id:203,title:"Telephones",translate:"STAFF.TELEPHONES",state:"app.staff.telephones",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(203)&&!i.hasRole("admin")}}),a.saveItem("apps.staff.teams",{id:204,title:"Teams",translate:"STAFF.TEAMS",state:"app.staff.teams",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(204)&&!i.hasRole("admin")}}),a.saveItem("apps.contactmanager",{id:300,title:"ContactManager",translate:"CONTACTMANAGER.CONTACTMANAGER",icon:"icon-account-circle",weight:4,hidden:function(){return!o.cm||i.hasRole("agent")||!i.hasPermission(300)&&!i.hasRole("admin")}}),a.saveItem("apps.contactmanager.lists",{id:301,title:"Lists",translate:"CONTACTMANAGER.LISTS",state:"app.contactmanager.lists",weight:2,hidden:function(){return i.hasRole("agent")||!i.hasPermission(301)&&!i.hasRole("admin")}}),a.saveItem("apps.contactmanager.companies",{id:302,title:"Companies",translate:"CONTACTMANAGER.COMPANIES",state:"app.contactmanager.companies",weight:3,hidden:function(){return i.hasRole("agent")||!i.hasPermission(302)&&!i.hasRole("admin")}}),a.saveItem("apps.contactmanager.globalCustomFields",{id:304,title:"GlobalCustomFields",translate:"CONTACTMANAGER.GLOBALCUSTOMFIELDS",state:"app.contactmanager.globalCustomFields",weight:4,hidden:function(){return i.hasRole("agent")||!i.hasPermission(304)&&!i.hasRole("admin")}}),a.saveItem("apps.contactmanager.contacts",{id:303,title:"Contacts",translate:"CONTACTMANAGER.CONTACTS",state:"app.contactmanager.contacts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(303)&&!i.hasRole("admin")}}),a.saveItem("apps.voice",{id:400,title:"Voice",translate:"VOICE.VOICE",icon:"icon-phone",weight:5,hidden:function(){return i.hasRole("agent")||!i.hasPermission(400)&&!i.hasRole("admin")}}),a.saveItem("apps.voice.voiceQueues",{id:401,title:"VoiceQueues",translate:"VOICE.VOICEQUEUES",state:"app.voice.voiceQueues",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(401)&&!i.hasRole("admin")}}),a.saveItem("apps.voice.inboundroutes",{id:402,title:"InboundRoutes",translate:"VOICE.INBOUNDROUTES",state:"app.voice.inboundroutes",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(402)&&!i.hasRole("admin")}}),a.saveItem("apps.voice.outboundroutes",{id:403,title:"OutboundRoutes",translate:"VOICE.OUTBOUNDROUTES",state:"app.voice.outboundroutes",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(403)&&!i.hasRole("admin")}}),a.saveItem("apps.voice.internalroutes",{id:404,title:"InternalRoutes",translate:"VOICE.INTERNALROUTES",state:"app.voice.internalroutes",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(404)&&!i.hasRole("admin")}}),a.saveItem("apps.voice.contexts",{id:405,title:"Contexts",translate:"VOICE.CONTEXTS",state:"app.voice.contexts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(405)&&!i.hasRole("admin")}}),a.saveItem("apps.voice.voicemails",{id:406,title:"Voicemails",translate:"VOICE.VOICEMAILS",state:"app.voice.voicemails",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(406)&&!i.hasRole("admin")}}),a.saveItem("apps.voice.musiconholds",{id:407,title:"MusicOnHolds",translate:"VOICE.MUSICONHOLDS",state:"app.voice.musiconholds",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(407)&&!i.hasRole("admin")}}),a.saveItem("apps.voice.voiceRecordings",{id:408,title:"VoiceRecordings",translate:"VOICE.VOICERECORDINGS",state:"app.voice.voiceRecordings",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(408)&&!i.hasRole("admin")}}),a.saveItem("apps.voice.chanSpies",{id:409,title:"ChanSpies",translate:"VOICE.CHANSPIES",state:"app.voice.chanSpies",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(409)&&!i.hasRole("admin")}}),a.saveItem("apps.voice.realtime",{id:410,title:"Realtime",translate:"VOICE.REALTIME",state:"app.voice.realtime",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(410)&&!i.hasRole("admin")}}),a.saveItem("apps.chat",{id:500,title:"Chat",translate:"CHAT.CHAT",icon:"icon-hangouts",weight:6,hidden:function(){return!o.chat||i.hasRole("agent")||!i.hasPermission(500)&&!i.hasRole("admin")}}),a.saveItem("apps.chat.chatQueues",{id:501,title:"ChatQueues",translate:"CHAT.CHATQUEUES",state:"app.chat.chatQueues",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(501)&&!i.hasRole("admin")}}),a.saveItem("apps.chat.chatWebsites",{id:502,title:"ChatWebsites",translate:"CHAT.CHATWEBSITES",state:"app.chat.chatWebsites",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(502)&&!i.hasRole("admin")}}),a.saveItem("apps.chat.realtime",{id:510,title:"Realtime",translate:"CHAT.REALTIME",state:"app.chat.realtime",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(510)&&!i.hasRole("admin")}}),a.saveItem("apps.mail",{id:600,title:"Mail",translate:"MAIL.MAIL",icon:"icon-email",weight:7,hidden:function(){return!o.mail||i.hasRole("agent")||!i.hasPermission(600)&&!i.hasRole("admin")}}),a.saveItem("apps.mail.mailQueues",{id:601,title:"MailQueues",translate:"MAIL.MAILQUEUES",state:"app.mail.mailQueues",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(601)&&!i.hasRole("admin")}}),a.saveItem("apps.mail.mailAccounts",{id:602,title:"MailAccounts",translate:"MAIL.MAILACCOUNTS",state:"app.mail.mailAccounts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(602)&&!i.hasRole("admin")}}),a.saveItem("apps.mail.mailSubtatuses",{id:603,title:"MailSubstatuses",translate:"MAIL.MAILSUBSTATUSES",state:"app.mail.mailSubtatuses",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(603)&&!i.hasRole("admin")}}),a.saveItem("apps.mail.realtime",{id:610,title:"Realtime",translate:"MAIL.REALTIME",state:"app.mail.realtime",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(610)&&!i.hasRole("admin")}}),a.saveItem("apps.sms",{id:700,title:"Sms",translate:"SMS.SMS",icon:"icon-message-text",weight:8,hidden:function(){return!o.messaging||i.hasRole("agent")||!i.hasPermission(700)&&!i.hasRole("admin")}}),a.saveItem("apps.sms.smsQueues",{id:701,title:"SmsQueues",translate:"SMS.SMSQUEUES",state:"app.sms.smsQueues",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(701)&&!i.hasRole("admin")}}),a.saveItem("apps.sms.smsAccounts",{id:702,title:"SmsAccounts",translate:"SMS.SMSACCOUNTS",state:"app.sms.smsAccounts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(702)&&!i.hasRole("admin")}}),a.saveItem("apps.sms.realtime",{id:710,title:"Realtime",translate:"SMS.REALTIME",state:"app.sms.realtime",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(710)&&!i.hasRole("admin")}}),a.saveItem("apps.openchannel",{id:800,title:"Openchannel",translate:"OPENCHANNEL.OPENCHANNEL",icon:"icon-google-earth",weight:9,hidden:function(){return!o.openchannel||i.hasRole("agent")||!i.hasPermission(800)&&!i.hasRole("admin")}}),a.saveItem("apps.openchannel.openchannelQueues",{id:801,title:"OpenchannelQueues",translate:"OPENCHANNEL.OPENCHANNELQUEUES",state:"app.openchannel.openchannelQueues",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(801)&&!i.hasRole("admin")}}),a.saveItem("apps.openchannel.openchannelAccounts",{id:802,title:"OpenchannelAccounts",translate:"OPENCHANNEL.OPENCHANNELACCOUNTS",state:"app.openchannel.openchannelAccounts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(802)&&!i.hasRole("admin")}}),a.saveItem("apps.openchannel.realtime",{id:810,title:"Realtime",translate:"OPENCHANNEL.REALTIME",state:"app.openchannel.realtime",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(810)&&!i.hasRole("admin")}}),a.saveItem("apps.fax",{id:900,title:"Fax",translate:"FAX.FAX",icon:"icon-deskphone",weight:10,hidden:function(){return!o.fax||i.hasRole("agent")||!i.hasPermission(900)&&!i.hasRole("admin")}}),a.saveItem("apps.fax.faxQueues",{id:901,title:"FaxQueues",translate:"FAX.FAXQUEUES",state:"app.fax.faxQueues",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(901)&&!i.hasRole("admin")}}),a.saveItem("apps.fax.faxAccounts",{id:902,title:"FaxAccounts",translate:"FAX.FAXACCOUNTS",state:"app.fax.faxAccounts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(902)&&!i.hasRole("admin")}}),a.saveItem("apps.fax.realtime",{id:910,title:"Realtime",translate:"FAX.REALTIME",state:"app.fax.realtime",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(910)&&!i.hasRole("admin")}}),a.saveItem("apps.tools",{id:1e3,title:"Tools",translate:"TOOLS.TOOLS",icon:"icon-auto-fix",weight:13,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1e3)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.cannedAnswers",{id:1002,title:"CannedAnswers",translate:"TOOLS.CANNEDANSWERS",state:"app.tools.cannedAnswers",weight:2,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1002)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.customDashboards",{id:1003,title:"CustomDashboards",translate:"TOOLS.CUSTOMDASHBOARDS",state:"app.tools.customDashboards",weight:3,badge:{content:"beta",color:"orange"},hidden:function(){return i.hasRole("agent")||!i.hasPermission(1003)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.intervals",{id:1004,title:"Intervals",translate:"TOOLS.INTERVALS",state:"app.tools.intervals",weight:4,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1004)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.pauses",{id:1005,title:"Pauses",translate:"TOOLS.PAUSES",state:"app.tools.pauses",weight:5,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1005)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.schedules",{id:42,title:"Scheduler",translate:"TOOLS.SCHEDULER",state:"app.tools.schedules",weight:6,hidden:function(){return i.hasRole("agent")||!i.hasPermission(42)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.sounds",{id:1006,title:"Sounds",translate:"TOOLS.SOUNDS",state:"app.tools.sounds",weight:7,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1006)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.tags",{id:1007,title:"Tags",translate:"TOOLS.TAGS",state:"app.tools.tags",weight:8,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1007)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.templates",{id:1008,title:"Templates",translate:"TOOLS.TEMPLATES",state:"app.tools.templates",weight:9,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1008)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.triggers",{id:1009,title:"Triggers",translate:"TOOLS.TRIGGERS",state:"app.tools.triggers",weight:10,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1009)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.trunks",{id:1010,title:"Trunks",translate:"TOOLS.TRUNKS",state:"app.tools.trunks",weight:11,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1010)&&!i.hasRole("admin")}}),a.saveItem("apps.tools.variables",{id:1011,title:"Variables",translate:"TOOLS.VARIABLES",state:"app.tools.variables",weight:12,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1011)&&!i.hasRole("admin")}}),a.saveItem("apps.callysquare",{id:1100,title:"CallySquare",translate:"CALLYSQUARE.CALLYSQUARE",icon:"icon-sitemap",weight:11,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1100)&&!i.hasRole("admin")}}),a.saveItem("apps.callysquare.odbcs",{id:1101,title:"ODBC",translate:"CALLYSQUARE.ODBC",state:"app.callysquare.odbcs",weight:2,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1101)&&!i.hasRole("admin")}}),a.saveItem("apps.callysquare.squareRecordings",{id:1102,title:"SquareRecordings",translate:"CALLYSQUARE.SQUARERECORDINGS",state:"app.callysquare.squareRecordings",weight:3,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1102)&&!i.hasRole("admin")}}),a.saveItem("apps.callysquare.projects",{id:1103,title:"Projects",translate:"CALLYSQUARE.PROJECTS",state:"app.callysquare.projects",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1103)&&!i.hasRole("admin")}}),a.saveItem("apps.analytics",{id:1200,title:"Analytics",translate:"ANALYTICS.ANALYTICS",icon:"icon-chart-line",weight:14,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1200)&&!i.hasRole("admin")}}),a.saveItem("apps.analytics.metrics",{id:1201,title:"Metrics",translate:"ANALYTICS.METRICS",state:"app.analytics.metrics",weight:3,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1201)&&!i.hasRole("admin")}}),a.saveItem("apps.analytics.extractedReports",{id:1202,title:"ExtractedReports",translate:"ANALYTICS.EXTRACTEDREPORTS",state:"app.analytics.extractedReports",weight:2,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1202)&&!i.hasRole("admin")}}),a.saveItem("apps.analytics.reports",{id:1203,title:"Reports",translate:"ANALYTICS.REPORTS",state:"app.analytics.reports",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1203)&&!i.hasRole("admin")}}),a.saveItem("apps.integrations",{id:1300,title:"Integrations",translate:"INTEGRATIONS.INTEGRATIONS",icon:"icon-heart",weight:15,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1300)&&!i.hasRole("admin")}}),a.saveItem("apps.integrations.zendeskAccounts",{id:1301,title:"ZendeskAccounts",translate:"INTEGRATIONS.ZENDESKACCOUNTS",state:"app.integrations.zendeskAccounts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1301)&&!i.hasRole("admin")}}),a.saveItem("apps.integrations.salesforceAccounts",{id:1302,title:"SalesforceAccounts",translate:"INTEGRATIONS.SALESFORCEACCOUNTS",state:"app.integrations.salesforceAccounts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1302)&&!i.hasRole("admin")}}),a.saveItem("apps.integrations.freshdeskAccounts",{id:1303,title:"FreshdeskAccounts",translate:"INTEGRATIONS.FRESHDESKACCOUNTS",state:"app.integrations.freshdeskAccounts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1303)&&!i.hasRole("admin")}}),a.saveItem("apps.integrations.sugarcrmAccounts",{id:1304,title:"SugarcrmAccounts",translate:"INTEGRATIONS.SUGARCRMACCOUNTS",state:"app.integrations.sugarcrmAccounts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1304)&&!i.hasRole("admin")}}),a.saveItem("apps.integrations.deskAccounts",{id:1302,title:"DeskAccounts",translate:"INTEGRATIONS.DESKACCOUNTS",state:"app.integrations.deskAccounts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1302)&&!i.hasRole("admin")}}),a.saveItem("apps.integrations.zohoAccounts",{id:1302,title:"ZohoAccounts",translate:"INTEGRATIONS.ZOHOACCOUNTS",state:"app.integrations.zohoAccounts",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1302)&&!i.hasRole("admin")}}),a.saveItem("apps.settings",{id:1400,title:"Settings",translate:"SETTINGS.SETTINGS",icon:"icon-cog",weight:16,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1400)&&!i.hasRole("admin")}}),a.saveItem("apps.settings.generals",{id:1401,title:"General",translate:"SETTINGS.GENERAL",state:"app.settings.generals",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1401)&&!i.hasRole("admin")}}),a.saveItem("apps.settings.smtps",{id:1402,title:"Smtp",translate:"SETTINGS.SMTP",state:"app.settings.smtps",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1402)&&!i.hasRole("admin")}}),a.saveItem("apps.settings.networks",{id:1403,title:"Networks",translate:"SETTINGS.NETWORKS",state:"app.settings.networks",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1403)&&!i.hasRole("admin")}}),a.saveItem("apps.settings.customizations",{id:1407,title:"Customizations",translate:"SETTINGS.CUSTOMIZATIONS",state:"app.settings.customizations",weight:1,hidden:function(){return!o.custom||i.hasRole("agent")||!i.hasPermission(1407)&&!i.hasRole("admin")}}),a.saveItem("apps.settings.updates",{id:1404,title:"Updates",translate:"SETTINGS.UPDATES",state:"app.settings.updates",weight:1,hidden:function(){return!o.update||i.hasRole("agent")||!i.hasPermission(1404)&&!i.hasRole("admin")}}),a.saveItem("apps.settings.license",{id:1405,title:"License",translate:"SETTINGS.LICENSE",state:"app.settings.license",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1405)&&!i.hasRole("admin")}}),a.saveItem("apps.settings.system",{id:1406,title:"System",translate:"SETTINGS.SYSTEM",state:"app.settings.system",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1406)&&!i.hasRole("admin")}}),a.saveItem("apps.help",{id:1600,title:"Help",translate:"HELP.HELP",icon:"icon-help",weight:17,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1600)&&!i.hasRole("admin")}}),a.saveItem("apps.help.about",{id:1601,title:"About",translate:"HELP.ABOUT",state:"app.help.about",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1601)&&!i.hasRole("admin")}}),a.saveItem("apps.motiondialer",{id:1500,title:"MotionDialer",translate:"MOTIONDIALER.MOTIONDIALER",icon:"icon-fire",weight:5,hidden:function(){return!o.dialer||i.hasRole("agent")||!i.hasPermission(1500)&&!i.hasRole("admin")}}),a.saveItem("apps.motiondialer.queueCampaigns",{id:1501,title:"QueueCampaigns",translate:"MOTIONDIALER.QUEUECAMPAIGNS",state:"app.motiondialer.queueCampaigns",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1501)&&!i.hasRole("admin")}}),a.saveItem("apps.motiondialer.ivrCampaigns",{id:1502,title:"IvrCampaigns",translate:"MOTIONDIALER.IVRCAMPAIGNS",state:"app.motiondialer.ivrCampaigns",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1502)&&!i.hasRole("admin")}}),a.saveItem("apps.motiondialer.realtime",{id:1510,title:"Realtime",translate:"MOTIONDIALER.REALTIME",state:"app.motiondialer.realtime",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1510)&&!i.hasRole("admin")}}),a.saveItem("apps.jscripty",{id:1700,title:"jscripty",translate:"JSCRIPTY.JSCRIPTY",icon:"icon-script",weight:12,hidden:function(){return!o.jscripty||i.hasRole("agent")||!i.hasPermission(1700)&&!i.hasRole("admin")}}),a.saveItem("apps.jscripty.projects",{id:1701,title:"Projects",translate:"JSCRIPTY.PROJECTS",state:"app.jscripty.projects",weight:1,hidden:function(){return i.hasRole("agent")||!i.hasPermission(1701)&&!i.hasRole("admin")}}),e.saveItem("apps",{title:"APPS",group:!0,weight:1}),e.saveItem("apps.home",{id:100,title:"Home",translate:"DASHBOARDS.HOME",icon:"icon-home",weight:1}),e.saveItem("apps.home.dashboard",{id:101,title:"Dashboard",translate:"DASHBOARDS.DASHBOARD",state:"dashboard",icon:"icon-tile-four",iconClass:"cyan-500-fg",weight:1,hidden:function(){return!i.hasPermission(101)}}),e.saveItem("apps.home.contacts",{id:102,title:"Contacts",translate:"DASHBOARDS.CONTACTS",state:"contacts",icon:"icon-account-circle",iconClass:"red-fg",weight:2,hidden:function(){return!o.cm||!i.hasPermission(102)}}),e.saveItem("apps.home.mycontacts",{id:103,title:"Contacts",translate:"DASHBOARDS.MYCONTACTS",state:"mycontacts",icon:"icon-account-multiple",iconClass:"red-fg",weight:3,hidden:function(){return!o.cm||!i.hasPermission(103)}}),e.saveItem("apps.home.voice",{id:110,title:"Voice",translate:"DASHBOARDS.VOICE",state:"voice",icon:"icon-phone",iconClass:"blue-A700-fg",weight:4,hidden:function(){return!i.hasPermission(110)}}),e.saveItem("apps.home.abandoned",{id:111,title:"Abandoned",translate:"DASHBOARDS.ABANDONED",state:"abandoned",icon:"icon-phone-missed",iconClass:"blue-fg",weight:5,hidden:function(){return!i.hasPermission(111)}}),e.saveItem("apps.home.recordings",{id:104,title:"Recordings",translate:"DASHBOARDS.RECORDINGS",state:"recordings",icon:"icon-audiobook",iconClass:"indigo-A100-fg",weight:6,hidden:function(){return!i.hasPermission(104)}}),e.saveItem("apps.home.chat",{id:105,title:"Chat",translate:"DASHBOARDS.CHAT",state:"chat",icon:"icon-hangouts",iconClass:"green-A700-fg",weight:7,hidden:function(){return!o.chat||!i.hasPermission(105)}}),e.saveItem("apps.home.mail",{id:106,title:"Mail",translate:"DASHBOARDS.MAIL",state:"mail",icon:"icon-email",iconClass:"teal-fg",weight:8,hidden:function(){return!o.mail||!i.hasPermission(106)}}),e.saveItem("apps.home.sms",{id:107,title:"Sms",translate:"DASHBOARDS.SMS",state:"sms",icon:"icon-message-text",iconClass:"orange-fg",weight:9,hidden:function(){return!o.messaging||!i.hasPermission(107)}}),e.saveItem("apps.home.openchannel",{id:108,title:"Openchannel",translate:"DASHBOARDS.OPENCHANNEL",state:"openchannel",icon:"icon-google-earth",iconClass:"amber-A200-fg",weight:10,hidden:function(){return!o.openchannel||!i.hasPermission(108)}}),e.saveItem("apps.home.fax",{id:109,title:"Fax",translate:"DASHBOARDS.FAX",state:"fax",icon:"icon-deskphone",iconClass:"blue-grey-A200-fg",weight:11,hidden:function(){return!o.fax||!i.hasPermission(109)}}),t.$on("$viewContentAnimationEnded",function(e){e.targetScope.$id===t.$id&&n.$broadcast("msSplashScreen::remove")})}e.$inject=["$scope","$rootScope","msNavigationService","msNavigationAgentService","Auth","license","api","setting"],angular.module("motion").controller("MainController",e)}(),function(){"use strict";function e(e,t,n,a,i,o){var s=this;function r(e){if(e&&e.id){var t=99999+e.id;i.saveItem("apps.dashboards.custom_"+t,{id:t,title:e.name||"NONAME",badge:{content:"beta",color:"orange"},state:"app.dashboards.custom",stateParams:e,weight:2,hidden:function(){return o.hasRole("agent")||!o.hasPermission(t)&&!o.hasRole("admin")}})}}s.bodyEl=angular.element("body"),s.msScrollOptions={suppressScrollX:!0},s.setting=n,s.$onInit=function(){s.folded="true"===t.get("motion.folded")||!1},s.toggleMsNavigationFolded=function(){s.folded=!s.folded,t.put("motion.folded",s.folded)},s.getLogo=function(){return s.setting.defaultHeaderWhiteLabel?"xCALLY Motion":s.setting.headerWhiteLabel},a.on("dashboard:save",r),a.on("dashboard:update",r),a.on("dashboard:remove",function(e){if(e&&e.id){var t=99999+e.id;i.deleteItem("apps.dashboards.custom_"+t)}}),e.$on("$stateChangeSuccess",function(){s.bodyEl.removeClass("ms-navigation-horizontal-mobile-menu-active")})}e.$inject=["$scope","$cookies","setting","socket","msNavigationService","Auth"],angular.module("app.navigation").controller("NavigationController",e)}(),function(){"use strict";function e(e,a,i,t,n,o,s,r){var l=this;function d(n){s.isSupported()?s.requestPermission().then(function(){var e,t;t={autoClose:!0,duration:10,showOnPageHidden:!0,icon:"api/users/"+(e=n).FromId+"/avatar",body:e.body||"",focusOnclick:!0,closeOnClick:!0},s.show(a.instant("QUICKPANEL.NEW_INTERNAL_MESSAGE"),t)},function(e){console.error("Please enable browser notifications!",e)}):console.error("Browser notifications are not supported by the browser. Normal notifications will be used.")}l.date=moment().format(),l.currentUser=t.getCurrentUser(),l.license=r,l.unreadTotalMessages=0,l.unreadTotalGroupMessages=0,l.userIsNotPhonebar=function(){return"admin"===l.currentUser.role||"user"===l.currentUser.role||"agent"===l.currentUser.role&&0!==l.currentUser.showWebBar},l.onMessageSave=function(e){e.ToId===l.currentUser.id&&e.FromId!==l.currentUser.id&&!e.read&&e.ChatGroupId&&(l.unreadTotalGroupMessages++,d(e));e.ToId!==l.currentUser.id||e.ChatGroupId||(l.unreadTotalMessages+=1,d(e))},l.onMessageUpdate=function(e){e.ToId===l.currentUser.id&&e.read&&0<l.unreadTotalMessages&&!e.ChatGroupId&&(l.unreadTotalMessages-=1);e.ToId==l.currentUser.id&&e.FromId!==l.currentUser.id&&e.ChatGroupId&&e.read&&0<l.unreadTotalGroupMessages&&l.unreadTotalGroupMessages--},n.on("chatInternalMessage:save",l.onMessageSave),n.on("chatInternalMessage:update",l.onMessageUpdate),o.chatInternalMessage.get({fields:"FromId",ToId:l.currentUser.id,read:!1,nolimit:!0,ChatGroupId:"null"}).$promise.then(function(e){return e&&e.count&&(l.unreadTotalMessages=e.count),o.user.getGroups({id:l.currentUser.id}).$promise}).then(function(e){for(var t=[],n=e.rows,a=0;a<n.length;a++)t.push(o.chatGroup.getUnread({id:n[a].id}).$promise);return i.all(t)}).then(function(e){for(var t=0;t<e.length;t++)l.unreadTotalGroupMessages+=e[t].count}).catch(function(e){console.error(e)}),e.$on("$destroy",function(){n.removeAllListeners("chatInternalMessage:save"),n.removeAllListeners("chatInternalMessage:update")})}e.$inject=["$scope","$translate","$q","Auth","socket","api","desktopNotification","license"],angular.module("app.quick-panel").controller("QuickPanelController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l,d,c,m){var u=this;function p(e){var t=angular.element("#chat-dialog");a(function(){t.animate({scrollTop:t[0].scrollHeight},e)},0)}function g(e){return _.isNil(e)?"":e.replace(/[^\w.+#*\-]+/g,"")}function v(e){return m.get(e).success(function(){t.success({title:"Successful call",msg:"Call properly handled!"})}).error(function(e){t.error({title:"PhoneBar API Error",msg:d.instant("CONTACTMANAGER.ERRORS.PHONEBAR_API")})})}u.currentUser=i.getCurrentUser(),u.user=void 0,u.users={count:0,rows:[]},u.standardDate=moment(0).format("YYYY-MM-DD HH:mm:ss"),u.unreadMessage={},u.replyMessage="",u.disabled=!1,u.init=function(e){u.license=e},u.toggleChat=function(e){if(e){if(!e.allowmessenger&&"agent"===e.role)return t.warning({title:d.instant("QUICKPANEL.WARNING"),msg:d.instant("QUICKPANEL.MESSENGER_DISABLED")}),void(u.user=void 0);u.user=e,u.replyMessage="",n.chatInternalMessage.get({sort:"createdAt",FromId:u.currentUser.id+","+e.id,ToId:u.currentUser.id+","+e.id,ChatGroupId:"null"}).$promise.then(function(e){if(e&&e.rows){u.user.messages=e;for(var t=0;t<u.user.messages.rows.length;t+=1)!1===u.user.messages.rows[t].read&&u.user.messages.rows[t].ToId===u.currentUser.id&&n.chatInternalMessage.update({id:u.user.messages.rows[t].id,read:!0})}}).finally(function(){p(0)})}else u.user=void 0},u.reply=function(){u.disabled=!0;Date.now();if(""===u.replyMessage)return void(u.disabled=!1);var e={FromId:u.currentUser.id,ToId:u.user.id,body:u.replyMessage,read:!1};u.replyMessage="",n.chatInternalMessage.save(e).$promise.then(function(e){u.user.messages.rows.push(e),u.user.lastMessageAt=e.createdAt,u.user.lastMessage=e,p(400)}).catch(function(e){}).finally(function(){u.disabled=!1})},u.onMessageSave=function(e){if(e.ToId===u.currentUser.id&&!e.ChatGroupId){u.user&&u.user.id===e.FromId?(u.user.messages.rows.push(e),p(0),n.chatInternalMessage.update({id:e.id,read:!0})):u.unreadMessage[e.FromId]=u.unreadMessage[e.FromId]?u.unreadMessage[e.FromId]+1:1;var t=_.find(u.users.rows,{id:e.FromId});t&&(t.lastMessageAt=e.createdAt,t.lastMessage=e)}},u.onMessageUpdate=function(e){if((e.FromId===u.currentUser.id||e.ToId===u.currentUser.id)&&!e.ChatGroupId){if(u.user){var t=_.find(u.user.messages.rows,{id:e.id});t&&_.merge(t,e)}var n=_.find(u.users.rows,{id:u.currentUser.id===e.FromId?e.ToId:e.FromId});n&&n.lastMessage&&_.merge(n.lastMessage,e),e.ToId===u.currentUser.id&&e.read&&0<u.unreadMessage[e.FromId]&&(u.unreadMessage[e.FromId]-=1)}},u.onUserUpdate=function(e){var t=_.find(u.users.rows,{id:e.id});t&&(_.isNil(e.online)||t.online===e.online||(t.online=e.online),_.isNil(e.allowmessenger)||t.allowmessenger===e.allowmessenger||(t.allowmessenger=e.allowmessenger))},u.webcall=function(e){c.$broadcast("webrtc::call",{target:g(e)})},u.call=function(e){return v("http://127.0.0.1:"+(u.user.phoneBarRemoteControlPort||"9888")+"/api/originate/"+g(e))},u.transfer=function(e){return v("http://127.0.0.1:"+(u.user.phoneBarRemoteControlPort||"9888")+"/api/transfer?number="+g(e))},o.on("chatInternalMessage:save",u.onMessageSave),o.on("chatInternalMessage:update",u.onMessageUpdate),o.on("user:update",u.onUserUpdate),s("quick-panel").onClose(function(){u.user=void 0}),n.chatInternalMessage.get({fields:"FromId",ToId:u.currentUser.id,read:!1,nolimit:!0,ChatGroupId:"null"}).$promise.then(function(e){u.unreadMessage=_.countBy(e.rows,"FromId")}).catch(function(e){}),n.chatInternalMessage.getUsers().$promise.then(function(e){u.users=e}).catch(function(e){console.error(e)}),e.$on("$destroy",function(){o.removeAllListeners("chatInternalMessage:save"),o.removeAllListeners("chatInternalMessage:update"),o.removeAllListeners("user:update")})}e.$inject=["$scope","toasty","api","$timeout","Auth","socket","$mdSidenav","$q","$interval","$translate","$rootScope","$http"],angular.module("app.quick-panel").controller("ChatInternalController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r,l){var d=this;function c(e){a.hide(e)}d.errors=[],d.title="QUICKPANEL.EDIT_CHATGROUP",d.group=angular.copy(r),d.currentUser=s.getCurrentUser(),d.members=l,d.newChatGroup=!0,d.group||(d.group={write:!0,members:[]},d.title="QUICKPANEL.NEW_CHATGROUP"),d.saveChatGroup=function(){var n;return d.errors=[],o.chatGroup.save({name:d.group.name,write:d.group.write}).$promise.then(function(e){var t=_.map(d.group.members,"id");return t.unshift(d.currentUser.id),n=e,o.chatGroup.addMembers({id:n.id,ids:t}).$promise}).then(function(){i.success({title:"Group properly saved!",msg:n.name+" has been saved!"}),c(n)}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatQueue.update",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},d.closeDialog=c,d.querySearch=function(e){return e?d.members.rows.filter((t=e,n=angular.lowercase(t),function(e){var t=e.name.toLowerCase();return-1!=t.indexOf(n)})):[];var t,n}}e.$inject=["$scope","$state","$location","$mdDialog","toasty","api","Auth","group","members"],angular.module("app.quick-panel").controller("CreateOrEditChatGroupDialogController",e)}(),function(){"use strict";function e(e,n,a,o,t,s,i,r,l,d){var c=this;function m(){delete c.group}function u(e){var t=angular.element("#chat-group-dialog");a(function(){t.animate({scrollTop:t[0].scrollHeight},e)},0)}c.currentUser=i.getCurrentUser(),c.unreadGroupMessages={},c.groups={},c.participants,c.group,c.init=function(e){return c.license=e,r.user.getGroups({id:c.currentUser.id}).$promise.then(function(e){for(var t=0,n=[];t<e.rows.length;t++)e.rows[t].unreadGroupMessages=0,c.groups[e.rows[t].id]=e.rows[t],n.push(r.chatGroup.getUnread({id:e.rows[t].id}).$promise);return s.all(n)}).then(function(e){for(var t=0;t<e.length;t++)c.groups[e[t].id].unreadGroupMessages+=e[t].count}).catch(function(e){console.error(e)})},c.back=m,c.addGroup=function(e,t){o.show({controller:"CreateOrEditChatGroupDialogController",controllerAs:"vm",templateUrl:"app/quick-panel/tabs/groups/create/dialog.html",parent:angular.element(n.body),targetEvent:t,clickOutsideToClose:!0,locals:{group:e,me:c.currentUser,license:null,setting:null},resolve:{members:function(){return r.user.get({role:"agent"}).$promise}}}).then(function(e){e&&(c.groups[e.id]=e)}).catch(function(e){e&&console.error(e.message)})},c.deleteGroup=function(e,t){var n=o.confirm().title("Are you sure want to delete the selected group?").htmlContent("Group <b>"+e.name+"</b> will be deleted.").ariaLabel("delete Group").targetEvent(t).ok("OK").cancel("CANCEL");o.show(n).then(function(){return r.chatGroup.delete({id:e.id}).$promise}).then(function(){delete c.groups[e.id],d.success({title:"Group properly deleted!",msg:e.name+" has been deleted!"})}).catch(function(e){e&&d.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.chatGroup.delete",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},c.groupsToArray=function(){return _.values(c.groups)},c.showMessageInfo=function(e,i){o.show({controller:"ShowMessageInfoDialogController",controllerAs:"vm",templateUrl:"app/quick-panel/tabs/groups/info/dialog.html",parent:angular.element(n.body),targetEvent:e,clickOutsideToClose:!0,locals:{message:i},resolve:{data:function(){var a={messages:[]};return r.chatInternalMessage.get({ChatInternalMessageId:i.id}).$promise.then(function(e){var t=[];a.messages=e.rows,a.messages.unshift(i);for(var n=0;n<a.messages.length;n++)t.push(r.user.get({id:a.messages[n].ToId,fields:"id,name,fullname,userpic"}).$promise);return s.all(t)}).then(function(e){return a.users=e,a}).catch(function(e){e&&console.error(e)})}}}).then(function(){}).catch(function(e){e&&console.error(e.message)})},c.toggleChat=function(t){c.group={id:t.id,write:t.write,messages:{}},r.chatGroup.getMembers({id:t.id,fields:"id,name,fullname"}).$promise.then(function(e){return c.group.membersByKeys=_.keyBy(e.rows,"id"),c.group.members=_.differenceBy(e.rows,[{id:c.currentUser.id}],"id"),c.participants=_.map(c.group.members,"fullname").join(", "),r.chatGroup.getMessages({id:t.id}).$promise}).then(function(e){for(var t,n=0,a=[];n<e.count;n++)e.rows[n].ToId===c.currentUser.id&&(t=e.rows[n],c.group.messages[t.id]=t,e.rows[n].ToId!=c.currentUser.id||e.rows[n].FromId===c.currentUser.id||t.read||a.push(r.chatInternalMessage.update({id:t.id,read:!0})));return s.all(a)}).then(function(){u(400)}).catch(function(e){console.error(e.message)})},c.reply=function(){if(!c.replyMessage)return;var n={id:c.group.id,FromId:c.currentUser.id,ToId:c.currentUser.id,body:c.replyMessage,read:!0},a=[];c.replyMessage="",r.chatGroup.addMessage(n).$promise.then(function(e){n.read=!1,n.ChatInternalMessageId=e.id;for(var t=0;t<c.group.members.length;t++)c.group.members[t].id!==c.currentUser.id&&(n.ToId=c.group.members[t].id,a.push(r.chatGroup.addMessage(angular.copy(n)).$promise));return s.all(a)}).catch(function(e){console.log(e)})},l.on("chatInternalMessage:save",function(t){if(!c.group&&t.ToId===c.currentUser.id&&t.FromId!==c.currentUser.id&&!t.read&&t.ChatGroupId){var e=c.groups[t.ChatGroupId];if(!e)return r.chatGroup.get({id:t.ChatGroupId}).$promise.then(function(e){e.unreadGroupMessages=1,c.groups[e.id]=e});e.unreadGroupMessages||(e.unreadGroupMessages=0),e.unreadGroupMessages++}c.group&&t.ChatGroupId===c.group.id&&t.ToId===c.currentUser.id&&r.chatInternalMessage.update({id:t.id,read:!0}).$promise.then(function(){var e;e=t,c.group.messages[e.id]=e,u(400)})}),l.on("chatInternalMessage:update",function(e){e.ToId==c.currentUser.id&&e.FromId!==c.currentUser.id&&e.ChatGroupId&&e.read&&(0<c.groups[e.ChatGroupId].unreadGroupMessages&&c.groups[e.ChatGroupId].unreadGroupMessages--,c.group.messages[e.id]&&(c.group.messages[e.id].read=!0))}),l.on("chatGroup:remove",function(e){c.groups[e.id]&&delete c.groups[e.id]}),t("quick-panel").onClose(m),e.$on("$destroy",function(){l.removeAllListeners("chatInternalMessage:save"),l.removeAllListeners("chatInternalMessage:update"),l.removeAllListeners("chatGroup:remove")})}e.$inject=["$scope","$document","$timeout","$mdDialog","$mdSidenav","$q","Auth","api","socket","toasty"],angular.module("app.quick-panel").controller("ChatGroupController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s,r){this.data=r,this.title="QUICKPANEL.INFO",this.closeDialog=function(){a.hide()}}e.$inject=["$scope","$state","$location","$mdDialog","toasty","api","Auth","data"],angular.module("app.quick-panel").controller("ShowMessageInfoDialogController",e)}(),function(){"use strict";function e(e,t,n,a,i,o){var s=this;s.form={token:o.token},s.setting={},s.resetPassword=function(){return i.auth.reset(s.form).$promise.then(function(){t.success({title:n.instant("RESETPASSWORD.PASSWORD_RESET"),msg:n.instant("RESETPASSWORD.PASSWORD_RESET_MESSAGE")}),a.go("app.login")}).catch(function(e){e&&t.error({title:n.instant("RESETPASSWORD.PASSWORD_RESET_ERROR"),msg:e.data?e.data.message||e.message||e:e.message||e})})},s.onInit=function(){e.isLoggedIn()&&a.go("app.dashboards.general");return i.setting.gdpr({id:1}).$promise.then(function(e){s.setting=e,s.passwordPattern=s.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:""}).catch(function(e){e&&t.error({title:"Error",msg:e.data?e.data.message||e.message||e:e.message||e})})}}e.$inject=["Auth","toasty","$translate","$state","api","$stateParams"],angular.module("app.reset").controller("ResetPasswordController",e)}(),function(){"use strict";function e(e,t,n,a,i,o){var s=this;function r(){e.hide()}s.errors=[],s.user=a,s.setting=i,s.reset=o,s.passwordPattern=s.setting.securePassword?/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/:"",s.savePassword=function(){s.errors=[],n.user.changePassword({id:s.user.id},{oldPassword:s.oldPassword,newPassword:s.password}).$promise.then(function(){t.show(t.simple().textContent("Your password properly updated").position("top right").hideDelay(5e3)),r()}).catch(function(e){console.error(e),s.errors=e.data.errors&&e.data.errors.length?e.data.errors:[{message:e.data.message||"Authorization error",type:"api.user.changePassword"}]})},s.closeDialog=r}e.$inject=["$mdDialog","$mdToast","api","user","setting","reset"],angular.module("app.toolbar").controller("ChangePasswordController",e)}(),function(){"use strict";function e(e,t,n,a,i,o,s){var r=this,l=[];function d(e){_.isNil(e)&&o.cmHopper.update({id:r.preview.id,UserId:null}),a.hide()}r.errors=[],r.preview=s,r.originated=!1,r.disable=!1,r.disableGetContact=!1,l.push(r.preview.id),r.originatePreview=function(){r.originated=!0,r.disable=!0,_.isEmpty(r.preview)?(i.error({title:"Message",msg:"Contact not available"}),r.disable=!1,l=[],d(!0)):o.rpc.getVoiceQueuesPreview({id:r.preview.id}).$promise.then(function(e){d(!0)}).catch(function(e){i.error({title:"Message",msg:e.data}),d(!0)}).finally(function(){r.disable=!1,l=[]})},r.closeDialog=d,r.nextContact=function(){r.disableGetContact=!0,r.originated||o.cmHopper.update({id:r.preview.id,UserId:null});return o.cmHopper.getPreview({hopperIds:l}).$promise.then(function(e){_.isNil(e)||_.isNil(e.Queue)||!e.Queue.dialActive?i.info({title:"PREVIEW",msg:"CAMPAIGN NOT ACTIVE"}):(r.preview=e,l.push(r.preview.id))}).catch(function(e){if(l=[],a.hide(),404===e.status)i.info({title:"PREVIEW",msg:"CONTACT NOT AVAILABLE"});else if(e.data&&e.data.errors&&e.data.errors.length){r.errors=e.data.errors||[{message:e.toString(),type:"api preview"}];for(var t=0;t<e.data.errors.length;t+=1)i.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api preview",msg:e.data?JSON.stringify(e.data.message):e.toString()})}).finally(function(){r.disableGetContact=!1})},e.$on("$destroy",function(){r.originated||o.cmHopper.update({id:r.preview.id,UserId:null})})}e.$inject=["$scope","$state","$location","$mdDialog","toasty","api","preview"],angular.module("app.toolbar").controller("PreviewDialogController",e)}(),function(){"use strict";function e(e,t,o,n,s,a,i,r,l,d,c,m,u,p,g,v,h,b,f,A,E){var y,S=this;function T(e){S.voiceQueues=e?_.keyBy(e.rows?e.rows:[],"id"):{}}function C(){S.promise=b.user.getQueues(S.query,T).$promise}function x(e){return v.logout(e).then(function(){return h.disconnect(),t.$broadcast("webrtc::logout"),n.go("app.login")}).catch(function(e){console.error(e)})}function O(e,t){c.show({controller:"ChangePasswordController",controllerAs:"vm",templateUrl:"app/toolbar/changepassword/changepassword.html",parent:angular.element(m.body),targetEvent:e,clickOutsideToClose:!t,locals:{user:S.user,setting:A,reset:t}})}S.voiceQueues={},S.polling=!0,t.global={search:""},S.pauses=[],S.license=f,S.currentUser=v.getCurrentUser(),S.unreadTotalMessages=0,S.unreadTotalGroupMessages=0,S.contcts=0,"agent"===S.currentUser.role&&(y=E(function(){_.some(S.voiceQueues,{dialMethod:"preview",dialActive:!0})&&S.license.dialer&&S.polling?(S.polling=!1,b.cmHopper.getOpenContacts().$promise.then(function(e){e&&_.isNumber(e.contacts)&&(S.contacts=e.contacts)}).finally(function(){S.polling=!0})):S.contacts=0},14999)),S.setting=A,S.bodyEl=angular.element("body"),S.conf={realm:"asterisk",host:a.host(),protocol:a.protocol(),remotePlayerId:"remote-audio",ua:"Motion WebRTC Bar 0.2.0",license:S.license.webrtc,phoneBarExpires:S.currentUser.phoneBarExpires},S.query={id:v.getCurrentUser().id,fields:"id,name,type,dialMethod,dialActive",channel:"voice",nolimit:!0},S.userStatusOptions=[{title:"Online",icon:"icon-checkbox-marked-circle",color:"#4CAF50"},{title:"Away",icon:"icon-clock",color:"#FFC107"},{title:"Do not Disturb",icon:"icon-minus-circle",color:"#F44336"},{title:"Invisible",icon:"icon-checkbox-blank-circle-outline",color:"#BDBDBD"},{title:"Offline",icon:"icon-checkbox-blank-circle-outline",color:"#616161"}],S.languages={en:{title:"English",translation:"TOOLBAR.ENGLISH",code:"en",flag:"us"},it:{title:"Italian",translation:"TOOLBAR.ITALIAN",code:"it",flag:"it"},fr:{title:"French",translation:"TOOLBAR.FRENCH",code:"fr",flag:"fr"},ko:{title:"Korean",translation:"TOOLBAR.KOREAN",code:"ko",flag:"ko"},es:{title:"Spanish",translation:"TOOLBAR.SPANISH",code:"es",flag:"es"},sv:{title:"Swedish",translation:"TOOLBAR.SWEDISH",code:"sv",flag:"sv"},ru:{title:"Russian",translation:"TOOLBAR.RUSSIAN",code:"ru",flag:"ru"},de:{title:"German",translation:"TOOLBAR.GERMAN",code:"de",flag:"de"},ja:{title:"Japanese",translation:"TOOLBAR.JAPANESE",code:"ja",flag:"ja"},"zh-CN":{title:"ChineseSimplified",translation:"TOOLBAR.CHINESESIMPLIFIED",code:"zh-CN",flag:"zh-CN"},"zh-TW":{title:"ChineseTraditional",translation:"TOOLBAR.CHINESETRADITIONAL",code:"zh-TW",flag:"zh-TW"},nl:{title:"Dutch",translation:"TOOLBAR.DUTCH",code:"nl",flag:"nl"},fi:{title:"Finnish",translation:"TOOLBAR.FINNISH",code:"fi",flag:"fi"},da:{title:"Danish",translation:"TOOLBAR.DANISH",code:"da",flag:"da"},"pt-PT":{title:"Portuguese",translation:"TOOLBAR.PORTUGUESE",code:"pt-PT",flag:"pt-PT"},no:{title:"Norwegian",translation:"TOOLBAR.NORWEGIAN",code:"no",flag:"no"},hi:{title:"Hindi",translation:"TOOLBAR.HINDI",code:"hi",flag:"hi"},tr:{title:"Turkish",translation:"TOOLBAR.TURKISH",code:"tr",flag:"tr"},fa:{title:"Persian",translation:"TOOLBAR.PERSIAN",code:"fa",flag:"fa"},pl:{title:"Polish",translation:"TOOLBAR.POLISH",code:"pl",flag:"pl"},lv:{title:"Latvian",translation:"TOOLBAR.LATVIAN",code:"lv",flag:"lv"}},S.toggleSidenav=function(e){i(e).toggle()},S.logout=x,S.changeLanguage=function(e){if(!S.languages.hasOwnProperty(e.code)){return void l.show({template:'<md-toast id="language-message" layout="column" layout-align="center start"><div class="md-toast-content">Motion supports multiple translations through angular-translate module, but currently we do not support the selected language. If you want to help us, send us a message.</div></md-toast>',hideDelay:7e3,position:"top right",parent:"#content"})}S.selectedLanguage=e,u.put("motion.language",e.code),r.use(e.code),"app.callysquare.projects.edit"===n.current.name&&d.location.reload()},S.setUserStatus=function(e){S.userStatus=e},S.toggleHorizontalMobileMenu=function(){S.bodyEl.toggleClass("ms-navigation-horizontal-mobile-menu-active")},S.toggleMsNavigationFolded=function(){g.toggleFolded()},S.search=function(t){for(var e=[],n=g.getFlatNavigation(),a=o.defer(),i=0;i<n.length;i++)n[i].uisref&&e.push(n[i]);t&&(e=e.filter(function(e){if(-1<angular.lowercase(e.title).search(angular.lowercase(t)))return!0}));return s(function(){a.resolve(e)},1e3),a.promise},S.searchResultClick=function(e){e.uisref&&(e.stateParams?n.go(e.state,e.stateParams):n.go(e.state))},S.openSettings=function(e){t.$broadcast("webrtc::settings")},S.changePassword=O,S.isAgent=function(){return v.getCurrentUser()&&v.hasRole("agent")},S.onUserUpdate=function(e){if(e.id===S.user.id)if("agent"===e.role&&_.isBoolean(e.online)&&!e.online)if(0!==S.user.showWebBar){var t=c.confirm().title(r.instant("TOOLBAR.WARNING")+"!").textContent(r.instant("TOOLBAR.SOMEONE_LOGGED_YOU_OUT")).ariaLabel(r.instant("TOOLBAR.WARNING")+"!").ok(r.instant("TOOLBAR.STAY_LOGGED")).cancel("Logout");c.show(t).then(function(){v.queueLogin()}).catch(function(e){x(!0)}).finally(function(){_.merge(S.user,e),v.updateCurrentUser(S.user)})}else x(!0),_.merge(S.user,e),v.updateCurrentUser(S.user);else _.merge(S.user,e),v.updateCurrentUser(S.user)},S.onUserCalled=function(e){2===S.currentUser.showWebBar&&"agent"===S.currentUser.role&&S.currentUser.name===e.membername&&p.info({title:"WebRTC Popup",msg:"<div>              <span>Call from: "+e.calleridnum+"</span><br>              <span>Queue: "+e.queue+"</span><br>              <span>Extra: "+(e.extravar||"Not defined")+"</span><br>              </div>",showClose:!0,timeout:1e4,html:!0})},S.pause=function(e){return b.user.pause({id:S.user.id,type:e||"DEFAULT PAUSE"}).$promise.catch(function(e){p.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:PAUSEUSER",msg:e.status?JSON.stringify(e.data):e.toString()})})},S.unpause=function(){return b.user.unpause({id:S.user.id}).$promise.catch(function(e){p.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:UNPAUSEUSER",msg:e.status?JSON.stringify(e.data):e.toString()})})},S.preview=function(t){return S.disable=!0,b.cmHopper.getPreview().$promise.then(function(e){_.isNil(e)||_.isNil(e.Queue)||!e.Queue.dialActive?p.info({title:"PREVIEW",msg:"CAMPAIGN NOT ACTIVE"}):c.show({controller:"PreviewDialogController",controllerAs:"vm",templateUrl:"app/toolbar/preview/dialog.html",parent:angular.element(m.body),targetEvent:t,clickOutsideToClose:!0,locals:{preview:e}})}).catch(function(e){if(404===e.status)p.info({title:"PREVIEW",msg:"CONTACT NOT AVAILABLE"});else if(e.data&&e.data.errors&&e.data.errors.length){S.errors=e.data.errors||[{message:e.toString(),type:"api.openchannelMessage.accept"}];for(var t=0;t<e.data.errors.length;t+=1)p.error({title:e.data.errors[t].type,msg:e.data.errors[t].message})}else p.error({title:e.status?"API:"+e.status+" - "+e.statusText:"api.openchannelMessage.accept",msg:e.data?JSON.stringify(e.data.message):e.toString()})}).finally(function(){S.disable=!1})},S.getLogo=function(){return S.setting.defaultHeaderWhiteLabel?"xCALLY Motion":S.setting.headerWhiteLabel},S.userIsNotPhonebar=function(){return"admin"===S.currentUser.role||"user"===S.currentUser.role||"agent"===S.currentUser.role&&0!==S.currentUser.showWebBar},S.onInternalMessageSave=function(e){e.ToId!==S.currentUser.id||e.ChatGroupId||(S.unreadTotalMessages+=1);e.ToId===S.currentUser.id&&e.FromId!==S.currentUser.id&&!e.read&&e.ChatGroupId&&S.unreadTotalGroupMessages++},S.onInternalMessageUpdate=function(e){e.ToId===S.currentUser.id&&e.read&&0<S.unreadTotalMessages&&!e.ChatGroupId&&(S.unreadTotalMessages-=1);e.ToId===S.currentUser.id&&e.read&&e.ChatGroupId&&0<S.unreadTotalGroupMessages&&S.unreadTotalGroupMessages--},S.onUserVoiceQueue=function(e){_.toInteger(e.UserId)===v.getCurrentUser().id&&C()},S.onVoiceQueue=function(e){C()},h.connect(),h.on("user:update",S.onUserUpdate),h.on("user:called",S.onUserCalled),h.on("chatInternalMessage:save",S.onInternalMessageSave),h.on("chatInternalMessage:update",S.onInternalMessageUpdate),h.on("userVoiceQueue:save",S.onUserVoiceQueue),h.on("voiceQueue:save",S.onVoiceQueue),h.on("userVoiceQueue:remove",S.onUserVoiceQueue),h.on("voiceQueue:remove",S.onVoiceQueue),h.on("voiceQueue:update",S.onVoiceQueue),function(){S.user=v.getCurrentUser(),S.conf.ha1=S.user.md5secret,S.conf.id=S.user.id,S.conf.name=S.user.name,S.conf.fullname=S.user.fullname,S.conf.internal=S.user.internal,S.conf.recording=S.user.phoneBarEnableRecording,S.conf.autoAnswer=S.user.phoneBarAutoAnswer,S.conf.enableSettings=S.user.phoneBarEnableSettings,S.conf.enableDtmfTone=S.user.phoneBarEnableDtmfTone,S.conf.autoAnswerDelay=S.user.phoneBarAutoAnswerDelay,S.userStatus=S.userStatusOptions[0];var e=u.get("motion.language");e&&S.languages.hasOwnProperty(e)?S.selectedLanguage=S.languages[e]:S.selectedLanguage=S.languages[r.preferredLanguage()];if(b.pause.get({fields:"name",nolimit:!0}).$promise.then(function(e){S.pauses=e.rows?e.rows:[]}).catch(function(e){p.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETPAUSES",msg:e.status?JSON.stringify(e.data):e.toString()})}),S.setting.securePassword)if(S.user.passwordResetAt){var t=moment(S.user.passwordResetAt).add(S.setting.passwordExpiresDays||90,"day");moment().isAfter(t)?O(null,!0):moment().add(15,"day").isAfter(t)&&p.warning({title:r.instant("TOOLBAR.WARNING")+"!",msg:r.instant("TOOLBAR.PASSWORD_EXPIRE_REMAINING_DAYS")+": "+Math.ceil(t.diff(moment(),"days",!0)),timeout:2e4})}else O(null,!0)}(),C(),b.chatInternalMessage.get({fields:"FromId",ToId:S.currentUser.id,read:!1,nolimit:!0}).$promise.then(function(e){S.unreadTotalMessages=e.rows.length}),e.$on("$destroy",function(){h.removeAllListeners("user:called"),h.removeAllListeners("user:update"),h.removeAllListeners("chatInternalMessage:save"),h.removeAllListeners("chatInternalMessage:update"),h.removeAllListeners("userVoiceQueue:save"),h.removeAllListeners("voiceQueue:save"),h.removeAllListeners("userVoiceQueue:remove"),h.removeAllListeners("voiceQueue:remove"),h.removeAllListeners("voiceQueue:update"),y&&(E.cancel(y),y=null)})}e.$inject=["$scope","$rootScope","$q","$state","$timeout","$location","$mdSidenav","$translate","$mdToast","$window","$mdDialog","$document","$cookies","toasty","msNavigationService","Auth","socket","api","license","setting","$interval"],angular.module("app.toolbar").controller("ToolbarController",e)}();var urlParams=function(e){var t=new Object,n=e.lastIndexOf("?");if(0<n)for(var a=e.substring(n+1).split("&"),i=0;i<a.length;i++)0<(n=a[i].indexOf("="))&&(t[a[i].substring(0,n)]=a[i].substring(n+1));return t}(window.location.href),t0=new Date,MAX_REQUEST_SIZE=10485760,MAX_WIDTH=12e3,MAX_HEIGHT=12e3,EXPORT_URL="http://exp.draw.io/ImageExport2/export",SHARE_HOST="http://localhost:3000",SAVE_URL="api/square/projects/",VARIABLE_URL="/api/variables",STENCIL_PATH="/assets/plugins/square/stencils",SHAPES_PATH="/assets/plugins/square/shapes",IMAGE_PATH="/assets/plugins/square/images",STYLE_PATH="/assets/plugins/square/styles",CSS_PATH="/assets/plugins/square/styles",OPEN_FORM="api/square/projects/open",TEMPLATE_PATH="/assets/plugins/square/templates",RESOURCES_PATH="/assets/plugins/square/resources",RESOURCE_BASE=RESOURCES_PATH+"/grapheditor",tapAndHoldStartsConnection=!0,showConnectorImg=!0,mxLoadResources=!1,mxLanguages=["it","fr","ko","es","sv","ru","de","ja","zh-CN","zh-TW","nl","fi","da","pt-PT","no","hi","tr","fa"],mxLanguage="en",match=document.cookie.match(new RegExp("(^| )motion.language=([^;]+)"));match&&mxLanguages.includes(match[2])&&(mxLanguage=match[2]);var mxBasePath="assets/plugins/mxgraph",mxClient={VERSION:"2.0.0.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&navigator.userAgent.indexOf("MSIE")<0,IS_OP:0<=navigator.userAgent.indexOf("Opera/"),IS_OT:navigator.userAgent.indexOf("Presto/2.4.")<0&&navigator.userAgent.indexOf("Presto/2.3.")<0&&navigator.userAgent.indexOf("Presto/2.2.")<0&&navigator.userAgent.indexOf("Presto/2.1.")<0&&navigator.userAgent.indexOf("Presto/2.0.")<0&&navigator.userAgent.indexOf("Presto/1.")<0,IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&navigator.userAgent.indexOf("Chrome/")<0,IS_GC:0<=navigator.userAgent.indexOf("Chrome/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&navigator.userAgent.indexOf("Firefox/1.")<0&&navigator.userAgent.indexOf("Firefox/2.")<0||0<=navigator.userAgent.indexOf("Iceweasel/")&&navigator.userAgent.indexOf("Iceweasel/1.")<0&&navigator.userAgent.indexOf("Iceweasel/2.")<0||0<=navigator.userAgent.indexOf("SeaMonkey/")&&navigator.userAgent.indexOf("SeaMonkey/1.")<0||0<=navigator.userAgent.indexOf("Iceape/")&&navigator.userAgent.indexOf("Iceape/1.")<0,IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||0<=navigator.userAgent.indexOf("Epiphany/")||0<=navigator.userAgent.indexOf("AppleWebKit/")||0<=navigator.userAgent.indexOf("Gecko/")||0<=navigator.userAgent.indexOf("Opera/"),NO_FO:0<=navigator.userAgent.indexOf("Firefox/1.")||0<=navigator.userAgent.indexOf("Iceweasel/1.")||0<=navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/1.")||0<=navigator.userAgent.indexOf("Camino/1.")||0<=navigator.userAgent.indexOf("Epiphany/2.")||0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("MSIE")||0<=navigator.userAgent.indexOf("Mozilla/2."),IS_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_MAC:0<navigator.userAgent.toUpperCase().indexOf("MACINTOSH"),IS_TOUCH:0<navigator.userAgent.toUpperCase().indexOf("IPAD")||0<navigator.userAgent.toUpperCase().indexOf("IPOD")||0<navigator.userAgent.toUpperCase().indexOf("IPHONE")||0<navigator.userAgent.toUpperCase().indexOf("ANDROID"),IS_LOCAL:document.location.href.indexOf("http://")<0&&document.location.href.indexOf("https://")<0,isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(e,t,n){if(n=n||document,mxClient.IS_IE6)n.write('<link rel="'+e+'" href="'+t+'" charset="ISO-8859-1" type="text/css"/>');else{var a=n.createElement("link");a.setAttribute("rel",e),a.setAttribute("href",t),a.setAttribute("charset","ISO-8859-1"),a.setAttribute("type","text/css"),n.getElementsByTagName("head")[0].appendChild(a)}},include:function(e){document.write('<script src="'+e+'"><\/script>')},dispose:function(){for(var e=0;e<mxEvent.objects.length;e++)null!=mxEvent.objects[e].mxListenerList&&mxEvent.removeAllListeners(mxEvent.objects[e])}};if(mxClient.IS_OP&&mxClient.IS_OT?mxClient.CSS_PREFIX="O":mxClient.IS_SF||mxClient.IS_GC?mxClient.CSS_PREFIX="Webkit":mxClient.IS_MT?mxClient.CSS_PREFIX="Moz":mxClient.IS_IE&&9<=document.documentMode&&(mxClient.CSS_PREFIX="ms"),void 0===mxLoadResources&&(mxLoadResources=!0),"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt"),"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0),void 0!==mxBasePath&&0<mxBasePath.length?("/"==mxBasePath.substring(mxBasePath.length-1)&&(mxBasePath=mxBasePath.substring(0,mxBasePath.length-1)),mxClient.basePath=mxBasePath):mxClient.basePath=".","undefined"!=typeof mxImageBasePath&&0<mxImageBasePath.length?("/"==mxImageBasePath.substring(mxImageBasePath.length-1)&&(mxImageBasePath=mxImageBasePath.substring(0,mxImageBasePath.length-1)),mxClient.imageBasePath=mxImageBasePath):mxClient.imageBasePath=mxClient.basePath+"/images",mxClient.language=void 0!==mxLanguage?mxLanguage:mxClient.IS_IE?navigator.userLanguage:navigator.language,mxClient.defaultLanguage="undefined"!=typeof mxDefaultLanguage?mxDefaultLanguage:"en",mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/common.css"),void 0!==mxLanguages&&(mxClient.languages=mxLanguages),mxClient.IS_IE){if(9<=document.documentMode)mxClient.IS_VML=!1,mxClient.IS_SVG=!0;else{8==document.documentMode?(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml","#default#VML"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office","#default#VML")):(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office"));var ss=document.createStyleSheet();ss.cssText="v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}",mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/explorer.css")}window.attachEvent("onunload",mxClient.dispose)}var mxLog={consoleName:"Console",TRACE:!1,DEBUG:!0,WARN:!0,buffer:"",init:function(){if(null==mxLog.window&&null!=document.body){var e=mxLog.consoleName+" - mxGraph "+mxClient.VERSION,t=document.createElement("table");t.setAttribute("width","100%"),t.setAttribute("height","100%");var n=document.createElement("tbody"),a=document.createElement("tr"),i=document.createElement("td");if(i.style.verticalAlign="top",mxLog.textarea=document.createElement("textarea"),mxLog.textarea.setAttribute("readOnly","true"),mxLog.textarea.style.height="100%",mxLog.textarea.style.resize="none",mxLog.textarea.value=mxLog.buffer,mxLog.textarea.style.width=mxClient.IS_NS&&"BackCompat"!=document.compatMode?"99%":"100%",i.appendChild(mxLog.textarea),a.appendChild(i),n.appendChild(a),a=document.createElement("tr"),mxLog.td=document.createElement("td"),mxLog.td.style.verticalAlign="top",mxLog.td.setAttribute("height","30px"),a.appendChild(mxLog.td),n.appendChild(a),t.appendChild(n),mxLog.addButton("Info",function(e){mxLog.info()}),mxLog.addButton("DOM",function(e){e=mxUtils.getInnerHtml(document.body),mxLog.debug(e)}),mxLog.addButton("Trace",function(e){mxLog.TRACE=!mxLog.TRACE,mxLog.TRACE?mxLog.debug("Tracing enabled"):mxLog.debug("Tracing disabled")}),mxLog.addButton("Copy",function(e){try{mxUtils.copy(mxLog.textarea.value)}catch(e){mxUtils.alert(e)}}),mxLog.addButton("Show",function(e){try{mxUtils.popup(mxLog.textarea.value)}catch(e){mxUtils.alert(e)}}),mxLog.addButton("Clear",function(e){mxLog.textarea.value=""}),a=n=0,"number"==typeof window.innerWidth?(n=window.innerHeight,a=window.innerWidth):(n=document.documentElement.clientHeight||document.body.clientHeight,a=document.body.clientWidth),mxLog.window=new mxWindow(e,t,Math.max(0,a-320),Math.max(0,n-210),300,160),mxLog.window.setMaximizable(!0),mxLog.window.setScrollable(!1),mxLog.window.setResizable(!0),mxLog.window.setClosable(!0),mxLog.window.destroyOnClose=!1,(mxClient.IS_NS||mxClient.IS_IE)&&!mxClient.IS_GC&&!mxClient.IS_SF&&"BackCompat"!=document.compatMode){var o=mxLog.window.getElement();e=function(e,t){mxLog.textarea.style.height=Math.max(0,o.offsetHeight-70)+"px"};mxLog.window.addListener(mxEvent.RESIZE_END,e),mxLog.window.addListener(mxEvent.MAXIMIZE,e),mxLog.window.addListener(mxEvent.NORMALIZE,e),mxLog.textarea.style.height="92px"}}},info:function(){mxLog.writeln(mxUtils.toString(navigator))},addButton:function(e,t){var n=document.createElement("button");mxUtils.write(n,e),mxEvent.addListener(n,"click",t),mxLog.td.appendChild(n)},isVisible:function(){return null!=mxLog.window&&mxLog.window.isVisible()},show:function(){mxLog.setVisible(!0)},setVisible:function(e){null==mxLog.window&&mxLog.init(),null!=mxLog.window&&mxLog.window.setVisible(e)},enter:function(e){if(mxLog.TRACE)return mxLog.writeln("Entering "+e),(new Date).getTime()},leave:function(e,t){if(mxLog.TRACE){var n=0!=t?" ("+((new Date).getTime()-t)+" ms)":"";mxLog.writeln("Leaving "+e+n)}},debug:function(){mxLog.DEBUG&&mxLog.writeln.apply(this,arguments)},warn:function(){mxLog.WARN&&mxLog.writeln.apply(this,arguments)},write:function(){for(var e="",t=0;t<arguments.length;t++)e+=arguments[t],t<arguments.length-1&&(e+=" ");null!=mxLog.textarea?(mxLog.textarea.value+=e,0<=navigator.userAgent.indexOf("Presto/2.5")&&(mxLog.textarea.style.visibility="hidden",mxLog.textarea.style.visibility="visible"),mxLog.textarea.scrollTop=mxLog.textarea.scrollHeight):mxLog.buffer+=e},writeln:function(){for(var e="",t=0;t<arguments.length;t++)e+=arguments[t],t<arguments.length-1&&(e+=" ");mxLog.write(e+"\n")}},mxObjectIdentity={FIELD_NAME:"mxObjectId",counter:0,get:function(e){if("object"==typeof e&&null==e[mxObjectIdentity.FIELD_NAME]){var t=mxUtils.getFunctionName(e.constructor);e[mxObjectIdentity.FIELD_NAME]=t+"#"+mxObjectIdentity.counter++}return e[mxObjectIdentity.FIELD_NAME]},clear:function(e){"object"==typeof e&&delete e[mxObjectIdentity.FIELD_NAME]}};function mxDictionary(){this.clear()}mxDictionary.prototype.map=null,mxDictionary.prototype.clear=function(){this.map={}},mxDictionary.prototype.get=function(e){return e=mxObjectIdentity.get(e),this.map[e]},mxDictionary.prototype.put=function(e,t){var n=mxObjectIdentity.get(e),a=this.map[n];return this.map[n]=t,a},mxDictionary.prototype.remove=function(e){e=mxObjectIdentity.get(e);var t=this.map[e];return delete this.map[e],t},mxDictionary.prototype.getKeys=function(){var e,t=[];for(e in this.map)t.push(e);return t},mxDictionary.prototype.getValues=function(){var e,t=[];for(e in this.map)t.push(this.map[e]);return t},mxDictionary.prototype.visit=function(e){for(var t in this.map)e(t,this.map[t])};var mxResources={resources:[],extension:mxResourceExtension,resourcesEncoded:!1,loadDefaultBundle:!0,loadSpecialBundle:!0,isLanguageSupported:function(e){return null==mxClient.languages||0<=mxUtils.indexOf(mxClient.languages,e)},getDefaultBundle:function(e,t){return mxResources.loadDefaultBundle||!mxResources.isLanguageSupported(t)?e+mxResources.extension:null},getSpecialBundle:function(e,t){if(null==mxClient.languages||!this.isLanguageSupported(t)){var n=t.indexOf("-");0<n&&(t=t.substring(0,n))}return mxResources.loadSpecialBundle&&mxResources.isLanguageSupported(t)&&t!=mxClient.defaultLanguage?e+"_"+t+mxResources.extension:null},add:function(e,t){if((t=null!=t?t:mxClient.language.toLowerCase())!=mxConstants.NONE){var n=mxResources.getDefaultBundle(e,t);if(null!=n)try{var a=mxUtils.load(n);a.isReady()&&mxResources.parse(a.getText())}catch(e){}if(null!=(n=mxResources.getSpecialBundle(e,t)))try{(a=mxUtils.load(n)).isReady()&&mxResources.parse(a.getText())}catch(e){}}},parse:function(e){if(null!=e){e=e.split("\n");for(var t=0;t<e.length;t++)if("#"!=e[t].charAt(0)){var n=e[t].indexOf("=");if(0<n){var a=e[t].substring(0,n),i=e[t].length;13==e[t].charCodeAt(i-1)&&i--,n=e[t].substring(n+1,i),this.resourcesEncoded?(n=n.replace(/\\(?=u[a-fA-F\d]{4})/g,"%"),mxResources.resources[a]=unescape(n)):mxResources.resources[a]=n}}}},get:function(e,t,n){if(null==(e=mxResources.resources[e])&&(e=n),null!=e&&null!=t){n=[];for(var a=null,i=0;i<e.length;i++){var o=e.charAt(i);"{"==o?a="":null!=a&&"}"==o?(0<=(a=parseInt(a)-1)&&a<t.length&&n.push(t[a]),a=null):null!=a?a+=o:n.push(o)}e=n.join("")}return e}};function mxPoint(e,t){this.x=null!=e?e:0,this.y=null!=t?t:0}function mxRectangle(e,t,n,a){mxPoint.call(this,e,t),this.width=null!=n?n:0,this.height=null!=a?a:0}mxPoint.prototype.x=null,mxPoint.prototype.y=null,mxPoint.prototype.equals=function(e){return e.x==this.x&&e.y==this.y},mxPoint.prototype.clone=function(){return mxUtils.clone(this)},mxRectangle.prototype=new mxPoint,mxRectangle.prototype.constructor=mxRectangle,mxRectangle.prototype.width=null,mxRectangle.prototype.height=null,mxRectangle.prototype.setRect=function(e,t,n,a){this.x=e,this.y=t,this.width=n,this.height=a},mxRectangle.prototype.getCenterX=function(){return this.x+this.width/2},mxRectangle.prototype.getCenterY=function(){return this.y+this.height/2},mxRectangle.prototype.add=function(e){if(null!=e){var t=Math.min(this.x,e.x),n=Math.min(this.y,e.y),a=Math.max(this.x+this.width,e.x+e.width);e=Math.max(this.y+this.height,e.y+e.height),this.x=t,this.y=n,this.width=a-t,this.height=e-n}},mxRectangle.prototype.grow=function(e){this.x-=e,this.y-=e,this.width+=2*e,this.height+=2*e},mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)},mxRectangle.prototype.equals=function(e){return e.x==this.x&&e.y==this.y&&e.width==this.width&&e.height==this.height};var mxEffects={animateChanges:function(l,d,c){var m=0,u=function(){for(var e=!1,t=0;t<d.length;t++){var n=d[t];if(n instanceof mxGeometryChange||n instanceof mxTerminalChange||n instanceof mxValueChange||n instanceof mxChildChange||n instanceof mxStyleChange){var a=l.getView().getState(n.cell||n.child,!1);if(null!=a)if(e=!0,n.constructor!=mxGeometryChange||l.model.isEdge(n.cell))mxUtils.setOpacity(a.shape.node,100*m/10);else{var i=l.getView().scale,o=(n.geometry.x-n.previous.x)*i,s=(n.geometry.y-n.previous.y)*i,r=(n.geometry.width-n.previous.width)*i;i=(n.geometry.height-n.previous.height)*i;0==m?(a.x-=o,a.y-=s,a.width-=r,a.height-=i):(a.x+=o/10,a.y+=s/10,a.width+=r/10,a.height+=i/10),l.cellRenderer.redraw(a),mxEffects.cascadeOpacity(l,n.cell,100*m/10)}}}m<10&&e?(m++,window.setTimeout(u,p)):null!=c&&c()},p=30;u()},cascadeOpacity:function(e,t,n){for(var a=e.model.getChildCount(t),i=0;i<a;i++){var o=e.model.getChildAt(t,i),s=e.getView().getState(o);null!=s&&(mxUtils.setOpacity(s.shape.node,n),mxEffects.cascadeOpacity(e,o,n))}if(null!=(t=e.model.getEdges(t)))for(i=0;i<t.length;i++)null!=(a=e.getView().getState(t[i]))&&mxUtils.setOpacity(a.shape.node,n)},fadeOut:function(e,t,n,a,i,o){a=a||40,i=i||30;var s=t||100;if(mxUtils.setOpacity(e,s),o||null==o){var r=function(){s=Math.max(s-a,0),mxUtils.setOpacity(e,s),0<s?window.setTimeout(r,i):(e.style.visibility="hidden",n&&e.parentNode&&e.parentNode.removeChild(e))};window.setTimeout(r,i)}else e.style.visibility="hidden",n&&e.parentNode&&e.parentNode.removeChild(e)}},mxUtils={errorResource:"none"!=mxClient.language?"error":"",closeResource:"none"!=mxClient.language?"close":"",errorImage:mxClient.imageBasePath+"/error.gif",removeCursors:function(e){if(null!=e.style&&(e.style.cursor=""),null!=(e=e.childNodes))for(var t=e.length,n=0;n<t;n+=1)mxUtils.removeCursors(e[n])},getCurrentStyle:mxClient.IS_IE?function(e){return null!=e?e.currentStyle:null}:function(e){return null!=e?window.getComputedStyle(e,""):null},hasScrollbars:function(e){return null!=(e=mxUtils.getCurrentStyle(e))&&("scroll"==e.overflow||"auto"==e.overflow)},bind:function(e,t){return function(){return t.apply(e,arguments)}},eval:function(a){var b=null;if(0<=a.indexOf("function"))try{eval("var _mxJavaScriptExpression="+a),b=_mxJavaScriptExpression,_mxJavaScriptExpression=null}catch(e){mxLog.warn(e.message+" while evaluating "+a)}else try{b=eval(a)}catch(e){mxLog.warn(e.message+" while evaluating "+a)}return b},findNode:function(e,t,n){var a=e.getAttribute(t);if(null!=a&&a==n)return e;for(e=e.firstChild;null!=e;){if(null!=(a=mxUtils.findNode(e,t,n)))return a;e=e.nextSibling}return null},findNodeByAttribute:9<=document.documentMode?function(e,t,n){var a=null;if(null!=e)if(e.nodeType==mxConstants.NODETYPE_ELEMENT&&e.getAttribute(t)==n)a=e;else for(e=e.firstChild;null!=e&&null==a;)a=mxUtils.findNodeByAttribute(e,t,n),e=e.nextSibling;return a}:mxClient.IS_IE?function(e,t,n){return null==e?null:e.ownerDocument.selectSingleNode("//*[@"+t+"='"+n+"']")}:function(e,t,n){return null==e?null:e.ownerDocument.evaluate("//*[@"+t+"='"+n+"']",e.ownerDocument,null,XPathResult.ANY_TYPE,null).iterateNext()},getFunctionName:function(e){var t=null;if(null!=e)if(null!=e.name)t=e.name;else{for(e=e.toString(),t=9;" "==e.charAt(t);)t++;var n=e.indexOf("(",t);t=e.substring(t,n)}return t},indexOf:function(e,t){if(null!=e&&null!=t)for(var n=0;n<e.length;n++)if(e[n]==t)return n;return-1},remove:function(e,t){var n=null;if("object"==typeof t)for(var a=mxUtils.indexOf(t,e);0<=a;)t.splice(a,1),n=e,a=mxUtils.indexOf(t,e);for(var i in t)t[i]==e&&(delete t[i],n=e);return n},isNode:function(e,t,n,a){return!(null==e||isNaN(e.nodeType)||null!=t&&e.nodeName.toLowerCase()!=t.toLowerCase())&&(null==n||e.getAttribute(n)==a)},getChildNodes:function(e,t){t=t||mxConstants.NODETYPE_ELEMENT;for(var n=[],a=e.firstChild;null!=a;)a.nodeType==t&&n.push(a),a=a.nextSibling;return n},createXmlDocument:function(){var e=null;return document.implementation&&document.implementation.createDocument?e=document.implementation.createDocument("","",null):window.ActiveXObject&&(e=new ActiveXObject("Microsoft.XMLDOM")),e},parseXml:mxClient.IS_IE&&(void 0===document.documentMode||document.documentMode<9)?function(e){var t=mxUtils.createXmlDocument();return t.async="false",t.loadXML(e),t}:function(e){return(new DOMParser).parseFromString(e,"text/xml")},clearSelection:document.selection?function(){document.selection.empty()}:window.getSelection?function(){window.getSelection().removeAllRanges()}:void 0,getPrettyXml:function(e,t,n){var a=[];if(null!=e)if(t=t||"  ",n=n||"",e.nodeType==mxConstants.NODETYPE_TEXT)a.push(e.nodeValue);else{a.push(n+"<"+e.nodeName);var i=e.attributes;if(null!=i)for(var o=0;o<i.length;o++){var s=mxUtils.htmlEntities(i[o].nodeValue);a.push(" "+i[o].nodeName+'="'+s+'"')}if(null!=(i=e.firstChild)){for(a.push(">\n");null!=i;)a.push(mxUtils.getPrettyXml(i,t,n+t)),i=i.nextSibling;a.push(n+"</"+e.nodeName+">\n")}else a.push("/>\n")}return a.join("")},removeWhitespace:function(e,t){for(var n=t?e.previousSibling:e.nextSibling;null!=n&&n.nodeType==mxConstants.NODETYPE_TEXT;){var a=t?n.previousSibling:n.nextSibling,i=mxUtils.getTextContent(n);0==mxUtils.trim(i).length&&n.parentNode.removeChild(n),n=a}},htmlEntities:function(e,t){return e=(e=(e=(e=(e=(e||"").replace(/&/g,"&amp;")).replace(/"/g,"&quot;")).replace(/\'/g,"&#39;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;"),(null==t||t)&&(e=e.replace(/\n/g,"&#xa;")),e},isVml:function(e){return null!=e&&"urn:schemas-microsoft-com:vml"==e.tagUrn},getXml:function(e,t){var n="";return null!=e&&(n=null==(n=e.xml)?e.innerHTML?e.innerHTML:(new XMLSerializer).serializeToString(e):n.replace(/\r\n\t[\t]*/g,"").replace(/>\r\n/g,">").replace(/\r\n/g,"\n")),n.replace(/\n/g,t||"&#xa;")},getTextContent:function(e){var t="";return null!=e&&(null!=e.firstChild&&(e=e.firstChild),t=e.nodeValue||""),t},getInnerHtml:mxClient.IS_IE?function(e){return null!=e?e.innerHTML:""}:function(e){return null!=e?(new XMLSerializer).serializeToString(e):""},getOuterHtml:mxClient.IS_IE?function(e){if(null!=e){if(null!=e.outerHTML)return e.outerHTML;var t=[];t.push("<"+e.nodeName);var n=e.attributes;if(null!=n)for(var a=0;a<n.length;a++){var i=n[a].nodeValue;null!=i&&0<i.length&&(t.push(" "),t.push(n[a].nodeName),t.push('="'),t.push(i),t.push('"'))}return 0==e.innerHTML.length?t.push("/>"):(t.push(">"),t.push(e.innerHTML),t.push("</"+e.nodeName+">")),t.join("")}return""}:function(e){return null!=e?(new XMLSerializer).serializeToString(e):""},write:function(e,t){var n=e.ownerDocument.createTextNode(t);return null!=e&&e.appendChild(n),n},writeln:function(e,t){var n=e.ownerDocument.createTextNode(t);return null!=e&&(e.appendChild(n),e.appendChild(document.createElement("br"))),n},br:function(e,t){t=t||1;for(var n=null,a=0;a<t;a++)null!=e&&(n=e.ownerDocument.createElement("br"),e.appendChild(n));return n},button:function(e,t,n){return n=(n=null!=n?n:document).createElement("button"),mxUtils.write(n,e),mxEvent.addListener(n,"click",function(e){t(e)}),n},para:function(e,t){var n=document.createElement("p");return mxUtils.write(n,t),null!=e&&e.appendChild(n),n},addTransparentBackgroundFilter:function(e){e.style.filter+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mxClient.imageBasePath+"/transparent.gif', sizingMethod='scale')"},linkAction:function(e,t,n,a,i){return mxUtils.link(e,t,function(){n.execute(a)},i)},linkInvoke:function(e,t,n,a,i,o){return mxUtils.link(e,t,function(){n[a](i)},o)},link:function(e,t,n,a){var i=document.createElement("span");return i.style.color="blue",i.style.textDecoration="underline",i.style.cursor="pointer",null!=a&&(i.style.paddingLeft=a+"px"),mxEvent.addListener(i,"click",n),mxUtils.write(i,t),null!=e&&e.appendChild(i),i},fit:function(e){var t=parseInt(e.offsetLeft),n=parseInt(e.offsetWidth),a=document.body,i=document.documentElement,o=(a.scrollLeft||i.scrollLeft)+(a.clientWidth||i.clientWidth);o<t+n&&(e.style.left=Math.max(a.scrollLeft||i.scrollLeft,o-n)+"px"),t=parseInt(e.offsetTop),n=parseInt(e.offsetHeight),(o=(a.scrollTop||i.scrollTop)+Math.max(a.clientHeight||0,i.clientHeight))<t+n&&(e.style.top=Math.max(a.scrollTop||i.scrollTop,o-n)+"px")},open:function(e){if(mxClient.IS_NS){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")}catch(e){return mxUtils.alert("Permission to read file denied."),""}var t=Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);return t.initWithPath(e),t.exists()?((e=Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream)).init(t,1,4,null),(t=Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance(Components.interfaces.nsIScriptableInputStream)).init(e),t.read(t.available())):(mxUtils.alert("File not found."),"")}return e=(t=new ActiveXObject("Scripting.FileSystemObject").OpenTextFile(e,1)).readAll(),t.close(),e},save:function(e,t){if(mxClient.IS_NS){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")}catch(e){return void mxUtils.alert("Permission to write file denied.")}var n=Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);n.initWithPath(e),n.exists()||n.create(0,420);var a=Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);a.init(n,34,4,null),a.write(t,t.length),a.flush(),a.close()}else(n=new ActiveXObject("Scripting.FileSystemObject").CreateTextFile(e,!0)).Write(t),n.Close()},saveAs:function(e){var t=document.createElement("iframe");t.setAttribute("src",""),t.style.visibility="hidden",document.body.appendChild(t);try{if(mxClient.IS_NS){var n=t.contentDocument;n.open(),n.write(e),n.close();try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"),t.focus(),saveDocument(n)}catch(e){mxUtils.alert("Permission to save document denied.")}}else(n=t.contentWindow.document).write(e),n.execCommand("SaveAs",!1,document.location)}finally{document.body.removeChild(t)}},copy:function(e){if(window.clipboardData)window.clipboardData.setData("Text",e);else{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");var t=Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);if(t){var n=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);if(n){n.addDataFlavor("text/unicode");var a=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);a.data=e,n.setTransferData("text/unicode",a,2*e.length),t.setData(n,null,Components.interfaces.nsIClipboard.kGlobalClipboard)}}}},load:function(e){return(e=new mxXmlRequest(e,null,"GET",!1)).send(),e},get:function(e,t,n){return new mxXmlRequest(e,null,"GET").send(t,n)},post:function(e,t,n,a){return new mxXmlRequest(e,t).send(n,a)},submit:function(e,t,n,a){return new mxXmlRequest(e,t).simulate(n,a)},loadInto:function(e,t,n){mxClient.IS_IE?t.onreadystatechange=function(){4==t.readyState&&n()}:t.addEventListener("load",n,!1),t.load(e)},getValue:function(e,t,n){return null==(e=null!=e?e[t]:null)&&(e=n),e},getNumber:function(e,t,n){return null==(e=null!=e?e[t]:null)&&(e=n||0),Number(e)},getColor:function(e,t,n){return null==(e=null!=e?e[t]:null)?e=n:e==mxConstants.NONE&&(e=null),e},clone:function(e,t,n){n=null!=n&&n;var a=null;if(null!=e&&"function"==typeof e.constructor){var i;a=new e.constructor;for(i in e)i!=mxObjectIdentity.FIELD_NAME&&(null==t||mxUtils.indexOf(t,i)<0)&&(a[i]=n||"object"!=typeof e[i]?e[i]:mxUtils.clone(e[i]))}return a},equalPoints:function(e,t){if(null==e&&null!=t||null!=e&&null==t||null!=e&&null!=t&&e.length!=t.length)return!1;if(null!=e&&null!=t)for(var n=0;n<e.length;n++)if(e[n]==t[n]||null!=e[n]&&!e[n].equals(t[n]))return!1;return!0},equalEntries:function(e,t){if(null==e&&null!=t||null!=e&&null==t||null!=e&&null!=t&&e.length!=t.length)return!1;if(null!=e&&null!=t)for(var n in e)if(e[n]!=t[n])return!1;return!0},extend:function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},toString:function(e){var t,n="";for(t in e)try{if(null==e[t])n+=t+" = [null]\n";else if("function"==typeof e[t])n+=t+" => [Function]\n";else if("object"==typeof e[t])n=n+(t+" => [")+mxUtils.getFunctionName(e[t].constructor)+"]\n";else n+=t+" = "+e[t]+"\n"}catch(e){n+=t+"="+e.message}return n},toRadians:function(e){return Math.PI*e/180},arcToCurves:function(e,t,n,a,i,o,s,r,l){if(r-=e,l-=t,0===n||0===a)return h;n=Math.abs(n),a=Math.abs(a);var d=-r/2,c=-l/2,m=Math.cos(i*Math.PI/180);i=m*d+(h=Math.sin(i*Math.PI/180))*c;d=-1*h*d+m*c;1<(v=(c=i*i)/(g=n*n)+(p=d*d)/(A=a*a))?(n*=Math.sqrt(v),a*=Math.sqrt(v),o=0):(v=1,o===s&&(v=-1),o=v*Math.sqrt((g*A-g*p-A*c)/(g*p+A*c))),r=m*(c=o*n*d/a)-h*(p=-1*o*a*i/n)+r/2,l=h*c+m*p+l/2,o=0<=(g=Math.atan2((d-p)/a,(i-c)/n)-Math.atan2(0,1))?g:2*Math.PI+g,i=0<=(g=Math.atan2((-d-p)/a,(-i-c)/n)-Math.atan2((d-p)/a,(i-c)/n))?g:2*Math.PI+g,0==s&&0<i?i-=2*Math.PI:0!=s&&i<0&&(i+=2*Math.PI),s=2*i/Math.PI,i/=s=Math.ceil(s<0?-1*s:s),d=8/3*Math.sin(i/4)*Math.sin(i/4)/Math.sin(i/2),c=m*n,m*=a,n*=h,a*=h;for(var u=Math.cos(o),p=-d*(c*(f=Math.sin(o))+a*u),g=-d*(n*f-m*u),v=A=0,h=[],b=0;b<s;++b){o+=i;var f,A=c*(u=Math.cos(o))-a*(f=Math.sin(o))+r,E=(v=n*u+m*f+l,-d*(c*f+a*u));u=-d*(n*f-m*u);h[f=6*b]=Number(p+e),h[f+1]=Number(g+t),h[f+2]=Number(A-E+e),h[f+3]=Number(v-u+t),h[f+4]=Number(A+e),h[f+5]=Number(v+t),p=A+E,g=v+u}return h},getBoundingBox:function(e,t){var n=null;if(null!=e&&null!=t&&0!=t){var a=mxUtils.toRadians(t),i=(n=Math.cos(a),Math.sin(a)),o=new mxPoint(e.x+e.width/2,e.y+e.height/2),s=new mxPoint(e.x,e.y),r=new mxPoint((a=new mxPoint(e.x+e.width,e.y)).x,e.y+e.height),l=new mxPoint(e.x,r.y);s=mxUtils.getRotatedPoint(s,n,i,o),a=mxUtils.getRotatedPoint(a,n,i,o),r=mxUtils.getRotatedPoint(r,n,i,o),l=mxUtils.getRotatedPoint(l,n,i,o);(n=new mxRectangle(s.x,s.y,0,0)).add(new mxRectangle(a.x,a.y,0,0)),n.add(new mxRectangle(r.x,r.y,0,0)),n.add(new mxRectangle(l.x,l.y,0,0))}return n},getRotatedPoint:function(e,t,n,a){a=null!=a?a:new mxPoint;var i=e.x-a.x;return new mxPoint(i*t-(e=e.y-a.y)*n+a.x,e*t+i*n+a.y)},getPortConstraints:function(e,t,n,a){return null==(e=mxUtils.getValue(e.style,mxConstants.STYLE_PORT_CONSTRAINT,null))?a:(a=e.toString(),e=mxConstants.DIRECTION_MASK_NONE,0<=a.indexOf(mxConstants.DIRECTION_NORTH)&&(e|=mxConstants.DIRECTION_MASK_NORTH),0<=a.indexOf(mxConstants.DIRECTION_WEST)&&(e|=mxConstants.DIRECTION_MASK_WEST),0<=a.indexOf(mxConstants.DIRECTION_SOUTH)&&(e|=mxConstants.DIRECTION_MASK_SOUTH),0<=a.indexOf(mxConstants.DIRECTION_EAST)&&(e|=mxConstants.DIRECTION_MASK_EAST),e)},reversePortConstraints:function(e){return(e&mxConstants.DIRECTION_MASK_WEST)<<3|(e&mxConstants.DIRECTION_MASK_NORTH)<<1|(e&mxConstants.DIRECTION_MASK_SOUTH)>>1|(e&mxConstants.DIRECTION_MASK_EAST)>>3},findNearestSegment:function(e,t,n){var a=-1;if(0<e.absolutePoints.length)for(var i=e.absolutePoints[0],o=null,s=1;s<e.absolutePoints.length;s++){var r=e.absolutePoints[s];i=mxUtils.ptSegDistSq(i.x,i.y,r.x,r.y,t,n);(null==o||i<o)&&(o=i,a=s-1),i=r}return a},rectangleIntersectsSegment:function(e,t,n){var a=e.y,i=e.x,o=a+e.height,s=i+e.width;e=t.x;var r=n.x;if(t.x>n.x&&(e=n.x,r=t.x),s<r&&(r=s),e<i&&(e=i),r<e)return!1;i=t.y,s=n.y;var l=n.x-t.x;return 1e-7<Math.abs(l)&&(i=(n=(n.y-t.y)/l)*e+(t=t.y-n*t.x),s=n*r+t),s<i&&(t=s,s=i,i=t),o<s&&(s=o),i<a&&(i=a),!(s<i)},contains:function(e,t,n){return e.x<=t&&e.x+e.width>=t&&e.y<=n&&e.y+e.height>=n},intersects:function(e,t){var n=e.width,a=e.height,i=t.width,o=t.height;if(i<=0||o<=0||n<=0||a<=0)return!1;var s=e.x,r=e.y,l=t.x,d=t.y;o+=d,n+=s,a+=r;return((i=i+l)<l||s<i)&&(o<d||r<o)&&(n<s||l<n)&&(a<r||d<a)},intersectsHotspot:function(e,t,n,a,i,o){if(i=null!=i?i:0,o=null!=o?o:0,0<(a=null!=a?a:1)){var s=e.getCenterX(),r=e.getCenterY(),l=e.width,d=e.height,c=mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE)*e.view.scale;return 0<c&&(mxUtils.getValue(e.style,mxConstants.STYLE_HORIZONTAL,!0)?(r=e.y+c/2,d=c):(s=e.x+c/2,l=c)),l=Math.max(i,l*a),d=Math.max(i,d*a),0<o&&(l=Math.min(l,o),d=Math.min(d,o)),a=new mxRectangle(s-l/2,r-d/2,l,d),0!=(s=mxUtils.toRadians(mxUtils.getValue(e.style,mxConstants.STYLE_ROTATION)||0))&&(i=Math.cos(-s),o=Math.sin(-s),s=new mxPoint(e.getCenterX(),e.getCenterY()),t=(e=mxUtils.getRotatedPoint(new mxPoint(t,n),i,o,s)).x,n=e.y),mxUtils.contains(a,t,n)}return!0},getOffset:function(e,t){var n=0,a=0;if(null!=t&&t){var i=document.body,o=document.documentElement;n=n+(i.scrollLeft||o.scrollLeft),a=a+(i.scrollTop||o.scrollTop)}for(;e.offsetParent;)n+=e.offsetLeft,a+=e.offsetTop,e=e.offsetParent;return new mxPoint(n,a)},getScrollOrigin:function(e){for(var t=document.body,n=document.documentElement,a=new mxPoint(t.scrollLeft||n.scrollLeft,t.scrollTop||n.scrollTop);null!=e&&e!=t&&e!=n;)!isNaN(e.scrollLeft)&&!isNaN(e.scrollTop)&&(a.x+=e.scrollLeft,a.y+=e.scrollTop),e=e.parentNode;return a},convertPoint:function(e,t,n){var a=mxUtils.getScrollOrigin(e);return(e=mxUtils.getOffset(e)).x-=a.x,e.y-=a.y,new mxPoint(t-e.x,n-e.y)},ltrim:function(e,t){return e.replace(RegExp("^["+(t||"\\s")+"]+","g"),"")},rtrim:function(e,t){return e.replace(RegExp("["+(t||"\\s")+"]+$","g"),"")},trim:function(e,t){return mxUtils.ltrim(mxUtils.rtrim(e,t),t)},isNumeric:function(e){return null!=e&&(null==e.length||0<e.length&&e.indexOf("0x")<0&&e.indexOf("0X")<0)&&!isNaN(e)},mod:function(e,t){return(e%t+t)%t},intersection:function(e,t,n,a,i,o,s,r){var l=(r-o)*(n-e)-(s-i)*(a-t);return s=((s-i)*(t-o)-(r-o)*(e-i))/l,i=((n-e)*(t-o)-(a-t)*(e-i))/l,0<=s&&s<=1&&0<=i&&i<=1?new mxPoint(e+s*(n-e),t+s*(a-t)):null},ptSegDistSq:function(e,t,n,a,i,o){return(i-=e)*(n-=e)+(o-=t)*(a-=t)<=0?n=0:n=(e=(i=n-i)*n+(o=a-o)*a)<=0?0:e*e/(n*n+a*a),(i=i*i+o*o-n)<0&&(i=0),i},relativeCcw:function(e,t,n,a,i,o){return 0==(e=(i-=e)*(a-=t)-(o-=t)*(n-=e))&&(0<(e=i*n+o*a)&&((e=(i-n)*n+(o-a)*a)<0&&(e=0))),e<0?-1:0<e?1:0},animateChanges:function(e,t){mxEffects.animateChanges.apply(this,arguments)},cascadeOpacity:function(e,t,n){mxEffects.cascadeOpacity.apply(this,arguments)},fadeOut:function(e,t,n,a,i,o){mxEffects.fadeOut.apply(this,arguments)},setOpacity:function(e,t){mxUtils.isVml(e)?e.style.filter=100<=t?null:"alpha(opacity="+t/5+")":mxClient.IS_IE&&(void 0===document.documentMode||document.documentMode<9)?e.style.filter=100<=t?null:"alpha(opacity="+t+")":e.style.opacity=t/100},createImage:function(e){var t=null;return mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?((t=document.createElement(mxClient.VML_PREFIX+":image")).setAttribute("src",e),t.style.borderStyle="none"):((t=document.createElement("img")).setAttribute("src",e),t.setAttribute("border","0")),t},sortCells:function(e,i){i=null==i||i;var o=new mxDictionary;return e.sort(function(e,t){var n=o.get(e);null==n&&(n=mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR),o.put(e,n));var a=o.get(t);return null==a&&(a=mxCellPath.create(t).split(mxCellPath.PATH_SEPARATOR),o.put(t,a)),0==(n=mxCellPath.compare(n,a))?0:0<n==i?1:-1}),e},getStylename:function(e){return null!=e&&(e=e.split(";")[0]).indexOf("=")<0?e:""},getStylenames:function(e){var t=[];if(null!=e){e=e.split(";");for(var n=0;n<e.length;n++)e[n].indexOf("=")<0&&t.push(e[n])}return t},indexOfStylename:function(e,t){if(null!=e&&null!=t)for(var n=e.split(";"),a=0,i=0;i<n.length;i++){if(n[i]==t)return a;a+=n[i].length+1}return-1},addStylename:function(e,t){return mxUtils.indexOfStylename(e,t)<0&&(null==e?e="":0<e.length&&";"!=e.charAt(e.length-1)&&(e+=";"),e+=t),e},removeStylename:function(e,t){var n=[];if(null!=e)for(var a=e.split(";"),i=0;i<a.length;i++)a[i]!=t&&n.push(a[i]);return n.join(";")},removeAllStylenames:function(e){var t=[];if(null!=e){e=e.split(";");for(var n=0;n<e.length;n++)0<=e[n].indexOf("=")&&t.push(e[n])}return t.join(";")},setCellStyles:function(e,t,n,a){if(null!=t&&0<t.length){e.beginUpdate();try{for(var i=0;i<t.length;i++)if(null!=t[i]){var o=mxUtils.setStyle(e.getStyle(t[i]),n,a);e.setStyle(t[i],o)}}finally{e.endUpdate()}}},setStyle:function(e,t,n){var a=null!=n&&(void 0===n.length||0<n.length);if(null==e||0==e.length)a&&(e=t+"="+n);else{var i=e.indexOf(t+"=");i<0?a&&(a=";"==e.charAt(e.length-1)?"":";",e=e+a+t+"="+n):(t=a?t+"="+n:"",n=e.indexOf(";",i),a||n++,e=e.substring(0,i)+t+(i<n?e.substring(n):""))}return e},setCellStyleFlags:function(e,t,n,a,i){if(null!=t&&0<t.length){e.beginUpdate();try{for(var o=0;o<t.length;o++)if(null!=t[o]){var s=mxUtils.setStyleFlag(e.getStyle(t[o]),n,a,i);e.setStyle(t[o],s)}}finally{e.endUpdate()}}},setStyleFlag:function(e,t,n,a){if(null==e||0==e.length)e=a||null==a?t+"="+n:t+"=0";else{var i=e.indexOf(t+"=");if(i<0)i=";"==e.charAt(e.length-1)?"":";",e=a||null==a?e+i+t+"="+n:e+i+t+"=0";else{var o=e.indexOf(";",i),s="";s=o<0?e.substring(i+t.length+1):e.substring(i+t.length+1,o),s=null==a?parseInt(s)^n:a?parseInt(s)|n:parseInt(s)&~n;e=e.substring(0,i)+t+"="+s+(0<=o?e.substring(o):"")}}return e},getAlignmentAsPoint:function(e,t){var n=0,a=0;return e==mxConstants.ALIGN_CENTER?n=-.5:e==mxConstants.ALIGN_RIGHT&&(n=-1),t==mxConstants.ALIGN_MIDDLE?a=-.5:t==mxConstants.ALIGN_BOTTOM&&(a=-1),new mxPoint(n,a)},getSizeForString:function(e,t,n){t=null!=t?t:mxConstants.DEFAULT_FONTSIZE,n=null!=n?n:mxConstants.DEFAULT_FONTFAMILY;var a=document.createElement("div");return a.style.fontFamily=n,a.style.fontSize=Math.round(t)+"px",a.style.lineHeight=Math.round(t*mxConstants.LINE_HEIGHT)+"px",a.style.position="absolute",a.style.whiteSpace="nowrap",a.style.visibility="hidden",a.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",a.style.zoom="1",a.innerHTML=e,document.body.appendChild(a),e=new mxRectangle(0,0,a.offsetWidth,a.offsetHeight),document.body.removeChild(a),e},getViewXml:function(e,t,n,a,i){a=null!=a?a:0,i=null!=i?i:0,t=null!=t?t:1,null==n&&(n=[e.getModel().getRoot()]);var o=e.getView(),s=null,r=o.isEventsEnabled();o.setEventsEnabled(!1);var l=o.drawPane,d=o.overlayPane;e.dialect==mxConstants.DIALECT_SVG?(o.drawPane=document.createElementNS(mxConstants.NS_SVG,"g"),o.canvas.appendChild(o.drawPane),o.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g")):(o.drawPane=o.drawPane.cloneNode(!1),o.canvas.appendChild(o.drawPane),o.overlayPane=o.overlayPane.cloneNode(!1)),o.canvas.appendChild(o.overlayPane);var c=o.getTranslate();o.translate=new mxPoint(a,i),t=new mxTemporaryCellStates(e.getView(),t,n);try{s=(new mxCodec).encode(e.getView())}finally{t.destroy(),o.translate=c,o.canvas.removeChild(o.drawPane),o.canvas.removeChild(o.overlayPane),o.drawPane=l,o.overlayPane=d,o.setEventsEnabled(r)}return s},getScaleForPageCount:function(e,t,n,a){if(e<1)return 1;a=null!=a?a:0;var i=(n=null!=n?n:mxConstants.PAGE_FORMAT_A4_PORTRAIT).width-2*a;n=n.height-2*a,a=t.getGraphBounds().clone(),t=t.getView().getScale(),a.width/=t,a.height/=t,n=(t=a.width)/a.height/(i/n),a=Math.sqrt(e);var o=Math.sqrt(n);if(n=a*o,a/=o,n<1&&e<a){var s=a/e;a=e,n/=s}for(a<1&&e<n&&(s=n/e,n=e,a/=s),s=Math.ceil(n)*Math.ceil(a),o=0;e<s;){s=Math.floor(n)/n;var r=Math.floor(a)/a;if(1==s&&(s=Math.floor(n-1)/n),1==r&&(r=Math.floor(a-1)/a),n*=s=r<s?s:r,a*=s,s=Math.ceil(n)*Math.ceil(a),10<++o)break}return i*n/t*.99999},show:function(e,t,n,a){if(n=null!=n?n:0,a=null!=a?a:0,null==t?t=window.open().document:t.open(),n=-(i=e.getGraphBounds()).x+n,a=-i.y+a,mxClient.IS_IE){for(var i="<html><head>",o=document.getElementsByTagName("base"),s=0;s<o.length;s++)i+=o[s].outerHTML;for(i+="<style>",s=0;s<document.styleSheets.length;s++)try{i+=document.styleSheets(s).cssText}catch(e){}i+="</style></head>",i+="<body>",i+=e.container.innerHTML,i+="</body>",i+="<html>",t.writeln(i),t.close(),null!=(e=t.body.getElementsByTagName("DIV")[0])&&(e.style.position="absolute",e.style.left=n+"px",e.style.top=a+"px")}else{for(t.writeln("<html"),t.writeln("<head>"),o=document.getElementsByTagName("base"),s=0;s<o.length;s++)t.writeln(mxUtils.getOuterHtml(o[s]));for(o=document.getElementsByTagName("link"),s=0;s<o.length;s++)t.writeln(mxUtils.getOuterHtml(o[s]));for(o=document.getElementsByTagName("style"),s=0;s<o.length;s++)t.writeln(mxUtils.getOuterHtml(o[s]));for(t.writeln("</head>"),t.writeln("</html>"),t.close(),null==t.body&&t.documentElement.appendChild(t.createElement("body")),t.body.style.overflow="auto",e=e.container.firstChild;null!=e;)s=e.cloneNode(!0),t.body.appendChild(s),e=e.nextSibling;null!=(e=t.getElementsByTagName("g")[0])&&(e.setAttribute("transform","translate("+n+","+a+")"),(n=e.ownerSVGElement).setAttribute("width",i.width+Math.max(i.x,0)+3),n.setAttribute("height",i.height+Math.max(i.y,0)+3))}return mxUtils.removeCursors(t.body),t},printScreen:function(e){var t=window.open();mxUtils.show(e,t.document),e=function(){t.focus(),t.print(),t.close()},mxClient.IS_GC?t.setTimeout(e,500):e()},popup:function(e,t){if(t){var n=document.createElement("div");n.style.overflow="scroll",n.style.width="636px",n.style.height="460px";var a=document.createElement("pre");a.innerHTML=mxUtils.htmlEntities(e,!1).replace(/\n/g,"<br>").replace(/ /g,"&nbsp;"),n.appendChild(a),(n=new mxWindow("Popup Window",n,document.body.clientWidth/2-320,(document.body.clientHeight||document.documentElement.clientHeight)/2-240,640,480,!1,!0)).setClosable(!0),n.setVisible(!0)}else mxClient.IS_NS?((n=window.open()).document.writeln("<pre>"+mxUtils.htmlEntities(e)+"</pre"),n.document.close()):((a=(n=window.open()).document.createElement("pre")).innerHTML=mxUtils.htmlEntities(e,!1).replace(/\n/g,"<br>").replace(/ /g,"&nbsp;"),n.document.body.appendChild(a))},alert:function(e){alert(e)},prompt:function(e,t){return prompt(e,t)},confirm:function(e){return confirm(e)},error:function(e,t,n,a){var i=document.createElement("div");i.style.padding="20px";var o=document.createElement("img");o.setAttribute("src",a||mxUtils.errorImage),o.setAttribute("valign","bottom"),o.style.verticalAlign="middle",i.appendChild(o),i.appendChild(document.createTextNode(" ")),i.appendChild(document.createTextNode(" ")),i.appendChild(document.createTextNode(" ")),mxUtils.write(i,e),e=document.body.clientWidth,a=document.body.clientHeight||document.documentElement.clientHeight;var s=new mxWindow(mxResources.get(mxUtils.errorResource)||mxUtils.errorResource,i,(e-t)/2,a/4,t,null,!1,!0);return n&&(mxUtils.br(i),t=document.createElement("p"),n=document.createElement("button"),mxClient.IS_IE?n.style.cssText="float:right":n.setAttribute("style","float:right"),mxEvent.addListener(n,"click",function(e){s.destroy()}),mxUtils.write(n,mxResources.get(mxUtils.closeResource)||mxUtils.closeResource),t.appendChild(n),i.appendChild(t),mxUtils.br(i),s.setClosable(!0)),s.setVisible(!0),s},makeDraggable:function(e,t,n,i,a,o,s,r,l,d){return(e=new mxDragSource(e,n)).dragOffset=new mxPoint(null!=a?a:0,null!=o?o:mxConstants.TOOLTIP_VERTICAL_OFFSET),e.autoscroll=s,e.setGuidesEnabled(!1),null!=l&&(e.highlightDropTargets=l),null!=d&&(e.getDropTarget=d),e.getGraphForEvent=function(e){return"function"==typeof t?t(e):t},null!=i&&(e.createDragElement=function(){return i.cloneNode(!0)},r&&(e.createPreviewElement=function(e){var t=i.cloneNode(!0),n=parseInt(t.style.width),a=parseInt(t.style.height);return t.style.width=Math.round(n*e.view.scale)+"px",t.style.height=Math.round(a*e.view.scale)+"px",t})),e}},mxConstants={DEFAULT_HOTSPOT:.3,MIN_HOTSPOT_SIZE:8,MAX_HOTSPOT_SIZE:0,RENDERING_HINT_EXACT:"exact",RENDERING_HINT_FASTER:"faster",RENDERING_HINT_FASTEST:"fastest",DIALECT_SVG:"svg",DIALECT_VML:"vml",DIALECT_MIXEDHTML:"mixedHtml",DIALECT_PREFERHTML:"preferHtml",DIALECT_STRICTHTML:"strictHtml",NS_SVG:"http://www.w3.org/2000/svg",NS_XHTML:"http://www.w3.org/1999/xhtml",NS_XLINK:"http://www.w3.org/1999/xlink",SHADOWCOLOR:"gray",SHADOW_OFFSET_X:2,SHADOW_OFFSET_Y:3,SHADOW_OPACITY:1,NODETYPE_ELEMENT:1,NODETYPE_ATTRIBUTE:2,NODETYPE_TEXT:3,NODETYPE_CDATA:4,NODETYPE_ENTITY_REFERENCE:5,NODETYPE_ENTITY:6,NODETYPE_PROCESSING_INSTRUCTION:7,NODETYPE_COMMENT:8,NODETYPE_DOCUMENT:9,NODETYPE_DOCUMENTTYPE:10,NODETYPE_DOCUMENT_FRAGMENT:11,NODETYPE_NOTATION:12,TOOLTIP_VERTICAL_OFFSET:16,DEFAULT_VALID_COLOR:"#00FF00",DEFAULT_INVALID_COLOR:"#FF0000",HIGHLIGHT_STROKEWIDTH:3,CURSOR_MOVABLE_VERTEX:"move",CURSOR_MOVABLE_EDGE:"move",CURSOR_LABEL_HANDLE:"default",CURSOR_BEND_HANDLE:"pointer",CURSOR_CONNECT:"pointer",HIGHLIGHT_COLOR:"#00FF00",CONNECT_TARGET_COLOR:"#0000FF",INVALID_CONNECT_TARGET_COLOR:"#FF0000",DROP_TARGET_COLOR:"#0000FF",VALID_COLOR:"#00FF00",INVALID_COLOR:"#FF0000",EDGE_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_STROKEWIDTH:1,EDGE_SELECTION_STROKEWIDTH:1,VERTEX_SELECTION_DASHED:!0,EDGE_SELECTION_DASHED:!0,GUIDE_COLOR:"#FF0000",GUIDE_STROKEWIDTH:1,OUTLINE_COLOR:"#0099FF",OUTLINE_STROKEWIDTH:mxClient.IS_IE?2:3,HANDLE_SIZE:7,LABEL_HANDLE_SIZE:4,HANDLE_FILLCOLOR:"#00FF00",HANDLE_STROKECOLOR:"black",LABEL_HANDLE_FILLCOLOR:"yellow",CONNECT_HANDLE_FILLCOLOR:"#0000FF",LOCKED_HANDLE_FILLCOLOR:"#FF0000",OUTLINE_HANDLE_FILLCOLOR:"#00FFFF",OUTLINE_HANDLE_STROKECOLOR:"#0033FF",DEFAULT_FONTFAMILY:"Arial,Helvetica",DEFAULT_FONTSIZE:11,LINE_HEIGHT:1.2,DEFAULT_FONTSTYLE:0,DEFAULT_STARTSIZE:40,DEFAULT_MARKERSIZE:6,DEFAULT_IMAGESIZE:24,ENTITY_SEGMENT:30,RECTANGLE_ROUNDING_FACTOR:.15,LINE_ARCSIZE:20,ARROW_SPACING:10,ARROW_WIDTH:30,ARROW_SIZE:30,PAGE_FORMAT_A4_PORTRAIT:new mxRectangle(0,0,826,1169),PAGE_FORMAT_A4_LANDSCAPE:new mxRectangle(0,0,1169,826),PAGE_FORMAT_LETTER_PORTRAIT:new mxRectangle(0,0,850,1100),PAGE_FORMAT_LETTER_LANDSCAPE:new mxRectangle(0,0,1100,850),NONE:"none",STYLE_PERIMETER:"perimeter",STYLE_SOURCE_PORT:"sourcePort",STYLE_TARGET_PORT:"targetPort",STYLE_PORT_CONSTRAINT:"portConstraint",STYLE_OPACITY:"opacity",STYLE_TEXT_OPACITY:"textOpacity",STYLE_OVERFLOW:"overflow",STYLE_ORTHOGONAL:"orthogonal",STYLE_EXIT_X:"exitX",STYLE_EXIT_Y:"exitY",STYLE_EXIT_PERIMETER:"exitPerimeter",STYLE_ENTRY_X:"entryX",STYLE_ENTRY_Y:"entryY",STYLE_ENTRY_PERIMETER:"entryPerimeter",STYLE_WHITE_SPACE:"whiteSpace",STYLE_ROTATION:"rotation",STYLE_FILLCOLOR:"fillColor",STYLE_SWIMLANE_FILLCOLOR:"swimlaneFillColor",STYLE_GRADIENTCOLOR:"gradientColor",STYLE_GRADIENT_DIRECTION:"gradientDirection",STYLE_STROKECOLOR:"strokeColor",STYLE_SEPARATORCOLOR:"separatorColor",STYLE_STROKEWIDTH:"strokeWidth",STYLE_ALIGN:"align",STYLE_VERTICAL_ALIGN:"verticalAlign",STYLE_LABEL_POSITION:"labelPosition",STYLE_VERTICAL_LABEL_POSITION:"verticalLabelPosition",STYLE_IMAGE_ASPECT:"imageAspect",STYLE_IMAGE_ALIGN:"imageAlign",STYLE_IMAGE_VERTICAL_ALIGN:"imageVerticalAlign",STYLE_GLASS:"glass",STYLE_IMAGE:"image",STYLE_IMAGE_WIDTH:"imageWidth",STYLE_IMAGE_HEIGHT:"imageHeight",STYLE_IMAGE_BACKGROUND:"imageBackground",STYLE_IMAGE_BORDER:"imageBorder",STYLE_FLIPH:"flipH",STYLE_FLIPV:"flipV",STYLE_NOLABEL:"noLabel",STYLE_NOEDGESTYLE:"noEdgeStyle",STYLE_LABEL_BACKGROUNDCOLOR:"labelBackgroundColor",STYLE_LABEL_BORDERCOLOR:"labelBorderColor",STYLE_LABEL_PADDING:"labelPadding",STYLE_INDICATOR_SHAPE:"indicatorShape",STYLE_INDICATOR_IMAGE:"indicatorImage",STYLE_INDICATOR_COLOR:"indicatorColor",STYLE_INDICATOR_STROKECOLOR:"indicatorStrokeColor",STYLE_INDICATOR_GRADIENTCOLOR:"indicatorGradientColor",STYLE_INDICATOR_SPACING:"indicatorSpacing",STYLE_INDICATOR_WIDTH:"indicatorWidth",STYLE_INDICATOR_HEIGHT:"indicatorHeight",STYLE_INDICATOR_DIRECTION:"indicatorDirection",STYLE_SHADOW:"shadow",STYLE_SEGMENT:"segment",STYLE_ENDARROW:"endArrow",STYLE_STARTARROW:"startArrow",STYLE_ENDSIZE:"endSize",STYLE_STARTSIZE:"startSize",STYLE_SWIMLANE_LINE:"swimlaneLine",STYLE_ENDFILL:"endFill",STYLE_STARTFILL:"startFill",STYLE_DASHED:"dashed",STYLE_DASH_PATTERN:"dashPattern",STYLE_ROUNDED:"rounded",STYLE_CURVED:"curved",STYLE_ARCSIZE:"arcSize",STYLE_SMOOTH:"smooth",STYLE_SOURCE_PERIMETER_SPACING:"sourcePerimeterSpacing",STYLE_TARGET_PERIMETER_SPACING:"targetPerimeterSpacing",STYLE_PERIMETER_SPACING:"perimeterSpacing",STYLE_SPACING:"spacing",STYLE_SPACING_TOP:"spacingTop",STYLE_SPACING_LEFT:"spacingLeft",STYLE_SPACING_BOTTOM:"spacingBottom",STYLE_SPACING_RIGHT:"spacingRight",STYLE_HORIZONTAL:"horizontal",STYLE_DIRECTION:"direction",STYLE_ELBOW:"elbow",STYLE_FONTCOLOR:"fontColor",STYLE_FONTFAMILY:"fontFamily",STYLE_FONTSIZE:"fontSize",STYLE_FONTSTYLE:"fontStyle",STYLE_AUTOSIZE:"autosize",STYLE_FOLDABLE:"foldable",STYLE_EDITABLE:"editable",STYLE_BENDABLE:"bendable",STYLE_MOVABLE:"movable",STYLE_RESIZABLE:"resizable",STYLE_CLONEABLE:"cloneable",STYLE_DELETABLE:"deletable",STYLE_SHAPE:"shape",STYLE_EDGE:"edgeStyle",STYLE_LOOP:"loopStyle",STYLE_ROUTING_CENTER_X:"routingCenterX",STYLE_ROUTING_CENTER_Y:"routingCenterY",FONT_BOLD:1,FONT_ITALIC:2,FONT_UNDERLINE:4,FONT_SHADOW:8,SHAPE_RECTANGLE:"rectangle",SHAPE_ELLIPSE:"ellipse",SHAPE_DOUBLE_ELLIPSE:"doubleEllipse",SHAPE_RHOMBUS:"rhombus",SHAPE_LINE:"line",SHAPE_IMAGE:"image",SHAPE_ARROW:"arrow",SHAPE_LABEL:"label",SHAPE_CYLINDER:"cylinder",SHAPE_SWIMLANE:"swimlane",SHAPE_CONNECTOR:"connector",SHAPE_ACTOR:"actor",SHAPE_CLOUD:"cloud",SHAPE_TRIANGLE:"triangle",SHAPE_HEXAGON:"hexagon",ARROW_CLASSIC:"classic",ARROW_BLOCK:"block",ARROW_OPEN:"open",ARROW_OVAL:"oval",ARROW_DIAMOND:"diamond",ARROW_DIAMOND_THIN:"diamondThin",ALIGN_LEFT:"left",ALIGN_CENTER:"center",ALIGN_RIGHT:"right",ALIGN_TOP:"top",ALIGN_MIDDLE:"middle",ALIGN_BOTTOM:"bottom",DIRECTION_NORTH:"north",DIRECTION_SOUTH:"south",DIRECTION_EAST:"east",DIRECTION_WEST:"west",DIRECTION_MASK_NONE:0,DIRECTION_MASK_WEST:1,DIRECTION_MASK_NORTH:2,DIRECTION_MASK_SOUTH:4,DIRECTION_MASK_EAST:8,DIRECTION_MASK_ALL:15,ELBOW_VERTICAL:"vertical",ELBOW_HORIZONTAL:"horizontal",EDGESTYLE_ELBOW:"elbowEdgeStyle",EDGESTYLE_ENTITY_RELATION:"entityRelationEdgeStyle",EDGESTYLE_LOOP:"loopEdgeStyle",EDGESTYLE_SIDETOSIDE:"sideToSideEdgeStyle",EDGESTYLE_TOPTOBOTTOM:"topToBottomEdgeStyle",EDGESTYLE_ORTHOGONAL:"orthogonalEdgeStyle",EDGESTYLE_SEGMENT:"segmentEdgeStyle",PERIMETER_ELLIPSE:"ellipsePerimeter",PERIMETER_RECTANGLE:"rectanglePerimeter",PERIMETER_RHOMBUS:"rhombusPerimeter",PERIMETER_TRIANGLE:"trianglePerimeter"};function mxEventObject(e){this.name=e,this.properties=[];for(var t=1;t<arguments.length;t+=2)null!=arguments[t+1]&&(this.properties[arguments[t]]=arguments[t+1])}function mxMouseEvent(e,t){this.evt=e,this.state=t}function mxEventSource(e){this.setEventSource(e)}mxEventObject.prototype.name=null,mxEventObject.prototype.properties=null,mxEventObject.prototype.consumed=!1,mxEventObject.prototype.getName=function(){return this.name},mxEventObject.prototype.getProperties=function(){return this.properties},mxEventObject.prototype.getProperty=function(e){return this.properties[e]},mxEventObject.prototype.isConsumed=function(){return this.consumed},mxEventObject.prototype.consume=function(){this.consumed=!0},mxMouseEvent.prototype.consumed=!1,mxMouseEvent.prototype.evt=null,mxMouseEvent.prototype.graphX=null,mxMouseEvent.prototype.graphY=null,mxMouseEvent.prototype.state=null,mxMouseEvent.prototype.getEvent=function(){return this.evt},mxMouseEvent.prototype.getSource=function(){return mxEvent.getSource(this.evt)},mxMouseEvent.prototype.isSource=function(e){if(null!=e)for(var t=this.getSource();null!=t;){if(t==e.node)return!0;t=t.parentNode}return!1},mxMouseEvent.prototype.getX=function(){return mxEvent.getClientX(this.getEvent())},mxMouseEvent.prototype.getY=function(){return mxEvent.getClientY(this.getEvent())},mxMouseEvent.prototype.getGraphX=function(){return this.graphX},mxMouseEvent.prototype.getGraphY=function(){return this.graphY},mxMouseEvent.prototype.getState=function(){return this.state},mxMouseEvent.prototype.getCell=function(){var e=this.getState();return null!=e?e.cell:null},mxMouseEvent.prototype.isPopupTrigger=function(){return mxEvent.isPopupTrigger(this.getEvent())},mxMouseEvent.prototype.isConsumed=function(){return this.consumed},mxMouseEvent.prototype.consume=function(e){(null==e||e)&&this.evt.preventDefault&&this.evt.preventDefault(),this.evt.returnValue=!1,this.consumed=!0},mxEventSource.prototype.eventListeners=null,mxEventSource.prototype.eventsEnabled=!0,mxEventSource.prototype.eventSource=null,mxEventSource.prototype.isEventsEnabled=function(){return this.eventsEnabled},mxEventSource.prototype.setEventsEnabled=function(e){this.eventsEnabled=e},mxEventSource.prototype.getEventSource=function(){return this.eventSource},mxEventSource.prototype.setEventSource=function(e){this.eventSource=e},mxEventSource.prototype.addListener=function(e,t){null==this.eventListeners&&(this.eventListeners=[]),this.eventListeners.push(e),this.eventListeners.push(t)},mxEventSource.prototype.removeListener=function(e){if(null!=this.eventListeners)for(var t=0;t<this.eventListeners.length;)this.eventListeners[t+1]==e?this.eventListeners.splice(t,2):t+=2},mxEventSource.prototype.fireEvent=function(e,t){if(null!=this.eventListeners&&this.isEventsEnabled()){null==e&&(e=new mxEventObject),null==t&&(t=this.getEventSource()),null==t&&(t=this);for(var n=[t,e],a=0;a<this.eventListeners.length;a+=2){var i=this.eventListeners[a];(null==i||i==e.getName())&&this.eventListeners[a+1].apply(this,n)}}};var mxEvent={objects:[],addListener:function(){var a=function(e,t,n){null==e.mxListenerList&&(e.mxListenerList=[],mxEvent.objects.push(e)),e.mxListenerList.push({name:t,f:n})};return window.addEventListener?function(e,t,n){e.addEventListener(t,n,!1),a(e,t,n)}:function(e,t,n){e.attachEvent("on"+t,n),a(e,t,n)}}(),removeListener:function(){var a=function(e,t,n){if(null!=e.mxListenerList){t=e.mxListenerList.length;for(var a=0;a<t;a++)if(e.mxListenerList[a].f==n){e.mxListenerList.splice(a,1);break}0==e.mxListenerList.length&&(e.mxListenerList=null)}};return window.removeEventListener?function(e,t,n){e.removeEventListener(t,n,!1),a(e,t,n)}:function(e,t,n){e.detachEvent("on"+t,n),a(e,t,n)}}(),removeAllListeners:function(e){var t=e.mxListenerList;if(null!=t)for(;0<t.length;){var n=t[0];mxEvent.removeListener(e,n.name,n.f)}},addGestureListeners:function(e,t,n,a){null!=t&&mxEvent.addListener(e,"mousedown",t),null!=n&&mxEvent.addListener(e,"mousemove",n),null!=a&&mxEvent.addListener(e,"mouseup",a),mxClient.IS_TOUCH&&(null!=t&&mxEvent.addListener(e,"touchstart",t),null!=n&&mxEvent.addListener(e,"touchmove",n),null!=a&&mxEvent.addListener(e,"touchend",a))},removeGestureListeners:function(e,t,n,a){null!=t&&mxEvent.removeListener(e,"mousedown",t),null!=n&&mxEvent.removeListener(e,"mousemove",n),null!=a&&mxEvent.removeListener(e,"mouseup",a),mxClient.IS_TOUCH&&(null!=t&&mxEvent.removeListener(e,"touchstart",t),null!=n&&mxEvent.removeListener(e,"touchmove",n),null!=a&&mxEvent.removeListener(e,"touchend",a))},redirectMouseEvents:function(e,n,t,a,i,o,s){var r=function(e){return"function"==typeof t?t(e):t};mxEvent.addGestureListeners(e,function(e){null!=a?a(e):mxEvent.isConsumed(e)||n.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e,r(e)))},function(e){null!=i?i(e):mxEvent.isConsumed(e)||n.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,r(e)))},function(e){null!=o?o(e):mxEvent.isConsumed(e)||n.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e,r(e)))}),mxEvent.addListener(e,"dblclick",function(e){if(null!=s)s(e);else if(!mxEvent.isConsumed(e)){var t=r(e);n.dblClick(e,null!=t?t.cell:null)}})},release:function(e){if(null!=e&&(mxEvent.removeAllListeners(e),null!=(e=e.childNodes)))for(var t=e.length,n=0;n<t;n+=1)mxEvent.release(e[n])},addMouseWheelListener:function(n){if(null!=n){var e=function(e){null==e&&(e=window.event);var t=0;0!=(t=!mxClient.IS_NS||mxClient.IS_SF||mxClient.IS_GC?e.wheelDelta/120:-e.detail/2)&&n(e,0<t)};mxClient.IS_NS?mxEvent.addListener(window,mxClient.IS_SF||mxClient.IS_GC?"mousewheel":"DOMMouseScroll",e):mxEvent.addListener(document,"mousewheel",e)}},disableContextMenu:mxClient.IS_IE&&(void 0===document.documentMode||document.documentMode<9)?function(e){mxEvent.addListener(e,"contextmenu",function(){return!1})}:function(e){e.setAttribute("oncontextmenu","return false;")},getSource:function(e){return null!=e.srcElement?e.srcElement:e.target},isConsumed:function(e){return null!=e.isConsumed&&e.isConsumed},isLeftMouseButton:function(e){return e.button==(mxClient.IS_IE&&(void 0===document.documentMode||document.documentMode<9)?1:0)},isRightMouseButton:function(e){return 2==e.button},isPopupTrigger:function(e){return mxEvent.isRightMouseButton(e)||mxEvent.isShiftDown(e)&&!mxEvent.isControlDown(e)},isShiftDown:function(e){return null!=e&&e.shiftKey},isAltDown:function(e){return null!=e&&e.altKey},isControlDown:function(e){return null!=e&&e.ctrlKey},isMetaDown:function(e){return null!=e&&e.metaKey},getMainEvent:function(e){return"touchstart"!=e.type&&"touchmove"!=e.type||null==e.touches||null==e.touches[0]?"touchend"==e.type&&null!=e.changedTouches&&null!=e.changedTouches[0]&&(e=e.changedTouches[0]):e=e.touches[0],e},getClientX:function(e){return mxEvent.getMainEvent(e).clientX},getClientY:function(e){return mxEvent.getMainEvent(e).clientY},consume:function(e,t,n){n=null==n||n,(null==t||t)&&(e.preventDefault?(n&&e.stopPropagation(),e.preventDefault()):n&&(e.cancelBubble=!0)),e.isConsumed=!0,e.returnValue=!1},LABEL_HANDLE:-1,ROTATION_HANDLE:-2,MOUSE_DOWN:"mouseDown",MOUSE_MOVE:"mouseMove",MOUSE_UP:"mouseUp",ACTIVATE:"activate",RESIZE_START:"resizeStart",RESIZE:"resize",RESIZE_END:"resizeEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",PAN_START:"panStart",PAN:"pan",PAN_END:"panEnd",MINIMIZE:"minimize",NORMALIZE:"normalize",MAXIMIZE:"maximize",HIDE:"hide",SHOW:"show",CLOSE:"close",DESTROY:"destroy",REFRESH:"refresh",SIZE:"size",SELECT:"select",FIRED:"fired",GET:"get",RECEIVE:"receive",CONNECT:"connect",DISCONNECT:"disconnect",SUSPEND:"suspend",RESUME:"resume",MARK:"mark",SESSION:"session",ROOT:"root",POST:"post",OPEN:"open",SAVE:"save",BEFORE_ADD_VERTEX:"beforeAddVertex",ADD_VERTEX:"addVertex",AFTER_ADD_VERTEX:"afterAddVertex",DONE:"done",EXECUTE:"execute",EXECUTED:"executed",BEGIN_UPDATE:"beginUpdate",START_EDIT:"startEdit",END_UPDATE:"endUpdate",END_EDIT:"endEdit",BEFORE_UNDO:"beforeUndo",UNDO:"undo",REDO:"redo",CHANGE:"change",NOTIFY:"notify",LAYOUT_CELLS:"layoutCells",CLICK:"click",SCALE:"scale",TRANSLATE:"translate",SCALE_AND_TRANSLATE:"scaleAndTranslate",UP:"up",DOWN:"down",ADD:"add",REMOVE:"remove",CLEAR:"clear",ADD_CELLS:"addCells",CELLS_ADDED:"cellsAdded",MOVE_CELLS:"moveCells",CELLS_MOVED:"cellsMoved",RESIZE_CELLS:"resizeCells",CELLS_RESIZED:"cellsResized",TOGGLE_CELLS:"toggleCells",CELLS_TOGGLED:"cellsToggled",ORDER_CELLS:"orderCells",CELLS_ORDERED:"cellsOrdered",REMOVE_CELLS:"removeCells",CELLS_REMOVED:"cellsRemoved",GROUP_CELLS:"groupCells",UNGROUP_CELLS:"ungroupCells",REMOVE_CELLS_FROM_PARENT:"removeCellsFromParent",FOLD_CELLS:"foldCells",CELLS_FOLDED:"cellsFolded",ALIGN_CELLS:"alignCells",LABEL_CHANGED:"labelChanged",CONNECT_CELL:"connectCell",CELL_CONNECTED:"cellConnected",SPLIT_EDGE:"splitEdge",FLIP_EDGE:"flipEdge",START_EDITING:"startEditing",ADD_OVERLAY:"addOverlay",REMOVE_OVERLAY:"removeOverlay",UPDATE_CELL_SIZE:"updateCellSize",ESCAPE:"escape",CLICK:"click",DOUBLE_CLICK:"doubleClick",START:"start",RESET:"reset"};function mxXmlRequest(e,t,n,a,i,o){this.url=e,this.params=t,this.method=n||"POST",this.async=null==a||a,this.username=i,this.password=o}mxXmlRequest.prototype.url=null,mxXmlRequest.prototype.params=null,mxXmlRequest.prototype.method=null,mxXmlRequest.prototype.async=null,mxXmlRequest.prototype.binary=!1,mxXmlRequest.prototype.username=null,mxXmlRequest.prototype.password=null,mxXmlRequest.prototype.request=null,mxXmlRequest.prototype.isBinary=function(){return this.binary},mxXmlRequest.prototype.setBinary=function(e){this.binary=e},mxXmlRequest.prototype.getText=function(){return this.request.responseText},mxXmlRequest.prototype.isReady=function(){return 4==this.request.readyState},mxXmlRequest.prototype.getDocumentElement=function(){var e=this.getXml();return null!=e?e.documentElement:null},mxXmlRequest.prototype.getXml=function(){var e=this.request.responseXML;return(9<=document.documentMode||null==e||null==e.documentElement)&&(e=mxUtils.parseXml(this.request.responseText)),e},mxXmlRequest.prototype.getText=function(){return this.request.responseText},mxXmlRequest.prototype.getStatus=function(){return this.request.status},mxXmlRequest.prototype.create=window.XMLHttpRequest?function(){var e=new XMLHttpRequest;return this.isBinary()&&e.overrideMimeType&&e.overrideMimeType("text/plain; charset=x-user-defined"),e}:"undefined"!=typeof ActiveXObject?function(){return new ActiveXObject("Microsoft.XMLHTTP")}:void 0,mxXmlRequest.prototype.send=function(e,t){this.request=this.create(),null!=this.request&&(null!=e&&(this.request.onreadystatechange=mxUtils.bind(this,function(){this.isReady()&&(e(this),this.onreadystatechaange=null)})),this.request.open(this.method,this.url,this.async,this.username,this.password),this.setRequestHeaders(this.request,this.params),this.request.send(this.params))},mxXmlRequest.prototype.setRequestHeaders=function(e,t){null!=t&&e.setRequestHeader("Content-Type","application/x-www-form-urlencoded")},mxXmlRequest.prototype.simulate=function(e,t){var n=null;(e=e||document)==document&&(n=window.onbeforeunload,window.onbeforeunload=null);var a=e.createElement("form");a.setAttribute("method",this.method),a.setAttribute("action",this.url),null!=t&&a.setAttribute("target",t),a.style.display="none",a.style.visibility="hidden";for(var i=0<this.params.indexOf("&")?this.params.split("&"):this.params.split(),o=0;o<i.length;o++){if(0<(s=i[o].indexOf("="))){var s,r=i[o].substring(0,s),l=i[o].substring(s+1);(s=e.createElement("textarea")).setAttribute("name",r),l=l.replace(/\n/g,"&#xa;"),r=e.createTextNode(l),s.appendChild(r),a.appendChild(s)}}e.body.appendChild(a),a.submit(),e.body.removeChild(a),null!=n&&(window.onbeforeunload=n)};var mxClipboard={STEPSIZE:10,insertCount:1,cells:null,isEmpty:function(){return null==mxClipboard.cells},cut:function(e,t){return t=mxClipboard.copy(e,t),mxClipboard.insertCount=0,mxClipboard.removeCells(e,t),t},removeCells:function(e,t){e.removeCells(t)},copy:function(e,t){t=t||e.getSelectionCells();var n=e.getExportableCells(t);return mxClipboard.insertCount=1,mxClipboard.cells=e.cloneCells(n),n},paste:function(e){if(null!=mxClipboard.cells){var t=e.getImportableCells(mxClipboard.cells),n=mxClipboard.insertCount*mxClipboard.STEPSIZE,a=e.getDefaultParent();t=e.importCells(t,n,n,a);mxClipboard.insertCount++,e.setSelectionCells(t)}}};function mxWindow(e,t,n,a,i,o,s,r,l,d){null!=t&&(s=null==s||s,this.content=t,this.init(n,a,i,o,d),this.installMaximizeHandler(),this.installMinimizeHandler(),this.installCloseHandler(),this.setMinimizable(s),this.setTitle(e),(null==r||r)&&this.installMoveHandler(),null!=l&&null!=l.parentNode?l.parentNode.replaceChild(this.div,l):document.body.appendChild(this.div))}function mxForm(e){this.table=document.createElement("table"),this.table.className=e,this.body=document.createElement("tbody"),this.table.appendChild(this.body)}function mxImage(e,t,n){this.src=e,this.width=t,this.height=n}function mxDivResizer(e,t){if("div"==e.nodeName.toLowerCase()){null==t&&(t=window),this.div=e;var n=mxUtils.getCurrentStyle(e);null!=n&&(this.resizeWidth="auto"==n.width,this.resizeHeight="auto"==n.height),mxEvent.addListener(t,"resize",mxUtils.bind(this,function(e){this.handlingResize||(this.handlingResize=!0,this.resize(),this.handlingResize=!1)})),this.resize()}}function mxDragSource(e,t){this.element=e,this.dropHandler=t,mxEvent.addGestureListeners(e,mxUtils.bind(this,this.mouseDown))}function mxToolbar(e){this.container=e}function mxSession(t,e,n,a){this.model=t,this.urlInit=e,this.urlPoll=n,this.urlNotify=a,null!=t&&(this.codec=new mxCodec,this.codec.lookup=function(e){return t.getCell(e)}),t.addListener(mxEvent.NOTIFY,mxUtils.bind(this,function(e,t){var n=t.getProperty("edit");(null!=n&&this.debug||this.connected&&!this.suspended)&&this.notify("<edit>"+this.encodeChanges(n.changes,n.undone)+"</edit>")}))}function mxUndoableEdit(e,t){this.source=e,this.changes=[],this.significant=null==t||t}function mxUndoManager(e){this.size=null!=e?e:100,this.clear()}mxWindow.prototype=new mxEventSource,mxWindow.prototype.constructor=mxWindow,mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif",mxWindow.prototype.maximizeImage=mxClient.imageBasePath+"/maximize.gif",mxWindow.prototype.resizeImage=mxClient.imageBasePath+"/resize.gif",mxWindow.prototype.visible=!1,mxWindow.prototype.content=!1,mxWindow.prototype.minimumSize=new mxRectangle(0,0,50,40),mxWindow.prototype.title=!1,mxWindow.prototype.content=!1,mxWindow.prototype.destroyOnClose=!0,mxWindow.prototype.init=function(e,t,n,a,i){i=null!=i?i:"mxWindow",this.div=document.createElement("div"),this.div.className=i,this.div.style.left=e+"px",this.div.style.top=t+"px",this.table=document.createElement("table"),this.table.className=i,null!=n&&(mxClient.IS_IE||(this.div.style.width=n+"px"),this.table.style.width=n+"px"),null!=a&&(mxClient.IS_IE||(this.div.style.height=a+"px"),this.table.style.height=a+"px"),e=document.createElement("tbody"),t=document.createElement("tr"),this.title=document.createElement("td"),this.title.className=i+"Title",t.appendChild(this.title),e.appendChild(t),t=document.createElement("tr"),this.td=document.createElement("td"),this.td.className=i+"Pane",this.contentWrapper=document.createElement("div"),this.contentWrapper.className=i+"Pane",this.contentWrapper.style.width="100%",this.contentWrapper.appendChild(this.content),(mxClient.IS_IE||"DIV"!=this.content.nodeName.toUpperCase())&&(this.contentWrapper.style.height="100%"),this.td.appendChild(this.contentWrapper),t.appendChild(this.td),e.appendChild(t),this.table.appendChild(e),this.div.appendChild(this.table),i=mxUtils.bind(this,function(e){this.activate()}),mxEvent.addListener(this.title,"mousedown",i),mxEvent.addListener(this.table,"mousedown",i),mxClient.IS_TOUCH&&(mxEvent.addListener(this.title,"touchstart",i),mxEvent.addListener(this.table,"touchstart",i)),this.hide()},mxWindow.prototype.setTitle=function(e){for(var t=this.title.firstChild;null!=t;){var n=t.nextSibling;t.nodeType==mxConstants.NODETYPE_TEXT&&t.parentNode.removeChild(t),t=n}mxUtils.write(this.title,e||"")},mxWindow.prototype.setScrollable=function(e){navigator.userAgent.indexOf("Presto/2.5")<0&&(this.contentWrapper.style.overflow=e?"auto":"hidden")},mxWindow.prototype.activate=function(){if(mxWindow.activeWindow!=this){var e=null!=(e=mxUtils.getCurrentStyle(this.getElement()))?e.zIndex:3;if(mxWindow.activeWindow){var t=mxWindow.activeWindow.getElement();null!=t&&null!=t.style&&(t.style.zIndex=e)}t=mxWindow.activeWindow,this.getElement().style.zIndex=parseInt(e)+1,(mxWindow.activeWindow=this).fireEvent(new mxEventObject(mxEvent.ACTIVATE,"previousWindow",t))}},mxWindow.prototype.getElement=function(){return this.div},mxWindow.prototype.fit=function(){mxUtils.fit(this.div)},mxWindow.prototype.isResizable=function(){return null!=this.resize&&"none"!=this.resize.style.display},mxWindow.prototype.setResizable=function(e){e?null==this.resize?(this.resize=document.createElement("img"),this.resize.style.position="absolute",this.resize.style.bottom="2px",this.resize.style.right="2px",this.resize.setAttribute("src",mxClient.imageBasePath+"/resize.gif"),this.resize.style.cursor="nw-resize",mxEvent.addGestureListeners(this.resize,mxUtils.bind(this,function(e){this.activate();var a=mxEvent.getClientX(e),i=mxEvent.getClientY(e),o=this.div.offsetWidth,s=this.div.offsetHeight,t=mxUtils.bind(this,function(e){var t=mxEvent.getClientX(e)-a,n=mxEvent.getClientY(e)-i;this.setSize(o+t,s+n),this.fireEvent(new mxEventObject(mxEvent.RESIZE,"event",e)),mxEvent.consume(e)}),n=mxUtils.bind(this,function(e){mxEvent.removeGestureListeners(document,null,t,n),this.fireEvent(new mxEventObject(mxEvent.RESIZE_END,"event",e)),mxEvent.consume(e)});mxEvent.addGestureListeners(document,null,t,n),this.fireEvent(new mxEventObject(mxEvent.RESIZE_START,"event",e)),mxEvent.consume(e)}),null,null),this.div.appendChild(this.resize)):this.resize.style.display="inline":null!=this.resize&&(this.resize.style.display="none")},mxWindow.prototype.setSize=function(e,t){e=Math.max(this.minimumSize.width,e),t=Math.max(this.minimumSize.height,t),mxClient.IS_IE||(this.div.style.width=e+"px",this.div.style.height=t+"px"),this.table.style.width=e+"px",this.table.style.height=t+"px",mxClient.IS_IE||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-2+"px")},mxWindow.prototype.setMinimizable=function(e){this.minimize.style.display=e?"":"none"},mxWindow.prototype.getMinimumSize=function(){return new mxRectangle(0,0,0,this.title.offsetHeight)},mxWindow.prototype.installMinimizeHandler=function(){this.minimize=document.createElement("img"),this.minimize.setAttribute("src",this.minimizeImage),this.minimize.setAttribute("align","right"),this.minimize.setAttribute("title","Minimize"),this.minimize.style.cursor="pointer",this.minimize.style.marginRight="1px",this.minimize.style.display="none",this.title.appendChild(this.minimize);var n=!1,a=null,i=null,e=mxUtils.bind(this,function(e){if(this.activate(),n)n=!1,this.minimize.setAttribute("src",this.minimizeImage),this.minimize.setAttribute("title","Minimize"),this.contentWrapper.style.display="",this.maximize.style.display=a,mxClient.IS_IE||(this.div.style.height=i),this.table.style.height=i,null!=this.resize&&(this.resize.style.visibility=""),this.fireEvent(new mxEventObject(mxEvent.NORMALIZE,"event",e));else{n=!0,this.minimize.setAttribute("src",this.normalizeImage),this.minimize.setAttribute("title","Normalize"),this.contentWrapper.style.display="none",a=this.maximize.style.display,this.maximize.style.display="none",i=this.table.style.height;var t=this.getMinimumSize();0<t.height&&(mxClient.IS_IE||(this.div.style.height=t.height+"px"),this.table.style.height=t.height+"px"),0<t.width&&(mxClient.IS_IE||(this.div.style.width=t.width+"px"),this.table.style.width=t.width+"px"),null!=this.resize&&(this.resize.style.visibility="hidden"),this.fireEvent(new mxEventObject(mxEvent.MINIMIZE,"event",e))}mxEvent.consume(e)});mxEvent.addListener(this.minimize,"mousedown",e),mxClient.IS_TOUCH&&mxEvent.addListener(this.minimize,"touchstart",e)},mxWindow.prototype.setMaximizable=function(e){this.maximize.style.display=e?"":"none"},mxWindow.prototype.installMaximizeHandler=function(){this.maximize=document.createElement("img"),this.maximize.setAttribute("src",this.maximizeImage),this.maximize.setAttribute("align","right"),this.maximize.setAttribute("title","Maximize"),this.maximize.style.cursor="default",this.maximize.style.marginLeft="1px",this.maximize.style.cursor="pointer",this.maximize.style.display="none",this.title.appendChild(this.maximize);var n=!1,a=null,i=null,o=null,s=null,e=mxUtils.bind(this,function(e){if(this.activate(),"none"!=this.maximize.style.display){if(n)n=!1,this.maximize.setAttribute("src",this.maximizeImage),this.maximize.setAttribute("title","Maximize"),this.contentWrapper.style.display="",this.minimize.style.visibility="",this.div.style.left=a+"px",this.div.style.top=i+"px",mxClient.IS_IE||(this.div.style.height=o,this.div.style.width=s,"auto"!=(t=mxUtils.getCurrentStyle(this.contentWrapper)).overflow&&null==this.resize)||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-2+"px"),this.table.style.height=o,this.table.style.width=s,null!=this.resize&&(this.resize.style.visibility=""),this.fireEvent(new mxEventObject(mxEvent.NORMALIZE,"event",e));else{if(n=!0,this.maximize.setAttribute("src",this.normalizeImage),this.maximize.setAttribute("title","Normalize"),this.contentWrapper.style.display="",this.minimize.style.visibility="hidden",a=parseInt(this.div.style.left),i=parseInt(this.div.style.top),o=this.table.style.height,s=this.table.style.width,this.div.style.left="0px",this.div.style.top="0px",mxClient.IS_IE||(this.div.style.height=document.body.clientHeight-2+"px",this.div.style.width=document.body.clientWidth-2+"px"),this.table.style.width=document.body.clientWidth-2+"px",this.table.style.height=document.body.clientHeight-2+"px",null!=this.resize&&(this.resize.style.visibility="hidden"),!mxClient.IS_IE){var t=mxUtils.getCurrentStyle(this.contentWrapper);"auto"!=t.overflow&&null==this.resize||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-2+"px")}this.fireEvent(new mxEventObject(mxEvent.MAXIMIZE,"event",e))}mxEvent.consume(e)}});mxEvent.addGestureListeners(this.maximize,e),mxEvent.addListener(this.title,"dblclick",e)},mxWindow.prototype.installMoveHandler=function(){this.title.style.cursor="move",mxEvent.addGestureListeners(this.title,mxUtils.bind(this,function(e){var a=mxEvent.getClientX(e),i=mxEvent.getClientY(e),o=this.getX(),s=this.getY(),t=mxUtils.bind(this,function(e){var t=mxEvent.getClientX(e)-a,n=mxEvent.getClientY(e)-i;this.setLocation(o+t,s+n),this.fireEvent(new mxEventObject(mxEvent.MOVE,"event",e)),mxEvent.consume(e)}),n=mxUtils.bind(this,function(e){mxEvent.removeGestureListeners(document,null,t,n),this.fireEvent(new mxEventObject(mxEvent.MOVE_END,"event",e)),mxEvent.consume(e)});mxEvent.addGestureListeners(document,null,t,n),this.fireEvent(new mxEventObject(mxEvent.MOVE_START,"event",e)),mxEvent.consume(e)}))},mxWindow.prototype.setLocation=function(e,t){this.div.style.left=e+"px",this.div.style.top=t+"px"},mxWindow.prototype.getX=function(){return parseInt(this.div.style.left)},mxWindow.prototype.getY=function(){return parseInt(this.div.style.top)},mxWindow.prototype.installCloseHandler=function(){this.closeImg=document.createElement("img"),this.closeImg.setAttribute("src",this.closeImage),this.closeImg.setAttribute("align","right"),this.closeImg.setAttribute("title","Close"),this.closeImg.style.marginLeft="2px",this.closeImg.style.cursor="pointer",this.closeImg.style.display="none",this.title.insertBefore(this.closeImg,this.title.firstChild),mxEvent.addGestureListeners(this.closeImg,mxUtils.bind(this,function(e){this.fireEvent(new mxEventObject(mxEvent.CLOSE,"event",e)),this.destroyOnClose?this.destroy():this.setVisible(!1),mxEvent.consume(e)}))},mxWindow.prototype.setImage=function(e){this.image=document.createElement("img"),this.image.setAttribute("src",e),this.image.setAttribute("align","left"),this.image.style.marginRight="4px",this.image.style.marginLeft="0px",this.image.style.marginTop="-2px",this.title.insertBefore(this.image,this.title.firstChild)},mxWindow.prototype.setClosable=function(e){this.closeImg.style.display=e?"":"none"},mxWindow.prototype.isVisible=function(){return null!=this.div&&"hidden"!=this.div.style.visibility},mxWindow.prototype.setVisible=function(e){null!=this.div&&this.isVisible()!=e&&(e?this.show():this.hide())},mxWindow.prototype.show=function(){this.div.style.visibility="",this.activate();var e=mxUtils.getCurrentStyle(this.contentWrapper);mxClient.IS_IE||"auto"!=e.overflow&&null==this.resize||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-2+"px"),this.fireEvent(new mxEventObject(mxEvent.SHOW))},mxWindow.prototype.hide=function(){this.div.style.visibility="hidden",this.fireEvent(new mxEventObject(mxEvent.HIDE))},mxWindow.prototype.destroy=function(){this.fireEvent(new mxEventObject(mxEvent.DESTROY)),null!=this.div&&(mxEvent.release(this.div),this.div.parentNode.removeChild(this.div),this.div=null),this.contentWrapper=this.content=this.title=null},mxForm.prototype.table=null,mxForm.prototype.body=!1,mxForm.prototype.getTable=function(){return this.table},mxForm.prototype.addButtons=function(e,t){var n=document.createElement("tr"),a=document.createElement("td");n.appendChild(a);a=document.createElement("td");var i=document.createElement("button");mxUtils.write(i,mxResources.get("ok")||"OK"),a.appendChild(i),mxEvent.addListener(i,"click",function(){e()}),i=document.createElement("button"),mxUtils.write(i,mxResources.get("cancel")||"Cancel"),a.appendChild(i),mxEvent.addListener(i,"click",function(){t()}),n.appendChild(a),this.body.appendChild(n)},mxForm.prototype.addText=function(e,t){var n=document.createElement("input");return n.setAttribute("type","text"),n.value=t,this.addField(e,n)},mxForm.prototype.addCheckbox=function(e,t){var n=document.createElement("input");return n.setAttribute("type","checkbox"),this.addField(e,n),t&&(n.checked=!0),n},mxForm.prototype.addTextarea=function(e,t,n){var a=document.createElement("textarea");return mxClient.IS_NS&&n--,a.setAttribute("rows",n||2),a.value=t,this.addField(e,a)},mxForm.prototype.addCombo=function(e,t,n){var a=document.createElement("select");return null!=n&&a.setAttribute("size",n),t&&a.setAttribute("multiple","true"),this.addField(e,a)},mxForm.prototype.addOption=function(e,t,n,a){var i=document.createElement("option");mxUtils.writeln(i,t),i.setAttribute("value",n),a&&i.setAttribute("selected",a),e.appendChild(i)},mxForm.prototype.addField=function(e,t){var n=document.createElement("tr"),a=document.createElement("td");return mxUtils.write(a,e),n.appendChild(a),(a=document.createElement("td")).appendChild(t),n.appendChild(a),this.body.appendChild(n),t},mxImage.prototype.src=null,mxImage.prototype.width=null,mxImage.prototype.height=null,mxDivResizer.prototype.resizeWidth=!0,mxDivResizer.prototype.resizeHeight=!0,mxDivResizer.prototype.handlingResize=!1,mxDivResizer.prototype.resize=function(){var e=this.getDocumentWidth(),t=this.getDocumentHeight(),n=parseInt(this.div.style.left),a=parseInt(this.div.style.right),i=parseInt(this.div.style.top),o=parseInt(this.div.style.bottom);this.resizeWidth&&!isNaN(n)&&!isNaN(a)&&0<=n&&0<=a&&0<e-a-n&&(this.div.style.width=e-a-n+"px"),this.resizeHeight&&!isNaN(i)&&!isNaN(o)&&0<=i&&0<=o&&0<t-i-o&&(this.div.style.height=t-i-o+"px")},mxDivResizer.prototype.getDocumentWidth=function(){return document.body.clientWidth},mxDivResizer.prototype.getDocumentHeight=function(){return document.body.clientHeight},mxDragSource.prototype.element=null,mxDragSource.prototype.dropHandler=null,mxDragSource.prototype.dragOffset=null,mxDragSource.prototype.dragElement=null,mxDragSource.prototype.previewElement=null,mxDragSource.prototype.enabled=!0,mxDragSource.prototype.currentGraph=null,mxDragSource.prototype.currentDropTarget=null,mxDragSource.prototype.currentPoint=null,mxDragSource.prototype.currentGuide=null,mxDragSource.prototype.currentHighlight=null,mxDragSource.prototype.autoscroll=!0,mxDragSource.prototype.guidesEnabled=!0,mxDragSource.prototype.gridEnabled=!0,mxDragSource.prototype.highlightDropTargets=!0,mxDragSource.prototype.dragElementZIndex=100,mxDragSource.prototype.dragElementOpacity=70,mxDragSource.prototype.isEnabled=function(){return this.enabled},mxDragSource.prototype.setEnabled=function(e){this.enabled=e},mxDragSource.prototype.isGuidesEnabled=function(){return this.guidesEnabled},mxDragSource.prototype.setGuidesEnabled=function(e){this.guidesEnabled=e},mxDragSource.prototype.isGridEnabled=function(){return this.gridEnabled},mxDragSource.prototype.setGridEnabled=function(e){this.gridEnabled=e},mxDragSource.prototype.getGraphForEvent=function(e){return null},mxDragSource.prototype.getDropTarget=function(e,t,n){return e.getCellAt(t,n)},mxDragSource.prototype.createDragElement=function(e){return this.element.cloneNode(!0)},mxDragSource.prototype.createPreviewElement=function(e){return null},mxDragSource.prototype.mouseDown=function(e){this.enabled&&!mxEvent.isConsumed(e)&&null==this.mouseMoveHandler&&(this.startDrag(e),this.mouseMoveHandler=mxUtils.bind(this,this.mouseMove),this.mouseUpHandler=mxUtils.bind(this,this.mouseUp),mxEvent.addGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler),mxEvent.consume(e,!0,!1))},mxDragSource.prototype.startDrag=function(e){this.dragElement=this.createDragElement(e),this.dragElement.style.position="absolute",this.dragElement.style.zIndex=this.dragElementZIndex,mxUtils.setOpacity(this.dragElement,this.dragElementOpacity)},mxDragSource.prototype.stopDrag=function(e){null!=this.dragElement&&(null!=this.dragElement.parentNode&&this.dragElement.parentNode.removeChild(this.dragElement),this.dragElement=null)},mxDragSource.prototype.graphContainsEvent=function(e,t){var n=mxEvent.getClientX(t),a=mxEvent.getClientY(t),i=mxUtils.getOffset(e.container),o=mxUtils.getScrollOrigin();return n>=i.x-o.x&&a>=i.y-o.y&&n<=i.x-o.x+e.container.offsetWidth&&a<=i.y-o.y+e.container.offsetHeight},mxDragSource.prototype.mouseMove=function(e){if(null!=(t=this.getGraphForEvent(e))&&!this.graphContainsEvent(t,e)&&(t=null),t!=this.currentGraph&&(null!=this.currentGraph&&this.dragExit(this.currentGraph),this.currentGraph=t,null!=this.currentGraph&&this.dragEnter(this.currentGraph)),null!=this.currentGraph&&this.dragOver(this.currentGraph,e),null==this.dragElement||null!=this.previewElement&&"visible"==this.previewElement.style.visibility)null!=this.dragElement&&(this.dragElement.style.visibility="hidden");else{var t=mxEvent.getClientX(e),n=mxEvent.getClientY(e);null==this.dragElement.parentNode&&document.body.appendChild(this.dragElement),this.dragElement.style.visibility="visible",null!=this.dragOffset&&(t+=this.dragOffset.x,n+=this.dragOffset.y),t+=document.body.scrollLeft||document.documentElement.scrollLeft,n+=document.body.scrollTop||document.documentElement.scrollTop,this.dragElement.style.left=t+"px",this.dragElement.style.top=n+"px"}mxEvent.consume(e)},mxDragSource.prototype.mouseUp=function(e){if(null!=this.currentGraph){if(null!=this.currentPoint&&(null==this.previewElement||"hidden"!=this.previewElement.style.visibility)){var t=this.currentGraph.view.scale,n=this.currentGraph.view.translate;this.drop(this.currentGraph,e,this.currentDropTarget,this.currentPoint.x/t-n.x,this.currentPoint.y/t-n.y)}this.dragExit(this.currentGraph)}this.stopDrag(e),mxEvent.removeGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler),this.currentGraph=this.mouseUpHandler=this.mouseMoveHandler=null,mxEvent.consume(e)},mxDragSource.prototype.dragEnter=function(e){e.isMouseDown=!0,this.previewElement=this.createPreviewElement(e),this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(e,e.graphHandler.getGuideStates())),this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(e,mxConstants.DROP_TARGET_COLOR))},mxDragSource.prototype.dragExit=function(e){this.currentPoint=this.currentDropTarget=null,e.isMouseDown=!1,null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null),null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null),null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)},mxDragSource.prototype.dragOver=function(e,t){var n=mxUtils.getOffset(e.container),a=mxUtils.getScrollOrigin(e.container),i=mxEvent.getClientX(t)-n.x+a.x;n=mxEvent.getClientY(t)-n.y+a.y;if(e.autoScroll&&(null==this.autoscroll||this.autoscroll)&&e.scrollPointToVisible(i,n,e.autoExtend),null!=this.currentHighlight&&e.isDropEnabled()&&(this.currentDropTarget=this.getDropTarget(e,i,n),a=e.getView().getState(this.currentDropTarget),this.currentHighlight.highlight(a)),null!=this.previewElement){null==this.previewElement.parentNode&&(e.container.appendChild(this.previewElement),this.previewElement.style.zIndex="3",this.previewElement.style.position="absolute");a=this.isGridEnabled()&&e.isGridEnabledEvent(t);var o=!0;if(null!=this.currentGuide&&this.currentGuide.isEnabledForEvent(t))o=new mxRectangle(0,0,o=parseInt(this.previewElement.style.width),s=parseInt(this.previewElement.style.height)),n=new mxPoint(i,n),n=this.currentGuide.move(o,n,a),o=!1,i=n.x,n=n.y;else if(a){a=e.view.scale;var s=e.view.translate,r=e.gridSize/2;i=(e.snap(i/a-s.x-r)+s.x)*a,n=(e.snap(n/a-s.y-r)+s.y)*a}null!=this.currentGuide&&o&&this.currentGuide.hide(),null!=this.previewOffset&&(i+=this.previewOffset.x,n+=this.previewOffset.y),this.previewElement.style.left=Math.round(i)+"px",this.previewElement.style.top=Math.round(n)+"px",this.previewElement.style.visibility="visible"}this.currentPoint=new mxPoint(i,n)},mxDragSource.prototype.drop=function(e,t,n,a,i){this.dropHandler(e,t,n,a,i),e.container.focus()},mxToolbar.prototype=new mxEventSource,mxToolbar.prototype.constructor=mxToolbar,mxToolbar.prototype.container=null,mxToolbar.prototype.enabled=!0,mxToolbar.prototype.noReset=!1,mxToolbar.prototype.updateDefaultMode=!0,mxToolbar.prototype.addItem=function(e,t,n,a,i,o){var s=document.createElement(null!=t?"img":"button"),r=i||(null!=o?"mxToolbarMode":"mxToolbarItem");return s.className=r,s.setAttribute("src",t),null!=e&&(null!=t?s.setAttribute("title",e):mxUtils.write(s,e)),this.container.appendChild(s),null!=n&&(mxEvent.addListener(s,"click",n),mxClient.IS_TOUCH&&mxEvent.addListener(s,"touchend",n)),e=mxUtils.bind(this,function(e){null!=a?s.setAttribute("src",t):s.style.backgroundColor=""}),mxEvent.addGestureListeners(s,mxUtils.bind(this,function(e){if(null!=a?s.setAttribute("src",a):s.style.backgroundColor="gray",null!=o){null==this.menu&&(this.menu=new mxPopupMenu,this.menu.init());var t=this.currentImg;this.menu.isMenuShowing()&&this.menu.hideMenu(),t!=s&&(this.currentImg=s,this.menu.factoryMethod=o,t=new mxPoint(s.offsetLeft,s.offsetTop+s.offsetHeight),this.menu.popup(t.x,t.y,null,e),this.menu.isMenuShowing()&&(s.className=r+"Selected",this.menu.hideMenu=function(){mxPopupMenu.prototype.hideMenu.apply(this),s.className=r,this.currentImg=null}))}}),null,e),mxEvent.addListener(s,"mouseout",e),s},mxToolbar.prototype.addCombo=function(e){var t=document.createElement("div");t.style.display="inline",t.className="mxToolbarComboContainer";var n=document.createElement("select");return n.className=e||"mxToolbarCombo",t.appendChild(n),this.container.appendChild(t),n},mxToolbar.prototype.addActionCombo=function(e,t){var n=document.createElement("select");return n.className=t||"mxToolbarCombo",this.addOption(n,e,null),mxEvent.addListener(n,"change",function(e){var t=n.options[n.selectedIndex];n.selectedIndex=0,null!=t.funct&&t.funct(e)}),this.container.appendChild(n),n},mxToolbar.prototype.addOption=function(e,t,n){var a=document.createElement("option");return mxUtils.writeln(a,t),"function"==typeof n?a.funct=n:a.setAttribute("value",n),e.appendChild(a),a},mxToolbar.prototype.addSwitchMode=function(e,t,n,a,i){var o=document.createElement("img");return o.initialClassName=i||"mxToolbarMode",o.className=o.initialClassName,o.setAttribute("src",t),o.altIcon=a,null!=e&&o.setAttribute("title",e),mxEvent.addListener(o,"click",mxUtils.bind(this,function(e){null!=(e=this.selectedMode.altIcon)?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",e)):this.selectedMode.className=this.selectedMode.initialClassName,this.updateDefaultMode&&(this.defaultMode=o),null!=(e=(this.selectedMode=o).altIcon)?(o.altIcon=o.getAttribute("src"),o.setAttribute("src",e)):o.className=o.initialClassName+"Selected",this.fireEvent(new mxEventObject(mxEvent.SELECT)),n()})),this.container.appendChild(o),null==this.defaultMode&&(this.defaultMode=o,this.selectMode(o),n()),o},mxToolbar.prototype.addMode=function(e,t,n,a,i,o){o=null==o||o;var s=document.createElement(null!=t?"img":"button");return s.initialClassName=i||"mxToolbarMode",s.className=s.initialClassName,s.setAttribute("src",t),s.altIcon=a,null!=e&&s.setAttribute("title",e),this.enabled&&o&&(mxEvent.addListener(s,"click",mxUtils.bind(this,function(e){this.selectMode(s,n),this.noReset=!1})),mxEvent.addListener(s,"dblclick",mxUtils.bind(this,function(e){this.selectMode(s,n),this.noReset=!0})),null==this.defaultMode&&(this.defaultMode=s,this.defaultFunction=n,this.selectMode(s,n))),this.container.appendChild(s),s},mxToolbar.prototype.selectMode=function(e,t){if(this.selectedMode!=e){if(null!=this.selectedMode){var n=this.selectedMode.altIcon;null!=n?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",n)):this.selectedMode.className=this.selectedMode.initialClassName}this.selectedMode=e,null!=(n=this.selectedMode.altIcon)?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",n)):this.selectedMode.className=this.selectedMode.initialClassName+"Selected",this.fireEvent(new mxEventObject(mxEvent.SELECT,"function",t))}},mxToolbar.prototype.resetMode=function(e){(e||!this.noReset)&&this.selectedMode!=this.defaultMode&&this.selectMode(this.defaultMode,this.defaultFunction)},mxToolbar.prototype.addSeparator=function(e){return this.addItem(null,e,null)},mxToolbar.prototype.addBreak=function(){mxUtils.br(this.container)},mxToolbar.prototype.addLine=function(){var e=document.createElement("hr");e.style.marginRight="6px",e.setAttribute("size","1"),this.container.appendChild(e)},mxToolbar.prototype.destroy=function(){mxEvent.release(this.container),this.selectedMode=this.defaultFunction=this.defaultMode=this.container=null,null!=this.menu&&this.menu.destroy()},mxSession.prototype=new mxEventSource,mxSession.prototype.constructor=mxSession,mxSession.prototype.model=null,mxSession.prototype.urlInit=null,mxSession.prototype.urlPoll=null,mxSession.prototype.urlNotify=null,mxSession.prototype.codec=null,mxSession.prototype.linefeed="&#xa;",mxSession.prototype.escapePostData=!0,mxSession.prototype.significantRemoteChanges=!0,mxSession.prototype.sent=0,mxSession.prototype.received=0,mxSession.prototype.debug=!1,mxSession.prototype.connected=!1,mxSession.prototype.suspended=!1,mxSession.prototype.polling=!1,mxSession.prototype.start=function(){this.debug?(this.connected=!0,this.fireEvent(new mxEventObject(mxEvent.CONNECT))):this.connected||this.get(this.urlInit,mxUtils.bind(this,function(e){this.connected=!0,this.fireEvent(new mxEventObject(mxEvent.CONNECT)),this.poll()}))},mxSession.prototype.suspend=function(){this.connected&&!this.suspended&&(this.suspended=!0,this.fireEvent(new mxEventObject(mxEvent.SUSPEND)))},mxSession.prototype.resume=function(e,t,n){this.connected&&this.suspended&&(this.suspended=!1,this.fireEvent(new mxEventObject(mxEvent.RESUME)),this.polling||this.poll())},mxSession.prototype.stop=function(e){this.connected&&(this.connected=!1),this.fireEvent(new mxEventObject(mxEvent.DISCONNECT,"reason",e))},mxSession.prototype.poll=function(){this.connected&&!this.suspended&&null!=this.urlPoll?(this.polling=!0,this.get(this.urlPoll,mxUtils.bind(this,function(){this.poll()}))):this.polling=!1},mxSession.prototype.notify=function(e,t,n){null!=e&&0<e.length&&(null!=this.urlNotify&&(this.debug?(mxLog.show(),mxLog.debug("mxSession.notify: "+this.urlNotify+" xml="+e)):(e="<message><delta>"+e+"</delta></message>",this.escapePostData&&(e=encodeURIComponent(e)),mxUtils.post(this.urlNotify,"xml="+e,t,n))),this.sent+=e.length,this.fireEvent(new mxEventObject(mxEvent.NOTIFY,"url",this.urlNotify,"xml",e)))},mxSession.prototype.get=function(n,a,t){if(void 0!==mxUtils){var i=mxUtils.bind(this,function(e){null!=t?t(e):this.stop(e)});mxUtils.get(n,mxUtils.bind(this,function(e){if(void 0!==mxUtils)if(e.isReady()&&404!=e.getStatus()){if(this.received+=e.getText().length,this.fireEvent(new mxEventObject(mxEvent.GET,"url",n,"request",e)),this.isValidResponse(e)){if(0<e.getText().length){var t=e.getDocumentElement();null==t?i("Invalid response: "+e.getText()):this.receive(t)}null!=a&&a(e)}}else i("Response not ready")}),function(e){i("Transmission error")})}},mxSession.prototype.isValidResponse=function(e){return e.getText().indexOf("<?php")<0},mxSession.prototype.encodeChanges=function(e,t){for(var n="",a=t?-1:1,i=t?e.length-1:0;0<=i&&i<e.length;i+=a){var o=this.codec.encode(e[i]);n=n+mxUtils.getXml(o,this.linefeed)}return n},mxSession.prototype.receive=function(e){if(null!=e&&e.nodeType==mxConstants.NODETYPE_ELEMENT){var t=e.getAttribute("namespace");for(null!=t&&(this.model.prefix=t+"-"),t=e.firstChild;null!=t;){var n=t.nodeName.toLowerCase();"state"==n?this.processState(t):"delta"==n&&this.processDelta(t),t=t.nextSibling}this.fireEvent(new mxEventObject(mxEvent.RECEIVE,"node",e))}},mxSession.prototype.processState=function(e){new mxCodec(e.ownerDocument).decode(e.firstChild,this.model)},mxSession.prototype.processDelta=function(e){for(e=e.firstChild;null!=e;)"edit"==e.nodeName&&this.processEdit(e),e=e.nextSibling},mxSession.prototype.processEdit=function(e){if(0<(e=this.decodeChanges(e)).length){var t=this.createUndoableEdit(e);this.model.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",t,"changes",e)),this.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",t)),this.fireEvent(new mxEventObject(mxEvent.FIRED,"edit",t))}},mxSession.prototype.createUndoableEdit=function(e){var t=new mxUndoableEdit(this.model,this.significantRemoteChanges);return t.changes=e,t.notify=function(){t.source.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",t,"changes",t.changes)),t.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,"edit",t,"changes",t.changes))},t},mxSession.prototype.decodeChanges=function(e){this.codec.document=e.ownerDocument;var t=[];for(e=e.firstChild;null!=e;){var n=this.decodeChange(e);null!=n&&t.push(n),e=e.nextSibling}return t},mxSession.prototype.decodeChange=function(e){var t=null;return e.nodeType==mxConstants.NODETYPE_ELEMENT&&(null!=(t="mxRootChange"==e.nodeName?new mxCodec(e.ownerDocument).decode(e):this.codec.decode(e))&&(t.model=this.model,t.execute(),"mxChildChange"==e.nodeName&&null==t.parent&&this.cellRemoved(t.child))),t},mxSession.prototype.cellRemoved=function(e,t){this.codec.putObject(e.getId(),e);for(var n=this.model.getChildCount(e),a=0;a<n;a++)this.cellRemoved(this.model.getChildAt(e,a))},mxUndoableEdit.prototype.source=null,mxUndoableEdit.prototype.changes=null,mxUndoableEdit.prototype.significant=null,mxUndoableEdit.prototype.undone=!1,mxUndoableEdit.prototype.redone=!1,mxUndoableEdit.prototype.isEmpty=function(){return 0==this.changes.length},mxUndoableEdit.prototype.isSignificant=function(){return this.significant},mxUndoableEdit.prototype.add=function(e){this.changes.push(e)},mxUndoableEdit.prototype.notify=function(){},mxUndoableEdit.prototype.die=function(){},mxUndoableEdit.prototype.undo=function(){if(!this.undone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var e=this.changes.length-1;0<=e;e--){var t=this.changes[e];null!=t.execute?t.execute():null!=t.undo&&t.undo(),this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",t))}this.undone=!0,this.redone=!1,this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()},mxUndoableEdit.prototype.redo=function(){if(!this.redone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var e=this.changes.length,t=0;t<e;t++){var n=this.changes[t];null!=n.execute?n.execute():null!=n.redo&&n.redo(),this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",n))}this.undone=!1,this.redone=!0,this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()},mxUndoManager.prototype=new mxEventSource,mxUndoManager.prototype.constructor=mxUndoManager,mxUndoManager.prototype.size=null,mxUndoManager.prototype.history=null,mxUndoManager.prototype.indexOfNextAdd=0,mxUndoManager.prototype.isEmpty=function(){return 0==this.history.length},mxUndoManager.prototype.clear=function(){this.history=[],this.indexOfNextAdd=0,this.fireEvent(new mxEventObject(mxEvent.CLEAR))},mxUndoManager.prototype.canUndo=function(){return 0<this.indexOfNextAdd},mxUndoManager.prototype.undo=function(){for(;0<this.indexOfNextAdd;){var e=this.history[--this.indexOfNextAdd];if(e.undo(),e.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",e));break}}},mxUndoManager.prototype.canRedo=function(){return this.indexOfNextAdd<this.history.length},mxUndoManager.prototype.redo=function(){for(var e=this.history.length;this.indexOfNextAdd<e;){var t=this.history[this.indexOfNextAdd++];if(t.redo(),t.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.REDO,"edit",t));break}}},mxUndoManager.prototype.undoableEditHappened=function(e){this.trim(),0<this.size&&this.size==this.history.length&&this.history.shift(),this.history.push(e),this.indexOfNextAdd=this.history.length,this.fireEvent(new mxEventObject(mxEvent.ADD,"edit",e))},mxUndoManager.prototype.trim=function(){if(this.history.length>this.indexOfNextAdd)for(var e=this.history.splice(this.indexOfNextAdd,this.history.length-this.indexOfNextAdd),t=0;t<e.length;t++)e[t].die()};var mxUrlConverter=function(e){var n=!0,a=null,i=null;return{isEnabled:function(){return n},setEnabled:function(e){n=e},getBaseUrl:function(){return a},setBaseUrl:function(e){a=e},getBaseDomain:function(){return a},setBaseDomain:function(e){a=e},isRelativeUrl:function(e){return"http://"!=e.substring(0,7)&&"https://"!=e.substring(0,8)&&"data:image"!=e.substring(0,10)},convert:function(e){if(n&&this.isRelativeUrl(e)){if(null==a){i=location.protocol+"//"+location.host;var t=(a=i+location.pathname).lastIndexOf("/");0<t&&(a=a.substring(0,t+1))}e="/"==e.charAt(0)?i+e:a+e}return e}}};function mxPanningManager(o){this.thread=null,this.active=!1,this.dy=this.dx=this.t0y=this.t0x=this.tdy=this.tdx=0,this.scrollbars=!1,this.scrollTop=this.scrollLeft=0,this.mouseListener={mouseDown:function(e,t){},mouseMove:function(e,t){},mouseUp:mxUtils.bind(this,function(e,t){this.active&&this.stop()})},o.addMouseListener(this.mouseListener),mxEvent.addListener(document,"mouseup",mxUtils.bind(this,function(){this.active&&this.stop()}));var s=mxUtils.bind(this,function(){return this.scrollbars=mxUtils.hasScrollbars(o.container),this.scrollLeft=o.container.scrollLeft,this.scrollTop=o.container.scrollTop,window.setInterval(mxUtils.bind(this,function(){if(this.tdx-=this.dx,this.tdy-=this.dy,this.scrollbars){var e=-o.container.scrollLeft-Math.ceil(this.dx),t=-o.container.scrollTop-Math.ceil(this.dy);o.panGraph(e,t),o.panDx=this.scrollLeft-o.container.scrollLeft,o.panDy=this.scrollTop-o.container.scrollTop,o.fireEvent(new mxEventObject(mxEvent.PAN))}else o.panGraph(this.getDx(),this.getDy())}),this.delay)});this.isActive=function(){return active},this.getDx=function(){return Math.round(this.tdx)},this.getDy=function(){return Math.round(this.tdy)},this.start=function(){this.t0x=o.view.translate.x,this.t0y=o.view.translate.y,this.active=!0},this.panTo=function(e,t,n,a){this.active||this.start(),this.scrollLeft=o.container.scrollLeft,this.scrollTop=o.container.scrollTop,a=null!=a?a:0;var i=o.container;this.dx=e+(null!=n?n:0)-i.scrollLeft-i.clientWidth,this.dx<0&&Math.abs(this.dx)<this.border?this.dx=this.border+this.dx:this.dx=this.handleMouseOut?Math.max(this.dx,0):0,0==this.dx&&(this.dx=e-i.scrollLeft,this.dx=0<this.dx&&this.dx<this.border?this.dx-this.border:this.handleMouseOut?Math.min(0,this.dx):0),this.dy=t+a-i.scrollTop-i.clientHeight,this.dy<0&&Math.abs(this.dy)<this.border?this.dy=this.border+this.dy:this.dy=this.handleMouseOut?Math.max(this.dy,0):0,0==this.dy&&(this.dy=t-i.scrollTop,this.dy=0<this.dy&&this.dy<this.border?this.dy-this.border:this.handleMouseOut?Math.min(0,this.dy):0),0!=this.dx||0!=this.dy?(this.dx*=this.damper,this.dy*=this.damper,null==this.thread&&(this.thread=s())):null!=this.thread&&(window.clearInterval(this.thread),this.thread=null)},this.stop=function(){if(this.active)if(this.active=!1,null!=this.thread&&(window.clearInterval(this.thread),this.thread=null),this.tdy=this.tdx=0,this.scrollbars)o.panDx=0,o.panDy=0,o.fireEvent(new mxEventObject(mxEvent.PAN));else{var e=o.panDx,t=o.panDy;0==e&&0==t||(o.panGraph(0,0),o.view.setTranslate(this.t0x+e/o.view.scale,this.t0y+t/o.view.scale))}},this.destroy=function(){o.removeMouseListener(this.mouseListener)}}function mxPopupMenu(e){null!=(this.factoryMethod=e)&&this.init()}function mxAutoSaveManager(e){this.changeHandler=mxUtils.bind(this,function(e,t){this.isEnabled()&&this.graphModelChanged(t.getProperty("edit").changes)}),this.setGraph(e)}function mxAnimation(e){this.delay=null!=e?e:20}function mxMorphing(e,t,n,a){mxAnimation.call(this,a),this.graph=e,this.steps=null!=t?t:6,this.ease=null!=n?n:1.5}function mxImageBundle(e){this.images=[],this.alt=null!=e&&e}function mxImageExport(){}function mxAbstractCanvas2D(){this.converter=this.createUrlConverter(),this.reset()}function mxXmlCanvas2D(e){mxAbstractCanvas2D.call(this),this.root=e,this.writeDefaults()}function mxSvgCanvas2D(e,t){mxAbstractCanvas2D.call(this),this.root=e,this.gradients=[],this.defs=null,this.styleEnabled=null!=t&&t;var n=null;if(e.ownerDocument!=document)for(n=e;null!=n&&"svg"!=n.nodeName;)n=n.parentNode;null!=n&&(0<n.getElementsByTagName("defs").length&&(this.defs=n.getElementsByTagName("defs")[0]),null==this.defs&&(this.defs=this.createElement("defs"),null!=n.firstChild?n.insertBefore(this.defs,n.firstChild):n.appendChild(this.defs)),this.styleEnabled&&this.defs.appendChild(this.createStyle()))}mxPanningManager.prototype.damper=1/6,mxPanningManager.prototype.delay=10,mxPanningManager.prototype.handleMouseOut=!0,mxPanningManager.prototype.border=0,mxPopupMenu.prototype=new mxEventSource,mxPopupMenu.prototype.constructor=mxPopupMenu,mxPopupMenu.prototype.submenuImage=mxClient.imageBasePath+"/submenu.gif",mxPopupMenu.prototype.zIndex=10006,mxPopupMenu.prototype.factoryMethod=null,mxPopupMenu.prototype.useLeftButtonForPopup=!1,mxPopupMenu.prototype.enabled=!0,mxPopupMenu.prototype.itemCount=0,mxPopupMenu.prototype.autoExpand=!1,mxPopupMenu.prototype.smartSeparators=!1,mxPopupMenu.prototype.labels=!0,mxPopupMenu.prototype.init=function(){this.table=document.createElement("table"),this.table.className="mxPopupMenu",this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.div=document.createElement("div"),this.div.className="mxPopupMenu",this.div.style.display="inline",this.div.style.zIndex=this.zIndex,this.div.appendChild(this.table),mxEvent.disableContextMenu(this.div)},mxPopupMenu.prototype.isEnabled=function(){return this.enabled},mxPopupMenu.prototype.setEnabled=function(e){this.enabled=e},mxPopupMenu.prototype.isPopupTrigger=function(e){return e.isPopupTrigger()||this.useLeftButtonForPopup&&mxEvent.isLeftMouseButton(e.getEvent())},mxPopupMenu.prototype.addItem=function(e,t,n,a,i,o){a=a||this,this.itemCount++,a.willAddSeparator&&(a.containsItems&&this.addSeparator(a,!0),a.willAddSeparator=!1),a.containsItems=!0;var s=document.createElement("tr");s.className="mxPopupMenuItem";var r=document.createElement("td");return r.className="mxPopupMenuIcon",null!=t?((i=document.createElement("img")).src=t,r.appendChild(i)):null!=i&&((t=document.createElement("div")).className=i,r.appendChild(t)),s.appendChild(r),this.labels&&((r=document.createElement("td")).className="mxPopupMenuItem"+(null==o||o?"":" disabled"),mxUtils.write(r,e),r.align="left",s.appendChild(r),(e=document.createElement("td")).className="mxPopupMenuItem"+(null==o||o?"":" disabled"),e.style.paddingRight="6px",e.style.textAlign="right",s.appendChild(e),null==a.div&&this.createSubmenu(a)),a.tbody.appendChild(s),(null==o||o)&&(mxEvent.addGestureListeners(s,mxUtils.bind(this,function(e){this.eventReceiver=s,a.activeRow!=s&&a.activeRow!=a&&(null!=a.activeRow&&null!=a.activeRow.div.parentNode&&this.hideSubmenu(a),null!=s.div&&(this.showSubmenu(a,s),a.activeRow=s)),mxEvent.consume(e)}),mxUtils.bind(this,function(e){a.activeRow!=s&&a.activeRow!=a&&(null!=a.activeRow&&null!=a.activeRow.div.parentNode&&this.hideSubmenu(a),this.autoExpand&&null!=s.div&&(this.showSubmenu(a,s),a.activeRow=s)),s.className="mxPopupMenuItemHover"}),mxUtils.bind(this,function(e){this.eventReceiver==s&&(a.activeRow!=s&&this.hideMenu(),null!=n&&n(e)),this.eventReceiver=null,mxEvent.consume(e)})),mxEvent.addListener(s,"mouseout",mxUtils.bind(this,function(e){s.className="mxPopupMenuItem"}))),s},mxPopupMenu.prototype.createSubmenu=function(e){e.table=document.createElement("table"),e.table.className="mxPopupMenu",e.tbody=document.createElement("tbody"),e.table.appendChild(e.tbody),e.div=document.createElement("div"),e.div.className="mxPopupMenu",e.div.style.position="absolute",e.div.style.display="inline",e.div.style.zIndex=this.zIndex,e.div.appendChild(e.table);var t=document.createElement("img");t.setAttribute("src",this.submenuImage),td=e.firstChild.nextSibling.nextSibling,td.appendChild(t)},mxPopupMenu.prototype.showSubmenu=function(e,t){if(null!=t.div){t.div.style.left=e.div.offsetLeft+t.offsetLeft+t.offsetWidth-1+"px",t.div.style.top=e.div.offsetTop+t.offsetTop+"px",document.body.appendChild(t.div);var n=parseInt(t.div.offsetLeft),a=parseInt(t.div.offsetWidth),i=document.body,o=document.documentElement;n+a>(i.scrollLeft||o.scrollLeft)+(i.clientWidth||o.clientWidth)&&(t.div.style.left=e.div.offsetLeft-a+(mxClient.IS_IE?6:-6)+"px"),mxUtils.fit(t.div)}},mxPopupMenu.prototype.addSeparator=function(e,t){if(e=e||this,this.smartSeparators&&!t)e.willAddSeparator=!0;else if(null!=e.tbody){e.willAddSeparator=!1;var n=document.createElement("tr"),a=document.createElement("td");a.className="mxPopupMenuIcon",a.style.padding="0 0 0 0px",n.appendChild(a),(a=document.createElement("td")).style.padding="0 0 0 0px",a.setAttribute("colSpan","2");var i=document.createElement("hr");i.setAttribute("size","1"),a.appendChild(i),n.appendChild(a),e.tbody.appendChild(n)}},mxPopupMenu.prototype.popup=function(e,t,n,a){if(null!=this.div&&null!=this.tbody&&null!=this.factoryMethod){for(this.div.style.left=e+"px",this.div.style.top=t+"px";null!=this.tbody.firstChild;)mxEvent.release(this.tbody.firstChild),this.tbody.removeChild(this.tbody.firstChild);this.itemCount=0,this.factoryMethod(this,n,a),0<this.itemCount&&(this.showMenu(),this.fireEvent(new mxEventObject(mxEvent.SHOW)))}},mxPopupMenu.prototype.isMenuShowing=function(){return null!=this.div&&this.div.parentNode==document.body},mxPopupMenu.prototype.showMenu=function(){9<=document.documentMode&&(this.div.style.filter="none"),document.body.appendChild(this.div),mxUtils.fit(this.div)},mxPopupMenu.prototype.hideMenu=function(){null!=this.div&&(null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.hideSubmenu(this),this.containsItems=!1)},mxPopupMenu.prototype.hideSubmenu=function(e){null!=e.activeRow&&(this.hideSubmenu(e.activeRow),null!=e.activeRow.div.parentNode&&e.activeRow.div.parentNode.removeChild(e.activeRow.div),e.activeRow=null)},mxPopupMenu.prototype.destroy=function(){null!=this.div&&(mxEvent.release(this.div),null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.div=null)},mxAutoSaveManager.prototype=new mxEventSource,mxAutoSaveManager.prototype.constructor=mxAutoSaveManager,mxAutoSaveManager.prototype.graph=null,mxAutoSaveManager.prototype.autoSaveDelay=10,mxAutoSaveManager.prototype.autoSaveThrottle=2,mxAutoSaveManager.prototype.autoSaveThreshold=5,mxAutoSaveManager.prototype.ignoredChanges=0,mxAutoSaveManager.prototype.lastSnapshot=0,mxAutoSaveManager.prototype.enabled=!0,mxAutoSaveManager.prototype.changeHandler=null,mxAutoSaveManager.prototype.isEnabled=function(){return this.enabled},mxAutoSaveManager.prototype.setEnabled=function(e){this.enabled=e},mxAutoSaveManager.prototype.setGraph=function(e){null!=this.graph&&this.graph.getModel().removeListener(this.changeHandler),this.graph=e,null!=this.graph&&this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler)},mxAutoSaveManager.prototype.save=function(){},mxAutoSaveManager.prototype.graphModelChanged=function(e){(e=((new Date).getTime()-this.lastSnapshot)/1e3)>this.autoSaveDelay||this.ignoredChanges>=this.autoSaveThreshold&&e>this.autoSaveThrottle?(this.save(),this.reset()):this.ignoredChanges++},mxAutoSaveManager.prototype.reset=function(){this.lastSnapshot=(new Date).getTime(),this.ignoredChanges=0},mxAutoSaveManager.prototype.destroy=function(){this.setGraph(null)},mxAnimation.prototype=new mxEventSource,mxAnimation.prototype.constructor=mxAnimation,mxAnimation.prototype.delay=null,mxAnimation.prototype.thread=null,mxAnimation.prototype.startAnimation=function(){null==this.thread&&(this.thread=window.setInterval(mxUtils.bind(this,this.updateAnimation),this.delay))},mxAnimation.prototype.updateAnimation=function(){this.fireEvent(new mxEventObject(mxEvent.EXECUTE))},mxAnimation.prototype.stopAnimation=function(){null!=this.thread&&(window.clearInterval(this.thread),this.thread=null,this.fireEvent(new mxEventObject(mxEvent.DONE)))},mxMorphing.prototype=new mxAnimation,mxMorphing.prototype.constructor=mxMorphing,mxMorphing.prototype.graph=null,mxMorphing.prototype.steps=null,mxMorphing.prototype.step=0,mxMorphing.prototype.ease=null,mxMorphing.prototype.cells=null,mxMorphing.prototype.updateAnimation=function(){var e=new mxCellStatePreview(this.graph);if(null!=this.cells)for(var t=0;t<this.cells.length;t++)this.animateCell(cells[t],e,!1);else this.animateCell(this.graph.getModel().getRoot(),e,!0);this.show(e),(e.isEmpty()||this.step++>=this.steps)&&this.stopAnimation()},mxMorphing.prototype.show=function(e){e.show()},mxMorphing.prototype.animateCell=function(e,t,n){var a=this.graph.getView().getState(e),i=null;if(null!=a&&(i=this.getDelta(a),this.graph.getModel().isVertex(e)&&(0!=i.x||0!=i.y))){var o=this.graph.view.getTranslate(),s=this.graph.view.getScale();i.x+=o.x*s,i.y+=o.y*s,t.moveState(a,-i.x/this.ease,-i.y/this.ease)}if(n&&!this.stopRecursion(a,i))for(a=this.graph.getModel().getChildCount(e),i=0;i<a;i++)this.animateCell(this.graph.getModel().getChildAt(e,i),t,n)},mxMorphing.prototype.stopRecursion=function(e,t){return null!=t&&(0!=t.x||0!=t.y)},mxMorphing.prototype.getDelta=function(e){var t=this.getOriginForCell(e.cell),n=this.graph.getView().getTranslate(),a=this.graph.getView().getScale();return e=new mxPoint(e.x/a-n.x,e.y/a-n.y),new mxPoint((t.x-e.x)*a,(t.y-e.y)*a)},mxMorphing.prototype.getOriginForCell=function(e){var t=null;return null!=e&&(t=this.getOriginForCell(this.graph.getModel().getParent(e)),null!=(e=this.graph.getCellGeometry(e))&&(t.x+=e.x,t.y+=e.y)),null==t&&(t=new mxPoint(-(t=this.graph.view.getTranslate()).x,-t.y)),t},mxImageBundle.prototype.images=null,mxImageBundle.prototype.images=null,mxImageBundle.prototype.putImage=function(e,t,n){this.images[e]={value:t,fallback:n}},mxImageBundle.prototype.getImage=function(e){var t=null;return null!=e&&(null!=(e=this.images[e])&&(t=this.alt?e.fallback:e.value)),t},mxImageExport.prototype.includeOverlays=!1,mxImageExport.prototype.drawState=function(e,t){null!=e&&(this.visitStatesRecursive(e,t,this.drawCellState),this.includeOverlays&&this.visitStatesRecursive(e,t,this.drawOverlays))},mxImageExport.prototype.visitStatesRecursive=function(e,t,n){if(null!=e){n(e,t);for(var a=e.view.graph,i=a.model.getChildCount(e.cell),o=0;o<i;o++){var s=a.view.getState(a.model.getChildAt(e.cell,o));this.visitStatesRecursive(s,t,n)}}},mxImageExport.prototype.drawCellState=function(e,t){e.shape instanceof mxShape&&(t.save(),e.shape.paint(t),t.restore()),null!=e.text&&(t.save(),e.text.paint(t),t.restore())},mxImageExport.prototype.drawOverlays=function(e,n){null!=e.overlays&&e.overlays.visit(function(e,t){t instanceof mxShape&&t.paint(n)})},mxAbstractCanvas2D.prototype.state=null,mxAbstractCanvas2D.prototype.states=null,mxAbstractCanvas2D.prototype.path=null,mxAbstractCanvas2D.prototype.rotateHtml=!0,mxAbstractCanvas2D.prototype.lastX=0,mxAbstractCanvas2D.prototype.lastY=0,mxAbstractCanvas2D.prototype.moveOp="M",mxAbstractCanvas2D.prototype.lineOp="L",mxAbstractCanvas2D.prototype.quadOp="Q",mxAbstractCanvas2D.prototype.curveOp="C",mxAbstractCanvas2D.prototype.closeOp="Z",mxAbstractCanvas2D.prototype.pointerEvents=!1,mxAbstractCanvas2D.prototype.createUrlConverter=function(){return new mxUrlConverter},mxAbstractCanvas2D.prototype.reset=function(){this.state=this.createState(),this.states=[]},mxAbstractCanvas2D.prototype.createState=function(){return{dx:0,dy:0,scale:1,alpha:1,fillColor:null,fillAlpha:1,gradientColor:null,gradientAlpha:1,gradientDirection:null,strokeColor:null,strokeWidth:1,dashed:!1,dashPattern:"3 3",lineCap:"flat",lineJoin:"miter",miterLimit:10,fontColor:"#000000",fontBackgroundColor:null,fontBorderColor:null,fontSize:mxConstants.DEFAULT_FONTSIZE,fontFamily:mxConstants.DEFAULT_FONTFAMILY,fontStyle:0,shadow:!1,shadowColor:mxConstants.SHADOWCOLOR,shadowAlpha:mxConstants.SHADOW_OPACITY,shadowDx:mxConstants.SHADOW_OFFSET_X,shadowDy:mxConstants.SHADOW_OFFSET_Y,rotation:0,rotationCx:0,rotationCy:0}},mxAbstractCanvas2D.prototype.format=function(e){return Math.round(parseFloat(e))},mxAbstractCanvas2D.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var e=this.state,t=2;t<arguments.length;t+=2)this.lastX=arguments[t-1],this.lastY=arguments[t],this.path.push(this.format((this.lastX+e.dx)*e.scale)),this.path.push(this.format((this.lastY+e.dy)*e.scale))},mxAbstractCanvas2D.prototype.rotatePoint=function(e,t,n,a,i){return n*=Math.PI/180,mxUtils.getRotatedPoint(new mxPoint(e,t),Math.cos(n),Math.sin(n),new mxPoint(a,i))},mxAbstractCanvas2D.prototype.save=function(){this.states.push(this.state),this.state=mxUtils.clone(this.state)},mxAbstractCanvas2D.prototype.restore=function(){this.state=this.states.pop()},mxAbstractCanvas2D.prototype.scale=function(e){this.state.scale*=e,this.state.strokeWidth*=e},mxAbstractCanvas2D.prototype.translate=function(e,t){this.state.dx+=e,this.state.dy+=t},mxAbstractCanvas2D.prototype.setAlpha=function(e){this.state.alpha=e},mxAbstractCanvas2D.prototype.setFillColor=function(e){e==mxConstants.NONE&&(e=null),this.state.fillColor=e,this.state.gradientColor=null},mxAbstractCanvas2D.prototype.setGradient=function(e,t,n,a,i,o,s,r,l){(n=this.state).fillColor=e,n.fillAlpha=null!=r?r:1,n.gradientColor=t,n.gradientAlpha=null!=l?l:1,n.gradientDirection=s},mxAbstractCanvas2D.prototype.setStrokeColor=function(e){e==mxConstants.NONE&&(e=null),this.state.strokeColor=e},mxAbstractCanvas2D.prototype.setStrokeWidth=function(e){this.state.strokeWidth=e},mxAbstractCanvas2D.prototype.setDashed=function(e){this.state.dashed=e},mxAbstractCanvas2D.prototype.setDashPattern=function(e){this.state.dashPattern=e},mxAbstractCanvas2D.prototype.setLineCap=function(e){this.state.lineCap=e},mxAbstractCanvas2D.prototype.setLineJoin=function(e){this.state.lineJoin=e},mxAbstractCanvas2D.prototype.setMiterLimit=function(e){this.state.miterLimit=e},mxAbstractCanvas2D.prototype.setFontColor=function(e){e==mxConstants.NONE&&(e=null),this.state.fontColor=e},mxAbstractCanvas2D.prototype.setFontBackgroundColor=function(e){e==mxConstants.NONE&&(e=null),this.state.fontBackgroundColor=e},mxAbstractCanvas2D.prototype.setFontBorderColor=function(e){e==mxConstants.NONE&&(e=null),this.state.fontBorderColor=e},mxAbstractCanvas2D.prototype.setFontSize=function(e){this.state.fontSize=e},mxAbstractCanvas2D.prototype.setFontFamily=function(e){this.state.fontFamily=e},mxAbstractCanvas2D.prototype.setFontStyle=function(e){null==e&&(e=0),this.state.fontStyle=e},mxAbstractCanvas2D.prototype.setShadow=function(e){this.state.shadow=e},mxAbstractCanvas2D.prototype.setShadowColor=function(e){e==mxConstants.NONE&&(e=null),this.state.shadowColor=e},mxAbstractCanvas2D.prototype.setShadowAlpha=function(e){this.state.shadowAlpha=e},mxAbstractCanvas2D.prototype.setShadowOffset=function(e,t){this.state.shadowDx=e,this.state.shadowDy=t},mxAbstractCanvas2D.prototype.begin=function(){this.lastY=this.lastX=0,this.path=[]},mxAbstractCanvas2D.prototype.moveTo=function(e,t){this.addOp(this.moveOp,e,t)},mxAbstractCanvas2D.prototype.lineTo=function(e,t){this.addOp(this.lineOp,e,t)},mxAbstractCanvas2D.prototype.quadTo=function(e,t,n,a){this.addOp(this.quadOp,e,t,n,a)},mxAbstractCanvas2D.prototype.curveTo=function(e,t,n,a,i,o){this.addOp(this.curveOp,e,t,n,a,i,o)},mxAbstractCanvas2D.prototype.arcTo=function(e,t,n,a,i,o,s){for(e=mxUtils.arcToCurves(this.lastX,this.lastY,e,t,n,a,i,o,s),t=0;t<e.length;t+=6)this.curveTo(e[t],e[t+1],e[t+2],e[t+3],e[t+4],e[t+5])},mxAbstractCanvas2D.prototype.close=function(e,t,n,a,i,o){this.addOp(this.closeOp)},mxAbstractCanvas2D.prototype.end=function(){},mxUtils.extend(mxXmlCanvas2D,mxAbstractCanvas2D),mxXmlCanvas2D.prototype.textEnabled=!0,mxXmlCanvas2D.prototype.compressed=!0,mxXmlCanvas2D.prototype.writeDefaults=function(){var e;(e=this.createElement("fontfamily")).setAttribute("family",mxConstants.DEFAULT_FONTFAMILY),this.root.appendChild(e),(e=this.createElement("fontsize")).setAttribute("size",mxConstants.DEFAULT_FONTSIZE),this.root.appendChild(e),(e=this.createElement("shadowcolor")).setAttribute("color",mxConstants.SHADOWCOLOR),this.root.appendChild(e),(e=this.createElement("shadowalpha")).setAttribute("alpha",mxConstants.SHADOW_OPACITY),this.root.appendChild(e),(e=this.createElement("shadowoffset")).setAttribute("dx",mxConstants.SHADOW_OFFSET_X),e.setAttribute("dy",mxConstants.SHADOW_OFFSET_Y),this.root.appendChild(e)},mxXmlCanvas2D.prototype.format=function(e){return parseFloat(parseFloat(e).toFixed(2))},mxXmlCanvas2D.prototype.createElement=function(e){return this.root.ownerDocument.createElement(e)},mxXmlCanvas2D.prototype.save=function(){this.compressed&&mxAbstractCanvas2D.prototype.save.apply(this,arguments),this.root.appendChild(this.createElement("save"))},mxXmlCanvas2D.prototype.restore=function(){this.compressed&&mxAbstractCanvas2D.prototype.restore.apply(this,arguments),this.root.appendChild(this.createElement("restore"))},mxXmlCanvas2D.prototype.scale=function(e){if(this.compressed){if(this.state.scale==e)return;mxAbstractCanvas2D.prototype.setAlpha.apply(this,arguments)}var t=this.createElement("scale");t.setAttribute("scale",e),this.root.appendChild(t)},mxXmlCanvas2D.prototype.translate=function(e,t){var n=this.createElement("translate");n.setAttribute("dx",this.format(e)),n.setAttribute("dy",this.format(t)),this.root.appendChild(n)},mxXmlCanvas2D.prototype.rotate=function(e,t,n,a,i){var o=this.createElement("rotate");(0!=e||t||n)&&(o.setAttribute("theta",this.format(e)),o.setAttribute("flipH",t?"1":"0"),o.setAttribute("flipV",n?"1":"0"),o.setAttribute("cx",this.format(a)),o.setAttribute("cy",this.format(i)),this.root.appendChild(o))},mxXmlCanvas2D.prototype.setAlpha=function(e){if(this.compressed){if(this.state.alpha==e)return;mxAbstractCanvas2D.prototype.setAlpha.apply(this,arguments)}var t=this.createElement("alpha");t.setAttribute("alpha",this.format(e)),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setFillColor=function(e){if(e==mxConstants.NONE&&(e=null),this.compressed){if(this.state.fillColor==e)return;mxAbstractCanvas2D.prototype.setFillColor.apply(this,arguments)}var t=this.createElement("fillcolor");t.setAttribute("color",null!=e?e:mxConstants.NONE),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setGradient=function(e,t,n,a,i,o,s,r,l){if(null!=e&&null!=t){mxAbstractCanvas2D.prototype.setGradient.apply(this,arguments);var d=this.createElement("gradient");d.setAttribute("c1",e),d.setAttribute("c2",t),d.setAttribute("x",this.format(n)),d.setAttribute("y",this.format(a)),d.setAttribute("w",this.format(i)),d.setAttribute("h",this.format(o)),null!=s&&d.setAttribute("direction",s),null!=r&&d.setAttribute("alpha1",r),null!=l&&d.setAttribute("alpha2",l),this.root.appendChild(d)}},mxXmlCanvas2D.prototype.setStrokeColor=function(e){if(e==mxConstants.NONE&&(e=null),this.compressed){if(this.state.strokeColor==e)return;mxAbstractCanvas2D.prototype.setStrokeColor.apply(this,arguments)}var t=this.createElement("strokecolor");t.setAttribute("color",null!=e?e:mxConstants.NONE),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setStrokeWidth=function(e){if(this.compressed){if(this.state.strokeWidth==e)return;mxAbstractCanvas2D.prototype.setStrokeWidth.apply(this,arguments)}var t=this.createElement("strokewidth");t.setAttribute("width",this.format(e)),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setDashed=function(e){if(this.compressed){if(this.state.dashed==e)return;mxAbstractCanvas2D.prototype.setDashed.apply(this,arguments)}var t=this.createElement("dashed");t.setAttribute("dashed",e?"1":"0"),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setDashPattern=function(e){if(this.compressed){if(this.state.dashPattern==e)return;mxAbstractCanvas2D.prototype.setDashPattern.apply(this,arguments)}var t=this.createElement("dashpattern");t.setAttribute("pattern",e),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setLineCap=function(e){if(this.compressed){if(this.state.lineCap==e)return;mxAbstractCanvas2D.prototype.setLineCap.apply(this,arguments)}var t=this.createElement("linecap");t.setAttribute("cap",e),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setLineJoin=function(e){if(this.compressed){if(this.state.lineJoin==e)return;mxAbstractCanvas2D.prototype.setLineJoin.apply(this,arguments)}var t=this.createElement("linejoin");t.setAttribute("join",e),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setMiterLimit=function(e){if(this.compressed){if(this.state.miterLimit==e)return;mxAbstractCanvas2D.prototype.setMiterLimit.apply(this,arguments)}var t=this.createElement("miterlimit");t.setAttribute("limit",e),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setFontColor=function(e){if(this.textEnabled){if(e==mxConstants.NONE&&(e=null),this.compressed){if(this.state.fontColor==e)return;mxAbstractCanvas2D.prototype.setFontColor.apply(this,arguments)}var t=this.createElement("fontcolor");t.setAttribute("color",null!=e?e:mxConstants.NONE),this.root.appendChild(t)}},mxXmlCanvas2D.prototype.setFontBackgroundColor=function(e){if(this.textEnabled){if(e==mxConstants.NONE&&(e=null),this.compressed){if(this.state.fontBackgroundColor==e)return;mxAbstractCanvas2D.prototype.setFontBackgroundColor.apply(this,arguments)}var t=this.createElement("fontbackgroundcolor");t.setAttribute("color",null!=e?e:mxConstants.NONE),this.root.appendChild(t)}},mxXmlCanvas2D.prototype.setFontBorderColor=function(e){if(this.textEnabled){if(e==mxConstants.NONE&&(e=null),this.compressed){if(this.state.fontBorderColor==e)return;mxAbstractCanvas2D.prototype.setFontBorderColor.apply(this,arguments)}var t=this.createElement("fontbordercolor");t.setAttribute("color",null!=e?e:mxConstants.NONE),this.root.appendChild(t)}},mxXmlCanvas2D.prototype.setFontSize=function(e){if(this.textEnabled){if(this.compressed){if(this.state.fontSize==e)return;mxAbstractCanvas2D.prototype.setFontSize.apply(this,arguments)}var t=this.createElement("fontsize");t.setAttribute("size",e),this.root.appendChild(t)}},mxXmlCanvas2D.prototype.setFontFamily=function(e){if(this.textEnabled){if(this.compressed){if(this.state.fontFamily==e)return;mxAbstractCanvas2D.prototype.setFontFamily.apply(this,arguments)}var t=this.createElement("fontfamily");t.setAttribute("family",e),this.root.appendChild(t)}},mxXmlCanvas2D.prototype.setFontStyle=function(e){if(this.textEnabled){if(null==e&&(e=0),this.compressed){if(this.state.fontStyle==e)return;mxAbstractCanvas2D.prototype.setFontStyle.apply(this,arguments)}var t=this.createElement("fontstyle");t.setAttribute("style",e),this.root.appendChild(t)}},mxXmlCanvas2D.prototype.setShadow=function(e){if(this.compressed){if(this.state.shadow==e)return;mxAbstractCanvas2D.prototype.setShadow.apply(this,arguments)}var t=this.createElement("shadow");t.setAttribute("enabled",e?"1":"0"),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setShadowColor=function(e){if(this.compressed){if(e==mxConstants.NONE&&(e=null),this.state.shadowColor==e)return;mxAbstractCanvas2D.prototype.setShadowColor.apply(this,arguments)}var t=this.createElement("shadowcolor");t.setAttribute("color",null!=e?e:mxConstants.NONE),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setShadowAlpha=function(e){if(this.compressed){if(this.state.shadowAlpha==e)return;mxAbstractCanvas2D.prototype.setShadowAlpha.apply(this,arguments)}var t=this.createElement("shadowalpha");t.setAttribute("alpha",e),this.root.appendChild(t)},mxXmlCanvas2D.prototype.setShadowOffset=function(e,t){if(this.compressed){if(this.state.shadowDx==e&&this.state.shadowDy==t)return;mxAbstractCanvas2D.prototype.setShadowOffset.apply(this,arguments)}var n=this.createElement("shadowoffset");n.setAttribute("dx",e),n.setAttribute("dy",t),this.root.appendChild(n)},mxXmlCanvas2D.prototype.rect=function(e,t,n,a){var i=this.createElement("rect");i.setAttribute("x",this.format(e)),i.setAttribute("y",this.format(t)),i.setAttribute("w",this.format(n)),i.setAttribute("h",this.format(a)),this.root.appendChild(i)},mxXmlCanvas2D.prototype.roundrect=function(e,t,n,a,i,o){var s=this.createElement("roundrect");s.setAttribute("x",this.format(e)),s.setAttribute("y",this.format(t)),s.setAttribute("w",this.format(n)),s.setAttribute("h",this.format(a)),s.setAttribute("dx",this.format(i)),s.setAttribute("dy",this.format(o)),this.root.appendChild(s)},mxXmlCanvas2D.prototype.ellipse=function(e,t,n,a){var i=this.createElement("ellipse");i.setAttribute("x",this.format(e)),i.setAttribute("y",this.format(t)),i.setAttribute("w",this.format(n)),i.setAttribute("h",this.format(a)),this.root.appendChild(i)},mxXmlCanvas2D.prototype.image=function(e,t,n,a,i,o,s,r){i=this.converter.convert(i);var l=this.createElement("image");l.setAttribute("x",this.format(e)),l.setAttribute("y",this.format(t)),l.setAttribute("w",this.format(n)),l.setAttribute("h",this.format(a)),l.setAttribute("src",i),l.setAttribute("aspect",o?"1":"0"),l.setAttribute("flipH",s?"1":"0"),l.setAttribute("flipV",r?"1":"0"),this.root.appendChild(l)},mxXmlCanvas2D.prototype.begin=function(){this.root.appendChild(this.createElement("begin")),this.lastY=this.lastX=0},mxXmlCanvas2D.prototype.moveTo=function(e,t){var n=this.createElement("move");n.setAttribute("x",this.format(e)),n.setAttribute("y",this.format(t)),this.root.appendChild(n),this.lastX=e,this.lastY=t},mxXmlCanvas2D.prototype.lineTo=function(e,t){var n=this.createElement("line");n.setAttribute("x",this.format(e)),n.setAttribute("y",this.format(t)),this.root.appendChild(n),this.lastX=e,this.lastY=t},mxXmlCanvas2D.prototype.quadTo=function(e,t,n,a){var i=this.createElement("quad");i.setAttribute("x1",this.format(e)),i.setAttribute("y1",this.format(t)),i.setAttribute("x2",this.format(n)),i.setAttribute("y2",this.format(a)),this.root.appendChild(i),this.lastX=n,this.lastY=a},mxXmlCanvas2D.prototype.curveTo=function(e,t,n,a,i,o){var s=this.createElement("curve");s.setAttribute("x1",this.format(e)),s.setAttribute("y1",this.format(t)),s.setAttribute("x2",this.format(n)),s.setAttribute("y2",this.format(a)),s.setAttribute("x3",this.format(i)),s.setAttribute("y3",this.format(o)),this.root.appendChild(s),this.lastX=i,this.lastY=o},mxXmlCanvas2D.prototype.close=function(){this.root.appendChild(this.createElement("close"))},mxXmlCanvas2D.prototype.text=function(e,t,n,a,i,o,s,r,l,d,c,m){if(this.textEnabled&&null!=i){mxUtils.isNode(i)&&(i=mxUtils.getOuterHtml(i));var u=this.createElement("text");u.setAttribute("x",this.format(e)),u.setAttribute("y",this.format(t)),u.setAttribute("w",this.format(n)),u.setAttribute("h",this.format(a)),u.setAttribute("str",i),null!=o&&u.setAttribute("align",o),null!=s&&u.setAttribute("valign",s),u.setAttribute("wrap",r?"1":"0"),null==l&&(l=""),u.setAttribute("format",l),null!=d&&u.setAttribute("fill",d?"1":"0"),null!=c&&u.setAttribute("clip",c?"1":"0"),null!=m&&u.setAttribute("rotation",m),this.root.appendChild(u)}},mxXmlCanvas2D.prototype.stroke=function(){this.root.appendChild(this.createElement("stroke"))},mxXmlCanvas2D.prototype.fill=function(){this.root.appendChild(this.createElement("fill"))},mxXmlCanvas2D.prototype.fillAndStroke=function(){this.root.appendChild(this.createElement("fillstroke"))},mxUtils.extend(mxSvgCanvas2D,mxAbstractCanvas2D),mxSvgCanvas2D.prototype.node=null,mxSvgCanvas2D.prototype.matchHtmlAlignment=!0,mxSvgCanvas2D.prototype.textEnabled=!0,mxSvgCanvas2D.prototype.foEnabled=!0,mxSvgCanvas2D.prototype.strokeTolerance=0,mxSvgCanvas2D.prototype.refCount=0,mxSvgCanvas2D.prototype.blockImagePointerEvents=!1,mxSvgCanvas2D.prototype.reset=function(){mxAbstractCanvas2D.prototype.reset.apply(this,arguments),this.gradients=[]},mxSvgCanvas2D.prototype.createStyle=function(e){return(e=this.createElement("style")).setAttribute("type","text/css"),mxUtils.write(e,"svg{font-family:"+mxConstants.DEFAULT_FONTFAMILY+";font-size:"+mxConstants.DEFAULT_FONTSIZE+";fill:none;stroke-miterlimit:10}"),e},mxSvgCanvas2D.prototype.createElement=function(e,t){if(null!=this.root.ownerDocument.createElementNS)return this.root.ownerDocument.createElementNS(t||mxConstants.NS_SVG,e);var n=this.root.ownerDocument.createElement(e);return null!=t&&n.setAttribute("xmlns",t),n},mxSvgCanvas2D.prototype.createGradientId=function(e,t,n,a,i){return"#"==e.charAt(0)&&(e=e.substring(1)),"#"==t.charAt(0)&&(t=t.substring(1)),e=e.toLowerCase()+"-"+n,t=t.toLowerCase()+"-"+a,(n=null)==i||i==mxConstants.DIRECTION_SOUTH?n="s":i==mxConstants.DIRECTION_EAST?n="e":(a=e,e=t,t=a,i==mxConstants.DIRECTION_NORTH?n="s":i==mxConstants.DIRECTION_WEST&&(n="e")),"mx-gradient-"+e+"-"+t+"-"+n},mxSvgCanvas2D.prototype.getSvgGradient=function(e,t,n,a,i){var o=this.createGradientId(e,t,n,a,i),s=this.gradients[o];if(null==s){var r=this.root.ownerSVGElement,l=0,d=o+"-"+l;if(null!=r)for(s=r.ownerDocument.getElementById(d);null!=s&&s.ownerSVGElement!=r;)d=o+"-"+l++,s=r.ownerDocument.getElementById(d);else d="id"+ ++this.refCount;null==s&&((s=this.createSvgGradient(e,t,n,a,i)).setAttribute("id",d),null!=this.defs?this.defs.appendChild(s):r.appendChild(s)),this.gradients[o]=s}return s.getAttribute("id")},mxSvgCanvas2D.prototype.createSvgGradient=function(e,t,n,a,i){var o=this.createElement("linearGradient");return o.setAttribute("x1","0%"),o.setAttribute("y1","0%"),o.setAttribute("x2","0%"),o.setAttribute("y2","0%"),null==i||i==mxConstants.DIRECTION_SOUTH?o.setAttribute("y2","100%"):i==mxConstants.DIRECTION_EAST?o.setAttribute("x2","100%"):i==mxConstants.DIRECTION_NORTH?o.setAttribute("y1","100%"):i==mxConstants.DIRECTION_WEST&&o.setAttribute("x1","100%"),n=n<1?";stop-opacity:"+n:"",(i=this.createElement("stop")).setAttribute("offset","0%"),i.setAttribute("style","stop-color:"+e+n),o.appendChild(i),n=a<1?";stop-opacity:"+a:"",(i=this.createElement("stop")).setAttribute("offset","100%"),i.setAttribute("style","stop-color:"+t+n),o.appendChild(i),o},mxSvgCanvas2D.prototype.addNode=function(e,t){var n=this.node,a=this.state;if(null!=n){if("path"==n.nodeName){if(!(null!=this.path&&0<this.path.length))return;n.setAttribute("d",this.path.join(" "))}e&&null!=a.fillColor?this.updateFill():this.styleEnabled||("ellipse"!=n.nodeName||!mxClient.IS_NS||mxClient.IS_GC||mxClient.IS_SF?n.setAttribute("fill","none"):n.setAttribute("fill","transparent"),e=!1),t&&null!=a.strokeColor?this.updateStroke():this.styleEnabled||n.setAttribute("stroke","none"),null!=a.transform&&0<a.transform.length&&n.setAttribute("transform",a.transform),a.shadow&&this.root.appendChild(this.createShadow(n)),0<this.strokeTolerance&&!e&&this.root.appendChild(this.createTolerance(n)),this.pointerEvents&&("path"!=n.nodeName||this.path[this.path.length-1]==this.closeOp)&&n.setAttribute("pointer-events","all"),this.root.appendChild(n)}},mxSvgCanvas2D.prototype.updateFill=function(){var e=this.state;e.alpha<1&&this.node.setAttribute("fill-opacity",e.alpha),null!=e.fillColor&&(null!=e.gradientColor?(e=this.getSvgGradient(e.fillColor,e.gradientColor,e.fillAlpha,e.gradientAlpha,e.gradientDirection),this.node.setAttribute("fill","url(#"+e+")")):this.node.setAttribute("fill",e.fillColor.toLowerCase()))},mxSvgCanvas2D.prototype.updateStroke=function(){var e=this.state;this.node.setAttribute("stroke",e.strokeColor.toLowerCase()),e.alpha<1&&this.node.setAttribute("stroke-opacity",e.alpha);var t=Math.max(1,this.format(e.strokeWidth*e.scale));1!=t&&this.node.setAttribute("stroke-width",t),"path"==this.node.nodeName&&this.updateStrokeAttributes(),e.dashed&&this.node.setAttribute("stroke-dasharray",this.createDashPattern(t))},mxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var e=this.state;if(null!=e.lineJoin&&"miter"!=e.lineJoin&&this.node.setAttribute("stroke-linejoin",e.lineJoin),null!=e.lineCap){var t=e.lineCap;"flat"==t&&(t="butt"),"butt"!=t&&this.node.setAttribute("stroke-linecap",t)}null!=e.miterLimit&&(!this.styleEnabled||10!=e.miterLimit)&&this.node.setAttribute("stroke-miterlimit",e.miterLimit)},mxSvgCanvas2D.prototype.createDashPattern=function(e){var t=this.state.dashPattern.split(" "),n=[];if(0<t.length)for(var a=0;a<t.length;a++)n[a]=Number(t[a])*e;return n.join(" ")},mxSvgCanvas2D.prototype.createTolerance=function(e){e=e.cloneNode(!0);var t=parseFloat(e.getAttribute("stroke-width")||1)+this.strokeTolerance;return e.setAttribute("pointer-events","stroke"),e.setAttribute("visibility","hidden"),e.removeAttribute("stroke-dasharray"),e.setAttribute("stroke-width",t),e.setAttribute("fill","none"),e.setAttribute("stroke",mxClient.IS_OP?"none":"white"),e},mxSvgCanvas2D.prototype.createShadow=function(e){e=e.cloneNode(!0);var t=this.state;return"none"!=e.getAttribute("fill")&&e.setAttribute("fill",t.shadowColor),"none"!=e.getAttribute("stroke")&&e.setAttribute("stroke",t.shadowColor),e.setAttribute("transform","translate("+this.format(t.shadowDx*t.scale)+","+this.format(t.shadowDy*t.scale)+")"+(t.transform||"")),e.setAttribute("opacity",t.shadowAlpha),e},mxSvgCanvas2D.prototype.rotate=function(e,t,n,a,i){if(0!=e||t||n){var o=this.state;if(a+=o.dx,i+=o.dy,a*=o.scale,i*=o.scale,o.transform=o.transform||"",t&&n)e+=180;else if(t^n){var s=t?a:0,r=t?-1:1,l=n?i:0,d=n?-1:1;o.transform+="translate("+this.format(s)+","+this.format(l)+")scale("+this.format(r)+","+this.format(d)+")translate("+this.format(-s)+","+this.format(-l)+")"}(t?!n:n)&&(e*=-1),0!=e&&(o.transform+="rotate("+this.format(e)+","+this.format(a)+","+this.format(i)+")"),o.rotation+=e,o.rotationCx=a,o.rotationCy=i}},mxSvgCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments),this.node=this.createElement("path")},mxSvgCanvas2D.prototype.rect=function(e,t,n,a){var i=this.state,o=this.createElement("rect");o.setAttribute("x",this.format((e+i.dx)*i.scale)),o.setAttribute("y",this.format((t+i.dy)*i.scale)),o.setAttribute("width",this.format(n*i.scale)),o.setAttribute("height",this.format(a*i.scale)),this.node=o},mxSvgCanvas2D.prototype.roundrect=function(e,t,n,a,i,o){this.rect(e,t,n,a),0<i&&this.node.setAttribute("rx",this.format(i*this.state.scale)),0<o&&this.node.setAttribute("ry",this.format(o*this.state.scale))},mxSvgCanvas2D.prototype.ellipse=function(e,t,n,a){var i=this.state,o=this.createElement("ellipse");o.setAttribute("cx",Math.round((e+n/2+i.dx)*i.scale)),o.setAttribute("cy",Math.round((t+a/2+i.dy)*i.scale)),o.setAttribute("rx",n/2*i.scale),o.setAttribute("ry",a/2*i.scale),this.node=o},mxSvgCanvas2D.prototype.image=function(e,t,n,a,i,o,s,r){i=this.converter.convert(i),o=null==o||o,s=null!=s&&s,r=null!=r&&r;var l=this.state;e+=l.dx,t+=l.dy;var d=this.createElement("image");if(d.setAttribute("x",this.format(e*l.scale)),d.setAttribute("y",this.format(t*l.scale)),d.setAttribute("width",this.format(n*l.scale)),d.setAttribute("height",this.format(a*l.scale)),null==d.setAttributeNS?d.setAttribute("xlink:href",i):d.setAttributeNS(mxConstants.NS_XLINK,"href",i),o||d.setAttribute("preserveAspectRatio","none"),l.alpha<1&&d.setAttribute("opacity",l.alpha),i=this.state.transform||"",s||r){var c=o=1,m=0,u=0;s&&(o=-1,m=-n-2*e),r&&(c=-1,u=-a-2*t),i+="scale("+o+","+c+")translate("+m+","+u+")"}0<i.length&&d.setAttribute("transform",i),this.root.appendChild(d),this.blockImagePointerEvents&&(d.setAttribute("style","pointer-events:none"),(d=this.createElement("rect")).setAttribute("visibility","hidden"),d.setAttribute("pointer-events","fill"),d.setAttribute("x",this.format(e*l.scale)),d.setAttribute("y",this.format(t*l.scale)),d.setAttribute("width",this.format(n*l.scale)),d.setAttribute("height",this.format(a*l.scale)),this.root.appendChild(d))},mxSvgCanvas2D.prototype.createDiv=function(e,t,n,a,i){return n=this.state,a="display:inline-block;font-size:"+Math.round(n.fontSize)+"px;font-family:"+n.fontFamily+";color:"+n.fontColor+";line-height:"+Math.round(n.fontSize*mxConstants.LINE_HEIGHT)+"px;"+a,(n.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="font-weight:bold;"),(n.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="font-style:italic;"),(n.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(a+="font-decoration:underline;"),t==mxConstants.ALIGN_CENTER?a+="text-align:center;":t==mxConstants.ALIGN_RIGHT&&(a+="text-align:right;"),t="",null!=n.fontBackgroundColor&&(t+="background-color:"+n.fontBackgroundColor+";"),null!=n.fontBorderColor&&(t+="border:1px solid "+n.fontBorderColor+";"),mxUtils.isNode(e)||((n=document.createElement("textarea")).innerHTML=e.replace(/&lt;/g,"&amp;lt;").replace(/&gt;/g,"&amp;gt;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=n.value,i?a+=t:0<t.length&&(e='<div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;'+t+'">'+e+"</div>")),!mxClient.IS_IE&&document.createElementNS?((i=document.createElementNS("http://www.w3.org/1999/xhtml","div")).setAttribute("style",a),mxUtils.isNode(e)?this.root.ownerDocument!=document?i.appendChild(e.cloneNode(!0)):i.appendChild(e):i.innerHTML=e,i):(mxUtils.isNode(e)&&this.root.ownerDocument!=document&&(e=e.outerHTML),e=e.replace(/<br>/g,"<br />").replace(/<hr>/g,"<hr />"),mxUtils.parseXml('<div xmlns="http://www.w3.org/1999/xhtml" style="'+a+'">'+e+"</div>").documentElement)},mxSvgCanvas2D.prototype.text=function(e,t,n,a,i,o,s,r,l,d,c,m){if(this.textEnabled&&null!=i){m=null!=m?m:0;var u=this.state;if(e+=u.dx,t+=u.dy,this.foEnabled&&"html"==l){var p="vertical-align:top;";if(c?(p+="overflow:hidden;",0<a&&(p+="max-height:"+Math.round(a)+"px;"),0<n&&(p+="width:"+Math.round(n)+"px;")):d&&(p+="width:"+Math.round(n)+"px;",0<a&&(p+="max-height:"+Math.round(a)+"px;")),r?(!c&&0<n&&(p+="width:"+Math.round(n)+"px;"),p+="white-space:normal;"):p+="white-space:nowrap;",r=this.createElement("g"),u.alpha<1&&r.setAttribute("opacity",u.alpha),(l=this.createElement("foreignObject")).setAttribute("pointer-events","all"),null!=(p=this.createDiv(i,o,s,p,d))){r.appendChild(l),this.root.appendChild(r);var g=0;if(mxClient.IS_IE&&!mxClient.IS_SVG){var v=document.createElement("div");v.style.cssText=p.getAttribute("style"),v.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",v.style.visibility="hidden",v.innerHTML=mxUtils.isNode(i)?i.outerHTML:i,document.body.appendChild(v),g=v.offsetWidth,a=mxClient.IS_QUIRKS&&0<a&&c?Math.min(a,v.offsetHeight+2):v.offsetHeight,v.parentNode.removeChild(v),l.appendChild(p)}else this.root.ownerDocument!=document?(p.style.visibility="hidden",document.body.appendChild(p),g=p.offsetWidth,a=p.offsetHeight,l.appendChild(p),p.style.visibility=""):(l.appendChild(p),g=p.offsetWidth,a=p.offsetHeight);n=d?Math.max(n,g):g,u.alpha<1&&r.setAttribute("opacity",u.alpha),d=i=0,o==mxConstants.ALIGN_CENTER?i-=n/2:o==mxConstants.ALIGN_RIGHT&&(i-=n),e+=i,s==mxConstants.ALIGN_MIDDLE?d-=a/2:s==mxConstants.ALIGN_BOTTOM&&(d-=a),t+=d,o=1!=u.scale?"scale("+u.scale+")":"",0!=u.rotation&&this.rotateHtml?(o+="rotate("+u.rotation+","+n/2+","+a/2+")",e=(t=this.rotatePoint((e+n/2)*u.scale,(t+a/2)*u.scale,u.rotation,u.rotationCx,u.rotationCy)).x-n*u.scale/2,t=t.y-a*u.scale/2):(e*=u.scale,t*=u.scale),0!=m&&(o+="rotate("+m+","+-i+","+-d+")"),r.setAttribute("transform","translate("+Math.round(e)+","+Math.round(t)+")"+o),l.setAttribute("width",Math.round(Math.max(1,n))),l.setAttribute("height",Math.round(Math.max(1,a)))}}else this.plainText(e,t,n,a,i,o,s,r,d,c,m)}},mxSvgCanvas2D.prototype.createClip=function(e,t,n,a){for(var i="mx-clip-"+(e=Math.round(e))+"-"+(t=Math.round(t))+"-"+(n=Math.round(n))+"-"+(a=Math.round(a)),o=0,s=i+"-"+o;null!=document.getElementById(s);)s=i+"-"+ ++o;return clip=this.createElement("clipPath"),clip.setAttribute("id",s),(i=this.createElement("rect")).setAttribute("x",e),i.setAttribute("y",t),i.setAttribute("width",n),i.setAttribute("height",a),clip.appendChild(i),clip},mxSvgCanvas2D.prototype.plainText=function(e,t,n,a,i,o,s,r,l,d,c){c=null!=c?c:0,r=this.state;var m=Math.round(r.fontSize),u=this.createElement("g"),p=r.transform||"";if(0!=c&&(p+="rotate("+c+","+this.format(e*r.scale)+","+this.format(t*r.scale)+")"),d&&0<n&&0<a){var g=e;c=t,o==mxConstants.ALIGN_CENTER?g-=n/2:o==mxConstants.ALIGN_RIGHT&&(g-=n),s==mxConstants.ALIGN_MIDDLE?c-=a/2:s==mxConstants.ALIGN_BOTTOM&&(c-=a),c=this.createClip(g*r.scale-2,c*r.scale-2,n*r.scale+4,a*r.scale+4),null!=this.defs?this.defs.appendChild(c):this.root.appendChild(c),u.setAttribute("clip-path","url(#"+c.getAttribute("id")+")")}this.updateFont(u,o),"start"!=(c=o==mxConstants.ALIGN_RIGHT?"end":o==mxConstants.ALIGN_CENTER?"middle":"start")&&u.setAttribute("text-anchor",c),(!this.styleEnabled||m!=mxConstants.DEFAULT_FONTSIZE)&&u.setAttribute("font-size",Math.round(m*r.scale)+"px"),0<p.length&&u.setAttribute("transform",p),r.alpha<1&&u.setAttribute("opacity",r.alpha);p=i.split("\n"),g=Math.round(m*mxConstants.LINE_HEIGHT);var v=m+(p.length-1)*g;for(c=t+m-1,s==mxConstants.ALIGN_MIDDLE?c-=(a=(this.matchHtmlAlignment&&d&&0<a?Math.min(v,a):v)/2)+1:s==mxConstants.ALIGN_BOTTOM&&(c-=(a=this.matchHtmlAlignment&&d&&0<a?Math.min(v,a):v)+2),a=0;a<p.length;a++)0<p[a].length&&0<mxUtils.trim(p[a]).length&&((d=this.createElement("text")).setAttribute("x",this.format(e*r.scale)),d.setAttribute("y",this.format(c*r.scale)),mxUtils.write(d,p[a]),u.appendChild(d)),c+=g;this.root.appendChild(u),this.addTextBackground(u,i,e,t,n,v,o,s,l)},mxSvgCanvas2D.prototype.updateFont=function(e){var t=this.state;e.setAttribute("fill",t.fontColor),(!this.styleEnabled||t.fontFamily!=mxConstants.DEFAULT_FONTFAMILY)&&e.setAttribute("font-family",t.fontFamily),(t.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&e.setAttribute("font-weight","bold"),(t.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&e.setAttribute("font-style","italic"),(t.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&e.setAttribute("text-decoration","underline")},mxSvgCanvas2D.prototype.addTextBackground=function(e,t,n,a,i,o,s,r,l){var d=this.state;if(null!=d.fontBackgroundColor||null!=d.fontBorderColor){var c=null;l?(s==mxConstants.ALIGN_CENTER?n-=i/2:s==mxConstants.ALIGN_RIGHT&&(n-=i),r==mxConstants.ALIGN_MIDDLE?a-=o/2:r==mxConstants.ALIGN_BOTTOM&&(a-=o),c=new mxRectangle((n+1)*d.scale,a*d.scale,(i-2)*d.scale,(o+2)*d.scale)):null!=e.getBBox&&this.root.ownerDocument==document?(c=e.getBBox(),t=mxClient.IS_IE&&mxClient.IS_SVG,c=new mxRectangle(c.x,c.y+(t?0:1),c.width,c.height+(t?1:0))):((c=document.createElement("div")).style.lineHeight=Math.round(d.fontSize*mxConstants.LINE_HEIGHT)+"px",c.style.fontSize=Math.round(d.fontSize)+"px",c.style.fontFamily=d.fontFamily,c.style.whiteSpace="nowrap",c.style.position="absolute",c.style.visibility="hidden",c.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",c.style.zoom="1",(d.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(c.style.fontWeight="bold"),(d.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(c.style.fontStyle="italic"),t=mxUtils.htmlEntities(t,!1),c.innerHTML=t.replace(/\n/g,"<br/>"),document.body.appendChild(c),i=c.offsetWidth,o=c.offsetHeight,c.parentNode.removeChild(c),s==mxConstants.ALIGN_CENTER?n-=i/2:s==mxConstants.ALIGN_RIGHT&&(n-=i),r==mxConstants.ALIGN_MIDDLE?a-=o/2:r==mxConstants.ALIGN_BOTTOM&&(a-=o),c=new mxRectangle((n+1)*d.scale,(a+2)*d.scale,i*d.scale,(o+1)*d.scale)),null!=c&&((t=this.createElement("rect")).setAttribute("fill",d.fontBackgroundColor||"none"),t.setAttribute("stroke",d.fontBorderColor||"none"),t.setAttribute("x",Math.floor(c.x-1)),t.setAttribute("y",Math.floor(c.y-1)),t.setAttribute("width",Math.ceil(c.width+2)),t.setAttribute("height",Math.ceil(c.height)),d=null!=d.fontBorderColor?Math.max(1,this.format(d.scale)):0,t.setAttribute("stroke-width",d),this.root.ownerDocument==document&&1==mxUtils.mod(d,2)&&t.setAttribute("transform","translate(0.5, 0.5)"),e.insertBefore(t,e.firstChild))}},mxSvgCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)},mxSvgCanvas2D.prototype.fill=function(){this.addNode(!0,!1)},mxSvgCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};var mxVmlCanvas2D=function(e){mxAbstractCanvas2D.call(this),this.root=e};function mxGuide(e,t){this.graph=e,this.setStates(t)}function mxStencil(e){this.desc=e,this.parseDescription(),this.parseConstraints()}function mxShape(e){this.stencil=e,this.strokewidth=1,this.rotation=0,this.opacity=100,this.flipV=this.flipH=!1}mxUtils.extend(mxVmlCanvas2D,mxAbstractCanvas2D),mxVmlCanvas2D.prototype.node=null,mxVmlCanvas2D.prototype.textEnabled=!0,mxVmlCanvas2D.prototype.moveOp="m",mxVmlCanvas2D.prototype.lineOp="l",mxVmlCanvas2D.prototype.curveOp="c",mxVmlCanvas2D.prototype.closeOp="x",mxVmlCanvas2D.prototype.rotatedHtmlBackground="",mxVmlCanvas2D.prototype.vmlScale=1,mxVmlCanvas2D.prototype.addNode=function(e,t){var n=this.node,a=this.state;if(null!=n){if("shape"==n.nodeName){if(!(null!=this.path&&0<this.path.length))return;n.path=this.path.join(" ")+" e",n.style.width=this.root.style.width,n.style.height=this.root.style.height,n.coordsize=parseInt(n.style.width)+" "+parseInt(n.style.height)}n.strokeweight=this.format(Math.max(1,a.strokeWidth*a.scale/this.vmlScale))+"px",a.shadow&&this.root.appendChild(this.createShadow(n,e&&null!=a.fillColor,t&&null!=a.strokeColor)),t&&null!=a.strokeColor?(n.stroked="true",n.strokecolor=a.strokeColor):n.stroked="false",n.appendChild(this.createStroke()),e&&null!=a.fillColor?n.appendChild(this.createFill()):!this.pointerEvents||"shape"==n.nodeName&&this.path[this.path.length-1]!=this.closeOp?n.filled="false":n.appendChild(this.createTransparentFill()),this.root.appendChild(n)}},mxVmlCanvas2D.prototype.createTransparentFill=function(){var e=document.createElement(mxClient.VML_PREFIX+":fill");return e.src=mxClient.imageBasePath+"/transparent.gif",e.type="tile",e},mxVmlCanvas2D.prototype.createFill=function(){var e=this.state,t=document.createElement(mxClient.VML_PREFIX+":fill");if(t.color=e.fillColor,null!=e.gradientColor){t.type="gradient",t.method="none",t.color2=e.gradientColor;var n=180-e.rotation;n=e.gradientDirection==mxConstants.DIRECTION_WEST?n-(90+("x"==this.root.style.flip?180:0)):e.gradientDirection==mxConstants.DIRECTION_EAST?n+(90+("x"==this.root.style.flip?180:0)):e.gradientDirection==mxConstants.DIRECTION_NORTH?n-(180+("y"==this.root.style.flip?-180:0)):n+("y"==this.root.style.flip?-180:0);"x"!=this.root.style.flip&&"y"!=this.root.style.flip||(n*=-1),t.angle=mxUtils.mod(n,360),t.opacity=100*e.alpha*e.fillAlpha+"%",t.setAttribute(mxClient.OFFICE_PREFIX+":opacity2",100*e.alpha*e.gradientAlpha+"%")}else e.alpha<1&&(t.opacity=100*e.alpha+"%");return t},mxVmlCanvas2D.prototype.createStroke=function(){var e=this.state,t=document.createElement(mxClient.VML_PREFIX+":stroke");return t.endcap=e.lineCap||"flat",t.joinstyle=e.lineJoin||"miter",t.miterlimit=e.miterLimit||"10",e.alpha<1&&(t.opacity=100*e.alpha+"%"),e.dashed&&(t.dashstyle=this.getVmlDashStyle()),t},mxVmlCanvas2D.prototype.getVmlDashStyle=function(){var e="dash";if(null!=this.state.dashPattern){var t=this.state.dashPattern.split(" ");0<t.length&&1==t[0]&&(e="0 2")}return e},mxVmlCanvas2D.prototype.createShadow=function(e,t,n){var a=this.state,i=-a.rotation*(Math.PI/180),o=Math.cos(i),s=(i=Math.sin(i),a.shadowDx*a.scale),r=a.shadowDy*a.scale;"x"==this.root.style.flip?s*=-1:"y"==this.root.style.flip&&(r*=-1);var l=e.cloneNode(!0);return l.style.marginLeft=Math.round(s*o-r*i)+"px",l.style.marginTop=Math.round(s*i+r*o)+"px",8==document.documentMode&&(l.strokeweight=e.strokeweight,"shape"==e.nodeName&&(l.path=this.path.join(" ")+" e",l.style.width=this.root.style.width,l.style.height=this.root.style.height,l.coordsize=parseInt(e.style.width)+" "+parseInt(e.style.height))),n?(l.strokecolor=a.shadowColor,l.appendChild(this.createShadowStroke())):l.stroked="false",t?l.appendChild(this.createShadowFill()):l.filled="false",l},mxVmlCanvas2D.prototype.createShadowFill=function(){var e=document.createElement(mxClient.VML_PREFIX+":fill");return e.color=this.state.shadowColor,e.opacity=100*this.state.alpha*this.state.shadowAlpha+"%",e},mxVmlCanvas2D.prototype.createShadowStroke=function(){var e=this.createStroke();return e.opacity=100*this.state.alpha*this.state.shadowAlpha+"%",e},mxVmlCanvas2D.prototype.rotate=function(e,t,n,a,i){t&&n?e+=180:t?this.root.style.flip="x":n&&(this.root.style.flip="y"),(t?!n:n)&&(e*=-1),this.root.style.rotation=e,this.state.rotation+=e,this.state.rotationCx=a,this.state.rotationCy=i},mxVmlCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments),this.node=document.createElement(mxClient.VML_PREFIX+":shape"),this.node.style.position="absolute"},mxVmlCanvas2D.prototype.quadTo=function(e,t,n,a){var i=this.state,o=(this.lastX+i.dx)*i.scale,s=(this.lastY+i.dy)*i.scale;e=(e+i.dx)*i.scale;s+=2/3*((t=(t+i.dy)*i.scale)-s);var r=(n=(n+i.dx)*i.scale)+2/3*(e-n);t=(a=(a+i.dy)*i.scale)+2/3*(t-a),this.path.push("c "+this.format(o+2/3*(e-o))+" "+this.format(s)+" "+this.format(r)+" "+this.format(t)+" "+this.format(n)+" "+this.format(a)),this.lastX=n/i.scale-i.dx,this.lastY=a/i.scale-i.dy},mxVmlCanvas2D.prototype.createRect=function(e,t,n,a,i){var o=this.state;return(e=document.createElement(e)).style.position="absolute",e.style.left=this.format((t+o.dx)*o.scale)+"px",e.style.top=this.format((n+o.dy)*o.scale)+"px",e.style.width=this.format(a*o.scale)+"px",e.style.height=this.format(i*o.scale)+"px",e},mxVmlCanvas2D.prototype.rect=function(e,t,n,a){this.node=this.createRect(mxClient.VML_PREFIX+":rect",e,t,n,a)},mxVmlCanvas2D.prototype.roundrect=function(e,t,n,a,i,o){this.node=this.createRect(mxClient.VML_PREFIX+":roundrect",e,t,n,a),this.node.setAttribute("arcsize",Math.max(100*i/n,100*o/a)+"%")},mxVmlCanvas2D.prototype.ellipse=function(e,t,n,a){this.node=this.createRect(mxClient.VML_PREFIX+":oval",e,t,n,a)},mxVmlCanvas2D.prototype.image=function(e,t,n,a,i,o,s,r){var l=null;o?((l=this.createRect(mxClient.VML_PREFIX+":rect",e,t,n,a)).stroked="false",(e=document.createElement(mxClient.VML_PREFIX+":fill")).aspect=o?"atmost":"ignore",e.rotate="true",e.type="frame",e.src=i,l.appendChild(e)):(l=this.createRect(mxClient.VML_PREFIX+":image",e,t,n,a)).src=i,s&&r?l.style.rotation="180":s?l.style.flip="x":r&&(l.style.flip="y"),this.state.alpha<1&&(l.style.filter+="alpha(opacity="+100*this.state.alpha+")"),this.root.appendChild(l)},mxVmlCanvas2D.prototype.createDiv=function(e,t,n,a){n=document.createElement("div");var i=this.state,o="";return null!=i.fontBackgroundColor&&(o+="background-color:"+i.fontBackgroundColor+";"),null!=i.fontBorderColor&&(o+="border:1px solid "+i.fontBorderColor+";"),mxUtils.isNode(e)?n.appendChild(e):0<o.length&&!a?((a=document.createElement("div")).style.cssText=o,a.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",a.style.zoom="1",a.innerHTML=e,n.appendChild(a)):(n.style.cssText=o,n.innerHTML=e),(e=n.style).fontSize=Math.round(i.fontSize/this.vmlScale)+"px",e.fontFamily=i.fontFamily,e.color=i.fontColor,e.verticalAlign="top",e.textAlign=t||"left",e.lineHeight=Math.round(i.fontSize*mxConstants.LINE_HEIGHT/this.vmlScale)+"px",(i.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(e.fontWeight="bold"),(i.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(e.fontStyle="italic"),(i.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(e.fontDecoration="underline"),n},mxVmlCanvas2D.prototype.text=function(e,t,n,a,i,o,s,r,l,d,c,m){if(this.textEnabled&&null!=i){var u=this.state;if("html"==l){null!=u.rotation&&(e=(t=this.rotatePoint(e,t,u.rotation,u.rotationCx,u.rotationCy)).x,t=t.y),8==document.documentMode?(e+=u.dx,t+=u.dy):(e*=u.scale,t*=u.scale),(l=8==document.documentMode?document.createElement(mxClient.VML_PREFIX+":group"):document.createElement("div")).style.position="absolute",l.style.display="inline",l.style.left=this.format(e)+"px",l.style.top=this.format(t)+"px",l.style.zoom=u.scale;var p=document.createElement("div");p.style.position="relative",p.style.display="inline";var g=(v=mxUtils.getAlignmentAsPoint(o,s)).x,v=v.y;if(i=this.createDiv(i,o,s,d),o=document.createElement("div"),r?(!c&&0<n&&(i.style.width=Math.round(n)+"px"),i.style.whiteSpace="normal"):i.style.whiteSpace="nowrap",r=u.rotation+(m||0),this.rotateHtml&&0!=r?(o.style.display="inline",o.style.zoom="1",o.appendChild(i),8==document.documentMode&&"DIV"!=this.root.nodeName?(p.appendChild(o),l.appendChild(p)):l.appendChild(o)):8==document.documentMode?(p.appendChild(i),l.appendChild(p)):(i.style.display="inline",l.appendChild(i)),"DIV"!=this.root.nodeName?((m=document.createElement(mxClient.VML_PREFIX+":rect")).stroked="false",m.filled="false",m.appendChild(l),this.root.appendChild(m)):this.root.appendChild(l),c?(i.style.overflow="hidden",0<n&&(i.style.width=Math.round(n)+"px"),0<a&&8==document.documentMode&&(i.style.maxHeight=Math.round(a)+"px")):d&&(i.style.width=n+"px",0<a&&(i.style.maxHeight=Math.round(a)+"px")),this.rotateHtml&&0!=r){n=r*(Math.PI/180),r=parseFloat(parseFloat(Math.cos(n)).toFixed(8)),m=parseFloat(parseFloat(Math.sin(-n)).toFixed(8)),(n%=2*Math.PI)<0&&(n+=2*Math.PI),(n%=Math.PI)>Math.PI/2&&(n=Math.PI-n),s=Math.cos(n);var h=Math.sin(n);8==document.documentMode&&(i.style.display="inline-block",o.style.display="inline-block",p.style.display="inline-block"),i.style.visibility="hidden",document.body.appendChild(i),n=i.offsetWidth,p=i.offsetHeight,mxClient.IS_QUIRKS&&(c||d)&&a<p&&(p=a,i.style.height=p+"px"),c=((a=p)-a*s+n*-h)/2-m*n*(g+.5)+r*a*(v+.5),d=(n-n*s+a*-h)/2+r*n*(g+.5)+m*a*(v+.5),"group"==l.nodeName&&"DIV"==this.root.nodeName?((g=document.createElement("div")).style.display="inline-block",g.style.position="absolute",g.style.left=this.format(e+(d-n/2)*u.scale)+"px",g.style.top=this.format(t+(c-a/2)*u.scale)+"px",l.parentNode.appendChild(g),g.appendChild(l)):(u=8==document.documentMode?1:u.scale,l.style.left=this.format(e+(d-n/2)*u)+"px",l.style.top=this.format(t+(c-a/2)*u)+"px"),o.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+r+", M12="+m+", M21="+-m+", M22="+r+", sizingMethod='auto expand')",o.style.backgroundColor=this.rotatedHtmlBackground,this.state.alpha<1&&(o.style.filter+="alpha(opacity="+100*this.state.alpha+")"),i.style.visibility="",o.appendChild(i)}else 8!=document.documentMode?(i.style.verticalAlign="top",this.state.alpha<1&&(l.style.filter="alpha(opacity="+100*this.state.alpha+")"),u=i.parentNode,i.style.visibility="hidden",document.body.appendChild(i),n=i.offsetWidth,p=i.offsetHeight,mxClient.IS_QUIRKS&&c&&a<p&&(p=a,i.style.height=p+"px"),a=p,i.style.visibility="",u.appendChild(i),l.style.left=this.format(e+n*g*this.state.scale)+"px",l.style.top=this.format(t+a*v*this.state.scale)+"px"):(this.state.alpha<1&&(i.style.filter="alpha(opacity="+100*this.state.alpha+")"),p.style.left=100*g+"%",p.style.top=100*v+"%")}else this.plainText(e,t,n,a,mxUtils.htmlEntities(i,!1),o,s,r,l,d,c,m)}},mxVmlCanvas2D.prototype.plainText=function(e,t,n,a,i,o,s,r,l,d,c,m){e=(e+(a=this.state).dx)*a.scale,t=(t+a.dy)*a.scale,(n=document.createElement(mxClient.VML_PREFIX+":shape")).style.width="1px",n.style.height="1px",n.stroked="false",(d=document.createElement(mxClient.VML_PREFIX+":fill")).color=a.fontColor,d.opacity=100*a.alpha+"%",n.appendChild(d),(d=document.createElement(mxClient.VML_PREFIX+":path")).textpathok="true",d.v="m "+this.format(0)+" "+this.format(0)+" l "+this.format(1)+" "+this.format(0),n.appendChild(d),(d=document.createElement(mxClient.VML_PREFIX+":textpath")).style.cssText="v-text-align:"+o,d.style.align=o,d.style.fontFamily=a.fontFamily,d.string=i,d.on="true",o=Math.round(a.fontSize*a.scale/this.vmlScale),d.style.fontSize=o+"px",(a.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d.style.fontWeight="bold"),(a.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d.style.fontStyle="italic"),(a.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d.style.textDecoration="underline"),a=o+((i=i.split("\n")).length-1)*o*mxConstants.LINE_HEIGHT,o=i=0,s==mxConstants.ALIGN_BOTTOM?o=-a/2:s!=mxConstants.ALIGN_MIDDLE&&(o=a/2),null!=m&&(s=(n.style.rotation=m)*(Math.PI/180),i=Math.sin(s)*o,o*=Math.cos(s)),n.appendChild(d),n.style.left=this.format(e-i)+"px",n.style.top=this.format(t+o)+"px",this.root.appendChild(n)},mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)},mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)},mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)},mxGuide.prototype.graph=null,mxGuide.prototype.states=null,mxGuide.prototype.horizontal=!0,mxGuide.prototype.vertical=!0,mxGuide.prototype.guideX=null,mxGuide.prototype.guideY=null,mxGuide.prototype.setStates=function(e){this.states=e},mxGuide.prototype.isEnabledForEvent=function(e){return!0},mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize*this.graph.view.scale/2},mxGuide.prototype.createGuideShape=function(e){return(e=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)).isDashed=!0,e},mxGuide.prototype.move=function(a,e,t){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=e){var n=this.graph.getView().translate,i=this.graph.getView().scale,o=e.x,s=e.y,r=!1,l=!1,d=b=this.getGuideTolerance(),c=b;(b=a.clone()).x+=e.x,b.y+=e.y;var m=b.x,u=b.x+b.width,p=b.getCenterX(),g=b.y,v=b.y+b.height,h=b.getCenterY();e=function(e){e+=this.graph.panDx;var t=!1;if(Math.abs(e-p)<d?(o=e-a.getCenterX(),d=Math.abs(e-p),t=!0):Math.abs(e-m)<d?(o=e-a.x,d=Math.abs(e-m),t=!0):Math.abs(e-u)<d&&(o=e-a.x-a.width,d=Math.abs(e-u),t=!0),t){null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane()));var n=this.graph.container;e-=this.graph.panDx,this.guideX.points=[new mxPoint(e,-this.graph.panDy),new mxPoint(e,n.scrollHeight-3-this.graph.panDy)]}r=r||t};for(var b=function(e){e+=this.graph.panDy;var t=!1;if(Math.abs(e-h)<c?(s=e-a.getCenterY(),c=Math.abs(e-h),t=!0):Math.abs(e-g)<c?(s=e-a.y,c=Math.abs(e-g),t=!0):Math.abs(e-v)<c&&(s=e-a.y-a.height,c=Math.abs(e-v),t=!0),t){null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane()));var n=this.graph.container;e-=this.graph.panDy,this.guideY.points=[new mxPoint(-this.graph.panDx,e),new mxPoint(n.scrollWidth-3-this.graph.panDx,e)]}l=l||t},f=0;f<this.states.length;f++){var A=this.states[f];null!=A&&(this.horizontal&&(e.call(this,A.getCenterX()),e.call(this,A.x),e.call(this,A.x+A.width)),this.vertical&&(b.call(this,A.getCenterY()),b.call(this,A.y),b.call(this,A.y+A.height)))}r||null==this.guideX?null!=this.guideX&&(this.guideX.node.style.visibility="visible",this.guideX.redraw()):this.guideX.node.style.visibility="hidden",l||null==this.guideY?null!=this.guideY&&(this.guideY.node.style.visibility="visible",this.guideY.redraw()):this.guideY.node.style.visibility="hidden",t&&(r||(t=a.x-(this.graph.snap(a.x/i-n.x)+n.x)*i,o=this.graph.snap(o/i)*i-t),l||(n=a.y-(this.graph.snap(a.y/i-n.y)+n.y)*i,s=this.graph.snap(s/i)*i-n)),e=new mxPoint(o,s)}return e},mxGuide.prototype.hide=function(){null!=this.guideX&&(this.guideX.node.style.visibility="hidden"),null!=this.guideY&&(this.guideY.node.style.visibility="hidden")},mxGuide.prototype.destroy=function(){null!=this.guideX&&(this.guideX.destroy(),this.guideX=null),null!=this.guideY&&(this.guideY.destroy(),this.guideY=null)},mxStencil.defaultLocalized=!1,mxStencil.prototype.desc=null,mxStencil.prototype.constraints=null,mxStencil.prototype.aspect=null,mxStencil.prototype.w0=null,mxStencil.prototype.h0=null,mxStencil.prototype.bgNode=null,mxStencil.prototype.fgNode=null,mxStencil.prototype.strokewidth=null,mxStencil.prototype.parseDescription=function(){this.fgNode=this.desc.getElementsByTagName("foreground")[0],this.bgNode=this.desc.getElementsByTagName("background")[0],this.w0=Number(this.desc.getAttribute("w")||100),this.h0=Number(this.desc.getAttribute("h")||100);var e=this.desc.getAttribute("aspect");this.aspect=null!=e?e:"variable",e=this.desc.getAttribute("strokewidth"),this.strokewidth=null!=e?e:"1"},mxStencil.prototype.parseConstraints=function(){var e=this.desc.getElementsByTagName("connections")[0];if(null!=e&&(null!=(e=mxUtils.getChildNodes(e))&&0<e.length)){this.constraints=[];for(var t=0;t<e.length;t++)this.constraints.push(this.parseConstraint(e[t]))}},mxStencil.prototype.parseConstraint=function(e){var t=Number(e.getAttribute("x")),n=Number(e.getAttribute("y"));return e="1"==e.getAttribute("perimeter"),new mxConnectionConstraint(new mxPoint(t,n),e)},mxStencil.prototype.evaluateTextAttribute=function(e,t,n){return t=this.evaluateAttribute(e,t,n),e=e.getAttribute("localized"),(mxStencil.defaultLocalized&&null==e||"1"==e)&&(t=mxResources.get(t)),t},mxStencil.prototype.evaluateAttribute=function(e,t,n){return null==(t=e.getAttribute(t))&&(null!=(e=mxUtils.getTextContent(e))&&("function"==typeof(e=mxUtils.eval(e))&&(t=e(n)))),t},mxStencil.prototype.drawShape=function(e,t,n,a,i,o){this.drawChildren(e,t,n,a,i,o,this.bgNode,!1),this.drawChildren(e,t,n,a,i,o,this.fgNode,!0)},mxStencil.prototype.drawChildren=function(e,t,n,a,i,o,s,r){if(null!=s){var l=mxUtils.getValue(t.style,mxConstants.STYLE_DIRECTION,null);for(n=this.computeAspect(t.style,n,a,i,o,l),a=Math.min(n.width,n.height),a="inherit"==this.strokewidth?Number(mxUtils.getNumber(t.style,mxConstants.STYLE_STROKEWIDTH,1)):Number(this.strokewidth)*a,e.setStrokeWidth(a),s=s.firstChild;null!=s;)s.nodeType==mxConstants.NODETYPE_ELEMENT&&this.drawNode(e,t,s,n,r),s=s.nextSibling}},mxStencil.prototype.computeAspect=function(e,t,n,a,i,o){e=t,t=a/this.w0;var s=i/this.h0;if(o="north"==o||"south"==o){s=a/this.h0,t=i/this.w0;var r=(a-i)/2;e+=r,n-=r}return"fixed"==this.aspect&&(t=s=Math.min(t,s),o?(e+=(i-this.w0*t)/2,n+=(a-this.h0*s)/2):(e+=(a-this.w0*t)/2,n+=(i-this.h0*s)/2)),new mxRectangle(e,n,t,s)},mxStencil.prototype.drawNode=function(e,t,n,a,i){var o=n.nodeName,s=a.x,r=a.y,l=a.width,d=a.height,c=Math.min(l,d);if("save"==o)e.save();else if("restore"==o)e.restore();else if("path"==o)for(e.begin(),n=n.firstChild;null!=n;)n.nodeType==mxConstants.NODETYPE_ELEMENT&&this.drawNode(e,t,n,a,i),n=n.nextSibling;else if("close"==o)e.close();else if("move"==o)e.moveTo(s+Number(n.getAttribute("x"))*l,r+Number(n.getAttribute("y"))*d);else if("line"==o)e.lineTo(s+Number(n.getAttribute("x"))*l,r+Number(n.getAttribute("y"))*d);else if("quad"==o)e.quadTo(s+Number(n.getAttribute("x1"))*l,r+Number(n.getAttribute("y1"))*d,s+Number(n.getAttribute("x2"))*l,r+Number(n.getAttribute("y2"))*d);else if("curve"==o)e.curveTo(s+Number(n.getAttribute("x1"))*l,r+Number(n.getAttribute("y1"))*d,s+Number(n.getAttribute("x2"))*l,r+Number(n.getAttribute("y2"))*d,s+Number(n.getAttribute("x3"))*l,r+Number(n.getAttribute("y3"))*d);else if("arc"==o)e.arcTo(Number(n.getAttribute("rx"))*l,Number(n.getAttribute("ry"))*d,Number(n.getAttribute("x-axis-rotation")),Number(n.getAttribute("large-arc-flag")),Number(n.getAttribute("sweep-flag")),s+Number(n.getAttribute("x"))*l,r+Number(n.getAttribute("y"))*d);else if("rect"==o)e.rect(s+Number(n.getAttribute("x"))*l,r+Number(n.getAttribute("y"))*d,Number(n.getAttribute("w"))*l,Number(n.getAttribute("h"))*d);else if("roundrect"==o)0==(t=n.getAttribute("arcsize"))&&(t=100*mxConstants.RECTANGLE_ROUNDING_FACTOR),c=Number(n.getAttribute("w"))*l,a=Number(n.getAttribute("h"))*d,t=Number(t)/100,t=Math.min(c*t,a*t),e.roundrect(s+Number(n.getAttribute("x"))*l,r+Number(n.getAttribute("y"))*d,c,a,t,t);else if("ellipse"==o)e.ellipse(s+Number(n.getAttribute("x"))*l,r+Number(n.getAttribute("y"))*d,Number(n.getAttribute("w"))*l,Number(n.getAttribute("h"))*d);else if("image"==o)t=this.evaluateAttribute(n,"src",t),e.image(s+Number(n.getAttribute("x"))*l,r+Number(n.getAttribute("y"))*d,Number(n.getAttribute("w"))*l,Number(n.getAttribute("h"))*d,t,!1,"1"==n.getAttribute("flipH"),"1"==n.getAttribute("flipV"));else if("text"==o){if(c=this.evaluateTextAttribute(n,"str",t),a="1"==n.getAttribute("vertical")?-90:0,"0"==n.getAttribute("align-shape")){var m=t.rotation,u=1==mxUtils.getValue(t.style,mxConstants.STYLE_FLIPH,0);t=1==mxUtils.getValue(t.style,mxConstants.STYLE_FLIPV,0),a=u&&t?a-m:u||t?a+m:a-m}a-=n.getAttribute("rotation"),e.text(s+Number(n.getAttribute("x"))*l,r+Number(n.getAttribute("y"))*d,0,0,c,n.getAttribute("align")||"left",n.getAttribute("valign")||"top",!1,"",!1,!1,a)}else if("include-shape"==o)null!=(m=mxStencilRegistry.getStencil(n.getAttribute("name")))&&(s+=Number(n.getAttribute("x"))*l,r+=Number(n.getAttribute("y"))*d,c=Number(n.getAttribute("w"))*l,a=Number(n.getAttribute("h"))*d,m.drawShape(e,t,s,r,c,a));else if("fillstroke"==o)e.fillAndStroke();else if("fill"==o)e.fill();else if("stroke"==o)e.stroke();else if("strokewidth"==o)e.setStrokeWidth(Number(n.getAttribute("width"))*c);else if("dashed"==o)e.setDashed("1"==n.getAttribute("dashed"));else if("dashpattern"==o){if(null!=(n=n.getAttribute("pattern"))){for(n=n.split(" "),l=[],d=0;d<n.length;d++)0<n[d].length&&l.push(Number(n[d])*c);n=l.join(" "),e.setDashPattern(n)}}else"strokecolor"==o?e.setStrokeColor(n.getAttribute("color")):"linecap"==o?e.setLineCap(n.getAttribute("cap")):"linejoin"==o?e.setLineJoin(n.getAttribute("join")):"miterlimit"==o?e.setMiterLimit(Number(n.getAttribute("limit"))):"fillcolor"==o?e.setFillColor(n.getAttribute("color")):"alpha"==o?e.setAlpha(n.getAttribute("alpha")):"fontcolor"==o?e.setFontColor(n.getAttribute("color")):"fontstyle"==o?e.setFontStyle(n.getAttribute("style")):"fontfamily"==o?e.setFontFamily(n.getAttribute("family")):"fontsize"==o&&e.setFontSize(Number(n.getAttribute("size"))*c);i&&("fillstroke"==o||"fill"==o||"stroke"==o)&&e.setShadow(!1)},mxShape.prototype.dialect=null,mxShape.prototype.scale=1,mxShape.prototype.bounds=null,mxShape.prototype.points=null,mxShape.prototype.node=null,mxShape.prototype.style=null,mxShape.prototype.style=null,mxShape.prototype.boundingBox=null,mxShape.prototype.stencil=null,mxShape.prototype.svgStrokeTolerance=6,mxShape.prototype.pointerEvents=!0,mxShape.prototype.stencilPointerEvents=!1,mxShape.prototype.vmlScale=1,mxShape.prototype.init=function(e){null==this.node&&(this.node=this.create(e),null!=e&&e.appendChild(this.node))},mxShape.prototype.isParseVml=function(){return!0},mxShape.prototype.isHtmlAllowed=function(){return!1},mxShape.prototype.getSvgScreenOffset=function(){return 1==mxUtils.mod(Math.max(1,Math.round(this.strokewidth*this.scale)),2)?.5:0},mxShape.prototype.create=function(e){return null!=e.ownerSVGElement?this.createSvg(e):8==document.documentMode||this.dialect==mxConstants.DIALECT_SVG||this.dialect!=mxConstants.DIALECT_VML&&this.isHtmlAllowed()?this.createHtml(e):this.createVml(e)},mxShape.prototype.createSvg=function(){return document.createElementNS(mxConstants.NS_SVG,"g")},mxShape.prototype.createVml=function(){var e=document.createElement(mxClient.VML_PREFIX+":group");return e.style.position="absolute",e},mxShape.prototype.createHtml=function(){var e=document.createElement("div");return e.style.position="absolute",e},mxShape.prototype.reconfigure=function(){this.redraw()},mxShape.prototype.redraw=function(){this.updateBoundsFromPoints(),this.checkBounds()?(this.node.style.visibility="","DIV"==this.node.nodeName&&this.isHtmlAllowed()?this.redrawHtmlShape():this.redrawShape(),this.updateBoundingBox()):(this.node.style.visibility="hidden",this.boundingBox=null)},mxShape.prototype.updateBoundsFromPoints=function(){var e=this.points;if(null!=e&&0<e.length&&null!=e[0]){this.bounds=new mxRectangle(Number(e[0].x),Number(e[0].y),1,1);for(var t=1;t<this.points.length;t++)null!=e[t]&&this.bounds.add(new mxRectangle(Number(e[t].x),Number(e[t].y),1,1))}},mxShape.prototype.checkBounds=function(){return null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)&&0<this.bounds.width&&0<this.bounds.height},mxShape.prototype.createVmlGroup=function(){var e=document.createElement(mxClient.VML_PREFIX+":group");return e.style.position="absolute",e.style.width=this.node.style.width,e.style.height=this.node.style.height,e},mxShape.prototype.redrawShape=function(){var e=this.createCanvas();for(e.pointerEvents=this.pointerEvents;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);this.paint(e),this.node!=e.root&&this.node.insertAdjacentHTML("beforeend",e.root.outerHTML),"DIV"==this.node.nodeName&&8==document.documentMode&&(this.node.style.filter="",(null==this.stencil||!this.stencilPointerEvents)&&mxUtils.addTransparentBackgroundFilter(this.node)),this.destroyCanvas(e)},mxShape.prototype.createCanvas=function(){var e=null,t=null;if(null!=this.node.ownerSVGElement)(e=new mxSvgCanvas2D(this.node,!1)).strokeTolerance=this.svgStrokeTolerance,e.blockImagePointerEvents=mxClient.IS_NS&&!mxClient.IS_SF&&!mxClient.IS_GC,0!=(t=this.getSvgScreenOffset())?this.node.setAttribute("transform","translate("+t+","+t+")"):this.node.removeAttribute("transform");else{this.updateVmlContainer();var n=Math.max(1,Math.round(this.bounds.width)),a=Math.max(1,Math.round(this.bounds.height));t=8==document.documentMode&&this.isParseVml()?this.createVmlGroup():this.node,e=new mxVmlCanvas2D(t,!1);""!=t.tagUrn&&(t.coordsize=n*this.vmlScale+","+a*this.vmlScale,e.scale(this.vmlScale),e.vmlScale=this.vmlScale),t=this.scale,e.translate(-Math.round(this.bounds.x/t),-Math.round(this.bounds.y/t))}return e},mxShape.prototype.updateVmlContainer=function(){this.node.style.left=Math.round(this.bounds.x)+"px",this.node.style.top=Math.round(this.bounds.y)+"px";var e=Math.max(1,Math.round(this.bounds.width)),t=Math.max(1,Math.round(this.bounds.height));this.node.style.width=e+"px",this.node.style.height=t+"px",this.node.style.overflow="visible"},mxShape.prototype.destroyCanvas=function(e){if(e instanceof mxSvgCanvas2D){for(var t in e.gradients){var n=e.gradients[t];n.mxRefCount=(n.mxRefCount||0)+1}this.releaseSvgGradients(this.oldGradients),this.oldGradients=e.gradients}},mxShape.prototype.paint=function(e){var t=this.scale,n=this.bounds.x/t,a=this.bounds.y/t,i=this.bounds.width/t,o=this.bounds.height/t;if(this.isPaintBoundsInverted()){n=n+(s=(i-o)/2),a=a-s;var s=i;i=o,o=s}if(this.updateTransform(e,n,a,i,o),this.configureCanvas(e,n,a,i,o),null!=this.stencil)this.paintStencilShape(e,n,a,i,o);else if(e.setStrokeWidth(this.strokewidth),null!=this.points){for(n=[],a=0;a<this.points.length;a++)n.push(new mxPoint(this.points[a].x/t,this.points[a].y/t));this.paintEdgeShape(e,n)}else this.paintVertexShape(e,n,a,i,o)},mxShape.prototype.configureCanvas=function(e,t,n,a,i){var o=null;null!=this.style&&(o=this.style.dashPattern),e.setAlpha(this.opacity/100),null!=this.isShadow&&e.setShadow(this.isShadow),null!=this.isDashed&&e.setDashed(this.isDashed),null!=o&&e.setDashPattern(o),null!=this.gradient?(t=this.getGradientBounds(e,t,n,a,i),e.setGradient(this.fill,this.gradient,t.x,t.y,t.width,t.height,this.gradientDirection)):e.setFillColor(this.fill),e.setStrokeColor(this.stroke)},mxShape.prototype.getGradientBounds=function(e,t,n,a,i){return new mxRectangle(t,n,a,i)},mxShape.prototype.updateTransform=function(e,t,n,a,i){e.scale(this.scale),e.rotate(this.getShapeRotation(),this.flipH,this.flipV,t+a/2,n+i/2)},mxShape.prototype.paintStencilShape=function(e,t,n,a,i){this.stencilPointerEvents&&(this.dialect==mxConstants.DIALECT_SVG?this.addTransparentBackgroundRectangle(this.node,t,n,a,i):8!=document.documentMode&&this.setTransparentBackgroundImage(this.node)),this.stencil.drawShape(e,this,t,n,a,i)},mxShape.prototype.paintVertexShape=function(e,t,n,a,i){this.paintBackground(e,t,n,a,i),e.setShadow(!1),this.paintForeground(e,t,n,a,i)},mxShape.prototype.paintBackground=function(e,t,n,a,i){},mxShape.prototype.paintForeground=function(e,t,n,a,i){},mxShape.prototype.paintEdgeShape=function(e,t){},mxShape.prototype.getArcSize=function(e,t){var n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return Math.min(e*n,t*n)},mxShape.prototype.paintGlassEffect=function(e,t,n,a,i,o){var s=Math.ceil(this.strokewidth/2);e.setGradient("#ffffff","#ffffff",t,n,a,.6*i,"south",.9,.1),e.begin(),o+=2*s,this.isRounded?(e.moveTo(t-s+o,n-s),e.quadTo(t-s,n-s,t-s,n-s+o),e.lineTo(t-s,n+.4*i),e.quadTo(t+.5*a,n+.7*i,t+a+s,n+.4*i),e.lineTo(t+a+s,n-s+o),e.quadTo(t+a+s,n-s,t+a+s-o,n-s)):(e.moveTo(t-s,n-s),e.lineTo(t-s,n+.4*i),e.quadTo(t+.5*a,n+.7*i,t+a+s,n+.4*i),e.lineTo(t+a+s,n-s)),e.close(),e.fill()},mxShape.prototype.apply=function(e){this.state=e,this.style=e.style,null!=this.style&&(this.fill=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,this.fill),this.gradient=mxUtils.getValue(this.style,mxConstants.STYLE_GRADIENTCOLOR,this.gradient),this.gradientDirection=mxUtils.getValue(this.style,mxConstants.STYLE_GRADIENT_DIRECTION,this.gradientDirection),this.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_OPACITY,this.opacity),this.stroke=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,this.stroke),this.strokewidth=mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth),this.spacing=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing),this.startSize=mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,this.startSize),this.endSize=mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,this.endSize),this.startArrow=mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,this.startArrow),this.endArrow=mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,this.endArrow),this.rotation=mxUtils.getValue(this.style,mxConstants.STYLE_ROTATION,this.rotation),this.direction=mxUtils.getValue(this.style,mxConstants.STYLE_DIRECTION,this.direction),this.flipH=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,0),this.flipV=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0),null!=this.stencil&&(this.flipH=1==mxUtils.getValue(this.style,"stencilFlipH",0)||this.flipH,this.flipV=1==mxUtils.getValue(this.style,"stencilFlipV",0)||this.flipV),"north"!=this.direction&&"south"!=this.direction||(e=this.flipH,this.flipH=this.flipV,this.flipV=e),this.isShadow=1==mxUtils.getValue(this.style,mxConstants.STYLE_SHADOW,this.isShadow),this.isDashed=1==mxUtils.getValue(this.style,mxConstants.STYLE_DASHED,this.isDashed),this.isRounded=1==mxUtils.getValue(this.style,mxConstants.STYLE_ROUNDED,this.isRounded),this.glass=1==mxUtils.getValue(this.style,mxConstants.STYLE_GLASS,this.glass),"none"==this.fill&&(this.fill=null),"none"==this.gradient&&(this.gradient=null),"none"==this.stroke&&(this.stroke=null))},mxShape.prototype.setCursor=function(e){null==e&&(e=""),this.cursor=e,null!=this.node&&(this.node.style.cursor=e)},mxShape.prototype.getCursor=function(){return this.cursor},mxShape.prototype.updateBoundingBox=function(){if(null!=this.bounds){var e=this.createBoundingBox();if(null!=e){this.augmentBoundingBox(e);var t=this.getShapeRotation();0!=t&&(e=mxUtils.getBoundingBox(e,t)),e.x=Math.floor(e.x),e.y=Math.floor(e.y),e.width=Math.ceil(e.width),e.height=Math.ceil(e.height)}this.boundingBox=e}},mxShape.prototype.createBoundingBox=function(){var e=this.bounds.clone();if(this.isPaintBoundsInverted()){var t=(e.width-e.height)/2;e.x+=t,e.y-=t,t=e.width,e.width=e.height,e.height=t}return e},mxShape.prototype.augmentBoundingBox=function(e){this.isShadow&&(e.width+=Math.ceil(mxConstants.SHADOW_OFFSET_X*this.scale),e.height+=Math.ceil(mxConstants.SHADOW_OFFSET_Y*this.scale));var t=Math.ceil(this.strokewidth*this.scale);e.grow(Math.ceil(t/2))},mxShape.prototype.isPaintBoundsInverted=function(){return null==this.stencil&&("north"==this.direction||"south"==this.direction)},mxShape.prototype.getRotation=function(){return null!=this.rotation?this.rotation:0},mxShape.prototype.getTextRotation=function(){var e=this.getRotation();return 1!=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)&&(e+=mxText.prototype.verticalTextRotation),e},mxShape.prototype.getShapeRotation=function(){var e=this.getRotation();return null!=this.direction&&("north"==this.direction?e+=270:"west"==this.direction?e+=180:"south"==this.direction&&(e+=90)),e},mxShape.prototype.addTransparentBackgroundRectangle=function(e,t,n,a,i){(e=document.createElementNS(mxConstants.NS_SVG,"rect")).setAttribute("x",t),e.setAttribute("y",n),e.setAttribute("width",a),e.setAttribute("height",i),e.setAttribute("fill","none"),e.setAttribute("stroke","none"),e.setAttribute("pointer-events","all"),this.node.appendChild(e)},mxShape.prototype.setTransparentBackgroundImage=function(e){e.style.backgroundImage="url('"+mxClient.imageBasePath+"/transparent.gif')"},mxShape.prototype.releaseSvgGradients=function(e){if(null!=e)for(var t in e){var n=e[t];n.mxRefCount=(n.mxRefCount||0)-1,0==n.mxRefCount&&null!=n.parentNode&&n.parentNode.removeChild(n)}},mxShape.prototype.destroy=function(){null!=this.node&&(mxEvent.release(this.node),null!=this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.node=null),this.releaseSvgGradients(this.oldGradients),this.oldGradients=null};var mxStencilRegistry={stencils:[],addStencil:function(e,t){mxStencilRegistry.stencils[e]=t},getStencil:function(e){return mxStencilRegistry.stencils[e]}},mxMarker={markers:[],addMarker:function(e,t){mxMarker.markers[e]=t},createMarker:function(e,t,n,a,i,o,s,r,l,d){var c=mxMarker.markers[n];return null!=c?c(e,t,n,a,i,o,s,r,l,d):null}};function mxActor(e,t,n,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=n,this.strokewidth=null!=a?a:1}function mxCloud(e,t,n,a){mxActor.call(this),this.bounds=e,this.fill=t,this.stroke=n,this.strokewidth=null!=a?a:1}function mxRectangleShape(e,t,n,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=n,this.strokewidth=null!=a?a:1}function mxEllipse(e,t,n,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=n,this.strokewidth=null!=a?a:1}function mxDoubleEllipse(e,t,n,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=n,this.strokewidth=null!=a?a:1}function mxRhombus(e,t,n,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=n,this.strokewidth=null!=a?a:1}function mxPolyline(e,t,n){mxShape.call(this),this.points=e,this.stroke=t,this.strokewidth=null!=n?n:1}function mxArrow(e,t,n,a,i,o,s){mxShape.call(this),this.points=e,this.fill=t,this.stroke=n,this.strokewidth=null!=a?a:1,this.arrowWidth=null!=i?i:mxConstants.ARROW_WIDTH,this.spacing=null!=o?o:mxConstants.ARROW_SPACING,this.endSize=null!=s?s:mxConstants.ARROW_SIZE}function mxText(e,t,n,a,i,o,s,r,l,d,c,m,u,p,g,v,h,b,f,A){mxShape.call(this),this.value=e,this.bounds=t,this.color=null!=i?i:"black",this.align=null!=n?n:"",this.valign=null!=a?a:"",this.family=null!=o?o:mxConstants.DEFAULT_FONTFAMILY,this.size=null!=s?s:mxConstants.DEFAULT_FONTSIZE,this.fontStyle=null!=r?r:mxConstants.DEFAULT_FONTSTYLE,this.spacing=parseInt(l||2),this.spacingTop=this.spacing+parseInt(d||0),this.spacingRight=this.spacing+parseInt(c||0),this.spacingBottom=this.spacing+parseInt(m||0),this.spacingLeft=this.spacing+parseInt(u||0),this.horizontal=null==p||p,this.background=g,this.border=v,this.wrap=null!=h&&h,this.clipped=null!=b&&b,this.overflow=null!=f?f:"visible",this.labelPadding=null!=A?A:0,this.rotation=0}function mxTriangle(){mxActor.call(this)}function mxHexagon(){mxActor.call(this)}function mxLine(e,t,n){mxShape.call(this),this.bounds=e,this.stroke=t,this.strokewidth=null!=n?n:1}function mxImageShape(e,t,n,a,i){mxShape.call(this),this.bounds=e,this.image=t,this.fill=n,this.stroke=a,this.strokewidth=null!=i?i:1,this.shadow=!1}function mxLabel(e,t,n,a){mxRectangleShape.call(this,e,t,n,a)}function mxCylinder(e,t,n,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=n,this.strokewidth=null!=a?a:1}function mxConnector(e,t,n){mxPolyline.call(this,e,t,n)}function mxSwimlane(e,t,n,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=n,this.strokewidth=null!=a?a:1}function mxGraphLayout(e){this.graph=e}function mxStackLayout(e,t,n,a,i,o){mxGraphLayout.call(this,e),this.horizontal=null==t||t,this.spacing=null!=n?n:0,this.x0=null!=a?a:0,this.y0=null!=i?i:0,this.border=null!=o?o:0}function mxPartitionLayout(e,t,n,a){mxGraphLayout.call(this,e),this.horizontal=null==t||t,this.spacing=n||0,this.border=a||0}function mxCompactTreeLayout(e,t,n){mxGraphLayout.call(this,e),this.horizontal=null==t||t,this.invert=null!=n&&n}function WeightedCellSorter(e,t){this.cell=e,this.weightedValue=t}function mxFastOrganicLayout(e){mxGraphLayout.call(this,e)}function mxCircleLayout(e,t){mxGraphLayout.call(this,e),this.radius=null!=t?t:100}function mxParallelEdgeLayout(e){mxGraphLayout.call(this,e)}function mxCompositeLayout(e,t,n){mxGraphLayout.call(this,e),this.layouts=t,this.master=n}function mxEdgeLabelLayout(e,t){mxGraphLayout.call(this,e)}function mxGraphAbstractHierarchyCell(){this.x=[],this.y=[],this.temp=[]}function mxGraphHierarchyNode(e){mxGraphAbstractHierarchyCell.apply(this,arguments),this.cell=e}function mxGraphHierarchyEdge(e){mxGraphAbstractHierarchyCell.apply(this,arguments),this.edges=e}function mxGraphHierarchyModel(e,t,n,a,i){for(e.getGraph(),this.tightenToSource=i,this.roots=n,this.parent=a,this.vertexMapper={},this.edgeMapper={},this.maxRank=0,n=[],null==t&&(t=this.graph.getChildVertices(a)),this.maxRank=this.SOURCESCANSTARTRANK,this.createInternalCells(e,t,n),a=0;a<t.length;a++){i=n[a].connectsAsSource;for(var o=0;o<i.length;o++){var s=i[o];if(null!=(r=s.edges)&&0<r.length){var r=r[0],l=e.getVisibleTerminal(r,!1);l=mxCellPath.create(l),l=this.vertexMapper[l];n[a]==l&&(l=e.getVisibleTerminal(r,!0),l=mxCellPath.create(l),l=this.vertexMapper[l]),null!=l&&n[a]!=l&&(0==(s.target=l).connectsAsTarget.length&&(l.connectsAsTarget=[]),mxUtils.indexOf(l.connectsAsTarget,s)<0&&l.connectsAsTarget.push(s))}}n[a].temp[0]=1}}function mxHierarchicalLayoutStage(){}function mxMedianHybridCrossingReduction(e){this.layout=e}function MedianCellSorter(){}function mxMinimumCycleRemover(e){this.layout=e}function mxCoordinateAssignment(e,t,n,a,i,o){this.layout=e,this.intraCellSpacing=t,this.interRankCellSpacing=n,this.orientation=a,this.initialX=i,this.parallelEdgeSpacing=o}!function(){function e(e,t,n,a,i,o,s,r,l,d){t=1.118*i*l,r=1.118*o*l,i*=s+l,o*=s+l;var c=a.clone();return c.x-=t,c.y-=r,s=n!=mxConstants.ARROW_CLASSIC?1:.75,a.x+=-i*s-t,a.y+=-o*s-r,function(){e.begin(),e.moveTo(c.x,c.y),e.lineTo(c.x-i-o/2,c.y-o+i/2),n==mxConstants.ARROW_CLASSIC&&e.lineTo(c.x-3*i/4,c.y-3*o/4),e.lineTo(c.x+o/2-i,c.y-o-i/2),e.close(),d?e.fillAndStroke():e.stroke()}}function t(e,t,n,a,i,o,s,r,l,d){r=n==mxConstants.ARROW_DIAMOND?.7071:.9862,t=i*l*r,r*=o*l,i*=s+l,o*=s+l;var c=a.clone();c.x-=t,c.y-=r,a.x+=-i-t,a.y+=-o-r;var m=n==mxConstants.ARROW_DIAMOND?2:3.4;return function(){e.begin(),e.moveTo(c.x,c.y),e.lineTo(c.x-i/2-o/m,c.y+i/m-o/2),e.lineTo(c.x-i,c.y-o),e.lineTo(c.x-i/2+o/m,c.y-o/2-i/m),e.close(),d?e.fillAndStroke():e.stroke()}}mxMarker.addMarker("classic",e),mxMarker.addMarker("block",e),mxMarker.addMarker("open",function(e,t,n,a,i,o,s,r,l,d){t=1.118*i*l,n=1.118*o*l,i*=s+l,o*=s+l;var c=a.clone();return c.x-=t,c.y-=n,a.x+=2*-t,a.y+=2*-n,function(){e.begin(),e.moveTo(c.x-i-o/2,c.y-o+i/2),e.lineTo(c.x,c.y),e.lineTo(c.x+o/2-i,c.y-o-i/2),e.stroke()}}),mxMarker.addMarker("oval",function(e,t,n,a,i,o,s,r,l,d){var c=s/2,m=a.clone();return a.x-=i*c,a.y-=o*c,function(){e.ellipse(m.x-c,m.y-c,s,s),d?e.fillAndStroke():e.stroke()}}),mxMarker.addMarker("diamond",t),mxMarker.addMarker("diamondThin",t)}(),mxUtils.extend(mxActor,mxShape),mxActor.prototype.paintVertexShape=function(e,t,n,a,i){e.translate(t,n),e.begin(),this.redrawPath(e,t,n,a,i),e.fillAndStroke()},mxActor.prototype.redrawPath=function(e,t,n,a,i){t=a/3,e.moveTo(0,i),e.curveTo(0,3*i/5,0,2*i/5,a/2,2*i/5),e.curveTo(a/2-t,2*i/5,a/2-t,0,a/2,0),e.curveTo(a/2+t,0,a/2+t,2*i/5,a/2,2*i/5),e.curveTo(a,2*i/5,a,3*i/5,a,i),e.close()},mxUtils.extend(mxCloud,mxActor),mxCloud.prototype.redrawPath=function(e,t,n,a,i){e.moveTo(.25*a,.25*i),e.curveTo(.05*a,.25*i,0,.5*i,.16*a,.55*i),e.curveTo(0,.66*i,.18*a,.9*i,.31*a,.8*i),e.curveTo(.4*a,i,.7*a,i,.8*a,.8*i),e.curveTo(a,.8*i,a,.6*i,.875*a,.5*i),e.curveTo(a,.3*i,.8*a,.1*i,.625*a,.2*i),e.curveTo(.5*a,.05*i,.3*a,.05*i,.25*a,.25*i),e.close()},mxUtils.extend(mxRectangleShape,mxShape),mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.isRounded&&!this.glass&&0==this.rotation},mxRectangleShape.prototype.paintBackground=function(e,t,n,a,i){if(this.isRounded){var o=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;o=Math.min(a*o,i*o);e.roundrect(t,n,a,i,o,o)}else e.rect(t,n,a,i);e.fillAndStroke()},mxRectangleShape.prototype.paintForeground=function(e,t,n,a,i){this.glass&&this.paintGlassEffect(e,t,n,a,i,this.getArcSize(a+this.strokewidth,i+this.strokewidth))},mxRectangleShape.prototype.redrawHtmlShape=function(){this.updateHtmlBounds(this.node),this.updateHtmlFilters(this.node),this.updateHtmlColors(this.node)},mxRectangleShape.prototype.updateHtmlBounds=function(e){var t=9<=document.documentMode?0:Math.ceil(this.strokewidth*this.scale);e.style.borderWidth=Math.max(1,t)+"px",e.style.overflow="hidden",e.style.left=Math.round(this.bounds.x-t/2)+"px",e.style.top=Math.round(this.bounds.y-t/2)+"px","CSS1Compat"==document.compatMode&&(t=-t),e.style.width=Math.round(Math.max(0,this.bounds.width+t))+"px",e.style.height=Math.round(Math.max(0,this.bounds.height+t))+"px"},mxRectangleShape.prototype.updateHtmlColors=function(e){var t=this.stroke;null!=t&&t!=mxConstants.NONE?(e.style.borderColor=t,this.isDashed?e.style.borderStyle="dashed":0<this.strokewidth&&(e.style.borderStyle="solid"),e.style.borderWidth=Math.max(1,Math.ceil(this.strokewidth*this.scale))+"px"):e.style.borderWidth="0px",null!=(t=this.fill)&&t!=mxConstants.NONE?(e.style.backgroundColor=t,e.style.backgroundImage="none"):this.pointerEvents?e.style.backgroundColor="transparent":8==document.documentMode?mxUtils.addTransparentBackgroundFilter(e):this.setTransparentBackgroundImage(e)},mxRectangleShape.prototype.updateHtmlFilters=function(e){var t="";if(this.opacity<100&&(t+="alpha(opacity="+this.opacity+")"),this.isShadow&&(t+="progid:DXImageTransform.Microsoft.dropShadow (OffX='"+Math.round(mxConstants.SHADOW_OFFSET_X*this.scale)+"', OffY='"+Math.round(mxConstants.SHADOW_OFFSET_Y*this.scale)+"', Color='"+mxConstants.SHADOWCOLOR+"')"),this.gradient){var n=this.fill,a=this.gradient,i="0",o={east:0,south:1,west:2,north:3},s=null!=this.direction?o[this.direction]:0;null!=this.gradientDirection&&(s=mxUtils.mod(s+o[this.gradientDirection]-1,4)),1==s?(i="1",o=n,n=a,a=o):2==s?(o=n,n=a,a=o):3==s&&(i="1"),t+="progid:DXImageTransform.Microsoft.gradient(startColorStr='"+n+"', endColorStr='"+a+"', gradientType='"+i+"')"}e.style.filter=t},mxUtils.extend(mxEllipse,mxShape),mxEllipse.prototype.paintVertexShape=function(e,t,n,a,i){e.ellipse(t,n,a,i),e.fillAndStroke()},mxUtils.extend(mxDoubleEllipse,mxShape),mxDoubleEllipse.prototype.vmlScale=10,mxDoubleEllipse.prototype.paintBackground=function(e,t,n,a,i){e.ellipse(t,n,a,i),e.fillAndStroke()},mxDoubleEllipse.prototype.paintForeground=function(e,t,n,a,i){var o=Math.min(4,Math.min(a/5,i/5));i-=2*o,0<(a-=2*o)&&0<i&&e.ellipse(t+o,n+o,a,i),e.stroke()},mxUtils.extend(mxRhombus,mxShape),mxRhombus.prototype.paintVertexShape=function(e,t,n,a,i){var o=a/2,s=i/2;e.begin(),e.moveTo(t+o,n),e.lineTo(t+a,n+s),e.lineTo(t+o,n+i),e.lineTo(t,n+s),e.close(),e.fillAndStroke()},mxUtils.extend(mxPolyline,mxShape),mxPolyline.prototype.getRotation=function(){return 0},mxPolyline.prototype.paintEdgeShape=function(e,t){this.paintLine(e,t,this.isRounded)},mxPolyline.prototype.paintLine=function(e,t,n){var a=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,i=t[0],o=t[t.length-1];e.begin(),e.moveTo(i.x,i.y);for(var s=1;s<t.length-1;s++){var r=t[s],l=i.x-r.x;i=i.y-r.y;if(n&&s<t.length-1&&(0!=l||0!=i)){var d=Math.sqrt(l*l+i*i);l=l*Math.min(a,d/2)/d,i=i*Math.min(a,d/2)/d;e.lineTo(r.x+l,r.y+i),l=(i=t[s+1]).x-r.x,i=i.y-r.y,d=Math.max(1,Math.sqrt(l*l+i*i)),l=l*Math.min(a,d/2)/d,i=i*Math.min(a,d/2)/d,l=r.x+l,i=r.y+i,e.quadTo(r.x,r.y,l,i),r=new mxPoint(l,i)}else e.lineTo(r.x,r.y);i=r}e.lineTo(o.x,o.y),e.stroke()},mxUtils.extend(mxArrow,mxShape),mxArrow.prototype.paintEdgeShape=function(e,t){var n=mxConstants.ARROW_SPACING,a=mxConstants.ARROW_WIDTH,i=mxConstants.ARROW_SIZE,o=t[0],s=t[t.length-1],r=s.x-o.x,l=s.y-o.y,d=(c=Math.sqrt(r*r+l*l))-2*n-i,c=(r=r/c,a*(l=l/c)/3),m=(a=-a*r/3,(i=o.x-c/2+n*r)+c),u=(o=o.y-a/2+n*l)+a,p=m+d*r,g=p+c,v=(d=u+d*l)+a,h=g-3*c,b=v-3*a;e.begin(),e.moveTo(i,o),e.lineTo(m,u),e.lineTo(p,d),e.lineTo(g,v),e.lineTo(s.x-n*r,s.y-n*l),e.lineTo(h,b),e.lineTo(h+c,b+a),e.close(),e.fillAndStroke()},mxUtils.extend(mxText,mxShape),mxText.prototype.baseSpacingTop=0,mxText.prototype.baseSpacingBottom=0,mxText.prototype.baseSpacingLeft=0,mxText.prototype.baseSpacingRight=0,mxText.prototype.replaceLinefeeds=!0,mxText.prototype.verticalTextRotation=-90,mxText.prototype.ignoreClippedStringSize=!0,mxText.prototype.ignoreStringSize=!1,mxText.prototype.isParseVml=function(){return!1},mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode},mxText.prototype.getSvgScreenOffset=function(){return 0},mxText.prototype.checkBounds=function(){return!(null==this.bounds||isNaN(this.bounds.x)||isNaN(this.bounds.y)||isNaN(this.bounds.width)||isNaN(this.bounds.height))},mxText.prototype.updateBoundingBox=function(){var e=this.node;8==document.documentMode&&null!=e.firstChild&&(null!=(e=e.firstChild).firstChild&&(e=e.firstChild)),this.boundingBox=this.bounds.clone();var t=this.getTextRotation();if(this.ignoreStringSize||null==e||"fill"==this.overflow||this.clipped&&this.ignoreClippedStringSize)this.boundingBox.x+=this.margin.x*this.boundingBox.width,this.boundingBox.y+=this.margin.y*this.boundingBox.height;else{var n=null,a=null;if(null!=e.ownerSVGElement)if(null!=e.firstChild&&null!=e.firstChild.firstChild&&"foreignObject"==e.firstChild.firstChild.nodeName)e=e.firstChild.firstChild,n=this.wrap?this.bounds.width:parseInt(e.getAttribute("width"))*this.scale,a=parseInt(e.getAttribute("height"))*this.scale;else{if(0==(t=e.getBBox()).width&&0==t.height)return;this.boundingBox=new mxRectangle(t.x,t.y,t.width,t.height),t=0}else a=this.state.view.textDiv,null!=this.offsetWidth&&null!=this.offsetHeight?(n=this.wrap?this.bounds.width:this.offsetWidth*this.scale,a=this.offsetHeight*this.scale):null!=a?(this.updateFont(a),this.updateSize(a),mxUtils.isNode(this.value)?a.innerHTML=this.value.outerHTML:(n=this.replaceLinefeeds?this.value.replace(/\n/g,"<br/>"):this.value,a.innerHTML=n),n=this.wrap?this.bounds.width:a.offsetWidth*this.scale,a=a.offsetHeight*this.scale):(n=this.wrap?this.bounds.width:e.offsetWidth*this.scale,a=e.offsetHeight*this.scale);null!=n&&null!=a&&(this.boundingBox=new mxRectangle(this.bounds.x+this.margin.x*n,this.bounds.y+this.margin.y*a,n,a))}null!=this.boundingBox&&(0!=t&&(t=mxUtils.getBoundingBox(this.boundingBox,t),this.boundingBox.x=t.x,this.boundingBox.y=t.y,mxClient.IS_QUIRKS||(this.boundingBox.width=t.width,this.boundingBox.height=t.height)),this.boundingBox.x=Math.floor(this.boundingBox.x),this.boundingBox.y=Math.floor(this.boundingBox.y),this.boundingBox.width=Math.ceil(this.boundingBox.width),this.boundingBox.height=Math.ceil(this.boundingBox.height))},mxText.prototype.getShapeRotation=function(){return 0},mxText.prototype.getTextRotation=function(){return null!=this.state&&null!=this.state.shape?this.state.shape.getTextRotation():0},mxText.prototype.isPaintBoundsInverted=function(){return!this.horizontal&&null!=this.state&&this.state.view.graph.model.isVertex(this.state.cell)},mxText.prototype.configureCanvas=function(e,t,n,a,i){mxShape.prototype.configureCanvas.apply(this,arguments),e.setFontColor(this.color),e.setFontBackgroundColor(this.background),e.setFontBorderColor(this.border),e.setFontFamily(this.family),e.setFontSize(this.size),e.setFontStyle(this.fontStyle)},mxText.prototype.updateVmlContainer=function(){this.node.style.left=Math.round(this.bounds.x)+"px",this.node.style.top=Math.round(this.bounds.y)+"px",this.node.style.width="1px",this.node.style.height="1px",this.node.style.overflow="visible"},mxText.prototype.paint=function(e){var t=this.scale,n=this.bounds.x/t,a=this.bounds.y/t,i=this.bounds.width/t;t=this.bounds.height/t;this.updateTransform(e,n,a,i,t),this.configureCanvas(e,n,a,i,t);var o=mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML,s=o||e instanceof mxVmlCanvas2D?"html":"",r=this.value;!o&&"html"==s&&(r=mxUtils.htmlEntities(r,!1)),r=!mxUtils.isNode(this.value)&&this.replaceLinefeeds&&"html"==s?r.replace(/\n/g,"<br/>"):r,e.text(n,a,i,t,r,this.align,this.valign,this.wrap,s,"fill"==this.overflow,this.clipped,this.getTextRotation())},mxText.prototype.redrawHtmlShape=function(){var e=this.node.style;e.opacity=this.opacity<1?this.opacity:"",e.overflow="",e.width="",e.height="",this.updateFont(this.node),this.updateSize(this.node),this.updateValue(),this.offsetHeight=this.offsetWidth=null,null!=mxClient.CSS_PREFIX?this.updateHtmlTransform():this.updateHtmlFilter()},mxText.prototype.updateHtmlTransform=function(){var e=this.getTextRotation(),t=this.node.style,n=this.margin.x,a=this.margin.y;0!=e?(t[mxClient.CSS_PREFIX+"TransformOrigin"]=100*-n+"% "+100*-a+"%",t[mxClient.CSS_PREFIX+"Transform"]="translate("+100*n+"%,"+100*a+"%)scale("+this.scale+") rotate("+e+"deg)"):(t[mxClient.CSS_PREFIX+"TransformOrigin"]="0% 0%",t[mxClient.CSS_PREFIX+"Transform"]="scale("+this.scale+")translate("+100*n+"%,"+100*a+"%)"),t.left=Math.round(this.bounds.x)+"px",t.top=Math.round(this.bounds.y)+"px"},mxText.prototype.updateHtmlFilter=function(){var e=this.node.style,t=this.margin.x,n=this.margin.y,a=this.scale;e.filter="";var i=0,o=0;if(null!=(r=null!=this.state?this.state.view.textDiv:null)){if(r.style.overflow="",r.style.height="",r.style.width="",this.updateFont(r),this.updateSize(r),mxUtils.isNode(this.value))r.innerHTML=this.value.outerHTML;else{var s=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(s=mxUtils.htmlEntities(s,!1)),s=this.replaceLinefeeds?s.replace(/\n/g,"<br/>"):s,r.innerHTML=s}i=r.offsetWidth+2,o=r.offsetHeight+2}else i=this.node.offsetWidth,o=this.node.offsetHeight+1;this.offsetWidth=i,this.offsetHeight=o,r=this.bounds.width/a,s=this.bounds.height/a,mxClient.IS_QUIRKS&&(this.clipped||"fill"==this.overflow)&&0<s?(s=Math.min(s,o),e.height=Math.round(s+1)+"px"):s=o,"fill"!=this.overflow&&(mxClient.IS_QUIRKS&&(this.clipped||this.wrap)&&0<r?(r=Math.min(r,i),e.width=Math.round(r)+"px"):r=i);s*=a;var r=r*a,l=(i=this.getTextRotation()*(Math.PI/180),o=parseFloat(parseFloat(Math.cos(i)).toFixed(8)),parseFloat(parseFloat(Math.sin(-i)).toFixed(8)));(i=i%(2*Math.PI))<0&&(i+=2*Math.PI),(i%=Math.PI)>Math.PI/2&&(i=Math.PI-i);var d=Math.cos(i),c=Math.sin(-i),m=(s-s*d+r*c)/2+l*(t=r*-(t+.5))-o*(n=s*-(n+.5));0!=i&&(e.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+o+", M12="+l+", M21="+-l+", M22="+o+", sizingMethod='auto expand')"),e.zoom=a,e.left=Math.round(this.bounds.x+((r-r*d+s*c)/2-o*t-l*n)-r/2)+"px",e.top=Math.round(this.bounds.y+m-s/2)+"px"},mxText.prototype.updateValue=function(){if(mxUtils.isNode(this.value))this.node.innerHTML="",this.node.appendChild(this.value);else{var e=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(e=mxUtils.htmlEntities(e,!1));e=this.replaceLinefeeds?e.replace(/\n/g,"<br/>"):e;var t=null!=this.background&&this.background!=mxConstants.NONE?this.background:null,n=null!=this.border&&this.border!=mxConstants.NONE?this.border:null;if(null!=t||null!=n)if("fill"==this.overflow)null!=t&&(this.node.style.backgroundColor=t),null!=n&&(this.node.style.border="1px solid "+n);else{var a="";null!=t&&(a+="background-color:"+t+";"),null!=n&&(a+="border:1px solid "+n+";"),e='<div style="zoom:1;'+a+"display:inline-block;_display:inline;padding-bottom:1px;padding-right:1px;line-height:"+this.node.style.lineHeight+'">'+e+"</div>",this.node.style.lineHeight=""}this.node.innerHTML=e}},mxText.prototype.updateFont=function(e){(e=e.style).lineHeight=Math.round(this.size*mxConstants.LINE_HEIGHT)+"px",e.fontSize=Math.round(this.size)+"px",e.fontFamily=this.family,e.verticalAlign="top",e.color=this.color,e.fontWeight=(this.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?"bold":"",e.fontStyle=(this.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?"italic":"",e.fontDecoration=(this.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE?"underline":"",e.textAlign=this.align==mxConstants.ALIGN_CENTER?"center":this.align==mxConstants.ALIGN_RIGHT?"right":"left"},mxText.prototype.updateSize=function(e){var t=Math.round(this.bounds.width/this.scale),n=Math.round(this.bounds.height/this.scale);e=e.style,this.clipped?(e.overflow="hidden",0<n&&(e.maxHeight=n+"px"),0<t&&(e.width=t+"px")):"fill"==this.overflow&&(e.width=t+"px",0<n&&(e.maxHeight=n+"px")),this.wrap?(!this.clipped&&0<t&&(e.width=t+"px"),e.whiteSpace="normal"):e.whiteSpace="nowrap"},mxText.prototype.updateMargin=function(){this.margin=mxUtils.getAlignmentAsPoint(this.align,this.valign)},mxText.prototype.getSpacing=function(){return new mxPoint(this.align==mxConstants.ALIGN_CENTER?(this.spacingLeft-this.spacingRight)/2:this.align==mxConstants.ALIGN_RIGHT?-this.spacingRight-this.baseSpacingRight:this.spacingLeft+this.baseSpacingLeft,this.valign==mxConstants.ALIGN_MIDDLE?(this.spacingTop-this.spacingBottom)/2:this.valign==mxConstants.ALIGN_BOTTOM?-this.spacingBottom-this.baseSpacingBottom:this.spacingTop+this.baseSpacingTop)},mxUtils.extend(mxTriangle,mxActor),mxTriangle.prototype.redrawPath=function(e,t,n,a,i){e.moveTo(0,0),e.lineTo(a,.5*i),e.lineTo(0,i),e.close()},mxUtils.extend(mxHexagon,mxActor),mxHexagon.prototype.redrawPath=function(e,t,n,a,i){e.moveTo(.25*a,0),e.lineTo(.75*a,0),e.lineTo(a,.5*i),e.lineTo(.75*a,i),e.lineTo(.25*a,i),e.lineTo(0,.5*i),e.close()},mxUtils.extend(mxLine,mxShape),mxLine.prototype.paintVertexShape=function(e,t,n,a,i){n+=i/2,e.begin(),e.moveTo(t,n),e.lineTo(t+a,n),e.stroke()},mxUtils.extend(mxImageShape,mxRectangleShape),mxImageShape.prototype.preserveImageAspect=!0,mxImageShape.prototype.getSvgScreenOffset=function(){return mxClient.IS_IE?0:.5},mxImageShape.prototype.apply=function(e){mxShape.prototype.apply.apply(this,arguments),this.gradient=this.stroke=this.fill=null,null!=this.style&&(this.fill=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND),this.stroke=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER),this.preserveImageAspect=1==mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_ASPECT,1),this.flipH=this.flipH||1==mxUtils.getValue(this.style,"imageFlipH",0),this.flipV=this.flipV||1==mxUtils.getValue(this.style,"imageFlipV",0))},mxImageShape.prototype.isHtmlAllowed=function(){return!this.preserveImageAspect},mxImageShape.prototype.createHtml=function(){var e=document.createElement("div");return e.style.position="absolute",e},mxImageShape.prototype.paintVertexShape=function(e,t,n,a,i){if(null!=this.image){var o=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND,null),s=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER,null);null==o&&null==s||(e.setFillColor(o),e.setStrokeColor(s),e.rect(t,n,a,i),e.fillAndStroke()),e.image(t,n,a,i,this.image,this.preserveImageAspect,!1,!1)}else mxRectangleShape.prototype.paintBackground.apply(this,arguments)},mxImageShape.prototype.redrawHtmlShape=function(){if(this.node.style.left=Math.round(this.bounds.x)+"px",this.node.style.top=Math.round(this.bounds.y)+"px",this.node.style.width=Math.max(0,Math.round(this.bounds.width))+"px",this.node.style.height=Math.max(0,Math.round(this.bounds.height))+"px",this.node.style.backgroundColor=this.fill||"",this.node.style.borderColor=this.stroke||"",this.node.innerHTML="",null!=this.image){var e=document.createElement(mxClient.IS_IE6||null==mxClient.CSS_PREFIX&&0!=this.rotation?mxClient.VML_PREFIX+":image":"img");e.style.position="absolute",e.src=this.image;var t=this.opacity<100?"alpha(opacity="+this.opacity+")":"";this.node.style.filter=t,this.flipH&&this.flipV?t+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2)":this.flipH?t+="progid:DXImageTransform.Microsoft.BasicImage(mirror=1)":this.flipV&&(t+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"),e.style.filter!=t&&(e.style.filter=t),"image"==e.nodeName?e.style.rotation=this.rotation:e.style[mxClient.CSS_PREFIX+"Transform"]="rotate("+this.rotation+"deg)",e.style.width=this.node.style.width,e.style.height=this.node.style.height,this.node.style.backgroundImage="",this.node.appendChild(e)}else this.setTransparentBackgroundImage(this.node)},mxUtils.extend(mxLabel,mxRectangleShape),mxLabel.prototype.imageSize=mxConstants.DEFAULT_IMAGESIZE,mxLabel.prototype.spacing=2,mxLabel.prototype.indicatorSize=10,mxLabel.prototype.indicatorSpacing=2,mxLabel.prototype.init=function(e){mxShape.prototype.init.apply(this,arguments),null!=this.indicatorColor&&null!=this.indicatorShape&&(this.indicator=new this.indicatorShape,this.indicator.dialect=this.dialect,this.indicator.bounds=this.bounds,this.indicator.fill=this.indicatorColor,this.indicator.stroke=this.indicatorColor,this.indicator.gradient=this.indicatorGradientColor,this.indicator.direction=this.indicatorDirection,this.indicator.init(this.node))},mxLabel.prototype.redraw=function(){null!=this.indicator&&(this.indicator.fill=this.indicatorColor,this.indicator.stroke=this.indicatorColor,this.indicator.gradient=this.indicatorGradientColor,this.indicator.direction=this.indicatorDirection),mxShape.prototype.redraw.apply(this,arguments)},mxLabel.prototype.isHtmlAllowed=function(){return mxRectangleShape.prototype.isHtmlAllowed.apply(this,arguments)&&null==this.indicatorColor&&null==this.indicatorShape},mxLabel.prototype.paintForeground=function(e,t,n,a,i){this.paintImage(e,t,n,a,i),this.paintIndicator(e,t,n,a,i),mxRectangleShape.prototype.paintForeground.apply(this,arguments)},mxLabel.prototype.paintImage=function(e,t,n,a,i){null!=this.image&&(t=this.getImageBounds(t,n,a,i),e.image(t.x,t.y,t.width,t.height,this.image,!1,!1,!1))},mxLabel.prototype.getImageBounds=function(e,t,n,a){var i=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),o=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),s=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_WIDTH,mxConstants.DEFAULT_IMAGESIZE),r=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_HEIGHT,mxConstants.DEFAULT_IMAGESIZE),l=mxUtils.getNumber(this.style,mxConstants.STYLE_SPACING,this.spacing)+5;return new mxRectangle(e=i==mxConstants.ALIGN_CENTER?e+(n-s)/2:i==mxConstants.ALIGN_RIGHT?e+(n-s-l):e+l,t=o==mxConstants.ALIGN_TOP?t+l:o==mxConstants.ALIGN_BOTTOM?t+(a-r-l):t+(a-r)/2,s,r)},mxLabel.prototype.paintIndicator=function(e,t,n,a,i){null!=this.indicator?(this.indicator.bounds=this.getIndicatorBounds(t,n,a,i),this.indicator.paint(e)):null!=this.indicatorImage&&(t=this.getIndicatorBounds(t,n,a,i),e.image(t.x,t.y,t.width,t.height,this.indicatorImage,!1,!1,!1))},mxLabel.prototype.getIndicatorBounds=function(e,t,n,a){var i=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),o=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),s=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_WIDTH,this.indicatorSize),r=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_HEIGHT,this.indicatorSize),l=this.spacing+5;return new mxRectangle(e=i==mxConstants.ALIGN_RIGHT?e+(n-s-l):i==mxConstants.ALIGN_CENTER?e+(n-s)/2:e+l,t=o==mxConstants.ALIGN_BOTTOM?t+(a-r-l):o==mxConstants.ALIGN_TOP?t+l:t+(a-r)/2,s,r)},mxLabel.prototype.redrawHtmlShape=function(){for(mxRectangleShape.prototype.redrawHtmlShape.apply(this,arguments);this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);if(null!=this.image){var e=document.createElement("img");e.style.position="relative",e.setAttribute("border","0");var t=this.getImageBounds(this.bounds.x,this.bounds.y,this.bounds.width,this.bounds.height);t.x-=this.bounds.x,t.y-=this.bounds.y,e.style.left=Math.round(t.x)+"px",e.style.top=Math.round(t.y)+"px",e.style.width=Math.round(t.width)+"px",e.style.height=Math.round(t.height)+"px",e.src=this.image,this.node.appendChild(e)}},mxUtils.extend(mxCylinder,mxShape),mxCylinder.prototype.maxHeight=40,mxCylinder.prototype.svgStrokeTolerance=0,mxCylinder.prototype.paintVertexShape=function(e,t,n,a,i){e.translate(t,n),e.begin(),this.redrawPath(e,t,n,a,i,!1),e.fillAndStroke(),e.setShadow(!1),e.begin(),this.redrawPath(e,t,n,a,i,!0),e.stroke()},mxCylinder.prototype.redrawPath=function(e,t,n,a,i,o){t=Math.min(this.maxHeight,Math.round(i/5)),(o&&null!=this.fill||!o&&null==this.fill)&&(e.moveTo(0,t),e.curveTo(0,2*t,a,2*t,a,t),o||(e.stroke(),e.begin())),o||(e.moveTo(0,t),e.curveTo(0,-t/3,a,-t/3,a,t),e.lineTo(a,i-t),e.curveTo(a,i+t/3,0,i+t/3,0,i-t),e.close())},mxUtils.extend(mxConnector,mxPolyline),mxConnector.prototype.paintEdgeShape=function(e,t){var n=this.createMarker(e,t,!0),a=this.createMarker(e,t,!1);null==this.style||1!=this.style[mxConstants.STYLE_CURVED]?this.paintLine(e,t,this.isRounded):this.paintCurvedLine(e,t),e.setFillColor(this.stroke),e.setShadow(!1),e.setDashed(!1),null!=n&&n(),null!=a&&a()},mxConnector.prototype.paintCurvedLine=function(e,t){e.begin();var n=t[0],a=t.length;for(e.moveTo(n.x,n.y),n=1;n<a-2;n++){var i=t[n],o=t[n+1];e.quadTo(i.x,i.y,(i.x+o.x)/2,(i.y+o.y)/2)}i=t[a-2],o=t[a-1],e.quadTo(i.x,i.y,o.x,o.y),e.stroke()},mxConnector.prototype.createMarker=function(e,t,n){var a=t.length,i=n?t[1]:t[a-2],o=(a=(t=n?t[0]:t[a-1]).x-i.x,t.y-i.y),s=(i=a/(s=Math.max(1,Math.sqrt(a*a+o*o))),a=o/s,o=mxUtils.getNumber(this.style,n?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE),mxUtils.getValue(this.style,n?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW));return mxMarker.createMarker(e,this,s,t,i,a,o,n,this.strokewidth,0!=this.style[n?mxConstants.STYLE_STARTFILL:mxConstants.STYLE_ENDFILL])},mxConnector.prototype.augmentBoundingBox=function(e){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var t=0;mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(t=mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)+1),mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(t=Math.max(t,mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE))+1),e.grow(Math.ceil(t*this.scale))},mxUtils.extend(mxSwimlane,mxShape),mxSwimlane.prototype.imageSize=16,mxSwimlane.prototype.getGradientBounds=function(e,t,n,a,i){return new mxRectangle(t,n,a,Math.min(i,mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)))},mxSwimlane.prototype.getRotation=function(){var e=mxShape.prototype.getRotation.apply(this,arguments);return 1!=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)&&(e+=mxText.prototype.verticalTextRotation),e},mxSwimlane.prototype.getTextRotation=function(){return this.getRotation()},mxSwimlane.prototype.isPaintBoundsInverted=function(){return mxShape.prototype.isPaintBoundsInverted.apply(this,arguments)||1!=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)},mxSwimlane.prototype.getArcSize=function(e,t,n){return 3*n*(mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100)},mxSwimlane.prototype.paintVertexShape=function(e,t,n,a,i){var o=Math.min(i,mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),s=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE),r=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_LINE,1),l=0;e.translate(t,n),this.isRounded?(l=this.getArcSize(a,i,o),this.paintRoundedSwimlane(e,t,n,a,i,o,l,s,r)):this.paintSwimlane(e,t,n,a,i,o,s,r),s=mxUtils.getValue(this.style,mxConstants.STYLE_SEPARATORCOLOR,mxConstants.NONE),this.paintSeparator(e,a,o,i,s),null!=this.image&&(i=this.getImageBounds(t,o,a,i),e.image(i.x-t,i.y-n,i.width,i.height,this.image,!1,!1,!1)),this.glass&&(e.setShadow(!1),this.paintGlassEffect(e,0,0,a,o,l))},mxSwimlane.prototype.paintSwimlane=function(e,t,n,a,i,o,s,r){s!=mxConstants.NONE&&(e.save(),e.setFillColor(s),e.rect(0,0,a,i),e.fillAndStroke(),e.restore(),e.setShadow(!1)),e.begin(),e.moveTo(0,o),e.lineTo(0,0),e.lineTo(a,0),e.lineTo(a,o),r&&e.close(),e.fillAndStroke(),o<i&&s==mxConstants.NONE&&(e.pointerEvents=!1,e.begin(),e.moveTo(0,o),e.lineTo(0,i),e.lineTo(a,i),e.lineTo(a,o),e.stroke())},mxSwimlane.prototype.paintRoundedSwimlane=function(e,t,n,a,i,o,s,r,l){r!=mxConstants.NONE&&(e.save(),e.setFillColor(r),e.roundrect(0,0,a,i,s,s),e.fillAndStroke(),e.restore(),e.setShadow(!1)),e.begin(),e.moveTo(a,o),e.lineTo(a,s),e.quadTo(a,0,a-Math.min(a/2,s),0),e.lineTo(Math.min(a/2,s),0),e.quadTo(0,0,0,s),e.lineTo(0,o),l&&e.close(),e.fillAndStroke(),o<i&&r==mxConstants.NONE&&(e.pointerEvents=!1,e.begin(),e.moveTo(0,o),e.lineTo(0,i-s),e.quadTo(0,i,Math.min(a/2,s),i),e.lineTo(a-Math.min(a/2,s),i),e.quadTo(a,i,a,i-s),e.lineTo(a,o),e.stroke())},mxSwimlane.prototype.paintSeparator=function(e,t,n,a,i){i!=mxConstants.NONE&&(e.setStrokeColor(i),e.setDashed(!0),e.begin(),e.moveTo(t,n),e.lineTo(t,a),e.stroke(),e.setDashed(!1))},mxSwimlane.prototype.getImageBounds=function(e,t,n,a){return new mxRectangle(e+n-this.imageSize,t,this.imageSize,this.imageSize)},mxGraphLayout.prototype.graph=null,mxGraphLayout.prototype.useBoundingBox=!0,mxGraphLayout.prototype.parent=null,mxGraphLayout.prototype.moveCell=function(e,t,n){},mxGraphLayout.prototype.execute=function(e){},mxGraphLayout.prototype.getGraph=function(){return this.graph},mxGraphLayout.prototype.getConstraint=function(e,t,n,a){return null!=(t=null!=(n=this.graph.view.getState(t))?n.style:this.graph.getCellStyle(t))?t[e]:null},mxGraphLayout.traverse=function(e,t,n,a,i){if(null!=n&&null!=e){t=null==t||t,i=i||[];var o=mxCellPath.create(e);if(null==i[o]&&(null==(a=n(i[o]=e,a))||a)&&0<(a=this.graph.model.getEdgeCount(e)))for(o=0;o<a;o++){var s=this.graph.model.getEdgeAt(e,o),r=this.graph.model.getTerminal(s,!0)==e;t&&!r||(r=this.graph.view.getVisibleTerminal(s,!r),this.traverse(r,t,n,s,i))}}},mxGraphLayout.prototype.isVertexMovable=function(e){return this.graph.isCellMovable(e)},mxGraphLayout.prototype.isVertexIgnored=function(e){return!this.graph.getModel().isVertex(e)||!this.graph.isCellVisible(e)},mxGraphLayout.prototype.isEdgeIgnored=function(e){var t=this.graph.getModel();return!t.isEdge(e)||!this.graph.isCellVisible(e)||null==t.getTerminal(e,!0)||null==t.getTerminal(e,!1)},mxGraphLayout.prototype.setEdgeStyleEnabled=function(e,t){this.graph.setCellStyles(mxConstants.STYLE_NOEDGESTYLE,t?"0":"1",[e])},mxGraphLayout.prototype.setOrthogonalEdge=function(e,t){this.graph.setCellStyles(mxConstants.STYLE_ORTHOGONAL,t?"1":"0",[e])},mxGraphLayout.prototype.getParentOffset=function(e){var t=new mxPoint;if(null!=e&&e!=this.parent){var n=this.graph.getModel();if(n.isAncestor(this.parent,e))for(var a=n.getGeometry(e);e!=this.parent;)t.x+=a.x,t.y+=a.y,e=n.getParent(e),a=n.getGeometry(e)}return t},mxGraphLayout.prototype.setEdgePoints=function(e,t){if(null!=e){var n=this.graph.model,a=n.getGeometry(e);if(null==a?(a=new mxGeometry).setRelative(!0):a=a.clone(),null!=this.parent&&null!=t)for(var i=n.getParent(e),o=(i=this.getParentOffset(i),0);o<t.length;o++)t[o].x-=i.x,t[o].y-=i.y;a.points=t,n.setGeometry(e,a)}},mxGraphLayout.prototype.setVertexLocation=function(e,t,n){var a=this.graph.getModel(),i=a.getGeometry(e),o=null;if(null!=i){if(o=new mxRectangle(t,n,i.width,i.height),this.useBoundingBox){var s=this.graph.getView().getState(e);if(null!=s&&null!=s.text&&null!=s.text.boundingBox){var r=this.graph.getView().scale,l=s.text.boundingBox;s.text.boundingBox.x<s.x&&(t+=(s.x-l.x)/r,o.width=l.width),s.text.boundingBox.y<s.y&&(n+=(s.y-l.y)/r,o.height=l.height)}}null!=this.parent&&(null!=(s=a.getParent(e))&&s!=this.parent&&(t-=(s=this.getParentOffset(s)).x,n-=s.y)),i.x==t&&i.y==n||((i=i.clone()).x=t,i.y=n,a.setGeometry(e,i))}return o},mxGraphLayout.prototype.getVertexBounds=function(e){var t=this.graph.getModel().getGeometry(e);if(this.useBoundingBox&&(null!=(r=this.graph.getView().getState(e))&&null!=r.text&&null!=r.text.boundingBox)){var n=this.graph.getView().scale,a=r.text.boundingBox,i=Math.max(r.x-a.x,0)/n,o=Math.max(r.y-a.y,0)/n,s=Math.max(a.x+a.width-(r.x+r.width),0)/n,r=Math.max(a.y+a.height-(r.y+r.height),0)/n;t=new mxRectangle(t.x-i,t.y-o,t.width+i+s,t.height+o+r)}return null!=this.parent&&(e=this.graph.getModel().getParent(e),t=t.clone(),null!=e&&e!=this.parent&&(e=this.getParentOffset(e),t.x+=e.x,t.y+=e.y)),new mxRectangle(t.x,t.y,t.width,t.height)},mxGraphLayout.prototype.arrangeGroups=function(e,t){this.graph.getModel().beginUpdate();try{for(var n=e.length-1;0<=n;n--){var a=e[n],i=this.graph.getChildVertices(a),o=this.graph.getBoundingBoxFromGeometry(i),s=this.graph.getCellGeometry(a),r=0,l=0;if(this.graph.isSwimlane(a)){var d=this.graph.getStartSize(a);r=d.width,l=d.height}null!=o&&null!=s&&((s=s.clone()).x=s.x+o.x-t-r,s.y=s.y+o.y-t-l,s.width=o.width+2*t+r,s.height=o.height+2*t+l,this.graph.getModel().setGeometry(a,s),this.graph.moveCells(i,t+r-o.x,t+l-o.y))}}finally{this.graph.getModel().endUpdate()}},mxStackLayout.prototype=new mxGraphLayout,mxStackLayout.prototype.constructor=mxStackLayout,mxStackLayout.prototype.horizontal=null,mxStackLayout.prototype.spacing=null,mxStackLayout.prototype.x0=null,mxStackLayout.prototype.y0=null,mxStackLayout.prototype.border=0,mxStackLayout.prototype.keepFirstLocation=!1,mxStackLayout.prototype.fill=!1,mxStackLayout.prototype.resizeParent=!1,mxStackLayout.prototype.resizeLast=!1,mxStackLayout.prototype.wrap=null,mxStackLayout.prototype.isHorizontal=function(){return this.horizontal},mxStackLayout.prototype.moveCell=function(e,t,n){var a=this.graph.getModel(),i=a.getParent(e),o=this.isHorizontal();if(null!=e&&null!=i){var s=0,r=0,l=a.getChildCount(i);for(t=o?t:n,null!=(s=this.graph.getView().getState(i))&&(t-=o?s.x:s.y),s=0;s<l;s++)if((n=a.getChildAt(i,s))!=e&&null!=(n=a.getGeometry(n))){if(n=o?n.x+n.width/2:n.y+n.height/2,r<t&&t<n)break;r=n}o=i.getIndex(e),o=Math.max(0,s-(o<s?1:0)),a.add(i,e,o)}},mxStackLayout.prototype.getParentSize=function(e){var t=this.graph.getModel(),n=t.getGeometry(e);return null!=this.graph.container&&(null==n&&t.isLayer(e)||e==this.graph.getView().currentRoot)&&(n=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1)),n},mxStackLayout.prototype.execute=function(e){if(null!=e){var t=this.isHorizontal(),n=this.graph.getModel(),a=this.getParentSize(e),i=0;null!=a&&(i=t?a.height:a.width);i=i-(2*this.spacing+2*this.border);var o=this.x0+this.border,s=this.y0+this.border;if(this.graph.isSwimlane(e)){var r=this.graph.getCellStyle(e),l=mxUtils.getValue(r,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);t==(r=mxUtils.getValue(r,mxConstants.STYLE_HORIZONTAL,!0))&&(i-=l),t?s+=l:o+=l}n.beginUpdate();try{l=0,r=null;for(var d=n.getChildCount(e),c=0;c<d;c++){var m=n.getChildAt(e,c);if(!this.isVertexIgnored(m)&&this.isVertexMovable(m)){var u=n.getGeometry(m);null!=u&&(u=u.clone(),null!=this.wrap&&null!=r&&(t&&r.x+r.width+u.width+2*this.spacing>this.wrap||!t&&r.y+r.height+u.height+2*this.spacing>this.wrap)&&(r=null,t?s+=l+this.spacing:o+=l+this.spacing,l=0),l=Math.max(l,t?u.height:u.width),null!=r?t?u.x=r.x+r.width+this.spacing:u.y=r.y+r.height+this.spacing:this.keepFirstLocation||(t?u.x=o:u.y=s),t?u.y=s:u.x=o,this.fill&&0<i&&(t?u.height=i:u.width=i),n.setGeometry(m,u),r=u)}}this.resizeParent&&null!=a&&null!=r&&!this.graph.isCellCollapsed(e)?(a=a.clone(),t?a.width=r.x+r.width+this.spacing:a.height=r.y+r.height+this.spacing,n.setGeometry(e,a)):this.resizeLast&&null!=a&&null!=r&&(t?r.width=a.width-r.x-this.spacing:r.height=a.height-r.y-this.spacing)}finally{n.endUpdate()}}},mxPartitionLayout.prototype=new mxGraphLayout,mxPartitionLayout.prototype.constructor=mxPartitionLayout,mxPartitionLayout.prototype.horizontal=null,mxPartitionLayout.prototype.spacing=null,mxPartitionLayout.prototype.border=null,mxPartitionLayout.prototype.resizeVertices=!0,mxPartitionLayout.prototype.isHorizontal=function(){return this.horizontal},mxPartitionLayout.prototype.moveCell=function(e,t,n){var a=(n=this.graph.getModel()).getParent(e);if(null!=e&&null!=a){var i=0,o=0,s=n.getChildCount(a);for(i=0;i<s;i++){var r=n.getChildAt(a,i);if(null!=(r=this.getVertexBounds(r))){if(r=r.x+r.width/2,o<t&&t<r)break;o=r}}t=a.getIndex(e),t=Math.max(0,i-(t<i?1:0)),n.add(a,e,t)}},mxPartitionLayout.prototype.execute=function(e){var t=this.isHorizontal(),n=this.graph.getModel(),a=n.getGeometry(e);if(null!=this.graph.container&&(null==a&&n.isLayer(e)||e==this.graph.getView().currentRoot)&&(a=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1)),null!=a){for(var i=[],o=n.getChildCount(e),s=0;s<o;s++){var r=n.getChildAt(e,s);!this.isVertexIgnored(r)&&this.isVertexMovable(r)&&i.push(r)}if(0<(o=i.length)){var l=this.border,d=this.border,c=(c=t?a.height:a.width)-2*this.border;if(e=this.graph.isSwimlane(e)?this.graph.getStartSize(e):new mxRectangle,c-=t?e.height:e.width,l+=e.width,d+=e.height,e=this.border+(o-1)*this.spacing,0<(a=t?(a.width-l-e)/o:(a.height-d-e)/o)){n.beginUpdate();try{for(s=0;s<o;s++){r=i[s];var m=n.getGeometry(r);null!=m&&((m=m.clone()).x=l,m.y=d,t?(this.resizeVertices&&(m.width=a,m.height=c),l+=a+this.spacing):(this.resizeVertices&&(m.height=a,m.width=c),d+=a+this.spacing),n.setGeometry(r,m))}}finally{n.endUpdate()}}}}},mxCompactTreeLayout.prototype=new mxGraphLayout,mxCompactTreeLayout.prototype.constructor=mxCompactTreeLayout,mxCompactTreeLayout.prototype.horizontal=null,mxCompactTreeLayout.prototype.invert=null,mxCompactTreeLayout.prototype.resizeParent=!0,mxCompactTreeLayout.prototype.groupPadding=10,mxCompactTreeLayout.prototype.parentsChanged=null,mxCompactTreeLayout.prototype.moveTree=!1,mxCompactTreeLayout.prototype.levelDistance=10,mxCompactTreeLayout.prototype.nodeDistance=20,mxCompactTreeLayout.prototype.resetEdges=!0,mxCompactTreeLayout.prototype.prefHozEdgeSep=5,mxCompactTreeLayout.prototype.prefVertEdgeOff=4,mxCompactTreeLayout.prototype.minEdgeJetty=8,mxCompactTreeLayout.prototype.channelBuffer=4,mxCompactTreeLayout.prototype.edgeRouting=!0,mxCompactTreeLayout.prototype.isVertexIgnored=function(e){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(e).length},mxCompactTreeLayout.prototype.isHorizontal=function(){return this.horizontal},mxCompactTreeLayout.prototype.execute=function(e,t){this.parent=e;var n=this.graph.getModel();if(null==t)if(0<this.graph.getEdges(e,n.getParent(e),this.invert,!this.invert,!1).length)t=e;else{if(0<(s=this.graph.findTreeRoots(e,!0,this.invert)).length)for(var a=0;a<s.length;a++)if(!this.isVertexIgnored(s[a])&&0<this.graph.getEdges(s[a],null,this.invert,!this.invert,!1).length){t=s[a];break}}if(null!=t){this.parentsChanged=this.resizeParent?{}:null,n.beginUpdate();try{var i=this.dfs(t,e);if(null!=i){this.layout(i);var o=this.graph.gridSize,s=o;if(!this.moveTree){var r=this.getVertexBounds(t);null!=r&&(o=r.x,s=r.y)}if((r=null)!=(r=this.isHorizontal()?this.horizontalLayout(i,o,s):this.verticalLayout(i,null,o,s))){var l=a=0;r.x<0&&(a=Math.abs(o-r.x)),r.y<0&&(l=Math.abs(s-r.y)),(0!=a||0!=l)&&this.moveNode(i,a,l),this.resizeParent&&this.adjustParents(),this.edgeRouting&&this.localEdgeProcessing(i)}}}finally{n.endUpdate()}}},mxCompactTreeLayout.prototype.moveNode=function(e,t,n){for(e.x+=t,e.y+=n,this.apply(e),e=e.child;null!=e;)this.moveNode(e,t,n),e=e.next},mxCompactTreeLayout.prototype.dfs=function(e,t,n){n=null!=n?n:[];var a=mxCellPath.create(e),i=null;if(null!=e&&null==n[a]&&!this.isVertexIgnored(e)){n[a]=e;i=this.createNode(e),a=this.graph.getModel();var o=null;e=this.graph.getEdges(e,t,this.invert,!this.invert,!1,!0);for(var s=this.graph.getView(),r=0;r<e.length;r++){var l=e[r];if(!this.isEdgeIgnored(l)){this.resetEdges&&this.setEdgePoints(l,null),this.edgeRouting&&(this.setEdgeStyleEnabled(l,!1),this.setEdgePoints(l,null));var d;l=null!=(d=s.getState(l))?d.getVisibleTerminal(this.invert):s.getVisibleTerminal(l,this.invert);null!=(d=this.dfs(l,t,n))&&null!=a.getGeometry(l)&&(null==o?i.child=d:o.next=d,o=d)}}}return i},mxCompactTreeLayout.prototype.layout=function(e){if(null!=e){for(var t=e.child;null!=t;)this.layout(t),t=t.next;null!=e.child?this.attachParent(e,this.join(e)):this.layoutLeaf(e)}},mxCompactTreeLayout.prototype.horizontalLayout=function(e,t,n,a){if(e.x+=t+e.offsetX,e.y+=n+e.offsetY,a=this.apply(e,a),null!=(t=e.child)){a=this.horizontalLayout(t,e.x,e.y,a),n=e.y+t.offsetY;for(var i=t.next;null!=i;)a=this.horizontalLayout(i,e.x+t.offsetX,n,a),n+=i.offsetY,i=i.next}return a},mxCompactTreeLayout.prototype.verticalLayout=function(e,t,n,a,i){if(e.x+=n+e.offsetY,e.y+=a+e.offsetX,i=this.apply(e,i),null!=(t=e.child))for(i=this.verticalLayout(t,e,e.x,e.y,i),n=e.x+t.offsetY,a=t.next;null!=a;)i=this.verticalLayout(a,e,n,e.y+t.offsetX,i),n+=a.offsetY,a=a.next;return i},mxCompactTreeLayout.prototype.attachParent=function(e,t){var n=this.nodeDistance+this.levelDistance,a=(t-e.width)/2-this.nodeDistance,i=a+e.width+2*this.nodeDistance-t;e.child.offsetX=n+e.height,e.child.offsetY=i,e.contour.upperHead=this.createLine(e.height,0,this.createLine(n,i,e.contour.upperHead)),e.contour.lowerHead=this.createLine(e.height,0,this.createLine(n,a,e.contour.lowerHead))},mxCompactTreeLayout.prototype.layoutLeaf=function(e){var t=2*this.nodeDistance;e.contour.upperTail=this.createLine(e.height+t,0),e.contour.upperHead=e.contour.upperTail,e.contour.lowerTail=this.createLine(0,-e.width-t),e.contour.lowerHead=this.createLine(e.height+t,0,e.contour.lowerTail)},mxCompactTreeLayout.prototype.join=function(e){var t=2*this.nodeDistance,n=e.child;e.contour=n.contour;var a=n.width+t,i=a;for(n=n.next;null!=n;){var o=this.merge(e.contour,n.contour);n.offsetY=o+a,n.offsetX=0,i+=o+(a=n.width+t),n=n.next}return i},mxCompactTreeLayout.prototype.merge=function(e,t){for(var n=0,a=0,i=0,o=e.lowerHead,s=t.upperHead;null!=s&&null!=o;){var r=this.offset(n,a,s.dx,s.dy,o.dx,o.dy);a=a+r,i=i+r;n+s.dx<=o.dx?(n+=s.dx,a+=s.dy,s=s.next):(n-=o.dx,a-=o.dy,o=o.next)}return null!=s?(n=this.bridge(e.upperTail,0,0,s,n,a),e.upperTail=null!=n.next?t.upperTail:n,e.lowerTail=t.lowerTail):null==(n=this.bridge(t.lowerTail,n,a,o,0,0)).next&&(e.lowerTail=n),e.lowerHead=t.lowerHead,i},mxCompactTreeLayout.prototype.offset=function(e,t,n,a,i,o){var s;return i<=e||e+n<=0?0:0<(s=0<i*a-n*o?e<0?e*a/n-t:0<e?e*o/i-t:-t:i<e+n?o-(t+(i-e)*a/n):e+n<i?(n+e)*o/i-(t+a):o-(t+a))?s:0},mxCompactTreeLayout.prototype.bridge=function(e,t,n,a,i,o){return t=i+a.dx-t,i=i=0,0==a.dx?i=a.dy:(i=t*a.dy,i/=a.dx),t=this.createLine(t,i,a.next),e.next=this.createLine(0,o+a.dy-i-n,t),t},mxCompactTreeLayout.prototype.createNode=function(e){var t={};return t.cell=e,t.x=0,t.y=0,t.width=0,t.height=0,null!=(e=this.getVertexBounds(e))&&(this.isHorizontal()?(t.width=e.height,t.height=e.width):(t.width=e.width,t.height=e.height)),t.offsetX=0,t.offsetY=0,t.contour={},t},mxCompactTreeLayout.prototype.apply=function(e,t){var n=this.graph.getModel(),a=e.cell,i=n.getGeometry(a);return null!=a&&null!=i&&(this.isVertexMovable(a)&&(i=this.setVertexLocation(a,e.x,e.y),this.resizeParent&&(n=n.getParent(a),a=mxCellPath.create(n),null==this.parentsChanged[a]&&(this.parentsChanged[a]=n))),t=null==t?new mxRectangle(i.x,i.y,i.width,i.height):new mxRectangle(Math.min(t.x,i.x),Math.min(t.y,i.y),Math.max(t.x+t.width,i.x+i.width),Math.max(t.y+t.height,i.y+i.height))),t},mxCompactTreeLayout.prototype.createLine=function(e,t,n){var a={};return a.dx=e,a.dy=t,a.next=n,a},mxCompactTreeLayout.prototype.adjustParents=function(){var e,t=[];for(e in this.parentsChanged)t.push(this.parentsChanged[e]);this.arrangeGroups(mxUtils.sortCells(t,!0),this.groupPadding)},mxCompactTreeLayout.prototype.localEdgeProcessing=function(e){for(this.processNodeOutgoing(e),e=e.child;null!=e;)this.localEdgeProcessing(e),e=e.next},mxCompactTreeLayout.prototype.processNodeOutgoing=function(e){for(var t=e.child,n=e.cell,a=0,i=[];null!=t;){a++;var o=t.x;this.horizontal&&(o=t.y),i.push(new WeightedCellSorter(t,o)),t=t.next}i.sort(WeightedCellSorter.prototype.compare),(o=e.width)>(s=(a+1)*this.prefHozEdgeSep)+2*this.prefHozEdgeSep&&(o-=2*this.prefHozEdgeSep),t=(e=o/a)/2,o>s+2*this.prefHozEdgeSep&&(t+=this.prefHozEdgeSep);o=this.minEdgeJetty-this.prefVertEdgeOff;for(var s=0,r=this.getVertexBounds(n),l=0;l<i.length;l++){for(var d=i[l].cell.cell,c=this.getVertexBounds(d),m=(d=this.graph.getEdgesBetween(n,d,!1),[]),u=0,p=0,g=0;g<d.length;g++)this.horizontal?(u=r.x+r.width,p=r.y+t,m.push(new mxPoint(u,p)),u=r.x+r.width+o,m.push(new mxPoint(u,p)),p=c.y+c.height/2):(u=r.x+t,p=r.y+r.height,m.push(new mxPoint(u,p)),p=r.y+r.height+o,m.push(new mxPoint(u,p)),u=c.x+c.width/2),m.push(new mxPoint(u,p)),this.setEdgePoints(d[g],m);l<a/2?o+=this.prefVertEdgeOff:a/2<l&&(o-=this.prefVertEdgeOff),t+=e,s=Math.max(s,o)}},WeightedCellSorter.prototype.weightedValue=0,WeightedCellSorter.prototype.nudge=!1,WeightedCellSorter.prototype.visited=!1,WeightedCellSorter.prototype.rankIndex=null,WeightedCellSorter.prototype.cell=null,WeightedCellSorter.prototype.compare=function(e,t){return null!=e&&null!=t?t.weightedValue>e.weightedValue?1:t.weightedValue<e.weightedValue?-1:t.nudge?1:-1:0},mxFastOrganicLayout.prototype=new mxGraphLayout,mxFastOrganicLayout.prototype.constructor=mxFastOrganicLayout,mxFastOrganicLayout.prototype.useInputOrigin=!0,mxFastOrganicLayout.prototype.resetEdges=!0,mxFastOrganicLayout.prototype.disableEdgeStyle=!0,mxFastOrganicLayout.prototype.forceConstant=50,mxFastOrganicLayout.prototype.forceConstantSquared=0,mxFastOrganicLayout.prototype.minDistanceLimit=2,mxFastOrganicLayout.prototype.maxDistanceLimit=500,mxFastOrganicLayout.prototype.minDistanceLimitSquared=4,mxFastOrganicLayout.prototype.initialTemp=200,mxFastOrganicLayout.prototype.temperature=0,mxFastOrganicLayout.prototype.maxIterations=0,mxFastOrganicLayout.prototype.iteration=0,mxFastOrganicLayout.prototype.allowedToRun=!0,mxFastOrganicLayout.prototype.isVertexIgnored=function(e){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(e).length},mxFastOrganicLayout.prototype.execute=function(e){var t=this.graph.getModel();this.vertexArray=[];for(var n=this.graph.getChildVertices(e),a=0;a<n.length;a++)this.isVertexIgnored(n[a])||this.vertexArray.push(n[a]);var i=this.useInputOrigin?this.graph.view.getBounds(this.vertexArray):null,o=this.vertexArray.length;for(this.indices=[],this.dispX=[],this.dispY=[],this.cellLocation=[],this.isMoveable=[],this.neighbours=[],this.radius=[],this.radiusSquared=[],this.forceConstant<.001&&(this.forceConstant=.001),this.forceConstantSquared=this.forceConstant*this.forceConstant,a=0;a<this.vertexArray.length;a++){var s=this.vertexArray[a];this.cellLocation[a]=[];var r=mxCellPath.create(s);this.indices[r]=a;var l=this.getVertexBounds(s),d=l.width,c=l.height,m=l.x,u=l.y;this.cellLocation[a][0]=m+d/2,this.cellLocation[a][1]=u+c/2,this.radius[a]=Math.min(d,c),this.radiusSquared[a]=this.radius[a]*this.radius[a]}t.beginUpdate();try{for(a=0;a<o;a++){this.dispX[a]=0,this.dispY[a]=0,this.isMoveable[a]=this.isVertexMovable(this.vertexArray[a]);var p=this.graph.getConnections(this.vertexArray[a],e);n=this.graph.getOpposites(p,this.vertexArray[a]);for(this.neighbours[a]=[],d=0;d<n.length;d++){this.resetEdges&&this.graph.resetEdge(p[d]),this.disableEdgeStyle&&this.setEdgeStyleEnabled(p[d],!1);r=mxCellPath.create(n[d]);var g=this.indices[r];this.neighbours[a][d]=null!=g?g:a}}for(this.temperature=this.initialTemp,0==this.maxIterations&&(this.maxIterations=20*Math.sqrt(o)),this.iteration=0;this.iteration<this.maxIterations;this.iteration++){if(!this.allowedToRun)return;this.calcRepulsion(),this.calcAttraction(),this.calcPositions(),this.reduceTemperature()}for(e=n=null,a=0;a<this.vertexArray.length;a++)s=this.vertexArray[a],this.isVertexMovable(s)&&(null!=(l=this.getVertexBounds(s))&&(this.cellLocation[a][0]-=l.width/2,this.cellLocation[a][1]-=l.height/2,m=this.graph.snap(this.cellLocation[a][0]),u=this.graph.snap(this.cellLocation[a][1]),this.setVertexLocation(s,m,u),n=null==n?m:Math.min(n,m),e=null==e?u:Math.min(e,u)));a=1-(n||0),s=1-(e||0),null!=i&&(a+=i.x,s+=i.y),this.graph.moveCells(this.vertexArray,a,s)}finally{t.endUpdate()}},mxFastOrganicLayout.prototype.calcPositions=function(){for(var e=0;e<this.vertexArray.length;e++)if(this.isMoveable[e]){(n=Math.sqrt(this.dispX[e]*this.dispX[e]+this.dispY[e]*this.dispY[e]))<.001&&(n=.001);var t=this.dispX[e]/n*Math.min(n,this.temperature),n=this.dispY[e]/n*Math.min(n,this.temperature);this.dispX[e]=0,this.dispY[e]=0,this.cellLocation[e][0]+=t,this.cellLocation[e][1]+=n}},mxFastOrganicLayout.prototype.calcAttraction=function(){for(var e=0;e<this.vertexArray.length;e++)for(var t=0;t<this.neighbours[e].length;t++){var n=this.neighbours[e][t];if(e!=n&&this.isMoveable[e]&&this.isMoveable[n]){(a=(o=this.cellLocation[e][0]-this.cellLocation[n][0])*o+(s=this.cellLocation[e][1]-this.cellLocation[n][1])*s-this.radiusSquared[e]-this.radiusSquared[n])<this.minDistanceLimitSquared&&(a=this.minDistanceLimitSquared);var a,i=Math.sqrt(a),o=o/i*(a=a/this.forceConstant),s=s/i*a;this.dispX[e]-=o,this.dispY[e]-=s,this.dispX[n]+=o,this.dispY[n]+=s}}},mxFastOrganicLayout.prototype.calcRepulsion=function(){for(var e=this.vertexArray.length,t=0;t<e;t++)for(var n=t;n<e;n++){if(!this.allowedToRun)return;if(n!=t&&this.isMoveable[t]&&this.isMoveable[n]){var a=this.cellLocation[t][0]-this.cellLocation[n][0],i=this.cellLocation[t][1]-this.cellLocation[n][1];0==a&&(a=.01+Math.random()),0==i&&(i=.01+Math.random());var o=Math.sqrt(a*a+i*i),s=o-this.radius[t]-this.radius[n];s>this.maxDistanceLimit||(s<this.minDistanceLimit&&(s=this.minDistanceLimit),a=a/o*(s=this.forceConstantSquared/s),i=i/o*s,this.dispX[t]+=a,this.dispY[t]+=i,this.dispX[n]-=a,this.dispY[n]-=i)}}},mxFastOrganicLayout.prototype.reduceTemperature=function(){this.temperature=this.initialTemp*(1-this.iteration/this.maxIterations)},mxCircleLayout.prototype=new mxGraphLayout,mxCircleLayout.prototype.constructor=mxCircleLayout,mxCircleLayout.prototype.radius=null,mxCircleLayout.prototype.moveCircle=!1,mxCircleLayout.prototype.x0=0,mxCircleLayout.prototype.y0=0,mxCircleLayout.prototype.resetEdges=!0,mxCircleLayout.prototype.disableEdgeStyle=!0,mxCircleLayout.prototype.execute=function(e){var t=this.graph.getModel();t.beginUpdate();try{for(var n=0,a=null,i=null,o=[],s=t.getChildCount(e),r=0;r<s;r++){var l=t.getChildAt(e,r);if(this.isVertexIgnored(l))this.isEdgeIgnored(l)||(this.resetEdges&&this.graph.resetEdge(l),this.disableEdgeStyle&&this.setEdgeStyleEnabled(l,!1));else{o.push(l);var d=this.getVertexBounds(l);a=null==a?d.y:Math.min(a,d.y),i=null==i?d.x:Math.min(i,d.x),n=Math.max(n,Math.max(d.width,d.height))}}var c=this.getRadius(o.length,n);this.moveCircle&&(i=this.x0,a=this.y0),this.circle(o,c,i,a)}finally{t.endUpdate()}},mxCircleLayout.prototype.getRadius=function(e,t){return Math.max(e*t/Math.PI,this.radius)},mxCircleLayout.prototype.circle=function(e,t,n,a){for(var i=e.length,o=2*Math.PI/i,s=0;s<i;s++)this.isVertexMovable(e[s])&&this.setVertexLocation(e[s],n+t+t*Math.sin(s*o),a+t+t*Math.cos(s*o))},mxParallelEdgeLayout.prototype=new mxGraphLayout,mxParallelEdgeLayout.prototype.constructor=mxParallelEdgeLayout,mxParallelEdgeLayout.prototype.spacing=20,mxParallelEdgeLayout.prototype.execute=function(e){e=this.findParallels(e),this.graph.model.beginUpdate();try{for(var t in e){var n=e[t];1<n.length&&this.layout(n)}}finally{this.graph.model.endUpdate()}},mxParallelEdgeLayout.prototype.findParallels=function(e){for(var t=this.graph.getModel(),n=[],a=t.getChildCount(e),i=0;i<a;i++){var o=t.getChildAt(e,i);if(!this.isEdgeIgnored(o)){var s=this.getEdgeId(o);null!=s&&(null==n[s]&&(n[s]=[]),n[s].push(o))}}return n},mxParallelEdgeLayout.prototype.getEdgeId=function(e){var t=this.graph.getView(),n=t.getState(e),a=null!=n?n.getVisibleTerminal(!0):t.getVisibleTerminal(e,!0);return e=null!=n?n.getVisibleTerminal(!1):t.getVisibleTerminal(e,!1),null!=a&&null!=e?(a=mxCellPath.create(a),(e=mxCellPath.create(e))<a?e+"-"+a:a+"-"+e):null},mxParallelEdgeLayout.prototype.layout=function(e){var t=e[0];if((s=(n=this.graph.getModel()).getGeometry(n.getTerminal(t,!0)))==(o=n.getGeometry(n.getTerminal(t,!1)))){t=s.x+s.width+this.spacing;for(var n=s.y+s.height/2,a=0;a<e.length;a++)this.route(e[a],t,n),t+=this.spacing}else if(null!=s&&null!=o){t=s.x+s.width/2,n=s.y+s.height/2,a=o.x+o.width/2-t;var i=o.y+o.height/2-n,o=Math.sqrt(a*a+i*i),s=i*this.spacing/o;for(o=a*this.spacing/o,t=t+a/2+s*(e.length-1)/2,n=n+i/2-o*(e.length-1)/2,a=0;a<e.length;a++)this.route(e[a],t,n),t-=s,n+=o}},mxParallelEdgeLayout.prototype.route=function(e,t,n){this.graph.isCellMovable(e)&&this.setEdgePoints(e,[new mxPoint(t,n)])},mxCompositeLayout.prototype=new mxGraphLayout,mxCompositeLayout.prototype.constructor=mxCompositeLayout,mxCompositeLayout.prototype.layouts=null,mxCompositeLayout.prototype.master=null,mxCompositeLayout.prototype.moveCell=function(e,t,n){null!=this.master?this.master.move.apply(this.master,arguments):this.layouts[0].move.apply(this.layouts[0],arguments)},mxCompositeLayout.prototype.execute=function(e){var t=this.graph.getModel();t.beginUpdate();try{for(var n=0;n<this.layouts.length;n++)this.layouts[n].execute.apply(this.layouts[n],arguments)}finally{t.endUpdate()}},mxEdgeLabelLayout.prototype=new mxGraphLayout,mxEdgeLabelLayout.prototype.constructor=mxEdgeLabelLayout,mxEdgeLabelLayout.prototype.execute=function(e){for(var t=this.graph.view,n=this.graph.getModel(),a=[],i=[],o=n.getChildCount(e),s=0;s<o;s++){var r=n.getChildAt(e,s),l=t.getState(r);null!=l&&(this.isVertexIgnored(r)?this.isEdgeIgnored(r)||a.push(l):i.push(l))}this.placeLabels(i,a)},mxEdgeLabelLayout.prototype.placeLabels=function(e,t){var n=this.graph.getModel();n.beginUpdate();try{for(var a=0;a<t.length;a++){var i=t[a];if(null!=i&&null!=i.text&&null!=i.text.boundingBox)for(var o=0;o<e.length;o++){var s=e[o];null!=s&&this.avoid(i,s)}}}finally{n.endUpdate()}},mxEdgeLabelLayout.prototype.avoid=function(e,t){var n=this.graph.getModel(),a=e.text.boundingBox;if(mxUtils.intersects(a,t)){var i=-a.y-a.height+t.y,o=-a.y+t.y+t.height;i=Math.abs(i)<Math.abs(o)?i:o,o=-a.x-a.width+t.x,a=-a.x+t.x+t.width,a=Math.abs(o)<Math.abs(a)?o:a;Math.abs(a)<Math.abs(i)?i=0:a=0,null!=(o=n.getGeometry(e.cell))&&(null!=(o=o.clone()).offset?(o.offset.x+=a,o.offset.y+=i):o.offset=new mxPoint(a,i),n.setGeometry(e.cell,o))}},mxGraphAbstractHierarchyCell.prototype.maxRank=-1,mxGraphAbstractHierarchyCell.prototype.minRank=-1,mxGraphAbstractHierarchyCell.prototype.x=null,mxGraphAbstractHierarchyCell.prototype.y=null,mxGraphAbstractHierarchyCell.prototype.width=0,mxGraphAbstractHierarchyCell.prototype.height=0,mxGraphAbstractHierarchyCell.prototype.nextLayerConnectedCells=null,mxGraphAbstractHierarchyCell.prototype.previousLayerConnectedCells=null,mxGraphAbstractHierarchyCell.prototype.temp=null,mxGraphAbstractHierarchyCell.prototype.getNextLayerConnectedCells=function(e){return null},mxGraphAbstractHierarchyCell.prototype.getPreviousLayerConnectedCells=function(e){return null},mxGraphAbstractHierarchyCell.prototype.isEdge=function(){return!1},mxGraphAbstractHierarchyCell.prototype.isVertex=function(){return!1},mxGraphAbstractHierarchyCell.prototype.getGeneralPurposeVariable=function(e){return null},mxGraphAbstractHierarchyCell.prototype.setGeneralPurposeVariable=function(e,t){return null},mxGraphAbstractHierarchyCell.prototype.setX=function(e,t){this.isVertex()?this.x[0]=t:this.isEdge()&&(this.x[e-this.minRank-1]=t)},mxGraphAbstractHierarchyCell.prototype.getX=function(e){return this.isVertex()?this.x[0]:this.isEdge()?this.x[e-this.minRank-1]:0},mxGraphAbstractHierarchyCell.prototype.setY=function(e,t){this.isVertex()?this.y[0]=t:this.isEdge()&&(this.y[e-this.minRank-1]=t)},mxGraphHierarchyNode.prototype=new mxGraphAbstractHierarchyCell,mxGraphHierarchyNode.prototype.constructor=mxGraphHierarchyNode,mxGraphHierarchyNode.prototype.cell=null,mxGraphHierarchyNode.prototype.connectsAsTarget=[],mxGraphHierarchyNode.prototype.connectsAsSource=[],mxGraphHierarchyNode.prototype.hashCode=!1,mxGraphHierarchyNode.prototype.getRankValue=function(e){return this.maxRank},mxGraphHierarchyNode.prototype.getNextLayerConnectedCells=function(e){if(null==this.nextLayerConnectedCells){this.nextLayerConnectedCells=[],this.nextLayerConnectedCells[0]=[];for(var t=0;t<this.connectsAsTarget.length;t++){var n=this.connectsAsTarget[t];-1==n.maxRank||n.maxRank==e+1?this.nextLayerConnectedCells[0].push(n.source):this.nextLayerConnectedCells[0].push(n)}}return this.nextLayerConnectedCells[0]},mxGraphHierarchyNode.prototype.getPreviousLayerConnectedCells=function(e){if(null==this.previousLayerConnectedCells){this.previousLayerConnectedCells=[],this.previousLayerConnectedCells[0]=[];for(var t=0;t<this.connectsAsSource.length;t++){var n=this.connectsAsSource[t];-1==n.minRank||n.minRank==e-1?this.previousLayerConnectedCells[0].push(n.target):this.previousLayerConnectedCells[0].push(n)}}return this.previousLayerConnectedCells[0]},mxGraphHierarchyNode.prototype.isVertex=function(){return!0},mxGraphHierarchyNode.prototype.getGeneralPurposeVariable=function(e){return this.temp[0]},mxGraphHierarchyNode.prototype.setGeneralPurposeVariable=function(e,t){this.temp[0]=t},mxGraphHierarchyNode.prototype.isAncestor=function(e){if(null!=e&&null!=this.hashCode&&null!=e.hashCode&&this.hashCode.length<e.hashCode.length){if(this.hashCode==e.hashCode)return!0;if(null==this.hashCode||null==this.hashCode)return!1;for(var t=0;t<this.hashCode.length;t++)if(this.hashCode[t]!=e.hashCode[t])return!1;return!0}return!1},mxGraphHierarchyNode.prototype.getCoreCell=function(){return this.cell},mxGraphHierarchyEdge.prototype=new mxGraphAbstractHierarchyCell,mxGraphHierarchyEdge.prototype.constructor=mxGraphHierarchyEdge,mxGraphHierarchyEdge.prototype.edges=null,mxGraphHierarchyEdge.prototype.source=null,mxGraphHierarchyEdge.prototype.target=null,mxGraphHierarchyEdge.prototype.isReversed=!1,mxGraphHierarchyEdge.prototype.invert=function(e){e=this.source,this.source=this.target,this.target=e,this.isReversed=!this.isReversed},mxGraphHierarchyEdge.prototype.getNextLayerConnectedCells=function(e){if(null==this.nextLayerConnectedCells){this.nextLayerConnectedCells=[];for(var t=0;t<this.temp.length;t++)this.nextLayerConnectedCells[t]=[],t==this.temp.length-1?this.nextLayerConnectedCells[t].push(this.source):this.nextLayerConnectedCells[t].push(this)}return this.nextLayerConnectedCells[e-this.minRank-1]},mxGraphHierarchyEdge.prototype.getPreviousLayerConnectedCells=function(e){if(null==this.previousLayerConnectedCells){this.previousLayerConnectedCells=[];for(var t=0;t<this.temp.length;t++)this.previousLayerConnectedCells[t]=[],0==t?this.previousLayerConnectedCells[t].push(this.target):this.previousLayerConnectedCells[t].push(this)}return this.previousLayerConnectedCells[e-this.minRank-1]},mxGraphHierarchyEdge.prototype.isEdge=function(){return!0},mxGraphHierarchyEdge.prototype.getGeneralPurposeVariable=function(e){return this.temp[e-this.minRank-1]},mxGraphHierarchyEdge.prototype.setGeneralPurposeVariable=function(e,t){this.temp[e-this.minRank-1]=t},mxGraphHierarchyEdge.prototype.getCoreCell=function(){return null!=this.edges&&0<this.edges.length?this.edges[0]:null},mxGraphHierarchyModel.prototype.maxRank=null,mxGraphHierarchyModel.prototype.vertexMapper=null,mxGraphHierarchyModel.prototype.edgeMapper=null,mxGraphHierarchyModel.prototype.ranks=null,mxGraphHierarchyModel.prototype.roots=null,mxGraphHierarchyModel.prototype.parent=null,mxGraphHierarchyModel.prototype.dfsCount=0,mxGraphHierarchyModel.prototype.SOURCESCANSTARTRANK=1e8,mxGraphHierarchyModel.prototype.tightenToSource=!1,mxGraphHierarchyModel.prototype.createInternalCells=function(e,t,n){for(var a=e.getGraph(),i=0;i<t.length;i++){n[i]=new mxGraphHierarchyNode(t[i]);var o=mxCellPath.create(t[i]);this.vertexMapper[o]=n[i],o=e.getEdges(t[i]),n[i].connectsAsSource=[];for(var s=0;s<o.length;s++){if((d=e.getVisibleTerminal(o[s],!1))!=t[i]&&d!=t[i]&&e.graph.model.isVertex(d)&&!e.isVertexIgnored(d)){var r=e.getEdgesBetween(t[i],d,!1),l=e.getEdgesBetween(t[i],d,!0),d=mxCellPath.create(r[0]);if(null!=r&&0<r.length&&null==this.edgeMapper[d]&&2*l.length>=r.length){l=new mxGraphHierarchyEdge(r);for(var c=0;c<r.length;c++){var m=r[c];d=mxCellPath.create(m);this.edgeMapper[d]=l,a.resetEdge(m),e.disableEdgeStyle&&(e.setEdgeStyleEnabled(m,!1),e.setOrthogonalEdge(m,!0))}l.source=n[i],mxUtils.indexOf(n[i].connectsAsSource,l)<0&&n[i].connectsAsSource.push(l)}}}n[i].temp[0]=0}},mxGraphHierarchyModel.prototype.initialRank=function(){var e=[];if(null!=this.roots)for(var t=0;t<this.roots.length;t++){var n=mxCellPath.create(this.roots[t]);null!=(n=this.vertexMapper[n])&&e.push(n)}for(var a in this.vertexMapper)(n=this.vertexMapper[a]).temp[0]=-1;for(var i=e.slice();0<e.length;){var o,s;o=(n=e[0]).connectsAsTarget,s=n.connectsAsSource;var r=!0,l=this.SOURCESCANSTARTRANK;for(t=0;t<o.length;t++){var d=o[t];if(5270620!=d.temp[0]){r=!1;break}d=d.source,l=Math.min(l,d.temp[0]-1)}if(r){if(n.temp[0]=l,this.maxRank=Math.min(this.maxRank,l),null!=s)for(t=0;t<s.length;t++)(d=s[t]).temp[0]=5270620,-1==(d=d.target).temp[0]&&(e.push(d),d.temp[0]=-2);e.shift()}else if(t=e.shift(),e.push(n),t==n&&1==e.length)break}for(a in this.vertexMapper)(n=this.vertexMapper[a]).temp[0]-=this.maxRank;for(t=0;t<i.length;t++)for(e=0,o=(n=i[t]).connectsAsSource,a=0;a<o.length;a++)d=(d=o[a]).target,n.temp[0]=Math.max(e,d.temp[0]+1),e=n.temp[0];this.maxRank=this.SOURCESCANSTARTRANK-this.maxRank},mxGraphHierarchyModel.prototype.fixRanks=function(){var o=[];this.ranks=[];for(var e=0;e<this.maxRank+1;e++)o[e]=[],this.ranks[e]=o[e];var t=null;if(null!=this.roots){var n=this.roots;for(t=[],e=0;e<n.length;e++){var a=mxCellPath.create(n[e]);t[e]=this.vertexMapper[a]}}this.visit(function(e,t,n,a,i){if(0==i&&t.maxRank<0&&t.minRank<0&&(o[t.temp[0]].push(t),t.maxRank=t.temp[0],t.minRank=t.temp[0],t.temp[0]=o[t.maxRank].length-1),null!=e&&null!=n&&1<e.maxRank-t.maxRank)for(n.maxRank=e.maxRank,n.minRank=t.maxRank,n.temp=[],n.x=[],n.y=[],e=n.minRank+1;e<n.maxRank;e++)o[e].push(n),n.setGeneralPurposeVariable(e,o[e].length-1)},t,!1,null)},mxGraphHierarchyModel.prototype.visit=function(e,t,n,a){if(null!=t){for(var i=0;i<t.length;i++){var o=t[i];null!=o&&(null==a&&(a={}),n?(o.hashCode=[],o.hashCode[0]=this.dfsCount,o.hashCode[1]=i,this.extendedDfs(null,o,null,e,a,o.hashCode,i,0)):this.dfs(null,o,null,e,a,0))}this.dfsCount++}},mxGraphHierarchyModel.prototype.dfs=function(e,t,n,a,i,o){if(null!=t){var s=mxCellPath.create(t.cell);if(null==i[s])for(a(e,i[s]=t,n,o,0),e=t.connectsAsSource.slice(),n=0;n<e.length;n++)s=e[n],this.dfs(t,s.target,s,a,i,o+1);else a(e,t,n,o,1)}},mxGraphHierarchyModel.prototype.extendedDfs=function(e,t,n,a,i,o,s,r){if(null!=t)if(null==e||null!=t.hashCode&&t.hashCode[0]==e.hashCode[0]||(o=e.hashCode.length+1,t.hashCode=e.hashCode.slice(),t.hashCode[o-1]=s),null==i[s=mxCellPath.create(t.cell)])for(a(e,i[s]=t,n,r,0),e=t.connectsAsSource.slice(),n=0;n<e.length;n++)s=e[n],this.extendedDfs(t,s.target,s,a,i,t.hashCode,n,r+1);else a(e,t,n,r,1)},mxHierarchicalLayoutStage.prototype.execute=function(e){},mxMedianHybridCrossingReduction.prototype=new mxHierarchicalLayoutStage,mxMedianHybridCrossingReduction.prototype.constructor=mxMedianHybridCrossingReduction,mxMedianHybridCrossingReduction.prototype.layout=null,mxMedianHybridCrossingReduction.prototype.maxIterations=24,mxMedianHybridCrossingReduction.prototype.nestedBestRanks=null,mxMedianHybridCrossingReduction.prototype.currentBestCrossings=0,mxMedianHybridCrossingReduction.prototype.iterationsWithoutImprovement=0,mxMedianHybridCrossingReduction.prototype.maxNoImprovementIterations=2,mxMedianHybridCrossingReduction.prototype.execute=function(e){e=this.layout.getModel(),this.nestedBestRanks=[];for(var t=0;t<e.ranks.length;t++)this.nestedBestRanks[t]=e.ranks[t].slice();var n=0,a=this.calculateCrossings(e);for(t=0;t<this.maxIterations&&n<this.maxNoImprovementIterations;t++){this.weightedMedian(t,e),this.transpose(t,e);var i=this.calculateCrossings(e);if(i<a)for(a=i,i=n=0;i<this.nestedBestRanks.length;i++)for(var o=e.ranks[i],s=0;s<o.length;s++){var r=o[s];this.nestedBestRanks[i][r.getGeneralPurposeVariable(i)]=r}else for(n++,i=0;i<this.nestedBestRanks.length;i++)for(o=e.ranks[i],s=0;s<o.length;s++)(r=o[s]).setGeneralPurposeVariable(i,s);if(0==a)break}for(n=[],a=[],t=0;t<e.maxRank+1;t++)a[t]=[],n[t]=a[t];for(t=0;t<this.nestedBestRanks.length;t++)for(i=0;i<this.nestedBestRanks[t].length;i++)a[t].push(this.nestedBestRanks[t][i]);e.ranks=n},mxMedianHybridCrossingReduction.prototype.calculateCrossings=function(e){for(var t=e.ranks.length,n=0,a=1;a<t;a++)n+=this.calculateRankCrossing(a,e);return n},mxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(e,t){for(var n=0,a=t.ranks[e],i=a.length,o=t.ranks[e-1].length,s=[],r=0;r<i;r++)s[r]=[];for(r=0;r<a.length;r++)for(var l=(c=a[r]).getGeneralPurposeVariable(e),d=c.getPreviousLayerConnectedCells(e),c=0;c<d.length;c++){var m=d[c].getGeneralPurposeVariable(e-1);s[l][m]=201207}for(r=0;r<i;r++)for(c=0;c<o;c++)if(201207==s[r][c]){for(a=r+1;a<i;a++)for(l=0;l<c;l++)201207==s[a][l]&&n++;for(a=0;a<r;a++)for(l=c+1;l<o;l++)201207==s[a][l]&&n++}return n/2},mxMedianHybridCrossingReduction.prototype.transpose=function(e,t){for(var n=!0,a=0;n&&a++<10;)for(var i=1==e%2&&1==a%2,o=(n=!1,0);o<t.ranks.length;o++){for(var s=t.ranks[o],r=[],l=0;l<s.length;l++){(f=(b=s[l]).getGeneralPurposeVariable(o))<0&&(f=l),r[f]=b}var d=f=b=null,c=null,m=null,u=null,p=null,g=null,v=null,h=null;for(l=0;l<s.length-1;l++){if(0==l){for(var b=(v=r[l]).getNextLayerConnectedCells(o),f=v.getPreviousLayerConnectedCells(o),A=(m=[],u=[],0);A<b.length;A++)m[A]=b[A].getGeneralPurposeVariable(o+1);for(A=0;A<f.length;A++)u[A]=f[A].getGeneralPurposeVariable(o-1)}else b=d,f=c,m=p,u=g,v=h;for(d=(h=r[l+1]).getNextLayerConnectedCells(o),c=h.getPreviousLayerConnectedCells(o),p=[],g=[],A=0;A<d.length;A++)p[A]=d[A].getGeneralPurposeVariable(o+1);for(A=0;A<c.length;A++)g[A]=c[A].getGeneralPurposeVariable(o-1);var E=0,y=0;for(A=0;A<m.length;A++)for(var S=0;S<p.length;S++)m[A]>p[S]&&E++,m[A]<p[S]&&y++;for(A=0;A<u.length;A++)for(S=0;S<g.length;S++)u[A]>g[S]&&E++,u[A]<g[S]&&y++;(y<E||y==E&&i)&&(d=v.getGeneralPurposeVariable(o),v.setGeneralPurposeVariable(o,h.getGeneralPurposeVariable(o)),h.setGeneralPurposeVariable(o,d),d=b,c=f,p=m,g=u,h=v,i||(n=!0))}}},mxMedianHybridCrossingReduction.prototype.weightedMedian=function(e,t){var n=0==e%2;if(n)for(var a=t.maxRank-1;0<=a;a--)this.medianRank(a,n);else for(a=1;a<t.maxRank;a++)this.medianRank(a,n)},mxMedianHybridCrossingReduction.prototype.medianRank=function(e,t){for(var n=this.nestedBestRanks[e].length,a=[],i=[],o=0;o<n;o++){var s,r,l=this.nestedBestRanks[e][o],d=new MedianCellSorter;d.cell=l,r=t?e+1:e-1,null!=(s=t?l.getNextLayerConnectedCells(e):l.getPreviousLayerConnectedCells(e))&&0!=s.length?(d.medianValue=this.medianValue(s,r),a.push(d)):i[l.getGeneralPurposeVariable(e)]=!0}for(a.sort(MedianCellSorter.prototype.compare),o=0;o<n;o++)null==i[o]&&(l=a.shift().cell).setGeneralPurposeVariable(e,o)},mxMedianHybridCrossingReduction.prototype.medianValue=function(e,t){for(var n=[],a=0,i=0;i<e.length;i++){var o=e[i];n[a++]=o.getGeneralPurposeVariable(t)}return n.sort(function(e,t){return e-t}),1==a%2?n[Math.floor(a/2)]:2==a?(n[0]+n[1])/2:(o=n[(i=a/2)-1]-n[0],a=n[a-1]-n[i],(n[i-1]*a+n[i]*o)/(o+a))},MedianCellSorter.prototype.medianValue=0,MedianCellSorter.prototype.cell=!1,MedianCellSorter.prototype.compare=function(e,t){return null!=e&&null!=t?t.medianValue>e.medianValue?-1:t.medianValue<e.medianValue?1:0:0},mxMinimumCycleRemover.prototype=new mxHierarchicalLayoutStage,mxMinimumCycleRemover.prototype.constructor=mxMinimumCycleRemover,mxMinimumCycleRemover.prototype.layout=null,mxMinimumCycleRemover.prototype.execute=function(e){var t=this.layout.getModel(),o={},s=mxUtils.clone(t.vertexMapper,null,!0),n=null;if(null!=t.roots){var a=t.roots;n=[];for(e=0;e<a.length;e++){var i=mxCellPath.create(a[e]);n[e]=t.vertexMapper[i]}}if(t.visit(function(e,t,n,a,i){t.isAncestor(e)&&(n.invert(),mxUtils.remove(n,e.connectsAsSource),e.connectsAsTarget.push(n),mxUtils.remove(n,t.connectsAsTarget),t.connectsAsSource.push(n)),e=mxCellPath.create(t.cell),o[e]=t,delete s[e]},n,!0,null),n=null,0<s.lenth&&(n=mxUtils.clone(s,null,!0)),e=mxUtils.clone(o,null,!0),t.visit(function(e,t,n,a,i){t.isAncestor(e)&&(n.invert(),mxUtils.remove(n,e.connectsAsSource),t.connectsAsSource.push(n),e.connectsAsTarget.push(n),mxUtils.remove(n,t.connectsAsTarget)),e=mxCellPath.create(t.cell),o[e]=t,delete s[e]},s,!0,e),a=this.layout.getGraph(),null!=n&&0<n.length)for(t=t.roots,e=0;e<n.length;e++)i=n[e].cell,0==a.getIncomingEdges(i).length&&t.push(i)};var mxHierarchicalEdgeStyle={ORTHOGONAL:1,POLYLINE:2,STRAIGHT:3,CURVE:4};function WeightedCellSorter(e,t){this.cell=e,this.weightedValue=t}function mxHierarchicalLayout(e,t,n){mxGraphLayout.call(this,e),this.orientation=null!=t?t:mxConstants.DIRECTION_NORTH,this.deterministic=null==n||n}function mxGraphModel(e){this.currentEdit=this.createUndoableEdit(),null!=e?this.setRoot(e):this.clear()}function mxRootChange(e,t){this.model=e,this.previous=this.root=t}function mxChildChange(e,t,n,a){this.model=e,this.previous=this.parent=t,this.child=n,this.previousIndex=this.index=a}function mxTerminalChange(e,t,n,a){this.model=e,this.cell=t,this.previous=this.terminal=n,this.source=a}function mxValueChange(e,t,n){this.model=e,this.cell=t,this.previous=this.value=n}function mxStyleChange(e,t,n){this.model=e,this.cell=t,this.previous=this.style=n}function mxGeometryChange(e,t,n){this.model=e,this.cell=t,this.previous=this.geometry=n}function mxCollapseChange(e,t,n){this.model=e,this.cell=t,this.previous=this.collapsed=n}function mxVisibleChange(e,t,n){this.model=e,this.cell=t,this.previous=this.visible=n}function mxCellAttributeChange(e,t,n){this.cell=e,this.attribute=t,this.previous=this.value=n}function mxCell(e,t,n){this.value=e,this.setGeometry(t),this.setStyle(n),null!=this.onInit&&this.onInit()}function mxGeometry(e,t,n,a){mxRectangle.call(this,e,t,n,a)}mxCoordinateAssignment.prototype=new mxHierarchicalLayoutStage,mxCoordinateAssignment.prototype.constructor=mxCoordinateAssignment,mxCoordinateAssignment.prototype.layout=null,mxCoordinateAssignment.prototype.intraCellSpacing=30,mxCoordinateAssignment.prototype.interRankCellSpacing=100,mxCoordinateAssignment.prototype.parallelEdgeSpacing=10,mxCoordinateAssignment.prototype.maxIterations=8,mxCoordinateAssignment.prototype.prefHozEdgeSep=5,mxCoordinateAssignment.prototype.prefVertEdgeOff=2,mxCoordinateAssignment.prototype.minEdgeJetty=12,mxCoordinateAssignment.prototype.channelBuffer=4,mxCoordinateAssignment.prototype.jettyPositions=null,mxCoordinateAssignment.prototype.orientation=mxConstants.DIRECTION_NORTH,mxCoordinateAssignment.prototype.initialX=null,mxCoordinateAssignment.prototype.limitX=null,mxCoordinateAssignment.prototype.currentXDelta=null,mxCoordinateAssignment.prototype.widestRank=null,mxCoordinateAssignment.prototype.rankTopY=null,mxCoordinateAssignment.prototype.rankBottomY=null,mxCoordinateAssignment.prototype.widestRankValue=null,mxCoordinateAssignment.prototype.rankWidths=null,mxCoordinateAssignment.prototype.rankY=null,mxCoordinateAssignment.prototype.fineTuning=!0,mxCoordinateAssignment.prototype.edgeStyle=mxHierarchicalEdgeStyle.POLYLINE,mxCoordinateAssignment.prototype.nextLayerConnectedCache=null,mxCoordinateAssignment.prototype.previousLayerConnectedCache=null,mxCoordinateAssignment.prototype.groupPadding=10,mxCoordinateAssignment.prototype.printStatus=function(){var e=this.layout.getModel();mxLog.show(),mxLog.writeln("======Coord assignment debug=======");for(var t=0;t<e.ranks.length;t++){mxLog.write("Rank ",t," : ");for(var n=e.ranks[t],a=0;a<n.length;a++)mxLog.write(n[a].getGeneralPurposeVariable(t),"  ");mxLog.writeln()}mxLog.writeln("====================================")},mxCoordinateAssignment.prototype.execute=function(e){this.jettyPositions=[],e=this.layout.getModel(),this.currentXDelta=0,this.initialCoords(this.layout.getGraph(),e),this.fineTuning&&this.minNode(e);var t=1e8;if(this.fineTuning)for(var n=0;n<this.maxIterations;n++){if(0!=n&&(this.medianPos(n,e),this.minNode(e)),this.currentXDelta<t){for(var a=0;a<e.ranks.length;a++)for(var i=e.ranks[a],o=0;o<i.length;o++){var s=i[o];s.setX(a,s.getGeneralPurposeVariable(a))}t=this.currentXDelta}else for(a=0;a<e.ranks.length;a++)for(i=e.ranks[a],o=0;o<i.length;o++)(s=i[o]).setGeneralPurposeVariable(a,s.getX(a));this.minPath(this.layout.getGraph(),e),this.currentXDelta=0}this.setCellLocations(this.layout.getGraph(),e)},mxCoordinateAssignment.prototype.minNode=function(e){for(var t=[],n=[],a=[],i=0;i<=e.maxRank;i++){a[i]=e.ranks[i];for(var o=0;o<a[i].length;o++){var s=a[i][o];(r=new WeightedCellSorter(s,i)).rankIndex=o,r.visited=!0,t.push(r),n[s=mxCellPath.create(s.getCoreCell())]=r}}for(e=10*t.length,o=0;0<t.length&&o<=e;){i=(r=t.shift()).cell;var r,l=r.weightedValue,d=parseInt(r.rankIndex),c=(s=i.getNextLayerConnectedCells(l),i.getPreviousLayerConnectedCells(l)),m=s.length,u=c.length,p=this.medianXValue(s,l+1),g=this.medianXValue(c,l-1),v=m+u,h=i.getGeneralPurposeVariable(l),b=h;if(0<v&&(b=(p*m+g*u)/v),m=!1,b<h-1?0==d?(i.setGeneralPurposeVariable(l,b),m=!0):(h=(h=(d=a[l][d-1]).getGeneralPurposeVariable(l))+d.width/2+this.intraCellSpacing+i.width/2)<b?(i.setGeneralPurposeVariable(l,b),m=!0):h<i.getGeneralPurposeVariable(l)-1&&(i.setGeneralPurposeVariable(l,h),m=!0):h+1<b&&(d==a[l].length-1?(i.setGeneralPurposeVariable(l,b),m=!0):b<(h=(h=(d=a[l][d+1]).getGeneralPurposeVariable(l))-d.width/2-this.intraCellSpacing-i.width/2)?(i.setGeneralPurposeVariable(l,b),m=!0):h>i.getGeneralPurposeVariable(l)+1&&(i.setGeneralPurposeVariable(l,h),m=!0)),m){for(i=0;i<s.length;i++)l=s[i],null!=(l=n[l=mxCellPath.create(l.getCoreCell())])&&0==l.visited&&(l.visited=!0,t.push(l));for(i=0;i<c.length;i++)l=c[i],null!=(l=n[l=mxCellPath.create(l.getCoreCell())])&&0==l.visited&&(l.visited=!0,t.push(l))}r.visited=!1,o++}},mxCoordinateAssignment.prototype.medianPos=function(e,t){if(0==e%2)for(var n=t.maxRank;0<n;n--)this.rankMedianPosition(n-1,t,n);else for(n=0;n<t.maxRank-1;n++)this.rankMedianPosition(n+1,t,n)},mxCoordinateAssignment.prototype.rankMedianPosition=function(e,t,n){t=t.ranks[e];for(var a=[],i=[],o=0;o<t.length;o++){var s=t[o];a[o]=new WeightedCellSorter,a[o].cell=s,a[o].rankIndex=o;var r=mxCellPath.create(s.getCoreCell());i[r]=a[o];var l=null;l=n<e?s.getPreviousLayerConnectedCells(e):s.getNextLayerConnectedCells(e);a[o].weightedValue=this.calculatedWeightedValue(s,l)}for(a.sort(WeightedCellSorter.prototype.compare),o=0;o<a.length;o++){r=0,s=a[o].cell,r=0,null!=(l=n<e?s.getPreviousLayerConnectedCells(e).slice():s.getNextLayerConnectedCells(e).slice())&&(r=0<(r=l.length)?this.medianXValue(l,n):s.getGeneralPurposeVariable(e));for(var d=0,c=(l=-1e8,a[o].rankIndex-1);0<=c;){var m;if(null!=(m=i[m=mxCellPath.create(t[c].getCoreCell())])){var u=m.cell;m.visited?(l=u.getGeneralPurposeVariable(e)+u.width/2+this.intraCellSpacing+d+s.width/2,c=-1):(d+=u.width+this.intraCellSpacing,c--)}}for(d=0,u=1e8,c=a[o].rankIndex+1;c<a.length;)if(null!=(m=i[m=mxCellPath.create(t[c].getCoreCell())])){var p=m.cell;m.visited?(u=p.getGeneralPurposeVariable(e)-p.width/2-this.intraCellSpacing-d-s.width/2,c=a.length):(d+=p.width+this.intraCellSpacing,c++)}l<=r&&r<=u?s.setGeneralPurposeVariable(e,r):r<l?(s.setGeneralPurposeVariable(e,l),this.currentXDelta+=l-r):u<r&&(s.setGeneralPurposeVariable(e,u),this.currentXDelta+=r-u),a[o].visited=!0}},mxCoordinateAssignment.prototype.calculatedWeightedValue=function(e,t){for(var n=0,a=0;a<t.length;a++){var i=t[a];e.isVertex()&&i.isVertex()?n++:n=e.isEdge()&&i.isEdge()?n+8:n+2}return n},mxCoordinateAssignment.prototype.medianXValue=function(e,t){if(0==e.length)return 0;for(var n=[],a=0;a<e.length;a++)n[a]=e[a].getGeneralPurposeVariable(t);return n.sort(function(e,t){return e-t}),1==e.length%2?n[Math.floor(e.length/2)]:(n[(a=e.length/2)-1]+n[a])/2},mxCoordinateAssignment.prototype.initialCoords=function(e,t){this.calculateWidestRank(e,t);for(var n=this.widestRank;0<=n;n--)n<t.maxRank&&this.rankCoordinates(n,e,t);for(n=this.widestRank+1;n<=t.maxRank;n++)0<n&&this.rankCoordinates(n,e,t)},mxCoordinateAssignment.prototype.rankCoordinates=function(e,t,n){t=n.ranks[e],n=0;for(var a=this.initialX+(this.widestRankValue-this.rankWidths[e])/2,i=!1,o=0;o<t.length;o++){var s=t[o];if(s.isVertex()){var r=this.layout.getVertexBounds(s.cell);null!=r?this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(s.width=r.width,s.height=r.height):(s.width=r.height,s.height=r.width):i=!0,n=Math.max(n,s.height)}else s.isEdge()&&(r=1,null!=s.edges?r=s.edges.length:mxLog.warn("edge.edges is null"),s.width=(r-1)*this.parallelEdgeSpacing);a+=s.width/2,s.setX(e,a),s.setGeneralPurposeVariable(e,a),a+=s.width/2,a+=this.intraCellSpacing}1==i&&mxLog.warn("At least one cell has no bounds")},mxCoordinateAssignment.prototype.calculateWidestRank=function(e,t){var n=-this.interRankCellSpacing,a=0;this.rankWidths=[],this.rankY=[];for(var i=t.maxRank;0<=i;i--){for(var o=0,s=t.ranks[i],r=this.initialX,l=!1,d=0;d<s.length;d++){var c=s[d];if(c.isVertex()){var m=this.layout.getVertexBounds(c.cell);null!=m?this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(c.width=m.width,c.height=m.height):(c.width=m.height,c.height=m.width):l=!0,o=Math.max(o,c.height)}else c.isEdge()&&(m=1,null!=c.edges?m=c.edges.length:mxLog.warn("edge.edges is null"),c.width=(m-1)*this.parallelEdgeSpacing);r+=c.width/2,c.setX(i,r),c.setGeneralPurposeVariable(i,r),r+=c.width/2,(r+=this.intraCellSpacing)>this.widestRankValue&&(this.widestRankValue=r,this.widestRank=i),this.rankWidths[i]=r}for(1==l&&mxLog.warn("At least one cell has no bounds"),this.rankY[i]=n,r=o/2+a/2+this.interRankCellSpacing,a=o,n=this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_WEST?n+r:n-r,d=0;d<s.length;d++)s[d].setY(i,n)}},mxCoordinateAssignment.prototype.minPath=function(e,t){var n,a=t.edgeMapper;for(n in a){var i=a[n];if(!(i.maxRank-i.minRank-1<1)){for(var o=i.getGeneralPurposeVariable(i.minRank+1),s=!0,r=0,l=i.minRank+2;l<i.maxRank;l++){o!=(d=i.getGeneralPurposeVariable(l))?(s=!1,o=d):r++}if(!s){s=o=0;var d=[],c=[],m=i.getGeneralPurposeVariable(i.minRank+1);for(l=i.minRank+1;l<i.maxRank-1;l++){var u=i.getX(l+1);m==u?(d[l-i.minRank-1]=m,o++):this.repositionValid(t,i,l+1,m)?(d[l-i.minRank-1]=m,o++):m=d[l-i.minRank-1]=u}for(m=i.getX(l),l=i.maxRank-1;l>i.minRank+1;l--)m==(u=i.getX(l-1))?(c[l-i.minRank-2]=m,s++):this.repositionValid(t,i,l-1,m)?(c[l-i.minRank-2]=m,s++):(c[l-i.minRank-2]=i.getX(l-1),m=u);if(r<s||r<o)if(o<=s)for(l=i.maxRank-2;l>i.minRank;l--)i.setX(l,c[l-i.minRank-1]);else if(s<o)for(l=i.minRank+2;l<i.maxRank;l++)i.setX(l,d[l-i.minRank-2])}}}},mxCoordinateAssignment.prototype.repositionValid=function(e,t,n,a){e=e.ranks[n];for(var i=-1,o=0;o<e.length;o++)if(t==e[o]){i=o;break}if(i<0)return!1;if(a<(o=t.getGeneralPurposeVariable(n))){if(0==i)return!0;if(!((n=(n=(e=e[i-1]).getGeneralPurposeVariable(n))+e.width/2+this.intraCellSpacing+t.width/2)<=a))return!1}else if(o<a){if(i==e.length-1)return!0;if(!(a<=(n=(n=(e=e[i+1]).getGeneralPurposeVariable(n))-e.width/2-this.intraCellSpacing-t.width/2)))return!1}return!0},mxCoordinateAssignment.prototype.setCellLocations=function(e,t){this.rankTopY=[],this.rankBottomY=[];for(var n=0;n<t.ranks.length;n++)this.rankTopY[n]=Number.MAX_VALUE,this.rankBottomY[n]=0;n=null,this.layout.resizeParent&&(n={});var a,i=t.edgeMapper,o=t.vertexMapper;for(a in o){var s=o[a];if(this.setVertexLocation(s),this.layout.resizeParent){s=e.model.getParent(s.cell);var r=mxCellPath.create(s);null==n[r]&&(n[r]=s)}}for(a in this.layout.resizeParent&&null!=n&&this.adjustParents(n),(this.edgeStyle==mxHierarchicalEdgeStyle.ORTHOGONAL||this.edgeStyle==mxHierarchicalEdgeStyle.POLYLINE||this.edgeStyle==mxHierarchicalEdgeStyle.CURVE)&&this.localEdgeProcessing(t),i)this.setEdgePosition(i[a])},mxCoordinateAssignment.prototype.adjustParents=function(e){var t,n=[];for(t in e)n.push(e[t]);this.layout.arrangeGroups(mxUtils.sortCells(n,!0),this.groupPadding)},mxCoordinateAssignment.prototype.localEdgeProcessing=function(e){for(var t=0;t<e.ranks.length;t++)for(var n=e.ranks[t],a=0;a<n.length;a++){var i=n[a];if(i.isVertex())for(var o=i.getPreviousLayerConnectedCells(t),s=t-1,r=0;r<2;r++){if(-1<s&&s<e.ranks.length&&null!=o&&0<o.length){for(var l=[],d=0;d<o.length;d++){var c=new WeightedCellSorter(o[d],o[d].getX(s));l.push(c)}l.sort(WeightedCellSorter.prototype.compare);var m=(c=i.x[0]-i.width/2)+i.width,u=o=0;for(s=[],d=0;d<l.length;d++){var p,g=l[d].cell;if(g.isVertex()){p=0==r?i.connectsAsSource:i.connectsAsTarget;for(var v=0;v<p.length;v++)p[v].source!=g&&p[v].target!=g||(o+=p[v].edges.length,u++,s.push(p[v]))}else o+=g.edges.length,u++,s.push(g)}for(i.width>(o+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(c+=this.prefHozEdgeSep,m-=this.prefHozEdgeSep),c+=(l=(m-c)/o)/2,m=this.minEdgeJetty-this.prefVertEdgeOff,d=u=0;d<s.length;d++){for(g=s[d].edges.length,v=mxCellPath.create(s[d].edges[0]),null==(p=this.jettyPositions[v])&&(p=[],this.jettyPositions[v]=p),d<o/2?m+=this.prefVertEdgeOff:o/2<d&&(m-=this.prefVertEdgeOff),v=0;v<g;v++)p[4*v+2*r]=c,c+=l,p[4*v+2*r+1]=m;u=Math.max(u,m)}}o=i.getNextLayerConnectedCells(t),s=t+1}}},mxCoordinateAssignment.prototype.setEdgePosition=function(e){var t=0;if(101207!=e.temp[0]){var n=e.maxRank,a=e.minRank;n==a&&(n=e.source.maxRank,a=e.target.minRank);for(var i=0,o=mxCellPath.create(e.edges[0]),s=(o=this.jettyPositions[o],e.isReversed?e.target.cell:e.source.cell),r=this.layout.graph,l=0;l<e.edges.length;l++){var d=e.edges[l],c=this.layout.getVisibleTerminal(d,!0),m=r.model.getTerminal(d,!0),u=[],p=e.isReversed;if(c!=s&&(p=!p),null!=o){var g=p?2:0,v=p?this.rankTopY[a]:this.rankBottomY[n],h=o[4*i+1+g];p&&(h=-h),v+=h,g=o[4*i+g],m=r.model.getTerminal(d,!0),this.layout.isPort(m)&&r.model.getParent(m)==c&&(g=null!=(g=r.view.getState(m))?g.x:c.geometry.x+e.source.width*m.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(u.push(new mxPoint(g,v)),this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&u.push(new mxPoint(g,v+h))):(u.push(new mxPoint(v,g)),this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&u.push(new mxPoint(v+h,g)))}for(g=e.x.length-1,v=h=-1,c=e.maxRank-1,p&&(g=0,h=e.x.length,v=1,c=e.minRank+1);e.maxRank!=e.minRank&&g!=h;g+=v){m=e.x[g]+t;var b=(this.rankTopY[c]+this.rankBottomY[c+1])/2,f=(this.rankTopY[c-1]+this.rankBottomY[c])/2;if(p){var A=b;b=f,f=A}this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(u.push(new mxPoint(m,b)),u.push(new mxPoint(m,f))):(u.push(new mxPoint(b,m)),u.push(new mxPoint(f,m))),this.limitX=Math.max(this.limitX,m),c+=v}null!=o&&(g=p?2:0,v=p?this.rankBottomY[n]:this.rankTopY[a],h=o[4*i+3-g],p&&(h=-h),v-=h,g=o[4*i+2-g],p=r.model.getTerminal(d,!1),c=this.layout.getVisibleTerminal(d,!1),this.layout.isPort(p)&&r.model.getParent(p)==c&&(g=null!=(g=r.view.getState(p))?g.x:c.geometry.x+e.target.width*p.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&u.push(new mxPoint(g,v-h)),u.push(new mxPoint(g,v))):(this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&u.push(new mxPoint(v-h,g)),u.push(new mxPoint(v,g)))),e.isReversed&&this.processReversedEdge(e,d),this.layout.setEdgePoints(d,u),t=0==t?this.parallelEdgeSpacing:0<t?-t:-t+this.parallelEdgeSpacing,i++}e.temp[0]=101207}},mxCoordinateAssignment.prototype.setVertexLocation=function(e){var t=e.cell,n=e.x[0]-e.width/2,a=e.y[0]-e.height/2;this.rankTopY[e.minRank]=Math.min(this.rankTopY[e.minRank],a),this.rankBottomY[e.minRank]=Math.max(this.rankBottomY[e.minRank],a+e.height),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?this.layout.setVertexLocation(t,n,a):this.layout.setVertexLocation(t,a,n),this.limitX=Math.max(this.limitX,n+e.width)},mxCoordinateAssignment.prototype.processReversedEdge=function(e,t){},WeightedCellSorter.prototype.weightedValue=0,WeightedCellSorter.prototype.nudge=!1,WeightedCellSorter.prototype.visited=!1,WeightedCellSorter.prototype.rankIndex=null,WeightedCellSorter.prototype.cell=null,WeightedCellSorter.prototype.compare=function(e,t){return null!=e&&null!=t?t.weightedValue>e.weightedValue?-1:t.weightedValue<e.weightedValue?1:t.nudge?-1:1:0},mxHierarchicalLayout.prototype=new mxGraphLayout,mxHierarchicalLayout.prototype.constructor=mxHierarchicalLayout,mxHierarchicalLayout.prototype.roots=null,mxHierarchicalLayout.prototype.resizeParent=!1,mxHierarchicalLayout.prototype.moveParent=!1,mxHierarchicalLayout.prototype.parentBorder=0,mxHierarchicalLayout.prototype.intraCellSpacing=30,mxHierarchicalLayout.prototype.interRankCellSpacing=100,mxHierarchicalLayout.prototype.interHierarchySpacing=60,mxHierarchicalLayout.prototype.parallelEdgeSpacing=10,mxHierarchicalLayout.prototype.orientation=mxConstants.DIRECTION_NORTH,mxHierarchicalLayout.prototype.fineTuning=!0,mxHierarchicalLayout.prototype.tightenToSource=!0,mxHierarchicalLayout.prototype.disableEdgeStyle=!0,mxHierarchicalLayout.prototype.traverseAncestors=!0,mxHierarchicalLayout.prototype.model=null,mxHierarchicalLayout.prototype.edgesCache=null,mxHierarchicalLayout.prototype.getModel=function(){return this.model},mxHierarchicalLayout.prototype.execute=function(e,t){this.parent=e;var n=this.graph.model;if(this.edgesCache={},null!=t||null!=e){if(null!=t&&null!=e){for(var a=[],i=0;i<t.length;i++)n.isAncestor(e,t[i])&&a.push(t[i]);this.roots=a}else this.roots=t;n.beginUpdate();try{this.run(e),this.resizeParent&&!this.graph.isCellCollapsed(e)&&this.graph.updateGroupBounds([e],this.parentBorder,this.moveParent)}finally{n.endUpdate()}}},mxHierarchicalLayout.prototype.findRoots=function(e,t){var n=[];if(null!=e&&null!=t){var a,i=this.graph.model,o=null,s=-1e5;for(a in t){var r=t[a];if(i.isVertex(r)&&this.graph.isCellVisible(r)){for(var l=this.getEdges(r),d=0,c=0,m=0;m<l.length;m++)this.getVisibleTerminal(l[m],!0)==r?d++:c++;0==c&&0<d&&n.push(r),s<(l=d-c)&&(s=l,o=r)}}0==n.length&&null!=o&&n.push(o)}return n},mxHierarchicalLayout.prototype.getEdges=function(e){var t=mxCellPath.create(e);if(null!=this.edgesCache[t])return this.edgesCache[t];for(var n=this.graph.model,a=[],i=this.graph.isCellCollapsed(e),o=n.getChildCount(e),s=0;s<o;s++){var r=n.getChildAt(e,s);this.isPort(r)?a=a.concat(n.getEdges(r,!0,!0)):!i&&this.graph.isCellVisible(r)||(a=a.concat(n.getEdges(r,!0,!0)))}for(a=a.concat(n.getEdges(e,!0,!0)),n=[],s=0;s<a.length;s++)((i=this.getVisibleTerminal(a[s],!0))==(o=this.getVisibleTerminal(a[s],!1))||i!=o&&(o==e&&(null==this.parent||this.graph.isValidAncestor(i,this.parent,this.traverseAncestors))||i==e&&(null==this.parent||this.graph.isValidAncestor(o,this.parent,this.traverseAncestors))))&&n.push(a[s]);return this.edgesCache[t]=n},mxHierarchicalLayout.prototype.getVisibleTerminal=function(e,t){var n=null!=(n=this.graph.view.getState(e))?n.getVisibleTerminal(t):this.graph.view.getVisibleTerminal(e,t);return this.isPort(n)&&(n=this.graph.model.getParent(n)),n},mxHierarchicalLayout.prototype.run=function(e){var t=[],n=[];if(null==this.roots&&null!=e){var a={};this.filterDescendants(e,a),this.roots=[];var i,o=!0;for(i in a)if(null!=a[i]){o=!1;break}for(;!o;){var s=this.findRoots(e,a);for(o=0;o<s.length;o++){var r=[];t.push(r),this.traverse(s[o],!0,null,n,r,t,a)}for(o=0;o<s.length;o++)this.roots.push(s[o]);for(i in o=!0,a)if(null!=a[i]){o=!1;break}}}else for(o=0;o<roots.length;o++)r=[],t.push(r),traverse(roots.get(o),!0,null,n,r,t,null);for(o=n=0;o<t.length;o++){for(i in a=[],r=t[o])a.push(r[i]);this.model=new mxGraphHierarchyModel(this,a,this.roots,e,this.tightenToSource),this.cycleStage(e),this.layeringStage(),this.crossingStage(e),n=this.placementStage(n,e)}},mxHierarchicalLayout.prototype.filterDescendants=function(e,t){var n=this.graph.model;if(n.isVertex(e)&&e!=this.parent&&this.graph.isCellVisible(e)&&(t[mxCellPath.create(e)]=e),this.traverseAncestors||e==this.parent&&this.graph.isCellVisible(e))for(var a=n.getChildCount(e),i=0;i<a;i++){var o=n.getChildAt(e,i);this.isPort(o)||this.filterDescendants(o,t)}},mxHierarchicalLayout.prototype.isPort=function(e){return!!e.geometry.relative},mxHierarchicalLayout.prototype.getEdgesBetween=function(e,t,n){n=null!=n&&n;for(var a=this.getEdges(e),i=[],o=0;o<a.length;o++){var s=this.getVisibleTerminal(a[o],!0),r=this.getVisibleTerminal(a[o],!1);(s==e&&r==t||!n&&s==t&&r==e)&&i.push(a[o])}return i},mxHierarchicalLayout.prototype.traverse=function(e,t,n,a,i,o,s){if(null!=e&&null!=a){var r=mxCellPath.create(e);if(null!=a[r]||null!=s&&null==s[r]){if(null==i[r])for(n=0;n<o.length;n++)if(null!=(e=o[n])[r]){for(l in i)e[l]=i[l];return o.pop(),e}}else{null==i[r]&&(i[r]=e),null==a[r]&&(a[r]=e),delete s[r];var l=this.getEdges(e);for(n=0;n<l.length;n++)r=this.getVisibleTerminal(l[n],!0)==e,(!t||r)&&(r=this.getVisibleTerminal(l[n],!r),i=this.traverse(r,t,l[n],a,i,o,s))}}return i},mxHierarchicalLayout.prototype.cycleStage=function(e){new mxMinimumCycleRemover(this).execute(e)},mxHierarchicalLayout.prototype.layeringStage=function(){this.model.initialRank(),this.model.fixRanks()},mxHierarchicalLayout.prototype.crossingStage=function(e){new mxMedianHybridCrossingReduction(this).execute(e)},mxHierarchicalLayout.prototype.placementStage=function(e,t){var n=new mxCoordinateAssignment(this,this.intraCellSpacing,this.interRankCellSpacing,this.orientation,e,this.parallelEdgeSpacing);return n.fineTuning=this.fineTuning,n.execute(t),n.limitX+this.interHierarchySpacing},mxGraphModel.prototype=new mxEventSource,mxGraphModel.prototype.constructor=mxGraphModel,mxGraphModel.prototype.root=null,mxGraphModel.prototype.cells=null,mxGraphModel.prototype.maintainEdgeParent=!0,mxGraphModel.prototype.createIds=!0,mxGraphModel.prototype.prefix="",mxGraphModel.prototype.postfix="",mxGraphModel.prototype.nextId=0,mxGraphModel.prototype.currentEdit=null,mxGraphModel.prototype.updateLevel=0,mxGraphModel.prototype.endingUpdate=!1,mxGraphModel.prototype.clear=function(){this.setRoot(this.createRoot())},mxGraphModel.prototype.isCreateIds=function(){return this.createIds},mxGraphModel.prototype.setCreateIds=function(e){this.createIds=e},mxGraphModel.prototype.createRoot=function(){var e=new mxCell;return e.insert(new mxCell),e},mxGraphModel.prototype.getCell=function(e){return null!=this.cells?this.cells[e]:null},mxGraphModel.prototype.filterCells=function(e,t){var n=null;if(null!=e){n=[];for(var a=0;a<e.length;a++)t(e[a])&&n.push(e[a])}return n},mxGraphModel.prototype.getDescendants=function(e){return this.filterDescendants(null,e)},mxGraphModel.prototype.filterDescendants=function(e,t){var n=[];t=t||this.getRoot(),(null==e||e(t))&&n.push(t);for(var a=this.getChildCount(t),i=0;i<a;i++){var o=this.getChildAt(t,i);n=n.concat(this.filterDescendants(e,o))}return n},mxGraphModel.prototype.getRoot=function(e){var t=e||this.root;if(null!=e)for(;null!=e;)t=e,e=this.getParent(e);return t},mxGraphModel.prototype.setRoot=function(e){return this.execute(new mxRootChange(this,e)),e},mxGraphModel.prototype.rootChanged=function(e){var t=this.root;return this.root=e,this.nextId=0,this.cells=null,this.cellAdded(e),t},mxGraphModel.prototype.isRoot=function(e){return null!=e&&this.root==e},mxGraphModel.prototype.isLayer=function(e){return this.isRoot(this.getParent(e))},mxGraphModel.prototype.isAncestor=function(e,t){for(;null!=t&&t!=e;)t=this.getParent(t);return t==e},mxGraphModel.prototype.contains=function(e){return this.isAncestor(this.root,e)},mxGraphModel.prototype.getParent=function(e){return null!=e?e.getParent():null},mxGraphModel.prototype.add=function(e,t,n){if(t!=e&&null!=e&&null!=t){null==n&&(n=this.getChildCount(e));var a=e!=this.getParent(t);this.execute(new mxChildChange(this,e,t,n)),this.maintainEdgeParent&&a&&this.updateEdgeParents(t)}return t},mxGraphModel.prototype.cellAdded=function(e){if(null!=e){if(null==e.getId()&&this.createIds&&e.setId(this.createId(e)),null!=e.getId())if((t=this.getCell(e.getId()))!=e){for(;null!=t;)e.setId(this.createId(e)),t=this.getCell(e.getId());null==this.cells&&(this.cells={}),this.cells[e.getId()]=e}mxUtils.isNumeric(e.getId())&&(this.nextId=Math.max(this.nextId,e.getId()));for(var t=this.getChildCount(e),n=0;n<t;n++)this.cellAdded(this.getChildAt(e,n))}},mxGraphModel.prototype.createId=function(e){return e=this.nextId,this.nextId++,this.prefix+e+this.postfix},mxGraphModel.prototype.updateEdgeParents=function(e,t){t=t||this.getRoot(e);for(var n=this.getChildCount(e),a=0;a<n;a++){var i=this.getChildAt(e,a);this.updateEdgeParents(i,t)}for(i=this.getEdgeCount(e),n=[],a=0;a<i;a++)n.push(this.getEdgeAt(e,a));for(a=0;a<n.length;a++)i=n[a],this.isAncestor(t,i)&&this.updateEdgeParent(i,t)},mxGraphModel.prototype.updateEdgeParent=function(e,t){for(var n=this.getTerminal(e,!0),a=this.getTerminal(e,!1),i=null;null!=n&&!this.isEdge(n)&&null!=n.geometry&&n.geometry.relative;)n=this.getParent(n);for(;null!=a&&!this.isEdge(a)&&null!=a.geometry&&a.geometry.relative;)a=this.getParent(a);if(this.isAncestor(t,n)&&this.isAncestor(t,a)&&(null!=(i=n==a?this.getParent(n):this.getNearestCommonAncestor(n,a))&&(this.getParent(i)!=this.root||this.isAncestor(i,e))&&this.getParent(e)!=i)){if(null!=(n=this.getGeometry(e))){var o=this.getOrigin(this.getParent(e)),s=this.getOrigin(i);a=s.x-o.x,o=s.y-o.y;(n=n.clone()).translate(-a,-o),this.setGeometry(e,n)}this.add(i,e,this.getChildCount(i))}},mxGraphModel.prototype.getOrigin=function(e){var t=null;return null!=e?(t=this.getOrigin(this.getParent(e)),this.isEdge(e)||null!=(e=this.getGeometry(e))&&(t.x+=e.x,t.y+=e.y)):t=new mxPoint,t},mxGraphModel.prototype.getNearestCommonAncestor=function(e,t){if(null!=e&&null!=t&&(null!=(o=mxCellPath.create(t))&&0<o.length)){var n=e,a=mxCellPath.create(n);if(o.length<a.length){n=t;var i=a,o=(a=o,i)}for(;null!=n;){if(i=this.getParent(n),0==o.indexOf(a+mxCellPath.PATH_SEPARATOR)&&null!=i)return n;a=mxCellPath.getParentPath(a),n=i}}return null},mxGraphModel.prototype.remove=function(e){return e==this.root?this.setRoot(null):null!=this.getParent(e)&&this.execute(new mxChildChange(this,null,e)),e},mxGraphModel.prototype.cellRemoved=function(e){if(null!=e&&null!=this.cells){for(var t=this.getChildCount(e)-1;0<=t;t--)this.cellRemoved(this.getChildAt(e,t));null!=this.cells&&null!=e.getId()&&delete this.cells[e.getId()]}},mxGraphModel.prototype.parentForCellChanged=function(e,t,n){var a=this.getParent(e);return null!=t?(t!=a||a.getIndex(e)!=n)&&t.insert(e,n):null!=a&&(n=a.getIndex(e),a.remove(n)),this.contains(a)||null==t?null==t&&this.cellRemoved(e):this.cellAdded(e),a},mxGraphModel.prototype.getChildCount=function(e){return null!=e?e.getChildCount():0},mxGraphModel.prototype.getChildAt=function(e,t){return null!=e?e.getChildAt(t):null},mxGraphModel.prototype.getChildren=function(e){return null!=e?e.children:null},mxGraphModel.prototype.getChildVertices=function(e){return this.getChildCells(e,!0,!1)},mxGraphModel.prototype.getChildEdges=function(e){return this.getChildCells(e,!1,!0)},mxGraphModel.prototype.getChildCells=function(e,t,n){t=null!=t&&t,n=null!=n&&n;for(var a=this.getChildCount(e),i=[],o=0;o<a;o++){var s=this.getChildAt(e,o);(!n&&!t||n&&this.isEdge(s)||t&&this.isVertex(s))&&i.push(s)}return i},mxGraphModel.prototype.getTerminal=function(e,t){return null!=e?e.getTerminal(t):null},mxGraphModel.prototype.setTerminal=function(e,t,n){var a=t!=this.getTerminal(e,n);return this.execute(new mxTerminalChange(this,e,t,n)),this.maintainEdgeParent&&a&&this.updateEdgeParent(e,this.getRoot()),t},mxGraphModel.prototype.setTerminals=function(e,t,n){this.beginUpdate();try{this.setTerminal(e,t,!0),this.setTerminal(e,n,!1)}finally{this.endUpdate()}},mxGraphModel.prototype.terminalForCellChanged=function(e,t,n){var a=this.getTerminal(e,n);return null!=t?t.insertEdge(e,n):null!=a&&a.removeEdge(e,n),a},mxGraphModel.prototype.getEdgeCount=function(e){return null!=e?e.getEdgeCount():0},mxGraphModel.prototype.getEdgeAt=function(e,t){return null!=e?e.getEdgeAt(t):null},mxGraphModel.prototype.getDirectedEdgeCount=function(e,t,n){for(var a=0,i=this.getEdgeCount(e),o=0;o<i;o++){var s=this.getEdgeAt(e,o);s!=n&&this.getTerminal(s,t)==e&&a++}return a},mxGraphModel.prototype.getConnections=function(e){return this.getEdges(e,!0,!0,!1)},mxGraphModel.prototype.getIncomingEdges=function(e){return this.getEdges(e,!0,!1,!1)},mxGraphModel.prototype.getOutgoingEdges=function(e){return this.getEdges(e,!1,!0,!1)},mxGraphModel.prototype.getEdges=function(e,t,n,a){t=null==t||t,n=null==n||n,a=null==a||a;for(var i=this.getEdgeCount(e),o=[],s=0;s<i;s++){var r=this.getEdgeAt(e,s),l=this.getTerminal(r,!0),d=this.getTerminal(r,!1);(a&&l==d||l!=d&&(t&&d==e||n&&l==e))&&o.push(r)}return o},mxGraphModel.prototype.getEdgesBetween=function(e,t,n){n=null!=n&&n;var a=this.getEdgeCount(e),i=this.getEdgeCount(t),o=e,s=a;for(i<a&&(s=i,o=t),a=[],i=0;i<s;i++){var r=this.getEdgeAt(o,i),l=this.getTerminal(r,!0),d=this.getTerminal(r,!1);(l==e&&d==t||!n&&(d==e&&l==t))&&a.push(r)}return a},mxGraphModel.prototype.getOpposites=function(e,t,n,a){n=null==n||n,a=null==a||a;var i=[];if(null!=e)for(var o=0;o<e.length;o++){var s=this.getTerminal(e[o],!0),r=this.getTerminal(e[o],!1);s==t&&null!=r&&r!=t&&a?i.push(r):r==t&&null!=s&&s!=t&&n&&i.push(s)}return i},mxGraphModel.prototype.getTopmostCells=function(e){for(var t=[],n=0;n<e.length;n++){for(var a=e[n],i=!0,o=this.getParent(a);null!=o;){if(0<=mxUtils.indexOf(e,o)){i=!1;break}o=this.getParent(o)}i&&t.push(a)}return t},mxGraphModel.prototype.isVertex=function(e){return null!=e&&e.isVertex()},mxGraphModel.prototype.isEdge=function(e){return null!=e&&e.isEdge()},mxGraphModel.prototype.isConnectable=function(e){return null!=e&&e.isConnectable()},mxGraphModel.prototype.getValue=function(e){return null!=e?e.getValue():null},mxGraphModel.prototype.setValue=function(e,t){return this.execute(new mxValueChange(this,e,t)),t},mxGraphModel.prototype.valueForCellChanged=function(e,t){return e.valueChanged(t)},mxGraphModel.prototype.getGeometry=function(e,t){return null!=e?e.getGeometry():null},mxGraphModel.prototype.setGeometry=function(e,t){return t!=this.getGeometry(e)&&this.execute(new mxGeometryChange(this,e,t)),t},mxGraphModel.prototype.geometryForCellChanged=function(e,t){var n=this.getGeometry(e);return e.setGeometry(t),n},mxGraphModel.prototype.getStyle=function(e){return null!=e?e.getStyle():null},mxGraphModel.prototype.setStyle=function(e,t){return t!=this.getStyle(e)&&this.execute(new mxStyleChange(this,e,t)),t},mxGraphModel.prototype.styleForCellChanged=function(e,t){var n=this.getStyle(e);return e.setStyle(t),n},mxGraphModel.prototype.isCollapsed=function(e){return null!=e&&e.isCollapsed()},mxGraphModel.prototype.setCollapsed=function(e,t){return t!=this.isCollapsed(e)&&this.execute(new mxCollapseChange(this,e,t)),t},mxGraphModel.prototype.collapsedStateForCellChanged=function(e,t){var n=this.isCollapsed(e);return e.setCollapsed(t),n},mxGraphModel.prototype.isVisible=function(e){return null!=e&&e.isVisible()},mxGraphModel.prototype.setVisible=function(e,t){return t!=this.isVisible(e)&&this.execute(new mxVisibleChange(this,e,t)),t},mxGraphModel.prototype.visibleStateForCellChanged=function(e,t){var n=this.isVisible(e);return e.setVisible(t),n},mxGraphModel.prototype.execute=function(e){e.execute(),this.beginUpdate(),this.currentEdit.add(e),this.fireEvent(new mxEventObject(mxEvent.EXECUTE,"change",e)),this.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",e)),this.endUpdate()},mxGraphModel.prototype.beginUpdate=function(){this.updateLevel++,this.fireEvent(new mxEventObject(mxEvent.BEGIN_UPDATE)),1==this.updateLevel&&this.fireEvent(new mxEventObject(mxEvent.START_EDIT))},mxGraphModel.prototype.endUpdate=function(){if(this.updateLevel--,0==this.updateLevel&&this.fireEvent(new mxEventObject(mxEvent.END_EDIT)),!this.endingUpdate){this.endingUpdate=0==this.updateLevel,this.fireEvent(new mxEventObject(mxEvent.END_UPDATE,"edit",this.currentEdit));try{if(this.endingUpdate&&!this.currentEdit.isEmpty()){this.fireEvent(new mxEventObject(mxEvent.BEFORE_UNDO,"edit",this.currentEdit));var e=this.currentEdit;this.currentEdit=this.createUndoableEdit(),e.notify(),this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",e))}}finally{this.endingUpdate=!1}}},mxGraphModel.prototype.createUndoableEdit=function(){var e=new mxUndoableEdit(this,!0);return e.notify=function(){e.source.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",e,"changes",e.changes)),e.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,"edit",e,"changes",e.changes))},e},mxGraphModel.prototype.mergeChildren=function(e,t,n){n=null==n||n,this.beginUpdate();try{var a={};for(var i in this.mergeChildrenImpl(e,t,n,a),a){var o=a[i],s=this.getTerminal(o,!0);null!=s&&(s=a[mxCellPath.create(s)],this.setTerminal(o,s,!0)),null!=(s=this.getTerminal(o,!1))&&(s=a[mxCellPath.create(s)],this.setTerminal(o,s,!1))}}finally{this.endUpdate()}},mxGraphModel.prototype.mergeChildrenImpl=function(e,t,n,a){this.beginUpdate();try{for(var i=e.getChildCount(),o=0;o<i;o++){var s=e.getChildAt(o);if("function"==typeof s.getId){var r=s.getId(),l=null==r||this.isEdge(s)&&n?null:this.getCell(r);if(null==l){var d=s.clone();d.setId(r),d.setTerminal(s.getTerminal(!0),!0),d.setTerminal(s.getTerminal(!1),!1),l=t.insert(d),this.cellAdded(l)}a[mxCellPath.create(s)]=l,this.mergeChildrenImpl(s,l,n,a)}}}finally{this.endUpdate()}},mxGraphModel.prototype.getParents=function(e){var t=[];if(null!=e)for(var n={},a=0;a<e.length;a++){var i=this.getParent(e[a]);if(null!=i){var o=mxCellPath.create(i);null==n[o]&&(n[o]=i,t.push(i))}}return t},mxGraphModel.prototype.cloneCell=function(e){return null!=e?this.cloneCells([e],!0)[0]:null},mxGraphModel.prototype.cloneCells=function(e,t){for(var n={},a=[],i=0;i<e.length;i++)null!=e[i]?a.push(this.cloneCellImpl(e[i],n,t)):a.push(null);for(i=0;i<a.length;i++)null!=a[i]&&this.restoreClone(a[i],e[i],n);return a},mxGraphModel.prototype.cloneCellImpl=function(e,t,n){var a=this.cellCloned(e);if(t[mxObjectIdentity.get(e)]=a,n){n=this.getChildCount(e);for(var i=0;i<n;i++){var o=this.cloneCellImpl(this.getChildAt(e,i),t,!0);a.insert(o)}}return a},mxGraphModel.prototype.cellCloned=function(e){return e.clone()},mxGraphModel.prototype.restoreClone=function(e,t,n){null!=(a=this.getTerminal(t,!0))&&(null!=(a=n[mxObjectIdentity.get(a)])&&a.insertEdge(e,!0)),null!=(a=this.getTerminal(t,!1))&&(null!=(a=n[mxObjectIdentity.get(a)])&&a.insertEdge(e,!1));for(var a=this.getChildCount(e),i=0;i<a;i++)this.restoreClone(this.getChildAt(e,i),this.getChildAt(t,i),n)},mxRootChange.prototype.execute=function(){this.root=this.previous,this.previous=this.model.rootChanged(this.previous)},mxChildChange.prototype.execute=function(){var e=this.model.getParent(this.child),t=null!=e?e.getIndex(this.child):0;null==this.previous&&this.connect(this.child,!1),e=this.model.parentForCellChanged(this.child,this.previous,this.previousIndex),null!=this.previous&&this.connect(this.child,!0),this.parent=this.previous,this.previous=e,this.index=this.previousIndex,this.previousIndex=t},mxChildChange.prototype.connect=function(e,t){t=null==t||t;var n=e.getTerminal(!0),a=e.getTerminal(!1);for(null!=n&&(t?this.model.terminalForCellChanged(e,n,!0):this.model.terminalForCellChanged(e,null,!0)),null!=a&&(t?this.model.terminalForCellChanged(e,a,!1):this.model.terminalForCellChanged(e,null,!1)),e.setTerminal(n,!0),e.setTerminal(a,!1),n=this.model.getChildCount(e),a=0;a<n;a++)this.connect(this.model.getChildAt(e,a),t)},mxTerminalChange.prototype.execute=function(){this.terminal=this.previous,this.previous=this.model.terminalForCellChanged(this.cell,this.previous,this.source)},mxValueChange.prototype.execute=function(){this.value=this.previous,this.previous=this.model.valueForCellChanged(this.cell,this.previous)},mxStyleChange.prototype.execute=function(){this.style=this.previous,this.previous=this.model.styleForCellChanged(this.cell,this.previous)},mxGeometryChange.prototype.execute=function(){this.geometry=this.previous,this.previous=this.model.geometryForCellChanged(this.cell,this.previous)},mxCollapseChange.prototype.execute=function(){this.collapsed=this.previous,this.previous=this.model.collapsedStateForCellChanged(this.cell,this.previous)},mxVisibleChange.prototype.execute=function(){this.visible=this.previous,this.previous=this.model.visibleStateForCellChanged(this.cell,this.previous)},mxCellAttributeChange.prototype.execute=function(){var e=this.cell.getAttribute(this.attribute);null==this.previous?this.cell.value.removeAttribute(this.attribute):this.cell.setAttribute(this.attribute,this.previous),this.previous=e},mxCell.prototype.id=null,mxCell.prototype.value=null,mxCell.prototype.geometry=null,mxCell.prototype.style=null,mxCell.prototype.vertex=!1,mxCell.prototype.edge=!1,mxCell.prototype.connectable=!0,mxCell.prototype.visible=!0,mxCell.prototype.collapsed=!1,mxCell.prototype.parent=null,mxCell.prototype.source=null,mxCell.prototype.target=null,mxCell.prototype.children=null,mxCell.prototype.edges=null,mxCell.prototype.mxTransient="id value parent source target children edges".split(" "),mxCell.prototype.getId=function(){return this.id},mxCell.prototype.setId=function(e){this.id=e},mxCell.prototype.getValue=function(){return this.value},mxCell.prototype.setValue=function(e){this.value=e},mxCell.prototype.valueChanged=function(e){var t=this.getValue();return this.setValue(e),t},mxCell.prototype.getGeometry=function(){return this.geometry},mxCell.prototype.setGeometry=function(e){this.geometry=e},mxCell.prototype.getStyle=function(){return this.style},mxCell.prototype.setStyle=function(e){this.style=e},mxCell.prototype.isVertex=function(){return this.vertex},mxCell.prototype.setVertex=function(e){this.vertex=e},mxCell.prototype.isEdge=function(){return this.edge},mxCell.prototype.setEdge=function(e){this.edge=e},mxCell.prototype.isConnectable=function(){return this.connectable},mxCell.prototype.setConnectable=function(e){this.connectable=e},mxCell.prototype.isVisible=function(){return this.visible},mxCell.prototype.setVisible=function(e){this.visible=e},mxCell.prototype.isCollapsed=function(){return this.collapsed},mxCell.prototype.setCollapsed=function(e){this.collapsed=e},mxCell.prototype.getParent=function(){return this.parent},mxCell.prototype.setParent=function(e){this.parent=e},mxCell.prototype.getTerminal=function(e){return e?this.source:this.target},mxCell.prototype.setTerminal=function(e,t){return t?this.source=e:this.target=e,e},mxCell.prototype.getChildCount=function(){return null==this.children?0:this.children.length},mxCell.prototype.getIndex=function(e){return mxUtils.indexOf(this.children,e)},mxCell.prototype.getChildAt=function(e){return null==this.children?null:this.children[e]},mxCell.prototype.insert=function(e,t){return null!=e&&(null==t&&(t=this.getChildCount(),e.getParent()==this&&t--),e.removeFromParent(),e.setParent(this),null==this.children?(this.children=[],this.children.push(e)):this.children.splice(t,0,e)),e},mxCell.prototype.remove=function(e){var t=null;return null!=this.children&&0<=e&&(null!=(t=this.getChildAt(e))&&(this.children.splice(e,1),t.setParent(null))),t},mxCell.prototype.removeFromParent=function(){if(null!=this.parent){var e=this.parent.getIndex(this);this.parent.remove(e)}},mxCell.prototype.getEdgeCount=function(){return null==this.edges?0:this.edges.length},mxCell.prototype.getEdgeIndex=function(e){return mxUtils.indexOf(this.edges,e)},mxCell.prototype.getEdgeAt=function(e){return null==this.edges?null:this.edges[e]},mxCell.prototype.insertEdge=function(e,t){return null!=e&&(e.removeFromTerminal(t),e.setTerminal(this,t),null==this.edges||e.getTerminal(!t)!=this||mxUtils.indexOf(this.edges,e)<0)&&(null==this.edges&&(this.edges=[]),this.edges.push(e)),e},mxCell.prototype.removeEdge=function(e,t){if(null!=e){if(e.getTerminal(!t)!=this&&null!=this.edges){var n=this.getEdgeIndex(e);0<=n&&this.edges.splice(n,1)}e.setTerminal(null,t)}return e},mxCell.prototype.removeFromTerminal=function(e){var t=this.getTerminal(e);null!=t&&t.removeEdge(this,e)},mxCell.prototype.getAttribute=function(e,t){var n=this.getValue();return(null!=n&&n.nodeType==mxConstants.NODETYPE_ELEMENT?n.getAttribute(e):null)||t},mxCell.prototype.setAttribute=function(e,t){var n=this.getValue();null!=n&&n.nodeType==mxConstants.NODETYPE_ELEMENT&&n.setAttribute(e,t)},mxCell.prototype.clone=function(){var e=mxUtils.clone(this,this.mxTransient);return e.setValue(this.cloneValue()),e},mxCell.prototype.cloneValue=function(){var e=this.getValue();return null!=e&&("function"==typeof e.clone?e=e.clone():isNaN(e.nodeType)||(e=e.cloneNode(!0))),e},mxGeometry.prototype=new mxRectangle,mxGeometry.prototype.constructor=mxGeometry,mxGeometry.prototype.TRANSLATE_CONTROL_POINTS=!0,mxGeometry.prototype.alternateBounds=null,mxGeometry.prototype.sourcePoint=null,mxGeometry.prototype.targetPoint=null,mxGeometry.prototype.points=null,mxGeometry.prototype.offset=null,mxGeometry.prototype.relative=!1,mxGeometry.prototype.swap=function(){if(null!=this.alternateBounds){var e=new mxRectangle(this.x,this.y,this.width,this.height);this.x=this.alternateBounds.x,this.y=this.alternateBounds.y,this.width=this.alternateBounds.width,this.height=this.alternateBounds.height,this.alternateBounds=e}},mxGeometry.prototype.getTerminalPoint=function(e){return e?this.sourcePoint:this.targetPoint},mxGeometry.prototype.setTerminalPoint=function(e,t){return t?this.sourcePoint=e:this.targetPoint=e,e},mxGeometry.prototype.translate=function(e,t){if(this.clone(),this.relative||(this.x+=e,this.y+=t),null!=this.sourcePoint&&(this.sourcePoint.x+=e,this.sourcePoint.y+=t),null!=this.targetPoint&&(this.targetPoint.x+=e,this.targetPoint.y+=t),this.TRANSLATE_CONTROL_POINTS&&null!=this.points)for(var n=this.points.length,a=0;a<n;a++){var i=this.points[a];null!=i&&(i.x+=e,i.y+=t)}};var mxCellPath={PATH_SEPARATOR:".",create:function(e){var t="";if(null!=e)for(var n=e.getParent();null!=n;)t=n.getIndex(e)+mxCellPath.PATH_SEPARATOR+t,n=(e=n).getParent();return 1<(e=t.length)&&(t=t.substring(0,e-1)),t},getParentPath:function(e){if(null!=e){var t=e.lastIndexOf(mxCellPath.PATH_SEPARATOR);if(0<=t)return e.substring(0,t);if(0<e.length)return""}return null},resolve:function(e,t){var n=e;if(null!=t)for(var a=t.split(mxCellPath.PATH_SEPARATOR),i=0;i<a.length;i++)n=n.getChildAt(parseInt(a[i]));return n},compare:function(e,t){for(var n=Math.min(e.length,t.length),a=0,i=0;i<n;i++)if(e[i]!=t[i]){0==e[i].length||0==t[i].length?a=e[i]==t[i]?0:e[i]>t[i]?1:-1:a=(n=parseInt(e[i]))==(i=parseInt(t[i]))?0:i<n?1:-1;break}return 0==a&&((n=e.length)!=(i=t.length)&&(a=i<n?1:-1)),a}},mxPerimeter={RectanglePerimeter:function(e,t,n,a){t=e.getCenterX();var i=e.getCenterY(),o=Math.atan2(n.y-i,n.x-t),s=new mxPoint(0,0),r=Math.PI,l=Math.PI/2-o,d=Math.atan2(e.height,e.width);return o<-r+d||r-d<o?(s.x=e.x,s.y=i-e.width*Math.tan(o)/2):o<-d?(s.y=e.y,s.x=t-e.height*Math.tan(l)/2):o<d?(s.x=e.x+e.width,s.y=i+e.width*Math.tan(o)/2):(s.y=e.y+e.height,s.x=t+e.height*Math.tan(l)/2),a&&(n.x>=e.x&&n.x<=e.x+e.width?s.x=n.x:n.y>=e.y&&n.y<=e.y+e.height&&(s.y=n.y),n.x<e.x?s.x=e.x:n.x>e.x+e.width&&(s.x=e.x+e.width),n.y<e.y?s.y=e.y:n.y>e.y+e.height&&(s.y=e.y+e.height)),s},EllipsePerimeter:function(e,t,n,a){var i=e.x,o=e.y,s=e.width/2,r=e.height/2,l=i+s,d=o+r;t=n.x,n=n.y;var c=parseInt(t-l),m=parseInt(n-d);if(0==c&&0!=m)return new mxPoint(l,d+r*m/Math.abs(m));if(0==c&&0==m)return new mxPoint(t,n);if(a){if(o<=n&&n<=o+e.height)return e=n-d,e=Math.sqrt(s*s*(1-e*e/(r*r)))||0,t<=i&&(e=-e),new mxPoint(l+e,n);if(i<=t&&t<=i+e.width)return e=t-l,e=Math.sqrt(r*r*(1-e*e/(s*s)))||0,n<=o&&(e=-e),new mxPoint(t,d+e)}return d-=(i=m/c)*l,l=i*(s=(-(e=-2*l*(o=s*s*i*i+r*r))+(r=Math.sqrt(e*e-4*o*(s*s*i*i*l*l+r*r*l*l-s*s*r*r))))/(2*o))+d,d=i*(r=(-e-r)/(2*o))+d,i=Math.sqrt(Math.pow(s-t,2)+Math.pow(l-n,2)),t=Math.sqrt(Math.pow(r-t,2)+Math.pow(d-n,2)),o=n=0,i<t?(n=s,o=l):(n=r,o=d),new mxPoint(n,o)},RhombusPerimeter:function(e,t,n,a){t=e.x;var i=e.y,o=e.width,s=t+o/2,r=i+(e=e.height)/2,l=n.x;if(n=n.y,s==l)return new mxPoint(s,n<r?i:i+e);if(r==n)return new mxPoint(l<s?t:t+o,r);var d=s,c=r;return a&&(t<=l&&l<=t+o?d=l:i<=n&&n<=i+e&&(c=n)),l<s?n<r?mxUtils.intersection(l,n,d,c,s,i,t,r):mxUtils.intersection(l,n,d,c,s,i+e,t,r):n<r?mxUtils.intersection(l,n,d,c,s,i,t+o,r):mxUtils.intersection(l,n,d,c,s,i+e,t+o,r)},TrianglePerimeter:function(e,t,n,a){var i=(t=null!=t?t.style[mxConstants.STYLE_DIRECTION]:null)==mxConstants.DIRECTION_NORTH||t==mxConstants.DIRECTION_SOUTH,o=e.x,s=e.y,r=e.width,l=o+r/2,d=s+(e=e.height)/2,c=new mxPoint(o,s),m=new mxPoint(o+r,d),u=new mxPoint(o,s+e);t==mxConstants.DIRECTION_NORTH?(c=u,m=new mxPoint(l,s),u=new mxPoint(o+r,s+e)):t==mxConstants.DIRECTION_SOUTH?(m=new mxPoint(l,s+e),u=new mxPoint(o+r,s)):t==mxConstants.DIRECTION_WEST&&(c=new mxPoint(o+r,s),m=new mxPoint(o,d),u=new mxPoint(o+r,s+e));var p=n.x-l,g=n.y-d,v=(p=i?Math.atan2(p,g):Math.atan2(g,p),i?Math.atan2(r,e):Math.atan2(e,r));g=!1,g=t==mxConstants.DIRECTION_NORTH||t==mxConstants.DIRECTION_WEST?-v<p&&p<v:p<-Math.PI+v||p>Math.PI-v,v=null;return g?v=a&&(i&&n.x>=c.x&&n.x<=u.x||!i&&n.y>=c.y&&n.y<=u.y)?i?new mxPoint(n.x,c.y):new mxPoint(c.x,n.y):t==mxConstants.DIRECTION_NORTH?new mxPoint(o+r/2+e*Math.tan(p)/2,s+e):t==mxConstants.DIRECTION_SOUTH?new mxPoint(o+r/2-e*Math.tan(p)/2,s):t==mxConstants.DIRECTION_WEST?new mxPoint(o+r,s+e/2+r*Math.tan(p)/2):new mxPoint(o,s+e/2-r*Math.tan(p)/2):(a&&(a=new mxPoint(l,d),n.y>=s&&n.y<=s+e?(a.x=i?l:t==mxConstants.DIRECTION_WEST?o+r:o,a.y=n.y):n.x>=o&&n.x<=o+r&&(a.x=n.x,a.y=i?t==mxConstants.DIRECTION_NORTH?s+e:s:d),l=a.x,d=a.y),v=i&&n.x<=o+r/2||!i&&n.y<=s+e/2?mxUtils.intersection(n.x,n.y,l,d,c.x,c.y,m.x,m.y):mxUtils.intersection(n.x,n.y,l,d,m.x,m.y,u.x,u.y)),null==v&&(v=new mxPoint(l,d)),v}};function mxPrintPreview(e,t,n,a,i,o,s,r,l){this.graph=e,this.scale=null!=t?t:1/e.pageScale,this.border=null!=a?a:0,this.pageFormat=null!=n?n:e.pageFormat,this.title=null!=r?r:"Printer-friendly version",this.x0=null!=i?i:0,this.y0=null!=o?o:0,this.borderColor=s,this.pageSelector=null==l||l}function mxStylesheet(){this.styles={},this.putDefaultVertexStyle(this.createDefaultVertexStyle()),this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())}function mxCellState(e,t,n){this.view=e,this.cell=t,this.style=n,this.origin=new mxPoint,this.absoluteOffset=new mxPoint}function mxGraphSelectionModel(e){this.graph=e,this.cells=[]}function mxSelectionChange(e,t,n){this.selectionModel=e,this.added=null!=t?t.slice():null,this.removed=null!=n?n.slice():null}function mxCellEditor(e){this.graph=e}function mxCellRenderer(){}mxPrintPreview.prototype.graph=null,mxPrintPreview.prototype.pageFormat=null,mxPrintPreview.prototype.scale=null,mxPrintPreview.prototype.border=0,mxPrintPreview.prototype.x0=0,mxPrintPreview.prototype.y0=0,mxPrintPreview.prototype.autoOrigin=!0,mxPrintPreview.prototype.printOverlays=!1,mxPrintPreview.prototype.borderColor=null,mxPrintPreview.prototype.title=null,mxPrintPreview.prototype.pageSelector=null,mxPrintPreview.prototype.wnd=null,mxPrintPreview.prototype.pageCount=0,mxPrintPreview.prototype.getWindow=function(){return this.wnd},mxPrintPreview.prototype.getDoctype=function(){var e="";return 8==document.documentMode&&(e='<meta http-equiv="X-UA-Compatible" content="IE=8">'),e},mxPrintPreview.prototype.open=function(e){var t=this.graph.cellRenderer.initializeOverlay,n=null;try{if(this.printOverlays&&(this.graph.cellRenderer.initializeOverlay=function(e,t){t.init(e.view.getDrawPane())}),null==this.wnd){this.wnd=window.open();var a=this.wnd.document,i=this.getDoctype();null!=i&&0<i.length&&a.writeln(i),a.writeln("<html>"),a.writeln("<head>"),this.writeHead(a,e),a.writeln("</head>"),a.writeln('<body class="mxPage">'),mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a),mxClient.IS_VML&&(a.namespaces.add("v","urn:schemas-microsoft-com:vml"),a.namespaces.add("o","urn:schemas-microsoft-com:office:office"),a.createStyleSheet().cssText="v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}",mxClient.link("stylesheet",mxClient.basePath+"/css/explorer.css",a));var o=this.graph.getGraphBounds().clone(),s=this.graph.getView().getScale(),r=s/this.scale,l=this.graph.getView().getTranslate();this.autoOrigin||(this.x0=-l.x*this.scale,this.y0=-l.y*this.scale,o.width+=o.x,o.height+=o.y,o.x=0,this.border=o.y=0),o.width/=r,o.height/=r;var d=this.pageFormat.width-2*this.border,c=this.pageFormat.height-2*this.border,m=Math.max(1,Math.ceil((o.width+this.x0)/d)),u=Math.max(1,Math.ceil((o.height+this.y0)/c));this.pageCount=m*u;var p=mxUtils.bind(this,function(){if(this.pageSelector&&(1<u||1<m)){var e=this.createPageSelector(u,m);if(a.body.appendChild(e),mxClient.IS_IE){e.style.position="absolute";var t=function(){e.style.top=a.body.scrollTop+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(e){t()}),mxEvent.addListener(this.wnd,"resize",function(e){t()})}}});if(e=function(e,t){if(null!=this.borderColor&&(e.style.borderColor=this.borderColor,e.style.borderStyle="solid",e.style.borderWidth="1px"),e.style.background="white",t&&(e.style.pageBreakAfter="always"),mxClient.IS_IE?(a.writeln(e.outerHTML),e.parentNode.removeChild(e)):(e.parentNode.removeChild(e),a.body.appendChild(e)),t){var n=a.createElement("hr");n.className="mxPageBreak",a.body.appendChild(n)}},null!=(b=this.getCoverPages(this.pageFormat.width,this.pageFormat.height)))for(var g=0;g<b.length;g++)e(b[g],!0);var v=this.getAppendices(this.pageFormat.width,this.pageFormat.height);for(g=0;g<u;g++)for(var h=g*c/this.scale-this.y0/this.scale+(o.y-l.y*s)/s,b=0;b<m;b++){if(null==this.wnd)return null;var f=b*d/this.scale-this.x0/this.scale+(o.x-l.x*s)/s,A=g*m+b+1;(n=this.renderPage(this.pageFormat.width,this.pageFormat.height,mxUtils.bind(this,function(e){this.addGraphFragment(-f,-h,this.scale,A,e)}))).setAttribute("id","mxPage-"+A),e(n,null!=v||g<u-1||b<m-1)}if(null!=v)for(g=0;g<v.length;g++)e(v[g],g<v.length);a.writeln("</body>"),a.writeln("</html>"),a.close(),p(),mxEvent.release(a.body)}this.wnd.focus()}catch(e){null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n)}finally{this.graph.cellRenderer.initializeOverlay=t}return this.wnd},mxPrintPreview.prototype.writeHead=function(e,t){null!=this.title&&e.writeln("<title>"+this.title+"</title>"),e.writeln('<style type="text/css">'),e.writeln("@media print {"),e.writeln("  table.mxPageSelector { display: none; }"),e.writeln("  hr.mxPageBreak { display: none; }"),e.writeln("}"),e.writeln("@media screen {"),e.writeln("  table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }"),e.writeln("  table.mxPageSelector td { border: solid 1px gray; padding:4px; }"),e.writeln("  body.mxPage { background: gray; }"),e.writeln("}"),null!=t&&e.writeln(t),e.writeln("</style>")},mxPrintPreview.prototype.createPageSelector=function(e,t){var n=this.wnd.document,a=n.createElement("table");a.className="mxPageSelector",a.setAttribute("border","0");for(var i=n.createElement("tbody"),o=0;o<e;o++){for(var s=n.createElement("tr"),r=0;r<t;r++){var l=o*t+r+1,d=n.createElement("td");if(!mxClient.IS_NS||mxClient.IS_SF||mxClient.IS_GC){var c=n.createElement("a");c.setAttribute("href","#mxPage-"+l),mxUtils.write(c,l,n),d.appendChild(c)}else mxUtils.write(d,l,n);s.appendChild(d)}i.appendChild(s)}return a.appendChild(i),a},mxPrintPreview.prototype.renderPage=function(e,t,n){var a=document.createElement("div");try{a.style.width=e+"px",a.style.height=t+"px",a.style.overflow="hidden",a.style.pageBreakInside="avoid",a.style.position="relative";var i=document.createElement("div");i.style.top=this.border+"px",i.style.left=this.border+"px",i.style.width=e-2*this.border+"px",i.style.height=t-2*this.border+"px",i.style.overflow="hidden",this.graph.dialect==mxConstants.DIALECT_VML&&(i.style.position="absolute"),a.appendChild(i),document.body.appendChild(a),n(i)}catch(e){throw a.parentNode.removeChild(a),e}return a},mxPrintPreview.prototype.addGraphFragment=function(e,t,n,a,i){a=this.graph.getView();var o=this.graph.container;this.graph.container=i;var s=a.getCanvas(),r=a.getBackgroundPane(),l=a.getDrawPane(),d=a.getOverlayPane();this.graph.dialect==mxConstants.DIALECT_SVG?a.createSvg():this.graph.dialect==mxConstants.DIALECT_VML?a.createVml():a.createHtml();var c=a.isEventsEnabled();a.setEventsEnabled(!1);var m=this.graph.isEnabled();this.graph.setEnabled(!1);var u=a.getTranslate();a.translate=new mxPoint(e,t),e=null;try{var p=[this.graph.getModel().getRoot()];e=new mxTemporaryCellStates(a,n,p)}finally{if(mxClient.IS_IE)a.overlayPane.innerHTML="";else for(n=i.firstChild;null!=n;)p=n.nextSibling,"svg"==(t=n.nodeName.toLowerCase())?(n.setAttribute("width",parseInt(i.style.width)),n.setAttribute("height",parseInt(i.style.height))):"default"!=n.style.cursor&&"table"!=t&&n.parentNode.removeChild(n),n=p;a.overlayPane.parentNode.removeChild(a.overlayPane),this.graph.setEnabled(m),this.graph.container=o,a.canvas=s,a.backgroundPane=r,a.drawPane=l,a.overlayPane=d,a.translate=u,e.destroy(),a.setEventsEnabled(c)}},mxPrintPreview.prototype.getCoverPages=function(){return null},mxPrintPreview.prototype.getAppendices=function(){return null},mxPrintPreview.prototype.print=function(){var e=this.open();null!=e&&e.print()},mxPrintPreview.prototype.close=function(){null!=this.wnd&&(this.wnd.close(),this.wnd=null)},mxStylesheet.prototype.createDefaultVertexStyle=function(){var e={};return e[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_RECTANGLE,e[mxConstants.STYLE_PERIMETER]=mxPerimeter.RectanglePerimeter,e[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE,e[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER,e[mxConstants.STYLE_FILLCOLOR]="#C3D9FF",e[mxConstants.STYLE_STROKECOLOR]="#6482B9",e[mxConstants.STYLE_FONTCOLOR]="#774400",e},mxStylesheet.prototype.createDefaultEdgeStyle=function(){var e={};return e[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_CONNECTOR,e[mxConstants.STYLE_ENDARROW]=mxConstants.ARROW_CLASSIC,e[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE,e[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER,e[mxConstants.STYLE_STROKECOLOR]="#6482B9",e[mxConstants.STYLE_FONTCOLOR]="#446299",e},mxStylesheet.prototype.putDefaultVertexStyle=function(e){this.putCellStyle("defaultVertex",e)},mxStylesheet.prototype.putDefaultEdgeStyle=function(e){this.putCellStyle("defaultEdge",e)},mxStylesheet.prototype.getDefaultVertexStyle=function(){return this.styles.defaultVertex},mxStylesheet.prototype.getDefaultEdgeStyle=function(){return this.styles.defaultEdge},mxStylesheet.prototype.putCellStyle=function(e,t){this.styles[e]=t},mxStylesheet.prototype.getCellStyle=function(e,t){var n=t;if(null!=e&&0<e.length)for(var a=e.split(";"),i=(n=null!=n&&";"!=e.charAt(0)?mxUtils.clone(n):{},0);i<a.length;i++){var o=(s=a[i]).indexOf("=");if(0<=o){var s,r=s.substring(0,o);(s=s.substring(o+1))==mxConstants.NONE?delete n[r]:mxUtils.isNumeric(s)?n[r]=parseFloat(s):n[r]=s}else if(null!=(s=this.styles[s]))for(r in s)n[r]=s[r]}return n},mxCellState.prototype=new mxRectangle,mxCellState.prototype.constructor=mxCellState,mxCellState.prototype.view=null,mxCellState.prototype.cell=null,mxCellState.prototype.style=null,mxCellState.prototype.invalid=!0,mxCellState.prototype.invalidOrder=!1,mxCellState.prototype.orderChanged=!1,mxCellState.prototype.origin=null,mxCellState.prototype.absolutePoints=null,mxCellState.prototype.absoluteOffset=null,mxCellState.prototype.visibleSourceState=null,mxCellState.prototype.visibleTargetState=null,mxCellState.prototype.terminalDistance=0,mxCellState.prototype.length=0,mxCellState.prototype.segments=null,mxCellState.prototype.shape=null,mxCellState.prototype.text=null,mxCellState.prototype.getPerimeterBounds=function(e,t){if(e=e||0,t=null!=t?t:new mxRectangle(this.x,this.y,this.width,this.height),null!=this.shape&&null!=this.shape.stencil){var n=this.shape.stencil.computeAspect(this.style,t.x,t.y,t.width,t.height);t.x=n.x,t.y=n.y,t.width=this.shape.stencil.w0*n.width,t.height=this.shape.stencil.h0*n.height}return 0!=e&&t.grow(e),t},mxCellState.prototype.setAbsoluteTerminalPoint=function(e,t){t?(null==this.absolutePoints&&(this.absolutePoints=[]),0==this.absolutePoints.length?this.absolutePoints.push(e):this.absolutePoints[0]=e):null==this.absolutePoints?(this.absolutePoints=[],this.absolutePoints.push(null),this.absolutePoints.push(e)):1==this.absolutePoints.length?this.absolutePoints.push(e):this.absolutePoints[this.absolutePoints.length-1]=e},mxCellState.prototype.setCursor=function(e){null!=this.shape&&this.shape.setCursor(e),null!=this.text&&this.text.setCursor(e)},mxCellState.prototype.getVisibleTerminal=function(e){return null!=(e=this.getVisibleTerminalState(e))?e.cell:null},mxCellState.prototype.getVisibleTerminalState=function(e){return e?this.visibleSourceState:this.visibleTargetState},mxCellState.prototype.setVisibleTerminalState=function(e,t){t?this.visibleSourceState=e:this.visibleTargetState=e},mxCellState.prototype.destroy=function(){this.view.graph.cellRenderer.destroy(this)},mxCellState.prototype.clone=function(){var e=new mxCellState(this.view,this.cell,this.style);if(null!=this.absolutePoints){e.absolutePoints=[];for(var t=0;t<this.absolutePoints.length;t++)e.absolutePoints[t]=this.absolutePoints[t].clone()}return null!=this.origin&&(e.origin=this.origin.clone()),null!=this.absoluteOffset&&(e.absoluteOffset=this.absoluteOffset.clone()),null!=this.boundingBox&&(e.boundingBox=this.boundingBox.clone()),e.terminalDistance=this.terminalDistance,e.segments=this.segments,e.length=this.length,e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e},mxGraphSelectionModel.prototype=new mxEventSource,mxGraphSelectionModel.prototype.constructor=mxGraphSelectionModel,mxGraphSelectionModel.prototype.doneResource="none"!=mxClient.language?"done":"",mxGraphSelectionModel.prototype.updatingSelectionResource="none"!=mxClient.language?"updatingSelection":"",mxGraphSelectionModel.prototype.graph=null,mxGraphSelectionModel.prototype.singleSelection=!1,mxGraphSelectionModel.prototype.isSingleSelection=function(){return this.singleSelection},mxGraphSelectionModel.prototype.setSingleSelection=function(e){this.singleSelection=e},mxGraphSelectionModel.prototype.isSelected=function(e){return null!=e&&0<=mxUtils.indexOf(this.cells,e)},mxGraphSelectionModel.prototype.isEmpty=function(){return 0==this.cells.length},mxGraphSelectionModel.prototype.clear=function(){this.changeSelection(null,this.cells)},mxGraphSelectionModel.prototype.setCell=function(e){null!=e&&this.setCells([e])},mxGraphSelectionModel.prototype.setCells=function(e){if(null!=e){this.singleSelection&&(e=[this.getFirstSelectableCell(e)]);for(var t=[],n=0;n<e.length;n++)this.graph.isCellSelectable(e[n])&&t.push(e[n]);this.changeSelection(t,this.cells)}},mxGraphSelectionModel.prototype.getFirstSelectableCell=function(e){if(null!=e)for(var t=0;t<e.length;t++)if(this.graph.isCellSelectable(e[t]))return e[t];return null},mxGraphSelectionModel.prototype.addCell=function(e){null!=e&&this.addCells([e])},mxGraphSelectionModel.prototype.addCells=function(e){if(null!=e){var t=null;this.singleSelection&&(t=this.cells,e=[this.getFirstSelectableCell(e)]);for(var n=[],a=0;a<e.length;a++)!this.isSelected(e[a])&&this.graph.isCellSelectable(e[a])&&n.push(e[a]);this.changeSelection(n,t)}},mxGraphSelectionModel.prototype.removeCell=function(e){null!=e&&this.removeCells([e])},mxGraphSelectionModel.prototype.removeCells=function(e){if(null!=e){for(var t=[],n=0;n<e.length;n++)this.isSelected(e[n])&&t.push(e[n]);this.changeSelection(null,t)}},mxGraphSelectionModel.prototype.changeSelection=function(e,t){if(null!=e&&0<e.length&&null!=e[0]||null!=t&&0<t.length&&null!=t[0]){var n=new mxSelectionChange(this,e,t);n.execute();var a=new mxUndoableEdit(this,!1);a.add(n),this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",a))}},mxGraphSelectionModel.prototype.cellAdded=function(e){null!=e&&!this.isSelected(e)&&this.cells.push(e)},mxGraphSelectionModel.prototype.cellRemoved=function(e){null!=e&&(0<=(e=mxUtils.indexOf(this.cells,e))&&this.cells.splice(e,1))},mxSelectionChange.prototype.execute=function(){var e=mxLog.enter("mxSelectionChange.execute");if(window.status=mxResources.get(this.selectionModel.updatingSelectionResource)||this.selectionModel.updatingSelectionResource,null!=this.removed)for(var t=0;t<this.removed.length;t++)this.selectionModel.cellRemoved(this.removed[t]);if(null!=this.added)for(t=0;t<this.added.length;t++)this.selectionModel.cellAdded(this.added[t]);t=this.added,this.added=this.removed,this.removed=t,window.status=mxResources.get(this.selectionModel.doneResource)||this.selectionModel.doneResource,mxLog.leave("mxSelectionChange.execute",e),this.selectionModel.fireEvent(new mxEventObject(mxEvent.CHANGE,"added",this.added,"removed",this.removed))},mxCellEditor.prototype.graph=null,mxCellEditor.prototype.textarea=null,mxCellEditor.prototype.editingCell=null,mxCellEditor.prototype.trigger=null,mxCellEditor.prototype.modified=!1,mxCellEditor.prototype.autoSize=!0,mxCellEditor.prototype.emptyLabelText="",mxCellEditor.prototype.textNode="",mxCellEditor.prototype.init=function(){this.textarea=document.createElement("textarea"),this.textarea.className="mxCellEditor",this.textarea.style.position="absolute",this.textarea.style.overflow="visible",this.textarea.setAttribute("cols","20"),this.textarea.setAttribute("rows","4"),mxClient.IS_NS&&(this.textarea.style.resize="none"),mxEvent.addListener(this.textarea,"blur",mxUtils.bind(this,function(e){this.focusLost()})),mxEvent.addListener(this.textarea,"keydown",mxUtils.bind(this,function(e){mxEvent.isConsumed(e)||(113==e.keyCode||this.graph.isEnterStopsCellEditing()&&13==e.keyCode&&!mxEvent.isControlDown(e)&&!mxEvent.isShiftDown(e)?(this.graph.stopEditing(!1),mxEvent.consume(e)):27==e.keyCode?(this.graph.stopEditing(!0),mxEvent.consume(e)):(this.clearOnChange&&(this.clearOnChange=!1,this.textarea.value=""),this.setModified(!0)))})),mxEvent.addListener(this.textarea,"keypress",mxUtils.bind(this,function(e){this.autoSize&&!mxEvent.isConsumed(e)&&setTimeout(mxUtils.bind(this,function(){this.resize()}),0)}))},mxCellEditor.prototype.resize=function(){if(null!=this.textDiv){var e=this.graph.getView().getState(this.editingCell),t=this.graph.isLabelClipped(e.cell),n=this.graph.isWrapping(e.cell);if(this.graph.getModel().isEdge(e.cell))this.bounds.x=e.absoluteOffset.x,this.bounds.y=e.absoluteOffset.y,this.bounds.width=0,this.bounds.height=0;else if(null!=this.bounds){this.bounds.x=e.x,this.bounds.y=e.y,this.bounds.width=e.width,this.bounds.height=e.height,(a=mxUtils.getValue(e.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER))==mxConstants.ALIGN_LEFT?this.bounds.x-=e.width:a==mxConstants.ALIGN_RIGHT&&(this.bounds.x+=e.width),(a=mxUtils.getValue(e.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE))==mxConstants.ALIGN_TOP?this.bounds.y-=e.height:a==mxConstants.ALIGN_BOTTOM&&(this.bounds.y+=e.height)}"\n"!=(a=this.textarea.value).charAt(a.length-1)&&""!=a||(a+="&nbsp;"),a=mxUtils.htmlEntities(a,!1),n?(this.textDiv.style.whiteSpace="normal",this.textDiv.style.width=this.bounds.width+"px"):a=a.replace(/ /g,"&nbsp;"),a=a.replace(/\n/g,"<br/>"),this.textDiv.innerHTML=a;var a=this.textDiv.offsetWidth+30,i=this.textDiv.offsetHeight+16;a=Math.max(a,40),i=Math.max(i,20);t&&(a=Math.min(this.bounds.width-4,a),i=Math.min(this.bounds.height,i));var o=null!=e.text?e.text.margin:null;null==o&&(o=mxUtils.getValue(e.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),e=mxUtils.getValue(e.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),o=mxUtils.getAlignmentAsPoint(o,e)),null!=o&&(!t&&n||(this.textarea.style.left=Math.max(0,Math.round(this.bounds.x-o.x*this.bounds.width+o.x*a)-3)+"px"),this.textarea.style.top=Math.max(0,Math.round(this.bounds.y-o.y*this.bounds.height+o.y*i)+4)+"px"),!t&&n||(this.textarea.style.width=a+"px"),this.textarea.style.height=i+"px"}},mxCellEditor.prototype.isModified=function(){return this.modified},mxCellEditor.prototype.setModified=function(e){this.modified=e},mxCellEditor.prototype.focusLost=function(){this.stopEditing(!this.graph.isInvokesStopCellEditing())},mxCellEditor.prototype.startEditing=function(e,t){null==this.textarea&&this.init(),this.stopEditing(!0);var n=this.graph.getView().getState(e);if(null!=n){this.editingCell=e,this.trigger=t,(this.textNode=null)!=n.text&&this.isHideLabel(n)&&(this.textNode=n.text.node,this.textNode.style.visibility="hidden");var a=this.graph.getView().scale,i=(a=mxUtils.getValue(n.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE)*a,mxUtils.getValue(n.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY)),o=mxUtils.getValue(n.style,mxConstants.STYLE_FONTCOLOR,"black"),s=mxUtils.getValue(n.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),r=(mxUtils.getValue(n.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,l=(mxUtils.getValue(n.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,d=(mxUtils.getValue(n.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.fontSize=Math.round(a)+"px",this.textarea.style.lineHeight=Math.round(a*mxConstants.LINE_HEIGHT)+"px",this.textarea.style.fontFamily=i,this.textarea.style.textAlign=s,this.textarea.style.color=o,this.textarea.style.fontWeight=r?"bold":"normal",this.textarea.style.fontStyle=l?"italic":"",this.textarea.style.textDecoration=d?"underline":"",this.textarea.style.overflow="auto",this.textarea.style.outline="none",this.bounds=a=this.getEditorBounds(n),this.textarea.style.left=a.x+"px",this.textarea.style.top=a.y+"px",this.textarea.style.width=a.width+"px",this.textarea.style.height=a.height+"px",this.textarea.style.zIndex=5,null==(n=this.getInitialValue(n,t))||0==n.length?(n=this.getEmptyLabelText(),this.clearOnChange=!0):this.clearOnChange=!1,this.setModified(!1),this.textarea.value=n,this.graph.container.appendChild(this.textarea),"none"!=this.textarea.style.display&&(this.autoSize&&(this.textDiv=this.createTextDiv(),document.body.appendChild(this.textDiv),this.resize()),this.textarea.focus(),this.textarea.select())}},mxCellEditor.prototype.createTextDiv=function(){var e=document.createElement("div"),t=e.style;return t.position="absolute",t.whiteSpace="nowrap",t.visibility="hidden",t.display=mxClient.IS_QUIRKS?"inline":"inline-block",t.zoom="1",t.verticalAlign="top",t.lineHeight=this.textarea.style.lineHeight,t.fontSize=this.textarea.style.fontSize,t.fontFamily=this.textarea.style.fontFamily,t.fontWeight=this.textarea.style.fontWeight,t.textAlign=this.textarea.style.textAlign,t.fontStyle=this.textarea.style.fontStyle,t.textDecoration=this.textarea.style.textDecoration,e},mxCellEditor.prototype.stopEditing=function(e){null!=this.editingCell&&(null!=this.textNode&&(this.textNode.style.visibility="visible",this.textNode=null),!e&&this.isModified()&&this.graph.labelChanged(this.editingCell,this.getCurrentValue(),this.trigger),null!=this.textDiv&&(document.body.removeChild(this.textDiv),this.textDiv=null),this.bounds=this.trigger=this.editingCell=null,this.textarea.blur(),this.textarea.parentNode.removeChild(this.textarea))},mxCellEditor.prototype.getInitialValue=function(e,t){return this.graph.getEditingValue(e.cell,t)},mxCellEditor.prototype.getCurrentValue=function(){return this.textarea.value.replace(/\r/g,"")},mxCellEditor.prototype.isHideLabel=function(e){return!0},mxCellEditor.prototype.getMinimumSize=function(e){var t=this.graph.getView().scale;return new mxRectangle(0,0,null==e.text?30:e.text.size*t+20,"left"==this.textarea.style.textAlign?120:40)},mxCellEditor.prototype.getEditorBounds=function(e){var t=this.graph.getModel().isEdge(e.cell),n=this.graph.getView().scale,a=(i=this.getMinimumSize(e)).width,i=i.height,o=parseInt(e.style[mxConstants.STYLE_SPACING]||2)*n,s=parseInt(e.style[mxConstants.STYLE_SPACING_TOP]||0)*n+o,r=parseInt(e.style[mxConstants.STYLE_SPACING_RIGHT]||0)*n+o,l=parseInt(e.style[mxConstants.STYLE_SPACING_BOTTOM]||0)*n+o;n=parseInt(e.style[mxConstants.STYLE_SPACING_LEFT]||0)*n+o,r=new mxRectangle(e.x,e.y,Math.max(a,e.width-n-r),Math.max(i,e.height-s-l));return t?(r.x=e.absoluteOffset.x,r.y=e.absoluteOffset.y,null!=e.text&&null!=e.text.boundingBox&&(0<e.text.boundingBox.x&&(r.x=e.text.boundingBox.x),0<e.text.boundingBox.y&&(r.y=e.text.boundingBox.y))):null!=e.text&&null!=e.text.boundingBox&&(r.x=Math.min(r.x,e.text.boundingBox.x),r.y=Math.min(r.y,e.text.boundingBox.y)),r.x+=n,r.y+=s,null!=e.text&&null!=e.text.boundingBox&&(t?(r.width=Math.max(a,e.text.boundingBox.width),r.height=Math.max(i,e.text.boundingBox.height)):(r.width=Math.max(r.width,e.text.boundingBox.width),r.height=Math.max(r.height,e.text.boundingBox.height))),this.graph.getModel().isVertex(e.cell)&&((t=mxUtils.getValue(e.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER))==mxConstants.ALIGN_LEFT?r.x-=e.width:t==mxConstants.ALIGN_RIGHT&&(r.x+=e.width),(t=mxUtils.getValue(e.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE))==mxConstants.ALIGN_TOP?r.y-=e.height:t==mxConstants.ALIGN_BOTTOM&&(r.y+=e.height)),r},mxCellEditor.prototype.getEmptyLabelText=function(e){return this.emptyLabelText},mxCellEditor.prototype.getEditingCell=function(){return this.editingCell},mxCellEditor.prototype.destroy=function(){null!=this.textarea&&(mxEvent.release(this.textarea),null!=this.textarea.parentNode&&this.textarea.parentNode.removeChild(this.textarea),this.textarea=null)},mxCellRenderer.prototype.defaultEdgeShape=mxConnector,mxCellRenderer.prototype.defaultVertexShape=mxRectangleShape,mxCellRenderer.prototype.defaultTextShape=mxText,mxCellRenderer.prototype.legacyControlPosition=!0,mxCellRenderer.prototype.defaultShapes={},mxCellRenderer.registerShape=function(e,t){mxCellRenderer.prototype.defaultShapes[e]=t},mxCellRenderer.registerShape(mxConstants.SHAPE_RECTANGLE,mxRectangleShape),mxCellRenderer.registerShape(mxConstants.SHAPE_ELLIPSE,mxEllipse),mxCellRenderer.registerShape(mxConstants.SHAPE_RHOMBUS,mxRhombus),mxCellRenderer.registerShape(mxConstants.SHAPE_CYLINDER,mxCylinder),mxCellRenderer.registerShape(mxConstants.SHAPE_CONNECTOR,mxConnector),mxCellRenderer.registerShape(mxConstants.SHAPE_ACTOR,mxActor),mxCellRenderer.registerShape(mxConstants.SHAPE_TRIANGLE,mxTriangle),mxCellRenderer.registerShape(mxConstants.SHAPE_HEXAGON,mxHexagon),mxCellRenderer.registerShape(mxConstants.SHAPE_CLOUD,mxCloud),mxCellRenderer.registerShape(mxConstants.SHAPE_LINE,mxLine),mxCellRenderer.registerShape(mxConstants.SHAPE_ARROW,mxArrow),mxCellRenderer.registerShape(mxConstants.SHAPE_DOUBLE_ELLIPSE,mxDoubleEllipse),mxCellRenderer.registerShape(mxConstants.SHAPE_SWIMLANE,mxSwimlane),mxCellRenderer.registerShape(mxConstants.SHAPE_IMAGE,mxImageShape),mxCellRenderer.registerShape(mxConstants.SHAPE_LABEL,mxLabel),mxCellRenderer.prototype.initialize=function(e,t){var n=e.view.graph.getModel();null!=e.view.graph.container&&null==e.shape&&e.cell!=e.view.currentRoot&&(n.isVertex(e.cell)||n.isEdge(e.cell))&&(this.createShape(e),null==e.shape||null!=t&&!t||(this.initializeShape(e),e.view.graph.ordered||n.isEdge(e.cell)?e.invalidOrder=!0:e.view.graph.keepEdgesInForeground&&null!=this.firstEdge&&(this.firstEdge.parentNode==e.shape.node.parentNode?this.insertState(e,this.firstEdge):this.firstEdge=null),e.shape.scale=e.view.scale,this.createCellOverlays(e),this.installListeners(e)))},mxCellRenderer.prototype.initializeShape=function(e){e.shape.init(e.view.getDrawPane())},mxCellRenderer.prototype.getPreviousStateInContainer=function(e,t){for(var n=null,a=e.view.graph,i=a.getModel(),o=e.cell,s=i.getParent(o);null!=s&&null==n;)n=this.findPreviousStateInContainer(a,s,o,t),o=s,s=i.getParent(o);return n},mxCellRenderer.prototype.findPreviousStateInContainer=function(e,t,n,a){var i=null,o=e.getModel();for(n=null!=n?t.getIndex(n)-1:o.getChildCount(t)-1;0<=n&&null==i;n--)i=this.findPreviousStateInContainer(e,o.getChildAt(t,n),null,a);return null!=i||(null==(i=e.view.getState(t))||null!=i.shape&&null!=i.shape.node&&i.shape.node.parentNode==a)||(i=null),i},mxCellRenderer.prototype.order=function(e){var t=e.shape.node.parentNode,n=this.getPreviousStateInContainer(e,t),a=t.firstChild;null!=n&&(a=n.shape.node,null!=n.text&&null!=n.text.node&&n.text.node.parentNode==t&&(a=n.text.node),a=a.nextSibling),this.insertState(e,a)},mxCellRenderer.prototype.orderEdge=function(e){var t=(n=e.view).graph.getModel();if(n.graph.keepEdgesInForeground)null!=this.firstEdge&&null!=this.firstEdge.parentNode&&this.firstEdge.parentNode==e.shape.node.parentNode||(this.firstEdge=e.shape.node);else if(n.graph.keepEdgesInBackground){var n,a=e.shape.node,i=a.parentNode;t=t.getParent(e.cell);null!=(i=null!=(n=n.getState(t))&&null!=n.shape&&null!=n.shape.node?n.shape.node.nextSibling:i.firstChild)&&i!=a&&this.insertState(e,i)}},mxCellRenderer.prototype.insertState=function(e,t){e.shape.node.parentNode.insertBefore(e.shape.node,t),null!=e.text&&null!=e.text.node&&e.text.node.parentNode==e.shape.node.parentNode&&e.shape.node.parentNode.insertBefore(e.text.node,e.shape.node.nextSibling)},mxCellRenderer.prototype.createShape=function(e){if(null!=e.style){var t=mxStencilRegistry.getStencil(e.style[mxConstants.STYLE_SHAPE]);null!=t?e.shape=new mxShape(t):(t=this.getShapeConstructor(e),e.shape=new t),e.shape.points=e.absolutePoints,e.shape.bounds=new mxRectangle(e.x,e.y,e.width,e.height),e.shape.dialect=e.view.graph.dialect,this.configureShape(e)}},mxCellRenderer.prototype.getShape=function(e){return null!=e?mxCellRenderer.prototype.defaultShapes[e]:null},mxCellRenderer.prototype.getShapeConstructor=function(e){var t=this.getShape(e.style[mxConstants.STYLE_SHAPE]);return null==t&&(t=e.view.graph.getModel().isEdge(e.cell)?this.defaultEdgeShape:this.defaultVertexShape),t},mxCellRenderer.prototype.configureShape=function(e){e.shape.apply(e),e.shape.image=e.view.graph.getImage(e),e.shape.indicatorShape=this.getShape(e.view.graph.getIndicatorShape(e)),e.shape.indicatorColor=e.view.graph.getIndicatorColor(e),e.shape.indicatorGradientColor=e.view.graph.getIndicatorGradientColor(e),e.shape.indicatorDirection=e.style[mxConstants.STYLE_INDICATOR_DIRECTION],e.shape.indicatorImage=e.view.graph.getIndicatorImage(e),this.postConfigureShape(e)},mxCellRenderer.prototype.postConfigureShape=function(e){null!=e.shape&&(this.resolveColor(e,"indicatorColor",mxConstants.STYLE_FILLCOLOR),this.resolveColor(e,"indicatorGradientColor",mxConstants.STYLE_GRADIENTCOLOR),this.resolveColor(e,"fill",mxConstants.STYLE_FILLCOLOR),this.resolveColor(e,"stroke",mxConstants.STYLE_STROKECOLOR),this.resolveColor(e,"gradient",mxConstants.STYLE_GRADIENTCOLOR))},mxCellRenderer.prototype.resolveColor=function(e,t,n){var a=e.shape[t],i=e.view.graph,o=null;"inherit"==a?o=i.model.getParent(e.cell):"swimlane"==a?(o=null!=i.model.getTerminal(e.cell,!1)?i.model.getTerminal(e.cell,!1):e.cell,o=i.getSwimlane(o),n=i.swimlaneIndicatorColorAttribute):"indicated"==a&&(e.shape[t]=e.shape.indicatorColor),null!=o&&(a=i.getView().getState(o),(e.shape[t]=null)!=a&&(e.shape[t]=null!=a.shape&&"indicatorColor"!=t?a.shape[t]:a.style[n]))},mxCellRenderer.prototype.getLabelValue=function(e){return e.view.graph.getLabel(e.cell)},mxCellRenderer.prototype.createLabel=function(n,e){var a=n.view.graph;if(a.getModel().isEdge(n.cell),0<n.style[mxConstants.STYLE_FONTSIZE]||null==n.style[mxConstants.STYLE_FONTSIZE]){var t=a.isHtmlLabel(n.cell)||null!=e&&mxUtils.isNode(e);n.text=new this.defaultTextShape(e,new mxRectangle,n.style[mxConstants.STYLE_ALIGN]||mxConstants.ALIGN_CENTER,a.getVerticalAlign(n),n.style[mxConstants.STYLE_FONTCOLOR],n.style[mxConstants.STYLE_FONTFAMILY],n.style[mxConstants.STYLE_FONTSIZE],n.style[mxConstants.STYLE_FONTSTYLE],n.style[mxConstants.STYLE_SPACING],n.style[mxConstants.STYLE_SPACING_TOP],n.style[mxConstants.STYLE_SPACING_RIGHT],n.style[mxConstants.STYLE_SPACING_BOTTOM],n.style[mxConstants.STYLE_SPACING_LEFT],n.style[mxConstants.STYLE_HORIZONTAL],n.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],n.style[mxConstants.STYLE_LABEL_BORDERCOLOR],a.isWrapping(n.cell)&&a.isHtmlLabel(n.cell),a.isLabelClipped(n.cell),n.style[mxConstants.STYLE_OVERFLOW],n.style[mxConstants.STYLE_LABEL_PADDING]),n.text.opacity=mxUtils.getValue(n.style,mxConstants.STYLE_TEXT_OPACITY,100),n.text.dialect=t?mxConstants.DIALECT_STRICTHTML:n.view.graph.dialect,n.text.state=n,this.initializeLabel(n);var i=!1,o=function(e){var t=n;return(mxClient.IS_TOUCH||i)&&(t=mxEvent.getClientX(e),e=mxEvent.getClientY(e),e=mxUtils.convertPoint(a.container,t,e),t=a.view.getState(a.getCellAt(e.x,e.y))),t};mxEvent.addGestureListeners(n.text.node,mxUtils.bind(this,function(e){this.isLabelEvent(n,e)&&(a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e,n)),i=a.dialect!=mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(e).nodeName)}),mxUtils.bind(this,function(e){this.isLabelEvent(n,e)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,o(e)))}),mxUtils.bind(this,function(e){this.isLabelEvent(n,e)&&(a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e,o(e))),i=!1)})),mxEvent.addListener(n.text.node,"dblclick",mxUtils.bind(this,function(e){this.isLabelEvent(n,e)&&(a.dblClick(e,n.cell),mxEvent.consume(e))}))}},mxCellRenderer.prototype.initializeLabel=function(e){var t=e.view.graph;e.text.dialect!=mxConstants.DIALECT_SVG&&(mxClient.IS_SVG&&mxClient.NO_FO?e.text.init(t.container):mxUtils.isVml(e.view.getDrawPane())&&(null!=e.shape.label?e.text.init(e.shape.label):e.text.init(e.shape.node))),null==e.text.node&&(e.text.init(e.view.getDrawPane()),null!=e.shape&&null!=e.text&&e.shape.node.parentNode.insertBefore(e.text.node,e.shape.node.nextSibling))},mxCellRenderer.prototype.createCellOverlays=function(e){var t=e.view.graph.getCellOverlays(e.cell),n=null;if(null!=t){n=new mxDictionary;for(var a=0;a<t.length;a++){var i=null!=e.overlays?e.overlays.remove(t[a]):null;null==i&&((i=new mxImageShape(new mxRectangle,t[a].image.src)).dialect=e.view.graph.dialect,i.preserveImageAspect=!1,i.overlay=t[a],this.initializeOverlay(e,i),this.installCellOverlayListeners(e,t[a],i),null!=t[a].cursor&&(i.node.style.cursor=t[a].cursor)),n.put(t[a],i)}}null!=e.overlays&&e.overlays.visit(function(e,t){t.destroy()}),e.overlays=n},mxCellRenderer.prototype.initializeOverlay=function(e,t){t.init(e.view.getOverlayPane())},mxCellRenderer.prototype.installCellOverlayListeners=function(t,n,e){var a=t.view.graph;mxEvent.addListener(e.node,"click",function(e){a.isEditing()&&a.stopEditing(!a.isInvokesStopCellEditing()),n.fireEvent(new mxEventObject(mxEvent.CLICK,"event",e,"cell",t.cell))}),mxEvent.addGestureListeners(e.node,function(e){mxEvent.consume(e)},function(e){a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,t))}),mxClient.IS_TOUCH&&mxEvent.addListener(e.node,"touchend",function(e){n.fireEvent(new mxEventObject(mxEvent.CLICK,"event",e,"cell",t.cell))})},mxCellRenderer.prototype.createControl=function(n){var a=n.view.graph,e=a.getFoldingImage(n);if(a.foldingEnabled&&null!=e){if(null==n.control){var t=new mxRectangle(0,0,e.width,e.height);n.control=new mxImageShape(t,e.src),n.control.preserveImageAspect=!1,n.control.dialect=a.dialect,this.initControl(n,n.control,!0,function(e){if(a.isEnabled()){var t=!a.isCellCollapsed(n.cell);a.foldCells(t,!1,[n.cell]),mxEvent.consume(e)}})}}else null!=n.control&&(n.control.destroy(),n.control=null)},mxCellRenderer.prototype.initControl=function(t,e,n,a){var i=t.view.graph;return i.isHtmlLabel(t.cell)&&mxClient.NO_FO&&i.dialect==mxConstants.DIALECT_SVG?(e.dialect=mxConstants.DIALECT_PREFERHTML,e.init(i.container),e.node.style.zIndex=1):e.init(t.view.getOverlayPane()),e=e.innerNode||e.node,a&&(i.isEnabled()&&(e.style.cursor="pointer"),mxEvent.addListener(e,"click",a)),n&&mxEvent.addGestureListeners(e,function(e){i.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e,t)),mxEvent.consume(e)},function(e){i.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,t))}),e},mxCellRenderer.prototype.isShapeEvent=function(e,t){return!0},mxCellRenderer.prototype.isLabelEvent=function(e,t){return!0},mxCellRenderer.prototype.installListeners=function(n){var a=n.view.graph,t=function(e){var t=n;return(a.dialect!=mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(e).nodeName||mxClient.IS_TOUCH)&&(t=mxEvent.getClientX(e),e=mxEvent.getClientY(e),e=mxUtils.convertPoint(a.container,t,e),t=a.view.getState(a.getCellAt(e.x,e.y))),t},i=!1;mxEvent.addListener(n.shape.node,"gesturestart",mxUtils.bind(this,function(e){a.lastTouchTime=0,i=!0,mxEvent.consume(e)})),mxEvent.addGestureListeners(n.shape.node,mxUtils.bind(this,function(e){this.isShapeEvent(n,e)&&!i?a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e,null!=n.shape&&mxEvent.getSource(e)==n.shape.content?null:n)):i&&mxEvent.consume(e)}),mxUtils.bind(this,function(e){this.isShapeEvent(n,e)&&!i?a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,null!=n.shape&&mxEvent.getSource(e)==n.shape.content?null:t(e))):i&&mxEvent.consume(e)}),mxUtils.bind(this,function(e){this.isShapeEvent(n,e)&&!i?a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e,null!=n.shape&&mxEvent.getSource(e)==n.shape.content?null:t(e))):i&&mxEvent.consume(e)}));var o=mxClient.IS_TOUCH?"gestureend":"dblclick";mxEvent.addListener(n.shape.node,o,mxUtils.bind(this,function(e){i=!1,"gestureend"==o?(a.lastTouchTime=0,a.gestureEnabled&&(a.handleGesture(n,e),mxEvent.consume(e))):this.isShapeEvent(n,e)&&(a.dblClick(e,null!=n.shape&&mxEvent.getSource(e)==n.shape.content?null:n.cell),mxEvent.consume(e))}))},mxCellRenderer.prototype.redrawLabel=function(e,t){var n=this.getLabelValue(e);if(null==e.text&&null!=n&&(mxUtils.isNode(n)||0<n.length)?this.createLabel(e,n):null==e.text||null!=n&&0!=n.length||(e.text.destroy(),e.text=null),null!=e.text){var a=(i=e.view.graph).isWrapping(e.cell),i=i.isLabelClipped(e.cell),o=this.getLabelBounds(e);!t&&e.text.value==n&&e.text.isWrapping==a&&e.text.isClipping==i&&e.text.scale==e.view.scale&&e.text.bounds.equals(o)||(e.text.value=n,e.text.bounds=o,e.text.scale=this.getTextScale(e),e.text.isWrapping=a,e.text.isClipping=i,e.text.redraw())}},mxCellRenderer.prototype.getTextScale=function(e){return e.view.scale},mxCellRenderer.prototype.getLabelBounds=function(e){var t=e.view.graph,n=e.view.scale,a=t.getModel().isEdge(e.cell),i=new mxRectangle(e.absoluteOffset.x,e.absoluteOffset.y);return e.text.updateMargin(),a?(a=e.text.getSpacing(),i.x+=a.x*n,i.y+=a.y*n,null!=(t=t.getCellGeometry(e.cell))&&(i.width=Math.max(0,e.text.margin.x*t.width*n-e.text.spacingLeft*n-e.text.spacingRight*n),i.height=Math.max(0,e.text.margin.y*t.height*n-e.text.spacingTop*n-e.text.spacingBottom*n))):(e.text.isPaintBoundsInverted()&&(a=i.x,i.x=i.y,i.y=a),i.x+=e.x,i.y+=e.y,i.width=Math.max(1,e.width),i.height=Math.max(1,e.height),t.isSwimlane(e.cell)&&(0<(t=t.getStartSize(e.cell)).width?(a=Math.min(i.width,t.width*n),e.shape.flipH&&(i.x+=i.width-a),i.width=a):0<t.height&&(a=Math.min(i.height,t.height*n),e.shape.flipV&&(i.y+=i.height-a),i.height=a)),this.rotateLabelBounds(e,i)),i},mxCellRenderer.prototype.rotateLabelBounds=function(e,t){if(e.text.isPaintBoundsInverted()){var n=(e.width-e.height)/2;t.x+=n,t.y-=n,n=t.width,t.width=t.height,t.height=n}if(t.x-=e.text.margin.x*t.width,t.y-=e.text.margin.y*t.height,"fill"!=e.style[mxConstants.STYLE_OVERFLOW]){n=e.view.scale;var a=e.text.getSpacing();t.x+=a.x*n,t.y+=a.y*n,t.width=Math.max(0,t.width-e.text.spacingLeft*n-e.text.spacingRight*n),t.height=Math.max(0,t.height-e.text.spacingTop*n-e.text.spacingBottom*n)}var i=e.text.getTextRotation();0!=i&&null!=e&&e.view.graph.model.isVertex(e.cell)&&(n=e.getCenterX(),a=e.getCenterY(),t.x!=n||t.y!=a)&&(i*=Math.PI/180,pt=mxUtils.getRotatedPoint(new mxPoint(t.x,t.y),Math.cos(i),Math.sin(i),new mxPoint(n,a)),t.x=pt.x,t.y=pt.y)},mxCellRenderer.prototype.redrawCellOverlays=function(o,s){if(this.createCellOverlays(o),null!=o.overlays){var r=mxUtils.mod(mxUtils.getValue(o.style,mxConstants.STYLE_ROTATION,0),90),e=mxUtils.toRadians(r),l=Math.cos(e),d=Math.sin(e);o.overlays.visit(function(e,t){var n=t.overlay.getBounds(o);if(!o.view.graph.getModel().isEdge(o.cell)&&null!=o.shape&&0!=r){var a=n.getCenterX(),i=n.getCenterY();a=(i=mxUtils.getRotatedPoint(new mxPoint(a,i),l,d,new mxPoint(o.getCenterX(),o.getCenterY()))).x,i=i.y;n.x=Math.round(a-n.width/2),n.y=Math.round(i-n.height/2)}!s&&null!=t.bounds&&t.scale==o.view.scale&&t.bounds.equals(n)||(t.bounds=n,t.scale=o.view.scale,t.redraw())})}},mxCellRenderer.prototype.redrawControl=function(e,t){if(null!=e.control){var n=this.getControlBounds(e),a=this.legacyControlPosition?mxUtils.getValue(e.style,mxConstants.STYLE_ROTATION,0):e.shape.getTextRotation(),i=e.view.scale;!t&&e.control.scale==i&&e.control.bounds.equals(n)&&e.control.rotation==a||(e.control.rotation=a,e.control.bounds=n,e.control.scale=i,e.control.redraw())}},mxCellRenderer.prototype.getControlBounds=function(e){if(null!=e.control){var t=e.control.scale,n=e.control.bounds.width/t,a=(t=e.control.bounds.height/t,e.view.scale),i=e.getCenterX(),o=e.getCenterY();if(!e.view.graph.getModel().isEdge(e.cell)&&(i=e.x+n*a,o=e.y+t*a,null!=e.shape)){var s=e.shape.getShapeRotation();if(this.legacyControlPosition)s=mxUtils.getValue(e.style,mxConstants.STYLE_ROTATION,0);else if(e.shape.isPaintBoundsInverted()){var r=(e.width-e.height)/2;i=i+r,o=o-r}0!=s&&(r=mxUtils.toRadians(s),s=Math.cos(r),r=Math.sin(r),i=(o=mxUtils.getRotatedPoint(new mxPoint(i,o),s,r,new mxPoint(e.getCenterX(),e.getCenterY()))).x,o=o.y)}return e.view.graph.getModel().isEdge(e.cell),new mxRectangle(Math.round(i-n/2*a),Math.round(o-t/2*a),Math.round(n*a),Math.round(t*a))}return null},mxCellRenderer.prototype.redraw=function(e,t,n){if(null!=e.shape){var a=!1;e.view.graph.getModel().isEdge(e.cell),reconfigure=null!=t&&t,this.createControl(e),(e.orderChanged||e.invalidOrder)&&(e.view.graph.ordered?this.order(e):this.orderEdge(e)),!e.orderChanged&&mxUtils.equalEntries(e.shape.style,e.style)||(this.configureShape(e),t=!0),delete e.invalidOrder,delete e.orderChanged,!t&&null!=e.shape.bounds&&e.shape.scale==e.view.scale&&e.shape.bounds.equals(e)&&mxUtils.equalPoints(e.shape.points,e.absolutePoints)||(a=!0,e.shape.points=null!=e.absolutePoints?e.absolutePoints.slice():null,e.shape.bounds=new mxRectangle(e.x,e.y,e.width,e.height),e.shape.scale=e.view.scale,null==n||n?e.shape.redraw():e.shape.updateBoundingBox()),(null==n||n)&&(this.redrawLabel(e,a),this.redrawCellOverlays(e,a),this.redrawControl(e,a))}},mxCellRenderer.prototype.destroy=function(e){null!=e.shape&&(null!=e.text&&(e.text.destroy(),e.text=null),null!=e.overlays&&(e.overlays.visit(function(e,t){t.destroy()}),e.overlays=null),null!=e.control&&(e.control.destroy(),e.control=null),e.shape.destroy(),e.shape=null)};var mxEdgeStyle={EntityRelation:function(e,t,n,a,i){var o=e.view,s=o.graph;a=mxUtils.getValue(e.style,mxConstants.STYLE_SEGMENT,mxConstants.ENTITY_SEGMENT)*o.scale;var r=(d=e.absolutePoints)[0],l=d[d.length-1],d=!1;if(null!=r)(t=new mxCellState).x=r.x,t.y=r.y;else{if(null==t)return;var c=mxUtils.getPortConstraints(t,e,!0,mxConstants.DIRECTION_MASK_NONE);c!=mxConstants.DIRECTION_MASK_NONE?d=c==mxConstants.DIRECTION_MASK_WEST:(r=s.getCellGeometry(t.cell)).relative?d=r.x<=.5:null!=n&&(d=n.x+n.width<t.x)}r=!0,null!=l?((n=new mxCellState).x=l.x,n.y=l.y):null!=n&&((c=mxUtils.getPortConstraints(n,e,!1,mxConstants.DIRECTION_MASK_NONE))!=mxConstants.DIRECTION_MASK_NONE?r=c==mxConstants.DIRECTION_MASK_WEST:(e=s.getCellGeometry(n.cell)).relative?r=e.x<=.5:null!=t&&(r=t.x+t.width<n.x)),null!=t&&null!=n&&(e=d?t.x:t.x+t.width,t=o.getRoutingCenterY(t),s=r?n.x:n.x+n.width,n=o.getRoutingCenterY(n),o=new mxPoint(e+(d?-a:a),t),l=new mxPoint(s+(r?-a:a),n),d==r?(a=d?Math.min(e,s)-a:Math.max(e,s)+a,i.push(new mxPoint(a,t)),i.push(new mxPoint(a,n))):(o.x<l.x==d?(a=t+(n-t)/2,i.push(o),i.push(new mxPoint(o.x,a)),i.push(new mxPoint(l.x,a))):i.push(o),i.push(l)))},Loop:function(e,t,n,a,i){if(null!=t){var o=(n=e.view).graph;null!=(a=null!=a&&0<a.length?a[0]:null)&&(a=n.transformControlPoint(e,a),mxUtils.contains(t,a.x,a.y)&&(a=null));var s=0,r=0,l=0,d=0;o=mxUtils.getValue(e.style,mxConstants.STYLE_SEGMENT,o.gridSize)*n.scale;(e=mxUtils.getValue(e.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_WEST))==mxConstants.DIRECTION_NORTH||e==mxConstants.DIRECTION_SOUTH?(s=n.getRoutingCenterX(t),r=o):(l=n.getRoutingCenterY(t),d=o),null==a||a.x<t.x||a.x>t.x+t.width?null!=a?(s=a.x,d=Math.max(Math.abs(l-a.y),d)):e==mxConstants.DIRECTION_NORTH?l=t.y-2*r:e==mxConstants.DIRECTION_SOUTH?l=t.y+t.height+2*r:s=e==mxConstants.DIRECTION_EAST?t.x-2*d:t.x+t.width+2*d:null!=a&&(s=n.getRoutingCenterX(t),r=Math.max(Math.abs(s-a.x),d),l=a.y,d=0),i.push(new mxPoint(s-r,l-d)),i.push(new mxPoint(s+r,l+d))}},ElbowConnector:function(e,t,n,a,i){var o=null!=a&&0<a.length?a[0]:null,s=!1,r=!1;if(null!=t&&null!=n)if(null!=o){var l=Math.min(t.x,n.x),d=Math.max(t.x+t.width,n.x+n.width),c=(r=Math.min(t.y,n.y),Math.max(t.y+t.height,n.y+n.height));s=(o=e.view.transformControlPoint(e,o)).y<r||o.y>c,r=o.x<l||o.x>d}else(s=(l=Math.max(t.x,n.x))==(d=Math.min(t.x+t.width,n.x+n.width)))||(r=(r=Math.max(t.y,n.y))==(c=Math.min(t.y+t.height,n.y+n.height)));r||!s&&e.style[mxConstants.STYLE_ELBOW]!=mxConstants.ELBOW_VERTICAL?mxEdgeStyle.SideToSide(e,t,n,a,i):mxEdgeStyle.TopToBottom(e,t,n,a,i)},SideToSide:function(e,t,n,a,i){var o=e.view;a=null!=a&&0<a.length?a[0]:null;var s=(r=e.absolutePoints)[0],r=r[r.length-1];null!=a&&(a=o.transformControlPoint(e,a)),null!=s&&((t=new mxCellState).x=s.x,t.y=s.y),null!=r&&((n=new mxCellState).x=r.x,n.y=r.y),null!=t&&null!=n&&(e=Math.max(t.x,n.x),s=Math.min(t.x+t.width,n.x+n.width),e=null!=a?a.x:s+(e-s)/2,s=o.getRoutingCenterY(t),o=o.getRoutingCenterY(n),null!=a&&(a.y>=t.y&&a.y<=t.y+t.height&&(s=a.y),a.y>=n.y&&a.y<=n.y+n.height&&(o=a.y)),!mxUtils.contains(n,e,s)&&!mxUtils.contains(t,e,s)&&i.push(new mxPoint(e,s)),!mxUtils.contains(n,e,o)&&!mxUtils.contains(t,e,o)&&i.push(new mxPoint(e,o)),1==i.length&&(null!=a?!mxUtils.contains(n,e,a.y)&&!mxUtils.contains(t,e,a.y)&&i.push(new mxPoint(e,a.y)):(o=Math.max(t.y,n.y),t=Math.min(t.y+t.height,n.y+n.height),i.push(new mxPoint(e,o+(t-o)/2)))))},TopToBottom:function(e,t,n,a,i){var o=e.view;a=null!=a&&0<a.length?a[0]:null;var s=(r=e.absolutePoints)[0],r=r[r.length-1];null!=a&&(a=o.transformControlPoint(e,a)),null!=s&&((t=new mxCellState).x=s.x,t.y=s.y),null!=r&&((n=new mxCellState).x=r.x,n.y=r.y),null!=t&&null!=n&&(s=Math.max(t.y,n.y),r=Math.min(t.y+t.height,n.y+n.height),e=o.getRoutingCenterX(t),null!=a&&a.x>=t.x&&a.x<=t.x+t.width&&(e=a.x),s=null!=a?a.y:r+(s-r)/2,!mxUtils.contains(n,e,s)&&!mxUtils.contains(t,e,s)&&i.push(new mxPoint(e,s)),e=null!=a&&a.x>=n.x&&a.x<=n.x+n.width?a.x:o.getRoutingCenterX(n),!mxUtils.contains(n,e,s)&&!mxUtils.contains(t,e,s)&&i.push(new mxPoint(e,s)),1==i.length&&(null!=a&&1==i.length?!mxUtils.contains(n,a.x,s)&&!mxUtils.contains(t,a.x,s)&&i.push(new mxPoint(a.x,s)):(o=Math.max(t.x,n.x),t=Math.min(t.x+t.width,n.x+n.width),i.push(new mxPoint(o+(t-o)/2,s)))))},SegmentConnector:function(e,t,n,a,i){var o=e.absolutePoints,s=!0,r=null,l=o[0];null==l&&null!=t?l=new mxPoint(e.view.getRoutingCenterX(t),e.view.getRoutingCenterY(t)):null!=l&&(l=l.clone());var d=o.length-1;if(null!=a&&0<a.length){r=e.view.transformControlPoint(e,a[0]);for(var c=t,m=o[0],u=!1,p=!1,g=(u=r,a.length),v=0;v<2;v++){var h=null!=m&&m.x==u.x,b=null!=m&&m.y==u.y,f=null!=c&&u.y>=c.y&&u.y<=c.y+c.height;c=null!=c&&u.x>=c.x&&u.x<=c.x+c.width,u=b||null==m&&f,p=h||null==m&&c;if(null!=m&&!b&&!h&&(f||c)){s=!f;break}if(p||u){s=u,1==v&&(s=0==a.length%2?u:p);break}c=n,m=o[d],u=e.view.transformControlPoint(e,a[g-1])}for(s&&(null!=o[0]&&o[0].y!=r.y||null==o[0]&&null!=t&&(r.y<t.y||r.y>t.y+t.height))?i.push(new mxPoint(l.x,r.y)):!s&&(null!=o[0]&&o[0].x!=r.x||null==o[0]&&null!=t&&(r.x<t.x||r.x>t.x+t.width))&&i.push(new mxPoint(r.x,l.y)),s?l.y=r.y:l.x=r.x,v=0;v<a.length;v++)s=!s,r=e.view.transformControlPoint(e,a[v]),s?l.y=r.y:l.x=r.x,i.push(l.clone())}else r=l,s=!0;if(null==(l=o[d])&&null!=n&&(l=new mxPoint(e.view.getRoutingCenterX(n),e.view.getRoutingCenterY(n))),s&&(null!=o[d]&&o[d].y!=r.y||null==o[d]&&null!=n&&(r.y<n.y||r.y>n.y+n.height))?i.push(new mxPoint(l.x,r.y)):!s&&(null!=o[d]&&o[d].x!=r.x||null==o[d]&&null!=n&&(r.x<n.x||r.x>n.x+n.width))&&i.push(new mxPoint(r.x,l.y)),null==o[0]&&null!=t)for(;1<i.length&&mxUtils.contains(t,i[1].x,i[1].y);)i=i.splice(1,1);if(null==o[d]&&null!=n)for(;1<i.length&&mxUtils.contains(n,i[i.length-1].x,i[i.length-1].y);)i=i.splice(i.length-1,1)},orthBuffer:10,dirVectors:[[-1,0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,2568]],[[2081,2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,VERTEX_MASK:3072,OrthConnector:function(e,t,n,a,i){var o=e.view.graph,s=null!=t&&o.getModel().isEdge(t.cell);o=null!=n&&o.getModel().isEdge(n.cell);if(null!=a&&0<a.length||s||o)mxEdgeStyle.SegmentConnector(e,t,n,a,i);else{var r=(a=e.absolutePoints)[0],l=a[a.length-1];a=null!=t?t.x:r.x;s=null!=t?t.y:r.y;var d=null!=t?t.width:1,c=null!=t?t.height:1,m=null!=n?n.x:l.x,u=null!=n?n.y:l.y,p=null!=n?n.width:1,g=null!=n?n.height:1,v=(o=e.view.scale*mxEdgeStyle.orthBuffer,[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL]);for(null!=t&&(v[0]=mxUtils.getPortConstraints(t,e,!0,mxConstants.DIRECTION_MASK_ALL)),null!=n&&(v[1]=mxUtils.getPortConstraints(n,e,!1,mxConstants.DIRECTION_MASK_ALL)),e=[0,0],a=[[a,s,d,c],[m,u,p,g]],d=0;d<2;d++)mxEdgeStyle.limits[d][1]=a[d][0]-o,mxEdgeStyle.limits[d][2]=a[d][1]-o,mxEdgeStyle.limits[d][4]=a[d][0]+a[d][2]+o,mxEdgeStyle.limits[d][8]=a[d][1]+a[d][3]+o;for(d=a[0][0]+a[0][2]/2-(a[1][0]+a[1][2]/2),c=a[0][1]+a[0][3]/2-(a[1][1]+a[1][3]/2),d<(s=0)?s=c<0?2:1:c<=0&&(s=3,0==d&&(s=2)),(c=null)!=t&&(c=r),t=[[.5,.5],[.5,.5]],d=0;d<2;d++)null!=c&&(t[d][0]=(c.x-a[d][0])/a[d][2],t[d][0]<.01?e[d]=mxConstants.DIRECTION_MASK_WEST:.99<t[d][0]&&(e[d]=mxConstants.DIRECTION_MASK_EAST),t[d][1]=(c.y-a[d][1])/a[d][3],t[d][1]<.01?e[d]=mxConstants.DIRECTION_MASK_NORTH:.99<t[d][1]&&(e[d]=mxConstants.DIRECTION_MASK_SOUTH)),(c=null)!=n&&(c=l);for(d=a[0][1]-(a[1][1]+a[1][3]),c=a[0][0]-(a[1][0]+a[1][2]),m=a[1][1]-(a[0][1]+a[0][3]),u=a[1][0]-(a[0][0]+a[0][2]),mxEdgeStyle.vertexSeperations[1]=Math.max(c-2*o,0),mxEdgeStyle.vertexSeperations[2]=Math.max(d-2*o,0),mxEdgeStyle.vertexSeperations[4]=Math.max(m-2*o,0),mxEdgeStyle.vertexSeperations[3]=Math.max(u-2*o,0),n=[],l=[],(r=[])[0]=u<=c?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST,l[0]=m<=d?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH,r[1]=mxUtils.reversePortConstraints(r[0]),l[1]=mxUtils.reversePortConstraints(l[0]),c=u<=c?c:u,m=m<=d?d:m,p=!(u=[[0,0],[0,0]]),d=0;d<2;d++)0==e[d]&&(0==(r[d]&v[d])&&(r[d]=mxUtils.reversePortConstraints(r[d])),0==(l[d]&v[d])&&(l[d]=mxUtils.reversePortConstraints(l[d])),u[d][0]=l[d],u[d][1]=r[d]);for(2*o<m&&2*o<c&&(0<(r[0]&v[0])&&0<(l[1]&v[1])?(u[0][0]=r[0],u[0][1]=l[0],u[1][0]=l[1],u[1][1]=r[1],p=!0):0<(l[0]&v[0])&&0<(r[1]&v[1])&&(u[0][0]=l[0],u[0][1]=r[0],u[1][0]=r[1],u[1][1]=l[1],p=!0)),2*o<m&&!p&&(u[0][0]=l[0],u[0][1]=r[0],u[1][0]=l[1],u[1][1]=r[1],p=!0),2*o<c&&!p&&(u[0][0]=r[0],u[0][1]=l[0],u[1][0]=r[1],u[1][1]=l[1]),d=0;d<2;d++)0==e[d]&&(0==(u[d][0]&v[d])&&(u[d][0]=u[d][1]),n[d]=u[d][0]&v[d],n[d]|=(u[d][1]&v[d])<<8,n[d]|=(u[1-d][d]&v[d])<<16,n[d]|=(u[1-d][1-d]&v[d])<<24,0==(15&n[d])&&(n[d]<<=8),0==(3840&n[d])&&(n[d]=15&n[d]|n[d]>>8),0==(983040&n[d])&&(n[d]=65535&n[d]|(251658240&n[d])>>8),e[d]=15&n[d],v[d]==mxConstants.DIRECTION_MASK_WEST||v[d]==mxConstants.DIRECTION_MASK_NORTH||v[d]==mxConstants.DIRECTION_MASK_EAST||v[d]==mxConstants.DIRECTION_MASK_SOUTH)&&(e[d]=v[d]);switch(d=e[0]==mxConstants.DIRECTION_MASK_EAST?3:e[0],v=e[1]==mxConstants.DIRECTION_MASK_EAST?3:e[1],(d-=s)<1&&(d+=4),(v-=s)<1&&(v+=4),v=mxEdgeStyle.routePatterns[d-1][v-1],mxEdgeStyle.wayPoints1[0][0]=a[0][0],mxEdgeStyle.wayPoints1[0][1]=a[0][1],e[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=o,mxEdgeStyle.wayPoints1[0][1]+=t[0][1]*a[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=t[0][0]*a[0][2],mxEdgeStyle.wayPoints1[0][1]+=a[0][3]+o;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=a[0][2]+o,mxEdgeStyle.wayPoints1[0][1]+=t[0][1]*a[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=t[0][0]*a[0][2],mxEdgeStyle.wayPoints1[0][1]-=o}for(r=n=(o=0)<(e[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?0:1,d=l=0;d<v.length;d++){g=(l=15&v[d])==mxConstants.DIRECTION_MASK_EAST?3:l,4<(g+=s)&&(g-=4),c=mxEdgeStyle.dirVectors[g-1],(l=0<g%2?0:1)!=n&&(o++,mxEdgeStyle.wayPoints1[o][0]=mxEdgeStyle.wayPoints1[o-1][0],mxEdgeStyle.wayPoints1[o][1]=mxEdgeStyle.wayPoints1[o-1][1]);var h=0<(v[d]&mxEdgeStyle.TARGET_MASK);p=0<(v[d]&mxEdgeStyle.SOURCE_MASK);15<(m=(m=(v[d]&mxEdgeStyle.SIDE_MASK)>>5)<<s)&&(m>>=4),u=0<(v[d]&mxEdgeStyle.CENTER_MASK),(p||h)&&m<9?(g=0,p=p?0:1,g=u&&0==l?a[p][0]+t[p][0]*a[p][2]:u?a[p][1]+t[p][1]*a[p][3]:mxEdgeStyle.limits[p][m],0==l?0<(m=(g-mxEdgeStyle.wayPoints1[o][0])*c[0])&&(mxEdgeStyle.wayPoints1[o][0]+=c[0]*m):0<(m=(g-mxEdgeStyle.wayPoints1[o][1])*c[1])&&(mxEdgeStyle.wayPoints1[o][1]+=c[1]*m)):u&&(mxEdgeStyle.wayPoints1[o][0]+=c[0]*Math.abs(mxEdgeStyle.vertexSeperations[g]/2),mxEdgeStyle.wayPoints1[o][1]+=c[1]*Math.abs(mxEdgeStyle.vertexSeperations[g]/2)),0<o&&mxEdgeStyle.wayPoints1[o][l]==mxEdgeStyle.wayPoints1[o-1][l]?o--:n=l}for(d=0;d<=o&&(d!=o||((0<(e[1]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?0:1)==r?0:1)==(o+1)%2);d++)i.push(new mxPoint(mxEdgeStyle.wayPoints1[d][0],mxEdgeStyle.wayPoints1[d][1]))}},getRoutePattern:function(e,t,n,a){var i=e[0]==mxConstants.DIRECTION_MASK_EAST?3:e[0];return e=e[1]==mxConstants.DIRECTION_MASK_EAST?3:e[1],(i-=t)<1&&(i+=4),(e-=t)<1&&(e+=4),t=routePatterns[i-1][e-1],0!=n&&0!=a||null!=inlineRoutePatterns[i-1][e-1]&&(t=inlineRoutePatterns[i-1][e-1]),t}},mxStyleRegistry={values:[],putValue:function(e,t){mxStyleRegistry.values[e]=t},getValue:function(e){return mxStyleRegistry.values[e]},getName:function(e){for(var t in mxStyleRegistry.values)if(mxStyleRegistry.values[t]==e)return t;return null}};function mxGraphView(e){this.graph=e,this.translate=new mxPoint,this.graphBounds=new mxRectangle,this.states=new mxDictionary}function mxCurrentRootChange(e,t){if(this.view=e,this.previous=this.root=t,this.isUp=null==t,!this.isUp)for(var n=this.view.currentRoot,a=this.view.graph.getModel();null!=n;){if(n==t){this.isUp=!0;break}n=a.getParent(n)}}function mxGraph(e,t,n,a){this.mouseListeners=null,this.renderHint=n,this.dialect=mxClient.IS_SVG?mxConstants.DIALECT_SVG:n==mxConstants.RENDERING_HINT_EXACT&&mxClient.IS_VML?mxConstants.DIALECT_VML:n==mxConstants.RENDERING_HINT_FASTEST?mxConstants.DIALECT_STRICTHTML:n==mxConstants.RENDERING_HINT_FASTER?mxConstants.DIALECT_PREFERHTML:mxConstants.DIALECT_MIXEDHTML,this.model=null!=t?t:new mxGraphModel,this.multiplicities=[],this.imageBundles=[],this.cellRenderer=this.createCellRenderer(),this.setSelectionModel(this.createSelectionModel()),this.setStylesheet(null!=a?a:this.createStylesheet()),this.view=this.createGraphView(),this.graphModelChangeListener=mxUtils.bind(this,function(e,t){this.graphModelChanged(t.getProperty("edit").changes)}),this.model.addListener(mxEvent.CHANGE,this.graphModelChangeListener),this.createHandlers(),null!=e&&this.init(e),this.view.revalidate()}function mxCellOverlay(e,t,n,a,i,o){this.image=e,this.tooltip=t,this.align=null!=n?n:this.align,this.verticalAlign=null!=a?a:this.verticalAlign,this.offset=null!=i?i:new mxPoint,this.cursor=null!=o?o:"help"}function mxOutline(e,t){this.source=e,null!=t&&this.init(t)}function mxMultiplicity(e,t,n,a,i,o,s,r,l,d){this.source=e,this.type=t,this.attr=n,this.value=a,this.min=null!=i?i:0,this.max=null!=o?o:"n",this.validNeighbors=s,this.countError=mxResources.get(r)||r,this.typeError=mxResources.get(l)||l,this.validNeighborsAllowed=null==d||d}function mxLayoutManager(e){this.undoHandler=mxUtils.bind(this,function(e,t){this.isEnabled()&&this.beforeUndo(t.getProperty("edit"))}),this.moveHandler=mxUtils.bind(this,function(e,t){this.isEnabled()&&this.cellsMoved(t.getProperty("cells"),t.getProperty("event"))}),this.setGraph(e)}function mxSpaceManager(e,t,n,a){this.resizeHandler=mxUtils.bind(this,function(e,t){this.isEnabled()&&this.cellsResized(t.getProperty("cells"))}),this.foldHandler=mxUtils.bind(this,function(e,t){this.isEnabled()&&this.cellsResized(t.getProperty("cells"))}),this.shiftRightwards=null==t||t,this.shiftDownwards=null==n||n,this.extendParents=null==a||a,this.setGraph(e)}function mxSwimlaneManager(e,t,n,a){this.horizontal=null==t||t,this.addEnabled=null==n||n,this.resizeEnabled=null==a||a,this.addHandler=mxUtils.bind(this,function(e,t){this.isEnabled()&&this.isAddEnabled()&&this.cellsAdded(t.getProperty("cells"))}),this.resizeHandler=mxUtils.bind(this,function(e,t){this.isEnabled()&&this.isResizeEnabled()&&this.cellsResized(t.getProperty("cells"))}),this.setGraph(e)}function mxTemporaryCellStates(e,t,n){if(this.view=e,t=null!=t?t:1,this.oldBounds=e.getGraphBounds(),this.oldStates=e.getStates(),this.oldScale=e.getScale(),e.setStates(new mxDictionary),e.setScale(t),null!=n){t=e.createState(new mxCell);for(var a=0;a<n.length;a++)e.validateBounds(t,n[a]);var i=null;for(a=0;a<n.length;a++){var o=e.validatePoints(t,n[a]);null==i?i=o:i.add(o)}null==i&&(i=new mxRectangle),e.setGraphBounds(i)}}function mxCellStatePreview(e){this.graph=e,this.deltas={}}function mxConnectionConstraint(e,t){this.point=e,this.perimeter=null==t||t}function mxGraphHandler(e){this.graph=e,this.graph.addMouseListener(this),this.panHandler=mxUtils.bind(this,function(){this.updatePreviewShape()}),this.graph.addListener(mxEvent.PAN,this.panHandler)}function mxPanningHandler(e,t){null!=e&&(this.graph=e,this.factoryMethod=t,this.graph.addMouseListener(this),this.init())}function mxCellMarker(e,t,n,a){mxEventSource.call(this),null!=e&&(this.graph=e,this.validColor=null!=t?t:mxConstants.DEFAULT_VALID_COLOR,this.invalidColor=null!=t?n:mxConstants.DEFAULT_INVALID_COLOR,this.hotspot=null!=a?a:mxConstants.DEFAULT_HOTSPOT,this.highlight=new mxCellHighlight(e))}function mxSelectionCellsHandler(e){mxEventSource.call(this),this.graph=e,this.handlers=new mxDictionary,this.graph.addMouseListener(this),this.refreshHandler=mxUtils.bind(this,function(e,t){this.isEnabled()&&this.refresh()}),this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.refreshHandler),this.graph.getModel().addListener(mxEvent.CHANGE,this.refreshHandler),this.graph.getView().addListener(mxEvent.SCALE,this.refreshHandler),this.graph.getView().addListener(mxEvent.TRANSLATE,this.refreshHandler),this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.refreshHandler),this.graph.getView().addListener(mxEvent.DOWN,this.refreshHandler),this.graph.getView().addListener(mxEvent.UP,this.refreshHandler)}function mxConnectionHandler(e,t){mxEventSource.call(this),null!=e&&(this.graph=e,this.factoryMethod=t,this.init())}function mxConstraintHandler(e){this.graph=e}function mxRubberband(e){null!=e&&(this.graph=e,this.graph.addMouseListener(this),this.panHandler=mxUtils.bind(this,function(){this.repaint()}),this.graph.addListener(mxEvent.PAN,this.panHandler),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})))}function mxVertexHandler(e){null!=e&&(this.state=e,this.init())}function mxEdgeHandler(e){null!=e&&(this.state=e,this.init())}function mxElbowEdgeHandler(e){mxEdgeHandler.call(this,e)}function mxEdgeSegmentHandler(e){mxEdgeHandler.call(this,e)}function mxKeyHandler(e,t){null!=e&&(this.graph=e,this.target=t||document.documentElement,this.normalKeys=[],this.shiftKeys=[],this.controlKeys=[],this.controlShiftKeys=[],mxEvent.addListener(this.target,"keydown",mxUtils.bind(this,function(e){this.keyDown(e)})),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})))}function mxTooltipHandler(e,t){null!=e&&(this.graph=e,this.delay=t||500,this.graph.addMouseListener(this))}function mxCellTracker(e,t,n){mxCellMarker.call(this,e,t),this.graph.addMouseListener(this),null!=n&&(this.getCell=n),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()}))}function mxCellHighlight(e,t,n,a){null!=e&&(this.graph=e,this.highlightColor=null!=t?t:mxConstants.DEFAULT_VALID_COLOR,this.strokeWidth=null!=n?n:mxConstants.HIGHLIGHT_STROKEWIDTH,this.dashed=null!=a&&a,this.repaintHandler=mxUtils.bind(this,function(){this.repaint()}),this.graph.getView().addListener(mxEvent.SCALE,this.repaintHandler),this.graph.getView().addListener(mxEvent.TRANSLATE,this.repaintHandler),this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler),this.graph.getModel().addListener(mxEvent.CHANGE,this.repaintHandler),this.resetHandler=mxUtils.bind(this,function(){this.hide()}),this.graph.getView().addListener(mxEvent.DOWN,this.resetHandler),this.graph.getView().addListener(mxEvent.UP,this.resetHandler))}function mxDefaultKeyHandler(t){if(null!=t){this.editor=t,this.handler=new mxKeyHandler(t.graph);var n=this.handler.escape;this.handler.escape=function(e){n.apply(this,arguments),t.hideProperties(),t.fireEvent(new mxEventObject(mxEvent.ESCAPE,"event",e))}}}function mxDefaultPopupMenu(e){this.config=e}function mxDefaultToolbar(e,t){this.editor=t,null!=e&&null!=t&&this.init(e)}function mxEditor(e){this.actions=[],this.addActions(),null!=document.body&&(this.cycleAttributeValues=[],this.popupHandler=new mxDefaultPopupMenu,this.undoManager=new mxUndoManager,this.graph=this.createGraph(),this.toolbar=this.createToolbar(),this.keyHandler=new mxDefaultKeyHandler(this),this.configure(e),this.graph.swimlaneIndicatorColorAttribute=this.cycleAttributeName,!mxClient.IS_LOCAL&&null!=this.urlInit&&(this.session=this.createSession()),null!=this.onInit&&this.onInit(),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})))}mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector),mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation),mxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop),mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide),mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom),mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector),mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector),mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter),mxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter),mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter),mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter),mxGraphView.prototype=new mxEventSource,mxGraphView.prototype.constructor=mxGraphView,mxGraphView.prototype.EMPTY_POINT=new mxPoint,mxGraphView.prototype.doneResource="none"!=mxClient.language?"done":"",mxGraphView.prototype.updatingDocumentResource="none"!=mxClient.language?"updatingDocument":"",mxGraphView.prototype.allowEval=!1,mxGraphView.prototype.captureDocumentGesture=!0,mxGraphView.prototype.optimizeVmlReflows=!0,mxGraphView.prototype.rendering=!0,mxGraphView.prototype.graph=null,mxGraphView.prototype.currentRoot=null,mxGraphView.prototype.graphBounds=null,mxGraphView.prototype.scale=1,mxGraphView.prototype.translate=null,mxGraphView.prototype.updateStyle=!1,mxGraphView.prototype.getGraphBounds=function(){return this.graphBounds},mxGraphView.prototype.setGraphBounds=function(e){this.graphBounds=e},mxGraphView.prototype.getBounds=function(e){var t=null;if(null!=e&&0<e.length)for(var n=this.graph.getModel(),a=0;a<e.length;a++)if(n.isVertex(e[a])||n.isEdge(e[a])){var i=this.getState(e[a]);null!=i&&(null==t?t=new mxRectangle(i.x,i.y,i.width,i.height):t.add(i))}return t},mxGraphView.prototype.setCurrentRoot=function(e){if(this.currentRoot!=e){var t=new mxCurrentRootChange(this,e);t.execute();var n=new mxUndoableEdit(this,!1);n.add(t),this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",n)),this.graph.sizeDidChange()}return e},mxGraphView.prototype.scaleAndTranslate=function(e,t,n){var a=this.scale,i=new mxPoint(this.translate.x,this.translate.y);this.scale==e&&this.translate.x==t&&this.translate.y==n||(this.scale=e,this.translate.x=t,this.translate.y=n,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange())),this.fireEvent(new mxEventObject(mxEvent.SCALE_AND_TRANSLATE,"scale",e,"previousScale",a,"translate",this.translate,"previousTranslate",i))},mxGraphView.prototype.getScale=function(){return this.scale},mxGraphView.prototype.setScale=function(e){var t=this.scale;this.scale!=e&&(this.scale=e,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange())),this.fireEvent(new mxEventObject(mxEvent.SCALE,"scale",e,"previousScale",t))},mxGraphView.prototype.getTranslate=function(){return this.translate},mxGraphView.prototype.setTranslate=function(e,t){var n=new mxPoint(this.translate.x,this.translate.y);this.translate.x==e&&this.translate.y==t||(this.translate.x=e,this.translate.y=t,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange())),this.fireEvent(new mxEventObject(mxEvent.TRANSLATE,"translate",this.translate,"previousTranslate",n))},mxGraphView.prototype.refresh=function(){null!=this.currentRoot&&this.clear(),this.revalidate()},mxGraphView.prototype.revalidate=function(){this.invalidate(),this.validate()},mxGraphView.prototype.clear=function(e,t,n){var a=this.graph.getModel();if(e=e||a.getRoot(),t=null!=t&&t,n=null==n||n,this.removeState(e),n&&(t||e!=this.currentRoot)){n=a.getChildCount(e);for(var i=0;i<n;i++)this.clear(a.getChildAt(e,i),t)}else this.invalidate(e)},mxGraphView.prototype.invalidate=function(e,t,n,a){var i=this.graph.getModel();if(e=e||i.getRoot(),t=null==t||t,n=null==n||n,a=null!=a&&a,null!=(s=this.getState(e))&&(s.invalid=!0,a&&(s.orderChanged=!0)),t)for(var o=i.getChildCount(e),s=0;s<o;s++){var r=i.getChildAt(e,s);this.invalidate(r,t,n,a)}if(n)for(a=i.getEdgeCount(e),s=0;s<a;s++)this.invalidate(i.getEdgeAt(e,s),t,n)},mxGraphView.prototype.validate=function(e){var t=mxLog.enter("mxGraphView.validate");window.status=mxResources.get(this.updatingDocumentResource)||this.updatingDocumentResource;var n=null;if(this.optimizeVmlReflows&&null!=this.canvas&&null==this.textDiv&&(8==document.documentMode||mxClient.IS_QUIRKS)){n=this.canvas.style.display,this.canvas.style.display="none";var a=document.createElement("div");a.style.position="absolute",a.style.whiteSpace="nowrap",a.style.visibility="hidden",a.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",a.style.zoom="1",document.body.appendChild(a),this.textDiv=a}e=e||(null!=this.currentRoot?this.currentRoot:this.graph.getModel().getRoot()),this.validateBounds(null,e),null==(e=this.validatePoints(null,e))&&(e=new mxRectangle),this.setGraphBounds(e),this.validateBackground(),null!=n&&(this.canvas.style.display=n,document.body.removeChild(this.textDiv),this.textDiv=null),window.status=mxResources.get(this.doneResource)||this.doneResource,mxLog.leave("mxGraphView.validate",t)},mxGraphView.prototype.createBackgroundPageShape=function(e){return new mxRectangleShape(e,"white","black")},mxGraphView.prototype.validateBackground=function(){var e=this.graph.getBackgroundImage();if(null!=e){if(null==this.backgroundImage||this.backgroundImage.image!=e.src){null!=this.backgroundImage&&this.backgroundImage.destroy();var t=new mxRectangle(0,0,1,1);this.backgroundImage=new mxImageShape(t,e.src),this.backgroundImage.dialect=this.graph.dialect,this.backgroundImage.init(this.backgroundPane),this.backgroundImage.redraw()}this.redrawBackgroundImage(this.backgroundImage,e)}else null!=this.backgroundImage&&(this.backgroundImage.destroy(),this.backgroundImage=null);this.graph.pageVisible?(t=this.getBackgroundPageBounds(),null==this.backgroundPageShape?(this.backgroundPageShape=this.createBackgroundPageShape(t),this.backgroundPageShape.scale=this.scale,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=this.graph.dialect,this.backgroundPageShape.init(this.backgroundPane),this.backgroundPageShape.redraw(),mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(e){this.graph.dblClick(e)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(e){this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e))}),mxUtils.bind(this,function(e){null!=this.graph.tooltipHandler&&this.graph.tooltipHandler.isHideOnHover()&&this.graph.tooltipHandler.hide(),this.graph.isMouseDown&&!mxEvent.isConsumed(e)&&this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e))}),mxUtils.bind(this,function(e){this.graph.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e))}))):(this.backgroundPageShape.scale=this.scale,this.backgroundPageShape.bounds=t,this.backgroundPageShape.redraw())):null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null)},mxGraphView.prototype.getBackgroundPageBounds=function(){var e=this.graph.pageFormat,t=this.scale*this.graph.pageScale;return new mxRectangle(this.scale*this.translate.x,this.scale*this.translate.y,e.width*t,e.height*t)},mxGraphView.prototype.redrawBackgroundImage=function(e,t){e.scale=this.scale,e.bounds.x=this.scale*this.translate.x,e.bounds.y=this.scale*this.translate.y,e.bounds.width=this.scale*t.width,e.bounds.height=this.scale*t.height,e.redraw()},mxGraphView.prototype.validateBounds=function(e,t){var n=this.graph.getModel(),a=this.getState(t,!0);if(null!=a&&a.invalid){if(this.graph.isCellVisible(t)){if(t!=this.currentRoot&&null!=e)if(a.absoluteOffset.x=0,a.absoluteOffset.y=0,a.origin.x=e.origin.x,a.origin.y=e.origin.y,null!=(o=this.graph.getCellGeometry(t))){if(!n.isEdge(t)){var i=o.offset||this.EMPTY_POINT;o.relative?(a.origin.x+=o.x*e.width/this.scale+i.x,a.origin.y+=o.y*e.height/this.scale+i.y):(a.absoluteOffset.x=this.scale*i.x,a.absoluteOffset.y=this.scale*i.y,a.origin.x+=o.x,a.origin.y+=o.y)}if(a.x=this.scale*(this.translate.x+a.origin.x),a.y=this.scale*(this.translate.y+a.origin.y),a.width=this.scale*o.width,a.height=this.scale*o.height,n.isVertex(t)){if(o.relative&&0!=(i=mxUtils.toRadians(e.style[mxConstants.STYLE_ROTATION]||"0"))){var o=Math.cos(i),s=(i=Math.sin(i),new mxPoint(a.getCenterX(),a.getCenterY())),r=new mxPoint(e.getCenterX(),e.getCenterY());o=mxUtils.getRotatedPoint(s,o,i,r);a.x=o.x-a.width/2,a.y=o.y-a.height/2}this.updateVertexLabelOffset(a)}}}else this.removeState(t);null!=(i=this.graph.getChildOffsetForCell(t))&&(a.origin.x+=i.x,a.origin.y+=i.y)}if(null!=a&&(!this.graph.isCellCollapsed(t)||t==this.currentRoot))for(o=n.getChildCount(t),i=0;i<o;i++)s=n.getChildAt(t,i),this.validateBounds(a,s)},mxGraphView.prototype.updateVertexLabelOffset=function(e){var t=mxUtils.getValue(e.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);t==mxConstants.ALIGN_LEFT?e.absoluteOffset.x-=e.width:t==mxConstants.ALIGN_RIGHT&&(e.absoluteOffset.x+=e.width),(t=mxUtils.getValue(e.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE))==mxConstants.ALIGN_TOP?e.absoluteOffset.y-=e.height:t==mxConstants.ALIGN_BOTTOM&&(e.absoluteOffset.y+=e.height)},mxGraphView.prototype.validatePoints=function(e,t){var n=this.graph.getModel(),a=this.getState(t),i=null;if(null!=a){if(a.invalid){var o=this.graph.getCellGeometry(t);if(null!=o&&n.isEdge(t)){var s=this.getState(this.getVisibleTerminal(t,!0));if(a.setVisibleTerminalState(s,!0),null!=s&&n.isEdge(s.cell)&&!n.isAncestor(s.cell,t)){var r=this.getState(n.getParent(s.cell));this.validatePoints(r,s.cell)}var l=this.getState(this.getVisibleTerminal(t,!1));a.setVisibleTerminalState(l,!1),null!=l&&n.isEdge(l.cell)&&!n.isAncestor(l.cell,t)&&(r=this.getState(n.getParent(l.cell)),this.validatePoints(r,l.cell)),this.updateFixedTerminalPoints(a,s,l),this.updatePoints(a,o.points,s,l),this.updateFloatingTerminalPoints(a,s,l),this.updateEdgeBounds(a),this.updateEdgeLabelOffset(a)}else null!=o&&o.relative&&null!=e&&n.isEdge(e.cell)&&(null!=(o=this.getPoint(e,o))&&(a.x=o.x,a.y=o.y,o.x=o.x/this.scale-this.translate.x,o.y=o.y/this.scale-this.translate.y,a.origin=o,this.childMoved(e,a)));a.invalid=!1,t!=this.currentRoot&&this.graph.cellRenderer.redraw(a,!1,this.isRendering())}(n.isEdge(t)||n.isVertex(t))&&(null!=a.shape&&null!=a.shape.boundingBox&&(i=a.shape.boundingBox.clone()),null!=a.text&&!this.graph.isLabelClipped(a.cell)&&null!=a.text.boundingBox&&(null!=i?i.add(a.text.boundingBox):i=a.text.boundingBox.clone()))}if(null!=a&&(!this.graph.isCellCollapsed(t)||t==this.currentRoot))for(o=n.getChildCount(t),s=0;s<o;s++)r=n.getChildAt(t,s),null!=(r=this.validatePoints(a,r))&&(null==i?i=r:i.add(r));return i},mxGraphView.prototype.childMoved=function(e,t){var n=t.cell;if(!this.graph.isCellCollapsed(n)||n==this.currentRoot)for(var a=this.graph.getModel(),i=a.getChildCount(n),o=0;o<i;o++)this.validateBounds(t,a.getChildAt(n,o))},mxGraphView.prototype.updateFixedTerminalPoints=function(e,t,n){this.updateFixedTerminalPoint(e,t,!0,this.graph.getConnectionConstraint(e,t,!0)),this.updateFixedTerminalPoint(e,n,!1,this.graph.getConnectionConstraint(e,n,!1))},mxGraphView.prototype.updateFixedTerminalPoint=function(e,t,n,a){var i=null;if(null!=a&&(i=this.graph.getConnectionPoint(t,a)),null==i&&null==t){t=this.scale,a=this.translate;var o=e.origin;null!=(i=this.graph.getCellGeometry(e.cell).getTerminalPoint(n))&&(i=new mxPoint(t*(a.x+i.x+o.x),t*(a.y+i.y+o.y)))}e.setAbsoluteTerminalPoint(i,n)},mxGraphView.prototype.updatePoints=function(e,t,n,a){if(null!=e){var i=[];i.push(e.absolutePoints[0]);var o=this.getEdgeStyle(e,t,n,a);if(null!=o)o(e,n=this.getTerminalPort(e,n,!0),a=this.getTerminalPort(e,a,!1),t,i);else if(null!=t)for(o=0;o<t.length;o++)null!=t[o]&&(a=mxUtils.clone(t[o]),i.push(this.transformControlPoint(e,a)));t=e.absolutePoints,i.push(t[t.length-1]),e.absolutePoints=i}},mxGraphView.prototype.transformControlPoint=function(e,t){var n=e.origin;return new mxPoint(this.scale*(t.x+this.translate.x+n.x),this.scale*(t.y+this.translate.y+n.y))},mxGraphView.prototype.getEdgeStyle=function(e,t,n,a){return"string"==typeof(e=null!=n&&n==a?mxUtils.getValue(e.style,mxConstants.STYLE_LOOP,this.graph.defaultLoopStyle):mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,!1)?null:e.style[mxConstants.STYLE_EDGE])&&(null==(t=mxStyleRegistry.getValue(e))&&this.isAllowEval()&&(t=mxUtils.eval(e)),e=t),"function"==typeof e?e:null},mxGraphView.prototype.updateFloatingTerminalPoints=function(e,t,n){var a=e.absolutePoints,i=a[0];null==a[a.length-1]&&null!=n&&this.updateFloatingTerminalPoint(e,n,t,!1),null==i&&null!=t&&this.updateFloatingTerminalPoint(e,t,n,!0)},mxGraphView.prototype.updateFloatingTerminalPoint=function(e,t,n,a){t=this.getTerminalPort(e,t,a);var i=this.getNextPoint(e,n,a),o=this.graph.isOrthogonal(e);n=mxUtils.toRadians(Number(t.style[mxConstants.STYLE_ROTATION]||"0"));var s=new mxPoint(t.getCenterX(),t.getCenterY());if(0!=n){var r=Math.cos(-n),l=Math.sin(-n);i=mxUtils.getRotatedPoint(i,r,l,s)}r=parseFloat(e.style[mxConstants.STYLE_PERIMETER_SPACING]||0),r+=parseFloat(e.style[a?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0),t=this.getPerimeterPoint(t,i,0==n&&o,r),0!=n&&(r=Math.cos(n),l=Math.sin(n),t=mxUtils.getRotatedPoint(t,r,l,s)),e.setAbsoluteTerminalPoint(t,a)},mxGraphView.prototype.getTerminalPort=function(e,t,n){return null!=(e=mxUtils.getValue(e.style,n?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT))&&(null!=(e=this.getState(this.graph.getModel().getCell(e)))&&(t=e)),t},mxGraphView.prototype.getPerimeterPoint=function(e,t,n,a){var i=null;if(null!=e){var o=this.getPerimeterFunction(e);null!=o&&null!=t&&(0<(a=this.getPerimeterBounds(e,a)).width||0<a.height)&&(i=o(a,e,t,n)),null==i&&(i=this.getPoint(e))}return i},mxGraphView.prototype.getRoutingCenterX=function(e){var t=null!=e.style&&parseFloat(e.style[mxConstants.STYLE_ROUTING_CENTER_X])||0;return e.getCenterX()+t*e.width},mxGraphView.prototype.getRoutingCenterY=function(e){var t=null!=e.style&&parseFloat(e.style[mxConstants.STYLE_ROUTING_CENTER_Y])||0;return e.getCenterY()+t*e.height},mxGraphView.prototype.getPerimeterBounds=function(e,t){return t=null!=t?t:0,null!=e&&(t+=parseFloat(e.style[mxConstants.STYLE_PERIMETER_SPACING]||0)),e.getPerimeterBounds(t*this.scale)},mxGraphView.prototype.getPerimeterFunction=function(e){if("string"==typeof(e=e.style[mxConstants.STYLE_PERIMETER])){var t=mxStyleRegistry.getValue(e);null==t&&this.isAllowEval()&&(t=mxUtils.eval(e)),e=t}return"function"==typeof e?e:null},mxGraphView.prototype.getNextPoint=function(e,t,n){var a=null;return null!=(e=e.absolutePoints)&&(n||2<e.length||null==t)&&(a=e.length,a=e[n?Math.min(1,a-1):Math.max(0,a-2)]),null==a&&null!=t&&(a=new mxPoint(t.getCenterX(),t.getCenterY())),a},mxGraphView.prototype.getVisibleTerminal=function(e,t){for(var n=this.graph.getModel(),a=n.getTerminal(e,t),i=a;null!=a&&a!=this.currentRoot;)this.graph.isCellVisible(i)&&!this.graph.isCellCollapsed(a)||(i=a),a=n.getParent(a);return n.getParent(i)==n.getRoot()&&(i=null),i},mxGraphView.prototype.updateEdgeBounds=function(e){var t=e.absolutePoints;if(e.length=0,null!=t&&0<t.length){var n=t[0],a=t[t.length-1];if(null==n||null==a)e.cell!=this.currentRoot&&this.clear(e.cell,!0);else{if(n.x!=a.x||n.y!=a.y){var i=a.x-n.x,o=a.y-n.y;e.terminalDistance=Math.sqrt(i*i+o*o)}else e.terminalDistance=0;a=0;var s=[];if(null!=(o=n)){n=o.x;for(var r=o.y,l=n,d=r,c=1;c<t.length;c++){var m=t[c];null!=m&&(i=o.x-m.x,o=o.y-m.y,i=Math.sqrt(i*i+o*o),s.push(i),a+=i,o=m,n=Math.min(o.x,n),r=Math.min(o.y,r),l=Math.max(o.x,l),d=Math.max(o.y,d))}e.length=a,e.segments=s,e.x=n,e.y=r,e.width=Math.max(1,l-n),e.height=Math.max(1,d-r)}}}},mxGraphView.prototype.getPoint=function(e,t){var n=e.getCenterX(),a=e.getCenterY();if(null==e.segments||null!=t&&!t.relative)null!=t&&(null!=(d=t.offset)&&(n+=d.x,a+=d.y));else{for(var i=e.absolutePoints.length,o=(.5+(null!=t?t.x/2:0))*e.length,s=e.segments[0],r=0,l=1;r+s<o&&l<i-1;)r+=s,s=e.segments[l++];if(i=0==s?0:(o-r)/s,o=e.absolutePoints[l-1],l=e.absolutePoints[l],null!=o&&null!=l){if(r=n=a=0,null!=t){a=t.y;var d=t.offset;null!=d&&(n=d.x,r=d.y)}d=l.x-o.x,l=l.y-o.y,n=o.x+d*i+((0==s?0:l/s)*a+n)*this.scale,a=o.y+l*i-((0==s?0:d/s)*a-r)*this.scale}}return new mxPoint(n,a)},mxGraphView.prototype.getRelativePoint=function(e,t,n){if(null!=(i=this.graph.getModel().getGeometry(e.cell))){var a=e.absolutePoints.length;if(i.relative&&1<a){for(var i=e.length,o=e.segments,s=e.absolutePoints[0],r=e.absolutePoints[1],l=mxUtils.ptSegDistSq(s.x,s.y,r.x,r.y,t,n),d=0,c=0,m=0,u=2;u<a;u++)c+=o[u-2],r=e.absolutePoints[u],(s=mxUtils.ptSegDistSq(s.x,s.y,r.x,r.y,t,n))<=l&&(l=s,d=u-1,m=c),s=r;return a=o[d],s=e.absolutePoints[d],l=(r=e.absolutePoints[d+1]).x,o=r.y,o=(l=(e=s.x-l)-(l=t-l))*e+(o=(d=s.y-o)-(o=n-o))*d,a<(e=Math.sqrt(o<=0?0:o*o/(e*e+d*d)))&&(e=a),a=Math.sqrt(mxUtils.ptSegDistSq(s.x,s.y,r.x,r.y,t,n)),-1==mxUtils.relativeCcw(s.x,s.y,r.x,r.y,t,n)&&(a=-a),new mxPoint((i/2-m-e)/i*-2,a/this.scale)}}return new mxPoint},mxGraphView.prototype.updateEdgeLabelOffset=function(e){var t=e.absolutePoints;if(e.absoluteOffset.x=e.getCenterX(),e.absoluteOffset.y=e.getCenterY(),null!=t&&0<t.length&&null!=e.segments)if((i=this.graph.getCellGeometry(e.cell)).relative){null!=(n=this.getPoint(e,i))&&(e.absoluteOffset=n)}else{var n=t[0],a=t[t.length-1];if(null!=n&&null!=a){t=a.x-n.x;var i,o=a.y-n.y,s=a=0;null!=(i=i.offset)&&(a=i.x,s=i.y),i=n.y+o/2+s*this.scale,e.absoluteOffset.x=n.x+t/2+a*this.scale,e.absoluteOffset.y=i}}},mxGraphView.prototype.getState=function(e,t){t=t||!1;var n=null;return null!=e&&(n=this.states.get(e),this.graph.isCellVisible(e)&&(null==n&&t&&this.graph.isCellVisible(e)?(n=this.createState(e),this.states.put(e,n)):t&&null!=n&&this.updateStyle&&(n.style=this.graph.getCellStyle(e)))),n},mxGraphView.prototype.isRendering=function(){return this.rendering},mxGraphView.prototype.setRendering=function(e){this.rendering=e},mxGraphView.prototype.isAllowEval=function(){return this.allowEval},mxGraphView.prototype.setAllowEval=function(e){this.allowEval=e},mxGraphView.prototype.getStates=function(){return this.states},mxGraphView.prototype.setStates=function(e){this.states=e},mxGraphView.prototype.getCellStates=function(e){if(null==e)return this.states;for(var t=[],n=0;n<e.length;n++){var a=this.getState(e[n]);null!=a&&t.push(a)}return t},mxGraphView.prototype.removeState=function(e){var t=null;return null!=e&&(null!=(t=this.states.remove(e))&&(this.graph.cellRenderer.destroy(t),t.destroy())),t},mxGraphView.prototype.createState=function(e){return e=new mxCellState(this,e,this.graph.getCellStyle(e)),this.graph.cellRenderer.initialize(e,this.isRendering()),e},mxGraphView.prototype.getCanvas=function(){return this.canvas},mxGraphView.prototype.getBackgroundPane=function(){return this.backgroundPane},mxGraphView.prototype.getDrawPane=function(){return this.drawPane},mxGraphView.prototype.getOverlayPane=function(){return this.overlayPane},mxGraphView.prototype.isContainerEvent=function(e){return(e=mxEvent.getSource(e))==this.graph.container||e.parentNode==this.backgroundPane||null!=e.parentNode&&e.parentNode.parentNode==this.backgroundPane||e==this.canvas.parentNode||e==this.canvas||e==this.backgroundPane||e==this.drawPane||e==this.overlayPane},mxGraphView.prototype.isScrollEvent=function(e){var t=mxUtils.getOffset(this.graph.container);e=new mxPoint(e.clientX-t.x,e.clientY-t.y);t=this.graph.container.offsetWidth;var n=this.graph.container.clientWidth;return n<t&&e.x>n+2&&e.x<=t||(t=this.graph.container.offsetHeight,(n=this.graph.container.clientHeight)<t&&e.y>n+2&&e.y<=t)},mxGraphView.prototype.init=function(){this.installListeners();var e=this.graph;e.dialect==mxConstants.DIALECT_SVG?this.createSvg():e.dialect==mxConstants.DIALECT_VML?this.createVml():this.createHtml()},mxGraphView.prototype.installListeners=function(){var a=this.graph,i=a.container;if(null!=i){mxEvent.addGestureListeners(i,mxUtils.bind(this,function(e){mxClient.IS_TOUCH&&a.isEditing()&&a.stopEditing(!a.isInvokesStopCellEditing()),this.isContainerEvent(e)&&(!mxClient.IS_IE&&!mxClient.IS_GC&&!mxClient.IS_OP&&!mxClient.IS_SF||!this.isScrollEvent(e))&&a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e))}),mxUtils.bind(this,function(e){this.isContainerEvent(e)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e))}),mxUtils.bind(this,function(e){this.isContainerEvent(e)&&a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e))})),mxEvent.addListener(i,"dblclick",mxUtils.bind(this,function(e){a.dblClick(e)}));a.addMouseListener({mouseDown:function(e,t){a.panningHandler.hideMenu()},mouseMove:function(){},mouseUp:function(){}}),this.moveHandler=mxUtils.bind(this,function(e){var t,n;null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide(),this.captureDocumentGesture&&a.isMouseDown&&!mxEvent.isConsumed(e)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,(t=e,n=null,mxClient.IS_TOUCH&&(n=mxEvent.getClientX(t),t=mxEvent.getClientY(t),t=mxUtils.convertPoint(i,n,t),n=a.view.getState(a.getCellAt(t.x,t.y))),n)))}),this.endHandler=mxUtils.bind(this,function(e){this.captureDocumentGesture&&a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e))}),mxEvent.addGestureListeners(document,null,this.moveHandler,this.endHandler)}},mxGraphView.prototype.createHtml=function(){var e=this.graph.container;null!=e&&(this.canvas=this.createHtmlPane("100%","100%"),this.backgroundPane=this.createHtmlPane("1px","1px"),this.drawPane=this.createHtmlPane("1px","1px"),this.overlayPane=this.createHtmlPane("1px","1px"),this.canvas.appendChild(this.backgroundPane),this.canvas.appendChild(this.drawPane),this.canvas.appendChild(this.overlayPane),e.appendChild(this.canvas),mxClient.IS_QUIRKS&&(e=mxUtils.bind(this,function(e){e=this.getGraphBounds(),this.updateHtmlCanvasSize(e.x+e.width+this.graph.border,e.y+e.height+this.graph.border)}),mxEvent.addListener(window,"resize",e)))},mxGraphView.prototype.updateHtmlCanvasSize=function(e,t){if(null!=this.graph.container){var n=this.graph.container.offsetHeight;this.canvas.style.width=this.graph.container.offsetWidth<e?e+"px":"100%",this.canvas.style.height=n<t?t+"px":"100%"}},mxGraphView.prototype.createHtmlPane=function(e,t){var n=document.createElement("DIV");return null!=e&&null!=t?(n.style.position="absolute",n.style.left="0px",n.style.top="0px",n.style.width=e,n.style.height=t):n.style.position="relative",n},mxGraphView.prototype.createVml=function(){var e=this.graph.container;if(null!=e){var t=e.offsetWidth,n=e.offsetHeight;this.canvas=this.createVmlPane(t,n),this.backgroundPane=this.createVmlPane(t,n),this.drawPane=this.createVmlPane(t,n),this.overlayPane=this.createVmlPane(t,n),this.canvas.appendChild(this.backgroundPane),this.canvas.appendChild(this.drawPane),this.canvas.appendChild(this.overlayPane),e.appendChild(this.canvas)}},mxGraphView.prototype.createVmlPane=function(e,t){var n=document.createElement(mxClient.VML_PREFIX+":group");return n.style.position="absolute",n.style.left="0px",n.style.top="0px",n.style.width=e+"px",n.style.height=t+"px",n.setAttribute("coordsize",e+","+t),n.setAttribute("coordorigin","0,0"),n},mxGraphView.prototype.createSvg=function(){var e=this.graph.container;this.canvas=document.createElementNS(mxConstants.NS_SVG,"g"),this.backgroundPane=document.createElementNS(mxConstants.NS_SVG,"g"),this.canvas.appendChild(this.backgroundPane),this.drawPane=document.createElementNS(mxConstants.NS_SVG,"g"),this.canvas.appendChild(this.drawPane),this.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g"),this.canvas.appendChild(this.overlayPane);var t=document.createElementNS(mxConstants.NS_SVG,"svg");t.style.width="100%",t.style.height="100%",t.style.display="block",t.appendChild(this.canvas),null!=e&&(e.appendChild(t),"static"==mxUtils.getCurrentStyle(e).position&&(e.style.position="relative"))},mxGraphView.prototype.destroy=function(){var e=null!=this.canvas?this.canvas.ownerSVGElement:null;null==e&&(e=this.canvas),null!=e&&null!=e.parentNode&&(this.clear(this.currentRoot,!0),mxEvent.removeGestureListeners(document,null,this.moveHandler,this.endHandler),mxEvent.release(this.graph.container),e.parentNode.removeChild(e),this.overlayPane=this.drawPane=this.backgroundPane=this.canvas=this.endHandler=this.moveHandler=null)},mxCurrentRootChange.prototype.execute=function(){var e=this.view.currentRoot;this.view.currentRoot=this.previous,this.previous=e,null!=(e=this.view.graph.getTranslateForRoot(this.view.currentRoot))&&(this.view.translate=new mxPoint(-e.x,-e.y)),this.view.fireEvent(new mxEventObject(this.isUp?mxEvent.UP:mxEvent.DOWN,"root",this.view.currentRoot,"previous",this.previous)),this.isUp?(this.view.clear(this.view.currentRoot,!0),this.view.validate()):this.view.refresh(),this.isUp=!this.isUp},mxLoadResources&&mxResources.add(mxClient.basePath+"/resources/graph"),mxGraph.prototype=new mxEventSource,mxGraph.prototype.constructor=mxGraph,mxGraph.prototype.EMPTY_ARRAY=[],mxGraph.prototype.mouseListeners=null,mxGraph.prototype.isMouseDown=!1,mxGraph.prototype.model=null,mxGraph.prototype.view=null,mxGraph.prototype.stylesheet=null,mxGraph.prototype.selectionModel=null,mxGraph.prototype.cellEditor=null,mxGraph.prototype.cellRenderer=null,mxGraph.prototype.multiplicities=null,mxGraph.prototype.renderHint=null,mxGraph.prototype.dialect=null,mxGraph.prototype.gridSize=10,mxGraph.prototype.gridEnabled=!0,mxGraph.prototype.portsEnabled=!0,mxGraph.prototype.doubleTapEnabled=!0,mxGraph.prototype.doubleTapTimeout=700,mxGraph.prototype.doubleTapTolerance=25,mxGraph.prototype.lastTouchY=0,mxGraph.prototype.lastTouchY=0,mxGraph.prototype.lastTouchTime=0,mxGraph.prototype.gestureEnabled=!0,mxGraph.prototype.tolerance=4,mxGraph.prototype.defaultOverlap=.5,mxGraph.prototype.defaultParent=null,mxGraph.prototype.alternateEdgeStyle=null,mxGraph.prototype.backgroundImage=null,mxGraph.prototype.pageVisible=!1,mxGraph.prototype.pageBreaksVisible=!1,mxGraph.prototype.pageBreakColor="gray",mxGraph.prototype.pageBreakDashed=!0,mxGraph.prototype.minPageBreakDist=20,mxGraph.prototype.preferPageSize=!1,mxGraph.prototype.pageFormat=mxConstants.PAGE_FORMAT_A4_PORTRAIT,mxGraph.prototype.pageScale=1.5,mxGraph.prototype.enabled=!0,mxGraph.prototype.escapeEnabled=!0,mxGraph.prototype.invokesStopCellEditing=!0,mxGraph.prototype.enterStopsCellEditing=!1,mxGraph.prototype.useScrollbarsForPanning=!0,mxGraph.prototype.exportEnabled=!0,mxGraph.prototype.importEnabled=!0,mxGraph.prototype.cellsLocked=!1,mxGraph.prototype.cellsCloneable=!0,mxGraph.prototype.foldingEnabled=!0,mxGraph.prototype.cellsEditable=!0,mxGraph.prototype.cellsDeletable=!0,mxGraph.prototype.cellsMovable=!0,mxGraph.prototype.edgeLabelsMovable=!0,mxGraph.prototype.vertexLabelsMovable=!1,mxGraph.prototype.dropEnabled=!1,mxGraph.prototype.splitEnabled=!0,mxGraph.prototype.cellsResizable=!0,mxGraph.prototype.cellsBendable=!0,mxGraph.prototype.cellsSelectable=!0,mxGraph.prototype.cellsDisconnectable=!0,mxGraph.prototype.autoSizeCells=!1,mxGraph.prototype.autoScroll=!0,mxGraph.prototype.timerAutoScroll=!1,mxGraph.prototype.allowAutoPanning=!1,mxGraph.prototype.ignoreScrollbars=!1,mxGraph.prototype.autoExtend=!0,mxGraph.prototype.maximumGraphBounds=null,mxGraph.prototype.minimumGraphSize=null,mxGraph.prototype.minimumContainerSize=null,mxGraph.prototype.maximumContainerSize=null,mxGraph.prototype.resizeContainer=!1,mxGraph.prototype.border=0,mxGraph.prototype.ordered=!0,mxGraph.prototype.keepEdgesInForeground=!1,mxGraph.prototype.keepEdgesInBackground=!0,mxGraph.prototype.allowNegativeCoordinates=!0,mxGraph.prototype.constrainChildren=!0,mxGraph.prototype.extendParents=!0,mxGraph.prototype.extendParentsOnAdd=!0,mxGraph.prototype.collapseToPreferredSize=!0,mxGraph.prototype.zoomFactor=1.2,mxGraph.prototype.keepSelectionVisibleOnZoom=!1,mxGraph.prototype.centerZoom=!0,mxGraph.prototype.resetViewOnRootChange=!0,mxGraph.prototype.resetEdgesOnResize=!1,mxGraph.prototype.resetEdgesOnMove=!1,mxGraph.prototype.resetEdgesOnConnect=!0,mxGraph.prototype.allowLoops=!1,mxGraph.prototype.defaultLoopStyle=mxEdgeStyle.Loop,mxGraph.prototype.multigraph=!0,mxGraph.prototype.connectableEdges=!1,mxGraph.prototype.allowDanglingEdges=!0,mxGraph.prototype.cloneInvalidEdges=!1,mxGraph.prototype.disconnectOnMove=!0,mxGraph.prototype.labelsVisible=!0,mxGraph.prototype.htmlLabels=!1,mxGraph.prototype.swimlaneSelectionEnabled=!0,mxGraph.prototype.swimlaneNesting=!0,mxGraph.prototype.swimlaneIndicatorColorAttribute=mxConstants.STYLE_FILLCOLOR,mxGraph.prototype.imageBundles=null,mxGraph.prototype.minFitScale=.1,mxGraph.prototype.maxFitScale=8,mxGraph.prototype.panDx=0,mxGraph.prototype.panDy=0,mxGraph.prototype.collapsedImage=new mxImage(mxClient.imageBasePath+"/collapsed.gif",9,9),mxGraph.prototype.expandedImage=new mxImage(mxClient.imageBasePath+"/expanded.gif",9,9),mxGraph.prototype.warningImage=new mxImage("/assets/plugins/mxgraph/images/warning.gif",16,16),mxGraph.prototype.alreadyConnectedResource="none"!=mxClient.language?"alreadyConnected":"",mxGraph.prototype.containsValidationErrorsResource="none"!=mxClient.language?"containsValidationErrors":"",mxGraph.prototype.collapseExpandResource="none"!=mxClient.language?"collapse-expand":"",mxGraph.prototype.init=function(e){this.container=e,this.cellEditor=this.createCellEditor(),this.view.init(),this.sizeDidChange(),mxClient.IS_IE&&(mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})),mxEvent.addListener(e,"selectstart",mxUtils.bind(this,function(){return this.isEditing()}))),8==document.documentMode&&e.insertAdjacentHTML("beforeend",'<v:group style="DISPLAY: none;"></v:group>')},mxGraph.prototype.createHandlers=function(e){this.tooltipHandler=new mxTooltipHandler(this),this.tooltipHandler.setEnabled(!1),this.panningHandler=new mxPanningHandler(this),this.panningHandler.panningEnabled=!1,this.selectionCellsHandler=new mxSelectionCellsHandler(this),this.connectionHandler=new mxConnectionHandler(this),this.connectionHandler.setEnabled(!1),this.graphHandler=new mxGraphHandler(this)},mxGraph.prototype.createSelectionModel=function(){return new mxGraphSelectionModel(this)},mxGraph.prototype.createStylesheet=function(){return new mxStylesheet},mxGraph.prototype.createGraphView=function(){return new mxGraphView(this)},mxGraph.prototype.createCellRenderer=function(){return new mxCellRenderer},mxGraph.prototype.createCellEditor=function(){return new mxCellEditor(this)},mxGraph.prototype.getModel=function(){return this.model},mxGraph.prototype.getView=function(){return this.view},mxGraph.prototype.getStylesheet=function(){return this.stylesheet},mxGraph.prototype.setStylesheet=function(e){this.stylesheet=e},mxGraph.prototype.getSelectionModel=function(){return this.selectionModel},mxGraph.prototype.setSelectionModel=function(e){this.selectionModel=e},mxGraph.prototype.getSelectionCellsForChanges=function(e){for(var t=[],n=0;n<e.length;n++){var a=e[n];if(a.constructor!=mxRootChange){var i=null;a instanceof mxChildChange&&null==a.previous?i=a.child:null!=a.cell&&a.cell instanceof mxCell&&(i=a.cell),null!=i&&mxUtils.indexOf(t,i)<0&&t.push(i)}}return this.getModel().getTopmostCells(t)},mxGraph.prototype.graphModelChanged=function(e){for(var t=0;t<e.length;t++)this.processChange(e[t]);this.removeSelectionCells(this.getRemovedCellsForChanges(e)),this.view.validate(),this.sizeDidChange()},mxGraph.prototype.getRemovedCellsForChanges=function(e){for(var t=[],n=0;n<e.length;n++){var a=e[n];if(a instanceof mxRootChange)break;a instanceof mxChildChange?null!=a.previous&&null==a.parent&&(t=t.concat(this.model.getDescendants(a.child))):a instanceof mxVisibleChange&&(t=t.concat(this.model.getDescendants(a.cell)))}return t},mxGraph.prototype.processChange=function(e){if(e instanceof mxRootChange)this.clearSelection(),this.removeStateForCell(e.previous),this.resetViewOnRootChange&&(this.view.scale=1,this.view.translate.x=0,this.view.translate.y=0),this.fireEvent(new mxEventObject(mxEvent.ROOT));else if(e instanceof mxChildChange){var t=this.model.getParent(e.child);null!=t?this.view.invalidate(e.child,!0,!1,null!=e.previous):(this.removeStateForCell(e.child),this.view.currentRoot==e.child&&this.home()),t!=e.previous&&(null!=t&&this.view.invalidate(t,!1,!1),null!=e.previous&&this.view.invalidate(e.previous,!1,!1))}else e instanceof mxTerminalChange||e instanceof mxGeometryChange?this.view.invalidate(e.cell):e instanceof mxValueChange?this.view.invalidate(e.cell,!1,!1):e instanceof mxStyleChange?(this.view.invalidate(e.cell,!0,!0,!1),this.view.removeState(e.cell)):null!=e.cell&&e.cell instanceof mxCell&&this.removeStateForCell(e.cell)},mxGraph.prototype.removeStateForCell=function(e){for(var t=this.model.getChildCount(e),n=0;n<t;n++)this.removeStateForCell(this.model.getChildAt(e,n));this.view.removeState(e)},mxGraph.prototype.addCellOverlay=function(e,t){null==e.overlays&&(e.overlays=[]),e.overlays.push(t);var n=this.view.getState(e);return null!=n&&this.cellRenderer.redraw(n),this.fireEvent(new mxEventObject(mxEvent.ADD_OVERLAY,"cell",e,"overlay",t)),t},mxGraph.prototype.getCellOverlays=function(e){return e.overlays},mxGraph.prototype.removeCellOverlay=function(e,t){if(null==t)this.removeCellOverlays(e);else{var n=mxUtils.indexOf(e.overlays,t);0<=n?(e.overlays.splice(n,1),0==e.overlays.length&&(e.overlays=null),null!=(n=this.view.getState(e))&&this.cellRenderer.redraw(n),this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,"cell",e,"overlay",t))):t=null}return t},mxGraph.prototype.removeCellOverlays=function(e){var t=e.overlays;if(null!=t){e.overlays=null;var n=this.view.getState(e);for(null!=n&&this.cellRenderer.redraw(n),n=0;n<t.length;n++)this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,"cell",e,"overlay",t[n]))}return t},mxGraph.prototype.clearCellOverlays=function(e){e=null!=e?e:this.model.getRoot(),this.removeCellOverlays(e);for(var t=this.model.getChildCount(e),n=0;n<t;n++){var a=this.model.getChildAt(e,n);this.clearCellOverlays(a)}},mxGraph.prototype.setCellWarning=function(n,e,t,a){return null!=e&&0<e.length?(e=new mxCellOverlay(t=null!=t?t:this.warningImage,"<font color=red>"+e+"</font>"),a&&e.addListener(mxEvent.CLICK,mxUtils.bind(this,function(e,t){this.isEnabled()&&this.setSelectionCell(n)})),this.addCellOverlay(n,e)):(this.removeCellOverlays(n),null)},mxGraph.prototype.startEditing=function(e){this.startEditingAtCell(null,e)},mxGraph.prototype.startEditingAtCell=function(e,t){null==e&&(null!=(e=this.getSelectionCell())&&!this.isCellEditable(e)&&(e=null)),null!=e&&(this.fireEvent(new mxEventObject(mxEvent.START_EDITING,"cell",e,"event",t)),this.cellEditor.startEditing(e,t))},mxGraph.prototype.getEditingValue=function(e,t){return this.convertValueToString(e)},mxGraph.prototype.stopEditing=function(e){this.cellEditor.stopEditing(e)},mxGraph.prototype.labelChanged=function(e,t,n){this.model.beginUpdate();try{this.cellLabelChanged(e,t,this.isAutoSizeCell(e)),this.fireEvent(new mxEventObject(mxEvent.LABEL_CHANGED,"cell",e,"value",t,"event",n))}finally{this.model.endUpdate()}return e},mxGraph.prototype.cellLabelChanged=function(e,t,n){this.model.beginUpdate();try{this.model.setValue(e,t),n&&this.cellSizeUpdated(e,!1)}finally{this.model.endUpdate()}},mxGraph.prototype.escape=function(e){this.stopEditing(!0),this.connectionHandler.reset(),this.graphHandler.reset(),e=this.getSelectionCells();for(var t=0;t<e.length;t++){var n=this.view.getState(e[t]);null!=n&&null!=n.handler&&n.handler.reset()}},mxGraph.prototype.click=function(e){var t=e.getEvent(),n=e.getCell(),a=new mxEventObject(mxEvent.CLICK,"event",t,"cell",n);e.isConsumed()&&a.consume(),this.fireEvent(a),this.isEnabled()&&!mxEvent.isConsumed(t)&&!a.isConsumed()&&(null!=n?this.selectCellForEvent(n,t):(n=null,this.isSwimlaneSelectionEnabled()&&(n=this.getSwimlaneAt(e.getGraphX(),e.getGraphY())),null!=n?this.selectCellForEvent(n,t):this.isToggleEvent(t)||this.clearSelection()))},mxGraph.prototype.dblClick=function(e,t){var n=new mxEventObject(mxEvent.DOUBLE_CLICK,"event",e,"cell",t);this.fireEvent(n),this.isEnabled()&&!mxEvent.isConsumed(e)&&!n.isConsumed()&&null!=t&&this.isCellEditable(t)&&this.startEditingAtCell(t,e)},mxGraph.prototype.scrollPointToVisible=function(e,t,n,a){if(this.timerAutoScroll||!this.ignoreScrollbars&&!mxUtils.hasScrollbars(this.container))this.allowAutoPanning&&!this.panningHandler.active&&(null==this.panningManager&&(this.panningManager=this.createPanningManager()),this.panningManager.panTo(e+this.panDx,t+this.panDy));else{var i=this.container;if(a=null!=a?a:20,e>=i.scrollLeft&&t>=i.scrollTop&&e<=i.scrollLeft+i.clientWidth&&t<=i.scrollTop+i.clientHeight){var o=i.scrollLeft+i.clientWidth-e;if(o<a){if(e=i.scrollLeft,i.scrollLeft+=a-o,n&&e==i.scrollLeft){if(this.dialect==mxConstants.DIALECT_SVG){e=this.view.getDrawPane().ownerSVGElement;var s=this.container.scrollWidth+a-o}else s=Math.max(i.clientWidth,i.scrollWidth)+a-o,e=this.view.getCanvas();e.style.width=s+"px",i.scrollLeft+=a-o}}else(o=e-i.scrollLeft)<a&&(i.scrollLeft-=a-o);(o=i.scrollTop+i.clientHeight-t)<a?(e=i.scrollTop,i.scrollTop+=a-o,e==i.scrollTop&&n&&(this.dialect==mxConstants.DIALECT_SVG?(e=this.view.getDrawPane().ownerSVGElement,t=this.container.scrollHeight+a-o):(t=Math.max(i.clientHeight,i.scrollHeight)+a-o,e=this.view.getCanvas()),e.style.height=t+"px",i.scrollTop+=a-o)):(o=t-i.scrollTop)<a&&(i.scrollTop-=a-o)}}},mxGraph.prototype.createPanningManager=function(){return new mxPanningManager(this)},mxGraph.prototype.getBorderSizes=function(){function e(e){var t=0;t="thin"==e?2:"medium"==e?4:"thick"==e?6:parseInt(e);return isNaN(t)&&(t=0),t}var t=mxUtils.getCurrentStyle(this.container),n=new mxRectangle;return n.x=e(t.borderLeftWidth)+parseInt(t.paddingLeft||0),n.y=e(t.borderTopWidth)+parseInt(t.paddingTop||0),n.width=e(t.borderRightWidth)+parseInt(t.paddingRight||0),n.height=e(t.borderBottomWidth)+parseInt(t.paddingBottom||0),n},mxGraph.prototype.getPreferredPageSize=function(e,t,n){e=this.view.scale;var a=this.view.translate,i=this.pageFormat,o=e*this.pageScale;i=new mxRectangle(0,0,i.width*o,i.height*o);return t=this.pageBreaksVisible?Math.ceil(t/i.width):1,n=this.pageBreaksVisible?Math.ceil(n/i.height):1,new mxRectangle(0,0,t*i.width+2+a.x/e,n*i.height+2+a.y/e)},mxGraph.prototype.sizeDidChange=function(){var e=this.getGraphBounds();if(null!=this.container){var t=this.getBorder(),n=Math.max(0,e.x+e.width+1+t);t=Math.max(0,e.y+e.height+1+t);if(null!=this.minimumContainerSize&&(n=Math.max(n,this.minimumContainerSize.width),t=Math.max(t,this.minimumContainerSize.height)),this.resizeContainer&&this.doResizeContainer(n,t),this.preferPageSize||!mxClient.IS_IE&&this.pageVisible){var a=this.getPreferredPageSize(e,n,t);null!=a&&(n=a.width,t=a.height)}null!=this.minimumGraphSize&&(n=Math.max(n,this.minimumGraphSize.width*this.view.scale),t=Math.max(t,this.minimumGraphSize.height*this.view.scale)),n=Math.ceil(n-1),t=Math.ceil(t-1),this.dialect==mxConstants.DIALECT_SVG?((a=this.view.getDrawPane().ownerSVGElement).style.minWidth=Math.max(1,n)+"px",a.style.minHeight=Math.max(1,t)+"px",a.style.width="100%",a.style.height="100%"):mxClient.IS_QUIRKS?this.view.updateHtmlCanvasSize(Math.max(1,n),Math.max(1,t)):(this.view.canvas.style.minWidth=Math.max(1,n)+"px",this.view.canvas.style.minHeight=Math.max(1,t)+"px"),this.updatePageBreaks(this.pageBreaksVisible,n-1,t-1)}this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",e))},mxGraph.prototype.doResizeContainer=function(e,t){if(mxClient.IS_IE)if(mxClient.IS_QUIRKS){var n=this.getBorderSizes();e+=Math.max(2,n.x+n.width+1),t+=Math.max(2,n.y+n.height+1)}else 9<=document.documentMode?(e+=3,t+=5):(e+=1,t+=1);else t+=1;null!=this.maximumContainerSize&&(e=Math.min(this.maximumContainerSize.width,e),t=Math.min(this.maximumContainerSize.height,t)),this.container.style.width=Math.ceil(e)+"px",this.container.style.height=Math.ceil(t)+"px"},mxGraph.prototype.updatePageBreaks=function(e,t,n){var a=this.view.scale,i=this.view.translate,o=this.pageFormat,s=a*this.pageScale;i=new mxRectangle(a*i.x,a*i.y,o.width*s,o.height*s);if(e=e&&Math.min(i.width,i.height)>this.minPageBreakDist,i.x=mxUtils.mod(i.x,i.width),i.y=mxUtils.mod(i.y,i.height),o=e?Math.ceil((t-i.x)/i.width):0,e=e?Math.ceil((n-i.y)/i.height):0,null==this.horizontalPageBreaks&&0<o&&(this.horizontalPageBreaks=[]),null!=this.horizontalPageBreaks){for(s=0;s<=o;s++){var r=[new mxPoint(i.x+s*i.width,1),new mxPoint(i.x+s*i.width,n)];null!=this.horizontalPageBreaks[s]?(this.horizontalPageBreaks[s].scale=1,this.horizontalPageBreaks[s].points=r,this.horizontalPageBreaks[s].redraw()):((r=new mxPolyline(r,this.pageBreakColor,this.scale)).dialect=this.dialect,r.isDashed=this.pageBreakDashed,r.scale=a,r.init(this.view.backgroundPane),r.redraw(),this.horizontalPageBreaks[s]=r)}for(s=o;s<this.horizontalPageBreaks.length;s++)this.horizontalPageBreaks[s].destroy();this.horizontalPageBreaks.splice(o,this.horizontalPageBreaks.length-o)}if(null==this.verticalPageBreaks&&0<e&&(this.verticalPageBreaks=[]),null!=this.verticalPageBreaks){for(s=0;s<=e;s++)r=[new mxPoint(1,i.y+s*i.height),new mxPoint(t,i.y+s*i.height)],null!=this.verticalPageBreaks[s]?(this.verticalPageBreaks[s].scale=1,this.verticalPageBreaks[s].points=r,this.verticalPageBreaks[s].redraw()):((r=new mxPolyline(r,this.pageBreakColor,a)).dialect=this.dialect,r.isDashed=this.pageBreakDashed,r.scale=a,r.init(this.view.backgroundPane),r.redraw(),this.verticalPageBreaks[s]=r);for(s=e;s<this.verticalPageBreaks.length;s++)this.verticalPageBreaks[s].destroy();this.verticalPageBreaks.splice(e,this.verticalPageBreaks.length-e)}},mxGraph.prototype.getCellStyle=function(e){var t=this.model.getStyle(e),n=null;n=this.model.isEdge(e)?this.stylesheet.getDefaultEdgeStyle():this.stylesheet.getDefaultVertexStyle();return null!=t&&(n=this.postProcessCellStyle(this.stylesheet.getCellStyle(t,n))),null==n&&(n=mxGraph.prototype.EMPTY_ARRAY),n},mxGraph.prototype.postProcessCellStyle=function(e){if(null!=e){var t=e[mxConstants.STYLE_IMAGE],n=this.getImageFromBundles(t);null!=n?e[mxConstants.STYLE_IMAGE]=n:n=t,null!=n&&"data:image/"==n.substring(0,11)&&(0<(t=n.indexOf(","))&&(n=n.substring(0,t)+";base64,"+n.substring(t+1)),e[mxConstants.STYLE_IMAGE]=n)}return e},mxGraph.prototype.setCellStyle=function(e,t){if(null!=(t=t||this.getSelectionCells())){this.model.beginUpdate();try{for(var n=0;n<t.length;n++)this.model.setStyle(t[n],e)}finally{this.model.endUpdate()}}},mxGraph.prototype.toggleCellStyle=function(e,t,n){n=n||this.getSelectionCell(),this.toggleCellStyles(e,t,[n])},mxGraph.prototype.toggleCellStyles=function(e,t,n){var a;(t=null!=t&&t,null!=(n=n||this.getSelectionCells())&&0<n.length)&&(null!=(a=null!=(a=this.view.getState(n[0]))?a.style:this.getCellStyle(n[0]))&&(t=mxUtils.getValue(a,e,t)?0:1,this.setCellStyles(e,t,n)))},mxGraph.prototype.setCellStyles=function(e,t,n){n=n||this.getSelectionCells(),mxUtils.setCellStyles(this.model,n,e,t)},mxGraph.prototype.toggleCellStyleFlags=function(e,t,n){this.setCellStyleFlags(e,t,null,n)},mxGraph.prototype.setCellStyleFlags=function(e,t,n,a){if(null!=(a=a||this.getSelectionCells())&&0<a.length){var i;if(null==n)null!=(i=null!=(i=this.view.getState(a[0]))?i.style:this.getCellStyle(a[0]))&&(n=(parseInt(i[e]||0)&t)!=t);mxUtils.setCellStyleFlags(this.model,a,e,t,n)}},mxGraph.prototype.alignCells=function(e,t,n){if(null==t&&(t=this.getSelectionCells()),null!=t&&1<t.length){if(null==n)for(var a=0;a<t.length;a++){var i=this.getCellGeometry(t[a]);if(null!=i&&!this.model.isEdge(t[a]))if(null==n){if(e==mxConstants.ALIGN_CENTER){n=i.x+i.width/2;break}if(e==mxConstants.ALIGN_RIGHT)n=i.x+i.width;else if(e==mxConstants.ALIGN_TOP)n=i.y;else{if(e==mxConstants.ALIGN_MIDDLE){n=i.y+i.height/2;break}n=e==mxConstants.ALIGN_BOTTOM?i.y+i.height:i.x}}else n=e==mxConstants.ALIGN_RIGHT?Math.max(n,i.x+i.width):e==mxConstants.ALIGN_TOP?Math.min(n,i.y):e==mxConstants.ALIGN_BOTTOM?Math.max(n,i.y+i.height):Math.min(n,i.x)}if(null!=n){this.model.beginUpdate();try{for(a=0;a<t.length;a++)null!=(i=this.getCellGeometry(t[a]))&&!this.model.isEdge(t[a])&&(i=i.clone(),e==mxConstants.ALIGN_CENTER?i.x=n-i.width/2:e==mxConstants.ALIGN_RIGHT?i.x=n-i.width:e==mxConstants.ALIGN_TOP?i.y=n:e==mxConstants.ALIGN_MIDDLE?i.y=n-i.height/2:e==mxConstants.ALIGN_BOTTOM?i.y=n-i.height:i.x=n,this.model.setGeometry(t[a],i));this.fireEvent(new mxEventObject(mxEvent.ALIGN_CELLS,"align",e,"cells",t))}finally{this.model.endUpdate()}}}return t},mxGraph.prototype.flipEdge=function(e){if(null!=e&&null!=this.alternateEdgeStyle){this.model.beginUpdate();try{var t=this.model.getStyle(e);null==t||0==t.length?this.model.setStyle(e,this.alternateEdgeStyle):this.model.setStyle(e,null),this.resetEdge(e),this.fireEvent(new mxEventObject(mxEvent.FLIP_EDGE,"edge",e))}finally{this.model.endUpdate()}}return e},mxGraph.prototype.addImageBundle=function(e){this.imageBundles.push(e)},mxGraph.prototype.removeImageBundle=function(e){for(var t=[],n=0;n<this.imageBundles.length;n++)this.imageBundles[n]!=e&&t.push(this.imageBundles[n]);this.imageBundles=t},mxGraph.prototype.getImageFromBundles=function(e){if(null!=e)for(var t=0;t<this.imageBundles.length;t++){var n=this.imageBundles[t].getImage(e);if(null!=n)return n}return null},mxGraph.prototype.orderCells=function(e,t){null==t&&(t=mxUtils.sortCells(this.getSelectionCells(),!0)),this.model.beginUpdate();try{this.cellsOrdered(t,e),this.fireEvent(new mxEventObject(mxEvent.ORDER_CELLS,"back",e,"cells",t))}finally{this.model.endUpdate()}return t},mxGraph.prototype.cellsOrdered=function(e,t){if(null!=e){this.model.beginUpdate();try{for(var n=0;n<e.length;n++){var a=this.model.getParent(e[n]);t?this.model.add(a,e[n],n):this.model.add(a,e[n],this.model.getChildCount(a)-1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ORDERED,"back",t,"cells",e))}finally{this.model.endUpdate()}}},mxGraph.prototype.groupCells=function(e,t,n){null==n&&(n=mxUtils.sortCells(this.getSelectionCells(),!0)),n=this.getCellsForGroup(n),null==e&&(e=this.createGroupCell(n));var a=this.getBoundsForGroup(e,n,t);if(0<n.length&&null!=a){var i=this.model.getParent(e);null==i&&(i=this.model.getParent(n[0])),this.model.beginUpdate();try{null==this.getCellGeometry(e)&&this.model.setGeometry(e,new mxGeometry);var o=this.model.getChildCount(i);this.cellsAdded([e],i,o,null,null,!1),o=this.model.getChildCount(e),this.cellsAdded(n,e,o,null,null,!1,!1),this.cellsMoved(n,-a.x,-a.y,!1,!0),this.cellsResized([e],[a]),this.fireEvent(new mxEventObject(mxEvent.GROUP_CELLS,"group",e,"border",t,"cells",n))}finally{this.model.endUpdate()}}return e},mxGraph.prototype.getCellsForGroup=function(e){var t=[];if(null!=e&&0<e.length){var n=this.model.getParent(e[0]);t.push(e[0]);for(var a=1;a<e.length;a++)this.model.getParent(e[a])==n&&t.push(e[a])}return t},mxGraph.prototype.getBoundsForGroup=function(e,t,n){return null!=(t=this.getBoundingBoxFromGeometry(t))&&(this.isSwimlane(e)&&(e=this.getStartSize(e),t.x-=e.width,t.y-=e.height,t.width+=e.width,t.height+=e.height),t.x-=n,t.y-=n,t.width+=2*n,t.height+=2*n),t},mxGraph.prototype.createGroupCell=function(e){return(e=new mxCell("")).setVertex(!0),e.setConnectable(!1),e},mxGraph.prototype.ungroupCells=function(e){var t=[];if(null==e){e=this.getSelectionCells();for(var n=[],a=0;a<e.length;a++)0<this.model.getChildCount(e[a])&&n.push(e[a]);e=n}if(null!=e&&0<e.length){this.model.beginUpdate();try{for(a=0;a<e.length;a++){if(null!=(i=this.model.getChildren(e[a]))&&0<i.length){var i=i.slice(),o=this.model.getParent(e[a]),s=this.model.getChildCount(o);this.cellsAdded(i,o,s,null,null,!0),t=t.concat(i)}}this.cellsRemoved(this.addAllEdges(e)),this.fireEvent(new mxEventObject(mxEvent.UNGROUP_CELLS,"cells",e))}finally{this.model.endUpdate()}}return t},mxGraph.prototype.removeCellsFromParent=function(e){null==e&&(e=this.getSelectionCells()),this.model.beginUpdate();try{var t=this.getDefaultParent(),n=this.model.getChildCount(t);this.cellsAdded(e,t,n,null,null,!0),this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS_FROM_PARENT,"cells",e))}finally{this.model.endUpdate()}return e},mxGraph.prototype.updateGroupBounds=function(e,t,n){null==e&&(e=this.getSelectionCells()),t=null!=t?t:0,n=null!=n&&n,this.model.beginUpdate();try{for(var a=0;a<e.length;a++){if(null!=(r=this.getCellGeometry(e[a]))){var i=this.getChildCells(e[a]);if(null!=i&&0<i.length){var o=this.getBoundingBoxFromGeometry(i);if(0<o.width&&0<o.height){var s=this.isSwimlane(e[a])?this.getStartSize(e[a]):new mxRectangle,r=r.clone();n&&(r.x+=o.x-s.width-t,r.y+=o.y-s.height-t),r.width=o.width+s.width+2*t,r.height=o.height+s.height+2*t,this.model.setGeometry(e[a],r),this.moveCells(i,-o.x+s.width+t,-o.y+s.height+t)}}}}}finally{this.model.endUpdate()}return e},mxGraph.prototype.cloneCells=function(e,t){t=null==t||t;var n=null;if(null!=e){for(var a={},i=(n=[],0);i<e.length;i++){a[o=mxCellPath.create(e[i])]=e[i],n.push(e[i])}if(0<n.length){var o=this.view.scale,s=this.view.translate;for(n=this.model.cloneCells(e,!0),i=0;i<e.length;i++)if(!t&&this.model.isEdge(n[i])&&null!=this.getEdgeValidationError(n[i],this.model.getTerminal(n[i],!0),this.model.getTerminal(n[i],!1)))n[i]=null;else{var r=this.model.getGeometry(n[i]);if(null!=r){var l=this.view.getState(e[i]),d=this.view.getState(this.model.getParent(e[i]));if(null!=l&&null!=d){var c=d.origin.x;d=d.origin.y;if(this.model.isEdge(n[i])){l=l.absolutePoints;for(var m=this.model.getTerminal(e[i],!0),u=mxCellPath.create(m);null!=m&&null==a[u];)m=this.model.getParent(m),u=mxCellPath.create(m);for(null==m&&r.setTerminalPoint(new mxPoint(l[0].x/o-s.x,l[0].y/o-s.y),!0),m=this.model.getTerminal(e[i],!1),u=mxCellPath.create(m);null!=m&&null==a[u];)m=this.model.getParent(m),u=mxCellPath.create(m);if(null==m&&(m=l.length-1,r.setTerminalPoint(new mxPoint(l[m].x/o-s.x,l[m].y/o-s.y),!1)),null!=(r=r.points))for(l=0;l<r.length;l++)r[l].x+=c,r[l].y+=d}else r.x+=c,r.y+=d}}}}else n=[]}return n},mxGraph.prototype.insertVertex=function(e,t,n,a,i,o,s,r,l){return t=this.createVertex(e,t,n,a,i,o,s,r,l),this.addCell(t,e)},mxGraph.prototype.createVertex=function(e,t,n,a,i,o,s,r,l){return(e=new mxGeometry(a,i,o,s)).relative=null!=l&&l,(n=new mxCell(n,e,r)).setId(t),n.setVertex(!0),n.setConnectable(!0),n},mxGraph.prototype.insertEdge=function(e,t,n,a,i,o){return t=this.createEdge(e,t,n,a,i,o),this.addEdge(t,e,a,i)},mxGraph.prototype.createEdge=function(e,t,n,a,i,o){return(e=new mxCell(n,new mxGeometry,o)).setId(t),e.setEdge(!0),e.geometry.relative=!0,e},mxGraph.prototype.addEdge=function(e,t,n,a,i){return this.addCell(e,t,i,n,a)},mxGraph.prototype.addCell=function(e,t,n,a,i){return this.addCells([e],t,n,a,i)[0]},mxGraph.prototype.addCells=function(e,t,n,a,i){null==t&&(t=this.getDefaultParent()),null==n&&(n=this.model.getChildCount(t)),this.model.beginUpdate();try{this.cellsAdded(e,t,n,a,i,!1,!0),this.fireEvent(new mxEventObject(mxEvent.ADD_CELLS,"cells",e,"parent",t,"index",n,"source",a,"target",i))}finally{this.model.endUpdate()}return e},mxGraph.prototype.cellsAdded=function(e,t,n,a,i,o,s){if(null!=e&&null!=t&&null!=n){this.model.beginUpdate();try{for(var r=null!=(d=o?this.view.getState(t):null)?d.origin:null,l=new mxPoint(0,0),d=0;d<e.length;d++)if(null==e[d])n--;else{var c=this.model.getParent(e[d]);if(null!=r&&e[d]!=t&&t!=c){var m=this.view.getState(c),u=null!=m?m.origin:l;if(null!=(p=this.model.getGeometry(e[d]))){var p,g=u.x-r.x,v=u.y-r.y;(p=p.clone()).translate(g,v),!p.relative&&this.model.isVertex(e[d])&&!this.isAllowNegativeCoordinates()&&(p.x=Math.max(0,p.x),p.y=Math.max(0,p.y)),this.model.setGeometry(e[d],p)}}t==c&&n+d>this.model.getChildCount(t)&&n--,this.model.add(t,e[d],n+d),this.isExtendParentsOnAdd()&&this.isExtendParent(e[d])&&this.extendParent(e[d]),(null==s||s)&&this.constrainChild(e[d]),null!=a&&this.cellConnected(e[d],a,!0),null!=i&&this.cellConnected(e[d],i,!1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",e,"parent",t,"index",n,"source",a,"target",i,"absolute",o))}finally{this.model.endUpdate()}}},mxGraph.prototype.removeCells=function(e,t){t=null==t||t,null==e&&(e=this.getDeletableCells(this.getSelectionCells())),t&&(e=this.getDeletableCells(this.addAllEdges(e))),this.model.beginUpdate();try{this.cellsRemoved(e),this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS,"cells",e,"includeEdges",t))}finally{this.model.endUpdate()}return e},mxGraph.prototype.cellsRemoved=function(e){if(null!=e&&0<e.length){var t=this.view.scale,n=this.view.translate;this.model.beginUpdate();try{for(var a={},i=0;i<e.length;i++){var o=mxCellPath.create(e[i]);a[o]=e[i]}for(i=0;i<e.length;i++){for(var s=this.getConnections(e[i]),r=0;r<s.length;r++)if(null==a[o=mxCellPath.create(s[r])]){if(null!=(d=this.model.getGeometry(s[r]))){var l=this.view.getState(s[r]);if(null!=l){var d=d.clone(),c=l.getVisibleTerminal(!0)==e[i],m=l.absolutePoints,u=c?0:m.length-1;d.setTerminalPoint(new mxPoint(m[u].x/t-n.x,m[u].y/t-n.y),c),this.model.setTerminal(s[r],null,c),this.model.setGeometry(s[r],d)}}}this.model.remove(e[i])}this.fireEvent(new mxEventObject(mxEvent.CELLS_REMOVED,"cells",e))}finally{this.model.endUpdate()}}},mxGraph.prototype.splitEdge=function(e,t,n,a,i){a=a||0,i=i||0,null==n&&(n=this.cloneCells([e])[0]);var o=this.model.getParent(e),s=this.model.getTerminal(e,!0);this.model.beginUpdate();try{this.cellsMoved(t,a,i,!1,!1),this.cellsAdded(t,o,this.model.getChildCount(o),null,null,!0),this.cellsAdded([n],o,this.model.getChildCount(o),s,t[0],!1),this.cellConnected(e,t[0],!0),this.fireEvent(new mxEventObject(mxEvent.SPLIT_EDGE,"edge",e,"cells",t,"newEdge",n,"dx",a,"dy",i))}finally{this.model.endUpdate()}return n},mxGraph.prototype.toggleCells=function(e,t,n){null==t&&(t=this.getSelectionCells()),n&&(t=this.addAllEdges(t)),this.model.beginUpdate();try{this.cellsToggled(t,e),this.fireEvent(new mxEventObject(mxEvent.TOGGLE_CELLS,"show",e,"cells",t,"includeEdges",n))}finally{this.model.endUpdate()}return t},mxGraph.prototype.cellsToggled=function(e,t){if(null!=e&&0<e.length){this.model.beginUpdate();try{for(var n=0;n<e.length;n++)this.model.setVisible(e[n],t)}finally{this.model.endUpdate()}}},mxGraph.prototype.foldCells=function(e,t,n,a){t=null!=t&&t,null==n&&(n=this.getFoldableCells(this.getSelectionCells(),e)),this.stopEditing(!1),this.model.beginUpdate();try{this.cellsFolded(n,e,t,a),this.fireEvent(new mxEventObject(mxEvent.FOLD_CELLS,"collapse",e,"recurse",t,"cells",n))}finally{this.model.endUpdate()}return n},mxGraph.prototype.cellsFolded=function(e,t,n,a){if(null!=e&&0<e.length){this.model.beginUpdate();try{for(var i=0;i<e.length;i++)if((!a||this.isCellFoldable(e[i],t))&&t!=this.isCellCollapsed(e[i])&&(this.model.setCollapsed(e[i],t),this.swapBounds(e[i],t),this.isExtendParent(e[i])&&this.extendParent(e[i]),n)){var o=this.model.getChildren(e[i]);this.foldCells(o,t,n)}this.fireEvent(new mxEventObject(mxEvent.CELLS_FOLDED,"cells",e,"collapse",t,"recurse",n))}finally{this.model.endUpdate()}}},mxGraph.prototype.swapBounds=function(e,t){if(null!=e){var n=this.model.getGeometry(e);null!=n&&(n=n.clone(),this.updateAlternateBounds(e,n,t),n.swap(),this.model.setGeometry(e,n))}},mxGraph.prototype.updateAlternateBounds=function(e,t,n){if(null!=e&&null!=t){if(n=null!=(n=this.view.getState(e))?n.style:this.getCellStyle(e),null==t.alternateBounds){var a=t;this.collapseToPreferredSize&&(null!=(e=this.getPreferredSizeForCell(e))&&(a=e,0<(e=mxUtils.getValue(n,mxConstants.STYLE_STARTSIZE))&&(a.height=Math.max(a.height,e)))),t.alternateBounds=new mxRectangle(0,0,a.width,a.height)}if(null!=t.alternateBounds){t.alternateBounds.x=t.x,t.alternateBounds.y=t.y;var i=mxUtils.toRadians(n[mxConstants.STYLE_ROTATION]||"0");0!=i&&(e=t.alternateBounds.getCenterX()-t.getCenterX(),n=t.alternateBounds.getCenterY()-t.getCenterY(),a=Math.cos(i),i=Math.sin(i),t.alternateBounds.x+=a*e-i*n-e,t.alternateBounds.y+=i*e+a*n-n)}}},mxGraph.prototype.addAllEdges=function(e){var t=e.slice();return t.concat(this.getAllEdges(e))},mxGraph.prototype.getAllEdges=function(e){var t=[];if(null!=e)for(var n=0;n<e.length;n++){for(var a=this.model.getEdgeCount(e[n]),i=0;i<a;i++)t.push(this.model.getEdgeAt(e[n],i));a=this.model.getChildren(e[n]),t=t.concat(this.getAllEdges(a))}return t},mxGraph.prototype.updateCellSize=function(e,t){t=null!=t&&t,this.model.beginUpdate();try{this.cellSizeUpdated(e,t),this.fireEvent(new mxEventObject(mxEvent.UPDATE_CELL_SIZE,"cell",e,"ignoreChildren",t))}finally{this.model.endUpdate()}return e},mxGraph.prototype.cellSizeUpdated=function(e,t){if(null!=e){this.model.beginUpdate();try{var n=this.getPreferredSizeForCell(e),a=this.model.getGeometry(e);if(null!=n&&null!=a){var i=this.isCellCollapsed(e);a=a.clone();if(this.isSwimlane(e)){var o=this.view.getState(e),s=null!=o?o.style:this.getCellStyle(e),r=this.model.getStyle(e);null==r&&(r=""),mxUtils.getValue(s,mxConstants.STYLE_HORIZONTAL,!0)?(r=mxUtils.setStyle(r,mxConstants.STYLE_STARTSIZE,n.height+8),i&&(a.height=n.height+8),a.width=n.width):(r=mxUtils.setStyle(r,mxConstants.STYLE_STARTSIZE,n.width+8),i&&(a.width=n.width+8),a.height=n.height),this.model.setStyle(e,r)}else a.width=n.width,a.height=n.height;if(!t&&!i){var l=this.view.getBounds(this.model.getChildren(e));if(null!=l){var d=this.view.translate,c=this.view.scale,m=(l.y+l.height)/c-a.y-d.y;a.width=Math.max(a.width,(l.x+l.width)/c-a.x-d.x),a.height=Math.max(a.height,m)}}this.cellsResized([e],[a])}}finally{this.model.endUpdate()}}},mxGraph.prototype.getPreferredSizeForCell=function(e){var t=null;if(null!=e){var n=this.view.getState(e),a=null!=n?n.style:this.getCellStyle(e);if(null!=a&&!this.model.isEdge(e)){var i=a[mxConstants.STYLE_FONTSIZE]||mxConstants.DEFAULT_FONTSIZE,o=0;t=0;null==this.getImage(n)&&null==a[mxConstants.STYLE_IMAGE]||a[mxConstants.STYLE_SHAPE]!=mxConstants.SHAPE_LABEL||(a[mxConstants.STYLE_VERTICAL_ALIGN]==mxConstants.ALIGN_MIDDLE&&(o+=parseFloat(a[mxConstants.STYLE_IMAGE_WIDTH])||mxLabel.prototype.imageSize),a[mxConstants.STYLE_ALIGN]!=mxConstants.ALIGN_CENTER&&(t+=parseFloat(a[mxConstants.STYLE_IMAGE_HEIGHT])||mxLabel.prototype.imageSize)),o+=2*(a[mxConstants.STYLE_SPACING]||0),o+=a[mxConstants.STYLE_SPACING_LEFT]||0,o+=a[mxConstants.STYLE_SPACING_RIGHT]||0,t+=2*(a[mxConstants.STYLE_SPACING]||0),t+=a[mxConstants.STYLE_SPACING_TOP]||0,t+=a[mxConstants.STYLE_SPACING_BOTTOM]||0,null!=(n=this.getFoldingImage(n))&&(o+=n.width+8),null!=(n=this.getLabel(e))&&0<n.length?(this.isHtmlLabel(e)||(n=n.replace(/\n/g,"<br>")),e=(i=mxUtils.getSizeForString(n,i,a[mxConstants.STYLE_FONTFAMILY])).width+o,t=i.height+t,mxUtils.getValue(a,mxConstants.STYLE_HORIZONTAL,!0)||(a=t,t=e,e=a),this.gridEnabled&&(e=this.snap(e+this.gridSize/2),t=this.snap(t+this.gridSize/2)),t=new mxRectangle(0,0,e,t)):t=new mxRectangle(0,0,a=4*this.gridSize,a)}}return t},mxGraph.prototype.handleGesture=function(e,t){if(.2<Math.abs(1-t.scale)){var n=this.view.scale,a=this.view.translate,i=e.width*t.scale,o=e.height*t.scale,s=e.y-(o-e.height)/2;n=new mxRectangle(this.snap((e.x-(i-e.width)/2)/n)-a.x,this.snap(s/n)-a.y,this.snap(i/n),this.snap(o/n));this.resizeCell(e.cell,n)}},mxGraph.prototype.resizeCell=function(e,t){return this.resizeCells([e],[t])[0]},mxGraph.prototype.resizeCells=function(e,t){this.model.beginUpdate();try{this.cellsResized(e,t),this.fireEvent(new mxEventObject(mxEvent.RESIZE_CELLS,"cells",e,"bounds",t))}finally{this.model.endUpdate()}return e},mxGraph.prototype.cellsResized=function(e,t){if(null!=e&&null!=t&&e.length==t.length){this.model.beginUpdate();try{for(var n=0;n<e.length;n++){var a=t[n],i=this.model.getGeometry(e[n]);if(null!=i&&(i.x!=a.x||i.y!=a.y||i.width!=a.width||i.height!=a.height)){if((i=i.clone()).relative){var o=i.offset;null!=o&&(o.x+=a.x-i.x,o.y+=a.y-i.y)}else i.x=a.x,i.y=a.y;i.width=a.width,i.height=a.height,!i.relative&&this.model.isVertex(e[n])&&!this.isAllowNegativeCoordinates()&&(i.x=Math.max(0,i.x),i.y=Math.max(0,i.y)),this.model.setGeometry(e[n],i),this.isExtendParent(e[n])&&this.extendParent(e[n])}}this.resetEdgesOnResize&&this.resetEdges(e),this.fireEvent(new mxEventObject(mxEvent.CELLS_RESIZED,"cells",e,"bounds",t))}finally{this.model.endUpdate()}}},mxGraph.prototype.extendParent=function(e){if(null!=e){var t=this.model.getParent(e),n=this.model.getGeometry(t);null!=t&&null!=n&&!this.isCellCollapsed(t)&&(null!=(e=this.model.getGeometry(e))&&(n.width<e.x+e.width||n.height<e.y+e.height))&&((n=n.clone()).width=Math.max(n.width,e.x+e.width),n.height=Math.max(n.height,e.y+e.height),this.cellsResized([t],[n]))}},mxGraph.prototype.importCells=function(e,t,n,a,i){return this.moveCells(e,t,n,!0,a,i)},mxGraph.prototype.moveCells=function(e,t,n,a,i,o){if(t=null!=t?t:0,n=null!=n?n:0,a=null!=a&&a,null!=e&&(0!=t||0!=n||a||null!=i)){this.model.beginUpdate();try{a&&(e=this.cloneCells(e,this.isCloneInvalidEdges()),null==i&&(i=this.getDefaultParent()));var s=this.isAllowNegativeCoordinates();if(null!=i&&this.setAllowNegativeCoordinates(!0),this.cellsMoved(e,t,n,!a&&this.isDisconnectOnMove()&&this.isAllowDanglingEdges(),null==i),this.setAllowNegativeCoordinates(s),null!=i){var r=this.model.getChildCount(i);this.cellsAdded(e,i,r,null,null,!0)}this.fireEvent(new mxEventObject(mxEvent.MOVE_CELLS,"cells",e,"dx",t,"dy",n,"clone",a,"target",i,"event",o))}finally{this.model.endUpdate()}}return e},mxGraph.prototype.cellsMoved=function(e,t,n,a,i){if(null!=e&&(0!=t||0!=n)){this.model.beginUpdate();try{a&&this.disconnectGraph(e);for(var o=0;o<e.length;o++)this.translateCell(e[o],t,n),i&&this.constrainChild(e[o]);this.resetEdgesOnMove&&this.resetEdges(e),this.fireEvent(new mxEventObject(mxEvent.CELLS_MOVED,"cells",e,"dx",n,"dy",n,"disconnect",a))}finally{this.model.endUpdate()}}},mxGraph.prototype.translateCell=function(e,t,n){var a=this.model.getGeometry(e);null!=a&&((a=a.clone()).translate(t,n),!a.relative&&this.model.isVertex(e)&&!this.isAllowNegativeCoordinates()&&(a.x=Math.max(0,a.x),a.y=Math.max(0,a.y)),a.relative&&!this.model.isEdge(e)&&(null==a.offset?a.offset=new mxPoint(t,n):(a.offset.x+=t,a.offset.y+=n)),this.model.setGeometry(e,a))},mxGraph.prototype.getCellContainmentArea=function(e){if(null!=e&&!this.model.isEdge(e)){var t=this.model.getParent(e);if(t==this.getDefaultParent()||t==this.getCurrentRoot())return this.getMaximumGraphBounds();if(null!=t&&t!=this.getDefaultParent())if(null!=(i=this.model.getGeometry(t))){var n=e=0,a=i.width,i=i.height;return this.isSwimlane(t)&&(e=(t=this.getStartSize(t)).width,a-=t.width,n=t.height,i-=t.height),new mxRectangle(e,n,a,i)}}return null},mxGraph.prototype.getMaximumGraphBounds=function(){return this.maximumGraphBounds},mxGraph.prototype.constrainChild=function(e){if(null!=e){var t=this.model.getGeometry(e),n=this.isConstrainChild(e)?this.getCellContainmentArea(e):this.getMaximumGraphBounds();null!=t&&null!=n&&!t.relative&&(t.x<n.x||t.y<n.y||n.width<t.x+t.width||n.height<t.y+t.height)&&(e=this.getOverlap(e),0<n.width&&(t.x=Math.min(t.x,n.x+n.width-(1-e)*t.width)),0<n.height&&(t.y=Math.min(t.y,n.y+n.height-(1-e)*t.height)),t.x=Math.max(t.x,n.x-t.width*e),t.y=Math.max(t.y,n.y-t.height*e))}},mxGraph.prototype.resetEdges=function(e){if(null!=e){for(var t={},n=0;n<e.length;n++){var a=mxCellPath.create(e[n]);t[a]=e[n]}this.model.beginUpdate();try{for(n=0;n<e.length;n++){var i=this.model.getEdges(e[n]);if(null!=i)for(a=0;a<i.length;a++){var o=this.view.getState(i[a]),s=null!=o?o.getVisibleTerminal(!0):this.view.getVisibleTerminal(i[a],!0),r=null!=o?o.getVisibleTerminal(!1):this.view.getVisibleTerminal(i[a],!1),l=mxCellPath.create(s),d=mxCellPath.create(r);(null==t[l]||null==t[d])&&this.resetEdge(i[a])}this.resetEdges(this.model.getChildren(e[n]))}}finally{this.model.endUpdate()}}},mxGraph.prototype.resetEdge=function(e){var t=this.model.getGeometry(e);return null!=t&&null!=t.points&&0<t.points.length&&((t=t.clone()).points=[],this.model.setGeometry(e,t)),e},mxGraph.prototype.getAllConnectionConstraints=function(e,t){return null!=e&&null!=e.shape&&null!=e.shape.stencil?e.shape.stencil.constraints:null},mxGraph.prototype.getConnectionConstraint=function(e,t,n){t=null;var a=e.style[n?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X];if(null!=a){var i=e.style[n?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y];null!=i&&(t=new mxPoint(parseFloat(a),parseFloat(i)))}return a=!1,null!=t&&(a=mxUtils.getValue(e.style,n?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,!0)),new mxConnectionConstraint(t,a)},mxGraph.prototype.setConnectionConstraint=function(e,t,n,a){if(null!=a){this.model.beginUpdate();try{null==a||null==a.point?(this.setCellStyles(n?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X,null,[e]),this.setCellStyles(n?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y,null,[e]),this.setCellStyles(n?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,null,[e])):null!=a.point&&(this.setCellStyles(n?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X,a.point.x,[e]),this.setCellStyles(n?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y,a.point.y,[e]),a.perimeter?this.setCellStyles(n?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,null,[e]):this.setCellStyles(n?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,"0",[e]))}finally{this.model.endUpdate()}}},mxGraph.prototype.getConnectionPoint=function(e,t){var n=null;if(null!=e){var a=this.view.getPerimeterBounds(e),i=new mxPoint(a.getCenterX(),a.getCenterY()),o=e.style[mxConstants.STYLE_DIRECTION],s=0;if(null!=o&&("north"==o?s+=270:"west"==o?s+=180:"south"==o&&(s+=90),"north"==o||"south"==o)){a.x+=a.width/2-a.height/2,a.y+=a.height/2-a.width/2;var r=a.width;a.width=a.height,a.height=r}if(null!=t.point){var l=n=1,d=0,c=0;if(this.getModel().isVertex(e.cell)){var m=e.style[mxConstants.STYLE_FLIPH],u=e.style[mxConstants.STYLE_FLIPV];null!=e.shape.stencil&&(m=1==mxUtils.getValue(e.style,"stencilFlipH",0)||m,u=1==mxUtils.getValue(e.style,"stencilFlipV",0)||u),"north"!=o&&"south"!=o||(r=m,m=u,u=r),m&&(n=-1,d=-a.width),u&&(l=-1,c=-a.height)}n=new mxPoint(a.x+t.point.x*a.width*n-d,a.y+t.point.y*a.height*l-c)}o=e.style[mxConstants.STYLE_ROTATION]||0,t.perimeter?(0!=s&&null!=n&&(r=a=0,90==s?r=1:180==s?a=-1:270==o&&(r=-1),n=mxUtils.getRotatedPoint(n,a,r,i)),null!=n&&t.perimeter&&(n=this.view.getPerimeterPoint(e,n,!1))):o+=s,0!=o&&null!=n&&(s=mxUtils.toRadians(o),a=Math.cos(s),r=Math.sin(s),n=mxUtils.getRotatedPoint(n,a,r,i))}return n},mxGraph.prototype.connectCell=function(e,t,n,a){this.model.beginUpdate();try{var i=this.model.getTerminal(e,n);this.cellConnected(e,t,n,a),this.fireEvent(new mxEventObject(mxEvent.CONNECT_CELL,"edge",e,"terminal",t,"source",n,"previous",i))}finally{this.model.endUpdate()}return e},mxGraph.prototype.cellConnected=function(e,t,n,a){if(null!=e){this.model.beginUpdate();try{var i=this.model.getTerminal(e,n);this.setConnectionConstraint(e,t,n,a),this.isPortsEnabled()&&(a=null,this.isPort(t)&&(a=t.getId(),t=this.getTerminalForPort(t,n)),this.setCellStyles(n?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT,a,[e])),this.model.setTerminal(e,t,n),this.resetEdgesOnConnect&&this.resetEdge(e),this.fireEvent(new mxEventObject(mxEvent.CELL_CONNECTED,"edge",e,"terminal",t,"source",n,"previous",i))}finally{this.model.endUpdate()}}},mxGraph.prototype.disconnectGraph=function(e){if(null!=e){this.model.beginUpdate();try{for(var t=this.view.scale,n=this.view.translate,a={},i=0;i<e.length;i++){a[mxCellPath.create(e[i])]=e[i]}for(i=0;i<e.length;i++)if(this.model.isEdge(e[i])){if(null!=(r=this.model.getGeometry(e[i]))){var o=this.view.getState(e[i]),s=this.view.getState(this.model.getParent(e[i]));if(null!=o&&null!=s){var r=r.clone(),l=-s.origin.x,d=-s.origin.y,c=o.absolutePoints,m=this.model.getTerminal(e[i],!0);if(null!=m&&this.isCellDisconnectable(e[i],m,!0)){for(var u=mxCellPath.create(m);null!=m&&null==a[u];)m=this.model.getParent(m),u=mxCellPath.create(m);null==m&&(r.setTerminalPoint(new mxPoint(c[0].x/t-n.x+l,c[0].y/t-n.y+d),!0),this.model.setTerminal(e[i],null,!0))}var p=this.model.getTerminal(e[i],!1);if(null!=p&&this.isCellDisconnectable(e[i],p,!1)){for(var g=mxCellPath.create(p);null!=p&&null==a[g];)p=this.model.getParent(p),g=mxCellPath.create(p);if(null==p){var v=c.length-1;r.setTerminalPoint(new mxPoint(c[v].x/t-n.x+l,c[v].y/t-n.y+d),!1),this.model.setTerminal(e[i],null,!1)}}this.model.setGeometry(e[i],r)}}}}finally{this.model.endUpdate()}}},mxGraph.prototype.getCurrentRoot=function(){return this.view.currentRoot},mxGraph.prototype.getTranslateForRoot=function(e){return null},mxGraph.prototype.isPort=function(e){return!1},mxGraph.prototype.getTerminalForPort=function(e,t){return this.model.getParent(e)},mxGraph.prototype.getChildOffsetForCell=function(e){return null},mxGraph.prototype.enterGroup=function(e){null!=(e=e||this.getSelectionCell())&&this.isValidRoot(e)&&(this.view.setCurrentRoot(e),this.clearSelection())},mxGraph.prototype.exitGroup=function(){var e=this.model.getRoot(),t=this.getCurrentRoot();if(null!=t){for(var n=this.model.getParent(t);n!=e&&!this.isValidRoot(n)&&this.model.getParent(n)!=e;)n=this.model.getParent(n);n==e||this.model.getParent(n)==e?this.view.setCurrentRoot(null):this.view.setCurrentRoot(n),null!=this.view.getState(t)&&this.setSelectionCell(t)}},mxGraph.prototype.home=function(){var e=this.getCurrentRoot();null!=e&&(this.view.setCurrentRoot(null),null!=this.view.getState(e)&&this.setSelectionCell(e))},mxGraph.prototype.isValidRoot=function(e){return null!=e},mxGraph.prototype.getGraphBounds=function(){return this.view.getGraphBounds()},mxGraph.prototype.getCellBounds=function(e,t,n){var a=[e];if(t&&(a=a.concat(this.model.getEdges(e))),a=this.view.getBounds(a),n){n=this.model.getChildCount(e);for(var i=0;i<n;i++){var o=this.getCellBounds(this.model.getChildAt(e,i),t,!0);null!=a?a.add(o):a=o}}return a},mxGraph.prototype.getBoundingBoxFromGeometry=function(e,t){t=null!=t&&t;var n=null;if(null!=e)for(var a=0;a<e.length;a++)if(t||this.model.isVertex(e[a])){var i=this.getCellGeometry(e[a]);if(null!=i){var o=i.points;if(null!=o&&0<o.length){for(var s=new mxRectangle(o[0].x,o[0].y,0,0),r=function(e){null!=e&&s.add(new mxRectangle(e.x,e.y,0,0))},l=1;l<o.length;l++)r(o[l]);r(i.getTerminalPoint(!0)),r(i.getTerminalPoint(!1))}null==n?n=new mxRectangle(i.x,i.y,i.width,i.height):n.add(i)}}return n},mxGraph.prototype.refresh=function(e){this.view.clear(e,null==e),this.view.validate(),this.sizeDidChange(),this.fireEvent(new mxEventObject(mxEvent.REFRESH))},mxGraph.prototype.snap=function(e){return this.gridEnabled&&(e=Math.round(e/this.gridSize)*this.gridSize),e},mxGraph.prototype.panGraph=function(e,t){if(this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container))this.container.scrollLeft=-e,this.container.scrollTop=-t;else{var n=this.view.getCanvas();if(this.dialect==mxConstants.DIALECT_SVG)if(0==e&&0==t){if(mxClient.IS_IE?n.setAttribute("transform","translate("+e+","+t+")"):n.removeAttribute("transform"),null!=this.shiftPreview1){for(var a=this.shiftPreview1.firstChild;null!=a;){var i=a.nextSibling;this.container.appendChild(a),a=i}for(this.shiftPreview1.parentNode.removeChild(this.shiftPreview1),this.shiftPreview1=null,this.container.appendChild(n.parentNode),a=this.shiftPreview2.firstChild;null!=a;)i=a.nextSibling,this.container.appendChild(a),a=i;this.shiftPreview2.parentNode.removeChild(this.shiftPreview2),this.shiftPreview2=null}}else{if(n.setAttribute("transform","translate("+e+","+t+")"),null==this.shiftPreview1){this.shiftPreview1=document.createElement("div"),this.shiftPreview1.style.position="absolute",this.shiftPreview1.style.overflow="visible",this.shiftPreview2=document.createElement("div"),this.shiftPreview2.style.position="absolute",this.shiftPreview2.style.overflow="visible";var o=this.shiftPreview1;for(a=this.container.firstChild;null!=a;)i=a.nextSibling,a!=n.parentNode?o.appendChild(a):o=this.shiftPreview2,a=i;this.container.insertBefore(this.shiftPreview1,n.parentNode),this.container.appendChild(this.shiftPreview2)}this.shiftPreview1.style.left=e+"px",this.shiftPreview1.style.top=t+"px",this.shiftPreview2.style.left=e+"px",this.shiftPreview2.style.top=t+"px"}else n.style.left=e+"px",n.style.top=t+"px";this.panDx=e,this.panDy=t,this.fireEvent(new mxEventObject(mxEvent.PAN))}},mxGraph.prototype.zoomIn=function(){this.zoom(this.zoomFactor)},mxGraph.prototype.zoomOut=function(){this.zoom(1/this.zoomFactor)},mxGraph.prototype.zoomActual=function(){1==this.view.scale?this.view.setTranslate(0,0):(this.view.translate.x=0,this.view.translate.y=0,this.view.setScale(1))},mxGraph.prototype.zoomTo=function(e,t){this.zoom(e/this.view.scale,t)},mxGraph.prototype.zoom=function(e,t){t=null!=t?t:this.centerZoom;var n=this.view.scale*e,a=this.view.getState(this.getSelectionCell());if(this.keepSelectionVisibleOnZoom&&null!=a)a=new mxRectangle(a.x*e,a.y*e,a.width*e,a.height*e),this.view.scale=n,this.scrollRectToVisible(a)||(this.view.revalidate(),this.view.setScale(n));else if(t&&!mxUtils.hasScrollbars(this.container)){a=this.container.offsetWidth;var i=this.container.offsetHeight;if(1<e){var o=(e-1)/(2*n);a=a*-o,i=i*-o}else a*=o=(1/e-1)/(2*this.view.scale),i*=o;this.view.scaleAndTranslate(n,this.view.translate.x+a,this.view.translate.y+i)}else this.view.setScale(n),mxUtils.hasScrollbars(this.container)&&(i=a=0,t&&(a=this.container.offsetWidth*(e-1)/2,i=this.container.offsetHeight*(e-1)/2),this.container.scrollLeft=Math.round(this.container.scrollLeft*e+a),this.container.scrollTop=Math.round(this.container.scrollTop*e+i))},mxGraph.prototype.zoomToRect=function(e){var t=this.container.clientWidth/e.width/(this.container.clientHeight/e.height);e.x=Math.max(0,e.x),e.y=Math.max(0,e.y);var n=Math.min(this.container.scrollWidth,e.x+e.width),a=Math.min(this.container.scrollHeight,e.y+e.height);e.width=n-e.x,e.height=a-e.y,t<1?(n=((t=e.height/t)-e.height)/2,e.height=t,t=Math.min(e.y,n),e.y-=t,a=Math.min(this.container.scrollHeight,e.y+e.height),e.height=a-e.y):(n=((t*=e.width)-e.width)/2,e.width=t,t=Math.min(e.x,n),e.x-=t,n=Math.min(this.container.scrollWidth,e.x+e.width),e.width=n-e.x),t=this.container.clientWidth/e.width,n=this.view.scale*t,mxUtils.hasScrollbars(this.container)?(this.view.setScale(n),this.container.scrollLeft=Math.round(e.x*t),this.container.scrollTop=Math.round(e.y*t)):this.view.scaleAndTranslate(n,this.view.translate.x-e.x/this.view.scale,this.view.translate.y-e.y/this.view.scale)},mxGraph.prototype.fit=function(e,t){if(null!=this.container){e=null!=e?e:0,t=null!=t&&t;var n=this.container.clientWidth,a=this.container.clientHeight,i=this.view.getGraphBounds();t&&null!=i.x&&null!=i.y&&(i.width+=i.x,i.height+=i.y,i.x=0,i.y=0);var o=this.view.scale,s=i.width/o,r=i.height/o;null!=this.backgroundImage&&(s=Math.max(s,this.backgroundImage.width-i.x/o),r=Math.max(r,this.backgroundImage.height-i.y/o));var l=t?e:2*e;n=Math.floor(100*Math.min(n/(s+l),a/(r+l)))/100;null!=this.minFitScale&&(n=Math.max(n,this.minFitScale)),null!=this.maxFitScale&&(n=Math.min(n,this.maxFitScale)),t?this.view.scale!=n&&this.view.setScale(n):mxUtils.hasScrollbars(this.container)?(this.view.setScale(n),null!=i.x&&(this.container.scrollLeft=Math.round(i.x/o)*n-e-Math.max(0,(this.container.clientWidth-s*n)/2)),null!=i.y&&(this.container.scrollTop=Math.round(i.y/o)*n-e-Math.max(0,(this.container.clientHeight-r*n)/2))):this.view.scaleAndTranslate(n,null!=i.x?Math.floor(this.view.translate.x-i.x/o+e+1):e,null!=i.y?Math.floor(this.view.translate.y-i.y/o+e+1):e)}return this.view.scale},mxGraph.prototype.scrollCellToVisible=function(e,t){var n=-this.view.translate.x,a=-this.view.translate.y,i=this.view.getState(e);null!=i&&(n=new mxRectangle(n+i.x,a+i.y,i.width,i.height),t&&null!=this.container&&(a=this.container.clientWidth,i=this.container.clientHeight,n.x=n.getCenterX()-a/2,n.width=a,n.y=n.getCenterY()-i/2,n.height=i),this.scrollRectToVisible(n)&&this.view.setTranslate(this.view.translate.x,this.view.translate.y))},mxGraph.prototype.scrollRectToVisible=function(e){var t=!1;if(null!=e){var n=this.container.offsetWidth,a=this.container.offsetHeight,i=Math.min(n,e.width),o=Math.min(a,e.height);if(mxUtils.hasScrollbars(this.container)){n=this.container,e.x+=this.view.translate.x,e.y+=this.view.translate.y;var s=n.scrollLeft-e.x;a=Math.max(s-n.scrollLeft,0);0<s?n.scrollLeft-=s+2:0<(s=e.x+i-n.scrollLeft-n.clientWidth)&&(n.scrollLeft+=s+2),i=n.scrollTop-e.y,s=Math.max(0,i-n.scrollTop),0<i?n.scrollTop-=i+2:0<(i=e.y+o-n.scrollTop-n.clientHeight)&&(n.scrollTop+=i+2),!this.useScrollbarsForPanning&&(0!=a||0!=s)&&this.view.setTranslate(a,s)}else{s=-this.view.translate.x;var r=-this.view.translate.y,l=this.view.scale;e.x+i>s+n&&(this.view.translate.x-=(e.x+i-n-s)/l,t=!0),e.y+o>r+a&&(this.view.translate.y-=(e.y+o-a-r)/l,t=!0),e.x<s&&(this.view.translate.x+=(s-e.x)/l,t=!0),e.y<r&&(this.view.translate.y+=(r-e.y)/l,t=!0),t&&(this.view.refresh(),null!=this.selectionCellsHandler&&this.selectionCellsHandler.refresh())}}return t},mxGraph.prototype.getCellGeometry=function(e){return this.model.getGeometry(e)},mxGraph.prototype.isCellVisible=function(e){return this.model.isVisible(e)},mxGraph.prototype.isCellCollapsed=function(e){return this.model.isCollapsed(e)},mxGraph.prototype.isCellConnectable=function(e){return this.model.isConnectable(e)},mxGraph.prototype.isOrthogonal=function(e){var t=e.style[mxConstants.STYLE_ORTHOGONAL];return null!=t?t:(e=this.view.getEdgeStyle(e))==mxEdgeStyle.SegmentConnector||e==mxEdgeStyle.ElbowConnector||e==mxEdgeStyle.SideToSide||e==mxEdgeStyle.TopToBottom||e==mxEdgeStyle.EntityRelation||e==mxEdgeStyle.OrthConnector},mxGraph.prototype.isLoop=function(e){var t=e.getVisibleTerminalState(!0);return e=e.getVisibleTerminalState(!1),null!=t&&t==e},mxGraph.prototype.isCloneEvent=function(e){return mxEvent.isControlDown(e)},mxGraph.prototype.isToggleEvent=function(e){return mxClient.IS_MAC?mxEvent.isMetaDown(e):mxEvent.isControlDown(e)},mxGraph.prototype.isGridEnabledEvent=function(e){return null!=e&&!mxEvent.isAltDown(e)},mxGraph.prototype.isConstrainedEvent=function(e){return mxEvent.isShiftDown(e)},mxGraph.prototype.isForceMarqueeEvent=function(e){return mxEvent.isAltDown(e)},mxGraph.prototype.validationAlert=function(e){mxUtils.alert(e)},mxGraph.prototype.isEdgeValid=function(e,t,n){return null==this.getEdgeValidationError(e,t,n)},mxGraph.prototype.getEdgeValidationError=function(e,t,n){if(null!=e&&!this.isAllowDanglingEdges()&&(null==t||null==n))return"";if(null!=e&&null==this.model.getTerminal(e,!0)&&null==this.model.getTerminal(e,!1))return null;if(!this.allowLoops&&t==n&&null!=t||!this.isValidConnection(t,n))return"";if(null!=t&&null!=n){var a="";if(!this.multigraph)(1<(i=this.model.getEdgesBetween(t,n,!0)).length||1==i.length&&i[0]!=e)&&(a+=(mxResources.get(this.alreadyConnectedResource)||this.alreadyConnectedResource)+"\n");var i=this.model.getDirectedEdgeCount(t,!0,e),o=this.model.getDirectedEdgeCount(n,!1,e);if(null!=this.multiplicities)for(var s=0;s<this.multiplicities.length;s++){var r=this.multiplicities[s].check(this,e,t,n,i,o);null!=r&&(a+=r)}return null!=(r=this.validateEdge(e,t,n))&&(a+=r),0<a.length?a:null}return this.allowDanglingEdges?null:""},mxGraph.prototype.validateEdge=function(e,t,n){return null},mxGraph.prototype.validateGraph=function(e,t){e=null!=e?e:this.model.getRoot(),t=null!=t?t:{};for(var n=!0,a=this.model.getChildCount(e),i=0;i<a;i++){var o=this.model.getChildAt(e,i),s=t;this.isValidRoot(o)&&(s={}),null!=(s=this.validateGraph(o,s))?this.setCellWarning(o,s.replace(/\n/g,"<br>")):this.setCellWarning(o,null),n=n&&null==s}return a="",this.isCellCollapsed(e)&&!n&&(a+=(mxResources.get(this.containsValidationErrorsResource)||this.containsValidationErrorsResource)+"\n"),a=this.model.isEdge(e)?a+(this.getEdgeValidationError(e,this.model.getTerminal(e,!0),this.model.getTerminal(e,!1))||""):a+(this.getCellValidationError(e)||""),null!=(i=this.validateCell(e,t))&&(a+=i),null==this.model.getParent(e)&&this.view.validate(),0<a.length||!n?a:null},mxGraph.prototype.getCellValidationError=function(e){var t=this.model.getDirectedEdgeCount(e,!0),n=this.model.getDirectedEdgeCount(e,!1);e=this.model.getValue(e);var a="";if(null!=this.multiplicities)for(var i=0;i<this.multiplicities.length;i++){var o=this.multiplicities[i];o.source&&mxUtils.isNode(e,o.type,o.attr,o.value)&&(0==o.max&&0<t||1==o.min&&0==t||1==o.max&&1<t)?a+=o.countError+"\n":!o.source&&mxUtils.isNode(e,o.type,o.attr,o.value)&&(0==o.max&&0<n||1==o.min&&0==n||1==o.max&&1<n)&&(a+=o.countError+"\n")}return 0<a.length?a:null},mxGraph.prototype.validateCell=function(e,t){return null},mxGraph.prototype.getBackgroundImage=function(){return this.backgroundImage},mxGraph.prototype.setBackgroundImage=function(e){this.backgroundImage=e},mxGraph.prototype.getFoldingImage=function(e){if(null!=e&&this.foldingEnabled&&!this.getModel().isEdge(e.cell)){var t=this.isCellCollapsed(e.cell);if(this.isCellFoldable(e.cell,!t))return t?this.collapsedImage:this.expandedImage}return null},mxGraph.prototype.convertValueToString=function(e){if(null!=(e=this.model.getValue(e))){if(mxUtils.isNode(e))return e.nodeName;if("function"==typeof e.toString)return e.toString()}return""},mxGraph.prototype.getLabel=function(e){var t="";if(this.labelsVisible&&null!=e){var n=null!=(n=this.view.getState(e))?n.style:this.getCellStyle(e);mxUtils.getValue(n,mxConstants.STYLE_NOLABEL,!1)||(t=this.convertValueToString(e))}return t},mxGraph.prototype.isHtmlLabel=function(e){return this.isHtmlLabels()},mxGraph.prototype.isHtmlLabels=function(){return this.htmlLabels},mxGraph.prototype.setHtmlLabels=function(e){this.htmlLabels=e},mxGraph.prototype.isWrapping=function(e){var t=this.view.getState(e);return null!=(e=null!=t?t.style:this.getCellStyle(e))&&"wrap"==e[mxConstants.STYLE_WHITE_SPACE]},mxGraph.prototype.isLabelClipped=function(e){var t=this.view.getState(e);return null!=(e=null!=t?t.style:this.getCellStyle(e))&&"hidden"==e[mxConstants.STYLE_OVERFLOW]},mxGraph.prototype.getTooltip=function(e,n,t,a){var i=null;return null!=e&&(null==e.control||n!=e.control.node&&n.parentNode!=e.control.node||(i=this.collapseExpandResource,i=mxResources.get(i)||i),null==i&&null!=e.overlays&&e.overlays.visit(function(e,t){null!=i||n!=t.node&&n.parentNode!=t.node||(i=t.overlay.toString())}),null==i&&(null!=(t=this.selectionCellsHandler.getHandler(e.cell))&&"function"==typeof t.getTooltipForNode&&(i=t.getTooltipForNode(n))),null==i&&(i=this.getTooltipForCell(e.cell))),i},mxGraph.prototype.getTooltipForCell=function(e){return null!=e&&null!=e.getTooltip?e.getTooltip():this.convertValueToString(e)},mxGraph.prototype.getCursorForCell=function(e){return null},mxGraph.prototype.getStartSize=function(e){var t=new mxRectangle,n=this.view.getState(e);return null!=(e=null!=n?n.style:this.getCellStyle(e))&&(n=parseInt(mxUtils.getValue(e,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),mxUtils.getValue(e,mxConstants.STYLE_HORIZONTAL,!0)?t.height=n:t.width=n),t},mxGraph.prototype.getImage=function(e){return null!=e&&null!=e.style?e.style[mxConstants.STYLE_IMAGE]:null},mxGraph.prototype.getVerticalAlign=function(e){return null!=e&&null!=e.style?e.style[mxConstants.STYLE_VERTICAL_ALIGN]||mxConstants.ALIGN_MIDDLE:null},mxGraph.prototype.getIndicatorColor=function(e){return null!=e&&null!=e.style?e.style[mxConstants.STYLE_INDICATOR_COLOR]:null},mxGraph.prototype.getIndicatorGradientColor=function(e){return null!=e&&null!=e.style?e.style[mxConstants.STYLE_INDICATOR_GRADIENTCOLOR]:null},mxGraph.prototype.getIndicatorShape=function(e){return null!=e&&null!=e.style?e.style[mxConstants.STYLE_INDICATOR_SHAPE]:null},mxGraph.prototype.getIndicatorImage=function(e){return null!=e&&null!=e.style?e.style[mxConstants.STYLE_INDICATOR_IMAGE]:null},mxGraph.prototype.getBorder=function(){return this.border},mxGraph.prototype.setBorder=function(e){this.border=e},mxGraph.prototype.isSwimlane=function(e){var t;if(null!=e&&this.model.getParent(e)!=this.model.getRoot()&&(null!=(t=null!=(t=this.view.getState(e))?t.style:this.getCellStyle(e))&&!this.model.isEdge(e)))return t[mxConstants.STYLE_SHAPE]==mxConstants.SHAPE_SWIMLANE;return!1},mxGraph.prototype.isResizeContainer=function(){return this.resizeContainer},mxGraph.prototype.setResizeContainer=function(e){this.resizeContainer=e},mxGraph.prototype.isEnabled=function(){return this.enabled},mxGraph.prototype.setEnabled=function(e){this.enabled=e},mxGraph.prototype.isEscapeEnabled=function(){return this.escapeEnabled},mxGraph.prototype.setEscapeEnabled=function(e){this.escapeEnabled=e},mxGraph.prototype.isInvokesStopCellEditing=function(){return this.invokesStopCellEditing},mxGraph.prototype.setInvokesStopCellEditing=function(e){this.invokesStopCellEditing=e},mxGraph.prototype.isEnterStopsCellEditing=function(){return this.enterStopsCellEditing},mxGraph.prototype.setEnterStopsCellEditing=function(e){this.enterStopsCellEditing=e},mxGraph.prototype.isCellLocked=function(e){var t=this.model.getGeometry(e);return this.isCellsLocked()||null!=t&&this.model.isVertex(e)&&t.relative},mxGraph.prototype.isCellsLocked=function(){return this.cellsLocked},mxGraph.prototype.setCellsLocked=function(e){this.cellsLocked=e},mxGraph.prototype.getCloneableCells=function(e){return this.model.filterCells(e,mxUtils.bind(this,function(e){return this.isCellCloneable(e)}))},mxGraph.prototype.isCellCloneable=function(e){var t=this.view.getState(e);return e=null!=t?t.style:this.getCellStyle(e),this.isCellsCloneable()&&0!=e[mxConstants.STYLE_CLONEABLE]},mxGraph.prototype.isCellsCloneable=function(){return this.cellsCloneable},mxGraph.prototype.setCellsCloneable=function(e){this.cellsCloneable=e},mxGraph.prototype.getExportableCells=function(e){return this.model.filterCells(e,mxUtils.bind(this,function(e){return this.canExportCell(e)}))},mxGraph.prototype.canExportCell=function(e){return this.exportEnabled},mxGraph.prototype.getImportableCells=function(e){return this.model.filterCells(e,mxUtils.bind(this,function(e){return this.canImportCell(e)}))},mxGraph.prototype.canImportCell=function(e){return this.importEnabled},mxGraph.prototype.isCellSelectable=function(e){return this.isCellsSelectable()},mxGraph.prototype.isCellsSelectable=function(){return this.cellsSelectable},mxGraph.prototype.setCellsSelectable=function(e){this.cellsSelectable=e},mxGraph.prototype.getDeletableCells=function(e){return this.model.filterCells(e,mxUtils.bind(this,function(e){return this.isCellDeletable(e)}))},mxGraph.prototype.isCellDeletable=function(e){var t=this.view.getState(e);return e=null!=t?t.style:this.getCellStyle(e),this.isCellsDeletable()&&0!=e[mxConstants.STYLE_DELETABLE]},mxGraph.prototype.isCellsDeletable=function(){return this.cellsDeletable},mxGraph.prototype.setCellsDeletable=function(e){this.cellsDeletable=e},mxGraph.prototype.isLabelMovable=function(e){return!this.isCellLocked(e)&&(this.model.isEdge(e)&&this.edgeLabelsMovable||this.model.isVertex(e)&&this.vertexLabelsMovable)},mxGraph.prototype.getMovableCells=function(e){return this.model.filterCells(e,mxUtils.bind(this,function(e){return this.isCellMovable(e)}))},mxGraph.prototype.isCellMovable=function(e){var t=null!=(t=this.view.getState(e))?t.style:this.getCellStyle(e);return this.isCellsMovable()&&!this.isCellLocked(e)&&0!=t[mxConstants.STYLE_MOVABLE]},mxGraph.prototype.isCellsMovable=function(){return this.cellsMovable},mxGraph.prototype.setCellsMovable=function(e){this.cellsMovable=e},mxGraph.prototype.isGridEnabled=function(){return this.gridEnabled},mxGraph.prototype.setGridEnabled=function(e){this.gridEnabled=e},mxGraph.prototype.isPortsEnabled=function(){return this.portsEnabled},mxGraph.prototype.setPortsEnabled=function(e){this.portsEnabled=e},mxGraph.prototype.getGridSize=function(){return this.gridSize},mxGraph.prototype.setGridSize=function(e){this.gridSize=e},mxGraph.prototype.getTolerance=function(){return this.tolerance},mxGraph.prototype.setTolerance=function(e){this.tolerance=e},mxGraph.prototype.isVertexLabelsMovable=function(){return this.vertexLabelsMovable},mxGraph.prototype.setVertexLabelsMovable=function(e){this.vertexLabelsMovable=e},mxGraph.prototype.isEdgeLabelsMovable=function(){return this.edgeLabelsMovable},mxGraph.prototype.setEdgeLabelsMovable=function(e){this.edgeLabelsMovable=e},mxGraph.prototype.isSwimlaneNesting=function(){return this.swimlaneNesting},mxGraph.prototype.setSwimlaneNesting=function(e){this.swimlaneNesting=e},mxGraph.prototype.isSwimlaneSelectionEnabled=function(){return this.swimlaneSelectionEnabled},mxGraph.prototype.setSwimlaneSelectionEnabled=function(e){this.swimlaneSelectionEnabled=e},mxGraph.prototype.isMultigraph=function(){return this.multigraph},mxGraph.prototype.setMultigraph=function(e){this.multigraph=e},mxGraph.prototype.isAllowLoops=function(){return this.allowLoops},mxGraph.prototype.setAllowDanglingEdges=function(e){this.allowDanglingEdges=e},mxGraph.prototype.isAllowDanglingEdges=function(){return this.allowDanglingEdges},mxGraph.prototype.setConnectableEdges=function(e){this.connectableEdges=e},mxGraph.prototype.isConnectableEdges=function(){return this.connectableEdges},mxGraph.prototype.setCloneInvalidEdges=function(e){this.cloneInvalidEdges=e},mxGraph.prototype.isCloneInvalidEdges=function(){return this.cloneInvalidEdges},mxGraph.prototype.setAllowLoops=function(e){this.allowLoops=e},mxGraph.prototype.isDisconnectOnMove=function(){return this.disconnectOnMove},mxGraph.prototype.setDisconnectOnMove=function(e){this.disconnectOnMove=e},mxGraph.prototype.isDropEnabled=function(){return this.dropEnabled},mxGraph.prototype.setDropEnabled=function(e){this.dropEnabled=e},mxGraph.prototype.isSplitEnabled=function(){return this.splitEnabled},mxGraph.prototype.setSplitEnabled=function(e){this.splitEnabled=e},mxGraph.prototype.isCellResizable=function(e){var t=null!=(t=this.view.getState(e))?t.style:this.getCellStyle(e);return this.isCellsResizable()&&!this.isCellLocked(e)&&0!=t[mxConstants.STYLE_RESIZABLE]},mxGraph.prototype.isCellsResizable=function(){return this.cellsResizable},mxGraph.prototype.setCellsResizable=function(e){this.cellsResizable=e},mxGraph.prototype.isTerminalPointMovable=function(e,t){return!0},mxGraph.prototype.isCellBendable=function(e){var t=null!=(t=this.view.getState(e))?t.style:this.getCellStyle(e);return this.isCellsBendable()&&!this.isCellLocked(e)&&0!=t[mxConstants.STYLE_BENDABLE]},mxGraph.prototype.isCellsBendable=function(){return this.cellsBendable},mxGraph.prototype.setCellsBendable=function(e){this.cellsBendable=e},mxGraph.prototype.isCellEditable=function(e){var t=null!=(t=this.view.getState(e))?t.style:this.getCellStyle(e);return this.isCellsEditable()&&!this.isCellLocked(e)&&0!=t[mxConstants.STYLE_EDITABLE]},mxGraph.prototype.isCellsEditable=function(){return this.cellsEditable},mxGraph.prototype.setCellsEditable=function(e){this.cellsEditable=e},mxGraph.prototype.isCellDisconnectable=function(e,t,n){return this.isCellsDisconnectable()&&!this.isCellLocked(e)},mxGraph.prototype.isCellsDisconnectable=function(){return this.cellsDisconnectable},mxGraph.prototype.setCellsDisconnectable=function(e){this.cellsDisconnectable=e},mxGraph.prototype.isValidSource=function(e){return null==e&&this.allowDanglingEdges||null!=e&&(!this.model.isEdge(e)||this.connectableEdges)&&this.isCellConnectable(e)},mxGraph.prototype.isValidTarget=function(e){return this.isValidSource(e)},mxGraph.prototype.isValidConnection=function(e,t){return this.isValidSource(e)&&this.isValidTarget(t)},mxGraph.prototype.setConnectable=function(e){this.connectionHandler.setEnabled(e)},mxGraph.prototype.isConnectable=function(e){return this.connectionHandler.isEnabled()},mxGraph.prototype.setTooltips=function(e){this.tooltipHandler.setEnabled(e)},mxGraph.prototype.setPanning=function(e){this.panningHandler.panningEnabled=e},mxGraph.prototype.isEditing=function(e){if(null!=this.cellEditor){var t=this.cellEditor.getEditingCell();return null==e?null!=t:e==t}return!1},mxGraph.prototype.isAutoSizeCell=function(e){var t=this.view.getState(e);return e=null!=t?t.style:this.getCellStyle(e),this.isAutoSizeCells()||1==e[mxConstants.STYLE_AUTOSIZE]},mxGraph.prototype.isAutoSizeCells=function(){return this.autoSizeCells},mxGraph.prototype.setAutoSizeCells=function(e){this.autoSizeCells=e},mxGraph.prototype.isExtendParent=function(e){return!this.getModel().isEdge(e)&&this.isExtendParents()},mxGraph.prototype.isExtendParents=function(){return this.extendParents},mxGraph.prototype.setExtendParents=function(e){this.extendParents=e},mxGraph.prototype.isExtendParentsOnAdd=function(){return this.extendParentsOnAdd},mxGraph.prototype.setExtendParentsOnAdd=function(e){this.extendParentsOnAdd=e},mxGraph.prototype.isConstrainChild=function(e){return this.isConstrainChildren()&&!this.getModel().isEdge(this.getModel().getParent(e))},mxGraph.prototype.isConstrainChildren=function(){return this.constrainChildren},mxGraph.prototype.setConstrainChildren=function(e){this.constrainChildren=e},mxGraph.prototype.isAllowNegativeCoordinates=function(){return this.allowNegativeCoordinates},mxGraph.prototype.setAllowNegativeCoordinates=function(e){this.allowNegativeCoordinates=e},mxGraph.prototype.getOverlap=function(e){return this.isAllowOverlapParent(e)?this.defaultOverlap:0},mxGraph.prototype.isAllowOverlapParent=function(e){return!1},mxGraph.prototype.getFoldableCells=function(e,t){return this.model.filterCells(e,mxUtils.bind(this,function(e){return this.isCellFoldable(e,t)}))},mxGraph.prototype.isCellFoldable=function(e,t){var n=null!=(n=this.view.getState(e))?n.style:this.getCellStyle(e);return 0<this.model.getChildCount(e)&&0!=n[mxConstants.STYLE_FOLDABLE]},mxGraph.prototype.isValidDropTarget=function(e,t,n){return null!=e&&(this.isSplitEnabled()&&this.isSplitTarget(e,t,n)||!this.model.isEdge(e)&&(this.isSwimlane(e)||0<this.model.getChildCount(e)&&!this.isCellCollapsed(e)))},mxGraph.prototype.isSplitTarget=function(e,t,n){return!(!this.model.isEdge(e)||null==t||1!=t.length||!this.isCellConnectable(t[0])||null!=this.getEdgeValidationError(e,this.model.getTerminal(e,!0),t[0]))&&(n=this.model.getTerminal(e,!0),e=this.model.getTerminal(e,!1),!this.model.isAncestor(t[0],n)&&!this.model.isAncestor(t[0],e))},mxGraph.prototype.getDropTarget=function(e,t,n){if(!this.isSwimlaneNesting())for(var a=0;a<e.length;a++)if(this.isSwimlane(e[a]))return null;if((a=mxUtils.convertPoint(this.container,mxEvent.getClientX(t),mxEvent.getClientY(t))).x-=this.panDx,a.y-=this.panDy,a=this.getSwimlaneAt(a.x,a.y),null==n)n=a;else if(null!=a){for(var i=this.model.getParent(a);null!=i&&this.isSwimlane(i)&&i!=n;)i=this.model.getParent(i);i==n&&(n=a)}for(;null!=n&&!this.isValidDropTarget(n,e,t)&&!this.model.isLayer(n);)n=this.model.getParent(n);return!this.model.isLayer(n)&&mxUtils.indexOf(e,n)<0?n:null},mxGraph.prototype.getDefaultParent=function(){var e=this.defaultParent;return null==e&&(null==(e=this.getCurrentRoot())&&(e=this.model.getRoot(),e=this.model.getChildAt(e,0))),e},mxGraph.prototype.setDefaultParent=function(e){this.defaultParent=e},mxGraph.prototype.getSwimlane=function(e){for(;null!=e&&!this.isSwimlane(e);)e=this.model.getParent(e);return e},mxGraph.prototype.getSwimlaneAt=function(e,t,n){if(null!=(n=n||this.getDefaultParent()))for(var a=this.model.getChildCount(n),i=0;i<a;i++){var o=this.model.getChildAt(n,i),s=this.getSwimlaneAt(e,t,o);if(null!=s)return s;if(this.isSwimlane(o)&&(s=this.view.getState(o),this.intersects(s,e,t)))return o}return null},mxGraph.prototype.getCellAt=function(e,t,n,a,i){if(a=null==a||a,i=null==i||i,null!=(n=null!=n?n:this.getDefaultParent()))for(var o=this.model.getChildCount(n)-1;0<=o;o--){var s=this.model.getChildAt(n,o),r=this.getCellAt(e,t,s,a,i);if(null!=r)return r;if(this.isCellVisible(s)&&(i&&this.model.isEdge(s)||a&&this.model.isVertex(s))&&(r=this.view.getState(s),this.intersects(r,e,t)))return s}return null},mxGraph.prototype.intersects=function(e,t,n){if(null!=e){var a=e.absolutePoints;if(null!=a){e=this.tolerance*this.tolerance;for(var i=a[0],o=1;o<a.length;o++){var s=a[o];if(mxUtils.ptSegDistSq(i.x,i.y,s.x,s.y,t,n)<=e)return!0;i=s}}else if(0!=(i=mxUtils.toRadians(mxUtils.getValue(e.style,mxConstants.STYLE_ROTATION)||0))&&(a=Math.cos(-i),i=Math.sin(-i),o=new mxPoint(e.getCenterX(),e.getCenterY()),t=(i=mxUtils.getRotatedPoint(new mxPoint(t,n),a,i,o)).x,n=i.y),mxUtils.contains(e,t,n))return!0}return!1},mxGraph.prototype.hitsSwimlaneContent=function(e,t,n){var a=this.getView().getState(e);if(e=this.getStartSize(e),null!=a){var i=this.getView().getScale();if(t-=a.x,n-=a.y,0<e.width&&0<t&&t>e.width*i||0<e.height&&0<n&&n>e.height*i)return!0}return!1},mxGraph.prototype.getChildVertices=function(e){return this.getChildCells(e,!0,!1)},mxGraph.prototype.getChildEdges=function(e){return this.getChildCells(e,!1,!0)},mxGraph.prototype.getChildCells=function(e,t,n){for(e=null!=e?e:this.getDefaultParent(),e=this.model.getChildCells(e,null!=t&&t,null!=n&&n),t=[],n=0;n<e.length;n++)this.isCellVisible(e[n])&&t.push(e[n]);return t},mxGraph.prototype.getConnections=function(e,t){return this.getEdges(e,t,!0,!0,!1)},mxGraph.prototype.getIncomingEdges=function(e,t){return this.getEdges(e,t,!0,!1,!1)},mxGraph.prototype.getOutgoingEdges=function(e,t){return this.getEdges(e,t,!1,!0,!1)},mxGraph.prototype.getEdges=function(e,t,n,a,i,o){n=null==n||n,a=null==a||a,i=null==i||i,o=null!=o&&o;for(var s=[],r=this.isCellCollapsed(e),l=this.model.getChildCount(e),d=0;d<l;d++){var c=this.model.getChildAt(e,d);!r&&this.isCellVisible(c)||(s=s.concat(this.model.getEdges(c,n,a)))}for(s=s.concat(this.model.getEdges(e,n,a)),r=[],d=0;d<s.length;d++)l=null!=(c=this.view.getState(s[d]))?c.getVisibleTerminal(!0):this.view.getVisibleTerminal(s[d],!0),c=null!=c?c.getVisibleTerminal(!1):this.view.getVisibleTerminal(s[d],!1),(i&&l==c||l!=c&&(n&&c==e&&(null==t||this.isValidAncestor(l,t,o))||a&&l==e&&(null==t||this.isValidAncestor(c,t,o))))&&r.push(s[d]);return r},mxGraph.prototype.isValidAncestor=function(e,t,n){return n?this.model.isAncestor(t,e):this.model.getParent(e)==t},mxGraph.prototype.getOpposites=function(e,t,n,a){n=null==n||n,a=null==a||a;var i=[],o={};if(null!=e)for(var s=0;s<e.length;s++){var r=null!=(l=this.view.getState(e[s]))?l.getVisibleTerminal(!0):this.view.getVisibleTerminal(e[s],!0),l=null!=l?l.getVisibleTerminal(!1):this.view.getVisibleTerminal(e[s],!1);if(r==t&&null!=l&&l!=t&&a){var d=mxCellPath.create(l);null==o[d]&&(o[d]=l,i.push(l))}else l==t&&null!=r&&r!=t&&n&&(null==o[d=mxCellPath.create(r)]&&(o[d]=r,i.push(r)))}return i},mxGraph.prototype.getEdgesBetween=function(e,t,n){n=null!=n&&n;for(var a=this.getEdges(e),i=[],o=0;o<a.length;o++){var s=null!=(r=this.view.getState(a[o]))?r.getVisibleTerminal(!0):this.view.getVisibleTerminal(a[o],!0),r=null!=r?r.getVisibleTerminal(!1):this.view.getVisibleTerminal(a[o],!1);(s==e&&r==t||!n&&s==t&&r==e)&&i.push(a[o])}return i},mxGraph.prototype.getPointForEvent=function(e,t){var n=mxUtils.convertPoint(this.container,mxEvent.getClientX(e),mxEvent.getClientY(e)),a=this.view.scale,i=this.view.translate,o=0!=t?this.gridSize/2:0;return n.x=this.snap(n.x/a-i.x-o),n.y=this.snap(n.y/a-i.y-o),n},mxGraph.prototype.getCells=function(e,t,n,a,i,o){if(o=null!=o?o:[],0<n||0<a){var s=e+n,r=t+a;if(null!=(i=i||this.getDefaultParent()))for(var l=this.model.getChildCount(i),d=0;d<l;d++){var c=this.model.getChildAt(i,d),m=this.view.getState(c);if(this.isCellVisible(c)&&null!=m){var u=m;0!=(m=mxUtils.getValue(m.style,mxConstants.STYLE_ROTATION)||0)&&(u=mxUtils.getBoundingBox(u,m)),u.x>=e&&u.y+u.height<=r&&u.y>=t&&u.x+u.width<=s?o.push(c):this.getCells(e,t,n,a,c,o)}}}return o},mxGraph.prototype.getCellsBeyond=function(e,t,n,a,i){var o=[];if((a||i)&&(null==n&&(n=this.getDefaultParent()),null!=n))for(var s=this.model.getChildCount(n),r=0;r<s;r++){var l=this.model.getChildAt(n,r),d=this.view.getState(l);this.isCellVisible(l)&&null!=d&&(!a||d.x>=e)&&(!i||d.y>=t)&&o.push(l)}return o},mxGraph.prototype.findTreeRoots=function(e,t,n){t=null!=t&&t,n=null!=n&&n;var a=[];if(null!=e){for(var i=this.getModel(),o=i.getChildCount(e),s=null,r=0,l=0;l<o;l++){var d=i.getChildAt(e,l);if(this.model.isVertex(d)&&this.isCellVisible(d)){for(var c=this.getConnections(d,t?e:null),m=0,u=0,p=0;p<c.length;p++)this.view.getVisibleTerminal(c[p],!0)==d?m++:u++;(n&&0==m&&0<u||!n&&0==u&&0<m)&&a.push(d),r<(c=n?u-m:m-u)&&(r=c,s=d)}}0==a.length&&null!=s&&a.push(s)}return a},mxGraph.prototype.traverse=function(e,t,n,a,i){if(null!=n&&null!=e){t=null==t||t,i=i||[];var o=mxCellPath.create(e);if(null==i[o]&&(null==(a=n(i[o]=e,a))||a)&&0<(a=this.model.getEdgeCount(e)))for(o=0;o<a;o++){var s=this.model.getEdgeAt(e,o),r=this.model.getTerminal(s,!0)==e;t&&!r||(r=this.model.getTerminal(s,!r),this.traverse(r,t,n,s,i))}}},mxGraph.prototype.isCellSelected=function(e){return this.getSelectionModel().isSelected(e)},mxGraph.prototype.isSelectionEmpty=function(){return this.getSelectionModel().isEmpty()},mxGraph.prototype.clearSelection=function(){return this.getSelectionModel().clear()},mxGraph.prototype.getSelectionCount=function(){return this.getSelectionModel().cells.length},mxGraph.prototype.getSelectionCell=function(){return this.getSelectionModel().cells[0]},mxGraph.prototype.getSelectionCells=function(){return this.getSelectionModel().cells.slice()},mxGraph.prototype.setSelectionCell=function(e){this.getSelectionModel().setCell(e)},mxGraph.prototype.setSelectionCells=function(e){this.getSelectionModel().setCells(e)},mxGraph.prototype.addSelectionCell=function(e){this.getSelectionModel().addCell(e)},mxGraph.prototype.addSelectionCells=function(e){this.getSelectionModel().addCells(e)},mxGraph.prototype.removeSelectionCell=function(e){this.getSelectionModel().removeCell(e)},mxGraph.prototype.removeSelectionCells=function(e){this.getSelectionModel().removeCells(e)},mxGraph.prototype.selectRegion=function(e,t){var n=this.getCells(e.x,e.y,e.width,e.height);return this.selectCellsForEvent(n,t),n},mxGraph.prototype.selectNextCell=function(){this.selectCell(!0)},mxGraph.prototype.selectPreviousCell=function(){this.selectCell()},mxGraph.prototype.selectParentCell=function(){this.selectCell(!1,!0)},mxGraph.prototype.selectChildCell=function(){this.selectCell(!1,!1,!0)},mxGraph.prototype.selectCell=function(e,t,n){var a=0<(i=this.selectionModel).cells.length?i.cells[0]:null;1<i.cells.length&&i.clear();var i=null!=a?this.model.getParent(a):this.getDefaultParent(),o=this.model.getChildCount(i);null==a&&0<o?(e=this.model.getChildAt(i,0),this.setSelectionCell(e)):null!=a&&!t||null==this.view.getState(i)||null==this.model.getGeometry(i)?null!=a&&n?0<this.model.getChildCount(a)&&(e=this.model.getChildAt(a,0),this.setSelectionCell(e)):0<o&&(t=i.getIndex(a),e?(t++,e=this.model.getChildAt(i,t%o)):(t--,e=this.model.getChildAt(i,t<0?o-1:t)),this.setSelectionCell(e)):this.getCurrentRoot()!=i&&this.setSelectionCell(i)},mxGraph.prototype.selectAll=function(e){e=e||this.getDefaultParent(),null!=(e=this.model.getChildren(e))&&this.setSelectionCells(e)},mxGraph.prototype.selectVertices=function(e){this.selectCells(!0,!1,e)},mxGraph.prototype.selectEdges=function(e){this.selectCells(!1,!0,e)},mxGraph.prototype.selectCells=function(t,n,e){e=e||this.getDefaultParent();var a=mxUtils.bind(this,function(e){return null!=this.view.getState(e)&&0==this.model.getChildCount(e)&&(this.model.isVertex(e)&&t||this.model.isEdge(e)&&n)});e=this.model.filterDescendants(a,e),this.setSelectionCells(e)},mxGraph.prototype.selectCellForEvent=function(e,t){var n=this.isCellSelected(e);this.isToggleEvent(t)?n?this.removeSelectionCell(e):this.addSelectionCell(e):(!n||1!=this.getSelectionCount())&&this.setSelectionCell(e)},mxGraph.prototype.selectCellsForEvent=function(e,t){this.isToggleEvent(t)?this.addSelectionCells(e):this.setSelectionCells(e)},mxGraph.prototype.createHandler=function(e){var t=null;return null!=e&&(this.model.isEdge(e.cell)?(t=this.view.getEdgeStyle(e),t=this.isLoop(e)||t==mxEdgeStyle.ElbowConnector||t==mxEdgeStyle.SideToSide||t==mxEdgeStyle.TopToBottom?new mxElbowEdgeHandler(e):t==mxEdgeStyle.SegmentConnector||t==mxEdgeStyle.OrthConnector?new mxEdgeSegmentHandler(e):new mxEdgeHandler(e)):t=new mxVertexHandler(e)),t},mxGraph.prototype.addMouseListener=function(e){null==this.mouseListeners&&(this.mouseListeners=[]),this.mouseListeners.push(e)},mxGraph.prototype.removeMouseListener=function(e){if(null!=this.mouseListeners)for(var t=0;t<this.mouseListeners.length;t++)if(this.mouseListeners[t]==e){this.mouseListeners.splice(t,1);break}},mxGraph.prototype.updateMouseEvent=function(e){if(null==e.graphX||null==e.graphY){var t=mxUtils.convertPoint(this.container,e.getX(),e.getY());e.graphX=t.x-this.panDx,e.graphY=t.y-this.panDy}},mxGraph.prototype.fireMouseEvent=function(e,t,n){if(null==n&&(n=this),this.updateMouseEvent(t),e==mxEvent.MOUSE_DOWN&&(this.isMouseDown=!0),mxClient.IS_TOUCH&&this.doubleTapEnabled&&e==mxEvent.MOUSE_DOWN){var a=(new Date).getTime();a-this.lastTouchTime<this.doubleTapTimeout&&Math.abs(this.lastTouchX-t.getX())<this.doubleTapTolerance&&Math.abs(this.lastTouchY-t.getY())<this.doubleTapTolerance?(this.lastTouchTime=0,this.dblClick(t.getEvent(),t.getCell()),t.getEvent().cancelBubble=!0):(this.lastTouchX=t.getX(),this.lastTouchY=t.getY(),this.lastTouchTime=a)}if(a=2!=t.getEvent().detail,mxClient.IS_IE&&"CSS1Compat"==document.compatMode&&((null!=this.lastMouseX&&Math.abs(this.lastMouseX-t.getX())>this.doubleTapTolerance||null!=this.lastMouseY&&Math.abs(this.lastMouseY-t.getY())>this.doubleTapTolerance)&&(a=!0),e==mxEvent.MOUSE_UP&&(this.lastMouseX=t.getX(),this.lastMouseY=t.getY())),(e!=mxEvent.MOUSE_UP||this.isMouseDown)&&a){if(e==mxEvent.MOUSE_UP&&(this.isMouseDown=!1),!this.isEditing()&&(mxClient.IS_OP||mxClient.IS_SF||mxClient.IS_GC||mxClient.IS_IE&&mxClient.IS_SVG||t.getEvent().target!=this.container)){if(e==mxEvent.MOUSE_MOVE&&this.isMouseDown&&this.autoScroll&&this.scrollPointToVisible(t.getGraphX(),t.getGraphY(),this.autoExtend),null!=this.mouseListeners)for(n=[n,t],t.getEvent().returnValue=!0,a=0;a<this.mouseListeners.length;a++){var i=this.mouseListeners[a];e==mxEvent.MOUSE_DOWN?i.mouseDown.apply(i,n):e==mxEvent.MOUSE_MOVE?i.mouseMove.apply(i,n):e==mxEvent.MOUSE_UP&&i.mouseUp.apply(i,n)}e==mxEvent.MOUSE_UP&&this.click(t)}}else e==mxEvent.MOUSE_UP&&(this.isMouseDown=!1)},mxGraph.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tooltipHandler&&this.tooltipHandler.destroy(),null!=this.selectionCellsHandler&&this.selectionCellsHandler.destroy(),null!=this.panningHandler&&this.panningHandler.destroy(),null!=this.connectionHandler&&this.connectionHandler.destroy(),null!=this.graphHandler&&this.graphHandler.destroy(),null!=this.cellEditor&&this.cellEditor.destroy(),null!=this.view&&this.view.destroy(),null!=this.model&&null!=this.graphModelChangeListener&&(this.model.removeListener(this.graphModelChangeListener),this.graphModelChangeListener=null),this.container=null)},mxCellOverlay.prototype=new mxEventSource,mxCellOverlay.prototype.constructor=mxCellOverlay,mxCellOverlay.prototype.image=null,mxCellOverlay.prototype.tooltip=null,mxCellOverlay.prototype.align=mxConstants.ALIGN_RIGHT,mxCellOverlay.prototype.verticalAlign=mxConstants.ALIGN_BOTTOM,mxCellOverlay.prototype.offset=null,mxCellOverlay.prototype.cursor=null,mxCellOverlay.prototype.defaultOverlap=.5,mxCellOverlay.prototype.getBounds=function(e){var t=e.view.graph.getModel().isEdge(e.cell),n=e.view.scale,a=null,i=this.image.width,o=this.image.height;return t?1==(t=e.absolutePoints).length%2?a=t[Math.floor(t.length/2)]:(e=t[(a=t.length/2)-1],t=t[a],a=new mxPoint(e.x+(t.x-e.x)/2,e.y+(t.y-e.y)/2)):((a=new mxPoint).x=this.align==mxConstants.ALIGN_LEFT?e.x:this.align==mxConstants.ALIGN_CENTER?e.x+e.width/2:e.x+e.width,a.y=this.verticalAlign==mxConstants.ALIGN_TOP?e.y:this.verticalAlign==mxConstants.ALIGN_MIDDLE?e.y+e.height/2:e.y+e.height),new mxRectangle(Math.round(a.x-(i*this.defaultOverlap-this.offset.x)*n),Math.round(a.y-(o*this.defaultOverlap-this.offset.y)*n),i*n,o*n)},mxCellOverlay.prototype.toString=function(){return this.tooltip},mxOutline.prototype.source=null,mxOutline.prototype.outline=null,mxOutline.prototype.graphRenderHint=mxConstants.RENDERING_HINT_FASTER,mxOutline.prototype.enabled=!0,mxOutline.prototype.showViewport=!0,mxOutline.prototype.border=10,mxOutline.prototype.sizerSize=8,mxOutline.prototype.updateOnPan=!1,mxOutline.prototype.sizerImage=null,mxOutline.prototype.suspended=!1,mxOutline.prototype.init=function(e){this.outline=new mxGraph(e,this.source.getModel(),this.graphRenderHint,this.source.getStylesheet()),this.outline.foldingEnabled=!1,this.outline.autoScroll=!1;var t=this.outline.graphModelChanged;this.outline.graphModelChanged=mxUtils.bind(this,function(e){!this.suspended&&null!=this.outline&&t.apply(this.outline,arguments)}),mxClient.IS_SVG&&((e=this.outline.getView().getCanvas().parentNode).setAttribute("shape-rendering","optimizeSpeed"),e.setAttribute("image-rendering","optimizeSpeed")),this.outline.labelsVisible=!1,this.outline.setEnabled(!1),this.updateHandler=mxUtils.bind(this,function(e,t){!this.suspended&&!this.active&&this.update()}),this.source.getModel().addListener(mxEvent.CHANGE,this.updateHandler),this.outline.addMouseListener(this),(e=this.source.getView()).addListener(mxEvent.SCALE,this.updateHandler),e.addListener(mxEvent.TRANSLATE,this.updateHandler),e.addListener(mxEvent.SCALE_AND_TRANSLATE,this.updateHandler),e.addListener(mxEvent.DOWN,this.updateHandler),e.addListener(mxEvent.UP,this.updateHandler),mxEvent.addListener(this.source.container,"scroll",this.updateHandler),this.panHandler=mxUtils.bind(this,function(e){this.updateOnPan&&this.updateHandler.apply(this,arguments)}),this.source.addListener(mxEvent.PAN,this.panHandler),this.refreshHandler=mxUtils.bind(this,function(e){this.outline.setStylesheet(this.source.getStylesheet()),this.outline.refresh()}),this.source.addListener(mxEvent.REFRESH,this.refreshHandler),this.bounds=new mxRectangle(0,0,0,0),this.selectionBorder=new mxRectangleShape(this.bounds,null,mxConstants.OUTLINE_COLOR,mxConstants.OUTLINE_STROKEWIDTH),this.selectionBorder.dialect=this.outline.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.selectionBorder.init(this.outline.getView().getOverlayPane()),mxEvent.redirectMouseEvents(this.selectionBorder.node,this.outline),this.selectionBorder.node.style.background="",this.sizer=this.createSizer(),this.sizer.init(this.outline.getView().getOverlayPane()),this.enabled&&(this.sizer.node.style.cursor="pointer"),mxEvent.addListener(this.sizer.node,mxClient.IS_TOUCH?"touchstart":"mousedown",mxUtils.bind(this,function(e){this.outline.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e))})),this.selectionBorder.node.style.display=this.showViewport?"":"none",this.sizer.node.style.display=this.selectionBorder.node.style.display,this.selectionBorder.node.style.cursor="move",this.update(!1)},mxOutline.prototype.isEnabled=function(){return this.enabled},mxOutline.prototype.setEnabled=function(e){this.enabled=e},mxOutline.prototype.setZoomEnabled=function(e){this.sizer.node.style.visibility=e?"visible":"hidden"},mxOutline.prototype.refresh=function(){this.update(!0)},mxOutline.prototype.createSizer=function(){var e=null!=this.sizerImage?new mxImageShape(new mxRectangle(0,0,this.sizerImage.width,this.sizerImage.height),this.sizerImage.src):new mxRectangleShape(new mxRectangle(0,0,this.sizerSize,this.sizerSize),mxConstants.OUTLINE_HANDLE_FILLCOLOR,mxConstants.OUTLINE_HANDLE_STROKECOLOR);return e.dialect=this.outline.dialect,e},mxOutline.prototype.getSourceContainerSize=function(){return new mxRectangle(0,0,this.source.container.scrollWidth,this.source.container.scrollHeight)},mxOutline.prototype.getOutlineOffset=function(e){return null},mxOutline.prototype.update=function(e){if(null!=this.source){var t=this.source.view.scale,n=new mxRectangle((n=this.source.getGraphBounds()).x/t+this.source.panDx,n.y/t+this.source.panDy,n.width/t,n.height/t),a=new mxRectangle(0,0,this.source.container.clientWidth/t,this.source.container.clientHeight/t);(o=n.clone()).add(a);var i=this.getSourceContainerSize(),o=(a=Math.max(i.width/t,o.width),t=Math.max(i.height/t,o.height),Math.max(0,this.outline.container.clientWidth-this.border));i=Math.max(0,this.outline.container.clientHeight-this.border);if(0<(o=Math.min(o/a,i/t))){this.outline.getView().scale!=o&&(this.outline.getView().scale=o,e=!0),(a=this.outline.getView()).currentRoot!=this.source.getView().currentRoot&&a.setCurrentRoot(this.source.getView().currentRoot);i=(t=this.source.view.translate).x+this.source.panDx;var s=t.y+this.source.panDy;null!=(o=this.getOutlineOffset(o))&&(i+=o.x,s+=o.y),n.x<0&&(i-=n.x),n.y<0&&(s-=n.y),a.translate.x==i&&a.translate.y==s||(a.translate.x=i,a.translate.y=s,e=!0);n=a.translate,i=(o=this.source.getView().scale)/a.scale,s=1/a.scale;var r=this.source.container;this.bounds=new mxRectangle((n.x-t.x-this.source.panDx)/s,(n.y-t.y-this.source.panDy)/s,r.clientWidth/i,r.clientHeight/i),this.bounds.x+=this.source.container.scrollLeft*a.scale/o,this.bounds.y+=this.source.container.scrollTop*a.scale/o,(n=this.selectionBorder.bounds).x==this.bounds.x&&n.y==this.bounds.y&&n.width==this.bounds.width&&n.height==this.bounds.height||(this.selectionBorder.bounds=this.bounds,this.selectionBorder.redraw()),n=this.sizer.bounds,a=new mxRectangle(this.bounds.x+this.bounds.width-n.width/2,this.bounds.y+this.bounds.height-n.height/2,n.width,n.height),n.x==a.x&&n.y==a.y&&n.width==a.width&&n.height==a.height||(this.sizer.bounds=a,"hidden"!=this.sizer.node.style.visibility&&this.sizer.redraw()),e&&this.outline.view.revalidate()}}},mxOutline.prototype.mouseDown=function(e,t){this.enabled&&this.showViewport&&(this.zoom=t.isSource(this.sizer),this.startX=t.getX(),this.startY=t.getY(),this.active=!0,this.source.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.source.container)?(this.dx0=this.source.container.scrollLeft,this.dy0=this.source.container.scrollTop):this.dy0=this.dx0=0),t.consume()},mxOutline.prototype.mouseMove=function(e,t){if(this.active){this.selectionBorder.node.style.display=this.showViewport?"":"none",this.sizer.node.style.display=this.selectionBorder.node.style.display;var n=t.getX()-this.startX,a=t.getY()-this.startY,i=null;if(this.zoom)a=n/((i=this.source.container).clientWidth/i.clientHeight),i=new mxRectangle(this.bounds.x,this.bounds.y,Math.max(1,this.bounds.width+n),Math.max(1,this.bounds.height+a)),this.selectionBorder.bounds=i,this.selectionBorder.redraw();else{var o=this.outline.getView().scale;i=new mxRectangle(this.bounds.x+n,this.bounds.y+a,this.bounds.width,this.bounds.height);this.selectionBorder.bounds=i,this.selectionBorder.redraw(),n=n/o*this.source.getView().scale,a=a/o*this.source.getView().scale,this.source.panGraph(-n-this.dx0,-a-this.dy0)}n=this.sizer.bounds,this.sizer.bounds=new mxRectangle(i.x+i.width-n.width/2,i.y+i.height-n.height/2,n.width,n.height),"hidden"!=this.sizer.node.style.visibility&&this.sizer.redraw(),t.consume()}},mxOutline.prototype.mouseUp=function(e,t){if(this.active){var n=t.getX()-this.startX,a=t.getY()-this.startY;if(0<Math.abs(n)||0<Math.abs(a)){if(this.zoom){a=this.selectionBorder.bounds.width;var i=this.source.getView().scale;this.source.zoomTo(i-n*i/a,!1)}else this.source.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.source.container)||(this.source.panGraph(0,0),n/=this.outline.getView().scale,a/=this.outline.getView().scale,i=this.source.getView().translate,this.source.getView().setTranslate(i.x-n,i.y-a));this.update(),t.consume()}this.index=null,this.active=!1}},mxOutline.prototype.destroy=function(){null!=this.source&&(this.source.removeListener(this.panHandler),this.source.removeListener(this.refreshHandler),this.source.getModel().removeListener(this.updateHandler),this.source.getView().removeListener(this.updateHandler),mxEvent.addListener(this.source.container,"scroll",this.updateHandler),this.source=null),null!=this.outline&&(this.outline.removeMouseListener(this),this.outline.destroy(),this.outline=null),null!=this.selectionBorder&&(this.selectionBorder.destroy(),this.selectionBorder=null),null!=this.sizer&&(this.sizer.destroy(),this.sizer=null)},mxMultiplicity.prototype.type=null,mxMultiplicity.prototype.attr=null,mxMultiplicity.prototype.value=null,mxMultiplicity.prototype.source=null,mxMultiplicity.prototype.min=null,mxMultiplicity.prototype.max=null,mxMultiplicity.prototype.validNeighbors=null,mxMultiplicity.prototype.validNeighborsAllowed=!0,mxMultiplicity.prototype.countError=null,mxMultiplicity.prototype.typeError=null,mxMultiplicity.prototype.check=function(e,t,n,a,i,o){var s="";return(this.source&&this.checkTerminal(e,n,t)||!this.source&&this.checkTerminal(e,a,t))&&(null!=this.countError&&(this.source&&(0==this.max||i>=this.max)||!this.source&&(0==this.max||o>=this.max))&&(s+=this.countError+"\n"),null!=this.validNeighbors&&null!=this.typeError&&0<this.validNeighbors.length&&(this.checkNeighbors(e,t,n,a)||(s+=this.typeError+"\n"))),0<s.length?s:null},mxMultiplicity.prototype.checkNeighbors=function(e,t,n,a){t=e.model.getValue(n),a=e.model.getValue(a),n=!this.validNeighborsAllowed;for(var i=this.validNeighbors,o=0;o<i.length;o++){if(this.source&&this.checkType(e,a,i[o])){n=this.validNeighborsAllowed;break}if(!this.source&&this.checkType(e,t,i[o])){n=this.validNeighborsAllowed;break}}return n},mxMultiplicity.prototype.checkTerminal=function(e,t,n){return t=e.model.getValue(t),this.checkType(e,t,this.type,this.attr,this.value)},mxMultiplicity.prototype.checkType=function(e,t,n,a,i){return null!=t&&(isNaN(t.nodeType)?t==n:mxUtils.isNode(t,n,a,i))},mxLayoutManager.prototype=new mxEventSource,mxLayoutManager.prototype.constructor=mxLayoutManager,mxLayoutManager.prototype.graph=null,mxLayoutManager.prototype.bubbling=!0,mxLayoutManager.prototype.enabled=!0,mxLayoutManager.prototype.updateHandler=null,mxLayoutManager.prototype.moveHandler=null,mxLayoutManager.prototype.isEnabled=function(){return this.enabled},mxLayoutManager.prototype.setEnabled=function(e){this.enabled=e},mxLayoutManager.prototype.isBubbling=function(){return this.bubbling},mxLayoutManager.prototype.setBubbling=function(e){this.bubbling=e},mxLayoutManager.prototype.getGraph=function(){return this.graph},mxLayoutManager.prototype.setGraph=function(e){if(null!=this.graph){var t=this.graph.getModel();t.removeListener(this.undoHandler),this.graph.removeListener(this.moveHandler)}this.graph=e,null!=this.graph&&((t=this.graph.getModel()).addListener(mxEvent.BEFORE_UNDO,this.undoHandler),this.graph.addListener(mxEvent.MOVE_CELLS,this.moveHandler))},mxLayoutManager.prototype.getLayout=function(e){return null},mxLayoutManager.prototype.beforeUndo=function(e){e=this.getCellsForChanges(e.changes);var t=this.getGraph().getModel();if(this.isBubbling())for(var n=t.getParents(e);0<n.length;)e=e.concat(n),n=t.getParents(n);this.layoutCells(mxUtils.sortCells(e,!1))},mxLayoutManager.prototype.cellsMoved=function(e,t){if(null!=e&&null!=t)for(var n=mxUtils.convertPoint(this.getGraph().container,mxEvent.getClientX(t),mxEvent.getClientY(t)),a=this.getGraph().getModel(),i=0;i<e.length;i++){var o=this.getLayout(a.getParent(e[i]));null!=o&&o.moveCell(e[i],n.x,n.y)}},mxLayoutManager.prototype.getCellsForChanges=function(e){for(var t=[],n={},a=0;a<e.length;a++){if((i=e[a])instanceof mxRootChange)return[];for(var i=this.getCellsForChange(i),o=0;o<i.length;o++)if(null!=i[o]){var s=mxCellPath.create(i[o]);null==n[s]&&(n[s]=i[o],t.push(i[o]))}}return t},mxLayoutManager.prototype.getCellsForChange=function(e){var t=this.getGraph().getModel();return e instanceof mxChildChange?[e.child,e.previous,t.getParent(e.child)]:e instanceof mxTerminalChange||e instanceof mxGeometryChange?[e.cell,t.getParent(e.cell)]:[]},mxLayoutManager.prototype.layoutCells=function(e){if(0<e.length){var t=this.getGraph().getModel();t.beginUpdate();try{for(var n=null,a=0;a<e.length;a++)e[a]!=t.getRoot()&&e[a]!=n&&(n=e[a],this.executeLayout(this.getLayout(n),n));this.fireEvent(new mxEventObject(mxEvent.LAYOUT_CELLS,"cells",e))}finally{t.endUpdate()}}},mxLayoutManager.prototype.executeLayout=function(e,t){null!=e&&null!=t&&e.execute(t)},mxLayoutManager.prototype.destroy=function(){this.setGraph(null)},mxSpaceManager.prototype=new mxEventSource,mxSpaceManager.prototype.constructor=mxSpaceManager,mxSpaceManager.prototype.graph=null,mxSpaceManager.prototype.enabled=!0,mxSpaceManager.prototype.shiftRightwards=!0,mxSpaceManager.prototype.shiftDownwards=!0,mxSpaceManager.prototype.extendParents=!0,mxSpaceManager.prototype.resizeHandler=null,mxSpaceManager.prototype.foldHandler=null,mxSpaceManager.prototype.isCellIgnored=function(e){return!this.getGraph().getModel().isVertex(e)},mxSpaceManager.prototype.isCellShiftable=function(e){return this.getGraph().getModel().isVertex(e)&&this.getGraph().isCellMovable(e)},mxSpaceManager.prototype.isEnabled=function(){return this.enabled},mxSpaceManager.prototype.setEnabled=function(e){this.enabled=e},mxSpaceManager.prototype.isShiftRightwards=function(){return this.shiftRightwards},mxSpaceManager.prototype.setShiftRightwards=function(e){this.shiftRightwards=e},mxSpaceManager.prototype.isShiftDownwards=function(){return this.shiftDownwards},mxSpaceManager.prototype.setShiftDownwards=function(e){this.shiftDownwards=e},mxSpaceManager.prototype.isExtendParents=function(){return this.extendParents},mxSpaceManager.prototype.setExtendParents=function(e){this.extendParents=e},mxSpaceManager.prototype.getGraph=function(){return this.graph},mxSpaceManager.prototype.setGraph=function(e){null!=this.graph&&(this.graph.removeListener(this.resizeHandler),this.graph.removeListener(this.foldHandler)),this.graph=e,null!=this.graph&&(this.graph.addListener(mxEvent.RESIZE_CELLS,this.resizeHandler),this.graph.addListener(mxEvent.FOLD_CELLS,this.foldHandler))},mxSpaceManager.prototype.cellsResized=function(e){if(null!=e){var t=this.graph.getModel();t.beginUpdate();try{for(var n=0;n<e.length;n++)if(!this.isCellIgnored(e[n])){this.cellResized(e[n]);break}}finally{t.endUpdate()}}},mxSpaceManager.prototype.cellResized=function(e){var t=this.getGraph(),n=t.getView(),a=t.getModel(),i=n.getState(e),o=n.getState(a.getParent(e));if(null!=i&&null!=o){var s=this.getCellsToShift(i),r=a.getGeometry(e);if(null!=s&&null!=r){var l=n.translate,d=n.scale,c=(n=i.x-o.origin.x-l.x*d,o=i.y-o.origin.y-l.y*d,l=i.x+i.width,i.y+i.height),m=i.width-r.width*d+n-r.x*d,u=i.height-r.height*d+o-r.y*d,p=1-r.width*d/i.width;i=1-r.height*d/i.height;a.beginUpdate();try{for(r=0;r<s.length;r++)s[r]!=e&&this.isCellShiftable(s[r])&&this.shiftCell(s[r],m,u,n,o,l,c,p,i,this.isExtendParents()&&t.isExtendParent(s[r]))}finally{a.endUpdate()}}}},mxSpaceManager.prototype.shiftCell=function(e,t,n,a,i,o,s,r,l,d){var c=(a=this.getGraph()).getView().getState(e);if(null!=c){var m=a.getModel();if(null!=(p=m.getGeometry(e))){m.beginUpdate();try{if(this.isShiftRightwards())if(c.x>=o)(p=p.clone()).translate(-t,0);else{var u=Math.max(0,c.x-x0);(p=p.clone()).translate(-r*u,0)}if(this.isShiftDownwards())if(c.y>=s)(p=p.clone()).translate(0,-n);else{var p,g=Math.max(0,c.y-i);(p=p.clone()).translate(0,-l*g)}p!=m.getGeometry(e)&&(m.setGeometry(e,p),d&&a.extendParent(e))}finally{m.endUpdate()}}}},mxSpaceManager.prototype.getCellsToShift=function(e){var t=this.getGraph(),n=t.getModel().getParent(e.cell),a=this.isShiftDownwards(),i=this.isShiftRightwards();return t.getCellsBeyond(e.x+(a?0:e.width),e.y+(a&&i?0:e.height),n,i,a)},mxSpaceManager.prototype.destroy=function(){this.setGraph(null)},mxSwimlaneManager.prototype=new mxEventSource,mxSwimlaneManager.prototype.constructor=mxSwimlaneManager,mxSwimlaneManager.prototype.graph=null,mxSwimlaneManager.prototype.enabled=!0,mxSwimlaneManager.prototype.horizontal=!0,mxSwimlaneManager.prototype.addEnabled=!0,mxSwimlaneManager.prototype.resizeEnabled=!0,mxSwimlaneManager.prototype.addHandler=null,mxSwimlaneManager.prototype.resizeHandler=null,mxSwimlaneManager.prototype.isEnabled=function(){return this.enabled},mxSwimlaneManager.prototype.setEnabled=function(e){this.enabled=e},mxSwimlaneManager.prototype.isHorizontal=function(){return this.horizontal},mxSwimlaneManager.prototype.setHorizontal=function(e){this.horizontal=e},mxSwimlaneManager.prototype.isAddEnabled=function(){return this.addEnabled},mxSwimlaneManager.prototype.setAddEnabled=function(e){this.addEnabled=e},mxSwimlaneManager.prototype.isResizeEnabled=function(){return this.resizeEnabled},mxSwimlaneManager.prototype.setResizeEnabled=function(e){this.resizeEnabled=e},mxSwimlaneManager.prototype.getGraph=function(){return this.graph},mxSwimlaneManager.prototype.setGraph=function(e){null!=this.graph&&(this.graph.removeListener(this.addHandler),this.graph.removeListener(this.resizeHandler)),this.graph=e,null!=this.graph&&(this.graph.addListener(mxEvent.ADD_CELLS,this.addHandler),this.graph.addListener(mxEvent.CELLS_RESIZED,this.resizeHandler))},mxSwimlaneManager.prototype.isSwimlaneIgnored=function(e){return!this.getGraph().isSwimlane(e)},mxSwimlaneManager.prototype.isCellHorizontal=function(e){if(this.graph.isSwimlane(e)){var t=this.graph.view.getState(e);return e=null!=t?t.style:this.graph.getCellStyle(e),1==mxUtils.getValue(e,mxConstants.STYLE_HORIZONTAL,1)}return!this.isHorizontal()},mxSwimlaneManager.prototype.cellsAdded=function(e){if(null!=e){var t=this.getGraph().getModel();t.beginUpdate();try{for(var n=0;n<e.length;n++)this.isSwimlaneIgnored(e[n])||this.swimlaneAdded(e[n])}finally{t.endUpdate()}}},mxSwimlaneManager.prototype.swimlaneAdded=function(e){for(var t=this.getGraph().getModel(),n=t.getParent(e),a=t.getChildCount(n),i=null,o=0;o<a;o++){var s=t.getChildAt(n,o);if(s!=e&&!this.isSwimlaneIgnored(s)&&null!=(i=t.getGeometry(s)))break}null!=i&&this.resizeSwimlane(e,i.width,i.height)},mxSwimlaneManager.prototype.cellsResized=function(e){if(null!=e){var t=this.getGraph().getModel();t.beginUpdate();try{for(var n=0;n<e.length;n++)if(!this.isSwimlaneIgnored(e[n])){var a=t.getGeometry(e[n]);if(null!=a){for(var i=new mxRectangle(0,0,a.width,a.height),o=s=e[n];null!=o;){var s=o,r=(o=t.getParent(o),this.graph.isSwimlane(o)?this.graph.getStartSize(o):new mxRectangle);i.width+=r.width,i.height+=r.height}this.resizeSwimlane(s,i.width,i.height)}}}finally{t.endUpdate()}}},mxSwimlaneManager.prototype.resizeSwimlane=function(e,t,n){var a=this.getGraph().getModel();a.beginUpdate();try{if(!this.isSwimlaneIgnored(e))if(null!=(r=a.getGeometry(e))){var i=this.isCellHorizontal(e);(i&&r.height!=n||!i&&r.width!=t)&&(r=r.clone(),i?r.height=n:r.width=t,a.setGeometry(e,r))}var o=this.graph.isSwimlane(e)?this.graph.getStartSize(e):new mxRectangle;t-=o.width,n-=o.height;for(var s=a.getChildCount(e),r=0;r<s;r++){var l=a.getChildAt(e,r);this.resizeSwimlane(l,t,n)}}finally{a.endUpdate()}},mxSwimlaneManager.prototype.destroy=function(){this.setGraph(null)},mxTemporaryCellStates.prototype.view=null,mxTemporaryCellStates.prototype.oldStates=null,mxTemporaryCellStates.prototype.oldBounds=null,mxTemporaryCellStates.prototype.oldScale=null,mxTemporaryCellStates.prototype.destroy=function(){this.view.setScale(this.oldScale),this.view.setStates(this.oldStates),this.view.setGraphBounds(this.oldBounds)},mxCellStatePreview.prototype.graph=null,mxCellStatePreview.prototype.deltas=null,mxCellStatePreview.prototype.count=0,mxCellStatePreview.prototype.isEmpty=function(){return 0==this.count},mxCellStatePreview.prototype.moveState=function(e,t,n,a,i){a=null==a||a,i=null==i||i;var o=mxCellPath.create(e.cell),s=this.deltas[o];return null==s?(s=new mxPoint(t,n),this.deltas[o]=s,this.count++):a?(s.X+=t,s.Y+=n):(s.X=t,s.Y=n),i&&this.addEdges(e),s},mxCellStatePreview.prototype.show=function(e){var t,n=this.graph.getModel(),a=n.getRoot();for(t in this.deltas){var i=mxCellPath.resolve(a,t),o=this.graph.view.getState(i),s=this.deltas[t];i=this.graph.view.getState(n.getParent(i));this.translateState(i,o,s.x,s.y)}for(t in this.deltas)i=mxCellPath.resolve(a,t),o=this.graph.view.getState(i),s=this.deltas[t],i=this.graph.view.getState(n.getParent(i)),this.revalidateState(i,o,s.x,s.y,e)},mxCellStatePreview.prototype.translateState=function(e,t,n,a){if(null!=t){var i=this.graph.getModel();if(i.isVertex(t.cell)){t.invalid=!0,this.graph.view.validateBounds(e,t.cell),e=i.getGeometry(t.cell);var o=mxCellPath.create(t.cell);0==n&&0==a||null==e||e.relative&&null==this.deltas[o]||(t.x+=n,t.y+=a)}for(e=i.getChildCount(t.cell),o=0;o<e;o++)this.translateState(t,this.graph.view.getState(i.getChildAt(t.cell,o)),n,a)}},mxCellStatePreview.prototype.revalidateState=function(e,t,n,a,i){if(null!=t){t.invalid=!0,this.graph.view.validatePoints(e,t.cell);var o=mxCellPath.create(t.cell),s=this.graph.getModel(),r=this.graph.getCellGeometry(t.cell);for(0==n&&0==a||null==r||!r.relative||!s.isVertex(t.cell)||null!=e&&!s.isVertex(e.cell)&&null==this.deltas[o]||(t.x+=n,t.y+=a,this.graph.cellRenderer.redraw(t)),null!=i&&i(t),e=s.getChildCount(t.cell),o=0;o<e;o++)this.revalidateState(t,this.graph.view.getState(s.getChildAt(t.cell,o)),n,a,i)}},mxCellStatePreview.prototype.addEdges=function(e){for(var t=this.graph.getModel(),n=t.getEdgeCount(e.cell),a=0;a<n;a++){var i=this.graph.view.getState(t.getEdgeAt(e.cell,a));null!=i&&this.moveState(i,0,0)}},mxConnectionConstraint.prototype.point=null,mxConnectionConstraint.prototype.perimeter=null,mxGraphHandler.prototype.graph=null,mxGraphHandler.prototype.maxCells=mxClient.IS_IE?20:50,mxGraphHandler.prototype.enabled=!0,mxGraphHandler.prototype.highlightEnabled=!0,mxGraphHandler.prototype.cloneEnabled=!0,mxGraphHandler.prototype.moveEnabled=!0,mxGraphHandler.prototype.guidesEnabled=!1,mxGraphHandler.prototype.guide=null,mxGraphHandler.prototype.currentDx=null,mxGraphHandler.prototype.currentDy=null,mxGraphHandler.prototype.updateCursor=!0,mxGraphHandler.prototype.selectEnabled=!0,mxGraphHandler.prototype.removeCellsFromParent=!0,mxGraphHandler.prototype.connectOnDrop=!1,mxGraphHandler.prototype.scrollOnMove=!0,mxGraphHandler.prototype.minimumSize=6,mxGraphHandler.prototype.previewColor="black",mxGraphHandler.prototype.htmlPreview=!1,mxGraphHandler.prototype.shape=null,mxGraphHandler.prototype.scaleGrid=!1,mxGraphHandler.prototype.rotationEnabled=!0,mxGraphHandler.prototype.isEnabled=function(){return this.enabled},mxGraphHandler.prototype.setEnabled=function(e){this.enabled=e},mxGraphHandler.prototype.isCloneEnabled=function(){return this.cloneEnabled},mxGraphHandler.prototype.setCloneEnabled=function(e){this.cloneEnabled=e},mxGraphHandler.prototype.isMoveEnabled=function(){return this.moveEnabled},mxGraphHandler.prototype.setMoveEnabled=function(e){this.moveEnabled=e},mxGraphHandler.prototype.isSelectEnabled=function(){return this.selectEnabled},mxGraphHandler.prototype.setSelectEnabled=function(e){this.selectEnabled=e},mxGraphHandler.prototype.isRemoveCellsFromParent=function(){return this.removeCellsFromParent},mxGraphHandler.prototype.setRemoveCellsFromParent=function(e){this.removeCellsFromParent=e},mxGraphHandler.prototype.getInitialCellForEvent=function(e){return e.getCell()},mxGraphHandler.prototype.isDelayedSelection=function(e){return this.graph.isCellSelected(e)},mxGraphHandler.prototype.mouseDown=function(e,t){if(!t.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&!this.graph.isForceMarqueeEvent(t.getEvent())&&null!=t.getState()){var n=this.getInitialCellForEvent(t);if(this.cell=null,this.delayedSelection=this.isDelayedSelection(n),this.isSelectEnabled()&&!this.delayedSelection&&this.graph.selectCellForEvent(n,t.getEvent()),this.isMoveEnabled()){var a=this.graph.model,i=a.getGeometry(n);this.graph.isCellMovable(n)&&(!a.isEdge(n)||1<this.graph.getSelectionCount()||null!=i.points&&0<i.points.length||null==a.getTerminal(n,!0)||null==a.getTerminal(n,!1)||this.graph.allowDanglingEdges||this.graph.isCloneEvent(t.getEvent())&&this.graph.isCellsCloneable())&&this.start(n,t.getX(),t.getY()),this.cellWasClicked=!0,!mxClient.IS_SF&&!mxClient.IS_GC||"SELECT"!=t.getSource().nodeName?t.consume():mxClient.IS_SF&&"SELECT"==t.getSource().nodeName&&(this.cellWasClicked=!1,this.first=null)}}},mxGraphHandler.prototype.getGuideStates=function(){var e=this.graph.getDefaultParent(),t=this.graph.getModel(),n=mxUtils.bind(this,function(e){return null!=this.graph.view.getState(e)&&t.isVertex(e)&&null!=t.getGeometry(e)&&!t.getGeometry(e).relative});return this.graph.view.getCellStates(t.filterDescendants(n,e))},mxGraphHandler.prototype.getCells=function(e){return!this.delayedSelection&&this.graph.isCellMovable(e)?[e]:this.graph.getMovableCells(this.graph.getSelectionCells())},mxGraphHandler.prototype.getPreviewBounds=function(e){return null!=(e=this.getBoundingBox(e))&&(e.grow(-1,-1),e.width<this.minimumSize&&(e.x-=(this.minimumSize-e.width)/2,e.width=this.minimumSize),e.height<this.minimumSize&&(e.y-=(this.minimumSize-e.height)/2,e.height=this.minimumSize)),e},mxGraphHandler.prototype.getBoundingBox=function(e){var t=null;if(null!=e&&0<e.length)for(var n=this.graph.getModel(),a=0;a<e.length;a++)if(n.isVertex(e[a])||n.isEdge(e[a])){var i=this.graph.view.getState(e[a]);if(null!=i){var o=i;n.isVertex(e[a])&&null!=i.shape&&null!=i.shape.boundingBox&&(o=i.shape.boundingBox),null==t?t=new mxRectangle(o.x,o.y,o.width,o.height):t.add(o)}}return t},mxGraphHandler.prototype.createPreviewShape=function(e){return(e=new mxRectangleShape(e,null,this.previewColor)).isDashed=!0,this.htmlPreview?(e.dialect=mxConstants.DIALECT_STRICTHTML,e.init(this.graph.container)):(e.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,e.init(this.graph.getView().getOverlayPane()),e.pointerEvents=!1),e},mxGraphHandler.prototype.start=function(e,t,n){this.cell=e,this.first=mxUtils.convertPoint(this.graph.container,t,n),this.cells=this.getCells(this.cell),this.bounds=this.graph.getView().getBounds(this.cells),this.pBounds=this.getPreviewBounds(this.cells),this.guidesEnabled&&(this.guide=new mxGuide(this.graph,this.getGuideStates()))},mxGraphHandler.prototype.useGuidesForEvent=function(e){return null==this.guide||this.guide.isEnabledForEvent(e.getEvent())},mxGraphHandler.prototype.snap=function(e){var t=this.scaleGrid?this.graph.view.scale:1;return e.x=this.graph.snap(e.x/t)*t,e.y=this.graph.snap(e.y/t)*t,e},mxGraphHandler.prototype.mouseMove=function(e,t){var n=this.graph;if(!t.isConsumed()&&n.isMouseDown&&null!=this.cell&&null!=this.first&&null!=this.bounds){var a=(o=mxUtils.convertPoint(n.container,t.getX(),t.getY())).x-this.first.x,i=o.y-this.first.y,o=n.tolerance;if(null!=this.shape||Math.abs(a)>o||Math.abs(i)>o){null==this.highlight&&(this.highlight=new mxCellHighlight(this.graph,mxConstants.DROP_TARGET_COLOR,3)),null==this.shape&&(this.shape=this.createPreviewShape(this.bounds));var s=n.isGridEnabledEvent(t.getEvent());o=!0;if(null!=this.guide&&this.useGuidesForEvent(t))o=!1,a=(i=this.guide.move(this.bounds,new mxPoint(a,i),s)).x,i=i.y;else if(s){var r=n.getView().translate,l=n.getView().scale;s=this.bounds.x-(n.snap(this.bounds.x/l-r.x)+r.x)*l,r=this.bounds.y-(n.snap(this.bounds.y/l-r.y)+r.y)*l,a=(i=this.snap(new mxPoint(a,i))).x-s,i=i.y-r}for(null!=this.guide&&o&&this.guide.hide(),n.isConstrainedEvent(t.getEvent())&&(Math.abs(a)>Math.abs(i)?i=0:a=0),this.currentDx=a,this.currentDy=i,this.updatePreviewShape(),o=null,i=t.getCell(),n.isDropEnabled()&&this.highlightEnabled&&(o=n.getDropTarget(this.cells,t.getEvent(),i)),s=o,r=n.getModel();null!=s&&s!=this.cells[0];)s=r.getParent(s);l=n.isCloneEvent(t.getEvent())&&n.isCellsCloneable()&&this.isCloneEnabled();var d=!1;null==(a=n.getView().getState(o))||null!=s||r.getParent(this.cell)==o&&!l?(this.target=null,this.connectOnDrop&&null!=i&&1==this.cells.length&&n.getModel().isVertex(i)&&n.isCellConnectable(i)&&(null!=(a=n.getView().getState(i))&&(n=null==n.getEdgeValidationError(null,this.cell,i)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR,this.setHighlightColor(n),d=!0))):(this.target!=o&&(this.target=o,this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)),d=!0),null!=a&&d?this.highlight.highlight(a):this.highlight.hide()}t.consume(),mxEvent.consume(t.getEvent())}else!this.isMoveEnabled()&&!this.isCloneEnabled()||!this.updateCursor||t.isConsumed()||null==t.getState()||n.isMouseDown||(null==(a=n.getCursorForCell(t.getCell()))&&n.isEnabled()&&n.isCellMovable(t.getCell())&&(a=n.getModel().isEdge(t.getCell())?mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),t.getState().setCursor(a),t.consume())},mxGraphHandler.prototype.updatePreviewShape=function(){null!=this.shape&&(this.shape.bounds=new mxRectangle(Math.round(this.pBounds.x+this.currentDx-this.graph.panDx),Math.round(this.pBounds.y+this.currentDy-this.graph.panDy),this.pBounds.width,this.pBounds.height),this.shape.redraw())},mxGraphHandler.prototype.setHighlightColor=function(e){null!=this.highlight&&this.highlight.setHighlightColor(e)},mxGraphHandler.prototype.mouseUp=function(e,t){if(!t.isConsumed()){var n=this.graph;if(null!=this.cell&&null!=this.first&&null!=this.shape&&null!=this.currentDx&&null!=this.currentDy){var a=n.getView().scale,i=n.isCloneEvent(t.getEvent())&&n.isCellsCloneable()&&this.isCloneEnabled(),o=this.currentDx/a,s=(a=this.currentDy/a,t.getCell());this.connectOnDrop&&null==this.target&&null!=s&&n.getModel().isVertex(s)&&n.isCellConnectable(s)&&n.isEdgeValid(null,this.cell,s)?n.connectionHandler.connect(this.cell,s,t.getEvent()):(s=this.target,n.isSplitEnabled()&&n.isSplitTarget(s,this.cells,t.getEvent())?n.splitEdge(s,this.cells,null,o,a):this.moveCells(this.cells,o,a,i,this.target,t.getEvent()))}else this.isSelectEnabled()&&this.delayedSelection&&null!=this.cell&&this.selectDelayed(t)}this.cellWasClicked&&t.consume(),this.reset()},mxGraphHandler.prototype.selectDelayed=function(e){this.graph.selectCellForEvent(this.cell,e.getEvent())},mxGraphHandler.prototype.reset=function(){this.destroyShapes(),this.delayedSelection=this.cellWasClicked=!1,this.target=this.cell=this.first=this.guides=this.currentDy=this.currentDx=null},mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(e,t,n){if(this.graph.getModel().isVertex(e)){if(e=this.graph.getView().getState(e),n=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(n),mxEvent.getClientY(n)),0!=(a=mxUtils.toRadians(mxUtils.getValue(e.style,mxConstants.STYLE_ROTATION)||0))){t=Math.cos(-a);var a=Math.sin(-a),i=new mxPoint(e.getCenterX(),e.getCenterY());n=mxUtils.getRotatedPoint(n,t,a,i)}return null!=e&&!mxUtils.contains(e,n.x,n.y)}return!1},mxGraphHandler.prototype.moveCells=function(e,t,n,a,i,o){a&&(e=this.graph.getCloneableCells(e)),null==i&&this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(this.graph.getModel().getParent(this.cell),e,o)&&(i=this.graph.getDefaultParent()),e=this.graph.moveCells(e,t-this.graph.panDx/this.graph.view.scale,n-this.graph.panDy/this.graph.view.scale,a,i,o),this.isSelectEnabled()&&this.scrollOnMove&&this.graph.scrollCellToVisible(e[0]),a&&this.graph.setSelectionCells(e)},mxGraphHandler.prototype.destroyShapes=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null),null!=this.guide&&(this.guide.destroy(),this.guide=null),null!=this.highlight&&(this.highlight.destroy(),this.highlight=null)},mxGraphHandler.prototype.destroy=function(){this.graph.removeMouseListener(this),this.graph.removeListener(this.panHandler),this.destroyShapes()},mxPanningHandler.prototype=new mxPopupMenu,mxPanningHandler.prototype.constructor=mxPanningHandler,mxPanningHandler.prototype.graph=null,mxPanningHandler.prototype.triggerX=null,mxPanningHandler.prototype.triggerY=null,mxPanningHandler.prototype.usePopupTrigger=!0,mxPanningHandler.prototype.useLeftButtonForPanning=!1,mxPanningHandler.prototype.selectOnPopup=!0,mxPanningHandler.prototype.clearSelectionOnBackground=!0,mxPanningHandler.prototype.ignoreCell=!1,mxPanningHandler.prototype.previewEnabled=!0,mxPanningHandler.prototype.useGrid=!1,mxPanningHandler.prototype.panningEnabled=!0,mxPanningHandler.prototype.isPanningEnabled=function(){return this.panningEnabled},mxPanningHandler.prototype.setPanningEnabled=function(e){this.panningEnabled=e},mxPanningHandler.prototype.init=function(){mxPopupMenu.prototype.init.apply(this),mxEvent.addListener(this.div,mxClient.IS_TOUCH?"touchmove":"mousemove",mxUtils.bind(this,function(e){this.graph.tooltipHandler.hide()}))},mxPanningHandler.prototype.isPanningTrigger=function(e){var t=e.getEvent();return this.useLeftButtonForPanning&&(this.ignoreCell||null==e.getState())&&mxEvent.isLeftMouseButton(t)||mxEvent.isControlDown(t)&&mxEvent.isShiftDown(t)||this.usePopupTrigger&&mxEvent.isPopupTrigger(t)},mxPanningHandler.prototype.mouseDown=function(e,t){if(!t.isConsumed()&&this.isEnabled()){this.hideMenu(),this.dx0=-this.graph.container.scrollLeft,this.dy0=-this.graph.container.scrollTop;var n=mxUtils.convertPoint(this.graph.container,t.getX(),t.getY());this.triggerX=n.x,this.triggerY=n.y,this.popupTrigger=this.isPopupTrigger(t),this.panningTrigger=this.isPanningEnabled()&&this.isPanningTrigger(t),this.startX=t.getX(),this.startY=t.getY(),this.panningTrigger&&this.consumePanningTrigger(t)}},mxPanningHandler.prototype.consumePanningTrigger=function(e){e.consume()},mxPanningHandler.prototype.mouseMove=function(e,t){var n=t.getX()-this.startX,a=t.getY()-this.startY;if(this.active)this.previewEnabled&&(this.useGrid&&(n=this.graph.snap(n),a=this.graph.snap(a)),this.graph.panGraph(n+this.dx0,a+this.dy0)),this.fireEvent(new mxEventObject(mxEvent.PAN,"event",t)),t.consume();else if(this.panningTrigger){var i=this.active;this.active=Math.abs(n)>this.graph.tolerance||Math.abs(a)>this.graph.tolerance,!i&&this.active&&this.fireEvent(new mxEventObject(mxEvent.PAN_START,"event",t))}},mxPanningHandler.prototype.mouseUp=function(e,t){var n=Math.abs(t.getX()-this.startX),a=Math.abs(t.getY()-this.startY);if(this.active){if(!this.graph.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.graph.container)){n=t.getX()-this.startX,a=t.getY()-this.startY,this.useGrid&&(n=this.graph.snap(n),a=this.graph.snap(a));var i=this.graph.getView().scale,o=this.graph.getView().translate;this.graph.panGraph(0,0),this.panGraph(o.x+n/i,o.y+a/i)}this.active=!1,this.fireEvent(new mxEventObject(mxEvent.PAN_END,"event",t)),t.consume()}else this.popupTrigger&&n<this.graph.tolerance&&a<this.graph.tolerance&&(n=this.getCellForPopupEvent(t),this.graph.isEnabled()&&this.selectOnPopup&&null!=n&&!this.graph.isCellSelected(n)?this.graph.setSelectionCell(n):this.clearSelectionOnBackground&&null==n&&this.graph.clearSelection(),this.graph.tooltipHandler.hide(),a=mxUtils.getScrollOrigin(),a=new mxPoint(t.getX()+a.x,t.getY()+a.y),this.popup(a.x+1,a.y+1,n,t.getEvent()),t.consume());this.popupTrigger=this.panningTrigger=!1},mxPanningHandler.prototype.getCellForPopupEvent=function(e){return e.getCell()},mxPanningHandler.prototype.panGraph=function(e,t){this.graph.getView().setTranslate(e,t)},mxPanningHandler.prototype.destroy=function(){this.graph.removeMouseListener(this),mxPopupMenu.prototype.destroy.apply(this)},mxUtils.extend(mxCellMarker,mxEventSource),mxCellMarker.prototype.graph=null,mxCellMarker.prototype.enabled=!0,mxCellMarker.prototype.hotspot=mxConstants.DEFAULT_HOTSPOT,mxCellMarker.prototype.hotspotEnabled=!1,mxCellMarker.prototype.validColor=null,mxCellMarker.prototype.invalidColor=null,mxCellMarker.prototype.currentColor=null,mxCellMarker.prototype.validState=null,mxCellMarker.prototype.markedState=null,mxCellMarker.prototype.setEnabled=function(e){this.enabled=e},mxCellMarker.prototype.isEnabled=function(){return this.enabled},mxCellMarker.prototype.setHotspot=function(e){this.hotspot=e},mxCellMarker.prototype.getHotspot=function(){return this.hotspot},mxCellMarker.prototype.setHotspotEnabled=function(e){this.hotspotEnabled=e},mxCellMarker.prototype.isHotspotEnabled=function(){return this.hotspotEnabled},mxCellMarker.prototype.hasValidState=function(){return null!=this.validState},mxCellMarker.prototype.getValidState=function(){return this.validState},mxCellMarker.prototype.getMarkedState=function(){return this.markedState},mxCellMarker.prototype.reset=function(){(this.validState=null)!=this.markedState&&(this.markedState=null,this.unmark())},mxCellMarker.prototype.process=function(e){var t=null;if(this.isEnabled()){var n=null!=(t=this.getState(e))&&this.isValidState(t);e=this.getMarkerColor(e.getEvent(),t,n),this.validState=n?t:null,t==this.markedState&&e==this.currentColor||(this.currentColor=e,null!=t&&null!=this.currentColor?(this.markedState=t,this.mark()):null!=this.markedState&&(this.markedState=null,this.unmark()))}return t},mxCellMarker.prototype.markCell=function(e,t){var n=this.graph.getView().getState(e);null!=n&&(this.currentColor=null!=t?t:this.validColor,this.markedState=n,this.mark())},mxCellMarker.prototype.mark=function(){this.highlight.setHighlightColor(this.currentColor),this.highlight.highlight(this.markedState),this.fireEvent(new mxEventObject(mxEvent.MARK,"state",this.markedState))},mxCellMarker.prototype.unmark=function(){this.mark()},mxCellMarker.prototype.isValidState=function(e){return!0},mxCellMarker.prototype.getMarkerColor=function(e,t,n){return n?this.validColor:this.invalidColor},mxCellMarker.prototype.getState=function(e){var t=this.graph.getView();return cell=this.getCell(e),null!=(t=this.getStateToMark(t.getState(cell)))&&this.intersects(t,e)?t:null},mxCellMarker.prototype.getCell=function(e){return e.getCell()},mxCellMarker.prototype.getStateToMark=function(e){return e},mxCellMarker.prototype.intersects=function(e,t){return!this.hotspotEnabled||mxUtils.intersectsHotspot(e,t.getGraphX(),t.getGraphY(),this.hotspot,mxConstants.MIN_HOTSPOT_SIZE,mxConstants.MAX_HOTSPOT_SIZE)},mxCellMarker.prototype.destroy=function(){this.graph.getView().removeListener(this.resetHandler),this.graph.getModel().removeListener(this.resetHandler),this.highlight.destroy()},mxUtils.extend(mxSelectionCellsHandler,mxEventSource),mxSelectionCellsHandler.prototype.graph=null,mxSelectionCellsHandler.prototype.enabled=!0,mxSelectionCellsHandler.prototype.refreshHandler=null,mxSelectionCellsHandler.prototype.maxHandlers=100,mxSelectionCellsHandler.prototype.handlers=null,mxSelectionCellsHandler.prototype.isEnabled=function(){return this.enabled},mxSelectionCellsHandler.prototype.setEnabled=function(e){this.enabled=e},mxSelectionCellsHandler.prototype.getHandler=function(e){return this.handlers.get(e)},mxSelectionCellsHandler.prototype.reset=function(){this.handlers.visit(function(e,t){t.reset.apply(t)})},mxSelectionCellsHandler.prototype.refresh=function(){var e=this.handlers;this.handlers=new mxDictionary;for(var t=this.graph.getSelectionCells(),n=0;n<t.length;n++){var a=this.graph.view.getState(t[n]);if(null!=a){var i=e.remove(t[n]);null!=i&&(i.state!=a?(i.destroy(),i=null):i.redraw()),null==i&&(i=this.graph.createHandler(a),this.fireEvent(new mxEventObject(mxEvent.ADD,"state",a))),null!=i&&this.handlers.put(t[n],i)}}e.visit(mxUtils.bind(this,function(e,t){this.fireEvent(new mxEventObject(mxEvent.REMOVE,"state",t.state)),t.destroy()}))},mxSelectionCellsHandler.prototype.mouseDown=function(e,t){if(this.graph.isEnabled()&&this.isEnabled()){var n=[e,t];this.handlers.visit(function(e,t){t.mouseDown.apply(t,n)})}},mxSelectionCellsHandler.prototype.mouseMove=function(e,t){if(this.graph.isEnabled()&&this.isEnabled()){var n=[e,t];this.handlers.visit(function(e,t){t.mouseMove.apply(t,n)})}},mxSelectionCellsHandler.prototype.mouseUp=function(e,t){if(this.graph.isEnabled()&&this.isEnabled()){var n=[e,t];this.handlers.visit(function(e,t){t.mouseUp.apply(t,n)})}},mxSelectionCellsHandler.prototype.destroy=function(){this.graph.removeMouseListener(this),null!=this.refreshHandler&&(this.graph.getSelectionModel().removeListener(this.refreshHandler),this.graph.getModel().removeListener(this.refreshHandler),this.graph.getView().removeListener(this.refreshHandler),this.refreshHandler=null)},mxUtils.extend(mxConnectionHandler,mxEventSource),mxConnectionHandler.prototype.graph=null,mxConnectionHandler.prototype.factoryMethod=!0,mxConnectionHandler.prototype.moveIconFront=!1,mxConnectionHandler.prototype.moveIconBack=!1,mxConnectionHandler.prototype.connectImage=null,mxConnectionHandler.prototype.targetConnectImage=!1,mxConnectionHandler.prototype.enabled=!0,mxConnectionHandler.prototype.select=!0,mxConnectionHandler.prototype.createTarget=!1;mxConnectionHandler.prototype.marker=null,mxConnectionHandler.prototype.constraintHandler=null,mxConnectionHandler.prototype.error=null,mxConnectionHandler.prototype.waypointsEnabled=!1,mxConnectionHandler.prototype.tapAndHoldEnabled=!0,mxConnectionHandler.prototype.tapAndHoldDelay=500,mxConnectionHandler.prototype.tapAndHoldInProgress=!1,mxConnectionHandler.prototype.tapAndHoldValid=!1,mxConnectionHandler.prototype.tapAndHoldTolerance=4,mxConnectionHandler.prototype.initialTouchX=0,mxConnectionHandler.prototype.initialTouchY=0,mxConnectionHandler.prototype.ignoreMouseDown=!1,mxConnectionHandler.prototype.first=null,mxConnectionHandler.prototype.connectIconOffset=new mxPoint(0,mxConstants.TOOLTIP_VERTICAL_OFFSET),mxConnectionHandler.prototype.edgeState=null,mxConnectionHandler.prototype.changeHandler=null,mxConnectionHandler.prototype.drillHandler=null,mxConnectionHandler.prototype.mouseDownCounter=0,mxConnectionHandler.prototype.movePreviewAway=mxClient.IS_VML,mxConnectionHandler.prototype.isEnabled=function(){return this.enabled},mxConnectionHandler.prototype.setEnabled=function(e){this.enabled=e},mxConnectionHandler.prototype.isCreateTarget=function(){return this.createTarget},mxConnectionHandler.prototype.setCreateTarget=function(e){this.createTarget=e},mxConnectionHandler.prototype.createShape=function(){var e=new mxPolyline([],mxConstants.INVALID_COLOR);if(e.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,e.init(this.graph.getView().getOverlayPane()),e.svgStrokeTolerance=0,e.pointerEvents=!1,e.isDashed=!0,this.graph.dialect==mxConstants.DIALECT_SVG)e.node.setAttribute("pointer-events","none");else{var t=mxUtils.bind(this,function(e){return e=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e)),this.graph.view.getState(this.graph.getCellAt(e.x,e.y))});mxEvent.redirectMouseEvents(e.node,this.graph,t)}return e},mxConnectionHandler.prototype.init=function(){this.graph.addMouseListener(this),this.marker=this.createMarker(),this.constraintHandler=new mxConstraintHandler(this.graph),this.changeHandler=mxUtils.bind(this,function(e){null!=this.iconState&&(this.iconState=this.graph.getView().getState(this.iconState.cell)),null!=this.iconState?this.redrawIcons(this.icons,this.iconState):(this.destroyIcons(this.icons),this.previous=null),this.constraintHandler.reset()}),this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler),this.graph.getView().addListener(mxEvent.SCALE,this.changeHandler),this.graph.getView().addListener(mxEvent.TRANSLATE,this.changeHandler),this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.changeHandler),this.drillHandler=mxUtils.bind(this,function(e){this.destroyIcons(this.icons)}),this.graph.addListener(mxEvent.START_EDITING,this.drillHandler),this.graph.getView().addListener(mxEvent.DOWN,this.drillHandler),this.graph.getView().addListener(mxEvent.UP,this.drillHandler)},mxConnectionHandler.prototype.isConnectableCell=function(e){return!0},mxConnectionHandler.prototype.createMarker=function(){var a=new mxCellMarker(this.graph);return a.hotspotEnabled=!0,a.getCell=mxUtils.bind(this,function(e,t){return t=mxCellMarker.prototype.getCell.apply(a,arguments),this.error=null,this.isConnectableCell(t)?(null!=t?this.isConnecting()?null!=this.previous&&(this.error=this.validateConnection(this.previous.cell,t),null!=this.error&&0==this.error.length&&(t=null,this.isCreateTarget()&&(this.error=null))):this.isValidSource(t)||(t=null):this.isConnecting()&&!this.isCreateTarget()&&!this.graph.allowDanglingEdges&&(this.error=""),t):null}),a.isValidState=mxUtils.bind(this,function(e){return this.isConnecting()?null==this.error:mxCellMarker.prototype.isValidState.apply(a,arguments)}),a.getMarkerColor=mxUtils.bind(this,function(e,t,n){return null==this.connectImage||this.isConnecting()?mxCellMarker.prototype.getMarkerColor.apply(a,arguments):null}),a.intersects=mxUtils.bind(this,function(e,t){return!(null==this.connectImage&&!this.isConnecting())||mxCellMarker.prototype.intersects.apply(a,arguments)}),a},mxConnectionHandler.prototype.start=function(e,t,n,a){this.previous=e,this.first=new mxPoint(t,n),this.edgeState=null!=a?a:this.createEdgeState(null),this.marker.currentColor=this.marker.validColor,this.marker.markedState=e,this.marker.mark(),this.fireEvent(new mxEventObject(mxEvent.START,"state",this.previous))},mxConnectionHandler.prototype.isConnecting=function(){return null!=this.first&&null!=this.shape},mxConnectionHandler.prototype.isValidSource=function(e){return this.graph.isValidSource(e)},mxConnectionHandler.prototype.isValidTarget=function(e){return!0},mxConnectionHandler.prototype.validateConnection=function(e,t){return this.isValidTarget(t)?this.graph.getEdgeValidationError(null,e,t):""},mxConnectionHandler.prototype.getConnectImage=function(e){return this.connectImage},mxConnectionHandler.prototype.isMoveIconToFrontForState=function(e){return null!=e.text&&e.text.node.parentNode==this.graph.container||this.moveIconFront},mxConnectionHandler.prototype.createIcons=function(e){if(null!=(i=this.getConnectImage(e))&&null!=e){this.iconState=e;var t=[],n=new mxImageShape(new mxRectangle(0,0,i.width,i.height),i.src,null,null,0);n.preserveImageAspect=!1,this.isMoveIconToFrontForState(e)?(n.dialect=mxConstants.DIALECT_STRICTHTML,n.init(this.graph.container)):(n.dialect=this.graph.dialect==mxConstants.DIALECT_SVG?mxConstants.DIALECT_SVG:mxConstants.DIALECT_VML,n.init(this.graph.getView().getOverlayPane()),this.moveIconBack&&null!=n.node.previousSibling&&n.node.parentNode.insertBefore(n.node,n.node.parentNode.firstChild)),n.node.style.cursor=mxConstants.CURSOR_CONNECT;var a=mxUtils.bind(this,function(){return null!=this.currentState?this.currentState:e}),i=mxUtils.bind(this,function(e){mxEvent.isConsumed(e)||(this.icon=n,this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e,a())))});return mxEvent.redirectMouseEvents(n.node,this.graph,a,i),t.push(n),this.redrawIcons(t,this.iconState),t}return null},mxConnectionHandler.prototype.redrawIcons=function(e,t){if(null!=e&&null!=e[0]&&null!=t){var n=this.getIconPosition(e[0],t);e[0].bounds.x=n.x,e[0].bounds.y=n.y,e[0].redraw()}},mxConnectionHandler.prototype.getIconPosition=function(e,t){var n=this.graph.getView().scale,a=t.getCenterX(),i=t.getCenterY();if(this.graph.isSwimlane(t.cell)){a=0!=(o=this.graph.getStartSize(t.cell)).width?t.x+o.width*n/2:a,i=0!=o.height?t.y+o.height*n/2:i;if(0!=(o=mxUtils.toRadians(mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0))){n=Math.cos(o);var o=Math.sin(o),s=new mxPoint(t.getCenterX(),t.getCenterY());a=(i=mxUtils.getRotatedPoint(new mxPoint(a,i),n,o,s)).x,i=i.y}}return new mxPoint(a-e.bounds.width/2,i-e.bounds.height/2)},mxConnectionHandler.prototype.destroyIcons=function(e){if(null!=e){this.iconState=null;for(var t=0;t<e.length;t++)e[t].destroy()}},mxConnectionHandler.prototype.isStartEvent=function(e){return!this.graph.isForceMarqueeEvent(e.getEvent())&&(null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentConstraint||null!=this.previous&&null==this.error&&(null==this.icons||null!=this.icons&&null!=this.icon))},mxConnectionHandler.prototype.mouseDown=function(e,t){if(this.mouseDownCounter++,this.isEnabled()&&this.graph.isEnabled()&&!t.isConsumed()&&!this.isConnecting()&&this.isStartEvent(t)){if(null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint?(this.sourceConstraint=this.constraintHandler.currentConstraint,this.previous=this.constraintHandler.currentFocus,this.first=this.constraintHandler.currentPoint.clone()):this.first=new mxPoint(t.getGraphX(),t.getGraphY()),this.edgeState=this.createEdgeState(t),this.mouseDownCounter=1,this.waypointsEnabled&&null==this.shape&&(this.waypoints=null,this.shape=this.createShape()),null==this.previous&&null!=this.edgeState){var n=this.graph.getPointForEvent(t.getEvent());this.edgeState.cell.geometry.setTerminalPoint(n,!0)}this.fireEvent(new mxEventObject(mxEvent.START,"state",this.previous)),t.consume()}else if(mxClient.IS_TOUCH&&this.tapAndHoldEnabled&&!this.tapAndHoldInProgress&&this.isEnabled()&&this.graph.isEnabled()&&!this.isConnecting()){this.tapAndHoldInProgress=!0,this.initialTouchX=t.getX(),this.initialTouchY=t.getY();var a=this.graph.view.getState(this.marker.getCell(t));this.tapAndHoldThread&&window.clearTimeout(this.tapAndHoldThread),this.tapAndHoldThread=window.setTimeout(mxUtils.bind(this,function(){this.tapAndHoldValid&&this.tapAndHold(t,a),this.tapAndHoldValid=this.tapAndHoldInProgress=!1}),this.tapAndHoldDelay),this.tapAndHoldValid=!0}this.selectedIcon=this.icon,this.icon=null},mxConnectionHandler.prototype.tapAndHold=function(e,t){null!=t&&(this.marker.currentColor=this.marker.validColor,this.marker.markedState=t,this.marker.mark(),this.first=new mxPoint(e.getGraphX(),e.getGraphY()),this.edgeState=this.createEdgeState(e),this.previous=t,this.fireEvent(new mxEventObject(mxEvent.START,"state",this.previous)))},mxConnectionHandler.prototype.isImmediateConnectSource=function(e){return!this.graph.isCellMovable(e.cell)},mxConnectionHandler.prototype.createEdgeState=function(e){return null},mxConnectionHandler.prototype.updateCurrentState=function(e){var t=this.marker.process(e);this.constraintHandler.update(e,null==this.first),this.currentState=t},mxConnectionHandler.prototype.convertWaypoint=function(e){var t=this.graph.getView().getScale(),n=this.graph.getView().getTranslate();e.x=e.x/t-n.x,e.y=e.y/t-n.y},mxConnectionHandler.prototype.mouseMove=function(e,t){if(this.tapAndHoldValid&&(this.tapAndHoldValid=Math.abs(this.initialTouchX-t.getX())<this.tapAndHoldTolerance&&Math.abs(this.initialTouchY-t.getY())<this.tapAndHoldTolerance),t.isConsumed()||!this.ignoreMouseDown&&null==this.first&&this.graph.isMouseDown)this.constraintHandler.reset();else{if(!this.isEnabled()&&null!=this.currentState&&(this.destroyIcons(this.icons),this.currentState=null),(null!=this.first||this.isEnabled()&&this.graph.isEnabled())&&this.updateCurrentState(t),null!=this.first){var n=this.graph.getView().scale,a=null,i=n=new mxPoint(this.graph.snap(t.getGraphX()/n)*n,this.graph.snap(t.getGraphY()/n)*n);null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint&&(a=this.constraintHandler.currentConstraint,i=this.constraintHandler.currentPoint.clone());var o=this.first;if(null!=this.selectedIcon){var s=this.selectedIcon.bounds.width,r=this.selectedIcon.bounds.height;null!=this.currentState&&this.targetConnectImage?(s=this.getIconPosition(this.selectedIcon,this.currentState),this.selectedIcon.bounds.x=s.x,this.selectedIcon.bounds.y=s.y):(s=new mxRectangle(t.getGraphX()+this.connectIconOffset.x,t.getGraphY()+this.connectIconOffset.y,s,r),this.selectedIcon.bounds=s),this.selectedIcon.redraw()}if(null!=this.edgeState){if(this.edgeState.absolutePoints=[null,null!=this.currentState?null:i],this.graph.view.updateFixedTerminalPoint(this.edgeState,this.previous,!0,this.sourceConstraint),null!=this.currentState&&(null==a&&(a=this.graph.getConnectionConstraint(this.edgeState,this.previous,!1)),this.edgeState.setAbsoluteTerminalPoint(null,!1),this.graph.view.updateFixedTerminalPoint(this.edgeState,this.currentState,!1,a)),(o=null)!=this.waypoints)for(o=[],i=0;i<this.waypoints.length;i++)a=this.waypoints[i].clone(),this.convertWaypoint(a),o[i]=a;this.graph.view.updatePoints(this.edgeState,o,this.previous,this.currentState),this.graph.view.updateFloatingTerminalPoints(this.edgeState,this.previous,this.currentState),i=this.edgeState.absolutePoints[this.edgeState.absolutePoints.length-1],o=this.edgeState.absolutePoints[0]}else null!=this.currentState&&null==this.constraintHandler.currentConstraint&&(null!=(s=this.getTargetPerimeterPoint(this.currentState,t))&&(i=s)),null==this.sourceConstraint&&null!=this.previous&&(null!=(s=this.getSourcePerimeterPoint(this.previous,null!=this.waypoints&&0<this.waypoints.length?this.waypoints[0]:i,t))&&(o=s));if(null==this.currentState&&this.movePreviewAway){if(s=o,null!=this.edgeState&&2<this.edgeState.absolutePoints.length&&(null!=(a=this.edgeState.absolutePoints[this.edgeState.absolutePoints.length-2])&&(s=a)),a=i.x-s.x,s=i.y-s.y,0==(r=Math.sqrt(a*a+s*s)))return;i.x-=4*a/r,i.y-=4*s/r}null==this.shape&&(a=Math.abs(n.x-this.first.x),s=Math.abs(n.y-this.first.y),a>this.graph.tolerance||s>this.graph.tolerance)&&(this.shape=this.createShape(),this.updateCurrentState(t)),null!=this.shape&&(null!=this.edgeState?this.shape.points=this.edgeState.absolutePoints:(n=[o],null!=this.waypoints&&(n=n.concat(this.waypoints)),n.push(i),this.shape.points=n),this.drawPreview()),mxEvent.consume(t.getEvent()),t.consume()}else this.isEnabled()&&this.graph.isEnabled()?this.previous!=this.currentState&&null==this.edgeState?(this.destroyIcons(this.icons),(this.icons=null)!=this.currentState&&null==this.error&&(this.icons=this.createIcons(this.currentState),null==this.icons&&(this.currentState.setCursor(mxConstants.CURSOR_CONNECT),t.consume())),this.previous=this.currentState):this.previous==this.currentState&&null!=this.currentState&&null==this.icons&&!this.graph.isMouseDown&&t.consume():this.constraintHandler.reset();if(null!=this.constraintHandler.currentConstraint&&this.marker.reset(),!this.graph.isMouseDown&&null!=this.currentState&&null!=this.icons){for(n=!1,o=t.getSource(),i=0;i<this.icons.length&&!n;i++)n=o==this.icons[i].node||o.parentNode==this.icons[i].node;n||this.updateIcons(this.currentState,this.icons,t)}}},mxConnectionHandler.prototype.getTargetPerimeterPoint=function(e,t){var n=null,a=(i=e.view).getPerimeterFunction(e);if(null!=a){var i,o=null!=this.waypoints&&0<this.waypoints.length?this.waypoints[this.waypoints.length-1]:new mxPoint(this.previous.getCenterX(),this.previous.getCenterY());null!=(i=a(i.getPerimeterBounds(e),this.edgeState,o,!1))&&(n=i)}else n=new mxPoint(e.getCenterX(),e.getCenterY());return n},mxConnectionHandler.prototype.getSourcePerimeterPoint=function(e,t,n){n=null;var a=e.view,i=a.getPerimeterFunction(e),o=new mxPoint(e.getCenterX(),e.getCenterY());if(null!=i){var s=mxUtils.getValue(e.style,mxConstants.STYLE_ROTATION,0),r=-s*(Math.PI/180);0!=s&&(t=mxUtils.getRotatedPoint(new mxPoint(t.x,t.y),Math.cos(r),Math.sin(r),o)),null!=(e=i(a.getPerimeterBounds(e),e,t,!1))&&(0!=s&&(e=mxUtils.getRotatedPoint(new mxPoint(e.x,e.y),Math.cos(-r),Math.sin(-r),o)),n=e)}else n=o;return n},mxConnectionHandler.prototype.updateIcons=function(e,t,n){},mxConnectionHandler.prototype.isStopEvent=function(e){return null!=e.getState()},mxConnectionHandler.prototype.addWaypointForEvent=function(e){var t=mxUtils.convertPoint(this.graph.container,e.getX(),e.getY()),n=Math.abs(t.x-this.first.x);t=Math.abs(t.y-this.first.y);(null!=this.waypoints||1<this.mouseDownCounter&&(n>this.graph.tolerance||t>this.graph.tolerance))&&(null==this.waypoints&&(this.waypoints=[]),n=this.graph.view.scale,t=new mxPoint(this.graph.snap(e.getGraphX()/n)*n,this.graph.snap(e.getGraphY()/n)*n),this.waypoints.push(t))},mxConnectionHandler.prototype.mouseUp=function(e,t){if(!t.isConsumed()&&this.isConnecting()){if(this.waypointsEnabled&&!this.isStopEvent(t))return this.addWaypointForEvent(t),void t.consume();if(null==this.error){var n=null!=this.previous?this.previous.cell:null,a=null;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(a=this.constraintHandler.currentFocus.cell),null==a&&this.marker.hasValidState()&&(a=this.marker.validState.cell),this.connect(n,a,t.getEvent(),t.getCell())}else null!=this.previous&&null!=this.marker.validState&&this.previous.cell==this.marker.validState.cell&&this.graph.selectCellForEvent(this.marker.source,evt),0<this.error.length&&this.graph.validationAlert(this.error);this.destroyIcons(this.icons),t.consume()}null!=this.first&&this.reset(),this.tapAndHoldValid=this.tapAndHoldInProgress=!1},mxConnectionHandler.prototype.reset=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null),this.destroyIcons(this.icons),this.icons=null,this.marker.reset(),this.constraintHandler.reset(),this.sourceConstraint=this.error=this.previous=this.edgeState=this.selectedIcon=null,this.mouseDownCounter=0,this.icon=this.first=null,this.fireEvent(new mxEventObject(mxEvent.RESET))},mxConnectionHandler.prototype.drawPreview=function(){var e=null==this.error;this.shape.strokewidth=this.getEdgeWidth(e),e=this.getEdgeColor(e),this.shape.stroke=e,this.shape.redraw()},mxConnectionHandler.prototype.getEdgeColor=function(e){return e?mxConstants.VALID_COLOR:mxConstants.INVALID_COLOR},mxConnectionHandler.prototype.getEdgeWidth=function(e){return e?3:1},mxConnectionHandler.prototype.connect=function(e,t,n,a){if(null!=t||this.isCreateTarget()||this.graph.allowDanglingEdges){var i=this.graph.getModel(),o=null;i.beginUpdate();try{if(null!=e&&null==t&&this.isCreateTarget()&&null!=(t=this.createTargetVertex(n,e))){if(null!=(a=this.graph.getDropTarget([t],n,a))&&this.graph.getModel().isEdge(a))a=this.graph.getDefaultParent();else{var s=this.graph.getView().getState(a);if(null!=s){var r=i.getGeometry(t);r.x-=s.origin.x,r.y-=s.origin.y}}this.graph.addCell(t,a)}var l=this.graph.getDefaultParent();if(null!=e&&null!=t&&i.getParent(e)==i.getParent(t)&&i.getParent(i.getParent(e))!=i.getRoot()&&(l=i.getParent(e),null!=e.geometry&&e.geometry.relative&&null!=t.geometry&&t.geometry.relative&&(l=i.getParent(l))),r=s=null,null!=this.edgeState&&(s=this.edgeState.cell.value,r=this.edgeState.cell.style),null!=(o=this.insertEdge(l,null,s,e,t,r))){this.graph.setConnectionConstraint(o,e,!0,this.sourceConstraint),this.graph.setConnectionConstraint(o,t,!1,this.constraintHandler.currentConstraint),null!=this.edgeState&&i.setGeometry(o,this.edgeState.cell.geometry);var d=i.getGeometry(o);if(null==d&&((d=new mxGeometry).relative=!0,i.setGeometry(o,d)),null!=this.waypoints&&0<this.waypoints.length){var c=this.graph.view.scale,m=this.graph.view.translate;for(d.points=[],e=0;e<this.waypoints.length;e++){var u=this.waypoints[e];d.points.push(new mxPoint(u.x/c-m.x,u.y/c-m.y))}}null==t&&((u=this.graph.getPointForEvent(n,!1)).x-=this.graph.panDx/this.graph.view.scale,u.y-=this.graph.panDy/this.graph.view.scale,d.setTerminalPoint(u,!1)),this.fireEvent(new mxEventObject(mxEvent.CONNECT,"cell",o,"event",n,"target",a))}}catch(e){mxLog.show(),mxLog.debug(e.message)}finally{i.endUpdate()}this.select&&this.selectCells(o,t)}},mxConnectionHandler.prototype.selectCells=function(e,t){this.graph.setSelectionCell(e)},mxConnectionHandler.prototype.insertEdge=function(e,t,n,a,i,o){return null==this.factoryMethod?this.graph.insertEdge(e,t,n,a,i,o):(t=this.createEdge(n,a,i,o),this.graph.addEdge(t,e,a,i))},mxConnectionHandler.prototype.createTargetVertex=function(e,t){for(var n=this.graph.getCellGeometry(t);null!=n&&n.relative;)t=this.graph.getModel().getParent(t),n=this.graph.getCellGeometry(t);var a=this.graph.cloneCells([t])[0];if(null!=(n=this.graph.getModel().getGeometry(a))){var i=this.graph.getPointForEvent(e);if(n.x=this.graph.snap(i.x-n.width/2)-this.graph.panDx/this.graph.view.scale,n.y=this.graph.snap(i.y-n.height/2)-this.graph.panDy/this.graph.view.scale,null!=this.first){var o=this.graph.view.getState(t);if(null!=o){var s=this.getAlignmentTolerance();Math.abs(this.graph.snap(this.first.x)-this.graph.snap(i.x))<=s?n.x=o.x:Math.abs(this.graph.snap(this.first.y)-this.graph.snap(i.y))<=s&&(n.y=o.y)}}}return a},mxConnectionHandler.prototype.getAlignmentTolerance=function(){return this.graph.isGridEnabled()?this.graph.gridSize:this.graph.tolerance},mxConnectionHandler.prototype.createEdge=function(e,t,n,a){var i=null;return null!=this.factoryMethod&&(i=this.factoryMethod(t,n,a)),null==i&&((i=new mxCell(e||"")).setEdge(!0),i.setStyle(a),(e=new mxGeometry).relative=!0,i.setGeometry(e)),i},mxConnectionHandler.prototype.destroy=function(){this.graph.removeMouseListener(this),null!=this.shape&&(this.shape.destroy(),this.shape=null),null!=this.marker&&(this.marker.destroy(),this.marker=null),null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null),null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getView().removeListener(this.changeHandler),this.changeHandler=null),null!=this.drillHandler&&(this.graph.removeListener(this.drillHandler),this.graph.getView().removeListener(this.drillHandler),this.drillHandler=null)},mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5),mxConstraintHandler.prototype.graph=null,mxConstraintHandler.prototype.enabled=!0,mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR,mxConstraintHandler.prototype.isEnabled=function(){return this.enabled},mxConstraintHandler.prototype.setEnabled=function(e){this.enabled=e},mxConstraintHandler.prototype.reset=function(){if(null!=this.focusIcons){for(var e=0;e<this.focusIcons.length;e++)this.focusIcons[e].destroy();this.focusIcons=null}null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null),this.focusPoints=this.currentFocus=this.currentPoint=this.currentFocusArea=this.currentConstraint=null},mxConstraintHandler.prototype.getTolerance=function(){return this.graph.getTolerance()},mxConstraintHandler.prototype.getImageForConstraint=function(e,t,n){return this.pointImage},mxConstraintHandler.prototype.isEventIgnored=function(e,t){return!1},mxConstraintHandler.prototype.update=function(e,t){if(this.isEnabled()&&!this.isEventIgnored(e)){var n=this.getTolerance(),a=new mxRectangle(e.getGraphX()-n,e.getGraphY()-n,2*n,2*n),i=null!=e.getCell()&&this.graph.isCellConnectable(e.getCell());if((null==this.currentFocusArea||!mxUtils.intersects(this.currentFocusArea,a)||null!=e.getState()&&null!=this.currentFocus&&i)&&(this.currentFocusArea=null,e.getState()!=this.currentFocus))if(this.currentFocus=null,this.constraints=null!=e.getState()&&i?this.graph.getAllConnectionConstraints(e.getState(),t):null,null!=this.constraints){if(this.currentFocus=e.getState(),this.currentFocusArea=new mxRectangle(e.getState().x,e.getState().y,e.getState().width,e.getState().height),null!=this.focusIcons){for(i=0;i<this.focusIcons.length;i++)this.focusIcons[i].destroy();this.focusPoints=this.focusIcons=null}for(this.focusIcons=[],this.focusPoints=[],i=0;i<this.constraints.length;i++){var o,s=this.graph.getConnectionPoint(e.getState(),this.constraints[i]),r=(o=this.getImageForConstraint(e.getState(),this.constraints[i],s)).src;(o=new mxImageShape(o=new mxRectangle(s.x-o.width/2,s.y-o.height/2,o.width,o.height),r)).dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,o.preserveImageAspect=!1,o.init(this.graph.getView().getOverlayPane()),null!=o.node.previousSibling&&o.node.parentNode.insertBefore(o.node,o.node.parentNode.firstChild),r=mxUtils.bind(this,function(){return null!=this.currentFocus?this.currentFocus:e.getState()}),o.redraw(),mxEvent.redirectMouseEvents(o.node,this.graph,r),this.currentFocusArea.add(o.bounds),this.focusIcons.push(o),this.focusPoints.push(s)}this.currentFocusArea.grow(n)}else if(null!=this.focusIcons){for(null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null),i=0;i<this.focusIcons.length;i++)this.focusIcons[i].destroy();this.focusPoints=this.focusIcons=null}if(this.currentPoint=this.currentConstraint=null,null!=this.focusIcons&&null!=this.constraints&&(null==e.getState()||this.currentFocus==e.getState()))for(i=0;i<this.focusIcons.length;i++)if(mxUtils.intersects(this.focusIcons[i].bounds,a)){this.currentConstraint=this.constraints[i],this.currentPoint=this.focusPoints[i],(n=this.focusIcons[i].bounds.clone()).grow(mxClient.IS_IE?3:2),mxClient.IS_IE&&(n.width-=1,n.height-=1),null==this.focusHighlight?((n=new mxRectangleShape(n,null,this.highlightColor,3)).dialect=this.graph.dialect==mxConstants.DIALECT_SVG?mxConstants.DIALECT_SVG:mxConstants.DIALECT_VML,n.init(this.graph.getView().getOverlayPane()),this.focusHighlight=n,r=mxUtils.bind(this,function(){return null!=this.currentFocus?this.currentFocus:e.getState()}),mxEvent.redirectMouseEvents(n.node,this.graph,r)):(this.focusHighlight.bounds=n,this.focusHighlight.redraw());break}null==this.currentConstraint&&null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null)}},mxConstraintHandler.prototype.destroy=function(){this.reset()},mxRubberband.prototype.defaultOpacity=20,mxRubberband.prototype.enabled=!0,mxRubberband.prototype.div=null,mxRubberband.prototype.sharedDiv=null,mxRubberband.prototype.currentX=0,mxRubberband.prototype.currentY=0,mxRubberband.prototype.isEnabled=function(){return this.enabled},mxRubberband.prototype.setEnabled=function(e){this.enabled=e},mxRubberband.prototype.mouseDown=function(e,t){if(!t.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&(this.graph.isForceMarqueeEvent(t.getEvent())||null==t.getState())){var n=mxUtils.getOffset(this.graph.container),a=mxUtils.getScrollOrigin(this.graph.container);if(a.x-=n.x,a.y-=n.y,this.start(t.getX()+a.x,t.getY()+a.y),mxClient.IS_NS&&!mxClient.IS_SF&&!mxClient.IS_GC){var i=this.graph.container,o=function(e){e=new mxMouseEvent(e);var t=mxUtils.convertPoint(i,e.getX(),e.getY());return e.graphX=t.x,e.graphY=t.y,e};this.dragHandler=mxUtils.bind(this,function(e){this.mouseMove(this.graph,o(e))}),this.dropHandler=mxUtils.bind(this,function(e){this.mouseUp(this.graph,o(e))}),mxEvent.addListener(document,"mousemove",this.dragHandler),mxEvent.addListener(document,"mouseup",this.dropHandler)}t.consume(!1)}},mxRubberband.prototype.start=function(e,t){this.first=new mxPoint(e,t)},mxRubberband.prototype.mouseMove=function(e,t){if(!t.isConsumed()&&null!=this.first){var n=mxUtils.getScrollOrigin(this.graph.container),a=mxUtils.getOffset(this.graph.container);n.x-=a.x,n.y-=a.y;a=t.getX()+n.x,n=t.getY()+n.y;var i=this.first.x-a,o=this.first.y-n,s=this.graph.tolerance;(null!=this.div||Math.abs(i)>s||Math.abs(o)>s)&&(null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(a,n),t.consume())}},mxRubberband.prototype.createShape=function(){return null==this.sharedDiv&&(this.sharedDiv=document.createElement("div"),this.sharedDiv.className="mxRubberband",mxUtils.setOpacity(this.sharedDiv,this.defaultOpacity)),this.graph.container.appendChild(this.sharedDiv),this.sharedDiv},mxRubberband.prototype.mouseUp=function(e,t){var n=null!=this.div;this.reset(),n&&(n=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(n,t.getEvent()),t.consume())},mxRubberband.prototype.reset=function(){null!=this.div&&this.div.parentNode.removeChild(this.div),null!=this.dragHandler&&(mxEvent.removeListener(document,"mousemove",this.dragHandler),this.dragHandler=null),null!=this.dropHandler&&(mxEvent.removeListener(document,"mouseup",this.dropHandler),this.dropHandler=null),this.currentY=this.currentX=0,this.div=this.first=null},mxRubberband.prototype.update=function(e,t){this.currentX=e,this.currentY=t,this.repaint()},mxRubberband.prototype.repaint=function(){if(null!=this.div){var e=this.currentX-this.graph.panDx,t=this.currentY-this.graph.panDy;this.x=Math.min(this.first.x,e),this.y=Math.min(this.first.y,t),this.width=Math.max(this.first.x,e)-this.x,this.height=Math.max(this.first.y,t)-this.y,e=mxClient.IS_VML?this.graph.panDy:0,this.div.style.left=this.x+(mxClient.IS_VML?this.graph.panDx:0)+"px",this.div.style.top=this.y+e+"px",this.div.style.width=Math.max(1,this.width)+"px",this.div.style.height=Math.max(1,this.height)+"px"}},mxRubberband.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),this.graph.removeListener(this.panHandler),this.reset(),null!=this.sharedDiv&&(this.sharedDiv=null))},mxVertexHandler.prototype.graph=null,mxVertexHandler.prototype.state=null,mxVertexHandler.prototype.singleSizer=!1,mxVertexHandler.prototype.index=null,mxVertexHandler.prototype.allowHandleBoundsCheck=!0,mxVertexHandler.prototype.handleImage=null,mxVertexHandler.prototype.tolerance=0,mxVertexHandler.prototype.rotationEnabled=!1,mxVertexHandler.prototype.rotationRaster=!0,mxVertexHandler.prototype.init=function(){if(this.graph=this.state.view.graph,this.selectionBounds=this.getSelectionBounds(this.state),this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height),this.selectionBorder=this.createSelectionShape(this.bounds),this.selectionBorder.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.selectionBorder.pointerEvents=!1,this.selectionBorder.init(this.graph.getView().getOverlayPane()),this.graph.isCellMovable(this.state.cell)&&(this.selectionBorder.node.style.cursor=mxConstants.CURSOR_MOVABLE_VERTEX),mxEvent.redirectMouseEvents(this.selectionBorder.node,this.graph,this.state),mxGraphHandler.prototype.maxCells<=0||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells){var e=this.graph.isCellResizable(this.state.cell);if(this.sizers=[],e||this.graph.isLabelMovable(this.state.cell)&&2<=this.state.width&&2<=this.state.height){var t=0;e&&(this.singleSizer||(this.sizers.push(this.createSizer("nw-resize",t++)),this.sizers.push(this.createSizer("n-resize",t++)),this.sizers.push(this.createSizer("ne-resize",t++)),this.sizers.push(this.createSizer("w-resize",t++)),this.sizers.push(this.createSizer("e-resize",t++)),this.sizers.push(this.createSizer("sw-resize",t++)),this.sizers.push(this.createSizer("s-resize",t++))),this.sizers.push(this.createSizer("se-resize",t++))),null!=(e=this.graph.model.getGeometry(this.state.cell))&&!e.relative&&!this.graph.isSwimlane(this.state.cell)&&this.graph.isLabelMovable(this.state.cell)&&(this.labelShape=this.createSizer(mxConstants.CURSOR_LABEL_HANDLE,mxEvent.LABEL_HANDLE,mxConstants.LABEL_HANDLE_SIZE,mxConstants.LABEL_HANDLE_FILLCOLOR),this.sizers.push(this.labelShape))}else this.graph.isCellMovable(this.state.cell)&&!this.graph.isCellResizable(this.state.cell)&&this.state.width<2&&this.state.height<2&&(this.labelShape=this.createSizer(mxConstants.CURSOR_MOVABLE_VERTEX,null,null,mxConstants.LABEL_HANDLE_FILLCOLOR),this.sizers.push(this.labelShape))}this.rotationEnabled&&(mxGraphHandler.prototype.maxCells<=0||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)&&(this.rotationShape=this.createSizer("pointer",mxEvent.ROTATION_HANDLE,mxConstants.HANDLE_SIZE+3,mxConstants.HANDLE_FILLCOLOR),this.sizers.push(this.rotationShape)),this.redraw()},mxVertexHandler.prototype.getSelectionBounds=function(e){return new mxRectangle(Math.round(e.x),Math.round(e.y),Math.round(e.width),Math.round(e.height))},mxVertexHandler.prototype.createSelectionShape=function(e){return(e=new mxRectangleShape(e,null,this.getSelectionColor())).strokewidth=this.getSelectionStrokeWidth(),e.isDashed=this.isSelectionDashed(),e},mxVertexHandler.prototype.getSelectionColor=function(){return mxConstants.VERTEX_SELECTION_COLOR},mxVertexHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.VERTEX_SELECTION_STROKEWIDTH},mxVertexHandler.prototype.isSelectionDashed=function(){return mxConstants.VERTEX_SELECTION_DASHED},mxVertexHandler.prototype.createSizer=function(e,t,n,a){return n=new mxRectangle(0,0,n=n||mxConstants.HANDLE_SIZE,n),(a=this.createSizerShape(n,t,a)).isHtmlAllowed()&&null!=this.state.text&&this.state.text.node.parentNode==this.graph.container?(a.bounds.height-=1,a.bounds.width-=1,a.dialect=mxConstants.DIALECT_STRICTHTML,a.init(this.graph.container)):(a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,a.init(this.graph.getView().getOverlayPane())),mxEvent.redirectMouseEvents(a.node,this.graph,this.state),this.graph.isEnabled()&&(a.node.style.cursor=e),this.isSizerVisible(t)||(a.node.style.visibility="hidden"),a},mxVertexHandler.prototype.isSizerVisible=function(e){return!0},mxVertexHandler.prototype.createSizerShape=function(e,t,n){return null!=this.handleImage?(e.width=this.handleImage.width,e.height=this.handleImage.height,new mxImageShape(e,this.handleImage.src)):t==mxEvent.ROTATION_HANDLE?new mxEllipse(e,n||mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR):new mxRectangleShape(e,n||mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)},mxVertexHandler.prototype.moveSizerTo=function(e,t,n){null!=e&&(e.bounds.x=Math.round(t-e.bounds.width/2),e.bounds.y=Math.round(n-e.bounds.height/2),e.redraw())},mxVertexHandler.prototype.getHandleForEvent=function(e){if(e.isSource(this.rotationShape))return mxEvent.ROTATION_HANDLE;if(e.isSource(this.labelShape))return mxEvent.LABEL_HANDLE;if(null!=this.sizers)for(var t=this.tolerance,n=(t=this.allowHandleBoundsCheck&&(mxClient.IS_IE||0<t)?new mxRectangle(e.getGraphX()-t,e.getGraphY()-t,2*t,2*t):null,0);n<this.sizers.length;n++)if(e.isSource(this.sizers[n])||null!=t&&mxUtils.intersects(this.sizers[n].bounds,t))return n;return null},mxVertexHandler.prototype.mouseDown=function(e,t){if(!t.isConsumed()&&this.graph.isEnabled()&&!this.graph.isForceMarqueeEvent(t.getEvent())&&(0<this.tolerance||t.getState()==this.state)){var n=this.getHandleForEvent(t);null!=n&&(this.start(t.getX(),t.getY(),n),t.consume())}},mxVertexHandler.prototype.start=function(e,t,n){e=mxUtils.convertPoint(this.graph.container,e,t),this.startX=e.x,this.startY=e.y,this.index=n,this.selectionBorder.node.style.display=n==mxEvent.ROTATION_HANDLE?"inline":"none",this.preview=this.createSelectionShape(this.bounds),mxClient.IS_SVG&&0!=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0")||null==this.state.text||this.state.text.node.parentNode!=this.graph.container?(this.preview.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.preview.init(this.graph.view.getOverlayPane())):(this.preview.dialect=mxConstants.DIALECT_STRICTHTML,this.preview.init(this.graph.container))},mxVertexHandler.prototype.mouseMove=function(e,t){if(t.isConsumed()||null==this.index)null!=this.getHandleForEvent(t)&&t.consume(!1);else{var n=new mxPoint(t.getGraphX(),t.getGraphY()),a=this.graph.isGridEnabledEvent(t.getEvent()),i=this.graph.getView().scale;if(this.index==mxEvent.LABEL_HANDLE)a&&(n.x=this.graph.snap(n.x/i)*i,n.y=this.graph.snap(n.y/i)*i),this.moveSizerTo(this.sizers[this.sizers.length-1],n.x,n.y);else if(this.index==mxEvent.ROTATION_HANDLE){var o=this.state.x+this.state.width/2-n.x,s=this.state.y+this.state.height/2-n.y;this.currentAlpha=0!=o?180*Math.atan(s/o)/Math.PI+90:s<0?180:0,0<o&&(this.currentAlpha-=180),this.rotationRaster&&(o=n.x-this.state.getCenterX(),s=n.y-this.state.getCenterY(),o=Math.abs(Math.sqrt(o*o+s*s)-this.state.height/2-20),o=Math.max(1,5*Math.min(3,Math.max(0,Math.round(80/Math.abs(o))))),this.currentAlpha=Math.round(this.currentAlpha/o)*o),this.selectionBorder.rotation=this.currentAlpha,this.selectionBorder.redraw()}else{var r=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),l=Math.cos(-r),d=Math.sin(-r),c=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),m=(o=n.x-this.startX,s=n.y-this.startY,n=this.graph.view.translate,d*o+l*s);o=l*o-d*s;this.bounds=this.union(this.selectionBounds,o,m,this.index,a,i,n),l=Math.cos(r),c=(d=Math.sin(r))*(o=(s=new mxPoint(this.bounds.getCenterX(),this.bounds.getCenterY())).x-c.x)+l*(s=s.y-c.y)-s,this.bounds.x+=l*o-d*s-o,this.bounds.y+=c,this.drawPreview()}t.consume()}},mxVertexHandler.prototype.mouseUp=function(e,t){if(!t.isConsumed()&&null!=this.index&&null!=this.state){var n=new mxPoint(t.getGraphX(),t.getGraphY());this.graph.getModel().beginUpdate();try{if(this.index==mxEvent.ROTATION_HANDLE)null!=this.currentAlpha&&this.rotateCell(this.state.cell,this.currentAlpha-(this.state.style[mxConstants.STYLE_ROTATION]||0));else{var a=this.graph.isGridEnabledEvent(t.getEvent()),i=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),o=Math.cos(-i),s=Math.sin(-i),r=(n=s*(r=n.x-this.startX)+o*(l=n.y-this.startY),o*r-s*l),l=n,d=this.graph.view.scale;this.resizeCell(this.state.cell,r/d,l/d,this.index,a)}}finally{this.graph.getModel().endUpdate()}this.reset(),t.consume()}},mxVertexHandler.prototype.rotateCell=function(e,t){var n=this.graph.getModel();if(n.isVertex(e)){if(null!=(o=e==this.state?this.state:this.graph.view.getState(e))&&this.graph.setCellStyles(mxConstants.STYLE_ROTATION,(o.style[mxConstants.STYLE_ROTATION]||0)+t,[e]),this.state.cell!=e&&(null!=(o=this.graph.getCellGeometry(e))&&!o.relative))if(0!=t){var a=this.graph.getModel().getParent(e),i=this.graph.getCellGeometry(a);if(!o.relative&&null!=i){var o,s=mxUtils.toRadians(t),r=(a=Math.cos(s),s=Math.sin(s),new mxPoint(o.getCenterX(),o.getCenterY()));i=new mxPoint(i.width/2,i.height/2),a=mxUtils.getRotatedPoint(r,a,s,i);(o=o.clone()).x=a.x-o.width/2,o.y=a.y-o.height/2,n.setGeometry(e,o)}}else(o=o.clone()).x+=dx,o.y+=dy,n.setGeometry(e,o);for(o=n.getChildCount(e),a=0;a<o;a++)this.rotateCell(n.getChildAt(e,a),t)}},mxVertexHandler.prototype.reset=function(){this.index=this.currentAlpha=null,null!=this.preview&&(this.preview.destroy(),this.preview=null),null!=this.selectionBorder&&(this.selectionBorder.node.style.display="inline",this.selectionBounds=this.getSelectionBounds(this.state),this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height),this.drawPreview())},mxVertexHandler.prototype.resizeCell=function(e,t,n,a,i){var o=this.graph.model.getGeometry(e);if(null!=o)if(a==mxEvent.LABEL_HANDLE)a=this.graph.view.scale,t=(this.labelShape.bounds.getCenterX()-this.startX)/a,n=(this.labelShape.bounds.getCenterY()-this.startY)/a,null==(o=o.clone()).offset?o.offset=new mxPoint(t,n):(o.offset.x+=t,o.offset.y+=n),this.graph.model.setGeometry(e,o);else{if(a=this.union(o,t,n,a,i,1,new mxPoint(0,0)),0!=(r=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"))){t=a.getCenterX()-o.getCenterX(),n=a.getCenterY()-o.getCenterY(),i=Math.cos(r);var s=Math.sin(r),r=i*t-s*n-t;t=s*t+i*n-n,n=a.x-o.x;var l=a.y-o.y,d=i*n-s*l;i=s*n+i*l,a.x+=r,a.y+=t,this.graph.isCellCollapsed(e)||0==r&&0==t||(n=o.x-a.x+d,l=o.y-a.y+i,this.moveChildren(e,n,l))}this.graph.resizeCell(e,a)}},mxVertexHandler.prototype.moveChildren=function(e,t,n){for(var a=this.graph.getModel(),i=a.getChildCount(e),o=0;o<i;o++){var s=a.getChildAt(e,o);if(a.isVertex(s)){var r=this.graph.getCellGeometry(s);null!=r&&!r.relative&&((r=r.clone()).x+=t,r.y+=n,a.setGeometry(s,r))}}},mxVertexHandler.prototype.union=function(e,t,n,a,i,o,s){if(this.singleSizer){s=e.x+e.width+t;var r=e.y+e.height+n;return i&&(s=this.graph.snap(s/o)*o,r=this.graph.snap(r/o)*o),(o=new mxRectangle(e.x,e.y,0,0)).add(new mxRectangle(s,r,0,0)),o}var l=(r=e.x-s.x*o)+e.width,d=e.y-s.y*o;return e=d+e.height,4<a?(e+=n,i&&(e=this.graph.snap(e/o)*o)):a<3&&(d+=n,i&&(d=this.graph.snap(d/o)*o)),0==a||3==a||5==a?(r+=t,i&&(r=this.graph.snap(r/o)*o)):2!=a&&4!=a&&7!=a||(l+=t,i&&(l=this.graph.snap(l/o)*o)),e-=d,(i=l-r)<0&&(r+=i,i=Math.abs(i)),e<0&&(d+=e,e=Math.abs(e)),new mxRectangle(r+s.x*o,d+s.y*o,i,e)},mxVertexHandler.prototype.redraw=function(){this.selectionBounds=this.getSelectionBounds(this.state),this.bounds=new mxRectangle(this.state.x,this.state.y,this.state.width,this.state.height);var e=this.state;if(null!=this.sizers){var t=e.x+e.width,n=e.y+e.height;if(this.singleSizer)this.moveSizerTo(this.sizers[0],t,n);else{var a=e.x+e.width/2,i=e.y+e.height/2;if(1<this.sizers.length){var o=mxUtils.toRadians(e.style[mxConstants.STYLE_ROTATION]||"0"),s=Math.cos(o),r=(o=Math.sin(o),new mxPoint(e.getCenterX(),e.getCenterY())),l=mxUtils.getRotatedPoint(new mxPoint(e.x,e.y),s,o,r);this.moveSizerTo(this.sizers[0],l.x,l.y),l.x=a,l.y=e.y,l=mxUtils.getRotatedPoint(l,s,o,r),this.moveSizerTo(this.sizers[1],l.x,l.y),l.x=t,l.y=e.y,l=mxUtils.getRotatedPoint(l,s,o,r),this.moveSizerTo(this.sizers[2],l.x,l.y),l.x=e.x,l.y=i,l=mxUtils.getRotatedPoint(l,s,o,r),this.moveSizerTo(this.sizers[3],l.x,l.y),l.x=t,l.y=i,l=mxUtils.getRotatedPoint(l,s,o,r),this.moveSizerTo(this.sizers[4],l.x,l.y),l.x=e.x,l.y=n,l=mxUtils.getRotatedPoint(l,s,o,r),this.moveSizerTo(this.sizers[5],l.x,l.y),l.x=a,l.y=n,l=mxUtils.getRotatedPoint(l,s,o,r),this.moveSizerTo(this.sizers[6],l.x,l.y),l.x=t,l.y=n,l=mxUtils.getRotatedPoint(l,s,o,r),this.moveSizerTo(this.sizers[7],l.x,l.y),this.moveSizerTo(this.sizers[8],a+e.absoluteOffset.x,i+e.absoluteOffset.y)}else 2<=this.state.width&&2<=this.state.height?this.moveSizerTo(this.sizers[0],a+e.absoluteOffset.x,i+e.absoluteOffset.y):this.moveSizerTo(this.sizers[0],e.x,e.y)}}null!=this.rotationShape&&(o=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),s=Math.cos(o),o=Math.sin(o),r=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),l=mxUtils.getRotatedPoint(new mxPoint(e.x+e.width/2,e.y-16),s,o,r),this.moveSizerTo(this.rotationShape,l.x,l.y)),this.selectionBorder.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"),this.drawPreview()},mxVertexHandler.prototype.drawPreview=function(){null!=this.preview&&(this.preview.bounds=this.bounds,this.preview.node.parentNode==this.graph.container&&(this.preview.bounds.width=Math.max(0,this.preview.bounds.width-1),this.preview.bounds.height=Math.max(0,this.preview.bounds.height-1)),this.preview.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"),this.preview.redraw()),this.selectionBorder.bounds=this.bounds,this.selectionBorder.redraw()},mxVertexHandler.prototype.destroy=function(){if(null!=this.preview&&(this.preview.destroy(),this.preview=null),this.selectionBorder.destroy(),this.labelShape=this.selectionBorder=null,null!=this.sizers)for(var e=0;e<this.sizers.length;e++)this.sizers[e].destroy(),this.sizers[e]=null},mxEdgeHandler.prototype.graph=null,mxEdgeHandler.prototype.state=null,mxEdgeHandler.prototype.marker=null,mxEdgeHandler.prototype.constraintHandler=null,mxEdgeHandler.prototype.error=null,mxEdgeHandler.prototype.shape=null,mxEdgeHandler.prototype.bends=null,mxEdgeHandler.prototype.labelShape=null,mxEdgeHandler.prototype.cloneEnabled=!0,mxEdgeHandler.prototype.addEnabled=!1,mxEdgeHandler.prototype.removeEnabled=!1,mxEdgeHandler.prototype.preferHtml=!1,mxEdgeHandler.prototype.allowHandleBoundsCheck=!0,mxEdgeHandler.prototype.snapToTerminals=!1,mxEdgeHandler.prototype.handleImage=null,mxEdgeHandler.prototype.tolerance=0,mxEdgeHandler.prototype.init=function(){if(this.graph=this.state.view.graph,this.marker=this.createMarker(),this.constraintHandler=new mxConstraintHandler(this.graph),this.points=[],this.abspoints=this.getSelectionPoints(this.state),this.shape=this.createSelectionShape(this.abspoints),this.shape.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,this.shape.init(this.graph.getView().getOverlayPane()),this.shape.svgStrokeTolerance=0,this.shape.node.style.cursor=mxConstants.CURSOR_MOVABLE_EDGE,mxEvent.addListener(this.shape.node,"dblclick",mxUtils.bind(this,function(e){this.graph.dblClick(e,this.state.cell)})),mxEvent.addGestureListeners(this.shape.node,mxUtils.bind(this,function(e){this.addEnabled&&this.isAddPointEvent(e)?this.addPoint(this.state,e):this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e,this.state))}),mxUtils.bind(this,function(e){var t=this.state.cell;if(null!=this.index){var n=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));t=this.graph.getCellAt(n.x,n.y);this.graph.isSwimlane(t)&&this.graph.hitsSwimlaneContent(t,n.x,n.y)&&(t=null)}this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,this.graph.getView().getState(t)))}),mxUtils.bind(this,function(e){this.graph.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e,this.state))})),this.preferHtml=null!=this.state.text&&this.state.text.node.parentNode==this.graph.container,!this.preferHtml){var e=this.state.getVisibleTerminalState(!0);null!=e&&(this.preferHtml=null!=e.text&&e.text.node.parentNode==this.graph.container),this.preferHtml||null!=(e=this.state.getVisibleTerminalState(!1))&&(this.preferHtml=null!=e.text&&e.text.node.parentNode==this.graph.container)}(this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells||mxGraphHandler.prototype.maxCells<=0)&&(this.bends=this.createBends()),this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y),this.labelShape=new mxRectangleShape(new mxRectangle,mxConstants.LABEL_HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR),this.labelShape.pointerEvents=!1,this.initBend(this.labelShape),this.labelShape.node.style.cursor=mxConstants.CURSOR_LABEL_HANDLE,mxEvent.redirectMouseEvents(this.labelShape.node,this.graph,this.state),this.redraw()},mxEdgeHandler.prototype.isAddPointEvent=function(e){return mxEvent.isShiftDown(e)},mxEdgeHandler.prototype.isRemovePointEvent=function(e){return mxEvent.isShiftDown(e)},mxEdgeHandler.prototype.getSelectionPoints=function(e){return e.absolutePoints},mxEdgeHandler.prototype.createSelectionShape=function(e){return(e=new mxPolyline(e,this.getSelectionColor())).strokewidth=this.getSelectionStrokeWidth(),e.isDashed=this.isSelectionDashed(),e},mxEdgeHandler.prototype.getSelectionColor=function(){return mxConstants.EDGE_SELECTION_COLOR},mxEdgeHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.EDGE_SELECTION_STROKEWIDTH},mxEdgeHandler.prototype.isSelectionDashed=function(){return mxConstants.EDGE_SELECTION_DASHED},mxEdgeHandler.prototype.isConnectableCell=function(e){return!0},mxEdgeHandler.prototype.createMarker=function(){var e=new mxCellMarker(this.graph),a=this;return e.getCell=function(e){var t=mxCellMarker.prototype.getCell.apply(this,arguments);if(!a.isConnectableCell(t))return null;var n=a.graph.getModel();return(t==a.state.cell||null!=t&&!a.graph.connectableEdges&&n.isEdge(t))&&(t=null),t},e.isValidState=function(e){var t=a.graph.getModel();t=null!=(t=a.graph.view.getTerminalPort(e,a.graph.view.getState(t.getTerminal(a.state.cell,!a.isSource)),!a.isSource))?t.cell:null;return a.error=a.validateConnection(a.isSource?e.cell:t,a.isSource?t:e.cell),null==a.error},e},mxEdgeHandler.prototype.validateConnection=function(e,t){return this.graph.getEdgeValidationError(this.state.cell,e,t)},mxEdgeHandler.prototype.createBends=function(){for(var e=this.state.cell,t=[],n=0;n<this.abspoints.length;n++)if(this.isHandleVisible(n)){var a=n==this.abspoints.length-1;if((a=0==n||a)||this.graph.isCellBendable(e)){var i=this.createHandleShape(n);if(this.initBend(i),mxClient.IS_TOUCH&&i.node.setAttribute("pointer-events","none"),this.isHandleEnabled(n))if(mxClient.IS_TOUCH){var o=mxUtils.bind(this,function(e){return e=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e)),this.graph.view.getState(this.graph.getCellAt(e.x,e.y))});mxEvent.redirectMouseEvents(i.node,this.graph,o)}else i.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE,mxEvent.redirectMouseEvents(i.node,this.graph,this.state);t.push(i),a||(this.points.push(new mxPoint(0,0)),i.node.style.visibility="hidden")}}return t},mxEdgeHandler.prototype.isHandleEnabled=function(e){return!0},mxEdgeHandler.prototype.isHandleVisible=function(e){return!0},mxEdgeHandler.prototype.createHandleShape=function(e){return null!=this.handleImage?new mxImageShape(new mxRectangle(0,0,this.handleImage.width,this.handleImage.height),this.handleImage.src):(e=mxConstants.HANDLE_SIZE,this.preferHtml&&(e-=1),new mxRectangleShape(new mxRectangle(0,0,e,e),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR))},mxEdgeHandler.prototype.initBend=function(e){this.preferHtml?(e.dialect=mxConstants.DIALECT_STRICTHTML,e.init(this.graph.container)):(e.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,e.init(this.graph.getView().getOverlayPane()))},mxEdgeHandler.prototype.getHandleForEvent=function(e){if(null!=this.bends)for(var t=this.tolerance,n=(t=this.allowHandleBoundsCheck&&(mxClient.IS_IE||0<t)?new mxRectangle(e.getGraphX()-t,e.getGraphY()-t,2*t,2*t):null,0);n<this.bends.length;n++)if((e.isSource(this.bends[n])||null!=t&&mxUtils.intersects(this.bends[n].bounds,t))&&"hidden"!=this.bends[n].node.style.visibility)return n;return!(e.isSource(this.labelShape)&&"hidden"!=this.labelShape.node.style.visibility||e.isSource(this.state.text))||(mxClient.IS_SF||mxClient.IS_GC)&&"SELECT"==e.getSource().nodeName?null:mxEvent.LABEL_HANDLE},mxEdgeHandler.prototype.mouseDown=function(e,t){var n=null;null!=(n=this.getHandleForEvent(t))&&!t.isConsumed()&&this.graph.isEnabled()&&!this.graph.isForceMarqueeEvent(t.getEvent())&&(this.removeEnabled&&this.isRemovePointEvent(t.getEvent())?this.removePoint(this.state,n):(n!=mxEvent.LABEL_HANDLE||this.graph.isLabelMovable(t.getCell()))&&this.start(t.getX(),t.getY(),n),t.consume())},mxEdgeHandler.prototype.start=function(e,t,n){this.startX=e,this.startY=t,this.isSource=null!=this.bends&&0==n,this.isTarget=null!=this.bends&&n==this.bends.length-1,this.isLabel=n==mxEvent.LABEL_HANDLE,this.isSource||this.isTarget?(e=this.state.cell,(null==(t=this.graph.model.getTerminal(e,this.isSource))&&this.graph.isTerminalPointMovable(e,this.isSource)||null!=t&&this.graph.isCellDisconnectable(e,t,this.isSource))&&(this.index=n)):this.index=n},mxEdgeHandler.prototype.clonePreviewState=function(e,t){return this.state.clone()},mxEdgeHandler.prototype.getSnapToTerminalTolerance=function(){return this.graph.gridSize*this.graph.view.scale/2},mxEdgeHandler.prototype.getPointForEvent=function(e){var n=new mxPoint(e.getGraphX(),e.getGraphY()),a=this.getSnapToTerminalTolerance(),t=this.graph.getView(),i=!1,o=!1;if(this.snapToTerminals&&0<a){var s=function(e){if(null!=e){var t=e.x;Math.abs(n.x-t)<a&&(n.x=t,i=!0),e=e.y,Math.abs(n.y-e)<a&&(n.y=e,o=!0)}},r=function(e){null!=e&&s.call(this,new mxPoint(t.getRoutingCenterX(e),t.getRoutingCenterY(e)))};if(r.call(this,this.state.getVisibleTerminalState(!0)),r.call(this,this.state.getVisibleTerminalState(!1)),null!=this.abspoints)for(r=0;r<this.abspoints;r++)r!=this.index&&s.call(this,this.abspoints[r])}return this.graph.isGridEnabledEvent(e.getEvent())&&(e=t.scale,r=t.translate,i||(n.x=(this.graph.snap(n.x/e-r.x)+r.x)*e),o||(n.y=(this.graph.snap(n.y/e-r.y)+r.y)*e)),n},mxEdgeHandler.prototype.getPreviewTerminalState=function(e){this.constraintHandler.update(e,this.isSource),this.marker.process(e),e=this.marker.getValidState();var t=null;return null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentConstraint&&this.marker.reset(),null!=e?t=e:null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(t=this.constraintHandler.currentFocus),t},mxEdgeHandler.prototype.getPreviewPoints=function(e){var t=null!=(t=this.graph.getCellGeometry(this.state.cell)).points?t.points.slice():null;return this.isSource||this.isTarget?this.graph.resetEdgesOnConnect&&(t=null):(this.convertPoint(e,!1),null==t?t=[e]:t[this.index-1]=e),t},mxEdgeHandler.prototype.updatePreviewState=function(e,t,n){var a=this.isSource?n:this.state.getVisibleTerminalState(!0),i=this.isTarget?n:this.state.getVisibleTerminalState(!1),o=this.graph.getConnectionConstraint(e,a,!0),s=this.graph.getConnectionConstraint(e,i,!1),r=this.constraintHandler.currentConstraint;null==r&&(r=new mxConnectionConstraint),this.isSource?o=r:this.isTarget&&(s=r),(!this.isSource||null!=a)&&e.view.updateFixedTerminalPoint(e,a,!0,o),(!this.isTarget||null!=i)&&e.view.updateFixedTerminalPoint(e,i,!1,s),(this.isSource||this.isTarget)&&null==n&&(e.setAbsoluteTerminalPoint(t,this.isSource),null==this.marker.getMarkedState()&&(this.error=this.graph.allowDanglingEdges?null:"")),e.view.updatePoints(e,this.points,a,i),e.view.updateFloatingTerminalPoints(e,a,i)},mxEdgeHandler.prototype.mouseMove=function(e,t){if(null!=this.index&&null!=this.marker){var n=this.getPointForEvent(t);if(this.isLabel)this.label.x=n.x,this.label.y=n.y;else{this.points=this.getPreviewPoints(n);var a=this.isSource||this.isTarget?this.getPreviewTerminalState(t):null,i=this.clonePreviewState(n,null!=a?a.cell:null);this.updatePreviewState(i,n,a),this.setPreviewColor(null==this.error?this.marker.validColor:this.marker.invalidColor),this.abspoints=i.absolutePoints,this.active=!0}this.drawPreview(),mxEvent.consume(t.getEvent()),t.consume()}else mxClient.IS_IE&&null!=this.getHandleForEvent(t)&&t.consume(!1)},mxEdgeHandler.prototype.mouseUp=function(e,t){if(null!=this.index&&null!=this.marker){var n=this.state.cell;if(t.getX()!=this.startX||t.getY()!=this.startY)if(null!=this.error)0<this.error.length&&this.graph.validationAlert(this.error);else if(this.isLabel)this.moveLabel(this.state,this.label.x,this.label.y);else if(this.isSource||this.isTarget){var a=null;if(null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(a=this.constraintHandler.currentFocus.cell),null==a&&this.marker.hasValidState()&&(a=this.marker.validState.cell),null!=a)n=this.connect(n,a,this.isSource,this.graph.isCloneEvent(t.getEvent())&&this.cloneEnabled&&this.graph.isCellsCloneable(),t);else if(this.graph.isAllowDanglingEdges()){(a=this.abspoints[this.isSource?0:this.abspoints.length-1]).x=a.x/this.graph.view.scale-this.graph.view.translate.x,a.y=a.y/this.graph.view.scale-this.graph.view.translate.y;var i=this.graph.getView().getState(this.graph.getModel().getParent(n));null!=i&&(a.x-=i.origin.x,a.y-=i.origin.y),a.x-=this.graph.panDx/this.graph.view.scale,a.y-=this.graph.panDy/this.graph.view.scale,this.changeTerminalPoint(n,a,this.isSource)}}else this.active?this.changePoints(n,this.points):(this.graph.getView().invalidate(this.state.cell),this.graph.getView().revalidate(this.state.cell));null!=this.marker&&(this.reset(),n!=this.state.cell&&this.graph.setSelectionCell(n)),t.consume()}},mxEdgeHandler.prototype.reset=function(){this.points=this.label=this.index=this.error=null,this.isTarget=this.isSource=this.isLabel=this.active=!1,this.marker.reset(),this.constraintHandler.reset(),this.setPreviewColor(mxConstants.EDGE_SELECTION_COLOR),this.redraw()},mxEdgeHandler.prototype.setPreviewColor=function(e){null!=this.shape&&(this.shape.stroke=e)},mxEdgeHandler.prototype.convertPoint=function(e,t){var n=this.graph.getView().getScale(),a=this.graph.getView().getTranslate();return t&&(e.x=this.graph.snap(e.x),e.y=this.graph.snap(e.y)),e.x=Math.round(e.x/n-a.x),e.y=Math.round(e.y/n-a.y),null!=(n=this.graph.getView().getState(this.graph.getModel().getParent(this.state.cell)))&&(e.x-=n.origin.x,e.y-=n.origin.y),e},mxEdgeHandler.prototype.moveLabel=function(e,t,n){var a=this.graph.getModel();if(null!=(i=a.getGeometry(e.cell))){var i=i.clone(),o=this.graph.getView().getRelativePoint(e,t,n);i.x=o.x,i.y=o.y;var s=this.graph.getView().scale;i.offset=new mxPoint(0,0),o=this.graph.view.getPoint(e,i),i.offset=new mxPoint((t-o.x)/s,(n-o.y)/s),a.setGeometry(e.cell,i)}},mxEdgeHandler.prototype.connect=function(e,t,n,a,i){var o=(i=this.graph.getModel()).getParent(e);i.beginUpdate();try{if(a){var s=e.clone();i.add(o,s,i.getChildCount(o));var r=i.getTerminal(e,!n);this.graph.connectCell(s,r,!n),e=s}var l=this.constraintHandler.currentConstraint;null==l&&(l=new mxConnectionConstraint),this.graph.connectCell(e,t,n,l)}finally{i.endUpdate()}return e},mxEdgeHandler.prototype.changeTerminalPoint=function(e,t,n){var a=this.graph.getModel(),i=a.getGeometry(e);if(null!=i){a.beginUpdate();try{(i=i.clone()).setTerminalPoint(t,n),a.setGeometry(e,i),this.graph.connectCell(e,null,n,new mxConnectionConstraint)}finally{a.endUpdate()}}},mxEdgeHandler.prototype.changePoints=function(e,t){var n=this.graph.getModel(),a=n.getGeometry(e);null!=a&&((a=a.clone()).points=t,n.setGeometry(e,a))},mxEdgeHandler.prototype.addPoint=function(e,t){var n=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(t),mxEvent.getClientY(t)),a=this.graph.isGridEnabledEvent(t);this.convertPoint(n,a),this.addPointAt(e,n.x,n.y),mxEvent.consume(t)},mxEdgeHandler.prototype.addPointAt=function(e,t,n){var a=this.graph.getCellGeometry(e.cell);if(t=new mxPoint(t,n),null!=a){a=a.clone(),n=this.graph.view.translate;var i=this.graph.view.scale;n=mxUtils.findNearestSegment(e,(t.x+n.x)*i,(t.y+n.y)*i),null==a.points?a.points=[t]:a.points.splice(n,0,t),this.graph.getModel().setGeometry(e.cell,a),this.destroy(),this.init()}},mxEdgeHandler.prototype.removePoint=function(e,t){if(0<t&&t<this.abspoints.length-1){var n=this.graph.getCellGeometry(this.state.cell);null!=n&&null!=n.points&&((n=n.clone()).points.splice(t-1,1),this.graph.getModel().setGeometry(e.cell,n),this.destroy(),this.init())}},mxEdgeHandler.prototype.getHandleFillColor=function(e){e=0==e;var t=this.state.cell,n=this.graph.getModel().getTerminal(t,e),a=mxConstants.HANDLE_FILLCOLOR;return null!=n&&!this.graph.isCellDisconnectable(t,n,e)||null==n&&!this.graph.isTerminalPointMovable(t,e)?a=mxConstants.LOCKED_HANDLE_FILLCOLOR:null!=n&&this.graph.isCellDisconnectable(t,n,e)&&(a=mxConstants.CONNECT_HANDLE_FILLCOLOR),a},mxEdgeHandler.prototype.redraw=function(){this.abspoints=this.state.absolutePoints.slice();var e=this.state.cell,t=mxConstants.LABEL_HANDLE_SIZE;if(this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y),this.labelShape.bounds=new mxRectangle(Math.round(this.label.x-t/2),Math.round(this.label.y-t/2),t,t),this.labelShape.redraw(),null!=(t=this.graph.getLabel(e))&&0<t.length&&this.graph.isLabelMovable(e)?this.labelShape.node.style.visibility="visible":this.labelShape.node.style.visibility="hidden",null!=this.bends&&0<this.bends.length){var n=this.abspoints.length-1,a=(e=this.abspoints[0],this.abspoints[0].y);t=this.bends[0].bounds;this.bends[0].bounds=new mxRectangle(Math.round(this.abspoints[0].x-t.width/2),Math.round(a-t.height/2),t.width,t.height),this.bends[0].fill=this.getHandleFillColor(0),this.bends[0].redraw();a=this.abspoints[n];var i=this.abspoints[n].x,o=(n=this.abspoints[n].y,this.bends.length-1);t=this.bends[o].bounds;this.bends[o].bounds=new mxRectangle(Math.round(i-t.width/2),Math.round(n-t.height/2),t.width,t.height),this.bends[o].fill=this.getHandleFillColor(o),this.bends[o].redraw(),this.redrawInnerBends(e,a)}this.drawPreview()},mxEdgeHandler.prototype.redrawInnerBends=function(e,t){var n=this.graph.getModel().getGeometry(this.state.cell).points;if(null!=n){null==this.points&&(this.points=[]);for(var a=1;a<this.bends.length-1;a++)if(null!=this.bends[a])if(null!=this.abspoints[a]){var i=this.abspoints[a].x,o=this.abspoints[a].y,s=this.bends[a].bounds;this.bends[a].node.style.visibility="visible",this.bends[a].bounds=new mxRectangle(Math.round(i-s.width/2),Math.round(o-s.height/2),s.width,s.height),this.bends[a].redraw(),this.points[a-1]=n[a-1]}else this.bends[a].destroy(),this.bends[a]=null}},mxEdgeHandler.prototype.drawPreview=function(){if(this.isLabel){var e=mxConstants.LABEL_HANDLE_SIZE;e=new mxRectangle(Math.round(this.label.x-e/2),Math.round(this.label.y-e/2),e,e);this.labelShape.bounds=e,this.labelShape.redraw()}else this.shape.points=this.abspoints,this.shape.redraw()},mxEdgeHandler.prototype.destroy=function(){if(null!=this.marker&&(this.marker.destroy(),this.marker=null),null!=this.shape&&(this.shape.destroy(),this.shape=null),null!=this.labelShape&&(this.labelShape.destroy(),this.labelShape=null),null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null),null!=this.bends)for(var e=0;e<this.bends.length;e++)null!=this.bends[e]&&(this.bends[e].destroy(),this.bends[e]=null)},mxUtils.extend(mxElbowEdgeHandler,mxEdgeHandler),mxElbowEdgeHandler.prototype=new mxEdgeHandler,mxElbowEdgeHandler.prototype.constructor=mxElbowEdgeHandler,mxElbowEdgeHandler.prototype.flipEnabled=!0,mxElbowEdgeHandler.prototype.doubleClickOrientationResource="none"!=mxClient.language?"doubleClickOrientation":"",mxElbowEdgeHandler.prototype.createBends=function(){var e=[],t=this.createHandleShape(0);return this.initBend(t),t.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE,mxEvent.redirectMouseEvents(t.node,this.graph,this.state),e.push(t),mxClient.IS_TOUCH&&t.node.setAttribute("pointer-events","none"),e.push(this.createVirtualBend()),this.points.push(new mxPoint(0,0)),t=this.createHandleShape(2),this.initBend(t),t.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE,mxEvent.redirectMouseEvents(t.node,this.graph,this.state),e.push(t),mxClient.IS_TOUCH&&t.node.setAttribute("pointer-events","none"),e},mxElbowEdgeHandler.prototype.createVirtualBend=function(){var e=this.createHandleShape();this.initBend(e);var t=this.getCursorForBend();return e.node.style.cursor=t,t=mxUtils.bind(this,function(e){!mxEvent.isConsumed(e)&&this.flipEnabled&&(this.graph.flipEdge(this.state.cell,e),mxEvent.consume(e))}),mxEvent.redirectMouseEvents(e.node,this.graph,this.state,null,null,null,t),this.graph.isCellBendable(this.state.cell)||(e.node.style.display="none"),e},mxElbowEdgeHandler.prototype.getCursorForBend=function(){return this.state.style[mxConstants.STYLE_EDGE]==mxEdgeStyle.TopToBottom||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.EDGESTYLE_TOPTOBOTTOM||(this.state.style[mxConstants.STYLE_EDGE]==mxEdgeStyle.ElbowConnector||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.EDGESTYLE_ELBOW)&&this.state.style[mxConstants.STYLE_ELBOW]==mxConstants.ELBOW_VERTICAL?"row-resize":"col-resize"},mxElbowEdgeHandler.prototype.getTooltipForNode=function(e){var t=null;return null==this.bends||null==this.bends[1]||e!=this.bends[1].node&&e.parentNode!=this.bends[1].node||(t=this.doubleClickOrientationResource,t=mxResources.get(t)||t),t},mxElbowEdgeHandler.prototype.convertPoint=function(e,t){var n=this.graph.getView().getScale(),a=this.graph.getView().getTranslate(),i=this.state.origin;t&&(e.x=this.graph.snap(e.x),e.y=this.graph.snap(e.y)),e.x=Math.round(e.x/n-a.x-i.x),e.y=Math.round(e.y/n-a.y-i.y)},mxElbowEdgeHandler.prototype.redrawInnerBends=function(e,t){var n=null==(n=null!=(n=this.graph.getModel().getGeometry(this.state.cell).points)?n[0]:null)?new mxPoint(e.x+(t.x-e.x)/2,e.y+(t.y-e.y)/2):new mxPoint(this.graph.getView().scale*(n.x+this.graph.getView().translate.x+this.state.origin.x),this.graph.getView().scale*(n.y+this.graph.getView().translate.y+this.state.origin.y)),a=(i=this.bends[1].bounds).width,i=i.height;null==this.handleImage&&(i=a=mxConstants.HANDLE_SIZE);var o=new mxRectangle(Math.round(n.x-a/2),Math.round(n.y-i/2),a,i);null==this.handleImage&&"hidden"!=this.labelShape.node.style.visibility&&mxUtils.intersects(o,this.labelShape.bounds)&&(a+=3,i+=3,o=new mxRectangle(Math.round(n.x-a/2),Math.round(n.y-i/2),a,i)),this.bends[1].bounds=o,this.bends[1].redraw()},mxUtils.extend(mxEdgeSegmentHandler,mxEdgeHandler),mxEdgeSegmentHandler.prototype=new mxElbowEdgeHandler,mxEdgeSegmentHandler.prototype.constructor=mxEdgeSegmentHandler,mxEdgeSegmentHandler.prototype.getPreviewPoints=function(e){if(this.isSource||this.isTarget)return mxElbowEdgeHandler.prototype.getPreviewPoints.apply(this,arguments);this.convertPoint(e,!1);var t=this.state.absolutePoints,n=t[0].clone();this.convertPoint(n,!1);for(var a=[],i=1;i<t.length;i++){var o=t[i].clone();this.convertPoint(o,!1),i==this.index&&(n.x==o.x?(n.x=e.x,o.x=e.x):(n.y=e.y,o.y=e.y)),i<t.length-1&&a.push(o),n=o}if(1==a.length){if(n=this.state.view,i=this.state.getVisibleTerminalState(!0),null!=(o=this.state.getVisibleTerminalState(!1))&null!=i){var s=this.state.origin.x,r=this.state.origin.y;mxUtils.contains(o,a[0].x+s,a[0].y+r)?t[1].y==t[2].y?a[0].y=n.getRoutingCenterY(i)-r:a[0].x=n.getRoutingCenterX(i)-s:mxUtils.contains(i,a[0].x+s,a[0].y+r)&&(t[1].y==t[0].y?a[0].y=n.getRoutingCenterY(o)-r:a[0].x=n.getRoutingCenterX(o)-s)}}else 0==a.length&&(a=[e]);return a},mxEdgeSegmentHandler.prototype.createBends=function(){var e=[],t=this.createHandleShape(0);this.initBend(t),t.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE,mxEvent.redirectMouseEvents(t.node,this.graph,this.state),e.push(t),mxClient.IS_TOUCH&&t.node.setAttribute("pointer-events","none");var n=this.state.absolutePoints;if(this.graph.isCellBendable(this.state.cell)){null==this.points&&(this.points=[]);for(var a=0;a<n.length-1;a++)t=this.createVirtualBend(),e.push(t),t.node.style.cursor=0==n[a].x-n[a+1].x?"col-resize":"row-resize",this.points.push(new mxPoint(0,0)),mxClient.IS_TOUCH&&t.node.setAttribute("pointer-events","none")}return t=this.createHandleShape(n.length),this.initBend(t),t.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE,mxEvent.redirectMouseEvents(t.node,this.graph,this.state),e.push(t),mxClient.IS_TOUCH&&t.node.setAttribute("pointer-events","none"),e},mxEdgeSegmentHandler.prototype.redraw=function(){this.refresh(),mxEdgeHandler.prototype.redraw.apply(this,arguments)},mxEdgeSegmentHandler.prototype.refresh=function(){if(null!=this.bends){for(var e=0;e<this.bends.length;e++)null!=this.bends[e]&&(this.bends[e].destroy(),this.bends[e]=null);this.bends=this.createBends()}},mxEdgeSegmentHandler.prototype.redrawInnerBends=function(e,t){if(this.graph.isCellBendable(this.state.cell)){var n=mxConstants.HANDLE_SIZE,a=this.state.absolutePoints;if(null!=a&&1<a.length)for(var i=0;i<this.state.absolutePoints.length-1;i++)if(null!=this.bends[i+1]){e=a[i],t=a[i+1];var o=new mxPoint(e.x+(t.x-e.x)/2,e.y+(t.y-e.y)/2);this.bends[i+1].bounds=new mxRectangle(Math.round(o.x-n/2),Math.round(o.y-n/2),n,n),this.bends[i+1].redraw()}}},mxEdgeSegmentHandler.prototype.changePoints=function(e,t){t=[];var n=this.abspoints;if(1<n.length)for(var a=n[0],i=n[1],o=2;o<n.length;o++){var s=n[o];Math.round(a.x)==Math.round(i.x)&&Math.round(i.x)==Math.round(s.x)||Math.round(a.y)==Math.round(i.y)&&Math.round(i.y)==Math.round(s.y)||(i=(a=i).clone(),this.convertPoint(i,!1),t.push(i)),i=s}mxElbowEdgeHandler.prototype.changePoints.apply(this,arguments)},mxKeyHandler.prototype.graph=null,mxKeyHandler.prototype.target=null,mxKeyHandler.prototype.normalKeys=null,mxKeyHandler.prototype.shiftKeys=null,mxKeyHandler.prototype.controlKeys=null,mxKeyHandler.prototype.controlShiftKeys=null,mxKeyHandler.prototype.enabled=!0,mxKeyHandler.prototype.isEnabled=function(){return this.enabled},mxKeyHandler.prototype.setEnabled=function(e){this.enabled=e},mxKeyHandler.prototype.bindKey=function(e,t){this.normalKeys[e]=t},mxKeyHandler.prototype.bindShiftKey=function(e,t){this.shiftKeys[e]=t},mxKeyHandler.prototype.bindControlKey=function(e,t){this.controlKeys[e]=t},mxKeyHandler.prototype.bindControlShiftKey=function(e,t){this.controlShiftKeys[e]=t},mxKeyHandler.prototype.isControlDown=function(e){return mxEvent.isControlDown(e)},mxKeyHandler.prototype.getFunction=function(e){return null!=e?this.isControlDown(e)?mxEvent.isShiftDown(e)?this.controlShiftKeys[e.keyCode]:this.controlKeys[e.keyCode]:mxEvent.isShiftDown(e)?this.shiftKeys[e.keyCode]:this.normalKeys[e.keyCode]:null},mxKeyHandler.prototype.isGraphEvent=function(e){if((e=mxEvent.getSource(e))==this.target||e.parentNode==this.target||null!=this.graph.cellEditor&&e==this.graph.cellEditor.textarea)return!0;for(;null!=e;){if(e==this.graph.container)return!0;e=e.parentNode}return!1},mxKeyHandler.prototype.keyDown=function(e){if(this.graph.isEnabled()&&!mxEvent.isConsumed(e)&&this.isGraphEvent(e)&&this.isEnabled())if(27==e.keyCode)this.escape(e);else if(!this.graph.isEditing()){var t=this.getFunction(e);null!=t&&(t(e),mxEvent.consume(e))}},mxKeyHandler.prototype.escape=function(e){this.graph.isEscapeEnabled()&&this.graph.escape(e)},mxKeyHandler.prototype.destroy=function(){this.target=null},mxTooltipHandler.prototype.zIndex=10005,mxTooltipHandler.prototype.graph=null,mxTooltipHandler.prototype.delay=null,mxTooltipHandler.prototype.hideOnHover=!1,mxTooltipHandler.prototype.enabled=!0,mxTooltipHandler.prototype.isEnabled=function(){return this.enabled},mxTooltipHandler.prototype.setEnabled=function(e){this.enabled=e},mxTooltipHandler.prototype.isHideOnHover=function(){return this.hideOnHover},mxTooltipHandler.prototype.setHideOnHover=function(e){this.hideOnHover=e},mxTooltipHandler.prototype.init=function(){null!=document.body&&(this.div=document.createElement("div"),this.div.className="mxTooltip",this.div.style.visibility="hidden",this.div.style.zIndex=this.zIndex,document.body.appendChild(this.div),mxEvent.addListener(this.div,"mousedown",mxUtils.bind(this,function(e){this.hideTooltip()})))},mxTooltipHandler.prototype.mouseDown=function(e,t){this.reset(t,!1),this.hideTooltip()},mxTooltipHandler.prototype.mouseMove=function(e,t){t.getX()==this.lastX&&t.getY()==this.lastY||(this.reset(t,!0),(this.isHideOnHover()||t.getState()!=this.state||t.getSource()!=this.node&&(!this.stateSource||null!=t.getState()&&this.stateSource==(t.isSource(t.getState().shape)||!t.isSource(t.getState().text))))&&this.hideTooltip()),this.lastX=t.getX(),this.lastY=t.getY()},mxTooltipHandler.prototype.mouseUp=function(e,t){this.reset(t,!0),this.hideTooltip()},mxTooltipHandler.prototype.resetTimer=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null)},mxTooltipHandler.prototype.reset=function(e,t){if(this.resetTimer(),t&&this.isEnabled()&&null!=e.getState()&&(null==this.div||"hidden"==this.div.style.visibility)){var n=e.getState(),a=e.getSource(),i=e.getX(),o=e.getY(),s=e.isSource(n.shape)||e.isSource(n.text);this.thread=window.setTimeout(mxUtils.bind(this,function(){if(!this.graph.isEditing()&&!this.graph.panningHandler.isMenuShowing()){var e=this.graph.getTooltip(n,a,i,o);this.show(e,i,o),this.state=n,this.node=a,this.stateSource=s}}),this.delay)}},mxTooltipHandler.prototype.hide=function(){this.resetTimer(),this.hideTooltip()},mxTooltipHandler.prototype.hideTooltip=function(){null!=this.div&&(this.div.style.visibility="hidden")},mxTooltipHandler.prototype.show=function(e,t,n){if(null!=e&&0<e.length){null==this.div&&this.init();var a=mxUtils.getScrollOrigin();this.div.style.left=t+a.x+"px",this.div.style.top=n+mxConstants.TOOLTIP_VERTICAL_OFFSET+a.y+"px",mxUtils.isNode(e)?(this.div.innerHTML="",this.div.appendChild(e)):this.div.innerHTML=e.replace(/\n/g,"<br>"),this.div.style.visibility="",mxUtils.fit(this.div)}},mxTooltipHandler.prototype.destroy=function(){this.graph.removeMouseListener(this),mxEvent.release(this.div),null!=this.div&&null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.div=null},mxUtils.extend(mxCellTracker,mxCellMarker),mxCellTracker.prototype.mouseDown=function(e,t){},mxCellTracker.prototype.mouseMove=function(e,t){this.isEnabled()&&this.process(t)},mxCellTracker.prototype.mouseUp=function(e,t){this.reset()},mxCellTracker.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),mxCellMarker.prototype.destroy.apply(this))},mxCellHighlight.prototype.keepOnTop=!1,mxCellHighlight.prototype.graph=!0,mxCellHighlight.prototype.state=null,mxCellHighlight.prototype.spacing=2,mxCellHighlight.prototype.resetHandler=null,mxCellHighlight.prototype.setHighlightColor=function(e){this.highlightColor=e,null!=this.shape&&(this.shape.stroke=e)},mxCellHighlight.prototype.drawHighlight=function(){this.shape=this.createShape(),this.repaint(),!this.keepOnTop&&this.shape.node.parentNode.firstChild!=this.shape.node&&this.shape.node.parentNode.insertBefore(this.shape.node,this.shape.node.parentNode.firstChild)},mxCellHighlight.prototype.createShape=function(){var e=null;return(e=this.graph.model.isEdge(this.state.cell)?new mxPolyline(this.state.absolutePoints,this.highlightColor,this.strokeWidth):new mxRectangleShape(new mxRectangle,null,this.highlightColor,this.strokeWidth)).dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,e.init(this.graph.getView().getOverlayPane()),mxEvent.redirectMouseEvents(e.node,this.graph,this.state),e.svgStrokeTolerance=0,e.pointerEvents=!1,e.isDashed=this.dashed,e},mxCellHighlight.prototype.repaint=function(){if(null!=this.state&&null!=this.shape){var e=0;this.graph.model.isEdge(this.state.cell)?this.shape.points=this.state.absolutePoints:(this.shape.bounds=new mxRectangle(this.state.x-this.spacing,this.state.y-this.spacing,this.state.width+2*this.spacing,this.state.height+2*this.spacing),e=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0")),null!=this.state.shape&&this.shape.setCursor(this.state.shape.getCursor()),0!=e&&(this.shape.rotation=e),this.shape.redraw()}},mxCellHighlight.prototype.hide=function(){this.highlight(null)},mxCellHighlight.prototype.highlight=function(e){this.state!=e&&(null!=this.shape&&(this.shape.destroy(),this.shape=null),this.state=e,null!=this.state&&this.drawHighlight())},mxCellHighlight.prototype.destroy=function(){this.graph.getView().removeListener(this.repaintHandler),this.graph.getModel().removeListener(this.repaintHandler),this.graph.getView().removeListener(this.resetHandler),this.graph.getModel().removeListener(this.resetHandler),null!=this.shape&&(this.shape.destroy(),this.shape=null)},mxDefaultKeyHandler.prototype.editor=null,mxDefaultKeyHandler.prototype.handler=null,mxDefaultKeyHandler.prototype.bindAction=function(e,t,n){var a=mxUtils.bind(this,function(){this.editor.execute(t)});n?this.handler.bindControlKey(e,a):this.handler.bindKey(e,a)},mxDefaultKeyHandler.prototype.destroy=function(){this.handler.destroy(),this.handler=null},mxDefaultPopupMenu.prototype.imageBasePath=null,mxDefaultPopupMenu.prototype.config=null,mxDefaultPopupMenu.prototype.createMenu=function(e,t,n,a){if(null!=this.config){var i=this.createConditions(e,n,a);this.addItems(e,t,n,a,i,this.config.firstChild,null)}},mxDefaultPopupMenu.prototype.addItems=function(e,t,n,a,i,o,s){for(var r=!1;null!=o;){if("add"==o.nodeName){if(null==(l=o.getAttribute("if"))||i[l]){var l=o.getAttribute("as"),d=(l=mxResources.get(l)||l,mxUtils.eval(mxUtils.getTextContent(o))),c=o.getAttribute("action"),m=o.getAttribute("icon"),u=o.getAttribute("iconCls");r&&(t.addSeparator(s),r=!1),null!=m&&this.imageBasePath&&(m=this.imageBasePath+m),l=this.addAction(t,e,l,m,d,c,n,s,u),this.addItems(e,t,n,a,i,o.firstChild,l)}}else"separator"==o.nodeName&&(r=!0);o=o.nextSibling}},mxDefaultPopupMenu.prototype.addAction=function(e,t,n,a,i,o,s,r,l){return e.addItem(n,a,function(e){"function"==typeof i&&i.call(t,t,s,e),null!=o&&t.execute(o,s,e)},r,l)},mxDefaultPopupMenu.prototype.createConditions=function(e,t,n){var a=e.graph.getModel(),i=a.getChildCount(t),o=[];for(o.nocell=null==t,o.ncells=1<e.graph.getSelectionCount(),o.notRoot=a.getRoot()!=a.getParent(e.graph.getDefaultParent()),o.cell=null!=t,a=null!=t&&1==e.graph.getSelectionCount(),o.nonEmpty=a&&0<i,o.expandable=a&&e.graph.isCellFoldable(t,!1),o.collapsable=a&&e.graph.isCellFoldable(t,!0),o.validRoot=a&&e.graph.isValidRoot(t),o.emptyValidRoot=o.validRoot&&0==i,o.swimlane=a&&e.graph.isSwimlane(t),i=this.config.getElementsByTagName("condition"),a=0;a<i.length;a++){var s=mxUtils.eval(mxUtils.getTextContent(i[a])),r=i[a].getAttribute("name");null!=r&&"function"==typeof s&&(o[r]=s(e,t,n))}return o},mxDefaultToolbar.prototype.editor=null,mxDefaultToolbar.prototype.toolbar=null,mxDefaultToolbar.prototype.resetHandler=null,mxDefaultToolbar.prototype.spacing=4,mxDefaultToolbar.prototype.connectOnDrop=!1,mxDefaultToolbar.prototype.init=function(e){null!=e&&(this.toolbar=new mxToolbar(e),this.toolbar.addListener(mxEvent.SELECT,mxUtils.bind(this,function(e,t){var n=t.getProperty("function");this.editor.insertFunction=null!=n?mxUtils.bind(this,function(){n.apply(this,arguments),this.toolbar.resetMode()}):null})),this.resetHandler=mxUtils.bind(this,function(){null!=this.toolbar&&this.toolbar.resetMode(!0)}),this.editor.graph.addListener(mxEvent.DOUBLE_CLICK,this.resetHandler),this.editor.addListener(mxEvent.ESCAPE,this.resetHandler))},mxDefaultToolbar.prototype.addItem=function(e,t,n,a){var i=mxUtils.bind(this,function(){null!=n&&0<n.length&&this.editor.execute(n)});return this.toolbar.addItem(e,t,i,a)},mxDefaultToolbar.prototype.addSeparator=function(e){e=e||mxClient.imageBasePath+"/separator.gif",this.toolbar.addSeparator(e)},mxDefaultToolbar.prototype.addCombo=function(){return this.toolbar.addCombo()},mxDefaultToolbar.prototype.addActionCombo=function(e){return this.toolbar.addActionCombo(e)},mxDefaultToolbar.prototype.addActionOption=function(e,t,n){var a=mxUtils.bind(this,function(){this.editor.execute(n)});this.addOption(e,t,a)},mxDefaultToolbar.prototype.addOption=function(e,t,n){return this.toolbar.addOption(e,t,n)},mxDefaultToolbar.prototype.addMode=function(e,t,n,a,i){var o=mxUtils.bind(this,function(){this.editor.setMode(n),null!=i&&i(this.editor)});return this.toolbar.addSwitchMode(e,t,o,a)},mxDefaultToolbar.prototype.addPrototype=function(e,t,n,a,i,o){var s=function(){return"function"==typeof n?n():null!=n?n.clone():null},r=mxUtils.bind(this,function(e,t){"function"==typeof i?i(this.editor,s(),e,t):this.drop(s(),e,t),this.toolbar.resetMode(),mxEvent.consume(e)});return e=this.toolbar.addMode(e,t,r,a,null,o),this.installDropHandler(e,function(e,t,n){r(t,n)}),e},mxDefaultToolbar.prototype.drop=function(e,t,n){var a=this.editor.graph,i=a.getModel();if(null!=n&&!i.isEdge(n)&&this.connectOnDrop&&a.isCellConnectable(n))this.connect(e,t,n);else{for(;null!=n&&!a.isValidDropTarget(n,[e],t);)n=i.getParent(n);this.insert(e,t,n)}},mxDefaultToolbar.prototype.insert=function(e,t,n){var a=this.editor.graph;if(a.canImportCell(e)){var i=mxEvent.getClientX(t),o=mxEvent.getClientY(t);i=mxUtils.convertPoint(a.container,i,o);return a.isSplitEnabled()&&a.isSplitTarget(n,[e],t)?a.splitEdge(n,[e],null,i.x,i.y):this.editor.addVertex(n,e,i.x,i.y)}return null},mxDefaultToolbar.prototype.connect=function(e,t,n){var a=(t=this.editor.graph).getModel();if(null!=n&&t.isCellConnectable(e)&&t.isEdgeValid(null,n,e)){var i=null;a.beginUpdate();try{var o=a.getGeometry(n),s=a.getGeometry(e).clone();s.x=o.x+(o.width-s.width)/2,s.y=o.y+(o.height-s.height)/2;var r=this.spacing*t.gridSize,l=20*a.getDirectedEdgeCount(n,!0);this.editor.horizontalFlow?s.x+=(s.width+o.width)/2+r+l:s.y+=(s.height+o.height)/2+r+l,e.setGeometry(s);var d=a.getParent(n);if(t.addCell(e,d),t.constrainChild(e),i=this.editor.createEdge(n,e),null==a.getGeometry(i)){var c=new mxGeometry;c.relative=!0,a.setGeometry(i,c)}t.addEdge(i,d,n,e)}finally{a.endUpdate()}t.setSelectionCells([e,i]),t.scrollCellToVisible(e)}},mxDefaultToolbar.prototype.installDropHandler=function(t,n){var a=document.createElement("img");a.setAttribute("src",t.getAttribute("src"));var i=mxUtils.bind(this,function(e){a.style.width=2*t.offsetWidth+"px",a.style.height=2*t.offsetHeight+"px",mxUtils.makeDraggable(t,this.editor.graph,n,a),mxEvent.removeListener(a,"load",i)});mxClient.IS_IE?i():mxEvent.addListener(a,"load",i)},mxDefaultToolbar.prototype.destroy=function(){null!=this.resetHandler&&(this.editor.graph.removeListener("dblclick",this.resetHandler),this.editor.removeListener("escape",this.resetHandler),this.resetHandler=null),null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null)},mxLoadResources&&mxResources.add(mxClient.basePath+"/resources/editor"),mxEditor.prototype=new mxEventSource,mxEditor.prototype.constructor=mxEditor,mxEditor.prototype.askZoomResource="none"!=mxClient.language?"askZoom":"",mxEditor.prototype.lastSavedResource="none"!=mxClient.language?"lastSaved":"",mxEditor.prototype.currentFileResource="none"!=mxClient.language?"currentFile":"",mxEditor.prototype.propertiesResource="none"!=mxClient.language?"properties":"",mxEditor.prototype.tasksResource="none"!=mxClient.language?"tasks":"",mxEditor.prototype.helpResource="none"!=mxClient.language?"help":"",mxEditor.prototype.outlineResource="none"!=mxClient.language?"outline":"",mxEditor.prototype.outline=null,mxEditor.prototype.graph=null,mxEditor.prototype.graphRenderHint=null,mxEditor.prototype.toolbar=null,mxEditor.prototype.session=null,mxEditor.prototype.status=null,mxEditor.prototype.popupHandler=null,mxEditor.prototype.undoManager=null,mxEditor.prototype.keyHandler=null,mxEditor.prototype.actions=null,mxEditor.prototype.dblClickAction="edit",mxEditor.prototype.swimlaneRequired=!1,mxEditor.prototype.disableContextMenu=!0,mxEditor.prototype.insertFunction=null,mxEditor.prototype.forcedInserting=!1,mxEditor.prototype.templates=null,mxEditor.prototype.defaultEdge=null,mxEditor.prototype.defaultEdgeStyle=null,mxEditor.prototype.defaultGroup=null,mxEditor.prototype.groupBorderSize=null,mxEditor.prototype.filename=null,mxEditor.prototype.linefeed="&#xa;",mxEditor.prototype.postParameterName="xml",mxEditor.prototype.escapePostData=!0,mxEditor.prototype.urlPost=null,mxEditor.prototype.urlImage=null,mxEditor.prototype.urlInit=null,mxEditor.prototype.urlNotify=null,mxEditor.prototype.urlPoll=null,mxEditor.prototype.horizontalFlow=!1,mxEditor.prototype.layoutDiagram=!1,mxEditor.prototype.swimlaneSpacing=0,mxEditor.prototype.maintainSwimlanes=!1,mxEditor.prototype.layoutSwimlanes=!1,mxEditor.prototype.cycleAttributeValues=null,mxEditor.prototype.cycleAttributeIndex=0,mxEditor.prototype.cycleAttributeName="fillColor",mxEditor.prototype.tasks=null,mxEditor.prototype.tasksWindowImage=null,mxEditor.prototype.tasksTop=20,mxEditor.prototype.help=null,mxEditor.prototype.helpWindowImage=null,mxEditor.prototype.urlHelp=null,mxEditor.prototype.helpWidth=300,mxEditor.prototype.helpHeight=260,mxEditor.prototype.propertiesWidth=240,mxEditor.prototype.propertiesHeight=null,mxEditor.prototype.movePropertiesDialog=!1,mxEditor.prototype.validating=!1,mxEditor.prototype.modified=!1,mxEditor.prototype.isModified=function(){return this.modified},mxEditor.prototype.setModified=function(e){this.modified=e},mxEditor.prototype.addActions=function(){this.addAction("save",function(e){e.save()}),this.addAction("print",function(e){new mxPrintPreview(e.graph,1).open()}),this.addAction("show",function(e){mxUtils.show(e.graph,null,10,10)}),this.addAction("exportImage",function(e){var t=e.getUrlImage();if(null==t||mxClient.IS_LOCAL)e.execute("show");else{var n=mxUtils.getViewXml(e.graph,1);n=mxUtils.getXml(n,"\n");mxUtils.submit(t,e.postParameterName+"="+encodeURIComponent(n),document,"_blank")}}),this.addAction("refresh",function(e){e.graph.refresh()}),this.addAction("cut",function(e){e.graph.isEnabled()&&mxClipboard.cut(e.graph)}),this.addAction("copy",function(e){e.graph.isEnabled()&&mxClipboard.copy(e.graph)}),this.addAction("paste",function(e){e.graph.isEnabled()&&mxClipboard.paste(e.graph)}),this.addAction("delete",function(e){e.graph.isEnabled()&&e.graph.removeCells()}),this.addAction("group",function(e){e.graph.isEnabled()&&e.graph.setSelectionCell(e.groupCells())}),this.addAction("ungroup",function(e){e.graph.isEnabled()&&e.graph.setSelectionCells(e.graph.ungroupCells())}),this.addAction("removeFromParent",function(e){e.graph.isEnabled()&&e.graph.removeCellsFromParent()}),this.addAction("undo",function(e){e.graph.isEnabled()&&e.undo()}),this.addAction("redo",function(e){e.graph.isEnabled()&&e.redo()}),this.addAction("zoomIn",function(e){e.graph.zoomIn()}),this.addAction("zoomOut",function(e){e.graph.zoomOut()}),this.addAction("actualSize",function(e){e.graph.zoomActual()}),this.addAction("fit",function(e){e.graph.fit()}),this.addAction("showProperties",function(e,t){e.showProperties(t)}),this.addAction("selectAll",function(e){e.graph.isEnabled()&&e.graph.selectAll()}),this.addAction("selectNone",function(e){e.graph.isEnabled()&&e.graph.clearSelection()}),this.addAction("selectVertices",function(e){e.graph.isEnabled()&&e.graph.selectVertices()}),this.addAction("selectEdges",function(e){e.graph.isEnabled()&&e.graph.selectEdges()}),this.addAction("edit",function(e,t){e.graph.isEnabled()&&e.graph.isCellEditable(t)&&e.graph.startEditingAtCell(t)}),this.addAction("toBack",function(e,t){e.graph.isEnabled()&&e.graph.orderCells(!0)}),this.addAction("toFront",function(e,t){e.graph.isEnabled()&&e.graph.orderCells(!1)}),this.addAction("enterGroup",function(e,t){e.graph.enterGroup(t)}),this.addAction("exitGroup",function(e){e.graph.exitGroup()}),this.addAction("home",function(e){e.graph.home()}),this.addAction("selectPrevious",function(e){e.graph.isEnabled()&&e.graph.selectPreviousCell()}),this.addAction("selectNext",function(e){e.graph.isEnabled()&&e.graph.selectNextCell()}),this.addAction("selectParent",function(e){e.graph.isEnabled()&&e.graph.selectParentCell()}),this.addAction("selectChild",function(e){e.graph.isEnabled()&&e.graph.selectChildCell()}),this.addAction("collapse",function(e){e.graph.isEnabled()&&e.graph.foldCells(!0)}),this.addAction("collapseAll",function(e){if(e.graph.isEnabled()){var t=e.graph.getChildVertices();e.graph.foldCells(!0,!1,t)}}),this.addAction("expand",function(e){e.graph.isEnabled()&&e.graph.foldCells(!1)}),this.addAction("expandAll",function(e){if(e.graph.isEnabled()){var t=e.graph.getChildVertices();e.graph.foldCells(!1,!1,t)}}),this.addAction("bold",function(e){e.graph.isEnabled()&&e.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_BOLD)}),this.addAction("italic",function(e){e.graph.isEnabled()&&e.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_ITALIC)}),this.addAction("underline",function(e){e.graph.isEnabled()&&e.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_UNDERLINE)}),this.addAction("shadow",function(e){e.graph.isEnabled()&&e.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_SHADOW)}),this.addAction("alignCellsLeft",function(e){e.graph.isEnabled()&&e.graph.alignCells(mxConstants.ALIGN_LEFT)}),this.addAction("alignCellsCenter",function(e){e.graph.isEnabled()&&e.graph.alignCells(mxConstants.ALIGN_CENTER)}),this.addAction("alignCellsRight",function(e){e.graph.isEnabled()&&e.graph.alignCells(mxConstants.ALIGN_RIGHT)}),this.addAction("alignCellsTop",function(e){e.graph.isEnabled()&&e.graph.alignCells(mxConstants.ALIGN_TOP)}),this.addAction("alignCellsMiddle",function(e){e.graph.isEnabled()&&e.graph.alignCells(mxConstants.ALIGN_MIDDLE)}),this.addAction("alignCellsBottom",function(e){e.graph.isEnabled()&&e.graph.alignCells(mxConstants.ALIGN_BOTTOM)}),this.addAction("alignFontLeft",function(e){e.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT)}),this.addAction("alignFontCenter",function(e){e.graph.isEnabled()&&e.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER)}),this.addAction("alignFontRight",function(e){e.graph.isEnabled()&&e.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_RIGHT)}),this.addAction("alignFontTop",function(e){e.graph.isEnabled()&&e.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_TOP)}),this.addAction("alignFontMiddle",function(e){e.graph.isEnabled()&&e.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)}),this.addAction("alignFontBottom",function(e){e.graph.isEnabled()&&e.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_BOTTOM)}),this.addAction("zoom",function(e){var t=100*e.graph.getView().scale;t=parseFloat(mxUtils.prompt(mxResources.get(e.askZoomResource)||e.askZoomResource,t))/100;isNaN(t)||e.graph.getView().setScale(t)}),this.addAction("toggleTasks",function(e){null!=e.tasks?e.tasks.setVisible(!e.tasks.isVisible()):e.showTasks()}),this.addAction("toggleHelp",function(e){null!=e.help?e.help.setVisible(!e.help.isVisible()):e.showHelp()}),this.addAction("toggleOutline",function(e){null==e.outline?e.showOutline():e.outline.setVisible(!e.outline.isVisible())}),this.addAction("toggleConsole",function(e){mxLog.setVisible(!mxLog.isVisible())})},mxEditor.prototype.createSession=function(){var e=mxUtils.bind(this,function(e){this.fireEvent(new mxEventObject(mxEvent.SESSION,"session",e))});return this.connect(this.urlInit,this.urlPoll,this.urlNotify,e)},mxEditor.prototype.configure=function(e){null!=e&&(new mxCodec(e.ownerDocument).decode(e,this),this.resetHistory())},mxEditor.prototype.resetFirstTime=function(){document.cookie="mxgraph=seen; expires=Fri, 27 Jul 2001 02:47:11 UTC; path=/"},mxEditor.prototype.resetHistory=function(){this.lastSnapshot=(new Date).getTime(),this.undoManager.clear(),this.ignoredChanges=0,this.setModified(!1)},mxEditor.prototype.addAction=function(e,t){this.actions[e]=t},mxEditor.prototype.execute=function(t,e,n){var a=this.actions[t];if(null!=a)try{var i=arguments;i[0]=this,a.apply(this,i)}catch(e){throw mxUtils.error("Cannot execute "+t+": "+e.message,280,!0),e}else mxUtils.error("Cannot find action "+t,280,!0)},mxEditor.prototype.addTemplate=function(e,t){this.templates[e]=t},mxEditor.prototype.getTemplate=function(e){return this.templates[e]},mxEditor.prototype.createGraph=function(){var e=new mxGraph(null,null,this.graphRenderHint);return e.setTooltips(!0),e.setPanning(!0),this.installDblClickHandler(e),this.installUndoHandler(e),this.installDrillHandler(e),this.installChangeHandler(e),this.installInsertHandler(e),e.panningHandler.factoryMethod=mxUtils.bind(this,function(e,t,n){return this.createPopupMenu(e,t,n)}),e.connectionHandler.factoryMethod=mxUtils.bind(this,function(e,t){return this.createEdge(e,t)}),this.createSwimlaneManager(e),this.createLayoutManager(e),e},mxEditor.prototype.createSwimlaneManager=function(e){return(e=new mxSwimlaneManager(e,!1)).isHorizontal=mxUtils.bind(this,function(){return this.horizontalFlow}),e.isEnabled=mxUtils.bind(this,function(){return this.maintainSwimlanes}),e},mxEditor.prototype.createLayoutManager=function(a){var e=new mxLayoutManager(a),i=this;return e.getLayout=function(e){var t=null,n=i.graph.getModel();return null!=n.getParent(e)&&(i.layoutSwimlanes&&a.isSwimlane(e)?(null==i.swimlaneLayout&&(i.swimlaneLayout=i.createSwimlaneLayout()),t=i.swimlaneLayout):i.layoutDiagram&&(a.isValidRoot(e)||null==n.getParent(n.getParent(e)))&&(null==i.diagramLayout&&(i.diagramLayout=i.createDiagramLayout()),t=i.diagramLayout)),t},e},mxEditor.prototype.setGraphContainer=function(e){null==this.graph.container&&(this.graph.init(e),this.rubberband=new mxRubberband(this.graph),this.disableContextMenu&&mxEvent.disableContextMenu(e),mxClient.IS_QUIRKS&&new mxDivResizer(e))},mxEditor.prototype.installDblClickHandler=function(a){a.addListener(mxEvent.DOUBLE_CLICK,mxUtils.bind(this,function(e,t){var n=t.getProperty("cell");null!=n&&a.isEnabled()&&null!=this.dblClickAction&&(this.execute(this.dblClickAction,n),t.consume())}))},mxEditor.prototype.installUndoHandler=function(a){var e=mxUtils.bind(this,function(e,t){var n=t.getProperty("edit");this.undoManager.undoableEditHappened(n)});a.getModel().addListener(mxEvent.UNDO,e),a.getView().addListener(mxEvent.UNDO,e),e=function(e,t){var n=t.getProperty("edit").changes;a.setSelectionCells(a.getSelectionCellsForChanges(n))},this.undoManager.addListener(mxEvent.UNDO,e),this.undoManager.addListener(mxEvent.REDO,e)},mxEditor.prototype.installDrillHandler=function(e){var t=mxUtils.bind(this,function(e){this.fireEvent(new mxEventObject(mxEvent.ROOT))});e.getView().addListener(mxEvent.DOWN,t),e.getView().addListener(mxEvent.UP,t)},mxEditor.prototype.installChangeHandler=function(o){var e=mxUtils.bind(this,function(e,t){this.setModified(!0),1==this.validating&&o.validateGraph();for(var n=t.getProperty("edit").changes,a=0;a<n.length;a++){var i=n[a];if(i instanceof mxRootChange||i instanceof mxValueChange&&i.cell==this.graph.model.root||i instanceof mxCellAttributeChange&&i.cell==this.graph.model.root){this.fireEvent(new mxEventObject(mxEvent.ROOT));break}}});o.getModel().addListener(mxEvent.CHANGE,e)},mxEditor.prototype.installInsertHandler=function(e){var n=this;e.addMouseListener({mouseDown:function(e,t){null==n.insertFunction||t.isPopupTrigger()||!n.forcedInserting&&null!=t.getState()||(n.graph.clearSelection(),n.insertFunction(t.getEvent(),t.getCell()),this.isActive=!0,t.consume())},mouseMove:function(e,t){this.isActive&&t.consume()},mouseUp:function(e,t){this.isActive&&(this.isActive=!1,t.consume())}})},mxEditor.prototype.createDiagramLayout=function(){var e=this.graph.gridSize,t=new mxStackLayout(this.graph,!this.horizontalFlow,this.swimlaneSpacing,2*e,2*e);return t.isVertexIgnored=function(e){return!t.graph.isSwimlane(e)},t},mxEditor.prototype.createSwimlaneLayout=function(){return new mxCompactTreeLayout(this.graph,this.horizontalFlow)},mxEditor.prototype.createToolbar=function(){return new mxDefaultToolbar(null,this)},mxEditor.prototype.setToolbarContainer=function(e){this.toolbar.init(e),mxClient.IS_QUIRKS&&new mxDivResizer(e)},mxEditor.prototype.setStatusContainer=function(e){null==this.status&&(this.status=e,this.addListener(mxEvent.SAVE,mxUtils.bind(this,function(){var e=(new Date).toLocaleString();this.setStatus((mxResources.get(this.lastSavedResource)||this.lastSavedResource)+": "+e)})),this.addListener(mxEvent.OPEN,mxUtils.bind(this,function(){this.setStatus((mxResources.get(this.currentFileResource)||this.currentFileResource)+": "+this.filename)})),mxClient.IS_QUIRKS&&new mxDivResizer(e))},mxEditor.prototype.setStatus=function(e){null!=this.status&&null!=e&&(this.status.innerHTML=e)},mxEditor.prototype.setTitleContainer=function(t){this.addListener(mxEvent.ROOT,mxUtils.bind(this,function(e){t.innerHTML=this.getTitle()})),mxClient.IS_QUIRKS&&new mxDivResizer(t)},mxEditor.prototype.treeLayout=function(e,t){null!=e&&new mxCompactTreeLayout(this.graph,t).execute(e)},mxEditor.prototype.getTitle=function(){for(var e="",t=this.graph,n=t.getCurrentRoot();null!=n&&null!=t.getModel().getParent(t.getModel().getParent(n));)t.isValidRoot(n)&&(e=" > "+t.convertValueToString(n)+e),n=t.getModel().getParent(n);return this.getRootTitle()+e},mxEditor.prototype.getRootTitle=function(){var e=this.graph.getModel().getRoot();return this.graph.convertValueToString(e)},mxEditor.prototype.undo=function(){this.undoManager.undo()},mxEditor.prototype.redo=function(){this.undoManager.redo()},mxEditor.prototype.groupCells=function(){var e=null!=this.groupBorderSize?this.groupBorderSize:this.graph.gridSize;return this.graph.groupCells(this.createGroup(),e)},mxEditor.prototype.createGroup=function(){return this.graph.getModel().cloneCell(this.defaultGroup)},mxEditor.prototype.open=function(e){if(null!=e){var t=mxUtils.load(e).getXml();this.readGraphModel(t.documentElement),this.filename=e,this.fireEvent(new mxEventObject(mxEvent.OPEN,"filename",e))}},mxEditor.prototype.readGraphModel=function(e){new mxCodec(e.ownerDocument).decode(e,this.graph.getModel()),this.resetHistory()},mxEditor.prototype.save=function(e,t){if(null!=(e=e||this.getUrlPost())&&0<e.length){var n=this.writeGraphModel(t);this.postDiagram(e,n),this.setModified(!1)}this.fireEvent(new mxEventObject(mxEvent.SAVE,"url",e))},mxEditor.prototype.postDiagram=function(t,n){this.escapePostData&&(n=encodeURIComponent(n)),mxUtils.post(t,this.postParameterName+"="+n,mxUtils.bind(this,function(e){this.fireEvent(new mxEventObject(mxEvent.POST,"request",e,"url",t,"data",n))}))},mxEditor.prototype.writeGraphModel=function(e){e=null!=e?e:this.linefeed;var t=(new mxCodec).encode(this.graph.getModel());return mxUtils.getXml(t,e)},mxEditor.prototype.getUrlPost=function(){return this.urlPost},mxEditor.prototype.getUrlImage=function(){return this.urlImage},mxEditor.prototype.connect=function(e,t,n,a){var i=null;return mxClient.IS_LOCAL||((i=new mxSession(this.graph.getModel(),e,t,n)).addListener(mxEvent.RECEIVE,mxUtils.bind(this,function(e,t){null!=t.getProperty("node").getAttribute("namespace")&&this.resetHistory()})),i.addListener(mxEvent.DISCONNECT,a),i.addListener(mxEvent.CONNECT,a),i.addListener(mxEvent.NOTIFY,a),i.addListener(mxEvent.GET,a),i.start()),i},mxEditor.prototype.swapStyles=function(e,t){var n=this.graph.getStylesheet().styles[t];this.graph.getView().getStylesheet().putCellStyle(t,this.graph.getStylesheet().styles[e]),this.graph.getStylesheet().putCellStyle(e,n),this.graph.refresh()},mxEditor.prototype.showProperties=function(e){if(null==(e=e||this.graph.getSelectionCell())&&(null==(e=this.graph.getCurrentRoot())&&(e=this.graph.getModel().getRoot())),null!=e){this.graph.stopEditing(!0);var t=(n=mxUtils.getOffset(this.graph.container)).x+10,n=n.y;if(null==this.properties||this.movePropertiesDialog){var a=this.graph.getCellBounds(e);null!=a&&(t+=a.x+Math.min(200,a.width),n+=a.y)}else t=this.properties.getX(),n=this.properties.getY();this.hideProperties(),null!=(e=this.createProperties(e))&&(this.properties=new mxWindow(mxResources.get(this.propertiesResource)||this.propertiesResource,e,t,n,this.propertiesWidth,this.propertiesHeight,!1),this.properties.setVisible(!0))}},mxEditor.prototype.isPropertiesVisible=function(){return null!=this.properties},mxEditor.prototype.createProperties=function(n){var a=this.graph.getModel(),e=a.getValue(n);if(mxUtils.isNode(e)){var t=new mxForm("properties");t.addText("ID",n.getId()).setAttribute("readonly","true");var i=null,o=null,s=null,r=null,l=null;a.isVertex(n)&&(null!=(i=a.getGeometry(n))&&(o=t.addText("top",i.y),s=t.addText("left",i.x),r=t.addText("width",i.width),l=t.addText("height",i.height)));var d=a.getStyle(n),c=t.addText("Style",d||""),m=e.attributes,u=[];for(e=0;e<m.length;e++)u[e]=t.addTextarea(m[e].nodeName,m[e].nodeValue,"label"==m[e].nodeName?4:2);return e=mxUtils.bind(this,function(){this.hideProperties(),a.beginUpdate();try{null!=i&&((i=i.clone()).x=parseFloat(s.value),i.y=parseFloat(o.value),i.width=parseFloat(r.value),i.height=parseFloat(l.value),a.setGeometry(n,i)),0<c.value.length?a.setStyle(n,c.value):a.setStyle(n,null);for(var e=0;e<m.length;e++){var t=new mxCellAttributeChange(n,m[e].nodeName,u[e].value);a.execute(t)}this.graph.isAutoSizeCell(n)&&this.graph.updateCellSize(n)}finally{a.endUpdate()}}),d=mxUtils.bind(this,function(){this.hideProperties()}),t.addButtons(e,d),t.table}return null},mxEditor.prototype.hideProperties=function(){null!=this.properties&&(this.properties.destroy(),this.properties=null)},mxEditor.prototype.showTasks=function(){if(null==this.tasks){var t=document.createElement("div");t.style.padding="4px",t.style.paddingLeft="20px";var e=document.body.clientWidth;(e=new mxWindow(mxResources.get(this.tasksResource)||this.tasksResource,t,e-220,this.tasksTop,200)).setClosable(!0),e.destroyOnClose=!1;var n=mxUtils.bind(this,function(e){mxEvent.release(t),t.innerHTML="",this.createTasks(t)});this.graph.getModel().addListener(mxEvent.CHANGE,n),this.graph.getSelectionModel().addListener(mxEvent.CHANGE,n),this.graph.addListener(mxEvent.ROOT,n),null!=this.tasksWindowImage&&e.setImage(this.tasksWindowImage),this.tasks=e,this.createTasks(t)}this.tasks.setVisible(!0)},mxEditor.prototype.refreshTasks=function(e){null!=this.tasks&&(e=this.tasks.content,mxEvent.release(e),e.innerHTML="",this.createTasks(e))},mxEditor.prototype.createTasks=function(e){},mxEditor.prototype.showHelp=function(e){if(null==this.help){var t=document.createElement("iframe");t.setAttribute("src",mxResources.get("urlHelp")||this.urlHelp),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("frameBorder","0"),t.style.backgroundColor="white",e=document.body.clientWidth;var n=document.body.clientHeight||document.documentElement.clientHeight,a=new mxWindow(mxResources.get(this.helpResource)||this.helpResource,t,(e-this.helpWidth)/2,(n-this.helpHeight)/3,this.helpWidth,this.helpHeight);a.setMaximizable(!0),a.setClosable(!0),a.destroyOnClose=!1,a.setResizable(!0),null!=this.helpWindowImage&&a.setImage(this.helpWindowImage),mxClient.IS_NS&&(e=function(e){t.setAttribute("height",a.div.offsetHeight-26+"px")},a.addListener(mxEvent.RESIZE_END,e),a.addListener(mxEvent.MAXIMIZE,e),a.addListener(mxEvent.NORMALIZE,e),a.addListener(mxEvent.SHOW,e)),this.help=a}this.help.setVisible(!0)},mxEditor.prototype.showOutline=function(){if(null==this.outline){var e=document.createElement("div");e.style.overflow="hidden",e.style.width="100%",e.style.height="100%",e.style.background="white",e.style.cursor="move";var t=new mxWindow(mxResources.get(this.outlineResource)||this.outlineResource,e,600,480,200,200,!1),n=new mxOutline(this.graph,e);t.setClosable(!0),t.setResizable(!0),t.destroyOnClose=!1,t.addListener(mxEvent.RESIZE_END,function(){n.update()}),this.outline=t,this.outline.outline=n}this.outline.setVisible(!0),this.outline.outline.update(!0)},mxEditor.prototype.setMode=function(e){"select"==e?(this.graph.panningHandler.useLeftButtonForPanning=!1,this.graph.setConnectable(!1)):"connect"==e?(this.graph.panningHandler.useLeftButtonForPanning=!1,this.graph.setConnectable(!0)):"pan"==e&&(this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.setConnectable(!1))},mxEditor.prototype.createPopupMenu=function(e,t,n){this.popupHandler.createMenu(this,e,t,n)},mxEditor.prototype.createEdge=function(e,t){var n=null;if(null!=this.defaultEdge)n=this.graph.getModel().cloneCell(this.defaultEdge);else{(n=new mxCell("")).setEdge(!0);var a=new mxGeometry;a.relative=!0,n.setGeometry(a)}return null!=(a=this.getEdgeStyle())&&n.setStyle(a),n},mxEditor.prototype.getEdgeStyle=function(){return this.defaultEdgeStyle},mxEditor.prototype.consumeCycleAttribute=function(e){return null!=this.cycleAttributeValues&&0<this.cycleAttributeValues.length&&this.graph.isSwimlane(e)?this.cycleAttributeValues[this.cycleAttributeIndex++%this.cycleAttributeValues.length]:null},mxEditor.prototype.cycleAttribute=function(e){if(null!=this.cycleAttributeName){var t=this.consumeCycleAttribute(e);null!=t&&e.setStyle(e.getStyle()+";"+this.cycleAttributeName+"="+t)}},mxEditor.prototype.addVertex=function(e,t,n,a){for(var i=this.graph.getModel();null!=e&&!this.graph.isValidDropTarget(e);)e=i.getParent(e);e=null!=e?e:this.graph.getSwimlaneAt(n,a);var o=this.graph.getView().scale,s=i.getGeometry(t),r=i.getGeometry(e);if(this.graph.isSwimlane(t)&&!this.graph.swimlaneNesting)e=null;else{if(null==e&&this.swimlaneRequired)return null;if(null!=e&&null!=r){var l=this.graph.getView().getState(e);if(null!=l){if(n-=l.origin.x*o,a-=l.origin.y*o,this.graph.isConstrainedMoving){r=s.width;var d=s.height,c=l.x+l.width;c<n+r&&(n-=n+r-c),(c=l.y+l.height)<a+d&&(a-=a+d-c)}}else null!=r&&(n-=r.x*o,a-=r.y*o)}}(s=s.clone()).x=this.graph.snap(n/o-this.graph.getView().translate.x-this.graph.gridSize/2),s.y=this.graph.snap(a/o-this.graph.getView().translate.y-this.graph.gridSize/2),t.setGeometry(s),null==e&&(e=this.graph.getDefaultParent()),this.cycleAttribute(t),this.fireEvent(new mxEventObject(mxEvent.BEFORE_ADD_VERTEX,"vertex",t,"parent",e)),i.beginUpdate();try{null!=(t=this.graph.addCell(t,e))&&(this.graph.constrainChild(t),this.fireEvent(new mxEventObject(mxEvent.ADD_VERTEX,"vertex",t)))}finally{i.endUpdate()}return null!=t&&(this.graph.setSelectionCell(t),this.graph.scrollCellToVisible(t),this.fireEvent(new mxEventObject(mxEvent.AFTER_ADD_VERTEX,"vertex",t))),t},mxEditor.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tasks&&this.tasks.destroy(),null!=this.outline&&this.outline.destroy(),null!=this.properties&&this.properties.destroy(),null!=this.keyHandler&&this.keyHandler.destroy(),null!=this.rubberband&&this.rubberband.destroy(),null!=this.toolbar&&this.toolbar.destroy(),null!=this.graph&&this.graph.destroy(),this.templates=this.status=null)};var mxCodecRegistry={codecs:[],aliases:[],register:function(e){if(null!=e){var t=e.getName();mxCodecRegistry.codecs[t]=e;var n=mxUtils.getFunctionName(e.template.constructor);n!=t&&mxCodecRegistry.addAlias(n,t)}return e},addAlias:function(e,t){mxCodecRegistry.aliases[e]=t},getCodec:function(e){var t=null;if(null!=e){t=mxUtils.getFunctionName(e);var n=mxCodecRegistry.aliases[t];if(null!=n&&(t=n),null==(t=mxCodecRegistry.codecs[t]))try{t=new mxObjectCodec(new e),mxCodecRegistry.register(t)}catch(e){}}return t}};function mxCodec(e){this.document=e||mxUtils.createXmlDocument(),this.objects=[]}function mxObjectCodec(e,t,n,a){for(var i in this.template=e,this.exclude=null!=t?t:[],this.idrefs=null!=n?n:[],this.mapping=null!=a?a:[],this.reverse={},this.mapping)this.reverse[this.mapping[i]]=i}mxCodec.prototype.document=null,mxCodec.prototype.objects=null,mxCodec.prototype.encodeDefaults=!1,mxCodec.prototype.putObject=function(e,t){return this.objects[e]=t},mxCodec.prototype.getObject=function(e){var t=null;return null!=e&&(null==(t=this.objects[e])&&(null==(t=this.lookup(e))&&(null!=(e=this.getElementById(e))&&(t=this.decode(e))))),t},mxCodec.prototype.lookup=function(e){return null},mxCodec.prototype.getElementById=function(e,t){return mxUtils.findNodeByAttribute(this.document.documentElement,null!=t?t:"id",e)},mxCodec.prototype.getId=function(e){var t=null;return null!=e&&(null==(t=this.reference(e))&&e instanceof mxCell&&(null==(t=e.getId())&&(0==(t=mxCellPath.create(e)).length&&(t="root")))),t},mxCodec.prototype.reference=function(e){return null},mxCodec.prototype.encode=function(e){var t=null;if(null!=e&&null!=e.constructor){var n=mxCodecRegistry.getCodec(e.constructor);null!=n?t=n.encode(this,e):mxUtils.isNode(e)?t=mxClient.IS_IE?e.cloneNode(!0):this.document.importNode(e,!0):mxLog.warn("mxCodec.encode: No codec for "+mxUtils.getFunctionName(e.constructor))}return t},mxCodec.prototype.decode=function(a,b){var c=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){var d=null;try{d=eval(a.nodeName)}catch(e){}try{var f=mxCodecRegistry.getCodec(d);null!=f?c=f.decode(this,a,b):(c=a.cloneNode(!0),c.removeAttribute("as"))}catch(e){mxLog.debug("Cannot decode "+a.nodeName+": "+e.message)}}return c},mxCodec.prototype.encodeCell=function(e,t,n){if(t.appendChild(this.encode(e)),null==n||n){n=e.getChildCount();for(var a=0;a<n;a++)this.encodeCell(e.getChildAt(a),t)}},mxCodec.prototype.isCellCodec=function(e){return null!=e&&"function"==typeof e.isCellCodec&&e.isCellCodec()},mxCodec.prototype.decodeCell=function(e,t){t=null==t||t;var n=null;if(null!=e&&e.nodeType==mxConstants.NODETYPE_ELEMENT){if(n=mxCodecRegistry.getCodec(e.nodeName),!this.isCellCodec(n))for(var a=e.firstChild;null!=a&&!this.isCellCodec(n);)n=mxCodecRegistry.getCodec(a.nodeName),a=a.nextSibling;this.isCellCodec(n)||(n=mxCodecRegistry.getCodec(mxCell)),n=n.decode(this,e),t&&this.insertIntoGraph(n)}return n},mxCodec.prototype.insertIntoGraph=function(e){var t=e.parent,n=e.getTerminal(!0),a=e.getTerminal(!1);e.setTerminal(null,!1),e.setTerminal(null,!0),(e.parent=null)!=t&&t.insert(e),null!=n&&n.insertEdge(e,!0),null!=a&&a.insertEdge(e,!1)},mxCodec.prototype.setAttribute=function(e,t,n){null!=t&&null!=n&&e.setAttribute(t,n)},mxObjectCodec.prototype.template=null,mxObjectCodec.prototype.exclude=null,mxObjectCodec.prototype.idrefs=null,mxObjectCodec.prototype.mapping=null,mxObjectCodec.prototype.reverse=null,mxObjectCodec.prototype.getName=function(){return mxUtils.getFunctionName(this.template.constructor)},mxObjectCodec.prototype.cloneTemplate=function(){return new this.template.constructor},mxObjectCodec.prototype.getFieldName=function(e){if(null!=e){var t=this.reverse[e];null!=t&&(e=t)}return e},mxObjectCodec.prototype.getAttributeName=function(e){if(null!=e){var t=this.mapping[e];null!=t&&(e=t)}return e},mxObjectCodec.prototype.isExcluded=function(e,t,n,a){return t==mxObjectIdentity.FIELD_NAME||0<=mxUtils.indexOf(this.exclude,t)},mxObjectCodec.prototype.isReference=function(e,t,n,a){return 0<=mxUtils.indexOf(this.idrefs,t)},mxObjectCodec.prototype.encode=function(e,t){var n=e.document.createElement(this.getName());return t=this.beforeEncode(e,t,n),this.encodeObject(e,t,n),this.afterEncode(e,t,n)},mxObjectCodec.prototype.encodeObject=function(e,t,n){for(var a in e.setAttribute(n,"id",e.getId(t)),t){var i=a,o=t[i];null!=o&&!this.isExcluded(t,i,o,!0)&&(mxUtils.isNumeric(i)&&(i=null),this.encodeValue(e,t,i,o,n))}},mxObjectCodec.prototype.encodeValue=function(e,t,n,a,i){if(null!=a){if(this.isReference(t,n,a,!0)){var o=e.getId(a);if(null==o)return void mxLog.warn("mxObjectCodec.encode: No ID for "+this.getName()+"."+n+"="+a);a=o}o=this.template[n],(null==n||e.encodeDefaults||o!=a)&&(n=this.getAttributeName(n),this.writeAttribute(e,t,n,a,i))}},mxObjectCodec.prototype.writeAttribute=function(e,t,n,a,i){"object"!=typeof a?this.writePrimitiveAttribute(e,t,n,a,i):this.writeComplexAttribute(e,t,n,a,i)},mxObjectCodec.prototype.writePrimitiveAttribute=function(e,t,n,a,i){a=this.convertValueToXml(a),null==n?(t=e.document.createElement("add"),"function"==typeof a?t.appendChild(e.document.createTextNode(a)):e.setAttribute(t,"value",a),i.appendChild(t)):"function"!=typeof a&&e.setAttribute(i,n,a)},mxObjectCodec.prototype.writeComplexAttribute=function(e,t,n,a,i){null!=(e=e.encode(a))?(null!=n&&e.setAttribute("as",n),i.appendChild(e)):mxLog.warn("mxObjectCodec.encode: No node for "+this.getName()+"."+n+": "+a)},mxObjectCodec.prototype.convertValueToXml=function(e){return void 0!==e.length||1!=e&&0!=e||(e=1==e?"1":"0"),e},mxObjectCodec.prototype.convertValueFromXml=function(e){return mxUtils.isNumeric(e)&&(e=parseFloat(e)),e},mxObjectCodec.prototype.beforeEncode=function(e,t,n){return t},mxObjectCodec.prototype.afterEncode=function(e,t,n){return n},mxObjectCodec.prototype.decode=function(e,t,n){var a=t.getAttribute("id"),i=e.objects[a];return null==i&&(i=n||this.cloneTemplate(),null!=a&&e.putObject(a,i)),t=this.beforeDecode(e,t,i),this.decodeNode(e,t,i),this.afterDecode(e,t,i)},mxObjectCodec.prototype.decodeNode=function(e,t,n){null!=t&&(this.decodeAttributes(e,t,n),this.decodeChildren(e,t,n))},mxObjectCodec.prototype.decodeAttributes=function(e,t,n){if(null!=(t=t.attributes))for(var a=0;a<t.length;a++)this.decodeAttribute(e,t[a],n)},mxObjectCodec.prototype.decodeAttribute=function(e,t,n){var a=t.nodeName;if("as"!=a&&"id"!=a){t=this.convertValueFromXml(t.nodeValue);var i=this.getFieldName(a);if(this.isReference(n,i,t,!1)){if(null==(e=e.getObject(t)))return void mxLog.warn("mxObjectCodec.decode: No object for "+this.getName()+"."+a+"="+t);t=e}this.isExcluded(n,a,t,!1)||(n[a]=t)}},mxObjectCodec.prototype.decodeChildren=function(e,t,n){for(t=t.firstChild;null!=t;){var a=t.nextSibling;t.nodeType==mxConstants.NODETYPE_ELEMENT&&!this.processInclude(e,t,n)&&this.decodeChild(e,t,n),t=a}},mxObjectCodec.prototype.decodeChild=function(e,t,n){var a=this.getFieldName(t.getAttribute("as"));if(null==a||!this.isExcluded(n,a,t,!1)){var i=this.getFieldTemplate(n,a,t),o=null;"add"==t.nodeName?null==(o=t.getAttribute("value"))&&(o=mxUtils.eval(mxUtils.getTextContent(t))):o=e.decode(t,i),this.addObjectValue(n,a,o,i)}},mxObjectCodec.prototype.getFieldTemplate=function(e,t,n){return(e=e[t])instanceof Array&&0<e.length&&(e=null),e},mxObjectCodec.prototype.addObjectValue=function(e,t,n,a){null!=n&&n!=a&&(null!=t&&0<t.length?e[t]=n:e.push(n))},mxObjectCodec.prototype.processInclude=function(e,t,n){if("include"==t.nodeName){if(null!=(t=t.getAttribute("name")))try{var a=mxUtils.load(t).getDocumentElement();null!=a&&e.decode(a,n)}catch(e){}return!0}return!1},mxObjectCodec.prototype.beforeDecode=function(e,t,n){return t},mxObjectCodec.prototype.afterDecode=function(e,t,n){return n},mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxCell,["children","edges","overlays","mxTransient"],["parent","source","target"]);return e.isCellCodec=function(){return!0},e.isExcluded=function(e,t,n,a){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||a&&"value"==t&&n.nodeType==mxConstants.NODETYPE_ELEMENT},e.afterEncode=function(e,t,n){if(null!=t.value&&t.value.nodeType==mxConstants.NODETYPE_ELEMENT){var a=n;(n=mxClient.IS_IE?t.value.cloneNode(!0):e.document.importNode(t.value,!0)).appendChild(a),e=a.getAttribute("id"),n.setAttribute("id",e),a.removeAttribute("id")}return n},e.beforeDecode=function(e,t,n){var a=t,i=this.getName();if(t.nodeName!=i?(null!=(a=t.getElementsByTagName(i)[0])&&a.parentNode==t?(mxUtils.removeWhitespace(a,!0),mxUtils.removeWhitespace(a,!1),a.parentNode.removeChild(a)):a=null,n.value=t.cloneNode(!0),null!=(t=n.value.getAttribute("id"))&&(n.setId(t),n.value.removeAttribute("id"))):n.setId(t.getAttribute("id")),null!=a)for(t=0;t<this.idrefs.length;t++){i=this.idrefs[t];var o=a.getAttribute(i);if(null!=o){a.removeAttribute(i);var s=e.objects[o]||e.lookup(o);null==s&&(null!=(o=e.getElementById(o))&&(s=(mxCodecRegistry.codecs[o.nodeName]||this).decode(e,o))),n[i]=s}}return a},e}()),mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxGraphModel);return e.encodeObject=function(e,t,n){var a=e.document.createElement("root");e.encodeCell(t.getRoot(),a),n.appendChild(a)},e.decodeChild=function(e,t,n){"root"==t.nodeName?this.decodeRoot(e,t,n):mxObjectCodec.prototype.decodeChild.apply(this,arguments)},e.decodeRoot=function(e,t,n){var a=null;for(t=t.firstChild;null!=t;){var i=e.decodeCell(t);null!=i&&null==i.getParent()&&(a=i),t=t.nextSibling}null!=a&&n.setRoot(a)},e}()),mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxRootChange,["model","previous","root"]);return e.afterEncode=function(e,t,n){return e.encodeCell(t.root,n),n},e.beforeDecode=function(e,t,n){if(null!=t.firstChild&&t.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT){var a=(t=t.cloneNode(!0)).firstChild;for(n.root=e.decodeCell(a,!1),n=a.nextSibling,a.parentNode.removeChild(a),a=n;null!=a;)n=a.nextSibling,e.decodeCell(a),a.parentNode.removeChild(a),a=n}return t},e.afterDecode=function(e,t,n){return n.previous=n.root,n},e}()),mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxChildChange,["model","child","previousIndex"],["parent","previous"]);return e.isReference=function(e,t,n,a){return!("child"!=t||null==e.previous&&a)||0<=mxUtils.indexOf(this.idrefs,t)},e.afterEncode=function(e,t,n){return this.isReference(t,"child",t.child,!0)?n.setAttribute("child",e.getId(t.child)):e.encodeCell(t.child,n),n},e.beforeDecode=function(e,t,n){if(null!=t.firstChild&&t.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT){var a=(t=t.cloneNode(!0)).firstChild;for(n.child=e.decodeCell(a,!1),n=a.nextSibling,a.parentNode.removeChild(a),a=n;null!=a;){if(n=a.nextSibling,a.nodeType==mxConstants.NODETYPE_ELEMENT){var i=a.getAttribute("id");null==e.lookup(i)&&e.decodeCell(a)}a.parentNode.removeChild(a),a=n}}else a=t.getAttribute("child"),n.child=e.getObject(a);return t},e.afterDecode=function(e,t,n){return n.child.parent=n.previous,n.previous=n.parent,n.previousIndex=n.index,n},e}()),mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxTerminalChange,["model","previous"],["cell","terminal"]);return e.afterDecode=function(e,t,n){return n.previous=n.terminal,n},e}());var mxGenericChangeCodec=function(e,a){var t=new mxObjectCodec(e,["model","previous"],["cell"]);return t.afterDecode=function(e,t,n){return mxUtils.isNode(n.cell)&&(n.cell=e.decodeCell(n.cell,!1)),n.previous=n[a],n},t};mxCodecRegistry.register(mxGenericChangeCodec(new mxValueChange,"value")),mxCodecRegistry.register(mxGenericChangeCodec(new mxStyleChange,"style")),mxCodecRegistry.register(mxGenericChangeCodec(new mxGeometryChange,"geometry")),mxCodecRegistry.register(mxGenericChangeCodec(new mxCollapseChange,"collapsed")),mxCodecRegistry.register(mxGenericChangeCodec(new mxVisibleChange,"visible")),mxCodecRegistry.register(mxGenericChangeCodec(new mxCellAttributeChange,"value")),mxCodecRegistry.register(new mxObjectCodec(new mxGraph,"graphListeners eventListeners view container cellRenderer editor selection".split(" "))),mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxGraphView);return e.encode=function(e,t){return this.encodeCell(e,t,t.graph.getModel().getRoot())},e.encodeCell=function(e,t,n){var a=t.graph.getModel(),i=t.getState(n),o=a.getParent(n);if(null==o||null!=i){var s=a.getChildCount(n),r=t.graph.getCellGeometry(n),l=null;if(o==a.getRoot()?l="layer":null==o?l="graph":a.isEdge(n)?l="edge":0<s&&null!=r?l="group":a.isVertex(n)&&(l="vertex"),null!=l){var d=e.document.createElement(l);if(null!=t.graph.getLabel(n)&&(d.setAttribute("label",t.graph.getLabel(n)),t.graph.isHtmlLabel(n)&&d.setAttribute("html",!0)),null==o){var c=t.getGraphBounds();null!=c&&(d.setAttribute("x",Math.round(c.x)),d.setAttribute("y",Math.round(c.y)),d.setAttribute("width",Math.round(c.width)),d.setAttribute("height",Math.round(c.height))),d.setAttribute("scale",t.scale)}else if(null!=i&&null!=r){for(c in i.style)"function"==typeof(o=i.style[c])&&"object"==typeof o&&(o=mxStyleRegistry.getName(o)),null!=o&&"function"!=typeof o&&"object"!=typeof o&&d.setAttribute(c,o);if(null!=(o=i.absolutePoints)&&0<o.length){for(r=Math.round(o[0].x)+","+Math.round(o[0].y),c=1;c<o.length;c++)r+=" "+Math.round(o[c].x)+","+Math.round(o[c].y);d.setAttribute("points",r)}else d.setAttribute("x",Math.round(i.x)),d.setAttribute("y",Math.round(i.y)),d.setAttribute("width",Math.round(i.width)),d.setAttribute("height",Math.round(i.height));null!=(c=i.absoluteOffset)&&(0!=c.x&&d.setAttribute("dx",Math.round(c.x)),0!=c.y&&d.setAttribute("dy",Math.round(c.y)))}for(c=0;c<s;c++)null!=(i=this.encodeCell(e,t,a.getChildAt(n,c)))&&d.appendChild(i)}}return d},e}()),mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxStylesheet);return e.encode=function(e,t){var n,a=e.document.createElement(this.getName());for(n in t.styles){var i=t.styles[n],o=e.document.createElement("add");if(null!=n){for(var s in o.setAttribute("as",n),i){var r=this.getStringValue(s,i[s]);if(null!=r){var l=e.document.createElement("add");l.setAttribute("value",r),l.setAttribute("as",s),o.appendChild(l)}}0<o.childNodes.length&&a.appendChild(o)}}return a},e.getStringValue=function(e,t){var n=typeof t;return"function"==n?t=mxStyleRegistry.getName(style[j]):"object"==n&&(t=null),t},e.decode=function(e,t,n){n=n||new this.template.constructor;var a=t.getAttribute("id");for(null!=a&&(e.objects[a]=n),t=t.firstChild;null!=t;){if(!this.processInclude(e,t,n)&&"add"==t.nodeName&&null!=(a=t.getAttribute("as"))){var i=t.getAttribute("extend"),o=null!=i?mxUtils.clone(n.styles[i]):null;for(null==o&&(null!=i&&mxLog.warn("mxStylesheetCodec.decode: stylesheet "+i+" not found to extend"),o={}),i=t.firstChild;null!=i;){if(i.nodeType==mxConstants.NODETYPE_ELEMENT){var s=i.getAttribute("as");if("add"==i.nodeName){var r=mxUtils.getTextContent(i),l=null;null!=r&&0<r.length?l=mxUtils.eval(r):(l=i.getAttribute("value"),mxUtils.isNumeric(l)&&(l=parseFloat(l))),null!=l&&(o[s]=l)}else"remove"==i.nodeName&&delete o[s]}i=i.nextSibling}n.putCellStyle(a,o)}t=t.nextSibling}return n},e}()),mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxDefaultKeyHandler);return e.encode=function(e,t){return null},e.decode=function(e,t,n){if(null!=n)for(t=t.firstChild;null!=t;){if(!this.processInclude(e,t,n)&&"add"==t.nodeName){var a=t.getAttribute("as"),i=t.getAttribute("action"),o=t.getAttribute("control");n.bindAction(a,i,o)}t=t.nextSibling}return n},e}()),mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxDefaultToolbar);return e.encode=function(e,t){return null},e.decode=function(e,t,n){if(null!=n){var a=n.editor;for(t=t.firstChild;null!=t;){if(t.nodeType==mxConstants.NODETYPE_ELEMENT&&!this.processInclude(e,t,n))if("separator"==t.nodeName)n.addSeparator();else if("br"==t.nodeName)n.toolbar.addBreak();else if("hr"==t.nodeName)n.toolbar.addLine();else if("add"==t.nodeName){var i=t.getAttribute("as"),o=(i=mxResources.get(i)||i,t.getAttribute("icon")),s=t.getAttribute("pressedIcon"),r=t.getAttribute("action"),l=t.getAttribute("mode"),d=t.getAttribute("template"),c="0"!=t.getAttribute("toggle"),m=mxUtils.getTextContent(t),u=null;if(null!=r)u=n.addItem(i,o,r,s);else if(null!=l){var p=mxUtils.eval(m);u=n.addMode(i,o,l,s,p)}else if(null!=d||null!=m&&0<m.length)u=a.templates[d],d=t.getAttribute("style"),null!=u&&null!=d&&(u=u.clone()).setStyle(d),(d=null)!=m&&0<m.length&&(d=mxUtils.eval(m)),u=n.addPrototype(i,o,u,s,d,c);else if(0<(s=mxUtils.getChildNodes(t)).length)if(null==o)for(d=n.addActionCombo(i),i=0;i<s.length;i++)"separator"==(c=s[i]).nodeName?n.addOption(d,"---"):"add"==c.nodeName&&(o=c.getAttribute("as"),c=c.getAttribute("action"),n.addActionOption(d,o,c));else{var g=null,v=n.addPrototype(i,o,function(){if(null!=(e=a.templates[g.value])){var e=e.clone(),t=g.options[g.selectedIndex].cellStyle;return null!=t&&e.setStyle(t),e}return mxLog.warn("Template "+e+" not found"),null},null,null,c);g=n.addCombo();for(mxEvent.addListener(g,"change",function(){n.toolbar.selectMode(v,function(e){return e=mxUtils.convertPoint(a.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e)),a.addVertex(null,p(),e.x,e.y)}),n.toolbar.noReset=!1}),i=0;i<s.length;i++)"separator"==(c=s[i]).nodeName?n.addOption(g,"---"):"add"==c.nodeName&&(o=c.getAttribute("as"),m=c.getAttribute("template"),n.addOption(g,o,m||d).cellStyle=c.getAttribute("style"))}null!=u&&(null!=(d=t.getAttribute("id"))&&0<d.length&&u.setAttribute("id",d))}t=t.nextSibling}}return n},e}()),mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxDefaultPopupMenu);return e.encode=function(e,t){return null},e.decode=function(e,t,n){var a=t.getElementsByTagName("include")[0];return null!=a?this.processInclude(e,a,n):null!=n&&(n.config=t),n},e}()),mxCodecRegistry.register(function(){var e=new mxObjectCodec(new mxEditor,"modified lastSnapshot ignoredChanges undoManager graphContainer toolbarContainer".split(" "));return e.afterDecode=function(e,t,n){return null!=(e=t.getAttribute("defaultEdge"))&&(t.removeAttribute("defaultEdge"),n.defaultEdge=n.templates[e]),null!=(e=t.getAttribute("defaultGroup"))&&(t.removeAttribute("defaultGroup"),n.defaultGroup=n.templates[e]),n},e.decodeChild=function(e,t,n){if("Array"==t.nodeName){if("templates"==t.getAttribute("as"))return void this.decodeTemplates(e,t,n)}else if("ui"==t.nodeName)return void this.decodeUi(e,t,n);mxObjectCodec.prototype.decodeChild.apply(this,arguments)},e.decodeUi=function(e,t,n){for(e=t.firstChild;null!=e;){if("add"==e.nodeName){t=e.getAttribute("as");var a=e.getAttribute("element"),i=e.getAttribute("style"),o=null;if(null!=a)null!=(o=document.getElementById(a))&&null!=i&&(o.style.cssText+=";"+i);else{a=parseInt(e.getAttribute("x"));var s=parseInt(e.getAttribute("y")),r=e.getAttribute("width"),l=e.getAttribute("height");(o=document.createElement("div")).style.cssText=i,new mxWindow(mxResources.get(t)||t,o,a,s,r,l,!1,!0).setVisible(!0)}"graph"==t?n.setGraphContainer(o):"toolbar"==t?n.setToolbarContainer(o):"title"==t?n.setTitleContainer(o):"status"==t?n.setStatusContainer(o):"map"==t&&n.setMapContainer(o)}else"resource"==e.nodeName?mxResources.add(e.getAttribute("basename")):"stylesheet"==e.nodeName&&mxClient.link("stylesheet",e.getAttribute("name"));e=e.nextSibling}},e.decodeTemplates=function(e,t,n){null==n.templates&&(n.templates=[]),t=mxUtils.getChildNodes(t);for(var a=0;a<t.length;a++){for(var i=t[a].getAttribute("as"),o=t[a].firstChild;null!=o&&1!=o.nodeType;)o=o.nextSibling;null!=o&&(n.templates[i]=e.decodeCell(o))}},e}()),EditorUi=function(e,t,n){this.projectDesignController=e,this.editor=t||new Editor,this.container=n||document.body;var a=t.graph,i=this;this.container.style.overflow="hidden",(new Image).src=mxPopupMenu.prototype.submenuImage,null!=mxConnectionHandler.prototype.connectImage&&((new Image).src=mxConnectionHandler.prototype.connectImage.src),this.actions=new Actions(this),this.menus=new Menus(this),this.createDivs(),this.refresh(),this.createUi();var o=mxUtils.bind(this,function(e){return null==e&&(e=window.event),!!this.isSelectionAllowed(e)||a.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=o,this.menubarContainer.onmousedown=o,this.toolbarContainer.onselectstart=o,this.toolbarContainer.onmousedown=o,this.diagramContainer.onselectstart=o,this.diagramContainer.onmousedown=o,this.sidebarContainer.onselectstart=o,this.sidebarContainer.onmousedown=o,this.footerContainer.onselectstart=o,this.footerContainer.onmousedown=o),mxClient.IS_IE&&(void 0===document.documentMode||document.documentMode<9)?(mxEvent.addListener(this.diagramContainer,"contextmenu",o),mxEvent.addListener(this.sidebarContainer,"contextmenu",o)):(this.diagramContainer.oncontextmenu=o,this.sidebarContainer.oncontextmenu=o),a.init(this.diagramContainer),a.refresh(),a.container.setAttribute("tabindex","0"),a.container.style.cursor="default",a.container.style.backgroundImage="url("+t.gridImage+")",a.container.style.backgroundPosition="-1px -1px",a.container.focus();var s=a.fireMouseEvent;a.fireMouseEvent=function(e,t,n){e==mxEvent.MOUSE_DOWN&&this.container.focus(),s.apply(this,arguments)},this.createMultiplicities(a.multiplicities,["start","finally","end"],[[1,1],[1,1],[0,0]],[[0,0],[0,0],[1,"n"]]),this.createMultiplicities(a.multiplicities,["answer","hangup","dial","ext_dial","queue","voicemail","callback"],[[1,1],[0,0],[0,1],[0,1],[0,1],[1,1],[0,1]],[[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"]]),this.createMultiplicities(a.multiplicities,["login","pause","unpause","logout"],[[1,2],[1,2],[1,2],[1,2]],[[1,"n"],[1,"n"],[1,"n"],[1,"n"]]),this.createMultiplicities(a.multiplicities,["set","math"],[[1,1],[1,1]],[[1,"n"],[1,"n"]]),this.createMultiplicities(a.multiplicities,["background","playback","menu","saydigits","saynumber","sayphonetic","tts","ispeechtts","awspolly","getdigits","getsecretdigits","lumenvoxtts"],[[1,"n"],[1,1],[1,"n"],[1,1],[1,1],[1,1],[1,1],[1,1],[1,1],[1,"n"],[1,"n"],[1,1]],[[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"]]),this.createMultiplicities(a.multiplicities,["record"],[[1,1]],[[1,"n"]]),this.createMultiplicities(a.multiplicities,["database","ispeechasr","sendSMS","sendMail","sendFax","googleasr","lumenvoxasr","tildeasr"],[[1,1],[1,1],[1,1],[1,1],[1,1],[1,1],[1,1],[1,1]],[[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"]]),this.createMultiplicities(a.multiplicities,["gotoc","gotoif","gotoiftime","vswitch"],[[0,0],[1,2],[1,2],[1,"n"]],[[1,"n"],[1,"n"],[1,"n"],[1,"n"]]),this.createMultiplicities(a.multiplicities,["queuelog","goal"],[[1,1],[1,1]],[[1,"n"],[1,"n"]]),this.createMultiplicities(a.multiplicities,["noop","system","agi","subproject","custom_app"],[[1,1],[1,1],[0,1],[0,1],[0,1]],[[1,"n"],[1,"n"],[1,"n"],[1,"n"],[1,"n"]]),a.dblClick=function(e,n){var t=new mxEventObject(mxEvent.DOUBLE_CLICK,"event",e,"cell",n);this.fireEvent(t),!this.isEnabled()||mxEvent.isConsumed(e)||t.isConsumed()||(this.getModel().isEdge(n)?0<=["background","gotoif","gotoiftime","menu","getdigits","getsecretdigits","vswitch","login","pause","unpause","logout"].indexOf(n.source.value.tagName)&&this.startEditingAtCell(n):this.getModel().isVertex(n)&&i.projectDesignController.openDialog(n.getValue(),function(e){for(var t=0;t<e.length;t+=1)n.setAttribute(e[t].name,e[t].value);a.refresh(n)}),t.consume())},a.panningHandler.autoExpand=!0,a.panningHandler.factoryMethod=mxUtils.bind(this,function(e,t,n){this.menus.createPopupMenu(e,t,n)}),t.outline.init(this.outlineContainer),mxEvent.addGestureListeners(document,mxUtils.bind(this,function(e){a.panningHandler.hideMenu()})),mxClient.IS_TOUCH&&(mxEvent.addListener(a.container,"gesturechange",mxUtils.bind(this,function(e){a.view.getDrawPane().setAttribute("transform","scale("+e.scale+")"),a.view.getOverlayPane().style.visibility="hidden"})),mxEvent.addListener(a.container,"gestureend",mxUtils.bind(this,function(e){a.view.getDrawPane().removeAttribute("transform"),a.zoomToCenter=!0,a.zoom(e.scale),a.view.getOverlayPane().style.visibility="visible"})));var r=this.createKeyHandler(t);this.getKeyHandler=function(){return r},mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.refresh(),a.sizeDidChange(),this.editor.outline.update(!1),this.editor.outline.outline.sizeDidChange()})),this.init(),this.open(),this.refresh()},EditorUi.prototype.splitSize=mxClient.IS_TOUCH?16:8,EditorUi.prototype.menubarHeight=33,EditorUi.prototype.toolbarHeight=36,EditorUi.prototype.footerHeight=0,EditorUi.prototype.hsplitPosition=204,EditorUi.prototype.vsplitPosition=190,EditorUi.prototype.init=function(){this.addUndoListener(),this.addSelectionListener();var e=this.actions.get("paste"),t=function(){e.setEnabled(!mxClipboard.isEmpty())},n=mxClipboard.cut;mxClipboard.cut=function(){n.apply(this,arguments),t()};var a=mxClipboard.copy;mxClipboard.copy=function(){a.apply(this,arguments),t()}},EditorUi.prototype.isSelectionAllowed=function(e){return!1},EditorUi.prototype.exportXML=function(e){var t=window.document.createElement("a");t.href="data:attachment/text;charset=utf-8,"+encodeURI(e),t.download=this.editor.filename+".xml",t.target="_self",t.click()},EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(e,t){try{var n=mxUtils.parseXml(e);this.editor.setGraphXml(n.documentElement),this.editor.modified=!1,this.editor.undoManager.clear(),null!=t&&(this.editor.filename=t)}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}))}catch(e){}},EditorUi.prototype.openString=function(e,t,n){try{var a=mxUtils.parseXml(e);this.editor.setGraphXml(a.documentElement),this.editor.modified=!1,this.editor.undoManager.clear(),null!=t&&(this.editor.filename=t),null!=n&&(this.editor.data=n)}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}},EditorUi.prototype.validate=function(e,t){for(var n=this.editor.graph,a=(e=null!=e?e:n.model.getRoot(),t=null!=t?t:{},!0),i=n.model.getChildCount(e),o=0;o<i;o++){var s=n.model.getChildAt(e,o),r=t;n.isValidRoot(s)&&(r={}),null!=(r=this.validate(s,r))?n.setCellWarning(s,r.replace(/\n/g,"<br>")):n.setCellWarning(s,null),a=a&&null==r}if(i="",n.model.isVertex(e))switch(e.value.nodeName){case"start":i=this.validateBlock("start")?"":"Only one Start block is allowed\n";break;case"finally":i=this.validateBlock("finally")?"":"Only one Finally block is allowed\n";break;case"playback":i=0<e.value.getAttribute("file_id")?"":mxResources.get("noAudioSelected")+"\n";break;case"answer":i=0<=e.value.getAttribute("timeout")?"":mxResources.get("invalidTimeout")+"\n";break;case"menu":i=0<e.value.getAttribute("file_id")?"":mxResources.get("noAudioSelected")+"\n",i+=0<e.value.getAttribute("digit")?"":mxResources.get("wrongMaxDigit")+"\n",i+=0<=e.value.getAttribute("response")?"":mxResources.get("invalidTimeout")+"\n",i+=0<=e.value.getAttribute("retry")?"":mxResources.get("invalidRetry")+"\n";break;case"getdigits":i=0<e.value.getAttribute("file_id")?"":mxResources.get("noAudioSelected")+"\n",i+=0<e.value.getAttribute("variable_id")?"":mxResources.get("noVariableSelected")+"\n",i+=0<e.value.getAttribute("mindigit")?"":mxResources.get("wrongMinDigit")+"\n",i+=0<e.value.getAttribute("maxdigit")?"":mxResources.get("wrongMaxDigit")+"\n",i+=0<=e.value.getAttribute("retry")?"":mxResources.get("invalidRetry")+"\n";break;case"getsecretdigits":i=0<e.value.getAttribute("file_id")?"":mxResources.get("noAudioSelected")+"\n",i+=0<e.value.getAttribute("variable_id")?"":mxResources.get("noVariableSelected")+"\n",i+=0<e.value.getAttribute("mindigit")?"":mxResources.get("wrongMinDigit")+"\n",i+=0<e.value.getAttribute("maxdigit")?"":mxResources.get("wrongMaxDigit")+"\n",i+=0<=e.value.getAttribute("hiddendigitsnum")?"":mxResources.get("wrongHiddenDigitsnum")+"\n",i+=0<=e.value.getAttribute("retry")?"":mxResources.get("invalidRetry")+"\n";break;case"vswitch":i=0<e.value.getAttribute("variable_id")?"":mxResources.get("noVariableSelected")+"\n";break;case"database":i=0<e.value.getAttribute("odbc_id")?"":mxResources.get("noDatabaseSelected")+"\n",i+=""!==e.value.getAttribute("query")?"":mxResources.get("missingQuery")+"\n";break;case"set":case"math":i=0<e.value.getAttribute("variable_id")?"":mxResources.get("noVariableSelected")+"\n";break;case"gotoc":i=""!==e.value.getAttribute("context")?"":mxResources.get("noContextSelected")+"\n",i+=""!==e.value.getAttribute("extension")?"":mxResources.get("noExtensionSelected")+"\n",i+=1<=e.value.getAttribute("priority")?"":mxResources.get("invalidPriority")+"\n";break;case"system":case"agi":i=""!==e.value.getAttribute("command")?"":mxResources.get("noCommandSelected")+"\n";break;case"gotoif":i=""!==e.value.getAttribute("condition")?"":mxResources.get("noConditionSelected")+"\n";break;case"saydigits":i=""!==e.value.getAttribute("digits")?"":mxResources.get("noDigitsSelected")+"\n";break;case"saynumber":i=""!==e.value.getAttribute("number")?"":mxResources.get("noNumberSelected")+"\n";break;case"sayphonetic":i=""!==e.value.getAttribute("text")?"":mxResources.get("noTextSelected")+"\n";break;case"record":i=""!==e.value.getAttribute("file")?"":mxResources.get("noFileSelected")+"\n",i+=-1<=e.value.getAttribute("timeout")?"":mxResources.get("invalidTimeout")+"\n";break;case"goal":i=""!==e.value.getAttribute("goalname")?"":mxResources.get("noGoalSelected")+"\n";break;case"ext_dial":i="-1"!==e.value.getAttribute("trunk_name")?"":mxResources.get("noTrunkSelected")+"\n",i+=""!==e.value.getAttribute("phone")?"":mxResources.get("noIdentifierSelected")+"\n",i+=0<=e.value.getAttribute("timeout")?"":mxResources.get("invalidTimeout")+"\n";break;case"dial":i=0<e.value.getAttribute("sip_id")?"":mxResources.get("noIdentifierSelected")+"\n",i+=0<=e.value.getAttribute("timeout")?"":mxResources.get("invalidTimeout")+"\n";break;case"queue":i="-1"!==e.value.getAttribute("queue_id")?"":mxResources.get("noQueueSelected")+"\n",i+=0<=e.value.getAttribute("timeout")?"":mxResources.get("invalidTimeout")+"\n";break;case"callback":i="-1"!==e.value.getAttribute("list_id")?"":mxResources.get("noListSelected")+"\n",i+=""!==e.value.getAttribute("name")?"":mxResources.get("noFirstNameSelected")+"\n",i+=""!==e.value.getAttribute("phone")?"":mxResources.get("noPhoneSelected")+"\n",i+=0<=e.value.getAttribute("delay")?"":mxResources.get("invalidDelay")+"\n";break;case"gotoiftime":i=0<e.value.getAttribute("interval_id")?"":mxResources.get("noIntervalSelected")+"\n";break;case"voicemail":i=""!==e.value.getAttribute("mailbox")?"":mxResources.get("noBoxNumberSelected")+"\n";break;case"subproject":i=0<e.value.getAttribute("project_id")?"":mxResources.get("noProjectSelected")+"\n";break;case"sendSMS":i=0<e.value.getAttribute("sms_account_id")?"":mxResources.get("noAccountSelected")+"\n",i+=""!==e.value.getAttribute("to")?"":mxResources.get("noRecipientSelected")+"\n",i+=""!==e.value.getAttribute("sms_text")?"":mxResources.get("noTextSelected")+"\n";break;case"sendMail":i=0<e.value.getAttribute("account_id")?"":mxResources.get("noAccountSelected")+"\n",i+=""!==e.value.getAttribute("to")?"":mxResources.get("noRecipientSelected")+"\n";break;case"sendFax":i=0<e.value.getAttribute("account_id")?"":mxResources.get("noAccountSelected")+"\n",i+=""!==e.value.getAttribute("to")?"":mxResources.get("noRecipientSelected")+"\n",i+=""!==e.value.getAttribute("attachment_path")?"":mxResources.get("noAttachmentSelected")+"\n";break;case"tts":i=""!==e.value.getAttribute("text")?"":mxResources.get("noTextSelected")+"\n";break;case"awspolly":i=""!==e.value.getAttribute("text")?"":mxResources.get("noTextSelected")+"\n",i=""!==e.value.getAttribute("aws_access_key_id")?"":mxResources.get("noAccessKeySelected")+"\n",i=""!==e.value.getAttribute("aws_secret_access_key")?"":mxResources.get("noSecretAccessKeySelected")+"\n";break;case"ispeechtts":i=""!==e.value.getAttribute("text")?"":mxResources.get("noTextSelected")+"\n",i+=""!==e.value.getAttribute("key")?"":mxResources.get("noKeySelected")+"\n",i+=-10<=e.value.getAttribute("speed")&&e.value.getAttribute("speed")<=10?"":mxResources.get("invalidSpeed")+"\n";break;case"lumenvoxtts":i=""!==e.value.getAttribute("text")?"":mxResources.get("noTextSelected")+"\n";break;case"lumenvoxasr":i=""!==e.value.getAttribute("grammar")?"":mxResources.get("noGrammarSelected")+"\n";break;case"ispeechasr":case"googleasr":i=""!==e.value.getAttribute("key")?"":mxResources.get("noKeySelected")+"\n",i+=-1<=e.value.getAttribute("timeout")?"":mxResources.get("invalidTimeout")+"\n";break;case"tildeasr":i=""!==e.value.getAttribute("appid")?"":mxResources.get("noAppIdInserted")+"\n",i+=""!==e.value.getAttribute("appsecret")?"":mxResources.get("noAppSecretInserted")+"\n",i+=""!==e.value.getAttribute("uri")?"":mxResources.get("noUriInserted")+"\n";break;case"custom_app":i=""!==e.value.getAttribute("application")?"":mxResources.get("noApplicationSelected")+"\n";break;case"login":case"pause":case"unpause":case"logout":i=""!==e.value.getAttribute("findBy")?"":mxResources.get("noFindBySelected")+"\n"}if(n.model.isEdge(e))switch(n.model.getCell(e.source.getId()).value.nodeName){case"background":i+=(l=/^[0-9]{1,45}$|^[i]{1}$|^[t]{1}$|^[*]{1}$|^[#]{1}$/).test(String(e.getValue()))?"":mxResources.get("numberOrInvalidOrTimeout")+"\n";break;case"menu":if(e.getValue()){var l=/^[0-9]+$|^[-]{1}$|^[i]{1}$|^[t]{1}$|^[*]{1}$|^[#]{1}$/;String(e.getValue()).split(",").forEach(function(e){i+=l.test(e)?"":mxResources.get("numberOrAll")+"\n"})}else i=i+mxResources.get("numberOrAll")+"\n";break;case"getsecretdigits":case"getdigits":if(e.getValue())i+=(l=/^(x|i|-)$/).test(String(e.getValue()))?"":mxResources.get("numberOrInvalidOrDefault")+"\n";else i=i+mxResources.get("numberOrInvalidOrDefault")+"\n";break;case"gotoif":case"gotoiftime":if(e.getValue())i+=(l=/^(true){1}$|^(false){1}$/).test(String(e.getValue()))?"":mxResources.get("trueOrFalse")+"\n";else i=i+mxResources.get("trueOrFalse")+"\n";break;case"login":case"pause":case"unpause":case"logout":if(e.getValue())i+=(l=/^(success){1}$|^(failure){1}$/).test(String(e.getValue()))?"":mxResources.get("successOrFailure")+"\n";else i=i+mxResources.get("successOrFailure")+"\n"}return n.isCellCollapsed(e)&&!a&&(i+=(mxResources.get(n.containsValidationErrorsResource)||n.containsValidationErrorsResource)+"\n"),i=n.model.isEdge(e)?i+(n.getEdgeValidationError(e,n.model.getTerminal(e,!0),n.model.getTerminal(e,!1))||""):i+(n.getCellValidationError(e)||""),null!=(o=n.validateCell(e,t))&&(i+=o),null==n.model.getParent(e)&&n.view.validate(),0<i.length||!a?i:null},EditorUi.prototype.validateBlock=function(t){var n=this.editor.graph,e=n.getDefaultParent(),a=0;return e.children.forEach(function(e){n.model.isVertex(e)&&e.value.nodeName==t&&a++}),!(1<a)},EditorUi.prototype.getUrl=function(e){var t=null!=e?e:window.location.pathname,n=0<t.indexOf("?")?1:0;for(var a in urlParams)t+=0==n?"?":"&",t+=a+"="+urlParams[a],n++;return t},EditorUi.prototype.addUndoListener=function(){var e=this.actions.get("undo"),t=this.actions.get("redo"),n=this.editor.undoManager,a=function(){e.setEnabled(n.canUndo()),t.setEnabled(n.canRedo())};n.addListener(mxEvent.ADD,a),n.addListener(mxEvent.UNDO,a),n.addListener(mxEvent.REDO,a),n.addListener(mxEvent.CLEAR,a),a()},EditorUi.prototype.addSelectionListener=function(){var e=mxUtils.bind(this,function(){var e=this.editor.graph,t=!e.isSelectionEmpty(),n=!1,a=!1,i=e.getSelectionCells();if(null!=i)for(var o=0;o<i.length;o++){var s=i[o];if(e.getModel().isEdge(s)&&(a=!0),e.getModel().isVertex(s)&&(n=!0),a&&n)break}var r=["cut","copy","delete","duplicate","bold","italic","style","underline","toFront","toBack","dashed","rounded","shadow","tilt","autosize"];for(o=0;o<r.length;o++)this.actions.get(r[o]).setEnabled(t);this.actions.get("curved").setEnabled(a),this.actions.get("rotation").setEnabled(n),this.actions.get("wordWrap").setEnabled(n),this.actions.get("group").setEnabled(1<e.getSelectionCount()),this.actions.get("ungroup").setEnabled(1==e.getSelectionCount()&&0<e.getModel().getChildCount(e.getSelectionCell()));var l=n&&1==e.getSelectionCount();this.actions.get("removeFromGroup").setEnabled(l&&e.getModel().isVertex(e.getModel().getParent(e.getSelectionCell())));var d=["fontFamily","fontSize","alignment","position","text","format","arrange","linewidth","spacing"];for(o=0;o<d.length;o++)this.menus.get(d[o]).setEnabled(t);d=["line","lineend","linestart"];for(o=0;o<d.length;o++)this.menus.get(d[o]).setEnabled(a);this.actions.get("setAsDefaultEdge").setEnabled(a),this.menus.get("align").setEnabled(1<e.getSelectionCount()),this.menus.get("direction").setEnabled(n||a&&e.isLoop(e.view.getState(e.getSelectionCell()))),this.menus.get("navigation").setEnabled(e.foldingEnabled&&(null!=e.view.currentRoot||1==e.getSelectionCount()&&e.isValidRoot(e.getSelectionCell()))),this.actions.get("home").setEnabled(null!=e.view.currentRoot),this.actions.get("exitGroup").setEnabled(null!=e.view.currentRoot);var c=1==e.getSelectionCount()&&e.isValidRoot(e.getSelectionCell());this.actions.get("enterGroup").setEnabled(c),this.actions.get("expand").setEnabled(c),this.actions.get("collapse").setEnabled(c),this.actions.get("editLink").setEnabled(1==e.getSelectionCount()),this.actions.get("openLink").setEnabled(1==e.getSelectionCount()&&null!=e.getLinkForCell(e.getSelectionCell()))});this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,e),e()},EditorUi.prototype.refresh=function(){var e=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),t=this.container.clientWidth+390,n=this.container.clientHeight+190;this.container==document.body&&(t=document.body.clientWidth||document.documentElement.clientWidth,n=e&&document.body.clientHeight||document.documentElement.clientHeight);var a=Math.max(0,Math.min(this.hsplitPosition,t-this.splitSize-20)),i=Math.max(0,Math.min(this.vsplitPosition,n-this.menubarHeight-this.toolbarHeight-this.splitSize-1));this.menubarContainer.style.height=this.menubarHeight+"px",this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px";var o=this.menubarHeight+this.toolbarHeight;if(mxClient.IS_QUIRKS||(o+=1),this.sidebarContainer.style.top=o+"px",this.sidebarContainer.style.width=a+"px",this.outlineContainer.style.width=a+"px",this.outlineContainer.style.height=i+"px",this.diagramContainer.style.left=a+this.splitSize+"px",this.diagramContainer.style.top=this.sidebarContainer.style.top,this.hsplit.style.top=this.sidebarContainer.style.top,this.hsplit.style.bottom=this.outlineContainer.style.bottom,this.hsplit.style.left=a+"px",this.vsplit.style.width=this.sidebarContainer.style.width,this.vsplit.style.bottom=i+this.footerHeight+"px",e){this.menubarContainer.style.width=t+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width;var s=n-i-this.splitSize-this.menubarHeight-this.toolbarHeight;this.sidebarContainer.style.height=s+"px",this.diagramContainer.style.width=t-a-this.splitSize+"px";var r=n-this.menubarHeight-this.toolbarHeight;this.diagramContainer.style.height=r+"px",this.hsplit.style.height=r+"px"}else this.sidebarContainer.style.bottom=i+this.splitSize+"px",this.diagramContainer.style.bottom=this.outlineContainer.style.bottom},EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer"),this.toolbarContainer=this.createDiv("geToolbarContainer"),this.sidebarContainer=this.createDiv("geSidebarContainer"),this.outlineContainer=this.createDiv("geOutlineContainer"),this.diagramContainer=this.createDiv("geDiagramContainer"),this.footerContainer=this.createDiv("geFooterContainer"),this.hsplit=this.createDiv("geHsplit"),this.vsplit=this.createDiv("geVsplit"),this.menubarContainer.style.top="0px",this.menubarContainer.style.left="0px",this.menubarContainer.style.right="0px",this.toolbarContainer.style.left="0px",this.toolbarContainer.style.right="0px",this.sidebarContainer.style.left="0px",this.outlineContainer.style.bottom="0px",this.outlineContainer.style.left="0px",this.diagramContainer.style.overflow="scroll",this.diagramContainer.style.right="0px",this.footerContainer.style.left="0px",this.footerContainer.style.right="0px",this.footerContainer.style.bottom="0px",this.vsplit.style.left="0px",this.vsplit.style.height=this.splitSize+"px",this.hsplit.style.width=this.splitSize+"px"},EditorUi.prototype.createUi=function(){this.menubar=this.menus.createMenubar(this.createDiv("geMenubar")),this.menubarContainer.appendChild(this.menubar.container),this.toolbar=this.createToolbar(this.createDiv("geToolbar")),this.toolbarContainer.appendChild(this.toolbar.container),this.sidebar=this.createSidebar(this.sidebarContainer),this.footerContainer.appendChild(this.createFooter()),this.statusContainer=this.createStatusContainer(),this.editor.addListener("statusChanged",mxUtils.bind(this,function(){this.setStatusText(this.editor.getStatus())})),this.setStatusText(this.editor.getStatus()),this.menubar.container.appendChild(this.statusContainer),this.container.appendChild(this.menubarContainer),this.container.appendChild(this.toolbarContainer),this.container.appendChild(this.sidebarContainer),this.container.appendChild(this.outlineContainer),this.container.appendChild(this.diagramContainer),this.container.appendChild(this.footerContainer),this.container.appendChild(this.hsplit),this.container.appendChild(this.vsplit),this.addSplitHandler(this.hsplit,!0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e,this.refresh(),this.editor.graph.sizeDidChange(),this.editor.outline.update(!1),this.editor.outline.outline.sizeDidChange()})),this.addSplitHandler(this.vsplit,!1,this.footerHeight,mxUtils.bind(this,function(e){this.vsplitPosition=e,this.refresh(),this.editor.outline.update(!1),this.editor.outline.outline.sizeDidChange()}))},EditorUi.prototype.createStatusContainer=function(){var e=document.createElement("a");return e.className="geItem geStatus",e},EditorUi.prototype.createStatusContainer=function(){var e=document.createElement("a");return e.className="geItem geStatus",e},EditorUi.prototype.setStatusText=function(e){this.statusContainer.innerHTML=e},EditorUi.prototype.createToolbar=function(e){return new Toolbar(this,e)},EditorUi.prototype.createSidebar=function(e){return new Sidebar(this,e)},EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")},EditorUi.prototype.createDiv=function(e){var t=document.createElement("div");return t.className=e,t},EditorUi.prototype.createHeader=function(e){return document.createElement(e)},EditorUi.prototype.createForm=function(e){var t=document.createElement("form");return t.className=e,t},EditorUi.prototype.addSplitHandler=function(t,n,a,i){var o=null,s=null;function r(e){if(null!=o){var t=new mxPoint(mxEvent.getClientX(e),mxEvent.getClientY(e));i(Math.max(0,s+(n?t.x-o.x:o.y-t.y)-a)),mxEvent.consume(e)}}function e(e){r(e),s=o=null}mxEvent.addGestureListeners(t,function(e){o=new mxPoint(mxEvent.getClientX(e),mxEvent.getClientY(e)),s=parseInt(n?t.style.left:t.style.bottom),mxEvent.consume(e)}),mxEvent.addListener(document,"mousemove",r),mxEvent.addListener(document,"touchmove",r),mxEvent.addListener(document,"mouseup",e),mxEvent.addListener(document,"touchend",e)},EditorUi.prototype.executeLayout=function(e,t,n){var a=this.editor.graph,i=a.getSelectionCell();t=null!=this.animate?this.animate:t,a.getModel().beginUpdate();try{e.execute(a.getDefaultParent(),i)}catch(e){throw e}finally{if(t&&navigator.userAgent.indexOf("Camino")<0){var o=new mxMorphing(a);o.addListener(mxEvent.DONE,mxUtils.bind(this,function(){a.getModel().endUpdate()})),o.startAnimation()}else a.getModel().endUpdate()}},EditorUi.prototype.createKeyHandler=function(e){var a=this.editor.graph,s=new mxKeyHandler(a);function t(e){if(!a.isSelectionEmpty()){var t=0,n=0;37==e?t=-1:38==e?n=-1:39==e?t=1:40==e&&(n=1),a.moveCells(a.getSelectionCells(),t,n),a.scrollCellToVisible(a.getSelectionCell())}}s.isControlDown=function(e){return mxEvent.isControlDown(e)||mxClient.IS_MAC&&e.metaKey};var n=mxUtils.bind(this,function(e,t,n,a){var i=this.actions.get(n);if(null!=i){var o=function(){i.enabled&&i.funct()};t?a?s.bindControlShiftKey(e,o):s.bindControlKey(e,o):a?s.bindShiftKey(e,o):s.bindKey(e,o)}});return s.enter=function(){},s.bindKey(8,function(){a.foldCells(!0)}),s.bindKey(13,function(){a.foldCells(!1)}),s.bindKey(33,function(){a.exitGroup()}),s.bindKey(34,function(){a.enterGroup()}),s.bindKey(36,function(){a.home()}),s.bindKey(35,function(){a.refresh()}),s.bindKey(37,function(){t(37)}),s.bindKey(38,function(){t(38)}),s.bindKey(39,function(){t(39)}),s.bindKey(40,function(){t(40)}),s.bindKey(113,function(){a.startEditingAtCell()}),n(46,!1,"delete"),n(82,!0,"tilt"),n(83,!0,"save"),n(83,!0,"saveAs",!0),n(107,!1,"zoomIn"),n(109,!1,"zoomOut"),n(65,!0,"selectAll"),n(86,!0,"selectVertices",!0),n(69,!0,"selectEdges",!0),n(69,!0,"export"),n(66,!0,"toBack"),n(70,!0,"toFront"),n(68,!0,"duplicate"),n(90,!0,"undo"),n(89,!0,"redo"),n(88,!0,"cut"),n(67,!0,"copy"),n(81,!0,"connect"),n(86,!0,"paste"),n(71,!0,"group"),n(71,!0,"grid",!0),n(85,!0,"ungroup"),n(112,!1,"about"),n(80,!0,"publish",!0),s},EditorUi.prototype.createMultiplicities=function(e,t,n,a){for(var i=0;i<t.length;i++)e.push(new mxMultiplicity(!0,t[i],null,null,n[i][0],n[i][1],null,mxResources.get(t[i])+mxResources.get("musthave")+n[i][0]+mxResources.get("outgoingedge"),null)),e.push(new mxMultiplicity(!1,t[i],null,null,a[i][0],a[i][1],null,mxResources.get(t[i])+mxResources.get("musthave")+a[i][0]+mxResources.get("incomingedge"),null))};var useLocalStorage=(mxClient.IS_TOUCH||"local"==urlParams.storage)&&"undefined"!=typeof localStorage,fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList,touchStyle=mxClient.IS_TOUCH||"1"==urlParams.touch,counter=0;try{for(var op=window;null!=op.opener&&!isNaN(op.opener.counter);)op=op.opener;null!=op&&(op.counter++,counter=op.counter)}catch(e){}function Sidebar(e,t){this.editorUi=e,this.container=t,this.palettes=new Object,this.taglist=new Object,this.showTooltips=!0,this.graph=new Graph(document.createElement("div"),null,null,this.editorUi.editor.graph.getStylesheet()),this.graph.resetViewOnRootChange=!1,this.graph.foldingEnabled=!1,this.graph.setConnectable(!1),this.graph.autoScroll=!1,this.graph.setTooltips(!1),this.graph.setEnabled(!1),this.graph.container.style.visibility="hidden",this.graph.container.style.position="absolute",this.graph.container.style.overflow="hidden",this.graph.container.style.height="1px",this.graph.container.style.width="1px",mxClient.IS_IE||mxClient.IS_IE11||(this.graph.container.style.display="none"),document.body.appendChild(this.graph.container),this.pointerUpHandler=mxUtils.bind(this,function(){this.showTooltips=!0}),mxEvent.addListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerDownHandler=mxUtils.bind(this,function(){this.showTooltips=!1,this.hideTooltip()}),mxEvent.addListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler),this.pointerMoveHandler=mxUtils.bind(this,function(e){for(var t=mxEvent.getSource(e);null!=t;){if(t==this.currentElt)return;t=t.parentNode}this.hideTooltip()}),mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerOutHandler=mxUtils.bind(this,function(e){null==e.toElement&&null==e.relatedTarget&&this.hideTooltip()}),mxEvent.addListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),mxEvent.addListener(t,"scroll",mxUtils.bind(this,function(){this.showTooltips=!0})),this.init(),mxClient.IS_SVG||((new Image).src=IMAGE_PATH+"/tooltip.png")}function Actions(e){this.editorUi=e,this.actions=new Object,this.init()}function Action(e,t,n,a,i){mxEventSource.call(this),this.label=e,this.funct=t,this.enabled=null==n||n,this.iconCls=a,this.shortcut=i}function Menubar(e,t){this.editorUi=e,this.container=t,mxEvent.addGestureListeners(document,mxUtils.bind(this,function(e){this.hideMenu()}))}function Menu(e,t){mxEventSource.call(this),this.funct=e,this.enabled=null==t||t}function Toolbar(e,t){this.editorUi=e,this.container=t,this.init(),mxEvent.addGestureListeners(document,mxUtils.bind(this,function(e){this.hideMenu()}))}function createCheckbox(e){var t=document.createElement("input");return t.setAttribute("type","checkbox"),e&&t.setAttribute("checked",!0),t}function createDropdownFromApi(e,n,a,i,t,o,s,r){var l=new XMLHttpRequest;l.open("GET",e,!1),l.setRequestHeader("Authorization","Bearer "+t.editor.data.token),l.send(null);var d=[];200===l.status&&(d=JSON.parse(l.response));var c=document.createElement("select"),m=document.createElement("option");return m.text="-- None --",m.value="-1",c.appendChild(m),d.rows.forEach(function(t){r&&t[a]==r||((m=document.createElement("option")).text=t[a],o&&s?(m.value=s,o.forEach(function(e){m.value=m.value.replace("%"+e+"%",t[e])}),m.selected=m.value==n):(m.value=t[i],m.selected=t[i]==n),c.appendChild(m))}),c.className="form-control select2",c}function createDropdownWithOptgroupFromApi(e,t,n,a,i,o){var s=new XMLHttpRequest;s.open("GET",e,!1),s.setRequestHeader("Authorization","Bearer "+i.editor.data.token),s.send(null);var r=[];200===s.status&&(r=JSON.parse(s.response));var l=document.createElement("select"),d=document.createElement("option");d.text="-- None --",d.value="-1",l.appendChild(d);var c=_.groupBy(r.rows,o);for(var m in c)if(c.hasOwnProperty(m)){var u=document.createElement("optgroup");u.label=_.capitalize(m),c[m].forEach(function(e){(d=document.createElement("option")).text=e[n],d.value=e[a],d.selected=e[a]==t,u.appendChild(d)}),l.appendChild(u)}return l.className="form-control select2",l}function createGroupedDropdownFromApi(e,t,n,a,i,o){var s=new XMLHttpRequest;s.open("GET",e,!1),s.setRequestHeader("Authorization","Bearer "+i.editor.data.token),s.send(null);var r=[];200===s.status&&(r=JSON.parse(s.response));var l=document.createElement("select"),d=document.createElement("option");return d.text="-- None --",d.value="0",l.appendChild(d),r.rows.forEach(function(e){(d=document.createElement("option")).className="select-group-father",d.text=e[n].toUpperCase(),d.value=e[a],d.selected=e[a]==t,l.appendChild(d),e[o].forEach(function(e){(d=document.createElement("option")).className="select-group-son",d.text="-"+_.capitalize(e[n]),d.value=e[a],d.selected=e[a]==t,l.appendChild(d)})}),l.className="form-control select2",l}function createDropdownFromArray(e,t){var n=document.createElement("select");for(var a in e){var i=document.createElement("option");i.text=e[a],i.value=a,(0<t||""!=t)&&(i.selected=t===a),n.appendChild(i)}return n.className="form-control select2",n}function createDropdownFromTigerDialList(e){var t=document.createElement("select"),n=[],a=new XMLHttpRequest;try{if(a.open("POST","/api/rest/list/list",!1),a.send(JSON.stringify({page:1,size:6e5})),200===a.status){var i=JSON.parse(a.response);if(0<i.status){var o=i.response.RMI.rows;for(var s in o)n[o[s].id]=o[s].name}}}catch(e){console.log(e)}for(var r in n){var l=document.createElement("option");l.text=n[r],l.value=r,(0<e||""!=e)&&(l.selected=e===r),t.appendChild(l)}return t.className="form-control select2",t}function Dialog(e,t,n,a,i,o,s){var r=0;mxClient.IS_IE&&9!=document.documentMode&&(r=60),n+=r,a+=r;Math.max(0,Math.round((document.body.scrollWidth-n)/2)),Math.max(0,Math.round((Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)-a)/3));var l=e.createDiv("geDialog");l.className="modal fade in center",l.style.display="block",l.style.paddingRight="12px";var d=e.createDiv("geModalDialog");d.className="modal-dialog",d.appendChild(t),l.appendChild(d),null==this.bg&&(this.bg=e.createDiv("background"),this.bg.className="modal-backdrop fade in",mxClient.IS_QUIRKS&&new mxDivResizer(this.bg)),i&&document.body.appendChild(this.bg),document.body.appendChild(l),this.onDialogClose=s,this.container=l}function ImportDialog(n){var e=n.createDiv("modal-content"),t=n.createDiv("modal-header"),a=n.createDiv("modal-body"),i=n.createDiv("modal-footer"),o=n.createHeader("h4");mxUtils.write(o,mxResources.get("import")+" XML");var s=mxUtils.button("",function(){n.hideDialog()});s.className="close",t.appendChild(s),t.appendChild(o);var r=n.createDiv("row"),l=n.createDiv("col-md-12"),d=document.createElement("textarea");d.style.width="100%",d.style.height="374px";var c=document.createElement("input");c.type="file",c.setAttribute("accept","text/xml"),c.addEventListener("change",function(e){var t=e.target.files[0];if(console.log(t),t)if("text/xml"===t.type){var n=new FileReader;n.onload=function(e){var t=e.target.result;mxUtils.write(d,t)},n.readAsText(t)}else alert("Failed to load format file");else alert("Failed to load file")},!1),l.appendChild(c),l.appendChild(d),r.appendChild(l),a.appendChild(r);var m=mxUtils.button(mxResources.get("import"),mxUtils.bind(this,function(e){var t=mxUtils.parseXml(d.value);n.editor.setGraphXml(t.documentElement),n.hideDialog()}));m.className="btn blue";var u=mxUtils.button(mxResources.get("cancel"),function(){n.hideDialog()});u.className="btn default",i.appendChild(m),i.appendChild(u),e.appendChild(t),e.appendChild(a),e.appendChild(i),this.container=e}function AboutDialog(e){var t=e.createDiv("modal-content"),n=e.createDiv("modal-header"),a=e.createDiv("modal-body"),i=e.createDiv("modal-footer"),o=e.createHeader("h4");mxUtils.write(o,mxResources.get("about")+" Cally Square");var s=mxUtils.button("",function(){e.hideDialog()});s.className="close",n.appendChild(s),n.appendChild(o);var r=document.createElement("img");r.style.border="0px",r.setAttribute("width","176"),r.setAttribute("width","151"),r.setAttribute("src",IMAGE_PATH+"/logo.png"),a.appendChild(r),mxUtils.br(a),mxUtils.write(a,"Powered by Xenialab "+mxClient.VERSION),mxUtils.br(a);var l=document.createElement("a");l.setAttribute("href","http://www.callysquare.com/"),l.setAttribute("target","_blank"),mxUtils.write(l,"www.callysquare.com"),a.appendChild(l),mxUtils.br(a),mxUtils.br(a);var d=mxUtils.button(mxResources.get("close"),function(){e.hideDialog()});d.className="btn default",i.appendChild(d),t.appendChild(n),t.appendChild(a),t.appendChild(i),this.container=t}function SaveDialog(e){var t=e.createDiv("modal-content"),n=e.createDiv("modal-header"),a=e.createDiv("modal-body"),i=e.createDiv("modal-footer"),o=e.createHeader("h4");mxUtils.write(o,mxResources.get("saveAs"));var s=mxUtils.button("",function(){e.hideDialog()});s.className="close",n.appendChild(s),n.appendChild(o);var r=e.editor.getOrCreateFilename(),l=e.createDiv("row"),d=e.createDiv("col-md-4"),c=e.createDiv("col-md-8"),m=document.createElement("label");m.className="control-label pull-right",mxUtils.write(m,mxResources.get("name")),d.appendChild(m);var u=document.createElement("input");u.setAttribute("value",r+"_copy"),u.setAttribute("id","_name"),u.className="form-control",c.appendChild(u),l.appendChild(d),l.appendChild(c),a.appendChild(l);var p=mxUtils.button(mxResources.get("save"),function(){e.saveAs(u.value),e.hideDialog()});p.className="btn blue";var g=mxUtils.button(mxResources.get("cancel"),function(){e.hideDialog()});g.className="btn default",i.appendChild(p),i.appendChild(g),t.appendChild(n),t.appendChild(a),t.appendChild(i),this.container=t}function NewDialog(e){var t=e.createDiv("modal-content"),n=e.createDiv("modal-header"),a=e.createDiv("modal-body"),i=e.createDiv("modal-footer"),o=e.createHeader("h4");mxUtils.write(o,mxResources.get("new"));var s=mxUtils.button("",function(){e.hideDialog()});s.className="close",n.appendChild(s),n.appendChild(o);var r=e.editor.getOrCreateFilename(),l=e.createDiv("row"),d=e.createDiv("col-md-4"),c=e.createDiv("col-md-8"),m=document.createElement("label");m.className="control-label pull-right",mxUtils.write(m,mxResources.get("name")),d.appendChild(m);var u=document.createElement("input");u.setAttribute("value",r+"_new"),u.setAttribute("id","_name"),u.className="form-control",c.appendChild(u),l.appendChild(d),l.appendChild(c),a.appendChild(l);var p=mxUtils.button(mxResources.get("new"),function(){e.new(u.value),e.hideDialog()});p.className="btn blue";var g=mxUtils.button(mxResources.get("cancel"),function(){e.hideDialog()});g.className="btn default",i.appendChild(p),i.appendChild(g),t.appendChild(n),t.appendChild(a),t.appendChild(i),this.container=t}function DescriptionDialog(e){console.log(e.editor.data);var t=e.createDiv("modal-content"),n=e.createDiv("modal-header"),a=e.createDiv("modal-body"),i=e.createDiv("modal-footer"),o=e.createHeader("h4");mxUtils.write(o,mxResources.get("description"));var s=mxUtils.button("",function(){e.hideDialog()});s.className="close",n.appendChild(s),n.appendChild(o);var r=e.createDiv("form-horizontal form-row-seperated"),l="description",d=e.editor.data.description||"",c=e.createDiv("form-group"),m=document.createElement("label");m.className="col-sm-4 control-label",mxUtils.write(m,mxResources.get(l)),c.appendChild(m);var u=document.createElement("input");u.setAttribute("value",d),u.className="form-control",u.setAttribute("id","_description");var p=e.createDiv("col-sm-8");p.appendChild(u),c.appendChild(p),r.appendChild(c),a.appendChild(r);var g=mxUtils.button(mxResources.get("update"),function(){e.description(u.value),e.hideDialog()});g.className="btn blue";var v=mxUtils.button(mxResources.get("cancel"),function(){e.hideDialog()});v.className="btn default",i.appendChild(g),i.appendChild(v),t.appendChild(n),t.appendChild(a),t.appendChild(i),this.container=t}function VariableDialog(e){var t=e.createDiv("modal-content"),n=e.createDiv("modal-header"),a=e.createDiv("modal-body"),i=e.createDiv("modal-footer"),o=e.createHeader("h4");mxUtils.write(o,mxResources.get("variable"));var s=mxUtils.button("",function(){e.hideDialog()});s.className="close",n.appendChild(s),n.appendChild(o);var r=e.createDiv("form-horizontal form-row-seperated"),l="name",d="_"+l,c="variable name",m=e.createDiv("form-group"),u=document.createElement("label");u.className="col-sm-4 control-label",mxUtils.write(u,mxResources.get(l)),m.appendChild(u);var p=document.createElement("input");p.setAttribute("value",c),p.className="form-control",p.setAttribute("id",d);var g=e.createDiv("col-sm-8");g.appendChild(p),m.appendChild(g),r.appendChild(m),d="_"+(l="description"),c="variable description",m=e.createDiv("form-group last"),(u=document.createElement("label")).className="col-sm-4 control-label",mxUtils.write(u,mxResources.get(l)),m.appendChild(u);var v=document.createElement("input");v.setAttribute("value",c),v.className="form-control",v.setAttribute("id",d),(g=e.createDiv("col-sm-8")).appendChild(v),m.appendChild(g),r.appendChild(m),a.appendChild(r);var h=mxUtils.button(mxResources.get("new"),function(){e.variable(p.value,v.value),e.hideDialog()});h.className="btn blue";var b=mxUtils.button(mxResources.get("cancel"),function(){e.hideDialog()});b.className="btn default",i.appendChild(h),i.appendChild(b),t.appendChild(n),t.appendChild(a),t.appendChild(i),this.container=t}function OpenDialog(e){var t=e.createDiv("modal-content"),n=e.createDiv("modal-header"),a=e.createDiv("modal-body"),i=e.createDiv("modal-footer"),o=e.createHeader("h4");mxUtils.write(o,mxResources.get("open"));var s=mxUtils.button("",function(){e.hideDialog()});s.className="close",n.appendChild(s),n.appendChild(o);var r=e.createDiv("row"),l=e.createDiv("col-md-4"),d=e.createDiv("col-md-8"),c=document.createElement("label");c.className="control-label pull-right",mxUtils.write(c,mxResources.get("name")),l.appendChild(c);var m=new XMLHttpRequest;m.open("GET","/api/square/projects",!1),m.setRequestHeader("Authorization","Bearer "+e.editor.data.token),m.send(null);var u=[];200===m.status&&(u=JSON.parse(m.response));for(var p=document.createElement("select"),g=0;g<u.length;g++){var v=document.createElement("option");v.text=u[g].name,v.value=u[g].id,p.appendChild(v)}p.className="form-control",d.appendChild(p),r.appendChild(l),r.appendChild(d),a.appendChild(r);var h=mxUtils.button(mxResources.get("open"),function(){console.log(p),console.log(p.value),window.open("square/project/"+p.value,"_blank"),e.hideDialog()});h.className="btn blue";var b=mxUtils.button(mxResources.get("cancel"),function(){e.hideDialog()});b.className="btn default",i.appendChild(h),i.appendChild(b),t.appendChild(n),t.appendChild(a),t.appendChild(i),this.container=t}function RenameDialog(n){var e=n.createDiv("modal-content"),t=n.createDiv("modal-header"),a=n.createDiv("modal-body"),i=n.createDiv("modal-footer"),o=n.createHeader("h4");mxUtils.write(o,mxResources.get("rename"));var s=mxUtils.button("",function(){n.hideDialog()});s.className="close",t.appendChild(s),t.appendChild(o);var r=n.createDiv("row"),l=n.createDiv("col-md-4"),d=n.createDiv("col-md-8"),c=document.createElement("label");c.className="control-label pull-right",mxUtils.write(c,mxResources.get("name")),l.appendChild(c);var m=n.editor.filename,u=document.createElement("input");u.setAttribute("value",m),u.className="form-control",d.appendChild(u),r.appendChild(l),r.appendChild(d),a.appendChild(r);var p=mxUtils.button(mxResources.get("save"),function(){var t=new XMLHttpRequest;t.open("PUT",SAVE_URL+n.editor.data.id,!0),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),t.setRequestHeader("Authorization","Bearer "+n.editor.data.token),t.send("name="+u.value),t.onload=function(e){200===t.status?(n.editor.setStatus("Project successfully renamed"),n.editor.filename=u.value):(console.log(t.response),n.editor.setStatus(JSON.parse(t.response).errors[0].message))},t.onerror=function(e){mxUtils.alert(t.statusText)},n.hideDialog()});p.className="btn blue";var g=mxUtils.button(mxResources.get("cancel"),function(){n.hideDialog()});g.className="btn default",i.appendChild(p),i.appendChild(g),e.appendChild(t),e.appendChild(a),e.appendChild(i),this.container=e}function EditFileDialog(t){var e=t.createDiv("modal-content"),n=t.createDiv("modal-header"),a=t.createDiv("modal-body"),i=t.createDiv("modal-footer"),o=t.createHeader("h4");mxUtils.write(o,mxResources.get("edit"));var s=mxUtils.button("",function(){t.hideDialog()});s.className="close",n.appendChild(s),n.appendChild(o);var r=t.createDiv("row"),l=t.createDiv("col-md-12"),d=document.createElement("textarea");if(d.style.width="100%",d.style.height="374px",d.value=mxUtils.getPrettyXml(t.editor.getGraphXml()),fileSupport){d.addEventListener("dragover",function(e){e.stopPropagation(),e.preventDefault()},!1),d.addEventListener("drop",function(e){if(e.stopPropagation(),e.preventDefault(),0<e.dataTransfer.files.length){var t=e.dataTransfer.files[0],n=new FileReader;n.onload=function(e){d.value=e.target.result},n.readAsText(t)}},!1)}l.appendChild(d),r.appendChild(l),a.appendChild(r);var c=mxUtils.button(mxResources.get("save"),function(){var e=mxUtils.parseXml(d.value);t.editor.setGraphXml(e.documentElement),t.hideDialog()});c.className="btn blue";var m=mxUtils.button(mxResources.get("cancel"),function(){t.hideDialog()});m.className="btn default",i.appendChild(c),i.appendChild(m),e.appendChild(n),e.appendChild(a),e.appendChild(i),this.container=e}function ExportDialog(t){var e=t.createDiv("modal-content"),n=t.createDiv("modal-header"),a=t.createDiv("modal-body form"),i=t.createDiv("modal-footer"),o=t.createHeader("h4");mxUtils.write(o,mxResources.get("export")+" XML");var s=mxUtils.button("",function(){t.hideDialog()});s.className="close",n.appendChild(s),n.appendChild(o);var r=t.createDiv("form-horizontal form-row-seperated"),l=t.createDiv("form-group last"),d=document.createElement("label");d.className="col-sm-4 control-label",mxUtils.write(d,mxResources.get("filename"));var c=document.createElement("input");c.setAttribute("value",t.editor.getOrCreateFilename()),c.className="form-control";var m=t.createDiv("col-sm-8");m.appendChild(c),l.appendChild(d),l.appendChild(m),r.appendChild(l),a.appendChild(r);var u=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(e){t.save(!1);encodeURIComponent(mxUtils.getXml(t.editor.getGraphXml()));new mxXmlRequest(SAVE_URL+t.editor.data.id+"/download","filename="+c.value,"GET").simulate(document,"_blank"),t.hideDialog()}));u.className="btn blue";var p=mxUtils.button(mxResources.get("cancel"),function(){t.hideDialog()});p.className="btn default",i.appendChild(u),i.appendChild(p),e.appendChild(n),e.appendChild(a),e.appendChild(i),this.container=e}function GeneralDialog(i,o){console.log("general");var s=i.editor.graph,e=i.createDiv("md-dialog"),t=i.createDiv("md-toolbar"),n=i.createDiv("md-dialog-content"),a=i.createDiv("md-dialog-actions"),r=i.createHeader("h4");mxUtils.write(r,mxResources.get("edit")+" "+mxResources.get(o.value.nodeName));var l=mxUtils.button("",function(){i.hideDialog()});l.className="close",t.appendChild(l),t.appendChild(r);for(var d=o.value.attributes.length,c=i.createDiv("form-horizontal form-row-seperated"),m=0;m<d;m++){var u,p=o.value.attributes[m].name,g="_"+p,v=o.value.attributes[m].value,h=i.createDiv(m==d-1?"form-group last":"form-group"),b=document.createElement("label");switch(b.className="col-sm-4 control-label",mxUtils.write(b,mxResources.get(p)),h.appendChild(b),p){case"sip_id":u=createDropdownWithOptgroupFromApi("/api/users/all",v,"fullname","id",i,"role");break;case"queue_id":u=createDropdownFromApi("/api/voice/queues",v,"name","name",i);break;case"trunk_name":u=createDropdownFromApi("/api/trunks",v,"name","name",i);break;case"variable_id":u=createDropdownFromApi("/api/variables",v,"name","id",i);break;case"account_id":u="sendMail"==o.value.nodeName?createDropdownFromApi("/api/mail/servers/out",v,"username","id",i):createDropdownFromApi("/api/sms/accounts",v,"name","id",i);break;case"template_id":u=createDropdownFromApi("/api/templates",v,"name","id",i);break;case"context":u=createDropdownFromApi("/api/voice/contexts",v,"name","name",i);break;case"mailbox":u=createDropdownFromApi("/api/voice/voicemails",v,"mailbox","id",i,["mailbox","context"],"%mailbox%@%context%");break;case"model":u=createDropdownFromArray(ISPEECHASRMODEL,v);break;case"ispeech_asr_language":u=createDropdownFromArray(ISPEECHASRLANG,v);break;case"beep":u=createDropdownFromArray(ISPEECHBEEP,v);break;case"hiddendigitspos":u=createDropdownFromArray(SECRETDIGITSPOS,v);break;case"ispeech_tts_language":u=createDropdownFromArray(ISPEECHLANG,v);break;case"google_tts_language":u=createDropdownFromArray(GOOGLETTSLANG,v);break;case"intKey":u=createDropdownFromArray(ASRINTKEYS,v);break;case"recordingFormat":u=createDropdownFromArray(RECORDINGFORMAT,v);break;case"answer":u=createDropdownFromArray(BOOLSELECT,v);break;case"list_id":u=createDropdownFromTigerDialList(v);break;case"interval_id":u=createGroupedDropdownFromApi("/api/intervals",v,"name","id",i,"SubIntervals");break;case"project_id":u=createDropdownFromApi("/api/square/projects",v,"name","id",i,null,null,i.editor.getOrCreateFilename());break;case"odbc_id":u=createDropdownFromApi("/api/square/odbc",v,"name","id",i);break;case"file_id":u=createDropdownFromApi("/api/sounds",v,"display_name","id",i);break;case"timeout":case"digit":case"mindigit":case"maxdigit":case"response":case"retry":case"speed":(u=document.createElement("input")).setAttribute("type","number"),u.setAttribute("min",0),u.setAttribute("max",1e3),u.setAttribute("value",v),u.className="form-control";break;case"text":case"key":case"query":case"condition":case"command":case"body":(u=document.createElement("textarea")).innerHTML=v,u.className="form-control";break;case"sms_text":(u=document.createElement("textarea")).innerHTML=v,u.className="form-control",u.setAttribute("maxlength","160");break;default:(u=document.createElement("input")).setAttribute("value",v),u.className="form-control"}u.setAttribute("id",g);var f=i.createDiv("col-sm-8");if(f.appendChild(u),mxResources.get("help_"+p)){var A=i.createDiv("p");A.className="help-block",mxUtils.write(A,mxResources.get("help_"+p)),f.appendChild(A)}h.appendChild(f),c.appendChild(h)}n.appendChild(c);var E=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(e){for(var t=0;t<o.value.attributes.length;t++){var n="_"+o.value.attributes[t].name,a=o.value.attributes[t].name;o.setAttribute(a,document.getElementById(n).value)}s.refresh(o),i.hideDialog()}));E.className="btn blue";var y=mxUtils.button(mxResources.get("cancel"),function(){i.hideDialog()});y.className="btn default",a.appendChild(E),a.appendChild(y),e.appendChild(t),e.appendChild(n),e.appendChild(a),this.container=e}Editor=function(){mxEventSource.call(this),this.init(),this.initStencilRegistry(),this.graph=new Graph,this.outline=new mxOutline(this.graph),this.outline.updateOnPan=!0,this.undoManager=this.createUndoManager(),this.status="",this.filename=null,this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[counter])+".xml"},this.getFilename=function(){return this.filename},this.setStatus=function(e){this.status=e,this.fireEvent(new mxEventObject("statusChanged"))},this.getStatus=function(){return this.status},this.modified=!1,this.graphChangeListener=function(){this.modified=!0},this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)})),window.onbeforeunload=mxUtils.bind(this,function(){if(this.modified)return mxResources.get("allChangesLost")}),this.graph.resetViewOnRootChange=!1,this.graph.scrollbars=!0,this.graph.background=null},mxUtils.extend(Editor,mxEventSource),Editor.prototype.gridImage=IMAGE_PATH+"/grid.gif",Editor.prototype.transparentImage=IMAGE_PATH+"/transparent.gif",Editor.prototype.setGraphXml=function(e){var t=new mxCodec(e.ownerDocument);if("mxGraphModel"==e.nodeName){this.graph.view.scale=Number(e.getAttribute("scale")||1),this.graph.gridEnabled="0"!=e.getAttribute("grid"),this.graph.graphHandler.guidesEnabled="0"!=e.getAttribute("guides"),this.graph.setTooltips("0"!=e.getAttribute("tooltips")),this.graph.setConnectable("0"!=e.getAttribute("connect")),this.graph.foldingEnabled="0"!=e.getAttribute("fold"),this.graph.scrollbars="0"!=e.getAttribute("scrollbars"),this.graph.scrollbars||(this.graph.container.scrollLeft=0,this.graph.container.scrollTop=0,this.graph.view.translate.x=Number(e.getAttribute("dx")||0),this.graph.view.translate.y=Number(e.getAttribute("dy")||0)),this.graph.pageVisible="1"==e.getAttribute("page"),this.graph.pageBreaksVisible=this.graph.pageVisible,this.graph.preferPageSize=this.graph.pageBreaksVisible;var n=e.getAttribute("pageScale");this.graph.pageScale=null!=n?n:1.5;var a=e.getAttribute("pageWidth"),i=e.getAttribute("pageHeight");null!=a&&null!=i&&(this.graph.pageFormat=new mxRectangle(0,0,parseFloat(a),parseFloat(i)),this.outline.outline.pageFormat=this.graph.pageFormat);var o=e.getAttribute("background");null!=o&&0<o.length&&(this.graph.background=o),t.decode(e,this.graph.getModel()),this.updateGraphComponents()}},Editor.prototype.getGraphXml=function(){var e=new mxCodec(mxUtils.createXmlDocument()).encode(this.graph.getModel());return 0==this.graph.view.translate.x&&0==this.graph.view.translate.y||(e.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),e.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100)),1!=this.graph.view.scale&&e.setAttribute("scale",Math.round(1e3*this.graph.view.scale)/1e3),e.setAttribute("grid",this.graph.isGridEnabled()?"1":"0"),e.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0"),e.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0"),e.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0"),e.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0"),e.setAttribute("fold",this.graph.foldingEnabled?"1":"0"),e.setAttribute("page",this.graph.pageVisible?"1":"0"),e.setAttribute("pageScale",this.graph.pageScale),e.setAttribute("pageWidth",this.graph.pageFormat.width),e.setAttribute("pageHeight",this.graph.pageFormat.height),this.graph.scrollbars||e.setAttribute("scrollbars","0"),null!=this.graph.background&&e.setAttribute("background",this.graph.background),e},Editor.prototype.updateGraphComponents=function(){var e=this.graph,t=this.outline;if(null!=e.container&&null!=t.outline.container){null!=e.background?"none"==e.background?e.container.style.backgroundColor="transparent":(null!=e.view.backgroundPageShape&&(e.view.backgroundPageShape.fill=e.background,e.view.backgroundPageShape.reconfigure()),e.container.style.backgroundColor=e.background):e.container.style.backgroundColor="",e.pageVisible?(e.container.style.backgroundColor="#ebebeb",e.container.style.borderStyle="solid",e.container.style.borderColor="#e5e5e5",e.container.style.borderTopWidth="1px",e.container.style.borderLeftWidth="1px",e.container.style.borderRightWidth="0px",e.container.style.borderBottomWidth="0px"):e.container.style.border="",t.outline.container.style.backgroundColor=e.container.style.backgroundColor,t.outline.pageVisible==e.pageVisible&&t.outline.pageScale==e.pageScale||(t.outline.pageScale=e.pageScale,t.outline.pageVisible=e.pageVisible,t.outline.view.validate()),e.scrollbars&&"hidden"==e.container.style.overflow&&!touchStyle?e.container.style.overflow="auto":e.scrollbars&&!touchStyle||(e.container.style.overflow="hidden");var n=mxClient.IS_IE&&9<=document.documentMode?"url("+this.transparentImage+")":"none";e.container.style.backgroundImage=!e.pageVisible&&e.isGridEnabled()?"url("+this.gridImage+")":n,null!=e.view.backgroundPageShape&&(e.view.backgroundPageShape.node.style.backgroundImage=this.graph.isGridEnabled()?"url("+this.gridImage+")":"none")}},Editor.prototype.init=function(){mxClient.IS_IE6&&mxClient.link("stylesheet",CSS_PATH+"/grapheditor-ie6.css"),mxResources.loadDefaultBundle=!1,mxResources.add(RESOURCE_BASE),mxConstants.DEFAULT_HOTSPOT=.3;var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var n=e.apply(this,arguments);return n.intersects=mxUtils.bind(this,function(e,t){return!!this.isConnecting()||mxCellMarker.prototype.intersects.apply(n,arguments)}),n},mxConstants.SHADOWCOLOR="#d0d0d0",mxConstants.HANDLE_FILLCOLOR="#99ccff",mxConstants.HANDLE_STROKECOLOR="#0088cf",mxConstants.VERTEX_SELECTION_COLOR="#00a8ff",mxConstants.OUTLINE_COLOR="#00a8ff",mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff",mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff",mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff",mxConstants.EDGE_SELECTION_COLOR="#00a8ff",mxConstants.DEFAULT_VALID_COLOR="#00a8ff",mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff",mxConstants.GUIDE_COLOR="#0088cf",mxGraph.prototype.pageBreakColor="#c0c0c0",mxGraph.prototype.pageScale=1,mxRubberband.prototype.defaultOpacity=30,mxGraphView.prototype.createBackgroundPageShape=function(e){return new mxRectangleShape(e,this.graph.background||"white","#cacaca")},mxGraphView.prototype.getBackgroundPageBounds=function(){var e=this.getGraphBounds(),t=0<e.width?e.x/this.scale-this.translate.x:0,n=0<e.height?e.y/this.scale-this.translate.y:0,a=e.width/this.scale,i=e.height/this.scale,o=this.graph.pageFormat,s=this.graph.pageScale,r=o.width*s,l=o.height*s,d=Math.floor(Math.min(0,t)/r),c=Math.floor(Math.min(0,n)/l),m=Math.ceil(Math.max(1,t+a)/r)-d,u=Math.ceil(Math.max(1,n+i)/l)-c;return new mxRectangle(this.scale*(this.translate.x+d*r),this.scale*(this.translate.y+c*l),this.scale*m*r,this.scale*u*l)};var n=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(e,t){n.apply(this,arguments),this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=e+"px",this.view.backgroundPageShape.node.style.marginTop=t+"px")};var a=this;mxGraphView.prototype.validateBackground=function(){var e=this.graph.getBackgroundImage();if(null!=e){if(null==this.backgroundImage||this.backgroundImage.image!=e.src){null!=this.backgroundImage&&this.backgroundImage.destroy();var t=new mxRectangle(0,0,1,1);this.backgroundImage=new mxImageShape(t,e.src),this.backgroundImage.dialect=this.graph.dialect,this.backgroundImage.init(this.backgroundPane),this.backgroundImage.redraw()}this.redrawBackgroundImage(this.backgroundImage,e)}else null!=this.backgroundImage&&(this.backgroundImage.destroy(),this.backgroundImage=null);if(this.graph.pageVisible){t=this.getBackgroundPageBounds();null==this.backgroundPageShape?(this.backgroundPageShape=this.createBackgroundPageShape(t),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(this.graph.container),this.graph.container.firstChild.style.position="absolute",this.graph.container.insertBefore(this.backgroundPageShape.node,this.graph.container.firstChild),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",this.backgroundPageShape.node.style.backgroundPosition="-1px -1px",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(e){this.graph.dblClick(e)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(e){this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e))}),mxUtils.bind(this,function(e){null!=this.graph.tooltipHandler&&this.graph.tooltipHandler.isHideOnHover()&&this.graph.tooltipHandler.hide(),this.graph.isMouseDown&&!mxEvent.isConsumed(e)&&this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e))}),mxUtils.bind(this,function(e){this.graph.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e))}))):(this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=t,this.backgroundPageShape.redraw()),this.backgroundPageShape.node.style.backgroundImage=this.graph.isGridEnabled()?"url("+a.gridImage+")":"none"}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null)},mxGraph.prototype.updatePageBreaks=function(e,t,n){var a=this.view.scale,i=this.view.translate,o=this.pageFormat,s=a*this.pageScale,r=this.view.getBackgroundPageBounds();t=r.width,n=r.height;var l=new mxRectangle(a*i.x,a*i.y,o.width*s,o.height*s),d=(e=e&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(t/l.width)-1:0,c=e?Math.ceil(n/l.height)-1:0,m=r.x+t,u=r.y+n;if(null==this.horizontalPageBreaks&&0<d&&(this.horizontalPageBreaks=[]),null!=this.horizontalPageBreaks){for(var p=0;p<=d;p++){var g=[new mxPoint(r.x+(p+1)*l.width,r.y),new mxPoint(r.x+(p+1)*l.width,u)];if(null!=this.horizontalPageBreaks[p])this.horizontalPageBreaks[p].scale=1,this.horizontalPageBreaks[p].points=g,this.horizontalPageBreaks[p].redraw();else(v=new mxPolyline(g,this.pageBreakColor,this.scale)).dialect=this.dialect,v.isDashed=this.pageBreakDashed,v.addPipe=!1,v.scale=a,v.init(this.view.backgroundPane),v.redraw(),this.horizontalPageBreaks[p]=v}for(p=d;p<this.horizontalPageBreaks.length;p++)this.horizontalPageBreaks[p].destroy();this.horizontalPageBreaks.splice(d,this.horizontalPageBreaks.length-d)}if(null==this.verticalPageBreaks&&0<c&&(this.verticalPageBreaks=[]),null!=this.verticalPageBreaks){for(p=0;p<=c;p++){var v;g=[new mxPoint(r.x,r.y+(p+1)*l.height),new mxPoint(m,r.y+(p+1)*l.height)];if(null!=this.verticalPageBreaks[p])this.verticalPageBreaks[p].scale=1,this.verticalPageBreaks[p].points=g,this.verticalPageBreaks[p].redraw();else(v=new mxPolyline(g,this.pageBreakColor,a)).dialect=this.dialect,v.isDashed=this.pageBreakDashed,v.addPipe=!1,v.scale=a,v.init(this.view.backgroundPane),v.redraw(),this.verticalPageBreaks[p]=v}for(p=c;p<this.verticalPageBreaks.length;p++)this.verticalPageBreaks[p].destroy();this.verticalPageBreaks.splice(c,this.verticalPageBreaks.length-c)}},mxEdgeHandler.prototype.snapToTerminals=!0,mxGraphHandler.prototype.guidesEnabled=!0;var o=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(e,t,n){for(var a=0;a<t.length;a++)if(this.graph.getModel().isVertex(t[a])){var i=this.graph.getCellGeometry(t[a]);if(null!=i&&i.relative)return!1}return o.apply(this,arguments)},mxGuide.prototype.isEnabledForEvent=function(e){return!mxEvent.isAltDown(e)};var r=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,t,n,a,i,o){var s=r.apply(this,arguments);return null==o||o||mxEvent.addListener(s,"mousedown",function(e){mxEvent.consume(e)}),s};var s=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(e){var t=this.graph.getModel(),n=t.getParent(this.graph.getSelectionCell()),a=s.apply(this,arguments),i=t.getParent(a);if(null==n||n!=a&&n!=i)for(;!this.graph.isCellSelected(a)&&!this.graph.isCellSelected(i)&&t.isVertex(i)&&!this.graph.isValidRoot(i);)a=i,i=this.graph.getModel().getParent(a);return a};var l=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(e){var t=l.apply(this,arguments),n=this.graph.getModel(),a=n.getParent(this.graph.getSelectionCell()),i=n.getParent(e);return(null==a||a!=e&&a!=i)&&(this.graph.isCellSelected(e)||!n.isVertex(i)||this.graph.isValidRoot(i)||(t=!0)),t},mxGraphHandler.prototype.selectDelayed=function(e){var t=e.getCell();null==t&&(t=this.cell);for(var n=this.graph.getModel(),a=n.getParent(t);this.graph.isCellSelected(t)&&n.isVertex(a)&&!this.graph.isValidRoot(a);)t=a,a=n.getParent(t);this.graph.selectCellForEvent(t,e.getEvent())},mxPanningHandler.prototype.getCellForPopupEvent=function(e){for(var t=e.getCell(),n=this.graph.getModel(),a=n.getParent(t);n.isVertex(a)&&!this.graph.isValidRoot(a);)this.graph.isCellSelected(a)&&(t=a),a=n.getParent(a);return t}},Editor.prototype.createUndoManager=function(){var o=this.graph,n=new mxUndoManager,e=function(e,t){n.undoableEditHappened(t.getProperty("edit"))};o.getModel().addListener(mxEvent.UNDO,e),o.getView().addListener(mxEvent.UNDO,e);var t=function(e,t){for(var n=o.getSelectionCellsForChanges(t.getProperty("edit").changes),a=[],i=1;i<n.length;i++)null!=o.view.getState(n[i])&&a.push(n[i]);o.setSelectionCells(a)};return n.addListener(mxEvent.UNDO,t),n.addListener(mxEvent.REDO,t),n},Editor.prototype.initStencilRegistry=function(){mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/general.xml")},mxStencilRegistry.libraries={},mxStencilRegistry.packages=[],mxStencilRegistry.getStencil=function(e){var t=mxStencilRegistry.stencils[e];if(null==t){var n=mxStencilRegistry.getBasenameForStencil(e);if(null!=n){var a=mxStencilRegistry.libraries[n];if(null!=a){if(null==mxStencilRegistry.packages[n]){mxStencilRegistry.packages[n]=1;for(var i=0;i<a.length;i++){var o=a[i];if(".xml"==o.toLowerCase().substring(o.length-4,o.length))mxStencilRegistry.loadStencilSet(o,null);else if(".js"==o.toLowerCase().substring(o.length-3,o.length)){var s=mxUtils.load(o);null!=s&&eval.call(window,s.getText())}}}}else mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+n+".xml",null);t=mxStencilRegistry.stencils[e]}}return t},mxStencilRegistry.getBasenameForStencil=function(e){var t=e.split("."),n=null;if(0<t.length&&"mxgraph"==t[0]){n=t[1];for(var a=2;a<t.length-1;a++)n+="/"+t[a]}return n},mxStencilRegistry.loadStencilSet=function(e,t,n){n=null!=n&&n;var a=mxStencilRegistry.packages[e];if(n||null==a){var i=!1;null==a&&(a=mxUtils.load(e).getXml(),mxStencilRegistry.packages[e]=a,i=!0),mxStencilRegistry.parseStencilSet(a,t,i)}},mxStencilRegistry.parseStencilSet=function(e,t,n){n=null==n||n;var a=e.documentElement,i=a.firstChild,o="",s=a.getAttribute("name");for(null!=s&&(o=s+".");null!=i;){if(i.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=(s=i.getAttribute("name"))){o=o.toLowerCase();var r=s.replace(/ /g,"_");if(n&&mxStencilRegistry.addStencil(o+r.toLowerCase(),new mxStencil(i)),null!=t){var l=i.getAttribute("w"),d=i.getAttribute("h");t(o,r,s,l=null==l?80:parseInt(l,10),d=null==d?80:parseInt(d,10))}}i=i.nextSibling}},OpenFile=function(e){this.producer=null,this.consumer=null,this.done=e},OpenFile.prototype.setConsumer=function(e){this.consumer=e,this.execute()},OpenFile.prototype.setData=function(e,t){this.data=e,this.filename=t,this.execute()},OpenFile.prototype.error=function(e){this.cancel(),mxUtils.alert(e)},OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.data&&(this.consumer(this.data,this.filename),this.cancel())},OpenFile.prototype.cancel=function(){null!=this.done&&this.done()},Sidebar.prototype.init=function(){var e=STENCIL_PATH;this.addSearchPalette(!0),this.addImagePalette("entry",mxResources.get("entry"),e+"/entry/","_128x128.png",["start","finally","end"],[mxResources.get("start"),mxResources.get("finally"),mxResources.get("end")]),this.addImagePalette("call_management",mxResources.get("call_management"),e+"/call_management/","_128x128.png",["answer","hangup","dial","ext_dial","queue","voicemail","callback"],[mxResources.get("answer"),mxResources.get("hangup"),mxResources.get("dial"),mxResources.get("ext_dial"),mxResources.get("queue"),mxResources.get("voicemail"),mxResources.get("callback")]),this.addImagePalette("agent_management",mxResources.get("agent_management"),e+"/agent_management/","_128x128.png",["login","pause","unpause","logout"],[mxResources.get("login"),mxResources.get("pause"),mxResources.get("unpause"),mxResources.get("logout")]),this.addImagePalette("variable",mxResources.get("variable"),e+"/variable/","_128x128.png",["set","math"],[mxResources.get("set"),mxResources.get("math")]),this.addImagePalette("playback",mxResources.get("playback"),e+"/playback/","_128x128.png",["playback","menu","saydigits","saynumber","sayphonetic","getdigits","getsecretdigits"],[mxResources.get("playback"),mxResources.get("menu"),mxResources.get("saydigits"),mxResources.get("saynumber"),mxResources.get("sayphonetic"),mxResources.get("getdigits"),mxResources.get("getsecretdigits")]),this.addImagePalette("recording",mxResources.get("recording"),e+"/recording/","_128x128.png",["record"],[mxResources.get("record")]),this.addImagePalette("tts","TTS",e+"/tts/","_128x128.png",["tts","ispeechtts","awspolly","lumenvoxtts"],["GoogleTTS","ISpeechTTS","AWSPolly","LumenvoxTTS"]),this.addImagePalette("asr","ASR",e+"/asr/","_128x128.png",["googleasr","ispeechasr","lumenvoxasr","tildeasr"],["GoogleASR","ISpeechASR","LumenvoxASR","TildeASR"]),this.addImagePalette("integrationServer",mxResources.get("integrationServer"),e+"/integration_server/","_128x128.png",["database","sendMail","sendSMS"],[mxResources.get("database"),mxResources.get("sendMail"),mxResources.get("sendSMS")]),this.addImagePalette("callflow",mxResources.get("callflow"),e+"/callflow/","_128x128.png",["gotoc","gotoif","gotoiftime","vswitch"],[mxResources.get("gotoc"),mxResources.get("gotoif"),mxResources.get("gotoiftime"),mxResources.get("vswitch")]),this.addImagePalette("stats",mxResources.get("stats"),e+"/stats/","_128x128.png",["goal"],[mxResources.get("goal")]),this.addImagePalette("general",mxResources.get("general"),e+"/general/","_128x128.png",["noop","system","agi","subproject","custom_app"],[mxResources.get("noop"),mxResources.get("system"),mxResources.get("agi"),mxResources.get("subproject"),mxResources.get("custom_app")])},Sidebar.prototype.collapsedImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQANAIABAJmZmf///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozNUQyRTJFNjZGNUYxMUU1QjZEOThCNDYxMDQ2MzNCQiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDozNUQyRTJFNzZGNUYxMUU1QjZEOThCNDYxMDQ2MzNCQiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjFERjc3MEUxNkY1RjExRTVCNkQ5OEI0NjEwNDYzM0JCIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjFERjc3MEUyNkY1RjExRTVCNkQ5OEI0NjEwNDYzM0JCIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAQAsAAAAAA0ADQAAAhSMj6lrwAjcC1GyahV+dcZJgeIIFgA7":IMAGE_PATH+"/collapsed.gif",Sidebar.prototype.expandedImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQANAIABAJmZmf///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxREY3NzBERjZGNUYxMUU1QjZEOThCNDYxMDQ2MzNCQiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxREY3NzBFMDZGNUYxMUU1QjZEOThCNDYxMDQ2MzNCQiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjFERjc3MERENkY1RjExRTVCNkQ5OEI0NjEwNDYzM0JCIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjFERjc3MERFNkY1RjExRTVCNkQ5OEI0NjEwNDYzM0JCIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAQAsAAAAAA0ADQAAAhGMj6nL3QAjVHIu6azbvPtWAAA7":IMAGE_PATH+"/expanded.gif",Sidebar.prototype.tooltipImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAbCAMAAAB7jU7LAAAACVBMVEX///+ZmZn///9Y2COLAAAAA3RSTlP//wDXyg1BAAAAOElEQVR42mXQMQ4AMAgDsWv//+iutcJmIQSk+9dJpVKpVCqVSqVSqZTdncWzF8/NeP7FkxWenPEDOnUBiL3jWx0AAAAASUVORK5CYII=":IMAGE_PATH+"/tooltip.png",Sidebar.prototype.searchImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAEaSURBVHjabNGxS5VxFIfxz71XaWuQUJCG/gCHhgTD9VpEETg4aMOlQRp0EoezObgcd220KQiXmpretTAHQRBdojlQEJyukPdt+b1ywfvAGc7wnHP4nlZd1yKijQW8xzNc4Su+ZOYfQ3T6/f4YNvEJYzjELXp4VVXVz263+7cR2niBxAFeZ2YPi3iHR/gYERPDwhpOsd6sz8x/mfkNG3iOlWFhFj8y89J9KvzGXER0GuEaD42mgwHqUtoljbcRsTBCeINpfM/MgZLKPpaxFxGbOCqDXmILN7hoJrTKH+axhxmcYRxP0MIDnOBDZv5q1XUNIuJxifJp+UNV7t7BFM6xeic0RMQ4Bpl5W/ol7GISx/eEUUTECrbx+f8A8xhiZht9zsgAAAAASUVORK5CYII=":IMAGE_PATH+"/search.png",Sidebar.prototype.enableTooltips=!0,Sidebar.prototype.tooltipBorder=16,Sidebar.prototype.tooltipDelay=300,Sidebar.prototype.dropTargetDelay=200,Sidebar.prototype.thumbWidth=36,Sidebar.prototype.thumbHeight=36,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2,Sidebar.prototype.sidebarTitleSize=9,Sidebar.prototype.sidebarTitles=!1,Sidebar.prototype.tooltipTitles=!0,Sidebar.prototype.maxTooltipWidth=400,Sidebar.prototype.maxTooltipHeight=400,Sidebar.prototype.addStencilsToIndex=!0,Sidebar.prototype.defaultImageWidth=80,Sidebar.prototype.defaultImageHeight=80,Sidebar.prototype.getOffset=function(e){return{left:(e=e.getBoundingClientRect()).left+window.scrollX,top:e.top+window.scrollY}},Sidebar.prototype.showTooltip=function(c,m,u,p,g,v){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=c){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var e=mxUtils.bind(this,function(){null==this.tooltip&&(this.tooltip=document.createElement("div"),this.tooltip.className="geSidebarTooltip",this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1,document.body.appendChild(this.tooltip),this.graph2=new Graph(this.tooltip,null,null,this.editorUi.editor.graph.getStylesheet()),this.graph2.resetViewOnRootChange=!1,this.graph2.foldingEnabled=!1,this.graph2.gridEnabled=!1,this.graph2.autoScroll=!1,this.graph2.setTooltips(!1),this.graph2.setConnectable(!1),this.graph2.setEnabled(!1),mxClient.IS_SVG||(this.graph2.view.canvas.style.position="relative"),this.tooltipImage=mxUtils.createImage(this.tooltipImage),this.tooltipImage.className="geSidebarTooltipImage",this.tooltipImage.style.zIndex=mxPopupMenu.prototype.zIndex-1,this.tooltipImage.style.position="absolute",this.tooltipImage.style.width="14px",this.tooltipImage.style.height="27px",document.body.appendChild(this.tooltipImage)),this.graph2.model.clear(),this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder),u>this.maxTooltipWidth||p>this.maxTooltipHeight?this.graph2.view.scale=Math.round(100*Math.min(this.maxTooltipWidth/u,this.maxTooltipHeight/p))/100:this.graph2.view.scale=1,this.tooltip.style.display="block",this.graph2.labelsVisible=null==v||v,this.graph2.addCells(m);var e=this.graph2.getGraphBounds(),t=e.width+2*this.tooltipBorder+4,n=e.height+2*this.tooltipBorder;if(mxClient.IS_QUIRKS?(n+=4,this.tooltip.style.overflow="hidden"):this.tooltip.style.overflow="visible",this.tooltipImage.style.visibility="visible",this.tooltip.style.width=t+"px",this.tooltipTitles&&null!=g&&0<g.length){null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.style.borderTop="1px solid gray",this.tooltipTitle.style.textAlign="center",this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",mxClient.IS_SVG||(this.tooltipTitle.style.position="absolute"),this.tooltipTitle.style.paddingTop="6px",this.tooltip.appendChild(this.tooltipTitle)):this.tooltipTitle.innerHTML="",this.tooltipTitle.style.display="",mxUtils.write(this.tooltipTitle,g);var a=this.tooltipTitle.offsetHeight+10;n+=a,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-a+"px":(n-=6,this.tooltipTitle.style.top=n-a+"px")}else null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");this.tooltip.style.height=n+"px";var i=-Math.round(e.x-this.tooltipBorder),o=-Math.round(e.y-this.tooltipBorder),s=document.body,r=document.documentElement,l=(s.clientHeight||r.clientHeight,document.getElementById("vertical-navigation").offsetWidth+this.container.clientWidth),d=Math.max(0,this.getOffset(c).top-this.container.scrollTop-n/2+16);mxClient.IS_SVG?0!=i||0!=o?this.graph2.view.canvas.setAttribute("transform","translate("+i+","+o+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=i+"px",this.graph2.view.drawPane.style.top=o+"px"),this.tooltip.style.position="absolute",this.tooltip.style.left=l+"px",this.tooltip.style.top=d+"px",this.tooltipImage.style.left=l-13+"px",this.tooltipImage.style.top=d+n/2-13+"px"});null!=this.tooltip&&"none"!=this.tooltip.style.display?e():this.thread=window.setTimeout(e,this.tooltipDelay),this.currentElt=c}},Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null),null!=this.tooltip&&(this.tooltip.style.display="none",this.tooltipImage.style.visibility="hidden",this.currentElt=null)},Sidebar.prototype.addEntry=function(e,t){if(null!=this.taglist&&null!=e&&0<e.length)for(var n=e.toLowerCase().replace(/[\/\,\(\)]/g," ").split(" "),a=0;a<n.length;a++)if(n[a]=n[a].replace(/\.*\d*$/,""),1<n[a].length){var i=this.taglist[n[a]];null==i&&(i={entries:[],dict:new mxDictionary},this.taglist[n[a]]=i),null==i.dict.get(t)&&(i.dict.put(t,t),i.entries.push(t))}return t},Sidebar.prototype.searchEntries=function(e,t,n,a,i){if(null!=this.taglist&&null!=e){for(var o=e.toLowerCase().split(" "),s=new mxDictionary,r=(n+1)*t,l=[],d=0,c=0;c<o.length;c++)if(0<o[c].length){var m=this.taglist[o[c]],u=new mxDictionary;if(null!=m){var p=m.entries;l=[];for(var g=0;g<p.length;g++){m=p[g];if(0==d==(null==s.get(m))&&(u.put(m,m),l.push(m),c==o.length-1&&l.length==r))return void a(l.slice(n*t,r),r,!0)}}else l=[];s=u,d++}var v=l.length;a(l.slice(n*t,(n+1)*t),v,!1)}else a([])},Sidebar.prototype.filterTags=function(e){if(null!=e){for(var t=e.split(" "),n=[],a={},i=0;i<t.length;i++)null==a[t[i]]&&(a[t[i]]="1",n.push(t[i]));return n.join(" ")}return null},Sidebar.prototype.cloneCell=function(e,t){var n=e.clone();return null!=t&&(n.value=t),n},Sidebar.prototype.addSearchPalette=function(e){var t=document.createElement("div");t.style.visibility="hidden",this.container.appendChild(t);var r=document.createElement("div");r.className="geSidebar",r.style.boxSizing="border-box",r.style.overflow="hidden",r.style.width="100%",r.style.padding="8px",r.style.paddingTop="14px",r.style.paddingBottom="0px",e||(r.style.display="none");var n=document.createElement("div");n.style.whiteSpace="nowrap",n.style.textOverflow="clip",n.style.paddingBottom="8px",n.style.cursor="default";var a=document.createElement("input");a.setAttribute("placeholder",mxResources.get("searchShapes")),a.setAttribute("type","text"),a.style.fontSize="12px",a.style.overflow="hidden",a.style.boxSizing="border-box",a.style.border="solid 1px #d5d5d5",a.style.borderRadius="4px",a.style.width="100%",a.style.outline="none",a.style.padding="6px",n.appendChild(a);var i,o=document.createElement("img");o.setAttribute("src",Sidebar.prototype.searchImage),o.setAttribute("title",mxResources.get("search")),o.style.position="relative",o.style.left="-18px",mxClient.IS_QUIRKS?(a.style.height="28px",o.style.top="-4px"):o.style.top="2px",o.style.background="url('"+this.editorUi.editor.transparentImage+"')",n.appendChild(o),r.appendChild(n);var l=document.createElement("center"),d=mxUtils.button(mxResources.get("moreResults"),function(){i()});d.style.display="none",d.style.lineHeight="normal",d.style.marginTop="4px",d.style.marginBottom="8px",l.style.paddingTop="4px",l.style.paddingBottom="8px",l.appendChild(d),r.appendChild(l);var c="",m=!1,u=!1,p=0,g=new Object,v=12,h=mxUtils.bind(this,function(){m=!1,this.currentSearch=null;for(var e=r.firstChild;null!=e;){var t=e.nextSibling;e!=n&&e!=l&&e.parentNode.removeChild(e),e=t}});i=mxUtils.bind(this,function(){if(v=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10))),this.hideTooltip(),""!=a.value){if(null!=l.parentNode&&(c!=a.value&&(h(),c=a.value,g=new Object,u=!1,p=0),!m&&!u)){d.setAttribute("disabled","true"),d.style.display="",d.style.cursor="wait",d.innerHTML=mxResources.get("loading")+"...",m=!0;var s=new Object;this.currentSearch=s,this.searchEntries(c,v,p,mxUtils.bind(this,function(e,t,n){if(this.currentSearch==s){e=null!=e?e:[],m=!1,p++,l.parentNode.removeChild(l);for(var a=0;a<e.length;a++){var i=e[a]();null==g[i.innerHTML]&&(g[i.innerHTML]="1",r.appendChild(e[a]()))}if(n?(d.removeAttribute("disabled"),d.innerHTML=mxResources.get("moreResults")):(d.innerHTML=mxResources.get("reset"),d.style.display="none",u=!0),d.style.cursor="",0==e.length&&1==p){var o=document.createElement("div");o.className="geTitle",o.style.backgroundColor="transparent",o.style.borderColor="transparent",o.style.color="gray",o.style.padding="0px",o.style.margin="0px 8px 0px 8px",o.style.paddingTop="6px",o.style.textAlign="center",o.style.cursor="default",mxUtils.write(o,mxResources.get("noResultsFor",[c])),r.appendChild(o)}r.appendChild(l)}}),mxUtils.bind(this,function(){d.style.cursor=""}))}}else h(),a.value="",c="",g=new Object,d.style.display="none",u=!1,a.focus()}),mxEvent.addListener(a,"keydown",mxUtils.bind(this,function(e){13==e.keyCode&&i()})),mxEvent.addListener(a,"focus",function(){a.style.paddingRight="",o.style.display="none"}),mxEvent.addListener(a,"blur",function(){a.style.paddingRight="20px",o.style.display=""}),a.style.paddingRight="20px",mxEvent.addListener(a,"keyup",mxUtils.bind(this,function(e){""==a.value?(u=!0,d.style.display="none"):a.value!=c?(d.style.display="none",u=!1):m||(d.style.display=u?"none":"")})),mxEvent.addListener(a,"mousedown",function(e){e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0}),mxEvent.addListener(a,"selectstart",function(e){e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0});var s=document.createElement("div");s.appendChild(r),this.container.appendChild(s),this.palettes.search=[t,s]},Sidebar.prototype.createTitle=function(e){var t=document.createElement("a");return t.setAttribute("href","javascript:void(0);"),t.setAttribute("title",mxResources.get("sidebarTooltip")),t.className="geTitle",mxUtils.write(t,e),t},Sidebar.prototype.createThumb=function(e,t,n,a,i,o,s,r,l){this.graph.labelsVisible=null==o||o;var d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject,this.graph.view.scaleAndTranslate(1,0,0),this.graph.addCells(e);var c=this.graph.getGraphBounds(),m=Math.floor(100*Math.min((t-2*this.thumbBorder)/c.width,(n-2*this.thumbBorder)/c.height))/100;this.graph.view.scaleAndTranslate(m,Math.floor((t-c.width*m)/2/m-c.x),Math.floor((n-c.height*m)/2/m-c.y));var u=null;if(this.graph.dialect!=mxConstants.DIALECT_SVG||mxClient.NO_FO?(u=this.graph.container.cloneNode(!1)).innerHTML=this.graph.container.innerHTML:u=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0),this.graph.getModel().clear(),mxClient.NO_FO=d,mxClient.IS_IE6&&(a.style.backgroundImage="url("+this.editorUi.editor.transparentImage+")"),u.style.position="relative",u.style.overflow="hidden",u.style.cursor="move",u.style.left=this.thumbBorder+"px",u.style.top=this.thumbBorder+"px",u.style.width=t+"px",u.style.height=n+"px",u.style.visibility="",u.style.minWidth="",u.style.minHeight="",a.appendChild(u),this.sidebarTitles&&null!=i&&0!=s){var p=mxClient.IS_QUIRKS?2*this.thumbPadding+2:0;a.style.height=this.thumbHeight+p+this.sidebarTitleSize+8+"px";var g=document.createElement("div");g.style.fontSize=this.sidebarTitleSize+"px",g.style.color="#303030",g.style.textAlign="center",g.style.whiteSpace="nowrap",mxClient.IS_IE&&(g.style.height=this.sidebarTitleSize+12+"px"),g.style.paddingTop="4px",mxUtils.write(g,i),a.appendChild(g)}return c},Sidebar.prototype.createItem=function(t,n,a,e,i,o,s){var r=document.createElement("a");r.setAttribute("href","javascript:void(0);"),r.className="geItem",r.style.overflow="hidden";var l=mxClient.IS_QUIRKS?8+2*this.thumbPadding:2*this.thumbBorder;r.style.width=this.thumbWidth+l+"px",r.style.height=this.thumbHeight+l+"px",r.style.padding=this.thumbPadding+"px",mxEvent.addListener(r,"click",function(e){mxEvent.consume(e)}),this.createThumb(t,this.thumbWidth,this.thumbHeight,r,n,a,e,i,o);var d=new mxRectangle(0,0,i,o);if(1<t.length||t[0].vertex){var c=this.createDragSource(r,this.createDropHandler(t,!0,s,d),this.createDragPreview(i,o),t,d);this.addClickHandler(r,c,t),c.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})}else if(null!=t[0]&&t[0].edge){c=this.createDragSource(r,this.createDropHandler(t,!1,s,d),this.createDragPreview(i,o),t,d);this.addClickHandler(r,c,t)}return mxClient.IS_IOS||mxEvent.addGestureListeners(r,null,mxUtils.bind(this,function(e){this.showTooltip(r,t,d.width,d.height,n,a)})),r},Sidebar.prototype.createDropHandler=function(g,v,h,b){return h=null==h||h,mxUtils.bind(this,function(e,t,n,a,i){if(e.isEnabled()){if(0<(g=e.getImportableCells(g)).length){e.stopEditing();var o=null!=n&&e.isValidDropTarget(n,g,t),s=null;if(null==n||o||(n=null),!e.isCellLocked(n||e.getDefaultParent())){e.model.beginUpdate();try{if(a=Math.round(a),i=Math.round(i),v&&e.isSplitTarget(n,g,t)){var r=e.cloneCells(g);e.splitEdge(n,r,null,a-b.width/2,i-b.height/2),s=r}else 0<g.length&&(s=e.importCells(g,a,i,n));if(null!=e.layoutManager){var l=e.layoutManager.getLayout(n);if(null!=l)for(var d=e.view.scale,c=e.view.translate,m=(a+c.x)*d,u=(i+c.y)*d,p=0;p<s.length;p++)l.moveCell(s[p],m,u)}h&&e.fireEvent(new mxEventObject("cellsInserted","cells",s))}finally{e.model.endUpdate()}null!=s&&0<s.length&&(e.scrollCellToVisible(s[0]),e.setSelectionCells(s))}}mxEvent.consume(t)}})},Sidebar.prototype.createDragPreview=function(e,t){var n=document.createElement("div");return n.style.border="1px dashed black",n.style.width=e+"px",n.style.height=t+"px",n},Sidebar.prototype.createDragSource=function(e,t,n){var a=mxUtils.makeDraggable(e,this.editorUi.editor.graph,t,n,0,0,this.editorUi.editor.graph.autoscroll,!0,!0);return a.getDropTarget=function(e,t,n){var a=mxDragSource.prototype.getDropTarget.apply(this,arguments);return e.isValidRoot(a)||(a=null),a},a},Sidebar.prototype.addClickHandler=function(e,a){var i=this.editorUi.editor.graph,o=null;mxEvent.addGestureListeners(e,function(e){o=new mxPoint(mxEvent.getClientX(e),mxEvent.getClientY(e))});var s=a.mouseUp;a.mouseUp=function(e){if(!mxEvent.isPopupTrigger(e)&&null==this.currentGraph&&null!=o){var t=i.tolerance;if(Math.abs(o.x-mxEvent.getClientX(e))<=t&&Math.abs(o.y-mxEvent.getClientY(e))<=t){var n=i.getGridSize();a.drop(i,e,null,n,n)}}s.apply(this,arguments),o=null}},Sidebar.prototype.createVertexTemplateEntry=function(e,t,n,a,i,o,s,r){return r=null!=r&&0<r.length?r:i.toLowerCase(),this.addEntry(r,mxUtils.bind(this,function(){return this.createVertexTemplate(e,t,n,a,i,o,s)}))},Sidebar.prototype.createXmlDocument=function(e,t,n,a){var i=mxUtils.createXmlDocument().createElement(e);return i.setAttribute("label",t),n.forEach(function(e,t){i.setAttribute(e,a[t]?a[t]:"")}),i},Sidebar.prototype.createVertexTemplate=function(e,t,n,a,i,o,s,r){var l=[],d=[];switch(a){case"answer":l=["timeout"],d=["0"];break;case"start":l=["answer"],d=["yes"];break;case"googleasr":l=["key","google_asr_language","timeout","intKey","beep"],d=["","it-IT","10","#","BEEP"];break;case"tildeasr":l=["uri","appid","appsecret","timeout","intKey","beep"],d=["wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE","","","10","#","BEEP"];break;case"ispeechasr":l=["key","model","ispeech_asr_language","timeout","intKey","beep"],d=["","","it-IT","10","#","BEEP"];break;case"playback":l=["file_id","opts"],d=["0"];break;case"background":l=["file_id","response","digit"],d=["0","5","1"];break;case"menu":l=["file_id","response","digit","retry","variable_id"],d=["0","5","1","1","0"];break;case"getdigits":l=["file_id","response","mindigit","maxdigit","retry","variable_id"],d=["0","5","1","10","1","0"];break;case"getsecretdigits":l=["file_id","response","mindigit","maxdigit","retry","hiddendigitsnum","hiddendigitspos","variable_id"],d=["0","5","1","10","1","0","first","0"];break;case"custom_app":l=["application","options"],d=["",""];break;case"set":l=["variable_id","variable_value"],d=["0",""];break;case"database":l=["odbc_id","query","variable_id"],d=["0","",""];break;case"noop":l=["output"],d=[];break;case"gotoc":l=["context","extension","priority"],d=["","","1"];break;case"system":l=["variable_id","command"],d=[];break;case"agi":l=["command","args"],d=[];break;case"gotoif":l=["condition"],d=[];break;case"gotoiftime":l=["interval_id"],d=["0"];break;case"vswitch":l=["variable_id"],d=["0"];break;case"saydigits":l=["digits","escape_digits"],d=["","#"];break;case"saynumber":l=["number","escape_digits"],d=["","#"];break;case"sayphonetic":l=["text","escape_digits"],d=["","#"];break;case"record":l=["file","recordingFormat","timeout","escape_digits"],d=["","wav","-1","#"];break;case"dial":l=["sip_id","timeout","opts","url"],d=["0","60"];break;case"ext_dial":l=["phone","trunk_name","timeout","opts","url"],d=["","-1","60"];break;case"tts":l=["text","google_tts_language"],d=["","it"];break;case"ispeechtts":l=["text","key","ispeech_tts_language","speed","intKey"],d=["","","euritalianfemale","0","#"];break;case"lumenvoxtts":l=["text","options"],d=["",""];break;case"lumenvoxasr":l=["grammar","options"],d=["",""];break;case"awspolly":l=["aws_access_key_id","aws_secret_access_key","aws_polly_region","aws_polly_voice","text"],d=["","","eu-west-1","Amy",""];break;case"queue":l=["queue_id","opts","url","file_id","timeout","agi","macro","gosub","position"],d=["-1","xX","","","300"];break;case"voicemail":l=["mailbox","options"],d=["",""];break;case"subproject":l=["project_id"],d=["0"];break;case"math":l=["operation","variable_id"],d=["","0"];break;case"queuelog":l=["queuename","agent","queue_event","data1","data2","data3","data4","data5"],d=[];break;case"goal":l=["goalname"],d=[];break;case"callback":l=["name","lastName","phone","list_id","delay","callback_priority"],d=["{CALLERID(name)}","","{CALLERID(num)}","-1","5","2"];break;case"sendSMS":l=["sms_account_id","to","sms_text"],d=["0"];break;case"sendMail":l=["account_id","to","cc","bcc","subject","text"],d=["0"];break;case"sendFax":l=["account_id","to","choose_attachment","attachment_name","attachment_type","attachment_path"],d=["0"];break;case"login":case"unpause":case"logout":l=["findBy"],d=["internal"];break;case"pause":l=["findBy","pause_id"],d=["internal",""];break;default:l=[],d=[]}var c=[new mxCell(this.createXmlDocument(a,i,l,d),new mxGeometry(0,0,t,n),e)];return c[0].vertex=!0,this.createVertexTemplateFromCells(c,t,n,i,o,s,r)},Sidebar.prototype.createVertexTemplateFromCells=function(e,t,n,a,i,o,s){return this.createItem(e,a,i,o,t,n,s)},Sidebar.prototype.createEdgeTemplate=function(e,t,n,a,i,o,s){var r=new mxCell(null!=a?a:"",new mxGeometry(0,0,t,n),e);return r.geometry.setTerminalPoint(new mxPoint(0,n),!0),r.geometry.setTerminalPoint(new mxPoint(t,0),!1),r.geometry.relative=!0,r.edge=!0,this.createEdgeTemplateFromCells([r],t,n,i,o,s)},Sidebar.prototype.createEdgeTemplateFromCells=function(e,t,n,a,i,o){return this.createItem(e,a,i,!0,t,n,o)},Sidebar.prototype.addPaletteFunctions=function(e,t,n,a){this.addPalette(e,t,n,mxUtils.bind(this,function(e){for(var t=0;t<a.length;t++)e.appendChild(a[t](e))}))},Sidebar.prototype.addPalette=function(e,t,n,a){var i=this.createTitle(t);this.container.appendChild(i);var o=document.createElement("div");o.className="geSidebar",mxClient.IS_POINTER&&(o.style.touchAction="none"),mxEvent.addListener(o,"mousemove",mxUtils.bind(this,function(e){mxEvent.getSource(e)==o?o.setAttribute("title",mxResources.get("sidebarTooltip")):o.removeAttribute("title")})),n?(a(o),a=null):o.style.display="none",this.addFoldingHandler(i,o,a);var s=document.createElement("div");return s.appendChild(o),this.container.appendChild(s),null!=e&&(this.palettes[e]=[i,s]),o},Sidebar.prototype.addFoldingHandler=function(n,a,i){var o=!1;(!mxClient.IS_IE||8<=document.documentMode)&&(n.style.backgroundImage="none"==a.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')"),n.style.backgroundRepeat="no-repeat",n.style.backgroundPosition="0% 50%",mxEvent.addListener(n,"click",mxUtils.bind(this,function(e){if("none"==a.style.display){if(o)a.style.display="block";else if(o=!0,null!=i){n.style.cursor="wait";var t=n.innerHTML;n.innerHTML=mxResources.get("loading")+"...",window.setTimeout(function(){var e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject,i(a),mxClient.NO_FO=e,a.style.display="block",n.style.cursor="",n.innerHTML=t},0)}else a.style.display="block";n.style.backgroundImage="url('"+this.expandedImage+"')"}else n.style.backgroundImage="url('"+this.collapsedImage+"')",a.style.display="none";mxEvent.consume(e)}))},Sidebar.prototype.addImagePalette=function(e,t,o,s,r,n,a){for(var l=[],d=0;d<r.length;d++)mxUtils.bind(this,function(e,t,n){if(null==n){var a=e.lastIndexOf("/"),i=e.lastIndexOf(".");n=e.substring(0<=a?a+1:0,0<=i?i:e.length).replace(/[-_]/g," ")}l.push(this.createVertexTemplateEntry("image;html=1;labelBackgroundColor=#ffffff;image="+o+e+s,this.defaultImageWidth,this.defaultImageHeight,r[d],t,!1,!0,this.filterTags(n)))})(r[d],null!=n?n[d]:null,null!=a?a[r[d]]:null);this.addPaletteFunctions(e,t,!1,l)},"undefined"!=typeof html4&&(html4.ATTRIBS["a::target"]=0),mxConstants.SHADOW_OPACITY=.25,mxConstants.SHADOWCOLOR="#000000",mxConstants.VML_SHADOWCOLOR="#d0d0d0",mxGraph.prototype.pageBreakColor="#c0c0c0",mxGraph.prototype.pageScale=1,function(){try{if(null!=navigator&&null!=navigator.language){var e=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===e||"en-ca"===e||"es-mx"===e?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}}(),mxText.prototype.baseSpacingTop=5,mxText.prototype.baseSpacingBottom=1,mxGraphModel.prototype.ignoreRelativeEdgeParent=!1,mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif",mxGraphView.prototype.gridSteps=4,mxGraphView.prototype.minGridSize=4,mxGraphView.prototype.gridColor="#e0e0e0",mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]",Graph=function(e,t,n,a){mxGraph.call(this,e,t,n,a),this.setConnectable(!0),this.setDropEnabled(!1),this.setPanning(!0),this.setTooltips(!mxClient.IS_TOUCH),this.setAllowLoops(!1),this.setMultigraph(!1),this.allowAutoPanning=!0,this.resetEdgesOnConnect=!1,this.constrainChildren=!1,this.connectionHandler.targetConnectImage=!0,this.setAllowDanglingEdges(!1),this.connectionHandler.setCreateTarget(!1),this.connectionHandler.isValidSource=function(){return mxConnectionHandler.prototype.isValidSource.apply(this,arguments)&&"2"!=urlParams.connect},this.alternateEdgeStyle="vertical",null==a&&this.loadStylesheet();var i=new mxRubberband(this);this.getRubberband=function(){return i},this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.container.style.cursor="pointer"})),this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.container.style.cursor="default"})),this.isHtmlLabel=function(e){var t=this.view.getState(e),n=null!=t?t.style:this.getCellStyle(e);return"1"==n.html||"wrap"==n.whiteSpace},this.cellRenderer.getLabelValue=function(e){var t=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);return"wrap"==e.style.whiteSpace&&1!=e.style.html&&(t=mxUtils.htmlEntities(t,!1)),t},this.isCellLocked=function(e){return!1},this.connectionHandler.tapAndHoldTolerance=16;var o=this.connectionHandler.tapAndHold;this.connectionHandler.tapAndHold=function(e,t){null==t?this.graph.panningHandler.active||(i.start(e.getGraphX(),e.getGraphY()),this.graph.panningHandler.panningTrigger=!1):tapAndHoldStartsConnection?o.apply(this,arguments):this.graph.isCellSelected(t.cell)&&1<this.graph.getSelectionCount()&&this.graph.removeSelectionCell(t.cell)},touchStyle&&this.initTouch()},mxUtils.extend(Graph,mxGraph),Graph.prototype.minFitScale=null,Graph.prototype.maxFitScale=null,Graph.prototype.loadStylesheet=function(){var e=mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement();new mxCodec(e.ownerDocument).decode(e,this.getStylesheet())},Graph.prototype.flipEdge=function(e){if(null!=e){var t=this.view.getState(e),n=null!=t?t.style:this.getCellStyle(e);if(null!=n){var a=mxUtils.getValue(n,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,a,[e])}}},Graph.prototype.setDefaultEdge=function(e){if(null!=e&&this.getModel().isEdge(e)){var t=this.getModel().cloneCells([e])[0];null!=t.geometry&&(t.geometry.points=null);var n=t.getStyle();n=mxUtils.setStyle(n,mxConstants.STYLE_ENTRY_X,null),n=mxUtils.setStyle(n,mxConstants.STYLE_ENTRY_Y,null),n=mxUtils.setStyle(n,mxConstants.STYLE_EXIT_X,null),n=mxUtils.setStyle(n,mxConstants.STYLE_EXIT_Y,null),t.setStyle(n),this.connectionHandler.createEdgeState=function(e){return this.graph.view.createState(t)},this.connectionHandler.factoryMethod=function(){return this.graph.cloneCells([t])[0]}}},Graph.prototype.isCellFoldable=function(e){return this.foldingEnabled&&this.isSwimlane(e)},Graph.prototype.isValidRoot=function(e){return this.isSwimlane(e)},Graph.prototype.createGroupCell=function(){var e=mxGraph.prototype.createGroupCell.apply(this,arguments);return e.setStyle("group"),e},Graph.prototype.getTooltipForCell=function(e){var t="";return this.getModel().isVertex(e)?t+=mxResources.get("description_"+e.value.nodeName)||"":this.getModel().isEdge(e)&&(t=mxGraph.prototype.getTooltipForCell.apply(this,arguments)),t},Graph.prototype.convertValueToString=function(e){return null!=e.value&&"object"==typeof e.value?e.value.getAttribute("label"):mxGraph.prototype.convertValueToString.apply(this,arguments)},Graph.prototype.cellLabelChanged=function(e,t,n){if(null!=e.value&&"object"==typeof e.value){var a=e.value.cloneNode(!0);a.setAttribute("label",t),t=a}mxGraph.prototype.cellLabelChanged.apply(this,arguments)},Graph.prototype.setLinkForCell=function(e,t){var n=null;null!=e.value&&"object"==typeof e.value?n=e.value.cloneNode(!0):(n=mxUtils.createXmlDocument().createElement("UserObject")).setAttribute("label",e.value);null!=t&&0<t.length?n.setAttribute("link",t):n.removeAttribute("link"),this.model.setValue(e,n)},Graph.prototype.getLinkForCell=function(e){return null!=e.value&&"object"==typeof e.value?e.value.getAttribute("link"):null},Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first},this.addListener(mxEvent.START_EDITING,function(e,t){this.panningHandler.hideMenu()});var o=!1,s=null;this.updateMouseEvent=function(e){if(mxGraph.prototype.updateMouseEvent.apply(this,arguments),null==e.getState()){var t=this.getCellAt(e.graphX,e.graphY);this.getModel().isEdge(t)&&(e.state=this.view.getState(t),null!=e.state&&null!=e.state.shape&&(this.container.style.cursor=e.state.shape.node.style.cursor))}null==e.getState()&&(this.container.style.cursor="default")},this.fireMouseEvent=function(e,t,n){if(e==mxEvent.MOUSE_DOWN)this.panningHandler.isMenuShowing()?(o=!1,s=null):(s=t.getCell(),o=null!=s?this.isCellSelected(s):this.isSelectionEmpty());else if(e==mxEvent.MOUSE_UP){if(o&&!this.isEditing()){if(!this.panningHandler.isMenuShowing()){var a=mxEvent.getClientX(t.getEvent()),i=mxEvent.getClientY(t.getEvent());this.panningHandler.popup(a+16,i,s,t.getEvent())}return o=!1,s=null,void t.consume()}o=!1,s=null}mxGraph.prototype.fireMouseEvent.apply(this,arguments),e==mxEvent.MOUSE_MOVE&&t.isConsumed()&&(o=!1,s=null)}},function(){if(mxVertexHandler.prototype.rotationEnabled=!0,mxText.prototype.baseSpacingTop=5,mxText.prototype.baseSpacingBottom=1,touchStyle){mxConstants.HANDLE_SIZE=16,mxConstants.LABEL_HANDLE_SIZE=7,mxClient.IS_TOUCH&&(mxVertexHandler.prototype.tolerance=4,mxEdgeHandler.prototype.tolerance=6,Graph.prototype.tolerance=14,Graph.prototype.gridSize=20,mxPanningHandler.prototype.selectOnPopup=!1,mxPanningHandler.prototype.useLeftButtonForPanning=!0,mxPanningHandler.prototype.isPanningTrigger=function(e){var t=e.getEvent();return this.useLeftButtonForPanning&&(this.ignoreCell||null==e.getState())||mxEvent.isControlDown(t)&&mxEvent.isShiftDown(t)||this.usePopupTrigger&&mxEvent.isPopupTrigger(t)});var n=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(e,t){n.apply(this,arguments),this.graph.isCellSelected(t.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)},Graph.prototype.createHandlers=function(e){this.tooltipHandler=new mxTooltipHandler(this),this.tooltipHandler.setEnabled(!1),this.selectionCellsHandler=new mxSelectionCellsHandler(this),this.panningHandler=new mxPanningHandler(this),this.panningHandler.panningEnabled=!1,this.connectionHandler=new mxConnectionHandler(this),this.connectionHandler.setEnabled(!1),this.graphHandler=new mxGraphHandler(this)},mxConnectionHandler.prototype.selectCells=function(e,t){touchStyle&&null!=t?this.graph.setSelectionCell(t):this.graph.setSelectionCell(e)};var a=mxGraph.prototype.dblClick;Graph.prototype.dblClick=function(e,t){if(null==t){var n=mxUtils.convertPoint(this.container,mxEvent.getClientX(e),mxEvent.getClientY(e));t=this.getCellAt(n.x,n.y)}a.call(this,e,t)};var e=new mxImage(IMAGE_PATH+"/touch-handle.png",16,16);mxVertexHandler.prototype.handleImage=e,mxEdgeHandler.prototype.handleImage=e,mxOutline.prototype.sizerImage=e,(new Image).src=e.src;var t=IMAGE_PATH+"/touch-connector.png",i=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){i.apply(this,arguments),showConnectorImg&&this.graph.connectionHandler.isEnabled()&&this.graph.isCellConnectable(this.state.cell)&&!this.graph.isValidRoot(this.state.cell)&&1==this.graph.getSelectionCount()&&(this.connectorImg=mxUtils.createImage(t),this.connectorImg.style.cursor="pointer",this.connectorImg.style.width="29px",this.connectorImg.style.height="29px",this.connectorImg.style.position="absolute",mxClient.IS_TOUCH||(this.connectorImg.setAttribute("title",mxResources.get("connect")),mxEvent.redirectMouseEvents(this.connectorImg,this.graph,this.state)),this.connectorImg.style.padding="2px",mxEvent.addGestureListeners(this.connectorImg,mxUtils.bind(this,function(e){this.graph.panningHandler.hideMenu();var t=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));this.graph.connectionHandler.start(this.state,t.x,t.y),this.graph.isMouseDown=!0,mxEvent.consume(e)})),this.graph.container.appendChild(this.connectorImg)),this.redrawTools()};var o=mxVertexHandler.prototype.redraw;mxVertexHandler.prototype.redraw=function(){o.apply(this),this.redrawTools()},mxVertexHandler.prototype.redrawTools=function(){null!=this.state&&null!=this.connectorImg&&(mxVertexHandler.prototype.singleSizer?(this.connectorImg.style.left=this.state.x+this.state.width-this.connectorImg.offsetWidth/2+"px",this.connectorImg.style.top=this.state.y-this.connectorImg.offsetHeight/2+"px"):(this.connectorImg.style.left=this.state.x+this.state.width+mxConstants.HANDLE_SIZE/2+4+"px",this.connectorImg.style.top=this.state.y+(this.state.height-this.connectorImg.offsetHeight)/2+"px"))};var s=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(e,t){s.apply(this,arguments),null!=this.connectorImg&&(this.connectorImg.parentNode.removeChild(this.connectorImg),this.connectorImg=null)},(new Image).src=t}else{var r=new mxImage(IMAGE_PATH+"/connector.png",15,15);if(mxConnectionHandler.prototype.connectImage=r,(new Image).src=r.src,"2"==urlParams.connect){r=new mxImage(IMAGE_PATH+"/connector.png",15,15),i=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){i.apply(this,arguments),showConnectorImg&&this.graph.connectionHandler.isEnabled()&&this.graph.isCellConnectable(this.state.cell)&&!this.graph.isValidRoot(this.state.cell)&&1==this.graph.getSelectionCount()&&(mxClient.IS_IE&&!mxClient.IS_SVG?(this.connectorImg=document.createElement("div"),this.connectorImg.style.backgroundImage="url("+r.src+")",this.connectorImg.style.backgroundPosition="center",this.connectorImg.style.backgroundRepeat="no-repeat",this.connectorImg.style.width=r.width+4+"px",this.connectorImg.style.height=r.height+4+"px",this.connectorImg.style.display=mxClient.IS_QUIRKS?"inline":"inline-block"):(this.connectorImg=mxUtils.createImage(r.src),this.connectorImg.style.width=r.width+"px",this.connectorImg.style.height=r.height+"px"),this.connectorImg.style.cursor="pointer",this.connectorImg.style.position="absolute",this.connectorImg.setAttribute("title",mxResources.get("connect")),mxEvent.redirectMouseEvents(this.connectorImg,this.graph,this.state),this.connectorImg.style.padding="2px",mxEvent.addListener(this.connectorImg,"mousedown",mxUtils.bind(this,function(e){this.graph.panningHandler.hideMenu();var t=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));this.graph.connectionHandler.start(this.state,t.x,t.y),this.graph.isMouseDown=!0,mxEvent.consume(e)})),this.graph.container.appendChild(this.connectorImg)),this.redrawTools()};o=mxVertexHandler.prototype.redraw;mxVertexHandler.prototype.redraw=function(){o.apply(this),this.redrawTools()},mxVertexHandler.prototype.redrawTools=function(){null!=this.state&&null!=this.connectorImg&&(mxVertexHandler.prototype.singleSizer?(this.connectorImg.style.left=this.state.x+this.state.width-this.connectorImg.offsetWidth/2+"px",this.connectorImg.style.top=this.state.y-this.connectorImg.offsetHeight/2+"px"):(this.connectorImg.style.left=this.state.x+this.state.width+mxConstants.HANDLE_SIZE/2+2+"px",this.connectorImg.style.top=this.state.y+(this.state.height-this.connectorImg.offsetHeight)/2+"px"))};s=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(e,t){s.apply(this,arguments),null!=this.connectorImg&&(this.connectorImg.parentNode.removeChild(this.connectorImg),this.connectorImg=null)}}}}(),Actions.prototype.init=function(){var t=this.editorUi,l=t.editor,d=l.graph;this.addAction("new",function(){t.projectDesignController.newProject()}),this.addAction("open",function(){t.projectDesignController.openProject()}),this.addAction("save",function(){t.projectDesignController.saveOrPublishProject(mxUtils.getPrettyXml(l.getGraphXml())),t.editor.modified=!1},null,null,"Ctrl+S"),this.addAction("saveAs",function(){t.projectDesignController.saveProjectAs(mxUtils.getPrettyXml(l.getGraphXml()))},null,null,"Ctrl+Shift+S"),this.addAction("publish",function(){t.editor.setStatus(""),null===t.validate()?(t.projectDesignController.saveOrPublishProject(mxUtils.getPrettyXml(l.getGraphXml()),!0),t.editor.modified=!1):(t.editor.setStatus("...Error publishing! Please check the project and try again!"),setTimeout(function(){t.editor.setStatus("")},3e3))},null,null,"Ctrl+Shift+P"),this.addAction("variable",function(){t.projectDesignController.newVariable()}),this.addAction("import",function(){t.projectDesignController.importXML(function(e){l.setGraphXml(mxUtils.parseXml(e).documentElement)})}),this.addAction("export",function(){t.exportXML(mxUtils.getPrettyXml(l.getGraphXml()))},null,null,"Ctrl+E"),this.addAction("editFile",function(){t.projectDesignController.editXML(mxUtils.getPrettyXml(l.getGraphXml()),function(e){l.setGraphXml(mxUtils.parseXml(e).documentElement)})}),this.addAction("print",function(){mxUtils.printScreen(d)},null,"sprite-print","Ctrl+P"),this.addAction("preview",function(){mxUtils.show(d,null,10,10)}),this.addAction("undo",function(){l.undoManager.undo()},null,"sprite-undo","Ctrl+Z"),this.addAction("redo",function(){l.undoManager.redo()},null,"sprite-redo","Ctrl+Y"),this.addAction("cut",function(){mxClipboard.cut(d)},null,"sprite-cut","Ctrl+X"),this.addAction("copy",function(){mxClipboard.copy(d)},null,"sprite-copy","Ctrl+C"),this.addAction("paste",function(){mxClipboard.paste(d)},!1,"sprite-paste","Ctrl+V"),this.addAction("delete",function(){d.removeCells()},null,null,"Delete"),this.addAction("duplicate",function(){var e=d.gridSize;d.setSelectionCells(d.moveCells(d.getSelectionCells(),e,e,!0))},null,null,"Ctrl+D"),this.addAction("selectVertices",function(){d.selectVertices()},null,null,"Ctrl+Shift+V"),this.addAction("selectEdges",function(){d.selectEdges()},null,null,"Ctrl+Shift+E"),this.addAction("selectAll",function(){d.selectAll()},null,null,"Ctrl+A"),this.addAction("home",function(){d.home()},null,null,"Home"),this.addAction("exitGroup",function(){d.exitGroup()},null,null,"Page Up"),this.addAction("enterGroup",function(){d.enterGroup()},null,null,"Page Down"),this.addAction("expand",function(){d.foldCells(!1)},null,null,"Enter"),this.addAction("collapse",function(){d.foldCells(!0)},null,null,"Backspace"),this.addAction("toFront",function(){d.orderCells(!1)},null,null,"Ctrl+F"),this.addAction("toBack",function(){d.orderCells(!0)},null,null,"Ctrl+B"),this.addAction("group",function(){d.setSelectionCell(d.groupCells(null,0))},null,null,"Ctrl+G"),this.addAction("ungroup",function(){d.setSelectionCells(d.ungroupCells())},null,null,"Ctrl+U"),this.addAction("removeFromGroup",function(){d.removeCellsFromParent()}),this.addAction("editLink",function(){var e=d.getSelectionCell(),t=d.getLinkForCell(e);null==t&&(t=""),null!=(t=mxUtils.prompt(mxResources.get("enterValue"),t))&&d.setLinkForCell(e,t)}),this.addAction("openLink",function(){var e=d.getSelectionCell(),t=d.getLinkForCell(e);null!=t&&window.open(t)}),this.addAction("autosize",function(){var e=d.getSelectionCells();if(null!=e){d.getModel().beginUpdate();try{for(var t=0;t<e.length;t++){var n=e[t];d.getModel().getChildCount(n)?d.updateGroupBounds([n],20):d.updateCellSize(n)}}finally{d.getModel().endUpdate()}}}),this.addAction("wordWrap",function(){var e=d.getView().getState(d.getSelectionCell()),t="wrap";null!=e&&"wrap"==e.style[mxConstants.STYLE_WHITE_SPACE]&&(t=null),d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,t)}),this.addAction("rotation",function(){var e="0",t=d.getView().getState(d.getSelectionCell());null!=t&&(e=t.style[mxConstants.STYLE_ROTATION]||e),null!=(e=mxUtils.prompt(mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)",e))&&d.setCellStyles(mxConstants.STYLE_ROTATION,e)}),this.addAction("tilt",function(){var e=d.getSelectionCells();if(null!=e){d.getModel().beginUpdate();try{for(var t=0;t<e.length;t++){var n=e[t];if(d.getModel().isVertex(n)&&0==d.getModel().getChildCount(n)){var a=d.getCellGeometry(n);if(null!=a){(a=a.clone()).x+=a.width/2-a.height/2,a.y+=a.height/2-a.width/2;var i=a.width;a.width=a.height,a.height=i,d.getModel().setGeometry(n,a);var o=d.view.getState(n);if(null!=o){var s=o.style[mxConstants.STYLE_DIRECTION]||"east";"east"==s?s="south":"south"==s?s="west":"west"==s?s="north":"north"==s&&(s="east"),d.setCellStyles(mxConstants.STYLE_DIRECTION,s,[n])}}}}}finally{d.getModel().endUpdate()}}},null,null,"Ctrl+R"),this.addAction("actualSize",function(){d.zoomTo(1)}),this.addAction("zoomIn",function(){d.zoomIn()},null,null,"Add"),this.addAction("zoomOut",function(){d.zoomOut()},null,null,"Subtract"),this.addAction("fitWindow",function(){d.fit()}),this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var e=d.pageFormat,t=d.pageScale,n=d.container.clientWidth-20,a=d.container.clientHeight-20,i=Math.floor(100*Math.min(n/e.width/t,a/e.height/t))/100;d.zoomTo(i),d.container.scrollLeft=Math.round(d.view.translate.x*i-Math.max(10,(d.container.clientWidth-e.width*t*i)/2)),d.container.scrollTop=Math.round(d.view.translate.y*i-Math.max(10,(d.container.clientHeight-e.height*t*i)/2))})),this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var e=d.pageFormat,t=d.pageScale,n=d.container.clientWidth-20,a=Math.floor(100*n/e.width/t)/100;d.zoomTo(a),d.container.scrollLeft=Math.round(d.view.translate.x*a-Math.max(10,(d.container.clientWidth-e.width*t*a)/2)),d.container.scrollTop=Math.round(d.view.translate.y*a-Math.max(10,(d.container.clientHeight-e.height*t*a)/2))})),this.put("customZoom",new Action(mxResources.get("custom"),function(){var e=mxUtils.prompt(mxResources.get("enterValue")+" (%)",parseInt(100*d.getView().getScale()));null!=e&&0<e.length&&!isNaN(parseInt(e))&&d.zoomTo(parseInt(e)/100)}));var e=null;(e=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled()),l.updateGraphComponents()},null,null,"Ctrl+Shift+G")).setToggleAction(!0),e.setSelectedCallback(function(){return d.isGridEnabled()}),(e=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled})).setToggleAction(!0),e.setSelectedCallback(function(){return d.graphHandler.guidesEnabled}),(e=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())})).setToggleAction(!0),e.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()}),(e=this.addAction("navigation",function(){d.foldingEnabled=!d.foldingEnabled,d.view.revalidate()})).setToggleAction(!0),e.setSelectedCallback(function(){return d.foldingEnabled}),(e=this.addAction("scrollbars",function(){if(d.scrollbars=!d.scrollbars,l.updateGraphComponents(),d.scrollbars){var e=d.view.translate.x,t=d.view.translate.y;d.view.translate.x=0,d.view.translate.y=0,d.sizeDidChange(),d.container.scrollLeft-=Math.round(e*d.view.scale),d.container.scrollTop-=Math.round(t*d.view.scale)}else{var n=d.view.translate;d.view.setTranslate(n.x-d.container.scrollLeft/d.view.scale,n.y-d.container.scrollTop/d.view.scale),d.container.scrollLeft=0,d.container.scrollTop=0,d.sizeDidChange()}},!mxClient.IS_TOUCH)).setToggleAction(!0),e.setSelectedCallback(function(){return"auto"==d.container.style.overflow}),(e=this.addAction("pageView",mxUtils.bind(this,function(){d.pageVisible=!d.pageVisible,d.pageBreaksVisible=d.pageVisible,d.preferPageSize=d.pageBreaksVisible,d.view.validate(),d.sizeDidChange(),l.updateGraphComponents(),l.outline.update(),mxUtils.hasScrollbars(d.container)&&(d.pageVisible?(d.container.scrollLeft-=20,d.container.scrollTop-=20):(d.container.scrollLeft+=20,d.container.scrollTop+=20))}))).setToggleAction(!0),e.setSelectedCallback(function(){return d.pageVisible}),(e=this.addAction("connect",function(){d.setConnectable(!d.connectionHandler.isEnabled())},null,null,"Ctrl+Q")).setToggleAction(!0),e.setSelectedCallback(function(){return d.connectionHandler.isEnabled()}),(e=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget())})).setToggleAction(!0),e.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()}),this.addAction("help",function(){window.open("https://wiki.xcallymotion.com/display/XMV/Cally+Square")}),this.put("about",new Action(mxResources.get("about")+" Cally Square",function(){window.open("http://callysquare.com/")},null,null,null));var n=mxUtils.bind(this,function(e,t){this.addAction(e,function(){d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,t)})});n("bold",mxConstants.FONT_BOLD),n("italic",mxConstants.FONT_ITALIC),n("underline",mxConstants.FONT_UNDERLINE),this.addAction("shadow",function(){d.toggleCellStyles(mxConstants.STYLE_SHADOW)}),this.addAction("dashed",function(){d.toggleCellStyles(mxConstants.STYLE_DASHED)}),this.addAction("rounded",function(){d.toggleCellStyles(mxConstants.STYLE_ROUNDED)}),this.addAction("curved",function(){d.toggleCellStyles(mxConstants.STYLE_CURVED)}),this.addAction("style",function(){var e=d.getSelectionCells();if(null!=e&&0<e.length){var t=d.getModel(),n=mxUtils.prompt(mxResources.get("enterValue")+" ("+mxResources.get("style")+")",t.getStyle(e[0])||"");null!=n&&d.setCellStyle(n,e)}}),this.addAction("setAsDefaultEdge",function(){d.setDefaultEdge(d.getSelectionCell())}),this.addAction("addWaypoint",function(){var e=d.getSelectionCell();if(null!=e&&d.getModel().isEdge(e)){var t=l.graph.selectionCellsHandler.getHandler(e);if(t instanceof mxEdgeHandler){var n=d.view.translate,a=d.view.scale,i=n.x,o=n.y,s=d.getModel().getParent(e),r=d.getCellGeometry(s);d.getModel().isVertex(s)&&null!=r&&(i+=r.x,o+=r.y),t.addPointAt(t.state,d.panningHandler.triggerX/a-i,d.panningHandler.triggerY/a-o)}}}),this.addAction("removeWaypoint",function(){var e=t.actions.get("removeWaypoint");null!=e.handler&&e.handler.removePoint(e.handler.state,e.index)}),this.addAction("image",function(){var e="",t=d.getView().getState(d.getSelectionCell());if(null!=t&&(e=t.style[mxConstants.STYLE_IMAGE]||e),null!=(e=mxUtils.prompt(mxResources.get("enterValue")+" ("+mxResources.get("url")+")",e))&&0<e.length){var n=new Image;n.onload=function(){!function(e,t,n){var a=null,i=d.getSelectionCells();d.getModel().beginUpdate();try{if(0==i.length){var o=d.getGridSize();a=i=[d.insertVertex(d.getDefaultParent(),null,"",o,o,t,n)]}if(d.setCellStyles(mxConstants.STYLE_IMAGE,e,i),d.setCellStyles(mxConstants.STYLE_SHAPE,"image",i),1==d.getSelectionCount()&&null!=t&&null!=n){var s=i[0],r=d.getModel().getGeometry(s);null!=r&&((r=r.clone()).width=t,r.height=n,d.getModel().setGeometry(s,r))}}finally{d.getModel().endUpdate()}null!=a&&(d.setSelectionCells(a),d.scrollCellToVisible(a[0]))}(e,n.width,n.height)},n.onerror=function(){mxUtils.alert(mxResources.get("fileNotFound"))},n.src=e}})},Actions.prototype.addAction=function(e,t,n,a,i){return this.put(e,new Action(mxResources.get(e),t,n,a,i))},Actions.prototype.put=function(e,t){return this.actions[e]=t},Actions.prototype.get=function(e){return this.actions[e]},mxUtils.extend(Action,mxEventSource),Action.prototype.setEnabled=function(e){this.enabled!=e&&(this.enabled=e,this.fireEvent(new mxEventObject("stateChanged")))},Action.prototype.setToggleAction=function(e){this.toggleAction=e},Action.prototype.setSelectedCallback=function(e){this.selectedCallback=e},Action.prototype.isSelected=function(){return this.selectedCallback()},Menus=function(e){this.editorUi=e,this.menus=new Object,this.init(),(new Image).src=IMAGE_PATH+"/checkmark.gif"},Menus.prototype.init=function(){var i=this.editorUi.editor.graph;this.put("fontFamily",new Menu(mxUtils.bind(this,function(e,t){for(var n=["Helvetica","Verdana","Times New Roman","Garamond","Comic Sans MS","Courier New","Georgia","Lucida Console","Tahoma"],a=0;a<n.length;a++){this.styleChange(e,n[a],[mxConstants.STYLE_FONTFAMILY],[n[a]],null,t).firstChild.nextSibling.style.fontFamily=n[a]}e.addSeparator(t),this.promptChange(e,mxResources.get("custom"),"",mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,t)}))),this.put("fontSize",new Menu(mxUtils.bind(this,function(e,t){for(var n=[6,8,9,10,11,12,14,18,24,36,48,72],a=0;a<n.length;a++)this.styleChange(e,n[a],[mxConstants.STYLE_FONTSIZE],[n[a]],null,t);e.addSeparator(t),this.promptChange(e,mxResources.get("custom"),"(pt)","12",mxConstants.STYLE_FONTSIZE,t)}))),this.put("linewidth",new Menu(mxUtils.bind(this,function(e,t){for(var n=[1,2,3,4,8,12,16,24],a=0;a<n.length;a++)this.styleChange(e,n[a]+"px",[mxConstants.STYLE_STROKEWIDTH],[n[a]],null,t);e.addSeparator(t),this.promptChange(e,mxResources.get("custom"),"(px)","1",mxConstants.STYLE_STROKEWIDTH,t)}))),this.put("line",new Menu(mxUtils.bind(this,function(e,t){this.styleChange(e,mxResources.get("straight"),[mxConstants.STYLE_EDGE],[null],null,t),this.styleChange(e,mxResources.get("entityRelation"),[mxConstants.STYLE_EDGE],["entityRelationEdgeStyle"],null,t),e.addSeparator(t),this.styleChange(e,mxResources.get("horizontal"),[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW],["elbowEdgeStyle","horizontal"],null,t),this.styleChange(e,mxResources.get("vertical"),[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW],["elbowEdgeStyle","vertical"],null,t),e.addSeparator(t),this.styleChange(e,mxResources.get("manual"),[mxConstants.STYLE_EDGE],["segmentEdgeStyle"],null,t),this.styleChange(e,mxResources.get("automatic"),[mxConstants.STYLE_EDGE],["orthogonalEdgeStyle"],null,t)}))),this.put("lineend",new Menu(mxUtils.bind(this,function(e,t){this.styleChange(e,mxResources.get("classic"),[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_CLASSIC],null,t),this.styleChange(e,mxResources.get("openArrow"),[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_OPEN],null,t),this.styleChange(e,mxResources.get("block"),[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],null,t),e.addSeparator(t),this.styleChange(e,mxResources.get("oval"),[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_OVAL],null,t),this.styleChange(e,mxResources.get("diamond"),[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_DIAMOND],null,t),this.styleChange(e,mxResources.get("diamondThin"),[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_DIAMOND_THIN],null,t),e.addSeparator(t),this.styleChange(e,mxResources.get("none"),[mxConstants.STYLE_ENDARROW],[mxConstants.NONE],null,t),e.addSeparator(t),e.addItem(mxResources.get("transparent"),null,function(){i.toggleCellStyles("endFill",!0)},t,null,!0),e.addSeparator(t),this.promptChange(e,mxResources.get("size"),"(px)",mxConstants.DEFAULT_MARKERSIZE,mxConstants.STYLE_ENDSIZE,t)}))),this.put("linestart",new Menu(mxUtils.bind(this,function(e,t){this.styleChange(e,mxResources.get("classic"),[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_CLASSIC],null,t),this.styleChange(e,mxResources.get("openArrow"),[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_OPEN],null,t),this.styleChange(e,mxResources.get("block"),[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],null,t),e.addSeparator(t),this.styleChange(e,mxResources.get("oval"),[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_OVAL],null,t),this.styleChange(e,mxResources.get("diamond"),[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_DIAMOND],null,t),this.styleChange(e,mxResources.get("diamondThin"),[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_DIAMOND_THIN],null,t),e.addSeparator(t),this.styleChange(e,mxResources.get("none"),[mxConstants.STYLE_STARTARROW],[mxConstants.NONE],null,t),e.addSeparator(t),e.addItem(mxResources.get("transparent"),null,function(){i.toggleCellStyles("startFill",!0)},t,null,!0),e.addSeparator(t),this.promptChange(e,mxResources.get("size"),"(px)",mxConstants.DEFAULT_MARKERSIZE,mxConstants.STYLE_STARTSIZE,t)}))),this.put("spacing",new Menu(mxUtils.bind(this,function(e,t){var n=this.editorUi.actions.get("shadow").enabled,a=this.get("line").enabled;(n||e.showDisabled)&&(this.promptChange(e,mxResources.get("top"),"(px)","0",mxConstants.STYLE_SPACING_TOP,t,n),this.promptChange(e,mxResources.get("right"),"(px)","0",mxConstants.STYLE_SPACING_RIGHT,t,n),this.promptChange(e,mxResources.get("bottom"),"(px)","0",mxConstants.STYLE_SPACING_BOTTOM,t,n),this.promptChange(e,mxResources.get("left"),"(px)","0",mxConstants.STYLE_SPACING_LEFT,t,n),e.addSeparator(t),this.promptChange(e,mxResources.get("global"),"(px)","0",mxConstants.STYLE_SPACING,t,n),this.promptChange(e,mxResources.get("perimeter"),"(px)","0",mxConstants.STYLE_PERIMETER_SPACING,t,n)),(a||e.showDisabled)&&(e.addSeparator(t),this.promptChange(e,mxResources.get("sourceSpacing"),"(px)","0",mxConstants.STYLE_SOURCE_PERIMETER_SPACING,t,a),this.promptChange(e,mxResources.get("targetSpacing"),"(px)","0",mxConstants.STYLE_TARGET_PERIMETER_SPACING,t,a))}))),this.put("format",new Menu(mxUtils.bind(this,function(e,t){this.addMenuItem(e,"style",t)}))),this.put("text",new Menu(mxUtils.bind(this,function(e,t){var n=this.get("text").enabled;e.addSeparator(t),this.addSubmenu("fontFamily",e,t),this.addSubmenu("fontSize",e,t),this.addMenuItems(e,["-","bold","italic","underline","-"],t),this.addSubmenu("alignment",e,t),this.addMenuItem(e,"wordWrap",t),e.addSeparator(t),this.promptChange(e,mxResources.get("textOpacity"),"(%)","100",mxConstants.STYLE_TEXT_OPACITY,t,n),e.addItem(mxResources.get("hide"),null,function(){i.toggleCellStyles(mxConstants.STYLE_NOLABEL,!1)},t,null,n)}))),this.put("alignment",new Menu(mxUtils.bind(this,function(e,t){this.styleChange(e,mxResources.get("leftAlign"),[mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT],null,t),this.styleChange(e,mxResources.get("center"),[mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER],null,t),this.styleChange(e,mxResources.get("rightAlign"),[mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT],null,t),e.addSeparator(t),this.styleChange(e,mxResources.get("topAlign"),[mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP],null,t),this.styleChange(e,mxResources.get("middle"),[mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE],null,t),this.styleChange(e,mxResources.get("bottomAlign"),[mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM],null,t),e.addSeparator(t),this.addSubmenu("position",e,t),this.addSubmenu("spacing",e,t),e.addSeparator(t);var n=this.get("text").enabled;e.addItem(mxResources.get("vertical"),null,function(){i.toggleCellStyles(mxConstants.STYLE_HORIZONTAL,!0)},t,null,n)}))),this.put("position",new Menu(mxUtils.bind(this,function(e,t){this.styleChange(e,mxResources.get("left"),[mxConstants.STYLE_LABEL_POSITION,mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_RIGHT],null,t),this.styleChange(e,mxResources.get("center"),[mxConstants.STYLE_LABEL_POSITION,mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_CENTER],null,t),this.styleChange(e,mxResources.get("right"),[mxConstants.STYLE_LABEL_POSITION,mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_LEFT],null,t),e.addSeparator(t),this.styleChange(e,mxResources.get("top"),[mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP,mxConstants.ALIGN_BOTTOM],null,t),this.styleChange(e,mxResources.get("middle"),[mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_MIDDLE],null,t),this.styleChange(e,mxResources.get("bottom"),[mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_TOP],null,t)}))),this.put("direction",new Menu(mxUtils.bind(this,function(e,t){e.addItem(mxResources.get("flipH"),null,function(){i.toggleCellStyles(mxConstants.STYLE_FLIPH,!1)},t),e.addItem(mxResources.get("flipV"),null,function(){i.toggleCellStyles(mxConstants.STYLE_FLIPV,!1)},t),this.addMenuItems(e,["-","tilt","rotation"],t)}))),this.put("align",new Menu(mxUtils.bind(this,function(e,t){e.addItem(mxResources.get("leftAlign"),null,function(){i.alignCells(mxConstants.ALIGN_LEFT)},t),e.addItem(mxResources.get("center"),null,function(){i.alignCells(mxConstants.ALIGN_CENTER)},t),e.addItem(mxResources.get("rightAlign"),null,function(){i.alignCells(mxConstants.ALIGN_RIGHT)},t),e.addSeparator(t),e.addItem(mxResources.get("topAlign"),null,function(){i.alignCells(mxConstants.ALIGN_TOP)},t),e.addItem(mxResources.get("middle"),null,function(){i.alignCells(mxConstants.ALIGN_MIDDLE)},t),e.addItem(mxResources.get("bottomAlign"),null,function(){i.alignCells(mxConstants.ALIGN_BOTTOM)},t)}))),this.put("layout",new Menu(mxUtils.bind(this,function(e,t){e.addItem(mxResources.get("horizontalFlow"),null,mxUtils.bind(this,function(){var e=new mxHierarchicalLayout(i,mxConstants.DIRECTION_WEST);this.editorUi.executeLayout(e,!0,!0)}),t),e.addItem(mxResources.get("verticalFlow"),null,mxUtils.bind(this,function(){var e=new mxHierarchicalLayout(i,mxConstants.DIRECTION_NORTH);this.editorUi.executeLayout(e,!0,!0)}),t)}))),this.put("navigation",new Menu(mxUtils.bind(this,function(e,t){this.addMenuItems(e,["home","-","exitGroup","enterGroup","-","expand","collapse"],t)}))),this.put("arrange",new Menu(mxUtils.bind(this,function(e,t){this.addMenuItems(e,["toFront","toBack","-"],t),this.addSubmenu("layout",e,t),e.addSeparator(t),this.addMenuItems(e,["-","group","ungroup","removeFromGroup"],t)}))),this.put("view",new Menu(mxUtils.bind(this,function(t,n){this.addMenuItems(t,["actualSize"],n),t.addSeparator();for(var e=[.25,.5,.75,1,2,4],a=0;a<e.length;a++)!function(e){t.addItem(100*e+"%",null,function(){i.zoomTo(e)},n)}(e[a]);this.addMenuItems(t,["-","zoomIn","zoomOut","-","fitWindow","customZoom","-","fitPage","fitPageWidth"],n)}))),this.put("file",new Menu(mxUtils.bind(this,function(e,t){this.addMenuItems(e,["new","open","-","save","saveAs","publish","-","variable","-","import","export","-","editFile","description","-","print"],t)}))),this.put("edit",new Menu(mxUtils.bind(this,function(e,t){this.addMenuItems(e,["undo","redo","-","cut","copy","paste","delete","-","duplicate","-","selectVertices","selectEdges","selectAll"])}))),this.put("help",new Menu(mxUtils.bind(this,function(e,t){this.addMenuItems(e,["help","-","about"])})))},Menus.prototype.put=function(e,t){this.menus[e]=t},Menus.prototype.get=function(e){return this.menus[e]},Menus.prototype.addSubmenu=function(e,t,n){var a=this.get(e).enabled;if(t.showDisabled||a){var i=t.addItem(mxResources.get(e),null,null,n,null,a);this.addMenu(e,t,i)}},Menus.prototype.addMenu=function(e,t,n){var a=this.get(e);null!=a&&(t.showDisabled||a.enabled)&&this.get(e).execute(t,n)},Menus.prototype.styleChange=function(e,t,n,a,i,o){return e.addItem(t,null,mxUtils.bind(this,function(){var e=this.editorUi.editor.graph;e.getModel().beginUpdate();try{for(var t=0;t<n.length;t++)e.setCellStyles(n[t],a[t])}finally{e.getModel().endUpdate()}}),o,i)},Menus.prototype.promptChange=function(e,t,a,i,o,n,s){return e.addItem(t,null,mxUtils.bind(this,function(){var e=this.editorUi.editor.graph,t=i,n=e.getView().getState(e.getSelectionCell());null!=n&&(t=n.style[o]||t),null!=(t=mxUtils.prompt(mxResources.get("enterValue")+(0<a.length?" "+a:""),t))&&0<t.length&&e.setCellStyles(o,t)}),n,null,s)},Menus.prototype.addMenuItem=function(e,t,n){var a=this.editorUi.actions.get(t);if(null!=a&&(e.showDisabled||a.enabled)){var i=e.addItem(a.label,null,a.funct,n,null,a.enabled);return a.toggleAction&&a.isSelected()&&this.addCheckmark(i),this.addShortcut(i,a),i}return null},Menus.prototype.addShortcut=function(e,t){if(null!=t.shortcut){var n=e.firstChild.nextSibling.nextSibling,a=document.createElement("span");a.style.color="gray",mxUtils.write(a,t.shortcut),n.appendChild(a)}},Menus.prototype.addCheckmark=function(e){var t=e.firstChild.nextSibling;t.style.backgroundImage="url("+IMAGE_PATH+"/checkmark.gif)",t.style.backgroundRepeat="no-repeat",t.style.backgroundPosition="2px 50%"},Menus.prototype.addMenuItems=function(e,t,n){for(var a=0;a<t.length;a++)"-"==t[a]?e.addSeparator(n):this.addMenuItem(e,t[a],n)},Menus.prototype.createPopupMenu=function(e,t,n){var a=this.editorUi.editor.graph;if(e.smartSeparators=!0,a.isSelectionEmpty()?this.addMenuItems(e,["undo","redo","-","paste","-"]):(this.addMenuItems(e,["delete","-","cut","copy","-","duplicate"]),1==a.getSelectionCount()&&a.getModel().isEdge(a.getSelectionCell())&&this.addMenuItems(e,["setAsDefaultEdge"]),e.addSeparator()),0<a.getSelectionCount()){if(this.addMenuItems(e,["toFront","toBack","-"]),a.getModel().isEdge(a.getSelectionCell())){var i=!1;if(null!=(t=a.getSelectionCell())&&a.getModel().isEdge(t)){var o=a.selectionCellsHandler.getHandler(t);if(o instanceof mxEdgeHandler&&null!=o.bends&&2<o.bends.length){var s=o.getHandleForEvent(new mxMouseEvent(n)),r=this.editorUi.actions.get("removeWaypoint");r.handler=o,i=0<(r.index=s)&&s<o.bends.length}}this.addMenuItems(e,["-",i?"removeWaypoint":"addWaypoint"])}else 1<a.getSelectionCount()&&(e.addSeparator(),this.addMenuItems(e,["group"]));if(e.addSeparator(),1==a.getSelectionCount())null!=a.getLinkForCell(a.getSelectionCell())&&this.addMenuItems(e,["openLink"])}else this.addMenuItems(e,["-","selectVertices","selectEdges","-","selectAll"])},Menus.prototype.createMenubar=function(e){for(var t=new Menubar(this.editorUi,e),n=["file","edit","view","format","text","arrange","help"],a=0;a<n.length;a++)t.addMenu(mxResources.get(n[a]),this.get(n[a]).funct);return t},Menubar.prototype.hideMenu=function(){null!=this.currentMenu&&this.currentMenu.hideMenu()},Menubar.prototype.addMenu=function(e,t){var n=document.createElement("a");return n.setAttribute("href","javascript:void(0);"),n.className="geItem",mxUtils.write(n,e),this.addMenuHandler(n,t),this.container.appendChild(n),n},Menubar.prototype.getOffset=function(e){return{left:(e=e.getBoundingClientRect()).left+window.scrollX,top:e.top+window.scrollY}},Menubar.prototype.addMenuHandler=function(i,o){if(null!=o){var s=!0,t=mxUtils.bind(this,function(e){if(s&&null==i.enabled||i.enabled){this.editorUi.editor.graph.panningHandler.hideMenu();var t=new mxPopupMenu(o);t.div.className+=" geMenubarMenu",t.smartSeparators=!0,t.showDisabled=!0,t.autoExpand=!0,t.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(t,arguments),t.destroy(),this.currentMenu=null,this.currentElt=null});var n=this.getOffset(i).left,a=this.getOffset(i).top+i.offsetHeight;t.popup(n,a,null,e),this.currentMenu=t,this.currentElt=i}s=!0,mxEvent.consume(e)});mxEvent.addListener(i,"mousemove",mxUtils.bind(this,function(e){null!=this.currentMenu&&this.currentElt!=i&&(this.hideMenu(),t(e))})),mxEvent.addListener(i,"mousedown",mxUtils.bind(this,function(){s=this.currentElt!=i})),mxEvent.addListener(i,"click",t)}},mxUtils.extend(Menu,mxEventSource),Menu.prototype.setEnabled=function(e){this.enabled!=e&&(this.enabled=e,this.fireEvent(new mxEventObject("stateChanged")))},Menu.prototype.execute=function(e,t){this.funct(e,t)},Toolbar.prototype.init=function(){this.addItems(["save","publish","-","print","undo","redo","-","copy","cut","paste","delete","-","duplicate","-","actualSize","zoomIn","zoomOut","-"]);this.editorUi.editor.graph},Toolbar.prototype.hideMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.currentMenu.destroy(),this.currentMenu=null)},Toolbar.prototype.addMenu=function(e,t,n,a){var i=this.editorUi.menus.get(a),o=this.addMenuFunction(e,t,n,i.funct);return i.addListener("stateChanged",function(){o.setEnabled(i.enabled)}),o},Toolbar.prototype.addMenuFunction=function(e,t,n,a){var i=n?this.createLabel(e):this.createButton(e);return this.initElement(i,t),this.addMenuHandler(i,n,a),this.container.appendChild(i),i},Toolbar.prototype.addSeparator=function(){var e=document.createElement("div");return e.className="geSeparator",this.container.appendChild(e),e},Toolbar.prototype.addItems=function(e){for(var t=0;t<e.length;t++){var n=e[t];"-"==n?this.addSeparator():this.addItem("geSprite-"+n.toLowerCase(),n)}},Toolbar.prototype.addItem=function(e,t){var n=this.editorUi.actions.get(t),a=null;return null!=n&&((a=this.addButton(e,n.label,n.funct)).setEnabled(n.enabled),n.addListener("stateChanged",function(){a.setEnabled(n.enabled)})),a},Toolbar.prototype.addButton=function(e,t,n){var a=this.createButton(e);return this.initElement(a,t),this.addClickHandler(a,n),this.container.appendChild(a),a},Toolbar.prototype.addSelectionHandler=function(n){var a=this.editorUi.editor.graph,e=function(){for(var e=!a.isSelectionEmpty(),t=0;t<n.length;t++)n[t].setEnabled(e)};a.getSelectionModel().addListener(mxEvent.CHANGE,e),e()},Toolbar.prototype.addEdgeSelectionHandler=function(a){var i=this.editorUi.editor.graph,e=function(){var e=!1;if(!i.isSelectionEmpty())for(var t=i.getSelectionCells(),n=0;n<t.length;n++)if(i.getModel().isEdge(t[n])){e=!0;break}for(n=0;n<a.length;n++)a[n].setEnabled(e)};i.getSelectionModel().addListener(mxEvent.CHANGE,e),e()},Toolbar.prototype.initElement=function(e,t){e.setAttribute("tabindex","0"),null!=t&&e.setAttribute("title",t),this.addEnabledState(e)},Toolbar.prototype.addEnabledState=function(t){var n=t.className;t.setEnabled=function(e){t.enabled=e,t.className=e?n:n+" geDisabled"},t.setEnabled(!0)},Toolbar.prototype.addClickHandler=function(t,n){null!=n&&mxEvent.addListener(t,"click",function(e){t.enabled&&n(e),mxEvent.consume(e)})},Toolbar.prototype.createButton=function(e){var t=document.createElement("a");t.setAttribute("href","javascript:void(0);"),t.className="geButton";var n=document.createElement("div");return n.className="geSprite "+e,t.appendChild(n),t},Toolbar.prototype.createLabel=function(e,t){var n=document.createElement("a");return n.setAttribute("href","javascript:void(0);"),n.className="geLabel",mxUtils.write(n,e),n},Toolbar.prototype.addMenuHandler=function(t,n,a,i){if(null!=a){var o=this.editorUi.editor.graph,s=null;mxEvent.addListener(t,"click",mxUtils.bind(this,function(e){(null==t.enabled||t.enabled)&&(o.panningHandler.hideMenu(),(s=new mxPopupMenu(a)).div.className+=" geToolbarMenu",s.showDisabled=i,s.labels=n,s.autoExpand=!0,s.popup(t.offsetLeft,t.offsetTop+t.offsetHeight+34,null,e),this.currentMenu=s),mxEvent.consume(e)}))}},Dialog.prototype.close=function(){null!=this.onDialogClose&&(this.onDialogClose(),this.onDialogClose=null),this.container.parentNode.removeChild(this.container),this.bg.parentNode.removeChild(this.bg)},angular.module("motion").run(["$templateCache",function(e){"use strict";e.put("app/core/directives/ms-card/templates/template-1/template-1.html",'<div class="template-1">\n    <div class="media">\n        <img class="image" ng-src="{{card.media.image.src}}" alt="{{card.media.image.alt}}" ng-show="card.media.image">\n    </div>\n\n    <div class="content pv-24 ph-16">\n        <div class="title h1" ng-if="card.title">\n            {{card.title}}\n        </div>\n\n        <div class="subtitle secondary-text" ng-if="card.subtitle">\n            {{card.subtitle}}\n        </div>\n\n        <div class="text pt-16" ng-if="card.text">\n            {{card.text}}\n        </div>\n    </div>\n</div>'),e.put("app/core/directives/ms-card/templates/template-10/template-10.html",'<div class="template-10 p-16">\n    <div class="pb-16" layout="row" layout-align="space-between center">\n        <div class="info">\n            <div class="title secondary-text" ng-if="card.title">\n                {{card.title}}\n            </div>\n\n            <div class="subtitle h2" ng-if="card.subtitle">\n                {{card.subtitle}}\n            </div>\n        </div>\n\n        <div class="media ml-16">\n            <img class="image" ng-src="{{card.media.image.src}}" alt="{{card.media.image.alt}}" ng-show="card.media.image">\n        </div>\n    </div>\n\n    <div class="text">\n        {{card.text}}\n    </div>\n</div>'),e.put("app/core/directives/ms-card/templates/template-2/template-2.html",'<div class="template-2">\n    <div class="header p-16" layout="row" layout-align="start center">\n        <div ng-if="card.avatar">\n            <img class="avatar mr-16" ng-src="{{card.avatar.src}}" alt="{{card.avatar.alt}}">\n        </div>\n\n        <div class="info">\n            <div class="title" ng-if="card.title">\n                {{card.title}}\n            </div>\n\n            <div class="subtitle secondary-text" ng-if="card.subtitle">\n                {{card.subtitle}}\n            </div>\n        </div>\n    </div>\n\n    <div class="media">\n        <img class="image" ng-src="{{card.media.image.src}}" alt="{{card.media.image.alt}}" ng-show="card.media.image">\n    </div>\n\n    <div class="text p-16" ng-if="card.text">\n        {{card.text}}\n    </div>\n</div>'),e.put("app/core/directives/ms-card/templates/template-3/template-3.html",'<div class="template-3 p-16 teal-bg white-fg" layout="row" layout-align="space-between">\n    <div layout="column" layout-align="space-between">\n        <div class="info">\n            <div class="title h1" ng-if="card.title">\n                {{card.title}}\n            </div>\n\n            <div class="subtitle h3 secondary-text" ng-if="card.subtitle">\n                {{card.subtitle}}\n            </div>\n        </div>\n\n        <div class="cta">\n            <md-button class="m-0">{{card.cta}}</md-button>\n        </div>\n    </div>\n\n    <div class="media pl-16">\n        <img class="image" ng-src="{{card.media.image.src}}" alt="{{card.media.image.alt}}" ng-show="card.media.image">\n    </div>\n</div>'),e.put("app/core/directives/ms-card/templates/template-4/template-4.html",'<div class="template-4">\n    <div class="info white-fg ph-16 pv-24">\n        <div class="title h1" ng-if="card.title">\n            {{card.title}}\n        </div>\n\n        <div class="text" ng-if="card.text">\n            {{card.text}}\n        </div>\n    </div>\n\n    <div class="media">\n        <img class="image" ng-src="{{card.media.image.src}}" alt="{{card.media.image.alt}}" ng-show="card.media.image">\n    </div>\n</div>'),e.put("app/core/directives/ms-card/templates/template-5/template-5.html",'<div class="template-5 p-16" layout="row" layout-align="space-between start">\n    <div class="info">\n        <div class="title secondary-text" ng-if="card.title">\n            {{card.title}}\n        </div>\n\n        <div class="event h2" ng-if="card.event">\n            {{card.event}}\n        </div>\n    </div>\n\n    <div class="media ml-16">\n        <img class="image" ng-src="{{card.media.image.src}}" alt="{{card.media.image.alt}}" ng-show="card.media.image">\n    </div>\n</div>'),e.put("app/core/directives/ms-card/templates/template-6/template-6.html",'<div class="template-6">\n    <div class="content pv-24 ph-16">\n        <div class="subtitle secondary-text" ng-if="card.subtitle">\n            {{card.subtitle}}\n        </div>\n\n        <div class="title h2" ng-if="card.title">\n            {{card.title}}\n        </div>\n\n        <div class="text pt-8" ng-if="card.text">\n            {{card.text}}\n        </div>\n    </div>\n</div>'),e.put("app/core/directives/ms-card/templates/template-7/template-7.html",'<div class="template-7" layout="row" layout-align="space-between">\n    <div class="info" layout="column" layout-align="space-between" layout-fill flex>\n        <div class="p-16">\n            <div class="title h1" ng-if="card.title">\n                {{card.title}}\n            </div>\n\n            <div class="subtitle h4 secondary-text" ng-if="card.subtitle">\n                {{card.subtitle}}\n            </div>\n\n            <div class="text h4 pt-8" ng-if="card.text">\n                {{card.text}}\n            </div>\n        </div>\n\n        <div>\n            <md-divider></md-divider>\n            <div class="p-8" layout="row">\n                <md-icon md-font-icon="icon-star-outline" class="mh-5"></md-icon>\n                <md-icon md-font-icon="icon-star-outline" class="mh-5"></md-icon>\n                <md-icon md-font-icon="icon-star-outline" class="mh-5"></md-icon>\n                <md-icon md-font-icon="icon-star-outline" class="mh-5"></md-icon>\n                <md-icon md-font-icon="icon-star-outline" class="mh-5"></md-icon>\n            </div>\n        </div>\n    </div>\n\n    <div class="media">\n        <img class="image" ng-src="{{card.media.image.src}}" alt="{{card.media.image.alt}}" ng-show="card.media.image">\n    </div>\n</div>'),e.put("app/core/directives/ms-card/templates/template-8/template-8.html",'<div class="template-8">\n    <div class="media">\n        <img class="image" ng-src="{{card.media.image.src}}" alt="{{card.media.image.alt}}" ng-show="card.media.image">\n    </div>\n\n    <div class="content pv-24 ph-16">\n        <div class="title h1" ng-if="card.title">\n            {{card.title}}\n        </div>\n\n        <div class="subtitle secondary-text" ng-if="card.subtitle">\n            {{card.subtitle}}\n        </div>\n\n        <div class="buttons pt-16">\n            <md-button class="m-0">{{card.button1}}</md-button>\n            <md-button class="m-0 md-accent">{{card.button2}}</md-button>\n        </div>\n\n        <div class="text pt-16" ng-if="card.text">\n            {{card.text}}\n        </div>\n    </div>\n</div>'),e.put("app/core/directives/ms-card/templates/template-9/template-9.html",'<div class="template-9">\n    <div class="header p-16" layout="row" layout-align="start center">\n        <div ng-if="card.avatar">\n            <img class="avatar mr-16" ng-src="{{card.avatar.src}}" alt="{{card.avatar.alt}}">\n        </div>\n\n        <div class="info">\n            <div class="title" ng-if="card.title">\n                {{card.title}}\n            </div>\n\n            <div class="subtitle secondary-text" ng-if="card.subtitle">\n                {{card.subtitle}}\n            </div>\n\n        </div>\n    </div>\n\n    <div class="text ph-16 pb-16" ng-if="card.text">\n        {{card.text}}\n    </div>\n\n    <div class="media">\n        <img class="image" ng-src="{{card.media.image.src}}" alt="{{card.media.image.alt}}" ng-show="card.media.image">\n    </div>\n\n    <div class="buttons m-8">\n        <md-button class="md-icon-button mr-16" aria-label="Favorite">\n            <md-icon md-font-icon="icon-heart-outline" class="s24"></md-icon>\n        </md-button>\n        <md-button class="md-icon-button" aria-label="Share">\n            <md-icon md-font-icon="icon-share" class="s24"></md-icon>\n        </md-button>\n    </div>\n\n</div>'),e.put("app/core/directives/ms-click-to-call/ms-click-to-call.html",'<section ng-if="type !== \'button\'">\n    <span ng-if="!showMenu()">{{target}}</span>\n\n    <md-menu ng-if="showMenu()">\n        <a aria-label="Target" ng-click="$mdOpenMenu($event)">\n            <span ng-if="prefix">{{prefix}}-</span>{{target}}\n        </a>\n\n        <md-menu-content width="2">\n            <md-menu-item>\n                <md-button ng-click="call(prefix ? prefix + target : target)">\n                    {{\'DASHBOARDS.CALL_NUMBER\' | translate}} ({{prefix ? prefix + \'-\' + target : target}})\n                </md-button>\n            </md-menu-item>\n            <md-menu-item>\n                <md-button ng-click="transfer(prefix ? prefix + target : target)">\n                    {{\'DASHBOARDS.TRANSFER_NUMBER\' | translate}} ({{prefix ? prefix + \'-\' + target : target}})\n                </md-button>\n            </md-menu-item>\n        </md-menu-content>\n    </md-menu>\n</section>\n\n<section ng-if="type === \'button\'">\n    <md-button ng-if="!showMenu()" ng-disabled="true" class="md-icon-button md-raised md-accent ng-scope md-ink-ripple" title="NEW CALL" aria-label="NEW CALL">\n        <md-icon md-font-icon="icon-phone"></md-icon>\n    </md-button>\n\n    <md-menu ng-if="showMenu()">\n        <md-button class="md-icon-button md-raised md-accent ng-scope md-ink-ripple" title="NEW CALL" ng-click="$mdOpenMenu($event)" aria-label="NEW CALL">\n            <md-icon md-font-icon="icon-phone"></md-icon>\n        </md-button>\n\n        <md-menu-content width="2">\n            <md-menu-item>\n                <md-button ng-click="call(prefix ? prefix + target : target)">\n                    {{\'DASHBOARDS.CALL_NUMBER\' | translate}} ({{prefix ? prefix + \'-\' + target : target}})\n                </md-button>\n            </md-menu-item>\n            <md-menu-item>\n                <md-button ng-click="transfer(target)">\n'+"                    {{'DASHBOARDS.TRANSFER_NUMBER' | translate}} ({{prefix ? prefix + '-' + target : target}})\n                </md-button>\n            </md-menu-item>\n        </md-menu-content>\n    </md-menu>\n</section>"),e.put("app/core/directives/ms-dual-multiselect/ms-dual-multiselect.html",'<div ng-cloak layout-gt-sm="row" layout="column">\n    <div flex-gt-sm="50" flex="45">\n        <md-input-container class="md-icon-float md-block margin-0">\n            <md-icon md-font-icon="icon-magnify" aria-label="swap"></md-icon>\n            <input ng-model="query" type="text" placeholder="Search...">\n        </md-input-container>\n        <md-content class="border h-300">\n            <md-list class="md-dense" layout-fill layout-align="center center">\n                <md-list-item class="md-3-line" ng-repeat="item in options.items | filter: query | orderBy: options.orderBy" ng-click="transfer(options.items, options.selectedItems, options.items.indexOf(item), false)">\n                    <div class="md-list-item-text" layout="column">\n                        <h3 ng-if="options.line1">{{getLine(item, options.line1)}}</h3>\n                        <h4 ng-if="options.line2">{{getLine(item, options.line2)}}</h4>\n                        <p ng-if="options.line3">{{getLine(item, options.line3)}}</p>\n                    </div>\n                    <md-icon md-font-icon="icon-arrow-right-bold" aria-label="swap"></md-icon>\n                    <md-divider></md-divider>\n                </md-list-item>\n            </md-list>\n        </md-content>\n        <div class="margin-10" layout="row">\n            <span class="h4" flex>{{options.labelAll || \'All Items\'}} ({{options.items.length}})</span>\n            <md-icon ng-show="options.showSelectAndDeselectAll" md-font-icon="icon-chevron-double-right" aria-label="swap" ng-click="transfer(options.items, options.selectedItems, -1, false)"></md-icon>\n        </div>\n    </div>\n\n    <div flex="10" layout="row" layout-align="center center">\n        <md-icon md-font-icon="icon-swap-horizontal" aria-label="swap"></md-icon>\n    </div>\n\n    <div flex-gt-sm="50" flex="45">\n        <md-input-container class="md-icon-float md-block margin-0">\n            <md-icon md-font-icon="icon-magnify" aria-label="swap"></md-icon>\n            <input ng-model="selectedQuery" type="text" placeholder="Search...">\n        </md-input-container>\n        <md-content class="border h-300">\n            <md-list class="md-dense" layout-fill layout-align="center center">\n                <md-list-item class="md-3-line" ng-repeat="item in options.selectedItems | filter: selectedQuery | orderBy: options.orderBy" ng-click="transfer(options.selectedItems, options.items, options.selectedItems.indexOf(item), true)">\n                    <md-icon md-font-icon="icon-arrow-left-bold" aria-label="swap"></md-icon>\n                    <div class="md-list-item-text" layout="column">\n                        <h3 ng-if="options.line1">{{getLine(item, options.line1)}}</h3>\n                        <h4 ng-if="options.line2">{{getLine(item, options.line2)}}</h4>\n                        <p ng-if="options.line3">{{getLine(item, options.line3)}}</p>\n                    </div>\n                    <md-divider></md-divider>\n                </md-list-item>\n            </md-list>\n        </md-content>\n        <div class="margin-10" layout="row">\n            <md-icon ng-show="options.showSelectAndDeselectAll" md-font-icon="icon-chevron-double-left" aria-label="swap" flex ng-click="transfer(options.selectedItems, options.items, -1, true)"></md-icon>\n            <span class="h4">{{options.labelSelected || \'Selected Items\'}} ({{options.selectedItems.length}})</span>\n        </div>\n    </div>\n</div>'),e.put("app/core/directives/ms-font-family/ms-font-family.html",'<md-select ng-model="ngModel" class="no-margin">\n    <md-option ng-repeat="font in fonts" ng-value="font.value" <span ng-style="{\'font-family\': font.value}">{{font.option}}</span>\n    </md-option>\n</md-select>'),e.put("app/core/directives/ms-info-bar/ms-info-bar.html",'<div id="ms-info-bar" layout="row" layout-align="start center" flex>\n    <div id="ms-info-bar-message" ng-transclude flex></div>\n    <md-button id="ms-info-bar-close" class="md-icon-button" aria-label="Close" ng-click="removeInfoBar()">\n        <md-icon md-font-icon="icon-close s20"></md-icon>\n    </md-button>\n</div>'),e.put("app/core/directives/ms-material-color-picker/ms-material-color-picker.html",'<md-menu md-position-mode="target-right target">\n\n    <div ng-click="$mdOpenMenu($event)">\n        <ms-color-picker-button>\n            <md-button aria-label="Row Color" md-menu-origin ng-click="$mdOpenMenu($event)" ng-class="vm.selectedColor.class">\n\n                <span ng-show="vm.selectedColor.palette">\n                    {{vm.selectedColor.palette}} {{vm.selectedColor.hue}}\n                </span>\n                <span ng-show="!vm.selectedColor.palette">\n                    Select Color\n                </span>\n            </md-button>\n        </ms-color-picker-button>\n    </div>\n\n    <md-menu-content class="ms-material-color-picker-menu-content" layout-column>\n\n        <header ng-class="vm.selectedColor.class || \'md-accent-bg\'" class="md-whiteframe-4dp" layout="row" layout-align="space-between center">\n            <md-button md-prevent-menu-close ng-click="vm.activateHueSelection(false,false)" class="md-icon-button" ng-class="{\'hidden\':!vm.selectedPalette}" aria-label="Palette">\n                <md-icon md-font-icon="icon-arrow-left" class="s20"></md-icon>\n            </md-button>\n\n            <span ng-if="vm.selectedColor.palette">\n                {{vm.selectedColor.palette}} {{vm.selectedColor.hue}}\n            </span>\n\n            <span ng-if="!vm.selectedColor.palette">\n                Select Color\n            </span>\n\n            <md-button class="remove-color-button md-icon-button" ng-click="vm.removeColor()" aria-label="Remove Color">\n                <md-icon md-font-icon="icon-delete" class="s20"></md-icon>\n            </md-button>\n        </header>\n\n        <div class="colors" ms-scroll>\n            <div ng-show="!vm.selectedPalette" layout="row" layout-wrap>\n                <div class="color" ng-class="\'md-\'+palette+\'-500-bg\'" ng-repeat="(palette, hues) in vm.palettes" ng-click="vm.activateHueSelection(palette,hues)" layout="row" layout-align="start end" md-prevent-menu-close md-ink-ripple>\n                    <span class="label">\n                        {{palette}}\n                    </span>\n                </div>\n            </div>\n\n            <div ng-show="vm.selectedPalette" layout="row" layout-wrap>\n                <div class="color" ng-class="\'md-\'+vm.selectedPalette+\'-\'+hue+\'-bg\'" ng-repeat="(hue, values) in vm.selectedHues" ng-click="vm.selectColor(vm.selectedPalette,hue)" layout="row" layout-align="start end" md-ink-ripple>\n                    <span class="label">\n                        {{hue}}\n                    </span>\n                    <i ng-if="vm.selectedPalette == vm.selectedColor.palette && hue == vm.selectedColor.hue" class="s16 icon-check">\n                    </i>\n                </div>\n            </div>\n\n        </div>\n\n    </md-menu-content>\n</md-menu>'),e.put("app/core/directives/ms-navigation/templates/horizontal.html",'<div class="navigation-toggle" hide-gt-sm>\n    <md-button class="md-icon-button" ng-click="vm.toggleHorizontalMobileMenu()" aria-label="Toggle Mobile Navigation">\n        <md-icon md-font-icon="icon-menu"></md-icon>\n    </md-button>\n</div>\n\n<ul class="horizontal">\n    <li ng-repeat="node in vm.navigation" ms-navigation-horizontal-node="node" ng-class="{\'has-children\': vm.hasChildren}" ng-include="\'navigation-horizontal-nested.html\'"></li>\n</ul>\n\n\x3c!-- Nested horizontal navigation template --\x3e\n<script type="text/ng-template" id="navigation-horizontal-nested.html">\n\n    <div ms-navigation-horizontal-item layout="row" ng-if="!vm.isHidden()">\n\n        <div class="ms-navigation-horizontal-button" ng-if="!node.uisref && node.title" ng-class="{\'active md-accent-bg md-accent-fg\': vm.isActive}">\n            <i class="icon s18 {{node.icon}}" ng-if="node.icon"></i>\n            <span class="title" translate="{{node.translate}}" flex>{{node.title}}</span>\n            <span class="badge white-fg" style="background: {{node.badge.color}}" ng-if="node.badge">{{node.badge.content}}</span>\n            <i class="icon-chevron-right s18 arrow" ng-if="vm.hasChildren"></i>\n        </div>\n\n        <a class="ms-navigation-horizontal-button" ui-sref="{{node.uisref}}" ui-sref-active="active md-accent-bg" ng-class="{\'active md-accent-bg md-accent-fg\': vm.isActive}" ng-if="node.uisref && node.title">\n            <i class="icon s18 {{node.icon}}" ng-if="node.icon"></i>\n            <span class="title" translate="{{node.translate}}" flex>{{node.title}}</span>\n            <span class="badge white-fg" style="background: {{node.badge.color}}" ng-if="node.badge">{{node.badge.content}}</span>\n            <i class="icon-chevron-right s18 arrow" ng-if="vm.hasChildren"></i>\n        </a>\n\n    </div>\n\n    <ul ng-if="vm.hasChildren && !vm.isHidden()">\n        <li ng-repeat="node in node.children" ms-navigation-horizontal-node="node" ng-class="{\'has-children\': vm.hasChildren}" ng-include="\'navigation-horizontal-nested.html\'"></li>\n    </ul>\n\n<\/script>\n\x3c!-- / Nested navigation template --\x3e'),e.put("app/core/directives/ms-navigation/templates/vertical.html",'<ul>\n    <li ng-repeat="node in vm.navigation" ms-navigation-node="node" ng-class="{\'collapsed\': vm.collapsed, \'has-children\': vm.hasChildren}" ng-include="\'navigation-nested.html\'"></li>\n</ul>\n\n\x3c!-- Nested navigation template --\x3e\n<script type="text/ng-template" id="navigation-nested.html">\n\n    <div ms-navigation-item layout="row" ng-if="!vm.isHidden()">\n\n        <div class="ms-navigation-button" ng-if="!node.uisref && node.title">\n            <i class="icon s16 {{node.icon}}" ng-if="node.icon"></i>\n            <span class="title" translate="{{node.translate}}" flex>{{node.title}}</span>\n            <span class="badge white-fg margin-right-20" ng-style="{\'background\': node.badge.color}" ng-if="node.badge">{{node.badge.content}}</span>\n            <i class="icon-chevron-right s16 arrow" ng-if="vm.collapsable && vm.hasChildren"></i>\n        </div>\n\n        <a class="ms-navigation-button" ui-sref="{{node.uisref}}" ui-sref-active="active md-accent-bg" ng-if="node.uisref && node.title">\n            <i class="icon s16 {{node.icon}}" ng-if="node.icon"></i>\n            <span class="title" translate="{{node.translate}}" flex>{{node.title}}</span>\n            <span class="badge white-fg margin-right-20" ng-style="{\'background\': node.badge.color}" ng-if="node.badge">{{node.badge.content}}</span>\n            <i class="icon-chevron-right s16 arrow" ng-if="vm.collapsable && vm.hasChildren"></i>\n        </a>\n\n    </div>\n\n    <ul ng-if="vm.hasChildren && !vm.isHidden()">\n        <li ng-repeat="node in node.children" ms-navigation-node="node" ng-class="{\'collapsed\': vm.collapsed, \'has-children\': vm.hasChildren}" ng-include="\'navigation-nested.html\'"></li>\n    </ul>\n\n<\/script>\n\x3c!-- / Nested navigation template --\x3e'),e.put("assets/ms-phonebar/ms-phonebar-dialpad.html",'\x3c!-- Dialpad --\x3e\n<md-content ng-if="vm_pb.showDialpad" class="num-pad" layout="column">\n    <section layout="row" layout-align="start center">\n        <span><img class="num-pad-logo" layout-padding src="/api/settings/1/logo" alt="logo" /></span>\n        <span class="md-subhead">Dialpad</span>\n        <div layout="row" layout-align="end center" flex>\n            <md-button class="md-icon-button" ng-click="vm_pb.closeDialpad()">\n                <md-icon md-font-icon="icon-close"></md-icon>\n            </md-button>\n        </div>\n    </section>\n    <md-divider></md-divider>\n    <section layout="row">\n        <div class="span4" ng-repeat="item in ::[{n: 1, l: []}, {n: 2, l: [\'a\', \'b\', \'c\']}, {n: 3, l: [\'d\', \'e\', \'f\']}]" ng-click="vm_pb.type(item.n, true)">\n            <div class="num">\n                <div class="txt">\n                    {{item.n}} <span class="small">\n                  <p>\n                  <span ng-repeat="l in ::item.l">{{l | uppercase}}</span>\n                    </p>\n                    </span>\n                </div>\n            </div>\n        </div>\n    </section>\n    <section layout="row">\n        <div class="span4" ng-repeat="item in ::[{n: 4, l: [\'g\', \'h\', \'i\']}, {n: 5, l: [\'j\', \'k\', \'l\']}, {n: 6, l: [\'m\', \'n\', \'o\']}]" ng-click="vm_pb.type(item.n, true)">\n            <div class="num">\n                <div class="txt">\n                    {{item.n}} <span class="small">\n                  <p>\n                    <span ng-repeat="l in ::item.l">{{l | uppercase}}</span>\n                    </p>\n                    </span>\n                </div>\n            </div>\n        </div>\n    </section>\n    <section layout="row">\n        <div class="span4" ng-repeat="item in ::[{n: 7, l: [\'p\', \'q\', \'r\', \'s\']}, {n: 8, l: [\'t\', \'u\', \'v\']}, {n: 9, l: [\'w\', \'x\', \'y\', \'z\']}]" ng-click="vm_pb.type(item.n, true)">\n            <div class="num">\n                <div class="txt">\n                    {{item.n}} <span class="small">\n                  <p>\n                    <span ng-repeat="l in ::item.l">{{l | uppercase}}</span>\n                    </p>\n                    </span>\n                </div>\n            </div>\n        </div>\n    </section>\n    <section layout="row">\n        <div class="span4" ng-repeat="item in ::[{n: \'*\', l: []}]" ng-click="vm_pb.type(item.n, true)">\n            <div class="num" layout="column" layout-align="center center">\n                <div class="txt" layout="column" layout-align="center center">\n                    {{item.n}}\n                </div>\n            </div>\n        </div>\n        <div class="span4" ng-repeat="item in ::[{n: 0, l: [\'+\']}]" ng-click="vm_pb.type(item.n, true)">\n            <div class="num">\n                <div class="txt">\n                    {{item.n}} <span class="small">\n                <p>\n                  <span ng-repeat="l in ::item.l">{{l | uppercase}}</span>\n                    </p>\n                    </span>\n                </div>\n            </div>\n        </div>\n        <div class="span4" ng-repeat="item in ::[{n: \'#\', l: []}]" ng-click="vm_pb.type(item.n, true)">\n            <div class="num" layout="column" layout-align="center center">\n                <div class="txt" layout="column" layout-align="center center">\n                    {{item.n}}\n                </div>\n            </div>\n        </div>\n    </section>\n</md-content>\n\x3c!-- Dialpad --\x3e\n\n\x3c!-- Input Area --\x3e\n<div layout="row" layout-align="start center">\n    <div layout="row" layout-align="center center">\n        \x3c!-- START Ringing Tone--\x3e\n        <md-button class="md-fab md-mini white-bg width-25 height-25 margin-5" aria-label="Ringing" ng-click="vm_pb.toggleVolume(\'ringing\')" ng-disabled="!vm_pb.registered">\n            <md-icon md-font-icon="{{vm_pb.conf.ringingMute ? \'icon-bell-off\' : \'icon-bell-ring\'}}" class="icon s14" ng-class="vm_pb.conf.ringingMute ? \'red-fg\' : \'grey-fg\'">\n                <md-tooltip><span translate="TOOLBAR.RINGING">Ringing</span></md-tooltip>\n            </md-icon>\n        </md-button>\n        \x3c!-- END Ringing Tone --\x3e\n\n        \x3c!-- START Speaker --\x3e\n        <md-button class="md-fab md-mini white-bg width-25 height-25 margin-5" aria-label="Speaker" ng-click="vm_pb.toggleVolume(\'speaker\')" ng-disabled="!vm_pb.registered">\n            <md-icon md-font-icon="{{vm_pb.conf.speakerMute ? \'icon-volume-off\' : \'icon-volume\'}}" class="icon s14" ng-class="vm_pb.conf.speakerMute ? \'red-fg\' : \'grey-fg\'">\n                <md-tooltip><span translate="TOOLBAR.SPEAKER">Speaker</span></md-tooltip>\n            </md-icon>\n        </md-button>\n        \x3c!-- END Speaker --\x3e\n\n        \x3c!-- START Microphone --\x3e\n        <md-button class="md-fab md-mini white-bg width-25 height-25 margin-5" aria-label="Microphone" ng-click="vm_pb.toggleVolume(\'microphone\')" ng-disabled="!vm_pb.registered">\n            <md-icon md-font-icon="{{vm_pb.conf.microphoneMute ? \'icon-microphone-off\' : \'icon-microphone\'}}" class="icon s14" ng-class="vm_pb.conf.microphoneMute ? \'red-fg\' : \'grey-fg\'">\n                <md-tooltip><span translate="TOOLBAR.MICROPHONE">Microphone</span></md-tooltip>\n            </md-icon>\n        </md-button>\n        \x3c!-- END Microphone --\x3e\n\n        \x3c!-- START Registered --\x3e\n        <span>\n        <span class="quantity-indicator md-red-500-bg" ng-class="vm_pb.registered ? \'md-green-500-bg\' : \'md-red-500-bg\'"></span>\n        <md-tooltip><span>{{vm_pb.conf.license ? (vm_pb.registered ? \'TOOLBAR.REGISTERED\' : \'TOOLBAR.NOT_REGISTERED\') : \'TOOLBAR.WEBRTC_LICENSE_NOT_ENABELD\' | translate}} <timer ng-if="vm_pb.registered" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer></span></span>\n        </md-tooltip>\n        </span>\n        \x3c!-- END Registered --\x3e\n    </div>\n    <div layout="column" layout-align="center start">\n        <div layout="row" layout-align="start center">\n            \x3c!-- START Target --\x3e\n            <angucomplete-alt id="ms-target-wrap" pause="10" local-data="vm_pb.calls" search-fields="target" title-field="target" minlength="0" input-class="input-number" disable-input="!vm_pb.registered" match-class="highlight" template-url="assets/ms-phonebar/ms-phonebar-input.html"\n                input-changed="vm_pb.targetChanged" selected-object="vm_pb.targetSelected" clear-selected="true" ng-keypress="vm_pb.typeWrapper($event)" focus-first="true" />\n            \x3c!-- END Target --\x3e\n\n            \x3c!-- Auto Answer --\x3e\n            <div ng-if="vm_pb.conf.autoAnswer" class="red-fg" style="padding-left: 10px;">\n                <span class="font-size-20">A<span class="font-size-16">A</span></span>\n            </div>\n            \x3c!-- Auto Answer --\x3e\n\n            <md-button class="md-fab md-mini white-bg width-30 height-30" aria-label="Dialpad" ng-click="vm_pb.toggleDialpad()" ng-disabled="!vm_pb.registered">\n                <md-icon md-font-icon="icon-apps" class="icon grey-fg s16"></md-icon>\n            </md-button>\n            <md-button ng-if="vm_pb.target" class="md-fab md-mini white-bg width-25 height-25" aria-label="Call" style="margin-left: 0px;" ng-click="vm_pb.call()">\n                <md-icon md-font-icon="icon-phone" class="icon green-fg s12"></md-icon>\n            </md-button>\n        </div>\n    </div>\n</div>\n\x3c!-- Input Area --\x3e\n\n<div class="toolbar-separator"></div>\n\n\x3c!-- Sessions Area --\x3e\n<div class="sessions" layout="row" layout-align="start center" flex>\n    <div layout="row" layout-align="center center" ng-if="!vm_pb.conf.license">\n        <md-icon md-font-icon="icon-account-alert" class="icon s36 red-fg"></md-icon>\n        <span layout-margin translate="TOOLBAR.WEBRTC_LICENSE_NOT_ENABELD"></span>\n    </div>\n\n    <div ng-repeat="session in vm_pb.sessions" class="session" layout="row" ng-click="(vm_pb.sessions.length > 1) && vm_pb.selectSession(session)">\n        <md-button ng-if="vm_pb.conf.recording && session.confirmed" class="md-fab md-mini white-bg width-25 height-25 margin-5" aria-label="Record" ng-click="vm_pb.record(session); $event.stopPropagation();">\n            <md-icon md-font-icon="icon-radiobox-marked" class="icon s14" ng-class="session.monitor ? \'red-fg\' : \'grey-fg\'"></md-icon>\n        </md-button>\n        <div layout="column" layout-align="center start">\n            <span class="session-info">{{ (session.user == session.name) ? session.user : (session.name + \' \' + session.user) }}</span>\n            <span class="session-info" layout="row" layout="start center"><timer interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer></span>\n        </div>\n\n        \x3c!-- START Answer --\x3e\n        <md-button ng-if="session.incoming && !session.confirmed" class="md-fab md-mini white-bg width-25 height-25 margin-5" aria-label="Hold" ng-click="vm_pb.answer(session); $event.stopPropagation();">\n            <md-icon md-font-icon="icon-phone" class="icon green-fg s12"></md-icon>\n        </md-button>\n        \x3c!-- END Answer --\x3e\n\n        \x3c!-- START Hangup --\x3e\n        <md-button class="md-fab md-mini white-bg width-25 height-25 margin-5" aria-label="Terminate" ng-click="vm_pb.terminate(session); $event.stopPropagation();">\n            <md-icon md-font-icon="icon-phone-hangup" class="icon red-fg s12"></md-icon>\n        </md-button>\n        \x3c!-- END Hangup --\x3e\n\n        \x3c!-- START Hold/Unhold --\x3e\n        <md-button ng-if="session.confirmed" class="md-fab md-mini white-bg width-25 height-25 margin-5" aria-label="Hold" ng-click="(session.localHold ? vm_pb.unhold(session) : vm_pb.hold(session)); $event.stopPropagation();">\n            <md-icon md-font-icon="{{session.localHold ? \'icon-play\' : \'icon-pause\'}}" class="icon grey-fg s12"></md-icon>\n        </md-button>\n        \x3c!-- END Hold/Unhold --\x3e\n\n        \x3c!-- START Transfer --\x3e\n        <md-button ng-if="session.confirmed && !session.localHold && vm_pb.sessions.length == 1" class="md-fab md-mini white-bg width-25 height-25 margin-5" aria-label="Refer" ng-click="vm_pb.refer(session);  $event.stopPropagation();">\n            <md-icon md-font-icon="icon-phone-forward" class="icon purple-fg s12"></md-icon>\n        </md-button>\n        \x3c!-- END transfer --\x3e\n\n        \x3c!-- START Attended Transfer --\x3e\n        <md-button ng-if="session.confirmed && !session.localHold && vm_pb.sessions.length > 1" class="md-fab md-mini white-bg width-25 height-25 margin-5" aria-label="Refer Attended" ng-click="vm_pb.referAttended(session);  $event.stopPropagation();">\n            <md-icon md-font-icon="icon-phone-forward" class="icon purple-fg s12"></md-icon>\n        </md-button>\n        \x3c!-- END Attended Transfer --\x3e\n    </div>\n</div>\n\x3c!-- Sessions Area --\x3e'),e.put("assets/ms-phonebar/ms-phonebar-input.html",'<div class="angucomplete-holder" ng-class="{\'angucomplete-dropdown-visible\': showDropdown}">\n    <input id="ms-target" ng-model="searchStr" ng-disabled="disableInput" type="text" placeholder="{{placeholder}}" ng-focus="onFocusHandler()" class="{{inputClass}}" ng-focus="resetHideResults()" ng-blur="hideResults($event)" autocapitalize="off" autocorrect="off"\n        autocomplete="off" ng-change="inputChangeHandler(searchStr)" />\n    <div class="angucomplete-dropdown" ng-show="showDropdown && !(!searching && (!results || results.length == 0))">\n        <div class="angucomplete-row" ng-repeat="result in results" ng-click="selectResult(result)" ng-mouseenter="hoverRow($index)" ng-class="{\'angucomplete-selected-row\': $index == currentIndex}">\n            <div layout="row" layout-align="start center">\n                <md-icon md-font-icon="{{result.originalObject.inbound ? \'icon-arrow-bottom-left\' : \'icon-arrow-top-right\'}}" class="icon no-margin s22"></md-icon>\n                <span style="margin-left: 8px;">({{result.originalObject.time}}) - <span class="angucomplete-title" ng-if="matchClass" ng-bind-html="result.title"></span></span>\n            </div>\n        </div>\n    </div>\n</div>'),e.put("assets/ms-phonebar/ms-phonebar.html",'<div layout="row" layout-align="start center" flex>\n    \x3c!-- Audio stream --\x3e\n    <audio id="remote-audio" autoplay hidden=true></audio>\n    \x3c!-- Audio stream --\x3e\n\n    \x3c!-- WebRtc PhoneBar --\x3e\n    <div class="phonebar-container" ng-include="\'assets/ms-phonebar/ms-phonebar-dialpad.html\'" layout="row" layout-align="start center" flex></div>\n    \x3c!-- WebRtc PhoneBar --\x3e\n</div>'),e.put("assets/ms-phonebar/record/dialog.html",'<md-dialog aria-label="Recording" ng-init="vm.onInit()">\n    <form ng-cloak>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <div flex>\n                    <span class="title" translate="TOOLBAR.RECORDING">Recording</span>\n                </div>\n                <div layout="row" layout-align="end center">\n                    <md-button class="md-icon-button no-margin no-padding">\n                        <md-icon class="no-margin" md-font-icon="icon-plus" aria-label="Add" ng-click="vm.addRecording()"></md-icon>\n                    </md-button>\n                    <md-button class="md-icon-button no-margin no-padding" ng-click="vm.closeDialog()">\n                        <md-icon class="no-margin" md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-toolbar>\n\n        <md-table-container>\n            <table md-table layout-padding>\n                <thead md-head>\n                    <tr md-row>\n                        <th md-column><span translate="TOOLBAR.FILENAME">File name</span></th>\n                        <th md-column><span translate="TOOLBAR.STATUS">Status</span></th>\n                        <th md-column><span translate="TOOLBAR.ACTIONS">Actions</span></th>\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm.session.monitors.length">\n                        <td md-cell colspan="3">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="TOOLBAR.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="monitor in vm.session.monitors">\n                        <td md-cell>{{monitor.filename}}</td>\n                        <td md-cell class="no-padding">\n                            <md-icon md-font-icon="icon-radiobox-marked" class="icon s16" ng-class="(monitor.status == \'rec\') ? \'red-fg ms-blink\' : \'grey-fg\'"></md-icon>\n                        </td>\n                        <td md-cell class="no-padding">\n                            <md-button class="md-fab md-mini white-bg width-35 height-35 margin-5" aria-label="Record" ng-click="(monitor.status == \'rec\') ? vm.stop(monitor) : vm.start(monitor)">\n'+"                                <md-icon md-font-icon=\"{{monitor.status == 'rec' ? 'icon-stop' : 'icon-play'}}\" class=\"icon s16\" ng-class=\"monitor.status == 'rec' ? 'grey-fg' : 'red-fg'\"></md-icon>\n                            </md-button>\n                        </td>\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n    </form>\n</md-dialog>"),e.put("assets/ms-phonebar/referAttended/dialog.html",'<md-dialog aria-label="Transfer">\n    <form ng-cloak>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <div flex>\n                    <span class="title" translate="TOOLBAR.ATTENDED_TRANSFER">Transfer</span>\n                </div>\n                <div layout="row" layout-align="end center">\n                    <md-button class="md-icon-button no-margin no-padding" ng-click="vm.closeDialog()">\n                        <md-icon class="no-margin" md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content>\n            <label translate="TOOLBAR.TARGET">Target</label>\n            <md-input-container class="md-block">\n                <md-select ng-model="vm.target">\n                    <md-option ng-repeat="session in vm.sessions" ng-value="session.user">\n                        {{ session.name }}\n                    </md-option>\n                </md-select>\n            </md-input-container>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row">\n            <md-button ng-click="vm.transfer()" class="send-button md-accent md-raised" aria-label="transfer" ng-disabled="!vm.target && !vm.sessionId">\n                <span translate="TOOLBAR.TRANSFER">TRANSFER</span>\n            </md-button>\n            <md-button ng-click="vm.closeDialog()" class="send-button md-accent md-raised" aria-label="cancel">\n                <span translate="TOOLBAR.CANCEL">Cancel</span>\n            </md-button>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("assets/ms-phonebar/settings/settings.html",'<md-dialog class="md-phonebar-dialog" aria-label="{{vm.name}}">\n    <form name="settingsForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title" translate="TOOLBAR.SETTINGS">Settings</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content class="no-padding" ms-scroll>\n            <md-tabs md-no-pagination md-stretch-tabs="always">\n                <md-tab label="{{ \'TOOLBAR.PROFILE\' | translate}}">\n                    <md-content layout-padding layout="column">\n                        <span><span translate="TOOLBAR.FULLNAME">Fullname</span>: {{vm.conf.fullname}}</span>\n                        <span><span translate="TOOLBAR.NAME">Name</span>: {{vm.conf.name}}</span>\n                        <span><span translate="TOOLBAR.INTERNAL">Internal</span>: {{vm.conf.internal}}</span>\n                        <span><span translate="TOOLBAR.BROWSER">Browser</span>: {{vm.conf.browserName}} {{vm.conf.browserVersion}}</span>\n                        <span><span translate="TOOLBAR.OS">OS</span>: {{vm.conf.osName}} {{vm.conf.osVersion}}</span>\n                    </md-content>\n                </md-tab>\n                <md-tab label="{{ \'TOOLBAR.SERVICES\' | translate}}">\n                    <md-content layout-padding>\n                        <md-input-container class="md-block">\n                            <md-switch ng-model="vm.conf.autoAnswer" aria-label="Auto Answer">\n                                <span translate="TOOLBAR.AUTOANSWER">Auto Answer</span>\n                                <span>{{ vm.conf.autoAnswerDelay }} [s]</span>\n                            </md-switch>\n                        </md-input-container>\n                    </md-content>\n                </md-tab>\n                <md-tab label="{{ \'TOOLBAR.AUDIO\' | translate}}">\n                    <md-content layout-padding>\n                        <div class="border brad-5" layout-margin>\n                            <md-input-container class="md-block" ng-if="(vm.devices | filter: { kind: \'audiooutput\', deviceId: \'!default\' }).length">\n                                <label translate="TOOLBAR.RINGINGDEVICE">Ringing Device</label>\n                                <md-select name="ringingDevice" ng-model="vm.conf.ringingId" required>\n                                    <md-option ng-value="device.deviceId" ng-repeat="device in vm.devices | filter: { kind: \'audiooutput\', deviceId: \'!default\' }">{{ device.label || (\'Speaker \' + ($index + 1)) }}</md-option>\n                                </md-select>\n                                <div ng-messages="settingsForm[\'ringingDevice\'].$error" ng-show="settingsForm[\'ringingDevice\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLBAR.ERRORS.FIELD_REQUIRED">Field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <div layout="row" layout-align="space-between center">\n                                <md-switch ng-model="vm.conf.ringingMute" aria-label="Mute">\n                                    Mute\n                                </md-switch>\n\n                                <md-slider-container flex="80">\n                                    <md-slider flex step="0.1" min="0" max="1" ng-model="vm.conf.ringingVolume" aria-label="volume"></md-slider>\n                                </md-slider-container>\n                            </div>\n                        </div>\n\n                        <div class="border brad-5" layout-margin>\n                            <md-input-container class="md-block" ng-if="(vm.devices | filter: { kind: \'audiooutput\', deviceId: \'!default\' }).length">\n                                <label translate="TOOLBAR.SPEAKERDEVICE">Speaker Device</label>\n                                <md-select name="speakerDevice" ng-model="vm.conf.speakerId" required>\n                                    <md-option ng-value="device.deviceId" ng-repeat="device in vm.devices | filter: { kind: \'audiooutput\', deviceId: \'!default\' }">{{ device.label || (\'Speaker \' + ($index + 1)) }}</md-option>\n                                </md-select>\n                                <div ng-messages="settingsForm[\'speakerDevice\'].$error" ng-show="settingsForm[\'speakerDevice\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLBAR.ERRORS.FIELD_REQUIRED">Field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <div layout="row" layout-align="space-between cetner">\n                                <md-switch ng-model="vm.conf.speakerMute" aria-label="Mute">\n                                    Mute\n                                </md-switch>\n\n                                <md-slider-container flex="80">\n                                    <md-slider flex step="0.1" min="0" max="1" ng-model="vm.conf.speakerVolume" aria-label="volume"></md-slider>\n                                </md-slider-container>\n                            </div>\n                        </div>\n\n                        <div class="border brad-5" layout-margin>\n                            <md-input-container class="md-block" ng-if="(vm.devices | filter: { kind: \'audioinput\', deviceId: \'!default\' }).length">\n                                <label translate="TOOLBAR.MICROPHONEDEVICE">Microphone Device</label>\n                                <md-select name="microphoneDevice" ng-model="vm.conf.microphoneId" required>\n                                    <md-option ng-value="device.deviceId" ng-repeat="device in vm.devices | filter: { kind: \'audioinput\', deviceId: \'!default\' }">{{ device.label || (\'Microphone \' + ($index + 1))}}</md-option>\n                                </md-select>\n                                <div ng-messages="settingsForm[\'microphoneDevice\'].$error" ng-show="settingsForm[\'microphoneDevice\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLBAR.ERRORS.FIELD_REQUIRED">Field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <div layout="row" layout-align="space-between center">\n                                <md-switch ng-model="vm.conf.microphoneMute" aria-label="Mute">\n                                    Mute\n                                </md-switch>\n                            </div>\n                        </div>\n                    </md-content>\n                </md-tab>\n                <md-tab label="{{ \'TOOLBAR.REQUIREMENTS\' | translate}}">\n                    <md-content layout-padding>\n                        <md-list>\n                            <md-list-item>\n                                <h3 translate="TOOLBAR.LICENSE">License</h3>\n                                <md-icon class="md-secondary" ng-class="vm.conf.license ? \'green-fg\' : \'red-fg\'" md-font-icon="{{vm.conf.license ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            </md-list-item>\n                            <md-list-item>\n                                <h3 translate="TOOLBAR.BROWSER_COMPATIBILITY">Browser Compatibility</h3>\n                                <md-icon class="md-secondary" ng-class="vm.isCompatibleBrowser() ? \'green-fg\' : \'red-fg\'" md-font-icon="{{vm.isCompatibleBrowser() ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            </md-list-item>\n                            <md-list-item>\n                                <h3 translate="TOOLBAR.HTTPS">HTTPS</h3>\n                                <md-icon class="md-secondary" ng-class="vm.conf.protocol === \'https\' ? \'green-fg\' : \'red-fg\'" md-font-icon="{{vm.conf.protocol === \'https\' ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            </md-list-item>\n                            <md-list-item>\n                                <h3 translate="TOOLBAR.WEBRTCSUPPORT">WebRTC Support</h3>\n                                <md-icon class="md-secondary" ng-class="vm.conf.isWebRTCSupported ? \'green-fg\' : \'red-fg\'" md-font-icon="{{vm.conf.isWebRTCSupported ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            </md-list-item>\n                            <md-list-item>\n                                <h3 translate="TOOLBAR.MICROPHONE">Microphone</h3>\n                                <md-icon class="md-secondary" ng-class="vm.conf.hasMicrophone ? \'green-fg\' : \'red-fg\'" md-font-icon="{{vm.conf.hasMicrophone ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            </md-list-item>\n                            <md-list-item>\n                                <h3 translate="TOOLBAR.SPEAKER">Speaker</h3>\n                                <md-icon class="md-secondary" ng-class="vm.conf.hasSpeakers ? \'green-fg\' : \'red-fg\'" md-font-icon="{{vm.conf.hasSpeakers ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            </md-list-item>\n                        </md-list>\n                    </md-content>\n                </md-tab>\n            </md-tabs>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveSettings()" class="send-button md-accent md-raised" ng-disabled="settingsForm.$invalid || settingsForm.$pristine" aria-label="SAVE" translate="TOOLBAR.SAVE" translate-attr-aria-label="TOOLBAR.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/core/directives/ms-search-bar/ms-search-bar.html",'<div flex layout="row" layout-align="start center">\n    <label for="ms-search-bar-input">\n        <md-button class="ms-search-bar-expander md-icon-button" aria-label="Expand Search Bar"\n                   ng-click="MsSearchBar.expand()"\n                   ng-if="!MsSearchBar.resultsLoading || MsSearchBar.collapsed">\n            <md-icon md-font-icon="icon-magnify" class="icon s24"></md-icon>\n        </md-button>\n        <div class="ms-search-bar-loader" layout="row" layout-align="center center"\n             ng-if="MsSearchBar.resultsLoading && !MsSearchBar.collapsed">\n            <md-progress-circular class="md-accent" md-diameter="32" md-mode="indeterminate"></md-progress-circular>\n        </div>\n    </label>\n    <input id="ms-search-bar-input" type="text" placeholder="Search" flex ng-model="MsSearchBar.query" ng-model-options="MsSearchBar.queryOptions" ng-blur="MsSearchBar.blurCollapse()" ng-keydown="MsSearchBar.handleKeydown($event)">\n    <md-button class="ms-search-bar-collapser md-icon-button" ng-click="MsSearchBar.collapse()" aria-label="Collapse Search Bar">\n        <md-icon md-font-icon="icon-close" class="icon s24"></md-icon>\n    </md-button>\n\n    <div class="ms-search-bar-results" ng-if="MsSearchBar.results" ms-scroll>\n        <div class="no-results" ng-if="MsSearchBar.results.length === 0">No Results!</div>\n\n        <div class="result" ng-repeat="result in MsSearchBar.results" ng-click="MsSearchBar.handleResultClick(result)" ng-mouseenter="MsSearchBar.handleMouseenter($index)" ng-mousedown="MsSearchBar.absorbEvent($event)" ng-class="{\'selected\': $index == MsSearchBar.selectedResultIndex}"\n            md-ink-ripple>\n            <div layout="row" layout-align="start center">\n                <div class="icon-container" layout="row" layout-align="center center">\n                    <i ng-if="result.icon" class="icon {{result.icon}}"></i>\n                    <div ng-if="!result.icon" class="square md-accent-bg"></div>\n                </div>\n                <div>\n                    <div class="title">{{result.title}}</div>\n                    <div class="description" ng-if="result.description">{{result.description}}</div>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>'),e.put("app/core/directives/ms-shortcuts/ms-shortcuts.html",'<div class="shortcuts-container" layout="row" layout-align="space-between center" flex ng-class="{\'mobile-bar-active\': MsShortcuts.mobileBarActive}">\n\n    <div class="flex-noshrink" layout="row" layout-align="start center" flex>\n        <div class="shortcuts hide show-gt-xs" layout="row" layout-align="start center" ms-scroll ng-if="MsShortcuts.shortcuts.length > 0" ng-sortable="MsShortcuts.sortableOptions">\n            <div ng-repeat="shortcut in MsShortcuts.shortcuts" layout="row" layout-align="center center">\n                <md-button class="md-icon-button shortcut" aria-label="{{shortcut.title}}" ui-sref="{{shortcut.uisref}}">\n                    <md-icon ng-if="shortcut.icon" md-font-icon="{{shortcut.icon}}" class="icon s24"></md-icon>\n                    <div ng-if="!shortcut.icon" class="first-letter">{{shortcut.title.charAt(0)}}</div>\n                    <md-tooltip md-direction="bottom">{{shortcut.title}}</md-tooltip>\n                </md-button>\n            </div>\n        </div>\n\n        \x3c!-- <md-menu md-offset="8 56" class="shortcut-menu hide show-gt-xs">\n            <md-button class="md-icon-button add-shortcut-button" aria-label="Add shortcut"\n                       ng-click="$mdOpenMenu($event)">\n                <md-icon md-menu-origin md-font-icon="icon-star" class="icon amber-600-fg s24"></md-icon>\n                <md-tooltip md-direction="bottom">Click to add/remove shortcut</md-tooltip>\n            </md-button>\n\n            <md-menu-content>\n                <div id="ms-shortcut-add-menu">\n                    <div class="shortcut-search" layout="row" layout-align="start center">\n                        <div class="search-icon" layout="row" layout-align="center center"\n                             ng-if="!MsShortcuts.resultsLoading">\n                            <md-icon md-menu-align-target md-font-icon="icon-magnify" class="icon s24"></md-icon>\n                        </div>\n                        <div class="shortcut-loader" layout="row" layout-align="center center"\n                             ng-if="MsShortcuts.resultsLoading">\n                            <md-progress-circular class="md-accent" md-diameter="20" md-mode="indeterminate">\n                            </md-progress-circular>\n                        </div>\n\n                        <input type="text" placeholder="Search" flex\n                               ng-model="MsShortcuts.query"\n                               ng-model-options="MsShortcuts.queryOptions"\n                               ng-keydown="MsShortcuts.handleKeydown($event)">\n                    </div>\n\n                    <div class="results" ng-if="MsShortcuts.results" ms-scroll>\n                        <div class="no-results" ng-if="MsShortcuts.results.length === 0">No Results!</div>\n\n                        <div class="result" ng-repeat="result in MsShortcuts.results"\n                             ng-click="MsShortcuts.handleResultClick(result)"\n                             ng-mouseenter="MsShortcuts.handleMouseenter($index)"\n                             ng-mousedown="MsShortcuts.absorbEvent($event)"\n                             ng-class="{\'selected\': $index == MsShortcuts.selectedResultIndex}"\n                             md-prevent-menu-close="md-prevent-menu-close"\n                             md-ink-ripple>\n                            <div layout="row" layout-align="start space-between">\n                                <div layout="row" layout-align="start center" flex>\n                                    <div class="icon icon-container" layout="row" layout-align="center center">\n                                        <i ng-if="result.icon" class="{{result.icon}}"></i>\n                                        <div ng-if="!result.icon" class="square md-accent-bg"></div>\n                                    </div>\n                                    <div>\n                                        <div class="title">{{result.title}}</div>\n                                    </div>\n                                </div>\n                                <md-icon md-font-icon="icon-pin" class="icon s18"\n                                         ng-class="{\'fade-text\': !result.hasShortcut}"></md-icon>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n            </md-menu-content>\n        </md-menu> --\x3e\n    </div>\n\n    <md-button class="md-icon-button toggle-mobile-menu hide-gt-xs" aria-label="Add shortcut" ng-click="MsShortcuts.toggleMobileBar()">\n        <md-icon md-menu-origin md-font-icon="icon-star" class="icon amber-600-fg s24" ng-hide="MsShortcuts.mobileBarActive"></md-icon>\n        <md-icon md-menu-origin md-font-icon="icon-close" class="icon s24" ng-hide="!MsShortcuts.mobileBarActive"></md-icon>\n    </md-button>\n</div>'),e.put("app/core/directives/ms-stepper/templates/horizontal/horizontal.html",'<div class="ms-stepper-horizontal">\n    <div class="ms-stepper-navigation-wrapper">\n        <div class="ms-stepper-navigation" layout="row" layout-align="center center">\n            <md-button class="ms-stepper-navigation-item" ng-class="{\'current\': MsStepper.isStepCurrent(step.stepNumber), \'valid\': MsStepper.isStepValid(step.stepNumber), \'disabled\': MsStepper.isStepDisabled(step.stepNumber), \'optional\': MsStepper.isStepOptional(step.stepNumber)}"\n                ng-click="MsStepper.gotoStep(step.stepNumber)" ng-disabled="MsStepper.isStepDisabled(step.stepNumber)" ng-repeat="step in MsStepper.steps | filter:MsStepper.filterHiddenStep" layout="row" layout-align="start center">\n\n                <div class="step md-accent-bg" layout="row" layout-align="center center">\n                    <span ng-if="!MsStepper.isStepValid(step.stepNumber) || MsStepper.isStepOptional(step.stepNumber)">\n                    {{$index + 1}}\n                </span>\n                    <span ng-if="MsStepper.isStepValid(step.stepNumber) && !MsStepper.isStepOptional(step.stepNumber)">\n                    <i class="icon icon-check s18"></i>\n                </span>\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="title" translate="{{step.stepTitleTranslate}}">{{step.stepTitle}}</div>\n                    <div class="subtitle" ng-if="MsStepper.isStepOptional(step.stepNumber)">Optional</div>\n                </div>\n            </md-button>\n        </div>\n    </div>\n\n    <div class="ms-stepper-steps" ng-transclude></div>\n\n    <div class="ms-stepper-controls" layout="row" layout-align="center center">\n        <md-button class="md-accent md-raised" ng-disabled="MsStepper.isFirstStep()" ng-click="MsStepper.gotoPreviousStep()">\n            Back\n        </md-button>\n\n        <div class="ms-stepper-dots">\n            <span ng-repeat="step in MsStepper.steps" ng-hide="MsStepper.isStepHidden(step.stepNumber)" ng-class="{\'selected md-accent-bg\':MsStepper.currentStepNumber === $index + 1}">\n            </span>\n        </div>\n\n        <md-button class="md-accent md-raised" ng-if="!MsStepper.isLastStep()" ng-disabled="!MsStepper.isStepValid(MsStepper.currentStepNumber)" ng-click="MsStepper.gotoNextStep()">\n            Next\n        </md-button>\n\n        <md-button type="submit" class="md-accent md-raised" ng-click="MsStepper.resetForm()" ng-if="MsStepper.isLastStep()" ng-disabled="!MsStepper.isFormValid()">\n            Submit\n        </md-button>\n    </div>\n</div>'),e.put("app/core/directives/ms-stepper/templates/vertical/step/vertical-step.html","<md-button class=\"ms-stepper-navigation-item\" ng-class=\"{'current': MsStepper.isStepCurrent(stepInfo.stepNumber), 'valid': MsStepper.isStepValid(stepInfo.stepNumber), 'disabled': MsStepper.isStepDisabled(stepInfo.stepNumber), 'optional': MsStepper.isStepOptional(stepInfo.stepNumber)}\"\n"+'    ng-click="MsStepper.gotoStep(stepInfo.stepNumber)" ng-disabled="MsStepper.isStepDisabled(stepInfo.stepNumber)" ng-hide="MsStepper.isStepHidden(stepInfo.stepNumber)" aria-label="Stepper navigation button" layout="row" layout-align="start center">\n\n    <div class="step" layout="row" layout-align="center center">\n        <span ng-if="!MsStepper.isStepValid(stepInfo.stepNumber) || MsStepper.isStepOptional(stepInfo.stepNumber)">\n            <i class="icon icon-checkbox-blank-circle-outline s18 md-accent-fg"></i>\n        </span>\n        <span ng-if="MsStepper.isStepValid(stepInfo.stepNumber) && !MsStepper.isStepOptional(stepInfo.stepNumber)">\n            <i class="icon icon-check-circle s18 md-accent-fg"></i>\n        </span>\n    </div>\n\n    <div layout="column" layout-align="start start">\n        <div class="title" ng-if="stepInfo.stepTitleTranslate">{{stepInfo.stepTitleTranslate | translate }}</div>\n        <div class="title" ng-if="!stepInfo.stepTitleTranslate">{{stepInfo.stepTitle}}</div>\n        <div class="subtitle" ng-if="MsStepper.isStepOptional(stepInfo.stepNumber)">Optional</div>\n    </div>\n</md-button>\n\n<div class="ms-stepper-step-content" ng-transclude></div>\n\n<div class="ms-stepper-controls" layout="row" layout-align="start center" ng-show="MsStepper.isStepCurrent(stepInfo.stepNumber)">\n    <md-button class="md-accent md-raised" ng-disabled="MsStepper.isFirstStep()" ng-click="MsStepper.gotoPreviousStep()">\n        Back\n    </md-button>\n\n    <md-button class="md-accent md-raised" ng-if="!MsStepper.isLastStep()" ng-disabled="!MsStepper.isStepValid(MsStepper.currentStepNumber)" ng-click="MsStepper.gotoNextStep()">\n        Next\n    </md-button>\n\n    <md-button type="submit" class="md-accent md-raised" ng-click="MsStepper.resetForm()" ng-if="MsStepper.isLastStep()" ng-disabled="!MsStepper.isFormValid()">\n        Submit\n    </md-button>\n</div>'),e.put("app/core/directives/ms-stepper/templates/vertical/vertical.html",'<div class="ms-stepper-vertical">\n    <div class="ms-stepper-vertical-line"></div>\n    <div class="ms-stepper-steps" ng-transclude></div>\n</div>'),e.put("app/core/directives/ms-timezone/ms-timezone.html",'<md-select ng-model="ngModel" class="no-margin">\n    <md-option ng-value="null">NONE</md-option>\n    <md-option ng-repeat="t in timezone | orderBy:\'utcOffset\'" value="{{t.name}}">{{t.name}} ({{t.offsetStr}})</md-option>\n</md-select>'),e.put("app/core/directives/ms-widget-engine/ms-widget-engine-counter/ms-widget-engine.counter.html",'<div class="pt-8 pb-32" layout="column" layout-align="center center" layout-fill ng-controller="MsWidgetEngineCounterController as vm">\n    <div ng-class="\'font-size-\' + (vm.fontSize * 3)" ng-style="{\'color\': widget.foreground}">\n        {{ vm.getCount(widget) }}\n    </div>\n    <div ng-class="\'font-size-\' + vm.fontSize" ng-style="{\'color\': widget.foreground}">{{ \'TOOLS.\' + widget.attrs[0].value | uppercase | translate }}<span ng-if="vm.filtered">*</span></div>\n</div>'),e.put("app/core/directives/ms-widget-engine/ms-widget-engine-multibar-chart/ms-widget-engine.multibar-chart.html",'<div ng-controller="MsWidgetEngineMultibarChartController as vm" ng-init="vm.getMultiBarChart(widget)" layout="column" layout-fill>\n\n    <span ng-show="false">{{ vm.getMultiBarChart(widget)}}</span>\n\n    <canvas style="overflow:scroll" id="bar" class="chart-horizontal-bar" chart-data="vm.multiBarChart.data" chart-options="vm.multiBarChart.options" chart-series="vm.multiBarChart.series" chart-labels="vm.multiBarChart.labels">\n    </canvas>\n</div>'),e.put("app/core/directives/ms-widget-engine/ms-widget-engine-pie-chart/ms-widget-engine.pie-chart.html",'<div ng-controller="MsWidgetEnginePieChartController as vm" ng-init="vm.getPieChart(widget)" layout="column" layout-fill>\n\n    <span ng-show="false">{{ vm.getPieChart(widget)}}</span>\n\n    <canvas style="overflow:scroll" id="pie" class="chart-pie" chart-data="vm.pieChart.data" chart-labels="vm.pieChart.labels" chart-options="vm.pieChart.options">\n    </canvas>\n</div>'),e.put("app/core/directives/ms-widget-engine/ms-widget-engine-web-report/ms-widget-engine.web-report.html",'<div ng-controller="MsWidgetEngineWebReportController as vm" ng-init="vm.onInit(widget)">\n    <dl ng-if="vm.error">\n        <dt class="text-bold">Query Error</dt>\n        <dd>{{vm.error.sql}}</dd>\n        <dt>Message</dt>\n        <dd>{{vm.error.msg}}</dd>\n    </dl>\n    <md-toolbar class="md-table-toolbar md-default">\n        <div class="md-toolbar-tools">\n            <span class="md-subhead">{{vm.title}}</span>\n            <div flex></div>\n            <md-button class="md-icon-button" ng-click="vm.onInit(widget)" aria-label="refresh">\n                <md-icon md-font-icon="icon-refresh"></md-icon>\n            </md-button>\n            <span ng-if="vm.refresh && vm.countDown" class="md-subhead blue-fg">{{vm.countDown}}</span>\n        </div>\n    </md-toolbar>\n    <md-table-container ng-if="!vm.error">\n        <table md-table md-progress="vm.promise">\n            <thead md-head>\n                <tr md-row>\n                    <th md-column ng-repeat="column in vm.columns">{{column.alias || column.field}}</th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-repeat="row in vm.results.rows">\n                    <td md-cell ng-repeat="(key, value) in row">{{ vm.valueReplacer(key, value) }}</td>\n                </tr>\n                <tr md-row ng-if="!vm.results.rows.length">\n                    <td md-cell colspan="{{vm.columns.length}}">\n                        <div layout="row" layout-align="center center">\n                            <span>No Data</span>\n                        </div>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.results.count}}" md-on-paginate="vm.getResults" md-page-select></md-table-pagination>\n</div>'),e.put("app/core/directives/ms-widget-engine/ms-widget-engine.html",'<div gridster="vm.config">\n    <ul>\n        <li gridster-item="widget" ng-repeat="widget in vm.config.widgets">\n            <md-card layout-fill>\n                <md-toolbar class="height-40" ng-style="{\'background-color\': widget.background, \'color\': widget.foreground }">\n                    <div class="md-toolbar-tools height-40 no-margin" layout="row" layout-align="start center">\n                        <a ng-href="{{widget.link ? widget.link : \'javascript:void(0)\'}}" ng-style="{\'color\': widget.foreground}" class="text-truncate" flex>\n                            {{ widget.title || \'No Title\' }}\n                        </a>\n                        <md-button ng-if="!vm.config.preview" class="draggable md-icon-button width-30 no-margin no-padding" aria-label="Move">\n                            <md-tooltip><span translate="TOOLS.MOVE_WIDGET">Move</span></md-tooltip>\n                            <md-icon md-font-icon="icon-cursor-move" class="s20" ng-style="{\'color\': widget.foreground}"></md-icon>\n                        </md-button>\n                        <md-menu ng-if="!vm.config.preview">\n                            <md-button ng-click="$mdOpenMenu($event)" class="md-icon-button width-30 no-margin no-padding" aria-label="More">\n                                <md-icon md-font-icon="icon-dots-vertical" class="s20" ng-style="{\'color\': widget.foreground}"></md-icon>\n                            </md-button>\n                            <md-menu-content>\n                                <md-menu-item>\n                                    <md-button ng-click="vm.onEdit({widget: widget})" translate="TOOLS.EDIT_WIDGET">Edit</md-button>\n                                </md-menu-item>\n                                <md-menu-item>\n                                    <md-button ng-click="vm.onDelete({widget: widget})" translate="TOOLS.DELETE_WIDGET">Delete</md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n\n                    </div>\n                </md-toolbar>\n                <md-card-content class="resizable" layout="column" layout-align="center center" flex ng-style="{\'background-color\': widget.background, \'color\': widget.foreground}">\n                    <div ng-switch="widget.type" layout-fill>\n                        <iframe ng-switch-when="iframe|custom" ng-switch-when-separator="|" ng-src="{{vm.getTrustedURL(widget.attrs[0].value)}}" frameborder=0 style="border:0px; width:100%; height:100%;"></iframe>\n                        <ds-widget-clock ng-class="\'font-size-\' + (widget.attrs[2].value || 12)" ng-switch-when="clock" digital-format="widget.attrs[0].value" gmt-offset="widget.attrs[1].value" data-show-digital show-gmt-info></ds-widget-clock>\n                        <div ng-switch-default layout-fill>\n                            <div ng-include="widget.templateUrl" layout-fill></div>\n                        </div>\n                    </div>\n                </md-card-content>\n            </md-card>\n        </li>\n    </ul>\n</div>'),e.put("app/core/layouts/content-only.html",'<div id="layout-content-only" class="template-layout" layout="column" flex>\n    <md-content id="content" class="animate-slide-up md-hue-2" ui-view="content" flex></md-content>\n</div>'),e.put("app/core/layouts/content-with-toolbar.html",'<div id="layout-content-with-toolbar" class="template-layout" layout="column" flex>\n    <md-toolbar id="toolbar" class="md-menu-toolbar md-whiteframe-1dp" ui-view="toolbar"></md-toolbar>\n    <md-content id="content" class="animate-slide-up md-hue-2" ui-view="content" flex></md-content>\n\n    <md-sidenav id="quick-panel" class="md-sidenav-right md-whiteframe-4dp" md-component-id="quick-panel" ms-scroll ui-view="quickPanel"></md-sidenav>\n</div>'),e.put("app/core/layouts/horizontal-navigation.html",'<div id="layout-horizontal-navigation" class="template-layout" layout="column" flex>\n\n    <div id="toolbar-navigation-container" class="md-whiteframe-1dp" layout="column" layout-align="space-between start">\n        <md-toolbar id="toolbar" class="md-menu-toolbar md-whiteframe-1dp" ui-view="toolbar"></md-toolbar>\n        <div id="horizontal-navigation" ui-view="navigation" layout="row" layout-align="start end" flex></div>\n    </div>\n\n    <div id="content-container" flex layout="column">\n        <md-content id="content" class="animate-slide-up md-hue-2" ms-scroll ui-view="content" flex></md-content>\n    </div>\n\n    <md-sidenav id="quick-panel" class="md-sidenav-right md-whiteframe-4dp" md-component-id="quick-panel" ms-scroll ui-view="quickPanel"></md-sidenav>\n\n</div>'),e.put("app/core/layouts/vertical-navigation-fullwidth-toolbar-2.html",'<div id="layout-vertical-navigation-fullwidth-toolbar-2" class="template-layout" layout="column" flex>\n\n    <md-toolbar id="toolbar" class="md-menu-toolbar md-whiteframe-1dp md-accent" ui-view="toolbar"></md-toolbar>\n\n    <div id="main-container" layout="row" flex>\n        <md-sidenav id="vertical-navigation" class="md-primary-bg" md-is-locked-open="$mdMedia(\'gt-sm\')" md-component-id="navigation" ms-scroll ui-view="navigation"></md-sidenav>\n\n        <div id="content-container" flex layout="column">\n            <md-content id="content" class="animate-slide-up md-hue-2" ms-scroll ui-view="content" flex></md-content>\n        </div>\n\n        <md-sidenav id="quick-panel" class="md-sidenav-right md-whiteframe-4dp" md-component-id="quick-panel" ms-scroll ui-view="quickPanel"></md-sidenav>\n    </div>\n\n\n</div>'),e.put("app/core/layouts/vertical-navigation-fullwidth-toolbar.html",'<div id="layout-vertical-navigation-fullwidth-toolbar" class="template-layout" layout="column" flex>\n\n    <md-toolbar id="toolbar" class="md-menu-toolbar md-whiteframe-1dp md-accent" ui-view="toolbar"></md-toolbar>\n\n    <div id="main-container" layout="row" flex>\n        <md-sidenav id="vertical-navigation" class="md-primary-bg" md-is-locked-open="$mdMedia(\'gt-sm\')" md-component-id="navigation" ms-scroll ui-view="navigation"></md-sidenav>\n\n        <div id="content-container" flex layout="column">\n            <md-content id="content" class="animate-slide-up md-hue-2" ms-scroll ui-view="content" flex></md-content>\n        </div>\n\n        <md-sidenav id="quick-panel" class="md-sidenav-right md-whiteframe-4dp" md-component-id="quick-panel" ms-scroll ui-view="quickPanel"></md-sidenav>\n    </div>\n\n\n</div>'),e.put("app/core/layouts/vertical-navigation.html",'<div id="header" ui-view="header"></div>\n\n<div id="layout-vertical-navigation" class="template-layout" layout="row" flex>\n\n    <md-sidenav id="vertical-navigation" class="md-primary-bg" md-is-locked-open="$mdMedia(\'gt-sm\')" md-component-id="navigation" ms-scroll ui-view="navigation" ng-if="!vm.isAgent()"></md-sidenav>\n\n    <div id="content-container" flex layout="column">\n        <md-toolbar id="toolbar" class="md-menu-toolbar md-whiteframe-1dp" ui-view="toolbar"></md-toolbar>\n\n        <md-content id="content" class="animate-slide-up md-hue-2" ms-scroll ui-view="content" flex></md-content>\n    </div>\n\n    <md-sidenav id="quick-panel" class="md-sidenav-right md-whiteframe-4dp" md-component-id="quick-panel" ms-scroll ui-view="quickPanel"></md-sidenav>\n\n</div>\n\n<div id="footer" ui-view="footer"></div>'),e.put("app/core/theme-options/theme-options.html",'<div class="ms-theme-options-button md-primary-bg" ng-click="toggleOptionsSidenav()">\n    <md-icon md-font-icon="icon-cog" class="white-text"></md-icon>\n</div>\n\n<md-sidenav md-component-id="motion-theme-options" class="md-sidenav-right">\n\n    <div class="ms-theme-options-list" layout="column">\n        <div class="theme-option layout-options">\n            <div class="option-title">Layout Style:</div>\n            <md-radio-group layout="row" layout-align="start start" layout-wrap ng-model="vm.layoutStyle" ng-change="vm.updateLayoutStyle()">\n                <md-radio-button ng-repeat="layoutStyle in vm.layoutStyles" ng-value="layoutStyle.value">\n                    <div layout="column" layout-align="center center">\n                        <img ng-src="{{layoutStyle.figure}}">\n                        <span class="text-center font-size-12 mt-8">{{layoutStyle.label}}</span>\n                    </div>\n                </md-radio-button>\n            </md-radio-group>\n        </div>\n\n        <md-divider></md-divider>\n\n        <div class="theme-option">\n            <div class="option-title">Layout Mode:</div>\n            <md-radio-group layout="row" layout-align="start center" ng-model="vm.layoutMode" ng-change="vm.updateLayoutMode()">\n                <md-radio-button ng-repeat="layoutMode in vm.layoutModes" ng-value="layoutMode.value">\n                    {{layoutMode.label}}\n                </md-radio-button>\n            </md-radio-group>\n        </div>\n\n        <md-divider></md-divider>\n\n        <div class="theme-option color-palettes">\n            <div class="option-title">Color Palette:</div>\n            <div layout="row" layout-align="start start" layout-wrap>\n                <md-button ng-repeat="(themeName, theme) in vm.themes.list" class="md-raised theme-button" layout="row" layout-align="center center" aria-label="{{themeName}}" ng-click="vm.setActiveTheme(themeName)" ng-style="{\'background-color\': theme.primary.color,\'border-color\': theme.accent.color,\'color\': theme.primary.contrast1}"\n                    ng-class="{active: vm.getActiveTheme().name === themeName}">\n                    <md-icon ng-style="{\'color\': theme.primary.contrast1}" md-font-icon="icon-palette" class="icon s32"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n</md-sidenav>'),e.put("app/errors/404/error-404.html",'<div id="error-404" layout="column" layout-align="center center">\n    <div class="content" layout="column" layout-align="center center">\n        <div class="error-code" translate="ERROR404.CODE">404</div>\n\n        <div class="message" translate="ERROR404.MESSAGE">Sorry but we couldn’t find the page you are looking for</div>\n        <ms-search-bar on-search="vm.search(query)" on-result-click="vm.searchResultClick(item)" debounce="300">Search for anything</ms-search-bar>\n\n        \x3c!-- <div class="search md-whiteframe-1dp" layout="row" layout-align="start center">\n            <md-icon md-font-icon="icon-magnify" class="icon s24"></md-icon>\n            <input ng-model="vm.search" type="text" placeholder="Search for anything" translate translate-attr-placeholder="ERROR404.SEARCH" flex>\n        </div> --\x3e\n\n        <a class="md-button md-raised md-primary back-link" href="/" translate="ERROR404.GO_BACK">Go back to dashboard</a>\n    </div>\n</div>'),e.put("app/errors/500/error-500.html",'<div id="error-500" layout="column" layout-align="center center">\n    <div ng-if="!vm.send" class="content" layout="column" layout-align="center center">\n        <div class="error-code" translate="ERROR500.CODE">500</div>\n        <div class="message" translate="ERROR500.MESSAGE">Well, you broke the internet!</div>\n        <div class="sub-message" translate="ERROR500.SUBMESSAGE">Just kidding, looks like we have an internal issue, please try again in couple minutes\n        </div>\n        <a class="md-button md-raised md-primary back-link" href="/" translate="ERROR500.GO_BACK">Go back to dashboard</a>\n        <md-button class="md-raised md-warn" ng-click="vm.sendReport()" translate="ERROR500.REPORT">Report this problem</md-button>\n    </div>\n    <pre ng-if="!vm.send">\n      {{vm.error}}\n    </pre>\n    <div ng-if="vm.send" class="content" layout="column" layout-align="center center">\n        <div class="error-code">#{{vm.code}}</div>\n        <div class="message" translate="ERROR500.JIRA_MESSAGE">Your request has been received and will be processed shortly.</div>\n        <div class="sub-message" translate="ERROR500.JIRA_SUBMESSAGE">Sorry for the inconvenience. If you have any questions or concerns, please do not hesitate to contact us.</div>\n        <a class="md-button md-raised md-primary back-link" href="/" translate="ERROR500.GO_BACK">Go back to dashboard</a>\n    </div>\n</div>'),e.put("app/footer/layouts/vertical-navigation/footer.html",'<div layout="row" layout-align="start center">\n    <ms-info-bar ng-if="!vm.cookieAlertHide" on-close="vm.cookieAlertOnClose()" class="grey-100-bg">\n        <div layout="row" layout-align="start center">\n            <span translate="FOOTER.COOKIE_LAW" flex class="text-center grey-600-fg"></span>\n        </div>\n    </ms-info-bar>\n</div>'),e.put("app/forgot/forgot.html",'<div id="forgot-password" class="flex-scrollable" layout="column" ms-scroll ng-init="vm.onInit()">\n    <div id="forgot-password-form-wrapper" layout="column" layout-align="center center">\n        <div id="forgot-password-form" class="md-whiteframe-8dp">\n\n            <img src="/api/settings/1/logo_login" alt="logo_login" class="logo_login" />\n\n            <div class="title" translate="FORGOTPASSWORD.TITLE">Recover your password</div>\n\n            <form name="forgotPasswordForm" novalidate>\n                <md-input-container class="md-block" md-no-float>\n                    <input type="email" name="email" ng-model="vm.form.email" placeholder="Email address" translate translate-attr-placeholder="FORGOTPASSWORD.EMAIL_ADRESS" ng-pattern="/^.+@.+\\..+$/" required>\n                    <div ng-messages="forgotPasswordForm.email.$error" role="alert" multiple>\n                        <div ng-message="required">\n                            <span translate="FORGOTPASSWORD.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                        </div>\n                        <div ng-message="pattern">\n                            <span translate="FORGOTPASSWORD.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                        </div>\n                    </div>\n                </md-input-container>\n\n                <md-button type="button" ng-click="vm.forgotPassword()" class="md-raised md-accent submit-button" aria-label="RESET MY PASSWORD" ng-disabled="forgotPasswordForm.$invalid || forgotPasswordForm.$pristine" translate="FORGOTPASSWORD.SEND_RESET_LINK" translate-attr-aria-label="FORGOTPASSWORD.SEND_RESET_LINK">\n                    SEND RESET LINK\n                </md-button>\n            </form>\n\n            <div class="login" layout="row" layout-align="center center">\n                <a class="link" ui-sref="app.login" translate="FORGOTPASSWORD.GO_BACK">Go back to login</a>\n            </div>\n        </div>\n    </div>\n</div>'),e.put("app/header/layouts/vertical-navigation/header.html",'\x3c!-- <div layout="row" layout-align="start center">\n    <ms-info-bar ng-if="vm.currentUser.role == \'admin\' && !vm.newsAlertHide" on-close="vm.newsAlertOnClose()" class="green-600-bg white-fg">\n        <div layout="row" layout-align="start center">\n            <md-icon md-font-icon="icon-message-text-outline" class="icon margin-right-10 s20"></md-icon>\n            <div flex hide-xs translate="HEADER.NEWS"></div>\n        </div>\n    </ms-info-bar>\n</div> --\x3e'),e.put("app/login/login.html",'<div id="login" class="flex-scrollable" layout="column" ms-scroll>\n    <div id="login-form-wrapper" layout="column" layout-align="center center">\n        <div id="login-form" class="md-whiteframe-8dp">\n\n            <img src="/api/settings/1/logo_login" alt="logo_login" class="logo_login" />\n            \x3c!-- <img src="assets/images/logos/login.png" alt="motion_logo_login" /> --\x3e\n\n            <div class="md-subhead padding-top-45" translate="LOGIN.TITLE">Log in to your account</div>\n\n            <form name="loginForm" novalidate ng-if="!vm.progressLogin">\n                <md-input-container class="md-block" md-no-float>\n                    <input type="input" name="name" ng-model="vm.form.name" autofocus aria-label="username" translate translate-attr-placeholder="LOGIN.USERNAME" required>\n                    <div ng-messages="loginForm.name.$error" role="alert" multiple>\n                        <div ng-message="required">\n                            <span translate="LOGIN.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                        </div>\n                    </div>\n                </md-input-container>\n\n                <md-input-container class="md-block" md-no-float>\n                    <input type="password" name="password" ng-model="vm.form.password" aria-label="password" translate translate-attr-placeholder="LOGIN.PASSWORD" required>\n                    <div ng-messages="loginForm.password.$error" role="alert" multiple>\n                        <div ng-message="required">\n                            <span translate="LOGIN.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                        </div>\n                    </div>\n                </md-input-container>\n\n                <div class="remember-forgot-password" layout="row" layout-xs="column" layout-align="end center">\n                    \x3c!-- <md-checkbox class="remember-me" ng-model="data.cb1" aria-label="Remember Me">\n                        <span translate="LOGIN.REMEMBER_ME">Remember Me</span>\n                    </md-checkbox> --\x3e\n                    <a ui-sref="app.forgot" class="forgot-password md-accent-color" style="cursor:pointer;" translate="LOGIN.FORGOT_PASSWORD">Forgot Password?</a>\n                </div>\n\n                <b layout="row" layout-align="center center" class="md-padding" ng-if="vm.message"><font color="red">{{vm.message}}</font></b>\n                <md-button type="submit" ng-click="vm.login()" class="md-raised md-accent submit-button" aria-label="LOGIN" translate="LOGIN.LOG_IN" translate-attr-aria-label="LOGIN.LOG_IN">\n                    LOG IN\n                </md-button>\n            </form>\n\n            <md-progress-circular ng-if="vm.progressLogin" md-diameter="96"></md-progress-circular>\n\n            <div class="separator">\n                <span class="text" translate="LOGIN.OR">OR</span>\n            </div>\n\n            <md-button ng-click="vm.loginOauth(\'google\')" class="md-raised google">\n                <div layout="row" layout-align="center center">\n                    <span>\n                        <md-icon md-font-icon="icon-google-plus" class="s16"></md-icon>\n                        <span translate="LOGIN.WITH_GOOGLE">Log in with Google</span>\n                    </span>\n                </div>\n            </md-button>\n        </div>\n    </div>\n</div>'),e.put("app/main/apps/analytics/views/extractedReports/create/dialog.html",'<md-dialog class="extractedReport-dialog" aria-label="New ExtractedReport">\n    <form name="extractedReportForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.REPORTNAME">ReportName</label>\n                <input type="" name="name" ng-model="vm.extractedReport.name" ng-required="true" autofocus>\n                <div ng-messages="extractedReportForm[\'name\'].$error" ng-show="extractedReportForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.REPORTNAME_REQUIRED">ReportName field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.NAME">Name</label>\n                <input type="" name="basename" ng-model="vm.extractedReport.basename" ng-required="true">\n                <div ng-messages="extractedReportForm[\'basename\'].$error" ng-show="extractedReportForm[\'basename\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newExtractedReport" ng-click="vm.saveExtractedReport()" class="send-button md-accent md-raised" ng-disabled="extractedReportForm.$invalid || extractedReportForm.$pristine" aria-label="SAVE" translate="ANALYTICS.SAVE"\n                    translate-attr-aria-label="ANALYTICS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newExtractedReport" ng-click="vm.addNewExtractedReport()" class="send-button md-accent md-raised" ng-disabled="extractedReportForm.$invalid" aria-label="ADD" translate="ANALYTICS.ADD_EXTRACTEDREPORT" translate-attr-aria-label="ANALYTICS.ADD_EXTRACTEDREPORT">\n                    ADD EXTRACTEDREPORT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newExtractedReport" ng-click="vm.deleteExtractedReport($event)" aria-label="DELETE" translate translate-attr-aria-label="ANALYTICS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="ANALYTICS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/analytics/views/extractedReports/extractedReports.html",'<div id="extractedReports" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-chart-line" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="ANALYTICS.EXTRACTEDREPORTS">ExtractedReports</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="ANALYTICS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedExtractedReports.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedExtractedReports =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="ANALYTICS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-extractedReports-count">\n                    <span>{{vm.selectedExtractedReports.length}}</span>\n                <span translate="ANALYTICS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="EXTRACTEDREPORTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllExtractedReports()" translate="ANALYTICS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectExtractedReports()" translate="ANALYTICS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedExtractedReports" csv-label="true" filename="extractedReports.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedExtractedReports($event)" aria-label="delete selected" translate translate-attr-label="EXTRACTEDREPORTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- EXTRACTEDREPORT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedExtractedReports" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getExtractedReports">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'ANALYTICS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'ANALYTICS.REPORTNAME\' | translate }}</th>\n                                <th md-column md-order-by="basename">{{ \'ANALYTICS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="type">{{ \'ANALYTICS.TYPE\' | translate }}</th>\n                                <th md-column md-order-by="startDate">{{ \'ANALYTICS.DATE_RANGE_FROM\' | translate }}</th>\n                                <th md-column md-order-by="endDate">{{ \'ANALYTICS.DATE_RANGE_TO\' | translate }}</th>\n                                <th md-column md-order-by="createdAt">{{ \'ANALYTICS.GENERATED_AT\' | translate }}</th>\n                                <th md-column md-order-by="status">{{ \'ANALYTICS.STATUS\' | translate }}</th>\n                                <th md-column md-order-by="output">{{ \'ANALYTICS.OUTPUT\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.extractedReports.rows.length">\n                                <td md-cell colspan="10">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="ANALYTICS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="extractedReport" md-select-id="id" ng-repeat="extractedReport in vm.extractedReports.rows">\n                                <td md-cell ng-if="extractedReport.userpic"><img class="avatar" alt="{{extractedReport.name}}" ng-src="api/users/{{extractedReport.id}}/avatar" /></td>\n                                <td md-cell ng-if="!extractedReport.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{extractedReport.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="id ">{{extractedReport.id}}</td>\n                                <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="name ">{{extractedReport.name}}</td>\n                                <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="basename ">{{extractedReport.basename}}</td>\n                                <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="type ">{{extractedReport.type}}</td>\n                                <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="startDate ">{{extractedReport.startDate | date:\'medium\' }}</td>\n                                <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="endDate ">{{extractedReport.endDate | date:\'medium\' }}</td>\n                                <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="createdAt ">{{extractedReport.createdAt | date:\'medium\' }}</td>\n                                <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="status ">{{extractedReport.status}}</td>\n                                <td ng-click="vm.createOrEditExtractedReport($event, extractedReport)" md-cell class="output ">{{extractedReport.output}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="ANALYTICS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(extractedReport, $event)" translate="ANALYTICS.EDIT_EXTRACTEDREPORT">\n                                                    Edit ExtractedReport\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="extractedReport.status == \'Completed\'">\n                                                <md-button ng-click="vm.downloadfile2(extractedReport, $event)" translate="ANALYTICS.DOWNLOAD_EXTRACTEDREPORT">\n                                                    Download ExtractedReport\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(extractedReport, $event)" translate="ANALYTICS.DELETE_EXTRACTEDREPORT">\n                                                    Delete ExtractedReport\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'ANALYTICS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'ANALYTICS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'ANALYTICS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.extractedReports.count}}" md-on-paginate="vm.getExtractedReports" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / EXTRACTEDREPORT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- NO ADD BUTTON BUTTON --\x3e\n</div>'),e.put("app/main/apps/analytics/views/metrics/create/dialog.html",'<md-dialog class="metric-dialog" aria-label="New Metric">\n    <form name="metricForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.metric.name" ng-required="true" autofocus>\n                <div ng-messages="metricForm[\'name\'].$error" ng-show="metricForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.TABLE">Table</label>\n                <md-select name="table" ng-model="vm.metric.table" required>\n                    <md-option ng-value="\'report_agent\'">Agent Report</md-option>\n                    <md-option ng-value="\'report_call\'">Call Report</md-option>\n                    <md-option ng-value="\'cm_contacts\'">Contacts</md-option>\n                    <md-option ng-value="\'report_square\'">CSquare Report</md-option>\n                    <md-option ng-value="\'report_square_details\'">CSquare Details Report</md-option>\n                    <md-option ng-value="\'cm_hopper\'">Dialer Hopper Processing</md-option>\n                    <md-option ng-value="\'cm_hopper_history\'">Dialer Hopper Logs</md-option>\n                    <md-option ng-value="\'cm_hopper_final\'">Dialer Hopper Final</md-option>\n                    <md-option ng-value="\'report_integration\'">Integration Report</md-option>\n                    <md-option ng-value="\'report_jscripty_sessions\'">Jscripty Sessions</md-option>\n                    <md-option ng-value="\'report_jscripty_questions\'">Jscripty Questions</md-option>\n                    <md-option ng-value="\'report_jscripty_answers\'">Jscripty Answers</md-option>\n                    <md-option ng-value="\'report_member\'">Member Report</md-option>\n                    <md-option ng-value="\'report_queue\'">Queue Report</md-option>\n                    <md-option ng-value="\'users\'">Users</md-option>\n                    <md-option ng-value="\'voice_recordings\'">Voice Recordings</md-option>\n                </md-select>\n                <div ng-messages="metricForm[\'table\'].$error" ng-show="metricForm[\'table\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.TABLE_REQUIRED">Table field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.METRIC">Metric</label>\n                <input type="text" name="metric" ng-model="vm.metric.metric" ng-required="true">\n                <div ng-messages="metricForm[\'metric\'].$error" ng-show="metricForm[\'metric\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.METRIC_REQUIRED">Metric field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.metric.description">\n                <div ng-messages="metricForm[\'description\'].$error" ng-show="metricForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newMetric" ng-click="vm.saveMetric()" class="send-button md-accent md-raised" ng-disabled="metricForm.$invalid || metricForm.$pristine" aria-label="SAVE" translate="ANALYTICS.SAVE" translate-attr-aria-label="ANALYTICS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newMetric" ng-click="vm.addNewMetric()" class="send-button md-accent md-raised" ng-disabled="metricForm.$invalid" aria-label="ADD" translate="ANALYTICS.ADD_METRIC" translate-attr-aria-label="ANALYTICS.ADD_METRIC">\n                    ADD METRIC\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newMetric" ng-click="vm.deleteMetric($event)" aria-label="DELETE" translate translate-attr-aria-label="ANALYTICS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="ANALYTICS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/analytics/views/metrics/metrics.html",'<div id="metrics" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-chart-line" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="ANALYTICS.METRICS">Metrics</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="ANALYTICS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedMetrics.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedMetrics =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="ANALYTICS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-metrics-count">\n                    <span>{{vm.selectedMetrics.length}}</span>\n                <span translate="ANALYTICS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="METRICS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllMetrics()" translate="ANALYTICS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectMetrics()" translate="ANALYTICS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedMetrics" csv-label="true" filename="metrics.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedMetrics($event)" aria-label="delete selected" translate translate-attr-label="METRICS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- METRIC TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedMetrics" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getMetrics">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'ANALYTICS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'ANALYTICS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="table">{{ \'ANALYTICS.TABLE\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'ANALYTICS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.metrics.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="ANALYTICS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="metric" md-select-id="id" ng-repeat="metric in vm.metrics.rows">\n                                <td md-cell ng-if="metric.userpic"><img class="avatar" alt="{{metric.name}}" ng-src="api/users/{{metric.id}}/avatar" /></td>\n                                <td md-cell ng-if="!metric.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{metric.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditMetric($event, metric)" md-cell class="id ">{{metric.id}}</td>\n                                <td ng-click="vm.createOrEditMetric($event, metric)" md-cell class="name ">{{metric.name}}</td>\n                                <td ng-click="vm.createOrEditMetric($event, metric)" md-cell class="table ">{{ vm.arraytable[metric.table].option }}</td>\n                                <td ng-click="vm.createOrEditMetric($event, metric)" md-cell class="description ">{{metric.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="ANALYTICS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(metric, $event)" translate="ANALYTICS.EDIT_METRIC">\n                                                    Edit Metric\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(metric, $event)" translate="ANALYTICS.DELETE_METRIC">\n                                                    Delete Metric\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'ANALYTICS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'ANALYTICS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'ANALYTICS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.metrics.count}}" md-on-paginate="vm.getMetrics" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / METRIC TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD METRIC BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-metric-button" ng-click="vm.createOrEditMetric($event)" aria-label="add metric" translate translate-attr-aria-label="ANALYTICS.ADD_METRIC">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD METRIC BUTTON --\x3e\n</div>'),e.put("app/main/apps/analytics/views/reports/copy/dialog.html",'<md-dialog class="report-dialog" aria-label="Run Report">\n    <form name="reportForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title" translate="ANALYTICS.COPY_REPORT">Copy Report</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.NAME">Name</label>\n                <input name="name" ng-model="vm.report.name" required md-autofocus>\n                <div ng-messages="reportForm.name.$error" ng-show="reportForm.name.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div class="md-block">\n                <label translate="ANALYTICS.SELECT_NODE">Select Node</label>\n                <div js-tree="vm.treeCustomConfig" tree-events-obj="vm.treeCustomEvents" ng-model="vm.treeCustomData" tree="vm.treeCustomInstance"></div>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.copyReport()" class="send-button md-accent md-raised" ng-disabled="!vm.currentNode" aria-label="COPY" translate="ANALYTICS.COPY_REPORT" translate-attr-aria-label="ANALYTICS.COPY_REPORT">\n                    COPY REPORT\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/analytics/views/reports/create/dialog.html",'<md-dialog class="report-dialog" aria-label="New Report">\n    <form name="reportForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.report.name" required md-autofocus>\n                <div ng-messages="reportForm.name.$error" ng-show="reportForm.name.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.newReport">\n                <label translate="ANALYTICS.TABLE">Table</label>\n                <md-select ng-model="vm.report.table" required>\n                    <md-option ng-repeat="table in vm.tables | orderBy:\'name\'" ng-value="table.name">{{table.name}}</md-option>\n                </md-select>\n                <div ng-messages="reportForm.table.$error" ng-show="reportForm.table.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.TABLE_REQUIRED">Table field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.report.description">\n                <div ng-messages="reportForm.description.$error" ng-show="reportForm.description.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-autocomplete ng-if="vm.newReport" md-selected-item="vm.selectedItem" md-search-text="vm.searchText" md-items="table in vm.tables | filter:vm.searchText" md-item-text="table.name" md-min-length="0" md-selected-item-change="vm.selectedTableChange(table)"\n                placeholder="Select the table to Join">\n                <md-item-template>\n                    <span md-highlight-text="vm.searchText" md-highlight-flags="^i">{{table.name}}</span>\n                </md-item-template>\n                <md-not-found>\n                    No states matching "{{vm.searchText}}" were found.\n                </md-not-found>\n            </md-autocomplete>\n\n            <md-card ng-if="vm.newReport" md-theme="default" md-theme-watch ng-repeat="table in vm.joinTables">\n                <md-card-title>\n                    <md-card-title-text layout="row">\n                        <div layout="row" flex="50">\n                            <span class="md-subhead">{{table.name}}</span>\n                        </div>\n                        <div layout="row" layout-align="end center" flex>\n                            <md-button class="md-icon-button" ng-click="vm.removeJoin($index)">\n                                <md-icon md-font-icon="icon-delete" aria-label="alert error"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-card-title-text>\n                </md-card-title>\n                <md-card-content>\n                    <md-select ng-model="table.parentKey" placeholder="Select the parent key" ng-init="table.parentFields = []; vm.getFields(table, \'parentFields\', vm.report.table)" required>\n                        <md-option ng-repeat="field in table.parentFields" ng-value="field">{{field}}</md-option>\n                    </md-select>\n                    <md-select ng-model="table.foreignKey" placeholder="Select the foreign key" ng-init="table.foreignFields = []; vm.getFields(table, \'foreignFields\', table.name)" required>\n                        <md-option ng-repeat="field in table.foreignFields" ng-value="field">{{field}}</md-option>\n                    </md-select>\n                    <md-select ng-model="table.type" placeholder="Select join type" required>\n                        <md-option ng-repeat="join in vm.joinTypes" ng-value="join.key">{{join.value}}</md-option>\n                    </md-select>\n                </md-card-content>\n            </md-card>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newReport" ng-click="vm.saveReport()" class="send-button md-accent md-raised" ng-disabled="reportForm.$invalid || reportForm.$pristine" aria-label="SAVE" translate="ANALYTICS.SAVE" translate-attr-aria-label="ANALYTICS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newReport" ng-click="vm.addNewReport()" class="send-button md-accent md-raised" ng-disabled="reportForm.$invalid || reportForm.$pristine" aria-label="ADD" translate="ANALYTICS.ADD_REPORT" translate-attr-aria-label="ANALYTICS.ADD_REPORT">\n                    ADD REPORT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newReport" ng-click="vm.deleteReport($event)" aria-label="DELETE" translate translate-attr-aria-label="ANALYTICS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="ANALYTICS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/analytics/views/reports/edit/condition/group.html",'<md-card class="padding-horizontal-15 padding-top-15">\n    <div layout="row">\n        <md-input-container class="md-block" flex>\n            <label translate="ANALYTICS.OPERATOR">Operator</label>\n            <md-select ng-model="group.operator" required>\n                <md-option value="AND">AND</md-option>\n                <md-option value="OR">OR</md-option>\n            </md-select>\n            <div ng-messages="conditionsForm.operator.$error" ng-show="conditionsForm.operator.$touched" role="alert">\n                <div ng-message="required">\n                    <span translate="ANALYTICS.ERRORS.OPERATOR_REQUIRED">Operator field is required</span>\n                </div>\n            </div>\n        </md-input-container>\n        <md-input-container class="md-block">\n            <md-button class="md-raised md-accent" ng-click="vm_rc.addCondition(group.rules)">\n                <md-icon md-font-icon="icon-plus"></md-icon> {{\'ANALYTICS.CONDITION\' | translate}}</md-button>\n        </md-input-container>\n        <md-input-container class="md-block">\n            <md-button class="md-raised md-accent" ng-click="vm_rc.addGroup(group.rules)">\n                <md-icon md-font-icon="icon-plus"></md-icon> {{\'ANALYTICS.GROUP\' | translate}}</md-button>\n        </md-input-container>\n        <div flex></div>\n        <md-input-container class="md-block" ng-if="parent">\n            <md-button class="md-raised md-warn" ng-click="vm_rc.deleteConfirm(parent, index, $event)">\n                <md-icon md-font-icon="icon-delete"></md-icon> {{\'ANALYTICS.GROUP\' | translate}}</md-button>\n        </md-input-container>\n    </div>\n    <div layout="column" ng-repeat="rule in group.rules track by $index">\n        <div layout="row" ng-if="!rule.group">\n            <md-input-container class="md-block" flex>\n                <label translate="ANALYTICS.COLUMN">COLUMN</label>\n                <md-select name="field" ng-model="rule.field" required>\n                    <md-optgroup label="{{vm_rc.report.table}}">\n                        <md-option ng-repeat="column in vm_rc.columns" value="{{vm_rc.report.table}}.{{column}}">{{column}}</md-option>\n                    </md-optgroup>\n                    <md-optgroup ng-if="vm_rc.report.joins" ng-repeat="join in vm_rc.report.joins" label="{{join.foreignTable}}">\n                        <md-option ng-repeat="field in join.foreignTableFields" value="{{join.foreignTable}}.{{field}}">{{field}}</md-option>\n                    </md-optgroup>\n                </md-select>\n                <div ng-messages="conditionsForm.field.$error" ng-show="conditionsForm.field.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.COLUMN_REQUIRED">Column field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" flex>\n                <label translate="ANALYTICS.CONDITION">CONDITION</label>\n                <md-select name="condition" ng-model="rule.condition" required>\n                    <md-option ng-repeat="condition in vm_rc.conditions" ng-value="condition">{{condition}}</md-option>\n                </md-select>\n                <div ng-messages="conditionsForm.condition.$error" ng-show="conditionsForm.condition.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.CONDITION_REQUIRED">Condition field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm_rc.isValueByCondition(rule.condition)" class="md-block" flex>\n                <label translate="ANALYTICS.VALUE">VALUE</label>\n                <input type="text" name="value" ng-model="rule.value" required md-autofocus>\n                <div ng-messages="conditionsForm.value.$error" ng-show="conditionsForm.value.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" flex>\n                <md-button class="md-fab md-mini md-warn" aria-label="Delete row" ng-click="vm_rc.deleteConfirm(group.rules, $index, $event)">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </md-input-container>\n        </div>\n        <div ng-if="rule.group" ng-include="\'app/main/apps/analytics/views/reports/edit/condition/group.html\'" ng-init="parent=group.rules;index=$index;group=rule.group"></div>\n    </div>\n</md-card>'),e.put("app/main/apps/analytics/views/reports/edit/field/dialog.html",'<md-dialog class="reportField-dialog" aria-label="New Report Field">\n    <form name="reportFieldForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{vm.title}}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <pre></pre>\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.reportField.type" ng-change="vm.reportField.field = undefined" required>\n                    <md-option value="column">Select a column</md-option>\n                    <md-option value="metric">Select an existing metric</md-option>\n                    <md-option value="custom">Write a custom metric</md-option>\n                </md-select>\n                <div ng-messages="reportForm.type.$error" ng-show="reportForm.type.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div ng-switch on="vm.reportField.type">\n                <md-input-container class="md-block" ng-switch-when="column">\n                    <label translate="ANALYTICS.COLUMN">Column Name</label>\n                    <md-select name="column" ng-model="vm.reportField.field" required>\n                        <md-optgroup label="{{vm.report.table}}">\n                            <md-option ng-repeat="column in vm.columns" value="{{vm.report.table}}.{{column}}">{{column}}</md-option>\n                            \x3c!-- <md-option ng-repeat="column in vm.columns" ng-value="">{{column}}</md-option> --\x3e\n                        </md-optgroup>\n                        <md-optgroup ng-if="vm.report.joins" ng-repeat="join in vm.report.joins" label="{{join.foreignTable}}">\n                            <md-option ng-repeat="field in join.foreignTableFields" value="{{join.foreignTable}}.{{field}}">{{field}}</md-option>\n                        </md-optgroup>\n                    </md-select>\n                    <div ng-messages="reportForm.column.$error" ng-show="reportForm.column.$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="ANALYTICS.ERRORS.COLUMN_REQUIRED">Column field is required</span>\n                        </div>\n                    </div>\n                </md-input-container>\n                <md-input-container class="md-block" ng-switch-when="metric">\n                    <label translate="ANALYTICS.METRIC_NAME">Metric Name</label>\n                    <md-select name="metric" ng-model="vm.reportField.MetricId" required>\n                        <md-option ng-repeat="metric in vm.metrics" ng-value="metric.id">{{metric.name}}</md-option>\n                    </md-select>\n                    <div ng-messages="reportForm.metric.$error" ng-show="reportForm.metric.$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="ANALYTICS.ERRORS.METRIC_REQUIRED">Metric field is required</span>\n                        </div>\n                    </div>\n                </md-input-container>\n                <md-input-container class="md-block" ng-switch-when="custom">\n                    <label translate="ANALYTICS.CUSTOM_METRIC">Custom Metric</label>\n                    <input type="text" name="field" ng-model="vm.reportField.field" required md-autofocus>\n                    <div ng-messages="reportFieldForm.field.$error" ng-show="reportFieldForm.field.$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="ANALYTICS.ERRORS.CUSTOM_METRIC_REQUIRED">Custom Metric field is required</span>\n                        </div>\n                    </div>\n                </md-input-container>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.ALIAS">Alias</label>\n                <input type="text" name="alias" ng-model="vm.reportField.alias" ng-required="vm.reportField.type === \'custom\' || vm.reportField.type === \'metric\'">\n                <div ng-messages="reportFieldForm.alias.$error" ng-show="reportFieldForm.alias.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.ALIAS_REQUIRED">Alias field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.reportField.type !== \'metric\'">\n                <label translate="ANALYTICS.FUNCTION">Function</label>\n                <md-select name="function" ng-model="vm.reportField.function">\n                    <md-option ng-value="null">No Function</md-option>\n                    <md-option ng-repeat="function in vm.sqlUtil.getFunctions" ng-value="function.value">{{function.value}}</md-option>\n                </md-select>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.reportField.type !== \'metric\'">\n                <label translate="ANALYTICS.FORMAT">Format</label>\n                <md-select name="format" ng-model="vm.reportField.format">\n                    <md-option ng-value="null">No Format</md-option>\n                    <md-option ng-repeat="format in vm.sqlUtil.getFormats" ng-value="format.value">{{format.value}}</md-option>\n                </md-select>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.GROUP_BY">Group By</label>\n                <md-select name="groupBy" ng-model="vm.reportField.groupBy">\n                    <md-option ng-repeat="gb in vm.sqlUtil.getGroupBy" ng-value="gb.value">{{gb.value ? \'Yes\' : \'No\'}}</md-option>\n                </md-select>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.ORDER_BY">Order By</label>\n                <md-select name="orderBy" ng-model="vm.reportField.orderBy">\n                    <md-option ng-value="null">No Order</md-option>\n                    <md-option ng-repeat="ob in vm.sqlUtil.getOrderBy" ng-value="ob.value">{{ob.value}}</md-option>\n                </md-select>\n            </md-input-container>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newReportField" ng-click="vm.saveReportField()" class="send-button md-accent md-raised" ng-disabled="reportFieldForm.$invalid || reportFieldForm.$pristine" aria-label="SAVE" translate="ANALYTICS.SAVE" translate-attr-aria-label="ANALYTICS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newReportField" ng-click="vm.addNewReportField()" class="send-button md-accent md-raised" ng-disabled="reportFieldForm.$invalid || reportFieldForm.$pristine" aria-label="ADD" translate="ANALYTICS.ADD_REPORTFIELD" translate-attr-aria-label="ANALYTICS.ADD_REPORTFIELD">\n                    ADD REPORT FIELD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newReportField" ng-click="vm.deleteReportField($event)" aria-label="DELETE" translate translate-attr-aria-label="ANALYTICS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="ANALYTICS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/analytics/views/reports/edit/view.html",'<div id="analytics-report" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-reports-button md-icon-button" aria-label="Go to reports" ng-click="vm.gotoReports()" translate translate-attr-aria-label="ANALYTICS.GO_TO_ANALYTICSQUEUES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="report-image" hide-xs>\n                    <img ng-src="assets/images/business/reports.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.report.id}} {{vm.report.name}}\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="ANALYTICS.CREATED_AT"></span> <span>{{vm.report.createdAt | date:\'medium\'}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span>{{vm.report.description}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveReport()" ng-disabled="generalForm.$pristine && conditionsForm.$pristine" class="send-button md-accent md-raised" translate="ANALYTICS.SAVE" translate-attr-aria-label="ANALYTICS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="ANALYTICS.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="report-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="ANALYTICS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="ANALYTICS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.report.name" required md-autofocus>\n                                <div ng-messages="generalForm.name.$error" ng-show="generalForm.name.$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="ANALYTICS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="ANALYTICS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.report.description">\n                                <div ng-messages="generalForm.description.$error" ng-show="generalForm.description.$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="ANALYTICS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="ANALYTICS.FIELDS">FIELDS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="report-detail-form-container fields md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="ReportFieldsController as vm_rf" ng-init="vm_rf.init(vm.report)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_rf.selectedReportFields.length">\n                                <div class="md-toolbar-tools">\n                                    <div layout="row" layout-align="start center">\n                                        <div layout="column" layout-align="start start">\n                                            <div class="md-subhead" translate="ANALYTICS.FIELDS">\n                                                <span translate="ANALYTICS.FIELDS">FIELDS</span>\n                                            </div>\n                                            <div class="h4">\n                                                <span translate="ANALYTICS.TABLE">TABLE</span> <span class="text-bold">{{vm.report.table}}</span>\n                                            </div>\n                                            <div class="h4" ng-if="vm.report.joins && vm.report.joins.length && vm.isArray(vm.report.joins)">\n                                                <span>Join</span> <span class="text-bold">{{ vm.mapArray(vm.report.joins, \'foreignTable\') }}</span>\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_rf.query.filter = query" on-collapse="vm_rf.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_rf.createOrEditReportField($event)" aria-label="add field" translate translate-attr-label="ANALYTICS.ADD_FIELD">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_rf.selectedReportFields.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_rf.selectedReportFields.length}} {{vm_rf.selectedReportFields.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <md-button class="md-icon-button" ng-click="vm_rf.deleteSelectedReportFields($event)" aria-label="delete selected" translate translate-attr-label="ANALYTICS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_rf.selectedReportFields" md-progress="vm_rf.promise">\n                                    <thead md-head md-order="vm_rf.query.sort" md-on-reorder="vm_rf.getReportFields">\n                                        <tr md-row>\n                                            <th md-column width="10px">\n                                                <md-icon md-font-icon="icon-drag-vertical"></md-icon>\n                                            </th>\n                                            <th md-column>Type</th>\n                                            <th md-column>Column or Metric</th>\n                                            <th md-column>Alias</th>\n                                            <th md-column>Function</th>\n                                            <th md-column>Format</th>\n                                            <th md-column>Group By</th>\n                                            <th md-column>Order By</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body ng-sortable="vm_rf.sortableTable">\n                                        <tr md-row md-select="reportField" md-select-id="id" ng-repeat="reportField in vm_rf.reportFields.rows">\n                                            <td md-cell class="handle">\n                                                <md-icon md-font-icon="icon-drag-vertical" class="s16">\n                                            </td>\n                                            <td md-cell>\n                                                <div ng-if="reportField.MetricId && !reportField.custom" ng-click="vm_rf.createOrEditReportField($event, reportField)" class="icon icon-shape-plus s16"></div>\n                                                <div ng-if="!reportField.MetricId && reportField.custom" ng-click="vm_rf.createOrEditReportField($event, reportField)" class="icon icon-pencil-box-outline s16"></div>\n                                                <div ng-if="!reportField.MetricId && !reportField.custom" ng-click="vm_rf.createOrEditReportField($event, reportField)" class="icon icon-view-column s16"></div>\n                                            </td>\n                                            <td md-cell ng-click="vm_rf.createOrEditReportField($event, reportField)">{{reportField.MetricId ? vm_rf.getMetricName(reportField.MetricId) : reportField.field}}</td>\n                                            <td md-cell ng-click="vm_rf.createOrEditReportField($event, reportField)">{{reportField.alias}}</td>\n                                            <td md-cell ng-click="vm_rf.createOrEditReportField($event, reportField)"><span class="text-boxed blue-bg white-fg" ng-if="reportField.function">{{reportField.function}}</span><span ng-if="!reportField.function">--</span></td>\n                                            <td md-cell ng-click="vm_rf.createOrEditReportField($event, reportField)"><span class="text-boxed blue-bg white-fg" ng-if="reportField.format">{{reportField.format}}</span><span ng-if="!reportField.format">--</span></td>\n                                            <td md-cell ng-click="vm_rf.createOrEditReportField($event, reportField)"><span class="text-boxed blue-bg white-fg" ng-if="reportField.groupBy">YES</span><span ng-if="!reportField.groupBy">--</span></td>\n                                            <td md-cell ng-click="vm_rf.createOrEditReportField($event, reportField)"><span class="text-boxed blue-bg white-fg" ng-if="reportField.orderBy">{{reportField.orderBy}}</span><span ng-if="!reportField.orderBy">--</span></td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="ANALYTICS.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_rf.createOrEditReportField($event, reportField)" translate="ANALYTICS.EDIT_REPORTFIELD">\n                                                                Edit Report\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_rf.deleteConfirm(reportField, $event)" translate="ANALYTICS.DELETE_REPORTFIELD">\n                                                                Delete Report\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                        </div>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="ANALYTICS.CONDITIONS">CONDITIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="report-detail-form-container conditions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="ReportConditionsController as vm_rc" ng-init="vm_rc.init(vm.report)">\n                            <div class="pb-16" layout="row" layout-align="start center">\n                                <div class="h2 secondary-text" translate="ANALYTICS.CONDITION">CONDITION</div>\n                            </div>\n                            <form name="conditionsForm" novalidate>\n                                <div ng-if="vm_rc.report.condition.group" ng-include="\'app/main/apps/analytics/views/reports/edit/condition/group.html\'" ng-init="group=vm_rc.report.condition.group"></div>\n                            </form>\n                        </div>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab md-on-select="vm.previewReport()">\n                <md-tab-label>\n                    <span translate="ANALYTICS.PREVIEW">PREVIEW</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="report-detail-form-container result md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div ng-if="vm.error" class="h2 secondary-text" translate="ANALYTICS.ERROR">ERROR</div>\n                            <div ng-if="!vm.error" class="h2 secondary-text" translate="ANALYTICS.LIMITED_RESULT">LIMITED RESULT</div>\n                        </div>\n                        <dl ng-if="vm.error">\n                            <dt class="text-bold" translate="ANALYTICS.QUERY_ERROR">Query Error</dt>\n                            <dd>{{vm.error.sql}}</dd>\n                            <dt translate="ANALYTICS.MESSAGE">Message</dt>\n                            <dd>{{vm.error.msg}}</dd>\n                        </dl>\n                        <md-table-container ng-if="!vm.error">\n                            <table md-table>\n                                <thead md-head>\n                                    <tr md-row>\n                                        <th ng-repeat="column in vm.columns">{{column.alias || column.field}}</th>\n                                    </tr>\n                                </thead>\n                                <tbody md-body>\n                                    <tr md-row ng-repeat="row in vm.rows">\n                                        <td md-cell ng-repeat="(key, value) in row">{{ vm.valueReplacer(key, value) }}</td>\n                                    </tr>\n                                    <tr md-row ng-if="!vm.rows.length">\n                                        <td md-cell colspan="{{vm.columns.length}}"><span translate="ANALYTICS.NO_DATA">NO DATA</span></td>\n                                    </tr>\n                                </tbody>\n                            </table>\n                        </md-table-container>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab md-on-select="vm.queryReport()">\n                <md-tab-label>\n                    <span>Query</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="report-detail-form-container result md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div ng-if="vm.error" class="h2 secondary-text" translate="ANALYTICS.ERROR">ERROR</div>\n                            <div ng-if="!vm.error" class="h2 secondary-text">SQL</div>\n                        </div>\n                        <dl ng-if="vm.error">\n                            <dt class="text-bold" translate="ANALYTICS.QUERY_ERROR">Query Error</dt>\n                            <dd>{{vm.error.sql}}</dd>\n                            <dt translate="ANALYTICS.MESSAGE">Message</dt>\n                            <dd>{{vm.error.msg}}</dd>\n                        </dl>\n                        <div ng-if="!vm.error">\n                            {{vm.queryResult}}\n                        </div>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/analytics/views/reports/preview/dialog.html",'<md-dialog aria-label="Run Report">\n    <form name="reportForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title" translate="ANALYTICS.PREVIEW_REPORT">Preview Report</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <div class="md-block">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div ng-if="vm.error" class="h2 secondary-text" translate="ANALYTICS.ERROR">ERROR</div>\n                    <div ng-if="!vm.error" class="h2 secondary-text" translate="ANALYTICS.LIMITED_RESULT">LIMITED RESULT</div>\n                </div>\n                <dl ng-if="vm.error">\n                    <dt class="text-bold" translate="ANALYTICS.QUERY_ERROR">Query Error</dt>\n                    <dd>{{vm.error.sql}}</dd>\n                    <dt translate="ANALYTICS.MESSAGE">Message</dt>\n                    <dd>{{vm.error.msg}}</dd>\n                </dl>\n                <md-table-container ng-if="!vm.error">\n                    <table md-table md-progress="vm.promise">\n                        <thead md-head>\n                            <tr md-row>\n                                <th md-column ng-repeat="column in vm.columns">{{column.alias || column.field}}</th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-repeat="row in vm.rows">\n                                <td md-cell ng-repeat="(key, value) in row">{{ vm.valueReplacer(key, value) }}</td>\n                            </tr>\n                            <tr md-row ng-if="!vm.rows.length">\n                                <td md-cell colspan="{{vm.columns.length}}"><span translate="ANALYTICS.NO_DATA">NO DATA</span></td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div flex></div>\n            <md-button type="submit" ng-click="vm.closeDialog()" class="md-raised" aria-label="CLOSE" translate="ANALYTICS.CLOSE" translate-attr-aria-label="ANALYTICS.CLOSE">\n                CLOSE\n            </md-button>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/analytics/views/reports/reports.html",'<div id="reports" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-chart-line" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="ANALYTICS.REPORTS">Reports</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedReports.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedReports =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="ANALYTICS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-reports-count">\n                    <span>{{vm.selectedReports.length}}</span>\n                <span translate="ANALYTICS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="ANALYTICS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllReports()" translate="ANALYTICS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectReports()" translate="ANALYTICS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedReports" csv-label="true" filename="reports.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button ng-if="vm.currentNode.custom && (vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\')" class="md-icon-button" ng-click="vm.deleteSelectedReports($event)" aria-label="delete selected" translate translate-attr-label="ANALYTICS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div layout="column" flex="30">\n            <md-card class="padding-top-5 padding-horizontal-10 padding-bottom-0">\n                \x3c!-- SEARCH --\x3e\n                <div layout="row" layout-align="start center">\n                    <label for="searchFolder" class="m-0">\n                        <md-icon md-font-icon="icon-magnify"></md-icon>\n                    </label>\n                    <md-input-container md-no-float class="margin-horizontal-0 margin-bottom-0 margin-top-10" flex>\n                        <input id="searchFolder" placeholder="Search folder" type="text" ng-model="vm.search" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="ANALYTICS.SEARCH_FOR_FOLDER">\n                    </md-input-container>\n                </div>\n                \x3c!-- / SEARCH --\x3e\n            </md-card>\n            <md-card class="padding-10 scrollable" ms-scroll>\n                <div js-tree="vm.treeDefaultConfig" tree-events-obj="vm.treeDefaultEvents" ng-model="vm.treeDefaultData" tree="vm.treeDefaultInstance"></div>\n            </md-card>\n            <md-card class="padding-10 scrollable" ms-scroll>\n                <div js-tree="vm.treeCustomConfig" tree-events-obj="vm.treeCustomEvents" ng-model="vm.treeCustomData" tree="vm.treeCustomInstance"></div>\n            </md-card>\n        </div>\n        <md-card flex="70">\n            <md-toolbar class="md-table-toolbar md-default">\n                <div class="md-toolbar-tools">\n                    <span class="h2 secondary-text">{{vm.currentNode.text}}</span>\n                    <p ng-if="vm.currentPath">\n                        <span class="text-boxed">{{vm.currentPath}}</span>\n                    </p>\n                    <div flex></div>\n                    <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n                    <div flow-init flow-file-added="vm.importReport($file, $event, $flow)">\n                        <md-button ng-if="vm.currentNode.custom" class="md-icon-button" aria-label="import report" translate translate-attr-label="ANALYTICS.IMPORT_REPORT" flow-btn>\n                            <md-icon md-font-icon="icon-upload"></md-icon>\n                        </md-button>\n                    </div>\n                    <md-button ng-if="vm.currentNode.custom" class="md-icon-button" ng-click="vm.createOrEditReport($event)" aria-label="add report" translate translate-attr-label="ANALYTICS.ADD_REPORT">\n                        <md-icon md-font-icon="icon-plus"></md-icon>\n                    </md-button>\n                </div>\n            </md-toolbar>\n            <md-table-container>\n                <table md-table md-row-select multiple ng-model="vm.selectedReports" md-progress="vm.promise">\n                    <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getReports">\n                        <tr md-row>\n                            <th md-column md-order-by="id" width="10px">{{ \'ANALYTICS.ID\' | translate }}</th>\n                            <th md-column md-order-by="name">{{ \'ANALYTICS.NAME\' | translate }}</th>\n                            <th md-column md-order-by="description">{{ \'ANALYTICS.DESCRIPTION\' | translate }}</th>\n                            <th md-column md-order-by="createdAt">{{ \'ANALYTICS.CREATED_AT\' | translate }}</th>\n                            <th md-column width="10px"></th>\n                        </tr>\n                    </thead>\n                    <tbody md-body>\n                        <tr md-row ng-hide="vm.reports.rows.length">\n                            <td md-cell colspan="5">\n                                <div layout="row" layout-align="center center">\n                                    <span tranlsate="ANALYTICS.NO_AVAILABLE_INFO">No Available Info</span>\n                                </div>\n                            </td>\n                        </tr>\n                        <tr md-row md-select="report" md-select-id="id" ng-repeat="report in vm.reports.rows">\n                            <td ng-click="vm.currentNode.custom && vm.createOrEditReport($event, report)" md-cell class="id">{{report.id}}</td>\n                            <td ng-click="vm.currentNode.custom && vm.createOrEditReport($event, report)" md-cell class="name">{{report.name}}</td>\n                            <td ng-click="vm.currentNode.custom && vm.createOrEditReport($event, report)" md-cell class="description">{{report.description}}</td>\n                            <td ng-click="vm.currentNode.custom && vm.createOrEditReport($event, report)" md-cell class="createdAt">{{report.createdAt | date:\'medium\'}}</td>\n                            <td md-cell class="actions">\n                                <md-menu>\n                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="ANALYTICS.MORE" ng-click="$mdOpenMenu($event)">\n                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                    </md-button>\n\n                                    <md-menu-content width="3">\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.copydialog(report, $event)" translate="ANALYTICS.COPY_REPORT">\n                                                Copy Report\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.previewdialog(report, $event)" translate="ANALYTICS.PREVIEW_REPORT">\n                                                Preview Report\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.rundialog(report, $event)" translate="ANALYTICS.RUN_REPORT">\n                                                Run Report\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.downloadfile(report, $event)" translate="ANALYTICS.DOWNLOAD_JSON_REPORT">\n                                                Download Json Report\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-divider ng-if="vm.currentNode.custom"></md-menu-divider>\n                                        <md-menu-item ng-if="vm.currentNode.custom">\n                                            <md-button ng-click="vm.editstate(report, $event)" translate="ANALYTICS.EDIT_REPORT">\n                                                Edit Report\n                                            </md-button>\n                                        </md-menu-item>\n\n                                        <md-menu-item ng-if="vm.currentNode.custom && (vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\')">\n                                            <md-button ng-click="vm.deleteconfirm(report, $event)" translate="ANALYTICS.DELETE_REPORT">\n                                                Delete Report\n                                            </md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </td>\n                        </tr>\n                    </tbody>\n                </table>\n            </md-table-container>\n\n            <md-table-pagination md-label="{page: \'{{\'ANALYTICS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'ANALYTICS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'ANALYTICS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                md-total="{{vm.reports.count}}" md-on-paginate="vm.getReports" md-page-select></md-table-pagination>\n        </md-card>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- NO ADD BUTTON BUTTON --\x3e\n</div>'),e.put("app/main/apps/analytics/views/reports/run/dialog.html",'<md-dialog class="report-dialog" aria-label="Run Report">\n    <form name="reportForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title" translate="ANALYTICS.RUN_REPORT">Run Report</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.NAME">Name</label>\n                <input name="name" ng-model="vm.export.name" required md-autofocus>\n                <div ng-messages="reportForm.name.$error" ng-show="reportForm.name.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="ANALYTICS.FORMAT">FORMAT</label>\n                <md-select name="format" ng-model="vm.export.output" required>\n                    <md-option value="csv">CSV</md-option>\n                    <md-option value="xlsx">Excel (XLSX)</md-option>\n                    <md-option value="pdf">PDF</md-option>\n                    <md-option value="web">Web</md-option>\n                </md-select>\n                <div ng-messages="reportForm.format.$error" ng-show="reportForm.format.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="ANALYTICS.ERRORS.FORMAT_REQUIRED">Format field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div layout="row">\n                <div class="md-block" flex>\n                    <mdp-date-picker mdp-open-on-click required name="dateRangeFrom" mdp-placeholder="Date Range From" mdp-format="YYYY-MM-DD" mdp-max-date="vm.dateRangeTo" ng-model="vm.export.startDate">\n                        <div ng-messages="reportForm.dateRangeFrom.$error" ng-show="reportForm.dateRangeFrom.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="ANALYTICS.ERRORS.DATE_RANGE_FROM_REQUIRED">Date Range From field is required</span>\n                            </div>\n                            <div ng-message="format">\n                                <span translate="ANALYTICS.ERRORS.DATE_RANGE_FROM_INVALID">Date Range From field is invalid</span>\n                            </div>\n                            <div ng-message="maxDate">\n                                <span translate="ANALYTICS.ERRORS.DATE_RANGE_FROM_MAX_INVALID">Date Range From Max field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-date-picker>\n                </div>\n                <div class="md-block" flex>\n                    <mdp-date-picker mdp-open-on-click required name="dateRangeTo" mdp-placeholder="Date Range To" mdp-format="YYYY-MM-DD" mdp-min-date="vm.dateRangeFrom" ng-model="vm.export.endDate">\n                        <div ng-messages="reportForm.dateRangeTo.$error" ng-show="reportForm.dateRangeTo.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="ANALYTICS.ERRORS.DATE_RANGE_TO_REQUIRED">Date Range From field is required</span>\n                            </div>\n                            <div ng-message="format">\n                                <span translate="ANALYTICS.ERRORS.DATE_RANGE_TO_INVALID">Date Range From field is invalid</span>\n                            </div>\n                            <div ng-message="minDate">\n                                <span translate="ANALYTICS.ERRORS.DATE_RANGE_FROM_MIN_INVALID">Date Range From Min field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-date-picker>\n                </div>\n            </div>\n            <div layout="row">\n                <div class="md-block" flex>\n                    <mdp-time-picker required name="timeRangeFrom" mdp-placeholder="Time Range From" mdp-format="HH:mm:ss" mdp-auto-switch="true" mdp-max-date="vm.dateRangeTo" ng-model="vm.export.startDate">\n                        <div ng-messages="reportForm.timeRangeFrom.$error" ng-show="reportForm.timeRangeFrom.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="ANALYTICS.ERRORS.TIME_RANGE_FROM_REQUIRED">Time Range From field is required</span>\n                            </div>\n                            <div ng-message="format">\n                                <span translate="ANALYTICS.ERRORS.TIME_RANGE_FROM_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n                <div class="md-block" flex>\n                    <mdp-time-picker required name="timeRangeTo" mdp-placeholder="Time Range To" mdp-format="HH:mm:ss" mdp-auto-switch="true" mdp-min-date="vm.dateRangeFrom" ng-model="vm.export.endDate">\n                        <div ng-messages="reportForm.timeRangeTo.$error" ng-show="reportForm.timeRangeTo.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="ANALYTICS.ERRORS.TIME_RANGE_TO_REQUIRED">Time Range From field is required</span>\n                            </div>\n                            <div ng-message="format">\n                                <span translate="ANALYTICS.ERRORS.TIME_RANGE_TO_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.runReport($event)" class="send-button md-accent md-raised" ng-disabled="reportForm.$invalid" aria-label="RUN" translate="ANALYTICS.RUN_REPORT" translate-attr-aria-label="ANALYTICS.RUN_REPORT">\n                    RUN REPORT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-click="vm.refreshDate()" aria-label="REFRESH" translate translate-attr-aria-label="ANALYTICS.REFRESH">\n                    <md-icon md-font-icon="icon-refresh"></md-icon>\n                    <md-tooltip><span translate="ANALYTICS.REFRESH">REFRESH</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/analytics/views/reports/run/web/dialog.html",'<md-dialog class="web-dialog" aria-label="Show Report">\n    <form name="reportForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title" translate="ANALYTICS.PREVIEW_REPORT">Web Report</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <div class="md-block">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div ng-if="vm.error" class="h2 secondary-text" translate="ANALYTICS.ERROR">ERROR</div>\n                </div>\n                <dl ng-if="vm.error">\n                    <dt class="text-bold" translate="ANALYTICS.QUERY_ERROR">Query Error</dt>\n                    <dd>{{vm.error.sql}}</dd>\n                    <dt translate="ANALYTICS.MESSAGE">Message</dt>\n                    <dd>{{vm.error.msg}}</dd>\n                </dl>\n                <md-table-container ng-if="!vm.error">\n                    <table md-table md-progress="vm.promise">\n                        <thead md-head>\n                            <tr md-row>\n                                <th md-column ng-repeat="column in vm.columns">{{column.alias || column.field}}</th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-repeat="row in vm.results.rows">\n                                <td md-cell ng-repeat="(key, value) in row">{{ vm.valueReplacer(key, value) }}</td>\n                            </tr>\n                            <tr md-row ng-if="!vm.results.rows.length">\n                                <td md-cell colspan="{{vm.columns.length}}">\n                                    <div layout="row" layout-align="center center">\n                                        <span translate="ANALYTICS.NO_DATA">NO DATA</span>\n                                    </div>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'ANALYTICS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'ANALYTICS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'ANALYTICS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.results.count}}" md-on-paginate="vm.getResults" md-page-select></md-table-pagination>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div flex></div>\n            <md-button type="submit" ng-click="vm.closeDialog()" class="md-raised" aria-label="CLOSE" translate="ANALYTICS.CLOSE" translate-attr-aria-label="ANALYTICS.CLOSE">\n                CLOSE\n            </md-button>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/callysquare/views/odbcs/create/dialog.html",'<md-dialog class="odbc-dialog" aria-label="New Odbc">\n    <form name="odbcForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CALLYSQUARE.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.odbc.name" ng-required="true" autofocus>\n                <div ng-messages="odbcForm[\'name\'].$error" ng-show="odbcForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CALLYSQUARE.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CALLYSQUARE.DSN">DSN</label>\n                <input type="text" name="dsn" ng-model="vm.odbc.dsn" ng-required="true">\n                <div class="hint"><span translate="CALLYSQUARE.HELP.DSN"></span></div>\n                <div ng-messages="odbcForm[\'dsn\'].$error" ng-show="odbcForm[\'dsn\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CALLYSQUARE.ERRORS.DSN_REQUIRED">DSN field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CALLYSQUARE.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.odbc.description">\n                <div ng-messages="odbcForm[\'description\'].$error" ng-show="odbcForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CALLYSQUARE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newOdbc" ng-click="vm.saveOdbc()" class="send-button md-accent md-raised" ng-disabled="odbcForm.$invalid || odbcForm.$pristine" aria-label="SAVE" translate="CALLYSQUARE.SAVE" translate-attr-aria-label="CALLYSQUARE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newOdbc" ng-click="vm.addNewOdbc()" class="send-button md-accent md-raised" ng-disabled="odbcForm.$invalid" aria-label="ADD" translate="CALLYSQUARE.ADD_ODBC" translate-attr-aria-label="CALLYSQUARE.ADD_ODBC">\n                    ADD ODBC\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newOdbc" ng-click="vm.deleteOdbc($event)" aria-label="DELETE" translate translate-attr-aria-label="CALLYSQUARE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CALLYSQUARE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/callysquare/views/odbcs/odbcs.html",'<div id="odbcs" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-sitemap" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="CALLYSQUARE.ODBC">ODBC</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="CALLYSQUARE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedODBC.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedODBC =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="CALLYSQUARE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-odbcs-count">\n                    <span>{{vm.selectedODBC.length}}</span>\n                <span translate="CALLYSQUARE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="ODBC.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllODBC()" translate="CALLYSQUARE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectODBC()" translate="CALLYSQUARE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedODBC" csv-label="true" filename="odbcs.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedODBC($event)" aria-label="delete selected" translate translate-attr-label="ODBC.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- ODBC TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedODBC" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getODBC">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'CALLYSQUARE.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'CALLYSQUARE.NAME\' | translate }}</th>\n                                <th md-column md-order-by="dsn">{{ \'CALLYSQUARE.DSN\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'CALLYSQUARE.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.odbcs.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="CALLYSQUARE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="odbc" md-select-id="id" ng-repeat="odbc in vm.odbcs.rows">\n                                <td md-cell ng-if="odbc.userpic"><img class="avatar" alt="{{odbc.name}}" ng-src="api/users/{{odbc.id}}/avatar" /></td>\n                                <td md-cell ng-if="!odbc.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{odbc.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditOdbc($event, odbc)" md-cell class="id ">{{odbc.id}}</td>\n                                <td ng-click="vm.createOrEditOdbc($event, odbc)" md-cell class="name ">{{odbc.name}}</td>\n                                <td ng-click="vm.createOrEditOdbc($event, odbc)" md-cell class="dsn ">{{odbc.dsn}}</td>\n                                <td ng-click="vm.createOrEditOdbc($event, odbc)" md-cell class="description ">{{odbc.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CALLYSQUARE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(odbc, $event)" translate="CALLYSQUARE.EDIT_ODBC">\n                                                    Edit Odbc\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.testtestOdbc(odbc, $event)" translate="CALLYSQUARE.TEST_ODBC">\n                                                    Test Odbc\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(odbc, $event)" translate="CALLYSQUARE.DELETE_ODBC">\n                                                    Delete Odbc\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'CALLYSQUARE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CALLYSQUARE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CALLYSQUARE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.odbcs.count}}" md-on-paginate="vm.getODBC" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / ODBC TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD ODBC BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-odbc-button" ng-click="vm.createOrEditOdbc($event)" aria-label="add odbc" translate translate-attr-aria-label="CALLYSQUARE.ADD_ODBC">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD ODBC BUTTON --\x3e\n</div>'),e.put("app/main/apps/callysquare/views/projects/create/dialog.html",'<md-dialog class="project-dialog" aria-label="New Project">\n    <form name="projectForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{vm.title | translate}}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CALLYSQUARE.NAME">Name</label>\n                <input name="name" ng-model="vm.project.name" required md-autofocus ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-disabled="!vm.newProject">\n                <div ng-messages="projectForm.name.$error" ng-show="projectForm.name.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CALLYSQUARE.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="VOICE.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CALLYSQUARE.DESCRIPTION">Description</label>\n                <input name="description" ng-model="vm.project.description">\n                <div ng-messages="projectForm.description.$error" ng-show="projectForm.description.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CALLYSQUARE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.openFromEditor" class="md-block">\n                \x3c!-- Added to check if I\'m opening the dialog directly from the square editor --\x3e\n                <md-switch ng-model="vm.newWindow" aria-label="{{\'CALLYSQUARE.OPEN_NEW_WINDOW\' | translate }}"><span translate="CALLYSQUARE.OPEN_NEW_WINDOW"></span></md-switch>\n            </md-input-container>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newProject" ng-click="vm.saveProject()" class="send-button md-accent md-raised" ng-disabled="projectForm.$invalid || projectForm.$pristine" aria-label="SAVE" translate="CALLYSQUARE.SAVE" translate-attr-aria-label="CALLYSQUARE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newProject" ng-click="vm.addNewProject()" class="send-button md-accent md-raised" ng-disabled="projectForm.$invalid || projectForm.$pristine" aria-label="ADD" translate="CALLYSQUARE.ADD_PROJECT" translate-attr-aria-label="CALLYSQUARE.ADD_PROJECT">\n                    ADD PROJECT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newProject" ng-click="vm.deleteProject($event)" aria-label="DELETE" translate translate-attr-aria-label="CALLYSQUARE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CALLYSQUARE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/callysquare/views/projects/edit/dialog/dialog.html",'<md-dialog class="project-dialog" aria-label="New dialog">\n    <form name="dialogForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title"><span translate="CALLYSQUARE.EDIT"></span> <span translate="CALLYSQUARE.{{vm.cellName | uppercase}}"></span></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content ms-scroll>\n            <md-input-container class="md-block" ng-repeat="attribute in vm.attributes" ng-switch="attribute.name">\n                <label translate="CALLYSQUARE.{{attribute.name | uppercase}}">{{attribute.name  | ucfirst }}</label>\n\n                \x3c!--  START SELECT INPUT --\x3e\n                <md-select name="{{attribute.name}}" ng-model="attribute.value" ng-switch-when-separator="|" ng-switch-when="answer|trunk_name|trunk_id|queue_id|file_id|variable_id|google_tts_language|ispeech_tts_language|ispeech_asr_language|google_asr_language|hiddendigitspos|odbc_id|project_id|beep|account_id|interval_id|template_id|list_id|recordingFormat|callback_priority|aws_polly_voice|aws_polly_region|sms_account_id|findBy|pause_id"\n                    ng-required="attribute.required">\n                    <md-option ng-if="attribute.defaultValue" ng-value="\'\'"> - None - </md-option>\n                    <md-option value="{{v.value}}" ng-repeat="v in vm.values[attribute.name]">{{v.option}}</md-option>\n                    <md-option ng-if="!vm.values[attribute.name].length" value="-1">No {{attribute.name}} available!</md-option>\n                </md-select>\n                \x3c!--  END SELECT INPUT --\x3e\n\n                \x3c!--  START SELECT INPUT --\x3e\n                <md-select name="{{attribute.name}}" ng-model="attribute.value" ng-switch-when-separator="|" ng-switch-when="sip_id" ng-required="attribute.required">\n                    <md-optgroup label="{{\'CALLYSQUARE.AGENTS\' | translate}}">\n                        <md-option value="{{v.value}}" ng-repeat="v in vm.values[attribute.name]" ng-if="v.group === \'agent\'">{{v.option}}</md-option>\n                    </md-optgroup>\n                    <md-optgroup label="{{\'CALLYSQUARE.TELEPHONES\' | translate}}">\n                        <md-option value="{{v.value}}" ng-repeat="v in vm.values[attribute.name]" ng-if="v.group === \'telephone\'">{{v.option}}</md-option>\n                    </md-optgroup>\n                    <md-optgroup label="{{\'CALLYSQUARE.USERS\' | translate}}">\n                        <md-option value="{{v.value}}" ng-repeat="v in vm.values[attribute.name]" ng-if="v.group === \'admin\' || v.group === \'user\'">{{v.option}}</md-option>\n                    </md-optgroup>\n                    <md-option ng-if="!vm.values[attribute.name].length" value="-1">No {{attribute.name}} available!</md-option>\n                </md-select>\n                \x3c!--  END SELECT INPUT --\x3e\n\n                \x3c!--  START NUMBER INPUT --\x3e\n                <div ng-switch-when="timeout">\n                    <div ng-switch="vm.cellName">\n                        <input ng-switch-when-separator="|" ng-switch-when="answer|ext_dial|dial|queue" type="number" step="any" name="{{attribute.name}}" min="0" ng-model="attribute.value" ng-required="attribute.required" string-to-number>\n                        <input ng-switch-when-separator="|" ng-switch-when="record|ispeechasr|googleasr" type="number" step="any" name="{{attribute.name}}" min="-1" ng-model="attribute.value" ng-required="attribute.required" string-to-number>\n                        <input ng-switch-default type="number" step="any" name="{{attribute.name}}" min="0" ng-model="attribute.value" ng-required="attribute.required" string-to-number>\n                    </div>\n                </div>\n                <input ng-switch-when-separator="|" ng-switch-when="speed" type="number" step="any" name="{{attribute.name}}" min="-10" max="-10" ng-model="attribute.value" ng-required="attribute.required" string-to-number>\n                <input ng-switch-when-separator="|" ng-switch-when="maxdigit|mindigit|digit" type="number" step="any" name="{{attribute.name}}" min="1" ng-model="attribute.value" ng-required="attribute.required" string-to-number>\n                <input ng-switch-when-separator="|" ng-switch-when="retry|response|hiddendigitsnum|priority|delay" type="number" step="any" name="{{attribute.name}}" min="1" ng-model="attribute.value" ng-required="attribute.required" string-to-number>\n                \x3c!--  END NUMBER INPUT --\x3e\n\n                \x3c!--  START TEXTAREA INPUT --\x3e\n                <textarea name="{{attribute.name}}" ng-model="attribute.value" ng-switch-when-separator="|" ng-switch-when="query|sms_text|condition|text" ng-required="attribute.required"></textarea>\n                \x3c!--  END TEXTAREA INPUT --\x3e\n\n                \x3c!--  START TEXT INPUT --\x3e\n                <input ng-switch-default name="{{attribute.name}}" ng-model="attribute.value" ng-required="attribute.required">\n                \x3c!--  END TEXT INPUT--\x3e\n\n                <div class="hint" ng-if="attribute.help">\n                    <span translate="CALLYSQUARE.HELP.{{attribute.name | uppercase}}"></span>\n                </div>\n                <div ng-messages="dialogForm[attribute.name].$error" ng-show="dialogForm[attribute.name].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CALLYSQUARE.ERRORS.FIELD_REQUIRED">The field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.closeDialog(true)" class="send-button md-accent md-raised" ng-disabled="dialogForm.$invalid || dialogForm.$pristine" aria-label="SAVE" translate="CALLYSQUARE.SAVE" translate-attr-aria-label="CALLYSQUARE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/callysquare/views/projects/edit/edit/edit.html",'<md-dialog class="project-dialog" aria-label="New dialog">\n    <form name="editForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title"><span translate="CALLYSQUARE.EDIT_XML"></span></span>\n                </span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label>XML</label>\n                <textarea name="preproduction" ng-model="vm.project.preproduction"></textarea>\n            </md-input-container>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.closeDialog(true)" class="send-button md-accent md-raised" ng-disabled="editForm.$invalid" aria-label="SAVE" translate="CALLYSQUARE.SAVE" translate-attr-aria-label="CALLYSQUARE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/callysquare/views/projects/edit/import/import.html",'<md-dialog class="project-dialog" aria-label="New dialog">\n    <form name="importForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title"><span translate="CALLYSQUARE.IMPORT_XML"></span></span>\n                </span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <div id="xml-uploader" flow-init="vm.ngFlowOptions" flow-name="vm.ngFlow.flow" flow-file-added="vm.fileAdded($file)" flow-drop flow-drag-enter="vm.dropping=true" flow-drag-leave="vm.dropping=false" ng-class="{\'dropping\':vm.dropping}">\n\n                <div class="drop-text hint-text" layout="row" layout-align="center center">\n                    <span translate="CALLYSQUARE.DROP_TO_UPLOAD">Drop to upload</span>\n                </div>\n\n                <div class="upload-button" layout="column" layout-align="center center">\n                    <md-button class="md-accent md-raised" flow-btn>\n                        Upload\n                    </md-button>\n                    <span class="secondary-text mt-8" translate="CALLYSQUARE.DROP_TO_UPLOAD_MESSAGE">You can also drop files here to upload. Only XML - Max. 5MB</span>\n                </div>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.closeDialog()" class="send-button md-accent md-raised" ng-disabled="importForm.$invalid" aria-label="CLOSE" translate="CALLYSQUARE.CLOSE" translate-attr-aria-label="CALLYSQUARE.CLOSE">\n                    CLOSE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/callysquare/views/projects/edit/info/info.html",'<md-dialog class="project-dialog" aria-label="New dialog">\n    <form name="descriptionFrom" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title"><span translate="CALLYSQUARE.UPDATE_INFO"></span></span>\n                </span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CALLYSQUARE.DESCRIPTION">Description</label>\n                <input name="description" ng-model="vm.project.description" md-autofocus>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CALLYSQUARE.NOTES">Description</label>\n                <textarea name="notes" ng-model="vm.project.notes"></textarea>\n            </md-input-container>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.save()" class="send-button md-accent md-raised" ng-disabled="descriptionFrom.$invalid" aria-label="SAVE" translate="CALLYSQUARE.UPDATE_INFO" translate-attr-aria-label="CALLYSQUARE.UPDATE">\n                    UPDATE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/callysquare/views/projects/edit/open/open.html",'<md-dialog class="project-dialog" aria-label="New dialog">\n    <form name="openForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title"><span translate="CALLYSQUARE.OPEN_PROJECT"></span></span>\n                </span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CALLYSQUARE.PROJECT">Project</label>\n                <md-select name="id" ng-model="vm.id" required>\n                    <md-option value="{{p.id}}" ng-repeat="p in vm.projects">{{p.name}}</md-option>\n                </md-select>\n                <div ng-messages="openForm.id.$error" ng-show="openForm.id.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CALLYSQUARE.ERRORS.PROJECT_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.newWindow" aria-label="{{\'CALLYSQUARE.OPEN_NEW_WINDOW\' | translate }}"><span translate="CALLYSQUARE.OPEN_NEW_WINDOW"></span></md-switch>\n            </md-input-container>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.closeDialog(true)" class="send-button md-accent md-raised" ng-disabled="openForm.$invalid" aria-label="SAVE" translate="CALLYSQUARE.OPEN_PROJECT" translate-attr-aria-label="CALLYSQUARE.OPEN">\n                    OPEN\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/callysquare/views/projects/edit/saveAs/saveAs.html",'<md-dialog class="project-dialog" aria-label="New dialog">\n    <form name="newForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title"><span translate="CALLYSQUARE.COPY_PROJECT"></span></span>\n                </span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CALLYSQUARE.NAME">Name</label>\n                <input name="name" ng-model="vm.project.name" required md-autofocus>\n                <div ng-messages="newForm.name.$error" ng-show="newForm.name.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CALLYSQUARE.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.newWindow" aria-label="{{\'CALLYSQUARE.OPEN_NEW_WINDOW\' | translate }}"><span translate="CALLYSQUARE.OPEN_NEW_WINDOW"></span></md-switch>\n            </md-input-container>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.save()" class="send-button md-accent md-raised" ng-disabled="newForm.$invalid" aria-label="SAVE" translate="CALLYSQUARE.COPY_PROJECT" translate-attr-aria-label="CALLYSQUARE.COPY">\n                    COPY\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/callysquare/views/projects/edit/view.html",'<div id="callysquare-project" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-projects-button md-icon-button" aria-label="Go to projects" ng-click="vm.gotoProjects()" translate translate-attr-aria-label="CALLYSQUARE.GO_TO_PROJECTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="project-image" hide-xs>\n                    <img ng-src="assets/images/business/cprojects.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.project.id}} {{vm.project.name}}\n                    </div>\n                    <div class="subtitle secondary-text text-truncate">\n                        <span ng-if="vm.project.description">{{vm.project.description}}  - </span><span translate="CALLYSQUARE.CREATED_AT"></span> <span>{{vm.project.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.updateInfo($event)" class="md-fab md-yellow-700-bg md-icon-button" aria-label="edit">\n                <md-icon md-font-icon="icon-tooltip-edit"></md-icon>\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <md-content class="callysquare-content">\n\n        <div id="geEditor" class="geEditor"></div>\n\n    </md-content>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/callysquare/views/projects/projects.html",'<div id="projects" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-vector-square" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="CALLYSQUARE.PROJECTS">Projects</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        \x3c!-- SEARCH --\x3e\n        <div class="search-input-wrapper" layout="row" layout-align="start center">\n            <label for="search">\n                <md-icon md-font-icon="icon-magnify"></md-icon>\n            </label>\n            <md-input-container md-no-float class="m-0">\n                <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="CALLYSQUARE.SEARCH_FOR_ANYONE">\n            </md-input-container>\n        </div>\n        \x3c!-- / SEARCH --\x3e\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedProjects.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedProjects =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="CALLYSQUARE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-projects-count">\n                    <span>{{vm.selectedProjects.length}}</span>\n                <span translate="CALLYSQUARE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="CALLYSQUARE.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllProjects()" translate="CALLYSQUARE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectProjects()" translate="CALLYSQUARE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedProjects" csv-label="true" filename="projects.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm.deleteSelectedProjects($event)" aria-label="delete selected" translate translate-attr-label="CALLYSQUARE.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- PROJECT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedProjects" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getProjects">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'CALLYSQUARE.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'CALLYSQUARE.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'CALLYSQUARE.DESCRIPTION\' | translate }}</th>\n                                <th md-column md-order-by="notes">{{ \'CALLYSQUARE.NOTES\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.projects.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="CALLYSQUARE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="project" md-select-id="id" ng-repeat="project in vm.projects.rows">\n                                <td md-cell ng-if="project.userpic"><img class="avatar" alt="{{project.name}}" ng-src="api/users/{{project.id}}/avatar" /></td>\n                                <td md-cell ng-if="!project.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{project.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditProject($event, project)" md-cell class="id ">{{project.id}}</td>\n                                <td ng-click="vm.createOrEditProject($event, project)" md-cell class="name ">{{project.name}}</td>\n                                <td ng-click="vm.createOrEditProject($event, project)" md-cell class="description ">{{project.description}}</td>\n                                <td ng-click="vm.createOrEditProject($event, project)" md-cell class="notes ">{{project.notes}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CALLYSQUARE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(project, ev)" translate="CALLYSQUARE.EDIT_PROJECT">\n                                                    Edit Project\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(project, ev)" translate="CALLYSQUARE.DELETE_PROJECT">\n                                                    Delete Project\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'CALLYSQUARE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CALLYSQUARE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CALLYSQUARE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.projects.count}}" md-on-paginate="vm.getProjects" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / PROJECT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD PROJECT BUTTON --\x3e\n    <md-button class="md-fab md-accent md-icon-button" id="add-project-button" ng-click="vm.createOrEditProject($event)" aria-label="add project" translate translate-attr-aria-label="CALLYSQUARE.ADD_PROJECT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD PROJECT BUTTON --\x3e\n\n</div>'),e.put("app/main/apps/callysquare/views/squareRecordings/create/dialog.html",'<md-dialog class="squareRecording-dialog" aria-label="New SquareRecording">\n    <form name="squareRecordingForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CALLYSQUARE.FILENAME">Filename</label>\n                <input type="" name="filename" ng-model="vm.squareRecording.filename" ng-required="true" autofocus>\n                <div ng-messages="squareRecordingForm[\'filename\'].$error" ng-show="squareRecordingForm[\'filename\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CALLYSQUARE.ERRORS.FILENAME_REQUIRED">Filename field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSquareRecording" ng-click="vm.saveSquareRecording()" class="send-button md-accent md-raised" ng-disabled="squareRecordingForm.$invalid || squareRecordingForm.$pristine" aria-label="SAVE" translate="CALLYSQUARE.SAVE"\n                    translate-attr-aria-label="CALLYSQUARE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSquareRecording" ng-click="vm.addNewSquareRecording()" class="send-button md-accent md-raised" ng-disabled="squareRecordingForm.$invalid" aria-label="ADD" translate="CALLYSQUARE.ADD_SQUARERECORDING" translate-attr-aria-label="CALLYSQUARE.ADD_SQUARERECORDING">\n                    ADD SQUARERECORDING\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSquareRecording" ng-click="vm.deleteSquareRecording($event)" aria-label="DELETE" translate translate-attr-aria-label="CALLYSQUARE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CALLYSQUARE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/callysquare/views/squareRecordings/squareRecordings.html",'<div id="squareRecordings" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-sitemap" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="CALLYSQUARE.SQUARERECORDINGS">SquareRecordings</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="CALLYSQUARE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedSquareRecordings.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedSquareRecordings =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="CALLYSQUARE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-squareRecordings-count">\n                    <span>{{vm.selectedSquareRecordings.length}}</span>\n                <span translate="CALLYSQUARE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="SQUARERECORDINGS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllSquareRecordings()" translate="CALLYSQUARE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectSquareRecordings()" translate="CALLYSQUARE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedSquareRecordings" csv-label="true" filename="squareRecordings.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedSquareRecordings($event)" aria-label="delete selected" translate translate-attr-label="SQUARERECORDINGS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- SQUARERECORDING TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedSquareRecordings" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getSquareRecordings">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="filename">{{ \'CALLYSQUARE.FILENAME\' | translate }}</th>\n                                <th md-column md-order-by="projectName">{{ \'CALLYSQUARE.PROJECT\' | translate }}</th>\n                                <th md-column md-order-by="uniqueid">{{ \'CALLYSQUARE.UNIQUEID\' | translate }}</th>\n                                <th md-column md-order-by="callerid">{{ \'CALLYSQUARE.PHONE\' | translate }}</th>\n                                <th md-column md-order-by="extension">{{ \'CALLYSQUARE.EXTEN\' | translate }}</th>\n                                <th md-column md-order-by="audio">{{ \'CALLYSQUARE.AUDIO\' | translate }}</th>\n                                <th md-column md-order-by="createdAt">{{ \'CALLYSQUARE.CREATED_AT\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.squareRecordings.rows.length">\n                                <td md-cell colspan="8">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="CALLYSQUARE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="squareRecording" md-select-id="id" ng-repeat="squareRecording in vm.squareRecordings.rows">\n                                <td md-cell ng-if="squareRecording.userpic"><img class="avatar" alt="{{squareRecording.name}}" ng-src="api/users/{{squareRecording.id}}/avatar" /></td>\n                                <td md-cell ng-if="!squareRecording.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{squareRecording.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditSquareRecording($event, squareRecording)" md-cell class="filename ">{{squareRecording.filename}}</td>\n                                <td ng-click="vm.createOrEditSquareRecording($event, squareRecording)" md-cell class="projectName ">{{squareRecording.projectName}}</td>\n                                <td ng-click="vm.createOrEditSquareRecording($event, squareRecording)" md-cell class="uniqueid ">{{squareRecording.uniqueid}}</td>\n                                <td ng-click="vm.createOrEditSquareRecording($event, squareRecording)" md-cell class="callerid ">{{squareRecording.callerid}}</td>\n                                <td ng-click="vm.createOrEditSquareRecording($event, squareRecording)" md-cell class="extension ">{{squareRecording.extension}}</td>\n                                <td md-cell class="audio ">\n                                    \x3c!-- audio recording directive --\x3e\n                                    <ms-recording id="squareRecording.id" model="\'squareRecording\'"></ms-recording>\n                                    \x3c!-- / audio recording directive --\x3e\n                                </td>\n                                <td ng-click="vm.createOrEditSquareRecording($event, squareRecording)" md-cell class="createdAt ">{{squareRecording.createdAt | date:\'medium\' }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CALLYSQUARE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.downloadfile2(squareRecording, $event)" translate="CALLYSQUARE.DOWNLOAD_SQUARERECORDING">\n                                                    Download SquareRecording\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(squareRecording, $event)" translate="CALLYSQUARE.DELETE_SQUARERECORDING">\n                                                    Delete SquareRecording\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'CALLYSQUARE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CALLYSQUARE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CALLYSQUARE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.squareRecordings.count}}" md-on-paginate="vm.getSquareRecordings" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / SQUARERECORDING TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- NO ADD BUTTON BUTTON --\x3e\n</div>'),e.put("app/main/apps/chat/views/chatQueues/chatQueues.html",'<div id="chatQueues" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-hangouts" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="CHAT.CHATQUEUES">ChatQueues</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="CHAT.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedChatQueues.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedChatQueues =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="CHAT.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-chatQueues-count">\n                    <span>{{vm.selectedChatQueues.length}}</span>\n                <span translate="CHAT.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="CHATQUEUES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllChatQueues()" translate="CHAT.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectChatQueues()" translate="CHAT.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedChatQueues" csv-label="true" filename="chatQueues.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedChatQueues($event)" aria-label="delete selected" translate translate-attr-label="CHATQUEUES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- CHATQUEUE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedChatQueues" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getChatQueues">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'CHAT.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'CHAT.NAME\' | translate }}</th>\n                                <th md-column md-order-by="strategy">{{ \'CHAT.STRATEGY\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.chatQueues.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="CHAT.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="chatQueue" md-select-id="id" ng-repeat="chatQueue in vm.chatQueues.rows">\n                                <td md-cell ng-if="chatQueue.userpic"><img class="avatar" alt="{{chatQueue.name}}" ng-src="api/users/{{chatQueue.id}}/avatar" /></td>\n                                <td md-cell ng-if="!chatQueue.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{chatQueue.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditChatQueue($event, chatQueue)" md-cell class="id ">{{chatQueue.id}}</td>\n                                <td ng-click="vm.createOrEditChatQueue($event, chatQueue)" md-cell class="name ">{{chatQueue.name}}</td>\n                                <td ng-click="vm.createOrEditChatQueue($event, chatQueue)" md-cell class="strategy ">{{ vm.arraystrategy[chatQueue.strategy].option }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CHAT.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(chatQueue, $event)" translate="CHAT.EDIT_CHATQUEUE">\n                                                    Edit ChatQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.teamadddialog(chatQueue, $event)" translate="CHAT.TEAMADD_CHATQUEUE">\n                                                    teamadd ChatQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.agentadddialog(chatQueue, $event)" translate="CHAT.AGENTADD_CHATQUEUE">\n                                                    agentadd ChatQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(chatQueue, $event)" translate="CHAT.DELETE_CHATQUEUE">\n                                                    Delete ChatQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(chatQueue, $event)" translate="CHAT.GOTOREALTIME_CHATQUEUE">\n                                                    goToRealtime ChatQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'CHAT.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CHAT.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CHAT.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.chatQueues.count}}" md-on-paginate="vm.getChatQueues" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / CHATQUEUE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD CHATQUEUE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-chatQueue-button" ng-click="vm.createOrEditChatQueue($event)" aria-label="add chatQueue" translate translate-attr-aria-label="CHAT.ADD_CHATQUEUE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD CHATQUEUE BUTTON --\x3e\n</div>'),e.put("app/main/apps/chat/views/chatQueues/create/dialog.html",'<md-dialog class="chatQueue-dialog" aria-label="New ChatQueue">\n    <form name="chatQueueForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.chatQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newChatQueue">\n                <div class="hint"><span translate="CHAT.HELP.NAME"></span></div>\n                <div ng-messages="chatQueueForm[\'name\'].$error" ng-show="chatQueueForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="CHAT.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.STRATEGY">Strategy</label>\n                <md-select name="strategy" ng-model="vm.chatQueue.strategy" required>\n                    <md-option ng-value="\'beepall\'">Beepall</md-option>\n                    <md-option ng-value="\'rrmemory\'">RR Memory</md-option>\n                </md-select>\n                <div ng-messages="chatQueueForm[\'strategy\'].$error" ng-show="chatQueueForm[\'strategy\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.AGENT_TIMEOUT">Agent_Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.chatQueue.timeout" min="1" max="2147483" ng-required="true">\n                <div ng-messages="chatQueueForm[\'timeout\'].$error" ng-show="chatQueueForm[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.AGENT_TIMEOUT_REQUIRED">Agent_Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="CHAT.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="CHAT.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.chatQueue.description">\n                <div ng-messages="chatQueueForm[\'description\'].$error" ng-show="chatQueueForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newChatQueue" ng-click="vm.saveChatQueue()" class="send-button md-accent md-raised" ng-disabled="chatQueueForm.$invalid || chatQueueForm.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newChatQueue" ng-click="vm.addNewChatQueue()" class="send-button md-accent md-raised" ng-disabled="chatQueueForm.$invalid" aria-label="ADD" translate="CHAT.ADD_CHATQUEUE" translate-attr-aria-label="CHAT.ADD_CHATQUEUE">\n                    ADD CHATQUEUE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newChatQueue" ng-click="vm.deleteChatQueue($event)" aria-label="DELETE" translate translate-attr-aria-label="CHAT.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CHAT.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatQueues/edit/agentadd/agentadd.html",'<md-dialog class="chatQueue-dialog" aria-label="chatQueue">\n    <form name="chatQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="CHAT.AGENTADD_CHATQUEUE">Add Agent to chatQueue</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatQueues/edit/teamadd/teamadd.html",'<md-dialog class="chatQueue-dialog" aria-label="chatQueue">\n    <form name="chatQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="CHAT.TEAMADD_CHATQUEUE">Add Team in CHATQUEUE</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatQueues/edit/view.html",'<div id="chat-chatQueue" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-chatQueues-button md-icon-button" aria-label="Go to chatQueues" ng-click="vm.gotoChatQueues()" translate translate-attr-aria-label="CHAT.GO_TO_CHATQUEUES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="chatQueue-image" hide-xs>\n                    <img ng-src="assets/images/business/chatQueues.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.chatQueue.id}}\n                        <span ng-if="vm.chatQueue.name">{{vm.chatQueue.name}}</span>\n                        <span ng-if="vm.chatQueue.exten">{{vm.chatQueue.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="CHAT.CREATED_AT"></span> <span>{{vm.chatQueue.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.teamadddialog(vm.chatQueue, $event)" class="md-fab md-orange-500-bg md-icon-button" aria-label="teamadd">\n                <md-tooltip><span translate="CHAT.TEAMADD_CHATQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-multiple-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.agentadddialog(vm.chatQueue, $event)" class="md-fab md-purple-500-bg md-icon-button" aria-label="agentadd">\n                <md-tooltip><span translate="CHAT.AGENTADD_CHATQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-plus"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveChatQueue()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid)" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CHAT.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="chatQueue-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="CHAT.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.chatQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="CHAT.HELP.NAME"></span></div>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="CHAT.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.STRATEGY">Strategy</label>\n                                <md-select name="strategy" ng-model="vm.chatQueue.strategy" required>\n                                    <md-option ng-value="\'beepall\'">Beepall</md-option>\n                                    <md-option ng-value="\'rrmemory\'">RR Memory</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'strategy\'].$error" ng-show="generalForm[\'strategy\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.AGENT_TIMEOUT">Agent_Timeout</label>\n                                <input type="number" name="timeout" ng-model="vm.chatQueue.timeout" min="1" max="2147483" ng-required="true">\n                                <div ng-messages="generalForm[\'timeout\'].$error" ng-show="generalForm[\'timeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.AGENT_TIMEOUT_REQUIRED">Agent_Timeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="CHAT.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="CHAT.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.chatQueue.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/chat/views/chatWebsites/chatWebsites.html",'<div id="chatWebsites" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-hangouts" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="CHAT.CHATWEBSITES">ChatWebsites</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="CHAT.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedChatWebsites.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedChatWebsites =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="CHAT.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-chatWebsites-count">\n                    <span>{{vm.selectedChatWebsites.length}}</span>\n                <span translate="CHAT.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="CHATWEBSITES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllChatWebsites()" translate="CHAT.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectChatWebsites()" translate="CHAT.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedChatWebsites" csv-label="true" filename="chatWebsites.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedChatWebsites($event)" aria-label="delete selected" translate translate-attr-label="CHATWEBSITES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- CHATWEBSITE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedChatWebsites" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getChatWebsites">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'CHAT.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'CHAT.NAME\' | translate }}</th>\n                                <th md-column md-order-by="key">{{ \'CHAT.KEY\' | translate }}</th>\n                                <th md-column md-order-by="address">{{ \'CHAT.MOTIONADDRESS\' | translate }}</th>\n                                <th md-column md-order-by="remote">{{ \'CHAT.MOTIONPROXY\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'CHAT.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.chatWebsites.rows.length">\n                                <td md-cell colspan="7">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="CHAT.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="chatWebsite" md-select-id="id" ng-repeat="chatWebsite in vm.chatWebsites.rows">\n                                <td md-cell ng-if="chatWebsite.userpic"><img class="avatar" alt="{{chatWebsite.name}}" ng-src="api/users/{{chatWebsite.id}}/avatar" /></td>\n                                <td md-cell ng-if="!chatWebsite.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{chatWebsite.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditChatWebsite($event, chatWebsite)" md-cell class="id ">{{chatWebsite.id}}</td>\n                                <td ng-click="vm.createOrEditChatWebsite($event, chatWebsite)" md-cell class="name ">{{chatWebsite.name}}</td>\n                                <td ng-click="vm.createOrEditChatWebsite($event, chatWebsite)" md-cell class="key ">{{chatWebsite.key}}</td>\n                                <td ng-click="vm.createOrEditChatWebsite($event, chatWebsite)" md-cell class="address ">{{chatWebsite.address}}</td>\n                                <td ng-click="vm.createOrEditChatWebsite($event, chatWebsite)" md-cell class="remote ">{{chatWebsite.remote}}</td>\n                                <td ng-click="vm.createOrEditChatWebsite($event, chatWebsite)" md-cell class="description ">{{chatWebsite.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CHAT.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(chatWebsite, $event)" translate="CHAT.EDIT_CHATWEBSITE">\n                                                    Edit ChatWebsite\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.interactionsgoto(chatWebsite, $event)" translate="CHAT.INTERACTIONS_CHATWEBSITE">\n                                                    Interactions ChatWebsite\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.offlinemessagesgoto(chatWebsite, $event)" translate="CHAT.OFFLINEMESSAGES_CHATWEBSITE">\n                                                    OfflineMessages ChatWebsite\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(chatWebsite, $event)" translate="CHAT.DELETE_CHATWEBSITE">\n                                                    Delete ChatWebsite\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'CHAT.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CHAT.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CHAT.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.chatWebsites.count}}" md-on-paginate="vm.getChatWebsites" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / CHATWEBSITE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD CHATWEBSITE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-chatWebsite-button" ng-click="vm.createOrEditChatWebsite($event)" aria-label="add chatWebsite" translate translate-attr-aria-label="CHAT.ADD_CHATWEBSITE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD CHATWEBSITE BUTTON --\x3e\n</div>'),e.put("app/main/apps/chat/views/chatWebsites/create/dialog.html",'<md-dialog class="chatWebsite-dialog" aria-label="New ChatWebsite">\n    <form name="chatWebsiteForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.chatWebsite.name" ng-required="true" autofocus ng-disabled="!vm.newChatWebsite">\n                <div ng-messages="chatWebsiteForm[\'name\'].$error" ng-show="chatWebsiteForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.KEY">key</label>\n                <input type="text" name="key" ng-model="vm.chatWebsite.key" md-maxlength="5" ng-required="true">\n                <div ng-messages="chatWebsiteForm[\'key\'].$error" ng-show="chatWebsiteForm[\'key\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.KEY_REQUIRED">key field is required</span>\n                    </div>\n\n                    <div ng-message="md-maxlength">\n                        <span translate="CHAT.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 5}\'>key must have a maximum length equal to 5</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.MOTIONADDRESS">MotionAddress</label>\n                <input type="url" name="address" ng-model="vm.chatWebsite.address" md-maxlength="255" ng-required="true">\n                <div ng-messages="chatWebsiteForm[\'address\'].$error" ng-show="chatWebsiteForm[\'address\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.MOTIONADDRESS_REQUIRED">MotionAddress field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="CHAT.ERRORS.MOTIONADDRESS_MUST_VALID_URL">MotionAddress must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                    <div ng-message="md-maxlength">\n                        <span translate="CHAT.ERRORS.MOTIONADDRESS_MAX_LENGTH" translate-values=\'{max: 255}\'>MotionAddress must have a maximum length equal to 255</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.MOTIONPROXY">MotionProxy</label>\n                <input type="url" name="remote" ng-model="vm.chatWebsite.remote" md-maxlength="255" ng-required="true">\n                <div class="hint"><span translate="CHAT.HELP.MOTIONPROXY"></span></div>\n                <div ng-messages="chatWebsiteForm[\'remote\'].$error" ng-show="chatWebsiteForm[\'remote\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.MOTIONPROXY_REQUIRED">MotionProxy field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="CHAT.ERRORS.MOTIONPROXY_MUST_VALID_URL">MotionProxy must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                    <div ng-message="md-maxlength">\n                        <span translate="CHAT.ERRORS.MOTIONPROXY_MAX_LENGTH" translate-values=\'{max: 255}\'>MotionProxy must have a maximum length equal to 255</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.LIST">List</label>\n                <md-select name="ListId" ng-model="vm.chatWebsite.ListId" required>\n                    <md-option ng-value="ListId.id" ng-repeat="ListId in vm.lists">{{ ListId.name }}</md-option>\n                </md-select>\n                <div class="hint"><span translate="CHAT.HELP.LIST"></span></div>\n                <div ng-messages="chatWebsiteForm[\'ListId\'].$error" ng-show="chatWebsiteForm[\'ListId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.LIST_REQUIRED">List field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.INTERVAL">Interval</label>\n                <md-select name="IntervalId" ng-model="vm.chatWebsite.IntervalId">\n                    <md-option ng-value="IntervalId.id" ng-repeat="IntervalId in vm.interval">{{ IntervalId.name }}</md-option>\n                    <md-option ng-value="null">Always</md-option>\n                </md-select>\n                <div ng-messages="chatWebsiteForm[\'IntervalId\'].$error" ng-show="chatWebsiteForm[\'IntervalId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.INTERVAL_REQUIRED">Interval field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.chatWebsite.description">\n                <div ng-messages="chatWebsiteForm[\'description\'].$error" ng-show="chatWebsiteForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newChatWebsite" ng-click="vm.saveChatWebsite()" class="send-button md-accent md-raised" ng-disabled="chatWebsiteForm.$invalid || chatWebsiteForm.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newChatWebsite" ng-click="vm.addNewChatWebsite()" class="send-button md-accent md-raised" ng-disabled="chatWebsiteForm.$invalid" aria-label="ADD" translate="CHAT.ADD_CHATWEBSITE" translate-attr-aria-label="CHAT.ADD_CHATWEBSITE">\n                    ADD CHATWEBSITE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newChatWebsite" ng-click="vm.deleteChatWebsite($event)" aria-label="DELETE" translate translate-attr-aria-label="CHAT.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CHAT.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/apps/agent/dialog.html",'<md-dialog class="chatWebsite-dialog" aria-label="New ChatWebsite">\n    <form name="chatWebsiteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.AGENT">Agent</label>\n                <md-select name="agent" ng-model="vm.agent.agent" required autofocus>\n                    <md-option ng-value="agent.name" ng-repeat="agent in vm.agents">{{ agent.name }}</md-option>\n                </md-select>\n                <div ng-messages="chatWebsiteFormApp[\'agent\'].$error" ng-show="chatWebsiteFormApp[\'agent\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.AGENT_REQUIRED">Agent field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.agent.timeout" min="0" max="2147483" ng-required="true">\n                <div ng-messages="chatWebsiteFormApp[\'timeout\'].$error" ng-show="chatWebsiteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="CHAT.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="CHAT.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveChatWebsiteApp()" class="send-button md-accent md-raised" ng-disabled="chatWebsiteFormApp.$invalid || chatWebsiteFormApp.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/apps/autoreply/dialog.html",'<md-dialog class="chatWebsite-dialog" aria-label="New ChatWebsite">\n    <form name="chatWebsiteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.TIMES">times</label>\n                <md-select name="times" ng-model="vm.autoreply.times" required autofocus>\n                    <md-option ng-value="1">One Time</md-option>\n                    <md-option ng-value="0">Always</md-option>\n                </md-select>\n                <div ng-messages="chatWebsiteFormApp[\'times\'].$error" ng-show="chatWebsiteFormApp[\'times\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.TIMES_REQUIRED">times field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.TEXT">Text</label>\n                <textarea name="text" ng-model="vm.autoreply.text" md-maxlength="255" required></textarea>\n\n                <div ng-messages="chatWebsiteFormApp[\'text\'].$error" ng-show="chatWebsiteFormApp[\'text\'].$touched" role="alert">\n\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.TEXT_REQUIRED">Text field is required</span>\n                    </div>\n\n\n                    <div ng-message="md-maxlength">\n                        <span translate="CHAT.ERRORS.TEXT_MAX_LENGTH" translate-values=\'{max: 255}\'>Text must have a maximum length equal to 255</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveChatWebsiteApp()" class="send-button md-accent md-raised" ng-disabled="chatWebsiteFormApp.$invalid || chatWebsiteFormApp.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/apps/close/dialog.html",'<md-dialog class="chatWebsite-dialog" aria-label="New ChatWebsite">\n    <form name="chatWebsiteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.DISPOSITION">Disposition</label>\n                <input type="text" name="disposition" ng-model="vm.close.disposition" ng-required="true" autofocus>\n                <div ng-messages="chatWebsiteFormApp[\'disposition\'].$error" ng-show="chatWebsiteFormApp[\'disposition\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.DISPOSITION_REQUIRED">Disposition field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveChatWebsiteApp()" class="send-button md-accent md-raised" ng-disabled="chatWebsiteFormApp.$invalid || chatWebsiteFormApp.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/apps/gotoif/dialog.html",'<md-dialog class="chatWebsite-dialog" aria-label="New ChatWebsite">\n    <form name="chatWebsiteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.CONDITION">Condition</label>\n                <input type="text" name="condition" ng-model="vm.gotoif.condition" ng-required="true" autofocus>\n                <div ng-messages="chatWebsiteFormApp[\'condition\'].$error" ng-show="chatWebsiteFormApp[\'condition\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.CONDITION_REQUIRED">Condition field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.TRUEPRIORITY">truepriority</label>\n                <input type="number" name="truepriority" ng-model="vm.gotoif.truepriority" min="1" ng-required="true">\n                <div ng-messages="chatWebsiteFormApp[\'truepriority\'].$error" ng-show="chatWebsiteFormApp[\'truepriority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.TRUEPRIORITY_REQUIRED">truepriority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="CHAT.ERRORS.TRUEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">truepriority must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.FALSEPRIORITY">falsepriority</label>\n                <input type="number" name="falsepriority" ng-model="vm.gotoif.falsepriority" min="1" ng-required="true">\n                <div ng-messages="chatWebsiteFormApp[\'falsepriority\'].$error" ng-show="chatWebsiteFormApp[\'falsepriority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.FALSEPRIORITY_REQUIRED">falsepriority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="CHAT.ERRORS.FALSEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">falsepriority must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveChatWebsiteApp()" class="send-button md-accent md-raised" ng-disabled="chatWebsiteFormApp.$invalid || chatWebsiteFormApp.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/apps/gotop/dialog.html",'<md-dialog class="chatWebsite-dialog" aria-label="New ChatWebsite">\n    <form name="chatWebsiteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.PRIORITY">Priority</label>\n                <input type="number" name="priority" ng-model="vm.gotop.priority" min="0" ng-required="true" autofocus>\n                <div ng-messages="chatWebsiteFormApp[\'priority\'].$error" ng-show="chatWebsiteFormApp[\'priority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.PRIORITY_REQUIRED">Priority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="CHAT.ERRORS.PRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Priority must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveChatWebsiteApp()" class="send-button md-accent md-raised" ng-disabled="chatWebsiteFormApp.$invalid || chatWebsiteFormApp.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/apps/interval/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select ng-model="vm.type">\n                    <md-option ng-value="type" ng-repeat=\'type in vm.types\'>{{ type | ucfirst }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.type === \'list\'">\n                <label translate="TOOLS.INTERVALS">Intervals</label>\n                <md-select ng-model="vm.interval.IntervalId">\n                    <md-option ng-value="interval.id" ng-repeat="interval in vm.intervals.rows">{{ interval.name }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            \x3c!-- TIMERANGE START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.TIME_RANGE">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <div class="md-block" flex>\n                    <mdp-time-picker name="timeRangeFrom" mdp-placeholder="FROM" ng-model="vm.timeRangeFrom" mdp-format="HH:mm" mdp-auto-switch="true">\n                        <div ng-messages="intervalForm.timeRangeFrom.$error" ng-show="intervalForm.timeRangeFrom.$touched" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_FROM_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n                <div class="md-block" flex ng-if="vm.timeRangeFrom">\n                    <mdp-time-picker name="timeRangeTo" mdp-placeholder="TO*" ng-model="vm.timeRangeTo" mdp-format="HH:mm" mdp-auto-switch="true" required>\n                        <div ng-messages="intervalForm.timeRangeTo.$error" ng-show="intervalForm.timeRangeTo.$invalid" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_INVALID">Time Range To field is invalid</span>\n                            </div>\n                            <div ng-message="required">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_REQUIRED">Time Range To field is required</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n            \x3c!-- TIMERANGE END --\x3e\n\n            \x3c!-- DAYSOFWEEK START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.WEEK_DAYS">Week Days</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.dayOfWeekFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex class="md-block" ng-if="vm.dayOfWeekFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="dayOfWeekTo" ng-model="vm.dayOfWeekTo">\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.dayOfWeekTo.$error" ng-show="intervalForm.dayOfWeekTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- DAYSOFWEEK END --\x3e\n\n            \x3c!-- MONTHDAY START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTH_DAYS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthDayFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthDayFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthDayTo" ng-model="vm.monthDayTo">\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthDayTo.$error" ng-show="intervalForm.monthDayTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTHDAY END --\x3e\n\n            \x3c!-- MONTH START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTHS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthTo" ng-model="vm.monthTo">\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthTo.$error" ng-show="intervalForm.monthTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTH END --\x3e\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/apps/noop/dialog.html",'<md-dialog class="chatWebsite-dialog" aria-label="New ChatWebsite">\n    <form name="chatWebsiteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.VALUE">Value</label>\n                <input type="text" name="value" ng-model="vm.noop.value" autofocus>\n                <div ng-messages="chatWebsiteFormApp[\'value\'].$error" ng-show="chatWebsiteFormApp[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveChatWebsiteApp()" class="send-button md-accent md-raised" ng-disabled="chatWebsiteFormApp.$invalid || chatWebsiteFormApp.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/apps/queue/dialog.html",'<md-dialog class="chatWebsite-dialog" aria-label="New ChatWebsite">\n    <form name="chatWebsiteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.QUEUE">Queue</label>\n                <md-select name="queue" ng-model="vm.queue.queue" required autofocus>\n                    <md-option ng-value="queue.name" ng-repeat="queue in vm.queues">{{ queue.name }}</md-option>\n                </md-select>\n                <div ng-messages="chatWebsiteFormApp[\'queue\'].$error" ng-show="chatWebsiteFormApp[\'queue\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.QUEUE_REQUIRED">Queue field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.queue.timeout" min="0" max="2147483" ng-required="true">\n                <div ng-messages="chatWebsiteFormApp[\'timeout\'].$error" ng-show="chatWebsiteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="CHAT.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="CHAT.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveChatWebsiteApp()" class="send-button md-accent md-raised" ng-disabled="chatWebsiteFormApp.$invalid || chatWebsiteFormApp.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/apps/system/dialog.html",'<md-dialog class="chatWebsite-dialog" aria-label="New ChatWebsite">\n    <form name="chatWebsiteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.COMMAND">Command</label>\n                <input type="text" name="command" ng-model="vm.system.command" ng-required="true" autofocus>\n                <div ng-messages="chatWebsiteFormApp[\'command\'].$error" ng-show="chatWebsiteFormApp[\'command\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.COMMAND_REQUIRED">Command field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.VARIABLE">Variable</label>\n                <md-select name="variable" ng-model="vm.system.variable">\n                    <md-option ng-value="variable.name" ng-repeat="variable in vm.variables">{{ variable.name }}</md-option>\n                    <md-option ng-value="\'\'">None</md-option>\n                </md-select>\n                <div ng-messages="chatWebsiteFormApp[\'variable\'].$error" ng-show="chatWebsiteFormApp[\'variable\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.VARIABLE_REQUIRED">Variable field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveChatWebsiteApp()" class="send-button md-accent md-raised" ng-disabled="chatWebsiteFormApp.$invalid || chatWebsiteFormApp.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/chatCannedAnswers/dialog.html",'<md-dialog class="chatCannedAnswer-dialog" aria-label="New ChatCannedAnswer">\n    <form name="chatCannedAnswerForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.KEY">Key</label>\n                <input type="" name="key" ng-model="vm.chatCannedAnswer.key" md-maxlength="255" ng-required="true" autofocus>\n                <div ng-messages="chatCannedAnswerForm[\'key\'].$error" ng-show="chatCannedAnswerForm[\'key\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.KEY_REQUIRED">Key field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.VALUE">Value</label>\n                <textarea name="value" ng-model="vm.chatCannedAnswer.value" required></textarea>\n\n                <div ng-messages="chatCannedAnswerForm[\'value\'].$error" ng-show="chatCannedAnswerForm[\'value\'].$touched" role="alert">\n\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.chatCannedAnswer.description">\n                <div ng-messages="chatCannedAnswerForm[\'description\'].$error" ng-show="chatCannedAnswerForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newChatCannedAnswer" ng-click="vm.saveChatCannedAnswer()" class="send-button md-accent md-raised" ng-disabled="chatCannedAnswerForm.$invalid || chatCannedAnswerForm.$pristine" aria-label="SAVE" translate="CHAT.SAVE"\n                    translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newChatCannedAnswer" ng-click="vm.addNewChatCannedAnswer()" class="send-button md-accent md-raised" ng-disabled="chatCannedAnswerForm.$invalid" aria-label="ADD" translate="CHAT.ADD_CHATCANNEDANSWER" translate-attr-aria-label="CHAT.ADD_CHATCANNEDANSWER">\n                    ADD CHATCANNEDANSWER\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newChatCannedAnswer" ng-click="vm.deleteChatCannedAnswer($event)" aria-label="DELETE" translate translate-attr-aria-label="CHAT.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CHAT.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/chatDispositions/dialog.html",'<md-dialog class="chatDisposition-dialog" aria-label="New ChatDisposition">\n    <form name="chatDispositionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.chatDisposition.name" md-maxlength="255" ng-required="true" autofocus>\n                <div ng-messages="chatDispositionForm[\'name\'].$error" ng-show="chatDispositionForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newChatDisposition" ng-click="vm.saveChatDisposition()" class="send-button md-accent md-raised" ng-disabled="chatDispositionForm.$invalid || chatDispositionForm.$pristine" aria-label="SAVE" translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newChatDisposition" ng-click="vm.addNewChatDisposition()" class="send-button md-accent md-raised" ng-disabled="chatDispositionForm.$invalid" aria-label="ADD" translate="CHAT.ADD_CHATDISPOSITION" translate-attr-aria-label="CHAT.ADD_CHATDISPOSITION">\n                    ADD CHATDISPOSITION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newChatDisposition" ng-click="vm.deleteChatDisposition($event)" aria-label="DELETE" translate translate-attr-aria-label="CHAT.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CHAT.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/offlineMessages/dialog.html",'<md-dialog class="offlineMessage-dialog" aria-label="New OfflineMessage">\n    <md-toolbar class="md-accent md-hue-2">\n        <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n            <span class="title">{{ vm.title | translate }}</span>\n            <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n            </md-button>\n        </div>\n    </md-toolbar>\n\n    <md-content flex layout-padding>\n        <pre>{{vm.message.body}}</pre>\n    </md-content>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/proactive/dialog.html",'<md-dialog class="chatProactiveAction-dialog" aria-label="New ChatProactiveAction">\n    <form name="chatProactiveActionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CHAT.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.chatProactiveAction.name" ng-required="true" autofocus>\n                <div ng-messages="chatProactiveActionForm[\'name\'].$error" ng-show="chatProactiveActionForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CHAT.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.chatProactiveAction.type">\n\n                    <md-option ng-value="\'mouseOver\'"> {{ \'CHAT.MOUSEOVER\' | translate }}</md-option>\n\n                    <md-option ng-value="\'timeout\'"> {{ \'CHAT.TIMEOUT\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="chatProactiveActionForm[\'type\'].$error" ng-show="chatProactiveActionForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.chatProactiveAction.type === \'mouseOver\'" class="md-block">\n                <label translate="CHAT.SELECTOR">Selector</label>\n                <input type="" name="selector" ng-model="vm.chatProactiveAction.selector" ng-required="true">\n                <div ng-messages="chatProactiveActionForm[\'selector\'].$error" ng-show="chatProactiveActionForm[\'selector\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.SELECTOR_REQUIRED">Selector field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.chatProactiveAction.type === \'timeout\'" class="md-block">\n                <label translate="CHAT.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.chatProactiveAction.timeout" min="1" ng-required="true">\n                <div ng-messages="chatProactiveActionForm[\'timeout\'].$error" ng-show="chatProactiveActionForm[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CHAT.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="CHAT.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newChatProactiveAction" ng-click="vm.saveChatProactiveAction()" class="send-button md-accent md-raised" ng-disabled="chatProactiveActionForm.$invalid || chatProactiveActionForm.$pristine" aria-label="SAVE" translate="CHAT.SAVE"\n                    translate-attr-aria-label="CHAT.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newChatProactiveAction" ng-click="vm.addNewChatProactiveAction()" class="send-button md-accent md-raised" ng-disabled="chatProactiveActionForm.$invalid" aria-label="ADD" translate="CHAT.ADD_CHATPROACTIVEACTION" translate-attr-aria-label="CHAT.ADD_CHATPROACTIVEACTION">\n                    ADD CHATPROACTIVEACTION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newChatProactiveAction" ng-click="vm.deleteChatProactiveAction($event)" aria-label="DELETE" translate translate-attr-aria-label="CHAT.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CHAT.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/chat/views/chatWebsites/edit/view.html",'<div id="chat-chatWebsite" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-chatWebsites-button md-icon-button" aria-label="Go to chatWebsites" ng-click="vm.gotoChatWebsites()" translate translate-attr-aria-label="CHAT.GO_TO_CHATWEBSITES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="chatWebsite-image" hide-xs>\n                    <img ng-src="assets/images/business/chatWebsites.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.chatWebsite.id}}\n                        <span ng-if="vm.chatWebsite.name">{{vm.chatWebsite.name}}</span>\n                        <span ng-if="vm.chatWebsite.exten">{{vm.chatWebsite.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="CHAT.CREATED_AT"></span> <span>{{vm.chatWebsite.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveChatWebsite()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (notificationForm.$invalid) || (scriptForm.$invalid) || (intervalForm.$invalid) || (appearanceForm.$invalid) || (onlinestatusForm.$invalid) || (offlinestatusForm.$invalid) || (closingformForm.$invalid) || (unmanagedstatusForm.$invalid) || (interactionForm.$invalid) || (whitelabelForm.$invalid) || (logoForm.$invalid) || (agentAvatarForm.$invalid) || (chatFormOnlineForm.$invalid) || (chatFormOfflineForm.$invalid) || (proactiveForm.$invalid) || (chatDispositionsForm.$invalid) || (chatCannedAnswersForm.$invalid) || (actionsForm.$invalid) || (interactionsForm.$invalid) || (offlineMessagesForm.$invalid)"\n                translate="CHAT.SAVE" translate-attr-aria-label="CHAT.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CHAT.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="chatWebsite-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="CHAT.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.chatWebsite.name" ng-required="true" autofocus ng-disabled="true">\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.KEY">key</label>\n                                <input type="text" name="key" ng-model="vm.chatWebsite.key" md-maxlength="5" ng-required="true">\n                                <div ng-messages="generalForm[\'key\'].$error" ng-show="generalForm[\'key\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.KEY_REQUIRED">key field is required</span>\n                                    </div>\n\n                                    <div ng-message="md-maxlength">\n                                        <span translate="CHAT.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 5}\'>key must have a maximum length equal to 5</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.MOTIONADDRESS">MotionAddress</label>\n                                <input type="url" name="address" ng-model="vm.chatWebsite.address" md-maxlength="255" ng-required="true">\n                                <div ng-messages="generalForm[\'address\'].$error" ng-show="generalForm[\'address\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.MOTIONADDRESS_REQUIRED">MotionAddress field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="CHAT.ERRORS.MOTIONADDRESS_MUST_VALID_URL">MotionAddress must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                    <div ng-message="md-maxlength">\n                                        <span translate="CHAT.ERRORS.MOTIONADDRESS_MAX_LENGTH" translate-values=\'{max: 255}\'>MotionAddress must have a maximum length equal to 255</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.LIST">List</label>\n                                <md-select name="ListId" ng-model="vm.chatWebsite.ListId" required>\n                                    <md-option ng-value="ListId.id" ng-repeat="ListId in vm.lists">{{ ListId.name }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="CHAT.HELP.LIST"></span></div>\n                                <div ng-messages="generalForm[\'ListId\'].$error" ng-show="generalForm[\'ListId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.LIST_REQUIRED">List field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.chatWebsite.fidelity" class="md-block">\n                                <label translate="CHAT.TIMEOUT">Timeout</label>\n                                <input type="number" name="timeout" ng-model="vm.chatWebsite.timeout" ng-required="true">\n                                <div ng-messages="generalForm[\'timeout\'].$error" ng-show="generalForm[\'timeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.WAITFORTHEASSIGNEDAGENT">WaitForTheAssignedAgent</label>\n                                <input type="number" name="waitForTheAssignedAgent" ng-model="vm.chatWebsite.waitForTheAssignedAgent" min="1" max="2147483" ng-required="true">\n                                <div ng-messages="generalForm[\'waitForTheAssignedAgent\'].$error" ng-show="generalForm[\'waitForTheAssignedAgent\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.WAITFORTHEASSIGNEDAGENT_REQUIRED">WaitForTheAssignedAgent field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="CHAT.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">WaitForTheAssignedAgent must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="CHAT.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_LESS_THAN_OR_EQUAL_TO">WaitForTheAssignedAgent must be a valid greater or equal than</span> <span>2147483</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.chatWebsite.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="chatWebsite-detail-form-container notification md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="CHAT.NOTIFICATION">NOTIFICATION</div>\n                        </div>\n                        <form name="notificationForm" novalidate>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.chatWebsite.notificationSound" aria-label="notificationSound"><span translate="CHAT.NOTIFICATIONSOUND">notificationSound</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.chatWebsite.notificationShake" aria-label="notificationShake"><span translate="CHAT.NOTIFICATIONSHAKE">notificationShake</span></md-switch>\n                            </md-input-container>\n                            <div class="md-block">\n                                <label class="md-caption grey-fg" translate="CHAT.NOTIFICATIONTEMPLATE">notificationTemplate</label>\n                                <textarea aria-label="notificationTemplate notificationTemplate" ckeditor="{ skin: \'office2013\', language: \'en\', allowedContent: true, extraPlugins: \'font,colorbutton,autoembed,autocorrect,googlethisterm,pastebase64\', toolbarGroups: [{ name: \'styles\', groups: [\'styles\'] }, { name: \'clipboard\', groups: [\'undo\'] }, { name: \'colors\', groups: [\'colors\'] }, { name: \'basicstyles\', groups: [\'basicstyles\'] }, { name: \'paragraph\', groups: [\'list\', \'indent\', \'align\'] }, { name: \'mode\' }], autocorrect_enabled: true, disableNativeSpellChecker: false, removePlugins: \'magicline\' }"\n                                    ng-model="vm.chatWebsite.notificationTemplate"></textarea>\n                            </div>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CHAT.ADVANCED">ADVANCED</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="chatWebsite-detail-form-container script md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="ChatWebsiteScriptController as vm_ac" ng-init="vm_ac.init(vm.chatWebsite)" class="content" md-background-bg>\n                            <div class="pb-16" layout="row" layout-align="start center">\n                                <div class="h2 secondary-text" translate="CHAT.SCRIPT">SCRIPT</div>\n                            </div>\n\n                            <form name="scriptForm" flex="100" novalidate>\n                                <md-input-container class="md-block">\n                                    <label translate="CHAT.TOKEN">Token</label>\n                                    <input type="text" name="token" ng-model="vm_ac.chatWebsite.token" autofocus ng-disabled="true">\n                                </md-input-container>\n                                <md-input-container class="md-block">\n                                    <label translate="CHAT.MOTIONPROXY">MotionProxy</label>\n                                    <input type="url" name="remote" ng-model="vm_ac.chatWebsite.remote" required>\n                                    <div class="hint"><span translate="CHAT.HELP.MOTIONPROXY"></span></div>\n                                    <div ng-messages="scriptForm[\'remote\'].$error" ng-show="scriptForm[\'remote\'].$touched" role="alert">\n                                        <div ng-message="required">\n                                            <span translate="CHAT.ERRORS.MOTIONPROXY_REQUIRED">Motion Proxy field is required</span>\n                                        </div>\n                                        <div ng-message="url">\n                                            <span translate="CHAT.ERRORS.MOTIONPROXY_MUST_VALID_URL">Motion Proxy must be a valid url e.g.: http://www.xcally.com</span>\n                                        </div>\n                                    </div>\n                                </md-input-container>\n                                <md-input-container class="md-block">\n                                    <label translate="CHAT.WEBSITESCRIPT">WebsiteScript</label>\n                                    <div>\n                                        <pre style="font-size: 13px;">\n            {{vm_ac.start}} {{vm_ac.script}} {{vm_ac.end}}\n          </pre>\n                                    </div>\n                                    <div class="hint"><span translate="CHAT.HELP.COPYSCRIPTTOCLIPBOARD"></span></div>\n                                </md-input-container>\n                            </form>\n                        </div>\n\n                    </div>\n                    <div class="chatWebsite-detail-form-container interval md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="CHAT.INTERVAL">INTERVAL</div>\n                        </div>\n                        <form name="intervalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.INTERVAL">Interval</label>\n                                <md-select name="IntervalId" ng-model="vm.chatWebsite.IntervalId" autofocus>\n                                    <md-option ng-value="IntervalId.id" ng-repeat="IntervalId in vm.interval">{{ IntervalId.name }}</md-option>\n                                    <md-option ng-value="null">Always</md-option>\n                                </md-select>\n                                <div ng-messages="intervalForm[\'IntervalId\'].$error" ng-show="intervalForm[\'IntervalId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CHAT.ERRORS.INTERVAL_REQUIRED">Interval field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CHAT.TIMEZONE">Timezone</label>\n                                <ms-timezone name="timezone" ng-model="vm.chatWebsite.timezone">\n                                    < <div class="hint"><span translate="CHAT.HELP.TIMEZONE"></span></div>\n                    <div ng-messages="intervalForm[\'timezone\'].$error" ng-show="intervalForm[timezone].$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="CHAT.ERRORS.TIMEZONE_REQUIRED">Timezone field is required</span>\n                        </div>\n                    </div>\n                    </md-input-container>\n\n                    </form>\n    </div>\n    </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="CHAT.SNIPPET">SNIPPET</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="chatWebsite-detail-form-container appearance md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="CHAT.APPEARANCE">APPEARANCE</div>\n                </div>\n                <form name="appearanceForm" novalidate>\n                    <div flex md-color-picker ng-model="vm.chatWebsite.color" label="{{\'CHAT.MAINCOLOR\' | translate}}" md-color-hex="true" md-color-rgb="false" md-color-hsl="false" md-color-history="false" md-color-material-palette="false" md-color-alpha-channel="false"\n                        open-on-input="true"></div>\n                    <div flex md-color-picker ng-model="vm.chatWebsite.color_button" label="{{\'CHAT.BUTTONCOLOR\' | translate}}" md-color-hex="true" md-color-rgb="false" md-color-hsl="false" md-color-history="false" md-color-material-palette="false" md-color-alpha-channel="false"\n                        open-on-input="true"></div>\n                    <div flex md-color-picker ng-model="vm.chatWebsite.textColor" label="{{\'CHAT.TEXTCOLOR\' | translate}}" md-color-hex="true" md-color-rgb="false" md-color-hsl="false" md-color-history="false" md-color-material-palette="false" md-color-alpha-channel="false"\n                        open-on-input="true"></div>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.FONTSIZE">fontSize</label>\n                        <input type="number" name="fontSize" ng-model="vm.chatWebsite.fontSize" min="0" ng-required="true">\n                        <div ng-messages="appearanceForm[\'fontSize\'].$error" ng-show="appearanceForm[\'fontSize\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.FONTSIZE_REQUIRED">fontSize field is required</span>\n                            </div>\n                            <div ng-message="min">\n                                <span translate="CHAT.ERRORS.FONTSIZE_MUST_BE_GREATER_THAN_OR_EQUAL_TO">fontSize must be a valid greater or equal than</span> <span>0</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.HEADERSHAPE">headershape</label>\n                        <md-select name="header_shape" ng-model="vm.chatWebsite.header_shape">\n\n                            <md-option ng-value="\'rounded\'"> {{ \'CHAT.ROUNDED\' | translate }}</md-option>\n\n                            <md-option ng-value="\'squared\'"> {{ \'CHAT.SQUARED\' | translate }}</md-option>\n                        </md-select>\n                        <div ng-messages="appearanceForm[\'header_shape\'].$error" ng-show="appearanceForm[\'header_shape\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.HEADERSHAPE_REQUIRED">headershape field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.showAgentAvatar" aria-label="ShowAgentAvatar"><span translate="CHAT.SHOWAGENTAVATAR">ShowAgentAvatar</span></md-switch>\n                    </md-input-container>\n\n                </form>\n            </div>\n            <div class="chatWebsite-detail-form-container onlinestatus md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="CHAT.ONLINESTATUS">ONLINESTATUS</div>\n                </div>\n                <form name="onlinestatusForm" novalidate>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.HEADER_ONLINE">header_online</label>\n                        <input type="text" name="header_online" ng-model="vm.chatWebsite.header_online" md-maxlength="255" autofocus>\n                        <div ng-messages="onlinestatusForm[\'header_online\'].$error" ng-show="onlinestatusForm[\'header_online\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.HEADER_ONLINE_REQUIRED">header_online field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.HEADER_ONLINE_MAX_LENGTH" translate-values=\'{max: 255}\'>header_online must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.START_CHAT_BUTTON">start_chat_button</label>\n                        <input type="text" name="start_chat_button" ng-model="vm.chatWebsite.start_chat_button" md-maxlength="255">\n                        <div ng-messages="onlinestatusForm[\'start_chat_button\'].$error" ng-show="onlinestatusForm[\'start_chat_button\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.START_CHAT_BUTTON_REQUIRED">start_chat_button field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.START_CHAT_BUTTON_MAX_LENGTH" translate-values=\'{max: 255}\'>start_chat_button must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n\n                </form>\n            </div>\n            <div class="chatWebsite-detail-form-container offlinestatus md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="CHAT.OFFLINESTATUS">OFFLINESTATUS</div>\n                </div>\n                <form name="offlinestatusForm" novalidate>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.hideWhenOffline" aria-label="hideWhenOffline"><span translate="CHAT.HIDEWHENOFFLINE">hideWhenOffline</span></md-switch>\n                        <div class="hint"><span translate="CHAT.HELP.HIDEWHENOFFLINE"></span></div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.HEADER_OFFLINE">header_offline</label>\n                        <input type="text" name="header_offline" ng-model="vm.chatWebsite.header_offline" md-maxlength="255">\n                        <div ng-messages="offlinestatusForm[\'header_offline\'].$error" ng-show="offlinestatusForm[\'header_offline\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.HEADER_OFFLINE_REQUIRED">header_offline field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.HEADER_OFFLINE_MAX_LENGTH" translate-values=\'{max: 255}\'>header_offline must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.OFFLINE_CHAT_BUTTON">offline_chat_button</label>\n                        <input type="text" name="offline_chat_button" ng-model="vm.chatWebsite.offline_chat_button" md-maxlength="255">\n                        <div ng-messages="offlinestatusForm[\'offline_chat_button\'].$error" ng-show="offlinestatusForm[\'offline_chat_button\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.OFFLINE_CHAT_BUTTON_REQUIRED">offline_chat_button field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.OFFLINE_CHAT_BUTTON_MAX_LENGTH" translate-values=\'{max: 255}\'>offline_chat_button must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.OFFLINEMESSAGESUBJECT">offlineMessageSubject</label>\n                        <input type="text" name="offlineMessageSubject" ng-model="vm.chatWebsite.offlineMessageSubject" md-maxlength="255">\n                        <div ng-messages="offlinestatusForm[\'offlineMessageSubject\'].$error" ng-show="offlinestatusForm[\'offlineMessageSubject\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.OFFLINEMESSAGESUBJECT_REQUIRED">offlineMessageSubject field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.OFFLINEMESSAGESUBJECT_MAX_LENGTH" translate-values=\'{max: 255}\'>offlineMessageSubject must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.OFFLINEMESSAGEBODY">offlineMessageBody</label>\n                        <input type="text" name="offlineMessageBody" ng-model="vm.chatWebsite.offlineMessageBody" md-maxlength="255">\n                        <div ng-messages="offlinestatusForm[\'offlineMessageBody\'].$error" ng-show="offlinestatusForm[\'offlineMessageBody\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.OFFLINEMESSAGEBODY_REQUIRED">offlineMessageBody field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.OFFLINEMESSAGEBODY_MAX_LENGTH" translate-values=\'{max: 255}\'>offlineMessageBody must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n\n                </form>\n            </div>\n            <div class="chatWebsite-detail-form-container closingform md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="CHAT.CLOSINGFORM">CLOSINGFORM</div>\n                </div>\n                <form name="closingformForm" novalidate>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.CLOSINGMESSAGE">closingMessage</label>\n                        <textarea name="closingMessage" ng-model="vm.chatWebsite.closingMessage" md-maxlength="255" required autofocus></textarea>\n\n                        <div ng-messages="closingformForm[\'closingMessage\'].$error" ng-show="closingformForm[\'closingMessage\'].$touched" role="alert">\n\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.CLOSINGMESSAGE_REQUIRED">closingMessage field is required</span>\n                            </div>\n\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.CLOSINGMESSAGE_MAX_LENGTH" translate-values=\'{max: 255}\'>closingMessage must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.SKIPMESSAGEBUTTON">skipMessageButton</label>\n                        <input type="text" name="skipMessageButton" ng-model="vm.chatWebsite.skipMessageButton" md-maxlength="255">\n                        <div ng-messages="closingformForm[\'skipMessageButton\'].$error" ng-show="closingformForm[\'skipMessageButton\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.SKIPMESSAGEBUTTON_REQUIRED">skipMessageButton field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.SKIPMESSAGEBUTTON_MAX_LENGTH" translate-values=\'{max: 255}\'>skipMessageButton must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.enableRating" aria-label="enableRating"><span translate="CHAT.ENABLERATING">enableRating</span></md-switch>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.chatWebsite.enableRating" class="md-block">\n                        <label translate="CHAT.RATINGTYPE">ratingType</label>\n                        <md-select name="ratingType" ng-model="vm.chatWebsite.ratingType">\n                            <md-option ng-value="\'star\'">Star</md-option>\n                            <md-option ng-value="\'thumb\'">Thumb</md-option>\n                        </md-select>\n                        <div ng-messages="closingformForm[\'ratingType\'].$error" ng-show="closingformForm[\'ratingType\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.RATINGTYPE_REQUIRED">ratingType field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.chatWebsite.enableRating && vm.chatWebsite.ratingType === \'star\'" class="md-block">\n                        <label translate="CHAT.RATINGSTARSNUMBER">ratingStarsNumber</label>\n                        <input type="number" name="ratingStarsNumber" ng-model="vm.chatWebsite.ratingStarsNumber" min="2" max="5" ng-required="true">\n                        <div ng-messages="closingformForm[\'ratingStarsNumber\'].$error" ng-show="closingformForm[\'ratingStarsNumber\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.RATINGSTARSNUMBER_REQUIRED">ratingStarsNumber field is required</span>\n                            </div>\n                            <div ng-message="min">\n                                <span translate="CHAT.ERRORS.RATINGSTARSNUMBER_MUST_BE_GREATER_THAN_OR_EQUAL_TO">ratingStarsNumber must be a valid greater or equal than</span> <span>2</span>\n                            </div>\n                            <div ng-message="max">\n                                <span translate="CHAT.ERRORS.RATINGSTARSNUMBER_MUST_BE_LESS_THAN_OR_EQUAL_TO">ratingStarsNumber must be a valid greater or equal than</span> <span>5</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.enableFeedback" aria-label="enableFeedback"><span translate="CHAT.ENABLEFEEDBACK">enableFeedback</span></md-switch>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.forwardTranscript" aria-label="forwardTranscript"><span translate="CHAT.FORWARDTRANSCRIPT">forwardTranscript</span></md-switch>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.chatWebsite.forwardTranscript" class="md-block">\n                        <label translate="CHAT.FORWARDTRANSCRIPTMESSAGE">forwardTranscriptMessage</label>\n                        <input type="text" name="forwardTranscriptMessage" ng-model="vm.chatWebsite.forwardTranscriptMessage" md-maxlength="255">\n                        <div ng-messages="closingformForm[\'forwardTranscriptMessage\'].$error" ng-show="closingformForm[\'forwardTranscriptMessage\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.FORWARDTRANSCRIPTMESSAGE_REQUIRED">forwardTranscriptMessage field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.FORWARDTRANSCRIPTMESSAGE_MAX_LENGTH" translate-values=\'{max: 255}\'>forwardTranscriptMessage must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.CLOSINGMESSAGEBUTTON">closingMessageButton</label>\n                        <input type="text" name="closingMessageButton" ng-model="vm.chatWebsite.closingMessageButton" md-maxlength="255" ng-required="true">\n                        <div ng-messages="closingformForm[\'closingMessageButton\'].$error" ng-show="closingformForm[\'closingMessageButton\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.CLOSINGMESSAGEBUTTON_REQUIRED">closingMessageButton field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.CLOSINGMESSAGEBUTTON_MAX_LENGTH" translate-values=\'{max: 255}\'>closingMessageButton must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n\n                </form>\n            </div>\n            <div class="chatWebsite-detail-form-container unmanagedstatus md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="CHAT.UNMANAGEDSTATUS">UNMANAGEDSTATUS</div>\n                </div>\n                <form name="unmanagedstatusForm" novalidate>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.autoclose" aria-label="autoclose"><span translate="CHAT.AUTOCLOSE">autoclose</span></md-switch>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.enableUnmanagedNote" aria-label="enableUnmanagedNote"><span translate="CHAT.ENABLEUNMANAGEDNOTE">enableUnmanagedNote</span></md-switch>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.UNMANAGEDMESSAGE">unmanagedMessage</label>\n                        <input type="text" name="unmanagedMessage" ng-model="vm.chatWebsite.unmanagedMessage" md-maxlength="255">\n                        <div ng-messages="unmanagedstatusForm[\'unmanagedMessage\'].$error" ng-show="unmanagedstatusForm[\'unmanagedMessage\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.UNMANAGEDMESSAGE_REQUIRED">unmanagedMessage field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.UNMANAGEDMESSAGE_MAX_LENGTH" translate-values=\'{max: 255}\'>unmanagedMessage must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.SKIPUNMANAGED">skipUnmanaged</label>\n                        <input type="text" name="skipUnmanaged" ng-model="vm.chatWebsite.skipUnmanaged" md-maxlength="255">\n                        <div ng-messages="unmanagedstatusForm[\'skipUnmanaged\'].$error" ng-show="unmanagedstatusForm[\'skipUnmanaged\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.SKIPUNMANAGED_REQUIRED">skipUnmanaged field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.SKIPUNMANAGED_MAX_LENGTH" translate-values=\'{max: 255}\'>skipUnmanaged must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.chatWebsite.enableUnmanagedNote" class="md-block">\n                        <label translate="CHAT.SENDUNMANAGED">sendUnmanaged</label>\n                        <input type="text" name="sendUnmanaged" ng-model="vm.chatWebsite.sendUnmanaged" md-maxlength="255" ng-required="true">\n                        <div ng-messages="unmanagedstatusForm[\'sendUnmanaged\'].$error" ng-show="unmanagedstatusForm[\'sendUnmanaged\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.SENDUNMANAGED_REQUIRED">sendUnmanaged field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.SENDUNMANAGED_MAX_LENGTH" translate-values=\'{max: 255}\'>sendUnmanaged must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n\n                </form>\n            </div>\n            <div class="chatWebsite-detail-form-container interaction md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="CHAT.INTERACTION">INTERACTION</div>\n                </div>\n                <form name="interactionForm" novalidate>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.AGENTIDENTIFIER">agentIdentifier</label>\n                        <md-select name="agentIdentifier" ng-model="vm.chatWebsite.agentIdentifier" autofocus>\n\n                            <md-option ng-value="\'website_alias\'"> {{ \'CHAT.WEBSITEALIAS\' | translate }}</md-option>\n\n                            <md-option ng-value="\'agent_alias\'"> {{ \'CHAT.AGENTALIAS\' | translate }}</md-option>\n\n                            <md-option ng-value="\'agent_fullname\'"> {{ \'CHAT.AGENTFULLNAME\' | translate }}</md-option>\n                        </md-select>\n                        <div class="hint"><span translate="CHAT.HELP.AGENTIDENTIFIER"></span></div>\n                        <div ng-messages="interactionForm[\'agentIdentifier\'].$error" ng-show="interactionForm[\'agentIdentifier\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.AGENTIDENTIFIER_REQUIRED">agentIdentifier field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.chatWebsite.agentIdentifier === \'website_alias\'" class="md-block">\n                        <label translate="CHAT.WEBSITEALIAS">WebsiteAlias</label>\n                        <input type="text" name="agentAlias" ng-model="vm.chatWebsite.agentAlias" md-maxlength="255">\n                        <div class="hint"><span translate="CHAT.HELP.WEBSITEALIAS"></span></div>\n                        <div ng-messages="interactionForm[\'agentAlias\'].$error" ng-show="interactionForm[\'agentAlias\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.WEBSITEALIAS_REQUIRED">WebsiteAlias field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.WEBSITEALIAS_MAX_LENGTH" translate-values=\'{max: 255}\'>WebsiteAlias must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.CLOSINGQUESTION">closingQuestion</label>\n                        <input type="text" name="closingQuestion" ng-model="vm.chatWebsite.closingQuestion" md-maxlength="255">\n                        <div ng-messages="interactionForm[\'closingQuestion\'].$error" ng-show="interactionForm[\'closingQuestion\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.CLOSINGQUESTION_REQUIRED">closingQuestion field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.CLOSINGQUESTION_MAX_LENGTH" translate-values=\'{max: 255}\'>closingQuestion must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.FORMSUBMITSUCCESSMESSAGE">formSubmitSuccessMessage</label>\n                        <input type="text" name="formSubmitSuccessMessage" ng-model="vm.chatWebsite.formSubmitSuccessMessage" md-maxlength="255">\n                        <div ng-messages="interactionForm[\'formSubmitSuccessMessage\'].$error" ng-show="interactionForm[\'formSubmitSuccessMessage\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.FORMSUBMITSUCCESSMESSAGE_REQUIRED">formSubmitSuccessMessage field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.FORMSUBMITSUCCESSMESSAGE_MAX_LENGTH" translate-values=\'{max: 255}\'>formSubmitSuccessMessage must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.FORMSUBMITFAILUREMESSAGE">formSubmitFailureMessage</label>\n                        <input type="text" name="formSubmitFailureMessage" ng-model="vm.chatWebsite.formSubmitFailureMessage" md-maxlength="255">\n                        <div ng-messages="interactionForm[\'formSubmitFailureMessage\'].$error" ng-show="interactionForm[\'formSubmitFailureMessage\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.FORMSUBMITFAILUREMESSAGE_REQUIRED">formSubmitFailureMessage field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.FORMSUBMITFAILUREMESSAGE_MAX_LENGTH" translate-values=\'{max: 255}\'>formSubmitFailureMessage must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.enableCustomerWriting" aria-label="enableCustomerWriting"><span translate="CHAT.ENABLECUSTOMERWRITING">enableCustomerWriting</span></md-switch>\n                    </md-input-container>\n                    <md-input-container ng-if="!vm.chatWebsite.enableCustomerWriting" class="md-block">\n                        <label translate="CHAT.WAITINGTITLE">waitingTitle</label>\n                        <input type="text" name="waitingTitle" ng-model="vm.chatWebsite.waitingTitle" md-maxlength="255" ng-required="true">\n                        <div ng-messages="interactionForm[\'waitingTitle\'].$error" ng-show="interactionForm[\'waitingTitle\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.WAITINGTITLE_REQUIRED">waitingTitle field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.WAITINGTITLE_MAX_LENGTH" translate-values=\'{max: 255}\'>waitingTitle must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container ng-if="!vm.chatWebsite.enableCustomerWriting" class="md-block">\n                        <label translate="CHAT.WAITINGMESSAGE">waitingMessage</label>\n                        <textarea name="waitingMessage" ng-model="vm.chatWebsite.waitingMessage" md-maxlength="255" required></textarea>\n\n                        <div ng-messages="interactionForm[\'waitingMessage\'].$error" ng-show="interactionForm[\'waitingMessage\'].$touched" role="alert">\n\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.WAITINGMESSAGE_REQUIRED">waitingMessage field is required</span>\n                            </div>\n\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.WAITINGMESSAGE_MAX_LENGTH" translate-values=\'{max: 255}\'>waitingMessage must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.NOTETITLE">noteTitle</label>\n                        <input type="text" name="noteTitle" ng-model="vm.chatWebsite.noteTitle" md-maxlength="255">\n                        <div ng-messages="interactionForm[\'noteTitle\'].$error" ng-show="interactionForm[\'noteTitle\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.NOTETITLE_REQUIRED">noteTitle field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.NOTETITLE_MAX_LENGTH" translate-values=\'{max: 255}\'>noteTitle must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="CHAT.PLACEHOLDERMESSAGE">placeholderMessage</label>\n                        <input type="text" name="placeholderMessage" ng-model="vm.chatWebsite.placeholderMessage" md-maxlength="255">\n                        <div ng-messages="interactionForm[\'placeholderMessage\'].$error" ng-show="interactionForm[\'placeholderMessage\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.PLACEHOLDERMESSAGE_REQUIRED">placeholderMessage field is required</span>\n                            </div>\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.PLACEHOLDERMESSAGE_MAX_LENGTH" translate-values=\'{max: 255}\'>placeholderMessage must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.download_transcript" aria-label="downloadTranscript"><span translate="CHAT.DOWNLOADTRANSCRIPT">downloadTranscript</span></md-switch>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.enableCustomerAttachment" aria-label="enableCustomerAttachment"><span translate="CHAT.ENABLECUSTOMERATTACHMENT">enableCustomerAttachment</span></md-switch>\n                    </md-input-container>\n\n                </form>\n            </div>\n            <div ng-if="vm.license.custom" class="chatWebsite-detail-form-container whitelabel md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="CHAT.WHITELABEL">WHITELABEL</div>\n                </div>\n                <form name="whitelabelForm" novalidate>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.chatWebsite.defaultWhiteLabel" aria-label="default"><span translate="CHAT.DEFAULT">default</span></md-switch>\n                    </md-input-container>\n                    <md-input-container ng-if="!vm.chatWebsite.defaultWhiteLabel" class="md-block">\n                        <label translate="CHAT.WHITELABEL">whiteLabel</label>\n                        <textarea name="whiteLabel" ng-model="vm.chatWebsite.whiteLabel" md-maxlength="255" required></textarea>\n\n                        <div ng-messages="whitelabelForm[\'whiteLabel\'].$error" ng-show="whitelabelForm[\'whiteLabel\'].$touched" role="alert">\n\n                            <div ng-message="required">\n                                <span translate="CHAT.ERRORS.WHITELABEL_REQUIRED">whiteLabel field is required</span>\n                            </div>\n\n\n                            <div ng-message="md-maxlength">\n                                <span translate="CHAT.ERRORS.WHITELABEL_MAX_LENGTH" translate-values=\'{max: 255}\'>whiteLabel must have a maximum length equal to 255</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n\n                </form>\n            </div>\n            <div ng-if="vm.license.custom" class="chatWebsite-detail-form-container logo md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="CHAT.LOGO">LOGO</div>\n                </div>\n                <div ng-controller="ChatWebsitelogoController as vm_ca" ng-init="vm_ca.init(vm.chatWebsite)" class="chatWebsite-detail-form-container md-background-bg md-whiteframe-1dp">\n\n                    <div id="chatWebsite-image-uploader" flow-init="vm_ca.ngFlowOptions" flow-name="vm_ca.ngFlow.flow" flow-files-submitted="vm_ca.upload()" flow-file-added="vm_ca.fileAdded($file)" flow-file-success="vm_ca.fileSuccess($file, $message)" flow-complete="vm_ca.uploadComplete()"\n                        flow-drop flow-drag-enter="vm_ca.dropping=true" flow-drag-leave="vm_ca.dropping=false" ng-class="{\'dropping\':vm.dropping}">\n\n                        <div class="drop-text hint-text" layout="row" layout-align="center center">\n                            <span translate="EC.DROP_TO_UPLOAD">Drop to upload</span>\n                        </div>\n\n                        <div class="upload-button" layout="column" layout-align="center center">\n                            <md-button class="md-accent md-raised" flow-btn>\n                                Upload\n                            </md-button>\n                            <span class="secondary-text mt-8">You can also drop images here to upload. Only PNG, JPG - Max. 8MB</span>\n                        </div>\n\n                        <div layout="row" layout-align="start start" layout-wrap>\n                            <div ng-repeat="logoimage in vm_ca.chatWebsite.images" ng-switch="logoimage.type">\n                                <div class="chatWebsite-image uploading" ng-switch-when="uploading" layout="row" layout-align="center center">\n                                    <div class="overlay" layout="column" layout-align="center center">\n                                        <md-progress-linear md-mode="determinate" value="{{logoimage.file.progress() * 100}}">\n                                        </md-progress-linear>\n                                    </div>\n                                    <img class="media" flow-img="logoimage.file">\n                                </div>\n\n                                <div class="chatWebsite-image" ng-switch-when="image" layout="row" layout-align="center center">\n                                    <img class="media" ng-src="{{logoimage.url}}">\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n\n            </div>\n            <div class="chatWebsite-detail-form-container agentavatar md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="CHAT.AGENTAVATAR">AGENTAVATAR</div>\n                </div>\n                <div ng-controller="ChatWebsiteagentAvatarController as vm_ca" ng-init="vm_ca.init(vm.chatWebsite)" class="chatWebsite-detail-form-container md-background-bg md-whiteframe-1dp">\n\n                    <div id="chatWebsite-image-uploader" flow-init="vm_ca.ngFlowOptions" flow-name="vm_ca.ngFlow.flow" flow-files-submitted="vm_ca.upload()" flow-file-added="vm_ca.fileAdded($file)" flow-file-success="vm_ca.fileSuccess($file, $message)" flow-complete="vm_ca.uploadComplete()"\n                        flow-drop flow-drag-enter="vm_ca.dropping=true" flow-drag-leave="vm_ca.dropping=false" ng-class="{\'dropping\':vm.dropping}">\n\n                        <div class="drop-text hint-text" layout="row" layout-align="center center">\n                            <span translate="EC.DROP_TO_UPLOAD">Drop to upload</span>\n                        </div>\n\n                        <div class="upload-button" layout="column" layout-align="center center">\n                            <md-button class="md-accent md-raised" flow-btn>\n                                Upload\n                            </md-button>\n                            <span class="secondary-text mt-8">You can also drop images here to upload. Only PNG, JPG - Max. 8MB</span>\n                        </div>\n\n                        <div layout="row" layout-align="start start" layout-wrap>\n                            <div ng-repeat="agentAvatarimage in vm_ca.chatWebsite.images" ng-switch="agentAvatarimage.type">\n                                <div class="chatWebsite-image uploading" ng-switch-when="uploading" layout="row" layout-align="center center">\n                                    <div class="overlay" layout="column" layout-align="center center">\n                                        <md-progress-linear md-mode="determinate" value="{{agentAvatarimage.file.progress() * 100}}">\n                                        </md-progress-linear>\n                                    </div>\n                                    <img class="media" flow-img="agentAvatarimage.file">\n                                </div>\n\n                                <div class="chatWebsite-image" ng-switch-when="image" layout="row" layout-align="center center">\n                                    <img class="media" ng-src="{{agentAvatarimage.url}}">\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="CHAT.ONLINE">ONLINE</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="chatWebsite-detail-form-container chatformonline md-background-bg md-whiteframe-1dp">\n                <div ng-controller="ChatWebsiteonlineFormController as vm_fonc" ng-init="vm_fonc.init(vm.chatWebsite)" class="content" md-background-bg layout="column">\n                    <div flex>\n                        \x3c!-- START Buttons --\x3e\n                        <md-button aria-label="comment" class="md-fab md-mini" ng-click="vm_fonc.add(button.type)" ng-repeat="button in vm_fonc.buttons">\n                            <md-tooltip md-direction="top">{{button.name}}</md-tooltip>\n                            <md-icon md-font-icon="{{button.icon}}"></md-icon>\n                        </md-button>\n                        \x3c!-- END Buttons --\x3e\n                    </div>\n\n                    <div layout="row" flex>\n                        <div flex="50">\n                            <md-card>\n                                <md-card-title>\n                                    <md-card-title-text>\n                                        <div class="pb-16" layout="row" layout-align="start center">\n                                            <div class="h2 secondary-text" translate="CHAT.BUILDER">BUILDER</div>\n                                        </div>\n                                    </md-card-title-text>\n                                </md-card-title>\n                                <md-card-content>\n\n                                    <form name="onlineForm" novalidate>\n\n                                        \x3c!-- START MapKey --\x3e\n                                        <md-input-container class="md-block" ng-if="vm_fonc.chatWebsite.onlineForm.items.length">\n                                            <label translate="CHAT.HELP.MAPKEY">MapKey</label>\n                                            <md-select ng-model="vm_fonc.chatWebsite.mapKey">\n                                                <md-option ng-value="null">None</md-option>\n\n                                                <md-optgroup label="standard">\n                                                    <md-option ng-repeat="field in vm_fonc.fields" ng-value="field.key">{{ field.value }}</md-option>\n                                                </md-optgroup>\n\n                                                <md-optgroup label="custom" ng-if="vm_fonc.customFields.length">\n                                                    <md-option ng-repeat="field in vm_fonc.customFields" ng-value="field.key">{{ field.value }}</md-option>\n                                                </md-optgroup>\n                                            </md-select>\n                                        </md-input-container>\n                                        \x3c!-- END MapKey --\x3e\n\n                                        \x3c!-- START FromKey --\x3e\n                                        <md-input-container class="md-block" ng-if="vm_fonc.chatWebsite.onlineForm.items.length">\n                                            <label translate="CHAT.HELP.FROMKEY">FromKey</label>\n                                            <md-select ng-model="vm_fonc.chatWebsite.onlineForm.fromKey" md-selected-text="vm_fonc.chatWebsite.onlineForm.fromKey != null ? vm_fonc.chatWebsite.onlineForm.items[vm_fonc.chatWebsite.onlineForm.fromKey].props.title : \'None\'">\n                                                <md-option ng-value="null">None</md-option>\n                                                <md-option ng-repeat="item in vm_fonc.chatWebsite.onlineForm.items" ng-if="item.props.title" ng-value="$index">{{ item.props.title }}</md-option>\n                                            </md-select>\n                                        </md-input-container>\n                                        \x3c!-- END FromKey --\x3e\n\n                                        \x3c!-- START EXPANSION PANELS --\x3e\n                                        <md-expansion-panel ng-repeat="item in vm_fonc.chatWebsite.onlineForm.items track by $index" md-component-id="{{\'onlinePanel\' + $index}}">\n                                            <md-expansion-panel-collapsed md-no-sticky="true">\n                                                <md-button class="md-icon-button" aria-label="Down" ng-click="vm_fonc.down(item, $index); $event.stopPropagation()">\n                                                    <md-icon md-font-icon="icon-arrow-down-bold-circle-outline"></md-icon>\n                                                </md-button>\n                                                <md-button class="md-icon-button" aria-label="Up" ng-click="vm_fonc.up(item, $index); $event.stopPropagation()">\n                                                    <md-icon md-font-icon="icon-arrow-up-bold-circle-outline"></md-icon>\n                                                </md-button>\n\n                                                <div class="md-title">{{item.props.title || item.type}}</div>\n\n                                                <div flex></div>\n                                                <md-button class="md-icon-button" aria-label="Collapse" ng-click="$panel.collapse()">\n                                                    <md-icon md-font-icon="icon-chevron-down"></md-icon>\n                                                </md-button>\n                                            </md-expansion-panel-collapsed>\n\n                                            <md-expansion-panel-expanded>\n                                                <md-expansion-panel-header>\n                                                    <md-button class="md-icon-button" aria-label="Down" ng-click="vm_fonc.down(item, $index)">\n                                                        <md-icon md-font-icon="icon-arrow-down-bold-circle-outline"></md-icon>\n                                                    </md-button>\n                                                    <md-button class="md-icon-button" aria-label="Up" ng-click="vm_fonc.up(item, $index)">\n                                                        <md-icon md-font-icon="icon-arrow-up-bold-circle-outline"></md-icon>\n                                                    </md-button>\n\n                                                    <div class="md-title">{{item.props.title || item.type}}</div>\n\n                                                    <div flex></div>\n\n                                                    <md-button class="md-icon-button md-warn" aria-label="Remove" ng-click="vm_fonc.remove($index)">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                    <md-button class="md-icon-button" aria-label="Collapse" ng-click="$panel.collapse()">\n                                                        <md-icon md-font-icon="icon-chevron-up"></md-icon>\n                                                    </md-button>\n                                                </md-expansion-panel-header>\n\n                                                <md-expansion-panel-content>\n                                                    <form-item type="{{item.type}}" item="item" index="$index"></form-item>\n\n                                                    <md-input-container class="md-block">\n                                                        <label translate="CHAT.VARIABLE">Variable</label>\n                                                        <md-select ng-model="item.variable">\n                                                            <md-option ng-value="null">None</md-option>\n                                                            <md-option ng-repeat="variable in vm_fonc.variables" ng-value="variable.name">{{ variable.name }}</md-option>\n                                                        </md-select>\n                                                    </md-input-container>\n\n                                                    <md-input-container class="md-block">\n                                                        <label translate="CHAT.CM_FIELD">Contact Manager Field</label>\n                                                        <md-select ng-model="item.cmField">\n                                                            <md-option ng-value="null">None</md-option>\n\n                                                            <md-optgroup label="standard">\n                                                                <md-option ng-repeat="field in vm_fonc.fields" ng-value="field.key">{{ field.value }}</md-option>\n                                                            </md-optgroup>\n\n                                                            <md-optgroup label="custom" ng-if="vm_fonc.customFields.length">\n                                                                <md-option ng-repeat="field in vm_fonc.customFields" ng-value="field.key">{{ field.value }}</md-option>\n                                                            </md-optgroup>\n                                                        </md-select>\n                                                    </md-input-container>\n                                                </md-expansion-panel-content>\n\n                                            </md-expansion-panel-expanded>\n                                        </md-expansion-panel>\n                                        \x3c!-- END EXPANSION PANELS --\x3e\n                                    </form>\n\n                                </md-card-content>\n                            </md-card>\n                        </div>\n                        <div flex="50">\n                            <md-card>\n                                <md-card-title>\n                                    <md-card-title-text>\n                                        <div class="pb-16" layout="row" layout-align="start center">\n                                            <div class="h2 secondary-text" translate="CHAT.PREVIEW">PREVIEW</div>\n                                        </div>\n                                    </md-card-title-text>\n                                </md-card-title>\n                                <md-card-content flex>\n                                    <form-view form="vm_fonc.chatWebsite.onlineForm" flex="100"></form-view>\n                                </md-card-content>\n                            </md-card>\n                        </div>\n                    </div>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="CHAT.OFFLINE">OFFLINE</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="chatWebsite-detail-form-container chatformoffline md-background-bg md-whiteframe-1dp">\n                <div ng-controller="ChatWebsiteofflineFormController as vm_fonc" ng-init="vm_fonc.init(vm.chatWebsite)" class="content" md-background-bg layout="column">\n                    <div flex>\n                        \x3c!-- START Buttons --\x3e\n                        <md-button aria-label="comment" class="md-fab md-mini" ng-click="vm_fonc.add(button.type)" ng-repeat="button in vm_fonc.buttons">\n                            <md-tooltip md-direction="top">{{button.name}}</md-tooltip>\n                            <md-icon md-font-icon="{{button.icon}}"></md-icon>\n                        </md-button>\n                        \x3c!-- END Buttons --\x3e\n                    </div>\n\n                    <div layout="row" flex>\n                        <div flex="50">\n                            <md-card>\n                                <md-card-title>\n                                    <md-card-title-text>\n                                        <div class="pb-16" layout="row" layout-align="start center">\n                                            <div class="h2 secondary-text" translate="CHAT.BUILDER">BUILDER</div>\n                                        </div>\n                                    </md-card-title-text>\n                                </md-card-title>\n                                <md-card-content>\n\n                                    <form name="offlineForm" novalidate>\n                                        <md-input-container class="md-block">\n                                            <md-switch ng-model="vm_fonc.chatWebsite.forwardOffline" aria-label="forwardOffline"><span translate="CHAT.FORWARD_OFFLINE">forwardOffline</span></md-switch>\n                                        </md-input-container>\n\n                                        <md-input-container class="md-block" ng-if="vm_fonc.chatWebsite.forwardOffline">\n                                            <label translate="CHAT.FORWARD_OFFLINE_ADDRESS">FORWARD OFFLINE ADDRESS</label>\n                                            <input type="text" name="forwardOfflineAddress" ng-model="vm_fonc.chatWebsite.forwardOfflineAddress">\n                                            <div class="hint"><span translate="CHAT.HELP.FORWARD_OFFLINE"></span></div>\n                                            <div ng-messages="offlineForm[\'forwardOfflineAddress\'].$error" ng-show="offlineForm[\'forwardOfflineAddress\'].$touched" role="alert">\n                                                <div ng-message="email">\n                                                    <span translate="CHAT.ERRORS.EMAIL_MUST_BE_VALID">forwardOffline must be a valid e-mail address</span>\n                                                </div>\n                                            </div>\n                                        </md-input-container>\n\n                                        \x3c!-- START MapKey --\x3e\n                                        <md-input-container class="md-block" ng-if="vm_fonc.chatWebsite.offlineForm.items.length">\n                                            <label translate="CHAT.HELP.MAPKEY">MapKey</label>\n                                            <md-select ng-model="vm_fonc.chatWebsite.mapKeyOffline">\n                                                <md-option ng-value="null">None</md-option>\n\n                                                <md-optgroup label="standard">\n                                                    <md-option ng-repeat="field in vm_fonc.fields" ng-value="field.key">{{ field.value }}</md-option>\n                                                </md-optgroup>\n\n                                                <md-optgroup label="custom" ng-if="vm_fonc.customFields.length">\n                                                    <md-option ng-repeat="field in vm_fonc.customFields" ng-value="field.key">{{ field.value }}</md-option>\n                                                </md-optgroup>\n                                            </md-select>\n                                        </md-input-container>\n                                        \x3c!-- END MapKey --\x3e\n\n                                        \x3c!-- START FromKey --\x3e\n                                        <md-input-container class="md-block" ng-if="vm_fonc.chatWebsite.offlineForm.items.length">\n                                            <label translate="CHAT.HELP.FROMKEY">FromKey</label>\n                                            <md-select ng-model="vm_fonc.chatWebsite.offlineForm.fromKey" md-selected-text="vm_fonc.chatWebsite.offlineForm.fromKey != null ? vm_fonc.chatWebsite.offlineForm.items[vm_fonc.chatWebsite.offlineForm.fromKey].props.title : \'None\'">\n                                                <md-option ng-value="null">None</md-option>\n                                                <md-option ng-repeat="item in vm_fonc.chatWebsite.offlineForm.items" ng-if="item.props.title" ng-value="$index">{{ item.props.title }}</md-option>\n                                            </md-select>\n                                        </md-input-container>\n                                        \x3c!-- END FromKey --\x3e\n\n                                        \x3c!-- START EXPANSION PANELS --\x3e\n                                        <md-expansion-panel ng-repeat="item in vm_fonc.chatWebsite.offlineForm.items track by $index" md-component-id="{{\'offlinePanel\' + $index}}">\n                                            <md-expansion-panel-collapsed md-no-sticky="true">\n                                                <md-button class="md-icon-button" aria-label="Down" ng-click="vm_fonc.down(item, $index); $event.stopPropagation()">\n                                                    <md-icon md-font-icon="icon-arrow-down-bold-circle-outline"></md-icon>\n                                                </md-button>\n                                                <md-button class="md-icon-button" aria-label="Up" ng-click="vm_fonc.up(item, $index); $event.stopPropagation()">\n                                                    <md-icon md-font-icon="icon-arrow-up-bold-circle-outline"></md-icon>\n                                                </md-button>\n\n                                                <div class="md-title">{{item.props.title || item.type}}</div>\n\n                                                <div flex></div>\n                                                <md-button class="md-icon-button" aria-label="Collapse" ng-click="$panel.collapse()">\n                                                    <md-icon md-font-icon="icon-chevron-down"></md-icon>\n                                                </md-button>\n                                            </md-expansion-panel-collapsed>\n\n                                            <md-expansion-panel-expanded>\n                                                <md-expansion-panel-header>\n                                                    <md-button class="md-icon-button" aria-label="Down" ng-click="vm_fonc.down(item, $index)">\n                                                        <md-icon md-font-icon="icon-arrow-down-bold-circle-outline"></md-icon>\n                                                    </md-button>\n                                                    <md-button class="md-icon-button" aria-label="Up" ng-click="vm_fonc.up(item, $index)">\n                                                        <md-icon md-font-icon="icon-arrow-up-bold-circle-outline"></md-icon>\n                                                    </md-button>\n\n                                                    <div class="md-title">{{item.props.title || item.type}}</div>\n\n                                                    <div flex></div>\n\n                                                    <md-button class="md-icon-button md-warn" aria-label="Remove" ng-click="vm_fonc.remove($index)">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                    <md-button class="md-icon-button" aria-label="Collapse" ng-click="$panel.collapse()">\n                                                        <md-icon md-font-icon="icon-chevron-up"></md-icon>\n                                                    </md-button>\n                                                </md-expansion-panel-header>\n\n                                                <md-expansion-panel-content>\n                                                    <form-item type="{{item.type}}" item="item" index="$index"></form-item>\n\n\n                                                    <md-input-container class="md-block">\n                                                        <label translate="CHAT.CM_FIELD">Contact Manager Field</label>\n                                                        <md-select ng-model="item.cmField">\n                                                            <md-option ng-value="null">None</md-option>\n\n                                                            <md-optgroup label="standard">\n                                                                <md-option ng-repeat="field in vm_fonc.fields" ng-value="field.key">{{ field.value }}</md-option>\n                                                            </md-optgroup>\n\n                                                            <md-optgroup label="custom" ng-if="vm_fonc.customFields.length">\n                                                                <md-option ng-repeat="field in vm_fonc.customFields" ng-value="field.key">{{ field.value }}</md-option>\n                                                            </md-optgroup>\n                                                        </md-select>\n                                                    </md-input-container>\n                                                </md-expansion-panel-content>\n\n                                            </md-expansion-panel-expanded>\n                                        </md-expansion-panel>\n                                        \x3c!-- END EXPANSION PANELS --\x3e\n                                    </form>\n\n                                </md-card-content>\n                            </md-card>\n                        </div>\n                        <div flex="50">\n                            <md-card>\n                                <md-card-title>\n                                    <md-card-title-text>\n                                        <div class="pb-16" layout="row" layout-align="start center">\n                                            <div class="h2 secondary-text" translate="CHAT.PREVIEW">PREVIEW</div>\n                                        </div>\n                                    </md-card-title-text>\n                                </md-card-title>\n                                <md-card-content flex>\n                                    <form-view form="vm_fonc.chatWebsite.offlineForm" flex="100"></form-view>\n                                </md-card-content>\n                            </md-card>\n                        </div>\n                    </div>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="CHAT.PROACTIVEACTIONS">PROACTIVEACTIONS</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="chatWebsite-detail-form-container proactive md-background-bg md-whiteframe-1dp">\n                <div ng-controller="ChatWebsiteProactiveActionsController as vm_dc" ng-init="vm_dc.init(vm.chatWebsite)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedChatWebsiteProactiveActions.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="CHAT.PROACTIVEACTIONS">ProactiveActions</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                            <md-button class="md-icon-button" ng-click="vm_dc.createOrEditChatWebsiteChatProactiveAction($event)" aria-label="add chatProactiveAction" translate translate-attr-label="CHAT.ADD_CHATPROACTIVEACTION">\n                                <md-icon md-font-icon="icon-plus"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedChatWebsiteProactiveActions.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedChatWebsiteProactiveActions.length}} {{vm_dc.selectedChatWebsiteProactiveActions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedChatWebsiteProactiveActions" csv-label="true" filename="chatWebsites.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                            <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedChatWebsiteProactiveActions($event)" aria-label="delete selected" translate translate-attr-label="CHATWEBSITES.DELETE_SELECTED">\n                                <md-icon md-font-icon="icon-delete"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedChatWebsiteProactiveActions" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getChatWebsiteProactiveActions">\n                                <tr md-row>\n                                    <th md-column md-order-by="id">{{ \'CHAT.ID\' | translate }}</th>\n                                    <th md-column md-order-by="name">{{ \'CHAT.NAME\' | translate }}</th>\n                                    <th md-column md-order-by="type">{{ \'CHAT.TYPE\' | translate }}</th>\n                                    <th md-column md-order-by="selector">{{ \'CHAT.SELECTOR\' | translate }}</th>\n                                    <th md-column md-order-by="timeout">{{ \'CHAT.TIMEOUT\' | translate }}</th>\n                                    <th md-column md-order-by="createdAt">{{ \'CHAT.CREATED_AT\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="chatProactiveAction" md-select-id="id" ng-repeat="chatProactiveAction in vm_dc.chatWebsiteProactiveActions.rows">\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatProactiveAction($event, chatProactiveAction)" md-cell>{{chatProactiveAction.id}}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatProactiveAction($event, chatProactiveAction)" md-cell>{{chatProactiveAction.name}}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatProactiveAction($event, chatProactiveAction)" md-cell>{{ \'CHAT.\' + vm_dc.arraytype[chatProactiveAction.type].option | uppercase | translate }}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatProactiveAction($event, chatProactiveAction)" md-cell>{{chatProactiveAction.selector}}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatProactiveAction($event, chatProactiveAction)" md-cell>{{chatProactiveAction.timeout}}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatProactiveAction($event, chatProactiveAction)" md-cell>{{chatProactiveAction.createdAt | date:\'medium\'}}</td>\n                                    <td md-cell class="actions">\n                                        <md-menu>\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CHAT.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_dc.createOrEditChatWebsiteChatProactiveAction($event, chatProactiveAction)" translate="CHAT.EDIT_CHATPROACTIVEACTION">\n                                                        Edit ChatProactiveAction\n                                                    </md-button>\n                                                </md-menu-item>\n                                                <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                    <md-button ng-click="vm_dc.deleteConfirm(chatProactiveAction, $event)" translate="CHAT.DELETE_CHATPROACTIVEACTION">\n                                                        Delete ChatProactiveAction\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.chatWebsiteProactiveActions.rows.length">\n                                    <td md-cell colspan="8">\n                                        <span class="text-boxed-ligth" translate="CHAT.NO_CHATPROACTIVEACTION_AVAILABLE">No chatproactiveaction available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'CHAT.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CHAT.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CHAT.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                        md-total="{{vm_dc.chatWebsiteProactiveActions.count}}" md-on-paginate="vm_dc.getChatWebsiteProactiveActions" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="CHAT.DISPOSITIONS">DISPOSITIONS</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="chatWebsite-detail-form-container chatdispositions md-background-bg md-whiteframe-1dp">\n                <div ng-controller="ChatWebsiteChatDispositionsController as vm_dc" ng-init="vm_dc.init(vm.chatWebsite)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedChatWebsiteChatDispositions.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="CHAT.CHATDISPOSITIONS">ChatDispositions</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                            <md-button class="md-icon-button" ng-click="vm_dc.createOrEditChatWebsiteChatDisposition($event)" aria-label="add chatDisposition" translate translate-attr-label="CHAT.ADD_CHATDISPOSITION">\n                                <md-icon md-font-icon="icon-plus"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedChatWebsiteChatDispositions.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedChatWebsiteChatDispositions.length}} {{vm_dc.selectedChatWebsiteChatDispositions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedChatWebsiteChatDispositions" csv-label="true" filename="chatWebsites.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                            <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedChatWebsiteChatDispositions($event)" aria-label="delete selected" translate translate-attr-label="CHATWEBSITES.DELETE_SELECTED">\n                                <md-icon md-font-icon="icon-delete"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedChatWebsiteChatDispositions" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getChatWebsiteChatDispositions">\n                                <tr md-row>\n                                    <th md-column md-order-by="id">{{ \'CHAT.ID\' | translate }}</th>\n                                    <th md-column md-order-by="name">{{ \'CHAT.NAME\' | translate }}</th>\n                                    <th md-column md-order-by="createdAt">{{ \'CHAT.CREATED_AT\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="chatDisposition" md-select-id="id" ng-repeat="chatDisposition in vm_dc.chatWebsiteChatDispositions.rows">\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatDisposition($event, chatDisposition)" md-cell>{{chatDisposition.id}}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatDisposition($event, chatDisposition)" md-cell>{{chatDisposition.name}}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatDisposition($event, chatDisposition)" md-cell>{{chatDisposition.createdAt | date:\'medium\'}}</td>\n                                    <td md-cell class="actions">\n                                        <md-menu>\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CHAT.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_dc.createOrEditChatWebsiteChatDisposition($event, chatDisposition)" translate="CHAT.EDIT_CHATDISPOSITION">\n                                                        Edit ChatDisposition\n                                                    </md-button>\n                                                </md-menu-item>\n                                                <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                    <md-button ng-click="vm_dc.deleteConfirm(chatDisposition, $event)" translate="CHAT.DELETE_CHATDISPOSITION">\n                                                        Delete ChatDisposition\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.chatWebsiteChatDispositions.rows.length">\n                                    <td md-cell colspan="5">\n                                        <span class="text-boxed-ligth" translate="CHAT.NO_CHATDISPOSITION_AVAILABLE">No chatdisposition available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'CHAT.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CHAT.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CHAT.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                        md-total="{{vm_dc.chatWebsiteChatDispositions.count}}" md-on-paginate="vm_dc.getChatWebsiteChatDispositions" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="CHAT.CANNEDANSWERS">CANNEDANSWERS</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="chatWebsite-detail-form-container chatcannedanswers md-background-bg md-whiteframe-1dp">\n                <div ng-controller="ChatWebsiteChatCannedAnswersController as vm_dc" ng-init="vm_dc.init(vm.chatWebsite)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedChatWebsiteChatCannedAnswers.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="CHAT.CHATCANNEDANSWERS">ChatCannedAnswers</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                            <md-button class="md-icon-button" ng-click="vm_dc.createOrEditChatWebsiteChatCannedAnswer($event)" aria-label="add chatCannedAnswer" translate translate-attr-label="CHAT.ADD_CHATCANNEDANSWER">\n                                <md-icon md-font-icon="icon-plus"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedChatWebsiteChatCannedAnswers.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedChatWebsiteChatCannedAnswers.length}} {{vm_dc.selectedChatWebsiteChatCannedAnswers.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedChatWebsiteChatCannedAnswers" csv-label="true" filename="chatWebsites.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                            <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedChatWebsiteChatCannedAnswers($event)" aria-label="delete selected" translate translate-attr-label="CHATWEBSITES.DELETE_SELECTED">\n                                <md-icon md-font-icon="icon-delete"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedChatWebsiteChatCannedAnswers" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getChatWebsiteChatCannedAnswers">\n                                <tr md-row>\n                                    <th md-column md-order-by="id">{{ \'CHAT.ID\' | translate }}</th>\n                                    <th md-column md-order-by="key">{{ \'CHAT.KEY\' | translate }}</th>\n                                    <th md-column md-order-by="value">{{ \'CHAT.VALUE\' | translate }}</th>\n                                    <th md-column md-order-by="description">{{ \'CHAT.DESCRIPTION\' | translate }}</th>\n                                    <th md-column md-order-by="createdAt">{{ \'CHAT.CREATED_AT\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="chatCannedAnswer" md-select-id="id" ng-repeat="chatCannedAnswer in vm_dc.chatWebsiteChatCannedAnswers.rows">\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatCannedAnswer($event, chatCannedAnswer)" md-cell>{{chatCannedAnswer.id}}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatCannedAnswer($event, chatCannedAnswer)" md-cell>{{chatCannedAnswer.key}}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatCannedAnswer($event, chatCannedAnswer)" md-cell>{{chatCannedAnswer.value}}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatCannedAnswer($event, chatCannedAnswer)" md-cell>{{chatCannedAnswer.description}}</td>\n                                    <td ng-click="vm_dc.createOrEditChatWebsiteChatCannedAnswer($event, chatCannedAnswer)" md-cell>{{chatCannedAnswer.createdAt | date:\'medium\'}}</td>\n                                    <td md-cell class="actions">\n                                        <md-menu>\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CHAT.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_dc.createOrEditChatWebsiteChatCannedAnswer($event, chatCannedAnswer)" translate="CHAT.EDIT_CHATCANNEDANSWER">\n                                                        Edit ChatCannedAnswer\n                                                    </md-button>\n                                                </md-menu-item>\n                                                <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                    <md-button ng-click="vm_dc.deleteConfirm(chatCannedAnswer, $event)" translate="CHAT.DELETE_CHATCANNEDANSWER">\n                                                        Delete ChatCannedAnswer\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.chatWebsiteChatCannedAnswers.rows.length">\n                                    <td md-cell colspan="7">\n                                        <span class="text-boxed-ligth" translate="CHAT.NO_CHATCANNEDANSWER_AVAILABLE">No chatcannedanswer available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'CHAT.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CHAT.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CHAT.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                        md-total="{{vm_dc.chatWebsiteChatCannedAnswers.count}}" md-on-paginate="vm_dc.getChatWebsiteChatCannedAnswers" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="CHAT.ACTIONS">ACTIONS</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="chatWebsite-detail-form-container actions md-background-bg md-whiteframe-1dp">\n                <div ng-controller="ChatWebsiteActionsController as vm_ac" ng-init="vm_ac.init(vm.chatWebsite)" class="content" md-background-bg layout="row" layout-align="start start">\n                    \x3c!-- SIDENAV --\x3e\n                    <div class="navigation-simple sidenav main-sidenav md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="20">\n                        \x3c!-- SIDENAV CONTENT --\x3e\n                        <md-list class="no-padding">\n                            <md-subheader class="md-no-sticky">\n                                <span translate="VOICE.APPLICATIONS_LIST">\n          Applications List\n        </span>\n                            </md-subheader>\n                        </md-list>\n                        <md-divider></md-divider>\n                        <md-list ng-sortable="vm_ac.list">\n                            <md-list-item class="handle" ng-repeat="a in vm_ac.apps">\n                                <md-icon md-font-icon="{{a.icon}}" class="s16"></md-icon>\n                                <p class="text-truncate" translate="CHAT.{{(a.alias || a.appType) | uppercase}}">{{a.alias || a.appType}}</p>\n                            </md-list-item>\n                        </md-list>\n                        \x3c!-- / SIDENAV CONTENT --\x3e\n                    </div>\n                    \x3c!-- / SIDENAV --\x3e\n                    <div flex></div>\n                    \x3c!-- MAIN --\x3e\n                    <div class="main scrollable md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="75">\n                        <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_ac.selectedChatWebsiteApps.length">\n                            <div class="md-toolbar-tools">\n                                <span class="md-subhead">Drag & Drop Routing</span>\n                                <div flex></div>\n                                <ms-search-bar on-search="vm_ac.query.filter = query" on-collapse="vm_ac.query.filter = undefined" debounce="300"></ms-search-bar>\n                            </div>\n                        </md-toolbar>\n                        <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_ac.selectedChatWebsiteApps.length">\n                            <div class="md-toolbar-tools">\n                                <span class="md-subhead">{{vm_ac.selectedChatWebsiteApps.length}} {{vm_ac.selectedChatWebsiteApps.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                <div flex></div>\n                                <md-button ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_ac.deleteSelectedChatWebsiteApps($event)" aria-label="delete selected" translate translate-attr-label="CHAT.DELETE_SELECTED">\n                                    <md-icon md-font-icon="icon-delete"></md-icon>\n                                </md-button>\n                            </div>\n                        </md-toolbar>\n\n                        \x3c!-- QUEUES TABLE --\x3e\n                        <md-table-container>\n                            <table md-table md-row-select multiple ng-model="vm_ac.selectedChatWebsiteApps">\n                                <thead md-head>\n                                    <tr md-row>\n                                        <th md-column width="10px"></th>\n                                        <th md-column width="10px">\n                                            <span translate="VOICE.PRIORITY">Priority</span>\n                                        </th>\n                                        <th md-column>\n                                            <span>Type</span>\n                                        </th>\n                                        <th md-column>\n                                            <span>Appdata</span>\n                                        </th>\n                                        <th md-column>\n                                            <span>Interval</span>\n                                        </th>\n                                        <th md-column width="10px"></th>\n                                        <th md-column width="10px"></th>\n                                    </tr>\n                                </thead>\n                                <tbody md-body ng-sortable="vm_ac.applications">\n                                    <tr md-row md-select="app" md-select-id="id" ng-repeat="app in vm_ac.chatWebsiteApps.rows | filter: vm_ac.query.filter">\n                                        <td md-cell>\n                                            <md-icon md-font-icon="icon-drag-vertical" class="s16 handle"></md-icon>\n                                        </td>\n                                        <td md-cell ng-click="vm_ac.editChatWebsiteApp($event, $index)"><span>{{app.priority}}</span></td>\n                                        <td md-cell ng-click="vm_ac.editChatWebsiteApp($event, $index)">{{app.app.toLowerCase() === \'agi\' ? \'Cally-Square\' : app.app | ucfirst}}<span ng-if="app.appType.toLowerCase() === \'custom\'">*</span></td>\n                                        <td md-cell ng-click="vm_ac.editChatWebsiteApp($event, $index)"><span class="text-truncate" style="width:200px">{{app.appdata}}</span></td>\n                                        <td md-cell ng-click="vm_ac.editInterval($event, $index)">{{app.IntervalId ? \'From List\' : app.interval}}</td>\n                                        <td md-cell>\n                                            <md-button ng-click="vm_ac.editInterval($event, $index)" class="md-icon-button" aria-label="Interval">\n                                                <md-icon md-font-icon="icon-timer"></md-icon>\n                                                <md-tooltip>\n                                                    {{app.IntervalId ? \'From List\' : (app.interval === \'*,*,*,*\' ? \'Always\' : \'Custom\')}}\n                                                </md-tooltip>\n                                            </md-button>\n                                        </td>\n                                        <td md-cell class="actions">\n                                            <md-menu>\n                                                <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                                    <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                </md-button>\n\n                                                <md-menu-content width="3">\n                                                    <md-menu-item>\n                                                        <md-button ng-click="vm_ac.editChatWebsiteApp($event, $index)" translate="VOICE.EDIT_APP">\n                                                            Edit App\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                    <md-menu-item>\n                                                        <md-button ng-click="vm_ac.editInterval($event, $index)" translate="VOICE.EDIT_INTERVAL">\n                                                            Edit Interval\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                    <md-menu-item ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'">\n                                                        <md-button ng-click="vm_ac.deleteConfirm(app, $index, $event)" translate="VOICE.DELETE_APP">\n                                                            Delete App\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                </md-menu-content>\n                                            </md-menu>\n                                        </td>\n                                    </tr>\n                                    <tr md-row ng-hide="vm_ac.chatWebsiteApps.rows.length">\n                                        <td md-cell colspan="7">\n                                            <span class="text-boxed-ligth" translate="VOICE.NO_APPS_AVAILABLE">No apps available</span>\n                                        </td>\n                                    </tr>\n                                </tbody>\n                            </table>\n                        </md-table-container>\n                        \x3c!-- / QUEUES TABLE --\x3e\n\n                        \x3c!-- NO RESULTS --\x3e\n\n                        \x3c!-- / NO RESULTS --\x3e\n                    </div>\n                    \x3c!-- / MAIN --\x3e\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="CHAT.INTERACTIONS">INTERACTIONS</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="chatWebsite-detail-form-container interactions md-background-bg md-whiteframe-1dp">\n                <div ng-controller="ChatWebsiteInteractionsController as vm_dc" ng-init="vm_dc.init(vm.chatWebsite)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedChatWebsiteInteractions.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="CHAT.INTERACTIONS">Interactions</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                            <md-button class="md-icon-button" ng-click="vm_dc.getChatWebsiteInteractions()" aria-label="refresh Interactions" translate translate-attr-label="CHAT.REFRESH_INTERACTIONS">\n                                <md-icon md-font-icon="icon-refresh"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedChatWebsiteInteractions.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedChatWebsiteInteractions.length}} {{vm_dc.selectedChatWebsiteInteractions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedChatWebsiteInteractions" csv-label="true" filename="chatWebsites.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                            <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedChatWebsiteInteractions($event)" aria-label="delete selected" translate translate-attr-label="CHATWEBSITES.DELETE_SELECTED">\n                                <md-icon md-font-icon="icon-delete"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedChatWebsiteInteractions" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getChatWebsiteInteractions">\n                                <tr md-row>\n                                    <th md-column md-order-by="id">{{ \'CHAT.ID\' | translate }}</th>\n                                    <th md-column md-order-by="createdAt">{{ \'CHAT.STARTEDAT\' | translate }}</th>\n                                    <th md-column md-order-by="closedAt">{{ \'CHAT.CLOSEDAT\' | translate }}</th>\n                                    <th md-column>{{ \'CHAT.CONTACT\' | translate }}</th>\n                                    <th md-column>{{ \'CHAT.AGENT\' | translate }}</th>\n                                    <th md-column md-order-by="disposition">{{ \'CHAT.DISPOSITION\' | translate }}</th>\n                                    <th md-column md-order-by="ratingValue">{{ \'CHAT.RATING\' | translate }}</th>\n                                    <th md-column md-order-by="note">{{ \'CHAT.NOTES\' | translate }}</th>\n                                    <th md-column md-order-by="tag">{{ \'CHAT.TAGS\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="interaction" md-select-id="id" ng-repeat="interaction in vm_dc.chatWebsiteInteractions.rows">\n                                    <td md-cell>{{interaction.id}}</td>\n                                    <td md-cell>{{interaction.createdAt | date:\'medium\'}}</td>\n                                    <td md-cell>{{interaction.closedAt | date:\'medium\'}}</td>\n                                    <td md-cell>{{interaction.Contact.firstName}}</td>\n                                    <td md-cell>{{interaction.Owner.name}}</td>\n                                    <td md-cell>{{interaction.disposition}}</td>\n                                    <td md-cell>\n                                        <md-icon md-font-icon="icon-star" style="color:red" ng-show="interaction.ratingValue != null && (!interaction.ratingType || interaction.ratingType == \'star\')" ng-repeat="ratingValue in [1,2,3,4,5] | limitTo:interaction.ratingValue"></md-icon>\n                                        <md-icon md-font-icon="icon-thumb-up" style="color:green" ng-show="interaction.ratingValue != null && interaction.ratingType && interaction.ratingType == \'thumb\' && interaction.ratingValue == 1"></md-icon>\n                                        <md-icon md-font-icon="icon-thumb-down" style="color:red" ng-show="interaction.ratingValue != null && interaction.ratingType && interaction.ratingType == \'thumb\' && interaction.ratingValue == 0"></md-icon><span ng-show="interaction.ratingValue == null" translate="CHAT.NO_RATINGVALUE">No ratingValue</span></td>\n                                    <td md-cell>{{interaction.note}}</td>\n                                    <td md-cell>\n                                        <div ng-if="interaction.Tags.length">\n                                            <md-tooltip md-direction="left" layout="row">\n                                                <span ng-repeat="tag in interaction.Tags">{{tag.name}}<span ng-if="!$last">, </span></span>\n                                            </md-tooltip>\n                                            <md-icon md-font-icon="icon-tag"></md-icon>\n                                        </div>\n                                    </td>\n                                    <td md-cell class="actions">\n                                        <md-menu>\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CHAT.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_dc.spychatInteraction($event, interaction)" translate="CHAT.SPYINTERACTION">\n                                                        Spy Interaction\n                                                    </md-button>\n                                                </md-menu-item>\n                                                <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                    <md-button ng-click="vm_dc.deleteConfirm(interaction, $event)" translate="CHAT.DELETE_INTERACTION">\n                                                        Delete Interaction\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.chatWebsiteInteractions.rows.length">\n                                    <td md-cell colspan="15">\n                                        <span class="text-boxed-ligth" translate="CHAT.NO_INTERACTION_AVAILABLE">No interaction available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'CHAT.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CHAT.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CHAT.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                        md-total="{{vm_dc.chatWebsiteInteractions.count}}" md-on-paginate="vm_dc.getChatWebsiteInteractions" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="CHAT.OFFLINEMESSAGES">OFFLINEMESSAGES</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="chatWebsite-detail-form-container offlinemessages md-background-bg md-whiteframe-1dp">\n                <div ng-controller="ChatWebsiteOfflineMessagesController as vm_dc" ng-init="vm_dc.init(vm.chatWebsite)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedChatWebsiteOfflineMessages.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="CHAT.OFFLINEMESSAGES">OfflineMessages</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedChatWebsiteOfflineMessages.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedChatWebsiteOfflineMessages.length}} {{vm_dc.selectedChatWebsiteOfflineMessages.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedChatWebsiteOfflineMessages" csv-label="true" filename="chatWebsites.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                            <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedChatWebsiteOfflineMessages($event)" aria-label="delete selected" translate translate-attr-label="CHATWEBSITES.DELETE_SELECTED">\n                                <md-icon md-font-icon="icon-delete"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedChatWebsiteOfflineMessages" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getChatWebsiteOfflineMessages">\n                                <tr md-row>\n                                    <th md-column md-order-by="id">{{ \'CHAT.ID\' | translate }}</th>\n                                    <th md-column md-order-by="ContactId">{{ \'CHAT.CONTACT\' | translate }}</th>\n                                    <th md-column md-order-by="createdAt">{{ \'CHAT.CREATED_AT\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="offlineMessage" md-select-id="id" ng-repeat="offlineMessage in vm_dc.chatWebsiteOfflineMessages.rows">\n                                    <td md-cell>{{offlineMessage.id}}</td>\n                                    <td md-cell>{{ ContactId = vm_dc.contacts[offlineMessage.ContactId]; ContactId.firstName }}</td>\n                                    <td md-cell>{{offlineMessage.createdAt | date:\'medium\'}}</td>\n                                    <td md-cell class="actions">\n                                        <md-menu>\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CHAT.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_dc.showOfflineMessageChatWebsiteOfflineMessage($event, offlineMessage)" translate="CHAT.SHOW_OFFLINEMESSAGE">\n                                                        SHOW OfflineMessage\n                                                    </md-button>\n                                                </md-menu-item>\n                                                <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                    <md-button ng-click="vm_dc.deleteConfirm(offlineMessage, $event)" translate="CHAT.DELETE_OFFLINEMESSAGE">\n                                                        Delete OfflineMessage\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.chatWebsiteOfflineMessages.rows.length">\n                                    <td md-cell colspan="5">\n                                        <span class="text-boxed-ligth" translate="CHAT.NO_OFFLINEMESSAGE_AVAILABLE">No offlinemessage available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'CHAT.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CHAT.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CHAT.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                        md-total="{{vm_dc.chatWebsiteOfflineMessages.count}}" md-on-paginate="vm_dc.getChatWebsiteOfflineMessages" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    </md-tabs>\n\n</div>\n\x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/chat/views/realtime/agents/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="CHAT.AGENTS">Agents</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query; vm.onInit()" on-collapse="vm.query.filter = undefined; vm.onInit()" debounce="300"></ms-search-bar>\n        \x3c!-- <md-button class="md-icon-button" ng-click="vm.showInfo($event)">\n      <i class="icon-information-outline grey-600-fg">\n        <md-tooltip>{{\'VOICE.INFO\' | translate}}</md-tooltip>\n      </i>\n    </md-button> --\x3e\n        <md-select ng-model="vm.query.globalStatusFilter" class="md-caption" ng-change="vm.query.pauseTypeFilter = \'\'; vm.onInit()">\n            <md-option ng-value="\'\'">{{ \'CHAT.ALL\' | translate }}</md-option>\n            <md-option value="pause">{{ \'CHAT.PAUSE\' | translate }}</md-option>\n            <md-option value="*pause">{{ \'CHAT.PARTIALPAUSE\' | translate }}</md-option>\n            <md-option value="busy">{{ \'CHAT.BUSY\' | translate }}</md-option>\n            <md-option value="idle">{{ \'CHAT.IDLE\' | translate }}</md-option>\n        </md-select>\n\n        <md-select ng-if="vm.isPause(vm.query.globalStatusFilter)" ng-model="vm.query.pauseTypeFilter" class="md-caption" ng-change="vm.onInit()">\n            <md-option ng-value="\'\'">All</md-option>\n            <md-option value="DEFAULT PAUSE">DEFAULT PAUSE</md-option>\n            <md-option value="ACW">ACW</md-option>\n            <md-option value="LOGININPAUSE">LOGININPAUSE</md-option>\n            <md-option value="Auto-Pause">AUTOPAUSE</md-option>\n            <md-option ng-value="pause.name" ng-repeat="pause in vm.pauses.rows">{{pause.name}}</md-option>\n        </md-select>\n    </div>\n</md-toolbar>\n\n\x3c!-- AGENT TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.order" md-on-reorder="vm.onInit">\n            <tr md-row border="1">\n                <th class="bv text-center" colspan="3">{{ \'CHAT.AGENT\' | translate }}</th>\n                <th class="bv bl text-center" colspan="2">{{ \'VOICE.VOICE\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="bv bl text-center" colspan="2">{{ \'CHAT.CHAT\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="bv bl text-center" colspan="2">{{ \'MAIL.MAIL\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="bv bl text-center" colspan="2">{{ \'SMS.SMS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="bv bl text-center" colspan="2">{{ \'OPENCHANNEL.OPENCHANNEL\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="bv bl text-center" colspan="2">{{ \'FAX.FAX\' | translate }}</th>\n                <th width="10px" class="bt bl" rowspan="2"></th>\n                \x3c!-- <th md-column>{{ \'VOICE.PHONE_STATE\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PHONE_STATUS\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PAUSE\' | translate }}</th>\n                <th md-column width="10px"></th> --\x3e\n            </tr>\n            <tr md-row>\n                <th class="bl" md-column md-order-by="fullname">{{ \'CHAT.NAME\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatus">{{ \'CHAT.STATUS\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatusTime">{{ \'CHAT.TIMER\' | translate }}</th>\n\n                <th class="bl custom-column">{{ \'VOICE.STATUS\' | translate }}</th>\n                <th class="bl custom-column">Info</th>\n\n                <th ng-if="vm.license.chat" class="bl text-center">{{ \'CHAT.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'CHAT.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.mail" class="bl text-center">{{ \'MAIL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'MAIL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.messaging" class="bl text-center">{{ \'SMS.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'SMS.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.openchannel" class="bl text-center">{{ \'OPENCHANNEL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'OPENCHANNEL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.fax" class="bl text-center">{{ \'FAX.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'FAX.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.order.length">\n                <td md-cell colspan="17">\n                    <div layout="row" layout-align="center center">\n                        <span>{{ \'CHAT.NO_AGENT_ONLINE\' | translate }}</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-select="vm.agents[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td class="bt padding-5">\n                    <div layout="row" layout-align="start center">\n                        <img class="avatar" ng-src="{{vm.agents[value].userpic && \'api/users/\'+vm.agents[value].id+\'/avatar\' || \'assets/images/avatars/profile.png\'}}">\n                        <div layout="column">\n                            <span>{{vm.agents[value].fullname}}</span>\n                            <span>{{vm.agents[value].internal}}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt">\n                    <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'busy\':\'indigo-100-bg\',\'*pause\':\'amber-50-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].globalStatus]">{{ vm.isPause(vm.agents[value].globalStatus) ? \'\' : vm.agents[value].globalStatus | uppercase }} {{ vm.isPause(vm.agents[value].globalStatus) ? (vm.isPartialPause(vm.agents[value].globalStatus) ? \'*\'+vm.agents[value].pauseType || \'DEFAULT PAUSE\'  : vm.agents[value].pauseType || \'DEFAULT PAUSE\') : \'\'}}</span>\n                </td>\n                <td class="bt custom-column">\n                    <timer start-time="vm.agents[value].globalStatusTime" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                </td>\n                <td class="bt bl">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'talking\':\'indigo-100-bg\',\'ringing\':\'orange-400-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].voiceStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt bl">\n                    <div layout="column">\n                        <span ng-if="vm.agents[value].queue" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].queue }}</span>\n                        <span ng-if="vm.agents[value].destconnectedlinenum" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].destconnectedlinenum }}</span>\n                        <span class="padding-5" ng-if="vm.agents[value].queue || vm.agents[value].destconnectedlinenum">\n                            <timer start-time="vm.agents[value].voiceStatusTime" interval="1000" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                        </span>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt">--</td>\n                <td class="bt">--</td> --\x3e\n                <td class="bt bl" ng-if="vm.license.chat">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt padding-5 text-center">{{ agent.chatCurrentCapacity }}/{{ agent.chatCapacity > 0 ? agent.chatCapacity : \'∞\' }}</td> --\x3e\n                <td md-number class="bt text-center font-size-20" ng-if="vm.license.chat" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.mail">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.mail" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.messaging">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.messaging" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.openchannel">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">4</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">89</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.openchannel" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.fax">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">7</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">2</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.fax" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxCurrentCapacity }}</td>\n                <td class="bl bt padding-5 text-center">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="4">\n                            <md-menu-item>\n                                <md-button ng-click="vm.logout(vm.agents[value], $event)" translate="CHAT.LOGOUT">\n                                    Logout\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.queueAdd(vm.agents[value], $event)" translate="CHAT.AGENTADD_QUEUE">\n                                    Add Agent In Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="CHAT.PAUSE">Pause</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item>\n                                            <md-button ng-disabled=" vm.agents[value].voicePause && \'DEFAULT PAUSE\' === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value])"><em translate="CHAT.DEFAULT_PAUSE">Default Pause</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.pauses.rows.length" ng-repeat="pause in vm.pauses.rows">\n                                            <md-button ng-disabled="vm.agents[value].voicePause && pause.name === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value], pause.name)">{{pause.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                            <md-menu-item ng-if="vm.isPause(vm.agents[value].globalStatus)">\n                                <md-button ng-click="vm.unPause(vm.agents[value])" translate="CHAT.UNPAUSE">\n                                    Unpause\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'CHAT.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CHAT.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CHAT.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.filteredAgents.length}}" md-on-paginate="vm.onInit" md-page-select></md-table-pagination>\n\x3c!-- / AGENT TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/chat/views/realtime/queues/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="CHAT.QUEUES">Queues</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUE TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getQueues">\n            <tr md-row>\n                <th md-column md-order-by="name">{{ \'CHAT.NAME\' | translate }}</th>\n                <th md-column>{{ \'CHAT.LOGGED_IN\' | translate }}</th>\n                <th md-column>{{ \'CHAT.PAUSED\' | translate }}</th>\n                <th md-column>{{ \'CHAT.READY\' | translate }}</th>\n                <th md-column>{{ \'CHAT.WAITING\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.queues">\n                <td md-cell colspan="7">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="CHAT.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row md-select="vm.queues[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td md-cell>{{vm.queues[value].name}}</td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].loggedInDb || 0}} ({{vm.queues[value].loggedIn || 0}})</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].paused || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].available || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].waiting || 0}}</span>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CHAT.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="3">\n                            <md-menu-item>\n                                <md-button ng-click="vm.createOrEditChatQueue($event, vm.queues[value])" translate="CHAT.EDIT_QUEUE">\n                                    Edit Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.agentAdd($event, vm.queues[value])" translate="CHAT.AGENTSADD_QUEUE">\n                                    Add Agents to queue\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'CHAT.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CHAT.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CHAT.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.count}}" md-on-paginate="vm.getQueues" md-page-select></md-table-pagination>\n\x3c!-- / QUEUE TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/chat/views/realtime/realtime.html",'<div id="realtime" class="page-layout simple tabbed" layout="column" ng-cloak>\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CHAT.AGENTS">Agents</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CHAT.QUEUES">Queues</span>\n                </md-tab-label>\n            </md-tab>\n        </md-tabs>\n\n        <md-card ui-view></md-card>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n</div>'),e.put("app/main/apps/contactmanager/views/companies/companies.html",'<div id="companies" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-account-circle" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="CONTACTMANAGER.COMPANIES">Companies</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="CONTACTMANAGER.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedCompanies.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedCompanies =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="CONTACTMANAGER.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-companies-count">\n                    <span>{{vm.selectedCompanies.length}}</span>\n                <span translate="CONTACTMANAGER.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="COMPANIES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllCompanies()" translate="CONTACTMANAGER.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectCompanies()" translate="CONTACTMANAGER.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedCompanies" csv-label="true" filename="companies.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedCompanies($event)" aria-label="delete selected" translate translate-attr-label="COMPANIES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- COMPANY TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedCompanies" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getCompanies">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'CONTACTMANAGER.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'CONTACTMANAGER.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'CONTACTMANAGER.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.companies.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="CONTACTMANAGER.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="company" md-select-id="id" ng-repeat="company in vm.companies.rows">\n                                <td md-cell ng-if="company.userpic"><img class="avatar" alt="{{company.name}}" ng-src="api/users/{{company.id}}/avatar" /></td>\n                                <td md-cell ng-if="!company.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{company.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditCompany($event, company)" md-cell class="id ">{{company.id}}</td>\n                                <td ng-click="vm.createOrEditCompany($event, company)" md-cell class="name ">{{company.name}}</td>\n                                <td ng-click="vm.createOrEditCompany($event, company)" md-cell class="description ">{{company.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CONTACTMANAGER.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(company, $event)" translate="CONTACTMANAGER.EDIT_COMPANY">\n                                                    Edit Company\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotocontactsgoto(company, $event)" translate="CONTACTMANAGER.GOTOCONTACTS_COMPANY">\n                                                    goToContacts Company\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(company, $event)" translate="CONTACTMANAGER.DELETE_COMPANY">\n                                                    Delete Company\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'CONTACTMANAGER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CONTACTMANAGER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CONTACTMANAGER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.companies.count}}" md-on-paginate="vm.getCompanies" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / COMPANY TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD COMPANY BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-company-button" ng-click="vm.createOrEditCompany($event)" aria-label="add company" translate translate-attr-aria-label="CONTACTMANAGER.ADD_COMPANY">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD COMPANY BUTTON --\x3e\n</div>'),e.put("app/main/apps/contactmanager/views/companies/create/dialog.html",'<md-dialog class="company-dialog" aria-label="New Company">\n    <form name="companyForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.company.name" ng-required="true" autofocus>\n                <div ng-messages="companyForm[\'name\'].$error" ng-show="companyForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.PHONE">Phone</label>\n                <input type="text" name="phone" ng-model="vm.company.phone">\n                <div ng-messages="companyForm[\'phone\'].$error" ng-show="companyForm[\'phone\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.PHONE_REQUIRED">Phone field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.VAT">Vat</label>\n                <input type="text" name="vat" ng-model="vm.company.vat">\n                <div ng-messages="companyForm[\'vat\'].$error" ng-show="companyForm[\'vat\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.VAT_REQUIRED">Vat field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.FAX">Fax</label>\n                <input type="text" name="fax" ng-model="vm.company.fax">\n                <div ng-messages="companyForm[\'fax\'].$error" ng-show="companyForm[\'fax\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.FAX_REQUIRED">Fax field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.COMPANYID">CompanyId</label>\n                <input type="text" name="companyId" ng-model="vm.company.companyId">\n                <div ng-messages="companyForm[\'companyId\'].$error" ng-show="companyForm[\'companyId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.COMPANYID_REQUIRED">CompanyId field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.TYPE">Type</label>\n                <input type="text" name="type" ng-model="vm.company.type">\n                <div ng-messages="companyForm[\'type\'].$error" ng-show="companyForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.WEBSITE">Website</label>\n                <input type="text" name="website" ng-model="vm.company.website" md-maxlength="255">\n                <div ng-messages="companyForm[\'website\'].$error" ng-show="companyForm[\'website\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.WEBSITE_REQUIRED">Website field is required</span>\n                    </div>\n\n                    <div ng-message="md-maxlength">\n                        <span translate="CONTACTMANAGER.ERRORS.WEBSITE_MAX_LENGTH" translate-values=\'{max: 255}\'>Website must have a maximum length equal to 255</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.EMAIL_DOMAIN">Email_Domain</label>\n                <input type="text" name="emailDomain" ng-model="vm.company.emailDomain">\n                <div ng-messages="companyForm[\'emailDomain\'].$error" ng-show="companyForm[\'emailDomain\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.EMAIL_DOMAIN_REQUIRED">Email_Domain field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.EMAIL">Email</label>\n                <input type="email" name="email" ng-model="vm.company.email">\n                <div ng-messages="companyForm[\'email\'].$error" ng-show="companyForm[\'email\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                    </div>\n                    <div ng-message="email">\n                        <span translate="CONTACTMANAGER.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.company.description">\n                <div ng-messages="companyForm[\'description\'].$error" ng-show="companyForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newCompany" ng-click="vm.saveCompany()" class="send-button md-accent md-raised" ng-disabled="companyForm.$invalid || companyForm.$pristine" aria-label="SAVE" translate="CONTACTMANAGER.SAVE" translate-attr-aria-label="CONTACTMANAGER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newCompany" ng-click="vm.addNewCompany()" class="send-button md-accent md-raised" ng-disabled="companyForm.$invalid" aria-label="ADD" translate="CONTACTMANAGER.ADD_COMPANY" translate-attr-aria-label="CONTACTMANAGER.ADD_COMPANY">\n                    ADD COMPANY\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newCompany" ng-click="vm.deleteCompany($event)" aria-label="DELETE" translate translate-attr-aria-label="CONTACTMANAGER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CONTACTMANAGER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/companies/edit/view.html",'<div id="contactmanager-company" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-companies-button md-icon-button" aria-label="Go to companies" ng-click="vm.gotoCompanies()" translate translate-attr-aria-label="CONTACTMANAGER.GO_TO_COMPANIES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="company-image" hide-xs>\n                    <img ng-src="assets/images/business/companies.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.company.id}}\n                        <span ng-if="vm.company.name">{{vm.company.name}}</span>\n                        <span ng-if="vm.company.exten">{{vm.company.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="CONTACTMANAGER.CREATED_AT"></span> <span>{{vm.company.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.gotogoto(vm.company, $event)" class="md-fab md-warn md-icon-button" aria-label="goto">\n                <md-tooltip><span translate="CONTACTMANAGER.GOTO_COMPANY"></span></md-tooltip>\n                <md-icon md-font-icon="icon-forward"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveCompany()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (addressForm.$invalid) || (shipmentAddressForm.$invalid)" translate="CONTACTMANAGER.SAVE" translate-attr-aria-label="CONTACTMANAGER.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CONTACTMANAGER.GENERAL">GENERAL</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="company-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="CONTACTMANAGER.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.company.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.PHONE">Phone</label>\n                                <input type="text" name="phone" ng-model="vm.company.phone">\n                                <div ng-messages="generalForm[\'phone\'].$error" ng-show="generalForm[\'phone\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.PHONE_REQUIRED">Phone field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.VAT">Vat</label>\n                                <input type="text" name="vat" ng-model="vm.company.vat">\n                                <div ng-messages="generalForm[\'vat\'].$error" ng-show="generalForm[\'vat\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.VAT_REQUIRED">Vat field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.FAX">Fax</label>\n                                <input type="text" name="fax" ng-model="vm.company.fax">\n                                <div ng-messages="generalForm[\'fax\'].$error" ng-show="generalForm[\'fax\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.FAX_REQUIRED">Fax field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.COMPANYID">CompanyId</label>\n                                <input type="text" name="companyId" ng-model="vm.company.companyId">\n                                <div ng-messages="generalForm[\'companyId\'].$error" ng-show="generalForm[\'companyId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.COMPANYID_REQUIRED">CompanyId field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.TYPE">Type</label>\n                                <input type="text" name="type" ng-model="vm.company.type">\n                                <div ng-messages="generalForm[\'type\'].$error" ng-show="generalForm[\'type\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.WEBSITE">Website</label>\n                                <input type="text" name="website" ng-model="vm.company.website" md-maxlength="255">\n                                <div ng-messages="generalForm[\'website\'].$error" ng-show="generalForm[\'website\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.WEBSITE_REQUIRED">Website field is required</span>\n                                    </div>\n\n                                    <div ng-message="md-maxlength">\n                                        <span translate="CONTACTMANAGER.ERRORS.WEBSITE_MAX_LENGTH" translate-values=\'{max: 255}\'>Website must have a maximum length equal to 255</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.EMAIL_DOMAIN">Email_Domain</label>\n                                <input type="text" name="emailDomain" ng-model="vm.company.emailDomain">\n                                <div ng-messages="generalForm[\'emailDomain\'].$error" ng-show="generalForm[\'emailDomain\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.EMAIL_DOMAIN_REQUIRED">Email_Domain field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.EMAIL">Email</label>\n                                <input type="email" name="email" ng-model="vm.company.email">\n                                <div ng-messages="generalForm[\'email\'].$error" ng-show="generalForm[\'email\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                                    </div>\n                                    <div ng-message="email">\n                                        <span translate="CONTACTMANAGER.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.company.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CONTACTMANAGER.ADDRESS">ADDRESS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="company-detail-form-container address md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="CONTACTMANAGER.ADDRESS">ADDRESS</div>\n                        </div>\n                        <form name="addressForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.STREET">Street</label>\n                                <input type="text" name="street" ng-model="vm.company.street" autofocus>\n                                <div ng-messages="addressForm[\'street\'].$error" ng-show="addressForm[\'street\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.STREET_REQUIRED">Street field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.POSTAL_CODE">Postal_Code</label>\n                                <input type="text" name="postalCode" ng-model="vm.company.postalCode">\n                                <div ng-messages="addressForm[\'postalCode\'].$error" ng-show="addressForm[\'postalCode\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.POSTAL_CODE_REQUIRED">Postal_Code field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.CITY">City</label>\n                                <input type="text" name="city" ng-model="vm.company.city">\n                                <div ng-messages="addressForm[\'city\'].$error" ng-show="addressForm[\'city\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.CITY_REQUIRED">City field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.COUNTRY">Country</label>\n                                <input type="text" name="country" ng-model="vm.company.country">\n                                <div ng-messages="addressForm[\'country\'].$error" ng-show="addressForm[\'country\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.COUNTRY_REQUIRED">Country field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CONTACTMANAGER.SHIPMENTADDRESS">SHIPMENTADDRESS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="company-detail-form-container shipmentaddress md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="CONTACTMANAGER.SHIPMENTADDRESS">SHIPMENTADDRESS</div>\n                        </div>\n                        <form name="shipmentAddressForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.STREET">Street</label>\n                                <input type="text" name="sStreet" ng-model="vm.company.sStreet" autofocus>\n                                <div ng-messages="shipmentAddressForm[\'sStreet\'].$error" ng-show="shipmentAddressForm[\'sStreet\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.STREET_REQUIRED">Street field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.POSTAL_CODE">Postal_Code</label>\n                                <input type="text" name="sPostalCode" ng-model="vm.company.sPostalCode">\n                                <div ng-messages="shipmentAddressForm[\'sPostalCode\'].$error" ng-show="shipmentAddressForm[\'sPostalCode\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.POSTAL_CODE_REQUIRED">Postal_Code field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.CITY">City</label>\n                                <input type="text" name="sCity" ng-model="vm.company.sCity">\n                                <div ng-messages="shipmentAddressForm[\'sCity\'].$error" ng-show="shipmentAddressForm[\'sCity\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.CITY_REQUIRED">City field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.COUNTRY">Country</label>\n                                <input type="text" name="sCountry" ng-model="vm.company.sCountry">\n                                <div ng-messages="shipmentAddressForm[\'sCountry\'].$error" ng-show="shipmentAddressForm[\'sCountry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.COUNTRY_REQUIRED">Country field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/contactmanager/views/contacts/contacts.html",'<div id="contacts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-account-multiple" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="CONTACTMANAGER.CONTACTS">Contacts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        \x3c!-- SEARCH --\x3e\n        <div class="search-input-wrapper" layout="row" layout-align="start center">\n            <label for="search">\n                <md-icon md-font-icon="icon-magnify"></md-icon>\n            </label>\n            <md-input-container md-no-float class="m-0">\n                <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="CONTACTMANAGER.SEARCH_FOR_ANYONE">\n            </md-input-container>\n        </div>\n        \x3c!-- / SEARCH --\x3e\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedContacts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedContacts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="CONTACTMANAGER.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-contacts-count">\n                    <span>{{vm.selectedContacts.length}}</span>\n                <span translate="CONTACTMANAGER.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="CONTACTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllContacts()" translate="CONTACTMANAGER.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectContacts()" translate="CONTACTMANAGER.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedContacts" csv-label="true" filename="contacts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm.deleteSelectedContacts($event)" aria-label="delete selected" translate translate-attr-label="CONTACTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n            <div layout="row">\n                <div class="column" flex="20">\n                    <md-card>\n                        <md-card-content>\n                            <button layout-align="center center" md-mini-fab ng-click="vm.selectedList = null; vm.selectedCompany = null; vm.selectedTags = []"><md-icon md-font-icon="icon-refresh"></md-icon>{{ \'CONTACTMANAGER.ALL_CONTACTS\' | translate }}</button>\n                        </md-card-content>\n                    </md-card>\n                    <md-card>\n                        <md-card-content>\n                            <md-input-container class="md-block" flex-gt-sm="">\n                                <label translate="CONTACTMANAGER.SELECT_LIST">Select a list</label>\n                                <md-select placeholder="Select a list" ng-model="vm.selectedList">\n                                    <md-optgroup label="Lists">\n                                        <md-option ng-value="null"><em translate="CONTACTMANAGER.NONE">None</em></md-option>\n                                        <md-option ng-value="list.id" ng-repeat="list in vm.lists.rows">{{list.name}}</md-option>\n                                    </md-optgroup>\n                                </md-select>\n                            </md-input-container>\n                        </md-card-content>\n                    </md-card>\n                    <md-card>\n                        <md-card-content>\n                            <md-input-container class="md-block" flex-gt-sm="">\n                                <label translate="CONTACTMANAGER.SELECT_COMPANY">Select a company</label>\n                                <md-select placeholder="Select a companie" flex="100" ng-model="vm.selectedCompany">\n                                    <md-optgroup label="Companies">\n                                        <md-option ng-value="null"><em translate="CONTACTMANAGER.NONE">None</em></md-option>\n                                        <md-option ng-value="company.id" ng-repeat="company in vm.companies.rows">{{company.name}}</md-option>\n                                    </md-optgroup>\n                                </md-select>\n                            </md-input-container>\n\n                        </md-card-content>\n                    </md-card>\n                    <md-card>\n                        <md-card-content>\n                            <md-input-container class="md-block" flex-gt-sm="">\n                                <label translate="CONTACTMANAGER.SELECT_TAGS">Select one or more tags</label>\n                                <md-select placeholder="Select one or more tags" flex="100" ng-model="vm.selectedTags" multiple>\n                                    <md-optgroup label="Tags">\n                                        <md-option ng-value="tag.name" ng-repeat="tag in vm.tags.rows">{{tag.name}}</md-option>\n                                    </md-optgroup>\n                                </md-select>\n                            </md-input-container>\n                        </md-card-content>\n                    </md-card>\n                </div>\n\n\n                \x3c!-- USER TABLE --\x3e\n                <md-card flex="80">\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm.selectedContacts" md-progress="vm.promise">\n                            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getContacts">\n                                <tr md-row>\n                                    <th md-column md-order-by="id">ID</th>\n                                    <th md-column md-order-by="firstName">{{\'CONTACTMANAGER.FULLNAME\' | translate}}</th>\n                                    <th md-column md-order-by="phone">{{\'CONTACTMANAGER.PHONE\' | translate}}</th>\n                                    <th md-column md-order-by="email">{{\'CONTACTMANAGER.EMAIL\' | translate}}</th>\n                                    <th md-column md-order-by="ListId">{{\'CONTACTMANAGER.LIST\' | translate}}</th>\n                                    <th md-column md-order-by="CompanyId">{{\'CONTACTMANAGER.COMPANY\' | translate}}</th>\n                                    <th md-column md-order-by="tags">{{\'CONTACTMANAGER.TAGS\' | translate}}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row ng-hide="vm.contacts.rows.length">\n                                    <td md-cell colspan="6">\n                                        <div layout="row" layout-align="center center">\n                                            <span tranlsate="CONTACTMANAGER.NO_AVAILABLE_INFO">No Available Info</span>\n                                        </div>\n                                    </td>\n                                </tr>\n                                <tr md-row md-select="contact" md-select-id="id" ng-repeat="contact in vm.contacts.rows">\n                                    <td ng-click="vm.createOrEditContact($event, contact)" md-cell class="id">{{contact.id}}</td>\n                                    <td ng-click="vm.createOrEditContact($event, contact)" md-cell class="firstName">{{contact.firstName}} {{contact.lastName}}</td>\n                                    <td ng-click="vm.createOrEditContact($event, contact)" md-cell class="phone">{{contact.phone}}</td>\n                                    <td ng-click="vm.createOrEditContact($event, contact)" md-cell class="email">{{contact.email}}</td>\n                                    <td ng-click="vm.createOrEditContact($event, contact)" md-cell class="list">{{vm.listsMap[contact.ListId]}}</td>\n                                    <td ng-click="vm.createOrEditContact($event, contact)" md-cell class="company">{{vm.companiesMap[contact.CompanyId]}}</td>\n                                    <td md-cell class="tags">\n                                        <div ng-if="contact.tags.length">\n                                            <md-tooltip md-direction="left" layout="row">\n                                                <span ng-repeat="tag in contact.tags">{{tag}}<span ng-if="!$last">, </span></span>\n                                            </md-tooltip>\n                                            <md-icon md-font-icon="icon-tag"></md-icon>\n                                        </div>\n                                    </td>\n                                    <td md-cell class="actions">\n                                        <md-menu>\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CONTACTMANAGER.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm.editdialog(contact, ev)" translate="CONTACTMANAGER.EDIT_CONTACT">\n                                                        Edit Contact\n                                                    </md-button>\n                                                </md-menu-item>\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm.mergeContact(ev, contact)" translate="CONTACTMANAGER.MERGE_CONTACT">\n                                                        Merge Contact\n                                                    </md-button>\n                                                </md-menu-item>\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm.duplicateContact(ev, contact)" translate="CONTACTMANAGER.DUPLICATE_CONTACT">\n                                                        Duplicate Contact\n                                                    </md-button>\n                                                </md-menu-item>\n                                                <md-menu-divider></md-menu-divider>\n                                                <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                    <md-button ng-click="vm.deleteconfirm(contact, ev)" translate="CONTACTMANAGER.DELETE_CONTACT">\n                                                        Delete Contact\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n\n                    <md-table-pagination md-label="{page: \'{{\'CONTACTMANAGER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CONTACTMANAGER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CONTACTMANAGER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                        md-page="vm.query.page" md-total="{{vm.contacts.count}}" md-on-paginate="vm.getContacts" md-page-select></md-table-pagination>\n                </md-card>\n                \x3c!-- / USER TABLE --\x3e\n            </div>\n        </div>\n        \x3c!-- / MAIN --\x3e\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD USER BUTTON --\x3e\n    <md-fab-speed-dial id="add-contact-button" ng-hide="vm.options.hidden" md-direction="up" md-open="vm.options.isOpen" class="md-scale md-fab" ng-class="{ \'md-hover-full\': vm.options.hover }" ng-mouseenter="vm.options.isOpen=true" ng-mouseleave="vm.options.isOpen=false">\n        <md-fab-trigger>\n            <md-button aria-label="menu" class="md-fab md-accent">\n                <md-icon md-font-icon="icon-plus"></md-icon>\n            </md-button>\n        </md-fab-trigger>\n        <md-fab-actions>\n            \x3c!-- OLD IMPORT --\x3e\n            \x3c!-- <md-button class="md-fab md-mini md-warn" ng-click="vm.uploadContacts($event)" aria-label="add contact" translate translate-attr-aria-label="CONTACTMANAGER.UPLOAD_CSV">\n                <md-tooltip md-direction="left" md-visible="tooltipVisible" md-autohide="false">\n                    {{\'CONTACTMANAGER.UPLOAD_CSV\' | translate}}\n                </md-tooltip>\n                <md-icon md-font-icon="icon-upload"></md-icon>\n            </md-button> --\x3e\n            \x3c!-- NEW IMPORT --\x3e\n            <md-button class="md-fab md-mini md-warn" flow-btn flow-init="vm.ngFlowOptions" flow-files-submitted="$flow.upload()" flow-file-success="vm.importContacts($file, $message, $flow)" flow-file-added="!!{csv:1}[$file.getExtension()]" aria-label="Select File"\n                translate translate-attr-aria-label="CONTACTMANAGER.IMPORT_CONTACTS">\n                <md-tooltip md-direction="left" md-visible="tooltipVisible" md-autohide="false">\n                    {{\'CONTACTMANAGER.IMPORT_CONTACTS\' | translate}}\n                </md-tooltip>\n                <md-icon md-font-icon="icon-upload"></md-icon>\n            </md-button>\n            <md-button class="md-fab md-mini md-accent" ng-click="vm.createOrEditContact($event)" aria-label="add contact" translate translate-attr-aria-label="CONTACTMANAGER.ADD_CONTACT">\n                <md-tooltip md-direction="left" md-visible="tooltipVisible" md-autohide="false">\n                    {{\'CONTACTMANAGER.ADD_CONTACT\' | translate}}\n                </md-tooltip>\n                <md-icon md-font-icon="icon-account-plus"></md-icon>\n            </md-button>\n        </md-fab-actions>\n    </md-fab-speed-dial>\n    \x3c!-- / ADD USER BUTTON --\x3e\n</div>'),e.put("app/main/apps/contactmanager/views/contacts/create/dialog.html",'<md-dialog class="cm-contact-dialog" aria-label="New Contact">\n    <form name="contactForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.FIRSTNAME">First name</label>\n                <input name="firstName" ng-model="vm.contact.firstName" required md-autofocus>\n\n                <div ng-messages="contactForm.firstName.$error" ng-show="contactForm.firstName.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.FIRSTNAME_REQUIRED">First name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.LASTNAME">Last name</label>\n                <input name="lastName" ng-model="vm.contact.lastName">\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.PHONE">Phone</label>\n                <input name="phone" ng-model="vm.contact.phone" required>\n\n                <div ng-messages="contactForm.phone.$error" ng-show="contactForm.phone.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.PHONE_REQUIRED">Phone field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.EMAIL">Email</label>\n                <input name="email" type="email" ng-model="vm.contact.email">\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.MOBILE">Mobile</label>\n                <input name="mobile" ng-model="vm.contact.mobile">\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.FAX">Fax</label>\n                <input name="fax" ng-model="vm.contact.fax">\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.LIST">List</label>\n                <md-select name="list" ng-model="vm.contact.ListId" ng-disabled="vm.contact.id && vm.contact.ListId" ng-init="vm.getCustomFields(vm.contact.ListId)" ng-change="vm.getCustomFields(vm.contact.ListId)" required>\n                    <md-optgroup label="Lists">\n                        <md-option ng-value="list.id" ng-repeat="list in vm.lists.rows">{{list.name}}</md-option>\n                        <md-option ng-value="null"><em translate="CONTACTMANAGER.NONE">None</em></md-option>\n                    </md-optgroup>\n                </md-select>\n\n                <div ng-messages="contactForm.list.$error" ng-show="contactForm.list.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.LIST_REQUIRED">List field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div ng-repeat="customField in vm.customFields.rows" class="md-block" ng-switch="customField.type">\n                <div ng-switch-when="datetime">\n                    <label>{{customField.alias}}</label>\n\n                    <div ng-init="vm.contact[\'cf_\' + customField.id] = vm.getDateFromString(vm.contact[\'cf_\' + customField.id])">\n                        <mdp-date-picker mdp-open-on-click ng-required="customField.required" mdp-format="YYYY-MM-DD" ng-model="vm.contact[\'cf_\' + customField.id]"></mdp-date-picker>\n                        <mdp-time-picker mdp-open-on-click mdp-placeholder="Time" ng-required="customField.required" mdp-format="HH:mm:ss" mdp-auto-switch="true" ng-model="vm.contact[\'cf_\' + customField.id]"></mdp-time-picker>\n                    </div>\n                </div>\n\n                <div ng-switch-when="select">\n                    <label>{{customField.alias}}</label>\n\n                    <md-select ng-model="vm.contact[\'cf_\' + customField.id]" ng-required="customField.required">\n                        <md-option ng-repeat="value in customField.values" ng-value="value.value">{{value.value}}</md-option>\n                        <md-option ng-value="null"><em translate="CONTACTMANAGER.NONE">None</em></md-option>\n                    </md-select>\n                </div>\n\n                <div ng-switch-when="switch">\n                    <md-switch aria-label="{{customField.alias}}" ng-model="vm.contact[\'cf_\' + customField.id]" ng-true-value="1" ng-false-value="0">\n                        {{customField.alias}}\n                    </md-switch>\n                </div>\n\n                <md-input-container ng-switch-default>\n                    <label>{{customField.alias}}</label>\n\n                    <input type="{{customField.type}}" ng-model="vm.contact[\'cf_\' + customField.id]" ng-required="customField.required">\n                </md-input-container>\n            </div>\n\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.COMPANY">Company</label>\n                <md-select name="company" ng-model="vm.contact.CompanyId">\n                    <md-optgroup label="Companies">\n                        <md-option ng-value="company.id" ng-repeat="company in vm.companies.rows">{{company.name}}</md-option>\n                    </md-optgroup>\n                </md-select>\n            </md-input-container>\n\n            <div ng-if="!vm.allFields" layout="row" layout-align="center center">\n                <md-button class="md-accent" ng-click="vm.allFields = true" translate="CONTACTMANAGER.SHOW_ALL_FIELDS">Show All Fields</md-button>\n            </div>\n\n            <md-input-container class="md-block" ng-if="vm.allFields" flex-gt-sm="" ng-init="vm.contact.dateOfBirth = vm.getDateFromString(vm.contact.dateOfBirth)">\n                <label translate="CONTACTMANAGER.DATE_OF_BIRTH">Date of Birth</label>\n                <mdp-date-picker mdp-open-on-click mdp-format="YYYY-MM-DD" name="dateOfBirth" ng-model="vm.contact.dateOfBirth"></mdp-date-picker>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.allFields">\n                <label translate="CONTACTMANAGER.COUNTRY">Country</label>\n                <input type="text" name="country" ng-model="vm.contact.country">\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.allFields">\n                <label translate="CONTACTMANAGER.CITY">City</label>\n                <input type="text" name="city" ng-model="vm.contact.city">\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.allFields">\n                <label translate="CONTACTMANAGER.STREET">Street</label>\n                <input type="text" name="street" ng-model="vm.contact.street">\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.allFields">\n                <label translate="CONTACTMANAGER.POSTAL_CODE">Postal Code</label>\n                <input type="text" name="postalCode" ng-model="vm.contact.postalCode">\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.allFields">\n                <label translate="CONTACTMANAGER.NOTES">Notes</label>\n                <input type="text" name="description" ng-model="vm.contact.description">\n            </md-input-container>\n\n            <div ng-if="vm.allFields" layout="row" layout-align="center center">\n                <md-button class="md-accent" ng-click="vm.allFields = false" translate="CONTACTMANAGER.FEWER_FIELDS">Fewer Fields</md-button>\n            </div>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newContact" ng-click="vm.saveContact()" class="send-button md-accent md-raised" ng-disabled="contactForm.$invalid || contactForm.$pristine" aria-label="SAVE" translate="CONTACTMANAGER.SAVE" translate-attr-aria-label="CONTACTMANAGER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newContact" ng-click="vm.addNewContact()" class="send-button md-accent md-raised" ng-disabled="contactForm.$invalid || contactForm.$pristine" aria-label="ADD" translate="CONTACTMANAGER.ADD_CONTACT" translate-attr-aria-label="CONTACTMANAGER.ADD_CONTACT">\n                    ADD CONTACT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newContact" ng-click="vm.deleteContact($event)" aria-label="DELETE" translate translate-attr-aria-label="CONTACTMANAGER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CONTACTMANAGER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/contacts/duplicate/dialog.html",'<md-dialog class="cm-contact-dialog" aria-label="{{ \'CONTACTMANAGER.DUPLICATE_CONTACT\' | translate }}">\n    <form name="contactForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.LIST">List</label>\n                <md-select name="list" ng-model="vm.contact.ListId">\n                    <md-optgroup label="Lists">\n                        <md-option ng-value="list.id" ng-repeat="list in vm.lists.rows">{{list.name}}</md-option>\n                    </md-optgroup>\n                </md-select>\n\n                <div ng-messages="contactForm.list.$error" ng-show="contactForm.list.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.LIST_REQUIRED">List field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.addNewContact()" class="send-button md-accent md-raised" ng-disabled="contactForm.$invalid" aria-label="ADD" translate="CONTACTMANAGER.ADD_CONTACT" translate-attr-aria-label="CONTACTMANAGER.ADD_CONTACT">\n                    ADD CONTACT\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/contacts/edit/hoppers/dialog.html",'<md-dialog class="hopper-dialog" aria-label="New Hopper">\n    <form name="hopperForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <div flex class="md-block">\n                <mdp-date-picker mdp-open-on-click name="scheduledatDate" mdp-placeholder="Date" mdp-format="YYYY-MM-DD" ng-model="vm.hopper.scheduledat" ng-init="vm.hopper.scheduledat = vm.getDateFromString(vm.hopper.scheduledat)">\n                    <div ng-messages="hopperForm.dateRangeFrom.$error" ng-show="hopperForm.dateRangeFrom.$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="CONTACTMANAGER.ERRORS.DATE_REQUIRED">Date is required</span>\n                        </div>\n                        <div ng-message="format">\n                            <span translate="CONTACTMANAGER.ERRORS.DATE_INVALID">Date is invalid</span>\n                        </div>\n                    </div>\n                </mdp-date-picker>\n            </div>\n\n            <div flex class="md-block">\n                <mdp-time-picker mdp-open-on-click name="scheduledatTime" mdp-placeholder="Time" mdp-format="HH:mm:ss" mdp-auto-switch="true" ng-model="vm.hopper.scheduledat" ng-init="vm.hopper.scheduledat = vm.getDateFromString(vm.hopper.scheduledat)">\n                    <div ng-messages="hopperForm.timeRangeFrom.$error" ng-show="hopperForm.timeRangeFrom.$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="CONTACTMANAGER.ERRORS.TIME_REQUIRED">Time is required</span>\n                        </div>\n                        <div ng-message="format">\n                            <span translate="CONTACTMANAGER.ERRORS.TIME_INVALID">Time is invalid</span>\n                        </div>\n                    </div>\n                </mdp-time-picker>\n            </div>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newHopper" ng-click="vm.saveHopper()" class="send-button md-accent md-raised" ng-disabled="hopperForm.$invalid || hopperForm.$pristine" aria-label="SAVE" translate="CONTACTMANAGER.SAVE" translate-attr-aria-label="CONTACTMANAGER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newHopper" ng-click="vm.addNewHopper()" class="send-button md-accent md-raised" ng-disabled="hopperForm.$invalid" aria-label="ADD" translate="CONTACTMANAGER.ADD_HOPPER" translate-attr-aria-label="CONTACTMANAGER.ADD_HOPPER">\n                    ADD HOPPER\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newHopper" ng-click="vm.deleteHopper($event)" aria-label="DELETE" translate translate-attr-aria-label="CONTACTMANAGER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CONTACTMANAGER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/contacts/edit/view.html",'<div id="cm-contact" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-contacts-button md-icon-button" aria-label="Go to contacts" ng-click="vm.gotoContacts()" translate translate-attr-aria-label="CONTACTMANAGER.GO_TO_CONTACTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="contact-image" hide-xs>\n                    <img ng-src="assets/images/business/contacts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.contact.id}} {{vm.contact.firstName}} {{vm.contact.lastName}}\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="CONTACTMANAGER.CREATED_AT"></span> <span>{{vm.contact.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div ng-if="vm.contact.role && vm.contact.role !== \'admin\'" ng-controller="ContactQueueAddButtonController as vm_contact_qa" ng-cloak>\n            <md-fab-speed-dial ng-hide="vm_contact_qa.hidden" md-direction="left" md-open="vm_contact_qa.isOpen" class="md-scale md-fab" ng-class="{ \'md-hover-full\': vm_contact_qa.hover }" ng-mouseenter="vm_contact_qa.isOpen=true" ng-mouseleave="vm_contact_qa.isOpen=false">\n                <md-fab-trigger>\n                    <md-button aria-label="menu" class="md-fab md-primary md-icon-button">\n                        <md-tooltip md-direction="top" md-visible="tooltipVisible">Channels</md-tooltip>\n                        <md-icon md-font-icon="icon-eye" aria-label="channels"></md-icon>\n                    </md-button>\n                </md-fab-trigger>\n                <md-fab-actions>\n                    <div ng-repeat="channel in vm_contact_qa.channels">\n                        <md-button aria-label="{{channel.name}}" class="md-fab md-raised md-icon-button md-mini" ng-click="vm_contact_qa.openDialog($event, vm.contact, channel)">\n                            <md-tooltip md-direction="{{channel.direction}}" md-visible="tooltipVisible" md-autohide="false">\n                                {{channel.name}}\n                            </md-tooltip>\n                            <md-icon md-font-icon="{{channel.icon}}" aria-label="{{channel.name}}"></md-icon>\n                        </md-button>\n                    </div>\n                </md-fab-actions>\n            </md-fab-speed-dial>\n        </div>\n\n        <div>\n            <md-button ng-click="vm.duplicateContact($event)" class="md-fab md-warn md-icon-button" aria-label="DUPLICATE">\n                <md-icon md-font-icon="icon-file-multiple"></md-icon>\n            </md-button>\n            <md-button type="submit" ng-click="vm.saveContact()" class="send-button md-accent md-raised" ng-disabled="detailForm.$pristine && customFieldsForm.$pristine" translate="CONTACTMANAGER.SAVE" translate-attr-aria-label="CONTACTMANAGER.SAVE">\n                SAVE\n            </md-button>\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CONTACTMANAGER.DETAIL">DETAIL</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div layout="row">\n                        <div layout="column" flex="70">\n                            <md-card class="contact-detail-form-container personal_info md-background-bg md-whiteframe-1dp">\n                                <div class="pb-16" layout="row" layout-align="start center">\n                                    <div class="h2 secondary-text text-truncate" translate="CONTACTMANAGER.PERSONAL_INFO">PERSONAL_INFO</div>\n                                </div>\n                                <form name="detailForm" novalidate>\n                                    <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                        \x3c!-- fistName --\x3e\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="CONTACTMANAGER.FIRSTNAME">First Name</label>\n                                            <md-icon md-font-icon="icon-account" class="firstname"></md-icon>\n                                            <input type="text" name="firstName" ng-model="vm.contact.firstName" class="text-truncate" required>\n\n                                            <div ng-messages="detailForm.firstName.$error" ng-show="detailForm.firstName.$touched" role="alert">\n                                                <div ng-message="required">\n                                                    <span translate="CONTACTMANAGER.ERRORS.FIRSTNAME_REQUIRED">First name field is required</span>\n                                                </div>\n                                            </div>\n                                        </md-input-container>\n                                        <div flex="5"></div>\n                                        \x3c!-- lastName --\x3e\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="CONTACTMANAGER.LASTNAME">Last Name</label>\n                                            <input type="text" name="lastName" ng-model="vm.contact.lastName" class="text-truncate">\n                                        </md-input-container>\n\n                                    </div>\n\n                                    <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                        \x3c!-- phone --\x3e\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="CONTACTMANAGER.PHONE">Phone</label>\n                                            <md-icon md-font-icon="icon-phone"></md-icon>\n                                            <input type="text" name="phone" ng-model="vm.contact.phone" class="text-truncate" required>\n\n                                            <div ng-messages="detailForm.phone.$error" ng-show="detailForm.phone.$touched" role="alert">\n                                                <div ng-message="required">\n                                                    <span translate="CONTACTMANAGER.ERRORS.PHONE_REQUIRED">Phone name field is required</span>\n                                                </div>\n                                            </div>\n                                        </md-input-container>\n                                        <div flex="5"></div>\n                                        \x3c!-- mobile --\x3e\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="CONTACTMANAGER.MOBILE">Mobile</label>\n                                            <md-icon md-font-icon="icon-cellphone-iphone"></md-icon>\n                                            <input type="text" name="mobile" ng-model="vm.contact.mobile" class="text-truncate">\n                                        </md-input-container>\n                                    </div>\n\n                                    <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                        \x3c!-- email --\x3e\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="CONTACTMANAGER.EMAIL">Email</label>\n                                            <md-icon md-font-icon="icon-email" class="email"></md-icon>\n                                            <input type="email" name="email" ng-model="vm.contact.email" class="text-truncate">\n                                            <div ng-messages="detailForm.firstName.$error" ng-show="detailForm.firstName.$touched" role="alert">\n                                                <div ng-message="email">\n                                                    <span translate="CONTACTMANAGER.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                                                </div>\n                                            </div>\n                                        </md-input-container>\n                                        <div flex="5"></div>\n                                        \x3c!-- fax --\x3e\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="CONTACTMANAGER.FAX">Fax</label>\n                                            <md-icon md-font-icon="icon-deskphone"></md-icon>\n                                            <input type="text" name="fax" ng-model="vm.contact.fax">\n                                        </md-input-container>\n                                    </div>\n\n                                    <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                        \x3c!-- date of birdth --\x3e\n                                        \x3c!-- <md-input-container class="md-block" flex-gt-sm="">\n                                      <mdp-date-picker mdp-open-on-click name="dateOfBirth" mdp-placeholder="Date Of Birth" mdp-format="YYYY-MM-DD" ng-model="vm.contact.dateOfBirth">\n                                          <div ng-messages="detailForm.dateOfBirth.$error" ng-show="reportForm.dateOfBirth.$touched" role="alert">\n                                              <div ng-message="format">\n                                                  <span translate="CONTACTMANAGER.ERRORS.DATE_OF_RANGE_FROM_INVALID">Date Range From field is invalid</span>\n                                              </div>\n                                          </div>\n                                      </mdp-date-picker>\n                                    </md-input-container> --\x3e\n\n                                        <md-input-container class="md-block" flex-gt-sm="" ng-init="vm.contact.dateOfBirth = vm.getDateFromString(vm.contact.dateOfBirth)">\n                                            <label translate="CONTACTMANAGER.DATE_OF_BIRTH">Date of Birth</label>\n                                            <mdp-date-picker mdp-open-on-click mdp-format="YYYY-MM-DD" name="dateOfBirth" ng-model="vm.contact.dateOfBirth"></mdp-date-picker>\n                                        </md-input-container>\n                                    </div>\n\n                                    <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                        <md-input-container ng-if="vm.companies.rows.length" class="md-block" flex-gt-sm="">\n                                            <label translate="CONTACTMANAGER.COMPANY">Company</label>\n                                            <md-icon md-font-icon="icon-domain"></md-icon>\n                                            <md-select name="company" ng-model="vm.contact.CompanyId">\n                                                <md-optgroup label="Companies">\n                                                    <md-option ng-value="company.id" ng-repeat="company in vm.companies.rows">{{company.name}}</md-option>\n                                                    <md-option ng-value="null"><em translate="CONTACTMANAGER.NONE">None</em></md-option>\n                                                </md-optgroup>\n                                            </md-select>\n                                            <md-icon class="pointer" ng-show="vm.contact.CompanyId" md-font-icon="icon-information-outline" ng-click="vm.editCompany($event, vm.contact.CompanyId)"></md-icon>\n                                        </md-input-container>\n                                        <section ng-if="!vm.companies.rows.length" flex-gt-sm="">\n                                            <md-icon md-font-icon="icon-briefcase"></md-icon>\n                                            <label translate="CONTACTMANAGER.NO_COMPANIES">No Companies</label>\n                                            <md-button class="md-accent" translate="CONTACTMANAGER.ADD_COMPANY">Add Company</md-button>\n                                        </section>\n                                    </div>\n\n                                    <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                        <md-input-container ng-if="vm.tags.rows.length" class="md-block" flex-gt-sm="">\n                                            <label translate="CONTACTMANAGER.TAGS">Tags</label>\n                                            <md-icon md-font-icon="icon-tag"></md-icon>\n                                            <md-select ng-model="vm.contact.tags" multiple>\n                                                <md-optgroup label="Tags">\n                                                    <md-option ng-value="tag.name" ng-repeat="tag in vm.tags.rows">{{tag.name}}</md-option>\n                                                </md-optgroup>\n                                            </md-select>\n                                        </md-input-container>\n                                        <section ng-if="!vm.tags.rows.length" flex-gt-sm="">\n                                            <md-icon md-font-icon="icon-tag"></md-icon>\n                                            <label translate="CONTACTMANAGER.NO_TAGS">No Tags</label>\n                                            <md-button class="md-accent" translate="CONTACTMANAGER.ADD_TAG">Add Tag</md-button>\n                                        </section>\n                                    </div>\n\n                                    <div ng-if="!vm.allFields" layout="row" layout-align="center center">\n                                        <md-button class="md-accent" ng-click="vm.allFields = true" translate="CONTACTMANAGER.SHOW_ALL_FIELDS">Show All Fields</md-button>\n                                    </div>\n\n                                    <div ng-if="vm.allFields">\n                                        <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                            \x3c!-- country --\x3e\n                                            <md-input-container class="md-block" flex-gt-sm="">\n                                                <label translate="CONTACTMANAGER.COUNTRY">Country</label>\n                                                <md-icon md-font-icon="icon-home" class="country"></md-icon>\n                                                <input type="text" name="country" ng-model="vm.contact.country" class="text-truncate">\n                                            </md-input-container>\n                                            <div flex="5"></div>\n                                            \x3c!-- city --\x3e\n                                            <md-input-container class="md-block" flex-gt-sm="">\n                                                <label translate="CONTACTMANAGER.CITY">City</label>\n                                                <input type="text" name="city" ng-model="vm.contact.city">\n                                            </md-input-container>\n                                        </div>\n\n                                        <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                            <div flex="5"></div>\n                                            \x3c!-- street --\x3e\n                                            <md-input-container class="md-block" flex-gt-sm="">\n                                                <label translate="CONTACTMANAGER.STREET">Street</label>\n                                                <input type="text" name="street" ng-model="vm.contact.street">\n                                            </md-input-container>\n                                            <div flex="5"></div>\n                                            \x3c!-- postalCode --\x3e\n                                            <md-input-container class="md-block" flex-gt-sm="">\n                                                <label translate="CONTACTMANAGER.POSTALCODE">Postal Code</label>\n                                                <input type="text" name="postalCode" ng-model="vm.contact.postalCode">\n                                            </md-input-container>\n                                        </div>\n\n                                        <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                            <md-input-container class="md-block" flex-gt-sm="">\n                                                <label translate translate-attr-placeholder="CONTACTMANAGER.NOTES">Notes</label>\n                                                <md-icon md-font-icon="icon-note"></md-icon>\n                                                <textarea ng-model="vm.contact.description" type="text" max-rows="4"></textarea>\n                                            </md-input-container>\n                                        </div>\n\n                                        <div layout="row" layout-align="center center">\n                                            <md-button class="md-accent" ng-click="vm.allFields = false" translate="CONTACTMANAGER.FEWER_FIELDS">Fewer Fields\n                                            </md-button>\n                                        </div>\n\n                                    </div>\n                                </form>\n                            </md-card>\n                            <md-card class="contact-detail-form-container personal_info md-background-bg md-whiteframe-1dp">\n                                <div class="pb-16" layout="row" layout-align="start center">\n                                    <div class="h2 secondary-text text-truncate" translate="CONTACTMANAGER.SOCIAL">Social</div>\n                                </div>\n                                <form name="socialForm" novalidate>\n                                    <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                        \x3c!-- fistName --\x3e\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label>Facebook</label>\n                                            <md-icon md-font-icon="icon-facebook" class="facebook"></md-icon>\n                                            <input type="text" name="facebook" ng-model="vm.contact.facebook" class="text-truncate">\n                                        </md-input-container>\n                                        <div flex="5"></div>\n                                        \x3c!-- lastName --\x3e\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label>Twitter</label>\n                                            <md-icon md-font-icon="icon-twitter" class="twitter"></md-icon>\n                                            <input type="text" name="twitter" ng-model="vm.contact.twitter" class="text-truncate">\n                                        </md-input-container>\n\n                                    </div>\n                                </form>\n                            </md-card>\n                        </div>\n\n                        <div flex></div>\n\n                        <div class="contact-detail-form-container personal_info md-background-bg md-whiteframe-1dp" flex="25">\n                            <div class="pb-16" layout="row" layout-align="start center">\n                                <div class="h2 secondary-text text-truncate" translate="CONTACTMANAGER.CUSTOM_FIELDS">CUSTOM FIELDS</div>\n                            </div>\n                            <form name="customFieldsForm" novalidate>\n                                <md-input-container class="md-block">\n                                    <label translate translate-attr-placeholder="CONTACTMANAGER.LIST">List</label>\n                                    <md-select name="list" ng-model="vm.contact.ListId" md-on-close="vm.onSelectList($event)" ng-disabled="vm.contact.ListId">\n                                        <md-optgroup label="Lists">\n                                            <md-option ng-value="list.id" ng-repeat="list in vm.lists.rows">#{{list.id}} - {{list.name}}</md-option>\n                                            <md-option ng-value="null"><em translate="CONTACTMANAGER.NONE">None</em></md-option>\n                                        </md-optgroup>\n                                    </md-select>\n                                </md-input-container>\n                                <div ng-repeat="customField in vm.customFields.rows" ng-switch="customField.type">\n                                    <md-input-container class="md-block" ng-switch-when="datetime">\n                                        <label>{{customField.alias}}</label>\n                                        <div ng-init="vm.contact[\'cf_\' + customField.id] = vm.getDateFromString(vm.contact[\'cf_\' + customField.id])">\n                                            <mdp-date-picker mdp-open-on-click ng-required="customField.required" mdp-format="YYYY-MM-DD" ng-model="vm.contact[\'cf_\' + customField.id]"></mdp-date-picker>\n                                            <mdp-time-picker mdp-open-on-click mdp-placeholder="Time" ng-required="customField.required" mdp-format="HH:mm:ss" mdp-auto-switch="true" ng-model="vm.contact[\'cf_\' + customField.id]"></mdp-time-picker>\n                                        </div>\n                                    </md-input-container>\n\n                                    <md-input-container class="md-block" ng-switch-when="select">\n                                        <label>{{customField.alias}}</label>\n                                        <md-select ng-model="vm.contact[\'cf_\' + customField.id]" ng-required="customField.required">\n                                            <md-option ng-repeat="value in customField.values" ng-value="value.value">{{value.value}}</md-option>\n                                            <md-option ng-value="null"><em translate="CONTACTMANAGER.NONE">None</em></md-option>\n                                        </md-select>\n                                    </md-input-container>\n\n                                    <md-input-container class="md-block" ng-switch-when="switch">\n                                        <md-switch aria-label="{{customField.alias}}" ng-model="vm.contact[\'cf_\' + customField.id]" ng-true-value="1" ng-false-value="0">\n                                            {{customField.alias}}\n                                        </md-switch>\n                                    </md-input-container>\n\n                                    <md-input-container class="md-block" ng-switch-default>\n                                        <label>{{customField.alias}}</label>\n                                        <input type="{{customField.type}}" ng-model="vm.contact[\'cf_\' + customField.id]" ng-required="customField.required">\n                                    </md-input-container>\n                                </div>\n                            </form>\n                        </div>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n\n            <md-tab ng-if="vm.license.dialer">\n                <md-tab-label>\n                    <span translate="CONTACTMANAGER.MOTION_BULL">MOTION BULL</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div layout="row">\n                        <div class="contact-detail-form-container personal_info md-background-bg md-whiteframe-1dp" flex>\n                            <md-toolbar class="md-table-toolbar md-default">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="CONTACTMANAGER.HOPPER">Hopper</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm.queryHopper.filter = query;" on-collapse="vm.queryHopper.filter = undefined;" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm.getHoppers()" aria-label="reload" translate translate-attr-label="CONTACTMANAGER.RELOAD">\n                                        <md-tooltip>{{\'CONTACTMANAGER.RELOAD\' | translate}}</md-tooltip>\n                                        <md-icon md-font-icon="icon-reload"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n\n                            \x3c!-- HOPPER TABLE --\x3e\n                            <md-table-container>\n                                <table md-table multiple md-progress="vm.promise">\n                                    <thead md-head md-order="vm.queryHopper.sort" md-on-reorder="vm.getHoppers">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'CONTACTMANAGER.ID\' | translate }}</th>\n                                            <th md-column md-order-by="phone">{{ \'CONTACTMANAGER.PHONE\' | translate }}</th>\n                                            <th md-column md-order-by="scheduledat">{{ \'CONTACTMANAGER.SCHEDULEDAT\' | translate }}</th>\n                                            <th md-column md-order-by="priority">{{ \'MOTIONDIALER.PRIORITY\' | translate }}</th>\n                                            <th md-column md-order-by="scheduledat">{{ \'CONTACTMANAGER.SCHEDULEDAT\' | translate }}</th>\n                                            <th md-column md-order-by="VoiceQueueId">{{ \'CONTACTMANAGER.VOICEQUEUEID\' | translate }}</th>\n                                            <th md-column md-order-by="CampaignId">{{ \'CONTACTMANAGER.CAMPAIGNID\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row ng-hide="vm.hoppers.count">\n                                            <td md-cell colspan="4">\n                                                <div layout="row" layout-align="center center">\n                                                    <span tranlsate="CONTACTMANAGER.NO_AVAILABLE_INFO">No Available Info</span>\n                                                </div>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-repeat="(id, hopper) in vm.hoppers.rows">\n                                            <td md-cell>{{hopper.id}}</td>\n                                            <td md-cell>{{hopper.phone}}</td>\n                                            <td md-cell>{{hopper.scheduledat | date:\'medium\'}}</td>\n                                            <td md-cell>{{ vm.arraypriority[hopper.priority].option }}</td>\n                                            <td md-cell class="recallme ">\n                                                <md-icon md-colors="{color: {{hopper.recallme ? \'\\\'green\\\'\' : \'\\\'red\\\'\'}}}" md-font-icon="{{hopper.recallme? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                            </td>\n                                            <td md-cell>{{hopper.VoiceQueueId}}</td>\n                                            <td md-cell>{{hopper.CampaignId}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CONTACTMANAGER.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="2">\n                                                        <md-menu-item>\n                                                            <md-button ng-if="hopper.VoiceQueueId" ng-click="vm.editHopper($event, hopper)" translate="CONTACTMANAGER.EDIT_HOPPER">\n                                                                Edit Hopper\n                                                            </md-button>\n                                                            <md-button ng-if="hopper.CampaignId" ng-click="vm.createOrEditIvrCampaignHopper($event, hopper)" translate="CONTACTMANAGER.EDIT_HOPPER">\n                                                                Edit Hopper\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm.deleteconfirm(hopper, $event)" translate="CONTACTMANAGER.DELETE_HOPPER">\n                                                                Delete Hopper\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n\n                            <md-table-pagination md-label="{page: \'{{\'CONTACTMANAGER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CONTACTMANAGER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CONTACTMANAGER.OF\' | translate}}\'}" md-limit="vm.queryHopper.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                                md-page="vm.queryHopper.page" md-total="{{vm.hoppers.count}}" md-on-paginate="vm.getHoppers" md-page-select></md-table-pagination>\n                            \x3c!-- / HOPPER TABLE --\x3e\n                        </div>\n                    </div>\n\n                    <div layout="row">\n                        <div class="contact-detail-form-container personal_info md-background-bg md-whiteframe-1dp" flex>\n                            <md-toolbar class="md-table-toolbar md-default">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="CONTACTMANAGER.FINAL">Final</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm.queryFinal.filter = query;" on-collapse="vm.queryFinal.filter = undefined;" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm.getFinals()" aria-label="reload" translate translate-attr-label="CONTACTMANAGER.RELOAD">\n                                        <md-tooltip>{{\'CONTACTMANAGER.RELOAD\' | translate}}</md-tooltip>\n                                        <md-icon md-font-icon="icon-reload"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n\n                            \x3c!-- HOPPER TABLE --\x3e\n                            <md-table-container>\n                                <table md-table multiple md-progress="vm.promise">\n                                    <thead md-head md-order="vm.queryFinal.sort" md-on-reorder="vm.getFinals">\n                                        <tr md-row>\n                                            <th md-column md-order-by="uniqueid">{{ \'CONTACTMANAGER.UNIQUEID\' | translate }}</th>\n                                            <th md-column md-order-by="calleridnum">{{ \'CONTACTMANAGER.PHONE\' | translate }}</th>\n                                            <th md-column md-order-by="state">{{ \'CONTACTMANAGER.STATE\' | translate }}</th>\n                                            <th md-column md-order-by="starttime">{{ \'CONTACTMANAGER.STARTTIME\' | translate }}</th>\n                                            <th md-column md-order-by="disposition">{{ \'CONTACTMANAGER.DISPOSITION\' | translate }}</th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row ng-hide="vm.finals.count">\n                                            <td md-cell colspan="5">\n                                                <div layout="row" layout-align="center center">\n                                                    <span tranlsate="CONTACTMANAGER.NO_AVAILABLE_INFO">No Available Info</span>\n                                                </div>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-repeat="(id, final) in vm.finals.rows">\n                                            <td md-cell>{{final.uniqueid}}</td>\n                                            <td md-cell>{{final.calleridnum}}</td>\n                                            <td md-cell>{{final.statedesc}}</td>\n                                            <td md-cell>{{final.starttime | date:\'medium\'}}</td>\n                                            <td md-cell>{{final.disposition}}</td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n\n                            <md-table-pagination md-label="{page: \'{{\'CONTACTMANAGER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CONTACTMANAGER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CONTACTMANAGER.OF\' | translate}}\'}" md-limit="vm.queryFinal.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                                md-page="vm.queryFinal.page" md-total="{{vm.finals.count}}" md-on-paginate="vm.getFinals" md-page-select></md-table-pagination>\n                            \x3c!-- / HOPPER TABLE --\x3e\n                        </div>\n                    </div>\n\n                    <div layout="row">\n                        <div class="contact-detail-form-container personal_info md-background-bg md-whiteframe-1dp" flex>\n                            <md-toolbar class="md-table-toolbar md-default">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="CONTACTMANAGER.HISTORY">History</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm.queryHistory.filter = query;" on-collapse="vm.queryHistory.filter = undefined;" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm.getHistories()" aria-label="reload" translate translate-attr-label="CONTACTMANAGER.RELOAD">\n                                        <md-tooltip>{{\'CONTACTMANAGER.RELOAD\' | translate}}</md-tooltip>\n                                        <md-icon md-font-icon="icon-reload"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n\n                            \x3c!-- HOPPER TABLE --\x3e\n                            <md-table-container>\n                                <table md-table multiple md-progress="vm.promise">\n                                    <thead md-head md-order="vm.queryHistory.sort" md-on-reorder="vm.getHistories">\n                                        <tr md-row>\n                                            <th md-column md-order-by="uniqueid">{{ \'CONTACTMANAGER.UNIQUEID\' | translate }}</th>\n                                            <th md-column md-order-by="calleridnum">{{ \'CONTACTMANAGER.PHONE\' | translate }}</th>\n                                            <th md-column md-order-by="state">{{ \'CONTACTMANAGER.STATE\' | translate }}</th>\n                                            <th md-column md-order-by="scheduledat">{{ \'CONTACTMANAGER.SCHEDULEDAT\' | translate }}</th>\n                                            <th md-column md-order-by="starttime">{{ \'CONTACTMANAGER.STARTTIME\' | translate }}</th>\n                                            <th md-column md-order-by="endtime">{{ \'CONTACTMANAGER.ENDTIME\' | translate }}</th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row ng-hide="vm.histories.count">\n                                            <td md-cell colspan="7">\n                                                <div layout="row" layout-align="center center">\n                                                    <span tranlsate="CONTACTMANAGER.NO_AVAILABLE_INFO">No Available Info</span>\n                                                </div>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-repeat="(id, history) in vm.histories.rows">\n                                            <td md-cell>{{history.uniqueid}}</td>\n                                            <td md-cell>{{history.calleridnum}}</td>\n                                            <td md-cell>{{history.statedesc}}</td>\n                                            <td md-cell>{{history.scheduledat | date:\'medium\'}}</td>\n                                            <td md-cell>{{history.starttime | date:\'medium\'}}</td>\n                                            <td md-cell>{{history.endtime | date:\'medium\'}}</td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n\n                            <md-table-pagination md-label="{page: \'{{\'CONTACTMANAGER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CONTACTMANAGER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CONTACTMANAGER.OF\' | translate}}\'}" md-limit="vm.queryHistory.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                                md-page="vm.queryHistory.page" md-total="{{vm.histories.count}}" md-on-paginate="vm.getHistories" md-page-select></md-table-pagination>\n                            \x3c!-- / HOPPER TABLE --\x3e\n                        </div>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n\n            <md-tab ng-if="vm.license.jscripty">\n                <md-tab-label>\n                    <span translate="CONTACTMANAGER.JSCRIPTY">JSCRIPTY</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div layout="row">\n                        <div class="contact-detail-form-container personal_info md-background-bg md-whiteframe-1dp" flex>\n                            <md-toolbar class="md-table-toolbar md-default">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="CONTACTMANAGER.SESSIONS">Sessions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm.queryJscriptySession.filter = query;" on-collapse="vm.queryJscriptySession.filter = undefined;" debounce="300"></ms-search-bar>\n                                </div>\n                            </md-toolbar>\n\n                            \x3c!-- SESSION TABLE --\x3e\n                            <md-table-container>\n                                <table md-table multiple md-progress="vm.promise">\n                                    <thead md-head md-order="vm.queryJscriptySession.sort" md-on-reorder="vm.getJscriptySessions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'CONTACTMANAGER.ID\' | translate }}</th>\n                                            <th md-column md-order-by="starttime">{{ \'CONTACTMANAGER.STARTTIME\' | translate }}</th>\n                                            <th md-column md-order-by="endtime">{{ \'CONTACTMANAGER.ENDTIME\' | translate }}</th>\n                                            <th md-column md-order-by="agent">{{ \'CONTACTMANAGER.AGENT\' | translate }}</th>\n                                            <th md-column md-order-by="project">{{ \'CONTACTMANAGER.PROJECT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row ng-hide="vm.jscriptySessions.count">\n                                            <td md-cell colspan="6">\n                                                <div layout="row" layout-align="center center">\n                                                    <span tranlsate="CONTACTMANAGER.NO_AVAILABLE_INFO">No Available Info</span>\n                                                </div>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-repeat="(id, session) in vm.jscriptySessions.rows">\n                                            <td md-cell>{{session.id}}</td>\n                                            <td md-cell>{{session.starttime | date:\'medium\'}}</td>\n                                            <td md-cell>{{session.endtime | date:\'medium\'}}</td>\n                                            <td md-cell>{{session.membername}}</td>\n                                            <td md-cell>{{session.projectname}}</td>\n                                            <td md-cell class="actions">\n                                                \x3c!-- <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CONTACTMANAGER.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical" ></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="2">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm.editHopper($event, hopper)" translate="CONTACTMANAGER.EDIT_HOPPER">\n                                                                Edit Hopper\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm.deleteconfirm(hopper, $event)" translate="CONTACTMANAGER.DELETE_HOPPER">\n                                                                Delete Hopper\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu> --\x3e\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n\n                            <md-table-pagination md-label="{page: \'{{\'CONTACTMANAGER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CONTACTMANAGER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CONTACTMANAGER.OF\' | translate}}\'}" md-limit="vm.queryHopper.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                                md-page="vm.queryHopper.page" md-total="{{vm.hoppers.count}}" md-on-paginate="vm.getHoppers" md-page-select></md-table-pagination>\n                            \x3c!-- / SESSION TABLE --\x3e\n                        </div>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CONTACTMANAGER.CUSTOMER_JOURNEY">CUSTOMER JOURNEY</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <md-content class="md-padding" id="interaction-content">\n                        <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.journey.html\'"></div>\n                    </md-content>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/contactmanager/views/contacts/import/import.html",'<md-dialog class="import-dialog" aria-label="Import contact">\n    <form name="importForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title" translate="CONTACTMANAGER.IMPORT_CONTACTS">Import Contacts</span>\n                <md-button ng-if="vm.result.finish || !vm.processing" class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <div md-background-bg layout="row" layout-align="start start">\n            <md-progress-linear ng-disabled="!vm.processing || vm.result.finish" md-mode="indeterminate" class="md-warn"></md-progress-linear>\n        </div>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <div>\n                <md-content ng-show="!vm.processing">\n                    <div class="form-title" translate="CONTACTMANAGER.CONTACTMANAGER">CONTACT MANAGER</div>\n\n                    <md-input-container class="md-icon-float md-block" ng-repeat="contactField in vm.contactFields">\n                        <label>{{\'CONTACTMANAGER.\' + contactField.key | uppercase | translate}}</label>\n                        <md-select name="{{contactField.key}}" ng-model="vm.binding[contactField.key]" placeholder="{{\'CONTACTMANAGER.\' + contactField.key | uppercase | translate}}" ng-required="contactField.required">\n                            <md-option ng-value="field" ng-repeat="field in vm.fields">{{ field }}</md-option>\n                            <md-option ng-value="null" ng-hide="contactField.required">\n                                <em>{{ \'CONTACTMANAGER.NONE\' | translate }}</em>\n                            </md-option>\n                        </md-select>\n                    </md-input-container>\n\n                    <md-input-container class="md-icon-float md-block">\n                        <label translate="CONTACTMANAGER.LIST">List</label>\n                        <md-select name="list" ng-model="vm.ListId" placeholder="Select a list" ng-change="vm.onChangeList()" required>\n                            <md-option ng-value="list.id" ng-repeat="list in vm.lists.rows">{{list.name}}</md-option>\n                        </md-select>\n                    </md-input-container>\n\n                    <md-input-container class="md-icon-float md-block" ng-repeat="customField in vm.customFields.rows">\n                        <label>{{customField.alias}}</label>\n                        <md-select ng-model="vm.binding[\'cf_\' + customField.id]" placeholder="{{customField.alias}}" ng-required="customField.required">\n                            <md-option ng-value="field" ng-repeat="field in vm.fields">{{ field }}</md-option>\n                            <md-option ng-value="null" ng-hide="customField.required">\n                                <em>{{ \'CONTACTMANAGER.NONE\' | translate }}</em>\n                            </md-option>\n                        </md-select>\n                    </md-input-container>\n\n                    <md-input-container class="md-icon-float md-block">\n                        <label translate="CONTACTMANAGER.COMPANY">Company</label>\n                        <md-select name="company" ng-model="vm.CompanyId" placeholder="Select a company">\n                            <md-option ng-value="company.id" ng-repeat="company in vm.companies.rows">{{company.name}}</md-option>\n                            <md-option ng-value="null">\n                                <em translate="CONTACTMANAGER.NONE">None</em>\n                            </md-option>\n                        </md-select>\n                    </md-input-container>\n\n                    <md-input-container class="md-icon-float md-block">\n                        <md-select ng-model="vm.duplicates" placeholder="{{ \'CONTACTMANAGER.CHECK_DUPLICATES\' | translate}}" multiple>\n                            <md-option ng-value="contactField.key" ng-repeat="contactField in vm.contactFields">{{ \'CONTACTMANAGER.\' + contactField.key | uppercase | translate}}</md-option>\n                        </md-select>\n                    </md-input-container>\n\n                    <div ng-if="vm.license.dialer">\n                        <div class="form-title" translate="CONTACTMANAGER.MOTIONDIALER">MOTION BULL</div>\n\n                        <md-input-container class="md-icon-float md-block" ng-repeat="motionBullField in vm.motionBullFields">\n                            <label>{{\'CONTACTMANAGER.\' + motionBullField.key | uppercase | translate}}</label>\n                            <md-select name="{{motionBullField.key}}" ng-model="vm.binding[motionBullField.key]" placeholder="{{\'CONTACTMANAGER.\' + motionBullField.key | uppercase | translate}}" ng-required="motionBullField.required">\n                                <md-option ng-value="field" ng-repeat="field in vm.fields">{{ field }}</md-option>\n                                <md-option ng-value="null" ng-hide="contactField.required">\n                                    <em>{{ \'CONTACTMANAGER.NONE\' | translate }}</em>\n                                </md-option>\n                            </md-select>\n                        </md-input-container>\n                    </div>\n\n                </md-content>\n\n                <div class="error-list" ng-if="vm.result.finish">\n                    <div class="info" layout="row" layout-align="space-between center">\n                        <div>\n                            <div class="message">{{\'CONTACTMANAGER.UPLOAD_COMPLETED\' | translate | uppercase}} ({{vm.result.elapsed}}s)</div>\n                        </div>\n                        <md-button class="md-icon-button">\n                            <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                        </md-button>\n                    </div>\n                </div>\n\n                <div layout="row" ng-if="vm.processing">\n                    \x3c!-- WIDGET PROCESSING --\x3e\n                    <ms-widget ng-if="!vm.result.finish" class="h-140" flex>\n                        \x3c!-- Front --\x3e\n                        <ms-widget-front class="p-16 white-bg">\n                            <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                <div class="md-display-1 pb-8 orange-fg">\n                                    <span ng-bind="vm.result.rows"></span>\n                                </div>\n                                <div ng-if="vm.processing" class="font-weight-500 secondary-text">Please wait, we are processing your contacts...</div>\n                            </div>\n                        </ms-widget-front>\n                        \x3c!-- / Front --\x3e\n                    </ms-widget>\n                    \x3c!-- / WIDGET PROCESSING --\x3e\n                    \x3c!-- WIDGET SUCCESS --\x3e\n                    <ms-widget ng-if="vm.result.finish" class="h-140" flex>\n                        \x3c!-- Front --\x3e\n                        <ms-widget-front class="p-16 white-bg">\n                            <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                <div class="md-display-1 pb-8 green-fg">\n                                    <span ng-bind="vm.result.affectedRows"></span>\n                                </div>\n                                <div class="font-weight-500 secondary-text" translate="CONTACTMANAGER.SUCCESS">Success</div>\n                            </div>\n                        </ms-widget-front>\n                        \x3c!-- / Front --\x3e\n                    </ms-widget>\n                    \x3c!-- / WIDGET SUCCESS --\x3e\n\n                    \x3c!-- WIDGET FAILURE --\x3e\n                    <ms-widget ng-if="vm.result.finish" class="h-140" flex>\n                        \x3c!-- Front --\x3e\n                        <ms-widget-front class="p-16 white-bg">\n                            <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                <div class="md-display-1 pb-8 red-fg">\n                                    <span ng-bind="vm.result.failedRows"></span>\n                                </div>\n                                <div class="font-weight-500 secondary-text" translate="CONTACTMANAGER.FAILURE">Failure</div>\n                            </div>\n                        </ms-widget-front>\n                        \x3c!-- / Front --\x3e\n                    </ms-widget>\n                    \x3c!-- / WIDGET FAILURE --\x3e\n\n                    \x3c!-- WIDGET DUPLICATES --\x3e\n                    <ms-widget ng-if="vm.result.duplicatedRows && vm.result.finish" class="h-140" flex>\n                        \x3c!-- Front --\x3e\n                        <ms-widget-front class="p-16 white-bg">\n                            <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                <div class="md-display-1 pb-8 orange-fg">\n                                    <span ng-bind="vm.result.duplicatedRows"></span>\n                                </div>\n                                <div class="font-weight-500 secondary-text" translate="CONTACTMANAGER.DUPLICATES">Duplicates</div>\n                            </div>\n                        </ms-widget-front>\n                        \x3c!-- / Front --\x3e\n                    </ms-widget>\n                    \x3c!-- / WIDGET DUPLICATES --\x3e\n                </div>\n\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row">\n                <md-button ng-if="!vm.processing" ng-disabled="importForm.$invalid || importForm.$pristine" ng-click="vm.uploadCsv()" class="md-accent md-raised" aria-label="UPLOAD" translate="CONTACTMANAGER.UPLOAD" translate-attr-aria-label="CONTACTMANAGER.IMPORT">\n                    IMPORT\n                </md-button>\n                <md-button ng-if="vm.processing && !vm.result.finish && !vm.stopping" ng-click="vm.stopUpload()" class="md-accent md-raised" aria-label="Stop Upload" translate="CONTACTMANAGER.STOP" translate-attr-aria-label="CONTACTMANAGER.STOP">\n                    STOP\n                </md-button>\n                <md-button ng-if="vm.result.finish && vm.result.errors.length" ng-csv="vm.getArrayErrors()" csv-header="vm.getHeaderErrors()" class="md-accent md-raised" aria-label="Export Errors" filename="contacts_import_errors.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon> {{\'CONTACTMANAGER.EXPORT_ERRORS\' | translate}}\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/contacts/merge/dialog.html",'<md-dialog class="cm-contact-dialog" aria-label="Merge Contact">\n    <form name="contactForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <md-input-container class="md-block" flex-gt-sm>\n                <label>Filter</label>\n                <input ng-model="vm.searchTerm" name="searchTerm" ng-model-options="{ debounce: 300 }" ng-change="vm.change()">\n            </md-input-container>\n\n            <md-list flex>\n                <md-subheader class="md-no-sticky" ng-hide="vm.contacts.length"><em>Filter doesn\'t match any contact</em></md-subheader>\n                <md-list-item class="md-3-line" ng-repeat="contact in vm.contacts | filter:{ id: \'!\' + vm.contact.id}" ng-click="vm.showConfirm($event, vm.contact, contact)">\n                    <img ng-src="assets/images/avatars/profile.png" class="md-avatar" alt="{{contact.who}}" />\n                    <div class="md-list-item-text" layout="column">\n                        <h3>#{{ contact.id }} - {{ contact.firstName }} {{ contact.lastName }}</h3>\n                        <h4>{{ contact.email }}</h4>\n                        <p>{{ contact.phone }}</p>\n                    </div>\n                </md-list-item>\n            </md-list>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/contacts/upload/upload.html",'<md-dialog class="upload-dialog" aria-label="Upload contact">\n    <form name="uploadForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title" translate="CONTACTMANAGER.UPLOAD_CONTACTS">Upload Contacts</span>\n                <md-button ng-if="vm.finished || !vm.uploading" class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <div md-background-bg layout="row" layout-align="start start">\n            <md-progress-linear ng-disabled="!vm.uploading" md-mode="indeterminate" class="md-warn"></md-progress-linear>\n        </div>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <div layout="row" layout-align="center center" ng-show="!vm.fileSelected">\n                <md-button flow-init="vm.ngFlowOptions" flow-name="vm.ngFlow.flow" flow-btn flow-file-added="vm.fileAdded($event, $file, $flow)" flow-file-success="vm.fileSuccess($file, $message, $flow)" class="md-accent md-raised md-warn" aria-label="Select File" translate\n                    translate-attr-aria-label="CONTACTMANAGER.SELECT_FILE">\n                    <span translate="CONTACTMANAGER.SELECT_FILE">Select File</span>\n                    <md-icon md-font-icon="icon-upload"></md-icon>\n                </md-button>\n            </div>\n\n            <div>\n                <md-content ng-show="!vm.uploading && !vm.finished && vm.fileSelected">\n                    <md-input-container class="md-icon-float md-block" ng-repeat="contactField in vm.contactFields">\n                        <label>{{\'CONTACTMANAGER.\' + contactField.key | uppercase | translate}}</label>\n                        <md-select name="{{contactField.key}}" ng-model="vm.binding[contactField.key]" placeholder="{{\'CONTACTMANAGER.\' + contactField.key | uppercase | translate}}" ng-required="contactField.required">\n                            <md-option ng-value="field" ng-repeat="field in vm.fields">{{ field }}</md-option>\n                            <md-option ng-value="null" ng-hide="contactField.required"><em>{{ \'CONTACTMANAGER.NONE\' | translate }}</em></md-option>\n                        </md-select>\n                    </md-input-container>\n\n                    <md-input-container class="md-icon-float md-block">\n                        <label translate="CONTACTMANAGER.LIST">List</label>\n                        <md-select name="list" ng-model="vm.ListId" placeholder="Select a list" ng-change="vm.onChangeList()" required>\n                            <md-option ng-value="list.id" ng-repeat="list in vm.lists.rows">{{list.name}}</md-option>\n                        </md-select>\n                    </md-input-container>\n\n                    <md-input-container class="md-icon-float md-block" ng-repeat="customField in vm.customFields.rows">\n                        <label>{{customField.alias}}</label>\n                        <md-select ng-model="vm.binding[\'cf_\' + customField.id]" placeholder="{{customField.alias}}" ng-required="customField.required">\n                            <md-option ng-value="field" ng-repeat="field in vm.fields">{{ field }}</md-option>\n                            <md-option ng-value="null" ng-hide="customField.required"><em>{{ \'CONTACTMANAGER.NONE\' | translate }}</em></md-option>\n                        </md-select>\n                    </md-input-container>\n\n                    <md-input-container class="md-icon-float md-block">\n                        <label translate="CONTACTMANAGER.COMPANY">Company</label>\n                        <md-select name="company" ng-model="vm.CompanyId" placeholder="Select a company">\n                            <md-option ng-value="company.id" ng-repeat="company in vm.companies.rows">{{company.name}}</md-option>\n                            <md-option ng-value="null"><em translate="CONTACTMANAGER.NONE">None</em></md-option>\n                        </md-select>\n                    </md-input-container>\n\n                    <md-input-container class="md-icon-float md-block">\n                        <md-select ng-model="vm.duplicates" placeholder="{{ \'CONTACTMANAGER.CHECK_DUPLICATES\' | translate}}" multiple>\n                            <md-option ng-value="contactField.key" ng-repeat="contactField in vm.contactFields">{{ \'CONTACTMANAGER.\' + contactField.key | uppercase | translate}}</md-option>\n                        </md-select>\n                    </md-input-container>\n                </md-content>\n\n                <div layout="row" ng-if="vm.uploading || vm.finished">\n                    \x3c!-- WIDGET SUCCESS --\x3e\n                    <ms-widget class="h-140" flex>\n                        \x3c!-- Front --\x3e\n                        <ms-widget-front class="p-16 white-bg">\n                            <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                <div class="md-display-1 pb-8 green-fg"><span ng-bind="vm.success"></span></div>\n                                <div class="font-weight-500 secondary-text" translate="CONTACTMANAGER.SUCCESS">Success</div>\n                            </div>\n                        </ms-widget-front>\n                        \x3c!-- / Front --\x3e\n                    </ms-widget>\n                    \x3c!-- / WIDGET SUCCESS --\x3e\n\n                    \x3c!-- WIDGET FAILURE --\x3e\n                    <ms-widget class="h-140" flex>\n                        \x3c!-- Front --\x3e\n                        <ms-widget-front class="p-16 white-bg">\n                            <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                <div class="md-display-1 pb-8 red-fg"><span ng-bind="vm.errors"></span></div>\n                                <div class="font-weight-500 secondary-text" translate="CONTACTMANAGER.FAILURE">Failure</div>\n                            </div>\n                        </ms-widget-front>\n                        \x3c!-- / Front --\x3e\n                    </ms-widget>\n                    \x3c!-- / WIDGET FAILURE --\x3e\n\n                    \x3c!-- WIDGET DUPLICATES --\x3e\n                    <ms-widget class="h-140" flex ng-if="vm.duplicate">\n                        \x3c!-- Front --\x3e\n                        <ms-widget-front class="p-16 white-bg">\n                            <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                <div class="md-display-1 pb-8 orange-fg"><span ng-bind="vm.duplicate"></span></div>\n                                <div class="font-weight-500 secondary-text" translate="CONTACTMANAGER.DUPLICATES">Duplicates</div>\n                            </div>\n                        </ms-widget-front>\n                        \x3c!-- / Front --\x3e\n                    </ms-widget>\n                    \x3c!-- / WIDGET DUPLICATES --\x3e\n                </div>\n\n                <div class="error-list" ng-if="vm.finished">\n                    <div class="info" layout="row" layout-align="space-between center">\n                        <div>\n                            <div class="message">{{\'CONTACTMANAGER.UPLOAD_COMPLETED\' | translate | uppercase}}</div>\n                        </div>\n                        <md-button class="md-icon-button">\n                            <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                        </md-button>\n                    </div>\n                </div>\n\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row">\n                <md-button ng-disabled="uploadForm.$invalid || uploadForm.$pristine || vm.uploading || vm.finished || !vm.fileSelected" ng-click="vm.uploadCsv()" class="md-accent md-raised" aria-label="UPLOAD" translate="CONTACTMANAGER.UPLOAD" translate-attr-aria-label="CONTACTMANAGER.UPLOAD">\n                    UPLOAD\n                </md-button>\n                <md-button ng-if="vm.showStopButton && !vm.finished" ng-disabled="vm.disableStopButton" ng-click="vm.stopUpload()" class="md-accent md-raised" aria-label="Stop Upload" translate="CONTACTMANAGER.STOP" translate-attr-aria-label="CONTACTMANAGER.STOP">\n                    STOP\n                </md-button>\n                <md-button ng-if="vm.rows.length" ng-csv="vm.exportErrors()" class="md-accent md-raised" aria-label="Export Errors" filename="contacts_upload_errors.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon> {{\'CONTACTMANAGER.EXPORT_ERRORS\' | translate}}\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/globalCustomFields/create/dialog.html",'<md-dialog class="globalCustomField-dialog" aria-label="New GlobalCustomField">\n    <form name="globalCustomFieldForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.ALIAS">Alias</label>\n                <input type="" name="alias" ng-model="vm.globalCustomField.alias" ng-required="true" autofocus>\n                <div ng-messages="globalCustomFieldForm[\'alias\'].$error" ng-show="globalCustomFieldForm[\'alias\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.ALIAS_REQUIRED">Alias field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.globalCustomField.type" required ng-disabled="!vm.newGlobalCustomField">\n                    <md-option ng-value="\'text\'">Text</md-option>\n                    <md-option ng-value="\'select\'">Select</md-option>\n                    <md-option ng-value="\'number\'">Number</md-option>\n                    <md-option ng-value="\'switch\'">Switch</md-option>\n                    <md-option ng-value="\'datetime\'">Datetime</md-option>\n                </md-select>\n                <div ng-messages="globalCustomFieldForm[\'type\'].$error" ng-show="globalCustomFieldForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div ng-if="vm.globalCustomField.type == \'select\'" class="md-block">\n                <md-list>\n                    <md-list-item layout-margin>\n                        <md-button class="md-fab md-mini md-secondary" ng-click="vm.addItem(vm.globalCustomField.values);">\n                            <md-tooltip><span translate="CONTACTMANAGER.ADD">ADD</span></md-tooltip>\n                            <md-icon md-font-icon="icon-plus" aria-label="alert error"></md-icon>\n                        </md-button>\n                        <md-button ng-if="vm.globalCustomField.values.length" class="md-fab md-mini md-warn md-secondary" ng-click="vm.removeItems(vm.globalCustomField.values);">\n                            <md-tooltip><span translate="CONTACTMANAGER.DELETE_ALL">Delete All</span></md-tooltip>\n                            <md-icon md-font-icon="icon-delete" aria-label="alert error"></md-icon>\n                        </md-button>\n                    </md-list-item>\n                </md-list>\n                <md-list ng-sortable="vm.sortable">\n                    <md-list-item ng-repeat="item in vm.globalCustomField.values" style="border: 1px solid #ccc!important; border-radius: 7px;" layout-margin>\n                        <div>\n                            <md-icon class="s24" style="cursor:move" md-font-icon="icon-drag" aria-label="drag"></md-icon>\n                            <input type="text" ng-model="item.value" flex>\n                        </div>\n                        <md-button class="md-fab md-mini md-warn md-secondary" ng-click="vm.removeItem(vm.globalCustomField.values, $index);">\n                            <md-tooltip><span translate="CONTACTMANAGER.DELETE">DELETE</span></md-tooltip>\n                            <md-icon md-font-icon="icon-delete" aria-label="alert error"></md-icon>\n                        </md-button>\n                    </md-list-item>\n                </md-list>\n                <md-list>\n                    <md-list-item ng-if="!vm.globalCustomField.values.length" layout="row" layout-align="center center">\n                        <em translate="CONTACTMANAGER.NO_AVAILABLE_ITEMS">No Available Items</em>\n                    </md-list-item>\n                </md-list>\n            </div>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.globalCustomField.required" aria-label="Required"><span translate="CONTACTMANAGER.REQUIRED">Required</span></md-switch>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newGlobalCustomField" ng-click="vm.saveGlobalCustomField()" class="send-button md-accent md-raised" ng-disabled="globalCustomFieldForm.$invalid || globalCustomFieldForm.$pristine" aria-label="SAVE" translate="CONTACTMANAGER.SAVE"\n                    translate-attr-aria-label="CONTACTMANAGER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newGlobalCustomField" ng-click="vm.addNewGlobalCustomField()" class="send-button md-accent md-raised" ng-disabled="globalCustomFieldForm.$invalid" aria-label="ADD" translate="CONTACTMANAGER.ADD_GLOBALCUSTOMFIELD" translate-attr-aria-label="CONTACTMANAGER.ADD_GLOBALCUSTOMFIELD">\n                    ADD GLOBALCUSTOMFIELD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newGlobalCustomField" ng-click="vm.deleteGlobalCustomField($event)" aria-label="DELETE" translate translate-attr-aria-label="CONTACTMANAGER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CONTACTMANAGER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/globalCustomFields/globalCustomFields.html",'<div id="globalCustomFields" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-account-circle" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="CONTACTMANAGER.GLOBALCUSTOMFIELDS">GlobalCustomFields</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="CONTACTMANAGER.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedGlobalCustomFields.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedGlobalCustomFields =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="CONTACTMANAGER.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-globalCustomFields-count">\n                    <span>{{vm.selectedGlobalCustomFields.length}}</span>\n                <span translate="CONTACTMANAGER.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="GLOBALCUSTOMFIELDS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllGlobalCustomFields()" translate="CONTACTMANAGER.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectGlobalCustomFields()" translate="CONTACTMANAGER.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedGlobalCustomFields" csv-label="true" filename="globalCustomFields.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedGlobalCustomFields($event)" aria-label="delete selected" translate translate-attr-label="GLOBALCUSTOMFIELDS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- GLOBALCUSTOMFIELD TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedGlobalCustomFields" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getGlobalCustomFields">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'CONTACTMANAGER.ID\' | translate }}</th>\n                                <th md-column md-order-by="alias">{{ \'CONTACTMANAGER.ALIAS\' | translate }}</th>\n                                <th md-column md-order-by="type">{{ \'CONTACTMANAGER.TYPE\' | translate }}</th>\n                                <th md-column md-order-by="required">{{ \'CONTACTMANAGER.REQUIRED\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.globalCustomFields.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="CONTACTMANAGER.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="globalCustomField" md-select-id="id" ng-repeat="globalCustomField in vm.globalCustomFields.rows">\n                                <td md-cell ng-if="globalCustomField.userpic"><img class="avatar" alt="{{globalCustomField.name}}" ng-src="api/users/{{globalCustomField.id}}/avatar" /></td>\n                                <td md-cell ng-if="!globalCustomField.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{globalCustomField.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditGlobalCustomField($event, globalCustomField)" md-cell class="id ">{{globalCustomField.id}}</td>\n                                <td ng-click="vm.createOrEditGlobalCustomField($event, globalCustomField)" md-cell class="alias ">{{globalCustomField.alias}}</td>\n                                <td ng-click="vm.createOrEditGlobalCustomField($event, globalCustomField)" md-cell class="type ">{{ vm.arraytype[globalCustomField.type].option }}</td>\n                                <td ng-click="vm.createOrEditGlobalCustomField($event, globalCustomField)" md-cell class="required ">\n                                    <md-icon md-colors="{color: {{globalCustomField.required ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{globalCustomField.required ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                </td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CONTACTMANAGER.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(globalCustomField, $event)" translate="CONTACTMANAGER.EDIT_GLOBALCUSTOMFIELD">\n                                                    Edit GlobalCustomField\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(globalCustomField, $event)" translate="CONTACTMANAGER.DELETE_GLOBALCUSTOMFIELD">\n                                                    Delete GlobalCustomField\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'CONTACTMANAGER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CONTACTMANAGER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CONTACTMANAGER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.globalCustomFields.count}}" md-on-paginate="vm.getGlobalCustomFields" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / GLOBALCUSTOMFIELD TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD GLOBALCUSTOMFIELD BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-globalCustomField-button" ng-click="vm.createOrEditGlobalCustomField($event)" aria-label="add globalCustomField" translate translate-attr-aria-label="CONTACTMANAGER.ADD_GLOBALCUSTOMFIELD">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD GLOBALCUSTOMFIELD BUTTON --\x3e\n</div>'),e.put("app/main/apps/contactmanager/views/lists/create/dialog.html",'<md-dialog class="list-dialog" aria-label="New List">\n    <form name="listForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.list.name" ng-required="true" autofocus>\n                <div ng-messages="listForm[\'name\'].$error" ng-show="listForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.list.description">\n                <div ng-messages="listForm[\'description\'].$error" ng-show="listForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newList" ng-click="vm.saveList()" class="send-button md-accent md-raised" ng-disabled="listForm.$invalid || listForm.$pristine" aria-label="SAVE" translate="CONTACTMANAGER.SAVE" translate-attr-aria-label="CONTACTMANAGER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newList" ng-click="vm.addNewList()" class="send-button md-accent md-raised" ng-disabled="listForm.$invalid" aria-label="ADD" translate="CONTACTMANAGER.ADD_LIST" translate-attr-aria-label="CONTACTMANAGER.ADD_LIST">\n                    ADD LIST\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newList" ng-click="vm.deleteList($event)" aria-label="DELETE" translate translate-attr-aria-label="CONTACTMANAGER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CONTACTMANAGER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/lists/edit/agentadd/agentadd.html",'<md-dialog class="list-dialog" aria-label="list">\n    <form name="listForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="CONTACTMANAGER.AGENTADD_LIST">Add Agent to list</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/lists/edit/customFields/dialog.html",'<md-dialog class="customField-dialog" aria-label="New CustomField">\n    <form name="customFieldForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.ALIAS">Alias</label>\n                <input type="" name="alias" ng-model="vm.customField.alias" ng-required="true" autofocus>\n                <div ng-messages="customFieldForm[\'alias\'].$error" ng-show="customFieldForm[\'alias\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.ALIAS_REQUIRED">Alias field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.customField.type" required ng-disabled="!vm.newCustomField">\n                    <md-option ng-value="\'text\'">Text</md-option>\n                    <md-option ng-value="\'select\'">Select</md-option>\n                    <md-option ng-value="\'number\'">Number</md-option>\n                    <md-option ng-value="\'switch\'">Switch</md-option>\n                    <md-option ng-value="\'datetime\'">Datetime</md-option>\n                </md-select>\n                <div ng-messages="customFieldForm[\'type\'].$error" ng-show="customFieldForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div ng-if="vm.customField.type == \'select\'" class="md-block">\n                <md-list>\n                    <md-list-item layout-margin>\n                        <md-button class="md-fab md-mini md-secondary" ng-click="vm.addItem(vm.customField.values);">\n                            <md-tooltip><span translate="CONTACTMANAGER.ADD">ADD</span></md-tooltip>\n                            <md-icon md-font-icon="icon-plus" aria-label="alert error"></md-icon>\n                        </md-button>\n                        <md-button ng-if="vm.customField.values.length" class="md-fab md-mini md-warn md-secondary" ng-click="vm.removeItems(vm.customField.values);">\n                            <md-tooltip><span translate="CONTACTMANAGER.DELETE_ALL">Delete All</span></md-tooltip>\n                            <md-icon md-font-icon="icon-delete" aria-label="alert error"></md-icon>\n                        </md-button>\n                    </md-list-item>\n                </md-list>\n                <md-list ng-sortable="vm.sortable">\n                    <md-list-item ng-repeat="item in vm.customField.values" style="border: 1px solid #ccc!important; border-radius: 7px;" layout-margin>\n                        <div>\n                            <md-icon class="s24" style="cursor:move" md-font-icon="icon-drag" aria-label="drag"></md-icon>\n                            <input type="text" ng-model="item.value" flex>\n                        </div>\n                        <md-button class="md-fab md-mini md-warn md-secondary" ng-click="vm.removeItem(vm.customField.values, $index);">\n                            <md-tooltip><span translate="CONTACTMANAGER.DELETE">DELETE</span></md-tooltip>\n                            <md-icon md-font-icon="icon-delete" aria-label="alert error"></md-icon>\n                        </md-button>\n                    </md-list-item>\n                </md-list>\n                <md-list>\n                    <md-list-item ng-if="!vm.customField.values.length" layout="row" layout-align="center center">\n                        <em translate="CONTACTMANAGER.NO_AVAILABLE_ITEMS">No Available Items</em>\n                    </md-list-item>\n                </md-list>\n            </div>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.customField.required" aria-label="Required"><span translate="CONTACTMANAGER.REQUIRED">Required</span></md-switch>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newCustomField" ng-click="vm.saveCustomField()" class="send-button md-accent md-raised" ng-disabled="customFieldForm.$invalid || customFieldForm.$pristine" aria-label="SAVE" translate="CONTACTMANAGER.SAVE" translate-attr-aria-label="CONTACTMANAGER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newCustomField" ng-click="vm.addNewCustomField()" class="send-button md-accent md-raised" ng-disabled="customFieldForm.$invalid" aria-label="ADD" translate="CONTACTMANAGER.ADD_CUSTOMFIELD" translate-attr-aria-label="CONTACTMANAGER.ADD_CUSTOMFIELD">\n                    ADD CUSTOMFIELD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newCustomField" ng-click="vm.deleteCustomField($event)" aria-label="DELETE" translate translate-attr-aria-label="CONTACTMANAGER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CONTACTMANAGER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/lists/edit/view.html",'<div id="contactmanager-list" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-lists-button md-icon-button" aria-label="Go to lists" ng-click="vm.gotoLists()" translate translate-attr-aria-label="CONTACTMANAGER.GO_TO_LISTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="list-image" hide-xs>\n                    <img ng-src="assets/images/business/lists.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.list.id}}\n                        <span ng-if="vm.list.name">{{vm.list.name}}</span>\n                        <span ng-if="vm.list.exten">{{vm.list.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="CONTACTMANAGER.CREATED_AT"></span> <span>{{vm.list.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.gotogoto(vm.list, $event)" class="md-fab md-warn md-icon-button" aria-label="goto">\n                <md-tooltip><span translate="CONTACTMANAGER.GOTO_LIST"></span></md-tooltip>\n                <md-icon md-font-icon="icon-forward"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.agentadddialog(vm.list, $event)" class="md-fab md-warn md-icon-button" aria-label="agentadd">\n                <md-tooltip><span translate="CONTACTMANAGER.AGENTADD_LIST"></span></md-tooltip>\n                <md-icon md-font-icon="icon-eye"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveList()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (customFieldsForm.$invalid) || (voiceDispositionsForm.$invalid)" translate="CONTACTMANAGER.SAVE" translate-attr-aria-label="CONTACTMANAGER.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CONTACTMANAGER.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="list-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="CONTACTMANAGER.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.list.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.list.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="CONTACTMANAGER.PREFIX">Prefix</label>\n                                <input type="text" name="dialPrefix" ng-model="vm.list.dialPrefix">\n                                <div ng-messages="generalForm[\'dialPrefix\'].$error" ng-show="generalForm[\'dialPrefix\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="CONTACTMANAGER.ERRORS.PREFIX_REQUIRED">Prefix field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CONTACTMANAGER.CUSTOMFIELDS">CUSTOMFIELDS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="list-detail-form-container customfields md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="ListCustomFieldsController as vm_dc" ng-init="vm_dc.init(vm.list)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedListCustomFields.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="CONTACTMANAGER.CUSTOMFIELDS">CustomFields</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditListCustomField($event)" aria-label="add customField" translate translate-attr-label="CONTACTMANAGER.ADD_CUSTOMFIELD">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedListCustomFields.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedListCustomFields.length}} {{vm_dc.selectedListCustomFields.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedListCustomFields" csv-label="true" filename="lists.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedListCustomFields($event)" aria-label="delete selected" translate translate-attr-label="LISTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedListCustomFields" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getListCustomFields">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'CONTACTMANAGER.ID\' | translate }}</th>\n                                            <th md-column md-order-by="alias">{{ \'CONTACTMANAGER.ALIAS\' | translate }}</th>\n                                            <th md-column md-order-by="type">{{ \'CONTACTMANAGER.TYPE\' | translate }}</th>\n                                            <th md-column md-order-by="required">{{ \'CONTACTMANAGER.REQUIRED\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="customField" md-select-id="id" ng-repeat="customField in vm_dc.listCustomFields.rows">\n                                            <td ng-click="vm_dc.createOrEditListCustomField($event, customField)" md-cell>{{customField.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditListCustomField($event, customField)" md-cell>{{customField.alias}}</td>\n                                            <td ng-click="vm_dc.createOrEditListCustomField($event, customField)" md-cell>{{ vm_dc.arraytype[customField.type].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditListCustomField($event, customField)" md-cell class="required ">\n                                                <md-icon md-colors="{color: {{customField.required ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{customField.required? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                            </td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CONTACTMANAGER.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditListCustomField($event, customField)" translate="CONTACTMANAGER.EDIT_CUSTOMFIELD">\n                                                                Edit CustomField\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(customField, $event)" translate="CONTACTMANAGER.DELETE_CUSTOMFIELD">\n                                                                Delete CustomField\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.listCustomFields.rows.length">\n                                            <td md-cell colspan="7">\n                                                <span class="text-boxed-ligth" translate="CONTACTMANAGER.NO_CUSTOMFIELD_AVAILABLE">No customfield available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'CONTACTMANAGER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CONTACTMANAGER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CONTACTMANAGER.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                                md-page="vm_dc.query.page" md-total="{{vm_dc.listCustomFields.count}}" md-on-paginate="vm_dc.getListCustomFields" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="CONTACTMANAGER.DISPOSITIONS">DISPOSITIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="list-detail-form-container voicedispositions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="ListVoiceDispositionsController as vm_dc" ng-init="vm_dc.init(vm.list)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedListVoiceDispositions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="CONTACTMANAGER.VOICEDISPOSITIONS">VoiceDispositions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditListVoiceDisposition($event)" aria-label="add voiceDisposition" translate translate-attr-label="CONTACTMANAGER.ADD_VOICEDISPOSITION">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedListVoiceDispositions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedListVoiceDispositions.length}} {{vm_dc.selectedListVoiceDispositions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedListVoiceDispositions" csv-label="true" filename="lists.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedListVoiceDispositions($event)" aria-label="delete selected" translate translate-attr-label="LISTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedListVoiceDispositions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getListVoiceDispositions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'CONTACTMANAGER.ID\' | translate }}</th>\n                                            <th md-column md-order-by="name">{{ \'CONTACTMANAGER.NAME\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'CONTACTMANAGER.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="voiceDisposition" md-select-id="id" ng-repeat="voiceDisposition in vm_dc.listVoiceDispositions.rows">\n                                            <td ng-click="vm_dc.createOrEditListVoiceDisposition($event, voiceDisposition)" md-cell>{{voiceDisposition.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditListVoiceDisposition($event, voiceDisposition)" md-cell>{{voiceDisposition.name}}</td>\n                                            <td ng-click="vm_dc.createOrEditListVoiceDisposition($event, voiceDisposition)" md-cell>{{voiceDisposition.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CONTACTMANAGER.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditListVoiceDisposition($event, voiceDisposition)" translate="CONTACTMANAGER.EDIT_VOICEDISPOSITION">\n                                                                Edit VoiceDisposition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(voiceDisposition, $event)" translate="CONTACTMANAGER.DELETE_VOICEDISPOSITION">\n                                                                Delete VoiceDisposition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.listVoiceDispositions.rows.length">\n                                            <td md-cell colspan="5">\n                                                <span class="text-boxed-ligth" translate="CONTACTMANAGER.NO_VOICEDISPOSITION_AVAILABLE">No voicedisposition available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'CONTACTMANAGER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CONTACTMANAGER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CONTACTMANAGER.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                                md-page="vm_dc.query.page" md-total="{{vm_dc.listVoiceDispositions.count}}" md-on-paginate="vm_dc.getListVoiceDispositions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/contactmanager/views/lists/edit/voiceDispositions/dialog.html",'<md-dialog class="voiceDisposition-dialog" aria-label="New VoiceDisposition">\n    <form name="voiceDispositionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="CONTACTMANAGER.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.voiceDisposition.name" ng-required="true" autofocus>\n                <div ng-messages="voiceDispositionForm[\'name\'].$error" ng-show="voiceDispositionForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="CONTACTMANAGER.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newVoiceDisposition" ng-click="vm.saveVoiceDisposition()" class="send-button md-accent md-raised" ng-disabled="voiceDispositionForm.$invalid || voiceDispositionForm.$pristine" aria-label="SAVE" translate="CONTACTMANAGER.SAVE"\n                    translate-attr-aria-label="CONTACTMANAGER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newVoiceDisposition" ng-click="vm.addNewVoiceDisposition()" class="send-button md-accent md-raised" ng-disabled="voiceDispositionForm.$invalid" aria-label="ADD" translate="CONTACTMANAGER.ADD_VOICEDISPOSITION" translate-attr-aria-label="CONTACTMANAGER.ADD_VOICEDISPOSITION">\n                    ADD VOICEDISPOSITION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newVoiceDisposition" ng-click="vm.deleteVoiceDisposition($event)" aria-label="DELETE" translate translate-attr-aria-label="CONTACTMANAGER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="CONTACTMANAGER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/contactmanager/views/lists/lists.html",'<div id="lists" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-account-circle" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="CONTACTMANAGER.LISTS">Lists</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="CONTACTMANAGER.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedLists.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedLists =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="CONTACTMANAGER.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-lists-count">\n                    <span>{{vm.selectedLists.length}}</span>\n                <span translate="CONTACTMANAGER.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="LISTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllLists()" translate="CONTACTMANAGER.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectLists()" translate="CONTACTMANAGER.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedLists" csv-label="true" filename="lists.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedLists($event)" aria-label="delete selected" translate translate-attr-label="LISTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- LIST TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedLists" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getLists">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'CONTACTMANAGER.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'CONTACTMANAGER.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'CONTACTMANAGER.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.lists.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="CONTACTMANAGER.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="list" md-select-id="id" ng-repeat="list in vm.lists.rows">\n                                <td md-cell ng-if="list.userpic"><img class="avatar" alt="{{list.name}}" ng-src="api/users/{{list.id}}/avatar" /></td>\n                                <td md-cell ng-if="!list.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{list.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditList($event, list)" md-cell class="id ">{{list.id}}</td>\n                                <td ng-click="vm.createOrEditList($event, list)" md-cell class="name ">{{list.name}}</td>\n                                <td ng-click="vm.createOrEditList($event, list)" md-cell class="description ">{{list.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="CONTACTMANAGER.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(list, $event)" translate="CONTACTMANAGER.EDIT_LIST">\n                                                    Edit List\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotocontactsgoto(list, $event)" translate="CONTACTMANAGER.GOTOCONTACTS_LIST">\n                                                    goToContacts List\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.exportcsvcontactsexport(list, $event)" translate="CONTACTMANAGER.EXPORTCSVCONTACTS_LIST">\n                                                    exportCsvContacts List\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.agentadddialog(list, $event)" translate="CONTACTMANAGER.AGENTADD_LIST">\n                                                    AgentAdd List\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(list, $event)" translate="CONTACTMANAGER.DELETE_LIST">\n                                                    Delete List\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'CONTACTMANAGER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'CONTACTMANAGER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'CONTACTMANAGER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.lists.count}}" md-on-paginate="vm.getLists" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / LIST TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD LIST BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-list-button" ng-click="vm.createOrEditList($event)" aria-label="add list" translate translate-attr-aria-label="CONTACTMANAGER.ADD_LIST">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD LIST BUTTON --\x3e\n</div>'),e.put("app/main/apps/dashboards/views/custom/custom.html",'<div ng-if="!vm.customDashboard">\n    <p>Custom Dashboard not available...</p>\n</div>\n<div id="dashboard-custom" ng-if="vm.customDashboard" ng-cloak layout-fill>\n    <md-content>\n        <md-toolbar class="md-default md-accent filter-header">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead">{{vm.customDashboard.name}}</span>\n                <div flex></div>\n                <div layout="column">\n                    <span class="font-size-10" translate="DASHBOARDS.FILTER_VOICE_QUEUES">Filter Voice Queues</span>\n                    <md-select placeholder="Select one or more queues" class="font-size-12 no-margin w-200" md-on-close="vm.onChangeVoiceQueues()" ng-model="vm.voiceQueuesSelected" multiple aria-label="voiceQueues">\n                        <md-option ng-value="voiceQueue.id" ng-repeat="voiceQueue in vm.voiceQueues.rows">{{ voiceQueue.name }}</md-option>\n                    </md-select>\n                </div>\n                <md-button ng-if="vm.currentUser.role == \'admin\'" class="md-icon-button" ng-click="vm.goToEdit()" aria-label="goToEdit">\n                    <md-tooltip md-direction="top"><span translate="DASHBOARDS.EDIT"></span></md-tooltip>\n                    <md-icon md-font-icon="icon-table-edit"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <ms-widget-engine config="vm.customDashboard"></ms-widget-engine>\n    </md-content>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/agent.general.html",'<div id="agent-general" layout="column">\n    <div layout="row" layout-align="start center" class="md-primary-bg">\n        <md-button class="md-raised no-margin width-50" style="border-radius: 0px" ng-class="{\'md-primary\': !vm.isActiveTab(0)}" ng-click="vm.onClickTab(0)" aria-label="home">\n            <md-tooltip md-direction="bottom" md-delay="500">Home</md-tooltip>\n            <md-icon md-font-icon="icon-home" class="icon"></md-icon>\n        </md-button>\n\n        <div layout="row" layout-align="start center" ms-scroll>\n            <div style="height: 36px" layout="column" ng-repeat="(key, tab) in vm.tabs" ng-click="vm.onClickTab(tab.id)" ng-class="{\'grey-50-bg\': vm.isActiveTab(tab.id)}">\n                <div style="height: 34px" layout="row" layout-align="space-between center">\n                    <md-icon md-font-icon="{{tab.icon}}" class="icon s16 margin-horizontal-5" ng-class="tab.color + \'-fg\'"></md-icon>\n                    <span class="text-truncate font-size-12" ng-class="vm.isActiveTab(tab.id) ? \'black-fg\' : \'grey-300-fg\'"> {{tab.title}} <span ng-if="tab.badges" class="badge md-white-fg md-red-bg">{{tab.badges}}</span></span>\n                    <md-button class="md-icon-button md-mini no-margin" ng-class="vm.isActiveTab(tab.id) ? \'md-primary\' : \'grey-300-fg\'" aria-label="close" ng-click="vm.closeTab(tab)">\n                        <md-icon md-font-icon="icon-close-circle-outline" class="icon s16"></md-icon>\n                    </md-button>\n                </div>\n                <div style="height: 2px" ng-class="vm.isActiveTab(tab.id) ? tab.color + \'-bg\' : \'\'"></div>\n            </div>\n        </div>\n    </div>\n    <div layout="row" class="agent-content" ng-if="vm.isActiveTab(0)" ng-style="{\'top\': vm.detectBrowser.browser == \'safari\' ? \'100px\' : \'36px\'}" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.html\'" ng-controller="AgentGeneralHomeController as vm_home"\n        ng-init="vm_home.init(vm.license)"></div>\n    <div ng-if="!vm.isActiveTab(0)" ng-repeat="(key, tab) in vm.tabs" ng-switch="tab.type">\n        <div ng-switch-when="contact">\n            <div class="agent-content" ms-scroll ng-if="vm.isActiveTab(tab.id)" ng-style="{\'top\': vm.detectBrowser.browser == \'safari\' ? \'100px\' : \'36px\'}" ng-include="\'app/main/apps/dashboards/views/general/agent/contact/agent.general.contact.html\'" ng-controller="AgentGeneralContactController as vm"\n                ng-init="vm.init(tab,$parent.vm.license)"></div>\n        </div>\n        <div ng-switch-when="popup">\n            <div ng-if="vm.isActiveTab(tab.id)" ms-scroll ng-include="\'app/main/apps/dashboards/views/general/agent/popup/agent.general.popup.html\'" ng-controller="AgentGeneralPopupController as vm" ng-init="vm.init(tab)"></div>\n        </div>\n        <div ng-switch-when="jscripty">\n            <div class="agent-content" ms-scroll ng-if="vm.isActiveTab(tab.id)" ng-style="{\'top\': vm.detectBrowser.browser == \'safari\' ? \'100px\' : \'36px\'}" ng-include="\'app/main/apps/dashboards/views/general/agent/jscripty/agent.general.jscripty.html\'" ng-controller="AgentGeneralJscriptyController as vm"\n                ng-init="vm.init(tab)"></div>\n        </div>\n        <div ng-switch-when="interaction">\n            <div id="interaction-app" ng-if="vm.isActiveTab(tab.id)" class="agent-content" ng-style="{\'top\': vm.detectBrowser.browser == \'safari\' ? \'100px\' : \'36px\'}" ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/agent.general.interaction.html\'"\n                ng-controller="AgentGeneralInteractionController as vm" ng-init="vm.init(tab)"></div>\n        </div>\n    </div>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/contact/agent.general.contact.html",'<md-tabs md-selected="vm.currentTab" md-dynamic-height>\n    <md-tab>\n        <md-tab-label>\n            <span translate="DASHBOARDS.DETAIL">Detail</span>\n        </md-tab-label>\n        <md-tab-body>\n            <md-content>\n                <div layout="row">\n                    \x3c!-- MS-CARD --\x3e\n                    <md-card class="template-7" layout="row" layout-align="space-between" ng-repeat="call in vm.tab.calls track by call.uniqueid">\n                        <div class="info" layout="column" layout-align="space-between" layout-fill flex>\n                            <div layout="row">\n                                <span ng-if="call.answeredAt" class="text-boxed indigo-100-bg"><timer start-time="call.answeredAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer></span>\n                                <div flex></div>\n                                <span ng-if="call.disposedAt" class="text-boxed amber-200-bg"><timer start-time="call.disposedAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer></span>\n                            </div>\n                            <div class="p-16">\n                                <div class="title h1">\n                                    <md-icon ng-if="!call.routeId" md-font-icon="icon-phone-incoming"></md-icon>\n                                    <md-icon ng-if="call.routeId" md-font-icon="icon-phone-outgoing"></md-icon>\n                                    {{ call.routeId ? call.destcalleridnum : call.calleridnum }}\n                                </div>\n\n                                <div class="subtitle h4 secondary-text" ng-if="call.calleridname && call.calleridname != \'<unknown>\' && !call.routeId">\n                                    <md-icon md-font-icon="icon-account"></md-icon>\n                                    Name: {{ call.calleridname }}\n                                </div>\n\n                                <div class="text h4 pt-8" ng-if="call.queue">\n                                    <md-icon md-font-icon="icon-stackoverflow"></md-icon>\n                                    Queue: {{call.queue}}\n                                </div>\n                                <div class="text h4 pt-8" ng-if="call.variables.extravar">\n                                    <md-icon md-font-icon="icon-minus"></md-icon>\n                                    Extra: {{call.variables.extravar}}\n                                </div>\n                            </div>\n                            <div layout="row" layout-align="end center">\n                                <md-button ng-if="call.disposedAt" type="submit" ng-click="vm.disposeCall($event, call)" class="send-button md-accent md-raised">\n                                    {{ \'DASHBOARDS.DISPOSE\' | translate}}\n                                </md-button>\n                            </div>\n                        </div>\n                    </md-card>\n                    \x3c!-- / MS-CARD --\x3e\n                    <div flex layout="row" layout-align="end center">\n                        <md-button type="submit" ng-click="vm.mergeContact($event)" class="send-button md-raised md-accent ng-scope" ng-if="!vm.newContact" ng-disabled="vm.detailForm.$invalid || vm.customFieldsForm.$invalid" aria-label="merge">\n                            <md-tooltip md-direction="top"><span translate="DASHBOARDS.MERGE"></span></md-tooltip>\n                            <md-icon md-font-icon="icon-source-fork"></md-icon>\n                        </md-button>\n                        <md-button type="submit" ng-click="vm.duplicateContact($event)" class="send-button md-raised md-accent ng-scope" ng-if="!vm.newContact" ng-disabled="vm.detailForm.$invalid || vm.customFieldsForm.$invalid" aria-label="duplicate">\n                            <md-tooltip md-direction="top"><span translate="DASHBOARDS.DUPLICATE"></span></md-tooltip>\n                            <md-icon md-font-icon="icon-content-duplicate"></md-icon>\n                        </md-button>\n                        <md-button type="submit" ng-click="vm.addNewContact($event)" class="send-button md-accent md-raised" ng-if="vm.newContact" ng-disabled="vm.detailForm.$invalid || vm.customFieldsForm.$invalid" aria-label="add">\n                            {{ \'DASHBOARDS.ADD\'| translate }}\n                        </md-button>\n                        <md-button type="submit" ng-click="vm.saveContact($event)" class="send-button md-accent md-raised" ng-if="!vm.newContact" ng-disabled="vm.detailForm.$invalid || vm.customFieldsForm.$invalid" aria-label="save">\n                            {{ \'DASHBOARDS.SAVE\' | translate }}\n                        </md-button>\n                    </div>\n                </div>\n                <div layout="row">\n                    <div layout="column" flex="75">\n                        <md-card layout-padding>\n                            <div class="h2 secondary-text text-truncate" translate="DASHBOARDS.PERSONAL_INFO">PERSONAL_INFO</div>\n                            <div class="subtitle secondary-text">\n                                <span translate="CONTACTMANAGER.CREATED_AT"></span> <span>{{vm.contact.createdAt | date:\'medium\'}}</span>\n                            </div>\n\n                            <form name="vm.detailForm" novalidate>\n                                <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                    <div layout="row" flex>\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="DASHBOARDS.FIRSTNAME">First Name</label>\n                                            <md-icon md-font-icon="icon-account" class="firstname"></md-icon>\n                                            <input type="text" name="firstName" ng-model="vm.contact.firstName" class="text-truncate" required>\n                                            <div ng-messages="vm.detailForm.firstName.$error" ng-show="vm.detailForm.firstName.$touched" role="alert">\n                                                <div ng-message="required">\n                                                    <span translate="DASHBOARDS.ERRORS.FIRSTNAME_REQUIRED">First name field is required</span>\n                                                </div>\n                                            </div>\n                                        </md-input-container>\n                                        <div>\n                                            <md-menu ng-if="!vm.newContact">\n                                                <md-button ng-disabled="!vm.license.jscripty" class="md-icon-button md-raised md-accent ng-scope md-ink-ripple" title="JSCRIPTY PROJECTS" ng-click="$mdOpenMenu($event)" aria-label="jscripty">\n                                                    <md-icon md-font-icon="icon-script"></md-icon>\n                                                </md-button>\n\n                                                <md-menu-content>\n                                                    <md-menu-item ng-if="vm.jscriptyProjects && vm.jscriptyProjects.rows.length" ng-repeat="project in vm.jscriptyProjects.rows">\n                                                        <md-button ng-click="vm.addJscriptyTab(project, $event)">\n                                                            <md-icon md-font-icon="icon-script"></md-icon> {{project.name}}\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                    <md-menu-item ng-if="!vm.jscriptyProjects || !vm.jscriptyProjects.rows.length">\n                                                        <md-button disabled="disabled" translate="DASHBOARDS.NO_JSCRIPTY_PROJECTS_AVAILABLE">\n                                                            <md-icon md-font-icon="icon-script"></md-icon> No jscripty projects available\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                </md-menu-content>\n                                            </md-menu>\n                                        </div>\n                                    </div>\n                                    <div flex="5"></div>\n                                    <md-input-container class="md-block" flex-gt-sm="">\n                                        <label translate="DASHBOARDS.LASTNAME">Last Name</label>\n                                        <input type="text" name="lastName" ng-model="vm.contact.lastName" class="text-truncate">\n                                    </md-input-container>\n                                </div>\n\n                                <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                    <div layout="row" flex>\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="DASHBOARDS.PHONE">Phone</label>\n                                            <md-icon md-font-icon="icon-phone"></md-icon>\n                                            <input type="text" name="phone" ng-model="vm.contact.phone" class="text-truncate" required>\n                                            <div class="hint"><span ng-show="!vm.user.phoneBarRemoteControl || !vm.contact.phone" translate="CONTACTMANAGER.HELP.PHONEBAR_API"></span></div>\n                                            <div ng-messages="vm.detailForm.phone.$error" ng-show="vm.detailForm.phone.$touched" role="alert">\n                                                <div ng-message="required">\n                                                    <span translate="DASHBOARDS.ERRORS.PHONE_REQUIRED">Phone name field is required</span>\n                                                </div>\n                                            </div>\n                                        </md-input-container>\n                                        <div>\n                                            \x3c!-- click to call directive --\x3e\n                                            <ms-click-to-call target="vm.contact.phone" prefix="vm.list ? vm.list.dialPrefix : null" license="vm.license" type="\'button\'"></ms-click-to-call>\n                                            \x3c!--  / click to call directive --\x3e\n                                        </div>\n                                    </div>\n                                    <div flex="5"></div>\n                                    <div layout="row" flex>\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="DASHBOARDS.MOBILE">Mobile</label>\n                                            <md-icon md-font-icon="icon-cellphone-iphone"></md-icon>\n                                            <input type="text" name="mobile" ng-model="vm.contact.mobile" class="text-truncate">\n                                            <div class="hint"><span ng-show="!vm.user.phoneBarRemoteControl || !vm.contact.mobile" translate="CONTACTMANAGER.HELP.PHONEBAR_API"></span></div>\n                                        </md-input-container>\n                                        <div>\n                                            \x3c!-- click to call directive --\x3e\n                                            <ms-click-to-call target="vm.contact.mobile" prefix="vm.list ? vm.list.dialPrefix : null" license="vm.license" type="\'button\'"></ms-click-to-call>\n                                            \x3c!--  / click to call directive --\x3e\n                                        </div>\n                                        <div>\n                                            <md-menu ng-if="!vm.newContact">\n                                                <md-button ng-disabled="!vm.license.messaging || !vm.hasPermission(107) || !vm.contact.mobile" class="md-icon-button md-raised md-accent ng-scope md-ink-ripple" title="NEW SMS" ng-click="$mdOpenMenu($event)" aria-label="sms">\n                                                    <md-icon md-font-icon="icon-message-text"></md-icon>\n                                                </md-button>\n\n                                                <md-menu-content>\n                                                    <md-menu-item ng-if="vm.smsAccounts && vm.smsAccounts.rows.length" ng-repeat="account in vm.smsAccounts.rows">\n                                                        <md-button ng-click="vm.composeInteraction($event, \'Sms\', account, vm.contact.mobile)">\n                                                            <md-icon md-font-icon="icon-message-text"></md-icon> {{account.name}}\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                    <md-menu-item ng-if="!vm.smsAccounts || !vm.smsAccounts.rows.length">\n                                                        <md-button disabled="disabled" translate="DASHBOARDS.NO_SMS_ACCOUNTS_AVAILABLE">\n                                                            <md-icon md-font-icon="icon-message-text"></md-icon> No sms accounts available\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                </md-menu-content>\n                                            </md-menu>\n                                        </div>\n                                    </div>\n                                </div>\n\n                                <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                    <div layout="row" flex>\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="DASHBOARDS.EMAIL">Email</label>\n                                            <md-icon md-font-icon="icon-email" class="email"></md-icon>\n                                            <input type="email" name="email" ng-model="vm.contact.email" class="text-truncate">\n                                            <div ng-messages="vm.detailForm.firstName.$error" ng-show="vm.detailForm.firstName.$touched" role="alert">\n                                                <div ng-message="email">\n                                                    <span translate="DASHBOARDS.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                                                </div>\n                                            </div>\n                                        </md-input-container>\n                                        <div>\n                                            <md-menu ng-if="!vm.newContact">\n                                                <md-button ng-disabled="!vm.license.mail || !vm.hasPermission(106) || !vm.contact.email" class="md-icon-button md-raised md-accent ng-scope md-ink-ripple" title="NEW EMAIL" ng-click="$mdOpenMenu($event)" aria-label="email">\n                                                    <md-icon md-font-icon="icon-email"></md-icon>\n                                                </md-button>\n\n                                                <md-menu-content>\n                                                    <md-menu-item ng-if="vm.mailAccounts && vm.mailAccounts.rows.length" ng-repeat="account in vm.mailAccounts.rows">\n                                                        <md-button ng-click="vm.composeInteraction($event, \'Mail\', account, vm.contact.email)">\n                                                            <md-icon md-font-icon="icon-email"></md-icon> {{account.name}}\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                    <md-menu-item ng-if="!vm.mailAccounts || !vm.mailAccounts.rows.length">\n                                                        <md-button disabled="disabled" translate="DASHBOARDS.NO_MAIL_ACCOUNTS_AVAILABLE">\n                                                            <md-icon md-font-icon="icon-email"></md-icon> No email accounts available\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                </md-menu-content>\n                                            </md-menu>\n                                        </div>\n                                    </div>\n                                    <div flex="5"></div>\n                                    <div layout="row" flex>\n                                        <md-input-container class="md-block" flex-gt-sm="">\n                                            <label translate="DASHBOARDS.FAX">Fax</label>\n                                            <md-icon md-font-icon="icon-deskphone"></md-icon>\n                                            <input type="text" name="fax" ng-model="vm.contact.fax">\n                                        </md-input-container>\n                                        <div>\n                                            <md-menu ng-if="!vm.newContact">\n                                                <md-button ng-disabled="!vm.license.fax || !vm.hasPermission(109) || !vm.contact.fax" class="md-icon-button md-raised md-accent ng-scope md-ink-ripple" title="NEW FAX" ng-click="$mdOpenMenu($event)" aria-label="fax">\n                                                    <md-icon md-font-icon="icon-deskphone"></md-icon>\n                                                </md-button>\n\n                                                <md-menu-content>\n                                                    <md-menu-item ng-if="vm.faxAccounts && vm.faxAccounts.rows.length" ng-repeat="account in vm.faxAccounts.rows">\n                                                        <md-button ng-click="vm.composeInteraction($event, \'Fax\', account, vm.contact.fax)">\n                                                            <md-icon md-font-icon="icon-deskphone"></md-icon> {{account.name}}\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                    <md-menu-item ng-if="!vm.faxAccounts || !vm.faxAccounts.rows.length">\n                                                        <md-button disabled="disabled" translate="DASHBOARDS.NO_FAX_ACCOUNTS_AVAILABLE">\n                                                            <md-icon md-font-icon="icon-deskphone"></md-icon> No fax accounts available\n                                                        </md-button>\n                                                    </md-menu-item>\n                                                </md-menu-content>\n                                            </md-menu>\n                                        </div>\n                                    </div>\n                                </div>\n\n                                <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                    <md-input-container class="md-block" flex-gt-sm="" ng-init="vm.contact.dateOfBirth = vm.getDateFromString(vm.contact.dateOfBirth)">\n                                        <label translate="DASHBOARDS.DATE_OF_BIRTH">Date of Birth</label>\n                                        <mdp-date-picker mdp-open-on-click mdp-format="YYYY-MM-DD" name="dateOfBirth" ng-model="vm.contact.dateOfBirth"></mdp-date-picker>\n                                    </md-input-container>\n                                </div>\n\n                                <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                    <md-input-container class="md-block" flex-gt-sm="">\n                                        <label translate="DASHBOARDS.COMPANY">Company</label>\n                                        <md-icon md-font-icon="icon-domain" class="email"></md-icon>\n                                        <md-select name="company" ng-model="vm.contact.CompanyId">\n                                            <md-option ng-value="company.id" ng-repeat="company in vm.tab.companies.rows">{{company.name}}</md-option>\n                                            <md-option ng-value="null"><em translate="DASHBOARDS.NONE">None</em></md-option>\n                                        </md-select>\n                                    </md-input-container>\n                                    <div flex="5"></div>\n                                    <md-input-container class="md-block" flex-gt-sm="">\n                                        <label translate="DASHBOARDS.TAG">TAG</label>\n                                        <md-icon md-font-icon="icon-tag"></md-icon>\n                                        <md-select ng-model="vm.contact.tags" multiple>\n                                            <md-option ng-value="tag.name" ng-repeat="tag in vm.tab.tags.rows">{{tag.name}}</md-option>\n                                        </md-select>\n                                    </md-input-container>\n                                </div>\n\n                                <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                    <md-input-container class="md-block" flex-gt-sm="">\n                                        <label translate="DASHBOARDS.COUNTRY">Country</label>\n                                        <md-icon md-font-icon="icon-home" class="country"></md-icon>\n                                        <input type="text" name="country" ng-model="vm.contact.country" class="text-truncate">\n                                    </md-input-container>\n                                    <div flex="5"></div>\n                                    <md-input-container class="md-block" flex-gt-sm="">\n                                        <label translate="DASHBOARDS.CITY">City</label>\n                                        <input type="text" name="city" ng-model="vm.contact.city">\n                                    </md-input-container>\n                                </div>\n\n                                <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                    <md-input-container class="md-block" flex-gt-sm="">\n                                        <label translate="DASHBOARDS.STREET">Street</label>\n                                        <input type="text" name="street" ng-model="vm.contact.street">\n                                    </md-input-container>\n                                    <div flex="5"></div>\n                                    <md-input-container class="md-block" flex-gt-sm="">\n                                        <label translate="DASHBOARDS.POSTALCODE">Postal Code</label>\n                                        <input type="text" name="postalCode" ng-model="vm.contact.postalCode">\n                                    </md-input-container>\n                                </div>\n\n                                <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                    <md-input-container class="md-block" flex-gt-sm="">\n                                        <label translate translate-attr-placeholder="DASHBOARDS.NOTES">Notes</label>\n                                        <md-icon md-font-icon="icon-note"></md-icon>\n                                        <textarea ng-model="vm.contact.description" type="text" max-rows="4"></textarea>\n                                    </md-input-container>\n                                </div>\n                            </form>\n                        </md-card>\n                        <md-card>\n                            <div class="h2 secondary-text text-truncate" translate="DASHBOARDS.SOCIAL">Social</div>\n                            <div layout-gt-sm="row" class="layout-gt-sm-row">\n                                <md-input-container class="md-block" flex-gt-sm="">\n                                    <label>Facebook</label>\n                                    <md-icon md-font-icon="icon-facebook" class="facebook"></md-icon>\n                                    <input type="text" name="facebook" ng-model="vm.contact.facebook" class="text-truncate">\n                                </md-input-container>\n                                <div flex="5"></div>\n                                <md-input-container class="md-block" flex-gt-sm="">\n                                    <label>Twitter</label>\n                                    <md-icon md-font-icon="icon-twitter" class="twitter"></md-icon>\n                                    <input type="text" name="twitter" ng-model="vm.contact.twitter" class="text-truncate">\n                                </md-input-container>\n                            </div>\n                        </md-card>\n                    </div>\n                    <div flex="25" layout="column" layout-padding>\n                        <md-card flex="100">\n                            <div class="h2 secondary-text text-truncate" translate="DASHBOARDS.CUSTOM_FIELDS">CUSTOM FIELDS</div>\n                            <form name="vm.customFieldsForm" novalidate>\n\n                                \x3c!-- START INPUT LIST --\x3e\n                                <md-input-container class="md-block" ng-if="!vm.contact.ListId">\n                                    <label translate translate-attr-placeholder="DASHBOARDS.LIST">List</label>\n                                    <md-select name="list" ng-model="vm.contact.ListId" ng-change="vm.getCustomFields(vm.contact.ListId)" required>\n                                        <md-optgroup label="Lists">\n                                            <md-option ng-value="list.id" ng-repeat="list in vm.tab.userLists.rows">#{{list.id}} - {{list.name}}</md-option>\n                                        </md-optgroup>\n                                    </md-select>\n                                </md-input-container>\n                                <md-input-container class="md-block" ng-if="vm.contact.ListId">\n                                    <label translate translate-attr-placeholder="DASHBOARDS.LIST">List</label>\n                                    <md-select ng-disabled="!vm.newContact" name="list" ng-model="vm.contact.ListId" required>\n                                        <md-optgroup label="Lists">\n                                            <md-option ng-value="list.id" ng-repeat="list in vm.tab.lists.rows">#{{list.id}} - {{list.name}}</md-option>\n                                        </md-optgroup>\n                                    </md-select>\n                                </md-input-container>\n                                \x3c!-- END INPUT LIST --\x3e\n\n                                <div ng-repeat="customField in vm.tab.customFields.rows" ng-switch="customField.type">\n                                    <md-input-container class="md-block" ng-switch-when="datetime">\n                                        <label>{{customField.alias}}<span ng-if="customField.required">*</span></label>\n                                        <div ng-init="vm.contact[\'cf_\' + customField.id] = vm.getDateFromString(vm.contact[\'cf_\' + customField.id])">\n                                            <mdp-date-picker mdp-open-on-click ng-required="customField.required" mdp-format="YYYY-MM-DD" ng-model="vm.contact[\'cf_\' + customField.id]"></mdp-date-picker>\n                                            <mdp-time-picker mdp-open-on-click mdp-placeholder="Time" ng-required="customField.required" mdp-format="HH:mm:ss" mdp-auto-switch="true" ng-model="vm.contact[\'cf_\' + customField.id]"></mdp-time-picker>\n                                        </div>\n                                    </md-input-container>\n\n                                    <md-input-container class="md-block" ng-switch-when="select">\n                                        <label>{{customField.alias}}<span ng-if="customField.required">*</span></label>\n                                        <md-select ng-model="vm.contact[\'cf_\' + customField.id]" ng-required="customField.required">\n                                            <md-option ng-repeat="value in customField.values" ng-value="value.value">{{value.value}}</md-option>\n                                            <md-option ng-value="null"><em translate="CONTACTMANAGER.NONE">None</em></md-option>\n                                        </md-select>\n                                    </md-input-container>\n\n                                    <md-input-container class="md-block" ng-switch-when="switch">\n                                        <md-switch aria-label="{{customField.alias}}" ng-model="vm.contact[\'cf_\' + customField.id]" ng-true-value="1" ng-false-value="0">\n                                            {{customField.alias}}<span ng-if="customField.required">*</span>\n                                        </md-switch>\n                                    </md-input-container>\n\n                                    <md-input-container class="md-block" ng-switch-default>\n                                        <label>{{customField.alias}}<span ng-if="customField.required">*</span></label>\n                                        <input type="{{customField.type}}" ng-model="vm.contact[\'cf_\' + customField.id]" ng-required="customField.required">\n                                    </md-input-container>\n                                </div>\n                            </form>\n                        </md-card>\n                    </div>\n                </div>\n            </md-content>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="DASHBOARDS.CUSTOMER_JOURNEY">Customer Journey</span>\n        </md-tab-label>\n        <md-tab-body>\n            <md-content class="md-padding" id="interaction-content">\n                <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.journey.html\'"></div>\n            </md-content>\n        </md-tab-body>\n    </md-tab>\n</md-tabs>'),e.put("app/main/apps/dashboards/views/general/agent/contact/dispose/dialog.html",'<md-dialog class="agent-dialog" aria-label="agent dispose">\n    <md-toolbar class="md-background-bg">\n        <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n            <span class="title" translate="DASHBOARDS.DISPOSE"></span>\n            <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n            </md-button>\n        </div>\n    </md-toolbar>\n    <md-dialog-content ms-scroll>\n        <div ng-if="!vm.isReschedule">\n            <md-input-container class="md-block">\n                <label translate="DASHBOARDS.DISPOSITIONS">Dispositions</label>\n                <md-select name="disposition" ng-model="vm.choice" required>\n                    <md-optgroup ng-if="vm.dispositions.rows.length" label="Custom">\n                        <md-option ng-value="disposition.name" ng-repeat="disposition in vm.dispositions.rows">{{ disposition.name }}</md-option>\n                    </md-optgroup>\n                    <md-optgroup label="Default">\n                        <md-option ng-value="null">NONE</md-option>\n                        <md-option value="fax"><span translate="DASHBOARDS.FAX">Fax</span></md-option>\n                        <md-option value="amd"><span translate="DASHBOARDS.ANSWER_MACHINE">Answer Machine</span></md-option>\n                        <md-option value="interested"><span translate="DASHBOARDS.INTERESTED">Interested</span></md-option>\n                        <md-option value="notinterested"><span translate="DASHBOARDS.NOT_INTERESTED">Not Interested</span></md-option>\n                        <md-option value="sold"><span translate="DASHBOARDS.SOLD">Sold</span></md-option>\n                        <md-option value="special"><span translate="DASHBOARDS.SPECIAL">Special</span></md-option>\n                    </md-optgroup>\n                </md-select>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="DASHBOARDS.NOTE">Note</label>\n                <textarea ng-model="vm.note" md-maxlength="255" max-rows="5" autofocus></textarea>\n            </md-input-container>\n        </div>\n        <div ng-if="vm.isReschedule" layout="row">\n            <div flex class="md-block">\n                <mdp-date-picker mdp-open-on-click required name="date" mdp-placeholder="Date" mdp-format="YYYY-MM-DD" mdp-min-date="vm.hopper.minDate" ng-model="vm.hopper.dateTime">\n                    <div ng-messages="dateTime.date.$error" ng-show="dateTime.date.$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="DASHBOARDS.ERRORS.DATE_REQUIRED">Date is required</span>\n                        </div>\n                        <div ng-message="format">\n                            <span translate="DASHBOARDS.ERRORS.DATE_INVALID">Date is invalid</span>\n                        </div>\n                    </div>\n                </mdp-date-picker>\n            </div>\n\n            <div flex class="md-block">\n                <mdp-time-picker mdp-open-on-click required name="time" mdp-placeholder="Time" mdp-format="HH:mm:ss" mdp-auto-switch="true" ng-model="vm.hopper.dateTime">\n                    <div ng-messages="dateTime.time.$error" ng-show="dateTime.time.$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="DASHBOARDS.ERRORS.TIME_REQUIRED">Time is required</span>\n                        </div>\n                        <div ng-message="format">\n                            <span translate="DASHBOARDS.ERRORS.TIME_INVALID">Time is invalid</span>\n                        </div>\n                    </div>\n                </mdp-time-picker>\n            </div>\n        </div>\n    </md-dialog-content>\n    <md-dialog-actions ng-if="!vm.isReschedule" layout="row">\n        <md-button ng-disabled="!(vm.choice || vm.note)" class="send-button md-raised md-accent" ng-click="vm.saveDisposition()">\n            {{(vm.choice ? \'DASHBOARDS.DISPOSE\' : \'DASHBOARDS.SAVE\') | translate}}\n        </md-button>\n        <md-button ng-if="vm.dialerCall" class="send-button md-raised md-primary" translate="DASHBOARDS.RESCHEDULE" ng-click="vm.saveDisposition(\'reschedule\')">\n            Reschedule\n        </md-button>\n        <md-button ng-if="vm.dialerCall" class="send-button md-accent md-raised" translate="DASHBOARDS.RECALLME" ng-click="vm.saveDisposition(\'recallme\')">\n            Recall Me\n        </md-button>\n        <span flex></span>\n        <md-button ng-if="vm.dialerCall" class="md-raised md-warn" translate="DASHBOARDS.BLACKLIST" ng-click="vm.saveDisposition(\'blacklist\')">\n            Blacklist\n        </md-button>\n    </md-dialog-actions>\n    <md-dialog-actions ng-if="vm.isReschedule" layout="row" layout-align="space-between center">\n        <div layout="row" layout-align="start center">\n            <md-button type="submit" ng-disabled="vm.disable" ng-click="vm.saveReschedule()" class="send-button md-accent md-raised" ng-disabled="dateTime.$invalid || dateTime.$pristine" aria-label="SAVE" translate="DASHBOARDS.SAVE" translate-attr-aria-label="DASHBOARDS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n    </md-dialog-actions>\n</md-dialog>'),e.put("app/main/apps/dashboards/views/general/agent/contact/reschedule/dialog.html",'<md-dialog class="agent-dialog" aria-label="New Agent">\n    <form name="dateTime" class="md-inline-form" novalidate>\n        <md-toolbar class="md-background-bg">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <div layout="row">\n                <div flex class="md-block">\n                    <mdp-date-picker mdp-open-on-click required name="date" mdp-placeholder="Date" mdp-format="YYYY-MM-DD" mdp-min-date="vm.hopper.minDate" ng-model="vm.hopper.dateTime">\n                        <div ng-messages="dateTime.date.$error" ng-show="dateTime.date.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="DASHBOARDS.ERRORS.DATE_REQUIRED">Date is required</span>\n                            </div>\n                            <div ng-message="format">\n                                <span translate="DASHBOARDS.ERRORS.DATE_INVALID">Date is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-date-picker>\n                </div>\n\n                <div flex class="md-block">\n                    <mdp-time-picker mdp-open-on-click required name="time" mdp-placeholder="Time" mdp-format="HH:mm:ss" mdp-auto-switch="true" ng-model="vm.hopper.dateTime">\n                        <div ng-messages="dateTime.time.$error" ng-show="dateTime.time.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="DASHBOARDS.ERRORS.TIME_REQUIRED">Time is required</span>\n                            </div>\n                            <div ng-message="format">\n                                <span translate="DASHBOARDS.ERRORS.TIME_INVALID">Time is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-disabled="vm.disable" ng-click="vm.saveDialog()" class="send-button md-accent md-raised" ng-disabled="dateTime.$invalid || dateTime.$pristine" aria-label="SAVE" translate="DASHBOARDS.SAVE" translate-attr-aria-label="DASHBOARDS.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/dashboards/views/general/agent/home/abandoned/agent.general.abandoned.html",'<div ng-cloak>\n    <md-content>\n        <md-tabs md-selected="vm.selectedTab" md-dynamic-height md-border-bottom>\n            <md-tab ng-if="vm_home.hasPermission(110)" label="Voice">\n                <div ng-controller="AgentHomeAbandonedVoiceController as vm_voice">\n                    <md-content ng-if="vm.selectedTab==0" ng-include="\'app/main/apps/dashboards/views/general/agent/home/abandoned/voice/agent.general.abandoned.voice.html\'" class="md-padding">\n                    </md-content>\n                </div>\n            </md-tab>\n            <md-tab ng-if="vm_home.hasPermission(110) && vm_home.license.dialer" label="Bull">\n                <div ng-controller="AgentHomeAbandonedBullController as vm_bull">\n                    <md-content ng-if="vm.selectedTab==1" ng-include="\'app/main/apps/dashboards/views/general/agent/home/abandoned/bull/agent.general.abandoned.bull.html\'" class="md-padding">\n                    </md-content>\n                </div>\n            </md-tab>\n        </md-tabs>\n    </md-content>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/home/abandoned/bull/agent.general.abandoned.bull.html",'<md-card ngCloak>\n    <md-toolbar class="md-table-toolbar md-default table-header blue-bg">\n        <div class="md-toolbar-tools" layout="row" layout-align="center center">\n            <span class="md-subhead" translate="DASHBOARDS.ABANDONEDQUEUECALLS">ABANDONED QUEUE CALLS</span>\n            <ms-search-bar on-search="vm_bull.query.filter = query" on-collapse="vm_bull.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div class="padding-horizontal-20" layout="column" layout-align="center center">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_DATE">Select a date</span>\n                <div layout="row" layout-align="center center">\n                    <md-button ng-if="vm_bull.pickerModel.dateStart" ng-click="vm_bull.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                        <md-tooltip>{{ \'DASHBOARDS.DELETE\' | translate }}</md-tooltip>\n                        <md-icon md-font-icon="icon-close" class="s16 white-fg"></md-icon>\n                    </md-button>\n                    <md-date-range localization-map="vm_bull.localizationMap" ng-model="vm_bull.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm_bull.getContacts()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n                </div>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_AGENT">Select an agent</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm_bull.query.lastAssignedTo" ng-change="vm_bull.getContacts()">\n                    <md-option ng-value="vm_bull.currentUser.name" translate="DASHBOARDS.ME"></md-option>\n                    <md-option ng-value="\'null\'" translate="DASHBOARDS.NOT_ASSIGNED"></md-option>\n                    <md-option ng-value="undefined" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div ng-if="vm_bull.queues.count" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_CAMPAIGN">Select a Campaign</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm_bull.query.queue" ng-change="vm_bull.getContacts()">\n                    <md-option ng-value="vm_bull.defaultQueues" ng-if="vm_bull.queues.count > 1"><em translate="DASHBOARDS.ALL">All</em></md-option>\n                    <md-option ng-value="queue.name" ng-repeat="queue in vm_bull.queues.rows">{{queue.name}}</md-option>\n                </md-select>\n            </div>\n            <md-button class="md-icon-button" ng-click="vm_bull.refresh && vm_bull.refreshContacts($event)" aria-label="refresh Contacts" translate translate-attr-label="DASHBOARDS.REFRESH_CONTACTS">\n                <md-icon md-font-icon="icon-reload"></md-icon>\n                <md-tooltip ng-if="vm_bull.showTooltip" md-visible="vm_bull.showTooltip">{{\'DASHBOARDS.CLICKRELOAD\' | translate}}</md-tooltip>\n            </md-button>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm_bull.promise">\n            <thead md-head md-order="vm_bull.query.sort" md-on-reorder="vm_bull.getContacts">\n                <tr md-row>\n                    <th md-column md-order-by="id">ID</th>\n                    <th md-column md-order-by="calleridname">{{\'DASHBOARDS.FULLNAME\' | translate}}</th>\n                    <th md-column md-order-by="calleridnum">{{\'DASHBOARDS.PHONE\' | translate}}</th>\n                    <th md-column md-order-by="queue">{{\'DASHBOARDS.QUEUE\' | translate}}</th>\n                    <th md-column md-order-by="queuecallerabandonAt">{{\'DASHBOARDS.ABANDONAT\' | translate}}</th>\n                    <th md-column md-order-by="queuecallerexitAt">{{\'DASHBOARDS.QUEUECALLEREXITAT\' | translate}}</th>\n                    <th md-column md-order-by="queuecallerexitreason">{{\'DASHBOARDS.QUEUECALLEREXITREASON\' | translate}}</th>\n                    <th md-column md-order-by="disposition">{{\'DASHBOARDS.DISPOSITION\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.RESERVED\' | translate}}</th>\n                    <th md-column md-order-by="lastAssignedTo">{{\'DASHBOARDS.LASTASSIGNEDTO\' | translate}}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm_bull.contacts.rows.length">\n                    <td md-cell colspan="10">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="contact in vm_bull.contacts.rows">\n                    <td md-cell class="id">{{contact.id}}</td>\n                    <td md-cell class="firstName">{{contact.calleridname}}</td>\n                    <td md-cell class="phone">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="contact.calleridnum" license="vm_home.license" disabled="contact.lastAssignedTo !== vm_bull.currentUser.name"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td md-cell class="list">{{vm_bull.queuesMap[contact.queue]}}</td>\n                    <td md-cell class="list">{{contact.queuecallerabandonAt ? (contact.queuecallerabandonAt | formatdate) : undefined }}</td>\n                    <td md-cell class="list">{{contact.queuecallerexitAt ? (contact.queuecallerexitAt | formatdate) : undefined }}</td>\n                    <td md-cell class="list">{{contact.queuecallerexitreason}}</td>\n                    <td md-cell class="list">{{contact.disposition}}</td>\n                    <td md-cell class="actions">\n                        <md-switch no-margin ng-if="contact.lastAssignedTo === vm_bull.currentUser.name || !contact.lastAssignedTo" ng-disabled="vm_bull.disable[contact.id]" ng-model="contact.assigned" aria-label="reserved" ng-change="vm_bull.reserved(contact, contact.disposition)">\n                            \x3c!-- <span>{{ contact.assigned ? \'DASHBOARDS.RESERVED\' : \'DASHBOARDS.FREE\' | translate }}</span> --\x3e\n                        </md-switch>\n                    </td>\n                    <td md-cell class="list">{{contact.lastAssignedTo}}</td>\n                    <td md-cell class="actions">\n                        <md-menu ng-if="contact.lastAssignedTo === vm_bull.currentUser.name">\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n                            <md-menu-content width="1">\n                                <md-menu-item>\n                                    <md-menu>\n                                        <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="DASHBOARDS.DISPOSE">Dispose</md-button>\n                                        <md-menu-content>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_bull.reserved(contact, null)"><em translate="DASHBOARDS.NONE">NONE</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_bull.reserved(contact, \'fax\')"><em translate="DASHBOARDS.FAX">FAX</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_bull.reserved(contact, \'Answer Machine\')"><em translate="DASHBOARDS.ANSWER_MACHINE">ANSWER_MACHINE</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_bull.reserved(contact, \'Interested\')"><em translate="DASHBOARDS.INTERESTED">INTERESTED</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_bull.reserved(contact, \'Not Interested\')"><em translate="DASHBOARDS.NOT_INTERESTED">NOT_INTERESTED</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_bull.reserved(contact, \'Sold\')"><em translate="DASHBOARDS.SOLD">SOLD</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_bull.reserved(contact, \'Special\')"><em translate="DASHBOARDS.SPECIAL">SPECIAL</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm_bull.disposition.length" ng-repeat="disposition in vm_bull.disposition">\n                                                <md-button ng-click="vm_bull.reserved(contact, disposition.name)">{{disposition.name}}</md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-limit="vm_bull.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_bull.query.page" md-total="{{vm_bull.contacts.count}}" md-on-paginate="vm_bull.getContacts" md-page-select></md-table-pagination>\n\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/abandoned/voice/agent.general.abandoned.voice.html",'<md-card ngCloak>\n    <md-toolbar class="md-table-toolbar md-default table-header blue-bg">\n        <div class="md-toolbar-tools" layout="row" layout-align="center center">\n            <span class="md-subhead" translate="DASHBOARDS.ABANDONEDQUEUECALLS">ABANDONED QUEUE CALLS</span>\n            <ms-search-bar on-search="vm_voice.query.filter = query" on-collapse="vm_voice.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div class="padding-horizontal-20" layout="column" layout-align="center center">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_DATE">Select a date</span>\n                <div layout="row" layout-align="center center">\n                    <md-button ng-if="vm_voice.pickerModel.dateStart" ng-click="vm_voice.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                        <md-tooltip>{{ \'DASHBOARDS.DELETE\' | translate }}</md-tooltip>\n                        <md-icon md-font-icon="icon-close" class="s16 white-fg"></md-icon>\n                    </md-button>\n                    <md-date-range localization-map="vm_voice.localizationMap" ng-model="vm_voice.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm_voice.getContacts()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n                </div>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_AGENT">Select an agent</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm_voice.query.lastAssignedTo" ng-change="vm_voice.getContacts()">\n                    <md-option ng-value="vm_voice.currentUser.name" translate="DASHBOARDS.ME"></md-option>\n                    <md-option ng-value="\'null\'" translate="DASHBOARDS.NOT_ASSIGNED"></md-option>\n                    <md-option ng-value="undefined" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div ng-if="vm_voice.queues.count" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_CAMPAIGN">Select a Campaign</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm_voice.query.queue" ng-change="vm_voice.getContacts()">\n                    <md-option ng-value="vm_voice.defaultQueues" ng-if="vm_voice.queues.count > 1"><em translate="DASHBOARDS.ALL">All</em></md-option>\n                    <md-option ng-value="queue.name" ng-repeat="queue in vm_voice.queues.rows">{{queue.name}}</md-option>\n                </md-select>\n            </div>\n            <md-button class="md-icon-button" ng-click="vm_voice.refresh && vm_voice.refreshContacts($event)" aria-label="refresh Contacts" translate translate-attr-label="DASHBOARDS.REFRESH_CONTACTS">\n                <md-icon md-font-icon="icon-reload"></md-icon>\n                <md-tooltip ng-if="vm_voice.showTooltip" md-visible="vm_voice.showTooltip">{{\'DASHBOARDS.CLICKRELOAD\' | translate}}</md-tooltip>\n            </md-button>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm_voice.promise">\n            <thead md-head md-order="vm_voice.query.sort" md-on-reorder="vm_voice.getContacts">\n                <tr md-row>\n                    <th md-column md-order-by="id">ID</th>\n                    <th md-column md-order-by="calleridname">{{\'DASHBOARDS.FULLNAME\' | translate}}</th>\n                    <th md-column md-order-by="calleridnum">{{\'DASHBOARDS.PHONE\' | translate}}</th>\n                    <th md-column md-order-by="queue">{{\'DASHBOARDS.QUEUE\' | translate}}</th>\n                    <th md-column md-order-by="queuecallerabandonAt">{{\'DASHBOARDS.ABANDONAT\' | translate}}</th>\n                    <th md-column md-order-by="disposition">{{\'DASHBOARDS.DISPOSITION\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.RESERVED\' | translate}}</th>\n                    <th md-column md-order-by="lastAssignedTo">{{\'DASHBOARDS.LASTASSIGNEDTO\' | translate}}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm_voice.contacts.rows.length">\n                    <td md-cell colspan="10">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="contact in vm_voice.contacts.rows">\n                    <td md-cell class="id">{{contact.id}}</td>\n                    <td md-cell class="firstName">{{contact.calleridname}}</td>\n                    <td md-cell class="phone">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="contact.calleridnum" license="vm_home.license" disabled="contact.lastAssignedTo !== vm_voice.currentUser.name"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td md-cell class="list">{{vm_voice.queuesMap[contact.queue]}}</td>\n                    <td md-cell class="list">{{contact.queuecallerabandonAt ? (contact.queuecallerabandonAt | formatdate) : undefined }}</td>\n                    <td md-cell class="list">{{contact.disposition}}</td>\n                    <td md-cell class="actions">\n                        <md-switch no-margin ng-if="contact.lastAssignedTo === vm_voice.currentUser.name || !contact.lastAssignedTo" ng-disabled="vm_voice.disable[contact.id]" ng-model="contact.assigned" aria-label="reserved" ng-change="vm_voice.reserved(contact, contact.disposition)">\n                            \x3c!-- <span>{{ contact.assigned ? \'DASHBOARDS.RESERVED\' : \'DASHBOARDS.FREE\' | translate }}</span> --\x3e\n                        </md-switch>\n                    </td>\n                    <td md-cell class="list">{{contact.lastAssignedTo}}</td>\n                    <td md-cell class="actions">\n                        <md-menu ng-if="contact.lastAssignedTo === vm_voice.currentUser.name">\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n                            <md-menu-content width="1">\n                                <md-menu-item>\n                                    <md-menu>\n                                        <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="DASHBOARDS.DISPOSE">Dispose</md-button>\n                                        <md-menu-content>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_voice.reserved(contact, null)"><em translate="DASHBOARDS.NONE">NONE</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_voice.reserved(contact, \'fax\')"><em translate="DASHBOARDS.FAX">FAX</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_voice.reserved(contact, \'Answer Machine\')"><em translate="DASHBOARDS.ANSWER_MACHINE">ANSWER_MACHINE</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_voice.reserved(contact, \'Interested\')"><em translate="DASHBOARDS.INTERESTED">INTERESTED</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_voice.reserved(contact, \'Not Interested\')"><em translate="DASHBOARDS.NOT_INTERESTED">NOT_INTERESTED</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_voice.reserved(contact, \'Sold\')"><em translate="DASHBOARDS.SOLD">SOLD</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm_voice.reserved(contact, \'Special\')"><em translate="DASHBOARDS.SPECIAL">SPECIAL</em></md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm_voice.disposition.length" ng-repeat="disposition in vm_voice.disposition">\n                                                <md-button ng-click="vm_voice.reserved(contact, disposition.name)">{{disposition.name}}</md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-limit="vm_voice.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_voice.query.page" md-total="{{vm_voice.contacts.count}}" md-on-paginate="vm_voice.getContacts" md-page-select></md-table-pagination>\n\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/agent.general.home.html",'<div layout="column" layout-align="start center" class="md-primary-bg width-50">\n    <div ng-repeat="node in vm_home.navigation">\n        <div ng-repeat="home in node.children">\n            <md-button ng-repeat="button in home.children" ng-if="!button.hidden()" class="md-raised width-50 height-50 no-margin" style="border-radius: 0px" aria-label="{{button.state}}" ng-click="vm_home.changeSidebarTab(button.state)" ng-class="{\'md-primary\': vm_home.sidebar != button.state}">\n                <md-tooltip md-direction="right" md-delay="500"><span translate="{{button.translate}}"></span></md-tooltip>\n                <md-icon md-font-icon="{{button.icon}}" ng-class="button.iconClass"></md-icon>\n            </md-button>\n        </div>\n    </div>\n</div>\n<div ng-switch="vm_home.sidebar" style="overflow-y: auto" flex>\n    <div ng-switch-when="contacts">\n        <div ng-if="vm_home.hasPermission(102)" ng-include="\'app/main/apps/dashboards/views/general/agent/home/contacts/agent.general.contacts.html\'" ng-controller="AgentHomeContactsController as vm"></div>\n        <div ng-if="!vm_home.hasPermission(102)" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n    <div ng-switch-when="mycontacts">\n        <div ng-if="vm_home.hasPermission(103) && vm_home.license.cm" ng-include="\'app/main/apps/dashboards/views/general/agent/home/mycontacts/agent.general.mycontacts.html\'" ng-controller="AgentHomeMyContactsController as vm"></div>\n        <div ng-if="!vm_home.hasPermission(103) || !vm_home.license.cm" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n    <div ng-switch-when="voice">\n        <div ng-if="vm_home.hasPermission(110)" ng-include="\'app/main/apps/dashboards/views/general/agent/home/voice/agent.general.voice.html\'" ng-controller="AgentHomeVoiceController as vm"></div>\n        <div ng-if="!vm_home.hasPermission(110)" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n    <div ng-switch-when="abandoned">\n        <div ng-if="vm_home.hasPermission(111)" ng-include="\'app/main/apps/dashboards/views/general/agent/home/abandoned/agent.general.abandoned.html\'" ng-controller="AgentHomeAbandonedController as vm"></div>\n        <div ng-if="!vm_home.hasPermission(111)" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n    <div ng-switch-when="recordings">\n        <div ng-if="vm_home.hasPermission(104)" ng-include="\'app/main/apps/dashboards/views/general/agent/home/recordings/agent.general.recordings.html\'" ng-controller="AgentHomeRecordingsController as vm"></div>\n        <div ng-if="!vm_home.hasPermission(104)" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n    <div ng-switch-when="chat">\n        <div ng-if="vm_home.hasPermission(105) && vm_home.license.chat" ng-include="\'app/main/apps/dashboards/views/general/agent/home/chat/agent.general.chat.html\'" ng-controller="AgentHomeChatController as vm"></div>\n        <div ng-if="!vm_home.hasPermission(105) || !vm_home.license.chat" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n    <div ng-switch-when="mail">\n        <div ng-if="vm_home.hasPermission(106) && vm_home.license.mail" ng-include="\'app/main/apps/dashboards/views/general/agent/home/mail/agent.general.mail.html\'" ng-controller="AgentHomeMailController as vm"></div>\n        <div ng-if="!vm_home.hasPermission(106) || !vm_home.license.mail" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n    <div ng-switch-when="sms">\n        <div ng-if="vm_home.hasPermission(107) && vm_home.license.messaging" ng-include="\'app/main/apps/dashboards/views/general/agent/home/sms/agent.general.sms.html\'" ng-controller="AgentHomeSmsController as vm"></div>\n        <div ng-if="!vm_home.hasPermission(107) || !vm_home.license.messaging" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n    <div ng-switch-when="openchannel">\n        <div ng-if="vm_home.hasPermission(108) && vm_home.license.openchannel" ng-include="\'app/main/apps/dashboards/views/general/agent/home/openchannel/agent.general.openchannel.html\'" ng-controller="AgentHomeOpenchannelController as vm"></div>\n        <div ng-if="!vm_home.hasPermission(108) || !vm_home.license.openchannel" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n    <div ng-switch-when="fax">\n        <div ng-if="vm_home.hasPermission(109) && vm_home.license.fax" ng-include="\'app/main/apps/dashboards/views/general/agent/home/fax/agent.general.fax.html\'" ng-controller="AgentHomeFaxController as vm"></div>\n        <div ng-if="!vm_home.hasPermission(109) || !vm_home.license.fax" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n    <div ng-switch-default>\n        <div ng-if="vm_home.hasPermission(101)" ng-include="\'app/main/apps/dashboards/views/general/agent/home/dashboard/agent.general.dashboard.html\'" ng-controller=" AgentHomeDashboardController  as vm"></div>\n        <div ng-if="!vm_home.hasPermission(101)" ng-include="\'app/main/apps/dashboards/views/general/agent/home/agent.general.home.permissions.html\'"></div>\n    </div>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/home/chat/agent.general.chat.html",'<md-card ngCloak>\n    <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm.getColorByChannel(\'chat\')">\n        <div class="md-toolbar-tools">\n            <span class="md-subhead" translate="DASHBOARDS.INTERACTIONS">Interactions</span>\n            <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div class="padding-horizontal-20" layout="column" layout-align="center center">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_DATE">Select a date</span>\n                <div layout="row" layout-align="center center">\n                    <md-button ng-if="vm.pickerModel.dateStart" ng-click="vm.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                        <md-tooltip>{{ \'DASHBOARDS.DELETE\' | translate }}</md-tooltip>\n                        <md-icon md-font-icon="icon-close" class="s16 white-fg"></md-icon>\n                    </md-button>\n                    <md-date-range localization-map="vm.localizationMap" ng-model="vm.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm.getChatInteractions()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n                </div>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_READ_UNREAD">Select Read/Unread</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.read" ng-change="vm.getChatInteractions()">\n                    <md-option value="0" translate="DASHBOARDS.UNREAD">READ</md-option>\n                    <md-option value="1" translate="DASHBOARDS.READ">UNREAD</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_STATUS">Select a status</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.closed" ng-change="vm.getChatInteractions()">\n                    <md-option value="0" translate="DASHBOARDS.OPENED">OPENED</md-option>\n                    <md-option value="1" translate="DASHBOARDS.CLOSED">CLOSED</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_WEBSITE">Select an account</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.ChatWebsiteId" ng-change="vm.getChatInteractions()">\n                    <md-option ng-value="chatAccount.id" ng-repeat="chatAccount in vm.chatAccounts.rows">{{chatAccount.name}}</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_AGENT">Select an agent</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.UserId" ng-change="vm.getChatInteractions()">\n                    <md-option ng-value="vm.user.id" translate="DASHBOARDS.ME"></md-option>\n                    <md-option ng-value="\'null\'" translate="DASHBOARDS.NOT_ASSIGNED"></md-option>\n                    <md-option ng-value="undefined" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_TAG">Select a tag</span>\n                <md-select id="tags" placeholder="Tags" multiple="true" class="font-size-12 no-margin" ng-model="vm.query.tag" ng-change="vm.getChatInteractions()" style="color:white;">\n                    <md-option ng-repeat="tag in vm.tags.rows" ng-value="tag.id">{{tag.name}}</md-option>\n                </md-select>\n            </div>\n            <div layout="column">\n                <md-button class="md-icon-button" aria-label="Reload" translate translate-attr-aria-label="DASHBOARDS.RELOAD" ng-click="vm.getChatInteractions()">\n                    <md-icon md-font-icon="icon-reload"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm.promise">\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getChatInteractions">\n                <tr md-row>\n                    <th md-column md-order-by="id">ID</th>\n                    <th md-column style="width:15px">\n                        <md-icon md-font-icon="icon-eye" class="s16"></md-icon>\n                    </th>\n                    <th md-column style="width:180px">{{\'DASHBOARDS.CONTACT\' | translate}}</th>\n                    <th md-column md-order-by="createdAt">{{\'DASHBOARDS.STARTEDAT\' | translate}}</th>\n                    <th md-column md-order-by="lastMsgAt">{{\'DASHBOARDS.LAST_MESSAGE\' | translate}}</th>\n                    <th md-column md-order-by="closed">{{\'DASHBOARDS.STATUS\' | translate}}</th>\n                    <th md-column style="width:80px">{{\'DASHBOARDS.AGENT\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.WEBSITE\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.TAGS\' | translate}}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.chatInteractions.rows.length">\n                    <td md-cell colspan="8">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="DASHBOARDS.NO_AVAILABLE_INTERACTION">No Available Interaction</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="chatInteraction in vm.chatInteractions.rows" ng-class="{\'text-bold text-italic\': chatInteraction.unread}">\n                    <td ng-click="vm.showChatInteraction($event, chatInteraction)" md-cell class="id">\n                        <div layout="row" layout-align="start center">\n                            <span class="font-size-10">{{chatInteraction.id}}</span>\n                        </div>\n                    </td>\n                    <td md-cell>\n                        <div ng-if="!chatInteraction.closed && chatInteraction.Users.length">\n                            <md-icon md-font-icon="icon-eye" class="s16"></md-icon>\n                            <md-tooltip>\n                                <span ng-repeat="u in chatInteraction.Users">{{ (u.id == vm.user.id) ? \'DASHBOARDS.ME\' : vm.usersByKey[u.id].fullname | translate }}<span ng-if="!$last">, </span></span>\n                            </md-tooltip>\n                        </div>\n                    </td>\n                    <td ng-click="vm.showChatInteraction($event, chatInteraction)" md-cell>\n                        <div layout="row" layout-align="start center">\n                            <div layout="column">\n                                <span ng-if="!chatInteraction.closed && chatInteraction.unread" class="badge white-fg" ng-class="vm.getColorByChannel(\'chat\')" layout-margin>{{chatInteraction.unread}}</span>\n                                <md-icon ng-if="chatInteraction.attach" md-font-icon="icon-paperclip" class="s16"></md-icon>\n                            </div>\n                            <span class="font-size-12 text-truncate" style="width:180px" layout-margin>{{vm.getContactLabel(chatInteraction)}}</span>\n                        </div>\n                    </td>\n                    <td ng-click="vm.showChatInteraction($event, chatInteraction)" md-cell>\n                        <span class="font-size-10 text-truncate">{{chatInteraction.createdAt | formatdate }}</span>\n                    </td>\n                    <td ng-click="vm.showChatInteraction($event, chatInteraction)" md-cell>\n                        <div layout="row" ng-if="chatInteraction.lastMsgAt">\n                            <span><md-icon md-font-icon="{{chatInteraction.lastMsgDirection == \'in\' ? \'icon-arrow-down-bold blue-grey-800-fg\' : \'icon-arrow-up-bold blue-grey-300-fg\'}}"></md-icon></span>\n                            <div layout="column" layout-align="center center">\n                                <span class="font-size-10 text-truncate">{{chatInteraction.lastMsgAt | formatdate }}</span>\n                            </div </div>\n                            <span ng-if="!chatInteraction.lastMsgAt">No messages</span>\n                    </td>\n                    <td ng-click="vm.showChatInteraction($event, chatInteraction)" md-cell>\n                        <span ng-if="chatInteraction.closed" class="red-fg font-size-12">{{ \'DASHBOARDS.CLOSED\' | translate}} <span ng-if="chatInteraction.disposition">- {{chatInteraction.disposition}}</span></span>\n                        <md-tooltip ng-if="chatInteraction.closed">{{chatInteraction.closedAt | formatdate }}</md-tooltip>\n                        <span ng-if="!chatInteraction.closed" class="green-fg font-size-12"><span translate="DASHBOARDS.OPENED"></span><span ng-if="chatInteraction.substatus"> - {{chatInteraction.substatus}}</span></span>\n                    </td>\n                    <td ng-click="vm.showChatInteraction($event, chatInteraction)" md-cell class="user">\n                        <span class="font-size-12 text-truncate" style="width:120px">{{vm.getUserLabel(chatInteraction)}}</span>\n                    </td>\n                    <td ng-click="vm.showChatInteraction($event, chatInteraction)" md-cell class="chatAccount">\n                        {{ vm.getChatWebsiteLabel(chatInteraction) }}\n                    </td>\n                    <td md-cell>\n                        <div ng-if="chatInteraction.Tags.length">\n                            <div ng-if="chatInteraction.Tags.length == 1" layout="column" layout-align="center center">\n                                <md-icon md-font-icon="icon-tag" ng-style="{\'color\': chatInteraction.Tags[0].color }"></md-icon>\n                                <span class="text-truncate">{{chatInteraction.Tags[0].name}}</span>\n                            </div>\n                            <div ng-if="chatInteraction.Tags.length > 1" layout="column" layout-align="center center">\n                                <md-tooltip md-direction="left" layout="row">\n                                    <span ng-repeat="tag in chatInteraction.Tags">{{tag.name}}<span ng-if="!$last">, </span></span>\n                                </md-tooltip>\n                                <md-icon md-font-icon="icon-tag"></md-icon>\n                            </div>\n                        </div>\n                    </td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="3">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.showChatInteraction($event, chatInteraction)" translate="DASHBOARDS.SHOW">\n                                        Show Chat\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-label="{page: \'{{\'DASHBOARDS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'DASHBOARDS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'DASHBOARDS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n        md-total="{{vm.chatInteractions.count}}" md-on-paginate="vm.getChatInteractions" md-page-select></md-table-pagination>\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/contacts/agent.general.contacts.html",'<md-card>\n    <md-toolbar class="md-table-toolbar md-default table-header red-bg">\n        <div class="md-toolbar-tools" layout="row" layout-align="center center">\n            <span class="md-subhead" translate="DASHBOARDS.CONTACTS">Contacts</span>\n            <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div layout="column">\n                <span class="font-size-10" translate="CONTACTMANAGER.SELECT_LIST">Select a list</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.ListId" ng-change="vm.getContacts()">\n                    <md-option ng-value="vm.defaultLists" ng-if="vm.lists.count > 1"><em translate="CONTACTMANAGER.ALL_CONTACTS">All</em></md-option>\n                    <md-option ng-value="list.id" ng-repeat="list in vm.lists.rows">{{list.name}}</md-option>\n                </md-select>\n            </div>\n            <md-button class="md-icon-button" ng-click="vm.refreshContacts($event)" aria-label="refresh Contacts" translate translate-attr-label="DASHBOARDS.REFRESH_CONTACTS">\n                <md-icon md-font-icon="icon-reload"></md-icon>\n            </md-button>\n            <md-button class="md-icon-button" ng-click="vm.openContact($event)" aria-label="add contact" translate translate-attr-label="DASHBOARDS.ADD_CONTACT">\n                <md-icon md-font-icon="icon-plus"></md-icon>\n            </md-button>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm.promise">\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getContacts">\n                <tr md-row>\n                    <th md-column md-order-by="id">ID</th>\n                    <th md-column md-order-by="firstName">{{\'DASHBOARDS.FULLNAME\' | translate}}</th>\n                    <th md-column md-order-by="phone">{{\'DASHBOARDS.PHONE\' | translate}}</th>\n                    <th md-column md-order-by="mobile">{{\'DASHBOARDS.MOBILE\' | translate}}</th>\n                    <th md-column md-order-by="fax">{{\'DASHBOARDS.FAX\' | translate}}</th>\n                    <th md-column md-order-by="email">{{\'DASHBOARDS.EMAIL\' | translate}}</th>\n                    <th md-column md-order-by="ListId">{{\'DASHBOARDS.LIST\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.TAGS\' | translate}}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.contacts.rows.length">\n                    <td md-cell colspan="10">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="contact in vm.contacts.rows">\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="id">{{contact.id}}</td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="firstName">{{contact.firstName}} {{contact.lastName}}</td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="phone">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="contact.phone" prefix="vm.listsMap[contact.ListId].dialPrefix" license="vm_home.license"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="mobile">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="contact.mobile" prefix="vm.listsMap[contact.ListId].dialPrefix" license="vm_home.license"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="fax">{{contact.fax}}</td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="email">{{contact.email}}</td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="list">{{vm.listsMap[contact.ListId].name}}</td>\n                    <td md-cell class="tags">\n                        <div ng-if="contact.tags.length">\n                            <md-tooltip md-direction="left" layout="row">\n                                <span ng-repeat="tag in contact.tags">{{tag}}<span ng-if="!$last">, </span></span>\n                            </md-tooltip>\n                            <md-icon md-font-icon="icon-tag"></md-icon>\n                        </div>\n                    </td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="3">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.openContact($event, contact)" translate="DASHBOARDS.EDIT">\n                                        Edit Contact\n                                    </md-button>\n                                </md-menu-item>\n                                <md-menu-item>\n                                    <md-button ng-click="vm.mergeContact($event, contact)" translate="DASHBOARDS.MERGE">\n                                        Merge Contact\n                                    </md-button>\n                                </md-menu-item>\n                                <md-menu-item>\n                                    <md-button ng-click="vm.duplicateContact($event, contact)" translate="DASHBOARDS.DUPLICATE">\n                                        Duplicate Contact\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.contacts.count}}" md-on-paginate="vm.getContacts" md-page-select></md-table-pagination>\n\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/dashboard/agent.general.dashboard.html",'<div ng-cloak>\n    <md-content>\n        <md-tabs md-dynamic-height md-border-bottom>\n            <md-tab ng-if="vm_home.hasPermission(110)" label="Voice">\n                <md-content ng-include="\'app/main/apps/dashboards/views/general/agent/home/dashboard/voice/agent.general.dashboard.voice.html\'" ng-controller="AgentHomeDashboardVoiceController as vm_voice" class="md-padding">\n                </md-content>\n            </md-tab>\n            <md-tab ng-if="vm_home.hasPermission(110) && vm_home.license.dialer" label="Bull">\n                <md-content ng-include="\'app/main/apps/dashboards/views/general/agent/home/dashboard/bull/agent.general.dashboard.bull.html\'" ng-controller="AgentHomeDashboardBullController as vm_bull" class="md-padding">\n                </md-content>\n            </md-tab>\n            <md-tab ng-if="vm_home.hasPermission(105) && vm_home.license.chat" label="Chat">\n                <md-content ng-include="\'app/main/apps/dashboards/views/general/agent/home/dashboard/chat/agent.general.dashboard.chat.html\'" ng-controller="AgentHomeDashboardMultiChannelChatController as vm_chat" class="md-padding">\n                </md-content>\n            </md-tab>\n            <md-tab ng-if="vm_home.hasPermission(106) && vm_home.license.mail" label="Email">\n                <md-content ng-include="\'app/main/apps/dashboards/views/general/agent/home/dashboard/mail/agent.general.dashboard.mail.html\'" ng-controller="AgentHomeDashboardMultiChannelMailController as vm_mail" class="md-padding">\n                </md-content>\n            </md-tab>\n            <md-tab ng-if="vm_home.hasPermission(107) && vm_home.license.messaging" label="Sms">\n                <md-content ng-include="\'app/main/apps/dashboards/views/general/agent/home/dashboard/sms/agent.general.dashboard.sms.html\'" ng-controller="AgentHomeDashboardMultiChannelSmsController as vm_sms" class="md-padding">\n                </md-content>\n            </md-tab>\n            <md-tab ng-if="vm_home.hasPermission(108) && vm_home.license.openchannel" label="Open Channel">\n                <md-content ng-include="\'app/main/apps/dashboards/views/general/agent/home/dashboard/openchannel/agent.general.dashboard.openchannel.html\'" ng-controller="AgentHomeDashboardMultiChannelOpenchannelController as vm_openchannel" class="md-padding">\n                </md-content>\n            </md-tab>\n            <md-tab ng-if="vm_home.hasPermission(109) && vm_home.license.fax" label="Fax">\n                <md-content ng-include="\'app/main/apps/dashboards/views/general/agent/home/dashboard/fax/agent.general.dashboard.fax.html\'" ng-controller="AgentHomeDashboardMultiChannelFaxController as vm_fax" class="md-padding">\n                </md-content>\n            </md-tab>\n        </md-tabs>\n    </md-content>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/home/dashboard/bull/agent.general.dashboard.bull.html",'<div layout="row" ngCloak>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header red-900-bg">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="VOICE.QUEUES">Queues</span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table md-progress="vm_bull.promise">\n                <thead md-head md-order="vm_bull.query.sort" md-on-reorder="vm_bull.getVoiceQueues">\n                    <tr md-row>\n                        <th md-column>{{ \'VOICE.NAME\' | translate }}</th>\n                        <th md-column>{{ \'VOICE.TYPE\' | translate }}</th>\n                        <th md-column>{{ \'VOICE.WAITING\' | translate }}</th>\n                        <th ng-if="voiceQueue.type === \'outbound\'" md-column>{{ \'VOICE.ACTIVE\' | translate }}</th>\n                        \x3c!-- <th md-column md-order-by="active">{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_bull.getSize(vm_bull.voiceQueues)">\n                        <td md-cell colspan="4">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, voiceQueue) in vm_bull.voiceQueues">\n                        <td md-cell class="name">{{voiceQueue.name}}</td>\n                        <td ng-if="voiceQueue.type === \'outbound\'" md-cell class="waiting">{{voiceQueue.dialMethod}}</td>\n                        <td md-cell class="waiting">{{voiceQueue.waiting || 0}}</td>\n                        <td md-cell ng-if="voiceQueue.type === \'outbound\'" class="dialActive ">\n                            <md-icon md-colors="{color: {{voiceQueue.dialActive ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{voiceQueue.dialActive ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                        </td>\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_bull.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_bull.query.page" md-total="{{vm_bull.voiceQueuesTotal}}" md-on-paginate="vm_bull.getVoiceQueues" md-page-select></md-table-pagination>\n    </md-card>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header red-900-bg">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.WAITING_TEXT"></span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table>\n                <thead md-head>\n                    <tr md-row>\n                        <th md-column>{{ \'VOICE.DID\' | translate }}</th>\n                        <th md-column>{{ \'VOICE.QUEUE\' | translate }}</th>\n                        <th md-column>{{ \'VOICE.CALLER\' | translate }}</th>\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_bull.getSize(vm_bull.rpcVoiceQueuesChannels)">\n                        <td md-cell colspan="3">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, channel) in vm_bull.rpcVoiceQueuesChannels | limitObjectFromTo: vm_bull.queryChannels.limit:(vm_bull.queryChannels.page - 1) * vm_bull.queryChannels.limit">\n                        <td md-cell>{{channel.exten}}</td>\n                        <td md-cell>{{channel.queue}}</td>\n                        <td md-cell>{{channel.calleridnum}}</td>\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_bull.queryChannels.limit" md-page="vm_bull.queryChannels.page" md-limit-options="[10, 15, 20, 50, 100, 250]" md-total="{{vm_bull.getSize(vm_bull.rpcVoiceQueuesChannels)}}" md-page-select></md-table-pagination>\n    </md-card>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/home/dashboard/chat/agent.general.dashboard.chat.html",'<div layout="row" ngCloak>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm_chat.getColorByChannel(\'chat\')">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.QUEUES">Queues</span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table md-progress="vm_chat.promise">\n                <thead md-head md-order="vm_chat.query.sort" md-on-reorder="vm_chat.getChatQueues">\n                    <tr md-row>\n                        <th md-column>{{ \'DASHBOARDS.NAME\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.WAITING\' | translate }}</th>\n                        \x3c!-- <th md-column>{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                        \x3c!-- <th md-column md-order-by="active">{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_chat.getSize(vm_chat.chatQueues)">\n                        <td md-cell colspan="2">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="DASHBOARDS.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, queue) in vm_chat.chatQueues">\n                        <td md-cell class="name">{{queue.name}}</td>\n                        <td md-cell class="waiting">{{queue.waiting || 0}}</td>\n                        \x3c!-- <td md-cell class="dialActive ">\n                            <md-icon ng-if="queue.type === \'outbound\'" md-colors="{color: {{queue.dialActive ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{queue.dialActive ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            <md-icon ng-if="queue.type === \'inbound\'" md-colors="{color: \'green\'}" md-font-icon="icon-check"></md-icon>\n                        </td> --\x3e\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_chat.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_chat.query.page" md-total="{{vm_chat.chatQueuesTotal}}" md-on-paginate="vm_chat.getChatQueues" md-page-select></md-table-pagination>\n    </md-card>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm_chat.getColorByChannel(\'chat\')">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.CHANNEL_WAITING_TEXT"></span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table>\n                <thead md-head>\n                    <tr md-row>\n                        <th md-column>{{ \'DASHBOARDS.ACCOUNT\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.CHANNEL_QUEUE\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.CHANNEL_FROM\' | translate }}</th>\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_chat.paginatedInteractions.length">\n                        <td md-cell colspan="3">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="DASHBOARDS.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, interaction) in vm_chat.interactions">\n                        <td md-cell>{{interaction.account}}</td>\n                        <td md-cell>{{interaction.queue}}</td>\n                        <td md-cell>{{interaction.from}}</td>\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_chat.queryChannels.limit" md-page="vm_chat.queryChannels.page" md-limit-options="[10, 15, 20, 50, 100, 250]" md-total="{{vm_chat.paginatedInteractions.length}}" md-on-paginate="vm_chat.paginate" md-page-select></md-table-pagination>\n    </md-card>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/home/dashboard/fax/agent.general.dashboard.fax.html",'<div layout="row" ngCloak>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm_fax.getColorByChannel(\'fax\')">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.QUEUES">Queues</span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table md-progress="vm_fax.promise">\n                <thead md-head md-order="vm_fax.query.sort" md-on-reorder="vm_fax.getFaxQueues">\n                    <tr md-row>\n                        <th md-column>{{ \'DASHBOARDS.NAME\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.WAITING\' | translate }}</th>\n                        \x3c!-- <th md-column>{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                        \x3c!-- <th md-column md-order-by="active">{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_fax.getSize(vm_fax.faxQueues)">\n                        <td md-cell colspan="2">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="DASHBOARDS.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, queue) in vm_fax.faxQueues">\n                        <td md-cell class="name">{{queue.name}}</td>\n                        <td md-cell class="waiting">{{queue.waiting || 0}}</td>\n                        \x3c!-- <td md-cell class="dialActive ">\n                            <md-icon ng-if="queue.type === \'outbound\'" md-colors="{color: {{queue.dialActive ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{queue.dialActive ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            <md-icon ng-if="queue.type === \'inbound\'" md-colors="{color: \'green\'}" md-font-icon="icon-check"></md-icon>\n                        </td> --\x3e\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_fax.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_fax.query.page" md-total="{{vm_fax.faxQueuesTotal}}" md-on-paginate="vm_fax.getFaxQueues" md-page-select></md-table-pagination>\n    </md-card>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm_fax.getColorByChannel(\'fax\')">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.CHANNEL_WAITING_TEXT"></span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table>\n                <thead md-head>\n                    <tr md-row>\n                        <th md-column>{{ \'DASHBOARDS.ACCOUNT\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.CHANNEL_QUEUE\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.CHANNEL_FROM\' | translate }}</th>\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_fax.paginatedInteractions.length">\n                        <td md-cell colspan="3">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="DASHBOARDS.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, interaction) in vm_fax.interactions">\n                        <td md-cell>{{interaction.account}}</td>\n                        <td md-cell>{{interaction.queue}}</td>\n                        <td md-cell>{{interaction.from}}</td>\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_fax.queryChannels.limit" md-page="vm_fax.queryChannels.page" md-limit-options="[10, 15, 20, 50, 100, 250]" md-total="{{vm_fax.paginatedInteractions.length}}" md-on-paginate="vm_fax.paginate" md-page-select></md-table-pagination>\n    </md-card>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/home/dashboard/mail/agent.general.dashboard.mail.html",'<div layout="row" ngCloak>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm_mail.getColorByChannel(\'mail\')">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.QUEUES">Queues</span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table md-progress="vm_mail.promise">\n                <thead md-head md-order="vm_mail.query.sort" md-on-reorder="vm_mail.getMailQueues">\n                    <tr md-row>\n                        <th md-column>{{ \'DASHBOARDS.NAME\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.WAITING\' | translate }}</th>\n                        \x3c!-- <th md-column>{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                        \x3c!-- <th md-column md-order-by="active">{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_mail.getSize(vm_mail.mailQueues)">\n                        <td md-cell colspan="2">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="DASHBOARDS.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, queue) in vm_mail.mailQueues">\n                        <td md-cell class="name">{{queue.name}}</td>\n                        <td md-cell class="waiting">{{queue.waiting || 0}}</td>\n                        \x3c!-- <td md-cell class="dialActive ">\n                            <md-icon ng-if="queue.type === \'outbound\'" md-colors="{color: {{queue.dialActive ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{queue.dialActive ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            <md-icon ng-if="queue.type === \'inbound\'" md-colors="{color: \'green\'}" md-font-icon="icon-check"></md-icon>\n                        </td> --\x3e\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_mail.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_mail.query.page" md-total="{{vm_mail.mailQueuesTotal}}" md-on-paginate="vm_mail.getMailQueues" md-page-select></md-table-pagination>\n    </md-card>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm_mail.getColorByChannel(\'mail\')">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.CHANNEL_WAITING_TEXT"></span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table>\n                <thead md-head>\n                    <tr md-row>\n                        <th md-column>{{ \'DASHBOARDS.ACCOUNT\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.CHANNEL_QUEUE\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.CHANNEL_FROM\' | translate }}</th>\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_mail.paginatedInteractions.length">\n                        <td md-cell colspan="3">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="DASHBOARDS.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, interaction) in vm_mail.interactions">\n                        <td md-cell>{{interaction.account}}</td>\n                        <td md-cell>{{interaction.queue}}</td>\n                        <td md-cell>{{interaction.from}}</td>\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_mail.queryChannels.limit" md-page="vm_mail.queryChannels.page" md-limit-options="[10, 15, 20, 50, 100, 250]" md-total="{{vm_mail.paginatedInteractions.length}}" md-on-paginate="vm_mail.paginate" md-page-select></md-table-pagination>\n    </md-card>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/home/dashboard/openchannel/agent.general.dashboard.openchannel.html",'<div layout="row" ngCloak>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm_openchannel.getColorByChannel(\'openchannel\')">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.QUEUES">Queues</span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table md-progress="vm_openchannel.promise">\n                <thead md-head md-order="vm_openchannel.query.sort" md-on-reorder="vm_openchannel.getOpenchannelQueues">\n                    <tr md-row>\n                        <th md-column>{{ \'DASHBOARDS.NAME\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.WAITING\' | translate }}</th>\n                        \x3c!-- <th md-column>{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                        \x3c!-- <th md-column md-order-by="active">{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_openchannel.getSize(vm_openchannel.openchannelQueues)">\n                        <td md-cell colspan="2">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="DASHBOARDS.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, queue) in vm_openchannel.openchannelQueues">\n                        <td md-cell class="name">{{queue.name}}</td>\n                        <td md-cell class="waiting">{{queue.waiting || 0}}</td>\n                        \x3c!-- <td md-cell class="dialActive ">\n                            <md-icon ng-if="queue.type === \'outbound\'" md-colors="{color: {{queue.dialActive ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{queue.dialActive ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            <md-icon ng-if="queue.type === \'inbound\'" md-colors="{color: \'green\'}" md-font-icon="icon-check"></md-icon>\n                        </td> --\x3e\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_openchannel.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_openchannel.query.page" md-total="{{vm_openchannel.openchannelQueuesTotal}}" md-on-paginate="vm_openchannel.getOpenchannelQueues" md-page-select></md-table-pagination>\n    </md-card>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm_openchannel.getColorByChannel(\'openchannel\')">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.CHANNEL_WAITING_TEXT"></span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table>\n                <thead md-head>\n                    <tr md-row>\n                        <th md-column>{{ \'DASHBOARDS.ACCOUNT\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.CHANNEL_QUEUE\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.CHANNEL_FROM\' | translate }}</th>\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_openchannel.paginatedInteractions.length">\n                        <td md-cell colspan="3">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="DASHBOARDS.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, interaction) in vm_openchannel.interactions">\n                        <td md-cell>{{interaction.account}}</td>\n                        <td md-cell>{{interaction.queue}}</td>\n                        <td md-cell>{{interaction.from}}</td>\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_openchannel.queryChannels.limit" md-page="vm_openchannel.queryChannels.page" md-limit-options="[10, 15, 20, 50, 100, 250]" md-total="{{vm_openchannel.paginatedInteractions.length}}" md-on-paginate="vm_openchannel.paginate"\n            md-page-select></md-table-pagination>\n    </md-card>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/home/dashboard/sms/agent.general.dashboard.sms.html",'<div layout="row" ngCloak>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm_sms.getColorByChannel(\'sms\')">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.QUEUES">Queues</span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table md-progress="vm_sms.promise">\n                <thead md-head md-order="vm_sms.query.sort" md-on-reorder="vm_sms.getSmsQueues">\n                    <tr md-row>\n                        <th md-column>{{ \'DASHBOARDS.NAME\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.WAITING\' | translate }}</th>\n                        \x3c!-- <th md-column>{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                        \x3c!-- <th md-column md-order-by="active">{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_sms.getSize(vm_sms.smsQueues)">\n                        <td md-cell colspan="2">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="DASHBOARDS.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, queue) in vm_sms.smsQueues">\n                        <td md-cell class="name">{{queue.name}}</td>\n                        <td md-cell class="waiting">{{queue.waiting || 0}}</td>\n                        \x3c!-- <td md-cell class="dialActive ">\n                            <md-icon ng-if="queue.type === \'outbound\'" md-colors="{color: {{queue.dialActive ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{queue.dialActive ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                            <md-icon ng-if="queue.type === \'inbound\'" md-colors="{color: \'green\'}" md-font-icon="icon-check"></md-icon>\n                        </td> --\x3e\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_sms.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_sms.query.page" md-total="{{vm_sms.smsQueuesTotal}}" md-on-paginate="vm_sms.getSmsQueues" md-page-select></md-table-pagination>\n    </md-card>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm_sms.getColorByChannel(\'sms\')">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.CHANNEL_WAITING_TEXT"></span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table>\n                <thead md-head>\n                    <tr md-row>\n                        <th md-column>{{ \'DASHBOARDS.ACCOUNT\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.CHANNEL_QUEUE\' | translate }}</th>\n                        <th md-column>{{ \'DASHBOARDS.CHANNEL_FROM\' | translate }}</th>\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_sms.paginatedInteractions.length">\n                        <td md-cell colspan="3">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="DASHBOARDS.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, interaction) in vm_sms.interactions">\n                        <td md-cell>{{interaction.account}}</td>\n                        <td md-cell>{{interaction.queue}}</td>\n                        <td md-cell>{{interaction.from}}</td>\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_sms.queryChannels.limit" md-page="vm_sms.queryChannels.page" md-limit-options="[10, 15, 20, 50, 100, 250]" md-total="{{vm_sms.paginatedInteractions.length}}" md-on-paginate="vm_sms.paginate" md-page-select></md-table-pagination>\n    </md-card>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/home/dashboard/voice/agent.general.dashboard.voice.html",'<div layout="row" ngCloak>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header blue-A700-bg ">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="VOICE.QUEUES">Queues</span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table md-progress="vm_voice.promise">\n                <thead md-head md-order="vm_voice.query.sort" md-on-reorder="vm_voice.getVoiceQueues">\n                    <tr md-row>\n                        <th md-column>{{ \'VOICE.NAME\' | translate }}</th>\n                        <th md-column>{{ \'VOICE.WAITING\' | translate }}</th>\n                        <th ng-if="voiceQueue.type === \'outbound\'" md-column>{{ \'VOICE.ACTIVE\' | translate }}</th>\n                        \x3c!-- <th md-column md-order-by="active">{{ \'VOICE.ACTIVE\' | translate }}</th> --\x3e\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_voice.getSize(vm_voice.voiceQueues)">\n                        <td md-cell colspan="2">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, voiceQueue) in vm_voice.voiceQueues">\n                        <td md-cell class="name">{{voiceQueue.name}}</td>\n                        <td ng-if="voiceQueue.type === \'outbound\'" md-cell class="waiting">{{voiceQueue.dialMethod}}</td>\n                        <td md-cell class="waiting">{{voiceQueue.waiting || 0}}</td>\n                        <td md-cell ng-if="voiceQueue.type === \'outbound\'" class="dialActive ">\n                            <md-icon md-colors="{color: {{voiceQueue.dialActive ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{voiceQueue.dialActive ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                        </td>\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_voice.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_voice.query.page" md-total="{{vm_voice.voiceQueuesTotal}}" md-on-paginate="vm_voice.getVoiceQueues" md-page-select></md-table-pagination>\n    </md-card>\n    <md-card flex="50">\n        <md-toolbar class="md-table-toolbar md-default table-header blue-A700-bg ">\n            <div class="md-toolbar-tools">\n                <span class="md-subhead" translate="DASHBOARDS.WAITING_TEXT"></span>\n                <div flex></div>\n            </div>\n        </md-toolbar>\n        <md-table-container>\n            <table md-table>\n                <thead md-head>\n                    <tr md-row>\n                        <th md-column>{{ \'VOICE.DID\' | translate }}</th>\n                        <th md-column>{{ \'VOICE.QUEUE\' | translate }}</th>\n                        <th md-column>{{ \'VOICE.CALLER\' | translate }}</th>\n                    </tr>\n                </thead>\n                <tbody md-body>\n                    <tr md-row ng-hide="vm_voice.getSize(vm_voice.rpcVoiceQueuesChannels)">\n                        <td md-cell colspan="3">\n                            <div layout="row" layout-align="center center">\n                                <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr md-row ng-repeat="(key, channel) in vm_voice.rpcVoiceQueuesChannels | limitObjectFromTo: vm_voice.queryChannels.limit:(vm_voice.queryChannels.page - 1) * vm_voice.queryChannels.limit">\n                        <td md-cell>{{channel.exten}}</td>\n                        <td md-cell>{{channel.queue}}</td>\n                        <td md-cell>{{channel.calleridnum}}</td>\n                    </tr>\n                </tbody>\n            </table>\n        </md-table-container>\n\n        <md-table-pagination md-limit="vm_voice.queryChannels.limit" md-page="vm_voice.queryChannels.page" md-limit-options="[10, 15, 20, 50, 100, 250]" md-total="{{vm_voice.getSize(vm_voice.rpcVoiceQueuesChannels)}}" md-page-select></md-table-pagination>\n    </md-card>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/home/fax/agent.general.fax.html",'<md-card ngCloak>\n    <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm.getColorByChannel(\'fax\')">\n        <div class="md-toolbar-tools">\n            <span class="md-subhead" translate="DASHBOARDS.INTERACTIONS">Interactions</span>\n            <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div class="padding-horizontal-20" layout="column" layout-align="center center">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_DATE">Select a date</span>\n                <div layout="row" layout-align="center center">\n                    <md-button ng-if="vm.pickerModel.dateStart" ng-click="vm.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                        <md-tooltip>{{ \'DASHBOARDS.DELETE\' | translate }}</md-tooltip>\n                        <md-icon md-font-icon="icon-close" class="s16 white-fg"></md-icon>\n                    </md-button>\n                    <md-date-range localization-map="vm.localizationMap" ng-model="vm.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm.getFaxInteractions()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n                </div>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_READ_UNREAD">Select Read/Unread</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.read" ng-change="vm.getFaxInteractions()">\n                    <md-option value="0" translate="DASHBOARDS.UNREAD">READ</md-option>\n                    <md-option value="1" translate="DASHBOARDS.READ">UNREAD</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_STATUS">Select a status</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.closed" ng-change="vm.getFaxInteractions()">\n                    <md-option value="0" translate="DASHBOARDS.OPENED">OPENED</md-option>\n                    <md-option value="1" translate="DASHBOARDS.CLOSED">CLOSED</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_ACCOUNT">Select an account</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.FaxAccountId" ng-change="vm.getFaxInteractions()">\n                    <md-option ng-value="faxAccount.id" ng-repeat="faxAccount in vm.faxAccounts.rows">{{faxAccount.name}}</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_AGENT">Select an agent</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.UserId" ng-change="vm.getFaxInteractions()">\n                    <md-option ng-value="vm.user.id" translate="DASHBOARDS.ME"></md-option>\n                    <md-option ng-value="\'null\'" translate="DASHBOARDS.NOT_ASSIGNED"></md-option>\n                    <md-option ng-value="undefined" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_TAG">Select a tag</span>\n                <md-select id="tags" placeholder="Tags" multiple="true" class="font-size-12 no-margin" ng-model="vm.query.tag" ng-change="vm.getFaxInteractions()" style="color:white;">\n                    <md-option ng-repeat="tag in vm.tags.rows" ng-value="tag.id">{{tag.name}}</md-option>\n                </md-select>\n            </div>\n            <div layout="column">\n                <md-button class="md-icon-button" aria-label="Reload" translate translate-attr-aria-label="DASHBOARDS.RELOAD" ng-click="vm.getFaxInteractions()">\n                    <md-icon md-font-icon="icon-reload"></md-icon>\n                </md-button>\n            </div>\n            <md-menu ng-if="vm.faxAccounts.rows && vm.faxAccounts.rows.length">\n                <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                    <md-icon md-font-icon="icon-plus"></md-icon>\n                </md-button>\n                <md-menu-content width="3">\n                    <md-menu-item ng-repeat="faxAccount in vm.faxAccounts.rows">\n                        <md-button aria-label="compose" ng-click="vm.composeFaxInteraction($event, faxAccount)">{{ faxAccount.name }} ({{ faxAccount.key }})</md-button>\n                    </md-menu-item>\n                </md-menu-content>\n            </md-menu>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm.promise">\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getFaxInteractions">\n                <tr md-row>\n                    <th md-column md-order-by="id">ID</th>\n                    <th md-column style="width:15px">\n                        <md-icon md-font-icon="icon-eye" class="s16"></md-icon>\n                    </th>\n                    <th md-column style="width:180px">{{\'DASHBOARDS.CONTACT\' | translate}}</th>\n                    <th md-column md-order-by="createdAt">{{\'DASHBOARDS.STARTEDAT\' | translate}}</th>\n                    <th md-column md-order-by="lastMsgAt">{{\'DASHBOARDS.LAST_MESSAGE\' | translate}}</th>\n                    <th md-column md-order-by="closed">{{\'DASHBOARDS.STATUS\' | translate}}</th>\n                    <th md-column style="width:80px">{{\'DASHBOARDS.AGENT\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.ACCOUNT\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.TAGS\' | translate}}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.faxInteractions.rows.length">\n                    <td md-cell colspan="8">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="DASHBOARDS.NO_AVAILABLE_INTERACTION">No Available Interaction</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="faxInteraction in vm.faxInteractions.rows" ng-class="{\'text-bold text-italic\': faxInteraction.unread}">\n                    <td ng-click="vm.showFaxInteraction($event, faxInteraction)" md-cell class="id">\n                        <div layout="row" layout-align="start center">\n                            <span class="font-size-10">{{faxInteraction.id}}</span>\n                        </div>\n                    </td>\n                    <td md-cell>\n                        <div ng-if="!faxInteraction.closed && faxInteraction.Users.length">\n                            <md-icon md-font-icon="icon-eye" class="s16"></md-icon>\n                            <md-tooltip>\n                                <span ng-repeat="u in faxInteraction.Users">{{ (u.id == vm.user.id) ? \'DASHBOARDS.ME\' : vm.usersByKey[u.id].fullname | translate }}<span ng-if="!$last">, </span></span>\n                            </md-tooltip>\n                        </div>\n                    </td>\n                    <td ng-click="vm.showFaxInteraction($event, faxInteraction)" md-cell>\n                        <div layout="row" layout-align="start center">\n                            <div layout="column">\n                                <span ng-if="!faxInteraction.closed && faxInteraction.unread" class="badge white-fg" ng-class="vm.getColorByChannel(\'fax\')" layout-margin>{{faxInteraction.unread}}</span>\n                                <md-icon ng-if="faxInteraction.attach" md-font-icon="icon-paperclip" class="s16"></md-icon>\n                            </div>\n                            <span class="font-size-12 text-truncate" style="width:180px" layout-margin>{{vm.getContactLabel(faxInteraction)}}</span>\n                        </div>\n                    </td>\n                    <td ng-click="vm.showFaxInteraction($event, faxInteraction)" md-cell>\n                        <span class="font-size-10 text-truncate">{{faxInteraction.createdAt | formatdate }}</span>\n                    </td>\n                    <td ng-click="vm.showFaxInteraction($event, faxInteraction)" md-cell>\n                        <div layout="row" ng-if="faxInteraction.lastMsgAt">\n                            <span><md-icon md-font-icon="{{faxInteraction.lastMsgDirection == \'in\' ? \'icon-arrow-down-bold blue-grey-800-fg\' : \'icon-arrow-up-bold blue-grey-300-fg\'}}"></md-icon></span>\n                            <div layout="column" layout-align="center center">\n                                <span class="font-size-10 text-truncate">{{faxInteraction.lastMsgAt | formatdate }}</span>\n                            </div </div>\n                            <span ng-if="!faxInteraction.lastMsgAt">No messages</span>\n                    </td>\n                    <td ng-click="vm.showFaxInteraction($event, faxInteraction)" md-cell>\n                        <span ng-if="faxInteraction.closed" class="red-fg font-size-12">{{ \'DASHBOARDS.CLOSED\' | translate}} <span ng-if="faxInteraction.disposition">- {{faxInteraction.disposition}}</span></span>\n                        <md-tooltip ng-if="faxInteraction.closed">{{faxInteraction.closedAt | formatdate }}</md-tooltip>\n                        <span ng-if="!faxInteraction.closed" class="green-fg font-size-12"><span translate="DASHBOARDS.OPENED"></span><span ng-if="faxInteraction.substatus"> - {{faxInteraction.substatus}}</span></span>\n                    </td>\n                    <td ng-click="vm.showFaxInteraction($event, faxInteraction)" md-cell class="user">\n                        <span class="font-size-12 text-truncate" style="width:120px">{{vm.getUserLabel(faxInteraction)}}</span>\n                    </td>\n                    <td ng-click="vm.showFaxInteraction($event, faxInteraction)" md-cell class="faxAccount">\n                        {{ vm.getFaxAccountLabel(faxInteraction) }}\n                    </td>\n                    <td md-cell>\n                        <div ng-if="faxInteraction.Tags.length">\n                            <div ng-if="faxInteraction.Tags.length == 1" layout="column" layout-align="center center">\n                                <md-icon md-font-icon="icon-tag" ng-style="{\'color\': faxInteraction.Tags[0].color }"></md-icon>\n                                <span class="text-truncate">{{faxInteraction.Tags[0].name}}</span>\n                            </div>\n                            <div ng-if="faxInteraction.Tags.length > 1" layout="column" layout-align="center center">\n                                <md-tooltip md-direction="left" layout="row">\n                                    <span ng-repeat="tag in faxInteraction.Tags">{{tag.name}}<span ng-if="!$last">, </span></span>\n                                </md-tooltip>\n                                <md-icon md-font-icon="icon-tag"></md-icon>\n                            </div>\n                        </div>\n                    </td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="3">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.showFaxInteraction($event, faxInteraction)" translate="DASHBOARDS.SHOW">\n                                        Show Fax\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-label="{page: \'{{\'DASHBOARDS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'DASHBOARDS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'DASHBOARDS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n        md-total="{{vm.faxInteractions.count}}" md-on-paginate="vm.getFaxInteractions" md-page-select></md-table-pagination>\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/mail/agent.general.mail.html",'<md-card ngCloak>\n    <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm.getColorByChannel(\'mail\')">\n        <div class="md-toolbar-tools">\n            <span class="md-subhead" translate="DASHBOARDS.INTERACTIONS">Interactions</span>\n            <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div class="padding-horizontal-20" layout="column" layout-align="center center">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_DATE">Select a date</span>\n                <div layout="row" layout-align="center center">\n                    <md-button ng-if="vm.pickerModel.dateStart" ng-click="vm.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                        <md-tooltip>{{ \'DASHBOARDS.DELETE\' | translate }}</md-tooltip>\n                        <md-icon md-font-icon="icon-close" class="s16 white-fg"></md-icon>\n                    </md-button>\n                    <md-date-range localization-map="vm.localizationMap" ng-model="vm.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm.getMailInteractions()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n                </div>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_READ_UNREAD">Select Read/Unread</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.read" ng-change="vm.getMailInteractions()">\n                    <md-option value="0" translate="DASHBOARDS.UNREAD">READ</md-option>\n                    <md-option value="1" translate="DASHBOARDS.READ">UNREAD</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_STATUS">Select a status</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.closed" ng-change="vm.getMailInteractions()">\n                    <md-option value="0" translate="DASHBOARDS.OPENED">OPENED</md-option>\n                    <md-option value="1" translate="DASHBOARDS.CLOSED">CLOSED</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column" ng-if="vm.query.closed == 0">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_SUBSTATUS">Select a sub status</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.substatus" ng-change="vm.getMailInteractions()">\n                    <md-option ng-repeat="subStatus in vm.subStatuses.rows" ng-value="subStatus.name">{{subStatus.name}}</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_ACCOUNT">Select an account</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.MailAccountId" ng-change="vm.getMailInteractions()">\n                    <md-option ng-value="mailAccount.id" ng-repeat="mailAccount in vm.mailAccounts.rows">{{mailAccount.name}}</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_AGENT">Select an agent</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.UserId" ng-change="vm.getMailInteractions()">\n                    <md-option ng-value="vm.user.id" translate="DASHBOARDS.ME"></md-option>\n                    <md-option ng-value="\'null\'" translate="DASHBOARDS.NOT_ASSIGNED"></md-option>\n                    <md-option ng-value="undefined" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_TAG">Select a tag</span>\n                <md-select id="tags" placeholder="Tags" multiple="true" class="font-size-12 no-margin" ng-model="vm.query.tag" ng-change="vm.getMailInteractions()" style="color:white;">\n                    <md-option ng-repeat="tag in vm.tags.rows" ng-value="tag.id">{{tag.name}}</md-option>\n                </md-select>\n            </div>\n            <div layout="column">\n                <md-button class="md-icon-button" aria-label="Reload" translate translate-attr-aria-label="DASHBOARDS.RELOAD" ng-click="vm.getMailInteractions()">\n                    <md-icon md-font-icon="icon-reload"></md-icon>\n                </md-button>\n            </div>\n            <md-menu ng-if="vm.mailAccounts.rows && vm.mailAccounts.rows.length">\n                <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                    <md-icon md-font-icon="icon-plus"></md-icon>\n                </md-button>\n                <md-menu-content width="3">\n                    <md-menu-item ng-repeat="mailAccount in vm.mailAccounts.rows">\n                        <md-button aria-label="compose" ng-click="vm.composeMailInteraction($event, mailAccount)">{{ mailAccount.name }} ({{ mailAccount.key }})</md-button>\n                    </md-menu-item>\n                </md-menu-content>\n            </md-menu>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm.promise">\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getMailInteractions">\n                <tr md-row>\n                    <th md-column md-order-by="id">ID</th>\n                    <th md-column style="width:15px">\n                        <md-icon md-font-icon="icon-eye" class="s16"></md-icon>\n                    </th>\n                    <th md-column style="width:180px">{{\'DASHBOARDS.CONTACT\' | translate}}</th>\n                    <th md-column md-order-by="subject" style="width:200px">{{\'DASHBOARDS.SUBJECT\' | translate}}</th>\n                    <th md-column md-order-by="createdAt">{{\'DASHBOARDS.STARTEDAT\' | translate}}</th>\n                    <th md-column md-order-by="lastMsgAt">{{\'DASHBOARDS.LAST_MESSAGE\' | translate}}</th>\n                    <th md-column md-order-by="closed">{{\'DASHBOARDS.STATUS\' | translate}}</th>\n                    <th md-column style="width:80px">{{\'DASHBOARDS.AGENT\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.ACCOUNT\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.TAGS\' | translate}}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.mailInteractions.rows.length">\n                    <td md-cell colspan="9">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="DASHBOARDS.NO_AVAILABLE_INTERACTION">No Available Interaction</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="mailInteraction in vm.mailInteractions.rows" ng-class="{\'text-bold text-italic\': mailInteraction.unread}">\n                    <td ng-click="vm.showMailInteraction($event, mailInteraction)" md-cell class="id">\n                        <div layout="row" layout-align="start center">\n                            <span class="font-size-10">{{mailInteraction.id}}</span>\n                        </div>\n                    </td>\n                    <td md-cell>\n                        <div ng-if="!mailInteraction.closed && mailInteraction.Users.length">\n                            <md-icon md-font-icon="icon-eye" class="s16"></md-icon>\n                            <md-tooltip>\n                                <span ng-repeat="u in mailInteraction.Users">{{ (u.id == vm.user.id) ? \'DASHBOARDS.ME\' : vm.usersByKey[u.id].fullname | translate }}<span ng-if="!$last">, </span></span>\n                            </md-tooltip>\n                        </div>\n                    </td>\n                    <td ng-click="vm.showMailInteraction($event, mailInteraction)" md-cell>\n                        <div layout="row" layout-align="start center">\n                            <div layout="column">\n                                <span ng-if="!mailInteraction.closed && mailInteraction.unread" class="badge white-fg" ng-class="vm.getColorByChannel(\'mail\')" layout-margin>{{mailInteraction.unread}}</span>\n                                <md-icon ng-if="mailInteraction.attach" md-font-icon="icon-paperclip" class="s16"></md-icon>\n                            </div>\n                            <span class="font-size-12 text-truncate" style="width:180px" layout-margin>{{vm.getContactLabel(mailInteraction)}}</span>\n                        </div>\n                    </td>\n                    <td ng-click="vm.showMailInteraction($event, mailInteraction)" md-cell>\n                        <span class="text-truncate font-size-12" style="width:200px">{{mailInteraction.subject}}</span>\n                    </td>\n                    <td ng-click="vm.showMailInteraction($event, mailInteraction)" md-cell>\n                        <span class="font-size-10 text-truncate">{{mailInteraction.createdAt | formatdate }}</span>\n                    </td>\n                    <td ng-click="vm.showMailInteraction($event, mailInteraction)" md-cell>\n                        <div layout="row" ng-if="mailInteraction.lastMsgAt">\n                            <span><md-icon md-font-icon="{{mailInteraction.lastMsgDirection == \'in\' ? \'icon-arrow-down-bold blue-grey-800-fg\' : \'icon-arrow-up-bold blue-grey-300-fg\'}}"></md-icon></span>\n                            <div layout="column" layout-align="center center">\n                                <span class="font-size-10 text-truncate">{{mailInteraction.lastMsgAt | formatdate }}</span>\n                            </div </div>\n                            <span ng-if="!mailInteraction.lastMsgAt">No messages</span>\n                    </td>\n                    <td ng-click="vm.showMailInteraction($event, mailInteraction)" md-cell>\n                        <span ng-if="mailInteraction.closed" class="red-fg font-size-12">{{ \'DASHBOARDS.CLOSED\' | translate}} <span ng-if="mailInteraction.disposition">- {{mailInteraction.disposition}}</span></span>\n                        <md-tooltip ng-if="mailInteraction.closed">{{mailInteraction.closedAt | formatdate }}</md-tooltip>\n                        <span ng-if="!mailInteraction.closed" class="green-fg font-size-12"><span translate="DASHBOARDS.OPENED"></span><span ng-if="mailInteraction.substatus"> - {{mailInteraction.substatus}}</span></span>\n                    </td>\n                    <td ng-click="vm.showMailInteraction($event, mailInteraction)" md-cell class="user">\n                        <span class="font-size-12 text-truncate" style="width:120px">{{vm.getUserLabel(mailInteraction)}}</span>\n                    </td>\n                    <td ng-click="vm.showMailInteraction($event, mailInteraction)" md-cell class="mailAccount">\n                        {{ vm.getMailAccountLabel(mailInteraction) }}\n                    </td>\n                    <td md-cell>\n                        <div ng-if="mailInteraction.Tags.length">\n                            <div ng-if="mailInteraction.Tags.length == 1" layout="column" layout-align="center center">\n                                <md-icon md-font-icon="icon-tag" ng-style="{\'color\': mailInteraction.Tags[0].color }"></md-icon>\n                                <span class="text-truncate">{{mailInteraction.Tags[0].name}}</span>\n                            </div>\n                            <div ng-if="mailInteraction.Tags.length > 1" layout="column" layout-align="center center">\n                                <md-tooltip md-direction="left" layout="row">\n                                    <span ng-repeat="tag in mailInteraction.Tags">{{tag.name}}<span ng-if="!$last">, </span></span>\n                                </md-tooltip>\n                                <md-icon md-font-icon="icon-tag"></md-icon>\n                            </div>\n                        </div>\n                    </td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="3">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.showMailInteraction($event, mailInteraction)" translate="DASHBOARDS.SHOW">\n                                        Show Mail\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-label="{page: \'{{\'DASHBOARDS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'DASHBOARDS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'DASHBOARDS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n        md-total="{{vm.mailInteractions.count}}" md-on-paginate="vm.getMailInteractions" md-page-select></md-table-pagination>\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/mycontacts/agent.general.mycontacts.html",'<md-card ng-init="vm.onInit()">\n    <md-toolbar class="md-table-toolbar md-default table-header red-bg">\n        <div class="md-toolbar-tools" layout="row" layout-align="center center">\n            <span class="md-subhead" translate="DASHBOARDS.MYCONTACTS">My Contacts</span>\n            <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div layout="column">\n                <span class="font-size-10" translate="CONTACTMANAGER.SELECT_LIST">Select a list</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.ListId" ng-change="vm.getContacts()">\n                    <md-option ng-value="list.id" ng-repeat="list in vm.lists.rows">{{list.name}}</md-option>\n                    <md-option ng-value="vm.defaultLists" ng-if="vm.lists.count > 1"><em translate="CONTACTMANAGER.ALL_CONTACTS">All</em></md-option>\n                </md-select>\n            </div>\n            <md-button class="md-icon-button" ng-click="vm.refreshContacts($event)" aria-label="refresh Contacts" translate translate-attr-label="DASHBOARDS.REFRESH_CONTACTS">\n                <md-icon md-font-icon="icon-reload"></md-icon>\n            </md-button>\n            <md-button class="md-icon-button" ng-click="vm.openContact($event)" aria-label="add contact" translate translate-attr-label="DASHBOARDS.ADD_CONTACT">\n                <md-icon md-font-icon="icon-plus"></md-icon>\n            </md-button>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm.promise">\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getContacts">\n                <tr md-row>\n                    <th md-column md-order-by="id">ID</th>\n                    <th md-column md-order-by="firstName">{{\'DASHBOARDS.FULLNAME\' | translate}}</th>\n                    <th md-column md-order-by="phone">{{\'DASHBOARDS.PHONE\' | translate}}</th>\n                    <th md-column md-order-by="mobile">{{\'DASHBOARDS.MOBILE\' | translate}}</th>\n                    <th md-column md-order-by="fax">{{\'DASHBOARDS.FAX\' | translate}}</th>\n                    <th md-column md-order-by="email">{{\'DASHBOARDS.EMAIL\' | translate}}</th>\n                    <th md-column md-order-by="ListId">{{\'DASHBOARDS.LIST\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.TAGS\' | translate}}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.contacts.rows.length">\n                    <td md-cell colspan="10">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="contact in vm.contacts.rows">\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="id">{{contact.id}}</td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="firstName">{{contact.firstName}} {{contact.lastName}}</td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="phone">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="contact.phone" prefix="vm.listsMap[contact.ListId].dialPrefix" license="vm_home.license"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="mobile">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="contact.mobile" prefix="vm.listsMap[contact.ListId].dialPrefix" license="vm_home.license"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="fax">{{contact.fax}}</td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="email">{{contact.email}}</td>\n                    <td ng-click="vm.openContact($event, contact)" md-cell class="list">{{vm.listsMap[contact.ListId].name}}</td>\n                    <td md-cell class="tags">\n                        <div ng-if="contact.tags.length">\n                            <md-tooltip md-direction="left" layout="row">\n                                <span ng-repeat="tag in contact.tags">{{tag}}<span ng-if="!$last">, </span></span>\n                            </md-tooltip>\n                            <md-icon md-font-icon="icon-tag"></md-icon>\n                        </div>\n                    </td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="3">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.openContact($event, contact)" translate="DASHBOARDS.EDIT">\n                                        Edit Contact\n                                    </md-button>\n                                </md-menu-item>\n                                <md-menu-item>\n                                    <md-button ng-click="vm.mergeContact($event, contact)" translate="DASHBOARDS.MERGE">\n                                        Merge Contact\n                                    </md-button>\n                                </md-menu-item>\n                                <md-menu-item>\n                                    <md-button ng-click="vm.duplicateContact($event, contact)" translate="DASHBOARDS.DUPLICATE">\n                                        Duplicate Contact\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.contacts.count}}" md-on-paginate="vm.getContacts" md-page-select></md-table-pagination>\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/openchannel/agent.general.openchannel.html",'<md-card ngCloak>\n    <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm.getColorByChannel(\'openchannel\')">\n        <div class="md-toolbar-tools">\n            <span class="md-subhead" translate="DASHBOARDS.INTERACTIONS">Interactions</span>\n            <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div class="padding-horizontal-20" layout="column" layout-align="center center">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_DATE">Select a date</span>\n                <div layout="row" layout-align="center center">\n                    <md-button ng-if="vm.pickerModel.dateStart" ng-click="vm.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                        <md-tooltip>{{ \'DASHBOARDS.DELETE\' | translate }}</md-tooltip>\n                        <md-icon md-font-icon="icon-close" class="s16 white-fg"></md-icon>\n                    </md-button>\n                    <md-date-range localization-map="vm.localizationMap" ng-model="vm.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm.getOpenchannelInteractions()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n                </div>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_READ_UNREAD">Select Read/Unread</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.read" ng-change="vm.getOpenchannelInteractions()">\n                    <md-option value="0" translate="DASHBOARDS.UNREAD">READ</md-option>\n                    <md-option value="1" translate="DASHBOARDS.READ">UNREAD</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_STATUS">Select a status</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.closed" ng-change="vm.getOpenchannelInteractions()">\n                    <md-option value="0" translate="DASHBOARDS.OPENED">OPENED</md-option>\n                    <md-option value="1" translate="DASHBOARDS.CLOSED">CLOSED</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_ACCOUNT">Select an account</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.OpenchannelAccountId" ng-change="vm.getOpenchannelInteractions()">\n                    <md-option ng-value="openchannelAccount.id" ng-repeat="openchannelAccount in vm.openchannelAccounts.rows">{{openchannelAccount.name}}</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_AGENT">Select an agent</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.UserId" ng-change="vm.getOpenchannelInteractions()">\n                    <md-option ng-value="vm.user.id" translate="DASHBOARDS.ME"></md-option>\n                    <md-option ng-value="\'null\'" translate="DASHBOARDS.NOT_ASSIGNED"></md-option>\n                    <md-option ng-value="undefined" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_TAG">Select a tag</span>\n                <md-select id="tags" placeholder="Tags" multiple="true" class="font-size-12 no-margin" ng-model="vm.query.tag" ng-change="vm.getOpenchannelInteractions()" style="color:white;">\n                    <md-option ng-repeat="tag in vm.tags.rows" ng-value="tag.id">{{tag.name}}</md-option>\n                </md-select>\n            </div>\n            <div layout="column">\n                <md-button class="md-icon-button" aria-label="Reload" translate translate-attr-aria-label="DASHBOARDS.RELOAD" ng-click="vm.getOpenchannelInteractions()">\n                    <md-icon md-font-icon="icon-reload"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm.promise">\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getOpenchannelInteractions">\n                <tr md-row>\n                    <th md-column md-order-by="id">ID</th>\n                    <th md-column style="width:15px">\n                        <md-icon md-font-icon="icon-eye" class="s16"></md-icon>\n                    </th>\n                    <th md-column style="width:180px">{{\'DASHBOARDS.CONTACT\' | translate}}</th>\n                    <th md-column md-order-by="createdAt">{{\'DASHBOARDS.STARTEDAT\' | translate}}</th>\n                    <th md-column md-order-by="lastMsgAt">{{\'DASHBOARDS.LAST_MESSAGE\' | translate}}</th>\n                    <th md-column md-order-by="closed">{{\'DASHBOARDS.STATUS\' | translate}}</th>\n                    <th md-column style="width:80px">{{\'DASHBOARDS.AGENT\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.ACCOUNT\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.TAGS\' | translate}}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.openchannelInteractions.rows.length">\n                    <td md-cell colspan="8">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="DASHBOARDS.NO_AVAILABLE_INTERACTION">No Available Interaction</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="openchannelInteraction in vm.openchannelInteractions.rows" ng-class="{\'text-bold text-italic\': openchannelInteraction.unread}">\n                    <td ng-click="vm.showOpenchannelInteraction($event, openchannelInteraction)" md-cell class="id">\n                        <div layout="row" layout-align="start center">\n                            <span class="font-size-10">{{openchannelInteraction.id}}</span>\n                        </div>\n                    </td>\n                    <td md-cell>\n                        <div ng-if="!openchannelInteraction.closed && openchannelInteraction.Users.length">\n                            <md-icon md-font-icon="icon-eye" class="s16"></md-icon>\n                            <md-tooltip>\n                                <span ng-repeat="u in openchannelInteraction.Users">{{ (u.id == vm.user.id) ? \'DASHBOARDS.ME\' : vm.usersByKey[u.id].fullname | translate }}<span ng-if="!$last">, </span></span>\n                            </md-tooltip>\n                        </div>\n                    </td>\n                    <td ng-click="vm.showOpenchannelInteraction($event, openchannelInteraction)" md-cell>\n                        <div layout="row" layout-align="start center">\n                            <div layout="column">\n                                <span ng-if="!openchannelInteraction.closed && openchannelInteraction.unread" class="badge white-fg" ng-class="vm.getColorByChannel(\'openchannel\')" layout-margin>{{openchannelInteraction.unread}}</span>\n                                <md-icon ng-if="openchannelInteraction.attach" md-font-icon="icon-paperclip" class="s16"></md-icon>\n                            </div>\n                            <span class="font-size-12 text-truncate" style="width:180px" layout-margin>{{vm.getContactLabel(openchannelInteraction)}}</span>\n                        </div>\n                    </td>\n                    <td ng-click="vm.showOpenchannelInteraction($event, openchannelInteraction)" md-cell>\n                        <span class="font-size-10 text-truncate">{{openchannelInteraction.createdAt | formatdate }}</span>\n                    </td>\n                    <td ng-click="vm.showOpenchannelInteraction($event, openchannelInteraction)" md-cell>\n                        <div layout="row" ng-if="openchannelInteraction.lastMsgAt">\n                            <span><md-icon md-font-icon="{{openchannelInteraction.lastMsgDirection == \'in\' ? \'icon-arrow-down-bold blue-grey-800-fg\' : \'icon-arrow-up-bold blue-grey-300-fg\'}}"></md-icon></span>\n                            <div layout="column" layout-align="center center">\n                                <span class="font-size-10 text-truncate">{{openchannelInteraction.lastMsgAt | formatdate }}</span>\n                            </div </div>\n                            <span ng-if="!openchannelInteraction.lastMsgAt">No messages</span>\n                    </td>\n                    <td ng-click="vm.showOpenchannelInteraction($event, openchannelInteraction)" md-cell>\n                        <span ng-if="openchannelInteraction.closed" class="red-fg font-size-12">{{ \'DASHBOARDS.CLOSED\' | translate}} <span ng-if="openchannelInteraction.disposition">- {{openchannelInteraction.disposition}}</span></span>\n                        <md-tooltip ng-if="openchannelInteraction.closed">{{openchannelInteraction.closedAt | formatdate }}</md-tooltip>\n                        <span ng-if="!openchannelInteraction.closed" class="green-fg font-size-12"><span translate="DASHBOARDS.OPENED"></span><span ng-if="openchannelInteraction.substatus"> - {{openchannelInteraction.substatus}}</span></span>\n                    </td>\n                    <td ng-click="vm.showOpenchannelInteraction($event, openchannelInteraction)" md-cell class="user">\n                        <span class="font-size-12 text-truncate" style="width:120px">{{vm.getUserLabel(openchannelInteraction)}}</span>\n                    </td>\n                    <td ng-click="vm.showOpenchannelInteraction($event, openchannelInteraction)" md-cell class="openchannelAccount">\n                        {{ vm.getOpenchannelAccountLabel(openchannelInteraction) }}\n                    </td>\n                    <td md-cell>\n                        <div ng-if="openchannelInteraction.Tags.length">\n                            <div ng-if="openchannelInteraction.Tags.length == 1" layout="column" layout-align="center center">\n                                <md-icon md-font-icon="icon-tag" ng-style="{\'color\': openchannelInteraction.Tags[0].color }"></md-icon>\n                                <span class="text-truncate">{{openchannelInteraction.Tags[0].name}}</span>\n                            </div>\n                            <div ng-if="openchannelInteraction.Tags.length > 1" layout="column" layout-align="center center">\n                                <md-tooltip md-direction="left" layout="row">\n                                    <span ng-repeat="tag in openchannelInteraction.Tags">{{tag.name}}<span ng-if="!$last">, </span></span>\n                                </md-tooltip>\n                                <md-icon md-font-icon="icon-tag"></md-icon>\n                            </div>\n                        </div>\n                    </td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="3">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.showOpenchannelInteraction($event, openchannelInteraction)" translate="DASHBOARDS.SHOW">\n                                        Show Openchannel\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-label="{page: \'{{\'DASHBOARDS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'DASHBOARDS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'DASHBOARDS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n        md-total="{{vm.openchannelInteractions.count}}" md-on-paginate="vm.getOpenchannelInteractions" md-page-select></md-table-pagination>\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/recordings/agent.general.recordings.html",'<md-card ng-init="vm.onInit()">\n    <md-toolbar class="md-table-toolbar md-default table-header indigo-A100-bg">\n        <div class="md-toolbar-tools">\n            <span class="md-subhead" translate="VOICE.RECORDINGS">Recordings</span>\n            <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div class="padding-horizontal-20" layout="column" layout-align="center center">\n                <span class="font-size-10" translate="VOICE.SELECT_DATE">Select a date</span>\n                <div layout="row" layout-align="center center">\n                    <md-button ng-if="vm.pickerModel.dateStart" ng-click="vm.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                        <md-tooltip>{{ \'VOICE.DELETE\' | translate }}</md-tooltip>\n                        <md-icon md-font-icon="icon-close" class="s16 white-fg"></md-icon>\n                    </md-button>\n                    <md-date-range localization-map="vm.localizationMap" ng-model="vm.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm.getVoiceRecordings()" placeholder="{{ \'VOICE.ALL\' | translate }}"></md-date-range>\n                </div>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="VOICE.SELECT_TYPE">Select a type</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.type" ng-change="vm.getVoiceRecordings()">\n                    <md-option value="internal" translate="VOICE.INTERNAL">Internal</md-option>\n                    <md-option value="inbound">Inbound</md-option>\n                    <md-option value="outbound">Outbound</md-option>\n                    <md-option ng-value="null" translate="VOICE.ALL">All</md-option>\n                </md-select>\n            </div>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm.promise">\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getVoiceRecordings">\n                <tr md-row>\n                    <th md-column md-order-by="type">{{ \'VOICE.TYPE\' | translate }}</th>\n                    <th md-column md-order-by="uniqueid">{{ \'VOICE.UNIQUEID\' | translate }}</th>\n                    <th md-column md-order-by="calleridnum">{{ \'VOICE.CALLER\' | translate }}</th>\n                    <th md-column md-order-by="exten">{{ \'VOICE.CALLED\' | translate }}</th>\n                    <th md-column md-order-by="connectedlinenum">{{ \'VOICE.CONNECTED\' | translate }}</th>\n                    <th md-column md-order-by="queue">{{ \'VOICE.QUEUE\' | translate }}</th>\n                    <th md-column md-order-by="rating">{{ \'VOICE.RATING\' | translate }}</th>\n                    <th md-column>{{ \'VOICE.AUDIO\' | translate }}</th>\n                    <th md-column md-order-by="createdAt">{{ \'VOICE.DATE\' | translate }}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.voiceRecordings.rows.length">\n                    <td md-cell colspan="10">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="voiceRecording in vm.voiceRecordings.rows">\n                    <td md-cell class="type">{{voiceRecording.type}}</td>\n                    <td md-cell class="uniqueid">{{voiceRecording.uniqueid}}</td>\n                    <td md-cell class="calleridnum">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="voiceRecording.calleridnum" license="vm_home.license"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td md-cell class="exten">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="voiceRecording.exten" license="vm_home.license"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td md-cell class="connectedlinenum">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="voiceRecording.connectedlinenum" license="vm_home.license"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td md-cell class="queue">{{voiceRecording.queue}}</td>\n                    <td md-cell class="rating">\n                        <md-icon md-font-icon="icon-star" style="color:red" ng-show="voiceRecording.rating" ng-repeat="rating in [1,2,3,4,5] | limitTo:voiceRecording.rating"></md-icon><span ng-hide="voiceRecording.rating" translate="VOICE.NO_RATING">No rating</span></td>\n                    <td md-cell class="audio" ng-switch="voiceRecording.format">\n                        \x3c!-- audio recording directive --\x3e\n                        <ms-recording ng-switch-when=".wav" id="voiceRecording.id"></ms-recording>\n                        \x3c!-- / audio recording directive --\x3e\n                        <span ng-switch-when=".gsm">\n                        <em>{{ \'VOICE.CANT_PLAY_GSM_AUDIO_FILES\' | translate }}</em>\n                      </span>\n                    </td>\n                    <td md-cell class="createdAt ">{{voiceRecording.createdAt | date:\'medium\' }}</td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="3">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.downloadfile(voiceRecording, $event)" translate="VOICE.DOWNLOAD_VOICERECORDING">\n                                        Download VoiceRecording\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.voiceRecordings.count}}" md-on-paginate="vm.getVoiceRecordings" md-page-select></md-table-pagination>\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/sms/agent.general.sms.html",'<md-card ngCloak>\n    <md-toolbar class="md-table-toolbar md-default table-header" ng-class="vm.getColorByChannel(\'sms\')">\n        <div class="md-toolbar-tools">\n            <span class="md-subhead" translate="DASHBOARDS.INTERACTIONS">Interactions</span>\n            <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div class="padding-horizontal-20" layout="column" layout-align="center center">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_DATE">Select a date</span>\n                <div layout="row" layout-align="center center">\n                    <md-button ng-if="vm.pickerModel.dateStart" ng-click="vm.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                        <md-tooltip>{{ \'DASHBOARDS.DELETE\' | translate }}</md-tooltip>\n                        <md-icon md-font-icon="icon-close" class="s16 white-fg"></md-icon>\n                    </md-button>\n                    <md-date-range localization-map="vm.localizationMap" ng-model="vm.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm.getSmsInteractions()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n                </div>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_READ_UNREAD">Select Read/Unread</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.read" ng-change="vm.getSmsInteractions()">\n                    <md-option value="0" translate="DASHBOARDS.UNREAD">READ</md-option>\n                    <md-option value="1" translate="DASHBOARDS.READ">UNREAD</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_STATUS">Select a status</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.closed" ng-change="vm.getSmsInteractions()">\n                    <md-option value="0" translate="DASHBOARDS.OPENED">OPENED</md-option>\n                    <md-option value="1" translate="DASHBOARDS.CLOSED">CLOSED</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_ACCOUNT">Select an account</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.SmsAccountId" ng-change="vm.getSmsInteractions()">\n                    <md-option ng-value="smsAccount.id" ng-repeat="smsAccount in vm.smsAccounts.rows">{{smsAccount.name}}</md-option>\n                    <md-option ng-value="null" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_AGENT">Select an agent</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.UserId" ng-change="vm.getSmsInteractions()">\n                    <md-option ng-value="vm.user.id" translate="DASHBOARDS.ME"></md-option>\n                    <md-option ng-value="\'null\'" translate="DASHBOARDS.NOT_ASSIGNED"></md-option>\n                    <md-option ng-value="undefined" translate="DASHBOARDS.ALL"></md-option>\n                </md-select>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_TAG">Select a tag</span>\n                <md-select id="tags" placeholder="Tags" multiple="true" class="font-size-12 no-margin" ng-model="vm.query.tag" ng-change="vm.getSmsInteractions()" style="color:white;">\n                    <md-option ng-repeat="tag in vm.tags.rows" ng-value="tag.id">{{tag.name}}</md-option>\n                </md-select>\n            </div>\n            <div layout="column">\n                <md-button class="md-icon-button" aria-label="Reload" translate translate-attr-aria-label="DASHBOARDS.RELOAD" ng-click="vm.getSmsInteractions()">\n                    <md-icon md-font-icon="icon-reload"></md-icon>\n                </md-button>\n            </div>\n            <md-menu ng-if="vm.smsAccounts.rows && vm.smsAccounts.rows.length">\n                <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                    <md-icon md-font-icon="icon-plus"></md-icon>\n                </md-button>\n                <md-menu-content width="3">\n                    <md-menu-item ng-repeat="smsAccount in vm.smsAccounts.rows">\n                        <md-button aria-label="compose" ng-click="vm.composeSmsInteraction($event, smsAccount)">{{ smsAccount.name }} ({{ smsAccount.key }})</md-button>\n                    </md-menu-item>\n                </md-menu-content>\n            </md-menu>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm.promise">\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getSmsInteractions">\n                <tr md-row>\n                    <th md-column md-order-by="id">ID</th>\n                    <th md-column style="width:15px">\n                        <md-icon md-font-icon="icon-eye" class="s16"></md-icon>\n                    </th>\n                    <th md-column style="width:180px">{{\'DASHBOARDS.CONTACT\' | translate}}</th>\n                    <th md-column md-order-by="createdAt">{{\'DASHBOARDS.STARTEDAT\' | translate}}</th>\n                    <th md-column md-order-by="lastMsgAt">{{\'DASHBOARDS.LAST_MESSAGE\' | translate}}</th>\n                    <th md-column md-order-by="closed">{{\'DASHBOARDS.STATUS\' | translate}}</th>\n                    <th md-column style="width:80px">{{\'DASHBOARDS.AGENT\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.ACCOUNT\' | translate}}</th>\n                    <th md-column>{{\'DASHBOARDS.TAGS\' | translate}}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.smsInteractions.rows.length">\n                    <td md-cell colspan="8">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="DASHBOARDS.NO_AVAILABLE_INTERACTION">No Available Interaction</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="smsInteraction in vm.smsInteractions.rows" ng-class="{\'text-bold text-italic\': smsInteraction.unread}">\n                    <td ng-click="vm.showSmsInteraction($event, smsInteraction)" md-cell class="id">\n                        <div layout="row" layout-align="start center">\n                            <span class="font-size-10">{{smsInteraction.id}}</span>\n                        </div>\n                    </td>\n                    <td md-cell>\n                        <div ng-if="!smsInteraction.closed && smsInteraction.Users.length">\n                            <md-icon md-font-icon="icon-eye" class="s16"></md-icon>\n                            <md-tooltip>\n                                <span ng-repeat="u in smsInteraction.Users">{{ (u.id == vm.user.id) ? \'DASHBOARDS.ME\' : vm.usersByKey[u.id].fullname | translate }}<span ng-if="!$last">, </span></span>\n                            </md-tooltip>\n                        </div>\n                    </td>\n                    <td ng-click="vm.showSmsInteraction($event, smsInteraction)" md-cell>\n                        <div layout="row" layout-align="start center">\n                            <div layout="column">\n                                <span ng-if="!smsInteraction.closed && smsInteraction.unread" class="badge white-fg" ng-class="vm.getColorByChannel(\'sms\')" layout-margin>{{smsInteraction.unread}}</span>\n                                <md-icon ng-if="smsInteraction.attach" md-font-icon="icon-paperclip" class="s16"></md-icon>\n                            </div>\n                            <span class="font-size-12 text-truncate" style="width:180px" layout-margin>{{vm.getContactLabel(smsInteraction)}}</span>\n                        </div>\n                    </td>\n                    <td ng-click="vm.showSmsInteraction($event, smsInteraction)" md-cell>\n                        <span class="font-size-10 text-truncate">{{smsInteraction.createdAt | formatdate }}</span>\n                    </td>\n                    <td ng-click="vm.showSmsInteraction($event, smsInteraction)" md-cell>\n                        <div layout="row" ng-if="smsInteraction.lastMsgAt">\n                            <span><md-icon md-font-icon="{{smsInteraction.lastMsgDirection == \'in\' ? \'icon-arrow-down-bold blue-grey-800-fg\' : \'icon-arrow-up-bold blue-grey-300-fg\'}}"></md-icon></span>\n                            <div layout="column" layout-align="center center">\n                                <span class="font-size-10 text-truncate">{{smsInteraction.lastMsgAt | formatdate }}</span>\n                            </div </div>\n                            <span ng-if="!smsInteraction.lastMsgAt">No messages</span>\n                    </td>\n                    <td ng-click="vm.showSmsInteraction($event, smsInteraction)" md-cell>\n                        <span ng-if="smsInteraction.closed" class="red-fg font-size-12">{{ \'DASHBOARDS.CLOSED\' | translate}} <span ng-if="smsInteraction.disposition">- {{smsInteraction.disposition}}</span></span>\n                        <md-tooltip ng-if="smsInteraction.closed">{{smsInteraction.closedAt | formatdate }}</md-tooltip>\n                        <span ng-if="!smsInteraction.closed" class="green-fg font-size-12"><span translate="DASHBOARDS.OPENED"></span><span ng-if="smsInteraction.substatus"> - {{smsInteraction.substatus}}</span></span>\n                    </td>\n                    <td ng-click="vm.showSmsInteraction($event, smsInteraction)" md-cell class="user">\n                        <span class="font-size-12 text-truncate" style="width:120px">{{vm.getUserLabel(smsInteraction)}}</span>\n                    </td>\n                    <td ng-click="vm.showSmsInteraction($event, smsInteraction)" md-cell class="smsAccount">\n                        {{ vm.getSmsAccountLabel(smsInteraction) }}\n                    </td>\n                    <td md-cell>\n                        <div ng-if="smsInteraction.Tags.length">\n                            <div ng-if="smsInteraction.Tags.length == 1" layout="column" layout-align="center center">\n                                <md-icon md-font-icon="icon-tag" ng-style="{\'color\': smsInteraction.Tags[0].color }"></md-icon>\n                                <span class="text-truncate">{{smsInteraction.Tags[0].name}}</span>\n                            </div>\n                            <div ng-if="smsInteraction.Tags.length > 1" layout="column" layout-align="center center">\n                                <md-tooltip md-direction="left" layout="row">\n                                    <span ng-repeat="tag in smsInteraction.Tags">{{tag.name}}<span ng-if="!$last">, </span></span>\n                                </md-tooltip>\n                                <md-icon md-font-icon="icon-tag"></md-icon>\n                            </div>\n                        </div>\n                    </td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="3">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.showSmsInteraction($event, smsInteraction)" translate="DASHBOARDS.SHOW">\n                                        Show Sms\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-label="{page: \'{{\'DASHBOARDS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'DASHBOARDS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'DASHBOARDS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n        md-total="{{vm.smsInteractions.count}}" md-on-paginate="vm.getSmsInteractions" md-page-select></md-table-pagination>\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/voice/agent.general.voice.html",'<md-card ng-init="vm.onInit()">\n    <md-toolbar class="md-table-toolbar md-default table-header blue-A700-bg">\n        <div class="md-toolbar-tools">\n            <span class="md-subhead" translate="VOICE.CALLS">Calls</span>\n            <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n            <div flex></div>\n            <div class="padding-horizontal-20" layout="column" layout-align="center center">\n                <span class="font-size-10" translate="VOICE.SELECT_DATE">Select a date</span>\n                <div layout="row" layout-align="center center">\n                    <md-button ng-if="vm.pickerModel.dateStart" ng-click="vm.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                        <md-tooltip>{{ \'VOICE.DELETE\' | translate }}</md-tooltip>\n                        <md-icon md-font-icon="icon-close" class="s16 white-fg"></md-icon>\n                    </md-button>\n                    <md-date-range localization-map="vm.localizationMap" ng-model="vm.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm.getVoiceCalls()" placeholder="{{ \'VOICE.ALL\' | translate }}"></md-date-range>\n                </div>\n            </div>\n            <div class="padding-horizontal-20" layout="column">\n                <span class="font-size-10" translate="VOICE.SELECT_TYPE">Select a type</span>\n                <md-select class="font-size-12 no-margin" ng-model="vm.query.type" ng-change="vm.getVoiceCalls()">\n                    <md-option value="internal" translate="VOICE.INTERNAL">Internal</md-option>\n                    <md-option value="inbound">Inbound</md-option>\n                    <md-option value="outbound">Outbound</md-option>\n                    <md-option ng-value="null" translate="VOICE.ALL">All</md-option>\n                </md-select>\n            </div>\n        </div>\n    </md-toolbar>\n    <md-table-container>\n        <table md-table md-progress="vm.promise">\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getVoiceCalls">\n                <tr md-row>\n                    <th md-column md-order-by="id">ID</th>\n                    <th md-column md-order-by="type">{{ \'VOICE.TYPE\' | translate }}</th>\n                    <th md-column md-order-by="source">{{ \'VOICE.SOURCE\' | translate }}</th>\n                    <th md-column md-order-by="destination">{{ \'VOICE.DESTINATION\' | translate }}</th>\n                    <th md-column md-order-by="starttime">{{ \'VOICE.STARTEDAT\' | translate }}</th>\n                    <th md-column md-order-by="endtime">{{ \'VOICE.ENDEDAT\' | translate }}</th>\n                    <th md-column md-order-by="userDisposition">{{ \'VOICE.DISPOSITION\' | translate }}</th>\n                    <th md-column>{{ \'VOICE.NOTE\' | translate }}</th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.voiceCalls.rows.length">\n                    <td md-cell colspan="8">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="voiceCall in vm.voiceCalls.rows" ng-click="vm.showDetails(voiceCall, $event)">\n                    <td md-cell class="type">{{voiceCall.id}}</td>\n                    <td md-cell class="type">{{voiceCall.type}}</td>\n                    <td md-cell class="source">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="voiceCall.source" license="vm_home.license"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td md-cell class="destination">\n                        \x3c!-- click to call directive --\x3e\n                        <ms-click-to-call target="voiceCall.destination" license="vm_home.license"></ms-click-to-call>\n                        \x3c!--  / click to call directive --\x3e\n                    </td>\n                    <td md-cell class="starttime">{{voiceCall.starttime | date:\'medium\' }}</td>\n                    <td md-cell class="endtime">{{voiceCall.endtime | date:\'medium\' }}</td>\n                    <td md-cell class="disposition">{{voiceCall.userDisposition}}</td>\n                    <td md-cell class="note">\n                        <md-icon ng-if="voiceCall.note" md-font-icon="icon-clipboard-outline"></md-icon>\n                    </td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="3">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.showDetails(voiceCall, $event)" translate="VOICE.DETAILS">\n                                        Show Details\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </md-table-container>\n\n    <md-table-pagination md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.voiceCalls.count}}" md-on-paginate="vm.getVoiceCalls" md-page-select></md-table-pagination>\n</md-card>'),e.put("app/main/apps/dashboards/views/general/agent/home/voice/details/dialog.html",'<md-dialog class="details-dialog" aria-label="details">\n    <md-toolbar class="md-background-bg">\n        <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n            <span ng-if="!vm.interaction.closed" class="title" translate="VOICE.DETAILS"></span>\n            <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n            </md-button>\n        </div>\n    </md-toolbar>\n\n    <md-dialog-content>\n        <md-list flex>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.UNIQUEID">Uniqueid</p>\n                    <h4>{{vm.call.uniqueid}}</h4>\n                </div>\n            </md-list-item>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.TYPE">Type</p>\n                    <h4>{{vm.call.type ? vm.call.type : \'no type\'}}</h4>\n                </div>\n            </md-list-item>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.SOURCE">Source</p>\n                    <h4>{{vm.call.source ? vm.call.source : \'unknown\'}}</h4>\n                </div>\n            </md-list-item>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.DESTINATION">Destination</p>\n                    <h4>{{vm.call.destination ? vm.call.destination : \'unknown\'}}</h4>\n                </div>\n            </md-list-item>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.STARTEDAT">Started At</p>\n                    <h4>{{vm.call.starttime | date:\'medium\'}}</h4>\n                </div>\n            </md-list-item>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.ANSWEREDAT">Answered At</p>\n                    <h4>{{vm.call.answertime ? (vm.call.answertime | date:\'medium\') : \'--\'}}</h4>\n                </div>\n            </md-list-item>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.ENDEDAT">Ended At</p>\n                    <h4>{{vm.call.endtime ? (vm.call.endtime | date:\'medium\') : \'--\'}}</h4>\n                </div>\n            </md-list-item>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.DURATION">Duration</p>\n                    <h4>{{vm.call.duration ? vm.call.duration : \'--\'}}s</h4>\n                </div>\n            </md-list-item>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.BILLABLESECONDS">Billable Seconds</p>\n                    <h4>{{vm.call.billableseconds ? vm.call.billableseconds : \'--\'}}s</h4>\n                </div>\n            </md-list-item>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.DISPOSITION">Disposition</p>\n                    <h4>{{vm.call.userDisposition ? vm.call.userDisposition : \'--\'}}</h4>\n                </div>\n            </md-list-item>\n\n            <md-list-item class="md-2-line">\n                <div class="md-list-item-text">\n                    <p translate="VOICE.NOTE">Note</p>\n                    <h4>{{vm.call.note ? vm.call.note : \'--\'}}</h4>\n                </div>\n            </md-list-item>\n        </md-list>\n    </md-dialog-content>\n\n    <md-dialog-actions layout="row" layout-align="space-between center">\n        <md-button type="button" ng-click="vm.closeDialog()" class="send-button md-accent md-raised" aria-label="DISPOSE" translate="VOICE.CLOSE" translate-attr-aria-label="VOICE.DISPOSE">\n            CLOSE\n        </md-button>\n    </md-dialog-actions>\n</md-dialog>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/agent.general.interaction.dialog.html",'<md-dialog id="agent-general-dialog" aria-label="Spy Dialog">\n    <div id="interaction-app" class="agent-content" ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/agent.general.interaction.html\'"></div>\n</md-dialog>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/agent.general.interaction.html",'\x3c!-- CONTENT CARD --\x3e\n<md-content class="content-card" layout="row" layout-fill>\n\n    <div ng-if="!vm.showInteraction" class="start-point" flex layout="column" layout-align="center center" ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.loading.html\'"></div>\n\n    <div ng-if="vm.showInteraction" flex layout="row">\n\n        <md-card flex="75" class="interaction">\n\n            <md-content class="interaction-agents" layout="row" layout-align="start center" ng-if="!vm.interaction.closed && vm.interaction.Users.length">\n                <strong layout-margin translate="DASHBOARDS.CURRENTLY_IN_USE_BY">Currently in use by </strong>\n\n                <div ng-repeat="u in vm.interaction.Users">\n                    <img class="avatar-small" ng-src="api/users/{{u.id}}/avatar">\n                    <md-tooltip> {{ (u.id == vm.user.id) ? \'DASHBOARDS.ME\' : vm.usersMap[u.id] | translate }} </md-tooltip>\n                </div>\n            </md-content>\n\n            \x3c!-- TOOLBAR --\x3e\n            <md-toolbar class="interaction-toolbar" ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.toolbar.html\'"></md-toolbar>\n            \x3c!-- / TOOLBAR --\x3e\n\n            \x3c!-- CONTENT --\x3e\n            <md-content id="interaction-content" name="{{\'interaction-content-\' + vm.tab.id}}" flex ms-scroll layout-wrap>\n                <div class="interaction-messages" ng-switch="vm.tab.channel">\n                    <div ng-switch-when="mail">\n                        <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.interaction.mail.html\'"></div>\n                    </div>\n                    <div ng-switch-default>\n                        <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.interaction.html\'"></div>\n                    </div>\n                </div>\n            </md-content>\n            \x3c!-- / CONTENT --\x3e\n\n            \x3c!-- FOOTER --\x3e\n            <div ng-if="!vm.interaction.closed && vm.tab.channel != \'mail\' && vm.tab.channel !== \'fax\' && (vm.tab.channel != \'sms\' || !vm.tab.spy)" class="interaction-footer flex-noshrink" layout="row" ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.footer.html\'"></div>\n            \x3c!-- / FOOTER--\x3e\n        </md-card>\n\n        <md-card layout="column" flex class="info" ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.html\'"></md-card>\n    </div>\n</md-content>\n\x3c!-- / CONTENT CARD --\x3e'),e.put("app/main/apps/dashboards/views/general/agent/interaction/composeFax/dialog.html",'<md-dialog class="compose-dialog-fax" aria-label="New Message">\n    <form class="md-inline-form" name="composeForm" novalidate>\n        <md-toolbar class="md-background-bg">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <div layout="row">\n                    <md-button ng-click="vm.send()" class="md-raised md-blue-bg white-fg" aria-label="Send message">\n                        <span translate="FAX.SEND">SEND</span>\n                    </md-button>\n                    <md-button ng-disabled="vm.message.attachments.length === 1" class="md-fab md-mini md-white-bg" aria-label="attachment" translate-attr-aria-label="DASHBOARDS.ATTACHMENT" flow-btn flow-name="vm.ngFlow.flow" flow-files-submitted="vm.upload()" flow-init="vm.ngFlowOptions"\n                        flow-file-added="vm.fileAdded($file)" flow-file-success="vm.fileSuccess($file, $message)">\n                        <md-icon md-font-icon="icon-paperclip" class="red-fg"></md-icon>\n                    </md-button>\n                </div>\n                <span class="title">{{vm.message.from}}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()" aria-label="Close dialog" tranlate translate-aria-label="FAX.CLOSE_DIALOG">\n                    <md-icon md-font-icon="icon-close"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <md-input-container class="md-block to">\n                <label translate="FAX.TO">To</label>\n                <md-chips name="to" ng-model="vm.message.to" md-transform-chip="vm.transformContact($chip)" md-separator-keys="vm.separatorKeys" md-require-match="false" md-max-chips="1" required>\n                    \x3c!-- <input ng-model="vm.message.subject" type="text"> --\x3e\n                    <md-autocomplete ng-hide="vm.message.to.length === 1" md-search-text="vm.searchTo" md-items="contact in vm.contactSearch(vm.searchTo)" md-item-text="contact.fax" md-min-length="3">\n                        <md-item-template>\n                            <span>{{ vm.getContact(contact) }}</span>\n                        </md-item-template>\n                    </md-autocomplete>\n                </md-chips>\n                <div ng-messages="composeForm.to.$error" ng-if="composeForm.$dirty">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.TO_REQUIRED">To field is required</span>\n                    </div>\n                    <div ng-message="md-max-chips">You reached the maximum amount of chips</div>\n                </div>\n            </md-input-container>\n\n            <div class="attachment-list" ng-if="vm.message.attachments.length" layout="row" layout-wrap>\n                <div class="attachment" layout="row" layout-align="space-between center" ng-repeat="attachment in vm.message.attachments">\n                    <div>\n                        <md-icon md-font-icon="icon-paperclip" class="s16"></md-icon>\n                        <span class="filename">{{attachment.name}}</span>\n                        <span class="size">({{attachment.size | byteFmt: 0}})</span>\n                    </div>\n\n                    <md-button class="md-icon-button" aria-label="Delete attachment" translate translate-attr-aria-label="FAX.DELETE_ATTACHMENT">\n                        \x3c!-- <md-icon md-font-icon="icon-close" class="s16"></md-icon> --\x3e\n                    </md-button>\n                </div>\n            </div>\n\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/composeMail/dialog.html",'<md-dialog class="compose-dialog" aria-label="New Message" ng-style="{\n      \'max-width\':  {true: \'620px\', false: \'90%\'}[ vm.secret ],\n      \'width\': {true: \'620px\', false: \'100%\'}[ vm.secret ],\n      \'max-height\': {true: undefined, false: \'97%\'}[ vm.secret ]\n    }">\n    <form class="md-inline-form" name="composeForm" novalidate>\n        <md-toolbar ng-class="md-background-bg">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <div layout="row">\n                    <div ng-if="!vm.secret" class="md-button md-raised blue-bg no-padding">\n                        <button class="white-fg margin-horizontal-10" aria-label="Send message" ng-disabled="!vm.verifySmtp" ng-click="vm.send($event, false, null)">\n                        <span>{{ \'MAIL.SEND\' | translate | uppercase }}</span>\n                      </button>\n                        <span class="white-fg secondary-text vertical-divider"></span>\n                        <md-menu>\n                            <button ng-disabled="!vm.verifySmtp" class="white-fg margin-left-0" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                          <md-icon md-font-icon="icon-menu-down" class="icon s24"></md-icon>\n                        </button>\n\n                            <md-menu-content width="2">\n                                <md-menu-item ng-if="vm.subStatuses.rows.length">\n                                    <md-menu>\n                                        <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="MAIL.SEND_AS">\n                                            Send as\n                                        </md-button>\n                                        <md-menu-content>\n                                            <md-menu-item ng-repeat="subStatus in vm.subStatuses.rows">\n                                                <md-button ng-click="vm.send($event, false, subStatus.name)">\n                                                    {{subStatus.name}}\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </md-menu-item>\n                                <md-menu-item>\n                                    <md-button ng-click="vm.send($event, true, null)" translate="MAIL.SEND_AND_CLOSE">\n                                        Send and Close\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </div>\n                    <md-button ng-if="vm.secret" ng-click="vm.addNote()" class="md-raised md-blue-bg white-fg" aria-label="Send message">\n                        <span translate="MAIL.ADD_NOTE">Add note</span>\n                    </md-button>\n                    <md-button ng-disabled="!vm.verifySmtp" class="md-fab md-mini md-white-bg" aria-label="attachment" translate-attr-aria-label="DASHBOARDS.ATTACHMENT" flow-btn flow-name="vm.ngFlow.flow" flow-files-submitted="vm.upload($files)" flow-init="vm.ngFlowOptions"\n                        flow-file-success="vm.fileSuccess($file, $message)">\n                        <md-icon md-font-icon="icon-paperclip" class="red-fg"></md-icon>\n                    </md-button>\n                </div>\n                <span ng-if="!vm.secret" class="title">{{vm.message.from}}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()" aria-label="Close dialog" tranlate translate-aria-label="MAIL.CLOSE_DIALOG">\n                    <md-icon md-font-icon="icon-close"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container ng-if="!vm.secret" class="md-block to" ng-class="{\'hidden-cc\': vm.hiddenCC, \'hidden-bcc\': vm.hiddenBCC}">\n                <label translate="MAIL.TO">To</label>\n                <md-chips name="to" ng-model="vm.message.to" md-transform-chip="vm.transformContact($chip)" md-separator-keys="vm.separatorKeys" md-require-match="false" required>\n                    <md-autocomplete md-search-text="vm.searchTo" md-items="contact in vm.contactSearch(vm.searchTo)" md-item-text="contact.email" md-min-length="3">\n                        <md-item-template>\n                            <span>{{ vm.getContact(contact) }}</span>\n                        </md-item-template>\n                    </md-autocomplete>\n                </md-chips>\n                <div ng-messages="composeForm.to.$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.TO_REQUIRED">To field is required</span>\n                    </div>\n                </div>\n\n                <div class="cc-bcc" layout="row" layout-align="start center">\n                    <div class="show-cc" ng-show="vm.hiddenCC" ng-click="vm.hiddenCC = false">CC</div>\n                    <div class="show-bcc" ng-show="vm.hiddenBCC" ng-click="vm.hiddenBCC = false">BCC</div>\n                </div>\n            </md-input-container>\n\n            <md-input-container ng-if="!vm.secret" class="md-block" ng-hide="vm.hiddenCC">\n                <label translate="MAIL.CC">Cc</label>\n                <md-chips name="cc" ng-model="vm.message.cc" md-transform-chip="vm.transformContact($chip)" md-separator-keys="vm.separatorKeys" md-require-match="false" required>\n                    <md-autocomplete md-search-text="vm.searchCc" md-items="contact in vm.contactSearch(vm.searchCc)" md-item-text="contact.email" md-min-length="3">\n                        <md-item-template>\n                            <span>{{ vm.getContact(contact) }}</span>\n                        </md-item-template>\n                    </md-autocomplete>\n                </md-chips>\n            </md-input-container>\n\n            <md-input-container ng-if="!vm.secret" class="md-block" ng-hide="vm.hiddenBCC">\n                <label translate="MAIL.BCC">Bcc</label>\n                <md-chips name="bcc" ng-model="vm.message.bcc" md-transform-chip="vm.transformContact($chip)" md-separator-keys="vm.separatorKeys" md-require-match="false" required>\n                    <md-autocomplete md-search-text="vm.searchBcc" md-items="contact in vm.contactSearch(vm.searchBcc)" md-item-text="contact.email" md-min-length="3">\n                        <md-item-template>\n                            <span>{{ vm.getContact(contact) }}</span>\n                        </md-item-template>\n                    </md-autocomplete>\n                </md-chips>\n            </md-input-container>\n\n            <md-input-container ng-if="!vm.secret" class="md-block no-margin">\n                <label translate="MAIL.SUBJECT">Subject</label>\n                <input ng-model="vm.message.subject" type="text">\n            </md-input-container>\n\n            <div class="attachment-list" ng-if="vm.message.attachments.length" layout="row" layout-wrap>\n                <div class="attachment" layout="row" layout-align="space-between center" ng-repeat="attachment in vm.message.attachments">\n                    <div>\n                        <md-icon md-font-icon="icon-paperclip" class="s16"></md-icon>\n                        <span class="filename">{{attachment.name}}</span>\n                        <span class="size" ng-if="attachment.size">({{attachment.size | byteFmt: 0}})</span>\n                    </div>\n\n                    <md-button ng-click="vm.deleteAttachment(attachment)" class="md-icon-button" aria-label="Delete attachment" translate translate-attr-aria-label="MAIL.DELETE_ATTACHMENT">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <div class="padding-top-5">\n                <textarea ckeditor="vm.ckeditor" id="html-area" ng-model="vm.message.body" md-select-on-focus="" ready="vm.onReadyEditor()"></textarea>\n            </div>\n\n            <md-switch ng-if="!vm.message.showLastMessage && !vm.secret" ng-model="vm.message.showLastMessage" ng-change="vm.loadLastMessage()" aria-label="load last message"><span translate="MAIL.SHOW_ORIGINAL_MESSAGE">Show original message</span></md-switch>\n\n            <md-autocomplete ng-if="!vm.secret" md-selected-item="vm.selectedItem" md-search-text="vm.searchText" md-selected-item-change="vm.selectedItemChange(item)" md-items="item in vm.searchTextChange(vm.searchText)" md-item-text="item.value" md-min-length="1"\n                md-floating-label="{{ \'MAIL.CANNED_ANSWER_SEARCH\' | translate}}" class="input-show-hide no-container-margin">\n                <md-item-template>\n                    <md-icon ng-if="!item.MailAccountId" md-font-icon="icon-earth" aria-label="alert email" class="s16"></md-icon>\n                    <md-icon ng-if="item.MailAccountId" md-font-icon="icon-email" aria-label="alert email" class="s16 teal-fg"></md-icon>\n                    <span md-highlight-text="vm.searchText" md-highlight-flags="^i">{{item.key}} - {{item.value}}</span>\n                </md-item-template>\n\n                <md-not-found>\n                    <span translate="MAIL.CANNED_ANSWER_NOT_FOUND">No canned answers were found</span>\n                </md-not-found>\n            </md-autocomplete>\n\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/composeSms/dialog.html",'<md-dialog class="compose-dialog" aria-label="New Message">\n    <form class="md-inline-form" name="composeForm" novalidate>\n        <md-toolbar class="md-background-bg">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <div layout="row">\n                    <md-button ng-if="!vm.secret" ng-click="vm.send()" class="md-raised md-blue-bg white-fg" aria-label="Send message">\n                        <span translate="SMS.SEND">SEND</span>\n                    </md-button>\n                    <md-button ng-if="vm.secret" ng-click="vm.addNote()" class="md-raised md-blue-bg white-fg" aria-label="Add note">\n                        <span translate="SMS.ADD_NOTE">Add note</span>\n                    </md-button>\n                </div>\n                <span ng-if="!vm.secret" class="title">{{vm.message.from}}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()" aria-label="Close dialog" tranlate translate-aria-label="SMS.CLOSE_DIALOG">\n                    <md-icon md-font-icon="icon-close"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <md-input-container ng-if="!vm.secret" class="md-block to">\n                <label translate="SMS.TO">To</label>\n                <md-chips name="to" ng-model="vm.message.to" md-transform-chip="vm.transformContact($chip)" md-separator-keys="vm.separatorKeys" md-require-match="false" md-max-chips="1" required>\n                    <md-autocomplete md-search-text="vm.searchTo" md-items="contact in vm.contactSearch(vm.searchTo)" md-item-text="contact.mobile" md-min-length="3">\n                        <md-item-template>\n                            <span>{{ vm.getContact(contact) }}</span>\n                        </md-item-template>\n                    </md-autocomplete>\n                </md-chips>\n                <div ng-messages="composeForm.to.$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.TO_REQUIRED">To field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            \x3c!-- msEmojyArea directive --\x3e\n            <ms-emoji-area ng-if="vm.tab.channel != \'fax\'" on-reply="vm.reply(event, body)" set-text="vm.setTextWrapper(dirFn)" get-text="vm.getTextWrapper(dirFn)" picker-position="\'bottom\'" search="false" recent-emojis="false" placeholder="\'SMS.INSERT_MESSAGE_HERE\'"></ms-emoji-area>\n            \x3c!-- / msEmojyArea directive --\x3e\n\n            <md-autocomplete ng-if="!vm.secret" class="padding-top-5" md-selected-item="vm.selectedItem" md-search-text="vm.searchText" md-selected-item-change="vm.selectedItemChange(item)" md-items="item in vm.searchTextChange(vm.searchText)" md-item-text="item.value"\n                md-min-length="1" md-floating-label="{{ \'SMS.CANNED_ANSWER_SEARCH\' | translate}}" class="input-show-hide no-container-margin">\n                <md-item-template>\n                    <md-icon ng-if="!item.SmsAccountId" md-font-icon="icon-earth" aria-label="alert sms" class="s16"></md-icon>\n                    <md-icon ng-if="item.SmsAccountId" md-font-icon="icon-message-text" aria-label="alert sms" class="s16 orange-fg"></md-icon>\n                    <span md-highlight-text="vm.searchText" md-highlight-flags="^i">{{item.key}} - {{item.value}}</span>\n                </md-item-template>\n\n                <md-not-found>\n                    <span translate="SMS.CANNED_ANSWER_NOT_FOUND">No canned answers were found</span>\n                </md-not-found>\n            </md-autocomplete>\n\n\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/dispose/dialog.html",'<md-dialog class="disposition-dialog" aria-label="disposition">\n    <form name="dispositionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-background-bg">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span ng-if="!vm.interaction.closed" class="title" translate="DASHBOARDS.DISPOSE"></span>\n                <span ng-if="vm.interaction.closed" class="title" translate="DASHBOARDS.INFO"></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="DASHBOARDS.DISPOSITIONS">Dispositions</label>\n                <md-select name="disposition" ng-model="vm.interaction.disposition" required>\n                    \x3c!-- <md-select ng-disabled="vm.interaction.closed && vm.interaction.disposition" name="disposition" ng-model="vm.interaction.disposition" required> --\x3e\n                    <md-option ng-value="null">NONE</md-option>\n                    <md-option ng-value="disposition.name" ng-repeat="disposition in vm.dispositions.rows">{{ disposition.name }}</md-option>\n                </md-select>\n                <div ng-messages="dispositionForm.disposition.$error" ng-show="dispositionForm.disposition.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="DASHBOARDS.ERRORS.DISPOSITION_REQUIRED">Disposition field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="DASHBOARDS.NOTE">Note</label>\n                \x3c!-- <textarea ng-disabled="vm.interaction.closed && vm.interaction.disposition" ng-model="vm.interaction.note" md-maxlength="255" max-rows="5" autofocus></textarea> --\x3e\n                <textarea ng-model="vm.interaction.note" md-maxlength="255" max-rows="5" autofocus></textarea>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        \x3c!-- <md-dialog-actions ng-if="!vm.interaction.closed || !vm.interaction.disposition" layout="row" layout-align="space-between center"> --\x3e\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveDisposition(true)" class="send-button md-accent md-raised" ng-if="!vm.interaction.closed && vm.interaction.disposition" aria-label="CLOSE_AND_DISPOSE" translate="DASHBOARDS.CLOSE_AND_DISPOSE" translate-attr-aria-label="DASHBOARDS.CLOSE_AND_DISPOSE">\n                    CLOSE AND DISPOSE\n                </md-button>\n                <md-button type="submit" ng-click="vm.saveDisposition(false)" class="send-button md-accent md-raised" ng-if="!vm.interaction.closed && !vm.interaction.disposition" aria-label="CLOSE_WITHOUT_DISPOSE" translate="DASHBOARDS.CLOSE_WITHOUT_DISPOSE" translate-attr-aria-label="DASHBOARDS.CLOSE_WITHOUT_DISPOSE">\n                    CLOSE WITHOUT DISPOSE\n                </md-button>\n                <md-button type="submit" ng-click="vm.saveDisposition(false)" class="send-button md-accent md-raised" ng-if="vm.interaction.closed" aria-label="DISPOSE" translate="DASHBOARDS.DISPOSE" translate-attr-aria-label="DASHBOARDS.DISPOSE">\n                    DISPOSE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/tag/dialog.html",'<md-dialog class="tag-dialog" aria-label="tag">\n    <form name="tagForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-background-bg">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title" translate="DASHBOARDS.TAGS"></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <md-chips ng-model="vm.interaction.Tags" md-autocomplete-snap md-require-match="vm.autocompleteRequireMatch">\n                    <md-autocomplete ng-blur="vm.searchText = \'\'" md-min-length="0" md-selected-item-change="vm.selectedItemChange" md-selected-item="vm.selectedItem" md-search-text="vm.searchText" md-items="item in vm.tags.rows | filter:{ name: vm.searchText }" md-item-text="item.name"\n                        placeholder="Search for a tag">\n                        <span md-highlight-text="vm.searchText">{{item.name}}</span>\n                    </md-autocomplete>\n                    <md-chip-template>\n                        <span>\n                    <strong>{{$chip.name}}</strong>\n                  </span>\n                    </md-chip-template>\n                </md-chips>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveTag(false)" ng-disabled="tagForm.$pristine" class="send-button md-accent md-raised" aria-label="TAG" translate="DASHBOARDS.SAVE" translate-attr-aria-label="DASHBOARDS.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.footer.html",'\x3c!-- REPLY FORM --\x3e\n<div ng-show="vm.showFooter" layout="column" layout-align "center center" flex>\n    <div layout="row" layout-align="center center" flex>\n        \x3c!-- msEmojyArea directive --\x3e\n        <ms-emoji-area ng-if="vm.tab.channel != \'fax\'" on-reply="vm.reply(event, body)" set-text="vm.setTextWrapper(dirFn)" get-text="vm.getTextWrapper(dirFn)" placeholder="vm.tab.channel.toUpperCase() + \'.INSERT_MESSAGE_HERE\'"></ms-emoji-area>\n        \x3c!-- / msEmojyArea directive --\x3e\n\n        <div layout="row" layout-align="end center">\n            <md-button ng-if="vm.tab.channel != \'fax\'" style="margin:1px;" class="md-icon-button md-mini" ng-click="vm.changeDisplayCannedAnswerInputValue()" aria-label="Search canned answer" translate translate-attr-aria-label="DASHBOARDS.SEND_MESSAGE">\n                <md-icon md-font-icon="icon-auto-fix" class="green-fg"></md-icon>\n            </md-button>\n\n            <md-button ng-if="vm.tab.channel == \'openchannel\' || vm.tab.channel == \'chat\' || vm.tab.channel == \'fax\'" style="margin:1px;" class="md-icon-button md-warn md-mini" aria-label="attachment" translate-attr-aria-label="DASHBOARDS.ATTACHMENT" flow-btn flow-name="vm.ngFlow.flow"\n                flow-files-submitted="vm.upload()" flow-init="vm.ngFlowOptions" flow-file-added="vm.fileAdded($file)" flow-file-success="vm.fileSuccess($file, $message)">\n                <md-icon md-font-icon="icon-paperclip"></md-icon>\n            </md-button>\n        </div>\n    </div>\n\n    <md-autocomplete ng-hide="!vm.displayCannedAnswerInput" md-selected-item="vm.selectedItem" md-search-text="vm.searchText" md-selected-item-change="vm.selectedItemChange(item)" md-items="item in vm.searchTextChange(vm.searchText)" md-item-text="item.value"\n        md-min-length="1" placeholder="{{ \'DASHBOARDS.CANNED_ANSWER_SEARCH\' | translate}}" class="cannedarea input-show-hide">\n        <md-item-template>\n            <md-icon ng-if="!item[vm.tab.channel === \'chat\' ? \'ChatWebsiteId\' : _.capitalize(vm.tab.channel) + \'AccountId\']" md-font-icon="icon-earth" aria-label="alert channel" class="s16"></md-icon>\n            <md-icon ng-if="item[vm.tab.channel === \'chat\' ? \'ChatWebsiteId\' : _.capitalize(vm.tab.channel) + \'AccountId\']" md-font-icon="{{vm.getIconByChannel(vm.tab.channel)}}" aria-label="alert channel" class="s16" ng-class="vm.getColorByChannel(vm.tab.channel) + \'-fg\'"></md-icon>\n            <span md-highlight-text="vm.searchText" md-highlight-flags="^i">{{item.key}} - {{item.value}}</span>\n        </md-item-template>\n\n        <md-not-found>\n            <span translate="DASHBOARDS.CANNED_ANSWER_NOT_FOUND">No canned answers were found</span>\n        </md-not-found>\n    </md-autocomplete>\n</div>\n\x3c!-- / REPLY FORM --\x3e'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.chat.html",'<div ng-init="item = item || vm.interaction">\n    <md-list-item class="md-2-line" ng-if="item.browserName">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.BROWSER_NAME">Browser Name</p>\n            <h4>{{item.browserName}}</h4>\n        </div>\n    </md-list-item>\n    <md-list-item class="md-2-line" ng-if="item.osName">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.OS_NAME">OS Name</p>\n            <h4>{{item.osName}}</h4>\n        </div>\n    </md-list-item>\n    <md-list-item class="md-2-line" ng-if="item.deviceModel">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.DEVICE_MODEL">Device Model</p>\n            <h4>{{item.deviceModel}}</h4>\n        </div>\n    </md-list-item>\n    <md-list-item class="md-2-line" ng-if="item.referer">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.REFERER">Referer</p>\n            <h4>{{item.referer}}</h4>\n        </div>\n    </md-list-item>\n    <md-list-item class="md-2-line" ng-if="item.customerIp">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.CUSTOMER_IP">Customer IP</p>\n            <h4>{{item.customerIp}}</h4>\n        </div>\n    </md-list-item>\n    <md-divider></md-divider>\n    <md-list-item class="md-2-line" ng-if="item.closed && item.ratingValue != null">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.RATING">Rating</p>\n            <md-icon md-font-icon="icon-star" style="color:red" ng-show="!item.ratingType || item.ratingType == \'star\'" ng-repeat="ratingValue in [1,2,3,4,5] | limitTo:item.ratingValue"></md-icon>\n            <md-icon md-font-icon="icon-thumb-up" style="color:green" ng-show="item.ratingType && item.ratingType == \'thumb\' && item.ratingValue == 1"></md-icon>\n            <md-icon md-font-icon="icon-thumb-down" style="color:red" ng-show="item.ratingType && item.ratingType == \'thumb\' && item.ratingValue == 0"></md-icon>\n        </div>\n    </md-list-item>\n    <md-list-item class="md-2-line" ng-if="item.ratingMessage">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.FEEDBACK">Feedback</p>\n            <h4 style="overflow-wrap: break-word; white-space: normal">{{item.ratingMessage}}</h4>\n        </div>\n    </md-list-item>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.html",'<md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex>\n    <md-tab>\n        <md-tab-label>\n            <span translate="DASHBOARDS.CONTACT">Contact</span>\n        </md-tab-label>\n        <md-tab-body>\n            <md-content class="md-padding">\n                <form name="contactForm" class="md-inline-form" novalidate>\n                    <md-input-container class="md-block">\n                        <md-icon md-font-icon="icon-account"></md-icon>\n                        <label translate="DASHBOARDS.NAME">Name</label>\n                        <input type="text" name="firstName" ng-model="vm.contact.firstName" disabled>\n                    </md-input-container>\n\n                    <md-input-container class="md-block">\n                        <md-icon md-font-icon="icon-email"></md-icon>\n                        <label translate="DASHBOARDS.EMAIL">Email</label>\n                        <input type="email" name="email" ng-model="vm.contact.email" disabled>\n                    </md-input-container>\n\n                    <md-input-container ng-if="vm.tab.channel != \'fax\'" class="md-block">\n                        <md-icon md-font-icon="icon-phone"></md-icon>\n                        <label translate="DASHBOARDS.PHONE">Phone</label>\n                        <input type="text" name="phone" ng-model="vm.contact.phone" disabled>\n                    </md-input-container>\n\n                    <md-input-container ng-if="vm.tab.channel == \'fax\'" class="md-block">\n                        <md-icon md-font-icon="icon-deskphone"></md-icon>\n                        <label translate="DASHBOARDS.FAX">Fax</label>\n                        <input type="text" name="fax" ng-model="vm.contact.fax" disabled>\n                    </md-input-container>\n\n                    <div ng-if="!vm.tab.spy" layout="row" layout-align="center center">\n                        <md-button class="md-raised md-accent" ng-click="vm.openContact(ev)" translate="DASHBOARDS.MORE">\n                            More\n                        </md-button>\n                    </div>\n                </form>\n            </md-content>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="DASHBOARDS.INTERACTION">Interaction</span>\n        </md-tab-label>\n        <md-tab-body>\n            <div layout="column" layout-align="space-between center" class="md-padding">\n                <md-icon class="s42" md-font-icon="{{vm.getIconByChannel(vm.tab.channel)}}" ng-class="vm.getColorByChannel(vm.tab.channel) + \'-fg\'"></md-icon>\n                <span ng-if="vm.interaction.closed" class="md-background-bg red-fg font-size-14">#{{vm.interaction.id}} - <span translate="DASHBOARDS.CLOSED"></span></span>\n                <span ng-if="!vm.interaction.closed" class="md-background-bg green-fg font-size-14">#{{vm.interaction.id}} - <span translate="DASHBOARDS.OPENED"></span></span>\n                <span ng-if="!vm.interaction.closed && vm.interaction.substatus" class="md-background-bg green-fg font-size-14">{{ \'DASHBOARDS.\' + vm.interaction.substatus.toUpperCase() | translate }}</span>\n            </div>\n            <md-divider></md-divider>\n            <md-list flex>\n                <md-list-item class="md-2-line">\n                    <div class="md-list-item-text">\n                        <p translate="DASHBOARDS.WEBSITE" ng-if="vm.tab.channel == \'chat\'">Website</p>\n                        <p translate="DASHBOARDS.ACCOUNT" ng-if="vm.tab.channel != \'chat\'">Account</p>\n                        <h4>{{vm.account.name}}</h4>\n                    </div>\n                </md-list-item>\n\n                <md-list-item class="md-2-line">\n                    <div class="md-list-item-text">\n                        <p translate="DASHBOARDS.AGENT">Agent</p>\n                        <h4>{{vm.agent.fullname || vm.usersMap[vm.interaction.UserId]}}</h4>\n                    </div>\n                </md-list-item>\n\n                <md-list-item class="md-2-line" ng-if="vm.interaction.externalUrl">\n                    <div class="md-list-item-text">\n                        <p translate="DASHBOARDS.EXTERNAL_URL">External URL</p>\n                        <a href="{{vm.interaction.externalUrl}}" target="_blank">\n                            <h4>{{vm.interaction.externalUrl}}</h4>\n                        </a>\n                    </div>\n                </md-list-item>\n\n                <md-list-item class="md-2-line">\n                    <div class="md-list-item-text">\n                        <p translate="DASHBOARDS.CREATED_AT">Created At</p>\n                        <h4>{{vm.interaction.createdAt | date: \'medium\'}}</h4>\n                    </div>\n                </md-list-item>\n\n                <div ng-switch="vm.tab.channel">\n                    <div ng-switch-when="chat">\n                        <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.chat.html\'"></div>\n                    </div>\n                    <div ng-switch-when="mail">\n                        <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.mail.html\'"></div>\n                    </div>\n                </div>\n\n                <md-list-item class="md-2-line" ng-if="vm.interaction.Tags.length">\n                    <div class="md-list-item-text">\n                        <p translate="DASHBOARDS.TAGS">Tags</p>\n                        <div class="tags padding-bottom-5" layout="row" layout-align="start center" layout-wrap>\n                            <div class="tag margin-right-5 margin-top-5 margin-bottom-5" layout="row" layout-align="center center" ng-repeat="tag in vm.interaction.Tags">\n                                <div class="tag-color" ng-style="{\'background\': tag.color}"></div>\n                                <div class="tag-label">{{tag.name}}</div>\n                            </div>\n                        </div>\n                    </div>\n                </md-list-item>\n\n                <md-divider ng-if="vm.interaction.closed"></md-divider>\n\n                <md-list-item class="md-2-line" ng-if="vm.interaction.closed">\n                    <div class="md-list-item-text">\n                        <p translate="DASHBOARDS.CLOSED_AT">Closed At</p>\n                        <h4>{{vm.interaction.closedAt | date: \'medium\'}}</h4>\n                    </div>\n                </md-list-item>\n                <md-list-item class="md-2-line" ng-if="vm.interaction.closed && vm.interaction.disposition">\n                    <div class="md-list-item-text">\n                        <p translate="DASHBOARDS.DISPOSITION">Disposition</p>\n                        <h4>{{ vm.interaction.disposition }}</h4>\n                    </div>\n                </md-list-item>\n                <md-list-item class="md-3-line md-long-text" ng-if="vm.interaction.closed && vm.interaction.note">\n                    <div class="md-list-item-text">\n                        <p translate="DASHBOARDS.NOTE">NOTE</p>\n                        <h4 style="overflow-wrap: break-word; white-space: normal">{{ vm.interaction.note }}</h4>\n                    </div>\n                </md-list-item>\n            </md-list>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span>Journey (beta)</span>\n        </md-tab-label>\n        <md-tab-body>\n            <md-content class="md-padding">\n                <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.journey.html\'"></div>\n            </md-content>\n        </md-tab-body>\n    </md-tab>\n</md-tabs>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.journey.all.html",'<md-divider></md-divider>\n\n<md-list flex>\n    <md-list-item class="md-2-line">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.AGENT">Agent</p>\n            <h4>{{vm.agent.fullname || vm.usersMap[item.UserId] || \'DASHBOARDS.NOT_ASSIGNED\' | translate}}</h4>\n        </div>\n    </md-list-item>\n\n    <md-list-item class="md-2-line" ng-if="item.externalUrl">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.EXTERNAL_URL">External URL</p>\n            <a href="{{item.externalUrl}}" target="_blank">\n                <h4>{{item.externalUrl}}</h4>\n            </a>\n        </div>\n    </md-list-item>\n\n    <md-list-item class="md-2-line">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.CREATED_AT">Created At</p>\n            <h4>{{item.createdAt | date: \'medium\'}}</h4>\n        </div>\n    </md-list-item>\n\n    <div ng-if="item.ChatWebsiteId">\n        <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.chat.html\'"></div>\n    </div>\n    <div ng-if="item.MailAccountId">\n        <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.mail.html\'"></div>\n    </div>\n\n    <md-divider ng-if="item.closed"></md-divider>\n    <md-list-item class="md-2-line" ng-if="item.closed">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.CLOSED_AT">Closed At</p>\n            <h4>{{item.closedAt | date: \'medium\'}}</h4>\n        </div>\n    </md-list-item>\n    <md-list-item class="md-2-line" ng-if="item.closed && item.disposition">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.DISPOSITION">Disposition</p>\n            <h4>{{ item.disposition }}</h4>\n        </div>\n    </md-list-item>\n    <md-list-item class="md-3-line md-long-text" ng-if="item.closed && item.note">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.NOTE">NOTE</p>\n            <h4 style="overflow-wrap: break-word; white-space: normal">{{ item.note }}</h4>\n        </div>\n    </md-list-item>\n\n    <p class="padding-horizontal-15 grey-fg">Tags</p>\n    <md-list-item ng-if="item.Tags.length">\n        <div class="tags padding-bottom-5" layout="row" layout-align="start center" layout-wrap>\n            <div class="tag margin-right-5 margin-top-5 margin-bottom-5" layout="row" layout-align="center center" ng-repeat="tag in item.Tags">\n                <div class="tag-color" ng-style="{\'background\': tag.color}"></div>\n                <div class="tag-label">{{tag.name}}</div>\n            </div>\n        </div>\n    </md-list-item>\n</md-list>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.journey.html",'<div id="timeline" ms-timeline="vm.timelineOptions" layout="column" ng-if="vm.journey && vm.journey.length">\n    \x3c!-- TIMELINE ITEM --\x3e\n    <div class="ms-timeline-item" layout-align="center center" ng-repeat="item in vm.journey | orderBy:\'-createdAt\'">\n        <div class="timeline-card">\n            <md-card class="channel" ng-class="{\'md-grey-200-bg\': item.id == vm.interaction.id}">\n                <div class="header p-6" layout="row" layout-align="space-between center">\n\n                    <md-button class="md-fab md-mini" aria-label="icon-channel" ng-class="vm.getColorByItem(item) + \'-bg\'">\n                        <md-icon ng-if="item.FaxAccountId" md-font-icon="icon-deskphone"></md-icon>\n                        <md-icon ng-if="item.OpenchannelAccountId" md-font-icon="icon-google-earth"></md-icon>\n                        <md-icon ng-if="item.SmsAccountId" md-font-icon="icon-message-text"></md-icon>\n                        <md-icon ng-if="item.MailAccountId" md-font-icon="icon-email"></md-icon>\n                        <md-icon ng-if="item.ChatWebsiteId" md-font-icon="icon-hangouts"></md-icon>\n                        <md-icon ng-if="item.amaflags" md-font-icon="icon-phone"></md-icon>\n                    </md-button>\n\n                    <div class="info" layout="column" ng-init="item.showMore = false">\n                        <span class="font-size-12 text-truncate">#{{item.id}} - {{ item.Account.key || item.destination }}</span>\n                        <span class="font-size-10">{{item.createdAt | date: \'medium\'}}</span>\n                        <span>\n                          <a class="toggle-details md-accent-color" ng-hide="item.showMore" ng-click="item.showMore = !item.showMore" translate="DASHBOARDS.SHOW_DETAILS">\n                            Show Details\n                          </a>\n                          <a class="toggle-details md-accent-color" ng-show="item.showMore" ng-click="item.showMore = !item.showMore" translate="DASHBOARDS.HIDE_DETAILS">\n                            Hide Details\n                          </a>\n                        </span>\n                    </div>\n\n                    <span>\n                        <img ng-if="item.UserId" class="avatar" ng-src="api/users/{{item.UserId}}/avatar">\n                        <md-tooltip md-direction="left">{{item.Owner.fullname || item.User.fullname}}</md-tooltip>\n                    </span>\n\n                </div>\n\n                <div ng-if="item.showMore">\n                    <div ng-if="!item.amaflags" ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.journey.all.html\'"></div>\n                    <div ng-if="item.amaflags" ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.journey.voice.html\'"></div>\n                </div>\n\n                <md-divider></md-divider>\n\n                <div ng-if="item.id != vm.interaction.id" layout="row" layout-align="space-around center">\n                    <div ng-if="item.closed && !amaflags" class="text-truncate white-fg">\n                        <span class="text-boxed md-background-bg red-fg" title="{{ \'DASHBOARDS.STATUS\' | translate}}: {{ \'DASHBOARDS.CLOSED\' | translate}} {{ item.disposition }}">{{ \'DASHBOARDS.STATUS\' | translate}}: {{ \'DASHBOARDS.CLOSED\' | translate}} {{ item.disposition }}</span>\n                    </div>\n                    <span class="text-boxed md-background-bg green-fg" ng-if="!item.closed && !item.amaflags" title="{{ \'DASHBOARDS.STATUS\' | translate}}: {{ \'DASHBOARDS.OPENED\' | translate}}">{{ \'DASHBOARDS.STATUS\' | translate}}: {{ \'DASHBOARDS.OPENED\' | translate}}<span ng-if="item.substatus"> - {{ \'DASHBOARDS.\' + item.substatus.toUpperCase() | translate }}</span></span>\n                    <span ng-if="item.amaflags" class="text-boxed md-background-bg red-fg" title="{{ \'DASHBOARDS.DISPOSITION\' | translate}}: {{ item.userDisposition || \'No Dispose\'}}">{{ \'DASHBOARDS.DISPOSITION\' | translate}}: {{ item.userDisposition || \'No Dispose\'}}</span>\n                    <div flex></div>\n                    <md-button ng-if="!vm.tab.spy && vm.user.role === \'agent\'" ng-disabled="item.amaflags" class="md-icon-button" aria-label="go" ng-click="vm.openInteraction($event, item)">\n                        <md-icon md-font-icon="icon-open-in-new" class="s20"></md-icon>\n                    </md-button>\n\n                </div>\n            </md-card>\n        </div>\n    </div>\n    \x3c!-- / TIMELINE ITEM --\x3e\n</div>\n<div ng-if="!vm.journey || !vm.journey.length" layout="row" layout-align="center center">\n    <em translate="DASHBOARDS.NO_DATA_AVAILABLE">No data available</em>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.journey.voice.html",'<md-divider></md-divider>\n\n<md-list flex>\n    <md-list-item class="md-2-line">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.TYPE">Type</p>\n            <h4>{{item.type ? item.type : \'no type\'}}</h4>\n        </div>\n    </md-list-item>\n\n    <md-list-item class="md-2-line">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.SOURCE">Source</p>\n            <h4>{{item.source ? item.source : \'unknown\'}}</h4>\n        </div>\n    </md-list-item>\n\n    <md-list-item class="md-2-line">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.DESTINATION">Destination</p>\n            <h4>{{item.destination ? item.destination : \'unknown\'}}</h4>\n        </div>\n    </md-list-item>\n\n    <md-list-item class="md-2-line">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.CALLERID">Caller Id</p>\n            <h4>{{item.callerid ? item.callerid : \'unknown\'}}</h4>\n        </div>\n    </md-list-item>\n\n    <md-list-item class="md-2-line">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.STARTEDAT">Started At</p>\n            <h4>{{item.starttime | date:\'medium\'}}</h4>\n        </div>\n    </md-list-item>\n\n    <md-list-item class="md-2-line">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.END_AT">End At</p>\n            <h4>{{item.endtime | date:\'medium\'}}</h4>\n        </div>\n    </md-list-item>\n\n    <md-list-item class="md-2-line">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.DURATION">Duration</p>\n            <h4>{{item.duration ? item.duration : \'--\'}}s</h4>\n        </div>\n    </md-list-item>\n\n    <md-list-item class="md-2-line">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.NOTE">Note</p>\n            <h4>{{item.note ? item.note : \'--\'}}</h4>\n        </div>\n    </md-list-item>\n</md-list>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.info.mail.html",'<div ng-init="item = item || vm.interaction">\n    <md-list-item class="md-2-line" ng-if="item.subject">\n        <div class="md-list-item-text">\n            <p translate="DASHBOARDS.SUBJECT">Subject</p>\n            <h4>{{item.subject}}</h4>\n        </div>\n    </md-list-item>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.interaction.html",'\x3c!-- MESSAGES --\x3e\n<div layout="row" ng-repeat="message in vm.messages.rows" class="md-padding message-row" ng-class="message.secret && vm.user.id != message.UserId ? \'in\' : message.direction">\n    <img ng-if="message.direction ===\'in\'" src="assets/images/avatars/customer.png" class="avatar" />\n    <img ng-if="message.direction ===\'out\' && message.UserId && !message.secret" ng-src="api/users/{{message.UserId}}/avatar" class="avatar" />\n    <img ng-if="message.direction ===\'out\' && message.UserId && message.secret" ng-src="api/users/{{message.UserId}}/avatar" class="avatar" />\n    <img ng-if="message.direction ===\'out\' && !message.UserId" class="avatar" src="assets/images/avatars/robot.png">\n\n    <div class="bubble" ng-class="{\'md-yellow-200-bg\': message.secret}" ng-switch="message.direction">\n        <div ng-if="message.secret">\n            <div class="time secondary-text" layout="row" layout-align="end center">\n                <div layout-padding>\n                    {{ vm.getLabelByMessage(message) }} - {{message.createdAt | date: \'medium\'}}\n                </div>\n                <div ng-if="message.id">\n                    <md-icon class="s18" md-font-icon="icon-lock"></md-icon>\n                </div>\n            </div>\n        </div>\n        <div ng-if="!message.secret">\n            <div ng-switch-when="in" class="time secondary-text" ng-click="message.Contact && vm.openContact(ev, message.Contact)">{{ vm.getLabelByMessage(message) }} - {{message.createdAt | date: \'medium\'}}</div>\n            <div ng-switch-when="out" class="time secondary-text" layout="row" layout-align="end center">\n                <div layout-padding>\n                    {{ vm.getLabelByMessage(message) }} - {{message.createdAt | date: \'medium\'}}\n                </div>\n                <div ng-if="message.id && vm.tab.channel !== \'fax\'">\n                    <md-icon ng-if="!message.read" class="s18" md-font-icon="icon-check"></md-icon>\n                    <md-icon ng-if="message.read" class="s18" md-font-icon="icon-check-all md-accent"></md-icon>\n                </div>\n                <div ng-if="message.id && vm.tab.channel === \'fax\'">\n                    <md-icon ng-if="!message.read && !(message.failMessage )" class="s18" md-font-icon="icon-check"></md-icon>\n                    <md-icon ng-if="message.read" class="s18" md-font-icon="icon-check-all md-accent"></md-icon>\n                    <span ng-if="!message.read && message.failMessage" class="s18 red-900-fg"> {{ message.failMessage }}</span>\n                    <md-icon ng-if="!message.read && message.failMessage" class="s18 red-900-fg" md-font-icon="icon-close md-accent"></md-icon>\n                </div>\n            </div>\n        </div>\n        <div ng-if="message.AttachmentId" layout="row" layout-align="end center">\n            <md-button class="md-raised md-accent" ng-click="vm.getAttachment({id: message.AttachmentId, name: vm.htmlToPlaintext(message.body)})">\n                <span>{{vm.htmlToPlaintext(message.body)}}</span>\n                <md-icon md-font-icon="icon-download"></md-icon>\n            </md-button>\n        </div>\n        <div ng-if="!message.AttachmentId" ng-bind-html="message.body | embed:vm.emojiOptions" class="message" layout="row" layout-align="end center"></div>\n    </div>\n</div>\n\x3c!-- / MESSAGES --\x3e'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.interaction.mail.html",'<div ms-timeline="vm.timelineOptions" ms-timeline-load-more="vm.loadNextPage()">\n    <div ng-repeat="message in vm.messages.rows track by message.id" ng-init="vm.selectedMailShowSystemMessage[message.id] = false">\n        <md-card ng-if="message.secret" class="md-padding md-yellow-100-bg" layout="column">\n            <div layout="row" layout-align="start center">\n                <img class="avatar" ng-src="api/users/{{message.UserId}}/avatar">\n                <div layout="column">\n                    <span class="grey-fg">{{vm.agent.fullname || vm.usersMap[message.UserId]}}</span>\n                    <span class="grey-fg">{{message.createdAt | date:\'medium\'}}</span>\n                </div>\n            </div>\n            <div layout="row" layout-align="center center" layout-fill ng-if="message.attach">\n                <div flex>\n                    <md-divider></md-divider>\n                </div>\n                <md-menu>\n                    <md-button aria-label="attachments" class="md-icon-button" ng-click="vm.getAttachments(message); $mdOpenMenu($event);">\n                        <md-tooltip md-direction="bottom"><span translate="MAIL.ATTACHMENTS">Attachments</span></md-tooltip>\n                        <div layout="row" layout-align="start center">\n                            <md-icon md-font-icon="icon-paperclip" class="icon s24"></md-icon><span>{{message.attach}}</span>\n                        </div>\n                    </md-button>\n                    <md-menu-content width="4">\n                        <div layout="column" layout-align="center center" ng-if="!message.attachments">\n                            <md-progress-circular md-mode="indeterminate"></md-progress-circular>\n                            <span translate="MAIL.ATTACHMENTS">Attachments</span>\n                        </div>\n                        <md-menu-item ng-if="message.attachments" ng-repeat="attachment in message.attachments">\n                            <md-button ng-click="vm.getAttachment(attachment)">{{ attachment.name || (\'attachment-\' + $index) }}</md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n                <div flex>\n                    <md-divider></md-divider>\n                </div>\n            </div>\n            <div class="padding-top-5" ng-bind-html-unsafe="message.body"></div>\n        </md-card>\n        <div ng-if="!message.secret">\n            <div layout="row" layout-align="center center" ng-if="message.direction == \'out\' && !message.UserId && !vm.selectedMailShowSystemMessage[message.id]">\n                <md-button class="md-raised blue-grey-300-bg white-fg" ng-click="vm.selectedMailShowSystemMessage[message.id] = !vm.selectedMailShowSystemMessage[message.id]">[{{message.createdAt | date: \'medium\'}}] {{ \'MAIL.SHOW_AUTOREPLY\' | translate }}</md-button>\n            </div>\n            <md-card layout="column" class="md-padding message-row" ng-if="message.direction == \'in\' || (message.direction == \'out\' && (message.UserId || vm.selectedMailShowSystemMessage[message.id]))">\n                <md-content class="mail-content">\n                    <div class="info" layout="row" layout-align="space-between start">\n\n                        <div layout="column" layout-align="start start">\n                            <div layout="row" layout-align="start start">\n                                \x3c!-- <div>\n                                <img ng-if="message.direction ===\'in\'" ng-src="assets/images/avatars/customer.png" class="avatar" alt="customer" />\n\n                                <img ng-if="message.direction ===\'out\' && message.UserId" class="avatar" ng-src="api/users/{{message.UserId}}/avatar">\n                                <img ng-if="message.direction ===\'out\' && !message.UserId" class="avatar" src="assets/images/avatars/robot.png">\n                            </div> --\x3e\n\n                                <div layout="column" layout-align="start start">\n                                    <div class="name" ng-click="message.Contact && vm.openContact(ev, message.Contact)"><strong>{{message.from}}</strong>\n                                        <md-icon ng-if="message.attach" md-font-icon="icon-paperclip" class="s16"></md-icon>\n                                    </div>\n                                    <div class="name">\n                                        <div>{{message.subject}}</div>\n                                    </div>\n                                    <div class="name" layout="row" layout-align="start center"><span translate="MAIL.TO">To</span>: <span class="padding-left-5 subject text-truncate">{{message.to}}</span></div>\n                                </div>\n                            </div>\n\n                            <a class="toggle-details md-accent-color" ng-hide="vm.selectedMailShowDetails[message.id]" ng-click="vm.selectedMailShowDetails[message.id] = !vm.selectedMailShowDetails[message.id]" translate="MAIL.SHOW_DETAILS">\n                        Show Details\n                    </a>\n                            <a class="toggle-details md-accent-color" ng-show="vm.selectedMailShowDetails[message.id]" ng-click="vm.selectedMailShowDetails[message.id] = !vm.selectedMailShowDetails[message.id]" translate="MAIL.HIDE_DETAILS">\n                        Hide Details\n                    </a>\n\n                            <div ng-show="vm.selectedMailShowDetails[message.id]" class="details" layout="row" layout-align="start start">\n                                <div layout="column">\n                                    <span class="title" translate="MAIL.DATE">Date:</span>\n                                    <span class="title" translate="MAIL.FROM">From:</span>\n                                    <span class="title" translate="MAIL.TO">To:</span>\n                                    <span class="title" translate="MAIL.CC" ng-if="message.cc">Cc:</span>\n                                    <span class="title" translate="MAIL.ACCEPTED" ng-if="message.UserId && message.direction ===\'in\'">Accepted:</span>\n                                </div>\n\n                                <div layout="column">\n                                    <span class="detail">{{message.createdAt | date:\'medium\'}}</span>\n                                    <span class="detail">{{message.from}}</span>\n                                    <span class="detail">{{message.to}}</span>\n                                    <span class="detail" ng-if="message.cc">{{message.cc}}</span>\n                                    <span class="detail" ng-if="message.UserId && message.direction ===\'in\'">{{vm.usersMap[message.UserId]}}</span>\n                                </div>\n                            </div>\n                        </div>\n\n                        <div layout="row" layout-align="center center">\n                            <div layout="column" layout-align="center end" class="md-padding">\n                                <span class="grey-fg" ng-if="message.direction ===\'in\'">{{message.from.indexOf(vm.contact.email) >= 0 ? vm.contact.firstName + \' \' + vm.contact.lastName : \'*\' + message.from}}</span>\n\n                                <span class="grey-fg" ng-if="message.direction ===\'out\' && message.UserId">{{vm.agent.fullname || vm.usersMap[message.UserId]}}</span>\n                                <span class="grey-fg" ng-if="message.direction ===\'out\' && !message.UserId">System</span>\n\n                                <span class="grey-fg">{{message.createdAt | date:\'medium\'}}</span>\n                            </div>\n                            <img ng-if="message.direction ===\'in\'" ng-src="assets/images/avatars/customer.png" class="avatar" alt="customer" />\n\n                            <img ng-if="message.direction ===\'out\' && message.UserId" class="avatar" ng-src="api/users/{{message.UserId}}/avatar">\n                            <img ng-if="message.direction ===\'out\' && !message.UserId" class="avatar" src="assets/images/avatars/robot.png">\n\n\n                            \x3c!-- <md-menu>\n                        <md-button aria-label="More" class="md-icon-button"\n                                   ng-click="$mdOpenMenu($event)"\n                                   translate translate-aria-label="MAIL.MORE">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="3">\n                            <md-menu-item>\n                                <md-button aria-label="Print" translate-aria-label="MAIL.PRINT">\n                                    <md-icon md-font-icon="icon-printer"></md-icon>\n                                    <span translate="MAIL.PRINT">Print</span>\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu> --\x3e\n                        </div>\n\n\n                    </div>\n\n                    <div layout="row" layout-align="center center" layout-fill>\n                        <div flex>\n                            <md-divider></md-divider>\n                        </div>\n                        <div>\n                            <md-button ng-if="!vm.interaction.closed && !vm.tab.spy" class="md-icon-button" aria-label="reply" ng-click="vm.composeMailInteraction(\'reply\', message)">\n                                <md-tooltip md-direction="bottom"><span translate="MAIL.REPLY">Reply</span></md-tooltip>\n                                <md-icon md-font-icon="icon-reply" class="icon s24"></md-icon>\n                            </md-button>\n                            <md-button ng-if="!vm.interaction.closed && !vm.tab.spy" class="md-icon-button" aria-label="replyAll" ng-click="vm.composeMailInteraction(\'replyAll\', message)">\n                                <md-tooltip md-direction="bottom"><span translate="MAIL.REPLY_ALL">Reply All</span></md-tooltip>\n                                <md-icon md-font-icon="icon-reply-all" class="icon s24"></md-icon>\n                            </md-button>\n                            <md-button ng-if="!vm.interaction.closed && !vm.tab.spy" class="md-icon-button" aria-label="forward" ng-click="vm.composeMailInteraction(\'forward\', message)">\n                                <md-tooltip md-direction="bottom"><span translate="MAIL.FORWARD">Forward</span></md-tooltip>\n                                <md-icon md-font-icon="icon-forward" class="icon s24"></md-icon>\n                            </md-button>\n                            <md-menu ng-if="message.attach">\n                                <md-button aria-label="attachments" class="md-icon-button" ng-click="vm.getAttachments(message); $mdOpenMenu($event);">\n                                    <md-tooltip md-direction="bottom"><span translate="MAIL.ATTACHMENTS">Attachments</span></md-tooltip>\n                                    <div layout="row" layout-align="start center">\n                                        <md-icon md-font-icon="icon-paperclip" class="icon s24"></md-icon><span>{{message.attach}}</span>\n                                    </div>\n                                </md-button>\n                                <md-menu-content width="4">\n                                    <div layout="column" layout-align="center center" ng-if="!message.attachments">\n                                        <md-progress-circular md-mode="indeterminate"></md-progress-circular>\n                                        <span translate="MAIL.ATTACHMENTS">Attachments</span>\n                                    </div>\n                                    <md-menu-item ng-if="message.attachments" ng-repeat="attachment in message.attachments">\n                                        <md-button ng-click="vm.getAttachment(attachment)">{{ attachment.name || (\'attachment-\' + $index) }}</md-button>\n                                    </md-menu-item>\n                                </md-menu-content>\n                            </md-menu>\n                        </div>\n                        <div flex>\n                            <md-divider></md-divider>\n                        </div>\n                    </div>\n\n                    <md-content ng-bind-html-unsafe="message.body"></md-content>\n                </md-content>\n            </md-card>\n        </div>\n    </div>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.loading.html",'<div class="big-circle md-whiteframe-4dp">\n    <md-icon class="s128 md-accent" md-font-icon="{{vm.getIconByChannel(vm.tab.channel)}}" ng-class="vm.getColorByChannel(vm.tab.channel) + \'-fg\'"></md-icon>\n</div>\n<span class="app-title" translate="DASHBOARDS.WAITING">Waiting</span>\n<span class="hide show-gt-md secondary-text" translate="DASHBOARDS.LOADING_INTERACTION">We are loading the interaction...</span>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.toolbar.fax.html",'<md-button ng-if="!vm.interaction.closed && !vm.tab.spy" class="md-icon-button" aria-label="reply" ng-click="vm.composeFaxInteraction(\'new\')">\n    <md-tooltip md-direction="bottom"><span translate="FAX.REPLY">Reply</span></md-tooltip>\n    <md-icon md-font-icon="icon-reply" class="icon s24"></md-icon>\n</md-button>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.toolbar.html",'<div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n    <md-icon md-font-icon="{{vm.getIconByChannel(vm.tab.channel)}}" class="s20" ng-class="vm.getColorByChannel(vm.tab.channel) + \'-fg\'"></md-icon>\n    <div class="padding-left-10" layout="column" layout-align="center start" flex>\n        <div class="font-size-14" layout="row" layout-align="start center" layout-fill>\n            <span>#{{vm.interaction.id}} - {{vm.account.key}}</span>\n            <div layout="row" layout-align="center center">\n                <md-icon ng-if="vm.interaction.attach" md-font-icon="icon-paperclip" class="s16"></md-icon>\n            </div>\n            <span class="red-fg padding-left-25" ng-if="vm.interaction.closed" translate="DASHBOARDS.CLOSED">CLOSED</span>\n            <span class="green-fg padding-left-25" ng-if="!vm.interaction.closed"><span translate="DASHBOARDS.OPENED">OPENED</span><span ng-if="vm.interaction.substatus"> - {{vm.interaction.substatus}}</span></span>\n            <div layout="row" layout-align="center center" class="blue-grey-300-fg padding-left-40" ng-if="!vm.interaction.closed">\n                <timer start-time="vm.interaction.createdAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                <md-icon md-font-icon="icon-timelapse" class="s16 padding-left-5"></md-icon>\n            </div>\n        </div>\n        <div class="tags" layout="row" layout-align="start center" ng-if="vm.interaction.Tags.length" ng-class="{\'padding-top-5\': vm.interaction.Tags.length}">\n            <div class="tag margin-right-5" layout="row" layout-align="center center" ng-repeat="tag in vm.interaction.Tags">\n                <div class="tag-color" ng-style="{\'background\': tag.color}"></div>\n                <div class="tag-label">{{tag.name}}</div>\n            </div>\n        </div>\n    </div>\n    <div layout="row" layout-align="end center">\n        <div ng-switch="vm.tab.channel">\n            <div ng-switch-when="mail">\n                <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.toolbar.mail.html\'"></div>\n            </div>\n            <div ng-switch-when="fax">\n                <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.toolbar.fax.html\'"></div>\n            </div>\n            <div ng-switch-when="sms">\n                <div ng-include="\'app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.toolbar.sms.html\'"></div>\n            </div>\n        </div>\n        <md-menu class="no-margin" ng-if="!vm.interaction.disposition" md-position-mode="target-right target">\n            <md-button class="md-icon-button" ng-click="$mdOpenMenu()" aria-label="more">\n                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n            </md-button>\n\n            <md-menu-content width="2">\n                <md-menu-item>\n                    <md-button ng-click="vm.tagInteraction()" translate="DASHBOARDS.TAG">\n                        Tag\n                    </md-button>\n                </md-menu-item>\n                <md-menu-item ng-if="!vm.interaction.closed && vm.tab.channel == \'mail\' && (vm.subStatuses.rows.length || vm.interaction.substatus != null)">\n                    <md-menu>\n                        <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="DASHBOARDS.SET_AS">\n                            Set as\n                        </md-button>\n                        <md-menu-content>\n                            <md-menu-item ng-if="vm.interaction.substatus != null">\n                                <md-button ng-click="vm.setAs(null)" translate="DASHBOARDS.NONE">\n                                    None\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item ng-repeat="subStatus in vm.subStatuses.rows">\n                                <md-button ng-click="vm.setAs(subStatus.name)">\n                                    {{subStatus.name}}\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </md-menu-item>\n                <md-menu-item ng-if="!vm.interaction.closed && vm.tab.channel == \'mail\' && vm.account.markAsUnread">\n                    <md-button ng-click="vm.markAsUnread()" translate="DASHBOARDS.MARK_AS_UNREAD">\n                        Unread\n                    </md-button>\n                </md-menu-item>\n                <md-menu-item ng-if="!vm.tab.spy && !vm.interaction.closed">\n                    <md-button ng-click="vm.disposeInteraction()" translate="DASHBOARDS.CLOSE_AND_DISPOSE">\n                        Close and Dispose\n                    </md-button>\n                </md-menu-item>\n                <md-menu-item ng-if="!vm.tab.spy && vm.interaction.closed && !vm.interaction.disposition">\n                    <md-button ng-click="vm.disposeInteraction(ev)" translate="DASHBOARDS.DISPOSE">\n                        Dispose\n                    </md-button>\n                </md-menu-item>\n            </md-menu-content>\n        </md-menu>\n    </div>\n</div>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.toolbar.mail.html",'<md-button ng-if="!vm.interaction.closed && !vm.tab.spy" class="md-icon-button" aria-label="reply" ng-click="vm.composeMailInteraction(\'reply\', vm.interaction)">\n    <md-tooltip md-direction="bottom"><span translate="MAIL.REPLY">Reply</span></md-tooltip>\n    <md-icon md-font-icon="icon-reply" class="icon s24"></md-icon>\n</md-button>\n<md-button ng-if="!vm.interaction.closed && !vm.tab.spy" class="md-icon-button" aria-label="replyAll" ng-click="vm.composeMailInteraction(\'replyAll\', vm.interaction)">\n    <md-tooltip md-direction="bottom"><span translate="MAIL.REPLY_ALL">Reply All</span></md-tooltip>\n    <md-icon md-font-icon="icon-reply-all" class="icon s24"></md-icon>\n</md-button>\n<md-button ng-if="!vm.interaction.closed && !vm.tab.spy" class="md-icon-button" aria-label="forward" ng-click="vm.composeMailInteraction(\'forward\', vm.interaction)">\n    <md-tooltip md-direction="bottom"><span translate="MAIL.FORWARD">Forward</span></md-tooltip>\n    <md-icon md-font-icon="icon-forward" class="icon s24"></md-icon>\n</md-button>\n<md-button class="md-icon-button" aria-label="note" ng-click="vm.composeMailInteraction(\'note\', vm.interaction)">\n    <md-tooltip md-direction="bottom"><span translate="MAIL.NOTE">Note</span></md-tooltip>\n    <md-icon md-font-icon="icon-note-outline" class="icon s24"></md-icon>\n</md-button>'),e.put("app/main/apps/dashboards/views/general/agent/interaction/views/agent.general.toolbar.sms.html",'<md-button class="md-icon-button" aria-label="note" ng-click="vm.composeSmsInteraction(\'note\', vm.interaction)">\n    <md-tooltip md-direction="bottom"><span translate="SMS.NOTE">Note</span></md-tooltip>\n    <md-icon md-font-icon="icon-note-outline" class="icon s24"></md-icon>\n</md-button>'),e.put("app/main/apps/dashboards/views/general/agent/jscripty/agent.general.jscripty.html",'<md-content class="md-padding" layout="column" layout-align="center center">\n    <div layout="row" layout-align="center center">\n        <span ng-if="!vm.tab.saved" class="text-boxed md-green-bg"><timer start-time="vm.starttime" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer></span>\n        <span ng-if="vm.contact" class="text-boxed md-gray-bg font-weight-900">{{vm.contact.firstName}} {{vm.contact.lastName}} {{vm.contact.phone}}</span>\n        <md-button ng-if="vm.showResetButton" ng-click="vm.resetViewer()" md-no-ink class="md-raised md-accent orange-bg">\n            <md-icon md-font-icon="icon-rotate-left" class="icon s16"></md-icon> {{\'JSCRIPTY.RESET_SESSION\' | translate}}</md-button>\n        <md-button ng-if="vm.contact" ng-click="vm.openContact($event, vm.contact)" md-no-ink class="md-raised md-accent" translate="JSCRIPTY.OPEN_CONTACT"></md-button>\n        <md-button ng-if="vm.showIncompleteSubmitButton" ng-click="vm.onSubmit($event, true)" md-no-ink class="md-raised md-accent green-bg" translate="JSCRIPTY.SUBMIT"></md-button>\n    </div>\n    <h1 ng-if="!vm.project.formData"><span translate="JSCRIPTY.PROJECT_NOT_AVAILABLE">Project is not available. Please contact the administrator</span></h1>\n    <mw-form-viewer ng-if="vm.project.formData" form-data="vm.project.formData" response-data="vm.project.responseData" on-submit="vm.onSubmit($event)" template-data="call" api="vm.formViewer"></mw-form-viewer>\n</md-content>'),e.put("app/main/apps/dashboards/views/general/agent/notification/dialog.html",'\x3c!-- <md-toast> --\x3e\n<div class="md-padding" layout="column" layout-align="center center">\n    <span class="md-title">#{{vm.notification.id}} {{vm.notification.title}}</span>\n    <span class="md-subhead" ng-if="vm.notification.queue">{{vm.notification.queue}}</span>\n    <div class="padding-top-5" layout="row">\n        <md-button class="md-raised md-accent" ng-click="vm.accept($event)" translate="DASHBOARDS.ACCEPT">\n            ACCEPT\n        </md-button>\n        <md-button class="md-raised md-warn" ng-click="vm.reject($event)" translate="DASHBOARDS.REJECT">\n            REJECT\n        </md-button>\n    </div>\n</div>\n\x3c!-- </md-toast> --\x3e'),e.put("app/main/apps/dashboards/views/general/agent/popup/agent.general.popup.html",'<md-content class="md-padding" flex>\n    <div ng-if="vm.html" ng-bind-html="vm.html"></div>\n    <h1 ng-if="!vm.html">Template is empty. Please contact the administrator</h1>\n</md-content>'),e.put("app/main/apps/dashboards/views/general/user/dialer/user.general.dialer.html",'\x3c!-- WIDGET INBOUND --\x3e\n<div class="dashboard-container md-background-bg md-whiteframe-1dp">\n    <div class="pb-16" layout="row" layout-align="start center">\n        <md-icon md-font-icon="icon-phone-outgoing" class="m-0 mr-16"></md-icon>\n        <div class="h2 secondary-text" translate="DASHBOARDS.TODAY_MOTION_BULL_STATS">Today Motion Bull STATS</div>\n    </div>\n\n    \x3c!-- WIDGET GROUP --\x3e\n    <div class="widget-group" layout="row" flex="100" layout-wrap>\n\n        \x3c!-- WIDGET 1 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="ph-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-timelapse"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="light-blue-fg font-size-52 line-height-72">\n                        {{vm.inbound.waiting || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.WAITING\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 light-blue-fg secondary-text text-truncate">{{\'DASHBOARDS.WAITING_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.WAITING\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 1 --\x3e\n\n        \x3c!-- WIDGET 3 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-in-talk"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="orange-fg font-size-52 line-height-72">\n                        {{(vm.inbound.talking || 0) + (vm.inbound.pTalking || 0)}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.TALKING\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 orange-fg secondary-text text-truncate">{{\'DASHBOARDS.TALKING_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.TALKING\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 3 --\x3e\n\n        \x3c!-- WIDGET 2 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="ph-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="red-fg font-size-52 line-height-72">\n                        {{vm.inbound.answered || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.INBOUND_ANSWERED\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 red-fg secondary-text text-truncate">{{\'DASHBOARDS.INBOUND_ANSWERED_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.INBOUND_ANSWERED\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 2 --\x3e\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-missed"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-grey-fg font-size-52 line-height-72">\n                        {{vm.inbound.outboundDropCallsDayCallersExit || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.ABANDONED\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-grey-fg secondary-text text-truncate">{{\'DASHBOARDS.ABANDONED_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.ABANDONED\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-outgoing"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-green-fg font-size-52 line-height-72">\n                        {{vm.inbound.outboundDropCallsDayTimeout || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.DROPPED\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-green-fg secondary-text text-truncate">{{\'DASHBOARDS.DROPPED_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.DROPPED\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n    </div>\n    \x3c!-- / WIDGET GROUP --\x3e\n\n    \x3c!-- WIDGET GROUP --\x3e\n    <div class="widget-group" layout="row" flex="100" layout-wrap>\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-dots"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-green-fg font-size-52 line-height-72">\n                        {{vm.inbound.originated || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.ORIGINATED\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-green-fg secondary-text text-truncate">{{\'DASHBOARDS.ORIGINATED_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.ORIGINATED\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n        \x3c!-- WIDGET 3 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-in-talk"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="orange-fg font-size-42 line-height-72">\n                        {{ vm.inbound.avgTalkTime || \'00:00:00\' }}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.AVG_TALK_TIME\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 orange-fg secondary-text text-truncate">{{\'DASHBOARDS.AVG_TALK_TIME_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.AVG_TALK_TIME\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 3 --\x3e\n\n        \x3c!-- WIDGET 2 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="ph-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-percent"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="red-fg font-size-42 line-height-72">\n                        {{ vm.inbound.outboundanswerRate || 0 |number : 1}}%\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.INBOUND_ANSWER_RATE\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 red-fg secondary-text text-truncate">{{\'DASHBOARDS.INBOUND_ANSWER_RATE_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.INBOUND_ANSWER_RATE\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 2 --\x3e\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-percent"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-grey-fg font-size-42 line-height-72">\n                        {{ vm.inbound.outboundAbandonRate || 0}}%\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.ABANDON_RATE\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-grey-fg secondary-text text-truncate">{{\'DASHBOARDS.ABANDON_RATE_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.ABANDON_RATE\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-percent"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-grey-fg font-size-42 line-height-72">\n                        {{ vm.inbound.outboundDropRate }}%\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.DROP_RATE\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-grey-fg secondary-text text-truncate">{{\'DASHBOARDS.DROP_RATE_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.DROP_RATE\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n    </div>\n    \x3c!-- / WIDGET GROUP --\x3e\n</div>\n\x3c!-- / WIDGET OUTBOUND --\x3e\n\n\x3c!-- WIDGET INBOUND --\x3e\n<div class="dashboard-container md-background-bg md-whiteframe-1dp">\n    <div class="pb-16" layout="row" layout-align="start center">\n        <md-icon md-font-icon="icon-phone-outgoing" class="m-0 mr-16"></md-icon>\n        <div class="h2 secondary-text" translate="DASHBOARDS.TODAY_IVR_CAMPAIGNS_STATS">Today IVR campaigns stats</div>\n    </div>\n\n    \x3c!-- WIDGET GROUP --\x3e\n    <div class="widget-group" layout="row" flex="100" layout-wrap>\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-dots"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-green-fg font-size-52 line-height-72">\n                        {{vm.ivr.originated || 0}}/{{vm.ivr.limitCalls || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.ORIGINATED\' | translate | uppercase}}/{{\'DASHBOARDS.LIMITED\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-green-fg secondary-text text-truncate">{{\'DASHBOARDS.LIMITED_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.ORIGINATEDLIMITED\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n    </div>\n    \x3c!-- / WIDGET GROUP --\x3e\n</div>\n\x3c!-- / WIDGET IVR --\x3e'),e.put("app/main/apps/dashboards/views/general/user/user.general.html",'<div id="dashboard-general" class="page-layout simple right-sidenav" layout="row">\n    \x3c!-- CENTER --\x3e\n    <div class="center" flex ms-scroll>\n        \x3c!-- CONTENT --\x3e\n        <div class="content">\n            \x3c!--  NOTE: aggoiungere nel controller ng-if="vm.hasPermission()" --\x3e\n            <md-tabs md-selected="vm.currentTab" ng-if="vm.hasPermission()" md-dynamic-height>\n                <md-tab label="{{\'DASHBOARDS.VOICE\' | translate}}" ui-sref="app.dashboards.general.voice">\n                    <div ui-view="voice"></div>\n                </md-tab>\n                <md-tab ng-if="vm.license.dialer" label="{{\'DASHBOARDS.MOTIONDIALER\' | translate}}" ui-sref="app.dashboards.general.dialer">\n                    <div ui-view="dialer"></div>\n                </md-tab>\n            </md-tabs>\n        </div>\n        \x3c!-- END CONTENT --\x3e\n\n        <md-content ng-if="!vm.hasPermission()" layout="row" layout-align="space-around center" flex layout-padding layout-wrap>\n            <div layout="column" layout-align="space-around center" flex="50">\n                <span class="font-size-40 text-center">{{ \'DASHBOARDS.WELCOME_TO_MOTION\' | translate }}!</span>\n                <span class="font-size-30 text-center" translate="DASHBOARDS.WELCOME_MESSAGE">Use the left sidebar to navigate through available sections.</span>\n            </div>\n\n            <div layout="column" flex="50">\n                <img src="assets/images/avatars/permissions.png" alt="permissions">\n            </div>\n        </md-content>\n    </div>\n</div>'),e.put("app/main/apps/dashboards/views/general/user/voice/user.general.voice.html",'\x3c!-- WIDGET INBOUND --\x3e\n<div class="dashboard-container md-background-bg md-whiteframe-1dp">\n    <div class="pb-16" layout="row" layout-align="start center">\n        <md-icon md-font-icon="icon-phone-incoming" class="m-0 mr-16"></md-icon>\n        <div class="h2 secondary-text" translate="DASHBOARDS.TODAY_INBOUND_STATS">Today Inbound STATS</div>\n    </div>\n\n    \x3c!-- WIDGET GROUP --\x3e\n    <div class="widget-group" layout="row" flex="100" layout-wrap>\n\n        \x3c!-- WIDGET 1 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="ph-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-timelapse"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="light-blue-fg font-size-52 line-height-72">\n                        {{vm.inbound.waiting || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.WAITING\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 light-blue-fg secondary-text text-truncate">{{\'DASHBOARDS.WAITING_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.WAITING\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 1 --\x3e\n\n        \x3c!-- WIDGET 3 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-in-talk"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="orange-fg font-size-52 line-height-72">\n                        {{vm.inbound.talking || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.TALKING\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 orange-fg secondary-text text-truncate">{{\'DASHBOARDS.TALKING_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.TALKING\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 3 --\x3e\n\n        \x3c!-- WIDGET 2 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="ph-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="red-fg font-size-52 line-height-72">\n                        {{vm.inbound.answered || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.INBOUND_ANSWERED\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 red-fg secondary-text text-truncate">{{\'DASHBOARDS.INBOUND_ANSWERED_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.INBOUND_ANSWERED\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 2 --\x3e\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-missed"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-grey-fg font-size-52 line-height-72">\n                        {{vm.inbound.abandoned || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.ABANDONED\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-grey-fg secondary-text text-truncate">{{\'DASHBOARDS.ABANDONED_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.ABANDONED\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-incoming"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-green-fg font-size-52 line-height-72">\n                        {{vm.inbound.total || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.TOTAL_OFFERED\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-green-fg secondary-text text-truncate">{{\'DASHBOARDS.TOTAL_OFFERED_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.TOTAL_OFFERED\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n    </div>\n    \x3c!-- / WIDGET GROUP --\x3e\n\n    \x3c!-- WIDGET GROUP --\x3e\n    <div class="widget-group" layout="row" flex="100" layout-wrap>\n\n        \x3c!-- WIDGET 1 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="ph-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-timer-sand"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="light-blue-fg font-size-42 line-height-72">\n                        {{ vm.inbound.avgHoldTime || \'00:00:00\' }}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.AVG_HOLD_TIME\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 light-blue-fg secondary-text text-truncate">{{\'DASHBOARDS.AVG_HOLD_TIME_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.AVG_HOLD_TIME\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 1 --\x3e\n\n        \x3c!-- WIDGET 3 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-in-talk"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="orange-fg font-size-42 line-height-72">\n                        {{ vm.inbound.avgTalkTime || \'00:00:00\' }}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.AVG_TALK_TIME\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 orange-fg secondary-text text-truncate">{{\'DASHBOARDS.AVG_TALK_TIME_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.AVG_TALK_TIME\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 3 --\x3e\n\n        \x3c!-- WIDGET 2 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="ph-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-percent"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="red-fg font-size-42 line-height-72">\n                        {{ vm.inbound.answerRate || 0 }}%\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.INBOUND_ANSWER_RATE\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 red-fg secondary-text text-truncate">{{\'DASHBOARDS.INBOUND_ANSWER_RATE_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.INBOUND_ANSWER_RATE\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 2 --\x3e\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-percent"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-grey-fg font-size-42 line-height-72">\n                        {{ vm.inbound.abandonRate || 0 }}%\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.ABANDON_RATE\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-grey-fg secondary-text text-truncate">{{\'DASHBOARDS.ABANDON_RATE_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.ABANDON_RATE\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-dots"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-green-fg font-size-52 line-height-72">\n                        {{vm.inbound.unmanaged || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.UNMANAGED\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-green-fg secondary-text text-truncate">{{\'DASHBOARDS.UNMANAGED_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.UNMANAGED\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n    </div>\n    \x3c!-- / WIDGET GROUP --\x3e\n</div>\n\x3c!-- / WIDGET INBOUND --\x3e\n\n\x3c!-- WIDGET OUTBOUND --\x3e\n<div class="dashboard-container md-background-bg md-whiteframe-1dp">\n    <div class="pb-16" layout="row" layout-align="start center">\n        <md-icon md-font-icon="icon-phone-outgoing" class="m-0 mr-16"></md-icon>\n        <div class="h2 secondary-text" translate="DASHBOARDS.TODAY_OUTBOUND_STATS">Today Outbound STATS</div>\n    </div>\n    \x3c!-- WIDGET GROUP --\x3e\n    <div class="widget-group" layout="row" flex="100" layout-wrap>\n\n        \x3c!-- WIDGET 1 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="ph-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone-outgoing"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="light-blue-fg font-size-52 line-height-72">\n                        {{vm.outbound.total || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.TOTAL\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 light-blue-fg secondary-text text-truncate">{{\'DASHBOARDS.TOTAL_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.TOTAL\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 1 --\x3e\n\n        \x3c!-- WIDGET 2 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="ph-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-phone"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="red-fg font-size-52 line-height-72">\n                        {{vm.outbound.answered || 0}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.OUTBOUND_ANSWERED\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 red-fg secondary-text text-truncate">{{\'DASHBOARDS.OUTBOUND_ANSWERED_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.OUTBOUND_ANSWERED\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 2 --\x3e\n\n        \x3c!-- WIDGET 3 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-clock"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="orange-fg font-size-42 line-height-72">\n                        {{vm.outbound.sumDuration || 0 | secToTime | date:\'HH:mm:ss\'}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.TOT_DURATION\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 orange-fg secondary-text text-truncate">{{\'DASHBOARDS.TOT_DURATION_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.TOT_DURATION\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 3 --\x3e\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-division"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-grey-fg font-size-42 line-height-72">\n                        {{vm.outbound.total ? ((vm.outbound.sumDuration / vm.outbound.total) | number: 0) : 0 | secToTime | date:\'HH:mm:ss\'}}\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.AVG_DURATION\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-grey-fg secondary-text text-truncate">{{\'DASHBOARDS.AVG_DURATION_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.AVG_DURATION\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n        \x3c!-- WIDGET 4 --\x3e\n        <ms-widget flippable="true" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="20">\n\n            \x3c!-- Front --\x3e\n            <ms-widget-front class="grey-50-bg">\n                <div class="pl-16 pr-8 pv-16 h-55" layout="row" layout-align="space-between center">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="more">\n                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-button style="cursor:auto" class="md-icon-button" aria-label="more">\n                        <md-icon md-font-icon="icon-percent"></md-icon>\n                    </md-button>\n                </div>\n\n                <div class="pt-8 pb-32" layout="column" layout-align="center center">\n                    <div class="blue-green-fg font-size-42 line-height-72">\n                        {{vm.outbound.total ? (vm.outbound.answered / vm.outbound.total * 100) : 0 | number: 1}}%\n                    </div>\n                    <div class="h3 secondary-text font-weight-500">{{\'DASHBOARDS.OUTBOUND_ANSWER_RATE\' | translate | uppercase}}</div>\n                </div>\n\n                <div class="p-16 grey-200-bg text-center border-top" layout-align="start center">\n                    <span class="h6 blue-green-fg secondary-text text-truncate">{{\'DASHBOARDS.OUTBOUND_ANSWER_RATE_TEXT\' | translate | uppercase}}</span>\n                </div>\n            </ms-widget-front>\n            \x3c!-- / Front --\x3e\n\n            \x3c!-- Back --\x3e\n            <ms-widget-back class="p-16 grey-50-bg">\n                <div class="flip-to-front">\n                    <md-button class="md-icon-button" ng-click="flipWidget()" aria-label="Flip widget">\n                        <md-icon md-font-icon="icon-close" class="s16"></md-icon>\n                    </md-button>\n                </div>\n\n                <div>\n                    {{\'DASHBOARDS.HELP.OUTBOUND_ANSWER_RATE\' | translate}}\n                </div>\n            </ms-widget-back>\n            \x3c!-- / Back --\x3e\n\n        </ms-widget>\n        \x3c!-- / WIDGET 4 --\x3e\n\n    </div>\n    \x3c!-- / WIDGET GROUP --\x3e\n</div>\n\x3c!-- / WIDGET OUTBOUND --\x3e'),e.put("app/main/apps/fax/views/faxAccounts/create/dialog.html",'<md-dialog class="faxAccount-dialog" aria-label="New FaxAccount">\n    <form name="faxAccountForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="FAX.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.faxAccount.name" ng-required="true" autofocus>\n                <div ng-messages="faxAccountForm[\'name\'].$error" ng-show="faxAccountForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.KEY">key</label>\n                <input type="text" name="key" ng-model="vm.faxAccount.key" md-maxlength="5" ng-required="true">\n                <div ng-messages="faxAccountForm[\'key\'].$error" ng-show="faxAccountForm[\'key\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.KEY_REQUIRED">key field is required</span>\n                    </div>\n\n                    <div ng-message="md-maxlength">\n                        <span translate="FAX.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 5}\'>key must have a maximum length equal to 5</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.TRUNK">trunk</label>\n                <md-select name="TrunkId" ng-model="vm.faxAccount.TrunkId" required>\n                    <md-option ng-value="TrunkId.id" ng-repeat="TrunkId in vm.trunks">{{ TrunkId.name }}</md-option>\n                </md-select>\n                <div ng-messages="faxAccountForm[\'TrunkId\'].$error" ng-show="faxAccountForm[\'TrunkId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.TRUNK_REQUIRED">trunk field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.LOCALSTATIONID">localstationid</label>\n                <input type="text" name="localstationid" ng-model="vm.faxAccount.localstationid" ng-required="true">\n                <div class="hint"><span translate="FAX.HELP.LOCALSTATIONID"></span></div>\n                <div ng-messages="faxAccountForm[\'localstationid\'].$error" ng-show="faxAccountForm[\'localstationid\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.LOCALSTATIONID_REQUIRED">localstationid field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.LIST">List</label>\n                <md-select name="ListId" ng-model="vm.faxAccount.ListId" required>\n                    <md-option ng-value="ListId.id" ng-repeat="ListId in vm.lists">{{ ListId.name }}</md-option>\n                </md-select>\n                <div ng-messages="faxAccountForm[\'ListId\'].$error" ng-show="faxAccountForm[\'ListId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.LIST_REQUIRED">List field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.faxAccount.description">\n                <div ng-messages="faxAccountForm[\'description\'].$error" ng-show="faxAccountForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newFaxAccount" ng-click="vm.saveFaxAccount()" class="send-button md-accent md-raised" ng-disabled="faxAccountForm.$invalid || faxAccountForm.$pristine" aria-label="SAVE" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newFaxAccount" ng-click="vm.addNewFaxAccount()" class="send-button md-accent md-raised" ng-disabled="faxAccountForm.$invalid" aria-label="ADD" translate="FAX.ADD_FAXACCOUNT" translate-attr-aria-label="FAX.ADD_FAXACCOUNT">\n                    ADD FAXACCOUNT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newFaxAccount" ng-click="vm.deleteFaxAccount($event)" aria-label="DELETE" translate translate-attr-aria-label="FAX.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="FAX.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxAccounts/edit/apps/agent/dialog.html",'<md-dialog class="faxAccount-dialog" aria-label="New FaxAccount">\n    <form name="faxAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="FAX.AGENT">Agent</label>\n                <md-select name="agent" ng-model="vm.agent.agent" required autofocus>\n                    <md-option ng-value="agent.name" ng-repeat="agent in vm.agents">{{ agent.name }}</md-option>\n                </md-select>\n                <div ng-messages="faxAccountFormApp[\'agent\'].$error" ng-show="faxAccountFormApp[\'agent\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.AGENT_REQUIRED">Agent field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.agent.timeout" min="0" max="2147483" ng-required="true">\n                <div ng-messages="faxAccountFormApp[\'timeout\'].$error" ng-show="faxAccountFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="FAX.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="FAX.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveFaxAccountApp()" class="send-button md-accent md-raised" ng-disabled="faxAccountFormApp.$invalid || faxAccountFormApp.$pristine" aria-label="SAVE" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxAccounts/edit/apps/close/dialog.html",'<md-dialog class="faxAccount-dialog" aria-label="New FaxAccount">\n    <form name="faxAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="FAX.DISPOSITION">Disposition</label>\n                <input type="text" name="disposition" ng-model="vm.close.disposition" ng-required="true" autofocus>\n                <div ng-messages="faxAccountFormApp[\'disposition\'].$error" ng-show="faxAccountFormApp[\'disposition\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.DISPOSITION_REQUIRED">Disposition field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveFaxAccountApp()" class="send-button md-accent md-raised" ng-disabled="faxAccountFormApp.$invalid || faxAccountFormApp.$pristine" aria-label="SAVE" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxAccounts/edit/apps/gotoif/dialog.html",'<md-dialog class="faxAccount-dialog" aria-label="New FaxAccount">\n    <form name="faxAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="FAX.CONDITION">Condition</label>\n                <input type="text" name="condition" ng-model="vm.gotoif.condition" ng-required="true" autofocus>\n                <div ng-messages="faxAccountFormApp[\'condition\'].$error" ng-show="faxAccountFormApp[\'condition\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.CONDITION_REQUIRED">Condition field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.TRUEPRIORITY">truepriority</label>\n                <input type="number" name="truepriority" ng-model="vm.gotoif.truepriority" min="1" ng-required="true">\n                <div ng-messages="faxAccountFormApp[\'truepriority\'].$error" ng-show="faxAccountFormApp[\'truepriority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.TRUEPRIORITY_REQUIRED">truepriority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="FAX.ERRORS.TRUEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">truepriority must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.FALSEPRIORITY">falsepriority</label>\n                <input type="number" name="falsepriority" ng-model="vm.gotoif.falsepriority" min="1" ng-required="true">\n                <div ng-messages="faxAccountFormApp[\'falsepriority\'].$error" ng-show="faxAccountFormApp[\'falsepriority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.FALSEPRIORITY_REQUIRED">falsepriority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="FAX.ERRORS.FALSEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">falsepriority must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveFaxAccountApp()" class="send-button md-accent md-raised" ng-disabled="faxAccountFormApp.$invalid || faxAccountFormApp.$pristine" aria-label="SAVE" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxAccounts/edit/apps/gotop/dialog.html",'<md-dialog class="faxAccount-dialog" aria-label="New FaxAccount">\n    <form name="faxAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="FAX.PRIORITY">Priority</label>\n                <input type="number" name="priority" ng-model="vm.gotop.priority" min="0" ng-required="true" autofocus>\n                <div ng-messages="faxAccountFormApp[\'priority\'].$error" ng-show="faxAccountFormApp[\'priority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.PRIORITY_REQUIRED">Priority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="FAX.ERRORS.PRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Priority must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveFaxAccountApp()" class="send-button md-accent md-raised" ng-disabled="faxAccountFormApp.$invalid || faxAccountFormApp.$pristine" aria-label="SAVE" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxAccounts/edit/apps/interval/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select ng-model="vm.type">\n                    <md-option ng-value="type" ng-repeat=\'type in vm.types\'>{{ type | ucfirst }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.type === \'list\'">\n                <label translate="TOOLS.INTERVALS">Intervals</label>\n                <md-select ng-model="vm.interval.IntervalId">\n                    <md-option ng-value="interval.id" ng-repeat="interval in vm.intervals.rows">{{ interval.name }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            \x3c!-- TIMERANGE START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.TIME_RANGE">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <div class="md-block" flex>\n                    <mdp-time-picker name="timeRangeFrom" mdp-placeholder="FROM" ng-model="vm.timeRangeFrom" mdp-format="HH:mm" mdp-auto-switch="true">\n                        <div ng-messages="intervalForm.timeRangeFrom.$error" ng-show="intervalForm.timeRangeFrom.$touched" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_FROM_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n                <div class="md-block" flex ng-if="vm.timeRangeFrom">\n                    <mdp-time-picker name="timeRangeTo" mdp-placeholder="TO*" ng-model="vm.timeRangeTo" mdp-format="HH:mm" mdp-auto-switch="true" required>\n                        <div ng-messages="intervalForm.timeRangeTo.$error" ng-show="intervalForm.timeRangeTo.$invalid" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_INVALID">Time Range To field is invalid</span>\n                            </div>\n                            <div ng-message="required">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_REQUIRED">Time Range To field is required</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n            \x3c!-- TIMERANGE END --\x3e\n\n            \x3c!-- DAYSOFWEEK START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.WEEK_DAYS">Week Days</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.dayOfWeekFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex class="md-block" ng-if="vm.dayOfWeekFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="dayOfWeekTo" ng-model="vm.dayOfWeekTo">\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.dayOfWeekTo.$error" ng-show="intervalForm.dayOfWeekTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- DAYSOFWEEK END --\x3e\n\n            \x3c!-- MONTHDAY START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTH_DAYS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthDayFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthDayFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthDayTo" ng-model="vm.monthDayTo">\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthDayTo.$error" ng-show="intervalForm.monthDayTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTHDAY END --\x3e\n\n            \x3c!-- MONTH START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTHS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthTo" ng-model="vm.monthTo">\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthTo.$error" ng-show="intervalForm.monthTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTH END --\x3e\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxAccounts/edit/apps/noop/dialog.html",'<md-dialog class="faxAccount-dialog" aria-label="New FaxAccount">\n    <form name="faxAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="FAX.VALUE">Value</label>\n                <input type="text" name="value" ng-model="vm.noop.value" autofocus>\n                <div ng-messages="faxAccountFormApp[\'value\'].$error" ng-show="faxAccountFormApp[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveFaxAccountApp()" class="send-button md-accent md-raised" ng-disabled="faxAccountFormApp.$invalid || faxAccountFormApp.$pristine" aria-label="SAVE" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxAccounts/edit/apps/queue/dialog.html",'<md-dialog class="faxAccount-dialog" aria-label="New FaxAccount">\n    <form name="faxAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="FAX.QUEUE">Queue</label>\n                <md-select name="queue" ng-model="vm.queue.queue" required autofocus>\n                    <md-option ng-value="queue.name" ng-repeat="queue in vm.queues">{{ queue.name }}</md-option>\n                </md-select>\n                <div ng-messages="faxAccountFormApp[\'queue\'].$error" ng-show="faxAccountFormApp[\'queue\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.QUEUE_REQUIRED">Queue field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.queue.timeout" min="0" max="2147483" ng-required="true">\n                <div ng-messages="faxAccountFormApp[\'timeout\'].$error" ng-show="faxAccountFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="FAX.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="FAX.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveFaxAccountApp()" class="send-button md-accent md-raised" ng-disabled="faxAccountFormApp.$invalid || faxAccountFormApp.$pristine" aria-label="SAVE" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxAccounts/edit/apps/system/dialog.html",'<md-dialog class="faxAccount-dialog" aria-label="New FaxAccount">\n    <form name="faxAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="FAX.COMMAND">Command</label>\n                <input type="text" name="command" ng-model="vm.system.command" ng-required="true" autofocus>\n                <div ng-messages="faxAccountFormApp[\'command\'].$error" ng-show="faxAccountFormApp[\'command\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.COMMAND_REQUIRED">Command field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.VARIABLE">Variable</label>\n                <md-select name="variable" ng-model="vm.system.variable">\n                    <md-option ng-value="variable.name" ng-repeat="variable in vm.variables">{{ variable.name }}</md-option>\n                    <md-option ng-value="\'\'">None</md-option>\n                </md-select>\n                <div ng-messages="faxAccountFormApp[\'variable\'].$error" ng-show="faxAccountFormApp[\'variable\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.VARIABLE_REQUIRED">Variable field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveFaxAccountApp()" class="send-button md-accent md-raised" ng-disabled="faxAccountFormApp.$invalid || faxAccountFormApp.$pristine" aria-label="SAVE" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxAccounts/edit/faxDispositions/dialog.html",'<md-dialog class="faxDisposition-dialog" aria-label="New FaxDisposition">\n    <form name="faxDispositionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="FAX.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.faxDisposition.name" ng-required="true" autofocus>\n                <div ng-messages="faxDispositionForm[\'name\'].$error" ng-show="faxDispositionForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newFaxDisposition" ng-click="vm.saveFaxDisposition()" class="send-button md-accent md-raised" ng-disabled="faxDispositionForm.$invalid || faxDispositionForm.$pristine" aria-label="SAVE" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newFaxDisposition" ng-click="vm.addNewFaxDisposition()" class="send-button md-accent md-raised" ng-disabled="faxDispositionForm.$invalid" aria-label="ADD" translate="FAX.ADD_FAXDISPOSITION" translate-attr-aria-label="FAX.ADD_FAXDISPOSITION">\n                    ADD FAXDISPOSITION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newFaxDisposition" ng-click="vm.deleteFaxDisposition($event)" aria-label="DELETE" translate translate-attr-aria-label="FAX.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="FAX.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxAccounts/edit/view.html",'<div id="fax-faxAccount" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-faxAccounts-button md-icon-button" aria-label="Go to faxAccounts" ng-click="vm.gotoFaxAccounts()" translate translate-attr-aria-label="FAX.GO_TO_FAXACCOUNTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="faxAccount-image" hide-xs>\n                    <img ng-src="assets/images/business/faxAccounts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.faxAccount.id}}\n                        <span ng-if="vm.faxAccount.name">{{vm.faxAccount.name}}</span>\n                        <span ng-if="vm.faxAccount.exten">{{vm.faxAccount.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="FAX.CREATED_AT"></span> <span>{{vm.faxAccount.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.gotogoto(vm.faxAccount, $event)" class="md-fab md-warn md-icon-button" aria-label="goto">\n                <md-tooltip><span translate="FAX.GOTO_FAXACCOUNT"></span></md-tooltip>\n                <md-icon md-font-icon="icon-cast"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveFaxAccount()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (notificationForm.$invalid) || (advancedForm.$invalid) || (faxDispositionsForm.$invalid) || (actionsForm.$invalid) || (interactionsForm.$invalid)"\n                translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="FAX.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="faxAccount-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="FAX.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.faxAccount.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.KEY">key</label>\n                                <input type="text" name="key" ng-model="vm.faxAccount.key" md-maxlength="5" ng-required="true">\n                                <div ng-messages="generalForm[\'key\'].$error" ng-show="generalForm[\'key\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.KEY_REQUIRED">key field is required</span>\n                                    </div>\n\n                                    <div ng-message="md-maxlength">\n                                        <span translate="FAX.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 5}\'>key must have a maximum length equal to 5</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.HEADERINFO">headerinfo</label>\n                                <input type="text" name="headerinfo" ng-model="vm.faxAccount.headerinfo" ng-required="true">\n                                <div class="hint"><span translate="FAX.HELP.HEADERINFO"></span></div>\n                                <div ng-messages="generalForm[\'headerinfo\'].$error" ng-show="generalForm[\'headerinfo\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.HEADERINFO_REQUIRED">headerinfo field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.TRUNK">trunk</label>\n                                <md-select name="TrunkId" ng-model="vm.faxAccount.TrunkId" required>\n                                    <md-option ng-value="TrunkId.id" ng-repeat="TrunkId in vm.trunks">{{ TrunkId.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'TrunkId\'].$error" ng-show="generalForm[\'TrunkId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.TRUNK_REQUIRED">trunk field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.LOCALSTATIONID">localstationid</label>\n                                <input type="text" name="localstationid" ng-model="vm.faxAccount.localstationid" ng-required="true">\n                                <div class="hint"><span translate="FAX.HELP.LOCALSTATIONID"></span></div>\n                                <div ng-messages="generalForm[\'localstationid\'].$error" ng-show="generalForm[\'localstationid\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.LOCALSTATIONID_REQUIRED">localstationid field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.LIST">List</label>\n                                <md-select name="ListId" ng-model="vm.faxAccount.ListId" required>\n                                    <md-option ng-value="ListId.id" ng-repeat="ListId in vm.lists">{{ ListId.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'ListId\'].$error" ng-show="generalForm[\'ListId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.LIST_REQUIRED">List field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.WAITFORTHEASSIGNEDAGENT">WaitForTheAssignedAgent</label>\n                                <input type="number" name="waitForTheAssignedAgent" ng-model="vm.faxAccount.waitForTheAssignedAgent" min="1" max="2147483" ng-required="true">\n                                <div ng-messages="generalForm[\'waitForTheAssignedAgent\'].$error" ng-show="generalForm[\'waitForTheAssignedAgent\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.WAITFORTHEASSIGNEDAGENT_REQUIRED">WaitForTheAssignedAgent field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="FAX.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">WaitForTheAssignedAgent must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="FAX.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_LESS_THAN_OR_EQUAL_TO">WaitForTheAssignedAgent must be a valid greater or equal than</span> <span>2147483</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.faxAccount.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="faxAccount-detail-form-container notification md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="FAX.NOTIFICATION">NOTIFICATION</div>\n                        </div>\n                        <form name="notificationForm" novalidate>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.faxAccount.notificationSound" aria-label="notificationSound"><span translate="FAX.NOTIFICATIONSOUND">notificationSound</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.faxAccount.notificationShake" aria-label="notificationShake"><span translate="FAX.NOTIFICATIONSHAKE">notificationShake</span></md-switch>\n                            </md-input-container>\n                            <div class="md-block">\n                                <label class="md-caption grey-fg" translate="FAX.NOTIFICATIONTEMPLATE">notificationTemplate</label>\n                                <textarea aria-label="notificationTemplate notificationTemplate" ckeditor="{ skin: \'office2013\', language: \'en\', allowedContent: true, extraPlugins: \'font,colorbutton,autoembed,autocorrect,googlethisterm,pastebase64\', toolbarGroups: [{ name: \'styles\', groups: [\'styles\'] }, { name: \'clipboard\', groups: [\'undo\'] }, { name: \'colors\', groups: [\'colors\'] }, { name: \'basicstyles\', groups: [\'basicstyles\'] }, { name: \'paragraph\', groups: [\'list\', \'indent\', \'align\'] }, { name: \'mode\' }], autocorrect_enabled: true, disableNativeSpellChecker: false, removePlugins: \'magicline\' }"\n                                    ng-model="vm.faxAccount.notificationTemplate"></textarea>\n                            </div>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="FAX.ADVANCED">ADVANCED</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="faxAccount-detail-form-container advanced md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="FAX.ADVANCED">ADVANCED</div>\n                        </div>\n                        <form name="advancedForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.ECM">ECM</label>\n                                <md-select name="ecm" ng-model="vm.faxAccount.ecm" required autofocus>\n                                    <md-option ng-value="\'yes\'">yes</md-option>\n                                    <md-option ng-value="\'no\'">no</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="FAX.HELP.ECM"></span></div>\n                                <div ng-messages="advancedForm[\'ecm\'].$error" ng-show="advancedForm[\'ecm\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.ECM_REQUIRED">ECM field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.MINRATE">minrate</label>\n                                <md-select name="minrate" ng-model="vm.faxAccount.minrate" required>\n                                    <md-option ng-value="\'2400\'">2400</md-option>\n                                    <md-option ng-value="\'4800\'">4800</md-option>\n                                    <md-option ng-value="\'7200\'">7200</md-option>\n                                    <md-option ng-value="\'9600\'">9600</md-option>\n                                    <md-option ng-value="\'12000\'">12000</md-option>\n                                    <md-option ng-value="\'14400\'">14400</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="FAX.HELP.MINRATE"></span></div>\n                                <div ng-messages="advancedForm[\'minrate\'].$error" ng-show="advancedForm[\'minrate\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.MINRATE_REQUIRED">minrate field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.MAXRATE">maxrate</label>\n                                <md-select name="maxrate" ng-model="vm.faxAccount.maxrate" required>\n                                    <md-option ng-value="\'2400\'">2400</md-option>\n                                    <md-option ng-value="\'4800\'">4800</md-option>\n                                    <md-option ng-value="\'7200\'">7200</md-option>\n                                    <md-option ng-value="\'9600\'">9600</md-option>\n                                    <md-option ng-value="\'12000\'">12000</md-option>\n                                    <md-option ng-value="\'14400\'">14400</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="FAX.HELP.MAXRATE"></span></div>\n                                <div ng-messages="advancedForm[\'maxrate\'].$error" ng-show="advancedForm[\'maxrate\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.MAXRATE_REQUIRED">maxrate field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.MODEM">modem</label>\n                                <input type="text" name="modem" ng-model="vm.faxAccount.modem" ng-required="true">\n                                <div class="hint"><span translate="FAX.HELP.MODEM"></span></div>\n                                <div ng-messages="advancedForm[\'modem\'].$error" ng-show="advancedForm[\'modem\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.MODEM_REQUIRED">modem field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.GATEWAY">gateway</label>\n                                <input type="text" name="gateway" ng-model="vm.faxAccount.gateway" ng-required="true">\n                                <div class="hint"><span translate="FAX.HELP.GATEWAY"></span></div>\n                                <div ng-messages="advancedForm[\'gateway\'].$error" ng-show="advancedForm[\'gateway\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.GATEWAY_REQUIRED">gateway field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.FAXDETECT">faxdetect</label>\n                                <input type="text" name="faxdetect" ng-model="vm.faxAccount.faxdetect" ng-required="true">\n                                <div class="hint"><span translate="FAX.HELP.FAXDETECT"></span></div>\n                                <div ng-messages="advancedForm[\'faxdetect\'].$error" ng-show="advancedForm[\'faxdetect\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.FAXDETECT_REQUIRED">faxdetect field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.T38TIMEOUT">t38timeout</label>\n                                <input type="number" name="t38timeout" ng-model="vm.faxAccount.t38timeout" ng-required="true">\n                                <div class="hint"><span translate="FAX.HELP.T38TIMEOUT"></span></div>\n                                <div ng-messages="advancedForm[\'t38timeout\'].$error" ng-show="advancedForm[\'t38timeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.T38TIMEOUT_REQUIRED">t38timeout field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.SIP">SIP</label>\n                                <md-select name="tech" ng-model="vm.faxAccount.tech" required>\n                                    <md-option ng-value="\'SIP\'">SIP</md-option>\n                                    <md-option ng-value="\'IAX\'">IAX</md-option>\n                                    <md-option ng-value="\'DADHI\'">DADHI</md-option>\n                                    <md-option ng-value="\'KHOMP\'">KHOMP</md-option>\n                                </md-select>\n                                <div ng-messages="advancedForm[\'tech\'].$error" ng-show="advancedForm[\'tech\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.SIP_REQUIRED">SIP field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="FAX.DISPOSITIONS">DISPOSITIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="faxAccount-detail-form-container faxdispositions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="FaxAccountFaxDispositionsController as vm_dc" ng-init="vm_dc.init(vm.faxAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedFaxAccountFaxDispositions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="FAX.FAXDISPOSITIONS">FaxDispositions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditFaxAccountFaxDisposition($event)" aria-label="add faxDisposition" translate translate-attr-label="FAX.ADD_FAXDISPOSITION">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedFaxAccountFaxDispositions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedFaxAccountFaxDispositions.length}} {{vm_dc.selectedFaxAccountFaxDispositions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedFaxAccountFaxDispositions" csv-label="true" filename="faxAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedFaxAccountFaxDispositions($event)" aria-label="delete selected" translate translate-attr-label="FAXACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedFaxAccountFaxDispositions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getFaxAccountFaxDispositions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'FAX.ID\' | translate }}</th>\n                                            <th md-column md-order-by="name">{{ \'FAX.NAME\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'FAX.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="faxDisposition" md-select-id="id" ng-repeat="faxDisposition in vm_dc.faxAccountFaxDispositions.rows">\n                                            <td ng-click="vm_dc.createOrEditFaxAccountFaxDisposition($event, faxDisposition)" md-cell>{{faxDisposition.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditFaxAccountFaxDisposition($event, faxDisposition)" md-cell>{{faxDisposition.name}}</td>\n                                            <td ng-click="vm_dc.createOrEditFaxAccountFaxDisposition($event, faxDisposition)" md-cell>{{faxDisposition.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="FAX.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditFaxAccountFaxDisposition($event, faxDisposition)" translate="FAX.EDIT_FAXDISPOSITION">\n                                                                Edit FaxDisposition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(faxDisposition, $event)" translate="FAX.DELETE_FAXDISPOSITION">\n                                                                Delete FaxDisposition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.faxAccountFaxDispositions.rows.length">\n                                            <td md-cell colspan="5">\n                                                <span class="text-boxed-ligth" translate="FAX.NO_FAXDISPOSITION_AVAILABLE">No faxdisposition available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'FAX.PAGE\' | translate}}:\', rowsPerPage: \'{{\'FAX.ROWSPERPAGE\' | translate}}:\', of: \'{{\'FAX.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.faxAccountFaxDispositions.count}}" md-on-paginate="vm_dc.getFaxAccountFaxDispositions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="FAX.ACTIONS">ACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="faxAccount-detail-form-container actions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="FaxAccountActionsController as vm_ac" ng-init="vm_ac.init(vm.faxAccount)" class="content" md-background-bg layout="row" layout-align="start start">\n                            \x3c!-- SIDENAV --\x3e\n                            <div class="navigation-simple sidenav main-sidenav md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="20">\n                                \x3c!-- SIDENAV CONTENT --\x3e\n                                <md-list class="no-padding">\n                                    <md-subheader class="md-no-sticky">\n                                        <span translate="VOICE.APPLICATIONS_LIST">\n          Applications List\n        </span>\n                                    </md-subheader>\n                                </md-list>\n                                <md-divider></md-divider>\n                                <md-list ng-sortable="vm_ac.list">\n                                    <md-list-item class="handle" ng-repeat="a in vm_ac.apps">\n                                        <md-icon md-font-icon="{{a.icon}}" class="s16"></md-icon>\n                                        <p class="text-truncate" translate="FAX.{{(a.alias || a.appType) | uppercase}}">{{a.alias || a.appType}}</p>\n                                    </md-list-item>\n                                </md-list>\n                                \x3c!-- / SIDENAV CONTENT --\x3e\n                            </div>\n                            \x3c!-- / SIDENAV --\x3e\n                            <div flex></div>\n                            \x3c!-- MAIN --\x3e\n                            <div class="main scrollable md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="75">\n                                <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_ac.selectedFaxAccountApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">Drag & Drop Routing</span>\n                                        <div flex></div>\n                                        <ms-search-bar on-search="vm_ac.query.filter = query" on-collapse="vm_ac.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    </div>\n                                </md-toolbar>\n                                <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_ac.selectedFaxAccountApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">{{vm_ac.selectedFaxAccountApps.length}} {{vm_ac.selectedFaxAccountApps.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                        <div flex></div>\n                                        <md-button ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_ac.deleteSelectedFaxAccountApps($event)" aria-label="delete selected" translate translate-attr-label="FAX.DELETE_SELECTED">\n                                            <md-icon md-font-icon="icon-delete"></md-icon>\n                                        </md-button>\n                                    </div>\n                                </md-toolbar>\n\n                                \x3c!-- QUEUES TABLE --\x3e\n                                <md-table-container>\n                                    <table md-table md-row-select multiple ng-model="vm_ac.selectedFaxAccountApps">\n                                        <thead md-head>\n                                            <tr md-row>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px">\n                                                    <span translate="VOICE.PRIORITY">Priority</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Type</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Appdata</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Interval</span>\n                                                </th>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px"></th>\n                                            </tr>\n                                        </thead>\n                                        <tbody md-body ng-sortable="vm_ac.applications">\n                                            <tr md-row md-select="app" md-select-id="id" ng-repeat="app in vm_ac.faxAccountApps.rows | filter: vm_ac.query.filter">\n                                                <td md-cell>\n                                                    <md-icon md-font-icon="icon-drag-vertical" class="s16 handle"></md-icon>\n                                                </td>\n                                                <td md-cell ng-click="vm_ac.editFaxAccountApp($event, $index)"><span>{{app.priority}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editFaxAccountApp($event, $index)">{{app.app.toLowerCase() === \'agi\' ? \'Cally-Square\' : app.app | ucfirst}}<span ng-if="app.appType.toLowerCase() === \'custom\'">*</span></td>\n                                                <td md-cell ng-click="vm_ac.editFaxAccountApp($event, $index)"><span class="text-truncate" style="width:200px">{{app.appdata}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editInterval($event, $index)">{{app.IntervalId ? \'From List\' : app.interval}}</td>\n                                                <td md-cell>\n                                                    <md-button ng-click="vm_ac.editInterval($event, $index)" class="md-icon-button" aria-label="Interval">\n                                                        <md-icon md-font-icon="icon-timer"></md-icon>\n                                                        <md-tooltip>\n                                                            {{app.IntervalId ? \'From List\' : (app.interval === \'*,*,*,*\' ? \'Always\' : \'Custom\')}}\n                                                        </md-tooltip>\n                                                    </md-button>\n                                                </td>\n                                                <td md-cell class="actions">\n                                                    <md-menu>\n                                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                        </md-button>\n\n                                                        <md-menu-content width="3">\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editFaxAccountApp($event, $index)" translate="VOICE.EDIT_APP">\n                                                                    Edit App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editInterval($event, $index)" translate="VOICE.EDIT_INTERVAL">\n                                                                    Edit Interval\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'">\n                                                                <md-button ng-click="vm_ac.deleteConfirm(app, $index, $event)" translate="VOICE.DELETE_APP">\n                                                                    Delete App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                        </md-menu-content>\n                                                    </md-menu>\n                                                </td>\n                                            </tr>\n                                            <tr md-row ng-hide="vm_ac.faxAccountApps.rows.length">\n                                                <td md-cell colspan="7">\n                                                    <span class="text-boxed-ligth" translate="VOICE.NO_APPS_AVAILABLE">No apps available</span>\n                                                </td>\n                                            </tr>\n                                        </tbody>\n                                    </table>\n                                </md-table-container>\n                                \x3c!-- / QUEUES TABLE --\x3e\n\n                                \x3c!-- NO RESULTS --\x3e\n\n                                \x3c!-- / NO RESULTS --\x3e\n                            </div>\n                            \x3c!-- / MAIN --\x3e\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="FAX.INTERACTIONS">INTERACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="faxAccount-detail-form-container interactions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="FaxAccountInteractionsController as vm_dc" ng-init="vm_dc.init(vm.faxAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedFaxAccountInteractions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="FAX.INTERACTIONS">Interactions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.getFaxAccountInteractions()" aria-label="refresh Interactions" translate translate-attr-label="FAX.REFRESH_INTERACTIONS">\n                                        <md-icon md-font-icon="icon-refresh"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedFaxAccountInteractions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedFaxAccountInteractions.length}} {{vm_dc.selectedFaxAccountInteractions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedFaxAccountInteractions" csv-label="true" filename="faxAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedFaxAccountInteractions($event)" aria-label="delete selected" translate translate-attr-label="FAXACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedFaxAccountInteractions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getFaxAccountInteractions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'FAX.ID\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'FAX.STARTEDAT\' | translate }}</th>\n                                            <th md-column>{{ \'FAX.CONTACT\' | translate }}</th>\n                                            <th md-column>{{ \'FAX.AGENT\' | translate }}</th>\n                                            <th md-column md-order-by="closedAt">{{ \'FAX.CLOSEDAT\' | translate }}</th>\n                                            <th md-column md-order-by="disposition">{{ \'FAX.DISPOSITION\' | translate }}</th>\n                                            <th md-column md-order-by="note">{{ \'FAX.NOTES\' | translate }}</th>\n                                            <th md-column md-order-by="tag">{{ \'FAX.TAGS\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="interaction" md-select-id="id" ng-repeat="interaction in vm_dc.faxAccountInteractions.rows">\n                                            <td md-cell>{{interaction.id}}</td>\n                                            <td md-cell>{{interaction.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell>{{interaction.Contact.firstName}}</td>\n                                            <td md-cell>{{interaction.Owner.name}}</td>\n                                            <td md-cell>{{interaction.closedAt | date:\'medium\'}}</td>\n                                            <td md-cell>{{interaction.disposition}}</td>\n                                            <td md-cell>{{interaction.note}}</td>\n                                            <td md-cell>\n                                                <div ng-if="interaction.Tags.length">\n                                                    <md-tooltip md-direction="left" layout="row">\n                                                        <span ng-repeat="tag in interaction.Tags">{{tag.name}}<span ng-if="!$last">, </span></span>\n                                                    </md-tooltip>\n                                                    <md-icon md-font-icon="icon-tag"></md-icon>\n                                                </div>\n                                            </td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="FAX.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.spyfaxInteraction($event, interaction)" translate="FAX.SPYINTERACTION">\n                                                                Spy Interaction\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(interaction, $event)" translate="FAX.DELETE_INTERACTION">\n                                                                Delete Interaction\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.faxAccountInteractions.rows.length">\n                                            <td md-cell colspan="13">\n                                                <span class="text-boxed-ligth" translate="FAX.NO_INTERACTION_AVAILABLE">No interaction available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'FAX.PAGE\' | translate}}:\', rowsPerPage: \'{{\'FAX.ROWSPERPAGE\' | translate}}:\', of: \'{{\'FAX.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.faxAccountInteractions.count}}" md-on-paginate="vm_dc.getFaxAccountInteractions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/fax/views/faxAccounts/faxAccounts.html",'<div id="faxAccounts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-deskphone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="FAX.FAXACCOUNTS">FaxAccounts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="FAX.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedFaxAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedFaxAccounts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="FAX.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-faxAccounts-count">\n                    <span>{{vm.selectedFaxAccounts.length}}</span>\n                <span translate="FAX.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="FAXACCOUNTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllFaxAccounts()" translate="FAX.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectFaxAccounts()" translate="FAX.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedFaxAccounts" csv-label="true" filename="faxAccounts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedFaxAccounts($event)" aria-label="delete selected" translate translate-attr-label="FAXACCOUNTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- FAXACCOUNT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedFaxAccounts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getFaxAccounts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'FAX.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'FAX.NAME\' | translate }}</th>\n                                <th md-column md-order-by="key">{{ \'FAX.KEY\' | translate }}</th>\n                                <th md-column md-order-by="TrunkId">{{ \'FAX.TRUNK\' | translate }}</th>\n                                <th md-column md-order-by="localstationid">{{ \'FAX.LOCALSTATIONID\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'FAX.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.faxAccounts.rows.length">\n                                <td md-cell colspan="7">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="FAX.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="faxAccount" md-select-id="id" ng-repeat="faxAccount in vm.faxAccounts.rows">\n                                <td md-cell ng-if="faxAccount.userpic"><img class="avatar" alt="{{faxAccount.name}}" ng-src="api/users/{{faxAccount.id}}/avatar" /></td>\n                                <td md-cell ng-if="!faxAccount.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{faxAccount.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditFaxAccount($event, faxAccount)" md-cell class="id ">{{faxAccount.id}}</td>\n                                <td ng-click="vm.createOrEditFaxAccount($event, faxAccount)" md-cell class="name ">{{faxAccount.name}}</td>\n                                <td ng-click="vm.createOrEditFaxAccount($event, faxAccount)" md-cell class="key ">{{faxAccount.key}}</td>\n                                <td ng-click="vm.createOrEditFaxAccount($event, faxAccount)" md-cell class="TrunkId ">{{ TrunkId = vm.trunks[faxAccount.TrunkId]; TrunkId.name }}</td>\n                                <td ng-click="vm.createOrEditFaxAccount($event, faxAccount)" md-cell class="localstationid ">{{faxAccount.localstationid}}</td>\n                                <td ng-click="vm.createOrEditFaxAccount($event, faxAccount)" md-cell class="description ">{{faxAccount.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="FAX.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(faxAccount, $event)" translate="FAX.EDIT_FAXACCOUNT">\n                                                    Edit FaxAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.interactionsgoto(faxAccount, $event)" translate="FAX.INTERACTIONS_FAXACCOUNT">\n                                                    Interactions FaxAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(faxAccount, $event)" translate="FAX.GOTOREALTIME_FAXACCOUNT">\n                                                    goToRealtime FaxAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(faxAccount, $event)" translate="FAX.DELETE_FAXACCOUNT">\n                                                    Delete FaxAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'FAX.PAGE\' | translate}}:\', rowsPerPage: \'{{\'FAX.ROWSPERPAGE\' | translate}}:\', of: \'{{\'FAX.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.faxAccounts.count}}"\n                    md-on-paginate="vm.getFaxAccounts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / FAXACCOUNT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD FAXACCOUNT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-faxAccount-button" ng-click="vm.createOrEditFaxAccount($event)" aria-label="add faxAccount" translate translate-attr-aria-label="FAX.ADD_FAXACCOUNT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD FAXACCOUNT BUTTON --\x3e\n</div>'),e.put("app/main/apps/fax/views/faxQueues/create/dialog.html",'<md-dialog class="faxQueue-dialog" aria-label="New FaxQueue">\n    <form name="faxQueueForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="FAX.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.faxQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newFaxQueue">\n                <div class="hint"><span translate="FAX.HELP.NAME"></span></div>\n                <div ng-messages="faxQueueForm[\'name\'].$error" ng-show="faxQueueForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="FAX.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.STRATEGY">Strategy</label>\n                <md-select name="strategy" ng-model="vm.faxQueue.strategy" required>\n                    <md-option ng-value="\'beepall\'">Beepall</md-option>\n                    <md-option ng-value="\'rrmemory\'">RR Memory</md-option>\n                </md-select>\n                <div ng-messages="faxQueueForm[\'strategy\'].$error" ng-show="faxQueueForm[\'strategy\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.AGENT_TIMEOUT">Agent_Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.faxQueue.timeout" min="1" max="2147483" ng-required="true">\n                <div ng-messages="faxQueueForm[\'timeout\'].$error" ng-show="faxQueueForm[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.AGENT_TIMEOUT_REQUIRED">Agent_Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="FAX.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="FAX.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="FAX.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.faxQueue.description">\n                <div ng-messages="faxQueueForm[\'description\'].$error" ng-show="faxQueueForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="FAX.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newFaxQueue" ng-click="vm.saveFaxQueue()" class="send-button md-accent md-raised" ng-disabled="faxQueueForm.$invalid || faxQueueForm.$pristine" aria-label="SAVE" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newFaxQueue" ng-click="vm.addNewFaxQueue()" class="send-button md-accent md-raised" ng-disabled="faxQueueForm.$invalid" aria-label="ADD" translate="FAX.ADD_FAXQUEUE" translate-attr-aria-label="FAX.ADD_FAXQUEUE">\n                    ADD FAXQUEUE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newFaxQueue" ng-click="vm.deleteFaxQueue($event)" aria-label="DELETE" translate translate-attr-aria-label="FAX.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="FAX.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxQueues/edit/agentadd/agentadd.html",'<md-dialog class="faxQueue-dialog" aria-label="faxQueue">\n    <form name="faxQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="FAX.AGENTADD_FAXQUEUE">Add Agent to faxQueue</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxQueues/edit/teamadd/teamadd.html",'<md-dialog class="faxQueue-dialog" aria-label="faxQueue">\n    <form name="faxQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="FAX.TEAMADD_FAXQUEUE">Add Team in FAXQUEUE</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/fax/views/faxQueues/edit/view.html",'<div id="fax-faxQueue" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-faxQueues-button md-icon-button" aria-label="Go to faxQueues" ng-click="vm.gotoFaxQueues()" translate translate-attr-aria-label="FAX.GO_TO_FAXQUEUES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="faxQueue-image" hide-xs>\n                    <img ng-src="assets/images/business/faxQueues.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.faxQueue.id}}\n                        <span ng-if="vm.faxQueue.name">{{vm.faxQueue.name}}</span>\n                        <span ng-if="vm.faxQueue.exten">{{vm.faxQueue.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="FAX.CREATED_AT"></span> <span>{{vm.faxQueue.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.teamadddialog(vm.faxQueue, $event)" class="md-fab md-orange-500-bg md-icon-button" aria-label="teamadd">\n                <md-tooltip><span translate="FAX.TEAMADD_FAXQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-multiple-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.agentadddialog(vm.faxQueue, $event)" class="md-fab md-purple-500-bg md-icon-button" aria-label="agentadd">\n                <md-tooltip><span translate="FAX.AGENTADD_FAXQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-plus"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveFaxQueue()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid)" translate="FAX.SAVE" translate-attr-aria-label="FAX.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="FAX.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="faxQueue-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="FAX.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.faxQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="FAX.HELP.NAME"></span></div>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="FAX.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.STRATEGY">Strategy</label>\n                                <md-select name="strategy" ng-model="vm.faxQueue.strategy" required>\n                                    <md-option ng-value="\'beepall\'">Beepall</md-option>\n                                    <md-option ng-value="\'rrmemory\'">RR Memory</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'strategy\'].$error" ng-show="generalForm[\'strategy\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.AGENT_TIMEOUT">Agent_Timeout</label>\n                                <input type="number" name="timeout" ng-model="vm.faxQueue.timeout" min="1" max="2147483" ng-required="true">\n                                <div ng-messages="generalForm[\'timeout\'].$error" ng-show="generalForm[\'timeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.AGENT_TIMEOUT_REQUIRED">Agent_Timeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="FAX.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="FAX.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="FAX.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.faxQueue.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="FAX.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/fax/views/faxQueues/faxQueues.html",'<div id="faxQueues" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-deskphone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="FAX.FAXQUEUES">FaxQueues</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="FAX.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedFaxQueues.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedFaxQueues =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="FAX.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-faxQueues-count">\n                    <span>{{vm.selectedFaxQueues.length}}</span>\n                <span translate="FAX.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="FAXQUEUES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllFaxQueues()" translate="FAX.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectFaxQueues()" translate="FAX.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedFaxQueues" csv-label="true" filename="faxQueues.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedFaxQueues($event)" aria-label="delete selected" translate translate-attr-label="FAXQUEUES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- FAXQUEUE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedFaxQueues" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getFaxQueues">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'FAX.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'FAX.NAME\' | translate }}</th>\n                                <th md-column md-order-by="strategy">{{ \'FAX.STRATEGY\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.faxQueues.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="FAX.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="faxQueue" md-select-id="id" ng-repeat="faxQueue in vm.faxQueues.rows">\n                                <td md-cell ng-if="faxQueue.userpic"><img class="avatar" alt="{{faxQueue.name}}" ng-src="api/users/{{faxQueue.id}}/avatar" /></td>\n                                <td md-cell ng-if="!faxQueue.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{faxQueue.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditFaxQueue($event, faxQueue)" md-cell class="id ">{{faxQueue.id}}</td>\n                                <td ng-click="vm.createOrEditFaxQueue($event, faxQueue)" md-cell class="name ">{{faxQueue.name}}</td>\n                                <td ng-click="vm.createOrEditFaxQueue($event, faxQueue)" md-cell class="strategy ">{{ vm.arraystrategy[faxQueue.strategy].option }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="FAX.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(faxQueue, $event)" translate="FAX.EDIT_FAXQUEUE">\n                                                    Edit FaxQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.teamadddialog(faxQueue, $event)" translate="FAX.TEAMADD_FAXQUEUE">\n                                                    teamadd FaxQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.agentadddialog(faxQueue, $event)" translate="FAX.AGENTADD_FAXQUEUE">\n                                                    agentadd FaxQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(faxQueue, $event)" translate="FAX.DELETE_FAXQUEUE">\n                                                    Delete FaxQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(faxQueue, $event)" translate="FAX.GOTOREALTIME_FAXQUEUE">\n                                                    goToRealtime FaxQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'FAX.PAGE\' | translate}}:\', rowsPerPage: \'{{\'FAX.ROWSPERPAGE\' | translate}}:\', of: \'{{\'FAX.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.faxQueues.count}}"\n                    md-on-paginate="vm.getFaxQueues" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / FAXQUEUE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD FAXQUEUE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-faxQueue-button" ng-click="vm.createOrEditFaxQueue($event)" aria-label="add faxQueue" translate translate-attr-aria-label="FAX.ADD_FAXQUEUE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD FAXQUEUE BUTTON --\x3e\n</div>'),e.put("app/main/apps/fax/views/realtime/accounts/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="FAX.ACCOUNTS">Accounts</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- AGENT TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getFaxAccounts">\n            <tr md-row>\n                <th md-column md-order-by="name">{{ \'FAX.NAME\' | translate }}</th>\n                <th md-column>{{ \'FAX.KEY\' | translate }}</th>\n                <th md-column>{{ \'FAX.TOTAL\' | translate }}</th>\n                <th md-column>{{ \'FAX.IN\' | translate }}</th>\n                <th md-column>{{ \'FAX.OUT\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.faxAccounts">\n                <td md-cell colspan="4">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="FAX.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row md-select="vm.faxAccounts[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td md-cell>{{vm.faxAccounts[value].name}}</td>\n                <td md-cell>{{vm.faxAccounts[value].key}}</td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{(vm.faxAccounts[value].in || 0) + (vm.faxAccounts[value].out || 0)}}</span>\n                </td>\n                <td md-cell>\n                    <div layout="row">\n                        <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                        <span class="md-capture blue-fg">{{vm.faxAccounts[value].in || 0}}</span>\n                        <span class="text-boxed" ng-if="mailAccount.in">{{vm.faxAccounts[value].lastIn ?  (vm.faxAccounts[value].lastIn | date: \'shortTime\') : \'\'}}</span>\n                    </div>\n                </td>\n                <td md-cell>\n                    <div layout="row">\n                        <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                        <span class="md-capture green-fg">{{vm.faxAccounts[value].out || 0}}</span>\n                        <span class="text-boxed" ng-if="mailAccount.out">{{vm.faxAccounts[value].lastOut ?  (vm.faxAccounts[value].lastOut | date: \'shortTime\') : \'\'}}</span>\n                    </div>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="4">\n                            <md-menu-item>\n                                <md-button ng-click="vm.goToFaxAccount($event, vm.faxAccounts[value])" translate="FAX.EDIT_ACCOUNT">\n                                    Edit Account\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'FAX.PAGE\' | translate}}:\', rowsPerPage: \'{{\'FAX.ROWSPERPAGE\' | translate}}:\', of: \'{{\'FAX.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.count}}"\n    md-on-paginate="vm.getfaxAccounts" md-page-select></md-table-pagination>\n\x3c!-- / AGENT TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/fax/views/realtime/agents/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="FAX.AGENTS">Agents</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query; vm.onInit()" on-collapse="vm.query.filter = undefined; vm.onInit()" debounce="300"></ms-search-bar>\n        \x3c!-- <md-button class="md-icon-button" ng-click="vm.showInfo($event)">\n      <i class="icon-information-outline grey-600-fg">\n        <md-tooltip>{{\'VOICE.INFO\' | translate}}</md-tooltip>\n      </i>\n    </md-button> --\x3e\n        <md-select ng-model="vm.query.globalStatusFilter" class="md-caption" ng-change="vm.query.pauseTypeFilter = \'\'; vm.onInit()">\n            <md-option ng-value="\'\'">{{ \'FAX.ALL\' | translate }}</md-option>\n            <md-option value="pause">{{ \'FAX.PAUSE\' | translate }}</md-option>\n            <md-option value="*pause">{{ \'FAX.PARTIALPAUSE\' | translate }}</md-option>\n            <md-option value="busy">{{ \'FAX.BUSY\' | translate }}</md-option>\n            <md-option value="idle">{{ \'FAX.IDLE\' | translate }}</md-option>\n        </md-select>\n\n        <md-select ng-if="vm.isPause(vm.query.globalStatusFilter)" ng-model="vm.query.pauseTypeFilter" class="md-caption" ng-change="vm.onInit()">\n            <md-option ng-value="\'\'">All</md-option>\n            <md-option value="DEFAULT PAUSE">DEFAULT PAUSE</md-option>\n            <md-option value="ACW">ACW</md-option>\n            <md-option value="LOGININPAUSE">LOGININPAUSE</md-option>\n            <md-option value="Auto-Pause">AUTOPAUSE</md-option>\n            <md-option ng-value="pause.name" ng-repeat="pause in vm.pauses.rows">{{pause.name}}</md-option>\n        </md-select>\n    </div>\n</md-toolbar>\n\n\x3c!-- AGENT TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.order" md-on-reorder="vm.onInit">\n            <tr md-row border="1">\n                <th class="bv text-center" colspan="3">{{ \'FAX.AGENT\' | translate }}</th>\n                <th class="bv bl text-center" colspan="2">{{ \'VOICE.VOICE\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="bv bl text-center" colspan="2">{{ \'CHAT.CHAT\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="bv bl text-center" colspan="2">{{ \'MAIL.MAIL\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="bv bl text-center" colspan="2">{{ \'SMS.SMS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="bv bl text-center" colspan="2">{{ \'OPENCHANNEL.OPENCHANNEL\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="bv bl text-center" colspan="2">{{ \'FAX.FAX\' | translate }}</th>\n                <th width="10px" class="bt bl" rowspan="2"></th>\n                \x3c!-- <th md-column>{{ \'VOICE.PHONE_STATE\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PHONE_STATUS\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PAUSE\' | translate }}</th>\n                <th md-column width="10px"></th> --\x3e\n            </tr>\n            <tr md-row>\n                <th class="bl" md-column md-order-by="fullname">{{ \'FAX.NAME\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatus">{{ \'FAX.STATUS\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatusTime">{{ \'FAX.TIMER\' | translate }}</th>\n\n                <th class="bl custom-column">{{ \'VOICE.STATUS\' | translate }}</th>\n                <th class="bl custom-column">Info</th>\n\n                <th ng-if="vm.license.chat" class="bl text-center">{{ \'CHAT.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'CHAT.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.mail" class="bl text-center">{{ \'MAIL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'MAIL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.messaging" class="bl text-center">{{ \'SMS.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'SMS.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.openchannel" class="bl text-center">{{ \'OPENCHANNEL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'OPENCHANNEL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.fax" class="bl text-center">{{ \'FAX.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'FAX.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.order.length">\n                <td md-cell colspan="17">\n                    <div layout="row" layout-align="center center">\n                        <span>{{ \'FAX.NO_AGENT_ONLINE\' | translate }}</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-select="vm.agents[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td class="bt padding-5">\n                    <div layout="row" layout-align="start center">\n                        <img class="avatar" ng-src="{{vm.agents[value].userpic && \'api/users/\'+vm.agents[value].id+\'/avatar\' || \'assets/images/avatars/profile.png\'}}">\n                        <div layout="column">\n                            <span>{{vm.agents[value].fullname}}</span>\n                            <span>{{vm.agents[value].internal}}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt">\n                    <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'busy\':\'indigo-100-bg\',\'*pause\':\'amber-50-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].globalStatus]">{{ vm.isPause(vm.agents[value].globalStatus) ? \'\' : vm.agents[value].globalStatus | uppercase }} {{ vm.isPause(vm.agents[value].globalStatus) ? (vm.isPartialPause(vm.agents[value].globalStatus) ? \'*\'+vm.agents[value].pauseType || \'DEFAULT PAUSE\'  : vm.agents[value].pauseType || \'DEFAULT PAUSE\') : \'\'}}</span>\n                </td>\n                <td class="bt custom-column">\n                    <timer start-time="vm.agents[value].globalStatusTime" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                </td>\n                <td class="bt bl">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'talking\':\'indigo-100-bg\',\'ringing\':\'orange-400-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].voiceStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt bl">\n                    <div layout="column">\n                        <span ng-if="vm.agents[value].queue" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].queue }}</span>\n                        <span ng-if="vm.agents[value].destconnectedlinenum" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].destconnectedlinenum }}</span>\n                        <span class="padding-5" ng-if="vm.agents[value].queue || vm.agents[value].destconnectedlinenum">\n                            <timer start-time="vm.agents[value].voiceStatusTime" interval="1000" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                        </span>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt">--</td>\n                <td class="bt">--</td> --\x3e\n                <td class="bt bl" ng-if="vm.license.chat">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt padding-5 text-center">{{ agent.chatCurrentCapacity }}/{{ agent.chatCapacity > 0 ? agent.chatCapacity : \'∞\' }}</td> --\x3e\n                <td md-number class="bt text-center font-size-20" ng-if="vm.license.chat" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.mail">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.mail" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.messaging">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.messaging" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.openchannel">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">4</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">89</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.openchannel" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.fax">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">7</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">2</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.fax" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxCurrentCapacity }}</td>\n                <td class="bl bt padding-5 text-center">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="4">\n                            <md-menu-item>\n                                <md-button ng-click="vm.logout(vm.agents[value], $event)" translate="FAX.LOGOUT">\n                                    Logout\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.queueAdd(vm.agents[value], $event)" translate="FAX.AGENTADD_QUEUE">\n                                    Add Agent In Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="FAX.PAUSE">Pause</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item>\n                                            <md-button ng-disabled=" vm.agents[value].voicePause && \'DEFAULT PAUSE\' === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value])"><em translate="FAX.DEFAULT_PAUSE">Default Pause</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.pauses.rows.length" ng-repeat="pause in vm.pauses.rows">\n                                            <md-button ng-disabled="vm.agents[value].voicePause && pause.name === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value], pause.name)">{{pause.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                            <md-menu-item ng-if="vm.isPause(vm.agents[value].globalStatus)">\n                                <md-button ng-click="vm.unPause(vm.agents[value])" translate="FAX.UNPAUSE">\n                                    Unpause\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'FAX.PAGE\' | translate}}:\', rowsPerPage: \'{{\'FAX.ROWSPERPAGE\' | translate}}:\', of: \'{{\'FAX.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.filteredAgents.length}}"\n    md-on-paginate="vm.onInit" md-page-select></md-table-pagination>\n\x3c!-- / AGENT TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/fax/views/realtime/queues/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="FAX.QUEUES">Queues</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUE TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getQueues">\n            <tr md-row>\n                <th md-column md-order-by="name">{{ \'FAX.NAME\' | translate }}</th>\n                <th md-column>{{ \'FAX.LOGGED_IN\' | translate }}</th>\n                <th md-column>{{ \'FAX.PAUSED\' | translate }}</th>\n                <th md-column>{{ \'FAX.READY\' | translate }}</th>\n                <th md-column>{{ \'FAX.WAITING\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.queues">\n                <td md-cell colspan="7">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="FAX.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row md-select="vm.queues[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td md-cell>{{vm.queues[value].name}}</td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].loggedInDb || 0}} ({{vm.queues[value].loggedIn || 0}})</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].paused || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].available || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].waiting || 0}}</span>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="FAX.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="3">\n                            <md-menu-item>\n                                <md-button ng-click="vm.createOrEditFaxQueue($event, vm.queues[value])" translate="FAX.EDIT_QUEUE">\n                                    Edit Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.agentAdd($event, vm.queues[value])" translate="FAX.AGENTSADD_QUEUE">\n                                    Add Agents to queue\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'FAX.PAGE\' | translate}}:\', rowsPerPage: \'{{\'FAX.ROWSPERPAGE\' | translate}}:\', of: \'{{\'FAX.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.count}}"\n    md-on-paginate="vm.getQueues" md-page-select></md-table-pagination>\n\x3c!-- / QUEUE TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/fax/views/realtime/realtime.html",'<div id="realtime" class="page-layout simple tabbed" layout="column" ng-cloak>\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="FAX.AGENTS">Agents</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="FAX.TRUNKS">Trunks</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="FAX.QUEUES">Queues</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="FAX.ACCOUNTS">Accounts</span>\n                </md-tab-label>\n            </md-tab>\n        </md-tabs>\n\n        <md-card ui-view></md-card>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n</div>'),e.put("app/main/apps/fax/views/realtime/trunks/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="FAX.TRUNKS">Telephones</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n        \x3c!-- <md-button class="md-icon-button" ng-click="vm.showInfo($event)">\n      <i class="icon-information-outline grey-600-fg">\n        <md-tooltip>{{\'FAX.INFO\' | translate}}</md-tooltip>\n      </i>\n    </md-button> --\x3e\n    </div>\n</md-toolbar>\n\n\x3c!-- TRUNKS TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head>\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getTrunks">\n                <tr md-row>\n                    <th md-column md-order-by="name">{{ \'FAX.NAME\' | translate }}</th>\n                    <th md-column>{{ \'FAX.TRUNK_STATUS\' | translate }}</th>\n                    <th md-column>{{ \'FAX.REGISTRY\' | translate }}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.trunks">\n                    <td md-cell colspan="3">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="FAX.NO_AVAILABLE_INFO">No Available Info</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="(id, trunk) in vm.trunks">\n                    <td md-cell>{{trunk.name}}</td>\n                    <td md-cell>\n                        <i ng-class="vm.statusClass[trunk.status.toLowerCase()]">\n            <md-tooltip>{{\'FAX.\' + trunk.status | uppercase | translate}}</md-tooltip>\n          </i>\n                        <span ng-if="trunk.status === \'registered\'" class="text-boxed">{{trunk.address}}</span>\n                    </td>\n                    <td md-cell>\n                        <i ng-if="trunk.registry" ng-class="(trunk.stateRegistry.toLowerCase() === \'registered\') ? \'green-300-fg icon-checkbox-marked-circle\' : \'red-300-fg icon-close-circle\'">\n            <md-tooltip>{{\'FAX.\' + trunk.stateRegistry | uppercase | translate}}</md-tooltip>\n          </i>\n                        <span ng-if="trunk.registry && trunk.host && trunk.port" class="text-boxed">{{trunk.host}}:{{trunk.port}}</span>\n                        <span ng-if="!trunk.registry" translate="FAX.NO_REGISTRY">\n            No Registry\n          </span>\n                    </td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="4">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.goToTrunk($event, trunk)" translate="FAX.EDIT_TRUNK">\n                                        Edit Trunk\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'FAX.PAGE\' | translate}}:\', rowsPerPage: \'{{\'FAX.ROWSPERPAGE\' | translate}}:\', of: \'{{\'FAX.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.count}}"\n    md-on-paginate="vm.getTrunks" md-page-select></md-table-pagination>\n\x3c!-- / TRUNKS TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/help/views/about/about.html",'<div id="maintenance" class="flex-scrollable" layout="column" ms-scroll>\n    <div id="maintenance-form-wrapper" layout="column" layout-align="center center">\n        <div id="maintenance-form" class="md-whiteframe-8dp">\n            <div>\n                <img src="/api/settings/1/logo_login" alt="logo_login" />\n            </div>\n\n            <br>\n\n            <div>\n                <div class="info-line">\n                    <div class="title">Useful pages</div>\n                </div>\n                <section layout="row" flex layout-sm="column" layout-align="center center" layout-wrap>\n                    <div layout="column" flex="25" layout-align="center center">\n                        <a class="md-fab md-mini md-button grey-bg" href="https://wiki.xcallymotion.com/display/XMV" target="_blank">\n                            <md-icon md-font-icon="icon-wikipedia"></md-icon>\n                        </a>\n                        <div class="info"><a href="https://wiki.xcallymotion.com/display/XMV" target="_blank">Wiki</a></div>\n                    </div>\n\n                    <div layout="column" flex="25" layout-align="center center">\n                        <a class="md-fab md-mini md-button md-accent" href="/apidoc" target="_blank">\n                            <md-icon md-font-icon="icon-apple-mobileme"></md-icon>\n                        </a>\n                        <div class="info"><a href="/apidoc" target="_blank">Motion API</a></div>\n                    </div>\n\n                    <div layout="column" flex="25" layout-align="center center">\n                        <a class="md-fab md-mini md-button orange-bg" href="http://www.xcally.com/bar/phonebar/Setup.msi" target="_blank">\n                            <md-icon md-font-icon="icon-headphones"></md-icon>\n                        </a>\n                        <div class="info"><a href="http://www.xcally.com/bar/phonebar/Setup.msi" target="_blank">Phonebar Download</a></div>\n                    </div>\n\n                    <div layout="column" flex="25" layout-align="center center">\n                        <a class="md-fab md-mini md-button green-bg" href="/demo" target="_blank">\n                            <md-icon md-font-icon="icon-console"></md-icon>\n                        </a>\n                        <div class="info"><a href="/demo" target="_blank">Playground</a></div>\n                    </div>\n\n                </section>\n\n                <br>\n\n                <div class="info-line" ng-if="!vm.license.custom">\n                    <div class="title">Follow us on</div>\n                </div>\n                <section ng-if="!vm.license.custom" layout="row" layout-sm="column" layout-align="center center" layout-wrap>\n                    <a class="md-fab md-mini md-button blue-900-bg" href="https://www.facebook.com/xcallymotion" target="_blank">\n                        <md-icon md-font-icon="icon-facebook"></md-icon>\n                    </a>\n\n                    <a class="md-fab md-mini md-button" href="https://twitter.com/xcallymotion" target="_blank">\n                        <md-icon md-font-icon="icon-twitter"></md-icon>\n                    </a>\n                    <a class="md-fab md-mini md-button md-warn" href="https://plus.google.com/+Xcally" target="_blank">\n                        <md-icon md-font-icon="icon-google-plus"></md-icon>\n                    </a>\n                    <a class="md-fab md-mini md-button light-blue-800-bg" href="https://www.linkedin.com/company/xcally" target="_blank">\n                        <md-icon md-font-icon="icon-linkedin"></md-icon>\n                    </a>\n                </section>\n\n                <br ng-if="!vm.license.custom">\n\n                <div class="info-line" ng-if="!vm.license.custom">\n                    <div class="title" translate="HELP.CONTACT_US">Contact Us</div>\n                </div>\n                <div class="info-line" ng-if="!vm.license.custom">\n                    <div class="info"><a href="mailto:support@xcally.com" target="_top">support@xcally.com</a></div>\n                </div>\n\n                <br ng-if="!vm.license.custom">\n\n                <div class="info">xCALLY Motion <u>{{vm.info.current}}</u> | <a href="https://wiki.xcallymotion.com/display/XMV/Motion+GUI#MotionGUI-Version{{vm.info.current}}" target="_blank">Changelog</a></div>\n\n                <br>\n\n                <div class="info" ng-if="!vm.license.custom">xCALLY© 2016 - 2018 | Powered by Xenialab | <a href="http://www.xcally.com/support/eula-xcally-license-en.pdf" target="_blank">EULA</a></div>\n\n                <br ng-if="!vm.license.custom">\n\n                <div class="info" ng-if="!vm.license.custom"><a href="https://www.xenialab.com/" target="_blank">www.xenialab.com</a> | <a href="https://www.xcallymotion.com/" target="_blank">www.xcallymotion.com</a></div>\n            </div>\n        </div>\n    </div>\n</div>'),e.put("app/main/apps/integrations/views/deskAccounts/create/dialog.html",'<md-dialog class="deskAccount-dialog" aria-label="New DeskAccount">\n    <form name="deskAccountForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.deskAccount.name" ng-required="true" autofocus>\n                <div ng-messages="deskAccountForm[\'name\'].$error" ng-show="deskAccountForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.deskAccount.type" required>\n\n                    <md-option ng-value="\'integrationTab\'"> {{ \'INTEGRATIONS.INTEGRATION_TAB\' | translate }}</md-option>\n\n                    <md-option ng-value="\'newTab\'"> {{ \'INTEGRATIONS.NEW_TAB\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="deskAccountForm[\'type\'].$error" ng-show="deskAccountForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.URI">Uri</label>\n                <input type="url" name="remoteUri" ng-model="vm.deskAccount.remoteUri" ng-required="true">\n                <div ng-messages="deskAccountForm[\'remoteUri\'].$error" ng-show="deskAccountForm[\'remoteUri\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED">Uri field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL">Uri must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.AUTHTYPE">AuthType</label>\n                <md-select name="authType" ng-model="vm.deskAccount.authType" required>\n                    <md-option ng-value="\'basic\'">Basic</md-option>\n                </md-select>\n                <div ng-messages="deskAccountForm[\'authType\'].$error" ng-show="deskAccountForm[\'authType\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.AUTHTYPE_REQUIRED">AuthType field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.deskAccount.authType == \'basic\'" class="md-block">\n                <label translate="INTEGRATIONS.USERNAME">Username</label>\n                <input type="text" name="username" ng-model="vm.deskAccount.username" ng-required="true">\n                <div ng-messages="deskAccountForm[\'username\'].$error" ng-show="deskAccountForm[\'username\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.deskAccount.authType == \'basic\'">\n                <label translate="INTEGRATIONS.PASSWORD">Password</label>\n                <input type="password" name="password" ng-model="vm.deskAccount.password" placeholder="Password" translate translate-attr-placeholder="INTEGRATIONS.PASSWORD" required>\n                <div ng-messages="deskAccountForm[\'password\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                <input type="url" name="serverUrl" ng-model="vm.deskAccount.serverUrl">\n                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                <div ng-messages="deskAccountForm[\'serverUrl\'].$error" ng-show="deskAccountForm[\'serverUrl\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.deskAccount.description">\n                <div ng-messages="deskAccountForm[\'description\'].$error" ng-show="deskAccountForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newDeskAccount" ng-click="vm.saveDeskAccount()" class="send-button md-accent md-raised" ng-disabled="deskAccountForm.$invalid || deskAccountForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newDeskAccount" ng-click="vm.addNewDeskAccount()" class="send-button md-accent md-raised" ng-disabled="deskAccountForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_DESKACCOUNT" translate-attr-aria-label="INTEGRATIONS.ADD_DESKACCOUNT">\n                    ADD DESKACCOUNT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newDeskAccount" ng-click="vm.deleteDeskAccount($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/deskAccounts/deskAccounts.html",'<div id="deskAccounts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-heart" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="INTEGRATIONS.DESKACCOUNTS">DeskAccounts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="INTEGRATIONS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedDeskAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedDeskAccounts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="INTEGRATIONS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-deskAccounts-count">\n                    <span>{{vm.selectedDeskAccounts.length}}</span>\n                <span translate="INTEGRATIONS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="DESKACCOUNTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllDeskAccounts()" translate="INTEGRATIONS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectDeskAccounts()" translate="INTEGRATIONS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedDeskAccounts" csv-label="true" filename="deskAccounts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedDeskAccounts($event)" aria-label="delete selected" translate translate-attr-label="DESKACCOUNTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- DESKACCOUNT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedDeskAccounts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getDeskAccounts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'INTEGRATIONS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="remoteUri">{{ \'INTEGRATIONS.URI\' | translate }}</th>\n                                <th md-column md-order-by="username">{{ \'INTEGRATIONS.USERNAME\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.deskAccounts.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="INTEGRATIONS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="deskAccount" md-select-id="id" ng-repeat="deskAccount in vm.deskAccounts.rows">\n                                <td md-cell ng-if="deskAccount.userpic"><img class="avatar" alt="{{deskAccount.name}}" ng-src="api/users/{{deskAccount.id}}/avatar" /></td>\n                                <td md-cell ng-if="!deskAccount.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{deskAccount.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditDeskAccount($event, deskAccount)" md-cell class="id ">{{deskAccount.id}}</td>\n                                <td ng-click="vm.createOrEditDeskAccount($event, deskAccount)" md-cell class="name ">{{deskAccount.name}}</td>\n                                <td ng-click="vm.createOrEditDeskAccount($event, deskAccount)" md-cell class="remoteUri ">{{deskAccount.remoteUri}}</td>\n                                <td ng-click="vm.createOrEditDeskAccount($event, deskAccount)" md-cell class="username ">{{deskAccount.username}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(deskAccount, $event)" translate="INTEGRATIONS.EDIT_DESKACCOUNT">\n                                                    Edit DeskAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.testtestintegrationaccount(deskAccount, $event)" translate="INTEGRATIONS.TEST_DESKACCOUNT">\n                                                    Test DeskAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(deskAccount, $event)" translate="INTEGRATIONS.DELETE_DESKACCOUNT">\n                                                    Delete DeskAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'INTEGRATIONS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'INTEGRATIONS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'INTEGRATIONS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.deskAccounts.count}}" md-on-paginate="vm.getDeskAccounts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / DESKACCOUNT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD DESKACCOUNT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-deskAccount-button" ng-click="vm.createOrEditDeskAccount($event)" aria-label="add deskAccount" translate translate-attr-aria-label="INTEGRATIONS.ADD_DESKACCOUNT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD DESKACCOUNT BUTTON --\x3e\n</div>'),e.put("app/main/apps/integrations/views/deskAccounts/edit/configurations/dialog.html",'<md-dialog class="deskConfiguration-dialog" aria-label="New DeskConfiguration">\n    <form name="deskConfigurationForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.deskConfiguration.name" ng-required="true" autofocus>\n                <div ng-messages="deskConfigurationForm[\'name\'].$error" ng-show="deskConfigurationForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.CHANNEL">Channel</label>\n                <md-select name="channel" ng-model="vm.deskConfiguration.channel" required>\n\n                    <md-option ng-value="\'voice\'"> {{ \'INTEGRATIONS.VOICE\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="deskConfigurationForm[\'channel\'].$error" ng-show="deskConfigurationForm[\'channel\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.CHANNEL_REQUIRED">Channel field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.deskConfiguration.type" required>\n\n                    <md-option ng-value="\'inbound\'"> {{ \'INTEGRATIONS.INBOUND_IN_QUEUE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'outbound\'"> {{ \'INTEGRATIONS.OUTBOUND_CALL\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="deskConfigurationForm[\'type\'].$error" ng-show="deskConfigurationForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newDeskConfiguration" ng-click="vm.saveDeskConfiguration()" class="send-button md-accent md-raised" ng-disabled="deskConfigurationForm.$invalid || deskConfigurationForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE"\n                    translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newDeskConfiguration" ng-click="vm.addNewDeskConfiguration()" class="send-button md-accent md-raised" ng-disabled="deskConfigurationForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_DESKCONFIGURATION" translate-attr-aria-label="INTEGRATIONS.ADD_DESKCONFIGURATION">\n                    ADD DESKCONFIGURATION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newDeskConfiguration" ng-click="vm.deleteDeskConfiguration($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/deskAccounts/edit/item/dialog.html",'<md-dialog class="deskAccount-item-dialog" aria-label="New Item">\n    <form name="deskAccountItemForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <div ng-switch="vm.type">\n                <div ng-switch-when="subject">\n                    \x3c!-- SUBJECT SECTION --\x3e\n                    <div ng-include="\'/subject.html\'"></div>\n                    \x3c!-- / SUBJECT SECTION --\x3e\n                </div>\n                <div ng-switch-when="description">\n                    \x3c!-- DESCRIPTION SECTION --\x3e\n                    <md-input-container class="md-block">\n                        <label translate="INTEGRATIONS.TYPE">Type</label>\n                        <md-select name="type" ng-model="vm.item.type" required>\n                            <md-option value="string">String</md-option>\n                            <md-option value="keyValue">Key Value</md-option>\n                        </md-select>\n                        <div ng-messages="deskAccountItemForm.type.$error" ng-show="deskAccountItemForm.type.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n                        <label translate="INTEGRATIONS.CONTENT">Content</label>\n                        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n                        <div ng-messages="deskAccountItemForm.content.$error" ng-show="deskAccountItemForm.content.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <div ng-if="vm.item.type == \'keyValue\'">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.KEY">Key</label>\n                            <input type="text" name="key" ng-model="vm.item.key" required md-autofocus>\n                            <div ng-messages="deskAccountItemForm.key.$error" ng-show="deskAccountItemForm.key.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.KEY_REQUIRED">Key field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.TYPE">Type</label>\n                            <md-select name="keyType" ng-model="vm.item.keyType" required>\n                                <md-option value="string">String</md-option>\n                                <md-option value="variable">Variable</md-option>\n                                <md-option value="customVariable">Custom Variable</md-option>\n                            </md-select>\n                            <div ng-messages="deskAccountItemForm.keyType.$error" ng-show="deskAccountItemForm.keyType.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'string\'">\n                            <label translate="INTEGRATIONS.CONTENT">Content</label>\n                            <input type="text" name="keyContent" ng-model="vm.item.keyContent" required md-autofocus>\n                            <div ng-messages="deskAccountItemForm.keyContent.$error" ng-show="deskAccountItemForm.keyContent.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'variable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n                                <md-optgroup label="Voice: Queue">\n                                    <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Voice: Outbound">\n                                    <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="deskAccountItemForm.variableName.$error" ng-show="deskAccountItemForm.variableName.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'customVariable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select ng-model="vm.item.VariableId" required>\n                                <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n                            </md-select>\n                        </md-input-container>\n                    </div>\n                    \x3c!-- / DESCRIPTION SECTION --\x3e\n                </div>\n                <div ng-switch-when="field">\n                    \x3c!-- FIELD SECTION --\x3e\n                    <div ng-if="vm.accountConnected">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.FIELD">FIELD</label>\n                            <md-select name="customField" ng-model="vm.customField" required>\n                                <md-optgroup label="Standard">\n                                    <md-option ng-value="standard" ng-repeat="standard in vm.fields | filter: {custom: false} ">{{standard.name}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Custom">\n                                    <md-option ng-value="custom" ng-repeat="custom in vm.fields | filter: {custom: true} ">{{custom.name}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="deskAccountItemForm.customField.$error" ng-show="deskAccountItemForm.customField.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.FIELD_REQUIRED">Field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- CUSTOM FIELD --\x3e\n                        <div ng-if="vm.customField && vm.customField.custom" ng-include="\'/subject.html\'"></div>\n                        \x3c!-- / CUSTOM FIELD --\x3e\n                        \x3c!-- STANDARD FIELD --\x3e\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="option" ng-model="vm.item.content" required>\n                                <md-option ng-value="option.value" ng-repeat="option in vm.customField.options">{{option.name}}</md-option>\n                            </md-select>\n                            <div ng-messages="deskAccountItemForm.option.$error" ng-show="deskAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && !vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <input type="text" name="option" ng-model="vm.item.content" required>\n                            <div ng-messages="deskAccountItemForm.option.$error" ng-show="deskAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- / STANDARD FIELD --\x3e\n                    </div>\n                    <div ng-if="!vm.accountConnected">\n                        <p>Account is not connected. Please check your configurations!</p>\n                    </div>\n                    \x3c!-- / FIELD SECTION --\x3e\n                </div>\n                <div ng-switch-default>\n                    <p>No Item</p>\n                </div>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newItem" ng-click="vm.saveItem()" class="send-button md-accent md-raised" ng-disabled="deskAccountItemForm.$invalid || deskAccountItemForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newItem" ng-click="vm.addNewItem()" class="send-button md-accent md-raised" ng-disabled="deskAccountItemForm.$invalid || deskAccountItemForm.$pristine" aria-label="ADD" translate="INTEGRATIONS.ADD" translate-attr-aria-label="INTEGRATIONS.ADD">\n                    ADD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newItem" ng-click="vm.deleteItem($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>\n\n<script type="text/ng-template" id="/subject.html">\n    <md-input-container class="md-block">\n        <label translate="INTEGRATIONS.TYPE">Type</label>\n        <md-select name="type" ng-model="vm.item.type" required>\n            <md-option value="string">String</md-option>\n            <md-option value="variable">Variable</md-option>\n            <md-option value="customVariable">Custom Variable</md-option>\n        </md-select>\n        <div ng-messages="deskAccountItemForm.type.$error" ng-show="deskAccountItemForm.type.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n        <label translate="INTEGRATIONS.CONTENT">Content</label>\n        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n        <div ng-messages="deskAccountItemForm.content.$error" ng-show="deskAccountItemForm.content.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'variable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n            <md-optgroup label="Voice: Queue">\n                <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n            </md-optgroup>\n            <md-optgroup label="Voice: Outbound">\n                <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n            </md-optgroup>\n        </md-select>\n        <div ng-messages="deskAccountItemForm.variableName.$error" ng-show="deskAccountItemForm.variableName.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'customVariable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select ng-model="vm.item.VariableId" required>\n            <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n        </md-select>\n    </md-input-container>\n<\/script>'),e.put("app/main/apps/integrations/views/deskAccounts/edit/view.html",'<div id="integrations-deskAccount" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-deskAccounts-button md-icon-button" aria-label="Go to deskAccounts" ng-click="vm.gotoDeskAccounts()" translate translate-attr-aria-label="INTEGRATIONS.GO_TO_DESKACCOUNTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="deskAccount-image" hide-xs>\n                    <img ng-src="assets/images/business/deskAccounts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.deskAccount.id}}\n                        <span ng-if="vm.deskAccount.name">{{vm.deskAccount.name}}</span>\n                        <span ng-if="vm.deskAccount.exten">{{vm.deskAccount.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="INTEGRATIONS.CREATED_AT"></span> <span>{{vm.deskAccount.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveDeskAccount()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (configurationsForm.$invalid)" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.ACCOUNT">ACCOUNT</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="deskAccount-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.deskAccount.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.TYPE">Type</label>\n                                <md-select name="type" ng-model="vm.deskAccount.type" required>\n\n                                    <md-option ng-value="\'integrationTab\'"> {{ \'INTEGRATIONS.INTEGRATION_TAB\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'newTab\'"> {{ \'INTEGRATIONS.NEW_TAB\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'type\'].$error" ng-show="generalForm[\'type\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.URI">Uri</label>\n                                <input type="url" name="remoteUri" ng-model="vm.deskAccount.remoteUri" ng-required="true">\n                                <div ng-messages="generalForm[\'remoteUri\'].$error" ng-show="generalForm[\'remoteUri\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED">Uri field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL">Uri must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.AUTHTYPE">AuthType</label>\n                                <md-select name="authType" ng-model="vm.deskAccount.authType" required>\n                                    <md-option ng-value="\'basic\'">Basic</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'authType\'].$error" ng-show="generalForm[\'authType\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.AUTHTYPE_REQUIRED">AuthType field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.deskAccount.authType == \'basic\'" class="md-block">\n                                <label translate="INTEGRATIONS.USERNAME">Username</label>\n                                <input type="text" name="username" ng-model="vm.deskAccount.username" ng-required="true">\n                                <div ng-messages="generalForm[\'username\'].$error" ng-show="generalForm[\'username\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block" ng-if="vm.deskAccount.authType == \'basic\'">\n                                <label translate="INTEGRATIONS.PASSWORD">Password</label>\n                                <input type="password" name="password" ng-model="vm.deskAccount.password" placeholder="Password" translate translate-attr-placeholder="INTEGRATIONS.PASSWORD" required>\n                                <div ng-messages="generalForm[\'password\'].$error" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                                <input type="url" name="serverUrl" ng-model="vm.deskAccount.serverUrl">\n                                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                                <div ng-messages="generalForm[\'serverUrl\'].$error" ng-show="generalForm[\'serverUrl\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.deskAccount.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="deskAccount-detail-form-container configurations md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</div>\n                        </div>\n                        <div ng-controller="DeskAccountConfigurationsController as vm_cc" ng-init="vm_cc.init(vm.deskAccount)" layout="row">\n                            <md-card class="md-whiteframe-1dp" flex="30">\n                                <div layout="row" layout-align="center center">\n                                    <md-subheader flex="75" class="md-no-sticky">{{ \'INTEGRATIONS.CONFIGURATIONS\' | translate }}</md-subheader>\n                                    <md-button flex="25" ng-click="vm_cc.createOrEditDeskConfiguration($event)" class="md-icon-button" aria-label="create deskConfiguration">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                                <md-list>\n                                    <md-list-item layout="row" layout-align="center center" ng-repeat="deskConfiguration in vm_cc.configurations" class="border-top" md-colors="{background: (vm_cc.selectedDeskConfiguration == $index ? \'accent\' : \'grey-A100\')}" ng-click="vm_cc.getDeskConfiguration($index)">\n                                        <span class="text-truncate" flex="80">{{ deskConfiguration.name }}</span>\n                                        <md-menu ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_cc.deleteDeskConfiguration($event, deskConfiguration)" translate="INTEGRATIONS.DELETE_DESKCONFIGURATION">\n                                                        Delete DeskConfiguration\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </md-list-item>\n                                </md-list>\n                            </md-card>\n                            <div flex></div>\n                            <md-card class="md-whiteframe-1dp" flex="65">\n                                <md-tabs ng-if="vm_cc.configurations.length" md-dynamic-height>\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.SUBJECTS">SUBJECTS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.subject = query" on-collapse="vm_cc.query.subject = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditSubject($event)" aria-label="add subject" translate translate-attr-label="INTEGRATIONS.ADD_SUBJECT">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedSubjects.length}} {{vm_cc.selectedSubjects.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedSubjects($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedSubjects">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="subject" md-select-id="id" ng-repeat="subject in vm_cc.subjects | filter: vm_cc.query.subject">\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="id ">{{subject.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="type ">\n                                                                <span ng-if="subject.FieldId">{{subject.nameField || subject.idField}}</span>\n                                                                <span ng-if="!subject.FieldId">{{subject.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="subject.type" ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell>\n                                                                <span ng-switch-when="string">{{subject.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{subject.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{subject.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{subject.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditSubject($event, subject)" translate="INTEGRATIONS.EDIT_SUBJECT">\n                                                                                Edit Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteSubjectConfirm($event, subject)" translate="INTEGRATIONS.DELETE_SUBJECT">\n                                                                                Delete Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.DESCRIPTIONS">DESCRIPTIONS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.description = query" on-collapse="vm_cc.query.description = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditDescription($event)" aria-label="add description" translate translate-attr-label="INTEGRATIONS.ADD_DESCRIPTION">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedDescriptions.length}} {{vm_cc.selectedDescriptions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedDescriptions($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedDescriptions">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="description" md-select-id="id" ng-repeat="description in vm_cc.descriptions | filter: vm_cc.query.description">\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="id ">{{description.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="type ">\n                                                                <span ng-if="description.FieldId">{{description.nameField || description.idField}}</span>\n                                                                <span ng-if="!description.FieldId">{{description.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="description.type" ng-click="vm_cc.createOrEditDescription($event, description)" md-cell>\n                                                                <span ng-switch-when="string">{{description.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{description.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{description.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{description.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditDescription($event, description)" translate="INTEGRATIONS.EDIT_DESCRIPTION">\n                                                                                Edit Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteDescriptionConfirm($event, description)" translate="INTEGRATIONS.DELETE_DESCRIPTION">\n                                                                                Delete Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.FIELDS">FIELDS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.field = query" on-collapse="vm_cc.query.field = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditField($event)" aria-label="add field" translate translate-attr-label="INTEGRATIONS.ADD_FIELD">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedFields.length}} {{vm_cc.selectedFields.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedFields($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedFields">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="field" md-select-id="id" ng-repeat="field in vm_cc.fields | filter: vm_cc.query.field">\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="id ">{{field.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="type ">\n                                                                <span ng-if="field.FieldId">{{field.nameField || field.idField}}</span>\n                                                                <span ng-if="!field.FieldId">{{field.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="field.type" ng-click="vm_cc.createOrEditField($event, field)" md-cell>\n                                                                <span ng-switch-when="string">{{field.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{field.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{field.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{field.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditField($event, field)" translate="INTEGRATIONS.EDIT_FIELD">\n                                                                                Edit Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteFieldConfirm($event, field)" translate="INTEGRATIONS.DELETE_FIELD">\n                                                                                Delete Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.TAGS">TAGS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-table-container class="md-whiteframe-1dp padding-20">\n                                                <md-input-container class="md-block">\n                                                    <label translate="INTEGRATIONS.TAGS">Tags</label>\n                                                    <md-select ng-model="vm_cc.selectedTags" ng-change="vm_cc.selectTagsChanged($event)" multiple>\n                                                        <md-option ng-value="tag.id" ng-repeat="tag in vm_cc.tags">{{ tag.name }}</md-option>\n                                                    </md-select>\n                                                </md-input-container>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n                                </md-tabs>\n                                <div class="padding-20" ng-if="!vm_cc.configurations.length" ng-click="vm_cc.createOrEditDeskConfiguration($event)" layout="row" layout-sm="column" layout-align="center center" layout-wrap>\n                                    <div class="padding-20 md-whiteframe-3dp md-accent-bg" layout="column" layout-align="center center">\n                                        <md-button class="md-icon-button">\n                                            <md-icon md-font-icon="icon-plus"></md-icon>\n                                        </md-button>\n                                        <span aria-label="add configuration" translate translate-attr-label="INTEGRATIONS.ADD_CONFIGURATION">ADD CONFIGURATION</span>\n                                    </div>\n                                </div>\n                            </md-card>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/integrations/views/freshdeskAccounts/create/dialog.html",'<md-dialog class="freshdeskAccount-dialog" aria-label="New FreshdeskAccount">\n    <form name="freshdeskAccountForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.freshdeskAccount.name" ng-required="true" autofocus>\n                <div ng-messages="freshdeskAccountForm[\'name\'].$error" ng-show="freshdeskAccountForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.USERNAME">Username</label>\n                <input type="text" name="username" ng-model="vm.freshdeskAccount.username" ng-required="true">\n                <div ng-messages="freshdeskAccountForm[\'username\'].$error" ng-show="freshdeskAccountForm[\'username\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.URI">Uri</label>\n                <input type="url" name="remoteUri" ng-model="vm.freshdeskAccount.remoteUri" ng-required="true">\n                <div ng-messages="freshdeskAccountForm[\'remoteUri\'].$error" ng-show="freshdeskAccountForm[\'remoteUri\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED">Uri field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL">Uri must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.APIKEY">ApiKey</label>\n                <input type="text" name="apiKey" ng-model="vm.freshdeskAccount.apiKey" ng-required="true">\n                <div ng-messages="freshdeskAccountForm[\'apiKey\'].$error" ng-show="freshdeskAccountForm[\'apiKey\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.APIKEY_REQUIRED">ApiKey field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                <input type="url" name="serverUrl" ng-model="vm.freshdeskAccount.serverUrl">\n                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                <div ng-messages="freshdeskAccountForm[\'serverUrl\'].$error" ng-show="freshdeskAccountForm[\'serverUrl\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.freshdeskAccount.description">\n                <div ng-messages="freshdeskAccountForm[\'description\'].$error" ng-show="freshdeskAccountForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newFreshdeskAccount" ng-click="vm.saveFreshdeskAccount()" class="send-button md-accent md-raised" ng-disabled="freshdeskAccountForm.$invalid || freshdeskAccountForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE"\n                    translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newFreshdeskAccount" ng-click="vm.addNewFreshdeskAccount()" class="send-button md-accent md-raised" ng-disabled="freshdeskAccountForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_FRESHDESKACCOUNT" translate-attr-aria-label="INTEGRATIONS.ADD_FRESHDESKACCOUNT">\n                    ADD FRESHDESKACCOUNT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newFreshdeskAccount" ng-click="vm.deleteFreshdeskAccount($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/freshdeskAccounts/edit/configurations/dialog.html",'<md-dialog class="freshdeskConfiguration-dialog" aria-label="New FreshdeskConfiguration">\n    <form name="freshdeskConfigurationForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.freshdeskConfiguration.name" ng-required="true" autofocus>\n                <div ng-messages="freshdeskConfigurationForm[\'name\'].$error" ng-show="freshdeskConfigurationForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.CHANNEL">Channel</label>\n                <md-select name="channel" ng-model="vm.freshdeskConfiguration.channel" required>\n\n                    <md-option ng-value="\'voice\'"> {{ \'INTEGRATIONS.VOICE\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="freshdeskConfigurationForm[\'channel\'].$error" ng-show="freshdeskConfigurationForm[\'channel\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.CHANNEL_REQUIRED">Channel field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.freshdeskConfiguration.type" required>\n\n                    <md-option ng-value="\'inbound\'"> {{ \'INTEGRATIONS.INBOUND_IN_QUEUE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'outbound\'"> {{ \'INTEGRATIONS.OUTBOUND_CALL\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="freshdeskConfigurationForm[\'type\'].$error" ng-show="freshdeskConfigurationForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newFreshdeskConfiguration" ng-click="vm.saveFreshdeskConfiguration()" class="send-button md-accent md-raised" ng-disabled="freshdeskConfigurationForm.$invalid || freshdeskConfigurationForm.$pristine" aria-label="SAVE"\n                    translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newFreshdeskConfiguration" ng-click="vm.addNewFreshdeskConfiguration()" class="send-button md-accent md-raised" ng-disabled="freshdeskConfigurationForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_FRESHDESKCONFIGURATION"\n                    translate-attr-aria-label="INTEGRATIONS.ADD_FRESHDESKCONFIGURATION">\n                    ADD FRESHDESKCONFIGURATION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newFreshdeskConfiguration" ng-click="vm.deleteFreshdeskConfiguration($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/freshdeskAccounts/edit/item/dialog.html",'<md-dialog class="freshdeskAccount-item-dialog" aria-label="New Item">\n    <form name="freshdeskAccountItemForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <div ng-switch="vm.type">\n                <div ng-switch-when="subject">\n                    \x3c!-- SUBJECT SECTION --\x3e\n                    <div ng-include="\'/subject.html\'"></div>\n                    \x3c!-- / SUBJECT SECTION --\x3e\n                </div>\n                <div ng-switch-when="description">\n                    \x3c!-- DESCRIPTION SECTION --\x3e\n                    <md-input-container class="md-block">\n                        <label translate="INTEGRATIONS.TYPE">Type</label>\n                        <md-select name="type" ng-model="vm.item.type" required>\n                            <md-option value="string">String</md-option>\n                            <md-option value="keyValue">Key Value</md-option>\n                        </md-select>\n                        <div ng-messages="freshdeskAccountItemForm.type.$error" ng-show="freshdeskAccountItemForm.type.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n                        <label translate="INTEGRATIONS.CONTENT">Content</label>\n                        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n                        <div ng-messages="freshdeskAccountItemForm.content.$error" ng-show="freshdeskAccountItemForm.content.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <div ng-if="vm.item.type == \'keyValue\'">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.KEY">Key</label>\n                            <input type="text" name="key" ng-model="vm.item.key" required md-autofocus>\n                            <div ng-messages="freshdeskAccountItemForm.key.$error" ng-show="freshdeskAccountItemForm.key.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.KEY_REQUIRED">Key field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.TYPE">Type</label>\n                            <md-select name="keyType" ng-model="vm.item.keyType" required>\n                                <md-option value="string">String</md-option>\n                                <md-option value="variable">Variable</md-option>\n                                <md-option value="customVariable">Custom Variable</md-option>\n                            </md-select>\n                            <div ng-messages="freshdeskAccountItemForm.keyType.$error" ng-show="freshdeskAccountItemForm.keyType.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'string\'">\n                            <label translate="INTEGRATIONS.CONTENT">Content</label>\n                            <input type="text" name="keyContent" ng-model="vm.item.keyContent" required md-autofocus>\n                            <div ng-messages="freshdeskAccountItemForm.keyContent.$error" ng-show="freshdeskAccountItemForm.keyContent.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'variable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n                                <md-optgroup label="Voice: Queue">\n                                    <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Voice: Outbound">\n                                    <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="freshdeskAccountItemForm.variableName.$error" ng-show="freshdeskAccountItemForm.variableName.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'customVariable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select ng-model="vm.item.VariableId" required>\n                                <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n                            </md-select>\n                        </md-input-container>\n                    </div>\n                    \x3c!-- / DESCRIPTION SECTION --\x3e\n                </div>\n                <div ng-switch-when="field">\n                    \x3c!-- FIELD SECTION --\x3e\n                    <div ng-if="vm.accountConnected">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.FIELD">FIELD</label>\n                            <md-select name="customField" ng-model="vm.customField" required>\n                                <md-optgroup label="Standard">\n                                    <md-option ng-value="standard" ng-repeat="standard in vm.fields | filter: {custom: false} ">{{standard.name}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Custom">\n                                    <md-option ng-value="custom" ng-repeat="custom in vm.fields | filter: {custom: true} ">{{custom.name}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="freshdeskAccountItemForm.customField.$error" ng-show="freshdeskAccountItemForm.customField.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.FIELD_REQUIRED">Field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- CUSTOM FIELD --\x3e\n                        <div ng-if="vm.customField && vm.customField.custom" ng-include="\'/subject.html\'"></div>\n                        \x3c!-- / CUSTOM FIELD --\x3e\n                        \x3c!-- STANDARD FIELD --\x3e\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="option" ng-model="vm.item.content" required>\n                                <md-option ng-value="option.value" ng-repeat="option in vm.customField.options">{{option.name}}</md-option>\n                            </md-select>\n                            <div ng-messages="freshdeskAccountItemForm.option.$error" ng-show="freshdeskAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && !vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <input type="text" name="option" ng-model="vm.item.content" required>\n                            <div ng-messages="freshdeskAccountItemForm.option.$error" ng-show="freshdeskAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- / STANDARD FIELD --\x3e\n                    </div>\n                    <div ng-if="!vm.accountConnected">\n                        <p>Account is not connected. Please check your configurations!</p>\n                    </div>\n                    \x3c!-- / FIELD SECTION --\x3e\n                </div>\n                <div ng-switch-default>\n                    <p>No Item</p>\n                </div>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newItem" ng-click="vm.saveItem()" class="send-button md-accent md-raised" ng-disabled="freshdeskAccountItemForm.$invalid || freshdeskAccountItemForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newItem" ng-click="vm.addNewItem()" class="send-button md-accent md-raised" ng-disabled="freshdeskAccountItemForm.$invalid || freshdeskAccountItemForm.$pristine" aria-label="ADD" translate="INTEGRATIONS.ADD" translate-attr-aria-label="INTEGRATIONS.ADD">\n                    ADD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newItem" ng-click="vm.deleteItem($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>\n\n<script type="text/ng-template" id="/subject.html">\n    <md-input-container class="md-block">\n        <label translate="INTEGRATIONS.TYPE">Type</label>\n        <md-select name="type" ng-model="vm.item.type" required>\n            <md-option value="string">String</md-option>\n            <md-option value="variable">Variable</md-option>\n            <md-option value="customVariable">Custom Variable</md-option>\n        </md-select>\n        <div ng-messages="freshdeskAccountItemForm.type.$error" ng-show="freshdeskAccountItemForm.type.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n        <label translate="INTEGRATIONS.CONTENT">Content</label>\n        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n        <div ng-messages="freshdeskAccountItemForm.content.$error" ng-show="freshdeskAccountItemForm.content.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'variable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n            <md-optgroup label="Voice: Queue">\n                <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n            </md-optgroup>\n            <md-optgroup label="Voice: Outbound">\n                <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n            </md-optgroup>\n        </md-select>\n        <div ng-messages="freshdeskAccountItemForm.variableName.$error" ng-show="freshdeskAccountItemForm.variableName.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'customVariable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select ng-model="vm.item.VariableId" required>\n            <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n        </md-select>\n    </md-input-container>\n<\/script>'),e.put("app/main/apps/integrations/views/freshdeskAccounts/edit/view.html",'<div id="integrations-freshdeskAccount" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-freshdeskAccounts-button md-icon-button" aria-label="Go to freshdeskAccounts" ng-click="vm.gotoFreshdeskAccounts()" translate translate-attr-aria-label="INTEGRATIONS.GO_TO_FRESHDESKACCOUNTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="freshdeskAccount-image" hide-xs>\n                    <img ng-src="assets/images/business/freshdeskAccounts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.freshdeskAccount.id}}\n                        <span ng-if="vm.freshdeskAccount.name">{{vm.freshdeskAccount.name}}</span>\n                        <span ng-if="vm.freshdeskAccount.exten">{{vm.freshdeskAccount.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="INTEGRATIONS.CREATED_AT"></span> <span>{{vm.freshdeskAccount.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveFreshdeskAccount()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (configurationsForm.$invalid)" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.ACCOUNT">ACCOUNT</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="freshdeskAccount-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.freshdeskAccount.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.USERNAME">Username</label>\n                                <input type="text" name="username" ng-model="vm.freshdeskAccount.username" ng-required="true">\n                                <div ng-messages="generalForm[\'username\'].$error" ng-show="generalForm[\'username\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.URI">Uri</label>\n                                <input type="url" name="remoteUri" ng-model="vm.freshdeskAccount.remoteUri" ng-required="true">\n                                <div ng-messages="generalForm[\'remoteUri\'].$error" ng-show="generalForm[\'remoteUri\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED">Uri field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL">Uri must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.APIKEY">ApiKey</label>\n                                <input type="text" name="apiKey" ng-model="vm.freshdeskAccount.apiKey" ng-required="true">\n                                <div ng-messages="generalForm[\'apiKey\'].$error" ng-show="generalForm[\'apiKey\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.APIKEY_REQUIRED">ApiKey field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                                <input type="url" name="serverUrl" ng-model="vm.freshdeskAccount.serverUrl">\n                                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                                <div ng-messages="generalForm[\'serverUrl\'].$error" ng-show="generalForm[\'serverUrl\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.freshdeskAccount.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="freshdeskAccount-detail-form-container configurations md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</div>\n                        </div>\n                        <div ng-controller="FreshdeskAccountConfigurationsController as vm_cc" ng-init="vm_cc.init(vm.freshdeskAccount)" layout="row">\n                            <md-card class="md-whiteframe-1dp" flex="30">\n                                <div layout="row" layout-align="center center">\n                                    <md-subheader flex="75" class="md-no-sticky">{{ \'INTEGRATIONS.CONFIGURATIONS\' | translate }}</md-subheader>\n                                    <md-button flex="25" ng-click="vm_cc.createOrEditFreshdeskConfiguration($event)" class="md-icon-button" aria-label="create freshdeskConfiguration">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                                <md-list>\n                                    <md-list-item layout="row" layout-align="center center" ng-repeat="freshdeskConfiguration in vm_cc.configurations" class="border-top" md-colors="{background: (vm_cc.selectedFreshdeskConfiguration == $index ? \'accent\' : \'grey-A100\')}" ng-click="vm_cc.getFreshdeskConfiguration($index)">\n                                        <span class="text-truncate" flex="80">{{ freshdeskConfiguration.name }}</span>\n                                        <md-menu ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_cc.deleteFreshdeskConfiguration($event, freshdeskConfiguration)" translate="INTEGRATIONS.DELETE_FRESHDESKCONFIGURATION">\n                                                        Delete FreshdeskConfiguration\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </md-list-item>\n                                </md-list>\n                            </md-card>\n                            <div flex></div>\n                            <md-card class="md-whiteframe-1dp" flex="65">\n                                <md-tabs ng-if="vm_cc.configurations.length" md-dynamic-height>\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.SUBJECTS">SUBJECTS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.subject = query" on-collapse="vm_cc.query.subject = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditSubject($event)" aria-label="add subject" translate translate-attr-label="INTEGRATIONS.ADD_SUBJECT">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedSubjects.length}} {{vm_cc.selectedSubjects.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedSubjects($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedSubjects">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="subject" md-select-id="id" ng-repeat="subject in vm_cc.subjects | filter: vm_cc.query.subject">\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="id ">{{subject.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="type ">\n                                                                <span ng-if="subject.FieldId">{{subject.nameField || subject.idField}}</span>\n                                                                <span ng-if="!subject.FieldId">{{subject.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="subject.type" ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell>\n                                                                <span ng-switch-when="string">{{subject.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{subject.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{subject.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{subject.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditSubject($event, subject)" translate="INTEGRATIONS.EDIT_SUBJECT">\n                                                                                Edit Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteSubjectConfirm($event, subject)" translate="INTEGRATIONS.DELETE_SUBJECT">\n                                                                                Delete Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.DESCRIPTIONS">DESCRIPTIONS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.description = query" on-collapse="vm_cc.query.description = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditDescription($event)" aria-label="add description" translate translate-attr-label="INTEGRATIONS.ADD_DESCRIPTION">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedDescriptions.length}} {{vm_cc.selectedDescriptions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedDescriptions($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedDescriptions">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="description" md-select-id="id" ng-repeat="description in vm_cc.descriptions | filter: vm_cc.query.description">\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="id ">{{description.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="type ">\n                                                                <span ng-if="description.FieldId">{{description.nameField || description.idField}}</span>\n                                                                <span ng-if="!description.FieldId">{{description.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="description.type" ng-click="vm_cc.createOrEditDescription($event, description)" md-cell>\n                                                                <span ng-switch-when="string">{{description.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{description.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{description.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{description.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditDescription($event, description)" translate="INTEGRATIONS.EDIT_DESCRIPTION">\n                                                                                Edit Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteDescriptionConfirm($event, description)" translate="INTEGRATIONS.DELETE_DESCRIPTION">\n                                                                                Delete Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.FIELDS">FIELDS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.field = query" on-collapse="vm_cc.query.field = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditField($event)" aria-label="add field" translate translate-attr-label="INTEGRATIONS.ADD_FIELD">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedFields.length}} {{vm_cc.selectedFields.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedFields($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedFields">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="field" md-select-id="id" ng-repeat="field in vm_cc.fields | filter: vm_cc.query.field">\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="id ">{{field.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="type ">\n                                                                <span ng-if="field.FieldId">{{field.nameField || field.idField}}</span>\n                                                                <span ng-if="!field.FieldId">{{field.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="field.type" ng-click="vm_cc.createOrEditField($event, field)" md-cell>\n                                                                <span ng-switch-when="string">{{field.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{field.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{field.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{field.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditField($event, field)" translate="INTEGRATIONS.EDIT_FIELD">\n                                                                                Edit Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteFieldConfirm($event, field)" translate="INTEGRATIONS.DELETE_FIELD">\n                                                                                Delete Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.TAGS">TAGS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-table-container class="md-whiteframe-1dp padding-20">\n                                                <md-input-container class="md-block">\n                                                    <label translate="INTEGRATIONS.TAGS">Tags</label>\n                                                    <md-select ng-model="vm_cc.selectedTags" ng-change="vm_cc.selectTagsChanged($event)" multiple>\n                                                        <md-option ng-value="tag.id" ng-repeat="tag in vm_cc.tags">{{ tag.name }}</md-option>\n                                                    </md-select>\n                                                </md-input-container>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n                                </md-tabs>\n                                <div class="padding-20" ng-if="!vm_cc.configurations.length" ng-click="vm_cc.createOrEditFreshdeskConfiguration($event)" layout="row" layout-sm="column" layout-align="center center" layout-wrap>\n                                    <div class="padding-20 md-whiteframe-3dp md-accent-bg" layout="column" layout-align="center center">\n                                        <md-button class="md-icon-button">\n                                            <md-icon md-font-icon="icon-plus"></md-icon>\n                                        </md-button>\n                                        <span aria-label="add configuration" translate translate-attr-label="INTEGRATIONS.ADD_CONFIGURATION">ADD CONFIGURATION</span>\n                                    </div>\n                                </div>\n                            </md-card>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/integrations/views/freshdeskAccounts/freshdeskAccounts.html",'<div id="freshdeskAccounts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-heart" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="INTEGRATIONS.FRESHDESKACCOUNTS">FreshdeskAccounts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="INTEGRATIONS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedFreshdeskAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedFreshdeskAccounts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="INTEGRATIONS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-freshdeskAccounts-count">\n                    <span>{{vm.selectedFreshdeskAccounts.length}}</span>\n                <span translate="INTEGRATIONS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="FRESHDESKACCOUNTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllFreshdeskAccounts()" translate="INTEGRATIONS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectFreshdeskAccounts()" translate="INTEGRATIONS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedFreshdeskAccounts" csv-label="true" filename="freshdeskAccounts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedFreshdeskAccounts($event)" aria-label="delete selected" translate translate-attr-label="FRESHDESKACCOUNTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- FRESHDESKACCOUNT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedFreshdeskAccounts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getFreshdeskAccounts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'INTEGRATIONS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="username">{{ \'INTEGRATIONS.USERNAME\' | translate }}</th>\n                                <th md-column md-order-by="remoteUri">{{ \'INTEGRATIONS.URI\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.freshdeskAccounts.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="INTEGRATIONS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="freshdeskAccount" md-select-id="id" ng-repeat="freshdeskAccount in vm.freshdeskAccounts.rows">\n                                <td md-cell ng-if="freshdeskAccount.userpic"><img class="avatar" alt="{{freshdeskAccount.name}}" ng-src="api/users/{{freshdeskAccount.id}}/avatar" /></td>\n                                <td md-cell ng-if="!freshdeskAccount.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{freshdeskAccount.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditFreshdeskAccount($event, freshdeskAccount)" md-cell class="id ">{{freshdeskAccount.id}}</td>\n                                <td ng-click="vm.createOrEditFreshdeskAccount($event, freshdeskAccount)" md-cell class="name ">{{freshdeskAccount.name}}</td>\n                                <td ng-click="vm.createOrEditFreshdeskAccount($event, freshdeskAccount)" md-cell class="username ">{{freshdeskAccount.username}}</td>\n                                <td ng-click="vm.createOrEditFreshdeskAccount($event, freshdeskAccount)" md-cell class="remoteUri ">{{freshdeskAccount.remoteUri}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(freshdeskAccount, $event)" translate="INTEGRATIONS.EDIT_FRESHDESKACCOUNT">\n                                                    Edit FreshdeskAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.testtestintegrationaccount(freshdeskAccount, $event)" translate="INTEGRATIONS.TEST_FRESHDESKACCOUNT">\n                                                    Test FreshdeskAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(freshdeskAccount, $event)" translate="INTEGRATIONS.DELETE_FRESHDESKACCOUNT">\n                                                    Delete FreshdeskAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'INTEGRATIONS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'INTEGRATIONS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'INTEGRATIONS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.freshdeskAccounts.count}}" md-on-paginate="vm.getFreshdeskAccounts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / FRESHDESKACCOUNT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD FRESHDESKACCOUNT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-freshdeskAccount-button" ng-click="vm.createOrEditFreshdeskAccount($event)" aria-label="add freshdeskAccount" translate translate-attr-aria-label="INTEGRATIONS.ADD_FRESHDESKACCOUNT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD FRESHDESKACCOUNT BUTTON --\x3e\n</div>'),e.put("app/main/apps/integrations/views/salesforceAccounts/create/dialog.html",'<md-dialog class="salesforceAccount-dialog" aria-label="New SalesforceAccount">\n    <form name="salesforceAccountForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.salesforceAccount.name" ng-required="true" autofocus>\n                <div ng-messages="salesforceAccountForm[\'name\'].$error" ng-show="salesforceAccountForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.salesforceAccount.type" required>\n\n                    <md-option ng-value="\'integrationTab\'"> {{ \'INTEGRATIONS.INTEGRATION_TAB\' | translate }}</md-option>\n\n                    <md-option ng-value="\'newTab\'"> {{ \'INTEGRATIONS.NEW_TAB\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="salesforceAccountForm[\'type\'].$error" ng-show="salesforceAccountForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.USERNAME">Username</label>\n                <input type="text" name="username" ng-model="vm.salesforceAccount.username" ng-required="true">\n                <div ng-messages="salesforceAccountForm[\'username\'].$error" ng-show="salesforceAccountForm[\'username\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.URI">Uri</label>\n                <input type="url" name="remoteUri" ng-model="vm.salesforceAccount.remoteUri" ng-required="true">\n                <div ng-messages="salesforceAccountForm[\'remoteUri\'].$error" ng-show="salesforceAccountForm[\'remoteUri\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED">Uri field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL">Uri must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.PASSWORD">Password</label>\n                <input type="password" name="password" ng-model="vm.salesforceAccount.password" placeholder="Password" translate translate-attr-placeholder="INTEGRATIONS.PASSWORD" required>\n                <div ng-messages="salesforceAccountForm[\'password\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.CLIENTID">ClientId</label>\n                <input type="text" name="clientId" ng-model="vm.salesforceAccount.clientId" ng-required="true">\n                <div ng-messages="salesforceAccountForm[\'clientId\'].$error" ng-show="salesforceAccountForm[\'clientId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.CLIENTID_REQUIRED">ClientId field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.CLIENTSECRET">ClientSecret</label>\n                <input type="text" name="clientSecret" ng-model="vm.salesforceAccount.clientSecret" ng-required="true">\n                <div ng-messages="salesforceAccountForm[\'clientSecret\'].$error" ng-show="salesforceAccountForm[\'clientSecret\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.CLIENTSECRET_REQUIRED">ClientSecret field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.SECURITYTOKEN">SecurityToken</label>\n                <input type="text" name="securityToken" ng-model="vm.salesforceAccount.securityToken" ng-required="true">\n                <div ng-messages="salesforceAccountForm[\'securityToken\'].$error" ng-show="salesforceAccountForm[\'securityToken\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.SECURITYTOKEN_REQUIRED">SecurityToken field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                <input type="url" name="serverUrl" ng-model="vm.salesforceAccount.serverUrl">\n                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                <div ng-messages="salesforceAccountForm[\'serverUrl\'].$error" ng-show="salesforceAccountForm[\'serverUrl\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.salesforceAccount.description">\n                <div ng-messages="salesforceAccountForm[\'description\'].$error" ng-show="salesforceAccountForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSalesforceAccount" ng-click="vm.saveSalesforceAccount()" class="send-button md-accent md-raised" ng-disabled="salesforceAccountForm.$invalid || salesforceAccountForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE"\n                    translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSalesforceAccount" ng-click="vm.addNewSalesforceAccount()" class="send-button md-accent md-raised" ng-disabled="salesforceAccountForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_SALESFORCEACCOUNT" translate-attr-aria-label="INTEGRATIONS.ADD_SALESFORCEACCOUNT">\n                    ADD SALESFORCEACCOUNT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSalesforceAccount" ng-click="vm.deleteSalesforceAccount($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/salesforceAccounts/edit/configurations/dialog.html",'<md-dialog class="salesforceConfiguration-dialog" aria-label="New SalesforceConfiguration">\n    <form name="salesforceConfigurationForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.salesforceConfiguration.name" ng-required="true" autofocus>\n                <div ng-messages="salesforceConfigurationForm[\'name\'].$error" ng-show="salesforceConfigurationForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.CHANNEL">Channel</label>\n                <md-select name="channel" ng-model="vm.salesforceConfiguration.channel" required>\n\n                    <md-option ng-value="\'voice\'"> {{ \'INTEGRATIONS.VOICE\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="salesforceConfigurationForm[\'channel\'].$error" ng-show="salesforceConfigurationForm[\'channel\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.CHANNEL_REQUIRED">Channel field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.salesforceConfiguration.type" required>\n\n                    <md-option ng-value="\'inbound\'"> {{ \'INTEGRATIONS.INBOUND_IN_QUEUE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'outbound\'"> {{ \'INTEGRATIONS.OUTBOUND_CALL\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="salesforceConfigurationForm[\'type\'].$error" ng-show="salesforceConfigurationForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSalesforceConfiguration" ng-click="vm.saveSalesforceConfiguration()" class="send-button md-accent md-raised" ng-disabled="salesforceConfigurationForm.$invalid || salesforceConfigurationForm.$pristine" aria-label="SAVE"\n                    translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSalesforceConfiguration" ng-click="vm.addNewSalesforceConfiguration()" class="send-button md-accent md-raised" ng-disabled="salesforceConfigurationForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_SALESFORCECONFIGURATION"\n                    translate-attr-aria-label="INTEGRATIONS.ADD_SALESFORCECONFIGURATION">\n                    ADD SALESFORCECONFIGURATION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSalesforceConfiguration" ng-click="vm.deleteSalesforceConfiguration($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/salesforceAccounts/edit/item/dialog.html",'<md-dialog class="salesforceAccount-item-dialog" aria-label="New Item">\n    <form name="salesforceAccountItemForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <div ng-switch="vm.type">\n                <div ng-switch-when="subject">\n                    \x3c!-- SUBJECT SECTION --\x3e\n                    <div ng-include="\'/subject.html\'"></div>\n                    \x3c!-- / SUBJECT SECTION --\x3e\n                </div>\n                <div ng-switch-when="description">\n                    \x3c!-- DESCRIPTION SECTION --\x3e\n                    <md-input-container class="md-block">\n                        <label translate="INTEGRATIONS.TYPE">Type</label>\n                        <md-select name="type" ng-model="vm.item.type" required>\n                            <md-option value="string">String</md-option>\n                            <md-option value="keyValue">Key Value</md-option>\n                        </md-select>\n                        <div ng-messages="salesforceAccountItemForm.type.$error" ng-show="salesforceAccountItemForm.type.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n                        <label translate="INTEGRATIONS.CONTENT">Content</label>\n                        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n                        <div ng-messages="salesforceAccountItemForm.content.$error" ng-show="salesforceAccountItemForm.content.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <div ng-if="vm.item.type == \'keyValue\'">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.KEY">Key</label>\n                            <input type="text" name="key" ng-model="vm.item.key" required md-autofocus>\n                            <div ng-messages="salesforceAccountItemForm.key.$error" ng-show="salesforceAccountItemForm.key.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.KEY_REQUIRED">Key field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.TYPE">Type</label>\n                            <md-select name="keyType" ng-model="vm.item.keyType" required>\n                                <md-option value="string">String</md-option>\n                                <md-option value="variable">Variable</md-option>\n                                <md-option value="customVariable">Custom Variable</md-option>\n                            </md-select>\n                            <div ng-messages="salesforceAccountItemForm.keyType.$error" ng-show="salesforceAccountItemForm.keyType.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'string\'">\n                            <label translate="INTEGRATIONS.CONTENT">Content</label>\n                            <input type="text" name="keyContent" ng-model="vm.item.keyContent" required md-autofocus>\n                            <div ng-messages="salesforceAccountItemForm.keyContent.$error" ng-show="salesforceAccountItemForm.keyContent.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'variable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n                                <md-optgroup label="Voice: Queue">\n                                    <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Voice: Outbound">\n                                    <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="salesforceAccountItemForm.variableName.$error" ng-show="salesforceAccountItemForm.variableName.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'customVariable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select ng-model="vm.item.VariableId" required>\n                                <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n                            </md-select>\n                        </md-input-container>\n                    </div>\n                    \x3c!-- / DESCRIPTION SECTION --\x3e\n                </div>\n                <div ng-switch-when="field">\n                    \x3c!-- FIELD SECTION --\x3e\n                    <div ng-if="vm.accountConnected">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.FIELD">FIELD</label>\n                            <md-select name="customField" ng-model="vm.customField" required>\n                                <md-optgroup label="Standard">\n                                    <md-option ng-value="standard" ng-repeat="standard in vm.fields | filter: {custom: false} ">{{standard.name}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Custom">\n                                    <md-option ng-value="custom" ng-repeat="custom in vm.fields | filter: {custom: true} ">{{custom.name}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="salesforceAccountItemForm.customField.$error" ng-show="salesforceAccountItemForm.customField.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.FIELD_REQUIRED">Field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- CUSTOM FIELD --\x3e\n                        <div ng-if="vm.customField && vm.customField.custom" ng-include="\'/subject.html\'"></div>\n                        \x3c!-- / CUSTOM FIELD --\x3e\n                        \x3c!-- STANDARD FIELD --\x3e\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="option" ng-model="vm.item.content" required>\n                                <md-option ng-value="option.value" ng-repeat="option in vm.customField.options">{{option.name}}</md-option>\n                            </md-select>\n                            <div ng-messages="salesforceAccountItemForm.option.$error" ng-show="salesforceAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && !vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <input type="text" name="option" ng-model="vm.item.content" required>\n                            <div ng-messages="salesforceAccountItemForm.option.$error" ng-show="salesforceAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- / STANDARD FIELD --\x3e\n                    </div>\n                    <div ng-if="!vm.accountConnected">\n                        <p>Account is not connected. Please check your configurations!</p>\n                    </div>\n                    \x3c!-- / FIELD SECTION --\x3e\n                </div>\n                <div ng-switch-default>\n                    <p>No Item</p>\n                </div>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newItem" ng-click="vm.saveItem()" class="send-button md-accent md-raised" ng-disabled="salesforceAccountItemForm.$invalid || salesforceAccountItemForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newItem" ng-click="vm.addNewItem()" class="send-button md-accent md-raised" ng-disabled="salesforceAccountItemForm.$invalid || salesforceAccountItemForm.$pristine" aria-label="ADD" translate="INTEGRATIONS.ADD" translate-attr-aria-label="INTEGRATIONS.ADD">\n                    ADD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newItem" ng-click="vm.deleteItem($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>\n\n<script type="text/ng-template" id="/subject.html">\n    <md-input-container class="md-block">\n        <label translate="INTEGRATIONS.TYPE">Type</label>\n        <md-select name="type" ng-model="vm.item.type" required>\n            <md-option value="string">String</md-option>\n            <md-option value="variable">Variable</md-option>\n            <md-option value="customVariable">Custom Variable</md-option>\n        </md-select>\n        <div ng-messages="salesforceAccountItemForm.type.$error" ng-show="salesforceAccountItemForm.type.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n        <label translate="INTEGRATIONS.CONTENT">Content</label>\n        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n        <div ng-messages="salesforceAccountItemForm.content.$error" ng-show="salesforceAccountItemForm.content.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'variable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n            <md-optgroup label="Voice: Queue">\n                <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n            </md-optgroup>\n            <md-optgroup label="Voice: Outbound">\n                <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n            </md-optgroup>\n        </md-select>\n        <div ng-messages="salesforceAccountItemForm.variableName.$error" ng-show="salesforceAccountItemForm.variableName.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'customVariable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select ng-model="vm.item.VariableId" required>\n            <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n        </md-select>\n    </md-input-container>\n<\/script>'),e.put("app/main/apps/integrations/views/salesforceAccounts/edit/view.html",'<div id="integrations-salesforceAccount" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-salesforceAccounts-button md-icon-button" aria-label="Go to salesforceAccounts" ng-click="vm.gotoSalesforceAccounts()" translate translate-attr-aria-label="INTEGRATIONS.GO_TO_SALESFORCEACCOUNTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="salesforceAccount-image" hide-xs>\n                    <img ng-src="assets/images/business/salesforceAccounts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.salesforceAccount.id}}\n                        <span ng-if="vm.salesforceAccount.name">{{vm.salesforceAccount.name}}</span>\n                        <span ng-if="vm.salesforceAccount.exten">{{vm.salesforceAccount.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="INTEGRATIONS.CREATED_AT"></span> <span>{{vm.salesforceAccount.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveSalesforceAccount()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (configurationsForm.$invalid)" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.ACCOUNT">ACCOUNT</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="salesforceAccount-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.salesforceAccount.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.TYPE">Type</label>\n                                <md-select name="type" ng-model="vm.salesforceAccount.type" required>\n\n                                    <md-option ng-value="\'integrationTab\'"> {{ \'INTEGRATIONS.INTEGRATION_TAB\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'newTab\'"> {{ \'INTEGRATIONS.NEW_TAB\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'type\'].$error" ng-show="generalForm[\'type\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.USERNAME">Username</label>\n                                <input type="text" name="username" ng-model="vm.salesforceAccount.username" ng-required="true">\n                                <div ng-messages="generalForm[\'username\'].$error" ng-show="generalForm[\'username\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.URI">Uri</label>\n                                <input type="url" name="remoteUri" ng-model="vm.salesforceAccount.remoteUri" ng-required="true">\n                                <div ng-messages="generalForm[\'remoteUri\'].$error" ng-show="generalForm[\'remoteUri\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED">Uri field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL">Uri must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.PASSWORD">Password</label>\n                                <input type="password" name="password" ng-model="vm.salesforceAccount.password" placeholder="Password" translate translate-attr-placeholder="INTEGRATIONS.PASSWORD" required>\n                                <div ng-messages="generalForm[\'password\'].$error" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.CLIENTID">ClientId</label>\n                                <input type="text" name="clientId" ng-model="vm.salesforceAccount.clientId" ng-required="true">\n                                <div ng-messages="generalForm[\'clientId\'].$error" ng-show="generalForm[\'clientId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.CLIENTID_REQUIRED">ClientId field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.CLIENTSECRET">ClientSecret</label>\n                                <input type="text" name="clientSecret" ng-model="vm.salesforceAccount.clientSecret" ng-required="true">\n                                <div ng-messages="generalForm[\'clientSecret\'].$error" ng-show="generalForm[\'clientSecret\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.CLIENTSECRET_REQUIRED">ClientSecret field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.SECURITYTOKEN">SecurityToken</label>\n                                <input type="text" name="securityToken" ng-model="vm.salesforceAccount.securityToken" ng-required="true">\n                                <div ng-messages="generalForm[\'securityToken\'].$error" ng-show="generalForm[\'securityToken\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.SECURITYTOKEN_REQUIRED">SecurityToken field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                                <input type="url" name="serverUrl" ng-model="vm.salesforceAccount.serverUrl">\n                                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                                <div ng-messages="generalForm[\'serverUrl\'].$error" ng-show="generalForm[\'serverUrl\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.salesforceAccount.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="salesforceAccount-detail-form-container configurations md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</div>\n                        </div>\n                        <div ng-controller="SalesforceAccountConfigurationsController as vm_cc" ng-init="vm_cc.init(vm.salesforceAccount)" layout="row">\n                            <md-card class="md-whiteframe-1dp" flex="30">\n                                <div layout="row" layout-align="center center">\n                                    <md-subheader flex="75" class="md-no-sticky">{{ \'INTEGRATIONS.CONFIGURATIONS\' | translate }}</md-subheader>\n                                    <md-button flex="25" ng-click="vm_cc.createOrEditSalesforceConfiguration($event)" class="md-icon-button" aria-label="create salesforceConfiguration">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                                <md-list>\n                                    <md-list-item layout="row" layout-align="center center" ng-repeat="salesforceConfiguration in vm_cc.configurations" class="border-top" md-colors="{background: (vm_cc.selectedSalesforceConfiguration == $index ? \'accent\' : \'grey-A100\')}" ng-click="vm_cc.getSalesforceConfiguration($index)">\n                                        <span class="text-truncate" flex="80">{{ salesforceConfiguration.name }}</span>\n                                        <md-menu ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_cc.deleteSalesforceConfiguration($event, salesforceConfiguration)" translate="INTEGRATIONS.DELETE_SALESFORCECONFIGURATION">\n                                                        Delete SalesforceConfiguration\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </md-list-item>\n                                </md-list>\n                            </md-card>\n                            <div flex></div>\n                            <md-card class="md-whiteframe-1dp" flex="65">\n                                <md-tabs ng-if="vm_cc.configurations.length" md-dynamic-height>\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.SUBJECTS">SUBJECTS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.subject = query" on-collapse="vm_cc.query.subject = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditSubject($event)" aria-label="add subject" translate translate-attr-label="INTEGRATIONS.ADD_SUBJECT">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedSubjects.length}} {{vm_cc.selectedSubjects.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedSubjects($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedSubjects">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="subject" md-select-id="id" ng-repeat="subject in vm_cc.subjects | filter: vm_cc.query.subject">\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="id ">{{subject.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="type ">\n                                                                <span ng-if="subject.FieldId">{{subject.nameField || subject.idField}}</span>\n                                                                <span ng-if="!subject.FieldId">{{subject.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="subject.type" ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell>\n                                                                <span ng-switch-when="string">{{subject.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{subject.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{subject.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{subject.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditSubject($event, subject)" translate="INTEGRATIONS.EDIT_SUBJECT">\n                                                                                Edit Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteSubjectConfirm($event, subject)" translate="INTEGRATIONS.DELETE_SUBJECT">\n                                                                                Delete Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.DESCRIPTIONS">DESCRIPTIONS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.description = query" on-collapse="vm_cc.query.description = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditDescription($event)" aria-label="add description" translate translate-attr-label="INTEGRATIONS.ADD_DESCRIPTION">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedDescriptions.length}} {{vm_cc.selectedDescriptions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedDescriptions($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedDescriptions">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="description" md-select-id="id" ng-repeat="description in vm_cc.descriptions | filter: vm_cc.query.description">\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="id ">{{description.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="type ">\n                                                                <span ng-if="description.FieldId">{{description.nameField || description.idField}}</span>\n                                                                <span ng-if="!description.FieldId">{{description.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="description.type" ng-click="vm_cc.createOrEditDescription($event, description)" md-cell>\n                                                                <span ng-switch-when="string">{{description.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{description.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{description.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{description.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditDescription($event, description)" translate="INTEGRATIONS.EDIT_DESCRIPTION">\n                                                                                Edit Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteDescriptionConfirm($event, description)" translate="INTEGRATIONS.DELETE_DESCRIPTION">\n                                                                                Delete Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.FIELDS">FIELDS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.field = query" on-collapse="vm_cc.query.field = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditField($event)" aria-label="add field" translate translate-attr-label="INTEGRATIONS.ADD_FIELD">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedFields.length}} {{vm_cc.selectedFields.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedFields($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedFields">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="field" md-select-id="id" ng-repeat="field in vm_cc.fields | filter: vm_cc.query.field">\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="id ">{{field.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="type ">\n                                                                <span ng-if="field.FieldId">{{field.nameField || field.idField}}</span>\n                                                                <span ng-if="!field.FieldId">{{field.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="field.type" ng-click="vm_cc.createOrEditField($event, field)" md-cell>\n                                                                <span ng-switch-when="string">{{field.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{field.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{field.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{field.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditField($event, field)" translate="INTEGRATIONS.EDIT_FIELD">\n                                                                                Edit Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteFieldConfirm($event, field)" translate="INTEGRATIONS.DELETE_FIELD">\n                                                                                Delete Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.ADVANCED">ADVANCED</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <div layout-margin>\n                                                <label translate="INTEGRATIONS.MODULE_SEARCH"></label>\n                                                <md-select ng-model="vm_cc.salesforceConfiguration.moduleSearch" ng-change="vm_cc.selectChangedAdvanced()">\n                                                    <md-option ng-value="option.key" ng-repeat="option in [{key: \'contact_lead\', value: \'Contact & Lead\'}, {key: \'contact\', value: \'Contact\'}, {key: \'lead\', value: \'Lead\'}]">{{ option.value }}</md-option>\n                                                </md-select>\n                                            </div>\n                                            <div layout-margin>\n                                                <label translate="INTEGRATIONS.MODULE_CREATE"></label>\n                                                <md-select ng-model="vm_cc.salesforceConfiguration.moduleCreate" ng-change="vm_cc.selectChangedAdvanced()">\n                                                    <md-option ng-value="option.key" ng-repeat="option in [{key: \'nothing\', value: \'Nothing\'}, {key: \'contact\', value: \'Contact\'}, {key: \'lead\', value: \'Lead\'}]">{{ option.value }}</md-option>\n                                                </md-select>\n                                            </div>\n                                        </md-tab-body>\n                                    </md-tab>\n\n\n                                </md-tabs>\n                                <div class="padding-20" ng-if="!vm_cc.configurations.length" ng-click="vm_cc.createOrEditSalesforceConfiguration($event)" layout="row" layout-sm="column" layout-align="center center" layout-wrap>\n                                    <div class="padding-20 md-whiteframe-3dp md-accent-bg" layout="column" layout-align="center center">\n                                        <md-button class="md-icon-button">\n                                            <md-icon md-font-icon="icon-plus"></md-icon>\n                                        </md-button>\n                                        <span aria-label="add configuration" translate translate-attr-label="INTEGRATIONS.ADD_CONFIGURATION">ADD CONFIGURATION</span>\n                                    </div>\n                                </div>\n                            </md-card>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/integrations/views/salesforceAccounts/salesforceAccounts.html",'<div id="salesforceAccounts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-heart" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="INTEGRATIONS.SALESFORCEACCOUNTS">SalesforceAccounts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="INTEGRATIONS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedSalesforceAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedSalesforceAccounts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="INTEGRATIONS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-salesforceAccounts-count">\n                    <span>{{vm.selectedSalesforceAccounts.length}}</span>\n                <span translate="INTEGRATIONS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="SALESFORCEACCOUNTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllSalesforceAccounts()" translate="INTEGRATIONS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectSalesforceAccounts()" translate="INTEGRATIONS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedSalesforceAccounts" csv-label="true" filename="salesforceAccounts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedSalesforceAccounts($event)" aria-label="delete selected" translate translate-attr-label="SALESFORCEACCOUNTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- SALESFORCEACCOUNT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedSalesforceAccounts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getSalesforceAccounts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'INTEGRATIONS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="username">{{ \'INTEGRATIONS.USERNAME\' | translate }}</th>\n                                <th md-column md-order-by="remoteUri">{{ \'INTEGRATIONS.URI\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.salesforceAccounts.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="INTEGRATIONS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="salesforceAccount" md-select-id="id" ng-repeat="salesforceAccount in vm.salesforceAccounts.rows">\n                                <td md-cell ng-if="salesforceAccount.userpic"><img class="avatar" alt="{{salesforceAccount.name}}" ng-src="api/users/{{salesforceAccount.id}}/avatar" /></td>\n                                <td md-cell ng-if="!salesforceAccount.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{salesforceAccount.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditSalesforceAccount($event, salesforceAccount)" md-cell class="id ">{{salesforceAccount.id}}</td>\n                                <td ng-click="vm.createOrEditSalesforceAccount($event, salesforceAccount)" md-cell class="name ">{{salesforceAccount.name}}</td>\n                                <td ng-click="vm.createOrEditSalesforceAccount($event, salesforceAccount)" md-cell class="username ">{{salesforceAccount.username}}</td>\n                                <td ng-click="vm.createOrEditSalesforceAccount($event, salesforceAccount)" md-cell class="remoteUri ">{{salesforceAccount.remoteUri}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(salesforceAccount, $event)" translate="INTEGRATIONS.EDIT_SALESFORCEACCOUNT">\n                                                    Edit SalesforceAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.testtestintegrationaccount(salesforceAccount, $event)" translate="INTEGRATIONS.TEST_SALESFORCEACCOUNT">\n                                                    Test SalesforceAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(salesforceAccount, $event)" translate="INTEGRATIONS.DELETE_SALESFORCEACCOUNT">\n                                                    Delete SalesforceAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'INTEGRATIONS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'INTEGRATIONS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'INTEGRATIONS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.salesforceAccounts.count}}" md-on-paginate="vm.getSalesforceAccounts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / SALESFORCEACCOUNT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD SALESFORCEACCOUNT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-salesforceAccount-button" ng-click="vm.createOrEditSalesforceAccount($event)" aria-label="add salesforceAccount" translate translate-attr-aria-label="INTEGRATIONS.ADD_SALESFORCEACCOUNT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD SALESFORCEACCOUNT BUTTON --\x3e\n</div>'),e.put("app/main/apps/integrations/views/sugarcrmAccounts/create/dialog.html",'<md-dialog class="sugarcrmAccount-dialog" aria-label="New SugarcrmAccount">\n    <form name="sugarcrmAccountForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.sugarcrmAccount.name" ng-required="true" autofocus>\n                <div ng-messages="sugarcrmAccountForm[\'name\'].$error" ng-show="sugarcrmAccountForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.USERNAME">Username</label>\n                <input type="text" name="username" ng-model="vm.sugarcrmAccount.username" ng-required="true">\n                <div ng-messages="sugarcrmAccountForm[\'username\'].$error" ng-show="sugarcrmAccountForm[\'username\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.URI">Uri</label>\n                <input type="url" name="remoteUri" ng-model="vm.sugarcrmAccount.remoteUri" ng-required="true">\n                <div ng-messages="sugarcrmAccountForm[\'remoteUri\'].$error" ng-show="sugarcrmAccountForm[\'remoteUri\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED">Uri field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL">Uri must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.PASSWORD">Password</label>\n                <input type="password" name="password" ng-model="vm.sugarcrmAccount.password" placeholder="Password" translate translate-attr-placeholder="INTEGRATIONS.PASSWORD" required>\n                <div ng-messages="sugarcrmAccountForm[\'password\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                <input type="url" name="serverUrl" ng-model="vm.sugarcrmAccount.serverUrl">\n                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                <div ng-messages="sugarcrmAccountForm[\'serverUrl\'].$error" ng-show="sugarcrmAccountForm[\'serverUrl\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.sugarcrmAccount.description">\n                <div ng-messages="sugarcrmAccountForm[\'description\'].$error" ng-show="sugarcrmAccountForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSugarcrmAccount" ng-click="vm.saveSugarcrmAccount()" class="send-button md-accent md-raised" ng-disabled="sugarcrmAccountForm.$invalid || sugarcrmAccountForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE"\n                    translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSugarcrmAccount" ng-click="vm.addNewSugarcrmAccount()" class="send-button md-accent md-raised" ng-disabled="sugarcrmAccountForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_SUGARCRMACCOUNT" translate-attr-aria-label="INTEGRATIONS.ADD_SUGARCRMACCOUNT">\n                    ADD SUGARCRMACCOUNT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSugarcrmAccount" ng-click="vm.deleteSugarcrmAccount($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/sugarcrmAccounts/edit/configurations/dialog.html",'<md-dialog class="sugarcrmConfiguration-dialog" aria-label="New SugarcrmConfiguration">\n    <form name="sugarcrmConfigurationForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.sugarcrmConfiguration.name" ng-required="true" autofocus>\n                <div ng-messages="sugarcrmConfigurationForm[\'name\'].$error" ng-show="sugarcrmConfigurationForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.CHANNEL">Channel</label>\n                <md-select name="channel" ng-model="vm.sugarcrmConfiguration.channel" required>\n\n                    <md-option ng-value="\'voice\'"> {{ \'INTEGRATIONS.VOICE\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="sugarcrmConfigurationForm[\'channel\'].$error" ng-show="sugarcrmConfigurationForm[\'channel\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.CHANNEL_REQUIRED">Channel field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.sugarcrmConfiguration.type" required>\n\n                    <md-option ng-value="\'inbound\'"> {{ \'INTEGRATIONS.INBOUND_IN_QUEUE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'outbound\'"> {{ \'INTEGRATIONS.OUTBOUND_CALL\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="sugarcrmConfigurationForm[\'type\'].$error" ng-show="sugarcrmConfigurationForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSugarcrmConfiguration" ng-click="vm.saveSugarcrmConfiguration()" class="send-button md-accent md-raised" ng-disabled="sugarcrmConfigurationForm.$invalid || sugarcrmConfigurationForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE"\n                    translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSugarcrmConfiguration" ng-click="vm.addNewSugarcrmConfiguration()" class="send-button md-accent md-raised" ng-disabled="sugarcrmConfigurationForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_SUGARCRMCONFIGURATION"\n                    translate-attr-aria-label="INTEGRATIONS.ADD_SUGARCRMCONFIGURATION">\n                    ADD SUGARCRMCONFIGURATION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSugarcrmConfiguration" ng-click="vm.deleteSugarcrmConfiguration($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/sugarcrmAccounts/edit/item/dialog.html",'<md-dialog class="sugarcrmAccount-item-dialog" aria-label="New Item">\n    <form name="sugarcrmAccountItemForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <div ng-switch="vm.type">\n                <div ng-switch-when="subject">\n                    \x3c!-- SUBJECT SECTION --\x3e\n                    <div ng-include="\'/subject.html\'"></div>\n                    \x3c!-- / SUBJECT SECTION --\x3e\n                </div>\n                <div ng-switch-when="description">\n                    \x3c!-- DESCRIPTION SECTION --\x3e\n                    <md-input-container class="md-block">\n                        <label translate="INTEGRATIONS.TYPE">Type</label>\n                        <md-select name="type" ng-model="vm.item.type" required>\n                            <md-option value="string">String</md-option>\n                            <md-option value="keyValue">Key Value</md-option>\n                        </md-select>\n                        <div ng-messages="sugarcrmAccountItemForm.type.$error" ng-show="sugarcrmAccountItemForm.type.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n                        <label translate="INTEGRATIONS.CONTENT">Content</label>\n                        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n                        <div ng-messages="sugarcrmAccountItemForm.content.$error" ng-show="sugarcrmAccountItemForm.content.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <div ng-if="vm.item.type == \'keyValue\'">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.KEY">Key</label>\n                            <input type="text" name="key" ng-model="vm.item.key" required md-autofocus>\n                            <div ng-messages="sugarcrmAccountItemForm.key.$error" ng-show="sugarcrmAccountItemForm.key.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.KEY_REQUIRED">Key field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.TYPE">Type</label>\n                            <md-select name="keyType" ng-model="vm.item.keyType" required>\n                                <md-option value="string">String</md-option>\n                                <md-option value="variable">Variable</md-option>\n                                <md-option value="customVariable">Custom Variable</md-option>\n                            </md-select>\n                            <div ng-messages="sugarcrmAccountItemForm.keyType.$error" ng-show="sugarcrmAccountItemForm.keyType.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'string\'">\n                            <label translate="INTEGRATIONS.CONTENT">Content</label>\n                            <input type="text" name="keyContent" ng-model="vm.item.keyContent" required md-autofocus>\n                            <div ng-messages="sugarcrmAccountItemForm.keyContent.$error" ng-show="sugarcrmAccountItemForm.keyContent.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'variable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n                                <md-optgroup label="Voice: Queue">\n                                    <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Voice: Outbound">\n                                    <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="sugarcrmAccountItemForm.variableName.$error" ng-show="sugarcrmAccountItemForm.variableName.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'customVariable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select ng-model="vm.item.VariableId" required>\n                                <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n                            </md-select>\n                        </md-input-container>\n                    </div>\n                    \x3c!-- / DESCRIPTION SECTION --\x3e\n                </div>\n                <div ng-switch-when="field">\n                    \x3c!-- FIELD SECTION --\x3e\n                    <div ng-if="vm.accountConnected">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.FIELD">FIELD</label>\n                            <md-select name="customField" ng-model="vm.customField" required>\n                                <md-optgroup label="Standard">\n                                    <md-option ng-value="standard" ng-repeat="standard in vm.fields | filter: {custom: false} ">{{standard.name}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Custom">\n                                    <md-option ng-value="custom" ng-repeat="custom in vm.fields | filter: {custom: true} ">{{custom.name}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="sugarcrmAccountItemForm.customField.$error" ng-show="sugarcrmAccountItemForm.customField.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.FIELD_REQUIRED">Field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- CUSTOM FIELD --\x3e\n                        <div ng-if="vm.customField && vm.customField.custom" ng-include="\'/subject.html\'"></div>\n                        \x3c!-- / CUSTOM FIELD --\x3e\n                        \x3c!-- STANDARD FIELD --\x3e\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="option" ng-model="vm.item.content" required>\n                                <md-option ng-value="option.value" ng-repeat="option in vm.customField.options">{{option.name}}</md-option>\n                            </md-select>\n                            <div ng-messages="sugarcrmAccountItemForm.option.$error" ng-show="sugarcrmAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && !vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <input type="text" name="option" ng-model="vm.item.content" required>\n                            <div ng-messages="sugarcrmAccountItemForm.option.$error" ng-show="sugarcrmAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- / STANDARD FIELD --\x3e\n                    </div>\n                    <div ng-if="!vm.accountConnected">\n                        <p>Account is not connected. Please check your configurations!</p>\n                    </div>\n                    \x3c!-- / FIELD SECTION --\x3e\n                </div>\n                <div ng-switch-default>\n                    <p>No Item</p>\n                </div>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newItem" ng-click="vm.saveItem()" class="send-button md-accent md-raised" ng-disabled="sugarcrmAccountItemForm.$invalid || sugarcrmAccountItemForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newItem" ng-click="vm.addNewItem()" class="send-button md-accent md-raised" ng-disabled="sugarcrmAccountItemForm.$invalid || sugarcrmAccountItemForm.$pristine" aria-label="ADD" translate="INTEGRATIONS.ADD" translate-attr-aria-label="INTEGRATIONS.ADD">\n                    ADD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newItem" ng-click="vm.deleteItem($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>\n\n<script type="text/ng-template" id="/subject.html">\n    <md-input-container class="md-block">\n        <label translate="INTEGRATIONS.TYPE">Type</label>\n        <md-select name="type" ng-model="vm.item.type" required>\n            <md-option value="string">String</md-option>\n            <md-option value="variable">Variable</md-option>\n            <md-option value="customVariable">Custom Variable</md-option>\n        </md-select>\n        <div ng-messages="sugarcrmAccountItemForm.type.$error" ng-show="sugarcrmAccountItemForm.type.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n        <label translate="INTEGRATIONS.CONTENT">Content</label>\n        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n        <div ng-messages="sugarcrmAccountItemForm.content.$error" ng-show="sugarcrmAccountItemForm.content.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'variable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n            <md-optgroup label="Voice: Queue">\n                <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n            </md-optgroup>\n            <md-optgroup label="Voice: Outbound">\n                <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n            </md-optgroup>\n        </md-select>\n        <div ng-messages="sugarcrmAccountItemForm.variableName.$error" ng-show="sugarcrmAccountItemForm.variableName.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'customVariable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select ng-model="vm.item.VariableId" required>\n            <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n        </md-select>\n    </md-input-container>\n<\/script>'),e.put("app/main/apps/integrations/views/sugarcrmAccounts/edit/view.html",'<div id="integrations-sugarcrmAccount" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-sugarcrmAccounts-button md-icon-button" aria-label="Go to sugarcrmAccounts" ng-click="vm.gotoSugarcrmAccounts()" translate translate-attr-aria-label="INTEGRATIONS.GO_TO_SUGARCRMACCOUNTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="sugarcrmAccount-image" hide-xs>\n                    <img ng-src="assets/images/business/sugarcrmAccounts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.sugarcrmAccount.id}}\n                        <span ng-if="vm.sugarcrmAccount.name">{{vm.sugarcrmAccount.name}}</span>\n                        <span ng-if="vm.sugarcrmAccount.exten">{{vm.sugarcrmAccount.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="INTEGRATIONS.CREATED_AT"></span> <span>{{vm.sugarcrmAccount.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveSugarcrmAccount()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (configurationsForm.$invalid)" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.ACCOUNT">ACCOUNT</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="sugarcrmAccount-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.sugarcrmAccount.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.USERNAME">Username</label>\n                                <input type="text" name="username" ng-model="vm.sugarcrmAccount.username" ng-required="true">\n                                <div ng-messages="generalForm[\'username\'].$error" ng-show="generalForm[\'username\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.URI">Uri</label>\n                                <input type="url" name="remoteUri" ng-model="vm.sugarcrmAccount.remoteUri" ng-required="true">\n                                <div ng-messages="generalForm[\'remoteUri\'].$error" ng-show="generalForm[\'remoteUri\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED">Uri field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL">Uri must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.PASSWORD">Password</label>\n                                <input type="password" name="password" ng-model="vm.sugarcrmAccount.password" placeholder="Password" translate translate-attr-placeholder="INTEGRATIONS.PASSWORD" required>\n                                <div ng-messages="generalForm[\'password\'].$error" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                                <input type="url" name="serverUrl" ng-model="vm.sugarcrmAccount.serverUrl">\n                                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                                <div ng-messages="generalForm[\'serverUrl\'].$error" ng-show="generalForm[\'serverUrl\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.sugarcrmAccount.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="sugarcrmAccount-detail-form-container configurations md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</div>\n                        </div>\n                        <div ng-controller="SugarcrmAccountConfigurationsController as vm_cc" ng-init="vm_cc.init(vm.sugarcrmAccount)" layout="row">\n                            <md-card class="md-whiteframe-1dp" flex="30">\n                                <div layout="row" layout-align="center center">\n                                    <md-subheader flex="75" class="md-no-sticky">{{ \'INTEGRATIONS.CONFIGURATIONS\' | translate }}</md-subheader>\n                                    <md-button flex="25" ng-click="vm_cc.createOrEditSugarcrmConfiguration($event)" class="md-icon-button" aria-label="create sugarcrmConfiguration">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                                <md-list>\n                                    <md-list-item layout="row" layout-align="center center" ng-repeat="sugarcrmConfiguration in vm_cc.configurations" class="border-top" md-colors="{background: (vm_cc.selectedSugarcrmConfiguration == $index ? \'accent\' : \'grey-A100\')}" ng-click="vm_cc.getSugarcrmConfiguration($index)">\n                                        <span class="text-truncate" flex="80">{{ sugarcrmConfiguration.name }}</span>\n                                        <md-menu ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_cc.deleteSugarcrmConfiguration($event, sugarcrmConfiguration)" translate="INTEGRATIONS.DELETE_SUGARCRMCONFIGURATION">\n                                                        Delete SugarcrmConfiguration\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </md-list-item>\n                                </md-list>\n                            </md-card>\n                            <div flex></div>\n                            <md-card class="md-whiteframe-1dp" flex="65">\n                                <md-tabs ng-if="vm_cc.configurations.length" md-dynamic-height>\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.SUBJECTS">SUBJECTS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.subject = query" on-collapse="vm_cc.query.subject = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditSubject($event)" aria-label="add subject" translate translate-attr-label="INTEGRATIONS.ADD_SUBJECT">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedSubjects.length}} {{vm_cc.selectedSubjects.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedSubjects($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedSubjects">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="subject" md-select-id="id" ng-repeat="subject in vm_cc.subjects | filter: vm_cc.query.subject">\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="id ">{{subject.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="type ">\n                                                                <span ng-if="subject.FieldId">{{subject.nameField || subject.idField}}</span>\n                                                                <span ng-if="!subject.FieldId">{{subject.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="subject.type" ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell>\n                                                                <span ng-switch-when="string">{{subject.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{subject.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{subject.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{subject.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditSubject($event, subject)" translate="INTEGRATIONS.EDIT_SUBJECT">\n                                                                                Edit Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteSubjectConfirm($event, subject)" translate="INTEGRATIONS.DELETE_SUBJECT">\n                                                                                Delete Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.DESCRIPTIONS">DESCRIPTIONS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.description = query" on-collapse="vm_cc.query.description = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditDescription($event)" aria-label="add description" translate translate-attr-label="INTEGRATIONS.ADD_DESCRIPTION">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedDescriptions.length}} {{vm_cc.selectedDescriptions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedDescriptions($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedDescriptions">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="description" md-select-id="id" ng-repeat="description in vm_cc.descriptions | filter: vm_cc.query.description">\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="id ">{{description.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="type ">\n                                                                <span ng-if="description.FieldId">{{description.nameField || description.idField}}</span>\n                                                                <span ng-if="!description.FieldId">{{description.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="description.type" ng-click="vm_cc.createOrEditDescription($event, description)" md-cell>\n                                                                <span ng-switch-when="string">{{description.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{description.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{description.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{description.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditDescription($event, description)" translate="INTEGRATIONS.EDIT_DESCRIPTION">\n                                                                                Edit Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteDescriptionConfirm($event, description)" translate="INTEGRATIONS.DELETE_DESCRIPTION">\n                                                                                Delete Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.FIELDS">FIELDS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.field = query" on-collapse="vm_cc.query.field = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditField($event)" aria-label="add field" translate translate-attr-label="INTEGRATIONS.ADD_FIELD">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedFields.length}} {{vm_cc.selectedFields.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedFields($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedFields">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="field" md-select-id="id" ng-repeat="field in vm_cc.fields | filter: vm_cc.query.field">\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="id ">{{field.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="type ">\n                                                                <span ng-if="field.FieldId">{{field.nameField || field.idField}}</span>\n                                                                <span ng-if="!field.FieldId">{{field.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="field.type" ng-click="vm_cc.createOrEditField($event, field)" md-cell>\n                                                                <span ng-switch-when="string">{{field.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{field.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{field.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{field.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditField($event, field)" translate="INTEGRATIONS.EDIT_FIELD">\n                                                                                Edit Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteFieldConfirm($event, field)" translate="INTEGRATIONS.DELETE_FIELD">\n                                                                                Delete Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n\n                                </md-tabs>\n                                <div class="padding-20" ng-if="!vm_cc.configurations.length" ng-click="vm_cc.createOrEditSugarcrmConfiguration($event)" layout="row" layout-sm="column" layout-align="center center" layout-wrap>\n                                    <div class="padding-20 md-whiteframe-3dp md-accent-bg" layout="column" layout-align="center center">\n                                        <md-button class="md-icon-button">\n                                            <md-icon md-font-icon="icon-plus"></md-icon>\n                                        </md-button>\n                                        <span aria-label="add configuration" translate translate-attr-label="INTEGRATIONS.ADD_CONFIGURATION">ADD CONFIGURATION</span>\n                                    </div>\n                                </div>\n                            </md-card>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/integrations/views/sugarcrmAccounts/sugarcrmAccounts.html",'<div id="sugarcrmAccounts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-heart" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="INTEGRATIONS.SUGARCRMACCOUNTS">SugarcrmAccounts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="INTEGRATIONS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedSugarcrmAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedSugarcrmAccounts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="INTEGRATIONS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-sugarcrmAccounts-count">\n                    <span>{{vm.selectedSugarcrmAccounts.length}}</span>\n                <span translate="INTEGRATIONS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="SUGARCRMACCOUNTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllSugarcrmAccounts()" translate="INTEGRATIONS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectSugarcrmAccounts()" translate="INTEGRATIONS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedSugarcrmAccounts" csv-label="true" filename="sugarcrmAccounts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedSugarcrmAccounts($event)" aria-label="delete selected" translate translate-attr-label="SUGARCRMACCOUNTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- SUGARCRMACCOUNT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedSugarcrmAccounts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getSugarcrmAccounts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'INTEGRATIONS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="username">{{ \'INTEGRATIONS.USERNAME\' | translate }}</th>\n                                <th md-column md-order-by="remoteUri">{{ \'INTEGRATIONS.URI\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.sugarcrmAccounts.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="INTEGRATIONS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="sugarcrmAccount" md-select-id="id" ng-repeat="sugarcrmAccount in vm.sugarcrmAccounts.rows">\n                                <td md-cell ng-if="sugarcrmAccount.userpic"><img class="avatar" alt="{{sugarcrmAccount.name}}" ng-src="api/users/{{sugarcrmAccount.id}}/avatar" /></td>\n                                <td md-cell ng-if="!sugarcrmAccount.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{sugarcrmAccount.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditSugarcrmAccount($event, sugarcrmAccount)" md-cell class="id ">{{sugarcrmAccount.id}}</td>\n                                <td ng-click="vm.createOrEditSugarcrmAccount($event, sugarcrmAccount)" md-cell class="name ">{{sugarcrmAccount.name}}</td>\n                                <td ng-click="vm.createOrEditSugarcrmAccount($event, sugarcrmAccount)" md-cell class="username ">{{sugarcrmAccount.username}}</td>\n                                <td ng-click="vm.createOrEditSugarcrmAccount($event, sugarcrmAccount)" md-cell class="remoteUri ">{{sugarcrmAccount.remoteUri}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(sugarcrmAccount, $event)" translate="INTEGRATIONS.EDIT_SUGARCRMACCOUNT">\n                                                    Edit SugarcrmAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.testtestintegrationaccount(sugarcrmAccount, $event)" translate="INTEGRATIONS.TEST_SUGARCRMACCOUNT">\n                                                    Test SugarcrmAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(sugarcrmAccount, $event)" translate="INTEGRATIONS.DELETE_SUGARCRMACCOUNT">\n                                                    Delete SugarcrmAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'INTEGRATIONS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'INTEGRATIONS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'INTEGRATIONS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.sugarcrmAccounts.count}}" md-on-paginate="vm.getSugarcrmAccounts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / SUGARCRMACCOUNT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD SUGARCRMACCOUNT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-sugarcrmAccount-button" ng-click="vm.createOrEditSugarcrmAccount($event)" aria-label="add sugarcrmAccount" translate translate-attr-aria-label="INTEGRATIONS.ADD_SUGARCRMACCOUNT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD SUGARCRMACCOUNT BUTTON --\x3e\n</div>'),e.put("app/main/apps/integrations/views/zendeskAccounts/create/dialog.html",'<md-dialog class="zendeskAccount-dialog" aria-label="New ZendeskAccount">\n    <form name="zendeskAccountForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.zendeskAccount.name" ng-required="true" autofocus>\n                <div ng-messages="zendeskAccountForm[\'name\'].$error" ng-show="zendeskAccountForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.zendeskAccount.type" required>\n\n                    <md-option ng-value="\'integrationTab\'"> {{ \'INTEGRATIONS.INTEGRATION_TAB\' | translate }}</md-option>\n\n                    <md-option ng-value="\'newTab\'"> {{ \'INTEGRATIONS.NEW_TAB\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="zendeskAccountForm[\'type\'].$error" ng-show="zendeskAccountForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.USERNAME">Username</label>\n                <input type="text" name="username" ng-model="vm.zendeskAccount.username" ng-required="true">\n                <div ng-messages="zendeskAccountForm[\'username\'].$error" ng-show="zendeskAccountForm[\'username\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.URI">Uri</label>\n                <input type="url" name="remoteUri" ng-model="vm.zendeskAccount.remoteUri" ng-required="true">\n                <div ng-messages="zendeskAccountForm[\'remoteUri\'].$error" ng-show="zendeskAccountForm[\'remoteUri\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED">Uri field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL">Uri must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.AUTHTYPE">AuthType</label>\n                <md-select name="authType" ng-model="vm.zendeskAccount.authType" required>\n                    <md-option ng-value="\'password\'">Password</md-option>\n                    <md-option ng-value="\'token\'">Token</md-option>\n                </md-select>\n                <div ng-messages="zendeskAccountForm[\'authType\'].$error" ng-show="zendeskAccountForm[\'authType\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.AUTHTYPE_REQUIRED">AuthType field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.zendeskAccount.authType == \'password\'">\n                <label translate="INTEGRATIONS.PASSWORD">Password</label>\n                <input type="password" name="password" ng-model="vm.zendeskAccount.password" placeholder="Password" translate translate-attr-placeholder="INTEGRATIONS.PASSWORD" required>\n                <div ng-messages="zendeskAccountForm[\'password\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container ng-if="vm.zendeskAccount.authType == \'token\'" class="md-block">\n                <label translate="INTEGRATIONS.TOKEN">Token</label>\n                <input type="text" name="token" ng-model="vm.zendeskAccount.token" ng-required="true">\n                <div ng-messages="zendeskAccountForm[\'token\'].$error" ng-show="zendeskAccountForm[\'token\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.TOKEN_REQUIRED">Token field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                <input type="url" name="serverUrl" ng-model="vm.zendeskAccount.serverUrl">\n                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                <div ng-messages="zendeskAccountForm[\'serverUrl\'].$error" ng-show="zendeskAccountForm[\'serverUrl\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.zendeskAccount.description">\n                <div ng-messages="zendeskAccountForm[\'description\'].$error" ng-show="zendeskAccountForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newZendeskAccount" ng-click="vm.saveZendeskAccount()" class="send-button md-accent md-raised" ng-disabled="zendeskAccountForm.$invalid || zendeskAccountForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE"\n                    translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newZendeskAccount" ng-click="vm.addNewZendeskAccount()" class="send-button md-accent md-raised" ng-disabled="zendeskAccountForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_ZENDESKACCOUNT" translate-attr-aria-label="INTEGRATIONS.ADD_ZENDESKACCOUNT">\n                    ADD ZENDESKACCOUNT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newZendeskAccount" ng-click="vm.deleteZendeskAccount($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/zendeskAccounts/edit/item/dialog.html",'<md-dialog class="zendeskAccount-item-dialog" aria-label="New Item">\n    <form name="zendeskAccountItemForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <div ng-switch="vm.type">\n                <div ng-switch-when="subject">\n                    \x3c!-- SUBJECT SECTION --\x3e\n                    <div ng-include="\'/subject.html\'"></div>\n                    \x3c!-- / SUBJECT SECTION --\x3e\n                </div>\n                <div ng-switch-when="description">\n                    \x3c!-- DESCRIPTION SECTION --\x3e\n                    <md-input-container class="md-block">\n                        <label translate="INTEGRATIONS.TYPE">Type</label>\n                        <md-select name="type" ng-model="vm.item.type" required>\n                            <md-option value="string">String</md-option>\n                            <md-option value="keyValue">Key Value</md-option>\n                        </md-select>\n                        <div ng-messages="zendeskAccountItemForm.type.$error" ng-show="zendeskAccountItemForm.type.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n                        <label translate="INTEGRATIONS.CONTENT">Content</label>\n                        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n                        <div ng-messages="zendeskAccountItemForm.content.$error" ng-show="zendeskAccountItemForm.content.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <div ng-if="vm.item.type == \'keyValue\'">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.KEY">Key</label>\n                            <input type="text" name="key" ng-model="vm.item.key" required md-autofocus>\n                            <div ng-messages="zendeskAccountItemForm.key.$error" ng-show="zendeskAccountItemForm.key.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.KEY_REQUIRED">Key field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.TYPE">Type</label>\n                            <md-select name="keyType" ng-model="vm.item.keyType" required>\n                                <md-option value="string">String</md-option>\n                                <md-option value="variable">Variable</md-option>\n                                <md-option value="customVariable">Custom Variable</md-option>\n                            </md-select>\n                            <div ng-messages="zendeskAccountItemForm.keyType.$error" ng-show="zendeskAccountItemForm.keyType.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'string\'">\n                            <label translate="INTEGRATIONS.CONTENT">Content</label>\n                            <input type="text" name="keyContent" ng-model="vm.item.keyContent" required md-autofocus>\n                            <div ng-messages="zendeskAccountItemForm.keyContent.$error" ng-show="zendeskAccountItemForm.keyContent.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'variable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n                                <md-optgroup label="Voice: Queue">\n                                    <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Voice: Outbound">\n                                    <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="zendeskAccountItemForm.variableName.$error" ng-show="zendeskAccountItemForm.variableName.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'customVariable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select ng-model="vm.item.VariableId" required>\n                                <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n                            </md-select>\n                        </md-input-container>\n                    </div>\n                    \x3c!-- / DESCRIPTION SECTION --\x3e\n                </div>\n                <div ng-switch-when="field">\n                    \x3c!-- FIELD SECTION --\x3e\n                    <div ng-if="vm.accountConnected">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.FIELD">FIELD</label>\n                            <md-select name="customField" ng-model="vm.customField" required>\n                                <md-optgroup label="Standard">\n                                    <md-option ng-value="standard" ng-repeat="standard in vm.fields | filter: {custom: false} ">{{standard.name}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Custom">\n                                    <md-option ng-value="custom" ng-repeat="custom in vm.fields | filter: {custom: true} ">{{custom.name}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="zendeskAccountItemForm.customField.$error" ng-show="zendeskAccountItemForm.customField.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.FIELD_REQUIRED">Field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- CUSTOM FIELD --\x3e\n                        <div ng-if="vm.customField && vm.customField.custom" ng-include="\'/subject.html\'"></div>\n                        \x3c!-- / CUSTOM FIELD --\x3e\n                        \x3c!-- STANDARD FIELD --\x3e\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="option" ng-model="vm.item.content" required>\n                                <md-option ng-value="option.value" ng-repeat="option in vm.customField.options">{{option.name}}</md-option>\n                            </md-select>\n                            <div ng-messages="zendeskAccountItemForm.option.$error" ng-show="zendeskAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && !vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <input type="text" name="option" ng-model="vm.item.content" required>\n                            <div ng-messages="zendeskAccountItemForm.option.$error" ng-show="zendeskAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- / STANDARD FIELD --\x3e\n                    </div>\n                    <div ng-if="!vm.accountConnected">\n                        <p>Account is not connected. Please check your configurations!</p>\n                    </div>\n                    \x3c!-- / FIELD SECTION --\x3e\n                </div>\n                <div ng-switch-default>\n                    <p>No Item</p>\n                </div>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newItem" ng-click="vm.saveItem()" class="send-button md-accent md-raised" ng-disabled="zendeskAccountItemForm.$invalid || zendeskAccountItemForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newItem" ng-click="vm.addNewItem()" class="send-button md-accent md-raised" ng-disabled="zendeskAccountItemForm.$invalid || zendeskAccountItemForm.$pristine" aria-label="ADD" translate="INTEGRATIONS.ADD" translate-attr-aria-label="INTEGRATIONS.ADD">\n                    ADD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newItem" ng-click="vm.deleteItem($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>\n\n<script type="text/ng-template" id="/subject.html">\n    <md-input-container class="md-block">\n        <label translate="INTEGRATIONS.TYPE">Type</label>\n        <md-select name="type" ng-model="vm.item.type" required>\n            <md-option value="string">String</md-option>\n            <md-option value="variable">Variable</md-option>\n            <md-option value="customVariable">Custom Variable</md-option>\n        </md-select>\n        <div ng-messages="zendeskAccountItemForm.type.$error" ng-show="zendeskAccountItemForm.type.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n        <label translate="INTEGRATIONS.CONTENT">Content</label>\n        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n        <div ng-messages="zendeskAccountItemForm.content.$error" ng-show="zendeskAccountItemForm.content.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'variable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n            <md-optgroup label="Voice: Queue">\n                <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n            </md-optgroup>\n            <md-optgroup label="Voice: Outbound">\n                <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n            </md-optgroup>\n        </md-select>\n        <div ng-messages="zendeskAccountItemForm.variableName.$error" ng-show="zendeskAccountItemForm.variableName.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'customVariable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select ng-model="vm.item.VariableId" required>\n            <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n        </md-select>\n    </md-input-container>\n<\/script>'),e.put("app/main/apps/integrations/views/zendeskAccounts/edit/view.html",'<div id="integrations-zendeskAccount" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-zendeskAccounts-button md-icon-button" aria-label="Go to zendeskAccounts" ng-click="vm.gotoZendeskAccounts()" translate translate-attr-aria-label="INTEGRATIONS.GO_TO_ZENDESKACCOUNTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="zendeskAccount-image" hide-xs>\n                    <img ng-src="assets/images/business/zendeskAccounts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.zendeskAccount.id}}\n                        <span ng-if="vm.zendeskAccount.name">{{vm.zendeskAccount.name}}</span>\n                        <span ng-if="vm.zendeskAccount.exten">{{vm.zendeskAccount.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="INTEGRATIONS.CREATED_AT"></span> <span>{{vm.zendeskAccount.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveZendeskAccount()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (zendeskConfigurationsForm.$invalid)" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.ACCOUNT">ACCOUNT</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="zendeskAccount-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.zendeskAccount.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.TYPE">Type</label>\n                                <md-select name="type" ng-model="vm.zendeskAccount.type" required>\n\n                                    <md-option ng-value="\'integrationTab\'"> {{ \'INTEGRATIONS.INTEGRATION_TAB\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'newTab\'"> {{ \'INTEGRATIONS.NEW_TAB\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'type\'].$error" ng-show="generalForm[\'type\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.USERNAME">Username</label>\n                                <input type="text" name="username" ng-model="vm.zendeskAccount.username" ng-required="true">\n                                <div ng-messages="generalForm[\'username\'].$error" ng-show="generalForm[\'username\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.URI">Uri</label>\n                                <input type="url" name="remoteUri" ng-model="vm.zendeskAccount.remoteUri" ng-required="true">\n                                <div ng-messages="generalForm[\'remoteUri\'].$error" ng-show="generalForm[\'remoteUri\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED">Uri field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL">Uri must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.AUTHTYPE">AuthType</label>\n                                <md-select name="authType" ng-model="vm.zendeskAccount.authType" required>\n                                    <md-option ng-value="\'password\'">Password</md-option>\n                                    <md-option ng-value="\'token\'">Token</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'authType\'].$error" ng-show="generalForm[\'authType\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.AUTHTYPE_REQUIRED">AuthType field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block" ng-if="vm.zendeskAccount.authType == \'password\'">\n                                <label translate="INTEGRATIONS.PASSWORD">Password</label>\n                                <input type="password" name="password" ng-model="vm.zendeskAccount.password" placeholder="Password" translate translate-attr-placeholder="INTEGRATIONS.PASSWORD" required>\n                                <div ng-messages="generalForm[\'password\'].$error" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <md-input-container ng-if="vm.zendeskAccount.authType == \'token\'" class="md-block">\n                                <label translate="INTEGRATIONS.TOKEN">Token</label>\n                                <input type="text" name="token" ng-model="vm.zendeskAccount.token" ng-required="true">\n                                <div ng-messages="generalForm[\'token\'].$error" ng-show="generalForm[\'token\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.TOKEN_REQUIRED">Token field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                                <input type="url" name="serverUrl" ng-model="vm.zendeskAccount.serverUrl">\n                                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                                <div ng-messages="generalForm[\'serverUrl\'].$error" ng-show="generalForm[\'serverUrl\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.zendeskAccount.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="zendeskAccount-detail-form-container zendeskconfigurations md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.ZENDESKCONFIGURATIONS">ZENDESKCONFIGURATIONS</div>\n                        </div>\n                        <div ng-controller="ZendeskAccountConfigurationsController as vm_cc" ng-init="vm_cc.init(vm.zendeskAccount)" layout="row">\n                            <md-card class="md-whiteframe-1dp" flex="30">\n                                <div layout="row" layout-align="center center">\n                                    <md-subheader flex="75" class="md-no-sticky">{{ \'INTEGRATIONS.CONFIGURATIONS\' | translate }}</md-subheader>\n                                    <md-button flex="25" ng-click="vm_cc.createOrEditZendeskConfiguration($event)" class="md-icon-button" aria-label="create zendeskConfiguration">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                                <md-list>\n                                    <md-list-item layout="row" layout-align="center center" ng-repeat="zendeskConfiguration in vm_cc.zendeskConfigurations" class="border-top" md-colors="{background: (vm_cc.selectedZendeskConfiguration == $index ? \'accent\' : \'grey-A100\')}" ng-click="vm_cc.getZendeskConfiguration($index)">\n                                        <span class="text-truncate" flex="80">{{ zendeskConfiguration.name }}</span>\n                                        <md-menu ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_cc.deleteZendeskConfiguration($event, zendeskConfiguration)" translate="INTEGRATIONS.DELETE_ZENDESKCONFIGURATION">\n                                                        Delete ZendeskConfiguration\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </md-list-item>\n                                </md-list>\n                            </md-card>\n                            <div flex></div>\n                            <md-card class="md-whiteframe-1dp" flex="65">\n                                <md-tabs ng-if="vm_cc.zendeskConfigurations.length" md-dynamic-height>\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.SUBJECTS">SUBJECTS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.subject = query" on-collapse="vm_cc.query.subject = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditSubject($event)" aria-label="add subject" translate translate-attr-label="INTEGRATIONS.ADD_SUBJECT">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedSubjects.length}} {{vm_cc.selectedSubjects.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedSubjects($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedSubjects">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="subject" md-select-id="id" ng-repeat="subject in vm_cc.subjects | filter: vm_cc.query.subject">\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="id ">{{subject.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="type ">\n                                                                <span ng-if="subject.FieldId">{{subject.nameField || subject.idField}}</span>\n                                                                <span ng-if="!subject.FieldId">{{subject.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="subject.type" ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell>\n                                                                <span ng-switch-when="string">{{subject.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{subject.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{subject.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{subject.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditSubject($event, subject)" translate="INTEGRATIONS.EDIT_SUBJECT">\n                                                                                Edit Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteSubjectConfirm($event, subject)" translate="INTEGRATIONS.DELETE_SUBJECT">\n                                                                                Delete Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.DESCRIPTIONS">DESCRIPTIONS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.description = query" on-collapse="vm_cc.query.description = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditDescription($event)" aria-label="add description" translate translate-attr-label="INTEGRATIONS.ADD_DESCRIPTION">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedDescriptions.length}} {{vm_cc.selectedDescriptions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedDescriptions($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedDescriptions">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="description" md-select-id="id" ng-repeat="description in vm_cc.descriptions | filter: vm_cc.query.description">\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="id ">{{description.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="type ">\n                                                                <span ng-if="description.FieldId">{{description.nameField || description.idField}}</span>\n                                                                <span ng-if="!description.FieldId">{{description.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="description.type" ng-click="vm_cc.createOrEditDescription($event, description)" md-cell>\n                                                                <span ng-switch-when="string">{{description.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{description.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{description.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{description.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditDescription($event, description)" translate="INTEGRATIONS.EDIT_DESCRIPTION">\n                                                                                Edit Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteDescriptionConfirm($event, description)" translate="INTEGRATIONS.DELETE_DESCRIPTION">\n                                                                                Delete Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.FIELDS">FIELDS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.field = query" on-collapse="vm_cc.query.field = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditField($event)" aria-label="add field" translate translate-attr-label="INTEGRATIONS.ADD_FIELD">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedFields.length}} {{vm_cc.selectedFields.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedFields($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedFields">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="field" md-select-id="id" ng-repeat="field in vm_cc.fields | filter: vm_cc.query.field">\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="id ">{{field.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="type ">\n                                                                <span ng-if="field.FieldId">{{field.nameField || field.idField}}</span>\n                                                                <span ng-if="!field.FieldId">{{field.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="field.type" ng-click="vm_cc.createOrEditField($event, field)" md-cell>\n                                                                <span ng-switch-when="string">{{field.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{field.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{field.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{field.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditField($event, field)" translate="INTEGRATIONS.EDIT_FIELD">\n                                                                                Edit Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteFieldConfirm($event, field)" translate="INTEGRATIONS.DELETE_FIELD">\n                                                                                Delete Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.TAGS">TAGS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-table-container class="md-whiteframe-1dp padding-20">\n                                                <md-input-container class="md-block">\n                                                    <label translate="INTEGRATIONS.TAGS">Tags</label>\n                                                    <md-select ng-model="vm_cc.selectedTags" ng-change="vm_cc.selectTagsChanged($event)" multiple>\n                                                        <md-option ng-value="tag.id" ng-repeat="tag in vm_cc.tags">{{ tag.name }}</md-option>\n                                                    </md-select>\n                                                </md-input-container>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n                                </md-tabs>\n                                <div class="padding-20" ng-if="!vm_cc.zendeskConfigurations.length" ng-click="vm_cc.createOrEditZendeskConfiguration($event)" layout="row" layout-sm="column" layout-align="center center" layout-wrap>\n                                    <div class="padding-20 md-whiteframe-3dp md-accent-bg" layout="column" layout-align="center center">\n                                        <md-button class="md-icon-button">\n                                            <md-icon md-font-icon="icon-plus"></md-icon>\n                                        </md-button>\n                                        <span aria-label="add configuration" translate translate-attr-label="INTEGRATIONS.ADD_CONFIGURATION">ADD CONFIGURATION</span>\n                                    </div>\n                                </div>\n                            </md-card>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/integrations/views/zendeskAccounts/edit/zendeskConfigurations/dialog.html",'<md-dialog class="zendeskConfiguration-dialog" aria-label="New ZendeskConfiguration">\n    <form name="zendeskConfigurationForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.zendeskConfiguration.name" ng-required="true" autofocus>\n                <div ng-messages="zendeskConfigurationForm[\'name\'].$error" ng-show="zendeskConfigurationForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.CHANNEL">Channel</label>\n                <md-select name="channel" ng-model="vm.zendeskConfiguration.channel" required>\n\n                    <md-option ng-value="\'voice\'"> {{ \'INTEGRATIONS.VOICE\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="zendeskConfigurationForm[\'channel\'].$error" ng-show="zendeskConfigurationForm[\'channel\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.CHANNEL_REQUIRED">Channel field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.zendeskConfiguration.type" required>\n\n                    <md-option ng-value="\'inbound\'"> {{ \'INTEGRATIONS.INBOUND_IN_QUEUE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'outbound\'"> {{ \'INTEGRATIONS.OUTBOUND_CALL\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="zendeskConfigurationForm[\'type\'].$error" ng-show="zendeskConfigurationForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newZendeskConfiguration" ng-click="vm.saveZendeskConfiguration()" class="send-button md-accent md-raised" ng-disabled="zendeskConfigurationForm.$invalid || zendeskConfigurationForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE"\n                    translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newZendeskConfiguration" ng-click="vm.addNewZendeskConfiguration()" class="send-button md-accent md-raised" ng-disabled="zendeskConfigurationForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_ZENDESKCONFIGURATION"\n                    translate-attr-aria-label="INTEGRATIONS.ADD_ZENDESKCONFIGURATION">\n                    ADD ZENDESKCONFIGURATION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newZendeskConfiguration" ng-click="vm.deleteZendeskConfiguration($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/zendeskAccounts/zendeskAccounts.html",'<div id="zendeskAccounts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-heart" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="INTEGRATIONS.ZENDESKACCOUNTS">ZendeskAccounts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="INTEGRATIONS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedZendeskAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedZendeskAccounts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="INTEGRATIONS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-zendeskAccounts-count">\n                    <span>{{vm.selectedZendeskAccounts.length}}</span>\n                <span translate="INTEGRATIONS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="ZENDESKACCOUNTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllZendeskAccounts()" translate="INTEGRATIONS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectZendeskAccounts()" translate="INTEGRATIONS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedZendeskAccounts" csv-label="true" filename="zendeskAccounts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedZendeskAccounts($event)" aria-label="delete selected" translate translate-attr-label="ZENDESKACCOUNTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- ZENDESKACCOUNT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedZendeskAccounts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getZendeskAccounts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'INTEGRATIONS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="username">{{ \'INTEGRATIONS.USERNAME\' | translate }}</th>\n                                <th md-column md-order-by="remoteUri">{{ \'INTEGRATIONS.URI\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.zendeskAccounts.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="INTEGRATIONS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="zendeskAccount" md-select-id="id" ng-repeat="zendeskAccount in vm.zendeskAccounts.rows">\n                                <td md-cell ng-if="zendeskAccount.userpic"><img class="avatar" alt="{{zendeskAccount.name}}" ng-src="api/users/{{zendeskAccount.id}}/avatar" /></td>\n                                <td md-cell ng-if="!zendeskAccount.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{zendeskAccount.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditZendeskAccount($event, zendeskAccount)" md-cell class="id ">{{zendeskAccount.id}}</td>\n                                <td ng-click="vm.createOrEditZendeskAccount($event, zendeskAccount)" md-cell class="name ">{{zendeskAccount.name}}</td>\n                                <td ng-click="vm.createOrEditZendeskAccount($event, zendeskAccount)" md-cell class="username ">{{zendeskAccount.username}}</td>\n                                <td ng-click="vm.createOrEditZendeskAccount($event, zendeskAccount)" md-cell class="remoteUri ">{{zendeskAccount.remoteUri}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(zendeskAccount, $event)" translate="INTEGRATIONS.EDIT_ZENDESKACCOUNT">\n                                                    Edit ZendeskAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.testtestintegrationaccount(zendeskAccount, $event)" translate="INTEGRATIONS.TEST_ZENDESKACCOUNT">\n                                                    Test ZendeskAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(zendeskAccount, $event)" translate="INTEGRATIONS.DELETE_ZENDESKACCOUNT">\n                                                    Delete ZendeskAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'INTEGRATIONS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'INTEGRATIONS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'INTEGRATIONS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.zendeskAccounts.count}}" md-on-paginate="vm.getZendeskAccounts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / ZENDESKACCOUNT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD ZENDESKACCOUNT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-zendeskAccount-button" ng-click="vm.createOrEditZendeskAccount($event)" aria-label="add zendeskAccount" translate translate-attr-aria-label="INTEGRATIONS.ADD_ZENDESKACCOUNT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD ZENDESKACCOUNT BUTTON --\x3e\n</div>'),e.put("app/main/apps/integrations/views/zohoAccounts/create/dialog.html",'<md-dialog class="zohoAccount-dialog" aria-label="New ZohoAccount">\n    <form name="zohoAccountForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.zohoAccount.name" ng-required="true" autofocus>\n                <div ng-messages="zohoAccountForm[\'name\'].$error" ng-show="zohoAccountForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.HOST">Host</label>\n                <md-select name="host" ng-model="vm.zohoAccount.host" required>\n                    <md-option ng-value="\'zoho.com\'">zoho.com</md-option>\n                    <md-option ng-value="\'zoho.eu\'">zoho.eu</md-option>\n                </md-select>\n                <div ng-messages="zohoAccountForm[\'host\'].$error" ng-show="zohoAccountForm[\'host\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.HOST_REQUIRED">Host field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.AUTHTOKEN">AuthToken</label>\n                <input type="text" name="authToken" ng-model="vm.zohoAccount.authToken" ng-required="true">\n                <div ng-messages="zohoAccountForm[\'authToken\'].$error" ng-show="zohoAccountForm[\'authToken\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.AUTHTOKEN_REQUIRED">AuthToken field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                <input type="url" name="serverUrl" ng-model="vm.zohoAccount.serverUrl">\n                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                <div ng-messages="zohoAccountForm[\'serverUrl\'].$error" ng-show="zohoAccountForm[\'serverUrl\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.zohoAccount.description">\n                <div ng-messages="zohoAccountForm[\'description\'].$error" ng-show="zohoAccountForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newZohoAccount" ng-click="vm.saveZohoAccount()" class="send-button md-accent md-raised" ng-disabled="zohoAccountForm.$invalid || zohoAccountForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newZohoAccount" ng-click="vm.addNewZohoAccount()" class="send-button md-accent md-raised" ng-disabled="zohoAccountForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_ZOHOACCOUNT" translate-attr-aria-label="INTEGRATIONS.ADD_ZOHOACCOUNT">\n                    ADD ZOHOACCOUNT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newZohoAccount" ng-click="vm.deleteZohoAccount($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/zohoAccounts/edit/configurations/dialog.html",'<md-dialog class="zohoConfiguration-dialog" aria-label="New ZohoConfiguration">\n    <form name="zohoConfigurationForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.zohoConfiguration.name" ng-required="true" autofocus>\n                <div ng-messages="zohoConfigurationForm[\'name\'].$error" ng-show="zohoConfigurationForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.CHANNEL">Channel</label>\n                <md-select name="channel" ng-model="vm.zohoConfiguration.channel" required>\n\n                    <md-option ng-value="\'voice\'"> {{ \'INTEGRATIONS.VOICE\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="zohoConfigurationForm[\'channel\'].$error" ng-show="zohoConfigurationForm[\'channel\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.CHANNEL_REQUIRED">Channel field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="INTEGRATIONS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.zohoConfiguration.type" required>\n\n                    <md-option ng-value="\'inbound\'"> {{ \'INTEGRATIONS.INBOUND_IN_QUEUE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'outbound\'"> {{ \'INTEGRATIONS.OUTBOUND_CALL\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="zohoConfigurationForm[\'type\'].$error" ng-show="zohoConfigurationForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newZohoConfiguration" ng-click="vm.saveZohoConfiguration()" class="send-button md-accent md-raised" ng-disabled="zohoConfigurationForm.$invalid || zohoConfigurationForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE"\n                    translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newZohoConfiguration" ng-click="vm.addNewZohoConfiguration()" class="send-button md-accent md-raised" ng-disabled="zohoConfigurationForm.$invalid" aria-label="ADD" translate="INTEGRATIONS.ADD_ZOHOCONFIGURATION" translate-attr-aria-label="INTEGRATIONS.ADD_ZOHOCONFIGURATION">\n                    ADD ZOHOCONFIGURATION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newZohoConfiguration" ng-click="vm.deleteZohoConfiguration($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/integrations/views/zohoAccounts/edit/item/dialog.html",'<md-dialog class="zohoAccount-item-dialog" aria-label="New Item">\n    <form name="zohoAccountItemForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <div ng-switch="vm.type">\n                <div ng-switch-when="subject">\n                    \x3c!-- SUBJECT SECTION --\x3e\n                    <div ng-include="\'/subject.html\'"></div>\n                    \x3c!-- / SUBJECT SECTION --\x3e\n                </div>\n                <div ng-switch-when="description">\n                    \x3c!-- DESCRIPTION SECTION --\x3e\n                    <md-input-container class="md-block">\n                        <label translate="INTEGRATIONS.TYPE">Type</label>\n                        <md-select name="type" ng-model="vm.item.type" required>\n                            <md-option value="string">String</md-option>\n                            <md-option value="keyValue">Key Value</md-option>\n                        </md-select>\n                        <div ng-messages="zohoAccountItemForm.type.$error" ng-show="zohoAccountItemForm.type.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n                        <label translate="INTEGRATIONS.CONTENT">Content</label>\n                        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n                        <div ng-messages="zohoAccountItemForm.content.$error" ng-show="zohoAccountItemForm.content.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <div ng-if="vm.item.type == \'keyValue\'">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.KEY">Key</label>\n                            <input type="text" name="key" ng-model="vm.item.key" required md-autofocus>\n                            <div ng-messages="zohoAccountItemForm.key.$error" ng-show="zohoAccountItemForm.key.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.KEY_REQUIRED">Key field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.TYPE">Type</label>\n                            <md-select name="keyType" ng-model="vm.item.keyType" required>\n                                <md-option value="string">String</md-option>\n                                <md-option value="variable">Variable</md-option>\n                                <md-option value="customVariable">Custom Variable</md-option>\n                            </md-select>\n                            <div ng-messages="zohoAccountItemForm.keyType.$error" ng-show="zohoAccountItemForm.keyType.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'string\'">\n                            <label translate="INTEGRATIONS.CONTENT">Content</label>\n                            <input type="text" name="keyContent" ng-model="vm.item.keyContent" required md-autofocus>\n                            <div ng-messages="zohoAccountItemForm.keyContent.$error" ng-show="zohoAccountItemForm.keyContent.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'variable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n                                <md-optgroup label="Voice: Queue">\n                                    <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Voice: Outbound">\n                                    <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="zohoAccountItemForm.variableName.$error" ng-show="zohoAccountItemForm.variableName.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n\n                        <md-input-container class="md-block" ng-if="vm.item.keyType == \'customVariable\'">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select ng-model="vm.item.VariableId" required>\n                                <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n                            </md-select>\n                        </md-input-container>\n                    </div>\n                    \x3c!-- / DESCRIPTION SECTION --\x3e\n                </div>\n                <div ng-switch-when="field">\n                    \x3c!-- FIELD SECTION --\x3e\n                    <div ng-if="vm.accountConnected">\n                        <md-input-container class="md-block">\n                            <label translate="INTEGRATIONS.FIELD">FIELD</label>\n                            <md-select name="customField" ng-model="vm.customField" required>\n                                <md-optgroup label="Standard">\n                                    <md-option ng-value="standard" ng-repeat="standard in vm.fields | filter: {custom: false} ">{{standard.name}}</md-option>\n                                </md-optgroup>\n                                <md-optgroup label="Custom">\n                                    <md-option ng-value="custom" ng-repeat="custom in vm.fields | filter: {custom: true} ">{{custom.name}}</md-option>\n                                </md-optgroup>\n                            </md-select>\n                            <div ng-messages="zohoAccountItemForm.customField.$error" ng-show="zohoAccountItemForm.customField.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.FIELD_REQUIRED">Field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- CUSTOM FIELD --\x3e\n                        <div ng-if="vm.customField && vm.customField.custom" ng-include="\'/subject.html\'"></div>\n                        \x3c!-- / CUSTOM FIELD --\x3e\n                        \x3c!-- STANDARD FIELD --\x3e\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <md-select name="option" ng-model="vm.item.content" required>\n                                <md-option ng-value="option.value" ng-repeat="option in vm.customField.options">{{option.name}}</md-option>\n                            </md-select>\n                            <div ng-messages="zohoAccountItemForm.option.$error" ng-show="zohoAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        <md-input-container class="md-block" ng-if="vm.customField && !vm.customField.custom && !vm.customField.options.length">\n                            <label translate="INTEGRATIONS.VALUE">Value</label>\n                            <input type="text" name="option" ng-model="vm.item.content" required>\n                            <div ng-messages="zohoAccountItemForm.option.$error" ng-show="zohoAccountItemForm.option.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="INTEGRATIONS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                                </div>\n                            </div>\n                        </md-input-container>\n                        \x3c!-- / STANDARD FIELD --\x3e\n                    </div>\n                    <div ng-if="!vm.accountConnected">\n                        <p>Account is not connected. Please check your configurations!</p>\n                    </div>\n                    \x3c!-- / FIELD SECTION --\x3e\n                </div>\n                <div ng-switch-default>\n                    <p>No Item</p>\n                </div>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newItem" ng-click="vm.saveItem()" class="send-button md-accent md-raised" ng-disabled="zohoAccountItemForm.$invalid || zohoAccountItemForm.$pristine" aria-label="SAVE" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newItem" ng-click="vm.addNewItem()" class="send-button md-accent md-raised" ng-disabled="zohoAccountItemForm.$invalid || zohoAccountItemForm.$pristine" aria-label="ADD" translate="INTEGRATIONS.ADD" translate-attr-aria-label="INTEGRATIONS.ADD">\n                    ADD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newItem" ng-click="vm.deleteItem($event)" aria-label="DELETE" translate translate-attr-aria-label="INTEGRATIONS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>\n\n<script type="text/ng-template" id="/subject.html">\n    <md-input-container class="md-block">\n        <label translate="INTEGRATIONS.TYPE">Type</label>\n        <md-select name="type" ng-model="vm.item.type" required>\n            <md-option value="string">String</md-option>\n            <md-option value="variable">Variable</md-option>\n            <md-option value="customVariable">Custom Variable</md-option>\n        </md-select>\n        <div ng-messages="zohoAccountItemForm.type.$error" ng-show="zohoAccountItemForm.type.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'string\'">\n        <label translate="INTEGRATIONS.CONTENT">Content</label>\n        <input type="text" name="content" ng-model="vm.item.content" required md-autofocus>\n        <div ng-messages="zohoAccountItemForm.content.$error" ng-show="zohoAccountItemForm.content.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.CONTENT_REQUIRED">Content field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'variable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select name="variableName" ng-model="vm.item.variableName" md-selected-text="vm.getSelectedVariable()" required>\n            <md-optgroup label="Voice: Queue">\n                <md-option ng-value="agentColumn" ng-repeat="agentColumn in vm.voiceAgentReportColumns">{{agentColumn}}</md-option>\n            </md-optgroup>\n            <md-optgroup label="Voice: Outbound">\n                <md-option ng-value="dialColumn" ng-repeat="dialColumn in vm.voiceDialReportColumns">{{dialColumn}}</md-option>\n            </md-optgroup>\n        </md-select>\n        <div ng-messages="zohoAccountItemForm.variableName.$error" ng-show="zohoAccountItemForm.variableName.$touched" role="alert">\n            <div ng-message="required">\n                <span translate="INTEGRATIONS.ERRORS.VARIABLENAME_REQUIRED">Variable name field is required</span>\n            </div>\n        </div>\n    </md-input-container>\n\n    <md-input-container class="md-block" ng-if="vm.item.type == \'customVariable\'">\n        <label translate="INTEGRATIONS.VALUE">Value</label>\n        <md-select ng-model="vm.item.VariableId" required>\n            <md-option ng-value="variable.id" ng-repeat="variable in vm.variables">{{variable.name}}</md-option>\n        </md-select>\n    </md-input-container>\n<\/script>'),e.put("app/main/apps/integrations/views/zohoAccounts/edit/view.html",'<div id="integrations-zohoAccount" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-zohoAccounts-button md-icon-button" aria-label="Go to zohoAccounts" ng-click="vm.gotoZohoAccounts()" translate translate-attr-aria-label="INTEGRATIONS.GO_TO_ZOHOACCOUNTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="zohoAccount-image" hide-xs>\n                    <img ng-src="assets/images/business/zohoAccounts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.zohoAccount.id}}\n                        <span ng-if="vm.zohoAccount.name">{{vm.zohoAccount.name}}</span>\n                        <span ng-if="vm.zohoAccount.exten">{{vm.zohoAccount.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="INTEGRATIONS.CREATED_AT"></span> <span>{{vm.zohoAccount.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveZohoAccount()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (configurationsForm.$invalid)" translate="INTEGRATIONS.SAVE" translate-attr-aria-label="INTEGRATIONS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.ACCOUNT">ACCOUNT</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="zohoAccount-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.zohoAccount.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.HOST">Host</label>\n                                <md-select name="host" ng-model="vm.zohoAccount.host" required>\n                                    <md-option ng-value="\'zoho.com\'">zoho.com</md-option>\n                                    <md-option ng-value="\'zoho.eu\'">zoho.eu</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'host\'].$error" ng-show="generalForm[\'host\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.HOST_REQUIRED">Host field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.AUTHTOKEN">AuthToken</label>\n                                <input type="text" name="authToken" ng-model="vm.zohoAccount.authToken" ng-required="true">\n                                <div ng-messages="generalForm[\'authToken\'].$error" ng-show="generalForm[\'authToken\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.AUTHTOKEN_REQUIRED">AuthToken field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.MOTIONPROXYADDRESS">MotionProxyAddress</label>\n                                <input type="url" name="serverUrl" ng-model="vm.zohoAccount.serverUrl">\n                                <div class="hint"><span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span></div>\n                                <div ng-messages="generalForm[\'serverUrl\'].$error" ng-show="generalForm[\'serverUrl\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED">MotionProxyAddress field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL">MotionProxyAddress must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="INTEGRATIONS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.zohoAccount.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="zohoAccount-detail-form-container configurations md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</div>\n                        </div>\n                        <div ng-controller="ZohoAccountConfigurationsController as vm_cc" ng-init="vm_cc.init(vm.zohoAccount)" layout="row">\n                            <md-card class="md-whiteframe-1dp" flex="30">\n                                <div layout="row" layout-align="center center">\n                                    <md-subheader flex="75" class="md-no-sticky">{{ \'INTEGRATIONS.CONFIGURATIONS\' | translate }}</md-subheader>\n                                    <md-button flex="25" ng-click="vm_cc.createOrEditZohoConfiguration($event)" class="md-icon-button" aria-label="create zohoConfiguration">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                                <md-list>\n                                    <md-list-item layout="row" layout-align="center center" ng-repeat="zohoConfiguration in vm_cc.configurations" class="border-top" md-colors="{background: (vm_cc.selectedZohoConfiguration == $index ? \'accent\' : \'grey-A100\')}" ng-click="vm_cc.getZohoConfiguration($index)">\n                                        <span class="text-truncate" flex="80">{{ zohoConfiguration.name }}</span>\n                                        <md-menu ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_cc.deleteZohoConfiguration($event, zohoConfiguration)" translate="INTEGRATIONS.DELETE_ZOHOCONFIGURATION">\n                                                        Delete ZohoConfiguration\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </md-list-item>\n                                </md-list>\n                            </md-card>\n                            <div flex></div>\n                            <md-card class="md-whiteframe-1dp" flex="65">\n                                <md-tabs ng-if="vm_cc.configurations.length" md-dynamic-height>\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.SUBJECTS">SUBJECTS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.subject = query" on-collapse="vm_cc.query.subject = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditSubject($event)" aria-label="add subject" translate translate-attr-label="INTEGRATIONS.ADD_SUBJECT">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedSubjects.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedSubjects.length}} {{vm_cc.selectedSubjects.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedSubjects($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedSubjects">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="subject" md-select-id="id" ng-repeat="subject in vm_cc.subjects | filter: vm_cc.query.subject">\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="id ">{{subject.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell class="type ">\n                                                                <span ng-if="subject.FieldId">{{subject.nameField || subject.idField}}</span>\n                                                                <span ng-if="!subject.FieldId">{{subject.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="subject.type" ng-click="vm_cc.createOrEditSubject($event, subject)" md-cell>\n                                                                <span ng-switch-when="string">{{subject.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{subject.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{subject.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{subject.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[subject.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{subject.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditSubject($event, subject)" translate="INTEGRATIONS.EDIT_SUBJECT">\n                                                                                Edit Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteSubjectConfirm($event, subject)" translate="INTEGRATIONS.DELETE_SUBJECT">\n                                                                                Delete Subject\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.DESCRIPTIONS">DESCRIPTIONS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.description = query" on-collapse="vm_cc.query.description = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditDescription($event)" aria-label="add description" translate translate-attr-label="INTEGRATIONS.ADD_DESCRIPTION">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedDescriptions.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedDescriptions.length}} {{vm_cc.selectedDescriptions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedDescriptions($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedDescriptions">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="description" md-select-id="id" ng-repeat="description in vm_cc.descriptions | filter: vm_cc.query.description">\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="id ">{{description.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditDescription($event, description)" md-cell class="type ">\n                                                                <span ng-if="description.FieldId">{{description.nameField || description.idField}}</span>\n                                                                <span ng-if="!description.FieldId">{{description.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="description.type" ng-click="vm_cc.createOrEditDescription($event, description)" md-cell>\n                                                                <span ng-switch-when="string">{{description.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{description.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{description.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{description.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[description.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{description.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditDescription($event, description)" translate="INTEGRATIONS.EDIT_DESCRIPTION">\n                                                                                Edit Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteDescriptionConfirm($event, description)" translate="INTEGRATIONS.DELETE_DESCRIPTION">\n                                                                                Delete Description\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n                                    <md-tab>\n                                        <md-tab-label>\n                                            <span translate="INTEGRATIONS.FIELDS">FIELDS</span>\n                                        </md-tab-label>\n                                        <md-tab-body>\n                                            <md-toolbar class="md-table-toolbar md-default no-padding" ng-hide="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <div flex></div>\n                                                    <ms-search-bar on-search="vm_cc.query.field = query" on-collapse="vm_cc.query.field = undefined" debounce="300"></ms-search-bar>\n                                                    <md-button class="md-icon-button" ng-click="vm_cc.createOrEditField($event)" aria-label="add field" translate translate-attr-label="INTEGRATIONS.ADD_FIELD">\n                                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_cc.selectedFields.length">\n                                                <div class="md-toolbar-tools">\n                                                    <span class="md-subhead">{{vm_cc.selectedFields.length}} {{vm_cc.selectedFields.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                                    <div flex></div>\n                                                    <md-button ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_cc.deleteSelectedFields($event)" aria-label="delete selected" translate translate-attr-label="INTEGRATIONS.DELETE_SELECTED">\n                                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                                    </md-button>\n                                                </div>\n                                            </md-toolbar>\n                                            <md-table-container class="md-whiteframe-1dp padding-horizontal">\n                                                <table md-table md-row-select multiple ng-model="vm_cc.selectedFields">\n                                                    <thead md-head>\n                                                        <tr md-row>\n                                                            <th md-column>{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.TYPE\' | translate }}</th>\n                                                            <th md-column>{{ \'INTEGRATIONS.CONTENT\' | translate }}</th>\n                                                            <th md-column width="10px"></th>\n                                                        </tr>\n                                                    </thead>\n                                                    <tbody md-body>\n                                                        <tr md-row md-select="field" md-select-id="id" ng-repeat="field in vm_cc.fields | filter: vm_cc.query.field">\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="id ">{{field.id}}</td>\n                                                            <td ng-click="vm_cc.createOrEditField($event, field)" md-cell class="type ">\n                                                                <span ng-if="field.FieldId">{{field.nameField || field.idField}}</span>\n                                                                <span ng-if="!field.FieldId">{{field.type}}</span>\n                                                            </td>\n                                                            <td ng-switch="field.type" ng-click="vm_cc.createOrEditField($event, field)" md-cell>\n                                                                <span ng-switch-when="string">{{field.content}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                <span ng-switch-when="keyValue">\n                                {{field.key}}\n                                <span ng-switch="description.keyType">\n                                    <span ng-switch-when="string">{{field.keyContent}}</span>\n                                                                <span ng-switch-when="variable" class="text-boxed">{{field.variableName}}</span>\n                                                                <span ng-switch-when="customVariable" class="text-boxed">{{ vm_cc.variablesById[field.VariableId].name }}</span>\n                                                                </span>\n                                                                </span>\n                                                                <span ng-switch-default>{{field.content}}</span>\n                                                            </td>\n                                                            <td md-cell class="actions">\n                                                                <md-menu>\n                                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                                    </md-button>\n\n                                                                    <md-menu-content width="3">\n                                                                        <md-menu-item>\n                                                                            <md-button ng-click="vm_cc.createOrEditField($event, field)" translate="INTEGRATIONS.EDIT_FIELD">\n                                                                                Edit Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                        <md-menu-item ng-if="vm_cc.currentUser.crudPermissions === 0 || vm_cc.currentUser.role === \'admin\'">\n                                                                            <md-button ng-click="vm_cc.deleteFieldConfirm($event, field)" translate="INTEGRATIONS.DELETE_FIELD">\n                                                                                Delete Field\n                                                                            </md-button>\n                                                                        </md-menu-item>\n                                                                    </md-menu-content>\n                                                                </md-menu>\n                                                            </td>\n                                                        </tr>\n                                                    </tbody>\n                                                </table>\n                                            </md-table-container>\n                                        </md-tab-body>\n                                    </md-tab>\n\n\n                                </md-tabs>\n                                <div class="padding-20" ng-if="!vm_cc.configurations.length" ng-click="vm_cc.createOrEditZohoConfiguration($event)" layout="row" layout-sm="column" layout-align="center center" layout-wrap>\n                                    <div class="padding-20 md-whiteframe-3dp md-accent-bg" layout="column" layout-align="center center">\n                                        <md-button class="md-icon-button">\n                                            <md-icon md-font-icon="icon-plus"></md-icon>\n                                        </md-button>\n                                        <span aria-label="add configuration" translate translate-attr-label="INTEGRATIONS.ADD_CONFIGURATION">ADD CONFIGURATION</span>\n                                    </div>\n                                </div>\n                            </md-card>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/integrations/views/zohoAccounts/zohoAccounts.html",'<div id="zohoAccounts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-heart" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="INTEGRATIONS.ZOHOACCOUNTS">ZohoAccounts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="INTEGRATIONS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedZohoAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedZohoAccounts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="INTEGRATIONS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-zohoAccounts-count">\n                    <span>{{vm.selectedZohoAccounts.length}}</span>\n                <span translate="INTEGRATIONS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="ZOHOACCOUNTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllZohoAccounts()" translate="INTEGRATIONS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectZohoAccounts()" translate="INTEGRATIONS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedZohoAccounts" csv-label="true" filename="zohoAccounts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedZohoAccounts($event)" aria-label="delete selected" translate translate-attr-label="ZOHOACCOUNTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- ZOHOACCOUNT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedZohoAccounts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getZohoAccounts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'INTEGRATIONS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'INTEGRATIONS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="host">{{ \'INTEGRATIONS.HOST\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.zohoAccounts.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="INTEGRATIONS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="zohoAccount" md-select-id="id" ng-repeat="zohoAccount in vm.zohoAccounts.rows">\n                                <td md-cell ng-if="zohoAccount.userpic"><img class="avatar" alt="{{zohoAccount.name}}" ng-src="api/users/{{zohoAccount.id}}/avatar" /></td>\n                                <td md-cell ng-if="!zohoAccount.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{zohoAccount.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditZohoAccount($event, zohoAccount)" md-cell class="id ">{{zohoAccount.id}}</td>\n                                <td ng-click="vm.createOrEditZohoAccount($event, zohoAccount)" md-cell class="name ">{{zohoAccount.name}}</td>\n                                <td ng-click="vm.createOrEditZohoAccount($event, zohoAccount)" md-cell class="host ">{{ vm.arrayhost[zohoAccount.host].option }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="INTEGRATIONS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(zohoAccount, $event)" translate="INTEGRATIONS.EDIT_ZOHOACCOUNT">\n                                                    Edit ZohoAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.testtestintegrationaccount(zohoAccount, $event)" translate="INTEGRATIONS.TEST_ZOHOACCOUNT">\n                                                    Test ZohoAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(zohoAccount, $event)" translate="INTEGRATIONS.DELETE_ZOHOACCOUNT">\n                                                    Delete ZohoAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'INTEGRATIONS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'INTEGRATIONS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'INTEGRATIONS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.zohoAccounts.count}}" md-on-paginate="vm.getZohoAccounts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / ZOHOACCOUNT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD ZOHOACCOUNT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-zohoAccount-button" ng-click="vm.createOrEditZohoAccount($event)" aria-label="add zohoAccount" translate translate-attr-aria-label="INTEGRATIONS.ADD_ZOHOACCOUNT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD ZOHOACCOUNT BUTTON --\x3e\n</div>'),e.put("app/main/apps/jscripty/views/projects/create/dialog.html",'<md-dialog class="project-dialog" aria-label="New Project">\n    <form name="projectForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="JSCRIPTY.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.project.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newProject">\n                <div class="hint"><span translate="JSCRIPTY.HELP.NAME"></span></div>\n                <div ng-messages="projectForm[\'name\'].$error" ng-show="projectForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="JSCRIPTY.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="JSCRIPTY.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="JSCRIPTY.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.project.description">\n                <div ng-messages="projectForm[\'description\'].$error" ng-show="projectForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="JSCRIPTY.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newProject" ng-click="vm.saveProject()" class="send-button md-accent md-raised" ng-disabled="projectForm.$invalid || projectForm.$pristine" aria-label="SAVE" translate="JSCRIPTY.SAVE" translate-attr-aria-label="JSCRIPTY.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newProject" ng-click="vm.addNewProject()" class="send-button md-accent md-raised" ng-disabled="projectForm.$invalid" aria-label="ADD" translate="JSCRIPTY.ADD_PROJECT" translate-attr-aria-label="JSCRIPTY.ADD_PROJECT">\n                    ADD PROJECT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newProject" ng-click="vm.deleteProject($event)" aria-label="DELETE" translate translate-attr-aria-label="JSCRIPTY.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="JSCRIPTY.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/jscripty/views/projects/edit/clone/clone.html",'<md-dialog class="project-dialog" aria-label="Clone Project">\n    <form name="projectForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="JSCRIPTY.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.project.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newProject">\n                <div class="hint"><span translate="JSCRIPTY.HELP.NAME"></span></div>\n                <div ng-messages="projectForm[\'name\'].$error" ng-show="projectForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="JSCRIPTY.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="JSCRIPTY.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <md-button type="submit" ng-click="vm.cloneProject()" class="send-button md-accent md-raised" ng-disabled="projectForm.$invalid" aria-label="CLONE" translate="JSCRIPTY.CLONE_PROJECT" translate-attr-aria-label="JSCRIPTY.CLONE_PROJECT">\n                CLONE PROJECT\n            </md-button>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/jscripty/views/projects/edit/sessions/dialog.html",'<md-dialog class="session-dialog" aria-label="New Session">\n    <form name="sessionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <md-list>\n                <md-subheader class="md-no-sticky">\n                    <div class="margin-bottom-5"><span translate="JSCRIPTY.ANSWERS">Answers</span></div>\n                    <div class="subtitle secondary-text">\n                        <span translate="JSCRIPTY.STARTTIME" class="ng-scope font-weight-700">Start Time</span>: <span class="ng-binding">{{vm.session.starttime | date:\'medium\'}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="JSCRIPTY.MEMBERNAME" class="ng-scope font-weight-700">Member Name</span>: <span class="ng-binding">{{vm.session.membername}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="JSCRIPTY.PROJECT" class="ng-scope font-weight-700">Project</span>: <span class="ng-binding">{{vm.project.name}}</span>\n                    </div>\n                </md-subheader>\n                <md-list-item ng-if="vm.questions.rows.length" class="md-2-line contact-item" ng-repeat="question in vm.questions.rows">\n                    <div class="md-list-item-text compact">\n                        <h3>{{$index+1}}. {{question.question}}</h3>\n                        <p>{{question.answer}}</p>\n                    </div>\n                    <md-divider ng-if="!$last"></md-divider>\n                </md-list-item>\n                <md-list-item ng-if="!vm.questions.rows.length" class="md-2-line contact-item">\n                    <div class="md-list-item-text compact">\n                        <h3><span class="text-boxed-ligth" translate="JSCRIPTY.NO_RESULTS_AVAILABLE">No results available</span></h3>\n                    </div>\n                </md-list-item>\n            </md-list>\n\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/jscripty/views/projects/edit/view.html",'<div id="jscripty-project" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-projects-button md-icon-button" aria-label="Go to projects" ng-click="vm.gotoProjects()" translate translate-attr-aria-label="JSCRIPTY.GO_TO_PROJECTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="project-image" hide-xs>\n                    <img ng-src="assets/images/business/projects.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.project.id}}\n                        <span ng-if="vm.project.name">{{vm.project.name}}</span>\n                        <span ng-if="vm.project.exten">{{vm.project.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="JSCRIPTY.CREATED_AT"></span> <span>{{vm.project.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.clonedialog(vm.project, $event)" class="md-fab md-green-500-bg md-icon-button" aria-label="clone">\n                <md-tooltip><span translate="JSCRIPTY.CLONE_PROJECT"></span></md-tooltip>\n                <md-icon md-font-icon="icon-content-duplicate"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveProject()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (builderForm.$invalid) || (previewForm.$invalid) || (sessionsForm.$invalid) || (answersForm.$invalid)" translate="JSCRIPTY.SAVE"\n                translate-attr-aria-label="JSCRIPTY.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="JSCRIPTY.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="project-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="JSCRIPTY.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="JSCRIPTY.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.project.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="JSCRIPTY.HELP.NAME"></span></div>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="JSCRIPTY.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="JSCRIPTY.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.project.enableUncompleteSave" aria-label="EnableUncompleteSave"><span translate="JSCRIPTY.ENABLEUNCOMPLETESAVE">EnableUncompleteSave</span></md-switch>\n                                <div class="hint"><span translate="JSCRIPTY.HELP.ENABLEUNCOMPLETESAVE"></span></div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="JSCRIPTY.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.project.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="JSCRIPTY.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="JSCRIPTY.BUILDER">BUILDER</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="project-detail-form-container builder md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="ProjectBuilderController as vm_bc" ng-init="vm_bc.init(vm.project)">\n                            <mw-form-builder ng-if="vm_bc.project.formData" form-data="vm_bc.project.formData" options="vm_bc.optionsBuilder" read-only="false"></mw-form-builder>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="JSCRIPTY.PREVIEW">PREVIEW</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="project-detail-form-container preview md-background-bg md-whiteframe-1dp">\n                        <div layout="column" layout-align="center" ng-controller="ProjectViewerController as vm_vc" ng-init="vm_vc.init(vm.project)">\n                            <div layout="row" layout-align="center">\n                                <md-button class="md-raised md-accent" aria-label="Reset" ng-click="vm_vc.resetViewer()">\n                                    Reset\n                                </md-button>\n                            </div>\n                            <mw-form-viewer ng-if="vm_vc.project.formData" form-data="vm_vc.project.formData" response-data="vm_vc.responseData" on-submit="vm_vc.onSubmit($event)" api="vm_vc.formViewer"></mw-form-viewer>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="JSCRIPTY.SESSIONS">SESSIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="project-detail-form-container sessions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="ProjectSessionsController as vm_dc" ng-init="vm_dc.init(vm.project)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedProjectSessions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="JSCRIPTY.SESSIONS">Sessions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedProjectSessions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedProjectSessions.length}} {{vm_dc.selectedProjectSessions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedProjectSessions" csv-label="true" filename="projects.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedProjectSessions($event)" aria-label="delete selected" translate translate-attr-label="PROJECTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedProjectSessions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getProjectSessions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'JSCRIPTY.ID\' | translate }}</th>\n                                            <th md-column md-order-by="starttime">{{ \'JSCRIPTY.STARTTIME\' | translate }}</th>\n                                            <th md-column md-order-by="endtime">{{ \'JSCRIPTY.ENDTIME\' | translate }}</th>\n                                            <th md-column md-order-by="membername">{{ \'JSCRIPTY.MEMBERNAME\' | translate }}</th>\n                                            <th md-column md-order-by="calleridnum">{{ \'JSCRIPTY.CALLERIDNUM\' | translate }}</th>\n                                            <th md-column md-order-by="completed">{{ \'JSCRIPTY.COMPLETE\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="session" md-select-id="id" ng-repeat="session in vm_dc.projectSessions.rows">\n                                            <td md-cell>{{session.id}}</td>\n                                            <td md-cell>{{session.starttime | date:\'medium\'}}</td>\n                                            <td md-cell>{{session.endtime | date:\'medium\'}}</td>\n                                            <td md-cell>{{session.membername}}</td>\n                                            <td md-cell>{{session.calleridnum}}</td>\n                                            <td md-cell class="completed ">\n                                                <md-icon md-colors="{color: {{session.completed ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{session.completed? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                            </td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="JSCRIPTY.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.showQuestionsProjectSession($event, session)" translate="JSCRIPTY.SHOW_QUESTIONS_SESSION">\n                                                                Results Session\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(session, $event)" translate="JSCRIPTY.DELETE_SESSION">\n                                                                Delete Session\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.projectSessions.rows.length">\n                                            <td md-cell colspan="8">\n                                                <span class="text-boxed-ligth" translate="JSCRIPTY.NO_SESSION_AVAILABLE">No session available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'JSCRIPTY.PAGE\' | translate}}:\', rowsPerPage: \'{{\'JSCRIPTY.ROWSPERPAGE\' | translate}}:\', of: \'{{\'JSCRIPTY.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.projectSessions.count}}" md-on-paginate="vm_dc.getProjectSessions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="JSCRIPTY.ANSWERS">ANSWERS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="project-detail-form-container answers md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="ProjectAnswersController as vm_an" ng-init="vm_an.init(vm.project)">\n                            <div class="pb-16" layout="row" layout-align="space-between center">\n                                <div class="h2 secondary-text" translate="JSCRIPTY.ANSWERS">Answers</div>\n                                <md-date-range localization-map="vm_an.localizationMap" ng-model="vm_an.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm_an.getAnswers()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n                                <md-button type="button" ng-disabled="!vm_an.answers" ng-click="vm_an.getSummary($event)" class="md-accent md-raised md-button ng-scope md-default-theme md-ink-ripple md-green-500-bg md-icon-button" title="{{\'JSCRIPTY.EXPORT_TO_CSV\' | translate}}">\n                                    <md-icon md-font-icon="icon-file-excel" class="md-default-theme md-font material-icons icon-file-excel"></md-icon>\n                                </md-button>\n                            </div>\n                            <div layout="row">\n                                <md-card class="md-whiteframe-1dp" ng-if="vm_an.answers && vm_an.hasIdAnswers" flex>\n                                    <md-list>\n                                        <md-list-item class="md-2-line contact-item" ng-repeat="(key, question) in vm_an.answers">\n                                            <div class="md-list-item-text compact" layout-padding>\n                                                <h3>{{question.question}}</h3>\n                                                <md-table-container>\n                                                    <table md-table>\n                                                        <thead md-head>\n                                                            <tr md-row>\n                                                                <th md-column></th>\n                                                                <th md-column>#</th>\n                                                                <th md-column>%</th>\n                                                            </tr>\n                                                        </thead>\n                                                        <tbody md-body>\n                                                            <tr md-row ng-repeat="(key, value) in question.answers">\n                                                                <td md-cell>{{key}}</td>\n                                                                <td md-cell width="20px">{{value}}</td>\n                                                                <td md-cell width="20px">{{value*100/question.sum | number:1}}</td>\n                                                            </tr>\n                                                            <tr md-row>\n                                                                <td md-cell><b>{{\'JSCRIPTY.TOTAL\' | translate}}</b></td>\n                                                                <td md-cell width="20px"><b>{{question.sum}}</b></td>\n                                                                <td md-cell width="20px"><b>100</b></td>\n                                                            </tr>\n                                                        </tbody>\n                                                    </table>\n                                                </md-table-container>\n                                            </div>\n                                            <md-divider ng-if="!$last"></md-divider>\n                                        </md-list-item>\n                                    </md-list>\n                                </md-card>\n                                <span ng-if="!vm_an.answers || !vm_an.hasIdAnswers" class="text-boxed-ligth" translate="JSCRIPTY.NO_ANSWERS_AVAILABLE">No answers available</span>\n                            </div>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/jscripty/views/projects/projects.html",'<div id="projects" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-script" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="JSCRIPTY.PROJECTS">Projects</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="JSCRIPTY.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedProjects.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedProjects =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="JSCRIPTY.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-projects-count">\n                    <span>{{vm.selectedProjects.length}}</span>\n                <span translate="JSCRIPTY.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="PROJECTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllProjects()" translate="JSCRIPTY.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectProjects()" translate="JSCRIPTY.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedProjects" csv-label="true" filename="projects.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedProjects($event)" aria-label="delete selected" translate translate-attr-label="PROJECTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- PROJECT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedProjects" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getProjects">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'JSCRIPTY.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'JSCRIPTY.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'JSCRIPTY.DESCRIPTION\' | translate }}</th>\n                                <th md-column md-order-by="createdAt">{{ \'JSCRIPTY.CREATED_AT\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.projects.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="JSCRIPTY.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="project" md-select-id="id" ng-repeat="project in vm.projects.rows">\n                                <td md-cell ng-if="project.userpic"><img class="avatar" alt="{{project.name}}" ng-src="api/users/{{project.id}}/avatar" /></td>\n                                <td md-cell ng-if="!project.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{project.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditProject($event, project)" md-cell class="id ">{{project.id}}</td>\n                                <td ng-click="vm.createOrEditProject($event, project)" md-cell class="name ">{{project.name}}</td>\n                                <td ng-click="vm.createOrEditProject($event, project)" md-cell class="description ">{{project.description}}</td>\n                                <td ng-click="vm.createOrEditProject($event, project)" md-cell class="createdAt ">{{project.createdAt | date:\'medium\' }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="JSCRIPTY.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(project, $event)" translate="JSCRIPTY.EDIT_PROJECT">\n                                                    Edit Project\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.clonedialog(project, $event)" translate="JSCRIPTY.CLONE_PROJECT">\n                                                    clone Project\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.sessionsgoto(project, $event)" translate="JSCRIPTY.SESSIONS_PROJECT">\n                                                    Sessions Project\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(project, $event)" translate="JSCRIPTY.DELETE_PROJECT">\n                                                    Delete Project\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'JSCRIPTY.PAGE\' | translate}}:\', rowsPerPage: \'{{\'JSCRIPTY.ROWSPERPAGE\' | translate}}:\', of: \'{{\'JSCRIPTY.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.projects.count}}" md-on-paginate="vm.getProjects" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / PROJECT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD PROJECT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-project-button" ng-click="vm.createOrEditProject($event)" aria-label="add project" translate translate-attr-aria-label="JSCRIPTY.ADD_PROJECT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD PROJECT BUTTON --\x3e\n</div>'),e.put("app/main/apps/mail/views/mailAccounts/create/dialog.html",'<md-dialog class="mailAccount-dialog" aria-label="New MailAccount">\n    <form name="mailAccountForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.mailAccount.name" ng-required="true" autofocus>\n                <div ng-messages="mailAccountForm[\'name\'].$error" ng-show="mailAccountForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.KEY">key</label>\n                <input type="text" name="key" ng-model="vm.mailAccount.key" md-maxlength="5" ng-required="true">\n                <div ng-messages="mailAccountForm[\'key\'].$error" ng-show="mailAccountForm[\'key\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.KEY_REQUIRED">key field is required</span>\n                    </div>\n\n                    <div ng-message="md-maxlength">\n                        <span translate="MAIL.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 5}\'>key must have a maximum length equal to 5</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.EMAIL_ADDRESS">Email_Address</label>\n                <input type="email" name="email" ng-model="vm.mailAccount.email" ng-required="true">\n                <div ng-messages="mailAccountForm[\'email\'].$error" ng-show="mailAccountForm[\'email\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.EMAIL_ADDRESS_REQUIRED">Email_Address field is required</span>\n                    </div>\n                    <div ng-message="email">\n                        <span translate="MAIL.ERRORS.EMAIL_ADDRESS_MUST_VALID">Email_Address must be a valid e-mail address</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.LIST">List</label>\n                <md-select name="ListId" ng-model="vm.mailAccount.ListId" required>\n                    <md-option ng-value="ListId.id" ng-repeat="ListId in vm.lists">{{ ListId.name }}</md-option>\n                </md-select>\n                <div ng-messages="mailAccountForm[\'ListId\'].$error" ng-show="mailAccountForm[\'ListId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.LIST_REQUIRED">List field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.mailAccount.active" aria-label="Active"><span translate="MAIL.ACTIVE">Active</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="vm.newMailAccount" class="md-block">\n                <label translate="MAIL.SERVICE">Service</label>\n                <md-select name="cservice" ng-model="vm.mailAccount.cservice" required>\n                    <md-option ng-value="null">Custom</md-option>\n                    <md-option ng-value="\'gmail\'">Gmail</md-option>\n                    <md-option ng-value="\'hotmail\'">Hotmail</md-option>\n                    <md-option ng-value="\'yahoo\'">Yahoo</md-option>\n                    <md-option ng-value="\'outlook365\'">Outlook365</md-option>\n                </md-select>\n                <div ng-messages="mailAccountForm[\'cservice\'].$error" ng-show="mailAccountForm[\'cservice\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.SERVICE_REQUIRED">Service field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="(vm.newMailAccount && vm.mailAccount.cservice == null) || (vm.newMailAccount == undefined && vm.mailAccount.Imap.service == null)" class="md-block">\n                <label translate="MAIL.IMAP_HOST">IMAP_Host</label>\n                <input type="text" name="Imap.host" ng-model="vm.mailAccount.Imap.host" ng-required="true">\n                <div ng-messages="mailAccountForm[\'Imap.host\'].$error" ng-show="mailAccountForm[\'Imap.host\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.IMAP_HOST_REQUIRED">IMAP_Host field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="(vm.newMailAccount && vm.mailAccount.cservice == null) || (vm.newMailAccount == undefined && vm.mailAccount.Imap.service == null)" class="md-block">\n                <label translate="MAIL.IMAP_PORT">IMAP_Port</label>\n                <input type="number" name="Imap.port" ng-model="vm.mailAccount.Imap.port" ng-required="true">\n                <div ng-messages="mailAccountForm[\'Imap.port\'].$error" ng-show="mailAccountForm[\'Imap.port\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.IMAP_PORT_REQUIRED">IMAP_Port field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="(vm.newMailAccount && vm.mailAccount.cservice == null) || (vm.newMailAccount == undefined && vm.mailAccount.Smtp.service == null)" class="md-block">\n                <label translate="MAIL.SMTP_HOST">SMTP_Host</label>\n                <input type="text" name="Smtp.host" ng-model="vm.mailAccount.Smtp.host" ng-required="true">\n                <div ng-messages="mailAccountForm[\'Smtp.host\'].$error" ng-show="mailAccountForm[\'Smtp.host\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.SMTP_HOST_REQUIRED">SMTP_Host field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="(vm.newMailAccount && vm.mailAccount.cservice == null) || (vm.newMailAccount == undefined && vm.mailAccount.Smtp.service == null)" class="md-block">\n                <label translate="MAIL.SMTP_PORT">SMTP_Port</label>\n                <input type="number" name="Smtp.port" ng-model="vm.mailAccount.Smtp.port" ng-required="true">\n                <div ng-messages="mailAccountForm[\'Smtp.port\'].$error" ng-show="mailAccountForm[\'Smtp.port\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.SMTP_PORT_REQUIRED">SMTP_Port field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.mailAccount.cservice !== undefined && vm.mailAccount.cservice == null && vm.newMailAccount" class="md-block">\n                <md-switch ng-model="vm.mailAccount.cauthentication" aria-label="Authentication"><span translate="MAIL.AUTHENTICATION">Authentication</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="(vm.mailAccount.cauthentication == true || vm.mailAccount.cservice != null) && vm.newMailAccount" class="md-block">\n                <label translate="MAIL.USERNAME">Username</label>\n                <input type="text" name="cuser" ng-model="vm.mailAccount.cuser" ng-required="true">\n                <div class="hint"><span translate="MAIL.HELP.USERNAME"></span></div>\n                <div ng-messages="mailAccountForm[\'cuser\'].$error" ng-show="mailAccountForm[\'cuser\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="(vm.mailAccount.cauthentication == true || vm.mailAccount.cservice != null) && vm.newMailAccount">\n                <label translate="MAIL.PASSWORD">Password</label>\n                <input type="password" name="cpassword" ng-model="vm.mailAccount.cpassword" placeholder="Password" translate translate-attr-placeholder="MAIL.PASSWORD" required>\n                <div class="hint"><span translate="MAIL.HELP.PASSWORD"></span></div>\n                <div ng-messages="mailAccountForm[\'cpassword\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="MAIL.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="MAIL.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.mailAccount.description">\n                <div ng-messages="mailAccountForm[\'description\'].$error" ng-show="mailAccountForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newMailAccount" ng-click="vm.saveMailAccount()" class="send-button md-accent md-raised" ng-disabled="mailAccountForm.$invalid || mailAccountForm.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newMailAccount" ng-click="vm.addNewMailAccount()" class="send-button md-accent md-raised" ng-disabled="mailAccountForm.$invalid" aria-label="ADD" translate="MAIL.ADD_MAILACCOUNT" translate-attr-aria-label="MAIL.ADD_MAILACCOUNT">\n                    ADD MAILACCOUNT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newMailAccount" ng-click="vm.deleteMailAccount($event)" aria-label="DELETE" translate translate-attr-aria-label="MAIL.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="MAIL.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/apps/agent/dialog.html",'<md-dialog class="mailAccount-dialog" aria-label="New MailAccount">\n    <form name="mailAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.AGENT">Agent</label>\n                <md-select name="agent" ng-model="vm.agent.agent" required autofocus>\n                    <md-option ng-value="agent.name" ng-repeat="agent in vm.agents">{{ agent.name }}</md-option>\n                </md-select>\n                <div ng-messages="mailAccountFormApp[\'agent\'].$error" ng-show="mailAccountFormApp[\'agent\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.AGENT_REQUIRED">Agent field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.agent.timeout" min="0" max="2147483" ng-required="true">\n                <div ng-messages="mailAccountFormApp[\'timeout\'].$error" ng-show="mailAccountFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MAIL.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="MAIL.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveMailAccountApp()" class="send-button md-accent md-raised" ng-disabled="mailAccountFormApp.$invalid || mailAccountFormApp.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/apps/autoreply/dialog.html",'<md-dialog class="mailAccount-dialog" aria-label="New MailAccount">\n    <form name="mailAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.TIMES">times</label>\n                <md-select name="times" ng-model="vm.autoreply.times" required autofocus>\n                    <md-option ng-value="1">One Time</md-option>\n                    <md-option ng-value="0">Always</md-option>\n                </md-select>\n                <div ng-messages="mailAccountFormApp[\'times\'].$error" ng-show="mailAccountFormApp[\'times\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.TIMES_REQUIRED">times field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div class="md-block">\n                <label class="md-caption grey-fg" translate="MAIL.TEXT">Text</label>\n                <textarea aria-label="Text text" ckeditor="{ skin: \'office2013\', language: \'en\', allowedContent: true, extraPlugins: \'font,colorbutton,autoembed,autocorrect,googlethisterm,pastebase64\', toolbarGroups: [{ name: \'styles\', groups: [\'styles\'] }, { name: \'clipboard\', groups: [\'undo\'] }, { name: \'colors\', groups: [\'colors\'] }, { name: \'basicstyles\', groups: [\'basicstyles\'] }, { name: \'paragraph\', groups: [\'list\', \'indent\', \'align\'] }, { name: \'mode\' }], autocorrect_enabled: true, disableNativeSpellChecker: false, removePlugins: \'magicline\' }"\n                    ng-model="vm.autoreply.text"></textarea>\n            </div>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveMailAccountApp()" class="send-button md-accent md-raised" ng-disabled="mailAccountFormApp.$invalid || mailAccountFormApp.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/apps/close/dialog.html",'<md-dialog class="mailAccount-dialog" aria-label="New MailAccount">\n    <form name="mailAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.DISPOSITION">Disposition</label>\n                <input type="text" name="disposition" ng-model="vm.close.disposition" ng-required="true" autofocus>\n                <div ng-messages="mailAccountFormApp[\'disposition\'].$error" ng-show="mailAccountFormApp[\'disposition\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.DISPOSITION_REQUIRED">Disposition field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveMailAccountApp()" class="send-button md-accent md-raised" ng-disabled="mailAccountFormApp.$invalid || mailAccountFormApp.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/apps/gotoif/dialog.html",'<md-dialog class="mailAccount-dialog" aria-label="New MailAccount">\n    <form name="mailAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.CONDITION">Condition</label>\n                <input type="text" name="condition" ng-model="vm.gotoif.condition" ng-required="true" autofocus>\n                <div ng-messages="mailAccountFormApp[\'condition\'].$error" ng-show="mailAccountFormApp[\'condition\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.CONDITION_REQUIRED">Condition field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.TRUEPRIORITY">truepriority</label>\n                <input type="number" name="truepriority" ng-model="vm.gotoif.truepriority" min="1" ng-required="true">\n                <div ng-messages="mailAccountFormApp[\'truepriority\'].$error" ng-show="mailAccountFormApp[\'truepriority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.TRUEPRIORITY_REQUIRED">truepriority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MAIL.ERRORS.TRUEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">truepriority must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.FALSEPRIORITY">falsepriority</label>\n                <input type="number" name="falsepriority" ng-model="vm.gotoif.falsepriority" min="1" ng-required="true">\n                <div ng-messages="mailAccountFormApp[\'falsepriority\'].$error" ng-show="mailAccountFormApp[\'falsepriority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.FALSEPRIORITY_REQUIRED">falsepriority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MAIL.ERRORS.FALSEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">falsepriority must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveMailAccountApp()" class="send-button md-accent md-raised" ng-disabled="mailAccountFormApp.$invalid || mailAccountFormApp.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/apps/gotop/dialog.html",'<md-dialog class="mailAccount-dialog" aria-label="New MailAccount">\n    <form name="mailAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.PRIORITY">Priority</label>\n                <input type="number" name="priority" ng-model="vm.gotop.priority" min="0" ng-required="true" autofocus>\n                <div ng-messages="mailAccountFormApp[\'priority\'].$error" ng-show="mailAccountFormApp[\'priority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.PRIORITY_REQUIRED">Priority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MAIL.ERRORS.PRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Priority must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveMailAccountApp()" class="send-button md-accent md-raised" ng-disabled="mailAccountFormApp.$invalid || mailAccountFormApp.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/apps/interval/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select ng-model="vm.type">\n                    <md-option ng-value="type" ng-repeat=\'type in vm.types\'>{{ type | ucfirst }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.type === \'list\'">\n                <label translate="TOOLS.INTERVALS">Intervals</label>\n                <md-select ng-model="vm.interval.IntervalId">\n                    <md-option ng-value="interval.id" ng-repeat="interval in vm.intervals.rows">{{ interval.name }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            \x3c!-- TIMERANGE START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.TIME_RANGE">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <div class="md-block" flex>\n                    <mdp-time-picker name="timeRangeFrom" mdp-placeholder="FROM" ng-model="vm.timeRangeFrom" mdp-format="HH:mm" mdp-auto-switch="true">\n                        <div ng-messages="intervalForm.timeRangeFrom.$error" ng-show="intervalForm.timeRangeFrom.$touched" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_FROM_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n                <div class="md-block" flex ng-if="vm.timeRangeFrom">\n                    <mdp-time-picker name="timeRangeTo" mdp-placeholder="TO*" ng-model="vm.timeRangeTo" mdp-format="HH:mm" mdp-auto-switch="true" required>\n                        <div ng-messages="intervalForm.timeRangeTo.$error" ng-show="intervalForm.timeRangeTo.$invalid" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_INVALID">Time Range To field is invalid</span>\n                            </div>\n                            <div ng-message="required">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_REQUIRED">Time Range To field is required</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n            \x3c!-- TIMERANGE END --\x3e\n\n            \x3c!-- DAYSOFWEEK START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.WEEK_DAYS">Week Days</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.dayOfWeekFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex class="md-block" ng-if="vm.dayOfWeekFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="dayOfWeekTo" ng-model="vm.dayOfWeekTo">\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.dayOfWeekTo.$error" ng-show="intervalForm.dayOfWeekTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- DAYSOFWEEK END --\x3e\n\n            \x3c!-- MONTHDAY START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTH_DAYS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthDayFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthDayFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthDayTo" ng-model="vm.monthDayTo">\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthDayTo.$error" ng-show="intervalForm.monthDayTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTHDAY END --\x3e\n\n            \x3c!-- MONTH START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTHS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthTo" ng-model="vm.monthTo">\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthTo.$error" ng-show="intervalForm.monthTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTH END --\x3e\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/apps/noop/dialog.html",'<md-dialog class="mailAccount-dialog" aria-label="New MailAccount">\n    <form name="mailAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.VALUE">Value</label>\n                <input type="text" name="value" ng-model="vm.noop.value" autofocus>\n                <div ng-messages="mailAccountFormApp[\'value\'].$error" ng-show="mailAccountFormApp[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveMailAccountApp()" class="send-button md-accent md-raised" ng-disabled="mailAccountFormApp.$invalid || mailAccountFormApp.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/apps/queue/dialog.html",'<md-dialog class="mailAccount-dialog" aria-label="New MailAccount">\n    <form name="mailAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.QUEUE">Queue</label>\n                <md-select name="queue" ng-model="vm.queue.queue" required autofocus>\n                    <md-option ng-value="queue.name" ng-repeat="queue in vm.queues">{{ queue.name }}</md-option>\n                </md-select>\n                <div ng-messages="mailAccountFormApp[\'queue\'].$error" ng-show="mailAccountFormApp[\'queue\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.QUEUE_REQUIRED">Queue field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.queue.timeout" min="0" max="2147483" ng-required="true">\n                <div ng-messages="mailAccountFormApp[\'timeout\'].$error" ng-show="mailAccountFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MAIL.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="MAIL.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveMailAccountApp()" class="send-button md-accent md-raised" ng-disabled="mailAccountFormApp.$invalid || mailAccountFormApp.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/apps/system/dialog.html",'<md-dialog class="mailAccount-dialog" aria-label="New MailAccount">\n    <form name="mailAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.COMMAND">Command</label>\n                <input type="text" name="command" ng-model="vm.system.command" ng-required="true" autofocus>\n                <div ng-messages="mailAccountFormApp[\'command\'].$error" ng-show="mailAccountFormApp[\'command\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.COMMAND_REQUIRED">Command field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.VARIABLE">Variable</label>\n                <md-select name="variable" ng-model="vm.system.variable">\n                    <md-option ng-value="variable.name" ng-repeat="variable in vm.variables">{{ variable.name }}</md-option>\n                    <md-option ng-value="\'\'">None</md-option>\n                </md-select>\n                <div ng-messages="mailAccountFormApp[\'variable\'].$error" ng-show="mailAccountFormApp[\'variable\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.VARIABLE_REQUIRED">Variable field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveMailAccountApp()" class="send-button md-accent md-raised" ng-disabled="mailAccountFormApp.$invalid || mailAccountFormApp.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/mailCannedAnswers/dialog.html",'<md-dialog class="mailCannedAnswer-dialog" aria-label="New MailCannedAnswer">\n    <form name="mailCannedAnswerForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.KEY">Key</label>\n                <input type="" name="key" ng-model="vm.mailCannedAnswer.key" md-maxlength="255" ng-required="true" autofocus>\n                <div ng-messages="mailCannedAnswerForm[\'key\'].$error" ng-show="mailCannedAnswerForm[\'key\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.KEY_REQUIRED">Key field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.VALUE">Value</label>\n                <textarea name="value" ng-model="vm.mailCannedAnswer.value" required></textarea>\n\n                <div ng-messages="mailCannedAnswerForm[\'value\'].$error" ng-show="mailCannedAnswerForm[\'value\'].$touched" role="alert">\n\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.mailCannedAnswer.description">\n                <div ng-messages="mailCannedAnswerForm[\'description\'].$error" ng-show="mailCannedAnswerForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newMailCannedAnswer" ng-click="vm.saveMailCannedAnswer()" class="send-button md-accent md-raised" ng-disabled="mailCannedAnswerForm.$invalid || mailCannedAnswerForm.$pristine" aria-label="SAVE" translate="MAIL.SAVE"\n                    translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newMailCannedAnswer" ng-click="vm.addNewMailCannedAnswer()" class="send-button md-accent md-raised" ng-disabled="mailCannedAnswerForm.$invalid" aria-label="ADD" translate="MAIL.ADD_MAILCANNEDANSWER" translate-attr-aria-label="MAIL.ADD_MAILCANNEDANSWER">\n                    ADD MAILCANNEDANSWER\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newMailCannedAnswer" ng-click="vm.deleteMailCannedAnswer($event)" aria-label="DELETE" translate translate-attr-aria-label="MAIL.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="MAIL.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/mailDispositions/dialog.html",'<md-dialog class="mailDisposition-dialog" aria-label="New MailDisposition">\n    <form name="mailDispositionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.mailDisposition.name" ng-required="true" autofocus>\n                <div ng-messages="mailDispositionForm[\'name\'].$error" ng-show="mailDispositionForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newMailDisposition" ng-click="vm.saveMailDisposition()" class="send-button md-accent md-raised" ng-disabled="mailDispositionForm.$invalid || mailDispositionForm.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newMailDisposition" ng-click="vm.addNewMailDisposition()" class="send-button md-accent md-raised" ng-disabled="mailDispositionForm.$invalid" aria-label="ADD" translate="MAIL.ADD_MAILDISPOSITION" translate-attr-aria-label="MAIL.ADD_MAILDISPOSITION">\n                    ADD MAILDISPOSITION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newMailDisposition" ng-click="vm.deleteMailDisposition($event)" aria-label="DELETE" translate translate-attr-aria-label="MAIL.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="MAIL.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailAccounts/edit/view.html",'<div id="mail-mailAccount" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-mailAccounts-button md-icon-button" aria-label="Go to mailAccounts" ng-click="vm.gotoMailAccounts()" translate translate-attr-aria-label="MAIL.GO_TO_MAILACCOUNTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="mailAccount-image" hide-xs>\n                    <img ng-src="assets/images/business/mailAccounts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.mailAccount.id}}\n                        <span ng-if="vm.mailAccount.name">{{vm.mailAccount.name}}</span>\n                        <span ng-if="vm.mailAccount.exten">{{vm.mailAccount.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="MAIL.CREATED_AT"></span> <span>{{vm.mailAccount.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.gotogoto(vm.mailAccount, $event)" class="md-fab md-warn md-icon-button" aria-label="goto">\n                <md-tooltip><span translate="MAIL.GOTO_MAILACCOUNT"></span></md-tooltip>\n                <md-icon md-font-icon="icon-cast"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveMailAccount()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (notificationForm.$invalid) || (imapForm.$invalid) || (smtpForm.$invalid) || (mailDispositionsForm.$invalid) || (mailCannedAnswersForm.$invalid) || (actionsForm.$invalid) || (interactionsForm.$invalid)"\n                translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="mailAccount-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MAIL.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.mailAccount.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.KEY">key</label>\n                                <input type="text" name="key" ng-model="vm.mailAccount.key" md-maxlength="5" ng-required="true">\n                                <div ng-messages="generalForm[\'key\'].$error" ng-show="generalForm[\'key\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.KEY_REQUIRED">key field is required</span>\n                                    </div>\n\n                                    <div ng-message="md-maxlength">\n                                        <span translate="MAIL.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 5}\'>key must have a maximum length equal to 5</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.EMAIL_ADDRESS">Email_Address</label>\n                                <input type="email" name="email" ng-model="vm.mailAccount.email" ng-required="true">\n                                <div ng-messages="generalForm[\'email\'].$error" ng-show="generalForm[\'email\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.EMAIL_ADDRESS_REQUIRED">Email_Address field is required</span>\n                                    </div>\n                                    <div ng-message="email">\n                                        <span translate="MAIL.ERRORS.EMAIL_ADDRESS_MUST_VALID">Email_Address must be a valid e-mail address</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.LIST">List</label>\n                                <md-select name="ListId" ng-model="vm.mailAccount.ListId" required>\n                                    <md-option ng-value="ListId.id" ng-repeat="ListId in vm.lists">{{ ListId.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'ListId\'].$error" ng-show="generalForm[\'ListId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.LIST_REQUIRED">List field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.mailAccount.active" aria-label="Active"><span translate="MAIL.ACTIVE">Active</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.FONT_FAMILY">Font_Family</label>\n                                <ms-font-family name="fontFamily" ng-model="vm.mailAccount.fontFamily" required></ms-font-family>\n                                <div class="hint"><span translate="MAIL.HELP.FONT_FAMILY"></span></div>\n                                <div ng-messages="generalForm[\'fontFamily\'].$error" ng-show="generalForm[fontFamily].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.FONT_FAMILY_REQUIRED">Font_Family field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.FONT_SIZE">Font_Size</label>\n                                <input type="number" name="fontSize" ng-model="vm.mailAccount.fontSize" min="8" max="72" ng-required="true">\n                                <div class="hint"><span translate="MAIL.HELP.FONT_SIZE"></span></div>\n                                <div ng-messages="generalForm[\'fontSize\'].$error" ng-show="generalForm[\'fontSize\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.FONT_SIZE_REQUIRED">Font_Size field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MAIL.ERRORS.FONT_SIZE_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Font_Size must be a valid greater or equal than</span> <span>8</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MAIL.ERRORS.FONT_SIZE_MUST_BE_LESS_THAN_OR_EQUAL_TO">Font_Size must be a valid greater or equal than</span> <span>72</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <div class="md-block">\n                                <label class="md-caption grey-fg" translate="MAIL.TEMPLATE">Template</label>\n                                <textarea aria-label="Template template" ckeditor="{ skin: \'office2013\', language: \'en\', allowedContent: true, extraPlugins: \'font,colorbutton,autoembed,autocorrect,googlethisterm,pastebase64\', toolbarGroups: [{ name: \'styles\', groups: [\'styles\'] }, { name: \'clipboard\', groups: [\'undo\'] }, { name: \'colors\', groups: [\'colors\'] }, { name: \'basicstyles\', groups: [\'basicstyles\'] }, { name: \'paragraph\', groups: [\'list\', \'indent\', \'align\'] }, { name: \'mode\' }], autocorrect_enabled: true, disableNativeSpellChecker: false, removePlugins: \'magicline\' }"\n                                    ng-model="vm.mailAccount.template"></textarea>\n                            </div>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.mailAccount.markAsUnread" aria-label="mark_as_unread"><span translate="MAIL.MARK_AS_UNREAD">mark_as_unread</span></md-switch>\n                                <div class="hint"><span translate="MAIL.HELP.MARK_AS_UNREAD"></span></div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.WAITFORTHEASSIGNEDAGENT">WaitForTheAssignedAgent</label>\n                                <input type="number" name="waitForTheAssignedAgent" ng-model="vm.mailAccount.waitForTheAssignedAgent" min="1" max="2147483" ng-required="true">\n                                <div ng-messages="generalForm[\'waitForTheAssignedAgent\'].$error" ng-show="generalForm[\'waitForTheAssignedAgent\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.WAITFORTHEASSIGNEDAGENT_REQUIRED">WaitForTheAssignedAgent field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MAIL.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">WaitForTheAssignedAgent must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MAIL.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_LESS_THAN_OR_EQUAL_TO">WaitForTheAssignedAgent must be a valid greater or equal than</span> <span>2147483</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.mailAccount.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="mailAccount-detail-form-container notification md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MAIL.NOTIFICATION">NOTIFICATION</div>\n                        </div>\n                        <form name="notificationForm" novalidate>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.mailAccount.notificationSound" aria-label="notificationSound"><span translate="MAIL.NOTIFICATIONSOUND">notificationSound</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.mailAccount.notificationShake" aria-label="notificationShake"><span translate="MAIL.NOTIFICATIONSHAKE">notificationShake</span></md-switch>\n                            </md-input-container>\n                            <div class="md-block">\n                                <label class="md-caption grey-fg" translate="MAIL.NOTIFICATIONTEMPLATE">notificationTemplate</label>\n                                <textarea aria-label="notificationTemplate notificationTemplate" ckeditor="{ skin: \'office2013\', language: \'en\', allowedContent: true, extraPlugins: \'font,colorbutton,autoembed,autocorrect,googlethisterm,pastebase64\', toolbarGroups: [{ name: \'styles\', groups: [\'styles\'] }, { name: \'clipboard\', groups: [\'undo\'] }, { name: \'colors\', groups: [\'colors\'] }, { name: \'basicstyles\', groups: [\'basicstyles\'] }, { name: \'paragraph\', groups: [\'list\', \'indent\', \'align\'] }, { name: \'mode\' }], autocorrect_enabled: true, disableNativeSpellChecker: false, removePlugins: \'magicline\' }"\n                                    ng-model="vm.mailAccount.notificationTemplate"></textarea>\n                            </div>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.IMAP">IMAP</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="mailAccount-detail-form-container imap md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MAIL.IMAP">IMAP</div>\n                        </div>\n                        <form name="imapForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.SERVICE">Service</label>\n                                <md-select name="Imap.service" ng-model="vm.mailAccount.Imap.service" required autofocus>\n                                    <md-option ng-value="null">Custom</md-option>\n                                    <md-option ng-value="\'gmail\'">Gmail</md-option>\n                                    <md-option ng-value="\'hotmail\'">Hotmail</md-option>\n                                    <md-option ng-value="\'yahoo\'">Yahoo</md-option>\n                                    <md-option ng-value="\'outlook365\'">Outlook365</md-option>\n                                </md-select>\n                                <div ng-messages="imapForm[\'Imap.service\'].$error" ng-show="imapForm[\'Imap.service\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.SERVICE_REQUIRED">Service field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="(vm.newMailAccount && vm.mailAccount.cservice == null) || (vm.newMailAccount == undefined && vm.mailAccount.Imap.service == null)" class="md-block">\n                                <label translate="MAIL.IMAP_HOST">IMAP_Host</label>\n                                <input type="text" name="Imap.host" ng-model="vm.mailAccount.Imap.host" ng-required="true">\n                                <div ng-messages="imapForm[\'Imap.host\'].$error" ng-show="imapForm[\'Imap.host\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.IMAP_HOST_REQUIRED">IMAP_Host field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="(vm.newMailAccount && vm.mailAccount.cservice == null) || (vm.newMailAccount == undefined && vm.mailAccount.Imap.service == null)" class="md-block">\n                                <label translate="MAIL.IMAP_PORT">IMAP_Port</label>\n                                <input type="number" name="Imap.port" ng-model="vm.mailAccount.Imap.port" ng-required="true">\n                                <div ng-messages="imapForm[\'Imap.port\'].$error" ng-show="imapForm[\'Imap.port\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.IMAP_PORT_REQUIRED">IMAP_Port field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.mailAccount.Imap.tls" aria-label="ssl"><span translate="MAIL.SSL">ssl</span></md-switch>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.mailAccount.Imap.service == null" class="md-block">\n                                <md-switch ng-model="vm.mailAccount.Imap.authentication" aria-label="Authentication"><span translate="MAIL.AUTHENTICATION">Authentication</span></md-switch>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.mailAccount.Imap.authentication == true || vm.mailAccount.Imap.service != null" class="md-block">\n                                <label translate="MAIL.USERNAME">Username</label>\n                                <input type="text" name="Imap.user" ng-model="vm.mailAccount.Imap.user" ng-required="true">\n                                <div class="hint"><span translate="MAIL.HELP.USERNAME"></span></div>\n                                <div ng-messages="imapForm[\'Imap.user\'].$error" ng-show="imapForm[\'Imap.user\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block" ng-if="vm.mailAccount.Imap.authentication == true || vm.mailAccount.Imap.service != null">\n                                <label translate="MAIL.PASSWORD">Password</label>\n                                <input type="password" name="Imap.password" ng-model="vm.mailAccount.Imap.password" placeholder="Password" translate translate-attr-placeholder="MAIL.PASSWORD" required>\n                                <div class="hint"><span translate="MAIL.HELP.PASSWORD"></span></div>\n                                <div ng-messages="imapForm[\'Imap.password\'].$error" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="MAIL.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.MAILBOX">mailbox</label>\n                                <input type="text" name="Imap.mailbox" ng-model="vm.mailAccount.Imap.mailbox">\n                                <div ng-messages="imapForm[\'Imap.mailbox\'].$error" ng-show="imapForm[\'Imap.mailbox\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.MAILBOX_REQUIRED">mailbox field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.CONNTIMEOUT">connTimeout</label>\n                                <input type="number" name="Imap.connTimeout" ng-model="vm.mailAccount.Imap.connTimeout" min="1" ng-required="true">\n                                <div ng-messages="imapForm[\'Imap.connTimeout\'].$error" ng-show="imapForm[\'Imap.connTimeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.CONNTIMEOUT_REQUIRED">connTimeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MAIL.ERRORS.CONNTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">connTimeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.AUTHTIMEOUT">authTimeout</label>\n                                <input type="number" name="Imap.authTimeout" ng-model="vm.mailAccount.Imap.authTimeout" min="1" ng-required="true">\n                                <div ng-messages="imapForm[\'Imap.authTimeout\'].$error" ng-show="imapForm[\'Imap.authTimeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.AUTHTIMEOUT_REQUIRED">authTimeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MAIL.ERRORS.AUTHTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">authTimeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.SMTP">SMTP</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="mailAccount-detail-form-container smtp md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MAIL.SMTP">SMTP</div>\n                        </div>\n                        <form name="smtpForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.SERVICE">Service</label>\n                                <md-select name="Smtp.service" ng-model="vm.mailAccount.Smtp.service" required autofocus>\n                                    <md-option ng-value="null">Custom</md-option>\n                                    <md-option ng-value="\'gmail\'">Gmail</md-option>\n                                    <md-option ng-value="\'hotmail\'">Hotmail</md-option>\n                                    <md-option ng-value="\'yahoo\'">Yahoo</md-option>\n                                    <md-option ng-value="\'outlook365\'">Outlook365</md-option>\n                                </md-select>\n                                <div ng-messages="smtpForm[\'Smtp.service\'].$error" ng-show="smtpForm[\'Smtp.service\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.SERVICE_REQUIRED">Service field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="(vm.newMailAccount && vm.mailAccount.cservice == null) || (vm.newMailAccount == undefined && vm.mailAccount.Smtp.service == null)" class="md-block">\n                                <label translate="MAIL.SMTP_HOST">SMTP_Host</label>\n                                <input type="text" name="Smtp.host" ng-model="vm.mailAccount.Smtp.host" ng-required="true">\n                                <div ng-messages="smtpForm[\'Smtp.host\'].$error" ng-show="smtpForm[\'Smtp.host\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.SMTP_HOST_REQUIRED">SMTP_Host field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="(vm.newMailAccount && vm.mailAccount.cservice == null) || (vm.newMailAccount == undefined && vm.mailAccount.Smtp.service == null)" class="md-block">\n                                <label translate="MAIL.SMTP_PORT">SMTP_Port</label>\n                                <input type="number" name="Smtp.port" ng-model="vm.mailAccount.Smtp.port" ng-required="true">\n                                <div ng-messages="smtpForm[\'Smtp.port\'].$error" ng-show="smtpForm[\'Smtp.port\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.SMTP_PORT_REQUIRED">SMTP_Port field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.mailAccount.Smtp.service == null" class="md-block">\n                                <md-switch ng-model="vm.mailAccount.Smtp.secure" aria-label="Secure"><span translate="MAIL.SECURE">Secure</span></md-switch>\n                                <div class="hint"><span translate="MAIL.HELP.SECURE"></span></div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.mailAccount.Smtp.service == null" class="md-block">\n                                <md-switch ng-model="vm.mailAccount.Smtp.authentication" aria-label="Authentication"><span translate="MAIL.AUTHENTICATION">Authentication</span></md-switch>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.mailAccount.Smtp.authentication == true || vm.mailAccount.Smtp.service != null" class="md-block">\n                                <label translate="MAIL.USERNAME">Username</label>\n                                <input type="text" name="Smtp.user" ng-model="vm.mailAccount.Smtp.user" ng-required="true">\n                                <div class="hint"><span translate="MAIL.HELP.USERNAME"></span></div>\n                                <div ng-messages="smtpForm[\'Smtp.user\'].$error" ng-show="smtpForm[\'Smtp.user\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block" ng-if="vm.mailAccount.Smtp.authentication == true || vm.mailAccount.Smtp.service != null">\n                                <label translate="MAIL.PASSWORD">Password</label>\n                                <input type="password" name="Smtp.pass" ng-model="vm.mailAccount.Smtp.pass" placeholder="Password" translate translate-attr-placeholder="MAIL.PASSWORD" required>\n                                <div class="hint"><span translate="MAIL.HELP.PASSWORD"></span></div>\n                                <div ng-messages="smtpForm[\'Smtp.pass\'].$error" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="MAIL.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.DISPOSITIONS">DISPOSITIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="mailAccount-detail-form-container maildispositions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="MailAccountMailDispositionsController as vm_dc" ng-init="vm_dc.init(vm.mailAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedMailAccountMailDispositions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="MAIL.MAILDISPOSITIONS">MailDispositions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditMailAccountMailDisposition($event)" aria-label="add mailDisposition" translate translate-attr-label="MAIL.ADD_MAILDISPOSITION">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedMailAccountMailDispositions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedMailAccountMailDispositions.length}} {{vm_dc.selectedMailAccountMailDispositions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedMailAccountMailDispositions" csv-label="true" filename="mailAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedMailAccountMailDispositions($event)" aria-label="delete selected" translate translate-attr-label="MAILACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedMailAccountMailDispositions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getMailAccountMailDispositions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'MAIL.ID\' | translate }}</th>\n                                            <th md-column md-order-by="name">{{ \'MAIL.NAME\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'MAIL.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="mailDisposition" md-select-id="id" ng-repeat="mailDisposition in vm_dc.mailAccountMailDispositions.rows">\n                                            <td ng-click="vm_dc.createOrEditMailAccountMailDisposition($event, mailDisposition)" md-cell>{{mailDisposition.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditMailAccountMailDisposition($event, mailDisposition)" md-cell>{{mailDisposition.name}}</td>\n                                            <td ng-click="vm_dc.createOrEditMailAccountMailDisposition($event, mailDisposition)" md-cell>{{mailDisposition.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MAIL.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditMailAccountMailDisposition($event, mailDisposition)" translate="MAIL.EDIT_MAILDISPOSITION">\n                                                                Edit MailDisposition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(mailDisposition, $event)" translate="MAIL.DELETE_MAILDISPOSITION">\n                                                                Delete MailDisposition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.mailAccountMailDispositions.rows.length">\n                                            <td md-cell colspan="5">\n                                                <span class="text-boxed-ligth" translate="MAIL.NO_MAILDISPOSITION_AVAILABLE">No maildisposition available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'MAIL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MAIL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MAIL.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.mailAccountMailDispositions.count}}" md-on-paginate="vm_dc.getMailAccountMailDispositions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.CANNEDANSWERS">CANNEDANSWERS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="mailAccount-detail-form-container mailcannedanswers md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="MailAccountMailCannedAnswersController as vm_dc" ng-init="vm_dc.init(vm.mailAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedMailAccountMailCannedAnswers.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="MAIL.MAILCANNEDANSWERS">MailCannedAnswers</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditMailAccountMailCannedAnswer($event)" aria-label="add mailCannedAnswer" translate translate-attr-label="MAIL.ADD_MAILCANNEDANSWER">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedMailAccountMailCannedAnswers.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedMailAccountMailCannedAnswers.length}} {{vm_dc.selectedMailAccountMailCannedAnswers.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedMailAccountMailCannedAnswers" csv-label="true" filename="mailAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedMailAccountMailCannedAnswers($event)" aria-label="delete selected" translate translate-attr-label="MAILACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedMailAccountMailCannedAnswers" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getMailAccountMailCannedAnswers">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'MAIL.ID\' | translate }}</th>\n                                            <th md-column md-order-by="key">{{ \'MAIL.KEY\' | translate }}</th>\n                                            <th md-column md-order-by="value">{{ \'MAIL.VALUE\' | translate }}</th>\n                                            <th md-column md-order-by="description">{{ \'MAIL.DESCRIPTION\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'MAIL.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="mailCannedAnswer" md-select-id="id" ng-repeat="mailCannedAnswer in vm_dc.mailAccountMailCannedAnswers.rows">\n                                            <td ng-click="vm_dc.createOrEditMailAccountMailCannedAnswer($event, mailCannedAnswer)" md-cell>{{mailCannedAnswer.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditMailAccountMailCannedAnswer($event, mailCannedAnswer)" md-cell>{{mailCannedAnswer.key}}</td>\n                                            <td ng-click="vm_dc.createOrEditMailAccountMailCannedAnswer($event, mailCannedAnswer)" md-cell>{{mailCannedAnswer.value}}</td>\n                                            <td ng-click="vm_dc.createOrEditMailAccountMailCannedAnswer($event, mailCannedAnswer)" md-cell>{{mailCannedAnswer.description}}</td>\n                                            <td ng-click="vm_dc.createOrEditMailAccountMailCannedAnswer($event, mailCannedAnswer)" md-cell>{{mailCannedAnswer.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MAIL.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditMailAccountMailCannedAnswer($event, mailCannedAnswer)" translate="MAIL.EDIT_MAILCANNEDANSWER">\n                                                                Edit MailCannedAnswer\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(mailCannedAnswer, $event)" translate="MAIL.DELETE_MAILCANNEDANSWER">\n                                                                Delete MailCannedAnswer\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.mailAccountMailCannedAnswers.rows.length">\n                                            <td md-cell colspan="7">\n                                                <span class="text-boxed-ligth" translate="MAIL.NO_MAILCANNEDANSWER_AVAILABLE">No mailcannedanswer available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'MAIL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MAIL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MAIL.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.mailAccountMailCannedAnswers.count}}" md-on-paginate="vm_dc.getMailAccountMailCannedAnswers" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.ACTIONS">ACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="mailAccount-detail-form-container actions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="MailAccountActionsController as vm_ac" ng-init="vm_ac.init(vm.mailAccount)" class="content" md-background-bg layout="row" layout-align="start start">\n                            \x3c!-- SIDENAV --\x3e\n                            <div class="navigation-simple sidenav main-sidenav md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="20">\n                                \x3c!-- SIDENAV CONTENT --\x3e\n                                <md-list class="no-padding">\n                                    <md-subheader class="md-no-sticky">\n                                        <span translate="VOICE.APPLICATIONS_LIST">\n          Applications List\n        </span>\n                                    </md-subheader>\n                                </md-list>\n                                <md-divider></md-divider>\n                                <md-list ng-sortable="vm_ac.list">\n                                    <md-list-item class="handle" ng-repeat="a in vm_ac.apps">\n                                        <md-icon md-font-icon="{{a.icon}}" class="s16"></md-icon>\n                                        <p class="text-truncate" translate="MAIL.{{(a.alias || a.appType) | uppercase}}">{{a.alias || a.appType}}</p>\n                                    </md-list-item>\n                                </md-list>\n                                \x3c!-- / SIDENAV CONTENT --\x3e\n                            </div>\n                            \x3c!-- / SIDENAV --\x3e\n                            <div flex></div>\n                            \x3c!-- MAIN --\x3e\n                            <div class="main scrollable md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="75">\n                                <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_ac.selectedMailAccountApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">Drag & Drop Routing</span>\n                                        <div flex></div>\n                                        <ms-search-bar on-search="vm_ac.query.filter = query" on-collapse="vm_ac.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    </div>\n                                </md-toolbar>\n                                <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_ac.selectedMailAccountApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">{{vm_ac.selectedMailAccountApps.length}} {{vm_ac.selectedMailAccountApps.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                        <div flex></div>\n                                        <md-button ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_ac.deleteSelectedMailAccountApps($event)" aria-label="delete selected" translate translate-attr-label="MAIL.DELETE_SELECTED">\n                                            <md-icon md-font-icon="icon-delete"></md-icon>\n                                        </md-button>\n                                    </div>\n                                </md-toolbar>\n\n                                \x3c!-- QUEUES TABLE --\x3e\n                                <md-table-container>\n                                    <table md-table md-row-select multiple ng-model="vm_ac.selectedMailAccountApps">\n                                        <thead md-head>\n                                            <tr md-row>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px">\n                                                    <span translate="VOICE.PRIORITY">Priority</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Type</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Appdata</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Interval</span>\n                                                </th>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px"></th>\n                                            </tr>\n                                        </thead>\n                                        <tbody md-body ng-sortable="vm_ac.applications">\n                                            <tr md-row md-select="app" md-select-id="id" ng-repeat="app in vm_ac.mailAccountApps.rows | filter: vm_ac.query.filter">\n                                                <td md-cell>\n                                                    <md-icon md-font-icon="icon-drag-vertical" class="s16 handle"></md-icon>\n                                                </td>\n                                                <td md-cell ng-click="vm_ac.editMailAccountApp($event, $index)"><span>{{app.priority}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editMailAccountApp($event, $index)">{{app.app.toLowerCase() === \'agi\' ? \'Cally-Square\' : app.app | ucfirst}}<span ng-if="app.appType.toLowerCase() === \'custom\'">*</span></td>\n                                                <td md-cell ng-click="vm_ac.editMailAccountApp($event, $index)"><span class="text-truncate" style="width:200px">{{app.appdata}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editInterval($event, $index)">{{app.IntervalId ? \'From List\' : app.interval}}</td>\n                                                <td md-cell>\n                                                    <md-button ng-click="vm_ac.editInterval($event, $index)" class="md-icon-button" aria-label="Interval">\n                                                        <md-icon md-font-icon="icon-timer"></md-icon>\n                                                        <md-tooltip>\n                                                            {{app.IntervalId ? \'From List\' : (app.interval === \'*,*,*,*\' ? \'Always\' : \'Custom\')}}\n                                                        </md-tooltip>\n                                                    </md-button>\n                                                </td>\n                                                <td md-cell class="actions">\n                                                    <md-menu>\n                                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                        </md-button>\n\n                                                        <md-menu-content width="3">\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editMailAccountApp($event, $index)" translate="VOICE.EDIT_APP">\n                                                                    Edit App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editInterval($event, $index)" translate="VOICE.EDIT_INTERVAL">\n                                                                    Edit Interval\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'">\n                                                                <md-button ng-click="vm_ac.deleteConfirm(app, $index, $event)" translate="VOICE.DELETE_APP">\n                                                                    Delete App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                        </md-menu-content>\n                                                    </md-menu>\n                                                </td>\n                                            </tr>\n                                            <tr md-row ng-hide="vm_ac.mailAccountApps.rows.length">\n                                                <td md-cell colspan="7">\n                                                    <span class="text-boxed-ligth" translate="VOICE.NO_APPS_AVAILABLE">No apps available</span>\n                                                </td>\n                                            </tr>\n                                        </tbody>\n                                    </table>\n                                </md-table-container>\n                                \x3c!-- / QUEUES TABLE --\x3e\n\n                                \x3c!-- NO RESULTS --\x3e\n\n                                \x3c!-- / NO RESULTS --\x3e\n                            </div>\n                            \x3c!-- / MAIN --\x3e\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.INTERACTIONS">INTERACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="mailAccount-detail-form-container interactions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="MailAccountInteractionsController as vm_dc" ng-init="vm_dc.init(vm.mailAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedMailAccountInteractions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="MAIL.INTERACTIONS">Interactions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.getMailAccountInteractions()" aria-label="refresh Interactions" translate translate-attr-label="MAIL.REFRESH_INTERACTIONS">\n                                        <md-icon md-font-icon="icon-refresh"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedMailAccountInteractions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedMailAccountInteractions.length}} {{vm_dc.selectedMailAccountInteractions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedMailAccountInteractions" csv-label="true" filename="mailAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedMailAccountInteractions($event)" aria-label="delete selected" translate translate-attr-label="MAILACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedMailAccountInteractions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getMailAccountInteractions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'MAIL.ID\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'MAIL.STARTEDAT\' | translate }}</th>\n                                            <th md-column>{{ \'MAIL.CONTACT\' | translate }}</th>\n                                            <th md-column>{{ \'MAIL.AGENT\' | translate }}</th>\n                                            <th md-column md-order-by="closedAt">{{ \'MAIL.CLOSEDAT\' | translate }}</th>\n                                            <th md-column md-order-by="disposition">{{ \'MAIL.DISPOSITION\' | translate }}</th>\n                                            <th md-column md-order-by="note">{{ \'MAIL.NOTES\' | translate }}</th>\n                                            <th md-column md-order-by="tag">{{ \'MAIL.TAGS\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="interaction" md-select-id="id" ng-repeat="interaction in vm_dc.mailAccountInteractions.rows">\n                                            <td md-cell>{{interaction.id}}</td>\n                                            <td md-cell>{{interaction.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell>{{interaction.Contact.firstName}}</td>\n                                            <td md-cell>{{interaction.Owner.name}}</td>\n                                            <td md-cell>{{interaction.closedAt | date:\'medium\'}}</td>\n                                            <td md-cell>{{interaction.disposition}}</td>\n                                            <td md-cell>{{interaction.note}}</td>\n                                            <td md-cell>\n                                                <div ng-if="interaction.Tags.length">\n                                                    <md-tooltip md-direction="left" layout="row">\n                                                        <span ng-repeat="tag in interaction.Tags">{{tag.name}}<span ng-if="!$last">, </span></span>\n                                                    </md-tooltip>\n                                                    <md-icon md-font-icon="icon-tag"></md-icon>\n                                                </div>\n                                            </td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MAIL.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.spymailInteraction($event, interaction)" translate="MAIL.SPYINTERACTION">\n                                                                Spy Interaction\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(interaction, $event)" translate="MAIL.DELETE_INTERACTION">\n                                                                Delete Interaction\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.mailAccountInteractions.rows.length">\n                                            <td md-cell colspan="13">\n                                                <span class="text-boxed-ligth" translate="MAIL.NO_INTERACTION_AVAILABLE">No interaction available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'MAIL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MAIL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MAIL.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.mailAccountInteractions.count}}" md-on-paginate="vm_dc.getMailAccountInteractions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/mail/views/mailAccounts/mailAccounts.html",'<div id="mailAccounts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-email" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="MAIL.MAILACCOUNTS">MailAccounts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="MAIL.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedMailAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedMailAccounts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="MAIL.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-mailAccounts-count">\n                    <span>{{vm.selectedMailAccounts.length}}</span>\n                <span translate="MAIL.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="MAILACCOUNTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllMailAccounts()" translate="MAIL.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectMailAccounts()" translate="MAIL.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedMailAccounts" csv-label="true" filename="mailAccounts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedMailAccounts($event)" aria-label="delete selected" translate translate-attr-label="MAILACCOUNTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- MAILACCOUNT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedMailAccounts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getMailAccounts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'MAIL.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'MAIL.NAME\' | translate }}</th>\n                                <th md-column md-order-by="key">{{ \'MAIL.KEY\' | translate }}</th>\n                                <th md-column md-order-by="email">{{ \'MAIL.EMAIL_ADDRESS\' | translate }}</th>\n                                <th md-column md-order-by="active">{{ \'MAIL.ACTIVE\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'MAIL.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.mailAccounts.rows.length">\n                                <td md-cell colspan="7">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="MAIL.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="mailAccount" md-select-id="id" ng-repeat="mailAccount in vm.mailAccounts.rows">\n                                <td md-cell ng-if="mailAccount.userpic"><img class="avatar" alt="{{mailAccount.name}}" ng-src="api/users/{{mailAccount.id}}/avatar" /></td>\n                                <td md-cell ng-if="!mailAccount.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{mailAccount.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditMailAccount($event, mailAccount)" md-cell class="id ">{{mailAccount.id}}</td>\n                                <td ng-click="vm.createOrEditMailAccount($event, mailAccount)" md-cell class="name ">{{mailAccount.name}}</td>\n                                <td ng-click="vm.createOrEditMailAccount($event, mailAccount)" md-cell class="key ">{{mailAccount.key}}</td>\n                                <td ng-click="vm.createOrEditMailAccount($event, mailAccount)" md-cell class="email ">{{mailAccount.email}}</td>\n                                <td ng-click="vm.createOrEditMailAccount($event, mailAccount)" md-cell class="active ">\n                                    <md-icon md-colors="{color: {{mailAccount.active ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{mailAccount.active ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                </td>\n                                <td ng-click="vm.createOrEditMailAccount($event, mailAccount)" md-cell class="description ">{{mailAccount.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MAIL.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(mailAccount, $event)" translate="MAIL.EDIT_MAILACCOUNT">\n                                                    Edit MailAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.verifysmtpverifysmtp(mailAccount, $event)" translate="MAIL.VERIFYSMTP_MAILACCOUNT">\n                                                    verifysmtp MailAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.interactionsgoto(mailAccount, $event)" translate="MAIL.INTERACTIONS_MAILACCOUNT">\n                                                    Interactions MailAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(mailAccount, $event)" translate="MAIL.GOTOREALTIME_MAILACCOUNT">\n                                                    goToRealtime MailAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(mailAccount, $event)" translate="MAIL.DELETE_MAILACCOUNT">\n                                                    Delete MailAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'MAIL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MAIL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MAIL.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.mailAccounts.count}}" md-on-paginate="vm.getMailAccounts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / MAILACCOUNT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD MAILACCOUNT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-mailAccount-button" ng-click="vm.createOrEditMailAccount($event)" aria-label="add mailAccount" translate translate-attr-aria-label="MAIL.ADD_MAILACCOUNT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD MAILACCOUNT BUTTON --\x3e\n</div>'),e.put("app/main/apps/mail/views/mailQueues/create/dialog.html",'<md-dialog class="mailQueue-dialog" aria-label="New MailQueue">\n    <form name="mailQueueForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.mailQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newMailQueue">\n                <div class="hint"><span translate="MAIL.HELP.NAME"></span></div>\n                <div ng-messages="mailQueueForm[\'name\'].$error" ng-show="mailQueueForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="MAIL.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.STRATEGY">Strategy</label>\n                <md-select name="strategy" ng-model="vm.mailQueue.strategy" required>\n                    <md-option ng-value="\'beepall\'">Beepall</md-option>\n                    <md-option ng-value="\'rrmemory\'">RR Memory</md-option>\n                </md-select>\n                <div ng-messages="mailQueueForm[\'strategy\'].$error" ng-show="mailQueueForm[\'strategy\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.AGENT_TIMEOUT">Agent_Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.mailQueue.timeout" min="1" max="2147483" ng-required="true">\n                <div ng-messages="mailQueueForm[\'timeout\'].$error" ng-show="mailQueueForm[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.AGENT_TIMEOUT_REQUIRED">Agent_Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MAIL.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="MAIL.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.mailQueue.description">\n                <div ng-messages="mailQueueForm[\'description\'].$error" ng-show="mailQueueForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newMailQueue" ng-click="vm.saveMailQueue()" class="send-button md-accent md-raised" ng-disabled="mailQueueForm.$invalid || mailQueueForm.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newMailQueue" ng-click="vm.addNewMailQueue()" class="send-button md-accent md-raised" ng-disabled="mailQueueForm.$invalid" aria-label="ADD" translate="MAIL.ADD_MAILQUEUE" translate-attr-aria-label="MAIL.ADD_MAILQUEUE">\n                    ADD MAILQUEUE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newMailQueue" ng-click="vm.deleteMailQueue($event)" aria-label="DELETE" translate translate-attr-aria-label="MAIL.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="MAIL.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailQueues/edit/agentadd/agentadd.html",'<md-dialog class="mailQueue-dialog" aria-label="mailQueue">\n    <form name="mailQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="MAIL.AGENTADD_MAILQUEUE">Add Agent to mailQueue</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailQueues/edit/teamadd/teamadd.html",'<md-dialog class="mailQueue-dialog" aria-label="mailQueue">\n    <form name="mailQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="MAIL.TEAMADD_MAILQUEUE">Add Team in MAILQUEUE</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailQueues/edit/view.html",'<div id="mail-mailQueue" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-mailQueues-button md-icon-button" aria-label="Go to mailQueues" ng-click="vm.gotoMailQueues()" translate translate-attr-aria-label="MAIL.GO_TO_MAILQUEUES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="mailQueue-image" hide-xs>\n                    <img ng-src="assets/images/business/mailQueues.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.mailQueue.id}}\n                        <span ng-if="vm.mailQueue.name">{{vm.mailQueue.name}}</span>\n                        <span ng-if="vm.mailQueue.exten">{{vm.mailQueue.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="MAIL.CREATED_AT"></span> <span>{{vm.mailQueue.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.teamadddialog(vm.mailQueue, $event)" class="md-fab md-orange-500-bg md-icon-button" aria-label="teamadd">\n                <md-tooltip><span translate="MAIL.TEAMADD_MAILQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-multiple-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.agentadddialog(vm.mailQueue, $event)" class="md-fab md-purple-500-bg md-icon-button" aria-label="agentadd">\n                <md-tooltip><span translate="MAIL.AGENTADD_MAILQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-plus"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveMailQueue()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid)" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="mailQueue-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MAIL.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.mailQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="MAIL.HELP.NAME"></span></div>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="MAIL.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.STRATEGY">Strategy</label>\n                                <md-select name="strategy" ng-model="vm.mailQueue.strategy" required>\n                                    <md-option ng-value="\'beepall\'">Beepall</md-option>\n                                    <md-option ng-value="\'rrmemory\'">RR Memory</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'strategy\'].$error" ng-show="generalForm[\'strategy\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.AGENT_TIMEOUT">Agent_Timeout</label>\n                                <input type="number" name="timeout" ng-model="vm.mailQueue.timeout" min="1" max="2147483" ng-required="true">\n                                <div ng-messages="generalForm[\'timeout\'].$error" ng-show="generalForm[\'timeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.AGENT_TIMEOUT_REQUIRED">Agent_Timeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MAIL.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MAIL.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MAIL.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.mailQueue.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MAIL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/mail/views/mailQueues/mailQueues.html",'<div id="mailQueues" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-email" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="MAIL.MAILQUEUES">MailQueues</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="MAIL.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedMailQueues.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedMailQueues =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="MAIL.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-mailQueues-count">\n                    <span>{{vm.selectedMailQueues.length}}</span>\n                <span translate="MAIL.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="MAILQUEUES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllMailQueues()" translate="MAIL.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectMailQueues()" translate="MAIL.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedMailQueues" csv-label="true" filename="mailQueues.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedMailQueues($event)" aria-label="delete selected" translate translate-attr-label="MAILQUEUES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- MAILQUEUE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedMailQueues" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getMailQueues">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'MAIL.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'MAIL.NAME\' | translate }}</th>\n                                <th md-column md-order-by="strategy">{{ \'MAIL.STRATEGY\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.mailQueues.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="MAIL.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="mailQueue" md-select-id="id" ng-repeat="mailQueue in vm.mailQueues.rows">\n                                <td md-cell ng-if="mailQueue.userpic"><img class="avatar" alt="{{mailQueue.name}}" ng-src="api/users/{{mailQueue.id}}/avatar" /></td>\n                                <td md-cell ng-if="!mailQueue.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{mailQueue.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditMailQueue($event, mailQueue)" md-cell class="id ">{{mailQueue.id}}</td>\n                                <td ng-click="vm.createOrEditMailQueue($event, mailQueue)" md-cell class="name ">{{mailQueue.name}}</td>\n                                <td ng-click="vm.createOrEditMailQueue($event, mailQueue)" md-cell class="strategy ">{{ vm.arraystrategy[mailQueue.strategy].option }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MAIL.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(mailQueue, $event)" translate="MAIL.EDIT_MAILQUEUE">\n                                                    Edit MailQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.teamadddialog(mailQueue, $event)" translate="MAIL.TEAMADD_MAILQUEUE">\n                                                    teamadd MailQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.agentadddialog(mailQueue, $event)" translate="MAIL.AGENTADD_MAILQUEUE">\n                                                    agentadd MailQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(mailQueue, $event)" translate="MAIL.DELETE_MAILQUEUE">\n                                                    Delete MailQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(mailQueue, $event)" translate="MAIL.GOTOREALTIME_MAILQUEUE">\n                                                    goToRealtime MailQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'MAIL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MAIL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MAIL.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.mailQueues.count}}" md-on-paginate="vm.getMailQueues" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / MAILQUEUE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD MAILQUEUE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-mailQueue-button" ng-click="vm.createOrEditMailQueue($event)" aria-label="add mailQueue" translate translate-attr-aria-label="MAIL.ADD_MAILQUEUE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD MAILQUEUE BUTTON --\x3e\n</div>'),e.put("app/main/apps/mail/views/mailSubtatuses/create/dialog.html",'<md-dialog class="mailSubstatus-dialog" aria-label="New MailSubstatus">\n    <form name="mailSubstatusForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MAIL.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.mailSubstatus.name" ng-required="true" autofocus>\n                <div ng-messages="mailSubstatusForm[\'name\'].$error" ng-show="mailSubstatusForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MAIL.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.mailSubstatus.description">\n                <div ng-messages="mailSubstatusForm[\'description\'].$error" ng-show="mailSubstatusForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MAIL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newMailSubstatus" ng-click="vm.saveMailSubstatus()" class="send-button md-accent md-raised" ng-disabled="mailSubstatusForm.$invalid || mailSubstatusForm.$pristine" aria-label="SAVE" translate="MAIL.SAVE" translate-attr-aria-label="MAIL.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newMailSubstatus" ng-click="vm.addNewMailSubstatus()" class="send-button md-accent md-raised" ng-disabled="mailSubstatusForm.$invalid" aria-label="ADD" translate="MAIL.ADD_MAILSUBSTATUS" translate-attr-aria-label="MAIL.ADD_MAILSUBSTATUS">\n                    ADD MAILSUBSTATUS\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newMailSubstatus" ng-click="vm.deleteMailSubstatus($event)" aria-label="DELETE" translate translate-attr-aria-label="MAIL.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="MAIL.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/mail/views/mailSubtatuses/mailSubtatuses.html",'<div id="mailSubtatuses" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-email" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="MAIL.MAILSUBSTATUSES">MailSubstatuses</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="MAIL.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedMailSubstatuses.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedMailSubstatuses =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="MAIL.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-mailSubtatuses-count">\n                    <span>{{vm.selectedMailSubstatuses.length}}</span>\n                <span translate="MAIL.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="MAILSUBSTATUSES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllMailSubstatuses()" translate="MAIL.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectMailSubstatuses()" translate="MAIL.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedMailSubstatuses" csv-label="true" filename="mailSubtatuses.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedMailSubstatuses($event)" aria-label="delete selected" translate translate-attr-label="MAILSUBSTATUSES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- MAILSUBSTATUS TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedMailSubstatuses" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getMailSubstatuses">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'MAIL.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'MAIL.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'MAIL.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.mailSubtatuses.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="MAIL.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="mailSubstatus" md-select-id="id" ng-repeat="mailSubstatus in vm.mailSubtatuses.rows">\n                                <td md-cell ng-if="mailSubstatus.userpic"><img class="avatar" alt="{{mailSubstatus.name}}" ng-src="api/users/{{mailSubstatus.id}}/avatar" /></td>\n                                <td md-cell ng-if="!mailSubstatus.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{mailSubstatus.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditMailSubstatus($event, mailSubstatus)" md-cell class="id ">{{mailSubstatus.id}}</td>\n                                <td ng-click="vm.createOrEditMailSubstatus($event, mailSubstatus)" md-cell class="name ">{{mailSubstatus.name}}</td>\n                                <td ng-click="vm.createOrEditMailSubstatus($event, mailSubstatus)" md-cell class="description ">{{mailSubstatus.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MAIL.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(mailSubstatus, $event)" translate="MAIL.EDIT_MAILSUBSTATUS">\n                                                    Edit MailSubstatus\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.deleteconfirm(mailSubstatus, $event)" translate="MAIL.DELETE_MAILSUBSTATUS">\n                                                    Delete MailSubstatus\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'MAIL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MAIL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MAIL.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.mailSubtatuses.count}}" md-on-paginate="vm.getMailSubstatuses" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / MAILSUBSTATUS TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD MAILSUBSTATUS BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-mailSubstatus-button" ng-click="vm.createOrEditMailSubstatus($event)" aria-label="add mailSubstatus" translate translate-attr-aria-label="MAIL.ADD_MAILSUBSTATUS">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD MAILSUBSTATUS BUTTON --\x3e\n</div>'),e.put("app/main/apps/mail/views/realtime/accounts/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="MAIL.ACCOUNTS">Accounts</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- AGENT TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getMailAccounts">\n            <tr md-row>\n                <th md-column md-order-by="name">{{ \'MAIL.NAME\' | translate }}</th>\n                <th md-column>{{ \'MAIL.KEY\' | translate }}</th>\n                <th md-column>{{ \'MAIL.TOTAL\' | translate }}</th>\n                <th md-column>{{ \'MAIL.IN\' | translate }}</th>\n                <th md-column>{{ \'MAIL.OUT\' | translate }}</th>\n                <th md-column>{{ \'MAIL.IMAP_STATUS\' | translate }}</th>\n                <th md-column>{{ \'MAIL.SMTP_STATUS\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.mailAccounts">\n                <td md-cell colspan="4">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="MAIL.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row md-select="vm.mailAccounts[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td md-cell>{{vm.mailAccounts[value].name}}</td>\n                <td md-cell>{{vm.mailAccounts[value].key}}</td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{(vm.mailAccounts[value].in || 0) + (vm.mailAccounts[value].out || 0)}}</span>\n                </td>\n                <td md-cell>\n                    <div layout="row">\n                        <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                        <span class="md-capture blue-fg">{{vm.mailAccounts[value].in || 0}}</span>\n                        <span class="text-boxed" ng-if="mailAccount.in">{{vm.mailAccounts[value].lastIn ?  (vm.mailAccounts[value].lastIn | date: \'shortTime\') : \'\'}}</span>\n                    </div>\n                </td>\n                <td md-cell>\n                    <div layout="row">\n                        <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                        <span class="md-capture green-fg">{{vm.mailAccounts[value].out || 0}}</span>\n                        <span class="text-boxed" ng-if="mailAccount.out">{{vm.mailAccounts[value].lastOut ?  (vm.mailAccounts[value].lastOut | date: \'shortTime\') : \'\'}}</span>\n                    </div>\n                </td>\n                <td md-cell>\n                    <div layout="row" layout-align="start center">\n                        <div layout="column" layout-align="center center">\n                            <md-button class="md-icon-button" aria-label="Status">\n                                <md-tooltip>{{vm.mailAccounts[value].Imap.messageStatus}}</md-tooltip>\n                                <div ng-switch="vm.mailAccounts[value].Imap.status">\n                                    <md-icon ng-switch-when="error" md-font-icon="icon-alert yellow-fg"></md-icon>\n                                    <md-icon ng-switch-when="disabled" md-font-icon="icon-close grey-fg"></md-icon>\n                                    <md-icon ng-switch-default md-font-icon="icon-checkbox-marked-circle-outline green-fg"></md-icon>\n                                </div>\n                            </md-button>\n                            <span class="md-caption grey-fg">{{ (\'MAIL.\' + vm.mailAccounts[value].Imap.status.toUpperCase()) | translate}}</span>\n                        </div>\n                        <span class="text-boxed" ng-if="vm.mailAccounts[value].active">{{vm.mailAccounts[value].Imap.lastSync | date: \'shortTime\'}}</span>\n                    </div>\n                </td>\n                <td md-cell>\n                    <div layout="row" layout-align="start center" ng-if="vm.mailAccounts[value].Smtp.status">\n                        <div layout="column" layout-align="center center">\n                            <md-button class="md-icon-button" aria-label="Status">\n                                <md-tooltip>{{vm.mailAccounts[value].Smtp.messageStatus}}</md-tooltip>\n                                <md-icon md-font-icon="{{ vm.mailAccounts[value].Smtp.status == \'error\' ? \'icon-alert yellow-fg\' : \'icon-checkbox-marked-circle-outline green-fg\'}}"></md-icon>\n                            </md-button>\n                            <span class="md-caption grey-fg">{{ (\'MAIL.\' + vm.mailAccounts[value].Smtp.status.toUpperCase()) | translate}}</span>\n                        </div>\n                        <span class="text-boxed">{{vm.mailAccounts[value].Smtp.lastSync | date: \'shortTime\'}}</span>\n                    </div>\n                    <span class="md-caption grey-fg" ng-if="!vm.mailAccounts[value].Smtp.status">{{ \'MAIL.NEVER_VERIFIED\' | translate }}</span>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="4">\n                            <md-menu-item>\n                                <md-button ng-click="vm.goToMailAccount($event, vm.mailAccounts[value])" translate="MAIL.EDIT_ACCOUNT">\n                                    Edit Account\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.verifySmtp($event, vm.mailAccounts[value])" translate="MAIL.VERIFY_SMTP">\n                                    Verify Smtp\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'MAIL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MAIL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MAIL.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.count}}" md-on-paginate="vm.getmailAccounts" md-page-select></md-table-pagination>\n\x3c!-- / AGENT TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/mail/views/realtime/agents/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="MAIL.AGENTS">Agents</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query; vm.onInit()" on-collapse="vm.query.filter = undefined; vm.onInit()" debounce="300"></ms-search-bar>\n        \x3c!-- <md-button class="md-icon-button" ng-click="vm.showInfo($event)">\n      <i class="icon-information-outline grey-600-fg">\n        <md-tooltip>{{\'VOICE.INFO\' | translate}}</md-tooltip>\n      </i>\n    </md-button> --\x3e\n        <md-select ng-model="vm.query.globalStatusFilter" class="md-caption" ng-change="vm.query.pauseTypeFilter = \'\'; vm.onInit()">\n            <md-option ng-value="\'\'">{{ \'MAIL.ALL\' | translate }}</md-option>\n            <md-option value="pause">{{ \'MAIL.PAUSE\' | translate }}</md-option>\n            <md-option value="*pause">{{ \'MAIL.PARTIALPAUSE\' | translate }}</md-option>\n            <md-option value="busy">{{ \'MAIL.BUSY\' | translate }}</md-option>\n            <md-option value="idle">{{ \'MAIL.IDLE\' | translate }}</md-option>\n        </md-select>\n\n        <md-select ng-if="vm.isPause(vm.query.globalStatusFilter)" ng-model="vm.query.pauseTypeFilter" class="md-caption" ng-change="vm.onInit()">\n            <md-option ng-value="\'\'">All</md-option>\n            <md-option value="DEFAULT PAUSE">DEFAULT PAUSE</md-option>\n            <md-option value="ACW">ACW</md-option>\n            <md-option value="LOGININPAUSE">LOGININPAUSE</md-option>\n            <md-option value="Auto-Pause">AUTOPAUSE</md-option>\n            <md-option ng-value="pause.name" ng-repeat="pause in vm.pauses.rows">{{pause.name}}</md-option>\n        </md-select>\n    </div>\n</md-toolbar>\n\n\x3c!-- AGENT TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.order" md-on-reorder="vm.onInit">\n            <tr md-row border="1">\n                <th class="bv text-center" colspan="3">{{ \'MAIL.AGENT\' | translate }}</th>\n                <th class="bv bl text-center" colspan="2">{{ \'VOICE.VOICE\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="bv bl text-center" colspan="2">{{ \'CHAT.CHAT\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="bv bl text-center" colspan="2">{{ \'MAIL.MAIL\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="bv bl text-center" colspan="2">{{ \'SMS.SMS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="bv bl text-center" colspan="2">{{ \'OPENCHANNEL.OPENCHANNEL\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="bv bl text-center" colspan="2">{{ \'FAX.FAX\' | translate }}</th>\n                <th width="10px" class="bt bl" rowspan="2"></th>\n                \x3c!-- <th md-column>{{ \'VOICE.PHONE_STATE\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PHONE_STATUS\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PAUSE\' | translate }}</th>\n                <th md-column width="10px"></th> --\x3e\n            </tr>\n            <tr md-row>\n                <th class="bl" md-column md-order-by="fullname">{{ \'MAIL.NAME\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatus">{{ \'MAIL.STATUS\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatusTime">{{ \'MAIL.TIMER\' | translate }}</th>\n\n                <th class="bl custom-column">{{ \'VOICE.STATUS\' | translate }}</th>\n                <th class="bl custom-column">Info</th>\n\n                <th ng-if="vm.license.chat" class="bl text-center">{{ \'CHAT.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'CHAT.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.mail" class="bl text-center">{{ \'MAIL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'MAIL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.messaging" class="bl text-center">{{ \'SMS.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'SMS.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.openchannel" class="bl text-center">{{ \'OPENCHANNEL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'OPENCHANNEL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.fax" class="bl text-center">{{ \'FAX.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'FAX.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.order.length">\n                <td md-cell colspan="17">\n                    <div layout="row" layout-align="center center">\n                        <span>{{ \'MAIL.NO_AGENT_ONLINE\' | translate }}</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-select="vm.agents[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td class="bt padding-5">\n                    <div layout="row" layout-align="start center">\n                        <img class="avatar" ng-src="{{vm.agents[value].userpic && \'api/users/\'+vm.agents[value].id+\'/avatar\' || \'assets/images/avatars/profile.png\'}}">\n                        <div layout="column">\n                            <span>{{vm.agents[value].fullname}}</span>\n                            <span>{{vm.agents[value].internal}}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt">\n                    <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'busy\':\'indigo-100-bg\',\'*pause\':\'amber-50-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].globalStatus]">{{ vm.isPause(vm.agents[value].globalStatus) ? \'\' : vm.agents[value].globalStatus | uppercase }} {{ vm.isPause(vm.agents[value].globalStatus) ? (vm.isPartialPause(vm.agents[value].globalStatus) ? \'*\'+vm.agents[value].pauseType || \'DEFAULT PAUSE\'  : vm.agents[value].pauseType || \'DEFAULT PAUSE\') : \'\'}}</span>\n                </td>\n                <td class="bt custom-column">\n                    <timer start-time="vm.agents[value].globalStatusTime" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                </td>\n                <td class="bt bl">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'talking\':\'indigo-100-bg\',\'ringing\':\'orange-400-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].voiceStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt bl">\n                    <div layout="column">\n                        <span ng-if="vm.agents[value].queue" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].queue }}</span>\n                        <span ng-if="vm.agents[value].destconnectedlinenum" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].destconnectedlinenum }}</span>\n                        <span class="padding-5" ng-if="vm.agents[value].queue || vm.agents[value].destconnectedlinenum">\n                            <timer start-time="vm.agents[value].voiceStatusTime" interval="1000" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                        </span>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt">--</td>\n                <td class="bt">--</td> --\x3e\n                <td class="bt bl" ng-if="vm.license.chat">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt padding-5 text-center">{{ agent.chatCurrentCapacity }}/{{ agent.chatCapacity > 0 ? agent.chatCapacity : \'∞\' }}</td> --\x3e\n                <td md-number class="bt text-center font-size-20" ng-if="vm.license.chat" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.mail">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.mail" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.messaging">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.messaging" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.openchannel">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">4</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">89</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.openchannel" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.fax">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">7</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">2</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.fax" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxCurrentCapacity }}</td>\n                <td class="bl bt padding-5 text-center">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="4">\n                            <md-menu-item>\n                                <md-button ng-click="vm.logout(vm.agents[value], $event)" translate="MAIL.LOGOUT">\n                                    Logout\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.queueAdd(vm.agents[value], $event)" translate="MAIL.AGENTADD_QUEUE">\n                                    Add Agent In Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="MAIL.PAUSE">Pause</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item>\n                                            <md-button ng-disabled=" vm.agents[value].voicePause && \'DEFAULT PAUSE\' === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value])"><em translate="MAIL.DEFAULT_PAUSE">Default Pause</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.pauses.rows.length" ng-repeat="pause in vm.pauses.rows">\n                                            <md-button ng-disabled="vm.agents[value].voicePause && pause.name === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value], pause.name)">{{pause.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                            <md-menu-item ng-if="vm.isPause(vm.agents[value].globalStatus)">\n                                <md-button ng-click="vm.unPause(vm.agents[value])" translate="MAIL.UNPAUSE">\n                                    Unpause\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'MAIL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MAIL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MAIL.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.filteredAgents.length}}" md-on-paginate="vm.onInit" md-page-select></md-table-pagination>\n\x3c!-- / AGENT TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/mail/views/realtime/queues/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="MAIL.QUEUES">Queues</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUE TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getQueues">\n            <tr md-row>\n                <th md-column md-order-by="name">{{ \'MAIL.NAME\' | translate }}</th>\n                <th md-column>{{ \'MAIL.LOGGED_IN\' | translate }}</th>\n                <th md-column>{{ \'MAIL.PAUSED\' | translate }}</th>\n                <th md-column>{{ \'MAIL.READY\' | translate }}</th>\n                <th md-column>{{ \'MAIL.WAITING\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.queues">\n                <td md-cell colspan="7">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="MAIL.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row md-select="vm.queues[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td md-cell>{{vm.queues[value].name}}</td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].loggedInDb || 0}} ({{vm.queues[value].loggedIn || 0}})</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].paused || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].available || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].waiting || 0}}</span>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MAIL.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="3">\n                            <md-menu-item>\n                                <md-button ng-click="vm.createOrEditMailQueue($event, vm.queues[value])" translate="MAIL.EDIT_QUEUE">\n                                    Edit Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.agentAdd($event, vm.queues[value])" translate="MAIL.AGENTSADD_QUEUE">\n                                    Add Agents to queue\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'MAIL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MAIL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MAIL.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.count}}" md-on-paginate="vm.getQueues" md-page-select></md-table-pagination>\n\x3c!-- / QUEUE TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/mail/views/realtime/realtime.html",'<div id="realtime" class="page-layout simple tabbed" layout="column" ng-cloak>\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.AGENTS">Agents</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.QUEUES">Queues</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MAIL.ACCOUNTS">Accounts</span>\n                </md-tab-label>\n            </md-tab>\n        </md-tabs>\n\n        <md-card ui-view></md-card>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n</div>'),e.put("app/main/apps/motiondialer/views/ivrCampaigns/create/dialog.html",'<md-dialog class="ivrCampaign-dialog" aria-label="New IvrCampaign">\n    <form name="ivrCampaignForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.ivrCampaign.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newIvrCampaign">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.NAME"></span></div>\n                <div ng-messages="ivrCampaignForm[\'name\'].$error" ng-show="ivrCampaignForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="MOTIONDIALER.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.ivrCampaign.active" aria-label="Active"><span translate="MOTIONDIALER.ACTIVE">Active</span></md-switch>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.TRUNK">Trunk</label>\n                <md-select name="TrunkId" ng-model="vm.ivrCampaign.TrunkId" required>\n                    <md-option ng-value="TrunkId.id" ng-repeat="TrunkId in vm.trunks">{{ TrunkId.name }}</md-option>\n                </md-select>\n                <div ng-messages="ivrCampaignForm[\'TrunkId\'].$error" ng-show="ivrCampaignForm[\'TrunkId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.TRUNK_REQUIRED">Trunk field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.INTERVAL">Interval</label>\n                <md-select name="IntervalId" ng-model="vm.ivrCampaign.IntervalId" required>\n                    <md-option ng-value="IntervalId.id" ng-repeat="IntervalId in vm.interval">{{ IntervalId.name }}</md-option>\n                </md-select>\n                <div ng-messages="ivrCampaignForm[\'IntervalId\'].$error" ng-show="ivrCampaignForm[\'IntervalId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.INTERVAL_REQUIRED">Interval field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.CHECKDUPLICATE">CheckDuplicate</label>\n                <md-select name="dialCheckDuplicateType" ng-model="vm.ivrCampaign.dialCheckDuplicateType" required>\n\n                    <md-option ng-value="\'always\'"> {{ \'MOTIONDIALER.ALWAYS\' | translate }}</md-option>\n\n                    <md-option ng-value="\'never\'"> {{ \'MOTIONDIALER.NEVER\' | translate }}</md-option>\n\n                    <md-option ng-value="\'onlyIfOpen\'"> {{ \'MOTIONDIALER.ONLY_IF_OPEN\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="ivrCampaignForm[\'dialCheckDuplicateType\'].$error" ng-show="ivrCampaignForm[\'dialCheckDuplicateType\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.CHECKDUPLICATE_REQUIRED">CheckDuplicate field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.CALLYSQUAREPROJECT">CallySquareProject</label>\n                <md-select name="SquareProjectId" ng-model="vm.ivrCampaign.SquareProjectId" required>\n                    <md-option ng-value="SquareProjectId.id" ng-repeat="SquareProjectId in vm.projects">{{ SquareProjectId.name }}</md-option>\n                </md-select>\n                <div ng-messages="ivrCampaignForm[\'SquareProjectId\'].$error" ng-show="ivrCampaignForm[\'SquareProjectId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.CALLYSQUAREPROJECT_REQUIRED">CallySquareProject field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.CONCURRENTCALLS">ConcurrentCalls</label>\n                <input type="number" name="limitCalls" ng-model="vm.ivrCampaign.limitCalls" min="1" max="200" ng-required="true">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.CONCURRENTCALLS"></span></div>\n                <div ng-messages="ivrCampaignForm[\'limitCalls\'].$error" ng-show="ivrCampaignForm[\'limitCalls\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.CONCURRENTCALLS_REQUIRED">ConcurrentCalls field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.CONCURRENTCALLS_MUST_BE_GREATER_THAN_OR_EQUAL_TO">ConcurrentCalls must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="MOTIONDIALER.ERRORS.CONCURRENTCALLS_MUST_BE_LESS_THAN_OR_EQUAL_TO">ConcurrentCalls must be a valid greater or equal than</span> <span>200</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.ivrCampaign.description">\n                <div ng-messages="ivrCampaignForm[\'description\'].$error" ng-show="ivrCampaignForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newIvrCampaign" ng-click="vm.saveIvrCampaign()" class="send-button md-accent md-raised" ng-disabled="ivrCampaignForm.$invalid || ivrCampaignForm.$pristine" aria-label="SAVE" translate="MOTIONDIALER.SAVE" translate-attr-aria-label="MOTIONDIALER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newIvrCampaign" ng-click="vm.addNewIvrCampaign()" class="send-button md-accent md-raised" ng-disabled="ivrCampaignForm.$invalid" aria-label="ADD" translate="MOTIONDIALER.ADD_IVRCAMPAIGN" translate-attr-aria-label="MOTIONDIALER.ADD_IVRCAMPAIGN">\n                    ADD IVRCAMPAIGN\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newIvrCampaign" ng-click="vm.deleteIvrCampaign($event)" aria-label="DELETE" translate translate-attr-aria-label="MOTIONDIALER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="MOTIONDIALER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/ivrCampaigns/edit/blacklistadd/blacklistadd.html",'<md-dialog class="ivrCampaign-dialog" aria-label="ivrCampaign">\n    <form name="ivrCampaignForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="MOTIONDIALER.BLACKLISTADD_IVRCAMPAIGN">Add List in IVRCAMPAIGN</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect ng-hide="vm.loading" options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n            <div ng-hide="!vm.loading" layout-fill style="min-height: 397px;" layout="row" layout-sm="column" layout-align="center center">\n                <md-progress-circular class="md-primary md-hue-1" md-diameter="96"></md-progress-circular>\n            </div>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/ivrCampaigns/edit/hoppers/dialog.html",'<md-dialog class="hopper-dialog" aria-label="New Hopper">\n    <form name="hopperForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <div class="md-block">\n                <label translate="MOTIONDIALER.SCHEDULEDAT">ScheduledAt</label>\n                <md-content layout="row" class="md-padding">\n                    <div flex class="md-block">\n                        <mdp-date-picker mdp-open-on-click name="scheduledatDate" mdp-placeholder="Date" mdp-format="YYYY-MM-DD" ng-model="vm.hopper.scheduledat" ng-init="vm.hopper.scheduledat = vm.getDateFromString(vm.hopper.scheduledat)">\n                            <div ng-messages="hopperForm.dateRangeFrom.$error" ng-show="hopperForm.dateRangeFrom.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="MOTIONDIALER.ERRORS.DATE_REQUIRED">Date is required</span>\n                                </div>\n                                <div ng-message="format">\n                                    <span translate="MOTIONDIALER.ERRORS.DATE_INVALID">Date is invalid</span>\n                                </div>\n                            </div>\n                        </mdp-date-picker>\n                    </div>\n                    <div flex class="md-block">\n                        <mdp-time-picker mdp-open-on-click name="scheduledatTime" mdp-placeholder="Time" mdp-format="HH:mm:ss" mdp-auto-switch="true" ng-model="vm.hopper.scheduledat" ng-init="vm.hopper.scheduledat = vm.getDateFromString(vm.hopper.scheduledat)">\n                            <div ng-messages="hopperForm.timeRangeFrom.$error" ng-show="hopperForm.timeRangeFrom.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="MOTIONDIALER.ERRORS.TIME_REQUIRED">Time is required</span>\n                                </div>\n                                <div ng-message="format">\n                                    <span translate="MOTIONDIALER.ERRORS.TIME_INVALID">Time is invalid</span>\n                                </div>\n                            </div>\n                        </mdp-time-picker>\n                    </div>\n                </md-content>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.PRIORITY">Priority</label>\n                <md-select name="priority" ng-model="vm.hopper.priority">\n                    <md-option ng-value="\'4\'">Highest</md-option>\n                    <md-option ng-value="\'3\'">High</md-option>\n                    <md-option ng-value="\'2\'">Medium</md-option>\n                    <md-option ng-value="\'1\'">Low</md-option>\n                    <md-option ng-value="\'0\'">Lowest</md-option>\n                </md-select>\n                <div class="hint"><span translate="MOTIONDIALER.HELP.PRIORITY"></span></div>\n                <div ng-messages="hopperForm[\'priority\'].$error" ng-show="hopperForm[\'priority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.PRIORITY_REQUIRED">Priority field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newHopper" ng-click="vm.saveHopper()" class="send-button md-accent md-raised" ng-disabled="hopperForm.$invalid || hopperForm.$pristine" aria-label="SAVE" translate="MOTIONDIALER.SAVE" translate-attr-aria-label="MOTIONDIALER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newHopper" ng-click="vm.addNewHopper()" class="send-button md-accent md-raised" ng-disabled="hopperForm.$invalid" aria-label="ADD" translate="MOTIONDIALER.ADD_HOPPER" translate-attr-aria-label="MOTIONDIALER.ADD_HOPPER">\n                    ADD HOPPER\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newHopper" ng-click="vm.deleteHopper($event)" aria-label="DELETE" translate translate-attr-aria-label="MOTIONDIALER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="MOTIONDIALER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/ivrCampaigns/edit/listadd/listadd.html",'<md-dialog class="ivrCampaign-dialog" aria-label="ivrCampaign">\n    <form name="ivrCampaignForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="MOTIONDIALER.LISTADD_IVRCAMPAIGN">Add List in IVRCAMPAIGN</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect ng-hide="vm.loading" options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n            <div ng-hide="!vm.loading" layout-fill style="min-height: 397px;" layout="row" layout-sm="column" layout-align="center center">\n                <md-progress-circular class="md-primary md-hue-1" md-diameter="96"></md-progress-circular>\n            </div>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/ivrCampaigns/edit/resetlist/resetlist.html",'<md-dialog class="queueCampaign-dialog" aria-label="queueCampaign">\n    <form name="queueCampaignForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="MOTIONDIALER.RESETLIST ">Reset List</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-disabled="vm.loading" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content ng-hide="vm.loading">\n            <div layout="row" layout-wrap flex>\n                <div flex-xs flex="50">\n                    <md-checkbox aria-label="Select All" ng-checked="vm.isChecked()" md-indeterminate="vm.isIndeterminate()" ng-click="vm.toggleAll()">\n                        <span ng-if="vm.isChecked()" translate="MOTIONDIALER.UNSELECTALL"></span>\n                        <span ng-if="!vm.isChecked()" translate="MOTIONDIALER.SELECTALL"></span>\n                    </md-checkbox>\n                </div>\n                <div flex-xs flex="50">\n                </div>\n                <div flex="{{vm.items.length > 10 ? 50 : 100 }}" ng-repeat="item in vm.items">\n                    <md-checkbox ng-checked="vm.exists(item, vm.selected)" ng-click="vm.toggle(item, vm.selected)">\n                        {{ item.name | limitTo:40 }}\n                    </md-checkbox>\n                </div>\n            </div>\n        </md-dialog-content>\n        <md-dialog-actions ng-hide="vm.loading" layout="row" layout-align="end center">\n            <div>\n            </div>\n            <md-button type="submit" ng-click="vm.listSelected()" class="send-button md-accent md-raised" ng-disabled="vm.loading" aria-label="RESET" translate="MOTIONDIALER.RESET" translate-attr-aria-label="MOTIONDIALER.RESET">\n                SAVE\n            </md-button>\n        </md-dialog-actions>\n        <div ng-hide="!vm.loading" layout-fill style="min-height: 397px;" layout="row" layout-sm="column" layout-align="center center">\n            <md-progress-circular class="md-primary md-hue-1" md-diameter="96"></md-progress-circular>\n        </div>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/ivrCampaigns/edit/view.html",'<div id="motiondialer-ivrCampaign" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-ivrCampaigns-button md-icon-button" aria-label="Go to ivrCampaigns" ng-click="vm.gotoIvrCampaigns()" translate translate-attr-aria-label="MOTIONDIALER.GO_TO_IVRCAMPAIGNS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="ivrCampaign-image" hide-xs>\n                    <img ng-src="assets/images/business/ivrCampaigns.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.ivrCampaign.id}}\n                        <span ng-if="vm.ivrCampaign.name">{{vm.ivrCampaign.name}}</span>\n                        <span ng-if="vm.ivrCampaign.exten">{{vm.ivrCampaign.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="MOTIONDIALER.CREATED_AT"></span> <span>{{vm.ivrCampaign.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.listadddialog(vm.ivrCampaign, $event)" class="md-fab md-green-500-bg md-icon-button" aria-label="listadd">\n                <md-tooltip><span translate="MOTIONDIALER.LISTADD_IVRCAMPAIGN"></span></md-tooltip>\n                <md-icon md-font-icon="icon-format-list-numbers"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.blacklistadddialog(vm.ivrCampaign, $event)" class="md-fab md-warn md-icon-button" aria-label="blacklistadd">\n                <md-tooltip><span translate="MOTIONDIALER.BLACKLISTADD_IVRCAMPAIGN"></span></md-tooltip>\n                <md-icon md-font-icon="icon-block-helper"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.resetlistdialog(vm.ivrCampaign, $event)" class="md-fab md-warn md-icon-button" aria-label="resetlist">\n                <md-tooltip><span translate="MOTIONDIALER.RESETLIST_IVRCAMPAIGN"></span></md-tooltip>\n                <md-icon md-font-icon="icon-restore"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.gotogoto(vm.ivrCampaign, $event)" class="md-fab md-warn md-icon-button" aria-label="goto">\n                <md-tooltip><span translate="MOTIONDIALER.GOTO_IVRCAMPAIGN"></span></md-tooltip>\n                <md-icon md-font-icon="icon-cast"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveIvrCampaign()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (campaignForm.$invalid) || (originateForm.$invalid) || (globalForm.$invalid) || (congestionForm.$invalid) || (busyForm.$invalid) || (noanswerForm.$invalid) || (advancedForm.$invalid) || (globalintervalForm.$invalid) || (timezoneForm.$invalid) || (amdForm.$invalid) || (hopperStatisticsForm.$invalid) || (hoppersForm.$invalid) || (hopperHistoriesForm.$invalid) || (hopperFinalsForm.$invalid) || (hopperBlacksForm.$invalid)"\n                translate="MOTIONDIALER.SAVE" translate-attr-aria-label="MOTIONDIALER.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="ivrCampaign-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.ivrCampaign.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.NAME"></span></div>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="MOTIONDIALER.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.ivrCampaign.active" aria-label="Active"><span translate="MOTIONDIALER.ACTIVE">Active</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.TRUNK">Trunk</label>\n                                <md-select name="TrunkId" ng-model="vm.ivrCampaign.TrunkId" required>\n                                    <md-option ng-value="TrunkId.id" ng-repeat="TrunkId in vm.trunks">{{ TrunkId.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'TrunkId\'].$error" ng-show="generalForm[\'TrunkId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.TRUNK_REQUIRED">Trunk field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.BACKUPTRUNK">BackupTrunk</label>\n                                <md-select name="TrunkBackupId" ng-model="vm.ivrCampaign.TrunkBackupId">\n                                    <md-option ng-value="TrunkBackupId.id" ng-repeat="TrunkBackupId in vm.trunks">{{ TrunkBackupId.name }}</md-option>\n                                    <md-option ng-value="null">None</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'TrunkBackupId\'].$error" ng-show="generalForm[\'TrunkBackupId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.BACKUPTRUNK_REQUIRED">BackupTrunk field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.INTERVAL">Interval</label>\n                                <md-select name="IntervalId" ng-model="vm.ivrCampaign.IntervalId" required>\n                                    <md-option ng-value="IntervalId.id" ng-repeat="IntervalId in vm.interval">{{ IntervalId.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'IntervalId\'].$error" ng-show="generalForm[\'IntervalId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.INTERVAL_REQUIRED">Interval field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.CHECKDUPLICATE">CheckDuplicate</label>\n                                <md-select name="dialCheckDuplicateType" ng-model="vm.ivrCampaign.dialCheckDuplicateType" required>\n\n                                    <md-option ng-value="\'always\'"> {{ \'MOTIONDIALER.ALWAYS\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'never\'"> {{ \'MOTIONDIALER.NEVER\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'onlyIfOpen\'"> {{ \'MOTIONDIALER.ONLY_IF_OPEN\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'dialCheckDuplicateType\'].$error" ng-show="generalForm[\'dialCheckDuplicateType\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CHECKDUPLICATE_REQUIRED">CheckDuplicate field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.ivrCampaign.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.CAMPAIGN">CAMPAIGN</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="ivrCampaign-detail-form-container campaign md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.CAMPAIGN">CAMPAIGN</div>\n                        </div>\n                        <form name="campaignForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.CALLYSQUAREPROJECT">CallySquareProject</label>\n                                <md-select name="SquareProjectId" ng-model="vm.ivrCampaign.SquareProjectId" required autofocus>\n                                    <md-option ng-value="SquareProjectId.id" ng-repeat="SquareProjectId in vm.projects">{{ SquareProjectId.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="campaignForm[\'SquareProjectId\'].$error" ng-show="campaignForm[\'SquareProjectId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CALLYSQUAREPROJECT_REQUIRED">CallySquareProject field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.CONCURRENTCALLS">ConcurrentCalls</label>\n                                <input type="number" name="limitCalls" ng-model="vm.ivrCampaign.limitCalls" min="1" max="200" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.CONCURRENTCALLS"></span></div>\n                                <div ng-messages="campaignForm[\'limitCalls\'].$error" ng-show="campaignForm[\'limitCalls\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CONCURRENTCALLS_REQUIRED">ConcurrentCalls field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.CONCURRENTCALLS_MUST_BE_GREATER_THAN_OR_EQUAL_TO">ConcurrentCalls must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.CONCURRENTCALLS_MUST_BE_LESS_THAN_OR_EQUAL_TO">ConcurrentCalls must be a valid greater or equal than</span> <span>200</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="ivrCampaign-detail-form-container originate md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.ORIGINATE">ORIGINATE</div>\n                        </div>\n                        <form name="originateForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.ORIGINATECALLERIDNAME">OriginateCallerIdName</label>\n                                <input type="text" name="dialOriginateCallerIdName" ng-model="vm.ivrCampaign.dialOriginateCallerIdName" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.ORIGINATECALLERIDNAME"></span></div>\n                                <div ng-messages="originateForm[\'dialOriginateCallerIdName\'].$error" ng-show="originateForm[\'dialOriginateCallerIdName\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.ORIGINATECALLERIDNAME_REQUIRED">OriginateCallerIdName field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.ORIGINATECALLERIDNUMBER">OriginateCallerIdNumber</label>\n                                <input type="text" name="dialOriginateCallerIdNumber" ng-model="vm.ivrCampaign.dialOriginateCallerIdNumber">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.ORIGINATECALLERIDNUMBER"></span></div>\n                                <div ng-messages="originateForm[\'dialOriginateCallerIdNumber\'].$error" ng-show="originateForm[\'dialOriginateCallerIdNumber\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.ORIGINATECALLERIDNUMBER_REQUIRED">OriginateCallerIdNumber field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.ORIGINATETIMEOUT">OriginateTimeout</label>\n                                <input type="number" name="dialOriginateTimeout" ng-model="vm.ivrCampaign.dialOriginateTimeout" min="1" max="999" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.ORIGINATETIMEOUT"></span></div>\n                                <div ng-messages="originateForm[\'dialOriginateTimeout\'].$error" ng-show="originateForm[\'dialOriginateTimeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.ORIGINATETIMEOUT_REQUIRED">OriginateTimeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.ORIGINATETIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">OriginateTimeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.ORIGINATETIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">OriginateTimeout must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.PREFIX">Prefix</label>\n                                <input type="text" name="dialPrefix" ng-model="vm.ivrCampaign.dialPrefix" ng-pattern="/^\\d+$/">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.PREFIX"></span></div>\n                                <div ng-messages="originateForm[\'dialPrefix\'].$error" ng-show="originateForm[\'dialPrefix\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.PREFIX_REQUIRED">Prefix field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="MOTIONDIALER.ERRORS.PREFIX_MUST_VALID_PATTERN" translate-values="{ regex: \'/^\\d+$/\' }">Prefix must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.RETRYANDFREQUENCY">RETRYANDFREQUENCY</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="ivrCampaign-detail-form-container global md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.GLOBAL">GLOBAL</div>\n                        </div>\n                        <form name="globalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.GLOBALMAXRETRY">GlobalMaxRetry</label>\n                                <input type="number" name="dialGlobalMaxRetry" ng-model="vm.ivrCampaign.dialGlobalMaxRetry" min="1" max="999" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.GLOBALMAXRETRY"></span></div>\n                                <div ng-messages="globalForm[\'dialGlobalMaxRetry\'].$error" ng-show="globalForm[\'dialGlobalMaxRetry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.GLOBALMAXRETRY_REQUIRED">GlobalMaxRetry field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.GLOBALMAXRETRY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">GlobalMaxRetry must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.GLOBALMAXRETRY_MUST_BE_LESS_THAN_OR_EQUAL_TO">GlobalMaxRetry must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="ivrCampaign-detail-form-container congestion md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.CONGESTION">CONGESTION</div>\n                        </div>\n                        <form name="congestionForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.CONGESTIONMAXRETRY">CongestionMaxRetry</label>\n                                <input type="number" name="dialCongestionMaxRetry" ng-model="vm.ivrCampaign.dialCongestionMaxRetry" min="1" max="999" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.CONGESTIONMAXRETRY"></span></div>\n                                <div ng-messages="congestionForm[\'dialCongestionMaxRetry\'].$error" ng-show="congestionForm[\'dialCongestionMaxRetry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONMAXRETRY_REQUIRED">CongestionMaxRetry field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONMAXRETRY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">CongestionMaxRetry must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONMAXRETRY_MUST_BE_LESS_THAN_OR_EQUAL_TO">CongestionMaxRetry must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.CONGESTIONRETRYTIME">CongestionRetryTime</label>\n                                <input type="number" name="dialCongestionRetryFrequency" ng-model="vm.ivrCampaign.dialCongestionRetryFrequency" min="1" max="99999" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.CONGESTIONRETRYTIME"></span></div>\n                                <div ng-messages="congestionForm[\'dialCongestionRetryFrequency\'].$error" ng-show="congestionForm[\'dialCongestionRetryFrequency\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONRETRYTIME_REQUIRED">CongestionRetryTime field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONRETRYTIME_MUST_BE_GREATER_THAN_OR_EQUAL_TO">CongestionRetryTime must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONRETRYTIME_MUST_BE_LESS_THAN_OR_EQUAL_TO">CongestionRetryTime must be a valid greater or equal than</span> <span>99999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="ivrCampaign-detail-form-container busy md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.BUSY">BUSY</div>\n                        </div>\n                        <form name="busyForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.BUSYMAXRETRY">BusyMaxRetry</label>\n                                <input type="number" name="dialBusyMaxRetry" ng-model="vm.ivrCampaign.dialBusyMaxRetry" min="1" max="999" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.BUSYMAXRETRY"></span></div>\n                                <div ng-messages="busyForm[\'dialBusyMaxRetry\'].$error" ng-show="busyForm[\'dialBusyMaxRetry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYMAXRETRY_REQUIRED">BusyMaxRetry field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYMAXRETRY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">BusyMaxRetry must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYMAXRETRY_MUST_BE_LESS_THAN_OR_EQUAL_TO">BusyMaxRetry must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.BUSYRETRYTIME">BusyRetryTime</label>\n                                <input type="number" name="dialBusyRetryFrequency" ng-model="vm.ivrCampaign.dialBusyRetryFrequency" min="1" max="99999" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.BUSYRETRYTIME"></span></div>\n                                <div ng-messages="busyForm[\'dialBusyRetryFrequency\'].$error" ng-show="busyForm[\'dialBusyRetryFrequency\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYRETRYTIME_REQUIRED">BusyRetryTime field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYRETRYTIME_MUST_BE_GREATER_THAN_OR_EQUAL_TO">BusyRetryTime must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYRETRYTIME_MUST_BE_LESS_THAN_OR_EQUAL_TO">BusyRetryTime must be a valid greater or equal than</span> <span>99999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="ivrCampaign-detail-form-container noanswer md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.NOANSWER">NOANSWER</div>\n                        </div>\n                        <form name="noanswerForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.NOANSWERMAXRETRY">NoAnswerMaxRetry</label>\n                                <input type="number" name="dialNoAnswerMaxRetry" ng-model="vm.ivrCampaign.dialNoAnswerMaxRetry" min="1" max="999" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.NOANSWERMAXRETRY"></span></div>\n                                <div ng-messages="noanswerForm[\'dialNoAnswerMaxRetry\'].$error" ng-show="noanswerForm[\'dialNoAnswerMaxRetry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERMAXRETRY_REQUIRED">NoAnswerMaxRetry field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERMAXRETRY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">NoAnswerMaxRetry must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERMAXRETRY_MUST_BE_LESS_THAN_OR_EQUAL_TO">NoAnswerMaxRetry must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.NOANSWERRETRYTIME">NoAnswerRetryTime</label>\n                                <input type="number" name="dialNoAnswerRetryFrequency" ng-model="vm.ivrCampaign.dialNoAnswerRetryFrequency" min="1" max="99999" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.NOANSWERRETRYTIME"></span></div>\n                                <div ng-messages="noanswerForm[\'dialNoAnswerRetryFrequency\'].$error" ng-show="noanswerForm[\'dialNoAnswerRetryFrequency\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERRETRYTIME_REQUIRED">NoAnswerRetryTime field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERRETRYTIME_MUST_BE_GREATER_THAN_OR_EQUAL_TO">NoAnswerRetryTime must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERRETRYTIME_MUST_BE_LESS_THAN_OR_EQUAL_TO">NoAnswerRetryTime must be a valid greater or equal than</span> <span>99999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.ADVANCED">ADVANCED</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="ivrCampaign-detail-form-container advanced md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.ADVANCED">ADVANCED</div>\n                        </div>\n                        <form name="advancedForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.DIALORDERBYSCHEDULEDAT">DialOrderByScheduledAt</label>\n                                <md-select name="dialOrderByScheduledAt" ng-model="vm.ivrCampaign.dialOrderByScheduledAt" autofocus>\n\n                                    <md-option ng-value="\'DESC\'"> {{ \'MOTIONDIALER.DESC\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'ASC\'"> {{ \'MOTIONDIALER.ASC\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.DIALORDERBYSCHEDULEDAT"></span></div>\n                                <div ng-messages="advancedForm[\'dialOrderByScheduledAt\'].$error" ng-show="advancedForm[\'dialOrderByScheduledAt\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.DIALORDERBYSCHEDULEDAT_REQUIRED">DialOrderByScheduledAt field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="ivrCampaign-detail-form-container globalinterval md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.GLOBALINTERVAL">GLOBALINTERVAL</div>\n                        </div>\n                        <form name="globalintervalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.GLOBALINTERVAL">GlobalInterval</label>\n                                <input type="text" name="dialGlobalInterval" ng-model="vm.ivrCampaign.dialGlobalInterval" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.GLOBALINTERVAL"></span></div>\n                                <div ng-messages="globalintervalForm[\'dialGlobalInterval\'].$error" ng-show="globalintervalForm[\'dialGlobalInterval\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.GLOBALINTERVAL_REQUIRED">GlobalInterval field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="ivrCampaign-detail-form-container timezone md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.TIMEZONE">TIMEZONE</div>\n                        </div>\n                        <form name="timezoneForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.TIMEZONE">Timezone</label>\n                                <ms-timezone name="dialTimezone" ng-model="vm.ivrCampaign.dialTimezone" autofocus>\n                                    < <div class="hint"><span translate="MOTIONDIALER.HELP.TIMEZONE"></span></div>\n                    <div ng-messages="timezoneForm[\'dialTimezone\'].$error" ng-show="timezoneForm[dialTimezone].$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="MOTIONDIALER.ERRORS.TIMEZONE_REQUIRED">Timezone field is required</span>\n                        </div>\n                    </div>\n                    </md-input-container>\n\n                    </form>\n    </div>\n    <div class="ivrCampaign-detail-form-container amd md-background-bg md-whiteframe-1dp">\n        <div class="pb-16" layout="row" layout-align="start center">\n            <div class="h2 secondary-text" translate="MOTIONDIALER.AMD">AMD</div>\n        </div>\n        <form name="amdForm" novalidate>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.ivrCampaign.dialAMDActive" aria-label="AMDActive"><span translate="MOTIONDIALER.AMDACTIVE">AMDActive</span></md-switch>\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDACTIVE"></span></div>\n            </md-input-container>\n            <md-input-container ng-if="vm.ivrCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDINITIALSILENCE">AMDInitialSilence</label>\n                <input type="number" name="dialAMDInitialSilence" ng-model="vm.ivrCampaign.dialAMDInitialSilence" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDINITIALSILENCE"></span></div>\n                <div ng-messages="amdForm[\'dialAMDInitialSilence\'].$error" ng-show="amdForm[\'dialAMDInitialSilence\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDINITIALSILENCE_REQUIRED">AMDInitialSilence field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDINITIALSILENCE_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDInitialSilence must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.ivrCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDGREETING">AMDGreeting</label>\n                <input type="number" name="dialAMDGreeting" ng-model="vm.ivrCampaign.dialAMDGreeting" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDGREETING"></span></div>\n                <div ng-messages="amdForm[\'dialAMDGreeting\'].$error" ng-show="amdForm[\'dialAMDGreeting\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDGREETING_REQUIRED">AMDGreeting field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDGREETING_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDGreeting must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.ivrCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDAFTERGREETINGSILENCE">AMDAfterGreetingSilence</label>\n                <input type="number" name="dialAMDAfterGreetingSilence" ng-model="vm.ivrCampaign.dialAMDAfterGreetingSilence" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDAFTERGREETINGSILENCE"></span></div>\n                <div ng-messages="amdForm[\'dialAMDAfterGreetingSilence\'].$error" ng-show="amdForm[\'dialAMDAfterGreetingSilence\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDAFTERGREETINGSILENCE_REQUIRED">AMDAfterGreetingSilence field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDAFTERGREETINGSILENCE_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDAfterGreetingSilence must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.ivrCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDTOTALANALYSISTIME">AMDTotalAnalysisTime</label>\n                <input type="number" name="dialAMDTotalAnalysisTime" ng-model="vm.ivrCampaign.dialAMDTotalAnalysisTime" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDTOTALANALYSISTIME"></span></div>\n                <div ng-messages="amdForm[\'dialAMDTotalAnalysisTime\'].$error" ng-show="amdForm[\'dialAMDTotalAnalysisTime\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDTOTALANALYSISTIME_REQUIRED">AMDTotalAnalysisTime field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDTOTALANALYSISTIME_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDTotalAnalysisTime must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.ivrCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDMINWORDLENGTH">AMDMinWordLength</label>\n                <input type="number" name="dialAMDMinWordLength" ng-model="vm.ivrCampaign.dialAMDMinWordLength" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDMINWORDLENGTH"></span></div>\n                <div ng-messages="amdForm[\'dialAMDMinWordLength\'].$error" ng-show="amdForm[\'dialAMDMinWordLength\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMINWORDLENGTH_REQUIRED">AMDMinWordLength field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMINWORDLENGTH_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDMinWordLength must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.ivrCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDBETWEENWORDSSILENCE">AMDBetweenWordsSilence</label>\n                <input type="number" name="dialAMDBetweenWordsSilence" ng-model="vm.ivrCampaign.dialAMDBetweenWordsSilence" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDBETWEENWORDSSILENCE"></span></div>\n                <div ng-messages="amdForm[\'dialAMDBetweenWordsSilence\'].$error" ng-show="amdForm[\'dialAMDBetweenWordsSilence\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDBETWEENWORDSSILENCE_REQUIRED">AMDBetweenWordsSilence field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDBETWEENWORDSSILENCE_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDBetweenWordsSilence must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.ivrCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDMAXIMUMNUMBEROFWORDS">AMDMaximumNumberOfWords</label>\n                <input type="number" name="dialAMDMaximumNumberOfWords" ng-model="vm.ivrCampaign.dialAMDMaximumNumberOfWords" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDMAXIMUMNUMBEROFWORDS"></span></div>\n                <div ng-messages="amdForm[\'dialAMDMaximumNumberOfWords\'].$error" ng-show="amdForm[\'dialAMDMaximumNumberOfWords\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMAXIMUMNUMBEROFWORDS_REQUIRED">AMDMaximumNumberOfWords field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMAXIMUMNUMBEROFWORDS_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDMaximumNumberOfWords must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.ivrCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDSILENCETHRESHOLD">AMDSilenceThreshold</label>\n                <input type="number" name="dialAMDSilenceThreshold" ng-model="vm.ivrCampaign.dialAMDSilenceThreshold" min="0" max="32767">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDSILENCETHRESHOLD"></span></div>\n                <div ng-messages="amdForm[\'dialAMDSilenceThreshold\'].$error" ng-show="amdForm[\'dialAMDSilenceThreshold\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDSILENCETHRESHOLD_REQUIRED">AMDSilenceThreshold field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDSILENCETHRESHOLD_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDSilenceThreshold must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="MOTIONDIALER.ERRORS.AMDSILENCETHRESHOLD_MUST_BE_LESS_THAN_OR_EQUAL_TO">AMDSilenceThreshold must be a valid greater or equal than</span> <span>32767</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.ivrCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDMAXIMUMWORDLENGTH">AMDMaximumWordLength</label>\n                <input type="number" name="dialAMDMaximumWordLength" ng-model="vm.ivrCampaign.dialAMDMaximumWordLength" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDMAXIMUMWORDLENGTH"></span></div>\n                <div ng-messages="amdForm[\'dialAMDMaximumWordLength\'].$error" ng-show="amdForm[\'dialAMDMaximumWordLength\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMAXIMUMWORDLENGTH_REQUIRED">AMDMaximumWordLength field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMAXIMUMWORDLENGTH_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDMaximumWordLength must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n        </form>\n    </div>\n    </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="MOTIONDIALER.HOPPERS">HOPPERS</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="ivrCampaign-detail-form-container hopperstatistics md-background-bg md-whiteframe-1dp">\n                <div ng-controller="IvrCampaignHopperStatisticsController as vm_hs" ng-init="vm_hs.init(vm.ivrCampaign)">\n                    <md-toolbar class="md-table-toolbar md-default">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="MOTIONDIALER.HOPPERWIDGET">Hoppers</span>\n                            <div flex></div>\n                            <md-button class="md-icon-button" ng-click="vm_hs.init(vm.ivrCampaign)" aria-label="refresh Hopper" translate translate-attr-label="MOTIONDIALER.REFRESH_HOPPERS">\n                                <md-icon md-font-icon="icon-refresh"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    \x3c!-- WIDGET GROUP --\x3e\n                    <div class="widget-group" layout="row" flex="100" layout-wrap>\n\n                        \x3c!-- WIDGET 1 --\x3e\n                        <ms-widget class="h-140" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="25">\n\n                            \x3c!-- Front --\x3e\n                            <ms-widget-front class="p-16 white-bg" layout="row" flex>\n                                <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                    <div class="md-display-1 pb-8">{{(vm_hs.total || 0) + (vm_hs.closed || 0)}}</div>\n                                    <div class="font-weight-500 secondary-text">{{ \'MOTIONDIALER.TOTAL\' | translate }}</div>\n                                </div>\n                            </ms-widget-front>\n                            \x3c!-- / Front --\x3e\n\n                        </ms-widget>\n                        \x3c!-- / WIDGET 1 --\x3e\n\n                        \x3c!-- WIDGET 2 --\x3e\n                        <ms-widget class="h-140" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="25">\n\n                            \x3c!-- Front --\x3e\n                            <ms-widget-front class="p-16 white-bg" layout="row" flex>\n                                <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                    <div class="md-display-1 pb-8">{{vm_hs.fresh || 0}} ({{vm_hs.total ? ((((vm_hs.fresh || 0) * 100)/((vm_hs.closed || 0) + (vm_hs.total || 0))) | number: 2) : 0}}%)</div>\n                                    <div class="font-weight-500 secondary-text">{{ \'MOTIONDIALER.FRESH\' | translate }}</div>\n                                </div>\n                            </ms-widget-front>\n                            \x3c!-- / Front --\x3e\n\n                        </ms-widget>\n                        \x3c!-- / WIDGET 2 --\x3e\n\n                        \x3c!-- WIDGET 3 --\x3e\n                        <ms-widget class="h-140" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="25">\n\n                            \x3c!-- Front --\x3e\n                            <ms-widget-front class="p-16 white-bg" layout="row" flex>\n                                <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                    <div class="md-display-1 pb-8">{{vm_hs.total ? (vm_hs.total - (vm_hs.fresh || 0)) : 0}} ({{vm_hs.total ? ((((vm_hs.total - (vm_hs.fresh || 0)) * 100)/((vm_hs.closed || 0) + (vm_hs.total || 0))) | number: 2) : 0}}%)</div>\n                                    <div class="font-weight-500 secondary-text">{{ \'MOTIONDIALER.OPEN\' | translate }}</div>\n                                </div>\n                            </ms-widget-front>\n                            \x3c!-- / Front --\x3e\n\n                        </ms-widget>\n                        \x3c!-- / WIDGET 3 --\x3e\n\n                        \x3c!-- WIDGET 3 --\x3e\n                        <ms-widget class="h-140" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="25">\n\n                            \x3c!-- Front --\x3e\n                            <ms-widget-front class="p-16 white-bg" layout="row" flex>\n                                <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                    <div class="md-display-1 pb-8">{{vm_hs.closed ? (vm_hs.closed || 0) : 0}} ({{vm_hs.closed ? ((((vm_hs.closed) * 100)/(vm_hs.closed + (vm_hs.total || 0))) | number: 2) : 0}}%)</div>\n                                    <div class="font-weight-500 secondary-text">{{ \'MOTIONDIALER.CLOSED\' | translate }}</div>\n                                </div>\n                            </ms-widget-front>\n                            \x3c!-- / Front --\x3e\n\n                        </ms-widget>\n                        \x3c!-- / WIDGET 3 --\x3e\n\n                    </div>\n                    \x3c!-- / WIDGET GROUP --\x3e\n                </div>\n\n            </div>\n            <div class="ivrCampaign-detail-form-container hoppers md-background-bg md-whiteframe-1dp">\n                <div ng-controller="IvrCampaignHoppersController as vm_dc" ng-init="vm_dc.init(vm.ivrCampaign)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedIvrCampaignHoppers.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="MOTIONDIALER.HOPPERS">Hoppers</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                            <md-button class="md-icon-button" ng-click="vm_dc.getIvrCampaignHoppers()" aria-label="refresh Hoppers" translate translate-attr-label="MOTIONDIALER.REFRESH_HOPPERS">\n                                <md-icon md-font-icon="icon-refresh"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedIvrCampaignHoppers.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedIvrCampaignHoppers.length}} {{vm_dc.selectedIvrCampaignHoppers.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedIvrCampaignHoppers" csv-label="true" filename="ivrCampaigns.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                            <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedIvrCampaignHoppers($event)" aria-label="delete selected" translate translate-attr-label="IVRCAMPAIGNS.DELETE_SELECTED">\n                                <md-icon md-font-icon="icon-delete"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedIvrCampaignHoppers" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getIvrCampaignHoppers">\n                                <tr md-row>\n                                    <th md-column md-order-by="ContactId">{{ \'MOTIONDIALER.CONTACTID\' | translate }}</th>\n                                    <th md-column md-order-by="phone">{{ \'MOTIONDIALER.PHONE\' | translate }}</th>\n                                    <th md-column md-order-by="countcongestionretry">{{ \'MOTIONDIALER.CONGESTION\' | translate }}</th>\n                                    <th md-column md-order-by="countbusyretry">{{ \'MOTIONDIALER.BUSY\' | translate }}</th>\n                                    <th md-column md-order-by="countnoanswerretry">{{ \'MOTIONDIALER.NOANSWER\' | translate }}</th>\n                                    <th md-column md-order-by="scheduledat">{{ \'MOTIONDIALER.SCHEDULEDAT\' | translate }}</th>\n                                    <th md-column md-order-by="priority">{{ \'MOTIONDIALER.PRIORITY\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="hopper" md-select-id="id" ng-repeat="hopper in vm_dc.ivrCampaignHoppers.rows">\n                                    <td ng-click="vm_dc.createOrEditIvrCampaignHopper($event, hopper)" md-cell>{{hopper.ContactId}}</td>\n                                    <td ng-click="vm_dc.createOrEditIvrCampaignHopper($event, hopper)" md-cell>{{hopper.phone}}</td>\n                                    <td ng-click="vm_dc.createOrEditIvrCampaignHopper($event, hopper)" md-cell>{{hopper.countcongestionretry}}</td>\n                                    <td ng-click="vm_dc.createOrEditIvrCampaignHopper($event, hopper)" md-cell>{{hopper.countbusyretry}}</td>\n                                    <td ng-click="vm_dc.createOrEditIvrCampaignHopper($event, hopper)" md-cell>{{hopper.countnoanswerretry}}</td>\n                                    <td ng-click="vm_dc.createOrEditIvrCampaignHopper($event, hopper)" md-cell>{{hopper.scheduledat | date:\'medium\'}}</td>\n                                    <td ng-click="vm_dc.createOrEditIvrCampaignHopper($event, hopper)" md-cell>{{ vm_dc.arraypriority[hopper.priority].option }}</td>\n                                    <td md-cell class="actions">\n                                        <md-menu>\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MOTIONDIALER.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_dc.createOrEditIvrCampaignHopper($event, hopper)" translate="MOTIONDIALER.EDIT_HOPPER">\n                                                        Edit Hopper\n                                                    </md-button>\n                                                </md-menu-item>\n                                                <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                    <md-button ng-click="vm_dc.deleteConfirm(hopper, $event)" translate="MOTIONDIALER.DELETE_HOPPER">\n                                                        Delete Hopper\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.ivrCampaignHoppers.rows.length">\n                                    <td md-cell colspan="10">\n                                        <span class="text-boxed-ligth" translate="MOTIONDIALER.NO_HOPPER_AVAILABLE">No hopper available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                        md-page="vm_dc.query.page" md-total="{{vm_dc.ivrCampaignHoppers.count}}" md-on-paginate="vm_dc.getIvrCampaignHoppers" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="MOTIONDIALER.HISTORY">HISTORY</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="ivrCampaign-detail-form-container hopperhistories md-background-bg md-whiteframe-1dp">\n                <div ng-controller="IvrCampaignHopperHistoriesController as vm_dc" ng-init="vm_dc.init(vm.ivrCampaign)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedIvrCampaignHopperHistories.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="MOTIONDIALER.HOPPERHISTORIES">HopperHistories</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                            <md-button class="md-icon-button" ng-click="vm_dc.getIvrCampaignHopperHistories()" aria-label="refresh HopperHistories" translate translate-attr-label="MOTIONDIALER.REFRESH_HOPPERHISTORIES">\n                                <md-icon md-font-icon="icon-refresh"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedIvrCampaignHopperHistories.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedIvrCampaignHopperHistories.length}} {{vm_dc.selectedIvrCampaignHopperHistories.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedIvrCampaignHopperHistories" csv-label="true" filename="ivrCampaigns.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedIvrCampaignHopperHistories" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getIvrCampaignHopperHistories">\n                                <tr md-row>\n                                    <th md-column md-order-by="uniqueid">{{ \'MOTIONDIALER.UNIQUEID\' | translate }}</th>\n                                    <th md-column md-order-by="ContactId">{{ \'MOTIONDIALER.CONTACTID\' | translate }}</th>\n                                    <th md-column md-order-by="calleridnum">{{ \'MOTIONDIALER.PHONE\' | translate }}</th>\n                                    <th md-column md-order-by="calleridname">{{ \'MOTIONDIALER.NAME\' | translate }}</th>\n                                    <th md-column md-order-by="statedesc">{{ \'MOTIONDIALER.STATUS\' | translate }}</th>\n                                    <th md-column md-order-by="scheduledat">{{ \'MOTIONDIALER.SCHEDULEDAT\' | translate }}</th>\n                                    <th md-column md-order-by="starttime">{{ \'MOTIONDIALER.STARTTIME\' | translate }}</th>\n                                    <th md-column md-order-by="endtime">{{ \'MOTIONDIALER.ENDTIME\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="hopperHistory" md-select-id="id" ng-repeat="hopperHistory in vm_dc.ivrCampaignHopperHistories.rows">\n                                    <td md-cell>{{hopperHistory.uniqueid}}</td>\n                                    <td md-cell>{{hopperHistory.ContactId}}</td>\n                                    <td md-cell>{{hopperHistory.calleridnum}}</td>\n                                    <td md-cell>{{hopperHistory.calleridname}}</td>\n                                    <td md-cell>{{hopperHistory.statedesc}}</td>\n                                    <td md-cell>{{hopperHistory.scheduledat | date:\'medium\'}}</td>\n                                    <td md-cell>{{hopperHistory.starttime | date:\'medium\'}}</td>\n                                    <td md-cell>{{hopperHistory.endtime | date:\'medium\'}}</td>\n                                    <td md-cell class="actions">\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.ivrCampaignHopperHistories.rows.length">\n                                    <td md-cell colspan="11">\n                                        <span class="text-boxed-ligth" translate="MOTIONDIALER.NO_HOPPERHISTORY_AVAILABLE">No hopperhistory available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                        md-page="vm_dc.query.page" md-total="{{vm_dc.ivrCampaignHopperHistories.count}}" md-on-paginate="vm_dc.getIvrCampaignHopperHistories" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="MOTIONDIALER.FINAL">FINAL</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="ivrCampaign-detail-form-container hopperfinals md-background-bg md-whiteframe-1dp">\n                <div ng-controller="IvrCampaignHopperFinalsController as vm_dc" ng-init="vm_dc.init(vm.ivrCampaign)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedIvrCampaignHopperFinals.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="MOTIONDIALER.HOPPERFINALS">HopperFinals</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                            <md-button class="md-icon-button" ng-click="vm_dc.getIvrCampaignHopperFinals()" aria-label="refresh HopperFinals" translate translate-attr-label="MOTIONDIALER.REFRESH_HOPPERFINALS">\n                                <md-icon md-font-icon="icon-refresh"></md-icon>\n                            </md-button>\n                            <td md-cell class="actions">\n                                <md-menu>\n                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MOTIONDIALER.MORE" ng-click="vm_dc.countContactsIvrCampaignHopperFinal(vm_dc.query.id); $mdOpenMenu($event);">\n                                        <md-icon md-font-icon="icon-backup-restore"></md-icon>\n                                        <md-tooltip><span translate="MOTIONDIALER.RESTORECONTACTS"></span></md-tooltip>\n                                    </md-button>\n                                    <md-menu-content width="3">\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsIvrCampaignHopperFinal(3)">\n                                                <span translate="MOTIONDIALER.NOANSWER ">NoAnswer</span>\n                                                <span class="badge">({{vm_dc.contacts.noAnswerContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsIvrCampaignHopperFinal(5)">\n                                                <span translate="MOTIONDIALER.BUSY ">Busy</span>\n                                                <span class="badge">({{vm_dc.contacts.busyContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsIvrCampaignHopperFinal(8)">\n                                                <span translate="MOTIONDIALER.CONGESTION ">Congestion</span>\n                                                <span class="badge">({{vm_dc.contacts.congestionContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsIvrCampaignHopperFinal(10)">\n                                                <span translate="MOTIONDIALER.DROPPED ">Drop</span>\n                                                <span class="badge">({{vm_dc.contacts.dropContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsIvrCampaignHopperFinal(11)">\n                                                <span translate="MOTIONDIALER.ABANDONED ">Abandoned</span>\n                                                <span class="badge">({{vm_dc.contacts.abandonedContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsIvrCampaignHopperFinal(22)">\n                                                <span translate="MOTIONDIALER.RECALLFAILEDTIMEOUT">Recall</span>\n                                                <span class="badge">({{vm_dc.contacts.reCallContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsIvrCampaignHopperFinal(0)">\n                                                <span translate="MOTIONDIALER.NO_SUCH_NUMBER">NoSuchNumber</span>\n                                                <span class="badge">({{vm_dc.contacts.noSuchContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </td>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedIvrCampaignHopperFinals.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedIvrCampaignHopperFinals.length}} {{vm_dc.selectedIvrCampaignHopperFinals.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedIvrCampaignHopperFinals" csv-label="true" filename="ivrCampaigns.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                            <md-button class="md-icon-button" ng-click="vm_dc.moveSelectedIvrCampaignHopperFinals($event)" aria-label="move selected" translate translate-attr-label="IVRCAMPAIGNS.MOVE_SELECTED">\n                                <md-icon md-font-icon="icon-restore"></md-icon>\n                                <md-tooltip><span translate="MOTIONDIALER.RESTORECONTACTS"></span></md-tooltip>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedIvrCampaignHopperFinals" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getIvrCampaignHopperFinals">\n                                <tr md-row>\n                                    <th md-column md-order-by="uniqueid">{{ \'MOTIONDIALER.UNIQUEID\' | translate }}</th>\n                                    <th md-column md-order-by="ContactId">{{ \'MOTIONDIALER.CONTACTID\' | translate }}</th>\n                                    <th md-column md-order-by="calleridnum">{{ \'MOTIONDIALER.PHONE\' | translate }}</th>\n                                    <th md-column md-order-by="calleridname">{{ \'MOTIONDIALER.NAME\' | translate }}</th>\n                                    <th md-column md-order-by="statedesc">{{ \'MOTIONDIALER.STATUS\' | translate }}</th>\n                                    <th md-column md-order-by="countcongestionretry">{{ \'MOTIONDIALER.CONGESTION\' | translate }}</th>\n                                    <th md-column md-order-by="countbusyretry">{{ \'MOTIONDIALER.BUSY\' | translate }}</th>\n                                    <th md-column md-order-by="countnoanswerretry">{{ \'MOTIONDIALER.NOANSWER\' | translate }}</th>\n                                    <th md-column md-order-by="starttime">{{ \'MOTIONDIALER.STARTTIME\' | translate }}</th>\n                                    <th md-column md-order-by="endtime">{{ \'MOTIONDIALER.ENDTIME\' | translate }}</th>\n                                    <th md-column md-order-by="disposition">{{ \'MOTIONDIALER.DISPOSITION\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="hopperFinal" md-select-id="id" ng-repeat="hopperFinal in vm_dc.ivrCampaignHopperFinals.rows">\n                                    <td md-cell>{{hopperFinal.uniqueid}}</td>\n                                    <td md-cell>{{hopperFinal.ContactId}}</td>\n                                    <td md-cell>{{hopperFinal.calleridnum}}</td>\n                                    <td md-cell>{{hopperFinal.calleridname}}</td>\n                                    <td md-cell>{{hopperFinal.statedesc}}</td>\n                                    <td md-cell>{{hopperFinal.countcongestionretry}}</td>\n                                    <td md-cell>{{hopperFinal.countbusyretry}}</td>\n                                    <td md-cell>{{hopperFinal.countnoanswerretry}}</td>\n                                    <td md-cell>{{hopperFinal.starttime | date:\'medium\'}}</td>\n                                    <td md-cell>{{hopperFinal.endtime | date:\'medium\'}}</td>\n                                    <td md-cell>{{hopperFinal.disposition}}</td>\n                                    <td md-cell class="actions">\n                                        <md-menu>\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MOTIONDIALER.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_dc.moveConfirm(hopperFinal, $event)" translate="MOTIONDIALER.MOVE_HOPPERFINAL">\n                                                        Move HopperFinal\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.ivrCampaignHopperFinals.rows.length">\n                                    <td md-cell colspan="23">\n                                        <span class="text-boxed-ligth" translate="MOTIONDIALER.NO_HOPPERFINAL_AVAILABLE">No hopperfinal available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                        md-page="vm_dc.query.page" md-total="{{vm_dc.ivrCampaignHopperFinals.count}}" md-on-paginate="vm_dc.getIvrCampaignHopperFinals" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="MOTIONDIALER.BLACKLIST">BLACKLIST</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="ivrCampaign-detail-form-container hopperblacks md-background-bg md-whiteframe-1dp">\n                <div ng-controller="IvrCampaignHopperBlacksController as vm_dc" ng-init="vm_dc.init(vm.ivrCampaign)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedIvrCampaignHopperBlacks.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="MOTIONDIALER.HOPPERBLACKS">HopperBlacks</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedIvrCampaignHopperBlacks.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedIvrCampaignHopperBlacks.length}} {{vm_dc.selectedIvrCampaignHopperBlacks.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedIvrCampaignHopperBlacks" csv-label="true" filename="ivrCampaigns.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedIvrCampaignHopperBlacks" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getIvrCampaignHopperBlacks">\n                                <tr md-row>\n                                    <th md-column md-order-by="ContactId">{{ \'MOTIONDIALER.CONTACTID\' | translate }}</th>\n                                    <th md-column md-order-by="phone">{{ \'MOTIONDIALER.PHONE\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="hopperBlack" md-select-id="id" ng-repeat="hopperBlack in vm_dc.ivrCampaignHopperBlacks.rows">\n                                    <td md-cell>{{hopperBlack.ContactId}}</td>\n                                    <td md-cell>{{hopperBlack.phone}}</td>\n                                    <td md-cell class="actions">\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.ivrCampaignHopperBlacks.rows.length">\n                                    <td md-cell colspan="4">\n                                        <span class="text-boxed-ligth" translate="MOTIONDIALER.NO_HOPPERBLACK_AVAILABLE">No hopperblack available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                        md-page="vm_dc.query.page" md-total="{{vm_dc.ivrCampaignHopperBlacks.count}}" md-on-paginate="vm_dc.getIvrCampaignHopperBlacks" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    </md-tabs>\n\n</div>\n\x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/motiondialer/views/ivrCampaigns/ivrCampaigns.html",'<div id="ivrCampaigns" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-fire" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="MOTIONDIALER.IVRCAMPAIGNS">IvrCampaigns</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="MOTIONDIALER.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedIvrCampaigns.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedIvrCampaigns =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="MOTIONDIALER.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-ivrCampaigns-count">\n                    <span>{{vm.selectedIvrCampaigns.length}}</span>\n                <span translate="MOTIONDIALER.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="IVRCAMPAIGNS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllIvrCampaigns()" translate="MOTIONDIALER.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectIvrCampaigns()" translate="MOTIONDIALER.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedIvrCampaigns" csv-label="true" filename="ivrCampaigns.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedIvrCampaigns($event)" aria-label="delete selected" translate translate-attr-label="IVRCAMPAIGNS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- IVRCAMPAIGN TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedIvrCampaigns" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getIvrCampaigns">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'MOTIONDIALER.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'MOTIONDIALER.NAME\' | translate }}</th>\n                                <th md-column md-order-by="active">{{ \'MOTIONDIALER.ACTIVE\' | translate }}</th>\n                                <th md-column md-order-by="TrunkId">{{ \'MOTIONDIALER.TRUNK\' | translate }}</th>\n                                <th md-column md-order-by="SquareProjectId">{{ \'MOTIONDIALER.CALLYSQUAREPROJECT\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.ivrCampaigns.rows.length">\n                                <td md-cell colspan="6">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="MOTIONDIALER.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="ivrCampaign" md-select-id="id" ng-repeat="ivrCampaign in vm.ivrCampaigns.rows">\n                                <td md-cell ng-if="ivrCampaign.userpic"><img class="avatar" alt="{{ivrCampaign.name}}" ng-src="api/users/{{ivrCampaign.id}}/avatar" /></td>\n                                <td md-cell ng-if="!ivrCampaign.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{ivrCampaign.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditIvrCampaign($event, ivrCampaign)" md-cell class="id ">{{ivrCampaign.id}}</td>\n                                <td ng-click="vm.createOrEditIvrCampaign($event, ivrCampaign)" md-cell class="name ">{{ivrCampaign.name}}</td>\n                                <td ng-click="vm.createOrEditIvrCampaign($event, ivrCampaign)" md-cell class="active ">\n                                    <md-icon md-colors="{color: {{ivrCampaign.active ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{ivrCampaign.active ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                </td>\n                                <td ng-click="vm.createOrEditIvrCampaign($event, ivrCampaign)" md-cell class="TrunkId ">{{ TrunkId = vm.trunks[ivrCampaign.TrunkId]; TrunkId.name }}</td>\n                                <td ng-click="vm.createOrEditIvrCampaign($event, ivrCampaign)" md-cell class="SquareProjectId ">{{ SquareProjectId = vm.projects[ivrCampaign.SquareProjectId]; SquareProjectId.name }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MOTIONDIALER.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(ivrCampaign, $event)" translate="MOTIONDIALER.EDIT_IVRCAMPAIGN">\n                                                    Edit IvrCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.listadddialog(ivrCampaign, $event)" translate="MOTIONDIALER.LISTADD_IVRCAMPAIGN">\n                                                    listadd IvrCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.blacklistadddialog(ivrCampaign, $event)" translate="MOTIONDIALER.BLACKLISTADD_IVRCAMPAIGN">\n                                                    blacklistadd IvrCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(ivrCampaign, $event)" translate="MOTIONDIALER.DELETE_IVRCAMPAIGN">\n                                                    Delete IvrCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(ivrCampaign, $event)" translate="MOTIONDIALER.GOTOREALTIME_IVRCAMPAIGN">\n                                                    goToRealtime IvrCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.ivrCampaigns.count}}" md-on-paginate="vm.getIvrCampaigns" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / IVRCAMPAIGN TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD IVRCAMPAIGN BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-ivrCampaign-button" ng-click="vm.createOrEditIvrCampaign($event)" aria-label="add ivrCampaign" translate translate-attr-aria-label="MOTIONDIALER.ADD_IVRCAMPAIGN">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD IVRCAMPAIGN BUTTON --\x3e\n</div>'),e.put("app/main/apps/motiondialer/views/queueCampaigns/create/dialog.html",'<md-dialog class="queueCampaign-dialog" aria-label="New QueueCampaign">\n    <form name="queueCampaignForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.queueCampaign.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newQueueCampaign">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.NAME"></span></div>\n                <div ng-messages="queueCampaignForm[\'name\'].$error" ng-show="queueCampaignForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="MOTIONDIALER.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.queueCampaign.dialActive" aria-label="Active"><span translate="MOTIONDIALER.ACTIVE">Active</span></md-switch>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.TRUNK">Trunk</label>\n                <md-select name="TrunkId" ng-model="vm.queueCampaign.TrunkId" required>\n                    <md-option ng-value="TrunkId.id" ng-repeat="TrunkId in vm.trunks">{{ TrunkId.name }}</md-option>\n                </md-select>\n                <div ng-messages="queueCampaignForm[\'TrunkId\'].$error" ng-show="queueCampaignForm[\'TrunkId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.TRUNK_REQUIRED">Trunk field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialMethod != \'preview\'" class="md-block">\n                <label translate="MOTIONDIALER.INTERVAL">Interval</label>\n                <md-select name="IntervalId" ng-model="vm.queueCampaign.IntervalId" required>\n                    <md-option ng-value="IntervalId.id" ng-repeat="IntervalId in vm.interval">{{ IntervalId.name }}</md-option>\n                </md-select>\n                <div ng-messages="queueCampaignForm[\'IntervalId\'].$error" ng-show="queueCampaignForm[\'IntervalId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.INTERVAL_REQUIRED">Interval field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.CHECKDUPLICATE">CheckDuplicate</label>\n                <md-select name="dialCheckDuplicateType" ng-model="vm.queueCampaign.dialCheckDuplicateType" required>\n\n                    <md-option ng-value="\'always\'"> {{ \'MOTIONDIALER.ALWAYS\' | translate }}</md-option>\n\n                    <md-option ng-value="\'never\'"> {{ \'MOTIONDIALER.NEVER\' | translate }}</md-option>\n\n                    <md-option ng-value="\'onlyIfOpen\'"> {{ \'MOTIONDIALER.ONLY_IF_OPEN\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="queueCampaignForm[\'dialCheckDuplicateType\'].$error" ng-show="queueCampaignForm[\'dialCheckDuplicateType\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.CHECKDUPLICATE_REQUIRED">CheckDuplicate field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.METHOD">Method</label>\n                <md-select name="dialMethod" ng-model="vm.queueCampaign.dialMethod" required>\n                    <md-option ng-value="\'progressive\'">Progressive</md-option>\n                    <md-option ng-value="\'power\'">PowerDialing</md-option>\n                    <md-option ng-value="\'predictive\'">Predictive</md-option>\n                    <md-option ng-value="\'preview\'">Preview</md-option>\n                    <md-option ng-value="\'booked\'">BookedProgressive</md-option>\n                </md-select>\n                <div class="hint"><span translate="MOTIONDIALER.HELP.METHOD"></span></div>\n                <div ng-messages="queueCampaignForm[\'dialMethod\'].$error" ng-show="queueCampaignForm[\'dialMethod\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.METHOD_REQUIRED">Method field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialMethod == \'power\'" class="md-block">\n                <span translate="MOTIONDIALER.POWERLEVEL">PowerLevel</span>\n                <div class="hint"><span translate="MOTIONDIALER.HELP.POWERLEVEL"></span></div>\n                <md-slider md-discrete flex ng-model="vm.queueCampaign.dialPowerLevel" min="1" max="10" step="0.1" class="md-accent">\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialMethod == \'predictive\'" class="md-block">\n                <label translate="MOTIONDIALER.PREDICTIVEOPTIMIZATION">PredictiveOptimization</label>\n                <md-select name="dialPredictiveOptimization" ng-model="vm.queueCampaign.dialPredictiveOptimization">\n\n                    <md-option ng-value="\'agentBusyFactor\'"> {{ \'MOTIONDIALER.AGENTBUSYFACTOR\' | translate }}</md-option>\n\n                    <md-option ng-value="\'dropRate\'"> {{ \'MOTIONDIALER.DROPRATE\' | translate }}</md-option>\n                </md-select>\n                <div class="hint"><span translate="MOTIONDIALER.HELP.PREDICTIVEOPTIMIZATION"></span></div>\n                <div ng-messages="queueCampaignForm[\'dialPredictiveOptimization\'].$error" ng-show="queueCampaignForm[\'dialPredictiveOptimization\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.PREDICTIVEOPTIMIZATION_REQUIRED">PredictiveOptimization field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialMethod == \'predictive\'" class="md-block">\n                <span translate="MOTIONDIALER.PREDICTIVEOPTIMIZATIONPERCENTAGE">PredictiveOptimizationPercentage</span>\n                <div class="hint"><span translate="MOTIONDIALER.HELP.PREDICTIVEOPTIMIZATIONPERCENTAGE"></span></div>\n                <md-slider md-discrete flex ng-model="vm.queueCampaign.dialPredictiveOptimizationPercentage" min="1" max="95" step="0.1" class="md-accent">\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialMethod == \'predictive\'" class="md-block">\n                <span translate="MOTIONDIALER.PREDICTIVEINTERVAL">PredictiveInterval</span>\n                <div class="hint"><span translate="MOTIONDIALER.HELP.PREDICTIVEINTERVAL"></span></div>\n                <md-slider md-discrete flex ng-model="vm.queueCampaign.dialPredictiveInterval" min="5" max="30" step="1" class="md-accent">\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialMethod != \'preview\'" class="md-block">\n                <label translate="MOTIONDIALER.MAXCONCURRENTCALLS">MaxConcurrentCalls</label>\n                <input type="number" name="dialLimitQueue" ng-model="vm.queueCampaign.dialLimitQueue" min="0" max="9999" ng-required="true">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.MAXCONCURRENTCALLS"></span></div>\n                <div ng-messages="queueCampaignForm[\'dialLimitQueue\'].$error" ng-show="queueCampaignForm[\'dialLimitQueue\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.MAXCONCURRENTCALLS_REQUIRED">MaxConcurrentCalls field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.MAXCONCURRENTCALLS_MUST_BE_GREATER_THAN_OR_EQUAL_TO">MaxConcurrentCalls must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="MOTIONDIALER.ERRORS.MAXCONCURRENTCALLS_MUST_BE_LESS_THAN_OR_EQUAL_TO">MaxConcurrentCalls must be a valid greater or equal than</span> <span>9999</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="md-block">\n                <label translate="MOTIONDIALER.QUEUETIMEOUT">QueueTimeout</label>\n                <input type="number" name="dialQueueTimeout" ng-model="vm.queueCampaign.dialQueueTimeout" min="1" max="999" ng-required="true">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.QUEUETIMEOUT"></span></div>\n                <div ng-messages="queueCampaignForm[\'dialQueueTimeout\'].$error" ng-show="queueCampaignForm[\'dialQueueTimeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.QUEUETIMEOUT_REQUIRED">QueueTimeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.QUEUETIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">QueueTimeout must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="MOTIONDIALER.ERRORS.QUEUETIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">QueueTimeout must be a valid greater or equal than</span> <span>999</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.AGENTTIMEOUT">AgentTimeout</label>\n                <input type="number" name="timeout" ng-model="vm.queueCampaign.timeout" min="0" ng-required="true">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AGENTTIMEOUT"></span></div>\n                <div ng-messages="queueCampaignForm[\'timeout\'].$error" ng-show="queueCampaignForm[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AGENTTIMEOUT_REQUIRED">AgentTimeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AGENTTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AgentTimeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.queueCampaign.description">\n                <div ng-messages="queueCampaignForm[\'description\'].$error" ng-show="queueCampaignForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newQueueCampaign" ng-click="vm.saveQueueCampaign()" class="send-button md-accent md-raised" ng-disabled="queueCampaignForm.$invalid || queueCampaignForm.$pristine" aria-label="SAVE" translate="MOTIONDIALER.SAVE" translate-attr-aria-label="MOTIONDIALER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newQueueCampaign" ng-click="vm.addNewQueueCampaign()" class="send-button md-accent md-raised" ng-disabled="queueCampaignForm.$invalid" aria-label="ADD" translate="MOTIONDIALER.ADD_QUEUECAMPAIGN" translate-attr-aria-label="MOTIONDIALER.ADD_QUEUECAMPAIGN">\n                    ADD QUEUECAMPAIGN\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newQueueCampaign" ng-click="vm.deleteQueueCampaign($event)" aria-label="DELETE" translate translate-attr-aria-label="MOTIONDIALER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="MOTIONDIALER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/queueCampaigns/edit/agentadd/agentadd.html",'<md-dialog class="queueCampaign-dialog" aria-label="queueCampaign">\n    <form name="queueCampaignForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="MOTIONDIALER.AGENTADD_QUEUECAMPAIGN">Add Agent to queueCampaign</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <md-input-container flex class="no-margin">\n                <label translate="MOTIONDIALER.PENALTY">Penalty</label>\n                <input name="penalty" ng-model="vm.penalty" placeholder="0" required md-minlength="0" md-maxlength="3">\n                <div ng-messages="queueCampaignForm.penalty.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span>You must supply a penalty.</span>\n                    </div>\n                    <div ng-message="md-minlength">\n                        <span>Min Penalty 0 characters.</span>\n                    </div>\n                    <div ng-message="md-maxlength">\n                        <span>Max Penalty 3 characters.</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/queueCampaigns/edit/blacklistadd/blacklistadd.html",'<md-dialog class="queueCampaign-dialog" aria-label="queueCampaign">\n    <form name="queueCampaignForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="MOTIONDIALER.BLACKLISTADD_QUEUECAMPAIGN">Add List in QUEUECAMPAIGN</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect ng-hide="vm.loading" options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n            <div ng-hide="!vm.loading" layout-fill style="min-height: 397px;" layout="row" layout-sm="column" layout-align="center center">\n                <md-progress-circular class="md-primary md-hue-1" md-diameter="96"></md-progress-circular>\n            </div>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/queueCampaigns/edit/hoppers/dialog.html",'<md-dialog class="hopper-dialog" aria-label="New Hopper">\n    <form name="hopperForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <div class="md-block">\n                <label translate="MOTIONDIALER.SCHEDULEDAT">ScheduledAt</label>\n                <md-content layout="row" class="md-padding">\n                    <div flex class="md-block">\n                        <mdp-date-picker mdp-open-on-click name="scheduledatDate" mdp-placeholder="Date" mdp-format="YYYY-MM-DD" ng-model="vm.hopper.scheduledat" ng-init="vm.hopper.scheduledat = vm.getDateFromString(vm.hopper.scheduledat)">\n                            <div ng-messages="hopperForm.dateRangeFrom.$error" ng-show="hopperForm.dateRangeFrom.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="MOTIONDIALER.ERRORS.DATE_REQUIRED">Date is required</span>\n                                </div>\n                                <div ng-message="format">\n                                    <span translate="MOTIONDIALER.ERRORS.DATE_INVALID">Date is invalid</span>\n                                </div>\n                            </div>\n                        </mdp-date-picker>\n                    </div>\n                    <div flex class="md-block">\n                        <mdp-time-picker mdp-open-on-click name="scheduledatTime" mdp-placeholder="Time" mdp-format="HH:mm:ss" mdp-auto-switch="true" ng-model="vm.hopper.scheduledat" ng-init="vm.hopper.scheduledat = vm.getDateFromString(vm.hopper.scheduledat)">\n                            <div ng-messages="hopperForm.timeRangeFrom.$error" ng-show="hopperForm.timeRangeFrom.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="MOTIONDIALER.ERRORS.TIME_REQUIRED">Time is required</span>\n                                </div>\n                                <div ng-message="format">\n                                    <span translate="MOTIONDIALER.ERRORS.TIME_INVALID">Time is invalid</span>\n                                </div>\n                            </div>\n                        </mdp-time-picker>\n                    </div>\n                </md-content>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="MOTIONDIALER.PRIORITY">Priority</label>\n                <md-select name="priority" ng-model="vm.hopper.priority">\n                    <md-option ng-value="\'4\'">Highest</md-option>\n                    <md-option ng-value="\'3\'">High</md-option>\n                    <md-option ng-value="\'2\'">Medium</md-option>\n                    <md-option ng-value="\'1\'">Low</md-option>\n                    <md-option ng-value="\'0\'">Lowest</md-option>\n                </md-select>\n                <div class="hint"><span translate="MOTIONDIALER.HELP.PRIORITY"></span></div>\n                <div ng-messages="hopperForm[\'priority\'].$error" ng-show="hopperForm[\'priority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.PRIORITY_REQUIRED">Priority field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.hopper.recallme" aria-label="RecallAgent"><span translate="MOTIONDIALER.RECALLAGENT">RecallAgent</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="vm.hopper.recallme" class="md-block">\n                <label translate="MOTIONDIALER.AGENT">Agent</label>\n                <md-select name="UserId" ng-model="vm.hopper.UserId" required>\n                    <md-option ng-value="UserId.id" ng-repeat="UserId in vm.agents">{{ UserId.name }}</md-option>\n                </md-select>\n                <div ng-messages="hopperForm[\'UserId\'].$error" ng-show="hopperForm[\'UserId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AGENT_REQUIRED">Agent field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newHopper" ng-click="vm.saveHopper()" class="send-button md-accent md-raised" ng-disabled="hopperForm.$invalid || hopperForm.$pristine" aria-label="SAVE" translate="MOTIONDIALER.SAVE" translate-attr-aria-label="MOTIONDIALER.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newHopper" ng-click="vm.addNewHopper()" class="send-button md-accent md-raised" ng-disabled="hopperForm.$invalid" aria-label="ADD" translate="MOTIONDIALER.ADD_HOPPER" translate-attr-aria-label="MOTIONDIALER.ADD_HOPPER">\n                    ADD HOPPER\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newHopper" ng-click="vm.deleteHopper($event)" aria-label="DELETE" translate translate-attr-aria-label="MOTIONDIALER.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="MOTIONDIALER.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/queueCampaigns/edit/listadd/listadd.html",'<md-dialog class="queueCampaign-dialog" aria-label="queueCampaign">\n    <form name="queueCampaignForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="MOTIONDIALER.LISTADD_QUEUECAMPAIGN">Add List in QUEUECAMPAIGN</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect ng-hide="vm.loading" options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n            <div ng-hide="!vm.loading" layout-fill style="min-height: 397px;" layout="row" layout-sm="column" layout-align="center center">\n                <md-progress-circular class="md-primary md-hue-1" md-diameter="96"></md-progress-circular>\n            </div>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/queueCampaigns/edit/resetlist/resetlist.html",'<md-dialog class="queueCampaign-dialog" aria-label="queueCampaign">\n    <form name="queueCampaignForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="MOTIONDIALER.RESETLIST ">Reset List</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-disabled="vm.loading" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content ng-hide="vm.loading">\n            <div layout="row" layout-wrap flex>\n                <div flex-xs flex="50">\n                    <md-checkbox aria-label="Select All" ng-checked="vm.isChecked()" md-indeterminate="vm.isIndeterminate()" ng-click="vm.toggleAll()">\n                        <span ng-if="vm.isChecked()" translate="MOTIONDIALER.UNSELECTALL"></span>\n                        <span ng-if="!vm.isChecked()" translate="MOTIONDIALER.SELECTALL"></span>\n                    </md-checkbox>\n                </div>\n                <div flex-xs flex="50">\n                </div>\n                <div flex="{{vm.items.length > 10 ? 50 : 100 }}" ng-repeat="item in vm.items">\n                    <md-checkbox ng-checked="vm.exists(item, vm.selected)" ng-click="vm.toggle(item, vm.selected)">\n                        {{ item.name | limitTo:40 }}\n                    </md-checkbox>\n                </div>\n            </div>\n        </md-dialog-content>\n        <md-dialog-actions ng-hide="vm.loading" layout="row" layout-align="end center">\n            <div>\n            </div>\n            <md-button type="submit" ng-click="vm.listSelected()" class="send-button md-accent md-raised" ng-disabled="vm.loading" aria-label="RESET" translate="MOTIONDIALER.RESET" translate-attr-aria-label="MOTIONDIALER.RESET">\n                SAVE\n            </md-button>\n        </md-dialog-actions>\n        <div ng-hide="!vm.loading" layout-fill style="min-height: 397px;" layout="row" layout-sm="column" layout-align="center center">\n            <md-progress-circular class="md-primary md-hue-1" md-diameter="96"></md-progress-circular>\n        </div>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/queueCampaigns/edit/teamadd/teamadd.html",'<md-dialog class="queueCampaign-dialog" aria-label="queueCampaign">\n    <form name="queueCampaignForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="MOTIONDIALER.TEAMADD_QUEUECAMPAIGN">Add Team in QUEUECAMPAIGN</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <md-input-container flex class="no-margin">\n                <label translate="MOTIONDIALER.PENALTY">Penalty</label>\n                <input name="penalty" ng-model="vm.penalty" placeholder="0" required md-minlength="0" md-maxlength="3">\n                <div ng-messages="queueCampaignForm.penalty.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span>You must supply a penalty.</span>\n                    </div>\n                    <div ng-message="md-minlength">\n                        <span>Min Penalty 0 characters.</span>\n                    </div>\n                    <div ng-message="md-maxlength">\n                        <span>Max Penalty 3 characters.</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/motiondialer/views/queueCampaigns/edit/view.html",'<div id="motiondialer-queueCampaign" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-queueCampaigns-button md-icon-button" aria-label="Go to queueCampaigns" ng-click="vm.gotoQueueCampaigns()" translate translate-attr-aria-label="MOTIONDIALER.GO_TO_QUEUECAMPAIGNS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="queueCampaign-image" hide-xs>\n                    <img ng-src="assets/images/business/queueCampaigns.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.queueCampaign.id}}\n                        <span ng-if="vm.queueCampaign.name">{{vm.queueCampaign.name}}</span>\n                        <span ng-if="vm.queueCampaign.exten">{{vm.queueCampaign.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="MOTIONDIALER.CREATED_AT"></span> <span>{{vm.queueCampaign.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.listadddialog(vm.queueCampaign, $event)" class="md-fab md-green-500-bg md-icon-button" aria-label="listadd">\n                <md-tooltip><span translate="MOTIONDIALER.LISTADD_QUEUECAMPAIGN"></span></md-tooltip>\n                <md-icon md-font-icon="icon-format-list-numbers"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.blacklistadddialog(vm.queueCampaign, $event)" class="md-fab md-warn md-icon-button" aria-label="blacklistadd">\n                <md-tooltip><span translate="MOTIONDIALER.BLACKLISTADD_QUEUECAMPAIGN"></span></md-tooltip>\n                <md-icon md-font-icon="icon-block-helper"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.teamadddialog(vm.queueCampaign, $event)" class="md-fab md-orange-500-bg md-icon-button" aria-label="teamadd">\n                <md-tooltip><span translate="MOTIONDIALER.TEAMADD_QUEUECAMPAIGN"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-multiple-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.agentadddialog(vm.queueCampaign, $event)" class="md-fab md-purple-500-bg md-icon-button" aria-label="agentadd">\n                <md-tooltip><span translate="MOTIONDIALER.AGENTADD_QUEUECAMPAIGN"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.resetlistdialog(vm.queueCampaign, $event)" class="md-fab md-warn md-icon-button" aria-label="resetlist">\n                <md-tooltip><span translate="MOTIONDIALER.RESETLIST_QUEUECAMPAIGN"></span></md-tooltip>\n                <md-icon md-font-icon="icon-restore"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.gotogoto(vm.queueCampaign, $event)" class="md-fab md-warn md-icon-button" aria-label="goto">\n                <md-tooltip><span translate="MOTIONDIALER.GOTO_QUEUECAMPAIGN"></span></md-tooltip>\n                <md-icon md-font-icon="icon-cast"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveQueueCampaign()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (campaignForm.$invalid) || (queueForm.$invalid) || (originateForm.$invalid) || (globalForm.$invalid) || (congestionForm.$invalid) || (busyForm.$invalid) || (noanswerForm.$invalid) || (advancedForm.$invalid) || (advancedpreviewForm.$invalid) || (recallmeForm.$invalid) || (globalintervalForm.$invalid) || (timezoneForm.$invalid) || (amdForm.$invalid) || (hopperStatisticsForm.$invalid) || (hoppersForm.$invalid) || (hopperHistoriesForm.$invalid) || (hopperFinalsForm.$invalid) || (hopperBlacksForm.$invalid)"\n                translate="MOTIONDIALER.SAVE" translate-attr-aria-label="MOTIONDIALER.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="queueCampaign-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.queueCampaign.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.NAME"></span></div>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="MOTIONDIALER.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.queueCampaign.dialActive" aria-label="Active"><span translate="MOTIONDIALER.ACTIVE">Active</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.TRUNK">Trunk</label>\n                                <md-select name="TrunkId" ng-model="vm.queueCampaign.TrunkId" required>\n                                    <md-option ng-value="TrunkId.id" ng-repeat="TrunkId in vm.trunks">{{ TrunkId.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'TrunkId\'].$error" ng-show="generalForm[\'TrunkId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.TRUNK_REQUIRED">Trunk field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.BACKUPTRUNK">BackupTrunk</label>\n                                <md-select name="TrunkBackupId" ng-model="vm.queueCampaign.TrunkBackupId">\n                                    <md-option ng-value="TrunkBackupId.id" ng-repeat="TrunkBackupId in vm.trunks">{{ TrunkBackupId.name }}</md-option>\n                                    <md-option ng-value="null">None</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'TrunkBackupId\'].$error" ng-show="generalForm[\'TrunkBackupId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.BACKUPTRUNK_REQUIRED">BackupTrunk field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod != \'preview\'" class="md-block">\n                                <label translate="MOTIONDIALER.INTERVAL">Interval</label>\n                                <md-select name="IntervalId" ng-model="vm.queueCampaign.IntervalId" required>\n                                    <md-option ng-value="IntervalId.id" ng-repeat="IntervalId in vm.interval">{{ IntervalId.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'IntervalId\'].$error" ng-show="generalForm[\'IntervalId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.INTERVAL_REQUIRED">Interval field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.CHECKDUPLICATE">CheckDuplicate</label>\n                                <md-select name="dialCheckDuplicateType" ng-model="vm.queueCampaign.dialCheckDuplicateType" required>\n\n                                    <md-option ng-value="\'always\'"> {{ \'MOTIONDIALER.ALWAYS\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'never\'"> {{ \'MOTIONDIALER.NEVER\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'onlyIfOpen\'"> {{ \'MOTIONDIALER.ONLY_IF_OPEN\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'dialCheckDuplicateType\'].$error" ng-show="generalForm[\'dialCheckDuplicateType\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CHECKDUPLICATE_REQUIRED">CheckDuplicate field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.queueCampaign.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.CAMPAIGN">CAMPAIGN</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="queueCampaign-detail-form-container campaign md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.CAMPAIGN">CAMPAIGN</div>\n                        </div>\n                        <form name="campaignForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.METHOD">Method</label>\n                                <md-select name="dialMethod" ng-model="vm.queueCampaign.dialMethod" required autofocus>\n                                    <md-option ng-value="\'progressive\'">Progressive</md-option>\n                                    <md-option ng-value="\'power\'">PowerDialing</md-option>\n                                    <md-option ng-value="\'predictive\'">Predictive</md-option>\n                                    <md-option ng-value="\'preview\'">Preview</md-option>\n                                    <md-option ng-value="\'booked\'">BookedProgressive</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.METHOD"></span></div>\n                                <div ng-messages="campaignForm[\'dialMethod\'].$error" ng-show="campaignForm[\'dialMethod\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.METHOD_REQUIRED">Method field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod == \'power\'" class="md-block">\n                                <span translate="MOTIONDIALER.POWERLEVEL">PowerLevel</span>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.POWERLEVEL"></span></div>\n                                <md-slider md-discrete flex ng-model="vm.queueCampaign.dialPowerLevel" min="1" max="10" step="0.1" class="md-accent">\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod == \'predictive\'" class="md-block">\n                                <label translate="MOTIONDIALER.PREDICTIVEOPTIMIZATION">PredictiveOptimization</label>\n                                <md-select name="dialPredictiveOptimization" ng-model="vm.queueCampaign.dialPredictiveOptimization">\n\n                                    <md-option ng-value="\'agentBusyFactor\'"> {{ \'MOTIONDIALER.AGENTBUSYFACTOR\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'dropRate\'"> {{ \'MOTIONDIALER.DROPRATE\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.PREDICTIVEOPTIMIZATION"></span></div>\n                                <div ng-messages="campaignForm[\'dialPredictiveOptimization\'].$error" ng-show="campaignForm[\'dialPredictiveOptimization\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.PREDICTIVEOPTIMIZATION_REQUIRED">PredictiveOptimization field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod == \'predictive\'" class="md-block">\n                                <span translate="MOTIONDIALER.PREDICTIVEOPTIMIZATIONPERCENTAGE">PredictiveOptimizationPercentage</span>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.PREDICTIVEOPTIMIZATIONPERCENTAGE"></span></div>\n                                <md-slider md-discrete flex ng-model="vm.queueCampaign.dialPredictiveOptimizationPercentage" min="1" max="95" step="0.1" class="md-accent">\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod == \'predictive\'" class="md-block">\n                                <span translate="MOTIONDIALER.PREDICTIVEINTERVAL">PredictiveInterval</span>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.PREDICTIVEINTERVAL"></span></div>\n                                <md-slider md-discrete flex ng-model="vm.queueCampaign.dialPredictiveInterval" min="5" max="30" step="1" class="md-accent">\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod != \'preview\'" class="md-block">\n                                <label translate="MOTIONDIALER.MAXCONCURRENTCALLS">MaxConcurrentCalls</label>\n                                <input type="number" name="dialLimitQueue" ng-model="vm.queueCampaign.dialLimitQueue" min="0" max="9999" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.MAXCONCURRENTCALLS"></span></div>\n                                <div ng-messages="campaignForm[\'dialLimitQueue\'].$error" ng-show="campaignForm[\'dialLimitQueue\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.MAXCONCURRENTCALLS_REQUIRED">MaxConcurrentCalls field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.MAXCONCURRENTCALLS_MUST_BE_GREATER_THAN_OR_EQUAL_TO">MaxConcurrentCalls must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.MAXCONCURRENTCALLS_MUST_BE_LESS_THAN_OR_EQUAL_TO">MaxConcurrentCalls must be a valid greater or equal than</span> <span>9999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.AGENTTIMEOUT">AgentTimeout</label>\n                                <input type="number" name="timeout" ng-model="vm.queueCampaign.timeout" min="0" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.AGENTTIMEOUT"></span></div>\n                                <div ng-messages="campaignForm[\'timeout\'].$error" ng-show="campaignForm[\'timeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.AGENTTIMEOUT_REQUIRED">AgentTimeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.AGENTTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AgentTimeout must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="queueCampaign-detail-form-container queue md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.QUEUE">QUEUE</div>\n                        </div>\n                        <form name="queueForm" novalidate>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="md-block">\n                                <label translate="MOTIONDIALER.QUEUEOPTIONS">QueueOptions</label>\n                                <input type="text" name="dialQueueOptions" ng-model="vm.queueCampaign.dialQueueOptions" autofocus>\n                                <div ng-messages="queueForm[\'dialQueueOptions\'].$error" ng-show="queueForm[\'dialQueueOptions\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.QUEUEOPTIONS_REQUIRED">QueueOptions field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="md-block">\n                                <label translate="MOTIONDIALER.QUEUETIMEOUT">QueueTimeout</label>\n                                <input type="number" name="dialQueueTimeout" ng-model="vm.queueCampaign.dialQueueTimeout" min="1" max="999" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.QUEUETIMEOUT"></span></div>\n                                <div ng-messages="queueForm[\'dialQueueTimeout\'].$error" ng-show="queueForm[\'dialQueueTimeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.QUEUETIMEOUT_REQUIRED">QueueTimeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.QUEUETIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">QueueTimeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.QUEUETIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">QueueTimeout must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'booked\' || vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="md-block">\n                                <label translate="MOTIONDIALER.STRATEGY">Strategy</label>\n                                <md-select name="strategy" ng-model="vm.queueCampaign.strategy" required>\n                                    <md-option ng-value="\'rrmemory\'">Round Robin Memory</md-option>\n                                    <md-option ng-value="\'roundrobin\'" ng-if="vm.queueCampaign.dialMethod === \'booked\'">Round Robin</md-option>\n                                    <md-option ng-value="\'leastrecent\'" ng-if="vm.queueCampaign.dialMethod !== \'booked\'">Least Recent</md-option>\n                                    <md-option ng-value="\'fewestcalls\'" ng-if="vm.queueCampaign.dialMethod !== \'booked\'">Fewest Calls</md-option>\n                                    <md-option ng-value="\'random\'" ng-if="vm.queueCampaign.dialMethod !== \'booked\'">Random</md-option>\n                                    <md-option ng-value="\'linear\'" ng-if="vm.queueCampaign.dialMethod !== \'booked\'">Linear</md-option>\n                                    <md-option ng-value="\'wrandom\'" ng-if="vm.queueCampaign.dialMethod !== \'booked\'">Weight Random</md-option>\n                                </md-select>\n                                <div ng-messages="queueForm[\'strategy\'].$error" ng-show="queueForm[\'strategy\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="md-block">\n                                <label translate="MOTIONDIALER.RETRY">Retry</label>\n                                <input type="number" name="retry" ng-model="vm.queueCampaign.retry" min="0">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.RETRY"></span></div>\n                                <div ng-messages="queueForm[\'retry\'].$error" ng-show="queueForm[\'retry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.RETRY_REQUIRED">Retry field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.RETRY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Retry must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="md-block">\n                                <label translate="MOTIONDIALER.WRAPUPTIME">WrapupTime</label>\n                                <input type="number" name="wrapuptime" ng-model="vm.queueCampaign.wrapuptime" min="0">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.WRAPUPTIME"></span></div>\n                                <div ng-messages="queueForm[\'wrapuptime\'].$error" ng-show="queueForm[\'wrapuptime\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.WRAPUPTIME_REQUIRED">WrapupTime field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.WRAPUPTIME_MUST_BE_GREATER_THAN_OR_EQUAL_TO">WrapupTime must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="md-block">\n                                <label translate="MOTIONDIALER.WEIGHT">Weight</label>\n                                <input type="number" name="weight" ng-model="vm.queueCampaign.weight" min="0">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.WEIGHT"></span></div>\n                                <div ng-messages="queueForm[\'weight\'].$error" ng-show="queueForm[\'weight\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.WEIGHT_REQUIRED">Weight field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.WEIGHT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Weight must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="md-block">\n                                <label translate="MOTIONDIALER.MUSICONHOLD">MusicOnHold</label>\n                                <md-select name="musiconhold" ng-model="vm.queueCampaign.musiconhold">\n                                    <md-option ng-value="musiconhold.name" ng-repeat="musiconhold in vm.musiconholds">{{ musiconhold.name }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.MUSICONHOLD"></span></div>\n                                <div ng-messages="queueForm[\'musiconhold\'].$error" ng-show="queueForm[\'musiconhold\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.MUSICONHOLD_REQUIRED">MusicOnHold field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="md-block">\n                                <label translate="MOTIONDIALER.CALLYSQUAREPROJECT">CallySquareProject</label>\n                                <md-select name="dialQueueProject" ng-model="vm.queueCampaign.dialQueueProject">\n                                    <md-option ng-value="dialQueueProject.name" ng-repeat="dialQueueProject in vm.projects">{{ dialQueueProject.name }}</md-option>\n                                    <md-option ng-value="null">None</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.CALLYSQUAREPROJECT"></span></div>\n                                <div ng-messages="queueForm[\'dialQueueProject\'].$error" ng-show="queueForm[\'dialQueueProject\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CALLYSQUAREPROJECT_REQUIRED">CallySquareProject field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="md-block">\n                                <label translate="MOTIONDIALER.CALLYSQUAREPROJECT2">CallySquareProject2</label>\n                                <md-select name="dialQueueProject2" ng-model="vm.queueCampaign.dialQueueProject2">\n                                    <md-option ng-value="dialQueueProject2.name" ng-repeat="dialQueueProject2 in vm.projects">{{ dialQueueProject2.name }}</md-option>\n                                    <md-option ng-value="null">None</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.CALLYSQUAREPROJECT2"></span></div>\n                                <div ng-messages="queueForm[\'dialQueueProject2\'].$error" ng-show="queueForm[\'dialQueueProject2\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CALLYSQUAREPROJECT2_REQUIRED">CallySquareProject2 field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'preview\' || vm.queueCampaign.dialMethod === \'booked\'" class="md-block">\n                                <label translate="MOTIONDIALER.CALLYSQUAREPROJECTPREVIEW">CallySquareProjectPreview</label>\n                                <md-select name="dialQueueProject" ng-model="vm.queueCampaign.dialQueueProject">\n                                    <md-option ng-value="dialQueueProject.name" ng-repeat="dialQueueProject in vm.projects">{{ dialQueueProject.name }}</md-option>\n                                    <md-option ng-value="null">None</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.CALLYSQUAREPROJECTPREVIEW"></span></div>\n                                <div ng-messages="queueForm[\'dialQueueProject\'].$error" ng-show="queueForm[\'dialQueueProject\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CALLYSQUAREPROJECTPREVIEW_REQUIRED">CallySquareProjectPreview field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialMethod === \'preview\' || vm.queueCampaign.dialMethod === \'booked\'" class="md-block">\n                                <label translate="MOTIONDIALER.CALLYSQUAREPROJECTPREVIEW2">CallySquareProjectPreview2</label>\n                                <md-select name="dialQueueProject2" ng-model="vm.queueCampaign.dialQueueProject2">\n                                    <md-option ng-value="dialQueueProject2.name" ng-repeat="dialQueueProject2 in vm.projects">{{ dialQueueProject2.name }}</md-option>\n                                    <md-option ng-value="null">None</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.CALLYSQUAREPROJECTPREVIEW2"></span></div>\n                                <div ng-messages="queueForm[\'dialQueueProject2\'].$error" ng-show="queueForm[\'dialQueueProject2\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CALLYSQUAREPROJECTPREVIEW2_REQUIRED">CallySquareProjectPreview2 field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.dialQueueProject2 && (vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\')" class="md-block">\n                                <md-switch ng-model="vm.queueCampaign.dialAgiAfterHangupAgent" aria-label="RunIfHangupAgent"><span translate="MOTIONDIALER.RUNIFHANGUPAGENT">RunIfHangupAgent</span></md-switch>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.RUNIFHANGUPAGENT"></span></div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="queueCampaign-detail-form-container originate md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.ORIGINATE">ORIGINATE</div>\n                        </div>\n                        <form name="originateForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.ORIGINATECALLERIDNAME">OriginateCallerIdName</label>\n                                <input type="text" name="dialOriginateCallerIdName" ng-model="vm.queueCampaign.dialOriginateCallerIdName" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.ORIGINATECALLERIDNAME"></span></div>\n                                <div ng-messages="originateForm[\'dialOriginateCallerIdName\'].$error" ng-show="originateForm[\'dialOriginateCallerIdName\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.ORIGINATECALLERIDNAME_REQUIRED">OriginateCallerIdName field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.ORIGINATECALLERIDNUMBER">OriginateCallerIdNumber</label>\n                                <input type="text" name="dialOriginateCallerIdNumber" ng-model="vm.queueCampaign.dialOriginateCallerIdNumber">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.ORIGINATECALLERIDNUMBER"></span></div>\n                                <div ng-messages="originateForm[\'dialOriginateCallerIdNumber\'].$error" ng-show="originateForm[\'dialOriginateCallerIdNumber\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.ORIGINATECALLERIDNUMBER_REQUIRED">OriginateCallerIdNumber field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.ORIGINATETIMEOUT">OriginateTimeout</label>\n                                <input type="number" name="dialOriginateTimeout" ng-model="vm.queueCampaign.dialOriginateTimeout" min="1" max="999" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.ORIGINATETIMEOUT"></span></div>\n                                <div ng-messages="originateForm[\'dialOriginateTimeout\'].$error" ng-show="originateForm[\'dialOriginateTimeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.ORIGINATETIMEOUT_REQUIRED">OriginateTimeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.ORIGINATETIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">OriginateTimeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.ORIGINATETIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">OriginateTimeout must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.PREFIX">Prefix</label>\n                                <input type="text" name="dialPrefix" ng-model="vm.queueCampaign.dialPrefix" ng-pattern="/^\\d+$/">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.PREFIX"></span></div>\n                                <div ng-messages="originateForm[\'dialPrefix\'].$error" ng-show="originateForm[\'dialPrefix\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.PREFIX_REQUIRED">Prefix field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="MOTIONDIALER.ERRORS.PREFIX_MUST_VALID_PATTERN" translate-values="{ regex: \'/^\\d+$/\' }">Prefix must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.RETRYANDFREQUENCY">RETRYANDFREQUENCY</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="queueCampaign-detail-form-container global md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.GLOBAL">GLOBAL</div>\n                        </div>\n                        <form name="globalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.GLOBALMAXRETRY">GlobalMaxRetry</label>\n                                <input type="number" name="dialGlobalMaxRetry" ng-model="vm.queueCampaign.dialGlobalMaxRetry" min="1" max="999" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.GLOBALMAXRETRY"></span></div>\n                                <div ng-messages="globalForm[\'dialGlobalMaxRetry\'].$error" ng-show="globalForm[\'dialGlobalMaxRetry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.GLOBALMAXRETRY_REQUIRED">GlobalMaxRetry field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.GLOBALMAXRETRY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">GlobalMaxRetry must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.GLOBALMAXRETRY_MUST_BE_LESS_THAN_OR_EQUAL_TO">GlobalMaxRetry must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="queueCampaign-detail-form-container congestion md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.CONGESTION">CONGESTION</div>\n                        </div>\n                        <form name="congestionForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.CONGESTIONMAXRETRY">CongestionMaxRetry</label>\n                                <input type="number" name="dialCongestionMaxRetry" ng-model="vm.queueCampaign.dialCongestionMaxRetry" min="1" max="999" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.CONGESTIONMAXRETRY"></span></div>\n                                <div ng-messages="congestionForm[\'dialCongestionMaxRetry\'].$error" ng-show="congestionForm[\'dialCongestionMaxRetry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONMAXRETRY_REQUIRED">CongestionMaxRetry field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONMAXRETRY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">CongestionMaxRetry must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONMAXRETRY_MUST_BE_LESS_THAN_OR_EQUAL_TO">CongestionMaxRetry must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.CONGESTIONRETRYTIME">CongestionRetryTime</label>\n                                <input type="number" name="dialCongestionRetryFrequency" ng-model="vm.queueCampaign.dialCongestionRetryFrequency" min="1" max="99999" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.CONGESTIONRETRYTIME"></span></div>\n                                <div ng-messages="congestionForm[\'dialCongestionRetryFrequency\'].$error" ng-show="congestionForm[\'dialCongestionRetryFrequency\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONRETRYTIME_REQUIRED">CongestionRetryTime field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONRETRYTIME_MUST_BE_GREATER_THAN_OR_EQUAL_TO">CongestionRetryTime must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.CONGESTIONRETRYTIME_MUST_BE_LESS_THAN_OR_EQUAL_TO">CongestionRetryTime must be a valid greater or equal than</span> <span>99999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="queueCampaign-detail-form-container busy md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.BUSY">BUSY</div>\n                        </div>\n                        <form name="busyForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.BUSYMAXRETRY">BusyMaxRetry</label>\n                                <input type="number" name="dialBusyMaxRetry" ng-model="vm.queueCampaign.dialBusyMaxRetry" min="1" max="999" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.BUSYMAXRETRY"></span></div>\n                                <div ng-messages="busyForm[\'dialBusyMaxRetry\'].$error" ng-show="busyForm[\'dialBusyMaxRetry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYMAXRETRY_REQUIRED">BusyMaxRetry field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYMAXRETRY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">BusyMaxRetry must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYMAXRETRY_MUST_BE_LESS_THAN_OR_EQUAL_TO">BusyMaxRetry must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.BUSYRETRYTIME">BusyRetryTime</label>\n                                <input type="number" name="dialBusyRetryFrequency" ng-model="vm.queueCampaign.dialBusyRetryFrequency" min="1" max="99999" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.BUSYRETRYTIME"></span></div>\n                                <div ng-messages="busyForm[\'dialBusyRetryFrequency\'].$error" ng-show="busyForm[\'dialBusyRetryFrequency\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYRETRYTIME_REQUIRED">BusyRetryTime field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYRETRYTIME_MUST_BE_GREATER_THAN_OR_EQUAL_TO">BusyRetryTime must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.BUSYRETRYTIME_MUST_BE_LESS_THAN_OR_EQUAL_TO">BusyRetryTime must be a valid greater or equal than</span> <span>99999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="queueCampaign-detail-form-container noanswer md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.NOANSWER">NOANSWER</div>\n                        </div>\n                        <form name="noanswerForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.NOANSWERMAXRETRY">NoAnswerMaxRetry</label>\n                                <input type="number" name="dialNoAnswerMaxRetry" ng-model="vm.queueCampaign.dialNoAnswerMaxRetry" min="1" max="999" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.NOANSWERMAXRETRY"></span></div>\n                                <div ng-messages="noanswerForm[\'dialNoAnswerMaxRetry\'].$error" ng-show="noanswerForm[\'dialNoAnswerMaxRetry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERMAXRETRY_REQUIRED">NoAnswerMaxRetry field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERMAXRETRY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">NoAnswerMaxRetry must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERMAXRETRY_MUST_BE_LESS_THAN_OR_EQUAL_TO">NoAnswerMaxRetry must be a valid greater or equal than</span> <span>999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.NOANSWERRETRYTIME">NoAnswerRetryTime</label>\n                                <input type="number" name="dialNoAnswerRetryFrequency" ng-model="vm.queueCampaign.dialNoAnswerRetryFrequency" min="1" max="99999" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.NOANSWERRETRYTIME"></span></div>\n                                <div ng-messages="noanswerForm[\'dialNoAnswerRetryFrequency\'].$error" ng-show="noanswerForm[\'dialNoAnswerRetryFrequency\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERRETRYTIME_REQUIRED">NoAnswerRetryTime field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERRETRYTIME_MUST_BE_GREATER_THAN_OR_EQUAL_TO">NoAnswerRetryTime must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="MOTIONDIALER.ERRORS.NOANSWERRETRYTIME_MUST_BE_LESS_THAN_OR_EQUAL_TO">NoAnswerRetryTime must be a valid greater or equal than</span> <span>99999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.ADVANCED">ADVANCED</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="queueCampaign-detail-form-container advanced md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.ADVANCED">ADVANCED</div>\n                        </div>\n                        <form name="advancedForm" novalidate>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.queueCampaign.acw" aria-label="AfterCallWork"><span translate="MOTIONDIALER.AFTERCALLWORK">AfterCallWork</span></md-switch>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.AFTERCALLWORK"></span></div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.queueCampaign.acw" class="md-block">\n                                <label translate="MOTIONDIALER.AFTERCALLWORKDURATION">AfterCallWorkDuration</label>\n                                <input type="number" name="acwTimeout" ng-model="vm.queueCampaign.acwTimeout" min="0" ng-required="true">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.AFTERCALLWORKDURATION"></span></div>\n                                <div ng-messages="advancedForm[\'acwTimeout\'].$error" ng-show="advancedForm[\'acwTimeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.AFTERCALLWORKDURATION_REQUIRED">AfterCallWorkDuration field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.AFTERCALLWORKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AfterCallWorkDuration must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.AUTOPAUSE">AutoPause</label>\n                                <md-select name="autopause" ng-model="vm.queueCampaign.autopause">\n\n                                    <md-option ng-value="\'all\'"> {{ \'MOTIONDIALER.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'MOTIONDIALER.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.AUTOPAUSE"></span></div>\n                                <div ng-messages="advancedForm[\'autopause\'].$error" ng-show="advancedForm[\'autopause\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.AUTOPAUSE_REQUIRED">AutoPause field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.RINGINUSE">RingInUse</label>\n                                <md-select name="ringinuse" ng-model="vm.queueCampaign.ringinuse">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'MOTIONDIALER.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'MOTIONDIALER.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.RINGINUSE"></span></div>\n                                <div ng-messages="advancedForm[\'ringinuse\'].$error" ng-show="advancedForm[\'ringinuse\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.RINGINUSE_REQUIRED">RingInUse field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.MEMBERDELAY">MemberDelay</label>\n                                <input type="number" name="memberdelay" ng-model="vm.queueCampaign.memberdelay" min="0">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.MEMBERDELAY"></span></div>\n                                <div ng-messages="advancedForm[\'memberdelay\'].$error" ng-show="advancedForm[\'memberdelay\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.MEMBERDELAY_REQUIRED">MemberDelay field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.MEMBERDELAY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">MemberDelay must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.TIMEOUTRESTART">TimeoutRestart</label>\n                                <md-select name="timeoutrestart" ng-model="vm.queueCampaign.timeoutrestart">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'MOTIONDIALER.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'MOTIONDIALER.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.TIMEOUTRESTART"></span></div>\n                                <div ng-messages="advancedForm[\'timeoutrestart\'].$error" ng-show="advancedForm[\'timeoutrestart\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.TIMEOUTRESTART_REQUIRED">TimeoutRestart field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.MONITORFORMAT">MonitorFormat</label>\n                                <md-select name="monitor_format" ng-model="vm.queueCampaign.monitor_format">\n                                    <md-option ng-value="\'\'">Inactive</md-option>\n                                    <md-option ng-value="\'wav\'">wav</md-option>\n                                    <md-option ng-value="\'wav49\'">wav49</md-option>\n                                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.MONITORFORMAT"></span></div>\n                                <div ng-messages="advancedForm[\'monitor_format\'].$error" ng-show="advancedForm[\'monitor_format\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.MONITORFORMAT_REQUIRED">MonitorFormat field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.CONTEXT">Context</label>\n                                <input type="text" name="context" ng-model="vm.queueCampaign.context">\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.CONTEXT"></span></div>\n                                <div ng-messages="advancedForm[\'context\'].$error" ng-show="advancedForm[\'context\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.SETINTERFACEVARIABLES">SetInterfaceVariables</label>\n                                <md-select name="setinterfacevar" ng-model="vm.queueCampaign.setinterfacevar">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'MOTIONDIALER.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'MOTIONDIALER.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.SETINTERFACEVARIABLES"></span></div>\n                                <div ng-messages="advancedForm[\'setinterfacevar\'].$error" ng-show="advancedForm[\'setinterfacevar\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.SETINTERFACEVARIABLES_REQUIRED">SetInterfaceVariables field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.SETQUEUEVARIABLES">SetQueueVariables</label>\n                                <md-select name="setqueuevar" ng-model="vm.queueCampaign.setqueuevar">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'MOTIONDIALER.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'MOTIONDIALER.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.SETQUEUEVARIABLES"></span></div>\n                                <div ng-messages="advancedForm[\'setqueuevar\'].$error" ng-show="advancedForm[\'setqueuevar\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.SETQUEUEVARIABLES_REQUIRED">SetQueueVariables field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.SETQUEUEENTRYVARIABLES">SetQueueEntryVariables</label>\n                                <md-select name="setqueueentryvar" ng-model="vm.queueCampaign.setqueueentryvar">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'MOTIONDIALER.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'MOTIONDIALER.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.SETQUEUEENTRYVARIABLES"></span></div>\n                                <div ng-messages="advancedForm[\'setqueueentryvar\'].$error" ng-show="advancedForm[\'setqueueentryvar\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.SETQUEUEENTRYVARIABLES_REQUIRED">SetQueueEntryVariables field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.DIALORDERBYSCHEDULEDAT">DialOrderByScheduledAt</label>\n                                <md-select name="dialOrderByScheduledAt" ng-model="vm.queueCampaign.dialOrderByScheduledAt">\n\n                                    <md-option ng-value="\'DESC\'"> {{ \'MOTIONDIALER.DESC\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'ASC\'"> {{ \'MOTIONDIALER.ASC\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.DIALORDERBYSCHEDULEDAT"></span></div>\n                                <div ng-messages="advancedForm[\'dialOrderByScheduledAt\'].$error" ng-show="advancedForm[\'dialOrderByScheduledAt\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.DIALORDERBYSCHEDULEDAT_REQUIRED">DialOrderByScheduledAt field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div ng-if="vm.queueCampaign.dialMethod === \'preview\' || vm.queueCampaign.dialMethod === \'booked\'" class="queueCampaign-detail-form-container advancedpreview md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.ADVANCEDPREVIEW">ADVANCEDPREVIEW</div>\n                        </div>\n                        <form name="advancedpreviewForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.MONITORFORMAT">MonitorFormat</label>\n                                <md-select name="monitor_format" ng-model="vm.queueCampaign.monitor_format" autofocus>\n                                    <md-option ng-value="\'\'">Inactive</md-option>\n                                    <md-option ng-value="\'wav\'">wav</md-option>\n                                    <md-option ng-value="\'wav49\'">wav49</md-option>\n                                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.MONITORFORMAT"></span></div>\n                                <div ng-messages="advancedpreviewForm[\'monitor_format\'].$error" ng-show="advancedpreviewForm[\'monitor_format\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.MONITORFORMAT_REQUIRED">MonitorFormat field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.DIALORDERBYSCHEDULEDAT">DialOrderByScheduledAt</label>\n                                <md-select name="dialOrderByScheduledAt" ng-model="vm.queueCampaign.dialOrderByScheduledAt">\n\n                                    <md-option ng-value="\'DESC\'"> {{ \'MOTIONDIALER.DESC\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'ASC\'"> {{ \'MOTIONDIALER.ASC\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.DIALORDERBYSCHEDULEDAT"></span></div>\n                                <div ng-messages="advancedpreviewForm[\'dialOrderByScheduledAt\'].$error" ng-show="advancedpreviewForm[\'dialOrderByScheduledAt\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.DIALORDERBYSCHEDULEDAT_REQUIRED">DialOrderByScheduledAt field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="queueCampaign-detail-form-container recallme md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.RECALLME">RECALLME</div>\n                        </div>\n                        <form name="recallmeForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.DIALRECALLMETIMEOUT">DialRecallMeTimeout</label>\n                                <input type="number" name="dialRecallMeTimeout" ng-model="vm.queueCampaign.dialRecallMeTimeout" min="1" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.DIALRECALLMETIMEOUT"></span></div>\n                                <div ng-messages="recallmeForm[\'dialRecallMeTimeout\'].$error" ng-show="recallmeForm[\'dialRecallMeTimeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.DIALRECALLMETIMEOUT_REQUIRED">DialRecallMeTimeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="MOTIONDIALER.ERRORS.DIALRECALLMETIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">DialRecallMeTimeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.queueCampaign.dialRecallInQueue" aria-label="DialRecallInQueue"><span translate="MOTIONDIALER.DIALRECALLINQUEUE">DialRecallInQueue</span></md-switch>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.DIALRECALLINQUEUE"></span></div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div ng-if="vm.queueCampaign.dialMethod != \'preview\'" class="queueCampaign-detail-form-container globalinterval md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.GLOBALINTERVAL">GLOBALINTERVAL</div>\n                        </div>\n                        <form name="globalintervalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.GLOBALINTERVAL">GlobalInterval</label>\n                                <input type="text" name="dialGlobalInterval" ng-model="vm.queueCampaign.dialGlobalInterval" ng-required="true" autofocus>\n                                <div class="hint"><span translate="MOTIONDIALER.HELP.GLOBALINTERVAL"></span></div>\n                                <div ng-messages="globalintervalForm[\'dialGlobalInterval\'].$error" ng-show="globalintervalForm[\'dialGlobalInterval\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="MOTIONDIALER.ERRORS.GLOBALINTERVAL_REQUIRED">GlobalInterval field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div ng-if="vm.queueCampaign.dialMethod != \'preview\'" class="queueCampaign-detail-form-container timezone md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="MOTIONDIALER.TIMEZONE">TIMEZONE</div>\n                        </div>\n                        <form name="timezoneForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="MOTIONDIALER.TIMEZONE">Timezone</label>\n                                <ms-timezone name="dialTimezone" ng-model="vm.queueCampaign.dialTimezone" autofocus>\n                                    < <div class="hint"><span translate="MOTIONDIALER.HELP.TIMEZONE"></span></div>\n                    <div ng-messages="timezoneForm[\'dialTimezone\'].$error" ng-show="timezoneForm[dialTimezone].$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="MOTIONDIALER.ERRORS.TIMEZONE_REQUIRED">Timezone field is required</span>\n                        </div>\n                    </div>\n                    </md-input-container>\n\n                    </form>\n    </div>\n    <div ng-if="vm.queueCampaign.dialMethod === \'progressive\' || vm.queueCampaign.dialMethod === \'predictive\' || vm.queueCampaign.dialMethod === \'power\'" class="queueCampaign-detail-form-container amd md-background-bg md-whiteframe-1dp">\n        <div class="pb-16" layout="row" layout-align="start center">\n            <div class="h2 secondary-text" translate="MOTIONDIALER.AMD">AMD</div>\n        </div>\n        <form name="amdForm" novalidate>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.queueCampaign.dialAMDActive" aria-label="AMDActive"><span translate="MOTIONDIALER.AMDACTIVE">AMDActive</span></md-switch>\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDACTIVE"></span></div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDINITIALSILENCE">AMDInitialSilence</label>\n                <input type="number" name="dialAMDInitialSilence" ng-model="vm.queueCampaign.dialAMDInitialSilence" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDINITIALSILENCE"></span></div>\n                <div ng-messages="amdForm[\'dialAMDInitialSilence\'].$error" ng-show="amdForm[\'dialAMDInitialSilence\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDINITIALSILENCE_REQUIRED">AMDInitialSilence field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDINITIALSILENCE_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDInitialSilence must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDGREETING">AMDGreeting</label>\n                <input type="number" name="dialAMDGreeting" ng-model="vm.queueCampaign.dialAMDGreeting" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDGREETING"></span></div>\n                <div ng-messages="amdForm[\'dialAMDGreeting\'].$error" ng-show="amdForm[\'dialAMDGreeting\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDGREETING_REQUIRED">AMDGreeting field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDGREETING_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDGreeting must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDAFTERGREETINGSILENCE">AMDAfterGreetingSilence</label>\n                <input type="number" name="dialAMDAfterGreetingSilence" ng-model="vm.queueCampaign.dialAMDAfterGreetingSilence" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDAFTERGREETINGSILENCE"></span></div>\n                <div ng-messages="amdForm[\'dialAMDAfterGreetingSilence\'].$error" ng-show="amdForm[\'dialAMDAfterGreetingSilence\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDAFTERGREETINGSILENCE_REQUIRED">AMDAfterGreetingSilence field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDAFTERGREETINGSILENCE_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDAfterGreetingSilence must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDTOTALANALYSISTIME">AMDTotalAnalysisTime</label>\n                <input type="number" name="dialAMDTotalAnalysisTime" ng-model="vm.queueCampaign.dialAMDTotalAnalysisTime" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDTOTALANALYSISTIME"></span></div>\n                <div ng-messages="amdForm[\'dialAMDTotalAnalysisTime\'].$error" ng-show="amdForm[\'dialAMDTotalAnalysisTime\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDTOTALANALYSISTIME_REQUIRED">AMDTotalAnalysisTime field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDTOTALANALYSISTIME_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDTotalAnalysisTime must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDMINWORDLENGTH">AMDMinWordLength</label>\n                <input type="number" name="dialAMDMinWordLength" ng-model="vm.queueCampaign.dialAMDMinWordLength" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDMINWORDLENGTH"></span></div>\n                <div ng-messages="amdForm[\'dialAMDMinWordLength\'].$error" ng-show="amdForm[\'dialAMDMinWordLength\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMINWORDLENGTH_REQUIRED">AMDMinWordLength field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMINWORDLENGTH_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDMinWordLength must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDBETWEENWORDSSILENCE">AMDBetweenWordsSilence</label>\n                <input type="number" name="dialAMDBetweenWordsSilence" ng-model="vm.queueCampaign.dialAMDBetweenWordsSilence" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDBETWEENWORDSSILENCE"></span></div>\n                <div ng-messages="amdForm[\'dialAMDBetweenWordsSilence\'].$error" ng-show="amdForm[\'dialAMDBetweenWordsSilence\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDBETWEENWORDSSILENCE_REQUIRED">AMDBetweenWordsSilence field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDBETWEENWORDSSILENCE_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDBetweenWordsSilence must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDMAXIMUMNUMBEROFWORDS">AMDMaximumNumberOfWords</label>\n                <input type="number" name="dialAMDMaximumNumberOfWords" ng-model="vm.queueCampaign.dialAMDMaximumNumberOfWords" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDMAXIMUMNUMBEROFWORDS"></span></div>\n                <div ng-messages="amdForm[\'dialAMDMaximumNumberOfWords\'].$error" ng-show="amdForm[\'dialAMDMaximumNumberOfWords\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMAXIMUMNUMBEROFWORDS_REQUIRED">AMDMaximumNumberOfWords field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMAXIMUMNUMBEROFWORDS_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDMaximumNumberOfWords must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDSILENCETHRESHOLD">AMDSilenceThreshold</label>\n                <input type="number" name="dialAMDSilenceThreshold" ng-model="vm.queueCampaign.dialAMDSilenceThreshold" min="0" max="32767">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDSILENCETHRESHOLD"></span></div>\n                <div ng-messages="amdForm[\'dialAMDSilenceThreshold\'].$error" ng-show="amdForm[\'dialAMDSilenceThreshold\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDSILENCETHRESHOLD_REQUIRED">AMDSilenceThreshold field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDSILENCETHRESHOLD_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDSilenceThreshold must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="MOTIONDIALER.ERRORS.AMDSILENCETHRESHOLD_MUST_BE_LESS_THAN_OR_EQUAL_TO">AMDSilenceThreshold must be a valid greater or equal than</span> <span>32767</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.queueCampaign.dialAMDActive" class="md-block">\n                <label translate="MOTIONDIALER.AMDMAXIMUMWORDLENGTH">AMDMaximumWordLength</label>\n                <input type="number" name="dialAMDMaximumWordLength" ng-model="vm.queueCampaign.dialAMDMaximumWordLength" min="0">\n                <div class="hint"><span translate="MOTIONDIALER.HELP.AMDMAXIMUMWORDLENGTH"></span></div>\n                <div ng-messages="amdForm[\'dialAMDMaximumWordLength\'].$error" ng-show="amdForm[\'dialAMDMaximumWordLength\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMAXIMUMWORDLENGTH_REQUIRED">AMDMaximumWordLength field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="MOTIONDIALER.ERRORS.AMDMAXIMUMWORDLENGTH_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AMDMaximumWordLength must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n        </form>\n    </div>\n    </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="MOTIONDIALER.HOPPERS">HOPPERS</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="queueCampaign-detail-form-container hopperstatistics md-background-bg md-whiteframe-1dp">\n                <div ng-controller="QueueCampaignHopperStatisticsController as vm_hs" ng-init="vm_hs.init(vm.queueCampaign)">\n                    <md-toolbar class="md-table-toolbar md-default">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="MOTIONDIALER.HOPPERWIDGET">Hoppers</span>\n                            <div flex></div>\n                            <md-button class="md-icon-button" ng-click="vm_hs.init(vm.queueCampaign)" aria-label="refresh Hopper" translate translate-attr-label="MOTIONDIALER.REFRESH_HOPPERS">\n                                <md-icon md-font-icon="icon-refresh"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    \x3c!-- WIDGET GROUP --\x3e\n                    <div class="widget-group" layout="row" flex="100" layout-wrap>\n\n                        \x3c!-- WIDGET 1 --\x3e\n                        <ms-widget class="h-140" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="25">\n\n                            \x3c!-- Front --\x3e\n                            <ms-widget-front class="p-16 white-bg" layout="row" flex>\n                                <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                    <div class="md-display-1 pb-8">{{(vm_hs.total || 0) + (vm_hs.closed || 0)}}</div>\n                                    <div class="font-weight-500 secondary-text">{{ \'MOTIONDIALER.TOTAL\' | translate }}</div>\n                                </div>\n                            </ms-widget-front>\n                            \x3c!-- / Front --\x3e\n\n                        </ms-widget>\n                        \x3c!-- / WIDGET 1 --\x3e\n\n                        \x3c!-- WIDGET 2 --\x3e\n                        <ms-widget class="h-140" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="25">\n\n                            \x3c!-- Front --\x3e\n                            <ms-widget-front class="p-16 white-bg" layout="row" flex>\n                                <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                    <div class="md-display-1 pb-8">{{vm_hs.fresh || 0}} ({{vm_hs.total ? ((((vm_hs.fresh || 0) * 100)/((vm_hs.closed || 0) + (vm_hs.total || 0))) | number: 2) : 0}}%)</div>\n                                    <div class="font-weight-500 secondary-text">{{ \'MOTIONDIALER.FRESH\' | translate }}</div>\n                                </div>\n                            </ms-widget-front>\n                            \x3c!-- / Front --\x3e\n\n                        </ms-widget>\n                        \x3c!-- / WIDGET 2 --\x3e\n\n                        \x3c!-- WIDGET 3 --\x3e\n                        <ms-widget class="h-140" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="25">\n\n                            \x3c!-- Front --\x3e\n                            <ms-widget-front class="p-16 white-bg" layout="row" flex>\n                                <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                    <div class="md-display-1 pb-8">{{vm_hs.total ? (vm_hs.total - (vm_hs.fresh || 0)) : 0}} ({{vm_hs.total ? ((((vm_hs.total - (vm_hs.fresh || 0)) * 100)/((vm_hs.closed || 0) + (vm_hs.total || 0))) | number: 2) : 0}}%)</div>\n                                    <div class="font-weight-500 secondary-text">{{ \'MOTIONDIALER.OPEN\' | translate }}</div>\n                                </div>\n                            </ms-widget-front>\n                            \x3c!-- / Front --\x3e\n\n                        </ms-widget>\n                        \x3c!-- / WIDGET 3 --\x3e\n\n                        \x3c!-- WIDGET 3 --\x3e\n                        <ms-widget class="h-140" layout="column" flex="100" flex-gt-xs="50" flex-gt-md="25">\n\n                            \x3c!-- Front --\x3e\n                            <ms-widget-front class="p-16 white-bg" layout="row" flex>\n                                <div class="pt-8 pb-8" layout="column" layout-align="center center" flex>\n                                    <div class="md-display-1 pb-8">{{vm_hs.closed ? (vm_hs.closed || 0) : 0}} ({{vm_hs.closed ? ((((vm_hs.closed) * 100)/(vm_hs.closed + (vm_hs.total || 0))) | number: 2) : 0}}%)</div>\n                                    <div class="font-weight-500 secondary-text">{{ \'MOTIONDIALER.CLOSED\' | translate }}</div>\n                                </div>\n                            </ms-widget-front>\n                            \x3c!-- / Front --\x3e\n\n                        </ms-widget>\n                        \x3c!-- / WIDGET 3 --\x3e\n\n                    </div>\n                    \x3c!-- / WIDGET GROUP --\x3e\n                </div>\n\n            </div>\n            <div class="queueCampaign-detail-form-container hoppers md-background-bg md-whiteframe-1dp">\n                <div ng-controller="QueueCampaignHoppersController as vm_dc" ng-init="vm_dc.init(vm.queueCampaign)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedQueueCampaignHoppers.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="MOTIONDIALER.HOPPERS">Hoppers</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                            <md-button class="md-icon-button" ng-click="vm_dc.getQueueCampaignHoppers()" aria-label="refresh Hoppers" translate translate-attr-label="MOTIONDIALER.REFRESH_HOPPERS">\n                                <md-icon md-font-icon="icon-refresh"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedQueueCampaignHoppers.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedQueueCampaignHoppers.length}} {{vm_dc.selectedQueueCampaignHoppers.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedQueueCampaignHoppers" csv-label="true" filename="queueCampaigns.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                            <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedQueueCampaignHoppers($event)" aria-label="delete selected" translate translate-attr-label="QUEUECAMPAIGNS.DELETE_SELECTED">\n                                <md-icon md-font-icon="icon-delete"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedQueueCampaignHoppers" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getQueueCampaignHoppers">\n                                <tr md-row>\n                                    <th md-column md-order-by="ContactId">{{ \'MOTIONDIALER.CONTACTID\' | translate }}</th>\n                                    <th md-column md-order-by="phone">{{ \'MOTIONDIALER.PHONE\' | translate }}</th>\n                                    <th md-column md-order-by="countcongestionretry">{{ \'MOTIONDIALER.CONGESTION\' | translate }}</th>\n                                    <th md-column md-order-by="countbusyretry">{{ \'MOTIONDIALER.BUSY\' | translate }}</th>\n                                    <th md-column md-order-by="countnoanswerretry">{{ \'MOTIONDIALER.NOANSWER\' | translate }}</th>\n                                    <th md-column md-order-by="scheduledat">{{ \'MOTIONDIALER.SCHEDULEDAT\' | translate }}</th>\n                                    <th md-column md-order-by="priority">{{ \'MOTIONDIALER.PRIORITY\' | translate }}</th>\n                                    <th md-column md-order-by="recallme">{{ \'MOTIONDIALER.RECALLAGENT\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="hopper" md-select-id="id" ng-repeat="hopper in vm_dc.queueCampaignHoppers.rows">\n                                    <td ng-click="vm_dc.createOrEditQueueCampaignHopper($event, hopper)" md-cell>{{hopper.ContactId}}</td>\n                                    <td ng-click="vm_dc.createOrEditQueueCampaignHopper($event, hopper)" md-cell>{{hopper.phone}}</td>\n                                    <td ng-click="vm_dc.createOrEditQueueCampaignHopper($event, hopper)" md-cell>{{hopper.countcongestionretry}}</td>\n                                    <td ng-click="vm_dc.createOrEditQueueCampaignHopper($event, hopper)" md-cell>{{hopper.countbusyretry}}</td>\n                                    <td ng-click="vm_dc.createOrEditQueueCampaignHopper($event, hopper)" md-cell>{{hopper.countnoanswerretry}}</td>\n                                    <td ng-click="vm_dc.createOrEditQueueCampaignHopper($event, hopper)" md-cell>{{hopper.scheduledat | date:\'medium\'}}</td>\n                                    <td ng-click="vm_dc.createOrEditQueueCampaignHopper($event, hopper)" md-cell>{{ vm_dc.arraypriority[hopper.priority].option }}</td>\n                                    <td ng-click="vm_dc.createOrEditQueueCampaignHopper($event, hopper)" md-cell class="recallme ">\n                                        <md-icon md-colors="{color: {{hopper.recallme ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{hopper.recallme? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                    </td>\n                                    <td md-cell class="actions">\n                                        <md-menu>\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MOTIONDIALER.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_dc.createOrEditQueueCampaignHopper($event, hopper)" translate="MOTIONDIALER.EDIT_HOPPER">\n                                                        Edit Hopper\n                                                    </md-button>\n                                                </md-menu-item>\n                                                <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                    <md-button ng-click="vm_dc.deleteConfirm(hopper, $event)" translate="MOTIONDIALER.DELETE_HOPPER">\n                                                        Delete Hopper\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.queueCampaignHoppers.rows.length">\n                                    <td md-cell colspan="12">\n                                        <span class="text-boxed-ligth" translate="MOTIONDIALER.NO_HOPPER_AVAILABLE">No hopper available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                        md-page="vm_dc.query.page" md-total="{{vm_dc.queueCampaignHoppers.count}}" md-on-paginate="vm_dc.getQueueCampaignHoppers" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="MOTIONDIALER.HISTORY">HISTORY</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="queueCampaign-detail-form-container hopperhistories md-background-bg md-whiteframe-1dp">\n                <div ng-controller="QueueCampaignHopperHistoriesController as vm_dc" ng-init="vm_dc.init(vm.queueCampaign)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedQueueCampaignHopperHistories.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="MOTIONDIALER.HOPPERHISTORIES">HopperHistories</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                            <md-button class="md-icon-button" ng-click="vm_dc.getQueueCampaignHopperHistories()" aria-label="refresh HopperHistories" translate translate-attr-label="MOTIONDIALER.REFRESH_HOPPERHISTORIES">\n                                <md-icon md-font-icon="icon-refresh"></md-icon>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedQueueCampaignHopperHistories.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedQueueCampaignHopperHistories.length}} {{vm_dc.selectedQueueCampaignHopperHistories.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedQueueCampaignHopperHistories" csv-label="true" filename="queueCampaigns.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedQueueCampaignHopperHistories" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getQueueCampaignHopperHistories">\n                                <tr md-row>\n                                    <th md-column md-order-by="uniqueid">{{ \'MOTIONDIALER.UNIQUEID\' | translate }}</th>\n                                    <th md-column md-order-by="ContactId">{{ \'MOTIONDIALER.CONTACTID\' | translate }}</th>\n                                    <th md-column md-order-by="calleridnum">{{ \'MOTIONDIALER.PHONE\' | translate }}</th>\n                                    <th md-column md-order-by="calleridname">{{ \'MOTIONDIALER.NAME\' | translate }}</th>\n                                    <th md-column md-order-by="statedesc">{{ \'MOTIONDIALER.STATUS\' | translate }}</th>\n                                    <th md-column md-order-by="scheduledat">{{ \'MOTIONDIALER.SCHEDULEDAT\' | translate }}</th>\n                                    <th md-column md-order-by="starttime">{{ \'MOTIONDIALER.STARTTIME\' | translate }}</th>\n                                    <th md-column md-order-by="endtime">{{ \'MOTIONDIALER.ENDTIME\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="hopperHistory" md-select-id="id" ng-repeat="hopperHistory in vm_dc.queueCampaignHopperHistories.rows">\n                                    <td md-cell>{{hopperHistory.uniqueid}}</td>\n                                    <td md-cell>{{hopperHistory.ContactId}}</td>\n                                    <td md-cell>{{hopperHistory.calleridnum}}</td>\n                                    <td md-cell>{{hopperHistory.calleridname}}</td>\n                                    <td md-cell>{{hopperHistory.statedesc}}</td>\n                                    <td md-cell>{{hopperHistory.scheduledat | date:\'medium\'}}</td>\n                                    <td md-cell>{{hopperHistory.starttime | date:\'medium\'}}</td>\n                                    <td md-cell>{{hopperHistory.endtime | date:\'medium\'}}</td>\n                                    <td md-cell class="actions">\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.queueCampaignHopperHistories.rows.length">\n                                    <td md-cell colspan="11">\n                                        <span class="text-boxed-ligth" translate="MOTIONDIALER.NO_HOPPERHISTORY_AVAILABLE">No hopperhistory available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                        md-page="vm_dc.query.page" md-total="{{vm_dc.queueCampaignHopperHistories.count}}" md-on-paginate="vm_dc.getQueueCampaignHopperHistories" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="MOTIONDIALER.FINAL">FINAL</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="queueCampaign-detail-form-container hopperfinals md-background-bg md-whiteframe-1dp">\n                <div ng-controller="QueueCampaignHopperFinalsController as vm_dc" ng-init="vm_dc.init(vm.queueCampaign)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedQueueCampaignHopperFinals.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="MOTIONDIALER.HOPPERFINALS">HopperFinals</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                            <md-button class="md-icon-button" ng-click="vm_dc.getQueueCampaignHopperFinals()" aria-label="refresh HopperFinals" translate translate-attr-label="MOTIONDIALER.REFRESH_HOPPERFINALS">\n                                <md-icon md-font-icon="icon-refresh"></md-icon>\n                            </md-button>\n                            <td md-cell class="actions">\n                                <md-menu>\n                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MOTIONDIALER.MORE" ng-click="vm_dc.countContactsQueueCampaignHopperFinal(vm_dc.query.id); $mdOpenMenu($event);">\n                                        <md-icon md-font-icon="icon-backup-restore"></md-icon>\n                                        <md-tooltip><span translate="MOTIONDIALER.RESTORECONTACTS"></span></md-tooltip>\n                                    </md-button>\n                                    <md-menu-content width="3">\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsQueueCampaignHopperFinal(3)">\n                                                <span translate="MOTIONDIALER.NOANSWER ">NoAnswer</span>\n                                                <span class="badge">({{vm_dc.contacts.noAnswerContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsQueueCampaignHopperFinal(5)">\n                                                <span translate="MOTIONDIALER.BUSY ">Busy</span>\n                                                <span class="badge">({{vm_dc.contacts.busyContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsQueueCampaignHopperFinal(8)">\n                                                <span translate="MOTIONDIALER.CONGESTION ">Congestion</span>\n                                                <span class="badge">({{vm_dc.contacts.congestionContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsQueueCampaignHopperFinal(10)">\n                                                <span translate="MOTIONDIALER.DROPPED ">Drop</span>\n                                                <span class="badge">({{vm_dc.contacts.dropContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsQueueCampaignHopperFinal(11)">\n                                                <span translate="MOTIONDIALER.ABANDONED ">Abandoned</span>\n                                                <span class="badge">({{vm_dc.contacts.abandonedContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsQueueCampaignHopperFinal(22)">\n                                                <span translate="MOTIONDIALER.RECALLFAILEDTIMEOUT">Recall</span>\n                                                <span class="badge">({{vm_dc.contacts.reCallContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm_dc.moveContactsQueueCampaignHopperFinal(0)">\n                                                <span translate="MOTIONDIALER.NO_SUCH_NUMBER">NoSuchNumber</span>\n                                                <span class="badge">({{vm_dc.contacts.noSuchContacts}})</span>\n                                            </md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </td>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedQueueCampaignHopperFinals.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedQueueCampaignHopperFinals.length}} {{vm_dc.selectedQueueCampaignHopperFinals.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedQueueCampaignHopperFinals" csv-label="true" filename="queueCampaigns.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                            <md-button class="md-icon-button" ng-click="vm_dc.moveSelectedQueueCampaignHopperFinals($event)" aria-label="move selected" translate translate-attr-label="QUEUECAMPAIGNS.MOVE_SELECTED">\n                                <md-icon md-font-icon="icon-restore"></md-icon>\n                                <md-tooltip><span translate="MOTIONDIALER.RESTORECONTACTS"></span></md-tooltip>\n                            </md-button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedQueueCampaignHopperFinals" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getQueueCampaignHopperFinals">\n                                <tr md-row>\n                                    <th md-column md-order-by="uniqueid">{{ \'MOTIONDIALER.UNIQUEID\' | translate }}</th>\n                                    <th md-column md-order-by="ContactId">{{ \'MOTIONDIALER.CONTACTID\' | translate }}</th>\n                                    <th md-column md-order-by="calleridnum">{{ \'MOTIONDIALER.PHONE\' | translate }}</th>\n                                    <th md-column md-order-by="calleridname">{{ \'MOTIONDIALER.NAME\' | translate }}</th>\n                                    <th md-column md-order-by="statedesc">{{ \'MOTIONDIALER.STATUS\' | translate }}</th>\n                                    <th md-column md-order-by="countcongestionretry">{{ \'MOTIONDIALER.CONGESTION\' | translate }}</th>\n                                    <th md-column md-order-by="countbusyretry">{{ \'MOTIONDIALER.BUSY\' | translate }}</th>\n                                    <th md-column md-order-by="countnoanswerretry">{{ \'MOTIONDIALER.NOANSWER\' | translate }}</th>\n                                    <th md-column md-order-by="starttime">{{ \'MOTIONDIALER.STARTTIME\' | translate }}</th>\n                                    <th md-column md-order-by="endtime">{{ \'MOTIONDIALER.ENDTIME\' | translate }}</th>\n                                    <th md-column md-order-by="disposition">{{ \'MOTIONDIALER.DISPOSITION\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="hopperFinal" md-select-id="id" ng-repeat="hopperFinal in vm_dc.queueCampaignHopperFinals.rows">\n                                    <td md-cell>{{hopperFinal.uniqueid}}</td>\n                                    <td md-cell>{{hopperFinal.ContactId}}</td>\n                                    <td md-cell>{{hopperFinal.calleridnum}}</td>\n                                    <td md-cell>{{hopperFinal.calleridname}}</td>\n                                    <td md-cell>{{hopperFinal.statedesc}}</td>\n                                    <td md-cell>{{hopperFinal.countcongestionretry}}</td>\n                                    <td md-cell>{{hopperFinal.countbusyretry}}</td>\n                                    <td md-cell>{{hopperFinal.countnoanswerretry}}</td>\n                                    <td md-cell>{{hopperFinal.starttime | date:\'medium\'}}</td>\n                                    <td md-cell>{{hopperFinal.endtime | date:\'medium\'}}</td>\n                                    <td md-cell>{{hopperFinal.disposition}}</td>\n                                    <td md-cell class="actions">\n                                        <md-menu>\n                                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MOTIONDIALER.MORE" ng-click="$mdOpenMenu($event)">\n                                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                            </md-button>\n\n                                            <md-menu-content width="3">\n                                                <md-menu-item>\n                                                    <md-button ng-click="vm_dc.moveConfirm(hopperFinal, $event)" translate="MOTIONDIALER.MOVE_HOPPERFINAL">\n                                                        Move HopperFinal\n                                                    </md-button>\n                                                </md-menu-item>\n                                            </md-menu-content>\n                                        </md-menu>\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.queueCampaignHopperFinals.rows.length">\n                                    <td md-cell colspan="23">\n                                        <span class="text-boxed-ligth" translate="MOTIONDIALER.NO_HOPPERFINAL_AVAILABLE">No hopperfinal available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                        md-page="vm_dc.query.page" md-total="{{vm_dc.queueCampaignHopperFinals.count}}" md-on-paginate="vm_dc.getQueueCampaignHopperFinals" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    <md-tab>\n        <md-tab-label>\n            <span translate="MOTIONDIALER.BLACKLIST">BLACKLIST</span>\n        </md-tab-label>\n\n        <md-tab-body>\n            <div class="queueCampaign-detail-form-container hopperblacks md-background-bg md-whiteframe-1dp">\n                <div ng-controller="QueueCampaignHopperBlacksController as vm_dc" ng-init="vm_dc.init(vm.queueCampaign)">\n                    <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedQueueCampaignHopperBlacks.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead" translate="MOTIONDIALER.HOPPERBLACKS">HopperBlacks</span>\n                            <div flex></div>\n                            <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                        </div>\n                    </md-toolbar>\n                    <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedQueueCampaignHopperBlacks.length">\n                        <div class="md-toolbar-tools">\n                            <span class="md-subhead">{{vm_dc.selectedQueueCampaignHopperBlacks.length}} {{vm_dc.selectedQueueCampaignHopperBlacks.length > 1 ? \'items\' : \'item\'}} selected</span>\n                            <div flex></div>\n                            <button class="md-icon-button" ng-csv="vm_dc.exportSelectedQueueCampaignHopperBlacks" csv-label="true" filename="queueCampaigns.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                        </div>\n                    </md-toolbar>\n                    <md-table-container>\n                        <table md-table md-row-select multiple ng-model="vm_dc.selectedQueueCampaignHopperBlacks" md-progress="vm_dc.promise">\n                            <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getQueueCampaignHopperBlacks">\n                                <tr md-row>\n                                    <th md-column md-order-by="ContactId">{{ \'MOTIONDIALER.CONTACTID\' | translate }}</th>\n                                    <th md-column md-order-by="phone">{{ \'MOTIONDIALER.PHONE\' | translate }}</th>\n                                    <th md-column width="10px"></th>\n                                </tr>\n                            </thead>\n                            <tbody md-body>\n                                <tr md-row md-select="hopperBlack" md-select-id="id" ng-repeat="hopperBlack in vm_dc.queueCampaignHopperBlacks.rows">\n                                    <td md-cell>{{hopperBlack.ContactId}}</td>\n                                    <td md-cell>{{hopperBlack.phone}}</td>\n                                    <td md-cell class="actions">\n                                    </td>\n                                </tr>\n                                <tr md-row ng-if="!vm_dc.queueCampaignHopperBlacks.rows.length">\n                                    <td md-cell colspan="4">\n                                        <span class="text-boxed-ligth" translate="MOTIONDIALER.NO_HOPPERBLACK_AVAILABLE">No hopperblack available</span>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </md-table-container>\n                    <md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                        md-page="vm_dc.query.page" md-total="{{vm_dc.queueCampaignHopperBlacks.count}}" md-on-paginate="vm_dc.getQueueCampaignHopperBlacks" md-page-select></md-table-pagination>\n                </div>\n\n            </div>\n        </md-tab-body>\n    </md-tab>\n    </md-tabs>\n\n</div>\n\x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/motiondialer/views/queueCampaigns/queueCampaigns.html",'<div id="queueCampaigns" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-fire" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="MOTIONDIALER.QUEUECAMPAIGNS">QueueCampaigns</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="MOTIONDIALER.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedQueueCampaigns.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedQueueCampaigns =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="MOTIONDIALER.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-queueCampaigns-count">\n                    <span>{{vm.selectedQueueCampaigns.length}}</span>\n                <span translate="MOTIONDIALER.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="QUEUECAMPAIGNS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllQueueCampaigns()" translate="MOTIONDIALER.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectQueueCampaigns()" translate="MOTIONDIALER.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedQueueCampaigns" csv-label="true" filename="queueCampaigns.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedQueueCampaigns($event)" aria-label="delete selected" translate translate-attr-label="QUEUECAMPAIGNS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- QUEUECAMPAIGN TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedQueueCampaigns" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getQueueCampaigns">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'MOTIONDIALER.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'MOTIONDIALER.NAME\' | translate }}</th>\n                                <th md-column md-order-by="dialActive">{{ \'MOTIONDIALER.ACTIVE\' | translate }}</th>\n                                <th md-column md-order-by="TrunkId">{{ \'MOTIONDIALER.TRUNK\' | translate }}</th>\n                                <th md-column md-order-by="dialMethod">{{ \'MOTIONDIALER.METHOD\' | translate }}</th>\n                                <th md-column md-order-by="strategy">{{ \'MOTIONDIALER.STRATEGY\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.queueCampaigns.rows.length">\n                                <td md-cell colspan="7">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="MOTIONDIALER.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="queueCampaign" md-select-id="id" ng-repeat="queueCampaign in vm.queueCampaigns.rows">\n                                <td md-cell ng-if="queueCampaign.userpic"><img class="avatar" alt="{{queueCampaign.name}}" ng-src="api/users/{{queueCampaign.id}}/avatar" /></td>\n                                <td md-cell ng-if="!queueCampaign.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{queueCampaign.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditQueueCampaign($event, queueCampaign)" md-cell class="id ">{{queueCampaign.id}}</td>\n                                <td ng-click="vm.createOrEditQueueCampaign($event, queueCampaign)" md-cell class="name ">{{queueCampaign.name}}</td>\n                                <td ng-click="vm.createOrEditQueueCampaign($event, queueCampaign)" md-cell class="dialActive ">\n                                    <md-icon md-colors="{color: {{queueCampaign.dialActive ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{queueCampaign.dialActive ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                </td>\n                                <td ng-click="vm.createOrEditQueueCampaign($event, queueCampaign)" md-cell class="TrunkId ">{{ TrunkId = vm.trunks[queueCampaign.TrunkId]; TrunkId.name }}</td>\n                                <td ng-click="vm.createOrEditQueueCampaign($event, queueCampaign)" md-cell class="dialMethod ">{{ vm.arraydialMethod[queueCampaign.dialMethod].option }}</td>\n                                <td ng-click="vm.createOrEditQueueCampaign($event, queueCampaign)" md-cell class="strategy ">{{ vm.arraystrategy[queueCampaign.strategy].option }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MOTIONDIALER.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(queueCampaign, $event)" translate="MOTIONDIALER.EDIT_QUEUECAMPAIGN">\n                                                    Edit QueueCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.listadddialog(queueCampaign, $event)" translate="MOTIONDIALER.LISTADD_QUEUECAMPAIGN">\n                                                    listadd QueueCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.blacklistadddialog(queueCampaign, $event)" translate="MOTIONDIALER.BLACKLISTADD_QUEUECAMPAIGN">\n                                                    blacklistadd QueueCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.teamadddialog(queueCampaign, $event)" translate="MOTIONDIALER.TEAMADD_QUEUECAMPAIGN">\n                                                    teamadd QueueCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.agentadddialog(queueCampaign, $event)" translate="MOTIONDIALER.AGENTADD_QUEUECAMPAIGN">\n                                                    agentadd QueueCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(queueCampaign, $event)" translate="MOTIONDIALER.DELETE_QUEUECAMPAIGN">\n                                                    Delete QueueCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(queueCampaign, $event)" translate="MOTIONDIALER.GOTOREALTIME_QUEUECAMPAIGN">\n                                                    goToRealtime QueueCampaign\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                    md-page="vm.query.page" md-total="{{vm.queueCampaigns.count}}" md-on-paginate="vm.getQueueCampaigns" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / QUEUECAMPAIGN TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD QUEUECAMPAIGN BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-queueCampaign-button" ng-click="vm.createOrEditQueueCampaign($event)" aria-label="add queueCampaign" translate translate-attr-aria-label="MOTIONDIALER.ADD_QUEUECAMPAIGN">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD QUEUECAMPAIGN BUTTON --\x3e\n</div>'),e.put("app/main/apps/motiondialer/views/realtime/abandonedcalls/view.html",'<md-toolbar class="md-table-toolbar md-default table-header">\n    <div class="md-toolbar-tools" layout="row" layout-align="center center">\n        <span class="md-subhead" translate="DASHBOARDS.ABANDONEDQUEUECALLS">ABANDONED QUEUE CALLS</span>\n        <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n        <div flex></div>\n        <div class="padding-horizontal-20" layout="column" layout-align="center center">\n            <span class="font-size-10" translate="DASHBOARDS.SELECT_DATE">Select a date</span>\n            <div layout="row" layout-align="center center">\n                <md-button ng-if="vm.pickerModel.dateStart" ng-click="vm.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                    <md-tooltip>{{ \'DASHBOARDS.DELETE\' | translate }}</md-tooltip>\n                    <md-icon md-font-icon="icon-close" class="s16 black-fg"></md-icon>\n                </md-button>\n                <md-date-range localization-map="vm.localizationMap" ng-model="vm.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm.getContacts()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n            </div>\n        </div>\n        <div class="padding-horizontal-20" layout="column">\n            <span class="font-size-10" translate="DASHBOARDS.SELECT_AGENT">Select an agent</span>\n            <md-select class="font-size-12 no-margin" ng-model="vm.query.lastAssignedTo" ng-change="vm.getContacts()">\n                <md-option ng-value="\'null\'" translate="DASHBOARDS.NOT_ASSIGNED"></md-option>\n                <md-option ng-value="undefined" translate="DASHBOARDS.ALL"></md-option>\n                <md-option ng-value="agent.name" ng-repeat="agent in vm.agents.rows">{{agent.name}}</md-option>\n            </md-select>\n        </div>\n        <div ng-if="vm.queues.count" layout="column">\n            <span class="font-size-10" translate="DASHBOARDS.SELECT_CAMPAIGN">Select a Campaign</span>\n            <md-select class="font-size-12 no-margin" ng-model="vm.query.queue" ng-change="vm.getContacts()">\n                <md-option ng-value="undefined" ng-if="vm.queues.count > 1"><em translate="DASHBOARDS.ALL">All</em></md-option>\n                <md-option ng-value="queue.name" ng-repeat="queue in vm.queues.rows">{{queue.name}}</md-option>\n            </md-select>\n        </div>\n        <md-button class="md-icon-button" ng-click="vm.refresh && vm.refreshContacts($event)" aria-label="refresh Contacts" translate translate-attr-label="DASHBOARDS.REFRESH_CONTACTS">\n            <md-icon md-font-icon="icon-reload"></md-icon>\n            <md-tooltip ng-if="vm.showTooltip" md-visible="vm.showTooltip">{{\'DASHBOARDS.CLICKRELOAD\' | translate}}</md-tooltip>\n        </md-button>\n    </div>\n</md-toolbar>\n<md-table-container>\n    <table md-table md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getContacts">\n            <tr md-row>\n                <th md-column md-order-by="id">ID</th>\n                <th md-column md-order-by="calleridname">{{\'DASHBOARDS.FULLNAME\' | translate}}</th>\n                <th md-column md-order-by="calleridnum">{{\'DASHBOARDS.PHONE\' | translate}}</th>\n                <th md-column md-order-by="queue">{{\'DASHBOARDS.QUEUE\' | translate}}</th>\n                <th md-column md-order-by="queuecallerabandonAt">{{\'DASHBOARDS.ABANDONAT\' | translate}}</th>\n                <th md-column md-order-by="queuecallerexitAt">{{\'DASHBOARDS.QUEUECALLEREXITAT\' | translate}}</th>\n                <th md-column md-order-by="queuecallerexitreason">{{\'DASHBOARDS.QUEUECALLEREXITREASON\' | translate}}</th>\n                <th md-column md-order-by="lastAssignedTo">{{\'DASHBOARDS.LASTASSIGNEDTO\' | translate}}</th>\n                <th md-column md-order-by="disposition">{{\'DASHBOARDS.DISPOSITION\' | translate}}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.contacts.rows.length">\n                <td md-cell colspan="10">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row ng-repeat="contact in vm.contacts.rows">\n                <td md-cell class="id">{{contact.id}}</td>\n                <td md-cell class="firstName">{{contact.calleridname}}</td>\n                <td md-cell class="list">{{contact.calleridnum}}</td>\n                <td md-cell class="list">{{vm.queuesMap[contact.queue]}}</td>\n                <td md-cell class="list">{{contact.queuecallerabandonAt ? (contact.queuecallerabandonAt | formatdate) : undefined }}</td>\n                <td md-cell class="list">{{contact.queuecallerexitAt ? (contact.queuecallerexitAt | formatdate) : undefined }}</td>\n                <td md-cell class="list">{{contact.queuecallerexitreason}}</td>\n                <td md-cell class="list">{{contact.lastAssignedTo}}</td>\n                <td md-cell class="list">{{contact.disposition}}</td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="2">\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="DASHBOARDS.ASSIGNTO">Assigned a</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item ng-if="contact.lastAssignedTo">\n                                            <md-button ng-click="vm.assignedA(contact)"><em translate="DASHBOARDS.NONE">Not Assigned</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.agents.rows.length" ng-repeat="agent in vm.agents.rows">\n                                            <md-button ng-click="vm.assignedA(contact,agent)">{{agent.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="DASHBOARDS.DISPOSE">Dispose</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, null)"><em translate="DASHBOARDS.NONE">NONE</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'fax\')"><em translate="DASHBOARDS.FAX">FAX</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'Answer Machine\')"><em translate="DASHBOARDS.ANSWER_MACHINE">ANSWER_MACHINE</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'Interested\')"><em translate="DASHBOARDS.INTERESTED">INTERESTED</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'Not Interested\')"><em translate="DASHBOARDS.NOT_INTERESTED">NOT_INTERESTED</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'Sold\')"><em translate="DASHBOARDS.SOLD">SOLD</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'Special\')"><em translate="DASHBOARDS.SPECIAL">SPECIAL</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.disposition.length" ng-repeat="disposition in vm.disposition">\n                                            <md-button ng-click="vm.disposed(contact, disposition.name)">{{disposition.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.contacts.count}}" md-on-paginate="vm.getContacts" md-page-select></md-table-pagination>'),e.put("app/main/apps/motiondialer/views/realtime/agents/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="MOTIONDIALER.AGENTS">Agents</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query; vm.onInit()" on-collapse="vm.query.filter = undefined; vm.onInit()" debounce="300"></ms-search-bar>\n        \x3c!-- <md-button class="md-icon-button" ng-click="vm.showInfo($event)">\n      <i class="icon-information-outline grey-600-fg">\n        <md-tooltip>{{\'VOICE.INFO\' | translate}}</md-tooltip>\n      </i>\n    </md-button> --\x3e\n        <md-select ng-model="vm.query.globalStatusFilter" class="md-caption" ng-change="vm.query.pauseTypeFilter = \'\'; vm.onInit()">\n            <md-option ng-value="\'\'">{{ \'MOTIONDIALER.ALL\' | translate }}</md-option>\n            <md-option value="pause">{{ \'MOTIONDIALER.PAUSE\' | translate }}</md-option>\n            <md-option value="*pause">{{ \'MOTIONDIALER.PARTIALPAUSE\' | translate }}</md-option>\n            <md-option value="busy">{{ \'MOTIONDIALER.BUSY\' | translate }}</md-option>\n            <md-option value="idle">{{ \'MOTIONDIALER.IDLE\' | translate }}</md-option>\n        </md-select>\n\n        <md-select ng-if="vm.isPause(vm.query.globalStatusFilter)" ng-model="vm.query.pauseTypeFilter" class="md-caption" ng-change="vm.onInit()">\n            <md-option ng-value="\'\'">All</md-option>\n            <md-option value="DEFAULT PAUSE">DEFAULT PAUSE</md-option>\n            <md-option value="ACW">ACW</md-option>\n            <md-option value="LOGININPAUSE">LOGININPAUSE</md-option>\n            <md-option value="Auto-Pause">AUTOPAUSE</md-option>\n            <md-option ng-value="pause.name" ng-repeat="pause in vm.pauses.rows">{{pause.name}}</md-option>\n        </md-select>\n    </div>\n</md-toolbar>\n\n\x3c!-- AGENT TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.order" md-on-reorder="vm.onInit">\n            <tr md-row border="1">\n                <th class="bv text-center" colspan="3">{{ \'MOTIONDIALER.AGENT\' | translate }}</th>\n                <th class="bv bl text-center" colspan="2">{{ \'VOICE.VOICE\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="bv bl text-center" colspan="2">{{ \'CHAT.CHAT\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="bv bl text-center" colspan="2">{{ \'MAIL.MAIL\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="bv bl text-center" colspan="2">{{ \'SMS.SMS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="bv bl text-center" colspan="2">{{ \'OPENCHANNEL.OPENCHANNEL\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="bv bl text-center" colspan="2">{{ \'FAX.FAX\' | translate }}</th>\n                <th width="10px" class="bt bl" rowspan="2"></th>\n                \x3c!-- <th md-column>{{ \'VOICE.PHONE_STATE\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PHONE_STATUS\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PAUSE\' | translate }}</th>\n                <th md-column width="10px"></th> --\x3e\n            </tr>\n            <tr md-row>\n                <th class="bl" md-column md-order-by="fullname">{{ \'MOTIONDIALER.NAME\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatus">{{ \'MOTIONDIALER.STATUS\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatusTime">{{ \'MOTIONDIALER.TIMER\' | translate }}</th>\n\n                <th class="bl custom-column">{{ \'VOICE.STATUS\' | translate }}</th>\n                <th class="bl custom-column">Info</th>\n\n                <th ng-if="vm.license.chat" class="bl text-center">{{ \'CHAT.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'CHAT.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.mail" class="bl text-center">{{ \'MAIL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'MAIL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.messaging" class="bl text-center">{{ \'SMS.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'SMS.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.openchannel" class="bl text-center">{{ \'OPENCHANNEL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'OPENCHANNEL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.fax" class="bl text-center">{{ \'FAX.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'FAX.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.order.length">\n                <td md-cell colspan="17">\n                    <div layout="row" layout-align="center center">\n                        <span>{{ \'MOTIONDIALER.NO_AGENT_ONLINE\' | translate }}</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-select="vm.agents[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td class="bt padding-5">\n                    <div layout="row" layout-align="start center">\n                        <img class="avatar" ng-src="{{vm.agents[value].userpic && \'api/users/\'+vm.agents[value].id+\'/avatar\' || \'assets/images/avatars/profile.png\'}}">\n                        <div layout="column">\n                            <span>{{vm.agents[value].fullname}}</span>\n                            <span>{{vm.agents[value].internal}}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt">\n                    <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'busy\':\'indigo-100-bg\',\'*pause\':\'amber-50-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].globalStatus]">{{ vm.isPause(vm.agents[value].globalStatus) ? \'\' : vm.agents[value].globalStatus | uppercase }} {{ vm.isPause(vm.agents[value].globalStatus) ? (vm.isPartialPause(vm.agents[value].globalStatus) ? \'*\'+vm.agents[value].pauseType || \'DEFAULT PAUSE\'  : vm.agents[value].pauseType || \'DEFAULT PAUSE\') : \'\'}}</span>\n                </td>\n                <td class="bt custom-column">\n                    <timer start-time="vm.agents[value].globalStatusTime" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                </td>\n                <td class="bt bl">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'talking\':\'indigo-100-bg\',\'ringing\':\'orange-400-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].voiceStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt bl">\n                    <div layout="column">\n                        <span ng-if="vm.agents[value].queue" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].queue }}</span>\n                        <span ng-if="vm.agents[value].destconnectedlinenum" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].destconnectedlinenum }}</span>\n                        <span class="padding-5" ng-if="vm.agents[value].queue || vm.agents[value].destconnectedlinenum">\n                            <timer start-time="vm.agents[value].voiceStatusTime" interval="1000" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                        </span>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt">--</td>\n                <td class="bt">--</td> --\x3e\n                <td class="bt bl" ng-if="vm.license.chat">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt padding-5 text-center">{{ agent.chatCurrentCapacity }}/{{ agent.chatCapacity > 0 ? agent.chatCapacity : \'∞\' }}</td> --\x3e\n                <td md-number class="bt text-center font-size-20" ng-if="vm.license.chat" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.mail">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.mail" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.messaging">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.messaging" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.openchannel">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">4</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">89</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.openchannel" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.fax">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">7</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">2</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.fax" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxCurrentCapacity }}</td>\n                <td class="bl bt padding-5 text-center">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="4">\n                            <md-menu-item>\n                                <md-button ng-click="vm.logout(vm.agents[value], $event)" translate="MOTIONDIALER.LOGOUT">\n                                    Logout\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.queueAdd(vm.agents[value], $event)" translate="MOTIONDIALER.AGENTADD_QUEUE">\n                                    Add Agent In Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="MOTIONDIALER.PAUSE">Pause</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item>\n                                            <md-button ng-disabled=" vm.agents[value].voicePause && \'DEFAULT PAUSE\' === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value])"><em translate="MOTIONDIALER.DEFAULT_PAUSE">Default Pause</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.pauses.rows.length" ng-repeat="pause in vm.pauses.rows">\n                                            <md-button ng-disabled="vm.agents[value].voicePause && pause.name === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value], pause.name)">{{pause.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                            <md-menu-item ng-if="vm.isPause(vm.agents[value].globalStatus)">\n                                <md-button ng-click="vm.unPause(vm.agents[value])" translate="MOTIONDIALER.UNPAUSE">\n                                    Unpause\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n    md-page="vm.query.page" md-total="{{vm.filteredAgents.length}}" md-on-paginate="vm.onInit" md-page-select></md-table-pagination>\n\x3c!-- / AGENT TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/motiondialer/views/realtime/ivr_campaigns/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="MOTIONDIALER.IVR_CAMPAIGNS">Ivr Campaigns</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUE TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getCampaigns">\n            <tr md-row>\n                <th md-column>{{\'MOTIONDIALER.NAME\' | translate}}</th>\n                <th md-column>{{\'MOTIONDIALER.TOTAL\' | translate}}</th>\n                <th md-column>{{\'MOTIONDIALER.TOTAL_MANAGED\' | translate}}</th>\n                <th md-column>{{\'MOTIONDIALER.LIMITED\' | translate}}</th>\n                <th md-column>{{\'MOTIONDIALER.ORIGINATED\' | translate}}</th>\n                <th md-column>{{\'MOTIONDIALER.MESSAGE\' | translate}}</th>\n                <th md-column>{{\'MOTIONDIALER.CALLYSQUAREPROJECT\' | translate}}</th>\n                <th md-column>{{ \'MOTIONDIALER.TRUNK\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.ACTIVE\' | translate }}</th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.campaigns">\n                <td md-cell colspan="8">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="MOTIONDIALER.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row ng-repeat="(id, campaign) in vm.campaigns">\n                <td md-cell>\n                    <span>{{campaign.name}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{campaign.ivrTotalCallsDays || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{campaign.ivrAnswerCallsDay || 0}} ({{(campaign.ivrTotalCallsDays) ? (campaign.ivrAnswerCallsDay || 0) * 100/(campaign.ivrTotalCallsDays ) : 0 | number:1}}%)</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{campaign.limitCalls || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{campaign.originated || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{campaign.message ? (\'MOTIONDIALER.\'+campaign.message | translate) : \'--\'}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{campaign.dialQueueProject || \'--\'}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{campaign.Trunk ? campaign.Trunk.name : \'--\'}}</span>\n                </td>\n                <td md-cell>\n                    <md-icon md-colors="{color: {{campaign.active ? \'\\\'green\\\'\' : \'\\\'red\\\'\'}}}" md-font-icon="{{campaign.active ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MOTIONDIALER.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="3">\n                            <md-menu-item>\n                                <md-button ng-click="vm.createOrEditIvrCampaign($event, campaign)" translate="MOTIONDIALER.EDIT_CAMPAIGN">\n                                    Edit Campaign\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n    md-page="vm.query.page" md-total="{{vm.count}}" md-on-paginate="vm.getCampaigns" md-page-select></md-table-pagination>\n\x3c!-- / QUEUE TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/motiondialer/views/realtime/queue_calls/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="MOTIONDIALER.QUEUE_CALLS">Queue Calls</span>\n        \x3c!-- <div flex></div>\n    <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar> --\x3e\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUES TABLE --\x3e\n<md-table-container>\n    <table md-table>\n        <thead md-head>\n            <tr md-row>\n                <th md-column width="30px"></th>\n                <th md-column>{{ \'MOTIONDIALER.DID\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.QUEUE\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.CALLER\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.AGENT\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.DURATION\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.getSize(vm.rpcVoiceQueuesChannels)">\n                <td md-cell colspan="6">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="MOTIONDIALER.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row ng-repeat="(key, channel) in vm.rpcVoiceQueuesChannels | limitObjectFromTo: vm.queryChannels.limit:(vm.queryChannels.page - 1) * vm.queryChannels.limit">\n                <td md-cell>\n                    <md-icon ng-if="channel.queuecallerleaveAt" md-font-icon="icon-phone-in-talk green-fg"></md-icon>\n                    <md-icon ng-if="!channel.queuecallerleaveAt" md-font-icon="icon-phone-incoming md-accent"></md-icon>\n                </td>\n                <td md-cell>{{channel.exten}}</td>\n                <td md-cell>{{channel.queue}}</td>\n                <td md-cell>{{channel.calleridnum}}</td>\n                <td md-cell>\n                    <span ng-if="channel.queuecallerleaveAt">\n              {{channel.connectedlinename}}, {{channel.connectedlinenum}}\n              <span class="text-boxed">\n                <timer start-time="channel.queuecallerleaveAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n              </span>\n                    </span>\n                    <span ng-if="!channel.queuecallerleaveAt" class="text-boxed">\n              {{ \'MOTIONDIALER.WAITING_FOR_AGENT\' | translate }}\n              <timer start-time="channel.queuecallerjoinAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n            </span>\n                </td>\n                <td md-cell>\n                    <span class="text-boxed">\n              <timer start-time="channel.queuecallerjoinAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n            </span>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="2">\n                            <md-menu-item>\n                                <md-button ng-click="vm.hangup(channel.uniqueid)" translate="MOTIONDIALER.HANGUP">\n                                    Hangup\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.redirectToNumber($event, channel.uniqueid)" translate="MOTIONDIALER.REDIRECT_TO_NUMBER">\n                                    Number\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" translate="MOTIONDIALER.REDIRECT_TO_AGENT">Redirect to Agent</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item ng-repeat="agent in vm.agents.rows">\n                                            <md-button ng-click="vm.redirectToAgent(channel.uniqueid, agent.name)">{{agent.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n            \x3c!-- <tr md-row ng-repeat="call in vm.calls.rows | filter: vm.query.filter | limitTo: vm.query.limit: (vm.query.page - 1) * vm.query.limit">\n        <td md-cell>\n          <i ng-class="vm.channelStatusClass[call.status.toLowerCase()]"></i>\n        </td>\n        <td md-cell>{{call.exten}}</td>\n        <td md-cell>{{call.queue}}</td>\n        <td md-cell><span ng-if="call.calleridname">{{call.calleridname}}, </span>{{call.calleridnum}}</td>\n        <td md-cell>\n          <span ng-if="call.queuecallerleaveAt">\n            {{call.connectedlinename}}, {{call.connectedlinenum}}\n            <span class="text-boxed">\n              <timer start-time="call.queuecallerleaveAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n            </span>\n          </span>\n          <span ng-if="!call.queuecallerleaveAt" class="text-boxed" translate="MOTIONDIALER.WAITING_FOR_AGENT">\n            Waiting for agent...\n            <span class="text-boxed">\n              <timer start-time="call.queuecallerjoinAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n            </span>\n          </span>\n        </td>\n        <td md-cell>\n          <span class="text-boxed">\n            <timer ng-if="call.queuecallerjoinAt" start-time="call.queuecallerjoinAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n            <span ng-if="call.queuecallercomplete || call.queuecallerabandon || call.queuecallerexit" translate="MOTIONDIALER.CLOSING">Closing</span>\n          </span>\n        </td>\n        <td md-cell class="actions">\n          <md-menu>\n            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n              <md-icon md-font-icon="icon-dots-vertical" ></md-icon>\n            </md-button>\n\n            <md-menu-content width="2">\n              <md-menu-item>\n                <md-button ng-click="vm.hangup(call.uniqueid)" translate="MOTIONDIALER.HANGUP">\n                  Hangup\n                </md-button>\n              </md-menu-item>\n              <md-menu-item>\n                <md-button ng-click="vm.redirectToNumber($event, call.uniqueid)" translate="MOTIONDIALER.REDIRECT_TO_NUMBER">\n                  Number\n                </md-button>\n              </md-menu-item>\n              <md-menu-item>\n                <md-menu>\n                  <md-button ng-click="$mdMenu.open()" translate="MOTIONDIALER.REDIRECT_TO_AGENT">Redirect to Agent</md-button>\n                  <md-menu-content>\n                    <md-menu-item ng-repeat="agent in vm.agents.rows">\n                      <md-button ng-click="vm.redirectToAgent(call.uniqueid, agent.name)">{{agent.name}}</md-button>\n                    </md-menu-item>\n                  </md-menu-content>\n                </md-menu>\n              </md-menu-item>\n            </md-menu-content>\n          </md-menu>\n        </td>\n      </tr> --\x3e\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm.queryChannels.limit" md-page="vm.queryChannels.page" md-limit-options="[10, 15, 20, 50, 100, 250]"\n    md-total="{{vm.getSize(vm.rpcVoiceQueuesChannels)}}" md-page-select></md-table-pagination>\n\x3c!-- / QUEUES TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/motiondialer/views/realtime/queue_params/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="MOTIONDIALER.QUEUE_PARAMETERS">Params</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUE TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getQueues">\n            <tr md-row>\n                <th md-column>{{\' MOTIONDIALER.NAME\' | translate}}</th>\n                <th md-column>{{\' MOTIONDIALER.TOTAL\' | translate}}</th>\n                <th md-column>{{\' MOTIONDIALER.TOTAL_OFFERED\' | translate}}</th>\n                <th md-column>{{\' MOTIONDIALER.MANAGED\' | translate}}</th>\n                <th md-column>{{\' MOTIONDIALER.ABANDONED\' | translate}}</th>\n                <th md-column>{{\' MOTIONDIALER.DROPPED\' | translate}}</th>\n                <th md-column>{{\' MOTIONDIALER.AVG_HOLD_TIME\' | translate}}</th>\n                <th md-column>{{\' MOTIONDIALER.AVG_DURATION\' | translate}}</th>\n                <th md-column>{{\' MOTIONDIALER.AVG_BILLABLE\' | translate}}</th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.queues">\n                <td md-cell colspan="8">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="MOTIONDIALER.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row ng-repeat="(id, queue) in vm.queues">\n                <td md-cell>\n                    <span>{{queue.name}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{(queue.answered + queue.outboundNoAnswerCallsDay + queue.outboundBusyCallsDay + queue.outboundCongestionCallsDay + queue.outboundNoSuchCallsDay + queue.outboundUnknownCallsDay + queue.outboundDropCallsDayTimeout + queue.outboundDropCallsDayCallersExit + queue.outboundBlacklistCallsDay + queue.outboundOriginateFailureCallsDay + queue.outboundAnswerAgiCallsDay + queue.outboundReCallsDay + queue.outboundRejectCallsDay )|| 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{queue.total || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.answered || 0}} ({{(queue.answered) ? (100 - (((queue.outboundDropCallsDayTimeout || 0) * 100/(queue.total)) | number:1 ) - (((queue.outboundDropCallsDayCallersExit || 0) * 100/(queue.total )) | number:1 )  ) : 0 | number:1}}%)</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.outboundDropCallsDayCallersExit || 0}} ({{(queue.outboundDropCallsDayCallersExit) ? (queue.outboundDropCallsDayCallersExit || 0) * 100/(queue.total ) : 0 | number:1}}%)</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.outboundDropCallsDayTimeout || 0}} ({{(queue.outboundDropCallsDayTimeout) ? (queue.outboundDropCallsDayTimeout || 0) * 100/(queue.total) : 0 | number:1}}%)</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.total ? (queue.sumHoldTime / queue.total) : 0 | number: 0 | secToTime | date:\'HH:mm:ss\'}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.total ? (queue.sumDuration / queue.total) : 0 | number: 0 | secToTime | date:\'HH:mm:ss\'}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.answered ? ((queue.sumBillable || 0) / queue.answered) : 0 | number: 0 | secToTime | date:\'HH:mm:ss\'}}</span>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n    md-page="vm.query.page" md-total="{{vm.count}}" md-on-paginate="vm.getQueues" md-page-select></md-table-pagination>\n\x3c!-- / QUEUE TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/motiondialer/views/realtime/queues/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="MOTIONDIALER.QUEUES">Queues</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUE TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getQueues">\n            <tr md-row>\n                <th md-column md-order-by="name">{{ \'MOTIONDIALER.NAME\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.LOGGED_IN\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.PAUSED\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.READY\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.WAITING\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.TALKING\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.ORIGINATED\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.MESSAGE\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.METHOD\' | translate }}</th>\n                <th md-column>{{ \'MOTIONDIALER.TRUNK\' | translate }}</th>\n                <th md-column md-order-by="dialActive">{{ \'MOTIONDIALER.ACTIVE\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.queues">\n                <td md-cell colspan="12">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="MOTIONDIALER.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row md-select="vm.queues[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td md-cell>{{vm.queues[value].name}}</td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].loggedInDb || 0}} ({{vm.queues[value].loggedIn || 0}})</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].paused || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].available || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].waiting || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{(vm.queues[value].talking || 0)  +  (vm.queues[value].pTalking || 0)}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].originated || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].message ? (\'MOTIONDIALER.\'+vm.queues[value].message | translate) : \'--\'}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].dialMethod || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].Trunk ? vm.queues[value].Trunk.name : \'--\'}}</span>\n                </td>\n                <td md-cell>\n                    <md-icon md-colors="{color: {{vm.queues[value].dialActive ? \'\\\'green\\\'\' : \'\\\'red\\\'\'}}}" md-font-icon="{{vm.queues[value].dialActive ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="MOTIONDIALER.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="3">\n                            <md-menu-item>\n                                <md-button ng-click="vm.createOrEditMotionDialerQueue($event, vm.queues[value])" translate="MOTIONDIALER.EDIT_QUEUE">\n                                    Edit Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.agentAdd($event, vm.queues[value])" translate="MOTIONDIALER.AGENTSADD_QUEUE">\n                                    Add Agents to queue\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n    md-page="vm.query.page" md-total="{{vm.count}}" md-on-paginate="vm.getQueues" md-page-select></md-table-pagination>\n\x3c!-- / QUEUE TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/motiondialer/views/realtime/realtime.html",'<div id="realtime" class="page-layout simple tabbed" layout="column" ng-cloak>\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.AGENTS">Agents</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.QUEUES">Queues</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.QUEUE_CALLS">Queue Calls</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.ABANDONEDCALLS">Abandoned Queue Calls</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.QUEUE_PARAMS">Queue Parameters</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="MOTIONDIALER.IVR_CAMPAIGNS">Ivr Campaigns</span>\n                </md-tab-label>\n            </md-tab>\n        </md-tabs>\n\n        <md-card ui-view></md-card>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n</div>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/create/dialog.html",'<md-dialog class="openchannelAccount-dialog" aria-label="New OpenchannelAccount">\n    <form name="openchannelAccountForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.openchannelAccount.name" ng-required="true" autofocus ng-disabled="!vm.newOpenchannelAccount">\n                <div ng-messages="openchannelAccountForm[\'name\'].$error" ng-show="openchannelAccountForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.KEY">key</label>\n                <input type="text" name="key" ng-model="vm.openchannelAccount.key" md-maxlength="5" ng-required="true">\n                <div ng-messages="openchannelAccountForm[\'key\'].$error" ng-show="openchannelAccountForm[\'key\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.KEY_REQUIRED">key field is required</span>\n                    </div>\n\n                    <div ng-message="md-maxlength">\n                        <span translate="OPENCHANNEL.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 5}\'>key must have a maximum length equal to 5</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.REPLYURI">replyUri</label>\n                <input type="url" name="replyUri" ng-model="vm.openchannelAccount.replyUri">\n                <div class="hint"><span translate="OPENCHANNEL.HELP.REPLYURI"></span></div>\n                <div ng-messages="openchannelAccountForm[\'replyUri\'].$error" ng-show="openchannelAccountForm[\'replyUri\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.REPLYURI_REQUIRED">replyUri field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="OPENCHANNEL.ERRORS.REPLYURI_MUST_VALID_URL">replyUri must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.LIST">List</label>\n                <md-select name="ListId" ng-model="vm.openchannelAccount.ListId" required>\n                    <md-option ng-value="ListId.id" ng-repeat="ListId in vm.lists">{{ ListId.name }}</md-option>\n                </md-select>\n                <div class="hint"><span translate="OPENCHANNEL.HELP.LIST"></span></div>\n                <div ng-messages="openchannelAccountForm[\'ListId\'].$error" ng-show="openchannelAccountForm[\'ListId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.LIST_REQUIRED">List field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.openchannelAccount.description">\n                <div ng-messages="openchannelAccountForm[\'description\'].$error" ng-show="openchannelAccountForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newOpenchannelAccount" ng-click="vm.saveOpenchannelAccount()" class="send-button md-accent md-raised" ng-disabled="openchannelAccountForm.$invalid || openchannelAccountForm.$pristine" aria-label="SAVE" translate="OPENCHANNEL.SAVE"\n                    translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newOpenchannelAccount" ng-click="vm.addNewOpenchannelAccount()" class="send-button md-accent md-raised" ng-disabled="openchannelAccountForm.$invalid" aria-label="ADD" translate="OPENCHANNEL.ADD_OPENCHANNELACCOUNT" translate-attr-aria-label="OPENCHANNEL.ADD_OPENCHANNELACCOUNT">\n                    ADD OPENCHANNELACCOUNT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newOpenchannelAccount" ng-click="vm.deleteOpenchannelAccount($event)" aria-label="DELETE" translate translate-attr-aria-label="OPENCHANNEL.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="OPENCHANNEL.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/apps/agent/dialog.html",'<md-dialog class="openchannelAccount-dialog" aria-label="New OpenchannelAccount">\n    <form name="openchannelAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.AGENT">Agent</label>\n                <md-select name="agent" ng-model="vm.agent.agent" required autofocus>\n                    <md-option ng-value="agent.name" ng-repeat="agent in vm.agents">{{ agent.name }}</md-option>\n                </md-select>\n                <div ng-messages="openchannelAccountFormApp[\'agent\'].$error" ng-show="openchannelAccountFormApp[\'agent\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.AGENT_REQUIRED">Agent field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.agent.timeout" min="0" max="2147483" ng-required="true">\n                <div ng-messages="openchannelAccountFormApp[\'timeout\'].$error" ng-show="openchannelAccountFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="OPENCHANNEL.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="OPENCHANNEL.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveOpenchannelAccountApp()" class="send-button md-accent md-raised" ng-disabled="openchannelAccountFormApp.$invalid || openchannelAccountFormApp.$pristine" aria-label="SAVE" translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/apps/autoreply/dialog.html",'<md-dialog class="openchannelAccount-dialog" aria-label="New OpenchannelAccount">\n    <form name="openchannelAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.TIMES">times</label>\n                <md-select name="times" ng-model="vm.autoreply.times" required autofocus>\n                    <md-option ng-value="1">One Time</md-option>\n                    <md-option ng-value="0">Always</md-option>\n                </md-select>\n                <div ng-messages="openchannelAccountFormApp[\'times\'].$error" ng-show="openchannelAccountFormApp[\'times\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.TIMES_REQUIRED">times field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.TEXT">Text</label>\n                <textarea name="text" ng-model="vm.autoreply.text" md-maxlength="255" required></textarea>\n\n                <div ng-messages="openchannelAccountFormApp[\'text\'].$error" ng-show="openchannelAccountFormApp[\'text\'].$touched" role="alert">\n\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.TEXT_REQUIRED">Text field is required</span>\n                    </div>\n\n\n                    <div ng-message="md-maxlength">\n                        <span translate="OPENCHANNEL.ERRORS.TEXT_MAX_LENGTH" translate-values=\'{max: 255}\'>Text must have a maximum length equal to 255</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveOpenchannelAccountApp()" class="send-button md-accent md-raised" ng-disabled="openchannelAccountFormApp.$invalid || openchannelAccountFormApp.$pristine" aria-label="SAVE" translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/apps/close/dialog.html",'<md-dialog class="openchannelAccount-dialog" aria-label="New OpenchannelAccount">\n    <form name="openchannelAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.DISPOSITION">Disposition</label>\n                <input type="text" name="disposition" ng-model="vm.close.disposition" ng-required="true" autofocus>\n                <div ng-messages="openchannelAccountFormApp[\'disposition\'].$error" ng-show="openchannelAccountFormApp[\'disposition\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.DISPOSITION_REQUIRED">Disposition field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveOpenchannelAccountApp()" class="send-button md-accent md-raised" ng-disabled="openchannelAccountFormApp.$invalid || openchannelAccountFormApp.$pristine" aria-label="SAVE" translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/apps/gotoif/dialog.html",'<md-dialog class="openchannelAccount-dialog" aria-label="New OpenchannelAccount">\n    <form name="openchannelAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.CONDITION">Condition</label>\n                <input type="text" name="condition" ng-model="vm.gotoif.condition" ng-required="true" autofocus>\n                <div ng-messages="openchannelAccountFormApp[\'condition\'].$error" ng-show="openchannelAccountFormApp[\'condition\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.CONDITION_REQUIRED">Condition field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.TRUEPRIORITY">truepriority</label>\n                <input type="number" name="truepriority" ng-model="vm.gotoif.truepriority" min="1" ng-required="true">\n                <div ng-messages="openchannelAccountFormApp[\'truepriority\'].$error" ng-show="openchannelAccountFormApp[\'truepriority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.TRUEPRIORITY_REQUIRED">truepriority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="OPENCHANNEL.ERRORS.TRUEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">truepriority must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.FALSEPRIORITY">falsepriority</label>\n                <input type="number" name="falsepriority" ng-model="vm.gotoif.falsepriority" min="1" ng-required="true">\n                <div ng-messages="openchannelAccountFormApp[\'falsepriority\'].$error" ng-show="openchannelAccountFormApp[\'falsepriority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.FALSEPRIORITY_REQUIRED">falsepriority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="OPENCHANNEL.ERRORS.FALSEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">falsepriority must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveOpenchannelAccountApp()" class="send-button md-accent md-raised" ng-disabled="openchannelAccountFormApp.$invalid || openchannelAccountFormApp.$pristine" aria-label="SAVE" translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/apps/gotop/dialog.html",'<md-dialog class="openchannelAccount-dialog" aria-label="New OpenchannelAccount">\n    <form name="openchannelAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.PRIORITY">Priority</label>\n                <input type="number" name="priority" ng-model="vm.gotop.priority" min="0" ng-required="true" autofocus>\n                <div ng-messages="openchannelAccountFormApp[\'priority\'].$error" ng-show="openchannelAccountFormApp[\'priority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.PRIORITY_REQUIRED">Priority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="OPENCHANNEL.ERRORS.PRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Priority must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveOpenchannelAccountApp()" class="send-button md-accent md-raised" ng-disabled="openchannelAccountFormApp.$invalid || openchannelAccountFormApp.$pristine" aria-label="SAVE" translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/apps/interval/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select ng-model="vm.type">\n                    <md-option ng-value="type" ng-repeat=\'type in vm.types\'>{{ type | ucfirst }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.type === \'list\'">\n                <label translate="TOOLS.INTERVALS">Intervals</label>\n                <md-select ng-model="vm.interval.IntervalId">\n                    <md-option ng-value="interval.id" ng-repeat="interval in vm.intervals.rows">{{ interval.name }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            \x3c!-- TIMERANGE START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.TIME_RANGE">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <div class="md-block" flex>\n                    <mdp-time-picker name="timeRangeFrom" mdp-placeholder="FROM" ng-model="vm.timeRangeFrom" mdp-format="HH:mm" mdp-auto-switch="true">\n                        <div ng-messages="intervalForm.timeRangeFrom.$error" ng-show="intervalForm.timeRangeFrom.$touched" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_FROM_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n                <div class="md-block" flex ng-if="vm.timeRangeFrom">\n                    <mdp-time-picker name="timeRangeTo" mdp-placeholder="TO*" ng-model="vm.timeRangeTo" mdp-format="HH:mm" mdp-auto-switch="true" required>\n                        <div ng-messages="intervalForm.timeRangeTo.$error" ng-show="intervalForm.timeRangeTo.$invalid" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_INVALID">Time Range To field is invalid</span>\n                            </div>\n                            <div ng-message="required">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_REQUIRED">Time Range To field is required</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n            \x3c!-- TIMERANGE END --\x3e\n\n            \x3c!-- DAYSOFWEEK START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.WEEK_DAYS">Week Days</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.dayOfWeekFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex class="md-block" ng-if="vm.dayOfWeekFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="dayOfWeekTo" ng-model="vm.dayOfWeekTo">\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.dayOfWeekTo.$error" ng-show="intervalForm.dayOfWeekTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- DAYSOFWEEK END --\x3e\n\n            \x3c!-- MONTHDAY START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTH_DAYS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthDayFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthDayFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthDayTo" ng-model="vm.monthDayTo">\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthDayTo.$error" ng-show="intervalForm.monthDayTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTHDAY END --\x3e\n\n            \x3c!-- MONTH START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTHS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthTo" ng-model="vm.monthTo">\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthTo.$error" ng-show="intervalForm.monthTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTH END --\x3e\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/apps/noop/dialog.html",'<md-dialog class="openchannelAccount-dialog" aria-label="New OpenchannelAccount">\n    <form name="openchannelAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.VALUE">Value</label>\n                <input type="text" name="value" ng-model="vm.noop.value" autofocus>\n                <div ng-messages="openchannelAccountFormApp[\'value\'].$error" ng-show="openchannelAccountFormApp[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveOpenchannelAccountApp()" class="send-button md-accent md-raised" ng-disabled="openchannelAccountFormApp.$invalid || openchannelAccountFormApp.$pristine" aria-label="SAVE" translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/apps/queue/dialog.html",'<md-dialog class="openchannelAccount-dialog" aria-label="New OpenchannelAccount">\n    <form name="openchannelAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.QUEUE">Queue</label>\n                <md-select name="queue" ng-model="vm.queue.queue" required autofocus>\n                    <md-option ng-value="queue.name" ng-repeat="queue in vm.queues">{{ queue.name }}</md-option>\n                </md-select>\n                <div ng-messages="openchannelAccountFormApp[\'queue\'].$error" ng-show="openchannelAccountFormApp[\'queue\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.QUEUE_REQUIRED">Queue field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.queue.timeout" min="0" max="2147483" ng-required="true">\n                <div ng-messages="openchannelAccountFormApp[\'timeout\'].$error" ng-show="openchannelAccountFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="OPENCHANNEL.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="OPENCHANNEL.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveOpenchannelAccountApp()" class="send-button md-accent md-raised" ng-disabled="openchannelAccountFormApp.$invalid || openchannelAccountFormApp.$pristine" aria-label="SAVE" translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/apps/system/dialog.html",'<md-dialog class="openchannelAccount-dialog" aria-label="New OpenchannelAccount">\n    <form name="openchannelAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.COMMAND">Command</label>\n                <input type="text" name="command" ng-model="vm.system.command" ng-required="true" autofocus>\n                <div ng-messages="openchannelAccountFormApp[\'command\'].$error" ng-show="openchannelAccountFormApp[\'command\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.COMMAND_REQUIRED">Command field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.VARIABLE">Variable</label>\n                <md-select name="variable" ng-model="vm.system.variable">\n                    <md-option ng-value="variable.name" ng-repeat="variable in vm.variables">{{ variable.name }}</md-option>\n                    <md-option ng-value="\'\'">None</md-option>\n                </md-select>\n                <div ng-messages="openchannelAccountFormApp[\'variable\'].$error" ng-show="openchannelAccountFormApp[\'variable\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.VARIABLE_REQUIRED">Variable field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveOpenchannelAccountApp()" class="send-button md-accent md-raised" ng-disabled="openchannelAccountFormApp.$invalid || openchannelAccountFormApp.$pristine" aria-label="SAVE" translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/openchannelCannedAnswers/dialog.html",'<md-dialog class="openchannelCannedAnswer-dialog" aria-label="New OpenchannelCannedAnswer">\n    <form name="openchannelCannedAnswerForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.KEY">Key</label>\n                <input type="" name="key" ng-model="vm.openchannelCannedAnswer.key" md-maxlength="255" ng-required="true" autofocus>\n                <div ng-messages="openchannelCannedAnswerForm[\'key\'].$error" ng-show="openchannelCannedAnswerForm[\'key\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.KEY_REQUIRED">Key field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.VALUE">Value</label>\n                <textarea name="value" ng-model="vm.openchannelCannedAnswer.value" required></textarea>\n\n                <div ng-messages="openchannelCannedAnswerForm[\'value\'].$error" ng-show="openchannelCannedAnswerForm[\'value\'].$touched" role="alert">\n\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.openchannelCannedAnswer.description">\n                <div ng-messages="openchannelCannedAnswerForm[\'description\'].$error" ng-show="openchannelCannedAnswerForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newOpenchannelCannedAnswer" ng-click="vm.saveOpenchannelCannedAnswer()" class="send-button md-accent md-raised" ng-disabled="openchannelCannedAnswerForm.$invalid || openchannelCannedAnswerForm.$pristine" aria-label="SAVE"\n                    translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newOpenchannelCannedAnswer" ng-click="vm.addNewOpenchannelCannedAnswer()" class="send-button md-accent md-raised" ng-disabled="openchannelCannedAnswerForm.$invalid" aria-label="ADD" translate="OPENCHANNEL.ADD_OPENCHANNELCANNEDANSWER"\n                    translate-attr-aria-label="OPENCHANNEL.ADD_OPENCHANNELCANNEDANSWER">\n                    ADD OPENCHANNELCANNEDANSWER\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newOpenchannelCannedAnswer" ng-click="vm.deleteOpenchannelCannedAnswer($event)" aria-label="DELETE" translate translate-attr-aria-label="OPENCHANNEL.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="OPENCHANNEL.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/openchannelDispositions/dialog.html",'<md-dialog class="openchannelDisposition-dialog" aria-label="New OpenchannelDisposition">\n    <form name="openchannelDispositionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.openchannelDisposition.name" ng-required="true" autofocus>\n                <div ng-messages="openchannelDispositionForm[\'name\'].$error" ng-show="openchannelDispositionForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newOpenchannelDisposition" ng-click="vm.saveOpenchannelDisposition()" class="send-button md-accent md-raised" ng-disabled="openchannelDispositionForm.$invalid || openchannelDispositionForm.$pristine" aria-label="SAVE"\n                    translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newOpenchannelDisposition" ng-click="vm.addNewOpenchannelDisposition()" class="send-button md-accent md-raised" ng-disabled="openchannelDispositionForm.$invalid" aria-label="ADD" translate="OPENCHANNEL.ADD_OPENCHANNELDISPOSITION"\n                    translate-attr-aria-label="OPENCHANNEL.ADD_OPENCHANNELDISPOSITION">\n                    ADD OPENCHANNELDISPOSITION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newOpenchannelDisposition" ng-click="vm.deleteOpenchannelDisposition($event)" aria-label="DELETE" translate translate-attr-aria-label="OPENCHANNEL.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="OPENCHANNEL.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/edit/view.html",'<div id="openchannel-openchannelAccount" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-openchannelAccounts-button md-icon-button" aria-label="Go to openchannelAccounts" ng-click="vm.gotoOpenchannelAccounts()" translate translate-attr-aria-label="OPENCHANNEL.GO_TO_OPENCHANNELACCOUNTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="openchannelAccount-image" hide-xs>\n                    <img ng-src="assets/images/business/openchannelAccounts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.openchannelAccount.id}}\n                        <span ng-if="vm.openchannelAccount.name">{{vm.openchannelAccount.name}}</span>\n                        <span ng-if="vm.openchannelAccount.exten">{{vm.openchannelAccount.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="OPENCHANNEL.CREATED_AT"></span> <span>{{vm.openchannelAccount.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveOpenchannelAccount()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (notificationForm.$invalid) || (openchannelDispositionsForm.$invalid) || (openchannelCannedAnswersForm.$invalid) || (actionsForm.$invalid) || (interactionsForm.$invalid)"\n                translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="OPENCHANNEL.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="openchannelAccount-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="OPENCHANNEL.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.openchannelAccount.name" ng-required="true" autofocus ng-disabled="true">\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="OPENCHANNEL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.KEY">key</label>\n                                <input type="text" name="key" ng-model="vm.openchannelAccount.key" md-maxlength="5" ng-required="true">\n                                <div ng-messages="generalForm[\'key\'].$error" ng-show="generalForm[\'key\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="OPENCHANNEL.ERRORS.KEY_REQUIRED">key field is required</span>\n                                    </div>\n\n                                    <div ng-message="md-maxlength">\n                                        <span translate="OPENCHANNEL.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 5}\'>key must have a maximum length equal to 5</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.REPLYURI">replyUri</label>\n                                <input type="url" name="replyUri" ng-model="vm.openchannelAccount.replyUri">\n                                <div class="hint"><span translate="OPENCHANNEL.HELP.REPLYURI"></span></div>\n                                <div ng-messages="generalForm[\'replyUri\'].$error" ng-show="generalForm[\'replyUri\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="OPENCHANNEL.ERRORS.REPLYURI_REQUIRED">replyUri field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="OPENCHANNEL.ERRORS.REPLYURI_MUST_VALID_URL">replyUri must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.LIST">List</label>\n                                <md-select name="ListId" ng-model="vm.openchannelAccount.ListId" required>\n                                    <md-option ng-value="ListId.id" ng-repeat="ListId in vm.lists">{{ ListId.name }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="OPENCHANNEL.HELP.LIST"></span></div>\n                                <div ng-messages="generalForm[\'ListId\'].$error" ng-show="generalForm[\'ListId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="OPENCHANNEL.ERRORS.LIST_REQUIRED">List field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.WAITFORTHEASSIGNEDAGENT">WaitForTheAssignedAgent</label>\n                                <input type="number" name="waitForTheAssignedAgent" ng-model="vm.openchannelAccount.waitForTheAssignedAgent" min="1" max="2147483" ng-required="true">\n                                <div ng-messages="generalForm[\'waitForTheAssignedAgent\'].$error" ng-show="generalForm[\'waitForTheAssignedAgent\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="OPENCHANNEL.ERRORS.WAITFORTHEASSIGNEDAGENT_REQUIRED">WaitForTheAssignedAgent field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="OPENCHANNEL.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">WaitForTheAssignedAgent must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="OPENCHANNEL.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_LESS_THAN_OR_EQUAL_TO">WaitForTheAssignedAgent must be a valid greater or equal than</span> <span>2147483</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.openchannelAccount.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="OPENCHANNEL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.RECEIVEURI">receiveUri</label>\n                                <div layout="row" layout-align="center center">\n                                    <button class="md-button md-fab md-mini md-primary" ngclipboard data-clipboard-target="#copytoclipboard-receiveUri" ngclipboard-success="vm.alert({title: \'copied to clipboard\', msg: e.text});" ngclipboard-error="vm.alert({title: \'error\', msg: \'copy to clipboard failed\'});">\n                      <md-icon md-font-icon="icon-clipboard-text"></md-icon>\n                  </button>\n                                    <input class="md-input" type="text" id="copytoclipboard-receiveUri" name="receiveUri" ng-value="vm.location + \'/api/openchannel/accounts/\' + vm.openchannelAccount.id + \'/notify\'" ng-readonly="true">\n                                </div>\n                                <div class="hint"><span translate="OPENCHANNEL.HELP.RECEIVEURI"></span></div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="openchannelAccount-detail-form-container notification md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="OPENCHANNEL.NOTIFICATION">NOTIFICATION</div>\n                        </div>\n                        <form name="notificationForm" novalidate>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.openchannelAccount.notificationSound" aria-label="notificationSound"><span translate="OPENCHANNEL.NOTIFICATIONSOUND">notificationSound</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.openchannelAccount.notificationShake" aria-label="notificationShake"><span translate="OPENCHANNEL.NOTIFICATIONSHAKE">notificationShake</span></md-switch>\n                            </md-input-container>\n                            <div class="md-block">\n                                <label class="md-caption grey-fg" translate="OPENCHANNEL.NOTIFICATIONTEMPLATE">notificationTemplate</label>\n                                <textarea aria-label="notificationTemplate notificationTemplate" ckeditor="{ skin: \'office2013\', language: \'en\', allowedContent: true, extraPlugins: \'font,colorbutton,autoembed,autocorrect,googlethisterm,pastebase64\', toolbarGroups: [{ name: \'styles\', groups: [\'styles\'] }, { name: \'clipboard\', groups: [\'undo\'] }, { name: \'colors\', groups: [\'colors\'] }, { name: \'basicstyles\', groups: [\'basicstyles\'] }, { name: \'paragraph\', groups: [\'list\', \'indent\', \'align\'] }, { name: \'mode\' }], autocorrect_enabled: true, disableNativeSpellChecker: false, removePlugins: \'magicline\' }"\n                                    ng-model="vm.openchannelAccount.notificationTemplate"></textarea>\n                            </div>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="OPENCHANNEL.DISPOSITIONS">DISPOSITIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="openchannelAccount-detail-form-container openchanneldispositions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="OpenchannelAccountOpenchannelDispositionsController as vm_dc" ng-init="vm_dc.init(vm.openchannelAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedOpenchannelAccountOpenchannelDispositions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="OPENCHANNEL.OPENCHANNELDISPOSITIONS">OpenchannelDispositions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelDisposition($event)" aria-label="add openchannelDisposition" translate translate-attr-label="OPENCHANNEL.ADD_OPENCHANNELDISPOSITION">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedOpenchannelAccountOpenchannelDispositions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedOpenchannelAccountOpenchannelDispositions.length}} {{vm_dc.selectedOpenchannelAccountOpenchannelDispositions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedOpenchannelAccountOpenchannelDispositions" csv-label="true" filename="openchannelAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedOpenchannelAccountOpenchannelDispositions($event)" aria-label="delete selected" translate translate-attr-label="OPENCHANNELACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedOpenchannelAccountOpenchannelDispositions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getOpenchannelAccountOpenchannelDispositions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'OPENCHANNEL.ID\' | translate }}</th>\n                                            <th md-column md-order-by="name">{{ \'OPENCHANNEL.NAME\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'OPENCHANNEL.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="openchannelDisposition" md-select-id="id" ng-repeat="openchannelDisposition in vm_dc.openchannelAccountOpenchannelDispositions.rows">\n                                            <td ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelDisposition($event, openchannelDisposition)" md-cell>{{openchannelDisposition.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelDisposition($event, openchannelDisposition)" md-cell>{{openchannelDisposition.name}}</td>\n                                            <td ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelDisposition($event, openchannelDisposition)" md-cell>{{openchannelDisposition.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="OPENCHANNEL.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelDisposition($event, openchannelDisposition)" translate="OPENCHANNEL.EDIT_OPENCHANNELDISPOSITION">\n                                                                Edit OpenchannelDisposition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(openchannelDisposition, $event)" translate="OPENCHANNEL.DELETE_OPENCHANNELDISPOSITION">\n                                                                Delete OpenchannelDisposition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.openchannelAccountOpenchannelDispositions.rows.length">\n                                            <td md-cell colspan="5">\n                                                <span class="text-boxed-ligth" translate="OPENCHANNEL.NO_OPENCHANNELDISPOSITION_AVAILABLE">No openchanneldisposition available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'OPENCHANNEL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'OPENCHANNEL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'OPENCHANNEL.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                                md-page="vm_dc.query.page" md-total="{{vm_dc.openchannelAccountOpenchannelDispositions.count}}" md-on-paginate="vm_dc.getOpenchannelAccountOpenchannelDispositions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="OPENCHANNEL.CANNEDANSWERS">CANNEDANSWERS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="openchannelAccount-detail-form-container openchannelcannedanswers md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="OpenchannelAccountOpenchannelCannedAnswersController as vm_dc" ng-init="vm_dc.init(vm.openchannelAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedOpenchannelAccountOpenchannelCannedAnswers.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="OPENCHANNEL.OPENCHANNELCANNEDANSWERS">OpenchannelCannedAnswers</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelCannedAnswer($event)" aria-label="add openchannelCannedAnswer" translate translate-attr-label="OPENCHANNEL.ADD_OPENCHANNELCANNEDANSWER">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedOpenchannelAccountOpenchannelCannedAnswers.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedOpenchannelAccountOpenchannelCannedAnswers.length}} {{vm_dc.selectedOpenchannelAccountOpenchannelCannedAnswers.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedOpenchannelAccountOpenchannelCannedAnswers" csv-label="true" filename="openchannelAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedOpenchannelAccountOpenchannelCannedAnswers($event)" aria-label="delete selected" translate translate-attr-label="OPENCHANNELACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedOpenchannelAccountOpenchannelCannedAnswers" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getOpenchannelAccountOpenchannelCannedAnswers">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'OPENCHANNEL.ID\' | translate }}</th>\n                                            <th md-column md-order-by="key">{{ \'OPENCHANNEL.KEY\' | translate }}</th>\n                                            <th md-column md-order-by="value">{{ \'OPENCHANNEL.VALUE\' | translate }}</th>\n                                            <th md-column md-order-by="description">{{ \'OPENCHANNEL.DESCRIPTION\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'OPENCHANNEL.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="openchannelCannedAnswer" md-select-id="id" ng-repeat="openchannelCannedAnswer in vm_dc.openchannelAccountOpenchannelCannedAnswers.rows">\n                                            <td ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelCannedAnswer($event, openchannelCannedAnswer)" md-cell>{{openchannelCannedAnswer.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelCannedAnswer($event, openchannelCannedAnswer)" md-cell>{{openchannelCannedAnswer.key}}</td>\n                                            <td ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelCannedAnswer($event, openchannelCannedAnswer)" md-cell>{{openchannelCannedAnswer.value}}</td>\n                                            <td ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelCannedAnswer($event, openchannelCannedAnswer)" md-cell>{{openchannelCannedAnswer.description}}</td>\n                                            <td ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelCannedAnswer($event, openchannelCannedAnswer)" md-cell>{{openchannelCannedAnswer.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="OPENCHANNEL.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditOpenchannelAccountOpenchannelCannedAnswer($event, openchannelCannedAnswer)" translate="OPENCHANNEL.EDIT_OPENCHANNELCANNEDANSWER">\n                                                                Edit OpenchannelCannedAnswer\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(openchannelCannedAnswer, $event)" translate="OPENCHANNEL.DELETE_OPENCHANNELCANNEDANSWER">\n                                                                Delete OpenchannelCannedAnswer\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.openchannelAccountOpenchannelCannedAnswers.rows.length">\n                                            <td md-cell colspan="7">\n                                                <span class="text-boxed-ligth" translate="OPENCHANNEL.NO_OPENCHANNELCANNEDANSWER_AVAILABLE">No openchannelcannedanswer available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'OPENCHANNEL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'OPENCHANNEL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'OPENCHANNEL.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                                md-page="vm_dc.query.page" md-total="{{vm_dc.openchannelAccountOpenchannelCannedAnswers.count}}" md-on-paginate="vm_dc.getOpenchannelAccountOpenchannelCannedAnswers" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="OPENCHANNEL.ACTIONS">ACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="openchannelAccount-detail-form-container actions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="OpenchannelAccountActionsController as vm_ac" ng-init="vm_ac.init(vm.openchannelAccount)" class="content" md-background-bg layout="row" layout-align="start start">\n                            \x3c!-- SIDENAV --\x3e\n                            <div class="navigation-simple sidenav main-sidenav md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="20">\n                                \x3c!-- SIDENAV CONTENT --\x3e\n                                <md-list class="no-padding">\n                                    <md-subheader class="md-no-sticky">\n                                        <span translate="VOICE.APPLICATIONS_LIST">\n          Applications List\n        </span>\n                                    </md-subheader>\n                                </md-list>\n                                <md-divider></md-divider>\n                                <md-list ng-sortable="vm_ac.list">\n                                    <md-list-item class="handle" ng-repeat="a in vm_ac.apps">\n                                        <md-icon md-font-icon="{{a.icon}}" class="s16"></md-icon>\n                                        <p class="text-truncate" translate="OPENCHANNEL.{{(a.alias || a.appType) | uppercase}}">{{a.alias || a.appType}}</p>\n                                    </md-list-item>\n                                </md-list>\n                                \x3c!-- / SIDENAV CONTENT --\x3e\n                            </div>\n                            \x3c!-- / SIDENAV --\x3e\n                            <div flex></div>\n                            \x3c!-- MAIN --\x3e\n                            <div class="main scrollable md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="75">\n                                <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_ac.selectedOpenchannelAccountApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">Drag & Drop Routing</span>\n                                        <div flex></div>\n                                        <ms-search-bar on-search="vm_ac.query.filter = query" on-collapse="vm_ac.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    </div>\n                                </md-toolbar>\n                                <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_ac.selectedOpenchannelAccountApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">{{vm_ac.selectedOpenchannelAccountApps.length}} {{vm_ac.selectedOpenchannelAccountApps.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                        <div flex></div>\n                                        <md-button ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_ac.deleteSelectedOpenchannelAccountApps($event)" aria-label="delete selected" translate translate-attr-label="OPENCHANNEL.DELETE_SELECTED">\n                                            <md-icon md-font-icon="icon-delete"></md-icon>\n                                        </md-button>\n                                    </div>\n                                </md-toolbar>\n\n                                \x3c!-- QUEUES TABLE --\x3e\n                                <md-table-container>\n                                    <table md-table md-row-select multiple ng-model="vm_ac.selectedOpenchannelAccountApps">\n                                        <thead md-head>\n                                            <tr md-row>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px">\n                                                    <span translate="VOICE.PRIORITY">Priority</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Type</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Appdata</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Interval</span>\n                                                </th>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px"></th>\n                                            </tr>\n                                        </thead>\n                                        <tbody md-body ng-sortable="vm_ac.applications">\n                                            <tr md-row md-select="app" md-select-id="id" ng-repeat="app in vm_ac.openchannelAccountApps.rows | filter: vm_ac.query.filter">\n                                                <td md-cell>\n                                                    <md-icon md-font-icon="icon-drag-vertical" class="s16 handle"></md-icon>\n                                                </td>\n                                                <td md-cell ng-click="vm_ac.editOpenchannelAccountApp($event, $index)"><span>{{app.priority}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editOpenchannelAccountApp($event, $index)">{{app.app.toLowerCase() === \'agi\' ? \'Cally-Square\' : app.app | ucfirst}}<span ng-if="app.appType.toLowerCase() === \'custom\'">*</span></td>\n                                                <td md-cell ng-click="vm_ac.editOpenchannelAccountApp($event, $index)"><span class="text-truncate" style="width:200px">{{app.appdata}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editInterval($event, $index)">{{app.IntervalId ? \'From List\' : app.interval}}</td>\n                                                <td md-cell>\n                                                    <md-button ng-click="vm_ac.editInterval($event, $index)" class="md-icon-button" aria-label="Interval">\n                                                        <md-icon md-font-icon="icon-timer"></md-icon>\n                                                        <md-tooltip>\n                                                            {{app.IntervalId ? \'From List\' : (app.interval === \'*,*,*,*\' ? \'Always\' : \'Custom\')}}\n                                                        </md-tooltip>\n                                                    </md-button>\n                                                </td>\n                                                <td md-cell class="actions">\n                                                    <md-menu>\n                                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                        </md-button>\n\n                                                        <md-menu-content width="3">\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editOpenchannelAccountApp($event, $index)" translate="VOICE.EDIT_APP">\n                                                                    Edit App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editInterval($event, $index)" translate="VOICE.EDIT_INTERVAL">\n                                                                    Edit Interval\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'">\n                                                                <md-button ng-click="vm_ac.deleteConfirm(app, $index, $event)" translate="VOICE.DELETE_APP">\n                                                                    Delete App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                        </md-menu-content>\n                                                    </md-menu>\n                                                </td>\n                                            </tr>\n                                            <tr md-row ng-hide="vm_ac.openchannelAccountApps.rows.length">\n                                                <td md-cell colspan="7">\n                                                    <span class="text-boxed-ligth" translate="VOICE.NO_APPS_AVAILABLE">No apps available</span>\n                                                </td>\n                                            </tr>\n                                        </tbody>\n                                    </table>\n                                </md-table-container>\n                                \x3c!-- / QUEUES TABLE --\x3e\n\n                                \x3c!-- NO RESULTS --\x3e\n\n                                \x3c!-- / NO RESULTS --\x3e\n                            </div>\n                            \x3c!-- / MAIN --\x3e\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="OPENCHANNEL.INTERACTIONS">INTERACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="openchannelAccount-detail-form-container interactions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="OpenchannelAccountInteractionsController as vm_dc" ng-init="vm_dc.init(vm.openchannelAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedOpenchannelAccountInteractions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="OPENCHANNEL.INTERACTIONS">Interactions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.getOpenchannelAccountInteractions()" aria-label="refresh Interactions" translate translate-attr-label="OPENCHANNEL.REFRESH_INTERACTIONS">\n                                        <md-icon md-font-icon="icon-refresh"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedOpenchannelAccountInteractions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedOpenchannelAccountInteractions.length}} {{vm_dc.selectedOpenchannelAccountInteractions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedOpenchannelAccountInteractions" csv-label="true" filename="openchannelAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedOpenchannelAccountInteractions($event)" aria-label="delete selected" translate translate-attr-label="OPENCHANNELACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedOpenchannelAccountInteractions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getOpenchannelAccountInteractions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'OPENCHANNEL.ID\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'OPENCHANNEL.STARTEDAT\' | translate }}</th>\n                                            <th md-column>{{ \'OPENCHANNEL.CONTACT\' | translate }}</th>\n                                            <th md-column>{{ \'OPENCHANNEL.AGENT\' | translate }}</th>\n                                            <th md-column md-order-by="closedAt">{{ \'OPENCHANNEL.CLOSEDAT\' | translate }}</th>\n                                            <th md-column md-order-by="disposition">{{ \'OPENCHANNEL.DISPOSITION\' | translate }}</th>\n                                            <th md-column md-order-by="note">{{ \'OPENCHANNEL.NOTES\' | translate }}</th>\n                                            <th md-column md-order-by="tag">{{ \'OPENCHANNEL.TAGS\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="interaction" md-select-id="id" ng-repeat="interaction in vm_dc.openchannelAccountInteractions.rows">\n                                            <td md-cell>{{interaction.id}}</td>\n                                            <td md-cell>{{interaction.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell>{{interaction.Contact.firstName}}</td>\n                                            <td md-cell>{{interaction.Owner.name}}</td>\n                                            <td md-cell>{{interaction.closedAt | date:\'medium\'}}</td>\n                                            <td md-cell>{{interaction.disposition}}</td>\n                                            <td md-cell>{{interaction.note}}</td>\n                                            <td md-cell>\n                                                <div ng-if="interaction.Tags.length">\n                                                    <md-tooltip md-direction="left" layout="row">\n                                                        <span ng-repeat="tag in interaction.Tags">{{tag.name}}<span ng-if="!$last">, </span></span>\n                                                    </md-tooltip>\n                                                    <md-icon md-font-icon="icon-tag"></md-icon>\n                                                </div>\n                                            </td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="OPENCHANNEL.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.spyopenchannelInteraction($event, interaction)" translate="OPENCHANNEL.SPYINTERACTION">\n                                                                Spy Interaction\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(interaction, $event)" translate="OPENCHANNEL.DELETE_INTERACTION">\n                                                                Delete Interaction\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.openchannelAccountInteractions.rows.length">\n                                            <td md-cell colspan="13">\n                                                <span class="text-boxed-ligth" translate="OPENCHANNEL.NO_INTERACTION_AVAILABLE">No interaction available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'OPENCHANNEL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'OPENCHANNEL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'OPENCHANNEL.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n                                md-page="vm_dc.query.page" md-total="{{vm_dc.openchannelAccountInteractions.count}}" md-on-paginate="vm_dc.getOpenchannelAccountInteractions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/openchannel/views/openchannelAccounts/openchannelAccounts.html",'<div id="openchannelAccounts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-google-earth" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="OPENCHANNEL.OPENCHANNELACCOUNTS">OpenchannelAccounts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="OPENCHANNEL.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedOpenchannelAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedOpenchannelAccounts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="OPENCHANNEL.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-openchannelAccounts-count">\n                    <span>{{vm.selectedOpenchannelAccounts.length}}</span>\n                <span translate="OPENCHANNEL.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="OPENCHANNELACCOUNTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllOpenchannelAccounts()" translate="OPENCHANNEL.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectOpenchannelAccounts()" translate="OPENCHANNEL.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedOpenchannelAccounts" csv-label="true" filename="openchannelAccounts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedOpenchannelAccounts($event)" aria-label="delete selected" translate translate-attr-label="OPENCHANNELACCOUNTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- OPENCHANNELACCOUNT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedOpenchannelAccounts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getOpenchannelAccounts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'OPENCHANNEL.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'OPENCHANNEL.NAME\' | translate }}</th>\n                                <th md-column md-order-by="key">{{ \'OPENCHANNEL.KEY\' | translate }}</th>\n                                <th md-column md-order-by="replyUri">{{ \'OPENCHANNEL.REPLYURI\' | translate }}</th>\n                                <th md-column md-order-by="ListId">{{ \'OPENCHANNEL.LIST\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'OPENCHANNEL.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.openchannelAccounts.rows.length">\n                                <td md-cell colspan="7">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="OPENCHANNEL.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="openchannelAccount" md-select-id="id" ng-repeat="openchannelAccount in vm.openchannelAccounts.rows">\n                                <td md-cell ng-if="openchannelAccount.userpic"><img class="avatar" alt="{{openchannelAccount.name}}" ng-src="api/users/{{openchannelAccount.id}}/avatar" /></td>\n                                <td md-cell ng-if="!openchannelAccount.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{openchannelAccount.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditOpenchannelAccount($event, openchannelAccount)" md-cell class="id ">{{openchannelAccount.id}}</td>\n                                <td ng-click="vm.createOrEditOpenchannelAccount($event, openchannelAccount)" md-cell class="name ">{{openchannelAccount.name}}</td>\n                                <td ng-click="vm.createOrEditOpenchannelAccount($event, openchannelAccount)" md-cell class="key ">{{openchannelAccount.key}}</td>\n                                <td ng-click="vm.createOrEditOpenchannelAccount($event, openchannelAccount)" md-cell class="replyUri ">{{openchannelAccount.replyUri}}</td>\n                                <td ng-click="vm.createOrEditOpenchannelAccount($event, openchannelAccount)" md-cell class="ListId ">{{ ListId = vm.lists[openchannelAccount.ListId]; ListId.name }}</td>\n                                <td ng-click="vm.createOrEditOpenchannelAccount($event, openchannelAccount)" md-cell class="description ">{{openchannelAccount.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="OPENCHANNEL.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(openchannelAccount, $event)" translate="OPENCHANNEL.EDIT_OPENCHANNELACCOUNT">\n                                                    Edit OpenchannelAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.interactionsgoto(openchannelAccount, $event)" translate="OPENCHANNEL.INTERACTIONS_OPENCHANNELACCOUNT">\n                                                    Interactions OpenchannelAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(openchannelAccount, $event)" translate="OPENCHANNEL.DELETE_OPENCHANNELACCOUNT">\n                                                    Delete OpenchannelAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'OPENCHANNEL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'OPENCHANNEL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'OPENCHANNEL.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.openchannelAccounts.count}}" md-on-paginate="vm.getOpenchannelAccounts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / OPENCHANNELACCOUNT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD OPENCHANNELACCOUNT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-openchannelAccount-button" ng-click="vm.createOrEditOpenchannelAccount($event)" aria-label="add openchannelAccount" translate translate-attr-aria-label="OPENCHANNEL.ADD_OPENCHANNELACCOUNT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD OPENCHANNELACCOUNT BUTTON --\x3e\n</div>'),e.put("app/main/apps/openchannel/views/openchannelQueues/create/dialog.html",'<md-dialog class="openchannelQueue-dialog" aria-label="New OpenchannelQueue">\n    <form name="openchannelQueueForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.openchannelQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newOpenchannelQueue">\n                <div class="hint"><span translate="OPENCHANNEL.HELP.NAME"></span></div>\n                <div ng-messages="openchannelQueueForm[\'name\'].$error" ng-show="openchannelQueueForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="OPENCHANNEL.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.STRATEGY">Strategy</label>\n                <md-select name="strategy" ng-model="vm.openchannelQueue.strategy" required>\n                    <md-option ng-value="\'beepall\'">Beepall</md-option>\n                    <md-option ng-value="\'rrmemory\'">RR Memory</md-option>\n                </md-select>\n                <div ng-messages="openchannelQueueForm[\'strategy\'].$error" ng-show="openchannelQueueForm[\'strategy\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.AGENT_TIMEOUT">Agent_Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.openchannelQueue.timeout" min="1" max="2147483" ng-required="true">\n                <div ng-messages="openchannelQueueForm[\'timeout\'].$error" ng-show="openchannelQueueForm[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.AGENT_TIMEOUT_REQUIRED">Agent_Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="OPENCHANNEL.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="OPENCHANNEL.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="OPENCHANNEL.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.openchannelQueue.description">\n                <div ng-messages="openchannelQueueForm[\'description\'].$error" ng-show="openchannelQueueForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="OPENCHANNEL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newOpenchannelQueue" ng-click="vm.saveOpenchannelQueue()" class="send-button md-accent md-raised" ng-disabled="openchannelQueueForm.$invalid || openchannelQueueForm.$pristine" aria-label="SAVE" translate="OPENCHANNEL.SAVE"\n                    translate-attr-aria-label="OPENCHANNEL.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newOpenchannelQueue" ng-click="vm.addNewOpenchannelQueue()" class="send-button md-accent md-raised" ng-disabled="openchannelQueueForm.$invalid" aria-label="ADD" translate="OPENCHANNEL.ADD_OPENCHANNELQUEUE" translate-attr-aria-label="OPENCHANNEL.ADD_OPENCHANNELQUEUE">\n                    ADD OPENCHANNELQUEUE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newOpenchannelQueue" ng-click="vm.deleteOpenchannelQueue($event)" aria-label="DELETE" translate translate-attr-aria-label="OPENCHANNEL.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="OPENCHANNEL.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelQueues/edit/agentadd/agentadd.html",'<md-dialog class="openchannelQueue-dialog" aria-label="openchannelQueue">\n    <form name="openchannelQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="OPENCHANNEL.AGENTADD_OPENCHANNELQUEUE">Add Agent to openchannelQueue</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelQueues/edit/teamadd/teamadd.html",'<md-dialog class="openchannelQueue-dialog" aria-label="openchannelQueue">\n    <form name="openchannelQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="OPENCHANNEL.TEAMADD_OPENCHANNELQUEUE">Add Team in OPENCHANNELQUEUE</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/openchannel/views/openchannelQueues/edit/view.html",'<div id="openchannel-openchannelQueue" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-openchannelQueues-button md-icon-button" aria-label="Go to openchannelQueues" ng-click="vm.gotoOpenchannelQueues()" translate translate-attr-aria-label="OPENCHANNEL.GO_TO_OPENCHANNELQUEUES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="openchannelQueue-image" hide-xs>\n                    <img ng-src="assets/images/business/openchannelQueues.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.openchannelQueue.id}}\n                        <span ng-if="vm.openchannelQueue.name">{{vm.openchannelQueue.name}}</span>\n                        <span ng-if="vm.openchannelQueue.exten">{{vm.openchannelQueue.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="OPENCHANNEL.CREATED_AT"></span> <span>{{vm.openchannelQueue.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.teamadddialog(vm.openchannelQueue, $event)" class="md-fab md-orange-500-bg md-icon-button" aria-label="teamadd">\n                <md-tooltip><span translate="OPENCHANNEL.TEAMADD_OPENCHANNELQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-multiple-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.agentadddialog(vm.openchannelQueue, $event)" class="md-fab md-purple-500-bg md-icon-button" aria-label="agentadd">\n                <md-tooltip><span translate="OPENCHANNEL.AGENTADD_OPENCHANNELQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-plus"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveOpenchannelQueue()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid)" translate="OPENCHANNEL.SAVE" translate-attr-aria-label="OPENCHANNEL.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="OPENCHANNEL.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="openchannelQueue-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="OPENCHANNEL.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.openchannelQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="OPENCHANNEL.HELP.NAME"></span></div>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="OPENCHANNEL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="OPENCHANNEL.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.STRATEGY">Strategy</label>\n                                <md-select name="strategy" ng-model="vm.openchannelQueue.strategy" required>\n                                    <md-option ng-value="\'beepall\'">Beepall</md-option>\n                                    <md-option ng-value="\'rrmemory\'">RR Memory</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'strategy\'].$error" ng-show="generalForm[\'strategy\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="OPENCHANNEL.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.AGENT_TIMEOUT">Agent_Timeout</label>\n                                <input type="number" name="timeout" ng-model="vm.openchannelQueue.timeout" min="1" max="2147483" ng-required="true">\n                                <div ng-messages="generalForm[\'timeout\'].$error" ng-show="generalForm[\'timeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="OPENCHANNEL.ERRORS.AGENT_TIMEOUT_REQUIRED">Agent_Timeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="OPENCHANNEL.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="OPENCHANNEL.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="OPENCHANNEL.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.openchannelQueue.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="OPENCHANNEL.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/openchannel/views/openchannelQueues/openchannelQueues.html",'<div id="openchannelQueues" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-google-earth" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="OPENCHANNEL.OPENCHANNELQUEUES">OpenchannelQueues</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="OPENCHANNEL.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedOpenchannelQueues.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedOpenchannelQueues =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="OPENCHANNEL.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-openchannelQueues-count">\n                    <span>{{vm.selectedOpenchannelQueues.length}}</span>\n                <span translate="OPENCHANNEL.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="OPENCHANNELQUEUES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllOpenchannelQueues()" translate="OPENCHANNEL.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectOpenchannelQueues()" translate="OPENCHANNEL.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedOpenchannelQueues" csv-label="true" filename="openchannelQueues.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedOpenchannelQueues($event)" aria-label="delete selected" translate translate-attr-label="OPENCHANNELQUEUES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- OPENCHANNELQUEUE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedOpenchannelQueues" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getOpenchannelQueues">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'OPENCHANNEL.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'OPENCHANNEL.NAME\' | translate }}</th>\n                                <th md-column md-order-by="strategy">{{ \'OPENCHANNEL.STRATEGY\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.openchannelQueues.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="OPENCHANNEL.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="openchannelQueue" md-select-id="id" ng-repeat="openchannelQueue in vm.openchannelQueues.rows">\n                                <td md-cell ng-if="openchannelQueue.userpic"><img class="avatar" alt="{{openchannelQueue.name}}" ng-src="api/users/{{openchannelQueue.id}}/avatar" /></td>\n                                <td md-cell ng-if="!openchannelQueue.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{openchannelQueue.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditOpenchannelQueue($event, openchannelQueue)" md-cell class="id ">{{openchannelQueue.id}}</td>\n                                <td ng-click="vm.createOrEditOpenchannelQueue($event, openchannelQueue)" md-cell class="name ">{{openchannelQueue.name}}</td>\n                                <td ng-click="vm.createOrEditOpenchannelQueue($event, openchannelQueue)" md-cell class="strategy ">{{ vm.arraystrategy[openchannelQueue.strategy].option }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="OPENCHANNEL.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(openchannelQueue, $event)" translate="OPENCHANNEL.EDIT_OPENCHANNELQUEUE">\n                                                    Edit OpenchannelQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.teamadddialog(openchannelQueue, $event)" translate="OPENCHANNEL.TEAMADD_OPENCHANNELQUEUE">\n                                                    teamadd OpenchannelQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.agentadddialog(openchannelQueue, $event)" translate="OPENCHANNEL.AGENTADD_OPENCHANNELQUEUE">\n                                                    agentadd OpenchannelQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(openchannelQueue, $event)" translate="OPENCHANNEL.DELETE_OPENCHANNELQUEUE">\n                                                    Delete OpenchannelQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(openchannelQueue, $event)" translate="OPENCHANNEL.GOTOREALTIME_OPENCHANNELQUEUE">\n                                                    goToRealtime OpenchannelQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'OPENCHANNEL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'OPENCHANNEL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'OPENCHANNEL.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.openchannelQueues.count}}" md-on-paginate="vm.getOpenchannelQueues" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / OPENCHANNELQUEUE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD OPENCHANNELQUEUE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-openchannelQueue-button" ng-click="vm.createOrEditOpenchannelQueue($event)" aria-label="add openchannelQueue" translate translate-attr-aria-label="OPENCHANNEL.ADD_OPENCHANNELQUEUE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD OPENCHANNELQUEUE BUTTON --\x3e\n</div>'),e.put("app/main/apps/openchannel/views/realtime/agents/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="OPENCHANNEL.AGENTS">Agents</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query; vm.onInit()" on-collapse="vm.query.filter = undefined; vm.onInit()" debounce="300"></ms-search-bar>\n        \x3c!-- <md-button class="md-icon-button" ng-click="vm.showInfo($event)">\n      <i class="icon-information-outline grey-600-fg">\n        <md-tooltip>{{\'VOICE.INFO\' | translate}}</md-tooltip>\n      </i>\n    </md-button> --\x3e\n        <md-select ng-model="vm.query.globalStatusFilter" class="md-caption" ng-change="vm.query.pauseTypeFilter = \'\'; vm.onInit()">\n            <md-option ng-value="\'\'">{{ \'OPENCHANNEL.ALL\' | translate }}</md-option>\n            <md-option value="pause">{{ \'OPENCHANNEL.PAUSE\' | translate }}</md-option>\n            <md-option value="*pause">{{ \'OPENCHANNEL.PARTIALPAUSE\' | translate }}</md-option>\n            <md-option value="busy">{{ \'OPENCHANNEL.BUSY\' | translate }}</md-option>\n            <md-option value="idle">{{ \'OPENCHANNEL.IDLE\' | translate }}</md-option>\n        </md-select>\n\n        <md-select ng-if="vm.isPause(vm.query.globalStatusFilter)" ng-model="vm.query.pauseTypeFilter" class="md-caption" ng-change="vm.onInit()">\n            <md-option ng-value="\'\'">All</md-option>\n            <md-option value="DEFAULT PAUSE">DEFAULT PAUSE</md-option>\n            <md-option value="ACW">ACW</md-option>\n            <md-option value="LOGININPAUSE">LOGININPAUSE</md-option>\n            <md-option value="Auto-Pause">AUTOPAUSE</md-option>\n            <md-option ng-value="pause.name" ng-repeat="pause in vm.pauses.rows">{{pause.name}}</md-option>\n        </md-select>\n    </div>\n</md-toolbar>\n\n\x3c!-- AGENT TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.order" md-on-reorder="vm.onInit">\n            <tr md-row border="1">\n                <th class="bv text-center" colspan="3">{{ \'OPENCHANNEL.AGENT\' | translate }}</th>\n                <th class="bv bl text-center" colspan="2">{{ \'VOICE.VOICE\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="bv bl text-center" colspan="2">{{ \'CHAT.CHAT\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="bv bl text-center" colspan="2">{{ \'MAIL.MAIL\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="bv bl text-center" colspan="2">{{ \'SMS.SMS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="bv bl text-center" colspan="2">{{ \'OPENCHANNEL.OPENCHANNEL\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="bv bl text-center" colspan="2">{{ \'FAX.FAX\' | translate }}</th>\n                <th width="10px" class="bt bl" rowspan="2"></th>\n                \x3c!-- <th md-column>{{ \'VOICE.PHONE_STATE\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PHONE_STATUS\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PAUSE\' | translate }}</th>\n                <th md-column width="10px"></th> --\x3e\n            </tr>\n            <tr md-row>\n                <th class="bl" md-column md-order-by="fullname">{{ \'OPENCHANNEL.NAME\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatus">{{ \'OPENCHANNEL.STATUS\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatusTime">{{ \'OPENCHANNEL.TIMER\' | translate }}</th>\n\n                <th class="bl custom-column">{{ \'VOICE.STATUS\' | translate }}</th>\n                <th class="bl custom-column">Info</th>\n\n                <th ng-if="vm.license.chat" class="bl text-center">{{ \'CHAT.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'CHAT.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.mail" class="bl text-center">{{ \'MAIL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'MAIL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.messaging" class="bl text-center">{{ \'SMS.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'SMS.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.openchannel" class="bl text-center">{{ \'OPENCHANNEL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'OPENCHANNEL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.fax" class="bl text-center">{{ \'FAX.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'FAX.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.order.length">\n                <td md-cell colspan="17">\n                    <div layout="row" layout-align="center center">\n                        <span>{{ \'OPENCHANNEL.NO_AGENT_ONLINE\' | translate }}</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-select="vm.agents[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td class="bt padding-5">\n                    <div layout="row" layout-align="start center">\n                        <img class="avatar" ng-src="{{vm.agents[value].userpic && \'api/users/\'+vm.agents[value].id+\'/avatar\' || \'assets/images/avatars/profile.png\'}}">\n                        <div layout="column">\n                            <span>{{vm.agents[value].fullname}}</span>\n                            <span>{{vm.agents[value].internal}}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt">\n                    <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'busy\':\'indigo-100-bg\',\'*pause\':\'amber-50-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].globalStatus]">{{ vm.isPause(vm.agents[value].globalStatus) ? \'\' : vm.agents[value].globalStatus | uppercase }} {{ vm.isPause(vm.agents[value].globalStatus) ? (vm.isPartialPause(vm.agents[value].globalStatus) ? \'*\'+vm.agents[value].pauseType || \'DEFAULT PAUSE\'  : vm.agents[value].pauseType || \'DEFAULT PAUSE\') : \'\'}}</span>\n                </td>\n                <td class="bt custom-column">\n                    <timer start-time="vm.agents[value].globalStatusTime" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                </td>\n                <td class="bt bl">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'talking\':\'indigo-100-bg\',\'ringing\':\'orange-400-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].voiceStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt bl">\n                    <div layout="column">\n                        <span ng-if="vm.agents[value].queue" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].queue }}</span>\n                        <span ng-if="vm.agents[value].destconnectedlinenum" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].destconnectedlinenum }}</span>\n                        <span class="padding-5" ng-if="vm.agents[value].queue || vm.agents[value].destconnectedlinenum">\n                            <timer start-time="vm.agents[value].voiceStatusTime" interval="1000" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                        </span>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt">--</td>\n                <td class="bt">--</td> --\x3e\n                <td class="bt bl" ng-if="vm.license.chat">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt padding-5 text-center">{{ agent.chatCurrentCapacity }}/{{ agent.chatCapacity > 0 ? agent.chatCapacity : \'∞\' }}</td> --\x3e\n                <td md-number class="bt text-center font-size-20" ng-if="vm.license.chat" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.mail">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.mail" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.messaging">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.messaging" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.openchannel">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">4</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">89</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.openchannel" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.fax">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">7</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">2</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.fax" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxCurrentCapacity }}</td>\n                <td class="bl bt padding-5 text-center">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="4">\n                            <md-menu-item>\n                                <md-button ng-click="vm.logout(vm.agents[value], $event)" translate="OPENCHANNEL.LOGOUT">\n                                    Logout\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.queueAdd(vm.agents[value], $event)" translate="OPENCHANNEL.AGENTADD_QUEUE">\n                                    Add Agent In Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="OPENCHANNEL.PAUSE">Pause</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item>\n                                            <md-button ng-disabled=" vm.agents[value].voicePause && \'DEFAULT PAUSE\' === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value])"><em translate="OPENCHANNEL.DEFAULT_PAUSE">Default Pause</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.pauses.rows.length" ng-repeat="pause in vm.pauses.rows">\n                                            <md-button ng-disabled="vm.agents[value].voicePause && pause.name === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value], pause.name)">{{pause.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                            <md-menu-item ng-if="vm.isPause(vm.agents[value].globalStatus)">\n                                <md-button ng-click="vm.unPause(vm.agents[value])" translate="OPENCHANNEL.UNPAUSE">\n                                    Unpause\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'OPENCHANNEL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'OPENCHANNEL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'OPENCHANNEL.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.filteredAgents.length}}" md-on-paginate="vm.onInit" md-page-select></md-table-pagination>\n\x3c!-- / AGENT TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/openchannel/views/realtime/queues/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="OPENCHANNEL.QUEUES">Queues</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUE TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getQueues">\n            <tr md-row>\n                <th md-column md-order-by="name">{{ \'OPENCHANNEL.NAME\' | translate }}</th>\n                <th md-column>{{ \'OPENCHANNEL.LOGGED_IN\' | translate }}</th>\n                <th md-column>{{ \'OPENCHANNEL.PAUSED\' | translate }}</th>\n                <th md-column>{{ \'OPENCHANNEL.READY\' | translate }}</th>\n                <th md-column>{{ \'OPENCHANNEL.WAITING\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.queues">\n                <td md-cell colspan="7">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="OPENCHANNEL.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row md-select="vm.queues[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td md-cell>{{vm.queues[value].name}}</td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].loggedInDb || 0}} ({{vm.queues[value].loggedIn || 0}})</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].paused || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].available || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].waiting || 0}}</span>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="OPENCHANNEL.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="3">\n                            <md-menu-item>\n                                <md-button ng-click="vm.createOrEditOpenchannelQueue($event, vm.queues[value])" translate="OPENCHANNEL.EDIT_QUEUE">\n                                    Edit Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.agentAdd($event, vm.queues[value])" translate="OPENCHANNEL.AGENTSADD_QUEUE">\n                                    Add Agents to queue\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'OPENCHANNEL.PAGE\' | translate}}:\', rowsPerPage: \'{{\'OPENCHANNEL.ROWSPERPAGE\' | translate}}:\', of: \'{{\'OPENCHANNEL.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.count}}" md-on-paginate="vm.getQueues" md-page-select></md-table-pagination>\n\x3c!-- / QUEUE TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/openchannel/views/realtime/realtime.html",'<div id="realtime" class="page-layout simple tabbed" layout="column" ng-cloak>\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="OPENCHANNEL.AGENTS">Agents</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="OPENCHANNEL.QUEUES">Queues</span>\n                </md-tab-label>\n            </md-tab>\n        </md-tabs>\n\n        <md-card ui-view></md-card>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n</div>'),e.put("app/main/apps/settings/views/customizations/create/dialog.html",'<md-dialog class="customization-dialog" aria-label="New Customization">\n    <form name="customizationForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.customization.defaultLogo" aria-label="Default_Logo"><span translate="SETTINGS.DEFAULT_LOGO">Default_Logo</span></md-switch>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.customization.defaultLoginLogo" aria-label="Default_Login_Logo"><span translate="SETTINGS.DEFAULT_LOGIN_LOGO">Default_Login_Logo</span></md-switch>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.customization.defaultHeaderWhiteLabel" aria-label="Default_Header_WhiteLabel"><span translate="SETTINGS.DEFAULT_HEADER_WHITELABEL">Default_Header_WhiteLabel</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="!vm.customization.defaultHeaderWhiteLabel" class="md-block">\n                <label translate="SETTINGS.HEADER_WHITELABEL">Header_WhiteLabel</label>\n                <input type="text" name="headerWhiteLabel" ng-model="vm.customization.headerWhiteLabel" ng-required="true">\n                <div ng-messages="customizationForm[\'headerWhiteLabel\'].$error" ng-show="customizationForm[\'headerWhiteLabel\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.HEADER_WHITELABEL_REQUIRED">Header_WhiteLabel field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.customization.defaultPageTitle" aria-label="Default_Page_Title"><span translate="SETTINGS.DEFAULT_PAGE_TITLE">Default_Page_Title</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="!vm.customization.defaultPageTitle" class="md-block">\n                <label translate="SETTINGS.PAGE_TITLE">Page_Title</label>\n                <input type="text" name="pageTitle" ng-model="vm.customization.pageTitle" ng-required="true">\n                <div ng-messages="customizationForm[\'pageTitle\'].$error" ng-show="customizationForm[\'pageTitle\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.PAGE_TITLE_REQUIRED">Page_Title field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newCustomization" ng-click="vm.saveCustomization()" class="send-button md-accent md-raised" ng-disabled="customizationForm.$invalid || customizationForm.$pristine" aria-label="SAVE" translate="SETTINGS.SAVE" translate-attr-aria-label="SETTINGS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newCustomization" ng-click="vm.addNewCustomization()" class="send-button md-accent md-raised" ng-disabled="customizationForm.$invalid" aria-label="ADD" translate="SETTINGS.ADD_CUSTOMIZATION" translate-attr-aria-label="SETTINGS.ADD_CUSTOMIZATION">\n                    ADD CUSTOMIZATION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newCustomization" ng-click="vm.deleteCustomization($event)" aria-label="DELETE" translate translate-attr-aria-label="SETTINGS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="SETTINGS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/settings/views/customizations/customizations.html",'<div id="customizations" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-cog" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="SETTINGS.CUSTOMIZATIONS">Customizations</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveCustomization()" ng-disabled="customizationForm.$pristine || customizationForm.$invalid" class="send-button md-accent md-raised" translate="SETTINGS.SAVE" translate-attr-aria-label="SETTINGS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            <div class="customization-detail-form-container customizations md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="SETTINGS.CUSTOMIZATIONS">CUSTOMIZATIONS</div>\n                </div>\n                <form name="customizationForm" novalidate>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.customization.defaultLogo" aria-label="Default_Logo"><span translate="SETTINGS.DEFAULT_LOGO">Default_Logo</span></md-switch>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.customization.defaultLoginLogo" aria-label="Default_Login_Logo"><span translate="SETTINGS.DEFAULT_LOGIN_LOGO">Default_Login_Logo</span></md-switch>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.customization.defaultHeaderWhiteLabel" aria-label="Default_Header_WhiteLabel"><span translate="SETTINGS.DEFAULT_HEADER_WHITELABEL">Default_Header_WhiteLabel</span></md-switch>\n                    </md-input-container>\n                    <md-input-container ng-if="!vm.customization.defaultHeaderWhiteLabel" class="md-block">\n                        <label translate="SETTINGS.HEADER_WHITELABEL">Header_WhiteLabel</label>\n                        <input type="text" name="headerWhiteLabel" ng-model="vm.customization.headerWhiteLabel" ng-required="true">\n                        <div ng-messages="customizationForm[\'headerWhiteLabel\'].$error" ng-show="customizationForm[\'headerWhiteLabel\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.HEADER_WHITELABEL_REQUIRED">Header_WhiteLabel field is required</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.customization.defaultPageTitle" aria-label="Default_Page_Title"><span translate="SETTINGS.DEFAULT_PAGE_TITLE">Default_Page_Title</span></md-switch>\n                    </md-input-container>\n                    <md-input-container ng-if="!vm.customization.defaultPageTitle" class="md-block">\n                        <label translate="SETTINGS.PAGE_TITLE">Page_Title</label>\n                        <input type="text" name="pageTitle" ng-model="vm.customization.pageTitle" ng-required="true">\n                        <div ng-messages="customizationForm[\'pageTitle\'].$error" ng-show="customizationForm[\'pageTitle\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.PAGE_TITLE_REQUIRED">Page_Title field is required</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n\n                </form>\n            </div>\n\n            <div ng-if="!vm.customization.defaultLogo" class="customization-detail-form-container logo md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="SETTINGS.LOGO">LOGO</div>\n                </div>\n                <div ng-controller="CustomizationlogoController as vm_cl" ng-init="vm_cl.init(vm.customization)" class="customization-detail-form-container md-background-bg md-whiteframe-1dp">\n\n                    <div id="customization-image-uploader" flow-init="vm_cl.ngFlowOptions" flow-name="vm_cl.ngFlow.flow" flow-files-submitted="vm_cl.upload()" flow-file-added="vm_cl.fileAdded($file)" flow-file-success="vm_cl.fileSuccess($file, $message)" flow-complete="vm_cl.uploadComplete()"\n                        flow-drop flow-drag-enter="vm_cl.dropping=true" flow-drag-leave="vm_cl.dropping=false" ng-class="{\'dropping\':vm.dropping}">\n\n                        <div class="drop-text hint-text" layout="row" layout-align="center center">\n                            <span translate="EC.DROP_TO_UPLOAD">Drop to upload</span>\n                        </div>\n\n                        <div class="upload-button" layout="column" layout-align="center center">\n                            <md-button class="md-accent md-raised" flow-btn>\n                                Upload\n                            </md-button>\n                            <span class="secondary-text mt-8">You can also drop images here to upload. Only PNG, JPG - Max. 8MB</span>\n                        </div>\n\n                        <div layout="row" layout-align="start start" layout-wrap>\n                            <div ng-repeat="logoimage in vm_cl.customization.images" ng-switch="logoimage.type">\n                                <div class="customization-image uploading" ng-switch-when="uploading" layout="row" layout-align="center center">\n                                    <div class="overlay" layout="column" layout-align="center center">\n                                        <md-progress-linear md-mode="determinate" value="{{logoimage.file.progress() * 100}}">\n                                        </md-progress-linear>\n                                    </div>\n                                    <img class="media" flow-img="logoimage.file">\n                                </div>\n\n                                <div class="customization-image" ng-switch-when="image" layout="row" layout-align="center center">\n                                    <img class="media" ng-src="{{logoimage.url}}">\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n\n            </div>\n\n            <div ng-if="!vm.customization.defaultLoginLogo" class="customization-detail-form-container logologin md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="SETTINGS.LOGOLOGIN">LOGOLOGIN</div>\n                </div>\n                <div ng-controller="CustomizationlogologinController as vm_cll" ng-init="vm_cll.init(vm.customization)" class="customization-detail-form-container md-background-bg md-whiteframe-1dp">\n\n                    <div id="customization-image-uploader" flow-init="vm_cll.ngFlowOptions" flow-name="vm_cll.ngFlow.flow" flow-files-submitted="vm_cll.upload()" flow-file-added="vm_cll.fileAdded($file)" flow-file-success="vm_cll.fileSuccess($file, $message)" flow-complete="vm_cll.uploadComplete()"\n                        flow-drop flow-drag-enter="vm_cll.dropping=true" flow-drag-leave="vm_cll.dropping=false" ng-class="{\'dropping\':vm.dropping}">\n\n                        <div class="drop-text hint-text" layout="row" layout-align="center center">\n                            <span translate="EC.DROP_TO_UPLOAD">Drop to upload</span>\n                        </div>\n\n                        <div class="upload-button" layout="column" layout-align="center center">\n                            <md-button class="md-accent md-raised" flow-btn>\n                                Upload\n                            </md-button>\n                            <span class="secondary-text mt-8">You can also drop images here to upload. Only PNG, JPG - Max. 8MB</span>\n                        </div>\n\n                        <div layout="row" layout-align="start start" layout-wrap>\n                            <div ng-repeat="logologinimage in vm_cll.customization.images" ng-switch="logologinimage.type">\n                                <div class="customization-image uploading" ng-switch-when="uploading" layout="row" layout-align="center center">\n                                    <div class="overlay" layout="column" layout-align="center center">\n                                        <md-progress-linear md-mode="determinate" value="{{logologinimage.file.progress() * 100}}">\n                                        </md-progress-linear>\n                                    </div>\n                                    <img class="media" flow-img="logologinimage.file">\n                                </div>\n\n                                <div class="customization-image" ng-switch-when="image" layout="row" layout-align="center center">\n                                    <img class="media" ng-src="{{logologinimage.url}}">\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n\n            </div>\n\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n</div>'),e.put("app/main/apps/settings/views/generals/create/dialog.html",'<md-dialog class="general-dialog" aria-label="New General">\n    <form name="generalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.MIN_INTERNAL">Min_Internal</label>\n                <input type="number" name="min_internal" ng-model="vm.general.min_internal" min="0" ng-required="true" autofocus>\n                <div ng-messages="generalForm[\'min_internal\'].$error" ng-show="generalForm[\'min_internal\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.MIN_INTERNAL_REQUIRED">Min_Internal field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="SETTINGS.ERRORS.MIN_INTERNAL_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Min_Internal must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.general.securePassword" aria-label="Security_Suite"><span translate="SETTINGS.SECURITY_SUITE">Security_Suite</span></md-switch>\n                <div class="hint"><span translate="SETTINGS.HELP.SECURITY_SUITE"></span></div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.general.callRecordingEncryption" aria-label="Call_Recording_Encryption"><span translate="SETTINGS.CALL_RECORDING_ENCRYPTION">Call_Recording_Encryption</span></md-switch>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.STUNADDR">Stunaddr</label>\n                <input type="text" name="stunaddr" ng-model="vm.general.stunaddr">\n                <div ng-messages="generalForm[\'stunaddr\'].$error" ng-show="generalForm[\'stunaddr\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.STUNADDR_REQUIRED">Stunaddr field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.TURNADDR">Turnaddr</label>\n                <input type="text" name="turnaddr" ng-model="vm.general.turnaddr">\n                <div ng-messages="generalForm[\'turnaddr\'].$error" ng-show="generalForm[\'turnaddr\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.TURNADDR_REQUIRED">Turnaddr field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.TURN_USERNAME">Turn_Username</label>\n                <input type="text" name="turnusername" ng-model="vm.general.turnusername">\n                <div ng-messages="generalForm[\'turnusername\'].$error" ng-show="generalForm[\'turnusername\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.TURN_USERNAME_REQUIRED">Turn_Username field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.TURN_PASSWORD">Turn_Password</label>\n                <input type="text" name="turnpassword" ng-model="vm.general.turnpassword">\n                <div ng-messages="generalForm[\'turnpassword\'].$error" ng-show="generalForm[\'turnpassword\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.TURN_PASSWORD_REQUIRED">Turn_Password field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newGeneral" ng-click="vm.saveGeneral()" class="send-button md-accent md-raised" ng-disabled="generalForm.$invalid || generalForm.$pristine" aria-label="SAVE" translate="SETTINGS.SAVE" translate-attr-aria-label="SETTINGS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newGeneral" ng-click="vm.addNewGeneral()" class="send-button md-accent md-raised" ng-disabled="generalForm.$invalid" aria-label="ADD" translate="SETTINGS.ADD_GENERAL" translate-attr-aria-label="SETTINGS.ADD_GENERAL">\n                    ADD GENERAL\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newGeneral" ng-click="vm.deleteGeneral($event)" aria-label="DELETE" translate translate-attr-aria-label="SETTINGS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="SETTINGS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/settings/views/generals/generals.html",'<div id="generals" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-cog" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="SETTINGS.GENERAL">General</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveGeneral()" ng-disabled="generalForm.$pristine || generalForm.$invalid" class="send-button md-accent md-raised" translate="SETTINGS.SAVE" translate-attr-aria-label="SETTINGS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            <div class="general-detail-form-container global md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="SETTINGS.GLOBAL">GLOBAL</div>\n                </div>\n                <form name="generalForm" novalidate>\n                    <md-input-container class="md-block">\n                        <label translate="SETTINGS.MIN_INTERNAL">Min_Internal</label>\n                        <input type="number" name="min_internal" ng-model="vm.general.min_internal" min="0" ng-required="true" autofocus>\n                        <div ng-messages="generalForm[\'min_internal\'].$error" ng-show="generalForm[\'min_internal\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.MIN_INTERNAL_REQUIRED">Min_Internal field is required</span>\n                            </div>\n                            <div ng-message="min">\n                                <span translate="SETTINGS.ERRORS.MIN_INTERNAL_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Min_Internal must be a valid greater or equal than</span> <span>0</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.general.securePassword" aria-label="Security_Suite"><span translate="SETTINGS.SECURITY_SUITE">Security_Suite</span></md-switch>\n                        <div class="hint"><span translate="SETTINGS.HELP.SECURITY_SUITE"></span></div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.general.callRecordingEncryption" aria-label="Call_Recording_Encryption"><span translate="SETTINGS.CALL_RECORDING_ENCRYPTION">Call_Recording_Encryption</span></md-switch>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="SETTINGS.STUNADDR">Stunaddr</label>\n                        <input type="text" name="stunaddr" ng-model="vm.general.stunaddr">\n                        <div ng-messages="generalForm[\'stunaddr\'].$error" ng-show="generalForm[\'stunaddr\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.STUNADDR_REQUIRED">Stunaddr field is required</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="SETTINGS.TURNADDR">Turnaddr</label>\n                        <input type="text" name="turnaddr" ng-model="vm.general.turnaddr">\n                        <div ng-messages="generalForm[\'turnaddr\'].$error" ng-show="generalForm[\'turnaddr\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.TURNADDR_REQUIRED">Turnaddr field is required</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="SETTINGS.TURN_USERNAME">Turn_Username</label>\n                        <input type="text" name="turnusername" ng-model="vm.general.turnusername">\n                        <div ng-messages="generalForm[\'turnusername\'].$error" ng-show="generalForm[\'turnusername\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.TURN_USERNAME_REQUIRED">Turn_Username field is required</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="SETTINGS.TURN_PASSWORD">Turn_Password</label>\n                        <input type="text" name="turnpassword" ng-model="vm.general.turnpassword">\n                        <div ng-messages="generalForm[\'turnpassword\'].$error" ng-show="generalForm[\'turnpassword\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.TURN_PASSWORD_REQUIRED">Turn_Password field is required</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n\n                </form>\n            </div>\n\n            <div class="general-detail-form-container motionbar md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="SETTINGS.MOTIONBAR">MOTIONBAR</div>\n                </div>\n                <form name="generalForm" novalidate>\n                    <md-input-container class="md-block">\n                        <md-switch ng-model="vm.general.phoneBarAutoUpdater" aria-label="MotionbarAutoUpdater"><span translate="SETTINGS.MOTIONBARAUTOUPDATER">MotionbarAutoUpdater</span></md-switch>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.general.phoneBarAutoUpdater" class="md-block">\n                        <label translate="SETTINGS.MOTIONBARAUTOUPDATERURL">MotionbarAutoUpdaterUrl</label>\n                        <input type="url" name="phoneBarAutoUpdaterUrl" ng-model="vm.general.phoneBarAutoUpdaterUrl" ng-required="vm.general.phoneBarAutoUpdater">\n                        <div ng-messages="generalForm[\'phoneBarAutoUpdaterUrl\'].$error" ng-show="generalForm[\'phoneBarAutoUpdaterUrl\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.MOTIONBARAUTOUPDATERURL_REQUIRED">MotionbarAutoUpdaterUrl field is required</span>\n                            </div>\n                            <div ng-message="url">\n                                <span translate="SETTINGS.ERRORS.MOTIONBARAUTOUPDATERURL_MUST_VALID_URL">MotionbarAutoUpdaterUrl must be a valid url http://www.xcally.com</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n\n                </form>\n            </div>\n\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n</div>'),e.put("app/main/apps/settings/views/license/license.html",'<div id="license" class="page-layout simple fullwidth doc-page">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-cog" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="SETTINGS.LICENSE">LICENSE</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n        <div>\n            <md-button type="submit" ng-click="vm.requestLicense()" class="send-button md-raised" translate="SETTINGS.REQUEST_LICENSE" translate-attr-aria-label="SETTINGS.REQUEST_LICENSE">\n                REQUEST LICENSE\n            </md-button>\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n            \x3c!-- LICENSE CARD --\x3e\n            <div layout="row" flex>\n                <md-card class="md-whiteframe-1dp padding-20" flex>\n                    <div layout="row" layout-align="center">\n                        <div flex layout="row" layout-align="start center">\n                            <div ng-if="!vm.license.custom">\n                                <a href="https://www.xcallymotion.com/prices" target="_blank" class="md-button md-fab green-A700-bg" aria-label="Eat cake">\n                                    <md-tooltip><span translate="SETTINGS.PRICES">Prices</span></md-tooltip>\n                                    <md-icon md-font-icon="icon-coin"></md-icon>\n                                </a>\n                            </div>\n                        </div>\n                        <div flex>\n                            <div ng-switch="vm.license.months" class="text-center">\n                                <span ng-switch-when="1" class="md-title md-accent-fg text-bold">{{ \'SETTINGS.PLAN\' | translate }}: <span translate="SETTINGS.MONTH_TO_MONTH">MONTH TO MONTH</span></span>\n                                <span ng-switch-when="12" class="md-title md-accent-fg text-bold">{{ \'SETTINGS.PLAN\' | translate }}: <span translate="SETTINGS.ANNUALLY">ANNUALLY</span></span>\n                                <span ng-switch-when="36" class="md-title md-accent-fg text-bold">{{ \'SETTINGS.PLAN\' | translate }}: <span translate="SETTINGS.PERPETUAL">PERPETUAL</span></span>\n                            </div>\n                        </div>\n                        <div flex layout="row" layout-align="end center">\n                            <div>\n                                <md-button type="submit" ng-click="vm.updateLicense()" class="md-button md-fab md-accent">\n                                    <md-tooltip><span translate="SETTINGS.UPDATE_LICENSE">License</span></md-tooltip>\n                                    <md-icon md-font-icon="icon-pencil"></md-icon>\n                                </md-button>\n                            </div>\n                        </div>\n                    </div>\n\n                    <span ng-if="!vm.license.demo && !vm.license.gray" class="md-subhead md-warn-fg text-center">{{ \'SETTINGS.EXPIRATION_DATE\' | translate }}: {{vm.license.expiration | date: \'longDate\'}}</span>\n                    <span class="text-center padding-bottom-10"> {{ vm.license.machineUuid !== vm.license.uuid ? \'SETTINGS.OLD_TOKEN\' : \'SETTINGS.TOKEN\' | translate }}: <span class="text-italic text-bold">{{vm.license.uuid}}</span></span>\n\n                    <div layout="column">\n                        <span ng-if="vm.license.machineUuid !== vm.license.uuid" class="blink md-subhead md-warn-fg text-center">{{ \'SETTINGS.NEW_TOKEN_DETECTED\' | translate }}</span>\n                        <span ng-if="vm.license.machineUuid !== vm.license.uuid" class="text-center padding-bottom-10"> {{\'SETTINGS.NEW_TOKEN\' | translate }}: <span class="text-italic text-bold">{{vm.license.machineUuid}}</span></span>\n                        <span ng-if="vm.license.gray" class="blink md-subhead md-warn-fg text-center">{{ \'SETTINGS.EXPIRATION_GRAY_PERIOD\' | translate }}: {{vm.license.deadline | date: \'longDate\'}}</span>\n                        <span ng-if="vm.license.machineUuid !== vm.license.uuid || vm.license.gray" class="text-center padding-bottom-10 text-italic text-bold"> {{\'SETTINGS.EXPIRATION_REASON\' | translate }} </span>\n                        <span ng-if="vm.license.gray" class="text-center padding-bottom-10"> {{\'SETTINGS.EXPIRATION_REASON_MESSAGE_GRAY\' | translate }}</span>\n                        <span ng-if="vm.license.machineUuid !== vm.license.uuid" class="text-center padding-bottom-10"> {{\'SETTINGS.EXPIRATION_REASON_MESSAGE_CHANGED\' | translate }}</span>\n                        <span ng-if="vm.license.machineUuid !== vm.license.uuid || vm.license.gray" class="text-center padding-bottom-10 text-italic text-bold" translate="SETTINGS.CONTACT_XCALLY_MOTION_SUPPORT"> Contact xCALLY MOTION Support </span>\n                        <span ng-if="vm.license.machineUuid !== vm.license.uuid" class="text-center padding-bottom-10">{{ \'SETTINGS.SEND_EMAIL_TO\' | translate }}: <a href="mailto:license@xcally.com?subject=New%20token%20detected&body=Hi xCALLY, New Token: {{vm.license.machineUuid}}, Old token: {{vm.license.uuid}}">license@xcally.com</a>.</span>\n                        <span ng-if="vm.license.gray && vm.license.machineUuid === vm.license.uuid" class="text-center padding-bottom-10">{{ \'SETTINGS.SEND_EMAIL_TO\' | translate }}: <a href="mailto:license@xcally.com?subject=License%20expired%20or%20disabled&body=Hi xCALLY, My Token: {{vm.license.machineUuid}}">license@xcally.com</a>.</span>\n                    </div>\n\n                    <div ng-if="vm.license.demo" layout="column">\n                        <span class="md-subhead md-warn-fg text-center">{{ \'SETTINGS.TRIAL_VERSION\' | translate }}</span>\n                        <span class="md-subhead md-warn-fg text-center"><a href="https://www.xcallymotion.com/prices" target="_blank">{{ \'SETTINGS.PRICES\' | translate}}</a></span>\n                    </div>\n\n                    <md-subheader class="md-no-sticky">{{ \'SETTINGS.STAFF\' | translate }}</md-subheader>\n                    <md-divider></md-divider>\n                    <md-list layout="row">\n                        <md-list-item class="md-2-line" flex="33">\n                            <md-icon md-font-icon="icon-account" class="md-avatar-icon"></md-icon>\n                            <div class="md-list-item-text">\n                                <h3>{{ vm.license.users || 0 }} <span ng-class="{\'red-fg\': vm.license.users <= vm.users && vm.license.users > 0}">({{vm.license.users >= vm.users ? vm.users : vm.license.users}})</span></h3>\n                                <p translate="SETTINGS.USERS">Users</p>\n                            </div>\n                        </md-list-item>\n                        <md-list-item class="md-2-line" flex="33">\n                            <md-icon md-font-icon="icon-headphones" class="md-avatar-icon"></md-icon>\n                            <div class="md-list-item-text">\n                                <h3>{{ vm.license.agents || 0 }} <span ng-class="{\'red-fg\': (vm.license.agents <= vm.agents && vm.license.agents > 0) }">({{vm.license.agents >= vm.agents ? vm.agents : vm.license.agents}})</span></h3>\n                                <p translate="SETTINGS.AGENTS">Agents</p>\n                            </div>\n                        </md-list-item>\n                        <md-list-item class="md-2-line" flex="33">\n                            <md-icon md-font-icon="icon-phone" class="md-avatar-icon"></md-icon>\n                            <div class="md-list-item-text">\n                                <h3>{{ vm.license.telephones || 0 }} <span ng-class="{\'red-fg\': vm.license.telephones <= vm.telephones && vm.license.telephones > 0}">({{vm.license.telephones >= vm.telephones ? vm.telephones : vm.license.telephones}})</span></h3>\n                                <p translate="SETTINGS.TELEPHONES">Telephones</p>\n                            </div>\n                        </md-list-item>\n                    </md-list>\n\n                    <md-subheader class="md-no-sticky">{{ \'SETTINGS.CHANNELS\' | translate }}</md-subheader>\n                    <md-divider></md-divider>\n                    <md-list layout="row">\n                        <md-list-item class="md-2-line" ng-repeat="channel in vm.channels" flex="20">\n                            <md-icon md-font-icon="{{channel.icon}}" class="md-avatar-icon" ng-class="vm.license[channel.name] ? \'green-A700-bg\' : \'red-A700-bg\'"></md-icon>\n                            <div class="md-list-item-text">\n                                <h3 translate="SETTINGS.{{channel.name | uppercase}}"></h3>\n                                <p ng-class="vm.license[channel.name] ? \'green-A700-fg\' : \'red-A700-fg\'">{{ \'SETTINGS.\' + (vm.license[channel.name] ? \'ENABLED\' : \'DISABLED\') | translate }}</p>\n                            </div>\n                        </md-list-item>\n                    </md-list>\n\n                    <md-subheader class="md-no-sticky">{{ \'SETTINGS.MODULES\' | translate }}</md-subheader>\n                    <md-divider></md-divider>\n                    <md-list layout="row">\n                        <md-list-item class="md-2-line" ng-repeat="module in vm.modules" flex="33">\n                            <md-icon md-font-icon="{{module.icon}}" class="md-avatar-icon" ng-class="vm.license[module.name] ? \'green-A700-bg\' : \'red-A700-bg\'"></md-icon>\n                            <div class="md-list-item-text">\n                                <h3 translate="SETTINGS.{{module.name | uppercase}}"></h3>\n                                <p ng-class="vm.license[module.name] ? \'green-A700-fg\' : \'red-A700-fg\'">{{ \'SETTINGS.\' + (vm.license[module.name] ? \'ENABLED\' : \'DISABLED\') | translate }}</p>\n                            </div>\n                        </md-list-item>\n                    </md-list>\n\n                    <md-subheader class="md-no-sticky">{{ \'SETTINGS.OTHERS\' | translate }}</md-subheader>\n                    <md-divider></md-divider>\n                    <md-list layout="row">\n                        <div ng-repeat="other in vm.others" ng-switch="other.name" flex="33">\n                            <md-list-item class="md-2-line" ng-switch-when="callysquare">\n                                <md-icon md-font-icon="{{other.icon}}" class="md-avatar-icon green-A700-bg"></md-icon>\n                                <div class="md-list-item-text">\n                                    <div layout="row" layout="start center">\n                                        <h3>Cally Square</h3>\n                                        <button ng-click="vm.gotoProcess($event)" class="md-mini" aria-label="restart">\n                                          <md-tooltip>Restart</md-tooltip>\n                                          <md-icon md-font-icon="icon-reload"></md-icon>\n                                      </button>\n                                    </div>\n                                    <p ng-if="vm.license[other.name]" class="green-A700-fg">{{vm.license[other.name]}} {{ \'SETTINGS.CHANNELS\' | translate }}</p>\n                                    <p ng-if="!vm.license[other.name]" class="green-A700-fg" translate="SETTINGS.UNLIMITED_CHANNELS">UNLIMITED CHANNELS</p>\n                                </div>\n                            </md-list-item>\n                            <md-list-item class="md-2-line" ng-switch-default>\n                                <md-icon md-font-icon="{{other.icon}}" class="md-avatar-icon" ng-class="vm.license[other.name] ? \'green-A700-bg\' : \'red-A700-bg\'"></md-icon>\n                                <div class="md-list-item-text">\n                                    <h3 translate="SETTINGS.{{other.name | uppercase}}"></h3>\n'+"                                    <p ng-class=\"vm.license[other.name] ? 'green-A700-fg' : 'red-A700-fg'\">{{ 'SETTINGS.' + (vm.license[other.name] ? 'ENABLED' : 'DISABLED') | translate }}</p>\n                                </div>\n                            </md-list-item>\n                        </div>\n\n                    </md-list>\n                </md-card>\n            </div>\n            \x3c!-- / LICENSE CARD --\x3e\n\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- NO ADD BUTTON BUTTON --\x3e\n</div>"),e.put("app/main/apps/settings/views/license/request/dialog.html",'<md-dialog class="request-dialog" aria-label="Send Request">\n    <form name="requestForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title" translate="SETTINGS.REQUEST_LICENSE">Request License</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.license.name" required>\n                <div ng-messages="requestForm.name.$error" ng-show="requestForm.name.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.NAME_REQUIRED">Address field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.EMAIL">Email</label>\n                <input type="email" name="email" ng-model="vm.license.email" required>\n                <div ng-messages="requestForm.email.$error" ng-show="requestForm.email.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                    </div>\n                    <div ng-message="email">\n                        <span translate="SETTINGS.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.PLAN">Plan</label>\n                <md-select name="plan" ng-model="vm.license.months" required>\n                    <md-option ng-value="1"><span translate="SETTINGS.MONTH_TO_MONTH">MONTH TO MONTH</span></md-option>\n                    <md-option ng-value="12"><span translate="SETTINGS.ANNUALLY">ANNUALLY</span></md-option>\n                    <md-option ng-value="36"><span translate="SETTINGS.PERPETUAL">PERPETUAL</span></md-option>\n                </md-select>\n                <div ng-messages="requestForm.plan.$error" ng-show="requestForm.plan.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.PLAN_REQUIRED">Plan field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-subheader class="md-no-sticky">{{ \'SETTINGS.STAFF\' | translate }}</md-subheader>\n            <div layout="row" layout-align="space-between center">\n                <md-input-container class="md-block" flex>\n                    <label translate="SETTINGS.USERS">Users</label>\n                    <input type="number" name="users" ng-model="vm.license.users" required>\n                    <div ng-messages="requestForm.users.$error" ng-show="requestForm.users.$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="SETTINGS.ERRORS.USERS_REQUIRED">Users field is required</span>\n                        </div>\n                    </div>\n                </md-input-container>\n                <md-input-container class="md-block" flex>\n                    <label translate="SETTINGS.AGENTS">Agents</label>\n                    <input type="number" name="agents" ng-model="vm.license.agents" required>\n                    <div ng-messages="requestForm.agents.$error" ng-show="requestForm.agents.$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="SETTINGS.ERRORS.AGENTS_REQUIRED">Agents field is required</span>\n                        </div>\n                    </div>\n                </md-input-container>\n                <md-input-container class="md-block" flex>\n                    <label translate="SETTINGS.TELEPHONES">Telephones</label>\n                    <input type="number" name="telephones" ng-model="vm.license.telephones" required>\n                    <div ng-messages="requestForm.telephones.$error" ng-show="requestForm.telephones.$touched" role="alert">\n                        <div ng-message="required">\n                            <span translate="SETTINGS.ERRORS.TELEPHONES_REQUIRED">Telephones field is required</span>\n                        </div>\n                    </div>\n                </md-input-container>\n            </div>\n\n            <md-subheader class="md-no-sticky">{{ \'SETTINGS.CHANNELS\' | translate }}</md-subheader>\n            <div layout="row" layout-align="space-between center">\n                <md-switch ng-model="vm.license[channel.name]" aria-label="{{channel.name}}" ng-repeat="channel in vm.channels"><span translate="SETTINGS.{{channel.name | uppercase}}"></span></md-switch>\n            </div>\n\n            <md-subheader class="md-no-sticky">{{ \'SETTINGS.MODULES\' | translate }}</md-subheader>\n            <div layout="row" layout-align="space-between center">\n                <md-switch ng-model="vm.license[module.name]" aria-label="{{module.name}}" ng-repeat="module in vm.modules"><span translate="SETTINGS.{{module.name | uppercase}}"></span></md-switch>\n            </div>\n\n            <md-subheader class="md-no-sticky">{{ \'SETTINGS.OTHERS\' | translate }}</md-subheader>\n            <div layout="row" layout-align="space-between center">\n                <div ng-repeat="other in vm.others" ng-switch="other.name">\n                    <md-input-container class="md-block" flex ng-switch-when="callysquare">\n                        <label>Cally Square ({{ \'SETTINGS.CHANNELS\' | translate }})</label>\n                        <input type="number" name="callysquare" ng-model="vm.license.callysquare" required>\n                        <div class="hint"><span>0={{ \'SETTINGS.UNLIMITED_CHANNELS\' | translate }}</span></div>\n                        <div ng-messages="requestForm.users.$error" ng-show="requestForm.users.$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.USERS_REQUIRED">Users field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <div ng-switch-default>\n                        <md-switch ng-model="vm.license[other.name]" aria-label="{{other.name}}"><span translate="SETTINGS.{{other.name | uppercase}}"></span></md-switch>\n                    </div>\n\n                </div>\n            </div>\n\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.DESCRIPTION">Description</label>\n                <textarea name="description" ng-model="vm.license.description"></textarea>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.sendRequest()" class="send-button md-accent md-raised" ng-disabled="requestForm.$invalid || requestForm.$pristine" aria-label="SEND" translate="SETTINGS.SEND" translate-attr-aria-label="SETTINGS.SEND">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/settings/views/networks/create/dialog.html",'<md-dialog class="network-dialog" aria-label="New Network">\n    <form name="networkForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.network.type" required autofocus>\n                    <md-option ng-value="\'localnet\'">LocalNET</md-option>\n                    <md-option ng-value="\'externip\'">ExternIP</md-option>\n                </md-select>\n                <div ng-messages="networkForm[\'type\'].$error" ng-show="networkForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.network.type == \'localnet\'" class="md-block">\n                <label translate="SETTINGS.LOCALNETADDRESS">localNetAddress</label>\n                <input type="text" name="value" ng-model="vm.network.value" ng-pattern="/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/"\n                    ng-required="true">\n                <div class="hint"><span translate="SETTINGS.HELP.LOCALNETADDRESS"></span></div>\n                <div ng-messages="networkForm[\'value\'].$error" ng-show="networkForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.LOCALNETADDRESS_REQUIRED">localNetAddress field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="SETTINGS.ERRORS.LOCALNETADDRESS_MUST_VALID_PATTERN" translate-values="{ regex: \'/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/\' }">localNetAddress must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.network.type == \'externip\'" class="md-block">\n                <label translate="SETTINGS.ADDRESS">Address</label>\n                <input type="text" name="value" ng-model="vm.network.value" ng-pattern="/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/" ng-required="true">\n                <div class="hint"><span translate="SETTINGS.HELP.ADDRESS"></span></div>\n                <div ng-messages="networkForm[\'value\'].$error" ng-show="networkForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.ADDRESS_REQUIRED">Address field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="SETTINGS.ERRORS.ADDRESS_MUST_VALID_PATTERN" translate-values="{ regex: \'/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/\' }">Address must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newNetwork" ng-click="vm.saveNetwork()" class="send-button md-accent md-raised" ng-disabled="networkForm.$invalid || networkForm.$pristine" aria-label="SAVE" translate="SETTINGS.SAVE" translate-attr-aria-label="SETTINGS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newNetwork" ng-click="vm.addNewNetwork()" class="send-button md-accent md-raised" ng-disabled="networkForm.$invalid" aria-label="ADD" translate="SETTINGS.ADD_NETWORK" translate-attr-aria-label="SETTINGS.ADD_NETWORK">\n                    ADD NETWORK\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newNetwork" ng-click="vm.deleteNetwork($event)" aria-label="DELETE" translate translate-attr-aria-label="SETTINGS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="SETTINGS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/settings/views/networks/networks.html",'<div id="networks" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-cog" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="SETTINGS.NETWORKS">Networks</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="SETTINGS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedNetworks.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedNetworks =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="SETTINGS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-networks-count">\n                    <span>{{vm.selectedNetworks.length}}</span>\n                <span translate="SETTINGS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="NETWORKS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllNetworks()" translate="SETTINGS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectNetworks()" translate="SETTINGS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedNetworks" csv-label="true" filename="networks.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedNetworks($event)" aria-label="delete selected" translate translate-attr-label="NETWORKS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- NETWORK TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedNetworks" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getNetworks">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'SETTINGS.ID\' | translate }}</th>\n                                <th md-column md-order-by="type">{{ \'SETTINGS.TYPE\' | translate }}</th>\n                                <th md-column md-order-by="value">{{ \'SETTINGS.ADDRESS\' | translate }}</th>\n                                <th md-column md-order-by="createdAt">{{ \'SETTINGS.CREATED_AT\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.networks.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="SETTINGS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="network" md-select-id="id" ng-repeat="network in vm.networks.rows">\n                                <td md-cell ng-if="network.userpic"><img class="avatar" alt="{{network.name}}" ng-src="api/users/{{network.id}}/avatar" /></td>\n                                <td md-cell ng-if="!network.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{network.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditNetwork($event, network)" md-cell class="id ">{{network.id}}</td>\n                                <td ng-click="vm.createOrEditNetwork($event, network)" md-cell class="type ">{{ vm.arraytype[network.type].option }}</td>\n                                <td ng-click="vm.createOrEditNetwork($event, network)" md-cell class="value ">{{network.value}}</td>\n                                <td ng-click="vm.createOrEditNetwork($event, network)" md-cell class="createdAt ">{{network.createdAt | date:\'medium\' }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="SETTINGS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(network, $event)" translate="SETTINGS.EDIT_NETWORK">\n                                                    Edit Network\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(network, $event)" translate="SETTINGS.DELETE_NETWORK">\n                                                    Delete Network\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'SETTINGS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'SETTINGS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'SETTINGS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.networks.count}}" md-on-paginate="vm.getNetworks" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / NETWORK TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD NETWORK BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-network-button" ng-click="vm.createOrEditNetwork($event)" aria-label="add network" translate translate-attr-aria-label="SETTINGS.ADD_NETWORK">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD NETWORK BUTTON --\x3e\n</div>'),e.put("app/main/apps/settings/views/smtps/create/dialog.html",'<md-dialog class="smtp-dialog" aria-label="New Smtp">\n    <form name="smtpForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.ACCOUNTNAME">AccountName</label>\n                <input type="text" name="name" ng-model="vm.smtp.name" ng-required="true" autofocus>\n                <div ng-messages="smtpForm[\'name\'].$error" ng-show="smtpForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.ACCOUNTNAME_REQUIRED">AccountName field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.EMAILADDRESS">EmailAddress</label>\n                <input type="email" name="email" ng-model="vm.smtp.email" ng-required="true">\n                <div class="hint"><span translate="SETTINGS.HELP.EMAILADDRESS"></span></div>\n                <div ng-messages="smtpForm[\'email\'].$error" ng-show="smtpForm[\'email\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.EMAILADDRESS_REQUIRED">EmailAddress field is required</span>\n                    </div>\n                    <div ng-message="email">\n                        <span translate="SETTINGS.ERRORS.EMAILADDRESS_MUST_VALID">EmailAddress must be a valid e-mail address</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.SMTP_SERVICE">SMTP_Service</label>\n                <md-select name="Smtp.service" ng-model="vm.smtp.Smtp.service" required>\n                    <md-option ng-value="null">Custom</md-option>\n                    <md-option ng-value="\'gmail\'">Gmail</md-option>\n                    <md-option ng-value="\'hotmail\'">Hotmail</md-option>\n                    <md-option ng-value="\'yahoo\'">Yahoo</md-option>\n                    <md-option ng-value="\'outlook365\'">Outlook365</md-option>\n                </md-select>\n                <div ng-messages="smtpForm[\'Smtp.service\'].$error" ng-show="smtpForm[\'Smtp.service\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.SMTP_SERVICE_REQUIRED">SMTP_Service field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.smtp.Smtp.service == null" class="md-block">\n                <label translate="SETTINGS.SMTP_HOST">SMTP_Host</label>\n                <input type="text" name="Smtp.host" ng-model="vm.smtp.Smtp.host" ng-required="true">\n                <div ng-messages="smtpForm[\'Smtp.host\'].$error" ng-show="smtpForm[\'Smtp.host\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.SMTP_HOST_REQUIRED">SMTP_Host field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.smtp.Smtp.service == null" class="md-block">\n                <label translate="SETTINGS.SMTP_PORT">SMTP_Port</label>\n                <input type="number" name="Smtp.port" ng-model="vm.smtp.Smtp.port" ng-required="true">\n                <div ng-messages="smtpForm[\'Smtp.port\'].$error" ng-show="smtpForm[\'Smtp.port\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.SMTP_PORT_REQUIRED">SMTP_Port field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.smtp.Smtp.service == null" class="md-block">\n                <md-switch ng-model="vm.smtp.Smtp.secure" aria-label="SMTP_Secure"><span translate="SETTINGS.SMTP_SECURE">SMTP_Secure</span></md-switch>\n                <div class="hint"><span translate="SETTINGS.HELP.SMTP_SECURE"></span></div>\n            </md-input-container>\n            <md-input-container ng-if="vm.smtp.Smtp.service == null" class="md-block">\n                <md-switch ng-model="vm.smtp.Smtp.authentication" aria-label="SMTP_Authentication"><span translate="SETTINGS.SMTP_AUTHENTICATION">SMTP_Authentication</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="vm.smtp.Smtp.authentication == true || vm.smtp.Smtp.service != null" class="md-block">\n                <label translate="SETTINGS.SMTP_USERNAME">SMTP_Username</label>\n                <input type="text" name="Smtp.user" ng-model="vm.smtp.Smtp.user" ng-required="true">\n                <div class="hint"><span translate="SETTINGS.HELP.SMTP_USERNAME"></span></div>\n                <div ng-messages="smtpForm[\'Smtp.user\'].$error" ng-show="smtpForm[\'Smtp.user\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.SMTP_USERNAME_REQUIRED">SMTP_Username field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.smtp.Smtp.authentication == true || vm.smtp.Smtp.service != null">\n                <label translate="SETTINGS.SMTP_PASSWORD">SMTP_Password</label>\n                <input type="password" name="Smtp.pass" ng-model="vm.smtp.Smtp.pass" placeholder="Password" translate translate-attr-placeholder="SETTINGS.PASSWORD" required>\n                <div class="hint"><span translate="SETTINGS.HELP.SMTP_PASSWORD"></span></div>\n                <div ng-messages="smtpForm[\'Smtp.pass\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="SETTINGS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="SETTINGS.DESCRIPTION">Description</label>\n                <input type="" name="description" ng-model="vm.smtp.description">\n                <div ng-messages="smtpForm[\'description\'].$error" ng-show="smtpForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SETTINGS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSmtp" ng-click="vm.saveSmtp()" class="send-button md-accent md-raised" ng-disabled="smtpForm.$invalid || smtpForm.$pristine" aria-label="SAVE" translate="SETTINGS.SAVE" translate-attr-aria-label="SETTINGS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSmtp" ng-click="vm.addNewSmtp()" class="send-button md-accent md-raised" ng-disabled="smtpForm.$invalid" aria-label="ADD" translate="SETTINGS.ADD_SMTP" translate-attr-aria-label="SETTINGS.ADD_SMTP">\n                    ADD SMTP\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSmtp" ng-click="vm.deleteSmtp($event)" aria-label="DELETE" translate translate-attr-aria-label="SETTINGS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="SETTINGS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/settings/views/smtps/smtps.html",'<div id="smtps" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-cog" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="SETTINGS.SMTP">Smtp</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div>\n            <md-button type="submit" ng-click="vm.verifySmtp()" ng-disabled="!vm.smtp.id" class="send-button md-accent md-raised" translate="SETTINGS.VERIFY" translate-attr-aria-label="SETTINGS.VERIFY">\n                VERIFY\n            </md-button>\n            <md-button type="submit" ng-click="vm.saveSmtp()" ng-disabled="smtpForm.$pristine || smtpForm.$invalid" class="send-button md-accent md-raised" translate="SETTINGS.SAVE" translate-attr-aria-label="SETTINGS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            <div class="smtp-detail-form-container general md-background-bg md-whiteframe-1dp">\n                <div class="pb-16" layout="row" layout-align="start center">\n                    <div class="h2 secondary-text" translate="SETTINGS.GENERAL">GENERAL</div>\n                </div>\n                <form name="smtpForm" novalidate>\n                    <md-input-container class="md-block">\n                        <label translate="SETTINGS.ACCOUNTNAME">AccountName</label>\n                        <input type="text" name="name" ng-model="vm.smtp.name" ng-required="true" autofocus>\n                        <div ng-messages="smtpForm[\'name\'].$error" ng-show="smtpForm[\'name\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.ACCOUNTNAME_REQUIRED">AccountName field is required</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="SETTINGS.EMAILADDRESS">EmailAddress</label>\n                        <input type="email" name="email" ng-model="vm.smtp.email" ng-required="true">\n                        <div class="hint"><span translate="SETTINGS.HELP.EMAILADDRESS"></span></div>\n                        <div ng-messages="smtpForm[\'email\'].$error" ng-show="smtpForm[\'email\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.EMAILADDRESS_REQUIRED">EmailAddress field is required</span>\n                            </div>\n                            <div ng-message="email">\n                                <span translate="SETTINGS.ERRORS.EMAILADDRESS_MUST_VALID">EmailAddress must be a valid e-mail address</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block">\n                        <label translate="SETTINGS.SMTP_SERVICE">SMTP_Service</label>\n                        <md-select name="Smtp.service" ng-model="vm.smtp.Smtp.service" required>\n                            <md-option ng-value="null">Custom</md-option>\n                            <md-option ng-value="\'gmail\'">Gmail</md-option>\n                            <md-option ng-value="\'hotmail\'">Hotmail</md-option>\n                            <md-option ng-value="\'yahoo\'">Yahoo</md-option>\n                            <md-option ng-value="\'outlook365\'">Outlook365</md-option>\n                        </md-select>\n                        <div ng-messages="smtpForm[\'Smtp.service\'].$error" ng-show="smtpForm[\'Smtp.service\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.SMTP_SERVICE_REQUIRED">SMTP_Service field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.smtp.Smtp.service == null" class="md-block">\n                        <label translate="SETTINGS.SMTP_HOST">SMTP_Host</label>\n                        <input type="text" name="Smtp.host" ng-model="vm.smtp.Smtp.host" ng-required="true">\n                        <div ng-messages="smtpForm[\'Smtp.host\'].$error" ng-show="smtpForm[\'Smtp.host\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.SMTP_HOST_REQUIRED">SMTP_Host field is required</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.smtp.Smtp.service == null" class="md-block">\n                        <label translate="SETTINGS.SMTP_PORT">SMTP_Port</label>\n                        <input type="number" name="Smtp.port" ng-model="vm.smtp.Smtp.port" ng-required="true">\n                        <div ng-messages="smtpForm[\'Smtp.port\'].$error" ng-show="smtpForm[\'Smtp.port\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.SMTP_PORT_REQUIRED">SMTP_Port field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.smtp.Smtp.service == null" class="md-block">\n                        <md-switch ng-model="vm.smtp.Smtp.secure" aria-label="SMTP_Secure"><span translate="SETTINGS.SMTP_SECURE">SMTP_Secure</span></md-switch>\n                        <div class="hint"><span translate="SETTINGS.HELP.SMTP_SECURE"></span></div>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.smtp.Smtp.service == null" class="md-block">\n                        <md-switch ng-model="vm.smtp.Smtp.authentication" aria-label="SMTP_Authentication"><span translate="SETTINGS.SMTP_AUTHENTICATION">SMTP_Authentication</span></md-switch>\n                    </md-input-container>\n                    <md-input-container ng-if="vm.smtp.Smtp.authentication == true || vm.smtp.Smtp.service != null" class="md-block">\n                        <label translate="SETTINGS.SMTP_USERNAME">SMTP_Username</label>\n                        <input type="text" name="Smtp.user" ng-model="vm.smtp.Smtp.user" ng-required="true">\n                        <div class="hint"><span translate="SETTINGS.HELP.SMTP_USERNAME"></span></div>\n                        <div ng-messages="smtpForm[\'Smtp.user\'].$error" ng-show="smtpForm[\'Smtp.user\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.SMTP_USERNAME_REQUIRED">SMTP_Username field is required</span>\n                            </div>\n\n                        </div>\n                    </md-input-container>\n                    <md-input-container class="md-block" ng-if="vm.smtp.Smtp.authentication == true || vm.smtp.Smtp.service != null">\n                        <label translate="SETTINGS.SMTP_PASSWORD">SMTP_Password</label>\n                        <input type="password" name="Smtp.pass" ng-model="vm.smtp.Smtp.pass" placeholder="Password" translate translate-attr-placeholder="SETTINGS.PASSWORD" required>\n                        <div class="hint"><span translate="SETTINGS.HELP.SMTP_PASSWORD"></span></div>\n                        <div ng-messages="smtpForm[\'Smtp.pass\'].$error" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                            </div>\n                            <div ng-message="pattern">\n                                <span translate="SETTINGS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n\n                    <md-input-container class="md-block">\n                        <label translate="SETTINGS.DESCRIPTION">Description</label>\n                        <input type="" name="description" ng-model="vm.smtp.description">\n                        <div ng-messages="smtpForm[\'description\'].$error" ng-show="smtpForm[\'description\'].$touched" role="alert">\n                            <div ng-message="required">\n                                <span translate="SETTINGS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                            </div>\n                        </div>\n                    </md-input-container>\n\n                </form>\n            </div>\n\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n</div>'),e.put("app/main/apps/settings/views/system/system.html",'<div id="system" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n          <md-icon md-font-icon="icon-cog" class="s24"></md-icon>\n        </span>\n                <span class="logo-text" translate="SETTINGS.SYSTEM">SYSTEM</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" md-border-bottom flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SETTINGS.GENERAL">GENERAL</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="system-detail-form-container personal_info md-background-bg md-whiteframe-1dp">\n                        <md-card class="md-whiteframe-1dp padding-20" layout="row" layout-xs="column" layout-wrap>\n                            <ms-widget flex="50" flex-xs="100">\n                                \x3c!-- Front --\x3e\n                                <ms-widget-front class="white-bg">\n                                    <div class="ph-16 pt-16 pb-8 md-accent-bg">\n                                        <div class="h3">OS</div>\n                                    </div>\n\n                                    <div layout="row" layout-align="start center" layout-wrap>\n                                        <div flex="100" flex-gt-md="100">\n                                            <div class="p-16 pb-32">\n                                                <div class="h4">{{vm.system.system.manufacturer}} {{vm.system.system.model}}</div>\n                                                <div class="h4">{{vm.system.cpu.manufacturer}} {{vm.system.cpu.brand}} - {{vm.system.cpu.speed}} GHz - {{vm.system.cpu.cores}} Cores</div>\n                                                <div class="h4">{{vm.system.os.distro}} - {{vm.system.os.release}} - Kernel: {{vm.system.os.kernel}}</div>\n                                                <div class="h4">Node.js: {{vm.system.node}}</div>\n                                                <div class="h4">Host: {{vm.system.os.hostname}} - Uptime: {{vm.system.time.uptime / 60 | number:0}} m</div>\n                                                <div class="h4">TimeZone: {{vm.system.time.timezone}} ({{vm.system.time.timezoneName}})</div>\n                                            </div>\n                                        </div>\n                                    </div>\n                                </ms-widget-front>\n                                \x3c!-- / Front --\x3e\n                            </ms-widget>\n                            <ms-widget flex="25" flex-xs="100">\n                                \x3c!-- Front --\x3e\n                                <ms-widget-front class="white-bg">\n                                    <div class="ph-16 pt-16 pb-8 md-accent-bg md-hue-1">\n                                        <div class="h3">CPU</div>\n                                    </div>\n\n                                    <div layout="row" layout-align="start center" layout-wrap>\n                                        <div flex="100" flex-gt-md="100">\n                                            <div class="p-16 pb-32">\n                                                <div class="pb-8" layout="row" layout-align="space-between start">\n                                                    <span class="h3" translate="SETTINGS.AVG_LOAD">AVG Load</span>\n                                                    <span class="h3 secondary-text font-weight-500">{{vm.system.currentLoad.avgload * 100 | number:0}}%</span>\n                                                </div>\n                                                <md-progress-linear class="red" md-mode="determinate" value="{{vm.system.currentLoad.avgload * 100 | number:0}}"></md-progress-linear>\n                                            </div>\n                                        </div>\n                                    </div>\n                                </ms-widget-front>\n                                \x3c!-- / Front --\x3e\n                            </ms-widget>\n                            <ms-widget flex="25" flex-xs="100">\n                                \x3c!-- Front --\x3e\n                                <ms-widget-front class="white-bg">\n                                    <div class="ph-16 pt-16 pb-8 md-accent-bg md-hue-3">\n                                        <div class="h3">MEM</div>\n                                    </div>\n\n                                    <div layout="row" layout-align="start center" layout-wrap>\n                                        <div flex="100" flex-gt-md="100">\n                                            <div class="p-16 pb-32">\n                                                <div class="h4">{{\'SETTINGS.TOTAL\' | translate}}: {{vm.system.mem.total / 1024 / 1024 / 1024 | number:0}} GB</div>\n                                                <div class="h4">{{\'SETTINGS.FREE\' | translate}}: {{vm.system.mem.available / 1024 / 1024 / 1024 | number:0}} GB</div>\n                                                <div class="h4">{{\'SETTINGS.USED\' | translate}}: {{vm.system.mem.active / 1024 / 1024 / 1024 | number:0}} GB</div>\n                                            </div>\n                                            <div class="p-16 pb-32">\n                                                <div class="pb-8" layout="row" layout-align="space-between start">\n                                                    <span class="h3" translate="SETTINGS.USED">Used</span>\n                                                    <span class="h3 secondary-text font-weight-500">{{(vm.system.mem.active / vm.system.mem.total) * 100 | number : 0}}%</span>\n                                                </div>\n                                                <md-progress-linear class="md-warn" md-mode="determinate" value="{{(vm.system.mem.active / vm.system.mem.total) * 100 | number : 0 }}"></md-progress-linear>\n\n                                            </div>\n                                        </div>\n                                    </div>\n                                </ms-widget-front>\n                                \x3c!-- / Front --\x3e\n                            </ms-widget>\n                        </md-card>\n\n                        <md-card class="md-whiteframe-1dp padding-20" layout="row" layout-xs="column" layout-wrap>\n                            <ms-widget ng-repeat="disk in vm.system.fsSize" flex="25" flex-xs="100">\n                                \x3c!-- Front --\x3e\n                                <ms-widget-front class="white-bg">\n                                    <div class="ph-16 pt-16 pb-8 md-accent-bg md-hue-3">\n                                        <div class="h3">DISK {{$index + 1}}</div>\n                                    </div>\n\n                                    <div layout="row" layout-align="start center" layout-wrap>\n                                        <div flex="100" flex-gt-md="100">\n                                            <div class="p-16 pb-32">\n                                                <div class="h4">{{\'SETTINGS.FILE_SYSTEM\' | translate}}: {{disk.fs}}</div>\n                                                <div class="h4">{{\'SETTINGS.MOUNT_POINT\' | translate}}: "{{disk.mount}}"</div>\n                                                <div class="h4">{{\'SETTINGS.TOTAL\' | translate}}: {{disk.size / 1024 / 1024 / 1024 | number:0}} GB</div>\n                                                <div class="h4">{{\'SETTINGS.USED\' | translate}}: {{disk.used / 1024 / 1024 / 1024 | number:0}} GB</div>\n                                            </div>\n                                            <div class="p-16 pb-32">\n                                                <div class="pb-8" layout="row" layout-align="space-between start">\n                                                    <span class="h3" translate="SETTINGS.USED">Used</span>\n                                                    <span class="h4 secondary-text font-weight-500">{{disk.use | number:0}}%</span>\n                                                </div>\n                                                <md-progress-linear class="red" md-mode="determinate" value="{{disk.use | number:0}}"></md-progress-linear>\n                                            </div>\n                                        </div>\n                                    </div>\n                                </ms-widget-front>\n                                \x3c!-- / Front --\x3e\n                            </ms-widget>\n                        </md-card>\n\n                        <md-card class="md-whiteframe-1dp padding-20" layout="row" layout-xs="column" layout-wrap>\n                            <ms-widget ng-repeat="net in vm.system.net" flex="25" flex-xs="100">\n                                \x3c!-- Front --\x3e\n                                <ms-widget-front class="white-bg">\n                                    <div class="ph-16 pt-16 pb-8 md-accent-bg md-hue-3">\n                                        <div class="h3">NET {{$index + 1}}</div>\n                                    </div>\n\n                                    <div layout="row" layout-align="start center" layout-wrap>\n                                        <div flex="100" flex-gt-md="100">\n                                            <div class="p-16 pb-32">\n                                                <div class="h4">{{\'SETTINGS.INTERFACE\' | translate}}: {{net.iface}}</div>\n                                                <div class="h4">IPv4: {{net.ip4}}</div>\n                                                <div class="h4">IPv6: {{net.ip6}}</div>\n                                                <div class="h4">MAC: {{net.mac}}</div>\n                                            </div>\n                                        </div>\n                                    </div>\n                                </ms-widget-front>\n                                \x3c!-- / Front --\x3e\n                            </ms-widget>\n                        </md-card>\n\n                        <md-card class="md-whiteframe-1dp padding-20" layout="row">\n                            <div flex>\n                                <md-toolbar class="md-table-toolbar md-default">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead" translate="SETTINGS.TOP_N_PROCESSES" translate-values="{value: vm.processLimit}"></span>\n                                        <div flex></div>\n                                        <ms-search-bar on-search="vm.searchTerm1 = query" on-collapse="vm.searchTerm1 = undefined" debounce="300"></ms-search-bar>\n                                    </div>\n                                </md-toolbar>\n                                <md-table-container>\n                                    <table md-table>\n                                        <thead md-head>\n                                            <tr md-row>\n                                                <th md-column>pid</th>\n                                                <th md-column>{{\'SETTINGS.NAME\' | translate}}</th>\n                                                <th md-column>{{\'SETTINGS.STATE\' | translate}}</th>\n                                                <th md-column>pmem</th>\n                                                <th md-column>pcpu</th>\n                                            </tr>\n                                        </thead>\n                                        <tbody md-body>\n                                            <tr md-row ng-repeat="process in vm.system.processes.list | limitTo: vm.processLimit | filter: vm.searchTerm1 | orderBy:\'-pcpu\'">\n                                                <td md-cell>{{process.pid}}</td>\n                                                <td md-cell>{{process.command}}</td>\n                                                <td md-cell>\n                                                    <span class="text-boxed white-fg" ng-class="{\n                          \'green-600-bg\': process.state == \'running\',\n                          \'yellow-600-bg\': process.state == \'sleeping\',\n                          \'red-600-bg\': process.state == \'blocked\'}">{{process.state | uppercase}}</span>\n                                                </td>\n                                                <td md-cell>{{process.pmem}}%</td>\n                                                <td md-cell>{{process.pcpu}}%</td>\n                                            </tr>\n                                        </tbody>\n                                    </table>\n                                </md-table-container>\n                            </div>\n                        </md-card>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SETTINGS.PROCESSES">PROCESSES</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="system-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <md-card class="md-whiteframe-1dp padding-20" flex>\n                            <md-toolbar class="md-table-toolbar md-default">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="SETTINGS.MOTION_PROCESS_MANAGEMENT"></span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm.searchTerm2 = query" on-collapse="vm.searchTerm2 = undefined" debounce="300"></ms-search-bar>\n                                    <md-button ng-click="vm.getProcesses()" class="md-icon-button" aria-label="Reload">\n                                        <md-icon md-font-icon="icon-reload" class="s24"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table>\n                                    <thead md-head>\n                                        <tr md-row>\n                                            <th md-column>id</th>\n                                            <th md-column>pid</th>\n                                            <th md-column>{{\'SETTINGS.NAME\' | translate}}</th>\n                                            <th md-column>{{\'SETTINGS.STATE\' | translate}}</th>\n                                            <th md-column>MEM</th>\n                                            <th md-column>CPU</th>\n                                            <th md-column width="20px">Actions</th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row ng-repeat="process in vm.processes | filter: vm.searchTerm2 | orderBy:\'-monit.cpu\'">\n                                            <td md-cell>{{process.pm_id}}</td>\n                                            <td md-cell>{{process.pid}}</td>\n                                            <td md-cell>{{process.name == \'agi\' ? \'agi (Cally Square IVR)\' : process.name}}</td>\n                                            <td md-cell>\n                                                <span class="text-boxed white-fg" ng-class="{\'green-600-bg\': process.pm2_env.status == \'online\', \'red-600-bg\': process.pm2_env.status == \'stopped\'}">{{process.pm2_env.status | uppercase}}</span>\n                                            </td>\n                                            <td md-cell>{{process.monit.memory / 1024 / 1024 | number:0}} MB</td>\n                                            <td md-cell>{{process.monit.cpu}}%</td>\n                                            <td md-cell>\n                                                <md-button ng-if="process.pm2_env.status !== \'online\'" ng-click="vm.updateProcess($event, process.pm_id, \'online\')" class="md-icon-button" aria-label="Play">\n                                                    <md-icon md-font-icon="icon-play" class="s24"></md-icon>\n                                                </md-button>\n                                                <md-button ng-if="process.pm2_env.status === \'online\'" ng-click="vm.updateProcess($event, process.pm_id, \'stopped\')" class="md-icon-button" aria-label="Stop">\n                                                    <md-icon md-font-icon="icon-stop" class="s24"></md-icon>\n                                                </md-button>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                    <tfoot md-foot>\n                                        <tr md-row>\n                                            <td md-cell></td>\n                                            <td md-cell></td>\n                                            <td md-cell></td>\n                                            <td md-cell></td>\n                                            <td md-cell>{{ (vm.processes | map: \'monit.memory\' | sum) / 1024 / 1024 | number:0 }} MB</td>\n                                            <td md-cell></td>\n                                            <td md-cell></td>\n                                        </tr>\n                                    </tfoot>\n                                </table>\n                            </md-table-container>\n                        </md-card>\n                        <md-card class="md-whiteframe-1dp padding-20" flex>\n                            <md-toolbar class="md-table-toolbar md-default">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="SETTINGS.USEFUL_COMMANDS"></span>\n                                    <div flex></div>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table>\n                                    <thead md-head>\n                                        <tr md-row>\n                                            <th md-column width="30%">{{\'SETTINGS.COMMAND\' | translate}}</th>\n                                            <th md-column>{{\'SETTINGS.DESCRIPTION\' | translate}}</th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr>\n                                            <td md-cell class="no-border">pm2 list</td>\n                                            <td md-cell class="no-border">{{ \'SETTINGS.PM2_LIST\' | translate}}</td>\n                                        </tr>\n                                        <tr>\n                                            <td md-cell class="no-border">pm2 start &lt;id | name&gt;</td>\n                                            <td md-cell class="no-border">{{ \'SETTINGS.PM2_START\' | translate}}</td>\n                                        </tr>\n                                        <tr>\n                                            <td md-cell class="no-border">pm2 stop &lt;id | name | all&gt;</td>\n                                            <td md-cell class="no-border">{{ \'SETTINGS.PM2_STOP\' | translate}}</td>\n                                        </tr>\n                                        <tr>\n                                            <td md-cell class="no-border">pm2 restart &lt;id | name&gt;</td>\n                                            <td md-cell class="no-border">{{ \'SETTINGS.PM2_RESTART\' | translate}}</td>\n                                        </tr>\n                                        <tr>\n                                            <td md-cell class="no-border">pm2 logs [id | name]</td>\n                                            <td md-cell class="no-border">{{ \'SETTINGS.PM2_LOGS\' | translate}}</td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                        </md-card>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/settings/views/updates/update/dialog.html",'<md-dialog aria-label="Update">\n    <form name="updateForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n            </div>\n        </md-toolbar>\n\n        <div md-background-bg layout="row" layout-align="start start">\n            <md-progress-linear md-mode="determinate" value="{{vm.progress}}" class="md-warn"></md-progress-linear>\n        </div>\n\n        <md-dialog-content ms-scroll>\n            <div layout="row" layout-align="center center">\n                <div ng-if="vm.updating" layout="column" layout-align="center center">\n                    <span class="text-center md-title">Grab a quick coffee and</span>\n                    <span class="text-center md-title">get back here as soon as completed!</span>\n                    <span class="text-center md-title">{{vm.output}}</span>\n                </div>\n                <div ng-if="!vm.updating">\n                    <div ng-if="vm.success" layout="column" layout-align="center center">\n                        <span class="text-center md-title">Update Completed! Thank you for your time.</span>\n                        <span class="text-center md-title">In order to complete the update,</span>\n                        <span class="text-center md-title">please click on reload button</span>\n                    </div>\n                    <div ng-if="!vm.success" layout="column" layout-align="center center">\n                        <span class="text-center md-title">Update Error!</span>\n                        <span class="text-center md-title">Please contact your administrator!</span>\n                        <span class="text-center md-title">{{vm.output}}</span>\n                    </div>\n                </div>\n                <img src="assets/images/business/users.jpg" alt="" width="128" height="128" />\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions ng-if="!vm.updating" layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.reload()" class="send-button md-warm md-raised" aria-label="RELOAD" translate="SETTINGS.RELOAD" translate-attr-aria-label="SETTINGS.RELOAD">\n                    RELOAD\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/settings/views/updates/updates.html",'<div id="updates" class="page-layout simple fullwidth doc-page">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-cog" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="SETTINGS.UPDATES">UPDATES</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- UPDATE CARD --\x3e\n            <div layout="row" ng-if="!vm.updating">\n                <md-card class="md-whiteframe-1dp padding-20" flex>\n                    <div layout="column" layout-align="center center">\n\n                        <span class="md-title md-accent-fg padding-20 text-bold" translate="SETTINGS.CURRENT_VERSION">CURRENT VERSION</span>\n\n                        <span class="md-display-3 padding-20">{{vm.version.current}}</span>\n\n                        <md-button href="https://wiki.xcallymotion.com/display/XMV/Motion+GUI#MotionGUI-Version{{vm.version.current}}" target="_blank" class="md-accent" title="CHANGELOG" aria-label="CHANGELOG" translate="SETTINGS.CHANGELOG" translate-attr-aria-label="SETTINGS.CHANGELOG">\n                            CHANGELOG\n                        </md-button>\n                    </div>\n                </md-card>\n                <md-card class="md-whiteframe-20dp padding-20" flex ng-if="vm.version.current != vm.version.latest">\n                    <div layout="column" layout-align="center center">\n\n                        <span class="md-title md-warn-fg padding-20 text-bold" translate="SETTINGS.NEW_VERSION">NEW VERSION</span>\n\n                        <span class="md-display-3 padding-20">{{vm.version.latest}}</span>\n\n                        <md-button href="https://wiki.xcallymotion.com/display/XMV/Motion+GUI#MotionGUI-Version{{vm.version.latest}}" target="_blank" class="md-accent" title="CHANGELOG" aria-label="CHANGELOG" translate="SETTINGS.CHANGELOG" translate-attr-aria-label="SETTINGS.CHANGELOG">\n                            CHANGELOG\n                        </md-button>\n                        <md-button ng-click="vm.updateConfirm($event)" class="md-raised md-warn" aria-label="CHANGELOG" translate="SETTINGS.UPDATE" translate-attr-aria-label="SETTINGS.UPDATE">UPDATE</md-button>\n                    </div>\n                </md-card>\n                <md-card class="md-whiteframe-1dp padding-20" flex ng-if="vm.version.current == vm.version.latest">\n                    <div layout="column" layout-align="center center">\n\n                        <span class="md-title md-warn-fg padding-20 text-bold" translate="SETTINGS.REMOTE_VERSION">REMOTE VERSION</span>\n\n                        <span class="md-subhead padding-20" translate="SETTINGS.NO_NEW_VERSION_AVAILABLE">NO NEW VERSION AVAILABLE</span>\n                    </div>\n                </md-card>\n            </div>\n            \x3c!-- / UPDATE CARD --\x3e\n\n            <div ng-if="vm.updating">\n                <md-card class="md-whiteframe-1dp padding-20" flex>\n                    <div layout="column" layout-align="center center">\n                        <span class="md-title md-accent-fg padding-20 text-bold" translate="SETTINGS.UPDATING">...</span>\n                        <md-progress-linear md-mode="determinate" class="md-accent padding-20" value="{{vm.progress}}"></md-progress-linear>\n                        <span class="md-display-1 padding-5 text-center">Grab a quick coffee and</span>\n                        <span class="md-display-1 padding-5 text-center">get back here as soon as completed</span>\n                        <img src="assets/images/business/users.jpg" alt="" width="40%" height="40%" />\n                    </div>\n                </md-card>\n            </div>\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- NO ADD BUTTON BUTTON --\x3e\n</div>'),e.put("app/main/apps/sms/views/realtime/agents/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="SMS.AGENTS">Agents</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query; vm.onInit()" on-collapse="vm.query.filter = undefined; vm.onInit()" debounce="300"></ms-search-bar>\n        \x3c!-- <md-button class="md-icon-button" ng-click="vm.showInfo($event)">\n      <i class="icon-information-outline grey-600-fg">\n        <md-tooltip>{{\'VOICE.INFO\' | translate}}</md-tooltip>\n      </i>\n    </md-button> --\x3e\n        <md-select ng-model="vm.query.globalStatusFilter" class="md-caption" ng-change="vm.query.pauseTypeFilter = \'\'; vm.onInit()">\n            <md-option ng-value="\'\'">{{ \'SMS.ALL\' | translate }}</md-option>\n            <md-option value="pause">{{ \'SMS.PAUSE\' | translate }}</md-option>\n            <md-option value="*pause">{{ \'SMS.PARTIALPAUSE\' | translate }}</md-option>\n            <md-option value="busy">{{ \'SMS.BUSY\' | translate }}</md-option>\n            <md-option value="idle">{{ \'SMS.IDLE\' | translate }}</md-option>\n        </md-select>\n\n        <md-select ng-if="vm.isPause(vm.query.globalStatusFilter)" ng-model="vm.query.pauseTypeFilter" class="md-caption" ng-change="vm.onInit()">\n            <md-option ng-value="\'\'">All</md-option>\n            <md-option value="DEFAULT PAUSE">DEFAULT PAUSE</md-option>\n            <md-option value="ACW">ACW</md-option>\n            <md-option value="LOGININPAUSE">LOGININPAUSE</md-option>\n            <md-option value="Auto-Pause">AUTOPAUSE</md-option>\n            <md-option ng-value="pause.name" ng-repeat="pause in vm.pauses.rows">{{pause.name}}</md-option>\n        </md-select>\n    </div>\n</md-toolbar>\n\n\x3c!-- AGENT TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.order" md-on-reorder="vm.onInit">\n            <tr md-row border="1">\n                <th class="bv text-center" colspan="3">{{ \'SMS.AGENT\' | translate }}</th>\n                <th class="bv bl text-center" colspan="2">{{ \'VOICE.VOICE\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="bv bl text-center" colspan="2">{{ \'CHAT.CHAT\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="bv bl text-center" colspan="2">{{ \'MAIL.MAIL\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="bv bl text-center" colspan="2">{{ \'SMS.SMS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="bv bl text-center" colspan="2">{{ \'OPENCHANNEL.OPENCHANNEL\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="bv bl text-center" colspan="2">{{ \'FAX.FAX\' | translate }}</th>\n                <th width="10px" class="bt bl" rowspan="2"></th>\n                \x3c!-- <th md-column>{{ \'VOICE.PHONE_STATE\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PHONE_STATUS\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PAUSE\' | translate }}</th>\n                <th md-column width="10px"></th> --\x3e\n            </tr>\n            <tr md-row>\n                <th class="bl" md-column md-order-by="fullname">{{ \'SMS.NAME\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatus">{{ \'SMS.STATUS\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatusTime">{{ \'SMS.TIMER\' | translate }}</th>\n\n                <th class="bl custom-column">{{ \'VOICE.STATUS\' | translate }}</th>\n                <th class="bl custom-column">Info</th>\n\n                <th ng-if="vm.license.chat" class="bl text-center">{{ \'CHAT.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'CHAT.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.mail" class="bl text-center">{{ \'MAIL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'MAIL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.messaging" class="bl text-center">{{ \'SMS.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'SMS.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.openchannel" class="bl text-center">{{ \'OPENCHANNEL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'OPENCHANNEL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.fax" class="bl text-center">{{ \'FAX.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'FAX.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.order.length">\n                <td md-cell colspan="17">\n                    <div layout="row" layout-align="center center">\n                        <span>{{ \'SMS.NO_AGENT_ONLINE\' | translate }}</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-select="vm.agents[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td class="bt padding-5">\n                    <div layout="row" layout-align="start center">\n                        <img class="avatar" ng-src="{{vm.agents[value].userpic && \'api/users/\'+vm.agents[value].id+\'/avatar\' || \'assets/images/avatars/profile.png\'}}">\n                        <div layout="column">\n                            <span>{{vm.agents[value].fullname}}</span>\n                            <span>{{vm.agents[value].internal}}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt">\n                    <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'busy\':\'indigo-100-bg\',\'*pause\':\'amber-50-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].globalStatus]">{{ vm.isPause(vm.agents[value].globalStatus) ? \'\' : vm.agents[value].globalStatus | uppercase }} {{ vm.isPause(vm.agents[value].globalStatus) ? (vm.isPartialPause(vm.agents[value].globalStatus) ? \'*\'+vm.agents[value].pauseType || \'DEFAULT PAUSE\'  : vm.agents[value].pauseType || \'DEFAULT PAUSE\') : \'\'}}</span>\n                </td>\n                <td class="bt custom-column">\n                    <timer start-time="vm.agents[value].globalStatusTime" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                </td>\n                <td class="bt bl">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'talking\':\'indigo-100-bg\',\'ringing\':\'orange-400-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].voiceStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt bl">\n                    <div layout="column">\n                        <span ng-if="vm.agents[value].queue" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].queue }}</span>\n                        <span ng-if="vm.agents[value].destconnectedlinenum" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].destconnectedlinenum }}</span>\n                        <span class="padding-5" ng-if="vm.agents[value].queue || vm.agents[value].destconnectedlinenum">\n                            <timer start-time="vm.agents[value].voiceStatusTime" interval="1000" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                        </span>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt">--</td>\n                <td class="bt">--</td> --\x3e\n                <td class="bt bl" ng-if="vm.license.chat">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt padding-5 text-center">{{ agent.chatCurrentCapacity }}/{{ agent.chatCapacity > 0 ? agent.chatCapacity : \'∞\' }}</td> --\x3e\n                <td md-number class="bt text-center font-size-20" ng-if="vm.license.chat" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.mail">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.mail" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.messaging">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.messaging" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.openchannel">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">4</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">89</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.openchannel" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.fax">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">7</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">2</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.fax" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxCurrentCapacity }}</td>\n                <td class="bl bt padding-5 text-center">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="4">\n                            <md-menu-item>\n                                <md-button ng-click="vm.logout(vm.agents[value], $event)" translate="SMS.LOGOUT">\n                                    Logout\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.queueAdd(vm.agents[value], $event)" translate="SMS.AGENTADD_QUEUE">\n                                    Add Agent In Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="SMS.PAUSE">Pause</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item>\n                                            <md-button ng-disabled=" vm.agents[value].voicePause && \'DEFAULT PAUSE\' === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value])"><em translate="SMS.DEFAULT_PAUSE">Default Pause</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.pauses.rows.length" ng-repeat="pause in vm.pauses.rows">\n                                            <md-button ng-disabled="vm.agents[value].voicePause && pause.name === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value], pause.name)">{{pause.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                            <md-menu-item ng-if="vm.isPause(vm.agents[value].globalStatus)">\n                                <md-button ng-click="vm.unPause(vm.agents[value])" translate="SMS.UNPAUSE">\n                                    Unpause\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'SMS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'SMS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'SMS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.filteredAgents.length}}"\n    md-on-paginate="vm.onInit" md-page-select></md-table-pagination>\n\x3c!-- / AGENT TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/sms/views/realtime/queues/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="SMS.QUEUES">Queues</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUE TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getQueues">\n            <tr md-row>\n                <th md-column md-order-by="name">{{ \'SMS.NAME\' | translate }}</th>\n                <th md-column>{{ \'SMS.LOGGED_IN\' | translate }}</th>\n                <th md-column>{{ \'SMS.PAUSED\' | translate }}</th>\n                <th md-column>{{ \'SMS.READY\' | translate }}</th>\n                <th md-column>{{ \'SMS.WAITING\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.queues">\n                <td md-cell colspan="7">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="SMS.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row md-select="vm.queues[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td md-cell>{{vm.queues[value].name}}</td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].loggedInDb || 0}} ({{vm.queues[value].loggedIn || 0}})</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].paused || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].available || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].waiting || 0}}</span>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="SMS.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="3">\n                            <md-menu-item>\n                                <md-button ng-click="vm.createOrEditSmsQueue($event, vm.queues[value])" translate="SMS.EDIT_QUEUE">\n                                    Edit Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.agentAdd($event, vm.queues[value])" translate="SMS.AGENTSADD_QUEUE">\n                                    Add Agents to queue\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'SMS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'SMS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'SMS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.count}}"\n    md-on-paginate="vm.getQueues" md-page-select></md-table-pagination>\n\x3c!-- / QUEUE TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/sms/views/realtime/realtime.html",'<div id="realtime" class="page-layout simple tabbed" layout="column" ng-cloak>\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SMS.AGENTS">Agents</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SMS.QUEUES">Queues</span>\n                </md-tab-label>\n            </md-tab>\n        </md-tabs>\n\n        <md-card ui-view></md-card>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n</div>'),e.put("app/main/apps/sms/views/smsAccounts/create/dialog.html",'<md-dialog class="smsAccount-dialog" aria-label="New SmsAccount">\n    <form name="smsAccountForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.smsAccount.name" ng-required="true" autofocus ng-disabled="!vm.newSmsAccount">\n                <div ng-messages="smsAccountForm[\'name\'].$error" ng-show="smsAccountForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.KEY">key</label>\n                <input type="text" name="key" ng-model="vm.smsAccount.key" md-maxlength="5" ng-required="true">\n                <div ng-messages="smsAccountForm[\'key\'].$error" ng-show="smsAccountForm[\'key\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.KEY_REQUIRED">key field is required</span>\n                    </div>\n\n                    <div ng-message="md-maxlength">\n                        <span translate="SMS.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 5}\'>key must have a maximum length equal to 5</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.MOTIONPROXY">MotionProxy</label>\n                <input type="url" name="remote" ng-model="vm.smsAccount.remote" md-maxlength="255" ng-required="true">\n                <div class="hint"><span translate="SMS.HELP.MOTIONPROXY"></span></div>\n                <div ng-messages="smsAccountForm[\'remote\'].$error" ng-show="smsAccountForm[\'remote\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.MOTIONPROXY_REQUIRED">MotionProxy field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="SMS.ERRORS.MOTIONPROXY_MUST_VALID_URL">MotionProxy must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                    <div ng-message="md-maxlength">\n                        <span translate="SMS.ERRORS.MOTIONPROXY_MAX_LENGTH" translate-values=\'{max: 255}\'>MotionProxy must have a maximum length equal to 255</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.LIST">List</label>\n                <md-select name="ListId" ng-model="vm.smsAccount.ListId" required>\n                    <md-option ng-value="ListId.id" ng-repeat="ListId in vm.lists">{{ ListId.name }}</md-option>\n                </md-select>\n                <div class="hint"><span translate="SMS.HELP.LIST"></span></div>\n                <div ng-messages="smsAccountForm[\'ListId\'].$error" ng-show="smsAccountForm[\'ListId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.LIST_REQUIRED">List field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.PHONE">Phone</label>\n                <input type="text" name="phone" ng-model="vm.smsAccount.phone" ng-required="true">\n                <div ng-messages="smsAccountForm[\'phone\'].$error" ng-show="smsAccountForm[\'phone\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.PHONE_REQUIRED">Phone field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.smsAccount.type" required>\n                    <md-option ng-value="\'twilio\'">Twilio</md-option>\n                    <md-option ng-value="\'skebby\'">Skebby</md-option>\n                    <md-option ng-value="\'connectel\'">Connectel</md-option>\n                    <md-option ng-value="\'clicksend\'">ClickSend</md-option>\n                    <md-option ng-value="\'plivo\'">Plivo</md-option>\n                </md-select>\n                <div ng-messages="smsAccountForm[\'type\'].$error" ng-show="smsAccountForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.smsAccount.type == \'twilio\'" class="md-block">\n                <label translate="SMS.ACCOUNTSID">AccountSID</label>\n                <input type="text" name="accountSid" ng-model="vm.smsAccount.accountSid" ng-required="true">\n                <div ng-messages="smsAccountForm[\'accountSid\'].$error" ng-show="smsAccountForm[\'accountSid\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.ACCOUNTSID_REQUIRED">AccountSID field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.smsAccount.type == \'plivo\'" class="md-block">\n                <label translate="SMS.AUTHID">AuthID</label>\n                <input type="text" name="authId" ng-model="vm.smsAccount.authId" ng-required="true">\n                <div ng-messages="smsAccountForm[\'authId\'].$error" ng-show="smsAccountForm[\'authId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.AUTHID_REQUIRED">AuthID field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.smsAccount.type == \'twilio\' || vm.smsAccount.type == \'connectel\' || vm.smsAccount.type == \'plivo\'" class="md-block">\n                <label translate="SMS.AUTHTOKEN">AuthToken</label>\n                <input type="text" name="authToken" ng-model="vm.smsAccount.authToken" ng-required="true">\n                <div ng-messages="smsAccountForm[\'authToken\'].$error" ng-show="smsAccountForm[\'authToken\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.AUTHTOKEN_REQUIRED">AuthToken field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.smsAccount.type == \'skebby\'" class="md-block">\n                <label translate="SMS.METHOD">Method</label>\n                <md-select name="smsMethod" ng-model="vm.smsAccount.smsMethod" required>\n                    <md-option ng-value="\'basic\'">Basic</md-option>\n                    <md-option ng-value="\'classic\'">Classic</md-option>\n                    <md-option ng-value="\'classic+\'">Classic+</md-option>\n                </md-select>\n                <div ng-messages="smsAccountForm[\'smsMethod\'].$error" ng-show="smsAccountForm[\'smsMethod\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.METHOD_REQUIRED">Method field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.smsAccount.type == \'skebby\' || vm.smsAccount.type == \'clicksend\'" class="md-block">\n                <label translate="SMS.USERNAME">Username</label>\n                <input type="text" name="username" ng-model="vm.smsAccount.username" ng-required="true">\n                <div ng-messages="smsAccountForm[\'username\'].$error" ng-show="smsAccountForm[\'username\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.smsAccount.type == \'skebby\' || vm.smsAccount.type == \'clicksend\'">\n                <label translate="SMS.PASSWORD">Password</label>\n                <input type="password" name="password" ng-model="vm.smsAccount.password" placeholder="Password" translate translate-attr-placeholder="SMS.PASSWORD" required>\n                <div ng-messages="smsAccountForm[\'password\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="SMS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="SMS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.smsAccount.description">\n                <div ng-messages="smsAccountForm[\'description\'].$error" ng-show="smsAccountForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSmsAccount" ng-click="vm.saveSmsAccount()" class="send-button md-accent md-raised" ng-disabled="smsAccountForm.$invalid || smsAccountForm.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSmsAccount" ng-click="vm.addNewSmsAccount()" class="send-button md-accent md-raised" ng-disabled="smsAccountForm.$invalid" aria-label="ADD" translate="SMS.ADD_SMSACCOUNT" translate-attr-aria-label="SMS.ADD_SMSACCOUNT">\n                    ADD SMSACCOUNT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSmsAccount" ng-click="vm.deleteSmsAccount($event)" aria-label="DELETE" translate translate-attr-aria-label="SMS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="SMS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/apps/agent/dialog.html",'<md-dialog class="smsAccount-dialog" aria-label="New SmsAccount">\n    <form name="smsAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.AGENT">Agent</label>\n                <md-select name="agent" ng-model="vm.agent.agent" required autofocus>\n                    <md-option ng-value="agent.name" ng-repeat="agent in vm.agents">{{ agent.name }}</md-option>\n                </md-select>\n                <div ng-messages="smsAccountFormApp[\'agent\'].$error" ng-show="smsAccountFormApp[\'agent\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.AGENT_REQUIRED">Agent field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.agent.timeout" min="0" max="2147483" ng-required="true">\n                <div ng-messages="smsAccountFormApp[\'timeout\'].$error" ng-show="smsAccountFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="SMS.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="SMS.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveSmsAccountApp()" class="send-button md-accent md-raised" ng-disabled="smsAccountFormApp.$invalid || smsAccountFormApp.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/apps/autoreply/dialog.html",'<md-dialog class="smsAccount-dialog" aria-label="New SmsAccount">\n    <form name="smsAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.TIMES">times</label>\n                <md-select name="times" ng-model="vm.autoreply.times" required autofocus>\n                    <md-option ng-value="1">One Time</md-option>\n                    <md-option ng-value="0">Always</md-option>\n                </md-select>\n                <div ng-messages="smsAccountFormApp[\'times\'].$error" ng-show="smsAccountFormApp[\'times\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.TIMES_REQUIRED">times field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.TEXT">Text</label>\n                <textarea name="text" ng-model="vm.autoreply.text" md-maxlength="255" required></textarea>\n\n                <div ng-messages="smsAccountFormApp[\'text\'].$error" ng-show="smsAccountFormApp[\'text\'].$touched" role="alert">\n\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.TEXT_REQUIRED">Text field is required</span>\n                    </div>\n\n\n                    <div ng-message="md-maxlength">\n                        <span translate="SMS.ERRORS.TEXT_MAX_LENGTH" translate-values=\'{max: 255}\'>Text must have a maximum length equal to 255</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveSmsAccountApp()" class="send-button md-accent md-raised" ng-disabled="smsAccountFormApp.$invalid || smsAccountFormApp.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/apps/close/dialog.html",'<md-dialog class="smsAccount-dialog" aria-label="New SmsAccount">\n    <form name="smsAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.DISPOSITION">Disposition</label>\n                <input type="text" name="disposition" ng-model="vm.close.disposition" ng-required="true" autofocus>\n                <div ng-messages="smsAccountFormApp[\'disposition\'].$error" ng-show="smsAccountFormApp[\'disposition\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.DISPOSITION_REQUIRED">Disposition field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveSmsAccountApp()" class="send-button md-accent md-raised" ng-disabled="smsAccountFormApp.$invalid || smsAccountFormApp.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/apps/gotoif/dialog.html",'<md-dialog class="smsAccount-dialog" aria-label="New SmsAccount">\n    <form name="smsAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.CONDITION">Condition</label>\n                <input type="text" name="condition" ng-model="vm.gotoif.condition" ng-required="true" autofocus>\n                <div ng-messages="smsAccountFormApp[\'condition\'].$error" ng-show="smsAccountFormApp[\'condition\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.CONDITION_REQUIRED">Condition field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.TRUEPRIORITY">truepriority</label>\n                <input type="number" name="truepriority" ng-model="vm.gotoif.truepriority" min="1" ng-required="true">\n                <div ng-messages="smsAccountFormApp[\'truepriority\'].$error" ng-show="smsAccountFormApp[\'truepriority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.TRUEPRIORITY_REQUIRED">truepriority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="SMS.ERRORS.TRUEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">truepriority must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.FALSEPRIORITY">falsepriority</label>\n                <input type="number" name="falsepriority" ng-model="vm.gotoif.falsepriority" min="1" ng-required="true">\n                <div ng-messages="smsAccountFormApp[\'falsepriority\'].$error" ng-show="smsAccountFormApp[\'falsepriority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.FALSEPRIORITY_REQUIRED">falsepriority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="SMS.ERRORS.FALSEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">falsepriority must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveSmsAccountApp()" class="send-button md-accent md-raised" ng-disabled="smsAccountFormApp.$invalid || smsAccountFormApp.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/apps/gotop/dialog.html",'<md-dialog class="smsAccount-dialog" aria-label="New SmsAccount">\n    <form name="smsAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.PRIORITY">Priority</label>\n                <input type="number" name="priority" ng-model="vm.gotop.priority" min="0" ng-required="true" autofocus>\n                <div ng-messages="smsAccountFormApp[\'priority\'].$error" ng-show="smsAccountFormApp[\'priority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.PRIORITY_REQUIRED">Priority field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="SMS.ERRORS.PRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Priority must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveSmsAccountApp()" class="send-button md-accent md-raised" ng-disabled="smsAccountFormApp.$invalid || smsAccountFormApp.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/apps/interval/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select ng-model="vm.type">\n                    <md-option ng-value="type" ng-repeat=\'type in vm.types\'>{{ type | ucfirst }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.type === \'list\'">\n                <label translate="TOOLS.INTERVALS">Intervals</label>\n                <md-select ng-model="vm.interval.IntervalId">\n                    <md-option ng-value="interval.id" ng-repeat="interval in vm.intervals.rows">{{ interval.name }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            \x3c!-- TIMERANGE START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.TIME_RANGE">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <div class="md-block" flex>\n                    <mdp-time-picker name="timeRangeFrom" mdp-placeholder="FROM" ng-model="vm.timeRangeFrom" mdp-format="HH:mm" mdp-auto-switch="true">\n                        <div ng-messages="intervalForm.timeRangeFrom.$error" ng-show="intervalForm.timeRangeFrom.$touched" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_FROM_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n                <div class="md-block" flex ng-if="vm.timeRangeFrom">\n                    <mdp-time-picker name="timeRangeTo" mdp-placeholder="TO*" ng-model="vm.timeRangeTo" mdp-format="HH:mm" mdp-auto-switch="true" required>\n                        <div ng-messages="intervalForm.timeRangeTo.$error" ng-show="intervalForm.timeRangeTo.$invalid" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_INVALID">Time Range To field is invalid</span>\n                            </div>\n                            <div ng-message="required">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_REQUIRED">Time Range To field is required</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n            \x3c!-- TIMERANGE END --\x3e\n\n            \x3c!-- DAYSOFWEEK START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.WEEK_DAYS">Week Days</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.dayOfWeekFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex class="md-block" ng-if="vm.dayOfWeekFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="dayOfWeekTo" ng-model="vm.dayOfWeekTo">\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.dayOfWeekTo.$error" ng-show="intervalForm.dayOfWeekTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- DAYSOFWEEK END --\x3e\n\n            \x3c!-- MONTHDAY START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTH_DAYS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthDayFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthDayFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthDayTo" ng-model="vm.monthDayTo">\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthDayTo.$error" ng-show="intervalForm.monthDayTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTHDAY END --\x3e\n\n            \x3c!-- MONTH START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTHS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthTo" ng-model="vm.monthTo">\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthTo.$error" ng-show="intervalForm.monthTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTH END --\x3e\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/apps/noop/dialog.html",'<md-dialog class="smsAccount-dialog" aria-label="New SmsAccount">\n    <form name="smsAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.VALUE">Value</label>\n                <input type="text" name="value" ng-model="vm.noop.value" autofocus>\n                <div ng-messages="smsAccountFormApp[\'value\'].$error" ng-show="smsAccountFormApp[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveSmsAccountApp()" class="send-button md-accent md-raised" ng-disabled="smsAccountFormApp.$invalid || smsAccountFormApp.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/apps/queue/dialog.html",'<md-dialog class="smsAccount-dialog" aria-label="New SmsAccount">\n    <form name="smsAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.QUEUE">Queue</label>\n                <md-select name="queue" ng-model="vm.queue.queue" required autofocus>\n                    <md-option ng-value="queue.name" ng-repeat="queue in vm.queues">{{ queue.name }}</md-option>\n                </md-select>\n                <div ng-messages="smsAccountFormApp[\'queue\'].$error" ng-show="smsAccountFormApp[\'queue\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.QUEUE_REQUIRED">Queue field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.queue.timeout" min="0" max="2147483" ng-required="true">\n                <div ng-messages="smsAccountFormApp[\'timeout\'].$error" ng-show="smsAccountFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="SMS.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="SMS.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveSmsAccountApp()" class="send-button md-accent md-raised" ng-disabled="smsAccountFormApp.$invalid || smsAccountFormApp.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/apps/system/dialog.html",'<md-dialog class="smsAccount-dialog" aria-label="New SmsAccount">\n    <form name="smsAccountFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.COMMAND">Command</label>\n                <input type="text" name="command" ng-model="vm.system.command" ng-required="true" autofocus>\n                <div ng-messages="smsAccountFormApp[\'command\'].$error" ng-show="smsAccountFormApp[\'command\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.COMMAND_REQUIRED">Command field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.VARIABLE">Variable</label>\n                <md-select name="variable" ng-model="vm.system.variable">\n                    <md-option ng-value="variable.name" ng-repeat="variable in vm.variables">{{ variable.name }}</md-option>\n                    <md-option ng-value="\'\'">None</md-option>\n                </md-select>\n                <div ng-messages="smsAccountFormApp[\'variable\'].$error" ng-show="smsAccountFormApp[\'variable\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.VARIABLE_REQUIRED">Variable field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveSmsAccountApp()" class="send-button md-accent md-raised" ng-disabled="smsAccountFormApp.$invalid || smsAccountFormApp.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/smsCannedAnswers/dialog.html",'<md-dialog class="smsCannedAnswer-dialog" aria-label="New SmsCannedAnswer">\n    <form name="smsCannedAnswerForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.KEY">Key</label>\n                <input type="" name="key" ng-model="vm.smsCannedAnswer.key" md-maxlength="255" ng-required="true" autofocus>\n                <div ng-messages="smsCannedAnswerForm[\'key\'].$error" ng-show="smsCannedAnswerForm[\'key\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.KEY_REQUIRED">Key field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.VALUE">Value</label>\n                <textarea name="value" ng-model="vm.smsCannedAnswer.value" required></textarea>\n\n                <div ng-messages="smsCannedAnswerForm[\'value\'].$error" ng-show="smsCannedAnswerForm[\'value\'].$touched" role="alert">\n\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.smsCannedAnswer.description">\n                <div ng-messages="smsCannedAnswerForm[\'description\'].$error" ng-show="smsCannedAnswerForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSmsCannedAnswer" ng-click="vm.saveSmsCannedAnswer()" class="send-button md-accent md-raised" ng-disabled="smsCannedAnswerForm.$invalid || smsCannedAnswerForm.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSmsCannedAnswer" ng-click="vm.addNewSmsCannedAnswer()" class="send-button md-accent md-raised" ng-disabled="smsCannedAnswerForm.$invalid" aria-label="ADD" translate="SMS.ADD_SMSCANNEDANSWER" translate-attr-aria-label="SMS.ADD_SMSCANNEDANSWER">\n                    ADD SMSCANNEDANSWER\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSmsCannedAnswer" ng-click="vm.deleteSmsCannedAnswer($event)" aria-label="DELETE" translate translate-attr-aria-label="SMS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="SMS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/smsDispositions/dialog.html",'<md-dialog class="smsDisposition-dialog" aria-label="New SmsDisposition">\n    <form name="smsDispositionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.smsDisposition.name" ng-required="true" autofocus>\n                <div ng-messages="smsDispositionForm[\'name\'].$error" ng-show="smsDispositionForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSmsDisposition" ng-click="vm.saveSmsDisposition()" class="send-button md-accent md-raised" ng-disabled="smsDispositionForm.$invalid || smsDispositionForm.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSmsDisposition" ng-click="vm.addNewSmsDisposition()" class="send-button md-accent md-raised" ng-disabled="smsDispositionForm.$invalid" aria-label="ADD" translate="SMS.ADD_SMSDISPOSITION" translate-attr-aria-label="SMS.ADD_SMSDISPOSITION">\n                    ADD SMSDISPOSITION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSmsDisposition" ng-click="vm.deleteSmsDisposition($event)" aria-label="DELETE" translate translate-attr-aria-label="SMS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="SMS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsAccounts/edit/view.html",'<div id="sms-smsAccount" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-smsAccounts-button md-icon-button" aria-label="Go to smsAccounts" ng-click="vm.gotoSmsAccounts()" translate translate-attr-aria-label="SMS.GO_TO_SMSACCOUNTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="smsAccount-image" hide-xs>\n                    <img ng-src="assets/images/business/smsAccounts.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.smsAccount.id}}\n                        <span ng-if="vm.smsAccount.name">{{vm.smsAccount.name}}</span>\n                        <span ng-if="vm.smsAccount.exten">{{vm.smsAccount.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="SMS.CREATED_AT"></span> <span>{{vm.smsAccount.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveSmsAccount()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (notificationForm.$invalid) || (proxyForm.$invalid) || (smsDispositionsForm.$invalid) || (smsCannedAnswersForm.$invalid) || (actionsForm.$invalid) || (interactionsForm.$invalid)"\n                translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SMS.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="smsAccount-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="SMS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.smsAccount.name" ng-required="true" autofocus ng-disabled="true">\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.KEY">key</label>\n                                <input type="text" name="key" ng-model="vm.smsAccount.key" md-maxlength="5" ng-required="true">\n                                <div ng-messages="generalForm[\'key\'].$error" ng-show="generalForm[\'key\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.KEY_REQUIRED">key field is required</span>\n                                    </div>\n\n                                    <div ng-message="md-maxlength">\n                                        <span translate="SMS.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 5}\'>key must have a maximum length equal to 5</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.LIST">List</label>\n                                <md-select name="ListId" ng-model="vm.smsAccount.ListId" required>\n                                    <md-option ng-value="ListId.id" ng-repeat="ListId in vm.lists">{{ ListId.name }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="SMS.HELP.LIST"></span></div>\n                                <div ng-messages="generalForm[\'ListId\'].$error" ng-show="generalForm[\'ListId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.LIST_REQUIRED">List field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.PHONE">Phone</label>\n                                <input type="text" name="phone" ng-model="vm.smsAccount.phone" ng-required="true">\n                                <div ng-messages="generalForm[\'phone\'].$error" ng-show="generalForm[\'phone\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.PHONE_REQUIRED">Phone field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.TYPE">Type</label>\n                                <md-select name="type" ng-model="vm.smsAccount.type" required>\n                                    <md-option ng-value="\'twilio\'">Twilio</md-option>\n                                    <md-option ng-value="\'skebby\'">Skebby</md-option>\n                                    <md-option ng-value="\'connectel\'">Connectel</md-option>\n                                    <md-option ng-value="\'clicksend\'">ClickSend</md-option>\n                                    <md-option ng-value="\'plivo\'">Plivo</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'type\'].$error" ng-show="generalForm[\'type\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.smsAccount.type == \'twilio\'" class="md-block">\n                                <label translate="SMS.ACCOUNTSID">AccountSID</label>\n                                <input type="text" name="accountSid" ng-model="vm.smsAccount.accountSid" ng-required="true">\n                                <div ng-messages="generalForm[\'accountSid\'].$error" ng-show="generalForm[\'accountSid\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.ACCOUNTSID_REQUIRED">AccountSID field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.smsAccount.type == \'plivo\'" class="md-block">\n                                <label translate="SMS.AUTHID">AuthID</label>\n                                <input type="text" name="authId" ng-model="vm.smsAccount.authId" ng-required="true">\n                                <div ng-messages="generalForm[\'authId\'].$error" ng-show="generalForm[\'authId\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.AUTHID_REQUIRED">AuthID field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.smsAccount.type == \'twilio\' || vm.smsAccount.type == \'connectel\' || vm.smsAccount.type == \'plivo\'" class="md-block">\n                                <label translate="SMS.AUTHTOKEN">AuthToken</label>\n                                <input type="text" name="authToken" ng-model="vm.smsAccount.authToken" ng-required="true">\n                                <div ng-messages="generalForm[\'authToken\'].$error" ng-show="generalForm[\'authToken\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.AUTHTOKEN_REQUIRED">AuthToken field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.smsAccount.type == \'skebby\'" class="md-block">\n                                <label translate="SMS.METHOD">Method</label>\n                                <md-select name="smsMethod" ng-model="vm.smsAccount.smsMethod" required>\n                                    <md-option ng-value="\'basic\'">Basic</md-option>\n                                    <md-option ng-value="\'classic\'">Classic</md-option>\n                                    <md-option ng-value="\'classic+\'">Classic+</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'smsMethod\'].$error" ng-show="generalForm[\'smsMethod\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.METHOD_REQUIRED">Method field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.smsAccount.type == \'skebby\' || vm.smsAccount.type == \'clicksend\'" class="md-block">\n                                <label translate="SMS.USERNAME">Username</label>\n                                <input type="text" name="username" ng-model="vm.smsAccount.username" ng-required="true">\n                                <div ng-messages="generalForm[\'username\'].$error" ng-show="generalForm[\'username\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block" ng-if="vm.smsAccount.type == \'skebby\' || vm.smsAccount.type == \'clicksend\'">\n                                <label translate="SMS.PASSWORD">Password</label>\n                                <input type="password" name="password" ng-model="vm.smsAccount.password" placeholder="Password" translate translate-attr-placeholder="SMS.PASSWORD" required>\n                                <div ng-messages="generalForm[\'password\'].$error" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="SMS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <md-input-container ng-if="(vm.smsAccount.type == \'skebby\' && vm.smsAccount.smsMethod == \'classic+\') || vm.smsAccount.type == \'connectel\' || vm.smsAccount.type == \'clicksend\' || vm.smsAccount.type == \'plivo\'" class="md-block">\n                                <label translate="SMS.SENDERSTRING">SenderString</label>\n                                <input type="text" name="senderString" ng-model="vm.smsAccount.senderString" md-maxlength="11" ng-pattern="/^[A-Za-z0-9\\.\\s]*$/i">\n                                <div ng-messages="generalForm[\'senderString\'].$error" ng-show="generalForm[\'senderString\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.SENDERSTRING_REQUIRED">SenderString field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="SMS.ERRORS.SENDERSTRING_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\s]*$/i\' }">SenderString must be valid pattern </span>\n                                    </div>\n\n                                    <div ng-message="md-maxlength">\n                                        <span translate="SMS.ERRORS.SENDERSTRING_MAX_LENGTH" translate-values=\'{max: 11}\'>SenderString must have a maximum length equal to 11</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="(vm.smsAccount.type == \'skebby\' && vm.smsAccount.smsMethod == \'classic+\') || vm.smsAccount.type == \'connectel\' || vm.smsAccount.type == \'clicksend\'" class="md-block">\n                                <md-switch ng-model="vm.smsAccount.deliveryReport" aria-label="deliveryReport"><span translate="SMS.DELIVERYREPORT">deliveryReport</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.WAITFORTHEASSIGNEDAGENT">WaitForTheAssignedAgent</label>\n                                <input type="number" name="waitForTheAssignedAgent" ng-model="vm.smsAccount.waitForTheAssignedAgent" min="1" max="2147483" ng-required="true">\n                                <div ng-messages="generalForm[\'waitForTheAssignedAgent\'].$error" ng-show="generalForm[\'waitForTheAssignedAgent\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.WAITFORTHEASSIGNEDAGENT_REQUIRED">WaitForTheAssignedAgent field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="SMS.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">WaitForTheAssignedAgent must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="SMS.ERRORS.WAITFORTHEASSIGNEDAGENT_MUST_BE_LESS_THAN_OR_EQUAL_TO">WaitForTheAssignedAgent must be a valid greater or equal than</span> <span>2147483</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.smsAccount.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.RECEIVEURL">receiveUrl</label>\n                                <div layout="row" layout-align="center center">\n                                    <button class="md-button md-fab md-mini md-primary" ngclipboard data-clipboard-target="#copytoclipboard-receiveUrl" ngclipboard-success="vm.alert({title: \'copied to clipboard\', msg: e.text});" ngclipboard-error="vm.alert({title: \'error\', msg: \'copy to clipboard failed\'});">\n                      <md-icon md-font-icon="icon-clipboard-text"></md-icon>\n                  </button>\n                                    <input class="md-input" type="text" id="copytoclipboard-receiveUrl" name="receiveUrl" ng-value="vm.smsAccount.remote + \'/api/sms/accounts/\' + vm.smsAccount.id + \'/notify?token=\' + vm.smsAccount.token" ng-readonly="true">\n                                </div>\n                                <div class="hint"><span translate="SMS.HELP.RECEIVEURL"></span></div>\n                            </md-input-container>\n                            <md-input-container ng-if="( (vm.smsAccount.type == \'skebby\' && vm.smsAccount.smsMethod == \'classic+\') || vm.smsAccount.type == \'connectel\' || vm.smsAccount.type == \'clicksend\' ) && vm.smsAccount.deliveryReport" class="md-block">\n                                <label translate="SMS.DELIVERYREPORTURL">deliveryReportUrl</label>\n                                <div layout="row" layout-align="center center">\n                                    <button class="md-button md-fab md-mini md-primary" ngclipboard data-clipboard-target="#copytoclipboard-deliveryReportUrl" ngclipboard-success="vm.alert({title: \'copied to clipboard\', msg: e.text});" ngclipboard-error="vm.alert({title: \'error\', msg: \'copy to clipboard failed\'});">\n                      <md-icon md-font-icon="icon-clipboard-text"></md-icon>\n                  </button>\n                                    <input class="md-input" type="text" id="copytoclipboard-deliveryReportUrl" name="deliveryReportUrl" ng-value="vm.smsAccount.remote + \'/api/sms/accounts/\' + vm.smsAccount.id + \'/status?token=\' + vm.smsAccount.token" ng-readonly="true">\n                                </div>\n                                <div class="hint"><span translate="SMS.HELP.DELIVERYREPORTURL"></span></div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="smsAccount-detail-form-container notification md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="SMS.NOTIFICATION">NOTIFICATION</div>\n                        </div>\n                        <form name="notificationForm" novalidate>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.smsAccount.notificationSound" aria-label="notificationSound"><span translate="SMS.NOTIFICATIONSOUND">notificationSound</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.smsAccount.notificationShake" aria-label="notificationShake"><span translate="SMS.NOTIFICATIONSHAKE">notificationShake</span></md-switch>\n                            </md-input-container>\n                            <div class="md-block">\n                                <label class="md-caption grey-fg" translate="SMS.NOTIFICATIONTEMPLATE">notificationTemplate</label>\n                                <textarea aria-label="notificationTemplate notificationTemplate" ckeditor="{ skin: \'office2013\', language: \'en\', allowedContent: true, extraPlugins: \'font,colorbutton,autoembed,autocorrect,googlethisterm,pastebase64\', toolbarGroups: [{ name: \'styles\', groups: [\'styles\'] }, { name: \'clipboard\', groups: [\'undo\'] }, { name: \'colors\', groups: [\'colors\'] }, { name: \'basicstyles\', groups: [\'basicstyles\'] }, { name: \'paragraph\', groups: [\'list\', \'indent\', \'align\'] }, { name: \'mode\' }], autocorrect_enabled: true, disableNativeSpellChecker: false, removePlugins: \'magicline\' }"\n                                    ng-model="vm.smsAccount.notificationTemplate"></textarea>\n                            </div>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SMS.ADVANCED">ADVANCED</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="smsAccount-detail-form-container proxy md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="SMS.PROXY">PROXY</div>\n                        </div>\n                        <form name="proxyForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.TOKEN">token</label>\n                                <input type="text" name="token" ng-model="vm.smsAccount.token" autofocus ng-disabled="true">\n                                <div ng-messages="proxyForm[\'token\'].$error" ng-show="proxyForm[\'token\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.TOKEN_REQUIRED">token field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.MOTIONPROXY">MotionProxy</label>\n                                <input type="url" name="remote" ng-model="vm.smsAccount.remote" md-maxlength="255" ng-required="true">\n                                <div class="hint"><span translate="SMS.HELP.MOTIONPROXY"></span></div>\n                                <div ng-messages="proxyForm[\'remote\'].$error" ng-show="proxyForm[\'remote\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.MOTIONPROXY_REQUIRED">MotionProxy field is required</span>\n                                    </div>\n                                    <div ng-message="url">\n                                        <span translate="SMS.ERRORS.MOTIONPROXY_MUST_VALID_URL">MotionProxy must be a valid url http://www.xcally.com</span>\n                                    </div>\n\n                                    <div ng-message="md-maxlength">\n                                        <span translate="SMS.ERRORS.MOTIONPROXY_MAX_LENGTH" translate-values=\'{max: 255}\'>MotionProxy must have a maximum length equal to 255</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SMS.DISPOSITIONS">DISPOSITIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="smsAccount-detail-form-container smsdispositions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="SmsAccountSmsDispositionsController as vm_dc" ng-init="vm_dc.init(vm.smsAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedSmsAccountSmsDispositions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="SMS.SMSDISPOSITIONS">SmsDispositions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditSmsAccountSmsDisposition($event)" aria-label="add smsDisposition" translate translate-attr-label="SMS.ADD_SMSDISPOSITION">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedSmsAccountSmsDispositions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedSmsAccountSmsDispositions.length}} {{vm_dc.selectedSmsAccountSmsDispositions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedSmsAccountSmsDispositions" csv-label="true" filename="smsAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedSmsAccountSmsDispositions($event)" aria-label="delete selected" translate translate-attr-label="SMSACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedSmsAccountSmsDispositions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getSmsAccountSmsDispositions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'SMS.ID\' | translate }}</th>\n                                            <th md-column md-order-by="name">{{ \'SMS.NAME\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'SMS.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="smsDisposition" md-select-id="id" ng-repeat="smsDisposition in vm_dc.smsAccountSmsDispositions.rows">\n                                            <td ng-click="vm_dc.createOrEditSmsAccountSmsDisposition($event, smsDisposition)" md-cell>{{smsDisposition.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditSmsAccountSmsDisposition($event, smsDisposition)" md-cell>{{smsDisposition.name}}</td>\n                                            <td ng-click="vm_dc.createOrEditSmsAccountSmsDisposition($event, smsDisposition)" md-cell>{{smsDisposition.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="SMS.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditSmsAccountSmsDisposition($event, smsDisposition)" translate="SMS.EDIT_SMSDISPOSITION">\n                                                                Edit SmsDisposition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(smsDisposition, $event)" translate="SMS.DELETE_SMSDISPOSITION">\n                                                                Delete SmsDisposition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.smsAccountSmsDispositions.rows.length">\n                                            <td md-cell colspan="5">\n                                                <span class="text-boxed-ligth" translate="SMS.NO_SMSDISPOSITION_AVAILABLE">No smsdisposition available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'SMS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'SMS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'SMS.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.smsAccountSmsDispositions.count}}" md-on-paginate="vm_dc.getSmsAccountSmsDispositions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SMS.CANNEDANSWERS">CANNEDANSWERS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="smsAccount-detail-form-container smscannedanswers md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="SmsAccountSmsCannedAnswersController as vm_dc" ng-init="vm_dc.init(vm.smsAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedSmsAccountSmsCannedAnswers.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="SMS.SMSCANNEDANSWERS">SmsCannedAnswers</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditSmsAccountSmsCannedAnswer($event)" aria-label="add smsCannedAnswer" translate translate-attr-label="SMS.ADD_SMSCANNEDANSWER">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedSmsAccountSmsCannedAnswers.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedSmsAccountSmsCannedAnswers.length}} {{vm_dc.selectedSmsAccountSmsCannedAnswers.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedSmsAccountSmsCannedAnswers" csv-label="true" filename="smsAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedSmsAccountSmsCannedAnswers($event)" aria-label="delete selected" translate translate-attr-label="SMSACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedSmsAccountSmsCannedAnswers" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getSmsAccountSmsCannedAnswers">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'SMS.ID\' | translate }}</th>\n                                            <th md-column md-order-by="key">{{ \'SMS.KEY\' | translate }}</th>\n                                            <th md-column md-order-by="value">{{ \'SMS.VALUE\' | translate }}</th>\n                                            <th md-column md-order-by="description">{{ \'SMS.DESCRIPTION\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'SMS.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="smsCannedAnswer" md-select-id="id" ng-repeat="smsCannedAnswer in vm_dc.smsAccountSmsCannedAnswers.rows">\n                                            <td ng-click="vm_dc.createOrEditSmsAccountSmsCannedAnswer($event, smsCannedAnswer)" md-cell>{{smsCannedAnswer.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditSmsAccountSmsCannedAnswer($event, smsCannedAnswer)" md-cell>{{smsCannedAnswer.key}}</td>\n                                            <td ng-click="vm_dc.createOrEditSmsAccountSmsCannedAnswer($event, smsCannedAnswer)" md-cell>{{smsCannedAnswer.value}}</td>\n                                            <td ng-click="vm_dc.createOrEditSmsAccountSmsCannedAnswer($event, smsCannedAnswer)" md-cell>{{smsCannedAnswer.description}}</td>\n                                            <td ng-click="vm_dc.createOrEditSmsAccountSmsCannedAnswer($event, smsCannedAnswer)" md-cell>{{smsCannedAnswer.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="SMS.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditSmsAccountSmsCannedAnswer($event, smsCannedAnswer)" translate="SMS.EDIT_SMSCANNEDANSWER">\n                                                                Edit SmsCannedAnswer\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(smsCannedAnswer, $event)" translate="SMS.DELETE_SMSCANNEDANSWER">\n                                                                Delete SmsCannedAnswer\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.smsAccountSmsCannedAnswers.rows.length">\n                                            <td md-cell colspan="7">\n                                                <span class="text-boxed-ligth" translate="SMS.NO_SMSCANNEDANSWER_AVAILABLE">No smscannedanswer available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'SMS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'SMS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'SMS.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.smsAccountSmsCannedAnswers.count}}" md-on-paginate="vm_dc.getSmsAccountSmsCannedAnswers" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SMS.ACTIONS">ACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="smsAccount-detail-form-container actions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="SmsAccountActionsController as vm_ac" ng-init="vm_ac.init(vm.smsAccount)" class="content" md-background-bg layout="row" layout-align="start start">\n                            \x3c!-- SIDENAV --\x3e\n                            <div class="navigation-simple sidenav main-sidenav md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="20">\n                                \x3c!-- SIDENAV CONTENT --\x3e\n                                <md-list class="no-padding">\n                                    <md-subheader class="md-no-sticky">\n                                        <span translate="VOICE.APPLICATIONS_LIST">\n          Applications List\n        </span>\n                                    </md-subheader>\n                                </md-list>\n                                <md-divider></md-divider>\n                                <md-list ng-sortable="vm_ac.list">\n                                    <md-list-item class="handle" ng-repeat="a in vm_ac.apps">\n                                        <md-icon md-font-icon="{{a.icon}}" class="s16"></md-icon>\n                                        <p class="text-truncate" translate="SMS.{{(a.alias || a.appType) | uppercase}}">{{a.alias || a.appType}}</p>\n                                    </md-list-item>\n                                </md-list>\n                                \x3c!-- / SIDENAV CONTENT --\x3e\n                            </div>\n                            \x3c!-- / SIDENAV --\x3e\n                            <div flex></div>\n                            \x3c!-- MAIN --\x3e\n                            <div class="main scrollable md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="75">\n                                <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_ac.selectedSmsAccountApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">Drag & Drop Routing</span>\n                                        <div flex></div>\n                                        <ms-search-bar on-search="vm_ac.query.filter = query" on-collapse="vm_ac.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    </div>\n                                </md-toolbar>\n                                <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_ac.selectedSmsAccountApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">{{vm_ac.selectedSmsAccountApps.length}} {{vm_ac.selectedSmsAccountApps.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                        <div flex></div>\n                                        <md-button ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_ac.deleteSelectedSmsAccountApps($event)" aria-label="delete selected" translate translate-attr-label="SMS.DELETE_SELECTED">\n                                            <md-icon md-font-icon="icon-delete"></md-icon>\n                                        </md-button>\n                                    </div>\n                                </md-toolbar>\n\n                                \x3c!-- QUEUES TABLE --\x3e\n                                <md-table-container>\n                                    <table md-table md-row-select multiple ng-model="vm_ac.selectedSmsAccountApps">\n                                        <thead md-head>\n                                            <tr md-row>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px">\n                                                    <span translate="VOICE.PRIORITY">Priority</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Type</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Appdata</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Interval</span>\n                                                </th>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px"></th>\n                                            </tr>\n                                        </thead>\n                                        <tbody md-body ng-sortable="vm_ac.applications">\n                                            <tr md-row md-select="app" md-select-id="id" ng-repeat="app in vm_ac.smsAccountApps.rows | filter: vm_ac.query.filter">\n                                                <td md-cell>\n                                                    <md-icon md-font-icon="icon-drag-vertical" class="s16 handle"></md-icon>\n                                                </td>\n                                                <td md-cell ng-click="vm_ac.editSmsAccountApp($event, $index)"><span>{{app.priority}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editSmsAccountApp($event, $index)">{{app.app.toLowerCase() === \'agi\' ? \'Cally-Square\' : app.app | ucfirst}}<span ng-if="app.appType.toLowerCase() === \'custom\'">*</span></td>\n                                                <td md-cell ng-click="vm_ac.editSmsAccountApp($event, $index)"><span class="text-truncate" style="width:200px">{{app.appdata}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editInterval($event, $index)">{{app.IntervalId ? \'From List\' : app.interval}}</td>\n                                                <td md-cell>\n                                                    <md-button ng-click="vm_ac.editInterval($event, $index)" class="md-icon-button" aria-label="Interval">\n                                                        <md-icon md-font-icon="icon-timer"></md-icon>\n                                                        <md-tooltip>\n                                                            {{app.IntervalId ? \'From List\' : (app.interval === \'*,*,*,*\' ? \'Always\' : \'Custom\')}}\n                                                        </md-tooltip>\n                                                    </md-button>\n                                                </td>\n                                                <td md-cell class="actions">\n                                                    <md-menu>\n                                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                        </md-button>\n\n                                                        <md-menu-content width="3">\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editSmsAccountApp($event, $index)" translate="VOICE.EDIT_APP">\n                                                                    Edit App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editInterval($event, $index)" translate="VOICE.EDIT_INTERVAL">\n                                                                    Edit Interval\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'">\n                                                                <md-button ng-click="vm_ac.deleteConfirm(app, $index, $event)" translate="VOICE.DELETE_APP">\n                                                                    Delete App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                        </md-menu-content>\n                                                    </md-menu>\n                                                </td>\n                                            </tr>\n                                            <tr md-row ng-hide="vm_ac.smsAccountApps.rows.length">\n                                                <td md-cell colspan="7">\n                                                    <span class="text-boxed-ligth" translate="VOICE.NO_APPS_AVAILABLE">No apps available</span>\n                                                </td>\n                                            </tr>\n                                        </tbody>\n                                    </table>\n                                </md-table-container>\n                                \x3c!-- / QUEUES TABLE --\x3e\n\n                                \x3c!-- NO RESULTS --\x3e\n\n                                \x3c!-- / NO RESULTS --\x3e\n                            </div>\n                            \x3c!-- / MAIN --\x3e\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SMS.INTERACTIONS">INTERACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="smsAccount-detail-form-container interactions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="SmsAccountInteractionsController as vm_dc" ng-init="vm_dc.init(vm.smsAccount)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedSmsAccountInteractions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="SMS.INTERACTIONS">Interactions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.getSmsAccountInteractions()" aria-label="refresh Interactions" translate translate-attr-label="SMS.REFRESH_INTERACTIONS">\n                                        <md-icon md-font-icon="icon-refresh"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedSmsAccountInteractions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedSmsAccountInteractions.length}} {{vm_dc.selectedSmsAccountInteractions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedSmsAccountInteractions" csv-label="true" filename="smsAccounts.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedSmsAccountInteractions($event)" aria-label="delete selected" translate translate-attr-label="SMSACCOUNTS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedSmsAccountInteractions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getSmsAccountInteractions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'SMS.ID\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'SMS.STARTEDAT\' | translate }}</th>\n                                            <th md-column>{{ \'SMS.CONTACT\' | translate }}</th>\n                                            <th md-column>{{ \'SMS.AGENT\' | translate }}</th>\n                                            <th md-column md-order-by="closedAt">{{ \'SMS.CLOSEDAT\' | translate }}</th>\n                                            <th md-column md-order-by="disposition">{{ \'SMS.DISPOSITION\' | translate }}</th>\n                                            <th md-column md-order-by="note">{{ \'SMS.NOTES\' | translate }}</th>\n                                            <th md-column md-order-by="tag">{{ \'SMS.TAGS\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="interaction" md-select-id="id" ng-repeat="interaction in vm_dc.smsAccountInteractions.rows">\n                                            <td md-cell>{{interaction.id}}</td>\n                                            <td md-cell>{{interaction.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell>{{interaction.Contact.firstName}}</td>\n                                            <td md-cell>{{interaction.Owner.name}}</td>\n                                            <td md-cell>{{interaction.closedAt | date:\'medium\'}}</td>\n                                            <td md-cell>{{interaction.disposition}}</td>\n                                            <td md-cell>{{interaction.note}}</td>\n                                            <td md-cell>\n                                                <div ng-if="interaction.Tags.length">\n                                                    <md-tooltip md-direction="left" layout="row">\n                                                        <span ng-repeat="tag in interaction.Tags">{{tag.name}}<span ng-if="!$last">, </span></span>\n                                                    </md-tooltip>\n                                                    <md-icon md-font-icon="icon-tag"></md-icon>\n                                                </div>\n                                            </td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="SMS.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.spysmsInteraction($event, interaction)" translate="SMS.SPYINTERACTION">\n                                                                Spy Interaction\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(interaction, $event)" translate="SMS.DELETE_INTERACTION">\n                                                                Delete Interaction\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.smsAccountInteractions.rows.length">\n                                            <td md-cell colspan="13">\n                                                <span class="text-boxed-ligth" translate="SMS.NO_INTERACTION_AVAILABLE">No interaction available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'SMS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'SMS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'SMS.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.smsAccountInteractions.count}}" md-on-paginate="vm_dc.getSmsAccountInteractions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/sms/views/smsAccounts/smsAccounts.html",'<div id="smsAccounts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-message-text" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="SMS.SMSACCOUNTS">SmsAccounts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="SMS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedSmsAccounts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedSmsAccounts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="SMS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-smsAccounts-count">\n                    <span>{{vm.selectedSmsAccounts.length}}</span>\n                <span translate="SMS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="SMSACCOUNTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllSmsAccounts()" translate="SMS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectSmsAccounts()" translate="SMS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedSmsAccounts" csv-label="true" filename="smsAccounts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedSmsAccounts($event)" aria-label="delete selected" translate translate-attr-label="SMSACCOUNTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- SMSACCOUNT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedSmsAccounts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getSmsAccounts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'SMS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'SMS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="key">{{ \'SMS.KEY\' | translate }}</th>\n                                <th md-column md-order-by="ListId">{{ \'SMS.LIST\' | translate }}</th>\n                                <th md-column md-order-by="phone">{{ \'SMS.PHONE\' | translate }}</th>\n                                <th md-column md-order-by="type">{{ \'SMS.TYPE\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'SMS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.smsAccounts.rows.length">\n                                <td md-cell colspan="8">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="SMS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="smsAccount" md-select-id="id" ng-repeat="smsAccount in vm.smsAccounts.rows">\n                                <td md-cell ng-if="smsAccount.userpic"><img class="avatar" alt="{{smsAccount.name}}" ng-src="api/users/{{smsAccount.id}}/avatar" /></td>\n                                <td md-cell ng-if="!smsAccount.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{smsAccount.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditSmsAccount($event, smsAccount)" md-cell class="id ">{{smsAccount.id}}</td>\n                                <td ng-click="vm.createOrEditSmsAccount($event, smsAccount)" md-cell class="name ">{{smsAccount.name}}</td>\n                                <td ng-click="vm.createOrEditSmsAccount($event, smsAccount)" md-cell class="key ">{{smsAccount.key}}</td>\n                                <td ng-click="vm.createOrEditSmsAccount($event, smsAccount)" md-cell class="ListId ">{{ ListId = vm.lists[smsAccount.ListId]; ListId.name }}</td>\n                                <td ng-click="vm.createOrEditSmsAccount($event, smsAccount)" md-cell class="phone ">{{smsAccount.phone}}</td>\n                                <td ng-click="vm.createOrEditSmsAccount($event, smsAccount)" md-cell class="type ">{{ vm.arraytype[smsAccount.type].option }}</td>\n                                <td ng-click="vm.createOrEditSmsAccount($event, smsAccount)" md-cell class="description ">{{smsAccount.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="SMS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(smsAccount, $event)" translate="SMS.EDIT_SMSACCOUNT">\n                                                    Edit SmsAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.interactionsgoto(smsAccount, $event)" translate="SMS.INTERACTIONS_SMSACCOUNT">\n                                                    Interactions SmsAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(smsAccount, $event)" translate="SMS.DELETE_SMSACCOUNT">\n                                                    Delete SmsAccount\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'SMS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'SMS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'SMS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.smsAccounts.count}}"\n                    md-on-paginate="vm.getSmsAccounts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / SMSACCOUNT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD SMSACCOUNT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-smsAccount-button" ng-click="vm.createOrEditSmsAccount($event)" aria-label="add smsAccount" translate translate-attr-aria-label="SMS.ADD_SMSACCOUNT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD SMSACCOUNT BUTTON --\x3e\n</div>'),e.put("app/main/apps/sms/views/smsQueues/create/dialog.html",'<md-dialog class="smsQueue-dialog" aria-label="New SmsQueue">\n    <form name="smsQueueForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="SMS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.smsQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newSmsQueue">\n                <div class="hint"><span translate="SMS.HELP.NAME"></span></div>\n                <div ng-messages="smsQueueForm[\'name\'].$error" ng-show="smsQueueForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="SMS.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.STRATEGY">Strategy</label>\n                <md-select name="strategy" ng-model="vm.smsQueue.strategy" required>\n                    <md-option ng-value="\'beepall\'">Beepall</md-option>\n                    <md-option ng-value="\'rrmemory\'">RR Memory</md-option>\n                </md-select>\n                <div ng-messages="smsQueueForm[\'strategy\'].$error" ng-show="smsQueueForm[\'strategy\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.AGENT_TIMEOUT">Agent_Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.smsQueue.timeout" min="1" max="2147483" ng-required="true">\n                <div ng-messages="smsQueueForm[\'timeout\'].$error" ng-show="smsQueueForm[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.AGENT_TIMEOUT_REQUIRED">Agent_Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="SMS.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>1</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="SMS.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="SMS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.smsQueue.description">\n                <div ng-messages="smsQueueForm[\'description\'].$error" ng-show="smsQueueForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="SMS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSmsQueue" ng-click="vm.saveSmsQueue()" class="send-button md-accent md-raised" ng-disabled="smsQueueForm.$invalid || smsQueueForm.$pristine" aria-label="SAVE" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSmsQueue" ng-click="vm.addNewSmsQueue()" class="send-button md-accent md-raised" ng-disabled="smsQueueForm.$invalid" aria-label="ADD" translate="SMS.ADD_SMSQUEUE" translate-attr-aria-label="SMS.ADD_SMSQUEUE">\n                    ADD SMSQUEUE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSmsQueue" ng-click="vm.deleteSmsQueue($event)" aria-label="DELETE" translate translate-attr-aria-label="SMS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="SMS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsQueues/edit/agentadd/agentadd.html",'<md-dialog class="smsQueue-dialog" aria-label="smsQueue">\n    <form name="smsQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="SMS.AGENTADD_SMSQUEUE">Add Agent to smsQueue</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsQueues/edit/teamadd/teamadd.html",'<md-dialog class="smsQueue-dialog" aria-label="smsQueue">\n    <form name="smsQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="SMS.TEAMADD_SMSQUEUE">Add Team in SMSQUEUE</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/sms/views/smsQueues/edit/view.html",'<div id="sms-smsQueue" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-smsQueues-button md-icon-button" aria-label="Go to smsQueues" ng-click="vm.gotoSmsQueues()" translate translate-attr-aria-label="SMS.GO_TO_SMSQUEUES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="smsQueue-image" hide-xs>\n                    <img ng-src="assets/images/business/smsQueues.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.smsQueue.id}}\n                        <span ng-if="vm.smsQueue.name">{{vm.smsQueue.name}}</span>\n                        <span ng-if="vm.smsQueue.exten">{{vm.smsQueue.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="SMS.CREATED_AT"></span> <span>{{vm.smsQueue.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.teamadddialog(vm.smsQueue, $event)" class="md-fab md-orange-500-bg md-icon-button" aria-label="teamadd">\n                <md-tooltip><span translate="SMS.TEAMADD_SMSQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-multiple-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.agentadddialog(vm.smsQueue, $event)" class="md-fab md-purple-500-bg md-icon-button" aria-label="agentadd">\n                <md-tooltip><span translate="SMS.AGENTADD_SMSQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-plus"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveSmsQueue()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid)" translate="SMS.SAVE" translate-attr-aria-label="SMS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="SMS.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="smsQueue-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="SMS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.smsQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="SMS.HELP.NAME"></span></div>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="SMS.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.STRATEGY">Strategy</label>\n                                <md-select name="strategy" ng-model="vm.smsQueue.strategy" required>\n                                    <md-option ng-value="\'beepall\'">Beepall</md-option>\n                                    <md-option ng-value="\'rrmemory\'">RR Memory</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'strategy\'].$error" ng-show="generalForm[\'strategy\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.AGENT_TIMEOUT">Agent_Timeout</label>\n                                <input type="number" name="timeout" ng-model="vm.smsQueue.timeout" min="1" max="2147483" ng-required="true">\n                                <div ng-messages="generalForm[\'timeout\'].$error" ng-show="generalForm[\'timeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.AGENT_TIMEOUT_REQUIRED">Agent_Timeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="SMS.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>1</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="SMS.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO">Agent_Timeout must be a valid greater or equal than</span> <span>2147483</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="SMS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.smsQueue.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="SMS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/sms/views/smsQueues/smsQueues.html",'<div id="smsQueues" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-message-text" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="SMS.SMSQUEUES">SmsQueues</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="SMS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedSmsQueues.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedSmsQueues =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="SMS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-smsQueues-count">\n                    <span>{{vm.selectedSmsQueues.length}}</span>\n                <span translate="SMS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="SMSQUEUES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllSmsQueues()" translate="SMS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectSmsQueues()" translate="SMS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedSmsQueues" csv-label="true" filename="smsQueues.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedSmsQueues($event)" aria-label="delete selected" translate translate-attr-label="SMSQUEUES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- SMSQUEUE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedSmsQueues" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getSmsQueues">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'SMS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'SMS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="strategy">{{ \'SMS.STRATEGY\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.smsQueues.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="SMS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="smsQueue" md-select-id="id" ng-repeat="smsQueue in vm.smsQueues.rows">\n                                <td md-cell ng-if="smsQueue.userpic"><img class="avatar" alt="{{smsQueue.name}}" ng-src="api/users/{{smsQueue.id}}/avatar" /></td>\n                                <td md-cell ng-if="!smsQueue.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{smsQueue.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditSmsQueue($event, smsQueue)" md-cell class="id ">{{smsQueue.id}}</td>\n                                <td ng-click="vm.createOrEditSmsQueue($event, smsQueue)" md-cell class="name ">{{smsQueue.name}}</td>\n                                <td ng-click="vm.createOrEditSmsQueue($event, smsQueue)" md-cell class="strategy ">{{ vm.arraystrategy[smsQueue.strategy].option }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="SMS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(smsQueue, $event)" translate="SMS.EDIT_SMSQUEUE">\n                                                    Edit SmsQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.teamadddialog(smsQueue, $event)" translate="SMS.TEAMADD_SMSQUEUE">\n                                                    teamadd SmsQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.agentadddialog(smsQueue, $event)" translate="SMS.AGENTADD_SMSQUEUE">\n                                                    agentadd SmsQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(smsQueue, $event)" translate="SMS.DELETE_SMSQUEUE">\n                                                    Delete SmsQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(smsQueue, $event)" translate="SMS.GOTOREALTIME_SMSQUEUE">\n                                                    goToRealtime SmsQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'SMS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'SMS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'SMS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.smsQueues.count}}"\n                    md-on-paginate="vm.getSmsQueues" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / SMSQUEUE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD SMSQUEUE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-smsQueue-button" ng-click="vm.createOrEditSmsQueue($event)" aria-label="add smsQueue" translate translate-attr-aria-label="SMS.ADD_SMSQUEUE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD SMSQUEUE BUTTON --\x3e\n</div>'),e.put("app/main/apps/staff/views/agents/agents.html",'<div id="agents" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-account-multiple" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="STAFF.AGENTS">Agents</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="STAFF.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedAgents.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedAgents =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="STAFF.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-agents-count">\n                    <span>{{vm.selectedAgents.length}}</span>\n                <span translate="STAFF.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="AGENTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllAgents()" translate="STAFF.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectAgents()" translate="STAFF.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedAgents" csv-label="true" filename="agents.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedAgents($event)" aria-label="delete selected" translate translate-attr-label="AGENTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- AGENT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedAgents" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getAgents">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="fullname">{{ \'STAFF.FULLNAME\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'STAFF.USERNAME\' | translate }}</th>\n                                <th md-column md-order-by="email">{{ \'STAFF.EMAIL\' | translate }}</th>\n                                <th md-column md-order-by="phone">{{ \'STAFF.PHONE\' | translate }}</th>\n                                <th md-column md-order-by="mobile">{{ \'STAFF.MOBILE\' | translate }}</th>\n                                <th md-column md-order-by="internal">{{ \'STAFF.INTERNAL\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.agents.rows.length">\n                                <td md-cell colspan="7">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="STAFF.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="agent" md-select-id="id" ng-repeat="agent in vm.agents.rows">\n                                <td md-cell ng-if="agent.userpic"><img class="avatar" alt="{{agent.name}}" ng-src="api/users/{{agent.id}}/avatar" /></td>\n                                <td md-cell ng-if="!agent.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{agent.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditAgent($event, agent)" md-cell class="fullname font-weight-600">{{agent.fullname}}</td>\n                                <td ng-click="vm.createOrEditAgent($event, agent)" md-cell class="name ">{{agent.name}}</td>\n                                <td ng-click="vm.createOrEditAgent($event, agent)" md-cell class="email ">{{agent.email}}</td>\n                                <td ng-click="vm.createOrEditAgent($event, agent)" md-cell class="phone ">{{agent.phone}}</td>\n                                <td ng-click="vm.createOrEditAgent($event, agent)" md-cell class="mobile ">{{agent.mobile}}</td>\n                                <td ng-click="vm.createOrEditAgent($event, agent)" md-cell class="internal ">{{agent.internal}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(agent, $event)" translate="STAFF.EDIT_AGENT">\n                                                    Edit Agent\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.teamadddialog(agent, $event)" translate="STAFF.TEAMADD_AGENT">\n                                                    teamadd Agent\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(agent, $event)" translate="STAFF.DELETE_AGENT">\n                                                    Delete Agent\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'STAFF.PAGE\' | translate}}:\', rowsPerPage: \'{{\'STAFF.ROWSPERPAGE\' | translate}}:\', of: \'{{\'STAFF.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.agents.count}}" md-on-paginate="vm.getAgents" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / AGENT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD AGENT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-agent-button" ng-click="vm.createOrEditAgent($event)" aria-label="add agent" translate translate-attr-aria-label="STAFF.ADD_AGENT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD AGENT BUTTON --\x3e\n</div>'),e.put("app/main/apps/staff/views/agents/create/dialog.html",'<md-dialog class="agent-dialog" aria-label="New Agent">\n    <form name="agentForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="STAFF.FULLNAME">Fullname</label>\n                <input type="text" name="fullname" ng-model="vm.agent.fullname" ng-required="true" autofocus>\n                <div ng-messages="agentForm[\'fullname\'].$error" ng-show="agentForm[\'fullname\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.FULLNAME_REQUIRED">Fullname field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.USERNAME">Username</label>\n                <input type="text" name="name" ng-model="vm.agent.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" ng-disabled="!vm.newAgent">\n                <div class="hint"><span translate="STAFF.HELP.USERNAME"></span></div>\n                <div ng-messages="agentForm[\'name\'].$error" ng-show="agentForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="STAFF.ERRORS.USERNAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Username must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.ALIAS">Alias</label>\n                <input type="text" name="alias" ng-model="vm.agent.alias">\n                <div ng-messages="agentForm[\'alias\'].$error" ng-show="agentForm[\'alias\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.ALIAS_REQUIRED">Alias field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.EMAIL">Email</label>\n                <input type="email" name="email" ng-model="vm.agent.email" ng-required="true">\n                <div ng-messages="agentForm[\'email\'].$error" ng-show="agentForm[\'email\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                    </div>\n                    <div ng-message="email">\n                        <span translate="STAFF.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.newAgent">\n                <label translate="STAFF.PASSWORD">Password</label>\n                <input type="password" name="password" ng-model="vm.agent.password" placeholder="Password" ng-pattern="vm.passwordPattern" translate translate-attr-placeholder="STAFF.PASSWORD" required>\n                <div ng-messages="agentForm[\'password\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="STAFF.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.newAgent  && (vm.newAgent)">\n                <label translate="STAFF.CONFIRM_PASSWORD">Confirm Password</label>\n                <input type="password" match-password="password" name="confirmPassword" ng-model="confirmPassword">\n                <div ng-messages="agentForm.confirmPassword.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.CONFIRM_REQUIRED">Confirm field is required</span>\n                    </div>\n                    <div ng-message="passwordMatch">\n                        <span translate="STAFF.ERRORS.CONFIRM_NOT_MATCH">Your password did not match</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="STAFF.SHOWWEBCONTROL">ShowWebControl</label>\n                <md-select name="showWebBar" ng-model="vm.agent.showWebBar">\n                    <md-option ng-value="0">Phonebar</md-option>\n                    <md-option ng-value="1">External</md-option>\n                    <md-option ng-value="2">WebRTC (rc-1)</md-option>\n                </md-select>\n                <div ng-messages="agentForm[\'showWebBar\'].$error" ng-show="agentForm[\'showWebBar\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.SHOWWEBCONTROL_REQUIRED">ShowWebControl field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.newAgent" class="md-block">\n                <md-switch ng-model="vm.agent.autointernal" aria-label="AutoInternal"><span translate="STAFF.AUTOINTERNAL">AutoInternal</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="!vm.agent.autointernal" class="md-block">\n                <label translate="STAFF.INTERNAL">Internal</label>\n                <input type="text" name="internal" ng-model="vm.agent.internal" ng-required="true" ng-disabled="!vm.newAgent">\n                <div ng-messages="agentForm[\'internal\'].$error" ng-show="agentForm[\'internal\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.INTERNAL_REQUIRED">Internal field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.agent.description">\n                <div ng-messages="agentForm[\'description\'].$error" ng-show="agentForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.newAgent" class="md-block">\n                <md-switch ng-model="vm.agent.voicemail" aria-label="Voicemail"><span translate="STAFF.VOICEMAIL">Voicemail</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="vm.agent.showWebBar == 0" class="md-block">\n                <md-switch ng-model="vm.agent.phoneBarRemoteControl" aria-label="RemoteControl"><span translate="STAFF.REMOTECONTROL">RemoteControl</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="vm.agent.showWebBar == 0" class="md-block">\n                <label translate="STAFF.REMOTECONTROLPORT">RemoteControlPort</label>\n                <input type="number" name="phoneBarRemoteControlPort" ng-model="vm.agent.phoneBarRemoteControlPort" ng-required="true">\n                <div ng-messages="agentForm[\'phoneBarRemoteControlPort\'].$error" ng-show="agentForm[\'phoneBarRemoteControlPort\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.REMOTECONTROLPORT_REQUIRED">RemoteControlPort field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.newUser" class="md-block">\n                <md-switch ng-model="vm.agent.voicemail" aria-label="Voicemail"><span translate="STAFF.VOICEMAIL">Voicemail</span></md-switch>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newAgent" ng-click="vm.saveAgent()" class="send-button md-accent md-raised" ng-disabled="agentForm.$invalid || agentForm.$pristine" aria-label="SAVE" translate="STAFF.SAVE" translate-attr-aria-label="STAFF.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newAgent" ng-click="vm.addNewAgent()" class="send-button md-accent md-raised" ng-disabled="agentForm.$invalid" aria-label="ADD" translate="STAFF.ADD_AGENT" translate-attr-aria-label="STAFF.ADD_AGENT">\n                    ADD AGENT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newAgent" ng-click="vm.deleteAgent($event)" aria-label="DELETE" translate translate-attr-aria-label="STAFF.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="STAFF.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/agents/edit/changepassword/changepassword.html",'<md-dialog class="agent-dialog" aria-label="{{vm.name}}">\n    <form name="agentForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ \'STAFF.CHANGE_PASSWORD\' | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="STAFF.NEW_PASSWORD">New Password</label>\n                <input type="password" name="password" ng-model="vm.password" placeholder="Password" translate ng-pattern="vm.passwordPattern" translate-attr-placeholder="STAFF.NEW_PASSWORD" required>\n                <div ng-messages="agentForm.password.$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n\n                    <div ng-message="pattern">\n                        <span translate="STAFF.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.CONFIRM_PASSWORD">Confirm Password</label>\n                <input type="password" match-password="password" name="confirmPassword" ng-model="confirmPassword">\n                <div ng-messages="agentForm.confirmPassword.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.CONFIRM_REQUIRED">Confirm field is required</span>\n                    </div>\n                    <div ng-message="passwordMatch">\n                        <span translate="STAFF.ERRORS.CONFIRM_NOT_MATCH">Your password did not match</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.savePassword()" class="send-button md-accent md-raised" ng-disabled="agentForm.$invalid || agentForm.$pristine" aria-label="SAVE" translate="STAFF.SAVE" translate-attr-aria-label="STAFF.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/agents/edit/queueadd/queueadd.html",'<md-dialog class="agent-dialog" aria-label="agent">\n    <form name="agentForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2>{{vm.title}}</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <md-input-container flex class="no-margin" ng-if="vm.agent.role === \'agent\' && vm.isVoiceChannel()">\n                <label translate="STAFF.PENALTY">Penalty</label>\n                <input name="penalty" ng-model="vm.penalty" placeholder="0" required md-minlength="0" md-maxlength="3">\n                <div ng-messages="agentForm.penalty.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span>You must supply a penalty.</span>\n                    </div>\n                    <div ng-message="md-minlength">\n                        <span>Min Penalty 0 characters.</span>\n                    </div>\n                    <div ng-message="md-maxlength">\n                        <span>Max Penalty 3 characters.</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/agents/edit/teamadd/teamadd.html",'<md-dialog class="agent-dialog" aria-label="agent">\n    <form name="agentForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="STAFF.TEAMADD_AGENT">Add Team in AGENT</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/agents/edit/view.html",'<div id="staff-agent" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-agents-button md-icon-button" aria-label="Go to agents" ng-click="vm.gotoAgents()" translate translate-attr-aria-label="STAFF.GO_TO_AGENTS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="agent-image" hide-xs>\n                    <img ng-src="assets/images/business/agents.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.agent.id}}\n                        <span ng-if="vm.agent.name">{{vm.agent.name}}</span>\n                        <span ng-if="vm.agent.exten">{{vm.agent.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="STAFF.CREATED_AT"></span> <span>{{vm.agent.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div ng-cloak ng-if="vm.agent.role !== \'admin\'">\n            <md-fab-speed-dial md-direction="left" class="md-scale md-fab">\n                <md-fab-trigger>\n                    <md-button aria-label="menu" class="md-fab md-primary md-icon-button">\n                        <md-tooltip md-direction="top" md-visible="false"><span translate="STAFF.CHANNELS">Channels</span></md-tooltip>\n                        <md-icon md-font-icon="icon-stackoverflow" aria-label="queueadd"></md-icon>\n                    </md-button>\n                </md-fab-trigger>\n                <md-fab-actions>\n                    <md-button aria-label="voice" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.agent, \'voice\', $event, \'inbound\')">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="VOICE.VOICE">Voice</span></md-tooltip>\n                        <md-icon md-font-icon="icon-phone" aria-label="voice"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.dialer" aria-label="motion bull" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.agent, \'voice\', $event, \'outbound\')">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="MOTIONDIALER.MOTIONDIALER">Motion Bull</span></md-tooltip>\n                        <md-icon md-font-icon="icon-fire" aria-label="motion bull"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.chat" aria-label="chat" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.agent, \'chat\', $event)">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="CHAT.CHAT">Chat</span></md-tooltip>\n                        <md-icon md-font-icon="icon-hangouts" aria-label="chat"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.mail" aria-label="mail" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.agent, \'mail\', $event)">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="MAIL.MAIL">Email</span></md-tooltip>\n                        <md-icon md-font-icon="icon-email" aria-label="mail"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.messaging" aria-label="sms" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.agent, \'sms\', $event)">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="SMS.SMS">Sms</span></md-tooltip>\n                        <md-icon md-font-icon="icon-message-text" aria-label="sms"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.openchannel" aria-label="openchannel" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.agent, \'openchannel\', $event)">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="OPENCHANNEL.OPENCHANNEL">Openchannel</span></md-tooltip>\n                        <md-icon md-font-icon="icon-google-earth" aria-label="openchannel"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.fax" aria-label="fax" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.agent, \'fax\', $event)">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="FAX.FAX">Fax</span></md-tooltip>\n                        <md-icon md-font-icon="icon-deskphone" aria-label="fax"></md-icon>\n                    </md-button>\n                </md-fab-actions>\n            </md-fab-speed-dial>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.teamadddialog(vm.agent, $event)" class="md-fab md-orange-500-bg md-icon-button" aria-label="teamadd">\n                <md-tooltip><span translate="STAFF.TEAMADD_AGENT"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-multiple-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.changepassworddialog(vm.agent, $event)" class="md-fab md-warn md-icon-button" aria-label="changepassword">\n                <md-tooltip><span translate="STAFF.CHANGEPASSWORD_AGENT"></span></md-tooltip>\n                <md-icon md-font-icon="icon-key-variant"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveAgent()" class="send-button md-accent md-raised" ng-disabled="(personal_infoForm.$invalid) || (security_suiteForm.$invalid) || (change_avatarForm.$invalid) || (generalForm.$invalid) || (capacityForm.$invalid) || (settingsForm.$invalid) || (remote_controlForm.$invalid) || (sipForm.$invalid) || (callforwardingForm.$invalid) || (settings_webrtcForm.$invalid) || (sip_webrtcForm.$invalid) || (general_permissionsForm.$invalid) || (permissionsForm.$invalid)"\n                translate="STAFF.SAVE" translate-attr-aria-label="STAFF.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="STAFF.ACCOUNT">ACCOUNT</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="agent-detail-form-container personal_info md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.PERSONAL_INFO">PERSONAL_INFO</div>\n                        </div>\n                        <form name="personal_infoForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.FULLNAME">Fullname</label>\n                                <input type="text" name="fullname" ng-model="vm.agent.fullname" ng-required="true" autofocus>\n                                <div ng-messages="personal_infoForm[\'fullname\'].$error" ng-show="personal_infoForm[\'fullname\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.FULLNAME_REQUIRED">Fullname field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.USERNAME">Username</label>\n                                <input type="text" name="name" ng-model="vm.agent.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" ng-disabled="true">\n                                <div class="hint"><span translate="STAFF.HELP.USERNAME"></span></div>\n                                <div ng-messages="personal_infoForm[\'name\'].$error" ng-show="personal_infoForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="STAFF.ERRORS.USERNAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Username must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.ALIAS">Alias</label>\n                                <input type="text" name="alias" ng-model="vm.agent.alias">\n                                <div ng-messages="personal_infoForm[\'alias\'].$error" ng-show="personal_infoForm[\'alias\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.ALIAS_REQUIRED">Alias field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.EMAIL">Email</label>\n                                <input type="email" name="email" ng-model="vm.agent.email" ng-required="true">\n                                <div ng-messages="personal_infoForm[\'email\'].$error" ng-show="personal_infoForm[\'email\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                                    </div>\n                                    <div ng-message="email">\n                                        <span translate="STAFF.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.PHONE">Phone</label>\n                                <input type="text" name="phone" ng-model="vm.agent.phone">\n                                <div ng-messages="personal_infoForm[\'phone\'].$error" ng-show="personal_infoForm[\'phone\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.PHONE_REQUIRED">Phone field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.MOBILE">Mobile</label>\n                                <input type="text" name="mobile" ng-model="vm.agent.mobile">\n                                <div ng-messages="personal_infoForm[\'mobile\'].$error" ng-show="personal_infoForm[\'mobile\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.MOBILE_REQUIRED">Mobile field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.SHOWWEBCONTROL">ShowWebControl</label>\n                                <md-select name="showWebBar" ng-model="vm.agent.showWebBar">\n                                    <md-option ng-value="0">Phonebar</md-option>\n                                    <md-option ng-value="1">External</md-option>\n                                    <md-option ng-value="2">WebRTC (rc-1)</md-option>\n                                </md-select>\n                                <div ng-messages="personal_infoForm[\'showWebBar\'].$error" ng-show="personal_infoForm[\'showWebBar\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.SHOWWEBCONTROL_REQUIRED">ShowWebControl field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.loginInPause" aria-label="LoginInPause"><span translate="STAFF.LOGININPAUSE">LoginInPause</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.agent.description">\n                                <div ng-messages="personal_infoForm[\'description\'].$error" ng-show="personal_infoForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="agent-detail-form-container security_suite md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.SECURITY_SUITE">SECURITY_SUITE</div>\n                        </div>\n                        <form name="security_suiteForm" novalidate>\n                            <md-input-container ng-if="vm.agent.passwordResetAt != null" class="md-block">\n                                <label translate="STAFF.LAST_PASSWORD_RESET_AT">Last_Password_Reset_At</label>\n                                <input type="text" name="passwordResetAt" ng-model="vm.agent.passwordResetAt" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="STAFF.HELP.LAST_PASSWORD_RESET_AT"></span></div>\n                                <div ng-messages="security_suiteForm[\'passwordResetAt\'].$error" ng-show="security_suiteForm[\'passwordResetAt\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.LAST_PASSWORD_RESET_AT_REQUIRED">Last_Password_Reset_At field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.agent.passwordResetAt == null" class="md-block">\n                                <label translate="STAFF.NO_PASSWORD_CHANGE">No_Password_Change</label>\n                                <input type="text" name="passwordResetAt" ng-model="vm.agent.passwordResetAt" ng-disabled="true">\n                                <div ng-messages="security_suiteForm[\'passwordResetAt\'].$error" ng-show="security_suiteForm[\'passwordResetAt\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.NO_PASSWORD_CHANGE_REQUIRED">No_Password_Change field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="agent-detail-form-container change_avatar md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.CHANGE_AVATAR">CHANGE_AVATAR</div>\n                        </div>\n                        <div ng-controller="Agentchange_avatarController as vm_ca" ng-init="vm_ca.init(vm.agent)" class="agent-detail-form-container md-background-bg md-whiteframe-1dp">\n\n                            <div id="agent-image-uploader" flow-init="vm_ca.ngFlowOptions" flow-name="vm_ca.ngFlow.flow" flow-files-submitted="vm_ca.upload()" flow-file-added="vm_ca.fileAdded($file)" flow-file-success="vm_ca.fileSuccess($file, $message)" flow-complete="vm_ca.uploadComplete()"\n                                flow-drop flow-drag-enter="vm_ca.dropping=true" flow-drag-leave="vm_ca.dropping=false" ng-class="{\'dropping\':vm.dropping}">\n\n                                <div class="drop-text hint-text" layout="row" layout-align="center center">\n                                    <span translate="EC.DROP_TO_UPLOAD">Drop to upload</span>\n                                </div>\n\n                                <div class="upload-button" layout="column" layout-align="center center">\n                                    <md-button class="md-accent md-raised" flow-btn>\n                                        Upload\n                                    </md-button>\n                                    <span class="secondary-text mt-8">You can also drop images here to upload. Only PNG, JPG - Max. 8MB</span>\n                                </div>\n\n                                <div layout="row" layout-align="start start" layout-wrap>\n                                    <div ng-repeat="change_avatarimage in vm_ca.agent.images" ng-switch="change_avatarimage.type">\n                                        <div class="agent-image uploading" ng-switch-when="uploading" layout="row" layout-align="center center">\n                                            <div class="overlay" layout="column" layout-align="center center">\n                                                <md-progress-linear md-mode="determinate" value="{{change_avatarimage.file.progress() * 100}}">\n                                                </md-progress-linear>\n                                            </div>\n                                            <img class="media" flow-img="change_avatarimage.file">\n                                        </div>\n\n                                        <div class="agent-image" ng-switch-when="image" layout="row" layout-align="center center">\n                                            <img class="media" ng-src="{{change_avatarimage.url}}">\n                                        </div>\n                                    </div>\n                                </div>\n                            </div>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="STAFF.VOICE">VOICE</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="agent-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container ng-if="!vm.agent.autointernal" class="md-block">\n                                <label translate="STAFF.INTERNAL">Internal</label>\n                                <input type="text" name="internal" ng-model="vm.agent.internal" ng-required="true" autofocus ng-disabled="true">\n                                <div ng-messages="generalForm[\'internal\'].$error" ng-show="generalForm[\'internal\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.INTERNAL_REQUIRED">Internal field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.agent.showWebBar != 2" class="md-block">\n                                <label translate="STAFF.TRANSPORT">Transport</label>\n                                <md-select name="transport" ng-model="vm.agent.transport" multiple>\n                                    <md-option ng-value="\'udp\'">udp</md-option>\n                                    <md-option ng-value="\'tcp\'">tcp</md-option>\n                                    <md-option ng-value="\'ws\'" ng-if="vm.agent.showWebBar == 1">ws</md-option>\n                                    <md-option ng-value="\'wss\'" ng-if="vm.agent.showWebBar == 1">wss</md-option>\n                                    <md-option ng-value="\'tls\'" ng-if="vm.agent.showWebBar == 1">tls</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="STAFF.HELP.TRANSPORT"></span></div>\n                                <div ng-messages="generalForm[\'transport\'].$error" ng-show="generalForm[\'transport\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.TRANSPORT_REQUIRED">Transport field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.HOST">Host</label>\n                                <input type="text" name="host" ng-model="vm.agent.host" ng-required="true">\n                                <div class="hint"><span translate="STAFF.HELP.HOST"></span></div>\n                                <div ng-messages="generalForm[\'host\'].$error" ng-show="generalForm[\'host\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.HOST_REQUIRED">Host field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.NAT">NAT</label>\n                                <md-select name="nat" ng-model="vm.agent.nat" required multiple>\n                                    <md-option ng-value="\'force_rport\'">force_rport</md-option>\n                                    <md-option ng-value="\'comedia\'">comedia</md-option>\n                                    <md-option ng-value="\'yes\'">yes</md-option>\n                                    <md-option ng-value="\'no\'">no</md-option>\n                                    <md-option ng-value="\'never\'">never</md-option>\n                                    <md-option ng-value="\'route\'">route</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="STAFF.HELP.NAT"></span></div>\n                                <div ng-messages="generalForm[\'nat\'].$error" ng-show="generalForm[\'nat\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.NAT_REQUIRED">NAT field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.TYPE">Type</label>\n                                <md-select name="type" ng-model="vm.agent.type">\n                                    <md-option ng-value="\'friend\'">Friend</md-option>\n                                    <md-option ng-value="\'user\'">User</md-option>\n                                    <md-option ng-value="\'peer\'">Peer</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="STAFF.HELP.TYPE"></span></div>\n                                <div ng-messages="generalForm[\'type\'].$error" ng-show="generalForm[\'type\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.ALLOWCODECS">AllowCodecs</label>\n                                <md-select name="allow" ng-model="vm.agent.allow" required multiple>\n                                    <md-option ng-value="\'ulaw\'">ulaw</md-option>\n                                    <md-option ng-value="\'alaw\'">alaw</md-option>\n                                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                                    <md-option ng-value="\'g722\'">g722</md-option>\n                                    <md-option ng-value="\'g729\'">g729</md-option>\n                                    <md-option ng-value="\'opus\'">opus</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="STAFF.HELP.ALLOWCODECS"></span></div>\n                                <div ng-messages="generalForm[\'allow\'].$error" ng-show="generalForm[\'allow\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.ALLOWCODECS_REQUIRED">AllowCodecs field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.CALLERID">CallerId</label>\n                                <input type="text" name="callerid" ng-model="vm.agent.callerid">\n                                <div ng-messages="generalForm[\'callerid\'].$error" ng-show="generalForm[\'callerid\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.CALLERID_REQUIRED">CallerId field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.CONTEXT">Context</label>\n                                <md-select name="context" ng-model="vm.agent.context" required>\n                                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'context\'].$error" ng-show="generalForm[\'context\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.CALLGROUP">Callgroup</label>\n                                <input type="text" name="callgroup" ng-model="vm.agent.callgroup">\n                                <div class="hint"><span translate="STAFF.HELP.CALLGROUP"></span></div>\n                                <div ng-messages="generalForm[\'callgroup\'].$error" ng-show="generalForm[\'callgroup\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.CALLGROUP_REQUIRED">Callgroup field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.PICKUPGROUP">Pickupgroup</label>\n                                <input type="text" name="pickupgroup" ng-model="vm.agent.pickupgroup">\n                                <div class="hint"><span translate="STAFF.HELP.PICKUPGROUP"></span></div>\n                                <div ng-messages="generalForm[\'pickupgroup\'].$error" ng-show="generalForm[\'pickupgroup\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.PICKUPGROUP_REQUIRED">Pickupgroup field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.chanspy" aria-label="chanSpy"><span translate="STAFF.CHANSPY">chanSpy</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.MONITOREXTENSION">MonitorExtension</label>\n                                <md-select name="extensionMonitor" ng-model="vm.agent.extensionMonitor" required>\n                                    <md-option ng-value="\'\'">Inactive</md-option>\n                                    <md-option ng-value="\'wav\'">wav</md-option>\n                                    <md-option ng-value="\'WAV\'">wav49</md-option>\n                                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'extensionMonitor\'].$error" ng-show="generalForm[\'extensionMonitor\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.MONITOREXTENSION_REQUIRED">MonitorExtension field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="STAFF.OTHER_CHANNELS">OTHER_CHANNELS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="agent-detail-form-container capacity md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.CAPACITY">CAPACITY</div>\n                        </div>\n                        <form name="capacityForm" novalidate>\n                            <md-input-container ng-if="vm.license.chat" class="md-block">\n                                <label translate="STAFF.CHATCAPACITY">ChatCapacity</label>\n                                <input type="number" name="chatCapacity" ng-model="vm.agent.chatCapacity" min="0" ng-required="true" autofocus>\n                                <div class="hint"><span translate="STAFF.HELP.CHATCAPACITY"></span></div>\n                                <div ng-messages="capacityForm[\'chatCapacity\'].$error" ng-show="capacityForm[\'chatCapacity\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.CHATCAPACITY_REQUIRED">ChatCapacity field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="STAFF.ERRORS.CHATCAPACITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">ChatCapacity must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.license.mail" class="md-block">\n                                <label translate="STAFF.MAILCAPACITY">MailCapacity</label>\n                                <input type="number" name="mailCapacity" ng-model="vm.agent.mailCapacity" min="0" ng-required="true">\n                                <div class="hint"><span translate="STAFF.HELP.MAILCAPACITY"></span></div>\n                                <div ng-messages="capacityForm[\'mailCapacity\'].$error" ng-show="capacityForm[\'mailCapacity\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.MAILCAPACITY_REQUIRED">MailCapacity field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="STAFF.ERRORS.MAILCAPACITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">MailCapacity must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.license.fax" class="md-block">\n                                <label translate="STAFF.FAXCAPACITY">FaxCapacity</label>\n                                <input type="number" name="faxCapacity" ng-model="vm.agent.faxCapacity" min="0" ng-required="true">\n                                <div class="hint"><span translate="STAFF.HELP.FAXCAPACITY"></span></div>\n                                <div ng-messages="capacityForm[\'faxCapacity\'].$error" ng-show="capacityForm[\'faxCapacity\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.FAXCAPACITY_REQUIRED">FaxCapacity field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="STAFF.ERRORS.FAXCAPACITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">FaxCapacity must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.license.messaging" class="md-block">\n                                <label translate="STAFF.SMSCAPACITY">SMSCapacity</label>\n                                <input type="number" name="smsCapacity" ng-model="vm.agent.smsCapacity" min="0" ng-required="true">\n                                <div class="hint"><span translate="STAFF.HELP.SMSCAPACITY"></span></div>\n                                <div ng-messages="capacityForm[\'smsCapacity\'].$error" ng-show="capacityForm[\'smsCapacity\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.SMSCAPACITY_REQUIRED">SMSCapacity field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="STAFF.ERRORS.SMSCAPACITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">SMSCapacity must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.license.openchannel" class="md-block">\n                                <label translate="STAFF.OPENCHANNELCAPACITY">OpenchannelCapacity</label>\n                                <input type="number" name="openchannelCapacity" ng-model="vm.agent.openchannelCapacity" min="0" ng-required="true">\n                                <div class="hint"><span translate="STAFF.HELP.OPENCHANNELCAPACITY"></span></div>\n                                <div ng-messages="capacityForm[\'openchannelCapacity\'].$error" ng-show="capacityForm[\'openchannelCapacity\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.OPENCHANNELCAPACITY_REQUIRED">OpenchannelCapacity field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="STAFF.ERRORS.OPENCHANNELCAPACITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">OpenchannelCapacity must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab ng-if="vm.agent.showWebBar == 0">\n                <md-tab-label>\n                    <span translate="STAFF.MOTIONBAR">MOTIONBAR</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="agent-detail-form-container settings md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.SETTINGS">SETTINGS</div>\n                        </div>\n                        <form name="settingsForm" novalidate>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarEnableSettings" aria-label="EnableSettings"><span translate="STAFF.ENABLESETTINGS">EnableSettings</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarAutoAnswer" aria-label="AutoAnswer"><span translate="STAFF.AUTOANSWER">AutoAnswer</span></md-switch>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.agent.phoneBarAutoAnswer" class="md-block">\n                                <label translate="STAFF.AUTOANSWERDELAY">AutoAnswerDelay</label>\n                                <input type="number" name="phoneBarAutoAnswerDelay" ng-model="vm.agent.phoneBarAutoAnswerDelay" min="0" ng-required="true">\n                                <div ng-messages="settingsForm[\'phoneBarAutoAnswerDelay\'].$error" ng-show="settingsForm[\'phoneBarAutoAnswerDelay\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.AUTOANSWERDELAY_REQUIRED">AutoAnswerDelay field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="STAFF.ERRORS.AUTOANSWERDELAY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AutoAnswerDelay must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarRingInUse" aria-label="RingInUse"><span translate="STAFF.RINGINUSE">RingInUse</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarEnableRecording" aria-label="EnableRecording"><span translate="STAFF.ENABLERECORDING">EnableRecording</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarEnableDtmfTone" aria-label="EnableDtmfTone"><span translate="STAFF.ENABLEDTMFTONE">EnableDtmfTone</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarDnd" aria-label="Dnd"><span translate="STAFF.DND">Dnd</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarUnansweredCallBadge" aria-label="UnansweredCallBadge"><span translate="STAFF.UNANSWEREDCALLBADGE">UnansweredCallBadge</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarEnableJaws" aria-label="EnableJawsIntegration"><span translate="STAFF.ENABLEJAWSINTEGRATION">EnableJawsIntegration</span></md-switch>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="agent-detail-form-container remote_control md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.REMOTE_CONTROL">REMOTE_CONTROL</div>\n                        </div>\n                        <form name="remote_controlForm" novalidate>\n                            <md-input-container ng-if="vm.agent.showWebBar == 0" class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarRemoteControl" aria-label="RemoteControl"><span translate="STAFF.REMOTECONTROL">RemoteControl</span></md-switch>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.agent.showWebBar == 0" class="md-block">\n                                <label translate="STAFF.REMOTECONTROLPORT">RemoteControlPort</label>\n                                <input type="number" name="phoneBarRemoteControlPort" ng-model="vm.agent.phoneBarRemoteControlPort" ng-required="true">\n                                <div ng-messages="remote_controlForm[\'phoneBarRemoteControlPort\'].$error" ng-show="remote_controlForm[\'phoneBarRemoteControlPort\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.REMOTECONTROLPORT_REQUIRED">RemoteControlPort field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="agent-detail-form-container sip md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.SIP">SIP</div>\n                        </div>\n                        <form name="sipForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.SIPEXPIRES">SipExpires</label>\n                                <input type="number" name="phoneBarExpires" ng-model="vm.agent.phoneBarExpires" ng-required="true" autofocus>\n                                <div class="hint"><span translate="STAFF.HELP.SIPEXPIRES"></span></div>\n                                <div ng-messages="sipForm[\'phoneBarExpires\'].$error" ng-show="sipForm[\'phoneBarExpires\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.SIPEXPIRES_REQUIRED">SipExpires field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.SIPPORT">SipPort</label>\n                                <input type="number" name="phoneBarListenPort" ng-model="vm.agent.phoneBarListenPort" ng-required="true">\n                                <div class="hint"><span translate="STAFF.HELP.SIPPORT"></span></div>\n                                <div ng-messages="sipForm[\'phoneBarListenPort\'].$error" ng-show="sipForm[\'phoneBarListenPort\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.SIPPORT_REQUIRED">SipPort field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="agent-detail-form-container callforwarding md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.CALLFORWARDING">CALLFORWARDING</div>\n                        </div>\n                        <form name="callforwardingForm" novalidate>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarUnconditional" aria-label="Unconditional"><span translate="STAFF.UNCONDITIONAL">Unconditional</span></md-switch>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.agent.phoneBarUnconditional" class="md-block">\n                                <label translate="STAFF.UNCONDITIONALNUMBER">UnconditionalNumber</label>\n                                <input type="text" name="phoneBarUnconditionalNumber" ng-model="vm.agent.phoneBarUnconditionalNumber" ng-required="true">\n                                <div ng-messages="callforwardingForm[\'phoneBarUnconditionalNumber\'].$error" ng-show="callforwardingForm[\'phoneBarUnconditionalNumber\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.UNCONDITIONALNUMBER_REQUIRED">UnconditionalNumber field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab ng-if="vm.agent.showWebBar == 2">\n                <md-tab-label>\n                    <span translate="STAFF.WEBRTC">WEBRTC</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="agent-detail-form-container settings_webrtc md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.SETTINGS_WEBRTC">SETTINGS_WEBRTC</div>\n                        </div>\n                        <form name="settings_webrtcForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.DTLSCERTFILE">dtlscertfile</label>\n                                <input type="text" name="dtlscertfile" ng-model="vm.agent.dtlscertfile" ng-required="true" autofocus>\n                                <div class="hint"><span translate="STAFF.HELP.DTLSCERTFILE"></span></div>\n                                <div ng-messages="settings_webrtcForm[\'dtlscertfile\'].$error" ng-show="settings_webrtcForm[\'dtlscertfile\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.DTLSCERTFILE_REQUIRED">dtlscertfile field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.DTLSPRIVATEKEY">dtlsprivatekey</label>\n                                <input type="text" name="dtlsprivatekey" ng-model="vm.agent.dtlsprivatekey" ng-required="true">\n                                <div class="hint"><span translate="STAFF.HELP.DTLSPRIVATEKEY"></span></div>\n                                <div ng-messages="settings_webrtcForm[\'dtlsprivatekey\'].$error" ng-show="settings_webrtcForm[\'dtlsprivatekey\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.DTLSPRIVATEKEY_REQUIRED">dtlsprivatekey field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarEnableSettings" aria-label="EnableSettings"><span translate="STAFF.ENABLESETTINGS">EnableSettings</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarAutoAnswer" aria-label="AutoAnswer"><span translate="STAFF.AUTOANSWER">AutoAnswer</span></md-switch>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.agent.phoneBarAutoAnswer" class="md-block">\n                                <label translate="STAFF.AUTOANSWERDELAY">AutoAnswerDelay</label>\n                                <input type="number" name="phoneBarAutoAnswerDelay" ng-model="vm.agent.phoneBarAutoAnswerDelay" min="0" ng-required="true">\n                                <div ng-messages="settings_webrtcForm[\'phoneBarAutoAnswerDelay\'].$error" ng-show="settings_webrtcForm[\'phoneBarAutoAnswerDelay\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.AUTOANSWERDELAY_REQUIRED">AutoAnswerDelay field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="STAFF.ERRORS.AUTOANSWERDELAY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AutoAnswerDelay must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarEnableRecording" aria-label="EnableRecording"><span translate="STAFF.ENABLERECORDING">EnableRecording</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.phoneBarEnableDtmfTone" aria-label="EnableDtmfTone"><span translate="STAFF.ENABLEDTMFTONE">EnableDtmfTone</span></md-switch>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="agent-detail-form-container sip_webrtc md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.SIP_WEBRTC">SIP_WEBRTC</div>\n                        </div>\n                        <form name="sip_webrtcForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.SIPEXPIRES">SipExpires</label>\n                                <input type="number" name="phoneBarExpires" ng-model="vm.agent.phoneBarExpires" ng-required="true" autofocus>\n                                <div class="hint"><span translate="STAFF.HELP.SIPEXPIRES"></span></div>\n                                <div ng-messages="sip_webrtcForm[\'phoneBarExpires\'].$error" ng-show="sip_webrtcForm[\'phoneBarExpires\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.SIPEXPIRES_REQUIRED">SipExpires field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="STAFF.PERMISSIONS">PERMISSIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="agent-detail-form-container general_permissions md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.GENERAL_PERMISSIONS">GENERAL_PERMISSIONS</div>\n                        </div>\n                        <form name="general_permissionsForm" novalidate>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.agent.allowmessenger" aria-label="EnableMessenger"><span translate="STAFF.ENABLEMESSENGER">EnableMessenger</span></md-switch>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="agent-detail-form-container permissions md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.PERMISSIONS">PERMISSIONS</div>\n                        </div>\n                        <div ng-controller="AgentPermissionsController as vm_pc" ng-init="vm_pc.init(vm.agent)" class="agent-detail-form-container">\n                            <md-list ng-repeat="father in vm_pc.navigation[0].children" ng-include="\'permission-nested.html\'" ng-if="vm_pc.agent.role !== \'admin\' && !father.hidden()"></md-list>\n\n                            \x3c!-- Nested navigation template --\x3e\n                            <script type="text/ng-template" id="permission-nested.html">\n                                <md-list-item>\n                                    <md-icon md-font-icon="{{father.icon}}"></md-icon>\n                                    <p translate="{{father.translate}}">{{ father.title }}</p>\n                                    <md-switch class="md-secondary" ng-model="father.enabled" ng-change="vm_pc.onChange(father)" ng-init="father.enabled = vm_pc.agent.permissions.includes(father.id)"></md-switch>\n                                </md-list-item>\n\n                                <md-divider></md-divider>\n\n                                <md-list>\n                                    <md-list-item ng-repeat="child in father.children">\n                                        <md-icon ng-if="child.icon" md-font-icon="{{child.icon}}"></md-icon>\n                                        <p translate="{{child.translate}}">{{ child.title }}</p>\n                                        <md-switch class="md-secondary" ng-model="child.enabled" ng-change="vm_pc.onChange(father, child)" ng-init="child.enabled = vm_pc.agent.permissions.includes(child.id)"></md-switch>\n                                    </md-list-item>\n                                </md-list>\n                            <\/script>\n                            \x3c!-- / Nested navigation template --\x3e\n\n                            <span ng-if="vm_pc.agent.role === \'admin\'" class="md-headline" translate="STAFF.ALL_MODULES_AVAILABLE">All modules are already available.</span>\n\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/staff/views/teams/create/dialog.html",'<md-dialog class="team-dialog" aria-label="New Team">\n    <form name="teamForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="STAFF.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.team.name" ng-required="true" autofocus>\n                <div ng-messages="teamForm[\'name\'].$error" ng-show="teamForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.team.description">\n                <div ng-messages="teamForm[\'description\'].$error" ng-show="teamForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newTeam" ng-click="vm.saveTeam()" class="send-button md-accent md-raised" ng-disabled="teamForm.$invalid || teamForm.$pristine" aria-label="SAVE" translate="STAFF.SAVE" translate-attr-aria-label="STAFF.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newTeam" ng-click="vm.addNewTeam()" class="send-button md-accent md-raised" ng-disabled="teamForm.$invalid" aria-label="ADD" translate="STAFF.ADD_TEAM" translate-attr-aria-label="STAFF.ADD_TEAM">\n                    ADD TEAM\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newTeam" ng-click="vm.deleteTeam($event)" aria-label="DELETE" translate translate-attr-aria-label="STAFF.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="STAFF.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/teams/edit/agentadd/agentadd.html",'<md-dialog class="team-dialog" aria-label="team">\n    <form name="teamForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="STAFF.AGENTADD_TEAM">Add Agent to team</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/teams/teams.html",'<div id="teams" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-account-multiple" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="STAFF.TEAMS">Teams</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="STAFF.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedTeams.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedTeams =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="STAFF.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-teams-count">\n                    <span>{{vm.selectedTeams.length}}</span>\n                <span translate="STAFF.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="TEAMS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllTeams()" translate="STAFF.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectTeams()" translate="STAFF.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedTeams" csv-label="true" filename="teams.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedTeams($event)" aria-label="delete selected" translate translate-attr-label="TEAMS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- TEAM TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedTeams" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getTeams">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'STAFF.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'STAFF.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'STAFF.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.teams.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="STAFF.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="team" md-select-id="id" ng-repeat="team in vm.teams.rows">\n                                <td md-cell ng-if="team.userpic"><img class="avatar" alt="{{team.name}}" ng-src="api/users/{{team.id}}/avatar" /></td>\n                                <td md-cell ng-if="!team.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{team.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditTeam($event, team)" md-cell class="id ">{{team.id}}</td>\n                                <td ng-click="vm.createOrEditTeam($event, team)" md-cell class="name ">{{team.name}}</td>\n                                <td ng-click="vm.createOrEditTeam($event, team)" md-cell class="description ">{{team.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(team, $event)" translate="STAFF.EDIT_TEAM">\n                                                    Edit Team\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.agentadddialog(team, $event)" translate="STAFF.AGENTADD_TEAM">\n                                                    AgentAdd Team\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(team, $event)" translate="STAFF.DELETE_TEAM">\n                                                    Delete Team\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'STAFF.PAGE\' | translate}}:\', rowsPerPage: \'{{\'STAFF.ROWSPERPAGE\' | translate}}:\', of: \'{{\'STAFF.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.teams.count}}" md-on-paginate="vm.getTeams" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / TEAM TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD TEAM BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-team-button" ng-click="vm.createOrEditTeam($event)" aria-label="add team" translate translate-attr-aria-label="STAFF.ADD_TEAM">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD TEAM BUTTON --\x3e\n</div>'),e.put("app/main/apps/staff/views/telephones/create/dialog.html",'<md-dialog class="telephone-dialog" aria-label="New Telephone">\n    <form name="telephoneForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="STAFF.ACCOUNTNAME">Accountname</label>\n                <input type="text" name="fullname" ng-model="vm.telephone.fullname" ng-required="true" autofocus>\n                <div ng-messages="telephoneForm[\'fullname\'].$error" ng-show="telephoneForm[\'fullname\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.ACCOUNTNAME_REQUIRED">Accountname field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.USERNAME">Username</label>\n                <input type="text" name="name" ng-model="vm.telephone.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" ng-disabled="!vm.newTelephone">\n                <div class="hint"><span translate="STAFF.HELP.USERNAME"></span></div>\n                <div ng-messages="telephoneForm[\'name\'].$error" ng-show="telephoneForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="STAFF.ERRORS.USERNAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Username must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.EMAIL">Email</label>\n                <input type="email" name="email" ng-model="vm.telephone.email" ng-required="true">\n                <div ng-messages="telephoneForm[\'email\'].$error" ng-show="telephoneForm[\'email\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                    </div>\n                    <div ng-message="email">\n                        <span translate="STAFF.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.newTelephone">\n                <label translate="STAFF.PASSWORD">Password</label>\n                <input type="password" name="password" ng-model="vm.telephone.password" placeholder="Password" ng-pattern="vm.passwordPattern" translate translate-attr-placeholder="STAFF.PASSWORD" required>\n                <div ng-messages="telephoneForm[\'password\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="STAFF.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.newTelephone  && (vm.newTelephone)">\n                <label translate="STAFF.CONFIRM_PASSWORD">Confirm Password</label>\n                <input type="password" match-password="password" name="confirmPassword" ng-model="confirmPassword">\n                <div ng-messages="telephoneForm.confirmPassword.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.CONFIRM_REQUIRED">Confirm field is required</span>\n                    </div>\n                    <div ng-message="passwordMatch">\n                        <span translate="STAFF.ERRORS.CONFIRM_NOT_MATCH">Your password did not match</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="STAFF.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.telephone.description">\n                <div ng-messages="telephoneForm[\'description\'].$error" ng-show="telephoneForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.newTelephone" class="md-block">\n                <md-switch ng-model="vm.telephone.autointernal" aria-label="AutoInternal"><span translate="STAFF.AUTOINTERNAL">AutoInternal</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="!vm.telephone.autointernal" class="md-block">\n                <label translate="STAFF.INTERNAL">Internal</label>\n                <input type="text" name="internal" ng-model="vm.telephone.internal" ng-required="true" ng-disabled="!vm.newTelephone">\n                <div ng-messages="telephoneForm[\'internal\'].$error" ng-show="telephoneForm[\'internal\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.INTERNAL_REQUIRED">Internal field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.newTelephone" class="md-block">\n                <md-switch ng-model="vm.telephone.voicemail" aria-label="Voicemail"><span translate="STAFF.VOICEMAIL">Voicemail</span></md-switch>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newTelephone" ng-click="vm.saveTelephone()" class="send-button md-accent md-raised" ng-disabled="telephoneForm.$invalid || telephoneForm.$pristine" aria-label="SAVE" translate="STAFF.SAVE" translate-attr-aria-label="STAFF.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newTelephone" ng-click="vm.addNewTelephone()" class="send-button md-accent md-raised" ng-disabled="telephoneForm.$invalid" aria-label="ADD" translate="STAFF.ADD_TELEPHONE" translate-attr-aria-label="STAFF.ADD_TELEPHONE">\n                    ADD TELEPHONE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newTelephone" ng-click="vm.deleteTelephone($event)" aria-label="DELETE" translate translate-attr-aria-label="STAFF.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="STAFF.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/telephones/edit/changepassword/changepassword.html",'<md-dialog class="telephone-dialog" aria-label="{{vm.name}}">\n    <form name="telephoneForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ \'STAFF.CHANGE_PASSWORD\' | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="STAFF.NEW_PASSWORD">New Password</label>\n                <input type="password" name="password" ng-model="vm.password" placeholder="Password" translate ng-pattern="vm.passwordPattern" translate-attr-placeholder="STAFF.NEW_PASSWORD" required>\n                <div ng-messages="telephoneForm.password.$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n\n                    <div ng-message="pattern">\n                        <span translate="STAFF.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.CONFIRM_PASSWORD">Confirm Password</label>\n                <input type="password" match-password="password" name="confirmPassword" ng-model="confirmPassword">\n                <div ng-messages="telephoneForm.confirmPassword.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.CONFIRM_REQUIRED">Confirm field is required</span>\n                    </div>\n                    <div ng-message="passwordMatch">\n                        <span translate="STAFF.ERRORS.CONFIRM_NOT_MATCH">Your password did not match</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.savePassword()" class="send-button md-accent md-raised" ng-disabled="telephoneForm.$invalid || telephoneForm.$pristine" aria-label="SAVE" translate="STAFF.SAVE" translate-attr-aria-label="STAFF.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/telephones/edit/view.html",'<div id="staff-telephone" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-telephones-button md-icon-button" aria-label="Go to telephones" ng-click="vm.gotoTelephones()" translate translate-attr-aria-label="STAFF.GO_TO_TELEPHONES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="telephone-image" hide-xs>\n                    <img ng-src="assets/images/business/telephones.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.telephone.id}}\n                        <span ng-if="vm.telephone.name">{{vm.telephone.name}}</span>\n                        <span ng-if="vm.telephone.exten">{{vm.telephone.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="STAFF.CREATED_AT"></span> <span>{{vm.telephone.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.changepassworddialog(vm.telephone, $event)" class="md-fab md-warn md-icon-button" aria-label="changepassword">\n                <md-tooltip><span translate="STAFF.CHANGEPASSWORD_TELEPHONE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-key-variant"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveTelephone()" class="send-button md-accent md-raised" ng-disabled="(accountForm.$invalid) || (generalForm.$invalid)" translate="STAFF.SAVE" translate-attr-aria-label="STAFF.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="STAFF.ACCOUNT">ACCOUNT</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="telephone-detail-form-container account md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.ACCOUNT">ACCOUNT</div>\n                        </div>\n                        <form name="accountForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.ACCOUNTNAME">Accountname</label>\n                                <input type="text" name="fullname" ng-model="vm.telephone.fullname" ng-required="true" autofocus>\n                                <div ng-messages="accountForm[\'fullname\'].$error" ng-show="accountForm[\'fullname\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.ACCOUNTNAME_REQUIRED">Accountname field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.USERNAME">Username</label>\n                                <input type="text" name="name" ng-model="vm.telephone.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" ng-disabled="true">\n                                <div class="hint"><span translate="STAFF.HELP.USERNAME"></span></div>\n                                <div ng-messages="accountForm[\'name\'].$error" ng-show="accountForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="STAFF.ERRORS.USERNAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Username must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.EMAIL">Email</label>\n                                <input type="email" name="email" ng-model="vm.telephone.email" ng-required="true">\n                                <div ng-messages="accountForm[\'email\'].$error" ng-show="accountForm[\'email\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                                    </div>\n                                    <div ng-message="email">\n                                        <span translate="STAFF.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.telephone.description">\n                                <div ng-messages="accountForm[\'description\'].$error" ng-show="accountForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.PHONE">Phone</label>\n                                <input type="text" name="phone" ng-model="vm.telephone.phone">\n                                <div ng-messages="accountForm[\'phone\'].$error" ng-show="accountForm[\'phone\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.PHONE_REQUIRED">Phone field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.MOBILE">Mobile</label>\n                                <input type="text" name="mobile" ng-model="vm.telephone.mobile">\n                                <div ng-messages="accountForm[\'mobile\'].$error" ng-show="accountForm[\'mobile\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.MOBILE_REQUIRED">Mobile field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="STAFF.VOICE">VOICE</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="telephone-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container ng-if="!vm.telephone.autointernal" class="md-block">\n                                <label translate="STAFF.INTERNAL">Internal</label>\n                                <input type="text" name="internal" ng-model="vm.telephone.internal" ng-required="true" autofocus ng-disabled="true">\n                                <div ng-messages="generalForm[\'internal\'].$error" ng-show="generalForm[\'internal\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.INTERNAL_REQUIRED">Internal field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.TRANSPORT">Transport</label>\n                                <md-select name="transport" ng-model="vm.telephone.transport" required multiple>\n                                    <md-option ng-value="\'udp\'">udp</md-option>\n                                    <md-option ng-value="\'tcp\'">tcp</md-option>\n                                    <md-option ng-value="\'ws\'">ws</md-option>\n                                    <md-option ng-value="\'wss\'">wss</md-option>\n                                    <md-option ng-value="\'tls\'">tls</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="STAFF.HELP.TRANSPORT"></span></div>\n                                <div ng-messages="generalForm[\'transport\'].$error" ng-show="generalForm[\'transport\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.TRANSPORT_REQUIRED">Transport field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.NAT">NAT</label>\n                                <md-select name="nat" ng-model="vm.telephone.nat" required multiple>\n                                    <md-option ng-value="\'force_rport\'">force_rport</md-option>\n                                    <md-option ng-value="\'comedia\'">comedia</md-option>\n                                    <md-option ng-value="\'yes\'">yes</md-option>\n                                    <md-option ng-value="\'no\'">no</md-option>\n                                    <md-option ng-value="\'never\'">never</md-option>\n                                    <md-option ng-value="\'route\'">route</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="STAFF.HELP.NAT"></span></div>\n                                <div ng-messages="generalForm[\'nat\'].$error" ng-show="generalForm[\'nat\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.NAT_REQUIRED">NAT field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.ALLOWCODECS">AllowCodecs</label>\n                                <md-select name="allow" ng-model="vm.telephone.allow" required multiple>\n                                    <md-option ng-value="\'ulaw\'">ulaw</md-option>\n                                    <md-option ng-value="\'alaw\'">alaw</md-option>\n                                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                                    <md-option ng-value="\'g722\'">g722</md-option>\n                                    <md-option ng-value="\'g729\'">g729</md-option>\n                                    <md-option ng-value="\'opus\'">opus</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="STAFF.HELP.ALLOWCODECS"></span></div>\n                                <div ng-messages="generalForm[\'allow\'].$error" ng-show="generalForm[\'allow\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.ALLOWCODECS_REQUIRED">AllowCodecs field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.CALLERID">CallerId</label>\n                                <input type="text" name="callerid" ng-model="vm.telephone.callerid">\n                                <div ng-messages="generalForm[\'callerid\'].$error" ng-show="generalForm[\'callerid\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.CALLERID_REQUIRED">CallerId field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.CONTEXT">Context</label>\n                                <md-select name="context" ng-model="vm.telephone.context" required>\n                                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'context\'].$error" ng-show="generalForm[\'context\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.CALLGROUP">Callgroup</label>\n                                <input type="text" name="callgroup" ng-model="vm.telephone.callgroup">\n                                <div class="hint"><span translate="STAFF.HELP.CALLGROUP"></span></div>\n                                <div ng-messages="generalForm[\'callgroup\'].$error" ng-show="generalForm[\'callgroup\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.CALLGROUP_REQUIRED">Callgroup field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.PICKUPGROUP">Pickupgroup</label>\n                                <input type="text" name="pickupgroup" ng-model="vm.telephone.pickupgroup">\n                                <div class="hint"><span translate="STAFF.HELP.PICKUPGROUP"></span></div>\n                                <div ng-messages="generalForm[\'pickupgroup\'].$error" ng-show="generalForm[\'pickupgroup\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.PICKUPGROUP_REQUIRED">Pickupgroup field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.ENCRYPTION">Encryption</label>\n                                <md-select name="encryption" ng-model="vm.telephone.encryption" required>\n                                    <md-option ng-value="\'yes\'">yes</md-option>\n                                    <md-option ng-value="\'no\'">no</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="STAFF.HELP.ENCRYPTION"></span></div>\n                                <div ng-messages="generalForm[\'encryption\'].$error" ng-show="generalForm[\'encryption\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.ENCRYPTION_REQUIRED">Encryption field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/staff/views/telephones/telephones.html",'<div id="telephones" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-account-multiple" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="STAFF.TELEPHONES">Telephones</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="STAFF.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedTelephones.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedTelephones =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="STAFF.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-telephones-count">\n                    <span>{{vm.selectedTelephones.length}}</span>\n                <span translate="STAFF.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="TELEPHONES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllTelephones()" translate="STAFF.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectTelephones()" translate="STAFF.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedTelephones" csv-label="true" filename="telephones.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedTelephones($event)" aria-label="delete selected" translate translate-attr-label="TELEPHONES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- TELEPHONE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedTelephones" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getTelephones">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="fullname">{{ \'STAFF.ACCOUNTNAME\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'STAFF.USERNAME\' | translate }}</th>\n                                <th md-column md-order-by="email">{{ \'STAFF.EMAIL\' | translate }}</th>\n                                <th md-column md-order-by="internal">{{ \'STAFF.INTERNAL\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.telephones.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="STAFF.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="telephone" md-select-id="id" ng-repeat="telephone in vm.telephones.rows">\n                                <td md-cell ng-if="telephone.userpic"><img class="avatar" alt="{{telephone.name}}" ng-src="api/users/{{telephone.id}}/avatar" /></td>\n                                <td md-cell ng-if="!telephone.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{telephone.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditTelephone($event, telephone)" md-cell class="fullname font-weight-600">{{telephone.fullname}}</td>\n                                <td ng-click="vm.createOrEditTelephone($event, telephone)" md-cell class="name ">{{telephone.name}}</td>\n                                <td ng-click="vm.createOrEditTelephone($event, telephone)" md-cell class="email ">{{telephone.email}}</td>\n                                <td ng-click="vm.createOrEditTelephone($event, telephone)" md-cell class="internal ">{{telephone.internal}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(telephone, $event)" translate="STAFF.EDIT_TELEPHONE">\n                                                    Edit Telephone\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(telephone, $event)" translate="STAFF.DELETE_TELEPHONE">\n                                                    Delete Telephone\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'STAFF.PAGE\' | translate}}:\', rowsPerPage: \'{{\'STAFF.ROWSPERPAGE\' | translate}}:\', of: \'{{\'STAFF.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.telephones.count}}" md-on-paginate="vm.getTelephones" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / TELEPHONE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD TELEPHONE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-telephone-button" ng-click="vm.createOrEditTelephone($event)" aria-label="add telephone" translate translate-attr-aria-label="STAFF.ADD_TELEPHONE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD TELEPHONE BUTTON --\x3e\n</div>'),e.put("app/main/apps/staff/views/users/create/dialog.html",'<md-dialog class="user-dialog" aria-label="New User">\n    <form name="userForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="STAFF.ROLE">Role</label>\n                <md-select name="role" ng-model="vm.user.role" required autofocus ng-disabled="!vm.newUser">\n                    <md-option ng-value="\'admin\'">Admin</md-option>\n                    <md-option ng-value="\'user\'">User</md-option>\n                </md-select>\n                <div ng-messages="userForm[\'role\'].$error" ng-show="userForm[\'role\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.ROLE_REQUIRED">Role field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.FULLNAME">Fullname</label>\n                <input type="text" name="fullname" ng-model="vm.user.fullname" ng-required="true">\n                <div ng-messages="userForm[\'fullname\'].$error" ng-show="userForm[\'fullname\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.FULLNAME_REQUIRED">Fullname field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.USERNAME">Username</label>\n                <input type="text" name="name" ng-model="vm.user.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" ng-disabled="!vm.newUser">\n                <div class="hint"><span translate="STAFF.HELP.USERNAME"></span></div>\n                <div ng-messages="userForm[\'name\'].$error" ng-show="userForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="STAFF.ERRORS.USERNAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Username must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.EMAIL">Email</label>\n                <input type="email" name="email" ng-model="vm.user.email" ng-required="true">\n                <div ng-messages="userForm[\'email\'].$error" ng-show="userForm[\'email\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                    </div>\n                    <div ng-message="email">\n                        <span translate="STAFF.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.newUser">\n                <label translate="STAFF.PASSWORD">Password</label>\n                <input type="password" name="password" ng-model="vm.user.password" placeholder="Password" ng-pattern="vm.passwordPattern" translate translate-attr-placeholder="STAFF.PASSWORD" required>\n                <div ng-messages="userForm[\'password\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="STAFF.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.newUser  && (vm.newUser)">\n                <label translate="STAFF.CONFIRM_PASSWORD">Confirm Password</label>\n                <input type="password" match-password="password" name="confirmPassword" ng-model="confirmPassword">\n                <div ng-messages="userForm.confirmPassword.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.CONFIRM_REQUIRED">Confirm field is required</span>\n                    </div>\n                    <div ng-message="passwordMatch">\n                        <span translate="STAFF.ERRORS.CONFIRM_NOT_MATCH">Your password did not match</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="STAFF.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.user.description">\n                <div ng-messages="userForm[\'description\'].$error" ng-show="userForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.newUser" class="md-block">\n                <md-switch ng-model="vm.user.autointernal" aria-label="AutoInternal"><span translate="STAFF.AUTOINTERNAL">AutoInternal</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="!vm.user.autointernal" class="md-block">\n                <label translate="STAFF.INTERNAL">Internal</label>\n                <input type="text" name="internal" ng-model="vm.user.internal" ng-required="true" ng-disabled="!vm.newUser">\n                <div ng-messages="userForm[\'internal\'].$error" ng-show="userForm[\'internal\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.INTERNAL_REQUIRED">Internal field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newUser" ng-click="vm.saveUser()" class="send-button md-accent md-raised" ng-disabled="userForm.$invalid || userForm.$pristine" aria-label="SAVE" translate="STAFF.SAVE" translate-attr-aria-label="STAFF.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newUser" ng-click="vm.addNewUser()" class="send-button md-accent md-raised" ng-disabled="userForm.$invalid" aria-label="ADD" translate="STAFF.ADD_USER" translate-attr-aria-label="STAFF.ADD_USER">\n                    ADD USER\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newUser" ng-click="vm.deleteUser($event)" aria-label="DELETE" translate translate-attr-aria-label="STAFF.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="STAFF.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/users/edit/changepassword/changepassword.html",'<md-dialog class="user-dialog" aria-label="{{vm.name}}">\n    <form name="userForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ \'STAFF.CHANGE_PASSWORD\' | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="STAFF.NEW_PASSWORD">New Password</label>\n                <input type="password" name="password" ng-model="vm.password" placeholder="Password" translate ng-pattern="vm.passwordPattern" translate-attr-placeholder="STAFF.NEW_PASSWORD" required>\n                <div ng-messages="userForm.password.$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n\n                    <div ng-message="pattern">\n                        <span translate="STAFF.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="STAFF.CONFIRM_PASSWORD">Confirm Password</label>\n                <input type="password" match-password="password" name="confirmPassword" ng-model="confirmPassword">\n                <div ng-messages="userForm.confirmPassword.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span translate="STAFF.ERRORS.CONFIRM_REQUIRED">Confirm field is required</span>\n                    </div>\n                    <div ng-message="passwordMatch">\n                        <span translate="STAFF.ERRORS.CONFIRM_NOT_MATCH">Your password did not match</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.savePassword()" class="send-button md-accent md-raised" ng-disabled="userForm.$invalid || userForm.$pristine" aria-label="SAVE" translate="STAFF.SAVE" translate-attr-aria-label="STAFF.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/users/edit/queueadd/queueadd.html",'<md-dialog class="user-dialog" aria-label="user">\n    <form name="userForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2>{{vm.title}}</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <md-input-container flex class="no-margin" ng-if="vm.user.role === \'agent\' && vm.isVoiceChannel()">\n                <label translate="STAFF.PENALTY">Penalty</label>\n                <input name="penalty" ng-model="vm.penalty" placeholder="0" required md-minlength="0" md-maxlength="3">\n                <div ng-messages="userForm.penalty.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span>You must supply a penalty.</span>\n                    </div>\n                    <div ng-message="md-minlength">\n                        <span>Min Penalty 0 characters.</span>\n                    </div>\n                    <div ng-message="md-maxlength">\n                        <span>Max Penalty 3 characters.</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/staff/views/users/edit/view.html",'<div id="staff-user" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-users-button md-icon-button" aria-label="Go to users" ng-click="vm.gotoUsers()" translate translate-attr-aria-label="STAFF.GO_TO_USERS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="user-image" hide-xs>\n                    <img ng-src="assets/images/business/users.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.user.id}}\n                        <span ng-if="vm.user.name">{{vm.user.name}}</span>\n                        <span ng-if="vm.user.exten">{{vm.user.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="STAFF.CREATED_AT"></span> <span>{{vm.user.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div ng-cloak ng-if="vm.user.role !== \'admin\'">\n            <md-fab-speed-dial md-direction="left" class="md-scale md-fab">\n                <md-fab-trigger>\n                    <md-button aria-label="menu" class="md-fab md-primary md-icon-button">\n                        <md-tooltip md-direction="top" md-visible="false"><span translate="STAFF.CHANNELS">Channels</span></md-tooltip>\n                        <md-icon md-font-icon="icon-eye" aria-label="queueadd"></md-icon>\n                    </md-button>\n                </md-fab-trigger>\n                <md-fab-actions>\n                    <md-button aria-label="voice" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.user, \'voice\', $event, \'inbound\')">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="VOICE.VOICE">Voice</span></md-tooltip>\n                        <md-icon md-font-icon="icon-phone" aria-label="voice"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.dialer" aria-label="motion bull" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.user, \'voice\', $event, \'outbound\')">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="MOTIONDIALER.MOTIONDIALER">Motion Bull</span></md-tooltip>\n                        <md-icon md-font-icon="icon-fire" aria-label="motion bull"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.chat" aria-label="chat" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.user, \'chat\', $event)">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="CHAT.CHAT">Chat</span></md-tooltip>\n                        <md-icon md-font-icon="icon-hangouts" aria-label="chat"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.mail" aria-label="mail" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.user, \'mail\', $event)">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="MAIL.MAIL">Email</span></md-tooltip>\n                        <md-icon md-font-icon="icon-email" aria-label="mail"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.messaging" aria-label="sms" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.user, \'sms\', $event)">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="SMS.SMS">Sms</span></md-tooltip>\n                        <md-icon md-font-icon="icon-message-text" aria-label="sms"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.openchannel" aria-label="openchannel" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.user, \'openchannel\', $event)">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="OPENCHANNEL.OPENCHANNEL">Openchannel</span></md-tooltip>\n                        <md-icon md-font-icon="icon-google-earth" aria-label="openchannel"></md-icon>\n                    </md-button>\n                    <md-button ng-if="vm.license.fax" aria-label="fax" class="md-fab md-raised md-icon-button md-mini" ng-click="vm.queueaddchannel(vm.user, \'fax\', $event)">\n                        <md-tooltip md-direction="bottom" md-visible="false"><span translate="FAX.FAX">Fax</span></md-tooltip>\n                        <md-icon md-font-icon="icon-deskphone" aria-label="fax"></md-icon>\n                    </md-button>\n                </md-fab-actions>\n            </md-fab-speed-dial>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.changepassworddialog(vm.user, $event)" class="md-fab md-warn md-icon-button" aria-label="changepassword">\n                <md-tooltip><span translate="STAFF.CHANGEPASSWORD_USER"></span></md-tooltip>\n                <md-icon md-font-icon="icon-key-variant"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveUser()" class="send-button md-accent md-raised" ng-disabled="(personal_infoForm.$invalid) || (security_suiteForm.$invalid) || (change_avatarForm.$invalid) || (generalForm.$invalid) || (general_permissionsForm.$invalid) || (permissionsForm.$invalid)"\n                translate="STAFF.SAVE" translate-attr-aria-label="STAFF.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="STAFF.ACCOUNT">ACCOUNT</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="user-detail-form-container personal_info md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.PERSONAL_INFO">PERSONAL_INFO</div>\n                        </div>\n                        <form name="personal_infoForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.ROLE">Role</label>\n                                <md-select name="role" ng-model="vm.user.role" required autofocus ng-disabled="true">\n                                    <md-option ng-value="\'admin\'">Admin</md-option>\n                                    <md-option ng-value="\'user\'">User</md-option>\n                                </md-select>\n                                <div ng-messages="personal_infoForm[\'role\'].$error" ng-show="personal_infoForm[\'role\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.ROLE_REQUIRED">Role field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.FULLNAME">Fullname</label>\n                                <input type="text" name="fullname" ng-model="vm.user.fullname" ng-required="true">\n                                <div ng-messages="personal_infoForm[\'fullname\'].$error" ng-show="personal_infoForm[\'fullname\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.FULLNAME_REQUIRED">Fullname field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.USERNAME">Username</label>\n                                <input type="text" name="name" ng-model="vm.user.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" ng-disabled="true">\n                                <div class="hint"><span translate="STAFF.HELP.USERNAME"></span></div>\n                                <div ng-messages="personal_infoForm[\'name\'].$error" ng-show="personal_infoForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.USERNAME_REQUIRED">Username field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="STAFF.ERRORS.USERNAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Username must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.EMAIL">Email</label>\n                                <input type="email" name="email" ng-model="vm.user.email" ng-required="true">\n                                <div ng-messages="personal_infoForm[\'email\'].$error" ng-show="personal_infoForm[\'email\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                                    </div>\n                                    <div ng-message="email">\n                                        <span translate="STAFF.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.PHONE">Phone</label>\n                                <input type="text" name="phone" ng-model="vm.user.phone">\n                                <div ng-messages="personal_infoForm[\'phone\'].$error" ng-show="personal_infoForm[\'phone\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.PHONE_REQUIRED">Phone field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.MOBILE">Mobile</label>\n                                <input type="text" name="mobile" ng-model="vm.user.mobile">\n                                <div ng-messages="personal_infoForm[\'mobile\'].$error" ng-show="personal_infoForm[\'mobile\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.MOBILE_REQUIRED">Mobile field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.user.description">\n                                <div ng-messages="personal_infoForm[\'description\'].$error" ng-show="personal_infoForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="user-detail-form-container security_suite md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.SECURITY_SUITE">SECURITY_SUITE</div>\n                        </div>\n                        <form name="security_suiteForm" novalidate>\n                            <md-input-container ng-if="vm.user.passwordResetAt != null" class="md-block">\n                                <label translate="STAFF.LAST_PASSWORD_RESET_AT">Last_Password_Reset_At</label>\n                                <input type="text" name="passwordResetAt" ng-model="vm.user.passwordResetAt" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="STAFF.HELP.LAST_PASSWORD_RESET_AT"></span></div>\n                                <div ng-messages="security_suiteForm[\'passwordResetAt\'].$error" ng-show="security_suiteForm[\'passwordResetAt\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.LAST_PASSWORD_RESET_AT_REQUIRED">Last_Password_Reset_At field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.user.passwordResetAt == null" class="md-block">\n                                <label translate="STAFF.NO_PASSWORD_CHANGE">No_Password_Change</label>\n                                <input type="text" name="passwordResetAt" ng-model="vm.user.passwordResetAt" ng-disabled="true">\n                                <div ng-messages="security_suiteForm[\'passwordResetAt\'].$error" ng-show="security_suiteForm[\'passwordResetAt\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.NO_PASSWORD_CHANGE_REQUIRED">No_Password_Change field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="user-detail-form-container change_avatar md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.CHANGE_AVATAR">CHANGE_AVATAR</div>\n                        </div>\n                        <div ng-controller="Userchange_avatarController as vm_ca" ng-init="vm_ca.init(vm.user)" class="user-detail-form-container md-background-bg md-whiteframe-1dp">\n\n                            <div id="user-image-uploader" flow-init="vm_ca.ngFlowOptions" flow-name="vm_ca.ngFlow.flow" flow-files-submitted="vm_ca.upload()" flow-file-added="vm_ca.fileAdded($file)" flow-file-success="vm_ca.fileSuccess($file, $message)" flow-complete="vm_ca.uploadComplete()"\n                                flow-drop flow-drag-enter="vm_ca.dropping=true" flow-drag-leave="vm_ca.dropping=false" ng-class="{\'dropping\':vm.dropping}">\n\n                                <div class="drop-text hint-text" layout="row" layout-align="center center">\n                                    <span translate="EC.DROP_TO_UPLOAD">Drop to upload</span>\n                                </div>\n\n                                <div class="upload-button" layout="column" layout-align="center center">\n                                    <md-button class="md-accent md-raised" flow-btn>\n                                        Upload\n                                    </md-button>\n                                    <span class="secondary-text mt-8">You can also drop images here to upload. Only PNG, JPG - Max. 8MB</span>\n                                </div>\n\n                                <div layout="row" layout-align="start start" layout-wrap>\n                                    <div ng-repeat="change_avatarimage in vm_ca.user.images" ng-switch="change_avatarimage.type">\n                                        <div class="user-image uploading" ng-switch-when="uploading" layout="row" layout-align="center center">\n                                            <div class="overlay" layout="column" layout-align="center center">\n                                                <md-progress-linear md-mode="determinate" value="{{change_avatarimage.file.progress() * 100}}">\n                                                </md-progress-linear>\n                                            </div>\n                                            <img class="media" flow-img="change_avatarimage.file">\n                                        </div>\n\n                                        <div class="user-image" ng-switch-when="image" layout="row" layout-align="center center">\n                                            <img class="media" ng-src="{{change_avatarimage.url}}">\n                                        </div>\n                                    </div>\n                                </div>\n                            </div>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="STAFF.VOICE">VOICE</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="user-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container ng-if="!vm.user.autointernal" class="md-block">\n                                <label translate="STAFF.INTERNAL">Internal</label>\n                                <input type="text" name="internal" ng-model="vm.user.internal" ng-required="true" autofocus ng-disabled="true">\n                                <div ng-messages="generalForm[\'internal\'].$error" ng-show="generalForm[\'internal\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.INTERNAL_REQUIRED">Internal field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.TRANSPORT">Transport</label>\n                                <md-select name="transport" ng-model="vm.user.transport" required multiple>\n                                    <md-option ng-value="\'udp\'">udp</md-option>\n                                    <md-option ng-value="\'tcp\'">tcp</md-option>\n                                    <md-option ng-value="\'ws\'">ws</md-option>\n                                    <md-option ng-value="\'wss\'">wss</md-option>\n                                    <md-option ng-value="\'tls\'">tls</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'transport\'].$error" ng-show="generalForm[\'transport\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.TRANSPORT_REQUIRED">Transport field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.NAT">NAT</label>\n                                <md-select name="nat" ng-model="vm.user.nat" required multiple>\n                                    <md-option ng-value="\'force_rport\'">force_rport</md-option>\n                                    <md-option ng-value="\'comedia\'">comedia</md-option>\n                                    <md-option ng-value="\'yes\'">yes</md-option>\n                                    <md-option ng-value="\'no\'">no</md-option>\n                                    <md-option ng-value="\'never\'">never</md-option>\n                                    <md-option ng-value="\'route\'">route</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="STAFF.HELP.NAT"></span></div>\n                                <div ng-messages="generalForm[\'nat\'].$error" ng-show="generalForm[\'nat\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.NAT_REQUIRED">NAT field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.ALLOWCODECS">AllowCodecs</label>\n                                <md-select name="allow" ng-model="vm.user.allow" required multiple>\n                                    <md-option ng-value="\'ulaw\'">ulaw</md-option>\n                                    <md-option ng-value="\'alaw\'">alaw</md-option>\n                                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                                    <md-option ng-value="\'g722\'">g722</md-option>\n                                    <md-option ng-value="\'g729\'">g729</md-option>\n                                    <md-option ng-value="\'opus\'">opus</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="STAFF.HELP.ALLOWCODECS"></span></div>\n                                <div ng-messages="generalForm[\'allow\'].$error" ng-show="generalForm[\'allow\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.ALLOWCODECS_REQUIRED">AllowCodecs field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.CONTEXT">Context</label>\n                                <md-select name="context" ng-model="vm.user.context" required>\n                                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'context\'].$error" ng-show="generalForm[\'context\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.CALLGROUP">Callgroup</label>\n                                <input type="text" name="callgroup" ng-model="vm.user.callgroup">\n                                <div class="hint"><span translate="STAFF.HELP.CALLGROUP"></span></div>\n                                <div ng-messages="generalForm[\'callgroup\'].$error" ng-show="generalForm[\'callgroup\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.CALLGROUP_REQUIRED">Callgroup field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.PICKUPGROUP">Pickupgroup</label>\n                                <input type="text" name="pickupgroup" ng-model="vm.user.pickupgroup">\n                                <div class="hint"><span translate="STAFF.HELP.PICKUPGROUP"></span></div>\n                                <div ng-messages="generalForm[\'pickupgroup\'].$error" ng-show="generalForm[\'pickupgroup\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.PICKUPGROUP_REQUIRED">Pickupgroup field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="STAFF.PERMISSIONS">PERMISSIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div ng-if="vm.currentUser.role === \'admin\' && vm.user.role !== \'admin\'" class="user-detail-form-container general_permissions md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.GENERAL_PERMISSIONS">GENERAL_PERMISSIONS</div>\n                        </div>\n                        <form name="general_permissionsForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="STAFF.EDITPERMISSIONS">EditPermissions</label>\n                                <md-select name="crudPermissions" ng-model="vm.user.crudPermissions" autofocus>\n\n                                    <md-option ng-value="0"> {{ \'STAFF.READANDEDITANDDELETE\' | translate }}</md-option>\n\n                                    <md-option ng-value="1"> {{ \'STAFF.READANDEDIT\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="general_permissionsForm[\'crudPermissions\'].$error" ng-show="general_permissionsForm[\'crudPermissions\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="STAFF.ERRORS.EDITPERMISSIONS_REQUIRED">EditPermissions field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="user-detail-form-container permissions md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="STAFF.PERMISSIONS">PERMISSIONS</div>\n                        </div>\n                        <div ng-controller="UserPermissionsController as vm_pc" ng-init="vm_pc.init(vm.user)" class="user-detail-form-container">\n                            <md-list ng-repeat="father in vm_pc.navigation[0].children" ng-include="\'permission-nested.html\'" ng-if="vm_pc.user.role !== \'admin\' && !father.hidden()"></md-list>\n\n                            \x3c!-- Nested navigation template --\x3e\n                            <script type="text/ng-template" id="permission-nested.html">\n                                <md-list-item>\n                                    <md-icon md-font-icon="{{father.icon}}"></md-icon>\n                                    <p translate="{{father.translate}}">{{ father.title }}</p>\n                                    <md-switch class="md-secondary" ng-model="father.enabled" ng-change="vm_pc.onChange(father)" ng-init="father.enabled = vm_pc.user.permissions.includes(father.id)"></md-switch>\n                                </md-list-item>\n\n                                <md-divider></md-divider>\n\n                                <md-list>\n                                    <md-list-item ng-repeat="child in father.children">\n                                        <md-icon ng-if="child.icon" md-font-icon="{{child.icon}}"></md-icon>\n                                        <p translate="{{child.translate}}">{{ child.title }}</p>\n                                        <md-switch class="md-secondary" ng-model="child.enabled" ng-change="vm_pc.onChange(father, child)" ng-init="child.enabled = vm_pc.user.permissions.includes(child.id)"></md-switch>\n                                    </md-list-item>\n                                </md-list>\n                            <\/script>\n                            \x3c!-- / Nested navigation template --\x3e\n\n                            <span ng-if="vm_pc.user.role === \'admin\'" class="md-headline" translate="STAFF.ALL_MODULES_AVAILABLE">All modules are already available.</span>\n\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/staff/views/users/users.html",'<div id="users" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-account-multiple" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="STAFF.USERS">Users</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="STAFF.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedUsers.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedUsers =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="STAFF.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-users-count">\n                    <span>{{vm.selectedUsers.length}}</span>\n                <span translate="STAFF.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="USERS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllUsers()" translate="STAFF.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectUsers()" translate="STAFF.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedUsers" csv-label="true" filename="users.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- USER TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedUsers" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getUsers">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="role">{{ \'STAFF.ROLE\' | translate }}</th>\n                                <th md-column md-order-by="fullname">{{ \'STAFF.FULLNAME\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'STAFF.USERNAME\' | translate }}</th>\n                                <th md-column md-order-by="email">{{ \'STAFF.EMAIL\' | translate }}</th>\n                                <th md-column md-order-by="phone">{{ \'STAFF.PHONE\' | translate }}</th>\n                                <th md-column md-order-by="mobile">{{ \'STAFF.MOBILE\' | translate }}</th>\n                                <th md-column md-order-by="internal">{{ \'STAFF.INTERNAL\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.users.rows.length">\n                                <td md-cell colspan="8">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="STAFF.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="user" md-select-id="id" ng-repeat="user in vm.users.rows">\n                                <td md-cell ng-if="user.userpic"><img class="avatar" alt="{{user.name}}" ng-src="api/users/{{user.id}}/avatar" /></td>\n                                <td md-cell ng-if="!user.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{user.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditUser($event, user)" md-cell class="role ">{{ vm.arrayrole[user.role].option }}</td>\n                                <td ng-click="vm.createOrEditUser($event, user)" md-cell class="fullname font-weight-600">{{user.fullname}}</td>\n                                <td ng-click="vm.createOrEditUser($event, user)" md-cell class="name ">{{user.name}}</td>\n                                <td ng-click="vm.createOrEditUser($event, user)" md-cell class="email ">{{user.email}}</td>\n                                <td ng-click="vm.createOrEditUser($event, user)" md-cell class="phone ">{{user.phone}}</td>\n                                <td ng-click="vm.createOrEditUser($event, user)" md-cell class="mobile ">{{user.mobile}}</td>\n                                <td ng-click="vm.createOrEditUser($event, user)" md-cell class="internal ">{{user.internal}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(user, $event)" translate="STAFF.EDIT_USER">\n                                                    Edit User\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.role === \'admin\' && user.id !== vm.currentUser.id">\n                                                <md-button ng-click="vm.deleteconfirm(user, $event)" translate="STAFF.DELETE_USER">\n                                                    Delete User\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'STAFF.PAGE\' | translate}}:\', rowsPerPage: \'{{\'STAFF.ROWSPERPAGE\' | translate}}:\', of: \'{{\'STAFF.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.users.count}}" md-on-paginate="vm.getUsers" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / USER TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD USER BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-user-button" ng-click="vm.createOrEditUser($event)" aria-label="add user" translate translate-attr-aria-label="STAFF.ADD_USER">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD USER BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/cannedAnswers/cannedAnswers.html",'<div id="cannedAnswers" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.CANNEDANSWERS">CannedAnswers</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedCannedAnswers.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedCannedAnswers =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-cannedAnswers-count">\n                    <span>{{vm.selectedCannedAnswers.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="CANNEDANSWERS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllCannedAnswers()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectCannedAnswers()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedCannedAnswers" csv-label="true" filename="cannedAnswers.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedCannedAnswers($event)" aria-label="delete selected" translate translate-attr-label="CANNEDANSWERS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- CANNEDANSWER TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedCannedAnswers" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getCannedAnswers">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="key">{{ \'TOOLS.KEY\' | translate }}</th>\n                                <th md-column md-order-by="value">{{ \'TOOLS.VALUE\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.cannedAnswers.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="cannedAnswer" md-select-id="id" ng-repeat="cannedAnswer in vm.cannedAnswers.rows">\n                                <td md-cell ng-if="cannedAnswer.userpic"><img class="avatar" alt="{{cannedAnswer.name}}" ng-src="api/users/{{cannedAnswer.id}}/avatar" /></td>\n                                <td md-cell ng-if="!cannedAnswer.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{cannedAnswer.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditCannedAnswer($event, cannedAnswer)" md-cell class="id ">{{cannedAnswer.id}}</td>\n                                <td ng-click="vm.createOrEditCannedAnswer($event, cannedAnswer)" md-cell class="key ">{{cannedAnswer.key}}</td>\n                                <td ng-click="vm.createOrEditCannedAnswer($event, cannedAnswer)" md-cell class="value ">{{cannedAnswer.value}}</td>\n                                <td ng-click="vm.createOrEditCannedAnswer($event, cannedAnswer)" md-cell class="description ">{{cannedAnswer.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(cannedAnswer, $event)" translate="TOOLS.EDIT_CANNEDANSWER">\n                                                    Edit CannedAnswer\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(cannedAnswer, $event)" translate="TOOLS.DELETE_CANNEDANSWER">\n                                                    Delete CannedAnswer\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.cannedAnswers.count}}" md-on-paginate="vm.getCannedAnswers" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / CANNEDANSWER TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD CANNEDANSWER BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-cannedAnswer-button" ng-click="vm.createOrEditCannedAnswer($event)" aria-label="add cannedAnswer" translate translate-attr-aria-label="TOOLS.ADD_CANNEDANSWER">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD CANNEDANSWER BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/cannedAnswers/create/dialog.html",'<md-dialog class="cannedAnswer-dialog" aria-label="New CannedAnswer">\n    <form name="cannedAnswerForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.KEY">Key</label>\n                <input type="text" name="key" ng-model="vm.cannedAnswer.key" md-maxlength="255" ng-required="true" autofocus>\n                <div ng-messages="cannedAnswerForm[\'key\'].$error" ng-show="cannedAnswerForm[\'key\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.KEY_REQUIRED">Key field is required</span>\n                    </div>\n\n                    <div ng-message="md-maxlength">\n                        <span translate="TOOLS.ERRORS.KEY_MAX_LENGTH" translate-values=\'{max: 255}\'>Key must have a maximum length equal to 255</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.VALUE">Value</label>\n                <textarea name="value" ng-model="vm.cannedAnswer.value" required></textarea>\n\n                <div ng-messages="cannedAnswerForm[\'value\'].$error" ng-show="cannedAnswerForm[\'value\'].$touched" role="alert">\n\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.cannedAnswer.description">\n                <div ng-messages="cannedAnswerForm[\'description\'].$error" ng-show="cannedAnswerForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newCannedAnswer" ng-click="vm.saveCannedAnswer()" class="send-button md-accent md-raised" ng-disabled="cannedAnswerForm.$invalid || cannedAnswerForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newCannedAnswer" ng-click="vm.addNewCannedAnswer()" class="send-button md-accent md-raised" ng-disabled="cannedAnswerForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_CANNEDANSWER" translate-attr-aria-label="TOOLS.ADD_CANNEDANSWER">\n                    ADD CANNEDANSWER\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newCannedAnswer" ng-click="vm.deleteCannedAnswer($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/customDashboards/create/dialog.html",'<md-dialog class="customDashboard-dialog" aria-label="New CustomDashboard">\n    <form name="customDashboardForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.customDashboard.name" ng-required="true" autofocus>\n                <div ng-messages="customDashboardForm[\'name\'].$error" ng-show="customDashboardForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.customDashboard.description">\n                <div ng-messages="customDashboardForm[\'description\'].$error" ng-show="customDashboardForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newCustomDashboard" ng-click="vm.saveCustomDashboard()" class="send-button md-accent md-raised" ng-disabled="customDashboardForm.$invalid || customDashboardForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newCustomDashboard" ng-click="vm.addNewCustomDashboard()" class="send-button md-accent md-raised" ng-disabled="customDashboardForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_CUSTOMDASHBOARD" translate-attr-aria-label="TOOLS.ADD_CUSTOMDASHBOARD">\n                    ADD CUSTOMDASHBOARD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newCustomDashboard" ng-click="vm.deleteCustomDashboard($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/customDashboards/customDashboards.html",'<div id="customDashboards" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.CUSTOMDASHBOARDS">CustomDashboards</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedCustomDashboards.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedCustomDashboards =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-customDashboards-count">\n                    <span>{{vm.selectedCustomDashboards.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="CUSTOMDASHBOARDS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllCustomDashboards()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectCustomDashboards()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedCustomDashboards" csv-label="true" filename="customDashboards.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedCustomDashboards($event)" aria-label="delete selected" translate translate-attr-label="CUSTOMDASHBOARDS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- CUSTOMDASHBOARD TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedCustomDashboards" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getCustomDashboards">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.customDashboards.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="customDashboard" md-select-id="id" ng-repeat="customDashboard in vm.customDashboards.rows">\n                                <td md-cell ng-if="customDashboard.userpic"><img class="avatar" alt="{{customDashboard.name}}" ng-src="api/users/{{customDashboard.id}}/avatar" /></td>\n                                <td md-cell ng-if="!customDashboard.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{customDashboard.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditCustomDashboard($event, customDashboard)" md-cell class="id ">{{customDashboard.id}}</td>\n                                <td ng-click="vm.createOrEditCustomDashboard($event, customDashboard)" md-cell class="name ">{{customDashboard.name}}</td>\n                                <td ng-click="vm.createOrEditCustomDashboard($event, customDashboard)" md-cell class="description ">{{customDashboard.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(customDashboard, $event)" translate="TOOLS.EDIT_CUSTOMDASHBOARD">\n                                                    Edit CustomDashboard\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.role == \'admin\'">\n                                                <md-button ng-click="vm.useradddialog(customDashboard, $event)" translate="TOOLS.USERADD_CUSTOMDASHBOARD">\n                                                    useradd CustomDashboard\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.clonedialog(customDashboard, $event)" translate="TOOLS.CLONE_CUSTOMDASHBOARD">\n                                                    clone CustomDashboard\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotodashboardgoto(customDashboard, $event)" translate="TOOLS.GOTODASHBOARD_CUSTOMDASHBOARD">\n                                                    goToDashboard CustomDashboard\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(customDashboard, $event)" translate="TOOLS.DELETE_CUSTOMDASHBOARD">\n                                                    Delete CustomDashboard\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.customDashboards.count}}" md-on-paginate="vm.getCustomDashboards" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / CUSTOMDASHBOARD TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD CUSTOMDASHBOARD BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-customDashboard-button" ng-click="vm.createOrEditCustomDashboard($event)" aria-label="add customDashboard" translate translate-attr-aria-label="TOOLS.ADD_CUSTOMDASHBOARD">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD CUSTOMDASHBOARD BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/customDashboards/edit/clone/clone.html",'<md-dialog class="customDashboard-dialog" aria-label="Clone CustomDashboard">\n    <form name="customDashboardForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.customDashboard.name" ng-required="true" autofocus>\n                <div ng-messages="customDashboardForm[\'name\'].$error" ng-show="customDashboardForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <md-button type="submit" ng-click="vm.cloneCustomDashboard()" class="send-button md-accent md-raised" ng-disabled="customDashboardForm.$invalid" aria-label="CLONE" translate="TOOLS.CLONE_CUSTOMDASHBOARD" translate-attr-aria-label="TOOLS.CLONE_CUSTOMDASHBOARD">\n                CLONE CUSTOMDASHBOARD\n            </md-button>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/customDashboards/edit/dashboard/dialog.html",'<md-dialog class="dashboarditem-dialog" aria-label="New DashboardItem">\n    <form name="dashboarditemForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select name="type" ng-model="vm.dashboarditem.type" autofocus ng-disabled="!vm.newDashboardItem">\n\n                    <md-option ng-value="\'counter\'"> {{ \'TOOLS.COUNTER\' | translate }}</md-option>\n\n                    <md-option ng-value="\'multibar-chart\'"> {{ \'TOOLS.MULTIBARCHART\' | translate }}</md-option>\n\n                    <md-option ng-value="\'pie-chart\'"> {{ \'TOOLS.PIECHART\' | translate }}</md-option>\n\n                    <md-option ng-value="\'web-report\'"> {{ \'TOOLS.WEBREPORT\' | translate }}</md-option>\n\n                    <md-option ng-value="\'iframe\'"> {{ \'TOOLS.IFRAME\' | translate }}</md-option>\n\n                    <md-option ng-value="\'clock\'"> {{ \'TOOLS.CLOCK\' | translate }}</md-option>\n\n                    <md-option ng-value="\'custom\'"> {{ \'TOOLS.CUSTOMTYPE\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="dashboarditemForm[\'type\'].$error" ng-show="dashboarditemForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TITLE">Title</label>\n                <input type="text" name="title" ng-model="vm.dashboarditem.title" ng-required="true">\n                <div ng-messages="dashboarditemForm[\'title\'].$error" ng-show="dashboarditemForm[\'title\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.TITLE_REQUIRED">Title field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.dashboarditem.type == \'iframe\'" class="md-block">\n                <label translate="TOOLS.URL">Url</label>\n                <input type="url" name="attrUrl" ng-model="vm.dashboarditem.attrUrl" ng-required="true">\n                <div ng-messages="dashboarditemForm[\'attrUrl\'].$error" ng-show="dashboarditemForm[\'attrUrl\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="TOOLS.ERRORS.URL_MUST_VALID_URL">Url must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.dashboarditem.type == \'custom\'" class="md-block">\n                <label translate="TOOLS.PATH">Path</label>\n                <input type="text" name="attrPath" ng-model="vm.dashboarditem.attrPath" ng-required="true">\n                <div ng-messages="dashboarditemForm[\'attrPath\'].$error" ng-show="dashboarditemForm[\'attrPath\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.PATH_REQUIRED">Path field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.dashboarditem.type == \'clock\'" class="md-block">\n                <label translate="TOOLS.FORMAT">Format</label>\n                <input type="text" name="attrHourFormat" ng-model="vm.dashboarditem.attrHourFormat" ng-required="true">\n                <div ng-messages="dashboarditemForm[\'attrHourFormat\'].$error" ng-show="dashboarditemForm[\'attrHourFormat\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.FORMAT_REQUIRED">Format field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.dashboarditem.type == \'clock\'" class="md-block">\n                <label translate="TOOLS.TIMEZONE">Timezone</label>\n                <md-select name="attrTimezone" ng-model="vm.dashboarditem.attrTimezone" required>\n                    <md-option ng-value="\'-12.00\'">GMT-12.00</md-option>\n                    <md-option ng-value="\'-11.00\'">GMT-11.00</md-option>\n                    <md-option ng-value="\'-10.00\'">GMT-10.00</md-option>\n                    <md-option ng-value="\'-9.00\'">GMT-9.00</md-option>\n                    <md-option ng-value="\'-8.00\'">GMT-8.00</md-option>\n                    <md-option ng-value="\'-7.00\'">GMT-7.00</md-option>\n                    <md-option ng-value="\'-6.00\'">GMT-6.00</md-option>\n                    <md-option ng-value="\'-5.00\'">GMT-5.00</md-option>\n                    <md-option ng-value="\'-4.00\'">GMT-4.00</md-option>\n                    <md-option ng-value="\'-3.30\'">GMT-3.30</md-option>\n                    <md-option ng-value="\'-3.00\'">GMT-3.00</md-option>\n                    <md-option ng-value="\'-2.00\'">GMT-2.00</md-option>\n                    <md-option ng-value="\'-1.00\'">GMT-1.00</md-option>\n                    <md-option ng-value="\'0.00\'">GMT 0.00</md-option>\n                    <md-option ng-value="\'1.00\'">GMT+1.00</md-option>\n                    <md-option ng-value="\'2.00\'">GMT+2.00</md-option>\n                    <md-option ng-value="\'3.00\'">GMT+3.00</md-option>\n                    <md-option ng-value="\'3.30\'">GMT+3.30</md-option>\n                    <md-option ng-value="\'4.00\'">GMT+4.00</md-option>\n                    <md-option ng-value="\'4.30\'">GMT+4.30</md-option>\n                    <md-option ng-value="\'5.00\'">GMT+5.00</md-option>\n                    <md-option ng-value="\'5.30\'">GMT+5.30</md-option>\n                    <md-option ng-value="\'5.45\'">GMT+5.45</md-option>\n                    <md-option ng-value="\'6.00\'">GMT+6.00</md-option>\n                    <md-option ng-value="\'6.30\'">GMT+6.30</md-option>\n                    <md-option ng-value="\'7.00\'">GMT+7.00</md-option>\n                    <md-option ng-value="\'8.00\'">GMT+8.00</md-option>\n                    <md-option ng-value="\'9.00\'">GMT+9.00</md-option>\n                    <md-option ng-value="\'9.30\'">GMT+9.30</md-option>\n                    <md-option ng-value="\'10.00\'">GMT+10.00</md-option>\n                    <md-option ng-value="\'11.00\'">GMT+11.00</md-option>\n                    <md-option ng-value="\'12.00\'">GMT+12.00</md-option>\n                    <md-option ng-value="\'13.00\'">GMT+13.00</md-option>\n                </md-select>\n                <div ng-messages="dashboarditemForm[\'attrTimezone\'].$error" ng-show="dashboarditemForm[\'attrTimezone\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.TIMEZONE_REQUIRED">Timezone field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.dashboarditem.type == \'counter\'" class="md-block">\n                <label translate="TOOLS.METRIC">Metric</label>\n                <md-select name="attrMetric" ng-model="vm.dashboarditem.attrMetric" required>\n\n                    <md-option ng-value="\'total\'"> {{ \'TOOLS.TOTAL\' | translate }}</md-option>\n\n                    <md-option ng-value="\'abandoned\'"> {{ \'TOOLS.ABANDONED\' | translate }}</md-option>\n\n                    <md-option ng-value="\'waiting\'"> {{ \'TOOLS.WAITING\' | translate }}</md-option>\n\n                    <md-option ng-value="\'talking\'"> {{ \'TOOLS.TALKING\' | translate }}</md-option>\n\n                    <md-option ng-value="\'answered\'"> {{ \'TOOLS.ANSWERED\' | translate }}</md-option>\n\n                    <md-option ng-value="\'unmanaged\'"> {{ \'TOOLS.UNMANAGED\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="dashboarditemForm[\'attrMetric\'].$error" ng-show="dashboarditemForm[\'attrMetric\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.METRIC_REQUIRED">Metric field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="[\'multibar-chart\', \'pie-chart\'].includes(vm.dashboarditem.type)" class="md-block">\n                <label translate="TOOLS.SERIE1">Serie1</label>\n                <md-select name="attrSerie1" ng-model="vm.dashboarditem.attrSerie1" required>\n\n                    <md-option ng-value="\'total\'"> {{ \'TOOLS.TOTAL\' | translate }}</md-option>\n\n                    <md-option ng-value="\'abandoned\'"> {{ \'TOOLS.ABANDONED\' | translate }}</md-option>\n\n                    <md-option ng-value="\'waiting\'"> {{ \'TOOLS.WAITING\' | translate }}</md-option>\n\n                    <md-option ng-value="\'talking\'"> {{ \'TOOLS.TALKING\' | translate }}</md-option>\n\n                    <md-option ng-value="\'answered\'"> {{ \'TOOLS.ANSWERED\' | translate }}</md-option>\n\n                    <md-option ng-value="\'unmanaged\'"> {{ \'TOOLS.UNMANAGED\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="dashboarditemForm[\'attrSerie1\'].$error" ng-show="dashboarditemForm[\'attrSerie1\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.SERIE1_REQUIRED">Serie1 field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="[\'multibar-chart\', \'pie-chart\'].includes(vm.dashboarditem.type)" class="md-block">\n                <label translate="TOOLS.SERIE2">Serie2</label>\n                <md-select name="attrSerie2" ng-model="vm.dashboarditem.attrSerie2">\n\n                    <md-option ng-value="\'null\'"> {{ \'TOOLS.NONE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'total\'"> {{ \'TOOLS.TOTAL\' | translate }}</md-option>\n\n                    <md-option ng-value="\'abandoned\'"> {{ \'TOOLS.ABANDONED\' | translate }}</md-option>\n\n                    <md-option ng-value="\'waiting\'"> {{ \'TOOLS.WAITING\' | translate }}</md-option>\n\n                    <md-option ng-value="\'talking\'"> {{ \'TOOLS.TALKING\' | translate }}</md-option>\n\n                    <md-option ng-value="\'answered\'"> {{ \'TOOLS.ANSWERED\' | translate }}</md-option>\n\n                    <md-option ng-value="\'unmanaged\'"> {{ \'TOOLS.UNMANAGED\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="dashboarditemForm[\'attrSerie2\'].$error" ng-show="dashboarditemForm[\'attrSerie2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.SERIE2_REQUIRED">Serie2 field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="[\'multibar-chart\', \'pie-chart\'].includes(vm.dashboarditem.type)" class="md-block">\n                <label translate="TOOLS.SERIE3">Serie3</label>\n                <md-select name="attrSerie3" ng-model="vm.dashboarditem.attrSerie3">\n\n                    <md-option ng-value="\'null\'"> {{ \'TOOLS.NONE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'total\'"> {{ \'TOOLS.TOTAL\' | translate }}</md-option>\n\n                    <md-option ng-value="\'abandoned\'"> {{ \'TOOLS.ABANDONED\' | translate }}</md-option>\n\n                    <md-option ng-value="\'waiting\'"> {{ \'TOOLS.WAITING\' | translate }}</md-option>\n\n                    <md-option ng-value="\'talking\'"> {{ \'TOOLS.TALKING\' | translate }}</md-option>\n\n                    <md-option ng-value="\'answered\'"> {{ \'TOOLS.ANSWERED\' | translate }}</md-option>\n\n                    <md-option ng-value="\'unmanaged\'"> {{ \'TOOLS.UNMANAGED\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="dashboarditemForm[\'attrSerie3\'].$error" ng-show="dashboarditemForm[\'attrSerie3\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.SERIE3_REQUIRED">Serie3 field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.dashboarditem.type == \'web-report\'" class="md-block">\n                <label translate="TOOLS.REFRESH">Refresh</label>\n                <input type="number" name="attrRefresh" ng-model="vm.dashboarditem.attrRefresh" min="5" ng-required="true">\n                <div ng-messages="dashboarditemForm[\'attrRefresh\'].$error" ng-show="dashboarditemForm[\'attrRefresh\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.REFRESH_REQUIRED">Refresh field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="TOOLS.ERRORS.REFRESH_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Refresh must be a valid greater or equal than</span> <span>5</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.dashboarditem.type == \'web-report\'" class="md-block">\n                <label translate="TOOLS.REPORT">Report</label>\n                <md-select name="attrReport" ng-model="vm.dashboarditem.attrReport" required>\n                    <md-option ng-value="attrReport.id" ng-repeat="attrReport in vm.customReports">{{ attrReport.name }}</md-option>\n                </md-select>\n                <div ng-messages="dashboarditemForm[\'attrReport\'].$error" ng-show="dashboarditemForm[\'attrReport\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.REPORT_REQUIRED">Report field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="[\'multibar-chart\', \'pie-chart\', \'counter\'].includes(vm.dashboarditem.type)" class="md-block">\n                <label translate="TOOLS.FILTERVOICEQUEUES">FilterVoiceQueues</label>\n                <md-select name="attrVoiceQueues" ng-model="vm.dashboarditem.attrVoiceQueues" multiple>\n                    <md-option ng-value="attrVoiceQueues.id" ng-repeat="attrVoiceQueues in vm.voiceQueues">{{ attrVoiceQueues.name }}</md-option>\n                </md-select>\n                <div ng-messages="dashboarditemForm[\'attrVoiceQueues\'].$error" ng-show="dashboarditemForm[\'attrVoiceQueues\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.FILTERVOICEQUEUES_REQUIRED">FilterVoiceQueues field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="[\'counter\', \'clock\'].includes(vm.dashboarditem.type)" class="md-block">\n                <label translate="TOOLS.FONTSIZE">FontSize</label>\n                <input type="number" name="attrFontSize" ng-model="vm.dashboarditem.attrFontSize" min="12" max="40" ng-required="true">\n                <div ng-messages="dashboarditemForm[\'attrFontSize\'].$error" ng-show="dashboarditemForm[\'attrFontSize\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.FONTSIZE_REQUIRED">FontSize field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="TOOLS.ERRORS.FONTSIZE_MUST_BE_GREATER_THAN_OR_EQUAL_TO">FontSize must be a valid greater or equal than</span> <span>12</span>\n                    </div>\n                    <div ng-message="max">\n                        <span translate="TOOLS.ERRORS.FONTSIZE_MUST_BE_LESS_THAN_OR_EQUAL_TO">FontSize must be a valid greater or equal than</span> <span>40</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div flex md-color-picker ng-model="vm.dashboarditem.foreground" label="{{\'TOOLS.FOREGROUND\' | translate}}" md-color-hex="true" md-color-rgb="false" md-color-hsl="false" md-color-history="false" md-color-material-palette="false" md-color-alpha-channel="false"\n                open-on-input="true"></div>\n            <div flex md-color-picker ng-model="vm.dashboarditem.background" label="{{\'TOOLS.BACKGROUND\' | translate}}" md-color-hex="true" md-color-rgb="false" md-color-hsl="false" md-color-history="false" md-color-material-palette="false" md-color-alpha-channel="false"\n                open-on-input="true"></div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.LINK">link</label>\n                <input type="url" name="link" ng-model="vm.dashboarditem.link">\n                <div ng-messages="dashboarditemForm[\'link\'].$error" ng-show="dashboarditemForm[\'link\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.LINK_REQUIRED">link field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="TOOLS.ERRORS.LINK_MUST_VALID_URL">link must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newDashboardItem" ng-click="vm.saveDashboardItem()" class="send-button md-accent md-raised" ng-disabled="dashboarditemForm.$invalid || dashboarditemForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newDashboardItem" ng-click="vm.addNewDashboardItem()" class="send-button md-accent md-raised" ng-disabled="dashboarditemForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_DASHBOARDITEM" translate-attr-aria-label="TOOLS.ADD_DASHBOARDITEM">\n                    ADD DASHBOARDITEM\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newDashboardItem" ng-click="vm.deleteDashboardItem($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/customDashboards/edit/useradd/useradd.html",'<md-dialog class="customDashboard-dialog" aria-label="customDashboard">\n    <form name="customDashboardForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="TOOLS.USERADD_CUSTOMDASHBOARD">Add User to customDashboard</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/customDashboards/edit/view.html",'<div id="tools-customDashboard" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-customDashboards-button md-icon-button" aria-label="Go to customDashboards" ng-click="vm.gotoCustomDashboards()" translate translate-attr-aria-label="TOOLS.GO_TO_CUSTOMDASHBOARDS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="customDashboard-image" hide-xs>\n                    <img ng-src="assets/images/business/customDashboards.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.customDashboard.id}}\n                        <span ng-if="vm.customDashboard.name">{{vm.customDashboard.name}}</span>\n                        <span ng-if="vm.customDashboard.exten">{{vm.customDashboard.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="TOOLS.CREATED_AT"></span> <span>{{vm.customDashboard.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.useradddialog(vm.customDashboard, $event)" class="md-fab md-purple-500-bg md-icon-button" aria-label="useradd" ng-if="vm.currentUser.role == \'admin\'">\n                <md-tooltip><span translate="TOOLS.USERADD_CUSTOMDASHBOARD"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.clonedialog(vm.customDashboard, $event)" class="md-fab md-green-500-bg md-icon-button" aria-label="clone">\n                <md-tooltip><span translate="TOOLS.CLONE_CUSTOMDASHBOARD"></span></md-tooltip>\n                <md-icon md-font-icon="icon-content-duplicate"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.gotogoto(vm.customDashboard, $event)" class="md-fab md-warn md-icon-button" aria-label="goto">\n                <md-tooltip><span translate="TOOLS.GOTO_CUSTOMDASHBOARD"></span></md-tooltip>\n                <md-icon md-font-icon="icon-forward"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveCustomDashboard()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (dashboardForm.$invalid)" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="TOOLS.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="customDashboard-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="TOOLS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.customDashboard.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.customDashboard.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="TOOLS.DASHBOARD">DASHBOARD</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="customDashboard-detail-form-container dashboard md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="CustomDashboardItemsController as vm_cd" ng-init="vm_cd.init(vm.customDashboard)" class="customDashboard-detail-form-container no-padding no-margin" layout="column">\n                            <div ng-if="vm_cd.customDashboard.widgets.length">\n                                <md-button class="md-fab md-mini md-accent" ng-click="vm_cd.createOrEditWidget()" aria-label="add item">\n                                    <md-tooltip>{{ \'TOOLS.ADD_WIDGET\' | translate }}</md-tooltip>\n                                    <md-icon md-font-icon="icon-plus"></md-icon>\n                                </md-button>\n                                <md-content flex>\n                                    <ms-widget-engine config="vm_cd.customDashboard" on-edit="vm_cd.createOrEditWidget(widget)" on-delete="vm_cd.deleteWidget(widget)"></ms-widget-engine>\n                                </md-content>\n                            </div>\n                            <div ng-if="!vm_cd.customDashboard.widgets.length" layout="row" layout-align="center center" flex>\n                                <md-button class="width-130 height-130 md-accent md-raised" ng-click="vm_cd.createOrEditWidget()" aria-label="add item" layout="column">\n                                    <md-icon md-font-icon="icon-plus-circle" class="s50"></md-icon>\n                                    <span layout-wrap translate="TOOLS.ADD_WIDGET"></span>\n                                </md-button>\n                            </div>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/tools/views/intervals/create/dialog.html",'<md-dialog class="interval-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.interval.name" ng-required="true" autofocus>\n                <div ng-messages="intervalForm[\'name\'].$error" ng-show="intervalForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.interval.description">\n                <div ng-messages="intervalForm[\'description\'].$error" ng-show="intervalForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newInterval" ng-click="vm.deleteInterval($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/intervals/edit/apps/interval/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input ng-model="vm.interval.name" type="text" name="name" placeholder="{{\'TOOLS.NAME\' | translate}}" md-autofocus required>\n                <div ng-messages="intervalForm.name.$error" ng-show="intervalForm.name.$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select ng-model="vm.type">\n                    <md-option ng-value="type" ng-repeat=\'type in vm.types\'>{{ type | ucfirst }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.type === \'list\'">\n                <label translate="TOOLS.INTERVALS">Intervals</label>\n                <md-select ng-model="vm.interval.IntervalId">\n                    <md-option ng-value="interval.id" ng-repeat="interval in vm.intervals.rows">{{ interval.name }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            \x3c!-- TIMERANGE START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.TIME_RANGE">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <div class="md-block" flex>\n                    <mdp-time-picker name="timeRangeFrom" mdp-placeholder="FROM" ng-model="vm.timeRangeFrom" mdp-format="HH:mm" mdp-auto-switch="true">\n                        <div ng-messages="intervalForm.timeRangeFrom.$error" ng-show="intervalForm.timeRangeFrom.$touched" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_FROM_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n                <div class="md-block" flex ng-if="vm.timeRangeFrom">\n                    <mdp-time-picker name="timeRangeTo" mdp-placeholder="TO*" ng-model="vm.timeRangeTo" mdp-format="HH:mm" mdp-auto-switch="true" required>\n                        <div ng-messages="intervalForm.timeRangeTo.$error" ng-show="intervalForm.timeRangeTo.$invalid" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_INVALID">Time Range To field is invalid</span>\n                            </div>\n                            <div ng-message="required">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_REQUIRED">Time Range To field is required</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n            \x3c!-- TIMERANGE END --\x3e\n\n            \x3c!-- DAYSOFWEEK START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.WEEK_DAYS">Week Days</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.dayOfWeekFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex class="md-block" ng-if="vm.dayOfWeekFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="dayOfWeekTo" ng-model="vm.dayOfWeekTo">\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.dayOfWeekTo.$error" ng-show="intervalForm.dayOfWeekTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- DAYSOFWEEK END --\x3e\n\n            \x3c!-- MONTHDAY START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTH_DAYS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthDayFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthDayFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthDayTo" ng-model="vm.monthDayTo">\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthDayTo.$error" ng-show="intervalForm.monthDayTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTHDAY END --\x3e\n\n            \x3c!-- MONTH START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTHS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthTo" ng-model="vm.monthTo">\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthTo.$error" ng-show="intervalForm.monthTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTH END --\x3e\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/intervals/edit/intervals/dialog.html",'<md-dialog class="interval-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="" name="name" ng-model="vm.interval.name" ng-required="true" autofocus>\n                <div ng-messages="intervalForm[\'name\'].$error" ng-show="intervalForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newInterval" ng-click="vm.deleteInterval($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/intervals/edit/view.html",'<div id="tools-interval" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-intervals-button md-icon-button" aria-label="Go to intervals" ng-click="vm.gotoIntervals()" translate translate-attr-aria-label="TOOLS.GO_TO_INTERVALS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="interval-image" hide-xs>\n                    <img ng-src="assets/images/business/intervals.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.interval.id}}\n                        <span ng-if="vm.interval.name">{{vm.interval.name}}</span>\n                        <span ng-if="vm.interval.exten">{{vm.interval.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="TOOLS.CREATED_AT"></span> <span>{{vm.interval.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (intervalsForm.$invalid)" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="TOOLS.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="interval-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="TOOLS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.interval.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.interval.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="TOOLS.INTERVALS">INTERVALS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="interval-detail-form-container intervals md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="IntervalIntervalsController as vm_dc" ng-init="vm_dc.init(vm.interval)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedIntervalIntervals.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="TOOLS.INTERVALS">Intervals</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditIntervalInterval($event)" aria-label="add interval" translate translate-attr-label="TOOLS.ADD_INTERVAL">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedIntervalIntervals.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedIntervalIntervals.length}} {{vm_dc.selectedIntervalIntervals.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedIntervalIntervals" csv-label="true" filename="intervals.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedIntervalIntervals($event)" aria-label="delete selected" translate translate-attr-label="INTERVALS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedIntervalIntervals" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getIntervalIntervals">\n                                        <tr md-row>\n                                            <th md-column width="10px"></th>\n                                            <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                            <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                            <th md-column md-order-by="interval">{{ \'TOOLS.INTERVAL\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'TOOLS.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body ng-sortable="vm_dc.sortableTable">\n                                        <tr md-row md-select="interval" md-select-id="id" ng-repeat="interval in vm_dc.intervalIntervals.rows">\n                                            <td md-cell>\n                                                <md-icon md-font-icon="icon-drag-vertical" class="s16 handle"></md-icon>\n                                            </td>\n                                            <td ng-click="vm_dc.createOrEditIntervalInterval($event, interval)" md-cell>{{interval.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditIntervalInterval($event, interval)" md-cell>{{interval.name}}</td>\n                                            <td ng-click="vm_dc.createOrEditIntervalInterval($event, interval)" md-cell>{{interval.interval}}</td>\n                                            <td ng-click="vm_dc.createOrEditIntervalInterval($event, interval)" md-cell>{{interval.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditIntervalInterval($event, interval)" translate="TOOLS.EDIT_INTERVAL">\n                                                                Edit Interval\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(interval, $event)" translate="TOOLS.DELETE_INTERVAL">\n                                                                Delete Interval\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.intervalIntervals.rows.length">\n                                            <td md-cell colspan="7">\n                                                <span class="text-boxed-ligth" translate="TOOLS.NO_INTERVALS_AVAILABLE">No intervals available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/tools/views/intervals/intervals.html",'<div id="intervals" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.INTERVALS">Intervals</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedIntervals.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedIntervals =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-intervals-count">\n                    <span>{{vm.selectedIntervals.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="INTERVALS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllIntervals()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectIntervals()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedIntervals" csv-label="true" filename="intervals.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedIntervals($event)" aria-label="delete selected" translate translate-attr-label="INTERVALS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- INTERVAL TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedIntervals" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getIntervals">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.intervals.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="interval" md-select-id="id" ng-repeat="interval in vm.intervals.rows">\n                                <td md-cell ng-if="interval.userpic"><img class="avatar" alt="{{interval.name}}" ng-src="api/users/{{interval.id}}/avatar" /></td>\n                                <td md-cell ng-if="!interval.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{interval.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditInterval($event, interval)" md-cell class="id ">{{interval.id}}</td>\n                                <td ng-click="vm.createOrEditInterval($event, interval)" md-cell class="name ">{{interval.name}}</td>\n                                <td ng-click="vm.createOrEditInterval($event, interval)" md-cell class="description ">{{interval.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(interval, $event)" translate="TOOLS.EDIT_INTERVAL">\n                                                    Edit Interval\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(interval, $event)" translate="TOOLS.DELETE_INTERVAL">\n                                                    Delete Interval\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.intervals.count}}" md-on-paginate="vm.getIntervals" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / INTERVAL TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD INTERVAL BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-interval-button" ng-click="vm.createOrEditInterval($event)" aria-label="add interval" translate translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD INTERVAL BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/pauses/create/dialog.html",'<md-dialog class="pause-dialog" aria-label="New Pause">\n    <form name="pauseForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.pause.name" ng-required="true" autofocus>\n                <div ng-messages="pauseForm[\'name\'].$error" ng-show="pauseForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.pause.description">\n                <div ng-messages="pauseForm[\'description\'].$error" ng-show="pauseForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newPause" ng-click="vm.savePause()" class="send-button md-accent md-raised" ng-disabled="pauseForm.$invalid || pauseForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newPause" ng-click="vm.addNewPause()" class="send-button md-accent md-raised" ng-disabled="pauseForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_PAUSE" translate-attr-aria-label="TOOLS.ADD_PAUSE">\n                    ADD PAUSE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newPause" ng-click="vm.deletePause($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/pauses/pauses.html",'<div id="pauses" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.PAUSES">Pauses</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedPauses.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedPauses =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-pauses-count">\n                    <span>{{vm.selectedPauses.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="PAUSES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllPauses()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectPauses()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedPauses" csv-label="true" filename="pauses.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedPauses($event)" aria-label="delete selected" translate translate-attr-label="PAUSES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- PAUSE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedPauses" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getPauses">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.pauses.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="pause" md-select-id="id" ng-repeat="pause in vm.pauses.rows">\n                                <td md-cell ng-if="pause.userpic"><img class="avatar" alt="{{pause.name}}" ng-src="api/users/{{pause.id}}/avatar" /></td>\n                                <td md-cell ng-if="!pause.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{pause.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditPause($event, pause)" md-cell class="id ">{{pause.id}}</td>\n                                <td ng-click="vm.createOrEditPause($event, pause)" md-cell class="name ">{{pause.name}}</td>\n                                <td ng-click="vm.createOrEditPause($event, pause)" md-cell class="description ">{{pause.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(pause, $event)" translate="TOOLS.EDIT_PAUSE">\n                                                    Edit Pause\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(pause, $event)" translate="TOOLS.DELETE_PAUSE">\n                                                    Delete Pause\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.pauses.count}}" md-on-paginate="vm.getPauses" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / PAUSE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD PAUSE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-pause-button" ng-click="vm.createOrEditPause($event)" aria-label="add pause" translate translate-attr-aria-label="TOOLS.ADD_PAUSE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD PAUSE BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/schedules/create/dialog.html",'<md-dialog class="schedule-dialog" aria-label="New Schedule">\n    <form name="scheduleForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.schedule.name" ng-required="true" autofocus>\n                <div ng-messages="scheduleForm[\'name\'].$error" ng-show="scheduleForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.REPORTTYPE">ReportType</label>\n                <md-select name="type" ng-model="vm.schedule.type" required>\n                    <md-option ng-value="\'default\'">Default</md-option>\n                    <md-option ng-value="\'custom\'">Custom</md-option>\n                </md-select>\n                <div ng-messages="scheduleForm[\'type\'].$error" ng-show="scheduleForm[\'type\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.REPORTTYPE_REQUIRED">ReportType field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.schedule.type == \'default\'" class="md-block">\n                <label translate="TOOLS.REPORT">Report</label>\n                <md-select name="DefaultReportId" ng-model="vm.schedule.DefaultReportId" required>\n                    <md-option ng-value="DefaultReportId.id" ng-repeat="DefaultReportId in vm.defaultReports">{{ DefaultReportId.name }}</md-option>\n                </md-select>\n                <div ng-messages="scheduleForm[\'DefaultReportId\'].$error" ng-show="scheduleForm[\'DefaultReportId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.REPORT_REQUIRED">Report field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.schedule.type == \'custom\'" class="md-block">\n                <label translate="TOOLS.REPORT">Report</label>\n                <md-select name="CustomReportId" ng-model="vm.schedule.CustomReportId" required>\n                    <md-option ng-value="CustomReportId.id" ng-repeat="CustomReportId in vm.customReports">{{ CustomReportId.name }}</md-option>\n                </md-select>\n                <div ng-messages="scheduleForm[\'CustomReportId\'].$error" ng-show="scheduleForm[\'CustomReportId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.REPORT_REQUIRED">Report field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.OUTPUT">Output</label>\n                <md-select name="output" ng-model="vm.schedule.output" required>\n                    <md-option ng-value="\'csv\'">CSV</md-option>\n                    <md-option ng-value="\'pdf\'">PDF</md-option>\n                    <md-option ng-value="\'xlsx\'">Excel</md-option>\n                </md-select>\n                <div ng-messages="scheduleForm[\'output\'].$error" ng-show="scheduleForm[\'output\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.OUTPUT_REQUIRED">Output field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.schedule.active" aria-label="Active"><span translate="TOOLS.ACTIVE">Active</span></md-switch>\n            </md-input-container>\n            <div class="md-block">\n                <label translate="TOOLS.VALIDITYSTART">ValidityStart</label>\n                <md-content layout="row" class="md-padding">\n                    <div flex class="md-block">\n                        <mdp-date-picker mdp-open-on-click required name="startAtDate" mdp-placeholder="Date" mdp-format="YYYY-MM-DD" ng-model="vm.schedule.startAt" ng-init="vm.schedule.startAt = vm.getDateFromString(vm.schedule.startAt)">\n                            <div ng-messages="scheduleForm.dateRangeFrom.$error" ng-show="scheduleForm.dateRangeFrom.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="TOOLS.ERRORS.DATE_REQUIRED">Date is required</span>\n                                </div>\n                                <div ng-message="format">\n                                    <span translate="TOOLS.ERRORS.DATE_INVALID">Date is invalid</span>\n                                </div>\n                            </div>\n                        </mdp-date-picker>\n                    </div>\n                    <div flex class="md-block">\n                        <mdp-time-picker mdp-open-on-click required name="startAtTime" mdp-placeholder="Time" mdp-format="HH:mm:ss" mdp-auto-switch="true" ng-model="vm.schedule.startAt" ng-init="vm.schedule.startAt = vm.getDateFromString(vm.schedule.startAt)">\n                            <div ng-messages="scheduleForm.timeRangeFrom.$error" ng-show="scheduleForm.timeRangeFrom.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="TOOLS.ERRORS.TIME_REQUIRED">Time is required</span>\n                                </div>\n                                <div ng-message="format">\n                                    <span translate="TOOLS.ERRORS.TIME_INVALID">Time is invalid</span>\n                                </div>\n                            </div>\n                        </mdp-time-picker>\n                    </div>\n                </md-content>\n            </div>\n            <div class="md-block">\n                <label translate="TOOLS.VALIDITYEND">ValidityEnd</label>\n                <md-content layout="row" class="md-padding">\n                    <div flex class="md-block">\n                        <mdp-date-picker mdp-open-on-click required name="endAtDate" mdp-placeholder="Date" mdp-format="YYYY-MM-DD" ng-model="vm.schedule.endAt" ng-init="vm.schedule.endAt = vm.getDateFromString(vm.schedule.endAt)">\n                            <div ng-messages="scheduleForm.dateRangeFrom.$error" ng-show="scheduleForm.dateRangeFrom.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="TOOLS.ERRORS.DATE_REQUIRED">Date is required</span>\n                                </div>\n                                <div ng-message="format">\n                                    <span translate="TOOLS.ERRORS.DATE_INVALID">Date is invalid</span>\n                                </div>\n                            </div>\n                        </mdp-date-picker>\n                    </div>\n                    <div flex class="md-block">\n                        <mdp-time-picker mdp-open-on-click required name="endAtTime" mdp-placeholder="Time" mdp-format="HH:mm:ss" mdp-auto-switch="true" ng-model="vm.schedule.endAt" ng-init="vm.schedule.endAt = vm.getDateFromString(vm.schedule.endAt)">\n                            <div ng-messages="scheduleForm.timeRangeFrom.$error" ng-show="scheduleForm.timeRangeFrom.$touched" role="alert">\n                                <div ng-message="required">\n                                    <span translate="TOOLS.ERRORS.TIME_REQUIRED">Time is required</span>\n                                </div>\n                                <div ng-message="format">\n                                    <span translate="TOOLS.ERRORS.TIME_INVALID">Time is invalid</span>\n                                </div>\n                            </div>\n                        </mdp-time-picker>\n                    </div>\n                </md-content>\n            </div>\n            <div flex class="md-block">\n                <label> {{ \'TOOLS.CRON\' | translate }} ({{vm.schedule.cron}})</label>\n                <cron-selection name="cron" ng-model="vm.schedule.cron" template="assets/angular-cron-jobs/template.html" required></cron-selection>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.LAST">Last</label>\n                <input type="number" name="subtractNumber" ng-model="vm.schedule.subtractNumber" ng-required="true">\n                <div ng-messages="scheduleForm[\'subtractNumber\'].$error" ng-show="scheduleForm[\'subtractNumber\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.LAST_REQUIRED">Last field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.LASTUNIT">LastUnit</label>\n                <md-select name="subtractUnit" ng-model="vm.schedule.subtractUnit" required>\n                    <md-option ng-value="\'minutes\'">Minutes</md-option>\n                    <md-option ng-value="\'hours\'">Hours</md-option>\n                    <md-option ng-value="\'days\'">Days</md-option>\n                    <md-option ng-value="\'weeks\'">Weeks</md-option>\n                    <md-option ng-value="\'months\'">Months</md-option>\n                    <md-option ng-value="\'quarters\'">Quarters</md-option>\n                    <md-option ng-value="\'years\'">Years</md-option>\n                </md-select>\n                <div ng-messages="scheduleForm[\'subtractUnit\'].$error" ng-show="scheduleForm[\'subtractUnit\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.LASTUNIT_REQUIRED">LastUnit field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.schedule.sendMail" aria-label="SendMail"><span translate="TOOLS.SENDMAIL">SendMail</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="vm.schedule.sendMail" class="md-block">\n                <label translate="TOOLS.MAILACCOUNT">MailAccount</label>\n                <md-select name="MailAccountId" ng-model="vm.schedule.MailAccountId" required>\n                    <md-option ng-value="MailAccountId.id" ng-repeat="MailAccountId in vm.mailAccounts">{{ MailAccountId.name }}</md-option>\n                </md-select>\n                <div ng-messages="scheduleForm[\'MailAccountId\'].$error" ng-show="scheduleForm[\'MailAccountId\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.MAILACCOUNT_REQUIRED">MailAccount field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.schedule.sendMail" class="md-block">\n                <label translate="TOOLS.EMAILADDRESS">EmailAddress</label>\n                <input type="text" name="email" ng-model="vm.schedule.email" ng-required="true">\n                <div class="hint"><span translate="TOOLS.HELP.EMAILADDRESS"></span></div>\n                <div ng-messages="scheduleForm[\'email\'].$error" ng-show="scheduleForm[\'email\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.EMAILADDRESS_REQUIRED">EmailAddress field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="" name="description" ng-model="vm.schedule.description">\n                <div ng-messages="scheduleForm[\'description\'].$error" ng-show="scheduleForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSchedule" ng-click="vm.saveSchedule()" class="send-button md-accent md-raised" ng-disabled="scheduleForm.$invalid || scheduleForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSchedule" ng-click="vm.addNewSchedule()" class="send-button md-accent md-raised" ng-disabled="scheduleForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_SCHEDULE" translate-attr-aria-label="TOOLS.ADD_SCHEDULE">\n                    ADD SCHEDULE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSchedule" ng-click="vm.deleteSchedule($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/schedules/schedules.html",'<div id="schedules" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.SCHEDULER">Scheduler</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedScheduler.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedScheduler =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-schedules-count">\n                    <span>{{vm.selectedScheduler.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="SCHEDULER.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllScheduler()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectScheduler()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedScheduler" csv-label="true" filename="schedules.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedScheduler($event)" aria-label="delete selected" translate translate-attr-label="SCHEDULER.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- SCHEDULE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedScheduler" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getScheduler">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="active">{{ \'TOOLS.ACTIVE\' | translate }}</th>\n                                <th md-column md-order-by="startAt">{{ \'TOOLS.VALIDITYSTART\' | translate }}</th>\n                                <th md-column md-order-by="endAt">{{ \'TOOLS.VALIDITYEND\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.schedules.rows.length">\n                                <td md-cell colspan="7">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="schedule" md-select-id="id" ng-repeat="schedule in vm.schedules.rows">\n                                <td md-cell ng-if="schedule.userpic"><img class="avatar" alt="{{schedule.name}}" ng-src="api/users/{{schedule.id}}/avatar" /></td>\n                                <td md-cell ng-if="!schedule.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{schedule.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditSchedule($event, schedule)" md-cell class="id ">{{schedule.id}}</td>\n                                <td ng-click="vm.createOrEditSchedule($event, schedule)" md-cell class="name ">{{schedule.name}}</td>\n                                <td ng-click="vm.createOrEditSchedule($event, schedule)" md-cell class="active ">\n                                    <md-icon md-colors="{color: {{schedule.active ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{schedule.active ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                </td>\n                                <td ng-click="vm.createOrEditSchedule($event, schedule)" md-cell class="startAt ">{{schedule.startAt | date:\'medium\' }}</td>\n                                <td ng-click="vm.createOrEditSchedule($event, schedule)" md-cell class="endAt ">{{schedule.endAt | date:\'medium\' }}</td>\n                                <td ng-click="vm.createOrEditSchedule($event, schedule)" md-cell class="description ">{{schedule.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(schedule, $event)" translate="TOOLS.EDIT_SCHEDULE">\n                                                    Edit Schedule\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(schedule, $event)" translate="TOOLS.DELETE_SCHEDULE">\n                                                    Delete Schedule\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.schedules.count}}" md-on-paginate="vm.getScheduler" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / SCHEDULE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD SCHEDULE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-schedule-button" ng-click="vm.createOrEditSchedule($event)" aria-label="add schedule" translate translate-attr-aria-label="TOOLS.ADD_SCHEDULE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD SCHEDULE BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/sounds/create/dialog.html",'<md-dialog class="sound-dialog" aria-label="New Sound">\n    <form name="soundForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.sound.name" ng-required="true" autofocus>\n                <div ng-messages="soundForm[\'name\'].$error" ng-show="soundForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.sound.description">\n                <div ng-messages="soundForm[\'description\'].$error" ng-show="soundForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newSound" ng-click="vm.saveSound()" class="send-button md-accent md-raised" ng-disabled="soundForm.$invalid || soundForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newSound" ng-click="vm.addNewSound()" class="send-button md-accent md-raised" ng-disabled="soundForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_SOUND" translate-attr-aria-label="TOOLS.ADD_SOUND">\n                    ADD SOUND\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newSound" ng-click="vm.deleteSound($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/sounds/sounds.html",'<div id="sounds" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.SOUNDS">Sounds</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedSounds.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedSounds =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-sounds-count">\n                    <span>{{vm.selectedSounds.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="SOUNDS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllSounds()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectSounds()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedSounds" csv-label="true" filename="sounds.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedSounds($event)" aria-label="delete selected" translate translate-attr-label="SOUNDS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- SOUND TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedSounds" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getSounds">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="audio">{{ \'TOOLS.AUDIO\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.sounds.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="sound" md-select-id="id" ng-repeat="sound in vm.sounds.rows">\n                                <td md-cell ng-if="sound.userpic"><img class="avatar" alt="{{sound.name}}" ng-src="api/users/{{sound.id}}/avatar" /></td>\n                                <td md-cell ng-if="!sound.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{sound.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditSound($event, sound)" md-cell class="id ">{{sound.id}}</td>\n                                <td ng-click="vm.createOrEditSound($event, sound)" md-cell class="name ">{{sound.name}}</td>\n                                <td md-cell class="audio ">\n                                    \x3c!-- audio recording directive --\x3e\n                                    <ms-recording id="sound.id" model="\'sound\'"></ms-recording>\n                                    \x3c!-- / audio recording directive --\x3e\n                                </td>\n                                <td ng-click="vm.createOrEditSound($event, sound)" md-cell class="description ">{{sound.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(sound, $event)" translate="TOOLS.EDIT_SOUND">\n                                                    Edit Sound\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.downloadfile2(sound, $event)" translate="TOOLS.DOWNLOAD_SOUND">\n                                                    Download Sound\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(sound, $event)" translate="TOOLS.DELETE_SOUND">\n                                                    Delete Sound\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.sounds.count}}" md-on-paginate="vm.getSounds" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / SOUND TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD SOUND BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-sound-button" ng-click="vm.uploadSound($event)" aria-label="add sound" translate translate-attr-aria-label="SOUNDS.ADD_SOUND">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD SOUND BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/sounds/uploadsound/dialog.html",'<md-dialog class="upload-dialog" aria-label="Upload Sound">\n    <form name="uploadForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <div id="sound-uploader" flow-init="vm.ngFlowOptions" flow-name="vm.ngFlow.flow" flow-files-submitted="vm.upload()" flow-file-added="vm.fileAdded($file)" flow-file-success="vm.fileSuccess($file, $message)" flow-complete="vm.uploadComplete()" flow-drop\n                flow-drag-enter="vm.dropping=true" flow-drag-leave="vm.dropping=false" ng-class="{\'dropping\':vm.dropping}">\n\n                <div class="drop-text hint-text" layout="row" layout-align="center center">\n                    <span translate="TOOLS.DROP_TO_UPLOAD">Drop to upload</span>\n                </div>\n\n                <div class="upload-button" layout="column" layout-align="center center">\n                    <md-button class="md-accent md-raised" flow-btn>\n                        Upload\n                    </md-button>\n                    <span class="secondary-text mt-8" translate="TOOLS.DROP_TO_UPLOAD_MESSAGE">You can also drop audio here to upload. Only MP3, WAV, GSM - Max. 15MB</span>\n                </div>\n\n                <div layout="row" layout-align="start start">\n                    <div ng-repeat="sound in vm.uploadSounds | orderBy:\'-\'" ng-switch="sound.type">\n                        <div class="sound-image" ng-switch-when="uploading" flex>\n                            <img class="media" src="assets/images/music-player/uploading.png">\n                            <md-progress-linear md-mode="indeterminate"></md-progress-linear>\n                            <span class="text-truncate">{{sound.file.name}}</span>\n                        </div>\n                        <div class="sound-image" ng-switch-when="sound" flex>\n                            <img class="media" src="assets/images/music-player/success.png">\n                            <span class="text-truncate">{{sound.file.name}}</span>\n                        </div>\n                    </div>\n                </div>\n\n\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center"></div>\n            <div layout="row">\n                <md-button ng-click="vm.closeDialog()" class="md-accent md-raised" aria-label="FINISH" translate="TOOLS.FINISH" translate-attr-aria-label="TOOLS.FINISH">\n                    FINISH\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/tags/create/dialog.html",'<md-dialog class="tag-dialog" aria-label="New Tag">\n    <form name="tagForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.tag.name" ng-required="true" autofocus>\n                <div ng-messages="tagForm[\'name\'].$error" ng-show="tagForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.tag.description">\n                <div ng-messages="tagForm[\'description\'].$error" ng-show="tagForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <div flex md-color-picker ng-model="vm.tag.color" label="{{\'TOOLS.COLOR\' | translate}}" md-color-hex="true" md-color-rgb="false" md-color-hsl="false" md-color-history="false" md-color-material-palette="false" md-color-alpha-channel="false" open-on-input="true"></div>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newTag" ng-click="vm.saveTag()" class="send-button md-accent md-raised" ng-disabled="tagForm.$invalid || tagForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newTag" ng-click="vm.addNewTag()" class="send-button md-accent md-raised" ng-disabled="tagForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_TAG" translate-attr-aria-label="TOOLS.ADD_TAG">\n                    ADD TAG\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newTag" ng-click="vm.deleteTag($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/tags/tags.html",'<div id="tags" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.TAGS">Tags</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedTags.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedTags =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-tags-count">\n                    <span>{{vm.selectedTags.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="TAGS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllTags()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectTags()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedTags" csv-label="true" filename="tags.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedTags($event)" aria-label="delete selected" translate translate-attr-label="TAGS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- TAG TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedTags" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getTags">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column md-order-by="color">{{ \'TOOLS.COLOR\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.tags.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="tag" md-select-id="id" ng-repeat="tag in vm.tags.rows">\n                                <td md-cell ng-if="tag.userpic"><img class="avatar" alt="{{tag.name}}" ng-src="api/users/{{tag.id}}/avatar" /></td>\n                                <td md-cell ng-if="!tag.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{tag.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditTag($event, tag)" md-cell class="id ">{{tag.id}}</td>\n                                <td ng-click="vm.createOrEditTag($event, tag)" md-cell class="name ">{{tag.name}}</td>\n                                <td ng-click="vm.createOrEditTag($event, tag)" md-cell class="description ">{{tag.description}}</td>\n                                <td ng-click="vm.createOrEditTag($event, tag)" md-cell class="color ">{{tag.color}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(tag, $event)" translate="TOOLS.EDIT_TAG">\n                                                    Edit Tag\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(tag, $event)" translate="TOOLS.DELETE_TAG">\n                                                    Delete Tag\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.tags.count}}" md-on-paginate="vm.getTags" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / TAG TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD TAG BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-tag-button" ng-click="vm.createOrEditTag($event)" aria-label="add tag" translate translate-attr-aria-label="TOOLS.ADD_TAG">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD TAG BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/templates/create/dialog.html",'<md-dialog class="template-dialog" aria-label="New Template">\n    <form name="templateForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.template.name" ng-required="true" autofocus>\n                <div ng-messages="templateForm[\'name\'].$error" ng-show="templateForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <div class="md-block">\n                <label class="md-caption grey-fg" translate="TOOLS.CONTENT">Content</label>\n                <textarea aria-label="Content html" ckeditor="{ skin: \'office2013\', language: \'en\', allowedContent: true, extraPlugins: \'font,colorbutton,autoembed,autocorrect,googlethisterm,pastebase64\', toolbarGroups: [{ name: \'styles\', groups: [\'styles\'] }, { name: \'clipboard\', groups: [\'undo\'] }, { name: \'colors\', groups: [\'colors\'] }, { name: \'basicstyles\', groups: [\'basicstyles\'] }, { name: \'paragraph\', groups: [\'list\', \'indent\', \'align\'] }, { name: \'mode\' }], autocorrect_enabled: true, disableNativeSpellChecker: false, removePlugins: \'magicline\' }"\n                    ng-model="vm.template.html"></textarea>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.template.description">\n                <div ng-messages="templateForm[\'description\'].$error" ng-show="templateForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newTemplate" ng-click="vm.saveTemplate()" class="send-button md-accent md-raised" ng-disabled="templateForm.$invalid || templateForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newTemplate" ng-click="vm.addNewTemplate()" class="send-button md-accent md-raised" ng-disabled="templateForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_TEMPLATE" translate-attr-aria-label="TOOLS.ADD_TEMPLATE">\n                    ADD TEMPLATE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newTemplate" ng-click="vm.deleteTemplate($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/templates/templates.html",'<div id="templates" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.TEMPLATES">Templates</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedTemplates.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedTemplates =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-templates-count">\n                    <span>{{vm.selectedTemplates.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="TEMPLATES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllTemplates()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectTemplates()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedTemplates" csv-label="true" filename="templates.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedTemplates($event)" aria-label="delete selected" translate translate-attr-label="TEMPLATES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- TEMPLATE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedTemplates" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getTemplates">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.templates.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="template" md-select-id="id" ng-repeat="template in vm.templates.rows">\n                                <td md-cell ng-if="template.userpic"><img class="avatar" alt="{{template.name}}" ng-src="api/users/{{template.id}}/avatar" /></td>\n                                <td md-cell ng-if="!template.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{template.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditTemplate($event, template)" md-cell class="id ">{{template.id}}</td>\n                                <td ng-click="vm.createOrEditTemplate($event, template)" md-cell class="name ">{{template.name}}</td>\n                                <td ng-click="vm.createOrEditTemplate($event, template)" md-cell class="description ">{{template.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(template, $event)" translate="TOOLS.EDIT_TEMPLATE">\n                                                    Edit Template\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(template, $event)" translate="TOOLS.DELETE_TEMPLATE">\n                                                    Delete Template\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.templates.count}}" md-on-paginate="vm.getTemplates" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / TEMPLATE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD TEMPLATE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-template-button" ng-click="vm.createOrEditTemplate($event)" aria-label="add template" translate translate-attr-aria-label="TOOLS.ADD_TEMPLATE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD TEMPLATE BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/triggers/create/dialog.html",'<md-dialog class="trigger-dialog" aria-label="New Trigger">\n    <form name="triggerForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.trigger.name" ng-required="true" autofocus>\n                <div ng-messages="triggerForm[\'name\'].$error" ng-show="triggerForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.CHANNEL">Channel</label>\n                <md-select name="channel" ng-model="vm.trigger.channel" required ng-disabled="!vm.newTrigger">\n\n                    <md-option ng-value="\'voice\'"> {{ \'TOOLS.VOICE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'openchannel\'" ng-if="vm.license.openchannel"> {{ \'TOOLS.OPENCHANNEL\' | translate }}</md-option>\n\n                    <md-option ng-value="\'chat\'" ng-if="vm.license.chat"> {{ \'TOOLS.CHAT\' | translate }}</md-option>\n\n                    <md-option ng-value="\'mail\'" ng-if="vm.license.mail"> {{ \'TOOLS.MAIL\' | translate }}</md-option>\n\n                    <md-option ng-value="\'sms\'" ng-if="vm.license.messaging"> {{ \'TOOLS.SMS\' | translate }}</md-option>\n\n                    <md-option ng-value="\'fax\'" ng-if="vm.license.fax"> {{ \'TOOLS.FAX\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="triggerForm[\'channel\'].$error" ng-show="triggerForm[\'channel\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.CHANNEL_REQUIRED">Channel field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.trigger.status" aria-label="Status"><span translate="TOOLS.STATUS">Status</span></md-switch>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.trigger.description">\n                <div ng-messages="triggerForm[\'description\'].$error" ng-show="triggerForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newTrigger" ng-click="vm.saveTrigger()" class="send-button md-accent md-raised" ng-disabled="triggerForm.$invalid || triggerForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newTrigger" ng-click="vm.addNewTrigger()" class="send-button md-accent md-raised" ng-disabled="triggerForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_TRIGGER" translate-attr-aria-label="TOOLS.ADD_TRIGGER">\n                    ADD TRIGGER\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newTrigger" ng-click="vm.deleteTrigger($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/triggers/edit/actions/dialog.html",'<md-dialog class="action-dialog" aria-label="New Action">\n    <form name="actionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.ACTION">Action</label>\n                <md-select name="action" ng-model="vm.action.action" required autofocus ng-disabled="!vm.newAction">\n\n                    <md-option ng-value="\'contactManager\'" ng-if="vm.trigger.channel == \'voice\'"> {{ \'TOOLS.CONTACT_MANAGER\' | translate }}</md-option>\n\n                    <md-option ng-value="\'integration\'" ng-if="vm.trigger.channel == \'voice\'"> {{ \'TOOLS.INTEGRATIONS\' | translate }}</md-option>\n\n                    <md-option ng-value="\'motionbar\'"> {{ \'TOOLS.MOTION_BAR\' | translate }}</md-option>\n\n                    <md-option ng-value="\'jscripty\'" ng-if="vm.trigger.channel == \'voice\'"> {{ \'TOOLS.JSCRIPTY\' | translate }}</md-option>\n\n                    <md-option ng-value="\'urlForward\'"> {{ \'TOOLS.URL_FORWARD\' | translate }}</md-option>\n\n                    <md-option ng-value="\'browser\'"> {{ \'TOOLS.BROWSER\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'action\'].$error" ng-show="actionForm[\'action\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACTION_REQUIRED">Action field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'jscripty\'" class="md-block">\n                <label translate="TOOLS.PROJECT">Project</label>\n                <md-select name="data1" ng-model="vm.action.data1" required>\n                    <md-option ng-value="\'\'+data1.id" ng-repeat="data1 in vm.projects">{{ data1.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data1\'].$error" ng-show="actionForm[\'data1\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.PROJECT_REQUIRED">Project field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'browser\'" class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select name="data1" ng-model="vm.action.data1" required>\n                    <md-option ng-value="\'0\'">Popup</md-option>\n                    <md-option ng-value="\'1\'">CTI URL</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data1\'].$error" ng-show="actionForm[\'data1\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'contactManager\'" class="md-block">\n                <label translate="TOOLS.LIST">List</label>\n                <md-select name="data1" ng-model="vm.action.data1" required>\n                    <md-option ng-value="\'\'+data1.id" ng-repeat="data1 in vm.lists">{{ data1.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data1\'].$error" ng-show="actionForm[\'data1\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.LIST_REQUIRED">List field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'contactManager\'" class="md-block">\n                <label translate="TOOLS.AUTOCREATECONTACT">AutoCreateContact</label>\n                <md-select name="data2" ng-model="vm.action.data2" required>\n\n                    <md-option ng-value="\'1\'"> {{ \'TOOLS.YES\' | translate }}</md-option>\n\n                    <md-option ng-value="\'0\'"> {{ \'TOOLS.NO\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.AUTOCREATECONTACT_REQUIRED">AutoCreateContact field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'urlForward\'" class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select name="data1" ng-model="vm.action.data1" required>\n                    <md-option ng-value="\'GET\'">GET</md-option>\n                    <md-option ng-value="\'POST\'">POST</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data1\'].$error" ng-show="actionForm[\'data1\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'urlForward\'" class="md-block">\n                <label translate="TOOLS.URL">Url</label>\n                <input type="url" name="data2" ng-model="vm.action.data2" ng-required="true">\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="TOOLS.ERRORS.URL_MUST_VALID_URL">Url must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\'" class="md-block">\n                <label translate="TOOLS.INTEGRATION">Integration</label>\n                <md-select name="data1" ng-model="vm.action.data1" required>\n                    <md-option ng-value="\'zendesk\'">Zendesk</md-option>\n                    <md-option ng-value="\'salesforce\'">Salesforce</md-option>\n                    <md-option ng-value="\'sugarcrm\'">SugarCRM</md-option>\n                    <md-option ng-value="\'freshdesk\'">Freshdesk</md-option>\n                    <md-option ng-value="\'desk\'">Desk</md-option>\n                    <md-option ng-value="\'zoho\'">Zoho</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data1\'].$error" ng-show="actionForm[\'data1\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.INTEGRATION_REQUIRED">Integration field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'zendesk\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="data2" ng-model="vm.action.data2" required>\n                    <md-option ng-value="\'\'+data2.id" ng-repeat="data2 in vm.zendeskAccounts">{{ data2.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'desk\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="data2" ng-model="vm.action.data2" required>\n                    <md-option ng-value="\'\'+data2.id" ng-repeat="data2 in vm.deskAccounts">{{ data2.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'zoho\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="data2" ng-model="vm.action.data2" required>\n                    <md-option ng-value="\'\'+data2.id" ng-repeat="data2 in vm.zohoAccounts">{{ data2.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'salesforce\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="data2" ng-model="vm.action.data2" required>\n                    <md-option ng-value="\'\'+data2.id" ng-repeat="data2 in vm.salesforceAccounts">{{ data2.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'sugarcrm\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="data2" ng-model="vm.action.data2" required>\n                    <md-option ng-value="\'\'+data2.id" ng-repeat="data2 in vm.sugarcrmAccounts">{{ data2.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'freshdesk\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="data2" ng-model="vm.action.data2" required>\n                    <md-option ng-value="\'\'+data2.id" ng-repeat="data2 in vm.freshdeskAccounts">{{ data2.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'zendesk\' && vm.action.data2" class="md-block">\n                <label translate="TOOLS.CONFIGURATION">Configuration</label>\n                <md-select name="data3" ng-model="vm.action.data3" required>\n                    <md-option ng-value="\'\'+data3.id" ng-repeat="data3 in vm.zendeskConfigurations | filter:{AccountId:vm.action.data2}">{{ data3.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data3\'].$error" ng-show="actionForm[\'data3\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.CONFIGURATION_REQUIRED">Configuration field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'desk\' && vm.action.data2" class="md-block">\n                <label translate="TOOLS.CONFIGURATION">Configuration</label>\n                <md-select name="data3" ng-model="vm.action.data3" required>\n                    <md-option ng-value="\'\'+data3.id" ng-repeat="data3 in vm.deskConfigurations | filter:{AccountId:vm.action.data2}">{{ data3.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data3\'].$error" ng-show="actionForm[\'data3\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.CONFIGURATION_REQUIRED">Configuration field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'zoho\' && vm.action.data2" class="md-block">\n                <label translate="TOOLS.CONFIGURATION">Configuration</label>\n                <md-select name="data3" ng-model="vm.action.data3" required>\n                    <md-option ng-value="\'\'+data3.id" ng-repeat="data3 in vm.zohoConfigurations | filter:{AccountId:vm.action.data2}">{{ data3.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data3\'].$error" ng-show="actionForm[\'data3\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.CONFIGURATION_REQUIRED">Configuration field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'salesforce\' && vm.action.data2" class="md-block">\n                <label translate="TOOLS.CONFIGURATION">Configuration</label>\n                <md-select name="data3" ng-model="vm.action.data3" required>\n                    <md-option ng-value="\'\'+data3.id" ng-repeat="data3 in vm.salesforceConfigurations | filter:{AccountId:vm.action.data2}">{{ data3.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data3\'].$error" ng-show="actionForm[\'data3\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.CONFIGURATION_REQUIRED">Configuration field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'sugarcrm\' && vm.action.data2" class="md-block">\n                <label translate="TOOLS.CONFIGURATION">Configuration</label>\n                <md-select name="data3" ng-model="vm.action.data3" required>\n                    <md-option ng-value="\'\'+data3.id" ng-repeat="data3 in vm.sugarcrmConfigurations | filter:{AccountId:vm.action.data2}">{{ data3.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data3\'].$error" ng-show="actionForm[\'data3\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.CONFIGURATION_REQUIRED">Configuration field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'integration\' && vm.action.data1 == \'freshdesk\' && vm.action.data2" class="md-block">\n                <label translate="TOOLS.CONFIGURATION">Configuration</label>\n                <md-select name="data3" ng-model="vm.action.data3" required>\n                    <md-option ng-value="\'\'+data3.id" ng-repeat="data3 in vm.freshdeskConfigurations | filter:{AccountId:vm.action.data2}">{{ data3.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data3\'].$error" ng-show="actionForm[\'data3\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.CONFIGURATION_REQUIRED">Configuration field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'motionbar\'" class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select name="data1" ng-model="vm.action.data1" required>\n                    <md-option ng-value="\'0\'">Popup</md-option>\n                    <md-option ng-value="\'1\'">CTI URL</md-option>\n                    <md-option ng-value="\'2\'">Windows App</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data1\'].$error" ng-show="actionForm[\'data1\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'motionbar\' && vm.action.data1 == \'1\'" class="md-block">\n                <label translate="TOOLS.URL">Url</label>\n                <input type="url" name="data2" ng-model="vm.action.data2" ng-required="true">\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="TOOLS.ERRORS.URL_MUST_VALID_URL">Url must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'motionbar\' && vm.action.data1 == \'2\'" class="md-block">\n                <label translate="TOOLS.APPLICATION">Application</label>\n                <input type="text" name="data2" ng-model="vm.action.data2" ng-required="true">\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.APPLICATION_REQUIRED">Application field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'motionbar\' && vm.action.data1 == \'2\'" class="md-block">\n                <label translate="TOOLS.ARGUMENTS">Arguments</label>\n                <input type="text" name="data3" ng-model="vm.action.data3">\n                <div ng-messages="actionForm[\'data3\'].$error" ng-show="actionForm[\'data3\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ARGUMENTS_REQUIRED">Arguments field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'motionbar\' && vm.action.data1 == \'0\'" class="md-block">\n                <label translate="TOOLS.TEMPLATE">Template</label>\n                <md-select name="data2" ng-model="vm.action.data2" required>\n                    <md-option ng-value="\'\'+data2.id" ng-repeat="data2 in vm.templates">{{ data2.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.TEMPLATE_REQUIRED">Template field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'browser\' && vm.action.data1 == \'0\'" class="md-block">\n                <label translate="TOOLS.TEMPLATE">Template</label>\n                <md-select name="data2" ng-model="vm.action.data2" required>\n                    <md-option ng-value="\'\'+data2.id" ng-repeat="data2 in vm.templates">{{ data2.name }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.TEMPLATE_REQUIRED">Template field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'browser\' && vm.action.data1 == \'1\'" class="md-block">\n                <label translate="TOOLS.URL">Url</label>\n                <input type="url" name="data2" ng-model="vm.action.data2" ng-required="true">\n                <div ng-messages="actionForm[\'data2\'].$error" ng-show="actionForm[\'data2\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n                    <div ng-message="url">\n                        <span translate="TOOLS.ERRORS.URL_MUST_VALID_URL">Url must be a valid url http://www.xcally.com</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="(vm.action.action == \'motionbar\' || vm.action.action == \'browser\') && vm.action.data1 == \'1\'" class="md-block">\n                <label translate="TOOLS.EVENTVARIABLES">EventVariables</label>\n                <md-select name="data3" ng-model="vm.action.data3" required>\n\n                    <md-option ng-value="\'1\'"> {{ \'TOOLS.YES\' | translate }}</md-option>\n\n                    <md-option ng-value="\'0\'"> {{ \'TOOLS.NO\' | translate }}</md-option>\n                </md-select>\n                <div class="hint"><span translate="TOOLS.HELP.EVENTVARIABLES"></span></div>\n                <div ng-messages="actionForm[\'data3\'].$error" ng-show="actionForm[\'data3\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.EVENTVARIABLES_REQUIRED">EventVariables field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'browser\' && vm.action.data1 == \'1\'" class="md-block">\n                <label translate="TOOLS.LOCATION">Location</label>\n                <md-select name="data4" ng-model="vm.action.data4" required>\n\n                    <md-option ng-value="\'0\'"> {{ \'TOOLS.NEW_TAB\' | translate }}</md-option>\n\n                    <md-option ng-value="\'1\'"> {{ \'TOOLS.NEW_WINDOW\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="actionForm[\'data4\'].$error" ng-show="actionForm[\'data4\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.LOCATION_REQUIRED">Location field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'browser\' && vm.action.data4 == \'1\'" class="md-block">\n                <label translate="TOOLS.WINDOWWIDTH">WindowWidth</label>\n                <input type="text" name="data5" ng-model="vm.action.data5">\n                <div ng-messages="actionForm[\'data5\'].$error" ng-show="actionForm[\'data5\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.WINDOWWIDTH_REQUIRED">WindowWidth field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.action.action == \'browser\' && vm.action.data4 == \'1\'" class="md-block">\n                <label translate="TOOLS.WINDOWHEIGHT">WindowHeight</label>\n                <input type="text" name="data6" ng-model="vm.action.data6">\n                <div ng-messages="actionForm[\'data6\'].$error" ng-show="actionForm[\'data6\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.WINDOWHEIGHT_REQUIRED">WindowHeight field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newAction" ng-click="vm.saveAction()" class="send-button md-accent md-raised" ng-disabled="actionForm.$invalid || actionForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newAction" ng-click="vm.addNewAction()" class="send-button md-accent md-raised" ng-disabled="actionForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_ACTION" translate-attr-aria-label="TOOLS.ADD_ACTION">\n                    ADD ACTION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newAction" ng-click="vm.deleteAction($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/triggers/edit/allconditions/dialog.html",'<md-dialog class="allCondition-dialog" aria-label="New AllCondition">\n    <form name="allConditionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.FIELD">Field</label>\n                <md-select name="field" ng-model="vm.allCondition.field" required autofocus>\n\n                    <md-option ng-value="\'queue\'" ng-if="vm.trigger.channel == \'voice\'"> {{ \'TOOLS.QUEUE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'lastevent\'" ng-if="vm.trigger.channel == \'voice\'"> {{ \'TOOLS.CALL_STATUS\' | translate }}</md-option>\n\n                    <md-option ng-value="\'routeId\'" ng-if="vm.trigger.channel == \'voice\'"> {{ \'TOOLS.OUTBOUNDROUTE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'account\'" ng-if="vm.trigger.channel != \'voice\'"> {{ \'TOOLS.ACCOUNT\' | translate }}</md-option>\n\n                    <md-option ng-value="\'interaction\'" ng-if="vm.trigger.channel != \'voice\'"> {{ \'TOOLS.INTERACTION\' | translate }}</md-option>\n\n                    <md-option ng-value="\'message\'" ng-if="vm.trigger.channel != \'voice\'"> {{ \'TOOLS.MESSAGE\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'field\'].$error" ng-show="allConditionForm[\'field\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.FIELD_REQUIRED">Field field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.OPERATOR">Operator</label>\n                <md-select name="operator" ng-model="vm.allCondition.operator" required>\n\n                    <md-option ng-value="\'equals\'"> {{ \'TOOLS.EQUALS\' | translate }}</md-option>\n\n                    <md-option ng-value="\'not_equals\'"> {{ \'TOOLS.NOT_EQUALS\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'operator\'].$error" ng-show="allConditionForm[\'operator\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.OPERATOR_REQUIRED">Operator field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.allCondition.field == \'account\' && vm.trigger.channel == \'chat\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="value" ng-model="vm.allCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.chatAccounts">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'value\'].$error" ng-show="allConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.allCondition.field == \'account\' && vm.trigger.channel == \'mail\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="value" ng-model="vm.allCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.mailAccounts">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'value\'].$error" ng-show="allConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.allCondition.field == \'account\' && vm.trigger.channel == \'sms\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="value" ng-model="vm.allCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.smsAccounts">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'value\'].$error" ng-show="allConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.allCondition.field == \'account\' && vm.trigger.channel == \'fax\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="value" ng-model="vm.allCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.faxAccounts">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'value\'].$error" ng-show="allConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.allCondition.field == \'account\' && vm.trigger.channel == \'openchannel\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="value" ng-model="vm.allCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.openchannelAccounts">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'value\'].$error" ng-show="allConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.allCondition.field == \'queue\' && vm.trigger.channel == \'voice\'" class="md-block">\n                <label translate="TOOLS.QUEUE">Queue</label>\n                <md-select name="value" ng-model="vm.allCondition.value" required>\n                    <md-option ng-value="value.name" ng-repeat="value in vm.queues">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'value\'].$error" ng-show="allConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.QUEUE_REQUIRED">Queue field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.allCondition.field == \'routeId\' && vm.trigger.channel == \'voice\'" class="md-block">\n                <label translate="TOOLS.OUTBOUNDROUTE">OutboundRoute</label>\n                <md-select name="value" ng-model="vm.allCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.outboundRoutes">{{ value.exten }}</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'value\'].$error" ng-show="allConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.OUTBOUNDROUTE_REQUIRED">OutboundRoute field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.allCondition.field == \'lastevent\'" class="md-block">\n                <label translate="TOOLS.VALUE">Value</label>\n                <md-select name="value" ng-model="vm.allCondition.value" required>\n                    <md-option ng-value="\'abandoned\'">Abandon</md-option>\n                    <md-option ng-value="\'complete\'">Hangup</md-option>\n                    <md-option ng-value="\'rejected\'">Reject</md-option>\n                    <md-option ng-value="\'called\'">Ring</md-option>\n                    <md-option ng-value="\'connect\'">Answer</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'value\'].$error" ng-show="allConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.allCondition.field == \'interaction\' && vm.trigger.channel != \'voice\'" class="md-block">\n                <label translate="TOOLS.VALUE">Value</label>\n                <md-select name="value" ng-model="vm.allCondition.value" required>\n                    <md-option ng-value="\'opened\'">Opened</md-option>\n                    <md-option ng-value="\'closed\'">Closed</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'value\'].$error" ng-show="allConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.allCondition.field == \'message\' && vm.trigger.channel != \'voice\'" class="md-block">\n                <label translate="TOOLS.VALUE">Value</label>\n                <md-select name="value" ng-model="vm.allCondition.value" required>\n                    <md-option ng-value="\'in\'">Incoming</md-option>\n                    <md-option ng-value="\'out\'">Outgoing</md-option>\n                    <md-option ng-value="\'accept\'">Accepted</md-option>\n                    <md-option ng-value="\'reject\'">Rejected</md-option>\n                </md-select>\n                <div ng-messages="allConditionForm[\'value\'].$error" ng-show="allConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newAllCondition" ng-click="vm.saveAllCondition()" class="send-button md-accent md-raised" ng-disabled="allConditionForm.$invalid || allConditionForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newAllCondition" ng-click="vm.addNewAllCondition()" class="send-button md-accent md-raised" ng-disabled="allConditionForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_ALLCONDITION" translate-attr-aria-label="TOOLS.ADD_ALLCONDITION">\n                    ADD ALLCONDITION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newAllCondition" ng-click="vm.deleteAllCondition($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/triggers/edit/anyconditions/dialog.html",'<md-dialog class="anyCondition-dialog" aria-label="New AnyCondition">\n    <form name="anyConditionForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.FIELD">Field</label>\n                <md-select name="field" ng-model="vm.anyCondition.field" required autofocus>\n\n                    <md-option ng-value="\'queue\'" ng-if="vm.trigger.channel == \'voice\'"> {{ \'TOOLS.QUEUE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'lastevent\'" ng-if="vm.trigger.channel == \'voice\'"> {{ \'TOOLS.CALL_STATUS\' | translate }}</md-option>\n\n                    <md-option ng-value="\'routeId\'" ng-if="vm.trigger.channel == \'voice\'"> {{ \'TOOLS.OUTBOUNDROUTE\' | translate }}</md-option>\n\n                    <md-option ng-value="\'account\'" ng-if="vm.trigger.channel != \'voice\'"> {{ \'TOOLS.ACCOUNT\' | translate }}</md-option>\n\n                    <md-option ng-value="\'interaction\'" ng-if="vm.trigger.channel != \'voice\'"> {{ \'TOOLS.INTERACTION\' | translate }}</md-option>\n\n                    <md-option ng-value="\'message\'" ng-if="vm.trigger.channel != \'voice\'"> {{ \'TOOLS.MESSAGE\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'field\'].$error" ng-show="anyConditionForm[\'field\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.FIELD_REQUIRED">Field field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.OPERATOR">Operator</label>\n                <md-select name="operator" ng-model="vm.anyCondition.operator" required>\n\n                    <md-option ng-value="\'equals\'"> {{ \'TOOLS.EQUALS\' | translate }}</md-option>\n\n                    <md-option ng-value="\'not_equals\'"> {{ \'TOOLS.NOT_EQUALS\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'operator\'].$error" ng-show="anyConditionForm[\'operator\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.OPERATOR_REQUIRED">Operator field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.anyCondition.field == \'account\' && vm.trigger.channel == \'chat\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="value" ng-model="vm.anyCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.chatAccounts">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'value\'].$error" ng-show="anyConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.anyCondition.field == \'account\' && vm.trigger.channel == \'mail\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="value" ng-model="vm.anyCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.mailAccounts">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'value\'].$error" ng-show="anyConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.anyCondition.field == \'account\' && vm.trigger.channel == \'sms\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="value" ng-model="vm.anyCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.smsAccounts">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'value\'].$error" ng-show="anyConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.anyCondition.field == \'account\' && vm.trigger.channel == \'fax\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="value" ng-model="vm.anyCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.faxAccounts">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'value\'].$error" ng-show="anyConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.anyCondition.field == \'account\' && vm.trigger.channel == \'openchannel\'" class="md-block">\n                <label translate="TOOLS.ACCOUNT">Account</label>\n                <md-select name="value" ng-model="vm.anyCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.openchannelAccounts">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'value\'].$error" ng-show="anyConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.ACCOUNT_REQUIRED">Account field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.anyCondition.field == \'queue\' && vm.trigger.channel == \'voice\'" class="md-block">\n                <label translate="TOOLS.QUEUE">Queue</label>\n                <md-select name="value" ng-model="vm.anyCondition.value" required>\n                    <md-option ng-value="value.name" ng-repeat="value in vm.queues">{{ value.name }}</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'value\'].$error" ng-show="anyConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.QUEUE_REQUIRED">Queue field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.anyCondition.field == \'routeId\' && vm.trigger.channel == \'voice\'" class="md-block">\n                <label translate="TOOLS.OUTBOUNDROUTE">OutboundRoute</label>\n                <md-select name="value" ng-model="vm.anyCondition.value" required>\n                    <md-option ng-value="value.id" ng-repeat="value in vm.outboundRoutes">{{ value.exten }}</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'value\'].$error" ng-show="anyConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.OUTBOUNDROUTE_REQUIRED">OutboundRoute field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.anyCondition.field == \'lastevent\'" class="md-block">\n                <label translate="TOOLS.VALUE">Value</label>\n                <md-select name="value" ng-model="vm.anyCondition.value" required>\n                    <md-option ng-value="\'abandoned\'">Abandon</md-option>\n                    <md-option ng-value="\'complete\'">Hangup</md-option>\n                    <md-option ng-value="\'rejected\'">Reject</md-option>\n                    <md-option ng-value="\'called\'">Ring</md-option>\n                    <md-option ng-value="\'connect\'">Answer</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'value\'].$error" ng-show="anyConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.anyCondition.field == \'interaction\' && vm.trigger.channel != \'voice\'" class="md-block">\n                <label translate="TOOLS.VALUE">Value</label>\n                <md-select name="value" ng-model="vm.anyCondition.value" required>\n                    <md-option ng-value="\'opened\'">Opened</md-option>\n                    <md-option ng-value="\'closed\'">Closed</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'value\'].$error" ng-show="anyConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.anyCondition.field == \'message\' && vm.trigger.channel != \'voice\'" class="md-block">\n                <label translate="TOOLS.VALUE">Value</label>\n                <md-select name="value" ng-model="vm.anyCondition.value" required>\n                    <md-option ng-value="\'in\'">Incoming</md-option>\n                    <md-option ng-value="\'out\'">Outgoing</md-option>\n                    <md-option ng-value="\'accept\'">Accepted</md-option>\n                    <md-option ng-value="\'reject\'">Rejected</md-option>\n                </md-select>\n                <div ng-messages="anyConditionForm[\'value\'].$error" ng-show="anyConditionForm[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newAnyCondition" ng-click="vm.saveAnyCondition()" class="send-button md-accent md-raised" ng-disabled="anyConditionForm.$invalid || anyConditionForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newAnyCondition" ng-click="vm.addNewAnyCondition()" class="send-button md-accent md-raised" ng-disabled="anyConditionForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_ANYCONDITION" translate-attr-aria-label="TOOLS.ADD_ANYCONDITION">\n                    ADD ANYCONDITION\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newAnyCondition" ng-click="vm.deleteAnyCondition($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/triggers/edit/view.html",'<div id="tools-trigger" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-triggers-button md-icon-button" aria-label="Go to triggers" ng-click="vm.gotoTriggers()" translate translate-attr-aria-label="TOOLS.GO_TO_TRIGGERS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="trigger-image" hide-xs>\n                    <img ng-src="assets/images/business/triggers.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.trigger.id}}\n                        <span ng-if="vm.trigger.name">{{vm.trigger.name}}</span>\n                        <span ng-if="vm.trigger.exten">{{vm.trigger.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="TOOLS.CREATED_AT"></span> <span>{{vm.trigger.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveTrigger()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (allconditionsForm.$invalid) || (anyconditionsForm.$invalid) || (actionsForm.$invalid)" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="TOOLS.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="trigger-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="TOOLS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.trigger.name" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.CHANNEL">Channel</label>\n                                <md-select name="channel" ng-model="vm.trigger.channel" required ng-disabled="true">\n\n                                    <md-option ng-value="\'voice\'"> {{ \'TOOLS.VOICE\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'openchannel\'" ng-if="vm.license.openchannel"> {{ \'TOOLS.OPENCHANNEL\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'chat\'" ng-if="vm.license.chat"> {{ \'TOOLS.CHAT\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'mail\'" ng-if="vm.license.mail"> {{ \'TOOLS.MAIL\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'sms\'" ng-if="vm.license.messaging"> {{ \'TOOLS.SMS\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'fax\'" ng-if="vm.license.fax"> {{ \'TOOLS.FAX\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'channel\'].$error" ng-show="generalForm[\'channel\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.CHANNEL_REQUIRED">Channel field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.trigger.status" aria-label="Status"><span translate="TOOLS.STATUS">Status</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.trigger.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="TOOLS.CONDITIONS&ACTIONS">CONDITIONS&ACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="trigger-detail-form-container allconditions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="TriggerAllConditionsController as vm_dc" ng-init="vm_dc.init(vm.trigger)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedTriggerAllConditions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="TOOLS.ALLCONDITIONS">AllConditions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditTriggerAllCondition($event)" aria-label="add allCondition" translate translate-attr-label="TOOLS.ADD_ALLCONDITION">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedTriggerAllConditions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedTriggerAllConditions.length}} {{vm_dc.selectedTriggerAllConditions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedTriggerAllConditions" csv-label="true" filename="triggers.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedTriggerAllConditions($event)" aria-label="delete selected" translate translate-attr-label="TRIGGERS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedTriggerAllConditions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getTriggerAllConditions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                            <th md-column md-order-by="field">{{ \'TOOLS.FIELD\' | translate }}</th>\n                                            <th md-column md-order-by="operator">{{ \'TOOLS.OPERATOR\' | translate }}</th>\n                                            <th md-column md-order-by="value">{{ \'TOOLS.VALUE\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'TOOLS.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="allCondition" md-select-id="id" ng-repeat="allCondition in vm_dc.triggerAllConditions.rows">\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" md-cell>{{allCondition.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" md-cell>{{ \'TOOLS.\' + vm_dc.arrayfield[allCondition.field].option | uppercase | translate }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" md-cell>{{ \'TOOLS.\' + vm_dc.arrayoperator[allCondition.operator].option | uppercase | translate }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="!allCondition.value" md-cell>{{allCondition.value}}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="vm.trigger.channel == \'chat\' && allCondition.field == \'account\'" md-cell>{{ value = vm_dc.chatAccounts[allCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="vm.trigger.channel == \'mail\' && allCondition.field == \'account\'" md-cell>{{ value = vm_dc.mailAccounts[allCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="vm.trigger.channel == \'sms\' && allCondition.field == \'account\'" md-cell>{{ value = vm_dc.smsAccounts[allCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="vm.trigger.channel == \'fax\' && allCondition.field == \'account\'" md-cell>{{ value = vm_dc.faxAccounts[allCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="vm.trigger.channel == \'openchannel\' && allCondition.field == \'account\'" md-cell>{{ value = vm_dc.openchannelAccounts[allCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="vm.trigger.channel == \'voice\' && allCondition.field == \'queue\'" md-cell>{{ value = vm_dc.queues[allCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="vm.trigger.channel == \'voice\' && allCondition.field == \'routeId\'" md-cell>{{ value = vm_dc.outboundRoutes[allCondition.value]; value.exten }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="vm.trigger.channel == \'voice\' && allCondition.field == \'lastevent\'" md-cell>{{ vm_dc.callStatusValues[allCondition.value].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="vm.trigger.channel != \'voice\' && allCondition.field == \'interaction\'" md-cell>{{ vm_dc.interactionStatusValues[allCondition.value].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" ng-if="vm.trigger.channel != \'voice\' && allCondition.field == \'message\'" md-cell>{{ vm_dc.messageStatusValues[allCondition.value].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" md-cell>{{allCondition.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditTriggerAllCondition($event, allCondition)" translate="TOOLS.EDIT_ALLCONDITION">\n                                                                Edit AllCondition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(allCondition, $event)" translate="TOOLS.DELETE_ALLCONDITION">\n                                                                Delete AllCondition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.triggerAllConditions.rows.length">\n                                            <td md-cell colspan="17">\n                                                <span class="text-boxed-ligth" translate="TOOLS.NO_ALLCONDITION_AVAILABLE">No allcondition available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.triggerAllConditions.count}}" md-on-paginate="vm_dc.getTriggerAllConditions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                    <div class="trigger-detail-form-container anyconditions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="TriggerAnyConditionsController as vm_dc" ng-init="vm_dc.init(vm.trigger)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedTriggerAnyConditions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="TOOLS.ANYCONDITIONS">AnyConditions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditTriggerAnyCondition($event)" aria-label="add anyCondition" translate translate-attr-label="TOOLS.ADD_ANYCONDITION">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedTriggerAnyConditions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedTriggerAnyConditions.length}} {{vm_dc.selectedTriggerAnyConditions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedTriggerAnyConditions" csv-label="true" filename="triggers.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedTriggerAnyConditions($event)" aria-label="delete selected" translate translate-attr-label="TRIGGERS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedTriggerAnyConditions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getTriggerAnyConditions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                            <th md-column md-order-by="field">{{ \'TOOLS.FIELD\' | translate }}</th>\n                                            <th md-column md-order-by="operator">{{ \'TOOLS.OPERATOR\' | translate }}</th>\n                                            <th md-column md-order-by="value">{{ \'TOOLS.VALUE\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'TOOLS.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="anyCondition" md-select-id="id" ng-repeat="anyCondition in vm_dc.triggerAnyConditions.rows">\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" md-cell>{{anyCondition.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" md-cell>{{ \'TOOLS.\' + vm_dc.arrayfield[anyCondition.field].option | uppercase | translate }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" md-cell>{{ \'TOOLS.\' + vm_dc.arrayoperator[anyCondition.operator].option | uppercase | translate }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="!anyCondition.value" md-cell>{{anyCondition.value}}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="vm.trigger.channel == \'chat\' && anyCondition.field == \'account\'" md-cell>{{ value = vm_dc.chatAccounts[anyCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="vm.trigger.channel == \'mail\' && anyCondition.field == \'account\'" md-cell>{{ value = vm_dc.mailAccounts[anyCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="vm.trigger.channel == \'sms\' && anyCondition.field == \'account\'" md-cell>{{ value = vm_dc.smsAccounts[anyCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="vm.trigger.channel == \'fax\' && anyCondition.field == \'account\'" md-cell>{{ value = vm_dc.faxAccounts[anyCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="vm.trigger.channel == \'openchannel\' && anyCondition.field == \'account\'" md-cell>{{ value = vm_dc.openchannelAccounts[anyCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="vm.trigger.channel == \'voice\' && anyCondition.field == \'queue\'" md-cell>{{ value = vm_dc.queues[anyCondition.value]; value.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="vm.trigger.channel == \'voice\' && anyCondition.field == \'routeId\'" md-cell>{{ value = vm_dc.outboundRoutes[anyCondition.value]; value.exten }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="vm.trigger.channel == \'voice\' && anyCondition.field == \'lastevent\'" md-cell>{{ vm_dc.callStatusValues[anyCondition.value].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="vm.trigger.channel != \'voice\' && anyCondition.field == \'interaction\'" md-cell>{{ vm_dc.interactionStatusValues[anyCondition.value].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" ng-if="vm.trigger.channel != \'voice\' && anyCondition.field == \'message\'" md-cell>{{ vm_dc.messageStatusValues[anyCondition.value].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" md-cell>{{anyCondition.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditTriggerAnyCondition($event, anyCondition)" translate="TOOLS.EDIT_ANYCONDITION">\n                                                                Edit AnyCondition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(anyCondition, $event)" translate="TOOLS.DELETE_ANYCONDITION">\n                                                                Delete AnyCondition\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.triggerAnyConditions.rows.length">\n                                            <td md-cell colspan="17">\n                                                <span class="text-boxed-ligth" translate="TOOLS.NO_ANYCONDITION_AVAILABLE">No anycondition available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.triggerAnyConditions.count}}" md-on-paginate="vm_dc.getTriggerAnyConditions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                    <div class="trigger-detail-form-container actions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="TriggerActionsController as vm_dc" ng-init="vm_dc.init(vm.trigger)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedTriggerActions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="TOOLS.ACTIONS">Actions</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditTriggerAction($event)" aria-label="add action" translate translate-attr-label="TOOLS.ADD_ACTION">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedTriggerActions.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedTriggerActions.length}} {{vm_dc.selectedTriggerActions.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedTriggerActions" csv-label="true" filename="triggers.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedTriggerActions($event)" aria-label="delete selected" translate translate-attr-label="TRIGGERS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedTriggerActions" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getTriggerActions">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                            <th md-column md-order-by="action">{{ \'TOOLS.ACTION\' | translate }}</th>\n                                            <th md-column md-order-by="data1">{{ \'TOOLS.TYPE\' | translate }}</th>\n                                            <th md-column md-order-by="data2">{{ \'TOOLS.INFO\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'TOOLS.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="action" md-select-id="id" ng-repeat="action in vm_dc.triggerActions.rows">\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" md-cell>{{action.id}}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" md-cell>{{ \'TOOLS.\' + vm_dc.arrayaction[action.action].option | uppercase | translate }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'jscripty\'" md-cell>{{ data1 = vm_dc.projects[action.data1]; data1.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'browser\'" md-cell>{{ vm_dc.browserValues[action.data1].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'contactManager\'" md-cell>{{ data1 = vm_dc.lists[action.data1]; data1.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'contactManager\'" md-cell>{{ \'TOOLS.\' + vm_dc.autoCreateContact[action.data2].option | uppercase | translate }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'urlForward\'" md-cell>{{ vm_dc.urlForwardValues[action.data1].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="!action.data2" md-cell>{{action.data2}}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'urlForward\'" md-cell>{{action.data2}}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'integration\'" md-cell>{{ vm_dc.integrationValues[action.data1].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'integration\' && action.data1 == \'zendesk\'" md-cell>{{ data2 = vm_dc.zendeskAccounts[action.data2]; data2.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'integration\' && action.data1 == \'desk\'" md-cell>{{ data2 = vm_dc.deskAccounts[action.data2]; data2.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'integration\' && action.data1 == \'zoho\'" md-cell>{{ data2 = vm_dc.zohoAccounts[action.data2]; data2.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'integration\' && action.data1 == \'salesforce\'" md-cell>{{ data2 = vm_dc.salesforceAccounts[action.data2]; data2.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'integration\' && action.data1 == \'sugarcrm\'" md-cell>{{ data2 = vm_dc.sugarcrmAccounts[action.data2]; data2.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'integration\' && action.data1 == \'freshdesk\'" md-cell>{{ data2 = vm_dc.freshdeskAccounts[action.data2]; data2.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'motionbar\'" md-cell>{{ vm_dc.motionbarValues[action.data1].option }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'motionbar\' && action.data1 == \'1\'" md-cell>{{action.data2}}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'motionbar\' && action.data1 == \'2\'" md-cell>{{action.data2}}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'motionbar\' && action.data1 == \'0\'" md-cell>{{ data2 = vm_dc.templates[action.data2]; data2.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'browser\' && action.data1 == \'0\'" md-cell>{{ data2 = vm_dc.templates[action.data2]; data2.name }}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" ng-if="action.action == \'browser\' && action.data1 == \'1\'" md-cell>{{action.data2}}</td>\n                                            <td ng-click="vm_dc.createOrEditTriggerAction($event, action)" md-cell>{{action.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button ng-click="vm_dc.createOrEditTriggerAction($event, action)" translate="TOOLS.EDIT_ACTION">\n                                                                Edit Action\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(action, $event)" translate="TOOLS.DELETE_ACTION">\n                                                                Delete Action\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.triggerActions.rows.length">\n                                            <td md-cell colspan="36">\n                                                <span class="text-boxed-ligth" translate="TOOLS.NO_ACTION_AVAILABLE">No action available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.triggerActions.count}}" md-on-paginate="vm_dc.getTriggerActions" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/tools/views/triggers/triggers.html",'<div id="triggers" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.TRIGGERS">Triggers</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedTriggers.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedTriggers =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-triggers-count">\n                    <span>{{vm.selectedTriggers.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="TRIGGERS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllTriggers()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectTriggers()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedTriggers" csv-label="true" filename="triggers.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedTriggers($event)" aria-label="delete selected" translate translate-attr-label="TRIGGERS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- TRIGGER TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedTriggers" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getTriggers">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="channel">{{ \'TOOLS.CHANNEL\' | translate }}</th>\n                                <th md-column md-order-by="status">{{ \'TOOLS.STATUS\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.triggers.rows.length">\n                                <td md-cell colspan="6">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="trigger" md-select-id="id" ng-repeat="trigger in vm.triggers.rows">\n                                <td md-cell ng-if="trigger.userpic"><img class="avatar" alt="{{trigger.name}}" ng-src="api/users/{{trigger.id}}/avatar" /></td>\n                                <td md-cell ng-if="!trigger.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{trigger.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditTrigger($event, trigger)" md-cell class="id ">{{trigger.id}}</td>\n                                <td ng-click="vm.createOrEditTrigger($event, trigger)" md-cell class="name ">{{trigger.name}}</td>\n                                <td ng-click="vm.createOrEditTrigger($event, trigger)" md-cell class="channel ">{{ \'TOOLS.\' + vm.arraychannel[trigger.channel].option | uppercase | translate }}</td>\n                                <td ng-click="vm.createOrEditTrigger($event, trigger)" md-cell class="status ">\n                                    <md-icon md-colors="{color: {{trigger.status ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{trigger.status ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                </td>\n                                <td ng-click="vm.createOrEditTrigger($event, trigger)" md-cell class="description ">{{trigger.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(trigger, $event)" translate="TOOLS.EDIT_TRIGGER">\n                                                    Edit Trigger\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(trigger, $event)" translate="TOOLS.DELETE_TRIGGER">\n                                                    Delete Trigger\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.triggers.count}}" md-on-paginate="vm.getTriggers" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / TRIGGER TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD TRIGGER BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-trigger-button" ng-click="vm.createOrEditTrigger($event)" aria-label="add trigger" translate translate-attr-aria-label="TOOLS.ADD_TRIGGER">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD TRIGGER BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/trunks/create/dialog.html",'<md-dialog class="trunk-dialog" aria-label="New Trunk">\n    <form name="trunkForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.trunk.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newTrunk">\n                <div class="hint"><span translate="TOOLS.HELP.NAME"></span></div>\n                <div ng-messages="trunkForm[\'name\'].$error" ng-show="trunkForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="TOOLS.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.trunk.active" aria-label="active"><span translate="TOOLS.ACTIVE">active</span></md-switch>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.HOST">host</label>\n                <input type="text" name="host" ng-model="vm.trunk.host" ng-required="true">\n                <div class="hint"><span translate="TOOLS.HELP.HOST"></span></div>\n                <div ng-messages="trunkForm[\'host\'].$error" ng-show="trunkForm[\'host\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.HOST_REQUIRED">host field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.SECRET">secret</label>\n                <input type="password" name="secret" ng-model="vm.trunk.secret" placeholder="Password" translate translate-attr-placeholder="TOOLS.PASSWORD">\n                <div class="hint"><span translate="TOOLS.HELP.SECRET"></span></div>\n                <div ng-messages="trunkForm[\'secret\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="TOOLS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DEFAULTUSER">defaultuser</label>\n                <input type="text" name="defaultuser" ng-model="vm.trunk.defaultuser">\n                <div class="hint"><span translate="TOOLS.HELP.DEFAULTUSER"></span></div>\n                <div ng-messages="trunkForm[\'defaultuser\'].$error" ng-show="trunkForm[\'defaultuser\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DEFAULTUSER_REQUIRED">defaultuser field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.REGISTRY">registry</label>\n                <input type="text" name="registry" ng-model="vm.trunk.registry">\n                <div class="hint"><span translate="TOOLS.HELP.REGISTRY"></span></div>\n                <div ng-messages="trunkForm[\'registry\'].$error" ng-show="trunkForm[\'registry\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.REGISTRY_REQUIRED">registry field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.trunk.description">\n                <div ng-messages="trunkForm[\'description\'].$error" ng-show="trunkForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newTrunk" ng-click="vm.saveTrunk()" class="send-button md-accent md-raised" ng-disabled="trunkForm.$invalid || trunkForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newTrunk" ng-click="vm.addNewTrunk()" class="send-button md-accent md-raised" ng-disabled="trunkForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_TRUNK" translate-attr-aria-label="TOOLS.ADD_TRUNK">\n                    ADD TRUNK\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newTrunk" ng-click="vm.deleteTrunk($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/trunks/edit/view.html",'<div id="tools-trunk" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-trunks-button md-icon-button" aria-label="Go to trunks" ng-click="vm.gotoTrunks()" translate translate-attr-aria-label="TOOLS.GO_TO_TRUNKS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="trunk-image" hide-xs>\n                    <img ng-src="assets/images/business/trunks.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.trunk.id}}\n                        <span ng-if="vm.trunk.name">{{vm.trunk.name}}</span>\n                        <span ng-if="vm.trunk.exten">{{vm.trunk.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="TOOLS.CREATED_AT"></span> <span>{{vm.trunk.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.gotogoto(vm.trunk, $event)" class="md-fab md-warn md-icon-button" aria-label="goto">\n                <md-tooltip><span translate="TOOLS.GOTO_TRUNK"></span></md-tooltip>\n                <md-icon md-font-icon="icon-cast"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveTrunk()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (advancedForm.$invalid) || (otherFieldsForm.$invalid)" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="TOOLS.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="trunk-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="TOOLS.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.trunk.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="TOOLS.HELP.NAME"></span></div>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="TOOLS.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.trunk.active" aria-label="active"><span translate="TOOLS.ACTIVE">active</span></md-switch>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.HOST">host</label>\n                                <input type="text" name="host" ng-model="vm.trunk.host" ng-required="true">\n                                <div class="hint"><span translate="TOOLS.HELP.HOST"></span></div>\n                                <div ng-messages="generalForm[\'host\'].$error" ng-show="generalForm[\'host\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.HOST_REQUIRED">host field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.SECRET">secret</label>\n                                <input type="password" name="secret" ng-model="vm.trunk.secret" placeholder="Password" translate translate-attr-placeholder="TOOLS.PASSWORD">\n                                <div class="hint"><span translate="TOOLS.HELP.SECRET"></span></div>\n                                <div ng-messages="generalForm[\'secret\'].$error" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="TOOLS.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.DEFAULTUSER">defaultuser</label>\n                                <input type="text" name="defaultuser" ng-model="vm.trunk.defaultuser">\n                                <div class="hint"><span translate="TOOLS.HELP.DEFAULTUSER"></span></div>\n                                <div ng-messages="generalForm[\'defaultuser\'].$error" ng-show="generalForm[\'defaultuser\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.DEFAULTUSER_REQUIRED">defaultuser field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.CONTEXT">context</label>\n                                <md-select name="context" ng-model="vm.trunk.context" required>\n                                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.CONTEXT"></span></div>\n                                <div ng-messages="generalForm[\'context\'].$error" ng-show="generalForm[\'context\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.CONTEXT_REQUIRED">context field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.CALLERID">callerid</label>\n                                <input type="text" name="callerid" ng-model="vm.trunk.callerid" ng-required="true">\n                                <div class="hint"><span translate="TOOLS.HELP.CALLERID"></span></div>\n                                <div ng-messages="generalForm[\'callerid\'].$error" ng-show="generalForm[\'callerid\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.CALLERID_REQUIRED">callerid field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.TYPE">Type</label>\n                                <md-select name="type" ng-model="vm.trunk.type" required>\n                                    <md-option ng-value="\'friend\'">Friend</md-option>\n                                    <md-option ng-value="\'user\'">User</md-option>\n                                    <md-option ng-value="\'peer\'">Peer</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.TYPE"></span></div>\n                                <div ng-messages="generalForm[\'type\'].$error" ng-show="generalForm[\'type\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.TYPE_REQUIRED">Type field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.DTMFMODE">dtmfmode</label>\n                                <md-select name="dtmfmode" ng-model="vm.trunk.dtmfmode" required>\n                                    <md-option ng-value="\'rfc2833\'">rfc2833</md-option>\n                                    <md-option ng-value="\'info\'">info</md-option>\n                                    <md-option ng-value="\'shortinfo\'">shortinfo</md-option>\n                                    <md-option ng-value="\'inband\'">inband</md-option>\n                                    <md-option ng-value="\'auto\'">auto</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.DTMFMODE"></span></div>\n                                <div ng-messages="generalForm[\'dtmfmode\'].$error" ng-show="generalForm[\'dtmfmode\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.DTMFMODE_REQUIRED">dtmfmode field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.NAT">nat</label>\n                                <md-select name="nat" ng-model="vm.trunk.nat" required multiple>\n                                    <md-option ng-value="\'force_rport\'">force_rport</md-option>\n                                    <md-option ng-value="\'comedia\'">comedia</md-option>\n                                    <md-option ng-value="\'yes\'">yes</md-option>\n                                    <md-option ng-value="\'no\'">no</md-option>\n                                    <md-option ng-value="\'never\'">never</md-option>\n                                    <md-option ng-value="\'route\'">route</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.NAT"></span></div>\n                                <div ng-messages="generalForm[\'nat\'].$error" ng-show="generalForm[\'nat\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.NAT_REQUIRED">nat field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.QUALIFY">qualify</label>\n                                <md-select name="qualify" ng-model="vm.trunk.qualify" required>\n\n                                    <md-option ng-value="\'yes\'"> {{ \'TOOLS.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'TOOLS.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.QUALIFY"></span></div>\n                                <div ng-messages="generalForm[\'qualify\'].$error" ng-show="generalForm[\'qualify\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.QUALIFY_REQUIRED">qualify field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.ALLOWCODECS">AllowCodecs</label>\n                                <md-select name="allow" ng-model="vm.trunk.allow" required multiple>\n                                    <md-option ng-value="\'ulaw\'">ulaw</md-option>\n                                    <md-option ng-value="\'alaw\'">alaw</md-option>\n                                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                                    <md-option ng-value="\'g723\'">g723</md-option>\n                                    <md-option ng-value="\'g726\'">g726</md-option>\n                                    <md-option ng-value="\'g722\'">g722</md-option>\n                                    <md-option ng-value="\'g729\'">g729</md-option>\n                                    <md-option ng-value="\'ilbc\'">ilbc</md-option>\n                                    <md-option ng-value="\'opus\'">opus</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.ALLOWCODECS"></span></div>\n                                <div ng-messages="generalForm[\'allow\'].$error" ng-show="generalForm[\'allow\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.ALLOWCODECS_REQUIRED">AllowCodecs field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.INSECURE">insecure</label>\n                                <md-select name="insecure" ng-model="vm.trunk.insecure" required multiple>\n                                    <md-option ng-value="\'port\'">port</md-option>\n                                    <md-option ng-value="\'invite\'">invite</md-option>\n                                    <md-option ng-value="\'very\'">very</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.INSECURE"></span></div>\n                                <div ng-messages="generalForm[\'insecure\'].$error" ng-show="generalForm[\'insecure\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.INSECURE_REQUIRED">insecure field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.CALL_LIMIT">call_limit</label>\n                                <input type="number" name="call_limit" ng-model="vm.trunk.call_limit">\n                                <div class="hint"><span translate="TOOLS.HELP.CALL_LIMIT"></span></div>\n                                <div ng-messages="generalForm[\'call_limit\'].$error" ng-show="generalForm[\'call_limit\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.CALL_LIMIT_REQUIRED">call_limit field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.trunk.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="TOOLS.ADVANCED">ADVANCED</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="trunk-detail-form-container advanced md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="TOOLS.ADVANCED">ADVANCED</div>\n                        </div>\n                        <form name="advancedForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.REGISTRY">registry</label>\n                                <input type="text" name="registry" ng-model="vm.trunk.registry" autofocus>\n                                <div class="hint"><span translate="TOOLS.HELP.REGISTRY"></span></div>\n                                <div ng-messages="advancedForm[\'registry\'].$error" ng-show="advancedForm[\'registry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.REGISTRY_REQUIRED">registry field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.DIRECTMEDIA">directmedia</label>\n                                <md-select name="directmedia" ng-model="vm.trunk.directmedia" required>\n                                    <md-option ng-value="\'yes\'">yes</md-option>\n                                    <md-option ng-value="\'no\'">no</md-option>\n                                    <md-option ng-value="\'nonat\'">nonat</md-option>\n                                    <md-option ng-value="\'update\'">update</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.DIRECTMEDIA"></span></div>\n                                <div ng-messages="advancedForm[\'directmedia\'].$error" ng-show="advancedForm[\'directmedia\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.DIRECTMEDIA_REQUIRED">directmedia field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.CALLCOUNTER">callcounter</label>\n                                <md-select name="callcounter" ng-model="vm.trunk.callcounter" required>\n\n                                    <md-option ng-value="\'yes\'"> {{ \'TOOLS.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'TOOLS.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.CALLCOUNTER"></span></div>\n                                <div ng-messages="advancedForm[\'callcounter\'].$error" ng-show="advancedForm[\'callcounter\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.CALLCOUNTER_REQUIRED">callcounter field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.FROMDOMAIN">fromdomain</label>\n                                <input type="text" name="fromdomain" ng-model="vm.trunk.fromdomain">\n                                <div class="hint"><span translate="TOOLS.HELP.FROMDOMAIN"></span></div>\n                                <div ng-messages="advancedForm[\'fromdomain\'].$error" ng-show="advancedForm[\'fromdomain\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.FROMDOMAIN_REQUIRED">fromdomain field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.FROMUSER">fromuser</label>\n                                <input type="text" name="fromuser" ng-model="vm.trunk.fromuser">\n                                <div class="hint"><span translate="TOOLS.HELP.FROMUSER"></span></div>\n                                <div ng-messages="advancedForm[\'fromuser\'].$error" ng-show="advancedForm[\'fromuser\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.FROMUSER_REQUIRED">fromuser field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.OUTBOUNDPROXY">outboundproxy</label>\n                                <input type="text" name="outboundproxy" ng-model="vm.trunk.outboundproxy">\n                                <div class="hint"><span translate="TOOLS.HELP.OUTBOUNDPROXY"></span></div>\n                                <div ng-messages="advancedForm[\'outboundproxy\'].$error" ng-show="advancedForm[\'outboundproxy\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.OUTBOUNDPROXY_REQUIRED">outboundproxy field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.ADD_PHONE_TO_URI">Add_phone_to_URI</label>\n                                <md-select name="usereqphone" ng-model="vm.trunk.usereqphone" required>\n\n                                    <md-option ng-value="\'yes\'"> {{ \'TOOLS.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'TOOLS.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.ADD_PHONE_TO_URI"></span></div>\n                                <div ng-messages="advancedForm[\'usereqphone\'].$error" ng-show="advancedForm[\'usereqphone\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.ADD_PHONE_TO_URI_REQUIRED">Add_phone_to_URI field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.TRUST_REMOTE_PARTY_ID">Trust_Remote_Party_ID</label>\n                                <md-select name="trustrpid" ng-model="vm.trunk.trustrpid" required>\n\n                                    <md-option ng-value="\'yes\'"> {{ \'TOOLS.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'TOOLS.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.TRUST_REMOTE_PARTY_ID"></span></div>\n                                <div ng-messages="advancedForm[\'trustrpid\'].$error" ng-show="advancedForm[\'trustrpid\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.TRUST_REMOTE_PARTY_ID_REQUIRED">Trust_Remote_Party_ID field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.SEND_REMOTE_PARTY_ID_HEADER">Send_Remote_Party_ID_header</label>\n                                <md-select name="sendrpid" ng-model="vm.trunk.sendrpid" required>\n\n                                    <md-option ng-value="\'yes\'"> {{ \'TOOLS.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'TOOLS.NO\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'pai\'"> {{ \'TOOLS.PAI\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.SEND_REMOTE_PARTY_ID_HEADER"></span></div>\n                                <div ng-messages="advancedForm[\'sendrpid\'].$error" ng-show="advancedForm[\'sendrpid\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.SEND_REMOTE_PARTY_ID_HEADER_REQUIRED">Send_Remote_Party_ID_header field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.ENCRYPTION">encryption</label>\n                                <md-select name="encryption" ng-model="vm.trunk.encryption" required>\n\n                                    <md-option ng-value="\'yes\'"> {{ \'TOOLS.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'TOOLS.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.ENCRYPTION"></span></div>\n                                <div ng-messages="advancedForm[\'encryption\'].$error" ng-show="advancedForm[\'encryption\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.ENCRYPTION_REQUIRED">encryption field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.PORT">port</label>\n                                <input type="number" name="port" ng-model="vm.trunk.port">\n                                <div class="hint"><span translate="TOOLS.HELP.PORT"></span></div>\n                                <div ng-messages="advancedForm[\'port\'].$error" ng-show="advancedForm[\'port\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.PORT_REQUIRED">port field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.TRANSPORT">Transport</label>\n                                <md-select name="transport" ng-model="vm.trunk.transport" required multiple>\n                                    <md-option ng-value="\'udp\'">udp</md-option>\n                                    <md-option ng-value="\'tcp\'">tcp</md-option>\n                                    <md-option ng-value="\'ws\'">ws</md-option>\n                                    <md-option ng-value="\'wss\'">wss</md-option>\n                                    <md-option ng-value="\'tls\'">tls</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="TOOLS.HELP.TRANSPORT"></span></div>\n                                <div ng-messages="advancedForm[\'transport\'].$error" ng-show="advancedForm[\'transport\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.TRANSPORT_REQUIRED">Transport field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.T38PT_UDPTL">t38pt_udptl</label>\n                                <input type="string" name="t38pt_udptl" ng-model="vm.trunk.t38pt_udptl">\n                                <div class="hint"><span translate="TOOLS.HELP.T38PT_UDPTL"></span></div>\n                                <div ng-messages="advancedForm[\'t38pt_udptl\'].$error" ng-show="advancedForm[\'t38pt_udptl\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="TOOLS.ERRORS.T38PT_UDPTL_REQUIRED">t38pt_udptl field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="TOOLS.OTHERFIELDS">OTHERFIELDS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="trunk-detail-form-container otherfields md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="TOOLS.OTHERFIELDS">OTHERFIELDS</div>\n                        </div>\n                        <form name="otherFieldsForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="TOOLS.OTHERFIELDS">otherFields</label>\n                                <textarea name="otherFields" ng-model="vm.trunk.otherFields" autofocus></textarea>\n                                <div class="hint"><span translate="TOOLS.HELP.OTHERFIELDS"></span></div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/tools/views/trunks/trunks.html",'<div id="trunks" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.TRUNKS">Trunks</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedTrunks.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedTrunks =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-trunks-count">\n                    <span>{{vm.selectedTrunks.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="TRUNKS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllTrunks()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectTrunks()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedTrunks" csv-label="true" filename="trunks.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedTrunks($event)" aria-label="delete selected" translate translate-attr-label="TRUNKS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- TRUNK TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedTrunks" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getTrunks">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="active">{{ \'TOOLS.ACTIVE\' | translate }}</th>\n                                <th md-column md-order-by="host">{{ \'TOOLS.HOST\' | translate }}</th>\n                                <th md-column md-order-by="registry">{{ \'TOOLS.REGISTRY\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.trunks.rows.length">\n                                <td md-cell colspan="7">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="trunk" md-select-id="id" ng-repeat="trunk in vm.trunks.rows">\n                                <td md-cell ng-if="trunk.userpic"><img class="avatar" alt="{{trunk.name}}" ng-src="api/users/{{trunk.id}}/avatar" /></td>\n                                <td md-cell ng-if="!trunk.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{trunk.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditTrunk($event, trunk)" md-cell class="id ">{{trunk.id}}</td>\n                                <td ng-click="vm.createOrEditTrunk($event, trunk)" md-cell class="name ">{{trunk.name}}</td>\n                                <td ng-click="vm.createOrEditTrunk($event, trunk)" md-cell class="active ">\n                                    <md-icon md-colors="{color: {{trunk.active ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{trunk.active ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                </td>\n                                <td ng-click="vm.createOrEditTrunk($event, trunk)" md-cell class="host ">{{trunk.host}}</td>\n                                <td ng-click="vm.createOrEditTrunk($event, trunk)" md-cell class="registry ">{{trunk.registry}}</td>\n                                <td ng-click="vm.createOrEditTrunk($event, trunk)" md-cell class="description ">{{trunk.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(trunk, $event)" translate="TOOLS.EDIT_TRUNK">\n                                                    Edit Trunk\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(trunk, $event)" translate="TOOLS.GOTOREALTIME_TRUNK">\n                                                    goToRealtime Trunk\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(trunk, $event)" translate="TOOLS.DELETE_TRUNK">\n                                                    Delete Trunk\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.trunks.count}}" md-on-paginate="vm.getTrunks" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / TRUNK TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD TRUNK BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-trunk-button" ng-click="vm.createOrEditTrunk($event)" aria-label="add trunk" translate translate-attr-aria-label="TOOLS.ADD_TRUNK">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD TRUNK BUTTON --\x3e\n</div>'),e.put("app/main/apps/tools/views/variables/create/dialog.html",'<md-dialog class="variable-dialog" aria-label="New Variable">\n    <form name="variableForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.variable.name" ng-required="true" autofocus>\n                <div ng-messages="variableForm[\'name\'].$error" ng-show="variableForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLS.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.variable.description">\n                <div ng-messages="variableForm[\'description\'].$error" ng-show="variableForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLS.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newVariable" ng-click="vm.saveVariable()" class="send-button md-accent md-raised" ng-disabled="variableForm.$invalid || variableForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newVariable" ng-click="vm.addNewVariable()" class="send-button md-accent md-raised" ng-disabled="variableForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_VARIABLE" translate-attr-aria-label="TOOLS.ADD_VARIABLE">\n                    ADD VARIABLE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newVariable" ng-click="vm.deleteVariable($event)" aria-label="DELETE" translate translate-attr-aria-label="TOOLS.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="TOOLS.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/tools/views/variables/variables.html",'<div id="variables" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-auto-fix" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="TOOLS.VARIABLES">Variables</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="TOOLS.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedVariables.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedVariables =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="TOOLS.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-variables-count">\n                    <span>{{vm.selectedVariables.length}}</span>\n                <span translate="TOOLS.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="VARIABLES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllVariables()" translate="TOOLS.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectVariables()" translate="TOOLS.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedVariables" csv-label="true" filename="variables.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedVariables($event)" aria-label="delete selected" translate translate-attr-label="VARIABLES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- VARIABLE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedVariables" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getVariables">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'TOOLS.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'TOOLS.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'TOOLS.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.variables.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="TOOLS.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="variable" md-select-id="id" ng-repeat="variable in vm.variables.rows">\n                                <td md-cell ng-if="variable.userpic"><img class="avatar" alt="{{variable.name}}" ng-src="api/users/{{variable.id}}/avatar" /></td>\n                                <td md-cell ng-if="!variable.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{variable.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditVariable($event, variable)" md-cell class="id ">{{variable.id}}</td>\n                                <td ng-click="vm.createOrEditVariable($event, variable)" md-cell class="name ">{{variable.name}}</td>\n                                <td ng-click="vm.createOrEditVariable($event, variable)" md-cell class="description ">{{variable.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="TOOLS.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(variable, $event)" translate="TOOLS.EDIT_VARIABLE">\n                                                    Edit Variable\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(variable, $event)" translate="TOOLS.DELETE_VARIABLE">\n                                                    Delete Variable\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'TOOLS.PAGE\' | translate}}:\', rowsPerPage: \'{{\'TOOLS.ROWSPERPAGE\' | translate}}:\', of: \'{{\'TOOLS.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.variables.count}}" md-on-paginate="vm.getVariables" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / VARIABLE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD VARIABLE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-variable-button" ng-click="vm.createOrEditVariable($event)" aria-label="add variable" translate translate-attr-aria-label="TOOLS.ADD_VARIABLE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD VARIABLE BUTTON --\x3e\n</div>'),e.put("app/main/apps/voice/views/chanSpies/chanSpies.html",'<div id="chanSpies" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-phone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="VOICE.CHANSPIES">ChanSpies</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="VOICE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedChanSpies.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedChanSpies =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="VOICE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-chanSpies-count">\n                    <span>{{vm.selectedChanSpies.length}}</span>\n                <span translate="VOICE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="CHANSPIES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllChanSpies()" translate="VOICE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectChanSpies()" translate="VOICE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedChanSpies" csv-label="true" filename="chanSpies.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedChanSpies($event)" aria-label="delete selected" translate translate-attr-label="CHANSPIES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- CHANSPY TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedChanSpies" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getChanSpies">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'VOICE.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'VOICE.NAME\' | translate }}</th>\n                                <th md-column md-order-by="prefix">{{ \'VOICE.PREFIX\' | translate }}</th>\n                                <th md-column md-order-by="auth">{{ \'VOICE.AUTH\' | translate }}</th>\n                                <th md-column md-order-by="record">{{ \'VOICE.RECORD\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'VOICE.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.chanSpies.rows.length">\n                                <td md-cell colspan="7">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="chanSpy" md-select-id="id" ng-repeat="chanSpy in vm.chanSpies.rows">\n                                <td md-cell ng-if="chanSpy.userpic"><img class="avatar" alt="{{chanSpy.name}}" ng-src="api/users/{{chanSpy.id}}/avatar" /></td>\n                                <td md-cell ng-if="!chanSpy.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{chanSpy.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditchanSpy($event, chanSpy)" md-cell class="id ">{{chanSpy.id}}</td>\n                                <td ng-click="vm.createOrEditchanSpy($event, chanSpy)" md-cell class="name ">{{chanSpy.name}}</td>\n                                <td ng-click="vm.createOrEditchanSpy($event, chanSpy)" md-cell class="prefix ">{{chanSpy.prefix}}</td>\n                                <td ng-click="vm.createOrEditchanSpy($event, chanSpy)" md-cell class="auth ">\n                                    <md-icon md-colors="{color: {{chanSpy.auth ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{chanSpy.auth ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                </td>\n                                <td ng-click="vm.createOrEditchanSpy($event, chanSpy)" md-cell class="record ">\n                                    <md-icon md-colors="{color: {{chanSpy.record ? \'\\\'green\\\'\' : \'\\\'grey\\\'\'}}}" md-font-icon="{{chanSpy.record ? \'icon-check\' : \'icon-close\'}}"></md-icon>\n                                </td>\n                                <td ng-click="vm.createOrEditchanSpy($event, chanSpy)" md-cell class="description ">{{chanSpy.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(chanSpy, $event)" translate="VOICE.EDIT_CHANSPY">\n                                                    Edit chanSpy\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(chanSpy, $event)" translate="VOICE.DELETE_CHANSPY">\n                                                    Delete chanSpy\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.chanSpies.count}}" md-on-paginate="vm.getChanSpies" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / CHANSPY TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD CHANSPY BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-chanSpy-button" ng-click="vm.createOrEditchanSpy($event)" aria-label="add chanSpy" translate translate-attr-aria-label="VOICE.ADD_CHANSPY">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD CHANSPY BUTTON --\x3e\n</div>'),e.put("app/main/apps/voice/views/chanSpies/create/dialog.html",'<md-dialog class="chanSpy-dialog" aria-label="New chanSpy">\n    <form name="chanSpyForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.chanSpy.name" ng-required="true" autofocus>\n                <div ng-messages="chanSpyForm[\'name\'].$error" ng-show="chanSpyForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PREFIX">Prefix</label>\n                <input type="text" name="prefix" ng-model="vm.chanSpy.prefix" ng-required="true">\n                <div ng-messages="chanSpyForm[\'prefix\'].$error" ng-show="chanSpyForm[\'prefix\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PREFIX_REQUIRED">Prefix field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <md-select name="options" ng-model="vm.chanSpy.options" required multiple>\n                    <md-option ng-value="\'b\'">b: Only spy on channels involved in a bridged call.</md-option>\n                    <md-option ng-value="\'B\'">B: Instead of whispering on a single channel barge in on both channels involved in the call.</md-option>\n                    <md-option ng-value="\'E\'">E: Exit when the spied-on channel hangs up.</md-option>\n                    <md-option ng-value="\'o\'">o: Only listen to audio coming from this channel.</md-option>\n                    <md-option ng-value="\'q\'">q: Don\'t play a beep when beginning to spy on a channel, or speak the selected channel name.</md-option>\n                    <md-option ng-value="\'s\'">s: Skip the playback of the channel type (i.e. SIP, IAX, etc) when speaking the selected channel name.</md-option>\n                    <md-option ng-value="\'S\'">S: Stop when no more channels are left to spy on.</md-option>\n                    <md-option ng-value="\'w\'">w: Enable whisper mode, so the spying channel can talk to the spied-on channel.</md-option>\n                    <md-option ng-value="\'W\'">W: Enable private whisper mode, so the spying channel can talk to the spied-on channel but cannot listen to that channel.</md-option>\n                </md-select>\n                <div ng-messages="chanSpyForm[\'options\'].$error" ng-show="chanSpyForm[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.chanSpy.auth" aria-label="Auth"><span translate="VOICE.AUTH">Auth</span></md-switch>\n            </md-input-container>\n            <md-input-container class="md-block" ng-if="vm.chanSpy.auth">\n                <label translate="VOICE.PASSWORD">Password</label>\n                <input type="password" name="password" ng-model="vm.chanSpy.password" placeholder="Password" translate translate-attr-placeholder="VOICE.PASSWORD" required>\n                <div ng-messages="chanSpyForm[\'password\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="VOICE.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.chanSpy.record" aria-label="Record"><span translate="VOICE.RECORD">Record</span></md-switch>\n            </md-input-container>\n            <md-input-container ng-if="vm.chanSpy.record" class="md-block">\n                <label translate="VOICE.RECORDINGFORMAT">recordingFormat</label>\n                <md-select name="recordingFormat" ng-model="vm.chanSpy.recordingFormat" required>\n                    <md-option ng-value="\'wav\'">wav</md-option>\n                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                    <md-option ng-value="\'WAV\'">wav49</md-option>\n                </md-select>\n                <div ng-messages="chanSpyForm[\'recordingFormat\'].$error" ng-show="chanSpyForm[\'recordingFormat\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.RECORDINGFORMAT_REQUIRED">recordingFormat field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.chanSpy.description">\n                <div ng-messages="chanSpyForm[\'description\'].$error" ng-show="chanSpyForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newchanSpy" ng-click="vm.savechanSpy()" class="send-button md-accent md-raised" ng-disabled="chanSpyForm.$invalid || chanSpyForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newchanSpy" ng-click="vm.addNewchanSpy()" class="send-button md-accent md-raised" ng-disabled="chanSpyForm.$invalid" aria-label="ADD" translate="VOICE.ADD_CHANSPY" translate-attr-aria-label="VOICE.ADD_CHANSPY">\n                    ADD CHANSPY\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newchanSpy" ng-click="vm.deletechanSpy($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/contexts/contexts.html",'<div id="contexts" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-phone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="VOICE.CONTEXTS">Contexts</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="VOICE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedContexts.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedContexts =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="VOICE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-contexts-count">\n                    <span>{{vm.selectedContexts.length}}</span>\n                <span translate="VOICE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="CONTEXTS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllContexts()" translate="VOICE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectContexts()" translate="VOICE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedContexts" csv-label="true" filename="contexts.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedContexts($event)" aria-label="delete selected" translate translate-attr-label="CONTEXTS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- CONTEXT TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedContexts" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getContexts">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'VOICE.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'VOICE.NAME\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'VOICE.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.contexts.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="context" md-select-id="id" ng-repeat="context in vm.contexts.rows">\n                                <td md-cell ng-if="context.userpic"><img class="avatar" alt="{{context.name}}" ng-src="api/users/{{context.id}}/avatar" /></td>\n                                <td md-cell ng-if="!context.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{context.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditContext($event, context)" md-cell class="id ">{{context.id}}</td>\n                                <td ng-click="vm.createOrEditContext($event, context)" md-cell class="name ">{{context.name}}</td>\n                                <td ng-click="vm.createOrEditContext($event, context)" md-cell class="description ">{{context.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editdialog(context, $event)" translate="VOICE.EDIT_CONTEXT">\n                                                    Edit Context\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(context, $event)" translate="VOICE.DELETE_CONTEXT">\n                                                    Delete Context\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.contexts.count}}" md-on-paginate="vm.getContexts" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / CONTEXT TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD CONTEXT BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-context-button" ng-click="vm.createOrEditContext($event)" aria-label="add context" translate translate-attr-aria-label="VOICE.ADD_CONTEXT">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD CONTEXT BUTTON --\x3e\n</div>'),e.put("app/main/apps/voice/views/contexts/create/dialog.html",'<md-dialog class="context-dialog" aria-label="New Context">\n    <form name="contextForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.context.name" ng-required="true" autofocus>\n                <div ng-messages="contextForm[\'name\'].$error" ng-show="contextForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.context.description">\n                <div ng-messages="contextForm[\'description\'].$error" ng-show="contextForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newContext" ng-click="vm.saveContext()" class="send-button md-accent md-raised" ng-disabled="contextForm.$invalid || contextForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newContext" ng-click="vm.addNewContext()" class="send-button md-accent md-raised" ng-disabled="contextForm.$invalid" aria-label="ADD" translate="VOICE.ADD_CONTEXT" translate-attr-aria-label="VOICE.ADD_CONTEXT">\n                    ADD CONTEXT\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newContext" ng-click="vm.deleteContext($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/create/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PHONENUMBER">PhoneNumber</label>\n                <input type="text" name="exten" ng-model="vm.inboundroute.exten" ng-required="true" autofocus>\n                <div ng-messages="inboundrouteForm[\'exten\'].$error" ng-show="inboundrouteForm[\'exten\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PHONENUMBER_REQUIRED">PhoneNumber field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.CONTEXT">Context</label>\n                <md-select name="context" ng-model="vm.inboundroute.context" required>\n                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteForm[\'context\'].$error" ng-show="inboundrouteForm[\'context\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.inboundroute.description">\n                <div ng-messages="inboundrouteForm[\'description\'].$error" ng-show="inboundrouteForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInboundRoute" ng-click="vm.saveInboundRoute()" class="send-button md-accent md-raised" ng-disabled="inboundrouteForm.$invalid || inboundrouteForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInboundRoute" ng-click="vm.addNewInboundRoute()" class="send-button md-accent md-raised" ng-disabled="inboundrouteForm.$invalid" aria-label="ADD" translate="VOICE.ADD_INBOUNDROUTE" translate-attr-aria-label="VOICE.ADD_INBOUNDROUTE">\n                    ADD INBOUNDROUTE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newInboundRoute" ng-click="vm.deleteInboundRoute($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/agi/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PROJECT">Project</label>\n                <md-select name="project" ng-model="vm.agi.project" required autofocus>\n                    <md-option ng-value="\'agi://127.0.0.1/square,{{project.name}}\'" ng-repeat="project in vm.projects">{{ project.name }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'project\'].$error" ng-show="inboundrouteFormApp[\'project\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PROJECT_REQUIRED">Project field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/custom/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.APPLICATION_NAME">Application_Name</label>\n                <input type="text" name="app" ng-model="vm.custom.app" ng-required="true" autofocus>\n                <div ng-messages="inboundrouteFormApp[\'app\'].$error" ng-show="inboundrouteFormApp[\'app\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.APPLICATION_NAME_REQUIRED">Application_Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.ARGUMENTS">Arguments</label>\n                <input type="text" name="appdata" ng-model="vm.custom.appdata">\n                <div ng-messages="inboundrouteFormApp[\'appdata\'].$error" ng-show="inboundrouteFormApp[\'appdata\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.ARGUMENTS_REQUIRED">Arguments field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/dial/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TECHNOLOGY/RESOURCE">Technology/Resource</label>\n                <input type="text" name="tech" ng-model="vm.dial.tech" ng-required="true" autofocus>\n                <div ng-messages="inboundrouteFormApp[\'tech\'].$error" ng-show="inboundrouteFormApp[\'tech\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TECHNOLOGY/RESOURCE_REQUIRED">Technology/Resource field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.dial.timeout" min="0">\n                <div ng-messages="inboundrouteFormApp[\'timeout\'].$error" ng-show="inboundrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.dial.options">\n                <div ng-messages="inboundrouteFormApp[\'options\'].$error" ng-show="inboundrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="url" ng-model="vm.dial.url">\n                <div ng-messages="inboundrouteFormApp[\'url\'].$error" ng-show="inboundrouteFormApp[\'url\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/externaldial/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TRUNK">Trunk</label>\n                <md-select name="trunk" ng-model="vm.externaldial.trunk" required autofocus>\n                    <md-option ng-value="trunk.name" ng-repeat="trunk in vm.trunks">{{ trunk.name }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'trunk\'].$error" ng-show="inboundrouteFormApp[\'trunk\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TRUNK_REQUIRED">Trunk field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PHONE">Phone</label>\n                <input type="text" name="phone" ng-model="vm.externaldial.phone" ng-required="true">\n                <div ng-messages="inboundrouteFormApp[\'phone\'].$error" ng-show="inboundrouteFormApp[\'phone\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PHONE_REQUIRED">Phone field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.externaldial.timeout" min="0">\n                <div ng-messages="inboundrouteFormApp[\'timeout\'].$error" ng-show="inboundrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.externaldial.options">\n                <div ng-messages="inboundrouteFormApp[\'options\'].$error" ng-show="inboundrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="url" ng-model="vm.externaldial.url">\n                <div ng-messages="inboundrouteFormApp[\'url\'].$error" ng-show="inboundrouteFormApp[\'url\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/goto/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.CONTEXT">Context</label>\n                <md-select name="context" ng-model="vm.goto.context" required autofocus>\n                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'context\'].$error" ng-show="inboundrouteFormApp[\'context\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.EXTENSION">Extension</label>\n                <input type="text" name="extension" ng-model="vm.goto.extension" ng-required="true">\n                <div ng-messages="inboundrouteFormApp[\'extension\'].$error" ng-show="inboundrouteFormApp[\'extension\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.EXTENSION_REQUIRED">Extension field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PRIORITY">Priority</label>\n                <input type="text" name="priority" ng-model="vm.goto.priority" ng-required="true">\n                <div ng-messages="inboundrouteFormApp[\'priority\'].$error" ng-show="inboundrouteFormApp[\'priority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PRIORITY_REQUIRED">Priority field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/hangup/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.HANGUP_CAUSE">Hangup_Cause</label>\n                <md-select name="appdata" ng-model="vm.hangup.appdata" required autofocus>\n\n                    <md-option ng-value="\'1\'"> {{ \'VOICE.HANGUPCAUSE_1\' | translate }}</md-option>\n\n                    <md-option ng-value="\'16\'"> {{ \'VOICE.HANGUPCAUSE_16\' | translate }}</md-option>\n\n                    <md-option ng-value="\'17\'"> {{ \'VOICE.HANGUPCAUSE_17\' | translate }}</md-option>\n\n                    <md-option ng-value="\'18\'"> {{ \'VOICE.HANGUPCAUSE_18\' | translate }}</md-option>\n\n                    <md-option ng-value="\'21\'"> {{ \'VOICE.HANGUPCAUSE_21\' | translate }}</md-option>\n\n                    <md-option ng-value="\'22\'"> {{ \'VOICE.HANGUPCAUSE_22\' | translate }}</md-option>\n\n                    <md-option ng-value="\'27\'"> {{ \'VOICE.HANGUPCAUSE_27\' | translate }}</md-option>\n\n                    <md-option ng-value="\'38\'"> {{ \'VOICE.HANGUPCAUSE_38\' | translate }}</md-option>\n\n                    <md-option ng-value="\'41\'"> {{ \'VOICE.HANGUPCAUSE_41\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'appdata\'].$error" ng-show="inboundrouteFormApp[\'appdata\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.HANGUP_CAUSE_REQUIRED">Hangup_Cause field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/internaldial/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.USER">User</label>\n                <md-select name="user" ng-model="vm.internaldial.user" required autofocus>\n                    <md-option ng-value="\'SIP/{{user.name}}\'" ng-repeat="user in vm.users">{{ user.name }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'user\'].$error" ng-show="inboundrouteFormApp[\'user\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.USER_REQUIRED">User field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.internaldial.timeout" min="0">\n                <div ng-messages="inboundrouteFormApp[\'timeout\'].$error" ng-show="inboundrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.internaldial.options">\n                <div ng-messages="inboundrouteFormApp[\'options\'].$error" ng-show="inboundrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="url" ng-model="vm.internaldial.url">\n                <div ng-messages="inboundrouteFormApp[\'url\'].$error" ng-show="inboundrouteFormApp[\'url\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/interval/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select ng-model="vm.type">\n                    <md-option ng-value="type" ng-repeat=\'type in vm.types\'>{{ type | ucfirst }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.type === \'list\'">\n                <label translate="TOOLS.INTERVALS">Intervals</label>\n                <md-select ng-model="vm.interval.IntervalId">\n                    <md-option ng-value="interval.id" ng-repeat="interval in vm.intervals.rows">{{ interval.name }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            \x3c!-- TIMERANGE START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.TIME_RANGE">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <div class="md-block" flex>\n                    <mdp-time-picker name="timeRangeFrom" mdp-placeholder="FROM" ng-model="vm.timeRangeFrom" mdp-format="HH:mm" mdp-auto-switch="true">\n                        <div ng-messages="intervalForm.timeRangeFrom.$error" ng-show="intervalForm.timeRangeFrom.$touched" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_FROM_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n                <div class="md-block" flex ng-if="vm.timeRangeFrom">\n                    <mdp-time-picker name="timeRangeTo" mdp-placeholder="TO*" ng-model="vm.timeRangeTo" mdp-format="HH:mm" mdp-auto-switch="true" required>\n                        <div ng-messages="intervalForm.timeRangeTo.$error" ng-show="intervalForm.timeRangeTo.$invalid" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_INVALID">Time Range To field is invalid</span>\n                            </div>\n                            <div ng-message="required">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_REQUIRED">Time Range To field is required</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n            \x3c!-- TIMERANGE END --\x3e\n\n            \x3c!-- DAYSOFWEEK START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.WEEK_DAYS">Week Days</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.dayOfWeekFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex class="md-block" ng-if="vm.dayOfWeekFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="dayOfWeekTo" ng-model="vm.dayOfWeekTo">\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.dayOfWeekTo.$error" ng-show="intervalForm.dayOfWeekTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- DAYSOFWEEK END --\x3e\n\n            \x3c!-- MONTHDAY START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTH_DAYS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthDayFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthDayFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthDayTo" ng-model="vm.monthDayTo">\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthDayTo.$error" ng-show="intervalForm.monthDayTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTHDAY END --\x3e\n\n            \x3c!-- MONTH START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTHS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthTo" ng-model="vm.monthTo">\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthTo.$error" ng-show="intervalForm.monthTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTH END --\x3e\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/playback/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.AUDIO_FILES">Audio_Files</label>\n                <md-select name="appdata" ng-model="vm.playback.appdata" required autofocus>\n                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/{{appdata.save_name}}\'" ng-repeat="appdata in vm.sounds">{{ appdata.name }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'appdata\'].$error" ng-show="inboundrouteFormApp[\'appdata\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.AUDIO_FILES_REQUIRED">Audio_Files field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.playback.options">\n                <div ng-messages="inboundrouteFormApp[\'options\'].$error" ng-show="inboundrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.playback.answer" aria-label="Answer"><span translate="VOICE.ANSWER">Answer</span></md-switch>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/queue/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.QUEUE">Queue</label>\n                <md-select name="queue" ng-model="vm.queue.queue" required autofocus>\n                    <md-option ng-value="queue.name" ng-repeat="queue in vm.queues">{{ queue.name }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'queue\'].$error" ng-show="inboundrouteFormApp[\'queue\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.QUEUE_REQUIRED">Queue field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.queue.options">\n                <div ng-messages="inboundrouteFormApp[\'options\'].$error" ng-show="inboundrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="URL" ng-model="vm.queue.URL">\n                <div ng-messages="inboundrouteFormApp[\'URL\'].$error" ng-show="inboundrouteFormApp[\'URL\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.ANNOUNCE_OVERRIDES">Announce_Overrides</label>\n                <md-select name="sound" ng-model="vm.queue.sound">\n                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/{{sound.save_name}}\'" ng-repeat="sound in vm.sounds">{{ sound.name }}</md-option>\n                    <md-option ng-value="\'\'">None</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'sound\'].$error" ng-show="inboundrouteFormApp[\'sound\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.ANNOUNCE_OVERRIDES_REQUIRED">Announce_Overrides field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.queue.timeout" min="0">\n                <div ng-messages="inboundrouteFormApp[\'timeout\'].$error" ng-show="inboundrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.AGI">Agi</label>\n                <input type="text" name="agi" ng-model="vm.queue.agi">\n                <div ng-messages="inboundrouteFormApp[\'agi\'].$error" ng-show="inboundrouteFormApp[\'agi\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.AGI_REQUIRED">Agi field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.MACRO">Macro</label>\n                <input type="text" name="macro" ng-model="vm.queue.macro">\n                <div ng-messages="inboundrouteFormApp[\'macro\'].$error" ng-show="inboundrouteFormApp[\'macro\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.MACRO_REQUIRED">Macro field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.GOSUB">GoSub</label>\n                <input type="text" name="gosub" ng-model="vm.queue.gosub">\n                <div ng-messages="inboundrouteFormApp[\'gosub\'].$error" ng-show="inboundrouteFormApp[\'gosub\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.GOSUB_REQUIRED">GoSub field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.RULE">Rule</label>\n                <input type="text" name="rule" ng-model="vm.queue.rule">\n                <div ng-messages="inboundrouteFormApp[\'rule\'].$error" ng-show="inboundrouteFormApp[\'rule\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.RULE_REQUIRED">Rule field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.POSITION">Position</label>\n                <input type="number" name="position" ng-model="vm.queue.position" min="0">\n                <div ng-messages="inboundrouteFormApp[\'position\'].$error" ng-show="inboundrouteFormApp[\'position\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.POSITION_REQUIRED">Position field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.POSITION_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Position must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.queue.answer" aria-label="Answer"><span translate="VOICE.ANSWER">Answer</span></md-switch>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/ringgroup/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.USER">User</label>\n                <md-select name="multipleUsers" ng-model="vm.ringgroup.multipleUsers" required autofocus multiple>\n                    <md-option ng-value="\'SIP/{{multipleUsers.name}}\'" ng-repeat="multipleUsers in vm.users">{{ multipleUsers.name }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'multipleUsers\'].$error" ng-show="inboundrouteFormApp[\'multipleUsers\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.USER_REQUIRED">User field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.ringgroup.timeout" min="0">\n                <div ng-messages="inboundrouteFormApp[\'timeout\'].$error" ng-show="inboundrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.ringgroup.options">\n                <div ng-messages="inboundrouteFormApp[\'options\'].$error" ng-show="inboundrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="url" ng-model="vm.ringgroup.url">\n                <div ng-messages="inboundrouteFormApp[\'url\'].$error" ng-show="inboundrouteFormApp[\'url\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/set/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.VARIABLE">Variable</label>\n                <md-select name="name" ng-model="vm.set.name" required autofocus>\n                    <md-option ng-value="name.name" ng-repeat="name in vm.variables">{{ name.name }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'name\'].$error" ng-show="inboundrouteFormApp[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.VARIABLE_REQUIRED">Variable field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.VALUE">Value</label>\n                <input type="text" name="value" ng-model="vm.set.value" ng-required="true">\n                <div ng-messages="inboundrouteFormApp[\'value\'].$error" ng-show="inboundrouteFormApp[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/apps/voicemail/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">\n    <form name="inboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.MAILBOX@CONTEXT">Mailbox@Context</label>\n                <md-select name="voiceMail" ng-model="vm.voicemail.voiceMail" required autofocus>\n                    <md-option ng-value="\'{{voiceMail.mailbox}}@from-voicemail\'" ng-repeat="voiceMail in vm.voiceMails">{{ voiceMail.mailbox }}</md-option>\n                </md-select>\n                <div ng-messages="inboundrouteFormApp[\'voiceMail\'].$error" ng-show="inboundrouteFormApp[\'voiceMail\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.MAILBOX@CONTEXT_REQUIRED">Mailbox@Context field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.voicemail.options">\n                <div ng-messages="inboundrouteFormApp[\'options\'].$error" ng-show="inboundrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/inboundroutes/edit/view.html",'<div id="voice-inboundroute" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-inboundroutes-button md-icon-button" aria-label="Go to inboundroutes" ng-click="vm.gotoInboundRoutes()" translate translate-attr-aria-label="VOICE.GO_TO_INBOUNDROUTES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="inboundroute-image" hide-xs>\n                    <img ng-src="assets/images/business/inboundroutes.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.inboundroute.id}}\n                        <span ng-if="vm.inboundroute.name">{{vm.inboundroute.name}}</span>\n                        <span ng-if="vm.inboundroute.exten">{{vm.inboundroute.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="VOICE.CREATED_AT"></span> <span>{{vm.inboundroute.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveInboundRoute()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (actionsForm.$invalid)" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="inboundroute-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="VOICE.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.PHONENUMBER">PhoneNumber</label>\n                                <input type="text" name="exten" ng-model="vm.inboundroute.exten" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'exten\'].$error" ng-show="generalForm[\'exten\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.PHONENUMBER_REQUIRED">PhoneNumber field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.CONTEXT">Context</label>\n                                <md-select name="context" ng-model="vm.inboundroute.context" required>\n                                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'context\'].$error" ng-show="generalForm[\'context\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.inboundroute.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.ACTIONS">ACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="inboundroute-detail-form-container actions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="InboundRouteActionsController as vm_ac" ng-init="vm_ac.init(vm.inboundroute)" class="content" md-background-bg layout="row" layout-align="start start">\n                            \x3c!-- SIDENAV --\x3e\n                            <div class="navigation-simple sidenav main-sidenav md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="20">\n                                \x3c!-- SIDENAV CONTENT --\x3e\n                                <md-list class="no-padding">\n                                    <md-subheader class="md-no-sticky">\n                                        <span translate="VOICE.APPLICATIONS_LIST">\n          Applications List\n        </span>\n                                    </md-subheader>\n                                </md-list>\n                                <md-divider></md-divider>\n                                <md-list ng-sortable="vm_ac.list">\n                                    <md-list-item class="handle" ng-repeat="a in vm_ac.apps">\n                                        <md-icon md-font-icon="{{a.icon}}" class="s16"></md-icon>\n                                        <p class="text-truncate" translate="VOICE.{{(a.alias || a.appType) | uppercase}}">{{a.alias || a.appType}}</p>\n                                    </md-list-item>\n                                </md-list>\n                                \x3c!-- / SIDENAV CONTENT --\x3e\n                            </div>\n                            \x3c!-- / SIDENAV --\x3e\n                            <div flex></div>\n                            \x3c!-- MAIN --\x3e\n                            <div class="main scrollable md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="75">\n                                <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_ac.selectedInboundRouteApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">Drag & Drop Routing</span>\n                                        <div flex></div>\n                                        <ms-search-bar on-search="vm_ac.query.filter = query" on-collapse="vm_ac.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    </div>\n                                </md-toolbar>\n                                <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_ac.selectedInboundRouteApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">{{vm_ac.selectedInboundRouteApps.length}} {{vm_ac.selectedInboundRouteApps.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                        <div flex></div>\n                                        <md-button ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_ac.deleteSelectedInboundRouteApps($event)" aria-label="delete selected" translate translate-attr-label="VOICE.DELETE_SELECTED">\n                                            <md-icon md-font-icon="icon-delete"></md-icon>\n                                        </md-button>\n                                    </div>\n                                </md-toolbar>\n\n                                \x3c!-- QUEUES TABLE --\x3e\n                                <md-table-container>\n                                    <table md-table md-row-select multiple ng-model="vm_ac.selectedInboundRouteApps">\n                                        <thead md-head>\n                                            <tr md-row>\n                                                <th md-column width="10px"></th>\n                                                <th md-column>\n                                                    <span>Type</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Appdata</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Interval</span>\n                                                </th>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px"></th>\n                                            </tr>\n                                        </thead>\n                                        <tbody md-body ng-sortable="vm_ac.applications">\n                                            <tr md-row md-select="app" md-select-id="id" ng-repeat="app in vm_ac.inboundrouteApps.rows | filter: vm_ac.query.filter">\n                                                <td md-cell>\n                                                    <md-icon md-font-icon="icon-drag-vertical" class="s16 handle"></md-icon>\n                                                </td>\n                                                <td md-cell ng-click="vm_ac.editInboundRouteApp($event, $index)">{{app.app.toLowerCase() === \'agi\' ? \'Cally-Square\' : app.app | ucfirst}}<span ng-if="app.appType.toLowerCase() === \'custom\'">*</span></td>\n                                                <td md-cell ng-click="vm_ac.editInboundRouteApp($event, $index)"><span class="text-truncate" style="width:200px">{{app.appdata}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editInterval($event, $index)">{{app.IntervalId ? \'From List\' : app.interval}}</td>\n                                                <td md-cell>\n                                                    <md-button ng-click="vm_ac.editInterval($event, $index)" class="md-icon-button" aria-label="Interval">\n                                                        <md-icon md-font-icon="icon-timer"></md-icon>\n                                                        <md-tooltip>\n                                                            {{app.IntervalId ? \'From List\' : (app.interval === \'*,*,*,*\' ? \'Always\' : \'Custom\')}}\n                                                        </md-tooltip>\n                                                    </md-button>\n                                                </td>\n                                                <td md-cell class="actions">\n                                                    <md-menu>\n                                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                        </md-button>\n\n                                                        <md-menu-content width="3">\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editInboundRouteApp($event, $index)" translate="VOICE.EDIT_APP">\n                                                                    Edit App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editInterval($event, $index)" translate="VOICE.EDIT_INTERVAL">\n                                                                    Edit Interval\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'">\n                                                                <md-button ng-click="vm_ac.deleteConfirm(app, $index, $event)" translate="VOICE.DELETE_APP">\n                                                                    Delete App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                        </md-menu-content>\n                                                    </md-menu>\n                                                </td>\n                                            </tr>\n                                            <tr md-row ng-hide="vm_ac.inboundrouteApps.rows.length">\n                                                <td md-cell colspan="6">\n                                                    <span class="text-boxed-ligth" translate="VOICE.NO_APPS_AVAILABLE">No apps available</span>\n                                                </td>\n                                            </tr>\n                                        </tbody>\n                                        <tfoot md-foot>\n                                            <tr md-row>\n                                                <td md-cell colspan="6">\n                                                    <span><em translate="VOICE.LEGEND.CUSTOM_APPLICATION">(*) - Custom application.</em></span>\n                                                </td>\n                                            </tr>\n                                        </tfoot>\n                                    </table>\n                                </md-table-container>\n                                \x3c!-- / QUEUES TABLE --\x3e\n\n                                \x3c!-- NO RESULTS --\x3e\n\n                                \x3c!-- / NO RESULTS --\x3e\n                            </div>\n                            \x3c!-- / MAIN --\x3e\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/voice/views/inboundroutes/inboundroutes.html",'<div id="inboundroutes" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-phone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="VOICE.INBOUNDROUTES">InboundRoutes</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="VOICE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedInboundRoutes.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedInboundRoutes =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="VOICE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-inboundroutes-count">\n                    <span>{{vm.selectedInboundRoutes.length}}</span>\n                <span translate="VOICE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="INBOUNDROUTES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllInboundRoutes()" translate="VOICE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectInboundRoutes()" translate="VOICE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedInboundRoutes" csv-label="true" filename="inboundroutes.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedInboundRoutes($event)" aria-label="delete selected" translate translate-attr-label="INBOUNDROUTES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- INBOUNDROUTE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedInboundRoutes" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getInboundRoutes">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'VOICE.ID\' | translate }}</th>\n                                <th md-column md-order-by="exten">{{ \'VOICE.PHONENUMBER\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'VOICE.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.inboundroutes.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="inboundroute" md-select-id="id" ng-repeat="inboundroute in vm.inboundroutes.rows">\n                                <td md-cell ng-if="inboundroute.userpic"><img class="avatar" alt="{{inboundroute.name}}" ng-src="api/users/{{inboundroute.id}}/avatar" /></td>\n                                <td md-cell ng-if="!inboundroute.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{inboundroute.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditInboundRoute($event, inboundroute)" md-cell class="id ">{{inboundroute.id}}</td>\n                                <td ng-click="vm.createOrEditInboundRoute($event, inboundroute)" md-cell class="exten ">{{inboundroute.exten}}</td>\n                                <td ng-click="vm.createOrEditInboundRoute($event, inboundroute)" md-cell class="description ">{{inboundroute.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(inboundroute, $event)" translate="VOICE.EDIT_INBOUNDROUTE">\n                                                    Edit InboundRoute\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(inboundroute, $event)" translate="VOICE.DELETE_INBOUNDROUTE">\n                                                    Delete InboundRoute\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.inboundroutes.count}}" md-on-paginate="vm.getInboundRoutes" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / INBOUNDROUTE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD INBOUNDROUTE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-inboundroute-button" ng-click="vm.createOrEditInboundRoute($event)" aria-label="add inboundroute" translate translate-attr-aria-label="VOICE.ADD_INBOUNDROUTE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD INBOUNDROUTE BUTTON --\x3e\n</div>'),e.put("app/main/apps/voice/views/internalroutes/create/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PHONENUMBER">PhoneNumber</label>\n                <input type="text" name="exten" ng-model="vm.internalroute.exten" ng-required="true" autofocus>\n                <div ng-messages="internalrouteForm[\'exten\'].$error" ng-show="internalrouteForm[\'exten\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PHONENUMBER_REQUIRED">PhoneNumber field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.CONTEXT">Context</label>\n                <md-select name="context" ng-model="vm.internalroute.context" required>\n                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteForm[\'context\'].$error" ng-show="internalrouteForm[\'context\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.internalroute.description">\n                <div ng-messages="internalrouteForm[\'description\'].$error" ng-show="internalrouteForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInternalRoute" ng-click="vm.saveInternalRoute()" class="send-button md-accent md-raised" ng-disabled="internalrouteForm.$invalid || internalrouteForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInternalRoute" ng-click="vm.addNewInternalRoute()" class="send-button md-accent md-raised" ng-disabled="internalrouteForm.$invalid" aria-label="ADD" translate="VOICE.ADD_INTERNALROUTE" translate-attr-aria-label="VOICE.ADD_INTERNALROUTE">\n                    ADD INTERNALROUTE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newInternalRoute" ng-click="vm.deleteInternalRoute($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/agi/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PROJECT">Project</label>\n                <md-select name="project" ng-model="vm.agi.project" required autofocus>\n                    <md-option ng-value="\'agi://127.0.0.1/square,{{project.name}}\'" ng-repeat="project in vm.projects">{{ project.name }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'project\'].$error" ng-show="internalrouteFormApp[\'project\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PROJECT_REQUIRED">Project field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/custom/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.APPLICATION_NAME">Application_Name</label>\n                <input type="text" name="app" ng-model="vm.custom.app" ng-required="true" autofocus>\n                <div ng-messages="internalrouteFormApp[\'app\'].$error" ng-show="internalrouteFormApp[\'app\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.APPLICATION_NAME_REQUIRED">Application_Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.ARGUMENTS">Arguments</label>\n                <input type="text" name="appdata" ng-model="vm.custom.appdata">\n                <div ng-messages="internalrouteFormApp[\'appdata\'].$error" ng-show="internalrouteFormApp[\'appdata\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.ARGUMENTS_REQUIRED">Arguments field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/dial/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TECHNOLOGY/RESOURCE">Technology/Resource</label>\n                <input type="text" name="tech" ng-model="vm.dial.tech" ng-required="true" autofocus>\n                <div ng-messages="internalrouteFormApp[\'tech\'].$error" ng-show="internalrouteFormApp[\'tech\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TECHNOLOGY/RESOURCE_REQUIRED">Technology/Resource field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.dial.timeout" min="0">\n                <div ng-messages="internalrouteFormApp[\'timeout\'].$error" ng-show="internalrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.dial.options">\n                <div ng-messages="internalrouteFormApp[\'options\'].$error" ng-show="internalrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="url" ng-model="vm.dial.url">\n                <div ng-messages="internalrouteFormApp[\'url\'].$error" ng-show="internalrouteFormApp[\'url\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/externaldial/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TRUNK">Trunk</label>\n                <md-select name="trunk" ng-model="vm.externaldial.trunk" required autofocus>\n                    <md-option ng-value="trunk.name" ng-repeat="trunk in vm.trunks">{{ trunk.name }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'trunk\'].$error" ng-show="internalrouteFormApp[\'trunk\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TRUNK_REQUIRED">Trunk field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PHONE">Phone</label>\n                <input type="text" name="phone" ng-model="vm.externaldial.phone">\n                <div ng-messages="internalrouteFormApp[\'phone\'].$error" ng-show="internalrouteFormApp[\'phone\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PHONE_REQUIRED">Phone field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.externaldial.timeout" min="0">\n                <div ng-messages="internalrouteFormApp[\'timeout\'].$error" ng-show="internalrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.externaldial.options">\n                <div ng-messages="internalrouteFormApp[\'options\'].$error" ng-show="internalrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="url" ng-model="vm.externaldial.url">\n                <div ng-messages="internalrouteFormApp[\'url\'].$error" ng-show="internalrouteFormApp[\'url\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/goto/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.CONTEXT">Context</label>\n                <md-select name="context" ng-model="vm.goto.context" required autofocus>\n                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'context\'].$error" ng-show="internalrouteFormApp[\'context\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.EXTENSION">Extension</label>\n                <input type="text" name="extension" ng-model="vm.goto.extension" ng-required="true">\n                <div ng-messages="internalrouteFormApp[\'extension\'].$error" ng-show="internalrouteFormApp[\'extension\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.EXTENSION_REQUIRED">Extension field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PRIORITY">Priority</label>\n                <input type="text" name="priority" ng-model="vm.goto.priority" ng-required="true">\n                <div ng-messages="internalrouteFormApp[\'priority\'].$error" ng-show="internalrouteFormApp[\'priority\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PRIORITY_REQUIRED">Priority field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/hangup/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.HANGUP_CAUSE">Hangup_Cause</label>\n                <md-select name="appdata" ng-model="vm.hangup.appdata" required autofocus>\n\n                    <md-option ng-value="\'1\'"> {{ \'VOICE.HANGUPCAUSE_1\' | translate }}</md-option>\n\n                    <md-option ng-value="\'16\'"> {{ \'VOICE.HANGUPCAUSE_16\' | translate }}</md-option>\n\n                    <md-option ng-value="\'17\'"> {{ \'VOICE.HANGUPCAUSE_17\' | translate }}</md-option>\n\n                    <md-option ng-value="\'18\'"> {{ \'VOICE.HANGUPCAUSE_18\' | translate }}</md-option>\n\n                    <md-option ng-value="\'21\'"> {{ \'VOICE.HANGUPCAUSE_21\' | translate }}</md-option>\n\n                    <md-option ng-value="\'22\'"> {{ \'VOICE.HANGUPCAUSE_22\' | translate }}</md-option>\n\n                    <md-option ng-value="\'27\'"> {{ \'VOICE.HANGUPCAUSE_27\' | translate }}</md-option>\n\n                    <md-option ng-value="\'38\'"> {{ \'VOICE.HANGUPCAUSE_38\' | translate }}</md-option>\n\n                    <md-option ng-value="\'41\'"> {{ \'VOICE.HANGUPCAUSE_41\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'appdata\'].$error" ng-show="internalrouteFormApp[\'appdata\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.HANGUP_CAUSE_REQUIRED">Hangup_Cause field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/internaldial/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.USER">User</label>\n                <md-select name="user" ng-model="vm.internaldial.user" required autofocus>\n                    <md-option ng-value="\'SIP/{{user.name}}\'" ng-repeat="user in vm.users">{{ user.name }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'user\'].$error" ng-show="internalrouteFormApp[\'user\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.USER_REQUIRED">User field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.internaldial.timeout" min="0">\n                <div ng-messages="internalrouteFormApp[\'timeout\'].$error" ng-show="internalrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.internaldial.options">\n                <div ng-messages="internalrouteFormApp[\'options\'].$error" ng-show="internalrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="url" ng-model="vm.internaldial.url">\n                <div ng-messages="internalrouteFormApp[\'url\'].$error" ng-show="internalrouteFormApp[\'url\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/interval/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select ng-model="vm.type">\n                    <md-option ng-value="type" ng-repeat=\'type in vm.types\'>{{ type | ucfirst }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.type === \'list\'">\n                <label translate="TOOLS.INTERVALS">Intervals</label>\n                <md-select ng-model="vm.interval.IntervalId">\n                    <md-option ng-value="interval.id" ng-repeat="interval in vm.intervals.rows">{{ interval.name }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            \x3c!-- TIMERANGE START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.TIME_RANGE">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <div class="md-block" flex>\n                    <mdp-time-picker name="timeRangeFrom" mdp-placeholder="FROM" ng-model="vm.timeRangeFrom" mdp-format="HH:mm" mdp-auto-switch="true">\n                        <div ng-messages="intervalForm.timeRangeFrom.$error" ng-show="intervalForm.timeRangeFrom.$touched" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_FROM_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n                <div class="md-block" flex ng-if="vm.timeRangeFrom">\n                    <mdp-time-picker name="timeRangeTo" mdp-placeholder="TO*" ng-model="vm.timeRangeTo" mdp-format="HH:mm" mdp-auto-switch="true" required>\n                        <div ng-messages="intervalForm.timeRangeTo.$error" ng-show="intervalForm.timeRangeTo.$invalid" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_INVALID">Time Range To field is invalid</span>\n                            </div>\n                            <div ng-message="required">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_REQUIRED">Time Range To field is required</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n            \x3c!-- TIMERANGE END --\x3e\n\n            \x3c!-- DAYSOFWEEK START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.WEEK_DAYS">Week Days</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.dayOfWeekFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex class="md-block" ng-if="vm.dayOfWeekFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="dayOfWeekTo" ng-model="vm.dayOfWeekTo">\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.dayOfWeekTo.$error" ng-show="intervalForm.dayOfWeekTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- DAYSOFWEEK END --\x3e\n\n            \x3c!-- MONTHDAY START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTH_DAYS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthDayFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthDayFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthDayTo" ng-model="vm.monthDayTo">\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthDayTo.$error" ng-show="intervalForm.monthDayTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTHDAY END --\x3e\n\n            \x3c!-- MONTH START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTHS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthTo" ng-model="vm.monthTo">\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthTo.$error" ng-show="intervalForm.monthTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTH END --\x3e\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/playback/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.AUDIO_FILES">Audio_Files</label>\n                <md-select name="appdata" ng-model="vm.playback.appdata" required autofocus>\n                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/{{appdata.save_name}}\'" ng-repeat="appdata in vm.sounds">{{ appdata.name }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'appdata\'].$error" ng-show="internalrouteFormApp[\'appdata\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.AUDIO_FILES_REQUIRED">Audio_Files field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.playback.options">\n                <div ng-messages="internalrouteFormApp[\'options\'].$error" ng-show="internalrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.playback.answer" aria-label="Answer"><span translate="VOICE.ANSWER">Answer</span></md-switch>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/queue/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.QUEUE">Queue</label>\n                <md-select name="queue" ng-model="vm.queue.queue" required autofocus>\n                    <md-option ng-value="queue.name" ng-repeat="queue in vm.queues">{{ queue.name }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'queue\'].$error" ng-show="internalrouteFormApp[\'queue\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.QUEUE_REQUIRED">Queue field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.queue.options">\n                <div ng-messages="internalrouteFormApp[\'options\'].$error" ng-show="internalrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="URL" ng-model="vm.queue.URL">\n                <div ng-messages="internalrouteFormApp[\'URL\'].$error" ng-show="internalrouteFormApp[\'URL\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.ANNOUNCE_OVERRIDES">Announce_Overrides</label>\n                <md-select name="sound" ng-model="vm.queue.sound">\n                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/{{sound.save_name}}\'" ng-repeat="sound in vm.sounds">{{ sound.name }}</md-option>\n                    <md-option ng-value="\'\'">None</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'sound\'].$error" ng-show="internalrouteFormApp[\'sound\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.ANNOUNCE_OVERRIDES_REQUIRED">Announce_Overrides field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.queue.timeout" min="0">\n                <div ng-messages="internalrouteFormApp[\'timeout\'].$error" ng-show="internalrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.AGI">Agi</label>\n                <input type="text" name="agi" ng-model="vm.queue.agi">\n                <div ng-messages="internalrouteFormApp[\'agi\'].$error" ng-show="internalrouteFormApp[\'agi\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.AGI_REQUIRED">Agi field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.MACRO">Macro</label>\n                <input type="text" name="macro" ng-model="vm.queue.macro">\n                <div ng-messages="internalrouteFormApp[\'macro\'].$error" ng-show="internalrouteFormApp[\'macro\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.MACRO_REQUIRED">Macro field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.GOSUB">GoSub</label>\n                <input type="text" name="gosub" ng-model="vm.queue.gosub">\n                <div ng-messages="internalrouteFormApp[\'gosub\'].$error" ng-show="internalrouteFormApp[\'gosub\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.GOSUB_REQUIRED">GoSub field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.RULE">Rule</label>\n                <input type="text" name="rule" ng-model="vm.queue.rule">\n                <div ng-messages="internalrouteFormApp[\'rule\'].$error" ng-show="internalrouteFormApp[\'rule\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.RULE_REQUIRED">Rule field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.POSITION">Position</label>\n                <input type="number" name="position" ng-model="vm.queue.position" min="0">\n                <div ng-messages="internalrouteFormApp[\'position\'].$error" ng-show="internalrouteFormApp[\'position\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.POSITION_REQUIRED">Position field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.POSITION_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Position must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.queue.answer" aria-label="Answer"><span translate="VOICE.ANSWER">Answer</span></md-switch>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/ringgroup/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.USER">User</label>\n                <md-select name="multipleUsers" ng-model="vm.ringgroup.multipleUsers" required autofocus multiple>\n                    <md-option ng-value="\'SIP/{{multipleUsers.name}}\'" ng-repeat="multipleUsers in vm.users">{{ multipleUsers.name }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'multipleUsers\'].$error" ng-show="internalrouteFormApp[\'multipleUsers\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.USER_REQUIRED">User field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.ringgroup.timeout" min="0">\n                <div ng-messages="internalrouteFormApp[\'timeout\'].$error" ng-show="internalrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.ringgroup.options">\n                <div ng-messages="internalrouteFormApp[\'options\'].$error" ng-show="internalrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="url" ng-model="vm.ringgroup.url">\n                <div ng-messages="internalrouteFormApp[\'url\'].$error" ng-show="internalrouteFormApp[\'url\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/set/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.VARIABLE">Variable</label>\n                <md-select name="name" ng-model="vm.set.name" required autofocus>\n                    <md-option ng-value="name.name" ng-repeat="name in vm.variables">{{ name.name }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'name\'].$error" ng-show="internalrouteFormApp[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.VARIABLE_REQUIRED">Variable field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.VALUE">Value</label>\n                <input type="text" name="value" ng-model="vm.set.value" ng-required="true">\n                <div ng-messages="internalrouteFormApp[\'value\'].$error" ng-show="internalrouteFormApp[\'value\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.VALUE_REQUIRED">Value field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/apps/voicemail/dialog.html",'<md-dialog class="internalroute-dialog" aria-label="New InternalRoute">\n    <form name="internalrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.MAILBOX@CONTEXT">Mailbox@Context</label>\n                <md-select name="voiceMail" ng-model="vm.voicemail.voiceMail" required autofocus>\n                    <md-option ng-value="\'{{voiceMail.mailbox}}@from-voicemail\'" ng-repeat="voiceMail in vm.voiceMails">{{ voiceMail.mailbox }}</md-option>\n                </md-select>\n                <div ng-messages="internalrouteFormApp[\'voiceMail\'].$error" ng-show="internalrouteFormApp[\'voiceMail\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.MAILBOX@CONTEXT_REQUIRED">Mailbox@Context field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.voicemail.options">\n                <div ng-messages="internalrouteFormApp[\'options\'].$error" ng-show="internalrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveInternalRouteApp()" class="send-button md-accent md-raised" ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/internalroutes/edit/view.html",'<div id="voice-internalroute" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-internalroutes-button md-icon-button" aria-label="Go to internalroutes" ng-click="vm.gotoInternalRoutes()" translate translate-attr-aria-label="VOICE.GO_TO_INTERNALROUTES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="internalroute-image" hide-xs>\n                    <img ng-src="assets/images/business/internalroutes.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.internalroute.id}}\n                        <span ng-if="vm.internalroute.name">{{vm.internalroute.name}}</span>\n                        <span ng-if="vm.internalroute.exten">{{vm.internalroute.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="VOICE.CREATED_AT"></span> <span>{{vm.internalroute.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveInternalRoute()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (actionsForm.$invalid)" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="internalroute-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="VOICE.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.PHONENUMBER">PhoneNumber</label>\n                                <input type="text" name="exten" ng-model="vm.internalroute.exten" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'exten\'].$error" ng-show="generalForm[\'exten\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.PHONENUMBER_REQUIRED">PhoneNumber field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.CONTEXT">Context</label>\n                                <md-select name="context" ng-model="vm.internalroute.context" required>\n                                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'context\'].$error" ng-show="generalForm[\'context\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.internalroute.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.ACTIONS">ACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="internalroute-detail-form-container actions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="InternalRouteActionsController as vm_ac" ng-init="vm_ac.init(vm.internalroute)" class="content" md-background-bg layout="row" layout-align="start start">\n                            \x3c!-- SIDENAV --\x3e\n                            <div class="navigation-simple sidenav main-sidenav md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="20">\n                                \x3c!-- SIDENAV CONTENT --\x3e\n                                <md-list class="no-padding">\n                                    <md-subheader class="md-no-sticky">\n                                        <span translate="VOICE.APPLICATIONS_LIST">\n          Applications List\n        </span>\n                                    </md-subheader>\n                                </md-list>\n                                <md-divider></md-divider>\n                                <md-list ng-sortable="vm_ac.list">\n                                    <md-list-item class="handle" ng-repeat="a in vm_ac.apps">\n                                        <md-icon md-font-icon="{{a.icon}}" class="s16"></md-icon>\n                                        <p class="text-truncate" translate="VOICE.{{(a.alias || a.appType) | uppercase}}">{{a.alias || a.appType}}</p>\n                                    </md-list-item>\n                                </md-list>\n                                \x3c!-- / SIDENAV CONTENT --\x3e\n                            </div>\n                            \x3c!-- / SIDENAV --\x3e\n                            <div flex></div>\n                            \x3c!-- MAIN --\x3e\n                            <div class="main scrollable md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="75">\n                                <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_ac.selectedInternalRouteApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">Drag & Drop Routing</span>\n                                        <div flex></div>\n                                        <ms-search-bar on-search="vm_ac.query.filter = query" on-collapse="vm_ac.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    </div>\n                                </md-toolbar>\n                                <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_ac.selectedInternalRouteApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">{{vm_ac.selectedInternalRouteApps.length}} {{vm_ac.selectedInternalRouteApps.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                        <div flex></div>\n                                        <md-button ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_ac.deleteSelectedInternalRouteApps($event)" aria-label="delete selected" translate translate-attr-label="VOICE.DELETE_SELECTED">\n                                            <md-icon md-font-icon="icon-delete"></md-icon>\n                                        </md-button>\n                                    </div>\n                                </md-toolbar>\n\n                                \x3c!-- QUEUES TABLE --\x3e\n                                <md-table-container>\n                                    <table md-table md-row-select multiple ng-model="vm_ac.selectedInternalRouteApps">\n                                        <thead md-head>\n                                            <tr md-row>\n                                                <th md-column width="10px"></th>\n                                                <th md-column>\n                                                    <span>Type</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Appdata</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Interval</span>\n                                                </th>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px"></th>\n                                            </tr>\n                                        </thead>\n                                        <tbody md-body ng-sortable="vm_ac.applications">\n                                            <tr md-row md-select="app" md-select-id="id" ng-repeat="app in vm_ac.internalrouteApps.rows | filter: vm_ac.query.filter">\n                                                <td md-cell>\n                                                    <md-icon md-font-icon="icon-drag-vertical" class="s16 handle"></md-icon>\n                                                </td>\n                                                <td md-cell ng-click="vm_ac.editInternalRouteApp($event, $index)">{{app.app.toLowerCase() === \'agi\' ? \'Cally-Square\' : app.app | ucfirst}}<span ng-if="app.appType.toLowerCase() === \'custom\'">*</span></td>\n                                                <td md-cell ng-click="vm_ac.editInternalRouteApp($event, $index)"><span class="text-truncate" style="width:200px">{{app.appdata}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editInterval($event, $index)">{{app.IntervalId ? \'From List\' : app.interval}}</td>\n                                                <td md-cell>\n                                                    <md-button ng-click="vm_ac.editInterval($event, $index)" class="md-icon-button" aria-label="Interval">\n                                                        <md-icon md-font-icon="icon-timer"></md-icon>\n                                                        <md-tooltip>\n                                                            {{app.IntervalId ? \'From List\' : (app.interval === \'*,*,*,*\' ? \'Always\' : \'Custom\')}}\n                                                        </md-tooltip>\n                                                    </md-button>\n                                                </td>\n                                                <td md-cell class="actions">\n                                                    <md-menu>\n                                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                        </md-button>\n\n                                                        <md-menu-content width="3">\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editInternalRouteApp($event, $index)" translate="VOICE.EDIT_APP">\n                                                                    Edit App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editInterval($event, $index)" translate="VOICE.EDIT_INTERVAL">\n                                                                    Edit Interval\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'">\n                                                                <md-button ng-click="vm_ac.deleteConfirm(app, $index, $event)" translate="VOICE.DELETE_APP">\n                                                                    Delete App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                        </md-menu-content>\n                                                    </md-menu>\n                                                </td>\n                                            </tr>\n                                            <tr md-row ng-hide="vm_ac.internalrouteApps.rows.length">\n                                                <td md-cell colspan="6">\n                                                    <span class="text-boxed-ligth" translate="VOICE.NO_APPS_AVAILABLE">No apps available</span>\n                                                </td>\n                                            </tr>\n                                        </tbody>\n                                        <tfoot md-foot>\n                                            <tr md-row>\n                                                <td md-cell colspan="6">\n                                                    <span><em translate="VOICE.LEGEND.CUSTOM_APPLICATION">(*) - Custom application.</em></span>\n                                                </td>\n                                            </tr>\n                                        </tfoot>\n                                    </table>\n                                </md-table-container>\n                                \x3c!-- / QUEUES TABLE --\x3e\n\n                                \x3c!-- NO RESULTS --\x3e\n\n                                \x3c!-- / NO RESULTS --\x3e\n                            </div>\n                            \x3c!-- / MAIN --\x3e\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/voice/views/internalroutes/internalroutes.html",'<div id="internalroutes" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-phone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="VOICE.INTERNALROUTES">InternalRoutes</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="VOICE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedInternalRoutes.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedInternalRoutes =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="VOICE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-internalroutes-count">\n                    <span>{{vm.selectedInternalRoutes.length}}</span>\n                <span translate="VOICE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="INTERNALROUTES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllInternalRoutes()" translate="VOICE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectInternalRoutes()" translate="VOICE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedInternalRoutes" csv-label="true" filename="internalroutes.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedInternalRoutes($event)" aria-label="delete selected" translate translate-attr-label="INTERNALROUTES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- INTERNALROUTE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedInternalRoutes" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getInternalRoutes">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'VOICE.ID\' | translate }}</th>\n                                <th md-column md-order-by="exten">{{ \'VOICE.PHONENUMBER\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'VOICE.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.internalroutes.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="internalroute" md-select-id="id" ng-repeat="internalroute in vm.internalroutes.rows">\n                                <td md-cell ng-if="internalroute.userpic"><img class="avatar" alt="{{internalroute.name}}" ng-src="api/users/{{internalroute.id}}/avatar" /></td>\n                                <td md-cell ng-if="!internalroute.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{internalroute.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditInternalRoute($event, internalroute)" md-cell class="id ">{{internalroute.id}}</td>\n                                <td ng-click="vm.createOrEditInternalRoute($event, internalroute)" md-cell class="exten ">{{internalroute.exten}}</td>\n                                <td ng-click="vm.createOrEditInternalRoute($event, internalroute)" md-cell class="description ">{{internalroute.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(internalroute, $event)" translate="VOICE.EDIT_INTERNALROUTE">\n                                                    Edit InternalRoute\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(internalroute, $event)" translate="VOICE.DELETE_INTERNALROUTE">\n                                                    Delete InternalRoute\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.internalroutes.count}}" md-on-paginate="vm.getInternalRoutes" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / INTERNALROUTE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD INTERNALROUTE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-internalroute-button" ng-click="vm.createOrEditInternalRoute($event)" aria-label="add internalroute" translate translate-attr-aria-label="VOICE.ADD_INTERNALROUTE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD INTERNALROUTE BUTTON --\x3e\n</div>'),e.put("app/main/apps/voice/views/musiconholds/create/dialog.html",'<md-dialog class="musiconhold-dialog" aria-label="New MusicOnHold">\n    <form name="musiconholdForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.musiconhold.name" ng-required="true" autofocus ng-disabled="!vm.newMusicOnHold">\n                <div ng-messages="musiconholdForm[\'name\'].$error" ng-show="musiconholdForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.MODE">Mode</label>\n                <md-select name="mode" ng-model="vm.musiconhold.mode" required ng-disabled="!vm.newMusicOnHold">\n\n                    <md-option ng-value="\'files\'"> {{ \'VOICE.FILES\' | translate }}</md-option>\n\n                    <md-option ng-value="\'custom\'"> {{ \'VOICE.CUSTOM\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="musiconholdForm[\'mode\'].$error" ng-show="musiconholdForm[\'mode\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.MODE_REQUIRED">Mode field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.musiconhold.mode == \'custom\'" class="md-block">\n                <label translate="VOICE.DIRECTORY">Directory</label>\n                <input type="" name="directory" ng-model="vm.musiconhold.directory">\n                <div ng-messages="musiconholdForm[\'directory\'].$error" ng-show="musiconholdForm[\'directory\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.DIRECTORY_REQUIRED">Directory field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.musiconhold.mode == \'custom\'" class="md-block">\n                <label translate="VOICE.APPLICATION">Application</label>\n                <input type="text" name="application" ng-model="vm.musiconhold.application" ng-required="true">\n                <div ng-messages="musiconholdForm[\'application\'].$error" ng-show="musiconholdForm[\'application\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.APPLICATION_REQUIRED">Application field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container ng-if="vm.musiconhold.mode == \'files\'" class="md-block">\n                <label translate="VOICE.SORT">Sort</label>\n                <md-select name="sort" ng-model="vm.musiconhold.sort">\n\n                    <md-option ng-value="\'random\'"> {{ \'VOICE.RANDOM\' | translate }}</md-option>\n\n                    <md-option ng-value="\'alpha\'"> {{ \'VOICE.ALPHABETICAL\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="musiconholdForm[\'sort\'].$error" ng-show="musiconholdForm[\'sort\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.SORT_REQUIRED">Sort field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newMusicOnHold" ng-click="vm.saveMusicOnHold()" class="send-button md-accent md-raised" ng-disabled="musiconholdForm.$invalid || musiconholdForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newMusicOnHold" ng-click="vm.addNewMusicOnHold()" class="send-button md-accent md-raised" ng-disabled="musiconholdForm.$invalid" aria-label="ADD" translate="VOICE.ADD_MUSICONHOLD" translate-attr-aria-label="VOICE.ADD_MUSICONHOLD">\n                    ADD MUSICONHOLD\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newMusicOnHold" ng-click="vm.deleteMusicOnHold($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/musiconholds/edit/mohSounds/dialog.html",'<md-dialog class="mohSound-dialog" aria-label="New MohSound">\n    <form name="mohSoundForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.FILE">File</label>\n                <md-select name="id" ng-model="vm.mohSound.id" autofocus>\n                    <md-option ng-value="id.id" ng-repeat="id in vm.sounds">{{ id.name }}</md-option>\n                </md-select>\n                <div ng-messages="mohSoundForm[\'id\'].$error" ng-show="mohSoundForm[\'id\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.FILE_REQUIRED">File field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newMohSound" ng-click="vm.saveMohSound()" class="send-button md-accent md-raised" ng-disabled="mohSoundForm.$invalid || mohSoundForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newMohSound" ng-click="vm.addNewMohSound()" class="send-button md-accent md-raised" ng-disabled="mohSoundForm.$invalid" aria-label="ADD" translate="VOICE.ADD_MOHSOUND" translate-attr-aria-label="VOICE.ADD_MOHSOUND">\n                    ADD MOHSOUND\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newMohSound" ng-click="vm.deleteMohSound($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/musiconholds/edit/view.html",'<div id="voice-musiconhold" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-musiconholds-button md-icon-button" aria-label="Go to musiconholds" ng-click="vm.gotoMusicOnHolds()" translate translate-attr-aria-label="VOICE.GO_TO_MUSICONHOLDS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="musiconhold-image" hide-xs>\n                    <img ng-src="assets/images/business/musiconholds.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.musiconhold.id}}\n                        <span ng-if="vm.musiconhold.name">{{vm.musiconhold.name}}</span>\n                        <span ng-if="vm.musiconhold.exten">{{vm.musiconhold.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="VOICE.CREATED_AT"></span> <span>{{vm.musiconhold.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveMusicOnHold()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (mohSoundsForm.$invalid)" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="musiconhold-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="VOICE.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.musiconhold.name" ng-required="true" autofocus ng-disabled="true">\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MODE">Mode</label>\n                                <md-select name="mode" ng-model="vm.musiconhold.mode" required ng-disabled="true">\n\n                                    <md-option ng-value="\'files\'"> {{ \'VOICE.FILES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'custom\'"> {{ \'VOICE.CUSTOM\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'mode\'].$error" ng-show="generalForm[\'mode\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MODE_REQUIRED">Mode field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.musiconhold.mode == \'custom\'" class="md-block">\n                                <label translate="VOICE.DIRECTORY">Directory</label>\n                                <input type="" name="directory" ng-model="vm.musiconhold.directory">\n                                <div ng-messages="generalForm[\'directory\'].$error" ng-show="generalForm[\'directory\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.DIRECTORY_REQUIRED">Directory field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.musiconhold.mode == \'custom\'" class="md-block">\n                                <label translate="VOICE.APPLICATION">Application</label>\n                                <input type="text" name="application" ng-model="vm.musiconhold.application" ng-required="true">\n                                <div ng-messages="generalForm[\'application\'].$error" ng-show="generalForm[\'application\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.APPLICATION_REQUIRED">Application field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.musiconhold.mode == \'files\'" class="md-block">\n                                <label translate="VOICE.SORT">Sort</label>\n                                <md-select name="sort" ng-model="vm.musiconhold.sort">\n\n                                    <md-option ng-value="\'random\'"> {{ \'VOICE.RANDOM\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'alpha\'"> {{ \'VOICE.ALPHABETICAL\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'sort\'].$error" ng-show="generalForm[\'sort\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.SORT_REQUIRED">Sort field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.AUDIOFILES">AUDIOFILES</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="musiconhold-detail-form-container mohsounds md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="MusicOnHoldMohSoundsController as vm_dc" ng-init="vm_dc.init(vm.musiconhold)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedMusicOnHoldMohSounds.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="VOICE.MOHSOUNDS">MohSounds</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    <md-button class="md-icon-button" ng-click="vm_dc.createOrEditMusicOnHoldMohSound($event)" aria-label="add mohSound" translate translate-attr-label="VOICE.ADD_MOHSOUND">\n                                        <md-icon md-font-icon="icon-plus"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedMusicOnHoldMohSounds.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedMusicOnHoldMohSounds.length}} {{vm_dc.selectedMusicOnHoldMohSounds.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedMusicOnHoldMohSounds" csv-label="true" filename="musiconholds.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedMusicOnHoldMohSounds($event)" aria-label="delete selected" translate translate-attr-label="MUSICONHOLDS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedMusicOnHoldMohSounds" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getMusicOnHoldMohSounds">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'VOICE.ID\' | translate }}</th>\n                                            <th md-column md-order-by="audio">{{ \'VOICE.AUDIO\' | translate }}</th>\n                                            <th md-column md-order-by="createdAt">{{ \'VOICE.CREATED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="mohSound" md-select-id="id" ng-repeat="mohSound in vm_dc.musiconholdMohSounds.rows">\n                                            <td md-cell>{{mohSound.id}}</td>\n                                            <td md-cell>\n                                                \x3c!-- audio recording directive --\x3e\n                                                <ms-recording id="mohSound.id" model="\'sound\'"></ms-recording>\n                                                \x3c!-- / audio recording directive --\x3e\n                                            </td>\n                                            <td md-cell>{{mohSound.createdAt | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button class="md-primary" ng-click="vm_dc.voiceMusicOnHoldDownload(mohSound, $event)" translate="VOICE.DOWNLOAD_MOHSOUND">\n                                                                Download MohSound\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(mohSound, $event)" translate="VOICE.DELETE_MOHSOUND">\n                                                                Delete MohSound\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.musiconholdMohSounds.rows.length">\n                                            <td md-cell colspan="8">\n                                                <span class="text-boxed-ligth" translate="VOICE.NO_MOHSOUND_AVAILABLE">No mohsound available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.musiconholdMohSounds.count}}" md-on-paginate="vm_dc.getMusicOnHoldMohSounds" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/voice/views/musiconholds/musiconholds.html",'<div id="musiconholds" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-phone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="VOICE.MUSICONHOLDS">MusicOnHolds</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="VOICE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedMusicOnHolds.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedMusicOnHolds =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="VOICE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-musiconholds-count">\n                    <span>{{vm.selectedMusicOnHolds.length}}</span>\n                <span translate="VOICE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="MUSICONHOLDS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllMusicOnHolds()" translate="VOICE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectMusicOnHolds()" translate="VOICE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedMusicOnHolds" csv-label="true" filename="musiconholds.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedMusicOnHolds($event)" aria-label="delete selected" translate translate-attr-label="MUSICONHOLDS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- MUSICONHOLD TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedMusicOnHolds" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getMusicOnHolds">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'VOICE.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'VOICE.NAME\' | translate }}</th>\n                                <th md-column md-order-by="mode">{{ \'VOICE.MODE\' | translate }}</th>\n                                <th md-column md-order-by="sort">{{ \'VOICE.SORT\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.musiconholds.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="musiconhold" md-select-id="id" ng-repeat="musiconhold in vm.musiconholds.rows">\n                                <td md-cell ng-if="musiconhold.userpic"><img class="avatar" alt="{{musiconhold.name}}" ng-src="api/users/{{musiconhold.id}}/avatar" /></td>\n                                <td md-cell ng-if="!musiconhold.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{musiconhold.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditMusicOnHold($event, musiconhold)" md-cell class="id ">{{musiconhold.id}}</td>\n                                <td ng-click="vm.createOrEditMusicOnHold($event, musiconhold)" md-cell class="name ">{{musiconhold.name}}</td>\n                                <td ng-click="vm.createOrEditMusicOnHold($event, musiconhold)" md-cell class="mode ">{{ \'VOICE.\' + vm.arraymode[musiconhold.mode].option | uppercase | translate }}</td>\n                                <td ng-click="vm.createOrEditMusicOnHold($event, musiconhold)" md-cell class="sort ">{{ \'VOICE.\' + vm.arraysort[musiconhold.sort].option | uppercase | translate }}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(musiconhold, $event)" translate="VOICE.EDIT_MUSICONHOLD">\n                                                    Edit MusicOnHold\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(musiconhold, $event)" translate="VOICE.DELETE_MUSICONHOLD">\n                                                    Delete MusicOnHold\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.musiconholds.count}}" md-on-paginate="vm.getMusicOnHolds" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / MUSICONHOLD TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD MUSICONHOLD BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-musiconhold-button" ng-click="vm.createOrEditMusicOnHold($event)" aria-label="add musiconhold" translate translate-attr-aria-label="VOICE.ADD_MUSICONHOLD">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD MUSICONHOLD BUTTON --\x3e\n</div>'),e.put("app/main/apps/voice/views/outboundroutes/create/dialog.html",'<md-dialog class="outboundroute-dialog" aria-label="New OutboundRoute">\n    <form name="outboundrouteForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PHONENUMBER">PhoneNumber</label>\n                <input type="text" name="exten" ng-model="vm.outboundroute.exten" ng-required="true" autofocus>\n                <div ng-messages="outboundrouteForm[\'exten\'].$error" ng-show="outboundrouteForm[\'exten\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PHONENUMBER_REQUIRED">PhoneNumber field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.CONTEXT">Context</label>\n                <md-select name="context" ng-model="vm.outboundroute.context" required>\n                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                </md-select>\n                <div ng-messages="outboundrouteForm[\'context\'].$error" ng-show="outboundrouteForm[\'context\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.RECORDING">Recording</label>\n                <md-select name="recordingFormat" ng-model="vm.outboundroute.recordingFormat" required>\n                    <md-option ng-value="\'none\'">none</md-option>\n                    <md-option ng-value="\'wav\'">wav</md-option>\n                    <md-option ng-value="\'WAV\'">wav49</md-option>\n                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                </md-select>\n                <div class="hint"><span translate="VOICE.HELP.RECORDING"></span></div>\n                <div ng-messages="outboundrouteForm[\'recordingFormat\'].$error" ng-show="outboundrouteForm[\'recordingFormat\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.RECORDING_REQUIRED">Recording field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.CUTDIGITS">CutDigits</label>\n                <input type="number" name="cutdigits" ng-model="vm.outboundroute.cutdigits" min="0">\n                <div ng-messages="outboundrouteForm[\'cutdigits\'].$error" ng-show="outboundrouteForm[\'cutdigits\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.CUTDIGITS_REQUIRED">CutDigits field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.CUTDIGITS_MUST_BE_GREATER_THAN_OR_EQUAL_TO">CutDigits must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.outboundroute.description">\n                <div ng-messages="outboundrouteForm[\'description\'].$error" ng-show="outboundrouteForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newOutboundRoute" ng-click="vm.saveOutboundRoute()" class="send-button md-accent md-raised" ng-disabled="outboundrouteForm.$invalid || outboundrouteForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newOutboundRoute" ng-click="vm.addNewOutboundRoute()" class="send-button md-accent md-raised" ng-disabled="outboundrouteForm.$invalid" aria-label="ADD" translate="VOICE.ADD_OUTBOUNDROUTE" translate-attr-aria-label="VOICE.ADD_OUTBOUNDROUTE">\n                    ADD OUTBOUNDROUTE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newOutboundRoute" ng-click="vm.deleteOutboundRoute($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/outboundroutes/edit/apps/custom/dialog.html",'<md-dialog class="outboundroute-dialog" aria-label="New OutboundRoute">\n    <form name="outboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.APPLICATION_NAME">Application_Name</label>\n                <input type="text" name="app" ng-model="vm.custom.app" ng-required="true" autofocus>\n                <div ng-messages="outboundrouteFormApp[\'app\'].$error" ng-show="outboundrouteFormApp[\'app\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.APPLICATION_NAME_REQUIRED">Application_Name field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.ARGUMENTS">Arguments</label>\n                <input type="text" name="appdata" ng-model="vm.custom.appdata">\n                <div ng-messages="outboundrouteFormApp[\'appdata\'].$error" ng-show="outboundrouteFormApp[\'appdata\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.ARGUMENTS_REQUIRED">Arguments field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveOutboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="outboundrouteFormApp.$invalid || outboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/outboundroutes/edit/apps/interval/dialog.html",'<md-dialog class="inboundroute-dialog" aria-label="New Interval">\n    <form name="intervalForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n\n\n            <md-input-container class="md-block">\n                <label translate="TOOLS.TYPE">Type</label>\n                <md-select ng-model="vm.type">\n                    <md-option ng-value="type" ng-repeat=\'type in vm.types\'>{{ type | ucfirst }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.type === \'list\'">\n                <label translate="TOOLS.INTERVALS">Intervals</label>\n                <md-select ng-model="vm.interval.IntervalId">\n                    <md-option ng-value="interval.id" ng-repeat="interval in vm.intervals.rows">{{ interval.name }}</md-option>\n                </md-select>\n            </md-input-container>\n\n            \x3c!-- TIMERANGE START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.TIME_RANGE">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <div class="md-block" flex>\n                    <mdp-time-picker name="timeRangeFrom" mdp-placeholder="FROM" ng-model="vm.timeRangeFrom" mdp-format="HH:mm" mdp-auto-switch="true">\n                        <div ng-messages="intervalForm.timeRangeFrom.$error" ng-show="intervalForm.timeRangeFrom.$touched" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_FROM_INVALID">Time Range From field is invalid</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n                <div class="md-block" flex ng-if="vm.timeRangeFrom">\n                    <mdp-time-picker name="timeRangeTo" mdp-placeholder="TO*" ng-model="vm.timeRangeTo" mdp-format="HH:mm" mdp-auto-switch="true" required>\n                        <div ng-messages="intervalForm.timeRangeTo.$error" ng-show="intervalForm.timeRangeTo.$invalid" role="alert">\n                            <div ng-message="format">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_INVALID">Time Range To field is invalid</span>\n                            </div>\n                            <div ng-message="required">\n                                <span translate="TOOLS.ERRORS.TIME_RANGE_TO_REQUIRED">Time Range To field is required</span>\n                            </div>\n                        </div>\n                    </mdp-time-picker>\n                </div>\n            </div>\n            \x3c!-- TIMERANGE END --\x3e\n\n            \x3c!-- DAYSOFWEEK START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.WEEK_DAYS">Week Days</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.dayOfWeekFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex class="md-block" ng-if="vm.dayOfWeekFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="dayOfWeekTo" ng-model="vm.dayOfWeekTo">\n                        <md-option ng-value="day.value" ng-repeat="day in vm.daysOfWeek"><span translate="TOOLS.{{day.value | uppercase}}">{{ day.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.dayOfWeekTo.$error" ng-show="intervalForm.dayOfWeekTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- DAYSOFWEEK END --\x3e\n\n            \x3c!-- MONTHDAY START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTH_DAYS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthDayFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthDayFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthDayTo" ng-model="vm.monthDayTo">\n                        <md-option ng-value="month" ng-repeat="month in vm.daysOfMonth">{{ month }}</md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthDayTo.$error" ng-show="intervalForm.monthDayTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTHDAY END --\x3e\n\n            \x3c!-- MONTH START --\x3e\n            <label ng-if="vm.type === \'custom\'" translate="TOOLS.MONTHS">Time Range</label>\n            <div layout=row ng-if="vm.type === \'custom\'">\n                <md-input-container flex layout="column" class="md-block">\n                    <label translate="TOOLS.FROM">From</label>\n                    <md-select ng-model="vm.monthFrom">\n                        <md-option ng-value="null"><span translate="TOOLS.ALWAYS">Always</span></md-option>\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n\n                </md-input-container>\n\n                <md-input-container flex layout="column" class="md-block" ng-if="vm.monthFrom">\n                    <label translate="TOOLS.TO">To</label>\n                    <md-select name="monthTo" ng-model="vm.monthTo">\n                        <md-option ng-value="month.value" ng-repeat="month in vm.monthName"><span translate="TOOLS.{{month.value | uppercase}}">{{ month.value | ucfirst }}</span></md-option>\n                    </md-select>\n                    <div ng-messages="intervalForm.monthTo.$error" ng-show="intervalForm.monthTo.$touched" role="alert">\n                    </div>\n                </md-input-container>\n            </div>\n            \x3c!-- MONTH END --\x3e\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newInterval" ng-click="vm.saveInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid || intervalForm.$pristine" aria-label="SAVE" translate="TOOLS.SAVE" translate-attr-aria-label="TOOLS.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newInterval" ng-click="vm.addNewInterval()" class="send-button md-accent md-raised" ng-disabled="intervalForm.$invalid" aria-label="ADD" translate="TOOLS.ADD_INTERVAL" translate-attr-aria-label="TOOLS.ADD_INTERVAL">\n                    ADD INTERVAL\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/outboundroutes/edit/apps/outbounddial/dialog.html",'<md-dialog class="outboundroute-dialog" aria-label="New OutboundRoute">\n    <form name="outboundrouteFormApp" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TRUNK">Trunk</label>\n                <md-select name="trunk" ng-model="vm.outbounddial.trunk" required autofocus>\n                    <md-option ng-value="trunk.name" ng-repeat="trunk in vm.trunks">{{ trunk.name }}</md-option>\n                </md-select>\n                <div ng-messages="outboundrouteFormApp[\'trunk\'].$error" ng-show="outboundrouteFormApp[\'trunk\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TRUNK_REQUIRED">Trunk field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.CALLER_ID">Caller_ID</label>\n                <input type="text" name="callerID" ng-model="vm.outbounddial.callerID">\n                <div ng-messages="outboundrouteFormApp[\'callerID\'].$error" ng-show="outboundrouteFormApp[\'callerID\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.CALLER_ID_REQUIRED">Caller_ID field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PREFIX">Prefix</label>\n                <input type="text" name="prefix" ng-model="vm.outbounddial.prefix">\n                <div ng-messages="outboundrouteFormApp[\'prefix\'].$error" ng-show="outboundrouteFormApp[\'prefix\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PREFIX_REQUIRED">Prefix field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TAGS">Tags</label>\n                <md-select name="tag" ng-model="vm.outbounddial.tag">\n                    <md-option ng-value="tag.name" ng-repeat="tag in vm.tags">{{ tag.name }}</md-option>\n                    <md-option ng-value="\'--\'">None</md-option>\n                </md-select>\n                <div ng-messages="outboundrouteFormApp[\'tag\'].$error" ng-show="outboundrouteFormApp[\'tag\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TAGS_REQUIRED">Tags field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.TIMEOUT">Timeout</label>\n                <input type="number" name="timeout" ng-model="vm.outbounddial.timeout" min="0">\n                <div ng-messages="outboundrouteFormApp[\'timeout\'].$error" ng-show="outboundrouteFormApp[\'timeout\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                    </div>\n                    <div ng-message="min">\n                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.OPTIONS">Options</label>\n                <input type="text" name="options" ng-model="vm.outbounddial.options">\n                <div ng-messages="outboundrouteFormApp[\'options\'].$error" ng-show="outboundrouteFormApp[\'options\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.OPTIONS_REQUIRED">Options field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.URL">Url</label>\n                <input type="text" name="url" ng-model="vm.outbounddial.url">\n                <div ng-messages="outboundrouteFormApp[\'url\'].$error" ng-show="outboundrouteFormApp[\'url\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.URL_REQUIRED">Url field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.saveOutboundRouteApp()" class="send-button md-accent md-raised" ng-disabled="outboundrouteFormApp.$invalid || outboundrouteFormApp.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/outboundroutes/edit/view.html",'<div id="voice-outboundroute" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-outboundroutes-button md-icon-button" aria-label="Go to outboundroutes" ng-click="vm.gotoOutboundRoutes()" translate translate-attr-aria-label="VOICE.GO_TO_OUTBOUNDROUTES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="outboundroute-image" hide-xs>\n                    <img ng-src="assets/images/business/outboundroutes.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.outboundroute.id}}\n                        <span ng-if="vm.outboundroute.name">{{vm.outboundroute.name}}</span>\n                        <span ng-if="vm.outboundroute.exten">{{vm.outboundroute.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="VOICE.CREATED_AT"></span> <span>{{vm.outboundroute.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveOutboundRoute()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (actionsForm.$invalid)" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="outboundroute-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="VOICE.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.PHONENUMBER">PhoneNumber</label>\n                                <input type="text" name="exten" ng-model="vm.outboundroute.exten" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'exten\'].$error" ng-show="generalForm[\'exten\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.PHONENUMBER_REQUIRED">PhoneNumber field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.CONTEXT">Context</label>\n                                <md-select name="context" ng-model="vm.outboundroute.context" required>\n                                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'context\'].$error" ng-show="generalForm[\'context\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.RECORDING">Recording</label>\n                                <md-select name="recordingFormat" ng-model="vm.outboundroute.recordingFormat" required>\n                                    <md-option ng-value="\'none\'">none</md-option>\n                                    <md-option ng-value="\'wav\'">wav</md-option>\n                                    <md-option ng-value="\'WAV\'">wav49</md-option>\n                                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.RECORDING"></span></div>\n                                <div ng-messages="generalForm[\'recordingFormat\'].$error" ng-show="generalForm[\'recordingFormat\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.RECORDING_REQUIRED">Recording field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.CUTDIGITS">CutDigits</label>\n                                <input type="number" name="cutdigits" ng-model="vm.outboundroute.cutdigits" min="0">\n                                <div ng-messages="generalForm[\'cutdigits\'].$error" ng-show="generalForm[\'cutdigits\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.CUTDIGITS_REQUIRED">CutDigits field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.CUTDIGITS_MUST_BE_GREATER_THAN_OR_EQUAL_TO">CutDigits must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.outboundroute.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.ACTIONS">ACTIONS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="outboundroute-detail-form-container actions md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="OutboundRouteActionsController as vm_ac" ng-init="vm_ac.init(vm.outboundroute)" class="content" md-background-bg layout="row" layout-align="start start">\n                            \x3c!-- SIDENAV --\x3e\n                            <div class="navigation-simple sidenav main-sidenav md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="20">\n                                \x3c!-- SIDENAV CONTENT --\x3e\n                                <md-list class="no-padding">\n                                    <md-subheader class="md-no-sticky">\n                                        <span translate="VOICE.APPLICATIONS_LIST">\n          Applications List\n        </span>\n                                    </md-subheader>\n                                </md-list>\n                                <md-divider></md-divider>\n                                <md-list ng-sortable="vm_ac.list">\n                                    <md-list-item class="handle" ng-repeat="a in vm_ac.apps">\n                                        <md-icon md-font-icon="{{a.icon}}" class="s16"></md-icon>\n                                        <p class="text-truncate" translate="VOICE.{{(a.alias || a.appType) | uppercase}}">{{a.alias || a.appType}}</p>\n                                    </md-list-item>\n                                </md-list>\n                                \x3c!-- / SIDENAV CONTENT --\x3e\n                            </div>\n                            \x3c!-- / SIDENAV --\x3e\n                            <div flex></div>\n                            \x3c!-- MAIN --\x3e\n                            <div class="main scrollable md-background-bg md-whiteframe-1dp" ms-scroll layout="column" flex="75">\n                                <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_ac.selectedOutboundRouteApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">Drag & Drop Routing</span>\n                                        <div flex></div>\n                                        <ms-search-bar on-search="vm_ac.query.filter = query" on-collapse="vm_ac.query.filter = undefined" debounce="300"></ms-search-bar>\n                                    </div>\n                                </md-toolbar>\n                                <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_ac.selectedOutboundRouteApps.length">\n                                    <div class="md-toolbar-tools">\n                                        <span class="md-subhead">{{vm_ac.selectedOutboundRouteApps.length}} {{vm_ac.selectedOutboundRouteApps.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                        <div flex></div>\n                                        <md-button ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_ac.deleteSelectedOutboundRouteApps($event)" aria-label="delete selected" translate translate-attr-label="VOICE.DELETE_SELECTED">\n                                            <md-icon md-font-icon="icon-delete"></md-icon>\n                                        </md-button>\n                                    </div>\n                                </md-toolbar>\n\n                                \x3c!-- QUEUES TABLE --\x3e\n                                <md-table-container>\n                                    <table md-table md-row-select multiple ng-model="vm_ac.selectedOutboundRouteApps">\n                                        <thead md-head>\n                                            <tr md-row>\n                                                <th md-column width="10px"></th>\n                                                <th md-column>\n                                                    <span>Type</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Appdata</span>\n                                                </th>\n                                                <th md-column>\n                                                    <span>Interval</span>\n                                                </th>\n                                                <th md-column width="10px"></th>\n                                                <th md-column width="10px"></th>\n                                            </tr>\n                                        </thead>\n                                        <tbody md-body ng-sortable="vm_ac.applications">\n                                            <tr md-row md-select="app" md-select-id="id" ng-repeat="app in vm_ac.outboundrouteApps.rows | filter: vm_ac.query.filter">\n                                                <td md-cell>\n                                                    <md-icon md-font-icon="icon-drag-vertical" class="s16 handle"></md-icon>\n                                                </td>\n                                                <td md-cell ng-click="vm_ac.editOutboundRouteApp($event, $index)">{{app.app.toLowerCase() === \'agi\' ? \'Cally-Square\' : app.app | ucfirst}}<span ng-if="app.appType.toLowerCase() === \'custom\'">*</span></td>\n                                                <td md-cell ng-click="vm_ac.editOutboundRouteApp($event, $index)"><span class="text-truncate" style="width:200px">{{app.appdata}}</span></td>\n                                                <td md-cell ng-click="vm_ac.editInterval($event, $index)">{{app.IntervalId ? \'From List\' : app.interval}}</td>\n                                                <td md-cell>\n                                                    <md-button ng-click="vm_ac.editInterval($event, $index)" class="md-icon-button" aria-label="Interval">\n                                                        <md-icon md-font-icon="icon-timer"></md-icon>\n                                                        <md-tooltip>\n                                                            {{app.IntervalId ? \'From List\' : (app.interval === \'*,*,*,*\' ? \'Always\' : \'Custom\')}}\n                                                        </md-tooltip>\n                                                    </md-button>\n                                                </td>\n                                                <td md-cell class="actions">\n                                                    <md-menu>\n                                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                        </md-button>\n\n                                                        <md-menu-content width="3">\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editOutboundRouteApp($event, $index)" translate="VOICE.EDIT_APP">\n                                                                    Edit App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item>\n                                                                <md-button ng-click="vm_ac.editInterval($event, $index)" translate="VOICE.EDIT_INTERVAL">\n                                                                    Edit Interval\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                            <md-menu-item ng-if="vm_ac.currentUser.crudPermissions === 0 || vm_ac.currentUser.role === \'admin\'">\n                                                                <md-button ng-click="vm_ac.deleteConfirm(app, $index, $event)" translate="VOICE.DELETE_APP">\n                                                                    Delete App\n                                                                </md-button>\n                                                            </md-menu-item>\n                                                        </md-menu-content>\n                                                    </md-menu>\n                                                </td>\n                                            </tr>\n                                            <tr md-row ng-hide="vm_ac.outboundrouteApps.rows.length">\n                                                <td md-cell colspan="6">\n                                                    <span class="text-boxed-ligth" translate="VOICE.NO_APPS_AVAILABLE">No apps available</span>\n                                                </td>\n                                            </tr>\n                                        </tbody>\n                                        <tfoot md-foot>\n                                            <tr md-row>\n                                                <td md-cell colspan="6">\n                                                    <span><em translate="VOICE.LEGEND.CUSTOM_APPLICATION">(*) - Custom application.</em></span>\n                                                </td>\n                                            </tr>\n                                        </tfoot>\n                                    </table>\n                                </md-table-container>\n                                \x3c!-- / QUEUES TABLE --\x3e\n\n                                \x3c!-- NO RESULTS --\x3e\n\n                                \x3c!-- / NO RESULTS --\x3e\n                            </div>\n                            \x3c!-- / MAIN --\x3e\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/voice/views/outboundroutes/outboundroutes.html",'<div id="outboundroutes" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-phone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="VOICE.OUTBOUNDROUTES">OutboundRoutes</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="VOICE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedOutboundRoutes.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedOutboundRoutes =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="VOICE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-outboundroutes-count">\n                    <span>{{vm.selectedOutboundRoutes.length}}</span>\n                <span translate="VOICE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="OUTBOUNDROUTES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllOutboundRoutes()" translate="VOICE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectOutboundRoutes()" translate="VOICE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedOutboundRoutes" csv-label="true" filename="outboundroutes.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedOutboundRoutes($event)" aria-label="delete selected" translate translate-attr-label="OUTBOUNDROUTES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- OUTBOUNDROUTE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedOutboundRoutes" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getOutboundRoutes">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'VOICE.ID\' | translate }}</th>\n                                <th md-column md-order-by="exten">{{ \'VOICE.PHONENUMBER\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'VOICE.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.outboundroutes.rows.length">\n                                <td md-cell colspan="4">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="outboundroute" md-select-id="id" ng-repeat="outboundroute in vm.outboundroutes.rows">\n                                <td md-cell ng-if="outboundroute.userpic"><img class="avatar" alt="{{outboundroute.name}}" ng-src="api/users/{{outboundroute.id}}/avatar" /></td>\n                                <td md-cell ng-if="!outboundroute.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{outboundroute.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditOutboundRoute($event, outboundroute)" md-cell class="id ">{{outboundroute.id}}</td>\n                                <td ng-click="vm.createOrEditOutboundRoute($event, outboundroute)" md-cell class="exten ">{{outboundroute.exten}}</td>\n                                <td ng-click="vm.createOrEditOutboundRoute($event, outboundroute)" md-cell class="description ">{{outboundroute.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(outboundroute, $event)" translate="VOICE.EDIT_OUTBOUNDROUTE">\n                                                    Edit OutboundRoute\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(outboundroute, $event)" translate="VOICE.DELETE_OUTBOUNDROUTE">\n                                                    Delete OutboundRoute\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.outboundroutes.count}}" md-on-paginate="vm.getOutboundRoutes" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / OUTBOUNDROUTE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD OUTBOUNDROUTE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-outboundroute-button" ng-click="vm.createOrEditOutboundRoute($event)" aria-label="add outboundroute" translate translate-attr-aria-label="VOICE.ADD_OUTBOUNDROUTE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD OUTBOUNDROUTE BUTTON --\x3e\n</div>'),e.put("app/main/apps/voice/views/realtime/abandonedcalls/view.html",'<md-toolbar class="md-table-toolbar md-default table-header">\n    <div class="md-toolbar-tools" layout="row" layout-align="center center">\n        <span class="md-subhead" translate="DASHBOARDS.ABANDONEDQUEUECALLS">ABANDONED QUEUE CALLS</span>\n        <ms-search-bar on-search="vm.query.filter = query" on-collapse="vm.query.filter = undefined" debounce="300"></ms-search-bar>\n        <div flex></div>\n        <div class="padding-horizontal-20" layout="column" layout-align="center center">\n            <span class="font-size-10" translate="DASHBOARDS.SELECT_DATE">Select a date</span>\n            <div layout="row" layout-align="center center">\n                <md-button ng-if="vm.pickerModel.dateStart" ng-click="vm.clearAll()" class="md-icon-button no-padding width-20 height-20">\n                    <md-tooltip>{{ \'DASHBOARDS.DELETE\' | translate }}</md-tooltip>\n                    <md-icon md-font-icon="icon-close" class="s16 black-fg"></md-icon>\n                </md-button>\n                <md-date-range localization-map="vm.localizationMap" ng-model="vm.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm.getContacts()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n            </div>\n        </div>\n        <div class="padding-horizontal-20" layout="column">\n            <span class="font-size-10" translate="DASHBOARDS.SELECT_AGENT">Select an agent</span>\n            <md-select class="font-size-12 no-margin" ng-model="vm.query.lastAssignedTo" ng-change="vm.getContacts()">\n                <md-option ng-value="\'null\'" translate="DASHBOARDS.NOT_ASSIGNED"></md-option>\n                <md-option ng-value="undefined" translate="DASHBOARDS.ALL"></md-option>\n                <md-option ng-value="agent.name" ng-repeat="agent in vm.agents.rows">{{agent.name}}</md-option>\n            </md-select>\n        </div>\n        <div ng-if="vm.queues.count" layout="column">\n            <span class="font-size-10" translate="DASHBOARDS.SELECT_CAMPAIGN">Select a Campaign</span>\n            <md-select class="font-size-12 no-margin" ng-model="vm.query.queue" ng-change="vm.getContacts()">\n                <md-option ng-value="undefined" ng-if="vm.queues.count > 1"><em translate="DASHBOARDS.ALL">All</em></md-option>\n                <md-option ng-value="queue.name" ng-repeat="queue in vm.queues.rows">{{queue.name}}</md-option>\n            </md-select>\n        </div>\n        <md-button class="md-icon-button" ng-click="vm.refresh && vm.refreshContacts($event)" aria-label="refresh Contacts" translate translate-attr-label="DASHBOARDS.REFRESH_CONTACTS">\n            <md-icon md-font-icon="icon-reload"></md-icon>\n            <md-tooltip ng-if="vm.showTooltip" md-visible="vm.showTooltip">{{\'DASHBOARDS.CLICKRELOAD\' | translate}}</md-tooltip>\n        </md-button>\n    </div>\n</md-toolbar>\n<md-table-container>\n    <table md-table md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getContacts">\n            <tr md-row>\n                <th md-column md-order-by="id">ID</th>\n                <th md-column md-order-by="calleridname">{{\'DASHBOARDS.FULLNAME\' | translate}}</th>\n                <th md-column md-order-by="calleridnum">{{\'DASHBOARDS.PHONE\' | translate}}</th>\n                <th md-column md-order-by="queue">{{\'DASHBOARDS.QUEUE\' | translate}}</th>\n                <th md-column md-order-by="queuecallerabandonAt">{{\'DASHBOARDS.ABANDONAT\' | translate}}</th>\n                <th md-column md-order-by="lastAssignedTo">{{\'DASHBOARDS.LASTASSIGNEDTO\' | translate}}</th>\n                <th md-column md-order-by="disposition">{{\'DASHBOARDS.DISPOSITION\' | translate}}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.contacts.rows.length">\n                <td md-cell colspan="10">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row ng-repeat="contact in vm.contacts.rows">\n                <td md-cell class="id">{{contact.id}}</td>\n                <td md-cell class="firstName">{{contact.calleridname}}</td>\n                <td md-cell class="list">{{contact.calleridnum}}</td>\n                <td md-cell class="list">{{vm.queuesMap[contact.queue]}}</td>\n                <td md-cell class="list">{{contact.queuecallerabandonAt ? (contact.queuecallerabandonAt | formatdate) : undefined }}</td>\n                <td md-cell class="list">{{contact.lastAssignedTo}}</td>\n                <td md-cell class="list">{{contact.disposition}}</td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="DASHBOARDS.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="2">\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="DASHBOARDS.ASSIGNTO">Assigned a</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item ng-if="contact.lastAssignedTo">\n                                            <md-button ng-click="vm.assignedA(contact)"><em translate="DASHBOARDS.NONE">Not Assigned</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.agents.rows.length" ng-repeat="agent in vm.agents.rows">\n                                            <md-button ng-click="vm.assignedA(contact,agent)">{{agent.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="DASHBOARDS.DISPOSE">Dispose</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, null)"><em translate="DASHBOARDS.NONE">NONE</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'fax\')"><em translate="DASHBOARDS.FAX">FAX</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'Answer Machine\')"><em translate="DASHBOARDS.ANSWER_MACHINE">ANSWER_MACHINE</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'Interested\')"><em translate="DASHBOARDS.INTERESTED">INTERESTED</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'Not Interested\')"><em translate="DASHBOARDS.NOT_INTERESTED">NOT_INTERESTED</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'Sold\')"><em translate="DASHBOARDS.SOLD">SOLD</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item>\n                                            <md-button ng-click="vm.disposed(contact, \'Special\')"><em translate="DASHBOARDS.SPECIAL">SPECIAL</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.disposition.length" ng-repeat="disposition in vm.disposition">\n                                            <md-button ng-click="vm.disposed(contact, disposition.name)">{{disposition.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page" md-total="{{vm.contacts.count}}" md-on-paginate="vm.getContacts" md-page-select></md-table-pagination>'),e.put("app/main/apps/voice/views/realtime/agents/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="VOICE.AGENTS">Agents</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query; vm.onInit()" on-collapse="vm.query.filter = undefined; vm.onInit()" debounce="300"></ms-search-bar>\n        \x3c!-- <md-button class="md-icon-button" ng-click="vm.showInfo($event)">\n      <i class="icon-information-outline grey-600-fg">\n        <md-tooltip>{{\'VOICE.INFO\' | translate}}</md-tooltip>\n      </i>\n    </md-button> --\x3e\n        <md-select ng-model="vm.query.globalStatusFilter" class="md-caption" ng-change="vm.query.pauseTypeFilter = \'\'; vm.onInit()">\n            <md-option ng-value="\'\'">{{ \'VOICE.ALL\' | translate }}</md-option>\n            <md-option value="pause">{{ \'VOICE.PAUSE\' | translate }}</md-option>\n            <md-option value="*pause">{{ \'VOICE.PARTIALPAUSE\' | translate }}</md-option>\n            <md-option value="busy">{{ \'VOICE.BUSY\' | translate }}</md-option>\n            <md-option value="idle">{{ \'VOICE.IDLE\' | translate }}</md-option>\n        </md-select>\n\n        <md-select ng-if="vm.isPause(vm.query.globalStatusFilter)" ng-model="vm.query.pauseTypeFilter" class="md-caption" ng-change="vm.onInit()">\n            <md-option ng-value="\'\'">All</md-option>\n            <md-option value="DEFAULT PAUSE">DEFAULT PAUSE</md-option>\n            <md-option value="ACW">ACW</md-option>\n            <md-option value="LOGININPAUSE">LOGININPAUSE</md-option>\n            <md-option value="Auto-Pause">AUTOPAUSE</md-option>\n            <md-option ng-value="pause.name" ng-repeat="pause in vm.pauses.rows">{{pause.name}}</md-option>\n        </md-select>\n    </div>\n</md-toolbar>\n\n\x3c!-- AGENT TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.order" md-on-reorder="vm.onInit">\n            <tr md-row border="1">\n                <th class="bv text-center" colspan="3">{{ \'VOICE.AGENT\' | translate }}</th>\n                <th class="bv bl text-center" colspan="2">{{ \'VOICE.VOICE\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="bv bl text-center" colspan="2">{{ \'CHAT.CHAT\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="bv bl text-center" colspan="2">{{ \'MAIL.MAIL\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="bv bl text-center" colspan="2">{{ \'SMS.SMS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="bv bl text-center" colspan="2">{{ \'OPENCHANNEL.OPENCHANNEL\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="bv bl text-center" colspan="2">{{ \'FAX.FAX\' | translate }}</th>\n                <th width="10px" class="bt bl" rowspan="2"></th>\n                \x3c!-- <th md-column>{{ \'VOICE.PHONE_STATE\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PHONE_STATUS\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PAUSE\' | translate }}</th>\n                <th md-column width="10px"></th> --\x3e\n            </tr>\n            <tr md-row>\n                <th class="bl" md-column md-order-by="fullname">{{ \'VOICE.NAME\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatus">{{ \'VOICE.STATUS\' | translate }}</th>\n                <th class="bl custom-column" md-column md-order-by="globalStatusTime">{{ \'VOICE.TIMER\' | translate }}</th>\n\n                <th class="bl custom-column">{{ \'VOICE.STATUS\' | translate }}</th>\n                <th class="bl custom-column">Info</th>\n\n                <th ng-if="vm.license.chat" class="bl text-center">{{ \'CHAT.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.chat" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'CHAT.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.mail" class="bl text-center">{{ \'MAIL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.mail" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'MAIL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.messaging" class="bl text-center">{{ \'SMS.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.messaging" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'SMS.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.openchannel" class="bl text-center">{{ \'OPENCHANNEL.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.openchannel" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'OPENCHANNEL.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n\n                <th ng-if="vm.license.fax" class="bl text-center">{{ \'FAX.STATUS\' | translate }}</th>\n                <th ng-if="vm.license.fax" class="text-center">\n                    <md-icon md-font-icon="icon-battery-standard">\n                        <md-tooltip>{{ \'FAX.CAPACITY\' | translate }}</md-tooltip>\n                    </md-icon>\n                </th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.order.length">\n                <td md-cell colspan="17">\n                    <div layout="row" layout-align="center center">\n                        <span>{{ \'VOICE.NO_AGENT_ONLINE\' | translate }}</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-select="vm.agents[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td class="bt padding-5">\n                    <div layout="row" layout-align="start center">\n                        <img class="avatar" ng-src="{{vm.agents[value].userpic && \'api/users/\'+vm.agents[value].id+\'/avatar\' || \'assets/images/avatars/profile.png\'}}">\n                        <div layout="column">\n                            <span>{{vm.agents[value].fullname}}</span>\n                            <span>{{vm.agents[value].internal}}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt">\n                    <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'busy\':\'indigo-100-bg\',\'*pause\':\'amber-50-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].globalStatus]">{{ vm.isPause(vm.agents[value].globalStatus) ? \'\' : vm.agents[value].globalStatus | uppercase }} {{ vm.isPause(vm.agents[value].globalStatus) ? (vm.isPartialPause(vm.agents[value].globalStatus) ? \'*\'+vm.agents[value].pauseType || \'DEFAULT PAUSE\'  : vm.agents[value].pauseType || \'DEFAULT PAUSE\') : \'\'}}</span>\n                </td>\n                <td class="bt custom-column">\n                    <timer start-time="vm.agents[value].globalStatusTime" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                </td>\n                <td class="bt bl">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'talking\':\'indigo-100-bg\',\'ringing\':\'orange-400-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].voiceStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt bl">\n                    <div layout="column">\n                        <span ng-if="vm.agents[value].queue" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].queue }}</span>\n                        <span ng-if="vm.agents[value].destconnectedlinenum" class="padding-5" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{ vm.agents[value].destconnectedlinenum }}</span>\n                        <span class="padding-5" ng-if="vm.agents[value].queue || vm.agents[value].destconnectedlinenum">\n                            <timer start-time="vm.agents[value].voiceStatusTime" interval="1000" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].voiceStatus]">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                        </span>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt">--</td>\n                <td class="bt">--</td> --\x3e\n                <td class="bt bl" ng-if="vm.license.chat">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                \x3c!-- <td class="bt padding-5 text-center">{{ agent.chatCurrentCapacity }}/{{ agent.chatCapacity > 0 ? agent.chatCapacity : \'∞\' }}</td> --\x3e\n                <td md-number class="bt text-center font-size-20" ng-if="vm.license.chat" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].chatStatus]">{{ vm.agents[value].chatCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.mail">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.mail" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].mailStatus]">{{ vm.agents[value].mailCurrentCapacity }}</td>\n                <td class="bl bt" ng-if="vm.license.messaging">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">5</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">10</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.messaging" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].smsStatus]">{{ vm.agents[value].smsCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.openchannel">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">4</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">89</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.openchannel" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].openchannelStatus]">{{ vm.agents[value].openchannelCurrentCapacity }}</td>\n                <td class="bt bl" ng-if="vm.license.fax">\n                    <div layout="row">\n                        \x3c!-- <div class="column">\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-up-bold green-fg"></md-icon></span>\n                <span class="md-capture green-fg">7</span>\n              </div>\n              <div class="row">\n                <span><md-icon md-font-icon="icon-arrow-down-bold blue-fg"></md-icon></span>\n                <span class="md-capture blue-fg">2</span>\n              </div>\n            </div> --\x3e\n                        <div layout="column" layout-align="center center">\n                            <span class="text-boxed md-background-bg bl bt padding-5" ng-class="{\'idle\':\'lime-300-bg\',\'maxcapacity\':\'red-A200-bg\',\'working\':\'indigo-100-bg\',\'pause\':\'amber-200-bg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxStatus | uppercase }}</span>\n                        </div>\n                    </div>\n                </td>\n                <td class="bt padding-5 text-center font-size-20" ng-if="vm.license.fax" ng-class="{\'idle\':\'lime-300-fg\',\'maxcapacity\':\'red-A200-fg\',\'working\':\'indigo-100-fg\',\'pause\':\'amber-200-fg\'}[vm.agents[value].faxStatus]">{{ vm.agents[value].faxCurrentCapacity }}</td>\n                <td class="bl bt padding-5 text-center">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="4">\n                            <md-menu-item>\n                                <md-button ng-click="vm.logout(vm.agents[value], $event)" translate="VOICE.LOGOUT">\n                                    Logout\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.queueAdd(vm.agents[value], $event)" translate="VOICE.AGENTADD_QUEUE">\n                                    Add Agent In Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" class="text-capitalize" translate="VOICE.PAUSE">Pause</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item>\n                                            <md-button ng-disabled=" vm.agents[value].voicePause && \'DEFAULT PAUSE\' === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value])"><em translate="VOICE.DEFAULT_PAUSE">Default Pause</em></md-button>\n                                        </md-menu-item>\n                                        <md-menu-item ng-if="vm.pauses.rows.length" ng-repeat="pause in vm.pauses.rows">\n                                            <md-button ng-disabled="vm.agents[value].voicePause && pause.name === vm.agents[value].pauseType" ng-click="vm.pause(vm.agents[value], pause.name)">{{pause.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                            <md-menu-item ng-if="vm.isPause(vm.agents[value].globalStatus)">\n                                <md-button ng-click="vm.unPause(vm.agents[value])" translate="VOICE.UNPAUSE">\n                                    Unpause\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.filteredAgents.length}}" md-on-paginate="vm.onInit" md-page-select></md-table-pagination>\n\x3c!-- / AGENT TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/voice/views/realtime/outbound_calls/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="VOICE.OUTBOUND_CALLS">Ooutbound Calls</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- OUTBOUNDS TABLE --\x3e\n<md-table-container>\n    <table md-table>\n        <thead md-head>\n            <tr md-row>\n                <th md-column width="30px"></th>\n                <th md-column>{{ \'VOICE.SOURCE\' | translate }}</th>\n                <th md-column>{{ \'VOICE.DESTINATION\' | translate }}</th>\n                <th md-column>{{ \'VOICE.DURATION\' | translate }}</th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.calls.rows.length">\n                <td md-cell colspan="4">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row ng-repeat="call in vm.calls.rows | filter: vm.query.filter | limitTo: vm.query.limit: (vm.query.page - 1) * vm.query.limit">\n                <td md-cell>\n                    <i ng-class="vm.channelStatus[call.channelstatedesc.toLowerCase()]"></i>\n                </td>\n                <td md-cell>\n                    {{call.calleridname}}, {{call.calleridnum}} <span class="text-boxed" ng-if="call.answered"><timer ng-if="call.answertime" start-time="call.answertime" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer></span>\n                </td>\n                <td md-cell>{{call.exten}}</td>\n                <td md-cell>\n                    <span class="text-boxed" ng-if="call.channelstatedesc.toLowerCase() !== \'hangup\'">\n                      <timer ng-if="call.starttime" start-time="call.starttime" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                    </span>\n                    <span class="text-boxed" ng-if="call.channelstatedesc.toLowerCase() === \'hangup\'" translate="VOICE.CLOSING">Closing</span>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.calls.count}}"></md-table-pagination>\n\x3c!-- / OUTBOUNDS TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/voice/views/realtime/queue_calls/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="VOICE.QUEUE_CALLS">Queue Calls</span>\n        \x3c!-- <div flex></div>\n    <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar> --\x3e\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUES TABLE --\x3e\n<md-table-container>\n    <table md-table>\n        <thead md-head>\n            <tr md-row>\n                <th md-column width="30px"></th>\n                <th md-column>{{ \'VOICE.DID\' | translate }}</th>\n                <th md-column>{{ \'VOICE.QUEUE\' | translate }}</th>\n                <th md-column>{{ \'VOICE.CALLER\' | translate }}</th>\n                <th md-column>{{ \'VOICE.AGENT\' | translate }}</th>\n                <th md-column>{{ \'VOICE.DURATION\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.getSize(vm.rpcVoiceQueuesChannels)">\n                <td md-cell colspan="6">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row ng-repeat="(key, channel) in vm.rpcVoiceQueuesChannels | limitObjectFromTo: vm.queryChannels.limit:(vm.queryChannels.page - 1) * vm.queryChannels.limit">\n                <td md-cell>\n                    <md-icon ng-if="channel.queuecallerleaveAt" md-font-icon="icon-phone-in-talk green-fg"></md-icon>\n                    <md-icon ng-if="!channel.queuecallerleaveAt" md-font-icon="icon-phone-incoming md-accent"></md-icon>\n                </td>\n                <td md-cell>{{channel.exten}}</td>\n                <td md-cell>{{channel.queue}}</td>\n                <td md-cell>{{channel.calleridnum}}</td>\n                <td md-cell>\n                    <span ng-if="channel.queuecallerleaveAt">\n              {{channel.connectedlinename}}, {{channel.connectedlinenum}}\n              <span class="text-boxed">\n                <timer start-time="channel.queuecallerleaveAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n              </span>\n                    </span>\n                    <span ng-if="!channel.queuecallerleaveAt" class="text-boxed">\n              {{ \'VOICE.WAITING_FOR_AGENT\' | translate }}\n              <timer start-time="channel.queuecallerjoinAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n            </span>\n                </td>\n                <td md-cell>\n                    <span class="text-boxed">\n              <timer start-time="channel.queuecallerjoinAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n            </span>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="2">\n                            <md-menu-item>\n                                <md-button ng-click="vm.hangup(channel.uniqueid)" translate="VOICE.HANGUP">\n                                    Hangup\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.redirectToNumber($event, channel.uniqueid)" translate="VOICE.REDIRECT_TO_NUMBER">\n                                    Number\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-menu>\n                                    <md-button ng-click="$mdMenu.open()" translate="VOICE.REDIRECT_TO_AGENT">Redirect to Agent</md-button>\n                                    <md-menu-content>\n                                        <md-menu-item ng-repeat="agent in vm.agents.rows">\n                                            <md-button ng-click="vm.redirectToAgent(channel.uniqueid, agent.name)">{{agent.name}}</md-button>\n                                        </md-menu-item>\n                                    </md-menu-content>\n                                </md-menu>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n            \x3c!-- <tr md-row ng-repeat="call in vm.calls.rows | filter: vm.query.filter | limitTo: vm.query.limit: (vm.query.page - 1) * vm.query.limit">\n        <td md-cell>\n          <i ng-class="vm.channelStatusClass[call.status.toLowerCase()]"></i>\n        </td>\n        <td md-cell>{{call.exten}}</td>\n        <td md-cell>{{call.queue}}</td>\n        <td md-cell><span ng-if="call.calleridname">{{call.calleridname}}, </span>{{call.calleridnum}}</td>\n        <td md-cell>\n          <span ng-if="call.queuecallerleaveAt">\n            {{call.connectedlinename}}, {{call.connectedlinenum}}\n            <span class="text-boxed">\n              <timer start-time="call.queuecallerleaveAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n            </span>\n          </span>\n          <span ng-if="!call.queuecallerleaveAt" class="text-boxed" translate="VOICE.WAITING_FOR_AGENT">\n            Waiting for agent...\n            <span class="text-boxed">\n              <timer start-time="call.queuecallerjoinAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n            </span>\n          </span>\n        </td>\n        <td md-cell>\n          <span class="text-boxed">\n            <timer ng-if="call.queuecallerjoinAt" start-time="call.queuecallerjoinAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n            <span ng-if="call.queuecallercomplete || call.queuecallerabandon || call.queuecallerexit" translate="VOICE.CLOSING">Closing</span>\n          </span>\n        </td>\n        <td md-cell class="actions">\n          <md-menu>\n            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n              <md-icon md-font-icon="icon-dots-vertical" ></md-icon>\n            </md-button>\n\n            <md-menu-content width="2">\n              <md-menu-item>\n                <md-button ng-click="vm.hangup(call.uniqueid)" translate="VOICE.HANGUP">\n                  Hangup\n                </md-button>\n              </md-menu-item>\n              <md-menu-item>\n                <md-button ng-click="vm.redirectToNumber($event, call.uniqueid)" translate="VOICE.REDIRECT_TO_NUMBER">\n                  Number\n                </md-button>\n              </md-menu-item>\n              <md-menu-item>\n                <md-menu>\n                  <md-button ng-click="$mdMenu.open()" translate="VOICE.REDIRECT_TO_AGENT">Redirect to Agent</md-button>\n                  <md-menu-content>\n                    <md-menu-item ng-repeat="agent in vm.agents.rows">\n                      <md-button ng-click="vm.redirectToAgent(call.uniqueid, agent.name)">{{agent.name}}</md-button>\n                    </md-menu-item>\n                  </md-menu-content>\n                </md-menu>\n              </md-menu-item>\n            </md-menu-content>\n          </md-menu>\n        </td>\n      </tr> --\x3e\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.queryChannels.limit" md-page="vm.queryChannels.page" md-limit-options="[10, 15, 20, 50, 100, 250]"\n    md-total="{{vm.getSize(vm.rpcVoiceQueuesChannels)}}" md-page-select></md-table-pagination>\n\x3c!-- / QUEUES TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/voice/views/realtime/queue_params/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="MOTIONDIALER.QUEUE_PARAMETERS">Params</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUE TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getQueues">\n            <tr md-row>\n                <th md-column>{{\' VOICE.NAME\' | translate}}</th>\n                <th md-column>{{\' VOICE.TOTAL_OFFERED\' | translate}}</th>\n                <th md-column>{{\' VOICE.ANSWERED\' | translate}}</th>\n                <th md-column>{{\' VOICE.ABANDONED\' | translate}}</th>\n                <th md-column>{{\' VOICE.UNMANAGED\' | translate}}</th>\n                <th md-column>{{\' VOICE.AVG_HOLD_TIME\' | translate}}</th>\n                <th md-column>{{\' VOICE.AVG_DURATION\' | translate}}</th>\n                <th md-column>{{\' VOICE.AVG_BILLABLE\' | translate}}</th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.queues">\n                <td md-cell colspan="8">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="MOTIONDIALER.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row ng-repeat="(id, queue) in vm.queues">\n                <td md-cell>\n                    <span>{{queue.name}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{queue.total || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.answered || 0}} ({{(queue.total) ? (queue.answered || 0) * 100/queue.total : 0 | number:1}}%)</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{(queue.total - queue.answered - queue.unmanaged) || 0}} ({{(queue.total) ? ((queue.total - queue.answered - queue.unmanaged) || 0) * 100/queue.total : 0 | number:1}}%)</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.unmanaged || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.total ? (queue.sumHoldTime / queue.total) : 0 | number: 0 | secToTime | date:\'HH:mm:ss\'}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.total ? (queue.sumDuration / queue.total) : 0 | number: 0 | secToTime | date:\'HH:mm:ss\'}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{queue.answered ? ((queue.sumBillable || 0) / queue.answered) : 0 | number: 0 | secToTime | date:\'HH:mm:ss\'}}</span>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'MOTIONDIALER.PAGE\' | translate}}:\', rowsPerPage: \'{{\'MOTIONDIALER.ROWSPERPAGE\' | translate}}:\', of: \'{{\'MOTIONDIALER.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]"\n    md-page="vm.query.page" md-total="{{vm.count}}" md-on-paginate="vm.getQueues" md-page-select></md-table-pagination>\n\x3c!-- / QUEUE TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/voice/views/realtime/queues/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="VOICE.QUEUES">Queues</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n    </div>\n</md-toolbar>\n\n\x3c!-- QUEUE TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getQueues">\n            <tr md-row>\n                <th md-column md-order-by="name">{{ \'VOICE.NAME\' | translate }}</th>\n                <th md-column>{{ \'VOICE.LOGGED_IN\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PAUSED\' | translate }}</th>\n                <th md-column>{{ \'VOICE.READY\' | translate }}</th>\n                <th md-column>{{ \'VOICE.WAITING\' | translate }}</th>\n                <th md-column>{{ \'VOICE.TALKING\' | translate }}</th>\n                <th md-column width="10px"></th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.queues">\n                <td md-cell colspan="7">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row md-select="vm.queues[value]" md-select-id="id" ng-repeat="(id, value) in vm.order">\n                <td md-cell>{{vm.queues[value].name}}</td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].loggedInDb || 0}} ({{vm.queues[value].loggedIn || 0}})</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].paused || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{vm.queues[value].available || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-20 grey-fg">{{vm.queues[value].waiting || 0}}</span>\n                </td>\n                <td md-cell>\n                    <span class="font-size-16 grey-fg">{{(vm.queues[value].talking || 0) }}</span>\n                </td>\n                <td md-cell class="actions">\n                    <md-menu>\n                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                        </md-button>\n\n                        <md-menu-content width="3">\n                            <md-menu-item>\n                                <md-button ng-click="vm.createOrEditVoiceQueue($event, vm.queues[value])" translate="VOICE.EDIT_QUEUE">\n                                    Edit Queue\n                                </md-button>\n                            </md-menu-item>\n                            <md-menu-item>\n                                <md-button ng-click="vm.agentAdd($event, vm.queues[value])" translate="VOICE.AGENTSADD_QUEUE">\n                                    Add Agents to queue\n                                </md-button>\n                            </md-menu-item>\n                        </md-menu-content>\n                    </md-menu>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.count}}" md-on-paginate="vm.getQueues" md-page-select></md-table-pagination>\n\x3c!-- / QUEUE TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/voice/views/realtime/realtime.html",'<div id="realtime" class="page-layout simple tabbed" layout="column" ng-cloak>\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.AGENTS">Agents</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.TELEPHONES">Telephones</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.TRUNKS">Trunks</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.QUEUES">Queues</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.QUEUE_CALLS">Queue Calls</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.ABANDONEDCALLS">Abandoned Queue Calls</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.QUEUE_PARAMS">Queue Parameters</span>\n                </md-tab-label>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.OUTBOUND_CALLS">Outbound Calls</span>\n                </md-tab-label>\n            </md-tab>\n        </md-tabs>\n\n        <md-card ui-view></md-card>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n</div>'),e.put("app/main/apps/voice/views/realtime/telephones/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="VOICE.TELEPHONES">Telephones</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n        \x3c!-- <md-button class="md-icon-button" ng-click="vm.showInfo($event)">\n            <i class="icon-information-outline grey-600-fg">\n              <md-tooltip>{{\'VOICE.INFO\' | translate}}</md-tooltip>\n            </i>\n        </md-button> --\x3e\n    </div>\n</md-toolbar>\n\n\x3c!-- AGENT TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getTelephones">\n            <tr md-row>\n                <th md-column md-order-by="fullname">{{ \'VOICE.ACCOUNTNAME\' | translate }}</th>\n                <th md-column md-order-by="internal">{{ \'VOICE.INTERNAL\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PHONE_STATE\' | translate }}</th>\n                <th md-column>{{ \'VOICE.PHONE_STATUS\' | translate }}</th>\n            </tr>\n        </thead>\n        <tbody md-body>\n            <tr md-row ng-hide="vm.telephones">\n                <td md-cell colspan="4">\n                    <div layout="row" layout-align="center center">\n                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                    </div>\n                </td>\n            </tr>\n            <tr md-row md-select="telephone" md-select-id="id" ng-repeat="(id, telephone) in vm.telephones">\n                <td md-cell>{{telephone.fullname}}</td>\n                <td md-cell>{{telephone.internal}}</td>\n                <td md-cell>\n                    <i ng-class="vm.stateClass[telephone.state]">\n                    <md-tooltip>{{\'VOICE.\' + telephone.state | uppercase | translate}}</md-tooltip>\n                  </i>\n                </td>\n                <td md-cell>\n                    <i ng-class="vm.statusClass[telephone.status]">\n                    <md-tooltip>{{\'VOICE.\' + telephone.status | uppercase | translate}}</md-tooltip>\n                  </i>\n                    <span ng-if="telephone.status === \'registered\'" class="text-boxed">{{telephone.address}}</span>\n                </td>\n            </tr>\n        </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.count}}" md-on-paginate="vm.getTelephones" md-page-select></md-table-pagination>\n\x3c!-- / AGENT TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/voice/views/realtime/trunks/view.html",'\x3c!-- MAIN --\x3e\n<md-toolbar class="md-table-toolbar md-default">\n    <div class="md-toolbar-tools">\n        <span class="md-subhead" translate="VOICE.TRUNKS">Telephones</span>\n        <div flex></div>\n        <ms-search-bar on-search="vm.query.filter = query;" on-collapse="vm.query.filter = undefined;" debounce="300"></ms-search-bar>\n        \x3c!-- <md-button class="md-icon-button" ng-click="vm.showInfo($event)">\n      <i class="icon-information-outline grey-600-fg">\n        <md-tooltip>{{\'FAX.INFO\' | translate}}</md-tooltip>\n      </i>\n    </md-button> --\x3e\n    </div>\n</md-toolbar>\n\n\x3c!-- TRUNKS TABLE --\x3e\n<md-table-container>\n    <table md-table multiple md-progress="vm.promise">\n        <thead md-head>\n            <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getTrunks">\n                <tr md-row>\n                    <th md-column md-order-by="name">{{ \'VOICE.NAME\' | translate }}</th>\n                    <th md-column>{{ \'VOICE.TRUNK_STATUS\' | translate }}</th>\n                    <th md-column>{{ \'VOICE.REGISTRY\' | translate }}</th>\n                    <th md-column width="10px"></th>\n                </tr>\n            </thead>\n            <tbody md-body>\n                <tr md-row ng-hide="vm.trunks">\n                    <td md-cell colspan="3">\n                        <div layout="row" layout-align="center center">\n                            <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                        </div>\n                    </td>\n                </tr>\n                <tr md-row ng-repeat="(id, trunk) in vm.trunks">\n                    <td md-cell>{{trunk.name}}</td>\n                    <td md-cell>\n                        <i ng-class="vm.statusClass[trunk.status.toLowerCase()]">\n            <md-tooltip>{{\'VOICE.\' + trunk.status | uppercase | translate}}</md-tooltip>\n          </i>\n                        <span ng-if="trunk.status === \'registered\'" class="text-boxed">{{trunk.address}}</span>\n                    </td>\n                    <td md-cell>\n                        <i ng-if="trunk.registry" ng-class="(trunk.stateRegistry.toLowerCase() === \'registered\') ? \'green-300-fg icon-checkbox-marked-circle\' : \'red-300-fg icon-close-circle\'">\n            <md-tooltip>{{\'VOICE.\' + trunk.stateRegistry | uppercase | translate}}</md-tooltip>\n          </i>\n                        <span ng-if="trunk.registry && trunk.host && trunk.port" class="text-boxed">{{trunk.host}}:{{trunk.port}}</span>\n                        <span ng-if="!trunk.registry" translate="VOICE.NO_REGISTRY">\n            No Registry\n          </span>\n                    </td>\n                    <td md-cell class="actions">\n                        <md-menu>\n                            <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="STAFF.MORE" ng-click="$mdOpenMenu($event)">\n                                <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                            </md-button>\n\n                            <md-menu-content width="4">\n                                <md-menu-item>\n                                    <md-button ng-click="vm.goToTrunk($event, trunk)" translate="VOICE.EDIT_TRUNK">\n                                        Edit Trunk\n                                    </md-button>\n                                </md-menu-item>\n                            </md-menu-content>\n                        </md-menu>\n                    </td>\n                </tr>\n            </tbody>\n    </table>\n</md-table-container>\n\n<md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n    md-total="{{vm.count}}" md-on-paginate="vm.getTrunks" md-page-select></md-table-pagination>\n\x3c!-- / TRUNKS TABLE --\x3e\n\x3c!-- / MAIN --\x3e'),e.put("app/main/apps/voice/views/voicemails/create/dialog.html",'<md-dialog class="voicemail-dialog" aria-label="New Voicemail">\n    <form name="voicemailForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.FULLNAME">FullName</label>\n                <input type="text" name="fullname" ng-model="vm.voicemail.fullname" ng-required="true" autofocus>\n                <div ng-messages="voicemailForm[\'fullname\'].$error" ng-show="voicemailForm[\'fullname\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.FULLNAME_REQUIRED">FullName field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.EMAIL">Email</label>\n                <input type="email" name="email" ng-model="vm.voicemail.email" ng-required="vm.voicemail.attach === \'yes\'">\n                <div ng-messages="voicemailForm[\'email\'].$error" ng-show="voicemailForm[\'email\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                    </div>\n                    <div ng-message="email">\n                        <span translate="VOICE.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.PASSWORD">Password</label>\n                <input type="password" name="password" ng-model="vm.voicemail.password" placeholder="Password" translate translate-attr-placeholder="VOICE.PASSWORD" required>\n                <div ng-messages="voicemailForm[\'password\'].$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="VOICE.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block" ng-if="vm.newVoicemail ">\n                <label translate="VOICE.CONFIRM_PASSWORD">Confirm Password</label>\n                <input type="password" match-password="password" name="confirmPassword" ng-model="confirmPassword">\n                <div ng-messages="voicemailForm.confirmPassword.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.CONFIRM_REQUIRED">Confirm field is required</span>\n                    </div>\n                    <div ng-message="passwordMatch">\n                        <span translate="VOICE.ERRORS.CONFIRM_NOT_MATCH">Your password did not match</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <md-input-container class="md-block">\n                <label translate="VOICE.MAILBOX">MailBox</label>\n                <input type="text" name="mailbox" ng-model="vm.voicemail.mailbox" ng-required="true" ng-disabled="!vm.newVoicemail">\n                <div ng-messages="voicemailForm[\'mailbox\'].$error" ng-show="voicemailForm[\'mailbox\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.MAILBOX_REQUIRED">MailBox field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.ATTACH">Attach</label>\n                <md-select name="attach" ng-model="vm.voicemail.attach">\n\n                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                </md-select>\n                <div ng-messages="voicemailForm[\'attach\'].$error" ng-show="voicemailForm[\'attach\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.ATTACH_REQUIRED">Attach field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newVoicemail" ng-click="vm.saveVoicemail()" class="send-button md-accent md-raised" ng-disabled="voicemailForm.$invalid || voicemailForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newVoicemail" ng-click="vm.addNewVoicemail()" class="send-button md-accent md-raised" ng-disabled="voicemailForm.$invalid" aria-label="ADD" translate="VOICE.ADD_VOICEMAIL" translate-attr-aria-label="VOICE.ADD_VOICEMAIL">\n                    ADD VOICEMAIL\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newVoicemail" ng-click="vm.deleteVoicemail($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/voicemails/edit/view.html",'<div id="voice-voicemail" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-voicemails-button md-icon-button" aria-label="Go to voicemails" ng-click="vm.gotoVoicemails()" translate translate-attr-aria-label="VOICE.GO_TO_VOICEMAILS">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="voicemail-image" hide-xs>\n                    <img ng-src="assets/images/business/voicemails.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.voicemail.id}}\n                        <span ng-if="vm.voicemail.name">{{vm.voicemail.name}}</span>\n                        <span ng-if="vm.voicemail.exten">{{vm.voicemail.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="VOICE.CREATED_AT"></span> <span>{{vm.voicemail.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n        <div>\n            <md-button type="submit" ng-click="vm.saveVoicemail()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (advancedForm.$invalid) || (messagesForm.$invalid)" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="voicemail-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="VOICE.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.FULLNAME">FullName</label>\n                                <input type="text" name="fullname" ng-model="vm.voicemail.fullname" ng-required="true" autofocus>\n                                <div ng-messages="generalForm[\'fullname\'].$error" ng-show="generalForm[\'fullname\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.FULLNAME_REQUIRED">FullName field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.EMAIL">Email</label>\n                                <input type="email" name="email" ng-model="vm.voicemail.email" ng-required="vm.voicemail.attach === \'yes\'">\n                                <div ng-messages="generalForm[\'email\'].$error" ng-show="generalForm[\'email\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.EMAIL_REQUIRED">Email field is required</span>\n                                    </div>\n                                    <div ng-message="email">\n                                        <span translate="VOICE.ERRORS.EMAIL_MUST_VALID">Email must be a valid e-mail address</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.PASSWORD">Password</label>\n                                <input type="password" name="password" ng-model="vm.voicemail.password" placeholder="Password" translate translate-attr-placeholder="VOICE.PASSWORD" required>\n                                <div ng-messages="generalForm[\'password\'].$error" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="VOICE.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <md-input-container class="md-block" ng-if="vm.newVoicemail ">\n                                <label translate="VOICE.CONFIRM_PASSWORD">Confirm Password</label>\n                                <input type="password" match-password="password" name="confirmPassword" ng-model="confirmPassword">\n                                <div ng-messages="generalForm.confirmPassword.$error" role="alert" multiple>\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.CONFIRM_REQUIRED">Confirm field is required</span>\n                                    </div>\n                                    <div ng-message="passwordMatch">\n                                        <span translate="VOICE.ERRORS.CONFIRM_NOT_MATCH">Your password did not match</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MAILBOX">MailBox</label>\n                                <input type="text" name="mailbox" ng-model="vm.voicemail.mailbox" ng-required="true" ng-disabled="true">\n                                <div ng-messages="generalForm[\'mailbox\'].$error" ng-show="generalForm[\'mailbox\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MAILBOX_REQUIRED">MailBox field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.VOICEMAIL_CONTEXT">Voicemail_Context</label>\n                                <md-select name="context" ng-model="vm.voicemail.context" required>\n                                    <md-option ng-value="context.name" ng-repeat="context in vm.contexts">{{ context.name }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.VOICEMAIL_CONTEXT"></span></div>\n                                <div ng-messages="generalForm[\'context\'].$error" ng-show="generalForm[\'context\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.VOICEMAIL_CONTEXT_REQUIRED">Voicemail_Context field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.ADVANCED">ADVANCED</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="voicemail-detail-form-container advanced md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="VOICE.ADVANCED">ADVANCED</div>\n                        </div>\n                        <form name="advancedForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.TIMEZONE">TimeZone</label>\n                                <input type="text" name="tz" ng-model="vm.voicemail.tz" ng-required="true" autofocus>\n                                <div ng-messages="advancedForm[\'tz\'].$error" ng-show="advancedForm[\'tz\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.TIMEZONE_REQUIRED">TimeZone field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.ATTACH">Attach</label>\n                                <md-select name="attach" ng-model="vm.voicemail.attach">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="advancedForm[\'attach\'].$error" ng-show="advancedForm[\'attach\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.ATTACH_REQUIRED">Attach field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.ENVELOPE">Envelope</label>\n                                <md-select name="envelope" ng-model="vm.voicemail.envelope">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="advancedForm[\'envelope\'].$error" ng-show="advancedForm[\'envelope\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.ENVELOPE_REQUIRED">Envelope field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.DELETE">Delete</label>\n                                <md-select name="delete" ng-model="vm.voicemail.delete">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div ng-messages="advancedForm[\'delete\'].$error" ng-show="advancedForm[\'delete\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.DELETE_REQUIRED">Delete field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.EMAILBODY">EmailBody</label>\n                                <input type="text" name="emailbody" ng-model="vm.voicemail.emailbody">\n                                <div ng-messages="advancedForm[\'emailbody\'].$error" ng-show="advancedForm[\'emailbody\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.EMAILBODY_REQUIRED">EmailBody field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.EMAILSUBJECT">EmailSubject</label>\n                                <input type="text" name="emailsubject" ng-model="vm.voicemail.emailsubject">\n                                <div ng-messages="advancedForm[\'emailsubject\'].$error" ng-show="advancedForm[\'emailsubject\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.EMAILSUBJECT_REQUIRED">EmailSubject field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MAXSECONDS">MaxSeconds</label>\n                                <input type="number" name="maxsecs" ng-model="vm.voicemail.maxsecs" min="0">\n                                <div ng-messages="advancedForm[\'maxsecs\'].$error" ng-show="advancedForm[\'maxsecs\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MAXSECONDS_REQUIRED">MaxSeconds field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.MAXSECONDS_MUST_BE_GREATER_THAN_OR_EQUAL_TO">MaxSeconds must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MAXMESSAGES">MaxMessages</label>\n                                <input type="number" name="maxmsg" ng-model="vm.voicemail.maxmsg" min="0" max="9999">\n                                <div ng-messages="advancedForm[\'maxmsg\'].$error" ng-show="advancedForm[\'maxmsg\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MAXMESSAGES_REQUIRED">MaxMessages field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.MAXMESSAGES_MUST_BE_GREATER_THAN_OR_EQUAL_TO">MaxMessages must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                    <div ng-message="max">\n                                        <span translate="VOICE.ERRORS.MAXMESSAGES_MUST_BE_LESS_THAN_OR_EQUAL_TO">MaxMessages must be a valid greater or equal than</span> <span>9999</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.MESSAGES">MESSAGES</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="voicemail-detail-form-container messages md-background-bg md-whiteframe-1dp">\n                        <div ng-controller="VoicemailMessagesController as vm_dc" ng-init="vm_dc.init(vm.voicemail)">\n                            <md-toolbar class="md-table-toolbar md-default" ng-hide="vm_dc.selectedVoicemailMessages.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead" translate="VOICE.MESSAGES">Messages</span>\n                                    <div flex></div>\n                                    <ms-search-bar on-search="vm_dc.query.filter = query" on-collapse="vm_dc.query.filter = undefined" debounce="300"></ms-search-bar>\n                                </div>\n                            </md-toolbar>\n                            <md-toolbar class="md-table-toolbar md-accent" ng-show="vm_dc.selectedVoicemailMessages.length">\n                                <div class="md-toolbar-tools">\n                                    <span class="md-subhead">{{vm_dc.selectedVoicemailMessages.length}} {{vm_dc.selectedVoicemailMessages.length > 1 ? \'items\' : \'item\'}} selected</span>\n                                    <div flex></div>\n                                    <button class="md-icon-button" ng-csv="vm_dc.exportSelectedVoicemailMessages" csv-label="true" filename="voicemails.csv">\n            <md-icon md-font-icon="icon-file-excel"></md-icon>\n        </button>\n                                    <md-button ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'" class="md-icon-button" ng-click="vm_dc.deleteSelectedVoicemailMessages($event)" aria-label="delete selected" translate translate-attr-label="VOICEMAILS.DELETE_SELECTED">\n                                        <md-icon md-font-icon="icon-delete"></md-icon>\n                                    </md-button>\n                                </div>\n                            </md-toolbar>\n                            <md-table-container>\n                                <table md-table md-row-select multiple ng-model="vm_dc.selectedVoicemailMessages" md-progress="vm_dc.promise">\n                                    <thead md-head md-order="vm_dc.query.sort" md-on-reorder="vm_dc.getVoicemailMessages">\n                                        <tr md-row>\n                                            <th md-column md-order-by="id">{{ \'VOICE.ID\' | translate }}</th>\n                                            <th md-column md-order-by="callerid">{{ \'VOICE.CALLER_ID\' | translate }}</th>\n                                            <th md-column md-order-by="duration">{{ \'VOICE.DURATION\' | translate }}</th>\n                                            <th md-column md-order-by="audio">{{ \'VOICE.AUDIO\' | translate }}</th>\n                                            <th md-column md-order-by="stamp">{{ \'VOICE.RECEIVED_AT\' | translate }}</th>\n                                            <th md-column width="10px"></th>\n                                        </tr>\n                                    </thead>\n                                    <tbody md-body>\n                                        <tr md-row md-select="message" md-select-id="id" ng-repeat="message in vm_dc.voicemailMessages.rows">\n                                            <td md-cell>{{message.id}}</td>\n                                            <td md-cell>{{message.callerid}}</td>\n                                            <td md-cell>{{message.duration}}</td>\n                                            <td md-cell>\n                                                \x3c!-- audio recording directive --\x3e\n                                                <ms-recording id="message.id" model="\'voiceMailMessage\'"></ms-recording>\n                                                \x3c!-- / audio recording directive --\x3e\n                                            </td>\n                                            <td md-cell>{{message.stamp | date:\'medium\'}}</td>\n                                            <td md-cell class="actions">\n                                                <md-menu>\n                                                    <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                                        <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                                    </md-button>\n\n                                                    <md-menu-content width="3">\n                                                        <md-menu-item>\n                                                            <md-button class="md-primary" ng-click="vm_dc.voiceMailMessageDownload(message, $event)" translate="VOICE.DOWNLOAD_MESSAGE">\n                                                                Download Message\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                        <md-menu-item ng-if="vm_dc.currentUser.crudPermissions === 0 || vm_dc.currentUser.role === \'admin\'">\n                                                            <md-button ng-click="vm_dc.deleteConfirm(message, $event)" translate="VOICE.DELETE_MESSAGE">\n                                                                Delete Message\n                                                            </md-button>\n                                                        </md-menu-item>\n                                                    </md-menu-content>\n                                                </md-menu>\n                                            </td>\n                                        </tr>\n                                        <tr md-row ng-if="!vm_dc.voicemailMessages.rows.length">\n                                            <td md-cell colspan="8">\n                                                <span class="text-boxed-ligth" translate="VOICE.NO_MESSAGE_AVAILABLE">No message available</span>\n                                            </td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                            </md-table-container>\n                            <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm_dc.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm_dc.query.page"\n                                md-total="{{vm_dc.voicemailMessages.count}}" md-on-paginate="vm_dc.getVoicemailMessages" md-page-select></md-table-pagination>\n                        </div>\n\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/voice/views/voicemails/voicemails.html",'<div id="voicemails" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-phone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="VOICE.VOICEMAILS">Voicemails</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="VOICE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedVoicemails.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedVoicemails =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="VOICE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-voicemails-count">\n                    <span>{{vm.selectedVoicemails.length}}</span>\n                <span translate="VOICE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="VOICEMAILS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllVoicemails()" translate="VOICE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectVoicemails()" translate="VOICE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedVoicemails" csv-label="true" filename="voicemails.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedVoicemails($event)" aria-label="delete selected" translate translate-attr-label="VOICEMAILS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- VOICEMAIL TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedVoicemails" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getVoicemails">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'VOICE.ID\' | translate }}</th>\n                                <th md-column md-order-by="fullname">{{ \'VOICE.FULLNAME\' | translate }}</th>\n                                <th md-column md-order-by="email">{{ \'VOICE.EMAIL\' | translate }}</th>\n                                <th md-column md-order-by="mailbox">{{ \'VOICE.MAILBOX\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.voicemails.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="voicemail" md-select-id="id" ng-repeat="voicemail in vm.voicemails.rows">\n                                <td md-cell ng-if="voicemail.userpic"><img class="avatar" alt="{{voicemail.name}}" ng-src="api/users/{{voicemail.id}}/avatar" /></td>\n                                <td md-cell ng-if="!voicemail.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{voicemail.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditVoicemail($event, voicemail)" md-cell class="id ">{{voicemail.id}}</td>\n                                <td ng-click="vm.createOrEditVoicemail($event, voicemail)" md-cell class="fullname ">{{voicemail.fullname}}</td>\n                                <td ng-click="vm.createOrEditVoicemail($event, voicemail)" md-cell class="email ">{{voicemail.email}}</td>\n                                <td ng-click="vm.createOrEditVoicemail($event, voicemail)" md-cell class="mailbox ">{{voicemail.mailbox}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(voicemail, $event)" translate="VOICE.EDIT_VOICEMAIL">\n                                                    Edit Voicemail\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(voicemail, $event)" translate="VOICE.DELETE_VOICEMAIL">\n                                                    Delete Voicemail\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.voicemails.count}}" md-on-paginate="vm.getVoicemails" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / VOICEMAIL TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD VOICEMAIL BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-voicemail-button" ng-click="vm.createOrEditVoicemail($event)" aria-label="add voicemail" translate translate-attr-aria-label="VOICE.ADD_VOICEMAIL">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD VOICEMAIL BUTTON --\x3e\n</div>'),e.put("app/main/apps/voice/views/voiceQueues/create/dialog.html",'<md-dialog class="voiceQueue-dialog" aria-label="New VoiceQueue">\n    <form name="voiceQueueForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.voiceQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="!vm.newVoiceQueue">\n                <div class="hint"><span translate="VOICE.HELP.NAME"></span></div>\n                <div ng-messages="voiceQueueForm[\'name\'].$error" ng-show="voiceQueueForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="VOICE.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.STRATEGY">Strategy</label>\n                <md-select name="strategy" ng-model="vm.voiceQueue.strategy" required>\n                    <md-option ng-value="\'ringall\'">Ringall</md-option>\n                    <md-option ng-value="\'rrmemory\'">Round Robin Memory</md-option>\n                    <md-option ng-value="\'leastrecent\'">Least Recent</md-option>\n                    <md-option ng-value="\'fewestcalls\'">Fewest Calls</md-option>\n                    <md-option ng-value="\'random\'">Random</md-option>\n                    <md-option ng-value="\'linear\'">Linear</md-option>\n                    <md-option ng-value="\'wrandom\'">Weight Random</md-option>\n                </md-select>\n                <div ng-messages="voiceQueueForm[\'strategy\'].$error" ng-show="voiceQueueForm[\'strategy\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="VOICE.DESCRIPTION">Description</label>\n                <input type="text" name="description" ng-model="vm.voiceQueue.description">\n                <div ng-messages="voiceQueueForm[\'description\'].$error" ng-show="voiceQueueForm[\'description\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                    </div>\n\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newVoiceQueue" ng-click="vm.saveVoiceQueue()" class="send-button md-accent md-raised" ng-disabled="voiceQueueForm.$invalid || voiceQueueForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newVoiceQueue" ng-click="vm.addNewVoiceQueue()" class="send-button md-accent md-raised" ng-disabled="voiceQueueForm.$invalid" aria-label="ADD" translate="VOICE.ADD_VOICEQUEUE" translate-attr-aria-label="VOICE.ADD_VOICEQUEUE">\n                    ADD VOICEQUEUE\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newVoiceQueue" ng-click="vm.deleteVoiceQueue($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/voiceQueues/edit/agentadd/agentadd.html",'<md-dialog class="voiceQueue-dialog" aria-label="voiceQueue">\n    <form name="voiceQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="VOICE.AGENTADD_VOICEQUEUE">Add Agent to voiceQueue</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <md-input-container flex class="no-margin">\n                <label translate="VOICE.PENALTY">Penalty</label>\n                <input name="penalty" ng-model="vm.penalty" placeholder="0" required md-minlength="0" md-maxlength="3">\n                <div ng-messages="voiceQueueForm.penalty.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span>You must supply a penalty.</span>\n                    </div>\n                    <div ng-message="md-minlength">\n                        <span>Min Penalty 0 characters.</span>\n                    </div>\n                    <div ng-message="md-maxlength">\n                        <span>Max Penalty 3 characters.</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/voiceQueues/edit/teamadd/teamadd.html",'<md-dialog class="voiceQueue-dialog" aria-label="voiceQueue">\n    <form name="voiceQueueForm" ng-cloak>\n        <md-toolbar>\n            <div class="md-toolbar-tools">\n                <h2 translate="VOICE.TEAMADD_VOICEQUEUE">Add Team in VOICEQUEUE</h2>\n                <span flex></span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content>\n            <md-input-container flex class="no-margin">\n                <label translate="VOICE.PENALTY">Penalty</label>\n                <input name="penalty" ng-model="vm.penalty" placeholder="0" required md-minlength="0" md-maxlength="3">\n                <div ng-messages="voiceQueueForm.penalty.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span>You must supply a penalty.</span>\n                    </div>\n                    <div ng-message="md-minlength">\n                        <span>Min Penalty 0 characters.</span>\n                    </div>\n                    <div ng-message="md-maxlength">\n                        <span>Max Penalty 3 characters.</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <ms-dual-multiselect options="vm.dualMultiselectOptions"></ms-dual-multiselect>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/voiceQueues/edit/view.html",'<div id="voice-voiceQueue" class="page-layout simple tabbed" layout="column">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="start center">\n        <div class="white-fg" layout="row" layout-align="start center" flex>\n            <md-button class="goto-voiceQueues-button md-icon-button" aria-label="Go to voiceQueues" ng-click="vm.gotoVoiceQueues()" translate translate-attr-aria-label="VOICE.GO_TO_VOICEQUEUES">\n                <md-icon md-font-icon="icon-arrow-left"></md-icon>\n            </md-button>\n\n            <div layout="row" layout-align="start center">\n\n                <div class="voiceQueue-image" hide-xs>\n                    <img ng-src="assets/images/business/voiceQueues.jpg">\n                </div>\n\n                <div layout="column" layout-align="start start">\n                    <div class="h2">\n                        #{{vm.voiceQueue.id}}\n                        <span ng-if="vm.voiceQueue.name">{{vm.voiceQueue.name}}</span>\n                        <span ng-if="vm.voiceQueue.exten">{{vm.voiceQueue.exten}}</span>\n                    </div>\n                    <div class="subtitle secondary-text">\n                        <span translate="VOICE.CREATED_AT"></span> <span>{{vm.voiceQueue.createdAt | date:\'medium\'}}</span>\n                    </div>\n                </div>\n            </div>\n        </div>\n\n\n        <div ng-cloak>\n            <md-button ng-click="vm.teamadddialog(vm.voiceQueue, $event)" class="md-fab md-orange-500-bg md-icon-button" aria-label="teamadd">\n                <md-tooltip><span translate="VOICE.TEAMADD_VOICEQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-multiple-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.agentadddialog(vm.voiceQueue, $event)" class="md-fab md-purple-500-bg md-icon-button" aria-label="agentadd">\n                <md-tooltip><span translate="VOICE.AGENTADD_VOICEQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-account-plus"></md-icon>\n            </md-button>\n        </div>\n\n        <div ng-cloak>\n            <md-button ng-click="vm.gotogoto(vm.voiceQueue, $event)" class="md-fab md-warn md-icon-button" aria-label="goto">\n                <md-tooltip><span translate="VOICE.GOTO_VOICEQUEUE"></span></md-tooltip>\n                <md-icon md-font-icon="icon-cast"></md-icon>\n            </md-button>\n        </div>\n        <div>\n            <md-button type="submit" ng-click="vm.saveVoiceQueue()" class="send-button md-accent md-raised" ng-disabled="(generalForm.$invalid) || (settingsForm.$invalid) || (announcementsForm.$invalid) || (advancedForm.$invalid)" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                SAVE\n            </md-button>\n        </div>\n\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content">\n\n        <md-tabs md-selected="vm.selectedTab" md-stretch-tabs="always" flex layout-fill md-dynamic-height>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.SETTINGS">SETTINGS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="voiceQueue-detail-form-container general md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="VOICE.GENERAL">GENERAL</div>\n                        </div>\n                        <form name="generalForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.NAME">Name</label>\n                                <input type="text" name="name" ng-model="vm.voiceQueue.name" ng-pattern="/^[A-Za-z0-9\\.\\_]+$/i" ng-required="true" autofocus ng-disabled="true">\n                                <div class="hint"><span translate="VOICE.HELP.NAME"></span></div>\n                                <div ng-messages="generalForm[\'name\'].$error" ng-show="generalForm[\'name\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.NAME_REQUIRED">Name field is required</span>\n                                    </div>\n                                    <div ng-message="pattern">\n                                        <span translate="VOICE.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.STRATEGY">Strategy</label>\n                                <md-select name="strategy" ng-model="vm.voiceQueue.strategy" required>\n                                    <md-option ng-value="\'ringall\'">Ringall</md-option>\n                                    <md-option ng-value="\'rrmemory\'">Round Robin Memory</md-option>\n                                    <md-option ng-value="\'leastrecent\'">Least Recent</md-option>\n                                    <md-option ng-value="\'fewestcalls\'">Fewest Calls</md-option>\n                                    <md-option ng-value="\'random\'">Random</md-option>\n                                    <md-option ng-value="\'linear\'">Linear</md-option>\n                                    <md-option ng-value="\'wrandom\'">Weight Random</md-option>\n                                </md-select>\n                                <div ng-messages="generalForm[\'strategy\'].$error" ng-show="generalForm[\'strategy\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.TIMEOUT">Timeout</label>\n                                <input type="number" name="timeout" ng-model="vm.voiceQueue.timeout" min="0" ng-required="true">\n                                <div class="hint"><span translate="VOICE.HELP.TIMEOUT"></span></div>\n                                <div ng-messages="generalForm[\'timeout\'].$error" ng-show="generalForm[\'timeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED">Timeout field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Timeout must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MAXLENGTH">MaxLength</label>\n                                <input type="number" name="maxlen" ng-model="vm.voiceQueue.maxlen" min="0">\n                                <div class="hint"><span translate="VOICE.HELP.MAXLENGTH"></span></div>\n                                <div ng-messages="generalForm[\'maxlen\'].$error" ng-show="generalForm[\'maxlen\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MAXLENGTH_REQUIRED">MaxLength field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.MAXLENGTH_MUST_BE_GREATER_THAN_OR_EQUAL_TO">MaxLength must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.RETRY">Retry</label>\n                                <input type="number" name="retry" ng-model="vm.voiceQueue.retry" min="0">\n                                <div class="hint"><span translate="VOICE.HELP.RETRY"></span></div>\n                                <div ng-messages="generalForm[\'retry\'].$error" ng-show="generalForm[\'retry\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.RETRY_REQUIRED">Retry field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.RETRY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Retry must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.WRAPUPTIME">WrapupTime</label>\n                                <input type="number" name="wrapuptime" ng-model="vm.voiceQueue.wrapuptime" min="0">\n                                <div class="hint"><span translate="VOICE.HELP.WRAPUPTIME"></span></div>\n                                <div ng-messages="generalForm[\'wrapuptime\'].$error" ng-show="generalForm[\'wrapuptime\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.WRAPUPTIME_REQUIRED">WrapupTime field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.WRAPUPTIME_MUST_BE_GREATER_THAN_OR_EQUAL_TO">WrapupTime must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.WEIGHT">Weight</label>\n                                <input type="number" name="weight" ng-model="vm.voiceQueue.weight" min="0">\n                                <div class="hint"><span translate="VOICE.HELP.WEIGHT"></span></div>\n                                <div ng-messages="generalForm[\'weight\'].$error" ng-show="generalForm[\'weight\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.WEIGHT_REQUIRED">Weight field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.WEIGHT_MUST_BE_GREATER_THAN_OR_EQUAL_TO">Weight must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.JOINWHENEMPTY">JoinWhenEmpty</label>\n                                <md-select name="joinempty" ng-model="vm.voiceQueue.joinempty" multiple>\n                                    <md-option ng-value="\'no\'">no</md-option>\n                                    <md-option ng-value="\'yes\'">yes</md-option>\n                                    <md-option ng-value="\'strict\'">strict</md-option>\n                                    <md-option ng-value="\'loose\'">loose</md-option>\n                                    <md-option ng-value="\'paused\'">paused</md-option>\n                                    <md-option ng-value="\'penalty\'">penalty</md-option>\n                                    <md-option ng-value="\'inuse\'">inuse</md-option>\n                                    <md-option ng-value="\'ringing\'">ringing</md-option>\n                                    <md-option ng-value="\'unavailable\'">unavailable</md-option>\n                                    <md-option ng-value="\'invalid\'">invalid</md-option>\n                                    <md-option ng-value="\'unknown\'">unknoww</md-option>\n                                    <md-option ng-value="\'wrapup\'">wrapup</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.JOINWHENEMPTY"></span></div>\n                                <div ng-messages="generalForm[\'joinempty\'].$error" ng-show="generalForm[\'joinempty\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.JOINWHENEMPTY_REQUIRED">JoinWhenEmpty field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.LEAVEWHENEMPTY">LeaveWhenEmpty</label>\n                                <md-select name="leavewhenempty" ng-model="vm.voiceQueue.leavewhenempty" multiple>\n                                    <md-option ng-value="\'no\'">no</md-option>\n                                    <md-option ng-value="\'yes\'">yes</md-option>\n                                    <md-option ng-value="\'strict\'">strict</md-option>\n                                    <md-option ng-value="\'loose\'">loose</md-option>\n                                    <md-option ng-value="\'paused\'">paused</md-option>\n                                    <md-option ng-value="\'penalty\'">penalty</md-option>\n                                    <md-option ng-value="\'inuse\'">inuse</md-option>\n                                    <md-option ng-value="\'ringing\'">ringing</md-option>\n                                    <md-option ng-value="\'unavailable\'">unavailable</md-option>\n                                    <md-option ng-value="\'invalid\'">invalid</md-option>\n                                    <md-option ng-value="\'unknown\'">unknoww</md-option>\n                                    <md-option ng-value="\'wrapup\'">wrapup</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.LEAVEWHENEMPTY"></span></div>\n                                <div ng-messages="generalForm[\'leavewhenempty\'].$error" ng-show="generalForm[\'leavewhenempty\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.LEAVEWHENEMPTY_REQUIRED">LeaveWhenEmpty field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MUSICONHOLD">MusicOnHold</label>\n                                <md-select name="musiconhold" ng-model="vm.voiceQueue.musiconhold">\n                                    <md-option ng-value="musiconhold.name" ng-repeat="musiconhold in vm.musiconholds">{{ musiconhold.name }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.MUSICONHOLD"></span></div>\n                                <div ng-messages="generalForm[\'musiconhold\'].$error" ng-show="generalForm[\'musiconhold\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MUSICONHOLD_REQUIRED">MusicOnHold field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.ANNOUNCETOAGENT">AnnounceToAgent</label>\n                                <md-select name="announce" ng-model="vm.voiceQueue.announce">\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + announce.save_name" ng-repeat="announce in vm.sounds">{{ announce.name }}</md-option>\n                                    <md-option ng-value="\'FALSE\'">None</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.ANNOUNCETOAGENT"></span></div>\n                                <div ng-messages="generalForm[\'announce\'].$error" ng-show="generalForm[\'announce\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.ANNOUNCETOAGENT_REQUIRED">AnnounceToAgent field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.DESCRIPTION">Description</label>\n                                <input type="text" name="description" ng-model="vm.voiceQueue.description">\n                                <div ng-messages="generalForm[\'description\'].$error" ng-show="generalForm[\'description\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.ANNOUNCEMENTS">ANNOUNCEMENTS</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="voiceQueue-detail-form-container settings md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="VOICE.SETTINGS">SETTINGS</div>\n                        </div>\n                        <form name="settingsForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.ANNOUNCEFREQUENCY">AnnounceFrequency</label>\n                                <input type="number" name="announce_frequency" ng-model="vm.voiceQueue.announce_frequency" min="0" autofocus>\n                                <div class="hint"><span translate="VOICE.HELP.ANNOUNCEFREQUENCY"></span></div>\n                                <div ng-messages="settingsForm[\'announce_frequency\'].$error" ng-show="settingsForm[\'announce_frequency\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.ANNOUNCEFREQUENCY_REQUIRED">AnnounceFrequency field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.ANNOUNCEFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AnnounceFrequency must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MINANNOUNCEFREQUENCY">MinAnnounceFrequency</label>\n                                <input type="number" name="min_announce_frequency" ng-model="vm.voiceQueue.min_announce_frequency" min="0">\n                                <div class="hint"><span translate="VOICE.HELP.MINANNOUNCEFREQUENCY"></span></div>\n                                <div ng-messages="settingsForm[\'min_announce_frequency\'].$error" ng-show="settingsForm[\'min_announce_frequency\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MINANNOUNCEFREQUENCY_REQUIRED">MinAnnounceFrequency field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.MINANNOUNCEFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">MinAnnounceFrequency must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.PERIODICANNOUNCEFREQUENCY">PeriodicAnnounceFrequency</label>\n                                <input type="number" name="periodic_announce_frequency" ng-model="vm.voiceQueue.periodic_announce_frequency" min="0">\n                                <div class="hint"><span translate="VOICE.HELP.PERIODICANNOUNCEFREQUENCY"></span></div>\n                                <div ng-messages="settingsForm[\'periodic_announce_frequency\'].$error" ng-show="settingsForm[\'periodic_announce_frequency\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.PERIODICANNOUNCEFREQUENCY_REQUIRED">PeriodicAnnounceFrequency field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.PERIODICANNOUNCEFREQUENCY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">PeriodicAnnounceFrequency must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.RANDOMPERIODICANNOUNCE">RandomPeriodicAnnounce</label>\n                                <md-select name="random_periodic_announce" ng-model="vm.voiceQueue.random_periodic_announce">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.RANDOMPERIODICANNOUNCE"></span></div>\n                                <div ng-messages="settingsForm[\'random_periodic_announce\'].$error" ng-show="settingsForm[\'random_periodic_announce\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.RANDOMPERIODICANNOUNCE_REQUIRED">RandomPeriodicAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.ANNOUNCEHOLDTIME">AnnounceHoldtime</label>\n                                <md-select name="announce_holdtime" ng-model="vm.voiceQueue.announce_holdtime">\n                                    <md-option ng-value="\'yes\'">Yes</md-option>\n                                    <md-option ng-value="\'no\'">No</md-option>\n                                    <md-option ng-value="\'once\'">Once</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.ANNOUNCEHOLDTIME"></span></div>\n                                <div ng-messages="settingsForm[\'announce_holdtime\'].$error" ng-show="settingsForm[\'announce_holdtime\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.ANNOUNCEHOLDTIME_REQUIRED">AnnounceHoldtime field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.ANNOUNCECALLERPOSITION">AnnounceCallerPosition</label>\n                                <md-select name="announce_position" ng-model="vm.voiceQueue.announce_position">\n                                    <md-option ng-value="\'yes\'">Yes</md-option>\n                                    <md-option ng-value="\'no\'">No</md-option>\n                                    <md-option ng-value="\'limit\'">Limit</md-option>\n                                    <md-option ng-value="\'more\'">More</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.ANNOUNCECALLERPOSITION"></span></div>\n                                <div ng-messages="settingsForm[\'announce_position\'].$error" ng-show="settingsForm[\'announce_position\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.ANNOUNCECALLERPOSITION_REQUIRED">AnnounceCallerPosition field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.ANNOUNCEPOSITIONLIMIT">AnnouncePositionLimit</label>\n                                <input type="number" name="announce_position_limit" ng-model="vm.voiceQueue.announce_position_limit">\n                                <div class="hint"><span translate="VOICE.HELP.ANNOUNCEPOSITIONLIMIT"></span></div>\n                                <div ng-messages="settingsForm[\'announce_position_limit\'].$error" ng-show="settingsForm[\'announce_position_limit\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.ANNOUNCEPOSITIONLIMIT_REQUIRED">AnnouncePositionLimit field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.REPORTHOLDTIMEAGENT">ReportHoldtimeAgent</label>\n                                <md-select name="reportholdtime" ng-model="vm.voiceQueue.reportholdtime">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.REPORTHOLDTIMEAGENT"></span></div>\n                                <div ng-messages="settingsForm[\'reportholdtime\'].$error" ng-show="settingsForm[\'reportholdtime\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.REPORTHOLDTIMEAGENT_REQUIRED">ReportHoldtimeAgent field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                    <div class="voiceQueue-detail-form-container announcements md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="VOICE.ANNOUNCEMENTS">ANNOUNCEMENTS</div>\n                        </div>\n                        <form name="announcementsForm" novalidate>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.PERIODICANNOUNCE">PeriodicAnnounce</label>\n                                <md-select name="periodic_announce" ng-model="vm.voiceQueue.periodic_announce" autofocus multiple>\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + periodic_announce.save_name" ng-repeat="periodic_announce in vm.sounds">{{ periodic_announce.name }}</md-option>\n                                    <md-option ng-value="\'\'">Default</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.PERIODICANNOUNCE"></span></div>\n                                <div ng-messages="announcementsForm[\'periodic_announce\'].$error" ng-show="announcementsForm[\'periodic_announce\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.PERIODICANNOUNCE_REQUIRED">PeriodicAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.HOLDTIMEANNOUNCE">HoldTimeAnnounce</label>\n                                <md-select name="queue_reporthold" ng-model="vm.voiceQueue.queue_reporthold">\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + queue_reporthold.save_name" ng-repeat="queue_reporthold in vm.sounds">{{ queue_reporthold.name }}</md-option>\n                                    <md-option ng-value="null">Default</md-option>\n                                    <md-option ng-value="\'\'">Disabled</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.HOLDTIMEANNOUNCE"></span></div>\n                                <div ng-messages="announcementsForm[\'queue_reporthold\'].$error" ng-show="announcementsForm[\'queue_reporthold\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.HOLDTIMEANNOUNCE_REQUIRED">HoldTimeAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.YOUARENEXTANNOUNCE">YouareNextAnnounce</label>\n                                <md-select name="queue_youarenext" ng-model="vm.voiceQueue.queue_youarenext">\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + queue_youarenext.save_name" ng-repeat="queue_youarenext in vm.sounds">{{ queue_youarenext.name }}</md-option>\n                                    <md-option ng-value="null">Default</md-option>\n                                    <md-option ng-value="\'\'">Disabled</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.YOUARENEXTANNOUNCE"></span></div>\n                                <div ng-messages="announcementsForm[\'queue_youarenext\'].$error" ng-show="announcementsForm[\'queue_youarenext\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.YOUARENEXTANNOUNCE_REQUIRED">YouareNextAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.THEREAREANNOUNCE">ThereareAnnounce</label>\n                                <md-select name="queue_thereare" ng-model="vm.voiceQueue.queue_thereare">\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + queue_thereare.save_name" ng-repeat="queue_thereare in vm.sounds">{{ queue_thereare.name }}</md-option>\n                                    <md-option ng-value="null">Default</md-option>\n                                    <md-option ng-value="\'\'">Disabled</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.THEREAREANNOUNCE"></span></div>\n                                <div ng-messages="announcementsForm[\'queue_thereare\'].$error" ng-show="announcementsForm[\'queue_thereare\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.THEREAREANNOUNCE_REQUIRED">ThereareAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.WAITINGCALLSANNOUNCE">WaitingCallsAnnounce</label>\n                                <md-select name="queue_callswaiting" ng-model="vm.voiceQueue.queue_callswaiting">\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + queue_callswaiting.save_name" ng-repeat="queue_callswaiting in vm.sounds">{{ queue_callswaiting.name }}</md-option>\n                                    <md-option ng-value="null">Default</md-option>\n                                    <md-option ng-value="\'\'">Disabled</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.WAITINGCALLSANNOUNCE"></span></div>\n                                <div ng-messages="announcementsForm[\'queue_callswaiting\'].$error" ng-show="announcementsForm[\'queue_callswaiting\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.WAITINGCALLSANNOUNCE_REQUIRED">WaitingCallsAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.ESTIMATEDHOLDTIMEANNOUNCE">EstimatedHoldTimeAnnounce</label>\n                                <md-select name="queue_holdtime" ng-model="vm.voiceQueue.queue_holdtime">\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + queue_holdtime.save_name" ng-repeat="queue_holdtime in vm.sounds">{{ queue_holdtime.name }}</md-option>\n                                    <md-option ng-value="null">Default</md-option>\n                                    <md-option ng-value="\'\'">Disabled</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.ESTIMATEDHOLDTIMEANNOUNCE"></span></div>\n                                <div ng-messages="announcementsForm[\'queue_holdtime\'].$error" ng-show="announcementsForm[\'queue_holdtime\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.ESTIMATEDHOLDTIMEANNOUNCE_REQUIRED">EstimatedHoldTimeAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MINUTESANNOUNCE">MinutesAnnounce</label>\n                                <md-select name="queue_minutes" ng-model="vm.voiceQueue.queue_minutes">\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + queue_minutes.save_name" ng-repeat="queue_minutes in vm.sounds">{{ queue_minutes.name }}</md-option>\n                                    <md-option ng-value="null">Default</md-option>\n                                    <md-option ng-value="\'\'">Disabled</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.MINUTESANNOUNCE"></span></div>\n                                <div ng-messages="announcementsForm[\'queue_minutes\'].$error" ng-show="announcementsForm[\'queue_minutes\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MINUTESANNOUNCE_REQUIRED">MinutesAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MINUTEANNOUNCE">MinuteAnnounce</label>\n                                <md-select name="queue_minute" ng-model="vm.voiceQueue.queue_minute">\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + queue_minute.save_name" ng-repeat="queue_minute in vm.sounds">{{ queue_minute.name }}</md-option>\n                                    <md-option ng-value="null">Default</md-option>\n                                    <md-option ng-value="\'\'">Disabled</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.MINUTEANNOUNCE"></span></div>\n                                <div ng-messages="announcementsForm[\'queue_minute\'].$error" ng-show="announcementsForm[\'queue_minute\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MINUTEANNOUNCE_REQUIRED">MinuteAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.SECONDSANNOUNCE">SecondsAnnounce</label>\n                                <md-select name="queue_seconds" ng-model="vm.voiceQueue.queue_seconds">\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + queue_seconds.save_name" ng-repeat="queue_seconds in vm.sounds">{{ queue_seconds.name }}</md-option>\n                                    <md-option ng-value="null">Default</md-option>\n                                    <md-option ng-value="\'\'">Disabled</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.SECONDSANNOUNCE"></span></div>\n                                <div ng-messages="announcementsForm[\'queue_seconds\'].$error" ng-show="announcementsForm[\'queue_seconds\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.SECONDSANNOUNCE_REQUIRED">SecondsAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.THANKYOUANNOUNCE">ThankYouAnnounce</label>\n                                <md-select name="queue_thankyou" ng-model="vm.voiceQueue.queue_thankyou">\n                                    <md-option ng-value="\'/var/opt/motion2/server/files/sounds/converted/\' + queue_thankyou.save_name" ng-repeat="queue_thankyou in vm.sounds">{{ queue_thankyou.name }}</md-option>\n                                    <md-option ng-value="null">Default</md-option>\n                                    <md-option ng-value="\'\'">Disabled</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.THANKYOUANNOUNCE"></span></div>\n                                <div ng-messages="announcementsForm[\'queue_thankyou\'].$error" ng-show="announcementsForm[\'queue_thankyou\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.THANKYOUANNOUNCE_REQUIRED">ThankYouAnnounce field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n            <md-tab>\n                <md-tab-label>\n                    <span translate="VOICE.ADVANCED">ADVANCED</span>\n                </md-tab-label>\n\n                <md-tab-body>\n                    <div class="voiceQueue-detail-form-container advanced md-background-bg md-whiteframe-1dp">\n                        <div class="pb-16" layout="row" layout-align="start center">\n                            <div class="h2 secondary-text" translate="VOICE.ADVANCED">ADVANCED</div>\n                        </div>\n                        <form name="advancedForm" novalidate>\n                            <md-input-container class="md-block">\n                                <md-switch ng-model="vm.voiceQueue.acw" aria-label="AfterCallWork"><span translate="VOICE.AFTERCALLWORK">AfterCallWork</span></md-switch>\n                                <div class="hint"><span translate="VOICE.HELP.AFTERCALLWORK"></span></div>\n                            </md-input-container>\n                            <md-input-container ng-if="vm.voiceQueue.acw" class="md-block">\n                                <label translate="VOICE.AFTERCALLWORKDURATION">AfterCallWorkDuration</label>\n                                <input type="number" name="acwTimeout" ng-model="vm.voiceQueue.acwTimeout" min="0" ng-required="true">\n                                <div class="hint"><span translate="VOICE.HELP.AFTERCALLWORKDURATION"></span></div>\n                                <div ng-messages="advancedForm[\'acwTimeout\'].$error" ng-show="advancedForm[\'acwTimeout\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.AFTERCALLWORKDURATION_REQUIRED">AfterCallWorkDuration field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.AFTERCALLWORKDURATION_MUST_BE_GREATER_THAN_OR_EQUAL_TO">AfterCallWorkDuration must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.AUTOPAUSE">AutoPause</label>\n                                <md-select name="autopause" ng-model="vm.voiceQueue.autopause">\n\n                                    <md-option ng-value="\'all\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.AUTOPAUSE"></span></div>\n                                <div ng-messages="advancedForm[\'autopause\'].$error" ng-show="advancedForm[\'autopause\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.AUTOPAUSE_REQUIRED">AutoPause field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.RINGINUSE">RingInUse</label>\n                                <md-select name="ringinuse" ng-model="vm.voiceQueue.ringinuse">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.RINGINUSE"></span></div>\n                                <div ng-messages="advancedForm[\'ringinuse\'].$error" ng-show="advancedForm[\'ringinuse\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.RINGINUSE_REQUIRED">RingInUse field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MEMBERDELAY">MemberDelay</label>\n                                <input type="number" name="memberdelay" ng-model="vm.voiceQueue.memberdelay" min="0">\n                                <div class="hint"><span translate="VOICE.HELP.MEMBERDELAY"></span></div>\n                                <div ng-messages="advancedForm[\'memberdelay\'].$error" ng-show="advancedForm[\'memberdelay\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MEMBERDELAY_REQUIRED">MemberDelay field is required</span>\n                                    </div>\n                                    <div ng-message="min">\n                                        <span translate="VOICE.ERRORS.MEMBERDELAY_MUST_BE_GREATER_THAN_OR_EQUAL_TO">MemberDelay must be a valid greater or equal than</span> <span>0</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.TIMEOUTRESTART">TimeoutRestart</label>\n                                <md-select name="timeoutrestart" ng-model="vm.voiceQueue.timeoutrestart">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.TIMEOUTRESTART"></span></div>\n                                <div ng-messages="advancedForm[\'timeoutrestart\'].$error" ng-show="advancedForm[\'timeoutrestart\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.TIMEOUTRESTART_REQUIRED">TimeoutRestart field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.MONITORFORMAT">MonitorFormat</label>\n                                <md-select name="monitor_format" ng-model="vm.voiceQueue.monitor_format">\n                                    <md-option ng-value="\'\'">Inactive</md-option>\n                                    <md-option ng-value="\'wav\'">wav</md-option>\n                                    <md-option ng-value="\'wav49\'">wav49</md-option>\n                                    <md-option ng-value="\'gsm\'">gsm</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.MONITORFORMAT"></span></div>\n                                <div ng-messages="advancedForm[\'monitor_format\'].$error" ng-show="advancedForm[\'monitor_format\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.MONITORFORMAT_REQUIRED">MonitorFormat field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.CONTEXT">Context</label>\n                                <input type="text" name="context" ng-model="vm.voiceQueue.context">\n                                <div class="hint"><span translate="VOICE.HELP.CONTEXT"></span></div>\n                                <div ng-messages="advancedForm[\'context\'].$error" ng-show="advancedForm[\'context\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.CONTEXT_REQUIRED">Context field is required</span>\n                                    </div>\n\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.SETINTERFACEVARIABLES">SetInterfaceVariables</label>\n                                <md-select name="setinterfacevar" ng-model="vm.voiceQueue.setinterfacevar">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.SETINTERFACEVARIABLES"></span></div>\n                                <div ng-messages="advancedForm[\'setinterfacevar\'].$error" ng-show="advancedForm[\'setinterfacevar\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.SETINTERFACEVARIABLES_REQUIRED">SetInterfaceVariables field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.SETQUEUEVARIABLES">SetQueueVariables</label>\n                                <md-select name="setqueuevar" ng-model="vm.voiceQueue.setqueuevar">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.SETQUEUEVARIABLES"></span></div>\n                                <div ng-messages="advancedForm[\'setqueuevar\'].$error" ng-show="advancedForm[\'setqueuevar\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.SETQUEUEVARIABLES_REQUIRED">SetQueueVariables field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n                            <md-input-container class="md-block">\n                                <label translate="VOICE.SETQUEUEENTRYVARIABLES">SetQueueEntryVariables</label>\n                                <md-select name="setqueueentryvar" ng-model="vm.voiceQueue.setqueueentryvar">\n\n                                    <md-option ng-value="\'yes\'"> {{ \'VOICE.YES\' | translate }}</md-option>\n\n                                    <md-option ng-value="\'no\'"> {{ \'VOICE.NO\' | translate }}</md-option>\n                                </md-select>\n                                <div class="hint"><span translate="VOICE.HELP.SETQUEUEENTRYVARIABLES"></span></div>\n                                <div ng-messages="advancedForm[\'setqueueentryvar\'].$error" ng-show="advancedForm[\'setqueueentryvar\'].$touched" role="alert">\n                                    <div ng-message="required">\n                                        <span translate="VOICE.ERRORS.SETQUEUEENTRYVARIABLES_REQUIRED">SetQueueEntryVariables field is required</span>\n                                    </div>\n                                </div>\n                            </md-input-container>\n\n                        </form>\n                    </div>\n                </md-tab-body>\n            </md-tab>\n        </md-tabs>\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n</div>'),e.put("app/main/apps/voice/views/voiceQueues/voiceQueues.html",'<div id="voiceQueues" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-phone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="VOICE.VOICEQUEUES">VoiceQueues</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="VOICE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedVoiceQueues.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedVoiceQueues =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="VOICE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-voiceQueues-count">\n                    <span>{{vm.selectedVoiceQueues.length}}</span>\n                <span translate="VOICE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="VOICEQUEUES.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllVoiceQueues()" translate="VOICE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectVoiceQueues()" translate="VOICE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedVoiceQueues" csv-label="true" filename="voiceQueues.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedVoiceQueues($event)" aria-label="delete selected" translate translate-attr-label="VOICEQUEUES.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- VOICEQUEUE TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedVoiceQueues" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getVoiceQueues">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="id">{{ \'VOICE.ID\' | translate }}</th>\n                                <th md-column md-order-by="name">{{ \'VOICE.NAME\' | translate }}</th>\n                                <th md-column md-order-by="strategy">{{ \'VOICE.STRATEGY\' | translate }}</th>\n                                <th md-column md-order-by="description">{{ \'VOICE.DESCRIPTION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.voiceQueues.rows.length">\n                                <td md-cell colspan="5">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="voiceQueue" md-select-id="id" ng-repeat="voiceQueue in vm.voiceQueues.rows">\n                                <td md-cell ng-if="voiceQueue.userpic"><img class="avatar" alt="{{voiceQueue.name}}" ng-src="api/users/{{voiceQueue.id}}/avatar" /></td>\n                                <td md-cell ng-if="!voiceQueue.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{voiceQueue.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditVoiceQueue($event, voiceQueue)" md-cell class="id ">{{voiceQueue.id}}</td>\n                                <td ng-click="vm.createOrEditVoiceQueue($event, voiceQueue)" md-cell class="name ">{{voiceQueue.name}}</td>\n                                <td ng-click="vm.createOrEditVoiceQueue($event, voiceQueue)" md-cell class="strategy ">{{ vm.arraystrategy[voiceQueue.strategy].option }}</td>\n                                <td ng-click="vm.createOrEditVoiceQueue($event, voiceQueue)" md-cell class="description ">{{voiceQueue.description}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.editstate(voiceQueue, $event)" translate="VOICE.EDIT_VOICEQUEUE">\n                                                    Edit VoiceQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.teamadddialog(voiceQueue, $event)" translate="VOICE.TEAMADD_VOICEQUEUE">\n                                                    teamadd VoiceQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.agentadddialog(voiceQueue, $event)" translate="VOICE.AGENTADD_VOICEQUEUE">\n                                                    agentadd VoiceQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(voiceQueue, $event)" translate="VOICE.DELETE_VOICEQUEUE">\n                                                    Delete VoiceQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.gotorealtimegoto(voiceQueue, $event)" translate="VOICE.GOTOREALTIME_VOICEQUEUE">\n                                                    goToRealtime VoiceQueue\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.voiceQueues.count}}" md-on-paginate="vm.getVoiceQueues" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / VOICEQUEUE TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- ADD VOICEQUEUE BUTTON --\x3e\n    <md-button class="md-fab md-accent" id="add-voiceQueue-button" ng-click="vm.createOrEditVoiceQueue($event)" aria-label="add voiceQueue" translate translate-attr-aria-label="VOICE.ADD_VOICEQUEUE">\n        <md-icon md-font-icon="icon-plus"></md-icon>\n    </md-button>\n    \x3c!-- / ADD VOICEQUEUE BUTTON --\x3e\n</div>'),e.put("app/main/apps/voice/views/voiceRecordings/create/dialog.html",'<md-dialog class="voiceRecording-dialog" aria-label="New VoiceRecording">\n    <form name="voiceRecordingForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="VOICE.RATING">Rating</label>\n                <md-select name="rating" ng-model="vm.voiceRecording.rating" autofocus>\n                    <md-option ng-value="null">{{\'VOICE.NO_RATING\' | translate}}</md-option>\n                    <md-option value="1">\n                        <md-icon md-font-icon="icon-star" style="color:red" ng-repeat="icon in [1]"></md-icon>\n                    </md-option>\n                    <md-option value="2">\n                        <md-icon md-font-icon="icon-star" style="color:red" ng-repeat="icon in [1,2]"></md-icon>\n                    </md-option>\n                    <md-option value="3">\n                        <md-icon md-font-icon="icon-star" style="color:red" ng-repeat="icon in [1,2,3]"></md-icon>\n                    </md-option>\n                    <md-option value="4">\n                        <md-icon md-font-icon="icon-star" style="color:red" ng-repeat="icon in [1,2,3,4]"></md-icon>\n                    </md-option>\n                    <md-option value="5">\n                        <md-icon md-font-icon="icon-star" style="color:red" ng-repeat="icon in [1,2,3,4,5]"></md-icon>\n                    </md-option>\n                </md-select>\n                <div ng-messages="voiceRecordingForm[\'rating\'].$error" ng-show="voiceRecordingForm[rating].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="VOICE.ERRORS.RATING_REQUIRED">Rating field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="!vm.newVoiceRecording" ng-click="vm.saveVoiceRecording()" class="send-button md-accent md-raised" ng-disabled="voiceRecordingForm.$invalid || voiceRecordingForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">\n                    SAVE\n                </md-button>\n\n                <md-button type="submit" ng-if="vm.newVoiceRecording" ng-click="vm.addNewVoiceRecording()" class="send-button md-accent md-raised" ng-disabled="voiceRecordingForm.$invalid" aria-label="ADD" translate="VOICE.ADD_VOICERECORDING" translate-attr-aria-label="VOICE.ADD_VOICERECORDING">\n                    ADD VOICERECORDING\n                </md-button>\n            </div>\n            <div layout="row">\n                <md-button class="md-icon-button" ng-if="!vm.newVoiceRecording" ng-click="vm.deleteVoiceRecording($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                    <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/main/apps/voice/views/voiceRecordings/voiceRecordings.html",'<div id="voiceRecordings" class="page-layout simple left-sidenav inner-sidenav">\n\n    \x3c!-- HEADER --\x3e\n    <div class="header md-accent-bg" layout="row" layout-align="space-between center">\n\n        \x3c!-- APP TITLE --\x3e\n        <div layout="row" layout-align="start center">\n            <div class="logo" layout="row" layout-align="start center">\n                <span class="logo-icon">\n                    <md-icon md-font-icon="icon-phone" class="s24"></md-icon>\n                </span>\n                <span class="logo-text" translate="VOICE.VOICERECORDINGS">VoiceRecordings</span>\n            </div>\n        </div>\n        \x3c!-- / APP TITLE --\x3e\n\n        <div layout="row">\n            \x3c!-- SEARCH --\x3e\n            <div class="search-input-wrapper" layout="row" layout-align="start center">\n                <label for="search">\n                    <md-icon md-font-icon="icon-magnify"></md-icon>\n                </label>\n                <md-input-container md-no-float class="m-0">\n                    <input id="search" placeholder="Search for anyone" type="text" ng-model="vm.query.filter" ng-model-options="{ debounce: 1000 }" translate translate-attr-placeholder="VOICE.SEARCH_FOR_ANYONE">\n                </md-input-container>\n            </div>\n            \x3c!-- / SEARCH --\x3e\n            \x3c!-- DATE FILTER --\x3e\n            <div class="padding-horizontal-20" layout="column" layout-align="center center">\n                <span class="font-size-10" translate="DASHBOARDS.SELECT_DATE_RANGE">Select Date Range</span>\n                <div layout="row" layout-align="center center">\n                    <md-button ng-if="vm.pickerModel.dateStart" ng-click="vm.clearDateFilter()" class="md-icon-button no-padding width-20 height-20">\n                        <md-tooltip>{{ \'DASHBOARDS.CLEAR\' | translate }}</md-tooltip>\n                        <md-icon md-font-icon="icon-close" class="s16 white-fg"></md-icon>\n                    </md-button>\n                    <md-date-range localization-map="vm.localizationMap" ng-model="vm.pickerModel" auto-confirm="true" show-template="true" md-on-select="vm.getVoiceRecordings()" placeholder="{{ \'DASHBOARDS.ALL\' | translate }}"></md-date-range>\n                </div>\n            </div>\n            \x3c!-- /DATE FILTER --\x3e\n        </div>\n    </div>\n    \x3c!-- / HEADER --\x3e\n\n    \x3c!-- SELECTED BAR --\x3e\n    <div ng-show="vm.selectedVoiceRecordings.length > 0" class="selected-bar header animate-slide-down md-accent-bg" layout="row" layout-align="start center">\n\n        <div class="close-button-wrapper" ng-click="vm.selectedVoiceRecordings =[]">\n            <md-button layout="row" layout-align="start center">\n                <md-icon md-font-icon="icon-arrow-left" class="mr-8"></md-icon>\n                <span translate="VOICE.BACK">Back</span>\n            </md-button>\n        </div>\n\n        <div flex layout="row" layout-align="space-between center">\n\n            <div>\n                <span class="selected-voiceRecordings-count">\n                    <span>{{vm.selectedVoiceRecordings.length}}</span>\n                <span translate="VOICE.SELECTED">selected</span>\n                </span>\n\n                <md-menu class="select-menu" ng-if="!vm.currentThread">\n                    <md-button class="md-icon-button" ng-click="$mdOpenMenu($event)" aria-label="multi select toggle" translate translate-attr-aria-label="VOICERECORDINGS.MULTI_SELECT_TOGGLE">\n                        <md-icon md-font-icon="icon-menu-down"></md-icon>\n                    </md-button>\n                    <md-menu-content width="3">\n                        <md-menu-item>\n                            <md-button ng-click="vm.selectAllVoiceRecordings()" translate="VOICE.SELECT_ALL">\n                                Select all\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item>\n                            <md-button ng-click="vm.deselectVoiceRecordings()" translate="VOICE.SELECT_NONE">\n                                Select none\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n\n            <div class="multi-select-actions">\n                <button class="md-icon-button" ng-csv="vm.exportSelectedVoiceRecordings" csv-label="true" filename="voiceRecordings.csv">\n                    <md-icon md-font-icon="icon-file-excel"></md-icon>\n                </button>\n                <md-button class="md-icon-button" ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'" ng-click="vm.deleteSelectedVoiceRecordings($event)" aria-label="delete selected" translate translate-attr-label="VOICERECORDINGS.DELETE_SELECTED">\n                    <md-icon md-font-icon="icon-delete"></md-icon>\n                </md-button>\n            </div>\n        </div>\n    </div>\n    \x3c!-- / SELECTED BAR --\x3e\n\n    \x3c!-- CONTENT --\x3e\n    <div class="content" md-background-bg layout="row" layout-align="start start">\n\n        \x3c!-- MAIN --\x3e\n        <div class="main scrollable" ms-scroll>\n\n            \x3c!-- VOICERECORDING TABLE --\x3e\n            <md-card>\n                <md-table-container>\n                    <table md-table md-row-select multiple ng-model="vm.selectedVoiceRecordings" md-progress="vm.promise">\n                        <thead md-head md-order="vm.query.sort" md-on-reorder="vm.getVoiceRecordings">\n                            <tr md-row>\n                                <th md-column ng-if="vm.table == \'users\' || vm.table == \'agents\'" width="20px"></th>\n                                <th md-column md-order-by="type">{{ \'VOICE.TYPE\' | translate }}</th>\n                                <th md-column md-order-by="uniqueid">{{ \'VOICE.UNIQUEID\' | translate }}</th>\n                                <th md-column md-order-by="calleridnum">{{ \'VOICE.CALLER\' | translate }}</th>\n                                <th md-column md-order-by="exten">{{ \'VOICE.CALLED\' | translate }}</th>\n                                <th md-column md-order-by="connectedlinenum">{{ \'VOICE.CONNECTED\' | translate }}</th>\n                                <th md-column md-order-by="queue">{{ \'VOICE.QUEUE\' | translate }}</th>\n                                <th md-column md-order-by="membername">{{ \'VOICE.AGENT\' | translate }}</th>\n                                <th md-column md-order-by="rating">{{ \'VOICE.RATING\' | translate }}</th>\n                                <th md-column md-order-by="audio">{{ \'VOICE.AUDIO\' | translate }}</th>\n                                <th md-column md-order-by="createdAt">{{ \'VOICE.DATE\' | translate }}</th>\n                                <th md-column md-order-by="userDisposition">{{ \'VOICE.DISPOSITION\' | translate }}</th>\n                                <th md-column width="10px"></th>\n                            </tr>\n                        </thead>\n                        <tbody md-body>\n                            <tr md-row ng-hide="vm.voiceRecordings.rows.length">\n                                <td md-cell colspan="12">\n                                    <div layout="row" layout-align="center center">\n                                        <span tranlsate="VOICE.NO_AVAILABLE_INFO">No Available Info</span>\n                                    </div>\n                                </td>\n                            </tr>\n                            <tr md-row md-select="voiceRecording" md-select-id="id" ng-repeat="voiceRecording in vm.voiceRecordings.rows">\n                                <td md-cell ng-if="voiceRecording.userpic"><img class="avatar" alt="{{voiceRecording.name}}" ng-src="api/users/{{voiceRecording.id}}/avatar" /></td>\n                                <td md-cell ng-if="!voiceRecording.userpic && (vm.table == \'users\' || vm.table == \'agents\')"><img class="avatar" alt="{{voiceRecording.name}}" ng-src="assets/images/avatars/profile.png" /></td>\n                                <td ng-click="vm.createOrEditVoiceRecording($event, voiceRecording)" md-cell class="type ">{{voiceRecording.type}}</td>\n                                <td ng-click="vm.createOrEditVoiceRecording($event, voiceRecording)" md-cell class="uniqueid ">{{voiceRecording.uniqueid}}</td>\n                                <td ng-click="vm.createOrEditVoiceRecording($event, voiceRecording)" md-cell class="calleridnum ">{{voiceRecording.calleridnum}}</td>\n                                <td ng-click="vm.createOrEditVoiceRecording($event, voiceRecording)" md-cell class="exten ">{{voiceRecording.exten}}</td>\n                                <td ng-click="vm.createOrEditVoiceRecording($event, voiceRecording)" md-cell class="connectedlinenum ">{{voiceRecording.connectedlinenum}}</td>\n                                <td ng-click="vm.createOrEditVoiceRecording($event, voiceRecording)" md-cell class="queue ">{{voiceRecording.queue}}</td>\n                                <td ng-click="vm.createOrEditVoiceRecording($event, voiceRecording)" md-cell class="membername ">{{voiceRecording.membername}}</td>\n                                <td ng-click="vm.createOrEditVoiceRecording($event, voiceRecording)" md-cell class="rating ">\n                                    <md-icon md-font-icon="icon-star" style="color:red" ng-show="voiceRecording.rating" ng-repeat="rating in [1,2,3,4,5] | limitTo:voiceRecording.rating"></md-icon><span ng-hide="voiceRecording.rating" translate="VOICE.NO_RATING">No rating</span></td>\n                                <td md-cell class="audio " ng-switch="voiceRecording.format">\n                                    \x3c!-- audio recording directive --\x3e\n                                    <ms-recording ng-switch-when=".wav" id="voiceRecording.id"></ms-recording>\n                                    \x3c!-- / audio recording directive --\x3e\n                                    <span ng-switch-when=".gsm|.WAV" ng-switch-when-separator="|">\n                                  <em>{{ \'VOICE.CANT_PLAY_GSM_AUDIO_FILES\' | translate }}</em>\n                                 </span>\n                                </td>\n                                <td ng-click="vm.createOrEditVoiceRecording($event, voiceRecording)" md-cell class="createdAt ">{{voiceRecording.createdAt | date:\'medium\' }}</td>\n                                <td ng-click="vm.createOrEditVoiceRecording($event, voiceRecording)" md-cell class="userDisposition ">{{voiceRecording.userDisposition}}</td>\n                                <td md-cell class="actions">\n                                    <md-menu>\n                                        <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="VOICE.MORE" ng-click="$mdOpenMenu($event)">\n                                            <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                                        </md-button>\n\n                                        <md-menu-content width="3">\n                                            <md-menu-item>\n                                                <md-button ng-click="vm.downloadfile2(voiceRecording, $event)" translate="VOICE.DOWNLOAD_VOICERECORDING">\n                                                    Download VoiceRecording\n                                                </md-button>\n                                            </md-menu-item>\n                                            <md-menu-item ng-if="vm.currentUser.crudPermissions === 0 || vm.currentUser.role === \'admin\'">\n                                                <md-button ng-click="vm.deleteconfirm(voiceRecording, $event)" translate="VOICE.DELETE_VOICERECORDING">\n                                                    Delete VoiceRecording\n                                                </md-button>\n                                            </md-menu-item>\n                                        </md-menu-content>\n                                    </md-menu>\n                                </td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </md-table-container>\n\n                <md-table-pagination md-label="{page: \'{{\'VOICE.PAGE\' | translate}}:\', rowsPerPage: \'{{\'VOICE.ROWSPERPAGE\' | translate}}:\', of: \'{{\'VOICE.OF\' | translate}}\'}" md-limit="vm.query.limit" md-limit-options="[10, 15, 20, 50, 100, 250]" md-page="vm.query.page"\n                    md-total="{{vm.voiceRecordings.count}}" md-on-paginate="vm.getVoiceRecordings" md-page-select></md-table-pagination>\n            </md-card>\n            \x3c!-- / VOICERECORDING TABLE --\x3e\n            \x3c!-- NO RESULTS --\x3e\n\n            \x3c!-- / NO RESULTS --\x3e\n        </div>\n        \x3c!-- / MAIN --\x3e\n\n    </div>\n    \x3c!-- / CONTENT --\x3e\n\n    \x3c!-- NO ADD BUTTON BUTTON --\x3e\n</div>'),e.put("app/navigation/layouts/horizontal-navigation/navigation.html",'<div layout="row" layout-align="start center">\n    <ms-navigation-horizontal></ms-navigation-horizontal>\n</div>'),e.put("app/navigation/layouts/vertical-navigation-fullwidth-toolbar-2/navigation.html",'<ms-navigation class="scrollable" folded="vm.folded" ms-scroll="vm.msScrollOptions">\n</ms-navigation>'),e.put("app/navigation/layouts/vertical-navigation/navigation.html",'<md-toolbar class="navigation-header md-whiteframe-1dp" layout="row" layout-align="space-between center">\n    <div class="logo" layout="row" layout-align="start center">\n        <span class="logo-image"><img src="/api/settings/1/logo" alt="logo" /></span>\n        \x3c!-- <span class="logo-image"><img src="assets/images/logos/whisker_32x32.png" alt="motion_whisker_32x32" /></span> --\x3e\n        <span class="logo-text text-truncate">{{vm.getLogo() | uppercase}}</span>\n    </div>\n    <md-icon class="fold-toggle s18" md-font-icon="icon-backburger" hide show-gt-sm ng-click="vm.toggleMsNavigationFolded()"></md-icon>\n</md-toolbar>\n\n<ms-navigation class="scrollable" folded="vm.folded" ms-scroll="vm.msScrollOptions"></ms-navigation>'),e.put("app/quick-panel/quick-panel.html",'<md-content>\n    <md-tabs md-no-pagination md-swipe-content md-stretch-tabs="always">\n        <md-tab>\n            <md-tab-label>\n                <span translate="QUICKPANEL.TODAY">TODAY</span>\n            </md-tab-label>\n            <md-tab-body>\n                <md-content class="today-tab scrollable" ms-scroll ng-include="\'app/quick-panel/tabs/today/today-tab.html\'"></md-content>\n            </md-tab-body>\n        </md-tab>\n        <md-tab ng-if="vm.currentUser.allowmessenger || vm.currentUser.role !== \'agent\'" ng-include="\'app/quick-panel/tabs/chat/chat-tab.html\'" ng-controller="ChatInternalController as vm_ct" ng-init="vm_ct.init(vm.license)" md-on-deselect="vm_ct.user = undefined">\n            <md-tab-label>\n                <div ng-if="vm.unreadTotalMessages" class="md-accent-bg unread-message-count-chat">{{vm.unreadTotalMessages}}</div>\n                <span>MESSENGER</span>\n            </md-tab-label>\n            <md-tab-body>\n                <md-content class="chat-tab scrollable" ms-scroll ng-include="\'app/quick-panel/tabs/chat/chat-tab.html\'"></md-content>\n            </md-tab-body>\n        </md-tab>\n        <md-tab ng-if="vm.currentUser.allowmessenger || vm.currentUser.role !== \'agent\'" ng-include="\'app/quick-panel/tabs/groups/group-tab.html\'" ng-controller="ChatGroupController as vm_cg" ng-init="vm_cg.init(vm.license)" md-on-deselect="vm_cg.group = undefined">\n            <md-tab-label>\n                <div ng-if="vm.unreadTotalGroupMessages" class="md-accent-bg unread-message-count-chat">{{vm.unreadTotalGroupMessages}}</div>\n                <span translate="QUICKPANEL.GROUPS">GROUPS</span>\n            </md-tab-label>\n            <md-tab-body>\n                <md-content class="group-tab scrollable" ms-scroll ng-include="\'app/quick-panel/tabs/groups/group-tab.html\'"></md-content>\n            </md-tab-body>\n        </md-tab>\n    </md-tabs>\n</md-content>'),e.put("app/quick-panel/tabs/activity/activity-tab.html",'<md-list class="friends">\n    <md-subheader class="md-no-sticky">\n        <span translate="QUICKPANEL.FRIENDS">Friends</span>\n    </md-subheader>\n\n    <md-list-item class="friend md-3-line" ng-repeat="friend in vm.activities.friends">\n        <img ng-src="{{friend.avatar}}" class="md-avatar" alt="{{friend.name}}" />\n\n        <div class="status {{friend.status}}"></div>\n\n        <div ng-if="contact.unread" class="md-accent-bg unread-message-count">{{contact.unread}}</div>\n\n        <div class="md-list-item-text">\n            <h3 class="message">{{friend.message}}</h3>\n            <p class="time">{{friend.time}}</p>\n        </div>\n    </md-list-item>\n</md-list>\n\n<md-divider></md-divider>\n\n<md-list class="servers">\n    <md-subheader class="md-no-sticky">\n        <span translate="QUICKPANEL.APP_SERVERS">Application Servers</span>\n    </md-subheader>\n\n    <md-list-item class="server md-3-line" ng-repeat="server in vm.activities.servers">\n        <md-icon md-font-icon="icon-checkbox-blank-circle" class="s16 status" ng-class="server.status"></md-icon>\n\n        <div class="md-list-item-text">\n            <h3>{{server.location}}</h3>\n            <p>{{server.detail}}</p>\n        </div>\n    </md-list-item>\n</md-list>\n\n<md-divider></md-divider>\n\n<md-list class="stats">\n    <md-subheader class="md-no-sticky">\n        <span translate="QUICKPANEL.USER_STATS">User Stats</span>\n    </md-subheader>\n\n    <md-list-item class="stat md-2-line" ng-repeat="stat in vm.activities.stats">\n        <div class="md-list-item-text">\n            <span>{{stat.title}} ({{stat.current}} / {{stat.total}})</span>\n            <md-progress-linear ng-class="stat.status" md-mode="determinate" value="{{stat.percent}}"></md-progress-linear>\n        </div>\n    </md-list-item>\n</md-list>'),e.put("app/quick-panel/tabs/chat/chat-tab.html",'<div class="main animate-slide-left" ng-hide="vm_ct.user">\n    <md-subheader class="md-no-sticky">\n        <div class="search" layout="row" layout-align="space-between center">\n            <md-icon md-font-icon="icon-magnify" class="icon search-icon"></md-icon>\n            <input class="search-input" ng-model="vm_ct.search.$" type="text" placeholder="Search by fullname.." translate translate-attr-placeholder="QUICKPANEL.SEARCH" flex>\n            <md-select ng-model="vm_ct.search.online" class="height-50 no-padding no-margin">\n                <md-option ng-value="undefined">All</md-option>\n                <md-option ng-value="true">\n                    <md-icon md-font-icon="icon-checkbox-blank-circle" class="s12 green-fg"></md-icon>Online</md-option>\n                <md-option ng-value="false">\n                    <md-icon md-font-icon="icon-checkbox-blank-circle" class="s12 red-fg"></md-icon>Offline</md-option>\n            </md-select>\n        </div>\n    </md-subheader>\n    \x3c!-- <select ng-model="vm_ct.filterOnline" class="height-50 no-padding no-margin">\n            <option ng-value="undefined">All</option>\n            <option ng-value="true"><md-icon md-font-icon="icon-checkbox-blank-circle" class="s12 green-fg"></md-icon>Online</option>\n            <option ng-value="false"><md-icon md-font-icon="icon-checkbox-blank-circle" class="s12 red-fg"></md-icon>Offline</option>\n        </select> --\x3e\n    <md-divider></md-divider>\n    <md-list class="recent">\n        <md-list-item class="contact md-3-line" ng-if="user.id != vm_ct.currentUser.id" ng-repeat="user in vm_ct.users.rows | orderBy: \'-lastMessageAt\' | filter:vm_ct.search" ng-click="vm_ct.toggleChat(user)">\n            <md-divider></md-divider>\n            <img ng-src="{{user.userpic ? \'api/users/\' + user.id + \'/avatar\' : \'assets/images/avatars/profile.png\'}}" class="md-avatar" alt="{{user.fullname}}" />\n            <div class="status" ng-class="{true: \'online\', false: \'offline\'}[user.online]"></div>\n            <div ng-if="vm_ct.unreadMessage[user.id]" class="md-accent-bg unread-message-count">{{vm_ct.unreadMessage[user.id]}}</div>\n            <div class="md-list-item-text">\n                <div layout="row">\n                    <h3>{{user.fullname}}</h3>\n                    <md-icon ng-if="!user.allowmessenger && user.role === \'agent\'" class="s16 margin-left-5" ng-style="{\'color\': \'red\' }" md-font-icon="icon-block-helper"></md-icon>\n                </div>\n                <p>{{user.name}} &#60;{{user.internal}}&#62;</p>\n                <div layout="row" layout-align="start center">\n                    <md-icon ng-if="!user.lastMessage.read && user.lastMessage.FromId === vm_ct.currentUser.id" class="s16 no-margin" md-font-icon="icon-check"></md-icon>\n                    <md-icon ng-if="user.lastMessage.read && user.lastMessage.FromId === vm_ct.currentUser.id" class="s16 no-margin" md-font-icon="icon-check-all md-accent"></md-icon>\n                    <p>{{user.lastMessage.body | limitTo:20 }}{{user.lastMessage.body.length > 20 ? \'...\' : \'\' }}</p>\n                    <span flex></span>\n                    <p class="last-message" ng-if="user.lastMessageAt != vm_ct.standardDate">{{user.lastMessageAt | formatdate}}</p>\n                </div>\n            </div>\n        </md-list-item>\n    </md-list>\n</div>\n\n<div class="chat animate-slide-right" ng-show="vm_ct.user" layout="column">\n    <md-toolbar class="md-accent">\n        <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n\n            <div layout="row" layout-align="start center">\n                <md-button class="md-icon-button" ng-click="vm_ct.toggleChat()" aria-label="Back" translate translate-attr-aria-label="QUICKPANEL.BACK">\n                    <md-icon md-font-icon="icon-keyboard-backspace"></md-icon>\n                </md-button>\n                <h4>\n                    <span>{{vm_ct.user.fullname}}</span>\n                </h4>\n            </div>\n\n            <div layout="row" layout-align="end center">\n                <md-button ng-if="vm_ct.license.webrtc && vm_ct.currentUser.role === \'agent\' && vm_ct.currentUser.showWebBar === 2 && vm_ct.user.role === \'agent\'" class="md-icon-button" aria-label="Call" translate translate-attr-aria-label="QUICKPANEL.CALL" ng-click="vm_ct.webcall(vm_ct.user.name)">\n                    <md-icon md-font-icon="icon-phone"></md-icon>\n                </md-button>\n                <md-menu ng-if="vm_ct.currentUser.phoneBarRemoteControl && vm_ct.currentUser.role === \'agent\' && vm_ct.currentUser.showWebBar === 0 && vm_ct.user.role === \'agent\'">\n                    <md-button class="md-icon-button" aria-label="Call" translate translate-attr-aria-label="QUICKPANEL.CALL" ng-click="$mdOpenMenu($event)">\n                        <md-icon md-font-icon="icon-phone"></md-icon>\n                    </md-button>\n\n                    <md-menu-content width="3">\n                        <md-menu-item ng-disabled="!vm_ct.currentUser.phoneBarRemoteControl">\n                            <md-button ng-click="vm_ct.call(vm_ct.user.name)">\n                                {{\'DASHBOARDS.CALL_NUMBER\' | translate}} ({{vm_ct.user.name}})\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item ng-disabled="!vm_ct.currentUser.phoneBarRemoteControl">\n                            <md-button ng-click="vm_ct.transfer(vm_ct.user.name)">\n                                {{\'DASHBOARDS.TRANSFER_NUMBER\' | translate}} ({{vm_ct.user.name}})\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n\n                \x3c!-- <md-button class="md-icon-button" aria-label="More" translate translate-attr-aria-label="QUICKPANEL.MORE">\n                    <md-icon md-font-icon="icon-dots-vertical"></md-icon>\n                </md-button> --\x3e\n            </div>\n        </div>\n\n    </md-toolbar>\n    <md-content flex layout-paddings ms-scroll id="chat-dialog">\n        <div layout="row" ng-repeat="message in vm_ct.user.messages.rows" class="md-padding message-row" ng-class="message.FromId === vm_ct.currentUser.id ? \'user\' : \'contact\'">\n            <img ng-if="message.FromId === vm_ct.user.id" ng-src="{{vm_ct.user.userpic ? \'api/users/\' + vm_ct.user.id + \'/avatar\' : \'assets/images/avatars/profile.png\'}}" class="avatar" alt="{{vm_ct.user.fullname}}" />\n            <img ng-if="message.FromId === vm_ct.currentUser.id" class="avatar" ng-src="{{vm_ct.currentUser.userpic ? \'api/users/\' + vm_ct.currentUser.id + \'/avatar\' : \'assets/images/avatars/profile.png\'}}">\n            <div class="bubble" flex>\n                <span class="message" ng-bind-html="message.body | embed:{linkTarget:\'_blank\',emoji:false,fontSmiley:false}"></span>\n                <div layout="row" layout-align="end center">\n                    <span class="time secondary-text">{{message.createdAt | formatdate }}</span>\n                    <md-icon ng-if="!message.read && message.FromId === vm_ct.currentUser.id" class="s16 margin-5" md-font-icon="icon-check"></md-icon>\n                    <md-icon ng-if="message.read && message.FromId === vm_ct.currentUser.id" class="s16 margin-5" md-font-icon="icon-check-all md-accent"></md-icon>\n                </div>\n            </div>\n        </div>\n    </md-content>\n\n    <form ng-submit="vm_ct.reply()" layout="row" class="reply" layout-align="start center">\n        <textarea ng-keyup="$event.keyCode == 13 && !vm_ct.disabled? vm_ct.reply() : null" flex ng-model="vm_ct.replyMessage" placeholder="Type and hit enter to send message" translate translate-attr-placeholder="QUICKPANEL.REPLY_PLACEHOLDER" autofocus></textarea>\n\n        <md-button ng-disable="vm_ct.disabled" class="md-fab md-mini" type="submit" aria-label="Send message" translate translate-attr-aria-label="QUICKPANEL.SEND_MESSAGE">\n            <md-icon md-font-icon="icon-send"></md-icon>\n        </md-button>\n    </form>\n</div>'),e.put("app/quick-panel/tabs/groups/create/dialog.html",'<md-dialog class="group-dialog" aria-label="New ChatGroup">\n    <form name="groupForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog(null)">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            \x3c!--START Error--\x3e\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            \x3c!--END Error--\x3e\n\n            \x3c!--START NAME--\x3e\n            <md-input-container class="md-block">\n                <label translate="QUICKPANEL.NAME">Name</label>\n                <input type="text" name="name" ng-model="vm.group.name" required autofocus>\n                <div ng-messages="groupForm[\'name\'].$error" ng-show="groupForm[\'name\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="QUICKPANEL.ERRORS.NAME_REQUIRED">Name field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="QUICKPANEL.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: \'/^[A-Za-z0-9\\.\\_]+$/i\' }">Name must be valid pattern </span>\n                    </div>\n                </div>\n            </md-input-container>\n            \x3c!--END NAME--\x3e\n\n            \x3c!--START Members--\x3e\n            <md-input-container class="md-block">\n                <label translate="QUICKPANEL.MEMBERS">Members</label>\n                <md-contact-chips ng-model="vm.group.members" md-contacts="vm.querySearch($query)" md-contact-name="name" md-contact-image="image" md-require-match="true" md-highlight-flags="i" placeholder="{{\'QUICKPANEL.MEMBERS\' | translate}}">\n                </md-contact-chips>\n                <div ng-messages="groupForm[\'strategy\'].$error" ng-show="groupForm[\'strategy\'].$touched" role="alert">\n                    <div ng-message="required">\n                        <span translate="QUICKPANEL.ERRORS.MEMBERS_REQUIRED">Members field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            \x3c!--END Members--\x3e\n\n            \x3c!--START Writing--\x3e\n            <md-input-container class="md-block">\n                <md-switch ng-model="vm.group.write" aria-label="Write">\n                    {{\'QUICKPANEL.ENABLE_WRITING\' | translate}}\n                </md-switch>\n            </md-input-container>\n            \x3c!--END Writing--\x3e\n\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-if="vm.newChatGroup" ng-click="vm.saveChatGroup()" class="send-button md-accent md-raised" ng-disabled="groupForm.$invalid || groupForm.$pristine || (vm.group.members.length < 1)" aria-label="SAVE" translate="QUICKPANEL.SAVE"\n                    translate-attr-aria-label="QUICKPANEL.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/quick-panel/tabs/groups/group-tab.html",'<div class="main animate-slide-left" ng-if="!vm_cg.group">\n    <md-subheader>\n        <div layout="row">\n            \x3c!-- START Search --\x3e\n            <div class="search" layout="row" layout-align="start center" flex>\n                <md-icon md-font-icon="icon-magnify" class="icon search-icon"></md-icon>\n                <input ng-model="vm_cg.search" type="text" translate translate-attr-placeholder="QUICKPANEL.SEARCH" flex>\n            </div>\n            \x3c!-- END Search --\x3e\n\n            \x3c!-- START New Group --\x3e\n            <md-button ng-if="vm_cg.currentUser.role !== \'agent\'" class="md-icon-button" aria-label="New" ng-click="vm_cg.addGroup(null, $event)">\n                <md-icon md-font-icon="icon-account-multiple-plus" class="icon"></md-icon>\n            </md-button>\n            \x3c!-- END New Group --\x3e\n        </div>\n    </md-subheader>\n\n    <md-divider></md-divider>\n\n    \x3c!-- START Groups --\x3e\n    <md-list class="recent no-padding">\n        \x3c!-- START Group --\x3e\n        <md-list-item class="contact" ng-repeat="group in vm_cg.groupsToArray() | filter:vm_cg.search" ng-click="vm_cg.toggleChat(group)">\n            <img src="assets/images/avatars/group.png" class="md-avatar" alt="{{group.name}}" />\n            <div ng-if="group.unreadGroupMessages" class="md-accent-bg unread-message-count">{{group.unreadGroupMessages}}</div>\n            <div class="md-list-item-text">\n                <div layout="row">\n                    <h3>{{group.name}}</h3>\n                </div>\n            </div>\n\n            <md-button ng-if="vm_cg.currentUser.role !== \'agent\'" class="md-secondary md-icon-button" aria-label="Remove" ng-click="vm_cg.deleteGroup(group, $event)">\n                <md-icon md-font-icon="icon-delete" class="icon s18"></md-icon>\n            </md-button>\n\n            <md-divider ng-if="!$last"></md-divider>\n        </md-list-item>\n        <md-list-item>\n            <div ng-if="!vm_cg.groupsToArray().length" layout="row" layout-align="center center" flex>\n                <span>{{\'QUICKPANEL.NO_AVAILABLE_GROUPS\' | translate}}</span>\n            </div>\n        </md-list-item>\n        \x3c!-- END Group --\x3e\n    </md-list>\n    \x3c!-- END Groups --\x3e\n</div>\n\n<div class="chat animate-slide-right" ng-if="vm_cg.group" layout="column">\n    <md-toolbar class="md-accent">\n        <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n\n            <div layout="row" layout-align="start center">\n                <md-button class="md-icon-button" ng-click="vm_cg.back()" aria-label="Back" translate translate-attr-aria-label="QUICKPANEL.BACK">\n                    <md-icon md-font-icon="icon-keyboard-backspace"></md-icon>\n                </md-button>\n                <h4>\n                    <span translate="QUICKPANEL.YOU" translate-values=\'{participants: vm_cg.participants}\'></span>\n                </h4>\n            </div>\n\n            <div layout="row" layout-align="end center">\n                <md-button ng-if="vm_cg.license.webrtc && vm_cg.currentUser.role === \'agent\' && vm_cg.currentUser.showWebBar === 2 && vm_cg.user.role === \'agent\' && vm_cg.user.showWebBar === 2" class="md-icon-button" aria-label="Call" translate translate-attr-aria-label="QUICKPANEL.CALL"\n                    ng-click="vm_cg.webcall(vm_cg.user.name)">\n                    <md-icon md-font-icon="icon-phone"></md-icon>\n                </md-button>\n            </div>\n        </div>\n\n    </md-toolbar>\n    <md-content flex layout-paddings ms-scroll id="chat-group-dialog">\n        <div layout="row" ng-repeat="message in vm_cg.group.messages" class="message-row" ng-class="message.FromId === vm_cg.currentUser.id ? \'user\' : \'contact\'">\n            <img ng-if="message.FromId !== vm_cg.currentUser.id" ng-src="{{\'api/users/\' + message.FromId + \'/avatar\'}}" class="avatar" alt="{{vm_cg.user.fullname}}" />\n            <img ng-if="message.FromId === vm_cg.currentUser.id" class="avatar" ng-src="{{vm_cg.currentUser.userpic ? \'api/users/\' + vm_cg.currentUser.id + \'/avatar\' : \'assets/images/avatars/profile.png\'}}">\n            <div class="bubble" flex>\n                <div ng-if="message.FromId !== vm_cg.currentUser.id">\n                    <span style="font-size: 12px;">{{vm_cg.group.membersByKeys[message.FromId].fullname}}</span>\n                </div>\n                <span class="message" ng-bind-html="message.body | embed:{linkTarget:\'_blank\',emoji:false,fontSmiley:false}"></span>\n                <div layout="row" layout-align="end center">\n                    <span class="time secondary-text" style="margin-top: 0px;">{{message.createdAt | formatdate }}</span>\n                    <md-icon ng-if="message.FromId === vm_cg.currentUser.id" class="s16 margin-5" style="cursor: pointer;" md-font-icon="icon-information-outline" ng-click="vm_cg.showMessageInfo($event, message)"></md-icon>\n                </div>\n            </div>\n        </div>\n    </md-content>\n\n    <form ng-if="(vm_cg.currentUser.role !== \'agent\') || vm_cg.group.write" ng-submit="vm_cg.reply()" layout="row" class="reply" layout-align="start center">\n        <textarea ng-keyup="$event.keyCode == 13 ? vm_cg.reply() : null" flex ng-model="vm_cg.replyMessage" placeholder="Type and hit enter to send message" translate translate-attr-placeholder="QUICKPANEL.REPLY_PLACEHOLDER" autofocus></textarea>\n\n        <md-button class="md-fab md-mini" type="submit" aria-label="Send message" translate translate-attr-aria-label="QUICKPANEL.SEND_MESSAGE">\n            <md-icon md-font-icon="icon-send"></md-icon>\n        </md-button>\n    </form>\n</div>'),e.put("app/quick-panel/tabs/groups/info/dialog.html",'<md-dialog class="group-dialog" aria-label="New ChatGroup">\n    <form name="groupForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">{{ vm.title | translate }}</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog(null)">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div ng-if="vm.data.messages[$index].FromId !== vm.data.messages[$index].ToId" ng-repeat="user in vm.data.users" layout-margin>\n                <div layout="row">\n                    <div layout="row" layout-align="start center">\n                        <img ng-src="{{user.userpic ? \'api/users/\' + user.id + \'/avatar\' : \'assets/images/avatars/profile.png\'}}" class="avatar" alt="{{user.fullname}}" />\n                        <span>{{user.fullname}}</span>\n                    </div>\n                    <div layout="row" layout-align="end center" flex>\n                        <md-icon class="s16 margin-5" md-font-icon="{{vm.data.messages[$index].read ? \'icon-check-all md-accent\' : \'icon-check\'}}"></md-icon>\n                        <span class="time secondary-text">{{vm.data.messages[$index].updatedAt | formatdate }}</span>\n                    </div>\n                </div>\n                <div>\n                    <md-divider ng-if="!$last"></md-divider>\n                </div>\n            </div>\n        </md-dialog-content>\n    </form>\n</md-dialog>'),e.put("app/quick-panel/tabs/today/today-tab.html",'<md-list class="date">\n    <md-subheader class="md-no-sticky"><span translate="QUICKPANEL.TODAY">Today</span></md-subheader>\n    <md-list-item class="md-display-1 md-2-line">\n        <div class="secondary-text">\n            <div translate="QUICKPANEL.{{ (vm.date | date:\'EEEE\').toUpperCase() }}"></div>\n            <div layout="row" layout-align="start start">\n                <span> {{vm.date | date:\'d\'}}</span>\n                <span class="md-subhead">th</span>\n                <span translate="QUICKPANEL.{{ (vm.date | date:\'MMMM\').toUpperCase() }}"></span>\n            </div>\n        </div>\n    </md-list-item>\n</md-list>\n\n\x3c!-- <md-divider></md-divider>\n\n<md-list>\n    <md-subheader class="md-no-sticky"><span translate="QUICKPANEL.EVENTS">Events</span></md-subheader>\n\n    <md-list-item class="md-2-line" ng-repeat="event in vm.events" ng-click="dummyFunction()">\n        <div class="md-list-item-text">\n            <h3>{{event.title}}</h3>\n\n            <p>{{event.detail}}</p>\n        </div>\n    </md-list-item>\n</md-list>\n\n<md-divider></md-divider>\n\n<md-list>\n    <md-subheader class="md-no-sticky"><span translate="QUICKPANEL.NOTES">Notes</span></md-subheader>\n    <md-list-item class="md-2-line" ng-repeat="note in vm.notes" ng-click="dummyFunction()">\n        <div class="md-list-item-text">\n            <h3>{{note.title}}</h3>\n\n            <p>{{note.detail}}</p>\n        </div>\n    </md-list-item>\n</md-list>\n\n<md-divider></md-divider>\n\n<md-list>\n    <md-subheader class="md-no-sticky"><span translate="QUICKPANEL.QUICK_SETTINGS">Quick Settings</span></md-subheader>\n\n    <md-list-item>\n        <h3 translate="QUICKPANEL.NOTIFICATIONS">Notifications</h3>\n        <md-switch class="md-secondary" ng-model="vm.settings.notify" aria-label="Notifications" translate\n                   translate-attr-aria-label="QUICKPANEL.NOTIFICATIONS"></md-switch>\n    </md-list-item>\n\n    <md-list-item>\n        <h3 translate="QUICKPANEL.CLOUD_SYNC">Cloud Sync</h3>\n        <md-switch class="md-secondary" ng-model="vm.settings.cloud" aria-label="Cloud Sync" translate\n                   translate-attr-aria-label="QUICKPANEL.CLOUD_SYNC"></md-switch>\n    </md-list-item>\n\n    <md-list-item>\n        <h3 translate="QUICKPANEL.RETRO_THRUSTERS">Retro Thrusters</h3>\n        <md-switch class="md-secondary md-warn" ng-model="vm.settings.retro" aria-label="Retro Thrusters" translate\n                   translate-attr-aria-label="QUICKPANEL.RETRO_THRUSTERS"></md-switch>\n    </md-list-item>\n</md-list> --\x3e'),e.put("app/reset/reset.html",'<div id="reset-password" class="flex-scrollable" layout="column" ng-init="vm.onInit()" ms-scroll>\n    <div id="reset-password-form-wrapper" layout="column" layout-align="center center">\n        <div id="reset-password-form" class="md-whiteframe-8dp">\n\n            <img src="/api/settings/1/logo_login" alt="logo_login" class="logo_login" />\n\n            <div class="title" translate="RESETPASSWORD.TITLE">Reset your password</div>\n\n            <form name="resetPasswordForm" novalidate>\n\n                <md-input-container class="md-block" md-no-float>\n                    <input type="password" name="password" ng-model="vm.form.password" ng-pattern="vm.passwordPattern" placeholder="Password" translate translate-attr-placeholder="RESETPASSWORD.PASSWORD" required>\n                    <div ng-messages="resetPasswordForm.password.$error" role="alert">\n                        <div ng-message="required">\n                            <span translate="RESETPASSWORD.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                        </div>\n                        <div ng-message="pattern">\n                            <span translate="RESETPASSWORD.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                        </div>\n                    </div>\n                </md-input-container>\n\n                <md-input-container class="md-block" md-no-float>\n                    <input type="password" name="passwordConfirm" ng-model="vm.form.passwordConfirm" placeholder="Password (Confirm)" match-password="password" translate translate-attr-placeholder="RESETPASSWORD.PASSWORD_CONFIRM">\n                    <div ng-messages="resetPasswordForm.passwordConfirm.$error" role="alert">\n                        <div ng-message="passwordMatch">\n                            <span translate="TOOLBAR.ERRORS.CONFIRM_NOT_MATCH">Your password did not match</span>\n                        </div>\n                    </div>\n                </md-input-container>\n\n                <md-button type="button" ng-click="vm.resetPassword()" class="md-raised md-accent submit-button" aria-label="UPDATE MY PASSWORD" ng-disabled="resetPasswordForm.$invalid || resetPasswordForm.$pristine" translate="RESETPASSWORD.UPDATE_PASSWORD" translate-attr-aria-label="RESETPASSWORD.UPDATE_PASSWORD">\n                    RESET MY PASSWORD\n                </md-button>\n            </form>\n        </div>\n    </div>\n</div>'),e.put("app/toolbar/changepassword/changepassword.html",'<md-dialog class="user-dialog" aria-label="{{vm.name}}">\n    <form name="changePasswordForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-accent md-hue-2">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span ng-if="vm.reset" class="title" translate="TOOLBAR.RESETPASSWORD">Reset Password</span>\n                <span ng-if="!vm.reset" class="title" translate="TOOLBAR.CHANGEPASSWORD">Change Password</span>\n                <md-button ng-if="!vm.reset" class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <md-input-container class="md-block">\n                <label translate="TOOLBAR.OLD_PASSWORD">Old Password</label>\n                <input type="password" name="oldPassword" ng-model="vm.oldPassword" placeholder="Password" translate translate-attr-placeholder="TOOLBAR.OLD_PASSWORD" required>\n                <div ng-messages="changePasswordForm.password.$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLBAR.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLBAR.NEW_PASSWORD">New Password</label>\n                <input type="password" name="password" ng-model="vm.password" placeholder="Password" ng-pattern="vm.passwordPattern" translate translate-attr-placeholder="TOOLBAR.NEW_PASSWORD" required>\n                <div ng-messages="changePasswordForm.password.$error" role="alert">\n                    <div ng-message="required">\n                        <span translate="TOOLBAR.ERRORS.PASSWORD_REQUIRED">Password field is required</span>\n                    </div>\n                    <div ng-message="pattern">\n                        <span translate="TOOLBAR.ERRORS.SECURE_PASSWORD_PATTERN">Must contain at least 8 characters, with a minimum of 1 lowercase letter, 1 uppercase letter, 1 numeric character and 1 special character ~!@#$%^&-_=+[{]}.</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <md-input-container class="md-block">\n                <label translate="TOOLBAR.CONFIRM_PASSWORD">Confirm Password</label>\n                <input type="password" match-password="password" name="confirmPassword" ng-model="confirmPassword">\n                <div ng-messages="changePasswordForm.confirmPassword.$error" role="alert" multiple>\n                    <div ng-message="required">\n                        <span translate="TOOLBAR.ERRORS.CONFIRM_REQUIRED">Confirm field is required</span>\n                    </div>\n                    <div ng-message="passwordMatch">\n                        <span translate="TOOLBAR.ERRORS.CONFIRM_NOT_MATCH">Your password did not match</span>\n                    </div>\n                </div>\n            </md-input-container>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center">\n            <div layout="row" layout-align="start center">\n                <md-button type="submit" ng-click="vm.savePassword()" class="send-button md-accent md-raised" ng-disabled="changePasswordForm.$invalid || changePasswordForm.$pristine" aria-label="SAVE" translate="TOOLBAR.SAVE" translate-attr-aria-label="TOOLBAR.SAVE">\n                    SAVE\n                </md-button>\n            </div>\n        </md-dialog-actions>\n    </form>\n</md-dialog>'),e.put("app/toolbar/layouts/vertical-navigation/toolbar.html",'<div layout="row" layout-align="start center">\n    <div layout="row" layout-align="start center" flex>\n        <md-button id="navigation-toggle" class="md-icon-button" ng-click="vm.toggleSidenav(\'navigation\')" hide-gt-sm aria-label="Toggle navigation" translate translate-attr-aria-label="TOOLBAR.TOGGLE_NAVIGATION">\n            <md-icon md-font-icon="icon-menu" class="icon"></md-icon>\n        </md-button>\n\n        <ms-shortcuts ng-if="!vm.isAgent()"></ms-shortcuts>\n\n        <div class="toolbar-separator"></div>\n\n        <div ng-if="vm.license.demo" class="blink md-padding">\n            <span class="md-warn-fg" translate="TOOLBAR.TRIAL_VERSION">Trial Version</span>\n        </div>\n\n        <div ng-if="vm.isAgent()" class="logo" layout-padding-left-8 layout="row" layout-align="start center">\n            <span class="logo-image"><img src="/api/settings/1/logo" alt="logo" /></span>\n            <span ng-show="vm.isAgent() && (vm.user.showWebBar != 2)" class="logo-text text-truncate">{{ vm.getLogo() | uppercase }}</span>\n        </div>\n\n        \x3c!-- phonebar directive WebRtc type--\x3e\n        <ms-phonebar class="ms-phonebar" ng-if="vm.isAgent() && (vm.user.showWebBar == 2)" conf="vm.conf" flex></ms-phonebar>\n        \x3c!-- phonebar directive --\x3e\n    </div>\n\n    <div layout="row" layout-align="start center">\n\n        <md-progress-circular id="toolbar-progress" ng-if="$root.loadingProgress" class="md-accent" md-diameter="32"></md-progress-circular>\n\n        \x3c!-- Pause Management --\x3e\n        <div ng-if="vm.isAgent() && (vm.user.showWebBar != 0)" layout="row" layout-align="end center">\n            <div class="toolbar-separator"></div>\n\n            <div class="border brad-5" layout="row" layout-align="center center" layout-margin>\n                <md-button ng-if="vm.user.voicePause" class="md-icon-button no-margin" ng-click="vm.unpause()">\n                    <md-icon md-font-icon="icon-play-circle-outline" class="icon s24"></md-icon>\n                    <md-tooltip md-direction="bottom">{{\'TOOLBAR.RESUME\' | translate}}</md-tooltip>\n                </md-button>\n\n                <md-button ng-disabled="vm.user.voicePause && \'DEFAULT PAUSE\' === vm.user.pauseType" class="md-icon-button no-margin" ng-click="vm.pause()">\n                    <md-icon md-font-icon="icon-pause-circle-outline" class="icon s24"></md-icon>\n                    <md-tooltip md-direction="bottom">{{\'TOOLBAR.PAUSE\' | translate}}</md-tooltip>\n                </md-button>\n\n                <md-menu>\n                    <md-button aria-label="Pauses" class="md-icon-button no-margin" ng-click="$mdOpenMenu($event)">\n                        <md-icon md-menu-origin md-font-icon="icon-dots-vertical"></md-icon>\n                    </md-button>\n                    <md-menu-content width="4">\n                        <md-menu-item ng-if="!vm.pauses.length">\n                            <md-button disabled="disabled">\n                                <md-icon md-font-icon="icon-pause-octagon" md-menu-align-target></md-icon>\n                                {{\'TOOLBAR.NO_PAUSES_AVAILABLE\' | translate}}\n                            </md-button>\n                        </md-menu-item>\n                        <md-menu-item ng-repeat="pause in vm.pauses">\n                            <md-button ng-disabled="vm.user.voicePause && pause.name === vm.user.pauseType" ng-click="vm.pause(pause.name)">\n                                <md-icon md-font-icon="icon-pause-circle" md-menu-align-target></md-icon>\n                                {{pause.name}}\n                            </md-button>\n                        </md-menu-item>\n                    </md-menu-content>\n                </md-menu>\n            </div>\n        </div>\n        \x3c!-- Pause Management --\x3e\n\n        <div class="h5 padding-10" ng-if="vm.isAgent() && (vm.user.showWebBar != 0)">\n            <div layout="row" layout-align="space-between center">\n                <timer ng-if="vm.user.lastLoginAt" start-time="vm.user.lastLoginAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                <md-tooltip>{{\'TOOLBAR.LOGIN_TIME\' | translate}}</md-tooltip>\n                <md-icon md-font-icon="icon-timelapse" class="icon s16"></md-icon>\n            </div>\n            <div layout="row" layout-align="center center" ng-if="vm.user.voicePause">\n                <timer start-time="vm.user.lastPauseAt" interval="1000">{{hhours}}:{{mminutes}}:{{sseconds}}</timer>\n                <md-tooltip>{{\'TOOLBAR.PAUSE_TIME\' | translate}}</md-tooltip>\n                <md-icon md-font-icon="icon-coffee" class="icon s16"></md-icon>\n            </div>\n            <div ng-if="vm.user.voicePause">\n                <span class="blink red-fg">{{vm.user.pauseType || \'default\' | uppercase}}</span>\n            </div>\n        </div>\n\n        <div class="toolbar-separator" ng-if="vm.isAgent() && (vm.user.showWebBar != 0)"></div>\n\n        <md-menu-bar id="user-menu">\n            <md-menu md-position-mode="left bottom">\n                <md-button class="user-button" ng-click="$mdOpenMenu()" aria-label="User settings" translate translate-attr-aria-label="TOOLBAR.USER_SETTINGS">\n                    <div layout="row" layout-align="space-between center">\n                        <div class="avatar-wrapper">\n                            <img md-menu-align-target class="avatar" src="assets/images/avatars/profile.png" ng-if="!vm.user.userpic">\n                            <img md-menu-align-target class="avatar" ng-src="api/users/{{vm.user.id}}/avatar" ng-if="vm.user.userpic">\n                            <md-icon md-font-icon ng-class="vm.userStatus.icon" ng-style="{\'color\': vm.userStatus.color }" class="icon status s16"></md-icon>\n                        </div>\n                        <div layout="column" layout-align="center center" class="padding-horizontal-5">\n                            <span class="font-size-14 md-subhead">{{vm.user.fullname}}</span>\n                            <span class="font-size-12 md-subhead">{{vm.user.name}} &#60;{{vm.user.internal}}&#62;</span>\n                        </div>\n\n                        <md-icon md-font-icon="icon-chevron-down" class="icon s16" hide-xs></md-icon>\n                    </div>\n                </md-button>\n\n                <md-menu-content width="3">\n                    <md-menu-item ng-if="vm.user.showWebBar == 2 && vm.user.phoneBarEnableSettings" class="md-indent">\n                        <md-icon md-font-icon="icon-cog" class="icon"></md-icon>\n                        <md-button ng-click="vm.openSettings($event)" ng-disabled="!vm.license.webrtc"><span translate="TOOLBAR.SETTINGS">SETTINGS</span></md-button>\n                    </md-menu-item>\n\n                    <md-menu-item class="md-indent">\n                        <md-icon md-font-icon="icon-key-variant" class="icon"></md-icon>\n                        <md-button ng-click="vm.changePassword($event)"><span translate="TOOLBAR.CHANGEPASSWORD">Change Password</span></md-button>\n                    </md-menu-item>\n\n                    <md-menu-divider></md-menu-divider>\n\n                    <md-menu-item class="md-indent">\n                        <md-icon md-font-icon="icon-logout" class="icon"></md-icon>\n                        <md-button ng-click="vm.logout()">Logout</md-button>\n                    </md-menu-item>\n                </md-menu-content>\n            </md-menu>\n        </md-menu-bar>\n\n        <div class="toolbar-separator"></div>\n\n        <md-button ng-if="vm.user.role === \'agent\' && vm.license.dialer" class="preview-button no-margin" ng-disabled="vm.disable" ng-click="vm.preview($event)" aria-label="Language" md-menu-origin md-menu-align-target>\n            <div ng-if="vm.contacts" class="md-accent-bg open-contact-count">{{vm.contacts > 99 ? \'99+\' : vm.contacts}}</div>\n            <md-icon md-font-icon="icon-fire" class="icon red-900-fg"></md-icon>\n            <md-tooltip><span translate="TOOLBAR.PREVIEW">Preview</span></md-tooltip>\n        </md-button>\n\n        <ms-search-bar ng-if="vm.user.role !== \'agent\'" on-search="vm.search(query)" on-result-click="vm.searchResultClick(item)" debounce="300" collapse-on-blur="true"></ms-search-bar>\n\n        <md-menu id="language-menu" md-offset="0 72" md-position-mode="target-right target" layout="column" layout-align="center center">\n            <md-button class="md-icon-button no-margin" ng-click="$mdOpenMenu()" aria-label="Language" md-menu-origin md-menu-align-target>\n                <div layout="row" layout-align="center center">\n                    <img class="flag" ng-src="assets/images/flags/{{vm.selectedLanguage.flag}}.png">\n                </div>\n            </md-button>\n\n            <md-menu-content width="3" id="language-menu-content">\n                <md-menu-item ng-repeat="(iso, lang) in vm.languages">\n                    <md-button ng-click="vm.changeLanguage(lang)" aria-label="{{lang.title}}" translate translate-attr-aria-label="{{lang.title}}">\n                        <span layout="row" layout-align="start center">\n                          <img class="flag" ng-src="assets/images/flags/{{lang.flag}}.png">\n                          <span translate="{{lang.translation}}">{{lang.title}}</span>\n                        </span>\n                    </md-button>\n                </md-menu-item>\n            </md-menu-content>\n        </md-menu>\n\n        <div class="toolbar-separator"></div>\n\n        <md-button ng-if="vm.license.gray && vm.user.role !== \'agent\'" class="md-icon-button" ui-sref="app.settings.license" aria-label="Toggle quick panel">\n            <md-icon md-font-icon="icon-alert" class="icon md-warn blink"></md-icon>\n        </md-button>\n        <md-button ng-if="vm.license.gray && vm.user.role === \'agent\'" class="md-icon-button" aria-label="Toggle quick panel">\n            <md-icon md-font-icon="icon-alert" class="icon md-warn blink"></md-icon>\n        </md-button>\n\n        <div ng-if="vm.license.gray" class="toolbar-separator"></div>\n\n        <md-button id="quick-panel-toggle" class="md-icon-button" ng-click="vm.toggleSidenav(\'quick-panel\')" aria-label="Toggle quick panel" translate translate-attr-aria-label="TOOLBAR.TOGGLE_QUICK_PANEL">\n            <div ng-if="(vm.unreadTotalMessages + vm.unreadTotalGroupMessages)" class="md-accent-bg unread-message-count">{{vm.unreadTotalMessages + vm.unreadTotalGroupMessages}}</div>\n            <md-icon md-font-icon="icon-format-list-bulleted" class="icon"></md-icon>\n        </md-button>\n    </div>\n</div>'),e.put("app/toolbar/preview/dialog.html",'<md-dialog class="preview-dialog" aria-label="preview">\n    <form name="previewForm" class="md-inline-form" novalidate>\n        <md-toolbar class="md-background-bg">\n            <div class="md-toolbar-tools" layout="row" layout-align="space-between center">\n                <span class="title">Preview</span>\n                <md-button class="md-icon-button" ng-click="vm.closeDialog()">\n                    <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>\n                </md-button>\n            </div>\n        </md-toolbar>\n\n        <md-dialog-content ms-scroll>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n            <div layout="row" ng-if="vm.preview">\n                <div class="md-padding" layout="column" flex="30">\n                    <md-input-container ng-if="vm.preview.Queue.name" class="md-block">\n                        <label translate="VOICE.QUEUE">Queue</label>\n                        <input type="text" ng-model="vm.preview.Queue.name" disabled="true">\n                    </md-input-container>\n                    <md-input-container ng-if="vm.preview.List.name" class="md-block">\n                        <label translate="CONTACTMANAGER.LIST">List</label>\n                        <input type="text" ng-model="vm.preview.List.name" disabled="true">\n                    </md-input-container>\n                </div>\n                <md-divider></md-divider>\n                <div class="md-padding" layout="column" flex="70">\n                    <md-input-container ng-if="vm.preview.Contact.firstName" class="md-block">\n                        <label translate="CONTACTMANAGER.FIRSTNAME">FirstName</label>\n                        <input type="text" ng-model="vm.preview.Contact.firstName" disabled="true">\n                    </md-input-container>\n                    <md-input-container ng-if="vm.preview.Contact.lastName" class="md-block">\n                        <label translate="CONTACTMANAGER.LASTNAME">LastName</label>\n                        <input type="text" ng-model="vm.preview.Contact.lastName" disabled="true">\n                    </md-input-container>\n                    <md-input-container ng-if="vm.preview.Contact.phone" class="md-block">\n                        <label translate="CONTACTMANAGER.PHONE">Phone</label>\n                        <input type="text" ng-model="vm.preview.Contact.phone" disabled="true">\n                    </md-input-container>\n                    <md-input-container ng-if="vm.preview.Contact.email" class="md-block">\n                        <label translate="CONTACTMANAGER.EMAIL">Email</label>\n                        <input type="text" ng-model="vm.preview.Contact.email" disabled="true">\n                    </md-input-container>\n                </div>\n            </div>\n            <div layout="row" ng-if="!vm.preview">\n                <span>no contacts available</span>\n            </div>\n            <div class="error-list">\n                <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">\n                    <div>\n                        <span class="message">{{error.message}}</span>\n                        <span class="type">({{error.type}})</span>\n                    </div>\n                    <md-button class="md-icon-button">\n                        <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>\n                    </md-button>\n                </div>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout="row" layout-align="space-between center" style="padding-right: 16px;">\n            <md-button type="submit" ng-disabled="vm.disable" ng-click="vm.originatePreview($event)" class="send-button md-accent md-raised" aria-label="CALL" translate="TOOLS.CALL" translate-attr-aria-label="TOOLS.CALL">\n                CALL\n            </md-button>\n            <md-button type="submit" ng-disabled="vm.disableGetContact" ng-click="vm.nextContact($event)" class="send-button md-accent md-raised" aria-label="NEXTCONTACT" translate="TOOLS.NEXTCONTACT" translate-attr-aria-label="TOOLS.NEXTCONTACT">\n                NEXTCONTACT\n            </md-button>\n        </md-dialog-actions>\n    </form>\n</md-dialog>')}]);
\ No newline at end of file
index 8b7d3c5..30dc82f 100644 (file)
@@ -1 +1 @@
-var _0x90d1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x56\x49\x52\x54\x55\x41\x4C","\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","\x63\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x72","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x6A\x73\x63\x72\x69\x70\x74\x79","\x75\x72\x6C\x46\x6F\x72\x77\x61\x72\x64","\x62\x72\x6F\x77\x73\x65\x72","\x41\x6C\x6C\x6F\x77\x65\x64\x20\x76\x61\x6C\x75\x65\x73\x3A\x20\x63\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x72\x2C\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2C\x20\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x2C\x20\x6A\x73\x63\x72\x69\x70\x74\x79\x2C\x20\x75\x72\x6C\x46\x6F\x72\x77\x61\x72\x64\x2C\x20\x62\x72\x6F\x77\x73\x65\x72","\x63\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x72\x5B\x4C\x69\x73\x74\x49\x64\x5D\x2C\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x5B\x69\x6E\x74\x4E\x61\x6D\x65\x28\x7A\x65\x6E\x64\x65\x73\x6B\x29\x5D\x2C\x20\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5B\x50\x6F\x70\x75\x70\x28\x30\x29\x2C\x55\x52\x4C\x28\x31\x29\x2C\x57\x69\x6E\x41\x70\x70\x28\x32\x29\x5D\x2C\x20\x75\x72\x6C\x46\x6F\x72\x77\x61\x72\x64\x5B\x47\x45\x54\x2C\x50\x4F\x53\x54\x5D\x2C\x20\x62\x72\x6F\x77\x73\x65\x72\x5B\x54\x65\x6D\x70\x6C\x61\x74\x65\x49\x64\x28\x30\x29\x2C\x55\x52\x4C\x28\x31\x29\x5D","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x5B\x41\x63\x63\x6F\x75\x6E\x74\x49\x64\x5D\x2C\x20\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5B\x54\x65\x6D\x70\x6C\x61\x74\x65\x49\x64\x2C\x55\x52\x4C\x2C\x57\x69\x6E\x41\x70\x70\x50\x61\x74\x68\x5D\x2C\x20\x75\x72\x6C\x46\x6F\x72\x77\x61\x72\x64\x5B\x55\x52\x4C\x5D","\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5B\x4E\x55\x4C\x4C\x2C\x4E\x55\x4C\x4C\x2C\x57\x69\x6E\x41\x70\x70\x41\x72\x67\x75\x6D\x65\x6E\x74\x73\x5D"];_0x90d1[0];var Sequelize=require(_0x90d1[1]);module[_0x90d1[2]]= {name:{type:Sequelize[_0x90d1[3]],get:function(_0x6da7x2){return this[_0x90d1[5]](_0x90d1[4])}},action:{type:Sequelize[_0x90d1[6]],allowNull:false,validate:{isIn:{args:[[_0x90d1[7],_0x90d1[8],_0x90d1[9],_0x90d1[10],_0x90d1[11],_0x90d1[12]]],msg:_0x90d1[13]}},comment:_0x90d1[13]},data1:{type:Sequelize.STRING(4096),comment:_0x90d1[14]},data2:{type:Sequelize.STRING(4096),comment:_0x90d1[15]},data3:{type:Sequelize.STRING(4096),comment:_0x90d1[16]},data4:{type:Sequelize.STRING(4096)},data5:{type:Sequelize.STRING(4096)},data6:{type:Sequelize[_0x90d1[6]]}}
\ No newline at end of file
+var _0x9ecb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x56\x49\x52\x54\x55\x41\x4C","\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","\x63\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x72","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x6A\x73\x63\x72\x69\x70\x74\x79","\x75\x72\x6C\x46\x6F\x72\x77\x61\x72\x64","\x62\x72\x6F\x77\x73\x65\x72","\x41\x6C\x6C\x6F\x77\x65\x64\x20\x76\x61\x6C\x75\x65\x73\x3A\x20\x63\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x72\x2C\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2C\x20\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x2C\x20\x6A\x73\x63\x72\x69\x70\x74\x79\x2C\x20\x75\x72\x6C\x46\x6F\x72\x77\x61\x72\x64\x2C\x20\x62\x72\x6F\x77\x73\x65\x72","\x63\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x72\x5B\x4C\x69\x73\x74\x49\x64\x5D\x2C\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x5B\x69\x6E\x74\x4E\x61\x6D\x65\x28\x7A\x65\x6E\x64\x65\x73\x6B\x29\x5D\x2C\x20\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5B\x50\x6F\x70\x75\x70\x28\x30\x29\x2C\x55\x52\x4C\x28\x31\x29\x2C\x57\x69\x6E\x41\x70\x70\x28\x32\x29\x5D\x2C\x20\x75\x72\x6C\x46\x6F\x72\x77\x61\x72\x64\x5B\x47\x45\x54\x2C\x50\x4F\x53\x54\x5D\x2C\x20\x62\x72\x6F\x77\x73\x65\x72\x5B\x54\x65\x6D\x70\x6C\x61\x74\x65\x49\x64\x28\x30\x29\x2C\x55\x52\x4C\x28\x31\x29\x5D","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x5B\x41\x63\x63\x6F\x75\x6E\x74\x49\x64\x5D\x2C\x20\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5B\x54\x65\x6D\x70\x6C\x61\x74\x65\x49\x64\x2C\x55\x52\x4C\x2C\x57\x69\x6E\x41\x70\x70\x50\x61\x74\x68\x5D\x2C\x20\x75\x72\x6C\x46\x6F\x72\x77\x61\x72\x64\x5B\x55\x52\x4C\x5D","\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5B\x4E\x55\x4C\x4C\x2C\x4E\x55\x4C\x4C\x2C\x57\x69\x6E\x41\x70\x70\x41\x72\x67\x75\x6D\x65\x6E\x74\x73\x5D"];_0x9ecb[0];var Sequelize=require(_0x9ecb[1]);module[_0x9ecb[2]]= {name:{type:Sequelize[_0x9ecb[3]],get:function(_0xda33x2){return this[_0x9ecb[5]](_0x9ecb[4])}},action:{type:Sequelize[_0x9ecb[6]],allowNull:false,validate:{isIn:{args:[[_0x9ecb[7],_0x9ecb[8],_0x9ecb[9],_0x9ecb[10],_0x9ecb[11],_0x9ecb[12]]],msg:_0x9ecb[13]}},comment:_0x9ecb[13]},data1:{type:Sequelize.STRING(4096),comment:_0x9ecb[14]},data2:{type:Sequelize.STRING(4096),comment:_0x9ecb[15]},data3:{type:Sequelize.STRING(4096),comment:_0x9ecb[16]},data4:{type:Sequelize.STRING(4096)},data5:{type:Sequelize.STRING(4096)},data6:{type:Sequelize[_0x9ecb[6]]}}
\ No newline at end of file
index c3b24a3..8a8d6e8 100644 (file)
@@ -1 +1 @@
-var _0xcb84=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x64","\x62\x6F\x64\x79","\x63\x61\x74\x63\x68","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x41\x63\x74\x69\x6F\x6E"];_0xcb84[0];var jsonpatch=require(_0xcb84[1]);var rp=require(_0xcb84[2]);var moment=require(_0xcb84[3]);var BPromise=require(_0xcb84[4]);var Mustache=require(_0xcb84[5]);var util=require(_0xcb84[6]);var path=require(_0xcb84[7]);var sox=require(_0xcb84[8]);var csv=require(_0xcb84[9]);var ejs=require(_0xcb84[10]);var fs=require(_0xcb84[11]);var _=require(_0xcb84[12]);var squel=require(_0xcb84[13]);var crypto=require(_0xcb84[14]);var jsforce=require(_0xcb84[15]);var deskjs=require(_0xcb84[16]);var toCsv=require(_0xcb84[9]);var querystring=require(_0xcb84[17]);var Papa=require(_0xcb84[18]);var qs=require(_0xcb84[19]);var logger=require(_0xcb84[21])(_0xcb84[20]);var utils=require(_0xcb84[22]);var config=require(_0xcb84[23]);var db=require(_0xcb84[25])[_0xcb84[24]];function respondWithStatusCode(_0x9a3dx1a,_0x9a3dx1b){_0x9a3dx1b= _0x9a3dx1b|| 204;return function(_0x9a3dx1c){if(_0x9a3dx1c){return _0x9a3dx1a[_0xcb84[26]](_0x9a3dx1b)};return _0x9a3dx1a[_0xcb84[28]](_0x9a3dx1b)[_0xcb84[27]]()}}function respondWithResult(_0x9a3dx1a,_0x9a3dx1b){_0x9a3dx1b= _0x9a3dx1b|| 200;return function(_0x9a3dx1c){if(_0x9a3dx1c){return _0x9a3dx1a[_0xcb84[28]](_0x9a3dx1b)[_0xcb84[29]](_0x9a3dx1c)}}}function respondWithFilteredResult(_0x9a3dx1a,_0x9a3dx1f){return function(_0x9a3dx1c){if(_0x9a3dx1c){var _0x9a3dx20=_0x9a3dx1c[_0xcb84[30]],_0x9a3dx21=_0x9a3dx1f[_0xcb84[31]],_0x9a3dx22=_0x9a3dx1f[_0xcb84[31]]+ _0x9a3dx1f[_0xcb84[32]],_0x9a3dx1b;if(_0x9a3dx22>= _0x9a3dx20){_0x9a3dx22= _0x9a3dx20;_0x9a3dx1b= 200}else {_0x9a3dx1b= 206};_0x9a3dx1a[_0xcb84[28]](_0x9a3dx1b);return _0x9a3dx1a[_0xcb84[36]](_0xcb84[33],_0x9a3dx21+ _0xcb84[34]+ _0x9a3dx22+ _0xcb84[35]+ _0x9a3dx20)[_0xcb84[29]](_0x9a3dx1c)};return null}}function patchUpdates(_0x9a3dx24){return function(_0x9a3dx1c){try{jsonpatch[_0xcb84[37]](_0x9a3dx1c,_0x9a3dx24,true)}catch(err){return BPromise[_0xcb84[38]](err)};return _0x9a3dx1c[_0xcb84[39]]()}}function saveUpdates(_0x9a3dx26,_0x9a3dx1b){return function(_0x9a3dx1c){if(_0x9a3dx1c){return _0x9a3dx1c[_0xcb84[41]](_0x9a3dx26)[_0xcb84[40]](function(_0x9a3dx27){return _0x9a3dx27})};return null}}function removeEntity(_0x9a3dx1a,_0x9a3dx1b){return function(_0x9a3dx1c){if(_0x9a3dx1c){return _0x9a3dx1c[_0xcb84[42]]()[_0xcb84[40]](function(){_0x9a3dx1a[_0xcb84[28]](204)[_0xcb84[27]]()})}}}function handleEntityNotFound(_0x9a3dx1a,_0x9a3dx1b){return function(_0x9a3dx1c){if(!_0x9a3dx1c){_0x9a3dx1a[_0xcb84[26]](404)};return _0x9a3dx1c}}function handleError(_0x9a3dx1a,_0x9a3dx1b){_0x9a3dx1b= _0x9a3dx1b|| 500;return function(_0x9a3dx2b){logger[_0xcb84[44]](_0x9a3dx2b[_0xcb84[43]]);if(_0x9a3dx2b[_0xcb84[45]]){delete _0x9a3dx2b[_0xcb84[45]]};_0x9a3dx1a[_0xcb84[28]](_0x9a3dx1b)[_0xcb84[46]](_0x9a3dx2b)}}exports[_0xcb84[41]]= function(_0x9a3dx2c,_0x9a3dx1a){if(_0x9a3dx2c[_0xcb84[48]][_0xcb84[47]]){delete _0x9a3dx2c[_0xcb84[48]][_0xcb84[47]]};return db[_0xcb84[52]][_0xcb84[51]]({where:{id:_0x9a3dx2c[_0xcb84[50]][_0xcb84[47]]}})[_0xcb84[40]](handleEntityNotFound(_0x9a3dx1a,null))[_0xcb84[40]](saveUpdates(_0x9a3dx2c[_0xcb84[48]],null))[_0xcb84[40]](respondWithResult(_0x9a3dx1a,null))[_0xcb84[49]](handleError(_0x9a3dx1a,null))};exports[_0xcb84[42]]= function(_0x9a3dx2c,_0x9a3dx1a){return db[_0xcb84[52]][_0xcb84[51]]({where:{id:_0x9a3dx2c[_0xcb84[50]][_0xcb84[47]]}})[_0xcb84[40]](handleEntityNotFound(_0x9a3dx1a,null))[_0xcb84[40]](removeEntity(_0x9a3dx1a,null))[_0xcb84[49]](handleError(_0x9a3dx1a,null))}
\ No newline at end of file
+var _0x39e1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x64","\x62\x6F\x64\x79","\x63\x61\x74\x63\x68","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x41\x63\x74\x69\x6F\x6E"];_0x39e1[0];var jsonpatch=require(_0x39e1[1]);var rp=require(_0x39e1[2]);var moment=require(_0x39e1[3]);var BPromise=require(_0x39e1[4]);var Mustache=require(_0x39e1[5]);var util=require(_0x39e1[6]);var path=require(_0x39e1[7]);var sox=require(_0x39e1[8]);var csv=require(_0x39e1[9]);var ejs=require(_0x39e1[10]);var fs=require(_0x39e1[11]);var _=require(_0x39e1[12]);var squel=require(_0x39e1[13]);var crypto=require(_0x39e1[14]);var jsforce=require(_0x39e1[15]);var deskjs=require(_0x39e1[16]);var toCsv=require(_0x39e1[9]);var querystring=require(_0x39e1[17]);var Papa=require(_0x39e1[18]);var qs=require(_0x39e1[19]);var logger=require(_0x39e1[21])(_0x39e1[20]);var utils=require(_0x39e1[22]);var config=require(_0x39e1[23]);var db=require(_0x39e1[25])[_0x39e1[24]];function respondWithStatusCode(_0x6be3x1a,_0x6be3x1b){_0x6be3x1b= _0x6be3x1b|| 204;return function(_0x6be3x1c){if(_0x6be3x1c){return _0x6be3x1a[_0x39e1[26]](_0x6be3x1b)};return _0x6be3x1a[_0x39e1[28]](_0x6be3x1b)[_0x39e1[27]]()}}function respondWithResult(_0x6be3x1a,_0x6be3x1b){_0x6be3x1b= _0x6be3x1b|| 200;return function(_0x6be3x1c){if(_0x6be3x1c){return _0x6be3x1a[_0x39e1[28]](_0x6be3x1b)[_0x39e1[29]](_0x6be3x1c)}}}function respondWithFilteredResult(_0x6be3x1a,_0x6be3x1f){return function(_0x6be3x1c){if(_0x6be3x1c){var _0x6be3x20=_0x6be3x1c[_0x39e1[30]],_0x6be3x21=_0x6be3x1f[_0x39e1[31]],_0x6be3x22=_0x6be3x1f[_0x39e1[31]]+ _0x6be3x1f[_0x39e1[32]],_0x6be3x1b;if(_0x6be3x22>= _0x6be3x20){_0x6be3x22= _0x6be3x20;_0x6be3x1b= 200}else {_0x6be3x1b= 206};_0x6be3x1a[_0x39e1[28]](_0x6be3x1b);return _0x6be3x1a[_0x39e1[36]](_0x39e1[33],_0x6be3x21+ _0x39e1[34]+ _0x6be3x22+ _0x39e1[35]+ _0x6be3x20)[_0x39e1[29]](_0x6be3x1c)};return null}}function patchUpdates(_0x6be3x24){return function(_0x6be3x1c){try{jsonpatch[_0x39e1[37]](_0x6be3x1c,_0x6be3x24,true)}catch(err){return BPromise[_0x39e1[38]](err)};return _0x6be3x1c[_0x39e1[39]]()}}function saveUpdates(_0x6be3x26,_0x6be3x1b){return function(_0x6be3x1c){if(_0x6be3x1c){return _0x6be3x1c[_0x39e1[41]](_0x6be3x26)[_0x39e1[40]](function(_0x6be3x27){return _0x6be3x27})};return null}}function removeEntity(_0x6be3x1a,_0x6be3x1b){return function(_0x6be3x1c){if(_0x6be3x1c){return _0x6be3x1c[_0x39e1[42]]()[_0x39e1[40]](function(){_0x6be3x1a[_0x39e1[28]](204)[_0x39e1[27]]()})}}}function handleEntityNotFound(_0x6be3x1a,_0x6be3x1b){return function(_0x6be3x1c){if(!_0x6be3x1c){_0x6be3x1a[_0x39e1[26]](404)};return _0x6be3x1c}}function handleError(_0x6be3x1a,_0x6be3x1b){_0x6be3x1b= _0x6be3x1b|| 500;return function(_0x6be3x2b){logger[_0x39e1[44]](_0x6be3x2b[_0x39e1[43]]);if(_0x6be3x2b[_0x39e1[45]]){delete _0x6be3x2b[_0x39e1[45]]};_0x6be3x1a[_0x39e1[28]](_0x6be3x1b)[_0x39e1[46]](_0x6be3x2b)}}exports[_0x39e1[41]]= function(_0x6be3x2c,_0x6be3x1a){if(_0x6be3x2c[_0x39e1[48]][_0x39e1[47]]){delete _0x6be3x2c[_0x39e1[48]][_0x39e1[47]]};return db[_0x39e1[52]][_0x39e1[51]]({where:{id:_0x6be3x2c[_0x39e1[50]][_0x39e1[47]]}})[_0x39e1[40]](handleEntityNotFound(_0x6be3x1a,null))[_0x39e1[40]](saveUpdates(_0x6be3x2c[_0x39e1[48]],null))[_0x39e1[40]](respondWithResult(_0x6be3x1a,null))[_0x39e1[49]](handleError(_0x6be3x1a,null))};exports[_0x39e1[42]]= function(_0x6be3x2c,_0x6be3x1a){return db[_0x39e1[52]][_0x39e1[51]]({where:{id:_0x6be3x2c[_0x39e1[50]][_0x39e1[47]]}})[_0x39e1[40]](handleEntityNotFound(_0x6be3x1a,null))[_0x39e1[40]](removeEntity(_0x6be3x1a,null))[_0x39e1[49]](handleError(_0x6be3x1a,null))}
\ No newline at end of file
index c993671..fb997f3 100644 (file)
@@ -1 +1 @@
-var _0x21cb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x61\x63\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x63\x74\x69\x6F\x6E","\x74\x6F\x6F\x6C\x73\x5F\x61\x63\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x21cb[0];var _=require(_0x21cb[1]);var util=require(_0x21cb[2]);var logger=require(_0x21cb[4])(_0x21cb[3]);var moment=require(_0x21cb[5]);var BPromise=require(_0x21cb[6]);var rp=require(_0x21cb[7]);var attributes=require(_0x21cb[8]);module[_0x21cb[9]]= function(_0x794ex8,_0x794ex9){return _0x794ex8[_0x21cb[12]](_0x21cb[10],attributes,{tableName:_0x21cb[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x503b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x61\x63\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x63\x74\x69\x6F\x6E","\x74\x6F\x6F\x6C\x73\x5F\x61\x63\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x503b[0];var _=require(_0x503b[1]);var util=require(_0x503b[2]);var logger=require(_0x503b[4])(_0x503b[3]);var moment=require(_0x503b[5]);var BPromise=require(_0x503b[6]);var rp=require(_0x503b[7]);var attributes=require(_0x503b[8]);module[_0x503b[9]]= function(_0x5eddx8,_0x5eddx9){return _0x5eddx8[_0x503b[12]](_0x503b[10],attributes,{tableName:_0x503b[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index ae79ca5..466be85 100644 (file)
@@ -1 +1 @@
-var _0x5344=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x41\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x41\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x5344[0];var _=require(_0x5344[1]);var util=require(_0x5344[2]);var moment=require(_0x5344[3]);var BPromise=require(_0x5344[4]);var rs=require(_0x5344[5]);var fs=require(_0x5344[6]);var db=require(_0x5344[8])[_0x5344[7]];var utils=require(_0x5344[9]);var logger=require(_0x5344[11])(_0x5344[10]);var config=require(_0x5344[12]);var jayson=require(_0x5344[13]);var client=jayson[_0x5344[15]][_0x5344[14]]({port:9002});function respondWithRpcPromise(_0x17e2xe,_0x17e2xf,_0x17e2x10){return  new BPromise(function(_0x17e2x11,_0x17e2x12){return client[_0x5344[28]](_0x17e2xe,_0x17e2x10)[_0x5344[27]](function(_0x17e2x14){logger[_0x5344[20]](_0x5344[16],_0x17e2xf,_0x5344[19]);logger[_0x5344[23]](_0x5344[21],_0x17e2xf,_0x5344[19],JSON[_0x5344[22]](_0x17e2x14));if(_0x17e2x14[_0x5344[17]]){if(_0x17e2x14[_0x5344[17]][_0x5344[24]]=== 500){logger[_0x5344[17]](_0x5344[16],_0x17e2xf,_0x17e2x14[_0x5344[17]][_0x5344[25]]);return _0x17e2x12(_0x17e2x14[_0x5344[17]][_0x5344[25]])};logger[_0x5344[17]](_0x5344[16],_0x17e2xf,_0x17e2x14[_0x5344[17]][_0x5344[25]]);return _0x17e2x11(_0x17e2x14[_0x5344[17]][_0x5344[25]])}else {logger[_0x5344[20]](_0x5344[16],_0x17e2xf,_0x5344[19]);_0x17e2x11(_0x17e2x14[_0x5344[26]][_0x5344[25]])}})[_0x5344[18]](function(_0x17e2x13){logger[_0x5344[17]](_0x5344[16],_0x17e2xf,_0x17e2x13);_0x17e2x12(_0x17e2x13)})})}
\ No newline at end of file
+var _0x4a4c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x41\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x41\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x4a4c[0];var _=require(_0x4a4c[1]);var util=require(_0x4a4c[2]);var moment=require(_0x4a4c[3]);var BPromise=require(_0x4a4c[4]);var rs=require(_0x4a4c[5]);var fs=require(_0x4a4c[6]);var db=require(_0x4a4c[8])[_0x4a4c[7]];var utils=require(_0x4a4c[9]);var logger=require(_0x4a4c[11])(_0x4a4c[10]);var config=require(_0x4a4c[12]);var jayson=require(_0x4a4c[13]);var client=jayson[_0x4a4c[15]][_0x4a4c[14]]({port:9002});function respondWithRpcPromise(_0x1adcxe,_0x1adcxf,_0x1adcx10){return  new BPromise(function(_0x1adcx11,_0x1adcx12){return client[_0x4a4c[28]](_0x1adcxe,_0x1adcx10)[_0x4a4c[27]](function(_0x1adcx14){logger[_0x4a4c[20]](_0x4a4c[16],_0x1adcxf,_0x4a4c[19]);logger[_0x4a4c[23]](_0x4a4c[21],_0x1adcxf,_0x4a4c[19],JSON[_0x4a4c[22]](_0x1adcx14));if(_0x1adcx14[_0x4a4c[17]]){if(_0x1adcx14[_0x4a4c[17]][_0x4a4c[24]]=== 500){logger[_0x4a4c[17]](_0x4a4c[16],_0x1adcxf,_0x1adcx14[_0x4a4c[17]][_0x4a4c[25]]);return _0x1adcx12(_0x1adcx14[_0x4a4c[17]][_0x4a4c[25]])};logger[_0x4a4c[17]](_0x4a4c[16],_0x1adcxf,_0x1adcx14[_0x4a4c[17]][_0x4a4c[25]]);return _0x1adcx11(_0x1adcx14[_0x4a4c[17]][_0x4a4c[25]])}else {logger[_0x4a4c[20]](_0x4a4c[16],_0x1adcxf,_0x4a4c[19]);_0x1adcx11(_0x1adcx14[_0x4a4c[26]][_0x4a4c[25]])}})[_0x4a4c[18]](function(_0x1adcx13){logger[_0x4a4c[17]](_0x4a4c[16],_0x1adcxf,_0x1adcx13);_0x1adcx12(_0x1adcx13)})})}
\ No newline at end of file
index 8169d8c..2db816f 100644 (file)
@@ -1 +1 @@
-var _0xa8b8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x61\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xa8b8[0];var multer=require(_0xa8b8[1]);var util=require(_0xa8b8[2]);var path=require(_0xa8b8[3]);var express=require(_0xa8b8[4]);var router=express.Router();var auth=require(_0xa8b8[5]);var interaction=require(_0xa8b8[6]);var config=require(_0xa8b8[7]);var controller=require(_0xa8b8[8]);router[_0xa8b8[12]](_0xa8b8[9],auth[_0xa8b8[10]](),controller[_0xa8b8[11]]);router[_0xa8b8[14]](_0xa8b8[9],auth[_0xa8b8[10]](),controller[_0xa8b8[13]]);module[_0xa8b8[15]]= router
\ No newline at end of file
+var _0xc8ca=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x61\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc8ca[0];var multer=require(_0xc8ca[1]);var util=require(_0xc8ca[2]);var path=require(_0xc8ca[3]);var express=require(_0xc8ca[4]);var router=express.Router();var auth=require(_0xc8ca[5]);var interaction=require(_0xc8ca[6]);var config=require(_0xc8ca[7]);var controller=require(_0xc8ca[8]);router[_0xc8ca[12]](_0xc8ca[9],auth[_0xc8ca[10]](),controller[_0xc8ca[11]]);router[_0xc8ca[14]](_0xc8ca[9],auth[_0xc8ca[10]](),controller[_0xc8ca[13]]);module[_0xc8ca[15]]= router
\ No newline at end of file
index afaa1ae..303da8f 100644 (file)
@@ -1 +1 @@
-var _0xfdba=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54"];_0xfdba[0];var Sequelize=require(_0xfdba[1]);module[_0xfdba[2]]= {name:{type:Sequelize[_0xfdba[3]],allowNull:false},description:{type:Sequelize[_0xfdba[3]]},parent:{type:Sequelize[_0xfdba[3]]},table:{type:Sequelize[_0xfdba[3]]},conditions:{type:Sequelize[_0xfdba[4]]},joins:{type:Sequelize[_0xfdba[4]]}}
\ No newline at end of file
+var _0xc3b1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54"];_0xc3b1[0];var Sequelize=require(_0xc3b1[1]);module[_0xc3b1[2]]= {name:{type:Sequelize[_0xc3b1[3]],allowNull:false},description:{type:Sequelize[_0xc3b1[3]]},parent:{type:Sequelize[_0xc3b1[3]]},table:{type:Sequelize[_0xc3b1[3]]},conditions:{type:Sequelize[_0xc3b1[4]]},joins:{type:Sequelize[_0xc3b1[4]]}}
\ No newline at end of file
index 05cdbce..febcd24 100644 (file)
@@ -1 +1 @@
-var _0x119a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x70\x72\x65\x76\x69\x65\x77","\x6A\x6F\x69\x6E","\x6C\x65\x66\x74\x5F\x6A\x6F\x69\x6E","\x72\x69\x67\x68\x74\x5F\x6A\x6F\x69\x6E","\x6F\x75\x74\x65\x72\x5F\x6A\x6F\x69\x6E","\x63\x72\x6F\x73\x73\x5F\x6A\x6F\x69\x6E","\x53\x55\x4D\x28\x25\x73\x29","\x43\x4F\x55\x4E\x54\x28\x25\x73\x29","\x43\x4F\x55\x4E\x54\x28\x44\x49\x53\x54\x49\x4E\x43\x54\x20\x25\x73\x29","\x4D\x41\x58\x28\x25\x73\x29","\x4D\x49\x4E\x28\x25\x73\x29","\x41\x56\x47\x28\x25\x73\x29","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x28\x25\x73\x29","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x28\x25\x73\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20\x25\x73\x20\x41\x53\x43\x29","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x28\x25\x73\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20\x25\x73\x20\x44\x45\x53\x43\x29","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x25\x73\x29","\x44\x41\x54\x45\x28\x25\x73\x29","\x48\x4F\x55\x52\x28\x25\x73\x29","\x52\x4F\x55\x4E\x44\x28\x25\x73\x29","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x25\x73\x29","\x49\x53\x20\x4E\x55\x4C\x4C","\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C","\x49\x53\x20\x45\x4D\x50\x54\x59","\x49\x53\x20\x4E\x4F\x54\x20\x45\x4D\x50\x54\x59","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x72\x75\x6C\x65\x73","","\x28","\x20","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x67\x72\x6F\x75\x70","\x66\x69\x65\x6C\x64","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x76\x61\x6C\x75\x65","\x29","\x6B\x65\x79\x42\x79","\x73\x65\x6C\x65\x63\x74","\x74\x61\x62\x6C\x65","\x66\x72\x6F\x6D","\x4D\x65\x74\x72\x69\x63\x49\x64","\x6D\x65\x74\x72\x69\x63","\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x25\x73","\x72\x65\x70\x6C\x61\x63\x65","\x66\x6F\x72\x6D\x61\x74","\x67\x72\x6F\x75\x70\x42\x79","\x6F\x72\x64\x65\x72\x42\x79","\x44\x45\x53\x43","\x61\x6C\x69\x61\x73","\x6A\x6F\x69\x6E\x73","\x70\x61\x72\x73\x65","\x74\x79\x70\x65","\x70\x61\x72\x65\x6E\x74\x4B\x65\x79","\x66\x6F\x72\x65\x69\x67\x6E\x54\x61\x62\x6C\x65","\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79","\x25\x73\x2E\x25\x73\x20\x3D\x20\x25\x73\x2E\x25\x73","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x63\x6C\x6F\x6E\x65","\x4C\x69\x6D\x69\x74\x65\x64\x20\x51\x75\x65\x72\x79\x3A","\x64\x65\x62\x75\x67","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x50\x6C\x65\x61\x73\x65\x20\x69\x6E\x73\x65\x72\x74\x20\x61\x74\x20\x6C\x65\x61\x73\x74\x20\x6F\x6E\x65\x20\x66\x69\x65\x6C\x64\x21","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x41\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2E\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x42\x45\x54\x57\x45\x45\x4E\x20\x3F\x20\x41\x4E\x44\x20\x3F","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x65\x6E\x64\x44\x61\x74\x65","\x52\x75\x6E\x20\x51\x75\x65\x72\x79\x3A","\x69\x6E\x66\x6F","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x65\x78\x70\x6F\x72\x74\x2F","\x6F\x75\x74\x70\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x66\x69\x6C\x65\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x73\x61\x76\x65\x6E\x61\x6D\x65","\x66\x6F\x72\x6B","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x63\x6F\x75\x6E\x74\x54\x61\x62\x6C\x65","\x43\x4F\x55\x4E\x54\x28\x2A\x29","\x4E\x6F\x20\x44\x61\x74\x61\x21","\x77\x65\x62","\x66\x75\x6C\x6C\x50\x61\x74\x68","\x25\x73\x2D\x25\x73\x2E\x25\x73","\x67\x65\x6E\x65\x72\x61\x74\x65","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x63\x73\x76","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x72\x75\x6E","\x72\x75\x6E\x52\x65\x70\x6F\x72\x74"];_0x119a[0];var jsonpatch=require(_0x119a[1]);var rp=require(_0x119a[2]);var moment=require(_0x119a[3]);var BPromise=require(_0x119a[4]);var Mustache=require(_0x119a[5]);var util=require(_0x119a[6]);var path=require(_0x119a[7]);var sox=require(_0x119a[8]);var csv=require(_0x119a[9]);var ejs=require(_0x119a[10]);var fs=require(_0x119a[11]);var _=require(_0x119a[12]);var squel=require(_0x119a[13]);var crypto=require(_0x119a[14]);var jsforce=require(_0x119a[15]);var deskjs=require(_0x119a[16]);var toCsv=require(_0x119a[9]);var querystring=require(_0x119a[17]);var Papa=require(_0x119a[18]);var qs=require(_0x119a[19]);var logger=require(_0x119a[21])(_0x119a[20]);var utils=require(_0x119a[22]);var config=require(_0x119a[23]);var db=require(_0x119a[25])[_0x119a[24]];function respondWithStatusCode(_0xcb01x1a,_0xcb01x1b){_0xcb01x1b= _0xcb01x1b|| 204;return function(_0xcb01x1c){if(_0xcb01x1c){return _0xcb01x1a[_0x119a[26]](_0xcb01x1b)};return _0xcb01x1a[_0x119a[28]](_0xcb01x1b)[_0x119a[27]]()}}function respondWithResult(_0xcb01x1a,_0xcb01x1b){_0xcb01x1b= _0xcb01x1b|| 200;return function(_0xcb01x1c){if(_0xcb01x1c){return _0xcb01x1a[_0x119a[28]](_0xcb01x1b)[_0x119a[29]](_0xcb01x1c)}}}function respondWithFilteredResult(_0xcb01x1a,_0xcb01x1f){return function(_0xcb01x1c){if(_0xcb01x1c){var _0xcb01x20=_0xcb01x1c[_0x119a[30]],_0xcb01x21=_0xcb01x1f[_0x119a[31]],_0xcb01x22=_0xcb01x1f[_0x119a[31]]+ _0xcb01x1f[_0x119a[32]],_0xcb01x1b;if(_0xcb01x22>= _0xcb01x20){_0xcb01x22= _0xcb01x20;_0xcb01x1b= 200}else {_0xcb01x1b= 206};_0xcb01x1a[_0x119a[28]](_0xcb01x1b);return _0xcb01x1a[_0x119a[36]](_0x119a[33],_0xcb01x21+ _0x119a[34]+ _0xcb01x22+ _0x119a[35]+ _0xcb01x20)[_0x119a[29]](_0xcb01x1c)};return null}}function patchUpdates(_0xcb01x24){return function(_0xcb01x1c){try{jsonpatch[_0x119a[37]](_0xcb01x1c,_0xcb01x24,true)}catch(err){return BPromise[_0x119a[38]](err)};return _0xcb01x1c[_0x119a[39]]()}}function saveUpdates(_0xcb01x26,_0xcb01x1b){return function(_0xcb01x1c){if(_0xcb01x1c){return _0xcb01x1c[_0x119a[41]](_0xcb01x26)[_0x119a[40]](function(_0xcb01x27){return _0xcb01x27})};return null}}function removeEntity(_0xcb01x1a,_0xcb01x1b){return function(_0xcb01x1c){if(_0xcb01x1c){return _0xcb01x1c[_0x119a[42]]()[_0x119a[40]](function(){_0xcb01x1a[_0x119a[28]](204)[_0x119a[27]]()})}}}function handleEntityNotFound(_0xcb01x1a,_0xcb01x1b){return function(_0xcb01x1c){if(!_0xcb01x1c){_0xcb01x1a[_0x119a[26]](404)};return _0xcb01x1c}}function handleError(_0xcb01x1a,_0xcb01x1b){_0xcb01x1b= _0xcb01x1b|| 500;return function(_0xcb01x2b){logger[_0x119a[44]](_0xcb01x2b[_0x119a[43]]);if(_0xcb01x2b[_0x119a[45]]){delete _0xcb01x2b[_0x119a[45]]};_0xcb01x1a[_0x119a[28]](_0xcb01x1b)[_0x119a[46]](_0xcb01x2b)}}exports[_0x119a[47]]= function(_0xcb01x2c,_0xcb01x1a){var _0xcb01x1f={},_0xcb01x2d={},_0xcb01x2e={count:0,rows:[]};_0xcb01x2d[_0x119a[48]]= _[_0x119a[51]](db[_0x119a[50]][_0x119a[49]]);var _0xcb01x2f={dateStart:_0xcb01x2c[_0x119a[53]][_0x119a[52]],dateEnd:_0xcb01x2c[_0x119a[53]][_0x119a[54]]};delete _0xcb01x2c[_0x119a[53]][_0x119a[52]];delete _0xcb01x2c[_0x119a[53]][_0x119a[54]];_0xcb01x2d[_0x119a[53]]= _[_0x119a[51]](_0xcb01x2c[_0x119a[53]]);_0xcb01x2d[_0x119a[55]]= _[_0x119a[56]](_0xcb01x2d[_0x119a[48]],_0xcb01x2d[_0x119a[53]]);_0xcb01x1f[_0x119a[57]]= _[_0x119a[56]](_0xcb01x2d[_0x119a[48]],qs[_0x119a[58]](_0xcb01x2c[_0x119a[53]][_0x119a[58]]));_0xcb01x1f[_0x119a[57]]= (_0xcb01x1f[_0x119a[57]][_0x119a[59]])?_0xcb01x1f[_0x119a[57]]:_0xcb01x2d[_0x119a[48]];if(!_0xcb01x2c[_0x119a[53]][_0x119a[61]](_0x119a[60])){_0xcb01x1f[_0x119a[32]]= qs[_0x119a[32]](_0xcb01x2c[_0x119a[53]][_0x119a[32]]);_0xcb01x1f[_0x119a[31]]= qs[_0x119a[31]](_0xcb01x2c[_0x119a[53]][_0x119a[31]])};_0xcb01x1f[_0x119a[62]]= qs[_0x119a[63]](_0xcb01x2c[_0x119a[53]][_0x119a[63]]);_0xcb01x1f[_0x119a[64]]= qs[_0x119a[55]](_[_0x119a[65]](_0xcb01x2c[_0x119a[53]],_0xcb01x2d[_0x119a[55]]));if(_0xcb01x2f[_0x119a[52]]){if(_0xcb01x2f[_0x119a[54]]){_0xcb01x2f[_0x119a[54]]= moment(_0xcb01x2f[_0x119a[54]])[_0x119a[67]](1,_0x119a[66])}else {_0xcb01x2f[_0x119a[54]]= moment(_0xcb01x2f[_0x119a[52]])[_0x119a[67]](1,_0x119a[66])};_[_0x119a[68]](_0xcb01x1f[_0x119a[64]],{createdAt:{$gte:_0xcb01x2f[_0x119a[52]],$lte:_0xcb01x2f[_0x119a[54]]}})};if(_0xcb01x2c[_0x119a[53]][_0x119a[69]]){_0xcb01x1f[_0x119a[64]]= _[_0x119a[68]](_0xcb01x1f[_0x119a[64]],{$or:_[_0x119a[71]](_0xcb01x1f[_0x119a[57]],function(_0xcb01x30){var _0xcb01x2e={};_0xcb01x2e[_0xcb01x30]= {$like:_0x119a[70]+ _0xcb01x2c[_0x119a[53]][_0x119a[69]]+ _0x119a[70]};return _0xcb01x2e})})};_0xcb01x1f= _[_0x119a[68]]({},_0xcb01x1f,_0xcb01x2c[_0x119a[72]]);var _0xcb01x31={where:_0xcb01x1f[_0x119a[64]]};return db[_0x119a[50]][_0x119a[30]](_0xcb01x31)[_0x119a[40]](function(_0xcb01x20){_0xcb01x2e[_0x119a[30]]= _0xcb01x20;if(_0xcb01x2c[_0x119a[53]][_0x119a[75]]){_0xcb01x1f[_0x119a[76]]= [{all:true}]};return db[_0x119a[50]][_0x119a[77]](_0xcb01x1f)})[_0x119a[40]](function(_0xcb01x32){_0xcb01x2e[_0x119a[74]]= _0xcb01x32;return _0xcb01x2e})[_0x119a[40]](respondWithFilteredResult(_0xcb01x1a,_0xcb01x1f))[_0x119a[73]](handleError(_0xcb01x1a,null))};exports[_0x119a[78]]= function(_0xcb01x2c,_0xcb01x1a){var _0xcb01x1f={raw:false,where:{id:_0xcb01x2c[_0x119a[80]][_0x119a[79]]}},_0xcb01x2d={};_0xcb01x2d[_0x119a[48]]= _[_0x119a[51]](db[_0x119a[50]][_0x119a[49]]);_0xcb01x2d[_0x119a[53]]= _[_0x119a[51]](_0xcb01x2c[_0x119a[53]]);_0xcb01x2d[_0x119a[55]]= _[_0x119a[56]](_0xcb01x2d[_0x119a[48]],_0xcb01x2d[_0x119a[53]]);_0xcb01x1f[_0x119a[57]]= _[_0x119a[56]](_0xcb01x2d[_0x119a[48]],qs[_0x119a[58]](_0xcb01x2c[_0x119a[53]][_0x119a[58]]));_0xcb01x1f[_0x119a[57]]= (_0xcb01x1f[_0x119a[57]][_0x119a[59]])?_0xcb01x1f[_0x119a[57]]:_0xcb01x2d[_0x119a[48]];if(_0xcb01x2c[_0x119a[53]][_0x119a[75]]){_0xcb01x1f[_0x119a[76]]= [{all:true}]};_0xcb01x1f= _[_0x119a[68]]({},_0xcb01x1f,_0xcb01x2c[_0x119a[72]]);return db[_0x119a[50]][_0x119a[81]](_0xcb01x1f)[_0x119a[40]](handleEntityNotFound(_0xcb01x1a,null))[_0x119a[40]](respondWithResult(_0xcb01x1a,null))[_0x119a[73]](handleError(_0xcb01x1a,null))};exports[_0x119a[82]]= function(_0xcb01x2c,_0xcb01x1a){return db[_0x119a[50]][_0x119a[82]](_0xcb01x2c[_0x119a[83]],{})[_0x119a[40]](respondWithResult(_0xcb01x1a,201))[_0x119a[73]](handleError(_0xcb01x1a,null))};exports[_0x119a[41]]= function(_0xcb01x2c,_0xcb01x1a){if(_0xcb01x2c[_0x119a[83]][_0x119a[79]]){delete _0xcb01x2c[_0x119a[83]][_0x119a[79]]};return db[_0x119a[50]][_0x119a[81]]({where:{id:_0xcb01x2c[_0x119a[80]][_0x119a[79]]}})[_0x119a[40]](handleEntityNotFound(_0xcb01x1a,null))[_0x119a[40]](saveUpdates(_0xcb01x2c[_0x119a[83]],null))[_0x119a[40]](respondWithResult(_0xcb01x1a,null))[_0x119a[73]](handleError(_0xcb01x1a,null))};exports[_0x119a[42]]= function(_0xcb01x2c,_0xcb01x1a){return db[_0x119a[50]][_0x119a[81]]({where:{id:_0xcb01x2c[_0x119a[80]][_0x119a[79]]}})[_0x119a[40]](handleEntityNotFound(_0xcb01x1a,null))[_0x119a[40]](removeEntity(_0xcb01x1a,null))[_0x119a[73]](handleError(_0xcb01x1a,null))};exports[_0x119a[84]]= function(_0xcb01x2c,_0xcb01x1a){var _0xcb01x33=10;var _0xcb01x34=[_0x119a[85],_0x119a[86],_0x119a[87],_0x119a[88],_0x119a[89]];var _0xcb01x35={"\x53\x55\x4D":_0x119a[90],"\x43\x4F\x55\x4E\x54":_0x119a[91],"\x43\x4F\x55\x4E\x54\x20\x44\x49\x53\x54\x49\x4E\x43\x54":_0x119a[92],"\x4D\x41\x58":_0x119a[93],"\x4D\x49\x4E":_0x119a[94],"\x41\x56\x47":_0x119a[95],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54":_0x119a[96],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x41\x53\x43":_0x119a[97],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x44\x45\x53\x43":_0x119a[98]};var _0xcb01x36={"\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45":_0x119a[99],"\x44\x41\x54\x45":_0x119a[100],"\x48\x4F\x55\x52":_0x119a[101],"\x52\x4F\x55\x4E\x44":_0x119a[102],"\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50":_0x119a[103]};var _0xcb01x37=function(_0xcb01x38){return !_[_0x119a[108]]([_0x119a[104],_0x119a[105],_0x119a[106],_0x119a[107]],_0xcb01x38)};var _0xcb01x39=function(_0xcb01x3a){if(!_0xcb01x3a||  !_0xcb01x3a[_0x119a[109]][_0x119a[59]]){return _0x119a[110]};for(var _0xcb01x3b=_0x119a[111],_0xcb01x3c=0;_0xcb01x3c< _0xcb01x3a[_0x119a[109]][_0x119a[59]];_0xcb01x3c+= 1){_0xcb01x3c> 0&& (_0xcb01x3b+= _0x119a[112]+ _0xcb01x3a[_0x119a[113]]+ _0x119a[112]);_0xcb01x3b+= _0xcb01x3a[_0x119a[109]][_0xcb01x3c][_0x119a[114]]?_0xcb01x39(_0xcb01x3a[_0x119a[109]][_0xcb01x3c][_0x119a[114]]):_0xcb01x3a[_0x119a[109]][_0xcb01x3c][_0x119a[115]]+ _0x119a[112]+ _0xcb01x3a[_0x119a[109]][_0xcb01x3c][_0x119a[116]]+ (_0xcb01x37(_0xcb01x3a[_0x119a[109]][_0xcb01x3c][_0x119a[116]])?_0x119a[112]+ _0xcb01x3a[_0x119a[109]][_0xcb01x3c][_0x119a[117]]:_0x119a[110])};return _0xcb01x3b+ _0x119a[118]};var _0xcb01x1f={where:{id:_0xcb01x2c[_0x119a[80]][_0x119a[79]]}},_0xcb01x3d,_0xcb01x3e,_0xcb01x3f,_0xcb01x40,_0xcb01x41;_0xcb01x1f= _[_0x119a[68]]({},_0xcb01x1f,_0xcb01x2c[_0x119a[72]]);return db[_0x119a[50]][_0x119a[81]](_0xcb01x1f)[_0x119a[40]](function(_0xcb01x1c){if(_0xcb01x1c){_0xcb01x3d= _0xcb01x1c;return _0xcb01x1c[_0x119a[150]]()};return null})[_0x119a[40]](function(_0xcb01x42){if(_0xcb01x42){if(!_0xcb01x42[_0x119a[59]]){throw  new db[_0x119a[148]].ValidationError(_0x119a[147])};_0xcb01x3e= _0xcb01x42;return db[_0x119a[149]][_0x119a[77]]({raw:true})};return null})[_0x119a[40]](function(_0xcb01x42){if(_0xcb01x42){_0xcb01x3f= _[_0x119a[119]](_0xcb01x42,_0x119a[79]);var _0xcb01x43;var _0xcb01x44=squel[_0x119a[120]]();_0xcb01x44[_0x119a[122]](_0xcb01x3d[_0x119a[121]]);for(var _0xcb01x3c=0;_0xcb01x3c< _0xcb01x3e[_0x119a[59]];_0xcb01x3c+= 1){_0xcb01x43= _0xcb01x3e[_0xcb01x3c][_0x119a[123]]?_0xcb01x3f[_0xcb01x3e[_0xcb01x3c][_0x119a[123]]][_0x119a[124]]:_0xcb01x3e[_0xcb01x3c][_0x119a[115]];_0xcb01x43= _0xcb01x3e[_0xcb01x3c][_0x119a[125]]?_[_0x119a[127]](_0xcb01x35[_0xcb01x3e[_0xcb01x3c][_0x119a[125]]],_0x119a[126],_0xcb01x43):_0xcb01x43;_0xcb01x43= _0xcb01x3e[_0xcb01x3c][_0x119a[128]]?_[_0x119a[127]](_0xcb01x36[_0xcb01x3e[_0xcb01x3c][_0x119a[128]]],_0x119a[126],_0xcb01x43):_0xcb01x43;if(_0xcb01x3e[_0xcb01x3c][_0x119a[129]]){_0xcb01x44[_0x119a[114]](_0xcb01x43)};_0xcb01x3e[_0xcb01x3c][_0x119a[130]]&& _0xcb01x44[_0x119a[62]](_0xcb01x43,_0xcb01x3e[_0xcb01x3c][_0x119a[130]]=== _0x119a[131]?false:true);_0xcb01x44[_0x119a[115]](_0xcb01x43,_0xcb01x3e[_0xcb01x3c][_0x119a[132]]|| _0xcb01x43)};if(_0xcb01x3d[_0x119a[133]]){_0xcb01x3d[_0x119a[133]]= JSON[_0x119a[134]](_0xcb01x3d[_0x119a[133]]);for(var _0xcb01x45=0;_0xcb01x45< _0xcb01x3d[_0x119a[133]][_0x119a[59]];_0xcb01x45+= 1){if(_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[135]]&& _[_0x119a[108]](_0xcb01x34,_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[135]])&& _0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[136]]&& _0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[137]]&& _0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[138]]){_0xcb01x44[_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[135]]](_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[137]],null,util[_0x119a[128]](_0x119a[139],_0xcb01x3d[_0x119a[121]],_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[136]],_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[137]],_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[138]]))}}};if(_0xcb01x3d[_0x119a[140]]){_0xcb01x3d[_0x119a[140]]= JSON[_0x119a[134]](_0xcb01x3d[_0x119a[140]]);_0xcb01x44[_0x119a[64]](_0xcb01x39(_0xcb01x3d[_0x119a[140]][_0x119a[114]]))};_0xcb01x41= _0xcb01x44[_0x119a[141]]();_0xcb01x44[_0x119a[32]](_0xcb01x33);_0xcb01x44[_0x119a[31]](0);logger[_0x119a[143]](_0x119a[142],_0xcb01x44.toString());return db[_0x119a[146]][_0x119a[53]](_0xcb01x44.toString(),{type:db[_0x119a[146]][_0x119a[145]][_0x119a[144]]})}})[_0x119a[40]](respondWithResult(_0xcb01x1a,null))[_0x119a[73]](handleError(_0xcb01x1a,null))};function runReport(_0xcb01x47,_0xcb01x48,_0xcb01x49){var _0xcb01x4a=_0xcb01x48[_0x119a[45]];var _0xcb01x33=10;var _0xcb01x34=[_0x119a[85],_0x119a[86],_0x119a[87],_0x119a[88],_0x119a[89]];var _0xcb01x35={"\x53\x55\x4D":_0x119a[90],"\x43\x4F\x55\x4E\x54":_0x119a[91],"\x43\x4F\x55\x4E\x54\x20\x44\x49\x53\x54\x49\x4E\x43\x54":_0x119a[92],"\x4D\x41\x58":_0x119a[93],"\x4D\x49\x4E":_0x119a[94],"\x41\x56\x47":_0x119a[95],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54":_0x119a[96],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x41\x53\x43":_0x119a[97],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x44\x45\x53\x43":_0x119a[98]};var _0xcb01x36={"\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45":_0x119a[99],"\x44\x41\x54\x45":_0x119a[100],"\x48\x4F\x55\x52":_0x119a[101],"\x52\x4F\x55\x4E\x44":_0x119a[102],"\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50":_0x119a[103]};var _0xcb01x37=function(_0xcb01x38){return !_[_0x119a[108]]([_0x119a[104],_0x119a[105],_0x119a[106],_0x119a[107]],_0xcb01x38)};var _0xcb01x39=function(_0xcb01x3a){if(!_0xcb01x3a||  !_0xcb01x3a[_0x119a[109]][_0x119a[59]]){return _0x119a[110]};for(var _0xcb01x3b=_0x119a[111],_0xcb01x3c=0;_0xcb01x3c< _0xcb01x3a[_0x119a[109]][_0x119a[59]];_0xcb01x3c+= 1){_0xcb01x3c> 0&& (_0xcb01x3b+= _0x119a[112]+ _0xcb01x3a[_0x119a[113]]+ _0x119a[112]);_0xcb01x3b+= _0xcb01x3a[_0x119a[109]][_0xcb01x3c][_0x119a[114]]?_0xcb01x39(_0xcb01x3a[_0x119a[109]][_0xcb01x3c][_0x119a[114]]):_0xcb01x3a[_0x119a[109]][_0xcb01x3c][_0x119a[115]]+ _0x119a[112]+ _0xcb01x3a[_0x119a[109]][_0xcb01x3c][_0x119a[116]]+ (_0xcb01x37(_0xcb01x3a[_0x119a[109]][_0xcb01x3c][_0x119a[116]])?_0x119a[112]+ _0xcb01x3a[_0x119a[109]][_0xcb01x3c][_0x119a[117]]:_0x119a[110])};return _0xcb01x3b+ _0x119a[118]};var _0xcb01x1f={where:{id:_0xcb01x47[_0x119a[79]]}},_0xcb01x3d,_0xcb01x3e,_0xcb01x3f,_0xcb01x40,_0xcb01x41;_0xcb01x1f= _[_0x119a[68]]({},_0xcb01x1f,_0xcb01x49);return db[_0x119a[50]][_0x119a[81]](_0xcb01x1f)[_0x119a[40]](function(_0xcb01x1c){if(_0xcb01x1c){_0xcb01x3d= _0xcb01x1c;return _0xcb01x1c[_0x119a[150]]()};return null})[_0x119a[40]](function(_0xcb01x42){if(_0xcb01x42){if(!_0xcb01x42[_0x119a[59]]){throw  new db[_0x119a[148]].ValidationError(_0x119a[147])};_0xcb01x3e= _0xcb01x42;return db[_0x119a[149]][_0x119a[77]]({raw:true})};return null})[_0x119a[40]](function(_0xcb01x42){if(_0xcb01x42){_0xcb01x3f= _[_0x119a[119]](_0xcb01x42,_0x119a[79]);var _0xcb01x43;var _0xcb01x44=squel[_0x119a[120]]();_0xcb01x44[_0x119a[122]](_0xcb01x3d[_0x119a[121]]);for(var _0xcb01x3c=0;_0xcb01x3c< _0xcb01x3e[_0x119a[59]];_0xcb01x3c+= 1){_0xcb01x43= _0xcb01x3e[_0xcb01x3c][_0x119a[123]]?_0xcb01x3f[_0xcb01x3e[_0xcb01x3c][_0x119a[123]]][_0x119a[124]]:_0xcb01x3e[_0xcb01x3c][_0x119a[115]];_0xcb01x43= _0xcb01x3e[_0xcb01x3c][_0x119a[125]]?_[_0x119a[127]](_0xcb01x35[_0xcb01x3e[_0xcb01x3c][_0x119a[125]]],_0x119a[126],_0xcb01x43):_0xcb01x43;_0xcb01x43= _0xcb01x3e[_0xcb01x3c][_0x119a[128]]?_[_0x119a[127]](_0xcb01x36[_0xcb01x3e[_0xcb01x3c][_0x119a[128]]],_0x119a[126],_0xcb01x43):_0xcb01x43;if(_0xcb01x3e[_0xcb01x3c][_0x119a[129]]){_0xcb01x44[_0x119a[114]](_0xcb01x43)};_0xcb01x3e[_0xcb01x3c][_0x119a[130]]&& _0xcb01x44[_0x119a[62]](_0xcb01x43,_0xcb01x3e[_0xcb01x3c][_0x119a[130]]=== _0x119a[131]?false:true);_0xcb01x44[_0x119a[115]](_0xcb01x43,_0xcb01x3e[_0xcb01x3c][_0x119a[132]]|| _0xcb01x43)};if(_0xcb01x3d[_0x119a[133]]){_0xcb01x3d[_0x119a[133]]= JSON[_0x119a[134]](_0xcb01x3d[_0x119a[133]]);for(var _0xcb01x45=0;_0xcb01x45< _0xcb01x3d[_0x119a[133]][_0x119a[59]];_0xcb01x45+= 1){if(_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[135]]&& _[_0x119a[108]](_0xcb01x34,_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[135]])&& _0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[136]]&& _0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[137]]&& _0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[138]]){_0xcb01x44[_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[135]]](_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[137]],null,util[_0x119a[128]](_0x119a[139],_0xcb01x3d[_0x119a[121]],_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[136]],_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[137]],_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[138]]))}}};if(_0xcb01x3d[_0x119a[140]]){_0xcb01x3d[_0x119a[140]]= JSON[_0x119a[134]](_0xcb01x3d[_0x119a[140]]);_0xcb01x44[_0x119a[64]](_0xcb01x39(_0xcb01x3d[_0x119a[140]][_0x119a[114]]))};_0xcb01x41= _0xcb01x44[_0x119a[141]]();_0xcb01x44[_0x119a[32]](_0xcb01x33);_0xcb01x44[_0x119a[31]](0);logger[_0x119a[143]](_0x119a[142],_0xcb01x44.toString());return db[_0x119a[146]][_0x119a[53]](_0xcb01x44.toString(),{type:db[_0x119a[146]][_0x119a[145]][_0x119a[144]]})}})[_0x119a[40]](function(_0xcb01x42){if(!_0xcb01x42[_0x119a[59]]){throw  new db[_0x119a[148]].ValidationError(_0x119a[164])};if(_0xcb01x48[_0x119a[157]]=== _0x119a[165]){return null};var _0xcb01x4b=_[_0x119a[68]](_0xcb01x48,{name:_0xcb01x48[_0x119a[166]]|| _0xcb01x48[_0x119a[45]]|| _0xcb01x3d[_0x119a[45]],basename:_0xcb01x4a,savename:util[_0x119a[128]](_0x119a[167],_0xcb01x48[_0x119a[45]]|| _0xcb01x3d[_0x119a[45]],require(_0x119a[169])[_0x119a[168]](4),_0xcb01x48[_0x119a[157]]|| _0x119a[170])});return db[_0x119a[171]][_0x119a[82]](_0xcb01x4b,{raw:true})})[_0x119a[40]](function(_0xcb01x1c){_0xcb01x41[_0x119a[64]](_0xcb01x3d[_0x119a[121]]+ _0x119a[151],_0xcb01x48[_0x119a[152]],_0xcb01x48[_0x119a[153]]);if(_0xcb01x1c){logger[_0x119a[155]](_0x119a[154],_0xcb01x41.toString());require(_0x119a[161])[_0x119a[160]](path[_0x119a[85]](__dirname,_0x119a[156],_0xcb01x1c[_0x119a[157]]),[_0xcb01x1c[_0x119a[79]],_0xcb01x41.toString(),path[_0x119a[85]](__dirname,_0x119a[158],_0xcb01x1c[_0x119a[159]]),_0xcb01x4a]);return _0xcb01x1c}else {var _0xcb01x44=squel[_0x119a[120]]();_0xcb01x44[_0x119a[122]](_0x119a[111]+ _0xcb01x41.toString()+ _0x119a[118],_0x119a[162]);_0xcb01x44[_0x119a[115]](_0x119a[163],_0x119a[30]);_0xcb01x41[_0x119a[32]](_0xcb01x48[_0x119a[32]]|| _0xcb01x33);_0xcb01x41[_0x119a[31]](_0xcb01x48[_0x119a[31]]|| 0);return db[_0x119a[146]][_0x119a[53]](_0xcb01x44.toString(),{type:db[_0x119a[146]][_0x119a[145]][_0x119a[144]]})[_0x119a[40]](function(_0xcb01x42){if(!_0xcb01x42[_0x119a[59]]){_0xcb01x40= 0}else {_0xcb01x40= _0xcb01x42[0][_0x119a[30]]|| 0};return db[_0x119a[146]][_0x119a[53]](_0xcb01x41.toString(),{type:db[_0x119a[146]][_0x119a[145]][_0x119a[144]]})})[_0x119a[40]](function(_0xcb01x42){return {rows:_0xcb01x42|| [],count:_0xcb01x40}})}})}exports[_0x119a[172]]= function(_0xcb01x2c,_0xcb01x1a){return runReport(_0xcb01x2c[_0x119a[80]],_0xcb01x2c[_0x119a[53]],_0xcb01x2c[_0x119a[72]])[_0x119a[40]](respondWithResult(_0xcb01x1a,null))[_0x119a[73]](handleError(_0xcb01x1a,null))};exports[_0x119a[173]]= runReport;exports[_0x119a[53]]= function(_0xcb01x2c,_0xcb01x1a){var _0xcb01x33=10;var _0xcb01x34=[_0x119a[85],_0x119a[86],_0x119a[87],_0x119a[88],_0x119a[89]];var _0xcb01x35={"\x53\x55\x4D":_0x119a[90],"\x43\x4F\x55\x4E\x54":_0x119a[91],"\x43\x4F\x55\x4E\x54\x20\x44\x49\x53\x54\x49\x4E\x43\x54":_0x119a[92],"\x4D\x41\x58":_0x119a[93],"\x4D\x49\x4E":_0x119a[94],"\x41\x56\x47":_0x119a[95],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54":_0x119a[96],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x41\x53\x43":_0x119a[97],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x44\x45\x53\x43":_0x119a[98]};var _0xcb01x36={"\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45":_0x119a[99],"\x44\x41\x54\x45":_0x119a[100],"\x48\x4F\x55\x52":_0x119a[101],"\x52\x4F\x55\x4E\x44":_0x119a[102],"\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50":_0x119a[103]};var _0xcb01x37=function(_0xcb01x38){return !_[_0x119a[108]]([_0x119a[104],_0x119a[105],_0x119a[106],_0x119a[107]],_0xcb01x38)};var _0xcb01x39=function(_0xcb01x3a){if(!_0xcb01x3a||  !_0xcb01x3a[_0x119a[109]][_0x119a[59]]){return _0x119a[110]};for(var _0xcb01x3b=_0x119a[111],_0xcb01x3c=0;_0xcb01x3c< _0xcb01x3a[_0x119a[109]][_0x119a[59]];_0xcb01x3c+= 1){_0xcb01x3c> 0&& (_0xcb01x3b+= _0x119a[112]+ _0xcb01x3a[_0x119a[113]]+ _0x119a[112]);_0xcb01x3b+= _0xcb01x3a[_0x119a[109]][_0xcb01x3c][_0x119a[114]]?_0xcb01x39(_0xcb01x3a[_0x119a[109]][_0xcb01x3c][_0x119a[114]]):_0xcb01x3a[_0x119a[109]][_0xcb01x3c][_0x119a[115]]+ _0x119a[112]+ _0xcb01x3a[_0x119a[109]][_0xcb01x3c][_0x119a[116]]+ (_0xcb01x37(_0xcb01x3a[_0x119a[109]][_0xcb01x3c][_0x119a[116]])?_0x119a[112]+ _0xcb01x3a[_0x119a[109]][_0xcb01x3c][_0x119a[117]]:_0x119a[110])};return _0xcb01x3b+ _0x119a[118]};var _0xcb01x1f={where:{id:_0xcb01x2c[_0x119a[80]][_0x119a[79]]}},_0xcb01x3d,_0xcb01x3e,_0xcb01x3f,_0xcb01x40,_0xcb01x41;_0xcb01x1f= _[_0x119a[68]]({},_0xcb01x1f,_0xcb01x2c[_0x119a[72]]);return db[_0x119a[50]][_0x119a[81]](_0xcb01x1f)[_0x119a[40]](function(_0xcb01x1c){if(_0xcb01x1c){_0xcb01x3d= _0xcb01x1c;return _0xcb01x1c[_0x119a[150]]()};return null})[_0x119a[40]](function(_0xcb01x42){if(_0xcb01x42){if(!_0xcb01x42[_0x119a[59]]){throw  new db[_0x119a[148]].ValidationError(_0x119a[147])};_0xcb01x3e= _0xcb01x42;return db[_0x119a[149]][_0x119a[77]]({raw:true})};return null})[_0x119a[40]](function(_0xcb01x42){if(_0xcb01x42){_0xcb01x3f= _[_0x119a[119]](_0xcb01x42,_0x119a[79]);var _0xcb01x43;var _0xcb01x44=squel[_0x119a[120]]();_0xcb01x44[_0x119a[122]](_0xcb01x3d[_0x119a[121]]);for(var _0xcb01x3c=0;_0xcb01x3c< _0xcb01x3e[_0x119a[59]];_0xcb01x3c+= 1){_0xcb01x43= _0xcb01x3e[_0xcb01x3c][_0x119a[123]]?_0xcb01x3f[_0xcb01x3e[_0xcb01x3c][_0x119a[123]]][_0x119a[124]]:_0xcb01x3e[_0xcb01x3c][_0x119a[115]];_0xcb01x43= _0xcb01x3e[_0xcb01x3c][_0x119a[125]]?_[_0x119a[127]](_0xcb01x35[_0xcb01x3e[_0xcb01x3c][_0x119a[125]]],_0x119a[126],_0xcb01x43):_0xcb01x43;_0xcb01x43= _0xcb01x3e[_0xcb01x3c][_0x119a[128]]?_[_0x119a[127]](_0xcb01x36[_0xcb01x3e[_0xcb01x3c][_0x119a[128]]],_0x119a[126],_0xcb01x43):_0xcb01x43;if(_0xcb01x3e[_0xcb01x3c][_0x119a[129]]){_0xcb01x44[_0x119a[114]](_0xcb01x43)};_0xcb01x3e[_0xcb01x3c][_0x119a[130]]&& _0xcb01x44[_0x119a[62]](_0xcb01x43,_0xcb01x3e[_0xcb01x3c][_0x119a[130]]=== _0x119a[131]?false:true);_0xcb01x44[_0x119a[115]](_0xcb01x43,_0xcb01x3e[_0xcb01x3c][_0x119a[132]]|| _0xcb01x43)};if(_0xcb01x3d[_0x119a[133]]){_0xcb01x3d[_0x119a[133]]= JSON[_0x119a[134]](_0xcb01x3d[_0x119a[133]]);for(var _0xcb01x45=0;_0xcb01x45< _0xcb01x3d[_0x119a[133]][_0x119a[59]];_0xcb01x45+= 1){if(_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[135]]&& _[_0x119a[108]](_0xcb01x34,_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[135]])&& _0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[136]]&& _0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[137]]&& _0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[138]]){_0xcb01x44[_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[135]]](_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[137]],null,util[_0x119a[128]](_0x119a[139],_0xcb01x3d[_0x119a[121]],_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[136]],_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[137]],_0xcb01x3d[_0x119a[133]][_0xcb01x45][_0x119a[138]]))}}};if(_0xcb01x3d[_0x119a[140]]){_0xcb01x3d[_0x119a[140]]= JSON[_0x119a[134]](_0xcb01x3d[_0x119a[140]]);_0xcb01x44[_0x119a[64]](_0xcb01x39(_0xcb01x3d[_0x119a[140]][_0x119a[114]]))};_0xcb01x41= _0xcb01x44[_0x119a[141]]();_0xcb01x44[_0x119a[32]](_0xcb01x33);_0xcb01x44[_0x119a[31]](0);logger[_0x119a[143]](_0x119a[142],_0xcb01x44.toString());return db[_0x119a[146]][_0x119a[53]](_0xcb01x44.toString(),{type:db[_0x119a[146]][_0x119a[145]][_0x119a[144]]})}})[_0x119a[40]](function(){return {sql:_0xcb01x41.toString()}})[_0x119a[40]](respondWithResult(_0xcb01x1a,null))[_0x119a[73]](handleError(_0xcb01x1a,null))}
\ No newline at end of file
+var _0xea87=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x70\x72\x65\x76\x69\x65\x77","\x6A\x6F\x69\x6E","\x6C\x65\x66\x74\x5F\x6A\x6F\x69\x6E","\x72\x69\x67\x68\x74\x5F\x6A\x6F\x69\x6E","\x6F\x75\x74\x65\x72\x5F\x6A\x6F\x69\x6E","\x63\x72\x6F\x73\x73\x5F\x6A\x6F\x69\x6E","\x53\x55\x4D\x28\x25\x73\x29","\x43\x4F\x55\x4E\x54\x28\x25\x73\x29","\x43\x4F\x55\x4E\x54\x28\x44\x49\x53\x54\x49\x4E\x43\x54\x20\x25\x73\x29","\x4D\x41\x58\x28\x25\x73\x29","\x4D\x49\x4E\x28\x25\x73\x29","\x41\x56\x47\x28\x25\x73\x29","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x28\x25\x73\x29","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x28\x25\x73\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20\x25\x73\x20\x41\x53\x43\x29","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x28\x25\x73\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20\x25\x73\x20\x44\x45\x53\x43\x29","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x25\x73\x29","\x44\x41\x54\x45\x28\x25\x73\x29","\x48\x4F\x55\x52\x28\x25\x73\x29","\x52\x4F\x55\x4E\x44\x28\x25\x73\x29","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x25\x73\x29","\x49\x53\x20\x4E\x55\x4C\x4C","\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C","\x49\x53\x20\x45\x4D\x50\x54\x59","\x49\x53\x20\x4E\x4F\x54\x20\x45\x4D\x50\x54\x59","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x72\x75\x6C\x65\x73","","\x28","\x20","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x67\x72\x6F\x75\x70","\x66\x69\x65\x6C\x64","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x76\x61\x6C\x75\x65","\x29","\x6B\x65\x79\x42\x79","\x73\x65\x6C\x65\x63\x74","\x74\x61\x62\x6C\x65","\x66\x72\x6F\x6D","\x4D\x65\x74\x72\x69\x63\x49\x64","\x6D\x65\x74\x72\x69\x63","\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x25\x73","\x72\x65\x70\x6C\x61\x63\x65","\x66\x6F\x72\x6D\x61\x74","\x67\x72\x6F\x75\x70\x42\x79","\x6F\x72\x64\x65\x72\x42\x79","\x44\x45\x53\x43","\x61\x6C\x69\x61\x73","\x6A\x6F\x69\x6E\x73","\x70\x61\x72\x73\x65","\x74\x79\x70\x65","\x70\x61\x72\x65\x6E\x74\x4B\x65\x79","\x66\x6F\x72\x65\x69\x67\x6E\x54\x61\x62\x6C\x65","\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79","\x25\x73\x2E\x25\x73\x20\x3D\x20\x25\x73\x2E\x25\x73","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x63\x6C\x6F\x6E\x65","\x4C\x69\x6D\x69\x74\x65\x64\x20\x51\x75\x65\x72\x79\x3A","\x64\x65\x62\x75\x67","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x50\x6C\x65\x61\x73\x65\x20\x69\x6E\x73\x65\x72\x74\x20\x61\x74\x20\x6C\x65\x61\x73\x74\x20\x6F\x6E\x65\x20\x66\x69\x65\x6C\x64\x21","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x41\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2E\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x42\x45\x54\x57\x45\x45\x4E\x20\x3F\x20\x41\x4E\x44\x20\x3F","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x65\x6E\x64\x44\x61\x74\x65","\x52\x75\x6E\x20\x51\x75\x65\x72\x79\x3A","\x69\x6E\x66\x6F","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x65\x78\x70\x6F\x72\x74\x2F","\x6F\x75\x74\x70\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x66\x69\x6C\x65\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x73\x61\x76\x65\x6E\x61\x6D\x65","\x66\x6F\x72\x6B","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x63\x6F\x75\x6E\x74\x54\x61\x62\x6C\x65","\x43\x4F\x55\x4E\x54\x28\x2A\x29","\x4E\x6F\x20\x44\x61\x74\x61\x21","\x77\x65\x62","\x66\x75\x6C\x6C\x50\x61\x74\x68","\x25\x73\x2D\x25\x73\x2E\x25\x73","\x67\x65\x6E\x65\x72\x61\x74\x65","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x63\x73\x76","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x72\x75\x6E","\x72\x75\x6E\x52\x65\x70\x6F\x72\x74"];_0xea87[0];var jsonpatch=require(_0xea87[1]);var rp=require(_0xea87[2]);var moment=require(_0xea87[3]);var BPromise=require(_0xea87[4]);var Mustache=require(_0xea87[5]);var util=require(_0xea87[6]);var path=require(_0xea87[7]);var sox=require(_0xea87[8]);var csv=require(_0xea87[9]);var ejs=require(_0xea87[10]);var fs=require(_0xea87[11]);var _=require(_0xea87[12]);var squel=require(_0xea87[13]);var crypto=require(_0xea87[14]);var jsforce=require(_0xea87[15]);var deskjs=require(_0xea87[16]);var toCsv=require(_0xea87[9]);var querystring=require(_0xea87[17]);var Papa=require(_0xea87[18]);var qs=require(_0xea87[19]);var logger=require(_0xea87[21])(_0xea87[20]);var utils=require(_0xea87[22]);var config=require(_0xea87[23]);var db=require(_0xea87[25])[_0xea87[24]];function respondWithStatusCode(_0xa893x1a,_0xa893x1b){_0xa893x1b= _0xa893x1b|| 204;return function(_0xa893x1c){if(_0xa893x1c){return _0xa893x1a[_0xea87[26]](_0xa893x1b)};return _0xa893x1a[_0xea87[28]](_0xa893x1b)[_0xea87[27]]()}}function respondWithResult(_0xa893x1a,_0xa893x1b){_0xa893x1b= _0xa893x1b|| 200;return function(_0xa893x1c){if(_0xa893x1c){return _0xa893x1a[_0xea87[28]](_0xa893x1b)[_0xea87[29]](_0xa893x1c)}}}function respondWithFilteredResult(_0xa893x1a,_0xa893x1f){return function(_0xa893x1c){if(_0xa893x1c){var _0xa893x20=_0xa893x1c[_0xea87[30]],_0xa893x21=_0xa893x1f[_0xea87[31]],_0xa893x22=_0xa893x1f[_0xea87[31]]+ _0xa893x1f[_0xea87[32]],_0xa893x1b;if(_0xa893x22>= _0xa893x20){_0xa893x22= _0xa893x20;_0xa893x1b= 200}else {_0xa893x1b= 206};_0xa893x1a[_0xea87[28]](_0xa893x1b);return _0xa893x1a[_0xea87[36]](_0xea87[33],_0xa893x21+ _0xea87[34]+ _0xa893x22+ _0xea87[35]+ _0xa893x20)[_0xea87[29]](_0xa893x1c)};return null}}function patchUpdates(_0xa893x24){return function(_0xa893x1c){try{jsonpatch[_0xea87[37]](_0xa893x1c,_0xa893x24,true)}catch(err){return BPromise[_0xea87[38]](err)};return _0xa893x1c[_0xea87[39]]()}}function saveUpdates(_0xa893x26,_0xa893x1b){return function(_0xa893x1c){if(_0xa893x1c){return _0xa893x1c[_0xea87[41]](_0xa893x26)[_0xea87[40]](function(_0xa893x27){return _0xa893x27})};return null}}function removeEntity(_0xa893x1a,_0xa893x1b){return function(_0xa893x1c){if(_0xa893x1c){return _0xa893x1c[_0xea87[42]]()[_0xea87[40]](function(){_0xa893x1a[_0xea87[28]](204)[_0xea87[27]]()})}}}function handleEntityNotFound(_0xa893x1a,_0xa893x1b){return function(_0xa893x1c){if(!_0xa893x1c){_0xa893x1a[_0xea87[26]](404)};return _0xa893x1c}}function handleError(_0xa893x1a,_0xa893x1b){_0xa893x1b= _0xa893x1b|| 500;return function(_0xa893x2b){logger[_0xea87[44]](_0xa893x2b[_0xea87[43]]);if(_0xa893x2b[_0xea87[45]]){delete _0xa893x2b[_0xea87[45]]};_0xa893x1a[_0xea87[28]](_0xa893x1b)[_0xea87[46]](_0xa893x2b)}}exports[_0xea87[47]]= function(_0xa893x2c,_0xa893x1a){var _0xa893x1f={},_0xa893x2d={},_0xa893x2e={count:0,rows:[]};_0xa893x2d[_0xea87[48]]= _[_0xea87[51]](db[_0xea87[50]][_0xea87[49]]);var _0xa893x2f={dateStart:_0xa893x2c[_0xea87[53]][_0xea87[52]],dateEnd:_0xa893x2c[_0xea87[53]][_0xea87[54]]};delete _0xa893x2c[_0xea87[53]][_0xea87[52]];delete _0xa893x2c[_0xea87[53]][_0xea87[54]];_0xa893x2d[_0xea87[53]]= _[_0xea87[51]](_0xa893x2c[_0xea87[53]]);_0xa893x2d[_0xea87[55]]= _[_0xea87[56]](_0xa893x2d[_0xea87[48]],_0xa893x2d[_0xea87[53]]);_0xa893x1f[_0xea87[57]]= _[_0xea87[56]](_0xa893x2d[_0xea87[48]],qs[_0xea87[58]](_0xa893x2c[_0xea87[53]][_0xea87[58]]));_0xa893x1f[_0xea87[57]]= (_0xa893x1f[_0xea87[57]][_0xea87[59]])?_0xa893x1f[_0xea87[57]]:_0xa893x2d[_0xea87[48]];if(!_0xa893x2c[_0xea87[53]][_0xea87[61]](_0xea87[60])){_0xa893x1f[_0xea87[32]]= qs[_0xea87[32]](_0xa893x2c[_0xea87[53]][_0xea87[32]]);_0xa893x1f[_0xea87[31]]= qs[_0xea87[31]](_0xa893x2c[_0xea87[53]][_0xea87[31]])};_0xa893x1f[_0xea87[62]]= qs[_0xea87[63]](_0xa893x2c[_0xea87[53]][_0xea87[63]]);_0xa893x1f[_0xea87[64]]= qs[_0xea87[55]](_[_0xea87[65]](_0xa893x2c[_0xea87[53]],_0xa893x2d[_0xea87[55]]));if(_0xa893x2f[_0xea87[52]]){if(_0xa893x2f[_0xea87[54]]){_0xa893x2f[_0xea87[54]]= moment(_0xa893x2f[_0xea87[54]])[_0xea87[67]](1,_0xea87[66])}else {_0xa893x2f[_0xea87[54]]= moment(_0xa893x2f[_0xea87[52]])[_0xea87[67]](1,_0xea87[66])};_[_0xea87[68]](_0xa893x1f[_0xea87[64]],{createdAt:{$gte:_0xa893x2f[_0xea87[52]],$lte:_0xa893x2f[_0xea87[54]]}})};if(_0xa893x2c[_0xea87[53]][_0xea87[69]]){_0xa893x1f[_0xea87[64]]= _[_0xea87[68]](_0xa893x1f[_0xea87[64]],{$or:_[_0xea87[71]](_0xa893x1f[_0xea87[57]],function(_0xa893x30){var _0xa893x2e={};_0xa893x2e[_0xa893x30]= {$like:_0xea87[70]+ _0xa893x2c[_0xea87[53]][_0xea87[69]]+ _0xea87[70]};return _0xa893x2e})})};_0xa893x1f= _[_0xea87[68]]({},_0xa893x1f,_0xa893x2c[_0xea87[72]]);var _0xa893x31={where:_0xa893x1f[_0xea87[64]]};return db[_0xea87[50]][_0xea87[30]](_0xa893x31)[_0xea87[40]](function(_0xa893x20){_0xa893x2e[_0xea87[30]]= _0xa893x20;if(_0xa893x2c[_0xea87[53]][_0xea87[75]]){_0xa893x1f[_0xea87[76]]= [{all:true}]};return db[_0xea87[50]][_0xea87[77]](_0xa893x1f)})[_0xea87[40]](function(_0xa893x32){_0xa893x2e[_0xea87[74]]= _0xa893x32;return _0xa893x2e})[_0xea87[40]](respondWithFilteredResult(_0xa893x1a,_0xa893x1f))[_0xea87[73]](handleError(_0xa893x1a,null))};exports[_0xea87[78]]= function(_0xa893x2c,_0xa893x1a){var _0xa893x1f={raw:false,where:{id:_0xa893x2c[_0xea87[80]][_0xea87[79]]}},_0xa893x2d={};_0xa893x2d[_0xea87[48]]= _[_0xea87[51]](db[_0xea87[50]][_0xea87[49]]);_0xa893x2d[_0xea87[53]]= _[_0xea87[51]](_0xa893x2c[_0xea87[53]]);_0xa893x2d[_0xea87[55]]= _[_0xea87[56]](_0xa893x2d[_0xea87[48]],_0xa893x2d[_0xea87[53]]);_0xa893x1f[_0xea87[57]]= _[_0xea87[56]](_0xa893x2d[_0xea87[48]],qs[_0xea87[58]](_0xa893x2c[_0xea87[53]][_0xea87[58]]));_0xa893x1f[_0xea87[57]]= (_0xa893x1f[_0xea87[57]][_0xea87[59]])?_0xa893x1f[_0xea87[57]]:_0xa893x2d[_0xea87[48]];if(_0xa893x2c[_0xea87[53]][_0xea87[75]]){_0xa893x1f[_0xea87[76]]= [{all:true}]};_0xa893x1f= _[_0xea87[68]]({},_0xa893x1f,_0xa893x2c[_0xea87[72]]);return db[_0xea87[50]][_0xea87[81]](_0xa893x1f)[_0xea87[40]](handleEntityNotFound(_0xa893x1a,null))[_0xea87[40]](respondWithResult(_0xa893x1a,null))[_0xea87[73]](handleError(_0xa893x1a,null))};exports[_0xea87[82]]= function(_0xa893x2c,_0xa893x1a){return db[_0xea87[50]][_0xea87[82]](_0xa893x2c[_0xea87[83]],{})[_0xea87[40]](respondWithResult(_0xa893x1a,201))[_0xea87[73]](handleError(_0xa893x1a,null))};exports[_0xea87[41]]= function(_0xa893x2c,_0xa893x1a){if(_0xa893x2c[_0xea87[83]][_0xea87[79]]){delete _0xa893x2c[_0xea87[83]][_0xea87[79]]};return db[_0xea87[50]][_0xea87[81]]({where:{id:_0xa893x2c[_0xea87[80]][_0xea87[79]]}})[_0xea87[40]](handleEntityNotFound(_0xa893x1a,null))[_0xea87[40]](saveUpdates(_0xa893x2c[_0xea87[83]],null))[_0xea87[40]](respondWithResult(_0xa893x1a,null))[_0xea87[73]](handleError(_0xa893x1a,null))};exports[_0xea87[42]]= function(_0xa893x2c,_0xa893x1a){return db[_0xea87[50]][_0xea87[81]]({where:{id:_0xa893x2c[_0xea87[80]][_0xea87[79]]}})[_0xea87[40]](handleEntityNotFound(_0xa893x1a,null))[_0xea87[40]](removeEntity(_0xa893x1a,null))[_0xea87[73]](handleError(_0xa893x1a,null))};exports[_0xea87[84]]= function(_0xa893x2c,_0xa893x1a){var _0xa893x33=10;var _0xa893x34=[_0xea87[85],_0xea87[86],_0xea87[87],_0xea87[88],_0xea87[89]];var _0xa893x35={"\x53\x55\x4D":_0xea87[90],"\x43\x4F\x55\x4E\x54":_0xea87[91],"\x43\x4F\x55\x4E\x54\x20\x44\x49\x53\x54\x49\x4E\x43\x54":_0xea87[92],"\x4D\x41\x58":_0xea87[93],"\x4D\x49\x4E":_0xea87[94],"\x41\x56\x47":_0xea87[95],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54":_0xea87[96],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x41\x53\x43":_0xea87[97],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x44\x45\x53\x43":_0xea87[98]};var _0xa893x36={"\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45":_0xea87[99],"\x44\x41\x54\x45":_0xea87[100],"\x48\x4F\x55\x52":_0xea87[101],"\x52\x4F\x55\x4E\x44":_0xea87[102],"\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50":_0xea87[103]};var _0xa893x37=function(_0xa893x38){return !_[_0xea87[108]]([_0xea87[104],_0xea87[105],_0xea87[106],_0xea87[107]],_0xa893x38)};var _0xa893x39=function(_0xa893x3a){if(!_0xa893x3a||  !_0xa893x3a[_0xea87[109]][_0xea87[59]]){return _0xea87[110]};for(var _0xa893x3b=_0xea87[111],_0xa893x3c=0;_0xa893x3c< _0xa893x3a[_0xea87[109]][_0xea87[59]];_0xa893x3c+= 1){_0xa893x3c> 0&& (_0xa893x3b+= _0xea87[112]+ _0xa893x3a[_0xea87[113]]+ _0xea87[112]);_0xa893x3b+= _0xa893x3a[_0xea87[109]][_0xa893x3c][_0xea87[114]]?_0xa893x39(_0xa893x3a[_0xea87[109]][_0xa893x3c][_0xea87[114]]):_0xa893x3a[_0xea87[109]][_0xa893x3c][_0xea87[115]]+ _0xea87[112]+ _0xa893x3a[_0xea87[109]][_0xa893x3c][_0xea87[116]]+ (_0xa893x37(_0xa893x3a[_0xea87[109]][_0xa893x3c][_0xea87[116]])?_0xea87[112]+ _0xa893x3a[_0xea87[109]][_0xa893x3c][_0xea87[117]]:_0xea87[110])};return _0xa893x3b+ _0xea87[118]};var _0xa893x1f={where:{id:_0xa893x2c[_0xea87[80]][_0xea87[79]]}},_0xa893x3d,_0xa893x3e,_0xa893x3f,_0xa893x40,_0xa893x41;_0xa893x1f= _[_0xea87[68]]({},_0xa893x1f,_0xa893x2c[_0xea87[72]]);return db[_0xea87[50]][_0xea87[81]](_0xa893x1f)[_0xea87[40]](function(_0xa893x1c){if(_0xa893x1c){_0xa893x3d= _0xa893x1c;return _0xa893x1c[_0xea87[150]]()};return null})[_0xea87[40]](function(_0xa893x42){if(_0xa893x42){if(!_0xa893x42[_0xea87[59]]){throw  new db[_0xea87[148]].ValidationError(_0xea87[147])};_0xa893x3e= _0xa893x42;return db[_0xea87[149]][_0xea87[77]]({raw:true})};return null})[_0xea87[40]](function(_0xa893x42){if(_0xa893x42){_0xa893x3f= _[_0xea87[119]](_0xa893x42,_0xea87[79]);var _0xa893x43;var _0xa893x44=squel[_0xea87[120]]();_0xa893x44[_0xea87[122]](_0xa893x3d[_0xea87[121]]);for(var _0xa893x3c=0;_0xa893x3c< _0xa893x3e[_0xea87[59]];_0xa893x3c+= 1){_0xa893x43= _0xa893x3e[_0xa893x3c][_0xea87[123]]?_0xa893x3f[_0xa893x3e[_0xa893x3c][_0xea87[123]]][_0xea87[124]]:_0xa893x3e[_0xa893x3c][_0xea87[115]];_0xa893x43= _0xa893x3e[_0xa893x3c][_0xea87[125]]?_[_0xea87[127]](_0xa893x35[_0xa893x3e[_0xa893x3c][_0xea87[125]]],_0xea87[126],_0xa893x43):_0xa893x43;_0xa893x43= _0xa893x3e[_0xa893x3c][_0xea87[128]]?_[_0xea87[127]](_0xa893x36[_0xa893x3e[_0xa893x3c][_0xea87[128]]],_0xea87[126],_0xa893x43):_0xa893x43;if(_0xa893x3e[_0xa893x3c][_0xea87[129]]){_0xa893x44[_0xea87[114]](_0xa893x43)};_0xa893x3e[_0xa893x3c][_0xea87[130]]&& _0xa893x44[_0xea87[62]](_0xa893x43,_0xa893x3e[_0xa893x3c][_0xea87[130]]=== _0xea87[131]?false:true);_0xa893x44[_0xea87[115]](_0xa893x43,_0xa893x3e[_0xa893x3c][_0xea87[132]]|| _0xa893x43)};if(_0xa893x3d[_0xea87[133]]){_0xa893x3d[_0xea87[133]]= JSON[_0xea87[134]](_0xa893x3d[_0xea87[133]]);for(var _0xa893x45=0;_0xa893x45< _0xa893x3d[_0xea87[133]][_0xea87[59]];_0xa893x45+= 1){if(_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[135]]&& _[_0xea87[108]](_0xa893x34,_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[135]])&& _0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[136]]&& _0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[137]]&& _0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[138]]){_0xa893x44[_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[135]]](_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[137]],null,util[_0xea87[128]](_0xea87[139],_0xa893x3d[_0xea87[121]],_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[136]],_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[137]],_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[138]]))}}};if(_0xa893x3d[_0xea87[140]]){_0xa893x3d[_0xea87[140]]= JSON[_0xea87[134]](_0xa893x3d[_0xea87[140]]);_0xa893x44[_0xea87[64]](_0xa893x39(_0xa893x3d[_0xea87[140]][_0xea87[114]]))};_0xa893x41= _0xa893x44[_0xea87[141]]();_0xa893x44[_0xea87[32]](_0xa893x33);_0xa893x44[_0xea87[31]](0);logger[_0xea87[143]](_0xea87[142],_0xa893x44.toString());return db[_0xea87[146]][_0xea87[53]](_0xa893x44.toString(),{type:db[_0xea87[146]][_0xea87[145]][_0xea87[144]]})}})[_0xea87[40]](respondWithResult(_0xa893x1a,null))[_0xea87[73]](handleError(_0xa893x1a,null))};function runReport(_0xa893x47,_0xa893x48,_0xa893x49){var _0xa893x4a=_0xa893x48[_0xea87[45]];var _0xa893x33=10;var _0xa893x34=[_0xea87[85],_0xea87[86],_0xea87[87],_0xea87[88],_0xea87[89]];var _0xa893x35={"\x53\x55\x4D":_0xea87[90],"\x43\x4F\x55\x4E\x54":_0xea87[91],"\x43\x4F\x55\x4E\x54\x20\x44\x49\x53\x54\x49\x4E\x43\x54":_0xea87[92],"\x4D\x41\x58":_0xea87[93],"\x4D\x49\x4E":_0xea87[94],"\x41\x56\x47":_0xea87[95],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54":_0xea87[96],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x41\x53\x43":_0xea87[97],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x44\x45\x53\x43":_0xea87[98]};var _0xa893x36={"\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45":_0xea87[99],"\x44\x41\x54\x45":_0xea87[100],"\x48\x4F\x55\x52":_0xea87[101],"\x52\x4F\x55\x4E\x44":_0xea87[102],"\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50":_0xea87[103]};var _0xa893x37=function(_0xa893x38){return !_[_0xea87[108]]([_0xea87[104],_0xea87[105],_0xea87[106],_0xea87[107]],_0xa893x38)};var _0xa893x39=function(_0xa893x3a){if(!_0xa893x3a||  !_0xa893x3a[_0xea87[109]][_0xea87[59]]){return _0xea87[110]};for(var _0xa893x3b=_0xea87[111],_0xa893x3c=0;_0xa893x3c< _0xa893x3a[_0xea87[109]][_0xea87[59]];_0xa893x3c+= 1){_0xa893x3c> 0&& (_0xa893x3b+= _0xea87[112]+ _0xa893x3a[_0xea87[113]]+ _0xea87[112]);_0xa893x3b+= _0xa893x3a[_0xea87[109]][_0xa893x3c][_0xea87[114]]?_0xa893x39(_0xa893x3a[_0xea87[109]][_0xa893x3c][_0xea87[114]]):_0xa893x3a[_0xea87[109]][_0xa893x3c][_0xea87[115]]+ _0xea87[112]+ _0xa893x3a[_0xea87[109]][_0xa893x3c][_0xea87[116]]+ (_0xa893x37(_0xa893x3a[_0xea87[109]][_0xa893x3c][_0xea87[116]])?_0xea87[112]+ _0xa893x3a[_0xea87[109]][_0xa893x3c][_0xea87[117]]:_0xea87[110])};return _0xa893x3b+ _0xea87[118]};var _0xa893x1f={where:{id:_0xa893x47[_0xea87[79]]}},_0xa893x3d,_0xa893x3e,_0xa893x3f,_0xa893x40,_0xa893x41;_0xa893x1f= _[_0xea87[68]]({},_0xa893x1f,_0xa893x49);return db[_0xea87[50]][_0xea87[81]](_0xa893x1f)[_0xea87[40]](function(_0xa893x1c){if(_0xa893x1c){_0xa893x3d= _0xa893x1c;return _0xa893x1c[_0xea87[150]]()};return null})[_0xea87[40]](function(_0xa893x42){if(_0xa893x42){if(!_0xa893x42[_0xea87[59]]){throw  new db[_0xea87[148]].ValidationError(_0xea87[147])};_0xa893x3e= _0xa893x42;return db[_0xea87[149]][_0xea87[77]]({raw:true})};return null})[_0xea87[40]](function(_0xa893x42){if(_0xa893x42){_0xa893x3f= _[_0xea87[119]](_0xa893x42,_0xea87[79]);var _0xa893x43;var _0xa893x44=squel[_0xea87[120]]();_0xa893x44[_0xea87[122]](_0xa893x3d[_0xea87[121]]);for(var _0xa893x3c=0;_0xa893x3c< _0xa893x3e[_0xea87[59]];_0xa893x3c+= 1){_0xa893x43= _0xa893x3e[_0xa893x3c][_0xea87[123]]?_0xa893x3f[_0xa893x3e[_0xa893x3c][_0xea87[123]]][_0xea87[124]]:_0xa893x3e[_0xa893x3c][_0xea87[115]];_0xa893x43= _0xa893x3e[_0xa893x3c][_0xea87[125]]?_[_0xea87[127]](_0xa893x35[_0xa893x3e[_0xa893x3c][_0xea87[125]]],_0xea87[126],_0xa893x43):_0xa893x43;_0xa893x43= _0xa893x3e[_0xa893x3c][_0xea87[128]]?_[_0xea87[127]](_0xa893x36[_0xa893x3e[_0xa893x3c][_0xea87[128]]],_0xea87[126],_0xa893x43):_0xa893x43;if(_0xa893x3e[_0xa893x3c][_0xea87[129]]){_0xa893x44[_0xea87[114]](_0xa893x43)};_0xa893x3e[_0xa893x3c][_0xea87[130]]&& _0xa893x44[_0xea87[62]](_0xa893x43,_0xa893x3e[_0xa893x3c][_0xea87[130]]=== _0xea87[131]?false:true);_0xa893x44[_0xea87[115]](_0xa893x43,_0xa893x3e[_0xa893x3c][_0xea87[132]]|| _0xa893x43)};if(_0xa893x3d[_0xea87[133]]){_0xa893x3d[_0xea87[133]]= JSON[_0xea87[134]](_0xa893x3d[_0xea87[133]]);for(var _0xa893x45=0;_0xa893x45< _0xa893x3d[_0xea87[133]][_0xea87[59]];_0xa893x45+= 1){if(_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[135]]&& _[_0xea87[108]](_0xa893x34,_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[135]])&& _0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[136]]&& _0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[137]]&& _0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[138]]){_0xa893x44[_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[135]]](_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[137]],null,util[_0xea87[128]](_0xea87[139],_0xa893x3d[_0xea87[121]],_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[136]],_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[137]],_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[138]]))}}};if(_0xa893x3d[_0xea87[140]]){_0xa893x3d[_0xea87[140]]= JSON[_0xea87[134]](_0xa893x3d[_0xea87[140]]);_0xa893x44[_0xea87[64]](_0xa893x39(_0xa893x3d[_0xea87[140]][_0xea87[114]]))};_0xa893x41= _0xa893x44[_0xea87[141]]();_0xa893x44[_0xea87[32]](_0xa893x33);_0xa893x44[_0xea87[31]](0);logger[_0xea87[143]](_0xea87[142],_0xa893x44.toString());return db[_0xea87[146]][_0xea87[53]](_0xa893x44.toString(),{type:db[_0xea87[146]][_0xea87[145]][_0xea87[144]]})}})[_0xea87[40]](function(_0xa893x42){if(!_0xa893x42[_0xea87[59]]){throw  new db[_0xea87[148]].ValidationError(_0xea87[164])};if(_0xa893x48[_0xea87[157]]=== _0xea87[165]){return null};var _0xa893x4b=_[_0xea87[68]](_0xa893x48,{name:_0xa893x48[_0xea87[166]]|| _0xa893x48[_0xea87[45]]|| _0xa893x3d[_0xea87[45]],basename:_0xa893x4a,savename:util[_0xea87[128]](_0xea87[167],_0xa893x48[_0xea87[45]]|| _0xa893x3d[_0xea87[45]],require(_0xea87[169])[_0xea87[168]](4),_0xa893x48[_0xea87[157]]|| _0xea87[170])});return db[_0xea87[171]][_0xea87[82]](_0xa893x4b,{raw:true})})[_0xea87[40]](function(_0xa893x1c){_0xa893x41[_0xea87[64]](_0xa893x3d[_0xea87[121]]+ _0xea87[151],_0xa893x48[_0xea87[152]],_0xa893x48[_0xea87[153]]);if(_0xa893x1c){logger[_0xea87[155]](_0xea87[154],_0xa893x41.toString());require(_0xea87[161])[_0xea87[160]](path[_0xea87[85]](__dirname,_0xea87[156],_0xa893x1c[_0xea87[157]]),[_0xa893x1c[_0xea87[79]],_0xa893x41.toString(),path[_0xea87[85]](__dirname,_0xea87[158],_0xa893x1c[_0xea87[159]]),_0xa893x4a]);return _0xa893x1c}else {var _0xa893x44=squel[_0xea87[120]]();_0xa893x44[_0xea87[122]](_0xea87[111]+ _0xa893x41.toString()+ _0xea87[118],_0xea87[162]);_0xa893x44[_0xea87[115]](_0xea87[163],_0xea87[30]);_0xa893x41[_0xea87[32]](_0xa893x48[_0xea87[32]]|| _0xa893x33);_0xa893x41[_0xea87[31]](_0xa893x48[_0xea87[31]]|| 0);return db[_0xea87[146]][_0xea87[53]](_0xa893x44.toString(),{type:db[_0xea87[146]][_0xea87[145]][_0xea87[144]]})[_0xea87[40]](function(_0xa893x42){if(!_0xa893x42[_0xea87[59]]){_0xa893x40= 0}else {_0xa893x40= _0xa893x42[0][_0xea87[30]]|| 0};return db[_0xea87[146]][_0xea87[53]](_0xa893x41.toString(),{type:db[_0xea87[146]][_0xea87[145]][_0xea87[144]]})})[_0xea87[40]](function(_0xa893x42){return {rows:_0xa893x42|| [],count:_0xa893x40}})}})}exports[_0xea87[172]]= function(_0xa893x2c,_0xa893x1a){return runReport(_0xa893x2c[_0xea87[80]],_0xa893x2c[_0xea87[53]],_0xa893x2c[_0xea87[72]])[_0xea87[40]](respondWithResult(_0xa893x1a,null))[_0xea87[73]](handleError(_0xa893x1a,null))};exports[_0xea87[173]]= runReport;exports[_0xea87[53]]= function(_0xa893x2c,_0xa893x1a){var _0xa893x33=10;var _0xa893x34=[_0xea87[85],_0xea87[86],_0xea87[87],_0xea87[88],_0xea87[89]];var _0xa893x35={"\x53\x55\x4D":_0xea87[90],"\x43\x4F\x55\x4E\x54":_0xea87[91],"\x43\x4F\x55\x4E\x54\x20\x44\x49\x53\x54\x49\x4E\x43\x54":_0xea87[92],"\x4D\x41\x58":_0xea87[93],"\x4D\x49\x4E":_0xea87[94],"\x41\x56\x47":_0xea87[95],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54":_0xea87[96],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x41\x53\x43":_0xea87[97],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x44\x45\x53\x43":_0xea87[98]};var _0xa893x36={"\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45":_0xea87[99],"\x44\x41\x54\x45":_0xea87[100],"\x48\x4F\x55\x52":_0xea87[101],"\x52\x4F\x55\x4E\x44":_0xea87[102],"\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50":_0xea87[103]};var _0xa893x37=function(_0xa893x38){return !_[_0xea87[108]]([_0xea87[104],_0xea87[105],_0xea87[106],_0xea87[107]],_0xa893x38)};var _0xa893x39=function(_0xa893x3a){if(!_0xa893x3a||  !_0xa893x3a[_0xea87[109]][_0xea87[59]]){return _0xea87[110]};for(var _0xa893x3b=_0xea87[111],_0xa893x3c=0;_0xa893x3c< _0xa893x3a[_0xea87[109]][_0xea87[59]];_0xa893x3c+= 1){_0xa893x3c> 0&& (_0xa893x3b+= _0xea87[112]+ _0xa893x3a[_0xea87[113]]+ _0xea87[112]);_0xa893x3b+= _0xa893x3a[_0xea87[109]][_0xa893x3c][_0xea87[114]]?_0xa893x39(_0xa893x3a[_0xea87[109]][_0xa893x3c][_0xea87[114]]):_0xa893x3a[_0xea87[109]][_0xa893x3c][_0xea87[115]]+ _0xea87[112]+ _0xa893x3a[_0xea87[109]][_0xa893x3c][_0xea87[116]]+ (_0xa893x37(_0xa893x3a[_0xea87[109]][_0xa893x3c][_0xea87[116]])?_0xea87[112]+ _0xa893x3a[_0xea87[109]][_0xa893x3c][_0xea87[117]]:_0xea87[110])};return _0xa893x3b+ _0xea87[118]};var _0xa893x1f={where:{id:_0xa893x2c[_0xea87[80]][_0xea87[79]]}},_0xa893x3d,_0xa893x3e,_0xa893x3f,_0xa893x40,_0xa893x41;_0xa893x1f= _[_0xea87[68]]({},_0xa893x1f,_0xa893x2c[_0xea87[72]]);return db[_0xea87[50]][_0xea87[81]](_0xa893x1f)[_0xea87[40]](function(_0xa893x1c){if(_0xa893x1c){_0xa893x3d= _0xa893x1c;return _0xa893x1c[_0xea87[150]]()};return null})[_0xea87[40]](function(_0xa893x42){if(_0xa893x42){if(!_0xa893x42[_0xea87[59]]){throw  new db[_0xea87[148]].ValidationError(_0xea87[147])};_0xa893x3e= _0xa893x42;return db[_0xea87[149]][_0xea87[77]]({raw:true})};return null})[_0xea87[40]](function(_0xa893x42){if(_0xa893x42){_0xa893x3f= _[_0xea87[119]](_0xa893x42,_0xea87[79]);var _0xa893x43;var _0xa893x44=squel[_0xea87[120]]();_0xa893x44[_0xea87[122]](_0xa893x3d[_0xea87[121]]);for(var _0xa893x3c=0;_0xa893x3c< _0xa893x3e[_0xea87[59]];_0xa893x3c+= 1){_0xa893x43= _0xa893x3e[_0xa893x3c][_0xea87[123]]?_0xa893x3f[_0xa893x3e[_0xa893x3c][_0xea87[123]]][_0xea87[124]]:_0xa893x3e[_0xa893x3c][_0xea87[115]];_0xa893x43= _0xa893x3e[_0xa893x3c][_0xea87[125]]?_[_0xea87[127]](_0xa893x35[_0xa893x3e[_0xa893x3c][_0xea87[125]]],_0xea87[126],_0xa893x43):_0xa893x43;_0xa893x43= _0xa893x3e[_0xa893x3c][_0xea87[128]]?_[_0xea87[127]](_0xa893x36[_0xa893x3e[_0xa893x3c][_0xea87[128]]],_0xea87[126],_0xa893x43):_0xa893x43;if(_0xa893x3e[_0xa893x3c][_0xea87[129]]){_0xa893x44[_0xea87[114]](_0xa893x43)};_0xa893x3e[_0xa893x3c][_0xea87[130]]&& _0xa893x44[_0xea87[62]](_0xa893x43,_0xa893x3e[_0xa893x3c][_0xea87[130]]=== _0xea87[131]?false:true);_0xa893x44[_0xea87[115]](_0xa893x43,_0xa893x3e[_0xa893x3c][_0xea87[132]]|| _0xa893x43)};if(_0xa893x3d[_0xea87[133]]){_0xa893x3d[_0xea87[133]]= JSON[_0xea87[134]](_0xa893x3d[_0xea87[133]]);for(var _0xa893x45=0;_0xa893x45< _0xa893x3d[_0xea87[133]][_0xea87[59]];_0xa893x45+= 1){if(_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[135]]&& _[_0xea87[108]](_0xa893x34,_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[135]])&& _0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[136]]&& _0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[137]]&& _0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[138]]){_0xa893x44[_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[135]]](_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[137]],null,util[_0xea87[128]](_0xea87[139],_0xa893x3d[_0xea87[121]],_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[136]],_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[137]],_0xa893x3d[_0xea87[133]][_0xa893x45][_0xea87[138]]))}}};if(_0xa893x3d[_0xea87[140]]){_0xa893x3d[_0xea87[140]]= JSON[_0xea87[134]](_0xa893x3d[_0xea87[140]]);_0xa893x44[_0xea87[64]](_0xa893x39(_0xa893x3d[_0xea87[140]][_0xea87[114]]))};_0xa893x41= _0xa893x44[_0xea87[141]]();_0xa893x44[_0xea87[32]](_0xa893x33);_0xa893x44[_0xea87[31]](0);logger[_0xea87[143]](_0xea87[142],_0xa893x44.toString());return db[_0xea87[146]][_0xea87[53]](_0xa893x44.toString(),{type:db[_0xea87[146]][_0xea87[145]][_0xea87[144]]})}})[_0xea87[40]](function(){return {sql:_0xa893x41.toString()}})[_0xea87[40]](respondWithResult(_0xa893x1a,null))[_0xea87[73]](handleError(_0xa893x1a,null))}
\ No newline at end of file
index 76fa232..b19cb61 100644 (file)
@@ -1 +1 @@
-var _0x448a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x5F\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x448a[0];var _=require(_0x448a[1]);var util=require(_0x448a[2]);var logger=require(_0x448a[4])(_0x448a[3]);var moment=require(_0x448a[5]);var BPromise=require(_0x448a[6]);var rp=require(_0x448a[7]);var attributes=require(_0x448a[8]);module[_0x448a[9]]= function(_0x95d2x8,_0x95d2x9){return _0x95d2x8[_0x448a[12]](_0x448a[10],attributes,{tableName:_0x448a[11],paranoid:true,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xb845=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x5F\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0xb845[0];var _=require(_0xb845[1]);var util=require(_0xb845[2]);var logger=require(_0xb845[4])(_0xb845[3]);var moment=require(_0xb845[5]);var BPromise=require(_0xb845[6]);var rp=require(_0xb845[7]);var attributes=require(_0xb845[8]);module[_0xb845[9]]= function(_0xe91fx8,_0xe91fx9){return _0xe91fx8[_0xb845[12]](_0xb845[10],attributes,{tableName:_0xb845[11],paranoid:true,indexes:[],timestamps:true})}
\ No newline at end of file
index acc1822..b41e3e7 100644 (file)
@@ -1 +1 @@
-var _0x9f32=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x41\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x41\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x9f32[0];var _=require(_0x9f32[1]);var util=require(_0x9f32[2]);var moment=require(_0x9f32[3]);var BPromise=require(_0x9f32[4]);var rs=require(_0x9f32[5]);var fs=require(_0x9f32[6]);var db=require(_0x9f32[8])[_0x9f32[7]];var utils=require(_0x9f32[9]);var logger=require(_0x9f32[11])(_0x9f32[10]);var config=require(_0x9f32[12]);var jayson=require(_0x9f32[13]);var client=jayson[_0x9f32[15]][_0x9f32[14]]({port:9002});function respondWithRpcPromise(_0xac1bxe,_0xac1bxf,_0xac1bx10){return  new BPromise(function(_0xac1bx11,_0xac1bx12){return client[_0x9f32[28]](_0xac1bxe,_0xac1bx10)[_0x9f32[27]](function(_0xac1bx14){logger[_0x9f32[20]](_0x9f32[16],_0xac1bxf,_0x9f32[19]);logger[_0x9f32[23]](_0x9f32[21],_0xac1bxf,_0x9f32[19],JSON[_0x9f32[22]](_0xac1bx14));if(_0xac1bx14[_0x9f32[17]]){if(_0xac1bx14[_0x9f32[17]][_0x9f32[24]]=== 500){logger[_0x9f32[17]](_0x9f32[16],_0xac1bxf,_0xac1bx14[_0x9f32[17]][_0x9f32[25]]);return _0xac1bx12(_0xac1bx14[_0x9f32[17]][_0x9f32[25]])};logger[_0x9f32[17]](_0x9f32[16],_0xac1bxf,_0xac1bx14[_0x9f32[17]][_0x9f32[25]]);return _0xac1bx11(_0xac1bx14[_0x9f32[17]][_0x9f32[25]])}else {logger[_0x9f32[20]](_0x9f32[16],_0xac1bxf,_0x9f32[19]);_0xac1bx11(_0xac1bx14[_0x9f32[26]][_0x9f32[25]])}})[_0x9f32[18]](function(_0xac1bx13){logger[_0x9f32[17]](_0x9f32[16],_0xac1bxf,_0xac1bx13);_0xac1bx12(_0xac1bx13)})})}
\ No newline at end of file
+var _0x7672=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x41\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x41\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x7672[0];var _=require(_0x7672[1]);var util=require(_0x7672[2]);var moment=require(_0x7672[3]);var BPromise=require(_0x7672[4]);var rs=require(_0x7672[5]);var fs=require(_0x7672[6]);var db=require(_0x7672[8])[_0x7672[7]];var utils=require(_0x7672[9]);var logger=require(_0x7672[11])(_0x7672[10]);var config=require(_0x7672[12]);var jayson=require(_0x7672[13]);var client=jayson[_0x7672[15]][_0x7672[14]]({port:9002});function respondWithRpcPromise(_0x7073xe,_0x7073xf,_0x7073x10){return  new BPromise(function(_0x7073x11,_0x7073x12){return client[_0x7672[28]](_0x7073xe,_0x7073x10)[_0x7672[27]](function(_0x7073x14){logger[_0x7672[20]](_0x7672[16],_0x7073xf,_0x7672[19]);logger[_0x7672[23]](_0x7672[21],_0x7073xf,_0x7672[19],JSON[_0x7672[22]](_0x7073x14));if(_0x7073x14[_0x7672[17]]){if(_0x7073x14[_0x7672[17]][_0x7672[24]]=== 500){logger[_0x7672[17]](_0x7672[16],_0x7073xf,_0x7073x14[_0x7672[17]][_0x7672[25]]);return _0x7073x12(_0x7073x14[_0x7672[17]][_0x7672[25]])};logger[_0x7672[17]](_0x7672[16],_0x7073xf,_0x7073x14[_0x7672[17]][_0x7672[25]]);return _0x7073x11(_0x7073x14[_0x7672[17]][_0x7672[25]])}else {logger[_0x7672[20]](_0x7672[16],_0x7073xf,_0x7672[19]);_0x7073x11(_0x7073x14[_0x7672[26]][_0x7672[25]])}})[_0x7672[18]](function(_0x7073x13){logger[_0x7672[17]](_0x7672[16],_0x7073xf,_0x7073x13);_0x7073x12(_0x7073x13)})})}
\ No newline at end of file
index 29c9ee6..7a8b466 100644 (file)
@@ -1 +1 @@
-var _0xe343=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x70\x72\x65\x76\x69\x65\x77","\x70\x72\x65\x76\x69\x65\x77","\x2F\x3A\x69\x64\x2F\x72\x75\x6E","\x72\x75\x6E","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x72\x79","\x71\x75\x65\x72\x79","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xe343[0];var multer=require(_0xe343[1]);var util=require(_0xe343[2]);var path=require(_0xe343[3]);var express=require(_0xe343[4]);var router=express.Router();var auth=require(_0xe343[5]);var interaction=require(_0xe343[6]);var config=require(_0xe343[7]);var controller=require(_0xe343[8]);router[_0xe343[12]](_0xe343[9],auth[_0xe343[10]](),controller[_0xe343[11]]);router[_0xe343[12]](_0xe343[13],auth[_0xe343[10]](),controller[_0xe343[14]]);router[_0xe343[12]](_0xe343[15],auth[_0xe343[10]](),controller[_0xe343[16]]);router[_0xe343[12]](_0xe343[17],auth[_0xe343[10]](),controller[_0xe343[18]]);router[_0xe343[12]](_0xe343[19],auth[_0xe343[10]](),controller[_0xe343[20]]);router[_0xe343[22]](_0xe343[9],auth[_0xe343[10]](),controller[_0xe343[21]]);router[_0xe343[24]](_0xe343[13],auth[_0xe343[10]](),controller[_0xe343[23]]);router[_0xe343[26]](_0xe343[13],auth[_0xe343[10]](),controller[_0xe343[25]]);module[_0xe343[27]]= router
\ No newline at end of file
+var _0x6daf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x70\x72\x65\x76\x69\x65\x77","\x70\x72\x65\x76\x69\x65\x77","\x2F\x3A\x69\x64\x2F\x72\x75\x6E","\x72\x75\x6E","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x72\x79","\x71\x75\x65\x72\x79","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6daf[0];var multer=require(_0x6daf[1]);var util=require(_0x6daf[2]);var path=require(_0x6daf[3]);var express=require(_0x6daf[4]);var router=express.Router();var auth=require(_0x6daf[5]);var interaction=require(_0x6daf[6]);var config=require(_0x6daf[7]);var controller=require(_0x6daf[8]);router[_0x6daf[12]](_0x6daf[9],auth[_0x6daf[10]](),controller[_0x6daf[11]]);router[_0x6daf[12]](_0x6daf[13],auth[_0x6daf[10]](),controller[_0x6daf[14]]);router[_0x6daf[12]](_0x6daf[15],auth[_0x6daf[10]](),controller[_0x6daf[16]]);router[_0x6daf[12]](_0x6daf[17],auth[_0x6daf[10]](),controller[_0x6daf[18]]);router[_0x6daf[12]](_0x6daf[19],auth[_0x6daf[10]](),controller[_0x6daf[20]]);router[_0x6daf[22]](_0x6daf[9],auth[_0x6daf[10]](),controller[_0x6daf[21]]);router[_0x6daf[24]](_0x6daf[13],auth[_0x6daf[10]](),controller[_0x6daf[23]]);router[_0x6daf[26]](_0x6daf[13],auth[_0x6daf[10]](),controller[_0x6daf[25]]);module[_0x6daf[27]]= router
\ No newline at end of file
index bdd783d..b17a168 100644 (file)
@@ -1 +1 @@
-var _0x866a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54"];_0x866a[0];var Sequelize=require(_0x866a[1]);module[_0x866a[2]]= {name:{type:Sequelize[_0x866a[3]],allowNull:false},description:{type:Sequelize[_0x866a[3]]},parent:{type:Sequelize[_0x866a[3]]},table:{type:Sequelize[_0x866a[3]]},conditions:{type:Sequelize[_0x866a[4]]},joins:{type:Sequelize[_0x866a[4]]}}
\ No newline at end of file
+var _0x544d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54"];_0x544d[0];var Sequelize=require(_0x544d[1]);module[_0x544d[2]]= {name:{type:Sequelize[_0x544d[3]],allowNull:false},description:{type:Sequelize[_0x544d[3]]},parent:{type:Sequelize[_0x544d[3]]},table:{type:Sequelize[_0x544d[3]]},conditions:{type:Sequelize[_0x544d[4]]},joins:{type:Sequelize[_0x544d[4]]}}
\ No newline at end of file
index 8bf6353..f43230c 100644 (file)
@@ -1 +1 @@
-var _0xba04=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x70\x72\x65\x76\x69\x65\x77","\x6A\x6F\x69\x6E","\x6C\x65\x66\x74\x5F\x6A\x6F\x69\x6E","\x72\x69\x67\x68\x74\x5F\x6A\x6F\x69\x6E","\x6F\x75\x74\x65\x72\x5F\x6A\x6F\x69\x6E","\x63\x72\x6F\x73\x73\x5F\x6A\x6F\x69\x6E","\x53\x55\x4D\x28\x25\x73\x29","\x43\x4F\x55\x4E\x54\x28\x25\x73\x29","\x43\x4F\x55\x4E\x54\x28\x44\x49\x53\x54\x49\x4E\x43\x54\x20\x25\x73\x29","\x4D\x41\x58\x28\x25\x73\x29","\x4D\x49\x4E\x28\x25\x73\x29","\x41\x56\x47\x28\x25\x73\x29","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x28\x25\x73\x29","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x28\x25\x73\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20\x25\x73\x20\x41\x53\x43\x29","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x28\x25\x73\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20\x25\x73\x20\x44\x45\x53\x43\x29","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x25\x73\x29","\x44\x41\x54\x45\x28\x25\x73\x29","\x48\x4F\x55\x52\x28\x25\x73\x29","\x52\x4F\x55\x4E\x44\x28\x25\x73\x29","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x25\x73\x29","\x49\x53\x20\x4E\x55\x4C\x4C","\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C","\x49\x53\x20\x45\x4D\x50\x54\x59","\x49\x53\x20\x4E\x4F\x54\x20\x45\x4D\x50\x54\x59","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x72\x75\x6C\x65\x73","","\x28","\x20","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x67\x72\x6F\x75\x70","\x66\x69\x65\x6C\x64","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x76\x61\x6C\x75\x65","\x29","\x6B\x65\x79\x42\x79","\x73\x65\x6C\x65\x63\x74","\x74\x61\x62\x6C\x65","\x66\x72\x6F\x6D","\x4D\x65\x74\x72\x69\x63\x49\x64","\x6D\x65\x74\x72\x69\x63","\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x25\x73","\x72\x65\x70\x6C\x61\x63\x65","\x66\x6F\x72\x6D\x61\x74","\x67\x72\x6F\x75\x70\x42\x79","\x6F\x72\x64\x65\x72\x42\x79","\x44\x45\x53\x43","\x61\x6C\x69\x61\x73","\x6A\x6F\x69\x6E\x73","\x70\x61\x72\x73\x65","\x74\x79\x70\x65","\x70\x61\x72\x65\x6E\x74\x4B\x65\x79","\x66\x6F\x72\x65\x69\x67\x6E\x54\x61\x62\x6C\x65","\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79","\x25\x73\x2E\x25\x73\x20\x3D\x20\x25\x73\x2E\x25\x73","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x63\x6C\x6F\x6E\x65","\x4C\x69\x6D\x69\x74\x65\x64\x20\x51\x75\x65\x72\x79\x3A","\x64\x65\x62\x75\x67","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x50\x6C\x65\x61\x73\x65\x20\x69\x6E\x73\x65\x72\x74\x20\x61\x74\x20\x6C\x65\x61\x73\x74\x20\x6F\x6E\x65\x20\x66\x69\x65\x6C\x64\x21","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x41\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2E\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x42\x45\x54\x57\x45\x45\x4E\x20\x3F\x20\x41\x4E\x44\x20\x3F","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x65\x6E\x64\x44\x61\x74\x65","\x52\x75\x6E\x20\x51\x75\x65\x72\x79\x3A","\x69\x6E\x66\x6F","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x65\x78\x70\x6F\x72\x74\x2F","\x6F\x75\x74\x70\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x66\x69\x6C\x65\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x73\x61\x76\x65\x6E\x61\x6D\x65","\x66\x6F\x72\x6B","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x63\x6F\x75\x6E\x74\x54\x61\x62\x6C\x65","\x43\x4F\x55\x4E\x54\x28\x2A\x29","\x4E\x6F\x20\x44\x61\x74\x61\x21","\x77\x65\x62","\x66\x75\x6C\x6C\x50\x61\x74\x68","\x25\x73\x2D\x25\x73\x2E\x25\x73","\x67\x65\x6E\x65\x72\x61\x74\x65","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x63\x73\x76","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x72\x75\x6E","\x72\x75\x6E\x52\x65\x70\x6F\x72\x74"];_0xba04[0];var jsonpatch=require(_0xba04[1]);var rp=require(_0xba04[2]);var moment=require(_0xba04[3]);var BPromise=require(_0xba04[4]);var Mustache=require(_0xba04[5]);var util=require(_0xba04[6]);var path=require(_0xba04[7]);var sox=require(_0xba04[8]);var csv=require(_0xba04[9]);var ejs=require(_0xba04[10]);var fs=require(_0xba04[11]);var _=require(_0xba04[12]);var squel=require(_0xba04[13]);var crypto=require(_0xba04[14]);var jsforce=require(_0xba04[15]);var deskjs=require(_0xba04[16]);var toCsv=require(_0xba04[9]);var querystring=require(_0xba04[17]);var Papa=require(_0xba04[18]);var qs=require(_0xba04[19]);var logger=require(_0xba04[21])(_0xba04[20]);var utils=require(_0xba04[22]);var config=require(_0xba04[23]);var db=require(_0xba04[25])[_0xba04[24]];function respondWithStatusCode(_0xb10ex1a,_0xb10ex1b){_0xb10ex1b= _0xb10ex1b|| 204;return function(_0xb10ex1c){if(_0xb10ex1c){return _0xb10ex1a[_0xba04[26]](_0xb10ex1b)};return _0xb10ex1a[_0xba04[28]](_0xb10ex1b)[_0xba04[27]]()}}function respondWithResult(_0xb10ex1a,_0xb10ex1b){_0xb10ex1b= _0xb10ex1b|| 200;return function(_0xb10ex1c){if(_0xb10ex1c){return _0xb10ex1a[_0xba04[28]](_0xb10ex1b)[_0xba04[29]](_0xb10ex1c)}}}function respondWithFilteredResult(_0xb10ex1a,_0xb10ex1f){return function(_0xb10ex1c){if(_0xb10ex1c){var _0xb10ex20=_0xb10ex1c[_0xba04[30]],_0xb10ex21=_0xb10ex1f[_0xba04[31]],_0xb10ex22=_0xb10ex1f[_0xba04[31]]+ _0xb10ex1f[_0xba04[32]],_0xb10ex1b;if(_0xb10ex22>= _0xb10ex20){_0xb10ex22= _0xb10ex20;_0xb10ex1b= 200}else {_0xb10ex1b= 206};_0xb10ex1a[_0xba04[28]](_0xb10ex1b);return _0xb10ex1a[_0xba04[36]](_0xba04[33],_0xb10ex21+ _0xba04[34]+ _0xb10ex22+ _0xba04[35]+ _0xb10ex20)[_0xba04[29]](_0xb10ex1c)};return null}}function patchUpdates(_0xb10ex24){return function(_0xb10ex1c){try{jsonpatch[_0xba04[37]](_0xb10ex1c,_0xb10ex24,true)}catch(err){return BPromise[_0xba04[38]](err)};return _0xb10ex1c[_0xba04[39]]()}}function saveUpdates(_0xb10ex26,_0xb10ex1b){return function(_0xb10ex1c){if(_0xb10ex1c){return _0xb10ex1c[_0xba04[41]](_0xb10ex26)[_0xba04[40]](function(_0xb10ex27){return _0xb10ex27})};return null}}function removeEntity(_0xb10ex1a,_0xb10ex1b){return function(_0xb10ex1c){if(_0xb10ex1c){return _0xb10ex1c[_0xba04[42]]()[_0xba04[40]](function(){_0xb10ex1a[_0xba04[28]](204)[_0xba04[27]]()})}}}function handleEntityNotFound(_0xb10ex1a,_0xb10ex1b){return function(_0xb10ex1c){if(!_0xb10ex1c){_0xb10ex1a[_0xba04[26]](404)};return _0xb10ex1c}}function handleError(_0xb10ex1a,_0xb10ex1b){_0xb10ex1b= _0xb10ex1b|| 500;return function(_0xb10ex2b){logger[_0xba04[44]](_0xb10ex2b[_0xba04[43]]);if(_0xb10ex2b[_0xba04[45]]){delete _0xb10ex2b[_0xba04[45]]};_0xb10ex1a[_0xba04[28]](_0xb10ex1b)[_0xba04[46]](_0xb10ex2b)}}exports[_0xba04[47]]= function(_0xb10ex2c,_0xb10ex1a){var _0xb10ex1f={},_0xb10ex2d={},_0xb10ex2e={count:0,rows:[]};_0xb10ex2d[_0xba04[48]]= _[_0xba04[51]](db[_0xba04[50]][_0xba04[49]]);var _0xb10ex2f={dateStart:_0xb10ex2c[_0xba04[53]][_0xba04[52]],dateEnd:_0xb10ex2c[_0xba04[53]][_0xba04[54]]};delete _0xb10ex2c[_0xba04[53]][_0xba04[52]];delete _0xb10ex2c[_0xba04[53]][_0xba04[54]];_0xb10ex2d[_0xba04[53]]= _[_0xba04[51]](_0xb10ex2c[_0xba04[53]]);_0xb10ex2d[_0xba04[55]]= _[_0xba04[56]](_0xb10ex2d[_0xba04[48]],_0xb10ex2d[_0xba04[53]]);_0xb10ex1f[_0xba04[57]]= _[_0xba04[56]](_0xb10ex2d[_0xba04[48]],qs[_0xba04[58]](_0xb10ex2c[_0xba04[53]][_0xba04[58]]));_0xb10ex1f[_0xba04[57]]= (_0xb10ex1f[_0xba04[57]][_0xba04[59]])?_0xb10ex1f[_0xba04[57]]:_0xb10ex2d[_0xba04[48]];if(!_0xb10ex2c[_0xba04[53]][_0xba04[61]](_0xba04[60])){_0xb10ex1f[_0xba04[32]]= qs[_0xba04[32]](_0xb10ex2c[_0xba04[53]][_0xba04[32]]);_0xb10ex1f[_0xba04[31]]= qs[_0xba04[31]](_0xb10ex2c[_0xba04[53]][_0xba04[31]])};_0xb10ex1f[_0xba04[62]]= qs[_0xba04[63]](_0xb10ex2c[_0xba04[53]][_0xba04[63]]);_0xb10ex1f[_0xba04[64]]= qs[_0xba04[55]](_[_0xba04[65]](_0xb10ex2c[_0xba04[53]],_0xb10ex2d[_0xba04[55]]));if(_0xb10ex2f[_0xba04[52]]){if(_0xb10ex2f[_0xba04[54]]){_0xb10ex2f[_0xba04[54]]= moment(_0xb10ex2f[_0xba04[54]])[_0xba04[67]](1,_0xba04[66])}else {_0xb10ex2f[_0xba04[54]]= moment(_0xb10ex2f[_0xba04[52]])[_0xba04[67]](1,_0xba04[66])};_[_0xba04[68]](_0xb10ex1f[_0xba04[64]],{createdAt:{$gte:_0xb10ex2f[_0xba04[52]],$lte:_0xb10ex2f[_0xba04[54]]}})};if(_0xb10ex2c[_0xba04[53]][_0xba04[69]]){_0xb10ex1f[_0xba04[64]]= _[_0xba04[68]](_0xb10ex1f[_0xba04[64]],{$or:_[_0xba04[71]](_0xb10ex1f[_0xba04[57]],function(_0xb10ex30){var _0xb10ex2e={};_0xb10ex2e[_0xb10ex30]= {$like:_0xba04[70]+ _0xb10ex2c[_0xba04[53]][_0xba04[69]]+ _0xba04[70]};return _0xb10ex2e})})};_0xb10ex1f= _[_0xba04[68]]({},_0xb10ex1f,_0xb10ex2c[_0xba04[72]]);var _0xb10ex31={where:_0xb10ex1f[_0xba04[64]]};return db[_0xba04[50]][_0xba04[30]](_0xb10ex31)[_0xba04[40]](function(_0xb10ex20){_0xb10ex2e[_0xba04[30]]= _0xb10ex20;if(_0xb10ex2c[_0xba04[53]][_0xba04[75]]){_0xb10ex1f[_0xba04[76]]= [{all:true}]};return db[_0xba04[50]][_0xba04[77]](_0xb10ex1f)})[_0xba04[40]](function(_0xb10ex32){_0xb10ex2e[_0xba04[74]]= _0xb10ex32;return _0xb10ex2e})[_0xba04[40]](respondWithFilteredResult(_0xb10ex1a,_0xb10ex1f))[_0xba04[73]](handleError(_0xb10ex1a,null))};exports[_0xba04[78]]= function(_0xb10ex2c,_0xb10ex1a){var _0xb10ex1f={raw:true,where:{id:_0xb10ex2c[_0xba04[80]][_0xba04[79]]}},_0xb10ex2d={};_0xb10ex2d[_0xba04[48]]= _[_0xba04[51]](db[_0xba04[50]][_0xba04[49]]);_0xb10ex2d[_0xba04[53]]= _[_0xba04[51]](_0xb10ex2c[_0xba04[53]]);_0xb10ex2d[_0xba04[55]]= _[_0xba04[56]](_0xb10ex2d[_0xba04[48]],_0xb10ex2d[_0xba04[53]]);_0xb10ex1f[_0xba04[57]]= _[_0xba04[56]](_0xb10ex2d[_0xba04[48]],qs[_0xba04[58]](_0xb10ex2c[_0xba04[53]][_0xba04[58]]));_0xb10ex1f[_0xba04[57]]= (_0xb10ex1f[_0xba04[57]][_0xba04[59]])?_0xb10ex1f[_0xba04[57]]:_0xb10ex2d[_0xba04[48]];if(_0xb10ex2c[_0xba04[53]][_0xba04[75]]){_0xb10ex1f[_0xba04[76]]= [{all:true}]};_0xb10ex1f= _[_0xba04[68]]({},_0xb10ex1f,_0xb10ex2c[_0xba04[72]]);return db[_0xba04[50]][_0xba04[81]](_0xb10ex1f)[_0xba04[40]](handleEntityNotFound(_0xb10ex1a,null))[_0xba04[40]](respondWithResult(_0xb10ex1a,null))[_0xba04[73]](handleError(_0xb10ex1a,null))};exports[_0xba04[82]]= function(_0xb10ex2c,_0xb10ex1a){return db[_0xba04[50]][_0xba04[82]](_0xb10ex2c[_0xba04[83]],{})[_0xba04[40]](respondWithResult(_0xb10ex1a,201))[_0xba04[73]](handleError(_0xb10ex1a,null))};exports[_0xba04[41]]= function(_0xb10ex2c,_0xb10ex1a){if(_0xb10ex2c[_0xba04[83]][_0xba04[79]]){delete _0xb10ex2c[_0xba04[83]][_0xba04[79]]};return db[_0xba04[50]][_0xba04[81]]({where:{id:_0xb10ex2c[_0xba04[80]][_0xba04[79]]}})[_0xba04[40]](handleEntityNotFound(_0xb10ex1a,null))[_0xba04[40]](saveUpdates(_0xb10ex2c[_0xba04[83]],null))[_0xba04[40]](respondWithResult(_0xb10ex1a,null))[_0xba04[73]](handleError(_0xb10ex1a,null))};exports[_0xba04[42]]= function(_0xb10ex2c,_0xb10ex1a){return db[_0xba04[50]][_0xba04[81]]({where:{id:_0xb10ex2c[_0xba04[80]][_0xba04[79]]}})[_0xba04[40]](handleEntityNotFound(_0xb10ex1a,null))[_0xba04[40]](removeEntity(_0xb10ex1a,null))[_0xba04[73]](handleError(_0xb10ex1a,null))};exports[_0xba04[84]]= function(_0xb10ex2c,_0xb10ex1a){var _0xb10ex33=10;var _0xb10ex34=[_0xba04[85],_0xba04[86],_0xba04[87],_0xba04[88],_0xba04[89]];var _0xb10ex35={"\x53\x55\x4D":_0xba04[90],"\x43\x4F\x55\x4E\x54":_0xba04[91],"\x43\x4F\x55\x4E\x54\x20\x44\x49\x53\x54\x49\x4E\x43\x54":_0xba04[92],"\x4D\x41\x58":_0xba04[93],"\x4D\x49\x4E":_0xba04[94],"\x41\x56\x47":_0xba04[95],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54":_0xba04[96],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x41\x53\x43":_0xba04[97],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x44\x45\x53\x43":_0xba04[98]};var _0xb10ex36={"\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45":_0xba04[99],"\x44\x41\x54\x45":_0xba04[100],"\x48\x4F\x55\x52":_0xba04[101],"\x52\x4F\x55\x4E\x44":_0xba04[102],"\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50":_0xba04[103]};var _0xb10ex37=function(_0xb10ex38){return !_[_0xba04[108]]([_0xba04[104],_0xba04[105],_0xba04[106],_0xba04[107]],_0xb10ex38)};var _0xb10ex39=function(_0xb10ex3a){if(!_0xb10ex3a||  !_0xb10ex3a[_0xba04[109]][_0xba04[59]]){return _0xba04[110]};for(var _0xb10ex3b=_0xba04[111],_0xb10ex3c=0;_0xb10ex3c< _0xb10ex3a[_0xba04[109]][_0xba04[59]];_0xb10ex3c+= 1){_0xb10ex3c> 0&& (_0xb10ex3b+= _0xba04[112]+ _0xb10ex3a[_0xba04[113]]+ _0xba04[112]);_0xb10ex3b+= _0xb10ex3a[_0xba04[109]][_0xb10ex3c][_0xba04[114]]?_0xb10ex39(_0xb10ex3a[_0xba04[109]][_0xb10ex3c][_0xba04[114]]):_0xb10ex3a[_0xba04[109]][_0xb10ex3c][_0xba04[115]]+ _0xba04[112]+ _0xb10ex3a[_0xba04[109]][_0xb10ex3c][_0xba04[116]]+ (_0xb10ex37(_0xb10ex3a[_0xba04[109]][_0xb10ex3c][_0xba04[116]])?_0xba04[112]+ _0xb10ex3a[_0xba04[109]][_0xb10ex3c][_0xba04[117]]:_0xba04[110])};return _0xb10ex3b+ _0xba04[118]};var _0xb10ex1f={where:{id:_0xb10ex2c[_0xba04[80]][_0xba04[79]]}},_0xb10ex3d,_0xb10ex3e,_0xb10ex3f,_0xb10ex40,_0xb10ex41;_0xb10ex1f= _[_0xba04[68]]({},_0xb10ex1f,_0xb10ex2c[_0xba04[72]]);return db[_0xba04[50]][_0xba04[81]](_0xb10ex1f)[_0xba04[40]](function(_0xb10ex1c){if(_0xb10ex1c){_0xb10ex3d= _0xb10ex1c;return _0xb10ex1c[_0xba04[150]]()};return null})[_0xba04[40]](function(_0xb10ex42){if(_0xb10ex42){if(!_0xb10ex42[_0xba04[59]]){throw  new db[_0xba04[148]].ValidationError(_0xba04[147])};_0xb10ex3e= _0xb10ex42;return db[_0xba04[149]][_0xba04[77]]({raw:true})};return null})[_0xba04[40]](function(_0xb10ex42){if(_0xb10ex42){_0xb10ex3f= _[_0xba04[119]](_0xb10ex42,_0xba04[79]);var _0xb10ex43;var _0xb10ex44=squel[_0xba04[120]]();_0xb10ex44[_0xba04[122]](_0xb10ex3d[_0xba04[121]]);for(var _0xb10ex3c=0;_0xb10ex3c< _0xb10ex3e[_0xba04[59]];_0xb10ex3c+= 1){_0xb10ex43= _0xb10ex3e[_0xb10ex3c][_0xba04[123]]?_0xb10ex3f[_0xb10ex3e[_0xb10ex3c][_0xba04[123]]][_0xba04[124]]:_0xb10ex3e[_0xb10ex3c][_0xba04[115]];_0xb10ex43= _0xb10ex3e[_0xb10ex3c][_0xba04[125]]?_[_0xba04[127]](_0xb10ex35[_0xb10ex3e[_0xb10ex3c][_0xba04[125]]],_0xba04[126],_0xb10ex43):_0xb10ex43;_0xb10ex43= _0xb10ex3e[_0xb10ex3c][_0xba04[128]]?_[_0xba04[127]](_0xb10ex36[_0xb10ex3e[_0xb10ex3c][_0xba04[128]]],_0xba04[126],_0xb10ex43):_0xb10ex43;if(_0xb10ex3e[_0xb10ex3c][_0xba04[129]]){_0xb10ex44[_0xba04[114]](_0xb10ex43)};_0xb10ex3e[_0xb10ex3c][_0xba04[130]]&& _0xb10ex44[_0xba04[62]](_0xb10ex43,_0xb10ex3e[_0xb10ex3c][_0xba04[130]]=== _0xba04[131]?false:true);_0xb10ex44[_0xba04[115]](_0xb10ex43,_0xb10ex3e[_0xb10ex3c][_0xba04[132]]|| _0xb10ex43)};if(_0xb10ex3d[_0xba04[133]]){_0xb10ex3d[_0xba04[133]]= JSON[_0xba04[134]](_0xb10ex3d[_0xba04[133]]);for(var _0xb10ex45=0;_0xb10ex45< _0xb10ex3d[_0xba04[133]][_0xba04[59]];_0xb10ex45+= 1){if(_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[135]]&& _[_0xba04[108]](_0xb10ex34,_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[135]])&& _0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[136]]&& _0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[137]]&& _0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[138]]){_0xb10ex44[_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[135]]](_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[137]],null,util[_0xba04[128]](_0xba04[139],_0xb10ex3d[_0xba04[121]],_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[136]],_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[137]],_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[138]]))}}};if(_0xb10ex3d[_0xba04[140]]){_0xb10ex3d[_0xba04[140]]= JSON[_0xba04[134]](_0xb10ex3d[_0xba04[140]]);_0xb10ex44[_0xba04[64]](_0xb10ex39(_0xb10ex3d[_0xba04[140]][_0xba04[114]]))};_0xb10ex41= _0xb10ex44[_0xba04[141]]();_0xb10ex44[_0xba04[32]](_0xb10ex33);_0xb10ex44[_0xba04[31]](0);logger[_0xba04[143]](_0xba04[142],_0xb10ex44.toString());return db[_0xba04[146]][_0xba04[53]](_0xb10ex44.toString(),{type:db[_0xba04[146]][_0xba04[145]][_0xba04[144]]})}})[_0xba04[40]](respondWithResult(_0xb10ex1a,null))[_0xba04[73]](handleError(_0xb10ex1a,null))};function runReport(_0xb10ex47,_0xb10ex48,_0xb10ex49){var _0xb10ex4a=_0xb10ex48[_0xba04[45]];var _0xb10ex33=10;var _0xb10ex34=[_0xba04[85],_0xba04[86],_0xba04[87],_0xba04[88],_0xba04[89]];var _0xb10ex35={"\x53\x55\x4D":_0xba04[90],"\x43\x4F\x55\x4E\x54":_0xba04[91],"\x43\x4F\x55\x4E\x54\x20\x44\x49\x53\x54\x49\x4E\x43\x54":_0xba04[92],"\x4D\x41\x58":_0xba04[93],"\x4D\x49\x4E":_0xba04[94],"\x41\x56\x47":_0xba04[95],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54":_0xba04[96],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x41\x53\x43":_0xba04[97],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x44\x45\x53\x43":_0xba04[98]};var _0xb10ex36={"\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45":_0xba04[99],"\x44\x41\x54\x45":_0xba04[100],"\x48\x4F\x55\x52":_0xba04[101],"\x52\x4F\x55\x4E\x44":_0xba04[102],"\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50":_0xba04[103]};var _0xb10ex37=function(_0xb10ex38){return !_[_0xba04[108]]([_0xba04[104],_0xba04[105],_0xba04[106],_0xba04[107]],_0xb10ex38)};var _0xb10ex39=function(_0xb10ex3a){if(!_0xb10ex3a||  !_0xb10ex3a[_0xba04[109]][_0xba04[59]]){return _0xba04[110]};for(var _0xb10ex3b=_0xba04[111],_0xb10ex3c=0;_0xb10ex3c< _0xb10ex3a[_0xba04[109]][_0xba04[59]];_0xb10ex3c+= 1){_0xb10ex3c> 0&& (_0xb10ex3b+= _0xba04[112]+ _0xb10ex3a[_0xba04[113]]+ _0xba04[112]);_0xb10ex3b+= _0xb10ex3a[_0xba04[109]][_0xb10ex3c][_0xba04[114]]?_0xb10ex39(_0xb10ex3a[_0xba04[109]][_0xb10ex3c][_0xba04[114]]):_0xb10ex3a[_0xba04[109]][_0xb10ex3c][_0xba04[115]]+ _0xba04[112]+ _0xb10ex3a[_0xba04[109]][_0xb10ex3c][_0xba04[116]]+ (_0xb10ex37(_0xb10ex3a[_0xba04[109]][_0xb10ex3c][_0xba04[116]])?_0xba04[112]+ _0xb10ex3a[_0xba04[109]][_0xb10ex3c][_0xba04[117]]:_0xba04[110])};return _0xb10ex3b+ _0xba04[118]};var _0xb10ex1f={where:{id:_0xb10ex47[_0xba04[79]]}},_0xb10ex3d,_0xb10ex3e,_0xb10ex3f,_0xb10ex40,_0xb10ex41;_0xb10ex1f= _[_0xba04[68]]({},_0xb10ex1f,_0xb10ex49);return db[_0xba04[50]][_0xba04[81]](_0xb10ex1f)[_0xba04[40]](function(_0xb10ex1c){if(_0xb10ex1c){_0xb10ex3d= _0xb10ex1c;return _0xb10ex1c[_0xba04[150]]()};return null})[_0xba04[40]](function(_0xb10ex42){if(_0xb10ex42){if(!_0xb10ex42[_0xba04[59]]){throw  new db[_0xba04[148]].ValidationError(_0xba04[147])};_0xb10ex3e= _0xb10ex42;return db[_0xba04[149]][_0xba04[77]]({raw:true})};return null})[_0xba04[40]](function(_0xb10ex42){if(_0xb10ex42){_0xb10ex3f= _[_0xba04[119]](_0xb10ex42,_0xba04[79]);var _0xb10ex43;var _0xb10ex44=squel[_0xba04[120]]();_0xb10ex44[_0xba04[122]](_0xb10ex3d[_0xba04[121]]);for(var _0xb10ex3c=0;_0xb10ex3c< _0xb10ex3e[_0xba04[59]];_0xb10ex3c+= 1){_0xb10ex43= _0xb10ex3e[_0xb10ex3c][_0xba04[123]]?_0xb10ex3f[_0xb10ex3e[_0xb10ex3c][_0xba04[123]]][_0xba04[124]]:_0xb10ex3e[_0xb10ex3c][_0xba04[115]];_0xb10ex43= _0xb10ex3e[_0xb10ex3c][_0xba04[125]]?_[_0xba04[127]](_0xb10ex35[_0xb10ex3e[_0xb10ex3c][_0xba04[125]]],_0xba04[126],_0xb10ex43):_0xb10ex43;_0xb10ex43= _0xb10ex3e[_0xb10ex3c][_0xba04[128]]?_[_0xba04[127]](_0xb10ex36[_0xb10ex3e[_0xb10ex3c][_0xba04[128]]],_0xba04[126],_0xb10ex43):_0xb10ex43;if(_0xb10ex3e[_0xb10ex3c][_0xba04[129]]){_0xb10ex44[_0xba04[114]](_0xb10ex43)};_0xb10ex3e[_0xb10ex3c][_0xba04[130]]&& _0xb10ex44[_0xba04[62]](_0xb10ex43,_0xb10ex3e[_0xb10ex3c][_0xba04[130]]=== _0xba04[131]?false:true);_0xb10ex44[_0xba04[115]](_0xb10ex43,_0xb10ex3e[_0xb10ex3c][_0xba04[132]]|| _0xb10ex43)};if(_0xb10ex3d[_0xba04[133]]){_0xb10ex3d[_0xba04[133]]= JSON[_0xba04[134]](_0xb10ex3d[_0xba04[133]]);for(var _0xb10ex45=0;_0xb10ex45< _0xb10ex3d[_0xba04[133]][_0xba04[59]];_0xb10ex45+= 1){if(_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[135]]&& _[_0xba04[108]](_0xb10ex34,_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[135]])&& _0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[136]]&& _0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[137]]&& _0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[138]]){_0xb10ex44[_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[135]]](_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[137]],null,util[_0xba04[128]](_0xba04[139],_0xb10ex3d[_0xba04[121]],_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[136]],_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[137]],_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[138]]))}}};if(_0xb10ex3d[_0xba04[140]]){_0xb10ex3d[_0xba04[140]]= JSON[_0xba04[134]](_0xb10ex3d[_0xba04[140]]);_0xb10ex44[_0xba04[64]](_0xb10ex39(_0xb10ex3d[_0xba04[140]][_0xba04[114]]))};_0xb10ex41= _0xb10ex44[_0xba04[141]]();_0xb10ex44[_0xba04[32]](_0xb10ex33);_0xb10ex44[_0xba04[31]](0);logger[_0xba04[143]](_0xba04[142],_0xb10ex44.toString());return db[_0xba04[146]][_0xba04[53]](_0xb10ex44.toString(),{type:db[_0xba04[146]][_0xba04[145]][_0xba04[144]]})}})[_0xba04[40]](function(_0xb10ex42){if(!_0xb10ex42[_0xba04[59]]){throw  new db[_0xba04[148]].ValidationError(_0xba04[164])};if(_0xb10ex48[_0xba04[157]]=== _0xba04[165]){return null};var _0xb10ex4b=_[_0xba04[68]](_0xb10ex48,{name:_0xb10ex48[_0xba04[166]]|| _0xb10ex48[_0xba04[45]]|| _0xb10ex3d[_0xba04[45]],basename:_0xb10ex4a,savename:util[_0xba04[128]](_0xba04[167],_0xb10ex48[_0xba04[45]]|| _0xb10ex3d[_0xba04[45]],require(_0xba04[169])[_0xba04[168]](4),_0xb10ex48[_0xba04[157]]|| _0xba04[170])});return db[_0xba04[171]][_0xba04[82]](_0xb10ex4b,{raw:true})})[_0xba04[40]](function(_0xb10ex1c){_0xb10ex41[_0xba04[64]](_0xb10ex3d[_0xba04[121]]+ _0xba04[151],_0xb10ex48[_0xba04[152]],_0xb10ex48[_0xba04[153]]);if(_0xb10ex1c){logger[_0xba04[155]](_0xba04[154],_0xb10ex41.toString());require(_0xba04[161])[_0xba04[160]](path[_0xba04[85]](__dirname,_0xba04[156],_0xb10ex1c[_0xba04[157]]),[_0xb10ex1c[_0xba04[79]],_0xb10ex41.toString(),path[_0xba04[85]](__dirname,_0xba04[158],_0xb10ex1c[_0xba04[159]]),_0xb10ex4a]);return _0xb10ex1c}else {var _0xb10ex44=squel[_0xba04[120]]();_0xb10ex44[_0xba04[122]](_0xba04[111]+ _0xb10ex41.toString()+ _0xba04[118],_0xba04[162]);_0xb10ex44[_0xba04[115]](_0xba04[163],_0xba04[30]);_0xb10ex41[_0xba04[32]](_0xb10ex48[_0xba04[32]]|| _0xb10ex33);_0xb10ex41[_0xba04[31]](_0xb10ex48[_0xba04[31]]|| 0);return db[_0xba04[146]][_0xba04[53]](_0xb10ex44.toString(),{type:db[_0xba04[146]][_0xba04[145]][_0xba04[144]]})[_0xba04[40]](function(_0xb10ex42){if(!_0xb10ex42[_0xba04[59]]){_0xb10ex40= 0}else {_0xb10ex40= _0xb10ex42[0][_0xba04[30]]|| 0};return db[_0xba04[146]][_0xba04[53]](_0xb10ex41.toString(),{type:db[_0xba04[146]][_0xba04[145]][_0xba04[144]]})})[_0xba04[40]](function(_0xb10ex42){return {rows:_0xb10ex42|| [],count:_0xb10ex40}})}})}exports[_0xba04[172]]= function(_0xb10ex2c,_0xb10ex1a){return runReport(_0xb10ex2c[_0xba04[80]],_0xb10ex2c[_0xba04[53]],_0xb10ex2c[_0xba04[72]])[_0xba04[40]](respondWithResult(_0xb10ex1a,null))[_0xba04[73]](handleError(_0xb10ex1a,null))};exports[_0xba04[173]]= runReport;exports[_0xba04[53]]= function(_0xb10ex2c,_0xb10ex1a){var _0xb10ex33=10;var _0xb10ex34=[_0xba04[85],_0xba04[86],_0xba04[87],_0xba04[88],_0xba04[89]];var _0xb10ex35={"\x53\x55\x4D":_0xba04[90],"\x43\x4F\x55\x4E\x54":_0xba04[91],"\x43\x4F\x55\x4E\x54\x20\x44\x49\x53\x54\x49\x4E\x43\x54":_0xba04[92],"\x4D\x41\x58":_0xba04[93],"\x4D\x49\x4E":_0xba04[94],"\x41\x56\x47":_0xba04[95],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54":_0xba04[96],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x41\x53\x43":_0xba04[97],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x44\x45\x53\x43":_0xba04[98]};var _0xb10ex36={"\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45":_0xba04[99],"\x44\x41\x54\x45":_0xba04[100],"\x48\x4F\x55\x52":_0xba04[101],"\x52\x4F\x55\x4E\x44":_0xba04[102],"\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50":_0xba04[103]};var _0xb10ex37=function(_0xb10ex38){return !_[_0xba04[108]]([_0xba04[104],_0xba04[105],_0xba04[106],_0xba04[107]],_0xb10ex38)};var _0xb10ex39=function(_0xb10ex3a){if(!_0xb10ex3a||  !_0xb10ex3a[_0xba04[109]][_0xba04[59]]){return _0xba04[110]};for(var _0xb10ex3b=_0xba04[111],_0xb10ex3c=0;_0xb10ex3c< _0xb10ex3a[_0xba04[109]][_0xba04[59]];_0xb10ex3c+= 1){_0xb10ex3c> 0&& (_0xb10ex3b+= _0xba04[112]+ _0xb10ex3a[_0xba04[113]]+ _0xba04[112]);_0xb10ex3b+= _0xb10ex3a[_0xba04[109]][_0xb10ex3c][_0xba04[114]]?_0xb10ex39(_0xb10ex3a[_0xba04[109]][_0xb10ex3c][_0xba04[114]]):_0xb10ex3a[_0xba04[109]][_0xb10ex3c][_0xba04[115]]+ _0xba04[112]+ _0xb10ex3a[_0xba04[109]][_0xb10ex3c][_0xba04[116]]+ (_0xb10ex37(_0xb10ex3a[_0xba04[109]][_0xb10ex3c][_0xba04[116]])?_0xba04[112]+ _0xb10ex3a[_0xba04[109]][_0xb10ex3c][_0xba04[117]]:_0xba04[110])};return _0xb10ex3b+ _0xba04[118]};var _0xb10ex1f={where:{id:_0xb10ex2c[_0xba04[80]][_0xba04[79]]}},_0xb10ex3d,_0xb10ex3e,_0xb10ex3f,_0xb10ex40,_0xb10ex41;_0xb10ex1f= _[_0xba04[68]]({},_0xb10ex1f,_0xb10ex2c[_0xba04[72]]);return db[_0xba04[50]][_0xba04[81]](_0xb10ex1f)[_0xba04[40]](function(_0xb10ex1c){if(_0xb10ex1c){_0xb10ex3d= _0xb10ex1c;return _0xb10ex1c[_0xba04[150]]()};return null})[_0xba04[40]](function(_0xb10ex42){if(_0xb10ex42){if(!_0xb10ex42[_0xba04[59]]){throw  new db[_0xba04[148]].ValidationError(_0xba04[147])};_0xb10ex3e= _0xb10ex42;return db[_0xba04[149]][_0xba04[77]]({raw:true})};return null})[_0xba04[40]](function(_0xb10ex42){if(_0xb10ex42){_0xb10ex3f= _[_0xba04[119]](_0xb10ex42,_0xba04[79]);var _0xb10ex43;var _0xb10ex44=squel[_0xba04[120]]();_0xb10ex44[_0xba04[122]](_0xb10ex3d[_0xba04[121]]);for(var _0xb10ex3c=0;_0xb10ex3c< _0xb10ex3e[_0xba04[59]];_0xb10ex3c+= 1){_0xb10ex43= _0xb10ex3e[_0xb10ex3c][_0xba04[123]]?_0xb10ex3f[_0xb10ex3e[_0xb10ex3c][_0xba04[123]]][_0xba04[124]]:_0xb10ex3e[_0xb10ex3c][_0xba04[115]];_0xb10ex43= _0xb10ex3e[_0xb10ex3c][_0xba04[125]]?_[_0xba04[127]](_0xb10ex35[_0xb10ex3e[_0xb10ex3c][_0xba04[125]]],_0xba04[126],_0xb10ex43):_0xb10ex43;_0xb10ex43= _0xb10ex3e[_0xb10ex3c][_0xba04[128]]?_[_0xba04[127]](_0xb10ex36[_0xb10ex3e[_0xb10ex3c][_0xba04[128]]],_0xba04[126],_0xb10ex43):_0xb10ex43;if(_0xb10ex3e[_0xb10ex3c][_0xba04[129]]){_0xb10ex44[_0xba04[114]](_0xb10ex43)};_0xb10ex3e[_0xb10ex3c][_0xba04[130]]&& _0xb10ex44[_0xba04[62]](_0xb10ex43,_0xb10ex3e[_0xb10ex3c][_0xba04[130]]=== _0xba04[131]?false:true);_0xb10ex44[_0xba04[115]](_0xb10ex43,_0xb10ex3e[_0xb10ex3c][_0xba04[132]]|| _0xb10ex43)};if(_0xb10ex3d[_0xba04[133]]){_0xb10ex3d[_0xba04[133]]= JSON[_0xba04[134]](_0xb10ex3d[_0xba04[133]]);for(var _0xb10ex45=0;_0xb10ex45< _0xb10ex3d[_0xba04[133]][_0xba04[59]];_0xb10ex45+= 1){if(_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[135]]&& _[_0xba04[108]](_0xb10ex34,_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[135]])&& _0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[136]]&& _0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[137]]&& _0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[138]]){_0xb10ex44[_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[135]]](_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[137]],null,util[_0xba04[128]](_0xba04[139],_0xb10ex3d[_0xba04[121]],_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[136]],_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[137]],_0xb10ex3d[_0xba04[133]][_0xb10ex45][_0xba04[138]]))}}};if(_0xb10ex3d[_0xba04[140]]){_0xb10ex3d[_0xba04[140]]= JSON[_0xba04[134]](_0xb10ex3d[_0xba04[140]]);_0xb10ex44[_0xba04[64]](_0xb10ex39(_0xb10ex3d[_0xba04[140]][_0xba04[114]]))};_0xb10ex41= _0xb10ex44[_0xba04[141]]();_0xb10ex44[_0xba04[32]](_0xb10ex33);_0xb10ex44[_0xba04[31]](0);logger[_0xba04[143]](_0xba04[142],_0xb10ex44.toString());return db[_0xba04[146]][_0xba04[53]](_0xb10ex44.toString(),{type:db[_0xba04[146]][_0xba04[145]][_0xba04[144]]})}})[_0xba04[40]](function(){return {sql:_0xb10ex41.toString()}})[_0xba04[40]](respondWithResult(_0xb10ex1a,null))[_0xba04[73]](handleError(_0xb10ex1a,null))}
\ No newline at end of file
+var _0x822f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x70\x72\x65\x76\x69\x65\x77","\x6A\x6F\x69\x6E","\x6C\x65\x66\x74\x5F\x6A\x6F\x69\x6E","\x72\x69\x67\x68\x74\x5F\x6A\x6F\x69\x6E","\x6F\x75\x74\x65\x72\x5F\x6A\x6F\x69\x6E","\x63\x72\x6F\x73\x73\x5F\x6A\x6F\x69\x6E","\x53\x55\x4D\x28\x25\x73\x29","\x43\x4F\x55\x4E\x54\x28\x25\x73\x29","\x43\x4F\x55\x4E\x54\x28\x44\x49\x53\x54\x49\x4E\x43\x54\x20\x25\x73\x29","\x4D\x41\x58\x28\x25\x73\x29","\x4D\x49\x4E\x28\x25\x73\x29","\x41\x56\x47\x28\x25\x73\x29","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x28\x25\x73\x29","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x28\x25\x73\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20\x25\x73\x20\x41\x53\x43\x29","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x28\x25\x73\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20\x25\x73\x20\x44\x45\x53\x43\x29","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x25\x73\x29","\x44\x41\x54\x45\x28\x25\x73\x29","\x48\x4F\x55\x52\x28\x25\x73\x29","\x52\x4F\x55\x4E\x44\x28\x25\x73\x29","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x25\x73\x29","\x49\x53\x20\x4E\x55\x4C\x4C","\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C","\x49\x53\x20\x45\x4D\x50\x54\x59","\x49\x53\x20\x4E\x4F\x54\x20\x45\x4D\x50\x54\x59","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x72\x75\x6C\x65\x73","","\x28","\x20","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x67\x72\x6F\x75\x70","\x66\x69\x65\x6C\x64","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x76\x61\x6C\x75\x65","\x29","\x6B\x65\x79\x42\x79","\x73\x65\x6C\x65\x63\x74","\x74\x61\x62\x6C\x65","\x66\x72\x6F\x6D","\x4D\x65\x74\x72\x69\x63\x49\x64","\x6D\x65\x74\x72\x69\x63","\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x25\x73","\x72\x65\x70\x6C\x61\x63\x65","\x66\x6F\x72\x6D\x61\x74","\x67\x72\x6F\x75\x70\x42\x79","\x6F\x72\x64\x65\x72\x42\x79","\x44\x45\x53\x43","\x61\x6C\x69\x61\x73","\x6A\x6F\x69\x6E\x73","\x70\x61\x72\x73\x65","\x74\x79\x70\x65","\x70\x61\x72\x65\x6E\x74\x4B\x65\x79","\x66\x6F\x72\x65\x69\x67\x6E\x54\x61\x62\x6C\x65","\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79","\x25\x73\x2E\x25\x73\x20\x3D\x20\x25\x73\x2E\x25\x73","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x63\x6C\x6F\x6E\x65","\x4C\x69\x6D\x69\x74\x65\x64\x20\x51\x75\x65\x72\x79\x3A","\x64\x65\x62\x75\x67","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x50\x6C\x65\x61\x73\x65\x20\x69\x6E\x73\x65\x72\x74\x20\x61\x74\x20\x6C\x65\x61\x73\x74\x20\x6F\x6E\x65\x20\x66\x69\x65\x6C\x64\x21","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x41\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2E\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x42\x45\x54\x57\x45\x45\x4E\x20\x3F\x20\x41\x4E\x44\x20\x3F","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x65\x6E\x64\x44\x61\x74\x65","\x52\x75\x6E\x20\x51\x75\x65\x72\x79\x3A","\x69\x6E\x66\x6F","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x65\x78\x70\x6F\x72\x74\x2F","\x6F\x75\x74\x70\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x66\x69\x6C\x65\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x73\x61\x76\x65\x6E\x61\x6D\x65","\x66\x6F\x72\x6B","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x63\x6F\x75\x6E\x74\x54\x61\x62\x6C\x65","\x43\x4F\x55\x4E\x54\x28\x2A\x29","\x4E\x6F\x20\x44\x61\x74\x61\x21","\x77\x65\x62","\x66\x75\x6C\x6C\x50\x61\x74\x68","\x25\x73\x2D\x25\x73\x2E\x25\x73","\x67\x65\x6E\x65\x72\x61\x74\x65","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x63\x73\x76","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x72\x75\x6E","\x72\x75\x6E\x52\x65\x70\x6F\x72\x74"];_0x822f[0];var jsonpatch=require(_0x822f[1]);var rp=require(_0x822f[2]);var moment=require(_0x822f[3]);var BPromise=require(_0x822f[4]);var Mustache=require(_0x822f[5]);var util=require(_0x822f[6]);var path=require(_0x822f[7]);var sox=require(_0x822f[8]);var csv=require(_0x822f[9]);var ejs=require(_0x822f[10]);var fs=require(_0x822f[11]);var _=require(_0x822f[12]);var squel=require(_0x822f[13]);var crypto=require(_0x822f[14]);var jsforce=require(_0x822f[15]);var deskjs=require(_0x822f[16]);var toCsv=require(_0x822f[9]);var querystring=require(_0x822f[17]);var Papa=require(_0x822f[18]);var qs=require(_0x822f[19]);var logger=require(_0x822f[21])(_0x822f[20]);var utils=require(_0x822f[22]);var config=require(_0x822f[23]);var db=require(_0x822f[25])[_0x822f[24]];function respondWithStatusCode(_0x1b4dx1a,_0x1b4dx1b){_0x1b4dx1b= _0x1b4dx1b|| 204;return function(_0x1b4dx1c){if(_0x1b4dx1c){return _0x1b4dx1a[_0x822f[26]](_0x1b4dx1b)};return _0x1b4dx1a[_0x822f[28]](_0x1b4dx1b)[_0x822f[27]]()}}function respondWithResult(_0x1b4dx1a,_0x1b4dx1b){_0x1b4dx1b= _0x1b4dx1b|| 200;return function(_0x1b4dx1c){if(_0x1b4dx1c){return _0x1b4dx1a[_0x822f[28]](_0x1b4dx1b)[_0x822f[29]](_0x1b4dx1c)}}}function respondWithFilteredResult(_0x1b4dx1a,_0x1b4dx1f){return function(_0x1b4dx1c){if(_0x1b4dx1c){var _0x1b4dx20=_0x1b4dx1c[_0x822f[30]],_0x1b4dx21=_0x1b4dx1f[_0x822f[31]],_0x1b4dx22=_0x1b4dx1f[_0x822f[31]]+ _0x1b4dx1f[_0x822f[32]],_0x1b4dx1b;if(_0x1b4dx22>= _0x1b4dx20){_0x1b4dx22= _0x1b4dx20;_0x1b4dx1b= 200}else {_0x1b4dx1b= 206};_0x1b4dx1a[_0x822f[28]](_0x1b4dx1b);return _0x1b4dx1a[_0x822f[36]](_0x822f[33],_0x1b4dx21+ _0x822f[34]+ _0x1b4dx22+ _0x822f[35]+ _0x1b4dx20)[_0x822f[29]](_0x1b4dx1c)};return null}}function patchUpdates(_0x1b4dx24){return function(_0x1b4dx1c){try{jsonpatch[_0x822f[37]](_0x1b4dx1c,_0x1b4dx24,true)}catch(err){return BPromise[_0x822f[38]](err)};return _0x1b4dx1c[_0x822f[39]]()}}function saveUpdates(_0x1b4dx26,_0x1b4dx1b){return function(_0x1b4dx1c){if(_0x1b4dx1c){return _0x1b4dx1c[_0x822f[41]](_0x1b4dx26)[_0x822f[40]](function(_0x1b4dx27){return _0x1b4dx27})};return null}}function removeEntity(_0x1b4dx1a,_0x1b4dx1b){return function(_0x1b4dx1c){if(_0x1b4dx1c){return _0x1b4dx1c[_0x822f[42]]()[_0x822f[40]](function(){_0x1b4dx1a[_0x822f[28]](204)[_0x822f[27]]()})}}}function handleEntityNotFound(_0x1b4dx1a,_0x1b4dx1b){return function(_0x1b4dx1c){if(!_0x1b4dx1c){_0x1b4dx1a[_0x822f[26]](404)};return _0x1b4dx1c}}function handleError(_0x1b4dx1a,_0x1b4dx1b){_0x1b4dx1b= _0x1b4dx1b|| 500;return function(_0x1b4dx2b){logger[_0x822f[44]](_0x1b4dx2b[_0x822f[43]]);if(_0x1b4dx2b[_0x822f[45]]){delete _0x1b4dx2b[_0x822f[45]]};_0x1b4dx1a[_0x822f[28]](_0x1b4dx1b)[_0x822f[46]](_0x1b4dx2b)}}exports[_0x822f[47]]= function(_0x1b4dx2c,_0x1b4dx1a){var _0x1b4dx1f={},_0x1b4dx2d={},_0x1b4dx2e={count:0,rows:[]};_0x1b4dx2d[_0x822f[48]]= _[_0x822f[51]](db[_0x822f[50]][_0x822f[49]]);var _0x1b4dx2f={dateStart:_0x1b4dx2c[_0x822f[53]][_0x822f[52]],dateEnd:_0x1b4dx2c[_0x822f[53]][_0x822f[54]]};delete _0x1b4dx2c[_0x822f[53]][_0x822f[52]];delete _0x1b4dx2c[_0x822f[53]][_0x822f[54]];_0x1b4dx2d[_0x822f[53]]= _[_0x822f[51]](_0x1b4dx2c[_0x822f[53]]);_0x1b4dx2d[_0x822f[55]]= _[_0x822f[56]](_0x1b4dx2d[_0x822f[48]],_0x1b4dx2d[_0x822f[53]]);_0x1b4dx1f[_0x822f[57]]= _[_0x822f[56]](_0x1b4dx2d[_0x822f[48]],qs[_0x822f[58]](_0x1b4dx2c[_0x822f[53]][_0x822f[58]]));_0x1b4dx1f[_0x822f[57]]= (_0x1b4dx1f[_0x822f[57]][_0x822f[59]])?_0x1b4dx1f[_0x822f[57]]:_0x1b4dx2d[_0x822f[48]];if(!_0x1b4dx2c[_0x822f[53]][_0x822f[61]](_0x822f[60])){_0x1b4dx1f[_0x822f[32]]= qs[_0x822f[32]](_0x1b4dx2c[_0x822f[53]][_0x822f[32]]);_0x1b4dx1f[_0x822f[31]]= qs[_0x822f[31]](_0x1b4dx2c[_0x822f[53]][_0x822f[31]])};_0x1b4dx1f[_0x822f[62]]= qs[_0x822f[63]](_0x1b4dx2c[_0x822f[53]][_0x822f[63]]);_0x1b4dx1f[_0x822f[64]]= qs[_0x822f[55]](_[_0x822f[65]](_0x1b4dx2c[_0x822f[53]],_0x1b4dx2d[_0x822f[55]]));if(_0x1b4dx2f[_0x822f[52]]){if(_0x1b4dx2f[_0x822f[54]]){_0x1b4dx2f[_0x822f[54]]= moment(_0x1b4dx2f[_0x822f[54]])[_0x822f[67]](1,_0x822f[66])}else {_0x1b4dx2f[_0x822f[54]]= moment(_0x1b4dx2f[_0x822f[52]])[_0x822f[67]](1,_0x822f[66])};_[_0x822f[68]](_0x1b4dx1f[_0x822f[64]],{createdAt:{$gte:_0x1b4dx2f[_0x822f[52]],$lte:_0x1b4dx2f[_0x822f[54]]}})};if(_0x1b4dx2c[_0x822f[53]][_0x822f[69]]){_0x1b4dx1f[_0x822f[64]]= _[_0x822f[68]](_0x1b4dx1f[_0x822f[64]],{$or:_[_0x822f[71]](_0x1b4dx1f[_0x822f[57]],function(_0x1b4dx30){var _0x1b4dx2e={};_0x1b4dx2e[_0x1b4dx30]= {$like:_0x822f[70]+ _0x1b4dx2c[_0x822f[53]][_0x822f[69]]+ _0x822f[70]};return _0x1b4dx2e})})};_0x1b4dx1f= _[_0x822f[68]]({},_0x1b4dx1f,_0x1b4dx2c[_0x822f[72]]);var _0x1b4dx31={where:_0x1b4dx1f[_0x822f[64]]};return db[_0x822f[50]][_0x822f[30]](_0x1b4dx31)[_0x822f[40]](function(_0x1b4dx20){_0x1b4dx2e[_0x822f[30]]= _0x1b4dx20;if(_0x1b4dx2c[_0x822f[53]][_0x822f[75]]){_0x1b4dx1f[_0x822f[76]]= [{all:true}]};return db[_0x822f[50]][_0x822f[77]](_0x1b4dx1f)})[_0x822f[40]](function(_0x1b4dx32){_0x1b4dx2e[_0x822f[74]]= _0x1b4dx32;return _0x1b4dx2e})[_0x822f[40]](respondWithFilteredResult(_0x1b4dx1a,_0x1b4dx1f))[_0x822f[73]](handleError(_0x1b4dx1a,null))};exports[_0x822f[78]]= function(_0x1b4dx2c,_0x1b4dx1a){var _0x1b4dx1f={raw:true,where:{id:_0x1b4dx2c[_0x822f[80]][_0x822f[79]]}},_0x1b4dx2d={};_0x1b4dx2d[_0x822f[48]]= _[_0x822f[51]](db[_0x822f[50]][_0x822f[49]]);_0x1b4dx2d[_0x822f[53]]= _[_0x822f[51]](_0x1b4dx2c[_0x822f[53]]);_0x1b4dx2d[_0x822f[55]]= _[_0x822f[56]](_0x1b4dx2d[_0x822f[48]],_0x1b4dx2d[_0x822f[53]]);_0x1b4dx1f[_0x822f[57]]= _[_0x822f[56]](_0x1b4dx2d[_0x822f[48]],qs[_0x822f[58]](_0x1b4dx2c[_0x822f[53]][_0x822f[58]]));_0x1b4dx1f[_0x822f[57]]= (_0x1b4dx1f[_0x822f[57]][_0x822f[59]])?_0x1b4dx1f[_0x822f[57]]:_0x1b4dx2d[_0x822f[48]];if(_0x1b4dx2c[_0x822f[53]][_0x822f[75]]){_0x1b4dx1f[_0x822f[76]]= [{all:true}]};_0x1b4dx1f= _[_0x822f[68]]({},_0x1b4dx1f,_0x1b4dx2c[_0x822f[72]]);return db[_0x822f[50]][_0x822f[81]](_0x1b4dx1f)[_0x822f[40]](handleEntityNotFound(_0x1b4dx1a,null))[_0x822f[40]](respondWithResult(_0x1b4dx1a,null))[_0x822f[73]](handleError(_0x1b4dx1a,null))};exports[_0x822f[82]]= function(_0x1b4dx2c,_0x1b4dx1a){return db[_0x822f[50]][_0x822f[82]](_0x1b4dx2c[_0x822f[83]],{})[_0x822f[40]](respondWithResult(_0x1b4dx1a,201))[_0x822f[73]](handleError(_0x1b4dx1a,null))};exports[_0x822f[41]]= function(_0x1b4dx2c,_0x1b4dx1a){if(_0x1b4dx2c[_0x822f[83]][_0x822f[79]]){delete _0x1b4dx2c[_0x822f[83]][_0x822f[79]]};return db[_0x822f[50]][_0x822f[81]]({where:{id:_0x1b4dx2c[_0x822f[80]][_0x822f[79]]}})[_0x822f[40]](handleEntityNotFound(_0x1b4dx1a,null))[_0x822f[40]](saveUpdates(_0x1b4dx2c[_0x822f[83]],null))[_0x822f[40]](respondWithResult(_0x1b4dx1a,null))[_0x822f[73]](handleError(_0x1b4dx1a,null))};exports[_0x822f[42]]= function(_0x1b4dx2c,_0x1b4dx1a){return db[_0x822f[50]][_0x822f[81]]({where:{id:_0x1b4dx2c[_0x822f[80]][_0x822f[79]]}})[_0x822f[40]](handleEntityNotFound(_0x1b4dx1a,null))[_0x822f[40]](removeEntity(_0x1b4dx1a,null))[_0x822f[73]](handleError(_0x1b4dx1a,null))};exports[_0x822f[84]]= function(_0x1b4dx2c,_0x1b4dx1a){var _0x1b4dx33=10;var _0x1b4dx34=[_0x822f[85],_0x822f[86],_0x822f[87],_0x822f[88],_0x822f[89]];var _0x1b4dx35={"\x53\x55\x4D":_0x822f[90],"\x43\x4F\x55\x4E\x54":_0x822f[91],"\x43\x4F\x55\x4E\x54\x20\x44\x49\x53\x54\x49\x4E\x43\x54":_0x822f[92],"\x4D\x41\x58":_0x822f[93],"\x4D\x49\x4E":_0x822f[94],"\x41\x56\x47":_0x822f[95],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54":_0x822f[96],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x41\x53\x43":_0x822f[97],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x44\x45\x53\x43":_0x822f[98]};var _0x1b4dx36={"\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45":_0x822f[99],"\x44\x41\x54\x45":_0x822f[100],"\x48\x4F\x55\x52":_0x822f[101],"\x52\x4F\x55\x4E\x44":_0x822f[102],"\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50":_0x822f[103]};var _0x1b4dx37=function(_0x1b4dx38){return !_[_0x822f[108]]([_0x822f[104],_0x822f[105],_0x822f[106],_0x822f[107]],_0x1b4dx38)};var _0x1b4dx39=function(_0x1b4dx3a){if(!_0x1b4dx3a||  !_0x1b4dx3a[_0x822f[109]][_0x822f[59]]){return _0x822f[110]};for(var _0x1b4dx3b=_0x822f[111],_0x1b4dx3c=0;_0x1b4dx3c< _0x1b4dx3a[_0x822f[109]][_0x822f[59]];_0x1b4dx3c+= 1){_0x1b4dx3c> 0&& (_0x1b4dx3b+= _0x822f[112]+ _0x1b4dx3a[_0x822f[113]]+ _0x822f[112]);_0x1b4dx3b+= _0x1b4dx3a[_0x822f[109]][_0x1b4dx3c][_0x822f[114]]?_0x1b4dx39(_0x1b4dx3a[_0x822f[109]][_0x1b4dx3c][_0x822f[114]]):_0x1b4dx3a[_0x822f[109]][_0x1b4dx3c][_0x822f[115]]+ _0x822f[112]+ _0x1b4dx3a[_0x822f[109]][_0x1b4dx3c][_0x822f[116]]+ (_0x1b4dx37(_0x1b4dx3a[_0x822f[109]][_0x1b4dx3c][_0x822f[116]])?_0x822f[112]+ _0x1b4dx3a[_0x822f[109]][_0x1b4dx3c][_0x822f[117]]:_0x822f[110])};return _0x1b4dx3b+ _0x822f[118]};var _0x1b4dx1f={where:{id:_0x1b4dx2c[_0x822f[80]][_0x822f[79]]}},_0x1b4dx3d,_0x1b4dx3e,_0x1b4dx3f,_0x1b4dx40,_0x1b4dx41;_0x1b4dx1f= _[_0x822f[68]]({},_0x1b4dx1f,_0x1b4dx2c[_0x822f[72]]);return db[_0x822f[50]][_0x822f[81]](_0x1b4dx1f)[_0x822f[40]](function(_0x1b4dx1c){if(_0x1b4dx1c){_0x1b4dx3d= _0x1b4dx1c;return _0x1b4dx1c[_0x822f[150]]()};return null})[_0x822f[40]](function(_0x1b4dx42){if(_0x1b4dx42){if(!_0x1b4dx42[_0x822f[59]]){throw  new db[_0x822f[148]].ValidationError(_0x822f[147])};_0x1b4dx3e= _0x1b4dx42;return db[_0x822f[149]][_0x822f[77]]({raw:true})};return null})[_0x822f[40]](function(_0x1b4dx42){if(_0x1b4dx42){_0x1b4dx3f= _[_0x822f[119]](_0x1b4dx42,_0x822f[79]);var _0x1b4dx43;var _0x1b4dx44=squel[_0x822f[120]]();_0x1b4dx44[_0x822f[122]](_0x1b4dx3d[_0x822f[121]]);for(var _0x1b4dx3c=0;_0x1b4dx3c< _0x1b4dx3e[_0x822f[59]];_0x1b4dx3c+= 1){_0x1b4dx43= _0x1b4dx3e[_0x1b4dx3c][_0x822f[123]]?_0x1b4dx3f[_0x1b4dx3e[_0x1b4dx3c][_0x822f[123]]][_0x822f[124]]:_0x1b4dx3e[_0x1b4dx3c][_0x822f[115]];_0x1b4dx43= _0x1b4dx3e[_0x1b4dx3c][_0x822f[125]]?_[_0x822f[127]](_0x1b4dx35[_0x1b4dx3e[_0x1b4dx3c][_0x822f[125]]],_0x822f[126],_0x1b4dx43):_0x1b4dx43;_0x1b4dx43= _0x1b4dx3e[_0x1b4dx3c][_0x822f[128]]?_[_0x822f[127]](_0x1b4dx36[_0x1b4dx3e[_0x1b4dx3c][_0x822f[128]]],_0x822f[126],_0x1b4dx43):_0x1b4dx43;if(_0x1b4dx3e[_0x1b4dx3c][_0x822f[129]]){_0x1b4dx44[_0x822f[114]](_0x1b4dx43)};_0x1b4dx3e[_0x1b4dx3c][_0x822f[130]]&& _0x1b4dx44[_0x822f[62]](_0x1b4dx43,_0x1b4dx3e[_0x1b4dx3c][_0x822f[130]]=== _0x822f[131]?false:true);_0x1b4dx44[_0x822f[115]](_0x1b4dx43,_0x1b4dx3e[_0x1b4dx3c][_0x822f[132]]|| _0x1b4dx43)};if(_0x1b4dx3d[_0x822f[133]]){_0x1b4dx3d[_0x822f[133]]= JSON[_0x822f[134]](_0x1b4dx3d[_0x822f[133]]);for(var _0x1b4dx45=0;_0x1b4dx45< _0x1b4dx3d[_0x822f[133]][_0x822f[59]];_0x1b4dx45+= 1){if(_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[135]]&& _[_0x822f[108]](_0x1b4dx34,_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[135]])&& _0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[136]]&& _0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[137]]&& _0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[138]]){_0x1b4dx44[_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[135]]](_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[137]],null,util[_0x822f[128]](_0x822f[139],_0x1b4dx3d[_0x822f[121]],_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[136]],_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[137]],_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[138]]))}}};if(_0x1b4dx3d[_0x822f[140]]){_0x1b4dx3d[_0x822f[140]]= JSON[_0x822f[134]](_0x1b4dx3d[_0x822f[140]]);_0x1b4dx44[_0x822f[64]](_0x1b4dx39(_0x1b4dx3d[_0x822f[140]][_0x822f[114]]))};_0x1b4dx41= _0x1b4dx44[_0x822f[141]]();_0x1b4dx44[_0x822f[32]](_0x1b4dx33);_0x1b4dx44[_0x822f[31]](0);logger[_0x822f[143]](_0x822f[142],_0x1b4dx44.toString());return db[_0x822f[146]][_0x822f[53]](_0x1b4dx44.toString(),{type:db[_0x822f[146]][_0x822f[145]][_0x822f[144]]})}})[_0x822f[40]](respondWithResult(_0x1b4dx1a,null))[_0x822f[73]](handleError(_0x1b4dx1a,null))};function runReport(_0x1b4dx47,_0x1b4dx48,_0x1b4dx49){var _0x1b4dx4a=_0x1b4dx48[_0x822f[45]];var _0x1b4dx33=10;var _0x1b4dx34=[_0x822f[85],_0x822f[86],_0x822f[87],_0x822f[88],_0x822f[89]];var _0x1b4dx35={"\x53\x55\x4D":_0x822f[90],"\x43\x4F\x55\x4E\x54":_0x822f[91],"\x43\x4F\x55\x4E\x54\x20\x44\x49\x53\x54\x49\x4E\x43\x54":_0x822f[92],"\x4D\x41\x58":_0x822f[93],"\x4D\x49\x4E":_0x822f[94],"\x41\x56\x47":_0x822f[95],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54":_0x822f[96],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x41\x53\x43":_0x822f[97],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x44\x45\x53\x43":_0x822f[98]};var _0x1b4dx36={"\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45":_0x822f[99],"\x44\x41\x54\x45":_0x822f[100],"\x48\x4F\x55\x52":_0x822f[101],"\x52\x4F\x55\x4E\x44":_0x822f[102],"\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50":_0x822f[103]};var _0x1b4dx37=function(_0x1b4dx38){return !_[_0x822f[108]]([_0x822f[104],_0x822f[105],_0x822f[106],_0x822f[107]],_0x1b4dx38)};var _0x1b4dx39=function(_0x1b4dx3a){if(!_0x1b4dx3a||  !_0x1b4dx3a[_0x822f[109]][_0x822f[59]]){return _0x822f[110]};for(var _0x1b4dx3b=_0x822f[111],_0x1b4dx3c=0;_0x1b4dx3c< _0x1b4dx3a[_0x822f[109]][_0x822f[59]];_0x1b4dx3c+= 1){_0x1b4dx3c> 0&& (_0x1b4dx3b+= _0x822f[112]+ _0x1b4dx3a[_0x822f[113]]+ _0x822f[112]);_0x1b4dx3b+= _0x1b4dx3a[_0x822f[109]][_0x1b4dx3c][_0x822f[114]]?_0x1b4dx39(_0x1b4dx3a[_0x822f[109]][_0x1b4dx3c][_0x822f[114]]):_0x1b4dx3a[_0x822f[109]][_0x1b4dx3c][_0x822f[115]]+ _0x822f[112]+ _0x1b4dx3a[_0x822f[109]][_0x1b4dx3c][_0x822f[116]]+ (_0x1b4dx37(_0x1b4dx3a[_0x822f[109]][_0x1b4dx3c][_0x822f[116]])?_0x822f[112]+ _0x1b4dx3a[_0x822f[109]][_0x1b4dx3c][_0x822f[117]]:_0x822f[110])};return _0x1b4dx3b+ _0x822f[118]};var _0x1b4dx1f={where:{id:_0x1b4dx47[_0x822f[79]]}},_0x1b4dx3d,_0x1b4dx3e,_0x1b4dx3f,_0x1b4dx40,_0x1b4dx41;_0x1b4dx1f= _[_0x822f[68]]({},_0x1b4dx1f,_0x1b4dx49);return db[_0x822f[50]][_0x822f[81]](_0x1b4dx1f)[_0x822f[40]](function(_0x1b4dx1c){if(_0x1b4dx1c){_0x1b4dx3d= _0x1b4dx1c;return _0x1b4dx1c[_0x822f[150]]()};return null})[_0x822f[40]](function(_0x1b4dx42){if(_0x1b4dx42){if(!_0x1b4dx42[_0x822f[59]]){throw  new db[_0x822f[148]].ValidationError(_0x822f[147])};_0x1b4dx3e= _0x1b4dx42;return db[_0x822f[149]][_0x822f[77]]({raw:true})};return null})[_0x822f[40]](function(_0x1b4dx42){if(_0x1b4dx42){_0x1b4dx3f= _[_0x822f[119]](_0x1b4dx42,_0x822f[79]);var _0x1b4dx43;var _0x1b4dx44=squel[_0x822f[120]]();_0x1b4dx44[_0x822f[122]](_0x1b4dx3d[_0x822f[121]]);for(var _0x1b4dx3c=0;_0x1b4dx3c< _0x1b4dx3e[_0x822f[59]];_0x1b4dx3c+= 1){_0x1b4dx43= _0x1b4dx3e[_0x1b4dx3c][_0x822f[123]]?_0x1b4dx3f[_0x1b4dx3e[_0x1b4dx3c][_0x822f[123]]][_0x822f[124]]:_0x1b4dx3e[_0x1b4dx3c][_0x822f[115]];_0x1b4dx43= _0x1b4dx3e[_0x1b4dx3c][_0x822f[125]]?_[_0x822f[127]](_0x1b4dx35[_0x1b4dx3e[_0x1b4dx3c][_0x822f[125]]],_0x822f[126],_0x1b4dx43):_0x1b4dx43;_0x1b4dx43= _0x1b4dx3e[_0x1b4dx3c][_0x822f[128]]?_[_0x822f[127]](_0x1b4dx36[_0x1b4dx3e[_0x1b4dx3c][_0x822f[128]]],_0x822f[126],_0x1b4dx43):_0x1b4dx43;if(_0x1b4dx3e[_0x1b4dx3c][_0x822f[129]]){_0x1b4dx44[_0x822f[114]](_0x1b4dx43)};_0x1b4dx3e[_0x1b4dx3c][_0x822f[130]]&& _0x1b4dx44[_0x822f[62]](_0x1b4dx43,_0x1b4dx3e[_0x1b4dx3c][_0x822f[130]]=== _0x822f[131]?false:true);_0x1b4dx44[_0x822f[115]](_0x1b4dx43,_0x1b4dx3e[_0x1b4dx3c][_0x822f[132]]|| _0x1b4dx43)};if(_0x1b4dx3d[_0x822f[133]]){_0x1b4dx3d[_0x822f[133]]= JSON[_0x822f[134]](_0x1b4dx3d[_0x822f[133]]);for(var _0x1b4dx45=0;_0x1b4dx45< _0x1b4dx3d[_0x822f[133]][_0x822f[59]];_0x1b4dx45+= 1){if(_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[135]]&& _[_0x822f[108]](_0x1b4dx34,_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[135]])&& _0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[136]]&& _0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[137]]&& _0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[138]]){_0x1b4dx44[_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[135]]](_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[137]],null,util[_0x822f[128]](_0x822f[139],_0x1b4dx3d[_0x822f[121]],_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[136]],_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[137]],_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[138]]))}}};if(_0x1b4dx3d[_0x822f[140]]){_0x1b4dx3d[_0x822f[140]]= JSON[_0x822f[134]](_0x1b4dx3d[_0x822f[140]]);_0x1b4dx44[_0x822f[64]](_0x1b4dx39(_0x1b4dx3d[_0x822f[140]][_0x822f[114]]))};_0x1b4dx41= _0x1b4dx44[_0x822f[141]]();_0x1b4dx44[_0x822f[32]](_0x1b4dx33);_0x1b4dx44[_0x822f[31]](0);logger[_0x822f[143]](_0x822f[142],_0x1b4dx44.toString());return db[_0x822f[146]][_0x822f[53]](_0x1b4dx44.toString(),{type:db[_0x822f[146]][_0x822f[145]][_0x822f[144]]})}})[_0x822f[40]](function(_0x1b4dx42){if(!_0x1b4dx42[_0x822f[59]]){throw  new db[_0x822f[148]].ValidationError(_0x822f[164])};if(_0x1b4dx48[_0x822f[157]]=== _0x822f[165]){return null};var _0x1b4dx4b=_[_0x822f[68]](_0x1b4dx48,{name:_0x1b4dx48[_0x822f[166]]|| _0x1b4dx48[_0x822f[45]]|| _0x1b4dx3d[_0x822f[45]],basename:_0x1b4dx4a,savename:util[_0x822f[128]](_0x822f[167],_0x1b4dx48[_0x822f[45]]|| _0x1b4dx3d[_0x822f[45]],require(_0x822f[169])[_0x822f[168]](4),_0x1b4dx48[_0x822f[157]]|| _0x822f[170])});return db[_0x822f[171]][_0x822f[82]](_0x1b4dx4b,{raw:true})})[_0x822f[40]](function(_0x1b4dx1c){_0x1b4dx41[_0x822f[64]](_0x1b4dx3d[_0x822f[121]]+ _0x822f[151],_0x1b4dx48[_0x822f[152]],_0x1b4dx48[_0x822f[153]]);if(_0x1b4dx1c){logger[_0x822f[155]](_0x822f[154],_0x1b4dx41.toString());require(_0x822f[161])[_0x822f[160]](path[_0x822f[85]](__dirname,_0x822f[156],_0x1b4dx1c[_0x822f[157]]),[_0x1b4dx1c[_0x822f[79]],_0x1b4dx41.toString(),path[_0x822f[85]](__dirname,_0x822f[158],_0x1b4dx1c[_0x822f[159]]),_0x1b4dx4a]);return _0x1b4dx1c}else {var _0x1b4dx44=squel[_0x822f[120]]();_0x1b4dx44[_0x822f[122]](_0x822f[111]+ _0x1b4dx41.toString()+ _0x822f[118],_0x822f[162]);_0x1b4dx44[_0x822f[115]](_0x822f[163],_0x822f[30]);_0x1b4dx41[_0x822f[32]](_0x1b4dx48[_0x822f[32]]|| _0x1b4dx33);_0x1b4dx41[_0x822f[31]](_0x1b4dx48[_0x822f[31]]|| 0);return db[_0x822f[146]][_0x822f[53]](_0x1b4dx44.toString(),{type:db[_0x822f[146]][_0x822f[145]][_0x822f[144]]})[_0x822f[40]](function(_0x1b4dx42){if(!_0x1b4dx42[_0x822f[59]]){_0x1b4dx40= 0}else {_0x1b4dx40= _0x1b4dx42[0][_0x822f[30]]|| 0};return db[_0x822f[146]][_0x822f[53]](_0x1b4dx41.toString(),{type:db[_0x822f[146]][_0x822f[145]][_0x822f[144]]})})[_0x822f[40]](function(_0x1b4dx42){return {rows:_0x1b4dx42|| [],count:_0x1b4dx40}})}})}exports[_0x822f[172]]= function(_0x1b4dx2c,_0x1b4dx1a){return runReport(_0x1b4dx2c[_0x822f[80]],_0x1b4dx2c[_0x822f[53]],_0x1b4dx2c[_0x822f[72]])[_0x822f[40]](respondWithResult(_0x1b4dx1a,null))[_0x822f[73]](handleError(_0x1b4dx1a,null))};exports[_0x822f[173]]= runReport;exports[_0x822f[53]]= function(_0x1b4dx2c,_0x1b4dx1a){var _0x1b4dx33=10;var _0x1b4dx34=[_0x822f[85],_0x822f[86],_0x822f[87],_0x822f[88],_0x822f[89]];var _0x1b4dx35={"\x53\x55\x4D":_0x822f[90],"\x43\x4F\x55\x4E\x54":_0x822f[91],"\x43\x4F\x55\x4E\x54\x20\x44\x49\x53\x54\x49\x4E\x43\x54":_0x822f[92],"\x4D\x41\x58":_0x822f[93],"\x4D\x49\x4E":_0x822f[94],"\x41\x56\x47":_0x822f[95],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54":_0x822f[96],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x41\x53\x43":_0x822f[97],"\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x44\x45\x53\x43":_0x822f[98]};var _0x1b4dx36={"\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45":_0x822f[99],"\x44\x41\x54\x45":_0x822f[100],"\x48\x4F\x55\x52":_0x822f[101],"\x52\x4F\x55\x4E\x44":_0x822f[102],"\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50":_0x822f[103]};var _0x1b4dx37=function(_0x1b4dx38){return !_[_0x822f[108]]([_0x822f[104],_0x822f[105],_0x822f[106],_0x822f[107]],_0x1b4dx38)};var _0x1b4dx39=function(_0x1b4dx3a){if(!_0x1b4dx3a||  !_0x1b4dx3a[_0x822f[109]][_0x822f[59]]){return _0x822f[110]};for(var _0x1b4dx3b=_0x822f[111],_0x1b4dx3c=0;_0x1b4dx3c< _0x1b4dx3a[_0x822f[109]][_0x822f[59]];_0x1b4dx3c+= 1){_0x1b4dx3c> 0&& (_0x1b4dx3b+= _0x822f[112]+ _0x1b4dx3a[_0x822f[113]]+ _0x822f[112]);_0x1b4dx3b+= _0x1b4dx3a[_0x822f[109]][_0x1b4dx3c][_0x822f[114]]?_0x1b4dx39(_0x1b4dx3a[_0x822f[109]][_0x1b4dx3c][_0x822f[114]]):_0x1b4dx3a[_0x822f[109]][_0x1b4dx3c][_0x822f[115]]+ _0x822f[112]+ _0x1b4dx3a[_0x822f[109]][_0x1b4dx3c][_0x822f[116]]+ (_0x1b4dx37(_0x1b4dx3a[_0x822f[109]][_0x1b4dx3c][_0x822f[116]])?_0x822f[112]+ _0x1b4dx3a[_0x822f[109]][_0x1b4dx3c][_0x822f[117]]:_0x822f[110])};return _0x1b4dx3b+ _0x822f[118]};var _0x1b4dx1f={where:{id:_0x1b4dx2c[_0x822f[80]][_0x822f[79]]}},_0x1b4dx3d,_0x1b4dx3e,_0x1b4dx3f,_0x1b4dx40,_0x1b4dx41;_0x1b4dx1f= _[_0x822f[68]]({},_0x1b4dx1f,_0x1b4dx2c[_0x822f[72]]);return db[_0x822f[50]][_0x822f[81]](_0x1b4dx1f)[_0x822f[40]](function(_0x1b4dx1c){if(_0x1b4dx1c){_0x1b4dx3d= _0x1b4dx1c;return _0x1b4dx1c[_0x822f[150]]()};return null})[_0x822f[40]](function(_0x1b4dx42){if(_0x1b4dx42){if(!_0x1b4dx42[_0x822f[59]]){throw  new db[_0x822f[148]].ValidationError(_0x822f[147])};_0x1b4dx3e= _0x1b4dx42;return db[_0x822f[149]][_0x822f[77]]({raw:true})};return null})[_0x822f[40]](function(_0x1b4dx42){if(_0x1b4dx42){_0x1b4dx3f= _[_0x822f[119]](_0x1b4dx42,_0x822f[79]);var _0x1b4dx43;var _0x1b4dx44=squel[_0x822f[120]]();_0x1b4dx44[_0x822f[122]](_0x1b4dx3d[_0x822f[121]]);for(var _0x1b4dx3c=0;_0x1b4dx3c< _0x1b4dx3e[_0x822f[59]];_0x1b4dx3c+= 1){_0x1b4dx43= _0x1b4dx3e[_0x1b4dx3c][_0x822f[123]]?_0x1b4dx3f[_0x1b4dx3e[_0x1b4dx3c][_0x822f[123]]][_0x822f[124]]:_0x1b4dx3e[_0x1b4dx3c][_0x822f[115]];_0x1b4dx43= _0x1b4dx3e[_0x1b4dx3c][_0x822f[125]]?_[_0x822f[127]](_0x1b4dx35[_0x1b4dx3e[_0x1b4dx3c][_0x822f[125]]],_0x822f[126],_0x1b4dx43):_0x1b4dx43;_0x1b4dx43= _0x1b4dx3e[_0x1b4dx3c][_0x822f[128]]?_[_0x822f[127]](_0x1b4dx36[_0x1b4dx3e[_0x1b4dx3c][_0x822f[128]]],_0x822f[126],_0x1b4dx43):_0x1b4dx43;if(_0x1b4dx3e[_0x1b4dx3c][_0x822f[129]]){_0x1b4dx44[_0x822f[114]](_0x1b4dx43)};_0x1b4dx3e[_0x1b4dx3c][_0x822f[130]]&& _0x1b4dx44[_0x822f[62]](_0x1b4dx43,_0x1b4dx3e[_0x1b4dx3c][_0x822f[130]]=== _0x822f[131]?false:true);_0x1b4dx44[_0x822f[115]](_0x1b4dx43,_0x1b4dx3e[_0x1b4dx3c][_0x822f[132]]|| _0x1b4dx43)};if(_0x1b4dx3d[_0x822f[133]]){_0x1b4dx3d[_0x822f[133]]= JSON[_0x822f[134]](_0x1b4dx3d[_0x822f[133]]);for(var _0x1b4dx45=0;_0x1b4dx45< _0x1b4dx3d[_0x822f[133]][_0x822f[59]];_0x1b4dx45+= 1){if(_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[135]]&& _[_0x822f[108]](_0x1b4dx34,_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[135]])&& _0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[136]]&& _0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[137]]&& _0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[138]]){_0x1b4dx44[_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[135]]](_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[137]],null,util[_0x822f[128]](_0x822f[139],_0x1b4dx3d[_0x822f[121]],_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[136]],_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[137]],_0x1b4dx3d[_0x822f[133]][_0x1b4dx45][_0x822f[138]]))}}};if(_0x1b4dx3d[_0x822f[140]]){_0x1b4dx3d[_0x822f[140]]= JSON[_0x822f[134]](_0x1b4dx3d[_0x822f[140]]);_0x1b4dx44[_0x822f[64]](_0x1b4dx39(_0x1b4dx3d[_0x822f[140]][_0x822f[114]]))};_0x1b4dx41= _0x1b4dx44[_0x822f[141]]();_0x1b4dx44[_0x822f[32]](_0x1b4dx33);_0x1b4dx44[_0x822f[31]](0);logger[_0x822f[143]](_0x822f[142],_0x1b4dx44.toString());return db[_0x822f[146]][_0x822f[53]](_0x1b4dx44.toString(),{type:db[_0x822f[146]][_0x822f[145]][_0x822f[144]]})}})[_0x822f[40]](function(){return {sql:_0x1b4dx41.toString()}})[_0x822f[40]](respondWithResult(_0x1b4dx1a,null))[_0x822f[73]](handleError(_0x1b4dx1a,null))}
\ No newline at end of file
index 751969d..86c8656 100644 (file)
@@ -1 +1 @@
-var _0xd79b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x5F\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0xd79b[0];var _=require(_0xd79b[1]);var util=require(_0xd79b[2]);var logger=require(_0xd79b[4])(_0xd79b[3]);var moment=require(_0xd79b[5]);var BPromise=require(_0xd79b[6]);var rp=require(_0xd79b[7]);var attributes=require(_0xd79b[8]);module[_0xd79b[9]]= function(_0xd504x8,_0xd504x9){return _0xd504x8[_0xd79b[12]](_0xd79b[10],attributes,{tableName:_0xd79b[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x86dc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x5F\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x86dc[0];var _=require(_0x86dc[1]);var util=require(_0x86dc[2]);var logger=require(_0x86dc[4])(_0x86dc[3]);var moment=require(_0x86dc[5]);var BPromise=require(_0x86dc[6]);var rp=require(_0x86dc[7]);var attributes=require(_0x86dc[8]);module[_0x86dc[9]]= function(_0xe8f3x8,_0xe8f3x9){return _0xe8f3x8[_0x86dc[12]](_0x86dc[10],attributes,{tableName:_0x86dc[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index b4af966..fa942a1 100644 (file)
@@ -1 +1 @@
-var _0x3799=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x41\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x41\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x3799[0];var _=require(_0x3799[1]);var util=require(_0x3799[2]);var moment=require(_0x3799[3]);var BPromise=require(_0x3799[4]);var rs=require(_0x3799[5]);var fs=require(_0x3799[6]);var db=require(_0x3799[8])[_0x3799[7]];var utils=require(_0x3799[9]);var logger=require(_0x3799[11])(_0x3799[10]);var config=require(_0x3799[12]);var jayson=require(_0x3799[13]);var client=jayson[_0x3799[15]][_0x3799[14]]({port:9002});function respondWithRpcPromise(_0xcccdxe,_0xcccdxf,_0xcccdx10){return  new BPromise(function(_0xcccdx11,_0xcccdx12){return client[_0x3799[28]](_0xcccdxe,_0xcccdx10)[_0x3799[27]](function(_0xcccdx14){logger[_0x3799[20]](_0x3799[16],_0xcccdxf,_0x3799[19]);logger[_0x3799[23]](_0x3799[21],_0xcccdxf,_0x3799[19],JSON[_0x3799[22]](_0xcccdx14));if(_0xcccdx14[_0x3799[17]]){if(_0xcccdx14[_0x3799[17]][_0x3799[24]]=== 500){logger[_0x3799[17]](_0x3799[16],_0xcccdxf,_0xcccdx14[_0x3799[17]][_0x3799[25]]);return _0xcccdx12(_0xcccdx14[_0x3799[17]][_0x3799[25]])};logger[_0x3799[17]](_0x3799[16],_0xcccdxf,_0xcccdx14[_0x3799[17]][_0x3799[25]]);return _0xcccdx11(_0xcccdx14[_0x3799[17]][_0x3799[25]])}else {logger[_0x3799[20]](_0x3799[16],_0xcccdxf,_0x3799[19]);_0xcccdx11(_0xcccdx14[_0x3799[26]][_0x3799[25]])}})[_0x3799[18]](function(_0xcccdx13){logger[_0x3799[17]](_0x3799[16],_0xcccdxf,_0xcccdx13);_0xcccdx12(_0xcccdx13)})})}
\ No newline at end of file
+var _0x285e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x41\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x41\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x285e[0];var _=require(_0x285e[1]);var util=require(_0x285e[2]);var moment=require(_0x285e[3]);var BPromise=require(_0x285e[4]);var rs=require(_0x285e[5]);var fs=require(_0x285e[6]);var db=require(_0x285e[8])[_0x285e[7]];var utils=require(_0x285e[9]);var logger=require(_0x285e[11])(_0x285e[10]);var config=require(_0x285e[12]);var jayson=require(_0x285e[13]);var client=jayson[_0x285e[15]][_0x285e[14]]({port:9002});function respondWithRpcPromise(_0x2aacxe,_0x2aacxf,_0x2aacx10){return  new BPromise(function(_0x2aacx11,_0x2aacx12){return client[_0x285e[28]](_0x2aacxe,_0x2aacx10)[_0x285e[27]](function(_0x2aacx14){logger[_0x285e[20]](_0x285e[16],_0x2aacxf,_0x285e[19]);logger[_0x285e[23]](_0x285e[21],_0x2aacxf,_0x285e[19],JSON[_0x285e[22]](_0x2aacx14));if(_0x2aacx14[_0x285e[17]]){if(_0x2aacx14[_0x285e[17]][_0x285e[24]]=== 500){logger[_0x285e[17]](_0x285e[16],_0x2aacxf,_0x2aacx14[_0x285e[17]][_0x285e[25]]);return _0x2aacx12(_0x2aacx14[_0x285e[17]][_0x285e[25]])};logger[_0x285e[17]](_0x285e[16],_0x2aacxf,_0x2aacx14[_0x285e[17]][_0x285e[25]]);return _0x2aacx11(_0x2aacx14[_0x285e[17]][_0x285e[25]])}else {logger[_0x285e[20]](_0x285e[16],_0x2aacxf,_0x285e[19]);_0x2aacx11(_0x2aacx14[_0x285e[26]][_0x285e[25]])}})[_0x285e[18]](function(_0x2aacx13){logger[_0x285e[17]](_0x285e[16],_0x2aacxf,_0x2aacx13);_0x2aacx12(_0x2aacx13)})})}
\ No newline at end of file
index 59dbc9e..ddef021 100644 (file)
@@ -1 +1 @@
-var _0x21d2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x70\x72\x65\x76\x69\x65\x77","\x70\x72\x65\x76\x69\x65\x77","\x2F\x3A\x69\x64\x2F\x72\x75\x6E","\x72\x75\x6E","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x72\x79","\x71\x75\x65\x72\x79","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x21d2[0];var multer=require(_0x21d2[1]);var util=require(_0x21d2[2]);var path=require(_0x21d2[3]);var express=require(_0x21d2[4]);var router=express.Router();var auth=require(_0x21d2[5]);var interaction=require(_0x21d2[6]);var config=require(_0x21d2[7]);var controller=require(_0x21d2[8]);router[_0x21d2[12]](_0x21d2[9],auth[_0x21d2[10]](),controller[_0x21d2[11]]);router[_0x21d2[12]](_0x21d2[13],auth[_0x21d2[10]](),controller[_0x21d2[14]]);router[_0x21d2[12]](_0x21d2[15],auth[_0x21d2[10]](),controller[_0x21d2[16]]);router[_0x21d2[12]](_0x21d2[17],auth[_0x21d2[10]](),controller[_0x21d2[18]]);router[_0x21d2[12]](_0x21d2[19],auth[_0x21d2[10]](),controller[_0x21d2[20]]);router[_0x21d2[22]](_0x21d2[9],auth[_0x21d2[10]](),controller[_0x21d2[21]]);router[_0x21d2[24]](_0x21d2[13],auth[_0x21d2[10]](),controller[_0x21d2[23]]);router[_0x21d2[26]](_0x21d2[13],auth[_0x21d2[10]](),controller[_0x21d2[25]]);module[_0x21d2[27]]= router
\ No newline at end of file
+var _0xceeb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x70\x72\x65\x76\x69\x65\x77","\x70\x72\x65\x76\x69\x65\x77","\x2F\x3A\x69\x64\x2F\x72\x75\x6E","\x72\x75\x6E","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x72\x79","\x71\x75\x65\x72\x79","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xceeb[0];var multer=require(_0xceeb[1]);var util=require(_0xceeb[2]);var path=require(_0xceeb[3]);var express=require(_0xceeb[4]);var router=express.Router();var auth=require(_0xceeb[5]);var interaction=require(_0xceeb[6]);var config=require(_0xceeb[7]);var controller=require(_0xceeb[8]);router[_0xceeb[12]](_0xceeb[9],auth[_0xceeb[10]](),controller[_0xceeb[11]]);router[_0xceeb[12]](_0xceeb[13],auth[_0xceeb[10]](),controller[_0xceeb[14]]);router[_0xceeb[12]](_0xceeb[15],auth[_0xceeb[10]](),controller[_0xceeb[16]]);router[_0xceeb[12]](_0xceeb[17],auth[_0xceeb[10]](),controller[_0xceeb[18]]);router[_0xceeb[12]](_0xceeb[19],auth[_0xceeb[10]](),controller[_0xceeb[20]]);router[_0xceeb[22]](_0xceeb[9],auth[_0xceeb[10]](),controller[_0xceeb[21]]);router[_0xceeb[24]](_0xceeb[13],auth[_0xceeb[10]](),controller[_0xceeb[23]]);router[_0xceeb[26]](_0xceeb[13],auth[_0xceeb[10]](),controller[_0xceeb[25]]);module[_0xceeb[27]]= router
\ No newline at end of file
index 7f046a4..5c3da8a 100644 (file)
@@ -1 +1 @@
-var _0x2212=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x63\x73\x76","\x70\x64\x66","\x78\x6C\x73\x78","\x44\x41\x54\x45","\x4C\x6F\x61\x64\x69\x6E\x67","\x6D\x61\x6E\x75\x61\x6C","\x73\x63\x68\x65\x64\x75\x6C\x65\x64"];_0x2212[0];var Sequelize=require(_0x2212[1]);var moment=require(_0x2212[2]);module[_0x2212[3]]= {name:{type:Sequelize[_0x2212[4]],allowNull:false},basename:{type:Sequelize[_0x2212[4]],allowNull:false},output:{type:Sequelize.ENUM(_0x2212[5],_0x2212[6],_0x2212[7]),allowNull:false,defaultValue:_0x2212[5]},savename:{type:Sequelize[_0x2212[4]],allowNull:false},startDate:{type:Sequelize[_0x2212[8]]},endDate:{type:Sequelize[_0x2212[8]]},status:{type:Sequelize[_0x2212[4]],defaultValue:_0x2212[9]},type:{type:Sequelize.ENUM(_0x2212[10],_0x2212[11]),allowNull:false,defaultValue:_0x2212[10]}}
\ No newline at end of file
+var _0x55ea=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x63\x73\x76","\x70\x64\x66","\x78\x6C\x73\x78","\x44\x41\x54\x45","\x4C\x6F\x61\x64\x69\x6E\x67","\x6D\x61\x6E\x75\x61\x6C","\x73\x63\x68\x65\x64\x75\x6C\x65\x64"];_0x55ea[0];var Sequelize=require(_0x55ea[1]);var moment=require(_0x55ea[2]);module[_0x55ea[3]]= {name:{type:Sequelize[_0x55ea[4]],allowNull:false},basename:{type:Sequelize[_0x55ea[4]],allowNull:false},output:{type:Sequelize.ENUM(_0x55ea[5],_0x55ea[6],_0x55ea[7]),allowNull:false,defaultValue:_0x55ea[5]},savename:{type:Sequelize[_0x55ea[4]],allowNull:false},startDate:{type:Sequelize[_0x55ea[8]]},endDate:{type:Sequelize[_0x55ea[8]]},status:{type:Sequelize[_0x55ea[4]],defaultValue:_0x55ea[9]},type:{type:Sequelize.ENUM(_0x55ea[10],_0x55ea[11]),allowNull:false,defaultValue:_0x55ea[10]}}
\ No newline at end of file
index 368eebc..e1d157f 100644 (file)
@@ -1 +1 @@
-var _0x1d59=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x73\x61\x76\x65\x6E\x61\x6D\x65","\x6A\x6F\x69\x6E","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x52\x65\x70\x6F\x72\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x65\x6D\x70\x74\x79","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x69\x73\x74\x73","\x25\x73\x2E\x25\x73","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x6F\x75\x74\x70\x75\x74","\x66\x6F\x72\x6D\x61\x74"];_0x1d59[0];var jsonpatch=require(_0x1d59[1]);var rp=require(_0x1d59[2]);var moment=require(_0x1d59[3]);var BPromise=require(_0x1d59[4]);var Mustache=require(_0x1d59[5]);var util=require(_0x1d59[6]);var path=require(_0x1d59[7]);var sox=require(_0x1d59[8]);var csv=require(_0x1d59[9]);var ejs=require(_0x1d59[10]);var fs=require(_0x1d59[11]);var _=require(_0x1d59[12]);var squel=require(_0x1d59[13]);var crypto=require(_0x1d59[14]);var jsforce=require(_0x1d59[15]);var deskjs=require(_0x1d59[16]);var toCsv=require(_0x1d59[9]);var querystring=require(_0x1d59[17]);var Papa=require(_0x1d59[18]);var qs=require(_0x1d59[19]);var logger=require(_0x1d59[21])(_0x1d59[20]);var utils=require(_0x1d59[22]);var config=require(_0x1d59[23]);var db=require(_0x1d59[25])[_0x1d59[24]];function respondWithStatusCode(_0xb860x1a,_0xb860x1b){_0xb860x1b= _0xb860x1b|| 204;return function(_0xb860x1c){if(_0xb860x1c){return _0xb860x1a[_0x1d59[26]](_0xb860x1b)};return _0xb860x1a[_0x1d59[28]](_0xb860x1b)[_0x1d59[27]]()}}function respondWithResult(_0xb860x1a,_0xb860x1b){_0xb860x1b= _0xb860x1b|| 200;return function(_0xb860x1c){if(_0xb860x1c){return _0xb860x1a[_0x1d59[28]](_0xb860x1b)[_0x1d59[29]](_0xb860x1c)}}}function respondWithFilteredResult(_0xb860x1a,_0xb860x1f){return function(_0xb860x1c){if(_0xb860x1c){var _0xb860x20=_0xb860x1c[_0x1d59[30]],_0xb860x21=_0xb860x1f[_0x1d59[31]],_0xb860x22=_0xb860x1f[_0x1d59[31]]+ _0xb860x1f[_0x1d59[32]],_0xb860x1b;if(_0xb860x22>= _0xb860x20){_0xb860x22= _0xb860x20;_0xb860x1b= 200}else {_0xb860x1b= 206};_0xb860x1a[_0x1d59[28]](_0xb860x1b);return _0xb860x1a[_0x1d59[36]](_0x1d59[33],_0xb860x21+ _0x1d59[34]+ _0xb860x22+ _0x1d59[35]+ _0xb860x20)[_0x1d59[29]](_0xb860x1c)};return null}}function patchUpdates(_0xb860x24){return function(_0xb860x1c){try{jsonpatch[_0x1d59[37]](_0xb860x1c,_0xb860x24,true)}catch(err){return BPromise[_0x1d59[38]](err)};return _0xb860x1c[_0x1d59[39]]()}}function saveUpdates(_0xb860x26,_0xb860x1b){return function(_0xb860x1c){if(_0xb860x1c){return _0xb860x1c[_0x1d59[41]](_0xb860x26)[_0x1d59[40]](function(_0xb860x27){return _0xb860x27})};return null}}function removeEntity(_0xb860x1a,_0xb860x1b){return function(_0xb860x1c){if(_0xb860x1c){return _0xb860x1c[_0x1d59[42]]()[_0x1d59[40]](function(){_0xb860x1a[_0x1d59[28]](204)[_0x1d59[27]]()})}}}function handleEntityNotFound(_0xb860x1a,_0xb860x1b){return function(_0xb860x1c){if(!_0xb860x1c){_0xb860x1a[_0x1d59[26]](404)};return _0xb860x1c}}function handleError(_0xb860x1a,_0xb860x1b){_0xb860x1b= _0xb860x1b|| 500;return function(_0xb860x2b){logger[_0x1d59[44]](_0xb860x2b[_0x1d59[43]]);if(_0xb860x2b[_0x1d59[45]]){delete _0xb860x2b[_0x1d59[45]]};_0xb860x1a[_0x1d59[28]](_0xb860x1b)[_0x1d59[46]](_0xb860x2b)}}exports[_0x1d59[47]]= function(_0xb860x2c,_0xb860x1a){var _0xb860x1f={},_0xb860x2d={},_0xb860x2e={count:0,rows:[]};_0xb860x2d[_0x1d59[48]]= _[_0x1d59[51]](db[_0x1d59[50]][_0x1d59[49]]);var _0xb860x2f={dateStart:_0xb860x2c[_0x1d59[53]][_0x1d59[52]],dateEnd:_0xb860x2c[_0x1d59[53]][_0x1d59[54]]};delete _0xb860x2c[_0x1d59[53]][_0x1d59[52]];delete _0xb860x2c[_0x1d59[53]][_0x1d59[54]];_0xb860x2d[_0x1d59[53]]= _[_0x1d59[51]](_0xb860x2c[_0x1d59[53]]);_0xb860x2d[_0x1d59[55]]= _[_0x1d59[56]](_0xb860x2d[_0x1d59[48]],_0xb860x2d[_0x1d59[53]]);_0xb860x1f[_0x1d59[57]]= _[_0x1d59[56]](_0xb860x2d[_0x1d59[48]],qs[_0x1d59[58]](_0xb860x2c[_0x1d59[53]][_0x1d59[58]]));_0xb860x1f[_0x1d59[57]]= (_0xb860x1f[_0x1d59[57]][_0x1d59[59]])?_0xb860x1f[_0x1d59[57]]:_0xb860x2d[_0x1d59[48]];if(!_0xb860x2c[_0x1d59[53]][_0x1d59[61]](_0x1d59[60])){_0xb860x1f[_0x1d59[32]]= qs[_0x1d59[32]](_0xb860x2c[_0x1d59[53]][_0x1d59[32]]);_0xb860x1f[_0x1d59[31]]= qs[_0x1d59[31]](_0xb860x2c[_0x1d59[53]][_0x1d59[31]])};_0xb860x1f[_0x1d59[62]]= qs[_0x1d59[63]](_0xb860x2c[_0x1d59[53]][_0x1d59[63]]);_0xb860x1f[_0x1d59[64]]= qs[_0x1d59[55]](_[_0x1d59[65]](_0xb860x2c[_0x1d59[53]],_0xb860x2d[_0x1d59[55]]));if(_0xb860x2f[_0x1d59[52]]){if(_0xb860x2f[_0x1d59[54]]){_0xb860x2f[_0x1d59[54]]= moment(_0xb860x2f[_0x1d59[54]])[_0x1d59[67]](1,_0x1d59[66])}else {_0xb860x2f[_0x1d59[54]]= moment(_0xb860x2f[_0x1d59[52]])[_0x1d59[67]](1,_0x1d59[66])};_[_0x1d59[68]](_0xb860x1f[_0x1d59[64]],{createdAt:{$gte:_0xb860x2f[_0x1d59[52]],$lte:_0xb860x2f[_0x1d59[54]]}})};if(_0xb860x2c[_0x1d59[53]][_0x1d59[69]]){_0xb860x1f[_0x1d59[64]]= _[_0x1d59[68]](_0xb860x1f[_0x1d59[64]],{$or:_[_0x1d59[71]](_0xb860x1f[_0x1d59[57]],function(_0xb860x30){var _0xb860x2e={};_0xb860x2e[_0xb860x30]= {$like:_0x1d59[70]+ _0xb860x2c[_0x1d59[53]][_0x1d59[69]]+ _0x1d59[70]};return _0xb860x2e})})};_0xb860x1f= _[_0x1d59[68]]({},_0xb860x1f,_0xb860x2c[_0x1d59[72]]);var _0xb860x31={where:_0xb860x1f[_0x1d59[64]]};return db[_0x1d59[50]][_0x1d59[30]](_0xb860x31)[_0x1d59[40]](function(_0xb860x20){_0xb860x2e[_0x1d59[30]]= _0xb860x20;if(_0xb860x2c[_0x1d59[53]][_0x1d59[75]]){_0xb860x1f[_0x1d59[76]]= [{all:true}]};return db[_0x1d59[50]][_0x1d59[77]](_0xb860x1f)})[_0x1d59[40]](function(_0xb860x32){_0xb860x2e[_0x1d59[74]]= _0xb860x32;return _0xb860x2e})[_0x1d59[40]](respondWithFilteredResult(_0xb860x1a,_0xb860x1f))[_0x1d59[73]](handleError(_0xb860x1a,null))};exports[_0x1d59[78]]= function(_0xb860x2c,_0xb860x1a){var _0xb860x1f={raw:true,where:{id:_0xb860x2c[_0x1d59[80]][_0x1d59[79]]}},_0xb860x2d={};_0xb860x2d[_0x1d59[48]]= _[_0x1d59[51]](db[_0x1d59[50]][_0x1d59[49]]);_0xb860x2d[_0x1d59[53]]= _[_0x1d59[51]](_0xb860x2c[_0x1d59[53]]);_0xb860x2d[_0x1d59[55]]= _[_0x1d59[56]](_0xb860x2d[_0x1d59[48]],_0xb860x2d[_0x1d59[53]]);_0xb860x1f[_0x1d59[57]]= _[_0x1d59[56]](_0xb860x2d[_0x1d59[48]],qs[_0x1d59[58]](_0xb860x2c[_0x1d59[53]][_0x1d59[58]]));_0xb860x1f[_0x1d59[57]]= (_0xb860x1f[_0x1d59[57]][_0x1d59[59]])?_0xb860x1f[_0x1d59[57]]:_0xb860x2d[_0x1d59[48]];if(_0xb860x2c[_0x1d59[53]][_0x1d59[75]]){_0xb860x1f[_0x1d59[76]]= [{all:true}]};_0xb860x1f= _[_0x1d59[68]]({},_0xb860x1f,_0xb860x2c[_0x1d59[72]]);return db[_0x1d59[50]][_0x1d59[81]](_0xb860x1f)[_0x1d59[40]](handleEntityNotFound(_0xb860x1a,null))[_0x1d59[40]](respondWithResult(_0xb860x1a,null))[_0x1d59[73]](handleError(_0xb860x1a,null))};exports[_0x1d59[82]]= function(_0xb860x2c,_0xb860x1a){return db[_0x1d59[50]][_0x1d59[82]](_0xb860x2c[_0x1d59[83]],{})[_0x1d59[40]](respondWithResult(_0xb860x1a,201))[_0x1d59[73]](handleError(_0xb860x1a,null))};exports[_0x1d59[41]]= function(_0xb860x2c,_0xb860x1a){if(_0xb860x2c[_0x1d59[83]][_0x1d59[79]]){delete _0xb860x2c[_0x1d59[83]][_0x1d59[79]]};return db[_0x1d59[50]][_0x1d59[81]]({where:{id:_0xb860x2c[_0x1d59[80]][_0x1d59[79]]}})[_0x1d59[40]](handleEntityNotFound(_0xb860x1a,null))[_0x1d59[40]](saveUpdates(_0xb860x2c[_0x1d59[83]],null))[_0x1d59[40]](respondWithResult(_0xb860x1a,null))[_0x1d59[73]](handleError(_0xb860x1a,null))};exports[_0x1d59[42]]= function(_0xb860x2c,_0xb860x1a){return db[_0x1d59[50]][_0x1d59[81]]({where:{id:_0xb860x2c[_0x1d59[80]][_0x1d59[79]]}})[_0x1d59[40]](handleEntityNotFound(_0xb860x1a,null))[_0x1d59[40]](removeEntity(_0xb860x1a,null))[_0x1d59[73]](handleError(_0xb860x1a,null))};exports[_0x1d59[84]]= function(_0xb860x2c,_0xb860x1a,_0xb860x33){return db[_0x1d59[50]][_0x1d59[81]]({where:{id:_0xb860x2c[_0x1d59[80]][_0x1d59[79]]},attributes:[_0x1d59[45],_0x1d59[94],_0x1d59[87],_0x1d59[96]],raw:true})[_0x1d59[40]](handleEntityNotFound(_0xb860x1a,null))[_0x1d59[40]](function(_0xb860x1c){if(_0xb860x1c){if(!fs[_0x1d59[89]](path[_0x1d59[88]](config[_0x1d59[85]],_0x1d59[86],_0xb860x1c[_0x1d59[87]]))){throw  new db[_0x1d59[91]].ValidationError(_0x1d59[90])};if(_0xb860x2c[_0x1d59[53]][_0x1d59[92]]){return _0xb860x1a[_0x1d59[26]](200)};return _0xb860x1a[_0x1d59[84]](path[_0x1d59[88]](config[_0x1d59[85]],_0x1d59[86],_0xb860x1c[_0x1d59[87]]),util[_0x1d59[97]](_0x1d59[93],_0xb860x1c[_0x1d59[94]]|| _0xb860x1c[_0x1d59[45]],_0xb860x1c[_0x1d59[96]][_0x1d59[95]]()))}})[_0x1d59[73]](handleError(_0xb860x1a,null))}
\ No newline at end of file
+var _0x5c46=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x73\x61\x76\x65\x6E\x61\x6D\x65","\x6A\x6F\x69\x6E","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x52\x65\x70\x6F\x72\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x65\x6D\x70\x74\x79","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x69\x73\x74\x73","\x25\x73\x2E\x25\x73","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x6F\x75\x74\x70\x75\x74","\x66\x6F\x72\x6D\x61\x74"];_0x5c46[0];var jsonpatch=require(_0x5c46[1]);var rp=require(_0x5c46[2]);var moment=require(_0x5c46[3]);var BPromise=require(_0x5c46[4]);var Mustache=require(_0x5c46[5]);var util=require(_0x5c46[6]);var path=require(_0x5c46[7]);var sox=require(_0x5c46[8]);var csv=require(_0x5c46[9]);var ejs=require(_0x5c46[10]);var fs=require(_0x5c46[11]);var _=require(_0x5c46[12]);var squel=require(_0x5c46[13]);var crypto=require(_0x5c46[14]);var jsforce=require(_0x5c46[15]);var deskjs=require(_0x5c46[16]);var toCsv=require(_0x5c46[9]);var querystring=require(_0x5c46[17]);var Papa=require(_0x5c46[18]);var qs=require(_0x5c46[19]);var logger=require(_0x5c46[21])(_0x5c46[20]);var utils=require(_0x5c46[22]);var config=require(_0x5c46[23]);var db=require(_0x5c46[25])[_0x5c46[24]];function respondWithStatusCode(_0x9a6ax1a,_0x9a6ax1b){_0x9a6ax1b= _0x9a6ax1b|| 204;return function(_0x9a6ax1c){if(_0x9a6ax1c){return _0x9a6ax1a[_0x5c46[26]](_0x9a6ax1b)};return _0x9a6ax1a[_0x5c46[28]](_0x9a6ax1b)[_0x5c46[27]]()}}function respondWithResult(_0x9a6ax1a,_0x9a6ax1b){_0x9a6ax1b= _0x9a6ax1b|| 200;return function(_0x9a6ax1c){if(_0x9a6ax1c){return _0x9a6ax1a[_0x5c46[28]](_0x9a6ax1b)[_0x5c46[29]](_0x9a6ax1c)}}}function respondWithFilteredResult(_0x9a6ax1a,_0x9a6ax1f){return function(_0x9a6ax1c){if(_0x9a6ax1c){var _0x9a6ax20=_0x9a6ax1c[_0x5c46[30]],_0x9a6ax21=_0x9a6ax1f[_0x5c46[31]],_0x9a6ax22=_0x9a6ax1f[_0x5c46[31]]+ _0x9a6ax1f[_0x5c46[32]],_0x9a6ax1b;if(_0x9a6ax22>= _0x9a6ax20){_0x9a6ax22= _0x9a6ax20;_0x9a6ax1b= 200}else {_0x9a6ax1b= 206};_0x9a6ax1a[_0x5c46[28]](_0x9a6ax1b);return _0x9a6ax1a[_0x5c46[36]](_0x5c46[33],_0x9a6ax21+ _0x5c46[34]+ _0x9a6ax22+ _0x5c46[35]+ _0x9a6ax20)[_0x5c46[29]](_0x9a6ax1c)};return null}}function patchUpdates(_0x9a6ax24){return function(_0x9a6ax1c){try{jsonpatch[_0x5c46[37]](_0x9a6ax1c,_0x9a6ax24,true)}catch(err){return BPromise[_0x5c46[38]](err)};return _0x9a6ax1c[_0x5c46[39]]()}}function saveUpdates(_0x9a6ax26,_0x9a6ax1b){return function(_0x9a6ax1c){if(_0x9a6ax1c){return _0x9a6ax1c[_0x5c46[41]](_0x9a6ax26)[_0x5c46[40]](function(_0x9a6ax27){return _0x9a6ax27})};return null}}function removeEntity(_0x9a6ax1a,_0x9a6ax1b){return function(_0x9a6ax1c){if(_0x9a6ax1c){return _0x9a6ax1c[_0x5c46[42]]()[_0x5c46[40]](function(){_0x9a6ax1a[_0x5c46[28]](204)[_0x5c46[27]]()})}}}function handleEntityNotFound(_0x9a6ax1a,_0x9a6ax1b){return function(_0x9a6ax1c){if(!_0x9a6ax1c){_0x9a6ax1a[_0x5c46[26]](404)};return _0x9a6ax1c}}function handleError(_0x9a6ax1a,_0x9a6ax1b){_0x9a6ax1b= _0x9a6ax1b|| 500;return function(_0x9a6ax2b){logger[_0x5c46[44]](_0x9a6ax2b[_0x5c46[43]]);if(_0x9a6ax2b[_0x5c46[45]]){delete _0x9a6ax2b[_0x5c46[45]]};_0x9a6ax1a[_0x5c46[28]](_0x9a6ax1b)[_0x5c46[46]](_0x9a6ax2b)}}exports[_0x5c46[47]]= function(_0x9a6ax2c,_0x9a6ax1a){var _0x9a6ax1f={},_0x9a6ax2d={},_0x9a6ax2e={count:0,rows:[]};_0x9a6ax2d[_0x5c46[48]]= _[_0x5c46[51]](db[_0x5c46[50]][_0x5c46[49]]);var _0x9a6ax2f={dateStart:_0x9a6ax2c[_0x5c46[53]][_0x5c46[52]],dateEnd:_0x9a6ax2c[_0x5c46[53]][_0x5c46[54]]};delete _0x9a6ax2c[_0x5c46[53]][_0x5c46[52]];delete _0x9a6ax2c[_0x5c46[53]][_0x5c46[54]];_0x9a6ax2d[_0x5c46[53]]= _[_0x5c46[51]](_0x9a6ax2c[_0x5c46[53]]);_0x9a6ax2d[_0x5c46[55]]= _[_0x5c46[56]](_0x9a6ax2d[_0x5c46[48]],_0x9a6ax2d[_0x5c46[53]]);_0x9a6ax1f[_0x5c46[57]]= _[_0x5c46[56]](_0x9a6ax2d[_0x5c46[48]],qs[_0x5c46[58]](_0x9a6ax2c[_0x5c46[53]][_0x5c46[58]]));_0x9a6ax1f[_0x5c46[57]]= (_0x9a6ax1f[_0x5c46[57]][_0x5c46[59]])?_0x9a6ax1f[_0x5c46[57]]:_0x9a6ax2d[_0x5c46[48]];if(!_0x9a6ax2c[_0x5c46[53]][_0x5c46[61]](_0x5c46[60])){_0x9a6ax1f[_0x5c46[32]]= qs[_0x5c46[32]](_0x9a6ax2c[_0x5c46[53]][_0x5c46[32]]);_0x9a6ax1f[_0x5c46[31]]= qs[_0x5c46[31]](_0x9a6ax2c[_0x5c46[53]][_0x5c46[31]])};_0x9a6ax1f[_0x5c46[62]]= qs[_0x5c46[63]](_0x9a6ax2c[_0x5c46[53]][_0x5c46[63]]);_0x9a6ax1f[_0x5c46[64]]= qs[_0x5c46[55]](_[_0x5c46[65]](_0x9a6ax2c[_0x5c46[53]],_0x9a6ax2d[_0x5c46[55]]));if(_0x9a6ax2f[_0x5c46[52]]){if(_0x9a6ax2f[_0x5c46[54]]){_0x9a6ax2f[_0x5c46[54]]= moment(_0x9a6ax2f[_0x5c46[54]])[_0x5c46[67]](1,_0x5c46[66])}else {_0x9a6ax2f[_0x5c46[54]]= moment(_0x9a6ax2f[_0x5c46[52]])[_0x5c46[67]](1,_0x5c46[66])};_[_0x5c46[68]](_0x9a6ax1f[_0x5c46[64]],{createdAt:{$gte:_0x9a6ax2f[_0x5c46[52]],$lte:_0x9a6ax2f[_0x5c46[54]]}})};if(_0x9a6ax2c[_0x5c46[53]][_0x5c46[69]]){_0x9a6ax1f[_0x5c46[64]]= _[_0x5c46[68]](_0x9a6ax1f[_0x5c46[64]],{$or:_[_0x5c46[71]](_0x9a6ax1f[_0x5c46[57]],function(_0x9a6ax30){var _0x9a6ax2e={};_0x9a6ax2e[_0x9a6ax30]= {$like:_0x5c46[70]+ _0x9a6ax2c[_0x5c46[53]][_0x5c46[69]]+ _0x5c46[70]};return _0x9a6ax2e})})};_0x9a6ax1f= _[_0x5c46[68]]({},_0x9a6ax1f,_0x9a6ax2c[_0x5c46[72]]);var _0x9a6ax31={where:_0x9a6ax1f[_0x5c46[64]]};return db[_0x5c46[50]][_0x5c46[30]](_0x9a6ax31)[_0x5c46[40]](function(_0x9a6ax20){_0x9a6ax2e[_0x5c46[30]]= _0x9a6ax20;if(_0x9a6ax2c[_0x5c46[53]][_0x5c46[75]]){_0x9a6ax1f[_0x5c46[76]]= [{all:true}]};return db[_0x5c46[50]][_0x5c46[77]](_0x9a6ax1f)})[_0x5c46[40]](function(_0x9a6ax32){_0x9a6ax2e[_0x5c46[74]]= _0x9a6ax32;return _0x9a6ax2e})[_0x5c46[40]](respondWithFilteredResult(_0x9a6ax1a,_0x9a6ax1f))[_0x5c46[73]](handleError(_0x9a6ax1a,null))};exports[_0x5c46[78]]= function(_0x9a6ax2c,_0x9a6ax1a){var _0x9a6ax1f={raw:true,where:{id:_0x9a6ax2c[_0x5c46[80]][_0x5c46[79]]}},_0x9a6ax2d={};_0x9a6ax2d[_0x5c46[48]]= _[_0x5c46[51]](db[_0x5c46[50]][_0x5c46[49]]);_0x9a6ax2d[_0x5c46[53]]= _[_0x5c46[51]](_0x9a6ax2c[_0x5c46[53]]);_0x9a6ax2d[_0x5c46[55]]= _[_0x5c46[56]](_0x9a6ax2d[_0x5c46[48]],_0x9a6ax2d[_0x5c46[53]]);_0x9a6ax1f[_0x5c46[57]]= _[_0x5c46[56]](_0x9a6ax2d[_0x5c46[48]],qs[_0x5c46[58]](_0x9a6ax2c[_0x5c46[53]][_0x5c46[58]]));_0x9a6ax1f[_0x5c46[57]]= (_0x9a6ax1f[_0x5c46[57]][_0x5c46[59]])?_0x9a6ax1f[_0x5c46[57]]:_0x9a6ax2d[_0x5c46[48]];if(_0x9a6ax2c[_0x5c46[53]][_0x5c46[75]]){_0x9a6ax1f[_0x5c46[76]]= [{all:true}]};_0x9a6ax1f= _[_0x5c46[68]]({},_0x9a6ax1f,_0x9a6ax2c[_0x5c46[72]]);return db[_0x5c46[50]][_0x5c46[81]](_0x9a6ax1f)[_0x5c46[40]](handleEntityNotFound(_0x9a6ax1a,null))[_0x5c46[40]](respondWithResult(_0x9a6ax1a,null))[_0x5c46[73]](handleError(_0x9a6ax1a,null))};exports[_0x5c46[82]]= function(_0x9a6ax2c,_0x9a6ax1a){return db[_0x5c46[50]][_0x5c46[82]](_0x9a6ax2c[_0x5c46[83]],{})[_0x5c46[40]](respondWithResult(_0x9a6ax1a,201))[_0x5c46[73]](handleError(_0x9a6ax1a,null))};exports[_0x5c46[41]]= function(_0x9a6ax2c,_0x9a6ax1a){if(_0x9a6ax2c[_0x5c46[83]][_0x5c46[79]]){delete _0x9a6ax2c[_0x5c46[83]][_0x5c46[79]]};return db[_0x5c46[50]][_0x5c46[81]]({where:{id:_0x9a6ax2c[_0x5c46[80]][_0x5c46[79]]}})[_0x5c46[40]](handleEntityNotFound(_0x9a6ax1a,null))[_0x5c46[40]](saveUpdates(_0x9a6ax2c[_0x5c46[83]],null))[_0x5c46[40]](respondWithResult(_0x9a6ax1a,null))[_0x5c46[73]](handleError(_0x9a6ax1a,null))};exports[_0x5c46[42]]= function(_0x9a6ax2c,_0x9a6ax1a){return db[_0x5c46[50]][_0x5c46[81]]({where:{id:_0x9a6ax2c[_0x5c46[80]][_0x5c46[79]]}})[_0x5c46[40]](handleEntityNotFound(_0x9a6ax1a,null))[_0x5c46[40]](removeEntity(_0x9a6ax1a,null))[_0x5c46[73]](handleError(_0x9a6ax1a,null))};exports[_0x5c46[84]]= function(_0x9a6ax2c,_0x9a6ax1a,_0x9a6ax33){return db[_0x5c46[50]][_0x5c46[81]]({where:{id:_0x9a6ax2c[_0x5c46[80]][_0x5c46[79]]},attributes:[_0x5c46[45],_0x5c46[94],_0x5c46[87],_0x5c46[96]],raw:true})[_0x5c46[40]](handleEntityNotFound(_0x9a6ax1a,null))[_0x5c46[40]](function(_0x9a6ax1c){if(_0x9a6ax1c){if(!fs[_0x5c46[89]](path[_0x5c46[88]](config[_0x5c46[85]],_0x5c46[86],_0x9a6ax1c[_0x5c46[87]]))){throw  new db[_0x5c46[91]].ValidationError(_0x5c46[90])};if(_0x9a6ax2c[_0x5c46[53]][_0x5c46[92]]){return _0x9a6ax1a[_0x5c46[26]](200)};return _0x9a6ax1a[_0x5c46[84]](path[_0x5c46[88]](config[_0x5c46[85]],_0x5c46[86],_0x9a6ax1c[_0x5c46[87]]),util[_0x5c46[97]](_0x5c46[93],_0x9a6ax1c[_0x5c46[94]]|| _0x9a6ax1c[_0x5c46[45]],_0x9a6ax1c[_0x5c46[96]][_0x5c46[95]]()))}})[_0x5c46[73]](handleError(_0x9a6ax1a,null))}
\ No newline at end of file
index b99c82f..5fd815b 100644 (file)
@@ -1 +1 @@
-var _0xed7e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x5F\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0xed7e[0];var _=require(_0xed7e[1]);var util=require(_0xed7e[2]);var logger=require(_0xed7e[4])(_0xed7e[3]);var moment=require(_0xed7e[5]);var BPromise=require(_0xed7e[6]);var rp=require(_0xed7e[7]);var attributes=require(_0xed7e[8]);module[_0xed7e[9]]= function(_0x1d30x8,_0x1d30x9){return _0x1d30x8[_0xed7e[12]](_0xed7e[10],attributes,{tableName:_0xed7e[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xf892=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x5F\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0xf892[0];var _=require(_0xf892[1]);var util=require(_0xf892[2]);var logger=require(_0xf892[4])(_0xf892[3]);var moment=require(_0xf892[5]);var BPromise=require(_0xf892[6]);var rp=require(_0xf892[7]);var attributes=require(_0xf892[8]);module[_0xf892[9]]= function(_0xcdf0x8,_0xcdf0x9){return _0xcdf0x8[_0xf892[12]](_0xf892[10],attributes,{tableName:_0xf892[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 9c82973..3eecfbd 100644 (file)
@@ -1 +1 @@
-var _0xdfbc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xdfbc[0];var _=require(_0xdfbc[1]);var util=require(_0xdfbc[2]);var moment=require(_0xdfbc[3]);var BPromise=require(_0xdfbc[4]);var rs=require(_0xdfbc[5]);var fs=require(_0xdfbc[6]);var db=require(_0xdfbc[8])[_0xdfbc[7]];var utils=require(_0xdfbc[9]);var logger=require(_0xdfbc[11])(_0xdfbc[10]);var config=require(_0xdfbc[12]);var jayson=require(_0xdfbc[13]);var client=jayson[_0xdfbc[15]][_0xdfbc[14]]({port:9002});function respondWithRpcPromise(_0x49f9xe,_0x49f9xf,_0x49f9x10){return  new BPromise(function(_0x49f9x11,_0x49f9x12){return client[_0xdfbc[28]](_0x49f9xe,_0x49f9x10)[_0xdfbc[27]](function(_0x49f9x14){logger[_0xdfbc[20]](_0xdfbc[16],_0x49f9xf,_0xdfbc[19]);logger[_0xdfbc[23]](_0xdfbc[21],_0x49f9xf,_0xdfbc[19],JSON[_0xdfbc[22]](_0x49f9x14));if(_0x49f9x14[_0xdfbc[17]]){if(_0x49f9x14[_0xdfbc[17]][_0xdfbc[24]]=== 500){logger[_0xdfbc[17]](_0xdfbc[16],_0x49f9xf,_0x49f9x14[_0xdfbc[17]][_0xdfbc[25]]);return _0x49f9x12(_0x49f9x14[_0xdfbc[17]][_0xdfbc[25]])};logger[_0xdfbc[17]](_0xdfbc[16],_0x49f9xf,_0x49f9x14[_0xdfbc[17]][_0xdfbc[25]]);return _0x49f9x11(_0x49f9x14[_0xdfbc[17]][_0xdfbc[25]])}else {logger[_0xdfbc[20]](_0xdfbc[16],_0x49f9xf,_0xdfbc[19]);_0x49f9x11(_0x49f9x14[_0xdfbc[26]][_0xdfbc[25]])}})[_0xdfbc[18]](function(_0x49f9x13){logger[_0xdfbc[17]](_0xdfbc[16],_0x49f9xf,_0x49f9x13);_0x49f9x12(_0x49f9x13)})})}
\ No newline at end of file
+var _0x9ac4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x9ac4[0];var _=require(_0x9ac4[1]);var util=require(_0x9ac4[2]);var moment=require(_0x9ac4[3]);var BPromise=require(_0x9ac4[4]);var rs=require(_0x9ac4[5]);var fs=require(_0x9ac4[6]);var db=require(_0x9ac4[8])[_0x9ac4[7]];var utils=require(_0x9ac4[9]);var logger=require(_0x9ac4[11])(_0x9ac4[10]);var config=require(_0x9ac4[12]);var jayson=require(_0x9ac4[13]);var client=jayson[_0x9ac4[15]][_0x9ac4[14]]({port:9002});function respondWithRpcPromise(_0xacd3xe,_0xacd3xf,_0xacd3x10){return  new BPromise(function(_0xacd3x11,_0xacd3x12){return client[_0x9ac4[28]](_0xacd3xe,_0xacd3x10)[_0x9ac4[27]](function(_0xacd3x14){logger[_0x9ac4[20]](_0x9ac4[16],_0xacd3xf,_0x9ac4[19]);logger[_0x9ac4[23]](_0x9ac4[21],_0xacd3xf,_0x9ac4[19],JSON[_0x9ac4[22]](_0xacd3x14));if(_0xacd3x14[_0x9ac4[17]]){if(_0xacd3x14[_0x9ac4[17]][_0x9ac4[24]]=== 500){logger[_0x9ac4[17]](_0x9ac4[16],_0xacd3xf,_0xacd3x14[_0x9ac4[17]][_0x9ac4[25]]);return _0xacd3x12(_0xacd3x14[_0x9ac4[17]][_0x9ac4[25]])};logger[_0x9ac4[17]](_0x9ac4[16],_0xacd3xf,_0xacd3x14[_0x9ac4[17]][_0x9ac4[25]]);return _0xacd3x11(_0xacd3x14[_0x9ac4[17]][_0x9ac4[25]])}else {logger[_0x9ac4[20]](_0x9ac4[16],_0xacd3xf,_0x9ac4[19]);_0xacd3x11(_0xacd3x14[_0x9ac4[26]][_0x9ac4[25]])}})[_0x9ac4[18]](function(_0xacd3x13){logger[_0x9ac4[17]](_0x9ac4[16],_0xacd3xf,_0xacd3x13);_0xacd3x12(_0xacd3x13)})})}
\ No newline at end of file
index c4af45c..040ecfe 100644 (file)
@@ -1 +1 @@
-var _0xc831=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc831[0];var multer=require(_0xc831[1]);var util=require(_0xc831[2]);var path=require(_0xc831[3]);var express=require(_0xc831[4]);var router=express.Router();var auth=require(_0xc831[5]);var interaction=require(_0xc831[6]);var config=require(_0xc831[7]);var controller=require(_0xc831[8]);router[_0xc831[12]](_0xc831[9],auth[_0xc831[10]](),controller[_0xc831[11]]);router[_0xc831[12]](_0xc831[13],auth[_0xc831[10]](),controller[_0xc831[14]]);router[_0xc831[12]](_0xc831[15],auth[_0xc831[10]](),controller[_0xc831[16]]);router[_0xc831[18]](_0xc831[9],auth[_0xc831[10]](),controller[_0xc831[17]]);router[_0xc831[20]](_0xc831[13],auth[_0xc831[10]](),controller[_0xc831[19]]);router[_0xc831[22]](_0xc831[13],auth[_0xc831[10]](),controller[_0xc831[21]]);module[_0xc831[23]]= router
\ No newline at end of file
+var _0x62f5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x62f5[0];var multer=require(_0x62f5[1]);var util=require(_0x62f5[2]);var path=require(_0x62f5[3]);var express=require(_0x62f5[4]);var router=express.Router();var auth=require(_0x62f5[5]);var interaction=require(_0x62f5[6]);var config=require(_0x62f5[7]);var controller=require(_0x62f5[8]);router[_0x62f5[12]](_0x62f5[9],auth[_0x62f5[10]](),controller[_0x62f5[11]]);router[_0x62f5[12]](_0x62f5[13],auth[_0x62f5[10]](),controller[_0x62f5[14]]);router[_0x62f5[12]](_0x62f5[15],auth[_0x62f5[10]](),controller[_0x62f5[16]]);router[_0x62f5[18]](_0x62f5[9],auth[_0x62f5[10]](),controller[_0x62f5[17]]);router[_0x62f5[20]](_0x62f5[13],auth[_0x62f5[10]](),controller[_0x62f5[19]]);router[_0x62f5[22]](_0x62f5[13],auth[_0x62f5[10]](),controller[_0x62f5[21]]);module[_0x62f5[23]]= router
\ No newline at end of file
index 2b3555f..b073d59 100644 (file)
@@ -1 +1 @@
-var _0x30e6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x30e6[0];var Sequelize=require(_0x30e6[1]);module[_0x30e6[2]]= {field:{type:Sequelize[_0x30e6[3]],allowNull:false},alias:{type:Sequelize[_0x30e6[3]]},function:{type:Sequelize[_0x30e6[3]]},format:{type:Sequelize[_0x30e6[3]]},groupBy:{type:Sequelize[_0x30e6[4]],defaultValue:false},orderBy:{type:Sequelize[_0x30e6[3]]},custom:{type:Sequelize[_0x30e6[4]],defaultValue:false}}
\ No newline at end of file
+var _0x9dd9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x9dd9[0];var Sequelize=require(_0x9dd9[1]);module[_0x9dd9[2]]= {field:{type:Sequelize[_0x9dd9[3]],allowNull:false},alias:{type:Sequelize[_0x9dd9[3]]},function:{type:Sequelize[_0x9dd9[3]]},format:{type:Sequelize[_0x9dd9[3]]},groupBy:{type:Sequelize[_0x9dd9[4]],defaultValue:false},orderBy:{type:Sequelize[_0x9dd9[3]]},custom:{type:Sequelize[_0x9dd9[4]],defaultValue:false}}
\ No newline at end of file
index bfdbcc8..82b221f 100644 (file)
@@ -1 +1 @@
-var _0xf695=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x46\x69\x65\x6C\x64\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x61\x64\x64\x46\x69\x65\x6C\x64\x73","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x41\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74"];_0xf695[0];var jsonpatch=require(_0xf695[1]);var rp=require(_0xf695[2]);var moment=require(_0xf695[3]);var BPromise=require(_0xf695[4]);var Mustache=require(_0xf695[5]);var util=require(_0xf695[6]);var path=require(_0xf695[7]);var sox=require(_0xf695[8]);var csv=require(_0xf695[9]);var ejs=require(_0xf695[10]);var fs=require(_0xf695[11]);var _=require(_0xf695[12]);var squel=require(_0xf695[13]);var crypto=require(_0xf695[14]);var jsforce=require(_0xf695[15]);var deskjs=require(_0xf695[16]);var toCsv=require(_0xf695[9]);var querystring=require(_0xf695[17]);var Papa=require(_0xf695[18]);var qs=require(_0xf695[19]);var logger=require(_0xf695[21])(_0xf695[20]);var utils=require(_0xf695[22]);var config=require(_0xf695[23]);var db=require(_0xf695[25])[_0xf695[24]];function respondWithStatusCode(_0xa6ddx1a,_0xa6ddx1b){_0xa6ddx1b= _0xa6ddx1b|| 204;return function(_0xa6ddx1c){if(_0xa6ddx1c){return _0xa6ddx1a[_0xf695[26]](_0xa6ddx1b)};return _0xa6ddx1a[_0xf695[28]](_0xa6ddx1b)[_0xf695[27]]()}}function respondWithResult(_0xa6ddx1a,_0xa6ddx1b){_0xa6ddx1b= _0xa6ddx1b|| 200;return function(_0xa6ddx1c){if(_0xa6ddx1c){return _0xa6ddx1a[_0xf695[28]](_0xa6ddx1b)[_0xf695[29]](_0xa6ddx1c)}}}function respondWithFilteredResult(_0xa6ddx1a,_0xa6ddx1f){return function(_0xa6ddx1c){if(_0xa6ddx1c){var _0xa6ddx20=_0xa6ddx1c[_0xf695[30]],_0xa6ddx21=_0xa6ddx1f[_0xf695[31]],_0xa6ddx22=_0xa6ddx1f[_0xf695[31]]+ _0xa6ddx1f[_0xf695[32]],_0xa6ddx1b;if(_0xa6ddx22>= _0xa6ddx20){_0xa6ddx22= _0xa6ddx20;_0xa6ddx1b= 200}else {_0xa6ddx1b= 206};_0xa6ddx1a[_0xf695[28]](_0xa6ddx1b);return _0xa6ddx1a[_0xf695[36]](_0xf695[33],_0xa6ddx21+ _0xf695[34]+ _0xa6ddx22+ _0xf695[35]+ _0xa6ddx20)[_0xf695[29]](_0xa6ddx1c)};return null}}function patchUpdates(_0xa6ddx24){return function(_0xa6ddx1c){try{jsonpatch[_0xf695[37]](_0xa6ddx1c,_0xa6ddx24,true)}catch(err){return BPromise[_0xf695[38]](err)};return _0xa6ddx1c[_0xf695[39]]()}}function saveUpdates(_0xa6ddx26,_0xa6ddx1b){return function(_0xa6ddx1c){if(_0xa6ddx1c){return _0xa6ddx1c[_0xf695[41]](_0xa6ddx26)[_0xf695[40]](function(_0xa6ddx27){return _0xa6ddx27})};return null}}function removeEntity(_0xa6ddx1a,_0xa6ddx1b){return function(_0xa6ddx1c){if(_0xa6ddx1c){return _0xa6ddx1c[_0xf695[42]]()[_0xf695[40]](function(){_0xa6ddx1a[_0xf695[28]](204)[_0xf695[27]]()})}}}function handleEntityNotFound(_0xa6ddx1a,_0xa6ddx1b){return function(_0xa6ddx1c){if(!_0xa6ddx1c){_0xa6ddx1a[_0xf695[26]](404)};return _0xa6ddx1c}}function handleError(_0xa6ddx1a,_0xa6ddx1b){_0xa6ddx1b= _0xa6ddx1b|| 500;return function(_0xa6ddx2b){logger[_0xf695[44]](_0xa6ddx2b[_0xf695[43]]);if(_0xa6ddx2b[_0xf695[45]]){delete _0xa6ddx2b[_0xf695[45]]};_0xa6ddx1a[_0xf695[28]](_0xa6ddx1b)[_0xf695[46]](_0xa6ddx2b)}}exports[_0xf695[47]]= function(_0xa6ddx2c,_0xa6ddx1a){var _0xa6ddx1f={},_0xa6ddx2d={},_0xa6ddx2e={count:0,rows:[]};_0xa6ddx2d[_0xf695[48]]= _[_0xf695[51]](db[_0xf695[50]][_0xf695[49]]);var _0xa6ddx2f={dateStart:_0xa6ddx2c[_0xf695[53]][_0xf695[52]],dateEnd:_0xa6ddx2c[_0xf695[53]][_0xf695[54]]};delete _0xa6ddx2c[_0xf695[53]][_0xf695[52]];delete _0xa6ddx2c[_0xf695[53]][_0xf695[54]];_0xa6ddx2d[_0xf695[53]]= _[_0xf695[51]](_0xa6ddx2c[_0xf695[53]]);_0xa6ddx2d[_0xf695[55]]= _[_0xf695[56]](_0xa6ddx2d[_0xf695[48]],_0xa6ddx2d[_0xf695[53]]);_0xa6ddx1f[_0xf695[57]]= _[_0xf695[56]](_0xa6ddx2d[_0xf695[48]],qs[_0xf695[58]](_0xa6ddx2c[_0xf695[53]][_0xf695[58]]));_0xa6ddx1f[_0xf695[57]]= (_0xa6ddx1f[_0xf695[57]][_0xf695[59]])?_0xa6ddx1f[_0xf695[57]]:_0xa6ddx2d[_0xf695[48]];if(!_0xa6ddx2c[_0xf695[53]][_0xf695[61]](_0xf695[60])){_0xa6ddx1f[_0xf695[32]]= qs[_0xf695[32]](_0xa6ddx2c[_0xf695[53]][_0xf695[32]]);_0xa6ddx1f[_0xf695[31]]= qs[_0xf695[31]](_0xa6ddx2c[_0xf695[53]][_0xf695[31]])};_0xa6ddx1f[_0xf695[62]]= qs[_0xf695[63]](_0xa6ddx2c[_0xf695[53]][_0xf695[63]]);_0xa6ddx1f[_0xf695[64]]= qs[_0xf695[55]](_[_0xf695[65]](_0xa6ddx2c[_0xf695[53]],_0xa6ddx2d[_0xf695[55]]));if(_0xa6ddx2f[_0xf695[52]]){if(_0xa6ddx2f[_0xf695[54]]){_0xa6ddx2f[_0xf695[54]]= moment(_0xa6ddx2f[_0xf695[54]])[_0xf695[67]](1,_0xf695[66])}else {_0xa6ddx2f[_0xf695[54]]= moment(_0xa6ddx2f[_0xf695[52]])[_0xf695[67]](1,_0xf695[66])};_[_0xf695[68]](_0xa6ddx1f[_0xf695[64]],{createdAt:{$gte:_0xa6ddx2f[_0xf695[52]],$lte:_0xa6ddx2f[_0xf695[54]]}})};if(_0xa6ddx2c[_0xf695[53]][_0xf695[69]]){_0xa6ddx1f[_0xf695[64]]= _[_0xf695[68]](_0xa6ddx1f[_0xf695[64]],{$or:_[_0xf695[71]](_0xa6ddx1f[_0xf695[57]],function(_0xa6ddx30){var _0xa6ddx2e={};_0xa6ddx2e[_0xa6ddx30]= {$like:_0xf695[70]+ _0xa6ddx2c[_0xf695[53]][_0xf695[69]]+ _0xf695[70]};return _0xa6ddx2e})})};_0xa6ddx1f= _[_0xf695[68]]({},_0xa6ddx1f,_0xa6ddx2c[_0xf695[72]]);var _0xa6ddx31={where:_0xa6ddx1f[_0xf695[64]]};return db[_0xf695[50]][_0xf695[30]](_0xa6ddx31)[_0xf695[40]](function(_0xa6ddx20){_0xa6ddx2e[_0xf695[30]]= _0xa6ddx20;if(_0xa6ddx2c[_0xf695[53]][_0xf695[75]]){_0xa6ddx1f[_0xf695[76]]= [{all:true}]};return db[_0xf695[50]][_0xf695[77]](_0xa6ddx1f)})[_0xf695[40]](function(_0xa6ddx32){_0xa6ddx2e[_0xf695[74]]= _0xa6ddx32;return _0xa6ddx2e})[_0xf695[40]](respondWithFilteredResult(_0xa6ddx1a,_0xa6ddx1f))[_0xf695[73]](handleError(_0xa6ddx1a,null))};exports[_0xf695[78]]= function(_0xa6ddx2c,_0xa6ddx1a){var _0xa6ddx1f={raw:false,where:{id:_0xa6ddx2c[_0xf695[80]][_0xf695[79]]}},_0xa6ddx2d={};_0xa6ddx2d[_0xf695[48]]= _[_0xf695[51]](db[_0xf695[50]][_0xf695[49]]);_0xa6ddx2d[_0xf695[53]]= _[_0xf695[51]](_0xa6ddx2c[_0xf695[53]]);_0xa6ddx2d[_0xf695[55]]= _[_0xf695[56]](_0xa6ddx2d[_0xf695[48]],_0xa6ddx2d[_0xf695[53]]);_0xa6ddx1f[_0xf695[57]]= _[_0xf695[56]](_0xa6ddx2d[_0xf695[48]],qs[_0xf695[58]](_0xa6ddx2c[_0xf695[53]][_0xf695[58]]));_0xa6ddx1f[_0xf695[57]]= (_0xa6ddx1f[_0xf695[57]][_0xf695[59]])?_0xa6ddx1f[_0xf695[57]]:_0xa6ddx2d[_0xf695[48]];if(_0xa6ddx2c[_0xf695[53]][_0xf695[75]]){_0xa6ddx1f[_0xf695[76]]= [{all:true}]};_0xa6ddx1f= _[_0xf695[68]]({},_0xa6ddx1f,_0xa6ddx2c[_0xf695[72]]);return db[_0xf695[50]][_0xf695[81]](_0xa6ddx1f)[_0xf695[40]](handleEntityNotFound(_0xa6ddx1a,null))[_0xf695[40]](respondWithResult(_0xa6ddx1a,null))[_0xf695[73]](handleError(_0xa6ddx1a,null))};exports[_0xf695[82]]= function(_0xa6ddx2c,_0xa6ddx1a){return db[_0xf695[50]][_0xf695[82]](_0xa6ddx2c[_0xf695[83]],{})[_0xf695[40]](respondWithResult(_0xa6ddx1a,201))[_0xf695[73]](handleError(_0xa6ddx1a,null))};exports[_0xf695[84]]= function(_0xa6ddx2c,_0xa6ddx1a){return db[_0xf695[50]][_0xf695[84]](_0xa6ddx2c[_0xf695[83]],{raw:false,individualHooks:true})[_0xf695[40]](respondWithResult(_0xa6ddx1a,201))[_0xf695[73]](handleError(_0xa6ddx1a,null))};exports[_0xf695[41]]= function(_0xa6ddx2c,_0xa6ddx1a){if(_0xa6ddx2c[_0xf695[83]][_0xf695[79]]){delete _0xa6ddx2c[_0xf695[83]][_0xf695[79]]};return db[_0xf695[50]][_0xf695[81]]({where:{id:_0xa6ddx2c[_0xf695[80]][_0xf695[79]]}})[_0xf695[40]](handleEntityNotFound(_0xa6ddx1a,null))[_0xf695[40]](saveUpdates(_0xa6ddx2c[_0xf695[83]],null))[_0xf695[40]](respondWithResult(_0xa6ddx1a,null))[_0xf695[73]](handleError(_0xa6ddx1a,null))};exports[_0xf695[42]]= function(_0xa6ddx2c,_0xa6ddx1a){return db[_0xf695[50]][_0xf695[81]]({where:{id:_0xa6ddx2c[_0xf695[80]][_0xf695[79]]}})[_0xf695[40]](handleEntityNotFound(_0xa6ddx1a,null))[_0xf695[40]](removeEntity(_0xa6ddx1a,null))[_0xf695[73]](handleError(_0xa6ddx1a,null))};exports[_0xf695[85]]= function(_0xa6ddx2c,_0xa6ddx1a){return db[_0xf695[50]][_0xf695[42]]({where:{id:_0xa6ddx2c[_0xf695[53]][_0xf695[86]]|| []},raw:false,individualHooks:true})[_0xf695[40]](respondWithResult(_0xa6ddx1a,204))[_0xf695[73]](handleError(_0xa6ddx1a,null))};exports[_0xf695[87]]= function(_0xa6ddx2c,_0xa6ddx1a,_0xa6ddx33){return db[_0xf695[92]][_0xf695[91]]({where:{id:_0xa6ddx2c[_0xf695[80]][_0xf695[79]]}})[_0xf695[40]](handleEntityNotFound(_0xa6ddx1a,null))[_0xf695[40]](function(_0xa6ddx1c){if(_0xa6ddx1c){return db[_0xf695[90]][_0xf695[89]](function(_0xa6ddx34){return db[_0xf695[50]][_0xf695[42]]({where:{CustomReportId:_0xa6ddx2c[_0xf695[80]][_0xf695[79]]},transaction:_0xa6ddx34})[_0xf695[40]](function(_0xa6ddx35){var _0xa6ddx36=_[_0xf695[71]](_0xa6ddx2c[_0xf695[83]],function(_0xa6ddx37){delete _0xa6ddx37[_0xf695[79]];_0xa6ddx37[_0xf695[88]]= _0xa6ddx2c[_0xf695[80]][_0xf695[79]];return _0xa6ddx37});return db[_0xf695[50]][_0xf695[84]](_0xa6ddx36,{transaction:_0xa6ddx34})})})[_0xf695[40]](function(){return db[_0xf695[50]][_0xf695[77]]({where:{CustomReportId:_0xa6ddx2c[_0xf695[80]][_0xf695[79]]}})})}})[_0xf695[40]](respondWithResult(_0xa6ddx1a,null))[_0xf695[73]](handleError(_0xa6ddx1a,null))}
\ No newline at end of file
+var _0x33c0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x46\x69\x65\x6C\x64\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x61\x64\x64\x46\x69\x65\x6C\x64\x73","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x41\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74"];_0x33c0[0];var jsonpatch=require(_0x33c0[1]);var rp=require(_0x33c0[2]);var moment=require(_0x33c0[3]);var BPromise=require(_0x33c0[4]);var Mustache=require(_0x33c0[5]);var util=require(_0x33c0[6]);var path=require(_0x33c0[7]);var sox=require(_0x33c0[8]);var csv=require(_0x33c0[9]);var ejs=require(_0x33c0[10]);var fs=require(_0x33c0[11]);var _=require(_0x33c0[12]);var squel=require(_0x33c0[13]);var crypto=require(_0x33c0[14]);var jsforce=require(_0x33c0[15]);var deskjs=require(_0x33c0[16]);var toCsv=require(_0x33c0[9]);var querystring=require(_0x33c0[17]);var Papa=require(_0x33c0[18]);var qs=require(_0x33c0[19]);var logger=require(_0x33c0[21])(_0x33c0[20]);var utils=require(_0x33c0[22]);var config=require(_0x33c0[23]);var db=require(_0x33c0[25])[_0x33c0[24]];function respondWithStatusCode(_0xa8fax1a,_0xa8fax1b){_0xa8fax1b= _0xa8fax1b|| 204;return function(_0xa8fax1c){if(_0xa8fax1c){return _0xa8fax1a[_0x33c0[26]](_0xa8fax1b)};return _0xa8fax1a[_0x33c0[28]](_0xa8fax1b)[_0x33c0[27]]()}}function respondWithResult(_0xa8fax1a,_0xa8fax1b){_0xa8fax1b= _0xa8fax1b|| 200;return function(_0xa8fax1c){if(_0xa8fax1c){return _0xa8fax1a[_0x33c0[28]](_0xa8fax1b)[_0x33c0[29]](_0xa8fax1c)}}}function respondWithFilteredResult(_0xa8fax1a,_0xa8fax1f){return function(_0xa8fax1c){if(_0xa8fax1c){var _0xa8fax20=_0xa8fax1c[_0x33c0[30]],_0xa8fax21=_0xa8fax1f[_0x33c0[31]],_0xa8fax22=_0xa8fax1f[_0x33c0[31]]+ _0xa8fax1f[_0x33c0[32]],_0xa8fax1b;if(_0xa8fax22>= _0xa8fax20){_0xa8fax22= _0xa8fax20;_0xa8fax1b= 200}else {_0xa8fax1b= 206};_0xa8fax1a[_0x33c0[28]](_0xa8fax1b);return _0xa8fax1a[_0x33c0[36]](_0x33c0[33],_0xa8fax21+ _0x33c0[34]+ _0xa8fax22+ _0x33c0[35]+ _0xa8fax20)[_0x33c0[29]](_0xa8fax1c)};return null}}function patchUpdates(_0xa8fax24){return function(_0xa8fax1c){try{jsonpatch[_0x33c0[37]](_0xa8fax1c,_0xa8fax24,true)}catch(err){return BPromise[_0x33c0[38]](err)};return _0xa8fax1c[_0x33c0[39]]()}}function saveUpdates(_0xa8fax26,_0xa8fax1b){return function(_0xa8fax1c){if(_0xa8fax1c){return _0xa8fax1c[_0x33c0[41]](_0xa8fax26)[_0x33c0[40]](function(_0xa8fax27){return _0xa8fax27})};return null}}function removeEntity(_0xa8fax1a,_0xa8fax1b){return function(_0xa8fax1c){if(_0xa8fax1c){return _0xa8fax1c[_0x33c0[42]]()[_0x33c0[40]](function(){_0xa8fax1a[_0x33c0[28]](204)[_0x33c0[27]]()})}}}function handleEntityNotFound(_0xa8fax1a,_0xa8fax1b){return function(_0xa8fax1c){if(!_0xa8fax1c){_0xa8fax1a[_0x33c0[26]](404)};return _0xa8fax1c}}function handleError(_0xa8fax1a,_0xa8fax1b){_0xa8fax1b= _0xa8fax1b|| 500;return function(_0xa8fax2b){logger[_0x33c0[44]](_0xa8fax2b[_0x33c0[43]]);if(_0xa8fax2b[_0x33c0[45]]){delete _0xa8fax2b[_0x33c0[45]]};_0xa8fax1a[_0x33c0[28]](_0xa8fax1b)[_0x33c0[46]](_0xa8fax2b)}}exports[_0x33c0[47]]= function(_0xa8fax2c,_0xa8fax1a){var _0xa8fax1f={},_0xa8fax2d={},_0xa8fax2e={count:0,rows:[]};_0xa8fax2d[_0x33c0[48]]= _[_0x33c0[51]](db[_0x33c0[50]][_0x33c0[49]]);var _0xa8fax2f={dateStart:_0xa8fax2c[_0x33c0[53]][_0x33c0[52]],dateEnd:_0xa8fax2c[_0x33c0[53]][_0x33c0[54]]};delete _0xa8fax2c[_0x33c0[53]][_0x33c0[52]];delete _0xa8fax2c[_0x33c0[53]][_0x33c0[54]];_0xa8fax2d[_0x33c0[53]]= _[_0x33c0[51]](_0xa8fax2c[_0x33c0[53]]);_0xa8fax2d[_0x33c0[55]]= _[_0x33c0[56]](_0xa8fax2d[_0x33c0[48]],_0xa8fax2d[_0x33c0[53]]);_0xa8fax1f[_0x33c0[57]]= _[_0x33c0[56]](_0xa8fax2d[_0x33c0[48]],qs[_0x33c0[58]](_0xa8fax2c[_0x33c0[53]][_0x33c0[58]]));_0xa8fax1f[_0x33c0[57]]= (_0xa8fax1f[_0x33c0[57]][_0x33c0[59]])?_0xa8fax1f[_0x33c0[57]]:_0xa8fax2d[_0x33c0[48]];if(!_0xa8fax2c[_0x33c0[53]][_0x33c0[61]](_0x33c0[60])){_0xa8fax1f[_0x33c0[32]]= qs[_0x33c0[32]](_0xa8fax2c[_0x33c0[53]][_0x33c0[32]]);_0xa8fax1f[_0x33c0[31]]= qs[_0x33c0[31]](_0xa8fax2c[_0x33c0[53]][_0x33c0[31]])};_0xa8fax1f[_0x33c0[62]]= qs[_0x33c0[63]](_0xa8fax2c[_0x33c0[53]][_0x33c0[63]]);_0xa8fax1f[_0x33c0[64]]= qs[_0x33c0[55]](_[_0x33c0[65]](_0xa8fax2c[_0x33c0[53]],_0xa8fax2d[_0x33c0[55]]));if(_0xa8fax2f[_0x33c0[52]]){if(_0xa8fax2f[_0x33c0[54]]){_0xa8fax2f[_0x33c0[54]]= moment(_0xa8fax2f[_0x33c0[54]])[_0x33c0[67]](1,_0x33c0[66])}else {_0xa8fax2f[_0x33c0[54]]= moment(_0xa8fax2f[_0x33c0[52]])[_0x33c0[67]](1,_0x33c0[66])};_[_0x33c0[68]](_0xa8fax1f[_0x33c0[64]],{createdAt:{$gte:_0xa8fax2f[_0x33c0[52]],$lte:_0xa8fax2f[_0x33c0[54]]}})};if(_0xa8fax2c[_0x33c0[53]][_0x33c0[69]]){_0xa8fax1f[_0x33c0[64]]= _[_0x33c0[68]](_0xa8fax1f[_0x33c0[64]],{$or:_[_0x33c0[71]](_0xa8fax1f[_0x33c0[57]],function(_0xa8fax30){var _0xa8fax2e={};_0xa8fax2e[_0xa8fax30]= {$like:_0x33c0[70]+ _0xa8fax2c[_0x33c0[53]][_0x33c0[69]]+ _0x33c0[70]};return _0xa8fax2e})})};_0xa8fax1f= _[_0x33c0[68]]({},_0xa8fax1f,_0xa8fax2c[_0x33c0[72]]);var _0xa8fax31={where:_0xa8fax1f[_0x33c0[64]]};return db[_0x33c0[50]][_0x33c0[30]](_0xa8fax31)[_0x33c0[40]](function(_0xa8fax20){_0xa8fax2e[_0x33c0[30]]= _0xa8fax20;if(_0xa8fax2c[_0x33c0[53]][_0x33c0[75]]){_0xa8fax1f[_0x33c0[76]]= [{all:true}]};return db[_0x33c0[50]][_0x33c0[77]](_0xa8fax1f)})[_0x33c0[40]](function(_0xa8fax32){_0xa8fax2e[_0x33c0[74]]= _0xa8fax32;return _0xa8fax2e})[_0x33c0[40]](respondWithFilteredResult(_0xa8fax1a,_0xa8fax1f))[_0x33c0[73]](handleError(_0xa8fax1a,null))};exports[_0x33c0[78]]= function(_0xa8fax2c,_0xa8fax1a){var _0xa8fax1f={raw:false,where:{id:_0xa8fax2c[_0x33c0[80]][_0x33c0[79]]}},_0xa8fax2d={};_0xa8fax2d[_0x33c0[48]]= _[_0x33c0[51]](db[_0x33c0[50]][_0x33c0[49]]);_0xa8fax2d[_0x33c0[53]]= _[_0x33c0[51]](_0xa8fax2c[_0x33c0[53]]);_0xa8fax2d[_0x33c0[55]]= _[_0x33c0[56]](_0xa8fax2d[_0x33c0[48]],_0xa8fax2d[_0x33c0[53]]);_0xa8fax1f[_0x33c0[57]]= _[_0x33c0[56]](_0xa8fax2d[_0x33c0[48]],qs[_0x33c0[58]](_0xa8fax2c[_0x33c0[53]][_0x33c0[58]]));_0xa8fax1f[_0x33c0[57]]= (_0xa8fax1f[_0x33c0[57]][_0x33c0[59]])?_0xa8fax1f[_0x33c0[57]]:_0xa8fax2d[_0x33c0[48]];if(_0xa8fax2c[_0x33c0[53]][_0x33c0[75]]){_0xa8fax1f[_0x33c0[76]]= [{all:true}]};_0xa8fax1f= _[_0x33c0[68]]({},_0xa8fax1f,_0xa8fax2c[_0x33c0[72]]);return db[_0x33c0[50]][_0x33c0[81]](_0xa8fax1f)[_0x33c0[40]](handleEntityNotFound(_0xa8fax1a,null))[_0x33c0[40]](respondWithResult(_0xa8fax1a,null))[_0x33c0[73]](handleError(_0xa8fax1a,null))};exports[_0x33c0[82]]= function(_0xa8fax2c,_0xa8fax1a){return db[_0x33c0[50]][_0x33c0[82]](_0xa8fax2c[_0x33c0[83]],{})[_0x33c0[40]](respondWithResult(_0xa8fax1a,201))[_0x33c0[73]](handleError(_0xa8fax1a,null))};exports[_0x33c0[84]]= function(_0xa8fax2c,_0xa8fax1a){return db[_0x33c0[50]][_0x33c0[84]](_0xa8fax2c[_0x33c0[83]],{raw:false,individualHooks:true})[_0x33c0[40]](respondWithResult(_0xa8fax1a,201))[_0x33c0[73]](handleError(_0xa8fax1a,null))};exports[_0x33c0[41]]= function(_0xa8fax2c,_0xa8fax1a){if(_0xa8fax2c[_0x33c0[83]][_0x33c0[79]]){delete _0xa8fax2c[_0x33c0[83]][_0x33c0[79]]};return db[_0x33c0[50]][_0x33c0[81]]({where:{id:_0xa8fax2c[_0x33c0[80]][_0x33c0[79]]}})[_0x33c0[40]](handleEntityNotFound(_0xa8fax1a,null))[_0x33c0[40]](saveUpdates(_0xa8fax2c[_0x33c0[83]],null))[_0x33c0[40]](respondWithResult(_0xa8fax1a,null))[_0x33c0[73]](handleError(_0xa8fax1a,null))};exports[_0x33c0[42]]= function(_0xa8fax2c,_0xa8fax1a){return db[_0x33c0[50]][_0x33c0[81]]({where:{id:_0xa8fax2c[_0x33c0[80]][_0x33c0[79]]}})[_0x33c0[40]](handleEntityNotFound(_0xa8fax1a,null))[_0x33c0[40]](removeEntity(_0xa8fax1a,null))[_0x33c0[73]](handleError(_0xa8fax1a,null))};exports[_0x33c0[85]]= function(_0xa8fax2c,_0xa8fax1a){return db[_0x33c0[50]][_0x33c0[42]]({where:{id:_0xa8fax2c[_0x33c0[53]][_0x33c0[86]]|| []},raw:false,individualHooks:true})[_0x33c0[40]](respondWithResult(_0xa8fax1a,204))[_0x33c0[73]](handleError(_0xa8fax1a,null))};exports[_0x33c0[87]]= function(_0xa8fax2c,_0xa8fax1a,_0xa8fax33){return db[_0x33c0[92]][_0x33c0[91]]({where:{id:_0xa8fax2c[_0x33c0[80]][_0x33c0[79]]}})[_0x33c0[40]](handleEntityNotFound(_0xa8fax1a,null))[_0x33c0[40]](function(_0xa8fax1c){if(_0xa8fax1c){return db[_0x33c0[90]][_0x33c0[89]](function(_0xa8fax34){return db[_0x33c0[50]][_0x33c0[42]]({where:{CustomReportId:_0xa8fax2c[_0x33c0[80]][_0x33c0[79]]},transaction:_0xa8fax34})[_0x33c0[40]](function(_0xa8fax35){var _0xa8fax36=_[_0x33c0[71]](_0xa8fax2c[_0x33c0[83]],function(_0xa8fax37){delete _0xa8fax37[_0x33c0[79]];_0xa8fax37[_0x33c0[88]]= _0xa8fax2c[_0x33c0[80]][_0x33c0[79]];return _0xa8fax37});return db[_0x33c0[50]][_0x33c0[84]](_0xa8fax36,{transaction:_0xa8fax34})})})[_0x33c0[40]](function(){return db[_0x33c0[50]][_0x33c0[77]]({where:{CustomReportId:_0xa8fax2c[_0x33c0[80]][_0x33c0[79]]}})})}})[_0x33c0[40]](respondWithResult(_0xa8fax1a,null))[_0x33c0[73]](handleError(_0xa8fax1a,null))}
\ No newline at end of file
index f6a2d12..babd9e4 100644 (file)
@@ -1 +1 @@
-var _0x1f1a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x46\x69\x65\x6C\x64\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x46\x69\x65\x6C\x64\x52\x65\x70\x6F\x72\x74","\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x5F\x72\x65\x70\x6F\x72\x74\x5F\x66\x69\x65\x6C\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0x1f1a[0];var _=require(_0x1f1a[1]);var util=require(_0x1f1a[2]);var logger=require(_0x1f1a[4])(_0x1f1a[3]);var moment=require(_0x1f1a[5]);var BPromise=require(_0x1f1a[6]);var rp=require(_0x1f1a[7]);var attributes=require(_0x1f1a[8]);module[_0x1f1a[9]]= function(_0xca78x8,_0xca78x9){return _0xca78x8[_0x1f1a[12]](_0x1f1a[10],attributes,{tableName:_0x1f1a[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x91f5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x46\x69\x65\x6C\x64\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x46\x69\x65\x6C\x64\x52\x65\x70\x6F\x72\x74","\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x5F\x72\x65\x70\x6F\x72\x74\x5F\x66\x69\x65\x6C\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0x91f5[0];var _=require(_0x91f5[1]);var util=require(_0x91f5[2]);var logger=require(_0x91f5[4])(_0x91f5[3]);var moment=require(_0x91f5[5]);var BPromise=require(_0x91f5[6]);var rp=require(_0x91f5[7]);var attributes=require(_0x91f5[8]);module[_0x91f5[9]]= function(_0x1ea2x8,_0x1ea2x9){return _0x1ea2x8[_0x91f5[12]](_0x91f5[10],attributes,{tableName:_0x91f5[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 8d276c3..bbb48e1 100644 (file)
@@ -1 +1 @@
-var _0x3e71=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x41\x6E\x61\x6C\x79\x74\x69\x63\x46\x69\x65\x6C\x64\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x41\x6E\x61\x6C\x79\x74\x69\x63\x46\x69\x65\x6C\x64\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x3e71[0];var _=require(_0x3e71[1]);var util=require(_0x3e71[2]);var moment=require(_0x3e71[3]);var BPromise=require(_0x3e71[4]);var rs=require(_0x3e71[5]);var fs=require(_0x3e71[6]);var db=require(_0x3e71[8])[_0x3e71[7]];var utils=require(_0x3e71[9]);var logger=require(_0x3e71[11])(_0x3e71[10]);var config=require(_0x3e71[12]);var jayson=require(_0x3e71[13]);var client=jayson[_0x3e71[15]][_0x3e71[14]]({port:9002});function respondWithRpcPromise(_0xcc2exe,_0xcc2exf,_0xcc2ex10){return  new BPromise(function(_0xcc2ex11,_0xcc2ex12){return client[_0x3e71[28]](_0xcc2exe,_0xcc2ex10)[_0x3e71[27]](function(_0xcc2ex14){logger[_0x3e71[20]](_0x3e71[16],_0xcc2exf,_0x3e71[19]);logger[_0x3e71[23]](_0x3e71[21],_0xcc2exf,_0x3e71[19],JSON[_0x3e71[22]](_0xcc2ex14));if(_0xcc2ex14[_0x3e71[17]]){if(_0xcc2ex14[_0x3e71[17]][_0x3e71[24]]=== 500){logger[_0x3e71[17]](_0x3e71[16],_0xcc2exf,_0xcc2ex14[_0x3e71[17]][_0x3e71[25]]);return _0xcc2ex12(_0xcc2ex14[_0x3e71[17]][_0x3e71[25]])};logger[_0x3e71[17]](_0x3e71[16],_0xcc2exf,_0xcc2ex14[_0x3e71[17]][_0x3e71[25]]);return _0xcc2ex11(_0xcc2ex14[_0x3e71[17]][_0x3e71[25]])}else {logger[_0x3e71[20]](_0x3e71[16],_0xcc2exf,_0x3e71[19]);_0xcc2ex11(_0xcc2ex14[_0x3e71[26]][_0x3e71[25]])}})[_0x3e71[18]](function(_0xcc2ex13){logger[_0x3e71[17]](_0x3e71[16],_0xcc2exf,_0xcc2ex13);_0xcc2ex12(_0xcc2ex13)})})}
\ No newline at end of file
+var _0x32f4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x41\x6E\x61\x6C\x79\x74\x69\x63\x46\x69\x65\x6C\x64\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x41\x6E\x61\x6C\x79\x74\x69\x63\x46\x69\x65\x6C\x64\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x32f4[0];var _=require(_0x32f4[1]);var util=require(_0x32f4[2]);var moment=require(_0x32f4[3]);var BPromise=require(_0x32f4[4]);var rs=require(_0x32f4[5]);var fs=require(_0x32f4[6]);var db=require(_0x32f4[8])[_0x32f4[7]];var utils=require(_0x32f4[9]);var logger=require(_0x32f4[11])(_0x32f4[10]);var config=require(_0x32f4[12]);var jayson=require(_0x32f4[13]);var client=jayson[_0x32f4[15]][_0x32f4[14]]({port:9002});function respondWithRpcPromise(_0xd3bdxe,_0xd3bdxf,_0xd3bdx10){return  new BPromise(function(_0xd3bdx11,_0xd3bdx12){return client[_0x32f4[28]](_0xd3bdxe,_0xd3bdx10)[_0x32f4[27]](function(_0xd3bdx14){logger[_0x32f4[20]](_0x32f4[16],_0xd3bdxf,_0x32f4[19]);logger[_0x32f4[23]](_0x32f4[21],_0xd3bdxf,_0x32f4[19],JSON[_0x32f4[22]](_0xd3bdx14));if(_0xd3bdx14[_0x32f4[17]]){if(_0xd3bdx14[_0x32f4[17]][_0x32f4[24]]=== 500){logger[_0x32f4[17]](_0x32f4[16],_0xd3bdxf,_0xd3bdx14[_0x32f4[17]][_0x32f4[25]]);return _0xd3bdx12(_0xd3bdx14[_0x32f4[17]][_0x32f4[25]])};logger[_0x32f4[17]](_0x32f4[16],_0xd3bdxf,_0xd3bdx14[_0x32f4[17]][_0x32f4[25]]);return _0xd3bdx11(_0xd3bdx14[_0x32f4[17]][_0x32f4[25]])}else {logger[_0x32f4[20]](_0x32f4[16],_0xd3bdxf,_0x32f4[19]);_0xd3bdx11(_0xd3bdx14[_0x32f4[26]][_0x32f4[25]])}})[_0x32f4[18]](function(_0xd3bdx13){logger[_0x32f4[17]](_0x32f4[16],_0xd3bdxf,_0xd3bdx13);_0xd3bdx12(_0xd3bdx13)})})}
\ No newline at end of file
index 855cb2c..b6c0b1d 100644 (file)
@@ -1 +1 @@
-var _0xda6e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x46\x69\x65\x6C\x64\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x63\x72\x65\x61\x74\x65\x5F\x6D\x61\x6E\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x2F\x3A\x69\x64\x2F\x63\x72\x65\x61\x74\x65\x5F\x6D\x61\x6E\x79","\x61\x64\x64\x46\x69\x65\x6C\x64\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x64\x65\x73\x74\x72\x6F\x79\x5F\x6D\x61\x6E\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xda6e[0];var multer=require(_0xda6e[1]);var util=require(_0xda6e[2]);var path=require(_0xda6e[3]);var express=require(_0xda6e[4]);var router=express.Router();var auth=require(_0xda6e[5]);var interaction=require(_0xda6e[6]);var config=require(_0xda6e[7]);var controller=require(_0xda6e[8]);router[_0xda6e[12]](_0xda6e[9],auth[_0xda6e[10]](),controller[_0xda6e[11]]);router[_0xda6e[12]](_0xda6e[13],auth[_0xda6e[10]](),controller[_0xda6e[14]]);router[_0xda6e[16]](_0xda6e[9],auth[_0xda6e[10]](),controller[_0xda6e[15]]);router[_0xda6e[16]](_0xda6e[17],auth[_0xda6e[10]](),controller[_0xda6e[18]]);router[_0xda6e[16]](_0xda6e[19],auth[_0xda6e[10]](),controller[_0xda6e[20]]);router[_0xda6e[22]](_0xda6e[13],auth[_0xda6e[10]](),controller[_0xda6e[21]]);router[_0xda6e[25]](_0xda6e[23],auth[_0xda6e[10]](),controller[_0xda6e[24]]);router[_0xda6e[25]](_0xda6e[13],auth[_0xda6e[10]](),controller[_0xda6e[26]]);module[_0xda6e[27]]= router
\ No newline at end of file
+var _0x4c1a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x46\x69\x65\x6C\x64\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x63\x72\x65\x61\x74\x65\x5F\x6D\x61\x6E\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x2F\x3A\x69\x64\x2F\x63\x72\x65\x61\x74\x65\x5F\x6D\x61\x6E\x79","\x61\x64\x64\x46\x69\x65\x6C\x64\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x64\x65\x73\x74\x72\x6F\x79\x5F\x6D\x61\x6E\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x4c1a[0];var multer=require(_0x4c1a[1]);var util=require(_0x4c1a[2]);var path=require(_0x4c1a[3]);var express=require(_0x4c1a[4]);var router=express.Router();var auth=require(_0x4c1a[5]);var interaction=require(_0x4c1a[6]);var config=require(_0x4c1a[7]);var controller=require(_0x4c1a[8]);router[_0x4c1a[12]](_0x4c1a[9],auth[_0x4c1a[10]](),controller[_0x4c1a[11]]);router[_0x4c1a[12]](_0x4c1a[13],auth[_0x4c1a[10]](),controller[_0x4c1a[14]]);router[_0x4c1a[16]](_0x4c1a[9],auth[_0x4c1a[10]](),controller[_0x4c1a[15]]);router[_0x4c1a[16]](_0x4c1a[17],auth[_0x4c1a[10]](),controller[_0x4c1a[18]]);router[_0x4c1a[16]](_0x4c1a[19],auth[_0x4c1a[10]](),controller[_0x4c1a[20]]);router[_0x4c1a[22]](_0x4c1a[13],auth[_0x4c1a[10]](),controller[_0x4c1a[21]]);router[_0x4c1a[25]](_0x4c1a[23],auth[_0x4c1a[10]](),controller[_0x4c1a[24]]);router[_0x4c1a[25]](_0x4c1a[13],auth[_0x4c1a[10]](),controller[_0x4c1a[26]]);module[_0x4c1a[27]]= router
\ No newline at end of file
index 14e8b08..c64efc5 100644 (file)
@@ -1 +1 @@
-var _0xa5d6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x54\x45\x58\x54"];_0xa5d6[0];var Sequelize=require(_0xa5d6[1]);module[_0xa5d6[2]]= {name:{type:Sequelize[_0xa5d6[3]],allowNull:false,unique:_0xa5d6[4]},table:{type:Sequelize[_0xa5d6[3]]},metric:{type:Sequelize[_0xa5d6[5]]},description:{type:Sequelize[_0xa5d6[3]]}}
\ No newline at end of file
+var _0xfa56=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x54\x45\x58\x54"];_0xfa56[0];var Sequelize=require(_0xfa56[1]);module[_0xfa56[2]]= {name:{type:Sequelize[_0xfa56[3]],allowNull:false,unique:_0xfa56[4]},table:{type:Sequelize[_0xfa56[3]]},metric:{type:Sequelize[_0xfa56[5]]},description:{type:Sequelize[_0xfa56[3]]}}
\ No newline at end of file
index 6e24fb7..e9ba19c 100644 (file)
@@ -1 +1 @@
-var _0x2578=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x2578[0];var jsonpatch=require(_0x2578[1]);var rp=require(_0x2578[2]);var moment=require(_0x2578[3]);var BPromise=require(_0x2578[4]);var Mustache=require(_0x2578[5]);var util=require(_0x2578[6]);var path=require(_0x2578[7]);var sox=require(_0x2578[8]);var csv=require(_0x2578[9]);var ejs=require(_0x2578[10]);var fs=require(_0x2578[11]);var _=require(_0x2578[12]);var squel=require(_0x2578[13]);var crypto=require(_0x2578[14]);var jsforce=require(_0x2578[15]);var deskjs=require(_0x2578[16]);var toCsv=require(_0x2578[9]);var querystring=require(_0x2578[17]);var Papa=require(_0x2578[18]);var qs=require(_0x2578[19]);var logger=require(_0x2578[21])(_0x2578[20]);var utils=require(_0x2578[22]);var config=require(_0x2578[23]);var db=require(_0x2578[25])[_0x2578[24]];function respondWithStatusCode(_0xde0ax1a,_0xde0ax1b){_0xde0ax1b= _0xde0ax1b|| 204;return function(_0xde0ax1c){if(_0xde0ax1c){return _0xde0ax1a[_0x2578[26]](_0xde0ax1b)};return _0xde0ax1a[_0x2578[28]](_0xde0ax1b)[_0x2578[27]]()}}function respondWithResult(_0xde0ax1a,_0xde0ax1b){_0xde0ax1b= _0xde0ax1b|| 200;return function(_0xde0ax1c){if(_0xde0ax1c){return _0xde0ax1a[_0x2578[28]](_0xde0ax1b)[_0x2578[29]](_0xde0ax1c)}}}function respondWithFilteredResult(_0xde0ax1a,_0xde0ax1f){return function(_0xde0ax1c){if(_0xde0ax1c){var _0xde0ax20=_0xde0ax1c[_0x2578[30]],_0xde0ax21=_0xde0ax1f[_0x2578[31]],_0xde0ax22=_0xde0ax1f[_0x2578[31]]+ _0xde0ax1f[_0x2578[32]],_0xde0ax1b;if(_0xde0ax22>= _0xde0ax20){_0xde0ax22= _0xde0ax20;_0xde0ax1b= 200}else {_0xde0ax1b= 206};_0xde0ax1a[_0x2578[28]](_0xde0ax1b);return _0xde0ax1a[_0x2578[36]](_0x2578[33],_0xde0ax21+ _0x2578[34]+ _0xde0ax22+ _0x2578[35]+ _0xde0ax20)[_0x2578[29]](_0xde0ax1c)};return null}}function patchUpdates(_0xde0ax24){return function(_0xde0ax1c){try{jsonpatch[_0x2578[37]](_0xde0ax1c,_0xde0ax24,true)}catch(err){return BPromise[_0x2578[38]](err)};return _0xde0ax1c[_0x2578[39]]()}}function saveUpdates(_0xde0ax26,_0xde0ax1b){return function(_0xde0ax1c){if(_0xde0ax1c){return _0xde0ax1c[_0x2578[41]](_0xde0ax26)[_0x2578[40]](function(_0xde0ax27){return _0xde0ax27})};return null}}function removeEntity(_0xde0ax1a,_0xde0ax1b){return function(_0xde0ax1c){if(_0xde0ax1c){return _0xde0ax1c[_0x2578[42]]()[_0x2578[40]](function(){_0xde0ax1a[_0x2578[28]](204)[_0x2578[27]]()})}}}function handleEntityNotFound(_0xde0ax1a,_0xde0ax1b){return function(_0xde0ax1c){if(!_0xde0ax1c){_0xde0ax1a[_0x2578[26]](404)};return _0xde0ax1c}}function handleError(_0xde0ax1a,_0xde0ax1b){_0xde0ax1b= _0xde0ax1b|| 500;return function(_0xde0ax2b){logger[_0x2578[44]](_0xde0ax2b[_0x2578[43]]);if(_0xde0ax2b[_0x2578[45]]){delete _0xde0ax2b[_0x2578[45]]};_0xde0ax1a[_0x2578[28]](_0xde0ax1b)[_0x2578[46]](_0xde0ax2b)}}exports[_0x2578[47]]= function(_0xde0ax2c,_0xde0ax1a){var _0xde0ax1f={},_0xde0ax2d={},_0xde0ax2e={count:0,rows:[]};_0xde0ax2d[_0x2578[48]]= _[_0x2578[51]](db[_0x2578[50]][_0x2578[49]]);var _0xde0ax2f={dateStart:_0xde0ax2c[_0x2578[53]][_0x2578[52]],dateEnd:_0xde0ax2c[_0x2578[53]][_0x2578[54]]};delete _0xde0ax2c[_0x2578[53]][_0x2578[52]];delete _0xde0ax2c[_0x2578[53]][_0x2578[54]];_0xde0ax2d[_0x2578[53]]= _[_0x2578[51]](_0xde0ax2c[_0x2578[53]]);_0xde0ax2d[_0x2578[55]]= _[_0x2578[56]](_0xde0ax2d[_0x2578[48]],_0xde0ax2d[_0x2578[53]]);_0xde0ax1f[_0x2578[57]]= _[_0x2578[56]](_0xde0ax2d[_0x2578[48]],qs[_0x2578[58]](_0xde0ax2c[_0x2578[53]][_0x2578[58]]));_0xde0ax1f[_0x2578[57]]= (_0xde0ax1f[_0x2578[57]][_0x2578[59]])?_0xde0ax1f[_0x2578[57]]:_0xde0ax2d[_0x2578[48]];if(!_0xde0ax2c[_0x2578[53]][_0x2578[61]](_0x2578[60])){_0xde0ax1f[_0x2578[32]]= qs[_0x2578[32]](_0xde0ax2c[_0x2578[53]][_0x2578[32]]);_0xde0ax1f[_0x2578[31]]= qs[_0x2578[31]](_0xde0ax2c[_0x2578[53]][_0x2578[31]])};_0xde0ax1f[_0x2578[62]]= qs[_0x2578[63]](_0xde0ax2c[_0x2578[53]][_0x2578[63]]);_0xde0ax1f[_0x2578[64]]= qs[_0x2578[55]](_[_0x2578[65]](_0xde0ax2c[_0x2578[53]],_0xde0ax2d[_0x2578[55]]));if(_0xde0ax2f[_0x2578[52]]){if(_0xde0ax2f[_0x2578[54]]){_0xde0ax2f[_0x2578[54]]= moment(_0xde0ax2f[_0x2578[54]])[_0x2578[67]](1,_0x2578[66])}else {_0xde0ax2f[_0x2578[54]]= moment(_0xde0ax2f[_0x2578[52]])[_0x2578[67]](1,_0x2578[66])};_[_0x2578[68]](_0xde0ax1f[_0x2578[64]],{createdAt:{$gte:_0xde0ax2f[_0x2578[52]],$lte:_0xde0ax2f[_0x2578[54]]}})};if(_0xde0ax2c[_0x2578[53]][_0x2578[69]]){_0xde0ax1f[_0x2578[64]]= _[_0x2578[68]](_0xde0ax1f[_0x2578[64]],{$or:_[_0x2578[71]](_0xde0ax1f[_0x2578[57]],function(_0xde0ax30){var _0xde0ax2e={};_0xde0ax2e[_0xde0ax30]= {$like:_0x2578[70]+ _0xde0ax2c[_0x2578[53]][_0x2578[69]]+ _0x2578[70]};return _0xde0ax2e})})};_0xde0ax1f= _[_0x2578[68]]({},_0xde0ax1f,_0xde0ax2c[_0x2578[72]]);var _0xde0ax31={where:_0xde0ax1f[_0x2578[64]]};return db[_0x2578[50]][_0x2578[30]](_0xde0ax31)[_0x2578[40]](function(_0xde0ax20){_0xde0ax2e[_0x2578[30]]= _0xde0ax20;if(_0xde0ax2c[_0x2578[53]][_0x2578[75]]){_0xde0ax1f[_0x2578[76]]= [{all:true}]};return db[_0x2578[50]][_0x2578[77]](_0xde0ax1f)})[_0x2578[40]](function(_0xde0ax32){_0xde0ax2e[_0x2578[74]]= _0xde0ax32;return _0xde0ax2e})[_0x2578[40]](respondWithFilteredResult(_0xde0ax1a,_0xde0ax1f))[_0x2578[73]](handleError(_0xde0ax1a,null))};exports[_0x2578[78]]= function(_0xde0ax2c,_0xde0ax1a){var _0xde0ax1f={raw:true,where:{id:_0xde0ax2c[_0x2578[80]][_0x2578[79]]}},_0xde0ax2d={};_0xde0ax2d[_0x2578[48]]= _[_0x2578[51]](db[_0x2578[50]][_0x2578[49]]);_0xde0ax2d[_0x2578[53]]= _[_0x2578[51]](_0xde0ax2c[_0x2578[53]]);_0xde0ax2d[_0x2578[55]]= _[_0x2578[56]](_0xde0ax2d[_0x2578[48]],_0xde0ax2d[_0x2578[53]]);_0xde0ax1f[_0x2578[57]]= _[_0x2578[56]](_0xde0ax2d[_0x2578[48]],qs[_0x2578[58]](_0xde0ax2c[_0x2578[53]][_0x2578[58]]));_0xde0ax1f[_0x2578[57]]= (_0xde0ax1f[_0x2578[57]][_0x2578[59]])?_0xde0ax1f[_0x2578[57]]:_0xde0ax2d[_0x2578[48]];if(_0xde0ax2c[_0x2578[53]][_0x2578[75]]){_0xde0ax1f[_0x2578[76]]= [{all:true}]};_0xde0ax1f= _[_0x2578[68]]({},_0xde0ax1f,_0xde0ax2c[_0x2578[72]]);return db[_0x2578[50]][_0x2578[81]](_0xde0ax1f)[_0x2578[40]](handleEntityNotFound(_0xde0ax1a,null))[_0x2578[40]](respondWithResult(_0xde0ax1a,null))[_0x2578[73]](handleError(_0xde0ax1a,null))};exports[_0x2578[82]]= function(_0xde0ax2c,_0xde0ax1a){return db[_0x2578[50]][_0x2578[82]](_0xde0ax2c[_0x2578[83]],{})[_0x2578[40]](respondWithResult(_0xde0ax1a,201))[_0x2578[73]](handleError(_0xde0ax1a,null))};exports[_0x2578[41]]= function(_0xde0ax2c,_0xde0ax1a){if(_0xde0ax2c[_0x2578[83]][_0x2578[79]]){delete _0xde0ax2c[_0x2578[83]][_0x2578[79]]};return db[_0x2578[50]][_0x2578[81]]({where:{id:_0xde0ax2c[_0x2578[80]][_0x2578[79]]}})[_0x2578[40]](handleEntityNotFound(_0xde0ax1a,null))[_0x2578[40]](saveUpdates(_0xde0ax2c[_0x2578[83]],null))[_0x2578[40]](respondWithResult(_0xde0ax1a,null))[_0x2578[73]](handleError(_0xde0ax1a,null))};exports[_0x2578[42]]= function(_0xde0ax2c,_0xde0ax1a){return db[_0x2578[50]][_0x2578[81]]({where:{id:_0xde0ax2c[_0x2578[80]][_0x2578[79]]}})[_0x2578[40]](handleEntityNotFound(_0xde0ax1a,null))[_0x2578[40]](removeEntity(_0xde0ax1a,null))[_0x2578[73]](handleError(_0xde0ax1a,null))}
\ No newline at end of file
+var _0xd135=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xd135[0];var jsonpatch=require(_0xd135[1]);var rp=require(_0xd135[2]);var moment=require(_0xd135[3]);var BPromise=require(_0xd135[4]);var Mustache=require(_0xd135[5]);var util=require(_0xd135[6]);var path=require(_0xd135[7]);var sox=require(_0xd135[8]);var csv=require(_0xd135[9]);var ejs=require(_0xd135[10]);var fs=require(_0xd135[11]);var _=require(_0xd135[12]);var squel=require(_0xd135[13]);var crypto=require(_0xd135[14]);var jsforce=require(_0xd135[15]);var deskjs=require(_0xd135[16]);var toCsv=require(_0xd135[9]);var querystring=require(_0xd135[17]);var Papa=require(_0xd135[18]);var qs=require(_0xd135[19]);var logger=require(_0xd135[21])(_0xd135[20]);var utils=require(_0xd135[22]);var config=require(_0xd135[23]);var db=require(_0xd135[25])[_0xd135[24]];function respondWithStatusCode(_0x3c28x1a,_0x3c28x1b){_0x3c28x1b= _0x3c28x1b|| 204;return function(_0x3c28x1c){if(_0x3c28x1c){return _0x3c28x1a[_0xd135[26]](_0x3c28x1b)};return _0x3c28x1a[_0xd135[28]](_0x3c28x1b)[_0xd135[27]]()}}function respondWithResult(_0x3c28x1a,_0x3c28x1b){_0x3c28x1b= _0x3c28x1b|| 200;return function(_0x3c28x1c){if(_0x3c28x1c){return _0x3c28x1a[_0xd135[28]](_0x3c28x1b)[_0xd135[29]](_0x3c28x1c)}}}function respondWithFilteredResult(_0x3c28x1a,_0x3c28x1f){return function(_0x3c28x1c){if(_0x3c28x1c){var _0x3c28x20=_0x3c28x1c[_0xd135[30]],_0x3c28x21=_0x3c28x1f[_0xd135[31]],_0x3c28x22=_0x3c28x1f[_0xd135[31]]+ _0x3c28x1f[_0xd135[32]],_0x3c28x1b;if(_0x3c28x22>= _0x3c28x20){_0x3c28x22= _0x3c28x20;_0x3c28x1b= 200}else {_0x3c28x1b= 206};_0x3c28x1a[_0xd135[28]](_0x3c28x1b);return _0x3c28x1a[_0xd135[36]](_0xd135[33],_0x3c28x21+ _0xd135[34]+ _0x3c28x22+ _0xd135[35]+ _0x3c28x20)[_0xd135[29]](_0x3c28x1c)};return null}}function patchUpdates(_0x3c28x24){return function(_0x3c28x1c){try{jsonpatch[_0xd135[37]](_0x3c28x1c,_0x3c28x24,true)}catch(err){return BPromise[_0xd135[38]](err)};return _0x3c28x1c[_0xd135[39]]()}}function saveUpdates(_0x3c28x26,_0x3c28x1b){return function(_0x3c28x1c){if(_0x3c28x1c){return _0x3c28x1c[_0xd135[41]](_0x3c28x26)[_0xd135[40]](function(_0x3c28x27){return _0x3c28x27})};return null}}function removeEntity(_0x3c28x1a,_0x3c28x1b){return function(_0x3c28x1c){if(_0x3c28x1c){return _0x3c28x1c[_0xd135[42]]()[_0xd135[40]](function(){_0x3c28x1a[_0xd135[28]](204)[_0xd135[27]]()})}}}function handleEntityNotFound(_0x3c28x1a,_0x3c28x1b){return function(_0x3c28x1c){if(!_0x3c28x1c){_0x3c28x1a[_0xd135[26]](404)};return _0x3c28x1c}}function handleError(_0x3c28x1a,_0x3c28x1b){_0x3c28x1b= _0x3c28x1b|| 500;return function(_0x3c28x2b){logger[_0xd135[44]](_0x3c28x2b[_0xd135[43]]);if(_0x3c28x2b[_0xd135[45]]){delete _0x3c28x2b[_0xd135[45]]};_0x3c28x1a[_0xd135[28]](_0x3c28x1b)[_0xd135[46]](_0x3c28x2b)}}exports[_0xd135[47]]= function(_0x3c28x2c,_0x3c28x1a){var _0x3c28x1f={},_0x3c28x2d={},_0x3c28x2e={count:0,rows:[]};_0x3c28x2d[_0xd135[48]]= _[_0xd135[51]](db[_0xd135[50]][_0xd135[49]]);var _0x3c28x2f={dateStart:_0x3c28x2c[_0xd135[53]][_0xd135[52]],dateEnd:_0x3c28x2c[_0xd135[53]][_0xd135[54]]};delete _0x3c28x2c[_0xd135[53]][_0xd135[52]];delete _0x3c28x2c[_0xd135[53]][_0xd135[54]];_0x3c28x2d[_0xd135[53]]= _[_0xd135[51]](_0x3c28x2c[_0xd135[53]]);_0x3c28x2d[_0xd135[55]]= _[_0xd135[56]](_0x3c28x2d[_0xd135[48]],_0x3c28x2d[_0xd135[53]]);_0x3c28x1f[_0xd135[57]]= _[_0xd135[56]](_0x3c28x2d[_0xd135[48]],qs[_0xd135[58]](_0x3c28x2c[_0xd135[53]][_0xd135[58]]));_0x3c28x1f[_0xd135[57]]= (_0x3c28x1f[_0xd135[57]][_0xd135[59]])?_0x3c28x1f[_0xd135[57]]:_0x3c28x2d[_0xd135[48]];if(!_0x3c28x2c[_0xd135[53]][_0xd135[61]](_0xd135[60])){_0x3c28x1f[_0xd135[32]]= qs[_0xd135[32]](_0x3c28x2c[_0xd135[53]][_0xd135[32]]);_0x3c28x1f[_0xd135[31]]= qs[_0xd135[31]](_0x3c28x2c[_0xd135[53]][_0xd135[31]])};_0x3c28x1f[_0xd135[62]]= qs[_0xd135[63]](_0x3c28x2c[_0xd135[53]][_0xd135[63]]);_0x3c28x1f[_0xd135[64]]= qs[_0xd135[55]](_[_0xd135[65]](_0x3c28x2c[_0xd135[53]],_0x3c28x2d[_0xd135[55]]));if(_0x3c28x2f[_0xd135[52]]){if(_0x3c28x2f[_0xd135[54]]){_0x3c28x2f[_0xd135[54]]= moment(_0x3c28x2f[_0xd135[54]])[_0xd135[67]](1,_0xd135[66])}else {_0x3c28x2f[_0xd135[54]]= moment(_0x3c28x2f[_0xd135[52]])[_0xd135[67]](1,_0xd135[66])};_[_0xd135[68]](_0x3c28x1f[_0xd135[64]],{createdAt:{$gte:_0x3c28x2f[_0xd135[52]],$lte:_0x3c28x2f[_0xd135[54]]}})};if(_0x3c28x2c[_0xd135[53]][_0xd135[69]]){_0x3c28x1f[_0xd135[64]]= _[_0xd135[68]](_0x3c28x1f[_0xd135[64]],{$or:_[_0xd135[71]](_0x3c28x1f[_0xd135[57]],function(_0x3c28x30){var _0x3c28x2e={};_0x3c28x2e[_0x3c28x30]= {$like:_0xd135[70]+ _0x3c28x2c[_0xd135[53]][_0xd135[69]]+ _0xd135[70]};return _0x3c28x2e})})};_0x3c28x1f= _[_0xd135[68]]({},_0x3c28x1f,_0x3c28x2c[_0xd135[72]]);var _0x3c28x31={where:_0x3c28x1f[_0xd135[64]]};return db[_0xd135[50]][_0xd135[30]](_0x3c28x31)[_0xd135[40]](function(_0x3c28x20){_0x3c28x2e[_0xd135[30]]= _0x3c28x20;if(_0x3c28x2c[_0xd135[53]][_0xd135[75]]){_0x3c28x1f[_0xd135[76]]= [{all:true}]};return db[_0xd135[50]][_0xd135[77]](_0x3c28x1f)})[_0xd135[40]](function(_0x3c28x32){_0x3c28x2e[_0xd135[74]]= _0x3c28x32;return _0x3c28x2e})[_0xd135[40]](respondWithFilteredResult(_0x3c28x1a,_0x3c28x1f))[_0xd135[73]](handleError(_0x3c28x1a,null))};exports[_0xd135[78]]= function(_0x3c28x2c,_0x3c28x1a){var _0x3c28x1f={raw:true,where:{id:_0x3c28x2c[_0xd135[80]][_0xd135[79]]}},_0x3c28x2d={};_0x3c28x2d[_0xd135[48]]= _[_0xd135[51]](db[_0xd135[50]][_0xd135[49]]);_0x3c28x2d[_0xd135[53]]= _[_0xd135[51]](_0x3c28x2c[_0xd135[53]]);_0x3c28x2d[_0xd135[55]]= _[_0xd135[56]](_0x3c28x2d[_0xd135[48]],_0x3c28x2d[_0xd135[53]]);_0x3c28x1f[_0xd135[57]]= _[_0xd135[56]](_0x3c28x2d[_0xd135[48]],qs[_0xd135[58]](_0x3c28x2c[_0xd135[53]][_0xd135[58]]));_0x3c28x1f[_0xd135[57]]= (_0x3c28x1f[_0xd135[57]][_0xd135[59]])?_0x3c28x1f[_0xd135[57]]:_0x3c28x2d[_0xd135[48]];if(_0x3c28x2c[_0xd135[53]][_0xd135[75]]){_0x3c28x1f[_0xd135[76]]= [{all:true}]};_0x3c28x1f= _[_0xd135[68]]({},_0x3c28x1f,_0x3c28x2c[_0xd135[72]]);return db[_0xd135[50]][_0xd135[81]](_0x3c28x1f)[_0xd135[40]](handleEntityNotFound(_0x3c28x1a,null))[_0xd135[40]](respondWithResult(_0x3c28x1a,null))[_0xd135[73]](handleError(_0x3c28x1a,null))};exports[_0xd135[82]]= function(_0x3c28x2c,_0x3c28x1a){return db[_0xd135[50]][_0xd135[82]](_0x3c28x2c[_0xd135[83]],{})[_0xd135[40]](respondWithResult(_0x3c28x1a,201))[_0xd135[73]](handleError(_0x3c28x1a,null))};exports[_0xd135[41]]= function(_0x3c28x2c,_0x3c28x1a){if(_0x3c28x2c[_0xd135[83]][_0xd135[79]]){delete _0x3c28x2c[_0xd135[83]][_0xd135[79]]};return db[_0xd135[50]][_0xd135[81]]({where:{id:_0x3c28x2c[_0xd135[80]][_0xd135[79]]}})[_0xd135[40]](handleEntityNotFound(_0x3c28x1a,null))[_0xd135[40]](saveUpdates(_0x3c28x2c[_0xd135[83]],null))[_0xd135[40]](respondWithResult(_0x3c28x1a,null))[_0xd135[73]](handleError(_0x3c28x1a,null))};exports[_0xd135[42]]= function(_0x3c28x2c,_0x3c28x1a){return db[_0xd135[50]][_0xd135[81]]({where:{id:_0x3c28x2c[_0xd135[80]][_0xd135[79]]}})[_0xd135[40]](handleEntityNotFound(_0x3c28x1a,null))[_0xd135[40]](removeEntity(_0x3c28x1a,null))[_0xd135[73]](handleError(_0x3c28x1a,null))}
\ No newline at end of file
index c5fbf64..218dd30 100644 (file)
@@ -1 +1 @@
-var _0x124b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63","\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x5F\x6D\x65\x74\x72\x69\x63\x73","\x64\x65\x66\x69\x6E\x65"];_0x124b[0];var _=require(_0x124b[1]);var util=require(_0x124b[2]);var logger=require(_0x124b[4])(_0x124b[3]);var moment=require(_0x124b[5]);var BPromise=require(_0x124b[6]);var rp=require(_0x124b[7]);var attributes=require(_0x124b[8]);module[_0x124b[9]]= function(_0xddfex8,_0xddfex9){return _0xddfex8[_0x124b[12]](_0x124b[10],attributes,{tableName:_0x124b[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x5e23=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63","\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x5F\x6D\x65\x74\x72\x69\x63\x73","\x64\x65\x66\x69\x6E\x65"];_0x5e23[0];var _=require(_0x5e23[1]);var util=require(_0x5e23[2]);var logger=require(_0x5e23[4])(_0x5e23[3]);var moment=require(_0x5e23[5]);var BPromise=require(_0x5e23[6]);var rp=require(_0x5e23[7]);var attributes=require(_0x5e23[8]);module[_0x5e23[9]]= function(_0xefa8x8,_0xefa8x9){return _0xefa8x8[_0x5e23[12]](_0x5e23[10],attributes,{tableName:_0x5e23[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 719c6ce..9674a75 100644 (file)
@@ -1 +1 @@
-var _0xfc8b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x41\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x41\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xfc8b[0];var _=require(_0xfc8b[1]);var util=require(_0xfc8b[2]);var moment=require(_0xfc8b[3]);var BPromise=require(_0xfc8b[4]);var rs=require(_0xfc8b[5]);var fs=require(_0xfc8b[6]);var db=require(_0xfc8b[8])[_0xfc8b[7]];var utils=require(_0xfc8b[9]);var logger=require(_0xfc8b[11])(_0xfc8b[10]);var config=require(_0xfc8b[12]);var jayson=require(_0xfc8b[13]);var client=jayson[_0xfc8b[15]][_0xfc8b[14]]({port:9002});function respondWithRpcPromise(_0x9932xe,_0x9932xf,_0x9932x10){return  new BPromise(function(_0x9932x11,_0x9932x12){return client[_0xfc8b[28]](_0x9932xe,_0x9932x10)[_0xfc8b[27]](function(_0x9932x14){logger[_0xfc8b[20]](_0xfc8b[16],_0x9932xf,_0xfc8b[19]);logger[_0xfc8b[23]](_0xfc8b[21],_0x9932xf,_0xfc8b[19],JSON[_0xfc8b[22]](_0x9932x14));if(_0x9932x14[_0xfc8b[17]]){if(_0x9932x14[_0xfc8b[17]][_0xfc8b[24]]=== 500){logger[_0xfc8b[17]](_0xfc8b[16],_0x9932xf,_0x9932x14[_0xfc8b[17]][_0xfc8b[25]]);return _0x9932x12(_0x9932x14[_0xfc8b[17]][_0xfc8b[25]])};logger[_0xfc8b[17]](_0xfc8b[16],_0x9932xf,_0x9932x14[_0xfc8b[17]][_0xfc8b[25]]);return _0x9932x11(_0x9932x14[_0xfc8b[17]][_0xfc8b[25]])}else {logger[_0xfc8b[20]](_0xfc8b[16],_0x9932xf,_0xfc8b[19]);_0x9932x11(_0x9932x14[_0xfc8b[26]][_0xfc8b[25]])}})[_0xfc8b[18]](function(_0x9932x13){logger[_0xfc8b[17]](_0xfc8b[16],_0x9932xf,_0x9932x13);_0x9932x12(_0x9932x13)})})}
\ No newline at end of file
+var _0x725d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x41\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x41\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x725d[0];var _=require(_0x725d[1]);var util=require(_0x725d[2]);var moment=require(_0x725d[3]);var BPromise=require(_0x725d[4]);var rs=require(_0x725d[5]);var fs=require(_0x725d[6]);var db=require(_0x725d[8])[_0x725d[7]];var utils=require(_0x725d[9]);var logger=require(_0x725d[11])(_0x725d[10]);var config=require(_0x725d[12]);var jayson=require(_0x725d[13]);var client=jayson[_0x725d[15]][_0x725d[14]]({port:9002});function respondWithRpcPromise(_0xcfa7xe,_0xcfa7xf,_0xcfa7x10){return  new BPromise(function(_0xcfa7x11,_0xcfa7x12){return client[_0x725d[28]](_0xcfa7xe,_0xcfa7x10)[_0x725d[27]](function(_0xcfa7x14){logger[_0x725d[20]](_0x725d[16],_0xcfa7xf,_0x725d[19]);logger[_0x725d[23]](_0x725d[21],_0xcfa7xf,_0x725d[19],JSON[_0x725d[22]](_0xcfa7x14));if(_0xcfa7x14[_0x725d[17]]){if(_0xcfa7x14[_0x725d[17]][_0x725d[24]]=== 500){logger[_0x725d[17]](_0x725d[16],_0xcfa7xf,_0xcfa7x14[_0x725d[17]][_0x725d[25]]);return _0xcfa7x12(_0xcfa7x14[_0x725d[17]][_0x725d[25]])};logger[_0x725d[17]](_0x725d[16],_0xcfa7xf,_0xcfa7x14[_0x725d[17]][_0x725d[25]]);return _0xcfa7x11(_0xcfa7x14[_0x725d[17]][_0x725d[25]])}else {logger[_0x725d[20]](_0x725d[16],_0xcfa7xf,_0x725d[19]);_0xcfa7x11(_0xcfa7x14[_0x725d[26]][_0x725d[25]])}})[_0x725d[18]](function(_0xcfa7x13){logger[_0x725d[17]](_0x725d[16],_0xcfa7xf,_0xcfa7x13);_0xcfa7x12(_0xcfa7x13)})})}
\ No newline at end of file
index 19873be..af0bdce 100644 (file)
@@ -1 +1 @@
-var _0x7690=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x7690[0];var multer=require(_0x7690[1]);var util=require(_0x7690[2]);var path=require(_0x7690[3]);var express=require(_0x7690[4]);var router=express.Router();var auth=require(_0x7690[5]);var interaction=require(_0x7690[6]);var config=require(_0x7690[7]);var controller=require(_0x7690[8]);router[_0x7690[12]](_0x7690[9],auth[_0x7690[10]](),controller[_0x7690[11]]);router[_0x7690[12]](_0x7690[13],auth[_0x7690[10]](),controller[_0x7690[14]]);router[_0x7690[16]](_0x7690[9],auth[_0x7690[10]](),controller[_0x7690[15]]);router[_0x7690[18]](_0x7690[13],auth[_0x7690[10]](),controller[_0x7690[17]]);router[_0x7690[20]](_0x7690[13],auth[_0x7690[10]](),controller[_0x7690[19]]);module[_0x7690[21]]= router
\ No newline at end of file
+var _0x62c1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x62c1[0];var multer=require(_0x62c1[1]);var util=require(_0x62c1[2]);var path=require(_0x62c1[3]);var express=require(_0x62c1[4]);var router=express.Router();var auth=require(_0x62c1[5]);var interaction=require(_0x62c1[6]);var config=require(_0x62c1[7]);var controller=require(_0x62c1[8]);router[_0x62c1[12]](_0x62c1[9],auth[_0x62c1[10]](),controller[_0x62c1[11]]);router[_0x62c1[12]](_0x62c1[13],auth[_0x62c1[10]](),controller[_0x62c1[14]]);router[_0x62c1[16]](_0x62c1[9],auth[_0x62c1[10]](),controller[_0x62c1[15]]);router[_0x62c1[18]](_0x62c1[13],auth[_0x62c1[10]](),controller[_0x62c1[17]]);router[_0x62c1[20]](_0x62c1[13],auth[_0x62c1[10]](),controller[_0x62c1[19]]);module[_0x62c1[21]]= router
\ No newline at end of file
index 76ba9ac..f43e19a 100644 (file)
@@ -1 +1 @@
-var _0xd698=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x54\x45\x58\x54"];_0xd698[0];var Sequelize=require(_0xd698[1]);module[_0xd698[2]]= {tree:{type:Sequelize[_0xd698[3]],allowNull:false}}
\ No newline at end of file
+var _0xa494=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x54\x45\x58\x54"];_0xa494[0];var Sequelize=require(_0xa494[1]);module[_0xa494[2]]= {tree:{type:Sequelize[_0xa494[3]],allowNull:false}}
\ No newline at end of file
index a28bffc..f8a1f06 100644 (file)
@@ -1 +1 @@
-var _0x14c6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x54\x72\x65\x65\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x14c6[0];var jsonpatch=require(_0x14c6[1]);var rp=require(_0x14c6[2]);var moment=require(_0x14c6[3]);var BPromise=require(_0x14c6[4]);var Mustache=require(_0x14c6[5]);var util=require(_0x14c6[6]);var path=require(_0x14c6[7]);var sox=require(_0x14c6[8]);var csv=require(_0x14c6[9]);var ejs=require(_0x14c6[10]);var fs=require(_0x14c6[11]);var _=require(_0x14c6[12]);var squel=require(_0x14c6[13]);var crypto=require(_0x14c6[14]);var jsforce=require(_0x14c6[15]);var deskjs=require(_0x14c6[16]);var toCsv=require(_0x14c6[9]);var querystring=require(_0x14c6[17]);var Papa=require(_0x14c6[18]);var qs=require(_0x14c6[19]);var logger=require(_0x14c6[21])(_0x14c6[20]);var utils=require(_0x14c6[22]);var config=require(_0x14c6[23]);var db=require(_0x14c6[25])[_0x14c6[24]];function respondWithStatusCode(_0x7a3ex1a,_0x7a3ex1b){_0x7a3ex1b= _0x7a3ex1b|| 204;return function(_0x7a3ex1c){if(_0x7a3ex1c){return _0x7a3ex1a[_0x14c6[26]](_0x7a3ex1b)};return _0x7a3ex1a[_0x14c6[28]](_0x7a3ex1b)[_0x14c6[27]]()}}function respondWithResult(_0x7a3ex1a,_0x7a3ex1b){_0x7a3ex1b= _0x7a3ex1b|| 200;return function(_0x7a3ex1c){if(_0x7a3ex1c){return _0x7a3ex1a[_0x14c6[28]](_0x7a3ex1b)[_0x14c6[29]](_0x7a3ex1c)}}}function respondWithFilteredResult(_0x7a3ex1a,_0x7a3ex1f){return function(_0x7a3ex1c){if(_0x7a3ex1c){var _0x7a3ex20=_0x7a3ex1c[_0x14c6[30]],_0x7a3ex21=_0x7a3ex1f[_0x14c6[31]],_0x7a3ex22=_0x7a3ex1f[_0x14c6[31]]+ _0x7a3ex1f[_0x14c6[32]],_0x7a3ex1b;if(_0x7a3ex22>= _0x7a3ex20){_0x7a3ex22= _0x7a3ex20;_0x7a3ex1b= 200}else {_0x7a3ex1b= 206};_0x7a3ex1a[_0x14c6[28]](_0x7a3ex1b);return _0x7a3ex1a[_0x14c6[36]](_0x14c6[33],_0x7a3ex21+ _0x14c6[34]+ _0x7a3ex22+ _0x14c6[35]+ _0x7a3ex20)[_0x14c6[29]](_0x7a3ex1c)};return null}}function patchUpdates(_0x7a3ex24){return function(_0x7a3ex1c){try{jsonpatch[_0x14c6[37]](_0x7a3ex1c,_0x7a3ex24,true)}catch(err){return BPromise[_0x14c6[38]](err)};return _0x7a3ex1c[_0x14c6[39]]()}}function saveUpdates(_0x7a3ex26,_0x7a3ex1b){return function(_0x7a3ex1c){if(_0x7a3ex1c){return _0x7a3ex1c[_0x14c6[41]](_0x7a3ex26)[_0x14c6[40]](function(_0x7a3ex27){return _0x7a3ex27})};return null}}function removeEntity(_0x7a3ex1a,_0x7a3ex1b){return function(_0x7a3ex1c){if(_0x7a3ex1c){return _0x7a3ex1c[_0x14c6[42]]()[_0x14c6[40]](function(){_0x7a3ex1a[_0x14c6[28]](204)[_0x14c6[27]]()})}}}function handleEntityNotFound(_0x7a3ex1a,_0x7a3ex1b){return function(_0x7a3ex1c){if(!_0x7a3ex1c){_0x7a3ex1a[_0x14c6[26]](404)};return _0x7a3ex1c}}function handleError(_0x7a3ex1a,_0x7a3ex1b){_0x7a3ex1b= _0x7a3ex1b|| 500;return function(_0x7a3ex2b){logger[_0x14c6[44]](_0x7a3ex2b[_0x14c6[43]]);if(_0x7a3ex2b[_0x14c6[45]]){delete _0x7a3ex2b[_0x14c6[45]]};_0x7a3ex1a[_0x14c6[28]](_0x7a3ex1b)[_0x14c6[46]](_0x7a3ex2b)}}exports[_0x14c6[47]]= function(_0x7a3ex2c,_0x7a3ex1a){var _0x7a3ex1f={},_0x7a3ex2d={},_0x7a3ex2e={count:0,rows:[]};_0x7a3ex2d[_0x14c6[48]]= _[_0x14c6[51]](db[_0x14c6[50]][_0x14c6[49]]);var _0x7a3ex2f={dateStart:_0x7a3ex2c[_0x14c6[53]][_0x14c6[52]],dateEnd:_0x7a3ex2c[_0x14c6[53]][_0x14c6[54]]};delete _0x7a3ex2c[_0x14c6[53]][_0x14c6[52]];delete _0x7a3ex2c[_0x14c6[53]][_0x14c6[54]];_0x7a3ex2d[_0x14c6[53]]= _[_0x14c6[51]](_0x7a3ex2c[_0x14c6[53]]);_0x7a3ex2d[_0x14c6[55]]= _[_0x14c6[56]](_0x7a3ex2d[_0x14c6[48]],_0x7a3ex2d[_0x14c6[53]]);_0x7a3ex1f[_0x14c6[57]]= _[_0x14c6[56]](_0x7a3ex2d[_0x14c6[48]],qs[_0x14c6[58]](_0x7a3ex2c[_0x14c6[53]][_0x14c6[58]]));_0x7a3ex1f[_0x14c6[57]]= (_0x7a3ex1f[_0x14c6[57]][_0x14c6[59]])?_0x7a3ex1f[_0x14c6[57]]:_0x7a3ex2d[_0x14c6[48]];if(!_0x7a3ex2c[_0x14c6[53]][_0x14c6[61]](_0x14c6[60])){_0x7a3ex1f[_0x14c6[32]]= qs[_0x14c6[32]](_0x7a3ex2c[_0x14c6[53]][_0x14c6[32]]);_0x7a3ex1f[_0x14c6[31]]= qs[_0x14c6[31]](_0x7a3ex2c[_0x14c6[53]][_0x14c6[31]])};_0x7a3ex1f[_0x14c6[62]]= qs[_0x14c6[63]](_0x7a3ex2c[_0x14c6[53]][_0x14c6[63]]);_0x7a3ex1f[_0x14c6[64]]= qs[_0x14c6[55]](_[_0x14c6[65]](_0x7a3ex2c[_0x14c6[53]],_0x7a3ex2d[_0x14c6[55]]));if(_0x7a3ex2f[_0x14c6[52]]){if(_0x7a3ex2f[_0x14c6[54]]){_0x7a3ex2f[_0x14c6[54]]= moment(_0x7a3ex2f[_0x14c6[54]])[_0x14c6[67]](1,_0x14c6[66])}else {_0x7a3ex2f[_0x14c6[54]]= moment(_0x7a3ex2f[_0x14c6[52]])[_0x14c6[67]](1,_0x14c6[66])};_[_0x14c6[68]](_0x7a3ex1f[_0x14c6[64]],{createdAt:{$gte:_0x7a3ex2f[_0x14c6[52]],$lte:_0x7a3ex2f[_0x14c6[54]]}})};if(_0x7a3ex2c[_0x14c6[53]][_0x14c6[69]]){_0x7a3ex1f[_0x14c6[64]]= _[_0x14c6[68]](_0x7a3ex1f[_0x14c6[64]],{$or:_[_0x14c6[71]](_0x7a3ex1f[_0x14c6[57]],function(_0x7a3ex30){var _0x7a3ex2e={};_0x7a3ex2e[_0x7a3ex30]= {$like:_0x14c6[70]+ _0x7a3ex2c[_0x14c6[53]][_0x14c6[69]]+ _0x14c6[70]};return _0x7a3ex2e})})};_0x7a3ex1f= _[_0x14c6[68]]({},_0x7a3ex1f,_0x7a3ex2c[_0x14c6[72]]);var _0x7a3ex31={where:_0x7a3ex1f[_0x14c6[64]]};return db[_0x14c6[50]][_0x14c6[30]](_0x7a3ex31)[_0x14c6[40]](function(_0x7a3ex20){_0x7a3ex2e[_0x14c6[30]]= _0x7a3ex20;if(_0x7a3ex2c[_0x14c6[53]][_0x14c6[75]]){_0x7a3ex1f[_0x14c6[76]]= [{all:true}]};return db[_0x14c6[50]][_0x14c6[77]](_0x7a3ex1f)})[_0x14c6[40]](function(_0x7a3ex32){_0x7a3ex2e[_0x14c6[74]]= _0x7a3ex32;return _0x7a3ex2e})[_0x14c6[40]](respondWithFilteredResult(_0x7a3ex1a,_0x7a3ex1f))[_0x14c6[73]](handleError(_0x7a3ex1a,null))};exports[_0x14c6[78]]= function(_0x7a3ex2c,_0x7a3ex1a){var _0x7a3ex1f={raw:true,where:{id:_0x7a3ex2c[_0x14c6[80]][_0x14c6[79]]}},_0x7a3ex2d={};_0x7a3ex2d[_0x14c6[48]]= _[_0x14c6[51]](db[_0x14c6[50]][_0x14c6[49]]);_0x7a3ex2d[_0x14c6[53]]= _[_0x14c6[51]](_0x7a3ex2c[_0x14c6[53]]);_0x7a3ex2d[_0x14c6[55]]= _[_0x14c6[56]](_0x7a3ex2d[_0x14c6[48]],_0x7a3ex2d[_0x14c6[53]]);_0x7a3ex1f[_0x14c6[57]]= _[_0x14c6[56]](_0x7a3ex2d[_0x14c6[48]],qs[_0x14c6[58]](_0x7a3ex2c[_0x14c6[53]][_0x14c6[58]]));_0x7a3ex1f[_0x14c6[57]]= (_0x7a3ex1f[_0x14c6[57]][_0x14c6[59]])?_0x7a3ex1f[_0x14c6[57]]:_0x7a3ex2d[_0x14c6[48]];if(_0x7a3ex2c[_0x14c6[53]][_0x14c6[75]]){_0x7a3ex1f[_0x14c6[76]]= [{all:true}]};_0x7a3ex1f= _[_0x14c6[68]]({},_0x7a3ex1f,_0x7a3ex2c[_0x14c6[72]]);return db[_0x14c6[50]][_0x14c6[81]](_0x7a3ex1f)[_0x14c6[40]](handleEntityNotFound(_0x7a3ex1a,null))[_0x14c6[40]](respondWithResult(_0x7a3ex1a,null))[_0x14c6[73]](handleError(_0x7a3ex1a,null))};exports[_0x14c6[82]]= function(_0x7a3ex2c,_0x7a3ex1a){return db[_0x14c6[50]][_0x14c6[82]](_0x7a3ex2c[_0x14c6[83]],{})[_0x14c6[40]](respondWithResult(_0x7a3ex1a,201))[_0x14c6[73]](handleError(_0x7a3ex1a,null))};exports[_0x14c6[41]]= function(_0x7a3ex2c,_0x7a3ex1a){if(_0x7a3ex2c[_0x14c6[83]][_0x14c6[79]]){delete _0x7a3ex2c[_0x14c6[83]][_0x14c6[79]]};return db[_0x14c6[50]][_0x14c6[81]]({where:{id:_0x7a3ex2c[_0x14c6[80]][_0x14c6[79]]}})[_0x14c6[40]](handleEntityNotFound(_0x7a3ex1a,null))[_0x14c6[40]](saveUpdates(_0x7a3ex2c[_0x14c6[83]],null))[_0x14c6[40]](respondWithResult(_0x7a3ex1a,null))[_0x14c6[73]](handleError(_0x7a3ex1a,null))};exports[_0x14c6[42]]= function(_0x7a3ex2c,_0x7a3ex1a){return db[_0x14c6[50]][_0x14c6[81]]({where:{id:_0x7a3ex2c[_0x14c6[80]][_0x14c6[79]]}})[_0x14c6[40]](handleEntityNotFound(_0x7a3ex1a,null))[_0x14c6[40]](removeEntity(_0x7a3ex1a,null))[_0x14c6[73]](handleError(_0x7a3ex1a,null))}
\ No newline at end of file
+var _0xd2fc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x54\x72\x65\x65\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xd2fc[0];var jsonpatch=require(_0xd2fc[1]);var rp=require(_0xd2fc[2]);var moment=require(_0xd2fc[3]);var BPromise=require(_0xd2fc[4]);var Mustache=require(_0xd2fc[5]);var util=require(_0xd2fc[6]);var path=require(_0xd2fc[7]);var sox=require(_0xd2fc[8]);var csv=require(_0xd2fc[9]);var ejs=require(_0xd2fc[10]);var fs=require(_0xd2fc[11]);var _=require(_0xd2fc[12]);var squel=require(_0xd2fc[13]);var crypto=require(_0xd2fc[14]);var jsforce=require(_0xd2fc[15]);var deskjs=require(_0xd2fc[16]);var toCsv=require(_0xd2fc[9]);var querystring=require(_0xd2fc[17]);var Papa=require(_0xd2fc[18]);var qs=require(_0xd2fc[19]);var logger=require(_0xd2fc[21])(_0xd2fc[20]);var utils=require(_0xd2fc[22]);var config=require(_0xd2fc[23]);var db=require(_0xd2fc[25])[_0xd2fc[24]];function respondWithStatusCode(_0x8281x1a,_0x8281x1b){_0x8281x1b= _0x8281x1b|| 204;return function(_0x8281x1c){if(_0x8281x1c){return _0x8281x1a[_0xd2fc[26]](_0x8281x1b)};return _0x8281x1a[_0xd2fc[28]](_0x8281x1b)[_0xd2fc[27]]()}}function respondWithResult(_0x8281x1a,_0x8281x1b){_0x8281x1b= _0x8281x1b|| 200;return function(_0x8281x1c){if(_0x8281x1c){return _0x8281x1a[_0xd2fc[28]](_0x8281x1b)[_0xd2fc[29]](_0x8281x1c)}}}function respondWithFilteredResult(_0x8281x1a,_0x8281x1f){return function(_0x8281x1c){if(_0x8281x1c){var _0x8281x20=_0x8281x1c[_0xd2fc[30]],_0x8281x21=_0x8281x1f[_0xd2fc[31]],_0x8281x22=_0x8281x1f[_0xd2fc[31]]+ _0x8281x1f[_0xd2fc[32]],_0x8281x1b;if(_0x8281x22>= _0x8281x20){_0x8281x22= _0x8281x20;_0x8281x1b= 200}else {_0x8281x1b= 206};_0x8281x1a[_0xd2fc[28]](_0x8281x1b);return _0x8281x1a[_0xd2fc[36]](_0xd2fc[33],_0x8281x21+ _0xd2fc[34]+ _0x8281x22+ _0xd2fc[35]+ _0x8281x20)[_0xd2fc[29]](_0x8281x1c)};return null}}function patchUpdates(_0x8281x24){return function(_0x8281x1c){try{jsonpatch[_0xd2fc[37]](_0x8281x1c,_0x8281x24,true)}catch(err){return BPromise[_0xd2fc[38]](err)};return _0x8281x1c[_0xd2fc[39]]()}}function saveUpdates(_0x8281x26,_0x8281x1b){return function(_0x8281x1c){if(_0x8281x1c){return _0x8281x1c[_0xd2fc[41]](_0x8281x26)[_0xd2fc[40]](function(_0x8281x27){return _0x8281x27})};return null}}function removeEntity(_0x8281x1a,_0x8281x1b){return function(_0x8281x1c){if(_0x8281x1c){return _0x8281x1c[_0xd2fc[42]]()[_0xd2fc[40]](function(){_0x8281x1a[_0xd2fc[28]](204)[_0xd2fc[27]]()})}}}function handleEntityNotFound(_0x8281x1a,_0x8281x1b){return function(_0x8281x1c){if(!_0x8281x1c){_0x8281x1a[_0xd2fc[26]](404)};return _0x8281x1c}}function handleError(_0x8281x1a,_0x8281x1b){_0x8281x1b= _0x8281x1b|| 500;return function(_0x8281x2b){logger[_0xd2fc[44]](_0x8281x2b[_0xd2fc[43]]);if(_0x8281x2b[_0xd2fc[45]]){delete _0x8281x2b[_0xd2fc[45]]};_0x8281x1a[_0xd2fc[28]](_0x8281x1b)[_0xd2fc[46]](_0x8281x2b)}}exports[_0xd2fc[47]]= function(_0x8281x2c,_0x8281x1a){var _0x8281x1f={},_0x8281x2d={},_0x8281x2e={count:0,rows:[]};_0x8281x2d[_0xd2fc[48]]= _[_0xd2fc[51]](db[_0xd2fc[50]][_0xd2fc[49]]);var _0x8281x2f={dateStart:_0x8281x2c[_0xd2fc[53]][_0xd2fc[52]],dateEnd:_0x8281x2c[_0xd2fc[53]][_0xd2fc[54]]};delete _0x8281x2c[_0xd2fc[53]][_0xd2fc[52]];delete _0x8281x2c[_0xd2fc[53]][_0xd2fc[54]];_0x8281x2d[_0xd2fc[53]]= _[_0xd2fc[51]](_0x8281x2c[_0xd2fc[53]]);_0x8281x2d[_0xd2fc[55]]= _[_0xd2fc[56]](_0x8281x2d[_0xd2fc[48]],_0x8281x2d[_0xd2fc[53]]);_0x8281x1f[_0xd2fc[57]]= _[_0xd2fc[56]](_0x8281x2d[_0xd2fc[48]],qs[_0xd2fc[58]](_0x8281x2c[_0xd2fc[53]][_0xd2fc[58]]));_0x8281x1f[_0xd2fc[57]]= (_0x8281x1f[_0xd2fc[57]][_0xd2fc[59]])?_0x8281x1f[_0xd2fc[57]]:_0x8281x2d[_0xd2fc[48]];if(!_0x8281x2c[_0xd2fc[53]][_0xd2fc[61]](_0xd2fc[60])){_0x8281x1f[_0xd2fc[32]]= qs[_0xd2fc[32]](_0x8281x2c[_0xd2fc[53]][_0xd2fc[32]]);_0x8281x1f[_0xd2fc[31]]= qs[_0xd2fc[31]](_0x8281x2c[_0xd2fc[53]][_0xd2fc[31]])};_0x8281x1f[_0xd2fc[62]]= qs[_0xd2fc[63]](_0x8281x2c[_0xd2fc[53]][_0xd2fc[63]]);_0x8281x1f[_0xd2fc[64]]= qs[_0xd2fc[55]](_[_0xd2fc[65]](_0x8281x2c[_0xd2fc[53]],_0x8281x2d[_0xd2fc[55]]));if(_0x8281x2f[_0xd2fc[52]]){if(_0x8281x2f[_0xd2fc[54]]){_0x8281x2f[_0xd2fc[54]]= moment(_0x8281x2f[_0xd2fc[54]])[_0xd2fc[67]](1,_0xd2fc[66])}else {_0x8281x2f[_0xd2fc[54]]= moment(_0x8281x2f[_0xd2fc[52]])[_0xd2fc[67]](1,_0xd2fc[66])};_[_0xd2fc[68]](_0x8281x1f[_0xd2fc[64]],{createdAt:{$gte:_0x8281x2f[_0xd2fc[52]],$lte:_0x8281x2f[_0xd2fc[54]]}})};if(_0x8281x2c[_0xd2fc[53]][_0xd2fc[69]]){_0x8281x1f[_0xd2fc[64]]= _[_0xd2fc[68]](_0x8281x1f[_0xd2fc[64]],{$or:_[_0xd2fc[71]](_0x8281x1f[_0xd2fc[57]],function(_0x8281x30){var _0x8281x2e={};_0x8281x2e[_0x8281x30]= {$like:_0xd2fc[70]+ _0x8281x2c[_0xd2fc[53]][_0xd2fc[69]]+ _0xd2fc[70]};return _0x8281x2e})})};_0x8281x1f= _[_0xd2fc[68]]({},_0x8281x1f,_0x8281x2c[_0xd2fc[72]]);var _0x8281x31={where:_0x8281x1f[_0xd2fc[64]]};return db[_0xd2fc[50]][_0xd2fc[30]](_0x8281x31)[_0xd2fc[40]](function(_0x8281x20){_0x8281x2e[_0xd2fc[30]]= _0x8281x20;if(_0x8281x2c[_0xd2fc[53]][_0xd2fc[75]]){_0x8281x1f[_0xd2fc[76]]= [{all:true}]};return db[_0xd2fc[50]][_0xd2fc[77]](_0x8281x1f)})[_0xd2fc[40]](function(_0x8281x32){_0x8281x2e[_0xd2fc[74]]= _0x8281x32;return _0x8281x2e})[_0xd2fc[40]](respondWithFilteredResult(_0x8281x1a,_0x8281x1f))[_0xd2fc[73]](handleError(_0x8281x1a,null))};exports[_0xd2fc[78]]= function(_0x8281x2c,_0x8281x1a){var _0x8281x1f={raw:true,where:{id:_0x8281x2c[_0xd2fc[80]][_0xd2fc[79]]}},_0x8281x2d={};_0x8281x2d[_0xd2fc[48]]= _[_0xd2fc[51]](db[_0xd2fc[50]][_0xd2fc[49]]);_0x8281x2d[_0xd2fc[53]]= _[_0xd2fc[51]](_0x8281x2c[_0xd2fc[53]]);_0x8281x2d[_0xd2fc[55]]= _[_0xd2fc[56]](_0x8281x2d[_0xd2fc[48]],_0x8281x2d[_0xd2fc[53]]);_0x8281x1f[_0xd2fc[57]]= _[_0xd2fc[56]](_0x8281x2d[_0xd2fc[48]],qs[_0xd2fc[58]](_0x8281x2c[_0xd2fc[53]][_0xd2fc[58]]));_0x8281x1f[_0xd2fc[57]]= (_0x8281x1f[_0xd2fc[57]][_0xd2fc[59]])?_0x8281x1f[_0xd2fc[57]]:_0x8281x2d[_0xd2fc[48]];if(_0x8281x2c[_0xd2fc[53]][_0xd2fc[75]]){_0x8281x1f[_0xd2fc[76]]= [{all:true}]};_0x8281x1f= _[_0xd2fc[68]]({},_0x8281x1f,_0x8281x2c[_0xd2fc[72]]);return db[_0xd2fc[50]][_0xd2fc[81]](_0x8281x1f)[_0xd2fc[40]](handleEntityNotFound(_0x8281x1a,null))[_0xd2fc[40]](respondWithResult(_0x8281x1a,null))[_0xd2fc[73]](handleError(_0x8281x1a,null))};exports[_0xd2fc[82]]= function(_0x8281x2c,_0x8281x1a){return db[_0xd2fc[50]][_0xd2fc[82]](_0x8281x2c[_0xd2fc[83]],{})[_0xd2fc[40]](respondWithResult(_0x8281x1a,201))[_0xd2fc[73]](handleError(_0x8281x1a,null))};exports[_0xd2fc[41]]= function(_0x8281x2c,_0x8281x1a){if(_0x8281x2c[_0xd2fc[83]][_0xd2fc[79]]){delete _0x8281x2c[_0xd2fc[83]][_0xd2fc[79]]};return db[_0xd2fc[50]][_0xd2fc[81]]({where:{id:_0x8281x2c[_0xd2fc[80]][_0xd2fc[79]]}})[_0xd2fc[40]](handleEntityNotFound(_0x8281x1a,null))[_0xd2fc[40]](saveUpdates(_0x8281x2c[_0xd2fc[83]],null))[_0xd2fc[40]](respondWithResult(_0x8281x1a,null))[_0xd2fc[73]](handleError(_0x8281x1a,null))};exports[_0xd2fc[42]]= function(_0x8281x2c,_0x8281x1a){return db[_0xd2fc[50]][_0xd2fc[81]]({where:{id:_0x8281x2c[_0xd2fc[80]][_0xd2fc[79]]}})[_0xd2fc[40]](handleEntityNotFound(_0x8281x1a,null))[_0xd2fc[40]](removeEntity(_0x8281x1a,null))[_0xd2fc[73]](handleError(_0x8281x1a,null))}
\ No newline at end of file
index 96b2f24..226d790 100644 (file)
@@ -1 +1 @@
-var _0xa5de=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x54\x72\x65\x65\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x54\x72\x65\x65\x52\x65\x70\x6F\x72\x74","\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x5F\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0xa5de[0];var _=require(_0xa5de[1]);var util=require(_0xa5de[2]);var logger=require(_0xa5de[4])(_0xa5de[3]);var moment=require(_0xa5de[5]);var BPromise=require(_0xa5de[6]);var rp=require(_0xa5de[7]);var attributes=require(_0xa5de[8]);module[_0xa5de[9]]= function(_0xb93bx8,_0xb93bx9){return _0xb93bx8[_0xa5de[12]](_0xa5de[10],attributes,{tableName:_0xa5de[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xe107=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x54\x72\x65\x65\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x6E\x61\x6C\x79\x74\x69\x63\x54\x72\x65\x65\x52\x65\x70\x6F\x72\x74","\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x5F\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0xe107[0];var _=require(_0xe107[1]);var util=require(_0xe107[2]);var logger=require(_0xe107[4])(_0xe107[3]);var moment=require(_0xe107[5]);var BPromise=require(_0xe107[6]);var rp=require(_0xe107[7]);var attributes=require(_0xe107[8]);module[_0xe107[9]]= function(_0x32c6x8,_0x32c6x9){return _0x32c6x8[_0xe107[12]](_0xe107[10],attributes,{tableName:_0xe107[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 2c98819..ae95636 100644 (file)
@@ -1 +1 @@
-var _0x88ab=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x41\x6E\x61\x6C\x79\x74\x69\x63\x54\x72\x65\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x41\x6E\x61\x6C\x79\x74\x69\x63\x54\x72\x65\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x88ab[0];var _=require(_0x88ab[1]);var util=require(_0x88ab[2]);var moment=require(_0x88ab[3]);var BPromise=require(_0x88ab[4]);var rs=require(_0x88ab[5]);var fs=require(_0x88ab[6]);var db=require(_0x88ab[8])[_0x88ab[7]];var utils=require(_0x88ab[9]);var logger=require(_0x88ab[11])(_0x88ab[10]);var config=require(_0x88ab[12]);var jayson=require(_0x88ab[13]);var client=jayson[_0x88ab[15]][_0x88ab[14]]({port:9002});function respondWithRpcPromise(_0x9f20xe,_0x9f20xf,_0x9f20x10){return  new BPromise(function(_0x9f20x11,_0x9f20x12){return client[_0x88ab[28]](_0x9f20xe,_0x9f20x10)[_0x88ab[27]](function(_0x9f20x14){logger[_0x88ab[20]](_0x88ab[16],_0x9f20xf,_0x88ab[19]);logger[_0x88ab[23]](_0x88ab[21],_0x9f20xf,_0x88ab[19],JSON[_0x88ab[22]](_0x9f20x14));if(_0x9f20x14[_0x88ab[17]]){if(_0x9f20x14[_0x88ab[17]][_0x88ab[24]]=== 500){logger[_0x88ab[17]](_0x88ab[16],_0x9f20xf,_0x9f20x14[_0x88ab[17]][_0x88ab[25]]);return _0x9f20x12(_0x9f20x14[_0x88ab[17]][_0x88ab[25]])};logger[_0x88ab[17]](_0x88ab[16],_0x9f20xf,_0x9f20x14[_0x88ab[17]][_0x88ab[25]]);return _0x9f20x11(_0x9f20x14[_0x88ab[17]][_0x88ab[25]])}else {logger[_0x88ab[20]](_0x88ab[16],_0x9f20xf,_0x88ab[19]);_0x9f20x11(_0x9f20x14[_0x88ab[26]][_0x88ab[25]])}})[_0x88ab[18]](function(_0x9f20x13){logger[_0x88ab[17]](_0x88ab[16],_0x9f20xf,_0x9f20x13);_0x9f20x12(_0x9f20x13)})})}
\ No newline at end of file
+var _0x470a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x41\x6E\x61\x6C\x79\x74\x69\x63\x54\x72\x65\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x41\x6E\x61\x6C\x79\x74\x69\x63\x54\x72\x65\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x470a[0];var _=require(_0x470a[1]);var util=require(_0x470a[2]);var moment=require(_0x470a[3]);var BPromise=require(_0x470a[4]);var rs=require(_0x470a[5]);var fs=require(_0x470a[6]);var db=require(_0x470a[8])[_0x470a[7]];var utils=require(_0x470a[9]);var logger=require(_0x470a[11])(_0x470a[10]);var config=require(_0x470a[12]);var jayson=require(_0x470a[13]);var client=jayson[_0x470a[15]][_0x470a[14]]({port:9002});function respondWithRpcPromise(_0x6318xe,_0x6318xf,_0x6318x10){return  new BPromise(function(_0x6318x11,_0x6318x12){return client[_0x470a[28]](_0x6318xe,_0x6318x10)[_0x470a[27]](function(_0x6318x14){logger[_0x470a[20]](_0x470a[16],_0x6318xf,_0x470a[19]);logger[_0x470a[23]](_0x470a[21],_0x6318xf,_0x470a[19],JSON[_0x470a[22]](_0x6318x14));if(_0x6318x14[_0x470a[17]]){if(_0x6318x14[_0x470a[17]][_0x470a[24]]=== 500){logger[_0x470a[17]](_0x470a[16],_0x6318xf,_0x6318x14[_0x470a[17]][_0x470a[25]]);return _0x6318x12(_0x6318x14[_0x470a[17]][_0x470a[25]])};logger[_0x470a[17]](_0x470a[16],_0x6318xf,_0x6318x14[_0x470a[17]][_0x470a[25]]);return _0x6318x11(_0x6318x14[_0x470a[17]][_0x470a[25]])}else {logger[_0x470a[20]](_0x470a[16],_0x6318xf,_0x470a[19]);_0x6318x11(_0x6318x14[_0x470a[26]][_0x470a[25]])}})[_0x470a[18]](function(_0x6318x13){logger[_0x470a[17]](_0x470a[16],_0x6318xf,_0x6318x13);_0x6318x12(_0x6318x13)})})}
\ No newline at end of file
index c8482a5..4873d92 100644 (file)
@@ -1 +1 @@
-var _0x9df8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x54\x72\x65\x65\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9df8[0];var multer=require(_0x9df8[1]);var util=require(_0x9df8[2]);var path=require(_0x9df8[3]);var express=require(_0x9df8[4]);var router=express.Router();var auth=require(_0x9df8[5]);var interaction=require(_0x9df8[6]);var config=require(_0x9df8[7]);var controller=require(_0x9df8[8]);router[_0x9df8[12]](_0x9df8[9],auth[_0x9df8[10]](),controller[_0x9df8[11]]);router[_0x9df8[12]](_0x9df8[13],auth[_0x9df8[10]](),controller[_0x9df8[14]]);router[_0x9df8[16]](_0x9df8[9],auth[_0x9df8[10]](),controller[_0x9df8[15]]);router[_0x9df8[18]](_0x9df8[13],auth[_0x9df8[10]](),controller[_0x9df8[17]]);router[_0x9df8[20]](_0x9df8[13],auth[_0x9df8[10]](),controller[_0x9df8[19]]);module[_0x9df8[21]]= router
\ No newline at end of file
+var _0xc216=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x54\x72\x65\x65\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc216[0];var multer=require(_0xc216[1]);var util=require(_0xc216[2]);var path=require(_0xc216[3]);var express=require(_0xc216[4]);var router=express.Router();var auth=require(_0xc216[5]);var interaction=require(_0xc216[6]);var config=require(_0xc216[7]);var controller=require(_0xc216[8]);router[_0xc216[12]](_0xc216[9],auth[_0xc216[10]](),controller[_0xc216[11]]);router[_0xc216[12]](_0xc216[13],auth[_0xc216[10]](),controller[_0xc216[14]]);router[_0xc216[16]](_0xc216[9],auth[_0xc216[10]](),controller[_0xc216[15]]);router[_0xc216[18]](_0xc216[13],auth[_0xc216[10]](),controller[_0xc216[17]]);router[_0xc216[20]](_0xc216[13],auth[_0xc216[10]](),controller[_0xc216[19]]);module[_0xc216[21]]= router
\ No newline at end of file
index 4e7a390..75df66b 100644 (file)
@@ -1 +1 @@
-var _0xb51e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0xb51e[0];var Sequelize=require(_0xb51e[1]);module[_0xb51e[2]]= {name:{type:Sequelize[_0xb51e[3]]},basename:{type:Sequelize[_0xb51e[3]]},type:{type:Sequelize[_0xb51e[3]]}}
\ No newline at end of file
+var _0x8f36=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0x8f36[0];var Sequelize=require(_0x8f36[1]);module[_0x8f36[2]]= {name:{type:Sequelize[_0x8f36[3]]},basename:{type:Sequelize[_0x8f36[3]]},type:{type:Sequelize[_0x8f36[3]]}}
\ No newline at end of file
index 6e0c144..8df9502 100644 (file)
@@ -1 +1 @@
-var _0x8731=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x6E\x61\x6D\x65","\x66\x69\x6C\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x74\x79\x70\x65","\x6D\x69\x6D\x65\x74\x79\x70\x65","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73\x2F","\x6A\x6F\x69\x6E","\x66\x69\x6E\x64\x4F\x6E\x65"];_0x8731[0];var jsonpatch=require(_0x8731[1]);var rp=require(_0x8731[2]);var moment=require(_0x8731[3]);var BPromise=require(_0x8731[4]);var Mustache=require(_0x8731[5]);var util=require(_0x8731[6]);var path=require(_0x8731[7]);var sox=require(_0x8731[8]);var csv=require(_0x8731[9]);var ejs=require(_0x8731[10]);var fs=require(_0x8731[11]);var _=require(_0x8731[12]);var squel=require(_0x8731[13]);var crypto=require(_0x8731[14]);var jsforce=require(_0x8731[15]);var deskjs=require(_0x8731[16]);var toCsv=require(_0x8731[9]);var querystring=require(_0x8731[17]);var Papa=require(_0x8731[18]);var qs=require(_0x8731[19]);var logger=require(_0x8731[21])(_0x8731[20]);var utils=require(_0x8731[22]);var config=require(_0x8731[23]);var db=require(_0x8731[25])[_0x8731[24]];function respondWithStatusCode(_0xb64fx1a,_0xb64fx1b){_0xb64fx1b= _0xb64fx1b|| 204;return function(_0xb64fx1c){if(_0xb64fx1c){return _0xb64fx1a[_0x8731[26]](_0xb64fx1b)};return _0xb64fx1a[_0x8731[28]](_0xb64fx1b)[_0x8731[27]]()}}function respondWithResult(_0xb64fx1a,_0xb64fx1b){_0xb64fx1b= _0xb64fx1b|| 200;return function(_0xb64fx1c){if(_0xb64fx1c){return _0xb64fx1a[_0x8731[28]](_0xb64fx1b)[_0x8731[29]](_0xb64fx1c)}}}function respondWithFilteredResult(_0xb64fx1a,_0xb64fx1f){return function(_0xb64fx1c){if(_0xb64fx1c){var _0xb64fx20=_0xb64fx1c[_0x8731[30]],_0xb64fx21=_0xb64fx1f[_0x8731[31]],_0xb64fx22=_0xb64fx1f[_0x8731[31]]+ _0xb64fx1f[_0x8731[32]],_0xb64fx1b;if(_0xb64fx22>= _0xb64fx20){_0xb64fx22= _0xb64fx20;_0xb64fx1b= 200}else {_0xb64fx1b= 206};_0xb64fx1a[_0x8731[28]](_0xb64fx1b);return _0xb64fx1a[_0x8731[36]](_0x8731[33],_0xb64fx21+ _0x8731[34]+ _0xb64fx22+ _0x8731[35]+ _0xb64fx20)[_0x8731[29]](_0xb64fx1c)};return null}}function patchUpdates(_0xb64fx24){return function(_0xb64fx1c){try{jsonpatch[_0x8731[37]](_0xb64fx1c,_0xb64fx24,true)}catch(err){return BPromise[_0x8731[38]](err)};return _0xb64fx1c[_0x8731[39]]()}}function saveUpdates(_0xb64fx26,_0xb64fx1b){return function(_0xb64fx1c){if(_0xb64fx1c){return _0xb64fx1c[_0x8731[41]](_0xb64fx26)[_0x8731[40]](function(_0xb64fx27){return _0xb64fx27})};return null}}function removeEntity(_0xb64fx1a,_0xb64fx1b){return function(_0xb64fx1c){if(_0xb64fx1c){return _0xb64fx1c[_0x8731[42]]()[_0x8731[40]](function(){_0xb64fx1a[_0x8731[28]](204)[_0x8731[27]]()})}}}function handleEntityNotFound(_0xb64fx1a,_0xb64fx1b){return function(_0xb64fx1c){if(!_0xb64fx1c){_0xb64fx1a[_0x8731[26]](404)};return _0xb64fx1c}}function handleError(_0xb64fx1a,_0xb64fx1b){_0xb64fx1b= _0xb64fx1b|| 500;return function(_0xb64fx2b){logger[_0x8731[44]](_0xb64fx2b[_0x8731[43]]);if(_0xb64fx2b[_0x8731[45]]){delete _0xb64fx2b[_0x8731[45]]};_0xb64fx1a[_0x8731[28]](_0xb64fx1b)[_0x8731[46]](_0xb64fx2b)}}exports[_0x8731[47]]= function(_0xb64fx2c,_0xb64fx1a){var _0xb64fx1f={},_0xb64fx2d={},_0xb64fx2e={count:0,rows:[]};_0xb64fx2d[_0x8731[48]]= _[_0x8731[51]](db[_0x8731[50]][_0x8731[49]]);var _0xb64fx2f={dateStart:_0xb64fx2c[_0x8731[53]][_0x8731[52]],dateEnd:_0xb64fx2c[_0x8731[53]][_0x8731[54]]};delete _0xb64fx2c[_0x8731[53]][_0x8731[52]];delete _0xb64fx2c[_0x8731[53]][_0x8731[54]];_0xb64fx2d[_0x8731[53]]= _[_0x8731[51]](_0xb64fx2c[_0x8731[53]]);_0xb64fx2d[_0x8731[55]]= _[_0x8731[56]](_0xb64fx2d[_0x8731[48]],_0xb64fx2d[_0x8731[53]]);_0xb64fx1f[_0x8731[57]]= _[_0x8731[56]](_0xb64fx2d[_0x8731[48]],qs[_0x8731[58]](_0xb64fx2c[_0x8731[53]][_0x8731[58]]));_0xb64fx1f[_0x8731[57]]= (_0xb64fx1f[_0x8731[57]][_0x8731[59]])?_0xb64fx1f[_0x8731[57]]:_0xb64fx2d[_0x8731[48]];if(!_0xb64fx2c[_0x8731[53]][_0x8731[61]](_0x8731[60])){_0xb64fx1f[_0x8731[32]]= qs[_0x8731[32]](_0xb64fx2c[_0x8731[53]][_0x8731[32]]);_0xb64fx1f[_0x8731[31]]= qs[_0x8731[31]](_0xb64fx2c[_0x8731[53]][_0x8731[31]])};_0xb64fx1f[_0x8731[62]]= qs[_0x8731[63]](_0xb64fx2c[_0x8731[53]][_0x8731[63]]);_0xb64fx1f[_0x8731[64]]= qs[_0x8731[55]](_[_0x8731[65]](_0xb64fx2c[_0x8731[53]],_0xb64fx2d[_0x8731[55]]));if(_0xb64fx2f[_0x8731[52]]){if(_0xb64fx2f[_0x8731[54]]){_0xb64fx2f[_0x8731[54]]= moment(_0xb64fx2f[_0x8731[54]])[_0x8731[67]](1,_0x8731[66])}else {_0xb64fx2f[_0x8731[54]]= moment(_0xb64fx2f[_0x8731[52]])[_0x8731[67]](1,_0x8731[66])};_[_0x8731[68]](_0xb64fx1f[_0x8731[64]],{createdAt:{$gte:_0xb64fx2f[_0x8731[52]],$lte:_0xb64fx2f[_0x8731[54]]}})};if(_0xb64fx2c[_0x8731[53]][_0x8731[69]]){_0xb64fx1f[_0x8731[64]]= _[_0x8731[68]](_0xb64fx1f[_0x8731[64]],{$or:_[_0x8731[71]](_0xb64fx1f[_0x8731[57]],function(_0xb64fx30){var _0xb64fx2e={};_0xb64fx2e[_0xb64fx30]= {$like:_0x8731[70]+ _0xb64fx2c[_0x8731[53]][_0x8731[69]]+ _0x8731[70]};return _0xb64fx2e})})};_0xb64fx1f= _[_0x8731[68]]({},_0xb64fx1f,_0xb64fx2c[_0x8731[72]]);var _0xb64fx31={where:_0xb64fx1f[_0x8731[64]]};return db[_0x8731[50]][_0x8731[30]](_0xb64fx31)[_0x8731[40]](function(_0xb64fx20){_0xb64fx2e[_0x8731[30]]= _0xb64fx20;if(_0xb64fx2c[_0x8731[53]][_0x8731[75]]){_0xb64fx1f[_0x8731[76]]= [{all:true}]};return db[_0x8731[50]][_0x8731[77]](_0xb64fx1f)})[_0x8731[40]](function(_0xb64fx32){_0xb64fx2e[_0x8731[74]]= _0xb64fx32;return _0xb64fx2e})[_0x8731[40]](respondWithFilteredResult(_0xb64fx1a,_0xb64fx1f))[_0x8731[73]](handleError(_0xb64fx1a,null))};exports[_0x8731[78]]= function(_0xb64fx2c,_0xb64fx1a){var _0xb64fx1f={raw:true,where:{id:_0xb64fx2c[_0x8731[80]][_0x8731[79]]}},_0xb64fx2d={};_0xb64fx2d[_0x8731[48]]= _[_0x8731[51]](db[_0x8731[50]][_0x8731[49]]);_0xb64fx2d[_0x8731[53]]= _[_0x8731[51]](_0xb64fx2c[_0x8731[53]]);_0xb64fx2d[_0x8731[55]]= _[_0x8731[56]](_0xb64fx2d[_0x8731[48]],_0xb64fx2d[_0x8731[53]]);_0xb64fx1f[_0x8731[57]]= _[_0x8731[56]](_0xb64fx2d[_0x8731[48]],qs[_0x8731[58]](_0xb64fx2c[_0x8731[53]][_0x8731[58]]));_0xb64fx1f[_0x8731[57]]= (_0xb64fx1f[_0x8731[57]][_0x8731[59]])?_0xb64fx1f[_0x8731[57]]:_0xb64fx2d[_0x8731[48]];if(_0xb64fx2c[_0x8731[53]][_0x8731[75]]){_0xb64fx1f[_0x8731[76]]= [{all:true}]};_0xb64fx1f= _[_0x8731[68]]({},_0xb64fx1f,_0xb64fx2c[_0x8731[72]]);return db[_0x8731[50]][_0x8731[81]](_0xb64fx1f)[_0x8731[40]](handleEntityNotFound(_0xb64fx1a,null))[_0x8731[40]](respondWithResult(_0xb64fx1a,null))[_0x8731[73]](handleError(_0xb64fx1a,null))};exports[_0x8731[41]]= function(_0xb64fx2c,_0xb64fx1a){if(_0xb64fx2c[_0x8731[82]][_0x8731[79]]){delete _0xb64fx2c[_0x8731[82]][_0x8731[79]]};return db[_0x8731[50]][_0x8731[81]]({where:{id:_0xb64fx2c[_0x8731[80]][_0x8731[79]]}})[_0x8731[40]](handleEntityNotFound(_0xb64fx1a,null))[_0x8731[40]](saveUpdates(_0xb64fx2c[_0x8731[82]],null))[_0x8731[40]](respondWithResult(_0xb64fx1a,null))[_0x8731[73]](handleError(_0xb64fx1a,null))};exports[_0x8731[42]]= function(_0xb64fx2c,_0xb64fx1a){return db[_0x8731[50]][_0x8731[81]]({where:{id:_0xb64fx2c[_0x8731[80]][_0x8731[79]]}})[_0x8731[40]](handleEntityNotFound(_0xb64fx1a,null))[_0x8731[40]](removeEntity(_0xb64fx1a,null))[_0x8731[73]](handleError(_0xb64fx1a,null))};exports[_0x8731[83]]= function(_0xb64fx2c,_0xb64fx1a,_0xb64fx33){_0xb64fx2c[_0x8731[82]][_0x8731[45]]= _0xb64fx2c[_0x8731[85]][_0x8731[84]];_0xb64fx2c[_0x8731[82]][_0x8731[86]]= _0xb64fx2c[_0x8731[85]][_0x8731[87]];_0xb64fx2c[_0x8731[82]][_0x8731[88]]= _0xb64fx2c[_0x8731[85]][_0x8731[89]];return db[_0x8731[50]][_0x8731[83]](_0xb64fx2c[_0x8731[82]])[_0x8731[40]](respondWithResult(_0xb64fx1a,201))[_0x8731[73]](handleError(_0xb64fx1a,null))};exports[_0x8731[90]]= function(_0xb64fx2c,_0xb64fx1a,_0xb64fx33){return db[_0x8731[50]][_0x8731[94]]({where:{id:_0xb64fx2c[_0x8731[80]][_0x8731[79]]},raw:true})[_0x8731[40]](handleEntityNotFound(_0xb64fx1a,null))[_0x8731[40]](function(_0xb64fx1c){if(_0xb64fx1c){return _0xb64fx1a[_0x8731[90]](path[_0x8731[93]](config[_0x8731[91]],_0x8731[92],_0xb64fx1c[_0x8731[86]]))}})[_0x8731[73]](handleError(_0xb64fx1a,null))}
\ No newline at end of file
+var _0x9ec5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x6E\x61\x6D\x65","\x66\x69\x6C\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x74\x79\x70\x65","\x6D\x69\x6D\x65\x74\x79\x70\x65","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73\x2F","\x6A\x6F\x69\x6E","\x66\x69\x6E\x64\x4F\x6E\x65"];_0x9ec5[0];var jsonpatch=require(_0x9ec5[1]);var rp=require(_0x9ec5[2]);var moment=require(_0x9ec5[3]);var BPromise=require(_0x9ec5[4]);var Mustache=require(_0x9ec5[5]);var util=require(_0x9ec5[6]);var path=require(_0x9ec5[7]);var sox=require(_0x9ec5[8]);var csv=require(_0x9ec5[9]);var ejs=require(_0x9ec5[10]);var fs=require(_0x9ec5[11]);var _=require(_0x9ec5[12]);var squel=require(_0x9ec5[13]);var crypto=require(_0x9ec5[14]);var jsforce=require(_0x9ec5[15]);var deskjs=require(_0x9ec5[16]);var toCsv=require(_0x9ec5[9]);var querystring=require(_0x9ec5[17]);var Papa=require(_0x9ec5[18]);var qs=require(_0x9ec5[19]);var logger=require(_0x9ec5[21])(_0x9ec5[20]);var utils=require(_0x9ec5[22]);var config=require(_0x9ec5[23]);var db=require(_0x9ec5[25])[_0x9ec5[24]];function respondWithStatusCode(_0x48eax1a,_0x48eax1b){_0x48eax1b= _0x48eax1b|| 204;return function(_0x48eax1c){if(_0x48eax1c){return _0x48eax1a[_0x9ec5[26]](_0x48eax1b)};return _0x48eax1a[_0x9ec5[28]](_0x48eax1b)[_0x9ec5[27]]()}}function respondWithResult(_0x48eax1a,_0x48eax1b){_0x48eax1b= _0x48eax1b|| 200;return function(_0x48eax1c){if(_0x48eax1c){return _0x48eax1a[_0x9ec5[28]](_0x48eax1b)[_0x9ec5[29]](_0x48eax1c)}}}function respondWithFilteredResult(_0x48eax1a,_0x48eax1f){return function(_0x48eax1c){if(_0x48eax1c){var _0x48eax20=_0x48eax1c[_0x9ec5[30]],_0x48eax21=_0x48eax1f[_0x9ec5[31]],_0x48eax22=_0x48eax1f[_0x9ec5[31]]+ _0x48eax1f[_0x9ec5[32]],_0x48eax1b;if(_0x48eax22>= _0x48eax20){_0x48eax22= _0x48eax20;_0x48eax1b= 200}else {_0x48eax1b= 206};_0x48eax1a[_0x9ec5[28]](_0x48eax1b);return _0x48eax1a[_0x9ec5[36]](_0x9ec5[33],_0x48eax21+ _0x9ec5[34]+ _0x48eax22+ _0x9ec5[35]+ _0x48eax20)[_0x9ec5[29]](_0x48eax1c)};return null}}function patchUpdates(_0x48eax24){return function(_0x48eax1c){try{jsonpatch[_0x9ec5[37]](_0x48eax1c,_0x48eax24,true)}catch(err){return BPromise[_0x9ec5[38]](err)};return _0x48eax1c[_0x9ec5[39]]()}}function saveUpdates(_0x48eax26,_0x48eax1b){return function(_0x48eax1c){if(_0x48eax1c){return _0x48eax1c[_0x9ec5[41]](_0x48eax26)[_0x9ec5[40]](function(_0x48eax27){return _0x48eax27})};return null}}function removeEntity(_0x48eax1a,_0x48eax1b){return function(_0x48eax1c){if(_0x48eax1c){return _0x48eax1c[_0x9ec5[42]]()[_0x9ec5[40]](function(){_0x48eax1a[_0x9ec5[28]](204)[_0x9ec5[27]]()})}}}function handleEntityNotFound(_0x48eax1a,_0x48eax1b){return function(_0x48eax1c){if(!_0x48eax1c){_0x48eax1a[_0x9ec5[26]](404)};return _0x48eax1c}}function handleError(_0x48eax1a,_0x48eax1b){_0x48eax1b= _0x48eax1b|| 500;return function(_0x48eax2b){logger[_0x9ec5[44]](_0x48eax2b[_0x9ec5[43]]);if(_0x48eax2b[_0x9ec5[45]]){delete _0x48eax2b[_0x9ec5[45]]};_0x48eax1a[_0x9ec5[28]](_0x48eax1b)[_0x9ec5[46]](_0x48eax2b)}}exports[_0x9ec5[47]]= function(_0x48eax2c,_0x48eax1a){var _0x48eax1f={},_0x48eax2d={},_0x48eax2e={count:0,rows:[]};_0x48eax2d[_0x9ec5[48]]= _[_0x9ec5[51]](db[_0x9ec5[50]][_0x9ec5[49]]);var _0x48eax2f={dateStart:_0x48eax2c[_0x9ec5[53]][_0x9ec5[52]],dateEnd:_0x48eax2c[_0x9ec5[53]][_0x9ec5[54]]};delete _0x48eax2c[_0x9ec5[53]][_0x9ec5[52]];delete _0x48eax2c[_0x9ec5[53]][_0x9ec5[54]];_0x48eax2d[_0x9ec5[53]]= _[_0x9ec5[51]](_0x48eax2c[_0x9ec5[53]]);_0x48eax2d[_0x9ec5[55]]= _[_0x9ec5[56]](_0x48eax2d[_0x9ec5[48]],_0x48eax2d[_0x9ec5[53]]);_0x48eax1f[_0x9ec5[57]]= _[_0x9ec5[56]](_0x48eax2d[_0x9ec5[48]],qs[_0x9ec5[58]](_0x48eax2c[_0x9ec5[53]][_0x9ec5[58]]));_0x48eax1f[_0x9ec5[57]]= (_0x48eax1f[_0x9ec5[57]][_0x9ec5[59]])?_0x48eax1f[_0x9ec5[57]]:_0x48eax2d[_0x9ec5[48]];if(!_0x48eax2c[_0x9ec5[53]][_0x9ec5[61]](_0x9ec5[60])){_0x48eax1f[_0x9ec5[32]]= qs[_0x9ec5[32]](_0x48eax2c[_0x9ec5[53]][_0x9ec5[32]]);_0x48eax1f[_0x9ec5[31]]= qs[_0x9ec5[31]](_0x48eax2c[_0x9ec5[53]][_0x9ec5[31]])};_0x48eax1f[_0x9ec5[62]]= qs[_0x9ec5[63]](_0x48eax2c[_0x9ec5[53]][_0x9ec5[63]]);_0x48eax1f[_0x9ec5[64]]= qs[_0x9ec5[55]](_[_0x9ec5[65]](_0x48eax2c[_0x9ec5[53]],_0x48eax2d[_0x9ec5[55]]));if(_0x48eax2f[_0x9ec5[52]]){if(_0x48eax2f[_0x9ec5[54]]){_0x48eax2f[_0x9ec5[54]]= moment(_0x48eax2f[_0x9ec5[54]])[_0x9ec5[67]](1,_0x9ec5[66])}else {_0x48eax2f[_0x9ec5[54]]= moment(_0x48eax2f[_0x9ec5[52]])[_0x9ec5[67]](1,_0x9ec5[66])};_[_0x9ec5[68]](_0x48eax1f[_0x9ec5[64]],{createdAt:{$gte:_0x48eax2f[_0x9ec5[52]],$lte:_0x48eax2f[_0x9ec5[54]]}})};if(_0x48eax2c[_0x9ec5[53]][_0x9ec5[69]]){_0x48eax1f[_0x9ec5[64]]= _[_0x9ec5[68]](_0x48eax1f[_0x9ec5[64]],{$or:_[_0x9ec5[71]](_0x48eax1f[_0x9ec5[57]],function(_0x48eax30){var _0x48eax2e={};_0x48eax2e[_0x48eax30]= {$like:_0x9ec5[70]+ _0x48eax2c[_0x9ec5[53]][_0x9ec5[69]]+ _0x9ec5[70]};return _0x48eax2e})})};_0x48eax1f= _[_0x9ec5[68]]({},_0x48eax1f,_0x48eax2c[_0x9ec5[72]]);var _0x48eax31={where:_0x48eax1f[_0x9ec5[64]]};return db[_0x9ec5[50]][_0x9ec5[30]](_0x48eax31)[_0x9ec5[40]](function(_0x48eax20){_0x48eax2e[_0x9ec5[30]]= _0x48eax20;if(_0x48eax2c[_0x9ec5[53]][_0x9ec5[75]]){_0x48eax1f[_0x9ec5[76]]= [{all:true}]};return db[_0x9ec5[50]][_0x9ec5[77]](_0x48eax1f)})[_0x9ec5[40]](function(_0x48eax32){_0x48eax2e[_0x9ec5[74]]= _0x48eax32;return _0x48eax2e})[_0x9ec5[40]](respondWithFilteredResult(_0x48eax1a,_0x48eax1f))[_0x9ec5[73]](handleError(_0x48eax1a,null))};exports[_0x9ec5[78]]= function(_0x48eax2c,_0x48eax1a){var _0x48eax1f={raw:true,where:{id:_0x48eax2c[_0x9ec5[80]][_0x9ec5[79]]}},_0x48eax2d={};_0x48eax2d[_0x9ec5[48]]= _[_0x9ec5[51]](db[_0x9ec5[50]][_0x9ec5[49]]);_0x48eax2d[_0x9ec5[53]]= _[_0x9ec5[51]](_0x48eax2c[_0x9ec5[53]]);_0x48eax2d[_0x9ec5[55]]= _[_0x9ec5[56]](_0x48eax2d[_0x9ec5[48]],_0x48eax2d[_0x9ec5[53]]);_0x48eax1f[_0x9ec5[57]]= _[_0x9ec5[56]](_0x48eax2d[_0x9ec5[48]],qs[_0x9ec5[58]](_0x48eax2c[_0x9ec5[53]][_0x9ec5[58]]));_0x48eax1f[_0x9ec5[57]]= (_0x48eax1f[_0x9ec5[57]][_0x9ec5[59]])?_0x48eax1f[_0x9ec5[57]]:_0x48eax2d[_0x9ec5[48]];if(_0x48eax2c[_0x9ec5[53]][_0x9ec5[75]]){_0x48eax1f[_0x9ec5[76]]= [{all:true}]};_0x48eax1f= _[_0x9ec5[68]]({},_0x48eax1f,_0x48eax2c[_0x9ec5[72]]);return db[_0x9ec5[50]][_0x9ec5[81]](_0x48eax1f)[_0x9ec5[40]](handleEntityNotFound(_0x48eax1a,null))[_0x9ec5[40]](respondWithResult(_0x48eax1a,null))[_0x9ec5[73]](handleError(_0x48eax1a,null))};exports[_0x9ec5[41]]= function(_0x48eax2c,_0x48eax1a){if(_0x48eax2c[_0x9ec5[82]][_0x9ec5[79]]){delete _0x48eax2c[_0x9ec5[82]][_0x9ec5[79]]};return db[_0x9ec5[50]][_0x9ec5[81]]({where:{id:_0x48eax2c[_0x9ec5[80]][_0x9ec5[79]]}})[_0x9ec5[40]](handleEntityNotFound(_0x48eax1a,null))[_0x9ec5[40]](saveUpdates(_0x48eax2c[_0x9ec5[82]],null))[_0x9ec5[40]](respondWithResult(_0x48eax1a,null))[_0x9ec5[73]](handleError(_0x48eax1a,null))};exports[_0x9ec5[42]]= function(_0x48eax2c,_0x48eax1a){return db[_0x9ec5[50]][_0x9ec5[81]]({where:{id:_0x48eax2c[_0x9ec5[80]][_0x9ec5[79]]}})[_0x9ec5[40]](handleEntityNotFound(_0x48eax1a,null))[_0x9ec5[40]](removeEntity(_0x48eax1a,null))[_0x9ec5[73]](handleError(_0x48eax1a,null))};exports[_0x9ec5[83]]= function(_0x48eax2c,_0x48eax1a,_0x48eax33){_0x48eax2c[_0x9ec5[82]][_0x9ec5[45]]= _0x48eax2c[_0x9ec5[85]][_0x9ec5[84]];_0x48eax2c[_0x9ec5[82]][_0x9ec5[86]]= _0x48eax2c[_0x9ec5[85]][_0x9ec5[87]];_0x48eax2c[_0x9ec5[82]][_0x9ec5[88]]= _0x48eax2c[_0x9ec5[85]][_0x9ec5[89]];return db[_0x9ec5[50]][_0x9ec5[83]](_0x48eax2c[_0x9ec5[82]])[_0x9ec5[40]](respondWithResult(_0x48eax1a,201))[_0x9ec5[73]](handleError(_0x48eax1a,null))};exports[_0x9ec5[90]]= function(_0x48eax2c,_0x48eax1a,_0x48eax33){return db[_0x9ec5[50]][_0x9ec5[94]]({where:{id:_0x48eax2c[_0x9ec5[80]][_0x9ec5[79]]},raw:true})[_0x9ec5[40]](handleEntityNotFound(_0x48eax1a,null))[_0x9ec5[40]](function(_0x48eax1c){if(_0x48eax1c){return _0x48eax1a[_0x9ec5[90]](path[_0x9ec5[93]](config[_0x9ec5[91]],_0x9ec5[92],_0x48eax1c[_0x9ec5[86]]))}})[_0x9ec5[73]](handleError(_0x48eax1a,null))}
\ No newline at end of file
index a399280..784134f 100644 (file)
@@ -1 +1 @@
-var _0x20f4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x20f4[0];var _=require(_0x20f4[1]);var util=require(_0x20f4[2]);var logger=require(_0x20f4[4])(_0x20f4[3]);var moment=require(_0x20f4[5]);var BPromise=require(_0x20f4[6]);var rp=require(_0x20f4[7]);var attributes=require(_0x20f4[8]);module[_0x20f4[9]]= function(_0xec57x8,_0xec57x9){return _0xec57x8[_0x20f4[12]](_0x20f4[10],attributes,{tableName:_0x20f4[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x5ae8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x5ae8[0];var _=require(_0x5ae8[1]);var util=require(_0x5ae8[2]);var logger=require(_0x5ae8[4])(_0x5ae8[3]);var moment=require(_0x5ae8[5]);var BPromise=require(_0x5ae8[6]);var rp=require(_0x5ae8[7]);var attributes=require(_0x5ae8[8]);module[_0x5ae8[9]]= function(_0xb003x8,_0xb003x9){return _0xb003x8[_0x5ae8[12]](_0x5ae8[10],attributes,{tableName:_0x5ae8[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index d4d262f..2403b58 100644 (file)
@@ -1 +1 @@
-var _0x609e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74"];_0x609e[0];var _=require(_0x609e[1]);var util=require(_0x609e[2]);var moment=require(_0x609e[3]);var BPromise=require(_0x609e[4]);var rs=require(_0x609e[5]);var fs=require(_0x609e[6]);var db=require(_0x609e[8])[_0x609e[7]];var utils=require(_0x609e[9]);var logger=require(_0x609e[11])(_0x609e[10]);var config=require(_0x609e[12]);var jayson=require(_0x609e[13]);var client=jayson[_0x609e[15]][_0x609e[14]]({port:9002});function respondWithRpcPromise(_0xac36xe,_0xac36xf,_0xac36x10){return  new BPromise(function(_0xac36x11,_0xac36x12){return client[_0x609e[28]](_0xac36xe,_0xac36x10)[_0x609e[27]](function(_0xac36x14){logger[_0x609e[20]](_0x609e[16],_0xac36xf,_0x609e[19]);logger[_0x609e[23]](_0x609e[21],_0xac36xf,_0x609e[19],JSON[_0x609e[22]](_0xac36x14));if(_0xac36x14[_0x609e[17]]){if(_0xac36x14[_0x609e[17]][_0x609e[24]]=== 500){logger[_0x609e[17]](_0x609e[16],_0xac36xf,_0xac36x14[_0x609e[17]][_0x609e[25]]);return _0xac36x12(_0xac36x14[_0x609e[17]][_0x609e[25]])};logger[_0x609e[17]](_0x609e[16],_0xac36xf,_0xac36x14[_0x609e[17]][_0x609e[25]]);return _0xac36x11(_0xac36x14[_0x609e[17]][_0x609e[25]])}else {logger[_0x609e[20]](_0x609e[16],_0xac36xf,_0x609e[19]);_0xac36x11(_0xac36x14[_0x609e[26]][_0x609e[25]])}})[_0x609e[18]](function(_0xac36x13){logger[_0x609e[17]](_0x609e[16],_0xac36xf,_0xac36x13);_0xac36x12(_0xac36x13)})})}exports[_0x609e[29]]= function(_0xac36x10){var _0xac36x15=this;return  new Promise(function(_0xac36x11,_0xac36x12){return db[_0x609e[34]][_0x609e[33]](_0xac36x10[_0x609e[30]],{raw:_0xac36x10[_0x609e[31]]?(_0xac36x10[_0x609e[31]][_0x609e[32]]=== undefined)?true:false:true})[_0x609e[27]](function(_0xac36x14){logger[_0x609e[20]](_0x609e[29],_0xac36x10);logger[_0x609e[23]](_0x609e[29],_0xac36x10,JSON[_0x609e[22]](_0xac36x14));_0xac36x11(_0xac36x14)})[_0x609e[18]](function(_0xac36x13){logger[_0x609e[17]](_0x609e[29],_0xac36x13[_0x609e[25]],_0xac36x10);_0xac36x12(_0xac36x15[_0x609e[17]](500,_0xac36x13[_0x609e[25]]))})})}
\ No newline at end of file
+var _0x6008=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74"];_0x6008[0];var _=require(_0x6008[1]);var util=require(_0x6008[2]);var moment=require(_0x6008[3]);var BPromise=require(_0x6008[4]);var rs=require(_0x6008[5]);var fs=require(_0x6008[6]);var db=require(_0x6008[8])[_0x6008[7]];var utils=require(_0x6008[9]);var logger=require(_0x6008[11])(_0x6008[10]);var config=require(_0x6008[12]);var jayson=require(_0x6008[13]);var client=jayson[_0x6008[15]][_0x6008[14]]({port:9002});function respondWithRpcPromise(_0x3fe0xe,_0x3fe0xf,_0x3fe0x10){return  new BPromise(function(_0x3fe0x11,_0x3fe0x12){return client[_0x6008[28]](_0x3fe0xe,_0x3fe0x10)[_0x6008[27]](function(_0x3fe0x14){logger[_0x6008[20]](_0x6008[16],_0x3fe0xf,_0x6008[19]);logger[_0x6008[23]](_0x6008[21],_0x3fe0xf,_0x6008[19],JSON[_0x6008[22]](_0x3fe0x14));if(_0x3fe0x14[_0x6008[17]]){if(_0x3fe0x14[_0x6008[17]][_0x6008[24]]=== 500){logger[_0x6008[17]](_0x6008[16],_0x3fe0xf,_0x3fe0x14[_0x6008[17]][_0x6008[25]]);return _0x3fe0x12(_0x3fe0x14[_0x6008[17]][_0x6008[25]])};logger[_0x6008[17]](_0x6008[16],_0x3fe0xf,_0x3fe0x14[_0x6008[17]][_0x6008[25]]);return _0x3fe0x11(_0x3fe0x14[_0x6008[17]][_0x6008[25]])}else {logger[_0x6008[20]](_0x6008[16],_0x3fe0xf,_0x6008[19]);_0x3fe0x11(_0x3fe0x14[_0x6008[26]][_0x6008[25]])}})[_0x6008[18]](function(_0x3fe0x13){logger[_0x6008[17]](_0x6008[16],_0x3fe0xf,_0x3fe0x13);_0x3fe0x12(_0x3fe0x13)})})}exports[_0x6008[29]]= function(_0x3fe0x10){var _0x3fe0x15=this;return  new Promise(function(_0x3fe0x11,_0x3fe0x12){return db[_0x6008[34]][_0x6008[33]](_0x3fe0x10[_0x6008[30]],{raw:_0x3fe0x10[_0x6008[31]]?(_0x3fe0x10[_0x6008[31]][_0x6008[32]]=== undefined)?true:false:true})[_0x6008[27]](function(_0x3fe0x14){logger[_0x6008[20]](_0x6008[29],_0x3fe0x10);logger[_0x6008[23]](_0x6008[29],_0x3fe0x10,JSON[_0x6008[22]](_0x3fe0x14));_0x3fe0x11(_0x3fe0x14)})[_0x6008[18]](function(_0x3fe0x13){logger[_0x6008[17]](_0x6008[29],_0x3fe0x13[_0x6008[25]],_0x3fe0x10);_0x3fe0x12(_0x3fe0x15[_0x6008[17]](500,_0x3fe0x13[_0x6008[25]]))})})}
\ No newline at end of file
index 9e83054..222f4a1 100644 (file)
@@ -1 +1 @@
-var _0xa3df=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73\x2F","\x6A\x6F\x69\x6E","\x25\x73\x2D\x25\x73","\x6E\x6F\x77","\x2D","\x72\x65\x70\x6C\x61\x63\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x64\x69\x73\x6B\x53\x74\x6F\x72\x61\x67\x65","\x66\x69\x6C\x65","\x73\x69\x6E\x67\x6C\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xa3df[0];var multer=require(_0xa3df[1]);var util=require(_0xa3df[2]);var path=require(_0xa3df[3]);var express=require(_0xa3df[4]);var router=express.Router();var auth=require(_0xa3df[5]);var interaction=require(_0xa3df[6]);var config=require(_0xa3df[7]);var controller=require(_0xa3df[8]);router[_0xa3df[12]](_0xa3df[9],auth[_0xa3df[10]](),controller[_0xa3df[11]]);router[_0xa3df[12]](_0xa3df[13],auth[_0xa3df[10]](),controller[_0xa3df[14]]);router[_0xa3df[12]](_0xa3df[15],auth[_0xa3df[10]](),controller[_0xa3df[16]]);var upload=multer({storage:multer[_0xa3df[26]]({destination:function(_0x4da0xb,_0x4da0xc,_0x4da0xd){_0x4da0xd(null,path[_0xa3df[19]](config[_0xa3df[17]],_0xa3df[18]))},filename:function(_0x4da0xb,_0x4da0xc,_0x4da0xd){_0x4da0xd(null,util[_0xa3df[25]](_0xa3df[20],Date[_0xa3df[21]](),_0x4da0xc[_0xa3df[24]][_0xa3df[23]](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,_0xa3df[22])))}})});router[_0xa3df[30]](_0xa3df[9],upload[_0xa3df[28]](_0xa3df[27]),controller[_0xa3df[29]]);router[_0xa3df[32]](_0xa3df[13],auth[_0xa3df[10]](),controller[_0xa3df[31]]);router[_0xa3df[34]](_0xa3df[13],auth[_0xa3df[10]](),controller[_0xa3df[33]]);module[_0xa3df[35]]= router
\ No newline at end of file
+var _0x947e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73\x2F","\x6A\x6F\x69\x6E","\x25\x73\x2D\x25\x73","\x6E\x6F\x77","\x2D","\x72\x65\x70\x6C\x61\x63\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x64\x69\x73\x6B\x53\x74\x6F\x72\x61\x67\x65","\x66\x69\x6C\x65","\x73\x69\x6E\x67\x6C\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x947e[0];var multer=require(_0x947e[1]);var util=require(_0x947e[2]);var path=require(_0x947e[3]);var express=require(_0x947e[4]);var router=express.Router();var auth=require(_0x947e[5]);var interaction=require(_0x947e[6]);var config=require(_0x947e[7]);var controller=require(_0x947e[8]);router[_0x947e[12]](_0x947e[9],auth[_0x947e[10]](),controller[_0x947e[11]]);router[_0x947e[12]](_0x947e[13],auth[_0x947e[10]](),controller[_0x947e[14]]);router[_0x947e[12]](_0x947e[15],auth[_0x947e[10]](),controller[_0x947e[16]]);var upload=multer({storage:multer[_0x947e[26]]({destination:function(_0x18c0xb,_0x18c0xc,_0x18c0xd){_0x18c0xd(null,path[_0x947e[19]](config[_0x947e[17]],_0x947e[18]))},filename:function(_0x18c0xb,_0x18c0xc,_0x18c0xd){_0x18c0xd(null,util[_0x947e[25]](_0x947e[20],Date[_0x947e[21]](),_0x18c0xc[_0x947e[24]][_0x947e[23]](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,_0x947e[22])))}})});router[_0x947e[30]](_0x947e[9],upload[_0x947e[28]](_0x947e[27]),controller[_0x947e[29]]);router[_0x947e[32]](_0x947e[13],auth[_0x947e[10]](),controller[_0x947e[31]]);router[_0x947e[34]](_0x947e[13],auth[_0x947e[10]](),controller[_0x947e[33]]);module[_0x947e[35]]= router
\ No newline at end of file
index 63b51d6..9432fa9 100644 (file)
@@ -1 +1 @@
-var _0x5eb9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x73\x73\x70\x6F\x72\x74","\x53\x74\x72\x61\x74\x65\x67\x79","\x70\x61\x73\x73\x70\x6F\x72\x74\x2D\x67\x6F\x6F\x67\x6C\x65\x2D\x6F\x61\x75\x74\x68\x32\x30","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x73\x69\x67\x6E\x54\x6F\x6B\x65\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x6C\x6F\x67\x69\x6E","\x67\x6F\x6F\x67\x6C\x65","\x2F\x6C\x6F\x67\x69\x6E","\x70\x72\x6F\x66\x69\x6C\x65","\x65\x6D\x61\x69\x6C","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x63\x6C\x69\x65\x6E\x74\x49\x44","\x69\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x73\x65\x63\x72\x65\x74","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x55\x52\x4C","","\x63\x61\x74\x63\x68","\x55\x73\x65\x72\x20\x65\x6D\x61\x69\x6C\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x21","\x74\x68\x65\x6E","\x65\x6D\x61\x69\x6C\x73","\x76\x61\x6C\x75\x65","\x6D\x61\x70","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64","\x55\x73\x65\x72","\x75\x73\x65"];_0x5eb9[0];var _=require(_0x5eb9[1]);var passport=require(_0x5eb9[2]);var GoogleStrategy=require(_0x5eb9[4])[_0x5eb9[3]];var db=require(_0x5eb9[6])[_0x5eb9[5]];var config=require(_0x5eb9[7]);var signToken=require(_0x5eb9[9])[_0x5eb9[8]];exports[_0x5eb9[10]]= passport[_0x5eb9[15]](_0x5eb9[11],{failureRedirect:_0x5eb9[12],scope:[_0x5eb9[13],_0x5eb9[14]],session:false});exports[_0x5eb9[16]]= passport[_0x5eb9[15]](_0x5eb9[11],{failureRedirect:_0x5eb9[12],session:false});passport[_0x5eb9[34]]( new GoogleStrategy({clientID:config[_0x5eb9[11]]?config[_0x5eb9[11]][_0x5eb9[17]]:_0x5eb9[18],clientSecret:config[_0x5eb9[11]]?config[_0x5eb9[11]][_0x5eb9[19]]:_0x5eb9[20],callbackURL:config[_0x5eb9[11]]?config[_0x5eb9[11]][_0x5eb9[21]]:_0x5eb9[22]},function(_0x3a90x7,_0x3a90x8,_0x3a90x9,_0x3a90xa){db[_0x5eb9[33]][_0x5eb9[32]]({where:{email:_[_0x5eb9[28]](_0x3a90x9[_0x5eb9[26]],_0x5eb9[27]),role:{$or:[_0x5eb9[29],_0x5eb9[30],_0x5eb9[31]]}}})[_0x5eb9[25]](function(_0x3a90xc){if(_0x3a90xc){return _0x3a90xa(null,_0x3a90xc)};_0x3a90xa(_0x5eb9[24])})[_0x5eb9[23]](function(_0x3a90xb){_0x3a90xa(_0x3a90xb)})}))
\ No newline at end of file
+var _0x5f04=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x73\x73\x70\x6F\x72\x74","\x53\x74\x72\x61\x74\x65\x67\x79","\x70\x61\x73\x73\x70\x6F\x72\x74\x2D\x67\x6F\x6F\x67\x6C\x65\x2D\x6F\x61\x75\x74\x68\x32\x30","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x73\x69\x67\x6E\x54\x6F\x6B\x65\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x6C\x6F\x67\x69\x6E","\x67\x6F\x6F\x67\x6C\x65","\x2F\x6C\x6F\x67\x69\x6E","\x70\x72\x6F\x66\x69\x6C\x65","\x65\x6D\x61\x69\x6C","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x63\x6C\x69\x65\x6E\x74\x49\x44","\x69\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x73\x65\x63\x72\x65\x74","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x55\x52\x4C","","\x63\x61\x74\x63\x68","\x55\x73\x65\x72\x20\x65\x6D\x61\x69\x6C\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x21","\x74\x68\x65\x6E","\x65\x6D\x61\x69\x6C\x73","\x76\x61\x6C\x75\x65","\x6D\x61\x70","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64","\x55\x73\x65\x72","\x75\x73\x65"];_0x5f04[0];var _=require(_0x5f04[1]);var passport=require(_0x5f04[2]);var GoogleStrategy=require(_0x5f04[4])[_0x5f04[3]];var db=require(_0x5f04[6])[_0x5f04[5]];var config=require(_0x5f04[7]);var signToken=require(_0x5f04[9])[_0x5f04[8]];exports[_0x5f04[10]]= passport[_0x5f04[15]](_0x5f04[11],{failureRedirect:_0x5f04[12],scope:[_0x5f04[13],_0x5f04[14]],session:false});exports[_0x5f04[16]]= passport[_0x5f04[15]](_0x5f04[11],{failureRedirect:_0x5f04[12],session:false});passport[_0x5f04[34]]( new GoogleStrategy({clientID:config[_0x5f04[11]]?config[_0x5f04[11]][_0x5f04[17]]:_0x5f04[18],clientSecret:config[_0x5f04[11]]?config[_0x5f04[11]][_0x5f04[19]]:_0x5f04[20],callbackURL:config[_0x5f04[11]]?config[_0x5f04[11]][_0x5f04[21]]:_0x5f04[22]},function(_0x6ca2x7,_0x6ca2x8,_0x6ca2x9,_0x6ca2xa){db[_0x5f04[33]][_0x5f04[32]]({where:{email:_[_0x5f04[28]](_0x6ca2x9[_0x5f04[26]],_0x5f04[27]),role:{$or:[_0x5f04[29],_0x5f04[30],_0x5f04[31]]}}})[_0x5f04[25]](function(_0x6ca2xc){if(_0x6ca2xc){return _0x6ca2xa(null,_0x6ca2xc)};_0x6ca2xa(_0x5f04[24])})[_0x5f04[23]](function(_0x6ca2xb){_0x6ca2xa(_0x6ca2xb)})}))
\ No newline at end of file
index d3448b8..72790a1 100644 (file)
@@ -1 +1 @@
-var _0x9351=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2F\x61\x75\x74\x68\x47\x6F\x6F\x67\x6C\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x73\x65\x74\x54\x6F\x6B\x65\x6E\x43\x6F\x6F\x6B\x69\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2F","\x6C\x6F\x67\x69\x6E","\x67\x65\x74","\x2F\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x9351[0];var express=require(_0x9351[1]);var passport=require(_0x9351[2]);var router=express.Router();var controller=require(_0x9351[3]);var setTokenCookie=require(_0x9351[5])[_0x9351[4]];router[_0x9351[8]](_0x9351[6],controller[_0x9351[7]]);router[_0x9351[8]](_0x9351[9],controller[_0x9351[10]],setTokenCookie);module[_0x9351[11]]= router
\ No newline at end of file
+var _0xbb6e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2F\x61\x75\x74\x68\x47\x6F\x6F\x67\x6C\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x73\x65\x74\x54\x6F\x6B\x65\x6E\x43\x6F\x6F\x6B\x69\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2F","\x6C\x6F\x67\x69\x6E","\x67\x65\x74","\x2F\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xbb6e[0];var express=require(_0xbb6e[1]);var passport=require(_0xbb6e[2]);var router=express.Router();var controller=require(_0xbb6e[3]);var setTokenCookie=require(_0xbb6e[5])[_0xbb6e[4]];router[_0xbb6e[8]](_0xbb6e[6],controller[_0xbb6e[7]]);router[_0xbb6e[8]](_0xbb6e[9],controller[_0xbb6e[10]],setTokenCookie);module[_0xbb6e[11]]= router
\ No newline at end of file
index a3785e8..fea768c 100644 (file)
@@ -1 +1 @@
-var _0x1136=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x70\x61\x73\x73\x70\x6F\x72\x74","\x53\x74\x72\x61\x74\x65\x67\x79","\x70\x61\x73\x73\x70\x6F\x72\x74\x2D\x6C\x6F\x63\x61\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x6C\x6F\x64\x61\x73\x68","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x69\x67\x6E\x54\x6F\x6B\x65\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x63\x61\x74\x63\x68","\x61\x67\x65\x6E\x74\x73","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x6C\x6F\x67\x69\x6E\x20\x68\x61\x73\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64","\x74\x68\x65\x6E","\x67\x65\x74\x4C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x75\x74\x69\x6C","\x69\x64","\x63\x6F\x75\x6E\x74","\x55\x73\x65\x72","\x54\x68\x69\x73\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x69\x73\x20\x6E\x6F\x74\x20\x63\x6F\x72\x72\x65\x63\x74\x2E","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x54\x68\x69\x73\x20\x6E\x61\x6D\x65\x20\x69\x73\x20\x6E\x6F\x74\x20\x72\x65\x67\x69\x73\x74\x65\x72\x65\x64\x2E","\x74\x72\x69\x6D","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x66\x69\x6E\x64","\x65\x72\x72\x6F\x72","\x53\x65\x6E\x64\x4D\x61\x69\x6C\x20\x65\x72\x72\x6F\x72\x3A\x20\x25\x73\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x79\x6F\x75\x72\x20\x41\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x6F\x72\x21","\x6D\x65\x73\x73\x61\x67\x65","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x66\x6F\x72\x6D\x61\x74","\x55\x6E\x61\x62\x6C\x65\x20\x74\x6F\x20\x66\x69\x6E\x64\x20\x61\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64\x20\x53\x4D\x54\x50\x20\x73\x65\x72\x76\x69\x63\x65\x21","\x73\x65\x72\x76\x69\x63\x65","\x53\x6D\x74\x70","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x65\x63\x75\x72\x65","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E","\x61\x75\x74\x68","\x70\x61\x73\x73","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x6D\x65\x72\x67\x65","\x53\x65\x6E\x64\x4D\x61\x69\x6C","\x72\x65\x71\x75\x65\x73\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6C\x6F\x67\x69\x6E","\x6C\x6F\x63\x61\x6C","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x77\x65\x6E\x74\x20\x77\x72\x6F\x6E\x67\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x74\x72\x79\x20\x61\x67\x61\x69\x6E\x2E","\x6A\x73\x6F\x6E","\x66\x6F\x72\x67\x6F\x74","\x62\x6F\x64\x79","\x45\x6D\x61\x69\x6C\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x20\x69\x73\x20\x6D\x69\x73\x73\x69\x6E\x67","\x67\x65\x6E\x65\x72\x61\x74\x65","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x52\x65\x73\x65\x74\x20\x45\x6D\x61\x69\x6C\x20\x73\x65\x6E\x74\x21","\x78\x43\x61\x6C\x6C\x79\x20\x4D\x6F\x74\x69\x6F\x6E\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x20\x52\x65\x73\x65\x74","\x59\x6F\x75\x20\x61\x72\x65\x20\x72\x65\x63\x65\x69\x76\x69\x6E\x67\x20\x74\x68\x69\x73\x20\x62\x65\x63\x61\x75\x73\x65\x20\x79\x6F\x75\x20\x28\x6F\x72\x20\x73\x6F\x6D\x65\x6F\x6E\x65\x20\x65\x6C\x73\x65\x29\x20\x68\x61\x76\x65\x20\x72\x65\x71\x75\x65\x73\x74\x65\x64\x20\x74\x68\x65\x20\x72\x65\x73\x65\x74\x20\x6F\x66\x20\x74\x68\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x66\x6F\x72\x20\x79\x6F\x75\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x2E\x0A\x0A","\x50\x6C\x65\x61\x73\x65\x20\x63\x6C\x69\x63\x6B\x20\x6F\x6E\x20\x74\x68\x65\x20\x66\x6F\x6C\x6C\x6F\x77\x69\x6E\x67\x20\x6C\x69\x6E\x6B\x2C\x20\x6F\x72\x20\x70\x61\x73\x74\x65\x20\x74\x68\x69\x73\x20\x69\x6E\x74\x6F\x20\x79\x6F\x75\x72\x20\x62\x72\x6F\x77\x73\x65\x72\x20\x74\x6F\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x74\x68\x65\x20\x70\x72\x6F\x63\x65\x73\x73\x3A\x0A\x0A","\x68\x74\x74\x70\x3A\x2F\x2F","\x68\x65\x61\x64\x65\x72\x73","\x2F\x72\x65\x73\x65\x74\x2F","\x0A\x0A","\x49\x66\x20\x79\x6F\x75\x20\x64\x69\x64\x20\x6E\x6F\x74\x20\x72\x65\x71\x75\x65\x73\x74\x20\x74\x68\x69\x73\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x69\x67\x6E\x6F\x72\x65\x20\x74\x68\x69\x73\x20\x65\x6D\x61\x69\x6C\x20\x61\x6E\x64\x20\x79\x6F\x75\x72\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x77\x69\x6C\x6C\x20\x72\x65\x6D\x61\x69\x6E\x20\x75\x6E\x63\x68\x61\x6E\x67\x65\x64\x2E\x0A","\x54\x68\x69\x73\x20\x65\x6D\x61\x69\x6C\x20\x69\x73\x20\x6E\x6F\x74\x20\x72\x65\x67\x69\x73\x74\x65\x72\x65\x64\x2E","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64\x54\x6F\x6B\x65\x6E","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64\x45\x78\x70\x69\x72\x65\x73","\x6E\x6F\x77","\x73\x61\x76\x65","\x72\x65\x73\x65\x74","\x50\x61\x73\x73\x77\x6F\x72\x64\x20\x72\x65\x73\x65\x74\x21","\x50\x61\x73\x73\x77\x6F\x72\x64\x20\x72\x65\x73\x65\x74\x20\x74\x6F\x6B\x65\x6E\x20\x69\x73\x20\x69\x6E\x76\x61\x6C\x69\x64\x20\x6F\x72\x20\x68\x61\x73\x20\x65\x78\x70\x69\x72\x65\x64\x2E","\x70\x61\x73\x73\x77\x6F\x72\x64","\x74\x6F\x6B\x65\x6E","\x70\x61\x72\x61\x6D\x73","\x75\x73\x65"];_0x1136[0];var util=require(_0x1136[1]);var passport=require(_0x1136[2]);var LocalStrategy=require(_0x1136[4])[_0x1136[3]];var BPromise=require(_0x1136[5]);var jayson=require(_0x1136[6]);var _=require(_0x1136[7]);var logger=require(_0x1136[9])(_0x1136[8]);var rs=require(_0x1136[10]);var db=require(_0x1136[12])[_0x1136[11]];var signToken=require(_0x1136[14])[_0x1136[13]];var client=jayson[_0x1136[16]][_0x1136[15]]({port:9003});var getLicense=function(_0x3682xd){return  new BPromise(function(_0x3682xe,_0x3682xf){var _0x3682x10=0;_0x3682xd[_0x1136[17]]!== _0x1136[18]&& _0x3682xe(_0x3682xd);return db[_0x1136[27]][_0x1136[26]]({where:{role:_0x1136[18],online:true,id:{$ne:_0x3682xd[_0x1136[25]]}}})[_0x1136[22]](function(_0x3682x13){_0x3682x10= _0x3682x13;return require(_0x1136[24])[_0x1136[23]]()})[_0x1136[22]](function(_0x3682x12){if(_0x3682x12&& _0x3682x12[_0x1136[20]]&& _0x3682x10>= _0x3682x12[_0x1136[20]]){return _0x3682xf({message:_0x1136[21]})};return _0x3682xe(_0x3682xd)})[_0x1136[19]](function(_0x3682x11){return _0x3682xf(_0x3682x11)})})};function localAuthenticate(_0x3682x15,_0x3682x16,_0x3682x17,_0x3682x18){var _0x3682x19;_0x3682x15[_0x1136[34]]({where:{name:_0x3682x16[_0x1136[31]](),role:{$or:[_0x1136[32],_0x1136[33],_0x1136[18]]}}})[_0x1136[22]](function(_0x3682xd){if(!_0x3682xd){return _0x3682x18(null,false,{message:_0x1136[30]})};return getLicense(_0x3682xd)})[_0x1136[22]](function(_0x3682xd){_0x3682xd[_0x1136[29]](_0x3682x17,function(_0x3682x1a,_0x3682x1b){if(_0x3682x1a){return _0x3682x18(_0x3682x1a)};if(!_0x3682x1b){return _0x3682x18(null,false,{message:_0x1136[28]})}else {return _0x3682x18(null,_0x3682xd)}})})[_0x1136[19]](function(_0x3682x11){_0x3682x18(_0x3682x11)})}function sendServiceMail(_0x3682x1d){return db[_0x1136[56]][_0x1136[34]]({where:{service:true},attributes:[_0x1136[25],_0x1136[50],_0x1136[51]],include:[{model:db[_0x1136[55]],as:_0x1136[42]}]})[_0x1136[22]](function(_0x3682x1f){if(!_0x3682x1f){throw  new Error(_0x1136[40])};var _0x3682x20={tls:{rejectUnauthorized:false}};if(_0x3682x1f[_0x1136[42]][_0x1136[41]]){_0x3682x20[_0x1136[41]]= _0x3682x1f[_0x1136[42]][_0x1136[41]]}else {_0x3682x20[_0x1136[43]]= _0x3682x1f[_0x1136[42]][_0x1136[43]];_0x3682x20[_0x1136[44]]= _0x3682x1f[_0x1136[42]][_0x1136[44]];_0x3682x20[_0x1136[45]]= _0x3682x1f[_0x1136[42]][_0x1136[45]]};if(_0x3682x1f[_0x1136[42]][_0x1136[46]]){_0x3682x20[_0x1136[47]]= {user:_0x3682x1f[_0x1136[42]][_0x1136[33]],pass:_0x3682x1f[_0x1136[42]][_0x1136[48]]}};var _0x3682x21={account:_0x3682x20,message:_[_0x1136[52]]({from:util[_0x1136[39]](_0x1136[49],_0x3682x1f[_0x1136[50]],_0x3682x1f[_0x1136[51]]|| _0x3682x1f[_0x1136[42]][_0x1136[33]])},_0x3682x1d)};return client[_0x1136[54]](_0x1136[53],_0x3682x21)})[_0x1136[22]](function(_0x3682x1e){if(_0x3682x1e[_0x1136[35]]){throw  new Error(util[_0x1136[39]](_0x1136[36],_0x3682x1e[_0x1136[35]][_0x1136[37]]|| JSON[_0x1136[38]](_0x3682x1e[_0x1136[35]])))};return true})}function handleError(_0x3682x23,_0x3682x24,_0x3682x25){return _0x3682x23[_0x1136[59]](_0x3682x24|| 500)[_0x1136[58]]({message:_0x3682x25?(_0x3682x25[_0x1136[37]]|| _0x3682x25):_0x1136[57]})}exports[_0x1136[60]]= function(_0x3682x26,_0x3682x23,_0x3682x27){passport[_0x1136[29]](_0x1136[61],function(_0x3682x11,_0x3682xd,_0x3682x28){var _0x3682x25=_0x3682x11|| _0x3682x28;if(_0x3682x25){return handleError(_0x3682x23,401,_0x3682x25)};if(!_0x3682xd){return handleError(_0x3682x23,404,{message:_0x1136[62]})};var _0x3682x29=signToken(_0x3682xd[_0x1136[25]],_0x3682xd[_0x1136[17]]);_0x3682x23[_0x1136[63]]({id:_0x3682xd[_0x1136[25]],token:_0x3682x29})})(_0x3682x26,_0x3682x23,_0x3682x27)};exports[_0x1136[64]]= function(_0x3682x26,_0x3682x23,_0x3682x27){if(!_0x3682x26[_0x1136[65]][_0x1136[51]]){return handleError(_0x3682x23,500,{message:_0x1136[66]})};var _0x3682x29=rs[_0x1136[67]]();_0x3682x26[_0x1136[65]][_0x1136[51]]= _0x3682x26[_0x1136[65]][_0x1136[51]][_0x1136[31]]()[_0x1136[68]]();return db[_0x1136[27]][_0x1136[34]]({where:{email:_0x3682x26[_0x1136[65]][_0x1136[51]]}})[_0x1136[22]](function(_0x3682xd){if(!_0x3682xd){throw  new Error(_0x1136[78])};_0x3682xd[_0x1136[79]]= _0x3682x29;_0x3682xd[_0x1136[80]]= Date[_0x1136[81]]()+ 3600000;return _0x3682xd[_0x1136[82]]()})[_0x1136[22]](function(){return sendServiceMail({to:_0x3682x26[_0x1136[65]][_0x1136[51]],subject:_0x1136[70],text:_0x1136[71]+ _0x1136[72]+ _0x1136[73]+ _0x3682x26[_0x1136[74]][_0x1136[43]]+ _0x1136[75]+ _0x3682x29+ _0x1136[76]+ _0x1136[77]})})[_0x1136[22]](function(){_0x3682x23[_0x1136[59]](200)[_0x1136[58]]({message:_0x1136[69]})})[_0x1136[19]](function(_0x3682x11){return handleError(_0x3682x23,500,_0x3682x11)})};exports[_0x1136[83]]= function(_0x3682x26,_0x3682x23,_0x3682x27){return db[_0x1136[27]][_0x1136[34]]({where:{resetPasswordToken:_0x3682x26[_0x1136[88]][_0x1136[87]],resetPasswordExpires:{$gt:Date[_0x1136[81]]()}}})[_0x1136[22]](function(_0x3682xd){if(!_0x3682xd){throw  new Error(_0x1136[85])};_0x3682xd[_0x1136[86]]= _0x3682x26[_0x1136[65]][_0x1136[86]];_0x3682xd[_0x1136[79]]= null;_0x3682xd[_0x1136[80]]= null;return _0x3682xd[_0x1136[82]]()})[_0x1136[22]](function(){_0x3682x23[_0x1136[59]](200)[_0x1136[58]]({message:_0x1136[84]})})[_0x1136[19]](function(_0x3682x11){return handleError(_0x3682x23,500,_0x3682x11)})};passport[_0x1136[89]]( new LocalStrategy({usernameField:_0x1136[50],passwordField:_0x1136[86]},function(_0x3682x16,_0x3682x17,_0x3682x18){return localAuthenticate(db.User,_0x3682x16,_0x3682x17,_0x3682x18)}))
\ No newline at end of file
+var _0x79c7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x70\x61\x73\x73\x70\x6F\x72\x74","\x53\x74\x72\x61\x74\x65\x67\x79","\x70\x61\x73\x73\x70\x6F\x72\x74\x2D\x6C\x6F\x63\x61\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x6C\x6F\x64\x61\x73\x68","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x69\x67\x6E\x54\x6F\x6B\x65\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x63\x61\x74\x63\x68","\x61\x67\x65\x6E\x74\x73","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x6C\x6F\x67\x69\x6E\x20\x68\x61\x73\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64","\x74\x68\x65\x6E","\x67\x65\x74\x4C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x75\x74\x69\x6C","\x69\x64","\x63\x6F\x75\x6E\x74","\x55\x73\x65\x72","\x54\x68\x69\x73\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x69\x73\x20\x6E\x6F\x74\x20\x63\x6F\x72\x72\x65\x63\x74\x2E","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x54\x68\x69\x73\x20\x6E\x61\x6D\x65\x20\x69\x73\x20\x6E\x6F\x74\x20\x72\x65\x67\x69\x73\x74\x65\x72\x65\x64\x2E","\x74\x72\x69\x6D","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x66\x69\x6E\x64","\x65\x72\x72\x6F\x72","\x53\x65\x6E\x64\x4D\x61\x69\x6C\x20\x65\x72\x72\x6F\x72\x3A\x20\x25\x73\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x79\x6F\x75\x72\x20\x41\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x6F\x72\x21","\x6D\x65\x73\x73\x61\x67\x65","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x66\x6F\x72\x6D\x61\x74","\x55\x6E\x61\x62\x6C\x65\x20\x74\x6F\x20\x66\x69\x6E\x64\x20\x61\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64\x20\x53\x4D\x54\x50\x20\x73\x65\x72\x76\x69\x63\x65\x21","\x73\x65\x72\x76\x69\x63\x65","\x53\x6D\x74\x70","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x65\x63\x75\x72\x65","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E","\x61\x75\x74\x68","\x70\x61\x73\x73","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x6D\x65\x72\x67\x65","\x53\x65\x6E\x64\x4D\x61\x69\x6C","\x72\x65\x71\x75\x65\x73\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6C\x6F\x67\x69\x6E","\x6C\x6F\x63\x61\x6C","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x77\x65\x6E\x74\x20\x77\x72\x6F\x6E\x67\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x74\x72\x79\x20\x61\x67\x61\x69\x6E\x2E","\x6A\x73\x6F\x6E","\x66\x6F\x72\x67\x6F\x74","\x62\x6F\x64\x79","\x45\x6D\x61\x69\x6C\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x20\x69\x73\x20\x6D\x69\x73\x73\x69\x6E\x67","\x67\x65\x6E\x65\x72\x61\x74\x65","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x52\x65\x73\x65\x74\x20\x45\x6D\x61\x69\x6C\x20\x73\x65\x6E\x74\x21","\x78\x43\x61\x6C\x6C\x79\x20\x4D\x6F\x74\x69\x6F\x6E\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x20\x52\x65\x73\x65\x74","\x59\x6F\x75\x20\x61\x72\x65\x20\x72\x65\x63\x65\x69\x76\x69\x6E\x67\x20\x74\x68\x69\x73\x20\x62\x65\x63\x61\x75\x73\x65\x20\x79\x6F\x75\x20\x28\x6F\x72\x20\x73\x6F\x6D\x65\x6F\x6E\x65\x20\x65\x6C\x73\x65\x29\x20\x68\x61\x76\x65\x20\x72\x65\x71\x75\x65\x73\x74\x65\x64\x20\x74\x68\x65\x20\x72\x65\x73\x65\x74\x20\x6F\x66\x20\x74\x68\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x66\x6F\x72\x20\x79\x6F\x75\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x2E\x0A\x0A","\x50\x6C\x65\x61\x73\x65\x20\x63\x6C\x69\x63\x6B\x20\x6F\x6E\x20\x74\x68\x65\x20\x66\x6F\x6C\x6C\x6F\x77\x69\x6E\x67\x20\x6C\x69\x6E\x6B\x2C\x20\x6F\x72\x20\x70\x61\x73\x74\x65\x20\x74\x68\x69\x73\x20\x69\x6E\x74\x6F\x20\x79\x6F\x75\x72\x20\x62\x72\x6F\x77\x73\x65\x72\x20\x74\x6F\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x74\x68\x65\x20\x70\x72\x6F\x63\x65\x73\x73\x3A\x0A\x0A","\x68\x74\x74\x70\x3A\x2F\x2F","\x68\x65\x61\x64\x65\x72\x73","\x2F\x72\x65\x73\x65\x74\x2F","\x0A\x0A","\x49\x66\x20\x79\x6F\x75\x20\x64\x69\x64\x20\x6E\x6F\x74\x20\x72\x65\x71\x75\x65\x73\x74\x20\x74\x68\x69\x73\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x69\x67\x6E\x6F\x72\x65\x20\x74\x68\x69\x73\x20\x65\x6D\x61\x69\x6C\x20\x61\x6E\x64\x20\x79\x6F\x75\x72\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x77\x69\x6C\x6C\x20\x72\x65\x6D\x61\x69\x6E\x20\x75\x6E\x63\x68\x61\x6E\x67\x65\x64\x2E\x0A","\x54\x68\x69\x73\x20\x65\x6D\x61\x69\x6C\x20\x69\x73\x20\x6E\x6F\x74\x20\x72\x65\x67\x69\x73\x74\x65\x72\x65\x64\x2E","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64\x54\x6F\x6B\x65\x6E","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64\x45\x78\x70\x69\x72\x65\x73","\x6E\x6F\x77","\x73\x61\x76\x65","\x72\x65\x73\x65\x74","\x50\x61\x73\x73\x77\x6F\x72\x64\x20\x72\x65\x73\x65\x74\x21","\x50\x61\x73\x73\x77\x6F\x72\x64\x20\x72\x65\x73\x65\x74\x20\x74\x6F\x6B\x65\x6E\x20\x69\x73\x20\x69\x6E\x76\x61\x6C\x69\x64\x20\x6F\x72\x20\x68\x61\x73\x20\x65\x78\x70\x69\x72\x65\x64\x2E","\x70\x61\x73\x73\x77\x6F\x72\x64","\x74\x6F\x6B\x65\x6E","\x70\x61\x72\x61\x6D\x73","\x75\x73\x65"];_0x79c7[0];var util=require(_0x79c7[1]);var passport=require(_0x79c7[2]);var LocalStrategy=require(_0x79c7[4])[_0x79c7[3]];var BPromise=require(_0x79c7[5]);var jayson=require(_0x79c7[6]);var _=require(_0x79c7[7]);var logger=require(_0x79c7[9])(_0x79c7[8]);var rs=require(_0x79c7[10]);var db=require(_0x79c7[12])[_0x79c7[11]];var signToken=require(_0x79c7[14])[_0x79c7[13]];var client=jayson[_0x79c7[16]][_0x79c7[15]]({port:9003});var getLicense=function(_0x193exd){return  new BPromise(function(_0x193exe,_0x193exf){var _0x193ex10=0;_0x193exd[_0x79c7[17]]!== _0x79c7[18]&& _0x193exe(_0x193exd);return db[_0x79c7[27]][_0x79c7[26]]({where:{role:_0x79c7[18],online:true,id:{$ne:_0x193exd[_0x79c7[25]]}}})[_0x79c7[22]](function(_0x193ex13){_0x193ex10= _0x193ex13;return require(_0x79c7[24])[_0x79c7[23]]()})[_0x79c7[22]](function(_0x193ex12){if(_0x193ex12&& _0x193ex12[_0x79c7[20]]&& _0x193ex10>= _0x193ex12[_0x79c7[20]]){return _0x193exf({message:_0x79c7[21]})};return _0x193exe(_0x193exd)})[_0x79c7[19]](function(_0x193ex11){return _0x193exf(_0x193ex11)})})};function localAuthenticate(_0x193ex15,_0x193ex16,_0x193ex17,_0x193ex18){var _0x193ex19;_0x193ex15[_0x79c7[34]]({where:{name:_0x193ex16[_0x79c7[31]](),role:{$or:[_0x79c7[32],_0x79c7[33],_0x79c7[18]]}}})[_0x79c7[22]](function(_0x193exd){if(!_0x193exd){return _0x193ex18(null,false,{message:_0x79c7[30]})};return getLicense(_0x193exd)})[_0x79c7[22]](function(_0x193exd){_0x193exd[_0x79c7[29]](_0x193ex17,function(_0x193ex1a,_0x193ex1b){if(_0x193ex1a){return _0x193ex18(_0x193ex1a)};if(!_0x193ex1b){return _0x193ex18(null,false,{message:_0x79c7[28]})}else {return _0x193ex18(null,_0x193exd)}})})[_0x79c7[19]](function(_0x193ex11){_0x193ex18(_0x193ex11)})}function sendServiceMail(_0x193ex1d){return db[_0x79c7[56]][_0x79c7[34]]({where:{service:true},attributes:[_0x79c7[25],_0x79c7[50],_0x79c7[51]],include:[{model:db[_0x79c7[55]],as:_0x79c7[42]}]})[_0x79c7[22]](function(_0x193ex1f){if(!_0x193ex1f){throw  new Error(_0x79c7[40])};var _0x193ex20={tls:{rejectUnauthorized:false}};if(_0x193ex1f[_0x79c7[42]][_0x79c7[41]]){_0x193ex20[_0x79c7[41]]= _0x193ex1f[_0x79c7[42]][_0x79c7[41]]}else {_0x193ex20[_0x79c7[43]]= _0x193ex1f[_0x79c7[42]][_0x79c7[43]];_0x193ex20[_0x79c7[44]]= _0x193ex1f[_0x79c7[42]][_0x79c7[44]];_0x193ex20[_0x79c7[45]]= _0x193ex1f[_0x79c7[42]][_0x79c7[45]]};if(_0x193ex1f[_0x79c7[42]][_0x79c7[46]]){_0x193ex20[_0x79c7[47]]= {user:_0x193ex1f[_0x79c7[42]][_0x79c7[33]],pass:_0x193ex1f[_0x79c7[42]][_0x79c7[48]]}};var _0x193ex21={account:_0x193ex20,message:_[_0x79c7[52]]({from:util[_0x79c7[39]](_0x79c7[49],_0x193ex1f[_0x79c7[50]],_0x193ex1f[_0x79c7[51]]|| _0x193ex1f[_0x79c7[42]][_0x79c7[33]])},_0x193ex1d)};return client[_0x79c7[54]](_0x79c7[53],_0x193ex21)})[_0x79c7[22]](function(_0x193ex1e){if(_0x193ex1e[_0x79c7[35]]){throw  new Error(util[_0x79c7[39]](_0x79c7[36],_0x193ex1e[_0x79c7[35]][_0x79c7[37]]|| JSON[_0x79c7[38]](_0x193ex1e[_0x79c7[35]])))};return true})}function handleError(_0x193ex23,_0x193ex24,_0x193ex25){return _0x193ex23[_0x79c7[59]](_0x193ex24|| 500)[_0x79c7[58]]({message:_0x193ex25?(_0x193ex25[_0x79c7[37]]|| _0x193ex25):_0x79c7[57]})}exports[_0x79c7[60]]= function(_0x193ex26,_0x193ex23,_0x193ex27){passport[_0x79c7[29]](_0x79c7[61],function(_0x193ex11,_0x193exd,_0x193ex28){var _0x193ex25=_0x193ex11|| _0x193ex28;if(_0x193ex25){return handleError(_0x193ex23,401,_0x193ex25)};if(!_0x193exd){return handleError(_0x193ex23,404,{message:_0x79c7[62]})};var _0x193ex29=signToken(_0x193exd[_0x79c7[25]],_0x193exd[_0x79c7[17]]);_0x193ex23[_0x79c7[63]]({id:_0x193exd[_0x79c7[25]],token:_0x193ex29})})(_0x193ex26,_0x193ex23,_0x193ex27)};exports[_0x79c7[64]]= function(_0x193ex26,_0x193ex23,_0x193ex27){if(!_0x193ex26[_0x79c7[65]][_0x79c7[51]]){return handleError(_0x193ex23,500,{message:_0x79c7[66]})};var _0x193ex29=rs[_0x79c7[67]]();_0x193ex26[_0x79c7[65]][_0x79c7[51]]= _0x193ex26[_0x79c7[65]][_0x79c7[51]][_0x79c7[31]]()[_0x79c7[68]]();return db[_0x79c7[27]][_0x79c7[34]]({where:{email:_0x193ex26[_0x79c7[65]][_0x79c7[51]]}})[_0x79c7[22]](function(_0x193exd){if(!_0x193exd){throw  new Error(_0x79c7[78])};_0x193exd[_0x79c7[79]]= _0x193ex29;_0x193exd[_0x79c7[80]]= Date[_0x79c7[81]]()+ 3600000;return _0x193exd[_0x79c7[82]]()})[_0x79c7[22]](function(){return sendServiceMail({to:_0x193ex26[_0x79c7[65]][_0x79c7[51]],subject:_0x79c7[70],text:_0x79c7[71]+ _0x79c7[72]+ _0x79c7[73]+ _0x193ex26[_0x79c7[74]][_0x79c7[43]]+ _0x79c7[75]+ _0x193ex29+ _0x79c7[76]+ _0x79c7[77]})})[_0x79c7[22]](function(){_0x193ex23[_0x79c7[59]](200)[_0x79c7[58]]({message:_0x79c7[69]})})[_0x79c7[19]](function(_0x193ex11){return handleError(_0x193ex23,500,_0x193ex11)})};exports[_0x79c7[83]]= function(_0x193ex26,_0x193ex23,_0x193ex27){return db[_0x79c7[27]][_0x79c7[34]]({where:{resetPasswordToken:_0x193ex26[_0x79c7[88]][_0x79c7[87]],resetPasswordExpires:{$gt:Date[_0x79c7[81]]()}}})[_0x79c7[22]](function(_0x193exd){if(!_0x193exd){throw  new Error(_0x79c7[85])};_0x193exd[_0x79c7[86]]= _0x193ex26[_0x79c7[65]][_0x79c7[86]];_0x193exd[_0x79c7[79]]= null;_0x193exd[_0x79c7[80]]= null;return _0x193exd[_0x79c7[82]]()})[_0x79c7[22]](function(){_0x193ex23[_0x79c7[59]](200)[_0x79c7[58]]({message:_0x79c7[84]})})[_0x79c7[19]](function(_0x193ex11){return handleError(_0x193ex23,500,_0x193ex11)})};passport[_0x79c7[89]]( new LocalStrategy({usernameField:_0x79c7[50],passwordField:_0x79c7[86]},function(_0x193ex16,_0x193ex17,_0x193ex18){return localAuthenticate(db.User,_0x193ex16,_0x193ex17,_0x193ex18)}))
\ No newline at end of file
index d2ef0e9..78bcaba 100644 (file)
@@ -1 +1 @@
-var _0xe847=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x61\x75\x74\x68\x4C\x6F\x63\x61\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x6C\x6F\x67\x69\x6E","\x70\x6F\x73\x74","\x2F\x66\x6F\x72\x67\x6F\x74","\x66\x6F\x72\x67\x6F\x74","\x2F\x72\x65\x73\x65\x74\x2F\x3A\x74\x6F\x6B\x65\x6E","\x72\x65\x73\x65\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xe847[0];var express=require(_0xe847[1]);var router=express.Router();var controller=require(_0xe847[2]);router[_0xe847[5]](_0xe847[3],controller[_0xe847[4]]);router[_0xe847[5]](_0xe847[6],controller[_0xe847[7]]);router[_0xe847[5]](_0xe847[8],controller[_0xe847[9]]);module[_0xe847[10]]= router
\ No newline at end of file
+var _0xc5f9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x61\x75\x74\x68\x4C\x6F\x63\x61\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x6C\x6F\x67\x69\x6E","\x70\x6F\x73\x74","\x2F\x66\x6F\x72\x67\x6F\x74","\x66\x6F\x72\x67\x6F\x74","\x2F\x72\x65\x73\x65\x74\x2F\x3A\x74\x6F\x6B\x65\x6E","\x72\x65\x73\x65\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xc5f9[0];var express=require(_0xc5f9[1]);var router=express.Router();var controller=require(_0xc5f9[2]);router[_0xc5f9[5]](_0xc5f9[3],controller[_0xc5f9[4]]);router[_0xc5f9[5]](_0xc5f9[6],controller[_0xc5f9[7]]);router[_0xc5f9[5]](_0xc5f9[8],controller[_0xc5f9[9]]);module[_0xc5f9[10]]= router
\ No newline at end of file
index b8ef987..947dd7d 100644 (file)
@@ -1 +1 @@
-var _0x23dd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x49\x4E\x54\x45\x47\x45\x52"];_0x23dd[0];var Sequelize=require(_0x23dd[1]);module[_0x23dd[2]]= {name:{type:Sequelize[_0x23dd[3]],allowNull:false},channel:{type:Sequelize[_0x23dd[3]]},description:{type:Sequelize[_0x23dd[3]]},status:{type:Sequelize[_0x23dd[4]],defaultValue:false},timeout:{type:Sequelize[_0x23dd[5]],defaultValue:10}}
\ No newline at end of file
+var _0x790a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x49\x4E\x54\x45\x47\x45\x52"];_0x790a[0];var Sequelize=require(_0x790a[1]);module[_0x790a[2]]= {name:{type:Sequelize[_0x790a[3]],allowNull:false},channel:{type:Sequelize[_0x790a[3]]},description:{type:Sequelize[_0x790a[3]]},status:{type:Sequelize[_0x790a[4]],defaultValue:false},timeout:{type:Sequelize[_0x790a[5]],defaultValue:10}}
\ No newline at end of file
index b23ed56..15ffe06 100644 (file)
@@ -1 +1 @@
-var _0xc5f2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x61\x64\x64\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x69\x64\x73","\x6F\x6D\x69\x74","\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x67\x65\x74\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E\x73","\x41\x63\x74\x69\x6F\x6E","\x67\x65\x74\x41\x63\x74\x69\x6F\x6E\x73"];_0xc5f2[0];var jsonpatch=require(_0xc5f2[1]);var rp=require(_0xc5f2[2]);var moment=require(_0xc5f2[3]);var BPromise=require(_0xc5f2[4]);var Mustache=require(_0xc5f2[5]);var util=require(_0xc5f2[6]);var path=require(_0xc5f2[7]);var sox=require(_0xc5f2[8]);var csv=require(_0xc5f2[9]);var ejs=require(_0xc5f2[10]);var fs=require(_0xc5f2[11]);var _=require(_0xc5f2[12]);var squel=require(_0xc5f2[13]);var crypto=require(_0xc5f2[14]);var jsforce=require(_0xc5f2[15]);var deskjs=require(_0xc5f2[16]);var toCsv=require(_0xc5f2[9]);var querystring=require(_0xc5f2[17]);var Papa=require(_0xc5f2[18]);var qs=require(_0xc5f2[19]);var logger=require(_0xc5f2[21])(_0xc5f2[20]);var utils=require(_0xc5f2[22]);var config=require(_0xc5f2[23]);var db=require(_0xc5f2[25])[_0xc5f2[24]];function respondWithStatusCode(_0xd764x1a,_0xd764x1b){_0xd764x1b= _0xd764x1b|| 204;return function(_0xd764x1c){if(_0xd764x1c){return _0xd764x1a[_0xc5f2[26]](_0xd764x1b)};return _0xd764x1a[_0xc5f2[28]](_0xd764x1b)[_0xc5f2[27]]()}}function respondWithResult(_0xd764x1a,_0xd764x1b){_0xd764x1b= _0xd764x1b|| 200;return function(_0xd764x1c){if(_0xd764x1c){return _0xd764x1a[_0xc5f2[28]](_0xd764x1b)[_0xc5f2[29]](_0xd764x1c)}}}function respondWithFilteredResult(_0xd764x1a,_0xd764x1f){return function(_0xd764x1c){if(_0xd764x1c){var _0xd764x20=_0xd764x1c[_0xc5f2[30]],_0xd764x21=_0xd764x1f[_0xc5f2[31]],_0xd764x22=_0xd764x1f[_0xc5f2[31]]+ _0xd764x1f[_0xc5f2[32]],_0xd764x1b;if(_0xd764x22>= _0xd764x20){_0xd764x22= _0xd764x20;_0xd764x1b= 200}else {_0xd764x1b= 206};_0xd764x1a[_0xc5f2[28]](_0xd764x1b);return _0xd764x1a[_0xc5f2[36]](_0xc5f2[33],_0xd764x21+ _0xc5f2[34]+ _0xd764x22+ _0xc5f2[35]+ _0xd764x20)[_0xc5f2[29]](_0xd764x1c)};return null}}function patchUpdates(_0xd764x24){return function(_0xd764x1c){try{jsonpatch[_0xc5f2[37]](_0xd764x1c,_0xd764x24,true)}catch(err){return BPromise[_0xc5f2[38]](err)};return _0xd764x1c[_0xc5f2[39]]()}}function saveUpdates(_0xd764x26,_0xd764x1b){return function(_0xd764x1c){if(_0xd764x1c){return _0xd764x1c[_0xc5f2[41]](_0xd764x26)[_0xc5f2[40]](function(_0xd764x27){return _0xd764x27})};return null}}function removeEntity(_0xd764x1a,_0xd764x1b){return function(_0xd764x1c){if(_0xd764x1c){return _0xd764x1c[_0xc5f2[42]]()[_0xc5f2[40]](function(){_0xd764x1a[_0xc5f2[28]](204)[_0xc5f2[27]]()})}}}function handleEntityNotFound(_0xd764x1a,_0xd764x1b){return function(_0xd764x1c){if(!_0xd764x1c){_0xd764x1a[_0xc5f2[26]](404)};return _0xd764x1c}}function handleError(_0xd764x1a,_0xd764x1b){_0xd764x1b= _0xd764x1b|| 500;return function(_0xd764x2b){logger[_0xc5f2[44]](_0xd764x2b[_0xc5f2[43]]);if(_0xd764x2b[_0xc5f2[45]]){delete _0xd764x2b[_0xc5f2[45]]};_0xd764x1a[_0xc5f2[28]](_0xd764x1b)[_0xc5f2[46]](_0xd764x2b)}}exports[_0xc5f2[47]]= function(_0xd764x2c,_0xd764x1a){var _0xd764x1f={},_0xd764x2d={},_0xd764x2e={count:0,rows:[]};_0xd764x2d[_0xc5f2[48]]= _[_0xc5f2[51]](db[_0xc5f2[50]][_0xc5f2[49]]);var _0xd764x2f={dateStart:_0xd764x2c[_0xc5f2[53]][_0xc5f2[52]],dateEnd:_0xd764x2c[_0xc5f2[53]][_0xc5f2[54]]};delete _0xd764x2c[_0xc5f2[53]][_0xc5f2[52]];delete _0xd764x2c[_0xc5f2[53]][_0xc5f2[54]];_0xd764x2d[_0xc5f2[53]]= _[_0xc5f2[51]](_0xd764x2c[_0xc5f2[53]]);_0xd764x2d[_0xc5f2[55]]= _[_0xc5f2[56]](_0xd764x2d[_0xc5f2[48]],_0xd764x2d[_0xc5f2[53]]);_0xd764x1f[_0xc5f2[57]]= _[_0xc5f2[56]](_0xd764x2d[_0xc5f2[48]],qs[_0xc5f2[58]](_0xd764x2c[_0xc5f2[53]][_0xc5f2[58]]));_0xd764x1f[_0xc5f2[57]]= (_0xd764x1f[_0xc5f2[57]][_0xc5f2[59]])?_0xd764x1f[_0xc5f2[57]]:_0xd764x2d[_0xc5f2[48]];if(!_0xd764x2c[_0xc5f2[53]][_0xc5f2[61]](_0xc5f2[60])){_0xd764x1f[_0xc5f2[32]]= qs[_0xc5f2[32]](_0xd764x2c[_0xc5f2[53]][_0xc5f2[32]]);_0xd764x1f[_0xc5f2[31]]= qs[_0xc5f2[31]](_0xd764x2c[_0xc5f2[53]][_0xc5f2[31]])};_0xd764x1f[_0xc5f2[62]]= qs[_0xc5f2[63]](_0xd764x2c[_0xc5f2[53]][_0xc5f2[63]]);_0xd764x1f[_0xc5f2[64]]= qs[_0xc5f2[55]](_[_0xc5f2[65]](_0xd764x2c[_0xc5f2[53]],_0xd764x2d[_0xc5f2[55]]));if(_0xd764x2f[_0xc5f2[52]]){if(_0xd764x2f[_0xc5f2[54]]){_0xd764x2f[_0xc5f2[54]]= moment(_0xd764x2f[_0xc5f2[54]])[_0xc5f2[67]](1,_0xc5f2[66])}else {_0xd764x2f[_0xc5f2[54]]= moment(_0xd764x2f[_0xc5f2[52]])[_0xc5f2[67]](1,_0xc5f2[66])};_[_0xc5f2[68]](_0xd764x1f[_0xc5f2[64]],{createdAt:{$gte:_0xd764x2f[_0xc5f2[52]],$lte:_0xd764x2f[_0xc5f2[54]]}})};if(_0xd764x2c[_0xc5f2[53]][_0xc5f2[69]]){_0xd764x1f[_0xc5f2[64]]= _[_0xc5f2[68]](_0xd764x1f[_0xc5f2[64]],{$or:_[_0xc5f2[71]](_0xd764x1f[_0xc5f2[57]],function(_0xd764x30){var _0xd764x2e={};_0xd764x2e[_0xd764x30]= {$like:_0xc5f2[70]+ _0xd764x2c[_0xc5f2[53]][_0xc5f2[69]]+ _0xc5f2[70]};return _0xd764x2e})})};_0xd764x1f= _[_0xc5f2[68]]({},_0xd764x1f,_0xd764x2c[_0xc5f2[72]]);var _0xd764x31={where:_0xd764x1f[_0xc5f2[64]]};return db[_0xc5f2[50]][_0xc5f2[30]](_0xd764x31)[_0xc5f2[40]](function(_0xd764x20){_0xd764x2e[_0xc5f2[30]]= _0xd764x20;if(_0xd764x2c[_0xc5f2[53]][_0xc5f2[75]]){_0xd764x1f[_0xc5f2[76]]= [{all:true}]};return db[_0xc5f2[50]][_0xc5f2[77]](_0xd764x1f)})[_0xc5f2[40]](function(_0xd764x32){_0xd764x2e[_0xc5f2[74]]= _0xd764x32;return _0xd764x2e})[_0xc5f2[40]](respondWithFilteredResult(_0xd764x1a,_0xd764x1f))[_0xc5f2[73]](handleError(_0xd764x1a,null))};exports[_0xc5f2[78]]= function(_0xd764x2c,_0xd764x1a){var _0xd764x1f={raw:false,where:{id:_0xd764x2c[_0xc5f2[80]][_0xc5f2[79]]}},_0xd764x2d={};_0xd764x2d[_0xc5f2[48]]= _[_0xc5f2[51]](db[_0xc5f2[50]][_0xc5f2[49]]);_0xd764x2d[_0xc5f2[53]]= _[_0xc5f2[51]](_0xd764x2c[_0xc5f2[53]]);_0xd764x2d[_0xc5f2[55]]= _[_0xc5f2[56]](_0xd764x2d[_0xc5f2[48]],_0xd764x2d[_0xc5f2[53]]);_0xd764x1f[_0xc5f2[57]]= _[_0xc5f2[56]](_0xd764x2d[_0xc5f2[48]],qs[_0xc5f2[58]](_0xd764x2c[_0xc5f2[53]][_0xc5f2[58]]));_0xd764x1f[_0xc5f2[57]]= (_0xd764x1f[_0xc5f2[57]][_0xc5f2[59]])?_0xd764x1f[_0xc5f2[57]]:_0xd764x2d[_0xc5f2[48]];if(_0xd764x2c[_0xc5f2[53]][_0xc5f2[75]]){_0xd764x1f[_0xc5f2[76]]= [{all:true}]};_0xd764x1f= _[_0xc5f2[68]]({},_0xd764x1f,_0xd764x2c[_0xc5f2[72]]);return db[_0xc5f2[50]][_0xc5f2[81]](_0xd764x1f)[_0xc5f2[40]](handleEntityNotFound(_0xd764x1a,null))[_0xc5f2[40]](respondWithResult(_0xd764x1a,null))[_0xc5f2[73]](handleError(_0xd764x1a,null))};exports[_0xc5f2[82]]= function(_0xd764x2c,_0xd764x1a){return db[_0xc5f2[50]][_0xc5f2[82]](_0xd764x2c[_0xc5f2[83]],{})[_0xc5f2[40]](respondWithResult(_0xd764x1a,201))[_0xc5f2[73]](handleError(_0xd764x1a,null))};exports[_0xc5f2[41]]= function(_0xd764x2c,_0xd764x1a){if(_0xd764x2c[_0xc5f2[83]][_0xc5f2[79]]){delete _0xd764x2c[_0xc5f2[83]][_0xc5f2[79]]};return db[_0xc5f2[50]][_0xc5f2[81]]({where:{id:_0xd764x2c[_0xc5f2[80]][_0xc5f2[79]]}})[_0xc5f2[40]](handleEntityNotFound(_0xd764x1a,null))[_0xc5f2[40]](saveUpdates(_0xd764x2c[_0xc5f2[83]],null))[_0xc5f2[40]](respondWithResult(_0xd764x1a,null))[_0xc5f2[73]](handleError(_0xd764x1a,null))};exports[_0xc5f2[42]]= function(_0xd764x2c,_0xd764x1a){return db[_0xc5f2[50]][_0xc5f2[81]]({where:{id:_0xd764x2c[_0xc5f2[80]][_0xc5f2[79]]}})[_0xc5f2[40]](handleEntityNotFound(_0xd764x1a,null))[_0xc5f2[40]](removeEntity(_0xd764x1a,null))[_0xc5f2[73]](handleError(_0xd764x1a,null))};exports[_0xc5f2[84]]= function(_0xd764x2c,_0xd764x1a,_0xd764x33){return db[_0xc5f2[87]][_0xc5f2[81]]({where:{id:_0xd764x2c[_0xc5f2[80]][_0xc5f2[79]]}})[_0xc5f2[40]](handleEntityNotFound(_0xd764x1a,null))[_0xc5f2[40]](function(_0xd764x1c){if(_0xd764x1c){return _0xd764x1c[_0xc5f2[84]](_0xd764x2c[_0xc5f2[83]][_0xc5f2[85]],_[_0xc5f2[86]](_0xd764x2c[_0xc5f2[83]],[_0xc5f2[85],_0xc5f2[79]])|| {})}})[_0xc5f2[40]](respondWithResult(_0xd764x1a,null))[_0xc5f2[73]](handleError(_0xd764x1a,null))};exports[_0xc5f2[88]]= function(_0xd764x2c,_0xd764x1c,_0xd764x33){var _0xd764x1f={};var _0xd764x2d={};var _0xd764x34;var _0xd764x20;return db[_0xc5f2[50]][_0xc5f2[89]]({where:{id:_0xd764x2c[_0xc5f2[80]][_0xc5f2[79]]}})[_0xc5f2[40]](handleEntityNotFound(_0xd764x1c,null))[_0xc5f2[40]](function(_0xd764x1c){if(_0xd764x1c){_0xd764x34= _0xd764x1c;_0xd764x2d[_0xc5f2[48]]= _[_0xc5f2[51]](db[_0xc5f2[87]][_0xc5f2[49]]);_0xd764x2d[_0xc5f2[53]]= _[_0xc5f2[51]](_0xd764x2c[_0xc5f2[53]]);_0xd764x2d[_0xc5f2[55]]= _[_0xc5f2[56]](_0xd764x2d[_0xc5f2[48]],_0xd764x2d[_0xc5f2[53]]);_0xd764x1f[_0xc5f2[57]]= _[_0xc5f2[56]](_0xd764x2d[_0xc5f2[48]],qs[_0xc5f2[58]](_0xd764x2c[_0xc5f2[53]][_0xc5f2[58]]));_0xd764x1f[_0xc5f2[57]]= (_0xd764x1f[_0xc5f2[57]][_0xc5f2[59]])?_0xd764x1f[_0xc5f2[57]]:_0xd764x2d[_0xc5f2[48]];_0xd764x1f[_0xc5f2[62]]= qs[_0xc5f2[63]](_0xd764x2c[_0xc5f2[53]][_0xc5f2[63]]);_0xd764x1f[_0xc5f2[64]]= qs[_0xc5f2[55]](_[_0xc5f2[65]](_0xd764x2c[_0xc5f2[53]],_0xd764x2d[_0xc5f2[55]]));if(_0xd764x2c[_0xc5f2[53]][_0xc5f2[69]]){_0xd764x1f[_0xc5f2[64]]= _[_0xc5f2[68]](_0xd764x1f[_0xc5f2[64]],{$or:_[_0xc5f2[71]](_0xd764x1f[_0xc5f2[57]],function(_0xd764x30){var _0xd764x2e={};_0xd764x2e[_0xd764x30]= {$like:_0xc5f2[70]+ _0xd764x2c[_0xc5f2[53]][_0xc5f2[69]]+ _0xc5f2[70]};return _0xd764x2e})})};_0xd764x1f= _[_0xc5f2[68]]({},_0xd764x1f,_0xd764x2c[_0xc5f2[72]]);return _0xd764x34[_0xc5f2[88]](_0xd764x1f)}})[_0xc5f2[40]](function(_0xd764x35){if(_0xd764x35){_0xd764x20= _0xd764x35[_0xc5f2[59]];if(!_0xd764x2c[_0xc5f2[53]][_0xc5f2[61]](_0xc5f2[60])){_0xd764x1f[_0xc5f2[32]]= qs[_0xc5f2[32]](_0xd764x2c[_0xc5f2[53]][_0xc5f2[32]]);_0xd764x1f[_0xc5f2[31]]= qs[_0xc5f2[31]](_0xd764x2c[_0xc5f2[53]][_0xc5f2[31]])};return _0xd764x34[_0xc5f2[88]](_0xd764x1f)}})[_0xc5f2[40]](function(_0xd764x32){if(_0xd764x32){return _0xd764x32?{count:_0xd764x20,rows:_0xd764x32}:null}})[_0xc5f2[40]](respondWithResult(_0xd764x1c,null))[_0xc5f2[73]](handleError(_0xd764x1c,null))};exports[_0xc5f2[90]]= function(_0xd764x2c,_0xd764x1a,_0xd764x33){return db[_0xc5f2[91]][_0xc5f2[81]]({where:{id:_0xd764x2c[_0xc5f2[80]][_0xc5f2[79]]}})[_0xc5f2[40]](handleEntityNotFound(_0xd764x1a,null))[_0xc5f2[40]](function(_0xd764x1c){if(_0xd764x1c){return _0xd764x1c[_0xc5f2[90]](_0xd764x2c[_0xc5f2[83]][_0xc5f2[85]],_[_0xc5f2[86]](_0xd764x2c[_0xc5f2[83]],[_0xc5f2[85],_0xc5f2[79]])|| {})}})[_0xc5f2[40]](respondWithResult(_0xd764x1a,null))[_0xc5f2[73]](handleError(_0xd764x1a,null))};exports[_0xc5f2[92]]= function(_0xd764x2c,_0xd764x1c,_0xd764x33){var _0xd764x1f={};var _0xd764x2d={};var _0xd764x34;var _0xd764x20;return db[_0xc5f2[50]][_0xc5f2[89]]({where:{id:_0xd764x2c[_0xc5f2[80]][_0xc5f2[79]]}})[_0xc5f2[40]](handleEntityNotFound(_0xd764x1c,null))[_0xc5f2[40]](function(_0xd764x1c){if(_0xd764x1c){_0xd764x34= _0xd764x1c;_0xd764x2d[_0xc5f2[48]]= _[_0xc5f2[51]](db[_0xc5f2[91]][_0xc5f2[49]]);_0xd764x2d[_0xc5f2[53]]= _[_0xc5f2[51]](_0xd764x2c[_0xc5f2[53]]);_0xd764x2d[_0xc5f2[55]]= _[_0xc5f2[56]](_0xd764x2d[_0xc5f2[48]],_0xd764x2d[_0xc5f2[53]]);_0xd764x1f[_0xc5f2[57]]= _[_0xc5f2[56]](_0xd764x2d[_0xc5f2[48]],qs[_0xc5f2[58]](_0xd764x2c[_0xc5f2[53]][_0xc5f2[58]]));_0xd764x1f[_0xc5f2[57]]= (_0xd764x1f[_0xc5f2[57]][_0xc5f2[59]])?_0xd764x1f[_0xc5f2[57]]:_0xd764x2d[_0xc5f2[48]];_0xd764x1f[_0xc5f2[62]]= qs[_0xc5f2[63]](_0xd764x2c[_0xc5f2[53]][_0xc5f2[63]]);_0xd764x1f[_0xc5f2[64]]= qs[_0xc5f2[55]](_[_0xc5f2[65]](_0xd764x2c[_0xc5f2[53]],_0xd764x2d[_0xc5f2[55]]));if(_0xd764x2c[_0xc5f2[53]][_0xc5f2[69]]){_0xd764x1f[_0xc5f2[64]]= _[_0xc5f2[68]](_0xd764x1f[_0xc5f2[64]],{$or:_[_0xc5f2[71]](_0xd764x1f[_0xc5f2[57]],function(_0xd764x30){var _0xd764x2e={};_0xd764x2e[_0xd764x30]= {$like:_0xc5f2[70]+ _0xd764x2c[_0xc5f2[53]][_0xc5f2[69]]+ _0xc5f2[70]};return _0xd764x2e})})};_0xd764x1f= _[_0xc5f2[68]]({},_0xd764x1f,_0xd764x2c[_0xc5f2[72]]);return _0xd764x34[_0xc5f2[92]](_0xd764x1f)}})[_0xc5f2[40]](function(_0xd764x35){if(_0xd764x35){_0xd764x20= _0xd764x35[_0xc5f2[59]];if(!_0xd764x2c[_0xc5f2[53]][_0xc5f2[61]](_0xc5f2[60])){_0xd764x1f[_0xc5f2[32]]= qs[_0xc5f2[32]](_0xd764x2c[_0xc5f2[53]][_0xc5f2[32]]);_0xd764x1f[_0xc5f2[31]]= qs[_0xc5f2[31]](_0xd764x2c[_0xc5f2[53]][_0xc5f2[31]])};return _0xd764x34[_0xc5f2[92]](_0xd764x1f)}})[_0xc5f2[40]](function(_0xd764x32){if(_0xd764x32){return _0xd764x32?{count:_0xd764x20,rows:_0xd764x32}:null}})[_0xc5f2[40]](respondWithResult(_0xd764x1c,null))[_0xc5f2[73]](handleError(_0xd764x1c,null))}
\ No newline at end of file
+var _0x335c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x61\x64\x64\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x69\x64\x73","\x6F\x6D\x69\x74","\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x67\x65\x74\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E\x73","\x41\x63\x74\x69\x6F\x6E","\x67\x65\x74\x41\x63\x74\x69\x6F\x6E\x73"];_0x335c[0];var jsonpatch=require(_0x335c[1]);var rp=require(_0x335c[2]);var moment=require(_0x335c[3]);var BPromise=require(_0x335c[4]);var Mustache=require(_0x335c[5]);var util=require(_0x335c[6]);var path=require(_0x335c[7]);var sox=require(_0x335c[8]);var csv=require(_0x335c[9]);var ejs=require(_0x335c[10]);var fs=require(_0x335c[11]);var _=require(_0x335c[12]);var squel=require(_0x335c[13]);var crypto=require(_0x335c[14]);var jsforce=require(_0x335c[15]);var deskjs=require(_0x335c[16]);var toCsv=require(_0x335c[9]);var querystring=require(_0x335c[17]);var Papa=require(_0x335c[18]);var qs=require(_0x335c[19]);var logger=require(_0x335c[21])(_0x335c[20]);var utils=require(_0x335c[22]);var config=require(_0x335c[23]);var db=require(_0x335c[25])[_0x335c[24]];function respondWithStatusCode(_0x1da4x1a,_0x1da4x1b){_0x1da4x1b= _0x1da4x1b|| 204;return function(_0x1da4x1c){if(_0x1da4x1c){return _0x1da4x1a[_0x335c[26]](_0x1da4x1b)};return _0x1da4x1a[_0x335c[28]](_0x1da4x1b)[_0x335c[27]]()}}function respondWithResult(_0x1da4x1a,_0x1da4x1b){_0x1da4x1b= _0x1da4x1b|| 200;return function(_0x1da4x1c){if(_0x1da4x1c){return _0x1da4x1a[_0x335c[28]](_0x1da4x1b)[_0x335c[29]](_0x1da4x1c)}}}function respondWithFilteredResult(_0x1da4x1a,_0x1da4x1f){return function(_0x1da4x1c){if(_0x1da4x1c){var _0x1da4x20=_0x1da4x1c[_0x335c[30]],_0x1da4x21=_0x1da4x1f[_0x335c[31]],_0x1da4x22=_0x1da4x1f[_0x335c[31]]+ _0x1da4x1f[_0x335c[32]],_0x1da4x1b;if(_0x1da4x22>= _0x1da4x20){_0x1da4x22= _0x1da4x20;_0x1da4x1b= 200}else {_0x1da4x1b= 206};_0x1da4x1a[_0x335c[28]](_0x1da4x1b);return _0x1da4x1a[_0x335c[36]](_0x335c[33],_0x1da4x21+ _0x335c[34]+ _0x1da4x22+ _0x335c[35]+ _0x1da4x20)[_0x335c[29]](_0x1da4x1c)};return null}}function patchUpdates(_0x1da4x24){return function(_0x1da4x1c){try{jsonpatch[_0x335c[37]](_0x1da4x1c,_0x1da4x24,true)}catch(err){return BPromise[_0x335c[38]](err)};return _0x1da4x1c[_0x335c[39]]()}}function saveUpdates(_0x1da4x26,_0x1da4x1b){return function(_0x1da4x1c){if(_0x1da4x1c){return _0x1da4x1c[_0x335c[41]](_0x1da4x26)[_0x335c[40]](function(_0x1da4x27){return _0x1da4x27})};return null}}function removeEntity(_0x1da4x1a,_0x1da4x1b){return function(_0x1da4x1c){if(_0x1da4x1c){return _0x1da4x1c[_0x335c[42]]()[_0x335c[40]](function(){_0x1da4x1a[_0x335c[28]](204)[_0x335c[27]]()})}}}function handleEntityNotFound(_0x1da4x1a,_0x1da4x1b){return function(_0x1da4x1c){if(!_0x1da4x1c){_0x1da4x1a[_0x335c[26]](404)};return _0x1da4x1c}}function handleError(_0x1da4x1a,_0x1da4x1b){_0x1da4x1b= _0x1da4x1b|| 500;return function(_0x1da4x2b){logger[_0x335c[44]](_0x1da4x2b[_0x335c[43]]);if(_0x1da4x2b[_0x335c[45]]){delete _0x1da4x2b[_0x335c[45]]};_0x1da4x1a[_0x335c[28]](_0x1da4x1b)[_0x335c[46]](_0x1da4x2b)}}exports[_0x335c[47]]= function(_0x1da4x2c,_0x1da4x1a){var _0x1da4x1f={},_0x1da4x2d={},_0x1da4x2e={count:0,rows:[]};_0x1da4x2d[_0x335c[48]]= _[_0x335c[51]](db[_0x335c[50]][_0x335c[49]]);var _0x1da4x2f={dateStart:_0x1da4x2c[_0x335c[53]][_0x335c[52]],dateEnd:_0x1da4x2c[_0x335c[53]][_0x335c[54]]};delete _0x1da4x2c[_0x335c[53]][_0x335c[52]];delete _0x1da4x2c[_0x335c[53]][_0x335c[54]];_0x1da4x2d[_0x335c[53]]= _[_0x335c[51]](_0x1da4x2c[_0x335c[53]]);_0x1da4x2d[_0x335c[55]]= _[_0x335c[56]](_0x1da4x2d[_0x335c[48]],_0x1da4x2d[_0x335c[53]]);_0x1da4x1f[_0x335c[57]]= _[_0x335c[56]](_0x1da4x2d[_0x335c[48]],qs[_0x335c[58]](_0x1da4x2c[_0x335c[53]][_0x335c[58]]));_0x1da4x1f[_0x335c[57]]= (_0x1da4x1f[_0x335c[57]][_0x335c[59]])?_0x1da4x1f[_0x335c[57]]:_0x1da4x2d[_0x335c[48]];if(!_0x1da4x2c[_0x335c[53]][_0x335c[61]](_0x335c[60])){_0x1da4x1f[_0x335c[32]]= qs[_0x335c[32]](_0x1da4x2c[_0x335c[53]][_0x335c[32]]);_0x1da4x1f[_0x335c[31]]= qs[_0x335c[31]](_0x1da4x2c[_0x335c[53]][_0x335c[31]])};_0x1da4x1f[_0x335c[62]]= qs[_0x335c[63]](_0x1da4x2c[_0x335c[53]][_0x335c[63]]);_0x1da4x1f[_0x335c[64]]= qs[_0x335c[55]](_[_0x335c[65]](_0x1da4x2c[_0x335c[53]],_0x1da4x2d[_0x335c[55]]));if(_0x1da4x2f[_0x335c[52]]){if(_0x1da4x2f[_0x335c[54]]){_0x1da4x2f[_0x335c[54]]= moment(_0x1da4x2f[_0x335c[54]])[_0x335c[67]](1,_0x335c[66])}else {_0x1da4x2f[_0x335c[54]]= moment(_0x1da4x2f[_0x335c[52]])[_0x335c[67]](1,_0x335c[66])};_[_0x335c[68]](_0x1da4x1f[_0x335c[64]],{createdAt:{$gte:_0x1da4x2f[_0x335c[52]],$lte:_0x1da4x2f[_0x335c[54]]}})};if(_0x1da4x2c[_0x335c[53]][_0x335c[69]]){_0x1da4x1f[_0x335c[64]]= _[_0x335c[68]](_0x1da4x1f[_0x335c[64]],{$or:_[_0x335c[71]](_0x1da4x1f[_0x335c[57]],function(_0x1da4x30){var _0x1da4x2e={};_0x1da4x2e[_0x1da4x30]= {$like:_0x335c[70]+ _0x1da4x2c[_0x335c[53]][_0x335c[69]]+ _0x335c[70]};return _0x1da4x2e})})};_0x1da4x1f= _[_0x335c[68]]({},_0x1da4x1f,_0x1da4x2c[_0x335c[72]]);var _0x1da4x31={where:_0x1da4x1f[_0x335c[64]]};return db[_0x335c[50]][_0x335c[30]](_0x1da4x31)[_0x335c[40]](function(_0x1da4x20){_0x1da4x2e[_0x335c[30]]= _0x1da4x20;if(_0x1da4x2c[_0x335c[53]][_0x335c[75]]){_0x1da4x1f[_0x335c[76]]= [{all:true}]};return db[_0x335c[50]][_0x335c[77]](_0x1da4x1f)})[_0x335c[40]](function(_0x1da4x32){_0x1da4x2e[_0x335c[74]]= _0x1da4x32;return _0x1da4x2e})[_0x335c[40]](respondWithFilteredResult(_0x1da4x1a,_0x1da4x1f))[_0x335c[73]](handleError(_0x1da4x1a,null))};exports[_0x335c[78]]= function(_0x1da4x2c,_0x1da4x1a){var _0x1da4x1f={raw:false,where:{id:_0x1da4x2c[_0x335c[80]][_0x335c[79]]}},_0x1da4x2d={};_0x1da4x2d[_0x335c[48]]= _[_0x335c[51]](db[_0x335c[50]][_0x335c[49]]);_0x1da4x2d[_0x335c[53]]= _[_0x335c[51]](_0x1da4x2c[_0x335c[53]]);_0x1da4x2d[_0x335c[55]]= _[_0x335c[56]](_0x1da4x2d[_0x335c[48]],_0x1da4x2d[_0x335c[53]]);_0x1da4x1f[_0x335c[57]]= _[_0x335c[56]](_0x1da4x2d[_0x335c[48]],qs[_0x335c[58]](_0x1da4x2c[_0x335c[53]][_0x335c[58]]));_0x1da4x1f[_0x335c[57]]= (_0x1da4x1f[_0x335c[57]][_0x335c[59]])?_0x1da4x1f[_0x335c[57]]:_0x1da4x2d[_0x335c[48]];if(_0x1da4x2c[_0x335c[53]][_0x335c[75]]){_0x1da4x1f[_0x335c[76]]= [{all:true}]};_0x1da4x1f= _[_0x335c[68]]({},_0x1da4x1f,_0x1da4x2c[_0x335c[72]]);return db[_0x335c[50]][_0x335c[81]](_0x1da4x1f)[_0x335c[40]](handleEntityNotFound(_0x1da4x1a,null))[_0x335c[40]](respondWithResult(_0x1da4x1a,null))[_0x335c[73]](handleError(_0x1da4x1a,null))};exports[_0x335c[82]]= function(_0x1da4x2c,_0x1da4x1a){return db[_0x335c[50]][_0x335c[82]](_0x1da4x2c[_0x335c[83]],{})[_0x335c[40]](respondWithResult(_0x1da4x1a,201))[_0x335c[73]](handleError(_0x1da4x1a,null))};exports[_0x335c[41]]= function(_0x1da4x2c,_0x1da4x1a){if(_0x1da4x2c[_0x335c[83]][_0x335c[79]]){delete _0x1da4x2c[_0x335c[83]][_0x335c[79]]};return db[_0x335c[50]][_0x335c[81]]({where:{id:_0x1da4x2c[_0x335c[80]][_0x335c[79]]}})[_0x335c[40]](handleEntityNotFound(_0x1da4x1a,null))[_0x335c[40]](saveUpdates(_0x1da4x2c[_0x335c[83]],null))[_0x335c[40]](respondWithResult(_0x1da4x1a,null))[_0x335c[73]](handleError(_0x1da4x1a,null))};exports[_0x335c[42]]= function(_0x1da4x2c,_0x1da4x1a){return db[_0x335c[50]][_0x335c[81]]({where:{id:_0x1da4x2c[_0x335c[80]][_0x335c[79]]}})[_0x335c[40]](handleEntityNotFound(_0x1da4x1a,null))[_0x335c[40]](removeEntity(_0x1da4x1a,null))[_0x335c[73]](handleError(_0x1da4x1a,null))};exports[_0x335c[84]]= function(_0x1da4x2c,_0x1da4x1a,_0x1da4x33){return db[_0x335c[87]][_0x335c[81]]({where:{id:_0x1da4x2c[_0x335c[80]][_0x335c[79]]}})[_0x335c[40]](handleEntityNotFound(_0x1da4x1a,null))[_0x335c[40]](function(_0x1da4x1c){if(_0x1da4x1c){return _0x1da4x1c[_0x335c[84]](_0x1da4x2c[_0x335c[83]][_0x335c[85]],_[_0x335c[86]](_0x1da4x2c[_0x335c[83]],[_0x335c[85],_0x335c[79]])|| {})}})[_0x335c[40]](respondWithResult(_0x1da4x1a,null))[_0x335c[73]](handleError(_0x1da4x1a,null))};exports[_0x335c[88]]= function(_0x1da4x2c,_0x1da4x1c,_0x1da4x33){var _0x1da4x1f={};var _0x1da4x2d={};var _0x1da4x34;var _0x1da4x20;return db[_0x335c[50]][_0x335c[89]]({where:{id:_0x1da4x2c[_0x335c[80]][_0x335c[79]]}})[_0x335c[40]](handleEntityNotFound(_0x1da4x1c,null))[_0x335c[40]](function(_0x1da4x1c){if(_0x1da4x1c){_0x1da4x34= _0x1da4x1c;_0x1da4x2d[_0x335c[48]]= _[_0x335c[51]](db[_0x335c[87]][_0x335c[49]]);_0x1da4x2d[_0x335c[53]]= _[_0x335c[51]](_0x1da4x2c[_0x335c[53]]);_0x1da4x2d[_0x335c[55]]= _[_0x335c[56]](_0x1da4x2d[_0x335c[48]],_0x1da4x2d[_0x335c[53]]);_0x1da4x1f[_0x335c[57]]= _[_0x335c[56]](_0x1da4x2d[_0x335c[48]],qs[_0x335c[58]](_0x1da4x2c[_0x335c[53]][_0x335c[58]]));_0x1da4x1f[_0x335c[57]]= (_0x1da4x1f[_0x335c[57]][_0x335c[59]])?_0x1da4x1f[_0x335c[57]]:_0x1da4x2d[_0x335c[48]];_0x1da4x1f[_0x335c[62]]= qs[_0x335c[63]](_0x1da4x2c[_0x335c[53]][_0x335c[63]]);_0x1da4x1f[_0x335c[64]]= qs[_0x335c[55]](_[_0x335c[65]](_0x1da4x2c[_0x335c[53]],_0x1da4x2d[_0x335c[55]]));if(_0x1da4x2c[_0x335c[53]][_0x335c[69]]){_0x1da4x1f[_0x335c[64]]= _[_0x335c[68]](_0x1da4x1f[_0x335c[64]],{$or:_[_0x335c[71]](_0x1da4x1f[_0x335c[57]],function(_0x1da4x30){var _0x1da4x2e={};_0x1da4x2e[_0x1da4x30]= {$like:_0x335c[70]+ _0x1da4x2c[_0x335c[53]][_0x335c[69]]+ _0x335c[70]};return _0x1da4x2e})})};_0x1da4x1f= _[_0x335c[68]]({},_0x1da4x1f,_0x1da4x2c[_0x335c[72]]);return _0x1da4x34[_0x335c[88]](_0x1da4x1f)}})[_0x335c[40]](function(_0x1da4x35){if(_0x1da4x35){_0x1da4x20= _0x1da4x35[_0x335c[59]];if(!_0x1da4x2c[_0x335c[53]][_0x335c[61]](_0x335c[60])){_0x1da4x1f[_0x335c[32]]= qs[_0x335c[32]](_0x1da4x2c[_0x335c[53]][_0x335c[32]]);_0x1da4x1f[_0x335c[31]]= qs[_0x335c[31]](_0x1da4x2c[_0x335c[53]][_0x335c[31]])};return _0x1da4x34[_0x335c[88]](_0x1da4x1f)}})[_0x335c[40]](function(_0x1da4x32){if(_0x1da4x32){return _0x1da4x32?{count:_0x1da4x20,rows:_0x1da4x32}:null}})[_0x335c[40]](respondWithResult(_0x1da4x1c,null))[_0x335c[73]](handleError(_0x1da4x1c,null))};exports[_0x335c[90]]= function(_0x1da4x2c,_0x1da4x1a,_0x1da4x33){return db[_0x335c[91]][_0x335c[81]]({where:{id:_0x1da4x2c[_0x335c[80]][_0x335c[79]]}})[_0x335c[40]](handleEntityNotFound(_0x1da4x1a,null))[_0x335c[40]](function(_0x1da4x1c){if(_0x1da4x1c){return _0x1da4x1c[_0x335c[90]](_0x1da4x2c[_0x335c[83]][_0x335c[85]],_[_0x335c[86]](_0x1da4x2c[_0x335c[83]],[_0x335c[85],_0x335c[79]])|| {})}})[_0x335c[40]](respondWithResult(_0x1da4x1a,null))[_0x335c[73]](handleError(_0x1da4x1a,null))};exports[_0x335c[92]]= function(_0x1da4x2c,_0x1da4x1c,_0x1da4x33){var _0x1da4x1f={};var _0x1da4x2d={};var _0x1da4x34;var _0x1da4x20;return db[_0x335c[50]][_0x335c[89]]({where:{id:_0x1da4x2c[_0x335c[80]][_0x335c[79]]}})[_0x335c[40]](handleEntityNotFound(_0x1da4x1c,null))[_0x335c[40]](function(_0x1da4x1c){if(_0x1da4x1c){_0x1da4x34= _0x1da4x1c;_0x1da4x2d[_0x335c[48]]= _[_0x335c[51]](db[_0x335c[91]][_0x335c[49]]);_0x1da4x2d[_0x335c[53]]= _[_0x335c[51]](_0x1da4x2c[_0x335c[53]]);_0x1da4x2d[_0x335c[55]]= _[_0x335c[56]](_0x1da4x2d[_0x335c[48]],_0x1da4x2d[_0x335c[53]]);_0x1da4x1f[_0x335c[57]]= _[_0x335c[56]](_0x1da4x2d[_0x335c[48]],qs[_0x335c[58]](_0x1da4x2c[_0x335c[53]][_0x335c[58]]));_0x1da4x1f[_0x335c[57]]= (_0x1da4x1f[_0x335c[57]][_0x335c[59]])?_0x1da4x1f[_0x335c[57]]:_0x1da4x2d[_0x335c[48]];_0x1da4x1f[_0x335c[62]]= qs[_0x335c[63]](_0x1da4x2c[_0x335c[53]][_0x335c[63]]);_0x1da4x1f[_0x335c[64]]= qs[_0x335c[55]](_[_0x335c[65]](_0x1da4x2c[_0x335c[53]],_0x1da4x2d[_0x335c[55]]));if(_0x1da4x2c[_0x335c[53]][_0x335c[69]]){_0x1da4x1f[_0x335c[64]]= _[_0x335c[68]](_0x1da4x1f[_0x335c[64]],{$or:_[_0x335c[71]](_0x1da4x1f[_0x335c[57]],function(_0x1da4x30){var _0x1da4x2e={};_0x1da4x2e[_0x1da4x30]= {$like:_0x335c[70]+ _0x1da4x2c[_0x335c[53]][_0x335c[69]]+ _0x335c[70]};return _0x1da4x2e})})};_0x1da4x1f= _[_0x335c[68]]({},_0x1da4x1f,_0x1da4x2c[_0x335c[72]]);return _0x1da4x34[_0x335c[92]](_0x1da4x1f)}})[_0x335c[40]](function(_0x1da4x35){if(_0x1da4x35){_0x1da4x20= _0x1da4x35[_0x335c[59]];if(!_0x1da4x2c[_0x335c[53]][_0x335c[61]](_0x335c[60])){_0x1da4x1f[_0x335c[32]]= qs[_0x335c[32]](_0x1da4x2c[_0x335c[53]][_0x335c[32]]);_0x1da4x1f[_0x335c[31]]= qs[_0x335c[31]](_0x1da4x2c[_0x335c[53]][_0x335c[31]])};return _0x1da4x34[_0x335c[92]](_0x1da4x1f)}})[_0x335c[40]](function(_0x1da4x32){if(_0x1da4x32){return _0x1da4x32?{count:_0x1da4x20,rows:_0x1da4x32}:null}})[_0x335c[40]](respondWithResult(_0x1da4x1c,null))[_0x335c[73]](handleError(_0x1da4x1c,null))}
\ No newline at end of file
index 80c3c15..456fa19 100644 (file)
@@ -1 +1 @@
-var _0x2636=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x74\x6F\x6F\x6C\x73\x5F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x2636[0];var _=require(_0x2636[1]);var util=require(_0x2636[2]);var logger=require(_0x2636[4])(_0x2636[3]);var moment=require(_0x2636[5]);var BPromise=require(_0x2636[6]);var rp=require(_0x2636[7]);var attributes=require(_0x2636[8]);module[_0x2636[9]]= function(_0x981cx8,_0x981cx9){return _0x981cx8[_0x2636[12]](_0x2636[10],attributes,{tableName:_0x2636[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x430a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x74\x6F\x6F\x6C\x73\x5F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x430a[0];var _=require(_0x430a[1]);var util=require(_0x430a[2]);var logger=require(_0x430a[4])(_0x430a[3]);var moment=require(_0x430a[5]);var BPromise=require(_0x430a[6]);var rp=require(_0x430a[7]);var attributes=require(_0x430a[8]);module[_0x430a[9]]= function(_0x41c2x8,_0x41c2x9){return _0x41c2x8[_0x430a[12]](_0x430a[10],attributes,{tableName:_0x430a[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 5b5ef49..655ae58 100644 (file)
@@ -1 +1 @@
-var _0xfdc9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xfdc9[0];var _=require(_0xfdc9[1]);var util=require(_0xfdc9[2]);var moment=require(_0xfdc9[3]);var BPromise=require(_0xfdc9[4]);var rs=require(_0xfdc9[5]);var fs=require(_0xfdc9[6]);var db=require(_0xfdc9[8])[_0xfdc9[7]];var utils=require(_0xfdc9[9]);var logger=require(_0xfdc9[11])(_0xfdc9[10]);var config=require(_0xfdc9[12]);var jayson=require(_0xfdc9[13]);var client=jayson[_0xfdc9[15]][_0xfdc9[14]]({port:9002});function respondWithRpcPromise(_0x3eafxe,_0x3eafxf,_0x3eafx10){return  new BPromise(function(_0x3eafx11,_0x3eafx12){return client[_0xfdc9[28]](_0x3eafxe,_0x3eafx10)[_0xfdc9[27]](function(_0x3eafx14){logger[_0xfdc9[20]](_0xfdc9[16],_0x3eafxf,_0xfdc9[19]);logger[_0xfdc9[23]](_0xfdc9[21],_0x3eafxf,_0xfdc9[19],JSON[_0xfdc9[22]](_0x3eafx14));if(_0x3eafx14[_0xfdc9[17]]){if(_0x3eafx14[_0xfdc9[17]][_0xfdc9[24]]=== 500){logger[_0xfdc9[17]](_0xfdc9[16],_0x3eafxf,_0x3eafx14[_0xfdc9[17]][_0xfdc9[25]]);return _0x3eafx12(_0x3eafx14[_0xfdc9[17]][_0xfdc9[25]])};logger[_0xfdc9[17]](_0xfdc9[16],_0x3eafxf,_0x3eafx14[_0xfdc9[17]][_0xfdc9[25]]);return _0x3eafx11(_0x3eafx14[_0xfdc9[17]][_0xfdc9[25]])}else {logger[_0xfdc9[20]](_0xfdc9[16],_0x3eafxf,_0xfdc9[19]);_0x3eafx11(_0x3eafx14[_0xfdc9[26]][_0xfdc9[25]])}})[_0xfdc9[18]](function(_0x3eafx13){logger[_0xfdc9[17]](_0xfdc9[16],_0x3eafxf,_0x3eafx13);_0x3eafx12(_0x3eafx13)})})}
\ No newline at end of file
+var _0x97d0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x97d0[0];var _=require(_0x97d0[1]);var util=require(_0x97d0[2]);var moment=require(_0x97d0[3]);var BPromise=require(_0x97d0[4]);var rs=require(_0x97d0[5]);var fs=require(_0x97d0[6]);var db=require(_0x97d0[8])[_0x97d0[7]];var utils=require(_0x97d0[9]);var logger=require(_0x97d0[11])(_0x97d0[10]);var config=require(_0x97d0[12]);var jayson=require(_0x97d0[13]);var client=jayson[_0x97d0[15]][_0x97d0[14]]({port:9002});function respondWithRpcPromise(_0x6904xe,_0x6904xf,_0x6904x10){return  new BPromise(function(_0x6904x11,_0x6904x12){return client[_0x97d0[28]](_0x6904xe,_0x6904x10)[_0x97d0[27]](function(_0x6904x14){logger[_0x97d0[20]](_0x97d0[16],_0x6904xf,_0x97d0[19]);logger[_0x97d0[23]](_0x97d0[21],_0x6904xf,_0x97d0[19],JSON[_0x97d0[22]](_0x6904x14));if(_0x6904x14[_0x97d0[17]]){if(_0x6904x14[_0x97d0[17]][_0x97d0[24]]=== 500){logger[_0x97d0[17]](_0x97d0[16],_0x6904xf,_0x6904x14[_0x97d0[17]][_0x97d0[25]]);return _0x6904x12(_0x6904x14[_0x97d0[17]][_0x97d0[25]])};logger[_0x97d0[17]](_0x97d0[16],_0x6904xf,_0x6904x14[_0x97d0[17]][_0x97d0[25]]);return _0x6904x11(_0x6904x14[_0x97d0[17]][_0x97d0[25]])}else {logger[_0x97d0[20]](_0x97d0[16],_0x6904xf,_0x97d0[19]);_0x6904x11(_0x6904x14[_0x97d0[26]][_0x97d0[25]])}})[_0x97d0[18]](function(_0x6904x13){logger[_0x97d0[17]](_0x97d0[16],_0x6904xf,_0x6904x13);_0x6904x12(_0x6904x13)})})}
\ No newline at end of file
index de3c67a..c5a5404 100644 (file)
@@ -1 +1 @@
-var _0x9ac4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x63\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9ac4[0];var multer=require(_0x9ac4[1]);var util=require(_0x9ac4[2]);var path=require(_0x9ac4[3]);var express=require(_0x9ac4[4]);var router=express.Router();var auth=require(_0x9ac4[5]);var interaction=require(_0x9ac4[6]);var config=require(_0x9ac4[7]);var controller=require(_0x9ac4[8]);router[_0x9ac4[12]](_0x9ac4[9],auth[_0x9ac4[10]](),controller[_0x9ac4[11]]);router[_0x9ac4[12]](_0x9ac4[13],auth[_0x9ac4[10]](),controller[_0x9ac4[14]]);router[_0x9ac4[12]](_0x9ac4[15],auth[_0x9ac4[10]](),controller[_0x9ac4[16]]);router[_0x9ac4[12]](_0x9ac4[17],auth[_0x9ac4[10]](),controller[_0x9ac4[18]]);router[_0x9ac4[20]](_0x9ac4[9],auth[_0x9ac4[10]](),controller[_0x9ac4[19]]);router[_0x9ac4[20]](_0x9ac4[15],auth[_0x9ac4[10]](),controller[_0x9ac4[21]]);router[_0x9ac4[20]](_0x9ac4[17],auth[_0x9ac4[10]](),controller[_0x9ac4[22]]);router[_0x9ac4[24]](_0x9ac4[13],auth[_0x9ac4[10]](),controller[_0x9ac4[23]]);router[_0x9ac4[26]](_0x9ac4[13],auth[_0x9ac4[10]](),controller[_0x9ac4[25]]);module[_0x9ac4[27]]= router
\ No newline at end of file
+var _0x49fa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x63\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x49fa[0];var multer=require(_0x49fa[1]);var util=require(_0x49fa[2]);var path=require(_0x49fa[3]);var express=require(_0x49fa[4]);var router=express.Router();var auth=require(_0x49fa[5]);var interaction=require(_0x49fa[6]);var config=require(_0x49fa[7]);var controller=require(_0x49fa[8]);router[_0x49fa[12]](_0x49fa[9],auth[_0x49fa[10]](),controller[_0x49fa[11]]);router[_0x49fa[12]](_0x49fa[13],auth[_0x49fa[10]](),controller[_0x49fa[14]]);router[_0x49fa[12]](_0x49fa[15],auth[_0x49fa[10]](),controller[_0x49fa[16]]);router[_0x49fa[12]](_0x49fa[17],auth[_0x49fa[10]](),controller[_0x49fa[18]]);router[_0x49fa[20]](_0x49fa[9],auth[_0x49fa[10]](),controller[_0x49fa[19]]);router[_0x49fa[20]](_0x49fa[15],auth[_0x49fa[10]](),controller[_0x49fa[21]]);router[_0x49fa[20]](_0x49fa[17],auth[_0x49fa[10]](),controller[_0x49fa[22]]);router[_0x49fa[24]](_0x49fa[13],auth[_0x49fa[10]](),controller[_0x49fa[23]]);router[_0x49fa[26]](_0x49fa[13],auth[_0x49fa[10]](),controller[_0x49fa[25]]);module[_0x49fa[27]]= router
\ No newline at end of file
index ab5ea0f..9927c33 100644 (file)
@@ -1 +1 @@
-var _0xc10b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x69\x76\x72","\x42\x4F\x4F\x4C\x45\x41\x4E","\x41\x63\x74\x69\x76\x65\x2F\x44\x69\x73\x61\x63\x74\x69\x76\x65\x20\x43\x61\x6D\x70\x61\x69\x67\x6E","\x55\x4E\x53\x49\x47\x4E\x45\x44","\x4D\x61\x78\x20\x32\x30\x30\x20\x63\x61\x6C\x6C\x73\x2E","\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x20\x54\x69\x6D\x65\x6F\x75\x74\x20\x53\x65\x63\x6F\x6E\x64\x73\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x23\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x20\x52\x65\x74\x72\x79\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x20\x52\x65\x74\x72\x79\x20\x46\x72\x65\x71\x75\x65\x6E\x63\x79\x20\x4D\x69\x6E\x75\x74\x65\x73\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x39\x39\x29","\x23\x42\x75\x73\x79\x20\x52\x65\x74\x72\x79\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x42\x75\x73\x79\x20\x52\x65\x74\x72\x79\x20\x46\x72\x65\x71\x75\x65\x6E\x63\x79\x20\x4D\x69\x6E\x75\x74\x65\x73\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x39\x39\x29","\x23\x4E\x6F\x41\x6E\x73\x77\x65\x72\x20\x52\x65\x74\x72\x79\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x4E\x6F\x41\x6E\x73\x77\x65\x72\x20\x52\x65\x74\x72\x79\x20\x46\x72\x65\x71\x75\x65\x6E\x63\x79\x20\x4D\x69\x6E\x75\x74\x65\x73\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x39\x39\x29","\x23\x47\x6C\x6F\x62\x61\x6C\x20\x4D\x61\x78\x20\x52\x65\x74\x72\x79\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x30\x37\x3A\x30\x30\x2D\x32\x32\x3A\x30\x30\x2C\x2A\x2C\x2A\x2C\x2A","\x61\x6C\x77\x61\x79\x73","\x6E\x65\x76\x65\x72","\x6F\x6E\x6C\x79\x49\x66\x4F\x70\x65\x6E","\x41\x63\x74\x69\x76\x65\x2F\x44\x69\x73\x61\x63\x74\x69\x76\x65\x20\x41\x4D\x44","\x23\x41\x4D\x44\x20\x49\x6E\x69\x74\x69\x61\x6C\x20\x53\x69\x6C\x65\x6E\x63\x65","\x23\x41\x4D\x44\x20\x47\x72\x65\x65\x74\x69\x6E\x67","\x23\x41\x4D\x44\x20\x41\x66\x74\x65\x72\x20\x47\x72\x65\x65\x74\x69\x6E\x67\x20\x53\x69\x6C\x65\x6E\x63\x65","\x23\x41\x4D\x44\x20\x54\x6F\x74\x61\x6C\x20\x41\x6E\x61\x6C\x79\x73\x69\x73\x20\x54\x69\x6D\x65","\x23\x41\x4D\x44\x20\x4D\x69\x6E\x20\x57\x6F\x72\x64\x20\x4C\x65\x6E\x67\x74\x68","\x23\x41\x4D\x44\x20\x42\x65\x74\x77\x65\x65\x6E\x20\x57\x6F\x72\x64\x73\x20\x53\x69\x6C\x65\x6E\x63\x65","\x23\x41\x4D\x44\x20\x4D\x61\x78\x69\x6D\x75\x6D\x20\x4E\x75\x6D\x62\x65\x72\x20\x4F\x66\x20\x57\x6F\x72\x64\x73","\x23\x41\x4D\x44\x20\x53\x69\x6C\x65\x6E\x63\x65\x20\x54\x68\x72\x65\x73\x68\x6F\x6C\x64\x20\x28\x6D\x69\x6E\x3A\x30\x2C\x20\x6D\x61\x78\x3A\x33\x32\x37\x36\x37\x29","\x23\x41\x4D\x44\x20\x4D\x61\x78\x69\x6D\x75\x6D\x20\x57\x6F\x72\x64\x20\x4C\x65\x6E\x67\x74\x68","\x44\x45\x53\x43","\x41\x53\x43"];_0xc10b[0];var Sequelize=require(_0xc10b[1]);module[_0xc10b[2]]= {name:{type:Sequelize[_0xc10b[3]],unique:_0xc10b[4],allowNull:false,validate:{is:/[A-Za-z0-9._\\+*!-]+/,notEmpty:true}},type:{type:Sequelize.ENUM(_0xc10b[5]),allowNull:false,defaultValue:_0xc10b[5]},description:{type:Sequelize[_0xc10b[3]]},active:{type:Sequelize[_0xc10b[6]],defaultValue:0,comment:_0xc10b[7]},limitCalls:{type:Sequelize.INTEGER(4)[_0xc10b[8]],defaultValue:30,validate:{min:1,max:200},comment:_0xc10b[9]},dialOriginateCallerIdName:{type:Sequelize[_0xc10b[3]]},dialOriginateCallerIdNumber:{type:Sequelize[_0xc10b[3]]},dialOriginateTimeout:{type:Sequelize.INTEGER(3)[_0xc10b[8]],defaultValue:30,validate:{min:1,max:999},comment:_0xc10b[10]},dialCongestionMaxRetry:{type:Sequelize.INTEGER(3)[_0xc10b[8]],defaultValue:3,validate:{min:1,max:999},comment:_0xc10b[11]},dialCongestionRetryFrequency:{type:Sequelize.INTEGER(5)[_0xc10b[8]],validate:{min:1,max:99999},defaultValue:150,comment:_0xc10b[12]},dialBusyMaxRetry:{type:Sequelize.INTEGER(3)[_0xc10b[8]],defaultValue:3,validate:{min:1,max:999},comment:_0xc10b[13]},dialBusyRetryFrequency:{type:Sequelize.INTEGER(5)[_0xc10b[8]],validate:{min:1,max:99999},defaultValue:150,comment:_0xc10b[14]},dialNoAnswerMaxRetry:{type:Sequelize.INTEGER(3)[_0xc10b[8]],defaultValue:3,comment:_0xc10b[15]},dialNoAnswerRetryFrequency:{type:Sequelize.INTEGER(5)[_0xc10b[8]],validate:{min:1,max:99999},defaultValue:150,comment:_0xc10b[16]},dialGlobalMaxRetry:{type:Sequelize.INTEGER(3)[_0xc10b[8]],validate:{min:1,max:999},defaultValue:4,comment:_0xc10b[17]},dialTimezone:{type:Sequelize[_0xc10b[3]],defaultValue:null},dialGlobalInterval:{type:Sequelize[_0xc10b[3]],defaultValue:_0xc10b[18]},dialCheckDuplicateType:{type:Sequelize.ENUM(_0xc10b[19],_0xc10b[20],_0xc10b[21]),defaultValue:_0xc10b[19]},dialAMDActive:{type:Sequelize[_0xc10b[6]],defaultValue:0,comment:_0xc10b[22]},dialAMDInitialSilence:{type:Sequelize.INTEGER(9)[_0xc10b[8]],defaultValue:2500,validate:{min:0},comment:_0xc10b[23]},dialAMDGreeting:{type:Sequelize.INTEGER(9)[_0xc10b[8]],defaultValue:1500,validate:{min:0},comment:_0xc10b[24]},dialAMDAfterGreetingSilence:{type:Sequelize.INTEGER(9)[_0xc10b[8]],defaultValue:800,validate:{min:0},comment:_0xc10b[25]},dialAMDTotalAnalysisTime:{type:Sequelize.INTEGER(9)[_0xc10b[8]],defaultValue:5000,validate:{min:0},comment:_0xc10b[26]},dialAMDMinWordLength:{type:Sequelize.INTEGER(9)[_0xc10b[8]],defaultValue:100,validate:{min:0},comment:_0xc10b[27]},dialAMDBetweenWordsSilence:{type:Sequelize.INTEGER(9)[_0xc10b[8]],defaultValue:50,validate:{min:0},comment:_0xc10b[28]},dialAMDMaximumNumberOfWords:{type:Sequelize.INTEGER(9)[_0xc10b[8]],defaultValue:3,validate:{min:0},comment:_0xc10b[29]},dialAMDSilenceThreshold:{type:Sequelize.INTEGER(5)[_0xc10b[8]],validate:{min:0,max:32767},defaultValue:256,comment:_0xc10b[30]},dialAMDMaximumWordLength:{type:Sequelize.INTEGER(9)[_0xc10b[8]],defaultValue:5000,validate:{min:0},comment:_0xc10b[31]},dialOrderByScheduledAt:{type:Sequelize.ENUM(_0xc10b[32],_0xc10b[33]),defaultValue:_0xc10b[32]},dialPrefix:{type:Sequelize[_0xc10b[3]],defaultValue:null}}
\ No newline at end of file
+var _0x1262=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x69\x76\x72","\x42\x4F\x4F\x4C\x45\x41\x4E","\x41\x63\x74\x69\x76\x65\x2F\x44\x69\x73\x61\x63\x74\x69\x76\x65\x20\x43\x61\x6D\x70\x61\x69\x67\x6E","\x55\x4E\x53\x49\x47\x4E\x45\x44","\x4D\x61\x78\x20\x32\x30\x30\x20\x63\x61\x6C\x6C\x73\x2E","\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x20\x54\x69\x6D\x65\x6F\x75\x74\x20\x53\x65\x63\x6F\x6E\x64\x73\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x23\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x20\x52\x65\x74\x72\x79\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x20\x52\x65\x74\x72\x79\x20\x46\x72\x65\x71\x75\x65\x6E\x63\x79\x20\x4D\x69\x6E\x75\x74\x65\x73\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x39\x39\x29","\x23\x42\x75\x73\x79\x20\x52\x65\x74\x72\x79\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x42\x75\x73\x79\x20\x52\x65\x74\x72\x79\x20\x46\x72\x65\x71\x75\x65\x6E\x63\x79\x20\x4D\x69\x6E\x75\x74\x65\x73\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x39\x39\x29","\x23\x4E\x6F\x41\x6E\x73\x77\x65\x72\x20\x52\x65\x74\x72\x79\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x4E\x6F\x41\x6E\x73\x77\x65\x72\x20\x52\x65\x74\x72\x79\x20\x46\x72\x65\x71\x75\x65\x6E\x63\x79\x20\x4D\x69\x6E\x75\x74\x65\x73\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x39\x39\x29","\x23\x47\x6C\x6F\x62\x61\x6C\x20\x4D\x61\x78\x20\x52\x65\x74\x72\x79\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x30\x37\x3A\x30\x30\x2D\x32\x32\x3A\x30\x30\x2C\x2A\x2C\x2A\x2C\x2A","\x61\x6C\x77\x61\x79\x73","\x6E\x65\x76\x65\x72","\x6F\x6E\x6C\x79\x49\x66\x4F\x70\x65\x6E","\x41\x63\x74\x69\x76\x65\x2F\x44\x69\x73\x61\x63\x74\x69\x76\x65\x20\x41\x4D\x44","\x23\x41\x4D\x44\x20\x49\x6E\x69\x74\x69\x61\x6C\x20\x53\x69\x6C\x65\x6E\x63\x65","\x23\x41\x4D\x44\x20\x47\x72\x65\x65\x74\x69\x6E\x67","\x23\x41\x4D\x44\x20\x41\x66\x74\x65\x72\x20\x47\x72\x65\x65\x74\x69\x6E\x67\x20\x53\x69\x6C\x65\x6E\x63\x65","\x23\x41\x4D\x44\x20\x54\x6F\x74\x61\x6C\x20\x41\x6E\x61\x6C\x79\x73\x69\x73\x20\x54\x69\x6D\x65","\x23\x41\x4D\x44\x20\x4D\x69\x6E\x20\x57\x6F\x72\x64\x20\x4C\x65\x6E\x67\x74\x68","\x23\x41\x4D\x44\x20\x42\x65\x74\x77\x65\x65\x6E\x20\x57\x6F\x72\x64\x73\x20\x53\x69\x6C\x65\x6E\x63\x65","\x23\x41\x4D\x44\x20\x4D\x61\x78\x69\x6D\x75\x6D\x20\x4E\x75\x6D\x62\x65\x72\x20\x4F\x66\x20\x57\x6F\x72\x64\x73","\x23\x41\x4D\x44\x20\x53\x69\x6C\x65\x6E\x63\x65\x20\x54\x68\x72\x65\x73\x68\x6F\x6C\x64\x20\x28\x6D\x69\x6E\x3A\x30\x2C\x20\x6D\x61\x78\x3A\x33\x32\x37\x36\x37\x29","\x23\x41\x4D\x44\x20\x4D\x61\x78\x69\x6D\x75\x6D\x20\x57\x6F\x72\x64\x20\x4C\x65\x6E\x67\x74\x68","\x44\x45\x53\x43","\x41\x53\x43"];_0x1262[0];var Sequelize=require(_0x1262[1]);module[_0x1262[2]]= {name:{type:Sequelize[_0x1262[3]],unique:_0x1262[4],allowNull:false,validate:{is:/[A-Za-z0-9._\\+*!-]+/,notEmpty:true}},type:{type:Sequelize.ENUM(_0x1262[5]),allowNull:false,defaultValue:_0x1262[5]},description:{type:Sequelize[_0x1262[3]]},active:{type:Sequelize[_0x1262[6]],defaultValue:0,comment:_0x1262[7]},limitCalls:{type:Sequelize.INTEGER(4)[_0x1262[8]],defaultValue:30,validate:{min:1,max:200},comment:_0x1262[9]},dialOriginateCallerIdName:{type:Sequelize[_0x1262[3]]},dialOriginateCallerIdNumber:{type:Sequelize[_0x1262[3]]},dialOriginateTimeout:{type:Sequelize.INTEGER(3)[_0x1262[8]],defaultValue:30,validate:{min:1,max:999},comment:_0x1262[10]},dialCongestionMaxRetry:{type:Sequelize.INTEGER(3)[_0x1262[8]],defaultValue:3,validate:{min:1,max:999},comment:_0x1262[11]},dialCongestionRetryFrequency:{type:Sequelize.INTEGER(5)[_0x1262[8]],validate:{min:1,max:99999},defaultValue:150,comment:_0x1262[12]},dialBusyMaxRetry:{type:Sequelize.INTEGER(3)[_0x1262[8]],defaultValue:3,validate:{min:1,max:999},comment:_0x1262[13]},dialBusyRetryFrequency:{type:Sequelize.INTEGER(5)[_0x1262[8]],validate:{min:1,max:99999},defaultValue:150,comment:_0x1262[14]},dialNoAnswerMaxRetry:{type:Sequelize.INTEGER(3)[_0x1262[8]],defaultValue:3,comment:_0x1262[15]},dialNoAnswerRetryFrequency:{type:Sequelize.INTEGER(5)[_0x1262[8]],validate:{min:1,max:99999},defaultValue:150,comment:_0x1262[16]},dialGlobalMaxRetry:{type:Sequelize.INTEGER(3)[_0x1262[8]],validate:{min:1,max:999},defaultValue:4,comment:_0x1262[17]},dialTimezone:{type:Sequelize[_0x1262[3]],defaultValue:null},dialGlobalInterval:{type:Sequelize[_0x1262[3]],defaultValue:_0x1262[18]},dialCheckDuplicateType:{type:Sequelize.ENUM(_0x1262[19],_0x1262[20],_0x1262[21]),defaultValue:_0x1262[19]},dialAMDActive:{type:Sequelize[_0x1262[6]],defaultValue:0,comment:_0x1262[22]},dialAMDInitialSilence:{type:Sequelize.INTEGER(9)[_0x1262[8]],defaultValue:2500,validate:{min:0},comment:_0x1262[23]},dialAMDGreeting:{type:Sequelize.INTEGER(9)[_0x1262[8]],defaultValue:1500,validate:{min:0},comment:_0x1262[24]},dialAMDAfterGreetingSilence:{type:Sequelize.INTEGER(9)[_0x1262[8]],defaultValue:800,validate:{min:0},comment:_0x1262[25]},dialAMDTotalAnalysisTime:{type:Sequelize.INTEGER(9)[_0x1262[8]],defaultValue:5000,validate:{min:0},comment:_0x1262[26]},dialAMDMinWordLength:{type:Sequelize.INTEGER(9)[_0x1262[8]],defaultValue:100,validate:{min:0},comment:_0x1262[27]},dialAMDBetweenWordsSilence:{type:Sequelize.INTEGER(9)[_0x1262[8]],defaultValue:50,validate:{min:0},comment:_0x1262[28]},dialAMDMaximumNumberOfWords:{type:Sequelize.INTEGER(9)[_0x1262[8]],defaultValue:3,validate:{min:0},comment:_0x1262[29]},dialAMDSilenceThreshold:{type:Sequelize.INTEGER(5)[_0x1262[8]],validate:{min:0,max:32767},defaultValue:256,comment:_0x1262[30]},dialAMDMaximumWordLength:{type:Sequelize.INTEGER(9)[_0x1262[8]],defaultValue:5000,validate:{min:0},comment:_0x1262[31]},dialOrderByScheduledAt:{type:Sequelize.ENUM(_0x1262[32],_0x1262[33]),defaultValue:_0x1262[32]},dialPrefix:{type:Sequelize[_0x1262[3]],defaultValue:null}}
\ No newline at end of file
index fb1fbb7..09f3bde 100644 (file)
@@ -1 +1 @@
-var _0x9d3d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x61\x6D\x70\x61\x69\x67\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x69\x65\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x67\x65\x74\x4C\x69\x73\x74\x73","\x43\x6D\x4C\x69\x73\x74","\x61\x64\x64\x4C\x69\x73\x74\x73","\x67\x65\x74","\x64\x69\x61\x6C\x43\x68\x65\x63\x6B\x44\x75\x70\x6C\x69\x63\x61\x74\x65\x54\x79\x70\x65","\x70\x68\x6F\x6E\x65","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x68\x6F\x6E\x65\x20\x4E\x4F\x54\x20\x49\x4E\x20\x28\x3F\x29","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64\x20\x3D\x20\x3F","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72","\x66\x72\x6F\x6D","\x66\x69\x65\x6C\x64","\x73\x65\x6C\x65\x63\x74","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x66\x69\x6E\x61\x6C","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x70\x68\x6F\x6E\x65\x20\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C","\x4C\x69\x73\x74\x49\x64\x20\x3D\x20\x3F","\x43\x6D\x4C\x69\x73\x74\x49\x64","\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x20\x49\x53\x20\x4E\x55\x4C\x4C","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x4E\x4F\x57\x28\x29","\x66\x72\x6F\x6D\x51\x75\x65\x72\x79","\x69\x6E\x74\x6F","\x69\x6E\x73\x65\x72\x74","\x61\x6C\x77\x61\x79\x73","\x6F\x6E\x6C\x79\x49\x66\x4F\x70\x65\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x70\x75\x73\x68","\x61\x6C\x6C","\x73\x70\x72\x65\x61\x64","\x69\x64\x73","\x6F\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x73","\x67\x65\x74\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x61\x64\x64\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x62\x6C\x61\x63\x6B","\x72\x65\x6D\x6F\x76\x65\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73"];_0x9d3d[0];var jsonpatch=require(_0x9d3d[1]);var rp=require(_0x9d3d[2]);var moment=require(_0x9d3d[3]);var BPromise=require(_0x9d3d[4]);var Mustache=require(_0x9d3d[5]);var util=require(_0x9d3d[6]);var path=require(_0x9d3d[7]);var sox=require(_0x9d3d[8]);var csv=require(_0x9d3d[9]);var ejs=require(_0x9d3d[10]);var fs=require(_0x9d3d[11]);var _=require(_0x9d3d[12]);var squel=require(_0x9d3d[13]);var crypto=require(_0x9d3d[14]);var jsforce=require(_0x9d3d[15]);var deskjs=require(_0x9d3d[16]);var toCsv=require(_0x9d3d[9]);var querystring=require(_0x9d3d[17]);var Papa=require(_0x9d3d[18]);var qs=require(_0x9d3d[19]);var logger=require(_0x9d3d[21])(_0x9d3d[20]);var utils=require(_0x9d3d[22]);var config=require(_0x9d3d[23]);var db=require(_0x9d3d[25])[_0x9d3d[24]];function respondWithStatusCode(_0x1960x1a,_0x1960x1b){_0x1960x1b= _0x1960x1b|| 204;return function(_0x1960x1c){if(_0x1960x1c){return _0x1960x1a[_0x9d3d[26]](_0x1960x1b)};return _0x1960x1a[_0x9d3d[28]](_0x1960x1b)[_0x9d3d[27]]()}}function respondWithResult(_0x1960x1a,_0x1960x1b){_0x1960x1b= _0x1960x1b|| 200;return function(_0x1960x1c){if(_0x1960x1c){return _0x1960x1a[_0x9d3d[28]](_0x1960x1b)[_0x9d3d[29]](_0x1960x1c)}}}function respondWithFilteredResult(_0x1960x1a,_0x1960x1f){return function(_0x1960x1c){if(_0x1960x1c){var _0x1960x20=_0x1960x1c[_0x9d3d[30]],_0x1960x21=_0x1960x1f[_0x9d3d[31]],_0x1960x22=_0x1960x1f[_0x9d3d[31]]+ _0x1960x1f[_0x9d3d[32]],_0x1960x1b;if(_0x1960x22>= _0x1960x20){_0x1960x22= _0x1960x20;_0x1960x1b= 200}else {_0x1960x1b= 206};_0x1960x1a[_0x9d3d[28]](_0x1960x1b);return _0x1960x1a[_0x9d3d[36]](_0x9d3d[33],_0x1960x21+ _0x9d3d[34]+ _0x1960x22+ _0x9d3d[35]+ _0x1960x20)[_0x9d3d[29]](_0x1960x1c)};return null}}function patchUpdates(_0x1960x24){return function(_0x1960x1c){try{jsonpatch[_0x9d3d[37]](_0x1960x1c,_0x1960x24,true)}catch(err){return BPromise[_0x9d3d[38]](err)};return _0x1960x1c[_0x9d3d[39]]()}}function saveUpdates(_0x1960x26,_0x1960x1b){return function(_0x1960x1c){if(_0x1960x1c){return _0x1960x1c[_0x9d3d[41]](_0x1960x26)[_0x9d3d[40]](function(_0x1960x27){return _0x1960x27})};return null}}function removeEntity(_0x1960x1a,_0x1960x1b){return function(_0x1960x1c){if(_0x1960x1c){return _0x1960x1c[_0x9d3d[42]]()[_0x9d3d[40]](function(){_0x1960x1a[_0x9d3d[28]](204)[_0x9d3d[27]]()})}}}function handleEntityNotFound(_0x1960x1a,_0x1960x1b){return function(_0x1960x1c){if(!_0x1960x1c){_0x1960x1a[_0x9d3d[26]](404)};return _0x1960x1c}}function handleError(_0x1960x1a,_0x1960x1b){_0x1960x1b= _0x1960x1b|| 500;return function(_0x1960x2b){logger[_0x9d3d[44]](_0x1960x2b[_0x9d3d[43]]);if(_0x1960x2b[_0x9d3d[45]]){delete _0x1960x2b[_0x9d3d[45]]};_0x1960x1a[_0x9d3d[28]](_0x1960x1b)[_0x9d3d[46]](_0x1960x2b)}}exports[_0x9d3d[47]]= function(_0x1960x2c,_0x1960x1a){var _0x1960x1f={},_0x1960x2d={},_0x1960x2e={count:0,rows:[]};_0x1960x2d[_0x9d3d[48]]= _[_0x9d3d[51]](db[_0x9d3d[50]][_0x9d3d[49]]);var _0x1960x2f={dateStart:_0x1960x2c[_0x9d3d[53]][_0x9d3d[52]],dateEnd:_0x1960x2c[_0x9d3d[53]][_0x9d3d[54]]};delete _0x1960x2c[_0x9d3d[53]][_0x9d3d[52]];delete _0x1960x2c[_0x9d3d[53]][_0x9d3d[54]];_0x1960x2d[_0x9d3d[53]]= _[_0x9d3d[51]](_0x1960x2c[_0x9d3d[53]]);_0x1960x2d[_0x9d3d[55]]= _[_0x9d3d[56]](_0x1960x2d[_0x9d3d[48]],_0x1960x2d[_0x9d3d[53]]);_0x1960x1f[_0x9d3d[57]]= _[_0x9d3d[56]](_0x1960x2d[_0x9d3d[48]],qs[_0x9d3d[58]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[58]]));_0x1960x1f[_0x9d3d[57]]= (_0x1960x1f[_0x9d3d[57]][_0x9d3d[59]])?_0x1960x1f[_0x9d3d[57]]:_0x1960x2d[_0x9d3d[48]];if(!_0x1960x2c[_0x9d3d[53]][_0x9d3d[61]](_0x9d3d[60])){_0x1960x1f[_0x9d3d[32]]= qs[_0x9d3d[32]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[32]]);_0x1960x1f[_0x9d3d[31]]= qs[_0x9d3d[31]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[31]])};_0x1960x1f[_0x9d3d[62]]= qs[_0x9d3d[63]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[63]]);_0x1960x1f[_0x9d3d[64]]= qs[_0x9d3d[55]](_[_0x9d3d[65]](_0x1960x2c[_0x9d3d[53]],_0x1960x2d[_0x9d3d[55]]));if(_0x1960x2f[_0x9d3d[52]]){if(_0x1960x2f[_0x9d3d[54]]){_0x1960x2f[_0x9d3d[54]]= moment(_0x1960x2f[_0x9d3d[54]])[_0x9d3d[67]](1,_0x9d3d[66])}else {_0x1960x2f[_0x9d3d[54]]= moment(_0x1960x2f[_0x9d3d[52]])[_0x9d3d[67]](1,_0x9d3d[66])};_[_0x9d3d[68]](_0x1960x1f[_0x9d3d[64]],{createdAt:{$gte:_0x1960x2f[_0x9d3d[52]],$lte:_0x1960x2f[_0x9d3d[54]]}})};if(_0x1960x2c[_0x9d3d[53]][_0x9d3d[69]]){_0x1960x1f[_0x9d3d[64]]= _[_0x9d3d[68]](_0x1960x1f[_0x9d3d[64]],{$or:_[_0x9d3d[71]](_0x1960x1f[_0x9d3d[57]],function(_0x1960x30){var _0x1960x2e={};_0x1960x2e[_0x1960x30]= {$like:_0x9d3d[70]+ _0x1960x2c[_0x9d3d[53]][_0x9d3d[69]]+ _0x9d3d[70]};return _0x1960x2e})})};_0x1960x1f= _[_0x9d3d[68]]({},_0x1960x1f,_0x1960x2c[_0x9d3d[72]]);var _0x1960x31={where:_0x1960x1f[_0x9d3d[64]]};return db[_0x9d3d[50]][_0x9d3d[30]](_0x1960x31)[_0x9d3d[40]](function(_0x1960x20){_0x1960x2e[_0x9d3d[30]]= _0x1960x20;if(_0x1960x2c[_0x9d3d[53]][_0x9d3d[75]]){_0x1960x1f[_0x9d3d[76]]= [{all:true}]};return db[_0x9d3d[50]][_0x9d3d[77]](_0x1960x1f)})[_0x9d3d[40]](function(_0x1960x32){_0x1960x2e[_0x9d3d[74]]= _0x1960x32;return _0x1960x2e})[_0x9d3d[40]](respondWithFilteredResult(_0x1960x1a,_0x1960x1f))[_0x9d3d[73]](handleError(_0x1960x1a,null))};exports[_0x9d3d[78]]= function(_0x1960x2c,_0x1960x1a){var _0x1960x1f={raw:false,where:{id:_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]]}},_0x1960x2d={};_0x1960x2d[_0x9d3d[48]]= _[_0x9d3d[51]](db[_0x9d3d[50]][_0x9d3d[49]]);_0x1960x2d[_0x9d3d[53]]= _[_0x9d3d[51]](_0x1960x2c[_0x9d3d[53]]);_0x1960x2d[_0x9d3d[55]]= _[_0x9d3d[56]](_0x1960x2d[_0x9d3d[48]],_0x1960x2d[_0x9d3d[53]]);_0x1960x1f[_0x9d3d[57]]= _[_0x9d3d[56]](_0x1960x2d[_0x9d3d[48]],qs[_0x9d3d[58]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[58]]));_0x1960x1f[_0x9d3d[57]]= (_0x1960x1f[_0x9d3d[57]][_0x9d3d[59]])?_0x1960x1f[_0x9d3d[57]]:_0x1960x2d[_0x9d3d[48]];if(_0x1960x2c[_0x9d3d[53]][_0x9d3d[75]]){_0x1960x1f[_0x9d3d[76]]= [{all:true}]};_0x1960x1f= _[_0x9d3d[68]]({},_0x1960x1f,_0x1960x2c[_0x9d3d[72]]);return db[_0x9d3d[50]][_0x9d3d[81]](_0x1960x1f)[_0x9d3d[40]](handleEntityNotFound(_0x1960x1a,null))[_0x9d3d[40]](respondWithResult(_0x1960x1a,null))[_0x9d3d[73]](handleError(_0x1960x1a,null))};exports[_0x9d3d[82]]= function(_0x1960x2c,_0x1960x1a){return db[_0x9d3d[50]][_0x9d3d[82]](_0x1960x2c[_0x9d3d[83]],{})[_0x9d3d[40]](respondWithResult(_0x1960x1a,201))[_0x9d3d[73]](handleError(_0x1960x1a,null))};exports[_0x9d3d[41]]= function(_0x1960x2c,_0x1960x1a){if(_0x1960x2c[_0x9d3d[83]][_0x9d3d[79]]){delete _0x1960x2c[_0x9d3d[83]][_0x9d3d[79]]};return db[_0x9d3d[50]][_0x9d3d[81]]({where:{id:_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]]}})[_0x9d3d[40]](handleEntityNotFound(_0x1960x1a,null))[_0x9d3d[40]](saveUpdates(_0x1960x2c[_0x9d3d[83]],null))[_0x9d3d[40]](respondWithResult(_0x1960x1a,null))[_0x9d3d[73]](handleError(_0x1960x1a,null))};exports[_0x9d3d[42]]= function(_0x1960x2c,_0x1960x1a){return db[_0x9d3d[50]][_0x9d3d[81]]({where:{id:_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]]}})[_0x9d3d[40]](handleEntityNotFound(_0x1960x1a,null))[_0x9d3d[40]](removeEntity(_0x1960x1a,null))[_0x9d3d[73]](handleError(_0x1960x1a,null))};exports[_0x9d3d[84]]= function(_0x1960x2c,_0x1960x1a,_0x1960x33){var _0x1960x1f={raw:true,where:{}};var _0x1960x2d={};var _0x1960x34={count:0,rows:[]};return db[_0x9d3d[50]][_0x9d3d[87]]({where:{id:_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]]}})[_0x9d3d[40]](handleEntityNotFound(_0x1960x1a,null))[_0x9d3d[40]](function(_0x1960x1c){if(_0x1960x1c){_0x1960x2d[_0x9d3d[48]]= _[_0x9d3d[51]](db[_0x9d3d[85]][_0x9d3d[49]]);_0x1960x2d[_0x9d3d[53]]= _[_0x9d3d[51]](_0x1960x2c[_0x9d3d[53]]);_0x1960x2d[_0x9d3d[55]]= _[_0x9d3d[56]](_0x1960x2d[_0x9d3d[48]],_0x1960x2d[_0x9d3d[53]]);_0x1960x1f[_0x9d3d[57]]= _[_0x9d3d[56]](_0x1960x2d[_0x9d3d[48]],qs[_0x9d3d[58]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[58]]));_0x1960x1f[_0x9d3d[57]]= (_0x1960x1f[_0x9d3d[57]][_0x9d3d[59]])?_0x1960x1f[_0x9d3d[57]]:_0x1960x2d[_0x9d3d[48]];if(!_0x1960x2c[_0x9d3d[53]][_0x9d3d[61]](_0x9d3d[60])){_0x1960x1f[_0x9d3d[32]]= qs[_0x9d3d[32]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[32]]);_0x1960x1f[_0x9d3d[31]]= qs[_0x9d3d[31]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[31]])};_0x1960x1f[_0x9d3d[62]]= qs[_0x9d3d[63]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[63]]);_0x1960x1f[_0x9d3d[64]]= qs[_0x9d3d[55]](_[_0x9d3d[65]](_0x1960x2c[_0x9d3d[53]],_0x1960x2d[_0x9d3d[55]]));_0x1960x1f[_0x9d3d[64]][_0x9d3d[86]]= _0x1960x1c[_0x9d3d[79]];if(_0x1960x2c[_0x9d3d[53]][_0x9d3d[69]]){_0x1960x1f[_0x9d3d[64]]= _[_0x9d3d[68]](_0x1960x1f[_0x9d3d[64]],{$or:_[_0x9d3d[71]](_0x1960x1f[_0x9d3d[57]],function(_0x1960x30){var _0x1960x2e={};_0x1960x2e[_0x1960x30]= {$like:_0x9d3d[70]+ _0x1960x2c[_0x9d3d[53]][_0x9d3d[69]]+ _0x9d3d[70]};return _0x1960x2e})})};_0x1960x1f= _[_0x9d3d[68]]({},_0x1960x1f,_0x1960x2c[_0x9d3d[72]]);return db[_0x9d3d[85]][_0x9d3d[30]]({where:_0x1960x1f[_0x9d3d[64]]})[_0x9d3d[40]](function(_0x1960x20){_0x1960x34[_0x9d3d[30]]= _0x1960x20;if(_0x1960x2c[_0x9d3d[53]][_0x9d3d[75]]){_0x1960x1f[_0x9d3d[76]]= [{all:true}]};return db[_0x9d3d[85]][_0x9d3d[77]](_0x1960x1f)})[_0x9d3d[40]](function(_0x1960x32){_0x1960x34[_0x9d3d[74]]= _0x1960x32;return _0x1960x34})}})[_0x9d3d[40]](respondWithFilteredResult(_0x1960x1a,_0x1960x1f))[_0x9d3d[73]](handleError(_0x1960x1a,null))};exports[_0x9d3d[88]]= function(_0x1960x2c,_0x1960x1a,_0x1960x33){var _0x1960x1f={raw:true,where:{}};var _0x1960x2d={};var _0x1960x34={count:0,rows:[]};return db[_0x9d3d[50]][_0x9d3d[87]]({where:{id:_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]]}})[_0x9d3d[40]](handleEntityNotFound(_0x1960x1a,null))[_0x9d3d[40]](function(_0x1960x1c){if(_0x1960x1c){_0x1960x2d[_0x9d3d[48]]= _[_0x9d3d[51]](db[_0x9d3d[89]][_0x9d3d[49]]);_0x1960x2d[_0x9d3d[53]]= _[_0x9d3d[51]](_0x1960x2c[_0x9d3d[53]]);_0x1960x2d[_0x9d3d[55]]= _[_0x9d3d[56]](_0x1960x2d[_0x9d3d[48]],_0x1960x2d[_0x9d3d[53]]);_0x1960x1f[_0x9d3d[57]]= _[_0x9d3d[56]](_0x1960x2d[_0x9d3d[48]],qs[_0x9d3d[58]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[58]]));_0x1960x1f[_0x9d3d[57]]= (_0x1960x1f[_0x9d3d[57]][_0x9d3d[59]])?_0x1960x1f[_0x9d3d[57]]:_0x1960x2d[_0x9d3d[48]];if(!_0x1960x2c[_0x9d3d[53]][_0x9d3d[61]](_0x9d3d[60])){_0x1960x1f[_0x9d3d[32]]= qs[_0x9d3d[32]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[32]]);_0x1960x1f[_0x9d3d[31]]= qs[_0x9d3d[31]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[31]])};_0x1960x1f[_0x9d3d[62]]= qs[_0x9d3d[63]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[63]]);_0x1960x1f[_0x9d3d[64]]= qs[_0x9d3d[55]](_[_0x9d3d[65]](_0x1960x2c[_0x9d3d[53]],_0x1960x2d[_0x9d3d[55]]));_0x1960x1f[_0x9d3d[64]][_0x9d3d[86]]= _0x1960x1c[_0x9d3d[79]];if(_0x1960x2c[_0x9d3d[53]][_0x9d3d[69]]){_0x1960x1f[_0x9d3d[64]]= _[_0x9d3d[68]](_0x1960x1f[_0x9d3d[64]],{$or:_[_0x9d3d[71]](_0x1960x1f[_0x9d3d[57]],function(_0x1960x30){var _0x1960x2e={};_0x1960x2e[_0x1960x30]= {$like:_0x9d3d[70]+ _0x1960x2c[_0x9d3d[53]][_0x9d3d[69]]+ _0x9d3d[70]};return _0x1960x2e})})};_0x1960x1f= _[_0x9d3d[68]]({},_0x1960x1f,_0x1960x2c[_0x9d3d[72]]);return db[_0x9d3d[89]][_0x9d3d[30]]({where:_0x1960x1f[_0x9d3d[64]]})[_0x9d3d[40]](function(_0x1960x20){_0x1960x34[_0x9d3d[30]]= _0x1960x20;if(_0x1960x2c[_0x9d3d[53]][_0x9d3d[75]]){_0x1960x1f[_0x9d3d[76]]= [{all:true}]};return db[_0x9d3d[89]][_0x9d3d[77]](_0x1960x1f)})[_0x9d3d[40]](function(_0x1960x32){_0x1960x34[_0x9d3d[74]]= _0x1960x32;return _0x1960x34})}})[_0x9d3d[40]](respondWithFilteredResult(_0x1960x1a,_0x1960x1f))[_0x9d3d[73]](handleError(_0x1960x1a,null))};exports[_0x9d3d[90]]= function(_0x1960x2c,_0x1960x1a,_0x1960x33){var _0x1960x1f={raw:true,where:{}};var _0x1960x2d={};var _0x1960x34={count:0,rows:[]};return db[_0x9d3d[50]][_0x9d3d[87]]({where:{id:_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]]}})[_0x9d3d[40]](handleEntityNotFound(_0x1960x1a,null))[_0x9d3d[40]](function(_0x1960x1c){if(_0x1960x1c){_0x1960x2d[_0x9d3d[48]]= _[_0x9d3d[51]](db[_0x9d3d[91]][_0x9d3d[49]]);_0x1960x2d[_0x9d3d[53]]= _[_0x9d3d[51]](_0x1960x2c[_0x9d3d[53]]);_0x1960x2d[_0x9d3d[55]]= _[_0x9d3d[56]](_0x1960x2d[_0x9d3d[48]],_0x1960x2d[_0x9d3d[53]]);_0x1960x1f[_0x9d3d[57]]= _[_0x9d3d[56]](_0x1960x2d[_0x9d3d[48]],qs[_0x9d3d[58]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[58]]));_0x1960x1f[_0x9d3d[57]]= (_0x1960x1f[_0x9d3d[57]][_0x9d3d[59]])?_0x1960x1f[_0x9d3d[57]]:_0x1960x2d[_0x9d3d[48]];if(!_0x1960x2c[_0x9d3d[53]][_0x9d3d[61]](_0x9d3d[60])){_0x1960x1f[_0x9d3d[32]]= qs[_0x9d3d[32]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[32]]);_0x1960x1f[_0x9d3d[31]]= qs[_0x9d3d[31]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[31]])};_0x1960x1f[_0x9d3d[62]]= qs[_0x9d3d[63]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[63]]);_0x1960x1f[_0x9d3d[64]]= qs[_0x9d3d[55]](_[_0x9d3d[65]](_0x1960x2c[_0x9d3d[53]],_0x1960x2d[_0x9d3d[55]]));_0x1960x1f[_0x9d3d[64]][_0x9d3d[86]]= _0x1960x1c[_0x9d3d[79]];if(_0x1960x2c[_0x9d3d[53]][_0x9d3d[69]]){_0x1960x1f[_0x9d3d[64]]= _[_0x9d3d[68]](_0x1960x1f[_0x9d3d[64]],{$or:_[_0x9d3d[71]](_0x1960x1f[_0x9d3d[57]],function(_0x1960x30){var _0x1960x2e={};_0x1960x2e[_0x1960x30]= {$like:_0x9d3d[70]+ _0x1960x2c[_0x9d3d[53]][_0x9d3d[69]]+ _0x9d3d[70]};return _0x1960x2e})})};_0x1960x1f= _[_0x9d3d[68]]({},_0x1960x1f,_0x1960x2c[_0x9d3d[72]]);return db[_0x9d3d[91]][_0x9d3d[30]]({where:_0x1960x1f[_0x9d3d[64]]})[_0x9d3d[40]](function(_0x1960x20){_0x1960x34[_0x9d3d[30]]= _0x1960x20;if(_0x1960x2c[_0x9d3d[53]][_0x9d3d[75]]){_0x1960x1f[_0x9d3d[76]]= [{all:true}]};return db[_0x9d3d[91]][_0x9d3d[77]](_0x1960x1f)})[_0x9d3d[40]](function(_0x1960x32){_0x1960x34[_0x9d3d[74]]= _0x1960x32;return _0x1960x34})}})[_0x9d3d[40]](respondWithFilteredResult(_0x1960x1a,_0x1960x1f))[_0x9d3d[73]](handleError(_0x1960x1a,null))};exports[_0x9d3d[92]]= function(_0x1960x2c,_0x1960x1a,_0x1960x33){var _0x1960x1f={raw:true,where:{}};var _0x1960x2d={};var _0x1960x34={count:0,rows:[]};return db[_0x9d3d[50]][_0x9d3d[87]]({where:{id:_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]]}})[_0x9d3d[40]](handleEntityNotFound(_0x1960x1a,null))[_0x9d3d[40]](function(_0x1960x1c){if(_0x1960x1c){_0x1960x2d[_0x9d3d[48]]= _[_0x9d3d[51]](db[_0x9d3d[93]][_0x9d3d[49]]);_0x1960x2d[_0x9d3d[53]]= _[_0x9d3d[51]](_0x1960x2c[_0x9d3d[53]]);_0x1960x2d[_0x9d3d[55]]= _[_0x9d3d[56]](_0x1960x2d[_0x9d3d[48]],_0x1960x2d[_0x9d3d[53]]);_0x1960x1f[_0x9d3d[57]]= _[_0x9d3d[56]](_0x1960x2d[_0x9d3d[48]],qs[_0x9d3d[58]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[58]]));_0x1960x1f[_0x9d3d[57]]= (_0x1960x1f[_0x9d3d[57]][_0x9d3d[59]])?_0x1960x1f[_0x9d3d[57]]:_0x1960x2d[_0x9d3d[48]];if(!_0x1960x2c[_0x9d3d[53]][_0x9d3d[61]](_0x9d3d[60])){_0x1960x1f[_0x9d3d[32]]= qs[_0x9d3d[32]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[32]]);_0x1960x1f[_0x9d3d[31]]= qs[_0x9d3d[31]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[31]])};_0x1960x1f[_0x9d3d[62]]= qs[_0x9d3d[63]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[63]]);_0x1960x1f[_0x9d3d[64]]= qs[_0x9d3d[55]](_[_0x9d3d[65]](_0x1960x2c[_0x9d3d[53]],_0x1960x2d[_0x9d3d[55]]));_0x1960x1f[_0x9d3d[64]][_0x9d3d[86]]= _0x1960x1c[_0x9d3d[79]];if(_0x1960x2c[_0x9d3d[53]][_0x9d3d[69]]){_0x1960x1f[_0x9d3d[64]]= _[_0x9d3d[68]](_0x1960x1f[_0x9d3d[64]],{$or:_[_0x9d3d[71]](_0x1960x1f[_0x9d3d[57]],function(_0x1960x30){var _0x1960x2e={};_0x1960x2e[_0x1960x30]= {$like:_0x9d3d[70]+ _0x1960x2c[_0x9d3d[53]][_0x9d3d[69]]+ _0x9d3d[70]};return _0x1960x2e})})};_0x1960x1f= _[_0x9d3d[68]]({},_0x1960x1f,_0x1960x2c[_0x9d3d[72]]);return db[_0x9d3d[93]][_0x9d3d[30]]({where:_0x1960x1f[_0x9d3d[64]]})[_0x9d3d[40]](function(_0x1960x20){_0x1960x34[_0x9d3d[30]]= _0x1960x20;if(_0x1960x2c[_0x9d3d[53]][_0x9d3d[75]]){_0x1960x1f[_0x9d3d[76]]= [{all:true}]};return db[_0x9d3d[93]][_0x9d3d[77]](_0x1960x1f)})[_0x9d3d[40]](function(_0x1960x32){_0x1960x34[_0x9d3d[74]]= _0x1960x32;return _0x1960x34})}})[_0x9d3d[40]](respondWithFilteredResult(_0x1960x1a,_0x1960x1f))[_0x9d3d[73]](handleError(_0x1960x1a,null))};exports[_0x9d3d[94]]= function(_0x1960x2c,_0x1960x1c,_0x1960x33){var _0x1960x1f={};var _0x1960x2d={};var _0x1960x35;var _0x1960x20;return db[_0x9d3d[50]][_0x9d3d[87]]({where:{id:_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]]}})[_0x9d3d[40]](handleEntityNotFound(_0x1960x1c,null))[_0x9d3d[40]](function(_0x1960x1c){if(_0x1960x1c){_0x1960x35= _0x1960x1c;_0x1960x2d[_0x9d3d[48]]= _[_0x9d3d[51]](db[_0x9d3d[95]][_0x9d3d[49]]);_0x1960x2d[_0x9d3d[53]]= _[_0x9d3d[51]](_0x1960x2c[_0x9d3d[53]]);_0x1960x2d[_0x9d3d[55]]= _[_0x9d3d[56]](_0x1960x2d[_0x9d3d[48]],_0x1960x2d[_0x9d3d[53]]);_0x1960x1f[_0x9d3d[57]]= _[_0x9d3d[56]](_0x1960x2d[_0x9d3d[48]],qs[_0x9d3d[58]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[58]]));_0x1960x1f[_0x9d3d[57]]= (_0x1960x1f[_0x9d3d[57]][_0x9d3d[59]])?_0x1960x1f[_0x9d3d[57]]:_0x1960x2d[_0x9d3d[48]];_0x1960x1f[_0x9d3d[62]]= qs[_0x9d3d[63]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[63]]);_0x1960x1f[_0x9d3d[64]]= qs[_0x9d3d[55]](_[_0x9d3d[65]](_0x1960x2c[_0x9d3d[53]],_0x1960x2d[_0x9d3d[55]]));if(_0x1960x2c[_0x9d3d[53]][_0x9d3d[69]]){_0x1960x1f[_0x9d3d[64]]= _[_0x9d3d[68]](_0x1960x1f[_0x9d3d[64]],{$or:_[_0x9d3d[71]](_0x1960x1f[_0x9d3d[57]],function(_0x1960x30){var _0x1960x2e={};_0x1960x2e[_0x1960x30]= {$like:_0x9d3d[70]+ _0x1960x2c[_0x9d3d[53]][_0x9d3d[69]]+ _0x9d3d[70]};return _0x1960x2e})})};_0x1960x1f= _[_0x9d3d[68]]({},_0x1960x1f,_0x1960x2c[_0x9d3d[72]]);return _0x1960x35[_0x9d3d[94]](_0x1960x1f)}})[_0x9d3d[40]](function(_0x1960x36){if(_0x1960x36){_0x1960x20= _0x1960x36[_0x9d3d[59]];if(!_0x1960x2c[_0x9d3d[53]][_0x9d3d[61]](_0x9d3d[60])){_0x1960x1f[_0x9d3d[32]]= qs[_0x9d3d[32]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[32]]);_0x1960x1f[_0x9d3d[31]]= qs[_0x9d3d[31]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[31]])};return _0x1960x35[_0x9d3d[94]](_0x1960x1f)}})[_0x9d3d[40]](function(_0x1960x32){if(_0x1960x32){return _0x1960x32?{count:_0x1960x20,rows:_0x1960x32}:null}})[_0x9d3d[40]](respondWithResult(_0x1960x1c,null))[_0x9d3d[73]](handleError(_0x1960x1c,null))};exports[_0x9d3d[96]]= function(_0x1960x2c,_0x1960x1a,_0x1960x33){var _0x1960x37,_0x1960x38;return db[_0x9d3d[50]][_0x9d3d[81]]({where:{id:_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]]}})[_0x9d3d[40]](handleEntityNotFound(_0x1960x1a,null))[_0x9d3d[40]](function(_0x1960x1c){if(_0x1960x1c){_0x1960x38= _0x1960x1c;return _0x1960x1c[_0x9d3d[96]](_0x1960x2c[_0x9d3d[83]][_0x9d3d[128]],_[_0x9d3d[129]](_0x1960x2c[_0x9d3d[83]],[_0x9d3d[128],_0x9d3d[79]])|| {})};return null})[_0x9d3d[127]](function(_0x1960x39){var _0x1960x3a;_0x1960x37= _0x1960x39|| [];var _0x1960x3b=[];if(_0x1960x39){for(var _0x1960x3c=0;_0x1960x3c< _0x1960x39[_0x9d3d[59]];_0x1960x3c+= 1){var _0x1960x3d=_0x1960x39[_0x1960x3c][_0x9d3d[97]]({plain:true});_0x1960x38[_0x9d3d[98]]= _0x1960x2c[_0x9d3d[83]][_0x9d3d[98]]?_0x1960x2c[_0x9d3d[83]][_0x9d3d[98]]:_0x1960x38[_0x9d3d[98]];switch(_0x1960x38[_0x9d3d[98]]){case _0x9d3d[122]:_0x1960x3a= squel[_0x9d3d[121]]()[_0x9d3d[120]](_0x9d3d[107])[_0x9d3d[119]]([_0x9d3d[99],_0x9d3d[100],_0x9d3d[101],_0x9d3d[102],_0x9d3d[86],_0x9d3d[103],_0x9d3d[104]],squel[_0x9d3d[110]]()[_0x9d3d[109]](_0x9d3d[99],_0x9d3d[99])[_0x9d3d[109]](_0x9d3d[118],_0x9d3d[100])[_0x9d3d[109]](_0x9d3d[79],_0x9d3d[101])[_0x9d3d[109]](_0x1960x3d[_0x9d3d[115]].toString(),_0x9d3d[102])[_0x9d3d[109]](_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]].toString(),_0x9d3d[86])[_0x9d3d[109]](_0x9d3d[118],_0x9d3d[103])[_0x9d3d[109]](_0x9d3d[118],_0x9d3d[104])[_0x9d3d[108]](_0x9d3d[117])[_0x9d3d[64]](_0x9d3d[116])[_0x9d3d[64]](_0x9d3d[114],_0x1960x3d[_0x9d3d[115]].toString())[_0x9d3d[64]](_0x9d3d[113])[_0x9d3d[64]](_0x9d3d[105],squel[_0x9d3d[110]]()[_0x9d3d[109]](_0x9d3d[112])[_0x9d3d[108]](_0x9d3d[111])[_0x9d3d[64]](_0x9d3d[106],_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]].toString()))[_0x9d3d[64]](_0x9d3d[105],squel[_0x9d3d[110]]()[_0x9d3d[109]](_0x9d3d[99])[_0x9d3d[108]](_0x9d3d[107])[_0x9d3d[64]](_0x9d3d[106],_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]].toString()))).toString();break;case _0x9d3d[123]:_0x1960x3a= squel[_0x9d3d[121]]()[_0x9d3d[120]](_0x9d3d[107])[_0x9d3d[119]]([_0x9d3d[99],_0x9d3d[100],_0x9d3d[101],_0x9d3d[102],_0x9d3d[86],_0x9d3d[103],_0x9d3d[104]],squel[_0x9d3d[110]]()[_0x9d3d[109]](_0x9d3d[99],_0x9d3d[99])[_0x9d3d[109]](_0x9d3d[118],_0x9d3d[100])[_0x9d3d[109]](_0x9d3d[79],_0x9d3d[101])[_0x9d3d[109]](_0x1960x3d[_0x9d3d[115]].toString(),_0x9d3d[102])[_0x9d3d[109]](_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]].toString(),_0x9d3d[86])[_0x9d3d[109]](_0x9d3d[118],_0x9d3d[103])[_0x9d3d[109]](_0x9d3d[118],_0x9d3d[104])[_0x9d3d[108]](_0x9d3d[117])[_0x9d3d[64]](_0x9d3d[116])[_0x9d3d[64]](_0x9d3d[114],_0x1960x3d[_0x9d3d[115]].toString())[_0x9d3d[64]](_0x9d3d[113])[_0x9d3d[64]](_0x9d3d[105],squel[_0x9d3d[110]]()[_0x9d3d[109]](_0x9d3d[99])[_0x9d3d[108]](_0x9d3d[107])[_0x9d3d[64]](_0x9d3d[106],_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]].toString()))).toString();break;default:_0x1960x3a= squel[_0x9d3d[121]]()[_0x9d3d[120]](_0x9d3d[107])[_0x9d3d[119]]([_0x9d3d[99],_0x9d3d[100],_0x9d3d[101],_0x9d3d[102],_0x9d3d[86],_0x9d3d[103],_0x9d3d[104]],squel[_0x9d3d[110]]()[_0x9d3d[109]](_0x9d3d[99],_0x9d3d[99])[_0x9d3d[109]](_0x9d3d[118],_0x9d3d[100])[_0x9d3d[109]](_0x9d3d[79],_0x9d3d[101])[_0x9d3d[109]](_0x1960x3d[_0x9d3d[115]].toString(),_0x9d3d[102])[_0x9d3d[109]](_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]].toString(),_0x9d3d[86])[_0x9d3d[109]](_0x9d3d[118],_0x9d3d[103])[_0x9d3d[109]](_0x9d3d[118],_0x9d3d[104])[_0x9d3d[108]](_0x9d3d[117])[_0x9d3d[64]](_0x9d3d[116])[_0x9d3d[64]](_0x9d3d[114],_0x1960x3d[_0x9d3d[115]].toString())[_0x9d3d[64]](_0x9d3d[113])).toString()};_0x1960x3b[_0x9d3d[125]](db[_0x9d3d[124]][_0x9d3d[53]](_0x1960x3a))};return BPromise[_0x9d3d[126]](_0x1960x3b)}})[_0x9d3d[40]](function(){return _0x1960x37})[_0x9d3d[40]](respondWithResult(_0x1960x1a,null))[_0x9d3d[73]](handleError(_0x1960x1a,null))};exports[_0x9d3d[130]]= function(_0x1960x2c,_0x1960x1a,_0x1960x33){var _0x1960x36;return db[_0x9d3d[50]][_0x9d3d[81]]({where:{id:_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]]}})[_0x9d3d[40]](handleEntityNotFound(_0x1960x1a,null))[_0x9d3d[40]](function(_0x1960x1c){if(_0x1960x1c){return _0x1960x1c[_0x9d3d[130]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[128]])}})[_0x9d3d[40]](function(_0x1960x39){if(_0x1960x39){_0x1960x36= _0x1960x39;return db[_0x9d3d[85]][_0x9d3d[42]]({where:{ListId:_0x1960x2c[_0x9d3d[53]][_0x9d3d[128]],CampaignId:_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]]}})[_0x9d3d[40]](function(){return _0x1960x36})}})[_0x9d3d[40]](respondWithStatusCode(_0x1960x1a,null))[_0x9d3d[73]](handleError(_0x1960x1a,null))};exports[_0x9d3d[131]]= function(_0x1960x2c,_0x1960x1c,_0x1960x33){var _0x1960x1f={};var _0x1960x2d={};var _0x1960x35;var _0x1960x20;return db[_0x9d3d[50]][_0x9d3d[87]]({where:{id:_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]]}})[_0x9d3d[40]](handleEntityNotFound(_0x1960x1c,null))[_0x9d3d[40]](function(_0x1960x1c){if(_0x1960x1c){_0x1960x35= _0x1960x1c;_0x1960x2d[_0x9d3d[48]]= _[_0x9d3d[51]](db[_0x9d3d[95]][_0x9d3d[49]]);_0x1960x2d[_0x9d3d[53]]= _[_0x9d3d[51]](_0x1960x2c[_0x9d3d[53]]);_0x1960x2d[_0x9d3d[55]]= _[_0x9d3d[56]](_0x1960x2d[_0x9d3d[48]],_0x1960x2d[_0x9d3d[53]]);_0x1960x1f[_0x9d3d[57]]= _[_0x9d3d[56]](_0x1960x2d[_0x9d3d[48]],qs[_0x9d3d[58]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[58]]));_0x1960x1f[_0x9d3d[57]]= (_0x1960x1f[_0x9d3d[57]][_0x9d3d[59]])?_0x1960x1f[_0x9d3d[57]]:_0x1960x2d[_0x9d3d[48]];_0x1960x1f[_0x9d3d[62]]= qs[_0x9d3d[63]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[63]]);_0x1960x1f[_0x9d3d[64]]= qs[_0x9d3d[55]](_[_0x9d3d[65]](_0x1960x2c[_0x9d3d[53]],_0x1960x2d[_0x9d3d[55]]));if(_0x1960x2c[_0x9d3d[53]][_0x9d3d[69]]){_0x1960x1f[_0x9d3d[64]]= _[_0x9d3d[68]](_0x1960x1f[_0x9d3d[64]],{$or:_[_0x9d3d[71]](_0x1960x1f[_0x9d3d[57]],function(_0x1960x30){var _0x1960x2e={};_0x1960x2e[_0x1960x30]= {$like:_0x9d3d[70]+ _0x1960x2c[_0x9d3d[53]][_0x9d3d[69]]+ _0x9d3d[70]};return _0x1960x2e})})};_0x1960x1f= _[_0x9d3d[68]]({},_0x1960x1f,_0x1960x2c[_0x9d3d[72]]);return _0x1960x35[_0x9d3d[131]](_0x1960x1f)}})[_0x9d3d[40]](function(_0x1960x36){if(_0x1960x36){_0x1960x20= _0x1960x36[_0x9d3d[59]];if(!_0x1960x2c[_0x9d3d[53]][_0x9d3d[61]](_0x9d3d[60])){_0x1960x1f[_0x9d3d[32]]= qs[_0x9d3d[32]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[32]]);_0x1960x1f[_0x9d3d[31]]= qs[_0x9d3d[31]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[31]])};return _0x1960x35[_0x9d3d[131]](_0x1960x1f)}})[_0x9d3d[40]](function(_0x1960x32){if(_0x1960x32){return _0x1960x32?{count:_0x1960x20,rows:_0x1960x32}:null}})[_0x9d3d[40]](respondWithResult(_0x1960x1c,null))[_0x9d3d[73]](handleError(_0x1960x1c,null))};exports[_0x9d3d[132]]= function(_0x1960x2c,_0x1960x1a,_0x1960x33){var _0x1960x37,_0x1960x38;return db[_0x9d3d[50]][_0x9d3d[81]]({where:{id:_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]]}})[_0x9d3d[40]](handleEntityNotFound(_0x1960x1a,null))[_0x9d3d[40]](function(_0x1960x1c){if(_0x1960x1c){_0x1960x38= _0x1960x1c;return _0x1960x1c[_0x9d3d[132]](_0x1960x2c[_0x9d3d[83]][_0x9d3d[128]],_[_0x9d3d[129]](_0x1960x2c[_0x9d3d[83]],[_0x9d3d[128],_0x9d3d[79]])|| {})};return null})[_0x9d3d[127]](function(_0x1960x39){var _0x1960x3a;_0x1960x37= _0x1960x39|| [];var _0x1960x3b=[];if(_0x1960x39){for(var _0x1960x3c=0;_0x1960x3c< _0x1960x39[_0x9d3d[59]];_0x1960x3c+= 1){var _0x1960x3d=_0x1960x39[_0x1960x3c][_0x9d3d[97]]({plain:true});_0x1960x3a= squel[_0x9d3d[121]]()[_0x9d3d[120]](_0x9d3d[133])[_0x9d3d[119]]([_0x9d3d[99],_0x9d3d[101],_0x9d3d[102],_0x9d3d[86],_0x9d3d[103],_0x9d3d[104]],squel[_0x9d3d[110]]()[_0x9d3d[109]](_0x9d3d[99],_0x9d3d[99])[_0x9d3d[109]](_0x9d3d[79],_0x9d3d[101])[_0x9d3d[109]](_0x1960x3d[_0x9d3d[115]].toString(),_0x9d3d[102])[_0x9d3d[109]](_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]].toString(),_0x9d3d[86])[_0x9d3d[109]](_0x9d3d[118],_0x9d3d[103])[_0x9d3d[109]](_0x9d3d[118],_0x9d3d[104])[_0x9d3d[108]](_0x9d3d[117])[_0x9d3d[64]](_0x9d3d[116])[_0x9d3d[64]](_0x9d3d[114],_0x1960x3d[_0x9d3d[115]].toString())[_0x9d3d[64]](_0x9d3d[113])).toString();_0x1960x3b[_0x9d3d[125]](db[_0x9d3d[124]][_0x9d3d[53]](_0x1960x3a))};return BPromise[_0x9d3d[126]](_0x1960x3b)}})[_0x9d3d[40]](function(){return _0x1960x37})[_0x9d3d[40]](respondWithResult(_0x1960x1a,null))[_0x9d3d[73]](handleError(_0x1960x1a,null))};exports[_0x9d3d[134]]= function(_0x1960x2c,_0x1960x1a,_0x1960x33){var _0x1960x36;return db[_0x9d3d[50]][_0x9d3d[81]]({where:{id:_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]]}})[_0x9d3d[40]](handleEntityNotFound(_0x1960x1a,null))[_0x9d3d[40]](function(_0x1960x1c){if(_0x1960x1c){return _0x1960x1c[_0x9d3d[134]](_0x1960x2c[_0x9d3d[53]][_0x9d3d[128]])}})[_0x9d3d[40]](function(_0x1960x39){if(_0x1960x39){_0x1960x36= _0x1960x39;return db[_0x9d3d[93]][_0x9d3d[42]]({where:{ListId:_0x1960x2c[_0x9d3d[53]][_0x9d3d[128]],CampaignId:_0x1960x2c[_0x9d3d[80]][_0x9d3d[79]]}})[_0x9d3d[40]](function(){return _0x1960x36})}})[_0x9d3d[40]](respondWithStatusCode(_0x1960x1a,null))[_0x9d3d[73]](handleError(_0x1960x1a,null))}
\ No newline at end of file
+var _0xbea7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x61\x6D\x70\x61\x69\x67\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x69\x65\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x67\x65\x74\x4C\x69\x73\x74\x73","\x43\x6D\x4C\x69\x73\x74","\x61\x64\x64\x4C\x69\x73\x74\x73","\x67\x65\x74","\x64\x69\x61\x6C\x43\x68\x65\x63\x6B\x44\x75\x70\x6C\x69\x63\x61\x74\x65\x54\x79\x70\x65","\x70\x68\x6F\x6E\x65","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x68\x6F\x6E\x65\x20\x4E\x4F\x54\x20\x49\x4E\x20\x28\x3F\x29","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64\x20\x3D\x20\x3F","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72","\x66\x72\x6F\x6D","\x66\x69\x65\x6C\x64","\x73\x65\x6C\x65\x63\x74","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x66\x69\x6E\x61\x6C","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x70\x68\x6F\x6E\x65\x20\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C","\x4C\x69\x73\x74\x49\x64\x20\x3D\x20\x3F","\x43\x6D\x4C\x69\x73\x74\x49\x64","\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x20\x49\x53\x20\x4E\x55\x4C\x4C","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x4E\x4F\x57\x28\x29","\x66\x72\x6F\x6D\x51\x75\x65\x72\x79","\x69\x6E\x74\x6F","\x69\x6E\x73\x65\x72\x74","\x61\x6C\x77\x61\x79\x73","\x6F\x6E\x6C\x79\x49\x66\x4F\x70\x65\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x70\x75\x73\x68","\x61\x6C\x6C","\x73\x70\x72\x65\x61\x64","\x69\x64\x73","\x6F\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x73","\x67\x65\x74\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x61\x64\x64\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x62\x6C\x61\x63\x6B","\x72\x65\x6D\x6F\x76\x65\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73"];_0xbea7[0];var jsonpatch=require(_0xbea7[1]);var rp=require(_0xbea7[2]);var moment=require(_0xbea7[3]);var BPromise=require(_0xbea7[4]);var Mustache=require(_0xbea7[5]);var util=require(_0xbea7[6]);var path=require(_0xbea7[7]);var sox=require(_0xbea7[8]);var csv=require(_0xbea7[9]);var ejs=require(_0xbea7[10]);var fs=require(_0xbea7[11]);var _=require(_0xbea7[12]);var squel=require(_0xbea7[13]);var crypto=require(_0xbea7[14]);var jsforce=require(_0xbea7[15]);var deskjs=require(_0xbea7[16]);var toCsv=require(_0xbea7[9]);var querystring=require(_0xbea7[17]);var Papa=require(_0xbea7[18]);var qs=require(_0xbea7[19]);var logger=require(_0xbea7[21])(_0xbea7[20]);var utils=require(_0xbea7[22]);var config=require(_0xbea7[23]);var db=require(_0xbea7[25])[_0xbea7[24]];function respondWithStatusCode(_0x7b26x1a,_0x7b26x1b){_0x7b26x1b= _0x7b26x1b|| 204;return function(_0x7b26x1c){if(_0x7b26x1c){return _0x7b26x1a[_0xbea7[26]](_0x7b26x1b)};return _0x7b26x1a[_0xbea7[28]](_0x7b26x1b)[_0xbea7[27]]()}}function respondWithResult(_0x7b26x1a,_0x7b26x1b){_0x7b26x1b= _0x7b26x1b|| 200;return function(_0x7b26x1c){if(_0x7b26x1c){return _0x7b26x1a[_0xbea7[28]](_0x7b26x1b)[_0xbea7[29]](_0x7b26x1c)}}}function respondWithFilteredResult(_0x7b26x1a,_0x7b26x1f){return function(_0x7b26x1c){if(_0x7b26x1c){var _0x7b26x20=_0x7b26x1c[_0xbea7[30]],_0x7b26x21=_0x7b26x1f[_0xbea7[31]],_0x7b26x22=_0x7b26x1f[_0xbea7[31]]+ _0x7b26x1f[_0xbea7[32]],_0x7b26x1b;if(_0x7b26x22>= _0x7b26x20){_0x7b26x22= _0x7b26x20;_0x7b26x1b= 200}else {_0x7b26x1b= 206};_0x7b26x1a[_0xbea7[28]](_0x7b26x1b);return _0x7b26x1a[_0xbea7[36]](_0xbea7[33],_0x7b26x21+ _0xbea7[34]+ _0x7b26x22+ _0xbea7[35]+ _0x7b26x20)[_0xbea7[29]](_0x7b26x1c)};return null}}function patchUpdates(_0x7b26x24){return function(_0x7b26x1c){try{jsonpatch[_0xbea7[37]](_0x7b26x1c,_0x7b26x24,true)}catch(err){return BPromise[_0xbea7[38]](err)};return _0x7b26x1c[_0xbea7[39]]()}}function saveUpdates(_0x7b26x26,_0x7b26x1b){return function(_0x7b26x1c){if(_0x7b26x1c){return _0x7b26x1c[_0xbea7[41]](_0x7b26x26)[_0xbea7[40]](function(_0x7b26x27){return _0x7b26x27})};return null}}function removeEntity(_0x7b26x1a,_0x7b26x1b){return function(_0x7b26x1c){if(_0x7b26x1c){return _0x7b26x1c[_0xbea7[42]]()[_0xbea7[40]](function(){_0x7b26x1a[_0xbea7[28]](204)[_0xbea7[27]]()})}}}function handleEntityNotFound(_0x7b26x1a,_0x7b26x1b){return function(_0x7b26x1c){if(!_0x7b26x1c){_0x7b26x1a[_0xbea7[26]](404)};return _0x7b26x1c}}function handleError(_0x7b26x1a,_0x7b26x1b){_0x7b26x1b= _0x7b26x1b|| 500;return function(_0x7b26x2b){logger[_0xbea7[44]](_0x7b26x2b[_0xbea7[43]]);if(_0x7b26x2b[_0xbea7[45]]){delete _0x7b26x2b[_0xbea7[45]]};_0x7b26x1a[_0xbea7[28]](_0x7b26x1b)[_0xbea7[46]](_0x7b26x2b)}}exports[_0xbea7[47]]= function(_0x7b26x2c,_0x7b26x1a){var _0x7b26x1f={},_0x7b26x2d={},_0x7b26x2e={count:0,rows:[]};_0x7b26x2d[_0xbea7[48]]= _[_0xbea7[51]](db[_0xbea7[50]][_0xbea7[49]]);var _0x7b26x2f={dateStart:_0x7b26x2c[_0xbea7[53]][_0xbea7[52]],dateEnd:_0x7b26x2c[_0xbea7[53]][_0xbea7[54]]};delete _0x7b26x2c[_0xbea7[53]][_0xbea7[52]];delete _0x7b26x2c[_0xbea7[53]][_0xbea7[54]];_0x7b26x2d[_0xbea7[53]]= _[_0xbea7[51]](_0x7b26x2c[_0xbea7[53]]);_0x7b26x2d[_0xbea7[55]]= _[_0xbea7[56]](_0x7b26x2d[_0xbea7[48]],_0x7b26x2d[_0xbea7[53]]);_0x7b26x1f[_0xbea7[57]]= _[_0xbea7[56]](_0x7b26x2d[_0xbea7[48]],qs[_0xbea7[58]](_0x7b26x2c[_0xbea7[53]][_0xbea7[58]]));_0x7b26x1f[_0xbea7[57]]= (_0x7b26x1f[_0xbea7[57]][_0xbea7[59]])?_0x7b26x1f[_0xbea7[57]]:_0x7b26x2d[_0xbea7[48]];if(!_0x7b26x2c[_0xbea7[53]][_0xbea7[61]](_0xbea7[60])){_0x7b26x1f[_0xbea7[32]]= qs[_0xbea7[32]](_0x7b26x2c[_0xbea7[53]][_0xbea7[32]]);_0x7b26x1f[_0xbea7[31]]= qs[_0xbea7[31]](_0x7b26x2c[_0xbea7[53]][_0xbea7[31]])};_0x7b26x1f[_0xbea7[62]]= qs[_0xbea7[63]](_0x7b26x2c[_0xbea7[53]][_0xbea7[63]]);_0x7b26x1f[_0xbea7[64]]= qs[_0xbea7[55]](_[_0xbea7[65]](_0x7b26x2c[_0xbea7[53]],_0x7b26x2d[_0xbea7[55]]));if(_0x7b26x2f[_0xbea7[52]]){if(_0x7b26x2f[_0xbea7[54]]){_0x7b26x2f[_0xbea7[54]]= moment(_0x7b26x2f[_0xbea7[54]])[_0xbea7[67]](1,_0xbea7[66])}else {_0x7b26x2f[_0xbea7[54]]= moment(_0x7b26x2f[_0xbea7[52]])[_0xbea7[67]](1,_0xbea7[66])};_[_0xbea7[68]](_0x7b26x1f[_0xbea7[64]],{createdAt:{$gte:_0x7b26x2f[_0xbea7[52]],$lte:_0x7b26x2f[_0xbea7[54]]}})};if(_0x7b26x2c[_0xbea7[53]][_0xbea7[69]]){_0x7b26x1f[_0xbea7[64]]= _[_0xbea7[68]](_0x7b26x1f[_0xbea7[64]],{$or:_[_0xbea7[71]](_0x7b26x1f[_0xbea7[57]],function(_0x7b26x30){var _0x7b26x2e={};_0x7b26x2e[_0x7b26x30]= {$like:_0xbea7[70]+ _0x7b26x2c[_0xbea7[53]][_0xbea7[69]]+ _0xbea7[70]};return _0x7b26x2e})})};_0x7b26x1f= _[_0xbea7[68]]({},_0x7b26x1f,_0x7b26x2c[_0xbea7[72]]);var _0x7b26x31={where:_0x7b26x1f[_0xbea7[64]]};return db[_0xbea7[50]][_0xbea7[30]](_0x7b26x31)[_0xbea7[40]](function(_0x7b26x20){_0x7b26x2e[_0xbea7[30]]= _0x7b26x20;if(_0x7b26x2c[_0xbea7[53]][_0xbea7[75]]){_0x7b26x1f[_0xbea7[76]]= [{all:true}]};return db[_0xbea7[50]][_0xbea7[77]](_0x7b26x1f)})[_0xbea7[40]](function(_0x7b26x32){_0x7b26x2e[_0xbea7[74]]= _0x7b26x32;return _0x7b26x2e})[_0xbea7[40]](respondWithFilteredResult(_0x7b26x1a,_0x7b26x1f))[_0xbea7[73]](handleError(_0x7b26x1a,null))};exports[_0xbea7[78]]= function(_0x7b26x2c,_0x7b26x1a){var _0x7b26x1f={raw:false,where:{id:_0x7b26x2c[_0xbea7[80]][_0xbea7[79]]}},_0x7b26x2d={};_0x7b26x2d[_0xbea7[48]]= _[_0xbea7[51]](db[_0xbea7[50]][_0xbea7[49]]);_0x7b26x2d[_0xbea7[53]]= _[_0xbea7[51]](_0x7b26x2c[_0xbea7[53]]);_0x7b26x2d[_0xbea7[55]]= _[_0xbea7[56]](_0x7b26x2d[_0xbea7[48]],_0x7b26x2d[_0xbea7[53]]);_0x7b26x1f[_0xbea7[57]]= _[_0xbea7[56]](_0x7b26x2d[_0xbea7[48]],qs[_0xbea7[58]](_0x7b26x2c[_0xbea7[53]][_0xbea7[58]]));_0x7b26x1f[_0xbea7[57]]= (_0x7b26x1f[_0xbea7[57]][_0xbea7[59]])?_0x7b26x1f[_0xbea7[57]]:_0x7b26x2d[_0xbea7[48]];if(_0x7b26x2c[_0xbea7[53]][_0xbea7[75]]){_0x7b26x1f[_0xbea7[76]]= [{all:true}]};_0x7b26x1f= _[_0xbea7[68]]({},_0x7b26x1f,_0x7b26x2c[_0xbea7[72]]);return db[_0xbea7[50]][_0xbea7[81]](_0x7b26x1f)[_0xbea7[40]](handleEntityNotFound(_0x7b26x1a,null))[_0xbea7[40]](respondWithResult(_0x7b26x1a,null))[_0xbea7[73]](handleError(_0x7b26x1a,null))};exports[_0xbea7[82]]= function(_0x7b26x2c,_0x7b26x1a){return db[_0xbea7[50]][_0xbea7[82]](_0x7b26x2c[_0xbea7[83]],{})[_0xbea7[40]](respondWithResult(_0x7b26x1a,201))[_0xbea7[73]](handleError(_0x7b26x1a,null))};exports[_0xbea7[41]]= function(_0x7b26x2c,_0x7b26x1a){if(_0x7b26x2c[_0xbea7[83]][_0xbea7[79]]){delete _0x7b26x2c[_0xbea7[83]][_0xbea7[79]]};return db[_0xbea7[50]][_0xbea7[81]]({where:{id:_0x7b26x2c[_0xbea7[80]][_0xbea7[79]]}})[_0xbea7[40]](handleEntityNotFound(_0x7b26x1a,null))[_0xbea7[40]](saveUpdates(_0x7b26x2c[_0xbea7[83]],null))[_0xbea7[40]](respondWithResult(_0x7b26x1a,null))[_0xbea7[73]](handleError(_0x7b26x1a,null))};exports[_0xbea7[42]]= function(_0x7b26x2c,_0x7b26x1a){return db[_0xbea7[50]][_0xbea7[81]]({where:{id:_0x7b26x2c[_0xbea7[80]][_0xbea7[79]]}})[_0xbea7[40]](handleEntityNotFound(_0x7b26x1a,null))[_0xbea7[40]](removeEntity(_0x7b26x1a,null))[_0xbea7[73]](handleError(_0x7b26x1a,null))};exports[_0xbea7[84]]= function(_0x7b26x2c,_0x7b26x1a,_0x7b26x33){var _0x7b26x1f={raw:true,where:{}};var _0x7b26x2d={};var _0x7b26x34={count:0,rows:[]};return db[_0xbea7[50]][_0xbea7[87]]({where:{id:_0x7b26x2c[_0xbea7[80]][_0xbea7[79]]}})[_0xbea7[40]](handleEntityNotFound(_0x7b26x1a,null))[_0xbea7[40]](function(_0x7b26x1c){if(_0x7b26x1c){_0x7b26x2d[_0xbea7[48]]= _[_0xbea7[51]](db[_0xbea7[85]][_0xbea7[49]]);_0x7b26x2d[_0xbea7[53]]= _[_0xbea7[51]](_0x7b26x2c[_0xbea7[53]]);_0x7b26x2d[_0xbea7[55]]= _[_0xbea7[56]](_0x7b26x2d[_0xbea7[48]],_0x7b26x2d[_0xbea7[53]]);_0x7b26x1f[_0xbea7[57]]= _[_0xbea7[56]](_0x7b26x2d[_0xbea7[48]],qs[_0xbea7[58]](_0x7b26x2c[_0xbea7[53]][_0xbea7[58]]));_0x7b26x1f[_0xbea7[57]]= (_0x7b26x1f[_0xbea7[57]][_0xbea7[59]])?_0x7b26x1f[_0xbea7[57]]:_0x7b26x2d[_0xbea7[48]];if(!_0x7b26x2c[_0xbea7[53]][_0xbea7[61]](_0xbea7[60])){_0x7b26x1f[_0xbea7[32]]= qs[_0xbea7[32]](_0x7b26x2c[_0xbea7[53]][_0xbea7[32]]);_0x7b26x1f[_0xbea7[31]]= qs[_0xbea7[31]](_0x7b26x2c[_0xbea7[53]][_0xbea7[31]])};_0x7b26x1f[_0xbea7[62]]= qs[_0xbea7[63]](_0x7b26x2c[_0xbea7[53]][_0xbea7[63]]);_0x7b26x1f[_0xbea7[64]]= qs[_0xbea7[55]](_[_0xbea7[65]](_0x7b26x2c[_0xbea7[53]],_0x7b26x2d[_0xbea7[55]]));_0x7b26x1f[_0xbea7[64]][_0xbea7[86]]= _0x7b26x1c[_0xbea7[79]];if(_0x7b26x2c[_0xbea7[53]][_0xbea7[69]]){_0x7b26x1f[_0xbea7[64]]= _[_0xbea7[68]](_0x7b26x1f[_0xbea7[64]],{$or:_[_0xbea7[71]](_0x7b26x1f[_0xbea7[57]],function(_0x7b26x30){var _0x7b26x2e={};_0x7b26x2e[_0x7b26x30]= {$like:_0xbea7[70]+ _0x7b26x2c[_0xbea7[53]][_0xbea7[69]]+ _0xbea7[70]};return _0x7b26x2e})})};_0x7b26x1f= _[_0xbea7[68]]({},_0x7b26x1f,_0x7b26x2c[_0xbea7[72]]);return db[_0xbea7[85]][_0xbea7[30]]({where:_0x7b26x1f[_0xbea7[64]]})[_0xbea7[40]](function(_0x7b26x20){_0x7b26x34[_0xbea7[30]]= _0x7b26x20;if(_0x7b26x2c[_0xbea7[53]][_0xbea7[75]]){_0x7b26x1f[_0xbea7[76]]= [{all:true}]};return db[_0xbea7[85]][_0xbea7[77]](_0x7b26x1f)})[_0xbea7[40]](function(_0x7b26x32){_0x7b26x34[_0xbea7[74]]= _0x7b26x32;return _0x7b26x34})}})[_0xbea7[40]](respondWithFilteredResult(_0x7b26x1a,_0x7b26x1f))[_0xbea7[73]](handleError(_0x7b26x1a,null))};exports[_0xbea7[88]]= function(_0x7b26x2c,_0x7b26x1a,_0x7b26x33){var _0x7b26x1f={raw:true,where:{}};var _0x7b26x2d={};var _0x7b26x34={count:0,rows:[]};return db[_0xbea7[50]][_0xbea7[87]]({where:{id:_0x7b26x2c[_0xbea7[80]][_0xbea7[79]]}})[_0xbea7[40]](handleEntityNotFound(_0x7b26x1a,null))[_0xbea7[40]](function(_0x7b26x1c){if(_0x7b26x1c){_0x7b26x2d[_0xbea7[48]]= _[_0xbea7[51]](db[_0xbea7[89]][_0xbea7[49]]);_0x7b26x2d[_0xbea7[53]]= _[_0xbea7[51]](_0x7b26x2c[_0xbea7[53]]);_0x7b26x2d[_0xbea7[55]]= _[_0xbea7[56]](_0x7b26x2d[_0xbea7[48]],_0x7b26x2d[_0xbea7[53]]);_0x7b26x1f[_0xbea7[57]]= _[_0xbea7[56]](_0x7b26x2d[_0xbea7[48]],qs[_0xbea7[58]](_0x7b26x2c[_0xbea7[53]][_0xbea7[58]]));_0x7b26x1f[_0xbea7[57]]= (_0x7b26x1f[_0xbea7[57]][_0xbea7[59]])?_0x7b26x1f[_0xbea7[57]]:_0x7b26x2d[_0xbea7[48]];if(!_0x7b26x2c[_0xbea7[53]][_0xbea7[61]](_0xbea7[60])){_0x7b26x1f[_0xbea7[32]]= qs[_0xbea7[32]](_0x7b26x2c[_0xbea7[53]][_0xbea7[32]]);_0x7b26x1f[_0xbea7[31]]= qs[_0xbea7[31]](_0x7b26x2c[_0xbea7[53]][_0xbea7[31]])};_0x7b26x1f[_0xbea7[62]]= qs[_0xbea7[63]](_0x7b26x2c[_0xbea7[53]][_0xbea7[63]]);_0x7b26x1f[_0xbea7[64]]= qs[_0xbea7[55]](_[_0xbea7[65]](_0x7b26x2c[_0xbea7[53]],_0x7b26x2d[_0xbea7[55]]));_0x7b26x1f[_0xbea7[64]][_0xbea7[86]]= _0x7b26x1c[_0xbea7[79]];if(_0x7b26x2c[_0xbea7[53]][_0xbea7[69]]){_0x7b26x1f[_0xbea7[64]]= _[_0xbea7[68]](_0x7b26x1f[_0xbea7[64]],{$or:_[_0xbea7[71]](_0x7b26x1f[_0xbea7[57]],function(_0x7b26x30){var _0x7b26x2e={};_0x7b26x2e[_0x7b26x30]= {$like:_0xbea7[70]+ _0x7b26x2c[_0xbea7[53]][_0xbea7[69]]+ _0xbea7[70]};return _0x7b26x2e})})};_0x7b26x1f= _[_0xbea7[68]]({},_0x7b26x1f,_0x7b26x2c[_0xbea7[72]]);return db[_0xbea7[89]][_0xbea7[30]]({where:_0x7b26x1f[_0xbea7[64]]})[_0xbea7[40]](function(_0x7b26x20){_0x7b26x34[_0xbea7[30]]= _0x7b26x20;if(_0x7b26x2c[_0xbea7[53]][_0xbea7[75]]){_0x7b26x1f[_0xbea7[76]]= [{all:true}]};return db[_0xbea7[89]][_0xbea7[77]](_0x7b26x1f)})[_0xbea7[40]](function(_0x7b26x32){_0x7b26x34[_0xbea7[74]]= _0x7b26x32;return _0x7b26x34})}})[_0xbea7[40]](respondWithFilteredResult(_0x7b26x1a,_0x7b26x1f))[_0xbea7[73]](handleError(_0x7b26x1a,null))};exports[_0xbea7[90]]= function(_0x7b26x2c,_0x7b26x1a,_0x7b26x33){var _0x7b26x1f={raw:true,where:{}};var _0x7b26x2d={};var _0x7b26x34={count:0,rows:[]};return db[_0xbea7[50]][_0xbea7[87]]({where:{id:_0x7b26x2c[_0xbea7[80]][_0xbea7[79]]}})[_0xbea7[40]](handleEntityNotFound(_0x7b26x1a,null))[_0xbea7[40]](function(_0x7b26x1c){if(_0x7b26x1c){_0x7b26x2d[_0xbea7[48]]= _[_0xbea7[51]](db[_0xbea7[91]][_0xbea7[49]]);_0x7b26x2d[_0xbea7[53]]= _[_0xbea7[51]](_0x7b26x2c[_0xbea7[53]]);_0x7b26x2d[_0xbea7[55]]= _[_0xbea7[56]](_0x7b26x2d[_0xbea7[48]],_0x7b26x2d[_0xbea7[53]]);_0x7b26x1f[_0xbea7[57]]= _[_0xbea7[56]](_0x7b26x2d[_0xbea7[48]],qs[_0xbea7[58]](_0x7b26x2c[_0xbea7[53]][_0xbea7[58]]));_0x7b26x1f[_0xbea7[57]]= (_0x7b26x1f[_0xbea7[57]][_0xbea7[59]])?_0x7b26x1f[_0xbea7[57]]:_0x7b26x2d[_0xbea7[48]];if(!_0x7b26x2c[_0xbea7[53]][_0xbea7[61]](_0xbea7[60])){_0x7b26x1f[_0xbea7[32]]= qs[_0xbea7[32]](_0x7b26x2c[_0xbea7[53]][_0xbea7[32]]);_0x7b26x1f[_0xbea7[31]]= qs[_0xbea7[31]](_0x7b26x2c[_0xbea7[53]][_0xbea7[31]])};_0x7b26x1f[_0xbea7[62]]= qs[_0xbea7[63]](_0x7b26x2c[_0xbea7[53]][_0xbea7[63]]);_0x7b26x1f[_0xbea7[64]]= qs[_0xbea7[55]](_[_0xbea7[65]](_0x7b26x2c[_0xbea7[53]],_0x7b26x2d[_0xbea7[55]]));_0x7b26x1f[_0xbea7[64]][_0xbea7[86]]= _0x7b26x1c[_0xbea7[79]];if(_0x7b26x2c[_0xbea7[53]][_0xbea7[69]]){_0x7b26x1f[_0xbea7[64]]= _[_0xbea7[68]](_0x7b26x1f[_0xbea7[64]],{$or:_[_0xbea7[71]](_0x7b26x1f[_0xbea7[57]],function(_0x7b26x30){var _0x7b26x2e={};_0x7b26x2e[_0x7b26x30]= {$like:_0xbea7[70]+ _0x7b26x2c[_0xbea7[53]][_0xbea7[69]]+ _0xbea7[70]};return _0x7b26x2e})})};_0x7b26x1f= _[_0xbea7[68]]({},_0x7b26x1f,_0x7b26x2c[_0xbea7[72]]);return db[_0xbea7[91]][_0xbea7[30]]({where:_0x7b26x1f[_0xbea7[64]]})[_0xbea7[40]](function(_0x7b26x20){_0x7b26x34[_0xbea7[30]]= _0x7b26x20;if(_0x7b26x2c[_0xbea7[53]][_0xbea7[75]]){_0x7b26x1f[_0xbea7[76]]= [{all:true}]};return db[_0xbea7[91]][_0xbea7[77]](_0x7b26x1f)})[_0xbea7[40]](function(_0x7b26x32){_0x7b26x34[_0xbea7[74]]= _0x7b26x32;return _0x7b26x34})}})[_0xbea7[40]](respondWithFilteredResult(_0x7b26x1a,_0x7b26x1f))[_0xbea7[73]](handleError(_0x7b26x1a,null))};exports[_0xbea7[92]]= function(_0x7b26x2c,_0x7b26x1a,_0x7b26x33){var _0x7b26x1f={raw:true,where:{}};var _0x7b26x2d={};var _0x7b26x34={count:0,rows:[]};return db[_0xbea7[50]][_0xbea7[87]]({where:{id:_0x7b26x2c[_0xbea7[80]][_0xbea7[79]]}})[_0xbea7[40]](handleEntityNotFound(_0x7b26x1a,null))[_0xbea7[40]](function(_0x7b26x1c){if(_0x7b26x1c){_0x7b26x2d[_0xbea7[48]]= _[_0xbea7[51]](db[_0xbea7[93]][_0xbea7[49]]);_0x7b26x2d[_0xbea7[53]]= _[_0xbea7[51]](_0x7b26x2c[_0xbea7[53]]);_0x7b26x2d[_0xbea7[55]]= _[_0xbea7[56]](_0x7b26x2d[_0xbea7[48]],_0x7b26x2d[_0xbea7[53]]);_0x7b26x1f[_0xbea7[57]]= _[_0xbea7[56]](_0x7b26x2d[_0xbea7[48]],qs[_0xbea7[58]](_0x7b26x2c[_0xbea7[53]][_0xbea7[58]]));_0x7b26x1f[_0xbea7[57]]= (_0x7b26x1f[_0xbea7[57]][_0xbea7[59]])?_0x7b26x1f[_0xbea7[57]]:_0x7b26x2d[_0xbea7[48]];if(!_0x7b26x2c[_0xbea7[53]][_0xbea7[61]](_0xbea7[60])){_0x7b26x1f[_0xbea7[32]]= qs[_0xbea7[32]](_0x7b26x2c[_0xbea7[53]][_0xbea7[32]]);_0x7b26x1f[_0xbea7[31]]= qs[_0xbea7[31]](_0x7b26x2c[_0xbea7[53]][_0xbea7[31]])};_0x7b26x1f[_0xbea7[62]]= qs[_0xbea7[63]](_0x7b26x2c[_0xbea7[53]][_0xbea7[63]]);_0x7b26x1f[_0xbea7[64]]= qs[_0xbea7[55]](_[_0xbea7[65]](_0x7b26x2c[_0xbea7[53]],_0x7b26x2d[_0xbea7[55]]));_0x7b26x1f[_0xbea7[64]][_0xbea7[86]]= _0x7b26x1c[_0xbea7[79]];if(_0x7b26x2c[_0xbea7[53]][_0xbea7[69]]){_0x7b26x1f[_0xbea7[64]]= _[_0xbea7[68]](_0x7b26x1f[_0xbea7[64]],{$or:_[_0xbea7[71]](_0x7b26x1f[_0xbea7[57]],function(_0x7b26x30){var _0x7b26x2e={};_0x7b26x2e[_0x7b26x30]= {$like:_0xbea7[70]+ _0x7b26x2c[_0xbea7[53]][_0xbea7[69]]+ _0xbea7[70]};return _0x7b26x2e})})};_0x7b26x1f= _[_0xbea7[68]]({},_0x7b26x1f,_0x7b26x2c[_0xbea7[72]]);return db[_0xbea7[93]][_0xbea7[30]]({where:_0x7b26x1f[_0xbea7[64]]})[_0xbea7[40]](function(_0x7b26x20){_0x7b26x34[_0xbea7[30]]= _0x7b26x20;if(_0x7b26x2c[_0xbea7[53]][_0xbea7[75]]){_0x7b26x1f[_0xbea7[76]]= [{all:true}]};return db[_0xbea7[93]][_0xbea7[77]](_0x7b26x1f)})[_0xbea7[40]](function(_0x7b26x32){_0x7b26x34[_0xbea7[74]]= _0x7b26x32;return _0x7b26x34})}})[_0xbea7[40]](respondWithFilteredResult(_0x7b26x1a,_0x7b26x1f))[_0xbea7[73]](handleError(_0x7b26x1a,null))};exports[_0xbea7[94]]= function(_0x7b26x2c,_0x7b26x1c,_0x7b26x33){var _0x7b26x1f={};var _0x7b26x2d={};var _0x7b26x35;var _0x7b26x20;return db[_0xbea7[50]][_0xbea7[87]]({where:{id:_0x7b26x2c[_0xbea7[80]][_0xbea7[79]]}})[_0xbea7[40]](handleEntityNotFound(_0x7b26x1c,null))[_0xbea7[40]](function(_0x7b26x1c){if(_0x7b26x1c){_0x7b26x35= _0x7b26x1c;_0x7b26x2d[_0xbea7[48]]= _[_0xbea7[51]](db[_0xbea7[95]][_0xbea7[49]]);_0x7b26x2d[_0xbea7[53]]= _[_0xbea7[51]](_0x7b26x2c[_0xbea7[53]]);_0x7b26x2d[_0xbea7[55]]= _[_0xbea7[56]](_0x7b26x2d[_0xbea7[48]],_0x7b26x2d[_0xbea7[53]]);_0x7b26x1f[_0xbea7[57]]= _[_0xbea7[56]](_0x7b26x2d[_0xbea7[48]],qs[_0xbea7[58]](_0x7b26x2c[_0xbea7[53]][_0xbea7[58]]));_0x7b26x1f[_0xbea7[57]]= (_0x7b26x1f[_0xbea7[57]][_0xbea7[59]])?_0x7b26x1f[_0xbea7[57]]:_0x7b26x2d[_0xbea7[48]];_0x7b26x1f[_0xbea7[62]]= qs[_0xbea7[63]](_0x7b26x2c[_0xbea7[53]][_0xbea7[63]]);_0x7b26x1f[_0xbea7[64]]= qs[_0xbea7[55]](_[_0xbea7[65]](_0x7b26x2c[_0xbea7[53]],_0x7b26x2d[_0xbea7[55]]));if(_0x7b26x2c[_0xbea7[53]][_0xbea7[69]]){_0x7b26x1f[_0xbea7[64]]= _[_0xbea7[68]](_0x7b26x1f[_0xbea7[64]],{$or:_[_0xbea7[71]](_0x7b26x1f[_0xbea7[57]],function(_0x7b26x30){var _0x7b26x2e={};_0x7b26x2e[_0x7b26x30]= {$like:_0xbea7[70]+ _0x7b26x2c[_0xbea7[53]][_0xbea7[69]]+ _0xbea7[70]};return _0x7b26x2e})})};_0x7b26x1f= _[_0xbea7[68]]({},_0x7b26x1f,_0x7b26x2c[_0xbea7[72]]);return _0x7b26x35[_0xbea7[94]](_0x7b26x1f)}})[_0xbea7[40]](function(_0x7b26x36){if(_0x7b26x36){_0x7b26x20= _0x7b26x36[_0xbea7[59]];if(!_0x7b26x2c[_0xbea7[53]][_0xbea7[61]](_0xbea7[60])){_0x7b26x1f[_0xbea7[32]]= qs[_0xbea7[32]](_0x7b26x2c[_0xbea7[53]][_0xbea7[32]]);_0x7b26x1f[_0xbea7[31]]= qs[_0xbea7[31]](_0x7b26x2c[_0xbea7[53]][_0xbea7[31]])};return _0x7b26x35[_0xbea7[94]](_0x7b26x1f)}})[_0xbea7[40]](function(_0x7b26x32){if(_0x7b26x32){return _0x7b26x32?{count:_0x7b26x20,rows:_0x7b26x32}:null}})[_0xbea7[40]](respondWithResult(_0x7b26x1c,null))[_0xbea7[73]](handleError(_0x7b26x1c,null))};exports[_0xbea7[96]]= function(_0x7b26x2c,_0x7b26x1a,_0x7b26x33){var _0x7b26x37,_0x7b26x38;return db[_0xbea7[50]][_0xbea7[81]]({where:{id:_0x7b26x2c[_0xbea7[80]][_0xbea7[79]]}})[_0xbea7[40]](handleEntityNotFound(_0x7b26x1a,null))[_0xbea7[40]](function(_0x7b26x1c){if(_0x7b26x1c){_0x7b26x38= _0x7b26x1c;return _0x7b26x1c[_0xbea7[96]](_0x7b26x2c[_0xbea7[83]][_0xbea7[128]],_[_0xbea7[129]](_0x7b26x2c[_0xbea7[83]],[_0xbea7[128],_0xbea7[79]])|| {})};return null})[_0xbea7[127]](function(_0x7b26x39){var _0x7b26x3a;_0x7b26x37= _0x7b26x39|| [];var _0x7b26x3b=[];if(_0x7b26x39){for(var _0x7b26x3c=0;_0x7b26x3c< _0x7b26x39[_0xbea7[59]];_0x7b26x3c+= 1){var _0x7b26x3d=_0x7b26x39[_0x7b26x3c][_0xbea7[97]]({plain:true});_0x7b26x38[_0xbea7[98]]= _0x7b26x2c[_0xbea7[83]][_0xbea7[98]]?_0x7b26x2c[_0xbea7[83]][_0xbea7[98]]:_0x7b26x38[_0xbea7[98]];switch(_0x7b26x38[_0xbea7[98]]){case _0xbea7[122]:_0x7b26x3a= squel[_0xbea7[121]]()[_0xbea7[120]](_0xbea7[107])[_0xbea7[119]]([_0xbea7[99],_0xbea7[100],_0xbea7[101],_0xbea7[102],_0xbea7[86],_0xbea7[103],_0xbea7[104]],squel[_0xbea7[110]]()[_0xbea7[109]](_0xbea7[99],_0xbea7[99])[_0xbea7[109]](_0xbea7[118],_0xbea7[100])[_0xbea7[109]](_0xbea7[79],_0xbea7[101])[_0xbea7[109]](_0x7b26x3d[_0xbea7[115]].toString(),_0xbea7[102])[_0xbea7[109]](_0x7b26x2c[_0xbea7[80]][_0xbea7[79]].toString(),_0xbea7[86])[_0xbea7[109]](_0xbea7[118],_0xbea7[103])[_0xbea7[109]](_0xbea7[118],_0xbea7[104])[_0xbea7[108]](_0xbea7[117])[_0xbea7[64]](_0xbea7[116])[_0xbea7[64]](_0xbea7[114],_0x7b26x3d[_0xbea7[115]].toString())[_0xbea7[64]](_0xbea7[113])[_0xbea7[64]](_0xbea7[105],squel[_0xbea7[110]]()[_0xbea7[109]](_0xbea7[112])[_0xbea7[108]](_0xbea7[111])[_0xbea7[64]](_0xbea7[106],_0x7b26x2c[_0xbea7[80]][_0xbea7[79]].toString()))[_0xbea7[64]](_0xbea7[105],squel[_0xbea7[110]]()[_0xbea7[109]](_0xbea7[99])[_0xbea7[108]](_0xbea7[107])[_0xbea7[64]](_0xbea7[106],_0x7b26x2c[_0xbea7[80]][_0xbea7[79]].toString()))).toString();break;case _0xbea7[123]:_0x7b26x3a= squel[_0xbea7[121]]()[_0xbea7[120]](_0xbea7[107])[_0xbea7[119]]([_0xbea7[99],_0xbea7[100],_0xbea7[101],_0xbea7[102],_0xbea7[86],_0xbea7[103],_0xbea7[104]],squel[_0xbea7[110]]()[_0xbea7[109]](_0xbea7[99],_0xbea7[99])[_0xbea7[109]](_0xbea7[118],_0xbea7[100])[_0xbea7[109]](_0xbea7[79],_0xbea7[101])[_0xbea7[109]](_0x7b26x3d[_0xbea7[115]].toString(),_0xbea7[102])[_0xbea7[109]](_0x7b26x2c[_0xbea7[80]][_0xbea7[79]].toString(),_0xbea7[86])[_0xbea7[109]](_0xbea7[118],_0xbea7[103])[_0xbea7[109]](_0xbea7[118],_0xbea7[104])[_0xbea7[108]](_0xbea7[117])[_0xbea7[64]](_0xbea7[116])[_0xbea7[64]](_0xbea7[114],_0x7b26x3d[_0xbea7[115]].toString())[_0xbea7[64]](_0xbea7[113])[_0xbea7[64]](_0xbea7[105],squel[_0xbea7[110]]()[_0xbea7[109]](_0xbea7[99])[_0xbea7[108]](_0xbea7[107])[_0xbea7[64]](_0xbea7[106],_0x7b26x2c[_0xbea7[80]][_0xbea7[79]].toString()))).toString();break;default:_0x7b26x3a= squel[_0xbea7[121]]()[_0xbea7[120]](_0xbea7[107])[_0xbea7[119]]([_0xbea7[99],_0xbea7[100],_0xbea7[101],_0xbea7[102],_0xbea7[86],_0xbea7[103],_0xbea7[104]],squel[_0xbea7[110]]()[_0xbea7[109]](_0xbea7[99],_0xbea7[99])[_0xbea7[109]](_0xbea7[118],_0xbea7[100])[_0xbea7[109]](_0xbea7[79],_0xbea7[101])[_0xbea7[109]](_0x7b26x3d[_0xbea7[115]].toString(),_0xbea7[102])[_0xbea7[109]](_0x7b26x2c[_0xbea7[80]][_0xbea7[79]].toString(),_0xbea7[86])[_0xbea7[109]](_0xbea7[118],_0xbea7[103])[_0xbea7[109]](_0xbea7[118],_0xbea7[104])[_0xbea7[108]](_0xbea7[117])[_0xbea7[64]](_0xbea7[116])[_0xbea7[64]](_0xbea7[114],_0x7b26x3d[_0xbea7[115]].toString())[_0xbea7[64]](_0xbea7[113])).toString()};_0x7b26x3b[_0xbea7[125]](db[_0xbea7[124]][_0xbea7[53]](_0x7b26x3a))};return BPromise[_0xbea7[126]](_0x7b26x3b)}})[_0xbea7[40]](function(){return _0x7b26x37})[_0xbea7[40]](respondWithResult(_0x7b26x1a,null))[_0xbea7[73]](handleError(_0x7b26x1a,null))};exports[_0xbea7[130]]= function(_0x7b26x2c,_0x7b26x1a,_0x7b26x33){var _0x7b26x36;return db[_0xbea7[50]][_0xbea7[81]]({where:{id:_0x7b26x2c[_0xbea7[80]][_0xbea7[79]]}})[_0xbea7[40]](handleEntityNotFound(_0x7b26x1a,null))[_0xbea7[40]](function(_0x7b26x1c){if(_0x7b26x1c){return _0x7b26x1c[_0xbea7[130]](_0x7b26x2c[_0xbea7[53]][_0xbea7[128]])}})[_0xbea7[40]](function(_0x7b26x39){if(_0x7b26x39){_0x7b26x36= _0x7b26x39;return db[_0xbea7[85]][_0xbea7[42]]({where:{ListId:_0x7b26x2c[_0xbea7[53]][_0xbea7[128]],CampaignId:_0x7b26x2c[_0xbea7[80]][_0xbea7[79]]}})[_0xbea7[40]](function(){return _0x7b26x36})}})[_0xbea7[40]](respondWithStatusCode(_0x7b26x1a,null))[_0xbea7[73]](handleError(_0x7b26x1a,null))};exports[_0xbea7[131]]= function(_0x7b26x2c,_0x7b26x1c,_0x7b26x33){var _0x7b26x1f={};var _0x7b26x2d={};var _0x7b26x35;var _0x7b26x20;return db[_0xbea7[50]][_0xbea7[87]]({where:{id:_0x7b26x2c[_0xbea7[80]][_0xbea7[79]]}})[_0xbea7[40]](handleEntityNotFound(_0x7b26x1c,null))[_0xbea7[40]](function(_0x7b26x1c){if(_0x7b26x1c){_0x7b26x35= _0x7b26x1c;_0x7b26x2d[_0xbea7[48]]= _[_0xbea7[51]](db[_0xbea7[95]][_0xbea7[49]]);_0x7b26x2d[_0xbea7[53]]= _[_0xbea7[51]](_0x7b26x2c[_0xbea7[53]]);_0x7b26x2d[_0xbea7[55]]= _[_0xbea7[56]](_0x7b26x2d[_0xbea7[48]],_0x7b26x2d[_0xbea7[53]]);_0x7b26x1f[_0xbea7[57]]= _[_0xbea7[56]](_0x7b26x2d[_0xbea7[48]],qs[_0xbea7[58]](_0x7b26x2c[_0xbea7[53]][_0xbea7[58]]));_0x7b26x1f[_0xbea7[57]]= (_0x7b26x1f[_0xbea7[57]][_0xbea7[59]])?_0x7b26x1f[_0xbea7[57]]:_0x7b26x2d[_0xbea7[48]];_0x7b26x1f[_0xbea7[62]]= qs[_0xbea7[63]](_0x7b26x2c[_0xbea7[53]][_0xbea7[63]]);_0x7b26x1f[_0xbea7[64]]= qs[_0xbea7[55]](_[_0xbea7[65]](_0x7b26x2c[_0xbea7[53]],_0x7b26x2d[_0xbea7[55]]));if(_0x7b26x2c[_0xbea7[53]][_0xbea7[69]]){_0x7b26x1f[_0xbea7[64]]= _[_0xbea7[68]](_0x7b26x1f[_0xbea7[64]],{$or:_[_0xbea7[71]](_0x7b26x1f[_0xbea7[57]],function(_0x7b26x30){var _0x7b26x2e={};_0x7b26x2e[_0x7b26x30]= {$like:_0xbea7[70]+ _0x7b26x2c[_0xbea7[53]][_0xbea7[69]]+ _0xbea7[70]};return _0x7b26x2e})})};_0x7b26x1f= _[_0xbea7[68]]({},_0x7b26x1f,_0x7b26x2c[_0xbea7[72]]);return _0x7b26x35[_0xbea7[131]](_0x7b26x1f)}})[_0xbea7[40]](function(_0x7b26x36){if(_0x7b26x36){_0x7b26x20= _0x7b26x36[_0xbea7[59]];if(!_0x7b26x2c[_0xbea7[53]][_0xbea7[61]](_0xbea7[60])){_0x7b26x1f[_0xbea7[32]]= qs[_0xbea7[32]](_0x7b26x2c[_0xbea7[53]][_0xbea7[32]]);_0x7b26x1f[_0xbea7[31]]= qs[_0xbea7[31]](_0x7b26x2c[_0xbea7[53]][_0xbea7[31]])};return _0x7b26x35[_0xbea7[131]](_0x7b26x1f)}})[_0xbea7[40]](function(_0x7b26x32){if(_0x7b26x32){return _0x7b26x32?{count:_0x7b26x20,rows:_0x7b26x32}:null}})[_0xbea7[40]](respondWithResult(_0x7b26x1c,null))[_0xbea7[73]](handleError(_0x7b26x1c,null))};exports[_0xbea7[132]]= function(_0x7b26x2c,_0x7b26x1a,_0x7b26x33){var _0x7b26x37,_0x7b26x38;return db[_0xbea7[50]][_0xbea7[81]]({where:{id:_0x7b26x2c[_0xbea7[80]][_0xbea7[79]]}})[_0xbea7[40]](handleEntityNotFound(_0x7b26x1a,null))[_0xbea7[40]](function(_0x7b26x1c){if(_0x7b26x1c){_0x7b26x38= _0x7b26x1c;return _0x7b26x1c[_0xbea7[132]](_0x7b26x2c[_0xbea7[83]][_0xbea7[128]],_[_0xbea7[129]](_0x7b26x2c[_0xbea7[83]],[_0xbea7[128],_0xbea7[79]])|| {})};return null})[_0xbea7[127]](function(_0x7b26x39){var _0x7b26x3a;_0x7b26x37= _0x7b26x39|| [];var _0x7b26x3b=[];if(_0x7b26x39){for(var _0x7b26x3c=0;_0x7b26x3c< _0x7b26x39[_0xbea7[59]];_0x7b26x3c+= 1){var _0x7b26x3d=_0x7b26x39[_0x7b26x3c][_0xbea7[97]]({plain:true});_0x7b26x3a= squel[_0xbea7[121]]()[_0xbea7[120]](_0xbea7[133])[_0xbea7[119]]([_0xbea7[99],_0xbea7[101],_0xbea7[102],_0xbea7[86],_0xbea7[103],_0xbea7[104]],squel[_0xbea7[110]]()[_0xbea7[109]](_0xbea7[99],_0xbea7[99])[_0xbea7[109]](_0xbea7[79],_0xbea7[101])[_0xbea7[109]](_0x7b26x3d[_0xbea7[115]].toString(),_0xbea7[102])[_0xbea7[109]](_0x7b26x2c[_0xbea7[80]][_0xbea7[79]].toString(),_0xbea7[86])[_0xbea7[109]](_0xbea7[118],_0xbea7[103])[_0xbea7[109]](_0xbea7[118],_0xbea7[104])[_0xbea7[108]](_0xbea7[117])[_0xbea7[64]](_0xbea7[116])[_0xbea7[64]](_0xbea7[114],_0x7b26x3d[_0xbea7[115]].toString())[_0xbea7[64]](_0xbea7[113])).toString();_0x7b26x3b[_0xbea7[125]](db[_0xbea7[124]][_0xbea7[53]](_0x7b26x3a))};return BPromise[_0xbea7[126]](_0x7b26x3b)}})[_0xbea7[40]](function(){return _0x7b26x37})[_0xbea7[40]](respondWithResult(_0x7b26x1a,null))[_0xbea7[73]](handleError(_0x7b26x1a,null))};exports[_0xbea7[134]]= function(_0x7b26x2c,_0x7b26x1a,_0x7b26x33){var _0x7b26x36;return db[_0xbea7[50]][_0xbea7[81]]({where:{id:_0x7b26x2c[_0xbea7[80]][_0xbea7[79]]}})[_0xbea7[40]](handleEntityNotFound(_0x7b26x1a,null))[_0xbea7[40]](function(_0x7b26x1c){if(_0x7b26x1c){return _0x7b26x1c[_0xbea7[134]](_0x7b26x2c[_0xbea7[53]][_0xbea7[128]])}})[_0xbea7[40]](function(_0x7b26x39){if(_0x7b26x39){_0x7b26x36= _0x7b26x39;return db[_0xbea7[93]][_0xbea7[42]]({where:{ListId:_0x7b26x2c[_0xbea7[53]][_0xbea7[128]],CampaignId:_0x7b26x2c[_0xbea7[80]][_0xbea7[79]]}})[_0xbea7[40]](function(){return _0x7b26x36})}})[_0xbea7[40]](respondWithStatusCode(_0x7b26x1a,null))[_0xbea7[73]](handleError(_0x7b26x1a,null))}
\ No newline at end of file
index 2f71555..3a48d22 100644 (file)
@@ -1 +1 @@
-var _0xedb3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x61\x6D\x70\x61\x69\x67\x6E","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xedb3[0];var _=require(_0xedb3[1]);var util=require(_0xedb3[2]);var logger=require(_0xedb3[4])(_0xedb3[3]);var moment=require(_0xedb3[5]);var BPromise=require(_0xedb3[6]);var rp=require(_0xedb3[7]);var attributes=require(_0xedb3[8]);module[_0xedb3[9]]= function(_0xeedex8,_0xeedex9){return _0xeedex8[_0xedb3[12]](_0xedb3[10],attributes,{tableName:_0xedb3[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x21a6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x61\x6D\x70\x61\x69\x67\x6E","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x21a6[0];var _=require(_0x21a6[1]);var util=require(_0x21a6[2]);var logger=require(_0x21a6[4])(_0x21a6[3]);var moment=require(_0x21a6[5]);var BPromise=require(_0x21a6[6]);var rp=require(_0x21a6[7]);var attributes=require(_0x21a6[8]);module[_0x21a6[9]]= function(_0x958cx8,_0x958cx9){return _0x958cx8[_0x21a6[12]](_0x21a6[10],attributes,{tableName:_0x21a6[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index f7f0470..0c712d1 100644 (file)
@@ -1 +1 @@
-var _0x8583=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x61\x6D\x70\x61\x69\x67\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x61\x6D\x70\x61\x69\x67\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x43\x61\x6D\x70\x61\x69\x67\x6E","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x43\x61\x6D\x70\x61\x69\x67\x6E"];_0x8583[0];var _=require(_0x8583[1]);var util=require(_0x8583[2]);var moment=require(_0x8583[3]);var BPromise=require(_0x8583[4]);var rs=require(_0x8583[5]);var fs=require(_0x8583[6]);var db=require(_0x8583[8])[_0x8583[7]];var utils=require(_0x8583[9]);var logger=require(_0x8583[11])(_0x8583[10]);var config=require(_0x8583[12]);var jayson=require(_0x8583[13]);var client=jayson[_0x8583[15]][_0x8583[14]]({port:9002});function respondWithRpcPromise(_0xf016xe,_0xf016xf,_0xf016x10){return  new BPromise(function(_0xf016x11,_0xf016x12){return client[_0x8583[28]](_0xf016xe,_0xf016x10)[_0x8583[27]](function(_0xf016x14){logger[_0x8583[20]](_0x8583[16],_0xf016xf,_0x8583[19]);logger[_0x8583[23]](_0x8583[21],_0xf016xf,_0x8583[19],JSON[_0x8583[22]](_0xf016x14));if(_0xf016x14[_0x8583[17]]){if(_0xf016x14[_0x8583[17]][_0x8583[24]]=== 500){logger[_0x8583[17]](_0x8583[16],_0xf016xf,_0xf016x14[_0x8583[17]][_0x8583[25]]);return _0xf016x12(_0xf016x14[_0x8583[17]][_0x8583[25]])};logger[_0x8583[17]](_0x8583[16],_0xf016xf,_0xf016x14[_0x8583[17]][_0x8583[25]]);return _0xf016x11(_0xf016x14[_0x8583[17]][_0x8583[25]])}else {logger[_0x8583[20]](_0x8583[16],_0xf016xf,_0x8583[19]);_0xf016x11(_0xf016x14[_0x8583[26]][_0x8583[25]])}})[_0x8583[18]](function(_0xf016x13){logger[_0x8583[17]](_0x8583[16],_0xf016xf,_0xf016x13);_0xf016x12(_0xf016x13)})})}exports[_0x8583[29]]= function(_0xf016x10){var _0xf016x15=this;return  new Promise(function(_0xf016x11,_0xf016x12){return db[_0x8583[40]][_0x8583[39]]({raw:_0xf016x10[_0x8583[30]]?(_0xf016x10[_0x8583[30]][_0x8583[31]]=== undefined)?true:false:true,where:_0xf016x10[_0x8583[30]]?_0xf016x10[_0x8583[30]][_0x8583[32]]|| null:null,attributes:_0xf016x10[_0x8583[30]]?_0xf016x10[_0x8583[30]][_0x8583[33]]|| null:null,limit:_0xf016x10[_0x8583[30]]?_0xf016x10[_0x8583[30]][_0x8583[34]]|| null:null,include:_0xf016x10[_0x8583[30]]?(_0xf016x10[_0x8583[30]][_0x8583[35]]?_[_0x8583[38]](_0xf016x10[_0x8583[30]][_0x8583[35]],function(_0xf016x16){return {model:db[_0xf016x16[_0x8583[36]]],as:_0xf016x16[_0x8583[37]],attributes:_0xf016x16[_0x8583[33]],include:_0xf016x16[_0x8583[35]]?_[_0x8583[38]](_0xf016x16[_0x8583[35]],function(_0xf016x17){return {model:db[_0xf016x17[_0x8583[36]]],as:_0xf016x17[_0x8583[37]],attributes:_0xf016x17[_0x8583[33]],include:_0xf016x17[_0x8583[35]]?_[_0x8583[38]](_0xf016x17[_0x8583[35]],function(_0xf016x18){return {model:db[_0xf016x18[_0x8583[36]]],as:_0xf016x18[_0x8583[37]],attributes:_0xf016x18[_0x8583[33]]}}):[]}}):[]}}):[]):[]})[_0x8583[27]](function(_0xf016x14){logger[_0x8583[20]](_0x8583[29],_0xf016x10);logger[_0x8583[23]](_0x8583[29],_0xf016x10,JSON[_0x8583[22]](_0xf016x14));_0xf016x11(_0xf016x14)})[_0x8583[18]](function(_0xf016x13){logger[_0x8583[17]](_0x8583[29],_0xf016x13[_0x8583[25]],_0xf016x10);_0xf016x12(_0xf016x15[_0x8583[17]](500,_0xf016x13[_0x8583[25]]))})})}
\ No newline at end of file
+var _0x8553=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x61\x6D\x70\x61\x69\x67\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x61\x6D\x70\x61\x69\x67\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x43\x61\x6D\x70\x61\x69\x67\x6E","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x43\x61\x6D\x70\x61\x69\x67\x6E"];_0x8553[0];var _=require(_0x8553[1]);var util=require(_0x8553[2]);var moment=require(_0x8553[3]);var BPromise=require(_0x8553[4]);var rs=require(_0x8553[5]);var fs=require(_0x8553[6]);var db=require(_0x8553[8])[_0x8553[7]];var utils=require(_0x8553[9]);var logger=require(_0x8553[11])(_0x8553[10]);var config=require(_0x8553[12]);var jayson=require(_0x8553[13]);var client=jayson[_0x8553[15]][_0x8553[14]]({port:9002});function respondWithRpcPromise(_0x102cxe,_0x102cxf,_0x102cx10){return  new BPromise(function(_0x102cx11,_0x102cx12){return client[_0x8553[28]](_0x102cxe,_0x102cx10)[_0x8553[27]](function(_0x102cx14){logger[_0x8553[20]](_0x8553[16],_0x102cxf,_0x8553[19]);logger[_0x8553[23]](_0x8553[21],_0x102cxf,_0x8553[19],JSON[_0x8553[22]](_0x102cx14));if(_0x102cx14[_0x8553[17]]){if(_0x102cx14[_0x8553[17]][_0x8553[24]]=== 500){logger[_0x8553[17]](_0x8553[16],_0x102cxf,_0x102cx14[_0x8553[17]][_0x8553[25]]);return _0x102cx12(_0x102cx14[_0x8553[17]][_0x8553[25]])};logger[_0x8553[17]](_0x8553[16],_0x102cxf,_0x102cx14[_0x8553[17]][_0x8553[25]]);return _0x102cx11(_0x102cx14[_0x8553[17]][_0x8553[25]])}else {logger[_0x8553[20]](_0x8553[16],_0x102cxf,_0x8553[19]);_0x102cx11(_0x102cx14[_0x8553[26]][_0x8553[25]])}})[_0x8553[18]](function(_0x102cx13){logger[_0x8553[17]](_0x8553[16],_0x102cxf,_0x102cx13);_0x102cx12(_0x102cx13)})})}exports[_0x8553[29]]= function(_0x102cx10){var _0x102cx15=this;return  new Promise(function(_0x102cx11,_0x102cx12){return db[_0x8553[40]][_0x8553[39]]({raw:_0x102cx10[_0x8553[30]]?(_0x102cx10[_0x8553[30]][_0x8553[31]]=== undefined)?true:false:true,where:_0x102cx10[_0x8553[30]]?_0x102cx10[_0x8553[30]][_0x8553[32]]|| null:null,attributes:_0x102cx10[_0x8553[30]]?_0x102cx10[_0x8553[30]][_0x8553[33]]|| null:null,limit:_0x102cx10[_0x8553[30]]?_0x102cx10[_0x8553[30]][_0x8553[34]]|| null:null,include:_0x102cx10[_0x8553[30]]?(_0x102cx10[_0x8553[30]][_0x8553[35]]?_[_0x8553[38]](_0x102cx10[_0x8553[30]][_0x8553[35]],function(_0x102cx16){return {model:db[_0x102cx16[_0x8553[36]]],as:_0x102cx16[_0x8553[37]],attributes:_0x102cx16[_0x8553[33]],include:_0x102cx16[_0x8553[35]]?_[_0x8553[38]](_0x102cx16[_0x8553[35]],function(_0x102cx17){return {model:db[_0x102cx17[_0x8553[36]]],as:_0x102cx17[_0x8553[37]],attributes:_0x102cx17[_0x8553[33]],include:_0x102cx17[_0x8553[35]]?_[_0x8553[38]](_0x102cx17[_0x8553[35]],function(_0x102cx18){return {model:db[_0x102cx18[_0x8553[36]]],as:_0x102cx18[_0x8553[37]],attributes:_0x102cx18[_0x8553[33]]}}):[]}}):[]}}):[]):[]})[_0x8553[27]](function(_0x102cx14){logger[_0x8553[20]](_0x8553[29],_0x102cx10);logger[_0x8553[23]](_0x8553[29],_0x102cx10,JSON[_0x8553[22]](_0x102cx14));_0x102cx11(_0x102cx14)})[_0x8553[18]](function(_0x102cx13){logger[_0x8553[17]](_0x8553[29],_0x102cx13[_0x8553[25]],_0x102cx10);_0x102cx12(_0x102cx15[_0x8553[17]](500,_0x102cx13[_0x8553[25]]))})})}
\ No newline at end of file
index d51fdec..7b4b23e 100644 (file)
@@ -1 +1 @@
-var _0x90ba=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x73","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x5F\x68\x69\x73\x74\x6F\x72\x69\x65\x73","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x69\x65\x73","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x5F\x66\x69\x6E\x61\x6C\x73","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x73","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x5F\x62\x6C\x61\x63\x6B","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x73","\x2F\x3A\x69\x64\x2F\x6C\x69\x73\x74\x73","\x67\x65\x74\x4C\x69\x73\x74\x73","\x2F\x3A\x69\x64\x2F\x62\x6C\x61\x63\x6B\x6C\x69\x73\x74\x73","\x67\x65\x74\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x4C\x69\x73\x74\x73","\x61\x64\x64\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x73","\x72\x65\x6D\x6F\x76\x65\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x90ba[0];var multer=require(_0x90ba[1]);var util=require(_0x90ba[2]);var path=require(_0x90ba[3]);var express=require(_0x90ba[4]);var router=express.Router();var auth=require(_0x90ba[5]);var interaction=require(_0x90ba[6]);var config=require(_0x90ba[7]);var controller=require(_0x90ba[8]);router[_0x90ba[12]](_0x90ba[9],auth[_0x90ba[10]](),controller[_0x90ba[11]]);router[_0x90ba[12]](_0x90ba[13],auth[_0x90ba[10]](),controller[_0x90ba[14]]);router[_0x90ba[12]](_0x90ba[15],auth[_0x90ba[10]](),controller[_0x90ba[16]]);router[_0x90ba[12]](_0x90ba[17],auth[_0x90ba[10]](),controller[_0x90ba[18]]);router[_0x90ba[12]](_0x90ba[19],auth[_0x90ba[10]](),controller[_0x90ba[20]]);router[_0x90ba[12]](_0x90ba[21],auth[_0x90ba[10]](),controller[_0x90ba[22]]);router[_0x90ba[12]](_0x90ba[23],auth[_0x90ba[10]](),controller[_0x90ba[24]]);router[_0x90ba[12]](_0x90ba[25],auth[_0x90ba[10]](),controller[_0x90ba[26]]);router[_0x90ba[28]](_0x90ba[9],auth[_0x90ba[10]](),controller[_0x90ba[27]]);router[_0x90ba[28]](_0x90ba[23],auth[_0x90ba[10]](),controller[_0x90ba[29]]);router[_0x90ba[28]](_0x90ba[25],auth[_0x90ba[10]](),controller[_0x90ba[30]]);router[_0x90ba[32]](_0x90ba[13],auth[_0x90ba[10]](),controller[_0x90ba[31]]);router[_0x90ba[34]](_0x90ba[13],auth[_0x90ba[10]](),controller[_0x90ba[33]]);router[_0x90ba[34]](_0x90ba[23],auth[_0x90ba[10]](),controller[_0x90ba[35]]);router[_0x90ba[34]](_0x90ba[25],auth[_0x90ba[10]](),controller[_0x90ba[36]]);module[_0x90ba[37]]= router
\ No newline at end of file
+var _0xb9cb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x73","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x5F\x68\x69\x73\x74\x6F\x72\x69\x65\x73","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x69\x65\x73","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x5F\x66\x69\x6E\x61\x6C\x73","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x73","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x5F\x62\x6C\x61\x63\x6B","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x73","\x2F\x3A\x69\x64\x2F\x6C\x69\x73\x74\x73","\x67\x65\x74\x4C\x69\x73\x74\x73","\x2F\x3A\x69\x64\x2F\x62\x6C\x61\x63\x6B\x6C\x69\x73\x74\x73","\x67\x65\x74\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x4C\x69\x73\x74\x73","\x61\x64\x64\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x73","\x72\x65\x6D\x6F\x76\x65\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xb9cb[0];var multer=require(_0xb9cb[1]);var util=require(_0xb9cb[2]);var path=require(_0xb9cb[3]);var express=require(_0xb9cb[4]);var router=express.Router();var auth=require(_0xb9cb[5]);var interaction=require(_0xb9cb[6]);var config=require(_0xb9cb[7]);var controller=require(_0xb9cb[8]);router[_0xb9cb[12]](_0xb9cb[9],auth[_0xb9cb[10]](),controller[_0xb9cb[11]]);router[_0xb9cb[12]](_0xb9cb[13],auth[_0xb9cb[10]](),controller[_0xb9cb[14]]);router[_0xb9cb[12]](_0xb9cb[15],auth[_0xb9cb[10]](),controller[_0xb9cb[16]]);router[_0xb9cb[12]](_0xb9cb[17],auth[_0xb9cb[10]](),controller[_0xb9cb[18]]);router[_0xb9cb[12]](_0xb9cb[19],auth[_0xb9cb[10]](),controller[_0xb9cb[20]]);router[_0xb9cb[12]](_0xb9cb[21],auth[_0xb9cb[10]](),controller[_0xb9cb[22]]);router[_0xb9cb[12]](_0xb9cb[23],auth[_0xb9cb[10]](),controller[_0xb9cb[24]]);router[_0xb9cb[12]](_0xb9cb[25],auth[_0xb9cb[10]](),controller[_0xb9cb[26]]);router[_0xb9cb[28]](_0xb9cb[9],auth[_0xb9cb[10]](),controller[_0xb9cb[27]]);router[_0xb9cb[28]](_0xb9cb[23],auth[_0xb9cb[10]](),controller[_0xb9cb[29]]);router[_0xb9cb[28]](_0xb9cb[25],auth[_0xb9cb[10]](),controller[_0xb9cb[30]]);router[_0xb9cb[32]](_0xb9cb[13],auth[_0xb9cb[10]](),controller[_0xb9cb[31]]);router[_0xb9cb[34]](_0xb9cb[13],auth[_0xb9cb[10]](),controller[_0xb9cb[33]]);router[_0xb9cb[34]](_0xb9cb[23],auth[_0xb9cb[10]](),controller[_0xb9cb[35]]);router[_0xb9cb[34]](_0xb9cb[25],auth[_0xb9cb[10]](),controller[_0xb9cb[36]]);module[_0xb9cb[37]]= router
\ No newline at end of file
index d461b9c..05dd007 100644 (file)
@@ -1 +1 @@
-var _0x49fd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54"];_0x49fd[0];var Sequelize=require(_0x49fd[1]);module[_0x49fd[2]]= {key:{type:Sequelize[_0x49fd[3]],allowNull:false},value:{type:Sequelize[_0x49fd[4]],allowNull:false},description:{type:Sequelize[_0x49fd[3]]}}
\ No newline at end of file
+var _0x9ca0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54"];_0x9ca0[0];var Sequelize=require(_0x9ca0[1]);module[_0x9ca0[2]]= {key:{type:Sequelize[_0x9ca0[3]],allowNull:false},value:{type:Sequelize[_0x9ca0[4]],allowNull:false},description:{type:Sequelize[_0x9ca0[3]]}}
\ No newline at end of file
index 808b0df..b14a802 100644 (file)
@@ -1 +1 @@
-var _0x6acc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65","\x6B\x65\x79","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x54\x68\x65\x20\x69\x6E\x73\x65\x72\x74\x65\x64\x20\x6B\x65\x79\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74\x73\x2E","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65"];_0x6acc[0];var jsonpatch=require(_0x6acc[1]);var rp=require(_0x6acc[2]);var moment=require(_0x6acc[3]);var BPromise=require(_0x6acc[4]);var Mustache=require(_0x6acc[5]);var util=require(_0x6acc[6]);var path=require(_0x6acc[7]);var sox=require(_0x6acc[8]);var csv=require(_0x6acc[9]);var ejs=require(_0x6acc[10]);var fs=require(_0x6acc[11]);var _=require(_0x6acc[12]);var squel=require(_0x6acc[13]);var crypto=require(_0x6acc[14]);var jsforce=require(_0x6acc[15]);var deskjs=require(_0x6acc[16]);var toCsv=require(_0x6acc[9]);var querystring=require(_0x6acc[17]);var Papa=require(_0x6acc[18]);var qs=require(_0x6acc[19]);var logger=require(_0x6acc[21])(_0x6acc[20]);var utils=require(_0x6acc[22]);var config=require(_0x6acc[23]);var db=require(_0x6acc[25])[_0x6acc[24]];function respondWithStatusCode(_0xe261x1a,_0xe261x1b){_0xe261x1b= _0xe261x1b|| 204;return function(_0xe261x1c){if(_0xe261x1c){return _0xe261x1a[_0x6acc[26]](_0xe261x1b)};return _0xe261x1a[_0x6acc[28]](_0xe261x1b)[_0x6acc[27]]()}}function respondWithResult(_0xe261x1a,_0xe261x1b){_0xe261x1b= _0xe261x1b|| 200;return function(_0xe261x1c){if(_0xe261x1c){return _0xe261x1a[_0x6acc[28]](_0xe261x1b)[_0x6acc[29]](_0xe261x1c)}}}function respondWithFilteredResult(_0xe261x1a,_0xe261x1f){return function(_0xe261x1c){if(_0xe261x1c){var _0xe261x20=_0xe261x1c[_0x6acc[30]],_0xe261x21=_0xe261x1f[_0x6acc[31]],_0xe261x22=_0xe261x1f[_0x6acc[31]]+ _0xe261x1f[_0x6acc[32]],_0xe261x1b;if(_0xe261x22>= _0xe261x20){_0xe261x22= _0xe261x20;_0xe261x1b= 200}else {_0xe261x1b= 206};_0xe261x1a[_0x6acc[28]](_0xe261x1b);return _0xe261x1a[_0x6acc[36]](_0x6acc[33],_0xe261x21+ _0x6acc[34]+ _0xe261x22+ _0x6acc[35]+ _0xe261x20)[_0x6acc[29]](_0xe261x1c)};return null}}function patchUpdates(_0xe261x24){return function(_0xe261x1c){try{jsonpatch[_0x6acc[37]](_0xe261x1c,_0xe261x24,true)}catch(err){return BPromise[_0x6acc[38]](err)};return _0xe261x1c[_0x6acc[39]]()}}function saveUpdates(_0xe261x26,_0xe261x1b){return function(_0xe261x1c){if(_0xe261x1c){return _0xe261x1c[_0x6acc[41]](_0xe261x26)[_0x6acc[40]](function(_0xe261x27){return _0xe261x27})};return null}}function removeEntity(_0xe261x1a,_0xe261x1b){return function(_0xe261x1c){if(_0xe261x1c){return _0xe261x1c[_0x6acc[42]]()[_0x6acc[40]](function(){_0xe261x1a[_0x6acc[28]](204)[_0x6acc[27]]()})}}}function handleEntityNotFound(_0xe261x1a,_0xe261x1b){return function(_0xe261x1c){if(!_0xe261x1c){_0xe261x1a[_0x6acc[26]](404)};return _0xe261x1c}}function handleError(_0xe261x1a,_0xe261x1b){_0xe261x1b= _0xe261x1b|| 500;return function(_0xe261x2b){logger[_0x6acc[44]](_0xe261x2b[_0x6acc[43]]);if(_0xe261x2b[_0x6acc[45]]){delete _0xe261x2b[_0x6acc[45]]};_0xe261x1a[_0x6acc[28]](_0xe261x1b)[_0x6acc[46]](_0xe261x2b)}}exports[_0x6acc[47]]= function(_0xe261x2c,_0xe261x1a){var _0xe261x1f={},_0xe261x2d={},_0xe261x2e={count:0,rows:[]};_0xe261x2d[_0x6acc[48]]= _[_0x6acc[51]](db[_0x6acc[50]][_0x6acc[49]]);var _0xe261x2f={dateStart:_0xe261x2c[_0x6acc[53]][_0x6acc[52]],dateEnd:_0xe261x2c[_0x6acc[53]][_0x6acc[54]]};delete _0xe261x2c[_0x6acc[53]][_0x6acc[52]];delete _0xe261x2c[_0x6acc[53]][_0x6acc[54]];_0xe261x2d[_0x6acc[53]]= _[_0x6acc[51]](_0xe261x2c[_0x6acc[53]]);_0xe261x2d[_0x6acc[55]]= _[_0x6acc[56]](_0xe261x2d[_0x6acc[48]],_0xe261x2d[_0x6acc[53]]);_0xe261x1f[_0x6acc[57]]= _[_0x6acc[56]](_0xe261x2d[_0x6acc[48]],qs[_0x6acc[58]](_0xe261x2c[_0x6acc[53]][_0x6acc[58]]));_0xe261x1f[_0x6acc[57]]= (_0xe261x1f[_0x6acc[57]][_0x6acc[59]])?_0xe261x1f[_0x6acc[57]]:_0xe261x2d[_0x6acc[48]];if(!_0xe261x2c[_0x6acc[53]][_0x6acc[61]](_0x6acc[60])){_0xe261x1f[_0x6acc[32]]= qs[_0x6acc[32]](_0xe261x2c[_0x6acc[53]][_0x6acc[32]]);_0xe261x1f[_0x6acc[31]]= qs[_0x6acc[31]](_0xe261x2c[_0x6acc[53]][_0x6acc[31]])};_0xe261x1f[_0x6acc[62]]= qs[_0x6acc[63]](_0xe261x2c[_0x6acc[53]][_0x6acc[63]]);_0xe261x1f[_0x6acc[64]]= qs[_0x6acc[55]](_[_0x6acc[65]](_0xe261x2c[_0x6acc[53]],_0xe261x2d[_0x6acc[55]]));if(_0xe261x2f[_0x6acc[52]]){if(_0xe261x2f[_0x6acc[54]]){_0xe261x2f[_0x6acc[54]]= moment(_0xe261x2f[_0x6acc[54]])[_0x6acc[67]](1,_0x6acc[66])}else {_0xe261x2f[_0x6acc[54]]= moment(_0xe261x2f[_0x6acc[52]])[_0x6acc[67]](1,_0x6acc[66])};_[_0x6acc[68]](_0xe261x1f[_0x6acc[64]],{createdAt:{$gte:_0xe261x2f[_0x6acc[52]],$lte:_0xe261x2f[_0x6acc[54]]}})};if(_0xe261x2c[_0x6acc[53]][_0x6acc[69]]){_0xe261x1f[_0x6acc[64]]= _[_0x6acc[68]](_0xe261x1f[_0x6acc[64]],{$or:_[_0x6acc[71]](_0xe261x1f[_0x6acc[57]],function(_0xe261x30){var _0xe261x2e={};_0xe261x2e[_0xe261x30]= {$like:_0x6acc[70]+ _0xe261x2c[_0x6acc[53]][_0x6acc[69]]+ _0x6acc[70]};return _0xe261x2e})})};_0xe261x1f= _[_0x6acc[68]]({},_0xe261x1f,_0xe261x2c[_0x6acc[72]]);var _0xe261x31={where:_0xe261x1f[_0x6acc[64]]};return db[_0x6acc[50]][_0x6acc[30]](_0xe261x31)[_0x6acc[40]](function(_0xe261x20){_0xe261x2e[_0x6acc[30]]= _0xe261x20;if(_0xe261x2c[_0x6acc[53]][_0x6acc[75]]){_0xe261x1f[_0x6acc[76]]= [{all:true}]};return db[_0x6acc[50]][_0x6acc[77]](_0xe261x1f)})[_0x6acc[40]](function(_0xe261x32){_0xe261x2e[_0x6acc[74]]= _0xe261x32;return _0xe261x2e})[_0x6acc[40]](respondWithFilteredResult(_0xe261x1a,_0xe261x1f))[_0x6acc[73]](handleError(_0xe261x1a,null))};exports[_0x6acc[78]]= function(_0xe261x2c,_0xe261x1a){var _0xe261x1f={raw:true,where:{id:_0xe261x2c[_0x6acc[80]][_0x6acc[79]]}},_0xe261x2d={};_0xe261x2d[_0x6acc[48]]= _[_0x6acc[51]](db[_0x6acc[50]][_0x6acc[49]]);_0xe261x2d[_0x6acc[53]]= _[_0x6acc[51]](_0xe261x2c[_0x6acc[53]]);_0xe261x2d[_0x6acc[55]]= _[_0x6acc[56]](_0xe261x2d[_0x6acc[48]],_0xe261x2d[_0x6acc[53]]);_0xe261x1f[_0x6acc[57]]= _[_0x6acc[56]](_0xe261x2d[_0x6acc[48]],qs[_0x6acc[58]](_0xe261x2c[_0x6acc[53]][_0x6acc[58]]));_0xe261x1f[_0x6acc[57]]= (_0xe261x1f[_0x6acc[57]][_0x6acc[59]])?_0xe261x1f[_0x6acc[57]]:_0xe261x2d[_0x6acc[48]];if(_0xe261x2c[_0x6acc[53]][_0x6acc[75]]){_0xe261x1f[_0x6acc[76]]= [{all:true}]};_0xe261x1f= _[_0x6acc[68]]({},_0xe261x1f,_0xe261x2c[_0x6acc[72]]);return db[_0x6acc[50]][_0x6acc[81]](_0xe261x1f)[_0x6acc[40]](handleEntityNotFound(_0xe261x1a,null))[_0x6acc[40]](respondWithResult(_0xe261x1a,null))[_0x6acc[73]](handleError(_0xe261x1a,null))};exports[_0x6acc[41]]= function(_0xe261x2c,_0xe261x1a){if(_0xe261x2c[_0x6acc[82]][_0x6acc[79]]){delete _0xe261x2c[_0x6acc[82]][_0x6acc[79]]};return db[_0x6acc[50]][_0x6acc[81]]({where:{id:_0xe261x2c[_0x6acc[80]][_0x6acc[79]]}})[_0x6acc[40]](handleEntityNotFound(_0xe261x1a,null))[_0x6acc[40]](saveUpdates(_0xe261x2c[_0x6acc[82]],null))[_0x6acc[40]](respondWithResult(_0xe261x1a,null))[_0x6acc[73]](handleError(_0xe261x1a,null))};exports[_0x6acc[42]]= function(_0xe261x2c,_0xe261x1a){return db[_0x6acc[50]][_0x6acc[81]]({where:{id:_0xe261x2c[_0x6acc[80]][_0x6acc[79]]}})[_0x6acc[40]](handleEntityNotFound(_0xe261x1a,null))[_0x6acc[40]](removeEntity(_0xe261x1a,null))[_0x6acc[73]](handleError(_0xe261x1a,null))};exports[_0x6acc[83]]= function(_0xe261x2c,_0xe261x1a){var _0xe261x33={key:_0xe261x2c[_0x6acc[82]][_0x6acc[84]]};if(_0xe261x2c[_0x6acc[82]][_0x6acc[85]]){_0xe261x33[_0x6acc[85]]= _0xe261x2c[_0x6acc[82]][_0x6acc[85]]}else {if(_0xe261x2c[_0x6acc[82]][_0x6acc[86]]){_0xe261x33[_0x6acc[86]]= _0xe261x2c[_0x6acc[82]][_0x6acc[86]]}else {if(_0xe261x2c[_0x6acc[82]][_0x6acc[87]]){_0xe261x33[_0x6acc[87]]= _0xe261x2c[_0x6acc[82]][_0x6acc[87]]}else {if(_0xe261x2c[_0x6acc[82]][_0x6acc[88]]){_0xe261x33[_0x6acc[88]]= _0xe261x2c[_0x6acc[82]][_0x6acc[88]]}}}};return db[_0x6acc[50]][_0x6acc[81]]({where:_0xe261x33})[_0x6acc[40]](function(_0xe261x34){if(_0xe261x34){throw  new db[_0x6acc[90]].ValidationError(_0x6acc[89])};return db[_0x6acc[50]][_0x6acc[83]](_0xe261x2c[_0x6acc[82]])})[_0x6acc[40]](respondWithResult(_0xe261x1a,201))[_0x6acc[73]](handleError(_0xe261x1a,null))}
\ No newline at end of file
+var _0x6a95=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65","\x6B\x65\x79","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x54\x68\x65\x20\x69\x6E\x73\x65\x72\x74\x65\x64\x20\x6B\x65\x79\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74\x73\x2E","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65"];_0x6a95[0];var jsonpatch=require(_0x6a95[1]);var rp=require(_0x6a95[2]);var moment=require(_0x6a95[3]);var BPromise=require(_0x6a95[4]);var Mustache=require(_0x6a95[5]);var util=require(_0x6a95[6]);var path=require(_0x6a95[7]);var sox=require(_0x6a95[8]);var csv=require(_0x6a95[9]);var ejs=require(_0x6a95[10]);var fs=require(_0x6a95[11]);var _=require(_0x6a95[12]);var squel=require(_0x6a95[13]);var crypto=require(_0x6a95[14]);var jsforce=require(_0x6a95[15]);var deskjs=require(_0x6a95[16]);var toCsv=require(_0x6a95[9]);var querystring=require(_0x6a95[17]);var Papa=require(_0x6a95[18]);var qs=require(_0x6a95[19]);var logger=require(_0x6a95[21])(_0x6a95[20]);var utils=require(_0x6a95[22]);var config=require(_0x6a95[23]);var db=require(_0x6a95[25])[_0x6a95[24]];function respondWithStatusCode(_0x1186x1a,_0x1186x1b){_0x1186x1b= _0x1186x1b|| 204;return function(_0x1186x1c){if(_0x1186x1c){return _0x1186x1a[_0x6a95[26]](_0x1186x1b)};return _0x1186x1a[_0x6a95[28]](_0x1186x1b)[_0x6a95[27]]()}}function respondWithResult(_0x1186x1a,_0x1186x1b){_0x1186x1b= _0x1186x1b|| 200;return function(_0x1186x1c){if(_0x1186x1c){return _0x1186x1a[_0x6a95[28]](_0x1186x1b)[_0x6a95[29]](_0x1186x1c)}}}function respondWithFilteredResult(_0x1186x1a,_0x1186x1f){return function(_0x1186x1c){if(_0x1186x1c){var _0x1186x20=_0x1186x1c[_0x6a95[30]],_0x1186x21=_0x1186x1f[_0x6a95[31]],_0x1186x22=_0x1186x1f[_0x6a95[31]]+ _0x1186x1f[_0x6a95[32]],_0x1186x1b;if(_0x1186x22>= _0x1186x20){_0x1186x22= _0x1186x20;_0x1186x1b= 200}else {_0x1186x1b= 206};_0x1186x1a[_0x6a95[28]](_0x1186x1b);return _0x1186x1a[_0x6a95[36]](_0x6a95[33],_0x1186x21+ _0x6a95[34]+ _0x1186x22+ _0x6a95[35]+ _0x1186x20)[_0x6a95[29]](_0x1186x1c)};return null}}function patchUpdates(_0x1186x24){return function(_0x1186x1c){try{jsonpatch[_0x6a95[37]](_0x1186x1c,_0x1186x24,true)}catch(err){return BPromise[_0x6a95[38]](err)};return _0x1186x1c[_0x6a95[39]]()}}function saveUpdates(_0x1186x26,_0x1186x1b){return function(_0x1186x1c){if(_0x1186x1c){return _0x1186x1c[_0x6a95[41]](_0x1186x26)[_0x6a95[40]](function(_0x1186x27){return _0x1186x27})};return null}}function removeEntity(_0x1186x1a,_0x1186x1b){return function(_0x1186x1c){if(_0x1186x1c){return _0x1186x1c[_0x6a95[42]]()[_0x6a95[40]](function(){_0x1186x1a[_0x6a95[28]](204)[_0x6a95[27]]()})}}}function handleEntityNotFound(_0x1186x1a,_0x1186x1b){return function(_0x1186x1c){if(!_0x1186x1c){_0x1186x1a[_0x6a95[26]](404)};return _0x1186x1c}}function handleError(_0x1186x1a,_0x1186x1b){_0x1186x1b= _0x1186x1b|| 500;return function(_0x1186x2b){logger[_0x6a95[44]](_0x1186x2b[_0x6a95[43]]);if(_0x1186x2b[_0x6a95[45]]){delete _0x1186x2b[_0x6a95[45]]};_0x1186x1a[_0x6a95[28]](_0x1186x1b)[_0x6a95[46]](_0x1186x2b)}}exports[_0x6a95[47]]= function(_0x1186x2c,_0x1186x1a){var _0x1186x1f={},_0x1186x2d={},_0x1186x2e={count:0,rows:[]};_0x1186x2d[_0x6a95[48]]= _[_0x6a95[51]](db[_0x6a95[50]][_0x6a95[49]]);var _0x1186x2f={dateStart:_0x1186x2c[_0x6a95[53]][_0x6a95[52]],dateEnd:_0x1186x2c[_0x6a95[53]][_0x6a95[54]]};delete _0x1186x2c[_0x6a95[53]][_0x6a95[52]];delete _0x1186x2c[_0x6a95[53]][_0x6a95[54]];_0x1186x2d[_0x6a95[53]]= _[_0x6a95[51]](_0x1186x2c[_0x6a95[53]]);_0x1186x2d[_0x6a95[55]]= _[_0x6a95[56]](_0x1186x2d[_0x6a95[48]],_0x1186x2d[_0x6a95[53]]);_0x1186x1f[_0x6a95[57]]= _[_0x6a95[56]](_0x1186x2d[_0x6a95[48]],qs[_0x6a95[58]](_0x1186x2c[_0x6a95[53]][_0x6a95[58]]));_0x1186x1f[_0x6a95[57]]= (_0x1186x1f[_0x6a95[57]][_0x6a95[59]])?_0x1186x1f[_0x6a95[57]]:_0x1186x2d[_0x6a95[48]];if(!_0x1186x2c[_0x6a95[53]][_0x6a95[61]](_0x6a95[60])){_0x1186x1f[_0x6a95[32]]= qs[_0x6a95[32]](_0x1186x2c[_0x6a95[53]][_0x6a95[32]]);_0x1186x1f[_0x6a95[31]]= qs[_0x6a95[31]](_0x1186x2c[_0x6a95[53]][_0x6a95[31]])};_0x1186x1f[_0x6a95[62]]= qs[_0x6a95[63]](_0x1186x2c[_0x6a95[53]][_0x6a95[63]]);_0x1186x1f[_0x6a95[64]]= qs[_0x6a95[55]](_[_0x6a95[65]](_0x1186x2c[_0x6a95[53]],_0x1186x2d[_0x6a95[55]]));if(_0x1186x2f[_0x6a95[52]]){if(_0x1186x2f[_0x6a95[54]]){_0x1186x2f[_0x6a95[54]]= moment(_0x1186x2f[_0x6a95[54]])[_0x6a95[67]](1,_0x6a95[66])}else {_0x1186x2f[_0x6a95[54]]= moment(_0x1186x2f[_0x6a95[52]])[_0x6a95[67]](1,_0x6a95[66])};_[_0x6a95[68]](_0x1186x1f[_0x6a95[64]],{createdAt:{$gte:_0x1186x2f[_0x6a95[52]],$lte:_0x1186x2f[_0x6a95[54]]}})};if(_0x1186x2c[_0x6a95[53]][_0x6a95[69]]){_0x1186x1f[_0x6a95[64]]= _[_0x6a95[68]](_0x1186x1f[_0x6a95[64]],{$or:_[_0x6a95[71]](_0x1186x1f[_0x6a95[57]],function(_0x1186x30){var _0x1186x2e={};_0x1186x2e[_0x1186x30]= {$like:_0x6a95[70]+ _0x1186x2c[_0x6a95[53]][_0x6a95[69]]+ _0x6a95[70]};return _0x1186x2e})})};_0x1186x1f= _[_0x6a95[68]]({},_0x1186x1f,_0x1186x2c[_0x6a95[72]]);var _0x1186x31={where:_0x1186x1f[_0x6a95[64]]};return db[_0x6a95[50]][_0x6a95[30]](_0x1186x31)[_0x6a95[40]](function(_0x1186x20){_0x1186x2e[_0x6a95[30]]= _0x1186x20;if(_0x1186x2c[_0x6a95[53]][_0x6a95[75]]){_0x1186x1f[_0x6a95[76]]= [{all:true}]};return db[_0x6a95[50]][_0x6a95[77]](_0x1186x1f)})[_0x6a95[40]](function(_0x1186x32){_0x1186x2e[_0x6a95[74]]= _0x1186x32;return _0x1186x2e})[_0x6a95[40]](respondWithFilteredResult(_0x1186x1a,_0x1186x1f))[_0x6a95[73]](handleError(_0x1186x1a,null))};exports[_0x6a95[78]]= function(_0x1186x2c,_0x1186x1a){var _0x1186x1f={raw:true,where:{id:_0x1186x2c[_0x6a95[80]][_0x6a95[79]]}},_0x1186x2d={};_0x1186x2d[_0x6a95[48]]= _[_0x6a95[51]](db[_0x6a95[50]][_0x6a95[49]]);_0x1186x2d[_0x6a95[53]]= _[_0x6a95[51]](_0x1186x2c[_0x6a95[53]]);_0x1186x2d[_0x6a95[55]]= _[_0x6a95[56]](_0x1186x2d[_0x6a95[48]],_0x1186x2d[_0x6a95[53]]);_0x1186x1f[_0x6a95[57]]= _[_0x6a95[56]](_0x1186x2d[_0x6a95[48]],qs[_0x6a95[58]](_0x1186x2c[_0x6a95[53]][_0x6a95[58]]));_0x1186x1f[_0x6a95[57]]= (_0x1186x1f[_0x6a95[57]][_0x6a95[59]])?_0x1186x1f[_0x6a95[57]]:_0x1186x2d[_0x6a95[48]];if(_0x1186x2c[_0x6a95[53]][_0x6a95[75]]){_0x1186x1f[_0x6a95[76]]= [{all:true}]};_0x1186x1f= _[_0x6a95[68]]({},_0x1186x1f,_0x1186x2c[_0x6a95[72]]);return db[_0x6a95[50]][_0x6a95[81]](_0x1186x1f)[_0x6a95[40]](handleEntityNotFound(_0x1186x1a,null))[_0x6a95[40]](respondWithResult(_0x1186x1a,null))[_0x6a95[73]](handleError(_0x1186x1a,null))};exports[_0x6a95[41]]= function(_0x1186x2c,_0x1186x1a){if(_0x1186x2c[_0x6a95[82]][_0x6a95[79]]){delete _0x1186x2c[_0x6a95[82]][_0x6a95[79]]};return db[_0x6a95[50]][_0x6a95[81]]({where:{id:_0x1186x2c[_0x6a95[80]][_0x6a95[79]]}})[_0x6a95[40]](handleEntityNotFound(_0x1186x1a,null))[_0x6a95[40]](saveUpdates(_0x1186x2c[_0x6a95[82]],null))[_0x6a95[40]](respondWithResult(_0x1186x1a,null))[_0x6a95[73]](handleError(_0x1186x1a,null))};exports[_0x6a95[42]]= function(_0x1186x2c,_0x1186x1a){return db[_0x6a95[50]][_0x6a95[81]]({where:{id:_0x1186x2c[_0x6a95[80]][_0x6a95[79]]}})[_0x6a95[40]](handleEntityNotFound(_0x1186x1a,null))[_0x6a95[40]](removeEntity(_0x1186x1a,null))[_0x6a95[73]](handleError(_0x1186x1a,null))};exports[_0x6a95[83]]= function(_0x1186x2c,_0x1186x1a){var _0x1186x33={key:_0x1186x2c[_0x6a95[82]][_0x6a95[84]]};if(_0x1186x2c[_0x6a95[82]][_0x6a95[85]]){_0x1186x33[_0x6a95[85]]= _0x1186x2c[_0x6a95[82]][_0x6a95[85]]}else {if(_0x1186x2c[_0x6a95[82]][_0x6a95[86]]){_0x1186x33[_0x6a95[86]]= _0x1186x2c[_0x6a95[82]][_0x6a95[86]]}else {if(_0x1186x2c[_0x6a95[82]][_0x6a95[87]]){_0x1186x33[_0x6a95[87]]= _0x1186x2c[_0x6a95[82]][_0x6a95[87]]}else {if(_0x1186x2c[_0x6a95[82]][_0x6a95[88]]){_0x1186x33[_0x6a95[88]]= _0x1186x2c[_0x6a95[82]][_0x6a95[88]]}}}};return db[_0x6a95[50]][_0x6a95[81]]({where:_0x1186x33})[_0x6a95[40]](function(_0x1186x34){if(_0x1186x34){throw  new db[_0x6a95[90]].ValidationError(_0x6a95[89])};return db[_0x6a95[50]][_0x6a95[83]](_0x1186x2c[_0x6a95[82]])})[_0x6a95[40]](respondWithResult(_0x1186x1a,201))[_0x6a95[73]](handleError(_0x1186x1a,null))}
\ No newline at end of file
index 55a059c..b23f9f9 100644 (file)
@@ -1 +1 @@
-var _0xc0c2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x74\x6F\x6F\x6C\x73\x5F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x73","\x64\x65\x66\x69\x6E\x65"];_0xc0c2[0];var _=require(_0xc0c2[1]);var util=require(_0xc0c2[2]);var logger=require(_0xc0c2[4])(_0xc0c2[3]);var moment=require(_0xc0c2[5]);var BPromise=require(_0xc0c2[6]);var rp=require(_0xc0c2[7]);var attributes=require(_0xc0c2[8]);module[_0xc0c2[9]]= function(_0xb9b3x8,_0xb9b3x9){return _0xb9b3x8[_0xc0c2[12]](_0xc0c2[10],attributes,{tableName:_0xc0c2[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xe3dc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x74\x6F\x6F\x6C\x73\x5F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x73","\x64\x65\x66\x69\x6E\x65"];_0xe3dc[0];var _=require(_0xe3dc[1]);var util=require(_0xe3dc[2]);var logger=require(_0xe3dc[4])(_0xe3dc[3]);var moment=require(_0xe3dc[5]);var BPromise=require(_0xe3dc[6]);var rp=require(_0xe3dc[7]);var attributes=require(_0xe3dc[8]);module[_0xe3dc[9]]= function(_0xca1ex8,_0xca1ex9){return _0xca1ex8[_0xe3dc[12]](_0xe3dc[10],attributes,{tableName:_0xe3dc[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 89dc21e..06070a2 100644 (file)
@@ -1 +1 @@
-var _0xc0ff=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xc0ff[0];var _=require(_0xc0ff[1]);var util=require(_0xc0ff[2]);var moment=require(_0xc0ff[3]);var BPromise=require(_0xc0ff[4]);var rs=require(_0xc0ff[5]);var fs=require(_0xc0ff[6]);var db=require(_0xc0ff[8])[_0xc0ff[7]];var utils=require(_0xc0ff[9]);var logger=require(_0xc0ff[11])(_0xc0ff[10]);var config=require(_0xc0ff[12]);var jayson=require(_0xc0ff[13]);var client=jayson[_0xc0ff[15]][_0xc0ff[14]]({port:9002});function respondWithRpcPromise(_0x2fe6xe,_0x2fe6xf,_0x2fe6x10){return  new BPromise(function(_0x2fe6x11,_0x2fe6x12){return client[_0xc0ff[28]](_0x2fe6xe,_0x2fe6x10)[_0xc0ff[27]](function(_0x2fe6x14){logger[_0xc0ff[20]](_0xc0ff[16],_0x2fe6xf,_0xc0ff[19]);logger[_0xc0ff[23]](_0xc0ff[21],_0x2fe6xf,_0xc0ff[19],JSON[_0xc0ff[22]](_0x2fe6x14));if(_0x2fe6x14[_0xc0ff[17]]){if(_0x2fe6x14[_0xc0ff[17]][_0xc0ff[24]]=== 500){logger[_0xc0ff[17]](_0xc0ff[16],_0x2fe6xf,_0x2fe6x14[_0xc0ff[17]][_0xc0ff[25]]);return _0x2fe6x12(_0x2fe6x14[_0xc0ff[17]][_0xc0ff[25]])};logger[_0xc0ff[17]](_0xc0ff[16],_0x2fe6xf,_0x2fe6x14[_0xc0ff[17]][_0xc0ff[25]]);return _0x2fe6x11(_0x2fe6x14[_0xc0ff[17]][_0xc0ff[25]])}else {logger[_0xc0ff[20]](_0xc0ff[16],_0x2fe6xf,_0xc0ff[19]);_0x2fe6x11(_0x2fe6x14[_0xc0ff[26]][_0xc0ff[25]])}})[_0xc0ff[18]](function(_0x2fe6x13){logger[_0xc0ff[17]](_0xc0ff[16],_0x2fe6xf,_0x2fe6x13);_0x2fe6x12(_0x2fe6x13)})})}
\ No newline at end of file
+var _0x26f4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x26f4[0];var _=require(_0x26f4[1]);var util=require(_0x26f4[2]);var moment=require(_0x26f4[3]);var BPromise=require(_0x26f4[4]);var rs=require(_0x26f4[5]);var fs=require(_0x26f4[6]);var db=require(_0x26f4[8])[_0x26f4[7]];var utils=require(_0x26f4[9]);var logger=require(_0x26f4[11])(_0x26f4[10]);var config=require(_0x26f4[12]);var jayson=require(_0x26f4[13]);var client=jayson[_0x26f4[15]][_0x26f4[14]]({port:9002});function respondWithRpcPromise(_0x2590xe,_0x2590xf,_0x2590x10){return  new BPromise(function(_0x2590x11,_0x2590x12){return client[_0x26f4[28]](_0x2590xe,_0x2590x10)[_0x26f4[27]](function(_0x2590x14){logger[_0x26f4[20]](_0x26f4[16],_0x2590xf,_0x26f4[19]);logger[_0x26f4[23]](_0x26f4[21],_0x2590xf,_0x26f4[19],JSON[_0x26f4[22]](_0x2590x14));if(_0x2590x14[_0x26f4[17]]){if(_0x2590x14[_0x26f4[17]][_0x26f4[24]]=== 500){logger[_0x26f4[17]](_0x26f4[16],_0x2590xf,_0x2590x14[_0x26f4[17]][_0x26f4[25]]);return _0x2590x12(_0x2590x14[_0x26f4[17]][_0x26f4[25]])};logger[_0x26f4[17]](_0x26f4[16],_0x2590xf,_0x2590x14[_0x26f4[17]][_0x26f4[25]]);return _0x2590x11(_0x2590x14[_0x26f4[17]][_0x26f4[25]])}else {logger[_0x26f4[20]](_0x26f4[16],_0x2590xf,_0x26f4[19]);_0x2590x11(_0x2590x14[_0x26f4[26]][_0x26f4[25]])}})[_0x26f4[18]](function(_0x2590x13){logger[_0x26f4[17]](_0x26f4[16],_0x2590xf,_0x2590x13);_0x2590x12(_0x2590x13)})})}
\ No newline at end of file
index 7c131e6..b7e41a5 100644 (file)
@@ -1 +1 @@
-var _0x4cfc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4cfc[0];var multer=require(_0x4cfc[1]);var util=require(_0x4cfc[2]);var path=require(_0x4cfc[3]);var express=require(_0x4cfc[4]);var router=express.Router();var auth=require(_0x4cfc[5]);var interaction=require(_0x4cfc[6]);var config=require(_0x4cfc[7]);var controller=require(_0x4cfc[8]);router[_0x4cfc[12]](_0x4cfc[9],auth[_0x4cfc[10]](),controller[_0x4cfc[11]]);router[_0x4cfc[12]](_0x4cfc[13],auth[_0x4cfc[10]](),controller[_0x4cfc[14]]);router[_0x4cfc[16]](_0x4cfc[9],auth[_0x4cfc[10]](),controller[_0x4cfc[15]]);router[_0x4cfc[18]](_0x4cfc[13],auth[_0x4cfc[10]](),controller[_0x4cfc[17]]);router[_0x4cfc[20]](_0x4cfc[13],auth[_0x4cfc[10]](),controller[_0x4cfc[19]]);module[_0x4cfc[21]]= router
\ No newline at end of file
+var _0x4222=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4222[0];var multer=require(_0x4222[1]);var util=require(_0x4222[2]);var path=require(_0x4222[3]);var express=require(_0x4222[4]);var router=express.Router();var auth=require(_0x4222[5]);var interaction=require(_0x4222[6]);var config=require(_0x4222[7]);var controller=require(_0x4222[8]);router[_0x4222[12]](_0x4222[9],auth[_0x4222[10]](),controller[_0x4222[11]]);router[_0x4222[12]](_0x4222[13],auth[_0x4222[10]](),controller[_0x4222[14]]);router[_0x4222[16]](_0x4222[9],auth[_0x4222[10]](),controller[_0x4222[15]]);router[_0x4222[18]](_0x4222[13],auth[_0x4222[10]](),controller[_0x4222[17]]);router[_0x4222[20]](_0x4222[13],auth[_0x4222[10]](),controller[_0x4222[19]]);module[_0x4222[21]]= router
\ No newline at end of file
index 2078efc..b826238 100644 (file)
@@ -1 +1 @@
-var _0x5f6f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x44\x41\x54\x45","\x31\x39\x37\x30\x2D\x30\x31\x2D\x30\x31\x20\x30\x30\x3A\x30\x30\x3A\x30\x31","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52"];_0x5f6f[0];var Sequelize=require(_0x5f6f[1]);module[_0x5f6f[2]]= {calldate:{type:Sequelize[_0x5f6f[3]],allowNull:false,defaultValue:_0x5f6f[4]},clid:{type:Sequelize[_0x5f6f[5]]},src:{type:Sequelize[_0x5f6f[5]]},dst:{type:Sequelize[_0x5f6f[5]]},dcontext:{type:Sequelize[_0x5f6f[5]]},channel:{type:Sequelize[_0x5f6f[5]]},dstchannel:{type:Sequelize[_0x5f6f[5]]},lastapp:{type:Sequelize[_0x5f6f[5]]},lastdata:{type:Sequelize[_0x5f6f[5]]},duration:{type:Sequelize[_0x5f6f[6]],allowNull:false,defaultValue:0},billsec:{type:Sequelize[_0x5f6f[6]],allowNull:false,defaultValue:0},disposition:{type:Sequelize[_0x5f6f[5]]},amaflags:{type:Sequelize[_0x5f6f[6]],allowNull:false,defaultValue:0},accountcode:{type:Sequelize[_0x5f6f[5]]},userfield:{type:Sequelize[_0x5f6f[5]]},uniqueid:{type:Sequelize[_0x5f6f[5]]},linkedid:{type:Sequelize[_0x5f6f[5]]},sequence:{type:Sequelize[_0x5f6f[5]]},peeraccount:{type:Sequelize[_0x5f6f[5]]},type:{type:Sequelize[_0x5f6f[5]]},tag:{type:Sequelize[_0x5f6f[5]]}}
\ No newline at end of file
+var _0x7edd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x44\x41\x54\x45","\x31\x39\x37\x30\x2D\x30\x31\x2D\x30\x31\x20\x30\x30\x3A\x30\x30\x3A\x30\x31","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52"];_0x7edd[0];var Sequelize=require(_0x7edd[1]);module[_0x7edd[2]]= {calldate:{type:Sequelize[_0x7edd[3]],allowNull:false,defaultValue:_0x7edd[4]},clid:{type:Sequelize[_0x7edd[5]]},src:{type:Sequelize[_0x7edd[5]]},dst:{type:Sequelize[_0x7edd[5]]},dcontext:{type:Sequelize[_0x7edd[5]]},channel:{type:Sequelize[_0x7edd[5]]},dstchannel:{type:Sequelize[_0x7edd[5]]},lastapp:{type:Sequelize[_0x7edd[5]]},lastdata:{type:Sequelize[_0x7edd[5]]},duration:{type:Sequelize[_0x7edd[6]],allowNull:false,defaultValue:0},billsec:{type:Sequelize[_0x7edd[6]],allowNull:false,defaultValue:0},disposition:{type:Sequelize[_0x7edd[5]]},amaflags:{type:Sequelize[_0x7edd[6]],allowNull:false,defaultValue:0},accountcode:{type:Sequelize[_0x7edd[5]]},userfield:{type:Sequelize[_0x7edd[5]]},uniqueid:{type:Sequelize[_0x7edd[5]]},linkedid:{type:Sequelize[_0x7edd[5]]},sequence:{type:Sequelize[_0x7edd[5]]},peeraccount:{type:Sequelize[_0x7edd[5]]},type:{type:Sequelize[_0x7edd[5]]},tag:{type:Sequelize[_0x7edd[5]]}}
\ No newline at end of file
index ea5b252..4d8903c 100644 (file)
@@ -1 +1 @@
-var _0x2adb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x64\x72","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x2adb[0];var jsonpatch=require(_0x2adb[1]);var rp=require(_0x2adb[2]);var moment=require(_0x2adb[3]);var BPromise=require(_0x2adb[4]);var Mustache=require(_0x2adb[5]);var util=require(_0x2adb[6]);var path=require(_0x2adb[7]);var sox=require(_0x2adb[8]);var csv=require(_0x2adb[9]);var ejs=require(_0x2adb[10]);var fs=require(_0x2adb[11]);var _=require(_0x2adb[12]);var squel=require(_0x2adb[13]);var crypto=require(_0x2adb[14]);var jsforce=require(_0x2adb[15]);var deskjs=require(_0x2adb[16]);var toCsv=require(_0x2adb[9]);var querystring=require(_0x2adb[17]);var Papa=require(_0x2adb[18]);var qs=require(_0x2adb[19]);var logger=require(_0x2adb[21])(_0x2adb[20]);var utils=require(_0x2adb[22]);var config=require(_0x2adb[23]);var db=require(_0x2adb[25])[_0x2adb[24]];function respondWithStatusCode(_0xfaf7x1a,_0xfaf7x1b){_0xfaf7x1b= _0xfaf7x1b|| 204;return function(_0xfaf7x1c){if(_0xfaf7x1c){return _0xfaf7x1a[_0x2adb[26]](_0xfaf7x1b)};return _0xfaf7x1a[_0x2adb[28]](_0xfaf7x1b)[_0x2adb[27]]()}}function respondWithResult(_0xfaf7x1a,_0xfaf7x1b){_0xfaf7x1b= _0xfaf7x1b|| 200;return function(_0xfaf7x1c){if(_0xfaf7x1c){return _0xfaf7x1a[_0x2adb[28]](_0xfaf7x1b)[_0x2adb[29]](_0xfaf7x1c)}}}function respondWithFilteredResult(_0xfaf7x1a,_0xfaf7x1f){return function(_0xfaf7x1c){if(_0xfaf7x1c){var _0xfaf7x20=_0xfaf7x1c[_0x2adb[30]],_0xfaf7x21=_0xfaf7x1f[_0x2adb[31]],_0xfaf7x22=_0xfaf7x1f[_0x2adb[31]]+ _0xfaf7x1f[_0x2adb[32]],_0xfaf7x1b;if(_0xfaf7x22>= _0xfaf7x20){_0xfaf7x22= _0xfaf7x20;_0xfaf7x1b= 200}else {_0xfaf7x1b= 206};_0xfaf7x1a[_0x2adb[28]](_0xfaf7x1b);return _0xfaf7x1a[_0x2adb[36]](_0x2adb[33],_0xfaf7x21+ _0x2adb[34]+ _0xfaf7x22+ _0x2adb[35]+ _0xfaf7x20)[_0x2adb[29]](_0xfaf7x1c)};return null}}function patchUpdates(_0xfaf7x24){return function(_0xfaf7x1c){try{jsonpatch[_0x2adb[37]](_0xfaf7x1c,_0xfaf7x24,true)}catch(err){return BPromise[_0x2adb[38]](err)};return _0xfaf7x1c[_0x2adb[39]]()}}function saveUpdates(_0xfaf7x26,_0xfaf7x1b){return function(_0xfaf7x1c){if(_0xfaf7x1c){return _0xfaf7x1c[_0x2adb[41]](_0xfaf7x26)[_0x2adb[40]](function(_0xfaf7x27){return _0xfaf7x27})};return null}}function removeEntity(_0xfaf7x1a,_0xfaf7x1b){return function(_0xfaf7x1c){if(_0xfaf7x1c){return _0xfaf7x1c[_0x2adb[42]]()[_0x2adb[40]](function(){_0xfaf7x1a[_0x2adb[28]](204)[_0x2adb[27]]()})}}}function handleEntityNotFound(_0xfaf7x1a,_0xfaf7x1b){return function(_0xfaf7x1c){if(!_0xfaf7x1c){_0xfaf7x1a[_0x2adb[26]](404)};return _0xfaf7x1c}}function handleError(_0xfaf7x1a,_0xfaf7x1b){_0xfaf7x1b= _0xfaf7x1b|| 500;return function(_0xfaf7x2b){logger[_0x2adb[44]](_0xfaf7x2b[_0x2adb[43]]);if(_0xfaf7x2b[_0x2adb[45]]){delete _0xfaf7x2b[_0x2adb[45]]};_0xfaf7x1a[_0x2adb[28]](_0xfaf7x1b)[_0x2adb[46]](_0xfaf7x2b)}}exports[_0x2adb[47]]= function(_0xfaf7x2c,_0xfaf7x1a){var _0xfaf7x1f={},_0xfaf7x2d={},_0xfaf7x2e={count:0,rows:[]};_0xfaf7x2d[_0x2adb[48]]= _[_0x2adb[51]](db[_0x2adb[50]][_0x2adb[49]]);var _0xfaf7x2f={dateStart:_0xfaf7x2c[_0x2adb[53]][_0x2adb[52]],dateEnd:_0xfaf7x2c[_0x2adb[53]][_0x2adb[54]]};delete _0xfaf7x2c[_0x2adb[53]][_0x2adb[52]];delete _0xfaf7x2c[_0x2adb[53]][_0x2adb[54]];_0xfaf7x2d[_0x2adb[53]]= _[_0x2adb[51]](_0xfaf7x2c[_0x2adb[53]]);_0xfaf7x2d[_0x2adb[55]]= _[_0x2adb[56]](_0xfaf7x2d[_0x2adb[48]],_0xfaf7x2d[_0x2adb[53]]);_0xfaf7x1f[_0x2adb[57]]= _[_0x2adb[56]](_0xfaf7x2d[_0x2adb[48]],qs[_0x2adb[58]](_0xfaf7x2c[_0x2adb[53]][_0x2adb[58]]));_0xfaf7x1f[_0x2adb[57]]= (_0xfaf7x1f[_0x2adb[57]][_0x2adb[59]])?_0xfaf7x1f[_0x2adb[57]]:_0xfaf7x2d[_0x2adb[48]];if(!_0xfaf7x2c[_0x2adb[53]][_0x2adb[61]](_0x2adb[60])){_0xfaf7x1f[_0x2adb[32]]= qs[_0x2adb[32]](_0xfaf7x2c[_0x2adb[53]][_0x2adb[32]]);_0xfaf7x1f[_0x2adb[31]]= qs[_0x2adb[31]](_0xfaf7x2c[_0x2adb[53]][_0x2adb[31]])};_0xfaf7x1f[_0x2adb[62]]= qs[_0x2adb[63]](_0xfaf7x2c[_0x2adb[53]][_0x2adb[63]]);_0xfaf7x1f[_0x2adb[64]]= qs[_0x2adb[55]](_[_0x2adb[65]](_0xfaf7x2c[_0x2adb[53]],_0xfaf7x2d[_0x2adb[55]]));if(_0xfaf7x2f[_0x2adb[52]]){if(_0xfaf7x2f[_0x2adb[54]]){_0xfaf7x2f[_0x2adb[54]]= moment(_0xfaf7x2f[_0x2adb[54]])[_0x2adb[67]](1,_0x2adb[66])}else {_0xfaf7x2f[_0x2adb[54]]= moment(_0xfaf7x2f[_0x2adb[52]])[_0x2adb[67]](1,_0x2adb[66])};_[_0x2adb[68]](_0xfaf7x1f[_0x2adb[64]],{createdAt:{$gte:_0xfaf7x2f[_0x2adb[52]],$lte:_0xfaf7x2f[_0x2adb[54]]}})};if(_0xfaf7x2c[_0x2adb[53]][_0x2adb[69]]){_0xfaf7x1f[_0x2adb[64]]= _[_0x2adb[68]](_0xfaf7x1f[_0x2adb[64]],{$or:_[_0x2adb[71]](_0xfaf7x1f[_0x2adb[57]],function(_0xfaf7x30){var _0xfaf7x2e={};_0xfaf7x2e[_0xfaf7x30]= {$like:_0x2adb[70]+ _0xfaf7x2c[_0x2adb[53]][_0x2adb[69]]+ _0x2adb[70]};return _0xfaf7x2e})})};_0xfaf7x1f= _[_0x2adb[68]]({},_0xfaf7x1f,_0xfaf7x2c[_0x2adb[72]]);var _0xfaf7x31={where:_0xfaf7x1f[_0x2adb[64]]};return db[_0x2adb[50]][_0x2adb[30]](_0xfaf7x31)[_0x2adb[40]](function(_0xfaf7x20){_0xfaf7x2e[_0x2adb[30]]= _0xfaf7x20;if(_0xfaf7x2c[_0x2adb[53]][_0x2adb[75]]){_0xfaf7x1f[_0x2adb[76]]= [{all:true}]};return db[_0x2adb[50]][_0x2adb[77]](_0xfaf7x1f)})[_0x2adb[40]](function(_0xfaf7x32){_0xfaf7x2e[_0x2adb[74]]= _0xfaf7x32;return _0xfaf7x2e})[_0x2adb[40]](respondWithFilteredResult(_0xfaf7x1a,_0xfaf7x1f))[_0x2adb[73]](handleError(_0xfaf7x1a,null))};exports[_0x2adb[78]]= function(_0xfaf7x2c,_0xfaf7x1a){var _0xfaf7x1f={raw:true,where:{id:_0xfaf7x2c[_0x2adb[80]][_0x2adb[79]]}},_0xfaf7x2d={};_0xfaf7x2d[_0x2adb[48]]= _[_0x2adb[51]](db[_0x2adb[50]][_0x2adb[49]]);_0xfaf7x2d[_0x2adb[53]]= _[_0x2adb[51]](_0xfaf7x2c[_0x2adb[53]]);_0xfaf7x2d[_0x2adb[55]]= _[_0x2adb[56]](_0xfaf7x2d[_0x2adb[48]],_0xfaf7x2d[_0x2adb[53]]);_0xfaf7x1f[_0x2adb[57]]= _[_0x2adb[56]](_0xfaf7x2d[_0x2adb[48]],qs[_0x2adb[58]](_0xfaf7x2c[_0x2adb[53]][_0x2adb[58]]));_0xfaf7x1f[_0x2adb[57]]= (_0xfaf7x1f[_0x2adb[57]][_0x2adb[59]])?_0xfaf7x1f[_0x2adb[57]]:_0xfaf7x2d[_0x2adb[48]];if(_0xfaf7x2c[_0x2adb[53]][_0x2adb[75]]){_0xfaf7x1f[_0x2adb[76]]= [{all:true}]};_0xfaf7x1f= _[_0x2adb[68]]({},_0xfaf7x1f,_0xfaf7x2c[_0x2adb[72]]);return db[_0x2adb[50]][_0x2adb[81]](_0xfaf7x1f)[_0x2adb[40]](handleEntityNotFound(_0xfaf7x1a,null))[_0x2adb[40]](respondWithResult(_0xfaf7x1a,null))[_0x2adb[73]](handleError(_0xfaf7x1a,null))};exports[_0x2adb[82]]= function(_0xfaf7x2c,_0xfaf7x1a){return db[_0x2adb[50]][_0x2adb[82]](_0xfaf7x2c[_0x2adb[83]],{})[_0x2adb[40]](respondWithResult(_0xfaf7x1a,201))[_0x2adb[73]](handleError(_0xfaf7x1a,null))};exports[_0x2adb[41]]= function(_0xfaf7x2c,_0xfaf7x1a){if(_0xfaf7x2c[_0x2adb[83]][_0x2adb[79]]){delete _0xfaf7x2c[_0x2adb[83]][_0x2adb[79]]};return db[_0x2adb[50]][_0x2adb[81]]({where:{id:_0xfaf7x2c[_0x2adb[80]][_0x2adb[79]]}})[_0x2adb[40]](handleEntityNotFound(_0xfaf7x1a,null))[_0x2adb[40]](saveUpdates(_0xfaf7x2c[_0x2adb[83]],null))[_0x2adb[40]](respondWithResult(_0xfaf7x1a,null))[_0x2adb[73]](handleError(_0xfaf7x1a,null))};exports[_0x2adb[42]]= function(_0xfaf7x2c,_0xfaf7x1a){return db[_0x2adb[50]][_0x2adb[81]]({where:{id:_0xfaf7x2c[_0x2adb[80]][_0x2adb[79]]}})[_0x2adb[40]](handleEntityNotFound(_0xfaf7x1a,null))[_0x2adb[40]](removeEntity(_0xfaf7x1a,null))[_0x2adb[73]](handleError(_0xfaf7x1a,null))}
\ No newline at end of file
+var _0x8221=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x64\x72","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x8221[0];var jsonpatch=require(_0x8221[1]);var rp=require(_0x8221[2]);var moment=require(_0x8221[3]);var BPromise=require(_0x8221[4]);var Mustache=require(_0x8221[5]);var util=require(_0x8221[6]);var path=require(_0x8221[7]);var sox=require(_0x8221[8]);var csv=require(_0x8221[9]);var ejs=require(_0x8221[10]);var fs=require(_0x8221[11]);var _=require(_0x8221[12]);var squel=require(_0x8221[13]);var crypto=require(_0x8221[14]);var jsforce=require(_0x8221[15]);var deskjs=require(_0x8221[16]);var toCsv=require(_0x8221[9]);var querystring=require(_0x8221[17]);var Papa=require(_0x8221[18]);var qs=require(_0x8221[19]);var logger=require(_0x8221[21])(_0x8221[20]);var utils=require(_0x8221[22]);var config=require(_0x8221[23]);var db=require(_0x8221[25])[_0x8221[24]];function respondWithStatusCode(_0x86dax1a,_0x86dax1b){_0x86dax1b= _0x86dax1b|| 204;return function(_0x86dax1c){if(_0x86dax1c){return _0x86dax1a[_0x8221[26]](_0x86dax1b)};return _0x86dax1a[_0x8221[28]](_0x86dax1b)[_0x8221[27]]()}}function respondWithResult(_0x86dax1a,_0x86dax1b){_0x86dax1b= _0x86dax1b|| 200;return function(_0x86dax1c){if(_0x86dax1c){return _0x86dax1a[_0x8221[28]](_0x86dax1b)[_0x8221[29]](_0x86dax1c)}}}function respondWithFilteredResult(_0x86dax1a,_0x86dax1f){return function(_0x86dax1c){if(_0x86dax1c){var _0x86dax20=_0x86dax1c[_0x8221[30]],_0x86dax21=_0x86dax1f[_0x8221[31]],_0x86dax22=_0x86dax1f[_0x8221[31]]+ _0x86dax1f[_0x8221[32]],_0x86dax1b;if(_0x86dax22>= _0x86dax20){_0x86dax22= _0x86dax20;_0x86dax1b= 200}else {_0x86dax1b= 206};_0x86dax1a[_0x8221[28]](_0x86dax1b);return _0x86dax1a[_0x8221[36]](_0x8221[33],_0x86dax21+ _0x8221[34]+ _0x86dax22+ _0x8221[35]+ _0x86dax20)[_0x8221[29]](_0x86dax1c)};return null}}function patchUpdates(_0x86dax24){return function(_0x86dax1c){try{jsonpatch[_0x8221[37]](_0x86dax1c,_0x86dax24,true)}catch(err){return BPromise[_0x8221[38]](err)};return _0x86dax1c[_0x8221[39]]()}}function saveUpdates(_0x86dax26,_0x86dax1b){return function(_0x86dax1c){if(_0x86dax1c){return _0x86dax1c[_0x8221[41]](_0x86dax26)[_0x8221[40]](function(_0x86dax27){return _0x86dax27})};return null}}function removeEntity(_0x86dax1a,_0x86dax1b){return function(_0x86dax1c){if(_0x86dax1c){return _0x86dax1c[_0x8221[42]]()[_0x8221[40]](function(){_0x86dax1a[_0x8221[28]](204)[_0x8221[27]]()})}}}function handleEntityNotFound(_0x86dax1a,_0x86dax1b){return function(_0x86dax1c){if(!_0x86dax1c){_0x86dax1a[_0x8221[26]](404)};return _0x86dax1c}}function handleError(_0x86dax1a,_0x86dax1b){_0x86dax1b= _0x86dax1b|| 500;return function(_0x86dax2b){logger[_0x8221[44]](_0x86dax2b[_0x8221[43]]);if(_0x86dax2b[_0x8221[45]]){delete _0x86dax2b[_0x8221[45]]};_0x86dax1a[_0x8221[28]](_0x86dax1b)[_0x8221[46]](_0x86dax2b)}}exports[_0x8221[47]]= function(_0x86dax2c,_0x86dax1a){var _0x86dax1f={},_0x86dax2d={},_0x86dax2e={count:0,rows:[]};_0x86dax2d[_0x8221[48]]= _[_0x8221[51]](db[_0x8221[50]][_0x8221[49]]);var _0x86dax2f={dateStart:_0x86dax2c[_0x8221[53]][_0x8221[52]],dateEnd:_0x86dax2c[_0x8221[53]][_0x8221[54]]};delete _0x86dax2c[_0x8221[53]][_0x8221[52]];delete _0x86dax2c[_0x8221[53]][_0x8221[54]];_0x86dax2d[_0x8221[53]]= _[_0x8221[51]](_0x86dax2c[_0x8221[53]]);_0x86dax2d[_0x8221[55]]= _[_0x8221[56]](_0x86dax2d[_0x8221[48]],_0x86dax2d[_0x8221[53]]);_0x86dax1f[_0x8221[57]]= _[_0x8221[56]](_0x86dax2d[_0x8221[48]],qs[_0x8221[58]](_0x86dax2c[_0x8221[53]][_0x8221[58]]));_0x86dax1f[_0x8221[57]]= (_0x86dax1f[_0x8221[57]][_0x8221[59]])?_0x86dax1f[_0x8221[57]]:_0x86dax2d[_0x8221[48]];if(!_0x86dax2c[_0x8221[53]][_0x8221[61]](_0x8221[60])){_0x86dax1f[_0x8221[32]]= qs[_0x8221[32]](_0x86dax2c[_0x8221[53]][_0x8221[32]]);_0x86dax1f[_0x8221[31]]= qs[_0x8221[31]](_0x86dax2c[_0x8221[53]][_0x8221[31]])};_0x86dax1f[_0x8221[62]]= qs[_0x8221[63]](_0x86dax2c[_0x8221[53]][_0x8221[63]]);_0x86dax1f[_0x8221[64]]= qs[_0x8221[55]](_[_0x8221[65]](_0x86dax2c[_0x8221[53]],_0x86dax2d[_0x8221[55]]));if(_0x86dax2f[_0x8221[52]]){if(_0x86dax2f[_0x8221[54]]){_0x86dax2f[_0x8221[54]]= moment(_0x86dax2f[_0x8221[54]])[_0x8221[67]](1,_0x8221[66])}else {_0x86dax2f[_0x8221[54]]= moment(_0x86dax2f[_0x8221[52]])[_0x8221[67]](1,_0x8221[66])};_[_0x8221[68]](_0x86dax1f[_0x8221[64]],{createdAt:{$gte:_0x86dax2f[_0x8221[52]],$lte:_0x86dax2f[_0x8221[54]]}})};if(_0x86dax2c[_0x8221[53]][_0x8221[69]]){_0x86dax1f[_0x8221[64]]= _[_0x8221[68]](_0x86dax1f[_0x8221[64]],{$or:_[_0x8221[71]](_0x86dax1f[_0x8221[57]],function(_0x86dax30){var _0x86dax2e={};_0x86dax2e[_0x86dax30]= {$like:_0x8221[70]+ _0x86dax2c[_0x8221[53]][_0x8221[69]]+ _0x8221[70]};return _0x86dax2e})})};_0x86dax1f= _[_0x8221[68]]({},_0x86dax1f,_0x86dax2c[_0x8221[72]]);var _0x86dax31={where:_0x86dax1f[_0x8221[64]]};return db[_0x8221[50]][_0x8221[30]](_0x86dax31)[_0x8221[40]](function(_0x86dax20){_0x86dax2e[_0x8221[30]]= _0x86dax20;if(_0x86dax2c[_0x8221[53]][_0x8221[75]]){_0x86dax1f[_0x8221[76]]= [{all:true}]};return db[_0x8221[50]][_0x8221[77]](_0x86dax1f)})[_0x8221[40]](function(_0x86dax32){_0x86dax2e[_0x8221[74]]= _0x86dax32;return _0x86dax2e})[_0x8221[40]](respondWithFilteredResult(_0x86dax1a,_0x86dax1f))[_0x8221[73]](handleError(_0x86dax1a,null))};exports[_0x8221[78]]= function(_0x86dax2c,_0x86dax1a){var _0x86dax1f={raw:true,where:{id:_0x86dax2c[_0x8221[80]][_0x8221[79]]}},_0x86dax2d={};_0x86dax2d[_0x8221[48]]= _[_0x8221[51]](db[_0x8221[50]][_0x8221[49]]);_0x86dax2d[_0x8221[53]]= _[_0x8221[51]](_0x86dax2c[_0x8221[53]]);_0x86dax2d[_0x8221[55]]= _[_0x8221[56]](_0x86dax2d[_0x8221[48]],_0x86dax2d[_0x8221[53]]);_0x86dax1f[_0x8221[57]]= _[_0x8221[56]](_0x86dax2d[_0x8221[48]],qs[_0x8221[58]](_0x86dax2c[_0x8221[53]][_0x8221[58]]));_0x86dax1f[_0x8221[57]]= (_0x86dax1f[_0x8221[57]][_0x8221[59]])?_0x86dax1f[_0x8221[57]]:_0x86dax2d[_0x8221[48]];if(_0x86dax2c[_0x8221[53]][_0x8221[75]]){_0x86dax1f[_0x8221[76]]= [{all:true}]};_0x86dax1f= _[_0x8221[68]]({},_0x86dax1f,_0x86dax2c[_0x8221[72]]);return db[_0x8221[50]][_0x8221[81]](_0x86dax1f)[_0x8221[40]](handleEntityNotFound(_0x86dax1a,null))[_0x8221[40]](respondWithResult(_0x86dax1a,null))[_0x8221[73]](handleError(_0x86dax1a,null))};exports[_0x8221[82]]= function(_0x86dax2c,_0x86dax1a){return db[_0x8221[50]][_0x8221[82]](_0x86dax2c[_0x8221[83]],{})[_0x8221[40]](respondWithResult(_0x86dax1a,201))[_0x8221[73]](handleError(_0x86dax1a,null))};exports[_0x8221[41]]= function(_0x86dax2c,_0x86dax1a){if(_0x86dax2c[_0x8221[83]][_0x8221[79]]){delete _0x86dax2c[_0x8221[83]][_0x8221[79]]};return db[_0x8221[50]][_0x8221[81]]({where:{id:_0x86dax2c[_0x8221[80]][_0x8221[79]]}})[_0x8221[40]](handleEntityNotFound(_0x86dax1a,null))[_0x8221[40]](saveUpdates(_0x86dax2c[_0x8221[83]],null))[_0x8221[40]](respondWithResult(_0x86dax1a,null))[_0x8221[73]](handleError(_0x86dax1a,null))};exports[_0x8221[42]]= function(_0x86dax2c,_0x86dax1a){return db[_0x8221[50]][_0x8221[81]]({where:{id:_0x86dax2c[_0x8221[80]][_0x8221[79]]}})[_0x8221[40]](handleEntityNotFound(_0x86dax1a,null))[_0x8221[40]](removeEntity(_0x86dax1a,null))[_0x8221[73]](handleError(_0x86dax1a,null))}
\ No newline at end of file
index cb18f49..f927351 100644 (file)
@@ -1 +1 @@
-var _0x1d43=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x64\x72\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x64\x72","\x63\x64\x72","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x63\x61\x6C\x6C\x64\x61\x74\x65","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x73\x74","\x73\x72\x63","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0x1d43[0];var _=require(_0x1d43[1]);var util=require(_0x1d43[2]);var logger=require(_0x1d43[4])(_0x1d43[3]);var moment=require(_0x1d43[5]);var BPromise=require(_0x1d43[6]);var rp=require(_0x1d43[7]);var attributes=require(_0x1d43[8]);module[_0x1d43[9]]= function(_0xe3b9x8,_0xe3b9x9){return _0xe3b9x8[_0x1d43[18]](_0x1d43[10],attributes,{tableName:_0x1d43[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x1d43[12],"\x66\x69\x65\x6C\x64\x73":[_0x1d43[12]]},{"\x6E\x61\x6D\x65":_0x1d43[13],"\x66\x69\x65\x6C\x64\x73":[_0x1d43[13]]},{"\x6E\x61\x6D\x65":_0x1d43[14],"\x66\x69\x65\x6C\x64\x73":[_0x1d43[14]]},{"\x6E\x61\x6D\x65":_0x1d43[15],"\x66\x69\x65\x6C\x64\x73":[_0x1d43[15]]},{"\x6E\x61\x6D\x65":_0x1d43[16],"\x66\x69\x65\x6C\x64\x73":[_0x1d43[16]]},{"\x6E\x61\x6D\x65":_0x1d43[17],"\x66\x69\x65\x6C\x64\x73":[_0x1d43[17]]}],timestamps:false})}
\ No newline at end of file
+var _0xf155=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x64\x72\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x64\x72","\x63\x64\x72","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x63\x61\x6C\x6C\x64\x61\x74\x65","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x73\x74","\x73\x72\x63","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0xf155[0];var _=require(_0xf155[1]);var util=require(_0xf155[2]);var logger=require(_0xf155[4])(_0xf155[3]);var moment=require(_0xf155[5]);var BPromise=require(_0xf155[6]);var rp=require(_0xf155[7]);var attributes=require(_0xf155[8]);module[_0xf155[9]]= function(_0xdcd6x8,_0xdcd6x9){return _0xdcd6x8[_0xf155[18]](_0xf155[10],attributes,{tableName:_0xf155[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0xf155[12],"\x66\x69\x65\x6C\x64\x73":[_0xf155[12]]},{"\x6E\x61\x6D\x65":_0xf155[13],"\x66\x69\x65\x6C\x64\x73":[_0xf155[13]]},{"\x6E\x61\x6D\x65":_0xf155[14],"\x66\x69\x65\x6C\x64\x73":[_0xf155[14]]},{"\x6E\x61\x6D\x65":_0xf155[15],"\x66\x69\x65\x6C\x64\x73":[_0xf155[15]]},{"\x6E\x61\x6D\x65":_0xf155[16],"\x66\x69\x65\x6C\x64\x73":[_0xf155[16]]},{"\x6E\x61\x6D\x65":_0xf155[17],"\x66\x69\x65\x6C\x64\x73":[_0xf155[17]]}],timestamps:false})}
\ No newline at end of file
index 38cf516..4ffe876 100644 (file)
@@ -1 +1 @@
-var _0x8586=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x64\x72\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x64\x72\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x8586[0];var _=require(_0x8586[1]);var util=require(_0x8586[2]);var moment=require(_0x8586[3]);var BPromise=require(_0x8586[4]);var rs=require(_0x8586[5]);var fs=require(_0x8586[6]);var db=require(_0x8586[8])[_0x8586[7]];var utils=require(_0x8586[9]);var logger=require(_0x8586[11])(_0x8586[10]);var config=require(_0x8586[12]);var jayson=require(_0x8586[13]);var client=jayson[_0x8586[15]][_0x8586[14]]({port:9002});function respondWithRpcPromise(_0xe7c5xe,_0xe7c5xf,_0xe7c5x10){return  new BPromise(function(_0xe7c5x11,_0xe7c5x12){return client[_0x8586[28]](_0xe7c5xe,_0xe7c5x10)[_0x8586[27]](function(_0xe7c5x14){logger[_0x8586[20]](_0x8586[16],_0xe7c5xf,_0x8586[19]);logger[_0x8586[23]](_0x8586[21],_0xe7c5xf,_0x8586[19],JSON[_0x8586[22]](_0xe7c5x14));if(_0xe7c5x14[_0x8586[17]]){if(_0xe7c5x14[_0x8586[17]][_0x8586[24]]=== 500){logger[_0x8586[17]](_0x8586[16],_0xe7c5xf,_0xe7c5x14[_0x8586[17]][_0x8586[25]]);return _0xe7c5x12(_0xe7c5x14[_0x8586[17]][_0x8586[25]])};logger[_0x8586[17]](_0x8586[16],_0xe7c5xf,_0xe7c5x14[_0x8586[17]][_0x8586[25]]);return _0xe7c5x11(_0xe7c5x14[_0x8586[17]][_0x8586[25]])}else {logger[_0x8586[20]](_0x8586[16],_0xe7c5xf,_0x8586[19]);_0xe7c5x11(_0xe7c5x14[_0x8586[26]][_0x8586[25]])}})[_0x8586[18]](function(_0xe7c5x13){logger[_0x8586[17]](_0x8586[16],_0xe7c5xf,_0xe7c5x13);_0xe7c5x12(_0xe7c5x13)})})}
\ No newline at end of file
+var _0x8211=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x64\x72\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x64\x72\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x8211[0];var _=require(_0x8211[1]);var util=require(_0x8211[2]);var moment=require(_0x8211[3]);var BPromise=require(_0x8211[4]);var rs=require(_0x8211[5]);var fs=require(_0x8211[6]);var db=require(_0x8211[8])[_0x8211[7]];var utils=require(_0x8211[9]);var logger=require(_0x8211[11])(_0x8211[10]);var config=require(_0x8211[12]);var jayson=require(_0x8211[13]);var client=jayson[_0x8211[15]][_0x8211[14]]({port:9002});function respondWithRpcPromise(_0xdd18xe,_0xdd18xf,_0xdd18x10){return  new BPromise(function(_0xdd18x11,_0xdd18x12){return client[_0x8211[28]](_0xdd18xe,_0xdd18x10)[_0x8211[27]](function(_0xdd18x14){logger[_0x8211[20]](_0x8211[16],_0xdd18xf,_0x8211[19]);logger[_0x8211[23]](_0x8211[21],_0xdd18xf,_0x8211[19],JSON[_0x8211[22]](_0xdd18x14));if(_0xdd18x14[_0x8211[17]]){if(_0xdd18x14[_0x8211[17]][_0x8211[24]]=== 500){logger[_0x8211[17]](_0x8211[16],_0xdd18xf,_0xdd18x14[_0x8211[17]][_0x8211[25]]);return _0xdd18x12(_0xdd18x14[_0x8211[17]][_0x8211[25]])};logger[_0x8211[17]](_0x8211[16],_0xdd18xf,_0xdd18x14[_0x8211[17]][_0x8211[25]]);return _0xdd18x11(_0xdd18x14[_0x8211[17]][_0x8211[25]])}else {logger[_0x8211[20]](_0x8211[16],_0xdd18xf,_0x8211[19]);_0xdd18x11(_0xdd18x14[_0x8211[26]][_0x8211[25]])}})[_0x8211[18]](function(_0xdd18x13){logger[_0x8211[17]](_0x8211[16],_0xdd18xf,_0xdd18x13);_0xdd18x12(_0xdd18x13)})})}
\ No newline at end of file
index f8a78df..c8fb87e 100644 (file)
@@ -1 +1 @@
-var _0x5275=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x64\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x5275[0];var multer=require(_0x5275[1]);var util=require(_0x5275[2]);var path=require(_0x5275[3]);var express=require(_0x5275[4]);var router=express.Router();var auth=require(_0x5275[5]);var interaction=require(_0x5275[6]);var config=require(_0x5275[7]);var controller=require(_0x5275[8]);router[_0x5275[12]](_0x5275[9],auth[_0x5275[10]](),controller[_0x5275[11]]);router[_0x5275[12]](_0x5275[13],auth[_0x5275[10]](),controller[_0x5275[14]]);router[_0x5275[16]](_0x5275[9],auth[_0x5275[10]](),controller[_0x5275[15]]);router[_0x5275[18]](_0x5275[13],auth[_0x5275[10]](),controller[_0x5275[17]]);router[_0x5275[20]](_0x5275[13],auth[_0x5275[10]](),controller[_0x5275[19]]);module[_0x5275[21]]= router
\ No newline at end of file
+var _0x9d0f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x64\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9d0f[0];var multer=require(_0x9d0f[1]);var util=require(_0x9d0f[2]);var path=require(_0x9d0f[3]);var express=require(_0x9d0f[4]);var router=express.Router();var auth=require(_0x9d0f[5]);var interaction=require(_0x9d0f[6]);var config=require(_0x9d0f[7]);var controller=require(_0x9d0f[8]);router[_0x9d0f[12]](_0x9d0f[9],auth[_0x9d0f[10]](),controller[_0x9d0f[11]]);router[_0x9d0f[12]](_0x9d0f[13],auth[_0x9d0f[10]](),controller[_0x9d0f[14]]);router[_0x9d0f[16]](_0x9d0f[9],auth[_0x9d0f[10]](),controller[_0x9d0f[15]]);router[_0x9d0f[18]](_0x9d0f[13],auth[_0x9d0f[10]](),controller[_0x9d0f[17]]);router[_0x9d0f[20]](_0x9d0f[13],auth[_0x9d0f[10]](),controller[_0x9d0f[19]]);module[_0x9d0f[21]]= router
\ No newline at end of file
index e1cd7d9..8f00645 100644 (file)
@@ -1 +1 @@
-var _0x64c3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x6E\x6F\x6F\x70","","\x2A\x2C\x2A\x2C\x2A\x2C\x2A"];_0x64c3[0];var Sequelize=require(_0x64c3[1]);module[_0x64c3[2]]= {priority:{type:Sequelize[_0x64c3[3]],allowNull:false},app:{type:Sequelize[_0x64c3[4]],allowNull:false,defaultValue:_0x64c3[5]},appdata:{type:Sequelize.STRING(4096),defaultValue:_0x64c3[6]},description:{type:Sequelize[_0x64c3[4]]},interval:{type:Sequelize[_0x64c3[4]],defaultValue:_0x64c3[7]}}
\ No newline at end of file
+var _0x1875=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x6E\x6F\x6F\x70","","\x2A\x2C\x2A\x2C\x2A\x2C\x2A"];_0x1875[0];var Sequelize=require(_0x1875[1]);module[_0x1875[2]]= {priority:{type:Sequelize[_0x1875[3]],allowNull:false},app:{type:Sequelize[_0x1875[4]],allowNull:false,defaultValue:_0x1875[5]},appdata:{type:Sequelize.STRING(4096),defaultValue:_0x1875[6]},description:{type:Sequelize[_0x1875[4]]},interval:{type:Sequelize[_0x1875[4]],defaultValue:_0x1875[7]}}
\ No newline at end of file
index 83a0def..54c5750 100644 (file)
@@ -1 +1 @@
-var _0x42fd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64","\x62\x6F\x64\x79"];_0x42fd[0];var jsonpatch=require(_0x42fd[1]);var rp=require(_0x42fd[2]);var moment=require(_0x42fd[3]);var BPromise=require(_0x42fd[4]);var Mustache=require(_0x42fd[5]);var util=require(_0x42fd[6]);var path=require(_0x42fd[7]);var sox=require(_0x42fd[8]);var csv=require(_0x42fd[9]);var ejs=require(_0x42fd[10]);var fs=require(_0x42fd[11]);var _=require(_0x42fd[12]);var squel=require(_0x42fd[13]);var crypto=require(_0x42fd[14]);var jsforce=require(_0x42fd[15]);var deskjs=require(_0x42fd[16]);var toCsv=require(_0x42fd[9]);var querystring=require(_0x42fd[17]);var Papa=require(_0x42fd[18]);var qs=require(_0x42fd[19]);var logger=require(_0x42fd[21])(_0x42fd[20]);var utils=require(_0x42fd[22]);var config=require(_0x42fd[23]);var db=require(_0x42fd[25])[_0x42fd[24]];function respondWithStatusCode(_0x75d9x1a,_0x75d9x1b){_0x75d9x1b= _0x75d9x1b|| 204;return function(_0x75d9x1c){if(_0x75d9x1c){return _0x75d9x1a[_0x42fd[26]](_0x75d9x1b)};return _0x75d9x1a[_0x42fd[28]](_0x75d9x1b)[_0x42fd[27]]()}}function respondWithResult(_0x75d9x1a,_0x75d9x1b){_0x75d9x1b= _0x75d9x1b|| 200;return function(_0x75d9x1c){if(_0x75d9x1c){return _0x75d9x1a[_0x42fd[28]](_0x75d9x1b)[_0x42fd[29]](_0x75d9x1c)}}}function respondWithFilteredResult(_0x75d9x1a,_0x75d9x1f){return function(_0x75d9x1c){if(_0x75d9x1c){var _0x75d9x20=_0x75d9x1c[_0x42fd[30]],_0x75d9x21=_0x75d9x1f[_0x42fd[31]],_0x75d9x22=_0x75d9x1f[_0x42fd[31]]+ _0x75d9x1f[_0x42fd[32]],_0x75d9x1b;if(_0x75d9x22>= _0x75d9x20){_0x75d9x22= _0x75d9x20;_0x75d9x1b= 200}else {_0x75d9x1b= 206};_0x75d9x1a[_0x42fd[28]](_0x75d9x1b);return _0x75d9x1a[_0x42fd[36]](_0x42fd[33],_0x75d9x21+ _0x42fd[34]+ _0x75d9x22+ _0x42fd[35]+ _0x75d9x20)[_0x42fd[29]](_0x75d9x1c)};return null}}function patchUpdates(_0x75d9x24){return function(_0x75d9x1c){try{jsonpatch[_0x42fd[37]](_0x75d9x1c,_0x75d9x24,true)}catch(err){return BPromise[_0x42fd[38]](err)};return _0x75d9x1c[_0x42fd[39]]()}}function saveUpdates(_0x75d9x26,_0x75d9x1b){return function(_0x75d9x1c){if(_0x75d9x1c){return _0x75d9x1c[_0x42fd[41]](_0x75d9x26)[_0x42fd[40]](function(_0x75d9x27){return _0x75d9x27})};return null}}function removeEntity(_0x75d9x1a,_0x75d9x1b){return function(_0x75d9x1c){if(_0x75d9x1c){return _0x75d9x1c[_0x42fd[42]]()[_0x42fd[40]](function(){_0x75d9x1a[_0x42fd[28]](204)[_0x42fd[27]]()})}}}function handleEntityNotFound(_0x75d9x1a,_0x75d9x1b){return function(_0x75d9x1c){if(!_0x75d9x1c){_0x75d9x1a[_0x42fd[26]](404)};return _0x75d9x1c}}function handleError(_0x75d9x1a,_0x75d9x1b){_0x75d9x1b= _0x75d9x1b|| 500;return function(_0x75d9x2b){logger[_0x42fd[44]](_0x75d9x2b[_0x42fd[43]]);if(_0x75d9x2b[_0x42fd[45]]){delete _0x75d9x2b[_0x42fd[45]]};_0x75d9x1a[_0x42fd[28]](_0x75d9x1b)[_0x42fd[46]](_0x75d9x2b)}}exports[_0x42fd[47]]= function(_0x75d9x2c,_0x75d9x1a){var _0x75d9x1f={raw:true,where:{id:_0x75d9x2c[_0x42fd[49]][_0x42fd[48]]}},_0x75d9x2d={};_0x75d9x2d[_0x42fd[50]]= _[_0x42fd[53]](db[_0x42fd[52]][_0x42fd[51]]);_0x75d9x2d[_0x42fd[54]]= _[_0x42fd[53]](_0x75d9x2c[_0x42fd[54]]);_0x75d9x2d[_0x42fd[55]]= _[_0x42fd[56]](_0x75d9x2d[_0x42fd[50]],_0x75d9x2d[_0x42fd[54]]);_0x75d9x1f[_0x42fd[57]]= _[_0x42fd[56]](_0x75d9x2d[_0x42fd[50]],qs[_0x42fd[58]](_0x75d9x2c[_0x42fd[54]][_0x42fd[58]]));_0x75d9x1f[_0x42fd[57]]= (_0x75d9x1f[_0x42fd[57]][_0x42fd[59]])?_0x75d9x1f[_0x42fd[57]]:_0x75d9x2d[_0x42fd[50]];if(_0x75d9x2c[_0x42fd[54]][_0x42fd[60]]){_0x75d9x1f[_0x42fd[61]]= [{all:true}]};_0x75d9x1f= _[_0x42fd[63]]({},_0x75d9x1f,_0x75d9x2c[_0x42fd[62]]);return db[_0x42fd[52]][_0x42fd[65]](_0x75d9x1f)[_0x42fd[40]](handleEntityNotFound(_0x75d9x1a,null))[_0x42fd[40]](respondWithResult(_0x75d9x1a,null))[_0x42fd[64]](handleError(_0x75d9x1a,null))};exports[_0x42fd[41]]= function(_0x75d9x2c,_0x75d9x1a){if(_0x75d9x2c[_0x42fd[66]][_0x42fd[48]]){delete _0x75d9x2c[_0x42fd[66]][_0x42fd[48]]};return db[_0x42fd[52]][_0x42fd[65]]({where:{id:_0x75d9x2c[_0x42fd[49]][_0x42fd[48]]}})[_0x42fd[40]](handleEntityNotFound(_0x75d9x1a,null))[_0x42fd[40]](saveUpdates(_0x75d9x2c[_0x42fd[66]],null))[_0x42fd[40]](respondWithResult(_0x75d9x1a,null))[_0x42fd[64]](handleError(_0x75d9x1a,null))};exports[_0x42fd[42]]= function(_0x75d9x2c,_0x75d9x1a){return db[_0x42fd[52]][_0x42fd[65]]({where:{id:_0x75d9x2c[_0x42fd[49]][_0x42fd[48]]}})[_0x42fd[40]](handleEntityNotFound(_0x75d9x1a,null))[_0x42fd[40]](removeEntity(_0x75d9x1a,null))[_0x42fd[64]](handleError(_0x75d9x1a,null))}
\ No newline at end of file
+var _0x47cc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64","\x62\x6F\x64\x79"];_0x47cc[0];var jsonpatch=require(_0x47cc[1]);var rp=require(_0x47cc[2]);var moment=require(_0x47cc[3]);var BPromise=require(_0x47cc[4]);var Mustache=require(_0x47cc[5]);var util=require(_0x47cc[6]);var path=require(_0x47cc[7]);var sox=require(_0x47cc[8]);var csv=require(_0x47cc[9]);var ejs=require(_0x47cc[10]);var fs=require(_0x47cc[11]);var _=require(_0x47cc[12]);var squel=require(_0x47cc[13]);var crypto=require(_0x47cc[14]);var jsforce=require(_0x47cc[15]);var deskjs=require(_0x47cc[16]);var toCsv=require(_0x47cc[9]);var querystring=require(_0x47cc[17]);var Papa=require(_0x47cc[18]);var qs=require(_0x47cc[19]);var logger=require(_0x47cc[21])(_0x47cc[20]);var utils=require(_0x47cc[22]);var config=require(_0x47cc[23]);var db=require(_0x47cc[25])[_0x47cc[24]];function respondWithStatusCode(_0x78aax1a,_0x78aax1b){_0x78aax1b= _0x78aax1b|| 204;return function(_0x78aax1c){if(_0x78aax1c){return _0x78aax1a[_0x47cc[26]](_0x78aax1b)};return _0x78aax1a[_0x47cc[28]](_0x78aax1b)[_0x47cc[27]]()}}function respondWithResult(_0x78aax1a,_0x78aax1b){_0x78aax1b= _0x78aax1b|| 200;return function(_0x78aax1c){if(_0x78aax1c){return _0x78aax1a[_0x47cc[28]](_0x78aax1b)[_0x47cc[29]](_0x78aax1c)}}}function respondWithFilteredResult(_0x78aax1a,_0x78aax1f){return function(_0x78aax1c){if(_0x78aax1c){var _0x78aax20=_0x78aax1c[_0x47cc[30]],_0x78aax21=_0x78aax1f[_0x47cc[31]],_0x78aax22=_0x78aax1f[_0x47cc[31]]+ _0x78aax1f[_0x47cc[32]],_0x78aax1b;if(_0x78aax22>= _0x78aax20){_0x78aax22= _0x78aax20;_0x78aax1b= 200}else {_0x78aax1b= 206};_0x78aax1a[_0x47cc[28]](_0x78aax1b);return _0x78aax1a[_0x47cc[36]](_0x47cc[33],_0x78aax21+ _0x47cc[34]+ _0x78aax22+ _0x47cc[35]+ _0x78aax20)[_0x47cc[29]](_0x78aax1c)};return null}}function patchUpdates(_0x78aax24){return function(_0x78aax1c){try{jsonpatch[_0x47cc[37]](_0x78aax1c,_0x78aax24,true)}catch(err){return BPromise[_0x47cc[38]](err)};return _0x78aax1c[_0x47cc[39]]()}}function saveUpdates(_0x78aax26,_0x78aax1b){return function(_0x78aax1c){if(_0x78aax1c){return _0x78aax1c[_0x47cc[41]](_0x78aax26)[_0x47cc[40]](function(_0x78aax27){return _0x78aax27})};return null}}function removeEntity(_0x78aax1a,_0x78aax1b){return function(_0x78aax1c){if(_0x78aax1c){return _0x78aax1c[_0x47cc[42]]()[_0x47cc[40]](function(){_0x78aax1a[_0x47cc[28]](204)[_0x47cc[27]]()})}}}function handleEntityNotFound(_0x78aax1a,_0x78aax1b){return function(_0x78aax1c){if(!_0x78aax1c){_0x78aax1a[_0x47cc[26]](404)};return _0x78aax1c}}function handleError(_0x78aax1a,_0x78aax1b){_0x78aax1b= _0x78aax1b|| 500;return function(_0x78aax2b){logger[_0x47cc[44]](_0x78aax2b[_0x47cc[43]]);if(_0x78aax2b[_0x47cc[45]]){delete _0x78aax2b[_0x47cc[45]]};_0x78aax1a[_0x47cc[28]](_0x78aax1b)[_0x47cc[46]](_0x78aax2b)}}exports[_0x47cc[47]]= function(_0x78aax2c,_0x78aax1a){var _0x78aax1f={raw:true,where:{id:_0x78aax2c[_0x47cc[49]][_0x47cc[48]]}},_0x78aax2d={};_0x78aax2d[_0x47cc[50]]= _[_0x47cc[53]](db[_0x47cc[52]][_0x47cc[51]]);_0x78aax2d[_0x47cc[54]]= _[_0x47cc[53]](_0x78aax2c[_0x47cc[54]]);_0x78aax2d[_0x47cc[55]]= _[_0x47cc[56]](_0x78aax2d[_0x47cc[50]],_0x78aax2d[_0x47cc[54]]);_0x78aax1f[_0x47cc[57]]= _[_0x47cc[56]](_0x78aax2d[_0x47cc[50]],qs[_0x47cc[58]](_0x78aax2c[_0x47cc[54]][_0x47cc[58]]));_0x78aax1f[_0x47cc[57]]= (_0x78aax1f[_0x47cc[57]][_0x47cc[59]])?_0x78aax1f[_0x47cc[57]]:_0x78aax2d[_0x47cc[50]];if(_0x78aax2c[_0x47cc[54]][_0x47cc[60]]){_0x78aax1f[_0x47cc[61]]= [{all:true}]};_0x78aax1f= _[_0x47cc[63]]({},_0x78aax1f,_0x78aax2c[_0x47cc[62]]);return db[_0x47cc[52]][_0x47cc[65]](_0x78aax1f)[_0x47cc[40]](handleEntityNotFound(_0x78aax1a,null))[_0x47cc[40]](respondWithResult(_0x78aax1a,null))[_0x47cc[64]](handleError(_0x78aax1a,null))};exports[_0x47cc[41]]= function(_0x78aax2c,_0x78aax1a){if(_0x78aax2c[_0x47cc[66]][_0x47cc[48]]){delete _0x78aax2c[_0x47cc[66]][_0x47cc[48]]};return db[_0x47cc[52]][_0x47cc[65]]({where:{id:_0x78aax2c[_0x47cc[49]][_0x47cc[48]]}})[_0x47cc[40]](handleEntityNotFound(_0x78aax1a,null))[_0x47cc[40]](saveUpdates(_0x78aax2c[_0x47cc[66]],null))[_0x47cc[40]](respondWithResult(_0x78aax1a,null))[_0x47cc[64]](handleError(_0x78aax1a,null))};exports[_0x47cc[42]]= function(_0x78aax2c,_0x78aax1a){return db[_0x47cc[52]][_0x47cc[65]]({where:{id:_0x78aax2c[_0x47cc[49]][_0x47cc[48]]}})[_0x47cc[40]](handleEntityNotFound(_0x78aax1a,null))[_0x47cc[40]](removeEntity(_0x78aax1a,null))[_0x47cc[64]](handleError(_0x78aax1a,null))}
\ No newline at end of file
index 01ccaeb..1c31a0a 100644 (file)
@@ -1 +1 @@
-var _0xf47a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xf47a[0];var _=require(_0xf47a[1]);var util=require(_0xf47a[2]);var logger=require(_0xf47a[4])(_0xf47a[3]);var moment=require(_0xf47a[5]);var BPromise=require(_0xf47a[6]);var rp=require(_0xf47a[7]);var attributes=require(_0xf47a[8]);module[_0xf47a[9]]= function(_0x76a5x8,_0x76a5x9){return _0x76a5x8[_0xf47a[12]](_0xf47a[10],attributes,{tableName:_0xf47a[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xbfa6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xbfa6[0];var _=require(_0xbfa6[1]);var util=require(_0xbfa6[2]);var logger=require(_0xbfa6[4])(_0xbfa6[3]);var moment=require(_0xbfa6[5]);var BPromise=require(_0xbfa6[6]);var rp=require(_0xbfa6[7]);var attributes=require(_0xbfa6[8]);module[_0xbfa6[9]]= function(_0x39acx8,_0x39acx9){return _0x39acx8[_0xbfa6[12]](_0xbfa6[10],attributes,{tableName:_0xbfa6[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 92b9257..2e3b254 100644 (file)
@@ -1 +1 @@
-var _0x781b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x781b[0];var _=require(_0x781b[1]);var util=require(_0x781b[2]);var moment=require(_0x781b[3]);var BPromise=require(_0x781b[4]);var rs=require(_0x781b[5]);var fs=require(_0x781b[6]);var db=require(_0x781b[8])[_0x781b[7]];var utils=require(_0x781b[9]);var logger=require(_0x781b[11])(_0x781b[10]);var config=require(_0x781b[12]);var jayson=require(_0x781b[13]);var client=jayson[_0x781b[15]][_0x781b[14]]({port:9002});function respondWithRpcPromise(_0x139bxe,_0x139bxf,_0x139bx10){return  new BPromise(function(_0x139bx11,_0x139bx12){return client[_0x781b[28]](_0x139bxe,_0x139bx10)[_0x781b[27]](function(_0x139bx14){logger[_0x781b[20]](_0x781b[16],_0x139bxf,_0x781b[19]);logger[_0x781b[23]](_0x781b[21],_0x139bxf,_0x781b[19],JSON[_0x781b[22]](_0x139bx14));if(_0x139bx14[_0x781b[17]]){if(_0x139bx14[_0x781b[17]][_0x781b[24]]=== 500){logger[_0x781b[17]](_0x781b[16],_0x139bxf,_0x139bx14[_0x781b[17]][_0x781b[25]]);return _0x139bx12(_0x139bx14[_0x781b[17]][_0x781b[25]])};logger[_0x781b[17]](_0x781b[16],_0x139bxf,_0x139bx14[_0x781b[17]][_0x781b[25]]);return _0x139bx11(_0x139bx14[_0x781b[17]][_0x781b[25]])}else {logger[_0x781b[20]](_0x781b[16],_0x139bxf,_0x781b[19]);_0x139bx11(_0x139bx14[_0x781b[26]][_0x781b[25]])}})[_0x781b[18]](function(_0x139bx13){logger[_0x781b[17]](_0x781b[16],_0x139bxf,_0x139bx13);_0x139bx12(_0x139bx13)})})}
\ No newline at end of file
+var _0x4bec=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x4bec[0];var _=require(_0x4bec[1]);var util=require(_0x4bec[2]);var moment=require(_0x4bec[3]);var BPromise=require(_0x4bec[4]);var rs=require(_0x4bec[5]);var fs=require(_0x4bec[6]);var db=require(_0x4bec[8])[_0x4bec[7]];var utils=require(_0x4bec[9]);var logger=require(_0x4bec[11])(_0x4bec[10]);var config=require(_0x4bec[12]);var jayson=require(_0x4bec[13]);var client=jayson[_0x4bec[15]][_0x4bec[14]]({port:9002});function respondWithRpcPromise(_0xeb0axe,_0xeb0axf,_0xeb0ax10){return  new BPromise(function(_0xeb0ax11,_0xeb0ax12){return client[_0x4bec[28]](_0xeb0axe,_0xeb0ax10)[_0x4bec[27]](function(_0xeb0ax14){logger[_0x4bec[20]](_0x4bec[16],_0xeb0axf,_0x4bec[19]);logger[_0x4bec[23]](_0x4bec[21],_0xeb0axf,_0x4bec[19],JSON[_0x4bec[22]](_0xeb0ax14));if(_0xeb0ax14[_0x4bec[17]]){if(_0xeb0ax14[_0x4bec[17]][_0x4bec[24]]=== 500){logger[_0x4bec[17]](_0x4bec[16],_0xeb0axf,_0xeb0ax14[_0x4bec[17]][_0x4bec[25]]);return _0xeb0ax12(_0xeb0ax14[_0x4bec[17]][_0x4bec[25]])};logger[_0x4bec[17]](_0x4bec[16],_0xeb0axf,_0xeb0ax14[_0x4bec[17]][_0x4bec[25]]);return _0xeb0ax11(_0xeb0ax14[_0x4bec[17]][_0x4bec[25]])}else {logger[_0x4bec[20]](_0x4bec[16],_0xeb0axf,_0x4bec[19]);_0xeb0ax11(_0xeb0ax14[_0x4bec[26]][_0x4bec[25]])}})[_0x4bec[18]](function(_0xeb0ax13){logger[_0x4bec[17]](_0x4bec[16],_0xeb0axf,_0xeb0ax13);_0xeb0ax12(_0xeb0ax13)})})}
\ No newline at end of file
index e4f6bae..eb1dc3a 100644 (file)
@@ -1 +1 @@
-var _0x6086=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x73\x68\x6F\x77","\x67\x65\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6086[0];var multer=require(_0x6086[1]);var util=require(_0x6086[2]);var path=require(_0x6086[3]);var express=require(_0x6086[4]);var router=express.Router();var auth=require(_0x6086[5]);var interaction=require(_0x6086[6]);var config=require(_0x6086[7]);var controller=require(_0x6086[8]);router[_0x6086[12]](_0x6086[9],auth[_0x6086[10]](),controller[_0x6086[11]]);router[_0x6086[14]](_0x6086[9],auth[_0x6086[10]](),controller[_0x6086[13]]);router[_0x6086[16]](_0x6086[9],auth[_0x6086[10]](),controller[_0x6086[15]]);module[_0x6086[17]]= router
\ No newline at end of file
+var _0x441e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x73\x68\x6F\x77","\x67\x65\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x441e[0];var multer=require(_0x441e[1]);var util=require(_0x441e[2]);var path=require(_0x441e[3]);var express=require(_0x441e[4]);var router=express.Router();var auth=require(_0x441e[5]);var interaction=require(_0x441e[6]);var config=require(_0x441e[7]);var controller=require(_0x441e[8]);router[_0x441e[12]](_0x441e[9],auth[_0x441e[10]](),controller[_0x441e[11]]);router[_0x441e[14]](_0x441e[9],auth[_0x441e[10]](),controller[_0x441e[13]]);router[_0x441e[16]](_0x441e[9],auth[_0x441e[10]](),controller[_0x441e[15]]);module[_0x441e[17]]= router
\ No newline at end of file
index effaba6..11bdaae 100644 (file)
@@ -1 +1 @@
-var _0xdc44=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65\x41\x6E\x64\x41\x63\x63\x6F\x75\x6E\x74"];_0xdc44[0];var Sequelize=require(_0xdc44[1]);module[_0xdc44[2]]= {name:{type:Sequelize[_0xdc44[3]],unique:_0xdc44[4],allowNull:false}}
\ No newline at end of file
+var _0xdaeb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65\x41\x6E\x64\x41\x63\x63\x6F\x75\x6E\x74"];_0xdaeb[0];var Sequelize=require(_0xdaeb[1]);module[_0xdaeb[2]]= {name:{type:Sequelize[_0xdaeb[3]],unique:_0xdaeb[4],allowNull:false}}
\ No newline at end of file
index 3239716..890b17e 100644 (file)
@@ -1 +1 @@
-var _0x3a23=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x3a23[0];var jsonpatch=require(_0x3a23[1]);var rp=require(_0x3a23[2]);var moment=require(_0x3a23[3]);var BPromise=require(_0x3a23[4]);var Mustache=require(_0x3a23[5]);var util=require(_0x3a23[6]);var path=require(_0x3a23[7]);var sox=require(_0x3a23[8]);var csv=require(_0x3a23[9]);var ejs=require(_0x3a23[10]);var fs=require(_0x3a23[11]);var _=require(_0x3a23[12]);var squel=require(_0x3a23[13]);var crypto=require(_0x3a23[14]);var jsforce=require(_0x3a23[15]);var deskjs=require(_0x3a23[16]);var toCsv=require(_0x3a23[9]);var querystring=require(_0x3a23[17]);var Papa=require(_0x3a23[18]);var qs=require(_0x3a23[19]);var logger=require(_0x3a23[21])(_0x3a23[20]);var utils=require(_0x3a23[22]);var config=require(_0x3a23[23]);var db=require(_0x3a23[25])[_0x3a23[24]];function respondWithStatusCode(_0xbc37x1a,_0xbc37x1b){_0xbc37x1b= _0xbc37x1b|| 204;return function(_0xbc37x1c){if(_0xbc37x1c){return _0xbc37x1a[_0x3a23[26]](_0xbc37x1b)};return _0xbc37x1a[_0x3a23[28]](_0xbc37x1b)[_0x3a23[27]]()}}function respondWithResult(_0xbc37x1a,_0xbc37x1b){_0xbc37x1b= _0xbc37x1b|| 200;return function(_0xbc37x1c){if(_0xbc37x1c){return _0xbc37x1a[_0x3a23[28]](_0xbc37x1b)[_0x3a23[29]](_0xbc37x1c)}}}function respondWithFilteredResult(_0xbc37x1a,_0xbc37x1f){return function(_0xbc37x1c){if(_0xbc37x1c){var _0xbc37x20=_0xbc37x1c[_0x3a23[30]],_0xbc37x21=_0xbc37x1f[_0x3a23[31]],_0xbc37x22=_0xbc37x1f[_0x3a23[31]]+ _0xbc37x1f[_0x3a23[32]],_0xbc37x1b;if(_0xbc37x22>= _0xbc37x20){_0xbc37x22= _0xbc37x20;_0xbc37x1b= 200}else {_0xbc37x1b= 206};_0xbc37x1a[_0x3a23[28]](_0xbc37x1b);return _0xbc37x1a[_0x3a23[36]](_0x3a23[33],_0xbc37x21+ _0x3a23[34]+ _0xbc37x22+ _0x3a23[35]+ _0xbc37x20)[_0x3a23[29]](_0xbc37x1c)};return null}}function patchUpdates(_0xbc37x24){return function(_0xbc37x1c){try{jsonpatch[_0x3a23[37]](_0xbc37x1c,_0xbc37x24,true)}catch(err){return BPromise[_0x3a23[38]](err)};return _0xbc37x1c[_0x3a23[39]]()}}function saveUpdates(_0xbc37x26,_0xbc37x1b){return function(_0xbc37x1c){if(_0xbc37x1c){return _0xbc37x1c[_0x3a23[41]](_0xbc37x26)[_0x3a23[40]](function(_0xbc37x27){return _0xbc37x27})};return null}}function removeEntity(_0xbc37x1a,_0xbc37x1b){return function(_0xbc37x1c){if(_0xbc37x1c){return _0xbc37x1c[_0x3a23[42]]()[_0x3a23[40]](function(){_0xbc37x1a[_0x3a23[28]](204)[_0x3a23[27]]()})}}}function handleEntityNotFound(_0xbc37x1a,_0xbc37x1b){return function(_0xbc37x1c){if(!_0xbc37x1c){_0xbc37x1a[_0x3a23[26]](404)};return _0xbc37x1c}}function handleError(_0xbc37x1a,_0xbc37x1b){_0xbc37x1b= _0xbc37x1b|| 500;return function(_0xbc37x2b){logger[_0x3a23[44]](_0xbc37x2b[_0x3a23[43]]);if(_0xbc37x2b[_0x3a23[45]]){delete _0xbc37x2b[_0x3a23[45]]};_0xbc37x1a[_0x3a23[28]](_0xbc37x1b)[_0x3a23[46]](_0xbc37x2b)}}exports[_0x3a23[47]]= function(_0xbc37x2c,_0xbc37x1a){var _0xbc37x1f={raw:true,where:{id:_0xbc37x2c[_0x3a23[49]][_0x3a23[48]]}},_0xbc37x2d={};_0xbc37x2d[_0x3a23[50]]= _[_0x3a23[53]](db[_0x3a23[52]][_0x3a23[51]]);_0xbc37x2d[_0x3a23[54]]= _[_0x3a23[53]](_0xbc37x2c[_0x3a23[54]]);_0xbc37x2d[_0x3a23[55]]= _[_0x3a23[56]](_0xbc37x2d[_0x3a23[50]],_0xbc37x2d[_0x3a23[54]]);_0xbc37x1f[_0x3a23[57]]= _[_0x3a23[56]](_0xbc37x2d[_0x3a23[50]],qs[_0x3a23[58]](_0xbc37x2c[_0x3a23[54]][_0x3a23[58]]));_0xbc37x1f[_0x3a23[57]]= (_0xbc37x1f[_0x3a23[57]][_0x3a23[59]])?_0xbc37x1f[_0x3a23[57]]:_0xbc37x2d[_0x3a23[50]];if(_0xbc37x2c[_0x3a23[54]][_0x3a23[60]]){_0xbc37x1f[_0x3a23[61]]= [{all:true}]};_0xbc37x1f= _[_0x3a23[63]]({},_0xbc37x1f,_0xbc37x2c[_0x3a23[62]]);return db[_0x3a23[52]][_0x3a23[65]](_0xbc37x1f)[_0x3a23[40]](handleEntityNotFound(_0xbc37x1a,null))[_0x3a23[40]](respondWithResult(_0xbc37x1a,null))[_0x3a23[64]](handleError(_0xbc37x1a,null))};exports[_0x3a23[66]]= function(_0xbc37x2c,_0xbc37x1a){return db[_0x3a23[52]][_0x3a23[66]](_0xbc37x2c[_0x3a23[67]],{})[_0x3a23[40]](respondWithResult(_0xbc37x1a,201))[_0x3a23[64]](handleError(_0xbc37x1a,null))};exports[_0x3a23[41]]= function(_0xbc37x2c,_0xbc37x1a){if(_0xbc37x2c[_0x3a23[67]][_0x3a23[48]]){delete _0xbc37x2c[_0x3a23[67]][_0x3a23[48]]};return db[_0x3a23[52]][_0x3a23[65]]({where:{id:_0xbc37x2c[_0x3a23[49]][_0x3a23[48]]}})[_0x3a23[40]](handleEntityNotFound(_0xbc37x1a,null))[_0x3a23[40]](saveUpdates(_0xbc37x2c[_0x3a23[67]],null))[_0x3a23[40]](respondWithResult(_0xbc37x1a,null))[_0x3a23[64]](handleError(_0xbc37x1a,null))};exports[_0x3a23[42]]= function(_0xbc37x2c,_0xbc37x1a){return db[_0x3a23[52]][_0x3a23[65]]({where:{id:_0xbc37x2c[_0x3a23[49]][_0x3a23[48]]}})[_0x3a23[40]](handleEntityNotFound(_0xbc37x1a,null))[_0x3a23[40]](removeEntity(_0xbc37x1a,null))[_0x3a23[64]](handleError(_0xbc37x1a,null))}
\ No newline at end of file
+var _0x69b2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x69b2[0];var jsonpatch=require(_0x69b2[1]);var rp=require(_0x69b2[2]);var moment=require(_0x69b2[3]);var BPromise=require(_0x69b2[4]);var Mustache=require(_0x69b2[5]);var util=require(_0x69b2[6]);var path=require(_0x69b2[7]);var sox=require(_0x69b2[8]);var csv=require(_0x69b2[9]);var ejs=require(_0x69b2[10]);var fs=require(_0x69b2[11]);var _=require(_0x69b2[12]);var squel=require(_0x69b2[13]);var crypto=require(_0x69b2[14]);var jsforce=require(_0x69b2[15]);var deskjs=require(_0x69b2[16]);var toCsv=require(_0x69b2[9]);var querystring=require(_0x69b2[17]);var Papa=require(_0x69b2[18]);var qs=require(_0x69b2[19]);var logger=require(_0x69b2[21])(_0x69b2[20]);var utils=require(_0x69b2[22]);var config=require(_0x69b2[23]);var db=require(_0x69b2[25])[_0x69b2[24]];function respondWithStatusCode(_0x4e61x1a,_0x4e61x1b){_0x4e61x1b= _0x4e61x1b|| 204;return function(_0x4e61x1c){if(_0x4e61x1c){return _0x4e61x1a[_0x69b2[26]](_0x4e61x1b)};return _0x4e61x1a[_0x69b2[28]](_0x4e61x1b)[_0x69b2[27]]()}}function respondWithResult(_0x4e61x1a,_0x4e61x1b){_0x4e61x1b= _0x4e61x1b|| 200;return function(_0x4e61x1c){if(_0x4e61x1c){return _0x4e61x1a[_0x69b2[28]](_0x4e61x1b)[_0x69b2[29]](_0x4e61x1c)}}}function respondWithFilteredResult(_0x4e61x1a,_0x4e61x1f){return function(_0x4e61x1c){if(_0x4e61x1c){var _0x4e61x20=_0x4e61x1c[_0x69b2[30]],_0x4e61x21=_0x4e61x1f[_0x69b2[31]],_0x4e61x22=_0x4e61x1f[_0x69b2[31]]+ _0x4e61x1f[_0x69b2[32]],_0x4e61x1b;if(_0x4e61x22>= _0x4e61x20){_0x4e61x22= _0x4e61x20;_0x4e61x1b= 200}else {_0x4e61x1b= 206};_0x4e61x1a[_0x69b2[28]](_0x4e61x1b);return _0x4e61x1a[_0x69b2[36]](_0x69b2[33],_0x4e61x21+ _0x69b2[34]+ _0x4e61x22+ _0x69b2[35]+ _0x4e61x20)[_0x69b2[29]](_0x4e61x1c)};return null}}function patchUpdates(_0x4e61x24){return function(_0x4e61x1c){try{jsonpatch[_0x69b2[37]](_0x4e61x1c,_0x4e61x24,true)}catch(err){return BPromise[_0x69b2[38]](err)};return _0x4e61x1c[_0x69b2[39]]()}}function saveUpdates(_0x4e61x26,_0x4e61x1b){return function(_0x4e61x1c){if(_0x4e61x1c){return _0x4e61x1c[_0x69b2[41]](_0x4e61x26)[_0x69b2[40]](function(_0x4e61x27){return _0x4e61x27})};return null}}function removeEntity(_0x4e61x1a,_0x4e61x1b){return function(_0x4e61x1c){if(_0x4e61x1c){return _0x4e61x1c[_0x69b2[42]]()[_0x69b2[40]](function(){_0x4e61x1a[_0x69b2[28]](204)[_0x69b2[27]]()})}}}function handleEntityNotFound(_0x4e61x1a,_0x4e61x1b){return function(_0x4e61x1c){if(!_0x4e61x1c){_0x4e61x1a[_0x69b2[26]](404)};return _0x4e61x1c}}function handleError(_0x4e61x1a,_0x4e61x1b){_0x4e61x1b= _0x4e61x1b|| 500;return function(_0x4e61x2b){logger[_0x69b2[44]](_0x4e61x2b[_0x69b2[43]]);if(_0x4e61x2b[_0x69b2[45]]){delete _0x4e61x2b[_0x69b2[45]]};_0x4e61x1a[_0x69b2[28]](_0x4e61x1b)[_0x69b2[46]](_0x4e61x2b)}}exports[_0x69b2[47]]= function(_0x4e61x2c,_0x4e61x1a){var _0x4e61x1f={raw:true,where:{id:_0x4e61x2c[_0x69b2[49]][_0x69b2[48]]}},_0x4e61x2d={};_0x4e61x2d[_0x69b2[50]]= _[_0x69b2[53]](db[_0x69b2[52]][_0x69b2[51]]);_0x4e61x2d[_0x69b2[54]]= _[_0x69b2[53]](_0x4e61x2c[_0x69b2[54]]);_0x4e61x2d[_0x69b2[55]]= _[_0x69b2[56]](_0x4e61x2d[_0x69b2[50]],_0x4e61x2d[_0x69b2[54]]);_0x4e61x1f[_0x69b2[57]]= _[_0x69b2[56]](_0x4e61x2d[_0x69b2[50]],qs[_0x69b2[58]](_0x4e61x2c[_0x69b2[54]][_0x69b2[58]]));_0x4e61x1f[_0x69b2[57]]= (_0x4e61x1f[_0x69b2[57]][_0x69b2[59]])?_0x4e61x1f[_0x69b2[57]]:_0x4e61x2d[_0x69b2[50]];if(_0x4e61x2c[_0x69b2[54]][_0x69b2[60]]){_0x4e61x1f[_0x69b2[61]]= [{all:true}]};_0x4e61x1f= _[_0x69b2[63]]({},_0x4e61x1f,_0x4e61x2c[_0x69b2[62]]);return db[_0x69b2[52]][_0x69b2[65]](_0x4e61x1f)[_0x69b2[40]](handleEntityNotFound(_0x4e61x1a,null))[_0x69b2[40]](respondWithResult(_0x4e61x1a,null))[_0x69b2[64]](handleError(_0x4e61x1a,null))};exports[_0x69b2[66]]= function(_0x4e61x2c,_0x4e61x1a){return db[_0x69b2[52]][_0x69b2[66]](_0x4e61x2c[_0x69b2[67]],{})[_0x69b2[40]](respondWithResult(_0x4e61x1a,201))[_0x69b2[64]](handleError(_0x4e61x1a,null))};exports[_0x69b2[41]]= function(_0x4e61x2c,_0x4e61x1a){if(_0x4e61x2c[_0x69b2[67]][_0x69b2[48]]){delete _0x4e61x2c[_0x69b2[67]][_0x69b2[48]]};return db[_0x69b2[52]][_0x69b2[65]]({where:{id:_0x4e61x2c[_0x69b2[49]][_0x69b2[48]]}})[_0x69b2[40]](handleEntityNotFound(_0x4e61x1a,null))[_0x69b2[40]](saveUpdates(_0x4e61x2c[_0x69b2[67]],null))[_0x69b2[40]](respondWithResult(_0x4e61x1a,null))[_0x69b2[64]](handleError(_0x4e61x1a,null))};exports[_0x69b2[42]]= function(_0x4e61x2c,_0x4e61x1a){return db[_0x69b2[52]][_0x69b2[65]]({where:{id:_0x4e61x2c[_0x69b2[49]][_0x69b2[48]]}})[_0x69b2[40]](handleEntityNotFound(_0x4e61x1a,null))[_0x69b2[40]](removeEntity(_0x4e61x1a,null))[_0x69b2[64]](handleError(_0x4e61x1a,null))}
\ No newline at end of file
index afdedac..935aa78 100644 (file)
@@ -1 +1 @@
-var _0x7245=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x68\x61\x74\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x7245[0];var _=require(_0x7245[1]);var util=require(_0x7245[2]);var logger=require(_0x7245[4])(_0x7245[3]);var moment=require(_0x7245[5]);var BPromise=require(_0x7245[6]);var rp=require(_0x7245[7]);var attributes=require(_0x7245[8]);module[_0x7245[9]]= function(_0xee9dx8,_0xee9dx9){return _0xee9dx8[_0x7245[12]](_0x7245[10],attributes,{tableName:_0x7245[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x971b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x68\x61\x74\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x971b[0];var _=require(_0x971b[1]);var util=require(_0x971b[2]);var logger=require(_0x971b[4])(_0x971b[3]);var moment=require(_0x971b[5]);var BPromise=require(_0x971b[6]);var rp=require(_0x971b[7]);var attributes=require(_0x971b[8]);module[_0x971b[9]]= function(_0x25c2x8,_0x25c2x9){return _0x25c2x8[_0x971b[12]](_0x971b[10],attributes,{tableName:_0x971b[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 673e696..35e4403 100644 (file)
@@ -1 +1 @@
-var _0x592f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x592f[0];var _=require(_0x592f[1]);var util=require(_0x592f[2]);var moment=require(_0x592f[3]);var BPromise=require(_0x592f[4]);var rs=require(_0x592f[5]);var fs=require(_0x592f[6]);var db=require(_0x592f[8])[_0x592f[7]];var utils=require(_0x592f[9]);var logger=require(_0x592f[11])(_0x592f[10]);var config=require(_0x592f[12]);var jayson=require(_0x592f[13]);var client=jayson[_0x592f[15]][_0x592f[14]]({port:9002});function respondWithRpcPromise(_0x3852xe,_0x3852xf,_0x3852x10){return  new BPromise(function(_0x3852x11,_0x3852x12){return client[_0x592f[28]](_0x3852xe,_0x3852x10)[_0x592f[27]](function(_0x3852x14){logger[_0x592f[20]](_0x592f[16],_0x3852xf,_0x592f[19]);logger[_0x592f[23]](_0x592f[21],_0x3852xf,_0x592f[19],JSON[_0x592f[22]](_0x3852x14));if(_0x3852x14[_0x592f[17]]){if(_0x3852x14[_0x592f[17]][_0x592f[24]]=== 500){logger[_0x592f[17]](_0x592f[16],_0x3852xf,_0x3852x14[_0x592f[17]][_0x592f[25]]);return _0x3852x12(_0x3852x14[_0x592f[17]][_0x592f[25]])};logger[_0x592f[17]](_0x592f[16],_0x3852xf,_0x3852x14[_0x592f[17]][_0x592f[25]]);return _0x3852x11(_0x3852x14[_0x592f[17]][_0x592f[25]])}else {logger[_0x592f[20]](_0x592f[16],_0x3852xf,_0x592f[19]);_0x3852x11(_0x3852x14[_0x592f[26]][_0x592f[25]])}})[_0x592f[18]](function(_0x3852x13){logger[_0x592f[17]](_0x592f[16],_0x3852xf,_0x3852x13);_0x3852x12(_0x3852x13)})})}
\ No newline at end of file
+var _0x31a3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x31a3[0];var _=require(_0x31a3[1]);var util=require(_0x31a3[2]);var moment=require(_0x31a3[3]);var BPromise=require(_0x31a3[4]);var rs=require(_0x31a3[5]);var fs=require(_0x31a3[6]);var db=require(_0x31a3[8])[_0x31a3[7]];var utils=require(_0x31a3[9]);var logger=require(_0x31a3[11])(_0x31a3[10]);var config=require(_0x31a3[12]);var jayson=require(_0x31a3[13]);var client=jayson[_0x31a3[15]][_0x31a3[14]]({port:9002});function respondWithRpcPromise(_0xa3f1xe,_0xa3f1xf,_0xa3f1x10){return  new BPromise(function(_0xa3f1x11,_0xa3f1x12){return client[_0x31a3[28]](_0xa3f1xe,_0xa3f1x10)[_0x31a3[27]](function(_0xa3f1x14){logger[_0x31a3[20]](_0x31a3[16],_0xa3f1xf,_0x31a3[19]);logger[_0x31a3[23]](_0x31a3[21],_0xa3f1xf,_0x31a3[19],JSON[_0x31a3[22]](_0xa3f1x14));if(_0xa3f1x14[_0x31a3[17]]){if(_0xa3f1x14[_0x31a3[17]][_0x31a3[24]]=== 500){logger[_0x31a3[17]](_0x31a3[16],_0xa3f1xf,_0xa3f1x14[_0x31a3[17]][_0x31a3[25]]);return _0xa3f1x12(_0xa3f1x14[_0x31a3[17]][_0x31a3[25]])};logger[_0x31a3[17]](_0x31a3[16],_0xa3f1xf,_0xa3f1x14[_0x31a3[17]][_0x31a3[25]]);return _0xa3f1x11(_0xa3f1x14[_0x31a3[17]][_0x31a3[25]])}else {logger[_0x31a3[20]](_0x31a3[16],_0xa3f1xf,_0x31a3[19]);_0xa3f1x11(_0xa3f1x14[_0x31a3[26]][_0x31a3[25]])}})[_0x31a3[18]](function(_0xa3f1x13){logger[_0x31a3[17]](_0x31a3[16],_0xa3f1xf,_0xa3f1x13);_0xa3f1x12(_0xa3f1x13)})})}
\ No newline at end of file
index 3105a54..03bfe51 100644 (file)
@@ -1 +1 @@
-var _0xe63b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x73\x68\x6F\x77","\x67\x65\x74","\x2F","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xe63b[0];var multer=require(_0xe63b[1]);var util=require(_0xe63b[2]);var path=require(_0xe63b[3]);var express=require(_0xe63b[4]);var router=express.Router();var auth=require(_0xe63b[5]);var interaction=require(_0xe63b[6]);var config=require(_0xe63b[7]);var controller=require(_0xe63b[8]);router[_0xe63b[12]](_0xe63b[9],auth[_0xe63b[10]](),controller[_0xe63b[11]]);router[_0xe63b[15]](_0xe63b[13],auth[_0xe63b[10]](),controller[_0xe63b[14]]);router[_0xe63b[17]](_0xe63b[9],auth[_0xe63b[10]](),controller[_0xe63b[16]]);router[_0xe63b[19]](_0xe63b[9],auth[_0xe63b[10]](),controller[_0xe63b[18]]);module[_0xe63b[20]]= router
\ No newline at end of file
+var _0x3bfb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x73\x68\x6F\x77","\x67\x65\x74","\x2F","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x3bfb[0];var multer=require(_0x3bfb[1]);var util=require(_0x3bfb[2]);var path=require(_0x3bfb[3]);var express=require(_0x3bfb[4]);var router=express.Router();var auth=require(_0x3bfb[5]);var interaction=require(_0x3bfb[6]);var config=require(_0x3bfb[7]);var controller=require(_0x3bfb[8]);router[_0x3bfb[12]](_0x3bfb[9],auth[_0x3bfb[10]](),controller[_0x3bfb[11]]);router[_0x3bfb[15]](_0x3bfb[13],auth[_0x3bfb[10]](),controller[_0x3bfb[14]]);router[_0x3bfb[17]](_0x3bfb[9],auth[_0x3bfb[10]](),controller[_0x3bfb[16]]);router[_0x3bfb[19]](_0x3bfb[9],auth[_0x3bfb[10]](),controller[_0x3bfb[18]]);module[_0x3bfb[20]]= router
\ No newline at end of file
index 71b2c78..b12dbee 100644 (file)
@@ -1 +1 @@
-var _0x4f0a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x4f0a[0];var Sequelize=require(_0x4f0a[1]);module[_0x4f0a[2]]= {name:{type:Sequelize[_0x4f0a[3]],allowNull:false},description:{type:Sequelize[_0x4f0a[3]]},write:{type:Sequelize[_0x4f0a[4]],defaultValue:true}}
\ No newline at end of file
+var _0x99ae=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x99ae[0];var Sequelize=require(_0x99ae[1]);module[_0x99ae[2]]= {name:{type:Sequelize[_0x99ae[3]],allowNull:false},description:{type:Sequelize[_0x99ae[3]]},write:{type:Sequelize[_0x99ae[4]],defaultValue:true}}
\ No newline at end of file
index 8a22b1a..9ed4df3 100644 (file)
@@ -1 +1 @@
-var _0xaa13=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x47\x72\x6F\x75\x70\x2E\x73\x6F\x63\x6B\x65\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x47\x72\x6F\x75\x70\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x47\x72\x6F\x75\x70\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x47\x72\x6F\x75\x70","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x55\x6E\x72\x65\x61\x64","\x74\x6F\x49\x6E\x74\x65\x67\x65\x72","\x75\x73\x65\x72","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65","\x61\x64\x64\x4D\x65\x6D\x62\x65\x72\x73","\x69\x64\x73","\x6F\x6D\x69\x74","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x55\x73\x65\x72","\x66\x69\x6E\x64\x4F\x6E\x65","\x72\x65\x6D\x6F\x76\x65\x4D\x65\x6D\x62\x65\x72\x73","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x47\x72\x6F\x75\x70\x49\x64","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x24\x67\x74\x65","\x2C","\x73\x70\x6C\x69\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74"];_0xaa13[0];var jsonpatch=require(_0xaa13[1]);var rp=require(_0xaa13[2]);var moment=require(_0xaa13[3]);var BPromise=require(_0xaa13[4]);var Mustache=require(_0xaa13[5]);var util=require(_0xaa13[6]);var path=require(_0xaa13[7]);var sox=require(_0xaa13[8]);var csv=require(_0xaa13[9]);var ejs=require(_0xaa13[10]);var fs=require(_0xaa13[11]);var _=require(_0xaa13[12]);var squel=require(_0xaa13[13]);var crypto=require(_0xaa13[14]);var jsforce=require(_0xaa13[15]);var deskjs=require(_0xaa13[16]);var toCsv=require(_0xaa13[9]);var querystring=require(_0xaa13[17]);var Papa=require(_0xaa13[18]);var qs=require(_0xaa13[19]);var logger=require(_0xaa13[21])(_0xaa13[20]);var utils=require(_0xaa13[22]);var config=require(_0xaa13[23]);var db=require(_0xaa13[25])[_0xaa13[24]];var socket=require(_0xaa13[27])({host:_0xaa13[26],port:6379});require(_0xaa13[29])[_0xaa13[28]](socket);var jayson=require(_0xaa13[30]);var client=jayson[_0xaa13[32]][_0xaa13[31]]({port:9002});function respondWithRpcPromise(_0x664ex1d,_0x664ex1e,_0x664ex1f,_0x664ex20){return  new BPromise(function(_0x664ex21,_0x664ex22){var _0x664ex23=(_0x664ex20|| client);return _0x664ex23[_0xaa13[45]](_0x664ex1d,_0x664ex1f)[_0xaa13[44]](function(_0x664ex25){logger[_0xaa13[37]](_0xaa13[33],_0x664ex1e,_0xaa13[36]);logger[_0xaa13[40]](_0xaa13[38],_0x664ex1e,_0xaa13[36],JSON[_0xaa13[39]](_0x664ex25));if(_0x664ex25[_0xaa13[34]]){if(_0x664ex25[_0xaa13[34]][_0xaa13[41]]=== 500){logger[_0xaa13[34]](_0xaa13[33],_0x664ex1e,_0x664ex25[_0xaa13[34]][_0xaa13[42]]);return _0x664ex22(_0x664ex25[_0xaa13[34]][_0xaa13[42]])};logger[_0xaa13[34]](_0xaa13[33],_0x664ex1e,_0x664ex25[_0xaa13[34]][_0xaa13[42]]);return _0x664ex21(_0x664ex25[_0xaa13[34]][_0xaa13[42]])}else {logger[_0xaa13[37]](_0xaa13[33],_0x664ex1e,_0xaa13[36]);_0x664ex21(_0x664ex25[_0xaa13[43]][_0xaa13[42]])}})[_0xaa13[35]](function(_0x664ex24){logger[_0xaa13[34]](_0xaa13[33],_0x664ex1e,_0x664ex24);_0x664ex22(_0x664ex24)})})}function respondWithStatusCode(_0x664ex25,_0x664ex27){_0x664ex27= _0x664ex27|| 204;return function(_0x664ex28){if(_0x664ex28){return _0x664ex25[_0xaa13[46]](_0x664ex27)};return _0x664ex25[_0xaa13[48]](_0x664ex27)[_0xaa13[47]]()}}function respondWithResult(_0x664ex25,_0x664ex27){_0x664ex27= _0x664ex27|| 200;return function(_0x664ex28){if(_0x664ex28){return _0x664ex25[_0xaa13[48]](_0x664ex27)[_0xaa13[49]](_0x664ex28)}}}function respondWithFilteredResult(_0x664ex25,_0x664ex2b){return function(_0x664ex28){if(_0x664ex28){var _0x664ex2c=_0x664ex28[_0xaa13[50]],_0x664ex2d=_0x664ex2b[_0xaa13[51]],_0x664ex2e=_0x664ex2b[_0xaa13[51]]+ _0x664ex2b[_0xaa13[52]],_0x664ex27;if(_0x664ex2e>= _0x664ex2c){_0x664ex2e= _0x664ex2c;_0x664ex27= 200}else {_0x664ex27= 206};_0x664ex25[_0xaa13[48]](_0x664ex27);return _0x664ex25[_0xaa13[56]](_0xaa13[53],_0x664ex2d+ _0xaa13[54]+ _0x664ex2e+ _0xaa13[55]+ _0x664ex2c)[_0xaa13[49]](_0x664ex28)};return null}}function patchUpdates(_0x664ex30){return function(_0x664ex28){try{jsonpatch[_0xaa13[57]](_0x664ex28,_0x664ex30,true)}catch(err){return BPromise[_0xaa13[58]](err)};return _0x664ex28[_0xaa13[59]]()}}function saveUpdates(_0x664ex32,_0x664ex27){return function(_0x664ex28){if(_0x664ex28){return _0x664ex28[_0xaa13[60]](_0x664ex32)[_0xaa13[44]](function(_0x664ex33){return _0x664ex33})};return null}}function removeEntity(_0x664ex25,_0x664ex27){return function(_0x664ex28){if(_0x664ex28){return _0x664ex28[_0xaa13[61]]()[_0xaa13[44]](function(){_0x664ex25[_0xaa13[48]](204)[_0xaa13[47]]()})}}}function handleEntityNotFound(_0x664ex25,_0x664ex27){return function(_0x664ex28){if(!_0x664ex28){_0x664ex25[_0xaa13[46]](404)};return _0x664ex28}}function handleError(_0x664ex25,_0x664ex27){_0x664ex27= _0x664ex27|| 500;return function(_0x664ex24){logger[_0xaa13[34]](_0x664ex24[_0xaa13[62]]);if(_0x664ex24[_0xaa13[63]]){delete _0x664ex24[_0xaa13[63]]};_0x664ex25[_0xaa13[48]](_0x664ex27)[_0xaa13[64]](_0x664ex24)}}exports[_0xaa13[65]]= function(_0x664ex1f,_0x664ex25){var _0x664ex2b={},_0x664ex37={},_0x664ex38={count:0,rows:[]};_0x664ex37[_0xaa13[66]]= _[_0xaa13[69]](db[_0xaa13[68]][_0xaa13[67]]);var _0x664ex39={dateStart:_0x664ex1f[_0xaa13[71]][_0xaa13[70]],dateEnd:_0x664ex1f[_0xaa13[71]][_0xaa13[72]]};delete _0x664ex1f[_0xaa13[71]][_0xaa13[70]];delete _0x664ex1f[_0xaa13[71]][_0xaa13[72]];_0x664ex37[_0xaa13[71]]= _[_0xaa13[69]](_0x664ex1f[_0xaa13[71]]);_0x664ex37[_0xaa13[73]]= _[_0xaa13[74]](_0x664ex37[_0xaa13[66]],_0x664ex37[_0xaa13[71]]);_0x664ex2b[_0xaa13[75]]= _[_0xaa13[74]](_0x664ex37[_0xaa13[66]],qs[_0xaa13[76]](_0x664ex1f[_0xaa13[71]][_0xaa13[76]]));_0x664ex2b[_0xaa13[75]]= (_0x664ex2b[_0xaa13[75]][_0xaa13[77]])?_0x664ex2b[_0xaa13[75]]:_0x664ex37[_0xaa13[66]];if(!_0x664ex1f[_0xaa13[71]][_0xaa13[79]](_0xaa13[78])){_0x664ex2b[_0xaa13[52]]= qs[_0xaa13[52]](_0x664ex1f[_0xaa13[71]][_0xaa13[52]]);_0x664ex2b[_0xaa13[51]]= qs[_0xaa13[51]](_0x664ex1f[_0xaa13[71]][_0xaa13[51]])};_0x664ex2b[_0xaa13[80]]= qs[_0xaa13[81]](_0x664ex1f[_0xaa13[71]][_0xaa13[81]]);_0x664ex2b[_0xaa13[82]]= qs[_0xaa13[73]](_[_0xaa13[83]](_0x664ex1f[_0xaa13[71]],_0x664ex37[_0xaa13[73]]));if(_0x664ex39[_0xaa13[70]]){if(_0x664ex39[_0xaa13[72]]){_0x664ex39[_0xaa13[72]]= moment(_0x664ex39[_0xaa13[72]])[_0xaa13[85]](1,_0xaa13[84])}else {_0x664ex39[_0xaa13[72]]= moment(_0x664ex39[_0xaa13[70]])[_0xaa13[85]](1,_0xaa13[84])};_[_0xaa13[86]](_0x664ex2b[_0xaa13[82]],{createdAt:{$gte:_0x664ex39[_0xaa13[70]],$lte:_0x664ex39[_0xaa13[72]]}})};if(_0x664ex1f[_0xaa13[71]][_0xaa13[87]]){_0x664ex2b[_0xaa13[82]]= _[_0xaa13[86]](_0x664ex2b[_0xaa13[82]],{$or:_[_0xaa13[89]](_0x664ex2b[_0xaa13[75]],function(_0x664ex3a){var _0x664ex38={};_0x664ex38[_0x664ex3a]= {$like:_0xaa13[88]+ _0x664ex1f[_0xaa13[71]][_0xaa13[87]]+ _0xaa13[88]};return _0x664ex38})})};_0x664ex2b= _[_0xaa13[86]]({},_0x664ex2b,_0x664ex1f[_0xaa13[90]]);var _0x664ex3b={where:_0x664ex2b[_0xaa13[82]]};return db[_0xaa13[68]][_0xaa13[50]](_0x664ex3b)[_0xaa13[44]](function(_0x664ex2c){_0x664ex38[_0xaa13[50]]= _0x664ex2c;if(_0x664ex1f[_0xaa13[71]][_0xaa13[92]]){_0x664ex2b[_0xaa13[93]]= [{all:true}]};return db[_0xaa13[68]][_0xaa13[94]](_0x664ex2b)})[_0xaa13[44]](function(_0x664ex3c){_0x664ex38[_0xaa13[91]]= _0x664ex3c;return _0x664ex38})[_0xaa13[44]](respondWithFilteredResult(_0x664ex25,_0x664ex2b))[_0xaa13[35]](handleError(_0x664ex25,null))};exports[_0xaa13[95]]= function(_0x664ex1f,_0x664ex25){var _0x664ex2b={raw:true,where:{id:_0x664ex1f[_0xaa13[97]][_0xaa13[96]]}},_0x664ex37={};_0x664ex37[_0xaa13[66]]= _[_0xaa13[69]](db[_0xaa13[68]][_0xaa13[67]]);_0x664ex37[_0xaa13[71]]= _[_0xaa13[69]](_0x664ex1f[_0xaa13[71]]);_0x664ex37[_0xaa13[73]]= _[_0xaa13[74]](_0x664ex37[_0xaa13[66]],_0x664ex37[_0xaa13[71]]);_0x664ex2b[_0xaa13[75]]= _[_0xaa13[74]](_0x664ex37[_0xaa13[66]],qs[_0xaa13[76]](_0x664ex1f[_0xaa13[71]][_0xaa13[76]]));_0x664ex2b[_0xaa13[75]]= (_0x664ex2b[_0xaa13[75]][_0xaa13[77]])?_0x664ex2b[_0xaa13[75]]:_0x664ex37[_0xaa13[66]];if(_0x664ex1f[_0xaa13[71]][_0xaa13[92]]){_0x664ex2b[_0xaa13[93]]= [{all:true}]};_0x664ex2b= _[_0xaa13[86]]({},_0x664ex2b,_0x664ex1f[_0xaa13[90]]);return db[_0xaa13[68]][_0xaa13[98]](_0x664ex2b)[_0xaa13[44]](handleEntityNotFound(_0x664ex25,null))[_0xaa13[44]](respondWithResult(_0x664ex25,null))[_0xaa13[35]](handleError(_0x664ex25,null))};exports[_0xaa13[99]]= function(_0x664ex1f,_0x664ex25){return db[_0xaa13[68]][_0xaa13[99]](_0x664ex1f[_0xaa13[100]],{})[_0xaa13[44]](respondWithResult(_0x664ex25,201))[_0xaa13[35]](handleError(_0x664ex25,null))};exports[_0xaa13[60]]= function(_0x664ex1f,_0x664ex25){if(_0x664ex1f[_0xaa13[100]][_0xaa13[96]]){delete _0x664ex1f[_0xaa13[100]][_0xaa13[96]]};return db[_0xaa13[68]][_0xaa13[98]]({where:{id:_0x664ex1f[_0xaa13[97]][_0xaa13[96]]}})[_0xaa13[44]](handleEntityNotFound(_0x664ex25,null))[_0xaa13[44]](saveUpdates(_0x664ex1f[_0xaa13[100]],null))[_0xaa13[44]](respondWithResult(_0x664ex25,null))[_0xaa13[35]](handleError(_0x664ex25,null))};exports[_0xaa13[61]]= function(_0x664ex1f,_0x664ex25){return db[_0xaa13[68]][_0xaa13[98]]({where:{id:_0x664ex1f[_0xaa13[97]][_0xaa13[96]]}})[_0xaa13[44]](handleEntityNotFound(_0x664ex25,null))[_0xaa13[44]](removeEntity(_0x664ex25,null))[_0xaa13[35]](handleError(_0x664ex25,null))};exports[_0xaa13[101]]= function(_0x664ex1f,_0x664ex25){return db[_0xaa13[68]][_0xaa13[101]]()[_0xaa13[44]](respondWithResult(_0x664ex25,null))[_0xaa13[35]](handleError(_0x664ex25,null))};exports[_0xaa13[102]]= function(_0x664ex1f,_0x664ex25,_0x664ex3d){return db[_0xaa13[105]][_0xaa13[50]]({where:{ChatGroupId:_0x664ex1f[_0xaa13[97]][_0xaa13[96]],ToId:_0x664ex1f[_0xaa13[104]][_0xaa13[96]],read:false}})[_0xaa13[44]](function(_0x664ex2c){return {id:_[_0xaa13[103]](_0x664ex1f[_0xaa13[97]][_0xaa13[96]]),count:_0x664ex2c}})[_0xaa13[44]](respondWithResult(_0x664ex25,null))[_0xaa13[35]](handleError(_0x664ex25,null))};exports[_0xaa13[106]]= function(_0x664ex1f,_0x664ex25,_0x664ex3d){return db[_0xaa13[68]][_0xaa13[98]]({where:{id:_0x664ex1f[_0xaa13[97]][_0xaa13[96]]}})[_0xaa13[44]](handleEntityNotFound(_0x664ex25,null))[_0xaa13[44]](function(_0x664ex28){if(_0x664ex28){return _0x664ex28[_0xaa13[106]](_0x664ex1f[_0xaa13[100]][_0xaa13[107]],_[_0xaa13[108]](_0x664ex1f[_0xaa13[100]],[_0xaa13[107],_0xaa13[96]])|| {})}})[_0xaa13[44]](respondWithResult(_0x664ex25,null))[_0xaa13[35]](handleError(_0x664ex25,null))};exports[_0xaa13[109]]= function(_0x664ex1f,_0x664ex28,_0x664ex3d){var _0x664ex2b={};var _0x664ex37={};var _0x664ex3e;var _0x664ex2c;return db[_0xaa13[68]][_0xaa13[111]]({where:{id:_0x664ex1f[_0xaa13[97]][_0xaa13[96]]}})[_0xaa13[44]](handleEntityNotFound(_0x664ex28,null))[_0xaa13[44]](function(_0x664ex28){if(_0x664ex28){_0x664ex3e= _0x664ex28;_0x664ex37[_0xaa13[66]]= _[_0xaa13[69]](db[_0xaa13[110]][_0xaa13[67]]);_0x664ex37[_0xaa13[71]]= _[_0xaa13[69]](_0x664ex1f[_0xaa13[71]]);_0x664ex37[_0xaa13[73]]= _[_0xaa13[74]](_0x664ex37[_0xaa13[66]],_0x664ex37[_0xaa13[71]]);_0x664ex2b[_0xaa13[75]]= _[_0xaa13[74]](_0x664ex37[_0xaa13[66]],qs[_0xaa13[76]](_0x664ex1f[_0xaa13[71]][_0xaa13[76]]));_0x664ex2b[_0xaa13[75]]= (_0x664ex2b[_0xaa13[75]][_0xaa13[77]])?_0x664ex2b[_0xaa13[75]]:_0x664ex37[_0xaa13[66]];_0x664ex2b[_0xaa13[80]]= qs[_0xaa13[81]](_0x664ex1f[_0xaa13[71]][_0xaa13[81]]);_0x664ex2b[_0xaa13[82]]= qs[_0xaa13[73]](_[_0xaa13[83]](_0x664ex1f[_0xaa13[71]],_0x664ex37[_0xaa13[73]]));if(_0x664ex1f[_0xaa13[71]][_0xaa13[87]]){_0x664ex2b[_0xaa13[82]]= _[_0xaa13[86]](_0x664ex2b[_0xaa13[82]],{$or:_[_0xaa13[89]](_0x664ex2b[_0xaa13[75]],function(_0x664ex3a){var _0x664ex38={};_0x664ex38[_0x664ex3a]= {$like:_0xaa13[88]+ _0x664ex1f[_0xaa13[71]][_0xaa13[87]]+ _0xaa13[88]};return _0x664ex38})})};_0x664ex2b= _[_0xaa13[86]]({},_0x664ex2b,_0x664ex1f[_0xaa13[90]]);return _0x664ex3e[_0xaa13[109]](_0x664ex2b)}})[_0xaa13[44]](function(_0x664ex3f){if(_0x664ex3f){_0x664ex2c= _0x664ex3f[_0xaa13[77]];if(!_0x664ex1f[_0xaa13[71]][_0xaa13[79]](_0xaa13[78])){_0x664ex2b[_0xaa13[52]]= qs[_0xaa13[52]](_0x664ex1f[_0xaa13[71]][_0xaa13[52]]);_0x664ex2b[_0xaa13[51]]= qs[_0xaa13[51]](_0x664ex1f[_0xaa13[71]][_0xaa13[51]])};return _0x664ex3e[_0xaa13[109]](_0x664ex2b)}})[_0xaa13[44]](function(_0x664ex3c){if(_0x664ex3c){return _0x664ex3c?{count:_0x664ex2c,rows:_0x664ex3c}:null}})[_0xaa13[44]](respondWithResult(_0x664ex28,null))[_0xaa13[35]](handleError(_0x664ex28,null))};exports[_0xaa13[112]]= function(_0x664ex1f,_0x664ex25,_0x664ex3d){var _0x664ex3f;return db[_0xaa13[68]][_0xaa13[98]]({where:{id:_0x664ex1f[_0xaa13[97]][_0xaa13[96]]}})[_0xaa13[44]](handleEntityNotFound(_0x664ex25,null))[_0xaa13[44]](function(_0x664ex28){if(_0x664ex28){return _0x664ex28[_0xaa13[112]](_0x664ex1f[_0xaa13[71]][_0xaa13[107]])}})[_0xaa13[44]](respondWithStatusCode(_0x664ex25,null))[_0xaa13[35]](handleError(_0x664ex25,null))};exports[_0xaa13[113]]= function(_0x664ex1f,_0x664ex25,_0x664ex3d){if(_0x664ex1f[_0xaa13[100]][_0xaa13[96]]){delete _0x664ex1f[_0xaa13[100]][_0xaa13[96]]};return db[_0xaa13[68]][_0xaa13[98]]({where:{id:_0x664ex1f[_0xaa13[97]][_0xaa13[96]]}})[_0xaa13[44]](handleEntityNotFound(_0x664ex25,null))[_0xaa13[44]](function(_0x664ex28){if(_0x664ex28){_0x664ex1f[_0xaa13[100]][_0xaa13[114]]= _0x664ex28[_0xaa13[96]];return db[_0xaa13[105]][_0xaa13[99]](_0x664ex1f[_0xaa13[100]])}})[_0xaa13[44]](respondWithResult(_0x664ex25,null))[_0xaa13[35]](handleError(_0x664ex25,null))};exports[_0xaa13[115]]= function(_0x664ex1f,_0x664ex28,_0x664ex3d){var _0x664ex2b={};var _0x664ex37={};var _0x664ex3e;var _0x664ex2c;return db[_0xaa13[68]][_0xaa13[111]]({where:{id:_0x664ex1f[_0xaa13[97]][_0xaa13[96]]}})[_0xaa13[44]](handleEntityNotFound(_0x664ex28,null))[_0xaa13[44]](function(_0x664ex28){if(_0x664ex28){_0x664ex3e= _0x664ex28;_0x664ex37[_0xaa13[66]]= _[_0xaa13[69]](db[_0xaa13[105]][_0xaa13[67]]);_0x664ex37[_0xaa13[71]]= _[_0xaa13[69]](_0x664ex1f[_0xaa13[71]]);_0x664ex37[_0xaa13[73]]= _[_0xaa13[74]](_0x664ex37[_0xaa13[66]],_0x664ex37[_0xaa13[71]]);_0x664ex2b[_0xaa13[75]]= _[_0xaa13[74]](_0x664ex37[_0xaa13[66]],qs[_0xaa13[76]](_0x664ex1f[_0xaa13[71]][_0xaa13[76]]));_0x664ex2b[_0xaa13[75]]= (_0x664ex2b[_0xaa13[75]][_0xaa13[77]])?_0x664ex2b[_0xaa13[75]]:_0x664ex37[_0xaa13[66]];_0x664ex2b[_0xaa13[80]]= qs[_0xaa13[81]](_0x664ex1f[_0xaa13[71]][_0xaa13[81]]);_0x664ex2b[_0xaa13[82]]= qs[_0xaa13[73]](_[_0xaa13[83]](_0x664ex1f[_0xaa13[71]],_0x664ex37[_0xaa13[73]]));if(_0x664ex1f[_0xaa13[71]][_0xaa13[87]]){_0x664ex2b[_0xaa13[82]]= _[_0xaa13[86]](_0x664ex2b[_0xaa13[82]],{$or:_[_0xaa13[89]](_0x664ex2b[_0xaa13[75]],function(_0x664ex3a){var _0x664ex38={};_0x664ex38[_0x664ex3a]= {$like:_0xaa13[88]+ _0x664ex1f[_0xaa13[71]][_0xaa13[87]]+ _0xaa13[88]};return _0x664ex38})})};if(_0x664ex1f[_0xaa13[71]][_0xaa13[116]]){var _0x664ex40=_0x664ex1f[_0xaa13[71]][_0xaa13[116]][_0xaa13[118]](_0xaa13[117]);var _0x664ex38={};_0x664ex38[_0x664ex40[0]]= {$gte:moment(_0x664ex40[1])[_0xaa13[120]](_0xaa13[119])};_0x664ex2b[_0xaa13[82]]= _[_0xaa13[86]](_0x664ex2b[_0xaa13[82]],_0x664ex38)};_0x664ex2b= _[_0xaa13[86]]({},_0x664ex2b,_0x664ex1f[_0xaa13[90]]);return _0x664ex3e[_0xaa13[115]](_0x664ex2b)}})[_0xaa13[44]](function(_0x664ex3f){if(_0x664ex3f){_0x664ex2c= _0x664ex3f[_0xaa13[77]];if(!_0x664ex1f[_0xaa13[71]][_0xaa13[79]](_0xaa13[78])){_0x664ex2b[_0xaa13[52]]= qs[_0xaa13[52]](_0x664ex1f[_0xaa13[71]][_0xaa13[52]]);_0x664ex2b[_0xaa13[51]]= qs[_0xaa13[51]](_0x664ex1f[_0xaa13[71]][_0xaa13[51]])};return _0x664ex3e[_0xaa13[115]](_0x664ex2b)}})[_0xaa13[44]](function(_0x664ex3c){if(_0x664ex3c){return _0x664ex3c?{count:_0x664ex2c,rows:_0x664ex3c}:null}})[_0xaa13[44]](respondWithResult(_0x664ex28,null))[_0xaa13[35]](handleError(_0x664ex28,null))}
\ No newline at end of file
+var _0x9453=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x47\x72\x6F\x75\x70\x2E\x73\x6F\x63\x6B\x65\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x47\x72\x6F\x75\x70\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x47\x72\x6F\x75\x70\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x47\x72\x6F\x75\x70","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x55\x6E\x72\x65\x61\x64","\x74\x6F\x49\x6E\x74\x65\x67\x65\x72","\x75\x73\x65\x72","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65","\x61\x64\x64\x4D\x65\x6D\x62\x65\x72\x73","\x69\x64\x73","\x6F\x6D\x69\x74","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x55\x73\x65\x72","\x66\x69\x6E\x64\x4F\x6E\x65","\x72\x65\x6D\x6F\x76\x65\x4D\x65\x6D\x62\x65\x72\x73","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x47\x72\x6F\x75\x70\x49\x64","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x24\x67\x74\x65","\x2C","\x73\x70\x6C\x69\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74"];_0x9453[0];var jsonpatch=require(_0x9453[1]);var rp=require(_0x9453[2]);var moment=require(_0x9453[3]);var BPromise=require(_0x9453[4]);var Mustache=require(_0x9453[5]);var util=require(_0x9453[6]);var path=require(_0x9453[7]);var sox=require(_0x9453[8]);var csv=require(_0x9453[9]);var ejs=require(_0x9453[10]);var fs=require(_0x9453[11]);var _=require(_0x9453[12]);var squel=require(_0x9453[13]);var crypto=require(_0x9453[14]);var jsforce=require(_0x9453[15]);var deskjs=require(_0x9453[16]);var toCsv=require(_0x9453[9]);var querystring=require(_0x9453[17]);var Papa=require(_0x9453[18]);var qs=require(_0x9453[19]);var logger=require(_0x9453[21])(_0x9453[20]);var utils=require(_0x9453[22]);var config=require(_0x9453[23]);var db=require(_0x9453[25])[_0x9453[24]];var socket=require(_0x9453[27])({host:_0x9453[26],port:6379});require(_0x9453[29])[_0x9453[28]](socket);var jayson=require(_0x9453[30]);var client=jayson[_0x9453[32]][_0x9453[31]]({port:9002});function respondWithRpcPromise(_0xba6cx1d,_0xba6cx1e,_0xba6cx1f,_0xba6cx20){return  new BPromise(function(_0xba6cx21,_0xba6cx22){var _0xba6cx23=(_0xba6cx20|| client);return _0xba6cx23[_0x9453[45]](_0xba6cx1d,_0xba6cx1f)[_0x9453[44]](function(_0xba6cx25){logger[_0x9453[37]](_0x9453[33],_0xba6cx1e,_0x9453[36]);logger[_0x9453[40]](_0x9453[38],_0xba6cx1e,_0x9453[36],JSON[_0x9453[39]](_0xba6cx25));if(_0xba6cx25[_0x9453[34]]){if(_0xba6cx25[_0x9453[34]][_0x9453[41]]=== 500){logger[_0x9453[34]](_0x9453[33],_0xba6cx1e,_0xba6cx25[_0x9453[34]][_0x9453[42]]);return _0xba6cx22(_0xba6cx25[_0x9453[34]][_0x9453[42]])};logger[_0x9453[34]](_0x9453[33],_0xba6cx1e,_0xba6cx25[_0x9453[34]][_0x9453[42]]);return _0xba6cx21(_0xba6cx25[_0x9453[34]][_0x9453[42]])}else {logger[_0x9453[37]](_0x9453[33],_0xba6cx1e,_0x9453[36]);_0xba6cx21(_0xba6cx25[_0x9453[43]][_0x9453[42]])}})[_0x9453[35]](function(_0xba6cx24){logger[_0x9453[34]](_0x9453[33],_0xba6cx1e,_0xba6cx24);_0xba6cx22(_0xba6cx24)})})}function respondWithStatusCode(_0xba6cx25,_0xba6cx27){_0xba6cx27= _0xba6cx27|| 204;return function(_0xba6cx28){if(_0xba6cx28){return _0xba6cx25[_0x9453[46]](_0xba6cx27)};return _0xba6cx25[_0x9453[48]](_0xba6cx27)[_0x9453[47]]()}}function respondWithResult(_0xba6cx25,_0xba6cx27){_0xba6cx27= _0xba6cx27|| 200;return function(_0xba6cx28){if(_0xba6cx28){return _0xba6cx25[_0x9453[48]](_0xba6cx27)[_0x9453[49]](_0xba6cx28)}}}function respondWithFilteredResult(_0xba6cx25,_0xba6cx2b){return function(_0xba6cx28){if(_0xba6cx28){var _0xba6cx2c=_0xba6cx28[_0x9453[50]],_0xba6cx2d=_0xba6cx2b[_0x9453[51]],_0xba6cx2e=_0xba6cx2b[_0x9453[51]]+ _0xba6cx2b[_0x9453[52]],_0xba6cx27;if(_0xba6cx2e>= _0xba6cx2c){_0xba6cx2e= _0xba6cx2c;_0xba6cx27= 200}else {_0xba6cx27= 206};_0xba6cx25[_0x9453[48]](_0xba6cx27);return _0xba6cx25[_0x9453[56]](_0x9453[53],_0xba6cx2d+ _0x9453[54]+ _0xba6cx2e+ _0x9453[55]+ _0xba6cx2c)[_0x9453[49]](_0xba6cx28)};return null}}function patchUpdates(_0xba6cx30){return function(_0xba6cx28){try{jsonpatch[_0x9453[57]](_0xba6cx28,_0xba6cx30,true)}catch(err){return BPromise[_0x9453[58]](err)};return _0xba6cx28[_0x9453[59]]()}}function saveUpdates(_0xba6cx32,_0xba6cx27){return function(_0xba6cx28){if(_0xba6cx28){return _0xba6cx28[_0x9453[60]](_0xba6cx32)[_0x9453[44]](function(_0xba6cx33){return _0xba6cx33})};return null}}function removeEntity(_0xba6cx25,_0xba6cx27){return function(_0xba6cx28){if(_0xba6cx28){return _0xba6cx28[_0x9453[61]]()[_0x9453[44]](function(){_0xba6cx25[_0x9453[48]](204)[_0x9453[47]]()})}}}function handleEntityNotFound(_0xba6cx25,_0xba6cx27){return function(_0xba6cx28){if(!_0xba6cx28){_0xba6cx25[_0x9453[46]](404)};return _0xba6cx28}}function handleError(_0xba6cx25,_0xba6cx27){_0xba6cx27= _0xba6cx27|| 500;return function(_0xba6cx24){logger[_0x9453[34]](_0xba6cx24[_0x9453[62]]);if(_0xba6cx24[_0x9453[63]]){delete _0xba6cx24[_0x9453[63]]};_0xba6cx25[_0x9453[48]](_0xba6cx27)[_0x9453[64]](_0xba6cx24)}}exports[_0x9453[65]]= function(_0xba6cx1f,_0xba6cx25){var _0xba6cx2b={},_0xba6cx37={},_0xba6cx38={count:0,rows:[]};_0xba6cx37[_0x9453[66]]= _[_0x9453[69]](db[_0x9453[68]][_0x9453[67]]);var _0xba6cx39={dateStart:_0xba6cx1f[_0x9453[71]][_0x9453[70]],dateEnd:_0xba6cx1f[_0x9453[71]][_0x9453[72]]};delete _0xba6cx1f[_0x9453[71]][_0x9453[70]];delete _0xba6cx1f[_0x9453[71]][_0x9453[72]];_0xba6cx37[_0x9453[71]]= _[_0x9453[69]](_0xba6cx1f[_0x9453[71]]);_0xba6cx37[_0x9453[73]]= _[_0x9453[74]](_0xba6cx37[_0x9453[66]],_0xba6cx37[_0x9453[71]]);_0xba6cx2b[_0x9453[75]]= _[_0x9453[74]](_0xba6cx37[_0x9453[66]],qs[_0x9453[76]](_0xba6cx1f[_0x9453[71]][_0x9453[76]]));_0xba6cx2b[_0x9453[75]]= (_0xba6cx2b[_0x9453[75]][_0x9453[77]])?_0xba6cx2b[_0x9453[75]]:_0xba6cx37[_0x9453[66]];if(!_0xba6cx1f[_0x9453[71]][_0x9453[79]](_0x9453[78])){_0xba6cx2b[_0x9453[52]]= qs[_0x9453[52]](_0xba6cx1f[_0x9453[71]][_0x9453[52]]);_0xba6cx2b[_0x9453[51]]= qs[_0x9453[51]](_0xba6cx1f[_0x9453[71]][_0x9453[51]])};_0xba6cx2b[_0x9453[80]]= qs[_0x9453[81]](_0xba6cx1f[_0x9453[71]][_0x9453[81]]);_0xba6cx2b[_0x9453[82]]= qs[_0x9453[73]](_[_0x9453[83]](_0xba6cx1f[_0x9453[71]],_0xba6cx37[_0x9453[73]]));if(_0xba6cx39[_0x9453[70]]){if(_0xba6cx39[_0x9453[72]]){_0xba6cx39[_0x9453[72]]= moment(_0xba6cx39[_0x9453[72]])[_0x9453[85]](1,_0x9453[84])}else {_0xba6cx39[_0x9453[72]]= moment(_0xba6cx39[_0x9453[70]])[_0x9453[85]](1,_0x9453[84])};_[_0x9453[86]](_0xba6cx2b[_0x9453[82]],{createdAt:{$gte:_0xba6cx39[_0x9453[70]],$lte:_0xba6cx39[_0x9453[72]]}})};if(_0xba6cx1f[_0x9453[71]][_0x9453[87]]){_0xba6cx2b[_0x9453[82]]= _[_0x9453[86]](_0xba6cx2b[_0x9453[82]],{$or:_[_0x9453[89]](_0xba6cx2b[_0x9453[75]],function(_0xba6cx3a){var _0xba6cx38={};_0xba6cx38[_0xba6cx3a]= {$like:_0x9453[88]+ _0xba6cx1f[_0x9453[71]][_0x9453[87]]+ _0x9453[88]};return _0xba6cx38})})};_0xba6cx2b= _[_0x9453[86]]({},_0xba6cx2b,_0xba6cx1f[_0x9453[90]]);var _0xba6cx3b={where:_0xba6cx2b[_0x9453[82]]};return db[_0x9453[68]][_0x9453[50]](_0xba6cx3b)[_0x9453[44]](function(_0xba6cx2c){_0xba6cx38[_0x9453[50]]= _0xba6cx2c;if(_0xba6cx1f[_0x9453[71]][_0x9453[92]]){_0xba6cx2b[_0x9453[93]]= [{all:true}]};return db[_0x9453[68]][_0x9453[94]](_0xba6cx2b)})[_0x9453[44]](function(_0xba6cx3c){_0xba6cx38[_0x9453[91]]= _0xba6cx3c;return _0xba6cx38})[_0x9453[44]](respondWithFilteredResult(_0xba6cx25,_0xba6cx2b))[_0x9453[35]](handleError(_0xba6cx25,null))};exports[_0x9453[95]]= function(_0xba6cx1f,_0xba6cx25){var _0xba6cx2b={raw:true,where:{id:_0xba6cx1f[_0x9453[97]][_0x9453[96]]}},_0xba6cx37={};_0xba6cx37[_0x9453[66]]= _[_0x9453[69]](db[_0x9453[68]][_0x9453[67]]);_0xba6cx37[_0x9453[71]]= _[_0x9453[69]](_0xba6cx1f[_0x9453[71]]);_0xba6cx37[_0x9453[73]]= _[_0x9453[74]](_0xba6cx37[_0x9453[66]],_0xba6cx37[_0x9453[71]]);_0xba6cx2b[_0x9453[75]]= _[_0x9453[74]](_0xba6cx37[_0x9453[66]],qs[_0x9453[76]](_0xba6cx1f[_0x9453[71]][_0x9453[76]]));_0xba6cx2b[_0x9453[75]]= (_0xba6cx2b[_0x9453[75]][_0x9453[77]])?_0xba6cx2b[_0x9453[75]]:_0xba6cx37[_0x9453[66]];if(_0xba6cx1f[_0x9453[71]][_0x9453[92]]){_0xba6cx2b[_0x9453[93]]= [{all:true}]};_0xba6cx2b= _[_0x9453[86]]({},_0xba6cx2b,_0xba6cx1f[_0x9453[90]]);return db[_0x9453[68]][_0x9453[98]](_0xba6cx2b)[_0x9453[44]](handleEntityNotFound(_0xba6cx25,null))[_0x9453[44]](respondWithResult(_0xba6cx25,null))[_0x9453[35]](handleError(_0xba6cx25,null))};exports[_0x9453[99]]= function(_0xba6cx1f,_0xba6cx25){return db[_0x9453[68]][_0x9453[99]](_0xba6cx1f[_0x9453[100]],{})[_0x9453[44]](respondWithResult(_0xba6cx25,201))[_0x9453[35]](handleError(_0xba6cx25,null))};exports[_0x9453[60]]= function(_0xba6cx1f,_0xba6cx25){if(_0xba6cx1f[_0x9453[100]][_0x9453[96]]){delete _0xba6cx1f[_0x9453[100]][_0x9453[96]]};return db[_0x9453[68]][_0x9453[98]]({where:{id:_0xba6cx1f[_0x9453[97]][_0x9453[96]]}})[_0x9453[44]](handleEntityNotFound(_0xba6cx25,null))[_0x9453[44]](saveUpdates(_0xba6cx1f[_0x9453[100]],null))[_0x9453[44]](respondWithResult(_0xba6cx25,null))[_0x9453[35]](handleError(_0xba6cx25,null))};exports[_0x9453[61]]= function(_0xba6cx1f,_0xba6cx25){return db[_0x9453[68]][_0x9453[98]]({where:{id:_0xba6cx1f[_0x9453[97]][_0x9453[96]]}})[_0x9453[44]](handleEntityNotFound(_0xba6cx25,null))[_0x9453[44]](removeEntity(_0xba6cx25,null))[_0x9453[35]](handleError(_0xba6cx25,null))};exports[_0x9453[101]]= function(_0xba6cx1f,_0xba6cx25){return db[_0x9453[68]][_0x9453[101]]()[_0x9453[44]](respondWithResult(_0xba6cx25,null))[_0x9453[35]](handleError(_0xba6cx25,null))};exports[_0x9453[102]]= function(_0xba6cx1f,_0xba6cx25,_0xba6cx3d){return db[_0x9453[105]][_0x9453[50]]({where:{ChatGroupId:_0xba6cx1f[_0x9453[97]][_0x9453[96]],ToId:_0xba6cx1f[_0x9453[104]][_0x9453[96]],read:false}})[_0x9453[44]](function(_0xba6cx2c){return {id:_[_0x9453[103]](_0xba6cx1f[_0x9453[97]][_0x9453[96]]),count:_0xba6cx2c}})[_0x9453[44]](respondWithResult(_0xba6cx25,null))[_0x9453[35]](handleError(_0xba6cx25,null))};exports[_0x9453[106]]= function(_0xba6cx1f,_0xba6cx25,_0xba6cx3d){return db[_0x9453[68]][_0x9453[98]]({where:{id:_0xba6cx1f[_0x9453[97]][_0x9453[96]]}})[_0x9453[44]](handleEntityNotFound(_0xba6cx25,null))[_0x9453[44]](function(_0xba6cx28){if(_0xba6cx28){return _0xba6cx28[_0x9453[106]](_0xba6cx1f[_0x9453[100]][_0x9453[107]],_[_0x9453[108]](_0xba6cx1f[_0x9453[100]],[_0x9453[107],_0x9453[96]])|| {})}})[_0x9453[44]](respondWithResult(_0xba6cx25,null))[_0x9453[35]](handleError(_0xba6cx25,null))};exports[_0x9453[109]]= function(_0xba6cx1f,_0xba6cx28,_0xba6cx3d){var _0xba6cx2b={};var _0xba6cx37={};var _0xba6cx3e;var _0xba6cx2c;return db[_0x9453[68]][_0x9453[111]]({where:{id:_0xba6cx1f[_0x9453[97]][_0x9453[96]]}})[_0x9453[44]](handleEntityNotFound(_0xba6cx28,null))[_0x9453[44]](function(_0xba6cx28){if(_0xba6cx28){_0xba6cx3e= _0xba6cx28;_0xba6cx37[_0x9453[66]]= _[_0x9453[69]](db[_0x9453[110]][_0x9453[67]]);_0xba6cx37[_0x9453[71]]= _[_0x9453[69]](_0xba6cx1f[_0x9453[71]]);_0xba6cx37[_0x9453[73]]= _[_0x9453[74]](_0xba6cx37[_0x9453[66]],_0xba6cx37[_0x9453[71]]);_0xba6cx2b[_0x9453[75]]= _[_0x9453[74]](_0xba6cx37[_0x9453[66]],qs[_0x9453[76]](_0xba6cx1f[_0x9453[71]][_0x9453[76]]));_0xba6cx2b[_0x9453[75]]= (_0xba6cx2b[_0x9453[75]][_0x9453[77]])?_0xba6cx2b[_0x9453[75]]:_0xba6cx37[_0x9453[66]];_0xba6cx2b[_0x9453[80]]= qs[_0x9453[81]](_0xba6cx1f[_0x9453[71]][_0x9453[81]]);_0xba6cx2b[_0x9453[82]]= qs[_0x9453[73]](_[_0x9453[83]](_0xba6cx1f[_0x9453[71]],_0xba6cx37[_0x9453[73]]));if(_0xba6cx1f[_0x9453[71]][_0x9453[87]]){_0xba6cx2b[_0x9453[82]]= _[_0x9453[86]](_0xba6cx2b[_0x9453[82]],{$or:_[_0x9453[89]](_0xba6cx2b[_0x9453[75]],function(_0xba6cx3a){var _0xba6cx38={};_0xba6cx38[_0xba6cx3a]= {$like:_0x9453[88]+ _0xba6cx1f[_0x9453[71]][_0x9453[87]]+ _0x9453[88]};return _0xba6cx38})})};_0xba6cx2b= _[_0x9453[86]]({},_0xba6cx2b,_0xba6cx1f[_0x9453[90]]);return _0xba6cx3e[_0x9453[109]](_0xba6cx2b)}})[_0x9453[44]](function(_0xba6cx3f){if(_0xba6cx3f){_0xba6cx2c= _0xba6cx3f[_0x9453[77]];if(!_0xba6cx1f[_0x9453[71]][_0x9453[79]](_0x9453[78])){_0xba6cx2b[_0x9453[52]]= qs[_0x9453[52]](_0xba6cx1f[_0x9453[71]][_0x9453[52]]);_0xba6cx2b[_0x9453[51]]= qs[_0x9453[51]](_0xba6cx1f[_0x9453[71]][_0x9453[51]])};return _0xba6cx3e[_0x9453[109]](_0xba6cx2b)}})[_0x9453[44]](function(_0xba6cx3c){if(_0xba6cx3c){return _0xba6cx3c?{count:_0xba6cx2c,rows:_0xba6cx3c}:null}})[_0x9453[44]](respondWithResult(_0xba6cx28,null))[_0x9453[35]](handleError(_0xba6cx28,null))};exports[_0x9453[112]]= function(_0xba6cx1f,_0xba6cx25,_0xba6cx3d){var _0xba6cx3f;return db[_0x9453[68]][_0x9453[98]]({where:{id:_0xba6cx1f[_0x9453[97]][_0x9453[96]]}})[_0x9453[44]](handleEntityNotFound(_0xba6cx25,null))[_0x9453[44]](function(_0xba6cx28){if(_0xba6cx28){return _0xba6cx28[_0x9453[112]](_0xba6cx1f[_0x9453[71]][_0x9453[107]])}})[_0x9453[44]](respondWithStatusCode(_0xba6cx25,null))[_0x9453[35]](handleError(_0xba6cx25,null))};exports[_0x9453[113]]= function(_0xba6cx1f,_0xba6cx25,_0xba6cx3d){if(_0xba6cx1f[_0x9453[100]][_0x9453[96]]){delete _0xba6cx1f[_0x9453[100]][_0x9453[96]]};return db[_0x9453[68]][_0x9453[98]]({where:{id:_0xba6cx1f[_0x9453[97]][_0x9453[96]]}})[_0x9453[44]](handleEntityNotFound(_0xba6cx25,null))[_0x9453[44]](function(_0xba6cx28){if(_0xba6cx28){_0xba6cx1f[_0x9453[100]][_0x9453[114]]= _0xba6cx28[_0x9453[96]];return db[_0x9453[105]][_0x9453[99]](_0xba6cx1f[_0x9453[100]])}})[_0x9453[44]](respondWithResult(_0xba6cx25,null))[_0x9453[35]](handleError(_0xba6cx25,null))};exports[_0x9453[115]]= function(_0xba6cx1f,_0xba6cx28,_0xba6cx3d){var _0xba6cx2b={};var _0xba6cx37={};var _0xba6cx3e;var _0xba6cx2c;return db[_0x9453[68]][_0x9453[111]]({where:{id:_0xba6cx1f[_0x9453[97]][_0x9453[96]]}})[_0x9453[44]](handleEntityNotFound(_0xba6cx28,null))[_0x9453[44]](function(_0xba6cx28){if(_0xba6cx28){_0xba6cx3e= _0xba6cx28;_0xba6cx37[_0x9453[66]]= _[_0x9453[69]](db[_0x9453[105]][_0x9453[67]]);_0xba6cx37[_0x9453[71]]= _[_0x9453[69]](_0xba6cx1f[_0x9453[71]]);_0xba6cx37[_0x9453[73]]= _[_0x9453[74]](_0xba6cx37[_0x9453[66]],_0xba6cx37[_0x9453[71]]);_0xba6cx2b[_0x9453[75]]= _[_0x9453[74]](_0xba6cx37[_0x9453[66]],qs[_0x9453[76]](_0xba6cx1f[_0x9453[71]][_0x9453[76]]));_0xba6cx2b[_0x9453[75]]= (_0xba6cx2b[_0x9453[75]][_0x9453[77]])?_0xba6cx2b[_0x9453[75]]:_0xba6cx37[_0x9453[66]];_0xba6cx2b[_0x9453[80]]= qs[_0x9453[81]](_0xba6cx1f[_0x9453[71]][_0x9453[81]]);_0xba6cx2b[_0x9453[82]]= qs[_0x9453[73]](_[_0x9453[83]](_0xba6cx1f[_0x9453[71]],_0xba6cx37[_0x9453[73]]));if(_0xba6cx1f[_0x9453[71]][_0x9453[87]]){_0xba6cx2b[_0x9453[82]]= _[_0x9453[86]](_0xba6cx2b[_0x9453[82]],{$or:_[_0x9453[89]](_0xba6cx2b[_0x9453[75]],function(_0xba6cx3a){var _0xba6cx38={};_0xba6cx38[_0xba6cx3a]= {$like:_0x9453[88]+ _0xba6cx1f[_0x9453[71]][_0x9453[87]]+ _0x9453[88]};return _0xba6cx38})})};if(_0xba6cx1f[_0x9453[71]][_0x9453[116]]){var _0xba6cx40=_0xba6cx1f[_0x9453[71]][_0x9453[116]][_0x9453[118]](_0x9453[117]);var _0xba6cx38={};_0xba6cx38[_0xba6cx40[0]]= {$gte:moment(_0xba6cx40[1])[_0x9453[120]](_0x9453[119])};_0xba6cx2b[_0x9453[82]]= _[_0x9453[86]](_0xba6cx2b[_0x9453[82]],_0xba6cx38)};_0xba6cx2b= _[_0x9453[86]]({},_0xba6cx2b,_0xba6cx1f[_0x9453[90]]);return _0xba6cx3e[_0x9453[115]](_0xba6cx2b)}})[_0x9453[44]](function(_0xba6cx3f){if(_0xba6cx3f){_0xba6cx2c= _0xba6cx3f[_0x9453[77]];if(!_0xba6cx1f[_0x9453[71]][_0x9453[79]](_0x9453[78])){_0xba6cx2b[_0x9453[52]]= qs[_0x9453[52]](_0xba6cx1f[_0x9453[71]][_0x9453[52]]);_0xba6cx2b[_0x9453[51]]= qs[_0x9453[51]](_0xba6cx1f[_0x9453[71]][_0x9453[51]])};return _0xba6cx3e[_0x9453[115]](_0xba6cx2b)}})[_0x9453[44]](function(_0xba6cx3c){if(_0xba6cx3c){return _0xba6cx3c?{count:_0xba6cx2c,rows:_0xba6cx3c}:null}})[_0x9453[44]](respondWithResult(_0xba6cx28,null))[_0x9453[35]](handleError(_0xba6cx28,null))}
\ No newline at end of file
index d875018..a4fec54 100644 (file)
@@ -1 +1 @@
-var _0x4fe0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x47\x72\x6F\x75\x70","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x4fe0[0];var EventEmitter=require(_0x4fe0[1]);var ChatGroup=require(_0x4fe0[4])[_0x4fe0[3]][_0x4fe0[2]];var ChatGroupEvents= new EventEmitter();ChatGroupEvents[_0x4fe0[5]](0);var events={afterCreate:_0x4fe0[6],afterUpdate:_0x4fe0[7],afterDestroy:_0x4fe0[8]};function emitEvent(event){return function(_0x24cfx7,_0x24cfx8,_0x24cfx9){ChatGroupEvents[_0x4fe0[11]](event+ _0x4fe0[9]+ _0x24cfx7[_0x4fe0[10]],_0x24cfx7);ChatGroupEvents[_0x4fe0[11]](event,_0x24cfx7);_0x24cfx9(null)}}for(var e in events){if(events[_0x4fe0[12]](e)){var event=events[e];ChatGroup[_0x4fe0[13]](e,emitEvent(event))}};module[_0x4fe0[14]]= ChatGroupEvents
\ No newline at end of file
+var _0xa14a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x47\x72\x6F\x75\x70","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xa14a[0];var EventEmitter=require(_0xa14a[1]);var ChatGroup=require(_0xa14a[4])[_0xa14a[3]][_0xa14a[2]];var ChatGroupEvents= new EventEmitter();ChatGroupEvents[_0xa14a[5]](0);var events={afterCreate:_0xa14a[6],afterUpdate:_0xa14a[7],afterDestroy:_0xa14a[8]};function emitEvent(event){return function(_0x63d0x7,_0x63d0x8,_0x63d0x9){ChatGroupEvents[_0xa14a[11]](event+ _0xa14a[9]+ _0x63d0x7[_0xa14a[10]],_0x63d0x7);ChatGroupEvents[_0xa14a[11]](event,_0x63d0x7);_0x63d0x9(null)}}for(var e in events){if(events[_0xa14a[12]](e)){var event=events[e];ChatGroup[_0xa14a[13]](e,emitEvent(event))}};module[_0xa14a[14]]= ChatGroupEvents
\ No newline at end of file
index 7eef6ea..4427aa0 100644 (file)
@@ -1 +1 @@
-var _0x8c1f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x47\x72\x6F\x75\x70\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x47\x72\x6F\x75\x70","\x63\x68\x61\x74\x5F\x67\x72\x6F\x75\x70\x73","\x64\x65\x66\x69\x6E\x65"];_0x8c1f[0];var _=require(_0x8c1f[1]);var util=require(_0x8c1f[2]);var logger=require(_0x8c1f[4])(_0x8c1f[3]);var moment=require(_0x8c1f[5]);var BPromise=require(_0x8c1f[6]);var rp=require(_0x8c1f[7]);var attributes=require(_0x8c1f[8]);module[_0x8c1f[9]]= function(_0x7043x8,_0x7043x9){return _0x7043x8[_0x8c1f[12]](_0x8c1f[10],attributes,{tableName:_0x8c1f[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x411c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x47\x72\x6F\x75\x70\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x47\x72\x6F\x75\x70","\x63\x68\x61\x74\x5F\x67\x72\x6F\x75\x70\x73","\x64\x65\x66\x69\x6E\x65"];_0x411c[0];var _=require(_0x411c[1]);var util=require(_0x411c[2]);var logger=require(_0x411c[4])(_0x411c[3]);var moment=require(_0x411c[5]);var BPromise=require(_0x411c[6]);var rp=require(_0x411c[7]);var attributes=require(_0x411c[8]);module[_0x411c[9]]= function(_0x3710x8,_0x3710x9){return _0x3710x8[_0x411c[12]](_0x411c[10],attributes,{tableName:_0x411c[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 9548d56..844c227 100644 (file)
@@ -1 +1 @@
-var _0xeceb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x47\x72\x6F\x75\x70\x2E\x73\x6F\x63\x6B\x65\x74","\x43\x68\x61\x74\x47\x72\x6F\x75\x70\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x47\x72\x6F\x75\x70\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xeceb[0];var _=require(_0xeceb[1]);var util=require(_0xeceb[2]);var moment=require(_0xeceb[3]);var BPromise=require(_0xeceb[4]);var rs=require(_0xeceb[5]);var fs=require(_0xeceb[6]);var db=require(_0xeceb[8])[_0xeceb[7]];var utils=require(_0xeceb[9]);var logger=require(_0xeceb[11])(_0xeceb[10]);var config=require(_0xeceb[12]);var jayson=require(_0xeceb[13]);var client=jayson[_0xeceb[15]][_0xeceb[14]]({port:9002});var socket=require(_0xeceb[17])({host:_0xeceb[16],port:6379});require(_0xeceb[19])[_0xeceb[18]](socket);function respondWithRpcPromise(_0x54a8xf,_0x54a8x10,_0x54a8x11){return  new BPromise(function(_0x54a8x12,_0x54a8x13){return client[_0xeceb[32]](_0x54a8xf,_0x54a8x11)[_0xeceb[31]](function(_0x54a8x15){logger[_0xeceb[24]](_0xeceb[20],_0x54a8x10,_0xeceb[23]);logger[_0xeceb[27]](_0xeceb[25],_0x54a8x10,_0xeceb[23],JSON[_0xeceb[26]](_0x54a8x15));if(_0x54a8x15[_0xeceb[21]]){if(_0x54a8x15[_0xeceb[21]][_0xeceb[28]]=== 500){logger[_0xeceb[21]](_0xeceb[20],_0x54a8x10,_0x54a8x15[_0xeceb[21]][_0xeceb[29]]);return _0x54a8x13(_0x54a8x15[_0xeceb[21]][_0xeceb[29]])};logger[_0xeceb[21]](_0xeceb[20],_0x54a8x10,_0x54a8x15[_0xeceb[21]][_0xeceb[29]]);return _0x54a8x12(_0x54a8x15[_0xeceb[21]][_0xeceb[29]])}else {logger[_0xeceb[24]](_0xeceb[20],_0x54a8x10,_0xeceb[23]);_0x54a8x12(_0x54a8x15[_0xeceb[30]][_0xeceb[29]])}})[_0xeceb[22]](function(_0x54a8x14){logger[_0xeceb[21]](_0xeceb[20],_0x54a8x10,_0x54a8x14);_0x54a8x13(_0x54a8x14)})})}
\ No newline at end of file
+var _0x5c91=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x47\x72\x6F\x75\x70\x2E\x73\x6F\x63\x6B\x65\x74","\x43\x68\x61\x74\x47\x72\x6F\x75\x70\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x47\x72\x6F\x75\x70\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x5c91[0];var _=require(_0x5c91[1]);var util=require(_0x5c91[2]);var moment=require(_0x5c91[3]);var BPromise=require(_0x5c91[4]);var rs=require(_0x5c91[5]);var fs=require(_0x5c91[6]);var db=require(_0x5c91[8])[_0x5c91[7]];var utils=require(_0x5c91[9]);var logger=require(_0x5c91[11])(_0x5c91[10]);var config=require(_0x5c91[12]);var jayson=require(_0x5c91[13]);var client=jayson[_0x5c91[15]][_0x5c91[14]]({port:9002});var socket=require(_0x5c91[17])({host:_0x5c91[16],port:6379});require(_0x5c91[19])[_0x5c91[18]](socket);function respondWithRpcPromise(_0x79aexf,_0x79aex10,_0x79aex11){return  new BPromise(function(_0x79aex12,_0x79aex13){return client[_0x5c91[32]](_0x79aexf,_0x79aex11)[_0x5c91[31]](function(_0x79aex15){logger[_0x5c91[24]](_0x5c91[20],_0x79aex10,_0x5c91[23]);logger[_0x5c91[27]](_0x5c91[25],_0x79aex10,_0x5c91[23],JSON[_0x5c91[26]](_0x79aex15));if(_0x79aex15[_0x5c91[21]]){if(_0x79aex15[_0x5c91[21]][_0x5c91[28]]=== 500){logger[_0x5c91[21]](_0x5c91[20],_0x79aex10,_0x79aex15[_0x5c91[21]][_0x5c91[29]]);return _0x79aex13(_0x79aex15[_0x5c91[21]][_0x5c91[29]])};logger[_0x5c91[21]](_0x5c91[20],_0x79aex10,_0x79aex15[_0x5c91[21]][_0x5c91[29]]);return _0x79aex12(_0x79aex15[_0x5c91[21]][_0x5c91[29]])}else {logger[_0x5c91[24]](_0x5c91[20],_0x79aex10,_0x5c91[23]);_0x79aex12(_0x79aex15[_0x5c91[30]][_0x5c91[29]])}})[_0x5c91[22]](function(_0x79aex14){logger[_0x5c91[21]](_0x5c91[20],_0x79aex10,_0x79aex14);_0x79aex13(_0x79aex14)})})}
\ No newline at end of file
index 9853d40..4f310ee 100644 (file)
@@ -1 +1 @@
-var _0xd49b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x47\x72\x6F\x75\x70\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x47\x72\x6F\x75\x70\x3A","\x6F\x6E"];_0xd49b[0];var ChatGroupEvents=require(_0xd49b[1]);var events=[_0xd49b[2],_0xd49b[3],_0xd49b[4]];function createListener(_0x7024x4,_0x7024x5){return function(_0x7024x6){_0x7024x5[_0xd49b[5]](_0x7024x4,_0x7024x6)}}function removeListener(_0x7024x4,_0x7024x8){return function(){ChatGroupEvents[_0xd49b[6]](_0x7024x4,_0x7024x8)}}exports[_0xd49b[7]]= function(_0x7024x5){for(var _0x7024x9=0,_0x7024xa=events[_0xd49b[8]];_0x7024x9< _0x7024xa;_0x7024x9++){var _0x7024x4=events[_0x7024x9];var _0x7024x8=createListener(_0xd49b[9]+ _0x7024x4,_0x7024x5);ChatGroupEvents[_0xd49b[10]](_0x7024x4,_0x7024x8)}}
\ No newline at end of file
+var _0x21d0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x47\x72\x6F\x75\x70\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x47\x72\x6F\x75\x70\x3A","\x6F\x6E"];_0x21d0[0];var ChatGroupEvents=require(_0x21d0[1]);var events=[_0x21d0[2],_0x21d0[3],_0x21d0[4]];function createListener(_0xa152x4,_0xa152x5){return function(_0xa152x6){_0xa152x5[_0x21d0[5]](_0xa152x4,_0xa152x6)}}function removeListener(_0xa152x4,_0xa152x8){return function(){ChatGroupEvents[_0x21d0[6]](_0xa152x4,_0xa152x8)}}exports[_0x21d0[7]]= function(_0xa152x5){for(var _0xa152x9=0,_0xa152xa=events[_0x21d0[8]];_0xa152x9< _0xa152xa;_0xa152x9++){var _0xa152x4=events[_0xa152x9];var _0xa152x8=createListener(_0x21d0[9]+ _0xa152x4,_0xa152x5);ChatGroupEvents[_0x21d0[10]](_0xa152x4,_0xa152x8)}}
\ No newline at end of file
index 6a0e9a2..2c53b8a 100644 (file)
@@ -1 +1 @@
-var _0xed9a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x47\x72\x6F\x75\x70\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x75\x6E\x72\x65\x61\x64","\x67\x65\x74\x55\x6E\x72\x65\x61\x64","\x2F\x3A\x69\x64\x2F\x6D\x65\x6D\x62\x65\x72\x73","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x4D\x65\x6D\x62\x65\x72\x73","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x4D\x65\x6D\x62\x65\x72\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xed9a[0];var multer=require(_0xed9a[1]);var util=require(_0xed9a[2]);var path=require(_0xed9a[3]);var express=require(_0xed9a[4]);var router=express.Router();var auth=require(_0xed9a[5]);var interaction=require(_0xed9a[6]);var config=require(_0xed9a[7]);var controller=require(_0xed9a[8]);router[_0xed9a[12]](_0xed9a[9],auth[_0xed9a[10]](),controller[_0xed9a[11]]);router[_0xed9a[12]](_0xed9a[13],auth[_0xed9a[10]](),controller[_0xed9a[14]]);router[_0xed9a[12]](_0xed9a[15],auth[_0xed9a[10]](),controller[_0xed9a[16]]);router[_0xed9a[12]](_0xed9a[17],auth[_0xed9a[10]](),controller[_0xed9a[18]]);router[_0xed9a[12]](_0xed9a[19],auth[_0xed9a[10]](),controller[_0xed9a[20]]);router[_0xed9a[12]](_0xed9a[21],auth[_0xed9a[10]](),controller[_0xed9a[22]]);router[_0xed9a[24]](_0xed9a[9],auth[_0xed9a[10]](),controller[_0xed9a[23]]);router[_0xed9a[24]](_0xed9a[19],auth[_0xed9a[10]](),controller[_0xed9a[25]]);router[_0xed9a[24]](_0xed9a[21],auth[_0xed9a[10]](),controller[_0xed9a[26]]);router[_0xed9a[28]](_0xed9a[15],auth[_0xed9a[10]](),controller[_0xed9a[27]]);router[_0xed9a[30]](_0xed9a[15],auth[_0xed9a[10]](),controller[_0xed9a[29]]);router[_0xed9a[30]](_0xed9a[19],auth[_0xed9a[10]](),controller[_0xed9a[31]]);module[_0xed9a[32]]= router
\ No newline at end of file
+var _0xed03=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x47\x72\x6F\x75\x70\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x75\x6E\x72\x65\x61\x64","\x67\x65\x74\x55\x6E\x72\x65\x61\x64","\x2F\x3A\x69\x64\x2F\x6D\x65\x6D\x62\x65\x72\x73","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x4D\x65\x6D\x62\x65\x72\x73","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x4D\x65\x6D\x62\x65\x72\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xed03[0];var multer=require(_0xed03[1]);var util=require(_0xed03[2]);var path=require(_0xed03[3]);var express=require(_0xed03[4]);var router=express.Router();var auth=require(_0xed03[5]);var interaction=require(_0xed03[6]);var config=require(_0xed03[7]);var controller=require(_0xed03[8]);router[_0xed03[12]](_0xed03[9],auth[_0xed03[10]](),controller[_0xed03[11]]);router[_0xed03[12]](_0xed03[13],auth[_0xed03[10]](),controller[_0xed03[14]]);router[_0xed03[12]](_0xed03[15],auth[_0xed03[10]](),controller[_0xed03[16]]);router[_0xed03[12]](_0xed03[17],auth[_0xed03[10]](),controller[_0xed03[18]]);router[_0xed03[12]](_0xed03[19],auth[_0xed03[10]](),controller[_0xed03[20]]);router[_0xed03[12]](_0xed03[21],auth[_0xed03[10]](),controller[_0xed03[22]]);router[_0xed03[24]](_0xed03[9],auth[_0xed03[10]](),controller[_0xed03[23]]);router[_0xed03[24]](_0xed03[19],auth[_0xed03[10]](),controller[_0xed03[25]]);router[_0xed03[24]](_0xed03[21],auth[_0xed03[10]](),controller[_0xed03[26]]);router[_0xed03[28]](_0xed03[15],auth[_0xed03[10]](),controller[_0xed03[27]]);router[_0xed03[30]](_0xed03[15],auth[_0xed03[10]](),controller[_0xed03[29]]);router[_0xed03[30]](_0xed03[19],auth[_0xed03[10]](),controller[_0xed03[31]]);module[_0xed03[32]]= router
\ No newline at end of file
index c089d3e..7153ecf 100644 (file)
@@ -1 +1 @@
-var _0x4c18=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x42\x4F\x4F\x4C\x45\x41\x4E","\x49\x4E\x54\x45\x47\x45\x52","\x73\x74\x61\x72","\x74\x68\x75\x6D\x62","\x54\x45\x58\x54","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45","\x6C\x6F\x6E\x67","\x69\x6E","\x6F\x75\x74"];_0x4c18[0];var Sequelize=require(_0x4c18[1]);module[_0x4c18[2]]= {closed:{type:Sequelize[_0x4c18[3]],defaultValue:false},ratingValue:{type:Sequelize[_0x4c18[4]]},ratingType:{type:Sequelize.ENUM(_0x4c18[5],_0x4c18[6]),defaultValue:_0x4c18[5]},ratingMessage:{type:Sequelize[_0x4c18[7]]},pathTranscript:{type:Sequelize[_0x4c18[7]]},mailTranscript:{type:Sequelize[_0x4c18[8]],validate:{isEmail:true}},closedAt:{type:Sequelize[_0x4c18[9]]},disposition:{type:Sequelize[_0x4c18[8]]},note:{type:Sequelize[_0x4c18[8]]},browserName:{type:Sequelize[_0x4c18[8]]},browserVersion:{type:Sequelize[_0x4c18[8]]},osName:{type:Sequelize[_0x4c18[8]]},osVersion:{type:Sequelize[_0x4c18[8]]},deviceModel:{type:Sequelize[_0x4c18[8]]},deviceVendor:{type:Sequelize[_0x4c18[8]]},deviceType:{type:Sequelize[_0x4c18[8]]},referer:{type:Sequelize[_0x4c18[8]]},customerIp:{type:Sequelize[_0x4c18[8]]},formData:{type:Sequelize.TEXT(_0x4c18[10])},read1stAt:{type:Sequelize[_0x4c18[9]]},lastMsgAt:{type:Sequelize[_0x4c18[9]]},lastMsgDirection:{type:Sequelize.ENUM(_0x4c18[11],_0x4c18[12]),defaultValue:_0x4c18[11],allowNull:false}}
\ No newline at end of file
+var _0x6453=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x42\x4F\x4F\x4C\x45\x41\x4E","\x49\x4E\x54\x45\x47\x45\x52","\x73\x74\x61\x72","\x74\x68\x75\x6D\x62","\x54\x45\x58\x54","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45","\x6C\x6F\x6E\x67","\x69\x6E","\x6F\x75\x74"];_0x6453[0];var Sequelize=require(_0x6453[1]);module[_0x6453[2]]= {closed:{type:Sequelize[_0x6453[3]],defaultValue:false},ratingValue:{type:Sequelize[_0x6453[4]]},ratingType:{type:Sequelize.ENUM(_0x6453[5],_0x6453[6]),defaultValue:_0x6453[5]},ratingMessage:{type:Sequelize[_0x6453[7]]},pathTranscript:{type:Sequelize[_0x6453[7]]},mailTranscript:{type:Sequelize[_0x6453[8]],validate:{isEmail:true}},closedAt:{type:Sequelize[_0x6453[9]]},disposition:{type:Sequelize[_0x6453[8]]},note:{type:Sequelize[_0x6453[8]]},browserName:{type:Sequelize[_0x6453[8]]},browserVersion:{type:Sequelize[_0x6453[8]]},osName:{type:Sequelize[_0x6453[8]]},osVersion:{type:Sequelize[_0x6453[8]]},deviceModel:{type:Sequelize[_0x6453[8]]},deviceVendor:{type:Sequelize[_0x6453[8]]},deviceType:{type:Sequelize[_0x6453[8]]},referer:{type:Sequelize[_0x6453[8]]},customerIp:{type:Sequelize[_0x6453[8]]},formData:{type:Sequelize.TEXT(_0x6453[10])},read1stAt:{type:Sequelize[_0x6453[9]]},lastMsgAt:{type:Sequelize[_0x6453[9]]},lastMsgDirection:{type:Sequelize.ENUM(_0x6453[11],_0x6453[12]),defaultValue:_0x6453[11],allowNull:false}}
\ No newline at end of file
index 5adb3e6..2a070c0 100644 (file)
@@ -1 +1 @@
-var _0xb81e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x74\x61\x67","\x54\x61\x67","\x54\x61\x67\x73","\x69\x64","\x70\x75\x73\x68","\x64\x69\x73\x74\x69\x6E\x63\x74","\x72\x65\x61\x64","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x4D\x65\x73\x73\x61\x67\x65\x73","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x69\x6E","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x55\x73\x65\x72","\x55\x73\x65\x72\x73","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x4F\x77\x6E\x65\x72","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79","\x63\x6F\x6C\x6F\x72","\x54\x68\x72\x6F\x75\x67\x68\x54\x61\x67\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x62\x61\x6E\x64\x6F\x6E","\x41\x62\x61\x6E\x64\x6F\x6E\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x63\x6C\x6F\x73\x65\x64","\x63\x6C\x6F\x73\x65\x64\x41\x74","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x62\x61\x6E\x64\x6F\x6E\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x6E\x74\x69\x74\x79\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x55\x73\x65\x72\x49\x64","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x61\x73\x73\x69\x67\x6E\x65\x64","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x55\x70\x6C\x6F\x61\x64","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x6E\x61\x6D\x65","\x66\x69\x6C\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x74\x79\x70\x65","\x6D\x69\x6D\x65\x74\x79\x70\x65","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x44\x6F\x77\x6E\x6C\x6F\x61\x64","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73\x2F","\x6A\x6F\x69\x6E","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x55\x6E\x61\x75\x74\x68\x6F\x72\x69\x7A\x65\x64","\x61\x74\x74\x61\x63\x68\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x63\x6C\x6F\x73\x65","\x6D\x61\x69\x6C\x54\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x63\x68\x61\x74\x2F\x75\x70\x6C\x6F\x61\x64\x2F","\x74\x72\x61\x6E\x73\x63\x72\x69\x70\x74\x2D\x25\x73\x2E\x74\x78\x74","\x6E\x6F\x77","\x66\x6F\x72\x6D\x61\x74","\x70\x61\x74\x68\x54\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x53\x6D\x74\x70","\x73\x65\x72\x76\x69\x63\x65","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x65\x63\x75\x72\x65","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E","\x61\x75\x74\x68","\x75\x73\x65\x72","\x70\x61\x73\x73","\x53\x65\x6E\x64\x4D\x61\x69\x6C","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x65\x6D\x61\x69\x6C","\x4D\x61\x69\x6C\x20\x54\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x48\x69\x20\x25\x73\x2C\x20\x61\x74\x74\x61\x63\x68\x65\x64\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x66\x69\x6E\x64\x20\x79\x6F\x75\x72\x20\x74\x72\x61\x6E\x73\x63\x72\x69\x70\x74\x20\x66\x69\x6C\x65\x2E\x20\x0A\x0A\x52\x65\x67\x61\x72\x64\x73\x2E\x20\x0A\x0A","\x61\x67\x65\x6E\x74\x41\x6C\x69\x61\x73","\x41\x67\x65\x6E\x74","\x53\x79\x73\x74\x65\x6D","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","\x56\x69\x73\x69\x74\x6F\x72","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x5B\x25\x73\x5D\x20\x25\x73\x3A\x20\x25\x73\x0A","\x4D\x4D\x2F\x44\x44\x2F\x59\x59\x59\x59\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x61\x70\x70\x65\x6E\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x69\x64\x73","\x6F\x6D\x69\x74","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x24\x67\x74\x65","\x2C","\x73\x70\x6C\x69\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x67\x65\x74\x4D\x79\x4D\x65\x73\x73\x61\x67\x65\x73","\x73\x65\x63\x72\x65\x74","\x69\x6E\x63\x6C\x75\x64\x65\x41\x67\x65\x6E\x74","\x61\x6C\x69\x61\x73","\x61\x64\x64\x54\x61\x67\x73","\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x54\x61\x67\x73\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x73\x65\x74\x54\x61\x67\x73","\x72\x65\x6D\x6F\x76\x65\x54\x61\x67\x73"];_0xb81e[0];var jsonpatch=require(_0xb81e[1]);var rp=require(_0xb81e[2]);var moment=require(_0xb81e[3]);var BPromise=require(_0xb81e[4]);var Mustache=require(_0xb81e[5]);var util=require(_0xb81e[6]);var path=require(_0xb81e[7]);var sox=require(_0xb81e[8]);var csv=require(_0xb81e[9]);var ejs=require(_0xb81e[10]);var fs=require(_0xb81e[11]);var _=require(_0xb81e[12]);var squel=require(_0xb81e[13]);var crypto=require(_0xb81e[14]);var jsforce=require(_0xb81e[15]);var deskjs=require(_0xb81e[16]);var toCsv=require(_0xb81e[9]);var querystring=require(_0xb81e[17]);var Papa=require(_0xb81e[18]);var qs=require(_0xb81e[19]);var logger=require(_0xb81e[21])(_0xb81e[20]);var utils=require(_0xb81e[22]);var config=require(_0xb81e[23]);var db=require(_0xb81e[25])[_0xb81e[24]];var socket=require(_0xb81e[27])({host:_0xb81e[26],port:6379});require(_0xb81e[29])[_0xb81e[28]](socket);var jayson=require(_0xb81e[30]);var client=jayson[_0xb81e[32]][_0xb81e[31]]({port:9003});var client9004=jayson[_0xb81e[32]][_0xb81e[31]]({port:9004});function respondWithRpcPromise(_0x60a4x1e,_0x60a4x1f,_0x60a4x20,_0x60a4x21){return  new BPromise(function(_0x60a4x22,_0x60a4x23){var _0x60a4x24=(_0x60a4x21|| client);return _0x60a4x24[_0xb81e[45]](_0x60a4x1e,_0x60a4x20)[_0xb81e[44]](function(_0x60a4x26){logger[_0xb81e[37]](_0xb81e[33],_0x60a4x1f,_0xb81e[36]);logger[_0xb81e[40]](_0xb81e[38],_0x60a4x1f,_0xb81e[36],JSON[_0xb81e[39]](_0x60a4x26));if(_0x60a4x26[_0xb81e[34]]){if(_0x60a4x26[_0xb81e[34]][_0xb81e[41]]=== 500){logger[_0xb81e[34]](_0xb81e[33],_0x60a4x1f,_0x60a4x26[_0xb81e[34]][_0xb81e[42]]);return _0x60a4x23(_0x60a4x26[_0xb81e[34]][_0xb81e[42]])};logger[_0xb81e[34]](_0xb81e[33],_0x60a4x1f,_0x60a4x26[_0xb81e[34]][_0xb81e[42]]);return _0x60a4x22(_0x60a4x26[_0xb81e[34]][_0xb81e[42]])}else {logger[_0xb81e[37]](_0xb81e[33],_0x60a4x1f,_0xb81e[36]);_0x60a4x22(_0x60a4x26[_0xb81e[43]][_0xb81e[42]])}})[_0xb81e[35]](function(_0x60a4x25){logger[_0xb81e[34]](_0xb81e[33],_0x60a4x1f,_0x60a4x25);_0x60a4x23(_0x60a4x25)})})}function respondWithStatusCode(_0x60a4x26,_0x60a4x28){_0x60a4x28= _0x60a4x28|| 204;return function(_0x60a4x29){if(_0x60a4x29){return _0x60a4x26[_0xb81e[46]](_0x60a4x28)};return _0x60a4x26[_0xb81e[48]](_0x60a4x28)[_0xb81e[47]]()}}function respondWithResult(_0x60a4x26,_0x60a4x28){_0x60a4x28= _0x60a4x28|| 200;return function(_0x60a4x29){if(_0x60a4x29){return _0x60a4x26[_0xb81e[48]](_0x60a4x28)[_0xb81e[49]](_0x60a4x29)}}}function respondWithFilteredResult(_0x60a4x26,_0x60a4x2c){return function(_0x60a4x29){if(_0x60a4x29){var _0x60a4x2d=_0x60a4x29[_0xb81e[50]],_0x60a4x2e=_0x60a4x2c[_0xb81e[51]],_0x60a4x2f=_0x60a4x2c[_0xb81e[51]]+ _0x60a4x2c[_0xb81e[52]],_0x60a4x28;if(_0x60a4x2f>= _0x60a4x2d){_0x60a4x2f= _0x60a4x2d;_0x60a4x28= 200}else {_0x60a4x28= 206};_0x60a4x26[_0xb81e[48]](_0x60a4x28);return _0x60a4x26[_0xb81e[56]](_0xb81e[53],_0x60a4x2e+ _0xb81e[54]+ _0x60a4x2f+ _0xb81e[55]+ _0x60a4x2d)[_0xb81e[49]](_0x60a4x29)};return null}}function patchUpdates(_0x60a4x31){return function(_0x60a4x29){try{jsonpatch[_0xb81e[57]](_0x60a4x29,_0x60a4x31,true)}catch(err){return BPromise[_0xb81e[58]](err)};return _0x60a4x29[_0xb81e[59]]()}}function saveUpdates(_0x60a4x33,_0x60a4x28){return function(_0x60a4x29){if(_0x60a4x29){return _0x60a4x29[_0xb81e[60]](_0x60a4x33)[_0xb81e[44]](function(_0x60a4x34){return _0x60a4x34})};return null}}function removeEntity(_0x60a4x26,_0x60a4x28){return function(_0x60a4x29){if(_0x60a4x29){return _0x60a4x29[_0xb81e[61]]()[_0xb81e[44]](function(){_0x60a4x26[_0xb81e[48]](204)[_0xb81e[47]]()})}}}function handleEntityNotFound(_0x60a4x26,_0x60a4x28){return function(_0x60a4x29){if(!_0x60a4x29){_0x60a4x26[_0xb81e[46]](404)};return _0x60a4x29}}function handleError(_0x60a4x26,_0x60a4x28){_0x60a4x28= _0x60a4x28|| 500;return function(_0x60a4x25){logger[_0xb81e[34]](_0x60a4x25[_0xb81e[62]]);if(_0x60a4x25[_0xb81e[63]]){delete _0x60a4x25[_0xb81e[63]]};_0x60a4x26[_0xb81e[48]](_0x60a4x28)[_0xb81e[64]](_0x60a4x25)}}exports[_0xb81e[65]]= function(_0x60a4x20,_0x60a4x26){var _0x60a4x2c={},_0x60a4x38={},_0x60a4x39={count:0,rows:[]};_0x60a4x38[_0xb81e[66]]= _[_0xb81e[69]](db[_0xb81e[68]][_0xb81e[67]]);var _0x60a4x3a={dateStart:_0x60a4x20[_0xb81e[71]][_0xb81e[70]],dateEnd:_0x60a4x20[_0xb81e[71]][_0xb81e[72]]};delete _0x60a4x20[_0xb81e[71]][_0xb81e[70]];delete _0x60a4x20[_0xb81e[71]][_0xb81e[72]];_0x60a4x38[_0xb81e[71]]= _[_0xb81e[69]](_0x60a4x20[_0xb81e[71]]);_0x60a4x38[_0xb81e[73]]= _[_0xb81e[74]](_0x60a4x38[_0xb81e[66]],_0x60a4x38[_0xb81e[71]]);_0x60a4x2c[_0xb81e[75]]= _[_0xb81e[74]](_0x60a4x38[_0xb81e[66]],qs[_0xb81e[76]](_0x60a4x20[_0xb81e[71]][_0xb81e[76]]));_0x60a4x2c[_0xb81e[75]]= (_0x60a4x2c[_0xb81e[75]][_0xb81e[77]])?_0x60a4x2c[_0xb81e[75]]:_0x60a4x38[_0xb81e[66]];if(!_0x60a4x20[_0xb81e[71]][_0xb81e[79]](_0xb81e[78])){_0x60a4x2c[_0xb81e[52]]= qs[_0xb81e[52]](_0x60a4x20[_0xb81e[71]][_0xb81e[52]]);_0x60a4x2c[_0xb81e[51]]= qs[_0xb81e[51]](_0x60a4x20[_0xb81e[71]][_0xb81e[51]])};_0x60a4x2c[_0xb81e[80]]= qs[_0xb81e[81]](_0x60a4x20[_0xb81e[71]][_0xb81e[81]]);_0x60a4x2c[_0xb81e[82]]= qs[_0xb81e[73]](_[_0xb81e[83]](_0x60a4x20[_0xb81e[71]],_0x60a4x38[_0xb81e[73]]));if(_0x60a4x3a[_0xb81e[70]]){if(_0x60a4x3a[_0xb81e[72]]){_0x60a4x3a[_0xb81e[72]]= moment(_0x60a4x3a[_0xb81e[72]])[_0xb81e[85]](1,_0xb81e[84])}else {_0x60a4x3a[_0xb81e[72]]= moment(_0x60a4x3a[_0xb81e[70]])[_0xb81e[85]](1,_0xb81e[84])};_[_0xb81e[86]](_0x60a4x2c[_0xb81e[82]],{createdAt:{$gte:_0x60a4x3a[_0xb81e[70]],$lte:_0x60a4x3a[_0xb81e[72]]}})};if(_0x60a4x20[_0xb81e[71]][_0xb81e[87]]){_0x60a4x2c[_0xb81e[82]]= _[_0xb81e[86]](_0x60a4x2c[_0xb81e[82]],{$or:_[_0xb81e[89]](_0x60a4x2c[_0xb81e[75]],function(_0x60a4x3b){var _0x60a4x39={};_0x60a4x39[_0x60a4x3b]= {$like:_0xb81e[88]+ _0x60a4x20[_0xb81e[71]][_0xb81e[87]]+ _0xb81e[88]};return _0x60a4x39})})};_0x60a4x2c= _[_0xb81e[86]]({},_0x60a4x2c,_0x60a4x20[_0xb81e[90]]);var _0x60a4x3c={where:_0x60a4x2c[_0xb81e[82]]};_0x60a4x3c[_0xb81e[91]]= [];if(_0x60a4x20[_0xb81e[71]][_0xb81e[92]]){_0x60a4x3c[_0xb81e[91]][_0xb81e[96]]({model:db[_0xb81e[93]],as:_0xb81e[94],attributes:[_0xb81e[95]],where:{id:_0x60a4x20[_0xb81e[71]][_0xb81e[92]]},required:true});_0x60a4x3c[_0xb81e[97]]= true};if(_0x60a4x20[_0xb81e[71]][_0xb81e[98]]){_0x60a4x3c[_0xb81e[91]][_0xb81e[96]]({model:db[_0xb81e[99]],as:_0xb81e[100],attributes:[_0xb81e[95],_0xb81e[101],_0xb81e[102],_0xb81e[98]],where:{direction:_0xb81e[103],read:_0x60a4x20[_0xb81e[71]][_0xb81e[98]]|| false},required:true});_0x60a4x3c[_0xb81e[97]]= true};return db[_0xb81e[68]][_0xb81e[50]](_0x60a4x3c)[_0xb81e[44]](function(_0x60a4x2d){_0x60a4x39[_0xb81e[50]]= _0x60a4x2d;if(_0x60a4x20[_0xb81e[71]][_0xb81e[105]]){_0x60a4x2c[_0xb81e[91]]= [{model:db[_0xb81e[106]],as:_0xb81e[107],required:false,attributes:[_0xb81e[95],_0xb81e[63],_0xb81e[108]]},{model:db[_0xb81e[109]],as:_0xb81e[110],required:false},{model:db[_0xb81e[106]],as:_0xb81e[111],attributes:[_0xb81e[63],_0xb81e[108],_0xb81e[112]],required:false},{model:db[_0xb81e[113]],as:_0xb81e[114],attributes:[_0xb81e[63],_0xb81e[115]],required:false},{model:db[_0xb81e[99]],as:_0xb81e[100],attributes:[_0xb81e[95],_0xb81e[101],_0xb81e[102],_0xb81e[98]],where:{direction:_0xb81e[103],read:_0x60a4x20[_0xb81e[71]][_0xb81e[98]]|| false},required:_0x60a4x20[_0xb81e[71]][_0xb81e[98]]|| false},{model:db[_0xb81e[93]],as:_0xb81e[94],attributes:[_0xb81e[95],_0xb81e[63],_0xb81e[116]],required:_0x60a4x20[_0xb81e[71]][_0xb81e[92]]?true:false},{model:db[_0xb81e[93]],as:_0xb81e[117],attributes:[_0xb81e[95],_0xb81e[63],_0xb81e[116]],through:_0x60a4x20[_0xb81e[71]][_0xb81e[92]]?{attributes:[],where:{TagId:_0x60a4x20[_0xb81e[71]][_0xb81e[92]]|| undefined}}:{},required:_0x60a4x20[_0xb81e[71]][_0xb81e[92]]?true:false}]};return db[_0xb81e[68]][_0xb81e[118]](_0x60a4x2c)})[_0xb81e[44]](function(_0x60a4x3d){_0x60a4x39[_0xb81e[104]]= _0x60a4x3d;return _0x60a4x39})[_0xb81e[44]](respondWithFilteredResult(_0x60a4x26,_0x60a4x2c))[_0xb81e[35]](handleError(_0x60a4x26,null))};exports[_0xb81e[119]]= function(_0x60a4x20,_0x60a4x26){var _0x60a4x2c={raw:false,where:{id:_0x60a4x20[_0xb81e[120]][_0xb81e[95]]}},_0x60a4x38={};_0x60a4x38[_0xb81e[66]]= _[_0xb81e[69]](db[_0xb81e[68]][_0xb81e[67]]);_0x60a4x38[_0xb81e[71]]= _[_0xb81e[69]](_0x60a4x20[_0xb81e[71]]);_0x60a4x38[_0xb81e[73]]= _[_0xb81e[74]](_0x60a4x38[_0xb81e[66]],_0x60a4x38[_0xb81e[71]]);_0x60a4x2c[_0xb81e[75]]= _[_0xb81e[74]](_0x60a4x38[_0xb81e[66]],qs[_0xb81e[76]](_0x60a4x20[_0xb81e[71]][_0xb81e[76]]));_0x60a4x2c[_0xb81e[75]]= (_0x60a4x2c[_0xb81e[75]][_0xb81e[77]])?_0x60a4x2c[_0xb81e[75]]:_0x60a4x38[_0xb81e[66]];if(_0x60a4x20[_0xb81e[71]][_0xb81e[105]]){_0x60a4x2c[_0xb81e[91]]= [{all:true}]};_0x60a4x2c= _[_0xb81e[86]]({},_0x60a4x2c,_0x60a4x20[_0xb81e[90]]);return db[_0xb81e[68]][_0xb81e[121]](_0x60a4x2c)[_0xb81e[44]](handleEntityNotFound(_0x60a4x26,null))[_0xb81e[44]](respondWithResult(_0x60a4x26,null))[_0xb81e[35]](handleError(_0x60a4x26,null))};exports[_0xb81e[122]]= function(_0x60a4x20,_0x60a4x26){return db[_0xb81e[68]][_0xb81e[122]](_0x60a4x20[_0xb81e[123]],{})[_0xb81e[44]](respondWithResult(_0x60a4x26,201))[_0xb81e[35]](handleError(_0x60a4x26,null))};exports[_0xb81e[60]]= function(_0x60a4x20,_0x60a4x26){if(_0x60a4x20[_0xb81e[123]][_0xb81e[95]]){delete _0x60a4x20[_0xb81e[123]][_0xb81e[95]]};return db[_0xb81e[68]][_0xb81e[121]]({where:{id:_0x60a4x20[_0xb81e[120]][_0xb81e[95]]}})[_0xb81e[44]](handleEntityNotFound(_0x60a4x26,null))[_0xb81e[44]](saveUpdates(_0x60a4x20[_0xb81e[123]],null))[_0xb81e[44]](respondWithResult(_0x60a4x26,null))[_0xb81e[35]](handleError(_0x60a4x26,null))};exports[_0xb81e[61]]= function(_0x60a4x20,_0x60a4x26){return db[_0xb81e[68]][_0xb81e[121]]({where:{id:_0x60a4x20[_0xb81e[120]][_0xb81e[95]]}})[_0xb81e[44]](handleEntityNotFound(_0x60a4x26,null))[_0xb81e[44]](removeEntity(_0x60a4x26,null))[_0xb81e[35]](handleError(_0x60a4x26,null))};exports[_0xb81e[124]]= function(_0x60a4x20,_0x60a4x26){return db[_0xb81e[68]][_0xb81e[124]]()[_0xb81e[44]](respondWithResult(_0x60a4x26,null))[_0xb81e[35]](handleError(_0x60a4x26,null))};exports[_0xb81e[125]]= function(_0x60a4x20,_0x60a4x26,_0x60a4x3e){if(_0x60a4x20[_0xb81e[123]][_0xb81e[95]]){delete _0x60a4x20[_0xb81e[123]][_0xb81e[95]]};return db[_0xb81e[68]][_0xb81e[121]]({where:{id:_0x60a4x20[_0xb81e[120]][_0xb81e[95]]}})[_0xb81e[44]](function(_0x60a4x29){if(!_0x60a4x29){logger[_0xb81e[34]](_0xb81e[130],_0xb81e[125],404,_0xb81e[131]);_0x60a4x26[_0xb81e[46]](404)}else {if(_0x60a4x29[_0xb81e[132]]){throw  new db[_0xb81e[134]].ValidationError(_0xb81e[133])}};return _0x60a4x29})[_0xb81e[44]](function(_0x60a4x29){if(_0x60a4x29){return _0x60a4x29[_0xb81e[60]]({closed:_0x60a4x20[_0xb81e[123]][_0xb81e[127]],closedAt:_0x60a4x20[_0xb81e[123]][_0xb81e[128]],disposition:_0x60a4x20[_0xb81e[123]][_0xb81e[129]]})[_0xb81e[44]](function(_0x60a4x34){return _0x60a4x34})}})[_0xb81e[44]](function(_0x60a4x29){return respondWithRpcPromise(_0xb81e[126],_0xb81e[125],_0x60a4x20[_0xb81e[123]],client9004)})[_0xb81e[44]](respondWithResult(_0x60a4x26,null))[_0xb81e[35]](handleError(_0x60a4x26,null))};exports[_0xb81e[135]]= function(_0x60a4x20,_0x60a4x26,_0x60a4x3e){_0x60a4x20[_0xb81e[123]][_0xb81e[63]]= _0x60a4x20[_0xb81e[137]][_0xb81e[136]];_0x60a4x20[_0xb81e[123]][_0xb81e[138]]= _0x60a4x20[_0xb81e[137]][_0xb81e[139]];_0x60a4x20[_0xb81e[123]][_0xb81e[140]]= _0x60a4x20[_0xb81e[137]][_0xb81e[141]];return db[_0xb81e[142]][_0xb81e[122]](_0x60a4x20[_0xb81e[123]])[_0xb81e[44]](respondWithResult(_0x60a4x26,201))[_0xb81e[35]](handleError(_0x60a4x26,null))};exports[_0xb81e[143]]= function(_0x60a4x20,_0x60a4x26,_0x60a4x3e){return db[_0xb81e[68]][_0xb81e[150]]({where:{id:_0x60a4x20[_0xb81e[120]][_0xb81e[95]]},raw:true})[_0xb81e[44]](handleEntityNotFound(_0x60a4x26,null))[_0xb81e[44]](function(_0x60a4x3f){if(_0x60a4x3f){if(_0x60a4x3f[_0xb81e[127]]){return _0x60a4x26[_0xb81e[48]](403)[_0xb81e[49]]({status:403,message:_0xb81e[148]})};return db[_0xb81e[142]][_0xb81e[150]]({where:{id:_0x60a4x20[_0xb81e[71]][_0xb81e[149]]},raw:true})[_0xb81e[44]](handleEntityNotFound(_0x60a4x26,null))}})[_0xb81e[44]](function(_0x60a4x29){if(_0x60a4x29){return _0x60a4x26[_0xb81e[147]](path[_0xb81e[146]](config[_0xb81e[144]],_0xb81e[145],_0x60a4x29[_0xb81e[138]]))}})[_0xb81e[35]](handleError(_0x60a4x26,null))};exports[_0xb81e[151]]= function(_0x60a4x20,_0x60a4x26){var _0x60a4x3f=null;var _0x60a4x40=null;var _0x60a4x41=null;var _0x60a4x42=null;if(_0x60a4x20[_0xb81e[123]][_0xb81e[95]]){delete _0x60a4x20[_0xb81e[123]][_0xb81e[95]]};if(_0x60a4x20[_0xb81e[123]][_0xb81e[152]]){_0x60a4x42= path[_0xb81e[146]](config[_0xb81e[144]],_0xb81e[153],util[_0xb81e[156]](_0xb81e[154],Date[_0xb81e[155]]()));_0x60a4x20[_0xb81e[123]][_0xb81e[157]]= _0x60a4x42};return db[_0xb81e[68]][_0xb81e[121]]({where:{id:_0x60a4x20[_0xb81e[120]][_0xb81e[95]]},include:[{model:db[_0xb81e[99]],as:_0xb81e[100]}]})[_0xb81e[44]](handleEntityNotFound(_0x60a4x26,null))[_0xb81e[44]](saveUpdates(_0x60a4x20[_0xb81e[123]],null))[_0xb81e[44]](function(_0x60a4x29){if(_0x60a4x29){_0x60a4x3f= _0x60a4x29;return db[_0xb81e[113]][_0xb81e[121]]({where:{id:_0x60a4x3f[_0xb81e[184]]}})}})[_0xb81e[44]](function(_0x60a4x29){if(_0x60a4x29){_0x60a4x41= _0x60a4x29;return db[_0xb81e[109]][_0xb81e[121]]({where:{id:_0x60a4x3f[_0xb81e[178]]}})}})[_0xb81e[44]](function(_0x60a4x29){if(_0x60a4x29){_0x60a4x40= _0x60a4x29;if(_0x60a4x42){var _0x60a4x43=null;for(var _0x60a4x44=0;_0x60a4x44< _0x60a4x3f[_0xb81e[100]][_0xb81e[77]];++_0x60a4x44){_0x60a4x43= _0x60a4x3f[_0xb81e[100]][_0x60a4x44];var _0x60a4x45=_0x60a4x41[_0xb81e[173]]?(_0x60a4x41[_0xb81e[173]]+ _0x60a4x43[_0xb81e[132]]):(_0x60a4x43[_0xb81e[132]]?_0xb81e[174]+ _0x60a4x43[_0xb81e[132]]:_0xb81e[175]);var _0x60a4x24=_0x60a4x40[_0xb81e[176]]|| (_0xb81e[177]+ _0x60a4x43[_0xb81e[178]]);var _0x60a4x46=util[_0xb81e[156]](_0xb81e[179],moment(_0x60a4x43[_0xb81e[102]])[_0xb81e[156]](_0xb81e[180]),(_0x60a4x43[_0xb81e[101]]=== _0xb81e[103])?_0x60a4x24:_0x60a4x45,_0x60a4x43[_0xb81e[123]]);fs[_0xb81e[181]](_0x60a4x42,_0x60a4x46)};return db[_0xb81e[183]][_0xb81e[150]]({where:{service:true},include:[{model:db[_0xb81e[182]],as:_0xb81e[158],raw:true}]})}}})[_0xb81e[44]](function(_0x60a4x29){if(_0x60a4x29&& _0x60a4x29[_0xb81e[158]]&& _0x60a4x20[_0xb81e[123]]){var _0x60a4x2c={tls:{rejectUnauthorized:false}};if(_0x60a4x29[_0xb81e[158]][_0xb81e[159]]){_0x60a4x2c[_0xb81e[159]]= _0x60a4x29[_0xb81e[158]][_0xb81e[159]]}else {_0x60a4x2c[_0xb81e[160]]= _0x60a4x29[_0xb81e[158]][_0xb81e[160]];_0x60a4x2c[_0xb81e[161]]= _0x60a4x29[_0xb81e[158]][_0xb81e[161]];_0x60a4x2c[_0xb81e[162]]= _0x60a4x29[_0xb81e[158]][_0xb81e[162]]};if(_0x60a4x29[_0xb81e[158]][_0xb81e[163]]){_0x60a4x2c[_0xb81e[164]]= {user:_0x60a4x29[_0xb81e[158]][_0xb81e[165]],pass:_0x60a4x29[_0xb81e[158]][_0xb81e[166]]}};return respondWithRpcPromise(_0xb81e[167],_0xb81e[168],{account:_0x60a4x2c,message:{from:util[_0xb81e[156]](_0xb81e[169],_0x60a4x29[_0xb81e[63]],_0x60a4x29[_0xb81e[170]]|| _0x60a4x29[_0xb81e[158]][_0xb81e[165]]),to:_0x60a4x20[_0xb81e[123]][_0xb81e[152]],subject:_0xb81e[171],text:util[_0xb81e[156]](_0xb81e[172],_0x60a4x20[_0xb81e[123]][_0xb81e[152]]),attachments:[{path:_0x60a4x42}]}})[_0xb81e[44]](function(){return _0x60a4x3f})[_0xb81e[35]](function(_0x60a4x25){console[_0xb81e[34]](_0x60a4x25)})}else {return _0x60a4x3f}})[_0xb81e[44]](respondWithStatusCode(_0x60a4x26,200))[_0xb81e[35]](handleError(_0x60a4x26,null))};exports[_0xb81e[185]]= function(_0x60a4x20,_0x60a4x26,_0x60a4x3e){return db[_0xb81e[99]][_0xb81e[121]]({where:{id:_0x60a4x20[_0xb81e[120]][_0xb81e[95]]}})[_0xb81e[44]](handleEntityNotFound(_0x60a4x26,null))[_0xb81e[44]](function(_0x60a4x29){if(_0x60a4x29){return _0x60a4x29[_0xb81e[185]](_0x60a4x20[_0xb81e[123]][_0xb81e[186]],_[_0xb81e[187]](_0x60a4x20[_0xb81e[123]],[_0xb81e[186],_0xb81e[95]])|| {})}})[_0xb81e[44]](respondWithResult(_0x60a4x26,null))[_0xb81e[35]](handleError(_0x60a4x26,null))};exports[_0xb81e[188]]= function(_0x60a4x20,_0x60a4x26,_0x60a4x3e){var _0x60a4x2c={raw:false,where:{}};var _0x60a4x38={};var _0x60a4x47={count:0,rows:[]};return db[_0xb81e[68]][_0xb81e[150]]({where:{id:_0x60a4x20[_0xb81e[120]][_0xb81e[95]]}})[_0xb81e[44]](handleEntityNotFound(_0x60a4x26,null))[_0xb81e[44]](function(_0x60a4x29){if(_0x60a4x29){_0x60a4x38[_0xb81e[66]]= _[_0xb81e[69]](db[_0xb81e[99]][_0xb81e[67]]);_0x60a4x38[_0xb81e[71]]= _[_0xb81e[69]](_0x60a4x20[_0xb81e[71]]);_0x60a4x38[_0xb81e[73]]= _[_0xb81e[74]](_0x60a4x38[_0xb81e[66]],_0x60a4x38[_0xb81e[71]]);_0x60a4x2c[_0xb81e[75]]= _[_0xb81e[74]](_0x60a4x38[_0xb81e[66]],qs[_0xb81e[76]](_0x60a4x20[_0xb81e[71]][_0xb81e[76]]));_0x60a4x2c[_0xb81e[75]]= (_0x60a4x2c[_0xb81e[75]][_0xb81e[77]])?_0x60a4x2c[_0xb81e[75]]:_0x60a4x38[_0xb81e[66]];if(!_0x60a4x20[_0xb81e[71]][_0xb81e[79]](_0xb81e[78])){_0x60a4x2c[_0xb81e[52]]= qs[_0xb81e[52]](_0x60a4x20[_0xb81e[71]][_0xb81e[52]]);_0x60a4x2c[_0xb81e[51]]= qs[_0xb81e[51]](_0x60a4x20[_0xb81e[71]][_0xb81e[51]])};_0x60a4x2c[_0xb81e[80]]= qs[_0xb81e[81]](_0x60a4x20[_0xb81e[71]][_0xb81e[81]]);_0x60a4x2c[_0xb81e[82]]= qs[_0xb81e[73]](_[_0xb81e[83]](_0x60a4x20[_0xb81e[71]],_0x60a4x38[_0xb81e[73]]));_0x60a4x2c[_0xb81e[82]][_0xb81e[189]]= _0x60a4x29[_0xb81e[95]];if(_0x60a4x20[_0xb81e[71]][_0xb81e[87]]){_0x60a4x2c[_0xb81e[82]]= _[_0xb81e[86]](_0x60a4x2c[_0xb81e[82]],{$or:_[_0xb81e[89]](_0x60a4x2c[_0xb81e[75]],function(_0x60a4x3b){var _0x60a4x39={};_0x60a4x39[_0x60a4x3b]= {$like:_0xb81e[88]+ _0x60a4x20[_0xb81e[71]][_0xb81e[87]]+ _0xb81e[88]};return _0x60a4x39})})};if(_0x60a4x20[_0xb81e[71]][_0xb81e[190]]){var _0x60a4x48=_0x60a4x20[_0xb81e[71]][_0xb81e[190]][_0xb81e[192]](_0xb81e[191]);var _0x60a4x39={};_0x60a4x39[_0x60a4x48[0]]= {$gte:moment(_0x60a4x48[1])[_0xb81e[156]](_0xb81e[193])};_0x60a4x2c[_0xb81e[82]]= _[_0xb81e[86]](_0x60a4x2c[_0xb81e[82]],_0x60a4x39)};_0x60a4x2c= _[_0xb81e[86]]({},_0x60a4x2c,_0x60a4x20[_0xb81e[90]]);return db[_0xb81e[99]][_0xb81e[50]]({where:_0x60a4x2c[_0xb81e[82]]})[_0xb81e[44]](function(_0x60a4x2d){_0x60a4x47[_0xb81e[50]]= _0x60a4x2d;if(_0x60a4x20[_0xb81e[71]][_0xb81e[105]]){_0x60a4x2c[_0xb81e[91]]= [{all:true}]};return db[_0xb81e[99]][_0xb81e[118]](_0x60a4x2c)})[_0xb81e[44]](function(_0x60a4x3d){_0x60a4x47[_0xb81e[104]]= _0x60a4x3d;return _0x60a4x47})}})[_0xb81e[44]](respondWithFilteredResult(_0x60a4x26,_0x60a4x2c))[_0xb81e[35]](handleError(_0x60a4x26,null))};exports[_0xb81e[194]]= function(_0x60a4x20,_0x60a4x26,_0x60a4x3e){var _0x60a4x2c={where:{}},_0x60a4x38={},_0x60a4x47={count:0,rows:[]};return db[_0xb81e[68]][_0xb81e[150]]({where:{id:_0x60a4x20[_0xb81e[120]][_0xb81e[95]]}})[_0xb81e[44]](handleEntityNotFound(_0x60a4x26,null))[_0xb81e[44]](function(_0x60a4x29){if(_0x60a4x29){_0x60a4x38[_0xb81e[66]]= _[_0xb81e[69]](db[_0xb81e[99]][_0xb81e[67]]);_0x60a4x38[_0xb81e[71]]= _[_0xb81e[69]](_0x60a4x20[_0xb81e[71]]);_0x60a4x38[_0xb81e[73]]= _[_0xb81e[74]](_0x60a4x38[_0xb81e[66]],_0x60a4x38[_0xb81e[71]]);_0x60a4x2c[_0xb81e[75]]= _[_0xb81e[74]](_0x60a4x38[_0xb81e[66]],qs[_0xb81e[76]](_0x60a4x20[_0xb81e[71]][_0xb81e[76]]));_0x60a4x2c[_0xb81e[75]]= (_0x60a4x2c[_0xb81e[75]][_0xb81e[77]])?_0x60a4x2c[_0xb81e[75]]:_0x60a4x38[_0xb81e[66]];if(!_0x60a4x20[_0xb81e[71]][_0xb81e[79]](_0xb81e[78])){_0x60a4x2c[_0xb81e[52]]= qs[_0xb81e[52]](_0x60a4x20[_0xb81e[71]][_0xb81e[52]]);_0x60a4x2c[_0xb81e[51]]= qs[_0xb81e[51]](_0x60a4x20[_0xb81e[71]][_0xb81e[51]])};_0x60a4x2c[_0xb81e[80]]= qs[_0xb81e[81]](_0x60a4x20[_0xb81e[71]][_0xb81e[81]]);_0x60a4x2c[_0xb81e[82]]= qs[_0xb81e[73]](_[_0xb81e[83]](_0x60a4x20[_0xb81e[71]],_0x60a4x38[_0xb81e[73]]));_0x60a4x2c[_0xb81e[82]][_0xb81e[189]]= _0x60a4x29[_0xb81e[95]];if(_0x60a4x20[_0xb81e[71]][_0xb81e[87]]){_0x60a4x2c[_0xb81e[82]]= _[_0xb81e[86]](_0x60a4x2c[_0xb81e[82]],{$or:_[_0xb81e[89]](_0x60a4x2c[_0xb81e[75]],function(_0x60a4x3b){var _0x60a4x39={};_0x60a4x39[_0x60a4x3b]= {$like:_0xb81e[88]+ _0x60a4x20[_0xb81e[71]][_0xb81e[87]]+ _0xb81e[88]};return _0x60a4x39})})};_0x60a4x2c[_0xb81e[82]][_0xb81e[195]]= false;if(_0x60a4x20[_0xb81e[71]][_0xb81e[95]]){_0x60a4x2c[_0xb81e[82]][_0xb81e[95]]= {$gt:_0x60a4x20[_0xb81e[71]][_0xb81e[95]]}};_0x60a4x2c= _[_0xb81e[86]]({},_0x60a4x2c,_0x60a4x20[_0xb81e[90]]);return db[_0xb81e[99]][_0xb81e[50]]({where:_0x60a4x2c[_0xb81e[82]]})[_0xb81e[44]](function(_0x60a4x2d){_0x60a4x47[_0xb81e[50]]= _0x60a4x2d;_0x60a4x2c[_0xb81e[91]]= [];if(_0x60a4x20[_0xb81e[71]][_0xb81e[196]]){_0x60a4x2c[_0xb81e[91]][_0xb81e[96]]({model:db[_0xb81e[106]],as:_0xb81e[106],attributes:[_0xb81e[95],_0xb81e[108],_0xb81e[197]]})};if(_0x60a4x20[_0xb81e[71]][_0xb81e[105]]){_0x60a4x2c[_0xb81e[91]]= [{all:true}]};return db[_0xb81e[99]][_0xb81e[118]](_0x60a4x2c)})[_0xb81e[44]](function(_0x60a4x3d){_0x60a4x47[_0xb81e[104]]= _0x60a4x3d;return _0x60a4x47})}})[_0xb81e[44]](respondWithFilteredResult(_0x60a4x26,_0x60a4x2c))[_0xb81e[35]](handleError(_0x60a4x26,null))};exports[_0xb81e[198]]= function(_0x60a4x20,_0x60a4x26,_0x60a4x3e){return db[_0xb81e[68]][_0xb81e[121]]({where:{id:_0x60a4x20[_0xb81e[120]][_0xb81e[95]]}})[_0xb81e[44]](handleEntityNotFound(_0x60a4x26,null))[_0xb81e[44]](function(_0x60a4x29){if(_0x60a4x29){return _0x60a4x29[_0xb81e[202]](_0x60a4x20[_0xb81e[123]][_0xb81e[186]],_[_0xb81e[187]](_0x60a4x20[_0xb81e[123]],[_0xb81e[186],_0xb81e[95]])|| {})[_0xb81e[201]](function(){return db[_0xb81e[93]][_0xb81e[118]]({attributes:[_0xb81e[95],_0xb81e[63],_0xb81e[116]],where:{id:_0x60a4x20[_0xb81e[123]][_0xb81e[186]]}})})[_0xb81e[44]](function(_0x60a4x49){socket[_0xb81e[200]](_0xb81e[199],{id:Number(_0x60a4x20[_0xb81e[120]][_0xb81e[95]]),tags:_0x60a4x49|| []});return {id:Number(_0x60a4x20[_0xb81e[120]][_0xb81e[95]]),tags:_0x60a4x49|| []}})}})[_0xb81e[44]](respondWithResult(_0x60a4x26,null))[_0xb81e[35]](handleError(_0x60a4x26,null))};exports[_0xb81e[203]]= function(_0x60a4x20,_0x60a4x26,_0x60a4x3e){var _0x60a4x4a;return db[_0xb81e[68]][_0xb81e[121]]({where:{id:_0x60a4x20[_0xb81e[120]][_0xb81e[95]]}})[_0xb81e[44]](handleEntityNotFound(_0x60a4x26,null))[_0xb81e[44]](function(_0x60a4x29){if(_0x60a4x29){return _0x60a4x29[_0xb81e[203]](_0x60a4x20[_0xb81e[71]][_0xb81e[186]])}})[_0xb81e[44]](respondWithStatusCode(_0x60a4x26,null))[_0xb81e[35]](handleError(_0x60a4x26,null))}
\ No newline at end of file
+var _0xfa94=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x74\x61\x67","\x54\x61\x67","\x54\x61\x67\x73","\x69\x64","\x70\x75\x73\x68","\x64\x69\x73\x74\x69\x6E\x63\x74","\x72\x65\x61\x64","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x4D\x65\x73\x73\x61\x67\x65\x73","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x69\x6E","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x55\x73\x65\x72","\x55\x73\x65\x72\x73","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x4F\x77\x6E\x65\x72","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79","\x63\x6F\x6C\x6F\x72","\x54\x68\x72\x6F\x75\x67\x68\x54\x61\x67\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x62\x61\x6E\x64\x6F\x6E","\x41\x62\x61\x6E\x64\x6F\x6E\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x63\x6C\x6F\x73\x65\x64","\x63\x6C\x6F\x73\x65\x64\x41\x74","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x62\x61\x6E\x64\x6F\x6E\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x6E\x74\x69\x74\x79\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x55\x73\x65\x72\x49\x64","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x61\x73\x73\x69\x67\x6E\x65\x64","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x55\x70\x6C\x6F\x61\x64","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x6E\x61\x6D\x65","\x66\x69\x6C\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x74\x79\x70\x65","\x6D\x69\x6D\x65\x74\x79\x70\x65","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x44\x6F\x77\x6E\x6C\x6F\x61\x64","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73\x2F","\x6A\x6F\x69\x6E","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x55\x6E\x61\x75\x74\x68\x6F\x72\x69\x7A\x65\x64","\x61\x74\x74\x61\x63\x68\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x63\x6C\x6F\x73\x65","\x6D\x61\x69\x6C\x54\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x63\x68\x61\x74\x2F\x75\x70\x6C\x6F\x61\x64\x2F","\x74\x72\x61\x6E\x73\x63\x72\x69\x70\x74\x2D\x25\x73\x2E\x74\x78\x74","\x6E\x6F\x77","\x66\x6F\x72\x6D\x61\x74","\x70\x61\x74\x68\x54\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x53\x6D\x74\x70","\x73\x65\x72\x76\x69\x63\x65","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x65\x63\x75\x72\x65","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E","\x61\x75\x74\x68","\x75\x73\x65\x72","\x70\x61\x73\x73","\x53\x65\x6E\x64\x4D\x61\x69\x6C","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x65\x6D\x61\x69\x6C","\x4D\x61\x69\x6C\x20\x54\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x48\x69\x20\x25\x73\x2C\x20\x61\x74\x74\x61\x63\x68\x65\x64\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x66\x69\x6E\x64\x20\x79\x6F\x75\x72\x20\x74\x72\x61\x6E\x73\x63\x72\x69\x70\x74\x20\x66\x69\x6C\x65\x2E\x20\x0A\x0A\x52\x65\x67\x61\x72\x64\x73\x2E\x20\x0A\x0A","\x61\x67\x65\x6E\x74\x41\x6C\x69\x61\x73","\x41\x67\x65\x6E\x74","\x53\x79\x73\x74\x65\x6D","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","\x56\x69\x73\x69\x74\x6F\x72","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x5B\x25\x73\x5D\x20\x25\x73\x3A\x20\x25\x73\x0A","\x4D\x4D\x2F\x44\x44\x2F\x59\x59\x59\x59\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x61\x70\x70\x65\x6E\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x69\x64\x73","\x6F\x6D\x69\x74","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x24\x67\x74\x65","\x2C","\x73\x70\x6C\x69\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x67\x65\x74\x4D\x79\x4D\x65\x73\x73\x61\x67\x65\x73","\x73\x65\x63\x72\x65\x74","\x69\x6E\x63\x6C\x75\x64\x65\x41\x67\x65\x6E\x74","\x61\x6C\x69\x61\x73","\x61\x64\x64\x54\x61\x67\x73","\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x54\x61\x67\x73\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x73\x65\x74\x54\x61\x67\x73","\x72\x65\x6D\x6F\x76\x65\x54\x61\x67\x73"];_0xfa94[0];var jsonpatch=require(_0xfa94[1]);var rp=require(_0xfa94[2]);var moment=require(_0xfa94[3]);var BPromise=require(_0xfa94[4]);var Mustache=require(_0xfa94[5]);var util=require(_0xfa94[6]);var path=require(_0xfa94[7]);var sox=require(_0xfa94[8]);var csv=require(_0xfa94[9]);var ejs=require(_0xfa94[10]);var fs=require(_0xfa94[11]);var _=require(_0xfa94[12]);var squel=require(_0xfa94[13]);var crypto=require(_0xfa94[14]);var jsforce=require(_0xfa94[15]);var deskjs=require(_0xfa94[16]);var toCsv=require(_0xfa94[9]);var querystring=require(_0xfa94[17]);var Papa=require(_0xfa94[18]);var qs=require(_0xfa94[19]);var logger=require(_0xfa94[21])(_0xfa94[20]);var utils=require(_0xfa94[22]);var config=require(_0xfa94[23]);var db=require(_0xfa94[25])[_0xfa94[24]];var socket=require(_0xfa94[27])({host:_0xfa94[26],port:6379});require(_0xfa94[29])[_0xfa94[28]](socket);var jayson=require(_0xfa94[30]);var client=jayson[_0xfa94[32]][_0xfa94[31]]({port:9003});var client9004=jayson[_0xfa94[32]][_0xfa94[31]]({port:9004});function respondWithRpcPromise(_0xbe7cx1e,_0xbe7cx1f,_0xbe7cx20,_0xbe7cx21){return  new BPromise(function(_0xbe7cx22,_0xbe7cx23){var _0xbe7cx24=(_0xbe7cx21|| client);return _0xbe7cx24[_0xfa94[45]](_0xbe7cx1e,_0xbe7cx20)[_0xfa94[44]](function(_0xbe7cx26){logger[_0xfa94[37]](_0xfa94[33],_0xbe7cx1f,_0xfa94[36]);logger[_0xfa94[40]](_0xfa94[38],_0xbe7cx1f,_0xfa94[36],JSON[_0xfa94[39]](_0xbe7cx26));if(_0xbe7cx26[_0xfa94[34]]){if(_0xbe7cx26[_0xfa94[34]][_0xfa94[41]]=== 500){logger[_0xfa94[34]](_0xfa94[33],_0xbe7cx1f,_0xbe7cx26[_0xfa94[34]][_0xfa94[42]]);return _0xbe7cx23(_0xbe7cx26[_0xfa94[34]][_0xfa94[42]])};logger[_0xfa94[34]](_0xfa94[33],_0xbe7cx1f,_0xbe7cx26[_0xfa94[34]][_0xfa94[42]]);return _0xbe7cx22(_0xbe7cx26[_0xfa94[34]][_0xfa94[42]])}else {logger[_0xfa94[37]](_0xfa94[33],_0xbe7cx1f,_0xfa94[36]);_0xbe7cx22(_0xbe7cx26[_0xfa94[43]][_0xfa94[42]])}})[_0xfa94[35]](function(_0xbe7cx25){logger[_0xfa94[34]](_0xfa94[33],_0xbe7cx1f,_0xbe7cx25);_0xbe7cx23(_0xbe7cx25)})})}function respondWithStatusCode(_0xbe7cx26,_0xbe7cx28){_0xbe7cx28= _0xbe7cx28|| 204;return function(_0xbe7cx29){if(_0xbe7cx29){return _0xbe7cx26[_0xfa94[46]](_0xbe7cx28)};return _0xbe7cx26[_0xfa94[48]](_0xbe7cx28)[_0xfa94[47]]()}}function respondWithResult(_0xbe7cx26,_0xbe7cx28){_0xbe7cx28= _0xbe7cx28|| 200;return function(_0xbe7cx29){if(_0xbe7cx29){return _0xbe7cx26[_0xfa94[48]](_0xbe7cx28)[_0xfa94[49]](_0xbe7cx29)}}}function respondWithFilteredResult(_0xbe7cx26,_0xbe7cx2c){return function(_0xbe7cx29){if(_0xbe7cx29){var _0xbe7cx2d=_0xbe7cx29[_0xfa94[50]],_0xbe7cx2e=_0xbe7cx2c[_0xfa94[51]],_0xbe7cx2f=_0xbe7cx2c[_0xfa94[51]]+ _0xbe7cx2c[_0xfa94[52]],_0xbe7cx28;if(_0xbe7cx2f>= _0xbe7cx2d){_0xbe7cx2f= _0xbe7cx2d;_0xbe7cx28= 200}else {_0xbe7cx28= 206};_0xbe7cx26[_0xfa94[48]](_0xbe7cx28);return _0xbe7cx26[_0xfa94[56]](_0xfa94[53],_0xbe7cx2e+ _0xfa94[54]+ _0xbe7cx2f+ _0xfa94[55]+ _0xbe7cx2d)[_0xfa94[49]](_0xbe7cx29)};return null}}function patchUpdates(_0xbe7cx31){return function(_0xbe7cx29){try{jsonpatch[_0xfa94[57]](_0xbe7cx29,_0xbe7cx31,true)}catch(err){return BPromise[_0xfa94[58]](err)};return _0xbe7cx29[_0xfa94[59]]()}}function saveUpdates(_0xbe7cx33,_0xbe7cx28){return function(_0xbe7cx29){if(_0xbe7cx29){return _0xbe7cx29[_0xfa94[60]](_0xbe7cx33)[_0xfa94[44]](function(_0xbe7cx34){return _0xbe7cx34})};return null}}function removeEntity(_0xbe7cx26,_0xbe7cx28){return function(_0xbe7cx29){if(_0xbe7cx29){return _0xbe7cx29[_0xfa94[61]]()[_0xfa94[44]](function(){_0xbe7cx26[_0xfa94[48]](204)[_0xfa94[47]]()})}}}function handleEntityNotFound(_0xbe7cx26,_0xbe7cx28){return function(_0xbe7cx29){if(!_0xbe7cx29){_0xbe7cx26[_0xfa94[46]](404)};return _0xbe7cx29}}function handleError(_0xbe7cx26,_0xbe7cx28){_0xbe7cx28= _0xbe7cx28|| 500;return function(_0xbe7cx25){logger[_0xfa94[34]](_0xbe7cx25[_0xfa94[62]]);if(_0xbe7cx25[_0xfa94[63]]){delete _0xbe7cx25[_0xfa94[63]]};_0xbe7cx26[_0xfa94[48]](_0xbe7cx28)[_0xfa94[64]](_0xbe7cx25)}}exports[_0xfa94[65]]= function(_0xbe7cx20,_0xbe7cx26){var _0xbe7cx2c={},_0xbe7cx38={},_0xbe7cx39={count:0,rows:[]};_0xbe7cx38[_0xfa94[66]]= _[_0xfa94[69]](db[_0xfa94[68]][_0xfa94[67]]);var _0xbe7cx3a={dateStart:_0xbe7cx20[_0xfa94[71]][_0xfa94[70]],dateEnd:_0xbe7cx20[_0xfa94[71]][_0xfa94[72]]};delete _0xbe7cx20[_0xfa94[71]][_0xfa94[70]];delete _0xbe7cx20[_0xfa94[71]][_0xfa94[72]];_0xbe7cx38[_0xfa94[71]]= _[_0xfa94[69]](_0xbe7cx20[_0xfa94[71]]);_0xbe7cx38[_0xfa94[73]]= _[_0xfa94[74]](_0xbe7cx38[_0xfa94[66]],_0xbe7cx38[_0xfa94[71]]);_0xbe7cx2c[_0xfa94[75]]= _[_0xfa94[74]](_0xbe7cx38[_0xfa94[66]],qs[_0xfa94[76]](_0xbe7cx20[_0xfa94[71]][_0xfa94[76]]));_0xbe7cx2c[_0xfa94[75]]= (_0xbe7cx2c[_0xfa94[75]][_0xfa94[77]])?_0xbe7cx2c[_0xfa94[75]]:_0xbe7cx38[_0xfa94[66]];if(!_0xbe7cx20[_0xfa94[71]][_0xfa94[79]](_0xfa94[78])){_0xbe7cx2c[_0xfa94[52]]= qs[_0xfa94[52]](_0xbe7cx20[_0xfa94[71]][_0xfa94[52]]);_0xbe7cx2c[_0xfa94[51]]= qs[_0xfa94[51]](_0xbe7cx20[_0xfa94[71]][_0xfa94[51]])};_0xbe7cx2c[_0xfa94[80]]= qs[_0xfa94[81]](_0xbe7cx20[_0xfa94[71]][_0xfa94[81]]);_0xbe7cx2c[_0xfa94[82]]= qs[_0xfa94[73]](_[_0xfa94[83]](_0xbe7cx20[_0xfa94[71]],_0xbe7cx38[_0xfa94[73]]));if(_0xbe7cx3a[_0xfa94[70]]){if(_0xbe7cx3a[_0xfa94[72]]){_0xbe7cx3a[_0xfa94[72]]= moment(_0xbe7cx3a[_0xfa94[72]])[_0xfa94[85]](1,_0xfa94[84])}else {_0xbe7cx3a[_0xfa94[72]]= moment(_0xbe7cx3a[_0xfa94[70]])[_0xfa94[85]](1,_0xfa94[84])};_[_0xfa94[86]](_0xbe7cx2c[_0xfa94[82]],{createdAt:{$gte:_0xbe7cx3a[_0xfa94[70]],$lte:_0xbe7cx3a[_0xfa94[72]]}})};if(_0xbe7cx20[_0xfa94[71]][_0xfa94[87]]){_0xbe7cx2c[_0xfa94[82]]= _[_0xfa94[86]](_0xbe7cx2c[_0xfa94[82]],{$or:_[_0xfa94[89]](_0xbe7cx2c[_0xfa94[75]],function(_0xbe7cx3b){var _0xbe7cx39={};_0xbe7cx39[_0xbe7cx3b]= {$like:_0xfa94[88]+ _0xbe7cx20[_0xfa94[71]][_0xfa94[87]]+ _0xfa94[88]};return _0xbe7cx39})})};_0xbe7cx2c= _[_0xfa94[86]]({},_0xbe7cx2c,_0xbe7cx20[_0xfa94[90]]);var _0xbe7cx3c={where:_0xbe7cx2c[_0xfa94[82]]};_0xbe7cx3c[_0xfa94[91]]= [];if(_0xbe7cx20[_0xfa94[71]][_0xfa94[92]]){_0xbe7cx3c[_0xfa94[91]][_0xfa94[96]]({model:db[_0xfa94[93]],as:_0xfa94[94],attributes:[_0xfa94[95]],where:{id:_0xbe7cx20[_0xfa94[71]][_0xfa94[92]]},required:true});_0xbe7cx3c[_0xfa94[97]]= true};if(_0xbe7cx20[_0xfa94[71]][_0xfa94[98]]){_0xbe7cx3c[_0xfa94[91]][_0xfa94[96]]({model:db[_0xfa94[99]],as:_0xfa94[100],attributes:[_0xfa94[95],_0xfa94[101],_0xfa94[102],_0xfa94[98]],where:{direction:_0xfa94[103],read:_0xbe7cx20[_0xfa94[71]][_0xfa94[98]]|| false},required:true});_0xbe7cx3c[_0xfa94[97]]= true};return db[_0xfa94[68]][_0xfa94[50]](_0xbe7cx3c)[_0xfa94[44]](function(_0xbe7cx2d){_0xbe7cx39[_0xfa94[50]]= _0xbe7cx2d;if(_0xbe7cx20[_0xfa94[71]][_0xfa94[105]]){_0xbe7cx2c[_0xfa94[91]]= [{model:db[_0xfa94[106]],as:_0xfa94[107],required:false,attributes:[_0xfa94[95],_0xfa94[63],_0xfa94[108]]},{model:db[_0xfa94[109]],as:_0xfa94[110],required:false},{model:db[_0xfa94[106]],as:_0xfa94[111],attributes:[_0xfa94[63],_0xfa94[108],_0xfa94[112]],required:false},{model:db[_0xfa94[113]],as:_0xfa94[114],attributes:[_0xfa94[63],_0xfa94[115]],required:false},{model:db[_0xfa94[99]],as:_0xfa94[100],attributes:[_0xfa94[95],_0xfa94[101],_0xfa94[102],_0xfa94[98]],where:{direction:_0xfa94[103],read:_0xbe7cx20[_0xfa94[71]][_0xfa94[98]]|| false},required:_0xbe7cx20[_0xfa94[71]][_0xfa94[98]]|| false},{model:db[_0xfa94[93]],as:_0xfa94[94],attributes:[_0xfa94[95],_0xfa94[63],_0xfa94[116]],required:_0xbe7cx20[_0xfa94[71]][_0xfa94[92]]?true:false},{model:db[_0xfa94[93]],as:_0xfa94[117],attributes:[_0xfa94[95],_0xfa94[63],_0xfa94[116]],through:_0xbe7cx20[_0xfa94[71]][_0xfa94[92]]?{attributes:[],where:{TagId:_0xbe7cx20[_0xfa94[71]][_0xfa94[92]]|| undefined}}:{},required:_0xbe7cx20[_0xfa94[71]][_0xfa94[92]]?true:false}]};return db[_0xfa94[68]][_0xfa94[118]](_0xbe7cx2c)})[_0xfa94[44]](function(_0xbe7cx3d){_0xbe7cx39[_0xfa94[104]]= _0xbe7cx3d;return _0xbe7cx39})[_0xfa94[44]](respondWithFilteredResult(_0xbe7cx26,_0xbe7cx2c))[_0xfa94[35]](handleError(_0xbe7cx26,null))};exports[_0xfa94[119]]= function(_0xbe7cx20,_0xbe7cx26){var _0xbe7cx2c={raw:false,where:{id:_0xbe7cx20[_0xfa94[120]][_0xfa94[95]]}},_0xbe7cx38={};_0xbe7cx38[_0xfa94[66]]= _[_0xfa94[69]](db[_0xfa94[68]][_0xfa94[67]]);_0xbe7cx38[_0xfa94[71]]= _[_0xfa94[69]](_0xbe7cx20[_0xfa94[71]]);_0xbe7cx38[_0xfa94[73]]= _[_0xfa94[74]](_0xbe7cx38[_0xfa94[66]],_0xbe7cx38[_0xfa94[71]]);_0xbe7cx2c[_0xfa94[75]]= _[_0xfa94[74]](_0xbe7cx38[_0xfa94[66]],qs[_0xfa94[76]](_0xbe7cx20[_0xfa94[71]][_0xfa94[76]]));_0xbe7cx2c[_0xfa94[75]]= (_0xbe7cx2c[_0xfa94[75]][_0xfa94[77]])?_0xbe7cx2c[_0xfa94[75]]:_0xbe7cx38[_0xfa94[66]];if(_0xbe7cx20[_0xfa94[71]][_0xfa94[105]]){_0xbe7cx2c[_0xfa94[91]]= [{all:true}]};_0xbe7cx2c= _[_0xfa94[86]]({},_0xbe7cx2c,_0xbe7cx20[_0xfa94[90]]);return db[_0xfa94[68]][_0xfa94[121]](_0xbe7cx2c)[_0xfa94[44]](handleEntityNotFound(_0xbe7cx26,null))[_0xfa94[44]](respondWithResult(_0xbe7cx26,null))[_0xfa94[35]](handleError(_0xbe7cx26,null))};exports[_0xfa94[122]]= function(_0xbe7cx20,_0xbe7cx26){return db[_0xfa94[68]][_0xfa94[122]](_0xbe7cx20[_0xfa94[123]],{})[_0xfa94[44]](respondWithResult(_0xbe7cx26,201))[_0xfa94[35]](handleError(_0xbe7cx26,null))};exports[_0xfa94[60]]= function(_0xbe7cx20,_0xbe7cx26){if(_0xbe7cx20[_0xfa94[123]][_0xfa94[95]]){delete _0xbe7cx20[_0xfa94[123]][_0xfa94[95]]};return db[_0xfa94[68]][_0xfa94[121]]({where:{id:_0xbe7cx20[_0xfa94[120]][_0xfa94[95]]}})[_0xfa94[44]](handleEntityNotFound(_0xbe7cx26,null))[_0xfa94[44]](saveUpdates(_0xbe7cx20[_0xfa94[123]],null))[_0xfa94[44]](respondWithResult(_0xbe7cx26,null))[_0xfa94[35]](handleError(_0xbe7cx26,null))};exports[_0xfa94[61]]= function(_0xbe7cx20,_0xbe7cx26){return db[_0xfa94[68]][_0xfa94[121]]({where:{id:_0xbe7cx20[_0xfa94[120]][_0xfa94[95]]}})[_0xfa94[44]](handleEntityNotFound(_0xbe7cx26,null))[_0xfa94[44]](removeEntity(_0xbe7cx26,null))[_0xfa94[35]](handleError(_0xbe7cx26,null))};exports[_0xfa94[124]]= function(_0xbe7cx20,_0xbe7cx26){return db[_0xfa94[68]][_0xfa94[124]]()[_0xfa94[44]](respondWithResult(_0xbe7cx26,null))[_0xfa94[35]](handleError(_0xbe7cx26,null))};exports[_0xfa94[125]]= function(_0xbe7cx20,_0xbe7cx26,_0xbe7cx3e){if(_0xbe7cx20[_0xfa94[123]][_0xfa94[95]]){delete _0xbe7cx20[_0xfa94[123]][_0xfa94[95]]};return db[_0xfa94[68]][_0xfa94[121]]({where:{id:_0xbe7cx20[_0xfa94[120]][_0xfa94[95]]}})[_0xfa94[44]](function(_0xbe7cx29){if(!_0xbe7cx29){logger[_0xfa94[34]](_0xfa94[130],_0xfa94[125],404,_0xfa94[131]);_0xbe7cx26[_0xfa94[46]](404)}else {if(_0xbe7cx29[_0xfa94[132]]){throw  new db[_0xfa94[134]].ValidationError(_0xfa94[133])}};return _0xbe7cx29})[_0xfa94[44]](function(_0xbe7cx29){if(_0xbe7cx29){return _0xbe7cx29[_0xfa94[60]]({closed:_0xbe7cx20[_0xfa94[123]][_0xfa94[127]],closedAt:_0xbe7cx20[_0xfa94[123]][_0xfa94[128]],disposition:_0xbe7cx20[_0xfa94[123]][_0xfa94[129]]})[_0xfa94[44]](function(_0xbe7cx34){return _0xbe7cx34})}})[_0xfa94[44]](function(_0xbe7cx29){return respondWithRpcPromise(_0xfa94[126],_0xfa94[125],_0xbe7cx20[_0xfa94[123]],client9004)})[_0xfa94[44]](respondWithResult(_0xbe7cx26,null))[_0xfa94[35]](handleError(_0xbe7cx26,null))};exports[_0xfa94[135]]= function(_0xbe7cx20,_0xbe7cx26,_0xbe7cx3e){_0xbe7cx20[_0xfa94[123]][_0xfa94[63]]= _0xbe7cx20[_0xfa94[137]][_0xfa94[136]];_0xbe7cx20[_0xfa94[123]][_0xfa94[138]]= _0xbe7cx20[_0xfa94[137]][_0xfa94[139]];_0xbe7cx20[_0xfa94[123]][_0xfa94[140]]= _0xbe7cx20[_0xfa94[137]][_0xfa94[141]];return db[_0xfa94[142]][_0xfa94[122]](_0xbe7cx20[_0xfa94[123]])[_0xfa94[44]](respondWithResult(_0xbe7cx26,201))[_0xfa94[35]](handleError(_0xbe7cx26,null))};exports[_0xfa94[143]]= function(_0xbe7cx20,_0xbe7cx26,_0xbe7cx3e){return db[_0xfa94[68]][_0xfa94[150]]({where:{id:_0xbe7cx20[_0xfa94[120]][_0xfa94[95]]},raw:true})[_0xfa94[44]](handleEntityNotFound(_0xbe7cx26,null))[_0xfa94[44]](function(_0xbe7cx3f){if(_0xbe7cx3f){if(_0xbe7cx3f[_0xfa94[127]]){return _0xbe7cx26[_0xfa94[48]](403)[_0xfa94[49]]({status:403,message:_0xfa94[148]})};return db[_0xfa94[142]][_0xfa94[150]]({where:{id:_0xbe7cx20[_0xfa94[71]][_0xfa94[149]]},raw:true})[_0xfa94[44]](handleEntityNotFound(_0xbe7cx26,null))}})[_0xfa94[44]](function(_0xbe7cx29){if(_0xbe7cx29){return _0xbe7cx26[_0xfa94[147]](path[_0xfa94[146]](config[_0xfa94[144]],_0xfa94[145],_0xbe7cx29[_0xfa94[138]]))}})[_0xfa94[35]](handleError(_0xbe7cx26,null))};exports[_0xfa94[151]]= function(_0xbe7cx20,_0xbe7cx26){var _0xbe7cx3f=null;var _0xbe7cx40=null;var _0xbe7cx41=null;var _0xbe7cx42=null;if(_0xbe7cx20[_0xfa94[123]][_0xfa94[95]]){delete _0xbe7cx20[_0xfa94[123]][_0xfa94[95]]};if(_0xbe7cx20[_0xfa94[123]][_0xfa94[152]]){_0xbe7cx42= path[_0xfa94[146]](config[_0xfa94[144]],_0xfa94[153],util[_0xfa94[156]](_0xfa94[154],Date[_0xfa94[155]]()));_0xbe7cx20[_0xfa94[123]][_0xfa94[157]]= _0xbe7cx42};return db[_0xfa94[68]][_0xfa94[121]]({where:{id:_0xbe7cx20[_0xfa94[120]][_0xfa94[95]]},include:[{model:db[_0xfa94[99]],as:_0xfa94[100]}]})[_0xfa94[44]](handleEntityNotFound(_0xbe7cx26,null))[_0xfa94[44]](saveUpdates(_0xbe7cx20[_0xfa94[123]],null))[_0xfa94[44]](function(_0xbe7cx29){if(_0xbe7cx29){_0xbe7cx3f= _0xbe7cx29;return db[_0xfa94[113]][_0xfa94[121]]({where:{id:_0xbe7cx3f[_0xfa94[184]]}})}})[_0xfa94[44]](function(_0xbe7cx29){if(_0xbe7cx29){_0xbe7cx41= _0xbe7cx29;return db[_0xfa94[109]][_0xfa94[121]]({where:{id:_0xbe7cx3f[_0xfa94[178]]}})}})[_0xfa94[44]](function(_0xbe7cx29){if(_0xbe7cx29){_0xbe7cx40= _0xbe7cx29;if(_0xbe7cx42){var _0xbe7cx43=null;for(var _0xbe7cx44=0;_0xbe7cx44< _0xbe7cx3f[_0xfa94[100]][_0xfa94[77]];++_0xbe7cx44){_0xbe7cx43= _0xbe7cx3f[_0xfa94[100]][_0xbe7cx44];var _0xbe7cx45=_0xbe7cx41[_0xfa94[173]]?(_0xbe7cx41[_0xfa94[173]]+ _0xbe7cx43[_0xfa94[132]]):(_0xbe7cx43[_0xfa94[132]]?_0xfa94[174]+ _0xbe7cx43[_0xfa94[132]]:_0xfa94[175]);var _0xbe7cx24=_0xbe7cx40[_0xfa94[176]]|| (_0xfa94[177]+ _0xbe7cx43[_0xfa94[178]]);var _0xbe7cx46=util[_0xfa94[156]](_0xfa94[179],moment(_0xbe7cx43[_0xfa94[102]])[_0xfa94[156]](_0xfa94[180]),(_0xbe7cx43[_0xfa94[101]]=== _0xfa94[103])?_0xbe7cx24:_0xbe7cx45,_0xbe7cx43[_0xfa94[123]]);fs[_0xfa94[181]](_0xbe7cx42,_0xbe7cx46)};return db[_0xfa94[183]][_0xfa94[150]]({where:{service:true},include:[{model:db[_0xfa94[182]],as:_0xfa94[158],raw:true}]})}}})[_0xfa94[44]](function(_0xbe7cx29){if(_0xbe7cx29&& _0xbe7cx29[_0xfa94[158]]&& _0xbe7cx20[_0xfa94[123]]){var _0xbe7cx2c={tls:{rejectUnauthorized:false}};if(_0xbe7cx29[_0xfa94[158]][_0xfa94[159]]){_0xbe7cx2c[_0xfa94[159]]= _0xbe7cx29[_0xfa94[158]][_0xfa94[159]]}else {_0xbe7cx2c[_0xfa94[160]]= _0xbe7cx29[_0xfa94[158]][_0xfa94[160]];_0xbe7cx2c[_0xfa94[161]]= _0xbe7cx29[_0xfa94[158]][_0xfa94[161]];_0xbe7cx2c[_0xfa94[162]]= _0xbe7cx29[_0xfa94[158]][_0xfa94[162]]};if(_0xbe7cx29[_0xfa94[158]][_0xfa94[163]]){_0xbe7cx2c[_0xfa94[164]]= {user:_0xbe7cx29[_0xfa94[158]][_0xfa94[165]],pass:_0xbe7cx29[_0xfa94[158]][_0xfa94[166]]}};return respondWithRpcPromise(_0xfa94[167],_0xfa94[168],{account:_0xbe7cx2c,message:{from:util[_0xfa94[156]](_0xfa94[169],_0xbe7cx29[_0xfa94[63]],_0xbe7cx29[_0xfa94[170]]|| _0xbe7cx29[_0xfa94[158]][_0xfa94[165]]),to:_0xbe7cx20[_0xfa94[123]][_0xfa94[152]],subject:_0xfa94[171],text:util[_0xfa94[156]](_0xfa94[172],_0xbe7cx20[_0xfa94[123]][_0xfa94[152]]),attachments:[{path:_0xbe7cx42}]}})[_0xfa94[44]](function(){return _0xbe7cx3f})[_0xfa94[35]](function(_0xbe7cx25){console[_0xfa94[34]](_0xbe7cx25)})}else {return _0xbe7cx3f}})[_0xfa94[44]](respondWithStatusCode(_0xbe7cx26,200))[_0xfa94[35]](handleError(_0xbe7cx26,null))};exports[_0xfa94[185]]= function(_0xbe7cx20,_0xbe7cx26,_0xbe7cx3e){return db[_0xfa94[99]][_0xfa94[121]]({where:{id:_0xbe7cx20[_0xfa94[120]][_0xfa94[95]]}})[_0xfa94[44]](handleEntityNotFound(_0xbe7cx26,null))[_0xfa94[44]](function(_0xbe7cx29){if(_0xbe7cx29){return _0xbe7cx29[_0xfa94[185]](_0xbe7cx20[_0xfa94[123]][_0xfa94[186]],_[_0xfa94[187]](_0xbe7cx20[_0xfa94[123]],[_0xfa94[186],_0xfa94[95]])|| {})}})[_0xfa94[44]](respondWithResult(_0xbe7cx26,null))[_0xfa94[35]](handleError(_0xbe7cx26,null))};exports[_0xfa94[188]]= function(_0xbe7cx20,_0xbe7cx26,_0xbe7cx3e){var _0xbe7cx2c={raw:false,where:{}};var _0xbe7cx38={};var _0xbe7cx47={count:0,rows:[]};return db[_0xfa94[68]][_0xfa94[150]]({where:{id:_0xbe7cx20[_0xfa94[120]][_0xfa94[95]]}})[_0xfa94[44]](handleEntityNotFound(_0xbe7cx26,null))[_0xfa94[44]](function(_0xbe7cx29){if(_0xbe7cx29){_0xbe7cx38[_0xfa94[66]]= _[_0xfa94[69]](db[_0xfa94[99]][_0xfa94[67]]);_0xbe7cx38[_0xfa94[71]]= _[_0xfa94[69]](_0xbe7cx20[_0xfa94[71]]);_0xbe7cx38[_0xfa94[73]]= _[_0xfa94[74]](_0xbe7cx38[_0xfa94[66]],_0xbe7cx38[_0xfa94[71]]);_0xbe7cx2c[_0xfa94[75]]= _[_0xfa94[74]](_0xbe7cx38[_0xfa94[66]],qs[_0xfa94[76]](_0xbe7cx20[_0xfa94[71]][_0xfa94[76]]));_0xbe7cx2c[_0xfa94[75]]= (_0xbe7cx2c[_0xfa94[75]][_0xfa94[77]])?_0xbe7cx2c[_0xfa94[75]]:_0xbe7cx38[_0xfa94[66]];if(!_0xbe7cx20[_0xfa94[71]][_0xfa94[79]](_0xfa94[78])){_0xbe7cx2c[_0xfa94[52]]= qs[_0xfa94[52]](_0xbe7cx20[_0xfa94[71]][_0xfa94[52]]);_0xbe7cx2c[_0xfa94[51]]= qs[_0xfa94[51]](_0xbe7cx20[_0xfa94[71]][_0xfa94[51]])};_0xbe7cx2c[_0xfa94[80]]= qs[_0xfa94[81]](_0xbe7cx20[_0xfa94[71]][_0xfa94[81]]);_0xbe7cx2c[_0xfa94[82]]= qs[_0xfa94[73]](_[_0xfa94[83]](_0xbe7cx20[_0xfa94[71]],_0xbe7cx38[_0xfa94[73]]));_0xbe7cx2c[_0xfa94[82]][_0xfa94[189]]= _0xbe7cx29[_0xfa94[95]];if(_0xbe7cx20[_0xfa94[71]][_0xfa94[87]]){_0xbe7cx2c[_0xfa94[82]]= _[_0xfa94[86]](_0xbe7cx2c[_0xfa94[82]],{$or:_[_0xfa94[89]](_0xbe7cx2c[_0xfa94[75]],function(_0xbe7cx3b){var _0xbe7cx39={};_0xbe7cx39[_0xbe7cx3b]= {$like:_0xfa94[88]+ _0xbe7cx20[_0xfa94[71]][_0xfa94[87]]+ _0xfa94[88]};return _0xbe7cx39})})};if(_0xbe7cx20[_0xfa94[71]][_0xfa94[190]]){var _0xbe7cx48=_0xbe7cx20[_0xfa94[71]][_0xfa94[190]][_0xfa94[192]](_0xfa94[191]);var _0xbe7cx39={};_0xbe7cx39[_0xbe7cx48[0]]= {$gte:moment(_0xbe7cx48[1])[_0xfa94[156]](_0xfa94[193])};_0xbe7cx2c[_0xfa94[82]]= _[_0xfa94[86]](_0xbe7cx2c[_0xfa94[82]],_0xbe7cx39)};_0xbe7cx2c= _[_0xfa94[86]]({},_0xbe7cx2c,_0xbe7cx20[_0xfa94[90]]);return db[_0xfa94[99]][_0xfa94[50]]({where:_0xbe7cx2c[_0xfa94[82]]})[_0xfa94[44]](function(_0xbe7cx2d){_0xbe7cx47[_0xfa94[50]]= _0xbe7cx2d;if(_0xbe7cx20[_0xfa94[71]][_0xfa94[105]]){_0xbe7cx2c[_0xfa94[91]]= [{all:true}]};return db[_0xfa94[99]][_0xfa94[118]](_0xbe7cx2c)})[_0xfa94[44]](function(_0xbe7cx3d){_0xbe7cx47[_0xfa94[104]]= _0xbe7cx3d;return _0xbe7cx47})}})[_0xfa94[44]](respondWithFilteredResult(_0xbe7cx26,_0xbe7cx2c))[_0xfa94[35]](handleError(_0xbe7cx26,null))};exports[_0xfa94[194]]= function(_0xbe7cx20,_0xbe7cx26,_0xbe7cx3e){var _0xbe7cx2c={where:{}},_0xbe7cx38={},_0xbe7cx47={count:0,rows:[]};return db[_0xfa94[68]][_0xfa94[150]]({where:{id:_0xbe7cx20[_0xfa94[120]][_0xfa94[95]]}})[_0xfa94[44]](handleEntityNotFound(_0xbe7cx26,null))[_0xfa94[44]](function(_0xbe7cx29){if(_0xbe7cx29){_0xbe7cx38[_0xfa94[66]]= _[_0xfa94[69]](db[_0xfa94[99]][_0xfa94[67]]);_0xbe7cx38[_0xfa94[71]]= _[_0xfa94[69]](_0xbe7cx20[_0xfa94[71]]);_0xbe7cx38[_0xfa94[73]]= _[_0xfa94[74]](_0xbe7cx38[_0xfa94[66]],_0xbe7cx38[_0xfa94[71]]);_0xbe7cx2c[_0xfa94[75]]= _[_0xfa94[74]](_0xbe7cx38[_0xfa94[66]],qs[_0xfa94[76]](_0xbe7cx20[_0xfa94[71]][_0xfa94[76]]));_0xbe7cx2c[_0xfa94[75]]= (_0xbe7cx2c[_0xfa94[75]][_0xfa94[77]])?_0xbe7cx2c[_0xfa94[75]]:_0xbe7cx38[_0xfa94[66]];if(!_0xbe7cx20[_0xfa94[71]][_0xfa94[79]](_0xfa94[78])){_0xbe7cx2c[_0xfa94[52]]= qs[_0xfa94[52]](_0xbe7cx20[_0xfa94[71]][_0xfa94[52]]);_0xbe7cx2c[_0xfa94[51]]= qs[_0xfa94[51]](_0xbe7cx20[_0xfa94[71]][_0xfa94[51]])};_0xbe7cx2c[_0xfa94[80]]= qs[_0xfa94[81]](_0xbe7cx20[_0xfa94[71]][_0xfa94[81]]);_0xbe7cx2c[_0xfa94[82]]= qs[_0xfa94[73]](_[_0xfa94[83]](_0xbe7cx20[_0xfa94[71]],_0xbe7cx38[_0xfa94[73]]));_0xbe7cx2c[_0xfa94[82]][_0xfa94[189]]= _0xbe7cx29[_0xfa94[95]];if(_0xbe7cx20[_0xfa94[71]][_0xfa94[87]]){_0xbe7cx2c[_0xfa94[82]]= _[_0xfa94[86]](_0xbe7cx2c[_0xfa94[82]],{$or:_[_0xfa94[89]](_0xbe7cx2c[_0xfa94[75]],function(_0xbe7cx3b){var _0xbe7cx39={};_0xbe7cx39[_0xbe7cx3b]= {$like:_0xfa94[88]+ _0xbe7cx20[_0xfa94[71]][_0xfa94[87]]+ _0xfa94[88]};return _0xbe7cx39})})};_0xbe7cx2c[_0xfa94[82]][_0xfa94[195]]= false;if(_0xbe7cx20[_0xfa94[71]][_0xfa94[95]]){_0xbe7cx2c[_0xfa94[82]][_0xfa94[95]]= {$gt:_0xbe7cx20[_0xfa94[71]][_0xfa94[95]]}};_0xbe7cx2c= _[_0xfa94[86]]({},_0xbe7cx2c,_0xbe7cx20[_0xfa94[90]]);return db[_0xfa94[99]][_0xfa94[50]]({where:_0xbe7cx2c[_0xfa94[82]]})[_0xfa94[44]](function(_0xbe7cx2d){_0xbe7cx47[_0xfa94[50]]= _0xbe7cx2d;_0xbe7cx2c[_0xfa94[91]]= [];if(_0xbe7cx20[_0xfa94[71]][_0xfa94[196]]){_0xbe7cx2c[_0xfa94[91]][_0xfa94[96]]({model:db[_0xfa94[106]],as:_0xfa94[106],attributes:[_0xfa94[95],_0xfa94[108],_0xfa94[197]]})};if(_0xbe7cx20[_0xfa94[71]][_0xfa94[105]]){_0xbe7cx2c[_0xfa94[91]]= [{all:true}]};return db[_0xfa94[99]][_0xfa94[118]](_0xbe7cx2c)})[_0xfa94[44]](function(_0xbe7cx3d){_0xbe7cx47[_0xfa94[104]]= _0xbe7cx3d;return _0xbe7cx47})}})[_0xfa94[44]](respondWithFilteredResult(_0xbe7cx26,_0xbe7cx2c))[_0xfa94[35]](handleError(_0xbe7cx26,null))};exports[_0xfa94[198]]= function(_0xbe7cx20,_0xbe7cx26,_0xbe7cx3e){return db[_0xfa94[68]][_0xfa94[121]]({where:{id:_0xbe7cx20[_0xfa94[120]][_0xfa94[95]]}})[_0xfa94[44]](handleEntityNotFound(_0xbe7cx26,null))[_0xfa94[44]](function(_0xbe7cx29){if(_0xbe7cx29){return _0xbe7cx29[_0xfa94[202]](_0xbe7cx20[_0xfa94[123]][_0xfa94[186]],_[_0xfa94[187]](_0xbe7cx20[_0xfa94[123]],[_0xfa94[186],_0xfa94[95]])|| {})[_0xfa94[201]](function(){return db[_0xfa94[93]][_0xfa94[118]]({attributes:[_0xfa94[95],_0xfa94[63],_0xfa94[116]],where:{id:_0xbe7cx20[_0xfa94[123]][_0xfa94[186]]}})})[_0xfa94[44]](function(_0xbe7cx49){socket[_0xfa94[200]](_0xfa94[199],{id:Number(_0xbe7cx20[_0xfa94[120]][_0xfa94[95]]),tags:_0xbe7cx49|| []});return {id:Number(_0xbe7cx20[_0xfa94[120]][_0xfa94[95]]),tags:_0xbe7cx49|| []}})}})[_0xfa94[44]](respondWithResult(_0xbe7cx26,null))[_0xfa94[35]](handleError(_0xbe7cx26,null))};exports[_0xfa94[203]]= function(_0xbe7cx20,_0xbe7cx26,_0xbe7cx3e){var _0xbe7cx4a;return db[_0xfa94[68]][_0xfa94[121]]({where:{id:_0xbe7cx20[_0xfa94[120]][_0xfa94[95]]}})[_0xfa94[44]](handleEntityNotFound(_0xbe7cx26,null))[_0xfa94[44]](function(_0xbe7cx29){if(_0xbe7cx29){return _0xbe7cx29[_0xfa94[203]](_0xbe7cx20[_0xfa94[71]][_0xfa94[186]])}})[_0xfa94[44]](respondWithStatusCode(_0xbe7cx26,null))[_0xfa94[35]](handleError(_0xbe7cx26,null))}
\ No newline at end of file
index 17c5970..9905a47 100644 (file)
@@ -1 +1 @@
-var _0xda20=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xda20[0];var EventEmitter=require(_0xda20[1]);var ChatInteraction=require(_0xda20[4])[_0xda20[3]][_0xda20[2]];var ChatInteractionEvents= new EventEmitter();ChatInteractionEvents[_0xda20[5]](0);var events={afterCreate:_0xda20[6],afterUpdate:_0xda20[7],afterDestroy:_0xda20[8]};function emitEvent(event){return function(_0x9752x7,_0x9752x8,_0x9752x9){ChatInteractionEvents[_0xda20[11]](event+ _0xda20[9]+ _0x9752x7[_0xda20[10]],_0x9752x7);ChatInteractionEvents[_0xda20[11]](event,_0x9752x7);_0x9752x9(null)}}for(var e in events){if(events[_0xda20[12]](e)){var event=events[e];ChatInteraction[_0xda20[13]](e,emitEvent(event))}};module[_0xda20[14]]= ChatInteractionEvents
\ No newline at end of file
+var _0xcb4f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xcb4f[0];var EventEmitter=require(_0xcb4f[1]);var ChatInteraction=require(_0xcb4f[4])[_0xcb4f[3]][_0xcb4f[2]];var ChatInteractionEvents= new EventEmitter();ChatInteractionEvents[_0xcb4f[5]](0);var events={afterCreate:_0xcb4f[6],afterUpdate:_0xcb4f[7],afterDestroy:_0xcb4f[8]};function emitEvent(event){return function(_0x8ef3x7,_0x8ef3x8,_0x8ef3x9){ChatInteractionEvents[_0xcb4f[11]](event+ _0xcb4f[9]+ _0x8ef3x7[_0xcb4f[10]],_0x8ef3x7);ChatInteractionEvents[_0xcb4f[11]](event,_0x8ef3x7);_0x8ef3x9(null)}}for(var e in events){if(events[_0xcb4f[12]](e)){var event=events[e];ChatInteraction[_0xcb4f[13]](e,emitEvent(event))}};module[_0xcb4f[14]]= ChatInteractionEvents
\ No newline at end of file
index dac4352..cb65b02 100644 (file)
@@ -1 +1 @@
-var _0x94c8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x63\x68\x61\x74\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x74\x66\x38\x6D\x62\x34","\x75\x74\x66\x38\x6D\x62\x34\x5F\x75\x6E\x69\x63\x6F\x64\x65\x5F\x63\x69","\x64\x65\x66\x69\x6E\x65"];_0x94c8[0];var _=require(_0x94c8[1]);var util=require(_0x94c8[2]);var logger=require(_0x94c8[4])(_0x94c8[3]);var moment=require(_0x94c8[5]);var BPromise=require(_0x94c8[6]);var rp=require(_0x94c8[7]);var attributes=require(_0x94c8[8]);module[_0x94c8[9]]= function(_0xebc2x8,_0xebc2x9){return _0xebc2x8[_0x94c8[14]](_0x94c8[10],attributes,{tableName:_0x94c8[11],paranoid:false,indexes:[],timestamps:true,charset:_0x94c8[12],collate:_0x94c8[13]})}
\ No newline at end of file
+var _0xfa02=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x63\x68\x61\x74\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x74\x66\x38\x6D\x62\x34","\x75\x74\x66\x38\x6D\x62\x34\x5F\x75\x6E\x69\x63\x6F\x64\x65\x5F\x63\x69","\x64\x65\x66\x69\x6E\x65"];_0xfa02[0];var _=require(_0xfa02[1]);var util=require(_0xfa02[2]);var logger=require(_0xfa02[4])(_0xfa02[3]);var moment=require(_0xfa02[5]);var BPromise=require(_0xfa02[6]);var rp=require(_0xfa02[7]);var attributes=require(_0xfa02[8]);module[_0xfa02[9]]= function(_0xc947x8,_0xc947x9){return _0xc947x8[_0xfa02[14]](_0xfa02[10],attributes,{tableName:_0xfa02[11],paranoid:false,indexes:[],timestamps:true,charset:_0xfa02[12],collate:_0xfa02[13]})}
\ No newline at end of file
index 700970e..1806576 100644 (file)
@@ -1 +1 @@
-var _0xc056=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E"];_0xc056[0];var _=require(_0xc056[1]);var util=require(_0xc056[2]);var moment=require(_0xc056[3]);var BPromise=require(_0xc056[4]);var rs=require(_0xc056[5]);var fs=require(_0xc056[6]);var db=require(_0xc056[8])[_0xc056[7]];var utils=require(_0xc056[9]);var logger=require(_0xc056[11])(_0xc056[10]);var config=require(_0xc056[12]);var jayson=require(_0xc056[13]);var client=jayson[_0xc056[15]][_0xc056[14]]({port:9002});var socket=require(_0xc056[17])({host:_0xc056[16],port:6379});require(_0xc056[19])[_0xc056[18]](socket);function respondWithRpcPromise(_0x5ae3xf,_0x5ae3x10,_0x5ae3x11){return  new BPromise(function(_0x5ae3x12,_0x5ae3x13){return client[_0xc056[32]](_0x5ae3xf,_0x5ae3x11)[_0xc056[31]](function(_0x5ae3x15){logger[_0xc056[24]](_0xc056[20],_0x5ae3x10,_0xc056[23]);logger[_0xc056[27]](_0xc056[25],_0x5ae3x10,_0xc056[23],JSON[_0xc056[26]](_0x5ae3x15));if(_0x5ae3x15[_0xc056[21]]){if(_0x5ae3x15[_0xc056[21]][_0xc056[28]]=== 500){logger[_0xc056[21]](_0xc056[20],_0x5ae3x10,_0x5ae3x15[_0xc056[21]][_0xc056[29]]);return _0x5ae3x13(_0x5ae3x15[_0xc056[21]][_0xc056[29]])};logger[_0xc056[21]](_0xc056[20],_0x5ae3x10,_0x5ae3x15[_0xc056[21]][_0xc056[29]]);return _0x5ae3x12(_0x5ae3x15[_0xc056[21]][_0xc056[29]])}else {logger[_0xc056[24]](_0xc056[20],_0x5ae3x10,_0xc056[23]);_0x5ae3x12(_0x5ae3x15[_0xc056[30]][_0xc056[29]])}})[_0xc056[22]](function(_0x5ae3x14){logger[_0xc056[21]](_0xc056[20],_0x5ae3x10,_0x5ae3x14);_0x5ae3x13(_0x5ae3x14)})})}exports[_0xc056[33]]= function(_0x5ae3x11){var _0x5ae3x16=this;return  new Promise(function(_0x5ae3x12,_0x5ae3x13){return db[_0xc056[41]][_0xc056[40]](_0x5ae3x11[_0xc056[34]],{raw:_0x5ae3x11[_0xc056[35]]?(_0x5ae3x11[_0xc056[35]][_0xc056[36]]=== undefined)?true:false:true,individualHooks:true,where:_0x5ae3x11[_0xc056[35]]?_0x5ae3x11[_0xc056[35]][_0xc056[37]]|| null:null,attributes:_0x5ae3x11[_0xc056[35]]?_0x5ae3x11[_0xc056[35]][_0xc056[38]]|| null:null,limit:_0x5ae3x11[_0xc056[35]]?_0x5ae3x11[_0xc056[35]][_0xc056[39]]|| null:null})[_0xc056[31]](function(_0x5ae3x15){logger[_0xc056[24]](_0xc056[33],_0x5ae3x11);logger[_0xc056[27]](_0xc056[33],_0x5ae3x11,JSON[_0xc056[26]](_0x5ae3x15));_0x5ae3x12(_0x5ae3x15)})[_0xc056[22]](function(_0x5ae3x14){logger[_0xc056[21]](_0xc056[33],_0x5ae3x14[_0xc056[29]],_0x5ae3x11);_0x5ae3x13(_0x5ae3x16[_0xc056[21]](500,_0x5ae3x14[_0xc056[29]]))})})}
\ No newline at end of file
+var _0xf723=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E"];_0xf723[0];var _=require(_0xf723[1]);var util=require(_0xf723[2]);var moment=require(_0xf723[3]);var BPromise=require(_0xf723[4]);var rs=require(_0xf723[5]);var fs=require(_0xf723[6]);var db=require(_0xf723[8])[_0xf723[7]];var utils=require(_0xf723[9]);var logger=require(_0xf723[11])(_0xf723[10]);var config=require(_0xf723[12]);var jayson=require(_0xf723[13]);var client=jayson[_0xf723[15]][_0xf723[14]]({port:9002});var socket=require(_0xf723[17])({host:_0xf723[16],port:6379});require(_0xf723[19])[_0xf723[18]](socket);function respondWithRpcPromise(_0x20ebxf,_0x20ebx10,_0x20ebx11){return  new BPromise(function(_0x20ebx12,_0x20ebx13){return client[_0xf723[32]](_0x20ebxf,_0x20ebx11)[_0xf723[31]](function(_0x20ebx15){logger[_0xf723[24]](_0xf723[20],_0x20ebx10,_0xf723[23]);logger[_0xf723[27]](_0xf723[25],_0x20ebx10,_0xf723[23],JSON[_0xf723[26]](_0x20ebx15));if(_0x20ebx15[_0xf723[21]]){if(_0x20ebx15[_0xf723[21]][_0xf723[28]]=== 500){logger[_0xf723[21]](_0xf723[20],_0x20ebx10,_0x20ebx15[_0xf723[21]][_0xf723[29]]);return _0x20ebx13(_0x20ebx15[_0xf723[21]][_0xf723[29]])};logger[_0xf723[21]](_0xf723[20],_0x20ebx10,_0x20ebx15[_0xf723[21]][_0xf723[29]]);return _0x20ebx12(_0x20ebx15[_0xf723[21]][_0xf723[29]])}else {logger[_0xf723[24]](_0xf723[20],_0x20ebx10,_0xf723[23]);_0x20ebx12(_0x20ebx15[_0xf723[30]][_0xf723[29]])}})[_0xf723[22]](function(_0x20ebx14){logger[_0xf723[21]](_0xf723[20],_0x20ebx10,_0x20ebx14);_0x20ebx13(_0x20ebx14)})})}exports[_0xf723[33]]= function(_0x20ebx11){var _0x20ebx16=this;return  new Promise(function(_0x20ebx12,_0x20ebx13){return db[_0xf723[41]][_0xf723[40]](_0x20ebx11[_0xf723[34]],{raw:_0x20ebx11[_0xf723[35]]?(_0x20ebx11[_0xf723[35]][_0xf723[36]]=== undefined)?true:false:true,individualHooks:true,where:_0x20ebx11[_0xf723[35]]?_0x20ebx11[_0xf723[35]][_0xf723[37]]|| null:null,attributes:_0x20ebx11[_0xf723[35]]?_0x20ebx11[_0xf723[35]][_0xf723[38]]|| null:null,limit:_0x20ebx11[_0xf723[35]]?_0x20ebx11[_0xf723[35]][_0xf723[39]]|| null:null})[_0xf723[31]](function(_0x20ebx15){logger[_0xf723[24]](_0xf723[33],_0x20ebx11);logger[_0xf723[27]](_0xf723[33],_0x20ebx11,JSON[_0xf723[26]](_0x20ebx15));_0x20ebx12(_0x20ebx15)})[_0xf723[22]](function(_0x20ebx14){logger[_0xf723[21]](_0xf723[33],_0x20ebx14[_0xf723[29]],_0x20ebx11);_0x20ebx13(_0x20ebx16[_0xf723[21]](500,_0x20ebx14[_0xf723[29]]))})})}
\ No newline at end of file
index 813073d..8c27c0d 100644 (file)
@@ -1 +1 @@
-var _0x3c90=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A","\x6F\x6E"];_0x3c90[0];var ChatInteractionEvents=require(_0x3c90[1]);var events=[_0x3c90[2],_0x3c90[3],_0x3c90[4]];function createListener(_0x9b40x4,_0x9b40x5){return function(_0x9b40x6){_0x9b40x5[_0x3c90[5]](_0x9b40x4,_0x9b40x6)}}function removeListener(_0x9b40x4,_0x9b40x8){return function(){ChatInteractionEvents[_0x3c90[6]](_0x9b40x4,_0x9b40x8)}}exports[_0x3c90[7]]= function(_0x9b40x5){for(var _0x9b40x9=0,_0x9b40xa=events[_0x3c90[8]];_0x9b40x9< _0x9b40xa;_0x9b40x9++){var _0x9b40x4=events[_0x9b40x9];var _0x9b40x8=createListener(_0x3c90[9]+ _0x9b40x4,_0x9b40x5);ChatInteractionEvents[_0x3c90[10]](_0x9b40x4,_0x9b40x8)}}
\ No newline at end of file
+var _0xb1c3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A","\x6F\x6E"];_0xb1c3[0];var ChatInteractionEvents=require(_0xb1c3[1]);var events=[_0xb1c3[2],_0xb1c3[3],_0xb1c3[4]];function createListener(_0x489dx4,_0x489dx5){return function(_0x489dx6){_0x489dx5[_0xb1c3[5]](_0x489dx4,_0x489dx6)}}function removeListener(_0x489dx4,_0x489dx8){return function(){ChatInteractionEvents[_0xb1c3[6]](_0x489dx4,_0x489dx8)}}exports[_0xb1c3[7]]= function(_0x489dx5){for(var _0x489dx9=0,_0x489dxa=events[_0xb1c3[8]];_0x489dx9< _0x489dxa;_0x489dx9++){var _0x489dx4=events[_0x489dx9];var _0x489dx8=createListener(_0xb1c3[9]+ _0x489dx4,_0x489dx5);ChatInteractionEvents[_0xb1c3[10]](_0x489dx4,_0x489dx8)}}
\ No newline at end of file
index 14e123d..0d2eef7 100644 (file)
@@ -1 +1 @@
-var _0x6dbc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x69\x73\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x41\x75\x74\x68\x6F\x72\x69\x7A\x65\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x5F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x44\x6F\x77\x6E\x6C\x6F\x61\x64","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x2F\x3A\x69\x64\x2F\x6D\x79\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4D\x79\x4D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73\x2F","\x6A\x6F\x69\x6E","\x25\x73\x2D\x25\x73","\x6E\x6F\x77","\x2D","\x72\x65\x70\x6C\x61\x63\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x64\x69\x73\x6B\x53\x74\x6F\x72\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x5F\x75\x70\x6C\x6F\x61\x64","\x66\x69\x6C\x65","\x73\x69\x6E\x67\x6C\x65","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x55\x70\x6C\x6F\x61\x64","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x74\x61\x67\x73","\x63\x68\x61\x74","\x63\x68\x61\x74\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x61\x64\x64\x74\x61\x67\x73","\x74\x72\x61\x63\x6B\x65\x64","\x61\x64\x64\x54\x61\x67\x73","\x63\x68\x61\x74\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x61\x62\x61\x6E\x64\x6F\x6E","\x61\x62\x61\x6E\x64\x6F\x6E","\x2F\x3A\x69\x64\x2F\x63\x6C\x6F\x73\x65","\x63\x6C\x6F\x73\x65","\x63\x68\x61\x74\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x61\x67\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x6dbc[0];var multer=require(_0x6dbc[1]);var util=require(_0x6dbc[2]);var path=require(_0x6dbc[3]);var express=require(_0x6dbc[4]);var router=express.Router();var auth=require(_0x6dbc[5]);var interaction=require(_0x6dbc[6]);var config=require(_0x6dbc[7]);var controller=require(_0x6dbc[8]);router[_0x6dbc[12]](_0x6dbc[9],auth[_0x6dbc[10]](),controller[_0x6dbc[11]]);router[_0x6dbc[12]](_0x6dbc[13],auth[_0x6dbc[10]](),controller[_0x6dbc[14]]);router[_0x6dbc[12]](_0x6dbc[15],auth[_0x6dbc[16]](),controller[_0x6dbc[17]]);router[_0x6dbc[12]](_0x6dbc[18],auth[_0x6dbc[16]](),controller[_0x6dbc[19]]);router[_0x6dbc[12]](_0x6dbc[20],auth[_0x6dbc[10]](),controller[_0x6dbc[21]]);router[_0x6dbc[12]](_0x6dbc[22],auth[_0x6dbc[16]](),controller[_0x6dbc[23]]);router[_0x6dbc[25]](_0x6dbc[9],auth[_0x6dbc[10]](),controller[_0x6dbc[24]]);var upload=multer({storage:multer[_0x6dbc[35]]({destination:function(_0x62fbxb,_0x62fbxc,_0x62fbxd){_0x62fbxd(null,path[_0x6dbc[28]](config[_0x6dbc[26]],_0x6dbc[27]))},filename:function(_0x62fbxb,_0x62fbxc,_0x62fbxd){_0x62fbxd(null,util[_0x6dbc[34]](_0x6dbc[29],Date[_0x6dbc[30]](),_0x62fbxc[_0x6dbc[33]][_0x6dbc[32]](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,_0x6dbc[31])))}})});router[_0x6dbc[25]](_0x6dbc[36],upload[_0x6dbc[38]](_0x6dbc[37]),controller[_0x6dbc[39]]);router[_0x6dbc[25]](_0x6dbc[20],auth[_0x6dbc[16]](),controller[_0x6dbc[40]]);router[_0x6dbc[25]](_0x6dbc[41],auth[_0x6dbc[10]](),interaction[_0x6dbc[44]](_0x6dbc[42],_0x6dbc[43]),controller[_0x6dbc[45]]);router[_0x6dbc[48]](_0x6dbc[15],interaction[_0x6dbc[44]](_0x6dbc[42],_0x6dbc[46]),controller[_0x6dbc[47]]);router[_0x6dbc[48]](_0x6dbc[49],auth[_0x6dbc[16]](),controller[_0x6dbc[50]]);router[_0x6dbc[48]](_0x6dbc[51],controller[_0x6dbc[52]]);router[_0x6dbc[55]](_0x6dbc[15],auth[_0x6dbc[10]](),interaction[_0x6dbc[44]](_0x6dbc[42],_0x6dbc[53]),controller[_0x6dbc[54]]);router[_0x6dbc[55]](_0x6dbc[41],auth[_0x6dbc[10]](),controller[_0x6dbc[56]]);module[_0x6dbc[57]]= router
\ No newline at end of file
+var _0x63c2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x69\x73\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x41\x75\x74\x68\x6F\x72\x69\x7A\x65\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x5F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x44\x6F\x77\x6E\x6C\x6F\x61\x64","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x2F\x3A\x69\x64\x2F\x6D\x79\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4D\x79\x4D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73\x2F","\x6A\x6F\x69\x6E","\x25\x73\x2D\x25\x73","\x6E\x6F\x77","\x2D","\x72\x65\x70\x6C\x61\x63\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x64\x69\x73\x6B\x53\x74\x6F\x72\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x5F\x75\x70\x6C\x6F\x61\x64","\x66\x69\x6C\x65","\x73\x69\x6E\x67\x6C\x65","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x55\x70\x6C\x6F\x61\x64","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x74\x61\x67\x73","\x63\x68\x61\x74","\x63\x68\x61\x74\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x61\x64\x64\x74\x61\x67\x73","\x74\x72\x61\x63\x6B\x65\x64","\x61\x64\x64\x54\x61\x67\x73","\x63\x68\x61\x74\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x61\x62\x61\x6E\x64\x6F\x6E","\x61\x62\x61\x6E\x64\x6F\x6E","\x2F\x3A\x69\x64\x2F\x63\x6C\x6F\x73\x65","\x63\x6C\x6F\x73\x65","\x63\x68\x61\x74\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x61\x67\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x63c2[0];var multer=require(_0x63c2[1]);var util=require(_0x63c2[2]);var path=require(_0x63c2[3]);var express=require(_0x63c2[4]);var router=express.Router();var auth=require(_0x63c2[5]);var interaction=require(_0x63c2[6]);var config=require(_0x63c2[7]);var controller=require(_0x63c2[8]);router[_0x63c2[12]](_0x63c2[9],auth[_0x63c2[10]](),controller[_0x63c2[11]]);router[_0x63c2[12]](_0x63c2[13],auth[_0x63c2[10]](),controller[_0x63c2[14]]);router[_0x63c2[12]](_0x63c2[15],auth[_0x63c2[16]](),controller[_0x63c2[17]]);router[_0x63c2[12]](_0x63c2[18],auth[_0x63c2[16]](),controller[_0x63c2[19]]);router[_0x63c2[12]](_0x63c2[20],auth[_0x63c2[10]](),controller[_0x63c2[21]]);router[_0x63c2[12]](_0x63c2[22],auth[_0x63c2[16]](),controller[_0x63c2[23]]);router[_0x63c2[25]](_0x63c2[9],auth[_0x63c2[10]](),controller[_0x63c2[24]]);var upload=multer({storage:multer[_0x63c2[35]]({destination:function(_0xc525xb,_0xc525xc,_0xc525xd){_0xc525xd(null,path[_0x63c2[28]](config[_0x63c2[26]],_0x63c2[27]))},filename:function(_0xc525xb,_0xc525xc,_0xc525xd){_0xc525xd(null,util[_0x63c2[34]](_0x63c2[29],Date[_0x63c2[30]](),_0xc525xc[_0x63c2[33]][_0x63c2[32]](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,_0x63c2[31])))}})});router[_0x63c2[25]](_0x63c2[36],upload[_0x63c2[38]](_0x63c2[37]),controller[_0x63c2[39]]);router[_0x63c2[25]](_0x63c2[20],auth[_0x63c2[16]](),controller[_0x63c2[40]]);router[_0x63c2[25]](_0x63c2[41],auth[_0x63c2[10]](),interaction[_0x63c2[44]](_0x63c2[42],_0x63c2[43]),controller[_0x63c2[45]]);router[_0x63c2[48]](_0x63c2[15],interaction[_0x63c2[44]](_0x63c2[42],_0x63c2[46]),controller[_0x63c2[47]]);router[_0x63c2[48]](_0x63c2[49],auth[_0x63c2[16]](),controller[_0x63c2[50]]);router[_0x63c2[48]](_0x63c2[51],controller[_0x63c2[52]]);router[_0x63c2[55]](_0x63c2[15],auth[_0x63c2[10]](),interaction[_0x63c2[44]](_0x63c2[42],_0x63c2[53]),controller[_0x63c2[54]]);router[_0x63c2[55]](_0x63c2[41],auth[_0x63c2[10]](),controller[_0x63c2[56]]);module[_0x63c2[57]]= router
\ No newline at end of file
index 1ae052e..33ea712 100644 (file)
@@ -1 +1 @@
-var _0x621c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x65\x64\x69\x75\x6D","\x42\x4F\x4F\x4C\x45\x41\x4E","\x49\x4E\x54\x45\x47\x45\x52"];_0x621c[0];var Sequelize=require(_0x621c[1]);module[_0x621c[2]]= {body:{type:Sequelize.TEXT(_0x621c[3]),allowNull:false},read:{type:Sequelize[_0x621c[4]],defaultValue:false},ChatInternalMessageId:{type:Sequelize[_0x621c[5]]}}
\ No newline at end of file
+var _0xc630=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x65\x64\x69\x75\x6D","\x42\x4F\x4F\x4C\x45\x41\x4E","\x49\x4E\x54\x45\x47\x45\x52"];_0xc630[0];var Sequelize=require(_0xc630[1]);module[_0xc630[2]]= {body:{type:Sequelize.TEXT(_0xc630[3]),allowNull:false},read:{type:Sequelize[_0xc630[4]],defaultValue:false},ChatInternalMessageId:{type:Sequelize[_0xc630[5]]}}
\ No newline at end of file
index 88fbab4..77d0939 100644 (file)
@@ -1 +1 @@
-var _0x6d32=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74","\x6D\x65\x73\x73\x61\x67\x65\x73","\x6C\x61\x73\x74\x4D\x65\x73\x73\x61\x67\x65\x41\x74","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x6C\x61\x73\x74\x4D\x65\x73\x73\x61\x67\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x67\x65\x74\x55\x73\x65\x72\x73","\x75\x73\x65\x72","\x46\x72\x6F\x6D\x49\x64","\x54\x6F\x49\x64","\x72\x65\x61\x64","\x2D\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x70\x75\x73\x68","\x61\x6C\x6C","\x61\x67\x65\x6E\x74","\x61\x64\x6D\x69\x6E","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x75\x73\x65\x72\x70\x69\x63","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x6F\x6E\x6C\x69\x6E\x65","\x6C\x61\x73\x74\x4C\x6F\x67\x69\x6E\x41\x74","\x61\x6C\x6C\x6F\x77\x6D\x65\x73\x73\x65\x6E\x67\x65\x72","\x73\x68\x6F\x77\x57\x65\x62\x42\x61\x72","\x2D\x6F\x6E\x6C\x69\x6E\x65","\x55\x73\x65\x72"];_0x6d32[0];var jsonpatch=require(_0x6d32[1]);var rp=require(_0x6d32[2]);var moment=require(_0x6d32[3]);var BPromise=require(_0x6d32[4]);var Mustache=require(_0x6d32[5]);var util=require(_0x6d32[6]);var path=require(_0x6d32[7]);var sox=require(_0x6d32[8]);var csv=require(_0x6d32[9]);var ejs=require(_0x6d32[10]);var fs=require(_0x6d32[11]);var _=require(_0x6d32[12]);var squel=require(_0x6d32[13]);var crypto=require(_0x6d32[14]);var jsforce=require(_0x6d32[15]);var deskjs=require(_0x6d32[16]);var toCsv=require(_0x6d32[9]);var querystring=require(_0x6d32[17]);var Papa=require(_0x6d32[18]);var qs=require(_0x6d32[19]);var logger=require(_0x6d32[21])(_0x6d32[20]);var utils=require(_0x6d32[22]);var config=require(_0x6d32[23]);var db=require(_0x6d32[25])[_0x6d32[24]];var socket=require(_0x6d32[27])({host:_0x6d32[26],port:6379});require(_0x6d32[29])[_0x6d32[28]](socket);function respondWithStatusCode(_0xb1e0x1b,_0xb1e0x1c){_0xb1e0x1c= _0xb1e0x1c|| 204;return function(_0xb1e0x1d){if(_0xb1e0x1d){return _0xb1e0x1b[_0x6d32[30]](_0xb1e0x1c)};return _0xb1e0x1b[_0x6d32[32]](_0xb1e0x1c)[_0x6d32[31]]()}}function respondWithResult(_0xb1e0x1b,_0xb1e0x1c){_0xb1e0x1c= _0xb1e0x1c|| 200;return function(_0xb1e0x1d){if(_0xb1e0x1d){return _0xb1e0x1b[_0x6d32[32]](_0xb1e0x1c)[_0x6d32[33]](_0xb1e0x1d)}}}function respondWithFilteredResult(_0xb1e0x1b,_0xb1e0x20){return function(_0xb1e0x1d){if(_0xb1e0x1d){var _0xb1e0x21=_0xb1e0x1d[_0x6d32[34]],_0xb1e0x22=_0xb1e0x20[_0x6d32[35]],_0xb1e0x23=_0xb1e0x20[_0x6d32[35]]+ _0xb1e0x20[_0x6d32[36]],_0xb1e0x1c;if(_0xb1e0x23>= _0xb1e0x21){_0xb1e0x23= _0xb1e0x21;_0xb1e0x1c= 200}else {_0xb1e0x1c= 206};_0xb1e0x1b[_0x6d32[32]](_0xb1e0x1c);return _0xb1e0x1b[_0x6d32[40]](_0x6d32[37],_0xb1e0x22+ _0x6d32[38]+ _0xb1e0x23+ _0x6d32[39]+ _0xb1e0x21)[_0x6d32[33]](_0xb1e0x1d)};return null}}function patchUpdates(_0xb1e0x25){return function(_0xb1e0x1d){try{jsonpatch[_0x6d32[41]](_0xb1e0x1d,_0xb1e0x25,true)}catch(err){return BPromise[_0x6d32[42]](err)};return _0xb1e0x1d[_0x6d32[43]]()}}function saveUpdates(_0xb1e0x27,_0xb1e0x1c){return function(_0xb1e0x1d){if(_0xb1e0x1d){return _0xb1e0x1d[_0x6d32[45]](_0xb1e0x27)[_0x6d32[44]](function(_0xb1e0x28){return _0xb1e0x28})};return null}}function removeEntity(_0xb1e0x1b,_0xb1e0x1c){return function(_0xb1e0x1d){if(_0xb1e0x1d){return _0xb1e0x1d[_0x6d32[46]]()[_0x6d32[44]](function(){_0xb1e0x1b[_0x6d32[32]](204)[_0x6d32[31]]()})}}}function handleEntityNotFound(_0xb1e0x1b,_0xb1e0x1c){return function(_0xb1e0x1d){if(!_0xb1e0x1d){_0xb1e0x1b[_0x6d32[30]](404)};return _0xb1e0x1d}}function handleError(_0xb1e0x1b,_0xb1e0x1c){_0xb1e0x1c= _0xb1e0x1c|| 500;return function(_0xb1e0x2c){logger[_0x6d32[48]](_0xb1e0x2c[_0x6d32[47]]);if(_0xb1e0x2c[_0x6d32[49]]){delete _0xb1e0x2c[_0x6d32[49]]};_0xb1e0x1b[_0x6d32[32]](_0xb1e0x1c)[_0x6d32[50]](_0xb1e0x2c)}}exports[_0x6d32[51]]= function(_0xb1e0x2d,_0xb1e0x1b){var _0xb1e0x20={},_0xb1e0x2e={},_0xb1e0x2f={count:0,rows:[]};_0xb1e0x2e[_0x6d32[52]]= _[_0x6d32[55]](db[_0x6d32[54]][_0x6d32[53]]);var _0xb1e0x30={dateStart:_0xb1e0x2d[_0x6d32[57]][_0x6d32[56]],dateEnd:_0xb1e0x2d[_0x6d32[57]][_0x6d32[58]]};delete _0xb1e0x2d[_0x6d32[57]][_0x6d32[56]];delete _0xb1e0x2d[_0x6d32[57]][_0x6d32[58]];_0xb1e0x2e[_0x6d32[57]]= _[_0x6d32[55]](_0xb1e0x2d[_0x6d32[57]]);_0xb1e0x2e[_0x6d32[59]]= _[_0x6d32[60]](_0xb1e0x2e[_0x6d32[52]],_0xb1e0x2e[_0x6d32[57]]);_0xb1e0x20[_0x6d32[61]]= _[_0x6d32[60]](_0xb1e0x2e[_0x6d32[52]],qs[_0x6d32[62]](_0xb1e0x2d[_0x6d32[57]][_0x6d32[62]]));_0xb1e0x20[_0x6d32[61]]= (_0xb1e0x20[_0x6d32[61]][_0x6d32[63]])?_0xb1e0x20[_0x6d32[61]]:_0xb1e0x2e[_0x6d32[52]];if(!_0xb1e0x2d[_0x6d32[57]][_0x6d32[65]](_0x6d32[64])){_0xb1e0x20[_0x6d32[36]]= qs[_0x6d32[36]](_0xb1e0x2d[_0x6d32[57]][_0x6d32[36]]);_0xb1e0x20[_0x6d32[35]]= qs[_0x6d32[35]](_0xb1e0x2d[_0x6d32[57]][_0x6d32[35]])};_0xb1e0x20[_0x6d32[66]]= qs[_0x6d32[67]](_0xb1e0x2d[_0x6d32[57]][_0x6d32[67]]);_0xb1e0x20[_0x6d32[68]]= qs[_0x6d32[59]](_[_0x6d32[69]](_0xb1e0x2d[_0x6d32[57]],_0xb1e0x2e[_0x6d32[59]]));if(_0xb1e0x30[_0x6d32[56]]){if(_0xb1e0x30[_0x6d32[58]]){_0xb1e0x30[_0x6d32[58]]= moment(_0xb1e0x30[_0x6d32[58]])[_0x6d32[71]](1,_0x6d32[70])}else {_0xb1e0x30[_0x6d32[58]]= moment(_0xb1e0x30[_0x6d32[56]])[_0x6d32[71]](1,_0x6d32[70])};_[_0x6d32[72]](_0xb1e0x20[_0x6d32[68]],{createdAt:{$gte:_0xb1e0x30[_0x6d32[56]],$lte:_0xb1e0x30[_0x6d32[58]]}})};if(_0xb1e0x2d[_0x6d32[57]][_0x6d32[73]]){_0xb1e0x20[_0x6d32[68]]= _[_0x6d32[72]](_0xb1e0x20[_0x6d32[68]],{$or:_[_0x6d32[75]](_0xb1e0x20[_0x6d32[61]],function(_0xb1e0x31){var _0xb1e0x2f={};_0xb1e0x2f[_0xb1e0x31]= {$like:_0x6d32[74]+ _0xb1e0x2d[_0x6d32[57]][_0x6d32[73]]+ _0x6d32[74]};return _0xb1e0x2f})})};_0xb1e0x20= _[_0x6d32[72]]({},_0xb1e0x20,_0xb1e0x2d[_0x6d32[76]]);var _0xb1e0x32={where:_0xb1e0x20[_0x6d32[68]]};return db[_0x6d32[54]][_0x6d32[34]](_0xb1e0x32)[_0x6d32[44]](function(_0xb1e0x21){_0xb1e0x2f[_0x6d32[34]]= _0xb1e0x21;if(_0xb1e0x2d[_0x6d32[57]][_0x6d32[79]]){_0xb1e0x20[_0x6d32[80]]= [{all:true}]};return db[_0x6d32[54]][_0x6d32[81]](_0xb1e0x20)})[_0x6d32[44]](function(_0xb1e0x33){_0xb1e0x2f[_0x6d32[78]]= _0xb1e0x33;return _0xb1e0x2f})[_0x6d32[44]](respondWithFilteredResult(_0xb1e0x1b,_0xb1e0x20))[_0x6d32[77]](handleError(_0xb1e0x1b,null))};exports[_0x6d32[82]]= function(_0xb1e0x2d,_0xb1e0x1b){var _0xb1e0x20={raw:true,where:{id:_0xb1e0x2d[_0x6d32[84]][_0x6d32[83]]}},_0xb1e0x2e={};_0xb1e0x2e[_0x6d32[52]]= _[_0x6d32[55]](db[_0x6d32[54]][_0x6d32[53]]);_0xb1e0x2e[_0x6d32[57]]= _[_0x6d32[55]](_0xb1e0x2d[_0x6d32[57]]);_0xb1e0x2e[_0x6d32[59]]= _[_0x6d32[60]](_0xb1e0x2e[_0x6d32[52]],_0xb1e0x2e[_0x6d32[57]]);_0xb1e0x20[_0x6d32[61]]= _[_0x6d32[60]](_0xb1e0x2e[_0x6d32[52]],qs[_0x6d32[62]](_0xb1e0x2d[_0x6d32[57]][_0x6d32[62]]));_0xb1e0x20[_0x6d32[61]]= (_0xb1e0x20[_0x6d32[61]][_0x6d32[63]])?_0xb1e0x20[_0x6d32[61]]:_0xb1e0x2e[_0x6d32[52]];if(_0xb1e0x2d[_0x6d32[57]][_0x6d32[79]]){_0xb1e0x20[_0x6d32[80]]= [{all:true}]};_0xb1e0x20= _[_0x6d32[72]]({},_0xb1e0x20,_0xb1e0x2d[_0x6d32[76]]);return db[_0x6d32[54]][_0x6d32[85]](_0xb1e0x20)[_0x6d32[44]](handleEntityNotFound(_0xb1e0x1b,null))[_0x6d32[44]](respondWithResult(_0xb1e0x1b,null))[_0x6d32[77]](handleError(_0xb1e0x1b,null))};exports[_0x6d32[86]]= function(_0xb1e0x2d,_0xb1e0x1b){return db[_0x6d32[54]][_0x6d32[86]](_0xb1e0x2d[_0x6d32[87]],{})[_0x6d32[44]](respondWithResult(_0xb1e0x1b,201))[_0x6d32[77]](handleError(_0xb1e0x1b,null))};exports[_0x6d32[45]]= function(_0xb1e0x2d,_0xb1e0x1b){if(_0xb1e0x2d[_0x6d32[87]][_0x6d32[83]]){delete _0xb1e0x2d[_0x6d32[87]][_0x6d32[83]]};return db[_0x6d32[54]][_0x6d32[85]]({where:{id:_0xb1e0x2d[_0x6d32[84]][_0x6d32[83]]}})[_0x6d32[44]](handleEntityNotFound(_0xb1e0x1b,null))[_0x6d32[44]](saveUpdates(_0xb1e0x2d[_0x6d32[87]],null))[_0x6d32[44]](respondWithResult(_0xb1e0x1b,null))[_0x6d32[77]](handleError(_0xb1e0x1b,null))};exports[_0x6d32[46]]= function(_0xb1e0x2d,_0xb1e0x1b){return db[_0x6d32[54]][_0x6d32[85]]({where:{id:_0xb1e0x2d[_0x6d32[84]][_0x6d32[83]]}})[_0x6d32[44]](handleEntityNotFound(_0xb1e0x1b,null))[_0x6d32[44]](removeEntity(_0xb1e0x1b,null))[_0x6d32[77]](handleError(_0xb1e0x1b,null))};exports[_0x6d32[88]]= function(_0xb1e0x2d,_0xb1e0x1b){return db[_0x6d32[54]][_0x6d32[88]]()[_0x6d32[44]](respondWithResult(_0xb1e0x1b,null))[_0x6d32[77]](handleError(_0xb1e0x1b,null))};function wrapUser(_0xb1e0x35){return function(_0xb1e0x36){var _0xb1e0x37=_0xb1e0x35[_0x6d32[89]]({plain:true});_0xb1e0x37[_0x6d32[90]]= [];if(_0xb1e0x36){_0xb1e0x37[_0x6d32[91]]= _0xb1e0x36[_0x6d32[92]];_0xb1e0x37[_0x6d32[93]]= _0xb1e0x36}else {_0xb1e0x37[_0x6d32[91]]= moment(0)[_0x6d32[95]](_0x6d32[94]);_0xb1e0x37[_0x6d32[93]]= {}};return _0xb1e0x37}}exports[_0x6d32[96]]= function(_0xb1e0x2d,_0xb1e0x1b,_0xb1e0x38){var _0xb1e0x39=[];return db[_0x6d32[115]][_0x6d32[81]]({where:{role:[_0x6d32[104],_0x6d32[105],_0x6d32[97]]},attributes:[_0x6d32[83],_0x6d32[106],_0x6d32[49],_0x6d32[107],_0x6d32[108],_0x6d32[109],_0x6d32[110],_0x6d32[111],_0x6d32[112],_0x6d32[113]],order:qs[_0x6d32[67]](_0x6d32[114])})[_0x6d32[44]](function(_0xb1e0x3a){var _0xb1e0x3b=[];if(_0xb1e0x3a){_0xb1e0x39= _0xb1e0x3a;for(var _0xb1e0x3c=0;_0xb1e0x3c< _0xb1e0x3a[_0x6d32[63]];_0xb1e0x3c+= 1){_0xb1e0x39[_0xb1e0x3c][_0x6d32[90]]= [];_0xb1e0x3b[_0x6d32[102]](db[_0x6d32[54]][_0x6d32[85]]({where:{FromId:[_0xb1e0x2d[_0x6d32[97]][_0x6d32[83]],_0xb1e0x3a[_0xb1e0x3c][_0x6d32[83]]],ToId:[_0xb1e0x2d[_0x6d32[97]][_0x6d32[83]],_0xb1e0x3a[_0xb1e0x3c][_0x6d32[83]]],ChatGroupId:null},attributes:[_0x6d32[83],_0x6d32[92],_0x6d32[98],_0x6d32[99],_0x6d32[100],_0x6d32[87]],order:qs[_0x6d32[67]](_0x6d32[101]),limit:1,offset:0,raw:true})[_0x6d32[44]](wrapUser(_0xb1e0x3a[_0xb1e0x3c])))};return BPromise[_0x6d32[103]](_0xb1e0x3b)};return []})[_0x6d32[44]](function(_0xb1e0x3a){return {rows:_0xb1e0x3a,count:_0xb1e0x3a[_0x6d32[63]]}})[_0x6d32[44]](respondWithResult(_0xb1e0x1b,null))[_0x6d32[77]](handleError(_0xb1e0x1b,null))}
\ No newline at end of file
+var _0x45c9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74","\x6D\x65\x73\x73\x61\x67\x65\x73","\x6C\x61\x73\x74\x4D\x65\x73\x73\x61\x67\x65\x41\x74","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x6C\x61\x73\x74\x4D\x65\x73\x73\x61\x67\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x67\x65\x74\x55\x73\x65\x72\x73","\x75\x73\x65\x72","\x46\x72\x6F\x6D\x49\x64","\x54\x6F\x49\x64","\x72\x65\x61\x64","\x2D\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x70\x75\x73\x68","\x61\x6C\x6C","\x61\x67\x65\x6E\x74","\x61\x64\x6D\x69\x6E","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x75\x73\x65\x72\x70\x69\x63","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x6F\x6E\x6C\x69\x6E\x65","\x6C\x61\x73\x74\x4C\x6F\x67\x69\x6E\x41\x74","\x61\x6C\x6C\x6F\x77\x6D\x65\x73\x73\x65\x6E\x67\x65\x72","\x73\x68\x6F\x77\x57\x65\x62\x42\x61\x72","\x2D\x6F\x6E\x6C\x69\x6E\x65","\x55\x73\x65\x72"];_0x45c9[0];var jsonpatch=require(_0x45c9[1]);var rp=require(_0x45c9[2]);var moment=require(_0x45c9[3]);var BPromise=require(_0x45c9[4]);var Mustache=require(_0x45c9[5]);var util=require(_0x45c9[6]);var path=require(_0x45c9[7]);var sox=require(_0x45c9[8]);var csv=require(_0x45c9[9]);var ejs=require(_0x45c9[10]);var fs=require(_0x45c9[11]);var _=require(_0x45c9[12]);var squel=require(_0x45c9[13]);var crypto=require(_0x45c9[14]);var jsforce=require(_0x45c9[15]);var deskjs=require(_0x45c9[16]);var toCsv=require(_0x45c9[9]);var querystring=require(_0x45c9[17]);var Papa=require(_0x45c9[18]);var qs=require(_0x45c9[19]);var logger=require(_0x45c9[21])(_0x45c9[20]);var utils=require(_0x45c9[22]);var config=require(_0x45c9[23]);var db=require(_0x45c9[25])[_0x45c9[24]];var socket=require(_0x45c9[27])({host:_0x45c9[26],port:6379});require(_0x45c9[29])[_0x45c9[28]](socket);function respondWithStatusCode(_0x28a2x1b,_0x28a2x1c){_0x28a2x1c= _0x28a2x1c|| 204;return function(_0x28a2x1d){if(_0x28a2x1d){return _0x28a2x1b[_0x45c9[30]](_0x28a2x1c)};return _0x28a2x1b[_0x45c9[32]](_0x28a2x1c)[_0x45c9[31]]()}}function respondWithResult(_0x28a2x1b,_0x28a2x1c){_0x28a2x1c= _0x28a2x1c|| 200;return function(_0x28a2x1d){if(_0x28a2x1d){return _0x28a2x1b[_0x45c9[32]](_0x28a2x1c)[_0x45c9[33]](_0x28a2x1d)}}}function respondWithFilteredResult(_0x28a2x1b,_0x28a2x20){return function(_0x28a2x1d){if(_0x28a2x1d){var _0x28a2x21=_0x28a2x1d[_0x45c9[34]],_0x28a2x22=_0x28a2x20[_0x45c9[35]],_0x28a2x23=_0x28a2x20[_0x45c9[35]]+ _0x28a2x20[_0x45c9[36]],_0x28a2x1c;if(_0x28a2x23>= _0x28a2x21){_0x28a2x23= _0x28a2x21;_0x28a2x1c= 200}else {_0x28a2x1c= 206};_0x28a2x1b[_0x45c9[32]](_0x28a2x1c);return _0x28a2x1b[_0x45c9[40]](_0x45c9[37],_0x28a2x22+ _0x45c9[38]+ _0x28a2x23+ _0x45c9[39]+ _0x28a2x21)[_0x45c9[33]](_0x28a2x1d)};return null}}function patchUpdates(_0x28a2x25){return function(_0x28a2x1d){try{jsonpatch[_0x45c9[41]](_0x28a2x1d,_0x28a2x25,true)}catch(err){return BPromise[_0x45c9[42]](err)};return _0x28a2x1d[_0x45c9[43]]()}}function saveUpdates(_0x28a2x27,_0x28a2x1c){return function(_0x28a2x1d){if(_0x28a2x1d){return _0x28a2x1d[_0x45c9[45]](_0x28a2x27)[_0x45c9[44]](function(_0x28a2x28){return _0x28a2x28})};return null}}function removeEntity(_0x28a2x1b,_0x28a2x1c){return function(_0x28a2x1d){if(_0x28a2x1d){return _0x28a2x1d[_0x45c9[46]]()[_0x45c9[44]](function(){_0x28a2x1b[_0x45c9[32]](204)[_0x45c9[31]]()})}}}function handleEntityNotFound(_0x28a2x1b,_0x28a2x1c){return function(_0x28a2x1d){if(!_0x28a2x1d){_0x28a2x1b[_0x45c9[30]](404)};return _0x28a2x1d}}function handleError(_0x28a2x1b,_0x28a2x1c){_0x28a2x1c= _0x28a2x1c|| 500;return function(_0x28a2x2c){logger[_0x45c9[48]](_0x28a2x2c[_0x45c9[47]]);if(_0x28a2x2c[_0x45c9[49]]){delete _0x28a2x2c[_0x45c9[49]]};_0x28a2x1b[_0x45c9[32]](_0x28a2x1c)[_0x45c9[50]](_0x28a2x2c)}}exports[_0x45c9[51]]= function(_0x28a2x2d,_0x28a2x1b){var _0x28a2x20={},_0x28a2x2e={},_0x28a2x2f={count:0,rows:[]};_0x28a2x2e[_0x45c9[52]]= _[_0x45c9[55]](db[_0x45c9[54]][_0x45c9[53]]);var _0x28a2x30={dateStart:_0x28a2x2d[_0x45c9[57]][_0x45c9[56]],dateEnd:_0x28a2x2d[_0x45c9[57]][_0x45c9[58]]};delete _0x28a2x2d[_0x45c9[57]][_0x45c9[56]];delete _0x28a2x2d[_0x45c9[57]][_0x45c9[58]];_0x28a2x2e[_0x45c9[57]]= _[_0x45c9[55]](_0x28a2x2d[_0x45c9[57]]);_0x28a2x2e[_0x45c9[59]]= _[_0x45c9[60]](_0x28a2x2e[_0x45c9[52]],_0x28a2x2e[_0x45c9[57]]);_0x28a2x20[_0x45c9[61]]= _[_0x45c9[60]](_0x28a2x2e[_0x45c9[52]],qs[_0x45c9[62]](_0x28a2x2d[_0x45c9[57]][_0x45c9[62]]));_0x28a2x20[_0x45c9[61]]= (_0x28a2x20[_0x45c9[61]][_0x45c9[63]])?_0x28a2x20[_0x45c9[61]]:_0x28a2x2e[_0x45c9[52]];if(!_0x28a2x2d[_0x45c9[57]][_0x45c9[65]](_0x45c9[64])){_0x28a2x20[_0x45c9[36]]= qs[_0x45c9[36]](_0x28a2x2d[_0x45c9[57]][_0x45c9[36]]);_0x28a2x20[_0x45c9[35]]= qs[_0x45c9[35]](_0x28a2x2d[_0x45c9[57]][_0x45c9[35]])};_0x28a2x20[_0x45c9[66]]= qs[_0x45c9[67]](_0x28a2x2d[_0x45c9[57]][_0x45c9[67]]);_0x28a2x20[_0x45c9[68]]= qs[_0x45c9[59]](_[_0x45c9[69]](_0x28a2x2d[_0x45c9[57]],_0x28a2x2e[_0x45c9[59]]));if(_0x28a2x30[_0x45c9[56]]){if(_0x28a2x30[_0x45c9[58]]){_0x28a2x30[_0x45c9[58]]= moment(_0x28a2x30[_0x45c9[58]])[_0x45c9[71]](1,_0x45c9[70])}else {_0x28a2x30[_0x45c9[58]]= moment(_0x28a2x30[_0x45c9[56]])[_0x45c9[71]](1,_0x45c9[70])};_[_0x45c9[72]](_0x28a2x20[_0x45c9[68]],{createdAt:{$gte:_0x28a2x30[_0x45c9[56]],$lte:_0x28a2x30[_0x45c9[58]]}})};if(_0x28a2x2d[_0x45c9[57]][_0x45c9[73]]){_0x28a2x20[_0x45c9[68]]= _[_0x45c9[72]](_0x28a2x20[_0x45c9[68]],{$or:_[_0x45c9[75]](_0x28a2x20[_0x45c9[61]],function(_0x28a2x31){var _0x28a2x2f={};_0x28a2x2f[_0x28a2x31]= {$like:_0x45c9[74]+ _0x28a2x2d[_0x45c9[57]][_0x45c9[73]]+ _0x45c9[74]};return _0x28a2x2f})})};_0x28a2x20= _[_0x45c9[72]]({},_0x28a2x20,_0x28a2x2d[_0x45c9[76]]);var _0x28a2x32={where:_0x28a2x20[_0x45c9[68]]};return db[_0x45c9[54]][_0x45c9[34]](_0x28a2x32)[_0x45c9[44]](function(_0x28a2x21){_0x28a2x2f[_0x45c9[34]]= _0x28a2x21;if(_0x28a2x2d[_0x45c9[57]][_0x45c9[79]]){_0x28a2x20[_0x45c9[80]]= [{all:true}]};return db[_0x45c9[54]][_0x45c9[81]](_0x28a2x20)})[_0x45c9[44]](function(_0x28a2x33){_0x28a2x2f[_0x45c9[78]]= _0x28a2x33;return _0x28a2x2f})[_0x45c9[44]](respondWithFilteredResult(_0x28a2x1b,_0x28a2x20))[_0x45c9[77]](handleError(_0x28a2x1b,null))};exports[_0x45c9[82]]= function(_0x28a2x2d,_0x28a2x1b){var _0x28a2x20={raw:true,where:{id:_0x28a2x2d[_0x45c9[84]][_0x45c9[83]]}},_0x28a2x2e={};_0x28a2x2e[_0x45c9[52]]= _[_0x45c9[55]](db[_0x45c9[54]][_0x45c9[53]]);_0x28a2x2e[_0x45c9[57]]= _[_0x45c9[55]](_0x28a2x2d[_0x45c9[57]]);_0x28a2x2e[_0x45c9[59]]= _[_0x45c9[60]](_0x28a2x2e[_0x45c9[52]],_0x28a2x2e[_0x45c9[57]]);_0x28a2x20[_0x45c9[61]]= _[_0x45c9[60]](_0x28a2x2e[_0x45c9[52]],qs[_0x45c9[62]](_0x28a2x2d[_0x45c9[57]][_0x45c9[62]]));_0x28a2x20[_0x45c9[61]]= (_0x28a2x20[_0x45c9[61]][_0x45c9[63]])?_0x28a2x20[_0x45c9[61]]:_0x28a2x2e[_0x45c9[52]];if(_0x28a2x2d[_0x45c9[57]][_0x45c9[79]]){_0x28a2x20[_0x45c9[80]]= [{all:true}]};_0x28a2x20= _[_0x45c9[72]]({},_0x28a2x20,_0x28a2x2d[_0x45c9[76]]);return db[_0x45c9[54]][_0x45c9[85]](_0x28a2x20)[_0x45c9[44]](handleEntityNotFound(_0x28a2x1b,null))[_0x45c9[44]](respondWithResult(_0x28a2x1b,null))[_0x45c9[77]](handleError(_0x28a2x1b,null))};exports[_0x45c9[86]]= function(_0x28a2x2d,_0x28a2x1b){return db[_0x45c9[54]][_0x45c9[86]](_0x28a2x2d[_0x45c9[87]],{})[_0x45c9[44]](respondWithResult(_0x28a2x1b,201))[_0x45c9[77]](handleError(_0x28a2x1b,null))};exports[_0x45c9[45]]= function(_0x28a2x2d,_0x28a2x1b){if(_0x28a2x2d[_0x45c9[87]][_0x45c9[83]]){delete _0x28a2x2d[_0x45c9[87]][_0x45c9[83]]};return db[_0x45c9[54]][_0x45c9[85]]({where:{id:_0x28a2x2d[_0x45c9[84]][_0x45c9[83]]}})[_0x45c9[44]](handleEntityNotFound(_0x28a2x1b,null))[_0x45c9[44]](saveUpdates(_0x28a2x2d[_0x45c9[87]],null))[_0x45c9[44]](respondWithResult(_0x28a2x1b,null))[_0x45c9[77]](handleError(_0x28a2x1b,null))};exports[_0x45c9[46]]= function(_0x28a2x2d,_0x28a2x1b){return db[_0x45c9[54]][_0x45c9[85]]({where:{id:_0x28a2x2d[_0x45c9[84]][_0x45c9[83]]}})[_0x45c9[44]](handleEntityNotFound(_0x28a2x1b,null))[_0x45c9[44]](removeEntity(_0x28a2x1b,null))[_0x45c9[77]](handleError(_0x28a2x1b,null))};exports[_0x45c9[88]]= function(_0x28a2x2d,_0x28a2x1b){return db[_0x45c9[54]][_0x45c9[88]]()[_0x45c9[44]](respondWithResult(_0x28a2x1b,null))[_0x45c9[77]](handleError(_0x28a2x1b,null))};function wrapUser(_0x28a2x35){return function(_0x28a2x36){var _0x28a2x37=_0x28a2x35[_0x45c9[89]]({plain:true});_0x28a2x37[_0x45c9[90]]= [];if(_0x28a2x36){_0x28a2x37[_0x45c9[91]]= _0x28a2x36[_0x45c9[92]];_0x28a2x37[_0x45c9[93]]= _0x28a2x36}else {_0x28a2x37[_0x45c9[91]]= moment(0)[_0x45c9[95]](_0x45c9[94]);_0x28a2x37[_0x45c9[93]]= {}};return _0x28a2x37}}exports[_0x45c9[96]]= function(_0x28a2x2d,_0x28a2x1b,_0x28a2x38){var _0x28a2x39=[];return db[_0x45c9[115]][_0x45c9[81]]({where:{role:[_0x45c9[104],_0x45c9[105],_0x45c9[97]]},attributes:[_0x45c9[83],_0x45c9[106],_0x45c9[49],_0x45c9[107],_0x45c9[108],_0x45c9[109],_0x45c9[110],_0x45c9[111],_0x45c9[112],_0x45c9[113]],order:qs[_0x45c9[67]](_0x45c9[114])})[_0x45c9[44]](function(_0x28a2x3a){var _0x28a2x3b=[];if(_0x28a2x3a){_0x28a2x39= _0x28a2x3a;for(var _0x28a2x3c=0;_0x28a2x3c< _0x28a2x3a[_0x45c9[63]];_0x28a2x3c+= 1){_0x28a2x39[_0x28a2x3c][_0x45c9[90]]= [];_0x28a2x3b[_0x45c9[102]](db[_0x45c9[54]][_0x45c9[85]]({where:{FromId:[_0x28a2x2d[_0x45c9[97]][_0x45c9[83]],_0x28a2x3a[_0x28a2x3c][_0x45c9[83]]],ToId:[_0x28a2x2d[_0x45c9[97]][_0x45c9[83]],_0x28a2x3a[_0x28a2x3c][_0x45c9[83]]],ChatGroupId:null},attributes:[_0x45c9[83],_0x45c9[92],_0x45c9[98],_0x45c9[99],_0x45c9[100],_0x45c9[87]],order:qs[_0x45c9[67]](_0x45c9[101]),limit:1,offset:0,raw:true})[_0x45c9[44]](wrapUser(_0x28a2x3a[_0x28a2x3c])))};return BPromise[_0x45c9[103]](_0x28a2x3b)};return []})[_0x45c9[44]](function(_0x28a2x3a){return {rows:_0x28a2x3a,count:_0x28a2x3a[_0x45c9[63]]}})[_0x45c9[44]](respondWithResult(_0x28a2x1b,null))[_0x45c9[77]](handleError(_0x28a2x1b,null))}
\ No newline at end of file
index 273acce..fcf9155 100644 (file)
@@ -1 +1 @@
-var _0x772d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x772d[0];var EventEmitter=require(_0x772d[1]);var ChatInternalMessage=require(_0x772d[4])[_0x772d[3]][_0x772d[2]];var ChatInternalMessageEvents= new EventEmitter();ChatInternalMessageEvents[_0x772d[5]](0);var events={afterCreate:_0x772d[6],afterUpdate:_0x772d[7],afterDestroy:_0x772d[8]};function emitEvent(event){return function(_0x2fcbx7,_0x2fcbx8,_0x2fcbx9){ChatInternalMessageEvents[_0x772d[11]](event+ _0x772d[9]+ _0x2fcbx7[_0x772d[10]],_0x2fcbx7);ChatInternalMessageEvents[_0x772d[11]](event,_0x2fcbx7);_0x2fcbx9(null)}}for(var e in events){if(events[_0x772d[12]](e)){var event=events[e];ChatInternalMessage[_0x772d[13]](e,emitEvent(event))}};module[_0x772d[14]]= ChatInternalMessageEvents
\ No newline at end of file
+var _0x1747=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x1747[0];var EventEmitter=require(_0x1747[1]);var ChatInternalMessage=require(_0x1747[4])[_0x1747[3]][_0x1747[2]];var ChatInternalMessageEvents= new EventEmitter();ChatInternalMessageEvents[_0x1747[5]](0);var events={afterCreate:_0x1747[6],afterUpdate:_0x1747[7],afterDestroy:_0x1747[8]};function emitEvent(event){return function(_0x1f15x7,_0x1f15x8,_0x1f15x9){ChatInternalMessageEvents[_0x1747[11]](event+ _0x1747[9]+ _0x1f15x7[_0x1747[10]],_0x1f15x7);ChatInternalMessageEvents[_0x1747[11]](event,_0x1f15x7);_0x1f15x9(null)}}for(var e in events){if(events[_0x1747[12]](e)){var event=events[e];ChatInternalMessage[_0x1747[13]](e,emitEvent(event))}};module[_0x1747[14]]= ChatInternalMessageEvents
\ No newline at end of file
index 7411e2a..6c50a45 100644 (file)
@@ -1 +1 @@
-var _0xecaf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65","\x63\x68\x61\x74\x5F\x69\x6E\x74\x65\x72\x6E\x61\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x75\x74\x66\x38\x6D\x62\x34","\x75\x74\x66\x38\x6D\x62\x34\x5F\x75\x6E\x69\x63\x6F\x64\x65\x5F\x63\x69","\x64\x65\x66\x69\x6E\x65"];_0xecaf[0];var _=require(_0xecaf[1]);var util=require(_0xecaf[2]);var logger=require(_0xecaf[4])(_0xecaf[3]);var moment=require(_0xecaf[5]);var BPromise=require(_0xecaf[6]);var rp=require(_0xecaf[7]);var attributes=require(_0xecaf[8]);module[_0xecaf[9]]= function(_0xc47fx8,_0xc47fx9){return _0xc47fx8[_0xecaf[14]](_0xecaf[10],attributes,{tableName:_0xecaf[11],paranoid:false,indexes:[],timestamps:true,charset:_0xecaf[12],collate:_0xecaf[13]})}
\ No newline at end of file
+var _0x3f71=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65","\x63\x68\x61\x74\x5F\x69\x6E\x74\x65\x72\x6E\x61\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x75\x74\x66\x38\x6D\x62\x34","\x75\x74\x66\x38\x6D\x62\x34\x5F\x75\x6E\x69\x63\x6F\x64\x65\x5F\x63\x69","\x64\x65\x66\x69\x6E\x65"];_0x3f71[0];var _=require(_0x3f71[1]);var util=require(_0x3f71[2]);var logger=require(_0x3f71[4])(_0x3f71[3]);var moment=require(_0x3f71[5]);var BPromise=require(_0x3f71[6]);var rp=require(_0x3f71[7]);var attributes=require(_0x3f71[8]);module[_0x3f71[9]]= function(_0xa32bx8,_0xa32bx9){return _0xa32bx8[_0x3f71[14]](_0x3f71[10],attributes,{tableName:_0x3f71[11],paranoid:false,indexes:[],timestamps:true,charset:_0x3f71[12],collate:_0x3f71[13]})}
\ No newline at end of file
index 6979238..2515c7a 100644 (file)
@@ -1 +1 @@
-var _0xb693=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xb693[0];var _=require(_0xb693[1]);var util=require(_0xb693[2]);var moment=require(_0xb693[3]);var BPromise=require(_0xb693[4]);var rs=require(_0xb693[5]);var fs=require(_0xb693[6]);var db=require(_0xb693[8])[_0xb693[7]];var utils=require(_0xb693[9]);var logger=require(_0xb693[11])(_0xb693[10]);var config=require(_0xb693[12]);var jayson=require(_0xb693[13]);var client=jayson[_0xb693[15]][_0xb693[14]]({port:9002});var socket=require(_0xb693[17])({host:_0xb693[16],port:6379});require(_0xb693[19])[_0xb693[18]](socket);function respondWithRpcPromise(_0xfb6dxf,_0xfb6dx10,_0xfb6dx11){return  new BPromise(function(_0xfb6dx12,_0xfb6dx13){return client[_0xb693[32]](_0xfb6dxf,_0xfb6dx11)[_0xb693[31]](function(_0xfb6dx15){logger[_0xb693[24]](_0xb693[20],_0xfb6dx10,_0xb693[23]);logger[_0xb693[27]](_0xb693[25],_0xfb6dx10,_0xb693[23],JSON[_0xb693[26]](_0xfb6dx15));if(_0xfb6dx15[_0xb693[21]]){if(_0xfb6dx15[_0xb693[21]][_0xb693[28]]=== 500){logger[_0xb693[21]](_0xb693[20],_0xfb6dx10,_0xfb6dx15[_0xb693[21]][_0xb693[29]]);return _0xfb6dx13(_0xfb6dx15[_0xb693[21]][_0xb693[29]])};logger[_0xb693[21]](_0xb693[20],_0xfb6dx10,_0xfb6dx15[_0xb693[21]][_0xb693[29]]);return _0xfb6dx12(_0xfb6dx15[_0xb693[21]][_0xb693[29]])}else {logger[_0xb693[24]](_0xb693[20],_0xfb6dx10,_0xb693[23]);_0xfb6dx12(_0xfb6dx15[_0xb693[30]][_0xb693[29]])}})[_0xb693[22]](function(_0xfb6dx14){logger[_0xb693[21]](_0xb693[20],_0xfb6dx10,_0xfb6dx14);_0xfb6dx13(_0xfb6dx14)})})}
\ No newline at end of file
+var _0x4825=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x4825[0];var _=require(_0x4825[1]);var util=require(_0x4825[2]);var moment=require(_0x4825[3]);var BPromise=require(_0x4825[4]);var rs=require(_0x4825[5]);var fs=require(_0x4825[6]);var db=require(_0x4825[8])[_0x4825[7]];var utils=require(_0x4825[9]);var logger=require(_0x4825[11])(_0x4825[10]);var config=require(_0x4825[12]);var jayson=require(_0x4825[13]);var client=jayson[_0x4825[15]][_0x4825[14]]({port:9002});var socket=require(_0x4825[17])({host:_0x4825[16],port:6379});require(_0x4825[19])[_0x4825[18]](socket);function respondWithRpcPromise(_0x389dxf,_0x389dx10,_0x389dx11){return  new BPromise(function(_0x389dx12,_0x389dx13){return client[_0x4825[32]](_0x389dxf,_0x389dx11)[_0x4825[31]](function(_0x389dx15){logger[_0x4825[24]](_0x4825[20],_0x389dx10,_0x4825[23]);logger[_0x4825[27]](_0x4825[25],_0x389dx10,_0x4825[23],JSON[_0x4825[26]](_0x389dx15));if(_0x389dx15[_0x4825[21]]){if(_0x389dx15[_0x4825[21]][_0x4825[28]]=== 500){logger[_0x4825[21]](_0x4825[20],_0x389dx10,_0x389dx15[_0x4825[21]][_0x4825[29]]);return _0x389dx13(_0x389dx15[_0x4825[21]][_0x4825[29]])};logger[_0x4825[21]](_0x4825[20],_0x389dx10,_0x389dx15[_0x4825[21]][_0x4825[29]]);return _0x389dx12(_0x389dx15[_0x4825[21]][_0x4825[29]])}else {logger[_0x4825[24]](_0x4825[20],_0x389dx10,_0x4825[23]);_0x389dx12(_0x389dx15[_0x4825[30]][_0x4825[29]])}})[_0x4825[22]](function(_0x389dx14){logger[_0x4825[21]](_0x4825[20],_0x389dx10,_0x389dx14);_0x389dx13(_0x389dx14)})})}
\ No newline at end of file
index 5228428..6e63757 100644 (file)
@@ -1 +1 @@
-var _0xe8a3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E"];_0xe8a3[0];var ChatInternalMessageEvents=require(_0xe8a3[1]);var events=[_0xe8a3[2],_0xe8a3[3],_0xe8a3[4]];function createListener(_0xdbd2x4,_0xdbd2x5){return function(_0xdbd2x6){_0xdbd2x5[_0xe8a3[5]](_0xdbd2x4,_0xdbd2x6)}}function removeListener(_0xdbd2x4,_0xdbd2x8){return function(){ChatInternalMessageEvents[_0xe8a3[6]](_0xdbd2x4,_0xdbd2x8)}}exports[_0xe8a3[7]]= function(_0xdbd2x5){for(var _0xdbd2x9=0,_0xdbd2xa=events[_0xe8a3[8]];_0xdbd2x9< _0xdbd2xa;_0xdbd2x9++){var _0xdbd2x4=events[_0xdbd2x9];var _0xdbd2x8=createListener(_0xe8a3[9]+ _0xdbd2x4,_0xdbd2x5);ChatInternalMessageEvents[_0xe8a3[10]](_0xdbd2x4,_0xdbd2x8)}}
\ No newline at end of file
+var _0xd57d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E"];_0xd57d[0];var ChatInternalMessageEvents=require(_0xd57d[1]);var events=[_0xd57d[2],_0xd57d[3],_0xd57d[4]];function createListener(_0x6654x4,_0x6654x5){return function(_0x6654x6){_0x6654x5[_0xd57d[5]](_0x6654x4,_0x6654x6)}}function removeListener(_0x6654x4,_0x6654x8){return function(){ChatInternalMessageEvents[_0xd57d[6]](_0x6654x4,_0x6654x8)}}exports[_0xd57d[7]]= function(_0x6654x5){for(var _0x6654x9=0,_0x6654xa=events[_0xd57d[8]];_0x6654x9< _0x6654xa;_0x6654x9++){var _0x6654x4=events[_0x6654x9];var _0x6654x8=createListener(_0xd57d[9]+ _0x6654x4,_0x6654x5);ChatInternalMessageEvents[_0xd57d[10]](_0x6654x4,_0x6654x8)}}
\ No newline at end of file
index fd9caee..7c16b72 100644 (file)
@@ -1 +1 @@
-var _0x8071=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x55\x73\x65\x72\x73","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x8071[0];var multer=require(_0x8071[1]);var util=require(_0x8071[2]);var path=require(_0x8071[3]);var express=require(_0x8071[4]);var router=express.Router();var auth=require(_0x8071[5]);var interaction=require(_0x8071[6]);var config=require(_0x8071[7]);var controller=require(_0x8071[8]);router[_0x8071[12]](_0x8071[9],auth[_0x8071[10]](),controller[_0x8071[11]]);router[_0x8071[12]](_0x8071[13],auth[_0x8071[10]](),controller[_0x8071[14]]);router[_0x8071[12]](_0x8071[15],auth[_0x8071[10]](),controller[_0x8071[16]]);router[_0x8071[12]](_0x8071[17],auth[_0x8071[10]](),controller[_0x8071[18]]);router[_0x8071[20]](_0x8071[9],auth[_0x8071[10]](),controller[_0x8071[19]]);router[_0x8071[22]](_0x8071[17],controller[_0x8071[21]]);router[_0x8071[24]](_0x8071[17],auth[_0x8071[10]](),controller[_0x8071[23]]);module[_0x8071[25]]= router
\ No newline at end of file
+var _0xee3a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x55\x73\x65\x72\x73","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xee3a[0];var multer=require(_0xee3a[1]);var util=require(_0xee3a[2]);var path=require(_0xee3a[3]);var express=require(_0xee3a[4]);var router=express.Router();var auth=require(_0xee3a[5]);var interaction=require(_0xee3a[6]);var config=require(_0xee3a[7]);var controller=require(_0xee3a[8]);router[_0xee3a[12]](_0xee3a[9],auth[_0xee3a[10]](),controller[_0xee3a[11]]);router[_0xee3a[12]](_0xee3a[13],auth[_0xee3a[10]](),controller[_0xee3a[14]]);router[_0xee3a[12]](_0xee3a[15],auth[_0xee3a[10]](),controller[_0xee3a[16]]);router[_0xee3a[12]](_0xee3a[17],auth[_0xee3a[10]](),controller[_0xee3a[18]]);router[_0xee3a[20]](_0xee3a[9],auth[_0xee3a[10]](),controller[_0xee3a[19]]);router[_0xee3a[22]](_0xee3a[17],controller[_0xee3a[21]]);router[_0xee3a[24]](_0xee3a[17],auth[_0xee3a[10]](),controller[_0xee3a[23]]);module[_0xee3a[25]]= router
\ No newline at end of file
index 448c362..38c7a24 100644 (file)
@@ -1 +1 @@
-var _0xe3f8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x65\x64\x69\x75\x6D","\x42\x4F\x4F\x4C\x45\x41\x4E","\x69\x6E","\x6F\x75\x74","\x44\x41\x54\x45"];_0xe3f8[0];var Sequelize=require(_0xe3f8[1]);module[_0xe3f8[2]]= {body:{type:Sequelize.TEXT(_0xe3f8[3]),allowNull:false},read:{type:Sequelize[_0xe3f8[4]],defaultValue:false},secret:{type:Sequelize[_0xe3f8[4]],defaultValue:false},direction:{type:Sequelize.ENUM(_0xe3f8[5],_0xe3f8[6]),defaultValue:_0xe3f8[6],allowNull:false},readAt:{type:Sequelize[_0xe3f8[7]]}}
\ No newline at end of file
+var _0x1e6c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x65\x64\x69\x75\x6D","\x42\x4F\x4F\x4C\x45\x41\x4E","\x69\x6E","\x6F\x75\x74","\x44\x41\x54\x45"];_0x1e6c[0];var Sequelize=require(_0x1e6c[1]);module[_0x1e6c[2]]= {body:{type:Sequelize.TEXT(_0x1e6c[3]),allowNull:false},read:{type:Sequelize[_0x1e6c[4]],defaultValue:false},secret:{type:Sequelize[_0x1e6c[4]],defaultValue:false},direction:{type:Sequelize.ENUM(_0x1e6c[5],_0x1e6c[6]),defaultValue:_0x1e6c[6],allowNull:false},readAt:{type:Sequelize[_0x1e6c[7]]}}
\ No newline at end of file
index 379e84f..c0b40bf 100644 (file)
@@ -1 +1 @@
-var _0x48dc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x63\x68\x61\x74\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x61\x63\x63\x65\x70\x74","\x63\x68\x61\x74","\x72\x65\x61\x64","\x72\x65\x61\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x55\x73\x65\x72\x49\x64","\x75\x73\x65\x72","\x6D\x61\x6E\x75\x61\x6C","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x53\x49\x50\x2F\x25\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x65\x76\x65\x6E\x74","\x45\x76\x65\x6E\x74\x4D\x61\x6E\x61\x67\x65\x72","\x61\x63\x63\x65\x70\x74\x6D\x65\x73\x73\x61\x67\x65","\x66\x6F\x72\x6D\x44\x61\x74\x61","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x70\x61\x72\x73\x65","\x67\x65\x74","\x5B\x43\x48\x41\x54\x4D\x45\x53\x53\x41\x47\x45\x3A\x41\x43\x43\x45\x50\x54\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x72\x6F\x6C\x65","\x6E\x75\x6C\x6C","\x41\x63\x63\x65\x70\x74\x4D\x65\x73\x73\x61\x67\x65","\x61\x63\x63\x65\x70\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x61\x64\x31\x73\x74\x41\x74","\x69\x73\x4E\x69\x6C","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x61\x67\x65\x6E\x74","\x72\x65\x6A\x65\x63\x74\x6D\x65\x73\x73\x61\x67\x65","\x5B\x43\x48\x41\x54\x4D\x45\x53\x53\x41\x47\x45\x3A\x52\x45\x4A\x45\x43\x54\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x52\x65\x6A\x65\x63\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x6A\x65\x63\x74\x4D\x65\x73\x73\x61\x67\x65"];_0x48dc[0];var jsonpatch=require(_0x48dc[1]);var rp=require(_0x48dc[2]);var moment=require(_0x48dc[3]);var BPromise=require(_0x48dc[4]);var Mustache=require(_0x48dc[5]);var util=require(_0x48dc[6]);var path=require(_0x48dc[7]);var sox=require(_0x48dc[8]);var csv=require(_0x48dc[9]);var ejs=require(_0x48dc[10]);var fs=require(_0x48dc[11]);var _=require(_0x48dc[12]);var squel=require(_0x48dc[13]);var crypto=require(_0x48dc[14]);var jsforce=require(_0x48dc[15]);var deskjs=require(_0x48dc[16]);var toCsv=require(_0x48dc[9]);var querystring=require(_0x48dc[17]);var Papa=require(_0x48dc[18]);var qs=require(_0x48dc[19]);var logger=require(_0x48dc[21])(_0x48dc[20]);var utils=require(_0x48dc[22]);var config=require(_0x48dc[23]);var db=require(_0x48dc[25])[_0x48dc[24]];var socket=require(_0x48dc[27])({host:_0x48dc[26],port:6379});require(_0x48dc[29])[_0x48dc[28]](socket);var jayson=require(_0x48dc[30]);var client=jayson[_0x48dc[32]][_0x48dc[31]]({port:9004});var client9002=jayson[_0x48dc[32]][_0x48dc[31]]({port:9002});function respondWithRpcPromise(_0x6ae8x1e,_0x6ae8x1f,_0x6ae8x20,_0x6ae8x21){return  new BPromise(function(_0x6ae8x22,_0x6ae8x23){var _0x6ae8x24=(_0x6ae8x21|| client);return _0x6ae8x24[_0x48dc[45]](_0x6ae8x1e,_0x6ae8x20)[_0x48dc[44]](function(_0x6ae8x26){logger[_0x48dc[37]](_0x48dc[33],_0x6ae8x1f,_0x48dc[36]);logger[_0x48dc[40]](_0x48dc[38],_0x6ae8x1f,_0x48dc[36],JSON[_0x48dc[39]](_0x6ae8x26));if(_0x6ae8x26[_0x48dc[34]]){if(_0x6ae8x26[_0x48dc[34]][_0x48dc[41]]=== 500){logger[_0x48dc[34]](_0x48dc[33],_0x6ae8x1f,_0x6ae8x26[_0x48dc[34]][_0x48dc[42]]);return _0x6ae8x23(_0x6ae8x26[_0x48dc[34]][_0x48dc[42]])};logger[_0x48dc[34]](_0x48dc[33],_0x6ae8x1f,_0x6ae8x26[_0x48dc[34]][_0x48dc[42]]);return _0x6ae8x22(_0x6ae8x26[_0x48dc[34]][_0x48dc[42]])}else {logger[_0x48dc[37]](_0x48dc[33],_0x6ae8x1f,_0x48dc[36]);_0x6ae8x22(_0x6ae8x26[_0x48dc[43]][_0x48dc[42]])}})[_0x48dc[35]](function(_0x6ae8x25){logger[_0x48dc[34]](_0x48dc[33],_0x6ae8x1f,_0x6ae8x25);_0x6ae8x23(_0x6ae8x25)})})}function respondWithStatusCode(_0x6ae8x26,_0x6ae8x28){_0x6ae8x28= _0x6ae8x28|| 204;return function(_0x6ae8x29){if(_0x6ae8x29){return _0x6ae8x26[_0x48dc[46]](_0x6ae8x28)};return _0x6ae8x26[_0x48dc[48]](_0x6ae8x28)[_0x48dc[47]]()}}function respondWithResult(_0x6ae8x26,_0x6ae8x28){_0x6ae8x28= _0x6ae8x28|| 200;return function(_0x6ae8x29){if(_0x6ae8x29){return _0x6ae8x26[_0x48dc[48]](_0x6ae8x28)[_0x48dc[49]](_0x6ae8x29)}}}function respondWithFilteredResult(_0x6ae8x26,_0x6ae8x2c){return function(_0x6ae8x29){if(_0x6ae8x29){var _0x6ae8x2d=_0x6ae8x29[_0x48dc[50]],_0x6ae8x2e=_0x6ae8x2c[_0x48dc[51]],_0x6ae8x2f=_0x6ae8x2c[_0x48dc[51]]+ _0x6ae8x2c[_0x48dc[52]],_0x6ae8x28;if(_0x6ae8x2f>= _0x6ae8x2d){_0x6ae8x2f= _0x6ae8x2d;_0x6ae8x28= 200}else {_0x6ae8x28= 206};_0x6ae8x26[_0x48dc[48]](_0x6ae8x28);return _0x6ae8x26[_0x48dc[56]](_0x48dc[53],_0x6ae8x2e+ _0x48dc[54]+ _0x6ae8x2f+ _0x48dc[55]+ _0x6ae8x2d)[_0x48dc[49]](_0x6ae8x29)};return null}}function patchUpdates(_0x6ae8x31){return function(_0x6ae8x29){try{jsonpatch[_0x48dc[57]](_0x6ae8x29,_0x6ae8x31,true)}catch(err){return BPromise[_0x48dc[58]](err)};return _0x6ae8x29[_0x48dc[59]]()}}function saveUpdates(_0x6ae8x33,_0x6ae8x28){return function(_0x6ae8x29){if(_0x6ae8x29){return _0x6ae8x29[_0x48dc[60]](_0x6ae8x33)[_0x48dc[44]](function(_0x6ae8x34){return _0x6ae8x34})};return null}}function removeEntity(_0x6ae8x26,_0x6ae8x28){return function(_0x6ae8x29){if(_0x6ae8x29){return _0x6ae8x29[_0x48dc[61]]()[_0x48dc[44]](function(){_0x6ae8x26[_0x48dc[48]](204)[_0x48dc[47]]()})}}}function handleEntityNotFound(_0x6ae8x26,_0x6ae8x28){return function(_0x6ae8x29){if(!_0x6ae8x29){_0x6ae8x26[_0x48dc[46]](404)};return _0x6ae8x29}}function handleError(_0x6ae8x26,_0x6ae8x28){_0x6ae8x28= _0x6ae8x28|| 500;return function(_0x6ae8x25){logger[_0x48dc[34]](_0x6ae8x25[_0x48dc[62]]);if(_0x6ae8x25[_0x48dc[63]]){delete _0x6ae8x25[_0x48dc[63]]};_0x6ae8x26[_0x48dc[48]](_0x6ae8x28)[_0x48dc[64]](_0x6ae8x25)}}exports[_0x48dc[65]]= function(_0x6ae8x20,_0x6ae8x26){var _0x6ae8x2c={},_0x6ae8x38={},_0x6ae8x39={count:0,rows:[]};_0x6ae8x38[_0x48dc[66]]= _[_0x48dc[69]](db[_0x48dc[68]][_0x48dc[67]]);var _0x6ae8x3a={dateStart:_0x6ae8x20[_0x48dc[71]][_0x48dc[70]],dateEnd:_0x6ae8x20[_0x48dc[71]][_0x48dc[72]]};delete _0x6ae8x20[_0x48dc[71]][_0x48dc[70]];delete _0x6ae8x20[_0x48dc[71]][_0x48dc[72]];_0x6ae8x38[_0x48dc[71]]= _[_0x48dc[69]](_0x6ae8x20[_0x48dc[71]]);_0x6ae8x38[_0x48dc[73]]= _[_0x48dc[74]](_0x6ae8x38[_0x48dc[66]],_0x6ae8x38[_0x48dc[71]]);_0x6ae8x2c[_0x48dc[75]]= _[_0x48dc[74]](_0x6ae8x38[_0x48dc[66]],qs[_0x48dc[76]](_0x6ae8x20[_0x48dc[71]][_0x48dc[76]]));_0x6ae8x2c[_0x48dc[75]]= (_0x6ae8x2c[_0x48dc[75]][_0x48dc[77]])?_0x6ae8x2c[_0x48dc[75]]:_0x6ae8x38[_0x48dc[66]];if(!_0x6ae8x20[_0x48dc[71]][_0x48dc[79]](_0x48dc[78])){_0x6ae8x2c[_0x48dc[52]]= qs[_0x48dc[52]](_0x6ae8x20[_0x48dc[71]][_0x48dc[52]]);_0x6ae8x2c[_0x48dc[51]]= qs[_0x48dc[51]](_0x6ae8x20[_0x48dc[71]][_0x48dc[51]])};_0x6ae8x2c[_0x48dc[80]]= qs[_0x48dc[81]](_0x6ae8x20[_0x48dc[71]][_0x48dc[81]]);_0x6ae8x2c[_0x48dc[82]]= qs[_0x48dc[73]](_[_0x48dc[83]](_0x6ae8x20[_0x48dc[71]],_0x6ae8x38[_0x48dc[73]]));if(_0x6ae8x3a[_0x48dc[70]]){if(_0x6ae8x3a[_0x48dc[72]]){_0x6ae8x3a[_0x48dc[72]]= moment(_0x6ae8x3a[_0x48dc[72]])[_0x48dc[85]](1,_0x48dc[84])}else {_0x6ae8x3a[_0x48dc[72]]= moment(_0x6ae8x3a[_0x48dc[70]])[_0x48dc[85]](1,_0x48dc[84])};_[_0x48dc[86]](_0x6ae8x2c[_0x48dc[82]],{createdAt:{$gte:_0x6ae8x3a[_0x48dc[70]],$lte:_0x6ae8x3a[_0x48dc[72]]}})};if(_0x6ae8x20[_0x48dc[71]][_0x48dc[87]]){_0x6ae8x2c[_0x48dc[82]]= _[_0x48dc[86]](_0x6ae8x2c[_0x48dc[82]],{$or:_[_0x48dc[89]](_0x6ae8x2c[_0x48dc[75]],function(_0x6ae8x3b){var _0x6ae8x39={};_0x6ae8x39[_0x6ae8x3b]= {$like:_0x48dc[88]+ _0x6ae8x20[_0x48dc[71]][_0x48dc[87]]+ _0x48dc[88]};return _0x6ae8x39})})};_0x6ae8x2c= _[_0x48dc[86]]({},_0x6ae8x2c,_0x6ae8x20[_0x48dc[90]]);var _0x6ae8x3c={where:_0x6ae8x2c[_0x48dc[82]]};return db[_0x48dc[68]][_0x48dc[50]](_0x6ae8x3c)[_0x48dc[44]](function(_0x6ae8x2d){_0x6ae8x39[_0x48dc[50]]= _0x6ae8x2d;if(_0x6ae8x20[_0x48dc[71]][_0x48dc[92]]){_0x6ae8x2c[_0x48dc[93]]= [{all:true}]};return db[_0x48dc[68]][_0x48dc[94]](_0x6ae8x2c)})[_0x48dc[44]](function(_0x6ae8x3d){_0x6ae8x39[_0x48dc[91]]= _0x6ae8x3d;return _0x6ae8x39})[_0x48dc[44]](respondWithFilteredResult(_0x6ae8x26,_0x6ae8x2c))[_0x48dc[35]](handleError(_0x6ae8x26,null))};exports[_0x48dc[95]]= function(_0x6ae8x20,_0x6ae8x26){var _0x6ae8x2c={raw:true,where:{id:_0x6ae8x20[_0x48dc[97]][_0x48dc[96]]}},_0x6ae8x38={};_0x6ae8x38[_0x48dc[66]]= _[_0x48dc[69]](db[_0x48dc[68]][_0x48dc[67]]);_0x6ae8x38[_0x48dc[71]]= _[_0x48dc[69]](_0x6ae8x20[_0x48dc[71]]);_0x6ae8x38[_0x48dc[73]]= _[_0x48dc[74]](_0x6ae8x38[_0x48dc[66]],_0x6ae8x38[_0x48dc[71]]);_0x6ae8x2c[_0x48dc[75]]= _[_0x48dc[74]](_0x6ae8x38[_0x48dc[66]],qs[_0x48dc[76]](_0x6ae8x20[_0x48dc[71]][_0x48dc[76]]));_0x6ae8x2c[_0x48dc[75]]= (_0x6ae8x2c[_0x48dc[75]][_0x48dc[77]])?_0x6ae8x2c[_0x48dc[75]]:_0x6ae8x38[_0x48dc[66]];if(_0x6ae8x20[_0x48dc[71]][_0x48dc[92]]){_0x6ae8x2c[_0x48dc[93]]= [{all:true}]};_0x6ae8x2c= _[_0x48dc[86]]({},_0x6ae8x2c,_0x6ae8x20[_0x48dc[90]]);return db[_0x48dc[68]][_0x48dc[98]](_0x6ae8x2c)[_0x48dc[44]](handleEntityNotFound(_0x6ae8x26,null))[_0x48dc[44]](respondWithResult(_0x6ae8x26,null))[_0x48dc[35]](handleError(_0x6ae8x26,null))};exports[_0x48dc[99]]= function(_0x6ae8x20,_0x6ae8x26){return db[_0x48dc[68]][_0x48dc[99]](_0x6ae8x20[_0x48dc[100]],{})[_0x48dc[44]](respondWithResult(_0x6ae8x26,201))[_0x48dc[35]](handleError(_0x6ae8x26,null))};exports[_0x48dc[60]]= function(_0x6ae8x20,_0x6ae8x26){if(_0x6ae8x20[_0x48dc[100]][_0x48dc[96]]){delete _0x6ae8x20[_0x48dc[100]][_0x48dc[96]]};return db[_0x48dc[68]][_0x48dc[98]]({where:{id:_0x6ae8x20[_0x48dc[97]][_0x48dc[96]]}})[_0x48dc[44]](handleEntityNotFound(_0x6ae8x26,null))[_0x48dc[44]](saveUpdates(_0x6ae8x20[_0x48dc[100]],null))[_0x48dc[44]](respondWithResult(_0x6ae8x26,null))[_0x48dc[35]](handleError(_0x6ae8x26,null))};exports[_0x48dc[61]]= function(_0x6ae8x20,_0x6ae8x26){return db[_0x48dc[68]][_0x48dc[98]]({where:{id:_0x6ae8x20[_0x48dc[97]][_0x48dc[96]]}})[_0x48dc[44]](handleEntityNotFound(_0x6ae8x26,null))[_0x48dc[44]](removeEntity(_0x6ae8x26,null))[_0x48dc[35]](handleError(_0x6ae8x26,null))};exports[_0x48dc[101]]= function(_0x6ae8x20,_0x6ae8x26){return db[_0x48dc[68]][_0x48dc[101]]()[_0x48dc[44]](respondWithResult(_0x6ae8x26,null))[_0x48dc[35]](handleError(_0x6ae8x26,null))};var interaction_log=require(_0x48dc[21])(_0x48dc[102]);exports[_0x48dc[103]]= function(_0x6ae8x20,_0x6ae8x26,_0x6ae8x3f){var _0x6ae8x40={channel:_0x48dc[104]};if(_0x6ae8x20[_0x48dc[100]][_0x48dc[96]]){delete _0x6ae8x20[_0x48dc[100]][_0x48dc[96]]};_0x6ae8x20[_0x48dc[100]][_0x48dc[105]]= true;_0x6ae8x20[_0x48dc[100]][_0x48dc[106]]= moment()[_0x48dc[108]](_0x48dc[107]);_0x6ae8x20[_0x48dc[100]][_0x48dc[109]]= _0x6ae8x20[_0x48dc[100]][_0x48dc[109]]|| _0x6ae8x20[_0x48dc[110]][_0x48dc[96]];return db[_0x48dc[68]][_0x48dc[98]]({where:{id:_0x6ae8x20[_0x48dc[97]][_0x48dc[96]],UserId:null},include:[{model:db[_0x48dc[131]],as:_0x48dc[132]}]})[_0x48dc[44]](handleEntityNotFound(_0x6ae8x26,null))[_0x48dc[44]](saveUpdates(_0x6ae8x20[_0x48dc[100]],null))[_0x48dc[44]](function(_0x6ae8x29){if(_0x6ae8x29){_0x6ae8x40[_0x48dc[42]]= _0x6ae8x29[_0x48dc[121]]({plain:true});return db[_0x48dc[130]][_0x48dc[98]]({where:{id:_0x6ae8x29[_0x48dc[129]]}})};return null})[_0x48dc[44]](handleEntityNotFound(_0x6ae8x26,null))[_0x48dc[44]](function(_0x6ae8x29){if(_0x6ae8x29){return _0x6ae8x29[_0x48dc[60]]({UserId:_0x6ae8x20[_0x48dc[100]][_0x48dc[109]],read1stAt:_[_0x48dc[128]](_0x6ae8x29[_0x48dc[127]])?moment()[_0x48dc[108]](_0x48dc[107]):undefined})};return null})[_0x48dc[44]](function(_0x6ae8x29){if(_0x6ae8x29){_0x6ae8x40[_0x48dc[119]]= _0x6ae8x29[_0x48dc[121]]({plain:true});interaction_log[_0x48dc[37]](_0x48dc[122],_0x6ae8x20[_0x48dc[110]][_0x48dc[96]],_0x6ae8x20[_0x48dc[110]][_0x48dc[63]],_0x6ae8x20[_0x48dc[110]][_0x48dc[123]],_0x6ae8x40[_0x48dc[119]][_0x48dc[96]],_0x6ae8x20[_0x48dc[100]]?JSON[_0x48dc[39]](_0x6ae8x20[_0x48dc[100]]):_0x48dc[124]);return respondWithRpcPromise(_0x48dc[125],_0x48dc[126],_0x6ae8x40)};return null})[_0x48dc[44]](function(_0x6ae8x29){if(_0x6ae8x29){if(_0x6ae8x20[_0x48dc[100]][_0x48dc[111]]){_0x6ae8x40[_0x48dc[42]][_0x48dc[112]]= util[_0x48dc[108]](_0x48dc[113],_0x6ae8x20[_0x48dc[110]][_0x48dc[63]]);_0x6ae8x40[_0x48dc[42]][_0x48dc[114]]= _0x6ae8x40[_0x48dc[114]];_0x6ae8x40[_0x48dc[42]][_0x48dc[115]]= _0x48dc[103];return respondWithRpcPromise(_0x48dc[116],_0x48dc[116],{event:_0x48dc[117],message:_[_0x48dc[86]](_0x6ae8x40[_0x48dc[42]],JSON[_0x48dc[120]](_0x6ae8x40[_0x48dc[119]][_0x48dc[118]]))},client9002)[_0x48dc[44]](function(){return _0x6ae8x40})};return _0x6ae8x40};return null})[_0x48dc[44]](respondWithResult(_0x6ae8x26,null))[_0x48dc[35]](handleError(_0x6ae8x26,null))};var interaction_log=require(_0x48dc[21])(_0x48dc[102]);exports[_0x48dc[58]]= function(_0x6ae8x20,_0x6ae8x26,_0x6ae8x3f){var _0x6ae8x40={agent:{},channel:_0x48dc[104]};if(_0x6ae8x20[_0x48dc[100]][_0x48dc[96]]){delete _0x6ae8x20[_0x48dc[100]][_0x48dc[96]]};_0x6ae8x20[_0x48dc[100]][_0x48dc[109]]= _0x6ae8x20[_0x48dc[100]][_0x48dc[109]]|| _0x6ae8x20[_0x48dc[110]][_0x48dc[96]];_0x6ae8x40[_0x48dc[133]][_0x48dc[96]]= _0x6ae8x20[_0x48dc[100]][_0x48dc[109]];return db[_0x48dc[68]][_0x48dc[98]]({where:{id:_0x6ae8x20[_0x48dc[97]][_0x48dc[96]],UserId:null}})[_0x48dc[44]](handleEntityNotFound(_0x6ae8x26,null))[_0x48dc[44]](function(_0x6ae8x29){if(_0x6ae8x29){_0x6ae8x40[_0x48dc[42]]= _0x6ae8x29[_0x48dc[121]]({plain:true});return db[_0x48dc[130]][_0x48dc[98]]({where:{id:_0x6ae8x29[_0x48dc[129]]}})};return null})[_0x48dc[44]](handleEntityNotFound(_0x6ae8x26,null))[_0x48dc[44]](function(_0x6ae8x29){if(_0x6ae8x29){_0x6ae8x40[_0x48dc[119]]= _0x6ae8x29[_0x48dc[121]]({plain:true});interaction_log[_0x48dc[37]](_0x48dc[135],_0x6ae8x20[_0x48dc[110]][_0x48dc[96]],_0x6ae8x20[_0x48dc[110]][_0x48dc[63]],_0x6ae8x20[_0x48dc[110]][_0x48dc[123]],_0x6ae8x40[_0x48dc[119]][_0x48dc[96]],_0x6ae8x20[_0x48dc[100]]?JSON[_0x48dc[39]](_0x6ae8x20[_0x48dc[100]]):_0x48dc[124]);return respondWithRpcPromise(_0x48dc[136],_0x48dc[137],_0x6ae8x40)};return null})[_0x48dc[44]](function(_0x6ae8x29){if(_0x6ae8x29){_0x6ae8x29[_0x48dc[42]][_0x48dc[112]]= util[_0x48dc[108]](_0x48dc[113],_0x6ae8x20[_0x48dc[110]][_0x48dc[63]]);_0x6ae8x29[_0x48dc[42]][_0x48dc[114]]= _0x6ae8x40[_0x48dc[114]];_0x6ae8x29[_0x48dc[42]][_0x48dc[115]]= _0x48dc[58];respondWithRpcPromise(_0x48dc[116],_0x48dc[116],{event:_0x48dc[134],message:_0x6ae8x29[_0x48dc[42]]},client9002);return _0x6ae8x40};return null})[_0x48dc[44]](respondWithResult(_0x6ae8x26,null))[_0x48dc[35]](handleError(_0x6ae8x26,null))}
\ No newline at end of file
+var _0x7f7a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x63\x68\x61\x74\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x61\x63\x63\x65\x70\x74","\x63\x68\x61\x74","\x72\x65\x61\x64","\x72\x65\x61\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x55\x73\x65\x72\x49\x64","\x75\x73\x65\x72","\x6D\x61\x6E\x75\x61\x6C","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x53\x49\x50\x2F\x25\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x65\x76\x65\x6E\x74","\x45\x76\x65\x6E\x74\x4D\x61\x6E\x61\x67\x65\x72","\x61\x63\x63\x65\x70\x74\x6D\x65\x73\x73\x61\x67\x65","\x66\x6F\x72\x6D\x44\x61\x74\x61","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x70\x61\x72\x73\x65","\x67\x65\x74","\x5B\x43\x48\x41\x54\x4D\x45\x53\x53\x41\x47\x45\x3A\x41\x43\x43\x45\x50\x54\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x72\x6F\x6C\x65","\x6E\x75\x6C\x6C","\x41\x63\x63\x65\x70\x74\x4D\x65\x73\x73\x61\x67\x65","\x61\x63\x63\x65\x70\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x61\x64\x31\x73\x74\x41\x74","\x69\x73\x4E\x69\x6C","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x61\x67\x65\x6E\x74","\x72\x65\x6A\x65\x63\x74\x6D\x65\x73\x73\x61\x67\x65","\x5B\x43\x48\x41\x54\x4D\x45\x53\x53\x41\x47\x45\x3A\x52\x45\x4A\x45\x43\x54\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x52\x65\x6A\x65\x63\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x6A\x65\x63\x74\x4D\x65\x73\x73\x61\x67\x65"];_0x7f7a[0];var jsonpatch=require(_0x7f7a[1]);var rp=require(_0x7f7a[2]);var moment=require(_0x7f7a[3]);var BPromise=require(_0x7f7a[4]);var Mustache=require(_0x7f7a[5]);var util=require(_0x7f7a[6]);var path=require(_0x7f7a[7]);var sox=require(_0x7f7a[8]);var csv=require(_0x7f7a[9]);var ejs=require(_0x7f7a[10]);var fs=require(_0x7f7a[11]);var _=require(_0x7f7a[12]);var squel=require(_0x7f7a[13]);var crypto=require(_0x7f7a[14]);var jsforce=require(_0x7f7a[15]);var deskjs=require(_0x7f7a[16]);var toCsv=require(_0x7f7a[9]);var querystring=require(_0x7f7a[17]);var Papa=require(_0x7f7a[18]);var qs=require(_0x7f7a[19]);var logger=require(_0x7f7a[21])(_0x7f7a[20]);var utils=require(_0x7f7a[22]);var config=require(_0x7f7a[23]);var db=require(_0x7f7a[25])[_0x7f7a[24]];var socket=require(_0x7f7a[27])({host:_0x7f7a[26],port:6379});require(_0x7f7a[29])[_0x7f7a[28]](socket);var jayson=require(_0x7f7a[30]);var client=jayson[_0x7f7a[32]][_0x7f7a[31]]({port:9004});var client9002=jayson[_0x7f7a[32]][_0x7f7a[31]]({port:9002});function respondWithRpcPromise(_0xb753x1e,_0xb753x1f,_0xb753x20,_0xb753x21){return  new BPromise(function(_0xb753x22,_0xb753x23){var _0xb753x24=(_0xb753x21|| client);return _0xb753x24[_0x7f7a[45]](_0xb753x1e,_0xb753x20)[_0x7f7a[44]](function(_0xb753x26){logger[_0x7f7a[37]](_0x7f7a[33],_0xb753x1f,_0x7f7a[36]);logger[_0x7f7a[40]](_0x7f7a[38],_0xb753x1f,_0x7f7a[36],JSON[_0x7f7a[39]](_0xb753x26));if(_0xb753x26[_0x7f7a[34]]){if(_0xb753x26[_0x7f7a[34]][_0x7f7a[41]]=== 500){logger[_0x7f7a[34]](_0x7f7a[33],_0xb753x1f,_0xb753x26[_0x7f7a[34]][_0x7f7a[42]]);return _0xb753x23(_0xb753x26[_0x7f7a[34]][_0x7f7a[42]])};logger[_0x7f7a[34]](_0x7f7a[33],_0xb753x1f,_0xb753x26[_0x7f7a[34]][_0x7f7a[42]]);return _0xb753x22(_0xb753x26[_0x7f7a[34]][_0x7f7a[42]])}else {logger[_0x7f7a[37]](_0x7f7a[33],_0xb753x1f,_0x7f7a[36]);_0xb753x22(_0xb753x26[_0x7f7a[43]][_0x7f7a[42]])}})[_0x7f7a[35]](function(_0xb753x25){logger[_0x7f7a[34]](_0x7f7a[33],_0xb753x1f,_0xb753x25);_0xb753x23(_0xb753x25)})})}function respondWithStatusCode(_0xb753x26,_0xb753x28){_0xb753x28= _0xb753x28|| 204;return function(_0xb753x29){if(_0xb753x29){return _0xb753x26[_0x7f7a[46]](_0xb753x28)};return _0xb753x26[_0x7f7a[48]](_0xb753x28)[_0x7f7a[47]]()}}function respondWithResult(_0xb753x26,_0xb753x28){_0xb753x28= _0xb753x28|| 200;return function(_0xb753x29){if(_0xb753x29){return _0xb753x26[_0x7f7a[48]](_0xb753x28)[_0x7f7a[49]](_0xb753x29)}}}function respondWithFilteredResult(_0xb753x26,_0xb753x2c){return function(_0xb753x29){if(_0xb753x29){var _0xb753x2d=_0xb753x29[_0x7f7a[50]],_0xb753x2e=_0xb753x2c[_0x7f7a[51]],_0xb753x2f=_0xb753x2c[_0x7f7a[51]]+ _0xb753x2c[_0x7f7a[52]],_0xb753x28;if(_0xb753x2f>= _0xb753x2d){_0xb753x2f= _0xb753x2d;_0xb753x28= 200}else {_0xb753x28= 206};_0xb753x26[_0x7f7a[48]](_0xb753x28);return _0xb753x26[_0x7f7a[56]](_0x7f7a[53],_0xb753x2e+ _0x7f7a[54]+ _0xb753x2f+ _0x7f7a[55]+ _0xb753x2d)[_0x7f7a[49]](_0xb753x29)};return null}}function patchUpdates(_0xb753x31){return function(_0xb753x29){try{jsonpatch[_0x7f7a[57]](_0xb753x29,_0xb753x31,true)}catch(err){return BPromise[_0x7f7a[58]](err)};return _0xb753x29[_0x7f7a[59]]()}}function saveUpdates(_0xb753x33,_0xb753x28){return function(_0xb753x29){if(_0xb753x29){return _0xb753x29[_0x7f7a[60]](_0xb753x33)[_0x7f7a[44]](function(_0xb753x34){return _0xb753x34})};return null}}function removeEntity(_0xb753x26,_0xb753x28){return function(_0xb753x29){if(_0xb753x29){return _0xb753x29[_0x7f7a[61]]()[_0x7f7a[44]](function(){_0xb753x26[_0x7f7a[48]](204)[_0x7f7a[47]]()})}}}function handleEntityNotFound(_0xb753x26,_0xb753x28){return function(_0xb753x29){if(!_0xb753x29){_0xb753x26[_0x7f7a[46]](404)};return _0xb753x29}}function handleError(_0xb753x26,_0xb753x28){_0xb753x28= _0xb753x28|| 500;return function(_0xb753x25){logger[_0x7f7a[34]](_0xb753x25[_0x7f7a[62]]);if(_0xb753x25[_0x7f7a[63]]){delete _0xb753x25[_0x7f7a[63]]};_0xb753x26[_0x7f7a[48]](_0xb753x28)[_0x7f7a[64]](_0xb753x25)}}exports[_0x7f7a[65]]= function(_0xb753x20,_0xb753x26){var _0xb753x2c={},_0xb753x38={},_0xb753x39={count:0,rows:[]};_0xb753x38[_0x7f7a[66]]= _[_0x7f7a[69]](db[_0x7f7a[68]][_0x7f7a[67]]);var _0xb753x3a={dateStart:_0xb753x20[_0x7f7a[71]][_0x7f7a[70]],dateEnd:_0xb753x20[_0x7f7a[71]][_0x7f7a[72]]};delete _0xb753x20[_0x7f7a[71]][_0x7f7a[70]];delete _0xb753x20[_0x7f7a[71]][_0x7f7a[72]];_0xb753x38[_0x7f7a[71]]= _[_0x7f7a[69]](_0xb753x20[_0x7f7a[71]]);_0xb753x38[_0x7f7a[73]]= _[_0x7f7a[74]](_0xb753x38[_0x7f7a[66]],_0xb753x38[_0x7f7a[71]]);_0xb753x2c[_0x7f7a[75]]= _[_0x7f7a[74]](_0xb753x38[_0x7f7a[66]],qs[_0x7f7a[76]](_0xb753x20[_0x7f7a[71]][_0x7f7a[76]]));_0xb753x2c[_0x7f7a[75]]= (_0xb753x2c[_0x7f7a[75]][_0x7f7a[77]])?_0xb753x2c[_0x7f7a[75]]:_0xb753x38[_0x7f7a[66]];if(!_0xb753x20[_0x7f7a[71]][_0x7f7a[79]](_0x7f7a[78])){_0xb753x2c[_0x7f7a[52]]= qs[_0x7f7a[52]](_0xb753x20[_0x7f7a[71]][_0x7f7a[52]]);_0xb753x2c[_0x7f7a[51]]= qs[_0x7f7a[51]](_0xb753x20[_0x7f7a[71]][_0x7f7a[51]])};_0xb753x2c[_0x7f7a[80]]= qs[_0x7f7a[81]](_0xb753x20[_0x7f7a[71]][_0x7f7a[81]]);_0xb753x2c[_0x7f7a[82]]= qs[_0x7f7a[73]](_[_0x7f7a[83]](_0xb753x20[_0x7f7a[71]],_0xb753x38[_0x7f7a[73]]));if(_0xb753x3a[_0x7f7a[70]]){if(_0xb753x3a[_0x7f7a[72]]){_0xb753x3a[_0x7f7a[72]]= moment(_0xb753x3a[_0x7f7a[72]])[_0x7f7a[85]](1,_0x7f7a[84])}else {_0xb753x3a[_0x7f7a[72]]= moment(_0xb753x3a[_0x7f7a[70]])[_0x7f7a[85]](1,_0x7f7a[84])};_[_0x7f7a[86]](_0xb753x2c[_0x7f7a[82]],{createdAt:{$gte:_0xb753x3a[_0x7f7a[70]],$lte:_0xb753x3a[_0x7f7a[72]]}})};if(_0xb753x20[_0x7f7a[71]][_0x7f7a[87]]){_0xb753x2c[_0x7f7a[82]]= _[_0x7f7a[86]](_0xb753x2c[_0x7f7a[82]],{$or:_[_0x7f7a[89]](_0xb753x2c[_0x7f7a[75]],function(_0xb753x3b){var _0xb753x39={};_0xb753x39[_0xb753x3b]= {$like:_0x7f7a[88]+ _0xb753x20[_0x7f7a[71]][_0x7f7a[87]]+ _0x7f7a[88]};return _0xb753x39})})};_0xb753x2c= _[_0x7f7a[86]]({},_0xb753x2c,_0xb753x20[_0x7f7a[90]]);var _0xb753x3c={where:_0xb753x2c[_0x7f7a[82]]};return db[_0x7f7a[68]][_0x7f7a[50]](_0xb753x3c)[_0x7f7a[44]](function(_0xb753x2d){_0xb753x39[_0x7f7a[50]]= _0xb753x2d;if(_0xb753x20[_0x7f7a[71]][_0x7f7a[92]]){_0xb753x2c[_0x7f7a[93]]= [{all:true}]};return db[_0x7f7a[68]][_0x7f7a[94]](_0xb753x2c)})[_0x7f7a[44]](function(_0xb753x3d){_0xb753x39[_0x7f7a[91]]= _0xb753x3d;return _0xb753x39})[_0x7f7a[44]](respondWithFilteredResult(_0xb753x26,_0xb753x2c))[_0x7f7a[35]](handleError(_0xb753x26,null))};exports[_0x7f7a[95]]= function(_0xb753x20,_0xb753x26){var _0xb753x2c={raw:true,where:{id:_0xb753x20[_0x7f7a[97]][_0x7f7a[96]]}},_0xb753x38={};_0xb753x38[_0x7f7a[66]]= _[_0x7f7a[69]](db[_0x7f7a[68]][_0x7f7a[67]]);_0xb753x38[_0x7f7a[71]]= _[_0x7f7a[69]](_0xb753x20[_0x7f7a[71]]);_0xb753x38[_0x7f7a[73]]= _[_0x7f7a[74]](_0xb753x38[_0x7f7a[66]],_0xb753x38[_0x7f7a[71]]);_0xb753x2c[_0x7f7a[75]]= _[_0x7f7a[74]](_0xb753x38[_0x7f7a[66]],qs[_0x7f7a[76]](_0xb753x20[_0x7f7a[71]][_0x7f7a[76]]));_0xb753x2c[_0x7f7a[75]]= (_0xb753x2c[_0x7f7a[75]][_0x7f7a[77]])?_0xb753x2c[_0x7f7a[75]]:_0xb753x38[_0x7f7a[66]];if(_0xb753x20[_0x7f7a[71]][_0x7f7a[92]]){_0xb753x2c[_0x7f7a[93]]= [{all:true}]};_0xb753x2c= _[_0x7f7a[86]]({},_0xb753x2c,_0xb753x20[_0x7f7a[90]]);return db[_0x7f7a[68]][_0x7f7a[98]](_0xb753x2c)[_0x7f7a[44]](handleEntityNotFound(_0xb753x26,null))[_0x7f7a[44]](respondWithResult(_0xb753x26,null))[_0x7f7a[35]](handleError(_0xb753x26,null))};exports[_0x7f7a[99]]= function(_0xb753x20,_0xb753x26){return db[_0x7f7a[68]][_0x7f7a[99]](_0xb753x20[_0x7f7a[100]],{})[_0x7f7a[44]](respondWithResult(_0xb753x26,201))[_0x7f7a[35]](handleError(_0xb753x26,null))};exports[_0x7f7a[60]]= function(_0xb753x20,_0xb753x26){if(_0xb753x20[_0x7f7a[100]][_0x7f7a[96]]){delete _0xb753x20[_0x7f7a[100]][_0x7f7a[96]]};return db[_0x7f7a[68]][_0x7f7a[98]]({where:{id:_0xb753x20[_0x7f7a[97]][_0x7f7a[96]]}})[_0x7f7a[44]](handleEntityNotFound(_0xb753x26,null))[_0x7f7a[44]](saveUpdates(_0xb753x20[_0x7f7a[100]],null))[_0x7f7a[44]](respondWithResult(_0xb753x26,null))[_0x7f7a[35]](handleError(_0xb753x26,null))};exports[_0x7f7a[61]]= function(_0xb753x20,_0xb753x26){return db[_0x7f7a[68]][_0x7f7a[98]]({where:{id:_0xb753x20[_0x7f7a[97]][_0x7f7a[96]]}})[_0x7f7a[44]](handleEntityNotFound(_0xb753x26,null))[_0x7f7a[44]](removeEntity(_0xb753x26,null))[_0x7f7a[35]](handleError(_0xb753x26,null))};exports[_0x7f7a[101]]= function(_0xb753x20,_0xb753x26){return db[_0x7f7a[68]][_0x7f7a[101]]()[_0x7f7a[44]](respondWithResult(_0xb753x26,null))[_0x7f7a[35]](handleError(_0xb753x26,null))};var interaction_log=require(_0x7f7a[21])(_0x7f7a[102]);exports[_0x7f7a[103]]= function(_0xb753x20,_0xb753x26,_0xb753x3f){var _0xb753x40={channel:_0x7f7a[104]};if(_0xb753x20[_0x7f7a[100]][_0x7f7a[96]]){delete _0xb753x20[_0x7f7a[100]][_0x7f7a[96]]};_0xb753x20[_0x7f7a[100]][_0x7f7a[105]]= true;_0xb753x20[_0x7f7a[100]][_0x7f7a[106]]= moment()[_0x7f7a[108]](_0x7f7a[107]);_0xb753x20[_0x7f7a[100]][_0x7f7a[109]]= _0xb753x20[_0x7f7a[100]][_0x7f7a[109]]|| _0xb753x20[_0x7f7a[110]][_0x7f7a[96]];return db[_0x7f7a[68]][_0x7f7a[98]]({where:{id:_0xb753x20[_0x7f7a[97]][_0x7f7a[96]],UserId:null},include:[{model:db[_0x7f7a[131]],as:_0x7f7a[132]}]})[_0x7f7a[44]](handleEntityNotFound(_0xb753x26,null))[_0x7f7a[44]](saveUpdates(_0xb753x20[_0x7f7a[100]],null))[_0x7f7a[44]](function(_0xb753x29){if(_0xb753x29){_0xb753x40[_0x7f7a[42]]= _0xb753x29[_0x7f7a[121]]({plain:true});return db[_0x7f7a[130]][_0x7f7a[98]]({where:{id:_0xb753x29[_0x7f7a[129]]}})};return null})[_0x7f7a[44]](handleEntityNotFound(_0xb753x26,null))[_0x7f7a[44]](function(_0xb753x29){if(_0xb753x29){return _0xb753x29[_0x7f7a[60]]({UserId:_0xb753x20[_0x7f7a[100]][_0x7f7a[109]],read1stAt:_[_0x7f7a[128]](_0xb753x29[_0x7f7a[127]])?moment()[_0x7f7a[108]](_0x7f7a[107]):undefined})};return null})[_0x7f7a[44]](function(_0xb753x29){if(_0xb753x29){_0xb753x40[_0x7f7a[119]]= _0xb753x29[_0x7f7a[121]]({plain:true});interaction_log[_0x7f7a[37]](_0x7f7a[122],_0xb753x20[_0x7f7a[110]][_0x7f7a[96]],_0xb753x20[_0x7f7a[110]][_0x7f7a[63]],_0xb753x20[_0x7f7a[110]][_0x7f7a[123]],_0xb753x40[_0x7f7a[119]][_0x7f7a[96]],_0xb753x20[_0x7f7a[100]]?JSON[_0x7f7a[39]](_0xb753x20[_0x7f7a[100]]):_0x7f7a[124]);return respondWithRpcPromise(_0x7f7a[125],_0x7f7a[126],_0xb753x40)};return null})[_0x7f7a[44]](function(_0xb753x29){if(_0xb753x29){if(_0xb753x20[_0x7f7a[100]][_0x7f7a[111]]){_0xb753x40[_0x7f7a[42]][_0x7f7a[112]]= util[_0x7f7a[108]](_0x7f7a[113],_0xb753x20[_0x7f7a[110]][_0x7f7a[63]]);_0xb753x40[_0x7f7a[42]][_0x7f7a[114]]= _0xb753x40[_0x7f7a[114]];_0xb753x40[_0x7f7a[42]][_0x7f7a[115]]= _0x7f7a[103];return respondWithRpcPromise(_0x7f7a[116],_0x7f7a[116],{event:_0x7f7a[117],message:_[_0x7f7a[86]](_0xb753x40[_0x7f7a[42]],JSON[_0x7f7a[120]](_0xb753x40[_0x7f7a[119]][_0x7f7a[118]]))},client9002)[_0x7f7a[44]](function(){return _0xb753x40})};return _0xb753x40};return null})[_0x7f7a[44]](respondWithResult(_0xb753x26,null))[_0x7f7a[35]](handleError(_0xb753x26,null))};var interaction_log=require(_0x7f7a[21])(_0x7f7a[102]);exports[_0x7f7a[58]]= function(_0xb753x20,_0xb753x26,_0xb753x3f){var _0xb753x40={agent:{},channel:_0x7f7a[104]};if(_0xb753x20[_0x7f7a[100]][_0x7f7a[96]]){delete _0xb753x20[_0x7f7a[100]][_0x7f7a[96]]};_0xb753x20[_0x7f7a[100]][_0x7f7a[109]]= _0xb753x20[_0x7f7a[100]][_0x7f7a[109]]|| _0xb753x20[_0x7f7a[110]][_0x7f7a[96]];_0xb753x40[_0x7f7a[133]][_0x7f7a[96]]= _0xb753x20[_0x7f7a[100]][_0x7f7a[109]];return db[_0x7f7a[68]][_0x7f7a[98]]({where:{id:_0xb753x20[_0x7f7a[97]][_0x7f7a[96]],UserId:null}})[_0x7f7a[44]](handleEntityNotFound(_0xb753x26,null))[_0x7f7a[44]](function(_0xb753x29){if(_0xb753x29){_0xb753x40[_0x7f7a[42]]= _0xb753x29[_0x7f7a[121]]({plain:true});return db[_0x7f7a[130]][_0x7f7a[98]]({where:{id:_0xb753x29[_0x7f7a[129]]}})};return null})[_0x7f7a[44]](handleEntityNotFound(_0xb753x26,null))[_0x7f7a[44]](function(_0xb753x29){if(_0xb753x29){_0xb753x40[_0x7f7a[119]]= _0xb753x29[_0x7f7a[121]]({plain:true});interaction_log[_0x7f7a[37]](_0x7f7a[135],_0xb753x20[_0x7f7a[110]][_0x7f7a[96]],_0xb753x20[_0x7f7a[110]][_0x7f7a[63]],_0xb753x20[_0x7f7a[110]][_0x7f7a[123]],_0xb753x40[_0x7f7a[119]][_0x7f7a[96]],_0xb753x20[_0x7f7a[100]]?JSON[_0x7f7a[39]](_0xb753x20[_0x7f7a[100]]):_0x7f7a[124]);return respondWithRpcPromise(_0x7f7a[136],_0x7f7a[137],_0xb753x40)};return null})[_0x7f7a[44]](function(_0xb753x29){if(_0xb753x29){_0xb753x29[_0x7f7a[42]][_0x7f7a[112]]= util[_0x7f7a[108]](_0x7f7a[113],_0xb753x20[_0x7f7a[110]][_0x7f7a[63]]);_0xb753x29[_0x7f7a[42]][_0x7f7a[114]]= _0xb753x40[_0x7f7a[114]];_0xb753x29[_0x7f7a[42]][_0x7f7a[115]]= _0x7f7a[58];respondWithRpcPromise(_0x7f7a[116],_0x7f7a[116],{event:_0x7f7a[134],message:_0xb753x29[_0x7f7a[42]]},client9002);return _0xb753x40};return null})[_0x7f7a[44]](respondWithResult(_0xb753x26,null))[_0x7f7a[35]](handleError(_0xb753x26,null))}
\ No newline at end of file
index 346aaeb..59cdeb1 100644 (file)
@@ -1 +1 @@
-var _0x9610=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x9610[0];var EventEmitter=require(_0x9610[1]);var ChatMessage=require(_0x9610[4])[_0x9610[3]][_0x9610[2]];var ChatMessageEvents= new EventEmitter();ChatMessageEvents[_0x9610[5]](0);var events={afterCreate:_0x9610[6],afterUpdate:_0x9610[7],afterDestroy:_0x9610[8]};function emitEvent(event){return function(_0x5ac2x7,_0x5ac2x8,_0x5ac2x9){ChatMessageEvents[_0x9610[11]](event+ _0x9610[9]+ _0x5ac2x7[_0x9610[10]],_0x5ac2x7);ChatMessageEvents[_0x9610[11]](event,_0x5ac2x7);_0x5ac2x9(null)}}for(var e in events){if(events[_0x9610[12]](e)){var event=events[e];ChatMessage[_0x9610[13]](e,emitEvent(event))}};module[_0x9610[14]]= ChatMessageEvents
\ No newline at end of file
+var _0xd8b7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xd8b7[0];var EventEmitter=require(_0xd8b7[1]);var ChatMessage=require(_0xd8b7[4])[_0xd8b7[3]][_0xd8b7[2]];var ChatMessageEvents= new EventEmitter();ChatMessageEvents[_0xd8b7[5]](0);var events={afterCreate:_0xd8b7[6],afterUpdate:_0xd8b7[7],afterDestroy:_0xd8b7[8]};function emitEvent(event){return function(_0x616ax7,_0x616ax8,_0x616ax9){ChatMessageEvents[_0xd8b7[11]](event+ _0xd8b7[9]+ _0x616ax7[_0xd8b7[10]],_0x616ax7);ChatMessageEvents[_0xd8b7[11]](event,_0x616ax7);_0x616ax9(null)}}for(var e in events){if(events[_0xd8b7[12]](e)){var event=events[e];ChatMessage[_0xd8b7[13]](e,emitEvent(event))}};module[_0xd8b7[14]]= ChatMessageEvents
\ No newline at end of file
index b01a15c..1f03243 100644 (file)
@@ -1 +1 @@
-var _0x3580=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x6D\x6F\x64\x65\x6C\x73","\x67\x65\x74","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x69\x6E","\x6F\x75\x74","\x73\x65\x63\x72\x65\x74","\x69\x73\x4E\x69\x6C","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x75\x74\x66\x38\x6D\x62\x34","\x75\x74\x66\x38\x6D\x62\x34\x5F\x75\x6E\x69\x63\x6F\x64\x65\x5F\x63\x69","\x64\x65\x66\x69\x6E\x65"];_0x3580[0];var _=require(_0x3580[1]);var util=require(_0x3580[2]);var logger=require(_0x3580[4])(_0x3580[3]);var moment=require(_0x3580[5]);var BPromise=require(_0x3580[6]);var rp=require(_0x3580[7]);var attributes=require(_0x3580[8]);module[_0x3580[9]]= function(_0xa41dx8,_0xa41dx9){return _0xa41dx8[_0x3580[31]](_0x3580[10],attributes,{tableName:_0x3580[11],paranoid:false,indexes:[],timestamps:true,hooks:{afterCreate:function(_0xa41dxa,_0xa41dxb,_0xa41dxc){var _0xa41dxd=_0xa41dx8[_0x3580[12]];var _0xa41dxe=_0xa41dxa[_0x3580[13]]({plain:true});if((_0xa41dxe[_0x3580[15]][_0x3580[14]]()=== _0x3580[16])|| (_0xa41dxe[_0x3580[15]][_0x3580[14]]()=== _0x3580[17]&&  !_0xa41dxe[_0x3580[18]]&&  !_[_0x3580[19]](_0xa41dxe.UserId))){_0xa41dxd[_0x3580[28]][_0x3580[27]]({where:{id:_0xa41dxe[_0x3580[26]]}})[_0x3580[25]](function(_0xa41dx10){if(_0xa41dx10){_0xa41dx10[_0x3580[24]]({lastMsgAt:_0xa41dxe[_0x3580[22]],lastMsgDirection:_0xa41dxe[_0x3580[15]][_0x3580[14]](),lastMsgBody:_0xa41dxe[_0x3580[23]]})}})[_0x3580[21]](function(_0xa41dxf){console[_0x3580[20]](_0xa41dxf)})};_0xa41dxc()}},charset:_0x3580[29],collate:_0x3580[30]})}
\ No newline at end of file
+var _0x73dd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x6D\x6F\x64\x65\x6C\x73","\x67\x65\x74","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x69\x6E","\x6F\x75\x74","\x73\x65\x63\x72\x65\x74","\x69\x73\x4E\x69\x6C","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x75\x74\x66\x38\x6D\x62\x34","\x75\x74\x66\x38\x6D\x62\x34\x5F\x75\x6E\x69\x63\x6F\x64\x65\x5F\x63\x69","\x64\x65\x66\x69\x6E\x65"];_0x73dd[0];var _=require(_0x73dd[1]);var util=require(_0x73dd[2]);var logger=require(_0x73dd[4])(_0x73dd[3]);var moment=require(_0x73dd[5]);var BPromise=require(_0x73dd[6]);var rp=require(_0x73dd[7]);var attributes=require(_0x73dd[8]);module[_0x73dd[9]]= function(_0x4213x8,_0x4213x9){return _0x4213x8[_0x73dd[31]](_0x73dd[10],attributes,{tableName:_0x73dd[11],paranoid:false,indexes:[],timestamps:true,hooks:{afterCreate:function(_0x4213xa,_0x4213xb,_0x4213xc){var _0x4213xd=_0x4213x8[_0x73dd[12]];var _0x4213xe=_0x4213xa[_0x73dd[13]]({plain:true});if((_0x4213xe[_0x73dd[15]][_0x73dd[14]]()=== _0x73dd[16])|| (_0x4213xe[_0x73dd[15]][_0x73dd[14]]()=== _0x73dd[17]&&  !_0x4213xe[_0x73dd[18]]&&  !_[_0x73dd[19]](_0x4213xe.UserId))){_0x4213xd[_0x73dd[28]][_0x73dd[27]]({where:{id:_0x4213xe[_0x73dd[26]]}})[_0x73dd[25]](function(_0x4213x10){if(_0x4213x10){_0x4213x10[_0x73dd[24]]({lastMsgAt:_0x4213xe[_0x73dd[22]],lastMsgDirection:_0x4213xe[_0x73dd[15]][_0x73dd[14]](),lastMsgBody:_0x4213xe[_0x73dd[23]]})}})[_0x73dd[21]](function(_0x4213xf){console[_0x73dd[20]](_0x4213xf)})};_0x4213xc()}},charset:_0x73dd[29],collate:_0x73dd[30]})}
\ No newline at end of file
index 85ffea3..83c89ff 100644 (file)
@@ -1 +1 @@
-var _0x71cc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65"];_0x71cc[0];var _=require(_0x71cc[1]);var util=require(_0x71cc[2]);var moment=require(_0x71cc[3]);var BPromise=require(_0x71cc[4]);var rs=require(_0x71cc[5]);var fs=require(_0x71cc[6]);var db=require(_0x71cc[8])[_0x71cc[7]];var utils=require(_0x71cc[9]);var logger=require(_0x71cc[11])(_0x71cc[10]);var config=require(_0x71cc[12]);var jayson=require(_0x71cc[13]);var client=jayson[_0x71cc[15]][_0x71cc[14]]({port:9002});var socket=require(_0x71cc[17])({host:_0x71cc[16],port:6379});require(_0x71cc[19])[_0x71cc[18]](socket);function respondWithRpcPromise(_0x1571xf,_0x1571x10,_0x1571x11){return  new BPromise(function(_0x1571x12,_0x1571x13){return client[_0x71cc[32]](_0x1571xf,_0x1571x11)[_0x71cc[31]](function(_0x1571x15){logger[_0x71cc[24]](_0x71cc[20],_0x1571x10,_0x71cc[23]);logger[_0x71cc[27]](_0x71cc[25],_0x1571x10,_0x71cc[23],JSON[_0x71cc[26]](_0x1571x15));if(_0x1571x15[_0x71cc[21]]){if(_0x1571x15[_0x71cc[21]][_0x71cc[28]]=== 500){logger[_0x71cc[21]](_0x71cc[20],_0x1571x10,_0x1571x15[_0x71cc[21]][_0x71cc[29]]);return _0x1571x13(_0x1571x15[_0x71cc[21]][_0x71cc[29]])};logger[_0x71cc[21]](_0x71cc[20],_0x1571x10,_0x1571x15[_0x71cc[21]][_0x71cc[29]]);return _0x1571x12(_0x1571x15[_0x71cc[21]][_0x71cc[29]])}else {logger[_0x71cc[24]](_0x71cc[20],_0x1571x10,_0x71cc[23]);_0x1571x12(_0x1571x15[_0x71cc[30]][_0x71cc[29]])}})[_0x71cc[22]](function(_0x1571x14){logger[_0x71cc[21]](_0x71cc[20],_0x1571x10,_0x1571x14);_0x1571x13(_0x1571x14)})})}exports[_0x71cc[33]]= function(_0x1571x11){var _0x1571x16=this;return  new Promise(function(_0x1571x12,_0x1571x13){return db[_0x71cc[38]][_0x71cc[37]](_0x1571x11[_0x71cc[34]],{raw:_0x1571x11[_0x71cc[35]]?(_0x1571x11[_0x71cc[35]][_0x71cc[36]]=== undefined)?true:false:true})[_0x71cc[31]](function(_0x1571x15){logger[_0x71cc[24]](_0x71cc[33],_0x1571x11);logger[_0x71cc[27]](_0x71cc[33],_0x1571x11,JSON[_0x71cc[26]](_0x1571x15));_0x1571x12(_0x1571x15)})[_0x71cc[22]](function(_0x1571x14){logger[_0x71cc[21]](_0x71cc[33],_0x1571x14[_0x71cc[29]],_0x1571x11);_0x1571x13(_0x1571x16[_0x71cc[21]](500,_0x1571x14[_0x71cc[29]]))})})}
\ No newline at end of file
+var _0xeef9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65"];_0xeef9[0];var _=require(_0xeef9[1]);var util=require(_0xeef9[2]);var moment=require(_0xeef9[3]);var BPromise=require(_0xeef9[4]);var rs=require(_0xeef9[5]);var fs=require(_0xeef9[6]);var db=require(_0xeef9[8])[_0xeef9[7]];var utils=require(_0xeef9[9]);var logger=require(_0xeef9[11])(_0xeef9[10]);var config=require(_0xeef9[12]);var jayson=require(_0xeef9[13]);var client=jayson[_0xeef9[15]][_0xeef9[14]]({port:9002});var socket=require(_0xeef9[17])({host:_0xeef9[16],port:6379});require(_0xeef9[19])[_0xeef9[18]](socket);function respondWithRpcPromise(_0x9d86xf,_0x9d86x10,_0x9d86x11){return  new BPromise(function(_0x9d86x12,_0x9d86x13){return client[_0xeef9[32]](_0x9d86xf,_0x9d86x11)[_0xeef9[31]](function(_0x9d86x15){logger[_0xeef9[24]](_0xeef9[20],_0x9d86x10,_0xeef9[23]);logger[_0xeef9[27]](_0xeef9[25],_0x9d86x10,_0xeef9[23],JSON[_0xeef9[26]](_0x9d86x15));if(_0x9d86x15[_0xeef9[21]]){if(_0x9d86x15[_0xeef9[21]][_0xeef9[28]]=== 500){logger[_0xeef9[21]](_0xeef9[20],_0x9d86x10,_0x9d86x15[_0xeef9[21]][_0xeef9[29]]);return _0x9d86x13(_0x9d86x15[_0xeef9[21]][_0xeef9[29]])};logger[_0xeef9[21]](_0xeef9[20],_0x9d86x10,_0x9d86x15[_0xeef9[21]][_0xeef9[29]]);return _0x9d86x12(_0x9d86x15[_0xeef9[21]][_0xeef9[29]])}else {logger[_0xeef9[24]](_0xeef9[20],_0x9d86x10,_0xeef9[23]);_0x9d86x12(_0x9d86x15[_0xeef9[30]][_0xeef9[29]])}})[_0xeef9[22]](function(_0x9d86x14){logger[_0xeef9[21]](_0xeef9[20],_0x9d86x10,_0x9d86x14);_0x9d86x13(_0x9d86x14)})})}exports[_0xeef9[33]]= function(_0x9d86x11){var _0x9d86x16=this;return  new Promise(function(_0x9d86x12,_0x9d86x13){return db[_0xeef9[38]][_0xeef9[37]](_0x9d86x11[_0xeef9[34]],{raw:_0x9d86x11[_0xeef9[35]]?(_0x9d86x11[_0xeef9[35]][_0xeef9[36]]=== undefined)?true:false:true})[_0xeef9[31]](function(_0x9d86x15){logger[_0xeef9[24]](_0xeef9[33],_0x9d86x11);logger[_0xeef9[27]](_0xeef9[33],_0x9d86x11,JSON[_0xeef9[26]](_0x9d86x15));_0x9d86x12(_0x9d86x15)})[_0xeef9[22]](function(_0x9d86x14){logger[_0xeef9[21]](_0xeef9[33],_0x9d86x14[_0xeef9[29]],_0x9d86x11);_0x9d86x13(_0x9d86x16[_0xeef9[21]](500,_0x9d86x14[_0xeef9[29]]))})})}
\ No newline at end of file
index 9f2ecba..e235abb 100644 (file)
@@ -1 +1 @@
-var _0xaee0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E"];_0xaee0[0];var ChatMessageEvents=require(_0xaee0[1]);var events=[_0xaee0[2],_0xaee0[3],_0xaee0[4]];function createListener(_0x492cx4,_0x492cx5){return function(_0x492cx6){_0x492cx5[_0xaee0[5]](_0x492cx4,_0x492cx6)}}function removeListener(_0x492cx4,_0x492cx8){return function(){ChatMessageEvents[_0xaee0[6]](_0x492cx4,_0x492cx8)}}exports[_0xaee0[7]]= function(_0x492cx5){for(var _0x492cx9=0,_0x492cxa=events[_0xaee0[8]];_0x492cx9< _0x492cxa;_0x492cx9++){var _0x492cx4=events[_0x492cx9];var _0x492cx8=createListener(_0xaee0[9]+ _0x492cx4,_0x492cx5);ChatMessageEvents[_0xaee0[10]](_0x492cx4,_0x492cx8)}}
\ No newline at end of file
+var _0x348c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E"];_0x348c[0];var ChatMessageEvents=require(_0x348c[1]);var events=[_0x348c[2],_0x348c[3],_0x348c[4]];function createListener(_0x454ax4,_0x454ax5){return function(_0x454ax6){_0x454ax5[_0x348c[5]](_0x454ax4,_0x454ax6)}}function removeListener(_0x454ax4,_0x454ax8){return function(){ChatMessageEvents[_0x348c[6]](_0x454ax4,_0x454ax8)}}exports[_0x348c[7]]= function(_0x454ax5){for(var _0x454ax9=0,_0x454axa=events[_0x348c[8]];_0x454ax9< _0x454axa;_0x454ax9++){var _0x454ax4=events[_0x454ax9];var _0x454ax8=createListener(_0x348c[9]+ _0x454ax4,_0x454ax5);ChatMessageEvents[_0x348c[10]](_0x454ax4,_0x454ax8)}}
\ No newline at end of file
index 2b960ca..34467cc 100644 (file)
@@ -1 +1 @@
-var _0xdd19=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x68\x61\x74","\x63\x68\x61\x74\x6D\x65\x73\x73\x61\x67\x65\x3A\x63\x72\x65\x61\x74\x65","\x74\x72\x61\x63\x6B\x65\x64","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74","\x61\x63\x63\x65\x70\x74","\x2F\x3A\x69\x64\x2F\x72\x65\x6A\x65\x63\x74","\x72\x65\x6A\x65\x63\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xdd19[0];var multer=require(_0xdd19[1]);var util=require(_0xdd19[2]);var path=require(_0xdd19[3]);var express=require(_0xdd19[4]);var router=express.Router();var auth=require(_0xdd19[5]);var interaction=require(_0xdd19[6]);var config=require(_0xdd19[7]);var controller=require(_0xdd19[8]);router[_0xdd19[12]](_0xdd19[9],auth[_0xdd19[10]](),controller[_0xdd19[11]]);router[_0xdd19[12]](_0xdd19[13],auth[_0xdd19[10]](),controller[_0xdd19[14]]);router[_0xdd19[12]](_0xdd19[15],auth[_0xdd19[10]](),controller[_0xdd19[16]]);router[_0xdd19[21]](_0xdd19[9],auth[_0xdd19[10]](),interaction[_0xdd19[19]](_0xdd19[17],_0xdd19[18]),controller[_0xdd19[20]]);router[_0xdd19[23]](_0xdd19[15],controller[_0xdd19[22]]);router[_0xdd19[23]](_0xdd19[24],auth[_0xdd19[10]](),controller[_0xdd19[25]]);router[_0xdd19[23]](_0xdd19[26],auth[_0xdd19[10]](),controller[_0xdd19[27]]);router[_0xdd19[29]](_0xdd19[15],auth[_0xdd19[10]](),controller[_0xdd19[28]]);module[_0xdd19[30]]= router
\ No newline at end of file
+var _0x6667=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x68\x61\x74","\x63\x68\x61\x74\x6D\x65\x73\x73\x61\x67\x65\x3A\x63\x72\x65\x61\x74\x65","\x74\x72\x61\x63\x6B\x65\x64","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74","\x61\x63\x63\x65\x70\x74","\x2F\x3A\x69\x64\x2F\x72\x65\x6A\x65\x63\x74","\x72\x65\x6A\x65\x63\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6667[0];var multer=require(_0x6667[1]);var util=require(_0x6667[2]);var path=require(_0x6667[3]);var express=require(_0x6667[4]);var router=express.Router();var auth=require(_0x6667[5]);var interaction=require(_0x6667[6]);var config=require(_0x6667[7]);var controller=require(_0x6667[8]);router[_0x6667[12]](_0x6667[9],auth[_0x6667[10]](),controller[_0x6667[11]]);router[_0x6667[12]](_0x6667[13],auth[_0x6667[10]](),controller[_0x6667[14]]);router[_0x6667[12]](_0x6667[15],auth[_0x6667[10]](),controller[_0x6667[16]]);router[_0x6667[21]](_0x6667[9],auth[_0x6667[10]](),interaction[_0x6667[19]](_0x6667[17],_0x6667[18]),controller[_0x6667[20]]);router[_0x6667[23]](_0x6667[15],controller[_0x6667[22]]);router[_0x6667[23]](_0x6667[24],auth[_0x6667[10]](),controller[_0x6667[25]]);router[_0x6667[23]](_0x6667[26],auth[_0x6667[10]](),controller[_0x6667[27]]);router[_0x6667[29]](_0x6667[15],auth[_0x6667[10]](),controller[_0x6667[28]]);module[_0x6667[30]]= router
\ No newline at end of file
index e9ccc57..2f3d734 100644 (file)
@@ -1 +1 @@
-var _0x9906=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x65\x64\x69\x75\x6D"];_0x9906[0];var Sequelize=require(_0x9906[1]);module[_0x9906[2]]= {body:{type:Sequelize.TEXT(_0x9906[3]),allowNull:false}}
\ No newline at end of file
+var _0xf34a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x65\x64\x69\x75\x6D"];_0xf34a[0];var Sequelize=require(_0xf34a[1]);module[_0xf34a[2]]= {body:{type:Sequelize.TEXT(_0xf34a[3]),allowNull:false}}
\ No newline at end of file
index 4a4cbfe..bec1224 100644 (file)
@@ -1 +1 @@
-var _0x500f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x500f[0];var jsonpatch=require(_0x500f[1]);var rp=require(_0x500f[2]);var moment=require(_0x500f[3]);var BPromise=require(_0x500f[4]);var Mustache=require(_0x500f[5]);var util=require(_0x500f[6]);var path=require(_0x500f[7]);var sox=require(_0x500f[8]);var csv=require(_0x500f[9]);var ejs=require(_0x500f[10]);var fs=require(_0x500f[11]);var _=require(_0x500f[12]);var squel=require(_0x500f[13]);var crypto=require(_0x500f[14]);var jsforce=require(_0x500f[15]);var deskjs=require(_0x500f[16]);var toCsv=require(_0x500f[9]);var querystring=require(_0x500f[17]);var Papa=require(_0x500f[18]);var qs=require(_0x500f[19]);var logger=require(_0x500f[21])(_0x500f[20]);var utils=require(_0x500f[22]);var config=require(_0x500f[23]);var db=require(_0x500f[25])[_0x500f[24]];function respondWithStatusCode(_0x894bx1a,_0x894bx1b){_0x894bx1b= _0x894bx1b|| 204;return function(_0x894bx1c){if(_0x894bx1c){return _0x894bx1a[_0x500f[26]](_0x894bx1b)};return _0x894bx1a[_0x500f[28]](_0x894bx1b)[_0x500f[27]]()}}function respondWithResult(_0x894bx1a,_0x894bx1b){_0x894bx1b= _0x894bx1b|| 200;return function(_0x894bx1c){if(_0x894bx1c){return _0x894bx1a[_0x500f[28]](_0x894bx1b)[_0x500f[29]](_0x894bx1c)}}}function respondWithFilteredResult(_0x894bx1a,_0x894bx1f){return function(_0x894bx1c){if(_0x894bx1c){var _0x894bx20=_0x894bx1c[_0x500f[30]],_0x894bx21=_0x894bx1f[_0x500f[31]],_0x894bx22=_0x894bx1f[_0x500f[31]]+ _0x894bx1f[_0x500f[32]],_0x894bx1b;if(_0x894bx22>= _0x894bx20){_0x894bx22= _0x894bx20;_0x894bx1b= 200}else {_0x894bx1b= 206};_0x894bx1a[_0x500f[28]](_0x894bx1b);return _0x894bx1a[_0x500f[36]](_0x500f[33],_0x894bx21+ _0x500f[34]+ _0x894bx22+ _0x500f[35]+ _0x894bx20)[_0x500f[29]](_0x894bx1c)};return null}}function patchUpdates(_0x894bx24){return function(_0x894bx1c){try{jsonpatch[_0x500f[37]](_0x894bx1c,_0x894bx24,true)}catch(err){return BPromise[_0x500f[38]](err)};return _0x894bx1c[_0x500f[39]]()}}function saveUpdates(_0x894bx26,_0x894bx1b){return function(_0x894bx1c){if(_0x894bx1c){return _0x894bx1c[_0x500f[41]](_0x894bx26)[_0x500f[40]](function(_0x894bx27){return _0x894bx27})};return null}}function removeEntity(_0x894bx1a,_0x894bx1b){return function(_0x894bx1c){if(_0x894bx1c){return _0x894bx1c[_0x500f[42]]()[_0x500f[40]](function(){_0x894bx1a[_0x500f[28]](204)[_0x500f[27]]()})}}}function handleEntityNotFound(_0x894bx1a,_0x894bx1b){return function(_0x894bx1c){if(!_0x894bx1c){_0x894bx1a[_0x500f[26]](404)};return _0x894bx1c}}function handleError(_0x894bx1a,_0x894bx1b){_0x894bx1b= _0x894bx1b|| 500;return function(_0x894bx2b){logger[_0x500f[44]](_0x894bx2b[_0x500f[43]]);if(_0x894bx2b[_0x500f[45]]){delete _0x894bx2b[_0x500f[45]]};_0x894bx1a[_0x500f[28]](_0x894bx1b)[_0x500f[46]](_0x894bx2b)}}exports[_0x500f[47]]= function(_0x894bx2c,_0x894bx1a){var _0x894bx1f={},_0x894bx2d={},_0x894bx2e={count:0,rows:[]};_0x894bx2d[_0x500f[48]]= _[_0x500f[51]](db[_0x500f[50]][_0x500f[49]]);var _0x894bx2f={dateStart:_0x894bx2c[_0x500f[53]][_0x500f[52]],dateEnd:_0x894bx2c[_0x500f[53]][_0x500f[54]]};delete _0x894bx2c[_0x500f[53]][_0x500f[52]];delete _0x894bx2c[_0x500f[53]][_0x500f[54]];_0x894bx2d[_0x500f[53]]= _[_0x500f[51]](_0x894bx2c[_0x500f[53]]);_0x894bx2d[_0x500f[55]]= _[_0x500f[56]](_0x894bx2d[_0x500f[48]],_0x894bx2d[_0x500f[53]]);_0x894bx1f[_0x500f[57]]= _[_0x500f[56]](_0x894bx2d[_0x500f[48]],qs[_0x500f[58]](_0x894bx2c[_0x500f[53]][_0x500f[58]]));_0x894bx1f[_0x500f[57]]= (_0x894bx1f[_0x500f[57]][_0x500f[59]])?_0x894bx1f[_0x500f[57]]:_0x894bx2d[_0x500f[48]];if(!_0x894bx2c[_0x500f[53]][_0x500f[61]](_0x500f[60])){_0x894bx1f[_0x500f[32]]= qs[_0x500f[32]](_0x894bx2c[_0x500f[53]][_0x500f[32]]);_0x894bx1f[_0x500f[31]]= qs[_0x500f[31]](_0x894bx2c[_0x500f[53]][_0x500f[31]])};_0x894bx1f[_0x500f[62]]= qs[_0x500f[63]](_0x894bx2c[_0x500f[53]][_0x500f[63]]);_0x894bx1f[_0x500f[64]]= qs[_0x500f[55]](_[_0x500f[65]](_0x894bx2c[_0x500f[53]],_0x894bx2d[_0x500f[55]]));if(_0x894bx2f[_0x500f[52]]){if(_0x894bx2f[_0x500f[54]]){_0x894bx2f[_0x500f[54]]= moment(_0x894bx2f[_0x500f[54]])[_0x500f[67]](1,_0x500f[66])}else {_0x894bx2f[_0x500f[54]]= moment(_0x894bx2f[_0x500f[52]])[_0x500f[67]](1,_0x500f[66])};_[_0x500f[68]](_0x894bx1f[_0x500f[64]],{createdAt:{$gte:_0x894bx2f[_0x500f[52]],$lte:_0x894bx2f[_0x500f[54]]}})};if(_0x894bx2c[_0x500f[53]][_0x500f[69]]){_0x894bx1f[_0x500f[64]]= _[_0x500f[68]](_0x894bx1f[_0x500f[64]],{$or:_[_0x500f[71]](_0x894bx1f[_0x500f[57]],function(_0x894bx30){var _0x894bx2e={};_0x894bx2e[_0x894bx30]= {$like:_0x500f[70]+ _0x894bx2c[_0x500f[53]][_0x500f[69]]+ _0x500f[70]};return _0x894bx2e})})};_0x894bx1f= _[_0x500f[68]]({},_0x894bx1f,_0x894bx2c[_0x500f[72]]);var _0x894bx31={where:_0x894bx1f[_0x500f[64]]};return db[_0x500f[50]][_0x500f[30]](_0x894bx31)[_0x500f[40]](function(_0x894bx20){_0x894bx2e[_0x500f[30]]= _0x894bx20;if(_0x894bx2c[_0x500f[53]][_0x500f[75]]){_0x894bx1f[_0x500f[76]]= [{all:true}]};return db[_0x500f[50]][_0x500f[77]](_0x894bx1f)})[_0x500f[40]](function(_0x894bx32){_0x894bx2e[_0x500f[74]]= _0x894bx32;return _0x894bx2e})[_0x500f[40]](respondWithFilteredResult(_0x894bx1a,_0x894bx1f))[_0x500f[73]](handleError(_0x894bx1a,null))};exports[_0x500f[78]]= function(_0x894bx2c,_0x894bx1a){var _0x894bx1f={raw:true,where:{id:_0x894bx2c[_0x500f[80]][_0x500f[79]]}},_0x894bx2d={};_0x894bx2d[_0x500f[48]]= _[_0x500f[51]](db[_0x500f[50]][_0x500f[49]]);_0x894bx2d[_0x500f[53]]= _[_0x500f[51]](_0x894bx2c[_0x500f[53]]);_0x894bx2d[_0x500f[55]]= _[_0x500f[56]](_0x894bx2d[_0x500f[48]],_0x894bx2d[_0x500f[53]]);_0x894bx1f[_0x500f[57]]= _[_0x500f[56]](_0x894bx2d[_0x500f[48]],qs[_0x500f[58]](_0x894bx2c[_0x500f[53]][_0x500f[58]]));_0x894bx1f[_0x500f[57]]= (_0x894bx1f[_0x500f[57]][_0x500f[59]])?_0x894bx1f[_0x500f[57]]:_0x894bx2d[_0x500f[48]];if(_0x894bx2c[_0x500f[53]][_0x500f[75]]){_0x894bx1f[_0x500f[76]]= [{all:true}]};_0x894bx1f= _[_0x500f[68]]({},_0x894bx1f,_0x894bx2c[_0x500f[72]]);return db[_0x500f[50]][_0x500f[81]](_0x894bx1f)[_0x500f[40]](handleEntityNotFound(_0x894bx1a,null))[_0x500f[40]](respondWithResult(_0x894bx1a,null))[_0x500f[73]](handleError(_0x894bx1a,null))};exports[_0x500f[82]]= function(_0x894bx2c,_0x894bx1a){return db[_0x500f[50]][_0x500f[82]](_0x894bx2c[_0x500f[83]],{})[_0x500f[40]](respondWithResult(_0x894bx1a,201))[_0x500f[73]](handleError(_0x894bx1a,null))};exports[_0x500f[41]]= function(_0x894bx2c,_0x894bx1a){if(_0x894bx2c[_0x500f[83]][_0x500f[79]]){delete _0x894bx2c[_0x500f[83]][_0x500f[79]]};return db[_0x500f[50]][_0x500f[81]]({where:{id:_0x894bx2c[_0x500f[80]][_0x500f[79]]}})[_0x500f[40]](handleEntityNotFound(_0x894bx1a,null))[_0x500f[40]](saveUpdates(_0x894bx2c[_0x500f[83]],null))[_0x500f[40]](respondWithResult(_0x894bx1a,null))[_0x500f[73]](handleError(_0x894bx1a,null))};exports[_0x500f[42]]= function(_0x894bx2c,_0x894bx1a){return db[_0x500f[50]][_0x500f[81]]({where:{id:_0x894bx2c[_0x500f[80]][_0x500f[79]]}})[_0x500f[40]](handleEntityNotFound(_0x894bx1a,null))[_0x500f[40]](removeEntity(_0x894bx1a,null))[_0x500f[73]](handleError(_0x894bx1a,null))};exports[_0x500f[84]]= function(_0x894bx2c,_0x894bx1a){return db[_0x500f[50]][_0x500f[84]]()[_0x500f[40]](respondWithResult(_0x894bx1a,null))[_0x500f[73]](handleError(_0x894bx1a,null))}
\ No newline at end of file
+var _0xab14=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xab14[0];var jsonpatch=require(_0xab14[1]);var rp=require(_0xab14[2]);var moment=require(_0xab14[3]);var BPromise=require(_0xab14[4]);var Mustache=require(_0xab14[5]);var util=require(_0xab14[6]);var path=require(_0xab14[7]);var sox=require(_0xab14[8]);var csv=require(_0xab14[9]);var ejs=require(_0xab14[10]);var fs=require(_0xab14[11]);var _=require(_0xab14[12]);var squel=require(_0xab14[13]);var crypto=require(_0xab14[14]);var jsforce=require(_0xab14[15]);var deskjs=require(_0xab14[16]);var toCsv=require(_0xab14[9]);var querystring=require(_0xab14[17]);var Papa=require(_0xab14[18]);var qs=require(_0xab14[19]);var logger=require(_0xab14[21])(_0xab14[20]);var utils=require(_0xab14[22]);var config=require(_0xab14[23]);var db=require(_0xab14[25])[_0xab14[24]];function respondWithStatusCode(_0x1d5fx1a,_0x1d5fx1b){_0x1d5fx1b= _0x1d5fx1b|| 204;return function(_0x1d5fx1c){if(_0x1d5fx1c){return _0x1d5fx1a[_0xab14[26]](_0x1d5fx1b)};return _0x1d5fx1a[_0xab14[28]](_0x1d5fx1b)[_0xab14[27]]()}}function respondWithResult(_0x1d5fx1a,_0x1d5fx1b){_0x1d5fx1b= _0x1d5fx1b|| 200;return function(_0x1d5fx1c){if(_0x1d5fx1c){return _0x1d5fx1a[_0xab14[28]](_0x1d5fx1b)[_0xab14[29]](_0x1d5fx1c)}}}function respondWithFilteredResult(_0x1d5fx1a,_0x1d5fx1f){return function(_0x1d5fx1c){if(_0x1d5fx1c){var _0x1d5fx20=_0x1d5fx1c[_0xab14[30]],_0x1d5fx21=_0x1d5fx1f[_0xab14[31]],_0x1d5fx22=_0x1d5fx1f[_0xab14[31]]+ _0x1d5fx1f[_0xab14[32]],_0x1d5fx1b;if(_0x1d5fx22>= _0x1d5fx20){_0x1d5fx22= _0x1d5fx20;_0x1d5fx1b= 200}else {_0x1d5fx1b= 206};_0x1d5fx1a[_0xab14[28]](_0x1d5fx1b);return _0x1d5fx1a[_0xab14[36]](_0xab14[33],_0x1d5fx21+ _0xab14[34]+ _0x1d5fx22+ _0xab14[35]+ _0x1d5fx20)[_0xab14[29]](_0x1d5fx1c)};return null}}function patchUpdates(_0x1d5fx24){return function(_0x1d5fx1c){try{jsonpatch[_0xab14[37]](_0x1d5fx1c,_0x1d5fx24,true)}catch(err){return BPromise[_0xab14[38]](err)};return _0x1d5fx1c[_0xab14[39]]()}}function saveUpdates(_0x1d5fx26,_0x1d5fx1b){return function(_0x1d5fx1c){if(_0x1d5fx1c){return _0x1d5fx1c[_0xab14[41]](_0x1d5fx26)[_0xab14[40]](function(_0x1d5fx27){return _0x1d5fx27})};return null}}function removeEntity(_0x1d5fx1a,_0x1d5fx1b){return function(_0x1d5fx1c){if(_0x1d5fx1c){return _0x1d5fx1c[_0xab14[42]]()[_0xab14[40]](function(){_0x1d5fx1a[_0xab14[28]](204)[_0xab14[27]]()})}}}function handleEntityNotFound(_0x1d5fx1a,_0x1d5fx1b){return function(_0x1d5fx1c){if(!_0x1d5fx1c){_0x1d5fx1a[_0xab14[26]](404)};return _0x1d5fx1c}}function handleError(_0x1d5fx1a,_0x1d5fx1b){_0x1d5fx1b= _0x1d5fx1b|| 500;return function(_0x1d5fx2b){logger[_0xab14[44]](_0x1d5fx2b[_0xab14[43]]);if(_0x1d5fx2b[_0xab14[45]]){delete _0x1d5fx2b[_0xab14[45]]};_0x1d5fx1a[_0xab14[28]](_0x1d5fx1b)[_0xab14[46]](_0x1d5fx2b)}}exports[_0xab14[47]]= function(_0x1d5fx2c,_0x1d5fx1a){var _0x1d5fx1f={},_0x1d5fx2d={},_0x1d5fx2e={count:0,rows:[]};_0x1d5fx2d[_0xab14[48]]= _[_0xab14[51]](db[_0xab14[50]][_0xab14[49]]);var _0x1d5fx2f={dateStart:_0x1d5fx2c[_0xab14[53]][_0xab14[52]],dateEnd:_0x1d5fx2c[_0xab14[53]][_0xab14[54]]};delete _0x1d5fx2c[_0xab14[53]][_0xab14[52]];delete _0x1d5fx2c[_0xab14[53]][_0xab14[54]];_0x1d5fx2d[_0xab14[53]]= _[_0xab14[51]](_0x1d5fx2c[_0xab14[53]]);_0x1d5fx2d[_0xab14[55]]= _[_0xab14[56]](_0x1d5fx2d[_0xab14[48]],_0x1d5fx2d[_0xab14[53]]);_0x1d5fx1f[_0xab14[57]]= _[_0xab14[56]](_0x1d5fx2d[_0xab14[48]],qs[_0xab14[58]](_0x1d5fx2c[_0xab14[53]][_0xab14[58]]));_0x1d5fx1f[_0xab14[57]]= (_0x1d5fx1f[_0xab14[57]][_0xab14[59]])?_0x1d5fx1f[_0xab14[57]]:_0x1d5fx2d[_0xab14[48]];if(!_0x1d5fx2c[_0xab14[53]][_0xab14[61]](_0xab14[60])){_0x1d5fx1f[_0xab14[32]]= qs[_0xab14[32]](_0x1d5fx2c[_0xab14[53]][_0xab14[32]]);_0x1d5fx1f[_0xab14[31]]= qs[_0xab14[31]](_0x1d5fx2c[_0xab14[53]][_0xab14[31]])};_0x1d5fx1f[_0xab14[62]]= qs[_0xab14[63]](_0x1d5fx2c[_0xab14[53]][_0xab14[63]]);_0x1d5fx1f[_0xab14[64]]= qs[_0xab14[55]](_[_0xab14[65]](_0x1d5fx2c[_0xab14[53]],_0x1d5fx2d[_0xab14[55]]));if(_0x1d5fx2f[_0xab14[52]]){if(_0x1d5fx2f[_0xab14[54]]){_0x1d5fx2f[_0xab14[54]]= moment(_0x1d5fx2f[_0xab14[54]])[_0xab14[67]](1,_0xab14[66])}else {_0x1d5fx2f[_0xab14[54]]= moment(_0x1d5fx2f[_0xab14[52]])[_0xab14[67]](1,_0xab14[66])};_[_0xab14[68]](_0x1d5fx1f[_0xab14[64]],{createdAt:{$gte:_0x1d5fx2f[_0xab14[52]],$lte:_0x1d5fx2f[_0xab14[54]]}})};if(_0x1d5fx2c[_0xab14[53]][_0xab14[69]]){_0x1d5fx1f[_0xab14[64]]= _[_0xab14[68]](_0x1d5fx1f[_0xab14[64]],{$or:_[_0xab14[71]](_0x1d5fx1f[_0xab14[57]],function(_0x1d5fx30){var _0x1d5fx2e={};_0x1d5fx2e[_0x1d5fx30]= {$like:_0xab14[70]+ _0x1d5fx2c[_0xab14[53]][_0xab14[69]]+ _0xab14[70]};return _0x1d5fx2e})})};_0x1d5fx1f= _[_0xab14[68]]({},_0x1d5fx1f,_0x1d5fx2c[_0xab14[72]]);var _0x1d5fx31={where:_0x1d5fx1f[_0xab14[64]]};return db[_0xab14[50]][_0xab14[30]](_0x1d5fx31)[_0xab14[40]](function(_0x1d5fx20){_0x1d5fx2e[_0xab14[30]]= _0x1d5fx20;if(_0x1d5fx2c[_0xab14[53]][_0xab14[75]]){_0x1d5fx1f[_0xab14[76]]= [{all:true}]};return db[_0xab14[50]][_0xab14[77]](_0x1d5fx1f)})[_0xab14[40]](function(_0x1d5fx32){_0x1d5fx2e[_0xab14[74]]= _0x1d5fx32;return _0x1d5fx2e})[_0xab14[40]](respondWithFilteredResult(_0x1d5fx1a,_0x1d5fx1f))[_0xab14[73]](handleError(_0x1d5fx1a,null))};exports[_0xab14[78]]= function(_0x1d5fx2c,_0x1d5fx1a){var _0x1d5fx1f={raw:true,where:{id:_0x1d5fx2c[_0xab14[80]][_0xab14[79]]}},_0x1d5fx2d={};_0x1d5fx2d[_0xab14[48]]= _[_0xab14[51]](db[_0xab14[50]][_0xab14[49]]);_0x1d5fx2d[_0xab14[53]]= _[_0xab14[51]](_0x1d5fx2c[_0xab14[53]]);_0x1d5fx2d[_0xab14[55]]= _[_0xab14[56]](_0x1d5fx2d[_0xab14[48]],_0x1d5fx2d[_0xab14[53]]);_0x1d5fx1f[_0xab14[57]]= _[_0xab14[56]](_0x1d5fx2d[_0xab14[48]],qs[_0xab14[58]](_0x1d5fx2c[_0xab14[53]][_0xab14[58]]));_0x1d5fx1f[_0xab14[57]]= (_0x1d5fx1f[_0xab14[57]][_0xab14[59]])?_0x1d5fx1f[_0xab14[57]]:_0x1d5fx2d[_0xab14[48]];if(_0x1d5fx2c[_0xab14[53]][_0xab14[75]]){_0x1d5fx1f[_0xab14[76]]= [{all:true}]};_0x1d5fx1f= _[_0xab14[68]]({},_0x1d5fx1f,_0x1d5fx2c[_0xab14[72]]);return db[_0xab14[50]][_0xab14[81]](_0x1d5fx1f)[_0xab14[40]](handleEntityNotFound(_0x1d5fx1a,null))[_0xab14[40]](respondWithResult(_0x1d5fx1a,null))[_0xab14[73]](handleError(_0x1d5fx1a,null))};exports[_0xab14[82]]= function(_0x1d5fx2c,_0x1d5fx1a){return db[_0xab14[50]][_0xab14[82]](_0x1d5fx2c[_0xab14[83]],{})[_0xab14[40]](respondWithResult(_0x1d5fx1a,201))[_0xab14[73]](handleError(_0x1d5fx1a,null))};exports[_0xab14[41]]= function(_0x1d5fx2c,_0x1d5fx1a){if(_0x1d5fx2c[_0xab14[83]][_0xab14[79]]){delete _0x1d5fx2c[_0xab14[83]][_0xab14[79]]};return db[_0xab14[50]][_0xab14[81]]({where:{id:_0x1d5fx2c[_0xab14[80]][_0xab14[79]]}})[_0xab14[40]](handleEntityNotFound(_0x1d5fx1a,null))[_0xab14[40]](saveUpdates(_0x1d5fx2c[_0xab14[83]],null))[_0xab14[40]](respondWithResult(_0x1d5fx1a,null))[_0xab14[73]](handleError(_0x1d5fx1a,null))};exports[_0xab14[42]]= function(_0x1d5fx2c,_0x1d5fx1a){return db[_0xab14[50]][_0xab14[81]]({where:{id:_0x1d5fx2c[_0xab14[80]][_0xab14[79]]}})[_0xab14[40]](handleEntityNotFound(_0x1d5fx1a,null))[_0xab14[40]](removeEntity(_0x1d5fx1a,null))[_0xab14[73]](handleError(_0x1d5fx1a,null))};exports[_0xab14[84]]= function(_0x1d5fx2c,_0x1d5fx1a){return db[_0xab14[50]][_0xab14[84]]()[_0xab14[40]](respondWithResult(_0x1d5fx1a,null))[_0xab14[73]](handleError(_0x1d5fx1a,null))}
\ No newline at end of file
index c823465..fee9665 100644 (file)
@@ -1 +1 @@
-var _0x519e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65","\x63\x68\x61\x74\x5F\x6F\x66\x66\x6C\x69\x6E\x65\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x75\x74\x66\x38\x6D\x62\x34","\x75\x74\x66\x38\x6D\x62\x34\x5F\x75\x6E\x69\x63\x6F\x64\x65\x5F\x63\x69","\x64\x65\x66\x69\x6E\x65"];_0x519e[0];var _=require(_0x519e[1]);var util=require(_0x519e[2]);var logger=require(_0x519e[4])(_0x519e[3]);var moment=require(_0x519e[5]);var BPromise=require(_0x519e[6]);var rp=require(_0x519e[7]);var attributes=require(_0x519e[8]);module[_0x519e[9]]= function(_0xb828x8,_0xb828x9){return _0xb828x8[_0x519e[14]](_0x519e[10],attributes,{tableName:_0x519e[11],paranoid:false,indexes:[],timestamps:true,charset:_0x519e[12],collate:_0x519e[13]})}
\ No newline at end of file
+var _0x4651=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65","\x63\x68\x61\x74\x5F\x6F\x66\x66\x6C\x69\x6E\x65\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x75\x74\x66\x38\x6D\x62\x34","\x75\x74\x66\x38\x6D\x62\x34\x5F\x75\x6E\x69\x63\x6F\x64\x65\x5F\x63\x69","\x64\x65\x66\x69\x6E\x65"];_0x4651[0];var _=require(_0x4651[1]);var util=require(_0x4651[2]);var logger=require(_0x4651[4])(_0x4651[3]);var moment=require(_0x4651[5]);var BPromise=require(_0x4651[6]);var rp=require(_0x4651[7]);var attributes=require(_0x4651[8]);module[_0x4651[9]]= function(_0xa61dx8,_0xa61dx9){return _0xa61dx8[_0x4651[14]](_0x4651[10],attributes,{tableName:_0x4651[11],paranoid:false,indexes:[],timestamps:true,charset:_0x4651[12],collate:_0x4651[13]})}
\ No newline at end of file
index 3fcc26f..2238f97 100644 (file)
@@ -1 +1 @@
-var _0x4618=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x4618[0];var _=require(_0x4618[1]);var util=require(_0x4618[2]);var moment=require(_0x4618[3]);var BPromise=require(_0x4618[4]);var rs=require(_0x4618[5]);var fs=require(_0x4618[6]);var db=require(_0x4618[8])[_0x4618[7]];var utils=require(_0x4618[9]);var logger=require(_0x4618[11])(_0x4618[10]);var config=require(_0x4618[12]);var jayson=require(_0x4618[13]);var client=jayson[_0x4618[15]][_0x4618[14]]({port:9002});function respondWithRpcPromise(_0x7e06xe,_0x7e06xf,_0x7e06x10){return  new BPromise(function(_0x7e06x11,_0x7e06x12){return client[_0x4618[28]](_0x7e06xe,_0x7e06x10)[_0x4618[27]](function(_0x7e06x14){logger[_0x4618[20]](_0x4618[16],_0x7e06xf,_0x4618[19]);logger[_0x4618[23]](_0x4618[21],_0x7e06xf,_0x4618[19],JSON[_0x4618[22]](_0x7e06x14));if(_0x7e06x14[_0x4618[17]]){if(_0x7e06x14[_0x4618[17]][_0x4618[24]]=== 500){logger[_0x4618[17]](_0x4618[16],_0x7e06xf,_0x7e06x14[_0x4618[17]][_0x4618[25]]);return _0x7e06x12(_0x7e06x14[_0x4618[17]][_0x4618[25]])};logger[_0x4618[17]](_0x4618[16],_0x7e06xf,_0x7e06x14[_0x4618[17]][_0x4618[25]]);return _0x7e06x11(_0x7e06x14[_0x4618[17]][_0x4618[25]])}else {logger[_0x4618[20]](_0x4618[16],_0x7e06xf,_0x4618[19]);_0x7e06x11(_0x7e06x14[_0x4618[26]][_0x4618[25]])}})[_0x4618[18]](function(_0x7e06x13){logger[_0x4618[17]](_0x4618[16],_0x7e06xf,_0x7e06x13);_0x7e06x12(_0x7e06x13)})})}
\ No newline at end of file
+var _0x2744=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x2744[0];var _=require(_0x2744[1]);var util=require(_0x2744[2]);var moment=require(_0x2744[3]);var BPromise=require(_0x2744[4]);var rs=require(_0x2744[5]);var fs=require(_0x2744[6]);var db=require(_0x2744[8])[_0x2744[7]];var utils=require(_0x2744[9]);var logger=require(_0x2744[11])(_0x2744[10]);var config=require(_0x2744[12]);var jayson=require(_0x2744[13]);var client=jayson[_0x2744[15]][_0x2744[14]]({port:9002});function respondWithRpcPromise(_0x4726xe,_0x4726xf,_0x4726x10){return  new BPromise(function(_0x4726x11,_0x4726x12){return client[_0x2744[28]](_0x4726xe,_0x4726x10)[_0x2744[27]](function(_0x4726x14){logger[_0x2744[20]](_0x2744[16],_0x4726xf,_0x2744[19]);logger[_0x2744[23]](_0x2744[21],_0x4726xf,_0x2744[19],JSON[_0x2744[22]](_0x4726x14));if(_0x4726x14[_0x2744[17]]){if(_0x4726x14[_0x2744[17]][_0x2744[24]]=== 500){logger[_0x2744[17]](_0x2744[16],_0x4726xf,_0x4726x14[_0x2744[17]][_0x2744[25]]);return _0x4726x12(_0x4726x14[_0x2744[17]][_0x2744[25]])};logger[_0x2744[17]](_0x2744[16],_0x4726xf,_0x4726x14[_0x2744[17]][_0x2744[25]]);return _0x4726x11(_0x4726x14[_0x2744[17]][_0x2744[25]])}else {logger[_0x2744[20]](_0x2744[16],_0x4726xf,_0x2744[19]);_0x4726x11(_0x4726x14[_0x2744[26]][_0x2744[25]])}})[_0x2744[18]](function(_0x4726x13){logger[_0x2744[17]](_0x2744[16],_0x4726xf,_0x4726x13);_0x4726x12(_0x4726x13)})})}
\ No newline at end of file
index 0365b24..95983dd 100644 (file)
@@ -1 +1 @@
-var _0xeec2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xeec2[0];var multer=require(_0xeec2[1]);var util=require(_0xeec2[2]);var path=require(_0xeec2[3]);var express=require(_0xeec2[4]);var router=express.Router();var auth=require(_0xeec2[5]);var interaction=require(_0xeec2[6]);var config=require(_0xeec2[7]);var controller=require(_0xeec2[8]);router[_0xeec2[12]](_0xeec2[9],auth[_0xeec2[10]](),controller[_0xeec2[11]]);router[_0xeec2[12]](_0xeec2[13],auth[_0xeec2[10]](),controller[_0xeec2[14]]);router[_0xeec2[12]](_0xeec2[15],auth[_0xeec2[10]](),controller[_0xeec2[16]]);router[_0xeec2[18]](_0xeec2[9],auth[_0xeec2[10]](),controller[_0xeec2[17]]);router[_0xeec2[20]](_0xeec2[15],auth[_0xeec2[10]](),controller[_0xeec2[19]]);router[_0xeec2[22]](_0xeec2[15],auth[_0xeec2[10]](),controller[_0xeec2[21]]);module[_0xeec2[23]]= router
\ No newline at end of file
+var _0x91ab=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x91ab[0];var multer=require(_0x91ab[1]);var util=require(_0x91ab[2]);var path=require(_0x91ab[3]);var express=require(_0x91ab[4]);var router=express.Router();var auth=require(_0x91ab[5]);var interaction=require(_0x91ab[6]);var config=require(_0x91ab[7]);var controller=require(_0x91ab[8]);router[_0x91ab[12]](_0x91ab[9],auth[_0x91ab[10]](),controller[_0x91ab[11]]);router[_0x91ab[12]](_0x91ab[13],auth[_0x91ab[10]](),controller[_0x91ab[14]]);router[_0x91ab[12]](_0x91ab[15],auth[_0x91ab[10]](),controller[_0x91ab[16]]);router[_0x91ab[18]](_0x91ab[9],auth[_0x91ab[10]](),controller[_0x91ab[17]]);router[_0x91ab[20]](_0x91ab[15],auth[_0x91ab[10]](),controller[_0x91ab[19]]);router[_0x91ab[22]](_0x91ab[15],auth[_0x91ab[10]](),controller[_0x91ab[21]]);module[_0x91ab[23]]= router
\ No newline at end of file
index 10c2cd7..e6df0a8 100644 (file)
@@ -1 +1 @@
-var _0xa300=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6D\x6F\x75\x73\x65\x4F\x76\x65\x72","\x74\x69\x6D\x65\x6F\x75\x74","\x49\x4E\x54\x45\x47\x45\x52"];_0xa300[0];var Sequelize=require(_0xa300[1]);module[_0xa300[2]]= {name:{type:Sequelize[_0xa300[3]],allowNull:false},type:{type:Sequelize.ENUM(_0xa300[4],_0xa300[5]),defaultValue:_0xa300[4]},selector:{type:Sequelize[_0xa300[3]]},timeout:{type:Sequelize[_0xa300[6]]}}
\ No newline at end of file
+var _0xa05c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6D\x6F\x75\x73\x65\x4F\x76\x65\x72","\x74\x69\x6D\x65\x6F\x75\x74","\x49\x4E\x54\x45\x47\x45\x52"];_0xa05c[0];var Sequelize=require(_0xa05c[1]);module[_0xa05c[2]]= {name:{type:Sequelize[_0xa05c[3]],allowNull:false},type:{type:Sequelize.ENUM(_0xa05c[4],_0xa05c[5]),defaultValue:_0xa05c[4]},selector:{type:Sequelize[_0xa05c[3]]},timeout:{type:Sequelize[_0xa05c[6]]}}
\ No newline at end of file
index 1e3261f..1bc162f 100644 (file)
@@ -1 +1 @@
-var _0x835f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x835f[0];var jsonpatch=require(_0x835f[1]);var rp=require(_0x835f[2]);var moment=require(_0x835f[3]);var BPromise=require(_0x835f[4]);var Mustache=require(_0x835f[5]);var util=require(_0x835f[6]);var path=require(_0x835f[7]);var sox=require(_0x835f[8]);var csv=require(_0x835f[9]);var ejs=require(_0x835f[10]);var fs=require(_0x835f[11]);var _=require(_0x835f[12]);var squel=require(_0x835f[13]);var crypto=require(_0x835f[14]);var jsforce=require(_0x835f[15]);var deskjs=require(_0x835f[16]);var toCsv=require(_0x835f[9]);var querystring=require(_0x835f[17]);var Papa=require(_0x835f[18]);var qs=require(_0x835f[19]);var logger=require(_0x835f[21])(_0x835f[20]);var utils=require(_0x835f[22]);var config=require(_0x835f[23]);var db=require(_0x835f[25])[_0x835f[24]];function respondWithStatusCode(_0xafa5x1a,_0xafa5x1b){_0xafa5x1b= _0xafa5x1b|| 204;return function(_0xafa5x1c){if(_0xafa5x1c){return _0xafa5x1a[_0x835f[26]](_0xafa5x1b)};return _0xafa5x1a[_0x835f[28]](_0xafa5x1b)[_0x835f[27]]()}}function respondWithResult(_0xafa5x1a,_0xafa5x1b){_0xafa5x1b= _0xafa5x1b|| 200;return function(_0xafa5x1c){if(_0xafa5x1c){return _0xafa5x1a[_0x835f[28]](_0xafa5x1b)[_0x835f[29]](_0xafa5x1c)}}}function respondWithFilteredResult(_0xafa5x1a,_0xafa5x1f){return function(_0xafa5x1c){if(_0xafa5x1c){var _0xafa5x20=_0xafa5x1c[_0x835f[30]],_0xafa5x21=_0xafa5x1f[_0x835f[31]],_0xafa5x22=_0xafa5x1f[_0x835f[31]]+ _0xafa5x1f[_0x835f[32]],_0xafa5x1b;if(_0xafa5x22>= _0xafa5x20){_0xafa5x22= _0xafa5x20;_0xafa5x1b= 200}else {_0xafa5x1b= 206};_0xafa5x1a[_0x835f[28]](_0xafa5x1b);return _0xafa5x1a[_0x835f[36]](_0x835f[33],_0xafa5x21+ _0x835f[34]+ _0xafa5x22+ _0x835f[35]+ _0xafa5x20)[_0x835f[29]](_0xafa5x1c)};return null}}function patchUpdates(_0xafa5x24){return function(_0xafa5x1c){try{jsonpatch[_0x835f[37]](_0xafa5x1c,_0xafa5x24,true)}catch(err){return BPromise[_0x835f[38]](err)};return _0xafa5x1c[_0x835f[39]]()}}function saveUpdates(_0xafa5x26,_0xafa5x1b){return function(_0xafa5x1c){if(_0xafa5x1c){return _0xafa5x1c[_0x835f[41]](_0xafa5x26)[_0x835f[40]](function(_0xafa5x27){return _0xafa5x27})};return null}}function removeEntity(_0xafa5x1a,_0xafa5x1b){return function(_0xafa5x1c){if(_0xafa5x1c){return _0xafa5x1c[_0x835f[42]]()[_0x835f[40]](function(){_0xafa5x1a[_0x835f[28]](204)[_0x835f[27]]()})}}}function handleEntityNotFound(_0xafa5x1a,_0xafa5x1b){return function(_0xafa5x1c){if(!_0xafa5x1c){_0xafa5x1a[_0x835f[26]](404)};return _0xafa5x1c}}function handleError(_0xafa5x1a,_0xafa5x1b){_0xafa5x1b= _0xafa5x1b|| 500;return function(_0xafa5x2b){logger[_0x835f[44]](_0xafa5x2b[_0x835f[43]]);if(_0xafa5x2b[_0x835f[45]]){delete _0xafa5x2b[_0x835f[45]]};_0xafa5x1a[_0x835f[28]](_0xafa5x1b)[_0x835f[46]](_0xafa5x2b)}}exports[_0x835f[47]]= function(_0xafa5x2c,_0xafa5x1a){var _0xafa5x1f={raw:true,where:{id:_0xafa5x2c[_0x835f[49]][_0x835f[48]]}},_0xafa5x2d={};_0xafa5x2d[_0x835f[50]]= _[_0x835f[53]](db[_0x835f[52]][_0x835f[51]]);_0xafa5x2d[_0x835f[54]]= _[_0x835f[53]](_0xafa5x2c[_0x835f[54]]);_0xafa5x2d[_0x835f[55]]= _[_0x835f[56]](_0xafa5x2d[_0x835f[50]],_0xafa5x2d[_0x835f[54]]);_0xafa5x1f[_0x835f[57]]= _[_0x835f[56]](_0xafa5x2d[_0x835f[50]],qs[_0x835f[58]](_0xafa5x2c[_0x835f[54]][_0x835f[58]]));_0xafa5x1f[_0x835f[57]]= (_0xafa5x1f[_0x835f[57]][_0x835f[59]])?_0xafa5x1f[_0x835f[57]]:_0xafa5x2d[_0x835f[50]];if(_0xafa5x2c[_0x835f[54]][_0x835f[60]]){_0xafa5x1f[_0x835f[61]]= [{all:true}]};_0xafa5x1f= _[_0x835f[63]]({},_0xafa5x1f,_0xafa5x2c[_0x835f[62]]);return db[_0x835f[52]][_0x835f[65]](_0xafa5x1f)[_0x835f[40]](handleEntityNotFound(_0xafa5x1a,null))[_0x835f[40]](respondWithResult(_0xafa5x1a,null))[_0x835f[64]](handleError(_0xafa5x1a,null))};exports[_0x835f[66]]= function(_0xafa5x2c,_0xafa5x1a){return db[_0x835f[52]][_0x835f[66]](_0xafa5x2c[_0x835f[67]],{})[_0x835f[40]](respondWithResult(_0xafa5x1a,201))[_0x835f[64]](handleError(_0xafa5x1a,null))};exports[_0x835f[41]]= function(_0xafa5x2c,_0xafa5x1a){if(_0xafa5x2c[_0x835f[67]][_0x835f[48]]){delete _0xafa5x2c[_0x835f[67]][_0x835f[48]]};return db[_0x835f[52]][_0x835f[65]]({where:{id:_0xafa5x2c[_0x835f[49]][_0x835f[48]]}})[_0x835f[40]](handleEntityNotFound(_0xafa5x1a,null))[_0x835f[40]](saveUpdates(_0xafa5x2c[_0x835f[67]],null))[_0x835f[40]](respondWithResult(_0xafa5x1a,null))[_0x835f[64]](handleError(_0xafa5x1a,null))};exports[_0x835f[42]]= function(_0xafa5x2c,_0xafa5x1a){return db[_0x835f[52]][_0x835f[65]]({where:{id:_0xafa5x2c[_0x835f[49]][_0x835f[48]]}})[_0x835f[40]](handleEntityNotFound(_0xafa5x1a,null))[_0x835f[40]](removeEntity(_0xafa5x1a,null))[_0x835f[64]](handleError(_0xafa5x1a,null))}
\ No newline at end of file
+var _0xd74b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xd74b[0];var jsonpatch=require(_0xd74b[1]);var rp=require(_0xd74b[2]);var moment=require(_0xd74b[3]);var BPromise=require(_0xd74b[4]);var Mustache=require(_0xd74b[5]);var util=require(_0xd74b[6]);var path=require(_0xd74b[7]);var sox=require(_0xd74b[8]);var csv=require(_0xd74b[9]);var ejs=require(_0xd74b[10]);var fs=require(_0xd74b[11]);var _=require(_0xd74b[12]);var squel=require(_0xd74b[13]);var crypto=require(_0xd74b[14]);var jsforce=require(_0xd74b[15]);var deskjs=require(_0xd74b[16]);var toCsv=require(_0xd74b[9]);var querystring=require(_0xd74b[17]);var Papa=require(_0xd74b[18]);var qs=require(_0xd74b[19]);var logger=require(_0xd74b[21])(_0xd74b[20]);var utils=require(_0xd74b[22]);var config=require(_0xd74b[23]);var db=require(_0xd74b[25])[_0xd74b[24]];function respondWithStatusCode(_0x60d5x1a,_0x60d5x1b){_0x60d5x1b= _0x60d5x1b|| 204;return function(_0x60d5x1c){if(_0x60d5x1c){return _0x60d5x1a[_0xd74b[26]](_0x60d5x1b)};return _0x60d5x1a[_0xd74b[28]](_0x60d5x1b)[_0xd74b[27]]()}}function respondWithResult(_0x60d5x1a,_0x60d5x1b){_0x60d5x1b= _0x60d5x1b|| 200;return function(_0x60d5x1c){if(_0x60d5x1c){return _0x60d5x1a[_0xd74b[28]](_0x60d5x1b)[_0xd74b[29]](_0x60d5x1c)}}}function respondWithFilteredResult(_0x60d5x1a,_0x60d5x1f){return function(_0x60d5x1c){if(_0x60d5x1c){var _0x60d5x20=_0x60d5x1c[_0xd74b[30]],_0x60d5x21=_0x60d5x1f[_0xd74b[31]],_0x60d5x22=_0x60d5x1f[_0xd74b[31]]+ _0x60d5x1f[_0xd74b[32]],_0x60d5x1b;if(_0x60d5x22>= _0x60d5x20){_0x60d5x22= _0x60d5x20;_0x60d5x1b= 200}else {_0x60d5x1b= 206};_0x60d5x1a[_0xd74b[28]](_0x60d5x1b);return _0x60d5x1a[_0xd74b[36]](_0xd74b[33],_0x60d5x21+ _0xd74b[34]+ _0x60d5x22+ _0xd74b[35]+ _0x60d5x20)[_0xd74b[29]](_0x60d5x1c)};return null}}function patchUpdates(_0x60d5x24){return function(_0x60d5x1c){try{jsonpatch[_0xd74b[37]](_0x60d5x1c,_0x60d5x24,true)}catch(err){return BPromise[_0xd74b[38]](err)};return _0x60d5x1c[_0xd74b[39]]()}}function saveUpdates(_0x60d5x26,_0x60d5x1b){return function(_0x60d5x1c){if(_0x60d5x1c){return _0x60d5x1c[_0xd74b[41]](_0x60d5x26)[_0xd74b[40]](function(_0x60d5x27){return _0x60d5x27})};return null}}function removeEntity(_0x60d5x1a,_0x60d5x1b){return function(_0x60d5x1c){if(_0x60d5x1c){return _0x60d5x1c[_0xd74b[42]]()[_0xd74b[40]](function(){_0x60d5x1a[_0xd74b[28]](204)[_0xd74b[27]]()})}}}function handleEntityNotFound(_0x60d5x1a,_0x60d5x1b){return function(_0x60d5x1c){if(!_0x60d5x1c){_0x60d5x1a[_0xd74b[26]](404)};return _0x60d5x1c}}function handleError(_0x60d5x1a,_0x60d5x1b){_0x60d5x1b= _0x60d5x1b|| 500;return function(_0x60d5x2b){logger[_0xd74b[44]](_0x60d5x2b[_0xd74b[43]]);if(_0x60d5x2b[_0xd74b[45]]){delete _0x60d5x2b[_0xd74b[45]]};_0x60d5x1a[_0xd74b[28]](_0x60d5x1b)[_0xd74b[46]](_0x60d5x2b)}}exports[_0xd74b[47]]= function(_0x60d5x2c,_0x60d5x1a){var _0x60d5x1f={raw:true,where:{id:_0x60d5x2c[_0xd74b[49]][_0xd74b[48]]}},_0x60d5x2d={};_0x60d5x2d[_0xd74b[50]]= _[_0xd74b[53]](db[_0xd74b[52]][_0xd74b[51]]);_0x60d5x2d[_0xd74b[54]]= _[_0xd74b[53]](_0x60d5x2c[_0xd74b[54]]);_0x60d5x2d[_0xd74b[55]]= _[_0xd74b[56]](_0x60d5x2d[_0xd74b[50]],_0x60d5x2d[_0xd74b[54]]);_0x60d5x1f[_0xd74b[57]]= _[_0xd74b[56]](_0x60d5x2d[_0xd74b[50]],qs[_0xd74b[58]](_0x60d5x2c[_0xd74b[54]][_0xd74b[58]]));_0x60d5x1f[_0xd74b[57]]= (_0x60d5x1f[_0xd74b[57]][_0xd74b[59]])?_0x60d5x1f[_0xd74b[57]]:_0x60d5x2d[_0xd74b[50]];if(_0x60d5x2c[_0xd74b[54]][_0xd74b[60]]){_0x60d5x1f[_0xd74b[61]]= [{all:true}]};_0x60d5x1f= _[_0xd74b[63]]({},_0x60d5x1f,_0x60d5x2c[_0xd74b[62]]);return db[_0xd74b[52]][_0xd74b[65]](_0x60d5x1f)[_0xd74b[40]](handleEntityNotFound(_0x60d5x1a,null))[_0xd74b[40]](respondWithResult(_0x60d5x1a,null))[_0xd74b[64]](handleError(_0x60d5x1a,null))};exports[_0xd74b[66]]= function(_0x60d5x2c,_0x60d5x1a){return db[_0xd74b[52]][_0xd74b[66]](_0x60d5x2c[_0xd74b[67]],{})[_0xd74b[40]](respondWithResult(_0x60d5x1a,201))[_0xd74b[64]](handleError(_0x60d5x1a,null))};exports[_0xd74b[41]]= function(_0x60d5x2c,_0x60d5x1a){if(_0x60d5x2c[_0xd74b[67]][_0xd74b[48]]){delete _0x60d5x2c[_0xd74b[67]][_0xd74b[48]]};return db[_0xd74b[52]][_0xd74b[65]]({where:{id:_0x60d5x2c[_0xd74b[49]][_0xd74b[48]]}})[_0xd74b[40]](handleEntityNotFound(_0x60d5x1a,null))[_0xd74b[40]](saveUpdates(_0x60d5x2c[_0xd74b[67]],null))[_0xd74b[40]](respondWithResult(_0x60d5x1a,null))[_0xd74b[64]](handleError(_0x60d5x1a,null))};exports[_0xd74b[42]]= function(_0x60d5x2c,_0x60d5x1a){return db[_0xd74b[52]][_0xd74b[65]]({where:{id:_0x60d5x2c[_0xd74b[49]][_0xd74b[48]]}})[_0xd74b[40]](handleEntityNotFound(_0x60d5x1a,null))[_0xd74b[40]](removeEntity(_0x60d5x1a,null))[_0xd74b[64]](handleError(_0x60d5x1a,null))}
\ No newline at end of file
index 7aa53bd..f97c0a9 100644 (file)
@@ -1 +1 @@
-var _0xfdda=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xfdda[0];var _=require(_0xfdda[1]);var util=require(_0xfdda[2]);var logger=require(_0xfdda[4])(_0xfdda[3]);var moment=require(_0xfdda[5]);var BPromise=require(_0xfdda[6]);var rp=require(_0xfdda[7]);var attributes=require(_0xfdda[8]);module[_0xfdda[9]]= function(_0x4c26x8,_0x4c26x9){return _0x4c26x8[_0xfdda[12]](_0xfdda[10],attributes,{tableName:_0xfdda[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xaa60=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xaa60[0];var _=require(_0xaa60[1]);var util=require(_0xaa60[2]);var logger=require(_0xaa60[4])(_0xaa60[3]);var moment=require(_0xaa60[5]);var BPromise=require(_0xaa60[6]);var rp=require(_0xaa60[7]);var attributes=require(_0xaa60[8]);module[_0xaa60[9]]= function(_0xc693x8,_0xc693x9){return _0xc693x8[_0xaa60[12]](_0xaa60[10],attributes,{tableName:_0xaa60[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 301f61b..70a61a8 100644 (file)
@@ -1 +1 @@
-var _0x358a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x358a[0];var _=require(_0x358a[1]);var util=require(_0x358a[2]);var moment=require(_0x358a[3]);var BPromise=require(_0x358a[4]);var rs=require(_0x358a[5]);var fs=require(_0x358a[6]);var db=require(_0x358a[8])[_0x358a[7]];var utils=require(_0x358a[9]);var logger=require(_0x358a[11])(_0x358a[10]);var config=require(_0x358a[12]);var jayson=require(_0x358a[13]);var client=jayson[_0x358a[15]][_0x358a[14]]({port:9002});function respondWithRpcPromise(_0xa4c6xe,_0xa4c6xf,_0xa4c6x10){return  new BPromise(function(_0xa4c6x11,_0xa4c6x12){return client[_0x358a[28]](_0xa4c6xe,_0xa4c6x10)[_0x358a[27]](function(_0xa4c6x14){logger[_0x358a[20]](_0x358a[16],_0xa4c6xf,_0x358a[19]);logger[_0x358a[23]](_0x358a[21],_0xa4c6xf,_0x358a[19],JSON[_0x358a[22]](_0xa4c6x14));if(_0xa4c6x14[_0x358a[17]]){if(_0xa4c6x14[_0x358a[17]][_0x358a[24]]=== 500){logger[_0x358a[17]](_0x358a[16],_0xa4c6xf,_0xa4c6x14[_0x358a[17]][_0x358a[25]]);return _0xa4c6x12(_0xa4c6x14[_0x358a[17]][_0x358a[25]])};logger[_0x358a[17]](_0x358a[16],_0xa4c6xf,_0xa4c6x14[_0x358a[17]][_0x358a[25]]);return _0xa4c6x11(_0xa4c6x14[_0x358a[17]][_0x358a[25]])}else {logger[_0x358a[20]](_0x358a[16],_0xa4c6xf,_0x358a[19]);_0xa4c6x11(_0xa4c6x14[_0x358a[26]][_0x358a[25]])}})[_0x358a[18]](function(_0xa4c6x13){logger[_0x358a[17]](_0x358a[16],_0xa4c6xf,_0xa4c6x13);_0xa4c6x12(_0xa4c6x13)})})}
\ No newline at end of file
+var _0xb1df=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xb1df[0];var _=require(_0xb1df[1]);var util=require(_0xb1df[2]);var moment=require(_0xb1df[3]);var BPromise=require(_0xb1df[4]);var rs=require(_0xb1df[5]);var fs=require(_0xb1df[6]);var db=require(_0xb1df[8])[_0xb1df[7]];var utils=require(_0xb1df[9]);var logger=require(_0xb1df[11])(_0xb1df[10]);var config=require(_0xb1df[12]);var jayson=require(_0xb1df[13]);var client=jayson[_0xb1df[15]][_0xb1df[14]]({port:9002});function respondWithRpcPromise(_0x2c95xe,_0x2c95xf,_0x2c95x10){return  new BPromise(function(_0x2c95x11,_0x2c95x12){return client[_0xb1df[28]](_0x2c95xe,_0x2c95x10)[_0xb1df[27]](function(_0x2c95x14){logger[_0xb1df[20]](_0xb1df[16],_0x2c95xf,_0xb1df[19]);logger[_0xb1df[23]](_0xb1df[21],_0x2c95xf,_0xb1df[19],JSON[_0xb1df[22]](_0x2c95x14));if(_0x2c95x14[_0xb1df[17]]){if(_0x2c95x14[_0xb1df[17]][_0xb1df[24]]=== 500){logger[_0xb1df[17]](_0xb1df[16],_0x2c95xf,_0x2c95x14[_0xb1df[17]][_0xb1df[25]]);return _0x2c95x12(_0x2c95x14[_0xb1df[17]][_0xb1df[25]])};logger[_0xb1df[17]](_0xb1df[16],_0x2c95xf,_0x2c95x14[_0xb1df[17]][_0xb1df[25]]);return _0x2c95x11(_0x2c95x14[_0xb1df[17]][_0xb1df[25]])}else {logger[_0xb1df[20]](_0xb1df[16],_0x2c95xf,_0xb1df[19]);_0x2c95x11(_0x2c95x14[_0xb1df[26]][_0xb1df[25]])}})[_0xb1df[18]](function(_0x2c95x13){logger[_0xb1df[17]](_0xb1df[16],_0x2c95xf,_0x2c95x13);_0x2c95x12(_0x2c95x13)})})}
\ No newline at end of file
index b8d98e8..a6e116b 100644 (file)
@@ -1 +1 @@
-var _0x85fd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x73\x68\x6F\x77","\x67\x65\x74","\x2F","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x85fd[0];var multer=require(_0x85fd[1]);var util=require(_0x85fd[2]);var path=require(_0x85fd[3]);var express=require(_0x85fd[4]);var router=express.Router();var auth=require(_0x85fd[5]);var interaction=require(_0x85fd[6]);var config=require(_0x85fd[7]);var controller=require(_0x85fd[8]);router[_0x85fd[12]](_0x85fd[9],auth[_0x85fd[10]](),controller[_0x85fd[11]]);router[_0x85fd[15]](_0x85fd[13],auth[_0x85fd[10]](),controller[_0x85fd[14]]);router[_0x85fd[17]](_0x85fd[9],auth[_0x85fd[10]](),controller[_0x85fd[16]]);router[_0x85fd[19]](_0x85fd[9],auth[_0x85fd[10]](),controller[_0x85fd[18]]);module[_0x85fd[20]]= router
\ No newline at end of file
+var _0x1a4e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x73\x68\x6F\x77","\x67\x65\x74","\x2F","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x1a4e[0];var multer=require(_0x1a4e[1]);var util=require(_0x1a4e[2]);var path=require(_0x1a4e[3]);var express=require(_0x1a4e[4]);var router=express.Router();var auth=require(_0x1a4e[5]);var interaction=require(_0x1a4e[6]);var config=require(_0x1a4e[7]);var controller=require(_0x1a4e[8]);router[_0x1a4e[12]](_0x1a4e[9],auth[_0x1a4e[10]](),controller[_0x1a4e[11]]);router[_0x1a4e[15]](_0x1a4e[13],auth[_0x1a4e[10]](),controller[_0x1a4e[14]]);router[_0x1a4e[17]](_0x1a4e[9],auth[_0x1a4e[10]](),controller[_0x1a4e[16]]);router[_0x1a4e[19]](_0x1a4e[9],auth[_0x1a4e[10]](),controller[_0x1a4e[18]]);module[_0x1a4e[20]]= router
\ No newline at end of file
index c60cd31..adace69 100644 (file)
@@ -1 +1 @@
-var _0xc946=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x49\x4E\x54\x45\x47\x45\x52","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E"];_0xc946[0];var Sequelize=require(_0xc946[1]);module[_0xc946[2]]= {name:{type:Sequelize[_0xc946[3]],unique:_0xc946[4],allowNull:false,validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i}},description:{type:Sequelize[_0xc946[3]]},timeout:{type:Sequelize[_0xc946[5]],validate:{min:1,max:2147483}},strategy:{type:Sequelize.ENUM(_0xc946[6],_0xc946[7],_0xc946[8])}}
\ No newline at end of file
+var _0xa72d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x49\x4E\x54\x45\x47\x45\x52","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E"];_0xa72d[0];var Sequelize=require(_0xa72d[1]);module[_0xa72d[2]]= {name:{type:Sequelize[_0xa72d[3]],unique:_0xa72d[4],allowNull:false,validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i}},description:{type:Sequelize[_0xa72d[3]]},timeout:{type:Sequelize[_0xa72d[5]],validate:{min:1,max:2147483}},strategy:{type:Sequelize.ENUM(_0xa72d[6],_0xa72d[7],_0xa72d[8])}}
\ No newline at end of file
index 6ddb5a4..004cfee 100644 (file)
@@ -1 +1 @@
-var _0xa340=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x66\x6F\x72\x6D\x61\x74","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x55\x73\x65\x72\x49\x64","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x55\x73\x65\x72","\x67\x65\x74","\x55\x73\x65\x72\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x54\x65\x61\x6D\x73","\x54\x65\x61\x6D","\x61\x64\x64\x54\x65\x61\x6D\x73","\x69\x64\x73","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x41\x67\x65\x6E\x74\x73","\x75\x6E\x69\x6F\x6E","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x75\x73\x65\x72\x43\x68\x61\x74\x51\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x6F\x6D\x69\x74","\x69\x73\x41\x72\x72\x61\x79","\x75\x73\x65\x72\x43\x68\x61\x74\x51\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x67\x65\x74\x41\x67\x65\x6E\x74\x73"];_0xa340[0];var jsonpatch=require(_0xa340[1]);var rp=require(_0xa340[2]);var moment=require(_0xa340[3]);var BPromise=require(_0xa340[4]);var Mustache=require(_0xa340[5]);var util=require(_0xa340[6]);var path=require(_0xa340[7]);var sox=require(_0xa340[8]);var csv=require(_0xa340[9]);var ejs=require(_0xa340[10]);var fs=require(_0xa340[11]);var _=require(_0xa340[12]);var squel=require(_0xa340[13]);var crypto=require(_0xa340[14]);var jsforce=require(_0xa340[15]);var deskjs=require(_0xa340[16]);var toCsv=require(_0xa340[9]);var querystring=require(_0xa340[17]);var Papa=require(_0xa340[18]);var qs=require(_0xa340[19]);var logger=require(_0xa340[21])(_0xa340[20]);var utils=require(_0xa340[22]);var config=require(_0xa340[23]);var db=require(_0xa340[25])[_0xa340[24]];var socket=require(_0xa340[27])({host:_0xa340[26],port:6379});require(_0xa340[29])[_0xa340[28]](socket);var jayson=require(_0xa340[30]);var client=jayson[_0xa340[32]][_0xa340[31]]({port:9002});function respondWithRpcPromise(_0x4040x1d,_0x4040x1e,_0x4040x1f,_0x4040x20){return  new BPromise(function(_0x4040x21,_0x4040x22){var _0x4040x23=(_0x4040x20|| client);return _0x4040x23[_0xa340[45]](_0x4040x1d,_0x4040x1f)[_0xa340[44]](function(_0x4040x25){logger[_0xa340[37]](_0xa340[33],_0x4040x1e,_0xa340[36]);logger[_0xa340[40]](_0xa340[38],_0x4040x1e,_0xa340[36],JSON[_0xa340[39]](_0x4040x25));if(_0x4040x25[_0xa340[34]]){if(_0x4040x25[_0xa340[34]][_0xa340[41]]=== 500){logger[_0xa340[34]](_0xa340[33],_0x4040x1e,_0x4040x25[_0xa340[34]][_0xa340[42]]);return _0x4040x22(_0x4040x25[_0xa340[34]][_0xa340[42]])};logger[_0xa340[34]](_0xa340[33],_0x4040x1e,_0x4040x25[_0xa340[34]][_0xa340[42]]);return _0x4040x21(_0x4040x25[_0xa340[34]][_0xa340[42]])}else {logger[_0xa340[37]](_0xa340[33],_0x4040x1e,_0xa340[36]);_0x4040x21(_0x4040x25[_0xa340[43]][_0xa340[42]])}})[_0xa340[35]](function(_0x4040x24){logger[_0xa340[34]](_0xa340[33],_0x4040x1e,_0x4040x24);_0x4040x22(_0x4040x24)})})}function respondWithStatusCode(_0x4040x25,_0x4040x27){_0x4040x27= _0x4040x27|| 204;return function(_0x4040x28){if(_0x4040x28){return _0x4040x25[_0xa340[46]](_0x4040x27)};return _0x4040x25[_0xa340[48]](_0x4040x27)[_0xa340[47]]()}}function respondWithResult(_0x4040x25,_0x4040x27){_0x4040x27= _0x4040x27|| 200;return function(_0x4040x28){if(_0x4040x28){return _0x4040x25[_0xa340[48]](_0x4040x27)[_0xa340[49]](_0x4040x28)}}}function respondWithFilteredResult(_0x4040x25,_0x4040x2b){return function(_0x4040x28){if(_0x4040x28){var _0x4040x2c=_0x4040x28[_0xa340[50]],_0x4040x2d=_0x4040x2b[_0xa340[51]],_0x4040x2e=_0x4040x2b[_0xa340[51]]+ _0x4040x2b[_0xa340[52]],_0x4040x27;if(_0x4040x2e>= _0x4040x2c){_0x4040x2e= _0x4040x2c;_0x4040x27= 200}else {_0x4040x27= 206};_0x4040x25[_0xa340[48]](_0x4040x27);return _0x4040x25[_0xa340[56]](_0xa340[53],_0x4040x2d+ _0xa340[54]+ _0x4040x2e+ _0xa340[55]+ _0x4040x2c)[_0xa340[49]](_0x4040x28)};return null}}function patchUpdates(_0x4040x30){return function(_0x4040x28){try{jsonpatch[_0xa340[57]](_0x4040x28,_0x4040x30,true)}catch(err){return BPromise[_0xa340[58]](err)};return _0x4040x28[_0xa340[59]]()}}function saveUpdates(_0x4040x32,_0x4040x27){return function(_0x4040x28){if(_0x4040x28){return _0x4040x28[_0xa340[60]](_0x4040x32)[_0xa340[44]](function(_0x4040x33){return _0x4040x33})};return null}}function removeEntity(_0x4040x25,_0x4040x27){return function(_0x4040x28){if(_0x4040x28){return _0x4040x28[_0xa340[61]]()[_0xa340[44]](function(){_0x4040x25[_0xa340[48]](204)[_0xa340[47]]()})}}}function handleEntityNotFound(_0x4040x25,_0x4040x27){return function(_0x4040x28){if(!_0x4040x28){_0x4040x25[_0xa340[46]](404)};return _0x4040x28}}function handleError(_0x4040x25,_0x4040x27){_0x4040x27= _0x4040x27|| 500;return function(_0x4040x24){logger[_0xa340[34]](_0x4040x24[_0xa340[62]]);if(_0x4040x24[_0xa340[63]]){delete _0x4040x24[_0xa340[63]]};_0x4040x25[_0xa340[48]](_0x4040x27)[_0xa340[64]](_0x4040x24)}}exports[_0xa340[65]]= function(_0x4040x1f,_0x4040x25){var _0x4040x2b={},_0x4040x37={},_0x4040x38={count:0,rows:[]};_0x4040x37[_0xa340[66]]= _[_0xa340[69]](db[_0xa340[68]][_0xa340[67]]);var _0x4040x39={dateStart:_0x4040x1f[_0xa340[71]][_0xa340[70]],dateEnd:_0x4040x1f[_0xa340[71]][_0xa340[72]]};delete _0x4040x1f[_0xa340[71]][_0xa340[70]];delete _0x4040x1f[_0xa340[71]][_0xa340[72]];_0x4040x37[_0xa340[71]]= _[_0xa340[69]](_0x4040x1f[_0xa340[71]]);_0x4040x37[_0xa340[73]]= _[_0xa340[74]](_0x4040x37[_0xa340[66]],_0x4040x37[_0xa340[71]]);_0x4040x2b[_0xa340[75]]= _[_0xa340[74]](_0x4040x37[_0xa340[66]],qs[_0xa340[76]](_0x4040x1f[_0xa340[71]][_0xa340[76]]));_0x4040x2b[_0xa340[75]]= (_0x4040x2b[_0xa340[75]][_0xa340[77]])?_0x4040x2b[_0xa340[75]]:_0x4040x37[_0xa340[66]];if(!_0x4040x1f[_0xa340[71]][_0xa340[79]](_0xa340[78])){_0x4040x2b[_0xa340[52]]= qs[_0xa340[52]](_0x4040x1f[_0xa340[71]][_0xa340[52]]);_0x4040x2b[_0xa340[51]]= qs[_0xa340[51]](_0x4040x1f[_0xa340[71]][_0xa340[51]])};_0x4040x2b[_0xa340[80]]= qs[_0xa340[81]](_0x4040x1f[_0xa340[71]][_0xa340[81]]);_0x4040x2b[_0xa340[82]]= qs[_0xa340[73]](_[_0xa340[83]](_0x4040x1f[_0xa340[71]],_0x4040x37[_0xa340[73]]));if(_0x4040x39[_0xa340[70]]){if(_0x4040x39[_0xa340[72]]){_0x4040x39[_0xa340[72]]= moment(_0x4040x39[_0xa340[72]])[_0xa340[85]](1,_0xa340[84])}else {_0x4040x39[_0xa340[72]]= moment(_0x4040x39[_0xa340[70]])[_0xa340[85]](1,_0xa340[84])};_[_0xa340[86]](_0x4040x2b[_0xa340[82]],{createdAt:{$gte:_0x4040x39[_0xa340[70]],$lte:_0x4040x39[_0xa340[72]]}})};if(_0x4040x1f[_0xa340[71]][_0xa340[87]]){_0x4040x2b[_0xa340[82]]= _[_0xa340[86]](_0x4040x2b[_0xa340[82]],{$or:_[_0xa340[89]](_0x4040x2b[_0xa340[75]],function(_0x4040x3a){var _0x4040x38={};_0x4040x38[_0x4040x3a]= {$like:_0xa340[88]+ _0x4040x1f[_0xa340[71]][_0xa340[87]]+ _0xa340[88]};return _0x4040x38})})};_0x4040x2b= _[_0xa340[86]]({},_0x4040x2b,_0x4040x1f[_0xa340[90]]);var _0x4040x3b={where:_0x4040x2b[_0xa340[82]]};return db[_0xa340[68]][_0xa340[50]](_0x4040x3b)[_0xa340[44]](function(_0x4040x2c){_0x4040x38[_0xa340[50]]= _0x4040x2c;if(_0x4040x1f[_0xa340[71]][_0xa340[92]]){_0x4040x2b[_0xa340[93]]= [{all:true}]};return db[_0xa340[68]][_0xa340[94]](_0x4040x2b)})[_0xa340[44]](function(_0x4040x3c){_0x4040x38[_0xa340[91]]= _0x4040x3c;return _0x4040x38})[_0xa340[44]](respondWithFilteredResult(_0x4040x25,_0x4040x2b))[_0xa340[35]](handleError(_0x4040x25,null))};exports[_0xa340[95]]= function(_0x4040x1f,_0x4040x25){var _0x4040x2b={raw:true,where:{id:_0x4040x1f[_0xa340[97]][_0xa340[96]]}},_0x4040x37={};_0x4040x37[_0xa340[66]]= _[_0xa340[69]](db[_0xa340[68]][_0xa340[67]]);_0x4040x37[_0xa340[71]]= _[_0xa340[69]](_0x4040x1f[_0xa340[71]]);_0x4040x37[_0xa340[73]]= _[_0xa340[74]](_0x4040x37[_0xa340[66]],_0x4040x37[_0xa340[71]]);_0x4040x2b[_0xa340[75]]= _[_0xa340[74]](_0x4040x37[_0xa340[66]],qs[_0xa340[76]](_0x4040x1f[_0xa340[71]][_0xa340[76]]));_0x4040x2b[_0xa340[75]]= (_0x4040x2b[_0xa340[75]][_0xa340[77]])?_0x4040x2b[_0xa340[75]]:_0x4040x37[_0xa340[66]];if(_0x4040x1f[_0xa340[71]][_0xa340[92]]){_0x4040x2b[_0xa340[93]]= [{all:true}]};_0x4040x2b= _[_0xa340[86]]({},_0x4040x2b,_0x4040x1f[_0xa340[90]]);return db[_0xa340[68]][_0xa340[98]](_0x4040x2b)[_0xa340[44]](handleEntityNotFound(_0x4040x25,null))[_0xa340[44]](respondWithResult(_0x4040x25,null))[_0xa340[35]](handleError(_0x4040x25,null))};exports[_0xa340[99]]= function(_0x4040x1f,_0x4040x25){return db[_0xa340[68]][_0xa340[99]](_0x4040x1f[_0xa340[100]],{})[_0xa340[44]](respondWithResult(_0x4040x25,201))[_0xa340[35]](handleError(_0x4040x25,null))};exports[_0xa340[60]]= function(_0x4040x1f,_0x4040x25){if(_0x4040x1f[_0xa340[100]][_0xa340[96]]){delete _0x4040x1f[_0xa340[100]][_0xa340[96]]};return db[_0xa340[68]][_0xa340[98]]({where:{id:_0x4040x1f[_0xa340[97]][_0xa340[96]]}})[_0xa340[44]](handleEntityNotFound(_0x4040x25,null))[_0xa340[44]](saveUpdates(_0x4040x1f[_0xa340[100]],null))[_0xa340[44]](respondWithResult(_0x4040x25,null))[_0xa340[35]](handleError(_0x4040x25,null))};exports[_0xa340[61]]= function(_0x4040x1f,_0x4040x25){return db[_0xa340[68]][_0xa340[98]]({where:{id:_0x4040x1f[_0xa340[97]][_0xa340[96]]}})[_0xa340[44]](handleEntityNotFound(_0x4040x25,null))[_0xa340[44]](removeEntity(_0x4040x25,null))[_0xa340[35]](handleError(_0x4040x25,null))};exports[_0xa340[101]]= function(_0x4040x1f,_0x4040x25){return db[_0xa340[68]][_0xa340[101]]()[_0xa340[44]](respondWithResult(_0x4040x25,null))[_0xa340[35]](handleError(_0x4040x25,null))};exports[_0xa340[102]]= function(_0x4040x1f,_0x4040x25,_0x4040x3d){var _0x4040x2b={raw:true,where:{}},_0x4040x37={},_0x4040x3e;return db[_0xa340[68]][_0xa340[116]]({where:{id:_0x4040x1f[_0xa340[97]][_0xa340[96]]}})[_0xa340[44]](handleEntityNotFound(_0x4040x25,null))[_0xa340[44]](function(_0x4040x28){if(_0x4040x28){_0x4040x3e= _0x4040x28[_0xa340[113]]({plain:true});_0x4040x37[_0xa340[66]]= _[_0xa340[69]](db[_0xa340[114]][_0xa340[67]]);_0x4040x37[_0xa340[71]]= _[_0xa340[69]](_0x4040x1f[_0xa340[71]]);_0x4040x37[_0xa340[73]]= _[_0xa340[74]](_0x4040x37[_0xa340[66]],_0x4040x37[_0xa340[71]]);_0x4040x2b[_0xa340[75]]= _[_0xa340[74]](_0x4040x37[_0xa340[66]],qs[_0xa340[76]](_0x4040x1f[_0xa340[71]][_0xa340[76]]));_0x4040x2b[_0xa340[75]]= (_0x4040x2b[_0xa340[75]][_0xa340[77]])?_0x4040x2b[_0xa340[75]]:_0x4040x37[_0xa340[66]];if(!_0x4040x1f[_0xa340[71]][_0xa340[79]](_0xa340[78])){_0x4040x2b[_0xa340[52]]= qs[_0xa340[52]](_0x4040x1f[_0xa340[71]][_0xa340[52]]);_0x4040x2b[_0xa340[51]]= qs[_0xa340[51]](_0x4040x1f[_0xa340[71]][_0xa340[51]])};_0x4040x2b[_0xa340[80]]= qs[_0xa340[81]](_0x4040x1f[_0xa340[71]][_0xa340[81]]);_0x4040x2b[_0xa340[82]]= qs[_0xa340[73]](_[_0xa340[83]](_0x4040x1f[_0xa340[71]],_0x4040x37[_0xa340[73]]));_0x4040x2b[_0xa340[82]][_0xa340[115]]= _0x4040x28[_0xa340[96]];if(_0x4040x1f[_0xa340[71]][_0xa340[87]]){_0x4040x2b[_0xa340[82]]= _[_0xa340[86]](_0x4040x2b[_0xa340[82]],{$or:_[_0xa340[89]](_0x4040x2b[_0xa340[75]],function(_0x4040x3a){var _0x4040x38={};_0x4040x38[_0x4040x3a]= {$like:_0xa340[88]+ _0x4040x1f[_0xa340[71]][_0xa340[87]]+ _0xa340[88]};return _0x4040x38})})};_0x4040x2b= _[_0xa340[86]]({},_0x4040x2b,_0x4040x1f[_0xa340[90]]);return db[_0xa340[114]][_0xa340[94]](_0x4040x2b)}})[_0xa340[44]](function(_0x4040x25){if(_0x4040x25){return db[_0xa340[112]][_0xa340[111]]({where:{id:_[_0xa340[89]](_0x4040x25,_0xa340[109]),role:_0xa340[110]},attributes:[_0xa340[96],_0xa340[63],_0xa340[106],_0xa340[108],_0xa340[107]]})}})[_0xa340[44]](function(_0x4040x25){if(_0x4040x25){return {count:_0x4040x25[_0xa340[50]],rows:_[_0xa340[89]](_0x4040x25[_0xa340[91]],function(_0x4040x3f){return {membername:_0x4040x3f[_0xa340[63]],UserId:_0x4040x3f[_0xa340[96]],queue_name:_0x4040x3e[_0xa340[63]],ChatQueueId:_0x4040x3e[_0xa340[96]],interface:util[_0xa340[105]](_0xa340[103],_0xa340[104],_0x4040x3f[_0xa340[63]]),penalty:0,paused:_0x4040x3f[_0xa340[106]],createdAt:_0x4040x3f[_0xa340[107]],updatedAt:_0x4040x3f[_0xa340[108]]}})}}else {return {count:0,rows:[]}}})[_0xa340[44]](respondWithFilteredResult(_0x4040x25,_0x4040x2b))[_0xa340[35]](handleError(_0x4040x25,null))};exports[_0xa340[117]]= function(_0x4040x1f,_0x4040x28,_0x4040x3d){var _0x4040x2b={};var _0x4040x37={};var _0x4040x40;var _0x4040x2c;return db[_0xa340[68]][_0xa340[116]]({where:{id:_0x4040x1f[_0xa340[97]][_0xa340[96]]}})[_0xa340[44]](handleEntityNotFound(_0x4040x28,null))[_0xa340[44]](function(_0x4040x28){if(_0x4040x28){_0x4040x40= _0x4040x28;_0x4040x37[_0xa340[66]]= _[_0xa340[69]](db[_0xa340[118]][_0xa340[67]]);_0x4040x37[_0xa340[71]]= _[_0xa340[69]](_0x4040x1f[_0xa340[71]]);_0x4040x37[_0xa340[73]]= _[_0xa340[74]](_0x4040x37[_0xa340[66]],_0x4040x37[_0xa340[71]]);_0x4040x2b[_0xa340[75]]= _[_0xa340[74]](_0x4040x37[_0xa340[66]],qs[_0xa340[76]](_0x4040x1f[_0xa340[71]][_0xa340[76]]));_0x4040x2b[_0xa340[75]]= (_0x4040x2b[_0xa340[75]][_0xa340[77]])?_0x4040x2b[_0xa340[75]]:_0x4040x37[_0xa340[66]];_0x4040x2b[_0xa340[80]]= qs[_0xa340[81]](_0x4040x1f[_0xa340[71]][_0xa340[81]]);_0x4040x2b[_0xa340[82]]= qs[_0xa340[73]](_[_0xa340[83]](_0x4040x1f[_0xa340[71]],_0x4040x37[_0xa340[73]]));if(_0x4040x1f[_0xa340[71]][_0xa340[87]]){_0x4040x2b[_0xa340[82]]= _[_0xa340[86]](_0x4040x2b[_0xa340[82]],{$or:_[_0xa340[89]](_0x4040x2b[_0xa340[75]],function(_0x4040x3a){var _0x4040x38={};_0x4040x38[_0x4040x3a]= {$like:_0xa340[88]+ _0x4040x1f[_0xa340[71]][_0xa340[87]]+ _0xa340[88]};return _0x4040x38})})};_0x4040x2b= _[_0xa340[86]]({},_0x4040x2b,_0x4040x1f[_0xa340[90]]);return _0x4040x40[_0xa340[117]](_0x4040x2b)}})[_0xa340[44]](function(_0x4040x41){if(_0x4040x41){_0x4040x2c= _0x4040x41[_0xa340[77]];if(!_0x4040x1f[_0xa340[71]][_0xa340[79]](_0xa340[78])){_0x4040x2b[_0xa340[52]]= qs[_0xa340[52]](_0x4040x1f[_0xa340[71]][_0xa340[52]]);_0x4040x2b[_0xa340[51]]= qs[_0xa340[51]](_0x4040x1f[_0xa340[71]][_0xa340[51]])};return _0x4040x40[_0xa340[117]](_0x4040x2b)}})[_0xa340[44]](function(_0x4040x3c){if(_0x4040x3c){return _0x4040x3c?{count:_0x4040x2c,rows:_0x4040x3c}:null}})[_0xa340[44]](respondWithResult(_0x4040x28,null))[_0xa340[35]](handleError(_0x4040x28,null))};exports[_0xa340[119]]= function(_0x4040x1f,_0x4040x25,_0x4040x3d){var _0x4040x42=[];var _0x4040x3e;return db[_0xa340[118]][_0xa340[94]]({where:{id:_0x4040x1f[_0xa340[100]][_0xa340[120]]},attributes:[_0xa340[96]],include:[{model:db[_0xa340[112]],as:_0xa340[123],attributes:[_0xa340[96]],raw:true}]})[_0xa340[44]](function(_0x4040x45){if(_0x4040x45){for(var _0x4040x46=0;_0x4040x46< _0x4040x45[_0xa340[77]];_0x4040x46+= 1){for(var _0x4040x47=0;_0x4040x47< _0x4040x45[_0x4040x46][_0xa340[123]][_0xa340[77]];_0x4040x47+= 1){_0x4040x42= _[_0xa340[124]](_0x4040x42,[_0x4040x45[_0x4040x46][_0xa340[123]][_0x4040x47][_0xa340[96]]])}};return _0x4040x42}})[_0xa340[44]](function(_0x4040x44){if(_0x4040x44){return db[_0xa340[68]][_0xa340[98]]({where:{id:_0x4040x1f[_0xa340[97]][_0xa340[96]]}})}})[_0xa340[44]](function(_0x4040x43){if(_0x4040x43){_0x4040x3e= _0x4040x43;return _0x4040x3e[_0xa340[122]](_0x4040x42,{penalty:_0x4040x1f[_0xa340[100]][_0xa340[121]]})}})[_0xa340[44]](function(_0x4040x28){if(_0x4040x28){return _0x4040x3e[_0xa340[119]](_0x4040x1f[_0xa340[100]][_0xa340[120]])}})[_0xa340[44]](handleEntityNotFound(_0x4040x25,null))[_0xa340[44]](respondWithStatusCode(_0x4040x25,null))[_0xa340[35]](handleError(_0x4040x25,null))};exports[_0xa340[125]]= function(_0x4040x1f,_0x4040x25,_0x4040x3d){var _0x4040x42=[];var _0x4040x3e;return db[_0xa340[118]][_0xa340[94]]({where:{id:_0x4040x1f[_0xa340[71]][_0xa340[120]]},attributes:[_0xa340[96]],include:[{model:db[_0xa340[112]],as:_0xa340[123],attributes:[_0xa340[96]],raw:true}]})[_0xa340[44]](function(_0x4040x45){if(_0x4040x45){for(var _0x4040x46=0;_0x4040x46< _0x4040x45[_0xa340[77]];_0x4040x46+= 1){for(var _0x4040x47=0;_0x4040x47< _0x4040x45[_0x4040x46][_0xa340[123]][_0xa340[77]];_0x4040x47+= 1){_0x4040x42= _[_0xa340[124]](_0x4040x42,[_0x4040x45[_0x4040x46][_0xa340[123]][_0x4040x47][_0xa340[96]]])}};return _0x4040x42}})[_0xa340[44]](function(_0x4040x44){if(_0x4040x44){return db[_0xa340[68]][_0xa340[98]]({where:{id:_0x4040x1f[_0xa340[97]][_0xa340[96]]}})}})[_0xa340[44]](function(_0x4040x43){if(_0x4040x43){_0x4040x3e= _0x4040x43;return _0x4040x3e[_0xa340[126]](_0x4040x42)}})[_0xa340[44]](function(_0x4040x28){if(_0x4040x3e){return _0x4040x3e[_0xa340[125]](_0x4040x1f[_0xa340[71]][_0xa340[120]])}})[_0xa340[44]](handleEntityNotFound(_0x4040x25,null))[_0xa340[44]](respondWithStatusCode(_0x4040x25,null))[_0xa340[35]](handleError(_0x4040x25,null))};exports[_0xa340[122]]= function(_0x4040x1f,_0x4040x25,_0x4040x3d){return db[_0xa340[68]][_0xa340[98]]({where:{id:_0x4040x1f[_0xa340[97]][_0xa340[96]]}})[_0xa340[44]](handleEntityNotFound(_0x4040x25,null))[_0xa340[44]](function(_0x4040x28){if(_0x4040x28){return _0x4040x28[_0xa340[122]](_0x4040x1f[_0xa340[100]][_0xa340[120]],_[_0xa340[130]](_0x4040x1f[_0xa340[100]],[_0xa340[120],_0xa340[96]])|| {})[_0xa340[129]](function(_0x4040x41){for(var _0x4040x46=0;_0x4040x46< _0x4040x1f[_0xa340[100]][_0xa340[120]][_0xa340[77]];_0x4040x46+= 1){socket[_0xa340[128]](_0xa340[127],{UserId:_0x4040x1f[_0xa340[100]][_0xa340[120]][_0x4040x46],ChatQueueId:_0x4040x1f[_0xa340[97]][_0xa340[96]]})};return _0x4040x41})}})[_0xa340[44]](respondWithResult(_0x4040x25,null))[_0xa340[35]](handleError(_0x4040x25,null))};exports[_0xa340[126]]= function(_0x4040x1f,_0x4040x25,_0x4040x3d){var _0x4040x41;return db[_0xa340[68]][_0xa340[98]]({where:{id:_0x4040x1f[_0xa340[97]][_0xa340[96]]}})[_0xa340[44]](handleEntityNotFound(_0x4040x25,null))[_0xa340[44]](function(_0x4040x28){if(_0x4040x28){return _0x4040x28[_0xa340[126]](_0x4040x1f[_0xa340[71]][_0xa340[120]])[_0xa340[44]](function(_0x4040x41){if(_[_0xa340[131]](_0x4040x1f[_0xa340[71]][_0xa340[120]])){for(var _0x4040x46=0;_0x4040x46< _0x4040x1f[_0xa340[71]][_0xa340[120]][_0xa340[77]];_0x4040x46+= 1){socket[_0xa340[128]](_0xa340[132],{UserId:_0x4040x1f[_0xa340[71]][_0xa340[120]][_0x4040x46],ChatQueueId:_0x4040x1f[_0xa340[97]][_0xa340[96]]})}}else {socket[_0xa340[128]](_0xa340[132],{UserId:_0x4040x1f[_0xa340[71]][_0xa340[120]],ChatQueueId:_0x4040x1f[_0xa340[97]][_0xa340[96]]})}})}})[_0xa340[44]](respondWithStatusCode(_0x4040x25,null))[_0xa340[35]](handleError(_0x4040x25,null))};exports[_0xa340[133]]= function(_0x4040x1f,_0x4040x28,_0x4040x3d){var _0x4040x2b={};var _0x4040x37={};var _0x4040x40;var _0x4040x2c;return db[_0xa340[68]][_0xa340[116]]({where:{id:_0x4040x1f[_0xa340[97]][_0xa340[96]]}})[_0xa340[44]](handleEntityNotFound(_0x4040x28,null))[_0xa340[44]](function(_0x4040x28){if(_0x4040x28){_0x4040x40= _0x4040x28;_0x4040x37[_0xa340[66]]= _[_0xa340[69]](db[_0xa340[112]][_0xa340[67]]);_0x4040x37[_0xa340[71]]= _[_0xa340[69]](_0x4040x1f[_0xa340[71]]);_0x4040x37[_0xa340[73]]= _[_0xa340[74]](_0x4040x37[_0xa340[66]],_0x4040x37[_0xa340[71]]);_0x4040x2b[_0xa340[75]]= _[_0xa340[74]](_0x4040x37[_0xa340[66]],qs[_0xa340[76]](_0x4040x1f[_0xa340[71]][_0xa340[76]]));_0x4040x2b[_0xa340[75]]= (_0x4040x2b[_0xa340[75]][_0xa340[77]])?_0x4040x2b[_0xa340[75]]:_0x4040x37[_0xa340[66]];_0x4040x2b[_0xa340[80]]= qs[_0xa340[81]](_0x4040x1f[_0xa340[71]][_0xa340[81]]);_0x4040x2b[_0xa340[82]]= qs[_0xa340[73]](_[_0xa340[83]](_0x4040x1f[_0xa340[71]],_0x4040x37[_0xa340[73]]));if(_0x4040x1f[_0xa340[71]][_0xa340[87]]){_0x4040x2b[_0xa340[82]]= _[_0xa340[86]](_0x4040x2b[_0xa340[82]],{$or:_[_0xa340[89]](_0x4040x2b[_0xa340[75]],function(_0x4040x3a){var _0x4040x38={};_0x4040x38[_0x4040x3a]= {$like:_0xa340[88]+ _0x4040x1f[_0xa340[71]][_0xa340[87]]+ _0xa340[88]};return _0x4040x38})})};_0x4040x2b= _[_0xa340[86]]({},_0x4040x2b,_0x4040x1f[_0xa340[90]]);return _0x4040x40[_0xa340[133]](_0x4040x2b)}})[_0xa340[44]](function(_0x4040x41){if(_0x4040x41){_0x4040x2c= _0x4040x41[_0xa340[77]];if(!_0x4040x1f[_0xa340[71]][_0xa340[79]](_0xa340[78])){_0x4040x2b[_0xa340[52]]= qs[_0xa340[52]](_0x4040x1f[_0xa340[71]][_0xa340[52]]);_0x4040x2b[_0xa340[51]]= qs[_0xa340[51]](_0x4040x1f[_0xa340[71]][_0xa340[51]])};return _0x4040x40[_0xa340[133]](_0x4040x2b)}})[_0xa340[44]](function(_0x4040x3c){if(_0x4040x3c){return _0x4040x3c?{count:_0x4040x2c,rows:_0x4040x3c}:null}})[_0xa340[44]](respondWithResult(_0x4040x28,null))[_0xa340[35]](handleError(_0x4040x28,null))}
\ No newline at end of file
+var _0x6dda=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x66\x6F\x72\x6D\x61\x74","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x55\x73\x65\x72\x49\x64","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x55\x73\x65\x72","\x67\x65\x74","\x55\x73\x65\x72\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x54\x65\x61\x6D\x73","\x54\x65\x61\x6D","\x61\x64\x64\x54\x65\x61\x6D\x73","\x69\x64\x73","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x41\x67\x65\x6E\x74\x73","\x75\x6E\x69\x6F\x6E","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x75\x73\x65\x72\x43\x68\x61\x74\x51\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x6F\x6D\x69\x74","\x69\x73\x41\x72\x72\x61\x79","\x75\x73\x65\x72\x43\x68\x61\x74\x51\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x67\x65\x74\x41\x67\x65\x6E\x74\x73"];_0x6dda[0];var jsonpatch=require(_0x6dda[1]);var rp=require(_0x6dda[2]);var moment=require(_0x6dda[3]);var BPromise=require(_0x6dda[4]);var Mustache=require(_0x6dda[5]);var util=require(_0x6dda[6]);var path=require(_0x6dda[7]);var sox=require(_0x6dda[8]);var csv=require(_0x6dda[9]);var ejs=require(_0x6dda[10]);var fs=require(_0x6dda[11]);var _=require(_0x6dda[12]);var squel=require(_0x6dda[13]);var crypto=require(_0x6dda[14]);var jsforce=require(_0x6dda[15]);var deskjs=require(_0x6dda[16]);var toCsv=require(_0x6dda[9]);var querystring=require(_0x6dda[17]);var Papa=require(_0x6dda[18]);var qs=require(_0x6dda[19]);var logger=require(_0x6dda[21])(_0x6dda[20]);var utils=require(_0x6dda[22]);var config=require(_0x6dda[23]);var db=require(_0x6dda[25])[_0x6dda[24]];var socket=require(_0x6dda[27])({host:_0x6dda[26],port:6379});require(_0x6dda[29])[_0x6dda[28]](socket);var jayson=require(_0x6dda[30]);var client=jayson[_0x6dda[32]][_0x6dda[31]]({port:9002});function respondWithRpcPromise(_0xde1bx1d,_0xde1bx1e,_0xde1bx1f,_0xde1bx20){return  new BPromise(function(_0xde1bx21,_0xde1bx22){var _0xde1bx23=(_0xde1bx20|| client);return _0xde1bx23[_0x6dda[45]](_0xde1bx1d,_0xde1bx1f)[_0x6dda[44]](function(_0xde1bx25){logger[_0x6dda[37]](_0x6dda[33],_0xde1bx1e,_0x6dda[36]);logger[_0x6dda[40]](_0x6dda[38],_0xde1bx1e,_0x6dda[36],JSON[_0x6dda[39]](_0xde1bx25));if(_0xde1bx25[_0x6dda[34]]){if(_0xde1bx25[_0x6dda[34]][_0x6dda[41]]=== 500){logger[_0x6dda[34]](_0x6dda[33],_0xde1bx1e,_0xde1bx25[_0x6dda[34]][_0x6dda[42]]);return _0xde1bx22(_0xde1bx25[_0x6dda[34]][_0x6dda[42]])};logger[_0x6dda[34]](_0x6dda[33],_0xde1bx1e,_0xde1bx25[_0x6dda[34]][_0x6dda[42]]);return _0xde1bx21(_0xde1bx25[_0x6dda[34]][_0x6dda[42]])}else {logger[_0x6dda[37]](_0x6dda[33],_0xde1bx1e,_0x6dda[36]);_0xde1bx21(_0xde1bx25[_0x6dda[43]][_0x6dda[42]])}})[_0x6dda[35]](function(_0xde1bx24){logger[_0x6dda[34]](_0x6dda[33],_0xde1bx1e,_0xde1bx24);_0xde1bx22(_0xde1bx24)})})}function respondWithStatusCode(_0xde1bx25,_0xde1bx27){_0xde1bx27= _0xde1bx27|| 204;return function(_0xde1bx28){if(_0xde1bx28){return _0xde1bx25[_0x6dda[46]](_0xde1bx27)};return _0xde1bx25[_0x6dda[48]](_0xde1bx27)[_0x6dda[47]]()}}function respondWithResult(_0xde1bx25,_0xde1bx27){_0xde1bx27= _0xde1bx27|| 200;return function(_0xde1bx28){if(_0xde1bx28){return _0xde1bx25[_0x6dda[48]](_0xde1bx27)[_0x6dda[49]](_0xde1bx28)}}}function respondWithFilteredResult(_0xde1bx25,_0xde1bx2b){return function(_0xde1bx28){if(_0xde1bx28){var _0xde1bx2c=_0xde1bx28[_0x6dda[50]],_0xde1bx2d=_0xde1bx2b[_0x6dda[51]],_0xde1bx2e=_0xde1bx2b[_0x6dda[51]]+ _0xde1bx2b[_0x6dda[52]],_0xde1bx27;if(_0xde1bx2e>= _0xde1bx2c){_0xde1bx2e= _0xde1bx2c;_0xde1bx27= 200}else {_0xde1bx27= 206};_0xde1bx25[_0x6dda[48]](_0xde1bx27);return _0xde1bx25[_0x6dda[56]](_0x6dda[53],_0xde1bx2d+ _0x6dda[54]+ _0xde1bx2e+ _0x6dda[55]+ _0xde1bx2c)[_0x6dda[49]](_0xde1bx28)};return null}}function patchUpdates(_0xde1bx30){return function(_0xde1bx28){try{jsonpatch[_0x6dda[57]](_0xde1bx28,_0xde1bx30,true)}catch(err){return BPromise[_0x6dda[58]](err)};return _0xde1bx28[_0x6dda[59]]()}}function saveUpdates(_0xde1bx32,_0xde1bx27){return function(_0xde1bx28){if(_0xde1bx28){return _0xde1bx28[_0x6dda[60]](_0xde1bx32)[_0x6dda[44]](function(_0xde1bx33){return _0xde1bx33})};return null}}function removeEntity(_0xde1bx25,_0xde1bx27){return function(_0xde1bx28){if(_0xde1bx28){return _0xde1bx28[_0x6dda[61]]()[_0x6dda[44]](function(){_0xde1bx25[_0x6dda[48]](204)[_0x6dda[47]]()})}}}function handleEntityNotFound(_0xde1bx25,_0xde1bx27){return function(_0xde1bx28){if(!_0xde1bx28){_0xde1bx25[_0x6dda[46]](404)};return _0xde1bx28}}function handleError(_0xde1bx25,_0xde1bx27){_0xde1bx27= _0xde1bx27|| 500;return function(_0xde1bx24){logger[_0x6dda[34]](_0xde1bx24[_0x6dda[62]]);if(_0xde1bx24[_0x6dda[63]]){delete _0xde1bx24[_0x6dda[63]]};_0xde1bx25[_0x6dda[48]](_0xde1bx27)[_0x6dda[64]](_0xde1bx24)}}exports[_0x6dda[65]]= function(_0xde1bx1f,_0xde1bx25){var _0xde1bx2b={},_0xde1bx37={},_0xde1bx38={count:0,rows:[]};_0xde1bx37[_0x6dda[66]]= _[_0x6dda[69]](db[_0x6dda[68]][_0x6dda[67]]);var _0xde1bx39={dateStart:_0xde1bx1f[_0x6dda[71]][_0x6dda[70]],dateEnd:_0xde1bx1f[_0x6dda[71]][_0x6dda[72]]};delete _0xde1bx1f[_0x6dda[71]][_0x6dda[70]];delete _0xde1bx1f[_0x6dda[71]][_0x6dda[72]];_0xde1bx37[_0x6dda[71]]= _[_0x6dda[69]](_0xde1bx1f[_0x6dda[71]]);_0xde1bx37[_0x6dda[73]]= _[_0x6dda[74]](_0xde1bx37[_0x6dda[66]],_0xde1bx37[_0x6dda[71]]);_0xde1bx2b[_0x6dda[75]]= _[_0x6dda[74]](_0xde1bx37[_0x6dda[66]],qs[_0x6dda[76]](_0xde1bx1f[_0x6dda[71]][_0x6dda[76]]));_0xde1bx2b[_0x6dda[75]]= (_0xde1bx2b[_0x6dda[75]][_0x6dda[77]])?_0xde1bx2b[_0x6dda[75]]:_0xde1bx37[_0x6dda[66]];if(!_0xde1bx1f[_0x6dda[71]][_0x6dda[79]](_0x6dda[78])){_0xde1bx2b[_0x6dda[52]]= qs[_0x6dda[52]](_0xde1bx1f[_0x6dda[71]][_0x6dda[52]]);_0xde1bx2b[_0x6dda[51]]= qs[_0x6dda[51]](_0xde1bx1f[_0x6dda[71]][_0x6dda[51]])};_0xde1bx2b[_0x6dda[80]]= qs[_0x6dda[81]](_0xde1bx1f[_0x6dda[71]][_0x6dda[81]]);_0xde1bx2b[_0x6dda[82]]= qs[_0x6dda[73]](_[_0x6dda[83]](_0xde1bx1f[_0x6dda[71]],_0xde1bx37[_0x6dda[73]]));if(_0xde1bx39[_0x6dda[70]]){if(_0xde1bx39[_0x6dda[72]]){_0xde1bx39[_0x6dda[72]]= moment(_0xde1bx39[_0x6dda[72]])[_0x6dda[85]](1,_0x6dda[84])}else {_0xde1bx39[_0x6dda[72]]= moment(_0xde1bx39[_0x6dda[70]])[_0x6dda[85]](1,_0x6dda[84])};_[_0x6dda[86]](_0xde1bx2b[_0x6dda[82]],{createdAt:{$gte:_0xde1bx39[_0x6dda[70]],$lte:_0xde1bx39[_0x6dda[72]]}})};if(_0xde1bx1f[_0x6dda[71]][_0x6dda[87]]){_0xde1bx2b[_0x6dda[82]]= _[_0x6dda[86]](_0xde1bx2b[_0x6dda[82]],{$or:_[_0x6dda[89]](_0xde1bx2b[_0x6dda[75]],function(_0xde1bx3a){var _0xde1bx38={};_0xde1bx38[_0xde1bx3a]= {$like:_0x6dda[88]+ _0xde1bx1f[_0x6dda[71]][_0x6dda[87]]+ _0x6dda[88]};return _0xde1bx38})})};_0xde1bx2b= _[_0x6dda[86]]({},_0xde1bx2b,_0xde1bx1f[_0x6dda[90]]);var _0xde1bx3b={where:_0xde1bx2b[_0x6dda[82]]};return db[_0x6dda[68]][_0x6dda[50]](_0xde1bx3b)[_0x6dda[44]](function(_0xde1bx2c){_0xde1bx38[_0x6dda[50]]= _0xde1bx2c;if(_0xde1bx1f[_0x6dda[71]][_0x6dda[92]]){_0xde1bx2b[_0x6dda[93]]= [{all:true}]};return db[_0x6dda[68]][_0x6dda[94]](_0xde1bx2b)})[_0x6dda[44]](function(_0xde1bx3c){_0xde1bx38[_0x6dda[91]]= _0xde1bx3c;return _0xde1bx38})[_0x6dda[44]](respondWithFilteredResult(_0xde1bx25,_0xde1bx2b))[_0x6dda[35]](handleError(_0xde1bx25,null))};exports[_0x6dda[95]]= function(_0xde1bx1f,_0xde1bx25){var _0xde1bx2b={raw:true,where:{id:_0xde1bx1f[_0x6dda[97]][_0x6dda[96]]}},_0xde1bx37={};_0xde1bx37[_0x6dda[66]]= _[_0x6dda[69]](db[_0x6dda[68]][_0x6dda[67]]);_0xde1bx37[_0x6dda[71]]= _[_0x6dda[69]](_0xde1bx1f[_0x6dda[71]]);_0xde1bx37[_0x6dda[73]]= _[_0x6dda[74]](_0xde1bx37[_0x6dda[66]],_0xde1bx37[_0x6dda[71]]);_0xde1bx2b[_0x6dda[75]]= _[_0x6dda[74]](_0xde1bx37[_0x6dda[66]],qs[_0x6dda[76]](_0xde1bx1f[_0x6dda[71]][_0x6dda[76]]));_0xde1bx2b[_0x6dda[75]]= (_0xde1bx2b[_0x6dda[75]][_0x6dda[77]])?_0xde1bx2b[_0x6dda[75]]:_0xde1bx37[_0x6dda[66]];if(_0xde1bx1f[_0x6dda[71]][_0x6dda[92]]){_0xde1bx2b[_0x6dda[93]]= [{all:true}]};_0xde1bx2b= _[_0x6dda[86]]({},_0xde1bx2b,_0xde1bx1f[_0x6dda[90]]);return db[_0x6dda[68]][_0x6dda[98]](_0xde1bx2b)[_0x6dda[44]](handleEntityNotFound(_0xde1bx25,null))[_0x6dda[44]](respondWithResult(_0xde1bx25,null))[_0x6dda[35]](handleError(_0xde1bx25,null))};exports[_0x6dda[99]]= function(_0xde1bx1f,_0xde1bx25){return db[_0x6dda[68]][_0x6dda[99]](_0xde1bx1f[_0x6dda[100]],{})[_0x6dda[44]](respondWithResult(_0xde1bx25,201))[_0x6dda[35]](handleError(_0xde1bx25,null))};exports[_0x6dda[60]]= function(_0xde1bx1f,_0xde1bx25){if(_0xde1bx1f[_0x6dda[100]][_0x6dda[96]]){delete _0xde1bx1f[_0x6dda[100]][_0x6dda[96]]};return db[_0x6dda[68]][_0x6dda[98]]({where:{id:_0xde1bx1f[_0x6dda[97]][_0x6dda[96]]}})[_0x6dda[44]](handleEntityNotFound(_0xde1bx25,null))[_0x6dda[44]](saveUpdates(_0xde1bx1f[_0x6dda[100]],null))[_0x6dda[44]](respondWithResult(_0xde1bx25,null))[_0x6dda[35]](handleError(_0xde1bx25,null))};exports[_0x6dda[61]]= function(_0xde1bx1f,_0xde1bx25){return db[_0x6dda[68]][_0x6dda[98]]({where:{id:_0xde1bx1f[_0x6dda[97]][_0x6dda[96]]}})[_0x6dda[44]](handleEntityNotFound(_0xde1bx25,null))[_0x6dda[44]](removeEntity(_0xde1bx25,null))[_0x6dda[35]](handleError(_0xde1bx25,null))};exports[_0x6dda[101]]= function(_0xde1bx1f,_0xde1bx25){return db[_0x6dda[68]][_0x6dda[101]]()[_0x6dda[44]](respondWithResult(_0xde1bx25,null))[_0x6dda[35]](handleError(_0xde1bx25,null))};exports[_0x6dda[102]]= function(_0xde1bx1f,_0xde1bx25,_0xde1bx3d){var _0xde1bx2b={raw:true,where:{}},_0xde1bx37={},_0xde1bx3e;return db[_0x6dda[68]][_0x6dda[116]]({where:{id:_0xde1bx1f[_0x6dda[97]][_0x6dda[96]]}})[_0x6dda[44]](handleEntityNotFound(_0xde1bx25,null))[_0x6dda[44]](function(_0xde1bx28){if(_0xde1bx28){_0xde1bx3e= _0xde1bx28[_0x6dda[113]]({plain:true});_0xde1bx37[_0x6dda[66]]= _[_0x6dda[69]](db[_0x6dda[114]][_0x6dda[67]]);_0xde1bx37[_0x6dda[71]]= _[_0x6dda[69]](_0xde1bx1f[_0x6dda[71]]);_0xde1bx37[_0x6dda[73]]= _[_0x6dda[74]](_0xde1bx37[_0x6dda[66]],_0xde1bx37[_0x6dda[71]]);_0xde1bx2b[_0x6dda[75]]= _[_0x6dda[74]](_0xde1bx37[_0x6dda[66]],qs[_0x6dda[76]](_0xde1bx1f[_0x6dda[71]][_0x6dda[76]]));_0xde1bx2b[_0x6dda[75]]= (_0xde1bx2b[_0x6dda[75]][_0x6dda[77]])?_0xde1bx2b[_0x6dda[75]]:_0xde1bx37[_0x6dda[66]];if(!_0xde1bx1f[_0x6dda[71]][_0x6dda[79]](_0x6dda[78])){_0xde1bx2b[_0x6dda[52]]= qs[_0x6dda[52]](_0xde1bx1f[_0x6dda[71]][_0x6dda[52]]);_0xde1bx2b[_0x6dda[51]]= qs[_0x6dda[51]](_0xde1bx1f[_0x6dda[71]][_0x6dda[51]])};_0xde1bx2b[_0x6dda[80]]= qs[_0x6dda[81]](_0xde1bx1f[_0x6dda[71]][_0x6dda[81]]);_0xde1bx2b[_0x6dda[82]]= qs[_0x6dda[73]](_[_0x6dda[83]](_0xde1bx1f[_0x6dda[71]],_0xde1bx37[_0x6dda[73]]));_0xde1bx2b[_0x6dda[82]][_0x6dda[115]]= _0xde1bx28[_0x6dda[96]];if(_0xde1bx1f[_0x6dda[71]][_0x6dda[87]]){_0xde1bx2b[_0x6dda[82]]= _[_0x6dda[86]](_0xde1bx2b[_0x6dda[82]],{$or:_[_0x6dda[89]](_0xde1bx2b[_0x6dda[75]],function(_0xde1bx3a){var _0xde1bx38={};_0xde1bx38[_0xde1bx3a]= {$like:_0x6dda[88]+ _0xde1bx1f[_0x6dda[71]][_0x6dda[87]]+ _0x6dda[88]};return _0xde1bx38})})};_0xde1bx2b= _[_0x6dda[86]]({},_0xde1bx2b,_0xde1bx1f[_0x6dda[90]]);return db[_0x6dda[114]][_0x6dda[94]](_0xde1bx2b)}})[_0x6dda[44]](function(_0xde1bx25){if(_0xde1bx25){return db[_0x6dda[112]][_0x6dda[111]]({where:{id:_[_0x6dda[89]](_0xde1bx25,_0x6dda[109]),role:_0x6dda[110]},attributes:[_0x6dda[96],_0x6dda[63],_0x6dda[106],_0x6dda[108],_0x6dda[107]]})}})[_0x6dda[44]](function(_0xde1bx25){if(_0xde1bx25){return {count:_0xde1bx25[_0x6dda[50]],rows:_[_0x6dda[89]](_0xde1bx25[_0x6dda[91]],function(_0xde1bx3f){return {membername:_0xde1bx3f[_0x6dda[63]],UserId:_0xde1bx3f[_0x6dda[96]],queue_name:_0xde1bx3e[_0x6dda[63]],ChatQueueId:_0xde1bx3e[_0x6dda[96]],interface:util[_0x6dda[105]](_0x6dda[103],_0x6dda[104],_0xde1bx3f[_0x6dda[63]]),penalty:0,paused:_0xde1bx3f[_0x6dda[106]],createdAt:_0xde1bx3f[_0x6dda[107]],updatedAt:_0xde1bx3f[_0x6dda[108]]}})}}else {return {count:0,rows:[]}}})[_0x6dda[44]](respondWithFilteredResult(_0xde1bx25,_0xde1bx2b))[_0x6dda[35]](handleError(_0xde1bx25,null))};exports[_0x6dda[117]]= function(_0xde1bx1f,_0xde1bx28,_0xde1bx3d){var _0xde1bx2b={};var _0xde1bx37={};var _0xde1bx40;var _0xde1bx2c;return db[_0x6dda[68]][_0x6dda[116]]({where:{id:_0xde1bx1f[_0x6dda[97]][_0x6dda[96]]}})[_0x6dda[44]](handleEntityNotFound(_0xde1bx28,null))[_0x6dda[44]](function(_0xde1bx28){if(_0xde1bx28){_0xde1bx40= _0xde1bx28;_0xde1bx37[_0x6dda[66]]= _[_0x6dda[69]](db[_0x6dda[118]][_0x6dda[67]]);_0xde1bx37[_0x6dda[71]]= _[_0x6dda[69]](_0xde1bx1f[_0x6dda[71]]);_0xde1bx37[_0x6dda[73]]= _[_0x6dda[74]](_0xde1bx37[_0x6dda[66]],_0xde1bx37[_0x6dda[71]]);_0xde1bx2b[_0x6dda[75]]= _[_0x6dda[74]](_0xde1bx37[_0x6dda[66]],qs[_0x6dda[76]](_0xde1bx1f[_0x6dda[71]][_0x6dda[76]]));_0xde1bx2b[_0x6dda[75]]= (_0xde1bx2b[_0x6dda[75]][_0x6dda[77]])?_0xde1bx2b[_0x6dda[75]]:_0xde1bx37[_0x6dda[66]];_0xde1bx2b[_0x6dda[80]]= qs[_0x6dda[81]](_0xde1bx1f[_0x6dda[71]][_0x6dda[81]]);_0xde1bx2b[_0x6dda[82]]= qs[_0x6dda[73]](_[_0x6dda[83]](_0xde1bx1f[_0x6dda[71]],_0xde1bx37[_0x6dda[73]]));if(_0xde1bx1f[_0x6dda[71]][_0x6dda[87]]){_0xde1bx2b[_0x6dda[82]]= _[_0x6dda[86]](_0xde1bx2b[_0x6dda[82]],{$or:_[_0x6dda[89]](_0xde1bx2b[_0x6dda[75]],function(_0xde1bx3a){var _0xde1bx38={};_0xde1bx38[_0xde1bx3a]= {$like:_0x6dda[88]+ _0xde1bx1f[_0x6dda[71]][_0x6dda[87]]+ _0x6dda[88]};return _0xde1bx38})})};_0xde1bx2b= _[_0x6dda[86]]({},_0xde1bx2b,_0xde1bx1f[_0x6dda[90]]);return _0xde1bx40[_0x6dda[117]](_0xde1bx2b)}})[_0x6dda[44]](function(_0xde1bx41){if(_0xde1bx41){_0xde1bx2c= _0xde1bx41[_0x6dda[77]];if(!_0xde1bx1f[_0x6dda[71]][_0x6dda[79]](_0x6dda[78])){_0xde1bx2b[_0x6dda[52]]= qs[_0x6dda[52]](_0xde1bx1f[_0x6dda[71]][_0x6dda[52]]);_0xde1bx2b[_0x6dda[51]]= qs[_0x6dda[51]](_0xde1bx1f[_0x6dda[71]][_0x6dda[51]])};return _0xde1bx40[_0x6dda[117]](_0xde1bx2b)}})[_0x6dda[44]](function(_0xde1bx3c){if(_0xde1bx3c){return _0xde1bx3c?{count:_0xde1bx2c,rows:_0xde1bx3c}:null}})[_0x6dda[44]](respondWithResult(_0xde1bx28,null))[_0x6dda[35]](handleError(_0xde1bx28,null))};exports[_0x6dda[119]]= function(_0xde1bx1f,_0xde1bx25,_0xde1bx3d){var _0xde1bx42=[];var _0xde1bx3e;return db[_0x6dda[118]][_0x6dda[94]]({where:{id:_0xde1bx1f[_0x6dda[100]][_0x6dda[120]]},attributes:[_0x6dda[96]],include:[{model:db[_0x6dda[112]],as:_0x6dda[123],attributes:[_0x6dda[96]],raw:true}]})[_0x6dda[44]](function(_0xde1bx45){if(_0xde1bx45){for(var _0xde1bx46=0;_0xde1bx46< _0xde1bx45[_0x6dda[77]];_0xde1bx46+= 1){for(var _0xde1bx47=0;_0xde1bx47< _0xde1bx45[_0xde1bx46][_0x6dda[123]][_0x6dda[77]];_0xde1bx47+= 1){_0xde1bx42= _[_0x6dda[124]](_0xde1bx42,[_0xde1bx45[_0xde1bx46][_0x6dda[123]][_0xde1bx47][_0x6dda[96]]])}};return _0xde1bx42}})[_0x6dda[44]](function(_0xde1bx44){if(_0xde1bx44){return db[_0x6dda[68]][_0x6dda[98]]({where:{id:_0xde1bx1f[_0x6dda[97]][_0x6dda[96]]}})}})[_0x6dda[44]](function(_0xde1bx43){if(_0xde1bx43){_0xde1bx3e= _0xde1bx43;return _0xde1bx3e[_0x6dda[122]](_0xde1bx42,{penalty:_0xde1bx1f[_0x6dda[100]][_0x6dda[121]]})}})[_0x6dda[44]](function(_0xde1bx28){if(_0xde1bx28){return _0xde1bx3e[_0x6dda[119]](_0xde1bx1f[_0x6dda[100]][_0x6dda[120]])}})[_0x6dda[44]](handleEntityNotFound(_0xde1bx25,null))[_0x6dda[44]](respondWithStatusCode(_0xde1bx25,null))[_0x6dda[35]](handleError(_0xde1bx25,null))};exports[_0x6dda[125]]= function(_0xde1bx1f,_0xde1bx25,_0xde1bx3d){var _0xde1bx42=[];var _0xde1bx3e;return db[_0x6dda[118]][_0x6dda[94]]({where:{id:_0xde1bx1f[_0x6dda[71]][_0x6dda[120]]},attributes:[_0x6dda[96]],include:[{model:db[_0x6dda[112]],as:_0x6dda[123],attributes:[_0x6dda[96]],raw:true}]})[_0x6dda[44]](function(_0xde1bx45){if(_0xde1bx45){for(var _0xde1bx46=0;_0xde1bx46< _0xde1bx45[_0x6dda[77]];_0xde1bx46+= 1){for(var _0xde1bx47=0;_0xde1bx47< _0xde1bx45[_0xde1bx46][_0x6dda[123]][_0x6dda[77]];_0xde1bx47+= 1){_0xde1bx42= _[_0x6dda[124]](_0xde1bx42,[_0xde1bx45[_0xde1bx46][_0x6dda[123]][_0xde1bx47][_0x6dda[96]]])}};return _0xde1bx42}})[_0x6dda[44]](function(_0xde1bx44){if(_0xde1bx44){return db[_0x6dda[68]][_0x6dda[98]]({where:{id:_0xde1bx1f[_0x6dda[97]][_0x6dda[96]]}})}})[_0x6dda[44]](function(_0xde1bx43){if(_0xde1bx43){_0xde1bx3e= _0xde1bx43;return _0xde1bx3e[_0x6dda[126]](_0xde1bx42)}})[_0x6dda[44]](function(_0xde1bx28){if(_0xde1bx3e){return _0xde1bx3e[_0x6dda[125]](_0xde1bx1f[_0x6dda[71]][_0x6dda[120]])}})[_0x6dda[44]](handleEntityNotFound(_0xde1bx25,null))[_0x6dda[44]](respondWithStatusCode(_0xde1bx25,null))[_0x6dda[35]](handleError(_0xde1bx25,null))};exports[_0x6dda[122]]= function(_0xde1bx1f,_0xde1bx25,_0xde1bx3d){return db[_0x6dda[68]][_0x6dda[98]]({where:{id:_0xde1bx1f[_0x6dda[97]][_0x6dda[96]]}})[_0x6dda[44]](handleEntityNotFound(_0xde1bx25,null))[_0x6dda[44]](function(_0xde1bx28){if(_0xde1bx28){return _0xde1bx28[_0x6dda[122]](_0xde1bx1f[_0x6dda[100]][_0x6dda[120]],_[_0x6dda[130]](_0xde1bx1f[_0x6dda[100]],[_0x6dda[120],_0x6dda[96]])|| {})[_0x6dda[129]](function(_0xde1bx41){for(var _0xde1bx46=0;_0xde1bx46< _0xde1bx1f[_0x6dda[100]][_0x6dda[120]][_0x6dda[77]];_0xde1bx46+= 1){socket[_0x6dda[128]](_0x6dda[127],{UserId:_0xde1bx1f[_0x6dda[100]][_0x6dda[120]][_0xde1bx46],ChatQueueId:_0xde1bx1f[_0x6dda[97]][_0x6dda[96]]})};return _0xde1bx41})}})[_0x6dda[44]](respondWithResult(_0xde1bx25,null))[_0x6dda[35]](handleError(_0xde1bx25,null))};exports[_0x6dda[126]]= function(_0xde1bx1f,_0xde1bx25,_0xde1bx3d){var _0xde1bx41;return db[_0x6dda[68]][_0x6dda[98]]({where:{id:_0xde1bx1f[_0x6dda[97]][_0x6dda[96]]}})[_0x6dda[44]](handleEntityNotFound(_0xde1bx25,null))[_0x6dda[44]](function(_0xde1bx28){if(_0xde1bx28){return _0xde1bx28[_0x6dda[126]](_0xde1bx1f[_0x6dda[71]][_0x6dda[120]])[_0x6dda[44]](function(_0xde1bx41){if(_[_0x6dda[131]](_0xde1bx1f[_0x6dda[71]][_0x6dda[120]])){for(var _0xde1bx46=0;_0xde1bx46< _0xde1bx1f[_0x6dda[71]][_0x6dda[120]][_0x6dda[77]];_0xde1bx46+= 1){socket[_0x6dda[128]](_0x6dda[132],{UserId:_0xde1bx1f[_0x6dda[71]][_0x6dda[120]][_0xde1bx46],ChatQueueId:_0xde1bx1f[_0x6dda[97]][_0x6dda[96]]})}}else {socket[_0x6dda[128]](_0x6dda[132],{UserId:_0xde1bx1f[_0x6dda[71]][_0x6dda[120]],ChatQueueId:_0xde1bx1f[_0x6dda[97]][_0x6dda[96]]})}})}})[_0x6dda[44]](respondWithStatusCode(_0xde1bx25,null))[_0x6dda[35]](handleError(_0xde1bx25,null))};exports[_0x6dda[133]]= function(_0xde1bx1f,_0xde1bx28,_0xde1bx3d){var _0xde1bx2b={};var _0xde1bx37={};var _0xde1bx40;var _0xde1bx2c;return db[_0x6dda[68]][_0x6dda[116]]({where:{id:_0xde1bx1f[_0x6dda[97]][_0x6dda[96]]}})[_0x6dda[44]](handleEntityNotFound(_0xde1bx28,null))[_0x6dda[44]](function(_0xde1bx28){if(_0xde1bx28){_0xde1bx40= _0xde1bx28;_0xde1bx37[_0x6dda[66]]= _[_0x6dda[69]](db[_0x6dda[112]][_0x6dda[67]]);_0xde1bx37[_0x6dda[71]]= _[_0x6dda[69]](_0xde1bx1f[_0x6dda[71]]);_0xde1bx37[_0x6dda[73]]= _[_0x6dda[74]](_0xde1bx37[_0x6dda[66]],_0xde1bx37[_0x6dda[71]]);_0xde1bx2b[_0x6dda[75]]= _[_0x6dda[74]](_0xde1bx37[_0x6dda[66]],qs[_0x6dda[76]](_0xde1bx1f[_0x6dda[71]][_0x6dda[76]]));_0xde1bx2b[_0x6dda[75]]= (_0xde1bx2b[_0x6dda[75]][_0x6dda[77]])?_0xde1bx2b[_0x6dda[75]]:_0xde1bx37[_0x6dda[66]];_0xde1bx2b[_0x6dda[80]]= qs[_0x6dda[81]](_0xde1bx1f[_0x6dda[71]][_0x6dda[81]]);_0xde1bx2b[_0x6dda[82]]= qs[_0x6dda[73]](_[_0x6dda[83]](_0xde1bx1f[_0x6dda[71]],_0xde1bx37[_0x6dda[73]]));if(_0xde1bx1f[_0x6dda[71]][_0x6dda[87]]){_0xde1bx2b[_0x6dda[82]]= _[_0x6dda[86]](_0xde1bx2b[_0x6dda[82]],{$or:_[_0x6dda[89]](_0xde1bx2b[_0x6dda[75]],function(_0xde1bx3a){var _0xde1bx38={};_0xde1bx38[_0xde1bx3a]= {$like:_0x6dda[88]+ _0xde1bx1f[_0x6dda[71]][_0x6dda[87]]+ _0x6dda[88]};return _0xde1bx38})})};_0xde1bx2b= _[_0x6dda[86]]({},_0xde1bx2b,_0xde1bx1f[_0x6dda[90]]);return _0xde1bx40[_0x6dda[133]](_0xde1bx2b)}})[_0x6dda[44]](function(_0xde1bx41){if(_0xde1bx41){_0xde1bx2c= _0xde1bx41[_0x6dda[77]];if(!_0xde1bx1f[_0x6dda[71]][_0x6dda[79]](_0x6dda[78])){_0xde1bx2b[_0x6dda[52]]= qs[_0x6dda[52]](_0xde1bx1f[_0x6dda[71]][_0x6dda[52]]);_0xde1bx2b[_0x6dda[51]]= qs[_0x6dda[51]](_0xde1bx1f[_0x6dda[71]][_0x6dda[51]])};return _0xde1bx40[_0x6dda[133]](_0xde1bx2b)}})[_0x6dda[44]](function(_0xde1bx3c){if(_0xde1bx3c){return _0xde1bx3c?{count:_0xde1bx2c,rows:_0xde1bx3c}:null}})[_0x6dda[44]](respondWithResult(_0xde1bx28,null))[_0x6dda[35]](handleError(_0xde1bx28,null))}
\ No newline at end of file
index 225d025..b60a4f2 100644 (file)
@@ -1 +1 @@
-var _0xe33b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xe33b[0];var EventEmitter=require(_0xe33b[1]);var ChatQueue=require(_0xe33b[4])[_0xe33b[3]][_0xe33b[2]];var ChatQueueEvents= new EventEmitter();ChatQueueEvents[_0xe33b[5]](0);var events={afterCreate:_0xe33b[6],afterUpdate:_0xe33b[7],afterDestroy:_0xe33b[8]};function emitEvent(event){return function(_0x7580x7,_0x7580x8,_0x7580x9){ChatQueueEvents[_0xe33b[11]](event+ _0xe33b[9]+ _0x7580x7[_0xe33b[10]],_0x7580x7);ChatQueueEvents[_0xe33b[11]](event,_0x7580x7);_0x7580x9(null)}}for(var e in events){if(events[_0xe33b[12]](e)){var event=events[e];ChatQueue[_0xe33b[13]](e,emitEvent(event))}};module[_0xe33b[14]]= ChatQueueEvents
\ No newline at end of file
+var _0x7f5f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x7f5f[0];var EventEmitter=require(_0x7f5f[1]);var ChatQueue=require(_0x7f5f[4])[_0x7f5f[3]][_0x7f5f[2]];var ChatQueueEvents= new EventEmitter();ChatQueueEvents[_0x7f5f[5]](0);var events={afterCreate:_0x7f5f[6],afterUpdate:_0x7f5f[7],afterDestroy:_0x7f5f[8]};function emitEvent(event){return function(_0x569ex7,_0x569ex8,_0x569ex9){ChatQueueEvents[_0x7f5f[11]](event+ _0x7f5f[9]+ _0x569ex7[_0x7f5f[10]],_0x569ex7);ChatQueueEvents[_0x7f5f[11]](event,_0x569ex7);_0x569ex9(null)}}for(var e in events){if(events[_0x7f5f[12]](e)){var event=events[e];ChatQueue[_0x7f5f[13]](e,emitEvent(event))}};module[_0x7f5f[14]]= ChatQueueEvents
\ No newline at end of file
index 10e8046..7b29108 100644 (file)
@@ -1 +1 @@
-var _0x883d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x883d[0];var _=require(_0x883d[1]);var util=require(_0x883d[2]);var logger=require(_0x883d[4])(_0x883d[3]);var moment=require(_0x883d[5]);var BPromise=require(_0x883d[6]);var rp=require(_0x883d[7]);var attributes=require(_0x883d[8]);module[_0x883d[9]]= function(_0x64abx8,_0x64abx9){return _0x64abx8[_0x883d[12]](_0x883d[10],attributes,{tableName:_0x883d[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x7082=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x7082[0];var _=require(_0x7082[1]);var util=require(_0x7082[2]);var logger=require(_0x7082[4])(_0x7082[3]);var moment=require(_0x7082[5]);var BPromise=require(_0x7082[6]);var rp=require(_0x7082[7]);var attributes=require(_0x7082[8]);module[_0x7082[9]]= function(_0xe068x8,_0xe068x9){return _0xe068x8[_0x7082[12]](_0x7082[10],attributes,{tableName:_0x7082[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 8321232..ba73afa 100644 (file)
@@ -1 +1 @@
-var _0xc53c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x53\x68\x6F\x77\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x66\x69\x6E\x64"];_0xc53c[0];var _=require(_0xc53c[1]);var util=require(_0xc53c[2]);var moment=require(_0xc53c[3]);var BPromise=require(_0xc53c[4]);var rs=require(_0xc53c[5]);var fs=require(_0xc53c[6]);var db=require(_0xc53c[8])[_0xc53c[7]];var utils=require(_0xc53c[9]);var logger=require(_0xc53c[11])(_0xc53c[10]);var config=require(_0xc53c[12]);var jayson=require(_0xc53c[13]);var client=jayson[_0xc53c[15]][_0xc53c[14]]({port:9002});var socket=require(_0xc53c[17])({host:_0xc53c[16],port:6379});require(_0xc53c[19])[_0xc53c[18]](socket);function respondWithRpcPromise(_0x718fxf,_0x718fx10,_0x718fx11){return  new BPromise(function(_0x718fx12,_0x718fx13){return client[_0xc53c[32]](_0x718fxf,_0x718fx11)[_0xc53c[31]](function(_0x718fx15){logger[_0xc53c[24]](_0xc53c[20],_0x718fx10,_0xc53c[23]);logger[_0xc53c[27]](_0xc53c[25],_0x718fx10,_0xc53c[23],JSON[_0xc53c[26]](_0x718fx15));if(_0x718fx15[_0xc53c[21]]){if(_0x718fx15[_0xc53c[21]][_0xc53c[28]]=== 500){logger[_0xc53c[21]](_0xc53c[20],_0x718fx10,_0x718fx15[_0xc53c[21]][_0xc53c[29]]);return _0x718fx13(_0x718fx15[_0xc53c[21]][_0xc53c[29]])};logger[_0xc53c[21]](_0xc53c[20],_0x718fx10,_0x718fx15[_0xc53c[21]][_0xc53c[29]]);return _0x718fx12(_0x718fx15[_0xc53c[21]][_0xc53c[29]])}else {logger[_0xc53c[24]](_0xc53c[20],_0x718fx10,_0xc53c[23]);_0x718fx12(_0x718fx15[_0xc53c[30]][_0xc53c[29]])}})[_0xc53c[22]](function(_0x718fx14){logger[_0xc53c[21]](_0xc53c[20],_0x718fx10,_0x718fx14);_0x718fx13(_0x718fx14)})})}exports[_0xc53c[33]]= function(_0x718fx11){var _0x718fx16=this;return  new Promise(function(_0x718fx12,_0x718fx13){return db[_0xc53c[44]][_0xc53c[43]]({raw:_0x718fx11[_0xc53c[34]]?(_0x718fx11[_0xc53c[34]][_0xc53c[35]]=== undefined)?true:false:true,where:_0x718fx11[_0xc53c[34]]?_0x718fx11[_0xc53c[34]][_0xc53c[36]]|| null:null,attributes:_0x718fx11[_0xc53c[34]]?_0x718fx11[_0xc53c[34]][_0xc53c[37]]|| null:null,limit:_0x718fx11[_0xc53c[34]]?_0x718fx11[_0xc53c[34]][_0xc53c[38]]|| null:null,include:_0x718fx11[_0xc53c[34]]?(_0x718fx11[_0xc53c[34]][_0xc53c[39]]?_[_0xc53c[42]](_0x718fx11[_0xc53c[34]][_0xc53c[39]],function(_0x718fx17){return {model:db[_0x718fx17[_0xc53c[40]]],as:_0x718fx17[_0xc53c[41]],attributes:_0x718fx17[_0xc53c[37]],include:_0x718fx17[_0xc53c[39]]?_[_0xc53c[42]](_0x718fx17[_0xc53c[39]],function(_0x718fx18){return {model:db[_0x718fx18[_0xc53c[40]]],as:_0x718fx18[_0xc53c[41]],attributes:_0x718fx18[_0xc53c[37]],include:_0x718fx18[_0xc53c[39]]?_[_0xc53c[42]](_0x718fx18[_0xc53c[39]],function(_0x718fx19){return {model:db[_0x718fx19[_0xc53c[40]]],as:_0x718fx19[_0xc53c[41]],attributes:_0x718fx19[_0xc53c[37]]}}):[]}}):[]}}):[]):[]})[_0xc53c[31]](function(_0x718fx15){logger[_0xc53c[24]](_0xc53c[33],_0x718fx11);logger[_0xc53c[27]](_0xc53c[33],_0x718fx11,JSON[_0xc53c[26]](_0x718fx15));_0x718fx12(_0x718fx15)})[_0xc53c[22]](function(_0x718fx14){logger[_0xc53c[21]](_0xc53c[33],_0x718fx14[_0xc53c[29]],_0x718fx11);_0x718fx13(_0x718fx16[_0xc53c[21]](500,_0x718fx14[_0xc53c[29]]))})})};exports[_0xc53c[45]]= function(_0x718fx11){var _0x718fx16=this;return  new Promise(function(_0x718fx12,_0x718fx13){return db[_0xc53c[44]][_0xc53c[46]]({raw:_0x718fx11[_0xc53c[34]]?(_0x718fx11[_0xc53c[34]][_0xc53c[35]]=== undefined)?true:false:true,where:_0x718fx11[_0xc53c[34]]?_0x718fx11[_0xc53c[34]][_0xc53c[36]]|| null:null,attributes:_0x718fx11[_0xc53c[34]]?_0x718fx11[_0xc53c[34]][_0xc53c[37]]|| null:null,include:_0x718fx11[_0xc53c[34]]?(_0x718fx11[_0xc53c[34]][_0xc53c[39]]?_[_0xc53c[42]](_0x718fx11[_0xc53c[34]][_0xc53c[39]],function(_0x718fx17){return {model:db[_0x718fx17[_0xc53c[40]]],as:_0x718fx17[_0xc53c[41]],attributes:_0x718fx17[_0xc53c[37]],include:_0x718fx17[_0xc53c[39]]?_[_0xc53c[42]](_0x718fx17[_0xc53c[39]],function(_0x718fx18){return {model:db[_0x718fx18[_0xc53c[40]]],as:_0x718fx18[_0xc53c[41]],attributes:_0x718fx18[_0xc53c[37]],include:_0x718fx18[_0xc53c[39]]?_[_0xc53c[42]](_0x718fx18[_0xc53c[39]],function(_0x718fx19){return {model:db[_0x718fx19[_0xc53c[40]]],as:_0x718fx19[_0xc53c[41]],attributes:_0x718fx19[_0xc53c[37]]}}):[]}}):[]}}):[]):[]})[_0xc53c[31]](function(_0x718fx15){logger[_0xc53c[24]](_0xc53c[45],_0x718fx11);logger[_0xc53c[27]](_0xc53c[45],_0x718fx11,JSON[_0xc53c[26]](_0x718fx15));_0x718fx12(_0x718fx15)})[_0xc53c[22]](function(_0x718fx14){logger[_0xc53c[21]](_0xc53c[45],_0x718fx14[_0xc53c[29]],_0x718fx11);_0x718fx13(_0x718fx16[_0xc53c[21]](500,_0x718fx14[_0xc53c[29]]))})})}
\ No newline at end of file
+var _0xbccc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x53\x68\x6F\x77\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x66\x69\x6E\x64"];_0xbccc[0];var _=require(_0xbccc[1]);var util=require(_0xbccc[2]);var moment=require(_0xbccc[3]);var BPromise=require(_0xbccc[4]);var rs=require(_0xbccc[5]);var fs=require(_0xbccc[6]);var db=require(_0xbccc[8])[_0xbccc[7]];var utils=require(_0xbccc[9]);var logger=require(_0xbccc[11])(_0xbccc[10]);var config=require(_0xbccc[12]);var jayson=require(_0xbccc[13]);var client=jayson[_0xbccc[15]][_0xbccc[14]]({port:9002});var socket=require(_0xbccc[17])({host:_0xbccc[16],port:6379});require(_0xbccc[19])[_0xbccc[18]](socket);function respondWithRpcPromise(_0xa6bcxf,_0xa6bcx10,_0xa6bcx11){return  new BPromise(function(_0xa6bcx12,_0xa6bcx13){return client[_0xbccc[32]](_0xa6bcxf,_0xa6bcx11)[_0xbccc[31]](function(_0xa6bcx15){logger[_0xbccc[24]](_0xbccc[20],_0xa6bcx10,_0xbccc[23]);logger[_0xbccc[27]](_0xbccc[25],_0xa6bcx10,_0xbccc[23],JSON[_0xbccc[26]](_0xa6bcx15));if(_0xa6bcx15[_0xbccc[21]]){if(_0xa6bcx15[_0xbccc[21]][_0xbccc[28]]=== 500){logger[_0xbccc[21]](_0xbccc[20],_0xa6bcx10,_0xa6bcx15[_0xbccc[21]][_0xbccc[29]]);return _0xa6bcx13(_0xa6bcx15[_0xbccc[21]][_0xbccc[29]])};logger[_0xbccc[21]](_0xbccc[20],_0xa6bcx10,_0xa6bcx15[_0xbccc[21]][_0xbccc[29]]);return _0xa6bcx12(_0xa6bcx15[_0xbccc[21]][_0xbccc[29]])}else {logger[_0xbccc[24]](_0xbccc[20],_0xa6bcx10,_0xbccc[23]);_0xa6bcx12(_0xa6bcx15[_0xbccc[30]][_0xbccc[29]])}})[_0xbccc[22]](function(_0xa6bcx14){logger[_0xbccc[21]](_0xbccc[20],_0xa6bcx10,_0xa6bcx14);_0xa6bcx13(_0xa6bcx14)})})}exports[_0xbccc[33]]= function(_0xa6bcx11){var _0xa6bcx16=this;return  new Promise(function(_0xa6bcx12,_0xa6bcx13){return db[_0xbccc[44]][_0xbccc[43]]({raw:_0xa6bcx11[_0xbccc[34]]?(_0xa6bcx11[_0xbccc[34]][_0xbccc[35]]=== undefined)?true:false:true,where:_0xa6bcx11[_0xbccc[34]]?_0xa6bcx11[_0xbccc[34]][_0xbccc[36]]|| null:null,attributes:_0xa6bcx11[_0xbccc[34]]?_0xa6bcx11[_0xbccc[34]][_0xbccc[37]]|| null:null,limit:_0xa6bcx11[_0xbccc[34]]?_0xa6bcx11[_0xbccc[34]][_0xbccc[38]]|| null:null,include:_0xa6bcx11[_0xbccc[34]]?(_0xa6bcx11[_0xbccc[34]][_0xbccc[39]]?_[_0xbccc[42]](_0xa6bcx11[_0xbccc[34]][_0xbccc[39]],function(_0xa6bcx17){return {model:db[_0xa6bcx17[_0xbccc[40]]],as:_0xa6bcx17[_0xbccc[41]],attributes:_0xa6bcx17[_0xbccc[37]],include:_0xa6bcx17[_0xbccc[39]]?_[_0xbccc[42]](_0xa6bcx17[_0xbccc[39]],function(_0xa6bcx18){return {model:db[_0xa6bcx18[_0xbccc[40]]],as:_0xa6bcx18[_0xbccc[41]],attributes:_0xa6bcx18[_0xbccc[37]],include:_0xa6bcx18[_0xbccc[39]]?_[_0xbccc[42]](_0xa6bcx18[_0xbccc[39]],function(_0xa6bcx19){return {model:db[_0xa6bcx19[_0xbccc[40]]],as:_0xa6bcx19[_0xbccc[41]],attributes:_0xa6bcx19[_0xbccc[37]]}}):[]}}):[]}}):[]):[]})[_0xbccc[31]](function(_0xa6bcx15){logger[_0xbccc[24]](_0xbccc[33],_0xa6bcx11);logger[_0xbccc[27]](_0xbccc[33],_0xa6bcx11,JSON[_0xbccc[26]](_0xa6bcx15));_0xa6bcx12(_0xa6bcx15)})[_0xbccc[22]](function(_0xa6bcx14){logger[_0xbccc[21]](_0xbccc[33],_0xa6bcx14[_0xbccc[29]],_0xa6bcx11);_0xa6bcx13(_0xa6bcx16[_0xbccc[21]](500,_0xa6bcx14[_0xbccc[29]]))})})};exports[_0xbccc[45]]= function(_0xa6bcx11){var _0xa6bcx16=this;return  new Promise(function(_0xa6bcx12,_0xa6bcx13){return db[_0xbccc[44]][_0xbccc[46]]({raw:_0xa6bcx11[_0xbccc[34]]?(_0xa6bcx11[_0xbccc[34]][_0xbccc[35]]=== undefined)?true:false:true,where:_0xa6bcx11[_0xbccc[34]]?_0xa6bcx11[_0xbccc[34]][_0xbccc[36]]|| null:null,attributes:_0xa6bcx11[_0xbccc[34]]?_0xa6bcx11[_0xbccc[34]][_0xbccc[37]]|| null:null,include:_0xa6bcx11[_0xbccc[34]]?(_0xa6bcx11[_0xbccc[34]][_0xbccc[39]]?_[_0xbccc[42]](_0xa6bcx11[_0xbccc[34]][_0xbccc[39]],function(_0xa6bcx17){return {model:db[_0xa6bcx17[_0xbccc[40]]],as:_0xa6bcx17[_0xbccc[41]],attributes:_0xa6bcx17[_0xbccc[37]],include:_0xa6bcx17[_0xbccc[39]]?_[_0xbccc[42]](_0xa6bcx17[_0xbccc[39]],function(_0xa6bcx18){return {model:db[_0xa6bcx18[_0xbccc[40]]],as:_0xa6bcx18[_0xbccc[41]],attributes:_0xa6bcx18[_0xbccc[37]],include:_0xa6bcx18[_0xbccc[39]]?_[_0xbccc[42]](_0xa6bcx18[_0xbccc[39]],function(_0xa6bcx19){return {model:db[_0xa6bcx19[_0xbccc[40]]],as:_0xa6bcx19[_0xbccc[41]],attributes:_0xa6bcx19[_0xbccc[37]]}}):[]}}):[]}}):[]):[]})[_0xbccc[31]](function(_0xa6bcx15){logger[_0xbccc[24]](_0xbccc[45],_0xa6bcx11);logger[_0xbccc[27]](_0xbccc[45],_0xa6bcx11,JSON[_0xbccc[26]](_0xa6bcx15));_0xa6bcx12(_0xa6bcx15)})[_0xbccc[22]](function(_0xa6bcx14){logger[_0xbccc[21]](_0xbccc[45],_0xa6bcx14[_0xbccc[29]],_0xa6bcx11);_0xa6bcx13(_0xa6bcx16[_0xbccc[21]](500,_0xa6bcx14[_0xbccc[29]]))})})}
\ No newline at end of file
index 91472dc..4d6831e 100644 (file)
@@ -1 +1 @@
-var _0xa262=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x51\x75\x65\x75\x65\x3A","\x6F\x6E"];_0xa262[0];var ChatQueueEvents=require(_0xa262[1]);var events=[_0xa262[2],_0xa262[3],_0xa262[4]];function createListener(_0xba29x4,_0xba29x5){return function(_0xba29x6){_0xba29x5[_0xa262[5]](_0xba29x4,_0xba29x6)}}function removeListener(_0xba29x4,_0xba29x8){return function(){ChatQueueEvents[_0xa262[6]](_0xba29x4,_0xba29x8)}}exports[_0xa262[7]]= function(_0xba29x5){for(var _0xba29x9=0,_0xba29xa=events[_0xa262[8]];_0xba29x9< _0xba29xa;_0xba29x9++){var _0xba29x4=events[_0xba29x9];var _0xba29x8=createListener(_0xa262[9]+ _0xba29x4,_0xba29x5);ChatQueueEvents[_0xa262[10]](_0xba29x4,_0xba29x8)}}
\ No newline at end of file
+var _0x5156=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x51\x75\x65\x75\x65\x3A","\x6F\x6E"];_0x5156[0];var ChatQueueEvents=require(_0x5156[1]);var events=[_0x5156[2],_0x5156[3],_0x5156[4]];function createListener(_0x2e8fx4,_0x2e8fx5){return function(_0x2e8fx6){_0x2e8fx5[_0x5156[5]](_0x2e8fx4,_0x2e8fx6)}}function removeListener(_0x2e8fx4,_0x2e8fx8){return function(){ChatQueueEvents[_0x5156[6]](_0x2e8fx4,_0x2e8fx8)}}exports[_0x5156[7]]= function(_0x2e8fx5){for(var _0x2e8fx9=0,_0x2e8fxa=events[_0x5156[8]];_0x2e8fx9< _0x2e8fxa;_0x2e8fx9++){var _0x2e8fx4=events[_0x2e8fx9];var _0x2e8fx8=createListener(_0x5156[9]+ _0x2e8fx4,_0x2e8fx5);ChatQueueEvents[_0x5156[10]](_0x2e8fx4,_0x2e8fx8)}}
\ No newline at end of file
index 3cb8e3c..b86d157 100644 (file)
@@ -1 +1 @@
-var _0x3ba1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6D\x65\x6D\x62\x65\x72\x73","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x74\x65\x61\x6D\x73","\x67\x65\x74\x54\x65\x61\x6D\x73","\x2F\x3A\x69\x64\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x54\x65\x61\x6D\x73","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x3ba1[0];var multer=require(_0x3ba1[1]);var util=require(_0x3ba1[2]);var path=require(_0x3ba1[3]);var express=require(_0x3ba1[4]);var router=express.Router();var auth=require(_0x3ba1[5]);var interaction=require(_0x3ba1[6]);var config=require(_0x3ba1[7]);var controller=require(_0x3ba1[8]);router[_0x3ba1[12]](_0x3ba1[9],auth[_0x3ba1[10]](),controller[_0x3ba1[11]]);router[_0x3ba1[12]](_0x3ba1[13],auth[_0x3ba1[10]](),controller[_0x3ba1[14]]);router[_0x3ba1[12]](_0x3ba1[15],auth[_0x3ba1[10]](),controller[_0x3ba1[16]]);router[_0x3ba1[12]](_0x3ba1[17],auth[_0x3ba1[10]](),controller[_0x3ba1[18]]);router[_0x3ba1[12]](_0x3ba1[19],auth[_0x3ba1[10]](),controller[_0x3ba1[20]]);router[_0x3ba1[12]](_0x3ba1[21],auth[_0x3ba1[10]](),controller[_0x3ba1[22]]);router[_0x3ba1[24]](_0x3ba1[9],auth[_0x3ba1[10]](),controller[_0x3ba1[23]]);router[_0x3ba1[24]](_0x3ba1[19],auth[_0x3ba1[10]](),controller[_0x3ba1[25]]);router[_0x3ba1[24]](_0x3ba1[21],auth[_0x3ba1[10]](),controller[_0x3ba1[26]]);router[_0x3ba1[28]](_0x3ba1[15],auth[_0x3ba1[10]](),controller[_0x3ba1[27]]);router[_0x3ba1[30]](_0x3ba1[15],auth[_0x3ba1[10]](),controller[_0x3ba1[29]]);router[_0x3ba1[30]](_0x3ba1[19],auth[_0x3ba1[10]](),controller[_0x3ba1[31]]);router[_0x3ba1[30]](_0x3ba1[21],auth[_0x3ba1[10]](),controller[_0x3ba1[32]]);module[_0x3ba1[33]]= router
\ No newline at end of file
+var _0x42a1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6D\x65\x6D\x62\x65\x72\x73","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x74\x65\x61\x6D\x73","\x67\x65\x74\x54\x65\x61\x6D\x73","\x2F\x3A\x69\x64\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x54\x65\x61\x6D\x73","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x42a1[0];var multer=require(_0x42a1[1]);var util=require(_0x42a1[2]);var path=require(_0x42a1[3]);var express=require(_0x42a1[4]);var router=express.Router();var auth=require(_0x42a1[5]);var interaction=require(_0x42a1[6]);var config=require(_0x42a1[7]);var controller=require(_0x42a1[8]);router[_0x42a1[12]](_0x42a1[9],auth[_0x42a1[10]](),controller[_0x42a1[11]]);router[_0x42a1[12]](_0x42a1[13],auth[_0x42a1[10]](),controller[_0x42a1[14]]);router[_0x42a1[12]](_0x42a1[15],auth[_0x42a1[10]](),controller[_0x42a1[16]]);router[_0x42a1[12]](_0x42a1[17],auth[_0x42a1[10]](),controller[_0x42a1[18]]);router[_0x42a1[12]](_0x42a1[19],auth[_0x42a1[10]](),controller[_0x42a1[20]]);router[_0x42a1[12]](_0x42a1[21],auth[_0x42a1[10]](),controller[_0x42a1[22]]);router[_0x42a1[24]](_0x42a1[9],auth[_0x42a1[10]](),controller[_0x42a1[23]]);router[_0x42a1[24]](_0x42a1[19],auth[_0x42a1[10]](),controller[_0x42a1[25]]);router[_0x42a1[24]](_0x42a1[21],auth[_0x42a1[10]](),controller[_0x42a1[26]]);router[_0x42a1[28]](_0x42a1[15],auth[_0x42a1[10]](),controller[_0x42a1[27]]);router[_0x42a1[30]](_0x42a1[15],auth[_0x42a1[10]](),controller[_0x42a1[29]]);router[_0x42a1[30]](_0x42a1[19],auth[_0x42a1[10]](),controller[_0x42a1[31]]);router[_0x42a1[30]](_0x42a1[21],auth[_0x42a1[10]](),controller[_0x42a1[32]]);module[_0x42a1[33]]= router
\ No newline at end of file
index c25fc1c..4e6989b 100644 (file)
@@ -1 +1 @@
-var _0xc8bc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45"];_0xc8bc[0];var moment=require(_0xc8bc[1]);var Sequelize=require(_0xc8bc[2]);module[_0xc8bc[3]]= {uniqueid:{type:Sequelize[_0xc8bc[4]],allowNull:false},from:{type:Sequelize[_0xc8bc[4]]},joinAt:{type:Sequelize[_0xc8bc[5]]},leaveAt:{type:Sequelize[_0xc8bc[5]]},acceptAt:{type:Sequelize[_0xc8bc[5]]},exitAt:{type:Sequelize[_0xc8bc[5]]},reason:{type:Sequelize[_0xc8bc[4]]}}
\ No newline at end of file
+var _0xb104=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45"];_0xb104[0];var moment=require(_0xb104[1]);var Sequelize=require(_0xb104[2]);module[_0xb104[3]]= {uniqueid:{type:Sequelize[_0xb104[4]],allowNull:false},from:{type:Sequelize[_0xb104[4]]},joinAt:{type:Sequelize[_0xb104[5]]},leaveAt:{type:Sequelize[_0xb104[5]]},acceptAt:{type:Sequelize[_0xb104[5]]},exitAt:{type:Sequelize[_0xb104[5]]},reason:{type:Sequelize[_0xb104[4]]}}
\ No newline at end of file
index 57410c6..829bbc1 100644 (file)
@@ -1 +1 @@
-var _0x6634=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x6634[0];var jsonpatch=require(_0x6634[1]);var rp=require(_0x6634[2]);var moment=require(_0x6634[3]);var BPromise=require(_0x6634[4]);var Mustache=require(_0x6634[5]);var util=require(_0x6634[6]);var path=require(_0x6634[7]);var sox=require(_0x6634[8]);var csv=require(_0x6634[9]);var ejs=require(_0x6634[10]);var fs=require(_0x6634[11]);var _=require(_0x6634[12]);var squel=require(_0x6634[13]);var crypto=require(_0x6634[14]);var jsforce=require(_0x6634[15]);var deskjs=require(_0x6634[16]);var toCsv=require(_0x6634[9]);var querystring=require(_0x6634[17]);var Papa=require(_0x6634[18]);var qs=require(_0x6634[19]);var logger=require(_0x6634[21])(_0x6634[20]);var utils=require(_0x6634[22]);var config=require(_0x6634[23]);var db=require(_0x6634[25])[_0x6634[24]];function respondWithStatusCode(_0xf044x1a,_0xf044x1b){_0xf044x1b= _0xf044x1b|| 204;return function(_0xf044x1c){if(_0xf044x1c){return _0xf044x1a[_0x6634[26]](_0xf044x1b)};return _0xf044x1a[_0x6634[28]](_0xf044x1b)[_0x6634[27]]()}}function respondWithResult(_0xf044x1a,_0xf044x1b){_0xf044x1b= _0xf044x1b|| 200;return function(_0xf044x1c){if(_0xf044x1c){return _0xf044x1a[_0x6634[28]](_0xf044x1b)[_0x6634[29]](_0xf044x1c)}}}function respondWithFilteredResult(_0xf044x1a,_0xf044x1f){return function(_0xf044x1c){if(_0xf044x1c){var _0xf044x20=_0xf044x1c[_0x6634[30]],_0xf044x21=_0xf044x1f[_0x6634[31]],_0xf044x22=_0xf044x1f[_0x6634[31]]+ _0xf044x1f[_0x6634[32]],_0xf044x1b;if(_0xf044x22>= _0xf044x20){_0xf044x22= _0xf044x20;_0xf044x1b= 200}else {_0xf044x1b= 206};_0xf044x1a[_0x6634[28]](_0xf044x1b);return _0xf044x1a[_0x6634[36]](_0x6634[33],_0xf044x21+ _0x6634[34]+ _0xf044x22+ _0x6634[35]+ _0xf044x20)[_0x6634[29]](_0xf044x1c)};return null}}function patchUpdates(_0xf044x24){return function(_0xf044x1c){try{jsonpatch[_0x6634[37]](_0xf044x1c,_0xf044x24,true)}catch(err){return BPromise[_0x6634[38]](err)};return _0xf044x1c[_0x6634[39]]()}}function saveUpdates(_0xf044x26,_0xf044x1b){return function(_0xf044x1c){if(_0xf044x1c){return _0xf044x1c[_0x6634[41]](_0xf044x26)[_0x6634[40]](function(_0xf044x27){return _0xf044x27})};return null}}function removeEntity(_0xf044x1a,_0xf044x1b){return function(_0xf044x1c){if(_0xf044x1c){return _0xf044x1c[_0x6634[42]]()[_0x6634[40]](function(){_0xf044x1a[_0x6634[28]](204)[_0x6634[27]]()})}}}function handleEntityNotFound(_0xf044x1a,_0xf044x1b){return function(_0xf044x1c){if(!_0xf044x1c){_0xf044x1a[_0x6634[26]](404)};return _0xf044x1c}}function handleError(_0xf044x1a,_0xf044x1b){_0xf044x1b= _0xf044x1b|| 500;return function(_0xf044x2b){logger[_0x6634[44]](_0xf044x2b[_0x6634[43]]);if(_0xf044x2b[_0x6634[45]]){delete _0xf044x2b[_0x6634[45]]};_0xf044x1a[_0x6634[28]](_0xf044x1b)[_0x6634[46]](_0xf044x2b)}}exports[_0x6634[47]]= function(_0xf044x2c,_0xf044x1a){var _0xf044x1f={},_0xf044x2d={},_0xf044x2e={count:0,rows:[]};_0xf044x2d[_0x6634[48]]= _[_0x6634[51]](db[_0x6634[50]][_0x6634[49]]);var _0xf044x2f={dateStart:_0xf044x2c[_0x6634[53]][_0x6634[52]],dateEnd:_0xf044x2c[_0x6634[53]][_0x6634[54]]};delete _0xf044x2c[_0x6634[53]][_0x6634[52]];delete _0xf044x2c[_0x6634[53]][_0x6634[54]];_0xf044x2d[_0x6634[53]]= _[_0x6634[51]](_0xf044x2c[_0x6634[53]]);_0xf044x2d[_0x6634[55]]= _[_0x6634[56]](_0xf044x2d[_0x6634[48]],_0xf044x2d[_0x6634[53]]);_0xf044x1f[_0x6634[57]]= _[_0x6634[56]](_0xf044x2d[_0x6634[48]],qs[_0x6634[58]](_0xf044x2c[_0x6634[53]][_0x6634[58]]));_0xf044x1f[_0x6634[57]]= (_0xf044x1f[_0x6634[57]][_0x6634[59]])?_0xf044x1f[_0x6634[57]]:_0xf044x2d[_0x6634[48]];if(!_0xf044x2c[_0x6634[53]][_0x6634[61]](_0x6634[60])){_0xf044x1f[_0x6634[32]]= qs[_0x6634[32]](_0xf044x2c[_0x6634[53]][_0x6634[32]]);_0xf044x1f[_0x6634[31]]= qs[_0x6634[31]](_0xf044x2c[_0x6634[53]][_0x6634[31]])};_0xf044x1f[_0x6634[62]]= qs[_0x6634[63]](_0xf044x2c[_0x6634[53]][_0x6634[63]]);_0xf044x1f[_0x6634[64]]= qs[_0x6634[55]](_[_0x6634[65]](_0xf044x2c[_0x6634[53]],_0xf044x2d[_0x6634[55]]));if(_0xf044x2f[_0x6634[52]]){if(_0xf044x2f[_0x6634[54]]){_0xf044x2f[_0x6634[54]]= moment(_0xf044x2f[_0x6634[54]])[_0x6634[67]](1,_0x6634[66])}else {_0xf044x2f[_0x6634[54]]= moment(_0xf044x2f[_0x6634[52]])[_0x6634[67]](1,_0x6634[66])};_[_0x6634[68]](_0xf044x1f[_0x6634[64]],{createdAt:{$gte:_0xf044x2f[_0x6634[52]],$lte:_0xf044x2f[_0x6634[54]]}})};if(_0xf044x2c[_0x6634[53]][_0x6634[69]]){_0xf044x1f[_0x6634[64]]= _[_0x6634[68]](_0xf044x1f[_0x6634[64]],{$or:_[_0x6634[71]](_0xf044x1f[_0x6634[57]],function(_0xf044x30){var _0xf044x2e={};_0xf044x2e[_0xf044x30]= {$like:_0x6634[70]+ _0xf044x2c[_0x6634[53]][_0x6634[69]]+ _0x6634[70]};return _0xf044x2e})})};_0xf044x1f= _[_0x6634[68]]({},_0xf044x1f,_0xf044x2c[_0x6634[72]]);var _0xf044x31={where:_0xf044x1f[_0x6634[64]]};return db[_0x6634[50]][_0x6634[30]](_0xf044x31)[_0x6634[40]](function(_0xf044x20){_0xf044x2e[_0x6634[30]]= _0xf044x20;if(_0xf044x2c[_0x6634[53]][_0x6634[75]]){_0xf044x1f[_0x6634[76]]= [{all:true}]};return db[_0x6634[50]][_0x6634[77]](_0xf044x1f)})[_0x6634[40]](function(_0xf044x32){_0xf044x2e[_0x6634[74]]= _0xf044x32;return _0xf044x2e})[_0x6634[40]](respondWithFilteredResult(_0xf044x1a,_0xf044x1f))[_0x6634[73]](handleError(_0xf044x1a,null))};exports[_0x6634[78]]= function(_0xf044x2c,_0xf044x1a){var _0xf044x1f={raw:true,where:{id:_0xf044x2c[_0x6634[80]][_0x6634[79]]}},_0xf044x2d={};_0xf044x2d[_0x6634[48]]= _[_0x6634[51]](db[_0x6634[50]][_0x6634[49]]);_0xf044x2d[_0x6634[53]]= _[_0x6634[51]](_0xf044x2c[_0x6634[53]]);_0xf044x2d[_0x6634[55]]= _[_0x6634[56]](_0xf044x2d[_0x6634[48]],_0xf044x2d[_0x6634[53]]);_0xf044x1f[_0x6634[57]]= _[_0x6634[56]](_0xf044x2d[_0x6634[48]],qs[_0x6634[58]](_0xf044x2c[_0x6634[53]][_0x6634[58]]));_0xf044x1f[_0x6634[57]]= (_0xf044x1f[_0x6634[57]][_0x6634[59]])?_0xf044x1f[_0x6634[57]]:_0xf044x2d[_0x6634[48]];if(_0xf044x2c[_0x6634[53]][_0x6634[75]]){_0xf044x1f[_0x6634[76]]= [{all:true}]};_0xf044x1f= _[_0x6634[68]]({},_0xf044x1f,_0xf044x2c[_0x6634[72]]);return db[_0x6634[50]][_0x6634[81]](_0xf044x1f)[_0x6634[40]](handleEntityNotFound(_0xf044x1a,null))[_0x6634[40]](respondWithResult(_0xf044x1a,null))[_0x6634[73]](handleError(_0xf044x1a,null))};exports[_0x6634[82]]= function(_0xf044x2c,_0xf044x1a){return db[_0x6634[50]][_0x6634[82]](_0xf044x2c[_0x6634[83]],{})[_0x6634[40]](respondWithResult(_0xf044x1a,201))[_0x6634[73]](handleError(_0xf044x1a,null))};exports[_0x6634[41]]= function(_0xf044x2c,_0xf044x1a){if(_0xf044x2c[_0x6634[83]][_0x6634[79]]){delete _0xf044x2c[_0x6634[83]][_0x6634[79]]};return db[_0x6634[50]][_0x6634[81]]({where:{id:_0xf044x2c[_0x6634[80]][_0x6634[79]]}})[_0x6634[40]](handleEntityNotFound(_0xf044x1a,null))[_0x6634[40]](saveUpdates(_0xf044x2c[_0x6634[83]],null))[_0x6634[40]](respondWithResult(_0xf044x1a,null))[_0x6634[73]](handleError(_0xf044x1a,null))};exports[_0x6634[42]]= function(_0xf044x2c,_0xf044x1a){return db[_0x6634[50]][_0x6634[81]]({where:{id:_0xf044x2c[_0x6634[80]][_0x6634[79]]}})[_0x6634[40]](handleEntityNotFound(_0xf044x1a,null))[_0x6634[40]](removeEntity(_0xf044x1a,null))[_0x6634[73]](handleError(_0xf044x1a,null))};exports[_0x6634[84]]= function(_0xf044x2c,_0xf044x1a){return db[_0x6634[50]][_0x6634[84]]()[_0x6634[40]](respondWithResult(_0xf044x1a,null))[_0x6634[73]](handleError(_0xf044x1a,null))}
\ No newline at end of file
+var _0xc5d2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xc5d2[0];var jsonpatch=require(_0xc5d2[1]);var rp=require(_0xc5d2[2]);var moment=require(_0xc5d2[3]);var BPromise=require(_0xc5d2[4]);var Mustache=require(_0xc5d2[5]);var util=require(_0xc5d2[6]);var path=require(_0xc5d2[7]);var sox=require(_0xc5d2[8]);var csv=require(_0xc5d2[9]);var ejs=require(_0xc5d2[10]);var fs=require(_0xc5d2[11]);var _=require(_0xc5d2[12]);var squel=require(_0xc5d2[13]);var crypto=require(_0xc5d2[14]);var jsforce=require(_0xc5d2[15]);var deskjs=require(_0xc5d2[16]);var toCsv=require(_0xc5d2[9]);var querystring=require(_0xc5d2[17]);var Papa=require(_0xc5d2[18]);var qs=require(_0xc5d2[19]);var logger=require(_0xc5d2[21])(_0xc5d2[20]);var utils=require(_0xc5d2[22]);var config=require(_0xc5d2[23]);var db=require(_0xc5d2[25])[_0xc5d2[24]];function respondWithStatusCode(_0x6accx1a,_0x6accx1b){_0x6accx1b= _0x6accx1b|| 204;return function(_0x6accx1c){if(_0x6accx1c){return _0x6accx1a[_0xc5d2[26]](_0x6accx1b)};return _0x6accx1a[_0xc5d2[28]](_0x6accx1b)[_0xc5d2[27]]()}}function respondWithResult(_0x6accx1a,_0x6accx1b){_0x6accx1b= _0x6accx1b|| 200;return function(_0x6accx1c){if(_0x6accx1c){return _0x6accx1a[_0xc5d2[28]](_0x6accx1b)[_0xc5d2[29]](_0x6accx1c)}}}function respondWithFilteredResult(_0x6accx1a,_0x6accx1f){return function(_0x6accx1c){if(_0x6accx1c){var _0x6accx20=_0x6accx1c[_0xc5d2[30]],_0x6accx21=_0x6accx1f[_0xc5d2[31]],_0x6accx22=_0x6accx1f[_0xc5d2[31]]+ _0x6accx1f[_0xc5d2[32]],_0x6accx1b;if(_0x6accx22>= _0x6accx20){_0x6accx22= _0x6accx20;_0x6accx1b= 200}else {_0x6accx1b= 206};_0x6accx1a[_0xc5d2[28]](_0x6accx1b);return _0x6accx1a[_0xc5d2[36]](_0xc5d2[33],_0x6accx21+ _0xc5d2[34]+ _0x6accx22+ _0xc5d2[35]+ _0x6accx20)[_0xc5d2[29]](_0x6accx1c)};return null}}function patchUpdates(_0x6accx24){return function(_0x6accx1c){try{jsonpatch[_0xc5d2[37]](_0x6accx1c,_0x6accx24,true)}catch(err){return BPromise[_0xc5d2[38]](err)};return _0x6accx1c[_0xc5d2[39]]()}}function saveUpdates(_0x6accx26,_0x6accx1b){return function(_0x6accx1c){if(_0x6accx1c){return _0x6accx1c[_0xc5d2[41]](_0x6accx26)[_0xc5d2[40]](function(_0x6accx27){return _0x6accx27})};return null}}function removeEntity(_0x6accx1a,_0x6accx1b){return function(_0x6accx1c){if(_0x6accx1c){return _0x6accx1c[_0xc5d2[42]]()[_0xc5d2[40]](function(){_0x6accx1a[_0xc5d2[28]](204)[_0xc5d2[27]]()})}}}function handleEntityNotFound(_0x6accx1a,_0x6accx1b){return function(_0x6accx1c){if(!_0x6accx1c){_0x6accx1a[_0xc5d2[26]](404)};return _0x6accx1c}}function handleError(_0x6accx1a,_0x6accx1b){_0x6accx1b= _0x6accx1b|| 500;return function(_0x6accx2b){logger[_0xc5d2[44]](_0x6accx2b[_0xc5d2[43]]);if(_0x6accx2b[_0xc5d2[45]]){delete _0x6accx2b[_0xc5d2[45]]};_0x6accx1a[_0xc5d2[28]](_0x6accx1b)[_0xc5d2[46]](_0x6accx2b)}}exports[_0xc5d2[47]]= function(_0x6accx2c,_0x6accx1a){var _0x6accx1f={},_0x6accx2d={},_0x6accx2e={count:0,rows:[]};_0x6accx2d[_0xc5d2[48]]= _[_0xc5d2[51]](db[_0xc5d2[50]][_0xc5d2[49]]);var _0x6accx2f={dateStart:_0x6accx2c[_0xc5d2[53]][_0xc5d2[52]],dateEnd:_0x6accx2c[_0xc5d2[53]][_0xc5d2[54]]};delete _0x6accx2c[_0xc5d2[53]][_0xc5d2[52]];delete _0x6accx2c[_0xc5d2[53]][_0xc5d2[54]];_0x6accx2d[_0xc5d2[53]]= _[_0xc5d2[51]](_0x6accx2c[_0xc5d2[53]]);_0x6accx2d[_0xc5d2[55]]= _[_0xc5d2[56]](_0x6accx2d[_0xc5d2[48]],_0x6accx2d[_0xc5d2[53]]);_0x6accx1f[_0xc5d2[57]]= _[_0xc5d2[56]](_0x6accx2d[_0xc5d2[48]],qs[_0xc5d2[58]](_0x6accx2c[_0xc5d2[53]][_0xc5d2[58]]));_0x6accx1f[_0xc5d2[57]]= (_0x6accx1f[_0xc5d2[57]][_0xc5d2[59]])?_0x6accx1f[_0xc5d2[57]]:_0x6accx2d[_0xc5d2[48]];if(!_0x6accx2c[_0xc5d2[53]][_0xc5d2[61]](_0xc5d2[60])){_0x6accx1f[_0xc5d2[32]]= qs[_0xc5d2[32]](_0x6accx2c[_0xc5d2[53]][_0xc5d2[32]]);_0x6accx1f[_0xc5d2[31]]= qs[_0xc5d2[31]](_0x6accx2c[_0xc5d2[53]][_0xc5d2[31]])};_0x6accx1f[_0xc5d2[62]]= qs[_0xc5d2[63]](_0x6accx2c[_0xc5d2[53]][_0xc5d2[63]]);_0x6accx1f[_0xc5d2[64]]= qs[_0xc5d2[55]](_[_0xc5d2[65]](_0x6accx2c[_0xc5d2[53]],_0x6accx2d[_0xc5d2[55]]));if(_0x6accx2f[_0xc5d2[52]]){if(_0x6accx2f[_0xc5d2[54]]){_0x6accx2f[_0xc5d2[54]]= moment(_0x6accx2f[_0xc5d2[54]])[_0xc5d2[67]](1,_0xc5d2[66])}else {_0x6accx2f[_0xc5d2[54]]= moment(_0x6accx2f[_0xc5d2[52]])[_0xc5d2[67]](1,_0xc5d2[66])};_[_0xc5d2[68]](_0x6accx1f[_0xc5d2[64]],{createdAt:{$gte:_0x6accx2f[_0xc5d2[52]],$lte:_0x6accx2f[_0xc5d2[54]]}})};if(_0x6accx2c[_0xc5d2[53]][_0xc5d2[69]]){_0x6accx1f[_0xc5d2[64]]= _[_0xc5d2[68]](_0x6accx1f[_0xc5d2[64]],{$or:_[_0xc5d2[71]](_0x6accx1f[_0xc5d2[57]],function(_0x6accx30){var _0x6accx2e={};_0x6accx2e[_0x6accx30]= {$like:_0xc5d2[70]+ _0x6accx2c[_0xc5d2[53]][_0xc5d2[69]]+ _0xc5d2[70]};return _0x6accx2e})})};_0x6accx1f= _[_0xc5d2[68]]({},_0x6accx1f,_0x6accx2c[_0xc5d2[72]]);var _0x6accx31={where:_0x6accx1f[_0xc5d2[64]]};return db[_0xc5d2[50]][_0xc5d2[30]](_0x6accx31)[_0xc5d2[40]](function(_0x6accx20){_0x6accx2e[_0xc5d2[30]]= _0x6accx20;if(_0x6accx2c[_0xc5d2[53]][_0xc5d2[75]]){_0x6accx1f[_0xc5d2[76]]= [{all:true}]};return db[_0xc5d2[50]][_0xc5d2[77]](_0x6accx1f)})[_0xc5d2[40]](function(_0x6accx32){_0x6accx2e[_0xc5d2[74]]= _0x6accx32;return _0x6accx2e})[_0xc5d2[40]](respondWithFilteredResult(_0x6accx1a,_0x6accx1f))[_0xc5d2[73]](handleError(_0x6accx1a,null))};exports[_0xc5d2[78]]= function(_0x6accx2c,_0x6accx1a){var _0x6accx1f={raw:true,where:{id:_0x6accx2c[_0xc5d2[80]][_0xc5d2[79]]}},_0x6accx2d={};_0x6accx2d[_0xc5d2[48]]= _[_0xc5d2[51]](db[_0xc5d2[50]][_0xc5d2[49]]);_0x6accx2d[_0xc5d2[53]]= _[_0xc5d2[51]](_0x6accx2c[_0xc5d2[53]]);_0x6accx2d[_0xc5d2[55]]= _[_0xc5d2[56]](_0x6accx2d[_0xc5d2[48]],_0x6accx2d[_0xc5d2[53]]);_0x6accx1f[_0xc5d2[57]]= _[_0xc5d2[56]](_0x6accx2d[_0xc5d2[48]],qs[_0xc5d2[58]](_0x6accx2c[_0xc5d2[53]][_0xc5d2[58]]));_0x6accx1f[_0xc5d2[57]]= (_0x6accx1f[_0xc5d2[57]][_0xc5d2[59]])?_0x6accx1f[_0xc5d2[57]]:_0x6accx2d[_0xc5d2[48]];if(_0x6accx2c[_0xc5d2[53]][_0xc5d2[75]]){_0x6accx1f[_0xc5d2[76]]= [{all:true}]};_0x6accx1f= _[_0xc5d2[68]]({},_0x6accx1f,_0x6accx2c[_0xc5d2[72]]);return db[_0xc5d2[50]][_0xc5d2[81]](_0x6accx1f)[_0xc5d2[40]](handleEntityNotFound(_0x6accx1a,null))[_0xc5d2[40]](respondWithResult(_0x6accx1a,null))[_0xc5d2[73]](handleError(_0x6accx1a,null))};exports[_0xc5d2[82]]= function(_0x6accx2c,_0x6accx1a){return db[_0xc5d2[50]][_0xc5d2[82]](_0x6accx2c[_0xc5d2[83]],{})[_0xc5d2[40]](respondWithResult(_0x6accx1a,201))[_0xc5d2[73]](handleError(_0x6accx1a,null))};exports[_0xc5d2[41]]= function(_0x6accx2c,_0x6accx1a){if(_0x6accx2c[_0xc5d2[83]][_0xc5d2[79]]){delete _0x6accx2c[_0xc5d2[83]][_0xc5d2[79]]};return db[_0xc5d2[50]][_0xc5d2[81]]({where:{id:_0x6accx2c[_0xc5d2[80]][_0xc5d2[79]]}})[_0xc5d2[40]](handleEntityNotFound(_0x6accx1a,null))[_0xc5d2[40]](saveUpdates(_0x6accx2c[_0xc5d2[83]],null))[_0xc5d2[40]](respondWithResult(_0x6accx1a,null))[_0xc5d2[73]](handleError(_0x6accx1a,null))};exports[_0xc5d2[42]]= function(_0x6accx2c,_0x6accx1a){return db[_0xc5d2[50]][_0xc5d2[81]]({where:{id:_0x6accx2c[_0xc5d2[80]][_0xc5d2[79]]}})[_0xc5d2[40]](handleEntityNotFound(_0x6accx1a,null))[_0xc5d2[40]](removeEntity(_0x6accx1a,null))[_0xc5d2[73]](handleError(_0x6accx1a,null))};exports[_0xc5d2[84]]= function(_0x6accx2c,_0x6accx1a){return db[_0xc5d2[50]][_0xc5d2[84]]()[_0xc5d2[40]](respondWithResult(_0x6accx1a,null))[_0xc5d2[73]](handleError(_0x6accx1a,null))}
\ No newline at end of file
index 35a28bf..dfaf515 100644 (file)
@@ -1 +1 @@
-var _0x5a26=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0x5a26[0];var _=require(_0x5a26[1]);var util=require(_0x5a26[2]);var logger=require(_0x5a26[4])(_0x5a26[3]);var moment=require(_0x5a26[5]);var BPromise=require(_0x5a26[6]);var rp=require(_0x5a26[7]);var attributes=require(_0x5a26[8]);module[_0x5a26[9]]= function(_0xe07dx8,_0xe07dx9){return _0xe07dx8[_0x5a26[13]](_0x5a26[10],attributes,{tableName:_0x5a26[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x5a26[12],"\x66\x69\x65\x6C\x64\x73":[_0x5a26[12]]}],timestamps:true})}
\ No newline at end of file
+var _0x1804=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0x1804[0];var _=require(_0x1804[1]);var util=require(_0x1804[2]);var logger=require(_0x1804[4])(_0x1804[3]);var moment=require(_0x1804[5]);var BPromise=require(_0x1804[6]);var rp=require(_0x1804[7]);var attributes=require(_0x1804[8]);module[_0x1804[9]]= function(_0x28ecx8,_0x28ecx9){return _0x28ecx8[_0x1804[13]](_0x1804[10],attributes,{tableName:_0x1804[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x1804[12],"\x66\x69\x65\x6C\x64\x73":[_0x1804[12]]}],timestamps:true})}
\ No newline at end of file
index 2b16a17..ed39b2b 100644 (file)
@@ -1 +1 @@
-var _0x9929=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x55\x70\x64\x61\x74\x65\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65"];_0x9929[0];var _=require(_0x9929[1]);var util=require(_0x9929[2]);var moment=require(_0x9929[3]);var BPromise=require(_0x9929[4]);var rs=require(_0x9929[5]);var fs=require(_0x9929[6]);var db=require(_0x9929[8])[_0x9929[7]];var utils=require(_0x9929[9]);var logger=require(_0x9929[11])(_0x9929[10]);var config=require(_0x9929[12]);var jayson=require(_0x9929[13]);var client=jayson[_0x9929[15]][_0x9929[14]]({port:9002});function respondWithRpcPromise(_0xbb6fxe,_0xbb6fxf,_0xbb6fx10){return  new BPromise(function(_0xbb6fx11,_0xbb6fx12){return client[_0x9929[28]](_0xbb6fxe,_0xbb6fx10)[_0x9929[27]](function(_0xbb6fx14){logger[_0x9929[20]](_0x9929[16],_0xbb6fxf,_0x9929[19]);logger[_0x9929[23]](_0x9929[21],_0xbb6fxf,_0x9929[19],JSON[_0x9929[22]](_0xbb6fx14));if(_0xbb6fx14[_0x9929[17]]){if(_0xbb6fx14[_0x9929[17]][_0x9929[24]]=== 500){logger[_0x9929[17]](_0x9929[16],_0xbb6fxf,_0xbb6fx14[_0x9929[17]][_0x9929[25]]);return _0xbb6fx12(_0xbb6fx14[_0x9929[17]][_0x9929[25]])};logger[_0x9929[17]](_0x9929[16],_0xbb6fxf,_0xbb6fx14[_0x9929[17]][_0x9929[25]]);return _0xbb6fx11(_0xbb6fx14[_0x9929[17]][_0x9929[25]])}else {logger[_0x9929[20]](_0x9929[16],_0xbb6fxf,_0x9929[19]);_0xbb6fx11(_0xbb6fx14[_0x9929[26]][_0x9929[25]])}})[_0x9929[18]](function(_0xbb6fx13){logger[_0x9929[17]](_0x9929[16],_0xbb6fxf,_0xbb6fx13);_0xbb6fx12(_0xbb6fx13)})})}exports[_0x9929[29]]= function(_0xbb6fx10){var _0xbb6fx15=this;return  new Promise(function(_0xbb6fx11,_0xbb6fx12){return db[_0x9929[34]][_0x9929[33]](_0xbb6fx10[_0x9929[30]],{raw:_0xbb6fx10[_0x9929[31]]?(_0xbb6fx10[_0x9929[31]][_0x9929[32]]=== undefined)?true:false:true})[_0x9929[27]](function(_0xbb6fx14){logger[_0x9929[20]](_0x9929[29],_0xbb6fx10);logger[_0x9929[23]](_0x9929[29],_0xbb6fx10,JSON[_0x9929[22]](_0xbb6fx14));_0xbb6fx11(_0xbb6fx14)})[_0x9929[18]](function(_0xbb6fx13){logger[_0x9929[17]](_0x9929[29],_0xbb6fx13[_0x9929[25]],_0xbb6fx10);_0xbb6fx12(_0xbb6fx15[_0x9929[17]](500,_0xbb6fx13[_0x9929[25]]))})})};exports[_0x9929[35]]= function(_0xbb6fx10){var _0xbb6fx15=this;return  new Promise(function(_0xbb6fx11,_0xbb6fx12){return db[_0x9929[34]][_0x9929[39]](_0xbb6fx10[_0x9929[30]],{raw:_0xbb6fx10[_0x9929[31]]?(_0xbb6fx10[_0x9929[31]][_0x9929[32]]=== undefined)?true:false:true,individualHooks:true,where:_0xbb6fx10[_0x9929[31]]?_0xbb6fx10[_0x9929[31]][_0x9929[36]]|| null:null,attributes:_0xbb6fx10[_0x9929[31]]?_0xbb6fx10[_0x9929[31]][_0x9929[37]]|| null:null,limit:_0xbb6fx10[_0x9929[31]]?_0xbb6fx10[_0x9929[31]][_0x9929[38]]|| null:null})[_0x9929[27]](function(_0xbb6fx14){logger[_0x9929[20]](_0x9929[35],_0xbb6fx10);logger[_0x9929[23]](_0x9929[35],_0xbb6fx10,JSON[_0x9929[22]](_0xbb6fx14));_0xbb6fx11(_0xbb6fx14)})[_0x9929[18]](function(_0xbb6fx13){logger[_0x9929[17]](_0x9929[35],_0xbb6fx13[_0x9929[25]],_0xbb6fx10);_0xbb6fx12(_0xbb6fx15[_0x9929[17]](500,_0xbb6fx13[_0x9929[25]]))})})}
\ No newline at end of file
+var _0x148a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x55\x70\x64\x61\x74\x65\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65"];_0x148a[0];var _=require(_0x148a[1]);var util=require(_0x148a[2]);var moment=require(_0x148a[3]);var BPromise=require(_0x148a[4]);var rs=require(_0x148a[5]);var fs=require(_0x148a[6]);var db=require(_0x148a[8])[_0x148a[7]];var utils=require(_0x148a[9]);var logger=require(_0x148a[11])(_0x148a[10]);var config=require(_0x148a[12]);var jayson=require(_0x148a[13]);var client=jayson[_0x148a[15]][_0x148a[14]]({port:9002});function respondWithRpcPromise(_0x9464xe,_0x9464xf,_0x9464x10){return  new BPromise(function(_0x9464x11,_0x9464x12){return client[_0x148a[28]](_0x9464xe,_0x9464x10)[_0x148a[27]](function(_0x9464x14){logger[_0x148a[20]](_0x148a[16],_0x9464xf,_0x148a[19]);logger[_0x148a[23]](_0x148a[21],_0x9464xf,_0x148a[19],JSON[_0x148a[22]](_0x9464x14));if(_0x9464x14[_0x148a[17]]){if(_0x9464x14[_0x148a[17]][_0x148a[24]]=== 500){logger[_0x148a[17]](_0x148a[16],_0x9464xf,_0x9464x14[_0x148a[17]][_0x148a[25]]);return _0x9464x12(_0x9464x14[_0x148a[17]][_0x148a[25]])};logger[_0x148a[17]](_0x148a[16],_0x9464xf,_0x9464x14[_0x148a[17]][_0x148a[25]]);return _0x9464x11(_0x9464x14[_0x148a[17]][_0x148a[25]])}else {logger[_0x148a[20]](_0x148a[16],_0x9464xf,_0x148a[19]);_0x9464x11(_0x9464x14[_0x148a[26]][_0x148a[25]])}})[_0x148a[18]](function(_0x9464x13){logger[_0x148a[17]](_0x148a[16],_0x9464xf,_0x9464x13);_0x9464x12(_0x9464x13)})})}exports[_0x148a[29]]= function(_0x9464x10){var _0x9464x15=this;return  new Promise(function(_0x9464x11,_0x9464x12){return db[_0x148a[34]][_0x148a[33]](_0x9464x10[_0x148a[30]],{raw:_0x9464x10[_0x148a[31]]?(_0x9464x10[_0x148a[31]][_0x148a[32]]=== undefined)?true:false:true})[_0x148a[27]](function(_0x9464x14){logger[_0x148a[20]](_0x148a[29],_0x9464x10);logger[_0x148a[23]](_0x148a[29],_0x9464x10,JSON[_0x148a[22]](_0x9464x14));_0x9464x11(_0x9464x14)})[_0x148a[18]](function(_0x9464x13){logger[_0x148a[17]](_0x148a[29],_0x9464x13[_0x148a[25]],_0x9464x10);_0x9464x12(_0x9464x15[_0x148a[17]](500,_0x9464x13[_0x148a[25]]))})})};exports[_0x148a[35]]= function(_0x9464x10){var _0x9464x15=this;return  new Promise(function(_0x9464x11,_0x9464x12){return db[_0x148a[34]][_0x148a[39]](_0x9464x10[_0x148a[30]],{raw:_0x9464x10[_0x148a[31]]?(_0x9464x10[_0x148a[31]][_0x148a[32]]=== undefined)?true:false:true,individualHooks:true,where:_0x9464x10[_0x148a[31]]?_0x9464x10[_0x148a[31]][_0x148a[36]]|| null:null,attributes:_0x9464x10[_0x148a[31]]?_0x9464x10[_0x148a[31]][_0x148a[37]]|| null:null,limit:_0x9464x10[_0x148a[31]]?_0x9464x10[_0x148a[31]][_0x148a[38]]|| null:null})[_0x148a[27]](function(_0x9464x14){logger[_0x148a[20]](_0x148a[35],_0x9464x10);logger[_0x148a[23]](_0x148a[35],_0x9464x10,JSON[_0x148a[22]](_0x9464x14));_0x9464x11(_0x9464x14)})[_0x148a[18]](function(_0x9464x13){logger[_0x148a[17]](_0x148a[35],_0x9464x13[_0x148a[25]],_0x9464x10);_0x9464x12(_0x9464x15[_0x148a[17]](500,_0x9464x13[_0x148a[25]]))})})}
\ No newline at end of file
index c71bf06..ca94549 100644 (file)
@@ -1 +1 @@
-var _0x7bad=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x7bad[0];var multer=require(_0x7bad[1]);var util=require(_0x7bad[2]);var path=require(_0x7bad[3]);var express=require(_0x7bad[4]);var router=express.Router();var auth=require(_0x7bad[5]);var interaction=require(_0x7bad[6]);var config=require(_0x7bad[7]);var controller=require(_0x7bad[8]);router[_0x7bad[12]](_0x7bad[9],auth[_0x7bad[10]](),controller[_0x7bad[11]]);router[_0x7bad[12]](_0x7bad[13],auth[_0x7bad[10]](),controller[_0x7bad[14]]);router[_0x7bad[12]](_0x7bad[15],auth[_0x7bad[10]](),controller[_0x7bad[16]]);router[_0x7bad[18]](_0x7bad[9],auth[_0x7bad[10]](),controller[_0x7bad[17]]);router[_0x7bad[20]](_0x7bad[15],auth[_0x7bad[10]](),controller[_0x7bad[19]]);router[_0x7bad[22]](_0x7bad[15],auth[_0x7bad[10]](),controller[_0x7bad[21]]);module[_0x7bad[23]]= router
\ No newline at end of file
+var _0x62fd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x62fd[0];var multer=require(_0x62fd[1]);var util=require(_0x62fd[2]);var path=require(_0x62fd[3]);var express=require(_0x62fd[4]);var router=express.Router();var auth=require(_0x62fd[5]);var interaction=require(_0x62fd[6]);var config=require(_0x62fd[7]);var controller=require(_0x62fd[8]);router[_0x62fd[12]](_0x62fd[9],auth[_0x62fd[10]](),controller[_0x62fd[11]]);router[_0x62fd[12]](_0x62fd[13],auth[_0x62fd[10]](),controller[_0x62fd[14]]);router[_0x62fd[12]](_0x62fd[15],auth[_0x62fd[10]](),controller[_0x62fd[16]]);router[_0x62fd[18]](_0x62fd[9],auth[_0x62fd[10]](),controller[_0x62fd[17]]);router[_0x62fd[20]](_0x62fd[15],auth[_0x62fd[10]](),controller[_0x62fd[19]]);router[_0x62fd[22]](_0x62fd[15],auth[_0x62fd[10]](),controller[_0x62fd[21]]);module[_0x62fd[23]]= router
\ No newline at end of file
index 82e66e3..09e56eb 100644 (file)
@@ -1 +1 @@
-var _0xac62=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x61\x64\x64\x72\x65\x73\x73","\x65\x6D\x61\x69\x6C","\x41\x67\x65\x6E\x74","\x23\x39\x66\x39\x34\x36\x61","\x23\x66\x66\x66\x66\x66\x66","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x72\x6F\x75\x6E\x64\x65\x64","\x73\x71\x75\x61\x72\x65\x64","\x57\x65\x20\x61\x72\x65\x20\x68\x65\x72\x65\x21","\x43\x68\x61\x74","\x53\x65\x6E\x64","\x43\x6F\x6E\x74\x61\x63\x74\x20\x75\x73","\x50\x6F\x77\x65\x72\x65\x64\x20\x62\x79\x20\x78\x43\x41\x4C\x4C\x59","\x54\x45\x58\x54","\x44\x6F\x20\x79\x6F\x75\x20\x77\x61\x6E\x74\x20\x74\x6F\x20\x63\x6C\x6F\x73\x65\x20\x74\x68\x65\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3F","\x46\x6F\x72\x6D\x20\x70\x72\x6F\x70\x65\x72\x6C\x79\x20\x73\x75\x62\x6D\x69\x74\x74\x65\x64","\x46\x6F\x72\x6D\x20\x73\x75\x62\x6D\x69\x73\x73\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x4E\x6F\x74\x65","\x54\x79\x70\x65\x20\x61\x20\x6D\x65\x73\x73\x61\x67\x65","\x54\x68\x61\x6E\x6B\x73\x20\x79\x6F\x75\x20\x66\x6F\x72\x20\x79\x6F\x75\x72\x20\x74\x69\x6D\x65\x21","\x53\x6B\x69\x70","\x73\x74\x61\x72","\x74\x68\x75\x6D\x62","\x69\x6E\x70\x75\x74","\x6E\x61\x6D\x65","\x74\x65\x78\x74","","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6F\x6E\x6C\x69\x6E\x65\x46\x6F\x72\x6D","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x70\x61\x72\x73\x65","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x74\x65\x78\x74\x61\x72\x65\x61","\x43\x6F\x6D\x6D\x65\x6E\x74\x73","\x4C\x65\x61\x76\x65\x20\x79\x6F\x75\x72\x20\x63\x6F\x6D\x6D\x65\x6E\x74\x73","\x6F\x66\x66\x6C\x69\x6E\x65\x46\x6F\x72\x6D","\x67\x65\x6E\x65\x72\x61\x74\x65","\x41\x6C\x6C\x20\x6F\x66\x20\x6F\x75\x72\x20\x61\x67\x65\x6E\x74\x73\x20\x61\x72\x65\x20\x62\x75\x73\x79\x20\x61\x74\x20\x74\x68\x69\x73\x20\x74\x69\x6D\x65\x2E\x20\x59\x6F\x75\x72\x20\x63\x68\x61\x74\x20\x69\x73\x20\x76\x65\x72\x79\x20\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x20\x74\x6F\x20\x75\x73\x2E","\x50\x6C\x65\x61\x73\x65\x20\x68\x6F\x6C\x64\x20\x61\x6E\x64\x20\x77\x65\x20\x77\x69\x6C\x6C\x20\x61\x6E\x73\x77\x65\x72\x20\x79\x6F\x75\x72\x20\x72\x65\x71\x75\x65\x73\x74\x20\x61\x73\x20\x73\x6F\x6F\x6E\x20\x61\x73\x20\x70\x6F\x73\x73\x69\x62\x6C\x65\x2E","\x4E\x65\x77\x20\x6F\x66\x66\x6C\x69\x6E\x65\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x66\x72\x6F\x6D\x20\x77\x65\x62\x73\x69\x74\x65\x4E\x61\x6D\x65","\x59\x6F\x75\x20\x72\x65\x63\x65\x69\x76\x65\x64\x20\x61\x20\x6E\x65\x77\x20\x6F\x66\x66\x6C\x69\x6E\x65\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x66\x72\x6F\x6D\x20\x77\x65\x62\x73\x69\x74\x65\x4E\x61\x6D\x65\x2E\x20\x48\x65\x72\x65\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x66\x69\x6E\x64\x20\x74\x68\x65\x20\x64\x65\x74\x61\x69\x6C\x73\x20\x6F\x66\x20\x74\x68\x65\x20\x72\x65\x71\x75\x65\x73\x74\x3A","\x59\x6F\x75\x72\x20\x72\x65\x71\x75\x65\x73\x74\x20\x68\x61\x73\x20\x6E\x6F\x74\x20\x62\x65\x65\x6E\x20\x70\x72\x6F\x63\x65\x73\x73\x65\x64\x2E","\x41\x63\x63\x6F\x75\x6E\x74\x3A\x20\x7B\x7B\x61\x63\x63\x6F\x75\x6E\x74\x2E\x6E\x61\x6D\x65\x7D\x7D\x3C\x62\x72\x2F\x3E\x7B\x7B\x23\x71\x75\x65\x75\x65\x7D\x7D\x51\x75\x65\x75\x65\x3A\x20\x7B\x7B\x71\x75\x65\x75\x65\x2E\x6E\x61\x6D\x65\x7D\x7D\x3C\x62\x72\x2F\x3E\x7B\x7B\x2F\x71\x75\x65\x75\x65\x7D\x7D\x46\x72\x6F\x6D\x20\x3A\x20\x7B\x7B\x66\x72\x6F\x6D\x7D\x7D","\x77\x65\x62\x73\x69\x74\x65\x5F\x61\x6C\x69\x61\x73"];_0xac62[0];var Sequelize=require(_0xac62[1]);var rs=require(_0xac62[2]);module[_0xac62[3]]= {name:{type:Sequelize[_0xac62[4]],allowNull:false},address:{type:Sequelize[_0xac62[4]],allowNull:false,unique:_0xac62[5]},description:{type:Sequelize[_0xac62[4]]},mapKey:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[6]},mapKeyOffline:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[6]},key:{type:Sequelize[_0xac62[4]],allowNull:false},agentAlias:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[7]},color:{type:Sequelize[_0xac62[4]],allowNull:false,defaultValue:_0xac62[8],validate:{notEmpty:true}},color_button:{type:Sequelize[_0xac62[4]],allowNull:false,defaultValue:_0xac62[8],validate:{notEmpty:true}},textColor:{type:Sequelize[_0xac62[4]],allowNull:false,defaultValue:_0xac62[9],validate:{notEmpty:true}},fontSize:{type:Sequelize[_0xac62[10]],defaultValue:15},remote:{type:Sequelize[_0xac62[4]]},animation:{type:Sequelize[_0xac62[11]],defaultValue:true},header_shape:{type:Sequelize.ENUM(_0xac62[12],_0xac62[13]),defaultValue:_0xac62[12]},header_online:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[14]},start_chat_button:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[15]},offline_chat_button:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[16]},header_offline:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[17]},download_transcript:{type:Sequelize[_0xac62[11]],defaultValue:true},timeout:{type:Sequelize[_0xac62[10]],defaultValue:0},whiteLabel:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[18]},defaultWhiteLabel:{type:Sequelize[_0xac62[11]],defaultValue:true},sitepic:{type:Sequelize[_0xac62[19]]},closingQuestion:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[20]},formSubmitSuccessMessage:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[21]},formSubmitFailureMessage:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[22]},noteTitle:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[23]},placeholderMessage:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[24]},closingMessage:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[25]},closingMessageButton:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[16]},skipMessageButton:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[26]},conditionAgreement:{type:Sequelize[_0xac62[11]],defaultValue:false},enableRating:{type:Sequelize[_0xac62[11]],defaultValue:false},enableFeedback:{type:Sequelize[_0xac62[11]],defaultValue:false},ratingType:{type:Sequelize.ENUM(_0xac62[27],_0xac62[28]),defaultValue:_0xac62[27]},ratingStarsNumber:{type:Sequelize[_0xac62[10]],defaultValue:5},onlineForm:{type:Sequelize[_0xac62[19]],defaultValue:function(){return JSON[_0xac62[33]]({"\x69\x74\x65\x6D\x73":[{"\x74\x79\x70\x65":_0xac62[29],"\x76\x61\x72\x69\x61\x62\x6C\x65":null,"\x63\x6F\x6E\x66\x69\x67":{"\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72":_0xac62[30],"\x74\x79\x70\x65":_0xac62[31],"\x72\x65\x71\x75\x69\x72\x65\x64":true},"\x70\x72\x6F\x70\x73":{"\x74\x69\x74\x6C\x65":_0xac62[30],"\x68\x65\x6C\x70\x54\x65\x78\x74":_0xac62[32]}},{"\x74\x79\x70\x65":_0xac62[29],"\x70\x72\x6F\x70\x73":{"\x74\x69\x74\x6C\x65":_0xac62[6],"\x68\x65\x6C\x70\x54\x65\x78\x74":_0xac62[32]},"\x63\x6F\x6E\x66\x69\x67":{"\x72\x65\x71\x75\x69\x72\x65\x64":true,"\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72":_0xac62[6],"\x74\x79\x70\x65":_0xac62[6]},"\x76\x61\x72\x69\x61\x62\x6C\x65":null}],"\x66\x72\x6F\x6D\x4B\x65\x79":1})},get:function(){return this[_0xac62[35]](_0xac62[34])?JSON[_0xac62[36]](this[_0xac62[35]](_0xac62[34])):{}},set:function(_0x4ed3x3){return this[_0xac62[37]](_0xac62[34],JSON[_0xac62[33]](_0x4ed3x3))}},offlineForm:{type:Sequelize[_0xac62[19]],defaultValue:function(){return JSON[_0xac62[33]]({"\x69\x74\x65\x6D\x73":[{"\x74\x79\x70\x65":_0xac62[29],"\x70\x72\x6F\x70\x73":{"\x74\x69\x74\x6C\x65":_0xac62[6],"\x68\x65\x6C\x70\x54\x65\x78\x74":_0xac62[32]},"\x63\x6F\x6E\x66\x69\x67":{"\x72\x65\x71\x75\x69\x72\x65\x64":true,"\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72":_0xac62[6],"\x74\x79\x70\x65":_0xac62[6]},"\x76\x61\x72\x69\x61\x62\x6C\x65":null},{"\x74\x79\x70\x65":_0xac62[38],"\x63\x6F\x6E\x66\x69\x67":{"\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72":_0xac62[39]},"\x70\x72\x6F\x70\x73":{"\x74\x69\x74\x6C\x65":_0xac62[39],"\x68\x65\x6C\x70\x54\x65\x78\x74":_0xac62[40]}}],"\x66\x72\x6F\x6D\x4B\x65\x79":0})},get:function(){return this[_0xac62[35]](_0xac62[41])?JSON[_0xac62[36]](this[_0xac62[35]](_0xac62[41])):{}},set:function(_0x4ed3x3){return this[_0xac62[37]](_0xac62[41],JSON[_0xac62[33]](_0x4ed3x3))}},token:{type:Sequelize[_0xac62[4]],defaultValue:function(){return rs[_0xac62[42]]()}},autoclose:{type:Sequelize[_0xac62[11]],defaultValue:true},enableCustomerWriting:{type:Sequelize[_0xac62[11]],defaultValue:false},forwardTranscript:{type:Sequelize[_0xac62[11]],defaultValue:false},forwardTranscriptMessage:{type:Sequelize[_0xac62[4]]},forwardOffline:{type:Sequelize[_0xac62[11]],defaultValue:false},forwardOfflineAddress:{type:Sequelize[_0xac62[4]]},waitingTitle:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[43]},waitingMessage:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[44]},offlineMessageSubject:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[45]},offlineMessageBody:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[46]},enableUnmanagedNote:{type:Sequelize[_0xac62[11]],defaultValue:true},unmanagedMessage:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[47]},skipUnmanaged:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[26]},sendUnmanaged:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[16]},enableCustomerAttachment:{type:Sequelize[_0xac62[11]],defaultValue:false},agentAvatar:{type:Sequelize[_0xac62[19]]},showAgentAvatar:{type:Sequelize[_0xac62[11]],defaultValue:false},timezone:{type:Sequelize[_0xac62[4]]},notificationTemplate:{type:Sequelize[_0xac62[19]],defaultValue:function(){return _0xac62[48]}},notificationSound:{type:Sequelize[_0xac62[11]],defaultValue:true},notificationShake:{type:Sequelize[_0xac62[11]],defaultValue:false},hideWhenOffline:{type:Sequelize[_0xac62[11]],defaultValue:false},agentIdentifier:{type:Sequelize[_0xac62[4]],defaultValue:_0xac62[49]},waitForTheAssignedAgent:{type:Sequelize[_0xac62[10]],validate:{min:1,max:2147483},defaultValue:10}}
\ No newline at end of file
+var _0x1e87=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x61\x64\x64\x72\x65\x73\x73","\x65\x6D\x61\x69\x6C","\x41\x67\x65\x6E\x74","\x23\x39\x66\x39\x34\x36\x61","\x23\x66\x66\x66\x66\x66\x66","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x72\x6F\x75\x6E\x64\x65\x64","\x73\x71\x75\x61\x72\x65\x64","\x57\x65\x20\x61\x72\x65\x20\x68\x65\x72\x65\x21","\x43\x68\x61\x74","\x53\x65\x6E\x64","\x43\x6F\x6E\x74\x61\x63\x74\x20\x75\x73","\x50\x6F\x77\x65\x72\x65\x64\x20\x62\x79\x20\x78\x43\x41\x4C\x4C\x59","\x54\x45\x58\x54","\x44\x6F\x20\x79\x6F\x75\x20\x77\x61\x6E\x74\x20\x74\x6F\x20\x63\x6C\x6F\x73\x65\x20\x74\x68\x65\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3F","\x46\x6F\x72\x6D\x20\x70\x72\x6F\x70\x65\x72\x6C\x79\x20\x73\x75\x62\x6D\x69\x74\x74\x65\x64","\x46\x6F\x72\x6D\x20\x73\x75\x62\x6D\x69\x73\x73\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x4E\x6F\x74\x65","\x54\x79\x70\x65\x20\x61\x20\x6D\x65\x73\x73\x61\x67\x65","\x54\x68\x61\x6E\x6B\x73\x20\x79\x6F\x75\x20\x66\x6F\x72\x20\x79\x6F\x75\x72\x20\x74\x69\x6D\x65\x21","\x53\x6B\x69\x70","\x73\x74\x61\x72","\x74\x68\x75\x6D\x62","\x69\x6E\x70\x75\x74","\x6E\x61\x6D\x65","\x74\x65\x78\x74","","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6F\x6E\x6C\x69\x6E\x65\x46\x6F\x72\x6D","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x70\x61\x72\x73\x65","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x74\x65\x78\x74\x61\x72\x65\x61","\x43\x6F\x6D\x6D\x65\x6E\x74\x73","\x4C\x65\x61\x76\x65\x20\x79\x6F\x75\x72\x20\x63\x6F\x6D\x6D\x65\x6E\x74\x73","\x6F\x66\x66\x6C\x69\x6E\x65\x46\x6F\x72\x6D","\x67\x65\x6E\x65\x72\x61\x74\x65","\x41\x6C\x6C\x20\x6F\x66\x20\x6F\x75\x72\x20\x61\x67\x65\x6E\x74\x73\x20\x61\x72\x65\x20\x62\x75\x73\x79\x20\x61\x74\x20\x74\x68\x69\x73\x20\x74\x69\x6D\x65\x2E\x20\x59\x6F\x75\x72\x20\x63\x68\x61\x74\x20\x69\x73\x20\x76\x65\x72\x79\x20\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x20\x74\x6F\x20\x75\x73\x2E","\x50\x6C\x65\x61\x73\x65\x20\x68\x6F\x6C\x64\x20\x61\x6E\x64\x20\x77\x65\x20\x77\x69\x6C\x6C\x20\x61\x6E\x73\x77\x65\x72\x20\x79\x6F\x75\x72\x20\x72\x65\x71\x75\x65\x73\x74\x20\x61\x73\x20\x73\x6F\x6F\x6E\x20\x61\x73\x20\x70\x6F\x73\x73\x69\x62\x6C\x65\x2E","\x4E\x65\x77\x20\x6F\x66\x66\x6C\x69\x6E\x65\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x66\x72\x6F\x6D\x20\x77\x65\x62\x73\x69\x74\x65\x4E\x61\x6D\x65","\x59\x6F\x75\x20\x72\x65\x63\x65\x69\x76\x65\x64\x20\x61\x20\x6E\x65\x77\x20\x6F\x66\x66\x6C\x69\x6E\x65\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x66\x72\x6F\x6D\x20\x77\x65\x62\x73\x69\x74\x65\x4E\x61\x6D\x65\x2E\x20\x48\x65\x72\x65\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x66\x69\x6E\x64\x20\x74\x68\x65\x20\x64\x65\x74\x61\x69\x6C\x73\x20\x6F\x66\x20\x74\x68\x65\x20\x72\x65\x71\x75\x65\x73\x74\x3A","\x59\x6F\x75\x72\x20\x72\x65\x71\x75\x65\x73\x74\x20\x68\x61\x73\x20\x6E\x6F\x74\x20\x62\x65\x65\x6E\x20\x70\x72\x6F\x63\x65\x73\x73\x65\x64\x2E","\x41\x63\x63\x6F\x75\x6E\x74\x3A\x20\x7B\x7B\x61\x63\x63\x6F\x75\x6E\x74\x2E\x6E\x61\x6D\x65\x7D\x7D\x3C\x62\x72\x2F\x3E\x7B\x7B\x23\x71\x75\x65\x75\x65\x7D\x7D\x51\x75\x65\x75\x65\x3A\x20\x7B\x7B\x71\x75\x65\x75\x65\x2E\x6E\x61\x6D\x65\x7D\x7D\x3C\x62\x72\x2F\x3E\x7B\x7B\x2F\x71\x75\x65\x75\x65\x7D\x7D\x46\x72\x6F\x6D\x20\x3A\x20\x7B\x7B\x66\x72\x6F\x6D\x7D\x7D","\x77\x65\x62\x73\x69\x74\x65\x5F\x61\x6C\x69\x61\x73"];_0x1e87[0];var Sequelize=require(_0x1e87[1]);var rs=require(_0x1e87[2]);module[_0x1e87[3]]= {name:{type:Sequelize[_0x1e87[4]],allowNull:false},address:{type:Sequelize[_0x1e87[4]],allowNull:false,unique:_0x1e87[5]},description:{type:Sequelize[_0x1e87[4]]},mapKey:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[6]},mapKeyOffline:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[6]},key:{type:Sequelize[_0x1e87[4]],allowNull:false},agentAlias:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[7]},color:{type:Sequelize[_0x1e87[4]],allowNull:false,defaultValue:_0x1e87[8],validate:{notEmpty:true}},color_button:{type:Sequelize[_0x1e87[4]],allowNull:false,defaultValue:_0x1e87[8],validate:{notEmpty:true}},textColor:{type:Sequelize[_0x1e87[4]],allowNull:false,defaultValue:_0x1e87[9],validate:{notEmpty:true}},fontSize:{type:Sequelize[_0x1e87[10]],defaultValue:15},remote:{type:Sequelize[_0x1e87[4]]},animation:{type:Sequelize[_0x1e87[11]],defaultValue:true},header_shape:{type:Sequelize.ENUM(_0x1e87[12],_0x1e87[13]),defaultValue:_0x1e87[12]},header_online:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[14]},start_chat_button:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[15]},offline_chat_button:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[16]},header_offline:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[17]},download_transcript:{type:Sequelize[_0x1e87[11]],defaultValue:true},timeout:{type:Sequelize[_0x1e87[10]],defaultValue:0},whiteLabel:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[18]},defaultWhiteLabel:{type:Sequelize[_0x1e87[11]],defaultValue:true},sitepic:{type:Sequelize[_0x1e87[19]]},closingQuestion:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[20]},formSubmitSuccessMessage:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[21]},formSubmitFailureMessage:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[22]},noteTitle:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[23]},placeholderMessage:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[24]},closingMessage:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[25]},closingMessageButton:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[16]},skipMessageButton:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[26]},conditionAgreement:{type:Sequelize[_0x1e87[11]],defaultValue:false},enableRating:{type:Sequelize[_0x1e87[11]],defaultValue:false},enableFeedback:{type:Sequelize[_0x1e87[11]],defaultValue:false},ratingType:{type:Sequelize.ENUM(_0x1e87[27],_0x1e87[28]),defaultValue:_0x1e87[27]},ratingStarsNumber:{type:Sequelize[_0x1e87[10]],defaultValue:5},onlineForm:{type:Sequelize[_0x1e87[19]],defaultValue:function(){return JSON[_0x1e87[33]]({"\x69\x74\x65\x6D\x73":[{"\x74\x79\x70\x65":_0x1e87[29],"\x76\x61\x72\x69\x61\x62\x6C\x65":null,"\x63\x6F\x6E\x66\x69\x67":{"\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72":_0x1e87[30],"\x74\x79\x70\x65":_0x1e87[31],"\x72\x65\x71\x75\x69\x72\x65\x64":true},"\x70\x72\x6F\x70\x73":{"\x74\x69\x74\x6C\x65":_0x1e87[30],"\x68\x65\x6C\x70\x54\x65\x78\x74":_0x1e87[32]}},{"\x74\x79\x70\x65":_0x1e87[29],"\x70\x72\x6F\x70\x73":{"\x74\x69\x74\x6C\x65":_0x1e87[6],"\x68\x65\x6C\x70\x54\x65\x78\x74":_0x1e87[32]},"\x63\x6F\x6E\x66\x69\x67":{"\x72\x65\x71\x75\x69\x72\x65\x64":true,"\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72":_0x1e87[6],"\x74\x79\x70\x65":_0x1e87[6]},"\x76\x61\x72\x69\x61\x62\x6C\x65":null}],"\x66\x72\x6F\x6D\x4B\x65\x79":1})},get:function(){return this[_0x1e87[35]](_0x1e87[34])?JSON[_0x1e87[36]](this[_0x1e87[35]](_0x1e87[34])):{}},set:function(_0xc3d7x3){return this[_0x1e87[37]](_0x1e87[34],JSON[_0x1e87[33]](_0xc3d7x3))}},offlineForm:{type:Sequelize[_0x1e87[19]],defaultValue:function(){return JSON[_0x1e87[33]]({"\x69\x74\x65\x6D\x73":[{"\x74\x79\x70\x65":_0x1e87[29],"\x70\x72\x6F\x70\x73":{"\x74\x69\x74\x6C\x65":_0x1e87[6],"\x68\x65\x6C\x70\x54\x65\x78\x74":_0x1e87[32]},"\x63\x6F\x6E\x66\x69\x67":{"\x72\x65\x71\x75\x69\x72\x65\x64":true,"\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72":_0x1e87[6],"\x74\x79\x70\x65":_0x1e87[6]},"\x76\x61\x72\x69\x61\x62\x6C\x65":null},{"\x74\x79\x70\x65":_0x1e87[38],"\x63\x6F\x6E\x66\x69\x67":{"\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72":_0x1e87[39]},"\x70\x72\x6F\x70\x73":{"\x74\x69\x74\x6C\x65":_0x1e87[39],"\x68\x65\x6C\x70\x54\x65\x78\x74":_0x1e87[40]}}],"\x66\x72\x6F\x6D\x4B\x65\x79":0})},get:function(){return this[_0x1e87[35]](_0x1e87[41])?JSON[_0x1e87[36]](this[_0x1e87[35]](_0x1e87[41])):{}},set:function(_0xc3d7x3){return this[_0x1e87[37]](_0x1e87[41],JSON[_0x1e87[33]](_0xc3d7x3))}},token:{type:Sequelize[_0x1e87[4]],defaultValue:function(){return rs[_0x1e87[42]]()}},autoclose:{type:Sequelize[_0x1e87[11]],defaultValue:true},enableCustomerWriting:{type:Sequelize[_0x1e87[11]],defaultValue:false},forwardTranscript:{type:Sequelize[_0x1e87[11]],defaultValue:false},forwardTranscriptMessage:{type:Sequelize[_0x1e87[4]]},forwardOffline:{type:Sequelize[_0x1e87[11]],defaultValue:false},forwardOfflineAddress:{type:Sequelize[_0x1e87[4]]},waitingTitle:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[43]},waitingMessage:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[44]},offlineMessageSubject:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[45]},offlineMessageBody:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[46]},enableUnmanagedNote:{type:Sequelize[_0x1e87[11]],defaultValue:true},unmanagedMessage:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[47]},skipUnmanaged:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[26]},sendUnmanaged:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[16]},enableCustomerAttachment:{type:Sequelize[_0x1e87[11]],defaultValue:false},agentAvatar:{type:Sequelize[_0x1e87[19]]},showAgentAvatar:{type:Sequelize[_0x1e87[11]],defaultValue:false},timezone:{type:Sequelize[_0x1e87[4]]},notificationTemplate:{type:Sequelize[_0x1e87[19]],defaultValue:function(){return _0x1e87[48]}},notificationSound:{type:Sequelize[_0x1e87[11]],defaultValue:true},notificationShake:{type:Sequelize[_0x1e87[11]],defaultValue:false},hideWhenOffline:{type:Sequelize[_0x1e87[11]],defaultValue:false},agentIdentifier:{type:Sequelize[_0x1e87[4]],defaultValue:_0x1e87[49]},waitForTheAssignedAgent:{type:Sequelize[_0x1e87[10]],validate:{min:1,max:2147483},defaultValue:10}}
\ No newline at end of file
index b55b7c7..110b34b 100644 (file)
@@ -1 +1 @@
-var _0xb9a8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x64\x64\x41\x6E\x73\x77\x65\x72","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x72\x65\x6D\x6F\x76\x65\x41\x6E\x73\x77\x65\x72\x73","\x69\x64\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x61\x64\x64\x4C\x6F\x67\x6F","\x73\x69\x74\x65\x70\x69\x63","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65","\x61\x64\x64\x41\x76\x61\x74\x61\x72","\x61\x67\x65\x6E\x74\x41\x76\x61\x74\x61\x72","\x67\x65\x74\x4C\x6F\x67\x6F","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6C\x6F\x67\x6F\x73\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x6C\x6F\x67\x6F\x2E\x70\x6E\x67","\x6A\x6F\x69\x6E","\x69\x73\x4E\x69\x6C","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6C\x6F\x67\x6F\x73\x2F","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x63\x75\x73\x74\x6F\x6D","\x67\x65\x74\x4C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x75\x74\x69\x6C","\x67\x65\x74\x41\x76\x61\x74\x61\x72","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x61\x76\x61\x74\x61\x72\x73\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x61\x76\x61\x74\x61\x72\x2E\x70\x6E\x67","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x61\x76\x61\x74\x61\x72\x73\x2F","\x6E\x6F\x74\x69\x66\x79","\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74\x2D\x70\x61\x72\x73\x65\x72","\x67\x65\x74\x52\x65\x73\x75\x6C\x74","\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74","\x68\x65\x61\x64\x65\x72\x73","\x73\x65\x74\x55\x41","\x63\x68\x61\x74","\x45\x76\x65\x6E\x74\x4D\x61\x6E\x61\x67\x65\x72","\x55\x73\x65\x72\x49\x64","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x67\x65\x6E\x74","\x2C","\x77\x61\x69\x74\x46\x6F\x72\x54\x68\x65\x41\x73\x73\x69\x67\x6E\x65\x64\x41\x67\x65\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x75\x6E\x73\x68\x69\x66\x74","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x6F\x72\x63\x65\x64\x4F\x77\x6E\x65\x72\x73\x68\x69\x70","\x53\x74\x61\x72\x74","\x73\x74\x61\x72\x74\x52\x6F\x75\x74\x69\x6E\x67","\x55\x73\x65\x72","\x69\x6E","\x63\x6F\x6E\x74\x61\x63\x74","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x49\x64","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","","\x20","\x6C\x61\x73\x74\x4E\x61\x6D\x65","\x61\x75\x74\x6F\x63\x6C\x6F\x73\x65","\x63\x6C\x6F\x73\x65","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x70\x75\x73\x68","\x67\x65\x74","\x63\x72\x65\x61\x74\x65\x64","\x73\x70\x72\x65\x61\x64","\x63\x75\x73\x74\x6F\x6D\x65\x72\x49\x70","\x72\x65\x66\x65\x72\x65\x72","\x62\x72\x6F\x77\x73\x65\x72","\x76\x65\x72\x73\x69\x6F\x6E","\x25\x73\x20\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x6F\x73","\x64\x65\x76\x69\x63\x65","\x76\x65\x6E\x64\x6F\x72","\x25\x73\x20\x25\x73\x20\x25\x73","\x74\x79\x70\x65","\x74\x68\x72\x65\x61\x64\x49\x64","\x65\x78\x74\x65\x72\x6E\x61\x6C\x55\x72\x6C","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6C\x69\x73\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x61\x73\x63","\x6F\x72\x64\x65\x72\x42\x79","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x66\x72\x6F\x6D","\x4C\x69\x73\x74\x49\x64","\x64\x65\x66\x61\x75\x6C\x74\x73","\x6D\x61\x70\x4B\x65\x79","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6D\x4C\x69\x73\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6E\x6F\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x20\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x66\x72\x6F\x6D\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","\x62\x6F\x64\x79\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x20\x61\x6E\x64\x20\x6E\x6F\x74\x20\x65\x6D\x70\x74\x79","\x6D\x61\x70\x4B\x65\x79\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x6D\x61\x70\x4B\x65\x79\x20\x69\x6E\x76\x61\x6C\x69\x64\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x6F\x66\x66\x6C\x69\x6E\x65","\x53\x6D\x74\x70","\x66\x6F\x72\x77\x61\x72\x64\x4F\x66\x66\x6C\x69\x6E\x65\x41\x64\x64\x72\x65\x73\x73","\x73\x65\x72\x76\x69\x63\x65","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x65\x63\x75\x72\x65","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E","\x61\x75\x74\x68","\x75\x73\x65\x72","\x70\x61\x73\x73","\x53\x65\x6E\x64\x4D\x61\x69\x6C","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x65\x6D\x61\x69\x6C","\x6F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x53\x75\x62\x6A\x65\x63\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73\x2F\x63\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x2E\x65\x6A\x73","\x75\x74\x66\x38","\x72\x65\x61\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x74\x6F\x50\x61\x69\x72\x73","\x6F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x42\x6F\x64\x79","\x72\x65\x6E\x64\x65\x72","\x43\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65","\x6D\x61\x70\x4B\x65\x79\x4F\x66\x66\x6C\x69\x6E\x65","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x6D\x61\x70\x4B\x65\x79\x4F\x66\x66\x6C\x69\x6E\x65\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x6D\x61\x70\x4B\x65\x79\x4F\x66\x66\x6C\x69\x6E\x65\x20\x69\x6E\x76\x61\x6C\x69\x64\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x61\x64\x64\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6F\x6D\x69\x74","\x67\x65\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x43\x6F\x6E\x74\x61\x63\x74","\x4F\x77\x6E\x65\x72","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x54\x61\x67","\x54\x61\x67\x73","\x63\x6F\x6C\x6F\x72","\x74\x61\x67","\x67\x65\x74\x53\x6E\x69\x70\x70\x65\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x63\x68\x61\x74\x2F\x69\x66\x72\x61\x6D\x65\x2E\x6A\x73","\x72\x65\x6D\x6F\x74\x65","\x5C\x27","\x72\x65\x70\x6C\x61\x63\x65","\x78\x2D\x66\x6F\x72\x77\x61\x72\x64\x65\x64\x2D\x66\x6F\x72","\x78\x2D\x72\x65\x61\x6C\x2D\x69\x70","\x72\x65\x6D\x6F\x74\x65\x41\x64\x64\x72\x65\x73\x73","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x69\x70","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x5B\x25\x73\x5D\x5B\x49\x4E\x54\x45\x52\x56\x41\x4C\x5D\x20\x25\x73","\x74\x72\x75\x65","\x69\x6E\x64\x65\x78\x4F\x66","\x43\x6F\x6D\x6D\x61\x6E\x64","\x74\x69\x6D\x65\x7A\x6F\x6E\x65","\x69\x66\x74\x69\x6D\x65\x20\x25\x73\x2C\x25\x73","\x69\x66\x74\x69\x6D\x65\x20\x25\x73","\x73\x6F\x6D\x65","\x61\x6C\x6C","\x67\x65\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x67\x65\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x43\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x63\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x61\x64\x64\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x6F\x6E\x6C\x69\x6E\x65","\x66\x61\x6C\x73\x65","\x6F\x66\x66\x6C\x69\x6E\x65\x46\x6F\x72\x6D","\x6F\x6E\x6C\x69\x6E\x65\x46\x6F\x72\x6D","\x69\x74\x65\x6D\x73","\x66\x72\x6F\x6D\x4B\x65\x79","\x67\x65\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x73"];_0xb9a8[0];var jsonpatch=require(_0xb9a8[1]);var rp=require(_0xb9a8[2]);var moment=require(_0xb9a8[3]);var BPromise=require(_0xb9a8[4]);var Mustache=require(_0xb9a8[5]);var util=require(_0xb9a8[6]);var path=require(_0xb9a8[7]);var sox=require(_0xb9a8[8]);var csv=require(_0xb9a8[9]);var ejs=require(_0xb9a8[10]);var fs=require(_0xb9a8[11]);var _=require(_0xb9a8[12]);var squel=require(_0xb9a8[13]);var crypto=require(_0xb9a8[14]);var jsforce=require(_0xb9a8[15]);var deskjs=require(_0xb9a8[16]);var toCsv=require(_0xb9a8[9]);var querystring=require(_0xb9a8[17]);var Papa=require(_0xb9a8[18]);var qs=require(_0xb9a8[19]);var logger=require(_0xb9a8[21])(_0xb9a8[20]);var utils=require(_0xb9a8[22]);var config=require(_0xb9a8[23]);var db=require(_0xb9a8[25])[_0xb9a8[24]];var jayson=require(_0xb9a8[26]);var client=jayson[_0xb9a8[28]][_0xb9a8[27]]({port:9004});var client9002=jayson[_0xb9a8[28]][_0xb9a8[27]]({port:9002});var client9003=jayson[_0xb9a8[28]][_0xb9a8[27]]({port:9003});function respondWithRpcPromise(_0xe463x1e,_0xe463x1f,_0xe463x20,_0xe463x21){return  new BPromise(function(_0xe463x22,_0xe463x23){var _0xe463x24=(_0xe463x21|| client);return _0xe463x24[_0xb9a8[41]](_0xe463x1e,_0xe463x20)[_0xb9a8[40]](function(_0xe463x26){logger[_0xb9a8[33]](_0xb9a8[29],_0xe463x1f,_0xb9a8[32]);logger[_0xb9a8[36]](_0xb9a8[34],_0xe463x1f,_0xb9a8[32],JSON[_0xb9a8[35]](_0xe463x26));if(_0xe463x26[_0xb9a8[30]]){if(_0xe463x26[_0xb9a8[30]][_0xb9a8[37]]=== 500){logger[_0xb9a8[30]](_0xb9a8[29],_0xe463x1f,_0xe463x26[_0xb9a8[30]][_0xb9a8[38]]);return _0xe463x23(_0xe463x26[_0xb9a8[30]][_0xb9a8[38]])};logger[_0xb9a8[30]](_0xb9a8[29],_0xe463x1f,_0xe463x26[_0xb9a8[30]][_0xb9a8[38]]);return _0xe463x22(_0xe463x26[_0xb9a8[30]][_0xb9a8[38]])}else {logger[_0xb9a8[33]](_0xb9a8[29],_0xe463x1f,_0xb9a8[32]);_0xe463x22(_0xe463x26[_0xb9a8[39]][_0xb9a8[38]])}})[_0xb9a8[31]](function(_0xe463x25){logger[_0xb9a8[30]](_0xb9a8[29],_0xe463x1f,_0xe463x25);_0xe463x23(_0xe463x25)})})}function respondWithStatusCode(_0xe463x26,_0xe463x28){_0xe463x28= _0xe463x28|| 204;return function(_0xe463x29){if(_0xe463x29){return _0xe463x26[_0xb9a8[42]](_0xe463x28)};return _0xe463x26[_0xb9a8[44]](_0xe463x28)[_0xb9a8[43]]()}}function respondWithResult(_0xe463x26,_0xe463x28){_0xe463x28= _0xe463x28|| 200;return function(_0xe463x29){if(_0xe463x29){return _0xe463x26[_0xb9a8[44]](_0xe463x28)[_0xb9a8[45]](_0xe463x29)}}}function respondWithFilteredResult(_0xe463x26,_0xe463x2c){return function(_0xe463x29){if(_0xe463x29){var _0xe463x2d=_0xe463x29[_0xb9a8[46]],_0xe463x2e=_0xe463x2c[_0xb9a8[47]],_0xe463x2f=_0xe463x2c[_0xb9a8[47]]+ _0xe463x2c[_0xb9a8[48]],_0xe463x28;if(_0xe463x2f>= _0xe463x2d){_0xe463x2f= _0xe463x2d;_0xe463x28= 200}else {_0xe463x28= 206};_0xe463x26[_0xb9a8[44]](_0xe463x28);return _0xe463x26[_0xb9a8[52]](_0xb9a8[49],_0xe463x2e+ _0xb9a8[50]+ _0xe463x2f+ _0xb9a8[51]+ _0xe463x2d)[_0xb9a8[45]](_0xe463x29)};return null}}function patchUpdates(_0xe463x31){return function(_0xe463x29){try{jsonpatch[_0xb9a8[53]](_0xe463x29,_0xe463x31,true)}catch(err){return BPromise[_0xb9a8[54]](err)};return _0xe463x29[_0xb9a8[55]]()}}function saveUpdates(_0xe463x33,_0xe463x28){return function(_0xe463x29){if(_0xe463x29){return _0xe463x29[_0xb9a8[56]](_0xe463x33)[_0xb9a8[40]](function(_0xe463x34){return _0xe463x34})};return null}}function removeEntity(_0xe463x26,_0xe463x28){return function(_0xe463x29){if(_0xe463x29){return _0xe463x29[_0xb9a8[57]]()[_0xb9a8[40]](function(){_0xe463x26[_0xb9a8[44]](204)[_0xb9a8[43]]()})}}}function handleEntityNotFound(_0xe463x26,_0xe463x28){return function(_0xe463x29){if(!_0xe463x29){_0xe463x26[_0xb9a8[42]](404)};return _0xe463x29}}function handleError(_0xe463x26,_0xe463x28){_0xe463x28= _0xe463x28|| 500;return function(_0xe463x25){logger[_0xb9a8[30]](_0xe463x25[_0xb9a8[58]]);if(_0xe463x25[_0xb9a8[59]]){delete _0xe463x25[_0xb9a8[59]]};_0xe463x26[_0xb9a8[44]](_0xe463x28)[_0xb9a8[60]](_0xe463x25)}}exports[_0xb9a8[61]]= function(_0xe463x20,_0xe463x26){var _0xe463x2c={},_0xe463x38={},_0xe463x39={count:0,rows:[]};_0xe463x38[_0xb9a8[62]]= _[_0xb9a8[65]](db[_0xb9a8[64]][_0xb9a8[63]]);var _0xe463x3a={dateStart:_0xe463x20[_0xb9a8[67]][_0xb9a8[66]],dateEnd:_0xe463x20[_0xb9a8[67]][_0xb9a8[68]]};delete _0xe463x20[_0xb9a8[67]][_0xb9a8[66]];delete _0xe463x20[_0xb9a8[67]][_0xb9a8[68]];_0xe463x38[_0xb9a8[67]]= _[_0xb9a8[65]](_0xe463x20[_0xb9a8[67]]);_0xe463x38[_0xb9a8[69]]= _[_0xb9a8[70]](_0xe463x38[_0xb9a8[62]],_0xe463x38[_0xb9a8[67]]);_0xe463x2c[_0xb9a8[71]]= _[_0xb9a8[70]](_0xe463x38[_0xb9a8[62]],qs[_0xb9a8[72]](_0xe463x20[_0xb9a8[67]][_0xb9a8[72]]));_0xe463x2c[_0xb9a8[71]]= (_0xe463x2c[_0xb9a8[71]][_0xb9a8[73]])?_0xe463x2c[_0xb9a8[71]]:_0xe463x38[_0xb9a8[62]];if(!_0xe463x20[_0xb9a8[67]][_0xb9a8[75]](_0xb9a8[74])){_0xe463x2c[_0xb9a8[48]]= qs[_0xb9a8[48]](_0xe463x20[_0xb9a8[67]][_0xb9a8[48]]);_0xe463x2c[_0xb9a8[47]]= qs[_0xb9a8[47]](_0xe463x20[_0xb9a8[67]][_0xb9a8[47]])};_0xe463x2c[_0xb9a8[76]]= qs[_0xb9a8[77]](_0xe463x20[_0xb9a8[67]][_0xb9a8[77]]);_0xe463x2c[_0xb9a8[78]]= qs[_0xb9a8[69]](_[_0xb9a8[79]](_0xe463x20[_0xb9a8[67]],_0xe463x38[_0xb9a8[69]]));if(_0xe463x3a[_0xb9a8[66]]){if(_0xe463x3a[_0xb9a8[68]]){_0xe463x3a[_0xb9a8[68]]= moment(_0xe463x3a[_0xb9a8[68]])[_0xb9a8[81]](1,_0xb9a8[80])}else {_0xe463x3a[_0xb9a8[68]]= moment(_0xe463x3a[_0xb9a8[66]])[_0xb9a8[81]](1,_0xb9a8[80])};_[_0xb9a8[82]](_0xe463x2c[_0xb9a8[78]],{createdAt:{$gte:_0xe463x3a[_0xb9a8[66]],$lte:_0xe463x3a[_0xb9a8[68]]}})};if(_0xe463x20[_0xb9a8[67]][_0xb9a8[83]]){_0xe463x2c[_0xb9a8[78]]= _[_0xb9a8[82]](_0xe463x2c[_0xb9a8[78]],{$or:_[_0xb9a8[85]](_0xe463x2c[_0xb9a8[71]],function(_0xe463x3b){var _0xe463x39={};_0xe463x39[_0xe463x3b]= {$like:_0xb9a8[84]+ _0xe463x20[_0xb9a8[67]][_0xb9a8[83]]+ _0xb9a8[84]};return _0xe463x39})})};_0xe463x2c= _[_0xb9a8[82]]({},_0xe463x2c,_0xe463x20[_0xb9a8[86]]);var _0xe463x3c={where:_0xe463x2c[_0xb9a8[78]]};return db[_0xb9a8[64]][_0xb9a8[46]](_0xe463x3c)[_0xb9a8[40]](function(_0xe463x2d){_0xe463x39[_0xb9a8[46]]= _0xe463x2d;if(_0xe463x20[_0xb9a8[67]][_0xb9a8[88]]){_0xe463x2c[_0xb9a8[89]]= [{all:true}]};return db[_0xb9a8[64]][_0xb9a8[90]](_0xe463x2c)})[_0xb9a8[40]](function(_0xe463x3d){_0xe463x39[_0xb9a8[87]]= _0xe463x3d;return _0xe463x39})[_0xb9a8[40]](respondWithFilteredResult(_0xe463x26,_0xe463x2c))[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[91]]= function(_0xe463x20,_0xe463x26){var _0xe463x2c={raw:false,where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]}},_0xe463x38={};_0xe463x38[_0xb9a8[62]]= _[_0xb9a8[65]](db[_0xb9a8[64]][_0xb9a8[63]]);_0xe463x38[_0xb9a8[67]]= _[_0xb9a8[65]](_0xe463x20[_0xb9a8[67]]);_0xe463x38[_0xb9a8[69]]= _[_0xb9a8[70]](_0xe463x38[_0xb9a8[62]],_0xe463x38[_0xb9a8[67]]);_0xe463x2c[_0xb9a8[71]]= _[_0xb9a8[70]](_0xe463x38[_0xb9a8[62]],qs[_0xb9a8[72]](_0xe463x20[_0xb9a8[67]][_0xb9a8[72]]));_0xe463x2c[_0xb9a8[71]]= (_0xe463x2c[_0xb9a8[71]][_0xb9a8[73]])?_0xe463x2c[_0xb9a8[71]]:_0xe463x38[_0xb9a8[62]];if(_0xe463x20[_0xb9a8[67]][_0xb9a8[88]]){_0xe463x2c[_0xb9a8[89]]= [{all:true}]};_0xe463x2c= _[_0xb9a8[82]]({},_0xe463x2c,_0xe463x20[_0xb9a8[86]]);return db[_0xb9a8[64]][_0xb9a8[94]](_0xe463x2c)[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](respondWithResult(_0xe463x26,null))[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[95]]= function(_0xe463x20,_0xe463x26){return db[_0xb9a8[64]][_0xb9a8[95]](_0xe463x20[_0xb9a8[96]],{})[_0xb9a8[40]](respondWithResult(_0xe463x26,201))[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[56]]= function(_0xe463x20,_0xe463x26){if(_0xe463x20[_0xb9a8[96]][_0xb9a8[92]]){delete _0xe463x20[_0xb9a8[96]][_0xb9a8[92]]};return db[_0xb9a8[64]][_0xb9a8[94]]({where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]}})[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](saveUpdates(_0xe463x20[_0xb9a8[96]],null))[_0xb9a8[40]](respondWithResult(_0xe463x26,null))[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[57]]= function(_0xe463x20,_0xe463x26){return db[_0xb9a8[64]][_0xb9a8[94]]({where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]}})[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](removeEntity(_0xe463x26,null))[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[97]]= function(_0xe463x20,_0xe463x26){return db[_0xb9a8[64]][_0xb9a8[97]]()[_0xb9a8[40]](respondWithResult(_0xe463x26,null))[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[98]]= function(_0xe463x20,_0xe463x26,_0xe463x3e){if(_0xe463x20[_0xb9a8[96]][_0xb9a8[92]]){delete _0xe463x20[_0xb9a8[96]][_0xb9a8[92]]};return db[_0xb9a8[64]][_0xb9a8[94]]({where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]}})[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29){_0xe463x20[_0xb9a8[96]][_0xb9a8[99]]= _0xe463x29[_0xb9a8[92]];return db[_0xb9a8[100]][_0xb9a8[95]](_0xe463x20[_0xb9a8[96]])}})[_0xb9a8[40]](respondWithResult(_0xe463x26,null))[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[101]]= function(_0xe463x20,_0xe463x26,_0xe463x3e){var _0xe463x2c={raw:false,where:{}};var _0xe463x38={};var _0xe463x3f={count:0,rows:[]};return db[_0xb9a8[64]][_0xb9a8[102]]({where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]}})[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29){_0xe463x38[_0xb9a8[62]]= _[_0xb9a8[65]](db[_0xb9a8[100]][_0xb9a8[63]]);_0xe463x38[_0xb9a8[67]]= _[_0xb9a8[65]](_0xe463x20[_0xb9a8[67]]);_0xe463x38[_0xb9a8[69]]= _[_0xb9a8[70]](_0xe463x38[_0xb9a8[62]],_0xe463x38[_0xb9a8[67]]);_0xe463x2c[_0xb9a8[71]]= _[_0xb9a8[70]](_0xe463x38[_0xb9a8[62]],qs[_0xb9a8[72]](_0xe463x20[_0xb9a8[67]][_0xb9a8[72]]));_0xe463x2c[_0xb9a8[71]]= (_0xe463x2c[_0xb9a8[71]][_0xb9a8[73]])?_0xe463x2c[_0xb9a8[71]]:_0xe463x38[_0xb9a8[62]];if(!_0xe463x20[_0xb9a8[67]][_0xb9a8[75]](_0xb9a8[74])){_0xe463x2c[_0xb9a8[48]]= qs[_0xb9a8[48]](_0xe463x20[_0xb9a8[67]][_0xb9a8[48]]);_0xe463x2c[_0xb9a8[47]]= qs[_0xb9a8[47]](_0xe463x20[_0xb9a8[67]][_0xb9a8[47]])};_0xe463x2c[_0xb9a8[76]]= qs[_0xb9a8[77]](_0xe463x20[_0xb9a8[67]][_0xb9a8[77]]);_0xe463x2c[_0xb9a8[78]]= qs[_0xb9a8[69]](_[_0xb9a8[79]](_0xe463x20[_0xb9a8[67]],_0xe463x38[_0xb9a8[69]]));_0xe463x2c[_0xb9a8[78]][_0xb9a8[99]]= _0xe463x29[_0xb9a8[92]];if(_0xe463x20[_0xb9a8[67]][_0xb9a8[83]]){_0xe463x2c[_0xb9a8[78]]= _[_0xb9a8[82]](_0xe463x2c[_0xb9a8[78]],{$or:_[_0xb9a8[85]](_0xe463x2c[_0xb9a8[71]],function(_0xe463x3b){var _0xe463x39={};_0xe463x39[_0xe463x3b]= {$like:_0xb9a8[84]+ _0xe463x20[_0xb9a8[67]][_0xb9a8[83]]+ _0xb9a8[84]};return _0xe463x39})})};_0xe463x2c= _[_0xb9a8[82]]({},_0xe463x2c,_0xe463x20[_0xb9a8[86]]);return db[_0xb9a8[100]][_0xb9a8[46]]({where:_0xe463x2c[_0xb9a8[78]]})[_0xb9a8[40]](function(_0xe463x2d){_0xe463x3f[_0xb9a8[46]]= _0xe463x2d;if(_0xe463x20[_0xb9a8[67]][_0xb9a8[88]]){_0xe463x2c[_0xb9a8[89]]= [{all:true}]};return db[_0xb9a8[100]][_0xb9a8[90]](_0xe463x2c)})[_0xb9a8[40]](function(_0xe463x3d){_0xe463x3f[_0xb9a8[87]]= _0xe463x3d;return _0xe463x3f})}})[_0xb9a8[40]](respondWithFilteredResult(_0xe463x26,_0xe463x2c))[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[103]]= function(_0xe463x20,_0xe463x26,_0xe463x3e){var _0xe463x40;return db[_0xb9a8[105]][_0xb9a8[94]]({where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]}})[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29){return _0xe463x29[_0xb9a8[103]](_0xe463x20[_0xb9a8[67]][_0xb9a8[104]])}})[_0xb9a8[40]](respondWithStatusCode(_0xe463x26,null))[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[106]]= function(_0xe463x20,_0xe463x26,_0xe463x3e){_0xe463x20[_0xb9a8[96]][_0xb9a8[107]]= _0xe463x20[_0xb9a8[109]][_0xb9a8[108]];return db[_0xb9a8[64]][_0xb9a8[94]]({where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]}})[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](saveUpdates(_0xe463x20[_0xb9a8[96]],null))[_0xb9a8[40]](respondWithResult(_0xe463x26,null))[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[110]]= function(_0xe463x20,_0xe463x26,_0xe463x3e){_0xe463x20[_0xb9a8[96]][_0xb9a8[111]]= _0xe463x20[_0xb9a8[109]][_0xb9a8[108]];return db[_0xb9a8[64]][_0xb9a8[94]]({where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]}})[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](saveUpdates(_0xe463x20[_0xb9a8[96]],null))[_0xb9a8[40]](respondWithResult(_0xe463x26,null))[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[112]]= function(_0xe463x20,_0xe463x26,_0xe463x3e){var _0xe463x41=path[_0xb9a8[115]](config[_0xb9a8[113]],_0xb9a8[114]);var _0xe463x42={where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]},attributes:[_0xb9a8[92],_0xb9a8[107]],raw:true};var _0xe463x43=false;return require(_0xb9a8[122])[_0xb9a8[121]]()[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29){_0xe463x43= _0xe463x29[_0xb9a8[120]]}})[_0xb9a8[40]](function(){return db[_0xb9a8[64]][_0xb9a8[94]](_0xe463x42)})[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29){if(!_[_0xb9a8[116]](_0xe463x29[_0xb9a8[107]])){if(fs[_0xb9a8[118]](path[_0xb9a8[115]](config[_0xb9a8[113]],_0xb9a8[117],_0xe463x29[_0xb9a8[107]]))&& _0xe463x43){_0xe463x41= path[_0xb9a8[115]](config[_0xb9a8[113]],_0xb9a8[117],_0xe463x29[_0xb9a8[107]])}};return _0xe463x26[_0xb9a8[119]](_0xe463x41)}})[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[123]]= function(_0xe463x20,_0xe463x26,_0xe463x3e){var _0xe463x41=path[_0xb9a8[115]](config[_0xb9a8[113]],_0xb9a8[124]);var _0xe463x42={where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]},attributes:[_0xb9a8[92],_0xb9a8[111]],raw:true};return db[_0xb9a8[64]][_0xb9a8[94]](_0xe463x42)[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29){if(!_[_0xb9a8[116]](_0xe463x29[_0xb9a8[111]])){if(fs[_0xb9a8[118]](path[_0xb9a8[115]](config[_0xb9a8[113]],_0xb9a8[125],_0xe463x29[_0xb9a8[111]]))){_0xe463x41= path[_0xb9a8[115]](config[_0xb9a8[113]],_0xb9a8[125],_0xe463x29[_0xb9a8[111]])}};return _0xe463x26[_0xb9a8[119]](_0xe463x41)}})[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[126]]= function(_0xe463x20,_0xe463x26,_0xe463x3e){var _0xe463x44=require(_0xb9a8[127]);var _0xe463x45= new _0xe463x44();var _0xe463x46=_0xe463x45[_0xb9a8[131]](_0xe463x20[_0xb9a8[130]][_0xb9a8[129]])[_0xb9a8[128]]();var _0xe463x47={body:_0xe463x20[_0xb9a8[96]],channel:_0xb9a8[132]};var _0xe463x48=[];var _0xe463x49=[];var _0xe463x4a={};return db[_0xb9a8[189]][_0xb9a8[97]]()[_0xb9a8[40]](function(_0xe463x51){if(!_0xe463x51){throw  new db[_0xb9a8[195]].ValidationError(_0xb9a8[194])};_0xe463x48= _[_0xb9a8[197]](_[_0xb9a8[65]](_0xe463x51),[_0xb9a8[196],_0xb9a8[191]]);_0xe463x49= _[_0xb9a8[197]](_[_0xb9a8[65]](_0xe463x51),[_0xb9a8[196],_0xb9a8[191],_0xb9a8[198],_0xb9a8[186]]);if(_0xe463x20[_0xb9a8[96]][_0xb9a8[92]]){delete _0xe463x20[_0xb9a8[96]][_0xb9a8[92]]};if(_[_0xb9a8[116]](_0xe463x20[_0xb9a8[96]][_0xb9a8[185]])){throw  new db[_0xb9a8[195]].ValidationError(_0xb9a8[199])};if(_[_0xb9a8[116]](_0xe463x20[_0xb9a8[96]][_0xb9a8[96]])|| _0xe463x20[_0xb9a8[96]][_0xb9a8[96]]=== _0xb9a8[152]){throw  new db[_0xb9a8[195]].ValidationError(_0xb9a8[200])};if(_[_0xb9a8[116]](_0xe463x20[_0xb9a8[96]][_0xb9a8[188]])){throw  new db[_0xb9a8[195]].ValidationError(_0xb9a8[201]+ _0xe463x49)};if(!_[_0xb9a8[202]](_0xe463x49,_0xe463x20[_0xb9a8[96]][_0xb9a8[188]])){throw  new db[_0xb9a8[195]].ValidationError(_0xb9a8[203]+ _0xe463x49)};_0xe463x4a[_0xe463x20[_0xb9a8[96]][_0xb9a8[188]]]= _0xe463x20[_0xb9a8[96]][_0xb9a8[185]]})[_0xb9a8[40]](function(){return db[_0xb9a8[64]][_0xb9a8[94]]({where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]},include:[{model:db[_0xb9a8[190]],as:_0xb9a8[178],include:[{model:db[_0xb9a8[189]],as:_0xb9a8[184],where:_0xe463x4a,limit:1,order:[[_0xb9a8[191],_0xb9a8[192]]]}]},{model:db[_0xb9a8[193]],as:_0xb9a8[179]}]})})[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29&& _0xe463x29[_0xb9a8[178]]){_0xe463x47[_0xb9a8[139]]= _0xe463x29;_0xe463x47[_0xb9a8[142]]= _0xe463x29[_0xb9a8[179]];_0xe463x47[_0xb9a8[180]]= _0xe463x29[_0xb9a8[178]];_0xe463x47[_0xb9a8[142]]= _[_0xb9a8[183]](_0xe463x47[_0xb9a8[142]],[_0xb9a8[181]],[_0xb9a8[182]]);if(_0xe463x47[_0xb9a8[139]][_0xb9a8[179]]){delete _0xe463x47[_0xb9a8[139]][_0xb9a8[179]]};if(_0xe463x47[_0xb9a8[139]][_0xb9a8[178]]&& _0xe463x47[_0xb9a8[139]][_0xb9a8[178]][_0xb9a8[184]][_0xb9a8[73]]){return _0xe463x47[_0xb9a8[139]][_0xb9a8[178]][_0xb9a8[184]][0]};var _0xe463x50=_[_0xb9a8[187]](_0xe463x20[_0xb9a8[96]],{firstName:_0xe463x20[_0xb9a8[96]][_0xb9a8[185]],phone:_0xe463x20[_0xb9a8[96]][_0xb9a8[185]],ListId:_0xe463x29[_0xb9a8[186]]});_0xe463x50[_0xe463x20[_0xb9a8[96]][_0xb9a8[188]]]= _0xe463x20[_0xb9a8[96]][_0xb9a8[185]];return db[_0xb9a8[189]][_0xb9a8[95]](_0xe463x50,{fields:_0xe463x48,raw:true})}})[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](function(_0xe463x29){_0xe463x47[_0xb9a8[148]]= _0xe463x29;if(_0xe463x29){var _0xe463x4e={ContactId:_0xe463x29[_0xb9a8[92]],ChatWebsiteId:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]],from:(_0xe463x29[_0xb9a8[151]]|| _0xb9a8[152])+ _0xb9a8[153]+ (_0xe463x29[_0xb9a8[154]]|| _0xb9a8[152]),customerIp:_0xe463x20[_0xb9a8[96]][_0xb9a8[162]],referer:_0xe463x20[_0xb9a8[96]][_0xb9a8[163]],browserName:(_0xe463x46[_0xb9a8[164]][_0xb9a8[59]]&& _0xe463x46[_0xb9a8[164]][_0xb9a8[165]])?util[_0xb9a8[167]](_0xb9a8[166],_0xe463x46[_0xb9a8[164]][_0xb9a8[59]],_0xe463x46[_0xb9a8[164]][_0xb9a8[165]]):_0xb9a8[168],browserVersion:_0xe463x46[_0xb9a8[164]][_0xb9a8[165]]|| _0xb9a8[168],osName:util[_0xb9a8[167]](_0xb9a8[166],_0xe463x46[_0xb9a8[169]][_0xb9a8[59]],_0xe463x46[_0xb9a8[169]][_0xb9a8[165]]),osVersion:_0xe463x46[_0xb9a8[169]][_0xb9a8[165]],deviceModel:(_0xe463x46[_0xb9a8[170]][_0xb9a8[62]]&& _0xe463x46[_0xb9a8[170]][_0xb9a8[171]])?util[_0xb9a8[167]](_0xb9a8[172],_0xe463x46[_0xb9a8[170]][_0xb9a8[62]],_0xe463x46[_0xb9a8[170]][_0xb9a8[171]],_0xe463x46[_0xb9a8[170]][_0xb9a8[173]]):null,deviceVendor:_0xe463x46[_0xb9a8[170]][_0xb9a8[171]],deviceType:_0xe463x46[_0xb9a8[170]][_0xb9a8[173]],formData:JSON[_0xb9a8[35]](_0xe463x20[_0xb9a8[96]])};var _0xe463x4f={ChatWebsiteId:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]],closed:false};if(_0xe463x20[_0xb9a8[96]][_0xb9a8[174]]){_0xe463x4f[_0xb9a8[174]]= _0xe463x20[_0xb9a8[96]][_0xb9a8[174]];return db[_0xb9a8[176]][_0xb9a8[94]]({where:_0xe463x4f})[_0xb9a8[40]](function(_0xe463x4d){if(_0xe463x4d){return [_0xe463x4d,false]};_0xe463x4e[_0xb9a8[174]]= _0xe463x20[_0xb9a8[96]][_0xb9a8[174]];_0xe463x4e[_0xb9a8[175]]= _0xe463x20[_0xb9a8[96]][_0xb9a8[175]];return db[_0xb9a8[176]][_0xb9a8[95]](_0xe463x4e)[_0xb9a8[40]](function(_0xe463x4d){return [_0xe463x4d,true]})})};_0xe463x4f[_0xb9a8[177]]= _0xe463x29[_0xb9a8[92]];if(_0xe463x20[_0xb9a8[96]][_0xb9a8[135]]&& _0xe463x20[_0xb9a8[96]][_0xb9a8[135]][_0xb9a8[92]]){_0xe463x4f[_0xb9a8[92]]= _0xe463x20[_0xb9a8[96]][_0xb9a8[135]][_0xb9a8[92]];return db[_0xb9a8[176]][_0xb9a8[94]]({where:_0xe463x4f})[_0xb9a8[40]](function(_0xe463x4d){if(_0xe463x4d){return [_0xe463x4d,false]};return db[_0xb9a8[176]][_0xb9a8[95]](_0xe463x4e)[_0xb9a8[40]](function(_0xe463x4d){return [_0xe463x4d,true]})})};return db[_0xb9a8[176]][_0xb9a8[95]](_0xe463x4e)[_0xb9a8[40]](function(_0xe463x4d){return [_0xe463x4d,true]})}})[_0xb9a8[161]](function(_0xe463x29,_0xe463x4c){if(_0xe463x29){if(!_0xe463x4c){return _0xe463x29[_0xb9a8[56]]({from:(_0xe463x47[_0xb9a8[148]][_0xb9a8[151]]|| _0xb9a8[152])+ _0xb9a8[153]+ (_0xe463x47[_0xb9a8[148]][_0xb9a8[154]]|| _0xb9a8[152])})};if(_0xe463x47[_0xb9a8[139]][_0xb9a8[155]]){_0xe463x47[_0xb9a8[142]][_0xb9a8[158]]({id:0,priority:_0xe463x47[_0xb9a8[142]][_0xb9a8[73]]+ 1,app:_0xb9a8[156],appdata:_0xb9a8[157],interval:_0xb9a8[140]})};var _0xe463x4d=_0xe463x29[_0xb9a8[159]]({plain:true});_0xe463x4d[_0xb9a8[160]]= true;return _0xe463x4d}})[_0xb9a8[40]](function(_0xe463x29){_0xe463x47[_0xb9a8[135]]= _0xe463x29;return db[_0xb9a8[150]][_0xb9a8[95]]({body:_0xe463x20[_0xb9a8[96]][_0xb9a8[96]],ChatWebsiteId:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]],ChatInteractionId:_0xe463x29[_0xb9a8[92]],direction:_0xb9a8[147],ContactId:_0xe463x47[_0xb9a8[148]][_0xb9a8[92]],AttachmentId:_0xe463x20[_0xb9a8[96]][_0xb9a8[149]]})})[_0xb9a8[40]](function(_0xe463x29){_0xe463x47[_0xb9a8[38]]= _0xe463x29;if(_0xe463x47[_0xb9a8[135]][_0xb9a8[134]]){return db[_0xb9a8[146]][_0xb9a8[94]]({attributes:[_0xb9a8[92],_0xb9a8[59]],where:{id:_0xe463x47[_0xb9a8[135]][_0xb9a8[134]]}})[_0xb9a8[40]](function(_0xe463x4b){if(_0xe463x4b){_0xe463x47[_0xb9a8[142]][_0xb9a8[141]]({id:0,priority:0,app:_0xb9a8[136],appdata:_0xe463x4b[_0xb9a8[59]]+ _0xb9a8[137]+ (_0xe463x47[_0xb9a8[139]][_0xb9a8[138]]|| 10),interval:_0xb9a8[140]});_0xe463x47[_0xb9a8[143]]= true};return respondWithRpcPromise(_0xb9a8[144],_0xb9a8[145],_0xe463x47)})};return respondWithRpcPromise(_0xb9a8[144],_0xb9a8[145],_0xe463x47)})[_0xb9a8[40]](function(_0xe463x47){respondWithRpcPromise(_0xb9a8[133],_0xb9a8[133],{event:_0xb9a8[126],message:_0xe463x47},client9002);return _0xe463x47})[_0xb9a8[40]](respondWithResult(_0xe463x26,null))[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[204]]= function(_0xe463x20,_0xe463x26,_0xe463x3e){var _0xe463x52,_0xe463x53,_0xe463x54;var _0xe463x49=[];var _0xe463x48=[];var _0xe463x4a={};return db[_0xb9a8[189]][_0xb9a8[97]]()[_0xb9a8[40]](function(_0xe463x51){if(!_0xe463x51){throw  new db[_0xb9a8[195]].ValidationError(_0xb9a8[194])};_0xe463x48= _[_0xb9a8[197]](_[_0xb9a8[65]](_0xe463x51),[_0xb9a8[196],_0xb9a8[191]]);_0xe463x49= _[_0xb9a8[197]](_[_0xb9a8[65]](_0xe463x51),[_0xb9a8[196],_0xb9a8[191],_0xb9a8[198],_0xb9a8[186]]);if(_0xe463x20[_0xb9a8[96]][_0xb9a8[92]]){delete _0xe463x20[_0xb9a8[96]][_0xb9a8[92]]};if(_[_0xb9a8[116]](_0xe463x20[_0xb9a8[96]][_0xb9a8[185]])){throw _0xe463x26[_0xb9a8[44]](500)[_0xb9a8[60]]( new db[_0xb9a8[195]].ValidationError(_0xb9a8[199]))};if(_[_0xb9a8[116]](_0xe463x20[_0xb9a8[96]][_0xb9a8[96]])|| _0xe463x20[_0xb9a8[96]][_0xb9a8[96]]=== _0xb9a8[152]){throw _0xe463x26[_0xb9a8[44]](500)[_0xb9a8[60]]( new db[_0xb9a8[195]].ValidationError(_0xb9a8[200]))};if(_[_0xb9a8[116]](_0xe463x20[_0xb9a8[96]][_0xb9a8[229]])){throw _0xe463x26[_0xb9a8[44]](500)[_0xb9a8[60]]( new db[_0xb9a8[195]].ValidationError(_0xb9a8[231]+ _0xe463x49))};if(!_[_0xb9a8[202]](_0xe463x49,_0xe463x20[_0xb9a8[96]][_0xb9a8[229]])){throw _0xe463x26[_0xb9a8[44]](500)[_0xb9a8[60]]( new db[_0xb9a8[195]].ValidationError(_0xb9a8[232]+ _0xe463x49))};_0xe463x4a[_0xe463x20[_0xb9a8[96]][_0xb9a8[229]]]= _0xe463x20[_0xb9a8[96]][_0xb9a8[185]]})[_0xb9a8[40]](function(){return db[_0xb9a8[64]][_0xb9a8[94]]({where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]},include:[{model:db[_0xb9a8[190]],as:_0xb9a8[178]}]})})[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29&& _0xe463x29[_0xb9a8[178]]){_0xe463x53= _0xe463x29;var _0xe463x50=_[_0xb9a8[187]](_0xe463x20[_0xb9a8[96]],{firstName:_0xe463x20[_0xb9a8[96]][_0xb9a8[185]],phone:_0xe463x20[_0xb9a8[96]][_0xb9a8[185]],ListId:_0xe463x29[_0xb9a8[186]]});_0xe463x50[_0xe463x20[_0xb9a8[96]][_0xb9a8[229]]]= _0xe463x20[_0xb9a8[96]][_0xb9a8[185]];return db[_0xb9a8[189]][_0xb9a8[230]]({where:_0xe463x4a,defaults:_0xe463x50})}})[_0xb9a8[161]](function(_0xe463x29){if(_0xe463x29){_0xe463x54= _0xe463x29;var _0xe463x55=fs[_0xb9a8[224]](path[_0xb9a8[115]](config[_0xb9a8[113]],_0xb9a8[222]),_0xb9a8[223]);var _0xe463x56=ejs[_0xb9a8[227]](_0xe463x55,{body:_[_0xb9a8[225]](_0xe463x20[_0xb9a8[96]][_0xb9a8[96]]),bodyTitle:_0xe463x53[_0xb9a8[226]]});return db[_0xb9a8[228]][_0xb9a8[95]]({body:_0xe463x56,ContactId:_0xe463x29[_0xb9a8[92]],ChatWebsiteId:_0xe463x53[_0xb9a8[92]]})}})[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29){_0xe463x52= _0xe463x29;return db[_0xb9a8[221]][_0xb9a8[102]]({where:{service:true},include:[{model:db[_0xb9a8[220]],as:_0xb9a8[205],raw:true}]})}})[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29&& _0xe463x29[_0xb9a8[205]]&& _0xe463x53[_0xb9a8[206]]){var _0xe463x2c={tls:{rejectUnauthorized:false}};if(_0xe463x29[_0xb9a8[205]][_0xb9a8[207]]){_0xe463x2c[_0xb9a8[207]]= _0xe463x29[_0xb9a8[205]][_0xb9a8[207]]}else {_0xe463x2c[_0xb9a8[208]]= _0xe463x29[_0xb9a8[205]][_0xb9a8[208]];_0xe463x2c[_0xb9a8[209]]= _0xe463x29[_0xb9a8[205]][_0xb9a8[209]];_0xe463x2c[_0xb9a8[210]]= _0xe463x29[_0xb9a8[205]][_0xb9a8[210]]};if(_0xe463x29[_0xb9a8[205]][_0xb9a8[211]]){_0xe463x2c[_0xb9a8[212]]= {user:_0xe463x29[_0xb9a8[205]][_0xb9a8[213]],pass:_0xe463x29[_0xb9a8[205]][_0xb9a8[214]]}};return respondWithRpcPromise(_0xb9a8[215],_0xb9a8[216],{account:_0xe463x2c,message:{from:util[_0xb9a8[167]](_0xb9a8[217],_0xe463x29[_0xb9a8[59]],_0xe463x29[_0xb9a8[218]]|| _0xe463x29[_0xb9a8[205]][_0xb9a8[213]]),to:_0xe463x53[_0xb9a8[206]],subject:_0xe463x53[_0xb9a8[219]],text:_0xe463x52[_0xb9a8[96]]}},client9003)[_0xb9a8[40]](function(){return _0xe463x52})[_0xb9a8[31]](function(_0xe463x25){console[_0xb9a8[30]](_0xe463x25)})}})[_0xb9a8[40]](function(){if(_0xe463x52){return _0xe463x52}})[_0xb9a8[40]](respondWithResult(_0xe463x26,null))[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[233]]= function(_0xe463x20,_0xe463x26,_0xe463x3e){return db[_0xb9a8[176]][_0xb9a8[94]]({where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]}})[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29){return _0xe463x29[_0xb9a8[233]](_0xe463x20[_0xb9a8[96]][_0xb9a8[104]],_[_0xb9a8[234]](_0xe463x20[_0xb9a8[96]],[_0xb9a8[104],_0xb9a8[92]])|| {})}})[_0xb9a8[40]](respondWithResult(_0xe463x26,null))[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[235]]= function(_0xe463x20,_0xe463x26,_0xe463x3e){var _0xe463x2c={raw:false,where:{}};var _0xe463x38={};var _0xe463x3f={count:0,rows:[]};return db[_0xb9a8[64]][_0xb9a8[102]]({where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]}})[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29){_0xe463x38[_0xb9a8[62]]= _[_0xb9a8[65]](db[_0xb9a8[176]][_0xb9a8[63]]);_0xe463x38[_0xb9a8[67]]= _[_0xb9a8[65]](_0xe463x20[_0xb9a8[67]]);_0xe463x38[_0xb9a8[69]]= _[_0xb9a8[70]](_0xe463x38[_0xb9a8[62]],_0xe463x38[_0xb9a8[67]]);_0xe463x2c[_0xb9a8[71]]= _[_0xb9a8[70]](_0xe463x38[_0xb9a8[62]],qs[_0xb9a8[72]](_0xe463x20[_0xb9a8[67]][_0xb9a8[72]]));_0xe463x2c[_0xb9a8[71]]= (_0xe463x2c[_0xb9a8[71]][_0xb9a8[73]])?_0xe463x2c[_0xb9a8[71]]:_0xe463x38[_0xb9a8[62]];if(!_0xe463x20[_0xb9a8[67]][_0xb9a8[75]](_0xb9a8[74])){_0xe463x2c[_0xb9a8[48]]= qs[_0xb9a8[48]](_0xe463x20[_0xb9a8[67]][_0xb9a8[48]]);_0xe463x2c[_0xb9a8[47]]= qs[_0xb9a8[47]](_0xe463x20[_0xb9a8[67]][_0xb9a8[47]])};_0xe463x2c[_0xb9a8[76]]= qs[_0xb9a8[77]](_0xe463x20[_0xb9a8[67]][_0xb9a8[77]]);_0xe463x2c[_0xb9a8[78]]= qs[_0xb9a8[69]](_[_0xb9a8[79]](_0xe463x20[_0xb9a8[67]],_0xe463x38[_0xb9a8[69]]));_0xe463x2c[_0xb9a8[78]][_0xb9a8[99]]= _0xe463x29[_0xb9a8[92]];if(_0xe463x20[_0xb9a8[67]][_0xb9a8[83]]){_0xe463x2c[_0xb9a8[78]]= _[_0xb9a8[82]](_0xe463x2c[_0xb9a8[78]],{$or:_[_0xb9a8[85]](_0xe463x2c[_0xb9a8[71]],function(_0xe463x3b){var _0xe463x39={};_0xe463x39[_0xe463x3b]= {$like:_0xb9a8[84]+ _0xe463x20[_0xb9a8[67]][_0xb9a8[83]]+ _0xb9a8[84]};return _0xe463x39})})};_0xe463x2c= _[_0xb9a8[82]]({},_0xe463x2c,_0xe463x20[_0xb9a8[86]]);return db[_0xb9a8[176]][_0xb9a8[46]]({where:_0xe463x2c[_0xb9a8[78]]})[_0xb9a8[40]](function(_0xe463x2d){_0xe463x3f[_0xb9a8[46]]= _0xe463x2d;if(_0xe463x20[_0xb9a8[67]][_0xb9a8[88]]){_0xe463x2c[_0xb9a8[89]]= [{model:db[_0xb9a8[189]],as:_0xb9a8[236],required:false},{model:db[_0xb9a8[146]],as:_0xb9a8[237],attributes:[_0xb9a8[59],_0xb9a8[238],_0xb9a8[239]],required:false},{model:db[_0xb9a8[240]],as:_0xb9a8[241],attributes:[_0xb9a8[92],_0xb9a8[59],_0xb9a8[242]],where:_0xe463x20[_0xb9a8[67]][_0xb9a8[243]]?{id:_0xe463x20[_0xb9a8[67]][_0xb9a8[243]]}:undefined,required:_0xe463x20[_0xb9a8[67]][_0xb9a8[243]]?true:false}]};return db[_0xb9a8[176]][_0xb9a8[90]](_0xe463x2c)})[_0xb9a8[40]](function(_0xe463x3d){_0xe463x3f[_0xb9a8[87]]= _0xe463x3d;return _0xe463x3f})}})[_0xb9a8[40]](respondWithFilteredResult(_0xe463x26,_0xe463x2c))[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[244]]= function(_0xe463x20,_0xe463x26,_0xe463x3e){var _0xe463x43=false;var _0xe463x57;var _0xe463x58;return db[_0xb9a8[64]][_0xb9a8[94]]({where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]},include:[{model:db[_0xb9a8[254]],as:_0xb9a8[254],include:[{model:db[_0xb9a8[254]],as:_0xb9a8[255],attributes:[_0xb9a8[256]],raw:true}]}]})[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29){_0xe463x57= _0xe463x29;return _0xe463x29[_0xb9a8[266]]({raw:true})}})[_0xb9a8[40]](function(_0xe463x40){if(_0xe463x57){if(_0xe463x40){_0xe463x58= _0xe463x40}};return require(_0xb9a8[122])[_0xb9a8[121]]()})[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29){_0xe463x43= _0xe463x29[_0xb9a8[120]]}})[_0xb9a8[40]](function(){if(_0xe463x57[_0xb9a8[254]]&& _0xe463x57[_0xb9a8[254]][_0xb9a8[255]]){var _0xe463x5b=[];for(var _0xe463x5c=0;_0xe463x5c< _0xe463x57[_0xb9a8[254]][_0xb9a8[255]][_0xb9a8[73]];_0xe463x5c++){var _0xe463x5d=_0xe463x57[_0xb9a8[254]][_0xb9a8[255]][_0xe463x5c][_0xb9a8[159]]({plain:true})[_0xb9a8[256]];_0xe463x5b[_0xb9a8[158]](respondWithRpcPromise(_0xb9a8[260],_0xb9a8[244],{command:_0xe463x57[_0xb9a8[261]]?util[_0xb9a8[167]](_0xb9a8[262],_0xe463x5d,_0xe463x57[_0xb9a8[261]]):util[_0xb9a8[167]](_0xb9a8[263],_0xe463x5d)},client9002)[_0xb9a8[40]](function(_0xe463x26){return (_0xe463x26&& _0xe463x26[_0xb9a8[259]](_0xb9a8[258])>= 0)?true:false})[_0xb9a8[31]](function(_0xe463x25){logger[_0xb9a8[30]](_0xb9a8[257],_0xe463x5d[_0xb9a8[92]],_0xe463x5d);return true}))};return BPromise[_0xb9a8[265]](_0xe463x5b)[_0xb9a8[40]](function(_0xe463x42){return _[_0xb9a8[264]](_0xe463x42)})}else {return true}})[_0xb9a8[40]](function(_0xe463x59){var _0xe463x5a=fs[_0xb9a8[224]](path[_0xb9a8[115]](config[_0xb9a8[113]],_0xb9a8[245]),_0xb9a8[223]);var _0xe463x42={remote:_0xe463x57[_0xb9a8[246]],query:querystring[_0xb9a8[35]](_[_0xb9a8[82]](_0xe463x57[_0xb9a8[159]]({plain:true}),{customerIp:_0xe463x20[_0xb9a8[130]][_0xb9a8[249]]|| _0xe463x20[_0xb9a8[130]][_0xb9a8[250]]|| _0xe463x20[_0xb9a8[252]][_0xb9a8[251]]|| _0xe463x20[_0xb9a8[253]],referer:_0xe463x20[_0xb9a8[130]][_0xb9a8[163]],online:_0xe463x59,custom:_0xe463x43}))[_0xb9a8[248]](/'/g,_0xb9a8[247])};_0xe463x26[_0xb9a8[60]](ejs[_0xb9a8[227]](Mustache[_0xb9a8[227]](_0xe463x5a,_0xe463x42),{proactiveActions:_0xe463x58}))})[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[267]]= function(_0xe463x20,_0xe463x26,_0xe463x3e){return db[_0xb9a8[64]][_0xb9a8[102]]({where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]}})[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29){return db[_0xb9a8[271]][_0xb9a8[270]](function(_0xe463x5e){return db[_0xb9a8[193]][_0xb9a8[57]]({where:{ChatWebsiteId:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]},transaction:_0xe463x5e})[_0xb9a8[40]](function(_0xe463x5f){var _0xe463x56=_[_0xb9a8[85]](_0xe463x20[_0xb9a8[96]],function(_0xe463x60){_0xe463x60[_0xb9a8[99]]= _0xe463x20[_0xb9a8[93]][_0xb9a8[92]];return _0xe463x60});return db[_0xb9a8[193]][_0xb9a8[269]](_0xe463x56,{transaction:_0xe463x5e})})})[_0xb9a8[40]](function(){return db[_0xb9a8[193]][_0xb9a8[268]]({where:{ChatWebsiteId:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]},order:_0xb9a8[181]})})}})[_0xb9a8[40]](respondWithResult(_0xe463x26,null))[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[272]]= function(_0xe463x20,_0xe463x29,_0xe463x3e){var _0xe463x2c={};var _0xe463x38={};var _0xe463x61;var _0xe463x2d;return db[_0xb9a8[64]][_0xb9a8[102]]({where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]}})[_0xb9a8[40]](handleEntityNotFound(_0xe463x29,null))[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29){_0xe463x61= _0xe463x29;_0xe463x38[_0xb9a8[62]]= _[_0xb9a8[65]](db[_0xb9a8[193]][_0xb9a8[63]]);_0xe463x38[_0xb9a8[67]]= _[_0xb9a8[65]](_0xe463x20[_0xb9a8[67]]);_0xe463x38[_0xb9a8[69]]= _[_0xb9a8[70]](_0xe463x38[_0xb9a8[62]],_0xe463x38[_0xb9a8[67]]);_0xe463x2c[_0xb9a8[71]]= _[_0xb9a8[70]](_0xe463x38[_0xb9a8[62]],qs[_0xb9a8[72]](_0xe463x20[_0xb9a8[67]][_0xb9a8[72]]));_0xe463x2c[_0xb9a8[71]]= (_0xe463x2c[_0xb9a8[71]][_0xb9a8[73]])?_0xe463x2c[_0xb9a8[71]]:_0xe463x38[_0xb9a8[62]];_0xe463x2c[_0xb9a8[76]]= qs[_0xb9a8[77]](_0xe463x20[_0xb9a8[67]][_0xb9a8[77]]);_0xe463x2c[_0xb9a8[78]]= qs[_0xb9a8[69]](_[_0xb9a8[79]](_0xe463x20[_0xb9a8[67]],_0xe463x38[_0xb9a8[69]]));if(_0xe463x20[_0xb9a8[67]][_0xb9a8[83]]){_0xe463x2c[_0xb9a8[78]]= _[_0xb9a8[82]](_0xe463x2c[_0xb9a8[78]],{$or:_[_0xb9a8[85]](_0xe463x2c[_0xb9a8[71]],function(_0xe463x3b){var _0xe463x39={};_0xe463x39[_0xe463x3b]= {$like:_0xb9a8[84]+ _0xe463x20[_0xb9a8[67]][_0xb9a8[83]]+ _0xb9a8[84]};return _0xe463x39})})};_0xe463x2c= _[_0xb9a8[82]]({},_0xe463x2c,_0xe463x20[_0xb9a8[86]]);return _0xe463x61[_0xb9a8[272]](_0xe463x2c)}})[_0xb9a8[40]](function(_0xe463x40){if(_0xe463x40){_0xe463x2d= _0xe463x40[_0xb9a8[73]];if(!_0xe463x20[_0xb9a8[67]][_0xb9a8[75]](_0xb9a8[74])){_0xe463x2c[_0xb9a8[48]]= qs[_0xb9a8[48]](_0xe463x20[_0xb9a8[67]][_0xb9a8[48]]);_0xe463x2c[_0xb9a8[47]]= qs[_0xb9a8[47]](_0xe463x20[_0xb9a8[67]][_0xb9a8[47]])};return _0xe463x61[_0xb9a8[272]](_0xe463x2c)}})[_0xb9a8[40]](function(_0xe463x3d){if(_0xe463x3d){return _0xe463x3d?{count:_0xe463x2d,rows:_0xe463x3d}:null}})[_0xb9a8[40]](respondWithResult(_0xe463x29,null))[_0xb9a8[31]](handleError(_0xe463x29,null))};exports[_0xb9a8[273]]= function(_0xe463x20,_0xe463x26,_0xe463x3e){if(_0xe463x20[_0xb9a8[96]][_0xb9a8[92]]){delete _0xe463x20[_0xb9a8[96]][_0xb9a8[92]]};return db[_0xb9a8[64]][_0xb9a8[94]]({where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]}})[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29){_0xe463x20[_0xb9a8[96]][_0xb9a8[99]]= _0xe463x29[_0xb9a8[92]];return db[_0xb9a8[274]][_0xb9a8[95]](_0xe463x20[_0xb9a8[96]])}})[_0xb9a8[40]](respondWithResult(_0xe463x26,null))[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[275]]= function(_0xe463x20,_0xe463x26,_0xe463x3e){return db[_0xb9a8[276]][_0xb9a8[94]]({where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]}})[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29){return _0xe463x29[_0xb9a8[275]](_0xe463x20[_0xb9a8[96]][_0xb9a8[104]],_[_0xb9a8[234]](_0xe463x20[_0xb9a8[96]],[_0xb9a8[104],_0xb9a8[92]])|| {})}})[_0xb9a8[40]](respondWithResult(_0xe463x26,null))[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[277]]= function(_0xe463x20,_0xe463x29,_0xe463x3e){var _0xe463x2c={};var _0xe463x38={};var _0xe463x61;var _0xe463x2d;return db[_0xb9a8[64]][_0xb9a8[102]]({where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]}})[_0xb9a8[40]](handleEntityNotFound(_0xe463x29,null))[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29){_0xe463x61= _0xe463x29;_0xe463x38[_0xb9a8[62]]= _[_0xb9a8[65]](db[_0xb9a8[274]][_0xb9a8[63]]);_0xe463x38[_0xb9a8[67]]= _[_0xb9a8[65]](_0xe463x20[_0xb9a8[67]]);_0xe463x38[_0xb9a8[69]]= _[_0xb9a8[70]](_0xe463x38[_0xb9a8[62]],_0xe463x38[_0xb9a8[67]]);_0xe463x2c[_0xb9a8[71]]= _[_0xb9a8[70]](_0xe463x38[_0xb9a8[62]],qs[_0xb9a8[72]](_0xe463x20[_0xb9a8[67]][_0xb9a8[72]]));_0xe463x2c[_0xb9a8[71]]= (_0xe463x2c[_0xb9a8[71]][_0xb9a8[73]])?_0xe463x2c[_0xb9a8[71]]:_0xe463x38[_0xb9a8[62]];_0xe463x2c[_0xb9a8[76]]= qs[_0xb9a8[77]](_0xe463x20[_0xb9a8[67]][_0xb9a8[77]]);_0xe463x2c[_0xb9a8[78]]= qs[_0xb9a8[69]](_[_0xb9a8[79]](_0xe463x20[_0xb9a8[67]],_0xe463x38[_0xb9a8[69]]));if(_0xe463x20[_0xb9a8[67]][_0xb9a8[83]]){_0xe463x2c[_0xb9a8[78]]= _[_0xb9a8[82]](_0xe463x2c[_0xb9a8[78]],{$or:_[_0xb9a8[85]](_0xe463x2c[_0xb9a8[71]],function(_0xe463x3b){var _0xe463x39={};_0xe463x39[_0xe463x3b]= {$like:_0xb9a8[84]+ _0xe463x20[_0xb9a8[67]][_0xb9a8[83]]+ _0xb9a8[84]};return _0xe463x39})})};_0xe463x2c= _[_0xb9a8[82]]({},_0xe463x2c,_0xe463x20[_0xb9a8[86]]);return _0xe463x61[_0xb9a8[277]](_0xe463x2c)}})[_0xb9a8[40]](function(_0xe463x40){if(_0xe463x40){_0xe463x2d= _0xe463x40[_0xb9a8[73]];if(!_0xe463x20[_0xb9a8[67]][_0xb9a8[75]](_0xb9a8[74])){_0xe463x2c[_0xb9a8[48]]= qs[_0xb9a8[48]](_0xe463x20[_0xb9a8[67]][_0xb9a8[48]]);_0xe463x2c[_0xb9a8[47]]= qs[_0xb9a8[47]](_0xe463x20[_0xb9a8[67]][_0xb9a8[47]])};return _0xe463x61[_0xb9a8[277]](_0xe463x2c)}})[_0xb9a8[40]](function(_0xe463x3d){if(_0xe463x3d){return _0xe463x3d?{count:_0xe463x2d,rows:_0xe463x3d}:null}})[_0xb9a8[40]](respondWithResult(_0xe463x29,null))[_0xb9a8[31]](handleError(_0xe463x29,null))};exports[_0xb9a8[278]]= function(_0xe463x20,_0xe463x26,_0xe463x3e){return db[_0xb9a8[279]][_0xb9a8[94]]({where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]}})[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29){return _0xe463x29[_0xb9a8[278]](_0xe463x20[_0xb9a8[96]][_0xb9a8[104]],_[_0xb9a8[234]](_0xe463x20[_0xb9a8[96]],[_0xb9a8[104],_0xb9a8[92]])|| {})}})[_0xb9a8[40]](respondWithResult(_0xe463x26,null))[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[266]]= function(_0xe463x20,_0xe463x29,_0xe463x3e){var _0xe463x2c={};var _0xe463x38={};var _0xe463x61;var _0xe463x2d;return db[_0xb9a8[64]][_0xb9a8[102]]({where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]}})[_0xb9a8[40]](handleEntityNotFound(_0xe463x29,null))[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29){_0xe463x61= _0xe463x29;_0xe463x38[_0xb9a8[62]]= _[_0xb9a8[65]](db[_0xb9a8[280]][_0xb9a8[63]]);_0xe463x38[_0xb9a8[67]]= _[_0xb9a8[65]](_0xe463x20[_0xb9a8[67]]);_0xe463x38[_0xb9a8[69]]= _[_0xb9a8[70]](_0xe463x38[_0xb9a8[62]],_0xe463x38[_0xb9a8[67]]);_0xe463x2c[_0xb9a8[71]]= _[_0xb9a8[70]](_0xe463x38[_0xb9a8[62]],qs[_0xb9a8[72]](_0xe463x20[_0xb9a8[67]][_0xb9a8[72]]));_0xe463x2c[_0xb9a8[71]]= (_0xe463x2c[_0xb9a8[71]][_0xb9a8[73]])?_0xe463x2c[_0xb9a8[71]]:_0xe463x38[_0xb9a8[62]];_0xe463x2c[_0xb9a8[76]]= qs[_0xb9a8[77]](_0xe463x20[_0xb9a8[67]][_0xb9a8[77]]);_0xe463x2c[_0xb9a8[78]]= qs[_0xb9a8[69]](_[_0xb9a8[79]](_0xe463x20[_0xb9a8[67]],_0xe463x38[_0xb9a8[69]]));if(_0xe463x20[_0xb9a8[67]][_0xb9a8[83]]){_0xe463x2c[_0xb9a8[78]]= _[_0xb9a8[82]](_0xe463x2c[_0xb9a8[78]],{$or:_[_0xb9a8[85]](_0xe463x2c[_0xb9a8[71]],function(_0xe463x3b){var _0xe463x39={};_0xe463x39[_0xe463x3b]= {$like:_0xb9a8[84]+ _0xe463x20[_0xb9a8[67]][_0xb9a8[83]]+ _0xb9a8[84]};return _0xe463x39})})};_0xe463x2c= _[_0xb9a8[82]]({},_0xe463x2c,_0xe463x20[_0xb9a8[86]]);return _0xe463x61[_0xb9a8[266]](_0xe463x2c)}})[_0xb9a8[40]](function(_0xe463x40){if(_0xe463x40){_0xe463x2d= _0xe463x40[_0xb9a8[73]];if(!_0xe463x20[_0xb9a8[67]][_0xb9a8[75]](_0xb9a8[74])){_0xe463x2c[_0xb9a8[48]]= qs[_0xb9a8[48]](_0xe463x20[_0xb9a8[67]][_0xb9a8[48]]);_0xe463x2c[_0xb9a8[47]]= qs[_0xb9a8[47]](_0xe463x20[_0xb9a8[67]][_0xb9a8[47]])};return _0xe463x61[_0xb9a8[266]](_0xe463x2c)}})[_0xb9a8[40]](function(_0xe463x3d){if(_0xe463x3d){return _0xe463x3d?{count:_0xe463x2d,rows:_0xe463x3d}:null}})[_0xb9a8[40]](respondWithResult(_0xe463x29,null))[_0xb9a8[31]](handleError(_0xe463x29,null))};exports[_0xb9a8[281]]= function(_0xe463x20,_0xe463x26,_0xe463x3e){var _0xe463x62=_0xe463x20[_0xb9a8[67]][_0xb9a8[282]]=== _0xb9a8[283]?_0xb9a8[284]:_0xb9a8[285];return db[_0xb9a8[64]][_0xb9a8[94]]({attributes:[_0xb9a8[92],_0xe463x62],where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]}})[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29){var _0xe463x63=_0xe463x29[_0xe463x62];var _0xe463x3d=(_0xe463x63&& _0xe463x63[_0xb9a8[286]])?_0xe463x63[_0xb9a8[286]]:[];_0xe463x26[_0xb9a8[60]]({fromKey:_[_0xb9a8[116]](_0xe463x63[_0xb9a8[287]])?undefined:_0xe463x63[_0xb9a8[287]],count:_0xe463x3d[_0xb9a8[73]],rows:_0xe463x3d})}})[_0xb9a8[31]](handleError(_0xe463x26,null))};exports[_0xb9a8[288]]= function(_0xe463x20,_0xe463x26,_0xe463x3e){var _0xe463x2c={raw:true,where:{}};var _0xe463x38={};var _0xe463x3f={count:0,rows:[]};return db[_0xb9a8[64]][_0xb9a8[102]]({where:{id:_0xe463x20[_0xb9a8[93]][_0xb9a8[92]]}})[_0xb9a8[40]](handleEntityNotFound(_0xe463x26,null))[_0xb9a8[40]](function(_0xe463x29){if(_0xe463x29){_0xe463x38[_0xb9a8[62]]= _[_0xb9a8[65]](db[_0xb9a8[228]][_0xb9a8[63]]);_0xe463x38[_0xb9a8[67]]= _[_0xb9a8[65]](_0xe463x20[_0xb9a8[67]]);_0xe463x38[_0xb9a8[69]]= _[_0xb9a8[70]](_0xe463x38[_0xb9a8[62]],_0xe463x38[_0xb9a8[67]]);_0xe463x2c[_0xb9a8[71]]= _[_0xb9a8[70]](_0xe463x38[_0xb9a8[62]],qs[_0xb9a8[72]](_0xe463x20[_0xb9a8[67]][_0xb9a8[72]]));_0xe463x2c[_0xb9a8[71]]= (_0xe463x2c[_0xb9a8[71]][_0xb9a8[73]])?_0xe463x2c[_0xb9a8[71]]:_0xe463x38[_0xb9a8[62]];if(!_0xe463x20[_0xb9a8[67]][_0xb9a8[75]](_0xb9a8[74])){_0xe463x2c[_0xb9a8[48]]= qs[_0xb9a8[48]](_0xe463x20[_0xb9a8[67]][_0xb9a8[48]]);_0xe463x2c[_0xb9a8[47]]= qs[_0xb9a8[47]](_0xe463x20[_0xb9a8[67]][_0xb9a8[47]])};_0xe463x2c[_0xb9a8[76]]= qs[_0xb9a8[77]](_0xe463x20[_0xb9a8[67]][_0xb9a8[77]]);_0xe463x2c[_0xb9a8[78]]= qs[_0xb9a8[69]](_[_0xb9a8[79]](_0xe463x20[_0xb9a8[67]],_0xe463x38[_0xb9a8[69]]));_0xe463x2c[_0xb9a8[78]][_0xb9a8[99]]= _0xe463x29[_0xb9a8[92]];if(_0xe463x20[_0xb9a8[67]][_0xb9a8[83]]){_0xe463x2c[_0xb9a8[78]]= _[_0xb9a8[82]](_0xe463x2c[_0xb9a8[78]],{$or:_[_0xb9a8[85]](_0xe463x2c[_0xb9a8[71]],function(_0xe463x3b){var _0xe463x39={};_0xe463x39[_0xe463x3b]= {$like:_0xb9a8[84]+ _0xe463x20[_0xb9a8[67]][_0xb9a8[83]]+ _0xb9a8[84]};return _0xe463x39})})};_0xe463x2c= _[_0xb9a8[82]]({},_0xe463x2c,_0xe463x20[_0xb9a8[86]]);return db[_0xb9a8[228]][_0xb9a8[46]]({where:_0xe463x2c[_0xb9a8[78]]})[_0xb9a8[40]](function(_0xe463x2d){_0xe463x3f[_0xb9a8[46]]= _0xe463x2d;if(_0xe463x20[_0xb9a8[67]][_0xb9a8[88]]){_0xe463x2c[_0xb9a8[89]]= [{all:true}]};return db[_0xb9a8[228]][_0xb9a8[90]](_0xe463x2c)})[_0xb9a8[40]](function(_0xe463x3d){_0xe463x3f[_0xb9a8[87]]= _0xe463x3d;return _0xe463x3f})}})[_0xb9a8[40]](respondWithFilteredResult(_0xe463x26,_0xe463x2c))[_0xb9a8[31]](handleError(_0xe463x26,null))}
\ No newline at end of file
+var _0xf9b1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x64\x64\x41\x6E\x73\x77\x65\x72","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x72\x65\x6D\x6F\x76\x65\x41\x6E\x73\x77\x65\x72\x73","\x69\x64\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x61\x64\x64\x4C\x6F\x67\x6F","\x73\x69\x74\x65\x70\x69\x63","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65","\x61\x64\x64\x41\x76\x61\x74\x61\x72","\x61\x67\x65\x6E\x74\x41\x76\x61\x74\x61\x72","\x67\x65\x74\x4C\x6F\x67\x6F","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6C\x6F\x67\x6F\x73\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x6C\x6F\x67\x6F\x2E\x70\x6E\x67","\x6A\x6F\x69\x6E","\x69\x73\x4E\x69\x6C","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6C\x6F\x67\x6F\x73\x2F","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x63\x75\x73\x74\x6F\x6D","\x67\x65\x74\x4C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x75\x74\x69\x6C","\x67\x65\x74\x41\x76\x61\x74\x61\x72","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x61\x76\x61\x74\x61\x72\x73\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x61\x76\x61\x74\x61\x72\x2E\x70\x6E\x67","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x61\x76\x61\x74\x61\x72\x73\x2F","\x6E\x6F\x74\x69\x66\x79","\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74\x2D\x70\x61\x72\x73\x65\x72","\x67\x65\x74\x52\x65\x73\x75\x6C\x74","\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74","\x68\x65\x61\x64\x65\x72\x73","\x73\x65\x74\x55\x41","\x63\x68\x61\x74","\x45\x76\x65\x6E\x74\x4D\x61\x6E\x61\x67\x65\x72","\x55\x73\x65\x72\x49\x64","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x67\x65\x6E\x74","\x2C","\x77\x61\x69\x74\x46\x6F\x72\x54\x68\x65\x41\x73\x73\x69\x67\x6E\x65\x64\x41\x67\x65\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x75\x6E\x73\x68\x69\x66\x74","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x6F\x72\x63\x65\x64\x4F\x77\x6E\x65\x72\x73\x68\x69\x70","\x53\x74\x61\x72\x74","\x73\x74\x61\x72\x74\x52\x6F\x75\x74\x69\x6E\x67","\x55\x73\x65\x72","\x69\x6E","\x63\x6F\x6E\x74\x61\x63\x74","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x49\x64","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","","\x20","\x6C\x61\x73\x74\x4E\x61\x6D\x65","\x61\x75\x74\x6F\x63\x6C\x6F\x73\x65","\x63\x6C\x6F\x73\x65","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x70\x75\x73\x68","\x67\x65\x74","\x63\x72\x65\x61\x74\x65\x64","\x73\x70\x72\x65\x61\x64","\x63\x75\x73\x74\x6F\x6D\x65\x72\x49\x70","\x72\x65\x66\x65\x72\x65\x72","\x62\x72\x6F\x77\x73\x65\x72","\x76\x65\x72\x73\x69\x6F\x6E","\x25\x73\x20\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x6F\x73","\x64\x65\x76\x69\x63\x65","\x76\x65\x6E\x64\x6F\x72","\x25\x73\x20\x25\x73\x20\x25\x73","\x74\x79\x70\x65","\x74\x68\x72\x65\x61\x64\x49\x64","\x65\x78\x74\x65\x72\x6E\x61\x6C\x55\x72\x6C","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6C\x69\x73\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x61\x73\x63","\x6F\x72\x64\x65\x72\x42\x79","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x66\x72\x6F\x6D","\x4C\x69\x73\x74\x49\x64","\x64\x65\x66\x61\x75\x6C\x74\x73","\x6D\x61\x70\x4B\x65\x79","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6D\x4C\x69\x73\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6E\x6F\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x20\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x66\x72\x6F\x6D\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","\x62\x6F\x64\x79\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x20\x61\x6E\x64\x20\x6E\x6F\x74\x20\x65\x6D\x70\x74\x79","\x6D\x61\x70\x4B\x65\x79\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x6D\x61\x70\x4B\x65\x79\x20\x69\x6E\x76\x61\x6C\x69\x64\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x6F\x66\x66\x6C\x69\x6E\x65","\x53\x6D\x74\x70","\x66\x6F\x72\x77\x61\x72\x64\x4F\x66\x66\x6C\x69\x6E\x65\x41\x64\x64\x72\x65\x73\x73","\x73\x65\x72\x76\x69\x63\x65","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x65\x63\x75\x72\x65","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E","\x61\x75\x74\x68","\x75\x73\x65\x72","\x70\x61\x73\x73","\x53\x65\x6E\x64\x4D\x61\x69\x6C","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x65\x6D\x61\x69\x6C","\x6F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x53\x75\x62\x6A\x65\x63\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73\x2F\x63\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x2E\x65\x6A\x73","\x75\x74\x66\x38","\x72\x65\x61\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x74\x6F\x50\x61\x69\x72\x73","\x6F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x42\x6F\x64\x79","\x72\x65\x6E\x64\x65\x72","\x43\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65","\x6D\x61\x70\x4B\x65\x79\x4F\x66\x66\x6C\x69\x6E\x65","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x6D\x61\x70\x4B\x65\x79\x4F\x66\x66\x6C\x69\x6E\x65\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x6D\x61\x70\x4B\x65\x79\x4F\x66\x66\x6C\x69\x6E\x65\x20\x69\x6E\x76\x61\x6C\x69\x64\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x61\x64\x64\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6F\x6D\x69\x74","\x67\x65\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x43\x6F\x6E\x74\x61\x63\x74","\x4F\x77\x6E\x65\x72","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x54\x61\x67","\x54\x61\x67\x73","\x63\x6F\x6C\x6F\x72","\x74\x61\x67","\x67\x65\x74\x53\x6E\x69\x70\x70\x65\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x63\x68\x61\x74\x2F\x69\x66\x72\x61\x6D\x65\x2E\x6A\x73","\x72\x65\x6D\x6F\x74\x65","\x5C\x27","\x72\x65\x70\x6C\x61\x63\x65","\x78\x2D\x66\x6F\x72\x77\x61\x72\x64\x65\x64\x2D\x66\x6F\x72","\x78\x2D\x72\x65\x61\x6C\x2D\x69\x70","\x72\x65\x6D\x6F\x74\x65\x41\x64\x64\x72\x65\x73\x73","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x69\x70","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x5B\x25\x73\x5D\x5B\x49\x4E\x54\x45\x52\x56\x41\x4C\x5D\x20\x25\x73","\x74\x72\x75\x65","\x69\x6E\x64\x65\x78\x4F\x66","\x43\x6F\x6D\x6D\x61\x6E\x64","\x74\x69\x6D\x65\x7A\x6F\x6E\x65","\x69\x66\x74\x69\x6D\x65\x20\x25\x73\x2C\x25\x73","\x69\x66\x74\x69\x6D\x65\x20\x25\x73","\x73\x6F\x6D\x65","\x61\x6C\x6C","\x67\x65\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x67\x65\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x43\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x63\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x61\x64\x64\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x6F\x6E\x6C\x69\x6E\x65","\x66\x61\x6C\x73\x65","\x6F\x66\x66\x6C\x69\x6E\x65\x46\x6F\x72\x6D","\x6F\x6E\x6C\x69\x6E\x65\x46\x6F\x72\x6D","\x69\x74\x65\x6D\x73","\x66\x72\x6F\x6D\x4B\x65\x79","\x67\x65\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x73"];_0xf9b1[0];var jsonpatch=require(_0xf9b1[1]);var rp=require(_0xf9b1[2]);var moment=require(_0xf9b1[3]);var BPromise=require(_0xf9b1[4]);var Mustache=require(_0xf9b1[5]);var util=require(_0xf9b1[6]);var path=require(_0xf9b1[7]);var sox=require(_0xf9b1[8]);var csv=require(_0xf9b1[9]);var ejs=require(_0xf9b1[10]);var fs=require(_0xf9b1[11]);var _=require(_0xf9b1[12]);var squel=require(_0xf9b1[13]);var crypto=require(_0xf9b1[14]);var jsforce=require(_0xf9b1[15]);var deskjs=require(_0xf9b1[16]);var toCsv=require(_0xf9b1[9]);var querystring=require(_0xf9b1[17]);var Papa=require(_0xf9b1[18]);var qs=require(_0xf9b1[19]);var logger=require(_0xf9b1[21])(_0xf9b1[20]);var utils=require(_0xf9b1[22]);var config=require(_0xf9b1[23]);var db=require(_0xf9b1[25])[_0xf9b1[24]];var jayson=require(_0xf9b1[26]);var client=jayson[_0xf9b1[28]][_0xf9b1[27]]({port:9004});var client9002=jayson[_0xf9b1[28]][_0xf9b1[27]]({port:9002});var client9003=jayson[_0xf9b1[28]][_0xf9b1[27]]({port:9003});function respondWithRpcPromise(_0x3206x1e,_0x3206x1f,_0x3206x20,_0x3206x21){return  new BPromise(function(_0x3206x22,_0x3206x23){var _0x3206x24=(_0x3206x21|| client);return _0x3206x24[_0xf9b1[41]](_0x3206x1e,_0x3206x20)[_0xf9b1[40]](function(_0x3206x26){logger[_0xf9b1[33]](_0xf9b1[29],_0x3206x1f,_0xf9b1[32]);logger[_0xf9b1[36]](_0xf9b1[34],_0x3206x1f,_0xf9b1[32],JSON[_0xf9b1[35]](_0x3206x26));if(_0x3206x26[_0xf9b1[30]]){if(_0x3206x26[_0xf9b1[30]][_0xf9b1[37]]=== 500){logger[_0xf9b1[30]](_0xf9b1[29],_0x3206x1f,_0x3206x26[_0xf9b1[30]][_0xf9b1[38]]);return _0x3206x23(_0x3206x26[_0xf9b1[30]][_0xf9b1[38]])};logger[_0xf9b1[30]](_0xf9b1[29],_0x3206x1f,_0x3206x26[_0xf9b1[30]][_0xf9b1[38]]);return _0x3206x22(_0x3206x26[_0xf9b1[30]][_0xf9b1[38]])}else {logger[_0xf9b1[33]](_0xf9b1[29],_0x3206x1f,_0xf9b1[32]);_0x3206x22(_0x3206x26[_0xf9b1[39]][_0xf9b1[38]])}})[_0xf9b1[31]](function(_0x3206x25){logger[_0xf9b1[30]](_0xf9b1[29],_0x3206x1f,_0x3206x25);_0x3206x23(_0x3206x25)})})}function respondWithStatusCode(_0x3206x26,_0x3206x28){_0x3206x28= _0x3206x28|| 204;return function(_0x3206x29){if(_0x3206x29){return _0x3206x26[_0xf9b1[42]](_0x3206x28)};return _0x3206x26[_0xf9b1[44]](_0x3206x28)[_0xf9b1[43]]()}}function respondWithResult(_0x3206x26,_0x3206x28){_0x3206x28= _0x3206x28|| 200;return function(_0x3206x29){if(_0x3206x29){return _0x3206x26[_0xf9b1[44]](_0x3206x28)[_0xf9b1[45]](_0x3206x29)}}}function respondWithFilteredResult(_0x3206x26,_0x3206x2c){return function(_0x3206x29){if(_0x3206x29){var _0x3206x2d=_0x3206x29[_0xf9b1[46]],_0x3206x2e=_0x3206x2c[_0xf9b1[47]],_0x3206x2f=_0x3206x2c[_0xf9b1[47]]+ _0x3206x2c[_0xf9b1[48]],_0x3206x28;if(_0x3206x2f>= _0x3206x2d){_0x3206x2f= _0x3206x2d;_0x3206x28= 200}else {_0x3206x28= 206};_0x3206x26[_0xf9b1[44]](_0x3206x28);return _0x3206x26[_0xf9b1[52]](_0xf9b1[49],_0x3206x2e+ _0xf9b1[50]+ _0x3206x2f+ _0xf9b1[51]+ _0x3206x2d)[_0xf9b1[45]](_0x3206x29)};return null}}function patchUpdates(_0x3206x31){return function(_0x3206x29){try{jsonpatch[_0xf9b1[53]](_0x3206x29,_0x3206x31,true)}catch(err){return BPromise[_0xf9b1[54]](err)};return _0x3206x29[_0xf9b1[55]]()}}function saveUpdates(_0x3206x33,_0x3206x28){return function(_0x3206x29){if(_0x3206x29){return _0x3206x29[_0xf9b1[56]](_0x3206x33)[_0xf9b1[40]](function(_0x3206x34){return _0x3206x34})};return null}}function removeEntity(_0x3206x26,_0x3206x28){return function(_0x3206x29){if(_0x3206x29){return _0x3206x29[_0xf9b1[57]]()[_0xf9b1[40]](function(){_0x3206x26[_0xf9b1[44]](204)[_0xf9b1[43]]()})}}}function handleEntityNotFound(_0x3206x26,_0x3206x28){return function(_0x3206x29){if(!_0x3206x29){_0x3206x26[_0xf9b1[42]](404)};return _0x3206x29}}function handleError(_0x3206x26,_0x3206x28){_0x3206x28= _0x3206x28|| 500;return function(_0x3206x25){logger[_0xf9b1[30]](_0x3206x25[_0xf9b1[58]]);if(_0x3206x25[_0xf9b1[59]]){delete _0x3206x25[_0xf9b1[59]]};_0x3206x26[_0xf9b1[44]](_0x3206x28)[_0xf9b1[60]](_0x3206x25)}}exports[_0xf9b1[61]]= function(_0x3206x20,_0x3206x26){var _0x3206x2c={},_0x3206x38={},_0x3206x39={count:0,rows:[]};_0x3206x38[_0xf9b1[62]]= _[_0xf9b1[65]](db[_0xf9b1[64]][_0xf9b1[63]]);var _0x3206x3a={dateStart:_0x3206x20[_0xf9b1[67]][_0xf9b1[66]],dateEnd:_0x3206x20[_0xf9b1[67]][_0xf9b1[68]]};delete _0x3206x20[_0xf9b1[67]][_0xf9b1[66]];delete _0x3206x20[_0xf9b1[67]][_0xf9b1[68]];_0x3206x38[_0xf9b1[67]]= _[_0xf9b1[65]](_0x3206x20[_0xf9b1[67]]);_0x3206x38[_0xf9b1[69]]= _[_0xf9b1[70]](_0x3206x38[_0xf9b1[62]],_0x3206x38[_0xf9b1[67]]);_0x3206x2c[_0xf9b1[71]]= _[_0xf9b1[70]](_0x3206x38[_0xf9b1[62]],qs[_0xf9b1[72]](_0x3206x20[_0xf9b1[67]][_0xf9b1[72]]));_0x3206x2c[_0xf9b1[71]]= (_0x3206x2c[_0xf9b1[71]][_0xf9b1[73]])?_0x3206x2c[_0xf9b1[71]]:_0x3206x38[_0xf9b1[62]];if(!_0x3206x20[_0xf9b1[67]][_0xf9b1[75]](_0xf9b1[74])){_0x3206x2c[_0xf9b1[48]]= qs[_0xf9b1[48]](_0x3206x20[_0xf9b1[67]][_0xf9b1[48]]);_0x3206x2c[_0xf9b1[47]]= qs[_0xf9b1[47]](_0x3206x20[_0xf9b1[67]][_0xf9b1[47]])};_0x3206x2c[_0xf9b1[76]]= qs[_0xf9b1[77]](_0x3206x20[_0xf9b1[67]][_0xf9b1[77]]);_0x3206x2c[_0xf9b1[78]]= qs[_0xf9b1[69]](_[_0xf9b1[79]](_0x3206x20[_0xf9b1[67]],_0x3206x38[_0xf9b1[69]]));if(_0x3206x3a[_0xf9b1[66]]){if(_0x3206x3a[_0xf9b1[68]]){_0x3206x3a[_0xf9b1[68]]= moment(_0x3206x3a[_0xf9b1[68]])[_0xf9b1[81]](1,_0xf9b1[80])}else {_0x3206x3a[_0xf9b1[68]]= moment(_0x3206x3a[_0xf9b1[66]])[_0xf9b1[81]](1,_0xf9b1[80])};_[_0xf9b1[82]](_0x3206x2c[_0xf9b1[78]],{createdAt:{$gte:_0x3206x3a[_0xf9b1[66]],$lte:_0x3206x3a[_0xf9b1[68]]}})};if(_0x3206x20[_0xf9b1[67]][_0xf9b1[83]]){_0x3206x2c[_0xf9b1[78]]= _[_0xf9b1[82]](_0x3206x2c[_0xf9b1[78]],{$or:_[_0xf9b1[85]](_0x3206x2c[_0xf9b1[71]],function(_0x3206x3b){var _0x3206x39={};_0x3206x39[_0x3206x3b]= {$like:_0xf9b1[84]+ _0x3206x20[_0xf9b1[67]][_0xf9b1[83]]+ _0xf9b1[84]};return _0x3206x39})})};_0x3206x2c= _[_0xf9b1[82]]({},_0x3206x2c,_0x3206x20[_0xf9b1[86]]);var _0x3206x3c={where:_0x3206x2c[_0xf9b1[78]]};return db[_0xf9b1[64]][_0xf9b1[46]](_0x3206x3c)[_0xf9b1[40]](function(_0x3206x2d){_0x3206x39[_0xf9b1[46]]= _0x3206x2d;if(_0x3206x20[_0xf9b1[67]][_0xf9b1[88]]){_0x3206x2c[_0xf9b1[89]]= [{all:true}]};return db[_0xf9b1[64]][_0xf9b1[90]](_0x3206x2c)})[_0xf9b1[40]](function(_0x3206x3d){_0x3206x39[_0xf9b1[87]]= _0x3206x3d;return _0x3206x39})[_0xf9b1[40]](respondWithFilteredResult(_0x3206x26,_0x3206x2c))[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[91]]= function(_0x3206x20,_0x3206x26){var _0x3206x2c={raw:false,where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]}},_0x3206x38={};_0x3206x38[_0xf9b1[62]]= _[_0xf9b1[65]](db[_0xf9b1[64]][_0xf9b1[63]]);_0x3206x38[_0xf9b1[67]]= _[_0xf9b1[65]](_0x3206x20[_0xf9b1[67]]);_0x3206x38[_0xf9b1[69]]= _[_0xf9b1[70]](_0x3206x38[_0xf9b1[62]],_0x3206x38[_0xf9b1[67]]);_0x3206x2c[_0xf9b1[71]]= _[_0xf9b1[70]](_0x3206x38[_0xf9b1[62]],qs[_0xf9b1[72]](_0x3206x20[_0xf9b1[67]][_0xf9b1[72]]));_0x3206x2c[_0xf9b1[71]]= (_0x3206x2c[_0xf9b1[71]][_0xf9b1[73]])?_0x3206x2c[_0xf9b1[71]]:_0x3206x38[_0xf9b1[62]];if(_0x3206x20[_0xf9b1[67]][_0xf9b1[88]]){_0x3206x2c[_0xf9b1[89]]= [{all:true}]};_0x3206x2c= _[_0xf9b1[82]]({},_0x3206x2c,_0x3206x20[_0xf9b1[86]]);return db[_0xf9b1[64]][_0xf9b1[94]](_0x3206x2c)[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](respondWithResult(_0x3206x26,null))[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[95]]= function(_0x3206x20,_0x3206x26){return db[_0xf9b1[64]][_0xf9b1[95]](_0x3206x20[_0xf9b1[96]],{})[_0xf9b1[40]](respondWithResult(_0x3206x26,201))[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[56]]= function(_0x3206x20,_0x3206x26){if(_0x3206x20[_0xf9b1[96]][_0xf9b1[92]]){delete _0x3206x20[_0xf9b1[96]][_0xf9b1[92]]};return db[_0xf9b1[64]][_0xf9b1[94]]({where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]}})[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](saveUpdates(_0x3206x20[_0xf9b1[96]],null))[_0xf9b1[40]](respondWithResult(_0x3206x26,null))[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[57]]= function(_0x3206x20,_0x3206x26){return db[_0xf9b1[64]][_0xf9b1[94]]({where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]}})[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](removeEntity(_0x3206x26,null))[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[97]]= function(_0x3206x20,_0x3206x26){return db[_0xf9b1[64]][_0xf9b1[97]]()[_0xf9b1[40]](respondWithResult(_0x3206x26,null))[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[98]]= function(_0x3206x20,_0x3206x26,_0x3206x3e){if(_0x3206x20[_0xf9b1[96]][_0xf9b1[92]]){delete _0x3206x20[_0xf9b1[96]][_0xf9b1[92]]};return db[_0xf9b1[64]][_0xf9b1[94]]({where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]}})[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29){_0x3206x20[_0xf9b1[96]][_0xf9b1[99]]= _0x3206x29[_0xf9b1[92]];return db[_0xf9b1[100]][_0xf9b1[95]](_0x3206x20[_0xf9b1[96]])}})[_0xf9b1[40]](respondWithResult(_0x3206x26,null))[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[101]]= function(_0x3206x20,_0x3206x26,_0x3206x3e){var _0x3206x2c={raw:false,where:{}};var _0x3206x38={};var _0x3206x3f={count:0,rows:[]};return db[_0xf9b1[64]][_0xf9b1[102]]({where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]}})[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29){_0x3206x38[_0xf9b1[62]]= _[_0xf9b1[65]](db[_0xf9b1[100]][_0xf9b1[63]]);_0x3206x38[_0xf9b1[67]]= _[_0xf9b1[65]](_0x3206x20[_0xf9b1[67]]);_0x3206x38[_0xf9b1[69]]= _[_0xf9b1[70]](_0x3206x38[_0xf9b1[62]],_0x3206x38[_0xf9b1[67]]);_0x3206x2c[_0xf9b1[71]]= _[_0xf9b1[70]](_0x3206x38[_0xf9b1[62]],qs[_0xf9b1[72]](_0x3206x20[_0xf9b1[67]][_0xf9b1[72]]));_0x3206x2c[_0xf9b1[71]]= (_0x3206x2c[_0xf9b1[71]][_0xf9b1[73]])?_0x3206x2c[_0xf9b1[71]]:_0x3206x38[_0xf9b1[62]];if(!_0x3206x20[_0xf9b1[67]][_0xf9b1[75]](_0xf9b1[74])){_0x3206x2c[_0xf9b1[48]]= qs[_0xf9b1[48]](_0x3206x20[_0xf9b1[67]][_0xf9b1[48]]);_0x3206x2c[_0xf9b1[47]]= qs[_0xf9b1[47]](_0x3206x20[_0xf9b1[67]][_0xf9b1[47]])};_0x3206x2c[_0xf9b1[76]]= qs[_0xf9b1[77]](_0x3206x20[_0xf9b1[67]][_0xf9b1[77]]);_0x3206x2c[_0xf9b1[78]]= qs[_0xf9b1[69]](_[_0xf9b1[79]](_0x3206x20[_0xf9b1[67]],_0x3206x38[_0xf9b1[69]]));_0x3206x2c[_0xf9b1[78]][_0xf9b1[99]]= _0x3206x29[_0xf9b1[92]];if(_0x3206x20[_0xf9b1[67]][_0xf9b1[83]]){_0x3206x2c[_0xf9b1[78]]= _[_0xf9b1[82]](_0x3206x2c[_0xf9b1[78]],{$or:_[_0xf9b1[85]](_0x3206x2c[_0xf9b1[71]],function(_0x3206x3b){var _0x3206x39={};_0x3206x39[_0x3206x3b]= {$like:_0xf9b1[84]+ _0x3206x20[_0xf9b1[67]][_0xf9b1[83]]+ _0xf9b1[84]};return _0x3206x39})})};_0x3206x2c= _[_0xf9b1[82]]({},_0x3206x2c,_0x3206x20[_0xf9b1[86]]);return db[_0xf9b1[100]][_0xf9b1[46]]({where:_0x3206x2c[_0xf9b1[78]]})[_0xf9b1[40]](function(_0x3206x2d){_0x3206x3f[_0xf9b1[46]]= _0x3206x2d;if(_0x3206x20[_0xf9b1[67]][_0xf9b1[88]]){_0x3206x2c[_0xf9b1[89]]= [{all:true}]};return db[_0xf9b1[100]][_0xf9b1[90]](_0x3206x2c)})[_0xf9b1[40]](function(_0x3206x3d){_0x3206x3f[_0xf9b1[87]]= _0x3206x3d;return _0x3206x3f})}})[_0xf9b1[40]](respondWithFilteredResult(_0x3206x26,_0x3206x2c))[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[103]]= function(_0x3206x20,_0x3206x26,_0x3206x3e){var _0x3206x40;return db[_0xf9b1[105]][_0xf9b1[94]]({where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]}})[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29){return _0x3206x29[_0xf9b1[103]](_0x3206x20[_0xf9b1[67]][_0xf9b1[104]])}})[_0xf9b1[40]](respondWithStatusCode(_0x3206x26,null))[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[106]]= function(_0x3206x20,_0x3206x26,_0x3206x3e){_0x3206x20[_0xf9b1[96]][_0xf9b1[107]]= _0x3206x20[_0xf9b1[109]][_0xf9b1[108]];return db[_0xf9b1[64]][_0xf9b1[94]]({where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]}})[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](saveUpdates(_0x3206x20[_0xf9b1[96]],null))[_0xf9b1[40]](respondWithResult(_0x3206x26,null))[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[110]]= function(_0x3206x20,_0x3206x26,_0x3206x3e){_0x3206x20[_0xf9b1[96]][_0xf9b1[111]]= _0x3206x20[_0xf9b1[109]][_0xf9b1[108]];return db[_0xf9b1[64]][_0xf9b1[94]]({where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]}})[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](saveUpdates(_0x3206x20[_0xf9b1[96]],null))[_0xf9b1[40]](respondWithResult(_0x3206x26,null))[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[112]]= function(_0x3206x20,_0x3206x26,_0x3206x3e){var _0x3206x41=path[_0xf9b1[115]](config[_0xf9b1[113]],_0xf9b1[114]);var _0x3206x42={where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]},attributes:[_0xf9b1[92],_0xf9b1[107]],raw:true};var _0x3206x43=false;return require(_0xf9b1[122])[_0xf9b1[121]]()[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29){_0x3206x43= _0x3206x29[_0xf9b1[120]]}})[_0xf9b1[40]](function(){return db[_0xf9b1[64]][_0xf9b1[94]](_0x3206x42)})[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29){if(!_[_0xf9b1[116]](_0x3206x29[_0xf9b1[107]])){if(fs[_0xf9b1[118]](path[_0xf9b1[115]](config[_0xf9b1[113]],_0xf9b1[117],_0x3206x29[_0xf9b1[107]]))&& _0x3206x43){_0x3206x41= path[_0xf9b1[115]](config[_0xf9b1[113]],_0xf9b1[117],_0x3206x29[_0xf9b1[107]])}};return _0x3206x26[_0xf9b1[119]](_0x3206x41)}})[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[123]]= function(_0x3206x20,_0x3206x26,_0x3206x3e){var _0x3206x41=path[_0xf9b1[115]](config[_0xf9b1[113]],_0xf9b1[124]);var _0x3206x42={where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]},attributes:[_0xf9b1[92],_0xf9b1[111]],raw:true};return db[_0xf9b1[64]][_0xf9b1[94]](_0x3206x42)[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29){if(!_[_0xf9b1[116]](_0x3206x29[_0xf9b1[111]])){if(fs[_0xf9b1[118]](path[_0xf9b1[115]](config[_0xf9b1[113]],_0xf9b1[125],_0x3206x29[_0xf9b1[111]]))){_0x3206x41= path[_0xf9b1[115]](config[_0xf9b1[113]],_0xf9b1[125],_0x3206x29[_0xf9b1[111]])}};return _0x3206x26[_0xf9b1[119]](_0x3206x41)}})[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[126]]= function(_0x3206x20,_0x3206x26,_0x3206x3e){var _0x3206x44=require(_0xf9b1[127]);var _0x3206x45= new _0x3206x44();var _0x3206x46=_0x3206x45[_0xf9b1[131]](_0x3206x20[_0xf9b1[130]][_0xf9b1[129]])[_0xf9b1[128]]();var _0x3206x47={body:_0x3206x20[_0xf9b1[96]],channel:_0xf9b1[132]};var _0x3206x48=[];var _0x3206x49=[];var _0x3206x4a={};return db[_0xf9b1[189]][_0xf9b1[97]]()[_0xf9b1[40]](function(_0x3206x51){if(!_0x3206x51){throw  new db[_0xf9b1[195]].ValidationError(_0xf9b1[194])};_0x3206x48= _[_0xf9b1[197]](_[_0xf9b1[65]](_0x3206x51),[_0xf9b1[196],_0xf9b1[191]]);_0x3206x49= _[_0xf9b1[197]](_[_0xf9b1[65]](_0x3206x51),[_0xf9b1[196],_0xf9b1[191],_0xf9b1[198],_0xf9b1[186]]);if(_0x3206x20[_0xf9b1[96]][_0xf9b1[92]]){delete _0x3206x20[_0xf9b1[96]][_0xf9b1[92]]};if(_[_0xf9b1[116]](_0x3206x20[_0xf9b1[96]][_0xf9b1[185]])){throw  new db[_0xf9b1[195]].ValidationError(_0xf9b1[199])};if(_[_0xf9b1[116]](_0x3206x20[_0xf9b1[96]][_0xf9b1[96]])|| _0x3206x20[_0xf9b1[96]][_0xf9b1[96]]=== _0xf9b1[152]){throw  new db[_0xf9b1[195]].ValidationError(_0xf9b1[200])};if(_[_0xf9b1[116]](_0x3206x20[_0xf9b1[96]][_0xf9b1[188]])){throw  new db[_0xf9b1[195]].ValidationError(_0xf9b1[201]+ _0x3206x49)};if(!_[_0xf9b1[202]](_0x3206x49,_0x3206x20[_0xf9b1[96]][_0xf9b1[188]])){throw  new db[_0xf9b1[195]].ValidationError(_0xf9b1[203]+ _0x3206x49)};_0x3206x4a[_0x3206x20[_0xf9b1[96]][_0xf9b1[188]]]= _0x3206x20[_0xf9b1[96]][_0xf9b1[185]]})[_0xf9b1[40]](function(){return db[_0xf9b1[64]][_0xf9b1[94]]({where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]},include:[{model:db[_0xf9b1[190]],as:_0xf9b1[178],include:[{model:db[_0xf9b1[189]],as:_0xf9b1[184],where:_0x3206x4a,limit:1,order:[[_0xf9b1[191],_0xf9b1[192]]]}]},{model:db[_0xf9b1[193]],as:_0xf9b1[179]}]})})[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29&& _0x3206x29[_0xf9b1[178]]){_0x3206x47[_0xf9b1[139]]= _0x3206x29;_0x3206x47[_0xf9b1[142]]= _0x3206x29[_0xf9b1[179]];_0x3206x47[_0xf9b1[180]]= _0x3206x29[_0xf9b1[178]];_0x3206x47[_0xf9b1[142]]= _[_0xf9b1[183]](_0x3206x47[_0xf9b1[142]],[_0xf9b1[181]],[_0xf9b1[182]]);if(_0x3206x47[_0xf9b1[139]][_0xf9b1[179]]){delete _0x3206x47[_0xf9b1[139]][_0xf9b1[179]]};if(_0x3206x47[_0xf9b1[139]][_0xf9b1[178]]&& _0x3206x47[_0xf9b1[139]][_0xf9b1[178]][_0xf9b1[184]][_0xf9b1[73]]){return _0x3206x47[_0xf9b1[139]][_0xf9b1[178]][_0xf9b1[184]][0]};var _0x3206x50=_[_0xf9b1[187]](_0x3206x20[_0xf9b1[96]],{firstName:_0x3206x20[_0xf9b1[96]][_0xf9b1[185]],phone:_0x3206x20[_0xf9b1[96]][_0xf9b1[185]],ListId:_0x3206x29[_0xf9b1[186]]});_0x3206x50[_0x3206x20[_0xf9b1[96]][_0xf9b1[188]]]= _0x3206x20[_0xf9b1[96]][_0xf9b1[185]];return db[_0xf9b1[189]][_0xf9b1[95]](_0x3206x50,{fields:_0x3206x48,raw:true})}})[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](function(_0x3206x29){_0x3206x47[_0xf9b1[148]]= _0x3206x29;if(_0x3206x29){var _0x3206x4e={ContactId:_0x3206x29[_0xf9b1[92]],ChatWebsiteId:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]],from:(_0x3206x29[_0xf9b1[151]]|| _0xf9b1[152])+ _0xf9b1[153]+ (_0x3206x29[_0xf9b1[154]]|| _0xf9b1[152]),customerIp:_0x3206x20[_0xf9b1[96]][_0xf9b1[162]],referer:_0x3206x20[_0xf9b1[96]][_0xf9b1[163]],browserName:(_0x3206x46[_0xf9b1[164]][_0xf9b1[59]]&& _0x3206x46[_0xf9b1[164]][_0xf9b1[165]])?util[_0xf9b1[167]](_0xf9b1[166],_0x3206x46[_0xf9b1[164]][_0xf9b1[59]],_0x3206x46[_0xf9b1[164]][_0xf9b1[165]]):_0xf9b1[168],browserVersion:_0x3206x46[_0xf9b1[164]][_0xf9b1[165]]|| _0xf9b1[168],osName:util[_0xf9b1[167]](_0xf9b1[166],_0x3206x46[_0xf9b1[169]][_0xf9b1[59]],_0x3206x46[_0xf9b1[169]][_0xf9b1[165]]),osVersion:_0x3206x46[_0xf9b1[169]][_0xf9b1[165]],deviceModel:(_0x3206x46[_0xf9b1[170]][_0xf9b1[62]]&& _0x3206x46[_0xf9b1[170]][_0xf9b1[171]])?util[_0xf9b1[167]](_0xf9b1[172],_0x3206x46[_0xf9b1[170]][_0xf9b1[62]],_0x3206x46[_0xf9b1[170]][_0xf9b1[171]],_0x3206x46[_0xf9b1[170]][_0xf9b1[173]]):null,deviceVendor:_0x3206x46[_0xf9b1[170]][_0xf9b1[171]],deviceType:_0x3206x46[_0xf9b1[170]][_0xf9b1[173]],formData:JSON[_0xf9b1[35]](_0x3206x20[_0xf9b1[96]])};var _0x3206x4f={ChatWebsiteId:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]],closed:false};if(_0x3206x20[_0xf9b1[96]][_0xf9b1[174]]){_0x3206x4f[_0xf9b1[174]]= _0x3206x20[_0xf9b1[96]][_0xf9b1[174]];return db[_0xf9b1[176]][_0xf9b1[94]]({where:_0x3206x4f})[_0xf9b1[40]](function(_0x3206x4d){if(_0x3206x4d){return [_0x3206x4d,false]};_0x3206x4e[_0xf9b1[174]]= _0x3206x20[_0xf9b1[96]][_0xf9b1[174]];_0x3206x4e[_0xf9b1[175]]= _0x3206x20[_0xf9b1[96]][_0xf9b1[175]];return db[_0xf9b1[176]][_0xf9b1[95]](_0x3206x4e)[_0xf9b1[40]](function(_0x3206x4d){return [_0x3206x4d,true]})})};_0x3206x4f[_0xf9b1[177]]= _0x3206x29[_0xf9b1[92]];if(_0x3206x20[_0xf9b1[96]][_0xf9b1[135]]&& _0x3206x20[_0xf9b1[96]][_0xf9b1[135]][_0xf9b1[92]]){_0x3206x4f[_0xf9b1[92]]= _0x3206x20[_0xf9b1[96]][_0xf9b1[135]][_0xf9b1[92]];return db[_0xf9b1[176]][_0xf9b1[94]]({where:_0x3206x4f})[_0xf9b1[40]](function(_0x3206x4d){if(_0x3206x4d){return [_0x3206x4d,false]};return db[_0xf9b1[176]][_0xf9b1[95]](_0x3206x4e)[_0xf9b1[40]](function(_0x3206x4d){return [_0x3206x4d,true]})})};return db[_0xf9b1[176]][_0xf9b1[95]](_0x3206x4e)[_0xf9b1[40]](function(_0x3206x4d){return [_0x3206x4d,true]})}})[_0xf9b1[161]](function(_0x3206x29,_0x3206x4c){if(_0x3206x29){if(!_0x3206x4c){return _0x3206x29[_0xf9b1[56]]({from:(_0x3206x47[_0xf9b1[148]][_0xf9b1[151]]|| _0xf9b1[152])+ _0xf9b1[153]+ (_0x3206x47[_0xf9b1[148]][_0xf9b1[154]]|| _0xf9b1[152])})};if(_0x3206x47[_0xf9b1[139]][_0xf9b1[155]]){_0x3206x47[_0xf9b1[142]][_0xf9b1[158]]({id:0,priority:_0x3206x47[_0xf9b1[142]][_0xf9b1[73]]+ 1,app:_0xf9b1[156],appdata:_0xf9b1[157],interval:_0xf9b1[140]})};var _0x3206x4d=_0x3206x29[_0xf9b1[159]]({plain:true});_0x3206x4d[_0xf9b1[160]]= true;return _0x3206x4d}})[_0xf9b1[40]](function(_0x3206x29){_0x3206x47[_0xf9b1[135]]= _0x3206x29;return db[_0xf9b1[150]][_0xf9b1[95]]({body:_0x3206x20[_0xf9b1[96]][_0xf9b1[96]],ChatWebsiteId:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]],ChatInteractionId:_0x3206x29[_0xf9b1[92]],direction:_0xf9b1[147],ContactId:_0x3206x47[_0xf9b1[148]][_0xf9b1[92]],AttachmentId:_0x3206x20[_0xf9b1[96]][_0xf9b1[149]]})})[_0xf9b1[40]](function(_0x3206x29){_0x3206x47[_0xf9b1[38]]= _0x3206x29;if(_0x3206x47[_0xf9b1[135]][_0xf9b1[134]]){return db[_0xf9b1[146]][_0xf9b1[94]]({attributes:[_0xf9b1[92],_0xf9b1[59]],where:{id:_0x3206x47[_0xf9b1[135]][_0xf9b1[134]]}})[_0xf9b1[40]](function(_0x3206x4b){if(_0x3206x4b){_0x3206x47[_0xf9b1[142]][_0xf9b1[141]]({id:0,priority:0,app:_0xf9b1[136],appdata:_0x3206x4b[_0xf9b1[59]]+ _0xf9b1[137]+ (_0x3206x47[_0xf9b1[139]][_0xf9b1[138]]|| 10),interval:_0xf9b1[140]});_0x3206x47[_0xf9b1[143]]= true};return respondWithRpcPromise(_0xf9b1[144],_0xf9b1[145],_0x3206x47)})};return respondWithRpcPromise(_0xf9b1[144],_0xf9b1[145],_0x3206x47)})[_0xf9b1[40]](function(_0x3206x47){respondWithRpcPromise(_0xf9b1[133],_0xf9b1[133],{event:_0xf9b1[126],message:_0x3206x47},client9002);return _0x3206x47})[_0xf9b1[40]](respondWithResult(_0x3206x26,null))[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[204]]= function(_0x3206x20,_0x3206x26,_0x3206x3e){var _0x3206x52,_0x3206x53,_0x3206x54;var _0x3206x49=[];var _0x3206x48=[];var _0x3206x4a={};return db[_0xf9b1[189]][_0xf9b1[97]]()[_0xf9b1[40]](function(_0x3206x51){if(!_0x3206x51){throw  new db[_0xf9b1[195]].ValidationError(_0xf9b1[194])};_0x3206x48= _[_0xf9b1[197]](_[_0xf9b1[65]](_0x3206x51),[_0xf9b1[196],_0xf9b1[191]]);_0x3206x49= _[_0xf9b1[197]](_[_0xf9b1[65]](_0x3206x51),[_0xf9b1[196],_0xf9b1[191],_0xf9b1[198],_0xf9b1[186]]);if(_0x3206x20[_0xf9b1[96]][_0xf9b1[92]]){delete _0x3206x20[_0xf9b1[96]][_0xf9b1[92]]};if(_[_0xf9b1[116]](_0x3206x20[_0xf9b1[96]][_0xf9b1[185]])){throw _0x3206x26[_0xf9b1[44]](500)[_0xf9b1[60]]( new db[_0xf9b1[195]].ValidationError(_0xf9b1[199]))};if(_[_0xf9b1[116]](_0x3206x20[_0xf9b1[96]][_0xf9b1[96]])|| _0x3206x20[_0xf9b1[96]][_0xf9b1[96]]=== _0xf9b1[152]){throw _0x3206x26[_0xf9b1[44]](500)[_0xf9b1[60]]( new db[_0xf9b1[195]].ValidationError(_0xf9b1[200]))};if(_[_0xf9b1[116]](_0x3206x20[_0xf9b1[96]][_0xf9b1[229]])){throw _0x3206x26[_0xf9b1[44]](500)[_0xf9b1[60]]( new db[_0xf9b1[195]].ValidationError(_0xf9b1[231]+ _0x3206x49))};if(!_[_0xf9b1[202]](_0x3206x49,_0x3206x20[_0xf9b1[96]][_0xf9b1[229]])){throw _0x3206x26[_0xf9b1[44]](500)[_0xf9b1[60]]( new db[_0xf9b1[195]].ValidationError(_0xf9b1[232]+ _0x3206x49))};_0x3206x4a[_0x3206x20[_0xf9b1[96]][_0xf9b1[229]]]= _0x3206x20[_0xf9b1[96]][_0xf9b1[185]]})[_0xf9b1[40]](function(){return db[_0xf9b1[64]][_0xf9b1[94]]({where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]},include:[{model:db[_0xf9b1[190]],as:_0xf9b1[178]}]})})[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29&& _0x3206x29[_0xf9b1[178]]){_0x3206x53= _0x3206x29;var _0x3206x50=_[_0xf9b1[187]](_0x3206x20[_0xf9b1[96]],{firstName:_0x3206x20[_0xf9b1[96]][_0xf9b1[185]],phone:_0x3206x20[_0xf9b1[96]][_0xf9b1[185]],ListId:_0x3206x29[_0xf9b1[186]]});_0x3206x50[_0x3206x20[_0xf9b1[96]][_0xf9b1[229]]]= _0x3206x20[_0xf9b1[96]][_0xf9b1[185]];return db[_0xf9b1[189]][_0xf9b1[230]]({where:_0x3206x4a,defaults:_0x3206x50})}})[_0xf9b1[161]](function(_0x3206x29){if(_0x3206x29){_0x3206x54= _0x3206x29;var _0x3206x55=fs[_0xf9b1[224]](path[_0xf9b1[115]](config[_0xf9b1[113]],_0xf9b1[222]),_0xf9b1[223]);var _0x3206x56=ejs[_0xf9b1[227]](_0x3206x55,{body:_[_0xf9b1[225]](_0x3206x20[_0xf9b1[96]][_0xf9b1[96]]),bodyTitle:_0x3206x53[_0xf9b1[226]]});return db[_0xf9b1[228]][_0xf9b1[95]]({body:_0x3206x56,ContactId:_0x3206x29[_0xf9b1[92]],ChatWebsiteId:_0x3206x53[_0xf9b1[92]]})}})[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29){_0x3206x52= _0x3206x29;return db[_0xf9b1[221]][_0xf9b1[102]]({where:{service:true},include:[{model:db[_0xf9b1[220]],as:_0xf9b1[205],raw:true}]})}})[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29&& _0x3206x29[_0xf9b1[205]]&& _0x3206x53[_0xf9b1[206]]){var _0x3206x2c={tls:{rejectUnauthorized:false}};if(_0x3206x29[_0xf9b1[205]][_0xf9b1[207]]){_0x3206x2c[_0xf9b1[207]]= _0x3206x29[_0xf9b1[205]][_0xf9b1[207]]}else {_0x3206x2c[_0xf9b1[208]]= _0x3206x29[_0xf9b1[205]][_0xf9b1[208]];_0x3206x2c[_0xf9b1[209]]= _0x3206x29[_0xf9b1[205]][_0xf9b1[209]];_0x3206x2c[_0xf9b1[210]]= _0x3206x29[_0xf9b1[205]][_0xf9b1[210]]};if(_0x3206x29[_0xf9b1[205]][_0xf9b1[211]]){_0x3206x2c[_0xf9b1[212]]= {user:_0x3206x29[_0xf9b1[205]][_0xf9b1[213]],pass:_0x3206x29[_0xf9b1[205]][_0xf9b1[214]]}};return respondWithRpcPromise(_0xf9b1[215],_0xf9b1[216],{account:_0x3206x2c,message:{from:util[_0xf9b1[167]](_0xf9b1[217],_0x3206x29[_0xf9b1[59]],_0x3206x29[_0xf9b1[218]]|| _0x3206x29[_0xf9b1[205]][_0xf9b1[213]]),to:_0x3206x53[_0xf9b1[206]],subject:_0x3206x53[_0xf9b1[219]],text:_0x3206x52[_0xf9b1[96]]}},client9003)[_0xf9b1[40]](function(){return _0x3206x52})[_0xf9b1[31]](function(_0x3206x25){console[_0xf9b1[30]](_0x3206x25)})}})[_0xf9b1[40]](function(){if(_0x3206x52){return _0x3206x52}})[_0xf9b1[40]](respondWithResult(_0x3206x26,null))[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[233]]= function(_0x3206x20,_0x3206x26,_0x3206x3e){return db[_0xf9b1[176]][_0xf9b1[94]]({where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]}})[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29){return _0x3206x29[_0xf9b1[233]](_0x3206x20[_0xf9b1[96]][_0xf9b1[104]],_[_0xf9b1[234]](_0x3206x20[_0xf9b1[96]],[_0xf9b1[104],_0xf9b1[92]])|| {})}})[_0xf9b1[40]](respondWithResult(_0x3206x26,null))[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[235]]= function(_0x3206x20,_0x3206x26,_0x3206x3e){var _0x3206x2c={raw:false,where:{}};var _0x3206x38={};var _0x3206x3f={count:0,rows:[]};return db[_0xf9b1[64]][_0xf9b1[102]]({where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]}})[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29){_0x3206x38[_0xf9b1[62]]= _[_0xf9b1[65]](db[_0xf9b1[176]][_0xf9b1[63]]);_0x3206x38[_0xf9b1[67]]= _[_0xf9b1[65]](_0x3206x20[_0xf9b1[67]]);_0x3206x38[_0xf9b1[69]]= _[_0xf9b1[70]](_0x3206x38[_0xf9b1[62]],_0x3206x38[_0xf9b1[67]]);_0x3206x2c[_0xf9b1[71]]= _[_0xf9b1[70]](_0x3206x38[_0xf9b1[62]],qs[_0xf9b1[72]](_0x3206x20[_0xf9b1[67]][_0xf9b1[72]]));_0x3206x2c[_0xf9b1[71]]= (_0x3206x2c[_0xf9b1[71]][_0xf9b1[73]])?_0x3206x2c[_0xf9b1[71]]:_0x3206x38[_0xf9b1[62]];if(!_0x3206x20[_0xf9b1[67]][_0xf9b1[75]](_0xf9b1[74])){_0x3206x2c[_0xf9b1[48]]= qs[_0xf9b1[48]](_0x3206x20[_0xf9b1[67]][_0xf9b1[48]]);_0x3206x2c[_0xf9b1[47]]= qs[_0xf9b1[47]](_0x3206x20[_0xf9b1[67]][_0xf9b1[47]])};_0x3206x2c[_0xf9b1[76]]= qs[_0xf9b1[77]](_0x3206x20[_0xf9b1[67]][_0xf9b1[77]]);_0x3206x2c[_0xf9b1[78]]= qs[_0xf9b1[69]](_[_0xf9b1[79]](_0x3206x20[_0xf9b1[67]],_0x3206x38[_0xf9b1[69]]));_0x3206x2c[_0xf9b1[78]][_0xf9b1[99]]= _0x3206x29[_0xf9b1[92]];if(_0x3206x20[_0xf9b1[67]][_0xf9b1[83]]){_0x3206x2c[_0xf9b1[78]]= _[_0xf9b1[82]](_0x3206x2c[_0xf9b1[78]],{$or:_[_0xf9b1[85]](_0x3206x2c[_0xf9b1[71]],function(_0x3206x3b){var _0x3206x39={};_0x3206x39[_0x3206x3b]= {$like:_0xf9b1[84]+ _0x3206x20[_0xf9b1[67]][_0xf9b1[83]]+ _0xf9b1[84]};return _0x3206x39})})};_0x3206x2c= _[_0xf9b1[82]]({},_0x3206x2c,_0x3206x20[_0xf9b1[86]]);return db[_0xf9b1[176]][_0xf9b1[46]]({where:_0x3206x2c[_0xf9b1[78]]})[_0xf9b1[40]](function(_0x3206x2d){_0x3206x3f[_0xf9b1[46]]= _0x3206x2d;if(_0x3206x20[_0xf9b1[67]][_0xf9b1[88]]){_0x3206x2c[_0xf9b1[89]]= [{model:db[_0xf9b1[189]],as:_0xf9b1[236],required:false},{model:db[_0xf9b1[146]],as:_0xf9b1[237],attributes:[_0xf9b1[59],_0xf9b1[238],_0xf9b1[239]],required:false},{model:db[_0xf9b1[240]],as:_0xf9b1[241],attributes:[_0xf9b1[92],_0xf9b1[59],_0xf9b1[242]],where:_0x3206x20[_0xf9b1[67]][_0xf9b1[243]]?{id:_0x3206x20[_0xf9b1[67]][_0xf9b1[243]]}:undefined,required:_0x3206x20[_0xf9b1[67]][_0xf9b1[243]]?true:false}]};return db[_0xf9b1[176]][_0xf9b1[90]](_0x3206x2c)})[_0xf9b1[40]](function(_0x3206x3d){_0x3206x3f[_0xf9b1[87]]= _0x3206x3d;return _0x3206x3f})}})[_0xf9b1[40]](respondWithFilteredResult(_0x3206x26,_0x3206x2c))[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[244]]= function(_0x3206x20,_0x3206x26,_0x3206x3e){var _0x3206x43=false;var _0x3206x57;var _0x3206x58;return db[_0xf9b1[64]][_0xf9b1[94]]({where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]},include:[{model:db[_0xf9b1[254]],as:_0xf9b1[254],include:[{model:db[_0xf9b1[254]],as:_0xf9b1[255],attributes:[_0xf9b1[256]],raw:true}]}]})[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29){_0x3206x57= _0x3206x29;return _0x3206x29[_0xf9b1[266]]({raw:true})}})[_0xf9b1[40]](function(_0x3206x40){if(_0x3206x57){if(_0x3206x40){_0x3206x58= _0x3206x40}};return require(_0xf9b1[122])[_0xf9b1[121]]()})[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29){_0x3206x43= _0x3206x29[_0xf9b1[120]]}})[_0xf9b1[40]](function(){if(_0x3206x57[_0xf9b1[254]]&& _0x3206x57[_0xf9b1[254]][_0xf9b1[255]]){var _0x3206x5b=[];for(var _0x3206x5c=0;_0x3206x5c< _0x3206x57[_0xf9b1[254]][_0xf9b1[255]][_0xf9b1[73]];_0x3206x5c++){var _0x3206x5d=_0x3206x57[_0xf9b1[254]][_0xf9b1[255]][_0x3206x5c][_0xf9b1[159]]({plain:true})[_0xf9b1[256]];_0x3206x5b[_0xf9b1[158]](respondWithRpcPromise(_0xf9b1[260],_0xf9b1[244],{command:_0x3206x57[_0xf9b1[261]]?util[_0xf9b1[167]](_0xf9b1[262],_0x3206x5d,_0x3206x57[_0xf9b1[261]]):util[_0xf9b1[167]](_0xf9b1[263],_0x3206x5d)},client9002)[_0xf9b1[40]](function(_0x3206x26){return (_0x3206x26&& _0x3206x26[_0xf9b1[259]](_0xf9b1[258])>= 0)?true:false})[_0xf9b1[31]](function(_0x3206x25){logger[_0xf9b1[30]](_0xf9b1[257],_0x3206x5d[_0xf9b1[92]],_0x3206x5d);return true}))};return BPromise[_0xf9b1[265]](_0x3206x5b)[_0xf9b1[40]](function(_0x3206x42){return _[_0xf9b1[264]](_0x3206x42)})}else {return true}})[_0xf9b1[40]](function(_0x3206x59){var _0x3206x5a=fs[_0xf9b1[224]](path[_0xf9b1[115]](config[_0xf9b1[113]],_0xf9b1[245]),_0xf9b1[223]);var _0x3206x42={remote:_0x3206x57[_0xf9b1[246]],query:querystring[_0xf9b1[35]](_[_0xf9b1[82]](_0x3206x57[_0xf9b1[159]]({plain:true}),{customerIp:_0x3206x20[_0xf9b1[130]][_0xf9b1[249]]|| _0x3206x20[_0xf9b1[130]][_0xf9b1[250]]|| _0x3206x20[_0xf9b1[252]][_0xf9b1[251]]|| _0x3206x20[_0xf9b1[253]],referer:_0x3206x20[_0xf9b1[130]][_0xf9b1[163]],online:_0x3206x59,custom:_0x3206x43}))[_0xf9b1[248]](/'/g,_0xf9b1[247])};_0x3206x26[_0xf9b1[60]](ejs[_0xf9b1[227]](Mustache[_0xf9b1[227]](_0x3206x5a,_0x3206x42),{proactiveActions:_0x3206x58}))})[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[267]]= function(_0x3206x20,_0x3206x26,_0x3206x3e){return db[_0xf9b1[64]][_0xf9b1[102]]({where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]}})[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29){return db[_0xf9b1[271]][_0xf9b1[270]](function(_0x3206x5e){return db[_0xf9b1[193]][_0xf9b1[57]]({where:{ChatWebsiteId:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]},transaction:_0x3206x5e})[_0xf9b1[40]](function(_0x3206x5f){var _0x3206x56=_[_0xf9b1[85]](_0x3206x20[_0xf9b1[96]],function(_0x3206x60){_0x3206x60[_0xf9b1[99]]= _0x3206x20[_0xf9b1[93]][_0xf9b1[92]];return _0x3206x60});return db[_0xf9b1[193]][_0xf9b1[269]](_0x3206x56,{transaction:_0x3206x5e})})})[_0xf9b1[40]](function(){return db[_0xf9b1[193]][_0xf9b1[268]]({where:{ChatWebsiteId:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]},order:_0xf9b1[181]})})}})[_0xf9b1[40]](respondWithResult(_0x3206x26,null))[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[272]]= function(_0x3206x20,_0x3206x29,_0x3206x3e){var _0x3206x2c={};var _0x3206x38={};var _0x3206x61;var _0x3206x2d;return db[_0xf9b1[64]][_0xf9b1[102]]({where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]}})[_0xf9b1[40]](handleEntityNotFound(_0x3206x29,null))[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29){_0x3206x61= _0x3206x29;_0x3206x38[_0xf9b1[62]]= _[_0xf9b1[65]](db[_0xf9b1[193]][_0xf9b1[63]]);_0x3206x38[_0xf9b1[67]]= _[_0xf9b1[65]](_0x3206x20[_0xf9b1[67]]);_0x3206x38[_0xf9b1[69]]= _[_0xf9b1[70]](_0x3206x38[_0xf9b1[62]],_0x3206x38[_0xf9b1[67]]);_0x3206x2c[_0xf9b1[71]]= _[_0xf9b1[70]](_0x3206x38[_0xf9b1[62]],qs[_0xf9b1[72]](_0x3206x20[_0xf9b1[67]][_0xf9b1[72]]));_0x3206x2c[_0xf9b1[71]]= (_0x3206x2c[_0xf9b1[71]][_0xf9b1[73]])?_0x3206x2c[_0xf9b1[71]]:_0x3206x38[_0xf9b1[62]];_0x3206x2c[_0xf9b1[76]]= qs[_0xf9b1[77]](_0x3206x20[_0xf9b1[67]][_0xf9b1[77]]);_0x3206x2c[_0xf9b1[78]]= qs[_0xf9b1[69]](_[_0xf9b1[79]](_0x3206x20[_0xf9b1[67]],_0x3206x38[_0xf9b1[69]]));if(_0x3206x20[_0xf9b1[67]][_0xf9b1[83]]){_0x3206x2c[_0xf9b1[78]]= _[_0xf9b1[82]](_0x3206x2c[_0xf9b1[78]],{$or:_[_0xf9b1[85]](_0x3206x2c[_0xf9b1[71]],function(_0x3206x3b){var _0x3206x39={};_0x3206x39[_0x3206x3b]= {$like:_0xf9b1[84]+ _0x3206x20[_0xf9b1[67]][_0xf9b1[83]]+ _0xf9b1[84]};return _0x3206x39})})};_0x3206x2c= _[_0xf9b1[82]]({},_0x3206x2c,_0x3206x20[_0xf9b1[86]]);return _0x3206x61[_0xf9b1[272]](_0x3206x2c)}})[_0xf9b1[40]](function(_0x3206x40){if(_0x3206x40){_0x3206x2d= _0x3206x40[_0xf9b1[73]];if(!_0x3206x20[_0xf9b1[67]][_0xf9b1[75]](_0xf9b1[74])){_0x3206x2c[_0xf9b1[48]]= qs[_0xf9b1[48]](_0x3206x20[_0xf9b1[67]][_0xf9b1[48]]);_0x3206x2c[_0xf9b1[47]]= qs[_0xf9b1[47]](_0x3206x20[_0xf9b1[67]][_0xf9b1[47]])};return _0x3206x61[_0xf9b1[272]](_0x3206x2c)}})[_0xf9b1[40]](function(_0x3206x3d){if(_0x3206x3d){return _0x3206x3d?{count:_0x3206x2d,rows:_0x3206x3d}:null}})[_0xf9b1[40]](respondWithResult(_0x3206x29,null))[_0xf9b1[31]](handleError(_0x3206x29,null))};exports[_0xf9b1[273]]= function(_0x3206x20,_0x3206x26,_0x3206x3e){if(_0x3206x20[_0xf9b1[96]][_0xf9b1[92]]){delete _0x3206x20[_0xf9b1[96]][_0xf9b1[92]]};return db[_0xf9b1[64]][_0xf9b1[94]]({where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]}})[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29){_0x3206x20[_0xf9b1[96]][_0xf9b1[99]]= _0x3206x29[_0xf9b1[92]];return db[_0xf9b1[274]][_0xf9b1[95]](_0x3206x20[_0xf9b1[96]])}})[_0xf9b1[40]](respondWithResult(_0x3206x26,null))[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[275]]= function(_0x3206x20,_0x3206x26,_0x3206x3e){return db[_0xf9b1[276]][_0xf9b1[94]]({where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]}})[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29){return _0x3206x29[_0xf9b1[275]](_0x3206x20[_0xf9b1[96]][_0xf9b1[104]],_[_0xf9b1[234]](_0x3206x20[_0xf9b1[96]],[_0xf9b1[104],_0xf9b1[92]])|| {})}})[_0xf9b1[40]](respondWithResult(_0x3206x26,null))[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[277]]= function(_0x3206x20,_0x3206x29,_0x3206x3e){var _0x3206x2c={};var _0x3206x38={};var _0x3206x61;var _0x3206x2d;return db[_0xf9b1[64]][_0xf9b1[102]]({where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]}})[_0xf9b1[40]](handleEntityNotFound(_0x3206x29,null))[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29){_0x3206x61= _0x3206x29;_0x3206x38[_0xf9b1[62]]= _[_0xf9b1[65]](db[_0xf9b1[274]][_0xf9b1[63]]);_0x3206x38[_0xf9b1[67]]= _[_0xf9b1[65]](_0x3206x20[_0xf9b1[67]]);_0x3206x38[_0xf9b1[69]]= _[_0xf9b1[70]](_0x3206x38[_0xf9b1[62]],_0x3206x38[_0xf9b1[67]]);_0x3206x2c[_0xf9b1[71]]= _[_0xf9b1[70]](_0x3206x38[_0xf9b1[62]],qs[_0xf9b1[72]](_0x3206x20[_0xf9b1[67]][_0xf9b1[72]]));_0x3206x2c[_0xf9b1[71]]= (_0x3206x2c[_0xf9b1[71]][_0xf9b1[73]])?_0x3206x2c[_0xf9b1[71]]:_0x3206x38[_0xf9b1[62]];_0x3206x2c[_0xf9b1[76]]= qs[_0xf9b1[77]](_0x3206x20[_0xf9b1[67]][_0xf9b1[77]]);_0x3206x2c[_0xf9b1[78]]= qs[_0xf9b1[69]](_[_0xf9b1[79]](_0x3206x20[_0xf9b1[67]],_0x3206x38[_0xf9b1[69]]));if(_0x3206x20[_0xf9b1[67]][_0xf9b1[83]]){_0x3206x2c[_0xf9b1[78]]= _[_0xf9b1[82]](_0x3206x2c[_0xf9b1[78]],{$or:_[_0xf9b1[85]](_0x3206x2c[_0xf9b1[71]],function(_0x3206x3b){var _0x3206x39={};_0x3206x39[_0x3206x3b]= {$like:_0xf9b1[84]+ _0x3206x20[_0xf9b1[67]][_0xf9b1[83]]+ _0xf9b1[84]};return _0x3206x39})})};_0x3206x2c= _[_0xf9b1[82]]({},_0x3206x2c,_0x3206x20[_0xf9b1[86]]);return _0x3206x61[_0xf9b1[277]](_0x3206x2c)}})[_0xf9b1[40]](function(_0x3206x40){if(_0x3206x40){_0x3206x2d= _0x3206x40[_0xf9b1[73]];if(!_0x3206x20[_0xf9b1[67]][_0xf9b1[75]](_0xf9b1[74])){_0x3206x2c[_0xf9b1[48]]= qs[_0xf9b1[48]](_0x3206x20[_0xf9b1[67]][_0xf9b1[48]]);_0x3206x2c[_0xf9b1[47]]= qs[_0xf9b1[47]](_0x3206x20[_0xf9b1[67]][_0xf9b1[47]])};return _0x3206x61[_0xf9b1[277]](_0x3206x2c)}})[_0xf9b1[40]](function(_0x3206x3d){if(_0x3206x3d){return _0x3206x3d?{count:_0x3206x2d,rows:_0x3206x3d}:null}})[_0xf9b1[40]](respondWithResult(_0x3206x29,null))[_0xf9b1[31]](handleError(_0x3206x29,null))};exports[_0xf9b1[278]]= function(_0x3206x20,_0x3206x26,_0x3206x3e){return db[_0xf9b1[279]][_0xf9b1[94]]({where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]}})[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29){return _0x3206x29[_0xf9b1[278]](_0x3206x20[_0xf9b1[96]][_0xf9b1[104]],_[_0xf9b1[234]](_0x3206x20[_0xf9b1[96]],[_0xf9b1[104],_0xf9b1[92]])|| {})}})[_0xf9b1[40]](respondWithResult(_0x3206x26,null))[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[266]]= function(_0x3206x20,_0x3206x29,_0x3206x3e){var _0x3206x2c={};var _0x3206x38={};var _0x3206x61;var _0x3206x2d;return db[_0xf9b1[64]][_0xf9b1[102]]({where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]}})[_0xf9b1[40]](handleEntityNotFound(_0x3206x29,null))[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29){_0x3206x61= _0x3206x29;_0x3206x38[_0xf9b1[62]]= _[_0xf9b1[65]](db[_0xf9b1[280]][_0xf9b1[63]]);_0x3206x38[_0xf9b1[67]]= _[_0xf9b1[65]](_0x3206x20[_0xf9b1[67]]);_0x3206x38[_0xf9b1[69]]= _[_0xf9b1[70]](_0x3206x38[_0xf9b1[62]],_0x3206x38[_0xf9b1[67]]);_0x3206x2c[_0xf9b1[71]]= _[_0xf9b1[70]](_0x3206x38[_0xf9b1[62]],qs[_0xf9b1[72]](_0x3206x20[_0xf9b1[67]][_0xf9b1[72]]));_0x3206x2c[_0xf9b1[71]]= (_0x3206x2c[_0xf9b1[71]][_0xf9b1[73]])?_0x3206x2c[_0xf9b1[71]]:_0x3206x38[_0xf9b1[62]];_0x3206x2c[_0xf9b1[76]]= qs[_0xf9b1[77]](_0x3206x20[_0xf9b1[67]][_0xf9b1[77]]);_0x3206x2c[_0xf9b1[78]]= qs[_0xf9b1[69]](_[_0xf9b1[79]](_0x3206x20[_0xf9b1[67]],_0x3206x38[_0xf9b1[69]]));if(_0x3206x20[_0xf9b1[67]][_0xf9b1[83]]){_0x3206x2c[_0xf9b1[78]]= _[_0xf9b1[82]](_0x3206x2c[_0xf9b1[78]],{$or:_[_0xf9b1[85]](_0x3206x2c[_0xf9b1[71]],function(_0x3206x3b){var _0x3206x39={};_0x3206x39[_0x3206x3b]= {$like:_0xf9b1[84]+ _0x3206x20[_0xf9b1[67]][_0xf9b1[83]]+ _0xf9b1[84]};return _0x3206x39})})};_0x3206x2c= _[_0xf9b1[82]]({},_0x3206x2c,_0x3206x20[_0xf9b1[86]]);return _0x3206x61[_0xf9b1[266]](_0x3206x2c)}})[_0xf9b1[40]](function(_0x3206x40){if(_0x3206x40){_0x3206x2d= _0x3206x40[_0xf9b1[73]];if(!_0x3206x20[_0xf9b1[67]][_0xf9b1[75]](_0xf9b1[74])){_0x3206x2c[_0xf9b1[48]]= qs[_0xf9b1[48]](_0x3206x20[_0xf9b1[67]][_0xf9b1[48]]);_0x3206x2c[_0xf9b1[47]]= qs[_0xf9b1[47]](_0x3206x20[_0xf9b1[67]][_0xf9b1[47]])};return _0x3206x61[_0xf9b1[266]](_0x3206x2c)}})[_0xf9b1[40]](function(_0x3206x3d){if(_0x3206x3d){return _0x3206x3d?{count:_0x3206x2d,rows:_0x3206x3d}:null}})[_0xf9b1[40]](respondWithResult(_0x3206x29,null))[_0xf9b1[31]](handleError(_0x3206x29,null))};exports[_0xf9b1[281]]= function(_0x3206x20,_0x3206x26,_0x3206x3e){var _0x3206x62=_0x3206x20[_0xf9b1[67]][_0xf9b1[282]]=== _0xf9b1[283]?_0xf9b1[284]:_0xf9b1[285];return db[_0xf9b1[64]][_0xf9b1[94]]({attributes:[_0xf9b1[92],_0x3206x62],where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]}})[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29){var _0x3206x63=_0x3206x29[_0x3206x62];var _0x3206x3d=(_0x3206x63&& _0x3206x63[_0xf9b1[286]])?_0x3206x63[_0xf9b1[286]]:[];_0x3206x26[_0xf9b1[60]]({fromKey:_[_0xf9b1[116]](_0x3206x63[_0xf9b1[287]])?undefined:_0x3206x63[_0xf9b1[287]],count:_0x3206x3d[_0xf9b1[73]],rows:_0x3206x3d})}})[_0xf9b1[31]](handleError(_0x3206x26,null))};exports[_0xf9b1[288]]= function(_0x3206x20,_0x3206x26,_0x3206x3e){var _0x3206x2c={raw:true,where:{}};var _0x3206x38={};var _0x3206x3f={count:0,rows:[]};return db[_0xf9b1[64]][_0xf9b1[102]]({where:{id:_0x3206x20[_0xf9b1[93]][_0xf9b1[92]]}})[_0xf9b1[40]](handleEntityNotFound(_0x3206x26,null))[_0xf9b1[40]](function(_0x3206x29){if(_0x3206x29){_0x3206x38[_0xf9b1[62]]= _[_0xf9b1[65]](db[_0xf9b1[228]][_0xf9b1[63]]);_0x3206x38[_0xf9b1[67]]= _[_0xf9b1[65]](_0x3206x20[_0xf9b1[67]]);_0x3206x38[_0xf9b1[69]]= _[_0xf9b1[70]](_0x3206x38[_0xf9b1[62]],_0x3206x38[_0xf9b1[67]]);_0x3206x2c[_0xf9b1[71]]= _[_0xf9b1[70]](_0x3206x38[_0xf9b1[62]],qs[_0xf9b1[72]](_0x3206x20[_0xf9b1[67]][_0xf9b1[72]]));_0x3206x2c[_0xf9b1[71]]= (_0x3206x2c[_0xf9b1[71]][_0xf9b1[73]])?_0x3206x2c[_0xf9b1[71]]:_0x3206x38[_0xf9b1[62]];if(!_0x3206x20[_0xf9b1[67]][_0xf9b1[75]](_0xf9b1[74])){_0x3206x2c[_0xf9b1[48]]= qs[_0xf9b1[48]](_0x3206x20[_0xf9b1[67]][_0xf9b1[48]]);_0x3206x2c[_0xf9b1[47]]= qs[_0xf9b1[47]](_0x3206x20[_0xf9b1[67]][_0xf9b1[47]])};_0x3206x2c[_0xf9b1[76]]= qs[_0xf9b1[77]](_0x3206x20[_0xf9b1[67]][_0xf9b1[77]]);_0x3206x2c[_0xf9b1[78]]= qs[_0xf9b1[69]](_[_0xf9b1[79]](_0x3206x20[_0xf9b1[67]],_0x3206x38[_0xf9b1[69]]));_0x3206x2c[_0xf9b1[78]][_0xf9b1[99]]= _0x3206x29[_0xf9b1[92]];if(_0x3206x20[_0xf9b1[67]][_0xf9b1[83]]){_0x3206x2c[_0xf9b1[78]]= _[_0xf9b1[82]](_0x3206x2c[_0xf9b1[78]],{$or:_[_0xf9b1[85]](_0x3206x2c[_0xf9b1[71]],function(_0x3206x3b){var _0x3206x39={};_0x3206x39[_0x3206x3b]= {$like:_0xf9b1[84]+ _0x3206x20[_0xf9b1[67]][_0xf9b1[83]]+ _0xf9b1[84]};return _0x3206x39})})};_0x3206x2c= _[_0xf9b1[82]]({},_0x3206x2c,_0x3206x20[_0xf9b1[86]]);return db[_0xf9b1[228]][_0xf9b1[46]]({where:_0x3206x2c[_0xf9b1[78]]})[_0xf9b1[40]](function(_0x3206x2d){_0x3206x3f[_0xf9b1[46]]= _0x3206x2d;if(_0x3206x20[_0xf9b1[67]][_0xf9b1[88]]){_0x3206x2c[_0xf9b1[89]]= [{all:true}]};return db[_0xf9b1[228]][_0xf9b1[90]](_0x3206x2c)})[_0xf9b1[40]](function(_0x3206x3d){_0x3206x3f[_0xf9b1[87]]= _0x3206x3d;return _0x3206x3f})}})[_0xf9b1[40]](respondWithFilteredResult(_0x3206x26,_0x3206x2c))[_0xf9b1[31]](handleError(_0x3206x26,null))}
\ No newline at end of file
index 17175cf..9b09611 100644 (file)
@@ -1 +1 @@
-var _0x5488=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x5488[0];var _=require(_0x5488[1]);var util=require(_0x5488[2]);var logger=require(_0x5488[4])(_0x5488[3]);var moment=require(_0x5488[5]);var BPromise=require(_0x5488[6]);var rp=require(_0x5488[7]);var attributes=require(_0x5488[8]);module[_0x5488[9]]= function(_0x10e4x8,_0x10e4x9){return _0x10e4x8[_0x5488[12]](_0x5488[10],attributes,{tableName:_0x5488[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x5b9d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x5b9d[0];var _=require(_0x5b9d[1]);var util=require(_0x5b9d[2]);var logger=require(_0x5b9d[4])(_0x5b9d[3]);var moment=require(_0x5b9d[5]);var BPromise=require(_0x5b9d[6]);var rp=require(_0x5b9d[7]);var attributes=require(_0x5b9d[8]);module[_0x5b9d[9]]= function(_0x8243x8,_0x8243x9){return _0x8243x8[_0x5b9d[12]](_0x5b9d[10],attributes,{tableName:_0x5b9d[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 9f55273..7264188 100644 (file)
@@ -1 +1 @@
-var _0x6a0d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x6a0d[0];var _=require(_0x6a0d[1]);var util=require(_0x6a0d[2]);var moment=require(_0x6a0d[3]);var BPromise=require(_0x6a0d[4]);var rs=require(_0x6a0d[5]);var fs=require(_0x6a0d[6]);var db=require(_0x6a0d[8])[_0x6a0d[7]];var utils=require(_0x6a0d[9]);var logger=require(_0x6a0d[11])(_0x6a0d[10]);var config=require(_0x6a0d[12]);var jayson=require(_0x6a0d[13]);var client=jayson[_0x6a0d[15]][_0x6a0d[14]]({port:9002});function respondWithRpcPromise(_0x2a68xe,_0x2a68xf,_0x2a68x10){return  new BPromise(function(_0x2a68x11,_0x2a68x12){return client[_0x6a0d[28]](_0x2a68xe,_0x2a68x10)[_0x6a0d[27]](function(_0x2a68x14){logger[_0x6a0d[20]](_0x6a0d[16],_0x2a68xf,_0x6a0d[19]);logger[_0x6a0d[23]](_0x6a0d[21],_0x2a68xf,_0x6a0d[19],JSON[_0x6a0d[22]](_0x2a68x14));if(_0x2a68x14[_0x6a0d[17]]){if(_0x2a68x14[_0x6a0d[17]][_0x6a0d[24]]=== 500){logger[_0x6a0d[17]](_0x6a0d[16],_0x2a68xf,_0x2a68x14[_0x6a0d[17]][_0x6a0d[25]]);return _0x2a68x12(_0x2a68x14[_0x6a0d[17]][_0x6a0d[25]])};logger[_0x6a0d[17]](_0x6a0d[16],_0x2a68xf,_0x2a68x14[_0x6a0d[17]][_0x6a0d[25]]);return _0x2a68x11(_0x2a68x14[_0x6a0d[17]][_0x6a0d[25]])}else {logger[_0x6a0d[20]](_0x6a0d[16],_0x2a68xf,_0x6a0d[19]);_0x2a68x11(_0x2a68x14[_0x6a0d[26]][_0x6a0d[25]])}})[_0x6a0d[18]](function(_0x2a68x13){logger[_0x6a0d[17]](_0x6a0d[16],_0x2a68xf,_0x2a68x13);_0x2a68x12(_0x2a68x13)})})}
\ No newline at end of file
+var _0xfe74=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xfe74[0];var _=require(_0xfe74[1]);var util=require(_0xfe74[2]);var moment=require(_0xfe74[3]);var BPromise=require(_0xfe74[4]);var rs=require(_0xfe74[5]);var fs=require(_0xfe74[6]);var db=require(_0xfe74[8])[_0xfe74[7]];var utils=require(_0xfe74[9]);var logger=require(_0xfe74[11])(_0xfe74[10]);var config=require(_0xfe74[12]);var jayson=require(_0xfe74[13]);var client=jayson[_0xfe74[15]][_0xfe74[14]]({port:9002});function respondWithRpcPromise(_0x76f8xe,_0x76f8xf,_0x76f8x10){return  new BPromise(function(_0x76f8x11,_0x76f8x12){return client[_0xfe74[28]](_0x76f8xe,_0x76f8x10)[_0xfe74[27]](function(_0x76f8x14){logger[_0xfe74[20]](_0xfe74[16],_0x76f8xf,_0xfe74[19]);logger[_0xfe74[23]](_0xfe74[21],_0x76f8xf,_0xfe74[19],JSON[_0xfe74[22]](_0x76f8x14));if(_0x76f8x14[_0xfe74[17]]){if(_0x76f8x14[_0xfe74[17]][_0xfe74[24]]=== 500){logger[_0xfe74[17]](_0xfe74[16],_0x76f8xf,_0x76f8x14[_0xfe74[17]][_0xfe74[25]]);return _0x76f8x12(_0x76f8x14[_0xfe74[17]][_0xfe74[25]])};logger[_0xfe74[17]](_0xfe74[16],_0x76f8xf,_0x76f8x14[_0xfe74[17]][_0xfe74[25]]);return _0x76f8x11(_0x76f8x14[_0xfe74[17]][_0xfe74[25]])}else {logger[_0xfe74[20]](_0xfe74[16],_0x76f8xf,_0xfe74[19]);_0x76f8x11(_0x76f8x14[_0xfe74[26]][_0xfe74[25]])}})[_0xfe74[18]](function(_0x76f8x13){logger[_0xfe74[17]](_0xfe74[16],_0x76f8xf,_0x76f8x13);_0x76f8x12(_0x76f8x13)})})}
\ No newline at end of file
index 5a2b2c3..0dac33e 100644 (file)
@@ -1 +1 @@
-var _0x3b33=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x73","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x6C\x6F\x67\x6F","\x67\x65\x74\x4C\x6F\x67\x6F","\x2F\x3A\x69\x64\x2F\x61\x76\x61\x74\x61\x72","\x67\x65\x74\x41\x76\x61\x74\x61\x72","\x2F\x3A\x69\x64\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x73\x6E\x69\x70\x70\x65\x74","\x67\x65\x74\x53\x6E\x69\x70\x70\x65\x74","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x6F\x66\x66\x6C\x69\x6E\x65\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x6E\x73\x77\x65\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6C\x6F\x67\x6F\x73\x2F","\x6A\x6F\x69\x6E","\x25\x73\x2D\x25\x73","\x6E\x6F\x77","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x64\x69\x73\x6B\x53\x74\x6F\x72\x61\x67\x65","\x66\x69\x6C\x65","\x73\x69\x6E\x67\x6C\x65","\x61\x64\x64\x4C\x6F\x67\x6F","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x61\x76\x61\x74\x61\x72\x73\x2F","\x61\x64\x64\x41\x76\x61\x74\x61\x72","\x2F\x3A\x69\x64\x2F\x6E\x6F\x74\x69\x66\x79","\x6E\x6F\x74\x69\x66\x79","\x2F\x3A\x69\x64\x2F\x6F\x66\x66\x6C\x69\x6E\x65","\x6F\x66\x66\x6C\x69\x6E\x65","\x61\x64\x64\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x61\x64\x64\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x6E\x73\x77\x65\x72\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x3b33[0];var multer=require(_0x3b33[1]);var util=require(_0x3b33[2]);var path=require(_0x3b33[3]);var express=require(_0x3b33[4]);var router=express.Router();var auth=require(_0x3b33[5]);var interaction=require(_0x3b33[6]);var config=require(_0x3b33[7]);var controller=require(_0x3b33[8]);router[_0x3b33[12]](_0x3b33[9],auth[_0x3b33[10]](),controller[_0x3b33[11]]);router[_0x3b33[12]](_0x3b33[13],auth[_0x3b33[10]](),controller[_0x3b33[14]]);router[_0x3b33[12]](_0x3b33[15],auth[_0x3b33[10]](),controller[_0x3b33[16]]);router[_0x3b33[12]](_0x3b33[17],auth[_0x3b33[10]](),controller[_0x3b33[18]]);router[_0x3b33[12]](_0x3b33[19],controller[_0x3b33[20]]);router[_0x3b33[12]](_0x3b33[21],controller[_0x3b33[22]]);router[_0x3b33[12]](_0x3b33[23],auth[_0x3b33[10]](),controller[_0x3b33[24]]);router[_0x3b33[12]](_0x3b33[25],controller[_0x3b33[26]]);router[_0x3b33[12]](_0x3b33[27],auth[_0x3b33[10]](),controller[_0x3b33[28]]);router[_0x3b33[12]](_0x3b33[29],auth[_0x3b33[10]](),controller[_0x3b33[30]]);router[_0x3b33[12]](_0x3b33[31],auth[_0x3b33[10]](),controller[_0x3b33[32]]);router[_0x3b33[12]](_0x3b33[33],controller[_0x3b33[34]]);router[_0x3b33[12]](_0x3b33[35],auth[_0x3b33[10]](),controller[_0x3b33[36]]);router[_0x3b33[38]](_0x3b33[9],auth[_0x3b33[10]](),controller[_0x3b33[37]]);router[_0x3b33[38]](_0x3b33[17],auth[_0x3b33[10]](),controller[_0x3b33[39]]);var upload=multer({storage:multer[_0x3b33[47]]({destination:function(_0xb841xb,_0xb841xc,_0xb841xd){_0xb841xd(null,path[_0x3b33[42]](config[_0x3b33[40]],_0x3b33[41]))},filename:function(_0xb841xb,_0xb841xc,_0xb841xd){_0xb841xd(null,util[_0x3b33[46]](_0x3b33[43],Date[_0x3b33[44]](),_0xb841xc[_0x3b33[45]]))}})});router[_0x3b33[38]](_0x3b33[19],upload[_0x3b33[49]](_0x3b33[48]),controller[_0x3b33[50]]);var upload=multer({storage:multer[_0x3b33[47]]({destination:function(_0xb841xb,_0xb841xc,_0xb841xd){_0xb841xd(null,path[_0x3b33[42]](config[_0x3b33[40]],_0x3b33[51]))},filename:function(_0xb841xb,_0xb841xc,_0xb841xd){_0xb841xd(null,util[_0x3b33[46]](_0x3b33[43],Date[_0x3b33[44]](),_0xb841xc[_0x3b33[45]]))}})});router[_0x3b33[38]](_0x3b33[21],upload[_0x3b33[49]](_0x3b33[48]),controller[_0x3b33[52]]);router[_0x3b33[38]](_0x3b33[53],controller[_0x3b33[54]]);router[_0x3b33[38]](_0x3b33[55],controller[_0x3b33[56]]);router[_0x3b33[38]](_0x3b33[23],auth[_0x3b33[10]](),controller[_0x3b33[57]]);router[_0x3b33[38]](_0x3b33[27],auth[_0x3b33[10]](),controller[_0x3b33[58]]);router[_0x3b33[38]](_0x3b33[29],auth[_0x3b33[10]](),controller[_0x3b33[59]]);router[_0x3b33[38]](_0x3b33[29],auth[_0x3b33[10]](),controller[_0x3b33[60]]);router[_0x3b33[38]](_0x3b33[31],auth[_0x3b33[10]](),controller[_0x3b33[61]]);router[_0x3b33[63]](_0x3b33[15],auth[_0x3b33[10]](),controller[_0x3b33[62]]);router[_0x3b33[65]](_0x3b33[15],auth[_0x3b33[10]](),controller[_0x3b33[64]]);router[_0x3b33[65]](_0x3b33[17],auth[_0x3b33[10]](),controller[_0x3b33[66]]);module[_0x3b33[67]]= router
\ No newline at end of file
+var _0x2dfc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x73","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x6C\x6F\x67\x6F","\x67\x65\x74\x4C\x6F\x67\x6F","\x2F\x3A\x69\x64\x2F\x61\x76\x61\x74\x61\x72","\x67\x65\x74\x41\x76\x61\x74\x61\x72","\x2F\x3A\x69\x64\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x73\x6E\x69\x70\x70\x65\x74","\x67\x65\x74\x53\x6E\x69\x70\x70\x65\x74","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x6F\x66\x66\x6C\x69\x6E\x65\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x6E\x73\x77\x65\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6C\x6F\x67\x6F\x73\x2F","\x6A\x6F\x69\x6E","\x25\x73\x2D\x25\x73","\x6E\x6F\x77","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x64\x69\x73\x6B\x53\x74\x6F\x72\x61\x67\x65","\x66\x69\x6C\x65","\x73\x69\x6E\x67\x6C\x65","\x61\x64\x64\x4C\x6F\x67\x6F","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x61\x76\x61\x74\x61\x72\x73\x2F","\x61\x64\x64\x41\x76\x61\x74\x61\x72","\x2F\x3A\x69\x64\x2F\x6E\x6F\x74\x69\x66\x79","\x6E\x6F\x74\x69\x66\x79","\x2F\x3A\x69\x64\x2F\x6F\x66\x66\x6C\x69\x6E\x65","\x6F\x66\x66\x6C\x69\x6E\x65","\x61\x64\x64\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x61\x64\x64\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x6E\x73\x77\x65\x72\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x2dfc[0];var multer=require(_0x2dfc[1]);var util=require(_0x2dfc[2]);var path=require(_0x2dfc[3]);var express=require(_0x2dfc[4]);var router=express.Router();var auth=require(_0x2dfc[5]);var interaction=require(_0x2dfc[6]);var config=require(_0x2dfc[7]);var controller=require(_0x2dfc[8]);router[_0x2dfc[12]](_0x2dfc[9],auth[_0x2dfc[10]](),controller[_0x2dfc[11]]);router[_0x2dfc[12]](_0x2dfc[13],auth[_0x2dfc[10]](),controller[_0x2dfc[14]]);router[_0x2dfc[12]](_0x2dfc[15],auth[_0x2dfc[10]](),controller[_0x2dfc[16]]);router[_0x2dfc[12]](_0x2dfc[17],auth[_0x2dfc[10]](),controller[_0x2dfc[18]]);router[_0x2dfc[12]](_0x2dfc[19],controller[_0x2dfc[20]]);router[_0x2dfc[12]](_0x2dfc[21],controller[_0x2dfc[22]]);router[_0x2dfc[12]](_0x2dfc[23],auth[_0x2dfc[10]](),controller[_0x2dfc[24]]);router[_0x2dfc[12]](_0x2dfc[25],controller[_0x2dfc[26]]);router[_0x2dfc[12]](_0x2dfc[27],auth[_0x2dfc[10]](),controller[_0x2dfc[28]]);router[_0x2dfc[12]](_0x2dfc[29],auth[_0x2dfc[10]](),controller[_0x2dfc[30]]);router[_0x2dfc[12]](_0x2dfc[31],auth[_0x2dfc[10]](),controller[_0x2dfc[32]]);router[_0x2dfc[12]](_0x2dfc[33],controller[_0x2dfc[34]]);router[_0x2dfc[12]](_0x2dfc[35],auth[_0x2dfc[10]](),controller[_0x2dfc[36]]);router[_0x2dfc[38]](_0x2dfc[9],auth[_0x2dfc[10]](),controller[_0x2dfc[37]]);router[_0x2dfc[38]](_0x2dfc[17],auth[_0x2dfc[10]](),controller[_0x2dfc[39]]);var upload=multer({storage:multer[_0x2dfc[47]]({destination:function(_0xc415xb,_0xc415xc,_0xc415xd){_0xc415xd(null,path[_0x2dfc[42]](config[_0x2dfc[40]],_0x2dfc[41]))},filename:function(_0xc415xb,_0xc415xc,_0xc415xd){_0xc415xd(null,util[_0x2dfc[46]](_0x2dfc[43],Date[_0x2dfc[44]](),_0xc415xc[_0x2dfc[45]]))}})});router[_0x2dfc[38]](_0x2dfc[19],upload[_0x2dfc[49]](_0x2dfc[48]),controller[_0x2dfc[50]]);var upload=multer({storage:multer[_0x2dfc[47]]({destination:function(_0xc415xb,_0xc415xc,_0xc415xd){_0xc415xd(null,path[_0x2dfc[42]](config[_0x2dfc[40]],_0x2dfc[51]))},filename:function(_0xc415xb,_0xc415xc,_0xc415xd){_0xc415xd(null,util[_0x2dfc[46]](_0x2dfc[43],Date[_0x2dfc[44]](),_0xc415xc[_0x2dfc[45]]))}})});router[_0x2dfc[38]](_0x2dfc[21],upload[_0x2dfc[49]](_0x2dfc[48]),controller[_0x2dfc[52]]);router[_0x2dfc[38]](_0x2dfc[53],controller[_0x2dfc[54]]);router[_0x2dfc[38]](_0x2dfc[55],controller[_0x2dfc[56]]);router[_0x2dfc[38]](_0x2dfc[23],auth[_0x2dfc[10]](),controller[_0x2dfc[57]]);router[_0x2dfc[38]](_0x2dfc[27],auth[_0x2dfc[10]](),controller[_0x2dfc[58]]);router[_0x2dfc[38]](_0x2dfc[29],auth[_0x2dfc[10]](),controller[_0x2dfc[59]]);router[_0x2dfc[38]](_0x2dfc[29],auth[_0x2dfc[10]](),controller[_0x2dfc[60]]);router[_0x2dfc[38]](_0x2dfc[31],auth[_0x2dfc[10]](),controller[_0x2dfc[61]]);router[_0x2dfc[63]](_0x2dfc[15],auth[_0x2dfc[10]](),controller[_0x2dfc[62]]);router[_0x2dfc[65]](_0x2dfc[15],auth[_0x2dfc[10]](),controller[_0x2dfc[64]]);router[_0x2dfc[65]](_0x2dfc[17],auth[_0x2dfc[10]](),controller[_0x2dfc[66]]);module[_0x2dfc[67]]= router
\ No newline at end of file
index 3c27074..9c9428f 100644 (file)
@@ -1 +1 @@
-var _0x6d64=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65"];_0x6d64[0];var Sequelize=require(_0x6d64[1]);module[_0x6d64[2]]= {name:{type:Sequelize[_0x6d64[3]],unique:_0x6d64[4],allowNull:false,validate:{notEmpty:true}},vat:{type:Sequelize[_0x6d64[3]]},companyId:{type:Sequelize[_0x6d64[3]]},website:{type:Sequelize[_0x6d64[3]]},phone:{type:Sequelize[_0x6d64[3]]},fax:{type:Sequelize[_0x6d64[3]]},type:{type:Sequelize[_0x6d64[3]]},street:{type:Sequelize[_0x6d64[3]]},postalCode:{type:Sequelize[_0x6d64[3]]},city:{type:Sequelize[_0x6d64[3]]},country:{type:Sequelize[_0x6d64[3]]},email:{type:Sequelize[_0x6d64[3]],validate:{isEmail:true}},emailDomain:{type:Sequelize[_0x6d64[3]]},sStreet:{type:Sequelize[_0x6d64[3]]},sPostalCode:{type:Sequelize[_0x6d64[3]]},sCity:{type:Sequelize[_0x6d64[3]]},sCountry:{type:Sequelize[_0x6d64[3]]},description:{type:Sequelize[_0x6d64[3]]}}
\ No newline at end of file
+var _0xabf5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65"];_0xabf5[0];var Sequelize=require(_0xabf5[1]);module[_0xabf5[2]]= {name:{type:Sequelize[_0xabf5[3]],unique:_0xabf5[4],allowNull:false,validate:{notEmpty:true}},vat:{type:Sequelize[_0xabf5[3]]},companyId:{type:Sequelize[_0xabf5[3]]},website:{type:Sequelize[_0xabf5[3]]},phone:{type:Sequelize[_0xabf5[3]]},fax:{type:Sequelize[_0xabf5[3]]},type:{type:Sequelize[_0xabf5[3]]},street:{type:Sequelize[_0xabf5[3]]},postalCode:{type:Sequelize[_0xabf5[3]]},city:{type:Sequelize[_0xabf5[3]]},country:{type:Sequelize[_0xabf5[3]]},email:{type:Sequelize[_0xabf5[3]],validate:{isEmail:true}},emailDomain:{type:Sequelize[_0xabf5[3]]},sStreet:{type:Sequelize[_0xabf5[3]]},sPostalCode:{type:Sequelize[_0xabf5[3]]},sCity:{type:Sequelize[_0xabf5[3]]},sCountry:{type:Sequelize[_0xabf5[3]]},description:{type:Sequelize[_0xabf5[3]]}}
\ No newline at end of file
index ad3482b..127bfbe 100644 (file)
@@ -1 +1 @@
-var _0xb3aa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x6D\x43\x6F\x6D\x70\x61\x6E\x79","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x61\x64\x64\x43\x6F\x6E\x74\x61\x63\x74\x73","\x69\x64\x73","\x6F\x6D\x69\x74","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x66\x69\x6E\x64\x4F\x6E\x65"];_0xb3aa[0];var jsonpatch=require(_0xb3aa[1]);var rp=require(_0xb3aa[2]);var moment=require(_0xb3aa[3]);var BPromise=require(_0xb3aa[4]);var Mustache=require(_0xb3aa[5]);var util=require(_0xb3aa[6]);var path=require(_0xb3aa[7]);var sox=require(_0xb3aa[8]);var csv=require(_0xb3aa[9]);var ejs=require(_0xb3aa[10]);var fs=require(_0xb3aa[11]);var _=require(_0xb3aa[12]);var squel=require(_0xb3aa[13]);var crypto=require(_0xb3aa[14]);var jsforce=require(_0xb3aa[15]);var deskjs=require(_0xb3aa[16]);var toCsv=require(_0xb3aa[9]);var querystring=require(_0xb3aa[17]);var Papa=require(_0xb3aa[18]);var qs=require(_0xb3aa[19]);var logger=require(_0xb3aa[21])(_0xb3aa[20]);var utils=require(_0xb3aa[22]);var config=require(_0xb3aa[23]);var db=require(_0xb3aa[25])[_0xb3aa[24]];function respondWithStatusCode(_0x89cdx1a,_0x89cdx1b){_0x89cdx1b= _0x89cdx1b|| 204;return function(_0x89cdx1c){if(_0x89cdx1c){return _0x89cdx1a[_0xb3aa[26]](_0x89cdx1b)};return _0x89cdx1a[_0xb3aa[28]](_0x89cdx1b)[_0xb3aa[27]]()}}function respondWithResult(_0x89cdx1a,_0x89cdx1b){_0x89cdx1b= _0x89cdx1b|| 200;return function(_0x89cdx1c){if(_0x89cdx1c){return _0x89cdx1a[_0xb3aa[28]](_0x89cdx1b)[_0xb3aa[29]](_0x89cdx1c)}}}function respondWithFilteredResult(_0x89cdx1a,_0x89cdx1f){return function(_0x89cdx1c){if(_0x89cdx1c){var _0x89cdx20=_0x89cdx1c[_0xb3aa[30]],_0x89cdx21=_0x89cdx1f[_0xb3aa[31]],_0x89cdx22=_0x89cdx1f[_0xb3aa[31]]+ _0x89cdx1f[_0xb3aa[32]],_0x89cdx1b;if(_0x89cdx22>= _0x89cdx20){_0x89cdx22= _0x89cdx20;_0x89cdx1b= 200}else {_0x89cdx1b= 206};_0x89cdx1a[_0xb3aa[28]](_0x89cdx1b);return _0x89cdx1a[_0xb3aa[36]](_0xb3aa[33],_0x89cdx21+ _0xb3aa[34]+ _0x89cdx22+ _0xb3aa[35]+ _0x89cdx20)[_0xb3aa[29]](_0x89cdx1c)};return null}}function patchUpdates(_0x89cdx24){return function(_0x89cdx1c){try{jsonpatch[_0xb3aa[37]](_0x89cdx1c,_0x89cdx24,true)}catch(err){return BPromise[_0xb3aa[38]](err)};return _0x89cdx1c[_0xb3aa[39]]()}}function saveUpdates(_0x89cdx26,_0x89cdx1b){return function(_0x89cdx1c){if(_0x89cdx1c){return _0x89cdx1c[_0xb3aa[41]](_0x89cdx26)[_0xb3aa[40]](function(_0x89cdx27){return _0x89cdx27})};return null}}function removeEntity(_0x89cdx1a,_0x89cdx1b){return function(_0x89cdx1c){if(_0x89cdx1c){return _0x89cdx1c[_0xb3aa[42]]()[_0xb3aa[40]](function(){_0x89cdx1a[_0xb3aa[28]](204)[_0xb3aa[27]]()})}}}function handleEntityNotFound(_0x89cdx1a,_0x89cdx1b){return function(_0x89cdx1c){if(!_0x89cdx1c){_0x89cdx1a[_0xb3aa[26]](404)};return _0x89cdx1c}}function handleError(_0x89cdx1a,_0x89cdx1b){_0x89cdx1b= _0x89cdx1b|| 500;return function(_0x89cdx2b){logger[_0xb3aa[44]](_0x89cdx2b[_0xb3aa[43]]);if(_0x89cdx2b[_0xb3aa[45]]){delete _0x89cdx2b[_0xb3aa[45]]};_0x89cdx1a[_0xb3aa[28]](_0x89cdx1b)[_0xb3aa[46]](_0x89cdx2b)}}exports[_0xb3aa[47]]= function(_0x89cdx2c,_0x89cdx1a){var _0x89cdx1f={},_0x89cdx2d={},_0x89cdx2e={count:0,rows:[]};_0x89cdx2d[_0xb3aa[48]]= _[_0xb3aa[51]](db[_0xb3aa[50]][_0xb3aa[49]]);var _0x89cdx2f={dateStart:_0x89cdx2c[_0xb3aa[53]][_0xb3aa[52]],dateEnd:_0x89cdx2c[_0xb3aa[53]][_0xb3aa[54]]};delete _0x89cdx2c[_0xb3aa[53]][_0xb3aa[52]];delete _0x89cdx2c[_0xb3aa[53]][_0xb3aa[54]];_0x89cdx2d[_0xb3aa[53]]= _[_0xb3aa[51]](_0x89cdx2c[_0xb3aa[53]]);_0x89cdx2d[_0xb3aa[55]]= _[_0xb3aa[56]](_0x89cdx2d[_0xb3aa[48]],_0x89cdx2d[_0xb3aa[53]]);_0x89cdx1f[_0xb3aa[57]]= _[_0xb3aa[56]](_0x89cdx2d[_0xb3aa[48]],qs[_0xb3aa[58]](_0x89cdx2c[_0xb3aa[53]][_0xb3aa[58]]));_0x89cdx1f[_0xb3aa[57]]= (_0x89cdx1f[_0xb3aa[57]][_0xb3aa[59]])?_0x89cdx1f[_0xb3aa[57]]:_0x89cdx2d[_0xb3aa[48]];if(!_0x89cdx2c[_0xb3aa[53]][_0xb3aa[61]](_0xb3aa[60])){_0x89cdx1f[_0xb3aa[32]]= qs[_0xb3aa[32]](_0x89cdx2c[_0xb3aa[53]][_0xb3aa[32]]);_0x89cdx1f[_0xb3aa[31]]= qs[_0xb3aa[31]](_0x89cdx2c[_0xb3aa[53]][_0xb3aa[31]])};_0x89cdx1f[_0xb3aa[62]]= qs[_0xb3aa[63]](_0x89cdx2c[_0xb3aa[53]][_0xb3aa[63]]);_0x89cdx1f[_0xb3aa[64]]= qs[_0xb3aa[55]](_[_0xb3aa[65]](_0x89cdx2c[_0xb3aa[53]],_0x89cdx2d[_0xb3aa[55]]));if(_0x89cdx2f[_0xb3aa[52]]){if(_0x89cdx2f[_0xb3aa[54]]){_0x89cdx2f[_0xb3aa[54]]= moment(_0x89cdx2f[_0xb3aa[54]])[_0xb3aa[67]](1,_0xb3aa[66])}else {_0x89cdx2f[_0xb3aa[54]]= moment(_0x89cdx2f[_0xb3aa[52]])[_0xb3aa[67]](1,_0xb3aa[66])};_[_0xb3aa[68]](_0x89cdx1f[_0xb3aa[64]],{createdAt:{$gte:_0x89cdx2f[_0xb3aa[52]],$lte:_0x89cdx2f[_0xb3aa[54]]}})};if(_0x89cdx2c[_0xb3aa[53]][_0xb3aa[69]]){_0x89cdx1f[_0xb3aa[64]]= _[_0xb3aa[68]](_0x89cdx1f[_0xb3aa[64]],{$or:_[_0xb3aa[71]](_0x89cdx1f[_0xb3aa[57]],function(_0x89cdx30){var _0x89cdx2e={};_0x89cdx2e[_0x89cdx30]= {$like:_0xb3aa[70]+ _0x89cdx2c[_0xb3aa[53]][_0xb3aa[69]]+ _0xb3aa[70]};return _0x89cdx2e})})};_0x89cdx1f= _[_0xb3aa[68]]({},_0x89cdx1f,_0x89cdx2c[_0xb3aa[72]]);var _0x89cdx31={where:_0x89cdx1f[_0xb3aa[64]]};return db[_0xb3aa[50]][_0xb3aa[30]](_0x89cdx31)[_0xb3aa[40]](function(_0x89cdx20){_0x89cdx2e[_0xb3aa[30]]= _0x89cdx20;if(_0x89cdx2c[_0xb3aa[53]][_0xb3aa[75]]){_0x89cdx1f[_0xb3aa[76]]= [{all:true}]};return db[_0xb3aa[50]][_0xb3aa[77]](_0x89cdx1f)})[_0xb3aa[40]](function(_0x89cdx32){_0x89cdx2e[_0xb3aa[74]]= _0x89cdx32;return _0x89cdx2e})[_0xb3aa[40]](respondWithFilteredResult(_0x89cdx1a,_0x89cdx1f))[_0xb3aa[73]](handleError(_0x89cdx1a,null))};exports[_0xb3aa[78]]= function(_0x89cdx2c,_0x89cdx1a){var _0x89cdx1f={raw:false,where:{id:_0x89cdx2c[_0xb3aa[80]][_0xb3aa[79]]}},_0x89cdx2d={};_0x89cdx2d[_0xb3aa[48]]= _[_0xb3aa[51]](db[_0xb3aa[50]][_0xb3aa[49]]);_0x89cdx2d[_0xb3aa[53]]= _[_0xb3aa[51]](_0x89cdx2c[_0xb3aa[53]]);_0x89cdx2d[_0xb3aa[55]]= _[_0xb3aa[56]](_0x89cdx2d[_0xb3aa[48]],_0x89cdx2d[_0xb3aa[53]]);_0x89cdx1f[_0xb3aa[57]]= _[_0xb3aa[56]](_0x89cdx2d[_0xb3aa[48]],qs[_0xb3aa[58]](_0x89cdx2c[_0xb3aa[53]][_0xb3aa[58]]));_0x89cdx1f[_0xb3aa[57]]= (_0x89cdx1f[_0xb3aa[57]][_0xb3aa[59]])?_0x89cdx1f[_0xb3aa[57]]:_0x89cdx2d[_0xb3aa[48]];if(_0x89cdx2c[_0xb3aa[53]][_0xb3aa[75]]){_0x89cdx1f[_0xb3aa[76]]= [{all:true}]};_0x89cdx1f= _[_0xb3aa[68]]({},_0x89cdx1f,_0x89cdx2c[_0xb3aa[72]]);return db[_0xb3aa[50]][_0xb3aa[81]](_0x89cdx1f)[_0xb3aa[40]](handleEntityNotFound(_0x89cdx1a,null))[_0xb3aa[40]](respondWithResult(_0x89cdx1a,null))[_0xb3aa[73]](handleError(_0x89cdx1a,null))};exports[_0xb3aa[82]]= function(_0x89cdx2c,_0x89cdx1a){return db[_0xb3aa[50]][_0xb3aa[82]](_0x89cdx2c[_0xb3aa[83]],{})[_0xb3aa[40]](respondWithResult(_0x89cdx1a,201))[_0xb3aa[73]](handleError(_0x89cdx1a,null))};exports[_0xb3aa[41]]= function(_0x89cdx2c,_0x89cdx1a){if(_0x89cdx2c[_0xb3aa[83]][_0xb3aa[79]]){delete _0x89cdx2c[_0xb3aa[83]][_0xb3aa[79]]};return db[_0xb3aa[50]][_0xb3aa[81]]({where:{id:_0x89cdx2c[_0xb3aa[80]][_0xb3aa[79]]}})[_0xb3aa[40]](handleEntityNotFound(_0x89cdx1a,null))[_0xb3aa[40]](saveUpdates(_0x89cdx2c[_0xb3aa[83]],null))[_0xb3aa[40]](respondWithResult(_0x89cdx1a,null))[_0xb3aa[73]](handleError(_0x89cdx1a,null))};exports[_0xb3aa[42]]= function(_0x89cdx2c,_0x89cdx1a){return db[_0xb3aa[50]][_0xb3aa[81]]({where:{id:_0x89cdx2c[_0xb3aa[80]][_0xb3aa[79]]}})[_0xb3aa[40]](handleEntityNotFound(_0x89cdx1a,null))[_0xb3aa[40]](removeEntity(_0x89cdx1a,null))[_0xb3aa[73]](handleError(_0x89cdx1a,null))};exports[_0xb3aa[84]]= function(_0x89cdx2c,_0x89cdx1a,_0x89cdx33){return db[_0xb3aa[87]][_0xb3aa[81]]({where:{id:_0x89cdx2c[_0xb3aa[80]][_0xb3aa[79]]}})[_0xb3aa[40]](handleEntityNotFound(_0x89cdx1a,null))[_0xb3aa[40]](function(_0x89cdx1c){if(_0x89cdx1c){return _0x89cdx1c[_0xb3aa[84]](_0x89cdx2c[_0xb3aa[83]][_0xb3aa[85]],_[_0xb3aa[86]](_0x89cdx2c[_0xb3aa[83]],[_0xb3aa[85],_0xb3aa[79]])|| {})}})[_0xb3aa[40]](respondWithResult(_0x89cdx1a,null))[_0xb3aa[73]](handleError(_0x89cdx1a,null))};exports[_0xb3aa[88]]= function(_0x89cdx2c,_0x89cdx1c,_0x89cdx33){var _0x89cdx1f={};var _0x89cdx2d={};var _0x89cdx34;var _0x89cdx20;return db[_0xb3aa[50]][_0xb3aa[89]]({where:{id:_0x89cdx2c[_0xb3aa[80]][_0xb3aa[79]]}})[_0xb3aa[40]](handleEntityNotFound(_0x89cdx1c,null))[_0xb3aa[40]](function(_0x89cdx1c){if(_0x89cdx1c){_0x89cdx34= _0x89cdx1c;_0x89cdx2d[_0xb3aa[48]]= _[_0xb3aa[51]](db[_0xb3aa[87]][_0xb3aa[49]]);_0x89cdx2d[_0xb3aa[53]]= _[_0xb3aa[51]](_0x89cdx2c[_0xb3aa[53]]);_0x89cdx2d[_0xb3aa[55]]= _[_0xb3aa[56]](_0x89cdx2d[_0xb3aa[48]],_0x89cdx2d[_0xb3aa[53]]);_0x89cdx1f[_0xb3aa[57]]= _[_0xb3aa[56]](_0x89cdx2d[_0xb3aa[48]],qs[_0xb3aa[58]](_0x89cdx2c[_0xb3aa[53]][_0xb3aa[58]]));_0x89cdx1f[_0xb3aa[57]]= (_0x89cdx1f[_0xb3aa[57]][_0xb3aa[59]])?_0x89cdx1f[_0xb3aa[57]]:_0x89cdx2d[_0xb3aa[48]];_0x89cdx1f[_0xb3aa[62]]= qs[_0xb3aa[63]](_0x89cdx2c[_0xb3aa[53]][_0xb3aa[63]]);_0x89cdx1f[_0xb3aa[64]]= qs[_0xb3aa[55]](_[_0xb3aa[65]](_0x89cdx2c[_0xb3aa[53]],_0x89cdx2d[_0xb3aa[55]]));if(_0x89cdx2c[_0xb3aa[53]][_0xb3aa[69]]){_0x89cdx1f[_0xb3aa[64]]= _[_0xb3aa[68]](_0x89cdx1f[_0xb3aa[64]],{$or:_[_0xb3aa[71]](_0x89cdx1f[_0xb3aa[57]],function(_0x89cdx30){var _0x89cdx2e={};_0x89cdx2e[_0x89cdx30]= {$like:_0xb3aa[70]+ _0x89cdx2c[_0xb3aa[53]][_0xb3aa[69]]+ _0xb3aa[70]};return _0x89cdx2e})})};_0x89cdx1f= _[_0xb3aa[68]]({},_0x89cdx1f,_0x89cdx2c[_0xb3aa[72]]);return _0x89cdx34[_0xb3aa[88]](_0x89cdx1f)}})[_0xb3aa[40]](function(_0x89cdx35){if(_0x89cdx35){_0x89cdx20= _0x89cdx35[_0xb3aa[59]];if(!_0x89cdx2c[_0xb3aa[53]][_0xb3aa[61]](_0xb3aa[60])){_0x89cdx1f[_0xb3aa[32]]= qs[_0xb3aa[32]](_0x89cdx2c[_0xb3aa[53]][_0xb3aa[32]]);_0x89cdx1f[_0xb3aa[31]]= qs[_0xb3aa[31]](_0x89cdx2c[_0xb3aa[53]][_0xb3aa[31]])};return _0x89cdx34[_0xb3aa[88]](_0x89cdx1f)}})[_0xb3aa[40]](function(_0x89cdx32){if(_0x89cdx32){return _0x89cdx32?{count:_0x89cdx20,rows:_0x89cdx32}:null}})[_0xb3aa[40]](respondWithResult(_0x89cdx1c,null))[_0xb3aa[73]](handleError(_0x89cdx1c,null))}
\ No newline at end of file
+var _0x62fa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x6D\x43\x6F\x6D\x70\x61\x6E\x79","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x61\x64\x64\x43\x6F\x6E\x74\x61\x63\x74\x73","\x69\x64\x73","\x6F\x6D\x69\x74","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x66\x69\x6E\x64\x4F\x6E\x65"];_0x62fa[0];var jsonpatch=require(_0x62fa[1]);var rp=require(_0x62fa[2]);var moment=require(_0x62fa[3]);var BPromise=require(_0x62fa[4]);var Mustache=require(_0x62fa[5]);var util=require(_0x62fa[6]);var path=require(_0x62fa[7]);var sox=require(_0x62fa[8]);var csv=require(_0x62fa[9]);var ejs=require(_0x62fa[10]);var fs=require(_0x62fa[11]);var _=require(_0x62fa[12]);var squel=require(_0x62fa[13]);var crypto=require(_0x62fa[14]);var jsforce=require(_0x62fa[15]);var deskjs=require(_0x62fa[16]);var toCsv=require(_0x62fa[9]);var querystring=require(_0x62fa[17]);var Papa=require(_0x62fa[18]);var qs=require(_0x62fa[19]);var logger=require(_0x62fa[21])(_0x62fa[20]);var utils=require(_0x62fa[22]);var config=require(_0x62fa[23]);var db=require(_0x62fa[25])[_0x62fa[24]];function respondWithStatusCode(_0xc2b5x1a,_0xc2b5x1b){_0xc2b5x1b= _0xc2b5x1b|| 204;return function(_0xc2b5x1c){if(_0xc2b5x1c){return _0xc2b5x1a[_0x62fa[26]](_0xc2b5x1b)};return _0xc2b5x1a[_0x62fa[28]](_0xc2b5x1b)[_0x62fa[27]]()}}function respondWithResult(_0xc2b5x1a,_0xc2b5x1b){_0xc2b5x1b= _0xc2b5x1b|| 200;return function(_0xc2b5x1c){if(_0xc2b5x1c){return _0xc2b5x1a[_0x62fa[28]](_0xc2b5x1b)[_0x62fa[29]](_0xc2b5x1c)}}}function respondWithFilteredResult(_0xc2b5x1a,_0xc2b5x1f){return function(_0xc2b5x1c){if(_0xc2b5x1c){var _0xc2b5x20=_0xc2b5x1c[_0x62fa[30]],_0xc2b5x21=_0xc2b5x1f[_0x62fa[31]],_0xc2b5x22=_0xc2b5x1f[_0x62fa[31]]+ _0xc2b5x1f[_0x62fa[32]],_0xc2b5x1b;if(_0xc2b5x22>= _0xc2b5x20){_0xc2b5x22= _0xc2b5x20;_0xc2b5x1b= 200}else {_0xc2b5x1b= 206};_0xc2b5x1a[_0x62fa[28]](_0xc2b5x1b);return _0xc2b5x1a[_0x62fa[36]](_0x62fa[33],_0xc2b5x21+ _0x62fa[34]+ _0xc2b5x22+ _0x62fa[35]+ _0xc2b5x20)[_0x62fa[29]](_0xc2b5x1c)};return null}}function patchUpdates(_0xc2b5x24){return function(_0xc2b5x1c){try{jsonpatch[_0x62fa[37]](_0xc2b5x1c,_0xc2b5x24,true)}catch(err){return BPromise[_0x62fa[38]](err)};return _0xc2b5x1c[_0x62fa[39]]()}}function saveUpdates(_0xc2b5x26,_0xc2b5x1b){return function(_0xc2b5x1c){if(_0xc2b5x1c){return _0xc2b5x1c[_0x62fa[41]](_0xc2b5x26)[_0x62fa[40]](function(_0xc2b5x27){return _0xc2b5x27})};return null}}function removeEntity(_0xc2b5x1a,_0xc2b5x1b){return function(_0xc2b5x1c){if(_0xc2b5x1c){return _0xc2b5x1c[_0x62fa[42]]()[_0x62fa[40]](function(){_0xc2b5x1a[_0x62fa[28]](204)[_0x62fa[27]]()})}}}function handleEntityNotFound(_0xc2b5x1a,_0xc2b5x1b){return function(_0xc2b5x1c){if(!_0xc2b5x1c){_0xc2b5x1a[_0x62fa[26]](404)};return _0xc2b5x1c}}function handleError(_0xc2b5x1a,_0xc2b5x1b){_0xc2b5x1b= _0xc2b5x1b|| 500;return function(_0xc2b5x2b){logger[_0x62fa[44]](_0xc2b5x2b[_0x62fa[43]]);if(_0xc2b5x2b[_0x62fa[45]]){delete _0xc2b5x2b[_0x62fa[45]]};_0xc2b5x1a[_0x62fa[28]](_0xc2b5x1b)[_0x62fa[46]](_0xc2b5x2b)}}exports[_0x62fa[47]]= function(_0xc2b5x2c,_0xc2b5x1a){var _0xc2b5x1f={},_0xc2b5x2d={},_0xc2b5x2e={count:0,rows:[]};_0xc2b5x2d[_0x62fa[48]]= _[_0x62fa[51]](db[_0x62fa[50]][_0x62fa[49]]);var _0xc2b5x2f={dateStart:_0xc2b5x2c[_0x62fa[53]][_0x62fa[52]],dateEnd:_0xc2b5x2c[_0x62fa[53]][_0x62fa[54]]};delete _0xc2b5x2c[_0x62fa[53]][_0x62fa[52]];delete _0xc2b5x2c[_0x62fa[53]][_0x62fa[54]];_0xc2b5x2d[_0x62fa[53]]= _[_0x62fa[51]](_0xc2b5x2c[_0x62fa[53]]);_0xc2b5x2d[_0x62fa[55]]= _[_0x62fa[56]](_0xc2b5x2d[_0x62fa[48]],_0xc2b5x2d[_0x62fa[53]]);_0xc2b5x1f[_0x62fa[57]]= _[_0x62fa[56]](_0xc2b5x2d[_0x62fa[48]],qs[_0x62fa[58]](_0xc2b5x2c[_0x62fa[53]][_0x62fa[58]]));_0xc2b5x1f[_0x62fa[57]]= (_0xc2b5x1f[_0x62fa[57]][_0x62fa[59]])?_0xc2b5x1f[_0x62fa[57]]:_0xc2b5x2d[_0x62fa[48]];if(!_0xc2b5x2c[_0x62fa[53]][_0x62fa[61]](_0x62fa[60])){_0xc2b5x1f[_0x62fa[32]]= qs[_0x62fa[32]](_0xc2b5x2c[_0x62fa[53]][_0x62fa[32]]);_0xc2b5x1f[_0x62fa[31]]= qs[_0x62fa[31]](_0xc2b5x2c[_0x62fa[53]][_0x62fa[31]])};_0xc2b5x1f[_0x62fa[62]]= qs[_0x62fa[63]](_0xc2b5x2c[_0x62fa[53]][_0x62fa[63]]);_0xc2b5x1f[_0x62fa[64]]= qs[_0x62fa[55]](_[_0x62fa[65]](_0xc2b5x2c[_0x62fa[53]],_0xc2b5x2d[_0x62fa[55]]));if(_0xc2b5x2f[_0x62fa[52]]){if(_0xc2b5x2f[_0x62fa[54]]){_0xc2b5x2f[_0x62fa[54]]= moment(_0xc2b5x2f[_0x62fa[54]])[_0x62fa[67]](1,_0x62fa[66])}else {_0xc2b5x2f[_0x62fa[54]]= moment(_0xc2b5x2f[_0x62fa[52]])[_0x62fa[67]](1,_0x62fa[66])};_[_0x62fa[68]](_0xc2b5x1f[_0x62fa[64]],{createdAt:{$gte:_0xc2b5x2f[_0x62fa[52]],$lte:_0xc2b5x2f[_0x62fa[54]]}})};if(_0xc2b5x2c[_0x62fa[53]][_0x62fa[69]]){_0xc2b5x1f[_0x62fa[64]]= _[_0x62fa[68]](_0xc2b5x1f[_0x62fa[64]],{$or:_[_0x62fa[71]](_0xc2b5x1f[_0x62fa[57]],function(_0xc2b5x30){var _0xc2b5x2e={};_0xc2b5x2e[_0xc2b5x30]= {$like:_0x62fa[70]+ _0xc2b5x2c[_0x62fa[53]][_0x62fa[69]]+ _0x62fa[70]};return _0xc2b5x2e})})};_0xc2b5x1f= _[_0x62fa[68]]({},_0xc2b5x1f,_0xc2b5x2c[_0x62fa[72]]);var _0xc2b5x31={where:_0xc2b5x1f[_0x62fa[64]]};return db[_0x62fa[50]][_0x62fa[30]](_0xc2b5x31)[_0x62fa[40]](function(_0xc2b5x20){_0xc2b5x2e[_0x62fa[30]]= _0xc2b5x20;if(_0xc2b5x2c[_0x62fa[53]][_0x62fa[75]]){_0xc2b5x1f[_0x62fa[76]]= [{all:true}]};return db[_0x62fa[50]][_0x62fa[77]](_0xc2b5x1f)})[_0x62fa[40]](function(_0xc2b5x32){_0xc2b5x2e[_0x62fa[74]]= _0xc2b5x32;return _0xc2b5x2e})[_0x62fa[40]](respondWithFilteredResult(_0xc2b5x1a,_0xc2b5x1f))[_0x62fa[73]](handleError(_0xc2b5x1a,null))};exports[_0x62fa[78]]= function(_0xc2b5x2c,_0xc2b5x1a){var _0xc2b5x1f={raw:false,where:{id:_0xc2b5x2c[_0x62fa[80]][_0x62fa[79]]}},_0xc2b5x2d={};_0xc2b5x2d[_0x62fa[48]]= _[_0x62fa[51]](db[_0x62fa[50]][_0x62fa[49]]);_0xc2b5x2d[_0x62fa[53]]= _[_0x62fa[51]](_0xc2b5x2c[_0x62fa[53]]);_0xc2b5x2d[_0x62fa[55]]= _[_0x62fa[56]](_0xc2b5x2d[_0x62fa[48]],_0xc2b5x2d[_0x62fa[53]]);_0xc2b5x1f[_0x62fa[57]]= _[_0x62fa[56]](_0xc2b5x2d[_0x62fa[48]],qs[_0x62fa[58]](_0xc2b5x2c[_0x62fa[53]][_0x62fa[58]]));_0xc2b5x1f[_0x62fa[57]]= (_0xc2b5x1f[_0x62fa[57]][_0x62fa[59]])?_0xc2b5x1f[_0x62fa[57]]:_0xc2b5x2d[_0x62fa[48]];if(_0xc2b5x2c[_0x62fa[53]][_0x62fa[75]]){_0xc2b5x1f[_0x62fa[76]]= [{all:true}]};_0xc2b5x1f= _[_0x62fa[68]]({},_0xc2b5x1f,_0xc2b5x2c[_0x62fa[72]]);return db[_0x62fa[50]][_0x62fa[81]](_0xc2b5x1f)[_0x62fa[40]](handleEntityNotFound(_0xc2b5x1a,null))[_0x62fa[40]](respondWithResult(_0xc2b5x1a,null))[_0x62fa[73]](handleError(_0xc2b5x1a,null))};exports[_0x62fa[82]]= function(_0xc2b5x2c,_0xc2b5x1a){return db[_0x62fa[50]][_0x62fa[82]](_0xc2b5x2c[_0x62fa[83]],{})[_0x62fa[40]](respondWithResult(_0xc2b5x1a,201))[_0x62fa[73]](handleError(_0xc2b5x1a,null))};exports[_0x62fa[41]]= function(_0xc2b5x2c,_0xc2b5x1a){if(_0xc2b5x2c[_0x62fa[83]][_0x62fa[79]]){delete _0xc2b5x2c[_0x62fa[83]][_0x62fa[79]]};return db[_0x62fa[50]][_0x62fa[81]]({where:{id:_0xc2b5x2c[_0x62fa[80]][_0x62fa[79]]}})[_0x62fa[40]](handleEntityNotFound(_0xc2b5x1a,null))[_0x62fa[40]](saveUpdates(_0xc2b5x2c[_0x62fa[83]],null))[_0x62fa[40]](respondWithResult(_0xc2b5x1a,null))[_0x62fa[73]](handleError(_0xc2b5x1a,null))};exports[_0x62fa[42]]= function(_0xc2b5x2c,_0xc2b5x1a){return db[_0x62fa[50]][_0x62fa[81]]({where:{id:_0xc2b5x2c[_0x62fa[80]][_0x62fa[79]]}})[_0x62fa[40]](handleEntityNotFound(_0xc2b5x1a,null))[_0x62fa[40]](removeEntity(_0xc2b5x1a,null))[_0x62fa[73]](handleError(_0xc2b5x1a,null))};exports[_0x62fa[84]]= function(_0xc2b5x2c,_0xc2b5x1a,_0xc2b5x33){return db[_0x62fa[87]][_0x62fa[81]]({where:{id:_0xc2b5x2c[_0x62fa[80]][_0x62fa[79]]}})[_0x62fa[40]](handleEntityNotFound(_0xc2b5x1a,null))[_0x62fa[40]](function(_0xc2b5x1c){if(_0xc2b5x1c){return _0xc2b5x1c[_0x62fa[84]](_0xc2b5x2c[_0x62fa[83]][_0x62fa[85]],_[_0x62fa[86]](_0xc2b5x2c[_0x62fa[83]],[_0x62fa[85],_0x62fa[79]])|| {})}})[_0x62fa[40]](respondWithResult(_0xc2b5x1a,null))[_0x62fa[73]](handleError(_0xc2b5x1a,null))};exports[_0x62fa[88]]= function(_0xc2b5x2c,_0xc2b5x1c,_0xc2b5x33){var _0xc2b5x1f={};var _0xc2b5x2d={};var _0xc2b5x34;var _0xc2b5x20;return db[_0x62fa[50]][_0x62fa[89]]({where:{id:_0xc2b5x2c[_0x62fa[80]][_0x62fa[79]]}})[_0x62fa[40]](handleEntityNotFound(_0xc2b5x1c,null))[_0x62fa[40]](function(_0xc2b5x1c){if(_0xc2b5x1c){_0xc2b5x34= _0xc2b5x1c;_0xc2b5x2d[_0x62fa[48]]= _[_0x62fa[51]](db[_0x62fa[87]][_0x62fa[49]]);_0xc2b5x2d[_0x62fa[53]]= _[_0x62fa[51]](_0xc2b5x2c[_0x62fa[53]]);_0xc2b5x2d[_0x62fa[55]]= _[_0x62fa[56]](_0xc2b5x2d[_0x62fa[48]],_0xc2b5x2d[_0x62fa[53]]);_0xc2b5x1f[_0x62fa[57]]= _[_0x62fa[56]](_0xc2b5x2d[_0x62fa[48]],qs[_0x62fa[58]](_0xc2b5x2c[_0x62fa[53]][_0x62fa[58]]));_0xc2b5x1f[_0x62fa[57]]= (_0xc2b5x1f[_0x62fa[57]][_0x62fa[59]])?_0xc2b5x1f[_0x62fa[57]]:_0xc2b5x2d[_0x62fa[48]];_0xc2b5x1f[_0x62fa[62]]= qs[_0x62fa[63]](_0xc2b5x2c[_0x62fa[53]][_0x62fa[63]]);_0xc2b5x1f[_0x62fa[64]]= qs[_0x62fa[55]](_[_0x62fa[65]](_0xc2b5x2c[_0x62fa[53]],_0xc2b5x2d[_0x62fa[55]]));if(_0xc2b5x2c[_0x62fa[53]][_0x62fa[69]]){_0xc2b5x1f[_0x62fa[64]]= _[_0x62fa[68]](_0xc2b5x1f[_0x62fa[64]],{$or:_[_0x62fa[71]](_0xc2b5x1f[_0x62fa[57]],function(_0xc2b5x30){var _0xc2b5x2e={};_0xc2b5x2e[_0xc2b5x30]= {$like:_0x62fa[70]+ _0xc2b5x2c[_0x62fa[53]][_0x62fa[69]]+ _0x62fa[70]};return _0xc2b5x2e})})};_0xc2b5x1f= _[_0x62fa[68]]({},_0xc2b5x1f,_0xc2b5x2c[_0x62fa[72]]);return _0xc2b5x34[_0x62fa[88]](_0xc2b5x1f)}})[_0x62fa[40]](function(_0xc2b5x35){if(_0xc2b5x35){_0xc2b5x20= _0xc2b5x35[_0x62fa[59]];if(!_0xc2b5x2c[_0x62fa[53]][_0x62fa[61]](_0x62fa[60])){_0xc2b5x1f[_0x62fa[32]]= qs[_0x62fa[32]](_0xc2b5x2c[_0x62fa[53]][_0x62fa[32]]);_0xc2b5x1f[_0x62fa[31]]= qs[_0x62fa[31]](_0xc2b5x2c[_0x62fa[53]][_0x62fa[31]])};return _0xc2b5x34[_0x62fa[88]](_0xc2b5x1f)}})[_0x62fa[40]](function(_0xc2b5x32){if(_0xc2b5x32){return _0xc2b5x32?{count:_0xc2b5x20,rows:_0xc2b5x32}:null}})[_0x62fa[40]](respondWithResult(_0xc2b5x1c,null))[_0x62fa[73]](handleError(_0xc2b5x1c,null))}
\ No newline at end of file
index 662ad3c..52bf8e3 100644 (file)
@@ -1 +1 @@
-var _0xffa8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x6D\x43\x6F\x6D\x70\x61\x6E\x79\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x6D\x43\x6F\x6D\x70\x61\x6E\x79","\x63\x6D\x5F\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0xffa8[0];var _=require(_0xffa8[1]);var util=require(_0xffa8[2]);var logger=require(_0xffa8[4])(_0xffa8[3]);var moment=require(_0xffa8[5]);var BPromise=require(_0xffa8[6]);var rp=require(_0xffa8[7]);var attributes=require(_0xffa8[8]);module[_0xffa8[9]]= function(_0x5913x8,_0x5913x9){return _0x5913x8[_0xffa8[12]](_0xffa8[10],attributes,{tableName:_0xffa8[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x823e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x6D\x43\x6F\x6D\x70\x61\x6E\x79\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x6D\x43\x6F\x6D\x70\x61\x6E\x79","\x63\x6D\x5F\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x823e[0];var _=require(_0x823e[1]);var util=require(_0x823e[2]);var logger=require(_0x823e[4])(_0x823e[3]);var moment=require(_0x823e[5]);var BPromise=require(_0x823e[6]);var rp=require(_0x823e[7]);var attributes=require(_0x823e[8]);module[_0x823e[9]]= function(_0x95b4x8,_0x95b4x9){return _0x95b4x8[_0x823e[12]](_0x823e[10],attributes,{tableName:_0x823e[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index a534d51..f0772be 100644 (file)
@@ -1 +1 @@
-var _0xe011=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x6D\x43\x6F\x6D\x70\x61\x6E\x79\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x6D\x43\x6F\x6D\x70\x61\x6E\x79\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xe011[0];var _=require(_0xe011[1]);var util=require(_0xe011[2]);var moment=require(_0xe011[3]);var BPromise=require(_0xe011[4]);var rs=require(_0xe011[5]);var fs=require(_0xe011[6]);var db=require(_0xe011[8])[_0xe011[7]];var utils=require(_0xe011[9]);var logger=require(_0xe011[11])(_0xe011[10]);var config=require(_0xe011[12]);var jayson=require(_0xe011[13]);var client=jayson[_0xe011[15]][_0xe011[14]]({port:9002});function respondWithRpcPromise(_0x219fxe,_0x219fxf,_0x219fx10){return  new BPromise(function(_0x219fx11,_0x219fx12){return client[_0xe011[28]](_0x219fxe,_0x219fx10)[_0xe011[27]](function(_0x219fx14){logger[_0xe011[20]](_0xe011[16],_0x219fxf,_0xe011[19]);logger[_0xe011[23]](_0xe011[21],_0x219fxf,_0xe011[19],JSON[_0xe011[22]](_0x219fx14));if(_0x219fx14[_0xe011[17]]){if(_0x219fx14[_0xe011[17]][_0xe011[24]]=== 500){logger[_0xe011[17]](_0xe011[16],_0x219fxf,_0x219fx14[_0xe011[17]][_0xe011[25]]);return _0x219fx12(_0x219fx14[_0xe011[17]][_0xe011[25]])};logger[_0xe011[17]](_0xe011[16],_0x219fxf,_0x219fx14[_0xe011[17]][_0xe011[25]]);return _0x219fx11(_0x219fx14[_0xe011[17]][_0xe011[25]])}else {logger[_0xe011[20]](_0xe011[16],_0x219fxf,_0xe011[19]);_0x219fx11(_0x219fx14[_0xe011[26]][_0xe011[25]])}})[_0xe011[18]](function(_0x219fx13){logger[_0xe011[17]](_0xe011[16],_0x219fxf,_0x219fx13);_0x219fx12(_0x219fx13)})})}
\ No newline at end of file
+var _0x3860=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x6D\x43\x6F\x6D\x70\x61\x6E\x79\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x6D\x43\x6F\x6D\x70\x61\x6E\x79\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x3860[0];var _=require(_0x3860[1]);var util=require(_0x3860[2]);var moment=require(_0x3860[3]);var BPromise=require(_0x3860[4]);var rs=require(_0x3860[5]);var fs=require(_0x3860[6]);var db=require(_0x3860[8])[_0x3860[7]];var utils=require(_0x3860[9]);var logger=require(_0x3860[11])(_0x3860[10]);var config=require(_0x3860[12]);var jayson=require(_0x3860[13]);var client=jayson[_0x3860[15]][_0x3860[14]]({port:9002});function respondWithRpcPromise(_0xe6c6xe,_0xe6c6xf,_0xe6c6x10){return  new BPromise(function(_0xe6c6x11,_0xe6c6x12){return client[_0x3860[28]](_0xe6c6xe,_0xe6c6x10)[_0x3860[27]](function(_0xe6c6x14){logger[_0x3860[20]](_0x3860[16],_0xe6c6xf,_0x3860[19]);logger[_0x3860[23]](_0x3860[21],_0xe6c6xf,_0x3860[19],JSON[_0x3860[22]](_0xe6c6x14));if(_0xe6c6x14[_0x3860[17]]){if(_0xe6c6x14[_0x3860[17]][_0x3860[24]]=== 500){logger[_0x3860[17]](_0x3860[16],_0xe6c6xf,_0xe6c6x14[_0x3860[17]][_0x3860[25]]);return _0xe6c6x12(_0xe6c6x14[_0x3860[17]][_0x3860[25]])};logger[_0x3860[17]](_0x3860[16],_0xe6c6xf,_0xe6c6x14[_0x3860[17]][_0x3860[25]]);return _0xe6c6x11(_0xe6c6x14[_0x3860[17]][_0x3860[25]])}else {logger[_0x3860[20]](_0x3860[16],_0xe6c6xf,_0x3860[19]);_0xe6c6x11(_0xe6c6x14[_0x3860[26]][_0x3860[25]])}})[_0x3860[18]](function(_0xe6c6x13){logger[_0x3860[17]](_0x3860[16],_0xe6c6xf,_0xe6c6x13);_0xe6c6x12(_0xe6c6x13)})})}
\ No newline at end of file
index df6bb06..5b6020f 100644 (file)
@@ -1 +1 @@
-var _0x6ea8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6D\x43\x6F\x6D\x70\x61\x6E\x79\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x43\x6F\x6E\x74\x61\x63\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6ea8[0];var multer=require(_0x6ea8[1]);var util=require(_0x6ea8[2]);var path=require(_0x6ea8[3]);var express=require(_0x6ea8[4]);var router=express.Router();var auth=require(_0x6ea8[5]);var interaction=require(_0x6ea8[6]);var config=require(_0x6ea8[7]);var controller=require(_0x6ea8[8]);router[_0x6ea8[12]](_0x6ea8[9],auth[_0x6ea8[10]](),controller[_0x6ea8[11]]);router[_0x6ea8[12]](_0x6ea8[13],auth[_0x6ea8[10]](),controller[_0x6ea8[14]]);router[_0x6ea8[12]](_0x6ea8[15],auth[_0x6ea8[10]](),controller[_0x6ea8[16]]);router[_0x6ea8[18]](_0x6ea8[9],auth[_0x6ea8[10]](),controller[_0x6ea8[17]]);router[_0x6ea8[18]](_0x6ea8[15],auth[_0x6ea8[10]](),controller[_0x6ea8[19]]);router[_0x6ea8[21]](_0x6ea8[13],auth[_0x6ea8[10]](),controller[_0x6ea8[20]]);router[_0x6ea8[23]](_0x6ea8[13],auth[_0x6ea8[10]](),controller[_0x6ea8[22]]);module[_0x6ea8[24]]= router
\ No newline at end of file
+var _0xf655=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6D\x43\x6F\x6D\x70\x61\x6E\x79\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x43\x6F\x6E\x74\x61\x63\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf655[0];var multer=require(_0xf655[1]);var util=require(_0xf655[2]);var path=require(_0xf655[3]);var express=require(_0xf655[4]);var router=express.Router();var auth=require(_0xf655[5]);var interaction=require(_0xf655[6]);var config=require(_0xf655[7]);var controller=require(_0xf655[8]);router[_0xf655[12]](_0xf655[9],auth[_0xf655[10]](),controller[_0xf655[11]]);router[_0xf655[12]](_0xf655[13],auth[_0xf655[10]](),controller[_0xf655[14]]);router[_0xf655[12]](_0xf655[15],auth[_0xf655[10]](),controller[_0xf655[16]]);router[_0xf655[18]](_0xf655[9],auth[_0xf655[10]](),controller[_0xf655[17]]);router[_0xf655[18]](_0xf655[15],auth[_0xf655[10]](),controller[_0xf655[19]]);router[_0xf655[21]](_0xf655[13],auth[_0xf655[10]](),controller[_0xf655[20]]);router[_0xf655[23]](_0xf655[13],auth[_0xf655[10]](),controller[_0xf655[22]]);module[_0xf655[24]]= router
\ No newline at end of file
index 321a05c..70cbaa2 100644 (file)
@@ -1 +1 @@
-var _0xe625=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x74\x61\x67\x73","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x3B","\x73\x70\x6C\x69\x74","\x65\x6E\x64\x73\x57\x69\x74\x68","\x70\x6F\x70","\x54\x45\x58\x54","\x49\x4E\x54\x45\x47\x45\x52","\x55\x4E\x53\x49\x47\x4E\x45\x44","\x44\x41\x54\x45","\x4E\x4F\x57"];_0xe625[0];var _=require(_0xe625[1]);var Sequelize=require(_0xe625[2]);module[_0xe625[3]]= {firstName:{type:Sequelize[_0xe625[4]],allowNull:false},lastName:{type:Sequelize[_0xe625[4]]},tags:{type:Sequelize[_0xe625[4]],get:function(){var _0x140ax3=this[_0xe625[6]](_0xe625[5])?this[_0xe625[6]](_0xe625[5])[_0xe625[8]](_0xe625[7]):[];if(_[_0xe625[9]](this[_0xe625[6]](_0xe625[5]),_0xe625[7])){_0x140ax3[_0xe625[10]]()};return _0x140ax3}},street:{type:Sequelize[_0xe625[4]]},postalCode:{type:Sequelize[_0xe625[4]]},city:{type:Sequelize[_0xe625[4]]},country:{type:Sequelize[_0xe625[4]]},dateOfBirth:{type:Sequelize[_0xe625[4]]},description:{type:Sequelize[_0xe625[11]]},phone:{type:Sequelize[_0xe625[4]],allowNull:false},mobile:{type:Sequelize[_0xe625[4]]},fax:{type:Sequelize[_0xe625[4]]},email:{type:Sequelize[_0xe625[4]]},url:{type:Sequelize[_0xe625[4]]},facebook:{type:Sequelize[_0xe625[4]]},twitter:{type:Sequelize[_0xe625[4]]},skype:{type:Sequelize[_0xe625[4]]},UserId:{type:Sequelize[_0xe625[12]]},priority:{type:Sequelize.INTEGER(2)[_0xe625[13]],defaultValue:2,validate:{min:0,max:4}},scheduledat:{type:Sequelize[_0xe625[14]],defaultValue:Sequelize[_0xe625[15]]}}
\ No newline at end of file
+var _0x2a8c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x74\x61\x67\x73","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x3B","\x73\x70\x6C\x69\x74","\x65\x6E\x64\x73\x57\x69\x74\x68","\x70\x6F\x70","\x54\x45\x58\x54","\x49\x4E\x54\x45\x47\x45\x52","\x55\x4E\x53\x49\x47\x4E\x45\x44","\x44\x41\x54\x45","\x4E\x4F\x57"];_0x2a8c[0];var _=require(_0x2a8c[1]);var Sequelize=require(_0x2a8c[2]);module[_0x2a8c[3]]= {firstName:{type:Sequelize[_0x2a8c[4]],allowNull:false},lastName:{type:Sequelize[_0x2a8c[4]]},tags:{type:Sequelize[_0x2a8c[4]],get:function(){var _0xb431x3=this[_0x2a8c[6]](_0x2a8c[5])?this[_0x2a8c[6]](_0x2a8c[5])[_0x2a8c[8]](_0x2a8c[7]):[];if(_[_0x2a8c[9]](this[_0x2a8c[6]](_0x2a8c[5]),_0x2a8c[7])){_0xb431x3[_0x2a8c[10]]()};return _0xb431x3}},street:{type:Sequelize[_0x2a8c[4]]},postalCode:{type:Sequelize[_0x2a8c[4]]},city:{type:Sequelize[_0x2a8c[4]]},country:{type:Sequelize[_0x2a8c[4]]},dateOfBirth:{type:Sequelize[_0x2a8c[4]]},description:{type:Sequelize[_0x2a8c[11]]},phone:{type:Sequelize[_0x2a8c[4]],allowNull:false},mobile:{type:Sequelize[_0x2a8c[4]]},fax:{type:Sequelize[_0x2a8c[4]]},email:{type:Sequelize[_0x2a8c[4]]},url:{type:Sequelize[_0x2a8c[4]]},facebook:{type:Sequelize[_0x2a8c[4]]},twitter:{type:Sequelize[_0x2a8c[4]]},skype:{type:Sequelize[_0x2a8c[4]]},UserId:{type:Sequelize[_0x2a8c[12]]},priority:{type:Sequelize.INTEGER(2)[_0x2a8c[13]],defaultValue:2,validate:{min:0,max:4}},scheduledat:{type:Sequelize[_0x2a8c[14]],defaultValue:Sequelize[_0x2a8c[15]]}}
\ No newline at end of file
index f9bc2b0..8f9a98e 100644 (file)
@@ -1 +1 @@
-var _0x2fd3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x63\x61\x74\x63\x68","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x64\x65\x73\x63\x72\x69\x62\x65","\x6D\x65\x72\x67\x65","\x62\x6F\x64\x79","\x74\x6F","\x66\x72\x6F\x6D","\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77","\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x74\x61\x67\x73","\x69\x73\x41\x72\x72\x61\x79","\x6A\x6F\x69\x6E","\x5B\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x6D\x65\x72\x67\x65\x5D\x20\x74\x6F\x20\x25\x73\x20\x66\x72\x6F\x6D\x20\x25\x73","\x69\x6E\x66\x6F","\x5B\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x6D\x65\x72\x67\x65\x5D\x5B\x64\x65\x73\x74\x72\x6F\x79\x5D\x5B\x43\x6D\x48\x6F\x70\x70\x65\x72\x5D\x2C\x20\x25\x73","\x5B\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x6D\x65\x72\x67\x65\x5D\x5B\x64\x65\x73\x74\x72\x6F\x79\x5D\x5B\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x5D\x2C\x20\x25\x73","\x63\x72\x65\x61\x74\x65","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x43\x6D\x48\x6F\x70\x70\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74","\x6D\x65\x72\x67\x65\x57\x69\x74\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x3B","\x6B\x65\x79\x73","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65\x73","\x70\x75\x73\x68","\x24\x6F\x72","\x77\x68\x65\x72\x65","\x4C\x69\x73\x74\x49\x64","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x65\x61\x63\x68","\x73\x68\x6F\x77","\x63\x66\x5F\x25\x64","\x66\x6F\x72\x6D\x61\x74","\x6D\x61\x70","\x6F\x6D\x69\x74","\x24\x61\x6E\x64","\x43\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x70\x69\x63\x6B","\x66\x69\x6C\x74\x65\x72","\x25","\x6F\x70\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x70\x68\x6F\x6E\x65","\x69\x73\x45\x6D\x70\x74\x79","\x74\x6F\x50\x61\x72\x61\x6D","\x69\x64\x20\x3D\x20\x3F","\x73\x65\x74\x46\x69\x65\x6C\x64\x73","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x74\x61\x62\x6C\x65","\x74\x65\x78\x74","\x76\x61\x6C\x75\x65\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x63\x66\x5F","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x70\x69\x63\x6B\x42\x79","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x73","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x69\x65\x73","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x73","\x67\x65\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x73","\x75\x70\x6C\x6F\x61\x64\x43\x73\x76","\x4E\x6F\x20\x4C\x69\x73\x74\x49\x64\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64","\x62\x69\x6E\x64\x69\x6E\x67\x5F\x6B\x65\x79\x73","\x4E\x6F\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x20\x6B\x65\x79\x73\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x21","\x62\x69\x6E\x64\x69\x6E\x67\x5F\x76\x61\x6C\x75\x65\x73","\x4E\x6F\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x73\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x21","\x73\x6F\x63\x6B\x65\x74\x5F\x74\x69\x6D\x65\x73\x74\x61\x6D\x70","\x55\x6E\x61\x62\x6C\x65\x20\x74\x6F\x20\x73\x79\x6E\x63\x68\x72\x6F\x6E\x69\x7A\x65\x20\x73\x6F\x63\x6B\x65\x74\x2C\x20\x6E\x6F\x20\x74\x69\x6D\x65\x73\x74\x61\x6D\x70\x20\x70\x61\x73\x73\x65\x64","\x2C","\x73\x70\x6C\x69\x74","\x49\x6E\x63\x6F\x72\x72\x65\x63\x74\x20\x62\x69\x6E\x64\x69\x6E\x67\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x20\x70\x61\x73\x73\x65\x64\x21","\x7A\x69\x70\x4F\x62\x6A\x65\x63\x74","\x4E\x6F\x20\x70\x68\x6F\x6E\x65\x20\x63\x6F\x6C\x75\x6D\x6E\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","\x4E\x6F\x20\x66\x69\x72\x73\x74\x4E\x61\x6D\x65\x20\x63\x6F\x6C\x75\x6D\x6E\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x74\x6D\x70","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65","\x30\x37\x37\x37","\x63\x68\x6D\x6F\x64\x53\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6D\x70\x6F\x72\x74\x2F\x63\x6D\x2F\x63\x73\x76","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x66\x6F\x72\x6B","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x46\x69\x6C\x65\x20\x75\x70\x6C\x6F\x61\x64\x65\x64\x20\x63\x6F\x72\x72\x65\x63\x74\x6C\x79\x21","\x70\x69\x64","\x75\x70\x6C\x6F\x61\x64","\x63\x72\x65\x61\x74\x65\x52\x65\x61\x64\x53\x74\x72\x65\x61\x6D","\x6D\x65\x74\x61","\x70\x61\x72\x73\x65","\x69\x6D\x70\x6F\x72\x74","\x62\x69\x6E\x64\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6D\x70\x6F\x72\x74\x2F\x63\x6D\x2F\x63\x73\x76\x32","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6D\x65\x73\x73\x61\x67\x65","\x73\x74\x61\x72\x74\x20\x63\x68\x69\x6C\x64\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x63\x6F\x72\x72\x65\x63\x74\x6C\x79\x21","\x6F\x6E","\x65\x78\x69\x74","\x65\x72\x72\x6F\x72\x20\x63\x68\x69\x6C\x64\x20\x70\x72\x6F\x63\x65\x73\x73","\x61\x67\x65\x6E\x74","\x55\x73\x65\x72"];_0x2fd3[0];var jsonpatch=require(_0x2fd3[1]);var rp=require(_0x2fd3[2]);var moment=require(_0x2fd3[3]);var BPromise=require(_0x2fd3[4]);var Mustache=require(_0x2fd3[5]);var util=require(_0x2fd3[6]);var path=require(_0x2fd3[7]);var sox=require(_0x2fd3[8]);var csv=require(_0x2fd3[9]);var ejs=require(_0x2fd3[10]);var fs=require(_0x2fd3[11]);var _=require(_0x2fd3[12]);var squel=require(_0x2fd3[13]);var crypto=require(_0x2fd3[14]);var jsforce=require(_0x2fd3[15]);var deskjs=require(_0x2fd3[16]);var toCsv=require(_0x2fd3[9]);var querystring=require(_0x2fd3[17]);var Papa=require(_0x2fd3[18]);var qs=require(_0x2fd3[19]);var logger=require(_0x2fd3[21])(_0x2fd3[20]);var utils=require(_0x2fd3[22]);var config=require(_0x2fd3[23]);var db=require(_0x2fd3[25])[_0x2fd3[24]];var socket=require(_0x2fd3[27])({host:_0x2fd3[26],port:6379});require(_0x2fd3[29])[_0x2fd3[28]](socket);function respondWithStatusCode(_0x69afx1b,_0x69afx1c){_0x69afx1c= _0x69afx1c|| 204;return function(_0x69afx1d){if(_0x69afx1d){return _0x69afx1b[_0x2fd3[30]](_0x69afx1c)};return _0x69afx1b[_0x2fd3[32]](_0x69afx1c)[_0x2fd3[31]]()}}function respondWithResult(_0x69afx1b,_0x69afx1c){_0x69afx1c= _0x69afx1c|| 200;return function(_0x69afx1d){if(_0x69afx1d){return _0x69afx1b[_0x2fd3[32]](_0x69afx1c)[_0x2fd3[33]](_0x69afx1d)}}}function respondWithFilteredResult(_0x69afx1b,_0x69afx20){return function(_0x69afx1d){if(_0x69afx1d){var _0x69afx21=_0x69afx1d[_0x2fd3[34]],_0x69afx22=_0x69afx20[_0x2fd3[35]],_0x69afx23=_0x69afx20[_0x2fd3[35]]+ _0x69afx20[_0x2fd3[36]],_0x69afx1c;if(_0x69afx23>= _0x69afx21){_0x69afx23= _0x69afx21;_0x69afx1c= 200}else {_0x69afx1c= 206};_0x69afx1b[_0x2fd3[32]](_0x69afx1c);return _0x69afx1b[_0x2fd3[40]](_0x2fd3[37],_0x69afx22+ _0x2fd3[38]+ _0x69afx23+ _0x2fd3[39]+ _0x69afx21)[_0x2fd3[33]](_0x69afx1d)};return null}}function patchUpdates(_0x69afx25){return function(_0x69afx1d){try{jsonpatch[_0x2fd3[41]](_0x69afx1d,_0x69afx25,true)}catch(err){return BPromise[_0x2fd3[42]](err)};return _0x69afx1d[_0x2fd3[43]]()}}function saveUpdates(_0x69afx27,_0x69afx1c){return function(_0x69afx1d){if(_0x69afx1d){return _0x69afx1d[_0x2fd3[45]](_0x69afx27)[_0x2fd3[44]](function(_0x69afx28){return _0x69afx28})};return null}}function removeEntity(_0x69afx1b,_0x69afx1c){return function(_0x69afx1d){if(_0x69afx1d){return _0x69afx1d[_0x2fd3[46]]()[_0x2fd3[44]](function(){_0x69afx1b[_0x2fd3[32]](204)[_0x2fd3[31]]()})}}}function handleEntityNotFound(_0x69afx1b,_0x69afx1c){return function(_0x69afx1d){if(!_0x69afx1d){_0x69afx1b[_0x2fd3[30]](404)};return _0x69afx1d}}function handleError(_0x69afx1b,_0x69afx1c){_0x69afx1c= _0x69afx1c|| 500;return function(_0x69afx2c){logger[_0x2fd3[48]](_0x69afx2c[_0x2fd3[47]]);if(_0x69afx2c[_0x2fd3[49]]){delete _0x69afx2c[_0x2fd3[49]]};_0x69afx1b[_0x2fd3[32]](_0x69afx1c)[_0x2fd3[50]](_0x69afx2c)}}exports[_0x2fd3[46]]= function(_0x69afx2d,_0x69afx1b){return db[_0x2fd3[55]][_0x2fd3[54]]({where:{id:_0x69afx2d[_0x2fd3[53]][_0x2fd3[52]]}})[_0x2fd3[44]](handleEntityNotFound(_0x69afx1b,null))[_0x2fd3[44]](removeEntity(_0x69afx1b,null))[_0x2fd3[51]](handleError(_0x69afx1b,null))};exports[_0x2fd3[56]]= function(_0x69afx2d,_0x69afx1b){return db[_0x2fd3[55]][_0x2fd3[56]]()[_0x2fd3[44]](respondWithResult(_0x69afx1b,null))[_0x2fd3[51]](handleError(_0x69afx1b,null))};exports[_0x2fd3[57]]= function(_0x69afx2d,_0x69afx1b){var _0x69afx2e;var _0x69afx2f;var _0x69afx30;if(_0x69afx2d[_0x2fd3[58]][_0x2fd3[52]]){delete _0x69afx2d[_0x2fd3[58]][_0x2fd3[52]]};return db[_0x2fd3[55]][_0x2fd3[95]]({where:{id:[_0x69afx2d[_0x2fd3[58]][_0x2fd3[59]],_0x69afx2d[_0x2fd3[58]][_0x2fd3[60]]]}})[_0x2fd3[44]](function(_0x69afx31){if(_0x69afx31){if(_0x69afx31[_0x2fd3[92]]!== 2){return null};_0x69afx31[0]= _0x69afx31[0][_0x2fd3[93]]({plain:true});_0x69afx31[1]= _0x69afx31[1][_0x2fd3[93]]({plain:true});delete _0x69afx31[0][_0x2fd3[52]];delete _0x69afx31[1][_0x2fd3[52]];return _[_0x2fd3[94]](_0x69afx31[0],_0x69afx31[1],function(_0x69afx32,_0x69afx33){if(Array[_0x2fd3[83]](_0x69afx33)&&  !_0x69afx33[_0x2fd3[92]]){return _0x69afx32}else {if(!_0x69afx33){return _0x69afx32}}})}})[_0x2fd3[44]](handleEntityNotFound(_0x69afx1b,null))[_0x2fd3[44]](function(_0x69afx1d){if(_0x69afx1d){if(_0x69afx1d[_0x2fd3[82]]&& _[_0x2fd3[83]](_0x69afx1d[_0x2fd3[82]])){_0x69afx1d[_0x2fd3[82]]= _0x69afx1d[_0x2fd3[82]][_0x2fd3[84]]()};logger[_0x2fd3[86]](_0x2fd3[85],_0x69afx2d[_0x2fd3[58]][_0x2fd3[59]],_0x69afx2d[_0x2fd3[58]][_0x2fd3[60]]);return db[_0x2fd3[91]][_0x2fd3[46]]({where:{ContactId:[_0x69afx2d[_0x2fd3[58]][_0x2fd3[59]],_0x69afx2d[_0x2fd3[58]][_0x2fd3[60]]]}})[_0x2fd3[44]](function(_0x69afx1b){logger[_0x2fd3[86]](_0x2fd3[87],_0x69afx1b);return db[_0x2fd3[90]][_0x2fd3[46]]({where:{ContactId:[_0x69afx2d[_0x2fd3[58]][_0x2fd3[59]],_0x69afx2d[_0x2fd3[58]][_0x2fd3[60]]]}})[_0x2fd3[44]](function(_0x69afx1b){logger[_0x2fd3[86]](_0x2fd3[88],_0x69afx1b);return db[_0x2fd3[55]][_0x2fd3[89]](_0x69afx1d)})})}})[_0x2fd3[44]](function(_0x69afx1d){if(_0x69afx1d){_0x69afx2e= _0x69afx1d;_0x69afx2f= {ContactId:_0x69afx2e[_0x2fd3[52]]};_0x69afx30= {where:{ContactId:[_0x69afx2d[_0x2fd3[58]][_0x2fd3[59]],_0x69afx2d[_0x2fd3[58]][_0x2fd3[60]]]}};return db[_0x2fd3[81]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[80]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[79]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[78]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[77]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[78]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[77]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[76]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[75]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[74]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[73]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[72]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[71]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[70]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[69]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[68]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[67]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[66]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[65]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[64]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[63]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[62]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[61]][_0x2fd3[45]](_0x69afx2f,_0x69afx30)}})[_0x2fd3[44]](function(){if(_0x69afx2e){return db[_0x2fd3[55]][_0x2fd3[46]]({where:{id:[_0x69afx2d[_0x2fd3[58]][_0x2fd3[59]],_0x69afx2d[_0x2fd3[58]][_0x2fd3[60]]]}})}})[_0x2fd3[44]](function(){if(_0x69afx2e){return _0x69afx2e}})[_0x2fd3[44]](respondWithResult(_0x69afx1b,null))[_0x2fd3[51]](handleError(_0x69afx1b,null))};exports[_0x2fd3[89]]= function(_0x69afx2d,_0x69afx1b){return db[_0x2fd3[55]][_0x2fd3[56]]()[_0x2fd3[44]](function(_0x69afx34){if(_0x69afx2d[_0x2fd3[58]][_0x2fd3[82]]&& _[_0x2fd3[83]](_0x69afx2d[_0x2fd3[58]][_0x2fd3[82]])){if(_0x69afx2d[_0x2fd3[58]][_0x2fd3[82]][_0x2fd3[92]]){_0x69afx2d[_0x2fd3[58]][_0x2fd3[82]]= _0x69afx2d[_0x2fd3[58]][_0x2fd3[82]][_0x2fd3[84]](_0x2fd3[96])+ _0x2fd3[96]}else {_0x69afx2d[_0x2fd3[58]][_0x2fd3[82]]= null}}else {_0x69afx2d[_0x2fd3[58]][_0x2fd3[82]]= null};return db[_0x2fd3[55]][_0x2fd3[89]](_0x69afx2d[_0x2fd3[58]],{fields:_[_0x2fd3[97]](_0x69afx34),raw:true})})[_0x2fd3[44]](respondWithResult(_0x69afx1b,201))[_0x2fd3[51]](handleError(_0x69afx1b,null))};exports[_0x2fd3[98]]= function(_0x69afx2d,_0x69afx1b){var _0x69afx35=[];var _0x69afx36=0;var _0x69afx37=0;var _0x69afx38=0;return db[_0x2fd3[55]][_0x2fd3[56]]()[_0x2fd3[44]](function(_0x69afx34){return BPromise[_0x2fd3[106]](_0x69afx2d[_0x2fd3[58]],function(_0x69afx39){var _0x69afx20={where:{$or:[]},defaults:_0x69afx39,fields:_[_0x2fd3[97]](_0x69afx34),raw:true};if(_0x69afx39[_0x2fd3[99]]){for(var _0x69afx3a=0;_0x69afx3a< _0x69afx39[_0x2fd3[99]][_0x2fd3[92]];_0x69afx3a++){var _0x69afx3b={};_0x69afx3b[_0x69afx39[_0x2fd3[99]][_0x69afx3a]]= _0x69afx39[_0x69afx39[_0x2fd3[99]][_0x69afx3a]];_0x69afx20[_0x2fd3[102]][_0x2fd3[101]][_0x2fd3[100]](_0x69afx3b)};_0x69afx20[_0x2fd3[102]][_0x2fd3[103]]= _0x69afx39[_0x2fd3[103]]};return db[_0x2fd3[55]][_0x2fd3[105]](_0x69afx20)[_0x2fd3[104]](function(_0x69afx3c,_0x69afx3d){if(_0x69afx3d){_0x69afx36++}else {_0x69afx38++}})[_0x2fd3[51]](function(_0x69afx2c){console[_0x2fd3[48]](_0x69afx2c);_0x69afx37++})})})[_0x2fd3[44]](function(_0x69afx31){if(_0x69afx31){return {success:_0x69afx36,failure:_0x69afx37,duplicates:_0x69afx38}}})[_0x2fd3[44]](respondWithResult(_0x69afx1b,201))[_0x2fd3[51]](handleError(_0x69afx1b,null))};exports[_0x2fd3[107]]= function(_0x69afx2d,_0x69afx1b,_0x69afx3e){var _0x69afx2e;return db[_0x2fd3[55]][_0x2fd3[56]]()[_0x2fd3[44]](function(_0x69afx34){return db[_0x2fd3[55]][_0x2fd3[54]]({where:{id:_0x69afx2d[_0x2fd3[53]][_0x2fd3[52]]},attributes:_[_0x2fd3[97]](_0x69afx34)})})[_0x2fd3[44]](function(_0x69afx1d){_0x69afx2e= _0x69afx1d[_0x2fd3[93]]({plain:true});var _0x69afx41={where:{$and:[{ListId:{$ne:null}}]}};if(_0x69afx1d&& _0x69afx1d[_0x2fd3[103]]){if(_0x69afx1d[_0x2fd3[103]]){_0x69afx41[_0x2fd3[102]][_0x2fd3[112]][_0x2fd3[100]]({ListId:{$ne:_0x69afx1d[_0x2fd3[103]]}})}};return db[_0x2fd3[113]][_0x2fd3[95]](_0x69afx41)})[_0x2fd3[44]](function(_0x69afx3f){return _[_0x2fd3[111]](_0x69afx2e,_[_0x2fd3[110]](_0x69afx3f,function(_0x69afx40){return util[_0x2fd3[109]](_0x2fd3[108],_0x69afx40[_0x2fd3[52]])}))})[_0x2fd3[44]](handleEntityNotFound(_0x69afx1b,null))[_0x2fd3[44]](respondWithResult(_0x69afx1b,null))[_0x2fd3[51]](handleError(_0x69afx1b,null))};exports[_0x2fd3[114]]= function(_0x69afx2d,_0x69afx1b){var _0x69afx20={},_0x69afx42={};return db[_0x2fd3[55]][_0x2fd3[56]]()[_0x2fd3[44]](function(_0x69afx34){_0x69afx42[_0x2fd3[115]]= _[_0x2fd3[97]](_0x69afx34);_0x69afx42[_0x2fd3[116]]= _[_0x2fd3[97]](_0x69afx2d[_0x2fd3[116]]);_0x69afx42[_0x2fd3[117]]= _[_0x2fd3[118]](_0x69afx42[_0x2fd3[115]],_0x69afx42[_0x2fd3[116]]);_0x69afx20[_0x2fd3[119]]= _[_0x2fd3[118]](_0x69afx42[_0x2fd3[115]],qs[_0x2fd3[120]](_0x69afx2d[_0x2fd3[116]][_0x2fd3[120]]));_0x69afx20[_0x2fd3[119]]= (_0x69afx20[_0x2fd3[119]][_0x2fd3[92]])?_0x69afx20[_0x2fd3[119]]:_0x69afx42[_0x2fd3[115]];if(!_0x69afx2d[_0x2fd3[116]][_0x2fd3[122]](_0x2fd3[121])){_0x69afx20[_0x2fd3[36]]= qs[_0x2fd3[36]](_0x69afx2d[_0x2fd3[116]][_0x2fd3[36]]);_0x69afx20[_0x2fd3[35]]= qs[_0x2fd3[35]](_0x69afx2d[_0x2fd3[116]][_0x2fd3[35]])};_0x69afx20[_0x2fd3[123]]= qs[_0x2fd3[124]](_0x69afx2d[_0x2fd3[116]][_0x2fd3[124]]);_0x69afx20[_0x2fd3[102]]= qs[_0x2fd3[117]](_[_0x2fd3[125]](_0x69afx2d[_0x2fd3[116]],_0x69afx42[_0x2fd3[117]]));if(_0x69afx2d[_0x2fd3[116]][_0x2fd3[126]]){_0x69afx20[_0x2fd3[102]]= _[_0x2fd3[57]](_0x69afx20[_0x2fd3[102]],{$or:_[_0x2fd3[110]](_0x69afx20[_0x2fd3[119]],function(_0x69afx43){var _0x69afx44={};_0x69afx44[_0x69afx43]= {$like:_0x2fd3[127]+ _0x69afx2d[_0x2fd3[116]][_0x2fd3[126]]+ _0x2fd3[127]};return _0x69afx44})})};_0x69afx20= _[_0x2fd3[57]]({},_0x69afx20,_0x69afx2d[_0x2fd3[128]]);return db[_0x2fd3[55]][_0x2fd3[129]](_0x69afx20)})[_0x2fd3[44]](respondWithFilteredResult(_0x69afx1b,_0x69afx20))[_0x2fd3[51]](handleError(_0x69afx1b,null))};exports[_0x2fd3[45]]= function(_0x69afx2d,_0x69afx1b){var _0x69afx2e;if(_0x69afx2d[_0x2fd3[58]][_0x2fd3[52]]){delete _0x69afx2d[_0x2fd3[58]][_0x2fd3[52]]};if(_0x69afx2d[_0x2fd3[58]][_0x2fd3[82]]&& _[_0x2fd3[83]](_0x69afx2d[_0x2fd3[58]][_0x2fd3[82]])){if(_0x69afx2d[_0x2fd3[58]][_0x2fd3[82]][_0x2fd3[92]]){_0x69afx2d[_0x2fd3[58]][_0x2fd3[82]]= _0x69afx2d[_0x2fd3[58]][_0x2fd3[82]][_0x2fd3[84]](_0x2fd3[96])+ _0x2fd3[96]}else {_0x69afx2d[_0x2fd3[58]][_0x2fd3[82]]= null}}else {_0x69afx2d[_0x2fd3[58]][_0x2fd3[82]]= null};return db[_0x2fd3[55]][_0x2fd3[54]]({where:{id:_0x69afx2d[_0x2fd3[53]][_0x2fd3[52]]}})[_0x2fd3[44]](handleEntityNotFound(_0x69afx1b,null))[_0x2fd3[44]](saveUpdates(_0x69afx2d[_0x2fd3[58]],null))[_0x2fd3[44]](function(_0x69afx1d){_0x69afx2e= _0x69afx1d;var _0x69afx41={where:{$and:[{ListId:{$ne:null}}]}};if(_0x69afx1d&& _0x69afx1d[_0x2fd3[103]]){if(_0x69afx1d[_0x2fd3[103]]){_0x69afx41[_0x2fd3[102]][_0x2fd3[112]][_0x2fd3[100]]({ListId:{$ne:_0x69afx1d[_0x2fd3[103]]}})}};return db[_0x2fd3[113]][_0x2fd3[95]](_0x69afx41)})[_0x2fd3[44]](function(_0x69afx3f){if(_0x69afx3f){return _[_0x2fd3[111]](_[_0x2fd3[142]](_0x69afx2d[_0x2fd3[58]],function(_0x69afx43,_0x69afx46){return _[_0x2fd3[141]](_0x69afx46,_0x2fd3[140])}),_[_0x2fd3[110]](_0x69afx3f,function(_0x69afx40){return util[_0x2fd3[109]](_0x2fd3[108],_0x69afx40[_0x2fd3[52]])}))}})[_0x2fd3[44]](function(_0x69afx45){if(_0x69afx45&&  !_[_0x2fd3[131]](_0x69afx45)){var _0x69afx41=squel[_0x2fd3[45]]()[_0x2fd3[136]](_0x2fd3[135])[_0x2fd3[134]](_0x69afx45)[_0x2fd3[102]](_0x2fd3[133],_0x69afx2d[_0x2fd3[53]][_0x2fd3[52]])[_0x2fd3[132]]();return db[_0x2fd3[139]][_0x2fd3[116]](_0x69afx41[_0x2fd3[137]],{replacements:_0x69afx41[_0x2fd3[138]]})}})[_0x2fd3[44]](function(){if(_0x69afx2d[_0x2fd3[58]][_0x2fd3[130]]&& _0x69afx2e){return db[_0x2fd3[91]][_0x2fd3[45]]({phone:_0x69afx2d[_0x2fd3[58]][_0x2fd3[130]]},{where:{ContactId:_0x69afx2e[_0x2fd3[52]]}})}})[_0x2fd3[44]](function(){return _0x69afx2e})[_0x2fd3[44]](respondWithResult(_0x69afx1b,null))[_0x2fd3[51]](handleError(_0x69afx1b,null))};exports[_0x2fd3[143]]= function(_0x69afx2d,_0x69afx1b,_0x69afx3e){var _0x69afx20={raw:false,where:{}};var _0x69afx42={};var _0x69afx47={count:0,rows:[]};return db[_0x2fd3[55]][_0x2fd3[149]]({where:{id:_0x69afx2d[_0x2fd3[53]][_0x2fd3[52]]}})[_0x2fd3[44]](handleEntityNotFound(_0x69afx1b,null))[_0x2fd3[44]](function(_0x69afx1d){if(_0x69afx1d){_0x69afx42[_0x2fd3[115]]= _[_0x2fd3[97]](db[_0x2fd3[91]][_0x2fd3[144]]);_0x69afx42[_0x2fd3[116]]= _[_0x2fd3[97]](_0x69afx2d[_0x2fd3[116]]);_0x69afx42[_0x2fd3[117]]= _[_0x2fd3[118]](_0x69afx42[_0x2fd3[115]],_0x69afx42[_0x2fd3[116]]);_0x69afx20[_0x2fd3[119]]= _[_0x2fd3[118]](_0x69afx42[_0x2fd3[115]],qs[_0x2fd3[120]](_0x69afx2d[_0x2fd3[116]][_0x2fd3[120]]));_0x69afx20[_0x2fd3[119]]= (_0x69afx20[_0x2fd3[119]][_0x2fd3[92]])?_0x69afx20[_0x2fd3[119]]:_0x69afx42[_0x2fd3[115]];if(!_0x69afx2d[_0x2fd3[116]][_0x2fd3[122]](_0x2fd3[121])){_0x69afx20[_0x2fd3[36]]= qs[_0x2fd3[36]](_0x69afx2d[_0x2fd3[116]][_0x2fd3[36]]);_0x69afx20[_0x2fd3[35]]= qs[_0x2fd3[35]](_0x69afx2d[_0x2fd3[116]][_0x2fd3[35]])};_0x69afx20[_0x2fd3[123]]= qs[_0x2fd3[124]](_0x69afx2d[_0x2fd3[116]][_0x2fd3[124]]);_0x69afx20[_0x2fd3[102]]= qs[_0x2fd3[117]](_[_0x2fd3[125]](_0x69afx2d[_0x2fd3[116]],_0x69afx42[_0x2fd3[117]]));_0x69afx20[_0x2fd3[102]][_0x2fd3[145]]= _0x69afx1d[_0x2fd3[52]];if(_0x69afx2d[_0x2fd3[116]][_0x2fd3[126]]){_0x69afx20[_0x2fd3[102]]= _[_0x2fd3[57]](_0x69afx20[_0x2fd3[102]],{$or:_[_0x2fd3[110]](_0x69afx20[_0x2fd3[119]],function(_0x69afx43){var _0x69afx44={};_0x69afx44[_0x69afx43]= {$like:_0x2fd3[127]+ _0x69afx2d[_0x2fd3[116]][_0x2fd3[126]]+ _0x2fd3[127]};return _0x69afx44})})};_0x69afx20= _[_0x2fd3[57]]({},_0x69afx20,_0x69afx2d[_0x2fd3[128]]);return db[_0x2fd3[91]][_0x2fd3[34]]({where:_0x69afx20[_0x2fd3[102]]})[_0x2fd3[44]](function(_0x69afx21){_0x69afx47[_0x2fd3[34]]= _0x69afx21;if(_0x69afx2d[_0x2fd3[116]][_0x2fd3[147]]){_0x69afx20[_0x2fd3[148]]= [{all:true}]};return db[_0x2fd3[91]][_0x2fd3[95]](_0x69afx20)})[_0x2fd3[44]](function(_0x69afx48){_0x69afx47[_0x2fd3[146]]= _0x69afx48;return _0x69afx47})}})[_0x2fd3[44]](respondWithFilteredResult(_0x69afx1b,_0x69afx20))[_0x2fd3[51]](handleError(_0x69afx1b,null))};exports[_0x2fd3[150]]= function(_0x69afx2d,_0x69afx1b,_0x69afx3e){var _0x69afx20={raw:true,where:{}};var _0x69afx42={};var _0x69afx47={count:0,rows:[]};return db[_0x2fd3[55]][_0x2fd3[149]]({where:{id:_0x69afx2d[_0x2fd3[53]][_0x2fd3[52]]}})[_0x2fd3[44]](handleEntityNotFound(_0x69afx1b,null))[_0x2fd3[44]](function(_0x69afx1d){if(_0x69afx1d){_0x69afx42[_0x2fd3[115]]= _[_0x2fd3[97]](db[_0x2fd3[69]][_0x2fd3[144]]);_0x69afx42[_0x2fd3[116]]= _[_0x2fd3[97]](_0x69afx2d[_0x2fd3[116]]);_0x69afx42[_0x2fd3[117]]= _[_0x2fd3[118]](_0x69afx42[_0x2fd3[115]],_0x69afx42[_0x2fd3[116]]);_0x69afx20[_0x2fd3[119]]= _[_0x2fd3[118]](_0x69afx42[_0x2fd3[115]],qs[_0x2fd3[120]](_0x69afx2d[_0x2fd3[116]][_0x2fd3[120]]));_0x69afx20[_0x2fd3[119]]= (_0x69afx20[_0x2fd3[119]][_0x2fd3[92]])?_0x69afx20[_0x2fd3[119]]:_0x69afx42[_0x2fd3[115]];if(!_0x69afx2d[_0x2fd3[116]][_0x2fd3[122]](_0x2fd3[121])){_0x69afx20[_0x2fd3[36]]= qs[_0x2fd3[36]](_0x69afx2d[_0x2fd3[116]][_0x2fd3[36]]);_0x69afx20[_0x2fd3[35]]= qs[_0x2fd3[35]](_0x69afx2d[_0x2fd3[116]][_0x2fd3[35]])};_0x69afx20[_0x2fd3[123]]= qs[_0x2fd3[124]](_0x69afx2d[_0x2fd3[116]][_0x2fd3[124]]);_0x69afx20[_0x2fd3[102]]= qs[_0x2fd3[117]](_[_0x2fd3[125]](_0x69afx2d[_0x2fd3[116]],_0x69afx42[_0x2fd3[117]]));_0x69afx20[_0x2fd3[102]][_0x2fd3[145]]= _0x69afx1d[_0x2fd3[52]];if(_0x69afx2d[_0x2fd3[116]][_0x2fd3[126]]){_0x69afx20[_0x2fd3[102]]= _[_0x2fd3[57]](_0x69afx20[_0x2fd3[102]],{$or:_[_0x2fd3[110]](_0x69afx20[_0x2fd3[119]],function(_0x69afx43){var _0x69afx44={};_0x69afx44[_0x69afx43]= {$like:_0x2fd3[127]+ _0x69afx2d[_0x2fd3[116]][_0x2fd3[126]]+ _0x2fd3[127]};return _0x69afx44})})};_0x69afx20= _[_0x2fd3[57]]({},_0x69afx20,_0x69afx2d[_0x2fd3[128]]);return db[_0x2fd3[69]][_0x2fd3[34]]({where:_0x69afx20[_0x2fd3[102]]})[_0x2fd3[44]](function(_0x69afx21){_0x69afx47[_0x2fd3[34]]= _0x69afx21;if(_0x69afx2d[_0x2fd3[116]][_0x2fd3[147]]){_0x69afx20[_0x2fd3[148]]= [{all:true}]};return db[_0x2fd3[69]][_0x2fd3[95]](_0x69afx20)})[_0x2fd3[44]](function(_0x69afx48){_0x69afx47[_0x2fd3[146]]= _0x69afx48;return _0x69afx47})}})[_0x2fd3[44]](respondWithFilteredResult(_0x69afx1b,_0x69afx20))[_0x2fd3[51]](handleError(_0x69afx1b,null))};exports[_0x2fd3[151]]= function(_0x69afx2d,_0x69afx1b,_0x69afx3e){var _0x69afx20={raw:true,where:{}};var _0x69afx42={};var _0x69afx47={count:0,rows:[]};return db[_0x2fd3[55]][_0x2fd3[149]]({where:{id:_0x69afx2d[_0x2fd3[53]][_0x2fd3[52]]}})[_0x2fd3[44]](handleEntityNotFound(_0x69afx1b,null))[_0x2fd3[44]](function(_0x69afx1d){if(_0x69afx1d){_0x69afx42[_0x2fd3[115]]= _[_0x2fd3[97]](db[_0x2fd3[70]][_0x2fd3[144]]);_0x69afx42[_0x2fd3[116]]= _[_0x2fd3[97]](_0x69afx2d[_0x2fd3[116]]);_0x69afx42[_0x2fd3[117]]= _[_0x2fd3[118]](_0x69afx42[_0x2fd3[115]],_0x69afx42[_0x2fd3[116]]);_0x69afx20[_0x2fd3[119]]= _[_0x2fd3[118]](_0x69afx42[_0x2fd3[115]],qs[_0x2fd3[120]](_0x69afx2d[_0x2fd3[116]][_0x2fd3[120]]));_0x69afx20[_0x2fd3[119]]= (_0x69afx20[_0x2fd3[119]][_0x2fd3[92]])?_0x69afx20[_0x2fd3[119]]:_0x69afx42[_0x2fd3[115]];if(!_0x69afx2d[_0x2fd3[116]][_0x2fd3[122]](_0x2fd3[121])){_0x69afx20[_0x2fd3[36]]= qs[_0x2fd3[36]](_0x69afx2d[_0x2fd3[116]][_0x2fd3[36]]);_0x69afx20[_0x2fd3[35]]= qs[_0x2fd3[35]](_0x69afx2d[_0x2fd3[116]][_0x2fd3[35]])};_0x69afx20[_0x2fd3[123]]= qs[_0x2fd3[124]](_0x69afx2d[_0x2fd3[116]][_0x2fd3[124]]);_0x69afx20[_0x2fd3[102]]= qs[_0x2fd3[117]](_[_0x2fd3[125]](_0x69afx2d[_0x2fd3[116]],_0x69afx42[_0x2fd3[117]]));_0x69afx20[_0x2fd3[102]][_0x2fd3[145]]= _0x69afx1d[_0x2fd3[52]];if(_0x69afx2d[_0x2fd3[116]][_0x2fd3[126]]){_0x69afx20[_0x2fd3[102]]= _[_0x2fd3[57]](_0x69afx20[_0x2fd3[102]],{$or:_[_0x2fd3[110]](_0x69afx20[_0x2fd3[119]],function(_0x69afx43){var _0x69afx44={};_0x69afx44[_0x69afx43]= {$like:_0x2fd3[127]+ _0x69afx2d[_0x2fd3[116]][_0x2fd3[126]]+ _0x2fd3[127]};return _0x69afx44})})};_0x69afx20= _[_0x2fd3[57]]({},_0x69afx20,_0x69afx2d[_0x2fd3[128]]);return db[_0x2fd3[70]][_0x2fd3[34]]({where:_0x69afx20[_0x2fd3[102]]})[_0x2fd3[44]](function(_0x69afx21){_0x69afx47[_0x2fd3[34]]= _0x69afx21;if(_0x69afx2d[_0x2fd3[116]][_0x2fd3[147]]){_0x69afx20[_0x2fd3[148]]= [{all:true}]};return db[_0x2fd3[70]][_0x2fd3[95]](_0x69afx20)})[_0x2fd3[44]](function(_0x69afx48){_0x69afx47[_0x2fd3[146]]= _0x69afx48;return _0x69afx47})}})[_0x2fd3[44]](respondWithFilteredResult(_0x69afx1b,_0x69afx20))[_0x2fd3[51]](handleError(_0x69afx1b,null))};exports[_0x2fd3[152]]= function(_0x69afx2d,_0x69afx1b,_0x69afx3e){var _0x69afx20={raw:true,where:{}};var _0x69afx42={};var _0x69afx47={count:0,rows:[]};return db[_0x2fd3[55]][_0x2fd3[149]]({where:{id:_0x69afx2d[_0x2fd3[53]][_0x2fd3[52]]}})[_0x2fd3[44]](handleEntityNotFound(_0x69afx1b,null))[_0x2fd3[44]](function(_0x69afx1d){if(_0x69afx1d){_0x69afx42[_0x2fd3[115]]= _[_0x2fd3[97]](db[_0x2fd3[61]][_0x2fd3[144]]);_0x69afx42[_0x2fd3[116]]= _[_0x2fd3[97]](_0x69afx2d[_0x2fd3[116]]);_0x69afx42[_0x2fd3[117]]= _[_0x2fd3[118]](_0x69afx42[_0x2fd3[115]],_0x69afx42[_0x2fd3[116]]);_0x69afx20[_0x2fd3[119]]= _[_0x2fd3[118]](_0x69afx42[_0x2fd3[115]],qs[_0x2fd3[120]](_0x69afx2d[_0x2fd3[116]][_0x2fd3[120]]));_0x69afx20[_0x2fd3[119]]= (_0x69afx20[_0x2fd3[119]][_0x2fd3[92]])?_0x69afx20[_0x2fd3[119]]:_0x69afx42[_0x2fd3[115]];if(!_0x69afx2d[_0x2fd3[116]][_0x2fd3[122]](_0x2fd3[121])){_0x69afx20[_0x2fd3[36]]= qs[_0x2fd3[36]](_0x69afx2d[_0x2fd3[116]][_0x2fd3[36]]);_0x69afx20[_0x2fd3[35]]= qs[_0x2fd3[35]](_0x69afx2d[_0x2fd3[116]][_0x2fd3[35]])};_0x69afx20[_0x2fd3[123]]= qs[_0x2fd3[124]](_0x69afx2d[_0x2fd3[116]][_0x2fd3[124]]);_0x69afx20[_0x2fd3[102]]= qs[_0x2fd3[117]](_[_0x2fd3[125]](_0x69afx2d[_0x2fd3[116]],_0x69afx42[_0x2fd3[117]]));_0x69afx20[_0x2fd3[102]][_0x2fd3[145]]= _0x69afx1d[_0x2fd3[52]];if(_0x69afx2d[_0x2fd3[116]][_0x2fd3[126]]){_0x69afx20[_0x2fd3[102]]= _[_0x2fd3[57]](_0x69afx20[_0x2fd3[102]],{$or:_[_0x2fd3[110]](_0x69afx20[_0x2fd3[119]],function(_0x69afx43){var _0x69afx44={};_0x69afx44[_0x69afx43]= {$like:_0x2fd3[127]+ _0x69afx2d[_0x2fd3[116]][_0x2fd3[126]]+ _0x2fd3[127]};return _0x69afx44})})};_0x69afx20= _[_0x2fd3[57]]({},_0x69afx20,_0x69afx2d[_0x2fd3[128]]);return db[_0x2fd3[61]][_0x2fd3[34]]({where:_0x69afx20[_0x2fd3[102]]})[_0x2fd3[44]](function(_0x69afx21){_0x69afx47[_0x2fd3[34]]= _0x69afx21;if(_0x69afx2d[_0x2fd3[116]][_0x2fd3[147]]){_0x69afx20[_0x2fd3[148]]= [{all:true}]};return db[_0x2fd3[61]][_0x2fd3[95]](_0x69afx20)})[_0x2fd3[44]](function(_0x69afx48){_0x69afx47[_0x2fd3[146]]= _0x69afx48;return _0x69afx47})}})[_0x2fd3[44]](respondWithFilteredResult(_0x69afx1b,_0x69afx20))[_0x2fd3[51]](handleError(_0x69afx1b,null))};exports[_0x2fd3[153]]= function(_0x69afx2d,_0x69afx1b,_0x69afx3e){try{if(!_0x69afx2d[_0x2fd3[58]][_0x2fd3[103]]){throw  new Error(_0x2fd3[154])};if(!_0x69afx2d[_0x2fd3[58]][_0x2fd3[155]]){throw  new Error(_0x2fd3[156])};if(!_0x69afx2d[_0x2fd3[58]][_0x2fd3[157]]){throw  new Error(_0x2fd3[158])};if(!_0x69afx2d[_0x2fd3[58]][_0x2fd3[159]]){throw  new Error(_0x2fd3[160])};var _0x69afx42=_0x69afx2d[_0x2fd3[58]][_0x2fd3[155]][_0x2fd3[162]](_0x2fd3[161]);var _0x69afx49=_0x69afx2d[_0x2fd3[58]][_0x2fd3[157]][_0x2fd3[162]](_0x2fd3[161]);if(!_0x69afx42[_0x2fd3[92]]||  !_0x69afx49[_0x2fd3[92]] || _0x69afx42[_0x2fd3[92]]!== _0x69afx49[_0x2fd3[92]]){throw  new Error(_0x2fd3[163])};_0x69afx2d[_0x2fd3[58]][_0x2fd3[120]]= _[_0x2fd3[164]](_0x69afx42,_0x69afx49);if(!_0x69afx2d[_0x2fd3[58]][_0x2fd3[120]][_0x2fd3[130]]){throw  new Error(_0x2fd3[165])};if(!_0x69afx2d[_0x2fd3[58]][_0x2fd3[120]][_0x2fd3[166]]){throw  new Error(_0x2fd3[167])};var _0x69afx4a=path[_0x2fd3[84]](config[_0x2fd3[168]],_0x2fd3[169],_0x69afx2d[_0x2fd3[171]][_0x2fd3[170]]);fs[_0x2fd3[173]](_0x69afx4a,parseInt(_0x2fd3[172],8));var _0x69afx4b=require(_0x2fd3[177])[_0x2fd3[176]](path[_0x2fd3[84]](__dirname,_0x2fd3[174]),[_0x69afx4a,_0x69afx2d[_0x2fd3[58]][_0x2fd3[155]],_0x69afx2d[_0x2fd3[58]][_0x2fd3[157]],_0x69afx2d[_0x2fd3[58]][_0x2fd3[103]],_0x69afx2d[_0x2fd3[58]][_0x2fd3[175]],_0x69afx2d[_0x2fd3[58]][_0x2fd3[99]],_0x69afx2d[_0x2fd3[58]][_0x2fd3[159]]]);return _0x69afx1b[_0x2fd3[32]](200)[_0x2fd3[33]]({message:_0x2fd3[178],pid:_0x69afx4b[_0x2fd3[179]]})}catch(err){return _0x69afx1b[_0x2fd3[32]](500)[_0x2fd3[50]](err)}};exports[_0x2fd3[180]]= function(_0x69afx2d,_0x69afx1b,_0x69afx3e){var _0x69afx4c=fs[_0x2fd3[181]](_0x69afx2d[_0x2fd3[171]][_0x2fd3[7]]);Papa[_0x2fd3[183]](_0x69afx4c,{header:true,skipEmptyLines:true,preview:1,complete:function(_0x69afx4d){return _0x69afx1b[_0x2fd3[32]](200)[_0x2fd3[33]]({file:_0x69afx2d[_0x2fd3[171]],fields:_0x69afx4d[_0x2fd3[182]][_0x2fd3[120]]})}})};exports[_0x2fd3[184]]= function(_0x69afx2d,_0x69afx1b,_0x69afx3e){return db[_0x2fd3[194]][_0x2fd3[95]]({raw:true,attributes:[_0x2fd3[52]],where:{role:_0x2fd3[193]}})[_0x2fd3[44]](function(_0x69afx31){var _0x69afx4e=false;if(!_0x69afx2d[_0x2fd3[58]][_0x2fd3[103]]){throw  new Error(_0x2fd3[154])};if(!_0x69afx2d[_0x2fd3[58]][_0x2fd3[185]][_0x2fd3[130]]){throw  new Error(_0x2fd3[165])};if(!_0x69afx2d[_0x2fd3[58]][_0x2fd3[185]][_0x2fd3[166]]){throw  new Error(_0x2fd3[167])};if(!_0x69afx2d[_0x2fd3[58]][_0x2fd3[159]]){throw  new Error(_0x2fd3[160])};var _0x69afx4f=require(_0x2fd3[177])[_0x2fd3[176]](path[_0x2fd3[84]](__dirname,_0x2fd3[186]),[_0x69afx2d[_0x2fd3[53]][_0x2fd3[52]],JSON[_0x2fd3[187]](_0x69afx2d[_0x2fd3[58]]),JSON[_0x2fd3[187]](_0x69afx31)]);_0x69afx4f[_0x2fd3[190]](_0x2fd3[188],function(_0x69afx50){_0x69afx4e= true;return _0x69afx1b[_0x2fd3[32]](200)[_0x2fd3[33]]({message:_0x2fd3[189],pid:_0x69afx4f[_0x2fd3[179]]})});_0x69afx4f[_0x2fd3[190]](_0x2fd3[191],function(_0x69afx51){if(_0x69afx51&&  !_0x69afx4e){return _0x69afx1b[_0x2fd3[32]](500)[_0x2fd3[33]]({message:_0x2fd3[192],pid:_0x69afx4f[_0x2fd3[179]]})}})})[_0x2fd3[51]](handleError(_0x69afx1b,null))}
\ No newline at end of file
+var _0x5abc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x63\x61\x74\x63\x68","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x64\x65\x73\x63\x72\x69\x62\x65","\x6D\x65\x72\x67\x65","\x62\x6F\x64\x79","\x74\x6F","\x66\x72\x6F\x6D","\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77","\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x74\x61\x67\x73","\x69\x73\x41\x72\x72\x61\x79","\x6A\x6F\x69\x6E","\x5B\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x6D\x65\x72\x67\x65\x5D\x20\x74\x6F\x20\x25\x73\x20\x66\x72\x6F\x6D\x20\x25\x73","\x69\x6E\x66\x6F","\x5B\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x6D\x65\x72\x67\x65\x5D\x5B\x64\x65\x73\x74\x72\x6F\x79\x5D\x5B\x43\x6D\x48\x6F\x70\x70\x65\x72\x5D\x2C\x20\x25\x73","\x5B\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x6D\x65\x72\x67\x65\x5D\x5B\x64\x65\x73\x74\x72\x6F\x79\x5D\x5B\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x5D\x2C\x20\x25\x73","\x63\x72\x65\x61\x74\x65","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x43\x6D\x48\x6F\x70\x70\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74","\x6D\x65\x72\x67\x65\x57\x69\x74\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x3B","\x6B\x65\x79\x73","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65\x73","\x70\x75\x73\x68","\x24\x6F\x72","\x77\x68\x65\x72\x65","\x4C\x69\x73\x74\x49\x64","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x65\x61\x63\x68","\x73\x68\x6F\x77","\x63\x66\x5F\x25\x64","\x66\x6F\x72\x6D\x61\x74","\x6D\x61\x70","\x6F\x6D\x69\x74","\x24\x61\x6E\x64","\x43\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x70\x69\x63\x6B","\x66\x69\x6C\x74\x65\x72","\x25","\x6F\x70\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x69\x73\x4E\x75\x6C\x6C","\x70\x68\x6F\x6E\x65","\x69\x73\x45\x6D\x70\x74\x79","\x74\x6F\x50\x61\x72\x61\x6D","\x69\x64\x20\x3D\x20\x3F","\x73\x65\x74\x46\x69\x65\x6C\x64\x73","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x74\x61\x62\x6C\x65","\x74\x65\x78\x74","\x76\x61\x6C\x75\x65\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x63\x66\x5F","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x70\x69\x63\x6B\x42\x79","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x73","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x69\x65\x73","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x73","\x67\x65\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x73","\x75\x70\x6C\x6F\x61\x64\x43\x73\x76","\x4E\x6F\x20\x4C\x69\x73\x74\x49\x64\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64","\x62\x69\x6E\x64\x69\x6E\x67\x5F\x6B\x65\x79\x73","\x4E\x6F\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x20\x6B\x65\x79\x73\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x21","\x62\x69\x6E\x64\x69\x6E\x67\x5F\x76\x61\x6C\x75\x65\x73","\x4E\x6F\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x73\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x21","\x73\x6F\x63\x6B\x65\x74\x5F\x74\x69\x6D\x65\x73\x74\x61\x6D\x70","\x55\x6E\x61\x62\x6C\x65\x20\x74\x6F\x20\x73\x79\x6E\x63\x68\x72\x6F\x6E\x69\x7A\x65\x20\x73\x6F\x63\x6B\x65\x74\x2C\x20\x6E\x6F\x20\x74\x69\x6D\x65\x73\x74\x61\x6D\x70\x20\x70\x61\x73\x73\x65\x64","\x2C","\x73\x70\x6C\x69\x74","\x49\x6E\x63\x6F\x72\x72\x65\x63\x74\x20\x62\x69\x6E\x64\x69\x6E\x67\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x20\x70\x61\x73\x73\x65\x64\x21","\x7A\x69\x70\x4F\x62\x6A\x65\x63\x74","\x4E\x6F\x20\x70\x68\x6F\x6E\x65\x20\x63\x6F\x6C\x75\x6D\x6E\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","\x4E\x6F\x20\x66\x69\x72\x73\x74\x4E\x61\x6D\x65\x20\x63\x6F\x6C\x75\x6D\x6E\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x74\x6D\x70","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65","\x30\x37\x37\x37","\x63\x68\x6D\x6F\x64\x53\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6D\x70\x6F\x72\x74\x2F\x63\x6D\x2F\x63\x73\x76","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x66\x6F\x72\x6B","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x46\x69\x6C\x65\x20\x75\x70\x6C\x6F\x61\x64\x65\x64\x20\x63\x6F\x72\x72\x65\x63\x74\x6C\x79\x21","\x70\x69\x64","\x75\x70\x6C\x6F\x61\x64","\x63\x72\x65\x61\x74\x65\x52\x65\x61\x64\x53\x74\x72\x65\x61\x6D","\x6D\x65\x74\x61","\x70\x61\x72\x73\x65","\x69\x6D\x70\x6F\x72\x74","\x62\x69\x6E\x64\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6D\x70\x6F\x72\x74\x2F\x63\x6D\x2F\x63\x73\x76\x32","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6D\x65\x73\x73\x61\x67\x65","\x73\x74\x61\x72\x74\x20\x63\x68\x69\x6C\x64\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x63\x6F\x72\x72\x65\x63\x74\x6C\x79\x21","\x6F\x6E","\x65\x78\x69\x74","\x65\x72\x72\x6F\x72\x20\x63\x68\x69\x6C\x64\x20\x70\x72\x6F\x63\x65\x73\x73","\x61\x67\x65\x6E\x74","\x55\x73\x65\x72"];_0x5abc[0];var jsonpatch=require(_0x5abc[1]);var rp=require(_0x5abc[2]);var moment=require(_0x5abc[3]);var BPromise=require(_0x5abc[4]);var Mustache=require(_0x5abc[5]);var util=require(_0x5abc[6]);var path=require(_0x5abc[7]);var sox=require(_0x5abc[8]);var csv=require(_0x5abc[9]);var ejs=require(_0x5abc[10]);var fs=require(_0x5abc[11]);var _=require(_0x5abc[12]);var squel=require(_0x5abc[13]);var crypto=require(_0x5abc[14]);var jsforce=require(_0x5abc[15]);var deskjs=require(_0x5abc[16]);var toCsv=require(_0x5abc[9]);var querystring=require(_0x5abc[17]);var Papa=require(_0x5abc[18]);var qs=require(_0x5abc[19]);var logger=require(_0x5abc[21])(_0x5abc[20]);var utils=require(_0x5abc[22]);var config=require(_0x5abc[23]);var db=require(_0x5abc[25])[_0x5abc[24]];var socket=require(_0x5abc[27])({host:_0x5abc[26],port:6379});require(_0x5abc[29])[_0x5abc[28]](socket);function respondWithStatusCode(_0x9b58x1b,_0x9b58x1c){_0x9b58x1c= _0x9b58x1c|| 204;return function(_0x9b58x1d){if(_0x9b58x1d){return _0x9b58x1b[_0x5abc[30]](_0x9b58x1c)};return _0x9b58x1b[_0x5abc[32]](_0x9b58x1c)[_0x5abc[31]]()}}function respondWithResult(_0x9b58x1b,_0x9b58x1c){_0x9b58x1c= _0x9b58x1c|| 200;return function(_0x9b58x1d){if(_0x9b58x1d){return _0x9b58x1b[_0x5abc[32]](_0x9b58x1c)[_0x5abc[33]](_0x9b58x1d)}}}function respondWithFilteredResult(_0x9b58x1b,_0x9b58x20){return function(_0x9b58x1d){if(_0x9b58x1d){var _0x9b58x21=_0x9b58x1d[_0x5abc[34]],_0x9b58x22=_0x9b58x20[_0x5abc[35]],_0x9b58x23=_0x9b58x20[_0x5abc[35]]+ _0x9b58x20[_0x5abc[36]],_0x9b58x1c;if(_0x9b58x23>= _0x9b58x21){_0x9b58x23= _0x9b58x21;_0x9b58x1c= 200}else {_0x9b58x1c= 206};_0x9b58x1b[_0x5abc[32]](_0x9b58x1c);return _0x9b58x1b[_0x5abc[40]](_0x5abc[37],_0x9b58x22+ _0x5abc[38]+ _0x9b58x23+ _0x5abc[39]+ _0x9b58x21)[_0x5abc[33]](_0x9b58x1d)};return null}}function patchUpdates(_0x9b58x25){return function(_0x9b58x1d){try{jsonpatch[_0x5abc[41]](_0x9b58x1d,_0x9b58x25,true)}catch(err){return BPromise[_0x5abc[42]](err)};return _0x9b58x1d[_0x5abc[43]]()}}function saveUpdates(_0x9b58x27,_0x9b58x1c){return function(_0x9b58x1d){if(_0x9b58x1d){return _0x9b58x1d[_0x5abc[45]](_0x9b58x27)[_0x5abc[44]](function(_0x9b58x28){return _0x9b58x28})};return null}}function removeEntity(_0x9b58x1b,_0x9b58x1c){return function(_0x9b58x1d){if(_0x9b58x1d){return _0x9b58x1d[_0x5abc[46]]()[_0x5abc[44]](function(){_0x9b58x1b[_0x5abc[32]](204)[_0x5abc[31]]()})}}}function handleEntityNotFound(_0x9b58x1b,_0x9b58x1c){return function(_0x9b58x1d){if(!_0x9b58x1d){_0x9b58x1b[_0x5abc[30]](404)};return _0x9b58x1d}}function handleError(_0x9b58x1b,_0x9b58x1c){_0x9b58x1c= _0x9b58x1c|| 500;return function(_0x9b58x2c){logger[_0x5abc[48]](_0x9b58x2c[_0x5abc[47]]);if(_0x9b58x2c[_0x5abc[49]]){delete _0x9b58x2c[_0x5abc[49]]};_0x9b58x1b[_0x5abc[32]](_0x9b58x1c)[_0x5abc[50]](_0x9b58x2c)}}exports[_0x5abc[46]]= function(_0x9b58x2d,_0x9b58x1b){return db[_0x5abc[55]][_0x5abc[54]]({where:{id:_0x9b58x2d[_0x5abc[53]][_0x5abc[52]]}})[_0x5abc[44]](handleEntityNotFound(_0x9b58x1b,null))[_0x5abc[44]](removeEntity(_0x9b58x1b,null))[_0x5abc[51]](handleError(_0x9b58x1b,null))};exports[_0x5abc[56]]= function(_0x9b58x2d,_0x9b58x1b){return db[_0x5abc[55]][_0x5abc[56]]()[_0x5abc[44]](respondWithResult(_0x9b58x1b,null))[_0x5abc[51]](handleError(_0x9b58x1b,null))};exports[_0x5abc[57]]= function(_0x9b58x2d,_0x9b58x1b){var _0x9b58x2e;var _0x9b58x2f;var _0x9b58x30;if(_0x9b58x2d[_0x5abc[58]][_0x5abc[52]]){delete _0x9b58x2d[_0x5abc[58]][_0x5abc[52]]};return db[_0x5abc[55]][_0x5abc[95]]({where:{id:[_0x9b58x2d[_0x5abc[58]][_0x5abc[59]],_0x9b58x2d[_0x5abc[58]][_0x5abc[60]]]}})[_0x5abc[44]](function(_0x9b58x31){if(_0x9b58x31){if(_0x9b58x31[_0x5abc[92]]!== 2){return null};_0x9b58x31[0]= _0x9b58x31[0][_0x5abc[93]]({plain:true});_0x9b58x31[1]= _0x9b58x31[1][_0x5abc[93]]({plain:true});delete _0x9b58x31[0][_0x5abc[52]];delete _0x9b58x31[1][_0x5abc[52]];return _[_0x5abc[94]](_0x9b58x31[0],_0x9b58x31[1],function(_0x9b58x32,_0x9b58x33){if(Array[_0x5abc[83]](_0x9b58x33)&&  !_0x9b58x33[_0x5abc[92]]){return _0x9b58x32}else {if(!_0x9b58x33){return _0x9b58x32}}})}})[_0x5abc[44]](handleEntityNotFound(_0x9b58x1b,null))[_0x5abc[44]](function(_0x9b58x1d){if(_0x9b58x1d){if(_0x9b58x1d[_0x5abc[82]]&& _[_0x5abc[83]](_0x9b58x1d[_0x5abc[82]])){_0x9b58x1d[_0x5abc[82]]= _0x9b58x1d[_0x5abc[82]][_0x5abc[84]]()};logger[_0x5abc[86]](_0x5abc[85],_0x9b58x2d[_0x5abc[58]][_0x5abc[59]],_0x9b58x2d[_0x5abc[58]][_0x5abc[60]]);return db[_0x5abc[91]][_0x5abc[46]]({where:{ContactId:[_0x9b58x2d[_0x5abc[58]][_0x5abc[59]],_0x9b58x2d[_0x5abc[58]][_0x5abc[60]]]}})[_0x5abc[44]](function(_0x9b58x1b){logger[_0x5abc[86]](_0x5abc[87],_0x9b58x1b);return db[_0x5abc[90]][_0x5abc[46]]({where:{ContactId:[_0x9b58x2d[_0x5abc[58]][_0x5abc[59]],_0x9b58x2d[_0x5abc[58]][_0x5abc[60]]]}})[_0x5abc[44]](function(_0x9b58x1b){logger[_0x5abc[86]](_0x5abc[88],_0x9b58x1b);return db[_0x5abc[55]][_0x5abc[89]](_0x9b58x1d)})})}})[_0x5abc[44]](function(_0x9b58x1d){if(_0x9b58x1d){_0x9b58x2e= _0x9b58x1d;_0x9b58x2f= {ContactId:_0x9b58x2e[_0x5abc[52]]};_0x9b58x30= {where:{ContactId:[_0x9b58x2d[_0x5abc[58]][_0x5abc[59]],_0x9b58x2d[_0x5abc[58]][_0x5abc[60]]]}};return db[_0x5abc[81]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[80]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[79]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[78]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[77]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[78]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[77]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[76]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[75]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[74]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[73]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[72]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[71]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[70]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[69]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[68]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[67]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[66]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[65]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[64]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[63]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[62]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[61]][_0x5abc[45]](_0x9b58x2f,_0x9b58x30)}})[_0x5abc[44]](function(){if(_0x9b58x2e){return db[_0x5abc[55]][_0x5abc[46]]({where:{id:[_0x9b58x2d[_0x5abc[58]][_0x5abc[59]],_0x9b58x2d[_0x5abc[58]][_0x5abc[60]]]}})}})[_0x5abc[44]](function(){if(_0x9b58x2e){return _0x9b58x2e}})[_0x5abc[44]](respondWithResult(_0x9b58x1b,null))[_0x5abc[51]](handleError(_0x9b58x1b,null))};exports[_0x5abc[89]]= function(_0x9b58x2d,_0x9b58x1b){return db[_0x5abc[55]][_0x5abc[56]]()[_0x5abc[44]](function(_0x9b58x34){if(_0x9b58x2d[_0x5abc[58]][_0x5abc[82]]&& _[_0x5abc[83]](_0x9b58x2d[_0x5abc[58]][_0x5abc[82]])){if(_0x9b58x2d[_0x5abc[58]][_0x5abc[82]][_0x5abc[92]]){_0x9b58x2d[_0x5abc[58]][_0x5abc[82]]= _0x9b58x2d[_0x5abc[58]][_0x5abc[82]][_0x5abc[84]](_0x5abc[96])+ _0x5abc[96]}else {_0x9b58x2d[_0x5abc[58]][_0x5abc[82]]= null}}else {_0x9b58x2d[_0x5abc[58]][_0x5abc[82]]= null};return db[_0x5abc[55]][_0x5abc[89]](_0x9b58x2d[_0x5abc[58]],{fields:_[_0x5abc[97]](_0x9b58x34),raw:true})})[_0x5abc[44]](respondWithResult(_0x9b58x1b,201))[_0x5abc[51]](handleError(_0x9b58x1b,null))};exports[_0x5abc[98]]= function(_0x9b58x2d,_0x9b58x1b){var _0x9b58x35=[];var _0x9b58x36=0;var _0x9b58x37=0;var _0x9b58x38=0;return db[_0x5abc[55]][_0x5abc[56]]()[_0x5abc[44]](function(_0x9b58x34){return BPromise[_0x5abc[106]](_0x9b58x2d[_0x5abc[58]],function(_0x9b58x39){var _0x9b58x20={where:{$or:[]},defaults:_0x9b58x39,fields:_[_0x5abc[97]](_0x9b58x34),raw:true};if(_0x9b58x39[_0x5abc[99]]){for(var _0x9b58x3a=0;_0x9b58x3a< _0x9b58x39[_0x5abc[99]][_0x5abc[92]];_0x9b58x3a++){var _0x9b58x3b={};_0x9b58x3b[_0x9b58x39[_0x5abc[99]][_0x9b58x3a]]= _0x9b58x39[_0x9b58x39[_0x5abc[99]][_0x9b58x3a]];_0x9b58x20[_0x5abc[102]][_0x5abc[101]][_0x5abc[100]](_0x9b58x3b)};_0x9b58x20[_0x5abc[102]][_0x5abc[103]]= _0x9b58x39[_0x5abc[103]]};return db[_0x5abc[55]][_0x5abc[105]](_0x9b58x20)[_0x5abc[104]](function(_0x9b58x3c,_0x9b58x3d){if(_0x9b58x3d){_0x9b58x36++}else {_0x9b58x38++}})[_0x5abc[51]](function(_0x9b58x2c){console[_0x5abc[48]](_0x9b58x2c);_0x9b58x37++})})})[_0x5abc[44]](function(_0x9b58x31){if(_0x9b58x31){return {success:_0x9b58x36,failure:_0x9b58x37,duplicates:_0x9b58x38}}})[_0x5abc[44]](respondWithResult(_0x9b58x1b,201))[_0x5abc[51]](handleError(_0x9b58x1b,null))};exports[_0x5abc[107]]= function(_0x9b58x2d,_0x9b58x1b,_0x9b58x3e){var _0x9b58x2e;return db[_0x5abc[55]][_0x5abc[56]]()[_0x5abc[44]](function(_0x9b58x34){return db[_0x5abc[55]][_0x5abc[54]]({where:{id:_0x9b58x2d[_0x5abc[53]][_0x5abc[52]]},attributes:_[_0x5abc[97]](_0x9b58x34)})})[_0x5abc[44]](function(_0x9b58x1d){_0x9b58x2e= _0x9b58x1d[_0x5abc[93]]({plain:true});var _0x9b58x41={where:{$and:[{ListId:{$ne:null}}]}};if(_0x9b58x1d&& _0x9b58x1d[_0x5abc[103]]){if(_0x9b58x1d[_0x5abc[103]]){_0x9b58x41[_0x5abc[102]][_0x5abc[112]][_0x5abc[100]]({ListId:{$ne:_0x9b58x1d[_0x5abc[103]]}})}};return db[_0x5abc[113]][_0x5abc[95]](_0x9b58x41)})[_0x5abc[44]](function(_0x9b58x3f){return _[_0x5abc[111]](_0x9b58x2e,_[_0x5abc[110]](_0x9b58x3f,function(_0x9b58x40){return util[_0x5abc[109]](_0x5abc[108],_0x9b58x40[_0x5abc[52]])}))})[_0x5abc[44]](handleEntityNotFound(_0x9b58x1b,null))[_0x5abc[44]](respondWithResult(_0x9b58x1b,null))[_0x5abc[51]](handleError(_0x9b58x1b,null))};exports[_0x5abc[114]]= function(_0x9b58x2d,_0x9b58x1b){var _0x9b58x20={},_0x9b58x42={};return db[_0x5abc[55]][_0x5abc[56]]()[_0x5abc[44]](function(_0x9b58x34){_0x9b58x42[_0x5abc[115]]= _[_0x5abc[97]](_0x9b58x34);_0x9b58x42[_0x5abc[116]]= _[_0x5abc[97]](_0x9b58x2d[_0x5abc[116]]);_0x9b58x42[_0x5abc[117]]= _[_0x5abc[118]](_0x9b58x42[_0x5abc[115]],_0x9b58x42[_0x5abc[116]]);_0x9b58x20[_0x5abc[119]]= _[_0x5abc[118]](_0x9b58x42[_0x5abc[115]],qs[_0x5abc[120]](_0x9b58x2d[_0x5abc[116]][_0x5abc[120]]));_0x9b58x20[_0x5abc[119]]= (_0x9b58x20[_0x5abc[119]][_0x5abc[92]])?_0x9b58x20[_0x5abc[119]]:_0x9b58x42[_0x5abc[115]];if(!_0x9b58x2d[_0x5abc[116]][_0x5abc[122]](_0x5abc[121])){_0x9b58x20[_0x5abc[36]]= qs[_0x5abc[36]](_0x9b58x2d[_0x5abc[116]][_0x5abc[36]]);_0x9b58x20[_0x5abc[35]]= qs[_0x5abc[35]](_0x9b58x2d[_0x5abc[116]][_0x5abc[35]])};_0x9b58x20[_0x5abc[123]]= qs[_0x5abc[124]](_0x9b58x2d[_0x5abc[116]][_0x5abc[124]]);_0x9b58x20[_0x5abc[102]]= qs[_0x5abc[117]](_[_0x5abc[125]](_0x9b58x2d[_0x5abc[116]],_0x9b58x42[_0x5abc[117]]));if(_0x9b58x2d[_0x5abc[116]][_0x5abc[126]]){_0x9b58x20[_0x5abc[102]]= _[_0x5abc[57]](_0x9b58x20[_0x5abc[102]],{$or:_[_0x5abc[110]](_0x9b58x20[_0x5abc[119]],function(_0x9b58x43){var _0x9b58x44={};_0x9b58x44[_0x9b58x43]= {$like:_0x5abc[127]+ _0x9b58x2d[_0x5abc[116]][_0x5abc[126]]+ _0x5abc[127]};return _0x9b58x44})})};_0x9b58x20= _[_0x5abc[57]]({},_0x9b58x20,_0x9b58x2d[_0x5abc[128]]);return db[_0x5abc[55]][_0x5abc[129]](_0x9b58x20)})[_0x5abc[44]](respondWithFilteredResult(_0x9b58x1b,_0x9b58x20))[_0x5abc[51]](handleError(_0x9b58x1b,null))};exports[_0x5abc[45]]= function(_0x9b58x2d,_0x9b58x1b){var _0x9b58x2e;if(_0x9b58x2d[_0x5abc[58]][_0x5abc[52]]){delete _0x9b58x2d[_0x5abc[58]][_0x5abc[52]]};if(_0x9b58x2d[_0x5abc[58]][_0x5abc[122]](_0x5abc[82])){if(_[_0x5abc[83]](_0x9b58x2d[_0x5abc[58]][_0x5abc[82]])){if(_0x9b58x2d[_0x5abc[58]][_0x5abc[82]][_0x5abc[92]]){_0x9b58x2d[_0x5abc[58]][_0x5abc[82]]= _0x9b58x2d[_0x5abc[58]][_0x5abc[82]][_0x5abc[84]](_0x5abc[96])+ _0x5abc[96]}else {if(_[_0x5abc[130]](_0x9b58x2d[_0x5abc[58]][_0x5abc[82]])){_0x9b58x2d[_0x5abc[58]][_0x5abc[82]]= null}}}};return db[_0x5abc[55]][_0x5abc[54]]({where:{id:_0x9b58x2d[_0x5abc[53]][_0x5abc[52]]}})[_0x5abc[44]](handleEntityNotFound(_0x9b58x1b,null))[_0x5abc[44]](saveUpdates(_0x9b58x2d[_0x5abc[58]],null))[_0x5abc[44]](function(_0x9b58x1d){_0x9b58x2e= _0x9b58x1d;var _0x9b58x41={where:{$and:[{ListId:{$ne:null}}]}};if(_0x9b58x1d&& _0x9b58x1d[_0x5abc[103]]){if(_0x9b58x1d[_0x5abc[103]]){_0x9b58x41[_0x5abc[102]][_0x5abc[112]][_0x5abc[100]]({ListId:{$ne:_0x9b58x1d[_0x5abc[103]]}})}};return db[_0x5abc[113]][_0x5abc[95]](_0x9b58x41)})[_0x5abc[44]](function(_0x9b58x3f){if(_0x9b58x3f){return _[_0x5abc[111]](_[_0x5abc[143]](_0x9b58x2d[_0x5abc[58]],function(_0x9b58x43,_0x9b58x46){return _[_0x5abc[142]](_0x9b58x46,_0x5abc[141])}),_[_0x5abc[110]](_0x9b58x3f,function(_0x9b58x40){return util[_0x5abc[109]](_0x5abc[108],_0x9b58x40[_0x5abc[52]])}))}})[_0x5abc[44]](function(_0x9b58x45){if(_0x9b58x45&&  !_[_0x5abc[132]](_0x9b58x45)){var _0x9b58x41=squel[_0x5abc[45]]()[_0x5abc[137]](_0x5abc[136])[_0x5abc[135]](_0x9b58x45)[_0x5abc[102]](_0x5abc[134],_0x9b58x2d[_0x5abc[53]][_0x5abc[52]])[_0x5abc[133]]();return db[_0x5abc[140]][_0x5abc[116]](_0x9b58x41[_0x5abc[138]],{replacements:_0x9b58x41[_0x5abc[139]]})}})[_0x5abc[44]](function(){if(_0x9b58x2d[_0x5abc[58]][_0x5abc[131]]&& _0x9b58x2e){return db[_0x5abc[91]][_0x5abc[45]]({phone:_0x9b58x2d[_0x5abc[58]][_0x5abc[131]]},{where:{ContactId:_0x9b58x2e[_0x5abc[52]]}})}})[_0x5abc[44]](function(){return _0x9b58x2e})[_0x5abc[44]](respondWithResult(_0x9b58x1b,null))[_0x5abc[51]](handleError(_0x9b58x1b,null))};exports[_0x5abc[144]]= function(_0x9b58x2d,_0x9b58x1b,_0x9b58x3e){var _0x9b58x20={raw:false,where:{}};var _0x9b58x42={};var _0x9b58x47={count:0,rows:[]};return db[_0x5abc[55]][_0x5abc[150]]({where:{id:_0x9b58x2d[_0x5abc[53]][_0x5abc[52]]}})[_0x5abc[44]](handleEntityNotFound(_0x9b58x1b,null))[_0x5abc[44]](function(_0x9b58x1d){if(_0x9b58x1d){_0x9b58x42[_0x5abc[115]]= _[_0x5abc[97]](db[_0x5abc[91]][_0x5abc[145]]);_0x9b58x42[_0x5abc[116]]= _[_0x5abc[97]](_0x9b58x2d[_0x5abc[116]]);_0x9b58x42[_0x5abc[117]]= _[_0x5abc[118]](_0x9b58x42[_0x5abc[115]],_0x9b58x42[_0x5abc[116]]);_0x9b58x20[_0x5abc[119]]= _[_0x5abc[118]](_0x9b58x42[_0x5abc[115]],qs[_0x5abc[120]](_0x9b58x2d[_0x5abc[116]][_0x5abc[120]]));_0x9b58x20[_0x5abc[119]]= (_0x9b58x20[_0x5abc[119]][_0x5abc[92]])?_0x9b58x20[_0x5abc[119]]:_0x9b58x42[_0x5abc[115]];if(!_0x9b58x2d[_0x5abc[116]][_0x5abc[122]](_0x5abc[121])){_0x9b58x20[_0x5abc[36]]= qs[_0x5abc[36]](_0x9b58x2d[_0x5abc[116]][_0x5abc[36]]);_0x9b58x20[_0x5abc[35]]= qs[_0x5abc[35]](_0x9b58x2d[_0x5abc[116]][_0x5abc[35]])};_0x9b58x20[_0x5abc[123]]= qs[_0x5abc[124]](_0x9b58x2d[_0x5abc[116]][_0x5abc[124]]);_0x9b58x20[_0x5abc[102]]= qs[_0x5abc[117]](_[_0x5abc[125]](_0x9b58x2d[_0x5abc[116]],_0x9b58x42[_0x5abc[117]]));_0x9b58x20[_0x5abc[102]][_0x5abc[146]]= _0x9b58x1d[_0x5abc[52]];if(_0x9b58x2d[_0x5abc[116]][_0x5abc[126]]){_0x9b58x20[_0x5abc[102]]= _[_0x5abc[57]](_0x9b58x20[_0x5abc[102]],{$or:_[_0x5abc[110]](_0x9b58x20[_0x5abc[119]],function(_0x9b58x43){var _0x9b58x44={};_0x9b58x44[_0x9b58x43]= {$like:_0x5abc[127]+ _0x9b58x2d[_0x5abc[116]][_0x5abc[126]]+ _0x5abc[127]};return _0x9b58x44})})};_0x9b58x20= _[_0x5abc[57]]({},_0x9b58x20,_0x9b58x2d[_0x5abc[128]]);return db[_0x5abc[91]][_0x5abc[34]]({where:_0x9b58x20[_0x5abc[102]]})[_0x5abc[44]](function(_0x9b58x21){_0x9b58x47[_0x5abc[34]]= _0x9b58x21;if(_0x9b58x2d[_0x5abc[116]][_0x5abc[148]]){_0x9b58x20[_0x5abc[149]]= [{all:true}]};return db[_0x5abc[91]][_0x5abc[95]](_0x9b58x20)})[_0x5abc[44]](function(_0x9b58x48){_0x9b58x47[_0x5abc[147]]= _0x9b58x48;return _0x9b58x47})}})[_0x5abc[44]](respondWithFilteredResult(_0x9b58x1b,_0x9b58x20))[_0x5abc[51]](handleError(_0x9b58x1b,null))};exports[_0x5abc[151]]= function(_0x9b58x2d,_0x9b58x1b,_0x9b58x3e){var _0x9b58x20={raw:true,where:{}};var _0x9b58x42={};var _0x9b58x47={count:0,rows:[]};return db[_0x5abc[55]][_0x5abc[150]]({where:{id:_0x9b58x2d[_0x5abc[53]][_0x5abc[52]]}})[_0x5abc[44]](handleEntityNotFound(_0x9b58x1b,null))[_0x5abc[44]](function(_0x9b58x1d){if(_0x9b58x1d){_0x9b58x42[_0x5abc[115]]= _[_0x5abc[97]](db[_0x5abc[69]][_0x5abc[145]]);_0x9b58x42[_0x5abc[116]]= _[_0x5abc[97]](_0x9b58x2d[_0x5abc[116]]);_0x9b58x42[_0x5abc[117]]= _[_0x5abc[118]](_0x9b58x42[_0x5abc[115]],_0x9b58x42[_0x5abc[116]]);_0x9b58x20[_0x5abc[119]]= _[_0x5abc[118]](_0x9b58x42[_0x5abc[115]],qs[_0x5abc[120]](_0x9b58x2d[_0x5abc[116]][_0x5abc[120]]));_0x9b58x20[_0x5abc[119]]= (_0x9b58x20[_0x5abc[119]][_0x5abc[92]])?_0x9b58x20[_0x5abc[119]]:_0x9b58x42[_0x5abc[115]];if(!_0x9b58x2d[_0x5abc[116]][_0x5abc[122]](_0x5abc[121])){_0x9b58x20[_0x5abc[36]]= qs[_0x5abc[36]](_0x9b58x2d[_0x5abc[116]][_0x5abc[36]]);_0x9b58x20[_0x5abc[35]]= qs[_0x5abc[35]](_0x9b58x2d[_0x5abc[116]][_0x5abc[35]])};_0x9b58x20[_0x5abc[123]]= qs[_0x5abc[124]](_0x9b58x2d[_0x5abc[116]][_0x5abc[124]]);_0x9b58x20[_0x5abc[102]]= qs[_0x5abc[117]](_[_0x5abc[125]](_0x9b58x2d[_0x5abc[116]],_0x9b58x42[_0x5abc[117]]));_0x9b58x20[_0x5abc[102]][_0x5abc[146]]= _0x9b58x1d[_0x5abc[52]];if(_0x9b58x2d[_0x5abc[116]][_0x5abc[126]]){_0x9b58x20[_0x5abc[102]]= _[_0x5abc[57]](_0x9b58x20[_0x5abc[102]],{$or:_[_0x5abc[110]](_0x9b58x20[_0x5abc[119]],function(_0x9b58x43){var _0x9b58x44={};_0x9b58x44[_0x9b58x43]= {$like:_0x5abc[127]+ _0x9b58x2d[_0x5abc[116]][_0x5abc[126]]+ _0x5abc[127]};return _0x9b58x44})})};_0x9b58x20= _[_0x5abc[57]]({},_0x9b58x20,_0x9b58x2d[_0x5abc[128]]);return db[_0x5abc[69]][_0x5abc[34]]({where:_0x9b58x20[_0x5abc[102]]})[_0x5abc[44]](function(_0x9b58x21){_0x9b58x47[_0x5abc[34]]= _0x9b58x21;if(_0x9b58x2d[_0x5abc[116]][_0x5abc[148]]){_0x9b58x20[_0x5abc[149]]= [{all:true}]};return db[_0x5abc[69]][_0x5abc[95]](_0x9b58x20)})[_0x5abc[44]](function(_0x9b58x48){_0x9b58x47[_0x5abc[147]]= _0x9b58x48;return _0x9b58x47})}})[_0x5abc[44]](respondWithFilteredResult(_0x9b58x1b,_0x9b58x20))[_0x5abc[51]](handleError(_0x9b58x1b,null))};exports[_0x5abc[152]]= function(_0x9b58x2d,_0x9b58x1b,_0x9b58x3e){var _0x9b58x20={raw:true,where:{}};var _0x9b58x42={};var _0x9b58x47={count:0,rows:[]};return db[_0x5abc[55]][_0x5abc[150]]({where:{id:_0x9b58x2d[_0x5abc[53]][_0x5abc[52]]}})[_0x5abc[44]](handleEntityNotFound(_0x9b58x1b,null))[_0x5abc[44]](function(_0x9b58x1d){if(_0x9b58x1d){_0x9b58x42[_0x5abc[115]]= _[_0x5abc[97]](db[_0x5abc[70]][_0x5abc[145]]);_0x9b58x42[_0x5abc[116]]= _[_0x5abc[97]](_0x9b58x2d[_0x5abc[116]]);_0x9b58x42[_0x5abc[117]]= _[_0x5abc[118]](_0x9b58x42[_0x5abc[115]],_0x9b58x42[_0x5abc[116]]);_0x9b58x20[_0x5abc[119]]= _[_0x5abc[118]](_0x9b58x42[_0x5abc[115]],qs[_0x5abc[120]](_0x9b58x2d[_0x5abc[116]][_0x5abc[120]]));_0x9b58x20[_0x5abc[119]]= (_0x9b58x20[_0x5abc[119]][_0x5abc[92]])?_0x9b58x20[_0x5abc[119]]:_0x9b58x42[_0x5abc[115]];if(!_0x9b58x2d[_0x5abc[116]][_0x5abc[122]](_0x5abc[121])){_0x9b58x20[_0x5abc[36]]= qs[_0x5abc[36]](_0x9b58x2d[_0x5abc[116]][_0x5abc[36]]);_0x9b58x20[_0x5abc[35]]= qs[_0x5abc[35]](_0x9b58x2d[_0x5abc[116]][_0x5abc[35]])};_0x9b58x20[_0x5abc[123]]= qs[_0x5abc[124]](_0x9b58x2d[_0x5abc[116]][_0x5abc[124]]);_0x9b58x20[_0x5abc[102]]= qs[_0x5abc[117]](_[_0x5abc[125]](_0x9b58x2d[_0x5abc[116]],_0x9b58x42[_0x5abc[117]]));_0x9b58x20[_0x5abc[102]][_0x5abc[146]]= _0x9b58x1d[_0x5abc[52]];if(_0x9b58x2d[_0x5abc[116]][_0x5abc[126]]){_0x9b58x20[_0x5abc[102]]= _[_0x5abc[57]](_0x9b58x20[_0x5abc[102]],{$or:_[_0x5abc[110]](_0x9b58x20[_0x5abc[119]],function(_0x9b58x43){var _0x9b58x44={};_0x9b58x44[_0x9b58x43]= {$like:_0x5abc[127]+ _0x9b58x2d[_0x5abc[116]][_0x5abc[126]]+ _0x5abc[127]};return _0x9b58x44})})};_0x9b58x20= _[_0x5abc[57]]({},_0x9b58x20,_0x9b58x2d[_0x5abc[128]]);return db[_0x5abc[70]][_0x5abc[34]]({where:_0x9b58x20[_0x5abc[102]]})[_0x5abc[44]](function(_0x9b58x21){_0x9b58x47[_0x5abc[34]]= _0x9b58x21;if(_0x9b58x2d[_0x5abc[116]][_0x5abc[148]]){_0x9b58x20[_0x5abc[149]]= [{all:true}]};return db[_0x5abc[70]][_0x5abc[95]](_0x9b58x20)})[_0x5abc[44]](function(_0x9b58x48){_0x9b58x47[_0x5abc[147]]= _0x9b58x48;return _0x9b58x47})}})[_0x5abc[44]](respondWithFilteredResult(_0x9b58x1b,_0x9b58x20))[_0x5abc[51]](handleError(_0x9b58x1b,null))};exports[_0x5abc[153]]= function(_0x9b58x2d,_0x9b58x1b,_0x9b58x3e){var _0x9b58x20={raw:true,where:{}};var _0x9b58x42={};var _0x9b58x47={count:0,rows:[]};return db[_0x5abc[55]][_0x5abc[150]]({where:{id:_0x9b58x2d[_0x5abc[53]][_0x5abc[52]]}})[_0x5abc[44]](handleEntityNotFound(_0x9b58x1b,null))[_0x5abc[44]](function(_0x9b58x1d){if(_0x9b58x1d){_0x9b58x42[_0x5abc[115]]= _[_0x5abc[97]](db[_0x5abc[61]][_0x5abc[145]]);_0x9b58x42[_0x5abc[116]]= _[_0x5abc[97]](_0x9b58x2d[_0x5abc[116]]);_0x9b58x42[_0x5abc[117]]= _[_0x5abc[118]](_0x9b58x42[_0x5abc[115]],_0x9b58x42[_0x5abc[116]]);_0x9b58x20[_0x5abc[119]]= _[_0x5abc[118]](_0x9b58x42[_0x5abc[115]],qs[_0x5abc[120]](_0x9b58x2d[_0x5abc[116]][_0x5abc[120]]));_0x9b58x20[_0x5abc[119]]= (_0x9b58x20[_0x5abc[119]][_0x5abc[92]])?_0x9b58x20[_0x5abc[119]]:_0x9b58x42[_0x5abc[115]];if(!_0x9b58x2d[_0x5abc[116]][_0x5abc[122]](_0x5abc[121])){_0x9b58x20[_0x5abc[36]]= qs[_0x5abc[36]](_0x9b58x2d[_0x5abc[116]][_0x5abc[36]]);_0x9b58x20[_0x5abc[35]]= qs[_0x5abc[35]](_0x9b58x2d[_0x5abc[116]][_0x5abc[35]])};_0x9b58x20[_0x5abc[123]]= qs[_0x5abc[124]](_0x9b58x2d[_0x5abc[116]][_0x5abc[124]]);_0x9b58x20[_0x5abc[102]]= qs[_0x5abc[117]](_[_0x5abc[125]](_0x9b58x2d[_0x5abc[116]],_0x9b58x42[_0x5abc[117]]));_0x9b58x20[_0x5abc[102]][_0x5abc[146]]= _0x9b58x1d[_0x5abc[52]];if(_0x9b58x2d[_0x5abc[116]][_0x5abc[126]]){_0x9b58x20[_0x5abc[102]]= _[_0x5abc[57]](_0x9b58x20[_0x5abc[102]],{$or:_[_0x5abc[110]](_0x9b58x20[_0x5abc[119]],function(_0x9b58x43){var _0x9b58x44={};_0x9b58x44[_0x9b58x43]= {$like:_0x5abc[127]+ _0x9b58x2d[_0x5abc[116]][_0x5abc[126]]+ _0x5abc[127]};return _0x9b58x44})})};_0x9b58x20= _[_0x5abc[57]]({},_0x9b58x20,_0x9b58x2d[_0x5abc[128]]);return db[_0x5abc[61]][_0x5abc[34]]({where:_0x9b58x20[_0x5abc[102]]})[_0x5abc[44]](function(_0x9b58x21){_0x9b58x47[_0x5abc[34]]= _0x9b58x21;if(_0x9b58x2d[_0x5abc[116]][_0x5abc[148]]){_0x9b58x20[_0x5abc[149]]= [{all:true}]};return db[_0x5abc[61]][_0x5abc[95]](_0x9b58x20)})[_0x5abc[44]](function(_0x9b58x48){_0x9b58x47[_0x5abc[147]]= _0x9b58x48;return _0x9b58x47})}})[_0x5abc[44]](respondWithFilteredResult(_0x9b58x1b,_0x9b58x20))[_0x5abc[51]](handleError(_0x9b58x1b,null))};exports[_0x5abc[154]]= function(_0x9b58x2d,_0x9b58x1b,_0x9b58x3e){try{if(!_0x9b58x2d[_0x5abc[58]][_0x5abc[103]]){throw  new Error(_0x5abc[155])};if(!_0x9b58x2d[_0x5abc[58]][_0x5abc[156]]){throw  new Error(_0x5abc[157])};if(!_0x9b58x2d[_0x5abc[58]][_0x5abc[158]]){throw  new Error(_0x5abc[159])};if(!_0x9b58x2d[_0x5abc[58]][_0x5abc[160]]){throw  new Error(_0x5abc[161])};var _0x9b58x42=_0x9b58x2d[_0x5abc[58]][_0x5abc[156]][_0x5abc[163]](_0x5abc[162]);var _0x9b58x49=_0x9b58x2d[_0x5abc[58]][_0x5abc[158]][_0x5abc[163]](_0x5abc[162]);if(!_0x9b58x42[_0x5abc[92]]||  !_0x9b58x49[_0x5abc[92]] || _0x9b58x42[_0x5abc[92]]!== _0x9b58x49[_0x5abc[92]]){throw  new Error(_0x5abc[164])};_0x9b58x2d[_0x5abc[58]][_0x5abc[120]]= _[_0x5abc[165]](_0x9b58x42,_0x9b58x49);if(!_0x9b58x2d[_0x5abc[58]][_0x5abc[120]][_0x5abc[131]]){throw  new Error(_0x5abc[166])};if(!_0x9b58x2d[_0x5abc[58]][_0x5abc[120]][_0x5abc[167]]){throw  new Error(_0x5abc[168])};var _0x9b58x4a=path[_0x5abc[84]](config[_0x5abc[169]],_0x5abc[170],_0x9b58x2d[_0x5abc[172]][_0x5abc[171]]);fs[_0x5abc[174]](_0x9b58x4a,parseInt(_0x5abc[173],8));var _0x9b58x4b=require(_0x5abc[178])[_0x5abc[177]](path[_0x5abc[84]](__dirname,_0x5abc[175]),[_0x9b58x4a,_0x9b58x2d[_0x5abc[58]][_0x5abc[156]],_0x9b58x2d[_0x5abc[58]][_0x5abc[158]],_0x9b58x2d[_0x5abc[58]][_0x5abc[103]],_0x9b58x2d[_0x5abc[58]][_0x5abc[176]],_0x9b58x2d[_0x5abc[58]][_0x5abc[99]],_0x9b58x2d[_0x5abc[58]][_0x5abc[160]]]);return _0x9b58x1b[_0x5abc[32]](200)[_0x5abc[33]]({message:_0x5abc[179],pid:_0x9b58x4b[_0x5abc[180]]})}catch(err){return _0x9b58x1b[_0x5abc[32]](500)[_0x5abc[50]](err)}};exports[_0x5abc[181]]= function(_0x9b58x2d,_0x9b58x1b,_0x9b58x3e){var _0x9b58x4c=fs[_0x5abc[182]](_0x9b58x2d[_0x5abc[172]][_0x5abc[7]]);Papa[_0x5abc[184]](_0x9b58x4c,{header:true,skipEmptyLines:true,preview:1,complete:function(_0x9b58x4d){return _0x9b58x1b[_0x5abc[32]](200)[_0x5abc[33]]({file:_0x9b58x2d[_0x5abc[172]],fields:_0x9b58x4d[_0x5abc[183]][_0x5abc[120]]})}})};exports[_0x5abc[185]]= function(_0x9b58x2d,_0x9b58x1b,_0x9b58x3e){return db[_0x5abc[195]][_0x5abc[95]]({raw:true,attributes:[_0x5abc[52]],where:{role:_0x5abc[194]}})[_0x5abc[44]](function(_0x9b58x31){var _0x9b58x4e=false;if(!_0x9b58x2d[_0x5abc[58]][_0x5abc[103]]){throw  new Error(_0x5abc[155])};if(!_0x9b58x2d[_0x5abc[58]][_0x5abc[186]][_0x5abc[131]]){throw  new Error(_0x5abc[166])};if(!_0x9b58x2d[_0x5abc[58]][_0x5abc[186]][_0x5abc[167]]){throw  new Error(_0x5abc[168])};if(!_0x9b58x2d[_0x5abc[58]][_0x5abc[160]]){throw  new Error(_0x5abc[161])};var _0x9b58x4f=require(_0x5abc[178])[_0x5abc[177]](path[_0x5abc[84]](__dirname,_0x5abc[187]),[_0x9b58x2d[_0x5abc[53]][_0x5abc[52]],JSON[_0x5abc[188]](_0x9b58x2d[_0x5abc[58]]),JSON[_0x5abc[188]](_0x9b58x31)]);_0x9b58x4f[_0x5abc[191]](_0x5abc[189],function(_0x9b58x50){_0x9b58x4e= true;return _0x9b58x1b[_0x5abc[32]](200)[_0x5abc[33]]({message:_0x5abc[190],pid:_0x9b58x4f[_0x5abc[180]]})});_0x9b58x4f[_0x5abc[191]](_0x5abc[192],function(_0x9b58x51){if(_0x9b58x51&&  !_0x9b58x4e){return _0x9b58x1b[_0x5abc[32]](500)[_0x5abc[33]]({message:_0x5abc[193],pid:_0x9b58x4f[_0x5abc[180]]})}})})[_0x5abc[51]](handleError(_0x9b58x1b,null))}
\ No newline at end of file
index c84e2be..cd39bba 100644 (file)
@@ -1 +1 @@
-var _0xecea=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xecea[0];var EventEmitter=require(_0xecea[1]);var CmContact=require(_0xecea[4])[_0xecea[3]][_0xecea[2]];var CmContactEvents= new EventEmitter();CmContactEvents[_0xecea[5]](0);var events={afterCreate:_0xecea[6],afterUpdate:_0xecea[7],afterDestroy:_0xecea[8]};function emitEvent(event){return function(_0x4560x7,_0x4560x8,_0x4560x9){CmContactEvents[_0xecea[11]](event+ _0xecea[9]+ _0x4560x7[_0xecea[10]],_0x4560x7);CmContactEvents[_0xecea[11]](event,_0x4560x7);_0x4560x9(null)}}for(var e in events){if(events[_0xecea[12]](e)){var event=events[e];CmContact[_0xecea[13]](e,emitEvent(event))}};module[_0xecea[14]]= CmContactEvents
\ No newline at end of file
+var _0xe68f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xe68f[0];var EventEmitter=require(_0xe68f[1]);var CmContact=require(_0xe68f[4])[_0xe68f[3]][_0xe68f[2]];var CmContactEvents= new EventEmitter();CmContactEvents[_0xe68f[5]](0);var events={afterCreate:_0xe68f[6],afterUpdate:_0xe68f[7],afterDestroy:_0xe68f[8]};function emitEvent(event){return function(_0x9aa1x7,_0x9aa1x8,_0x9aa1x9){CmContactEvents[_0xe68f[11]](event+ _0xe68f[9]+ _0x9aa1x7[_0xe68f[10]],_0x9aa1x7);CmContactEvents[_0xe68f[11]](event,_0x9aa1x7);_0x9aa1x9(null)}}for(var e in events){if(events[_0xe68f[12]](e)){var event=events[e];CmContact[_0xe68f[13]](e,emitEvent(event))}};module[_0xe68f[14]]= CmContactEvents
\ No newline at end of file
index 243aeee..c8a0dd1 100644 (file)
@@ -1 +1 @@
-var _0xc073=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x70\x68\x6F\x6E\x65","\x6D\x6F\x64\x65\x6C\x73","\x67\x65\x74","\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x73\x4E\x69\x6C","\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2C\x20\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65\x20","\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x69\x6E\x73\x65\x72\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x2C\x20\x63\x68\x65\x63\x6B\x20\x64\x75\x70\x6C\x69\x63\x61\x74\x65\x20\x6F\x6E\x6C\x79\x49\x66\x4F\x70\x65\x6E\x2C\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x20\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x20","\x69\x64","\x4C\x69\x73\x74\x49\x64","\x70\x72\x69\x6F\x72\x69\x74\x79","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x55\x6E\x69\x71\x75\x65\x69\x64","\x63\x72\x65\x61\x74\x65","\x43\x6D\x48\x6F\x70\x70\x65\x72","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x4F\x6E\x65","\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2C\x20\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65\x2C\x20","\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x69\x6E\x73\x65\x72\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x2C\x20\x63\x68\x65\x63\x6B\x20\x64\x75\x70\x6C\x69\x63\x61\x74\x65\x20\x61\x6C\x77\x61\x79\x73\x2C\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x20\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x20","\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x69\x6E\x73\x65\x72\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x2C\x20\x63\x68\x65\x63\x6B\x20\x64\x75\x70\x6C\x69\x63\x61\x74\x65\x20\x61\x6C\x77\x61\x79\x73\x2C\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x20\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x20","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x69\x6E\x73\x65\x72\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x2C\x20\x63\x68\x65\x63\x6B\x20\x64\x75\x70\x6C\x69\x63\x61\x74\x65\x20\x6F\x6E\x6C\x79\x49\x66\x4F\x70\x65\x6E\x2C\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x20\x43\x61\x6D\x70\x61\x69\x67\x6E\x20","\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x69\x6E\x73\x65\x72\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x2C\x20\x63\x68\x65\x63\x6B\x20\x64\x75\x70\x6C\x69\x63\x61\x74\x65\x20\x61\x6C\x77\x61\x79\x73\x2C\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x20\x43\x61\x6D\x70\x61\x69\x67\x6E\x20","\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x69\x6E\x73\x65\x72\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x2C\x20\x63\x68\x65\x63\x6B\x20\x64\x75\x70\x6C\x69\x63\x61\x74\x65\x20\x61\x6C\x77\x61\x79\x73\x2C\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x20\x43\x61\x6D\x70\x61\x69\x67\x6E\x20","\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x6D\x65\x73\x73\x61\x67\x65","\x6C\x65\x6E\x67\x74\x68","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x43\x6D\x4C\x69\x73\x74","\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x43\x61\x6D\x70\x61\x69\x67\x6E","\x61\x6C\x77\x61\x79\x73","\x6F\x6E\x6C\x79\x49\x66\x4F\x70\x65\x6E","\x64\x69\x61\x6C\x43\x68\x65\x63\x6B\x44\x75\x70\x6C\x69\x63\x61\x74\x65\x54\x79\x70\x65","\x4C\x69\x73\x74\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x4C\x69\x73\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x5B\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79\x5D\x5B\x45\x72\x72\x6F\x72\x5D","\x5B\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79\x5D\x5B\x53\x75\x63\x63\x65\x73\x66\x75\x6C\x6C\x5D","\x69\x6E\x66\x6F","\x69\x73\x45\x6D\x70\x74\x79","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x64\x65\x73\x74\x72\x6F\x79","\x70\x75\x73\x68","\x61\x6C\x6C","\x64\x65\x66\x69\x6E\x65"];_0xc073[0];var _=require(_0xc073[1]);var util=require(_0xc073[2]);var logger=require(_0xc073[4])(_0xc073[3]);var moment=require(_0xc073[5]);var BPromise=require(_0xc073[6]);var rp=require(_0xc073[7]);var attributes=require(_0xc073[8]);module[_0xc073[9]]= function(_0x4b78x8,_0x4b78x9){return _0x4b78x8[_0xc073[66]](_0xc073[10],attributes,{tableName:_0xc073[11],paranoid:true,indexes:[{"\x6E\x61\x6D\x65":_0xc073[12],"\x66\x69\x65\x6C\x64\x73":[_0xc073[12]]}],timestamps:true,hooks:{afterCreate:function(_0x4b78xa,_0x4b78xb,_0x4b78xc){var _0x4b78xd=_0x4b78x8[_0xc073[13]];var _0x4b78xe=_0x4b78xa[_0xc073[14]]({plain:true});function _0x4b78xf(){return function(_0x4b78x10){logger[_0xc073[18]](_0xc073[15],_0xc073[16],util[_0xc073[17]](_0x4b78x10,{showHidden:false,depth:null}))}}var _0x4b78x11=function(_0x4b78x12){return  new BPromise(function(_0x4b78x13,_0x4b78x14){_0x4b78xd[_0xc073[31]][_0xc073[33]]({where:{phone:_0x4b78xe[_0xc073[12]],VoiceQueueId:_0x4b78x12[_0xc073[23]]}})[_0xc073[32]](function(_0x4b78x15){if(!_[_0xc073[20]](_0x4b78x15)){throw  new Error(_0xc073[21]+ _0x4b78xe[_0xc073[12]]+ _0xc073[22]+ _0x4b78x12[_0xc073[23]])};return _0x4b78xd[_0xc073[31]][_0xc073[30]]({phone:_0x4b78xe[_0xc073[12]],ContactId:_0x4b78xe[_0xc073[23]],ListId:_0x4b78xe[_0xc073[24]],priority:_0x4b78xe[_0xc073[25]]?_0x4b78xe[_0xc073[25]]:2,scheduledat:_0x4b78xe[_0xc073[26]]?_0x4b78xe[_0xc073[26]]:moment()[_0xc073[28]](_0xc073[27]),callback:_0x4b78xe[_0xc073[29]]?true:false,callbackuniqueid:_0x4b78xe[_0xc073[29]]?_0x4b78xe[_0xc073[29]]:undefined,callbackat:_0x4b78xe[_0xc073[29]]?moment()[_0xc073[28]](_0xc073[27]):undefined,VoiceQueueId:_0x4b78x12[_0xc073[23]]})})[_0xc073[19]](function(_0x4b78x10){_0x4b78x14(_0x4b78x10)})})};var _0x4b78x16=function(_0x4b78x12){return  new BPromise(function(_0x4b78x13,_0x4b78x14){_0x4b78xd[_0xc073[31]][_0xc073[33]]({where:{phone:_0x4b78xe[_0xc073[12]],VoiceQueueId:_0x4b78x12[_0xc073[23]]}})[_0xc073[32]](function(_0x4b78x15){if(!_[_0xc073[20]](_0x4b78x15)){throw  new Error(_0xc073[21]+ _0x4b78xe[_0xc073[12]]+ _0xc073[36]+ _0x4b78x12[_0xc073[23]])};return _0x4b78xd[_0xc073[37]][_0xc073[33]]({where:{calleridnum:_0x4b78xe[_0xc073[12]],VoiceQueueId:_0x4b78x12[_0xc073[23]]}})})[_0xc073[32]](function(_0x4b78x15){if(!_[_0xc073[20]](_0x4b78x15)){throw  new Error(_0xc073[34]+ _0x4b78xe[_0xc073[12]]+ _0xc073[35]+ _0x4b78x12[_0xc073[23]])};return _0x4b78xd[_0xc073[31]][_0xc073[30]]({phone:_0x4b78xe[_0xc073[12]],ContactId:_0x4b78xe[_0xc073[23]],ListId:_0x4b78xe[_0xc073[24]],priority:_0x4b78xe[_0xc073[25]]?_0x4b78xe[_0xc073[25]]:2,scheduledat:_0x4b78xe[_0xc073[26]]?_0x4b78xe[_0xc073[26]]:moment()[_0xc073[28]](_0xc073[27]),callback:_0x4b78xe[_0xc073[29]]?true:false,callbackuniqueid:_0x4b78xe[_0xc073[29]]?_0x4b78xe[_0xc073[29]]:undefined,callbackat:_0x4b78xe[_0xc073[29]]?moment()[_0xc073[28]](_0xc073[27]):undefined,VoiceQueueId:_0x4b78x12[_0xc073[23]]})})[_0xc073[19]](function(_0x4b78x10){_0x4b78x14(_0x4b78x10)})})};function _0x4b78x17(){return function(_0x4b78x10){logger[_0xc073[18]](_0xc073[15],_0xc073[16],util[_0xc073[17]](_0x4b78x10,{showHidden:false,depth:null}))}}var _0x4b78x18=function(_0x4b78x12){return  new BPromise(function(_0x4b78x13,_0x4b78x14){_0x4b78xd[_0xc073[31]][_0xc073[33]]({where:{phone:_0x4b78xe[_0xc073[12]],CampaignId:_0x4b78x12[_0xc073[23]]}})[_0xc073[32]](function(_0x4b78x15){if(!_[_0xc073[20]](_0x4b78x15)){throw  new Error(_0xc073[21]+ _0x4b78xe[_0xc073[12]]+ _0xc073[38]+ _0x4b78x12[_0xc073[23]])};return _0x4b78xd[_0xc073[31]][_0xc073[30]]({phone:_0x4b78xe[_0xc073[12]],ContactId:_0x4b78xe[_0xc073[23]],ListId:_0x4b78xe[_0xc073[24]],priority:_0x4b78xe[_0xc073[25]]?_0x4b78xe[_0xc073[25]]:2,scheduledat:_0x4b78xe[_0xc073[26]]?_0x4b78xe[_0xc073[26]]:moment()[_0xc073[28]](_0xc073[27]),callback:_0x4b78xe[_0xc073[29]]?true:false,callbackuniqueid:_0x4b78xe[_0xc073[29]]?_0x4b78xe[_0xc073[29]]:undefined,callbackat:_0x4b78xe[_0xc073[29]]?moment()[_0xc073[28]](_0xc073[27]):undefined,CampaignId:_0x4b78x12[_0xc073[23]]})})[_0xc073[19]](function(_0x4b78x10){_0x4b78x14(_0x4b78x10)})})};var _0x4b78x19=function(_0x4b78x12){return  new BPromise(function(_0x4b78x13,_0x4b78x14){_0x4b78xd[_0xc073[31]][_0xc073[33]]({where:{phone:_0x4b78xe[_0xc073[12]],CampaignId:_0x4b78x12[_0xc073[23]]}})[_0xc073[32]](function(_0x4b78x15){if(!_[_0xc073[20]](_0x4b78x15)){throw  new Error(_0xc073[21]+ _0x4b78xe[_0xc073[12]]+ _0xc073[40]+ _0x4b78x12[_0xc073[23]])};return _0x4b78xd[_0xc073[37]][_0xc073[33]]({where:{calleridnum:_0x4b78xe[_0xc073[12]],CampaignId:_0x4b78x12[_0xc073[23]]}})})[_0xc073[32]](function(_0x4b78x15){if(!_[_0xc073[20]](_0x4b78x15)){throw  new Error(_0xc073[34]+ _0x4b78xe[_0xc073[12]]+ _0xc073[39]+ _0x4b78x12[_0xc073[23]])};return _0x4b78xd[_0xc073[31]][_0xc073[30]]({phone:_0x4b78xe[_0xc073[12]],ContactId:_0x4b78xe[_0xc073[23]],ListId:_0x4b78xe[_0xc073[24]],priority:_0x4b78xe[_0xc073[25]]?_0x4b78xe[_0xc073[25]]:2,scheduledat:_0x4b78xe[_0xc073[26]]?_0x4b78xe[_0xc073[26]]:moment()[_0xc073[28]](_0xc073[27]),callback:_0x4b78xe[_0xc073[29]]?true:false,callbackuniqueid:_0x4b78xe[_0xc073[29]]?_0x4b78xe[_0xc073[29]]:undefined,callbackat:_0x4b78xe[_0xc073[29]]?moment()[_0xc073[28]](_0xc073[27]):undefined,CampaignId:_0x4b78x12[_0xc073[23]]})})[_0xc073[19]](function(_0x4b78x10){_0x4b78x14(_0x4b78x10)})})};if(_0x4b78xe[_0xc073[24]]){_0x4b78xd[_0xc073[54]][_0xc073[47]]({where:{type:_0xc073[53]},attributes:[_0xc073[23],_0xc073[51]],include:[{model:_0x4b78xd[_0xc073[45]],as:_0xc073[52],where:{id:_0x4b78xe[_0xc073[24]]}}]})[_0xc073[32]](function(_0x4b78x1a){if(_0x4b78x1a){var _0x4b78x1b=[];for(var _0x4b78x1c=0,_0x4b78x12;_0x4b78x1c< _0x4b78x1a[_0xc073[43]];_0x4b78x1c+= 1){_0x4b78x12= _0x4b78x1a[_0x4b78x1c][_0xc073[14]]({plain:true});switch(_0x4b78x12[_0xc073[51]]){case _0xc073[49]:_0x4b78x16(_0x4b78x12)[_0xc073[19]](_0x4b78xf());break;case _0xc073[50]:_0x4b78x11(_0x4b78x12)[_0xc073[19]](_0x4b78xf());break;default:_0x4b78xd[_0xc073[31]][_0xc073[30]]({phone:_0x4b78xe[_0xc073[12]],ContactId:_0x4b78xe[_0xc073[23]],ListId:_0x4b78xe[_0xc073[24]],scheduledat:_0x4b78xe[_0xc073[26]]?_0x4b78xe[_0xc073[26]]:moment()[_0xc073[28]](_0xc073[27]),priority:_0x4b78xe[_0xc073[25]]?_0x4b78xe[_0xc073[25]]:2,callback:_0x4b78xe[_0xc073[29]]?true:false,callbackuniqueid:_0x4b78xe[_0xc073[29]]?_0x4b78xe[_0xc073[29]]:undefined,callbackat:_0x4b78xe[_0xc073[29]]?moment()[_0xc073[28]](_0xc073[27]):undefined,VoiceQueueId:_0x4b78x12[_0xc073[23]]})[_0xc073[19]](_0x4b78xf())}}}})[_0xc073[32]](function(){return _0x4b78xd[_0xc073[54]][_0xc073[47]]({where:{type:_0xc073[53]},attributes:[_0xc073[23]],include:[{model:_0x4b78xd[_0xc073[45]],as:_0xc073[46],where:{id:_0x4b78xe[_0xc073[24]]}}]})[_0xc073[32]](function(_0x4b78x1a){if(_0x4b78x1a){var _0x4b78x1b=[];for(var _0x4b78x1c=0,_0x4b78x12;_0x4b78x1c< _0x4b78x1a[_0xc073[43]];_0x4b78x1c+= 1){_0x4b78x12= _0x4b78x1a[_0x4b78x1c][_0xc073[14]]({plain:true});_0x4b78xd[_0xc073[44]][_0xc073[30]]({phone:_0x4b78xe[_0xc073[12]],ContactId:_0x4b78xe[_0xc073[23]],ListId:_0x4b78xe[_0xc073[24]],VoiceQueueId:_0x4b78x12[_0xc073[23]]})[_0xc073[19]](function(_0x4b78x10){logger[_0xc073[18]](_0xc073[41],_0xc073[16],_0x4b78x10[_0xc073[42]])})}}})})[_0xc073[32]](function(){return _0x4b78xd[_0xc073[48]][_0xc073[47]]({attributes:[_0xc073[23],_0xc073[51]],include:[{model:_0x4b78xd[_0xc073[45]],as:_0xc073[52],where:{id:_0x4b78xe[_0xc073[24]]}}]})[_0xc073[32]](function(_0x4b78x1a){if(_0x4b78x1a){var _0x4b78x1b=[];for(var _0x4b78x1c=0,_0x4b78x12;_0x4b78x1c< _0x4b78x1a[_0xc073[43]];_0x4b78x1c+= 1){_0x4b78x12= _0x4b78x1a[_0x4b78x1c][_0xc073[14]]({plain:true});switch(_0x4b78x12[_0xc073[51]]){case _0xc073[49]:_0x4b78x19(_0x4b78x12)[_0xc073[19]](_0x4b78x17());break;case _0xc073[50]:_0x4b78x18(_0x4b78x12)[_0xc073[19]](_0x4b78x17());break;default:_0x4b78xd[_0xc073[31]][_0xc073[30]]({phone:_0x4b78xe[_0xc073[12]],ContactId:_0x4b78xe[_0xc073[23]],ListId:_0x4b78xe[_0xc073[24]],scheduledat:_0x4b78xe[_0xc073[26]]?_0x4b78xe[_0xc073[26]]:moment()[_0xc073[28]](_0xc073[27]),priority:_0x4b78xe[_0xc073[25]]?_0x4b78xe[_0xc073[25]]:2,callback:_0x4b78xe[_0xc073[29]]?true:false,callbackuniqueid:_0x4b78xe[_0xc073[29]]?_0x4b78xe[_0xc073[29]]:undefined,callbackat:_0x4b78xe[_0xc073[29]]?moment()[_0xc073[28]](_0xc073[27]):undefined,CampaignId:_0x4b78x12[_0xc073[23]]})[_0xc073[19]](_0x4b78x17())}}}})})[_0xc073[32]](function(){return _0x4b78xd[_0xc073[48]][_0xc073[47]]({attributes:[_0xc073[23]],include:[{model:_0x4b78xd[_0xc073[45]],as:_0xc073[46],where:{id:_0x4b78xe[_0xc073[24]]}}]})[_0xc073[32]](function(_0x4b78x1a){if(_0x4b78x1a){var _0x4b78x1b=[];for(var _0x4b78x1c=0,_0x4b78x12;_0x4b78x1c< _0x4b78x1a[_0xc073[43]];_0x4b78x1c+= 1){_0x4b78x12= _0x4b78x1a[_0x4b78x1c][_0xc073[14]]({plain:true});_0x4b78xd[_0xc073[44]][_0xc073[30]]({phone:_0x4b78xe[_0xc073[12]],ContactId:_0x4b78xe[_0xc073[23]],ListId:_0x4b78xe[_0xc073[24]],CampaignId:_0x4b78x12[_0xc073[23]]})[_0xc073[19]](function(_0x4b78x10){logger[_0xc073[18]](_0xc073[41],_0xc073[16],_0x4b78x10[_0xc073[42]])})}}})})[_0xc073[32]](function(){_0x4b78xc()})[_0xc073[19]](function(_0x4b78x10){logger[_0xc073[18]](_0xc073[41],_0xc073[16],_0x4b78x10[_0xc073[42]]);_0x4b78xc(_0x4b78x10)})}else {_0x4b78xc( new Error(_0xc073[55]))}},afterDestroy:function(_0x4b78xa,_0x4b78xb,_0x4b78xc){var _0x4b78xd=_0x4b78x8[_0xc073[13]];var _0x4b78xe=_0x4b78xa[_0xc073[14]]({plain:true});return _0x4b78xd[_0xc073[31]][_0xc073[47]]({raw:true,where:{ListId:_0x4b78xe[_0xc073[24]],ContactId:_0x4b78xe[_0xc073[23]]}})[_0xc073[32]](function(_0x4b78x15){if(!_[_0xc073[59]](_0x4b78x15)){var _0x4b78x1b=[];for(var _0x4b78x1c=0;_0x4b78x1c< _0x4b78x15[_0xc073[43]];_0x4b78x1c+= 1){var _0x4b78x1d=_0x4b78xd[_0xc073[31]][_0xc073[63]]({where:{ListId:_0x4b78x15[_0x4b78x1c][_0xc073[24]],ContactId:_0x4b78x15[_0x4b78x1c][_0xc073[60]],VoiceQueueId:_0x4b78x15[_0x4b78x1c][_0xc073[61]],CampaignId:_0x4b78x15[_0x4b78x1c][_0xc073[62]]}});_0x4b78x1b[_0xc073[64]](_0x4b78x1d)};return BPromise[_0xc073[65]](_0x4b78x1b)}})[_0xc073[32]](function(_0x4b78x15){logger[_0xc073[58]](_0xc073[57],util[_0xc073[17]](_0x4b78x15,{showHidden:false,depth:null}));_0x4b78xc()})[_0xc073[19]](function(_0x4b78x10){logger[_0xc073[18]](_0xc073[56],util[_0xc073[17]](_0x4b78x10,{showHidden:false,depth:null}));_0x4b78xc(_0x4b78x10)})}}})}
\ No newline at end of file
+var _0x9eed=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x70\x68\x6F\x6E\x65","\x6D\x6F\x64\x65\x6C\x73","\x67\x65\x74","\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x73\x4E\x69\x6C","\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2C\x20\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65\x20","\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x69\x6E\x73\x65\x72\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x2C\x20\x63\x68\x65\x63\x6B\x20\x64\x75\x70\x6C\x69\x63\x61\x74\x65\x20\x6F\x6E\x6C\x79\x49\x66\x4F\x70\x65\x6E\x2C\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x20\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x20","\x69\x64","\x4C\x69\x73\x74\x49\x64","\x70\x72\x69\x6F\x72\x69\x74\x79","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x55\x6E\x69\x71\x75\x65\x69\x64","\x63\x72\x65\x61\x74\x65","\x43\x6D\x48\x6F\x70\x70\x65\x72","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x4F\x6E\x65","\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2C\x20\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65\x2C\x20","\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x69\x6E\x73\x65\x72\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x2C\x20\x63\x68\x65\x63\x6B\x20\x64\x75\x70\x6C\x69\x63\x61\x74\x65\x20\x61\x6C\x77\x61\x79\x73\x2C\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x20\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x20","\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x69\x6E\x73\x65\x72\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x2C\x20\x63\x68\x65\x63\x6B\x20\x64\x75\x70\x6C\x69\x63\x61\x74\x65\x20\x61\x6C\x77\x61\x79\x73\x2C\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x20\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x20","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x69\x6E\x73\x65\x72\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x2C\x20\x63\x68\x65\x63\x6B\x20\x64\x75\x70\x6C\x69\x63\x61\x74\x65\x20\x6F\x6E\x6C\x79\x49\x66\x4F\x70\x65\x6E\x2C\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x20\x43\x61\x6D\x70\x61\x69\x67\x6E\x20","\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x69\x6E\x73\x65\x72\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x2C\x20\x63\x68\x65\x63\x6B\x20\x64\x75\x70\x6C\x69\x63\x61\x74\x65\x20\x61\x6C\x77\x61\x79\x73\x2C\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x20\x43\x61\x6D\x70\x61\x69\x67\x6E\x20","\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x69\x6E\x73\x65\x72\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x2C\x20\x63\x68\x65\x63\x6B\x20\x64\x75\x70\x6C\x69\x63\x61\x74\x65\x20\x61\x6C\x77\x61\x79\x73\x2C\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x68\x6F\x70\x70\x65\x72\x20\x43\x61\x6D\x70\x61\x69\x67\x6E\x20","\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x6D\x65\x73\x73\x61\x67\x65","\x6C\x65\x6E\x67\x74\x68","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x43\x6D\x4C\x69\x73\x74","\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x43\x61\x6D\x70\x61\x69\x67\x6E","\x61\x6C\x77\x61\x79\x73","\x6F\x6E\x6C\x79\x49\x66\x4F\x70\x65\x6E","\x64\x69\x61\x6C\x43\x68\x65\x63\x6B\x44\x75\x70\x6C\x69\x63\x61\x74\x65\x54\x79\x70\x65","\x4C\x69\x73\x74\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x4C\x69\x73\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x5B\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79\x5D\x5B\x45\x72\x72\x6F\x72\x5D","\x5B\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79\x5D\x5B\x53\x75\x63\x63\x65\x73\x66\x75\x6C\x6C\x5D","\x69\x6E\x66\x6F","\x69\x73\x45\x6D\x70\x74\x79","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x64\x65\x73\x74\x72\x6F\x79","\x70\x75\x73\x68","\x61\x6C\x6C","\x64\x65\x66\x69\x6E\x65"];_0x9eed[0];var _=require(_0x9eed[1]);var util=require(_0x9eed[2]);var logger=require(_0x9eed[4])(_0x9eed[3]);var moment=require(_0x9eed[5]);var BPromise=require(_0x9eed[6]);var rp=require(_0x9eed[7]);var attributes=require(_0x9eed[8]);module[_0x9eed[9]]= function(_0xb557x8,_0xb557x9){return _0xb557x8[_0x9eed[66]](_0x9eed[10],attributes,{tableName:_0x9eed[11],paranoid:true,indexes:[{"\x6E\x61\x6D\x65":_0x9eed[12],"\x66\x69\x65\x6C\x64\x73":[_0x9eed[12]]}],timestamps:true,hooks:{afterCreate:function(_0xb557xa,_0xb557xb,_0xb557xc){var _0xb557xd=_0xb557x8[_0x9eed[13]];var _0xb557xe=_0xb557xa[_0x9eed[14]]({plain:true});function _0xb557xf(){return function(_0xb557x10){logger[_0x9eed[18]](_0x9eed[15],_0x9eed[16],util[_0x9eed[17]](_0xb557x10,{showHidden:false,depth:null}))}}var _0xb557x11=function(_0xb557x12){return  new BPromise(function(_0xb557x13,_0xb557x14){_0xb557xd[_0x9eed[31]][_0x9eed[33]]({where:{phone:_0xb557xe[_0x9eed[12]],VoiceQueueId:_0xb557x12[_0x9eed[23]]}})[_0x9eed[32]](function(_0xb557x15){if(!_[_0x9eed[20]](_0xb557x15)){throw  new Error(_0x9eed[21]+ _0xb557xe[_0x9eed[12]]+ _0x9eed[22]+ _0xb557x12[_0x9eed[23]])};return _0xb557xd[_0x9eed[31]][_0x9eed[30]]({phone:_0xb557xe[_0x9eed[12]],ContactId:_0xb557xe[_0x9eed[23]],ListId:_0xb557xe[_0x9eed[24]],priority:_0xb557xe[_0x9eed[25]]?_0xb557xe[_0x9eed[25]]:2,scheduledat:_0xb557xe[_0x9eed[26]]?_0xb557xe[_0x9eed[26]]:moment()[_0x9eed[28]](_0x9eed[27]),callback:_0xb557xe[_0x9eed[29]]?true:false,callbackuniqueid:_0xb557xe[_0x9eed[29]]?_0xb557xe[_0x9eed[29]]:undefined,callbackat:_0xb557xe[_0x9eed[29]]?moment()[_0x9eed[28]](_0x9eed[27]):undefined,VoiceQueueId:_0xb557x12[_0x9eed[23]]})})[_0x9eed[19]](function(_0xb557x10){_0xb557x14(_0xb557x10)})})};var _0xb557x16=function(_0xb557x12){return  new BPromise(function(_0xb557x13,_0xb557x14){_0xb557xd[_0x9eed[31]][_0x9eed[33]]({where:{phone:_0xb557xe[_0x9eed[12]],VoiceQueueId:_0xb557x12[_0x9eed[23]]}})[_0x9eed[32]](function(_0xb557x15){if(!_[_0x9eed[20]](_0xb557x15)){throw  new Error(_0x9eed[21]+ _0xb557xe[_0x9eed[12]]+ _0x9eed[36]+ _0xb557x12[_0x9eed[23]])};return _0xb557xd[_0x9eed[37]][_0x9eed[33]]({where:{calleridnum:_0xb557xe[_0x9eed[12]],VoiceQueueId:_0xb557x12[_0x9eed[23]]}})})[_0x9eed[32]](function(_0xb557x15){if(!_[_0x9eed[20]](_0xb557x15)){throw  new Error(_0x9eed[34]+ _0xb557xe[_0x9eed[12]]+ _0x9eed[35]+ _0xb557x12[_0x9eed[23]])};return _0xb557xd[_0x9eed[31]][_0x9eed[30]]({phone:_0xb557xe[_0x9eed[12]],ContactId:_0xb557xe[_0x9eed[23]],ListId:_0xb557xe[_0x9eed[24]],priority:_0xb557xe[_0x9eed[25]]?_0xb557xe[_0x9eed[25]]:2,scheduledat:_0xb557xe[_0x9eed[26]]?_0xb557xe[_0x9eed[26]]:moment()[_0x9eed[28]](_0x9eed[27]),callback:_0xb557xe[_0x9eed[29]]?true:false,callbackuniqueid:_0xb557xe[_0x9eed[29]]?_0xb557xe[_0x9eed[29]]:undefined,callbackat:_0xb557xe[_0x9eed[29]]?moment()[_0x9eed[28]](_0x9eed[27]):undefined,VoiceQueueId:_0xb557x12[_0x9eed[23]]})})[_0x9eed[19]](function(_0xb557x10){_0xb557x14(_0xb557x10)})})};function _0xb557x17(){return function(_0xb557x10){logger[_0x9eed[18]](_0x9eed[15],_0x9eed[16],util[_0x9eed[17]](_0xb557x10,{showHidden:false,depth:null}))}}var _0xb557x18=function(_0xb557x12){return  new BPromise(function(_0xb557x13,_0xb557x14){_0xb557xd[_0x9eed[31]][_0x9eed[33]]({where:{phone:_0xb557xe[_0x9eed[12]],CampaignId:_0xb557x12[_0x9eed[23]]}})[_0x9eed[32]](function(_0xb557x15){if(!_[_0x9eed[20]](_0xb557x15)){throw  new Error(_0x9eed[21]+ _0xb557xe[_0x9eed[12]]+ _0x9eed[38]+ _0xb557x12[_0x9eed[23]])};return _0xb557xd[_0x9eed[31]][_0x9eed[30]]({phone:_0xb557xe[_0x9eed[12]],ContactId:_0xb557xe[_0x9eed[23]],ListId:_0xb557xe[_0x9eed[24]],priority:_0xb557xe[_0x9eed[25]]?_0xb557xe[_0x9eed[25]]:2,scheduledat:_0xb557xe[_0x9eed[26]]?_0xb557xe[_0x9eed[26]]:moment()[_0x9eed[28]](_0x9eed[27]),callback:_0xb557xe[_0x9eed[29]]?true:false,callbackuniqueid:_0xb557xe[_0x9eed[29]]?_0xb557xe[_0x9eed[29]]:undefined,callbackat:_0xb557xe[_0x9eed[29]]?moment()[_0x9eed[28]](_0x9eed[27]):undefined,CampaignId:_0xb557x12[_0x9eed[23]]})})[_0x9eed[19]](function(_0xb557x10){_0xb557x14(_0xb557x10)})})};var _0xb557x19=function(_0xb557x12){return  new BPromise(function(_0xb557x13,_0xb557x14){_0xb557xd[_0x9eed[31]][_0x9eed[33]]({where:{phone:_0xb557xe[_0x9eed[12]],CampaignId:_0xb557x12[_0x9eed[23]]}})[_0x9eed[32]](function(_0xb557x15){if(!_[_0x9eed[20]](_0xb557x15)){throw  new Error(_0x9eed[21]+ _0xb557xe[_0x9eed[12]]+ _0x9eed[40]+ _0xb557x12[_0x9eed[23]])};return _0xb557xd[_0x9eed[37]][_0x9eed[33]]({where:{calleridnum:_0xb557xe[_0x9eed[12]],CampaignId:_0xb557x12[_0x9eed[23]]}})})[_0x9eed[32]](function(_0xb557x15){if(!_[_0x9eed[20]](_0xb557x15)){throw  new Error(_0x9eed[34]+ _0xb557xe[_0x9eed[12]]+ _0x9eed[39]+ _0xb557x12[_0x9eed[23]])};return _0xb557xd[_0x9eed[31]][_0x9eed[30]]({phone:_0xb557xe[_0x9eed[12]],ContactId:_0xb557xe[_0x9eed[23]],ListId:_0xb557xe[_0x9eed[24]],priority:_0xb557xe[_0x9eed[25]]?_0xb557xe[_0x9eed[25]]:2,scheduledat:_0xb557xe[_0x9eed[26]]?_0xb557xe[_0x9eed[26]]:moment()[_0x9eed[28]](_0x9eed[27]),callback:_0xb557xe[_0x9eed[29]]?true:false,callbackuniqueid:_0xb557xe[_0x9eed[29]]?_0xb557xe[_0x9eed[29]]:undefined,callbackat:_0xb557xe[_0x9eed[29]]?moment()[_0x9eed[28]](_0x9eed[27]):undefined,CampaignId:_0xb557x12[_0x9eed[23]]})})[_0x9eed[19]](function(_0xb557x10){_0xb557x14(_0xb557x10)})})};if(_0xb557xe[_0x9eed[24]]){_0xb557xd[_0x9eed[54]][_0x9eed[47]]({where:{type:_0x9eed[53]},attributes:[_0x9eed[23],_0x9eed[51]],include:[{model:_0xb557xd[_0x9eed[45]],as:_0x9eed[52],where:{id:_0xb557xe[_0x9eed[24]]}}]})[_0x9eed[32]](function(_0xb557x1a){if(_0xb557x1a){var _0xb557x1b=[];for(var _0xb557x1c=0,_0xb557x12;_0xb557x1c< _0xb557x1a[_0x9eed[43]];_0xb557x1c+= 1){_0xb557x12= _0xb557x1a[_0xb557x1c][_0x9eed[14]]({plain:true});switch(_0xb557x12[_0x9eed[51]]){case _0x9eed[49]:_0xb557x16(_0xb557x12)[_0x9eed[19]](_0xb557xf());break;case _0x9eed[50]:_0xb557x11(_0xb557x12)[_0x9eed[19]](_0xb557xf());break;default:_0xb557xd[_0x9eed[31]][_0x9eed[30]]({phone:_0xb557xe[_0x9eed[12]],ContactId:_0xb557xe[_0x9eed[23]],ListId:_0xb557xe[_0x9eed[24]],scheduledat:_0xb557xe[_0x9eed[26]]?_0xb557xe[_0x9eed[26]]:moment()[_0x9eed[28]](_0x9eed[27]),priority:_0xb557xe[_0x9eed[25]]?_0xb557xe[_0x9eed[25]]:2,callback:_0xb557xe[_0x9eed[29]]?true:false,callbackuniqueid:_0xb557xe[_0x9eed[29]]?_0xb557xe[_0x9eed[29]]:undefined,callbackat:_0xb557xe[_0x9eed[29]]?moment()[_0x9eed[28]](_0x9eed[27]):undefined,VoiceQueueId:_0xb557x12[_0x9eed[23]]})[_0x9eed[19]](_0xb557xf())}}}})[_0x9eed[32]](function(){return _0xb557xd[_0x9eed[54]][_0x9eed[47]]({where:{type:_0x9eed[53]},attributes:[_0x9eed[23]],include:[{model:_0xb557xd[_0x9eed[45]],as:_0x9eed[46],where:{id:_0xb557xe[_0x9eed[24]]}}]})[_0x9eed[32]](function(_0xb557x1a){if(_0xb557x1a){var _0xb557x1b=[];for(var _0xb557x1c=0,_0xb557x12;_0xb557x1c< _0xb557x1a[_0x9eed[43]];_0xb557x1c+= 1){_0xb557x12= _0xb557x1a[_0xb557x1c][_0x9eed[14]]({plain:true});_0xb557xd[_0x9eed[44]][_0x9eed[30]]({phone:_0xb557xe[_0x9eed[12]],ContactId:_0xb557xe[_0x9eed[23]],ListId:_0xb557xe[_0x9eed[24]],VoiceQueueId:_0xb557x12[_0x9eed[23]]})[_0x9eed[19]](function(_0xb557x10){logger[_0x9eed[18]](_0x9eed[41],_0x9eed[16],_0xb557x10[_0x9eed[42]])})}}})})[_0x9eed[32]](function(){return _0xb557xd[_0x9eed[48]][_0x9eed[47]]({attributes:[_0x9eed[23],_0x9eed[51]],include:[{model:_0xb557xd[_0x9eed[45]],as:_0x9eed[52],where:{id:_0xb557xe[_0x9eed[24]]}}]})[_0x9eed[32]](function(_0xb557x1a){if(_0xb557x1a){var _0xb557x1b=[];for(var _0xb557x1c=0,_0xb557x12;_0xb557x1c< _0xb557x1a[_0x9eed[43]];_0xb557x1c+= 1){_0xb557x12= _0xb557x1a[_0xb557x1c][_0x9eed[14]]({plain:true});switch(_0xb557x12[_0x9eed[51]]){case _0x9eed[49]:_0xb557x19(_0xb557x12)[_0x9eed[19]](_0xb557x17());break;case _0x9eed[50]:_0xb557x18(_0xb557x12)[_0x9eed[19]](_0xb557x17());break;default:_0xb557xd[_0x9eed[31]][_0x9eed[30]]({phone:_0xb557xe[_0x9eed[12]],ContactId:_0xb557xe[_0x9eed[23]],ListId:_0xb557xe[_0x9eed[24]],scheduledat:_0xb557xe[_0x9eed[26]]?_0xb557xe[_0x9eed[26]]:moment()[_0x9eed[28]](_0x9eed[27]),priority:_0xb557xe[_0x9eed[25]]?_0xb557xe[_0x9eed[25]]:2,callback:_0xb557xe[_0x9eed[29]]?true:false,callbackuniqueid:_0xb557xe[_0x9eed[29]]?_0xb557xe[_0x9eed[29]]:undefined,callbackat:_0xb557xe[_0x9eed[29]]?moment()[_0x9eed[28]](_0x9eed[27]):undefined,CampaignId:_0xb557x12[_0x9eed[23]]})[_0x9eed[19]](_0xb557x17())}}}})})[_0x9eed[32]](function(){return _0xb557xd[_0x9eed[48]][_0x9eed[47]]({attributes:[_0x9eed[23]],include:[{model:_0xb557xd[_0x9eed[45]],as:_0x9eed[46],where:{id:_0xb557xe[_0x9eed[24]]}}]})[_0x9eed[32]](function(_0xb557x1a){if(_0xb557x1a){var _0xb557x1b=[];for(var _0xb557x1c=0,_0xb557x12;_0xb557x1c< _0xb557x1a[_0x9eed[43]];_0xb557x1c+= 1){_0xb557x12= _0xb557x1a[_0xb557x1c][_0x9eed[14]]({plain:true});_0xb557xd[_0x9eed[44]][_0x9eed[30]]({phone:_0xb557xe[_0x9eed[12]],ContactId:_0xb557xe[_0x9eed[23]],ListId:_0xb557xe[_0x9eed[24]],CampaignId:_0xb557x12[_0x9eed[23]]})[_0x9eed[19]](function(_0xb557x10){logger[_0x9eed[18]](_0x9eed[41],_0x9eed[16],_0xb557x10[_0x9eed[42]])})}}})})[_0x9eed[32]](function(){_0xb557xc()})[_0x9eed[19]](function(_0xb557x10){logger[_0x9eed[18]](_0x9eed[41],_0x9eed[16],_0xb557x10[_0x9eed[42]]);_0xb557xc(_0xb557x10)})}else {_0xb557xc( new Error(_0x9eed[55]))}},afterDestroy:function(_0xb557xa,_0xb557xb,_0xb557xc){var _0xb557xd=_0xb557x8[_0x9eed[13]];var _0xb557xe=_0xb557xa[_0x9eed[14]]({plain:true});return _0xb557xd[_0x9eed[31]][_0x9eed[47]]({raw:true,where:{ListId:_0xb557xe[_0x9eed[24]],ContactId:_0xb557xe[_0x9eed[23]]}})[_0x9eed[32]](function(_0xb557x15){if(!_[_0x9eed[59]](_0xb557x15)){var _0xb557x1b=[];for(var _0xb557x1c=0;_0xb557x1c< _0xb557x15[_0x9eed[43]];_0xb557x1c+= 1){var _0xb557x1d=_0xb557xd[_0x9eed[31]][_0x9eed[63]]({where:{ListId:_0xb557x15[_0xb557x1c][_0x9eed[24]],ContactId:_0xb557x15[_0xb557x1c][_0x9eed[60]],VoiceQueueId:_0xb557x15[_0xb557x1c][_0x9eed[61]],CampaignId:_0xb557x15[_0xb557x1c][_0x9eed[62]]}});_0xb557x1b[_0x9eed[64]](_0xb557x1d)};return BPromise[_0x9eed[65]](_0xb557x1b)}})[_0x9eed[32]](function(_0xb557x15){logger[_0x9eed[58]](_0x9eed[57],util[_0x9eed[17]](_0xb557x15,{showHidden:false,depth:null}));_0xb557xc()})[_0x9eed[19]](function(_0xb557x10){logger[_0x9eed[18]](_0x9eed[56],util[_0x9eed[17]](_0xb557x10,{showHidden:false,depth:null}));_0xb557xc(_0xb557x10)})}}})}
\ No newline at end of file
index 4aa084a..858be2e 100644 (file)
@@ -1 +1 @@
-var _0x6bbc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x53\x68\x6F\x77\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x72\x65\x61\x74\x65\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65"];_0x6bbc[0];var _=require(_0x6bbc[1]);var util=require(_0x6bbc[2]);var moment=require(_0x6bbc[3]);var BPromise=require(_0x6bbc[4]);var rs=require(_0x6bbc[5]);var fs=require(_0x6bbc[6]);var db=require(_0x6bbc[8])[_0x6bbc[7]];var utils=require(_0x6bbc[9]);var logger=require(_0x6bbc[11])(_0x6bbc[10]);var config=require(_0x6bbc[12]);var jayson=require(_0x6bbc[13]);var client=jayson[_0x6bbc[15]][_0x6bbc[14]]({port:9002});var socket=require(_0x6bbc[17])({host:_0x6bbc[16],port:6379});require(_0x6bbc[19])[_0x6bbc[18]](socket);function respondWithRpcPromise(_0xff49xf,_0xff49x10,_0xff49x11){return  new BPromise(function(_0xff49x12,_0xff49x13){return client[_0x6bbc[32]](_0xff49xf,_0xff49x11)[_0x6bbc[31]](function(_0xff49x15){logger[_0x6bbc[24]](_0x6bbc[20],_0xff49x10,_0x6bbc[23]);logger[_0x6bbc[27]](_0x6bbc[25],_0xff49x10,_0x6bbc[23],JSON[_0x6bbc[26]](_0xff49x15));if(_0xff49x15[_0x6bbc[21]]){if(_0xff49x15[_0x6bbc[21]][_0x6bbc[28]]=== 500){logger[_0x6bbc[21]](_0x6bbc[20],_0xff49x10,_0xff49x15[_0x6bbc[21]][_0x6bbc[29]]);return _0xff49x13(_0xff49x15[_0x6bbc[21]][_0x6bbc[29]])};logger[_0x6bbc[21]](_0x6bbc[20],_0xff49x10,_0xff49x15[_0x6bbc[21]][_0x6bbc[29]]);return _0xff49x12(_0xff49x15[_0x6bbc[21]][_0x6bbc[29]])}else {logger[_0x6bbc[24]](_0x6bbc[20],_0xff49x10,_0x6bbc[23]);_0xff49x12(_0xff49x15[_0x6bbc[30]][_0x6bbc[29]])}})[_0x6bbc[22]](function(_0xff49x14){logger[_0x6bbc[21]](_0x6bbc[20],_0xff49x10,_0xff49x14);_0xff49x13(_0xff49x14)})})}exports[_0x6bbc[33]]= function(_0xff49x11){var _0xff49x16=this;return  new Promise(function(_0xff49x12,_0xff49x13){return db[_0x6bbc[43]][_0x6bbc[42]]({raw:_0xff49x11[_0x6bbc[34]]?(_0xff49x11[_0x6bbc[34]][_0x6bbc[35]]=== undefined)?true:false:true,where:_0xff49x11[_0x6bbc[34]]?_0xff49x11[_0x6bbc[34]][_0x6bbc[36]]|| null:null,attributes:_0xff49x11[_0x6bbc[34]]?_0xff49x11[_0x6bbc[34]][_0x6bbc[37]]|| null:null,include:_0xff49x11[_0x6bbc[34]]?(_0xff49x11[_0x6bbc[34]][_0x6bbc[38]]?_[_0x6bbc[41]](_0xff49x11[_0x6bbc[34]][_0x6bbc[38]],function(_0xff49x17){return {model:db[_0xff49x17[_0x6bbc[39]]],as:_0xff49x17[_0x6bbc[40]],attributes:_0xff49x17[_0x6bbc[37]],include:_0xff49x17[_0x6bbc[38]]?_[_0x6bbc[41]](_0xff49x17[_0x6bbc[38]],function(_0xff49x18){return {model:db[_0xff49x18[_0x6bbc[39]]],as:_0xff49x18[_0x6bbc[40]],attributes:_0xff49x18[_0x6bbc[37]],include:_0xff49x18[_0x6bbc[38]]?_[_0x6bbc[41]](_0xff49x18[_0x6bbc[38]],function(_0xff49x19){return {model:db[_0xff49x19[_0x6bbc[39]]],as:_0xff49x19[_0x6bbc[40]],attributes:_0xff49x19[_0x6bbc[37]]}}):[]}}):[]}}):[]):[]})[_0x6bbc[31]](function(_0xff49x15){logger[_0x6bbc[24]](_0x6bbc[33],_0xff49x11);logger[_0x6bbc[27]](_0x6bbc[33],_0xff49x11,JSON[_0x6bbc[26]](_0xff49x15));_0xff49x12(_0xff49x15)})[_0x6bbc[22]](function(_0xff49x14){logger[_0x6bbc[21]](_0x6bbc[33],_0xff49x14[_0x6bbc[29]],_0xff49x11);_0xff49x13(_0xff49x16[_0x6bbc[21]](500,_0xff49x14[_0x6bbc[29]]))})})};exports[_0x6bbc[44]]= function(_0xff49x11){var _0xff49x16=this;return  new Promise(function(_0xff49x12,_0xff49x13){return db[_0x6bbc[43]][_0x6bbc[46]](_0xff49x11[_0x6bbc[45]],{raw:_0xff49x11[_0x6bbc[34]]?(_0xff49x11[_0x6bbc[34]][_0x6bbc[35]]=== undefined)?true:false:true})[_0x6bbc[31]](function(_0xff49x15){logger[_0x6bbc[24]](_0x6bbc[44],_0xff49x11);logger[_0x6bbc[27]](_0x6bbc[44],_0xff49x11,JSON[_0x6bbc[26]](_0xff49x15));_0xff49x12(_0xff49x15)})[_0x6bbc[22]](function(_0xff49x14){logger[_0x6bbc[21]](_0x6bbc[44],_0xff49x14[_0x6bbc[29]],_0xff49x11);_0xff49x13(_0xff49x16[_0x6bbc[21]](500,_0xff49x14[_0x6bbc[29]]))})})}
\ No newline at end of file
+var _0x9547=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x53\x68\x6F\x77\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x72\x65\x61\x74\x65\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65"];_0x9547[0];var _=require(_0x9547[1]);var util=require(_0x9547[2]);var moment=require(_0x9547[3]);var BPromise=require(_0x9547[4]);var rs=require(_0x9547[5]);var fs=require(_0x9547[6]);var db=require(_0x9547[8])[_0x9547[7]];var utils=require(_0x9547[9]);var logger=require(_0x9547[11])(_0x9547[10]);var config=require(_0x9547[12]);var jayson=require(_0x9547[13]);var client=jayson[_0x9547[15]][_0x9547[14]]({port:9002});var socket=require(_0x9547[17])({host:_0x9547[16],port:6379});require(_0x9547[19])[_0x9547[18]](socket);function respondWithRpcPromise(_0x269axf,_0x269ax10,_0x269ax11){return  new BPromise(function(_0x269ax12,_0x269ax13){return client[_0x9547[32]](_0x269axf,_0x269ax11)[_0x9547[31]](function(_0x269ax15){logger[_0x9547[24]](_0x9547[20],_0x269ax10,_0x9547[23]);logger[_0x9547[27]](_0x9547[25],_0x269ax10,_0x9547[23],JSON[_0x9547[26]](_0x269ax15));if(_0x269ax15[_0x9547[21]]){if(_0x269ax15[_0x9547[21]][_0x9547[28]]=== 500){logger[_0x9547[21]](_0x9547[20],_0x269ax10,_0x269ax15[_0x9547[21]][_0x9547[29]]);return _0x269ax13(_0x269ax15[_0x9547[21]][_0x9547[29]])};logger[_0x9547[21]](_0x9547[20],_0x269ax10,_0x269ax15[_0x9547[21]][_0x9547[29]]);return _0x269ax12(_0x269ax15[_0x9547[21]][_0x9547[29]])}else {logger[_0x9547[24]](_0x9547[20],_0x269ax10,_0x9547[23]);_0x269ax12(_0x269ax15[_0x9547[30]][_0x9547[29]])}})[_0x9547[22]](function(_0x269ax14){logger[_0x9547[21]](_0x9547[20],_0x269ax10,_0x269ax14);_0x269ax13(_0x269ax14)})})}exports[_0x9547[33]]= function(_0x269ax11){var _0x269ax16=this;return  new Promise(function(_0x269ax12,_0x269ax13){return db[_0x9547[43]][_0x9547[42]]({raw:_0x269ax11[_0x9547[34]]?(_0x269ax11[_0x9547[34]][_0x9547[35]]=== undefined)?true:false:true,where:_0x269ax11[_0x9547[34]]?_0x269ax11[_0x9547[34]][_0x9547[36]]|| null:null,attributes:_0x269ax11[_0x9547[34]]?_0x269ax11[_0x9547[34]][_0x9547[37]]|| null:null,include:_0x269ax11[_0x9547[34]]?(_0x269ax11[_0x9547[34]][_0x9547[38]]?_[_0x9547[41]](_0x269ax11[_0x9547[34]][_0x9547[38]],function(_0x269ax17){return {model:db[_0x269ax17[_0x9547[39]]],as:_0x269ax17[_0x9547[40]],attributes:_0x269ax17[_0x9547[37]],include:_0x269ax17[_0x9547[38]]?_[_0x9547[41]](_0x269ax17[_0x9547[38]],function(_0x269ax18){return {model:db[_0x269ax18[_0x9547[39]]],as:_0x269ax18[_0x9547[40]],attributes:_0x269ax18[_0x9547[37]],include:_0x269ax18[_0x9547[38]]?_[_0x9547[41]](_0x269ax18[_0x9547[38]],function(_0x269ax19){return {model:db[_0x269ax19[_0x9547[39]]],as:_0x269ax19[_0x9547[40]],attributes:_0x269ax19[_0x9547[37]]}}):[]}}):[]}}):[]):[]})[_0x9547[31]](function(_0x269ax15){logger[_0x9547[24]](_0x9547[33],_0x269ax11);logger[_0x9547[27]](_0x9547[33],_0x269ax11,JSON[_0x9547[26]](_0x269ax15));_0x269ax12(_0x269ax15)})[_0x9547[22]](function(_0x269ax14){logger[_0x9547[21]](_0x9547[33],_0x269ax14[_0x9547[29]],_0x269ax11);_0x269ax13(_0x269ax16[_0x9547[21]](500,_0x269ax14[_0x9547[29]]))})})};exports[_0x9547[44]]= function(_0x269ax11){var _0x269ax16=this;return  new Promise(function(_0x269ax12,_0x269ax13){return db[_0x9547[43]][_0x9547[46]](_0x269ax11[_0x9547[45]],{raw:_0x269ax11[_0x9547[34]]?(_0x269ax11[_0x9547[34]][_0x9547[35]]=== undefined)?true:false:true})[_0x9547[31]](function(_0x269ax15){logger[_0x9547[24]](_0x9547[44],_0x269ax11);logger[_0x9547[27]](_0x9547[44],_0x269ax11,JSON[_0x9547[26]](_0x269ax15));_0x269ax12(_0x269ax15)})[_0x9547[22]](function(_0x269ax14){logger[_0x9547[21]](_0x9547[44],_0x269ax14[_0x9547[29]],_0x269ax11);_0x269ax13(_0x269ax16[_0x9547[21]](500,_0x269ax14[_0x9547[29]]))})})}
\ No newline at end of file
index 1918b58..dd82f90 100644 (file)
@@ -1 +1 @@
-var _0x7a35=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x3A","\x6F\x6E"];_0x7a35[0];var CmContactEvents=require(_0x7a35[1]);var events=[_0x7a35[2],_0x7a35[3],_0x7a35[4]];function createListener(_0x9523x4,_0x9523x5){return function(_0x9523x6){_0x9523x5[_0x7a35[5]](_0x9523x4,_0x9523x6)}}function removeListener(_0x9523x4,_0x9523x8){return function(){CmContactEvents[_0x7a35[6]](_0x9523x4,_0x9523x8)}}exports[_0x7a35[7]]= function(_0x9523x5){for(var _0x9523x9=0,_0x9523xa=events[_0x7a35[8]];_0x9523x9< _0x9523xa;_0x9523x9++){var _0x9523x4=events[_0x9523x9];var _0x9523x8=createListener(_0x7a35[9]+ _0x9523x4,_0x9523x5);CmContactEvents[_0x7a35[10]](_0x9523x4,_0x9523x8)}}
\ No newline at end of file
+var _0xfda3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x3A","\x6F\x6E"];_0xfda3[0];var CmContactEvents=require(_0xfda3[1]);var events=[_0xfda3[2],_0xfda3[3],_0xfda3[4]];function createListener(_0xd59fx4,_0xd59fx5){return function(_0xd59fx6){_0xd59fx5[_0xfda3[5]](_0xd59fx4,_0xd59fx6)}}function removeListener(_0xd59fx4,_0xd59fx8){return function(){CmContactEvents[_0xfda3[6]](_0xd59fx4,_0xd59fx8)}}exports[_0xfda3[7]]= function(_0xd59fx5){for(var _0xd59fx9=0,_0xd59fxa=events[_0xfda3[8]];_0xd59fx9< _0xd59fxa;_0xd59fx9++){var _0xd59fx4=events[_0xd59fx9];var _0xd59fx8=createListener(_0xfda3[9]+ _0xd59fx4,_0xd59fx5);CmContactEvents[_0xfda3[10]](_0xd59fx4,_0xd59fx8)}}
\ No newline at end of file
index 761dfbc..da333dd 100644 (file)
@@ -1 +1 @@
-var _0x3dd3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74","\x2F","\x69\x6E\x64\x65\x78","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x73","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x5F\x68\x69\x73\x74\x6F\x72\x69\x65\x73","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x69\x65\x73","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x5F\x66\x69\x6E\x61\x6C\x73","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x73","\x2F\x3A\x69\x64\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x67\x65\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x73","\x2F\x6D\x65\x72\x67\x65","\x6D\x65\x72\x67\x65","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65","\x2F\x63\x72\x65\x61\x74\x65\x5F\x6D\x61\x6E\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x74\x6D\x70","\x6A\x6F\x69\x6E","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x6E\x61\x6D\x65","\x2D","\x72\x65\x70\x6C\x61\x63\x65","\x25\x73\x2D\x25\x73\x25\x73","\x65\x78\x74\x6E\x61\x6D\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x6E\x6F\x77","\x66\x6F\x72\x6D\x61\x74","\x64\x69\x73\x6B\x53\x74\x6F\x72\x61\x67\x65","\x2F\x63\x73\x76","\x66\x69\x6C\x65","\x73\x69\x6E\x67\x6C\x65","\x75\x70\x6C\x6F\x61\x64\x43\x73\x76","\x2F\x75\x70\x6C\x6F\x61\x64","\x75\x70\x6C\x6F\x61\x64","\x2F\x75\x70\x6C\x6F\x61\x64\x2F\x3A\x69\x64","\x69\x6D\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x3dd3[0];var multer=require(_0x3dd3[1]);var util=require(_0x3dd3[2]);var path=require(_0x3dd3[3]);var express=require(_0x3dd3[4]);var router=express.Router();var auth=require(_0x3dd3[5]);var interaction=require(_0x3dd3[6]);var config=require(_0x3dd3[7]);var controller=require(_0x3dd3[8]);router[_0x3dd3[12]](_0x3dd3[9],auth[_0x3dd3[10]](),controller[_0x3dd3[11]]);router[_0x3dd3[12]](_0x3dd3[13],auth[_0x3dd3[10]](),controller[_0x3dd3[14]]);router[_0x3dd3[12]](_0x3dd3[15],auth[_0x3dd3[10]](),controller[_0x3dd3[16]]);router[_0x3dd3[12]](_0x3dd3[17],auth[_0x3dd3[10]](),controller[_0x3dd3[18]]);router[_0x3dd3[12]](_0x3dd3[19],auth[_0x3dd3[10]](),controller[_0x3dd3[20]]);router[_0x3dd3[12]](_0x3dd3[21],auth[_0x3dd3[10]](),controller[_0x3dd3[22]]);router[_0x3dd3[12]](_0x3dd3[23],auth[_0x3dd3[10]](),controller[_0x3dd3[24]]);router[_0x3dd3[27]](_0x3dd3[25],auth[_0x3dd3[10]](),controller[_0x3dd3[26]]);router[_0x3dd3[27]](_0x3dd3[13],auth[_0x3dd3[10]](),controller[_0x3dd3[28]]);router[_0x3dd3[27]](_0x3dd3[29],auth[_0x3dd3[10]](),controller[_0x3dd3[30]]);var upload=multer({storage:multer[_0x3dd3[42]]({destination:function(_0xc2baxb,_0xc2baxc,_0xc2baxd){_0xc2baxd(null,path[_0x3dd3[33]](config[_0x3dd3[31]],_0x3dd3[32]))},filename:function(_0xc2baxb,_0xc2baxc,_0xc2baxd){_0xc2baxc[_0x3dd3[34]]= _0xc2baxc[_0x3dd3[34]][_0x3dd3[36]](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,_0x3dd3[35]);_0xc2baxd(null,util[_0x3dd3[41]](_0x3dd3[37],path[_0x3dd3[39]](_0xc2baxc[_0x3dd3[34]],path[_0x3dd3[38]](_0xc2baxc[_0x3dd3[34]])),Date[_0x3dd3[40]](),path[_0x3dd3[38]](_0xc2baxc[_0x3dd3[34]])))}})});router[_0x3dd3[27]](_0x3dd3[43],upload[_0x3dd3[45]](_0x3dd3[44]),controller[_0x3dd3[46]]);var upload=multer({storage:multer[_0x3dd3[42]]({destination:function(_0xc2baxb,_0xc2baxc,_0xc2baxd){_0xc2baxd(null,path[_0x3dd3[33]](config[_0x3dd3[31]],_0x3dd3[32]))},filename:function(_0xc2baxb,_0xc2baxc,_0xc2baxd){_0xc2baxc[_0x3dd3[34]]= _0xc2baxc[_0x3dd3[34]][_0x3dd3[36]](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,_0x3dd3[35]);_0xc2baxd(null,util[_0x3dd3[41]](_0x3dd3[37],path[_0x3dd3[39]](_0xc2baxc[_0x3dd3[34]],path[_0x3dd3[38]](_0xc2baxc[_0x3dd3[34]])),Date[_0x3dd3[40]](),path[_0x3dd3[38]](_0xc2baxc[_0x3dd3[34]])))}})});router[_0x3dd3[27]](_0x3dd3[47],upload[_0x3dd3[45]](_0x3dd3[44]),controller[_0x3dd3[48]]);router[_0x3dd3[27]](_0x3dd3[49],auth[_0x3dd3[10]](),controller[_0x3dd3[50]]);router[_0x3dd3[52]](_0x3dd3[15],auth[_0x3dd3[10]](),controller[_0x3dd3[51]]);router[_0x3dd3[54]](_0x3dd3[15],auth[_0x3dd3[10]](),controller[_0x3dd3[53]]);module[_0x3dd3[55]]= router
\ No newline at end of file
+var _0xc325=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74","\x2F","\x69\x6E\x64\x65\x78","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x73","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x5F\x68\x69\x73\x74\x6F\x72\x69\x65\x73","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x69\x65\x73","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x5F\x66\x69\x6E\x61\x6C\x73","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x73","\x2F\x3A\x69\x64\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x67\x65\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x73","\x2F\x6D\x65\x72\x67\x65","\x6D\x65\x72\x67\x65","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65","\x2F\x63\x72\x65\x61\x74\x65\x5F\x6D\x61\x6E\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x74\x6D\x70","\x6A\x6F\x69\x6E","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x6E\x61\x6D\x65","\x2D","\x72\x65\x70\x6C\x61\x63\x65","\x25\x73\x2D\x25\x73\x25\x73","\x65\x78\x74\x6E\x61\x6D\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x6E\x6F\x77","\x66\x6F\x72\x6D\x61\x74","\x64\x69\x73\x6B\x53\x74\x6F\x72\x61\x67\x65","\x2F\x63\x73\x76","\x66\x69\x6C\x65","\x73\x69\x6E\x67\x6C\x65","\x75\x70\x6C\x6F\x61\x64\x43\x73\x76","\x2F\x75\x70\x6C\x6F\x61\x64","\x75\x70\x6C\x6F\x61\x64","\x2F\x75\x70\x6C\x6F\x61\x64\x2F\x3A\x69\x64","\x69\x6D\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc325[0];var multer=require(_0xc325[1]);var util=require(_0xc325[2]);var path=require(_0xc325[3]);var express=require(_0xc325[4]);var router=express.Router();var auth=require(_0xc325[5]);var interaction=require(_0xc325[6]);var config=require(_0xc325[7]);var controller=require(_0xc325[8]);router[_0xc325[12]](_0xc325[9],auth[_0xc325[10]](),controller[_0xc325[11]]);router[_0xc325[12]](_0xc325[13],auth[_0xc325[10]](),controller[_0xc325[14]]);router[_0xc325[12]](_0xc325[15],auth[_0xc325[10]](),controller[_0xc325[16]]);router[_0xc325[12]](_0xc325[17],auth[_0xc325[10]](),controller[_0xc325[18]]);router[_0xc325[12]](_0xc325[19],auth[_0xc325[10]](),controller[_0xc325[20]]);router[_0xc325[12]](_0xc325[21],auth[_0xc325[10]](),controller[_0xc325[22]]);router[_0xc325[12]](_0xc325[23],auth[_0xc325[10]](),controller[_0xc325[24]]);router[_0xc325[27]](_0xc325[25],auth[_0xc325[10]](),controller[_0xc325[26]]);router[_0xc325[27]](_0xc325[13],auth[_0xc325[10]](),controller[_0xc325[28]]);router[_0xc325[27]](_0xc325[29],auth[_0xc325[10]](),controller[_0xc325[30]]);var upload=multer({storage:multer[_0xc325[42]]({destination:function(_0x2eb0xb,_0x2eb0xc,_0x2eb0xd){_0x2eb0xd(null,path[_0xc325[33]](config[_0xc325[31]],_0xc325[32]))},filename:function(_0x2eb0xb,_0x2eb0xc,_0x2eb0xd){_0x2eb0xc[_0xc325[34]]= _0x2eb0xc[_0xc325[34]][_0xc325[36]](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,_0xc325[35]);_0x2eb0xd(null,util[_0xc325[41]](_0xc325[37],path[_0xc325[39]](_0x2eb0xc[_0xc325[34]],path[_0xc325[38]](_0x2eb0xc[_0xc325[34]])),Date[_0xc325[40]](),path[_0xc325[38]](_0x2eb0xc[_0xc325[34]])))}})});router[_0xc325[27]](_0xc325[43],upload[_0xc325[45]](_0xc325[44]),controller[_0xc325[46]]);var upload=multer({storage:multer[_0xc325[42]]({destination:function(_0x2eb0xb,_0x2eb0xc,_0x2eb0xd){_0x2eb0xd(null,path[_0xc325[33]](config[_0xc325[31]],_0xc325[32]))},filename:function(_0x2eb0xb,_0x2eb0xc,_0x2eb0xd){_0x2eb0xc[_0xc325[34]]= _0x2eb0xc[_0xc325[34]][_0xc325[36]](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,_0xc325[35]);_0x2eb0xd(null,util[_0xc325[41]](_0xc325[37],path[_0xc325[39]](_0x2eb0xc[_0xc325[34]],path[_0xc325[38]](_0x2eb0xc[_0xc325[34]])),Date[_0xc325[40]](),path[_0xc325[38]](_0x2eb0xc[_0xc325[34]])))}})});router[_0xc325[27]](_0xc325[47],upload[_0xc325[45]](_0xc325[44]),controller[_0xc325[48]]);router[_0xc325[27]](_0xc325[49],auth[_0xc325[10]](),controller[_0xc325[50]]);router[_0xc325[52]](_0xc325[15],auth[_0xc325[10]](),controller[_0xc325[51]]);router[_0xc325[54]](_0xc325[15],auth[_0xc325[10]](),controller[_0xc325[53]]);module[_0xc325[55]]= router
\ No newline at end of file
index 8978ccd..8626080 100644 (file)
@@ -1 +1 @@
-var _0xf0c7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6C\x6F\x64\x61\x73\x68","\x65\x78\x70\x6F\x72\x74\x73","\x56\x49\x52\x54\x55\x41\x4C","\x61\x6C\x69\x61\x73","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x6C\x6F\x6E\x67","\x74\x79\x70\x65","\x73\x65\x6C\x65\x63\x74","\x76\x61\x6C\x75\x65\x73","\x70\x61\x72\x73\x65","\x69\x73\x41\x72\x72\x61\x79","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0xf0c7[0];var Sequelize=require(_0xf0c7[1]);var _=require(_0xf0c7[2]);module[_0xf0c7[3]]= {name:{type:Sequelize[_0xf0c7[4]],get:function(_0x5236x3){return this[_0xf0c7[6]](_0xf0c7[5])}},alias:{type:Sequelize[_0xf0c7[7]],allowNull:false,set:function(_0x5236x3){this[_0xf0c7[9]](_0xf0c7[5],_0x5236x3?_0x5236x3:this[_0xf0c7[6]](_0xf0c7[8]))}},type:{type:Sequelize[_0xf0c7[7]],allowNull:false},values:{type:Sequelize.TEXT(_0xf0c7[10]),get:function(){if(this[_0xf0c7[6]](_0xf0c7[11])=== _0xf0c7[12]){return JSON[_0xf0c7[14]](this[_0xf0c7[6]](_0xf0c7[13]))}else {return this[_0xf0c7[6]](_0xf0c7[13])}},set:function(_0x5236x3){if(Array[_0xf0c7[15]](_0x5236x3)){this[_0xf0c7[9]](_0xf0c7[13],JSON[_0xf0c7[16]](_0x5236x3))}else {this[_0xf0c7[9]](_0xf0c7[13],_0x5236x3)}}},required:{type:Sequelize[_0xf0c7[17]],defaultValue:false}}
\ No newline at end of file
+var _0x5edd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6C\x6F\x64\x61\x73\x68","\x65\x78\x70\x6F\x72\x74\x73","\x56\x49\x52\x54\x55\x41\x4C","\x61\x6C\x69\x61\x73","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x6C\x6F\x6E\x67","\x74\x79\x70\x65","\x73\x65\x6C\x65\x63\x74","\x76\x61\x6C\x75\x65\x73","\x70\x61\x72\x73\x65","\x69\x73\x41\x72\x72\x61\x79","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x5edd[0];var Sequelize=require(_0x5edd[1]);var _=require(_0x5edd[2]);module[_0x5edd[3]]= {name:{type:Sequelize[_0x5edd[4]],get:function(_0x95e7x3){return this[_0x5edd[6]](_0x5edd[5])}},alias:{type:Sequelize[_0x5edd[7]],allowNull:false,set:function(_0x95e7x3){this[_0x5edd[9]](_0x5edd[5],_0x95e7x3?_0x95e7x3:this[_0x5edd[6]](_0x5edd[8]))}},type:{type:Sequelize[_0x5edd[7]],allowNull:false},values:{type:Sequelize.TEXT(_0x5edd[10]),get:function(){if(this[_0x5edd[6]](_0x5edd[11])=== _0x5edd[12]){return JSON[_0x5edd[14]](this[_0x5edd[6]](_0x5edd[13]))}else {return this[_0x5edd[6]](_0x5edd[13])}},set:function(_0x95e7x3){if(Array[_0x5edd[15]](_0x95e7x3)){this[_0x5edd[9]](_0x5edd[13],JSON[_0x5edd[16]](_0x95e7x3))}else {this[_0x5edd[9]](_0x5edd[13],_0x95e7x3)}}},required:{type:Sequelize[_0x5edd[17]],defaultValue:false}}
\ No newline at end of file
index 613267c..8eb411e 100644 (file)
@@ -1 +1 @@
-var _0x4fb9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x6B\x65\x79\x73","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65\x42\x79","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65","\x54\x45\x58\x54","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x74\x79\x70\x65","\x74\x65\x78\x74","\x49\x4E\x54\x45\x47\x45\x52","\x6E\x75\x6D\x62\x65\x72","\x42\x4F\x4F\x4C\x45\x41\x4E","\x64\x65\x66\x61\x75\x6C\x74\x56\x61\x6C\x75\x65","\x73\x77\x69\x74\x63\x68","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x63\x66\x5F\x25\x64","\x66\x6F\x72\x6D\x61\x74","\x61\x64\x64\x43\x6F\x6C\x75\x6D\x6E","\x71\x75\x65\x72\x79\x49\x6E\x74\x65\x72\x66\x61\x63\x65","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E"];_0x4fb9[0];var jsonpatch=require(_0x4fb9[1]);var rp=require(_0x4fb9[2]);var moment=require(_0x4fb9[3]);var BPromise=require(_0x4fb9[4]);var Mustache=require(_0x4fb9[5]);var util=require(_0x4fb9[6]);var path=require(_0x4fb9[7]);var sox=require(_0x4fb9[8]);var csv=require(_0x4fb9[9]);var ejs=require(_0x4fb9[10]);var fs=require(_0x4fb9[11]);var _=require(_0x4fb9[12]);var squel=require(_0x4fb9[13]);var crypto=require(_0x4fb9[14]);var jsforce=require(_0x4fb9[15]);var deskjs=require(_0x4fb9[16]);var toCsv=require(_0x4fb9[9]);var querystring=require(_0x4fb9[17]);var Papa=require(_0x4fb9[18]);var qs=require(_0x4fb9[19]);var logger=require(_0x4fb9[21])(_0x4fb9[20]);var utils=require(_0x4fb9[22]);var config=require(_0x4fb9[23]);var db=require(_0x4fb9[25])[_0x4fb9[24]];function respondWithStatusCode(_0x7d42x1a,_0x7d42x1b){_0x7d42x1b= _0x7d42x1b|| 204;return function(_0x7d42x1c){if(_0x7d42x1c){return _0x7d42x1a[_0x4fb9[26]](_0x7d42x1b)};return _0x7d42x1a[_0x4fb9[28]](_0x7d42x1b)[_0x4fb9[27]]()}}function respondWithResult(_0x7d42x1a,_0x7d42x1b){_0x7d42x1b= _0x7d42x1b|| 200;return function(_0x7d42x1c){if(_0x7d42x1c){return _0x7d42x1a[_0x4fb9[28]](_0x7d42x1b)[_0x4fb9[29]](_0x7d42x1c)}}}function respondWithFilteredResult(_0x7d42x1a,_0x7d42x1f){return function(_0x7d42x1c){if(_0x7d42x1c){var _0x7d42x20=_0x7d42x1c[_0x4fb9[30]],_0x7d42x21=_0x7d42x1f[_0x4fb9[31]],_0x7d42x22=_0x7d42x1f[_0x4fb9[31]]+ _0x7d42x1f[_0x4fb9[32]],_0x7d42x1b;if(_0x7d42x22>= _0x7d42x20){_0x7d42x22= _0x7d42x20;_0x7d42x1b= 200}else {_0x7d42x1b= 206};_0x7d42x1a[_0x4fb9[28]](_0x7d42x1b);return _0x7d42x1a[_0x4fb9[36]](_0x4fb9[33],_0x7d42x21+ _0x4fb9[34]+ _0x7d42x22+ _0x4fb9[35]+ _0x7d42x20)[_0x4fb9[29]](_0x7d42x1c)};return null}}function patchUpdates(_0x7d42x24){return function(_0x7d42x1c){try{jsonpatch[_0x4fb9[37]](_0x7d42x1c,_0x7d42x24,true)}catch(err){return BPromise[_0x4fb9[38]](err)};return _0x7d42x1c[_0x4fb9[39]]()}}function saveUpdates(_0x7d42x26,_0x7d42x1b){return function(_0x7d42x1c){if(_0x7d42x1c){return _0x7d42x1c[_0x4fb9[41]](_0x7d42x26)[_0x4fb9[40]](function(_0x7d42x27){return _0x7d42x27})};return null}}function removeEntity(_0x7d42x1a,_0x7d42x1b){return function(_0x7d42x1c){if(_0x7d42x1c){return _0x7d42x1c[_0x4fb9[42]]()[_0x4fb9[40]](function(){_0x7d42x1a[_0x4fb9[28]](204)[_0x4fb9[27]]()})}}}function handleEntityNotFound(_0x7d42x1a,_0x7d42x1b){return function(_0x7d42x1c){if(!_0x7d42x1c){_0x7d42x1a[_0x4fb9[26]](404)};return _0x7d42x1c}}function handleError(_0x7d42x1a,_0x7d42x1b){_0x7d42x1b= _0x7d42x1b|| 500;return function(_0x7d42x2b){logger[_0x4fb9[44]](_0x7d42x2b[_0x4fb9[43]]);if(_0x7d42x2b[_0x4fb9[45]]){delete _0x7d42x2b[_0x4fb9[45]]};_0x7d42x1a[_0x4fb9[28]](_0x7d42x1b)[_0x4fb9[46]](_0x7d42x2b)}}exports[_0x4fb9[47]]= function(_0x7d42x2c,_0x7d42x1a){var _0x7d42x1f={},_0x7d42x2d={},_0x7d42x2e={count:0,rows:[]};_0x7d42x2d[_0x4fb9[48]]= _[_0x4fb9[52]](_[_0x4fb9[51]](db[_0x4fb9[50]][_0x4fb9[49]]),[_0x4fb9[45]]);var _0x7d42x2f={dateStart:_0x7d42x2c[_0x4fb9[54]][_0x4fb9[53]],dateEnd:_0x7d42x2c[_0x4fb9[54]][_0x4fb9[55]]};delete _0x7d42x2c[_0x4fb9[54]][_0x4fb9[53]];delete _0x7d42x2c[_0x4fb9[54]][_0x4fb9[55]];_0x7d42x2d[_0x4fb9[54]]= _[_0x4fb9[51]](_0x7d42x2c[_0x4fb9[54]]);_0x7d42x2d[_0x4fb9[56]]= _[_0x4fb9[57]](_0x7d42x2d[_0x4fb9[48]],_0x7d42x2d[_0x4fb9[54]]);_0x7d42x1f[_0x4fb9[58]]= _[_0x4fb9[57]](_0x7d42x2d[_0x4fb9[48]],qs[_0x4fb9[59]](_0x7d42x2c[_0x4fb9[54]][_0x4fb9[59]]));_0x7d42x1f[_0x4fb9[58]]= (_0x7d42x1f[_0x4fb9[58]][_0x4fb9[60]])?_0x7d42x1f[_0x4fb9[58]]:_0x7d42x2d[_0x4fb9[48]];if(!_0x7d42x2c[_0x4fb9[54]][_0x4fb9[62]](_0x4fb9[61])){_0x7d42x1f[_0x4fb9[32]]= qs[_0x4fb9[32]](_0x7d42x2c[_0x4fb9[54]][_0x4fb9[32]]);_0x7d42x1f[_0x4fb9[31]]= qs[_0x4fb9[31]](_0x7d42x2c[_0x4fb9[54]][_0x4fb9[31]])};_0x7d42x1f[_0x4fb9[63]]= qs[_0x4fb9[64]](_0x7d42x2c[_0x4fb9[54]][_0x4fb9[64]]);_0x7d42x1f[_0x4fb9[65]]= qs[_0x4fb9[56]](_[_0x4fb9[66]](_0x7d42x2c[_0x4fb9[54]],_0x7d42x2d[_0x4fb9[56]]));if(_0x7d42x2f[_0x4fb9[53]]){if(_0x7d42x2f[_0x4fb9[55]]){_0x7d42x2f[_0x4fb9[55]]= moment(_0x7d42x2f[_0x4fb9[55]])[_0x4fb9[68]](1,_0x4fb9[67])}else {_0x7d42x2f[_0x4fb9[55]]= moment(_0x7d42x2f[_0x4fb9[53]])[_0x4fb9[68]](1,_0x4fb9[67])};_[_0x4fb9[69]](_0x7d42x1f[_0x4fb9[65]],{createdAt:{$gte:_0x7d42x2f[_0x4fb9[53]],$lte:_0x7d42x2f[_0x4fb9[55]]}})};if(_0x7d42x2c[_0x4fb9[54]][_0x4fb9[70]]){_0x7d42x1f[_0x4fb9[65]]= _[_0x4fb9[69]](_0x7d42x1f[_0x4fb9[65]],{$or:_[_0x4fb9[72]](_0x7d42x1f[_0x4fb9[58]],function(_0x7d42x30){var _0x7d42x2e={};_0x7d42x2e[_0x7d42x30]= {$like:_0x4fb9[71]+ _0x7d42x2c[_0x4fb9[54]][_0x4fb9[70]]+ _0x4fb9[71]};return _0x7d42x2e})})};_0x7d42x1f= _[_0x4fb9[69]]({},_0x7d42x1f,_0x7d42x2c[_0x4fb9[73]]);var _0x7d42x31={where:_0x7d42x1f[_0x4fb9[65]]};return db[_0x4fb9[50]][_0x4fb9[30]](_0x7d42x31)[_0x4fb9[40]](function(_0x7d42x20){_0x7d42x2e[_0x4fb9[30]]= _0x7d42x20;if(_0x7d42x2c[_0x4fb9[54]][_0x4fb9[76]]){_0x7d42x1f[_0x4fb9[77]]= [{all:true}]};return db[_0x4fb9[50]][_0x4fb9[78]](_0x7d42x1f)})[_0x4fb9[40]](function(_0x7d42x32){_0x7d42x2e[_0x4fb9[75]]= _0x7d42x32;return _0x7d42x2e})[_0x4fb9[40]](respondWithFilteredResult(_0x7d42x1a,_0x7d42x1f))[_0x4fb9[74]](handleError(_0x7d42x1a,null))};exports[_0x4fb9[79]]= function(_0x7d42x2c,_0x7d42x1a){var _0x7d42x1f={raw:true,where:{id:_0x7d42x2c[_0x4fb9[81]][_0x4fb9[80]]}},_0x7d42x2d={};_0x7d42x2d[_0x4fb9[48]]= _[_0x4fb9[51]](db[_0x4fb9[50]][_0x4fb9[49]]);_0x7d42x2d[_0x4fb9[54]]= _[_0x4fb9[51]](_0x7d42x2c[_0x4fb9[54]]);_0x7d42x2d[_0x4fb9[56]]= _[_0x4fb9[57]](_0x7d42x2d[_0x4fb9[48]],_0x7d42x2d[_0x4fb9[54]]);_0x7d42x1f[_0x4fb9[58]]= _[_0x4fb9[57]](_0x7d42x2d[_0x4fb9[48]],qs[_0x4fb9[59]](_0x7d42x2c[_0x4fb9[54]][_0x4fb9[59]]));_0x7d42x1f[_0x4fb9[58]]= (_0x7d42x1f[_0x4fb9[58]][_0x4fb9[60]])?_0x7d42x1f[_0x4fb9[58]]:_0x7d42x2d[_0x4fb9[48]];if(_0x7d42x2c[_0x4fb9[54]][_0x4fb9[76]]){_0x7d42x1f[_0x4fb9[77]]= [{all:true}]};_0x7d42x1f= _[_0x4fb9[69]]({},_0x7d42x1f,_0x7d42x2c[_0x4fb9[73]]);return db[_0x4fb9[50]][_0x4fb9[82]](_0x7d42x1f)[_0x4fb9[40]](handleEntityNotFound(_0x7d42x1a,null))[_0x4fb9[40]](respondWithResult(_0x7d42x1a,null))[_0x4fb9[74]](handleError(_0x7d42x1a,null))};exports[_0x4fb9[41]]= function(_0x7d42x2c,_0x7d42x1a){if(_0x7d42x2c[_0x4fb9[83]][_0x4fb9[80]]){delete _0x7d42x2c[_0x4fb9[83]][_0x4fb9[80]]};return db[_0x4fb9[50]][_0x4fb9[82]]({where:{id:_0x7d42x2c[_0x4fb9[81]][_0x4fb9[80]]}})[_0x4fb9[40]](handleEntityNotFound(_0x7d42x1a,null))[_0x4fb9[40]](saveUpdates(_0x7d42x2c[_0x4fb9[83]],null))[_0x4fb9[40]](respondWithResult(_0x7d42x1a,null))[_0x4fb9[74]](handleError(_0x7d42x1a,null))};exports[_0x4fb9[42]]= function(_0x7d42x2c,_0x7d42x1a){return db[_0x4fb9[50]][_0x4fb9[82]]({where:{id:_0x7d42x2c[_0x4fb9[81]][_0x4fb9[80]]}})[_0x4fb9[40]](handleEntityNotFound(_0x7d42x1a,null))[_0x4fb9[40]](removeEntity(_0x7d42x1a,null))[_0x4fb9[74]](handleError(_0x7d42x1a,null))};exports[_0x4fb9[84]]= function(_0x7d42x2c,_0x7d42x1a){var _0x7d42x33;return db[_0x4fb9[99]][_0x4fb9[100]](function(_0x7d42x34){return db[_0x4fb9[50]][_0x4fb9[84]](_0x7d42x2c[_0x4fb9[83]],{transaction:_0x7d42x34})[_0x4fb9[40]](function(_0x7d42x1c){_0x7d42x33= _0x7d42x1c;var _0x7d42x35={type:db[_0x4fb9[86]][_0x4fb9[85]],transaction:_0x7d42x34};switch(_0x7d42x2c[_0x4fb9[83]][_0x4fb9[87]]){case _0x4fb9[88]:_0x7d42x35[_0x4fb9[87]]= db[_0x4fb9[86]][_0x4fb9[85]];break;case _0x4fb9[90]:_0x7d42x35[_0x4fb9[87]]= db[_0x4fb9[86]][_0x4fb9[89]];break;case _0x4fb9[93]:_0x7d42x35[_0x4fb9[87]]= db[_0x4fb9[86]][_0x4fb9[91]];_0x7d42x35[_0x4fb9[92]]= false;break;default:};return db[_0x4fb9[99]][_0x4fb9[98]][_0x4fb9[97]](_0x4fb9[94],util[_0x4fb9[96]](_0x4fb9[95],_0x7d42x33[_0x4fb9[80]]),_0x7d42x35)})[_0x4fb9[40]](function(){return _0x7d42x33})})[_0x4fb9[40]](respondWithResult(_0x7d42x1a,201))[_0x4fb9[74]](handleError(_0x7d42x1a,null))}
\ No newline at end of file
+var _0x85c2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x6B\x65\x79\x73","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65\x42\x79","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65","\x54\x45\x58\x54","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x74\x79\x70\x65","\x74\x65\x78\x74","\x49\x4E\x54\x45\x47\x45\x52","\x6E\x75\x6D\x62\x65\x72","\x42\x4F\x4F\x4C\x45\x41\x4E","\x64\x65\x66\x61\x75\x6C\x74\x56\x61\x6C\x75\x65","\x73\x77\x69\x74\x63\x68","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x63\x66\x5F\x25\x64","\x66\x6F\x72\x6D\x61\x74","\x61\x64\x64\x43\x6F\x6C\x75\x6D\x6E","\x71\x75\x65\x72\x79\x49\x6E\x74\x65\x72\x66\x61\x63\x65","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E"];_0x85c2[0];var jsonpatch=require(_0x85c2[1]);var rp=require(_0x85c2[2]);var moment=require(_0x85c2[3]);var BPromise=require(_0x85c2[4]);var Mustache=require(_0x85c2[5]);var util=require(_0x85c2[6]);var path=require(_0x85c2[7]);var sox=require(_0x85c2[8]);var csv=require(_0x85c2[9]);var ejs=require(_0x85c2[10]);var fs=require(_0x85c2[11]);var _=require(_0x85c2[12]);var squel=require(_0x85c2[13]);var crypto=require(_0x85c2[14]);var jsforce=require(_0x85c2[15]);var deskjs=require(_0x85c2[16]);var toCsv=require(_0x85c2[9]);var querystring=require(_0x85c2[17]);var Papa=require(_0x85c2[18]);var qs=require(_0x85c2[19]);var logger=require(_0x85c2[21])(_0x85c2[20]);var utils=require(_0x85c2[22]);var config=require(_0x85c2[23]);var db=require(_0x85c2[25])[_0x85c2[24]];function respondWithStatusCode(_0x53d9x1a,_0x53d9x1b){_0x53d9x1b= _0x53d9x1b|| 204;return function(_0x53d9x1c){if(_0x53d9x1c){return _0x53d9x1a[_0x85c2[26]](_0x53d9x1b)};return _0x53d9x1a[_0x85c2[28]](_0x53d9x1b)[_0x85c2[27]]()}}function respondWithResult(_0x53d9x1a,_0x53d9x1b){_0x53d9x1b= _0x53d9x1b|| 200;return function(_0x53d9x1c){if(_0x53d9x1c){return _0x53d9x1a[_0x85c2[28]](_0x53d9x1b)[_0x85c2[29]](_0x53d9x1c)}}}function respondWithFilteredResult(_0x53d9x1a,_0x53d9x1f){return function(_0x53d9x1c){if(_0x53d9x1c){var _0x53d9x20=_0x53d9x1c[_0x85c2[30]],_0x53d9x21=_0x53d9x1f[_0x85c2[31]],_0x53d9x22=_0x53d9x1f[_0x85c2[31]]+ _0x53d9x1f[_0x85c2[32]],_0x53d9x1b;if(_0x53d9x22>= _0x53d9x20){_0x53d9x22= _0x53d9x20;_0x53d9x1b= 200}else {_0x53d9x1b= 206};_0x53d9x1a[_0x85c2[28]](_0x53d9x1b);return _0x53d9x1a[_0x85c2[36]](_0x85c2[33],_0x53d9x21+ _0x85c2[34]+ _0x53d9x22+ _0x85c2[35]+ _0x53d9x20)[_0x85c2[29]](_0x53d9x1c)};return null}}function patchUpdates(_0x53d9x24){return function(_0x53d9x1c){try{jsonpatch[_0x85c2[37]](_0x53d9x1c,_0x53d9x24,true)}catch(err){return BPromise[_0x85c2[38]](err)};return _0x53d9x1c[_0x85c2[39]]()}}function saveUpdates(_0x53d9x26,_0x53d9x1b){return function(_0x53d9x1c){if(_0x53d9x1c){return _0x53d9x1c[_0x85c2[41]](_0x53d9x26)[_0x85c2[40]](function(_0x53d9x27){return _0x53d9x27})};return null}}function removeEntity(_0x53d9x1a,_0x53d9x1b){return function(_0x53d9x1c){if(_0x53d9x1c){return _0x53d9x1c[_0x85c2[42]]()[_0x85c2[40]](function(){_0x53d9x1a[_0x85c2[28]](204)[_0x85c2[27]]()})}}}function handleEntityNotFound(_0x53d9x1a,_0x53d9x1b){return function(_0x53d9x1c){if(!_0x53d9x1c){_0x53d9x1a[_0x85c2[26]](404)};return _0x53d9x1c}}function handleError(_0x53d9x1a,_0x53d9x1b){_0x53d9x1b= _0x53d9x1b|| 500;return function(_0x53d9x2b){logger[_0x85c2[44]](_0x53d9x2b[_0x85c2[43]]);if(_0x53d9x2b[_0x85c2[45]]){delete _0x53d9x2b[_0x85c2[45]]};_0x53d9x1a[_0x85c2[28]](_0x53d9x1b)[_0x85c2[46]](_0x53d9x2b)}}exports[_0x85c2[47]]= function(_0x53d9x2c,_0x53d9x1a){var _0x53d9x1f={},_0x53d9x2d={},_0x53d9x2e={count:0,rows:[]};_0x53d9x2d[_0x85c2[48]]= _[_0x85c2[52]](_[_0x85c2[51]](db[_0x85c2[50]][_0x85c2[49]]),[_0x85c2[45]]);var _0x53d9x2f={dateStart:_0x53d9x2c[_0x85c2[54]][_0x85c2[53]],dateEnd:_0x53d9x2c[_0x85c2[54]][_0x85c2[55]]};delete _0x53d9x2c[_0x85c2[54]][_0x85c2[53]];delete _0x53d9x2c[_0x85c2[54]][_0x85c2[55]];_0x53d9x2d[_0x85c2[54]]= _[_0x85c2[51]](_0x53d9x2c[_0x85c2[54]]);_0x53d9x2d[_0x85c2[56]]= _[_0x85c2[57]](_0x53d9x2d[_0x85c2[48]],_0x53d9x2d[_0x85c2[54]]);_0x53d9x1f[_0x85c2[58]]= _[_0x85c2[57]](_0x53d9x2d[_0x85c2[48]],qs[_0x85c2[59]](_0x53d9x2c[_0x85c2[54]][_0x85c2[59]]));_0x53d9x1f[_0x85c2[58]]= (_0x53d9x1f[_0x85c2[58]][_0x85c2[60]])?_0x53d9x1f[_0x85c2[58]]:_0x53d9x2d[_0x85c2[48]];if(!_0x53d9x2c[_0x85c2[54]][_0x85c2[62]](_0x85c2[61])){_0x53d9x1f[_0x85c2[32]]= qs[_0x85c2[32]](_0x53d9x2c[_0x85c2[54]][_0x85c2[32]]);_0x53d9x1f[_0x85c2[31]]= qs[_0x85c2[31]](_0x53d9x2c[_0x85c2[54]][_0x85c2[31]])};_0x53d9x1f[_0x85c2[63]]= qs[_0x85c2[64]](_0x53d9x2c[_0x85c2[54]][_0x85c2[64]]);_0x53d9x1f[_0x85c2[65]]= qs[_0x85c2[56]](_[_0x85c2[66]](_0x53d9x2c[_0x85c2[54]],_0x53d9x2d[_0x85c2[56]]));if(_0x53d9x2f[_0x85c2[53]]){if(_0x53d9x2f[_0x85c2[55]]){_0x53d9x2f[_0x85c2[55]]= moment(_0x53d9x2f[_0x85c2[55]])[_0x85c2[68]](1,_0x85c2[67])}else {_0x53d9x2f[_0x85c2[55]]= moment(_0x53d9x2f[_0x85c2[53]])[_0x85c2[68]](1,_0x85c2[67])};_[_0x85c2[69]](_0x53d9x1f[_0x85c2[65]],{createdAt:{$gte:_0x53d9x2f[_0x85c2[53]],$lte:_0x53d9x2f[_0x85c2[55]]}})};if(_0x53d9x2c[_0x85c2[54]][_0x85c2[70]]){_0x53d9x1f[_0x85c2[65]]= _[_0x85c2[69]](_0x53d9x1f[_0x85c2[65]],{$or:_[_0x85c2[72]](_0x53d9x1f[_0x85c2[58]],function(_0x53d9x30){var _0x53d9x2e={};_0x53d9x2e[_0x53d9x30]= {$like:_0x85c2[71]+ _0x53d9x2c[_0x85c2[54]][_0x85c2[70]]+ _0x85c2[71]};return _0x53d9x2e})})};_0x53d9x1f= _[_0x85c2[69]]({},_0x53d9x1f,_0x53d9x2c[_0x85c2[73]]);var _0x53d9x31={where:_0x53d9x1f[_0x85c2[65]]};return db[_0x85c2[50]][_0x85c2[30]](_0x53d9x31)[_0x85c2[40]](function(_0x53d9x20){_0x53d9x2e[_0x85c2[30]]= _0x53d9x20;if(_0x53d9x2c[_0x85c2[54]][_0x85c2[76]]){_0x53d9x1f[_0x85c2[77]]= [{all:true}]};return db[_0x85c2[50]][_0x85c2[78]](_0x53d9x1f)})[_0x85c2[40]](function(_0x53d9x32){_0x53d9x2e[_0x85c2[75]]= _0x53d9x32;return _0x53d9x2e})[_0x85c2[40]](respondWithFilteredResult(_0x53d9x1a,_0x53d9x1f))[_0x85c2[74]](handleError(_0x53d9x1a,null))};exports[_0x85c2[79]]= function(_0x53d9x2c,_0x53d9x1a){var _0x53d9x1f={raw:true,where:{id:_0x53d9x2c[_0x85c2[81]][_0x85c2[80]]}},_0x53d9x2d={};_0x53d9x2d[_0x85c2[48]]= _[_0x85c2[51]](db[_0x85c2[50]][_0x85c2[49]]);_0x53d9x2d[_0x85c2[54]]= _[_0x85c2[51]](_0x53d9x2c[_0x85c2[54]]);_0x53d9x2d[_0x85c2[56]]= _[_0x85c2[57]](_0x53d9x2d[_0x85c2[48]],_0x53d9x2d[_0x85c2[54]]);_0x53d9x1f[_0x85c2[58]]= _[_0x85c2[57]](_0x53d9x2d[_0x85c2[48]],qs[_0x85c2[59]](_0x53d9x2c[_0x85c2[54]][_0x85c2[59]]));_0x53d9x1f[_0x85c2[58]]= (_0x53d9x1f[_0x85c2[58]][_0x85c2[60]])?_0x53d9x1f[_0x85c2[58]]:_0x53d9x2d[_0x85c2[48]];if(_0x53d9x2c[_0x85c2[54]][_0x85c2[76]]){_0x53d9x1f[_0x85c2[77]]= [{all:true}]};_0x53d9x1f= _[_0x85c2[69]]({},_0x53d9x1f,_0x53d9x2c[_0x85c2[73]]);return db[_0x85c2[50]][_0x85c2[82]](_0x53d9x1f)[_0x85c2[40]](handleEntityNotFound(_0x53d9x1a,null))[_0x85c2[40]](respondWithResult(_0x53d9x1a,null))[_0x85c2[74]](handleError(_0x53d9x1a,null))};exports[_0x85c2[41]]= function(_0x53d9x2c,_0x53d9x1a){if(_0x53d9x2c[_0x85c2[83]][_0x85c2[80]]){delete _0x53d9x2c[_0x85c2[83]][_0x85c2[80]]};return db[_0x85c2[50]][_0x85c2[82]]({where:{id:_0x53d9x2c[_0x85c2[81]][_0x85c2[80]]}})[_0x85c2[40]](handleEntityNotFound(_0x53d9x1a,null))[_0x85c2[40]](saveUpdates(_0x53d9x2c[_0x85c2[83]],null))[_0x85c2[40]](respondWithResult(_0x53d9x1a,null))[_0x85c2[74]](handleError(_0x53d9x1a,null))};exports[_0x85c2[42]]= function(_0x53d9x2c,_0x53d9x1a){return db[_0x85c2[50]][_0x85c2[82]]({where:{id:_0x53d9x2c[_0x85c2[81]][_0x85c2[80]]}})[_0x85c2[40]](handleEntityNotFound(_0x53d9x1a,null))[_0x85c2[40]](removeEntity(_0x53d9x1a,null))[_0x85c2[74]](handleError(_0x53d9x1a,null))};exports[_0x85c2[84]]= function(_0x53d9x2c,_0x53d9x1a){var _0x53d9x33;return db[_0x85c2[99]][_0x85c2[100]](function(_0x53d9x34){return db[_0x85c2[50]][_0x85c2[84]](_0x53d9x2c[_0x85c2[83]],{transaction:_0x53d9x34})[_0x85c2[40]](function(_0x53d9x1c){_0x53d9x33= _0x53d9x1c;var _0x53d9x35={type:db[_0x85c2[86]][_0x85c2[85]],transaction:_0x53d9x34};switch(_0x53d9x2c[_0x85c2[83]][_0x85c2[87]]){case _0x85c2[88]:_0x53d9x35[_0x85c2[87]]= db[_0x85c2[86]][_0x85c2[85]];break;case _0x85c2[90]:_0x53d9x35[_0x85c2[87]]= db[_0x85c2[86]][_0x85c2[89]];break;case _0x85c2[93]:_0x53d9x35[_0x85c2[87]]= db[_0x85c2[86]][_0x85c2[91]];_0x53d9x35[_0x85c2[92]]= false;break;default:};return db[_0x85c2[99]][_0x85c2[98]][_0x85c2[97]](_0x85c2[94],util[_0x85c2[96]](_0x85c2[95],_0x53d9x33[_0x85c2[80]]),_0x53d9x35)})[_0x85c2[40]](function(){return _0x53d9x33})})[_0x85c2[40]](respondWithResult(_0x53d9x1a,201))[_0x85c2[74]](handleError(_0x53d9x1a,null))}
\ No newline at end of file
index 118a9ac..250f183 100644 (file)
@@ -1 +1 @@
-var _0xd0a9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x63\x6D\x5F\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0xd0a9[0];var _=require(_0xd0a9[1]);var util=require(_0xd0a9[2]);var logger=require(_0xd0a9[4])(_0xd0a9[3]);var moment=require(_0xd0a9[5]);var BPromise=require(_0xd0a9[6]);var rp=require(_0xd0a9[7]);var attributes=require(_0xd0a9[8]);module[_0xd0a9[9]]= function(_0xe191x8,_0xe191x9){return _0xe191x8[_0xd0a9[12]](_0xd0a9[10],attributes,{tableName:_0xd0a9[11],paranoid:true,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x4a60=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x63\x6D\x5F\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0x4a60[0];var _=require(_0x4a60[1]);var util=require(_0x4a60[2]);var logger=require(_0x4a60[4])(_0x4a60[3]);var moment=require(_0x4a60[5]);var BPromise=require(_0x4a60[6]);var rp=require(_0x4a60[7]);var attributes=require(_0x4a60[8]);module[_0x4a60[9]]= function(_0x382ax8,_0x382ax9){return _0x382ax8[_0x4a60[12]](_0x4a60[10],attributes,{tableName:_0x4a60[11],paranoid:true,indexes:[],timestamps:true})}
\ No newline at end of file
index 74072e5..38e9f27 100644 (file)
@@ -1 +1 @@
-var _0x63e4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x63e4[0];var _=require(_0x63e4[1]);var util=require(_0x63e4[2]);var moment=require(_0x63e4[3]);var BPromise=require(_0x63e4[4]);var rs=require(_0x63e4[5]);var fs=require(_0x63e4[6]);var db=require(_0x63e4[8])[_0x63e4[7]];var utils=require(_0x63e4[9]);var logger=require(_0x63e4[11])(_0x63e4[10]);var config=require(_0x63e4[12]);var jayson=require(_0x63e4[13]);var client=jayson[_0x63e4[15]][_0x63e4[14]]({port:9002});function respondWithRpcPromise(_0x432bxe,_0x432bxf,_0x432bx10){return  new BPromise(function(_0x432bx11,_0x432bx12){return client[_0x63e4[28]](_0x432bxe,_0x432bx10)[_0x63e4[27]](function(_0x432bx14){logger[_0x63e4[20]](_0x63e4[16],_0x432bxf,_0x63e4[19]);logger[_0x63e4[23]](_0x63e4[21],_0x432bxf,_0x63e4[19],JSON[_0x63e4[22]](_0x432bx14));if(_0x432bx14[_0x63e4[17]]){if(_0x432bx14[_0x63e4[17]][_0x63e4[24]]=== 500){logger[_0x63e4[17]](_0x63e4[16],_0x432bxf,_0x432bx14[_0x63e4[17]][_0x63e4[25]]);return _0x432bx12(_0x432bx14[_0x63e4[17]][_0x63e4[25]])};logger[_0x63e4[17]](_0x63e4[16],_0x432bxf,_0x432bx14[_0x63e4[17]][_0x63e4[25]]);return _0x432bx11(_0x432bx14[_0x63e4[17]][_0x63e4[25]])}else {logger[_0x63e4[20]](_0x63e4[16],_0x432bxf,_0x63e4[19]);_0x432bx11(_0x432bx14[_0x63e4[26]][_0x63e4[25]])}})[_0x63e4[18]](function(_0x432bx13){logger[_0x63e4[17]](_0x63e4[16],_0x432bxf,_0x432bx13);_0x432bx12(_0x432bx13)})})}
\ No newline at end of file
+var _0x95f7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x95f7[0];var _=require(_0x95f7[1]);var util=require(_0x95f7[2]);var moment=require(_0x95f7[3]);var BPromise=require(_0x95f7[4]);var rs=require(_0x95f7[5]);var fs=require(_0x95f7[6]);var db=require(_0x95f7[8])[_0x95f7[7]];var utils=require(_0x95f7[9]);var logger=require(_0x95f7[11])(_0x95f7[10]);var config=require(_0x95f7[12]);var jayson=require(_0x95f7[13]);var client=jayson[_0x95f7[15]][_0x95f7[14]]({port:9002});function respondWithRpcPromise(_0xa192xe,_0xa192xf,_0xa192x10){return  new BPromise(function(_0xa192x11,_0xa192x12){return client[_0x95f7[28]](_0xa192xe,_0xa192x10)[_0x95f7[27]](function(_0xa192x14){logger[_0x95f7[20]](_0x95f7[16],_0xa192xf,_0x95f7[19]);logger[_0x95f7[23]](_0x95f7[21],_0xa192xf,_0x95f7[19],JSON[_0x95f7[22]](_0xa192x14));if(_0xa192x14[_0x95f7[17]]){if(_0xa192x14[_0x95f7[17]][_0x95f7[24]]=== 500){logger[_0x95f7[17]](_0x95f7[16],_0xa192xf,_0xa192x14[_0x95f7[17]][_0x95f7[25]]);return _0xa192x12(_0xa192x14[_0x95f7[17]][_0x95f7[25]])};logger[_0x95f7[17]](_0x95f7[16],_0xa192xf,_0xa192x14[_0x95f7[17]][_0x95f7[25]]);return _0xa192x11(_0xa192x14[_0x95f7[17]][_0x95f7[25]])}else {logger[_0x95f7[20]](_0x95f7[16],_0xa192xf,_0x95f7[19]);_0xa192x11(_0xa192x14[_0x95f7[26]][_0x95f7[25]])}})[_0x95f7[18]](function(_0xa192x13){logger[_0x95f7[17]](_0x95f7[16],_0xa192xf,_0xa192x13);_0xa192x12(_0xa192x13)})})}
\ No newline at end of file
index aa1d32e..4d8540a 100644 (file)
@@ -1 +1 @@
-var _0xf76f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf76f[0];var multer=require(_0xf76f[1]);var util=require(_0xf76f[2]);var path=require(_0xf76f[3]);var express=require(_0xf76f[4]);var router=express.Router();var auth=require(_0xf76f[5]);var interaction=require(_0xf76f[6]);var config=require(_0xf76f[7]);var controller=require(_0xf76f[8]);router[_0xf76f[12]](_0xf76f[9],auth[_0xf76f[10]](),controller[_0xf76f[11]]);router[_0xf76f[12]](_0xf76f[13],auth[_0xf76f[10]](),controller[_0xf76f[14]]);router[_0xf76f[16]](_0xf76f[9],auth[_0xf76f[10]](),controller[_0xf76f[15]]);router[_0xf76f[18]](_0xf76f[13],auth[_0xf76f[10]](),controller[_0xf76f[17]]);router[_0xf76f[20]](_0xf76f[13],auth[_0xf76f[10]](),controller[_0xf76f[19]]);module[_0xf76f[21]]= router
\ No newline at end of file
+var _0x131f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x131f[0];var multer=require(_0x131f[1]);var util=require(_0x131f[2]);var path=require(_0x131f[3]);var express=require(_0x131f[4]);var router=express.Router();var auth=require(_0x131f[5]);var interaction=require(_0x131f[6]);var config=require(_0x131f[7]);var controller=require(_0x131f[8]);router[_0x131f[12]](_0x131f[9],auth[_0x131f[10]](),controller[_0x131f[11]]);router[_0x131f[12]](_0x131f[13],auth[_0x131f[10]](),controller[_0x131f[14]]);router[_0x131f[16]](_0x131f[9],auth[_0x131f[10]](),controller[_0x131f[15]]);router[_0x131f[18]](_0x131f[13],auth[_0x131f[10]](),controller[_0x131f[17]]);router[_0x131f[20]](_0x131f[13],auth[_0x131f[10]](),controller[_0x131f[19]]);module[_0x131f[21]]= router
\ No newline at end of file
index 018ae4b..f13efbd 100644 (file)
@@ -1 +1 @@
-var _0xb660=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x44\x41\x54\x45","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x49\x4E\x54\x45\x47\x45\x52","\x55\x4E\x53\x49\x47\x4E\x45\x44","\x63\x6F\x6E\x74\x61\x63\x74\x4C\x69\x73\x74\x51\x75\x65\x75\x65"];_0xb660[0];var moment=require(_0xb660[1]);var Sequelize=require(_0xb660[2]);module[_0xb660[3]]= {phone:{type:Sequelize[_0xb660[4]],allowNull:false},active:{type:Sequelize[_0xb660[5]],defaultValue:false},scheduledat:{type:Sequelize[_0xb660[6]],defaultValue:moment()[_0xb660[8]](_0xb660[7])},countbusyretry:{type:Sequelize[_0xb660[9]],defaultValue:0},countcongestionretry:{type:Sequelize[_0xb660[9]],defaultValue:0},countnoanswerretry:{type:Sequelize[_0xb660[9]],defaultValue:0},callback:{type:Sequelize[_0xb660[5]],defaultValue:false},callbackuniqueid:{type:Sequelize[_0xb660[4]],defaultValue:null},callbackat:{type:Sequelize[_0xb660[6]]},priority:{type:Sequelize.INTEGER(2)[_0xb660[10]],defaultValue:2,validate:{min:0,max:4}},recallme:{type:Sequelize[_0xb660[5]],defaultValue:false},ContactId:{type:Sequelize[_0xb660[9]],unique:_0xb660[11]},ListId:{type:Sequelize[_0xb660[9]],unique:_0xb660[11]},UserId:{type:Sequelize[_0xb660[9]]},VoiceQueueId:{type:Sequelize[_0xb660[9]],unique:_0xb660[11]},CampaignId:{type:Sequelize[_0xb660[9]]}}
\ No newline at end of file
+var _0xdf0e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x44\x41\x54\x45","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x49\x4E\x54\x45\x47\x45\x52","\x55\x4E\x53\x49\x47\x4E\x45\x44","\x63\x6F\x6E\x74\x61\x63\x74\x4C\x69\x73\x74\x51\x75\x65\x75\x65"];_0xdf0e[0];var moment=require(_0xdf0e[1]);var Sequelize=require(_0xdf0e[2]);module[_0xdf0e[3]]= {phone:{type:Sequelize[_0xdf0e[4]],allowNull:false},active:{type:Sequelize[_0xdf0e[5]],defaultValue:false},scheduledat:{type:Sequelize[_0xdf0e[6]],defaultValue:moment()[_0xdf0e[8]](_0xdf0e[7])},countbusyretry:{type:Sequelize[_0xdf0e[9]],defaultValue:0},countcongestionretry:{type:Sequelize[_0xdf0e[9]],defaultValue:0},countnoanswerretry:{type:Sequelize[_0xdf0e[9]],defaultValue:0},callback:{type:Sequelize[_0xdf0e[5]],defaultValue:false},callbackuniqueid:{type:Sequelize[_0xdf0e[4]],defaultValue:null},callbackat:{type:Sequelize[_0xdf0e[6]]},priority:{type:Sequelize.INTEGER(2)[_0xdf0e[10]],defaultValue:2,validate:{min:0,max:4}},recallme:{type:Sequelize[_0xdf0e[5]],defaultValue:false},ContactId:{type:Sequelize[_0xdf0e[9]],unique:_0xdf0e[11]},ListId:{type:Sequelize[_0xdf0e[9]],unique:_0xdf0e[11]},UserId:{type:Sequelize[_0xdf0e[9]]},VoiceQueueId:{type:Sequelize[_0xdf0e[9]],unique:_0xdf0e[11]},CampaignId:{type:Sequelize[_0xdf0e[9]]}}
\ No newline at end of file
index d026e0e..c79be28 100644 (file)
@@ -1 +1 @@
-var _0x2863=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x6F\x6D\x69\x74","\x73\x74\x61\x74\x65","\x73\x74\x61\x74\x65\x64\x65\x73\x63","\x64\x65\x6C\x65\x74\x65\x64","\x63\x61\x6D\x70\x61\x69\x67\x6E","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x75\x73\x65\x72","\x55\x73\x65\x72\x49\x64","\x64\x65\x6C\x65\x74\x65\x64\x61\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x70\x68\x6F\x6E\x65","\x63\x61\x6D\x70\x61\x69\x67\x6E\x74\x79\x70\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x71\x75\x65\x75\x65","\x69\x76\x72","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x66\x69\x6E\x61\x6C\x6C\x79","\x69\x73\x4E\x69\x6C","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x6C\x61\x73\x74\x4E\x61\x6D\x65","\x20","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x43\x61\x6D\x70\x61\x69\x67\x6E","\x67\x65\x74\x50\x72\x65\x76\x69\x65\x77","\x68\x6F\x70\x70\x65\x72\x49\x64\x73","\x69\x73\x45\x6D\x70\x74\x79","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x44\x45\x53\x43","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x64\x69\x61\x6C\x4F\x72\x64\x65\x72\x42\x79\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x41\x53\x43","\x55\x50\x44\x41\x54\x45","\x4C\x4F\x43\x4B","\x43\x6F\x6E\x74\x61\x63\x74","\x6D\x6F\x62\x69\x6C\x65","\x66\x61\x78","\x65\x6D\x61\x69\x6C","\x74\x61\x67\x73","\x43\x6D\x43\x6F\x6D\x70\x61\x6E\x79","\x43\x6F\x6D\x70\x61\x6E\x79","\x43\x6D\x4C\x69\x73\x74","\x4C\x69\x73\x74","\x51\x75\x65\x75\x65","\x64\x69\x61\x6C\x41\x63\x74\x69\x76\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x70\x72\x65\x76\x69\x65\x77","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4F\x70\x65\x6E\x43\x6F\x6E\x74\x61\x63\x74\x73","\x69\x73\x4E\x75\x6D\x62\x65\x72","\x43\x6D\x48\x6F\x70\x70\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x6E\x74\x69\x74\x79\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64"];_0x2863[0];var jsonpatch=require(_0x2863[1]);var rp=require(_0x2863[2]);var moment=require(_0x2863[3]);var BPromise=require(_0x2863[4]);var Mustache=require(_0x2863[5]);var util=require(_0x2863[6]);var path=require(_0x2863[7]);var sox=require(_0x2863[8]);var csv=require(_0x2863[9]);var ejs=require(_0x2863[10]);var fs=require(_0x2863[11]);var _=require(_0x2863[12]);var squel=require(_0x2863[13]);var crypto=require(_0x2863[14]);var jsforce=require(_0x2863[15]);var deskjs=require(_0x2863[16]);var toCsv=require(_0x2863[9]);var querystring=require(_0x2863[17]);var Papa=require(_0x2863[18]);var qs=require(_0x2863[19]);var logger=require(_0x2863[21])(_0x2863[20]);var utils=require(_0x2863[22]);var config=require(_0x2863[23]);var db=require(_0x2863[25])[_0x2863[24]];function respondWithStatusCode(_0x590cx1a,_0x590cx1b){_0x590cx1b= _0x590cx1b|| 204;return function(_0x590cx1c){if(_0x590cx1c){return _0x590cx1a[_0x2863[26]](_0x590cx1b)};return _0x590cx1a[_0x2863[28]](_0x590cx1b)[_0x2863[27]]()}}function respondWithResult(_0x590cx1a,_0x590cx1b){_0x590cx1b= _0x590cx1b|| 200;return function(_0x590cx1c){if(_0x590cx1c){return _0x590cx1a[_0x2863[28]](_0x590cx1b)[_0x2863[29]](_0x590cx1c)}}}function respondWithFilteredResult(_0x590cx1a,_0x590cx1f){return function(_0x590cx1c){if(_0x590cx1c){var _0x590cx20=_0x590cx1c[_0x2863[30]],_0x590cx21=_0x590cx1f[_0x2863[31]],_0x590cx22=_0x590cx1f[_0x2863[31]]+ _0x590cx1f[_0x2863[32]],_0x590cx1b;if(_0x590cx22>= _0x590cx20){_0x590cx22= _0x590cx20;_0x590cx1b= 200}else {_0x590cx1b= 206};_0x590cx1a[_0x2863[28]](_0x590cx1b);return _0x590cx1a[_0x2863[36]](_0x2863[33],_0x590cx21+ _0x2863[34]+ _0x590cx22+ _0x2863[35]+ _0x590cx20)[_0x2863[29]](_0x590cx1c)};return null}}function patchUpdates(_0x590cx24){return function(_0x590cx1c){try{jsonpatch[_0x2863[37]](_0x590cx1c,_0x590cx24,true)}catch(err){return BPromise[_0x2863[38]](err)};return _0x590cx1c[_0x2863[39]]()}}function saveUpdates(_0x590cx26,_0x590cx1b){return function(_0x590cx1c){if(_0x590cx1c){return _0x590cx1c[_0x2863[41]](_0x590cx26)[_0x2863[40]](function(_0x590cx27){return _0x590cx27})};return null}}function removeEntity(_0x590cx1a,_0x590cx1b){return function(_0x590cx1c){if(_0x590cx1c){return _0x590cx1c[_0x2863[42]]()[_0x2863[40]](function(){_0x590cx1a[_0x2863[28]](204)[_0x2863[27]]()})}}}function handleEntityNotFound(_0x590cx1a,_0x590cx1b){return function(_0x590cx1c){if(!_0x590cx1c){_0x590cx1a[_0x2863[26]](404)};return _0x590cx1c}}function handleError(_0x590cx1a,_0x590cx1b){_0x590cx1b= _0x590cx1b|| 500;return function(_0x590cx2b){logger[_0x2863[44]](_0x590cx2b[_0x2863[43]]);if(_0x590cx2b[_0x2863[45]]){delete _0x590cx2b[_0x2863[45]]};_0x590cx1a[_0x2863[28]](_0x590cx1b)[_0x2863[46]](_0x590cx2b)}}exports[_0x2863[47]]= function(_0x590cx2c,_0x590cx1a){var _0x590cx1f={},_0x590cx2d={},_0x590cx2e={count:0,rows:[]};_0x590cx2d[_0x2863[48]]= _[_0x2863[51]](db[_0x2863[50]][_0x2863[49]]);var _0x590cx2f={dateStart:_0x590cx2c[_0x2863[53]][_0x2863[52]],dateEnd:_0x590cx2c[_0x2863[53]][_0x2863[54]]};delete _0x590cx2c[_0x2863[53]][_0x2863[52]];delete _0x590cx2c[_0x2863[53]][_0x2863[54]];_0x590cx2d[_0x2863[53]]= _[_0x2863[51]](_0x590cx2c[_0x2863[53]]);_0x590cx2d[_0x2863[55]]= _[_0x2863[56]](_0x590cx2d[_0x2863[48]],_0x590cx2d[_0x2863[53]]);_0x590cx1f[_0x2863[57]]= _[_0x2863[56]](_0x590cx2d[_0x2863[48]],qs[_0x2863[58]](_0x590cx2c[_0x2863[53]][_0x2863[58]]));_0x590cx1f[_0x2863[57]]= (_0x590cx1f[_0x2863[57]][_0x2863[59]])?_0x590cx1f[_0x2863[57]]:_0x590cx2d[_0x2863[48]];if(!_0x590cx2c[_0x2863[53]][_0x2863[61]](_0x2863[60])){_0x590cx1f[_0x2863[32]]= qs[_0x2863[32]](_0x590cx2c[_0x2863[53]][_0x2863[32]]);_0x590cx1f[_0x2863[31]]= qs[_0x2863[31]](_0x590cx2c[_0x2863[53]][_0x2863[31]])};_0x590cx1f[_0x2863[62]]= qs[_0x2863[63]](_0x590cx2c[_0x2863[53]][_0x2863[63]]);_0x590cx1f[_0x2863[64]]= qs[_0x2863[55]](_[_0x2863[65]](_0x590cx2c[_0x2863[53]],_0x590cx2d[_0x2863[55]]));if(_0x590cx2f[_0x2863[52]]){if(_0x590cx2f[_0x2863[54]]){_0x590cx2f[_0x2863[54]]= moment(_0x590cx2f[_0x2863[54]])[_0x2863[67]](1,_0x2863[66])}else {_0x590cx2f[_0x2863[54]]= moment(_0x590cx2f[_0x2863[52]])[_0x2863[67]](1,_0x2863[66])};_[_0x2863[68]](_0x590cx1f[_0x2863[64]],{createdAt:{$gte:_0x590cx2f[_0x2863[52]],$lte:_0x590cx2f[_0x2863[54]]}})};if(_0x590cx2c[_0x2863[53]][_0x2863[69]]){_0x590cx1f[_0x2863[64]]= _[_0x2863[68]](_0x590cx1f[_0x2863[64]],{$or:_[_0x2863[71]](_0x590cx1f[_0x2863[57]],function(_0x590cx30){var _0x590cx2e={};_0x590cx2e[_0x590cx30]= {$like:_0x2863[70]+ _0x590cx2c[_0x2863[53]][_0x2863[69]]+ _0x2863[70]};return _0x590cx2e})})};_0x590cx1f= _[_0x2863[68]]({},_0x590cx1f,_0x590cx2c[_0x2863[72]]);var _0x590cx31={where:_0x590cx1f[_0x2863[64]]};return db[_0x2863[50]][_0x2863[30]](_0x590cx31)[_0x2863[40]](function(_0x590cx20){_0x590cx2e[_0x2863[30]]= _0x590cx20;if(_0x590cx2c[_0x2863[53]][_0x2863[75]]){_0x590cx1f[_0x2863[76]]= [{all:true}]};return db[_0x2863[50]][_0x2863[77]](_0x590cx1f)})[_0x2863[40]](function(_0x590cx32){_0x590cx2e[_0x2863[74]]= _0x590cx32;return _0x590cx2e})[_0x2863[40]](respondWithFilteredResult(_0x590cx1a,_0x590cx1f))[_0x2863[73]](handleError(_0x590cx1a,null))};exports[_0x2863[78]]= function(_0x590cx2c,_0x590cx1a){var _0x590cx1f={raw:true,where:{id:_0x590cx2c[_0x2863[80]][_0x2863[79]]}},_0x590cx2d={};_0x590cx2d[_0x2863[48]]= _[_0x2863[51]](db[_0x2863[50]][_0x2863[49]]);_0x590cx2d[_0x2863[53]]= _[_0x2863[51]](_0x590cx2c[_0x2863[53]]);_0x590cx2d[_0x2863[55]]= _[_0x2863[56]](_0x590cx2d[_0x2863[48]],_0x590cx2d[_0x2863[53]]);_0x590cx1f[_0x2863[57]]= _[_0x2863[56]](_0x590cx2d[_0x2863[48]],qs[_0x2863[58]](_0x590cx2c[_0x2863[53]][_0x2863[58]]));_0x590cx1f[_0x2863[57]]= (_0x590cx1f[_0x2863[57]][_0x2863[59]])?_0x590cx1f[_0x2863[57]]:_0x590cx2d[_0x2863[48]];if(_0x590cx2c[_0x2863[53]][_0x2863[75]]){_0x590cx1f[_0x2863[76]]= [{all:true}]};_0x590cx1f= _[_0x2863[68]]({},_0x590cx1f,_0x590cx2c[_0x2863[72]]);return db[_0x2863[50]][_0x2863[81]](_0x590cx1f)[_0x2863[40]](handleEntityNotFound(_0x590cx1a,null))[_0x2863[40]](respondWithResult(_0x590cx1a,null))[_0x2863[73]](handleError(_0x590cx1a,null))};exports[_0x2863[82]]= function(_0x590cx2c,_0x590cx1a){return db[_0x2863[50]][_0x2863[82]](_0x590cx2c[_0x2863[83]],{})[_0x2863[40]](respondWithResult(_0x590cx1a,201))[_0x2863[73]](handleError(_0x590cx1a,null))};exports[_0x2863[41]]= function(_0x590cx2c,_0x590cx1a){if(_0x590cx2c[_0x2863[83]][_0x2863[79]]){delete _0x590cx2c[_0x2863[83]][_0x2863[79]]};return db[_0x2863[50]][_0x2863[81]]({where:{id:_0x590cx2c[_0x2863[80]][_0x2863[79]]}})[_0x2863[40]](handleEntityNotFound(_0x590cx1a,null))[_0x2863[40]](saveUpdates(_0x590cx2c[_0x2863[83]],null))[_0x2863[40]](respondWithResult(_0x590cx1a,null))[_0x2863[73]](handleError(_0x590cx1a,null))};exports[_0x2863[84]]= function(_0x590cx2c,_0x590cx1a){return db[_0x2863[50]][_0x2863[84]]()[_0x2863[40]](respondWithResult(_0x590cx1a,null))[_0x2863[73]](handleError(_0x590cx1a,null))};exports[_0x2863[42]]= function(_0x590cx2c,_0x590cx1a){var _0x590cx33;return db[_0x2863[50]][_0x2863[81]]({where:{id:_0x590cx2c[_0x2863[80]][_0x2863[79]]}})[_0x2863[40]](handleEntityNotFound(_0x590cx1a,null))[_0x2863[40]](function(_0x590cx1c){if(_0x590cx1c){return _0x590cx1c[_0x2863[42]]()[_0x2863[40]](function(_0x590cx1c){return _0x590cx1c})}})[_0x2863[40]](function(_0x590cx1c){_0x590cx33= _0x590cx1c;if(_0x590cx1c){if(_0x590cx1c[_0x2863[102]]|| _0x590cx1c[_0x2863[114]]){return db[_0x590cx1c[_0x2863[102]]?_0x2863[115]:_0x2863[116]][_0x2863[81]]({where:{id:_0x590cx1c[_0x2863[102]]?_0x590cx1c[_0x2863[102]]:_0x590cx1c[_0x2863[114]]},attributes:[_0x2863[79],_0x2863[45]],raw:true})}}})[_0x2863[40]](function(_0x590cx1c){var _0x590cx2e={};if(_0x590cx1c){_[_0x2863[68]](_0x590cx2e,_[_0x2863[88]](_0x590cx33[_0x2863[85]],[_0x2863[86],_0x2863[87],_0x2863[79]]));_0x590cx2e[_0x2863[89]]= 21;_0x590cx2e[_0x2863[90]]= _0x2863[91];_0x590cx2e[_0x2863[92]]= _0x590cx1c[_0x2863[45]];_0x590cx2e[_0x2863[93]]= _0x590cx2c[_0x2863[94]][_0x2863[45]];_0x590cx2e[_0x2863[95]]= _0x590cx2c[_0x2863[94]][_0x2863[79]];_0x590cx2e[_0x2863[91]]= true;_0x590cx2e[_0x2863[96]]= moment()[_0x2863[98]](_0x2863[97]);_0x590cx2e[_0x2863[99]]= _0x590cx33[_0x2863[100]];_0x590cx2e[_0x2863[101]]= _0x590cx33[_0x2863[102]]?_0x2863[103]:_0x2863[104];return db[_0x2863[113]][_0x2863[81]]({where:{id:_0x590cx2e[_0x2863[112]]},attributes:[_0x2863[108],_0x2863[110]]})[_0x2863[40]](function(_0x590cx34){if(!_[_0x2863[107]](_0x590cx1a)&&  !_[_0x2863[107]](_0x590cx34[_0x2863[108]])){_0x590cx2e[_0x2863[109]]= _0x590cx34[_0x2863[108]];if(!_[_0x2863[107]](_0x590cx34[_0x2863[110]])){_0x590cx2e[_0x2863[109]]+= _0x2863[111]+ _0x590cx34[_0x2863[110]]}}})[_0x2863[106]](function(){return db[_0x2863[105]][_0x2863[82]](_0x590cx2e)})}})[_0x2863[40]](function(){return _0x590cx1a[_0x2863[28]](204)[_0x2863[27]]()})[_0x2863[73]](handleError(_0x590cx1a,null))};exports[_0x2863[117]]= function(_0x590cx2c,_0x590cx1a,_0x590cx35){return _0x590cx2c[_0x2863[94]][_0x2863[144]]({where:{type:_0x2863[142],dialActive:true,dialMethod:_0x2863[143]},attributes:[_0x2863[79],_0x2863[124]],raw:true})[_0x2863[40]](function(_0x590cx36){if(_0x590cx36&& _0x590cx36[_0x2863[59]]){return db[_0x2863[141]][_0x2863[140]](function(_0x590cx37){var _0x590cx38={active:false,recallme:false,scheduledAt:{$lte:moment()[_0x2863[98]](_0x2863[97])},VoiceQueueId:{$in:_[_0x2863[71]](_0x590cx36,_0x2863[79])},$or:[{UserId:null},{UserId:_0x590cx2c[_0x2863[94]][_0x2863[79]]}]};if(!_[_0x2863[119]](_0x590cx2c[_0x2863[83]][_0x2863[118]])){var _0x590cx39={"\x24\x6E\x6F\x74\x49\x6E":_0x590cx2c[_0x2863[83]][_0x2863[118]]};_0x590cx38[_0x2863[79]]= _0x590cx39};return db[_0x2863[50]][_0x2863[139]]({attributes:[_0x2863[79],_0x2863[120]],where:_0x590cx38,order:[[_0x2863[121],_0x2863[122]],[_0x2863[123],_0x590cx36[0][_0x2863[124]]],[_0x2863[95],_0x2863[122]],[_0x2863[79],_0x2863[125]]],transaction:_0x590cx37,lock:_0x590cx37[_0x2863[127]][_0x2863[126]],include:[{model:db[_0x2863[113]],as:_0x2863[128],attributes:[_0x2863[79],_0x2863[108],_0x2863[110],_0x2863[100],_0x2863[129],_0x2863[130],_0x2863[131],_0x2863[132]],include:[{model:db[_0x2863[133]],as:_0x2863[134],attributes:[_0x2863[79],_0x2863[45]]}]},{model:db[_0x2863[135]],as:_0x2863[136],attributes:[_0x2863[79],_0x2863[45]]},{model:db[_0x2863[115]],as:_0x2863[137],attributes:[_0x2863[79],_0x2863[45],_0x2863[138]]}]})[_0x2863[40]](function(_0x590cx1c){if(_0x590cx1c){return _0x590cx1c[_0x2863[41]]({UserId:_0x590cx2c[_0x2863[94]][_0x2863[79]]},{transaction:_0x590cx37})}})})}})[_0x2863[40]](handleEntityNotFound(_0x590cx1a,null))[_0x2863[40]](respondWithResult(_0x590cx1a,null))[_0x2863[73]](handleError(_0x590cx1a,null))};exports[_0x2863[145]]= function(_0x590cx2c,_0x590cx1a,_0x590cx35){return _0x590cx2c[_0x2863[94]][_0x2863[144]]({where:{type:_0x2863[142],dialActive:true,dialMethod:_0x2863[143]},attributes:[_0x2863[79]],raw:true})[_0x2863[40]](function(_0x590cx36){if(_0x590cx36&& _0x590cx36[_0x2863[59]]){return db[_0x2863[50]][_0x2863[30]]({where:{active:false,recallme:false,scheduledAt:{$lte:moment()[_0x2863[98]](_0x2863[97])},VoiceQueueId:{$in:_[_0x2863[71]](_0x590cx36,_0x2863[79])},$or:[{UserId:null},{UserId:_0x590cx2c[_0x2863[94]][_0x2863[79]]}]}})};return 0})[_0x2863[40]](function(_0x590cx1c){if(!_[_0x2863[107]](_0x590cx1c)&& _[_0x2863[146]](_0x590cx1c)){return _0x590cx1a[_0x2863[28]](200)[_0x2863[29]]({contacts:_0x590cx1c})}else {logger[_0x2863[44]](_0x2863[147],_0x2863[145],404,_0x2863[148]);_0x590cx1a[_0x2863[26]](404)}})[_0x2863[73]](handleError(_0x590cx1a,null))}
\ No newline at end of file
+var _0x43fa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x6F\x6D\x69\x74","\x73\x74\x61\x74\x65","\x73\x74\x61\x74\x65\x64\x65\x73\x63","\x64\x65\x6C\x65\x74\x65\x64","\x63\x61\x6D\x70\x61\x69\x67\x6E","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x75\x73\x65\x72","\x55\x73\x65\x72\x49\x64","\x64\x65\x6C\x65\x74\x65\x64\x61\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x70\x68\x6F\x6E\x65","\x63\x61\x6D\x70\x61\x69\x67\x6E\x74\x79\x70\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x71\x75\x65\x75\x65","\x69\x76\x72","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x66\x69\x6E\x61\x6C\x6C\x79","\x69\x73\x4E\x69\x6C","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x6C\x61\x73\x74\x4E\x61\x6D\x65","\x20","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x43\x61\x6D\x70\x61\x69\x67\x6E","\x67\x65\x74\x50\x72\x65\x76\x69\x65\x77","\x68\x6F\x70\x70\x65\x72\x49\x64\x73","\x69\x73\x45\x6D\x70\x74\x79","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x44\x45\x53\x43","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x64\x69\x61\x6C\x4F\x72\x64\x65\x72\x42\x79\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x41\x53\x43","\x55\x50\x44\x41\x54\x45","\x4C\x4F\x43\x4B","\x43\x6F\x6E\x74\x61\x63\x74","\x6D\x6F\x62\x69\x6C\x65","\x66\x61\x78","\x65\x6D\x61\x69\x6C","\x74\x61\x67\x73","\x43\x6D\x43\x6F\x6D\x70\x61\x6E\x79","\x43\x6F\x6D\x70\x61\x6E\x79","\x43\x6D\x4C\x69\x73\x74","\x4C\x69\x73\x74","\x51\x75\x65\x75\x65","\x64\x69\x61\x6C\x41\x63\x74\x69\x76\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x70\x72\x65\x76\x69\x65\x77","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4F\x70\x65\x6E\x43\x6F\x6E\x74\x61\x63\x74\x73","\x69\x73\x4E\x75\x6D\x62\x65\x72","\x43\x6D\x48\x6F\x70\x70\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x6E\x74\x69\x74\x79\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64"];_0x43fa[0];var jsonpatch=require(_0x43fa[1]);var rp=require(_0x43fa[2]);var moment=require(_0x43fa[3]);var BPromise=require(_0x43fa[4]);var Mustache=require(_0x43fa[5]);var util=require(_0x43fa[6]);var path=require(_0x43fa[7]);var sox=require(_0x43fa[8]);var csv=require(_0x43fa[9]);var ejs=require(_0x43fa[10]);var fs=require(_0x43fa[11]);var _=require(_0x43fa[12]);var squel=require(_0x43fa[13]);var crypto=require(_0x43fa[14]);var jsforce=require(_0x43fa[15]);var deskjs=require(_0x43fa[16]);var toCsv=require(_0x43fa[9]);var querystring=require(_0x43fa[17]);var Papa=require(_0x43fa[18]);var qs=require(_0x43fa[19]);var logger=require(_0x43fa[21])(_0x43fa[20]);var utils=require(_0x43fa[22]);var config=require(_0x43fa[23]);var db=require(_0x43fa[25])[_0x43fa[24]];function respondWithStatusCode(_0xb0fex1a,_0xb0fex1b){_0xb0fex1b= _0xb0fex1b|| 204;return function(_0xb0fex1c){if(_0xb0fex1c){return _0xb0fex1a[_0x43fa[26]](_0xb0fex1b)};return _0xb0fex1a[_0x43fa[28]](_0xb0fex1b)[_0x43fa[27]]()}}function respondWithResult(_0xb0fex1a,_0xb0fex1b){_0xb0fex1b= _0xb0fex1b|| 200;return function(_0xb0fex1c){if(_0xb0fex1c){return _0xb0fex1a[_0x43fa[28]](_0xb0fex1b)[_0x43fa[29]](_0xb0fex1c)}}}function respondWithFilteredResult(_0xb0fex1a,_0xb0fex1f){return function(_0xb0fex1c){if(_0xb0fex1c){var _0xb0fex20=_0xb0fex1c[_0x43fa[30]],_0xb0fex21=_0xb0fex1f[_0x43fa[31]],_0xb0fex22=_0xb0fex1f[_0x43fa[31]]+ _0xb0fex1f[_0x43fa[32]],_0xb0fex1b;if(_0xb0fex22>= _0xb0fex20){_0xb0fex22= _0xb0fex20;_0xb0fex1b= 200}else {_0xb0fex1b= 206};_0xb0fex1a[_0x43fa[28]](_0xb0fex1b);return _0xb0fex1a[_0x43fa[36]](_0x43fa[33],_0xb0fex21+ _0x43fa[34]+ _0xb0fex22+ _0x43fa[35]+ _0xb0fex20)[_0x43fa[29]](_0xb0fex1c)};return null}}function patchUpdates(_0xb0fex24){return function(_0xb0fex1c){try{jsonpatch[_0x43fa[37]](_0xb0fex1c,_0xb0fex24,true)}catch(err){return BPromise[_0x43fa[38]](err)};return _0xb0fex1c[_0x43fa[39]]()}}function saveUpdates(_0xb0fex26,_0xb0fex1b){return function(_0xb0fex1c){if(_0xb0fex1c){return _0xb0fex1c[_0x43fa[41]](_0xb0fex26)[_0x43fa[40]](function(_0xb0fex27){return _0xb0fex27})};return null}}function removeEntity(_0xb0fex1a,_0xb0fex1b){return function(_0xb0fex1c){if(_0xb0fex1c){return _0xb0fex1c[_0x43fa[42]]()[_0x43fa[40]](function(){_0xb0fex1a[_0x43fa[28]](204)[_0x43fa[27]]()})}}}function handleEntityNotFound(_0xb0fex1a,_0xb0fex1b){return function(_0xb0fex1c){if(!_0xb0fex1c){_0xb0fex1a[_0x43fa[26]](404)};return _0xb0fex1c}}function handleError(_0xb0fex1a,_0xb0fex1b){_0xb0fex1b= _0xb0fex1b|| 500;return function(_0xb0fex2b){logger[_0x43fa[44]](_0xb0fex2b[_0x43fa[43]]);if(_0xb0fex2b[_0x43fa[45]]){delete _0xb0fex2b[_0x43fa[45]]};_0xb0fex1a[_0x43fa[28]](_0xb0fex1b)[_0x43fa[46]](_0xb0fex2b)}}exports[_0x43fa[47]]= function(_0xb0fex2c,_0xb0fex1a){var _0xb0fex1f={},_0xb0fex2d={},_0xb0fex2e={count:0,rows:[]};_0xb0fex2d[_0x43fa[48]]= _[_0x43fa[51]](db[_0x43fa[50]][_0x43fa[49]]);var _0xb0fex2f={dateStart:_0xb0fex2c[_0x43fa[53]][_0x43fa[52]],dateEnd:_0xb0fex2c[_0x43fa[53]][_0x43fa[54]]};delete _0xb0fex2c[_0x43fa[53]][_0x43fa[52]];delete _0xb0fex2c[_0x43fa[53]][_0x43fa[54]];_0xb0fex2d[_0x43fa[53]]= _[_0x43fa[51]](_0xb0fex2c[_0x43fa[53]]);_0xb0fex2d[_0x43fa[55]]= _[_0x43fa[56]](_0xb0fex2d[_0x43fa[48]],_0xb0fex2d[_0x43fa[53]]);_0xb0fex1f[_0x43fa[57]]= _[_0x43fa[56]](_0xb0fex2d[_0x43fa[48]],qs[_0x43fa[58]](_0xb0fex2c[_0x43fa[53]][_0x43fa[58]]));_0xb0fex1f[_0x43fa[57]]= (_0xb0fex1f[_0x43fa[57]][_0x43fa[59]])?_0xb0fex1f[_0x43fa[57]]:_0xb0fex2d[_0x43fa[48]];if(!_0xb0fex2c[_0x43fa[53]][_0x43fa[61]](_0x43fa[60])){_0xb0fex1f[_0x43fa[32]]= qs[_0x43fa[32]](_0xb0fex2c[_0x43fa[53]][_0x43fa[32]]);_0xb0fex1f[_0x43fa[31]]= qs[_0x43fa[31]](_0xb0fex2c[_0x43fa[53]][_0x43fa[31]])};_0xb0fex1f[_0x43fa[62]]= qs[_0x43fa[63]](_0xb0fex2c[_0x43fa[53]][_0x43fa[63]]);_0xb0fex1f[_0x43fa[64]]= qs[_0x43fa[55]](_[_0x43fa[65]](_0xb0fex2c[_0x43fa[53]],_0xb0fex2d[_0x43fa[55]]));if(_0xb0fex2f[_0x43fa[52]]){if(_0xb0fex2f[_0x43fa[54]]){_0xb0fex2f[_0x43fa[54]]= moment(_0xb0fex2f[_0x43fa[54]])[_0x43fa[67]](1,_0x43fa[66])}else {_0xb0fex2f[_0x43fa[54]]= moment(_0xb0fex2f[_0x43fa[52]])[_0x43fa[67]](1,_0x43fa[66])};_[_0x43fa[68]](_0xb0fex1f[_0x43fa[64]],{createdAt:{$gte:_0xb0fex2f[_0x43fa[52]],$lte:_0xb0fex2f[_0x43fa[54]]}})};if(_0xb0fex2c[_0x43fa[53]][_0x43fa[69]]){_0xb0fex1f[_0x43fa[64]]= _[_0x43fa[68]](_0xb0fex1f[_0x43fa[64]],{$or:_[_0x43fa[71]](_0xb0fex1f[_0x43fa[57]],function(_0xb0fex30){var _0xb0fex2e={};_0xb0fex2e[_0xb0fex30]= {$like:_0x43fa[70]+ _0xb0fex2c[_0x43fa[53]][_0x43fa[69]]+ _0x43fa[70]};return _0xb0fex2e})})};_0xb0fex1f= _[_0x43fa[68]]({},_0xb0fex1f,_0xb0fex2c[_0x43fa[72]]);var _0xb0fex31={where:_0xb0fex1f[_0x43fa[64]]};return db[_0x43fa[50]][_0x43fa[30]](_0xb0fex31)[_0x43fa[40]](function(_0xb0fex20){_0xb0fex2e[_0x43fa[30]]= _0xb0fex20;if(_0xb0fex2c[_0x43fa[53]][_0x43fa[75]]){_0xb0fex1f[_0x43fa[76]]= [{all:true}]};return db[_0x43fa[50]][_0x43fa[77]](_0xb0fex1f)})[_0x43fa[40]](function(_0xb0fex32){_0xb0fex2e[_0x43fa[74]]= _0xb0fex32;return _0xb0fex2e})[_0x43fa[40]](respondWithFilteredResult(_0xb0fex1a,_0xb0fex1f))[_0x43fa[73]](handleError(_0xb0fex1a,null))};exports[_0x43fa[78]]= function(_0xb0fex2c,_0xb0fex1a){var _0xb0fex1f={raw:true,where:{id:_0xb0fex2c[_0x43fa[80]][_0x43fa[79]]}},_0xb0fex2d={};_0xb0fex2d[_0x43fa[48]]= _[_0x43fa[51]](db[_0x43fa[50]][_0x43fa[49]]);_0xb0fex2d[_0x43fa[53]]= _[_0x43fa[51]](_0xb0fex2c[_0x43fa[53]]);_0xb0fex2d[_0x43fa[55]]= _[_0x43fa[56]](_0xb0fex2d[_0x43fa[48]],_0xb0fex2d[_0x43fa[53]]);_0xb0fex1f[_0x43fa[57]]= _[_0x43fa[56]](_0xb0fex2d[_0x43fa[48]],qs[_0x43fa[58]](_0xb0fex2c[_0x43fa[53]][_0x43fa[58]]));_0xb0fex1f[_0x43fa[57]]= (_0xb0fex1f[_0x43fa[57]][_0x43fa[59]])?_0xb0fex1f[_0x43fa[57]]:_0xb0fex2d[_0x43fa[48]];if(_0xb0fex2c[_0x43fa[53]][_0x43fa[75]]){_0xb0fex1f[_0x43fa[76]]= [{all:true}]};_0xb0fex1f= _[_0x43fa[68]]({},_0xb0fex1f,_0xb0fex2c[_0x43fa[72]]);return db[_0x43fa[50]][_0x43fa[81]](_0xb0fex1f)[_0x43fa[40]](handleEntityNotFound(_0xb0fex1a,null))[_0x43fa[40]](respondWithResult(_0xb0fex1a,null))[_0x43fa[73]](handleError(_0xb0fex1a,null))};exports[_0x43fa[82]]= function(_0xb0fex2c,_0xb0fex1a){return db[_0x43fa[50]][_0x43fa[82]](_0xb0fex2c[_0x43fa[83]],{})[_0x43fa[40]](respondWithResult(_0xb0fex1a,201))[_0x43fa[73]](handleError(_0xb0fex1a,null))};exports[_0x43fa[41]]= function(_0xb0fex2c,_0xb0fex1a){if(_0xb0fex2c[_0x43fa[83]][_0x43fa[79]]){delete _0xb0fex2c[_0x43fa[83]][_0x43fa[79]]};return db[_0x43fa[50]][_0x43fa[81]]({where:{id:_0xb0fex2c[_0x43fa[80]][_0x43fa[79]]}})[_0x43fa[40]](handleEntityNotFound(_0xb0fex1a,null))[_0x43fa[40]](saveUpdates(_0xb0fex2c[_0x43fa[83]],null))[_0x43fa[40]](respondWithResult(_0xb0fex1a,null))[_0x43fa[73]](handleError(_0xb0fex1a,null))};exports[_0x43fa[84]]= function(_0xb0fex2c,_0xb0fex1a){return db[_0x43fa[50]][_0x43fa[84]]()[_0x43fa[40]](respondWithResult(_0xb0fex1a,null))[_0x43fa[73]](handleError(_0xb0fex1a,null))};exports[_0x43fa[42]]= function(_0xb0fex2c,_0xb0fex1a){var _0xb0fex33;return db[_0x43fa[50]][_0x43fa[81]]({where:{id:_0xb0fex2c[_0x43fa[80]][_0x43fa[79]]}})[_0x43fa[40]](handleEntityNotFound(_0xb0fex1a,null))[_0x43fa[40]](function(_0xb0fex1c){if(_0xb0fex1c){return _0xb0fex1c[_0x43fa[42]]()[_0x43fa[40]](function(_0xb0fex1c){return _0xb0fex1c})}})[_0x43fa[40]](function(_0xb0fex1c){_0xb0fex33= _0xb0fex1c;if(_0xb0fex1c){if(_0xb0fex1c[_0x43fa[102]]|| _0xb0fex1c[_0x43fa[114]]){return db[_0xb0fex1c[_0x43fa[102]]?_0x43fa[115]:_0x43fa[116]][_0x43fa[81]]({where:{id:_0xb0fex1c[_0x43fa[102]]?_0xb0fex1c[_0x43fa[102]]:_0xb0fex1c[_0x43fa[114]]},attributes:[_0x43fa[79],_0x43fa[45]],raw:true})}}})[_0x43fa[40]](function(_0xb0fex1c){var _0xb0fex2e={};if(_0xb0fex1c){_[_0x43fa[68]](_0xb0fex2e,_[_0x43fa[88]](_0xb0fex33[_0x43fa[85]],[_0x43fa[86],_0x43fa[87],_0x43fa[79]]));_0xb0fex2e[_0x43fa[89]]= 21;_0xb0fex2e[_0x43fa[90]]= _0x43fa[91];_0xb0fex2e[_0x43fa[92]]= _0xb0fex1c[_0x43fa[45]];_0xb0fex2e[_0x43fa[93]]= _0xb0fex2c[_0x43fa[94]][_0x43fa[45]];_0xb0fex2e[_0x43fa[95]]= _0xb0fex2c[_0x43fa[94]][_0x43fa[79]];_0xb0fex2e[_0x43fa[91]]= true;_0xb0fex2e[_0x43fa[96]]= moment()[_0x43fa[98]](_0x43fa[97]);_0xb0fex2e[_0x43fa[99]]= _0xb0fex33[_0x43fa[100]];_0xb0fex2e[_0x43fa[101]]= _0xb0fex33[_0x43fa[102]]?_0x43fa[103]:_0x43fa[104];return db[_0x43fa[113]][_0x43fa[81]]({where:{id:_0xb0fex2e[_0x43fa[112]]},attributes:[_0x43fa[108],_0x43fa[110]]})[_0x43fa[40]](function(_0xb0fex34){if(!_[_0x43fa[107]](_0xb0fex1a)&&  !_[_0x43fa[107]](_0xb0fex34[_0x43fa[108]])){_0xb0fex2e[_0x43fa[109]]= _0xb0fex34[_0x43fa[108]];if(!_[_0x43fa[107]](_0xb0fex34[_0x43fa[110]])){_0xb0fex2e[_0x43fa[109]]+= _0x43fa[111]+ _0xb0fex34[_0x43fa[110]]}}})[_0x43fa[106]](function(){return db[_0x43fa[105]][_0x43fa[82]](_0xb0fex2e)})}})[_0x43fa[40]](function(){return _0xb0fex1a[_0x43fa[28]](204)[_0x43fa[27]]()})[_0x43fa[73]](handleError(_0xb0fex1a,null))};exports[_0x43fa[117]]= function(_0xb0fex2c,_0xb0fex1a,_0xb0fex35){return _0xb0fex2c[_0x43fa[94]][_0x43fa[144]]({where:{type:_0x43fa[142],dialActive:true,dialMethod:_0x43fa[143]},attributes:[_0x43fa[79],_0x43fa[124]],raw:true})[_0x43fa[40]](function(_0xb0fex36){if(_0xb0fex36&& _0xb0fex36[_0x43fa[59]]){return db[_0x43fa[141]][_0x43fa[140]](function(_0xb0fex37){var _0xb0fex38={active:false,recallme:false,scheduledAt:{$lte:moment()[_0x43fa[98]](_0x43fa[97])},VoiceQueueId:{$in:_[_0x43fa[71]](_0xb0fex36,_0x43fa[79])},$or:[{UserId:null},{UserId:_0xb0fex2c[_0x43fa[94]][_0x43fa[79]]}]};if(!_[_0x43fa[119]](_0xb0fex2c[_0x43fa[83]][_0x43fa[118]])){var _0xb0fex39={"\x24\x6E\x6F\x74\x49\x6E":_0xb0fex2c[_0x43fa[83]][_0x43fa[118]]};_0xb0fex38[_0x43fa[79]]= _0xb0fex39};return db[_0x43fa[50]][_0x43fa[139]]({attributes:[_0x43fa[79],_0x43fa[120]],where:_0xb0fex38,order:[[_0x43fa[121],_0x43fa[122]],[_0x43fa[123],_0xb0fex36[0][_0x43fa[124]]],[_0x43fa[95],_0x43fa[122]],[_0x43fa[79],_0x43fa[125]]],transaction:_0xb0fex37,lock:_0xb0fex37[_0x43fa[127]][_0x43fa[126]],include:[{model:db[_0x43fa[113]],as:_0x43fa[128],attributes:[_0x43fa[79],_0x43fa[108],_0x43fa[110],_0x43fa[100],_0x43fa[129],_0x43fa[130],_0x43fa[131],_0x43fa[132]],include:[{model:db[_0x43fa[133]],as:_0x43fa[134],attributes:[_0x43fa[79],_0x43fa[45]]}]},{model:db[_0x43fa[135]],as:_0x43fa[136],attributes:[_0x43fa[79],_0x43fa[45]]},{model:db[_0x43fa[115]],as:_0x43fa[137],attributes:[_0x43fa[79],_0x43fa[45],_0x43fa[138]]}]})[_0x43fa[40]](function(_0xb0fex1c){if(_0xb0fex1c){return _0xb0fex1c[_0x43fa[41]]({UserId:_0xb0fex2c[_0x43fa[94]][_0x43fa[79]]},{transaction:_0xb0fex37})}})})}})[_0x43fa[40]](handleEntityNotFound(_0xb0fex1a,null))[_0x43fa[40]](respondWithResult(_0xb0fex1a,null))[_0x43fa[73]](handleError(_0xb0fex1a,null))};exports[_0x43fa[145]]= function(_0xb0fex2c,_0xb0fex1a,_0xb0fex35){return _0xb0fex2c[_0x43fa[94]][_0x43fa[144]]({where:{type:_0x43fa[142],dialActive:true,dialMethod:_0x43fa[143]},attributes:[_0x43fa[79]],raw:true})[_0x43fa[40]](function(_0xb0fex36){if(_0xb0fex36&& _0xb0fex36[_0x43fa[59]]){return db[_0x43fa[50]][_0x43fa[30]]({where:{active:false,recallme:false,scheduledAt:{$lte:moment()[_0x43fa[98]](_0x43fa[97])},VoiceQueueId:{$in:_[_0x43fa[71]](_0xb0fex36,_0x43fa[79])},$or:[{UserId:null},{UserId:_0xb0fex2c[_0x43fa[94]][_0x43fa[79]]}]}})};return 0})[_0x43fa[40]](function(_0xb0fex1c){if(!_[_0x43fa[107]](_0xb0fex1c)&& _[_0x43fa[146]](_0xb0fex1c)){return _0xb0fex1a[_0x43fa[28]](200)[_0x43fa[29]]({contacts:_0xb0fex1c})}else {logger[_0x43fa[44]](_0x43fa[147],_0x43fa[145],404,_0x43fa[148]);_0xb0fex1a[_0x43fa[26]](404)}})[_0x43fa[73]](handleError(_0xb0fex1a,null))}
\ No newline at end of file
index dcdfde1..0640e8b 100644 (file)
@@ -1 +1 @@
-var _0xc7a8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x70\x68\x6F\x6E\x65","\x70\x72\x69\x6F\x72\x69\x74\x79","\x64\x65\x66\x69\x6E\x65"];_0xc7a8[0];var _=require(_0xc7a8[1]);var util=require(_0xc7a8[2]);var logger=require(_0xc7a8[4])(_0xc7a8[3]);var moment=require(_0xc7a8[5]);var BPromise=require(_0xc7a8[6]);var rp=require(_0xc7a8[7]);var attributes=require(_0xc7a8[8]);module[_0xc7a8[9]]= function(_0x8309x8,_0x8309x9){return _0x8309x8[_0xc7a8[15]](_0xc7a8[10],attributes,{tableName:_0xc7a8[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0xc7a8[12],"\x66\x69\x65\x6C\x64\x73":[_0xc7a8[12]]},{"\x6E\x61\x6D\x65":_0xc7a8[13],"\x66\x69\x65\x6C\x64\x73":[_0xc7a8[13]]},{"\x6E\x61\x6D\x65":_0xc7a8[14],"\x66\x69\x65\x6C\x64\x73":[_0xc7a8[14]]}],timestamps:true})}
\ No newline at end of file
+var _0x9dcd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x70\x68\x6F\x6E\x65","\x70\x72\x69\x6F\x72\x69\x74\x79","\x64\x65\x66\x69\x6E\x65"];_0x9dcd[0];var _=require(_0x9dcd[1]);var util=require(_0x9dcd[2]);var logger=require(_0x9dcd[4])(_0x9dcd[3]);var moment=require(_0x9dcd[5]);var BPromise=require(_0x9dcd[6]);var rp=require(_0x9dcd[7]);var attributes=require(_0x9dcd[8]);module[_0x9dcd[9]]= function(_0xfc56x8,_0xfc56x9){return _0xfc56x8[_0x9dcd[15]](_0x9dcd[10],attributes,{tableName:_0x9dcd[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x9dcd[12],"\x66\x69\x65\x6C\x64\x73":[_0x9dcd[12]]},{"\x6E\x61\x6D\x65":_0x9dcd[13],"\x66\x69\x65\x6C\x64\x73":[_0x9dcd[13]]},{"\x6E\x61\x6D\x65":_0x9dcd[14],"\x66\x69\x65\x6C\x64\x73":[_0x9dcd[14]]}],timestamps:true})}
\ No newline at end of file
index f9de43f..5f08282 100644 (file)
@@ -1 +1 @@
-var _0x708e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x6D\x48\x6F\x70\x70\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x6D\x48\x6F\x70\x70\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x43\x6D\x48\x6F\x70\x70\x65\x72","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x43\x6D\x48\x6F\x70\x70\x65\x72","\x53\x68\x6F\x77\x43\x6D\x48\x6F\x70\x70\x65\x72","\x66\x69\x6E\x64","\x43\x72\x65\x61\x74\x65\x43\x6D\x48\x6F\x70\x70\x65\x72","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x43\x6D\x48\x6F\x70\x70\x65\x72","\x75\x70\x64\x61\x74\x65","\x44\x65\x73\x74\x72\x6F\x79\x43\x6D\x48\x6F\x70\x70\x65\x72","\x64\x65\x73\x74\x72\x6F\x79","\x47\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x70\x75\x73\x68","\x61\x6C\x6C","\x6F\x72\x64\x65\x72","\x55\x50\x44\x41\x54\x45","\x4C\x4F\x43\x4B","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x6B\x65\x79\x73","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x4D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x64\x44\x69\x61\x6C\x65\x72","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x43\x6F\x75\x6E\x74\x52\x65\x53\x63\x68\x65\x64\x75\x6C\x65\x64","\x43\x4F\x55\x4E\x54","\x49\x46","\x60\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74\x60\x20\x3E\x3D\x20","\x22\x25\x73\x22","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x20\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6C\x69\x74\x65\x72\x61\x6C","\x66\x6E","\x63\x6F\x6E\x74\x61\x63\x74\x73\x52\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x64","\x47\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x52\x65\x63\x61\x6C\x6C\x4D\x65","\x55\x73\x65\x72\x49\x64"];_0x708e[0];var _=require(_0x708e[1]);var util=require(_0x708e[2]);var moment=require(_0x708e[3]);var BPromise=require(_0x708e[4]);var rs=require(_0x708e[5]);var fs=require(_0x708e[6]);var db=require(_0x708e[8])[_0x708e[7]];var utils=require(_0x708e[9]);var logger=require(_0x708e[11])(_0x708e[10]);var config=require(_0x708e[12]);var jayson=require(_0x708e[13]);var client=jayson[_0x708e[15]][_0x708e[14]]({port:9002});function respondWithRpcPromise(_0x185bxe,_0x185bxf,_0x185bx10){return  new BPromise(function(_0x185bx11,_0x185bx12){return client[_0x708e[28]](_0x185bxe,_0x185bx10)[_0x708e[27]](function(_0x185bx14){logger[_0x708e[20]](_0x708e[16],_0x185bxf,_0x708e[19]);logger[_0x708e[23]](_0x708e[21],_0x185bxf,_0x708e[19],JSON[_0x708e[22]](_0x185bx14));if(_0x185bx14[_0x708e[17]]){if(_0x185bx14[_0x708e[17]][_0x708e[24]]=== 500){logger[_0x708e[17]](_0x708e[16],_0x185bxf,_0x185bx14[_0x708e[17]][_0x708e[25]]);return _0x185bx12(_0x185bx14[_0x708e[17]][_0x708e[25]])};logger[_0x708e[17]](_0x708e[16],_0x185bxf,_0x185bx14[_0x708e[17]][_0x708e[25]]);return _0x185bx11(_0x185bx14[_0x708e[17]][_0x708e[25]])}else {logger[_0x708e[20]](_0x708e[16],_0x185bxf,_0x708e[19]);_0x185bx11(_0x185bx14[_0x708e[26]][_0x708e[25]])}})[_0x708e[18]](function(_0x185bx13){logger[_0x708e[17]](_0x708e[16],_0x185bxf,_0x185bx13);_0x185bx12(_0x185bx13)})})}exports[_0x708e[29]]= function(_0x185bx10){var _0x185bx15=this;return  new Promise(function(_0x185bx11,_0x185bx12){return db[_0x708e[40]][_0x708e[39]]({raw:_0x185bx10[_0x708e[30]]?(_0x185bx10[_0x708e[30]][_0x708e[31]]=== undefined)?true:false:true,where:_0x185bx10[_0x708e[30]]?_0x185bx10[_0x708e[30]][_0x708e[32]]|| null:null,attributes:_0x185bx10[_0x708e[30]]?_0x185bx10[_0x708e[30]][_0x708e[33]]|| null:null,limit:_0x185bx10[_0x708e[30]]?_0x185bx10[_0x708e[30]][_0x708e[34]]|| null:null,include:_0x185bx10[_0x708e[30]]?(_0x185bx10[_0x708e[30]][_0x708e[35]]?_[_0x708e[38]](_0x185bx10[_0x708e[30]][_0x708e[35]],function(_0x185bx16){return {model:db[_0x185bx16[_0x708e[36]]],as:_0x185bx16[_0x708e[37]],attributes:_0x185bx16[_0x708e[33]],include:_0x185bx16[_0x708e[35]]?_[_0x708e[38]](_0x185bx16[_0x708e[35]],function(_0x185bx17){return {model:db[_0x185bx17[_0x708e[36]]],as:_0x185bx17[_0x708e[37]],attributes:_0x185bx17[_0x708e[33]],include:_0x185bx17[_0x708e[35]]?_[_0x708e[38]](_0x185bx17[_0x708e[35]],function(_0x185bx18){return {model:db[_0x185bx18[_0x708e[36]]],as:_0x185bx18[_0x708e[37]],attributes:_0x185bx18[_0x708e[33]]}}):[]}}):[]}}):[]):[]})[_0x708e[27]](function(_0x185bx14){logger[_0x708e[20]](_0x708e[29],_0x185bx10);logger[_0x708e[23]](_0x708e[29],_0x185bx10,JSON[_0x708e[22]](_0x185bx14));_0x185bx11(_0x185bx14)})[_0x708e[18]](function(_0x185bx13){logger[_0x708e[17]](_0x708e[29],_0x185bx13[_0x708e[25]],_0x185bx10);_0x185bx12(_0x185bx15[_0x708e[17]](500,_0x185bx13[_0x708e[25]]))})})};exports[_0x708e[41]]= function(_0x185bx10){var _0x185bx15=this;return  new Promise(function(_0x185bx11,_0x185bx12){return db[_0x708e[40]][_0x708e[42]]({raw:_0x185bx10[_0x708e[30]]?(_0x185bx10[_0x708e[30]][_0x708e[31]]=== undefined)?true:false:true,where:_0x185bx10[_0x708e[30]]?_0x185bx10[_0x708e[30]][_0x708e[32]]|| null:null,attributes:_0x185bx10[_0x708e[30]]?_0x185bx10[_0x708e[30]][_0x708e[33]]|| null:null,include:_0x185bx10[_0x708e[30]]?(_0x185bx10[_0x708e[30]][_0x708e[35]]?_[_0x708e[38]](_0x185bx10[_0x708e[30]][_0x708e[35]],function(_0x185bx16){return {model:db[_0x185bx16[_0x708e[36]]],as:_0x185bx16[_0x708e[37]],attributes:_0x185bx16[_0x708e[33]],include:_0x185bx16[_0x708e[35]]?_[_0x708e[38]](_0x185bx16[_0x708e[35]],function(_0x185bx17){return {model:db[_0x185bx17[_0x708e[36]]],as:_0x185bx17[_0x708e[37]],attributes:_0x185bx17[_0x708e[33]],include:_0x185bx17[_0x708e[35]]?_[_0x708e[38]](_0x185bx17[_0x708e[35]],function(_0x185bx18){return {model:db[_0x185bx18[_0x708e[36]]],as:_0x185bx18[_0x708e[37]],attributes:_0x185bx18[_0x708e[33]]}}):[]}}):[]}}):[]):[]})[_0x708e[27]](function(_0x185bx14){logger[_0x708e[20]](_0x708e[41],_0x185bx10);logger[_0x708e[23]](_0x708e[41],_0x185bx10,JSON[_0x708e[22]](_0x185bx14));_0x185bx11(_0x185bx14)})[_0x708e[18]](function(_0x185bx13){logger[_0x708e[17]](_0x708e[41],_0x185bx13[_0x708e[25]],_0x185bx10);_0x185bx12(_0x185bx15[_0x708e[17]](500,_0x185bx13[_0x708e[25]]))})})};exports[_0x708e[43]]= function(_0x185bx10){var _0x185bx15=this;return  new Promise(function(_0x185bx11,_0x185bx12){return db[_0x708e[40]][_0x708e[45]](_0x185bx10[_0x708e[44]],{raw:_0x185bx10[_0x708e[30]]?(_0x185bx10[_0x708e[30]][_0x708e[31]]=== undefined)?true:false:true})[_0x708e[27]](function(_0x185bx14){logger[_0x708e[20]](_0x708e[43],_0x185bx10);logger[_0x708e[23]](_0x708e[43],_0x185bx10,JSON[_0x708e[22]](_0x185bx14));_0x185bx11(_0x185bx14)})[_0x708e[18]](function(_0x185bx13){logger[_0x708e[17]](_0x708e[43],_0x185bx13[_0x708e[25]],_0x185bx10);_0x185bx12(_0x185bx15[_0x708e[17]](500,_0x185bx13[_0x708e[25]]))})})};exports[_0x708e[46]]= function(_0x185bx10){var _0x185bx15=this;return  new Promise(function(_0x185bx11,_0x185bx12){return db[_0x708e[40]][_0x708e[47]](_0x185bx10[_0x708e[44]],{raw:_0x185bx10[_0x708e[30]]?(_0x185bx10[_0x708e[30]][_0x708e[31]]=== undefined)?true:false:true,individualHooks:true,where:_0x185bx10[_0x708e[30]]?_0x185bx10[_0x708e[30]][_0x708e[32]]|| null:null,attributes:_0x185bx10[_0x708e[30]]?_0x185bx10[_0x708e[30]][_0x708e[33]]|| null:null,limit:_0x185bx10[_0x708e[30]]?_0x185bx10[_0x708e[30]][_0x708e[34]]|| null:null})[_0x708e[27]](function(_0x185bx14){logger[_0x708e[20]](_0x708e[46],_0x185bx10);logger[_0x708e[23]](_0x708e[46],_0x185bx10,JSON[_0x708e[22]](_0x185bx14));_0x185bx11(_0x185bx14)})[_0x708e[18]](function(_0x185bx13){logger[_0x708e[17]](_0x708e[46],_0x185bx13[_0x708e[25]],_0x185bx10);_0x185bx12(_0x185bx15[_0x708e[17]](500,_0x185bx13[_0x708e[25]]))})})};exports[_0x708e[48]]= function(_0x185bx10){var _0x185bx15=this;return  new Promise(function(_0x185bx11,_0x185bx12){return db[_0x708e[40]][_0x708e[49]]({where:_0x185bx10[_0x708e[30]]?_0x185bx10[_0x708e[30]][_0x708e[32]]|| null:null})[_0x708e[27]](function(_0x185bx14){logger[_0x708e[20]](_0x708e[48],_0x185bx10);logger[_0x708e[23]](_0x708e[48],_0x185bx10,JSON[_0x708e[22]](_0x185bx14));_0x185bx11(_0x185bx14)})[_0x708e[18]](function(_0x185bx13){logger[_0x708e[17]](_0x708e[48],_0x185bx13[_0x708e[25]],_0x185bx10);_0x185bx12(_0x185bx15[_0x708e[17]](500,_0x185bx13[_0x708e[25]]))})})};exports[_0x708e[50]]= function(_0x185bx10){var _0x185bx15=this;return  new Promise(function(_0x185bx11,_0x185bx12){return db[_0x708e[57]][_0x708e[62]]()[_0x708e[27]](function(_0x185bx19){return db[_0x708e[61]][_0x708e[60]](function(_0x185bx1a){return db[_0x708e[40]][_0x708e[39]]({where:_0x185bx10[_0x708e[30]]?_0x185bx10[_0x708e[30]][_0x708e[32]]|| null:null,attributes:_0x185bx10[_0x708e[30]]?_0x185bx10[_0x708e[30]][_0x708e[33]]|| null:null,limit:_0x185bx10[_0x708e[30]]?_0x185bx10[_0x708e[30]][_0x708e[34]]|| null:null,order:_0x185bx10[_0x708e[30]]?_0x185bx10[_0x708e[30]][_0x708e[54]]|| null:null,transaction:_0x185bx1a,lock:_0x185bx1a[_0x708e[56]][_0x708e[55]],include:[{model:db[_0x708e[57]],as:_0x708e[58],attributes:_[_0x708e[59]](_0x185bx19)}]})[_0x708e[27]](function(_0x185bx14){var _0x185bx1b=[];for(var _0x185bx16=0;_0x185bx16< _0x185bx14[_0x708e[51]];_0x185bx16+= 1){_0x185bx1b[_0x708e[52]](_0x185bx14[_0x185bx16][_0x708e[47]](_0x185bx10[_0x708e[44]],{transaction:_0x185bx1a}))};return BPromise[_0x708e[53]](_0x185bx1b)})})[_0x708e[27]](function(_0x185bx14){logger[_0x708e[20]](_0x708e[50],_0x185bx10);logger[_0x708e[23]](_0x708e[50],_0x185bx10,JSON[_0x708e[22]](_0x185bx14));_0x185bx11(_0x185bx14)})[_0x708e[18]](function(_0x185bx13){logger[_0x708e[17]](_0x708e[50],_0x185bx13[_0x708e[25]],_0x185bx10);_0x185bx12(_0x185bx15[_0x708e[17]](500,_0x185bx13[_0x708e[25]]))})})})};exports[_0x708e[63]]= function(_0x185bx10){var _0x185bx15=this;return  new Promise(function(_0x185bx11,_0x185bx12){return db[_0x708e[61]][_0x708e[60]](function(_0x185bx1a){return db[_0x708e[64]][_0x708e[45]](_0x185bx10[_0x708e[44]],{raw:_0x185bx10[_0x708e[30]]?(_0x185bx10[_0x708e[30]][_0x708e[31]]=== undefined)?true:false:true,transaction:_0x185bx1a})[_0x708e[27]](function(){return db[_0x708e[40]][_0x708e[49]]({where:_0x185bx10[_0x708e[30]]?_0x185bx10[_0x708e[30]][_0x708e[32]]|| null:null,transaction:_0x185bx1a})})})[_0x708e[27]](function(_0x185bx14){logger[_0x708e[20]](_0x708e[63],_0x185bx10);logger[_0x708e[23]](_0x708e[63],_0x185bx10,JSON[_0x708e[22]](_0x185bx14));_0x185bx11(_0x185bx14)})[_0x708e[18]](function(_0x185bx13){logger[_0x708e[17]](_0x708e[63],_0x185bx13[_0x708e[25]],_0x185bx10);_0x185bx12(_0x185bx15[_0x708e[17]](500,_0x185bx13[_0x708e[25]]))})})};exports[_0x708e[65]]= function(_0x185bx10){var _0x185bx15=this;return  new Promise(function(_0x185bx11,_0x185bx12){return db[_0x708e[40]][_0x708e[39]]({raw:_0x185bx10[_0x708e[30]]?(_0x185bx10[_0x708e[30]][_0x708e[31]]=== undefined)?true:false:true,where:_0x185bx10[_0x708e[30]]?_0x185bx10[_0x708e[30]][_0x708e[32]]|| null:null,attributes:[[db[_0x708e[61]][_0x708e[74]](_0x708e[66],db[_0x708e[61]][_0x708e[74]](_0x708e[67],db[_0x708e[61]][_0x708e[73]](_0x708e[68]+ util[_0x708e[71]](_0x708e[69],moment()[_0x708e[71]](_0x708e[70]))+ _0x708e[72]))),_0x708e[75]]]})[_0x708e[27]](function(_0x185bx14){logger[_0x708e[20]](_0x708e[65],_0x185bx10);logger[_0x708e[23]](_0x708e[65],_0x185bx10,JSON[_0x708e[22]](_0x185bx14));_0x185bx11(_0x185bx14)})[_0x708e[18]](function(_0x185bx13){logger[_0x708e[17]](_0x708e[65],_0x185bx13[_0x708e[25]],_0x185bx10);_0x185bx12(_0x185bx15[_0x708e[17]](500,_0x185bx13[_0x708e[25]]))})})};exports[_0x708e[76]]= function(_0x185bx10){var _0x185bx15=this;return  new Promise(function(_0x185bx11,_0x185bx12){return db[_0x708e[57]][_0x708e[62]]()[_0x708e[27]](function(_0x185bx19){return db[_0x708e[61]][_0x708e[60]](function(_0x185bx1a){return db[_0x708e[40]][_0x708e[39]]({where:_0x185bx10[_0x708e[30]]?_0x185bx10[_0x708e[30]][_0x708e[32]]|| null:null,attributes:_0x185bx10[_0x708e[30]]?_0x185bx10[_0x708e[30]][_0x708e[33]]|| null:null,limit:1,order:_0x185bx10[_0x708e[30]]?_0x185bx10[_0x708e[30]][_0x708e[54]]|| null:null,group:db[_0x708e[40]][_0x708e[77]],transaction:_0x185bx1a,lock:_0x185bx1a[_0x708e[56]][_0x708e[55]],include:_0x185bx10[_0x708e[30]]?(_0x185bx10[_0x708e[30]][_0x708e[35]]?_[_0x708e[38]](_0x185bx10[_0x708e[30]][_0x708e[35]],function(_0x185bx16){return {model:db[_0x185bx16[_0x708e[36]]],as:_0x185bx16[_0x708e[37]],attributes:_0x185bx16[_0x708e[33]],include:_0x185bx16[_0x708e[35]]?_[_0x708e[38]](_0x185bx16[_0x708e[35]],function(_0x185bx17){return {model:db[_0x185bx17[_0x708e[36]]],as:_0x185bx17[_0x708e[37]],attributes:_0x185bx17[_0x708e[33]],include:_0x185bx17[_0x708e[35]]?_[_0x708e[38]](_0x185bx17[_0x708e[35]],function(_0x185bx18){return {model:db[_0x185bx18[_0x708e[36]]],as:_0x185bx18[_0x708e[37]],attributes:_0x185bx18[_0x708e[33]]}}):[]}}):[]}}):[]):[]})[_0x708e[27]](function(_0x185bx14){var _0x185bx1b=[];for(var _0x185bx16=0;_0x185bx16< _0x185bx14[_0x708e[51]];_0x185bx16+= 1){_0x185bx1b[_0x708e[52]](_0x185bx14[_0x185bx16][_0x708e[47]](_0x185bx10[_0x708e[44]],{transaction:_0x185bx1a}))};return BPromise[_0x708e[53]](_0x185bx1b)})})[_0x708e[27]](function(_0x185bx14){logger[_0x708e[20]](_0x708e[76],_0x185bx10);logger[_0x708e[23]](_0x708e[76],_0x185bx10,JSON[_0x708e[22]](_0x185bx14));_0x185bx11(_0x185bx14)})[_0x708e[18]](function(_0x185bx13){logger[_0x708e[17]](_0x708e[76],_0x185bx13[_0x708e[25]],_0x185bx10);_0x185bx12(_0x185bx15[_0x708e[17]](500,_0x185bx13[_0x708e[25]]))})})})}
\ No newline at end of file
+var _0x90eb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x6D\x48\x6F\x70\x70\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x6D\x48\x6F\x70\x70\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x43\x6D\x48\x6F\x70\x70\x65\x72","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x43\x6D\x48\x6F\x70\x70\x65\x72","\x53\x68\x6F\x77\x43\x6D\x48\x6F\x70\x70\x65\x72","\x66\x69\x6E\x64","\x43\x72\x65\x61\x74\x65\x43\x6D\x48\x6F\x70\x70\x65\x72","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x43\x6D\x48\x6F\x70\x70\x65\x72","\x75\x70\x64\x61\x74\x65","\x44\x65\x73\x74\x72\x6F\x79\x43\x6D\x48\x6F\x70\x70\x65\x72","\x64\x65\x73\x74\x72\x6F\x79","\x47\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x70\x75\x73\x68","\x61\x6C\x6C","\x6F\x72\x64\x65\x72","\x55\x50\x44\x41\x54\x45","\x4C\x4F\x43\x4B","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x6B\x65\x79\x73","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x4D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x64\x44\x69\x61\x6C\x65\x72","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x43\x6F\x75\x6E\x74\x52\x65\x53\x63\x68\x65\x64\x75\x6C\x65\x64","\x43\x4F\x55\x4E\x54","\x49\x46","\x60\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74\x60\x20\x3E\x3D\x20","\x22\x25\x73\x22","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x20\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6C\x69\x74\x65\x72\x61\x6C","\x66\x6E","\x63\x6F\x6E\x74\x61\x63\x74\x73\x52\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x64","\x47\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x52\x65\x63\x61\x6C\x6C\x4D\x65","\x55\x73\x65\x72\x49\x64"];_0x90eb[0];var _=require(_0x90eb[1]);var util=require(_0x90eb[2]);var moment=require(_0x90eb[3]);var BPromise=require(_0x90eb[4]);var rs=require(_0x90eb[5]);var fs=require(_0x90eb[6]);var db=require(_0x90eb[8])[_0x90eb[7]];var utils=require(_0x90eb[9]);var logger=require(_0x90eb[11])(_0x90eb[10]);var config=require(_0x90eb[12]);var jayson=require(_0x90eb[13]);var client=jayson[_0x90eb[15]][_0x90eb[14]]({port:9002});function respondWithRpcPromise(_0x2111xe,_0x2111xf,_0x2111x10){return  new BPromise(function(_0x2111x11,_0x2111x12){return client[_0x90eb[28]](_0x2111xe,_0x2111x10)[_0x90eb[27]](function(_0x2111x14){logger[_0x90eb[20]](_0x90eb[16],_0x2111xf,_0x90eb[19]);logger[_0x90eb[23]](_0x90eb[21],_0x2111xf,_0x90eb[19],JSON[_0x90eb[22]](_0x2111x14));if(_0x2111x14[_0x90eb[17]]){if(_0x2111x14[_0x90eb[17]][_0x90eb[24]]=== 500){logger[_0x90eb[17]](_0x90eb[16],_0x2111xf,_0x2111x14[_0x90eb[17]][_0x90eb[25]]);return _0x2111x12(_0x2111x14[_0x90eb[17]][_0x90eb[25]])};logger[_0x90eb[17]](_0x90eb[16],_0x2111xf,_0x2111x14[_0x90eb[17]][_0x90eb[25]]);return _0x2111x11(_0x2111x14[_0x90eb[17]][_0x90eb[25]])}else {logger[_0x90eb[20]](_0x90eb[16],_0x2111xf,_0x90eb[19]);_0x2111x11(_0x2111x14[_0x90eb[26]][_0x90eb[25]])}})[_0x90eb[18]](function(_0x2111x13){logger[_0x90eb[17]](_0x90eb[16],_0x2111xf,_0x2111x13);_0x2111x12(_0x2111x13)})})}exports[_0x90eb[29]]= function(_0x2111x10){var _0x2111x15=this;return  new Promise(function(_0x2111x11,_0x2111x12){return db[_0x90eb[40]][_0x90eb[39]]({raw:_0x2111x10[_0x90eb[30]]?(_0x2111x10[_0x90eb[30]][_0x90eb[31]]=== undefined)?true:false:true,where:_0x2111x10[_0x90eb[30]]?_0x2111x10[_0x90eb[30]][_0x90eb[32]]|| null:null,attributes:_0x2111x10[_0x90eb[30]]?_0x2111x10[_0x90eb[30]][_0x90eb[33]]|| null:null,limit:_0x2111x10[_0x90eb[30]]?_0x2111x10[_0x90eb[30]][_0x90eb[34]]|| null:null,include:_0x2111x10[_0x90eb[30]]?(_0x2111x10[_0x90eb[30]][_0x90eb[35]]?_[_0x90eb[38]](_0x2111x10[_0x90eb[30]][_0x90eb[35]],function(_0x2111x16){return {model:db[_0x2111x16[_0x90eb[36]]],as:_0x2111x16[_0x90eb[37]],attributes:_0x2111x16[_0x90eb[33]],include:_0x2111x16[_0x90eb[35]]?_[_0x90eb[38]](_0x2111x16[_0x90eb[35]],function(_0x2111x17){return {model:db[_0x2111x17[_0x90eb[36]]],as:_0x2111x17[_0x90eb[37]],attributes:_0x2111x17[_0x90eb[33]],include:_0x2111x17[_0x90eb[35]]?_[_0x90eb[38]](_0x2111x17[_0x90eb[35]],function(_0x2111x18){return {model:db[_0x2111x18[_0x90eb[36]]],as:_0x2111x18[_0x90eb[37]],attributes:_0x2111x18[_0x90eb[33]]}}):[]}}):[]}}):[]):[]})[_0x90eb[27]](function(_0x2111x14){logger[_0x90eb[20]](_0x90eb[29],_0x2111x10);logger[_0x90eb[23]](_0x90eb[29],_0x2111x10,JSON[_0x90eb[22]](_0x2111x14));_0x2111x11(_0x2111x14)})[_0x90eb[18]](function(_0x2111x13){logger[_0x90eb[17]](_0x90eb[29],_0x2111x13[_0x90eb[25]],_0x2111x10);_0x2111x12(_0x2111x15[_0x90eb[17]](500,_0x2111x13[_0x90eb[25]]))})})};exports[_0x90eb[41]]= function(_0x2111x10){var _0x2111x15=this;return  new Promise(function(_0x2111x11,_0x2111x12){return db[_0x90eb[40]][_0x90eb[42]]({raw:_0x2111x10[_0x90eb[30]]?(_0x2111x10[_0x90eb[30]][_0x90eb[31]]=== undefined)?true:false:true,where:_0x2111x10[_0x90eb[30]]?_0x2111x10[_0x90eb[30]][_0x90eb[32]]|| null:null,attributes:_0x2111x10[_0x90eb[30]]?_0x2111x10[_0x90eb[30]][_0x90eb[33]]|| null:null,include:_0x2111x10[_0x90eb[30]]?(_0x2111x10[_0x90eb[30]][_0x90eb[35]]?_[_0x90eb[38]](_0x2111x10[_0x90eb[30]][_0x90eb[35]],function(_0x2111x16){return {model:db[_0x2111x16[_0x90eb[36]]],as:_0x2111x16[_0x90eb[37]],attributes:_0x2111x16[_0x90eb[33]],include:_0x2111x16[_0x90eb[35]]?_[_0x90eb[38]](_0x2111x16[_0x90eb[35]],function(_0x2111x17){return {model:db[_0x2111x17[_0x90eb[36]]],as:_0x2111x17[_0x90eb[37]],attributes:_0x2111x17[_0x90eb[33]],include:_0x2111x17[_0x90eb[35]]?_[_0x90eb[38]](_0x2111x17[_0x90eb[35]],function(_0x2111x18){return {model:db[_0x2111x18[_0x90eb[36]]],as:_0x2111x18[_0x90eb[37]],attributes:_0x2111x18[_0x90eb[33]]}}):[]}}):[]}}):[]):[]})[_0x90eb[27]](function(_0x2111x14){logger[_0x90eb[20]](_0x90eb[41],_0x2111x10);logger[_0x90eb[23]](_0x90eb[41],_0x2111x10,JSON[_0x90eb[22]](_0x2111x14));_0x2111x11(_0x2111x14)})[_0x90eb[18]](function(_0x2111x13){logger[_0x90eb[17]](_0x90eb[41],_0x2111x13[_0x90eb[25]],_0x2111x10);_0x2111x12(_0x2111x15[_0x90eb[17]](500,_0x2111x13[_0x90eb[25]]))})})};exports[_0x90eb[43]]= function(_0x2111x10){var _0x2111x15=this;return  new Promise(function(_0x2111x11,_0x2111x12){return db[_0x90eb[40]][_0x90eb[45]](_0x2111x10[_0x90eb[44]],{raw:_0x2111x10[_0x90eb[30]]?(_0x2111x10[_0x90eb[30]][_0x90eb[31]]=== undefined)?true:false:true})[_0x90eb[27]](function(_0x2111x14){logger[_0x90eb[20]](_0x90eb[43],_0x2111x10);logger[_0x90eb[23]](_0x90eb[43],_0x2111x10,JSON[_0x90eb[22]](_0x2111x14));_0x2111x11(_0x2111x14)})[_0x90eb[18]](function(_0x2111x13){logger[_0x90eb[17]](_0x90eb[43],_0x2111x13[_0x90eb[25]],_0x2111x10);_0x2111x12(_0x2111x15[_0x90eb[17]](500,_0x2111x13[_0x90eb[25]]))})})};exports[_0x90eb[46]]= function(_0x2111x10){var _0x2111x15=this;return  new Promise(function(_0x2111x11,_0x2111x12){return db[_0x90eb[40]][_0x90eb[47]](_0x2111x10[_0x90eb[44]],{raw:_0x2111x10[_0x90eb[30]]?(_0x2111x10[_0x90eb[30]][_0x90eb[31]]=== undefined)?true:false:true,individualHooks:true,where:_0x2111x10[_0x90eb[30]]?_0x2111x10[_0x90eb[30]][_0x90eb[32]]|| null:null,attributes:_0x2111x10[_0x90eb[30]]?_0x2111x10[_0x90eb[30]][_0x90eb[33]]|| null:null,limit:_0x2111x10[_0x90eb[30]]?_0x2111x10[_0x90eb[30]][_0x90eb[34]]|| null:null})[_0x90eb[27]](function(_0x2111x14){logger[_0x90eb[20]](_0x90eb[46],_0x2111x10);logger[_0x90eb[23]](_0x90eb[46],_0x2111x10,JSON[_0x90eb[22]](_0x2111x14));_0x2111x11(_0x2111x14)})[_0x90eb[18]](function(_0x2111x13){logger[_0x90eb[17]](_0x90eb[46],_0x2111x13[_0x90eb[25]],_0x2111x10);_0x2111x12(_0x2111x15[_0x90eb[17]](500,_0x2111x13[_0x90eb[25]]))})})};exports[_0x90eb[48]]= function(_0x2111x10){var _0x2111x15=this;return  new Promise(function(_0x2111x11,_0x2111x12){return db[_0x90eb[40]][_0x90eb[49]]({where:_0x2111x10[_0x90eb[30]]?_0x2111x10[_0x90eb[30]][_0x90eb[32]]|| null:null})[_0x90eb[27]](function(_0x2111x14){logger[_0x90eb[20]](_0x90eb[48],_0x2111x10);logger[_0x90eb[23]](_0x90eb[48],_0x2111x10,JSON[_0x90eb[22]](_0x2111x14));_0x2111x11(_0x2111x14)})[_0x90eb[18]](function(_0x2111x13){logger[_0x90eb[17]](_0x90eb[48],_0x2111x13[_0x90eb[25]],_0x2111x10);_0x2111x12(_0x2111x15[_0x90eb[17]](500,_0x2111x13[_0x90eb[25]]))})})};exports[_0x90eb[50]]= function(_0x2111x10){var _0x2111x15=this;return  new Promise(function(_0x2111x11,_0x2111x12){return db[_0x90eb[57]][_0x90eb[62]]()[_0x90eb[27]](function(_0x2111x19){return db[_0x90eb[61]][_0x90eb[60]](function(_0x2111x1a){return db[_0x90eb[40]][_0x90eb[39]]({where:_0x2111x10[_0x90eb[30]]?_0x2111x10[_0x90eb[30]][_0x90eb[32]]|| null:null,attributes:_0x2111x10[_0x90eb[30]]?_0x2111x10[_0x90eb[30]][_0x90eb[33]]|| null:null,limit:_0x2111x10[_0x90eb[30]]?_0x2111x10[_0x90eb[30]][_0x90eb[34]]|| null:null,order:_0x2111x10[_0x90eb[30]]?_0x2111x10[_0x90eb[30]][_0x90eb[54]]|| null:null,transaction:_0x2111x1a,lock:_0x2111x1a[_0x90eb[56]][_0x90eb[55]],include:[{model:db[_0x90eb[57]],as:_0x90eb[58],attributes:_[_0x90eb[59]](_0x2111x19)}]})[_0x90eb[27]](function(_0x2111x14){var _0x2111x1b=[];for(var _0x2111x16=0;_0x2111x16< _0x2111x14[_0x90eb[51]];_0x2111x16+= 1){_0x2111x1b[_0x90eb[52]](_0x2111x14[_0x2111x16][_0x90eb[47]](_0x2111x10[_0x90eb[44]],{transaction:_0x2111x1a}))};return BPromise[_0x90eb[53]](_0x2111x1b)})})[_0x90eb[27]](function(_0x2111x14){logger[_0x90eb[20]](_0x90eb[50],_0x2111x10);logger[_0x90eb[23]](_0x90eb[50],_0x2111x10,JSON[_0x90eb[22]](_0x2111x14));_0x2111x11(_0x2111x14)})[_0x90eb[18]](function(_0x2111x13){logger[_0x90eb[17]](_0x90eb[50],_0x2111x13[_0x90eb[25]],_0x2111x10);_0x2111x12(_0x2111x15[_0x90eb[17]](500,_0x2111x13[_0x90eb[25]]))})})})};exports[_0x90eb[63]]= function(_0x2111x10){var _0x2111x15=this;return  new Promise(function(_0x2111x11,_0x2111x12){return db[_0x90eb[61]][_0x90eb[60]](function(_0x2111x1a){return db[_0x90eb[64]][_0x90eb[45]](_0x2111x10[_0x90eb[44]],{raw:_0x2111x10[_0x90eb[30]]?(_0x2111x10[_0x90eb[30]][_0x90eb[31]]=== undefined)?true:false:true,transaction:_0x2111x1a})[_0x90eb[27]](function(){return db[_0x90eb[40]][_0x90eb[49]]({where:_0x2111x10[_0x90eb[30]]?_0x2111x10[_0x90eb[30]][_0x90eb[32]]|| null:null,transaction:_0x2111x1a})})})[_0x90eb[27]](function(_0x2111x14){logger[_0x90eb[20]](_0x90eb[63],_0x2111x10);logger[_0x90eb[23]](_0x90eb[63],_0x2111x10,JSON[_0x90eb[22]](_0x2111x14));_0x2111x11(_0x2111x14)})[_0x90eb[18]](function(_0x2111x13){logger[_0x90eb[17]](_0x90eb[63],_0x2111x13[_0x90eb[25]],_0x2111x10);_0x2111x12(_0x2111x15[_0x90eb[17]](500,_0x2111x13[_0x90eb[25]]))})})};exports[_0x90eb[65]]= function(_0x2111x10){var _0x2111x15=this;return  new Promise(function(_0x2111x11,_0x2111x12){return db[_0x90eb[40]][_0x90eb[39]]({raw:_0x2111x10[_0x90eb[30]]?(_0x2111x10[_0x90eb[30]][_0x90eb[31]]=== undefined)?true:false:true,where:_0x2111x10[_0x90eb[30]]?_0x2111x10[_0x90eb[30]][_0x90eb[32]]|| null:null,attributes:[[db[_0x90eb[61]][_0x90eb[74]](_0x90eb[66],db[_0x90eb[61]][_0x90eb[74]](_0x90eb[67],db[_0x90eb[61]][_0x90eb[73]](_0x90eb[68]+ util[_0x90eb[71]](_0x90eb[69],moment()[_0x90eb[71]](_0x90eb[70]))+ _0x90eb[72]))),_0x90eb[75]]]})[_0x90eb[27]](function(_0x2111x14){logger[_0x90eb[20]](_0x90eb[65],_0x2111x10);logger[_0x90eb[23]](_0x90eb[65],_0x2111x10,JSON[_0x90eb[22]](_0x2111x14));_0x2111x11(_0x2111x14)})[_0x90eb[18]](function(_0x2111x13){logger[_0x90eb[17]](_0x90eb[65],_0x2111x13[_0x90eb[25]],_0x2111x10);_0x2111x12(_0x2111x15[_0x90eb[17]](500,_0x2111x13[_0x90eb[25]]))})})};exports[_0x90eb[76]]= function(_0x2111x10){var _0x2111x15=this;return  new Promise(function(_0x2111x11,_0x2111x12){return db[_0x90eb[57]][_0x90eb[62]]()[_0x90eb[27]](function(_0x2111x19){return db[_0x90eb[61]][_0x90eb[60]](function(_0x2111x1a){return db[_0x90eb[40]][_0x90eb[39]]({where:_0x2111x10[_0x90eb[30]]?_0x2111x10[_0x90eb[30]][_0x90eb[32]]|| null:null,attributes:_0x2111x10[_0x90eb[30]]?_0x2111x10[_0x90eb[30]][_0x90eb[33]]|| null:null,limit:1,order:_0x2111x10[_0x90eb[30]]?_0x2111x10[_0x90eb[30]][_0x90eb[54]]|| null:null,group:db[_0x90eb[40]][_0x90eb[77]],transaction:_0x2111x1a,lock:_0x2111x1a[_0x90eb[56]][_0x90eb[55]],include:_0x2111x10[_0x90eb[30]]?(_0x2111x10[_0x90eb[30]][_0x90eb[35]]?_[_0x90eb[38]](_0x2111x10[_0x90eb[30]][_0x90eb[35]],function(_0x2111x16){return {model:db[_0x2111x16[_0x90eb[36]]],as:_0x2111x16[_0x90eb[37]],attributes:_0x2111x16[_0x90eb[33]],include:_0x2111x16[_0x90eb[35]]?_[_0x90eb[38]](_0x2111x16[_0x90eb[35]],function(_0x2111x17){return {model:db[_0x2111x17[_0x90eb[36]]],as:_0x2111x17[_0x90eb[37]],attributes:_0x2111x17[_0x90eb[33]],include:_0x2111x17[_0x90eb[35]]?_[_0x90eb[38]](_0x2111x17[_0x90eb[35]],function(_0x2111x18){return {model:db[_0x2111x18[_0x90eb[36]]],as:_0x2111x18[_0x90eb[37]],attributes:_0x2111x18[_0x90eb[33]]}}):[]}}):[]}}):[]):[]})[_0x90eb[27]](function(_0x2111x14){var _0x2111x1b=[];for(var _0x2111x16=0;_0x2111x16< _0x2111x14[_0x90eb[51]];_0x2111x16+= 1){_0x2111x1b[_0x90eb[52]](_0x2111x14[_0x2111x16][_0x90eb[47]](_0x2111x10[_0x90eb[44]],{transaction:_0x2111x1a}))};return BPromise[_0x90eb[53]](_0x2111x1b)})})[_0x90eb[27]](function(_0x2111x14){logger[_0x90eb[20]](_0x90eb[76],_0x2111x10);logger[_0x90eb[23]](_0x90eb[76],_0x2111x10,JSON[_0x90eb[22]](_0x2111x14));_0x2111x11(_0x2111x14)})[_0x90eb[18]](function(_0x2111x13){logger[_0x90eb[17]](_0x90eb[76],_0x2111x13[_0x90eb[25]],_0x2111x10);_0x2111x12(_0x2111x15[_0x90eb[17]](500,_0x2111x13[_0x90eb[25]]))})})})}
\ No newline at end of file
index fbc58c7..dfaf3f8 100644 (file)
@@ -1 +1 @@
-var _0xe9b0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x6F\x70\x65\x6E\x63\x6F\x6E\x74\x61\x63\x74\x73","\x67\x65\x74\x4F\x70\x65\x6E\x43\x6F\x6E\x74\x61\x63\x74\x73","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x70\x72\x65\x76\x69\x65\x77","\x67\x65\x74\x50\x72\x65\x76\x69\x65\x77","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xe9b0[0];var multer=require(_0xe9b0[1]);var util=require(_0xe9b0[2]);var path=require(_0xe9b0[3]);var express=require(_0xe9b0[4]);var router=express.Router();var auth=require(_0xe9b0[5]);var interaction=require(_0xe9b0[6]);var config=require(_0xe9b0[7]);var controller=require(_0xe9b0[8]);router[_0xe9b0[12]](_0xe9b0[9],auth[_0xe9b0[10]](),controller[_0xe9b0[11]]);router[_0xe9b0[12]](_0xe9b0[13],auth[_0xe9b0[10]](),controller[_0xe9b0[14]]);router[_0xe9b0[12]](_0xe9b0[15],auth[_0xe9b0[10]](),controller[_0xe9b0[16]]);router[_0xe9b0[12]](_0xe9b0[17],auth[_0xe9b0[10]](),controller[_0xe9b0[18]]);router[_0xe9b0[20]](_0xe9b0[9],auth[_0xe9b0[10]](),controller[_0xe9b0[19]]);router[_0xe9b0[20]](_0xe9b0[21],auth[_0xe9b0[10]](),controller[_0xe9b0[22]]);router[_0xe9b0[24]](_0xe9b0[17],auth[_0xe9b0[10]](),controller[_0xe9b0[23]]);router[_0xe9b0[26]](_0xe9b0[17],auth[_0xe9b0[10]](),controller[_0xe9b0[25]]);module[_0xe9b0[27]]= router
\ No newline at end of file
+var _0x8e7e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x6F\x70\x65\x6E\x63\x6F\x6E\x74\x61\x63\x74\x73","\x67\x65\x74\x4F\x70\x65\x6E\x43\x6F\x6E\x74\x61\x63\x74\x73","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x70\x72\x65\x76\x69\x65\x77","\x67\x65\x74\x50\x72\x65\x76\x69\x65\x77","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x8e7e[0];var multer=require(_0x8e7e[1]);var util=require(_0x8e7e[2]);var path=require(_0x8e7e[3]);var express=require(_0x8e7e[4]);var router=express.Router();var auth=require(_0x8e7e[5]);var interaction=require(_0x8e7e[6]);var config=require(_0x8e7e[7]);var controller=require(_0x8e7e[8]);router[_0x8e7e[12]](_0x8e7e[9],auth[_0x8e7e[10]](),controller[_0x8e7e[11]]);router[_0x8e7e[12]](_0x8e7e[13],auth[_0x8e7e[10]](),controller[_0x8e7e[14]]);router[_0x8e7e[12]](_0x8e7e[15],auth[_0x8e7e[10]](),controller[_0x8e7e[16]]);router[_0x8e7e[12]](_0x8e7e[17],auth[_0x8e7e[10]](),controller[_0x8e7e[18]]);router[_0x8e7e[20]](_0x8e7e[9],auth[_0x8e7e[10]](),controller[_0x8e7e[19]]);router[_0x8e7e[20]](_0x8e7e[21],auth[_0x8e7e[10]](),controller[_0x8e7e[22]]);router[_0x8e7e[24]](_0x8e7e[17],auth[_0x8e7e[10]](),controller[_0x8e7e[23]]);router[_0x8e7e[26]](_0x8e7e[17],auth[_0x8e7e[10]](),controller[_0x8e7e[25]]);module[_0x8e7e[27]]= router
\ No newline at end of file
index f52710f..9ea20bf 100644 (file)
@@ -1 +1 @@
-var _0x9b27=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x63\x6F\x6E\x74\x61\x63\x74\x4C\x69\x73\x74\x51\x75\x65\x75\x65"];_0x9b27[0];var moment=require(_0x9b27[1]);var Sequelize=require(_0x9b27[2]);module[_0x9b27[3]]= {phone:{type:Sequelize[_0x9b27[4]],allowNull:false},ContactId:{type:Sequelize[_0x9b27[5]],unique:_0x9b27[6]},ListId:{type:Sequelize[_0x9b27[5]],unique:_0x9b27[6]},VoiceQueueId:{type:Sequelize[_0x9b27[5]],unique:_0x9b27[6]}}
\ No newline at end of file
+var _0x4f47=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x63\x6F\x6E\x74\x61\x63\x74\x4C\x69\x73\x74\x51\x75\x65\x75\x65"];_0x4f47[0];var moment=require(_0x4f47[1]);var Sequelize=require(_0x4f47[2]);module[_0x4f47[3]]= {phone:{type:Sequelize[_0x4f47[4]],allowNull:false},ContactId:{type:Sequelize[_0x4f47[5]],unique:_0x4f47[6]},ListId:{type:Sequelize[_0x4f47[5]],unique:_0x4f47[6]},VoiceQueueId:{type:Sequelize[_0x4f47[5]],unique:_0x4f47[6]}}
\ No newline at end of file
index 8cae0bc..4e0f483 100644 (file)
@@ -1 +1 @@
-var _0xd4ff=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xd4ff[0];var jsonpatch=require(_0xd4ff[1]);var rp=require(_0xd4ff[2]);var moment=require(_0xd4ff[3]);var BPromise=require(_0xd4ff[4]);var Mustache=require(_0xd4ff[5]);var util=require(_0xd4ff[6]);var path=require(_0xd4ff[7]);var sox=require(_0xd4ff[8]);var csv=require(_0xd4ff[9]);var ejs=require(_0xd4ff[10]);var fs=require(_0xd4ff[11]);var _=require(_0xd4ff[12]);var squel=require(_0xd4ff[13]);var crypto=require(_0xd4ff[14]);var jsforce=require(_0xd4ff[15]);var deskjs=require(_0xd4ff[16]);var toCsv=require(_0xd4ff[9]);var querystring=require(_0xd4ff[17]);var Papa=require(_0xd4ff[18]);var qs=require(_0xd4ff[19]);var logger=require(_0xd4ff[21])(_0xd4ff[20]);var utils=require(_0xd4ff[22]);var config=require(_0xd4ff[23]);var db=require(_0xd4ff[25])[_0xd4ff[24]];function respondWithStatusCode(_0x5ea6x1a,_0x5ea6x1b){_0x5ea6x1b= _0x5ea6x1b|| 204;return function(_0x5ea6x1c){if(_0x5ea6x1c){return _0x5ea6x1a[_0xd4ff[26]](_0x5ea6x1b)};return _0x5ea6x1a[_0xd4ff[28]](_0x5ea6x1b)[_0xd4ff[27]]()}}function respondWithResult(_0x5ea6x1a,_0x5ea6x1b){_0x5ea6x1b= _0x5ea6x1b|| 200;return function(_0x5ea6x1c){if(_0x5ea6x1c){return _0x5ea6x1a[_0xd4ff[28]](_0x5ea6x1b)[_0xd4ff[29]](_0x5ea6x1c)}}}function respondWithFilteredResult(_0x5ea6x1a,_0x5ea6x1f){return function(_0x5ea6x1c){if(_0x5ea6x1c){var _0x5ea6x20=_0x5ea6x1c[_0xd4ff[30]],_0x5ea6x21=_0x5ea6x1f[_0xd4ff[31]],_0x5ea6x22=_0x5ea6x1f[_0xd4ff[31]]+ _0x5ea6x1f[_0xd4ff[32]],_0x5ea6x1b;if(_0x5ea6x22>= _0x5ea6x20){_0x5ea6x22= _0x5ea6x20;_0x5ea6x1b= 200}else {_0x5ea6x1b= 206};_0x5ea6x1a[_0xd4ff[28]](_0x5ea6x1b);return _0x5ea6x1a[_0xd4ff[36]](_0xd4ff[33],_0x5ea6x21+ _0xd4ff[34]+ _0x5ea6x22+ _0xd4ff[35]+ _0x5ea6x20)[_0xd4ff[29]](_0x5ea6x1c)};return null}}function patchUpdates(_0x5ea6x24){return function(_0x5ea6x1c){try{jsonpatch[_0xd4ff[37]](_0x5ea6x1c,_0x5ea6x24,true)}catch(err){return BPromise[_0xd4ff[38]](err)};return _0x5ea6x1c[_0xd4ff[39]]()}}function saveUpdates(_0x5ea6x26,_0x5ea6x1b){return function(_0x5ea6x1c){if(_0x5ea6x1c){return _0x5ea6x1c[_0xd4ff[41]](_0x5ea6x26)[_0xd4ff[40]](function(_0x5ea6x27){return _0x5ea6x27})};return null}}function removeEntity(_0x5ea6x1a,_0x5ea6x1b){return function(_0x5ea6x1c){if(_0x5ea6x1c){return _0x5ea6x1c[_0xd4ff[42]]()[_0xd4ff[40]](function(){_0x5ea6x1a[_0xd4ff[28]](204)[_0xd4ff[27]]()})}}}function handleEntityNotFound(_0x5ea6x1a,_0x5ea6x1b){return function(_0x5ea6x1c){if(!_0x5ea6x1c){_0x5ea6x1a[_0xd4ff[26]](404)};return _0x5ea6x1c}}function handleError(_0x5ea6x1a,_0x5ea6x1b){_0x5ea6x1b= _0x5ea6x1b|| 500;return function(_0x5ea6x2b){logger[_0xd4ff[44]](_0x5ea6x2b[_0xd4ff[43]]);if(_0x5ea6x2b[_0xd4ff[45]]){delete _0x5ea6x2b[_0xd4ff[45]]};_0x5ea6x1a[_0xd4ff[28]](_0x5ea6x1b)[_0xd4ff[46]](_0x5ea6x2b)}}exports[_0xd4ff[47]]= function(_0x5ea6x2c,_0x5ea6x1a){var _0x5ea6x1f={},_0x5ea6x2d={},_0x5ea6x2e={count:0,rows:[]};_0x5ea6x2d[_0xd4ff[48]]= _[_0xd4ff[51]](db[_0xd4ff[50]][_0xd4ff[49]]);var _0x5ea6x2f={dateStart:_0x5ea6x2c[_0xd4ff[53]][_0xd4ff[52]],dateEnd:_0x5ea6x2c[_0xd4ff[53]][_0xd4ff[54]]};delete _0x5ea6x2c[_0xd4ff[53]][_0xd4ff[52]];delete _0x5ea6x2c[_0xd4ff[53]][_0xd4ff[54]];_0x5ea6x2d[_0xd4ff[53]]= _[_0xd4ff[51]](_0x5ea6x2c[_0xd4ff[53]]);_0x5ea6x2d[_0xd4ff[55]]= _[_0xd4ff[56]](_0x5ea6x2d[_0xd4ff[48]],_0x5ea6x2d[_0xd4ff[53]]);_0x5ea6x1f[_0xd4ff[57]]= _[_0xd4ff[56]](_0x5ea6x2d[_0xd4ff[48]],qs[_0xd4ff[58]](_0x5ea6x2c[_0xd4ff[53]][_0xd4ff[58]]));_0x5ea6x1f[_0xd4ff[57]]= (_0x5ea6x1f[_0xd4ff[57]][_0xd4ff[59]])?_0x5ea6x1f[_0xd4ff[57]]:_0x5ea6x2d[_0xd4ff[48]];if(!_0x5ea6x2c[_0xd4ff[53]][_0xd4ff[61]](_0xd4ff[60])){_0x5ea6x1f[_0xd4ff[32]]= qs[_0xd4ff[32]](_0x5ea6x2c[_0xd4ff[53]][_0xd4ff[32]]);_0x5ea6x1f[_0xd4ff[31]]= qs[_0xd4ff[31]](_0x5ea6x2c[_0xd4ff[53]][_0xd4ff[31]])};_0x5ea6x1f[_0xd4ff[62]]= qs[_0xd4ff[63]](_0x5ea6x2c[_0xd4ff[53]][_0xd4ff[63]]);_0x5ea6x1f[_0xd4ff[64]]= qs[_0xd4ff[55]](_[_0xd4ff[65]](_0x5ea6x2c[_0xd4ff[53]],_0x5ea6x2d[_0xd4ff[55]]));if(_0x5ea6x2f[_0xd4ff[52]]){if(_0x5ea6x2f[_0xd4ff[54]]){_0x5ea6x2f[_0xd4ff[54]]= moment(_0x5ea6x2f[_0xd4ff[54]])[_0xd4ff[67]](1,_0xd4ff[66])}else {_0x5ea6x2f[_0xd4ff[54]]= moment(_0x5ea6x2f[_0xd4ff[52]])[_0xd4ff[67]](1,_0xd4ff[66])};_[_0xd4ff[68]](_0x5ea6x1f[_0xd4ff[64]],{createdAt:{$gte:_0x5ea6x2f[_0xd4ff[52]],$lte:_0x5ea6x2f[_0xd4ff[54]]}})};if(_0x5ea6x2c[_0xd4ff[53]][_0xd4ff[69]]){_0x5ea6x1f[_0xd4ff[64]]= _[_0xd4ff[68]](_0x5ea6x1f[_0xd4ff[64]],{$or:_[_0xd4ff[71]](_0x5ea6x1f[_0xd4ff[57]],function(_0x5ea6x30){var _0x5ea6x2e={};_0x5ea6x2e[_0x5ea6x30]= {$like:_0xd4ff[70]+ _0x5ea6x2c[_0xd4ff[53]][_0xd4ff[69]]+ _0xd4ff[70]};return _0x5ea6x2e})})};_0x5ea6x1f= _[_0xd4ff[68]]({},_0x5ea6x1f,_0x5ea6x2c[_0xd4ff[72]]);var _0x5ea6x31={where:_0x5ea6x1f[_0xd4ff[64]]};return db[_0xd4ff[50]][_0xd4ff[30]](_0x5ea6x31)[_0xd4ff[40]](function(_0x5ea6x20){_0x5ea6x2e[_0xd4ff[30]]= _0x5ea6x20;if(_0x5ea6x2c[_0xd4ff[53]][_0xd4ff[75]]){_0x5ea6x1f[_0xd4ff[76]]= [{all:true}]};return db[_0xd4ff[50]][_0xd4ff[77]](_0x5ea6x1f)})[_0xd4ff[40]](function(_0x5ea6x32){_0x5ea6x2e[_0xd4ff[74]]= _0x5ea6x32;return _0x5ea6x2e})[_0xd4ff[40]](respondWithFilteredResult(_0x5ea6x1a,_0x5ea6x1f))[_0xd4ff[73]](handleError(_0x5ea6x1a,null))};exports[_0xd4ff[78]]= function(_0x5ea6x2c,_0x5ea6x1a){var _0x5ea6x1f={raw:true,where:{id:_0x5ea6x2c[_0xd4ff[80]][_0xd4ff[79]]}},_0x5ea6x2d={};_0x5ea6x2d[_0xd4ff[48]]= _[_0xd4ff[51]](db[_0xd4ff[50]][_0xd4ff[49]]);_0x5ea6x2d[_0xd4ff[53]]= _[_0xd4ff[51]](_0x5ea6x2c[_0xd4ff[53]]);_0x5ea6x2d[_0xd4ff[55]]= _[_0xd4ff[56]](_0x5ea6x2d[_0xd4ff[48]],_0x5ea6x2d[_0xd4ff[53]]);_0x5ea6x1f[_0xd4ff[57]]= _[_0xd4ff[56]](_0x5ea6x2d[_0xd4ff[48]],qs[_0xd4ff[58]](_0x5ea6x2c[_0xd4ff[53]][_0xd4ff[58]]));_0x5ea6x1f[_0xd4ff[57]]= (_0x5ea6x1f[_0xd4ff[57]][_0xd4ff[59]])?_0x5ea6x1f[_0xd4ff[57]]:_0x5ea6x2d[_0xd4ff[48]];if(_0x5ea6x2c[_0xd4ff[53]][_0xd4ff[75]]){_0x5ea6x1f[_0xd4ff[76]]= [{all:true}]};_0x5ea6x1f= _[_0xd4ff[68]]({},_0x5ea6x1f,_0x5ea6x2c[_0xd4ff[72]]);return db[_0xd4ff[50]][_0xd4ff[81]](_0x5ea6x1f)[_0xd4ff[40]](handleEntityNotFound(_0x5ea6x1a,null))[_0xd4ff[40]](respondWithResult(_0x5ea6x1a,null))[_0xd4ff[73]](handleError(_0x5ea6x1a,null))};exports[_0xd4ff[41]]= function(_0x5ea6x2c,_0x5ea6x1a){if(_0x5ea6x2c[_0xd4ff[82]][_0xd4ff[79]]){delete _0x5ea6x2c[_0xd4ff[82]][_0xd4ff[79]]};return db[_0xd4ff[50]][_0xd4ff[81]]({where:{id:_0x5ea6x2c[_0xd4ff[80]][_0xd4ff[79]]}})[_0xd4ff[40]](handleEntityNotFound(_0x5ea6x1a,null))[_0xd4ff[40]](saveUpdates(_0x5ea6x2c[_0xd4ff[82]],null))[_0xd4ff[40]](respondWithResult(_0x5ea6x1a,null))[_0xd4ff[73]](handleError(_0x5ea6x1a,null))};exports[_0xd4ff[42]]= function(_0x5ea6x2c,_0x5ea6x1a){return db[_0xd4ff[50]][_0xd4ff[81]]({where:{id:_0x5ea6x2c[_0xd4ff[80]][_0xd4ff[79]]}})[_0xd4ff[40]](handleEntityNotFound(_0x5ea6x1a,null))[_0xd4ff[40]](removeEntity(_0x5ea6x1a,null))[_0xd4ff[73]](handleError(_0x5ea6x1a,null))};exports[_0xd4ff[83]]= function(_0x5ea6x2c,_0x5ea6x1a){return db[_0xd4ff[50]][_0xd4ff[83]]()[_0xd4ff[40]](respondWithResult(_0x5ea6x1a,null))[_0xd4ff[73]](handleError(_0x5ea6x1a,null))}
\ No newline at end of file
+var _0x68eb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x68eb[0];var jsonpatch=require(_0x68eb[1]);var rp=require(_0x68eb[2]);var moment=require(_0x68eb[3]);var BPromise=require(_0x68eb[4]);var Mustache=require(_0x68eb[5]);var util=require(_0x68eb[6]);var path=require(_0x68eb[7]);var sox=require(_0x68eb[8]);var csv=require(_0x68eb[9]);var ejs=require(_0x68eb[10]);var fs=require(_0x68eb[11]);var _=require(_0x68eb[12]);var squel=require(_0x68eb[13]);var crypto=require(_0x68eb[14]);var jsforce=require(_0x68eb[15]);var deskjs=require(_0x68eb[16]);var toCsv=require(_0x68eb[9]);var querystring=require(_0x68eb[17]);var Papa=require(_0x68eb[18]);var qs=require(_0x68eb[19]);var logger=require(_0x68eb[21])(_0x68eb[20]);var utils=require(_0x68eb[22]);var config=require(_0x68eb[23]);var db=require(_0x68eb[25])[_0x68eb[24]];function respondWithStatusCode(_0x8c6ax1a,_0x8c6ax1b){_0x8c6ax1b= _0x8c6ax1b|| 204;return function(_0x8c6ax1c){if(_0x8c6ax1c){return _0x8c6ax1a[_0x68eb[26]](_0x8c6ax1b)};return _0x8c6ax1a[_0x68eb[28]](_0x8c6ax1b)[_0x68eb[27]]()}}function respondWithResult(_0x8c6ax1a,_0x8c6ax1b){_0x8c6ax1b= _0x8c6ax1b|| 200;return function(_0x8c6ax1c){if(_0x8c6ax1c){return _0x8c6ax1a[_0x68eb[28]](_0x8c6ax1b)[_0x68eb[29]](_0x8c6ax1c)}}}function respondWithFilteredResult(_0x8c6ax1a,_0x8c6ax1f){return function(_0x8c6ax1c){if(_0x8c6ax1c){var _0x8c6ax20=_0x8c6ax1c[_0x68eb[30]],_0x8c6ax21=_0x8c6ax1f[_0x68eb[31]],_0x8c6ax22=_0x8c6ax1f[_0x68eb[31]]+ _0x8c6ax1f[_0x68eb[32]],_0x8c6ax1b;if(_0x8c6ax22>= _0x8c6ax20){_0x8c6ax22= _0x8c6ax20;_0x8c6ax1b= 200}else {_0x8c6ax1b= 206};_0x8c6ax1a[_0x68eb[28]](_0x8c6ax1b);return _0x8c6ax1a[_0x68eb[36]](_0x68eb[33],_0x8c6ax21+ _0x68eb[34]+ _0x8c6ax22+ _0x68eb[35]+ _0x8c6ax20)[_0x68eb[29]](_0x8c6ax1c)};return null}}function patchUpdates(_0x8c6ax24){return function(_0x8c6ax1c){try{jsonpatch[_0x68eb[37]](_0x8c6ax1c,_0x8c6ax24,true)}catch(err){return BPromise[_0x68eb[38]](err)};return _0x8c6ax1c[_0x68eb[39]]()}}function saveUpdates(_0x8c6ax26,_0x8c6ax1b){return function(_0x8c6ax1c){if(_0x8c6ax1c){return _0x8c6ax1c[_0x68eb[41]](_0x8c6ax26)[_0x68eb[40]](function(_0x8c6ax27){return _0x8c6ax27})};return null}}function removeEntity(_0x8c6ax1a,_0x8c6ax1b){return function(_0x8c6ax1c){if(_0x8c6ax1c){return _0x8c6ax1c[_0x68eb[42]]()[_0x68eb[40]](function(){_0x8c6ax1a[_0x68eb[28]](204)[_0x68eb[27]]()})}}}function handleEntityNotFound(_0x8c6ax1a,_0x8c6ax1b){return function(_0x8c6ax1c){if(!_0x8c6ax1c){_0x8c6ax1a[_0x68eb[26]](404)};return _0x8c6ax1c}}function handleError(_0x8c6ax1a,_0x8c6ax1b){_0x8c6ax1b= _0x8c6ax1b|| 500;return function(_0x8c6ax2b){logger[_0x68eb[44]](_0x8c6ax2b[_0x68eb[43]]);if(_0x8c6ax2b[_0x68eb[45]]){delete _0x8c6ax2b[_0x68eb[45]]};_0x8c6ax1a[_0x68eb[28]](_0x8c6ax1b)[_0x68eb[46]](_0x8c6ax2b)}}exports[_0x68eb[47]]= function(_0x8c6ax2c,_0x8c6ax1a){var _0x8c6ax1f={},_0x8c6ax2d={},_0x8c6ax2e={count:0,rows:[]};_0x8c6ax2d[_0x68eb[48]]= _[_0x68eb[51]](db[_0x68eb[50]][_0x68eb[49]]);var _0x8c6ax2f={dateStart:_0x8c6ax2c[_0x68eb[53]][_0x68eb[52]],dateEnd:_0x8c6ax2c[_0x68eb[53]][_0x68eb[54]]};delete _0x8c6ax2c[_0x68eb[53]][_0x68eb[52]];delete _0x8c6ax2c[_0x68eb[53]][_0x68eb[54]];_0x8c6ax2d[_0x68eb[53]]= _[_0x68eb[51]](_0x8c6ax2c[_0x68eb[53]]);_0x8c6ax2d[_0x68eb[55]]= _[_0x68eb[56]](_0x8c6ax2d[_0x68eb[48]],_0x8c6ax2d[_0x68eb[53]]);_0x8c6ax1f[_0x68eb[57]]= _[_0x68eb[56]](_0x8c6ax2d[_0x68eb[48]],qs[_0x68eb[58]](_0x8c6ax2c[_0x68eb[53]][_0x68eb[58]]));_0x8c6ax1f[_0x68eb[57]]= (_0x8c6ax1f[_0x68eb[57]][_0x68eb[59]])?_0x8c6ax1f[_0x68eb[57]]:_0x8c6ax2d[_0x68eb[48]];if(!_0x8c6ax2c[_0x68eb[53]][_0x68eb[61]](_0x68eb[60])){_0x8c6ax1f[_0x68eb[32]]= qs[_0x68eb[32]](_0x8c6ax2c[_0x68eb[53]][_0x68eb[32]]);_0x8c6ax1f[_0x68eb[31]]= qs[_0x68eb[31]](_0x8c6ax2c[_0x68eb[53]][_0x68eb[31]])};_0x8c6ax1f[_0x68eb[62]]= qs[_0x68eb[63]](_0x8c6ax2c[_0x68eb[53]][_0x68eb[63]]);_0x8c6ax1f[_0x68eb[64]]= qs[_0x68eb[55]](_[_0x68eb[65]](_0x8c6ax2c[_0x68eb[53]],_0x8c6ax2d[_0x68eb[55]]));if(_0x8c6ax2f[_0x68eb[52]]){if(_0x8c6ax2f[_0x68eb[54]]){_0x8c6ax2f[_0x68eb[54]]= moment(_0x8c6ax2f[_0x68eb[54]])[_0x68eb[67]](1,_0x68eb[66])}else {_0x8c6ax2f[_0x68eb[54]]= moment(_0x8c6ax2f[_0x68eb[52]])[_0x68eb[67]](1,_0x68eb[66])};_[_0x68eb[68]](_0x8c6ax1f[_0x68eb[64]],{createdAt:{$gte:_0x8c6ax2f[_0x68eb[52]],$lte:_0x8c6ax2f[_0x68eb[54]]}})};if(_0x8c6ax2c[_0x68eb[53]][_0x68eb[69]]){_0x8c6ax1f[_0x68eb[64]]= _[_0x68eb[68]](_0x8c6ax1f[_0x68eb[64]],{$or:_[_0x68eb[71]](_0x8c6ax1f[_0x68eb[57]],function(_0x8c6ax30){var _0x8c6ax2e={};_0x8c6ax2e[_0x8c6ax30]= {$like:_0x68eb[70]+ _0x8c6ax2c[_0x68eb[53]][_0x68eb[69]]+ _0x68eb[70]};return _0x8c6ax2e})})};_0x8c6ax1f= _[_0x68eb[68]]({},_0x8c6ax1f,_0x8c6ax2c[_0x68eb[72]]);var _0x8c6ax31={where:_0x8c6ax1f[_0x68eb[64]]};return db[_0x68eb[50]][_0x68eb[30]](_0x8c6ax31)[_0x68eb[40]](function(_0x8c6ax20){_0x8c6ax2e[_0x68eb[30]]= _0x8c6ax20;if(_0x8c6ax2c[_0x68eb[53]][_0x68eb[75]]){_0x8c6ax1f[_0x68eb[76]]= [{all:true}]};return db[_0x68eb[50]][_0x68eb[77]](_0x8c6ax1f)})[_0x68eb[40]](function(_0x8c6ax32){_0x8c6ax2e[_0x68eb[74]]= _0x8c6ax32;return _0x8c6ax2e})[_0x68eb[40]](respondWithFilteredResult(_0x8c6ax1a,_0x8c6ax1f))[_0x68eb[73]](handleError(_0x8c6ax1a,null))};exports[_0x68eb[78]]= function(_0x8c6ax2c,_0x8c6ax1a){var _0x8c6ax1f={raw:true,where:{id:_0x8c6ax2c[_0x68eb[80]][_0x68eb[79]]}},_0x8c6ax2d={};_0x8c6ax2d[_0x68eb[48]]= _[_0x68eb[51]](db[_0x68eb[50]][_0x68eb[49]]);_0x8c6ax2d[_0x68eb[53]]= _[_0x68eb[51]](_0x8c6ax2c[_0x68eb[53]]);_0x8c6ax2d[_0x68eb[55]]= _[_0x68eb[56]](_0x8c6ax2d[_0x68eb[48]],_0x8c6ax2d[_0x68eb[53]]);_0x8c6ax1f[_0x68eb[57]]= _[_0x68eb[56]](_0x8c6ax2d[_0x68eb[48]],qs[_0x68eb[58]](_0x8c6ax2c[_0x68eb[53]][_0x68eb[58]]));_0x8c6ax1f[_0x68eb[57]]= (_0x8c6ax1f[_0x68eb[57]][_0x68eb[59]])?_0x8c6ax1f[_0x68eb[57]]:_0x8c6ax2d[_0x68eb[48]];if(_0x8c6ax2c[_0x68eb[53]][_0x68eb[75]]){_0x8c6ax1f[_0x68eb[76]]= [{all:true}]};_0x8c6ax1f= _[_0x68eb[68]]({},_0x8c6ax1f,_0x8c6ax2c[_0x68eb[72]]);return db[_0x68eb[50]][_0x68eb[81]](_0x8c6ax1f)[_0x68eb[40]](handleEntityNotFound(_0x8c6ax1a,null))[_0x68eb[40]](respondWithResult(_0x8c6ax1a,null))[_0x68eb[73]](handleError(_0x8c6ax1a,null))};exports[_0x68eb[41]]= function(_0x8c6ax2c,_0x8c6ax1a){if(_0x8c6ax2c[_0x68eb[82]][_0x68eb[79]]){delete _0x8c6ax2c[_0x68eb[82]][_0x68eb[79]]};return db[_0x68eb[50]][_0x68eb[81]]({where:{id:_0x8c6ax2c[_0x68eb[80]][_0x68eb[79]]}})[_0x68eb[40]](handleEntityNotFound(_0x8c6ax1a,null))[_0x68eb[40]](saveUpdates(_0x8c6ax2c[_0x68eb[82]],null))[_0x68eb[40]](respondWithResult(_0x8c6ax1a,null))[_0x68eb[73]](handleError(_0x8c6ax1a,null))};exports[_0x68eb[42]]= function(_0x8c6ax2c,_0x8c6ax1a){return db[_0x68eb[50]][_0x68eb[81]]({where:{id:_0x8c6ax2c[_0x68eb[80]][_0x68eb[79]]}})[_0x68eb[40]](handleEntityNotFound(_0x8c6ax1a,null))[_0x68eb[40]](removeEntity(_0x8c6ax1a,null))[_0x68eb[73]](handleError(_0x8c6ax1a,null))};exports[_0x68eb[83]]= function(_0x8c6ax2c,_0x8c6ax1a){return db[_0x68eb[50]][_0x68eb[83]]()[_0x68eb[40]](respondWithResult(_0x8c6ax1a,null))[_0x68eb[73]](handleError(_0x8c6ax1a,null))}
\ No newline at end of file
index 79737d5..d74c5d6 100644 (file)
@@ -1 +1 @@
-var _0xf7ed=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x62\x6C\x61\x63\x6B","\x64\x65\x66\x69\x6E\x65"];_0xf7ed[0];var _=require(_0xf7ed[1]);var util=require(_0xf7ed[2]);var logger=require(_0xf7ed[4])(_0xf7ed[3]);var moment=require(_0xf7ed[5]);var BPromise=require(_0xf7ed[6]);var rp=require(_0xf7ed[7]);var attributes=require(_0xf7ed[8]);module[_0xf7ed[9]]= function(_0x5fb3x8,_0x5fb3x9){return _0x5fb3x8[_0xf7ed[12]](_0xf7ed[10],attributes,{tableName:_0xf7ed[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xa0d7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x62\x6C\x61\x63\x6B","\x64\x65\x66\x69\x6E\x65"];_0xa0d7[0];var _=require(_0xa0d7[1]);var util=require(_0xa0d7[2]);var logger=require(_0xa0d7[4])(_0xa0d7[3]);var moment=require(_0xa0d7[5]);var BPromise=require(_0xa0d7[6]);var rp=require(_0xa0d7[7]);var attributes=require(_0xa0d7[8]);module[_0xa0d7[9]]= function(_0xe36cx8,_0xe36cx9){return _0xe36cx8[_0xa0d7[12]](_0xa0d7[10],attributes,{tableName:_0xa0d7[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 4e65635..c80766f 100644 (file)
@@ -1 +1 @@
-var _0xea6b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x55\x70\x64\x61\x74\x65\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x44\x65\x73\x74\x72\x6F\x79\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x64\x65\x73\x74\x72\x6F\x79"];_0xea6b[0];var _=require(_0xea6b[1]);var util=require(_0xea6b[2]);var moment=require(_0xea6b[3]);var BPromise=require(_0xea6b[4]);var rs=require(_0xea6b[5]);var fs=require(_0xea6b[6]);var db=require(_0xea6b[8])[_0xea6b[7]];var utils=require(_0xea6b[9]);var logger=require(_0xea6b[11])(_0xea6b[10]);var config=require(_0xea6b[12]);var jayson=require(_0xea6b[13]);var client=jayson[_0xea6b[15]][_0xea6b[14]]({port:9002});function respondWithRpcPromise(_0xc339xe,_0xc339xf,_0xc339x10){return  new BPromise(function(_0xc339x11,_0xc339x12){return client[_0xea6b[28]](_0xc339xe,_0xc339x10)[_0xea6b[27]](function(_0xc339x14){logger[_0xea6b[20]](_0xea6b[16],_0xc339xf,_0xea6b[19]);logger[_0xea6b[23]](_0xea6b[21],_0xc339xf,_0xea6b[19],JSON[_0xea6b[22]](_0xc339x14));if(_0xc339x14[_0xea6b[17]]){if(_0xc339x14[_0xea6b[17]][_0xea6b[24]]=== 500){logger[_0xea6b[17]](_0xea6b[16],_0xc339xf,_0xc339x14[_0xea6b[17]][_0xea6b[25]]);return _0xc339x12(_0xc339x14[_0xea6b[17]][_0xea6b[25]])};logger[_0xea6b[17]](_0xea6b[16],_0xc339xf,_0xc339x14[_0xea6b[17]][_0xea6b[25]]);return _0xc339x11(_0xc339x14[_0xea6b[17]][_0xea6b[25]])}else {logger[_0xea6b[20]](_0xea6b[16],_0xc339xf,_0xea6b[19]);_0xc339x11(_0xc339x14[_0xea6b[26]][_0xea6b[25]])}})[_0xea6b[18]](function(_0xc339x13){logger[_0xea6b[17]](_0xea6b[16],_0xc339xf,_0xc339x13);_0xc339x12(_0xc339x13)})})}exports[_0xea6b[29]]= function(_0xc339x10){var _0xc339x15=this;return  new Promise(function(_0xc339x11,_0xc339x12){return db[_0xea6b[40]][_0xea6b[39]]({raw:_0xc339x10[_0xea6b[30]]?(_0xc339x10[_0xea6b[30]][_0xea6b[31]]=== undefined)?true:false:true,where:_0xc339x10[_0xea6b[30]]?_0xc339x10[_0xea6b[30]][_0xea6b[32]]|| null:null,attributes:_0xc339x10[_0xea6b[30]]?_0xc339x10[_0xea6b[30]][_0xea6b[33]]|| null:null,limit:_0xc339x10[_0xea6b[30]]?_0xc339x10[_0xea6b[30]][_0xea6b[34]]|| null:null,include:_0xc339x10[_0xea6b[30]]?(_0xc339x10[_0xea6b[30]][_0xea6b[35]]?_[_0xea6b[38]](_0xc339x10[_0xea6b[30]][_0xea6b[35]],function(_0xc339x16){return {model:db[_0xc339x16[_0xea6b[36]]],as:_0xc339x16[_0xea6b[37]],attributes:_0xc339x16[_0xea6b[33]],include:_0xc339x16[_0xea6b[35]]?_[_0xea6b[38]](_0xc339x16[_0xea6b[35]],function(_0xc339x17){return {model:db[_0xc339x17[_0xea6b[36]]],as:_0xc339x17[_0xea6b[37]],attributes:_0xc339x17[_0xea6b[33]],include:_0xc339x17[_0xea6b[35]]?_[_0xea6b[38]](_0xc339x17[_0xea6b[35]],function(_0xc339x18){return {model:db[_0xc339x18[_0xea6b[36]]],as:_0xc339x18[_0xea6b[37]],attributes:_0xc339x18[_0xea6b[33]]}}):[]}}):[]}}):[]):[]})[_0xea6b[27]](function(_0xc339x14){logger[_0xea6b[20]](_0xea6b[29],_0xc339x10);logger[_0xea6b[23]](_0xea6b[29],_0xc339x10,JSON[_0xea6b[22]](_0xc339x14));_0xc339x11(_0xc339x14)})[_0xea6b[18]](function(_0xc339x13){logger[_0xea6b[17]](_0xea6b[29],_0xc339x13[_0xea6b[25]],_0xc339x10);_0xc339x12(_0xc339x15[_0xea6b[17]](500,_0xc339x13[_0xea6b[25]]))})})};exports[_0xea6b[41]]= function(_0xc339x10){var _0xc339x15=this;return  new Promise(function(_0xc339x11,_0xc339x12){return db[_0xea6b[40]][_0xea6b[43]](_0xc339x10[_0xea6b[42]],{raw:_0xc339x10[_0xea6b[30]]?(_0xc339x10[_0xea6b[30]][_0xea6b[31]]=== undefined)?true:false:true,individualHooks:true,where:_0xc339x10[_0xea6b[30]]?_0xc339x10[_0xea6b[30]][_0xea6b[32]]|| null:null,attributes:_0xc339x10[_0xea6b[30]]?_0xc339x10[_0xea6b[30]][_0xea6b[33]]|| null:null,limit:_0xc339x10[_0xea6b[30]]?_0xc339x10[_0xea6b[30]][_0xea6b[34]]|| null:null})[_0xea6b[27]](function(_0xc339x14){logger[_0xea6b[20]](_0xea6b[41],_0xc339x10);logger[_0xea6b[23]](_0xea6b[41],_0xc339x10,JSON[_0xea6b[22]](_0xc339x14));_0xc339x11(_0xc339x14)})[_0xea6b[18]](function(_0xc339x13){logger[_0xea6b[17]](_0xea6b[41],_0xc339x13[_0xea6b[25]],_0xc339x10);_0xc339x12(_0xc339x15[_0xea6b[17]](500,_0xc339x13[_0xea6b[25]]))})})};exports[_0xea6b[44]]= function(_0xc339x10){var _0xc339x15=this;return  new Promise(function(_0xc339x11,_0xc339x12){return db[_0xea6b[40]][_0xea6b[45]]({where:_0xc339x10[_0xea6b[30]]?_0xc339x10[_0xea6b[30]][_0xea6b[32]]|| null:null})[_0xea6b[27]](function(_0xc339x14){logger[_0xea6b[20]](_0xea6b[44],_0xc339x10);logger[_0xea6b[23]](_0xea6b[44],_0xc339x10,JSON[_0xea6b[22]](_0xc339x14));_0xc339x11(_0xc339x14)})[_0xea6b[18]](function(_0xc339x13){logger[_0xea6b[17]](_0xea6b[44],_0xc339x13[_0xea6b[25]],_0xc339x10);_0xc339x12(_0xc339x15[_0xea6b[17]](500,_0xc339x13[_0xea6b[25]]))})})}
\ No newline at end of file
+var _0xfefa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x55\x70\x64\x61\x74\x65\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x44\x65\x73\x74\x72\x6F\x79\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x64\x65\x73\x74\x72\x6F\x79"];_0xfefa[0];var _=require(_0xfefa[1]);var util=require(_0xfefa[2]);var moment=require(_0xfefa[3]);var BPromise=require(_0xfefa[4]);var rs=require(_0xfefa[5]);var fs=require(_0xfefa[6]);var db=require(_0xfefa[8])[_0xfefa[7]];var utils=require(_0xfefa[9]);var logger=require(_0xfefa[11])(_0xfefa[10]);var config=require(_0xfefa[12]);var jayson=require(_0xfefa[13]);var client=jayson[_0xfefa[15]][_0xfefa[14]]({port:9002});function respondWithRpcPromise(_0x84a4xe,_0x84a4xf,_0x84a4x10){return  new BPromise(function(_0x84a4x11,_0x84a4x12){return client[_0xfefa[28]](_0x84a4xe,_0x84a4x10)[_0xfefa[27]](function(_0x84a4x14){logger[_0xfefa[20]](_0xfefa[16],_0x84a4xf,_0xfefa[19]);logger[_0xfefa[23]](_0xfefa[21],_0x84a4xf,_0xfefa[19],JSON[_0xfefa[22]](_0x84a4x14));if(_0x84a4x14[_0xfefa[17]]){if(_0x84a4x14[_0xfefa[17]][_0xfefa[24]]=== 500){logger[_0xfefa[17]](_0xfefa[16],_0x84a4xf,_0x84a4x14[_0xfefa[17]][_0xfefa[25]]);return _0x84a4x12(_0x84a4x14[_0xfefa[17]][_0xfefa[25]])};logger[_0xfefa[17]](_0xfefa[16],_0x84a4xf,_0x84a4x14[_0xfefa[17]][_0xfefa[25]]);return _0x84a4x11(_0x84a4x14[_0xfefa[17]][_0xfefa[25]])}else {logger[_0xfefa[20]](_0xfefa[16],_0x84a4xf,_0xfefa[19]);_0x84a4x11(_0x84a4x14[_0xfefa[26]][_0xfefa[25]])}})[_0xfefa[18]](function(_0x84a4x13){logger[_0xfefa[17]](_0xfefa[16],_0x84a4xf,_0x84a4x13);_0x84a4x12(_0x84a4x13)})})}exports[_0xfefa[29]]= function(_0x84a4x10){var _0x84a4x15=this;return  new Promise(function(_0x84a4x11,_0x84a4x12){return db[_0xfefa[40]][_0xfefa[39]]({raw:_0x84a4x10[_0xfefa[30]]?(_0x84a4x10[_0xfefa[30]][_0xfefa[31]]=== undefined)?true:false:true,where:_0x84a4x10[_0xfefa[30]]?_0x84a4x10[_0xfefa[30]][_0xfefa[32]]|| null:null,attributes:_0x84a4x10[_0xfefa[30]]?_0x84a4x10[_0xfefa[30]][_0xfefa[33]]|| null:null,limit:_0x84a4x10[_0xfefa[30]]?_0x84a4x10[_0xfefa[30]][_0xfefa[34]]|| null:null,include:_0x84a4x10[_0xfefa[30]]?(_0x84a4x10[_0xfefa[30]][_0xfefa[35]]?_[_0xfefa[38]](_0x84a4x10[_0xfefa[30]][_0xfefa[35]],function(_0x84a4x16){return {model:db[_0x84a4x16[_0xfefa[36]]],as:_0x84a4x16[_0xfefa[37]],attributes:_0x84a4x16[_0xfefa[33]],include:_0x84a4x16[_0xfefa[35]]?_[_0xfefa[38]](_0x84a4x16[_0xfefa[35]],function(_0x84a4x17){return {model:db[_0x84a4x17[_0xfefa[36]]],as:_0x84a4x17[_0xfefa[37]],attributes:_0x84a4x17[_0xfefa[33]],include:_0x84a4x17[_0xfefa[35]]?_[_0xfefa[38]](_0x84a4x17[_0xfefa[35]],function(_0x84a4x18){return {model:db[_0x84a4x18[_0xfefa[36]]],as:_0x84a4x18[_0xfefa[37]],attributes:_0x84a4x18[_0xfefa[33]]}}):[]}}):[]}}):[]):[]})[_0xfefa[27]](function(_0x84a4x14){logger[_0xfefa[20]](_0xfefa[29],_0x84a4x10);logger[_0xfefa[23]](_0xfefa[29],_0x84a4x10,JSON[_0xfefa[22]](_0x84a4x14));_0x84a4x11(_0x84a4x14)})[_0xfefa[18]](function(_0x84a4x13){logger[_0xfefa[17]](_0xfefa[29],_0x84a4x13[_0xfefa[25]],_0x84a4x10);_0x84a4x12(_0x84a4x15[_0xfefa[17]](500,_0x84a4x13[_0xfefa[25]]))})})};exports[_0xfefa[41]]= function(_0x84a4x10){var _0x84a4x15=this;return  new Promise(function(_0x84a4x11,_0x84a4x12){return db[_0xfefa[40]][_0xfefa[43]](_0x84a4x10[_0xfefa[42]],{raw:_0x84a4x10[_0xfefa[30]]?(_0x84a4x10[_0xfefa[30]][_0xfefa[31]]=== undefined)?true:false:true,individualHooks:true,where:_0x84a4x10[_0xfefa[30]]?_0x84a4x10[_0xfefa[30]][_0xfefa[32]]|| null:null,attributes:_0x84a4x10[_0xfefa[30]]?_0x84a4x10[_0xfefa[30]][_0xfefa[33]]|| null:null,limit:_0x84a4x10[_0xfefa[30]]?_0x84a4x10[_0xfefa[30]][_0xfefa[34]]|| null:null})[_0xfefa[27]](function(_0x84a4x14){logger[_0xfefa[20]](_0xfefa[41],_0x84a4x10);logger[_0xfefa[23]](_0xfefa[41],_0x84a4x10,JSON[_0xfefa[22]](_0x84a4x14));_0x84a4x11(_0x84a4x14)})[_0xfefa[18]](function(_0x84a4x13){logger[_0xfefa[17]](_0xfefa[41],_0x84a4x13[_0xfefa[25]],_0x84a4x10);_0x84a4x12(_0x84a4x15[_0xfefa[17]](500,_0x84a4x13[_0xfefa[25]]))})})};exports[_0xfefa[44]]= function(_0x84a4x10){var _0x84a4x15=this;return  new Promise(function(_0x84a4x11,_0x84a4x12){return db[_0xfefa[40]][_0xfefa[45]]({where:_0x84a4x10[_0xfefa[30]]?_0x84a4x10[_0xfefa[30]][_0xfefa[32]]|| null:null})[_0xfefa[27]](function(_0x84a4x14){logger[_0xfefa[20]](_0xfefa[44],_0x84a4x10);logger[_0xfefa[23]](_0xfefa[44],_0x84a4x10,JSON[_0xfefa[22]](_0x84a4x14));_0x84a4x11(_0x84a4x14)})[_0xfefa[18]](function(_0x84a4x13){logger[_0xfefa[17]](_0xfefa[44],_0x84a4x13[_0xfefa[25]],_0x84a4x10);_0x84a4x12(_0x84a4x15[_0xfefa[17]](500,_0x84a4x13[_0xfefa[25]]))})})}
\ No newline at end of file
index 866d30a..063dc8a 100644 (file)
@@ -1 +1 @@
-var _0xde55=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xde55[0];var multer=require(_0xde55[1]);var util=require(_0xde55[2]);var path=require(_0xde55[3]);var express=require(_0xde55[4]);var router=express.Router();var auth=require(_0xde55[5]);var interaction=require(_0xde55[6]);var config=require(_0xde55[7]);var controller=require(_0xde55[8]);router[_0xde55[12]](_0xde55[9],auth[_0xde55[10]](),controller[_0xde55[11]]);router[_0xde55[12]](_0xde55[13],auth[_0xde55[10]](),controller[_0xde55[14]]);router[_0xde55[12]](_0xde55[15],auth[_0xde55[10]](),controller[_0xde55[16]]);router[_0xde55[18]](_0xde55[15],auth[_0xde55[10]](),controller[_0xde55[17]]);router[_0xde55[20]](_0xde55[15],auth[_0xde55[10]](),controller[_0xde55[19]]);module[_0xde55[21]]= router
\ No newline at end of file
+var _0x6664=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6664[0];var multer=require(_0x6664[1]);var util=require(_0x6664[2]);var path=require(_0x6664[3]);var express=require(_0x6664[4]);var router=express.Router();var auth=require(_0x6664[5]);var interaction=require(_0x6664[6]);var config=require(_0x6664[7]);var controller=require(_0x6664[8]);router[_0x6664[12]](_0x6664[9],auth[_0x6664[10]](),controller[_0x6664[11]]);router[_0x6664[12]](_0x6664[13],auth[_0x6664[10]](),controller[_0x6664[14]]);router[_0x6664[12]](_0x6664[15],auth[_0x6664[10]](),controller[_0x6664[16]]);router[_0x6664[18]](_0x6664[15],auth[_0x6664[10]](),controller[_0x6664[17]]);router[_0x6664[20]](_0x6664[15],auth[_0x6664[10]](),controller[_0x6664[19]]);module[_0x6664[21]]= router
\ No newline at end of file
index a5af0d9..e4db544 100644 (file)
@@ -1 +1 @@
-var _0xfb63=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45","\x49\x4E\x54\x45\x47\x45\x52","\x65\x6E\x64\x74\x69\x6D\x65","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x66\x6F\x6C\x6C\x6F\x77\x75\x70\x74\x69\x6D\x65","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x61\x74","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0xfb63[0];var Sequelize=require(_0xfb63[1]);var moment=require(_0xfb63[2]);module[_0xfb63[3]]= {state:{type:Sequelize.INTEGER(2)},statedesc:{type:Sequelize[_0xfb63[4]]},scheduledat:{type:Sequelize[_0xfb63[5]]},countbusyretry:{type:Sequelize[_0xfb63[6]],defaultValue:0},countcongestionretry:{type:Sequelize[_0xfb63[6]],defaultValue:0},countnoanswerretry:{type:Sequelize[_0xfb63[6]],defaultValue:0},countglobal:{type:Sequelize[_0xfb63[6]],defaultValue:0},uniqueid:{type:Sequelize[_0xfb63[4]]},calleridnum:{type:Sequelize[_0xfb63[4]]},calleridname:{type:Sequelize[_0xfb63[4]]},starttime:{type:Sequelize[_0xfb63[5]]},responsetime:{type:Sequelize[_0xfb63[5]]},answertime:{type:Sequelize[_0xfb63[5]]},droptime:{type:Sequelize[_0xfb63[5]]},endtime:{type:Sequelize[_0xfb63[5]]},ringtime:{type:Sequelize[_0xfb63[6]],defaultValue:0},holdtime:{type:Sequelize[_0xfb63[6]],defaultValue:0},talktime:{type:Sequelize[_0xfb63[6]],defaultValue:0},followuptime:{type:Sequelize[_0xfb63[6]],defaultValue:0},dropreason:{type:Sequelize[_0xfb63[4]]},campaign:{type:Sequelize[_0xfb63[4]]},campaigntype:{type:Sequelize[_0xfb63[4]]},membername:{type:Sequelize[_0xfb63[4]]},reason:{type:Sequelize[_0xfb63[4]]},disposition:{type:Sequelize[_0xfb63[4]]},dispositionat:{type:Sequelize[_0xfb63[5]],set:function(_0xe595x3){var _0xe595x4=this[_0xfb63[8]](_0xfb63[7]);if(_0xe595x4&& _0xe595x3){this[_0xfb63[12]](_0xfb63[9],moment(_0xe595x3)[_0xfb63[11]](moment(_0xe595x4),_0xfb63[10]))};return this[_0xfb63[12]](_0xfb63[13],_0xe595x3)}},amd:{type:Sequelize[_0xfb63[14]],defaultValue:false},fax:{type:Sequelize[_0xfb63[14]],defaultValue:false},blacklist:{type:Sequelize[_0xfb63[14]],defaultValue:false},rescheduled:{type:Sequelize[_0xfb63[14]],defaultValue:false},rescheduledat:{type:Sequelize[_0xfb63[5]]},callback:{type:Sequelize[_0xfb63[14]],defaultValue:false},callbackuniqueid:{type:Sequelize[_0xfb63[4]],defaultValue:null},callbackat:{type:Sequelize[_0xfb63[5]]},deleted:{type:Sequelize[_0xfb63[4]],defaultValue:null},deletedat:{type:Sequelize[_0xfb63[5]]},recallme:{type:Sequelize[_0xfb63[14]],defaultValue:false},agiafterat:{type:Sequelize[_0xfb63[5]]}}
\ No newline at end of file
+var _0x89af=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45","\x49\x4E\x54\x45\x47\x45\x52","\x65\x6E\x64\x74\x69\x6D\x65","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x66\x6F\x6C\x6C\x6F\x77\x75\x70\x74\x69\x6D\x65","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x61\x74","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x89af[0];var Sequelize=require(_0x89af[1]);var moment=require(_0x89af[2]);module[_0x89af[3]]= {state:{type:Sequelize.INTEGER(2)},statedesc:{type:Sequelize[_0x89af[4]]},scheduledat:{type:Sequelize[_0x89af[5]]},countbusyretry:{type:Sequelize[_0x89af[6]],defaultValue:0},countcongestionretry:{type:Sequelize[_0x89af[6]],defaultValue:0},countnoanswerretry:{type:Sequelize[_0x89af[6]],defaultValue:0},countglobal:{type:Sequelize[_0x89af[6]],defaultValue:0},uniqueid:{type:Sequelize[_0x89af[4]]},calleridnum:{type:Sequelize[_0x89af[4]]},calleridname:{type:Sequelize[_0x89af[4]]},starttime:{type:Sequelize[_0x89af[5]]},responsetime:{type:Sequelize[_0x89af[5]]},answertime:{type:Sequelize[_0x89af[5]]},droptime:{type:Sequelize[_0x89af[5]]},endtime:{type:Sequelize[_0x89af[5]]},ringtime:{type:Sequelize[_0x89af[6]],defaultValue:0},holdtime:{type:Sequelize[_0x89af[6]],defaultValue:0},talktime:{type:Sequelize[_0x89af[6]],defaultValue:0},followuptime:{type:Sequelize[_0x89af[6]],defaultValue:0},dropreason:{type:Sequelize[_0x89af[4]]},campaign:{type:Sequelize[_0x89af[4]]},campaigntype:{type:Sequelize[_0x89af[4]]},membername:{type:Sequelize[_0x89af[4]]},reason:{type:Sequelize[_0x89af[4]]},disposition:{type:Sequelize[_0x89af[4]]},dispositionat:{type:Sequelize[_0x89af[5]],set:function(_0x3252x3){var _0x3252x4=this[_0x89af[8]](_0x89af[7]);if(_0x3252x4&& _0x3252x3){this[_0x89af[12]](_0x89af[9],moment(_0x3252x3)[_0x89af[11]](moment(_0x3252x4),_0x89af[10]))};return this[_0x89af[12]](_0x89af[13],_0x3252x3)}},amd:{type:Sequelize[_0x89af[14]],defaultValue:false},fax:{type:Sequelize[_0x89af[14]],defaultValue:false},blacklist:{type:Sequelize[_0x89af[14]],defaultValue:false},rescheduled:{type:Sequelize[_0x89af[14]],defaultValue:false},rescheduledat:{type:Sequelize[_0x89af[5]]},callback:{type:Sequelize[_0x89af[14]],defaultValue:false},callbackuniqueid:{type:Sequelize[_0x89af[4]],defaultValue:null},callbackat:{type:Sequelize[_0x89af[5]]},deleted:{type:Sequelize[_0x89af[4]],defaultValue:null},deletedat:{type:Sequelize[_0x89af[5]]},recallme:{type:Sequelize[_0x89af[14]],defaultValue:false},agiafterat:{type:Sequelize[_0x89af[5]]}}
\ No newline at end of file
index 6afcf4a..9e6912b 100644 (file)
@@ -1 +1 @@
-var _0x41f4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x64\x65\x73\x63\x72\x69\x62\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x62\x6F\x64\x79","\x63\x6F\x75\x6E\x74\x43\x6F\x6E\x74\x61\x63\x74\x73\x51\x75\x65\x75\x65\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x43\x4F\x55\x4E\x54","\x49\x46","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x30\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6C\x69\x74\x65\x72\x61\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x6E","\x6E\x6F\x53\x75\x63\x68\x43\x6F\x6E\x74\x61\x63\x74\x73","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x33\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6E\x6F\x41\x6E\x73\x77\x65\x72\x43\x6F\x6E\x74\x61\x63\x74\x73","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x35\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x62\x75\x73\x79\x43\x6F\x6E\x74\x61\x63\x74\x73","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x38\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x43\x6F\x6E\x74\x61\x63\x74\x73","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x30\x20\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x64\x72\x6F\x70\x43\x6F\x6E\x74\x61\x63\x74\x73","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x31\x20\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x43\x6F\x6E\x74\x61\x63\x74\x73","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x32\x32\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x72\x65\x43\x61\x6C\x6C\x43\x6F\x6E\x74\x61\x63\x74\x73","\x63\x6F\x75\x6E\x74\x43\x6F\x6E\x74\x61\x63\x74\x73\x49\x76\x72\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x73\x51\x75\x65\x75\x65\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x70\x68\x6F\x6E\x65","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x67\x72\x6F\x75\x70","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D\x20\x4E\x4F\x54\x20\x49\x4E\x20\x28\x3F\x29","\x73\x74\x61\x74\x65\x20\x3D\x20\x34","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64\x20\x3D\x20\x3F","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x66\x69\x6E\x61\x6C","\x66\x72\x6F\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x66\x69\x65\x6C\x64","\x73\x65\x6C\x65\x63\x74","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D\x20\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C","\x73\x74\x61\x74\x65\x20\x3D\x20\x3F","\x73\x74\x61\x74\x65","\x4E\x4F\x57\x28\x29","\x41\x4E\x59\x5F\x56\x41\x4C\x55\x45\x28\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64\x29","\x41\x4E\x59\x5F\x56\x41\x4C\x55\x45\x28\x4C\x69\x73\x74\x49\x64\x29","\x41\x4E\x59\x5F\x56\x41\x4C\x55\x45\x28\x43\x6F\x6E\x74\x61\x63\x74\x49\x64\x29","\x41\x4E\x59\x5F\x56\x41\x4C\x55\x45\x28\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D\x29","\x66\x72\x6F\x6D\x51\x75\x65\x72\x79","\x69\x6E\x74\x6F","\x69\x6E\x73\x65\x72\x74","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x73\x49\x76\x72\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64\x20\x3D\x20\x3F","\x41\x4E\x59\x5F\x56\x41\x4C\x55\x45\x28\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64\x29","\x43\x61\x6D\x70\x61\x69\x67\x6E","\x63\x68\x65\x63\x6B\x43\x6F\x6E\x74\x61\x63\x74\x48\x6F\x70\x70\x65\x72","\x66\x69\x6E\x64\x4F\x6E\x65","\x43\x6D\x48\x6F\x70\x70\x65\x72"];_0x41f4[0];var jsonpatch=require(_0x41f4[1]);var rp=require(_0x41f4[2]);var moment=require(_0x41f4[3]);var BPromise=require(_0x41f4[4]);var Mustache=require(_0x41f4[5]);var util=require(_0x41f4[6]);var path=require(_0x41f4[7]);var sox=require(_0x41f4[8]);var csv=require(_0x41f4[9]);var ejs=require(_0x41f4[10]);var fs=require(_0x41f4[11]);var _=require(_0x41f4[12]);var squel=require(_0x41f4[13]);var crypto=require(_0x41f4[14]);var jsforce=require(_0x41f4[15]);var deskjs=require(_0x41f4[16]);var toCsv=require(_0x41f4[9]);var querystring=require(_0x41f4[17]);var Papa=require(_0x41f4[18]);var qs=require(_0x41f4[19]);var logger=require(_0x41f4[21])(_0x41f4[20]);var utils=require(_0x41f4[22]);var config=require(_0x41f4[23]);var db=require(_0x41f4[25])[_0x41f4[24]];function respondWithStatusCode(_0xdd60x1a,_0xdd60x1b){_0xdd60x1b= _0xdd60x1b|| 204;return function(_0xdd60x1c){if(_0xdd60x1c){return _0xdd60x1a[_0x41f4[26]](_0xdd60x1b)};return _0xdd60x1a[_0x41f4[28]](_0xdd60x1b)[_0x41f4[27]]()}}function respondWithResult(_0xdd60x1a,_0xdd60x1b){_0xdd60x1b= _0xdd60x1b|| 200;return function(_0xdd60x1c){if(_0xdd60x1c){return _0xdd60x1a[_0x41f4[28]](_0xdd60x1b)[_0x41f4[29]](_0xdd60x1c)}}}function respondWithFilteredResult(_0xdd60x1a,_0xdd60x1f){return function(_0xdd60x1c){if(_0xdd60x1c){var _0xdd60x20=_0xdd60x1c[_0x41f4[30]],_0xdd60x21=_0xdd60x1f[_0x41f4[31]],_0xdd60x22=_0xdd60x1f[_0x41f4[31]]+ _0xdd60x1f[_0x41f4[32]],_0xdd60x1b;if(_0xdd60x22>= _0xdd60x20){_0xdd60x22= _0xdd60x20;_0xdd60x1b= 200}else {_0xdd60x1b= 206};_0xdd60x1a[_0x41f4[28]](_0xdd60x1b);return _0xdd60x1a[_0x41f4[36]](_0x41f4[33],_0xdd60x21+ _0x41f4[34]+ _0xdd60x22+ _0x41f4[35]+ _0xdd60x20)[_0x41f4[29]](_0xdd60x1c)};return null}}function patchUpdates(_0xdd60x24){return function(_0xdd60x1c){try{jsonpatch[_0x41f4[37]](_0xdd60x1c,_0xdd60x24,true)}catch(err){return BPromise[_0x41f4[38]](err)};return _0xdd60x1c[_0x41f4[39]]()}}function saveUpdates(_0xdd60x26,_0xdd60x1b){return function(_0xdd60x1c){if(_0xdd60x1c){return _0xdd60x1c[_0x41f4[41]](_0xdd60x26)[_0x41f4[40]](function(_0xdd60x27){return _0xdd60x27})};return null}}function removeEntity(_0xdd60x1a,_0xdd60x1b){return function(_0xdd60x1c){if(_0xdd60x1c){return _0xdd60x1c[_0x41f4[42]]()[_0x41f4[40]](function(){_0xdd60x1a[_0x41f4[28]](204)[_0x41f4[27]]()})}}}function handleEntityNotFound(_0xdd60x1a,_0xdd60x1b){return function(_0xdd60x1c){if(!_0xdd60x1c){_0xdd60x1a[_0x41f4[26]](404)};return _0xdd60x1c}}function handleError(_0xdd60x1a,_0xdd60x1b){_0xdd60x1b= _0xdd60x1b|| 500;return function(_0xdd60x2b){logger[_0x41f4[44]](_0xdd60x2b[_0x41f4[43]]);if(_0xdd60x2b[_0x41f4[45]]){delete _0xdd60x2b[_0x41f4[45]]};_0xdd60x1a[_0x41f4[28]](_0xdd60x1b)[_0x41f4[46]](_0xdd60x2b)}}exports[_0x41f4[47]]= function(_0xdd60x2c,_0xdd60x1a){var _0xdd60x1f={},_0xdd60x2d={},_0xdd60x2e={count:0,rows:[]};_0xdd60x2d[_0x41f4[48]]= _[_0x41f4[51]](db[_0x41f4[50]][_0x41f4[49]]);var _0xdd60x2f={dateStart:_0xdd60x2c[_0x41f4[53]][_0x41f4[52]],dateEnd:_0xdd60x2c[_0x41f4[53]][_0x41f4[54]]};delete _0xdd60x2c[_0x41f4[53]][_0x41f4[52]];delete _0xdd60x2c[_0x41f4[53]][_0x41f4[54]];_0xdd60x2d[_0x41f4[53]]= _[_0x41f4[51]](_0xdd60x2c[_0x41f4[53]]);_0xdd60x2d[_0x41f4[55]]= _[_0x41f4[56]](_0xdd60x2d[_0x41f4[48]],_0xdd60x2d[_0x41f4[53]]);_0xdd60x1f[_0x41f4[57]]= _[_0x41f4[56]](_0xdd60x2d[_0x41f4[48]],qs[_0x41f4[58]](_0xdd60x2c[_0x41f4[53]][_0x41f4[58]]));_0xdd60x1f[_0x41f4[57]]= (_0xdd60x1f[_0x41f4[57]][_0x41f4[59]])?_0xdd60x1f[_0x41f4[57]]:_0xdd60x2d[_0x41f4[48]];if(!_0xdd60x2c[_0x41f4[53]][_0x41f4[61]](_0x41f4[60])){_0xdd60x1f[_0x41f4[32]]= qs[_0x41f4[32]](_0xdd60x2c[_0x41f4[53]][_0x41f4[32]]);_0xdd60x1f[_0x41f4[31]]= qs[_0x41f4[31]](_0xdd60x2c[_0x41f4[53]][_0x41f4[31]])};_0xdd60x1f[_0x41f4[62]]= qs[_0x41f4[63]](_0xdd60x2c[_0x41f4[53]][_0x41f4[63]]);_0xdd60x1f[_0x41f4[64]]= qs[_0x41f4[55]](_[_0x41f4[65]](_0xdd60x2c[_0x41f4[53]],_0xdd60x2d[_0x41f4[55]]));if(_0xdd60x2f[_0x41f4[52]]){if(_0xdd60x2f[_0x41f4[54]]){_0xdd60x2f[_0x41f4[54]]= moment(_0xdd60x2f[_0x41f4[54]])[_0x41f4[67]](1,_0x41f4[66])}else {_0xdd60x2f[_0x41f4[54]]= moment(_0xdd60x2f[_0x41f4[52]])[_0x41f4[67]](1,_0x41f4[66])};_[_0x41f4[68]](_0xdd60x1f[_0x41f4[64]],{createdAt:{$gte:_0xdd60x2f[_0x41f4[52]],$lte:_0xdd60x2f[_0x41f4[54]]}})};if(_0xdd60x2c[_0x41f4[53]][_0x41f4[69]]){_0xdd60x1f[_0x41f4[64]]= _[_0x41f4[68]](_0xdd60x1f[_0x41f4[64]],{$or:_[_0x41f4[71]](_0xdd60x1f[_0x41f4[57]],function(_0xdd60x30){var _0xdd60x2e={};_0xdd60x2e[_0xdd60x30]= {$like:_0x41f4[70]+ _0xdd60x2c[_0x41f4[53]][_0x41f4[69]]+ _0x41f4[70]};return _0xdd60x2e})})};_0xdd60x1f= _[_0x41f4[68]]({},_0xdd60x1f,_0xdd60x2c[_0x41f4[72]]);var _0xdd60x31={where:_0xdd60x1f[_0x41f4[64]]};return db[_0x41f4[50]][_0x41f4[30]](_0xdd60x31)[_0x41f4[40]](function(_0xdd60x20){_0xdd60x2e[_0x41f4[30]]= _0xdd60x20;if(_0xdd60x2c[_0x41f4[53]][_0x41f4[75]]){_0xdd60x1f[_0x41f4[76]]= [{all:true}]};return db[_0x41f4[50]][_0x41f4[77]](_0xdd60x1f)})[_0x41f4[40]](function(_0xdd60x32){_0xdd60x2e[_0x41f4[74]]= _0xdd60x32;return _0xdd60x2e})[_0x41f4[40]](respondWithFilteredResult(_0xdd60x1a,_0xdd60x1f))[_0x41f4[73]](handleError(_0xdd60x1a,null))};exports[_0x41f4[78]]= function(_0xdd60x2c,_0xdd60x1a){var _0xdd60x1f={raw:true,where:{id:_0xdd60x2c[_0x41f4[80]][_0x41f4[79]]}},_0xdd60x2d={};_0xdd60x2d[_0x41f4[48]]= _[_0x41f4[51]](db[_0x41f4[50]][_0x41f4[49]]);_0xdd60x2d[_0x41f4[53]]= _[_0x41f4[51]](_0xdd60x2c[_0x41f4[53]]);_0xdd60x2d[_0x41f4[55]]= _[_0x41f4[56]](_0xdd60x2d[_0x41f4[48]],_0xdd60x2d[_0x41f4[53]]);_0xdd60x1f[_0x41f4[57]]= _[_0x41f4[56]](_0xdd60x2d[_0x41f4[48]],qs[_0x41f4[58]](_0xdd60x2c[_0x41f4[53]][_0x41f4[58]]));_0xdd60x1f[_0x41f4[57]]= (_0xdd60x1f[_0x41f4[57]][_0x41f4[59]])?_0xdd60x1f[_0x41f4[57]]:_0xdd60x2d[_0x41f4[48]];if(_0xdd60x2c[_0x41f4[53]][_0x41f4[75]]){_0xdd60x1f[_0x41f4[76]]= [{all:true}]};_0xdd60x1f= _[_0x41f4[68]]({},_0xdd60x1f,_0xdd60x2c[_0x41f4[72]]);return db[_0x41f4[50]][_0x41f4[81]](_0xdd60x1f)[_0x41f4[40]](handleEntityNotFound(_0xdd60x1a,null))[_0x41f4[40]](respondWithResult(_0xdd60x1a,null))[_0x41f4[73]](handleError(_0xdd60x1a,null))};exports[_0x41f4[82]]= function(_0xdd60x2c,_0xdd60x1a){return db[_0x41f4[50]][_0x41f4[82]]()[_0x41f4[40]](respondWithResult(_0xdd60x1a,null))[_0x41f4[73]](handleError(_0xdd60x1a,null))};exports[_0x41f4[41]]= function(_0xdd60x2c,_0xdd60x1a){if(_0xdd60x2c[_0x41f4[84]][_0x41f4[83]]){delete _0xdd60x2c[_0x41f4[84]][_0x41f4[83]]};return db[_0x41f4[50]][_0x41f4[81]]({where:{uniqueid:_0xdd60x2c[_0x41f4[80]][_0x41f4[79]]}})[_0x41f4[40]](handleEntityNotFound(_0xdd60x1a,null))[_0x41f4[40]](saveUpdates(_0xdd60x2c[_0x41f4[84]],null))[_0x41f4[40]](respondWithResult(_0xdd60x1a,null))[_0x41f4[73]](handleError(_0xdd60x1a,null))};exports[_0x41f4[85]]= function(_0xdd60x2c,_0xdd60x1a,_0xdd60x33){return db[_0x41f4[50]][_0x41f4[77]]({raw:false,where:{VoiceQueueId:_0xdd60x2c[_0x41f4[80]][_0x41f4[79]]},attributes:[[db[_0x41f4[90]][_0x41f4[91]](_0x41f4[86],db[_0x41f4[90]][_0x41f4[91]](_0x41f4[87],db[_0x41f4[90]][_0x41f4[89]](_0x41f4[88]))),_0x41f4[92]],[db[_0x41f4[90]][_0x41f4[91]](_0x41f4[86],db[_0x41f4[90]][_0x41f4[91]](_0x41f4[87],db[_0x41f4[90]][_0x41f4[89]](_0x41f4[93]))),_0x41f4[94]],[db[_0x41f4[90]][_0x41f4[91]](_0x41f4[86],db[_0x41f4[90]][_0x41f4[91]](_0x41f4[87],db[_0x41f4[90]][_0x41f4[89]](_0x41f4[95]))),_0x41f4[96]],[db[_0x41f4[90]][_0x41f4[91]](_0x41f4[86],db[_0x41f4[90]][_0x41f4[91]](_0x41f4[87],db[_0x41f4[90]][_0x41f4[89]](_0x41f4[97]))),_0x41f4[98]],[db[_0x41f4[90]][_0x41f4[91]](_0x41f4[86],db[_0x41f4[90]][_0x41f4[91]](_0x41f4[87],db[_0x41f4[90]][_0x41f4[89]](_0x41f4[99]))),_0x41f4[100]],[db[_0x41f4[90]][_0x41f4[91]](_0x41f4[86],db[_0x41f4[90]][_0x41f4[91]](_0x41f4[87],db[_0x41f4[90]][_0x41f4[89]](_0x41f4[101]))),_0x41f4[102]],[db[_0x41f4[90]][_0x41f4[91]](_0x41f4[86],db[_0x41f4[90]][_0x41f4[91]](_0x41f4[87],db[_0x41f4[90]][_0x41f4[89]](_0x41f4[103]))),_0x41f4[104]]]})[_0x41f4[40]](handleEntityNotFound(_0xdd60x1a,null))[_0x41f4[40]](respondWithResult(_0xdd60x1a,null))[_0x41f4[73]](handleError(_0xdd60x1a,null))};exports[_0x41f4[105]]= function(_0xdd60x2c,_0xdd60x1a,_0xdd60x33){return db[_0x41f4[50]][_0x41f4[77]]({raw:false,where:{CampaignId:_0xdd60x2c[_0x41f4[80]][_0x41f4[79]]},attributes:[[db[_0x41f4[90]][_0x41f4[91]](_0x41f4[86],db[_0x41f4[90]][_0x41f4[91]](_0x41f4[87],db[_0x41f4[90]][_0x41f4[89]](_0x41f4[88]))),_0x41f4[92]],[db[_0x41f4[90]][_0x41f4[91]](_0x41f4[86],db[_0x41f4[90]][_0x41f4[91]](_0x41f4[87],db[_0x41f4[90]][_0x41f4[89]](_0x41f4[93]))),_0x41f4[94]],[db[_0x41f4[90]][_0x41f4[91]](_0x41f4[86],db[_0x41f4[90]][_0x41f4[91]](_0x41f4[87],db[_0x41f4[90]][_0x41f4[89]](_0x41f4[95]))),_0x41f4[96]],[db[_0x41f4[90]][_0x41f4[91]](_0x41f4[86],db[_0x41f4[90]][_0x41f4[91]](_0x41f4[87],db[_0x41f4[90]][_0x41f4[89]](_0x41f4[97]))),_0x41f4[98]],[db[_0x41f4[90]][_0x41f4[91]](_0x41f4[86],db[_0x41f4[90]][_0x41f4[91]](_0x41f4[87],db[_0x41f4[90]][_0x41f4[89]](_0x41f4[99]))),_0x41f4[100]],[db[_0x41f4[90]][_0x41f4[91]](_0x41f4[86],db[_0x41f4[90]][_0x41f4[91]](_0x41f4[87],db[_0x41f4[90]][_0x41f4[89]](_0x41f4[101]))),_0x41f4[102]],[db[_0x41f4[90]][_0x41f4[91]](_0x41f4[86],db[_0x41f4[90]][_0x41f4[91]](_0x41f4[87],db[_0x41f4[90]][_0x41f4[89]](_0x41f4[103]))),_0x41f4[104]]]})[_0x41f4[40]](handleEntityNotFound(_0xdd60x1a,null))[_0x41f4[40]](respondWithResult(_0xdd60x1a,null))[_0x41f4[73]](handleError(_0xdd60x1a,null))};exports[_0x41f4[106]]= function(_0xdd60x2c,_0xdd60x1a,_0xdd60x33){return db[_0x41f4[135]][_0x41f4[81]]({where:{id:_0xdd60x2c[_0x41f4[80]][_0x41f4[79]]}})[_0x41f4[40]](handleEntityNotFound(_0xdd60x1a,null))[_0x41f4[40]](function(_0xdd60x1c){var _0xdd60x34;if(_0xdd60x1c){_0xdd60x34= squel[_0x41f4[134]]()[_0x41f4[133]](_0x41f4[123])[_0x41f4[132]]([_0x41f4[107],_0x41f4[108],_0x41f4[109],_0x41f4[110],_0x41f4[111],_0x41f4[112],_0x41f4[113]],squel[_0x41f4[122]]()[_0x41f4[121]](_0x41f4[131],_0x41f4[107])[_0x41f4[121]](_0x41f4[127],_0x41f4[108])[_0x41f4[121]](_0x41f4[130],_0x41f4[109])[_0x41f4[121]](_0x41f4[129],_0x41f4[110])[_0x41f4[121]](_0x41f4[128],_0x41f4[111])[_0x41f4[121]](_0x41f4[127],_0x41f4[112])[_0x41f4[121]](_0x41f4[127],_0x41f4[113])[_0x41f4[119]](_0x41f4[118])[_0x41f4[64]](_0x41f4[117],_0xdd60x2c[_0x41f4[80]][_0x41f4[79]].toString())[_0x41f4[64]](_0x41f4[125],_0xdd60x2c[_0x41f4[84]][_0x41f4[126]].toString())[_0x41f4[64]](_0x41f4[124])[_0x41f4[64]](_0x41f4[115],squel[_0x41f4[122]]()[_0x41f4[121]](_0x41f4[107])[_0x41f4[119]](_0x41f4[123])[_0x41f4[64]](_0x41f4[117],_0xdd60x2c[_0x41f4[80]][_0x41f4[79]].toString()))[_0x41f4[64]](_0x41f4[115],squel[_0x41f4[122]]()[_0x41f4[121]](_0x41f4[120])[_0x41f4[119]](_0x41f4[118])[_0x41f4[64]](_0x41f4[117],_0xdd60x2c[_0x41f4[80]][_0x41f4[79]].toString())[_0x41f4[64]](_0x41f4[116]))[_0x41f4[114]](_0x41f4[109])).toString();return db[_0x41f4[90]][_0x41f4[53]](_0xdd60x34)};return []})[_0x41f4[40]](respondWithResult(_0xdd60x1a,null))[_0x41f4[73]](handleError(_0xdd60x1a,null))};exports[_0x41f4[136]]= function(_0xdd60x2c,_0xdd60x1a,_0xdd60x33){return db[_0x41f4[140]][_0x41f4[81]]({where:{id:_0xdd60x2c[_0x41f4[80]][_0x41f4[79]]}})[_0x41f4[40]](handleEntityNotFound(_0xdd60x1a,null))[_0x41f4[40]](function(_0xdd60x1c){var _0xdd60x34;if(_0xdd60x1c){_0xdd60x34= squel[_0x41f4[134]]()[_0x41f4[133]](_0x41f4[123])[_0x41f4[132]]([_0x41f4[107],_0x41f4[108],_0x41f4[109],_0x41f4[110],_0x41f4[137],_0x41f4[112],_0x41f4[113]],squel[_0x41f4[122]]()[_0x41f4[121]](_0x41f4[131],_0x41f4[107])[_0x41f4[121]](_0x41f4[127],_0x41f4[108])[_0x41f4[121]](_0x41f4[130],_0x41f4[109])[_0x41f4[121]](_0x41f4[129],_0x41f4[110])[_0x41f4[121]](_0x41f4[139],_0x41f4[137])[_0x41f4[121]](_0x41f4[127],_0x41f4[112])[_0x41f4[121]](_0x41f4[127],_0x41f4[113])[_0x41f4[119]](_0x41f4[118])[_0x41f4[64]](_0x41f4[138],_0xdd60x2c[_0x41f4[80]][_0x41f4[79]].toString())[_0x41f4[64]](_0x41f4[125],_0xdd60x2c[_0x41f4[84]][_0x41f4[126]].toString())[_0x41f4[64]](_0x41f4[124])[_0x41f4[64]](_0x41f4[115],squel[_0x41f4[122]]()[_0x41f4[121]](_0x41f4[107])[_0x41f4[119]](_0x41f4[123])[_0x41f4[64]](_0x41f4[138],_0xdd60x2c[_0x41f4[80]][_0x41f4[79]].toString()))[_0x41f4[64]](_0x41f4[115],squel[_0x41f4[122]]()[_0x41f4[121]](_0x41f4[120])[_0x41f4[119]](_0x41f4[118])[_0x41f4[64]](_0x41f4[138],_0xdd60x2c[_0x41f4[80]][_0x41f4[79]].toString())[_0x41f4[64]](_0x41f4[116]))[_0x41f4[114]](_0x41f4[109])).toString();return db[_0x41f4[90]][_0x41f4[53]](_0xdd60x34)};return []})[_0x41f4[40]](respondWithResult(_0xdd60x1a,null))[_0x41f4[73]](handleError(_0xdd60x1a,null))};exports[_0x41f4[141]]= function(_0xdd60x2c,_0xdd60x1a,_0xdd60x33){return db[_0x41f4[143]][_0x41f4[142]]({where:{VoiceQueueId:_0xdd60x2c[_0x41f4[84]][_0x41f4[111]],CampaignId:_0xdd60x2c[_0x41f4[84]][_0x41f4[137]],ContactId:_0xdd60x2c[_0x41f4[84]][_0x41f4[109]]}})[_0x41f4[40]](handleEntityNotFound(_0xdd60x1a,null))[_0x41f4[40]](function(_0xdd60x1c){if(_0xdd60x1c){return _0xdd60x1c};return null})[_0x41f4[40]](respondWithResult(_0xdd60x1a,null))[_0x41f4[73]](handleError(_0xdd60x1a,null))}
\ No newline at end of file
+var _0x5557=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x64\x65\x73\x63\x72\x69\x62\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x62\x6F\x64\x79","\x63\x6F\x75\x6E\x74\x43\x6F\x6E\x74\x61\x63\x74\x73\x51\x75\x65\x75\x65\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x43\x4F\x55\x4E\x54","\x49\x46","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x30\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6C\x69\x74\x65\x72\x61\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x6E","\x6E\x6F\x53\x75\x63\x68\x43\x6F\x6E\x74\x61\x63\x74\x73","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x33\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6E\x6F\x41\x6E\x73\x77\x65\x72\x43\x6F\x6E\x74\x61\x63\x74\x73","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x35\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x62\x75\x73\x79\x43\x6F\x6E\x74\x61\x63\x74\x73","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x38\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x43\x6F\x6E\x74\x61\x63\x74\x73","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x30\x20\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x64\x72\x6F\x70\x43\x6F\x6E\x74\x61\x63\x74\x73","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x31\x20\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x43\x6F\x6E\x74\x61\x63\x74\x73","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x32\x32\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x72\x65\x43\x61\x6C\x6C\x43\x6F\x6E\x74\x61\x63\x74\x73","\x63\x6F\x75\x6E\x74\x43\x6F\x6E\x74\x61\x63\x74\x73\x49\x76\x72\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x73\x51\x75\x65\x75\x65\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x70\x68\x6F\x6E\x65","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x67\x72\x6F\x75\x70","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D\x20\x4E\x4F\x54\x20\x49\x4E\x20\x28\x3F\x29","\x73\x74\x61\x74\x65\x20\x3D\x20\x34","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64\x20\x3D\x20\x3F","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x66\x69\x6E\x61\x6C","\x66\x72\x6F\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x66\x69\x65\x6C\x64","\x73\x65\x6C\x65\x63\x74","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D\x20\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C","\x73\x74\x61\x74\x65\x20\x3D\x20\x3F","\x73\x74\x61\x74\x65","\x4E\x4F\x57\x28\x29","\x41\x4E\x59\x5F\x56\x41\x4C\x55\x45\x28\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64\x29","\x41\x4E\x59\x5F\x56\x41\x4C\x55\x45\x28\x4C\x69\x73\x74\x49\x64\x29","\x41\x4E\x59\x5F\x56\x41\x4C\x55\x45\x28\x43\x6F\x6E\x74\x61\x63\x74\x49\x64\x29","\x41\x4E\x59\x5F\x56\x41\x4C\x55\x45\x28\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D\x29","\x66\x72\x6F\x6D\x51\x75\x65\x72\x79","\x69\x6E\x74\x6F","\x69\x6E\x73\x65\x72\x74","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x73\x49\x76\x72\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64\x20\x3D\x20\x3F","\x41\x4E\x59\x5F\x56\x41\x4C\x55\x45\x28\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64\x29","\x43\x61\x6D\x70\x61\x69\x67\x6E","\x63\x68\x65\x63\x6B\x43\x6F\x6E\x74\x61\x63\x74\x48\x6F\x70\x70\x65\x72","\x66\x69\x6E\x64\x4F\x6E\x65","\x43\x6D\x48\x6F\x70\x70\x65\x72"];_0x5557[0];var jsonpatch=require(_0x5557[1]);var rp=require(_0x5557[2]);var moment=require(_0x5557[3]);var BPromise=require(_0x5557[4]);var Mustache=require(_0x5557[5]);var util=require(_0x5557[6]);var path=require(_0x5557[7]);var sox=require(_0x5557[8]);var csv=require(_0x5557[9]);var ejs=require(_0x5557[10]);var fs=require(_0x5557[11]);var _=require(_0x5557[12]);var squel=require(_0x5557[13]);var crypto=require(_0x5557[14]);var jsforce=require(_0x5557[15]);var deskjs=require(_0x5557[16]);var toCsv=require(_0x5557[9]);var querystring=require(_0x5557[17]);var Papa=require(_0x5557[18]);var qs=require(_0x5557[19]);var logger=require(_0x5557[21])(_0x5557[20]);var utils=require(_0x5557[22]);var config=require(_0x5557[23]);var db=require(_0x5557[25])[_0x5557[24]];function respondWithStatusCode(_0xf55fx1a,_0xf55fx1b){_0xf55fx1b= _0xf55fx1b|| 204;return function(_0xf55fx1c){if(_0xf55fx1c){return _0xf55fx1a[_0x5557[26]](_0xf55fx1b)};return _0xf55fx1a[_0x5557[28]](_0xf55fx1b)[_0x5557[27]]()}}function respondWithResult(_0xf55fx1a,_0xf55fx1b){_0xf55fx1b= _0xf55fx1b|| 200;return function(_0xf55fx1c){if(_0xf55fx1c){return _0xf55fx1a[_0x5557[28]](_0xf55fx1b)[_0x5557[29]](_0xf55fx1c)}}}function respondWithFilteredResult(_0xf55fx1a,_0xf55fx1f){return function(_0xf55fx1c){if(_0xf55fx1c){var _0xf55fx20=_0xf55fx1c[_0x5557[30]],_0xf55fx21=_0xf55fx1f[_0x5557[31]],_0xf55fx22=_0xf55fx1f[_0x5557[31]]+ _0xf55fx1f[_0x5557[32]],_0xf55fx1b;if(_0xf55fx22>= _0xf55fx20){_0xf55fx22= _0xf55fx20;_0xf55fx1b= 200}else {_0xf55fx1b= 206};_0xf55fx1a[_0x5557[28]](_0xf55fx1b);return _0xf55fx1a[_0x5557[36]](_0x5557[33],_0xf55fx21+ _0x5557[34]+ _0xf55fx22+ _0x5557[35]+ _0xf55fx20)[_0x5557[29]](_0xf55fx1c)};return null}}function patchUpdates(_0xf55fx24){return function(_0xf55fx1c){try{jsonpatch[_0x5557[37]](_0xf55fx1c,_0xf55fx24,true)}catch(err){return BPromise[_0x5557[38]](err)};return _0xf55fx1c[_0x5557[39]]()}}function saveUpdates(_0xf55fx26,_0xf55fx1b){return function(_0xf55fx1c){if(_0xf55fx1c){return _0xf55fx1c[_0x5557[41]](_0xf55fx26)[_0x5557[40]](function(_0xf55fx27){return _0xf55fx27})};return null}}function removeEntity(_0xf55fx1a,_0xf55fx1b){return function(_0xf55fx1c){if(_0xf55fx1c){return _0xf55fx1c[_0x5557[42]]()[_0x5557[40]](function(){_0xf55fx1a[_0x5557[28]](204)[_0x5557[27]]()})}}}function handleEntityNotFound(_0xf55fx1a,_0xf55fx1b){return function(_0xf55fx1c){if(!_0xf55fx1c){_0xf55fx1a[_0x5557[26]](404)};return _0xf55fx1c}}function handleError(_0xf55fx1a,_0xf55fx1b){_0xf55fx1b= _0xf55fx1b|| 500;return function(_0xf55fx2b){logger[_0x5557[44]](_0xf55fx2b[_0x5557[43]]);if(_0xf55fx2b[_0x5557[45]]){delete _0xf55fx2b[_0x5557[45]]};_0xf55fx1a[_0x5557[28]](_0xf55fx1b)[_0x5557[46]](_0xf55fx2b)}}exports[_0x5557[47]]= function(_0xf55fx2c,_0xf55fx1a){var _0xf55fx1f={},_0xf55fx2d={},_0xf55fx2e={count:0,rows:[]};_0xf55fx2d[_0x5557[48]]= _[_0x5557[51]](db[_0x5557[50]][_0x5557[49]]);var _0xf55fx2f={dateStart:_0xf55fx2c[_0x5557[53]][_0x5557[52]],dateEnd:_0xf55fx2c[_0x5557[53]][_0x5557[54]]};delete _0xf55fx2c[_0x5557[53]][_0x5557[52]];delete _0xf55fx2c[_0x5557[53]][_0x5557[54]];_0xf55fx2d[_0x5557[53]]= _[_0x5557[51]](_0xf55fx2c[_0x5557[53]]);_0xf55fx2d[_0x5557[55]]= _[_0x5557[56]](_0xf55fx2d[_0x5557[48]],_0xf55fx2d[_0x5557[53]]);_0xf55fx1f[_0x5557[57]]= _[_0x5557[56]](_0xf55fx2d[_0x5557[48]],qs[_0x5557[58]](_0xf55fx2c[_0x5557[53]][_0x5557[58]]));_0xf55fx1f[_0x5557[57]]= (_0xf55fx1f[_0x5557[57]][_0x5557[59]])?_0xf55fx1f[_0x5557[57]]:_0xf55fx2d[_0x5557[48]];if(!_0xf55fx2c[_0x5557[53]][_0x5557[61]](_0x5557[60])){_0xf55fx1f[_0x5557[32]]= qs[_0x5557[32]](_0xf55fx2c[_0x5557[53]][_0x5557[32]]);_0xf55fx1f[_0x5557[31]]= qs[_0x5557[31]](_0xf55fx2c[_0x5557[53]][_0x5557[31]])};_0xf55fx1f[_0x5557[62]]= qs[_0x5557[63]](_0xf55fx2c[_0x5557[53]][_0x5557[63]]);_0xf55fx1f[_0x5557[64]]= qs[_0x5557[55]](_[_0x5557[65]](_0xf55fx2c[_0x5557[53]],_0xf55fx2d[_0x5557[55]]));if(_0xf55fx2f[_0x5557[52]]){if(_0xf55fx2f[_0x5557[54]]){_0xf55fx2f[_0x5557[54]]= moment(_0xf55fx2f[_0x5557[54]])[_0x5557[67]](1,_0x5557[66])}else {_0xf55fx2f[_0x5557[54]]= moment(_0xf55fx2f[_0x5557[52]])[_0x5557[67]](1,_0x5557[66])};_[_0x5557[68]](_0xf55fx1f[_0x5557[64]],{createdAt:{$gte:_0xf55fx2f[_0x5557[52]],$lte:_0xf55fx2f[_0x5557[54]]}})};if(_0xf55fx2c[_0x5557[53]][_0x5557[69]]){_0xf55fx1f[_0x5557[64]]= _[_0x5557[68]](_0xf55fx1f[_0x5557[64]],{$or:_[_0x5557[71]](_0xf55fx1f[_0x5557[57]],function(_0xf55fx30){var _0xf55fx2e={};_0xf55fx2e[_0xf55fx30]= {$like:_0x5557[70]+ _0xf55fx2c[_0x5557[53]][_0x5557[69]]+ _0x5557[70]};return _0xf55fx2e})})};_0xf55fx1f= _[_0x5557[68]]({},_0xf55fx1f,_0xf55fx2c[_0x5557[72]]);var _0xf55fx31={where:_0xf55fx1f[_0x5557[64]]};return db[_0x5557[50]][_0x5557[30]](_0xf55fx31)[_0x5557[40]](function(_0xf55fx20){_0xf55fx2e[_0x5557[30]]= _0xf55fx20;if(_0xf55fx2c[_0x5557[53]][_0x5557[75]]){_0xf55fx1f[_0x5557[76]]= [{all:true}]};return db[_0x5557[50]][_0x5557[77]](_0xf55fx1f)})[_0x5557[40]](function(_0xf55fx32){_0xf55fx2e[_0x5557[74]]= _0xf55fx32;return _0xf55fx2e})[_0x5557[40]](respondWithFilteredResult(_0xf55fx1a,_0xf55fx1f))[_0x5557[73]](handleError(_0xf55fx1a,null))};exports[_0x5557[78]]= function(_0xf55fx2c,_0xf55fx1a){var _0xf55fx1f={raw:true,where:{id:_0xf55fx2c[_0x5557[80]][_0x5557[79]]}},_0xf55fx2d={};_0xf55fx2d[_0x5557[48]]= _[_0x5557[51]](db[_0x5557[50]][_0x5557[49]]);_0xf55fx2d[_0x5557[53]]= _[_0x5557[51]](_0xf55fx2c[_0x5557[53]]);_0xf55fx2d[_0x5557[55]]= _[_0x5557[56]](_0xf55fx2d[_0x5557[48]],_0xf55fx2d[_0x5557[53]]);_0xf55fx1f[_0x5557[57]]= _[_0x5557[56]](_0xf55fx2d[_0x5557[48]],qs[_0x5557[58]](_0xf55fx2c[_0x5557[53]][_0x5557[58]]));_0xf55fx1f[_0x5557[57]]= (_0xf55fx1f[_0x5557[57]][_0x5557[59]])?_0xf55fx1f[_0x5557[57]]:_0xf55fx2d[_0x5557[48]];if(_0xf55fx2c[_0x5557[53]][_0x5557[75]]){_0xf55fx1f[_0x5557[76]]= [{all:true}]};_0xf55fx1f= _[_0x5557[68]]({},_0xf55fx1f,_0xf55fx2c[_0x5557[72]]);return db[_0x5557[50]][_0x5557[81]](_0xf55fx1f)[_0x5557[40]](handleEntityNotFound(_0xf55fx1a,null))[_0x5557[40]](respondWithResult(_0xf55fx1a,null))[_0x5557[73]](handleError(_0xf55fx1a,null))};exports[_0x5557[82]]= function(_0xf55fx2c,_0xf55fx1a){return db[_0x5557[50]][_0x5557[82]]()[_0x5557[40]](respondWithResult(_0xf55fx1a,null))[_0x5557[73]](handleError(_0xf55fx1a,null))};exports[_0x5557[41]]= function(_0xf55fx2c,_0xf55fx1a){if(_0xf55fx2c[_0x5557[84]][_0x5557[83]]){delete _0xf55fx2c[_0x5557[84]][_0x5557[83]]};return db[_0x5557[50]][_0x5557[81]]({where:{uniqueid:_0xf55fx2c[_0x5557[80]][_0x5557[79]]}})[_0x5557[40]](handleEntityNotFound(_0xf55fx1a,null))[_0x5557[40]](saveUpdates(_0xf55fx2c[_0x5557[84]],null))[_0x5557[40]](respondWithResult(_0xf55fx1a,null))[_0x5557[73]](handleError(_0xf55fx1a,null))};exports[_0x5557[85]]= function(_0xf55fx2c,_0xf55fx1a,_0xf55fx33){return db[_0x5557[50]][_0x5557[77]]({raw:false,where:{VoiceQueueId:_0xf55fx2c[_0x5557[80]][_0x5557[79]]},attributes:[[db[_0x5557[90]][_0x5557[91]](_0x5557[86],db[_0x5557[90]][_0x5557[91]](_0x5557[87],db[_0x5557[90]][_0x5557[89]](_0x5557[88]))),_0x5557[92]],[db[_0x5557[90]][_0x5557[91]](_0x5557[86],db[_0x5557[90]][_0x5557[91]](_0x5557[87],db[_0x5557[90]][_0x5557[89]](_0x5557[93]))),_0x5557[94]],[db[_0x5557[90]][_0x5557[91]](_0x5557[86],db[_0x5557[90]][_0x5557[91]](_0x5557[87],db[_0x5557[90]][_0x5557[89]](_0x5557[95]))),_0x5557[96]],[db[_0x5557[90]][_0x5557[91]](_0x5557[86],db[_0x5557[90]][_0x5557[91]](_0x5557[87],db[_0x5557[90]][_0x5557[89]](_0x5557[97]))),_0x5557[98]],[db[_0x5557[90]][_0x5557[91]](_0x5557[86],db[_0x5557[90]][_0x5557[91]](_0x5557[87],db[_0x5557[90]][_0x5557[89]](_0x5557[99]))),_0x5557[100]],[db[_0x5557[90]][_0x5557[91]](_0x5557[86],db[_0x5557[90]][_0x5557[91]](_0x5557[87],db[_0x5557[90]][_0x5557[89]](_0x5557[101]))),_0x5557[102]],[db[_0x5557[90]][_0x5557[91]](_0x5557[86],db[_0x5557[90]][_0x5557[91]](_0x5557[87],db[_0x5557[90]][_0x5557[89]](_0x5557[103]))),_0x5557[104]]]})[_0x5557[40]](handleEntityNotFound(_0xf55fx1a,null))[_0x5557[40]](respondWithResult(_0xf55fx1a,null))[_0x5557[73]](handleError(_0xf55fx1a,null))};exports[_0x5557[105]]= function(_0xf55fx2c,_0xf55fx1a,_0xf55fx33){return db[_0x5557[50]][_0x5557[77]]({raw:false,where:{CampaignId:_0xf55fx2c[_0x5557[80]][_0x5557[79]]},attributes:[[db[_0x5557[90]][_0x5557[91]](_0x5557[86],db[_0x5557[90]][_0x5557[91]](_0x5557[87],db[_0x5557[90]][_0x5557[89]](_0x5557[88]))),_0x5557[92]],[db[_0x5557[90]][_0x5557[91]](_0x5557[86],db[_0x5557[90]][_0x5557[91]](_0x5557[87],db[_0x5557[90]][_0x5557[89]](_0x5557[93]))),_0x5557[94]],[db[_0x5557[90]][_0x5557[91]](_0x5557[86],db[_0x5557[90]][_0x5557[91]](_0x5557[87],db[_0x5557[90]][_0x5557[89]](_0x5557[95]))),_0x5557[96]],[db[_0x5557[90]][_0x5557[91]](_0x5557[86],db[_0x5557[90]][_0x5557[91]](_0x5557[87],db[_0x5557[90]][_0x5557[89]](_0x5557[97]))),_0x5557[98]],[db[_0x5557[90]][_0x5557[91]](_0x5557[86],db[_0x5557[90]][_0x5557[91]](_0x5557[87],db[_0x5557[90]][_0x5557[89]](_0x5557[99]))),_0x5557[100]],[db[_0x5557[90]][_0x5557[91]](_0x5557[86],db[_0x5557[90]][_0x5557[91]](_0x5557[87],db[_0x5557[90]][_0x5557[89]](_0x5557[101]))),_0x5557[102]],[db[_0x5557[90]][_0x5557[91]](_0x5557[86],db[_0x5557[90]][_0x5557[91]](_0x5557[87],db[_0x5557[90]][_0x5557[89]](_0x5557[103]))),_0x5557[104]]]})[_0x5557[40]](handleEntityNotFound(_0xf55fx1a,null))[_0x5557[40]](respondWithResult(_0xf55fx1a,null))[_0x5557[73]](handleError(_0xf55fx1a,null))};exports[_0x5557[106]]= function(_0xf55fx2c,_0xf55fx1a,_0xf55fx33){return db[_0x5557[135]][_0x5557[81]]({where:{id:_0xf55fx2c[_0x5557[80]][_0x5557[79]]}})[_0x5557[40]](handleEntityNotFound(_0xf55fx1a,null))[_0x5557[40]](function(_0xf55fx1c){var _0xf55fx34;if(_0xf55fx1c){_0xf55fx34= squel[_0x5557[134]]()[_0x5557[133]](_0x5557[123])[_0x5557[132]]([_0x5557[107],_0x5557[108],_0x5557[109],_0x5557[110],_0x5557[111],_0x5557[112],_0x5557[113]],squel[_0x5557[122]]()[_0x5557[121]](_0x5557[131],_0x5557[107])[_0x5557[121]](_0x5557[127],_0x5557[108])[_0x5557[121]](_0x5557[130],_0x5557[109])[_0x5557[121]](_0x5557[129],_0x5557[110])[_0x5557[121]](_0x5557[128],_0x5557[111])[_0x5557[121]](_0x5557[127],_0x5557[112])[_0x5557[121]](_0x5557[127],_0x5557[113])[_0x5557[119]](_0x5557[118])[_0x5557[64]](_0x5557[117],_0xf55fx2c[_0x5557[80]][_0x5557[79]].toString())[_0x5557[64]](_0x5557[125],_0xf55fx2c[_0x5557[84]][_0x5557[126]].toString())[_0x5557[64]](_0x5557[124])[_0x5557[64]](_0x5557[115],squel[_0x5557[122]]()[_0x5557[121]](_0x5557[107])[_0x5557[119]](_0x5557[123])[_0x5557[64]](_0x5557[117],_0xf55fx2c[_0x5557[80]][_0x5557[79]].toString()))[_0x5557[64]](_0x5557[115],squel[_0x5557[122]]()[_0x5557[121]](_0x5557[120])[_0x5557[119]](_0x5557[118])[_0x5557[64]](_0x5557[117],_0xf55fx2c[_0x5557[80]][_0x5557[79]].toString())[_0x5557[64]](_0x5557[116]))[_0x5557[114]](_0x5557[109])).toString();return db[_0x5557[90]][_0x5557[53]](_0xf55fx34)};return []})[_0x5557[40]](respondWithResult(_0xf55fx1a,null))[_0x5557[73]](handleError(_0xf55fx1a,null))};exports[_0x5557[136]]= function(_0xf55fx2c,_0xf55fx1a,_0xf55fx33){return db[_0x5557[140]][_0x5557[81]]({where:{id:_0xf55fx2c[_0x5557[80]][_0x5557[79]]}})[_0x5557[40]](handleEntityNotFound(_0xf55fx1a,null))[_0x5557[40]](function(_0xf55fx1c){var _0xf55fx34;if(_0xf55fx1c){_0xf55fx34= squel[_0x5557[134]]()[_0x5557[133]](_0x5557[123])[_0x5557[132]]([_0x5557[107],_0x5557[108],_0x5557[109],_0x5557[110],_0x5557[137],_0x5557[112],_0x5557[113]],squel[_0x5557[122]]()[_0x5557[121]](_0x5557[131],_0x5557[107])[_0x5557[121]](_0x5557[127],_0x5557[108])[_0x5557[121]](_0x5557[130],_0x5557[109])[_0x5557[121]](_0x5557[129],_0x5557[110])[_0x5557[121]](_0x5557[139],_0x5557[137])[_0x5557[121]](_0x5557[127],_0x5557[112])[_0x5557[121]](_0x5557[127],_0x5557[113])[_0x5557[119]](_0x5557[118])[_0x5557[64]](_0x5557[138],_0xf55fx2c[_0x5557[80]][_0x5557[79]].toString())[_0x5557[64]](_0x5557[125],_0xf55fx2c[_0x5557[84]][_0x5557[126]].toString())[_0x5557[64]](_0x5557[124])[_0x5557[64]](_0x5557[115],squel[_0x5557[122]]()[_0x5557[121]](_0x5557[107])[_0x5557[119]](_0x5557[123])[_0x5557[64]](_0x5557[138],_0xf55fx2c[_0x5557[80]][_0x5557[79]].toString()))[_0x5557[64]](_0x5557[115],squel[_0x5557[122]]()[_0x5557[121]](_0x5557[120])[_0x5557[119]](_0x5557[118])[_0x5557[64]](_0x5557[138],_0xf55fx2c[_0x5557[80]][_0x5557[79]].toString())[_0x5557[64]](_0x5557[116]))[_0x5557[114]](_0x5557[109])).toString();return db[_0x5557[90]][_0x5557[53]](_0xf55fx34)};return []})[_0x5557[40]](respondWithResult(_0xf55fx1a,null))[_0x5557[73]](handleError(_0xf55fx1a,null))};exports[_0x5557[141]]= function(_0xf55fx2c,_0xf55fx1a,_0xf55fx33){return db[_0x5557[143]][_0x5557[142]]({where:{VoiceQueueId:_0xf55fx2c[_0x5557[84]][_0x5557[111]],CampaignId:_0xf55fx2c[_0x5557[84]][_0x5557[137]],ContactId:_0xf55fx2c[_0x5557[84]][_0x5557[109]]}})[_0x5557[40]](handleEntityNotFound(_0xf55fx1a,null))[_0x5557[40]](function(_0xf55fx1c){if(_0xf55fx1c){return _0xf55fx1c};return null})[_0x5557[40]](respondWithResult(_0xf55fx1a,null))[_0x5557[73]](handleError(_0xf55fx1a,null))}
\ No newline at end of file
index 8ba86e8..a35ae85 100644 (file)
@@ -1 +1 @@
-var _0x3ccb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x66\x69\x6E\x61\x6C","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0x3ccb[0];var _=require(_0x3ccb[1]);var util=require(_0x3ccb[2]);var logger=require(_0x3ccb[4])(_0x3ccb[3]);var moment=require(_0x3ccb[5]);var BPromise=require(_0x3ccb[6]);var rp=require(_0x3ccb[7]);var attributes=require(_0x3ccb[8]);module[_0x3ccb[9]]= function(_0x2cbcx8,_0x2cbcx9){return _0x2cbcx8[_0x3ccb[14]](_0x3ccb[10],attributes,{tableName:_0x3ccb[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x3ccb[12],"\x66\x69\x65\x6C\x64\x73":[_0x3ccb[12]]},{"\x6E\x61\x6D\x65":_0x3ccb[13],"\x66\x69\x65\x6C\x64\x73":[_0x3ccb[13]]}],timestamps:true})}
\ No newline at end of file
+var _0x7784=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x66\x69\x6E\x61\x6C","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0x7784[0];var _=require(_0x7784[1]);var util=require(_0x7784[2]);var logger=require(_0x7784[4])(_0x7784[3]);var moment=require(_0x7784[5]);var BPromise=require(_0x7784[6]);var rp=require(_0x7784[7]);var attributes=require(_0x7784[8]);module[_0x7784[9]]= function(_0x4b0fx8,_0x4b0fx9){return _0x4b0fx8[_0x7784[14]](_0x7784[10],attributes,{tableName:_0x7784[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x7784[12],"\x66\x69\x65\x6C\x64\x73":[_0x7784[12]]},{"\x6E\x61\x6D\x65":_0x7784[13],"\x66\x69\x65\x6C\x64\x73":[_0x7784[13]]}],timestamps:true})}
\ No newline at end of file
index c84a6fa..c77bd9e 100644 (file)
@@ -1 +1 @@
-var _0x8f76=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C"];_0x8f76[0];var _=require(_0x8f76[1]);var util=require(_0x8f76[2]);var moment=require(_0x8f76[3]);var BPromise=require(_0x8f76[4]);var rs=require(_0x8f76[5]);var fs=require(_0x8f76[6]);var db=require(_0x8f76[8])[_0x8f76[7]];var utils=require(_0x8f76[9]);var logger=require(_0x8f76[11])(_0x8f76[10]);var config=require(_0x8f76[12]);var jayson=require(_0x8f76[13]);var client=jayson[_0x8f76[15]][_0x8f76[14]]({port:9002});function respondWithRpcPromise(_0x8ef0xe,_0x8ef0xf,_0x8ef0x10){return  new BPromise(function(_0x8ef0x11,_0x8ef0x12){return client[_0x8f76[28]](_0x8ef0xe,_0x8ef0x10)[_0x8f76[27]](function(_0x8ef0x14){logger[_0x8f76[20]](_0x8f76[16],_0x8ef0xf,_0x8f76[19]);logger[_0x8f76[23]](_0x8f76[21],_0x8ef0xf,_0x8f76[19],JSON[_0x8f76[22]](_0x8ef0x14));if(_0x8ef0x14[_0x8f76[17]]){if(_0x8ef0x14[_0x8f76[17]][_0x8f76[24]]=== 500){logger[_0x8f76[17]](_0x8f76[16],_0x8ef0xf,_0x8ef0x14[_0x8f76[17]][_0x8f76[25]]);return _0x8ef0x12(_0x8ef0x14[_0x8f76[17]][_0x8f76[25]])};logger[_0x8f76[17]](_0x8f76[16],_0x8ef0xf,_0x8ef0x14[_0x8f76[17]][_0x8f76[25]]);return _0x8ef0x11(_0x8ef0x14[_0x8f76[17]][_0x8f76[25]])}else {logger[_0x8f76[20]](_0x8f76[16],_0x8ef0xf,_0x8f76[19]);_0x8ef0x11(_0x8ef0x14[_0x8f76[26]][_0x8f76[25]])}})[_0x8f76[18]](function(_0x8ef0x13){logger[_0x8f76[17]](_0x8f76[16],_0x8ef0xf,_0x8ef0x13);_0x8ef0x12(_0x8ef0x13)})})}exports[_0x8f76[29]]= function(_0x8ef0x10){var _0x8ef0x15=this;return  new Promise(function(_0x8ef0x11,_0x8ef0x12){return db[_0x8f76[34]][_0x8f76[33]](_0x8ef0x10[_0x8f76[30]],{raw:_0x8ef0x10[_0x8f76[31]]?(_0x8ef0x10[_0x8f76[31]][_0x8f76[32]]=== undefined)?true:false:true})[_0x8f76[27]](function(_0x8ef0x14){logger[_0x8f76[20]](_0x8f76[29],_0x8ef0x10);logger[_0x8f76[23]](_0x8f76[29],_0x8ef0x10,JSON[_0x8f76[22]](_0x8ef0x14));_0x8ef0x11(_0x8ef0x14)})[_0x8f76[18]](function(_0x8ef0x13){logger[_0x8f76[17]](_0x8f76[29],_0x8ef0x13[_0x8f76[25]],_0x8ef0x10);_0x8ef0x12(_0x8ef0x15[_0x8f76[17]](500,_0x8ef0x13[_0x8f76[25]]))})})}
\ No newline at end of file
+var _0x585c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C"];_0x585c[0];var _=require(_0x585c[1]);var util=require(_0x585c[2]);var moment=require(_0x585c[3]);var BPromise=require(_0x585c[4]);var rs=require(_0x585c[5]);var fs=require(_0x585c[6]);var db=require(_0x585c[8])[_0x585c[7]];var utils=require(_0x585c[9]);var logger=require(_0x585c[11])(_0x585c[10]);var config=require(_0x585c[12]);var jayson=require(_0x585c[13]);var client=jayson[_0x585c[15]][_0x585c[14]]({port:9002});function respondWithRpcPromise(_0xf96axe,_0xf96axf,_0xf96ax10){return  new BPromise(function(_0xf96ax11,_0xf96ax12){return client[_0x585c[28]](_0xf96axe,_0xf96ax10)[_0x585c[27]](function(_0xf96ax14){logger[_0x585c[20]](_0x585c[16],_0xf96axf,_0x585c[19]);logger[_0x585c[23]](_0x585c[21],_0xf96axf,_0x585c[19],JSON[_0x585c[22]](_0xf96ax14));if(_0xf96ax14[_0x585c[17]]){if(_0xf96ax14[_0x585c[17]][_0x585c[24]]=== 500){logger[_0x585c[17]](_0x585c[16],_0xf96axf,_0xf96ax14[_0x585c[17]][_0x585c[25]]);return _0xf96ax12(_0xf96ax14[_0x585c[17]][_0x585c[25]])};logger[_0x585c[17]](_0x585c[16],_0xf96axf,_0xf96ax14[_0x585c[17]][_0x585c[25]]);return _0xf96ax11(_0xf96ax14[_0x585c[17]][_0x585c[25]])}else {logger[_0x585c[20]](_0x585c[16],_0xf96axf,_0x585c[19]);_0xf96ax11(_0xf96ax14[_0x585c[26]][_0x585c[25]])}})[_0x585c[18]](function(_0xf96ax13){logger[_0x585c[17]](_0x585c[16],_0xf96axf,_0xf96ax13);_0xf96ax12(_0xf96ax13)})})}exports[_0x585c[29]]= function(_0xf96ax10){var _0xf96ax15=this;return  new Promise(function(_0xf96ax11,_0xf96ax12){return db[_0x585c[34]][_0x585c[33]](_0xf96ax10[_0x585c[30]],{raw:_0xf96ax10[_0x585c[31]]?(_0xf96ax10[_0x585c[31]][_0x585c[32]]=== undefined)?true:false:true})[_0x585c[27]](function(_0xf96ax14){logger[_0x585c[20]](_0x585c[29],_0xf96ax10);logger[_0x585c[23]](_0x585c[29],_0xf96ax10,JSON[_0x585c[22]](_0xf96ax14));_0xf96ax11(_0xf96ax14)})[_0x585c[18]](function(_0xf96ax13){logger[_0x585c[17]](_0x585c[29],_0xf96ax13[_0x585c[25]],_0xf96ax10);_0xf96ax12(_0xf96ax15[_0x585c[17]](500,_0xf96ax13[_0x585c[25]]))})})}
\ No newline at end of file
index cd82951..088dc46 100644 (file)
@@ -1 +1 @@
-var _0x8cdd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x2F\x63\x6F\x75\x6E\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73\x2F\x3A\x69\x64","\x63\x6F\x75\x6E\x74\x43\x6F\x6E\x74\x61\x63\x74\x73\x51\x75\x65\x75\x65\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E\x2F\x63\x6F\x75\x6E\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73\x2F\x3A\x69\x64","\x63\x6F\x75\x6E\x74\x43\x6F\x6E\x74\x61\x63\x74\x73\x49\x76\x72\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x2F\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x73\x2F\x3A\x69\x64","\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x73\x51\x75\x65\x75\x65\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x70\x6F\x73\x74","\x2F\x76\x6F\x69\x63\x65\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E\x2F\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x73\x2F\x3A\x69\x64","\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x73\x49\x76\x72\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x2F\x63\x68\x65\x63\x6B\x43\x6F\x6E\x74\x61\x63\x74\x48\x6F\x70\x70\x65\x72","\x63\x68\x65\x63\x6B\x43\x6F\x6E\x74\x61\x63\x74\x48\x6F\x70\x70\x65\x72","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x8cdd[0];var multer=require(_0x8cdd[1]);var util=require(_0x8cdd[2]);var path=require(_0x8cdd[3]);var express=require(_0x8cdd[4]);var router=express.Router();var auth=require(_0x8cdd[5]);var interaction=require(_0x8cdd[6]);var config=require(_0x8cdd[7]);var controller=require(_0x8cdd[8]);router[_0x8cdd[12]](_0x8cdd[9],auth[_0x8cdd[10]](),controller[_0x8cdd[11]]);router[_0x8cdd[12]](_0x8cdd[13],auth[_0x8cdd[10]](),controller[_0x8cdd[14]]);router[_0x8cdd[12]](_0x8cdd[15],auth[_0x8cdd[10]](),controller[_0x8cdd[16]]);router[_0x8cdd[12]](_0x8cdd[17],auth[_0x8cdd[10]](),controller[_0x8cdd[18]]);router[_0x8cdd[12]](_0x8cdd[19],auth[_0x8cdd[10]](),controller[_0x8cdd[20]]);router[_0x8cdd[23]](_0x8cdd[21],auth[_0x8cdd[10]](),controller[_0x8cdd[22]]);router[_0x8cdd[23]](_0x8cdd[24],auth[_0x8cdd[10]](),controller[_0x8cdd[25]]);router[_0x8cdd[23]](_0x8cdd[26],auth[_0x8cdd[10]](),controller[_0x8cdd[27]]);router[_0x8cdd[29]](_0x8cdd[15],auth[_0x8cdd[10]](),controller[_0x8cdd[28]]);module[_0x8cdd[30]]= router
\ No newline at end of file
+var _0x1a06=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x2F\x63\x6F\x75\x6E\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73\x2F\x3A\x69\x64","\x63\x6F\x75\x6E\x74\x43\x6F\x6E\x74\x61\x63\x74\x73\x51\x75\x65\x75\x65\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E\x2F\x63\x6F\x75\x6E\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73\x2F\x3A\x69\x64","\x63\x6F\x75\x6E\x74\x43\x6F\x6E\x74\x61\x63\x74\x73\x49\x76\x72\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x2F\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x73\x2F\x3A\x69\x64","\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x73\x51\x75\x65\x75\x65\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x70\x6F\x73\x74","\x2F\x76\x6F\x69\x63\x65\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E\x2F\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x73\x2F\x3A\x69\x64","\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x73\x49\x76\x72\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x2F\x63\x68\x65\x63\x6B\x43\x6F\x6E\x74\x61\x63\x74\x48\x6F\x70\x70\x65\x72","\x63\x68\x65\x63\x6B\x43\x6F\x6E\x74\x61\x63\x74\x48\x6F\x70\x70\x65\x72","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x1a06[0];var multer=require(_0x1a06[1]);var util=require(_0x1a06[2]);var path=require(_0x1a06[3]);var express=require(_0x1a06[4]);var router=express.Router();var auth=require(_0x1a06[5]);var interaction=require(_0x1a06[6]);var config=require(_0x1a06[7]);var controller=require(_0x1a06[8]);router[_0x1a06[12]](_0x1a06[9],auth[_0x1a06[10]](),controller[_0x1a06[11]]);router[_0x1a06[12]](_0x1a06[13],auth[_0x1a06[10]](),controller[_0x1a06[14]]);router[_0x1a06[12]](_0x1a06[15],auth[_0x1a06[10]](),controller[_0x1a06[16]]);router[_0x1a06[12]](_0x1a06[17],auth[_0x1a06[10]](),controller[_0x1a06[18]]);router[_0x1a06[12]](_0x1a06[19],auth[_0x1a06[10]](),controller[_0x1a06[20]]);router[_0x1a06[23]](_0x1a06[21],auth[_0x1a06[10]](),controller[_0x1a06[22]]);router[_0x1a06[23]](_0x1a06[24],auth[_0x1a06[10]](),controller[_0x1a06[25]]);router[_0x1a06[23]](_0x1a06[26],auth[_0x1a06[10]](),controller[_0x1a06[27]]);router[_0x1a06[29]](_0x1a06[15],auth[_0x1a06[10]](),controller[_0x1a06[28]]);module[_0x1a06[30]]= router
\ No newline at end of file
index 6fd2c11..cd04904 100644 (file)
@@ -1 +1 @@
-var _0x68df=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x68df[0];var Sequelize=require(_0x68df[1]);module[_0x68df[2]]= {state:{type:Sequelize.INTEGER(2)},statedesc:{type:Sequelize[_0x68df[3]]},scheduledat:{type:Sequelize[_0x68df[4]]},countbusyretry:{type:Sequelize[_0x68df[5]],defaultValue:0},countcongestionretry:{type:Sequelize[_0x68df[5]],defaultValue:0},countnoanswerretry:{type:Sequelize[_0x68df[5]],defaultValue:0},countglobal:{type:Sequelize[_0x68df[5]],defaultValue:0},uniqueid:{type:Sequelize[_0x68df[3]]},calleridnum:{type:Sequelize[_0x68df[3]]},calleridname:{type:Sequelize[_0x68df[3]]},starttime:{type:Sequelize[_0x68df[4]]},responsetime:{type:Sequelize[_0x68df[4]]},answertime:{type:Sequelize[_0x68df[4]]},droptime:{type:Sequelize[_0x68df[4]]},endtime:{type:Sequelize[_0x68df[4]]},ringtime:{type:Sequelize[_0x68df[5]],defaultValue:0},holdtime:{type:Sequelize[_0x68df[5]],defaultValue:0},talktime:{type:Sequelize[_0x68df[5]],defaultValue:0},followuptime:{type:Sequelize[_0x68df[5]],defaultValue:0},dropreason:{type:Sequelize[_0x68df[3]]},campaign:{type:Sequelize[_0x68df[3]]},campaigntype:{type:Sequelize[_0x68df[3]]},membername:{type:Sequelize[_0x68df[3]]},reason:{type:Sequelize[_0x68df[3]]},amd:{type:Sequelize[_0x68df[6]],defaultValue:false},fax:{type:Sequelize[_0x68df[6]],defaultValue:false},callback:{type:Sequelize[_0x68df[6]],defaultValue:false},callbackuniqueid:{type:Sequelize[_0x68df[3]],defaultValue:null},callbackat:{type:Sequelize[_0x68df[4]]},recallme:{type:Sequelize[_0x68df[6]],defaultValue:false},editedat:{type:Sequelize[_0x68df[4]]},edited:{type:Sequelize[_0x68df[6]],defaultValue:false}}
\ No newline at end of file
+var _0x91dd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x91dd[0];var Sequelize=require(_0x91dd[1]);module[_0x91dd[2]]= {state:{type:Sequelize.INTEGER(2)},statedesc:{type:Sequelize[_0x91dd[3]]},scheduledat:{type:Sequelize[_0x91dd[4]]},countbusyretry:{type:Sequelize[_0x91dd[5]],defaultValue:0},countcongestionretry:{type:Sequelize[_0x91dd[5]],defaultValue:0},countnoanswerretry:{type:Sequelize[_0x91dd[5]],defaultValue:0},countglobal:{type:Sequelize[_0x91dd[5]],defaultValue:0},uniqueid:{type:Sequelize[_0x91dd[3]]},calleridnum:{type:Sequelize[_0x91dd[3]]},calleridname:{type:Sequelize[_0x91dd[3]]},starttime:{type:Sequelize[_0x91dd[4]]},responsetime:{type:Sequelize[_0x91dd[4]]},answertime:{type:Sequelize[_0x91dd[4]]},droptime:{type:Sequelize[_0x91dd[4]]},endtime:{type:Sequelize[_0x91dd[4]]},ringtime:{type:Sequelize[_0x91dd[5]],defaultValue:0},holdtime:{type:Sequelize[_0x91dd[5]],defaultValue:0},talktime:{type:Sequelize[_0x91dd[5]],defaultValue:0},followuptime:{type:Sequelize[_0x91dd[5]],defaultValue:0},dropreason:{type:Sequelize[_0x91dd[3]]},campaign:{type:Sequelize[_0x91dd[3]]},campaigntype:{type:Sequelize[_0x91dd[3]]},membername:{type:Sequelize[_0x91dd[3]]},reason:{type:Sequelize[_0x91dd[3]]},amd:{type:Sequelize[_0x91dd[6]],defaultValue:false},fax:{type:Sequelize[_0x91dd[6]],defaultValue:false},callback:{type:Sequelize[_0x91dd[6]],defaultValue:false},callbackuniqueid:{type:Sequelize[_0x91dd[3]],defaultValue:null},callbackat:{type:Sequelize[_0x91dd[4]]},recallme:{type:Sequelize[_0x91dd[6]],defaultValue:false},editedat:{type:Sequelize[_0x91dd[4]]},edited:{type:Sequelize[_0x91dd[6]],defaultValue:false}}
\ No newline at end of file
index 661efb4..d0027a1 100644 (file)
@@ -1 +1 @@
-var _0xecb1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x75\x6E\x69\x71\x75\x65\x69\x64"];_0xecb1[0];var jsonpatch=require(_0xecb1[1]);var rp=require(_0xecb1[2]);var moment=require(_0xecb1[3]);var BPromise=require(_0xecb1[4]);var Mustache=require(_0xecb1[5]);var util=require(_0xecb1[6]);var path=require(_0xecb1[7]);var sox=require(_0xecb1[8]);var csv=require(_0xecb1[9]);var ejs=require(_0xecb1[10]);var fs=require(_0xecb1[11]);var _=require(_0xecb1[12]);var squel=require(_0xecb1[13]);var crypto=require(_0xecb1[14]);var jsforce=require(_0xecb1[15]);var deskjs=require(_0xecb1[16]);var toCsv=require(_0xecb1[9]);var querystring=require(_0xecb1[17]);var Papa=require(_0xecb1[18]);var qs=require(_0xecb1[19]);var logger=require(_0xecb1[21])(_0xecb1[20]);var utils=require(_0xecb1[22]);var config=require(_0xecb1[23]);var db=require(_0xecb1[25])[_0xecb1[24]];function respondWithStatusCode(_0x3c21x1a,_0x3c21x1b){_0x3c21x1b= _0x3c21x1b|| 204;return function(_0x3c21x1c){if(_0x3c21x1c){return _0x3c21x1a[_0xecb1[26]](_0x3c21x1b)};return _0x3c21x1a[_0xecb1[28]](_0x3c21x1b)[_0xecb1[27]]()}}function respondWithResult(_0x3c21x1a,_0x3c21x1b){_0x3c21x1b= _0x3c21x1b|| 200;return function(_0x3c21x1c){if(_0x3c21x1c){return _0x3c21x1a[_0xecb1[28]](_0x3c21x1b)[_0xecb1[29]](_0x3c21x1c)}}}function respondWithFilteredResult(_0x3c21x1a,_0x3c21x1f){return function(_0x3c21x1c){if(_0x3c21x1c){var _0x3c21x20=_0x3c21x1c[_0xecb1[30]],_0x3c21x21=_0x3c21x1f[_0xecb1[31]],_0x3c21x22=_0x3c21x1f[_0xecb1[31]]+ _0x3c21x1f[_0xecb1[32]],_0x3c21x1b;if(_0x3c21x22>= _0x3c21x20){_0x3c21x22= _0x3c21x20;_0x3c21x1b= 200}else {_0x3c21x1b= 206};_0x3c21x1a[_0xecb1[28]](_0x3c21x1b);return _0x3c21x1a[_0xecb1[36]](_0xecb1[33],_0x3c21x21+ _0xecb1[34]+ _0x3c21x22+ _0xecb1[35]+ _0x3c21x20)[_0xecb1[29]](_0x3c21x1c)};return null}}function patchUpdates(_0x3c21x24){return function(_0x3c21x1c){try{jsonpatch[_0xecb1[37]](_0x3c21x1c,_0x3c21x24,true)}catch(err){return BPromise[_0xecb1[38]](err)};return _0x3c21x1c[_0xecb1[39]]()}}function saveUpdates(_0x3c21x26,_0x3c21x1b){return function(_0x3c21x1c){if(_0x3c21x1c){return _0x3c21x1c[_0xecb1[41]](_0x3c21x26)[_0xecb1[40]](function(_0x3c21x27){return _0x3c21x27})};return null}}function removeEntity(_0x3c21x1a,_0x3c21x1b){return function(_0x3c21x1c){if(_0x3c21x1c){return _0x3c21x1c[_0xecb1[42]]()[_0xecb1[40]](function(){_0x3c21x1a[_0xecb1[28]](204)[_0xecb1[27]]()})}}}function handleEntityNotFound(_0x3c21x1a,_0x3c21x1b){return function(_0x3c21x1c){if(!_0x3c21x1c){_0x3c21x1a[_0xecb1[26]](404)};return _0x3c21x1c}}function handleError(_0x3c21x1a,_0x3c21x1b){_0x3c21x1b= _0x3c21x1b|| 500;return function(_0x3c21x2b){logger[_0xecb1[44]](_0x3c21x2b[_0xecb1[43]]);if(_0x3c21x2b[_0xecb1[45]]){delete _0x3c21x2b[_0xecb1[45]]};_0x3c21x1a[_0xecb1[28]](_0x3c21x1b)[_0xecb1[46]](_0x3c21x2b)}}exports[_0xecb1[47]]= function(_0x3c21x2c,_0x3c21x1a){var _0x3c21x1f={},_0x3c21x2d={},_0x3c21x2e={count:0,rows:[]};_0x3c21x2d[_0xecb1[48]]= _[_0xecb1[51]](db[_0xecb1[50]][_0xecb1[49]]);var _0x3c21x2f={dateStart:_0x3c21x2c[_0xecb1[53]][_0xecb1[52]],dateEnd:_0x3c21x2c[_0xecb1[53]][_0xecb1[54]]};delete _0x3c21x2c[_0xecb1[53]][_0xecb1[52]];delete _0x3c21x2c[_0xecb1[53]][_0xecb1[54]];_0x3c21x2d[_0xecb1[53]]= _[_0xecb1[51]](_0x3c21x2c[_0xecb1[53]]);_0x3c21x2d[_0xecb1[55]]= _[_0xecb1[56]](_0x3c21x2d[_0xecb1[48]],_0x3c21x2d[_0xecb1[53]]);_0x3c21x1f[_0xecb1[57]]= _[_0xecb1[56]](_0x3c21x2d[_0xecb1[48]],qs[_0xecb1[58]](_0x3c21x2c[_0xecb1[53]][_0xecb1[58]]));_0x3c21x1f[_0xecb1[57]]= (_0x3c21x1f[_0xecb1[57]][_0xecb1[59]])?_0x3c21x1f[_0xecb1[57]]:_0x3c21x2d[_0xecb1[48]];if(!_0x3c21x2c[_0xecb1[53]][_0xecb1[61]](_0xecb1[60])){_0x3c21x1f[_0xecb1[32]]= qs[_0xecb1[32]](_0x3c21x2c[_0xecb1[53]][_0xecb1[32]]);_0x3c21x1f[_0xecb1[31]]= qs[_0xecb1[31]](_0x3c21x2c[_0xecb1[53]][_0xecb1[31]])};_0x3c21x1f[_0xecb1[62]]= qs[_0xecb1[63]](_0x3c21x2c[_0xecb1[53]][_0xecb1[63]]);_0x3c21x1f[_0xecb1[64]]= qs[_0xecb1[55]](_[_0xecb1[65]](_0x3c21x2c[_0xecb1[53]],_0x3c21x2d[_0xecb1[55]]));if(_0x3c21x2f[_0xecb1[52]]){if(_0x3c21x2f[_0xecb1[54]]){_0x3c21x2f[_0xecb1[54]]= moment(_0x3c21x2f[_0xecb1[54]])[_0xecb1[67]](1,_0xecb1[66])}else {_0x3c21x2f[_0xecb1[54]]= moment(_0x3c21x2f[_0xecb1[52]])[_0xecb1[67]](1,_0xecb1[66])};_[_0xecb1[68]](_0x3c21x1f[_0xecb1[64]],{createdAt:{$gte:_0x3c21x2f[_0xecb1[52]],$lte:_0x3c21x2f[_0xecb1[54]]}})};if(_0x3c21x2c[_0xecb1[53]][_0xecb1[69]]){_0x3c21x1f[_0xecb1[64]]= _[_0xecb1[68]](_0x3c21x1f[_0xecb1[64]],{$or:_[_0xecb1[71]](_0x3c21x1f[_0xecb1[57]],function(_0x3c21x30){var _0x3c21x2e={};_0x3c21x2e[_0x3c21x30]= {$like:_0xecb1[70]+ _0x3c21x2c[_0xecb1[53]][_0xecb1[69]]+ _0xecb1[70]};return _0x3c21x2e})})};_0x3c21x1f= _[_0xecb1[68]]({},_0x3c21x1f,_0x3c21x2c[_0xecb1[72]]);var _0x3c21x31={where:_0x3c21x1f[_0xecb1[64]]};return db[_0xecb1[50]][_0xecb1[30]](_0x3c21x31)[_0xecb1[40]](function(_0x3c21x20){_0x3c21x2e[_0xecb1[30]]= _0x3c21x20;if(_0x3c21x2c[_0xecb1[53]][_0xecb1[75]]){_0x3c21x1f[_0xecb1[76]]= [{all:true}]};return db[_0xecb1[50]][_0xecb1[77]](_0x3c21x1f)})[_0xecb1[40]](function(_0x3c21x32){_0x3c21x2e[_0xecb1[74]]= _0x3c21x32;return _0x3c21x2e})[_0xecb1[40]](respondWithFilteredResult(_0x3c21x1a,_0x3c21x1f))[_0xecb1[73]](handleError(_0x3c21x1a,null))};exports[_0xecb1[78]]= function(_0x3c21x2c,_0x3c21x1a){var _0x3c21x1f={raw:true,where:{id:_0x3c21x2c[_0xecb1[80]][_0xecb1[79]]}},_0x3c21x2d={};_0x3c21x2d[_0xecb1[48]]= _[_0xecb1[51]](db[_0xecb1[50]][_0xecb1[49]]);_0x3c21x2d[_0xecb1[53]]= _[_0xecb1[51]](_0x3c21x2c[_0xecb1[53]]);_0x3c21x2d[_0xecb1[55]]= _[_0xecb1[56]](_0x3c21x2d[_0xecb1[48]],_0x3c21x2d[_0xecb1[53]]);_0x3c21x1f[_0xecb1[57]]= _[_0xecb1[56]](_0x3c21x2d[_0xecb1[48]],qs[_0xecb1[58]](_0x3c21x2c[_0xecb1[53]][_0xecb1[58]]));_0x3c21x1f[_0xecb1[57]]= (_0x3c21x1f[_0xecb1[57]][_0xecb1[59]])?_0x3c21x1f[_0xecb1[57]]:_0x3c21x2d[_0xecb1[48]];if(_0x3c21x2c[_0xecb1[53]][_0xecb1[75]]){_0x3c21x1f[_0xecb1[76]]= [{all:true}]};_0x3c21x1f= _[_0xecb1[68]]({},_0x3c21x1f,_0x3c21x2c[_0xecb1[72]]);return db[_0xecb1[50]][_0xecb1[81]](_0x3c21x1f)[_0xecb1[40]](handleEntityNotFound(_0x3c21x1a,null))[_0xecb1[40]](respondWithResult(_0x3c21x1a,null))[_0xecb1[73]](handleError(_0x3c21x1a,null))};exports[_0xecb1[82]]= function(_0x3c21x2c,_0x3c21x1a){return db[_0xecb1[50]][_0xecb1[82]](_0x3c21x2c[_0xecb1[83]],{})[_0xecb1[40]](respondWithResult(_0x3c21x1a,201))[_0xecb1[73]](handleError(_0x3c21x1a,null))};exports[_0xecb1[84]]= function(_0x3c21x2c,_0x3c21x1a){return db[_0xecb1[50]][_0xecb1[84]]()[_0xecb1[40]](respondWithResult(_0x3c21x1a,null))[_0xecb1[73]](handleError(_0x3c21x1a,null))};exports[_0xecb1[41]]= function(_0x3c21x2c,_0x3c21x1a){if(_0x3c21x2c[_0xecb1[83]][_0xecb1[85]]){delete _0x3c21x2c[_0xecb1[83]][_0xecb1[85]]};return db[_0xecb1[50]][_0xecb1[81]]({where:{uniqueid:_0x3c21x2c[_0xecb1[80]][_0xecb1[79]]}})[_0xecb1[40]](handleEntityNotFound(_0x3c21x1a,null))[_0xecb1[40]](saveUpdates(_0x3c21x2c[_0xecb1[83]],null))[_0xecb1[40]](respondWithResult(_0x3c21x1a,null))[_0xecb1[73]](handleError(_0x3c21x1a,null))}
\ No newline at end of file
+var _0xb47f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x75\x6E\x69\x71\x75\x65\x69\x64"];_0xb47f[0];var jsonpatch=require(_0xb47f[1]);var rp=require(_0xb47f[2]);var moment=require(_0xb47f[3]);var BPromise=require(_0xb47f[4]);var Mustache=require(_0xb47f[5]);var util=require(_0xb47f[6]);var path=require(_0xb47f[7]);var sox=require(_0xb47f[8]);var csv=require(_0xb47f[9]);var ejs=require(_0xb47f[10]);var fs=require(_0xb47f[11]);var _=require(_0xb47f[12]);var squel=require(_0xb47f[13]);var crypto=require(_0xb47f[14]);var jsforce=require(_0xb47f[15]);var deskjs=require(_0xb47f[16]);var toCsv=require(_0xb47f[9]);var querystring=require(_0xb47f[17]);var Papa=require(_0xb47f[18]);var qs=require(_0xb47f[19]);var logger=require(_0xb47f[21])(_0xb47f[20]);var utils=require(_0xb47f[22]);var config=require(_0xb47f[23]);var db=require(_0xb47f[25])[_0xb47f[24]];function respondWithStatusCode(_0x4d47x1a,_0x4d47x1b){_0x4d47x1b= _0x4d47x1b|| 204;return function(_0x4d47x1c){if(_0x4d47x1c){return _0x4d47x1a[_0xb47f[26]](_0x4d47x1b)};return _0x4d47x1a[_0xb47f[28]](_0x4d47x1b)[_0xb47f[27]]()}}function respondWithResult(_0x4d47x1a,_0x4d47x1b){_0x4d47x1b= _0x4d47x1b|| 200;return function(_0x4d47x1c){if(_0x4d47x1c){return _0x4d47x1a[_0xb47f[28]](_0x4d47x1b)[_0xb47f[29]](_0x4d47x1c)}}}function respondWithFilteredResult(_0x4d47x1a,_0x4d47x1f){return function(_0x4d47x1c){if(_0x4d47x1c){var _0x4d47x20=_0x4d47x1c[_0xb47f[30]],_0x4d47x21=_0x4d47x1f[_0xb47f[31]],_0x4d47x22=_0x4d47x1f[_0xb47f[31]]+ _0x4d47x1f[_0xb47f[32]],_0x4d47x1b;if(_0x4d47x22>= _0x4d47x20){_0x4d47x22= _0x4d47x20;_0x4d47x1b= 200}else {_0x4d47x1b= 206};_0x4d47x1a[_0xb47f[28]](_0x4d47x1b);return _0x4d47x1a[_0xb47f[36]](_0xb47f[33],_0x4d47x21+ _0xb47f[34]+ _0x4d47x22+ _0xb47f[35]+ _0x4d47x20)[_0xb47f[29]](_0x4d47x1c)};return null}}function patchUpdates(_0x4d47x24){return function(_0x4d47x1c){try{jsonpatch[_0xb47f[37]](_0x4d47x1c,_0x4d47x24,true)}catch(err){return BPromise[_0xb47f[38]](err)};return _0x4d47x1c[_0xb47f[39]]()}}function saveUpdates(_0x4d47x26,_0x4d47x1b){return function(_0x4d47x1c){if(_0x4d47x1c){return _0x4d47x1c[_0xb47f[41]](_0x4d47x26)[_0xb47f[40]](function(_0x4d47x27){return _0x4d47x27})};return null}}function removeEntity(_0x4d47x1a,_0x4d47x1b){return function(_0x4d47x1c){if(_0x4d47x1c){return _0x4d47x1c[_0xb47f[42]]()[_0xb47f[40]](function(){_0x4d47x1a[_0xb47f[28]](204)[_0xb47f[27]]()})}}}function handleEntityNotFound(_0x4d47x1a,_0x4d47x1b){return function(_0x4d47x1c){if(!_0x4d47x1c){_0x4d47x1a[_0xb47f[26]](404)};return _0x4d47x1c}}function handleError(_0x4d47x1a,_0x4d47x1b){_0x4d47x1b= _0x4d47x1b|| 500;return function(_0x4d47x2b){logger[_0xb47f[44]](_0x4d47x2b[_0xb47f[43]]);if(_0x4d47x2b[_0xb47f[45]]){delete _0x4d47x2b[_0xb47f[45]]};_0x4d47x1a[_0xb47f[28]](_0x4d47x1b)[_0xb47f[46]](_0x4d47x2b)}}exports[_0xb47f[47]]= function(_0x4d47x2c,_0x4d47x1a){var _0x4d47x1f={},_0x4d47x2d={},_0x4d47x2e={count:0,rows:[]};_0x4d47x2d[_0xb47f[48]]= _[_0xb47f[51]](db[_0xb47f[50]][_0xb47f[49]]);var _0x4d47x2f={dateStart:_0x4d47x2c[_0xb47f[53]][_0xb47f[52]],dateEnd:_0x4d47x2c[_0xb47f[53]][_0xb47f[54]]};delete _0x4d47x2c[_0xb47f[53]][_0xb47f[52]];delete _0x4d47x2c[_0xb47f[53]][_0xb47f[54]];_0x4d47x2d[_0xb47f[53]]= _[_0xb47f[51]](_0x4d47x2c[_0xb47f[53]]);_0x4d47x2d[_0xb47f[55]]= _[_0xb47f[56]](_0x4d47x2d[_0xb47f[48]],_0x4d47x2d[_0xb47f[53]]);_0x4d47x1f[_0xb47f[57]]= _[_0xb47f[56]](_0x4d47x2d[_0xb47f[48]],qs[_0xb47f[58]](_0x4d47x2c[_0xb47f[53]][_0xb47f[58]]));_0x4d47x1f[_0xb47f[57]]= (_0x4d47x1f[_0xb47f[57]][_0xb47f[59]])?_0x4d47x1f[_0xb47f[57]]:_0x4d47x2d[_0xb47f[48]];if(!_0x4d47x2c[_0xb47f[53]][_0xb47f[61]](_0xb47f[60])){_0x4d47x1f[_0xb47f[32]]= qs[_0xb47f[32]](_0x4d47x2c[_0xb47f[53]][_0xb47f[32]]);_0x4d47x1f[_0xb47f[31]]= qs[_0xb47f[31]](_0x4d47x2c[_0xb47f[53]][_0xb47f[31]])};_0x4d47x1f[_0xb47f[62]]= qs[_0xb47f[63]](_0x4d47x2c[_0xb47f[53]][_0xb47f[63]]);_0x4d47x1f[_0xb47f[64]]= qs[_0xb47f[55]](_[_0xb47f[65]](_0x4d47x2c[_0xb47f[53]],_0x4d47x2d[_0xb47f[55]]));if(_0x4d47x2f[_0xb47f[52]]){if(_0x4d47x2f[_0xb47f[54]]){_0x4d47x2f[_0xb47f[54]]= moment(_0x4d47x2f[_0xb47f[54]])[_0xb47f[67]](1,_0xb47f[66])}else {_0x4d47x2f[_0xb47f[54]]= moment(_0x4d47x2f[_0xb47f[52]])[_0xb47f[67]](1,_0xb47f[66])};_[_0xb47f[68]](_0x4d47x1f[_0xb47f[64]],{createdAt:{$gte:_0x4d47x2f[_0xb47f[52]],$lte:_0x4d47x2f[_0xb47f[54]]}})};if(_0x4d47x2c[_0xb47f[53]][_0xb47f[69]]){_0x4d47x1f[_0xb47f[64]]= _[_0xb47f[68]](_0x4d47x1f[_0xb47f[64]],{$or:_[_0xb47f[71]](_0x4d47x1f[_0xb47f[57]],function(_0x4d47x30){var _0x4d47x2e={};_0x4d47x2e[_0x4d47x30]= {$like:_0xb47f[70]+ _0x4d47x2c[_0xb47f[53]][_0xb47f[69]]+ _0xb47f[70]};return _0x4d47x2e})})};_0x4d47x1f= _[_0xb47f[68]]({},_0x4d47x1f,_0x4d47x2c[_0xb47f[72]]);var _0x4d47x31={where:_0x4d47x1f[_0xb47f[64]]};return db[_0xb47f[50]][_0xb47f[30]](_0x4d47x31)[_0xb47f[40]](function(_0x4d47x20){_0x4d47x2e[_0xb47f[30]]= _0x4d47x20;if(_0x4d47x2c[_0xb47f[53]][_0xb47f[75]]){_0x4d47x1f[_0xb47f[76]]= [{all:true}]};return db[_0xb47f[50]][_0xb47f[77]](_0x4d47x1f)})[_0xb47f[40]](function(_0x4d47x32){_0x4d47x2e[_0xb47f[74]]= _0x4d47x32;return _0x4d47x2e})[_0xb47f[40]](respondWithFilteredResult(_0x4d47x1a,_0x4d47x1f))[_0xb47f[73]](handleError(_0x4d47x1a,null))};exports[_0xb47f[78]]= function(_0x4d47x2c,_0x4d47x1a){var _0x4d47x1f={raw:true,where:{id:_0x4d47x2c[_0xb47f[80]][_0xb47f[79]]}},_0x4d47x2d={};_0x4d47x2d[_0xb47f[48]]= _[_0xb47f[51]](db[_0xb47f[50]][_0xb47f[49]]);_0x4d47x2d[_0xb47f[53]]= _[_0xb47f[51]](_0x4d47x2c[_0xb47f[53]]);_0x4d47x2d[_0xb47f[55]]= _[_0xb47f[56]](_0x4d47x2d[_0xb47f[48]],_0x4d47x2d[_0xb47f[53]]);_0x4d47x1f[_0xb47f[57]]= _[_0xb47f[56]](_0x4d47x2d[_0xb47f[48]],qs[_0xb47f[58]](_0x4d47x2c[_0xb47f[53]][_0xb47f[58]]));_0x4d47x1f[_0xb47f[57]]= (_0x4d47x1f[_0xb47f[57]][_0xb47f[59]])?_0x4d47x1f[_0xb47f[57]]:_0x4d47x2d[_0xb47f[48]];if(_0x4d47x2c[_0xb47f[53]][_0xb47f[75]]){_0x4d47x1f[_0xb47f[76]]= [{all:true}]};_0x4d47x1f= _[_0xb47f[68]]({},_0x4d47x1f,_0x4d47x2c[_0xb47f[72]]);return db[_0xb47f[50]][_0xb47f[81]](_0x4d47x1f)[_0xb47f[40]](handleEntityNotFound(_0x4d47x1a,null))[_0xb47f[40]](respondWithResult(_0x4d47x1a,null))[_0xb47f[73]](handleError(_0x4d47x1a,null))};exports[_0xb47f[82]]= function(_0x4d47x2c,_0x4d47x1a){return db[_0xb47f[50]][_0xb47f[82]](_0x4d47x2c[_0xb47f[83]],{})[_0xb47f[40]](respondWithResult(_0x4d47x1a,201))[_0xb47f[73]](handleError(_0x4d47x1a,null))};exports[_0xb47f[84]]= function(_0x4d47x2c,_0x4d47x1a){return db[_0xb47f[50]][_0xb47f[84]]()[_0xb47f[40]](respondWithResult(_0x4d47x1a,null))[_0xb47f[73]](handleError(_0x4d47x1a,null))};exports[_0xb47f[41]]= function(_0x4d47x2c,_0x4d47x1a){if(_0x4d47x2c[_0xb47f[83]][_0xb47f[85]]){delete _0x4d47x2c[_0xb47f[83]][_0xb47f[85]]};return db[_0xb47f[50]][_0xb47f[81]]({where:{uniqueid:_0x4d47x2c[_0xb47f[80]][_0xb47f[79]]}})[_0xb47f[40]](handleEntityNotFound(_0x4d47x1a,null))[_0xb47f[40]](saveUpdates(_0x4d47x2c[_0xb47f[83]],null))[_0xb47f[40]](respondWithResult(_0x4d47x1a,null))[_0xb47f[73]](handleError(_0x4d47x1a,null))}
\ No newline at end of file
index 5c92cee..67c186f 100644 (file)
@@ -1 +1 @@
-var _0x6512=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x68\x69\x73\x74\x6F\x72\x79","\x65\x6E\x64\x74\x69\x6D\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0x6512[0];var _=require(_0x6512[1]);var util=require(_0x6512[2]);var logger=require(_0x6512[4])(_0x6512[3]);var moment=require(_0x6512[5]);var BPromise=require(_0x6512[6]);var rp=require(_0x6512[7]);var attributes=require(_0x6512[8]);module[_0x6512[9]]= function(_0x31c1x8,_0x31c1x9){return _0x31c1x8[_0x6512[14]](_0x6512[10],attributes,{tableName:_0x6512[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x6512[12],"\x66\x69\x65\x6C\x64\x73":[_0x6512[12]]},{"\x6E\x61\x6D\x65":_0x6512[13],"\x66\x69\x65\x6C\x64\x73":[_0x6512[13]]}],timestamps:true})}
\ No newline at end of file
+var _0x5220=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x68\x69\x73\x74\x6F\x72\x79","\x65\x6E\x64\x74\x69\x6D\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0x5220[0];var _=require(_0x5220[1]);var util=require(_0x5220[2]);var logger=require(_0x5220[4])(_0x5220[3]);var moment=require(_0x5220[5]);var BPromise=require(_0x5220[6]);var rp=require(_0x5220[7]);var attributes=require(_0x5220[8]);module[_0x5220[9]]= function(_0xe528x8,_0xe528x9){return _0xe528x8[_0x5220[14]](_0x5220[10],attributes,{tableName:_0x5220[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x5220[12],"\x66\x69\x65\x6C\x64\x73":[_0x5220[12]]},{"\x6E\x61\x6D\x65":_0x5220[13],"\x66\x69\x65\x6C\x64\x73":[_0x5220[13]]}],timestamps:true})}
\ No newline at end of file
index 4a86dda..f6e959c 100644 (file)
@@ -1 +1 @@
-var _0x4012=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x41\x76\x67\x48\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65","\x77\x68\x65\x72\x65","\x43\x4F\x55\x4E\x54","\x69\x64","\x63\x6F\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x6E","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x54\x6F\x74\x61\x6C\x43\x61\x6C\x6C\x73","\x49\x46","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x34\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6C\x69\x74\x65\x72\x61\x6C","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x41\x6E\x73\x77\x65\x72\x65\x64\x43\x61\x6C\x6C\x73","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x30\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x44\x72\x6F\x70\x70\x65\x64\x43\x61\x6C\x6C\x73\x54\x69\x6D\x65\x6F\x75\x74","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x31\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x44\x72\x6F\x70\x70\x65\x64\x43\x61\x6C\x6C\x73\x43\x61\x6C\x6C\x65\x72\x73\x45\x78\x69\x74","\x41\x56\x47","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x34\x2C\x20\x60\x68\x6F\x6C\x64\x74\x69\x6D\x65\x60\x2C\x20\x6E\x75\x6C\x6C","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x41\x76\x67\x48\x6F\x6C\x64\x74\x69\x6D\x65","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x34\x2C\x20\x60\x74\x61\x6C\x6B\x74\x69\x6D\x65\x60\x2C\x20\x6E\x75\x6C\x6C","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x41\x76\x67\x54\x61\x6C\x6B\x74\x69\x6D\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x47\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x63\x61\x6D\x70\x61\x69\x67\x6E","\x6E\x61\x6D\x65","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x30\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4E\x6F\x53\x75\x63\x68\x43\x61\x6C\x6C\x73\x44\x61\x79","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x33\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4E\x6F\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x35\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x42\x75\x73\x79\x43\x61\x6C\x6C\x73\x44\x61\x79","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x38\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x43\x61\x6C\x6C\x73\x44\x61\x79","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x30\x20\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x72\x6F\x70\x43\x61\x6C\x6C\x73\x44\x61\x79\x54\x69\x6D\x65\x6F\x75\x74","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x31\x20\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x72\x6F\x70\x43\x61\x6C\x6C\x73\x44\x61\x79\x43\x61\x6C\x6C\x65\x72\x73\x45\x78\x69\x74","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x32\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x55\x6E\x6B\x6E\x6F\x77\x6E\x43\x61\x6C\x6C\x73\x44\x61\x79","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x33\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74\x43\x61\x6C\x6C\x73\x44\x61\x79","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x34\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x46\x61\x69\x6C\x75\x72\x65\x43\x61\x6C\x6C\x73\x44\x61\x79","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x38\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x52\x65\x6A\x65\x63\x74\x43\x61\x6C\x6C\x73\x44\x61\x79","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x36\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x41\x67\x69\x43\x61\x6C\x6C\x73\x44\x61\x79","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x32\x30\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x32\x32\x20\x6F\x72\x20\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x32\x33\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x52\x65\x43\x61\x6C\x6C\x73\x44\x61\x79","\x47\x65\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x69\x76\x72\x54\x6F\x74\x61\x6C\x43\x61\x6C\x6C\x73\x44\x61\x79\x73","\x69\x76\x72\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79"];_0x4012[0];var _=require(_0x4012[1]);var util=require(_0x4012[2]);var moment=require(_0x4012[3]);var BPromise=require(_0x4012[4]);var rs=require(_0x4012[5]);var fs=require(_0x4012[6]);var db=require(_0x4012[8])[_0x4012[7]];var utils=require(_0x4012[9]);var logger=require(_0x4012[11])(_0x4012[10]);var config=require(_0x4012[12]);var jayson=require(_0x4012[13]);var client=jayson[_0x4012[15]][_0x4012[14]]({port:9002});function respondWithRpcPromise(_0xb58fxe,_0xb58fxf,_0xb58fx10){return  new BPromise(function(_0xb58fx11,_0xb58fx12){return client[_0x4012[28]](_0xb58fxe,_0xb58fx10)[_0x4012[27]](function(_0xb58fx14){logger[_0x4012[20]](_0x4012[16],_0xb58fxf,_0x4012[19]);logger[_0x4012[23]](_0x4012[21],_0xb58fxf,_0x4012[19],JSON[_0x4012[22]](_0xb58fx14));if(_0xb58fx14[_0x4012[17]]){if(_0xb58fx14[_0x4012[17]][_0x4012[24]]=== 500){logger[_0x4012[17]](_0x4012[16],_0xb58fxf,_0xb58fx14[_0x4012[17]][_0x4012[25]]);return _0xb58fx12(_0xb58fx14[_0x4012[17]][_0x4012[25]])};logger[_0x4012[17]](_0x4012[16],_0xb58fxf,_0xb58fx14[_0x4012[17]][_0x4012[25]]);return _0xb58fx11(_0xb58fx14[_0x4012[17]][_0x4012[25]])}else {logger[_0x4012[20]](_0x4012[16],_0xb58fxf,_0x4012[19]);_0xb58fx11(_0xb58fx14[_0x4012[26]][_0x4012[25]])}})[_0x4012[18]](function(_0xb58fx13){logger[_0x4012[17]](_0x4012[16],_0xb58fxf,_0xb58fx13);_0xb58fx12(_0xb58fx13)})})}exports[_0x4012[29]]= function(_0xb58fx10){var _0xb58fx15=this;return  new Promise(function(_0xb58fx11,_0xb58fx12){return db[_0x4012[34]][_0x4012[33]](_0xb58fx10[_0x4012[30]],{raw:_0xb58fx10[_0x4012[31]]?(_0xb58fx10[_0x4012[31]][_0x4012[32]]=== undefined)?true:false:true})[_0x4012[27]](function(_0xb58fx14){logger[_0x4012[20]](_0x4012[29],_0xb58fx10);logger[_0x4012[23]](_0x4012[29],_0xb58fx10,JSON[_0x4012[22]](_0xb58fx14));_0xb58fx11(_0xb58fx14)})[_0x4012[18]](function(_0xb58fx13){logger[_0x4012[17]](_0x4012[29],_0xb58fx13[_0x4012[25]],_0xb58fx10);_0xb58fx12(_0xb58fx15[_0x4012[17]](500,_0xb58fx13[_0x4012[25]]))})})};exports[_0x4012[35]]= function(_0xb58fx10){var _0xb58fx15=this;return  new Promise(function(_0xb58fx11,_0xb58fx12){return db[_0x4012[34]][_0x4012[56]]({raw:_0xb58fx10[_0x4012[31]]?(_0xb58fx10[_0x4012[31]][_0x4012[32]]=== undefined)?true:false:true,where:_0xb58fx10[_0x4012[31]]?_0xb58fx10[_0x4012[31]][_0x4012[36]]|| null:null,attributes:[[db[_0x4012[40]][_0x4012[41]](_0x4012[37],db[_0x4012[40]][_0x4012[39]](_0x4012[38])),_0x4012[42]],[db[_0x4012[40]][_0x4012[41]](_0x4012[37],db[_0x4012[40]][_0x4012[41]](_0x4012[43],db[_0x4012[40]][_0x4012[45]](_0x4012[44]))),_0x4012[46]],[db[_0x4012[40]][_0x4012[41]](_0x4012[37],db[_0x4012[40]][_0x4012[41]](_0x4012[43],db[_0x4012[40]][_0x4012[45]](_0x4012[47]))),_0x4012[48]],[db[_0x4012[40]][_0x4012[41]](_0x4012[37],db[_0x4012[40]][_0x4012[41]](_0x4012[43],db[_0x4012[40]][_0x4012[45]](_0x4012[49]))),_0x4012[50]],[db[_0x4012[40]][_0x4012[41]](_0x4012[51],db[_0x4012[40]][_0x4012[41]](_0x4012[43],db[_0x4012[40]][_0x4012[45]](_0x4012[52]))),_0x4012[53]],[db[_0x4012[40]][_0x4012[41]](_0x4012[51],db[_0x4012[40]][_0x4012[41]](_0x4012[43],db[_0x4012[40]][_0x4012[45]](_0x4012[54]))),_0x4012[55]]]})[_0x4012[27]](function(_0xb58fx14){logger[_0x4012[20]](_0x4012[35],_0xb58fx10);logger[_0x4012[23]](_0x4012[35],_0xb58fx10,JSON[_0x4012[22]](_0xb58fx14));_0xb58fx11(_0xb58fx14)})[_0x4012[18]](function(_0xb58fx13){logger[_0x4012[17]](_0x4012[35],_0xb58fx13[_0x4012[25]],_0xb58fx10);_0xb58fx12(_0xb58fx15[_0x4012[17]](500,_0xb58fx13[_0x4012[25]]))})})};exports[_0x4012[57]]= function(_0xb58fx10){var _0xb58fx15=this;return  new Promise(function(_0xb58fx11,_0xb58fx12){return db[_0x4012[34]][_0x4012[56]]({raw:_0xb58fx10[_0x4012[31]]?(_0xb58fx10[_0x4012[31]][_0x4012[32]]=== undefined)?true:false:true,where:_0xb58fx10[_0x4012[31]]?_0xb58fx10[_0x4012[31]][_0x4012[36]]|| null:null,attributes:[[_0x4012[58],_0x4012[59]],[db[_0x4012[40]][_0x4012[41]](_0x4012[37],db[_0x4012[40]][_0x4012[41]](_0x4012[43],db[_0x4012[40]][_0x4012[45]](_0x4012[60]))),_0x4012[61]],[db[_0x4012[40]][_0x4012[41]](_0x4012[37],db[_0x4012[40]][_0x4012[41]](_0x4012[43],db[_0x4012[40]][_0x4012[45]](_0x4012[62]))),_0x4012[63]],[db[_0x4012[40]][_0x4012[41]](_0x4012[37],db[_0x4012[40]][_0x4012[41]](_0x4012[43],db[_0x4012[40]][_0x4012[45]](_0x4012[44]))),_0x4012[64]],[db[_0x4012[40]][_0x4012[41]](_0x4012[37],db[_0x4012[40]][_0x4012[41]](_0x4012[43],db[_0x4012[40]][_0x4012[45]](_0x4012[65]))),_0x4012[66]],[db[_0x4012[40]][_0x4012[41]](_0x4012[37],db[_0x4012[40]][_0x4012[41]](_0x4012[43],db[_0x4012[40]][_0x4012[45]](_0x4012[67]))),_0x4012[68]],[db[_0x4012[40]][_0x4012[41]](_0x4012[37],db[_0x4012[40]][_0x4012[41]](_0x4012[43],db[_0x4012[40]][_0x4012[45]](_0x4012[69]))),_0x4012[70]],[db[_0x4012[40]][_0x4012[41]](_0x4012[37],db[_0x4012[40]][_0x4012[41]](_0x4012[43],db[_0x4012[40]][_0x4012[45]](_0x4012[71]))),_0x4012[72]],[db[_0x4012[40]][_0x4012[41]](_0x4012[37],db[_0x4012[40]][_0x4012[41]](_0x4012[43],db[_0x4012[40]][_0x4012[45]](_0x4012[73]))),_0x4012[74]],[db[_0x4012[40]][_0x4012[41]](_0x4012[37],db[_0x4012[40]][_0x4012[41]](_0x4012[43],db[_0x4012[40]][_0x4012[45]](_0x4012[75]))),_0x4012[76]],[db[_0x4012[40]][_0x4012[41]](_0x4012[37],db[_0x4012[40]][_0x4012[41]](_0x4012[43],db[_0x4012[40]][_0x4012[45]](_0x4012[77]))),_0x4012[78]],[db[_0x4012[40]][_0x4012[41]](_0x4012[37],db[_0x4012[40]][_0x4012[41]](_0x4012[43],db[_0x4012[40]][_0x4012[45]](_0x4012[79]))),_0x4012[80]],[db[_0x4012[40]][_0x4012[41]](_0x4012[37],db[_0x4012[40]][_0x4012[41]](_0x4012[43],db[_0x4012[40]][_0x4012[45]](_0x4012[81]))),_0x4012[82]],[db[_0x4012[40]][_0x4012[41]](_0x4012[37],db[_0x4012[40]][_0x4012[41]](_0x4012[43],db[_0x4012[40]][_0x4012[45]](_0x4012[83]))),_0x4012[80]],[db[_0x4012[40]][_0x4012[41]](_0x4012[37],db[_0x4012[40]][_0x4012[41]](_0x4012[43],db[_0x4012[40]][_0x4012[45]](_0x4012[84]))),_0x4012[85]]],group:[_0x4012[58]]})[_0x4012[27]](function(_0xb58fx14){logger[_0x4012[20]](_0x4012[57],_0xb58fx10);logger[_0x4012[23]](_0x4012[57],_0xb58fx10,JSON[_0x4012[22]](_0xb58fx14));_0xb58fx11(_0xb58fx14)})[_0x4012[18]](function(_0xb58fx13){logger[_0x4012[17]](_0x4012[57],_0xb58fx13[_0x4012[25]],_0xb58fx10);_0xb58fx12(_0xb58fx15[_0x4012[17]](500,_0xb58fx13[_0x4012[25]]))})})};exports[_0x4012[86]]= function(_0xb58fx10){var _0xb58fx15=this;return  new Promise(function(_0xb58fx11,_0xb58fx12){return db[_0x4012[34]][_0x4012[56]]({raw:_0xb58fx10[_0x4012[31]]?(_0xb58fx10[_0x4012[31]][_0x4012[32]]=== undefined)?true:false:true,where:_0xb58fx10[_0x4012[31]]?_0xb58fx10[_0x4012[31]][_0x4012[36]]|| null:null,attributes:[[_0x4012[58],_0x4012[59]],[db[_0x4012[40]][_0x4012[41]](_0x4012[37],db[_0x4012[40]][_0x4012[39]](_0x4012[38])),_0x4012[87]],[db[_0x4012[40]][_0x4012[41]](_0x4012[37],db[_0x4012[40]][_0x4012[41]](_0x4012[43],db[_0x4012[40]][_0x4012[45]](_0x4012[44]))),_0x4012[88]]],group:[_0x4012[58]]})[_0x4012[27]](function(_0xb58fx14){logger[_0x4012[20]](_0x4012[86],_0xb58fx10);logger[_0x4012[23]](_0x4012[86],_0xb58fx10,JSON[_0x4012[22]](_0xb58fx14));_0xb58fx11(_0xb58fx14)})[_0x4012[18]](function(_0xb58fx13){logger[_0x4012[17]](_0x4012[86],_0xb58fx13[_0x4012[25]],_0xb58fx10);_0xb58fx12(_0xb58fx15[_0x4012[17]](500,_0xb58fx13[_0x4012[25]]))})})}
\ No newline at end of file
+var _0x18d2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x41\x76\x67\x48\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65","\x77\x68\x65\x72\x65","\x43\x4F\x55\x4E\x54","\x69\x64","\x63\x6F\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x6E","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x54\x6F\x74\x61\x6C\x43\x61\x6C\x6C\x73","\x49\x46","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x34\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6C\x69\x74\x65\x72\x61\x6C","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x41\x6E\x73\x77\x65\x72\x65\x64\x43\x61\x6C\x6C\x73","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x30\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x44\x72\x6F\x70\x70\x65\x64\x43\x61\x6C\x6C\x73\x54\x69\x6D\x65\x6F\x75\x74","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x31\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x44\x72\x6F\x70\x70\x65\x64\x43\x61\x6C\x6C\x73\x43\x61\x6C\x6C\x65\x72\x73\x45\x78\x69\x74","\x41\x56\x47","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x34\x2C\x20\x60\x68\x6F\x6C\x64\x74\x69\x6D\x65\x60\x2C\x20\x6E\x75\x6C\x6C","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x41\x76\x67\x48\x6F\x6C\x64\x74\x69\x6D\x65","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x34\x2C\x20\x60\x74\x61\x6C\x6B\x74\x69\x6D\x65\x60\x2C\x20\x6E\x75\x6C\x6C","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x41\x76\x67\x54\x61\x6C\x6B\x74\x69\x6D\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x47\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x63\x61\x6D\x70\x61\x69\x67\x6E","\x6E\x61\x6D\x65","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x30\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4E\x6F\x53\x75\x63\x68\x43\x61\x6C\x6C\x73\x44\x61\x79","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x33\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4E\x6F\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x35\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x42\x75\x73\x79\x43\x61\x6C\x6C\x73\x44\x61\x79","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x38\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x43\x61\x6C\x6C\x73\x44\x61\x79","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x30\x20\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x72\x6F\x70\x43\x61\x6C\x6C\x73\x44\x61\x79\x54\x69\x6D\x65\x6F\x75\x74","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x31\x20\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x72\x6F\x70\x43\x61\x6C\x6C\x73\x44\x61\x79\x43\x61\x6C\x6C\x65\x72\x73\x45\x78\x69\x74","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x32\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x55\x6E\x6B\x6E\x6F\x77\x6E\x43\x61\x6C\x6C\x73\x44\x61\x79","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x33\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74\x43\x61\x6C\x6C\x73\x44\x61\x79","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x34\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x46\x61\x69\x6C\x75\x72\x65\x43\x61\x6C\x6C\x73\x44\x61\x79","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x38\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x52\x65\x6A\x65\x63\x74\x43\x61\x6C\x6C\x73\x44\x61\x79","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x31\x36\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x41\x67\x69\x43\x61\x6C\x6C\x73\x44\x61\x79","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x32\x30\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x32\x32\x20\x6F\x72\x20\x60\x73\x74\x61\x74\x65\x60\x20\x3D\x20\x32\x33\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x52\x65\x43\x61\x6C\x6C\x73\x44\x61\x79","\x47\x65\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x69\x76\x72\x54\x6F\x74\x61\x6C\x43\x61\x6C\x6C\x73\x44\x61\x79\x73","\x69\x76\x72\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79"];_0x18d2[0];var _=require(_0x18d2[1]);var util=require(_0x18d2[2]);var moment=require(_0x18d2[3]);var BPromise=require(_0x18d2[4]);var rs=require(_0x18d2[5]);var fs=require(_0x18d2[6]);var db=require(_0x18d2[8])[_0x18d2[7]];var utils=require(_0x18d2[9]);var logger=require(_0x18d2[11])(_0x18d2[10]);var config=require(_0x18d2[12]);var jayson=require(_0x18d2[13]);var client=jayson[_0x18d2[15]][_0x18d2[14]]({port:9002});function respondWithRpcPromise(_0xf976xe,_0xf976xf,_0xf976x10){return  new BPromise(function(_0xf976x11,_0xf976x12){return client[_0x18d2[28]](_0xf976xe,_0xf976x10)[_0x18d2[27]](function(_0xf976x14){logger[_0x18d2[20]](_0x18d2[16],_0xf976xf,_0x18d2[19]);logger[_0x18d2[23]](_0x18d2[21],_0xf976xf,_0x18d2[19],JSON[_0x18d2[22]](_0xf976x14));if(_0xf976x14[_0x18d2[17]]){if(_0xf976x14[_0x18d2[17]][_0x18d2[24]]=== 500){logger[_0x18d2[17]](_0x18d2[16],_0xf976xf,_0xf976x14[_0x18d2[17]][_0x18d2[25]]);return _0xf976x12(_0xf976x14[_0x18d2[17]][_0x18d2[25]])};logger[_0x18d2[17]](_0x18d2[16],_0xf976xf,_0xf976x14[_0x18d2[17]][_0x18d2[25]]);return _0xf976x11(_0xf976x14[_0x18d2[17]][_0x18d2[25]])}else {logger[_0x18d2[20]](_0x18d2[16],_0xf976xf,_0x18d2[19]);_0xf976x11(_0xf976x14[_0x18d2[26]][_0x18d2[25]])}})[_0x18d2[18]](function(_0xf976x13){logger[_0x18d2[17]](_0x18d2[16],_0xf976xf,_0xf976x13);_0xf976x12(_0xf976x13)})})}exports[_0x18d2[29]]= function(_0xf976x10){var _0xf976x15=this;return  new Promise(function(_0xf976x11,_0xf976x12){return db[_0x18d2[34]][_0x18d2[33]](_0xf976x10[_0x18d2[30]],{raw:_0xf976x10[_0x18d2[31]]?(_0xf976x10[_0x18d2[31]][_0x18d2[32]]=== undefined)?true:false:true})[_0x18d2[27]](function(_0xf976x14){logger[_0x18d2[20]](_0x18d2[29],_0xf976x10);logger[_0x18d2[23]](_0x18d2[29],_0xf976x10,JSON[_0x18d2[22]](_0xf976x14));_0xf976x11(_0xf976x14)})[_0x18d2[18]](function(_0xf976x13){logger[_0x18d2[17]](_0x18d2[29],_0xf976x13[_0x18d2[25]],_0xf976x10);_0xf976x12(_0xf976x15[_0x18d2[17]](500,_0xf976x13[_0x18d2[25]]))})})};exports[_0x18d2[35]]= function(_0xf976x10){var _0xf976x15=this;return  new Promise(function(_0xf976x11,_0xf976x12){return db[_0x18d2[34]][_0x18d2[56]]({raw:_0xf976x10[_0x18d2[31]]?(_0xf976x10[_0x18d2[31]][_0x18d2[32]]=== undefined)?true:false:true,where:_0xf976x10[_0x18d2[31]]?_0xf976x10[_0x18d2[31]][_0x18d2[36]]|| null:null,attributes:[[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[37],db[_0x18d2[40]][_0x18d2[39]](_0x18d2[38])),_0x18d2[42]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[37],db[_0x18d2[40]][_0x18d2[41]](_0x18d2[43],db[_0x18d2[40]][_0x18d2[45]](_0x18d2[44]))),_0x18d2[46]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[37],db[_0x18d2[40]][_0x18d2[41]](_0x18d2[43],db[_0x18d2[40]][_0x18d2[45]](_0x18d2[47]))),_0x18d2[48]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[37],db[_0x18d2[40]][_0x18d2[41]](_0x18d2[43],db[_0x18d2[40]][_0x18d2[45]](_0x18d2[49]))),_0x18d2[50]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[51],db[_0x18d2[40]][_0x18d2[41]](_0x18d2[43],db[_0x18d2[40]][_0x18d2[45]](_0x18d2[52]))),_0x18d2[53]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[51],db[_0x18d2[40]][_0x18d2[41]](_0x18d2[43],db[_0x18d2[40]][_0x18d2[45]](_0x18d2[54]))),_0x18d2[55]]]})[_0x18d2[27]](function(_0xf976x14){logger[_0x18d2[20]](_0x18d2[35],_0xf976x10);logger[_0x18d2[23]](_0x18d2[35],_0xf976x10,JSON[_0x18d2[22]](_0xf976x14));_0xf976x11(_0xf976x14)})[_0x18d2[18]](function(_0xf976x13){logger[_0x18d2[17]](_0x18d2[35],_0xf976x13[_0x18d2[25]],_0xf976x10);_0xf976x12(_0xf976x15[_0x18d2[17]](500,_0xf976x13[_0x18d2[25]]))})})};exports[_0x18d2[57]]= function(_0xf976x10){var _0xf976x15=this;return  new Promise(function(_0xf976x11,_0xf976x12){return db[_0x18d2[34]][_0x18d2[56]]({raw:_0xf976x10[_0x18d2[31]]?(_0xf976x10[_0x18d2[31]][_0x18d2[32]]=== undefined)?true:false:true,where:_0xf976x10[_0x18d2[31]]?_0xf976x10[_0x18d2[31]][_0x18d2[36]]|| null:null,attributes:[[_0x18d2[58],_0x18d2[59]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[37],db[_0x18d2[40]][_0x18d2[41]](_0x18d2[43],db[_0x18d2[40]][_0x18d2[45]](_0x18d2[60]))),_0x18d2[61]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[37],db[_0x18d2[40]][_0x18d2[41]](_0x18d2[43],db[_0x18d2[40]][_0x18d2[45]](_0x18d2[62]))),_0x18d2[63]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[37],db[_0x18d2[40]][_0x18d2[41]](_0x18d2[43],db[_0x18d2[40]][_0x18d2[45]](_0x18d2[44]))),_0x18d2[64]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[37],db[_0x18d2[40]][_0x18d2[41]](_0x18d2[43],db[_0x18d2[40]][_0x18d2[45]](_0x18d2[65]))),_0x18d2[66]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[37],db[_0x18d2[40]][_0x18d2[41]](_0x18d2[43],db[_0x18d2[40]][_0x18d2[45]](_0x18d2[67]))),_0x18d2[68]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[37],db[_0x18d2[40]][_0x18d2[41]](_0x18d2[43],db[_0x18d2[40]][_0x18d2[45]](_0x18d2[69]))),_0x18d2[70]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[37],db[_0x18d2[40]][_0x18d2[41]](_0x18d2[43],db[_0x18d2[40]][_0x18d2[45]](_0x18d2[71]))),_0x18d2[72]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[37],db[_0x18d2[40]][_0x18d2[41]](_0x18d2[43],db[_0x18d2[40]][_0x18d2[45]](_0x18d2[73]))),_0x18d2[74]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[37],db[_0x18d2[40]][_0x18d2[41]](_0x18d2[43],db[_0x18d2[40]][_0x18d2[45]](_0x18d2[75]))),_0x18d2[76]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[37],db[_0x18d2[40]][_0x18d2[41]](_0x18d2[43],db[_0x18d2[40]][_0x18d2[45]](_0x18d2[77]))),_0x18d2[78]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[37],db[_0x18d2[40]][_0x18d2[41]](_0x18d2[43],db[_0x18d2[40]][_0x18d2[45]](_0x18d2[79]))),_0x18d2[80]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[37],db[_0x18d2[40]][_0x18d2[41]](_0x18d2[43],db[_0x18d2[40]][_0x18d2[45]](_0x18d2[81]))),_0x18d2[82]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[37],db[_0x18d2[40]][_0x18d2[41]](_0x18d2[43],db[_0x18d2[40]][_0x18d2[45]](_0x18d2[83]))),_0x18d2[80]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[37],db[_0x18d2[40]][_0x18d2[41]](_0x18d2[43],db[_0x18d2[40]][_0x18d2[45]](_0x18d2[84]))),_0x18d2[85]]],group:[_0x18d2[58]]})[_0x18d2[27]](function(_0xf976x14){logger[_0x18d2[20]](_0x18d2[57],_0xf976x10);logger[_0x18d2[23]](_0x18d2[57],_0xf976x10,JSON[_0x18d2[22]](_0xf976x14));_0xf976x11(_0xf976x14)})[_0x18d2[18]](function(_0xf976x13){logger[_0x18d2[17]](_0x18d2[57],_0xf976x13[_0x18d2[25]],_0xf976x10);_0xf976x12(_0xf976x15[_0x18d2[17]](500,_0xf976x13[_0x18d2[25]]))})})};exports[_0x18d2[86]]= function(_0xf976x10){var _0xf976x15=this;return  new Promise(function(_0xf976x11,_0xf976x12){return db[_0x18d2[34]][_0x18d2[56]]({raw:_0xf976x10[_0x18d2[31]]?(_0xf976x10[_0x18d2[31]][_0x18d2[32]]=== undefined)?true:false:true,where:_0xf976x10[_0x18d2[31]]?_0xf976x10[_0x18d2[31]][_0x18d2[36]]|| null:null,attributes:[[_0x18d2[58],_0x18d2[59]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[37],db[_0x18d2[40]][_0x18d2[39]](_0x18d2[38])),_0x18d2[87]],[db[_0x18d2[40]][_0x18d2[41]](_0x18d2[37],db[_0x18d2[40]][_0x18d2[41]](_0x18d2[43],db[_0x18d2[40]][_0x18d2[45]](_0x18d2[44]))),_0x18d2[88]]],group:[_0x18d2[58]]})[_0x18d2[27]](function(_0xf976x14){logger[_0x18d2[20]](_0x18d2[86],_0xf976x10);logger[_0x18d2[23]](_0x18d2[86],_0xf976x10,JSON[_0x18d2[22]](_0xf976x14));_0xf976x11(_0xf976x14)})[_0x18d2[18]](function(_0xf976x13){logger[_0x18d2[17]](_0x18d2[86],_0xf976x13[_0x18d2[25]],_0xf976x10);_0xf976x12(_0xf976x15[_0x18d2[17]](500,_0xf976x13[_0x18d2[25]]))})})}
\ No newline at end of file
index df56a99..b782aca 100644 (file)
@@ -1 +1 @@
-var _0x30df=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x30df[0];var multer=require(_0x30df[1]);var util=require(_0x30df[2]);var path=require(_0x30df[3]);var express=require(_0x30df[4]);var router=express.Router();var auth=require(_0x30df[5]);var interaction=require(_0x30df[6]);var config=require(_0x30df[7]);var controller=require(_0x30df[8]);router[_0x30df[12]](_0x30df[9],auth[_0x30df[10]](),controller[_0x30df[11]]);router[_0x30df[12]](_0x30df[13],auth[_0x30df[10]](),controller[_0x30df[14]]);router[_0x30df[12]](_0x30df[15],auth[_0x30df[10]](),controller[_0x30df[16]]);router[_0x30df[18]](_0x30df[9],auth[_0x30df[10]](),controller[_0x30df[17]]);router[_0x30df[20]](_0x30df[15],auth[_0x30df[10]](),controller[_0x30df[19]]);module[_0x30df[21]]= router
\ No newline at end of file
+var _0x4f4f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x4f4f[0];var multer=require(_0x4f4f[1]);var util=require(_0x4f4f[2]);var path=require(_0x4f4f[3]);var express=require(_0x4f4f[4]);var router=express.Router();var auth=require(_0x4f4f[5]);var interaction=require(_0x4f4f[6]);var config=require(_0x4f4f[7]);var controller=require(_0x4f4f[8]);router[_0x4f4f[12]](_0x4f4f[9],auth[_0x4f4f[10]](),controller[_0x4f4f[11]]);router[_0x4f4f[12]](_0x4f4f[13],auth[_0x4f4f[10]](),controller[_0x4f4f[14]]);router[_0x4f4f[12]](_0x4f4f[15],auth[_0x4f4f[10]](),controller[_0x4f4f[16]]);router[_0x4f4f[18]](_0x4f4f[9],auth[_0x4f4f[10]](),controller[_0x4f4f[17]]);router[_0x4f4f[20]](_0x4f4f[15],auth[_0x4f4f[10]](),controller[_0x4f4f[19]]);module[_0x4f4f[21]]= router
\ No newline at end of file
index 6763705..6fbe770 100644 (file)
@@ -1 +1 @@
-var _0xa725=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65"];_0xa725[0];var Sequelize=require(_0xa725[1]);module[_0xa725[2]]= {name:{type:Sequelize[_0xa725[3]],unique:_0xa725[4],allowNull:false,validate:{notEmpty:true}},description:{type:Sequelize[_0xa725[3]]},dialPrefix:{type:Sequelize[_0xa725[3]]}}
\ No newline at end of file
+var _0x3525=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65"];_0x3525[0];var Sequelize=require(_0x3525[1]);module[_0x3525[2]]= {name:{type:Sequelize[_0x3525[3]],unique:_0x3525[4],allowNull:false,validate:{notEmpty:true}},description:{type:Sequelize[_0x3525[3]]},dialPrefix:{type:Sequelize[_0x3525[3]]}}
\ No newline at end of file
index f5527d2..9b519d2 100644 (file)
@@ -1 +1 @@
-var _0x59fb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x6D\x4C\x69\x73\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x6D\x4C\x69\x73\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x4C\x69\x73\x74\x49\x64","\x56\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x43\x6F\x6E\x74\x61\x63\x74\x73","\x69\x64\x73","\x6F\x6D\x69\x74","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x63\x66\x5F\x25\x64","\x66\x6F\x72\x6D\x61\x74","\x63\x6F\x6E\x63\x61\x74","\x72\x61\x77","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73\x43\x73\x76","\x6E\x6F\x77","\x2F\x74\x6D\x70\x2F\x6C\x69\x73\x74\x5F\x25\x64\x5F\x25\x73\x2E\x63\x73\x76","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3B\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3D","\x6C\x69\x73\x74\x5F\x25\x64\x5F\x25\x73\x2E\x63\x73\x76","\x73\x65\x74\x48\x65\x61\x64\x65\x72","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65","\x74\x65\x78\x74\x2F\x63\x73\x76","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x61\x64\x64\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x54\x45\x58\x54","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x74\x79\x70\x65","\x74\x65\x78\x74","\x49\x4E\x54\x45\x47\x45\x52","\x6E\x75\x6D\x62\x65\x72","\x42\x4F\x4F\x4C\x45\x41\x4E","\x64\x65\x66\x61\x75\x6C\x74\x56\x61\x6C\x75\x65","\x73\x77\x69\x74\x63\x68","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x63\x66\x5F\x25\x73","\x61\x64\x64\x43\x6F\x6C\x75\x6D\x6E","\x71\x75\x65\x72\x79\x49\x6E\x74\x65\x72\x66\x61\x63\x65","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x61\x64\x64\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x73\x65\x72\x43\x6D\x4C\x69\x73\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x69\x73\x41\x72\x72\x61\x79","\x75\x73\x65\x72\x43\x6D\x4C\x69\x73\x74\x3A\x72\x65\x6D\x6F\x76\x65","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x55\x73\x65\x72"];_0x59fb[0];var jsonpatch=require(_0x59fb[1]);var rp=require(_0x59fb[2]);var moment=require(_0x59fb[3]);var BPromise=require(_0x59fb[4]);var Mustache=require(_0x59fb[5]);var util=require(_0x59fb[6]);var path=require(_0x59fb[7]);var sox=require(_0x59fb[8]);var csv=require(_0x59fb[9]);var ejs=require(_0x59fb[10]);var fs=require(_0x59fb[11]);var _=require(_0x59fb[12]);var squel=require(_0x59fb[13]);var crypto=require(_0x59fb[14]);var jsforce=require(_0x59fb[15]);var deskjs=require(_0x59fb[16]);var toCsv=require(_0x59fb[9]);var querystring=require(_0x59fb[17]);var Papa=require(_0x59fb[18]);var qs=require(_0x59fb[19]);var logger=require(_0x59fb[21])(_0x59fb[20]);var utils=require(_0x59fb[22]);var config=require(_0x59fb[23]);var db=require(_0x59fb[25])[_0x59fb[24]];var socket=require(_0x59fb[27])({host:_0x59fb[26],port:6379});require(_0x59fb[29])[_0x59fb[28]](socket);function respondWithStatusCode(_0xe194x1b,_0xe194x1c){_0xe194x1c= _0xe194x1c|| 204;return function(_0xe194x1d){if(_0xe194x1d){return _0xe194x1b[_0x59fb[30]](_0xe194x1c)};return _0xe194x1b[_0x59fb[32]](_0xe194x1c)[_0x59fb[31]]()}}function respondWithResult(_0xe194x1b,_0xe194x1c){_0xe194x1c= _0xe194x1c|| 200;return function(_0xe194x1d){if(_0xe194x1d){return _0xe194x1b[_0x59fb[32]](_0xe194x1c)[_0x59fb[33]](_0xe194x1d)}}}function respondWithFilteredResult(_0xe194x1b,_0xe194x20){return function(_0xe194x1d){if(_0xe194x1d){var _0xe194x21=_0xe194x1d[_0x59fb[34]],_0xe194x22=_0xe194x20[_0x59fb[35]],_0xe194x23=_0xe194x20[_0x59fb[35]]+ _0xe194x20[_0x59fb[36]],_0xe194x1c;if(_0xe194x23>= _0xe194x21){_0xe194x23= _0xe194x21;_0xe194x1c= 200}else {_0xe194x1c= 206};_0xe194x1b[_0x59fb[32]](_0xe194x1c);return _0xe194x1b[_0x59fb[40]](_0x59fb[37],_0xe194x22+ _0x59fb[38]+ _0xe194x23+ _0x59fb[39]+ _0xe194x21)[_0x59fb[33]](_0xe194x1d)};return null}}function patchUpdates(_0xe194x25){return function(_0xe194x1d){try{jsonpatch[_0x59fb[41]](_0xe194x1d,_0xe194x25,true)}catch(err){return BPromise[_0x59fb[42]](err)};return _0xe194x1d[_0x59fb[43]]()}}function saveUpdates(_0xe194x27,_0xe194x1c){return function(_0xe194x1d){if(_0xe194x1d){return _0xe194x1d[_0x59fb[45]](_0xe194x27)[_0x59fb[44]](function(_0xe194x28){return _0xe194x28})};return null}}function removeEntity(_0xe194x1b,_0xe194x1c){return function(_0xe194x1d){if(_0xe194x1d){return _0xe194x1d[_0x59fb[46]]()[_0x59fb[44]](function(){_0xe194x1b[_0x59fb[32]](204)[_0x59fb[31]]()})}}}function handleEntityNotFound(_0xe194x1b,_0xe194x1c){return function(_0xe194x1d){if(!_0xe194x1d){_0xe194x1b[_0x59fb[30]](404)};return _0xe194x1d}}function handleError(_0xe194x1b,_0xe194x1c){_0xe194x1c= _0xe194x1c|| 500;return function(_0xe194x2c){logger[_0x59fb[48]](_0xe194x2c[_0x59fb[47]]);if(_0xe194x2c[_0x59fb[49]]){delete _0xe194x2c[_0x59fb[49]]};_0xe194x1b[_0x59fb[32]](_0xe194x1c)[_0x59fb[50]](_0xe194x2c)}}exports[_0x59fb[51]]= function(_0xe194x2d,_0xe194x1b){var _0xe194x20={},_0xe194x2e={},_0xe194x2f={count:0,rows:[]};_0xe194x2e[_0x59fb[52]]= _[_0x59fb[55]](db[_0x59fb[54]][_0x59fb[53]]);var _0xe194x30={dateStart:_0xe194x2d[_0x59fb[57]][_0x59fb[56]],dateEnd:_0xe194x2d[_0x59fb[57]][_0x59fb[58]]};delete _0xe194x2d[_0x59fb[57]][_0x59fb[56]];delete _0xe194x2d[_0x59fb[57]][_0x59fb[58]];_0xe194x2e[_0x59fb[57]]= _[_0x59fb[55]](_0xe194x2d[_0x59fb[57]]);_0xe194x2e[_0x59fb[59]]= _[_0x59fb[60]](_0xe194x2e[_0x59fb[52]],_0xe194x2e[_0x59fb[57]]);_0xe194x20[_0x59fb[61]]= _[_0x59fb[60]](_0xe194x2e[_0x59fb[52]],qs[_0x59fb[62]](_0xe194x2d[_0x59fb[57]][_0x59fb[62]]));_0xe194x20[_0x59fb[61]]= (_0xe194x20[_0x59fb[61]][_0x59fb[63]])?_0xe194x20[_0x59fb[61]]:_0xe194x2e[_0x59fb[52]];if(!_0xe194x2d[_0x59fb[57]][_0x59fb[65]](_0x59fb[64])){_0xe194x20[_0x59fb[36]]= qs[_0x59fb[36]](_0xe194x2d[_0x59fb[57]][_0x59fb[36]]);_0xe194x20[_0x59fb[35]]= qs[_0x59fb[35]](_0xe194x2d[_0x59fb[57]][_0x59fb[35]])};_0xe194x20[_0x59fb[66]]= qs[_0x59fb[67]](_0xe194x2d[_0x59fb[57]][_0x59fb[67]]);_0xe194x20[_0x59fb[68]]= qs[_0x59fb[59]](_[_0x59fb[69]](_0xe194x2d[_0x59fb[57]],_0xe194x2e[_0x59fb[59]]));if(_0xe194x30[_0x59fb[56]]){if(_0xe194x30[_0x59fb[58]]){_0xe194x30[_0x59fb[58]]= moment(_0xe194x30[_0x59fb[58]])[_0x59fb[71]](1,_0x59fb[70])}else {_0xe194x30[_0x59fb[58]]= moment(_0xe194x30[_0x59fb[56]])[_0x59fb[71]](1,_0x59fb[70])};_[_0x59fb[72]](_0xe194x20[_0x59fb[68]],{createdAt:{$gte:_0xe194x30[_0x59fb[56]],$lte:_0xe194x30[_0x59fb[58]]}})};if(_0xe194x2d[_0x59fb[57]][_0x59fb[73]]){_0xe194x20[_0x59fb[68]]= _[_0x59fb[72]](_0xe194x20[_0x59fb[68]],{$or:_[_0x59fb[75]](_0xe194x20[_0x59fb[61]],function(_0xe194x31){var _0xe194x2f={};_0xe194x2f[_0xe194x31]= {$like:_0x59fb[74]+ _0xe194x2d[_0x59fb[57]][_0x59fb[73]]+ _0x59fb[74]};return _0xe194x2f})})};_0xe194x20= _[_0x59fb[72]]({},_0xe194x20,_0xe194x2d[_0x59fb[76]]);var _0xe194x32={where:_0xe194x20[_0x59fb[68]]};return db[_0x59fb[54]][_0x59fb[34]](_0xe194x32)[_0x59fb[44]](function(_0xe194x21){_0xe194x2f[_0x59fb[34]]= _0xe194x21;if(_0xe194x2d[_0x59fb[57]][_0x59fb[79]]){_0xe194x20[_0x59fb[80]]= [{all:true}]};return db[_0x59fb[54]][_0x59fb[81]](_0xe194x20)})[_0x59fb[44]](function(_0xe194x33){_0xe194x2f[_0x59fb[78]]= _0xe194x33;return _0xe194x2f})[_0x59fb[44]](respondWithFilteredResult(_0xe194x1b,_0xe194x20))[_0x59fb[77]](handleError(_0xe194x1b,null))};exports[_0x59fb[82]]= function(_0xe194x2d,_0xe194x1b){var _0xe194x20={raw:false,where:{id:_0xe194x2d[_0x59fb[84]][_0x59fb[83]]}},_0xe194x2e={};_0xe194x2e[_0x59fb[52]]= _[_0x59fb[55]](db[_0x59fb[54]][_0x59fb[53]]);_0xe194x2e[_0x59fb[57]]= _[_0x59fb[55]](_0xe194x2d[_0x59fb[57]]);_0xe194x2e[_0x59fb[59]]= _[_0x59fb[60]](_0xe194x2e[_0x59fb[52]],_0xe194x2e[_0x59fb[57]]);_0xe194x20[_0x59fb[61]]= _[_0x59fb[60]](_0xe194x2e[_0x59fb[52]],qs[_0x59fb[62]](_0xe194x2d[_0x59fb[57]][_0x59fb[62]]));_0xe194x20[_0x59fb[61]]= (_0xe194x20[_0x59fb[61]][_0x59fb[63]])?_0xe194x20[_0x59fb[61]]:_0xe194x2e[_0x59fb[52]];if(_0xe194x2d[_0x59fb[57]][_0x59fb[79]]){_0xe194x20[_0x59fb[80]]= [{all:true}]};_0xe194x20= _[_0x59fb[72]]({},_0xe194x20,_0xe194x2d[_0x59fb[76]]);return db[_0x59fb[54]][_0x59fb[85]](_0xe194x20)[_0x59fb[44]](handleEntityNotFound(_0xe194x1b,null))[_0x59fb[44]](respondWithResult(_0xe194x1b,null))[_0x59fb[77]](handleError(_0xe194x1b,null))};exports[_0x59fb[86]]= function(_0xe194x2d,_0xe194x1b){return db[_0x59fb[54]][_0x59fb[86]](_0xe194x2d[_0x59fb[87]],{})[_0x59fb[44]](respondWithResult(_0xe194x1b,201))[_0x59fb[77]](handleError(_0xe194x1b,null))};exports[_0x59fb[45]]= function(_0xe194x2d,_0xe194x1b){if(_0xe194x2d[_0x59fb[87]][_0x59fb[83]]){delete _0xe194x2d[_0x59fb[87]][_0x59fb[83]]};return db[_0x59fb[54]][_0x59fb[85]]({where:{id:_0xe194x2d[_0x59fb[84]][_0x59fb[83]]}})[_0x59fb[44]](handleEntityNotFound(_0xe194x1b,null))[_0x59fb[44]](saveUpdates(_0xe194x2d[_0x59fb[87]],null))[_0x59fb[44]](respondWithResult(_0xe194x1b,null))[_0x59fb[77]](handleError(_0xe194x1b,null))};exports[_0x59fb[46]]= function(_0xe194x2d,_0xe194x1b){return db[_0x59fb[54]][_0x59fb[85]]({where:{id:_0xe194x2d[_0x59fb[84]][_0x59fb[83]]}})[_0x59fb[44]](handleEntityNotFound(_0xe194x1b,null))[_0x59fb[44]](removeEntity(_0xe194x1b,null))[_0x59fb[77]](handleError(_0xe194x1b,null))};exports[_0x59fb[88]]= function(_0xe194x2d,_0xe194x1b,_0xe194x34){if(_0xe194x2d[_0x59fb[87]][_0x59fb[83]]){delete _0xe194x2d[_0x59fb[87]][_0x59fb[83]]};return db[_0x59fb[54]][_0x59fb[85]]({where:{id:_0xe194x2d[_0x59fb[84]][_0x59fb[83]]}})[_0x59fb[44]](handleEntityNotFound(_0xe194x1b,null))[_0x59fb[44]](function(_0xe194x1d){if(_0xe194x1d){_0xe194x2d[_0x59fb[87]][_0x59fb[89]]= _0xe194x1d[_0x59fb[83]];return db[_0x59fb[90]][_0x59fb[86]](_0xe194x2d[_0x59fb[87]])}})[_0x59fb[44]](respondWithResult(_0xe194x1b,null))[_0x59fb[77]](handleError(_0xe194x1b,null))};exports[_0x59fb[91]]= function(_0xe194x2d,_0xe194x1d,_0xe194x34){var _0xe194x20={};var _0xe194x2e={};var _0xe194x35;var _0xe194x21;return db[_0x59fb[54]][_0x59fb[92]]({where:{id:_0xe194x2d[_0x59fb[84]][_0x59fb[83]]}})[_0x59fb[44]](handleEntityNotFound(_0xe194x1d,null))[_0x59fb[44]](function(_0xe194x1d){if(_0xe194x1d){_0xe194x35= _0xe194x1d;_0xe194x2e[_0x59fb[52]]= _[_0x59fb[55]](db[_0x59fb[90]][_0x59fb[53]]);_0xe194x2e[_0x59fb[57]]= _[_0x59fb[55]](_0xe194x2d[_0x59fb[57]]);_0xe194x2e[_0x59fb[59]]= _[_0x59fb[60]](_0xe194x2e[_0x59fb[52]],_0xe194x2e[_0x59fb[57]]);_0xe194x20[_0x59fb[61]]= _[_0x59fb[60]](_0xe194x2e[_0x59fb[52]],qs[_0x59fb[62]](_0xe194x2d[_0x59fb[57]][_0x59fb[62]]));_0xe194x20[_0x59fb[61]]= (_0xe194x20[_0x59fb[61]][_0x59fb[63]])?_0xe194x20[_0x59fb[61]]:_0xe194x2e[_0x59fb[52]];_0xe194x20[_0x59fb[66]]= qs[_0x59fb[67]](_0xe194x2d[_0x59fb[57]][_0x59fb[67]]);_0xe194x20[_0x59fb[68]]= qs[_0x59fb[59]](_[_0x59fb[69]](_0xe194x2d[_0x59fb[57]],_0xe194x2e[_0x59fb[59]]));if(_0xe194x2d[_0x59fb[57]][_0x59fb[73]]){_0xe194x20[_0x59fb[68]]= _[_0x59fb[72]](_0xe194x20[_0x59fb[68]],{$or:_[_0x59fb[75]](_0xe194x20[_0x59fb[61]],function(_0xe194x31){var _0xe194x2f={};_0xe194x2f[_0xe194x31]= {$like:_0x59fb[74]+ _0xe194x2d[_0x59fb[57]][_0x59fb[73]]+ _0x59fb[74]};return _0xe194x2f})})};_0xe194x20= _[_0x59fb[72]]({},_0xe194x20,_0xe194x2d[_0x59fb[76]]);return _0xe194x35[_0x59fb[91]](_0xe194x20)}})[_0x59fb[44]](function(_0xe194x36){if(_0xe194x36){_0xe194x21= _0xe194x36[_0x59fb[63]];if(!_0xe194x2d[_0x59fb[57]][_0x59fb[65]](_0x59fb[64])){_0xe194x20[_0x59fb[36]]= qs[_0x59fb[36]](_0xe194x2d[_0x59fb[57]][_0x59fb[36]]);_0xe194x20[_0x59fb[35]]= qs[_0x59fb[35]](_0xe194x2d[_0x59fb[57]][_0x59fb[35]])};return _0xe194x35[_0x59fb[91]](_0xe194x20)}})[_0x59fb[44]](function(_0xe194x33){if(_0xe194x33){return _0xe194x33?{count:_0xe194x21,rows:_0xe194x33}:null}})[_0x59fb[44]](respondWithResult(_0xe194x1d,null))[_0x59fb[77]](handleError(_0xe194x1d,null))};exports[_0x59fb[93]]= function(_0xe194x2d,_0xe194x1b,_0xe194x34){return db[_0x59fb[54]][_0x59fb[85]]({where:{id:_0xe194x2d[_0x59fb[84]][_0x59fb[83]]}})[_0x59fb[44]](handleEntityNotFound(_0xe194x1b,null))[_0x59fb[44]](function(_0xe194x1d){if(_0xe194x1d){return _0xe194x1d[_0x59fb[93]](_0xe194x2d[_0x59fb[87]][_0x59fb[94]],_[_0x59fb[95]](_0xe194x2d[_0x59fb[87]],[_0x59fb[94],_0x59fb[83]])|| {})}})[_0x59fb[44]](respondWithResult(_0xe194x1b,null))[_0x59fb[77]](handleError(_0xe194x1b,null))};exports[_0x59fb[96]]= function(_0xe194x2d,_0xe194x1b,_0xe194x34){var _0xe194x37;return db[_0x59fb[54]][_0x59fb[85]]({where:{id:_0xe194x2d[_0x59fb[84]][_0x59fb[83]]},include:[{model:db[_0x59fb[102]],as:_0x59fb[103]}]})[_0x59fb[44]](handleEntityNotFound(_0xe194x1b,null))[_0x59fb[44]](function(_0xe194x1d){if(_0xe194x1d){_0xe194x37= _0xe194x1d;return db[_0x59fb[101]][_0x59fb[53]]}})[_0x59fb[44]](function(_0xe194x1d){if(_0xe194x1d){var _0xe194x20={};var _0xe194x2e={};_0xe194x2e[_0x59fb[52]]= _[_0x59fb[99]](_[_0x59fb[55]](_0xe194x1d),_[_0x59fb[75]](_0xe194x37.CustomFields,function(_0xe194x38){return util[_0x59fb[98]](_0x59fb[97],_0xe194x38[_0x59fb[83]])}));_0xe194x2e[_0x59fb[57]]= _[_0x59fb[55]](_0xe194x2d[_0x59fb[57]]);_0xe194x2e[_0x59fb[59]]= _[_0x59fb[60]](_0xe194x2e[_0x59fb[52]],_0xe194x2e[_0x59fb[57]]);_0xe194x20[_0x59fb[61]]= _[_0x59fb[60]](_0xe194x2e[_0x59fb[52]],qs[_0x59fb[62]](_0xe194x2d[_0x59fb[57]][_0x59fb[62]]));_0xe194x20[_0x59fb[61]]= (_0xe194x20[_0x59fb[61]][_0x59fb[63]])?_0xe194x20[_0x59fb[61]]:_0xe194x2e[_0x59fb[52]];_0xe194x20[_0x59fb[36]]= qs[_0x59fb[36]](_0xe194x2d[_0x59fb[57]][_0x59fb[36]]);_0xe194x20[_0x59fb[35]]= qs[_0x59fb[35]](_0xe194x2d[_0x59fb[57]][_0x59fb[35]]);_0xe194x20[_0x59fb[66]]= qs[_0x59fb[67]](_0xe194x2d[_0x59fb[57]][_0x59fb[67]]);_0xe194x20[_0x59fb[68]]= qs[_0x59fb[59]](_[_0x59fb[69]](_0xe194x2d[_0x59fb[57]],_0xe194x2e[_0x59fb[59]]));_0xe194x20[_0x59fb[100]]= true;if(_0xe194x2d[_0x59fb[57]][_0x59fb[73]]){_0xe194x20[_0x59fb[68]]= _[_0x59fb[72]](_0xe194x20[_0x59fb[68]],{$or:_[_0x59fb[75]](_0xe194x20[_0x59fb[61]],function(_0xe194x31){var _0xe194x2f={};_0xe194x2f[_0xe194x31]= {$like:_0x59fb[74]+ _0xe194x2d[_0x59fb[57]][_0x59fb[73]]+ _0x59fb[74]};return _0xe194x2f})})};_0xe194x20= _[_0x59fb[72]]({},_0xe194x20,_0xe194x2d[_0x59fb[76]]);return _0xe194x37[_0x59fb[96]](_0xe194x20)}})[_0x59fb[44]](respondWithResult(_0xe194x1b,null))[_0x59fb[77]](handleError(_0xe194x1b,null))};exports[_0x59fb[104]]= function(_0xe194x2d,_0xe194x1b,_0xe194x34){var _0xe194x37;return db[_0x59fb[54]][_0x59fb[85]]({where:{id:_0xe194x2d[_0x59fb[84]][_0x59fb[83]]},include:[{model:db[_0x59fb[102]],as:_0x59fb[103]}]})[_0x59fb[44]](handleEntityNotFound(_0xe194x1b,null))[_0x59fb[44]](function(_0xe194x1d){if(_0xe194x1d){_0xe194x37= _0xe194x1d;return db[_0x59fb[101]][_0x59fb[53]]}})[_0x59fb[44]](function(_0xe194x1d){if(_0xe194x1d){var _0xe194x20={};var _0xe194x2e={};_0xe194x2e[_0x59fb[52]]= _[_0x59fb[99]](_[_0x59fb[55]](_0xe194x1d),_[_0x59fb[75]](_0xe194x37.CustomFields,function(_0xe194x38){return util[_0x59fb[98]](_0x59fb[97],_0xe194x38[_0x59fb[83]])}));_0xe194x2e[_0x59fb[57]]= _[_0x59fb[55]](_0xe194x2d[_0x59fb[57]]);_0xe194x2e[_0x59fb[59]]= _[_0x59fb[60]](_0xe194x2e[_0x59fb[52]],_0xe194x2e[_0x59fb[57]]);_0xe194x20[_0x59fb[61]]= _[_0x59fb[60]](_0xe194x2e[_0x59fb[52]],qs[_0x59fb[62]](_0xe194x2d[_0x59fb[57]][_0x59fb[62]]));_0xe194x20[_0x59fb[61]]= (_0xe194x20[_0x59fb[61]][_0x59fb[63]])?_0xe194x20[_0x59fb[61]]:_0xe194x2e[_0x59fb[52]];_0xe194x20[_0x59fb[36]]= qs[_0x59fb[36]](_0xe194x2d[_0x59fb[57]][_0x59fb[36]]);_0xe194x20[_0x59fb[35]]= qs[_0x59fb[35]](_0xe194x2d[_0x59fb[57]][_0x59fb[35]]);_0xe194x20[_0x59fb[66]]= qs[_0x59fb[67]](_0xe194x2d[_0x59fb[57]][_0x59fb[67]]);_0xe194x20[_0x59fb[68]]= qs[_0x59fb[59]](_[_0x59fb[69]](_0xe194x2d[_0x59fb[57]],_0xe194x2e[_0x59fb[59]]));_0xe194x20[_0x59fb[100]]= true;if(_0xe194x2d[_0x59fb[57]][_0x59fb[73]]){_0xe194x20[_0x59fb[68]]= _[_0x59fb[72]](_0xe194x20[_0x59fb[68]],{$or:_[_0x59fb[75]](_0xe194x20[_0x59fb[61]],function(_0xe194x31){var _0xe194x2f={};_0xe194x2f[_0xe194x31]= {$like:_0x59fb[74]+ _0xe194x2d[_0x59fb[57]][_0x59fb[73]]+ _0x59fb[74]};return _0xe194x2f})})};_0xe194x20= _[_0x59fb[72]]({},_0xe194x20,_0xe194x2d[_0x59fb[76]]);return _0xe194x37[_0x59fb[96]](_0xe194x20)}})[_0x59fb[44]](function(_0xe194x39){if(_0xe194x39){var _0xe194x3a=toCsv(_0xe194x39);var _0xe194x3b=Date[_0x59fb[105]]();fs[_0x59fb[107]](util[_0x59fb[98]](_0x59fb[106],_0xe194x37[_0x59fb[83]],_0xe194x3b),_0xe194x3a);_0xe194x1b[_0x59fb[111]](_0x59fb[108],_0x59fb[109]+ util[_0x59fb[98]](_0x59fb[110],_0xe194x37[_0x59fb[83]],_0xe194x3b));_0xe194x1b[_0x59fb[111]](_0x59fb[112],_0x59fb[113]);_0xe194x1b[_0x59fb[114]](util[_0x59fb[98]](_0x59fb[106],_0xe194x37[_0x59fb[83]],_0xe194x3b))}})[_0x59fb[77]](handleError(_0xe194x1b,null))};exports[_0x59fb[115]]= function(_0xe194x2d,_0xe194x1b,_0xe194x34){var _0xe194x3c;delete _0xe194x2d[_0x59fb[87]][_0x59fb[83]];return db[_0x59fb[54]][_0x59fb[92]]({where:{id:_0xe194x2d[_0x59fb[84]][_0x59fb[83]]}})[_0x59fb[44]](handleEntityNotFound(_0xe194x1b,null))[_0x59fb[44]](function(_0xe194x37){if(_0xe194x37){return db[_0x59fb[129]][_0x59fb[131]](function(_0xe194x3d){return db[_0x59fb[102]][_0x59fb[86]](_0xe194x2d[_0x59fb[87]],{transaction:_0xe194x3d})[_0x59fb[44]](function(_0xe194x3f){_0xe194x3c= _0xe194x3f;return _0xe194x37[_0x59fb[130]](_0xe194x3f,{transaction:_0xe194x3d})})[_0x59fb[44]](function(){var _0xe194x3e={type:db[_0x59fb[117]][_0x59fb[116]],transaction:_0xe194x3d};switch(_0xe194x2d[_0x59fb[87]][_0x59fb[118]]){case _0x59fb[119]:_0xe194x3e[_0x59fb[118]]= db[_0x59fb[117]][_0x59fb[116]];break;case _0x59fb[121]:_0xe194x3e[_0x59fb[118]]= db[_0x59fb[117]][_0x59fb[120]];break;case _0x59fb[124]:_0xe194x3e[_0x59fb[118]]= db[_0x59fb[117]][_0x59fb[122]];_0xe194x3e[_0x59fb[123]]= false;break;default:};return db[_0x59fb[129]][_0x59fb[128]][_0x59fb[127]](_0x59fb[125],util[_0x59fb[98]](_0x59fb[126],_0xe194x3c[_0x59fb[83]]),_0xe194x3e)})[_0x59fb[44]](function(){return _0xe194x3c})})}})[_0x59fb[44]](respondWithResult(_0xe194x1b,null))[_0x59fb[77]](handleError(_0xe194x1b,null))};exports[_0x59fb[132]]= function(_0xe194x2d,_0xe194x1d,_0xe194x34){var _0xe194x20={};var _0xe194x2e={};var _0xe194x35;var _0xe194x21;return db[_0x59fb[54]][_0x59fb[92]]({where:{id:_0xe194x2d[_0x59fb[84]][_0x59fb[83]]}})[_0x59fb[44]](handleEntityNotFound(_0xe194x1d,null))[_0x59fb[44]](function(_0xe194x1d){if(_0xe194x1d){_0xe194x35= _0xe194x1d;_0xe194x2e[_0x59fb[52]]= _[_0x59fb[55]](db[_0x59fb[102]][_0x59fb[53]]);_0xe194x2e[_0x59fb[57]]= _[_0x59fb[55]](_0xe194x2d[_0x59fb[57]]);_0xe194x2e[_0x59fb[59]]= _[_0x59fb[60]](_0xe194x2e[_0x59fb[52]],_0xe194x2e[_0x59fb[57]]);_0xe194x20[_0x59fb[61]]= _[_0x59fb[60]](_0xe194x2e[_0x59fb[52]],qs[_0x59fb[62]](_0xe194x2d[_0x59fb[57]][_0x59fb[62]]));_0xe194x20[_0x59fb[61]]= (_0xe194x20[_0x59fb[61]][_0x59fb[63]])?_0xe194x20[_0x59fb[61]]:_0xe194x2e[_0x59fb[52]];_0xe194x20[_0x59fb[66]]= qs[_0x59fb[67]](_0xe194x2d[_0x59fb[57]][_0x59fb[67]]);_0xe194x20[_0x59fb[68]]= qs[_0x59fb[59]](_[_0x59fb[69]](_0xe194x2d[_0x59fb[57]],_0xe194x2e[_0x59fb[59]]));_0xe194x20[_0x59fb[68]]= _[_0x59fb[72]](_0xe194x20[_0x59fb[68]],{$or:[{ListId:_0xe194x1d[_0x59fb[83]]},{ListId:null}]});if(_0xe194x2d[_0x59fb[57]][_0x59fb[73]]){_0xe194x20[_0x59fb[68]]= _[_0x59fb[72]](_0xe194x20[_0x59fb[68]],{$or:_[_0x59fb[75]](_0xe194x20[_0x59fb[61]],function(_0xe194x31){var _0xe194x2f={};_0xe194x2f[_0xe194x31]= {$like:_0x59fb[74]+ _0xe194x2d[_0x59fb[57]][_0x59fb[73]]+ _0x59fb[74]};return _0xe194x2f})})};_0xe194x20= _[_0x59fb[72]]({},_0xe194x20,_0xe194x2d[_0x59fb[76]]);return db[_0x59fb[102]][_0x59fb[133]](_0xe194x20)}})[_0x59fb[44]](respondWithResult(_0xe194x1d,null))[_0x59fb[77]](handleError(_0xe194x1d,null))};exports[_0x59fb[134]]= function(_0xe194x2d,_0xe194x1b,_0xe194x34){return db[_0x59fb[54]][_0x59fb[85]]({where:{id:_0xe194x2d[_0x59fb[84]][_0x59fb[83]]}})[_0x59fb[44]](handleEntityNotFound(_0xe194x1b,null))[_0x59fb[44]](function(_0xe194x1d){if(_0xe194x1d){return _0xe194x1d[_0x59fb[134]](_0xe194x2d[_0x59fb[87]][_0x59fb[94]],_[_0x59fb[95]](_0xe194x2d[_0x59fb[87]],[_0x59fb[94],_0x59fb[83]])|| {})[_0x59fb[137]](function(_0xe194x36){for(var _0xe194x40=0;_0xe194x40< _0xe194x2d[_0x59fb[87]][_0x59fb[94]][_0x59fb[63]];_0xe194x40+= 1){socket[_0x59fb[136]](_0x59fb[135],{UserId:_0xe194x2d[_0x59fb[87]][_0x59fb[94]][_0xe194x40],CmListId:_0xe194x2d[_0x59fb[84]][_0x59fb[83]]})};return _0xe194x36})}})[_0x59fb[44]](respondWithResult(_0xe194x1b,null))[_0x59fb[77]](handleError(_0xe194x1b,null))};exports[_0x59fb[138]]= function(_0xe194x2d,_0xe194x1b,_0xe194x34){var _0xe194x36;return db[_0x59fb[54]][_0x59fb[85]]({where:{id:_0xe194x2d[_0x59fb[84]][_0x59fb[83]]}})[_0x59fb[44]](handleEntityNotFound(_0xe194x1b,null))[_0x59fb[44]](function(_0xe194x1d){if(_0xe194x1d){return _0xe194x1d[_0x59fb[138]](_0xe194x2d[_0x59fb[57]][_0x59fb[94]])[_0x59fb[44]](function(_0xe194x36){if(_[_0x59fb[139]](_0xe194x2d[_0x59fb[57]][_0x59fb[94]])){for(var _0xe194x40=0;_0xe194x40< _0xe194x2d[_0x59fb[57]][_0x59fb[94]][_0x59fb[63]];_0xe194x40+= 1){socket[_0x59fb[136]](_0x59fb[140],{UserId:_0xe194x2d[_0x59fb[57]][_0x59fb[94]][_0xe194x40],CmListId:_0xe194x2d[_0x59fb[84]][_0x59fb[83]]})}}else {socket[_0x59fb[136]](_0x59fb[140],{UserId:_0xe194x2d[_0x59fb[57]][_0x59fb[94]],CmListId:_0xe194x2d[_0x59fb[84]][_0x59fb[83]]})}})}})[_0x59fb[44]](respondWithStatusCode(_0xe194x1b,null))[_0x59fb[77]](handleError(_0xe194x1b,null))};exports[_0x59fb[141]]= function(_0xe194x2d,_0xe194x1d,_0xe194x34){var _0xe194x20={};var _0xe194x2e={};var _0xe194x35;var _0xe194x21;return db[_0x59fb[54]][_0x59fb[92]]({where:{id:_0xe194x2d[_0x59fb[84]][_0x59fb[83]]}})[_0x59fb[44]](handleEntityNotFound(_0xe194x1d,null))[_0x59fb[44]](function(_0xe194x1d){if(_0xe194x1d){_0xe194x35= _0xe194x1d;_0xe194x2e[_0x59fb[52]]= _[_0x59fb[55]](db[_0x59fb[142]][_0x59fb[53]]);_0xe194x2e[_0x59fb[57]]= _[_0x59fb[55]](_0xe194x2d[_0x59fb[57]]);_0xe194x2e[_0x59fb[59]]= _[_0x59fb[60]](_0xe194x2e[_0x59fb[52]],_0xe194x2e[_0x59fb[57]]);_0xe194x20[_0x59fb[61]]= _[_0x59fb[60]](_0xe194x2e[_0x59fb[52]],qs[_0x59fb[62]](_0xe194x2d[_0x59fb[57]][_0x59fb[62]]));_0xe194x20[_0x59fb[61]]= (_0xe194x20[_0x59fb[61]][_0x59fb[63]])?_0xe194x20[_0x59fb[61]]:_0xe194x2e[_0x59fb[52]];_0xe194x20[_0x59fb[66]]= qs[_0x59fb[67]](_0xe194x2d[_0x59fb[57]][_0x59fb[67]]);_0xe194x20[_0x59fb[68]]= qs[_0x59fb[59]](_[_0x59fb[69]](_0xe194x2d[_0x59fb[57]],_0xe194x2e[_0x59fb[59]]));if(_0xe194x2d[_0x59fb[57]][_0x59fb[73]]){_0xe194x20[_0x59fb[68]]= _[_0x59fb[72]](_0xe194x20[_0x59fb[68]],{$or:_[_0x59fb[75]](_0xe194x20[_0x59fb[61]],function(_0xe194x31){var _0xe194x2f={};_0xe194x2f[_0xe194x31]= {$like:_0x59fb[74]+ _0xe194x2d[_0x59fb[57]][_0x59fb[73]]+ _0x59fb[74]};return _0xe194x2f})})};_0xe194x20= _[_0x59fb[72]]({},_0xe194x20,_0xe194x2d[_0x59fb[76]]);return _0xe194x35[_0x59fb[141]](_0xe194x20)}})[_0x59fb[44]](function(_0xe194x36){if(_0xe194x36){_0xe194x21= _0xe194x36[_0x59fb[63]];if(!_0xe194x2d[_0x59fb[57]][_0x59fb[65]](_0x59fb[64])){_0xe194x20[_0x59fb[36]]= qs[_0x59fb[36]](_0xe194x2d[_0x59fb[57]][_0x59fb[36]]);_0xe194x20[_0x59fb[35]]= qs[_0x59fb[35]](_0xe194x2d[_0x59fb[57]][_0x59fb[35]])};return _0xe194x35[_0x59fb[141]](_0xe194x20)}})[_0x59fb[44]](function(_0xe194x33){if(_0xe194x33){return _0xe194x33?{count:_0xe194x21,rows:_0xe194x33}:null}})[_0x59fb[44]](respondWithResult(_0xe194x1d,null))[_0x59fb[77]](handleError(_0xe194x1d,null))}
\ No newline at end of file
+var _0x3264=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x6D\x4C\x69\x73\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x6D\x4C\x69\x73\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x4C\x69\x73\x74\x49\x64","\x56\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x43\x6F\x6E\x74\x61\x63\x74\x73","\x69\x64\x73","\x6F\x6D\x69\x74","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x63\x66\x5F\x25\x64","\x66\x6F\x72\x6D\x61\x74","\x63\x6F\x6E\x63\x61\x74","\x72\x61\x77","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73\x43\x73\x76","\x6E\x6F\x77","\x2F\x74\x6D\x70\x2F\x6C\x69\x73\x74\x5F\x25\x64\x5F\x25\x73\x2E\x63\x73\x76","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3B\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3D","\x6C\x69\x73\x74\x5F\x25\x64\x5F\x25\x73\x2E\x63\x73\x76","\x73\x65\x74\x48\x65\x61\x64\x65\x72","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65","\x74\x65\x78\x74\x2F\x63\x73\x76","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x61\x64\x64\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x54\x45\x58\x54","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x74\x79\x70\x65","\x74\x65\x78\x74","\x49\x4E\x54\x45\x47\x45\x52","\x6E\x75\x6D\x62\x65\x72","\x42\x4F\x4F\x4C\x45\x41\x4E","\x64\x65\x66\x61\x75\x6C\x74\x56\x61\x6C\x75\x65","\x73\x77\x69\x74\x63\x68","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x63\x66\x5F\x25\x73","\x61\x64\x64\x43\x6F\x6C\x75\x6D\x6E","\x71\x75\x65\x72\x79\x49\x6E\x74\x65\x72\x66\x61\x63\x65","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x61\x64\x64\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x73\x65\x72\x43\x6D\x4C\x69\x73\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x69\x73\x41\x72\x72\x61\x79","\x75\x73\x65\x72\x43\x6D\x4C\x69\x73\x74\x3A\x72\x65\x6D\x6F\x76\x65","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x55\x73\x65\x72"];_0x3264[0];var jsonpatch=require(_0x3264[1]);var rp=require(_0x3264[2]);var moment=require(_0x3264[3]);var BPromise=require(_0x3264[4]);var Mustache=require(_0x3264[5]);var util=require(_0x3264[6]);var path=require(_0x3264[7]);var sox=require(_0x3264[8]);var csv=require(_0x3264[9]);var ejs=require(_0x3264[10]);var fs=require(_0x3264[11]);var _=require(_0x3264[12]);var squel=require(_0x3264[13]);var crypto=require(_0x3264[14]);var jsforce=require(_0x3264[15]);var deskjs=require(_0x3264[16]);var toCsv=require(_0x3264[9]);var querystring=require(_0x3264[17]);var Papa=require(_0x3264[18]);var qs=require(_0x3264[19]);var logger=require(_0x3264[21])(_0x3264[20]);var utils=require(_0x3264[22]);var config=require(_0x3264[23]);var db=require(_0x3264[25])[_0x3264[24]];var socket=require(_0x3264[27])({host:_0x3264[26],port:6379});require(_0x3264[29])[_0x3264[28]](socket);function respondWithStatusCode(_0xe653x1b,_0xe653x1c){_0xe653x1c= _0xe653x1c|| 204;return function(_0xe653x1d){if(_0xe653x1d){return _0xe653x1b[_0x3264[30]](_0xe653x1c)};return _0xe653x1b[_0x3264[32]](_0xe653x1c)[_0x3264[31]]()}}function respondWithResult(_0xe653x1b,_0xe653x1c){_0xe653x1c= _0xe653x1c|| 200;return function(_0xe653x1d){if(_0xe653x1d){return _0xe653x1b[_0x3264[32]](_0xe653x1c)[_0x3264[33]](_0xe653x1d)}}}function respondWithFilteredResult(_0xe653x1b,_0xe653x20){return function(_0xe653x1d){if(_0xe653x1d){var _0xe653x21=_0xe653x1d[_0x3264[34]],_0xe653x22=_0xe653x20[_0x3264[35]],_0xe653x23=_0xe653x20[_0x3264[35]]+ _0xe653x20[_0x3264[36]],_0xe653x1c;if(_0xe653x23>= _0xe653x21){_0xe653x23= _0xe653x21;_0xe653x1c= 200}else {_0xe653x1c= 206};_0xe653x1b[_0x3264[32]](_0xe653x1c);return _0xe653x1b[_0x3264[40]](_0x3264[37],_0xe653x22+ _0x3264[38]+ _0xe653x23+ _0x3264[39]+ _0xe653x21)[_0x3264[33]](_0xe653x1d)};return null}}function patchUpdates(_0xe653x25){return function(_0xe653x1d){try{jsonpatch[_0x3264[41]](_0xe653x1d,_0xe653x25,true)}catch(err){return BPromise[_0x3264[42]](err)};return _0xe653x1d[_0x3264[43]]()}}function saveUpdates(_0xe653x27,_0xe653x1c){return function(_0xe653x1d){if(_0xe653x1d){return _0xe653x1d[_0x3264[45]](_0xe653x27)[_0x3264[44]](function(_0xe653x28){return _0xe653x28})};return null}}function removeEntity(_0xe653x1b,_0xe653x1c){return function(_0xe653x1d){if(_0xe653x1d){return _0xe653x1d[_0x3264[46]]()[_0x3264[44]](function(){_0xe653x1b[_0x3264[32]](204)[_0x3264[31]]()})}}}function handleEntityNotFound(_0xe653x1b,_0xe653x1c){return function(_0xe653x1d){if(!_0xe653x1d){_0xe653x1b[_0x3264[30]](404)};return _0xe653x1d}}function handleError(_0xe653x1b,_0xe653x1c){_0xe653x1c= _0xe653x1c|| 500;return function(_0xe653x2c){logger[_0x3264[48]](_0xe653x2c[_0x3264[47]]);if(_0xe653x2c[_0x3264[49]]){delete _0xe653x2c[_0x3264[49]]};_0xe653x1b[_0x3264[32]](_0xe653x1c)[_0x3264[50]](_0xe653x2c)}}exports[_0x3264[51]]= function(_0xe653x2d,_0xe653x1b){var _0xe653x20={},_0xe653x2e={},_0xe653x2f={count:0,rows:[]};_0xe653x2e[_0x3264[52]]= _[_0x3264[55]](db[_0x3264[54]][_0x3264[53]]);var _0xe653x30={dateStart:_0xe653x2d[_0x3264[57]][_0x3264[56]],dateEnd:_0xe653x2d[_0x3264[57]][_0x3264[58]]};delete _0xe653x2d[_0x3264[57]][_0x3264[56]];delete _0xe653x2d[_0x3264[57]][_0x3264[58]];_0xe653x2e[_0x3264[57]]= _[_0x3264[55]](_0xe653x2d[_0x3264[57]]);_0xe653x2e[_0x3264[59]]= _[_0x3264[60]](_0xe653x2e[_0x3264[52]],_0xe653x2e[_0x3264[57]]);_0xe653x20[_0x3264[61]]= _[_0x3264[60]](_0xe653x2e[_0x3264[52]],qs[_0x3264[62]](_0xe653x2d[_0x3264[57]][_0x3264[62]]));_0xe653x20[_0x3264[61]]= (_0xe653x20[_0x3264[61]][_0x3264[63]])?_0xe653x20[_0x3264[61]]:_0xe653x2e[_0x3264[52]];if(!_0xe653x2d[_0x3264[57]][_0x3264[65]](_0x3264[64])){_0xe653x20[_0x3264[36]]= qs[_0x3264[36]](_0xe653x2d[_0x3264[57]][_0x3264[36]]);_0xe653x20[_0x3264[35]]= qs[_0x3264[35]](_0xe653x2d[_0x3264[57]][_0x3264[35]])};_0xe653x20[_0x3264[66]]= qs[_0x3264[67]](_0xe653x2d[_0x3264[57]][_0x3264[67]]);_0xe653x20[_0x3264[68]]= qs[_0x3264[59]](_[_0x3264[69]](_0xe653x2d[_0x3264[57]],_0xe653x2e[_0x3264[59]]));if(_0xe653x30[_0x3264[56]]){if(_0xe653x30[_0x3264[58]]){_0xe653x30[_0x3264[58]]= moment(_0xe653x30[_0x3264[58]])[_0x3264[71]](1,_0x3264[70])}else {_0xe653x30[_0x3264[58]]= moment(_0xe653x30[_0x3264[56]])[_0x3264[71]](1,_0x3264[70])};_[_0x3264[72]](_0xe653x20[_0x3264[68]],{createdAt:{$gte:_0xe653x30[_0x3264[56]],$lte:_0xe653x30[_0x3264[58]]}})};if(_0xe653x2d[_0x3264[57]][_0x3264[73]]){_0xe653x20[_0x3264[68]]= _[_0x3264[72]](_0xe653x20[_0x3264[68]],{$or:_[_0x3264[75]](_0xe653x20[_0x3264[61]],function(_0xe653x31){var _0xe653x2f={};_0xe653x2f[_0xe653x31]= {$like:_0x3264[74]+ _0xe653x2d[_0x3264[57]][_0x3264[73]]+ _0x3264[74]};return _0xe653x2f})})};_0xe653x20= _[_0x3264[72]]({},_0xe653x20,_0xe653x2d[_0x3264[76]]);var _0xe653x32={where:_0xe653x20[_0x3264[68]]};return db[_0x3264[54]][_0x3264[34]](_0xe653x32)[_0x3264[44]](function(_0xe653x21){_0xe653x2f[_0x3264[34]]= _0xe653x21;if(_0xe653x2d[_0x3264[57]][_0x3264[79]]){_0xe653x20[_0x3264[80]]= [{all:true}]};return db[_0x3264[54]][_0x3264[81]](_0xe653x20)})[_0x3264[44]](function(_0xe653x33){_0xe653x2f[_0x3264[78]]= _0xe653x33;return _0xe653x2f})[_0x3264[44]](respondWithFilteredResult(_0xe653x1b,_0xe653x20))[_0x3264[77]](handleError(_0xe653x1b,null))};exports[_0x3264[82]]= function(_0xe653x2d,_0xe653x1b){var _0xe653x20={raw:false,where:{id:_0xe653x2d[_0x3264[84]][_0x3264[83]]}},_0xe653x2e={};_0xe653x2e[_0x3264[52]]= _[_0x3264[55]](db[_0x3264[54]][_0x3264[53]]);_0xe653x2e[_0x3264[57]]= _[_0x3264[55]](_0xe653x2d[_0x3264[57]]);_0xe653x2e[_0x3264[59]]= _[_0x3264[60]](_0xe653x2e[_0x3264[52]],_0xe653x2e[_0x3264[57]]);_0xe653x20[_0x3264[61]]= _[_0x3264[60]](_0xe653x2e[_0x3264[52]],qs[_0x3264[62]](_0xe653x2d[_0x3264[57]][_0x3264[62]]));_0xe653x20[_0x3264[61]]= (_0xe653x20[_0x3264[61]][_0x3264[63]])?_0xe653x20[_0x3264[61]]:_0xe653x2e[_0x3264[52]];if(_0xe653x2d[_0x3264[57]][_0x3264[79]]){_0xe653x20[_0x3264[80]]= [{all:true}]};_0xe653x20= _[_0x3264[72]]({},_0xe653x20,_0xe653x2d[_0x3264[76]]);return db[_0x3264[54]][_0x3264[85]](_0xe653x20)[_0x3264[44]](handleEntityNotFound(_0xe653x1b,null))[_0x3264[44]](respondWithResult(_0xe653x1b,null))[_0x3264[77]](handleError(_0xe653x1b,null))};exports[_0x3264[86]]= function(_0xe653x2d,_0xe653x1b){return db[_0x3264[54]][_0x3264[86]](_0xe653x2d[_0x3264[87]],{})[_0x3264[44]](respondWithResult(_0xe653x1b,201))[_0x3264[77]](handleError(_0xe653x1b,null))};exports[_0x3264[45]]= function(_0xe653x2d,_0xe653x1b){if(_0xe653x2d[_0x3264[87]][_0x3264[83]]){delete _0xe653x2d[_0x3264[87]][_0x3264[83]]};return db[_0x3264[54]][_0x3264[85]]({where:{id:_0xe653x2d[_0x3264[84]][_0x3264[83]]}})[_0x3264[44]](handleEntityNotFound(_0xe653x1b,null))[_0x3264[44]](saveUpdates(_0xe653x2d[_0x3264[87]],null))[_0x3264[44]](respondWithResult(_0xe653x1b,null))[_0x3264[77]](handleError(_0xe653x1b,null))};exports[_0x3264[46]]= function(_0xe653x2d,_0xe653x1b){return db[_0x3264[54]][_0x3264[85]]({where:{id:_0xe653x2d[_0x3264[84]][_0x3264[83]]}})[_0x3264[44]](handleEntityNotFound(_0xe653x1b,null))[_0x3264[44]](removeEntity(_0xe653x1b,null))[_0x3264[77]](handleError(_0xe653x1b,null))};exports[_0x3264[88]]= function(_0xe653x2d,_0xe653x1b,_0xe653x34){if(_0xe653x2d[_0x3264[87]][_0x3264[83]]){delete _0xe653x2d[_0x3264[87]][_0x3264[83]]};return db[_0x3264[54]][_0x3264[85]]({where:{id:_0xe653x2d[_0x3264[84]][_0x3264[83]]}})[_0x3264[44]](handleEntityNotFound(_0xe653x1b,null))[_0x3264[44]](function(_0xe653x1d){if(_0xe653x1d){_0xe653x2d[_0x3264[87]][_0x3264[89]]= _0xe653x1d[_0x3264[83]];return db[_0x3264[90]][_0x3264[86]](_0xe653x2d[_0x3264[87]])}})[_0x3264[44]](respondWithResult(_0xe653x1b,null))[_0x3264[77]](handleError(_0xe653x1b,null))};exports[_0x3264[91]]= function(_0xe653x2d,_0xe653x1d,_0xe653x34){var _0xe653x20={};var _0xe653x2e={};var _0xe653x35;var _0xe653x21;return db[_0x3264[54]][_0x3264[92]]({where:{id:_0xe653x2d[_0x3264[84]][_0x3264[83]]}})[_0x3264[44]](handleEntityNotFound(_0xe653x1d,null))[_0x3264[44]](function(_0xe653x1d){if(_0xe653x1d){_0xe653x35= _0xe653x1d;_0xe653x2e[_0x3264[52]]= _[_0x3264[55]](db[_0x3264[90]][_0x3264[53]]);_0xe653x2e[_0x3264[57]]= _[_0x3264[55]](_0xe653x2d[_0x3264[57]]);_0xe653x2e[_0x3264[59]]= _[_0x3264[60]](_0xe653x2e[_0x3264[52]],_0xe653x2e[_0x3264[57]]);_0xe653x20[_0x3264[61]]= _[_0x3264[60]](_0xe653x2e[_0x3264[52]],qs[_0x3264[62]](_0xe653x2d[_0x3264[57]][_0x3264[62]]));_0xe653x20[_0x3264[61]]= (_0xe653x20[_0x3264[61]][_0x3264[63]])?_0xe653x20[_0x3264[61]]:_0xe653x2e[_0x3264[52]];_0xe653x20[_0x3264[66]]= qs[_0x3264[67]](_0xe653x2d[_0x3264[57]][_0x3264[67]]);_0xe653x20[_0x3264[68]]= qs[_0x3264[59]](_[_0x3264[69]](_0xe653x2d[_0x3264[57]],_0xe653x2e[_0x3264[59]]));if(_0xe653x2d[_0x3264[57]][_0x3264[73]]){_0xe653x20[_0x3264[68]]= _[_0x3264[72]](_0xe653x20[_0x3264[68]],{$or:_[_0x3264[75]](_0xe653x20[_0x3264[61]],function(_0xe653x31){var _0xe653x2f={};_0xe653x2f[_0xe653x31]= {$like:_0x3264[74]+ _0xe653x2d[_0x3264[57]][_0x3264[73]]+ _0x3264[74]};return _0xe653x2f})})};_0xe653x20= _[_0x3264[72]]({},_0xe653x20,_0xe653x2d[_0x3264[76]]);return _0xe653x35[_0x3264[91]](_0xe653x20)}})[_0x3264[44]](function(_0xe653x36){if(_0xe653x36){_0xe653x21= _0xe653x36[_0x3264[63]];if(!_0xe653x2d[_0x3264[57]][_0x3264[65]](_0x3264[64])){_0xe653x20[_0x3264[36]]= qs[_0x3264[36]](_0xe653x2d[_0x3264[57]][_0x3264[36]]);_0xe653x20[_0x3264[35]]= qs[_0x3264[35]](_0xe653x2d[_0x3264[57]][_0x3264[35]])};return _0xe653x35[_0x3264[91]](_0xe653x20)}})[_0x3264[44]](function(_0xe653x33){if(_0xe653x33){return _0xe653x33?{count:_0xe653x21,rows:_0xe653x33}:null}})[_0x3264[44]](respondWithResult(_0xe653x1d,null))[_0x3264[77]](handleError(_0xe653x1d,null))};exports[_0x3264[93]]= function(_0xe653x2d,_0xe653x1b,_0xe653x34){return db[_0x3264[54]][_0x3264[85]]({where:{id:_0xe653x2d[_0x3264[84]][_0x3264[83]]}})[_0x3264[44]](handleEntityNotFound(_0xe653x1b,null))[_0x3264[44]](function(_0xe653x1d){if(_0xe653x1d){return _0xe653x1d[_0x3264[93]](_0xe653x2d[_0x3264[87]][_0x3264[94]],_[_0x3264[95]](_0xe653x2d[_0x3264[87]],[_0x3264[94],_0x3264[83]])|| {})}})[_0x3264[44]](respondWithResult(_0xe653x1b,null))[_0x3264[77]](handleError(_0xe653x1b,null))};exports[_0x3264[96]]= function(_0xe653x2d,_0xe653x1b,_0xe653x34){var _0xe653x37;return db[_0x3264[54]][_0x3264[85]]({where:{id:_0xe653x2d[_0x3264[84]][_0x3264[83]]},include:[{model:db[_0x3264[102]],as:_0x3264[103]}]})[_0x3264[44]](handleEntityNotFound(_0xe653x1b,null))[_0x3264[44]](function(_0xe653x1d){if(_0xe653x1d){_0xe653x37= _0xe653x1d;return db[_0x3264[101]][_0x3264[53]]}})[_0x3264[44]](function(_0xe653x1d){if(_0xe653x1d){var _0xe653x20={};var _0xe653x2e={};_0xe653x2e[_0x3264[52]]= _[_0x3264[99]](_[_0x3264[55]](_0xe653x1d),_[_0x3264[75]](_0xe653x37.CustomFields,function(_0xe653x38){return util[_0x3264[98]](_0x3264[97],_0xe653x38[_0x3264[83]])}));_0xe653x2e[_0x3264[57]]= _[_0x3264[55]](_0xe653x2d[_0x3264[57]]);_0xe653x2e[_0x3264[59]]= _[_0x3264[60]](_0xe653x2e[_0x3264[52]],_0xe653x2e[_0x3264[57]]);_0xe653x20[_0x3264[61]]= _[_0x3264[60]](_0xe653x2e[_0x3264[52]],qs[_0x3264[62]](_0xe653x2d[_0x3264[57]][_0x3264[62]]));_0xe653x20[_0x3264[61]]= (_0xe653x20[_0x3264[61]][_0x3264[63]])?_0xe653x20[_0x3264[61]]:_0xe653x2e[_0x3264[52]];_0xe653x20[_0x3264[36]]= qs[_0x3264[36]](_0xe653x2d[_0x3264[57]][_0x3264[36]]);_0xe653x20[_0x3264[35]]= qs[_0x3264[35]](_0xe653x2d[_0x3264[57]][_0x3264[35]]);_0xe653x20[_0x3264[66]]= qs[_0x3264[67]](_0xe653x2d[_0x3264[57]][_0x3264[67]]);_0xe653x20[_0x3264[68]]= qs[_0x3264[59]](_[_0x3264[69]](_0xe653x2d[_0x3264[57]],_0xe653x2e[_0x3264[59]]));_0xe653x20[_0x3264[100]]= true;if(_0xe653x2d[_0x3264[57]][_0x3264[73]]){_0xe653x20[_0x3264[68]]= _[_0x3264[72]](_0xe653x20[_0x3264[68]],{$or:_[_0x3264[75]](_0xe653x20[_0x3264[61]],function(_0xe653x31){var _0xe653x2f={};_0xe653x2f[_0xe653x31]= {$like:_0x3264[74]+ _0xe653x2d[_0x3264[57]][_0x3264[73]]+ _0x3264[74]};return _0xe653x2f})})};_0xe653x20= _[_0x3264[72]]({},_0xe653x20,_0xe653x2d[_0x3264[76]]);return _0xe653x37[_0x3264[96]](_0xe653x20)}})[_0x3264[44]](respondWithResult(_0xe653x1b,null))[_0x3264[77]](handleError(_0xe653x1b,null))};exports[_0x3264[104]]= function(_0xe653x2d,_0xe653x1b,_0xe653x34){var _0xe653x37;return db[_0x3264[54]][_0x3264[85]]({where:{id:_0xe653x2d[_0x3264[84]][_0x3264[83]]},include:[{model:db[_0x3264[102]],as:_0x3264[103]}]})[_0x3264[44]](handleEntityNotFound(_0xe653x1b,null))[_0x3264[44]](function(_0xe653x1d){if(_0xe653x1d){_0xe653x37= _0xe653x1d;return db[_0x3264[101]][_0x3264[53]]}})[_0x3264[44]](function(_0xe653x1d){if(_0xe653x1d){var _0xe653x20={};var _0xe653x2e={};_0xe653x2e[_0x3264[52]]= _[_0x3264[99]](_[_0x3264[55]](_0xe653x1d),_[_0x3264[75]](_0xe653x37.CustomFields,function(_0xe653x38){return util[_0x3264[98]](_0x3264[97],_0xe653x38[_0x3264[83]])}));_0xe653x2e[_0x3264[57]]= _[_0x3264[55]](_0xe653x2d[_0x3264[57]]);_0xe653x2e[_0x3264[59]]= _[_0x3264[60]](_0xe653x2e[_0x3264[52]],_0xe653x2e[_0x3264[57]]);_0xe653x20[_0x3264[61]]= _[_0x3264[60]](_0xe653x2e[_0x3264[52]],qs[_0x3264[62]](_0xe653x2d[_0x3264[57]][_0x3264[62]]));_0xe653x20[_0x3264[61]]= (_0xe653x20[_0x3264[61]][_0x3264[63]])?_0xe653x20[_0x3264[61]]:_0xe653x2e[_0x3264[52]];_0xe653x20[_0x3264[36]]= qs[_0x3264[36]](_0xe653x2d[_0x3264[57]][_0x3264[36]]);_0xe653x20[_0x3264[35]]= qs[_0x3264[35]](_0xe653x2d[_0x3264[57]][_0x3264[35]]);_0xe653x20[_0x3264[66]]= qs[_0x3264[67]](_0xe653x2d[_0x3264[57]][_0x3264[67]]);_0xe653x20[_0x3264[68]]= qs[_0x3264[59]](_[_0x3264[69]](_0xe653x2d[_0x3264[57]],_0xe653x2e[_0x3264[59]]));_0xe653x20[_0x3264[100]]= true;if(_0xe653x2d[_0x3264[57]][_0x3264[73]]){_0xe653x20[_0x3264[68]]= _[_0x3264[72]](_0xe653x20[_0x3264[68]],{$or:_[_0x3264[75]](_0xe653x20[_0x3264[61]],function(_0xe653x31){var _0xe653x2f={};_0xe653x2f[_0xe653x31]= {$like:_0x3264[74]+ _0xe653x2d[_0x3264[57]][_0x3264[73]]+ _0x3264[74]};return _0xe653x2f})})};_0xe653x20= _[_0x3264[72]]({},_0xe653x20,_0xe653x2d[_0x3264[76]]);return _0xe653x37[_0x3264[96]](_0xe653x20)}})[_0x3264[44]](function(_0xe653x39){if(_0xe653x39){var _0xe653x3a=toCsv(_0xe653x39);var _0xe653x3b=Date[_0x3264[105]]();fs[_0x3264[107]](util[_0x3264[98]](_0x3264[106],_0xe653x37[_0x3264[83]],_0xe653x3b),_0xe653x3a);_0xe653x1b[_0x3264[111]](_0x3264[108],_0x3264[109]+ util[_0x3264[98]](_0x3264[110],_0xe653x37[_0x3264[83]],_0xe653x3b));_0xe653x1b[_0x3264[111]](_0x3264[112],_0x3264[113]);_0xe653x1b[_0x3264[114]](util[_0x3264[98]](_0x3264[106],_0xe653x37[_0x3264[83]],_0xe653x3b))}})[_0x3264[77]](handleError(_0xe653x1b,null))};exports[_0x3264[115]]= function(_0xe653x2d,_0xe653x1b,_0xe653x34){var _0xe653x3c;delete _0xe653x2d[_0x3264[87]][_0x3264[83]];return db[_0x3264[54]][_0x3264[92]]({where:{id:_0xe653x2d[_0x3264[84]][_0x3264[83]]}})[_0x3264[44]](handleEntityNotFound(_0xe653x1b,null))[_0x3264[44]](function(_0xe653x37){if(_0xe653x37){return db[_0x3264[129]][_0x3264[131]](function(_0xe653x3d){return db[_0x3264[102]][_0x3264[86]](_0xe653x2d[_0x3264[87]],{transaction:_0xe653x3d})[_0x3264[44]](function(_0xe653x3f){_0xe653x3c= _0xe653x3f;return _0xe653x37[_0x3264[130]](_0xe653x3f,{transaction:_0xe653x3d})})[_0x3264[44]](function(){var _0xe653x3e={type:db[_0x3264[117]][_0x3264[116]],transaction:_0xe653x3d};switch(_0xe653x2d[_0x3264[87]][_0x3264[118]]){case _0x3264[119]:_0xe653x3e[_0x3264[118]]= db[_0x3264[117]][_0x3264[116]];break;case _0x3264[121]:_0xe653x3e[_0x3264[118]]= db[_0x3264[117]][_0x3264[120]];break;case _0x3264[124]:_0xe653x3e[_0x3264[118]]= db[_0x3264[117]][_0x3264[122]];_0xe653x3e[_0x3264[123]]= false;break;default:};return db[_0x3264[129]][_0x3264[128]][_0x3264[127]](_0x3264[125],util[_0x3264[98]](_0x3264[126],_0xe653x3c[_0x3264[83]]),_0xe653x3e)})[_0x3264[44]](function(){return _0xe653x3c})})}})[_0x3264[44]](respondWithResult(_0xe653x1b,null))[_0x3264[77]](handleError(_0xe653x1b,null))};exports[_0x3264[132]]= function(_0xe653x2d,_0xe653x1d,_0xe653x34){var _0xe653x20={};var _0xe653x2e={};var _0xe653x35;var _0xe653x21;return db[_0x3264[54]][_0x3264[92]]({where:{id:_0xe653x2d[_0x3264[84]][_0x3264[83]]}})[_0x3264[44]](handleEntityNotFound(_0xe653x1d,null))[_0x3264[44]](function(_0xe653x1d){if(_0xe653x1d){_0xe653x35= _0xe653x1d;_0xe653x2e[_0x3264[52]]= _[_0x3264[55]](db[_0x3264[102]][_0x3264[53]]);_0xe653x2e[_0x3264[57]]= _[_0x3264[55]](_0xe653x2d[_0x3264[57]]);_0xe653x2e[_0x3264[59]]= _[_0x3264[60]](_0xe653x2e[_0x3264[52]],_0xe653x2e[_0x3264[57]]);_0xe653x20[_0x3264[61]]= _[_0x3264[60]](_0xe653x2e[_0x3264[52]],qs[_0x3264[62]](_0xe653x2d[_0x3264[57]][_0x3264[62]]));_0xe653x20[_0x3264[61]]= (_0xe653x20[_0x3264[61]][_0x3264[63]])?_0xe653x20[_0x3264[61]]:_0xe653x2e[_0x3264[52]];_0xe653x20[_0x3264[66]]= qs[_0x3264[67]](_0xe653x2d[_0x3264[57]][_0x3264[67]]);_0xe653x20[_0x3264[68]]= qs[_0x3264[59]](_[_0x3264[69]](_0xe653x2d[_0x3264[57]],_0xe653x2e[_0x3264[59]]));_0xe653x20[_0x3264[68]]= _[_0x3264[72]](_0xe653x20[_0x3264[68]],{$or:[{ListId:_0xe653x1d[_0x3264[83]]},{ListId:null}]});if(_0xe653x2d[_0x3264[57]][_0x3264[73]]){_0xe653x20[_0x3264[68]]= _[_0x3264[72]](_0xe653x20[_0x3264[68]],{$or:_[_0x3264[75]](_0xe653x20[_0x3264[61]],function(_0xe653x31){var _0xe653x2f={};_0xe653x2f[_0xe653x31]= {$like:_0x3264[74]+ _0xe653x2d[_0x3264[57]][_0x3264[73]]+ _0x3264[74]};return _0xe653x2f})})};_0xe653x20= _[_0x3264[72]]({},_0xe653x20,_0xe653x2d[_0x3264[76]]);return db[_0x3264[102]][_0x3264[133]](_0xe653x20)}})[_0x3264[44]](respondWithResult(_0xe653x1d,null))[_0x3264[77]](handleError(_0xe653x1d,null))};exports[_0x3264[134]]= function(_0xe653x2d,_0xe653x1b,_0xe653x34){return db[_0x3264[54]][_0x3264[85]]({where:{id:_0xe653x2d[_0x3264[84]][_0x3264[83]]}})[_0x3264[44]](handleEntityNotFound(_0xe653x1b,null))[_0x3264[44]](function(_0xe653x1d){if(_0xe653x1d){return _0xe653x1d[_0x3264[134]](_0xe653x2d[_0x3264[87]][_0x3264[94]],_[_0x3264[95]](_0xe653x2d[_0x3264[87]],[_0x3264[94],_0x3264[83]])|| {})[_0x3264[137]](function(_0xe653x36){for(var _0xe653x40=0;_0xe653x40< _0xe653x2d[_0x3264[87]][_0x3264[94]][_0x3264[63]];_0xe653x40+= 1){socket[_0x3264[136]](_0x3264[135],{UserId:_0xe653x2d[_0x3264[87]][_0x3264[94]][_0xe653x40],CmListId:_0xe653x2d[_0x3264[84]][_0x3264[83]]})};return _0xe653x36})}})[_0x3264[44]](respondWithResult(_0xe653x1b,null))[_0x3264[77]](handleError(_0xe653x1b,null))};exports[_0x3264[138]]= function(_0xe653x2d,_0xe653x1b,_0xe653x34){var _0xe653x36;return db[_0x3264[54]][_0x3264[85]]({where:{id:_0xe653x2d[_0x3264[84]][_0x3264[83]]}})[_0x3264[44]](handleEntityNotFound(_0xe653x1b,null))[_0x3264[44]](function(_0xe653x1d){if(_0xe653x1d){return _0xe653x1d[_0x3264[138]](_0xe653x2d[_0x3264[57]][_0x3264[94]])[_0x3264[44]](function(_0xe653x36){if(_[_0x3264[139]](_0xe653x2d[_0x3264[57]][_0x3264[94]])){for(var _0xe653x40=0;_0xe653x40< _0xe653x2d[_0x3264[57]][_0x3264[94]][_0x3264[63]];_0xe653x40+= 1){socket[_0x3264[136]](_0x3264[140],{UserId:_0xe653x2d[_0x3264[57]][_0x3264[94]][_0xe653x40],CmListId:_0xe653x2d[_0x3264[84]][_0x3264[83]]})}}else {socket[_0x3264[136]](_0x3264[140],{UserId:_0xe653x2d[_0x3264[57]][_0x3264[94]],CmListId:_0xe653x2d[_0x3264[84]][_0x3264[83]]})}})}})[_0x3264[44]](respondWithStatusCode(_0xe653x1b,null))[_0x3264[77]](handleError(_0xe653x1b,null))};exports[_0x3264[141]]= function(_0xe653x2d,_0xe653x1d,_0xe653x34){var _0xe653x20={};var _0xe653x2e={};var _0xe653x35;var _0xe653x21;return db[_0x3264[54]][_0x3264[92]]({where:{id:_0xe653x2d[_0x3264[84]][_0x3264[83]]}})[_0x3264[44]](handleEntityNotFound(_0xe653x1d,null))[_0x3264[44]](function(_0xe653x1d){if(_0xe653x1d){_0xe653x35= _0xe653x1d;_0xe653x2e[_0x3264[52]]= _[_0x3264[55]](db[_0x3264[142]][_0x3264[53]]);_0xe653x2e[_0x3264[57]]= _[_0x3264[55]](_0xe653x2d[_0x3264[57]]);_0xe653x2e[_0x3264[59]]= _[_0x3264[60]](_0xe653x2e[_0x3264[52]],_0xe653x2e[_0x3264[57]]);_0xe653x20[_0x3264[61]]= _[_0x3264[60]](_0xe653x2e[_0x3264[52]],qs[_0x3264[62]](_0xe653x2d[_0x3264[57]][_0x3264[62]]));_0xe653x20[_0x3264[61]]= (_0xe653x20[_0x3264[61]][_0x3264[63]])?_0xe653x20[_0x3264[61]]:_0xe653x2e[_0x3264[52]];_0xe653x20[_0x3264[66]]= qs[_0x3264[67]](_0xe653x2d[_0x3264[57]][_0x3264[67]]);_0xe653x20[_0x3264[68]]= qs[_0x3264[59]](_[_0x3264[69]](_0xe653x2d[_0x3264[57]],_0xe653x2e[_0x3264[59]]));if(_0xe653x2d[_0x3264[57]][_0x3264[73]]){_0xe653x20[_0x3264[68]]= _[_0x3264[72]](_0xe653x20[_0x3264[68]],{$or:_[_0x3264[75]](_0xe653x20[_0x3264[61]],function(_0xe653x31){var _0xe653x2f={};_0xe653x2f[_0xe653x31]= {$like:_0x3264[74]+ _0xe653x2d[_0x3264[57]][_0x3264[73]]+ _0x3264[74]};return _0xe653x2f})})};_0xe653x20= _[_0x3264[72]]({},_0xe653x20,_0xe653x2d[_0x3264[76]]);return _0xe653x35[_0x3264[141]](_0xe653x20)}})[_0x3264[44]](function(_0xe653x36){if(_0xe653x36){_0xe653x21= _0xe653x36[_0x3264[63]];if(!_0xe653x2d[_0x3264[57]][_0x3264[65]](_0x3264[64])){_0xe653x20[_0x3264[36]]= qs[_0x3264[36]](_0xe653x2d[_0x3264[57]][_0x3264[36]]);_0xe653x20[_0x3264[35]]= qs[_0x3264[35]](_0xe653x2d[_0x3264[57]][_0x3264[35]])};return _0xe653x35[_0x3264[141]](_0xe653x20)}})[_0x3264[44]](function(_0xe653x33){if(_0xe653x33){return _0xe653x33?{count:_0xe653x21,rows:_0xe653x33}:null}})[_0x3264[44]](respondWithResult(_0xe653x1d,null))[_0x3264[77]](handleError(_0xe653x1d,null))}
\ No newline at end of file
index 739dc95..825fdff 100644 (file)
@@ -1 +1 @@
-var _0x723e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x6D\x4C\x69\x73\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x723e[0];var EventEmitter=require(_0x723e[1]);var CmList=require(_0x723e[4])[_0x723e[3]][_0x723e[2]];var CmListEvents= new EventEmitter();CmListEvents[_0x723e[5]](0);var events={afterCreate:_0x723e[6],afterUpdate:_0x723e[7],afterDestroy:_0x723e[8]};function emitEvent(event){return function(_0xa63cx7,_0xa63cx8,_0xa63cx9){CmListEvents[_0x723e[11]](event+ _0x723e[9]+ _0xa63cx7[_0x723e[10]],_0xa63cx7);CmListEvents[_0x723e[11]](event,_0xa63cx7);_0xa63cx9(null)}}for(var e in events){if(events[_0x723e[12]](e)){var event=events[e];CmList[_0x723e[13]](e,emitEvent(event))}};module[_0x723e[14]]= CmListEvents
\ No newline at end of file
+var _0x85be=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x6D\x4C\x69\x73\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x85be[0];var EventEmitter=require(_0x85be[1]);var CmList=require(_0x85be[4])[_0x85be[3]][_0x85be[2]];var CmListEvents= new EventEmitter();CmListEvents[_0x85be[5]](0);var events={afterCreate:_0x85be[6],afterUpdate:_0x85be[7],afterDestroy:_0x85be[8]};function emitEvent(event){return function(_0xfd6fx7,_0xfd6fx8,_0xfd6fx9){CmListEvents[_0x85be[11]](event+ _0x85be[9]+ _0xfd6fx7[_0x85be[10]],_0xfd6fx7);CmListEvents[_0x85be[11]](event,_0xfd6fx7);_0xfd6fx9(null)}}for(var e in events){if(events[_0x85be[12]](e)){var event=events[e];CmList[_0x85be[13]](e,emitEvent(event))}};module[_0x85be[14]]= CmListEvents
\ No newline at end of file
index a1a6112..17e3ed5 100644 (file)
@@ -1 +1 @@
-var _0x4d58=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x6D\x4C\x69\x73\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x6D\x4C\x69\x73\x74","\x63\x6D\x5F\x6C\x69\x73\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x4d58[0];var _=require(_0x4d58[1]);var util=require(_0x4d58[2]);var logger=require(_0x4d58[4])(_0x4d58[3]);var moment=require(_0x4d58[5]);var BPromise=require(_0x4d58[6]);var rp=require(_0x4d58[7]);var attributes=require(_0x4d58[8]);module[_0x4d58[9]]= function(_0x9b3ax8,_0x9b3ax9){return _0x9b3ax8[_0x4d58[12]](_0x4d58[10],attributes,{tableName:_0x4d58[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x5344=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x6D\x4C\x69\x73\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x6D\x4C\x69\x73\x74","\x63\x6D\x5F\x6C\x69\x73\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x5344[0];var _=require(_0x5344[1]);var util=require(_0x5344[2]);var logger=require(_0x5344[4])(_0x5344[3]);var moment=require(_0x5344[5]);var BPromise=require(_0x5344[6]);var rp=require(_0x5344[7]);var attributes=require(_0x5344[8]);module[_0x5344[9]]= function(_0xf94dx8,_0xf94dx9){return _0xf94dx8[_0x5344[12]](_0x5344[10],attributes,{tableName:_0x5344[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 352cae0..d839499 100644 (file)
@@ -1 +1 @@
-var _0xc912=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x6D\x4C\x69\x73\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x43\x6D\x4C\x69\x73\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x6D\x4C\x69\x73\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xc912[0];var _=require(_0xc912[1]);var util=require(_0xc912[2]);var moment=require(_0xc912[3]);var BPromise=require(_0xc912[4]);var rs=require(_0xc912[5]);var fs=require(_0xc912[6]);var db=require(_0xc912[8])[_0xc912[7]];var utils=require(_0xc912[9]);var logger=require(_0xc912[11])(_0xc912[10]);var config=require(_0xc912[12]);var jayson=require(_0xc912[13]);var client=jayson[_0xc912[15]][_0xc912[14]]({port:9002});var socket=require(_0xc912[17])({host:_0xc912[16],port:6379});require(_0xc912[19])[_0xc912[18]](socket);function respondWithRpcPromise(_0xa58dxf,_0xa58dx10,_0xa58dx11){return  new BPromise(function(_0xa58dx12,_0xa58dx13){return client[_0xc912[32]](_0xa58dxf,_0xa58dx11)[_0xc912[31]](function(_0xa58dx15){logger[_0xc912[24]](_0xc912[20],_0xa58dx10,_0xc912[23]);logger[_0xc912[27]](_0xc912[25],_0xa58dx10,_0xc912[23],JSON[_0xc912[26]](_0xa58dx15));if(_0xa58dx15[_0xc912[21]]){if(_0xa58dx15[_0xc912[21]][_0xc912[28]]=== 500){logger[_0xc912[21]](_0xc912[20],_0xa58dx10,_0xa58dx15[_0xc912[21]][_0xc912[29]]);return _0xa58dx13(_0xa58dx15[_0xc912[21]][_0xc912[29]])};logger[_0xc912[21]](_0xc912[20],_0xa58dx10,_0xa58dx15[_0xc912[21]][_0xc912[29]]);return _0xa58dx12(_0xa58dx15[_0xc912[21]][_0xc912[29]])}else {logger[_0xc912[24]](_0xc912[20],_0xa58dx10,_0xc912[23]);_0xa58dx12(_0xa58dx15[_0xc912[30]][_0xc912[29]])}})[_0xc912[22]](function(_0xa58dx14){logger[_0xc912[21]](_0xc912[20],_0xa58dx10,_0xa58dx14);_0xa58dx13(_0xa58dx14)})})}
\ No newline at end of file
+var _0x750e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x63\x6D\x4C\x69\x73\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x43\x6D\x4C\x69\x73\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x6D\x4C\x69\x73\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x750e[0];var _=require(_0x750e[1]);var util=require(_0x750e[2]);var moment=require(_0x750e[3]);var BPromise=require(_0x750e[4]);var rs=require(_0x750e[5]);var fs=require(_0x750e[6]);var db=require(_0x750e[8])[_0x750e[7]];var utils=require(_0x750e[9]);var logger=require(_0x750e[11])(_0x750e[10]);var config=require(_0x750e[12]);var jayson=require(_0x750e[13]);var client=jayson[_0x750e[15]][_0x750e[14]]({port:9002});var socket=require(_0x750e[17])({host:_0x750e[16],port:6379});require(_0x750e[19])[_0x750e[18]](socket);function respondWithRpcPromise(_0xcaa1xf,_0xcaa1x10,_0xcaa1x11){return  new BPromise(function(_0xcaa1x12,_0xcaa1x13){return client[_0x750e[32]](_0xcaa1xf,_0xcaa1x11)[_0x750e[31]](function(_0xcaa1x15){logger[_0x750e[24]](_0x750e[20],_0xcaa1x10,_0x750e[23]);logger[_0x750e[27]](_0x750e[25],_0xcaa1x10,_0x750e[23],JSON[_0x750e[26]](_0xcaa1x15));if(_0xcaa1x15[_0x750e[21]]){if(_0xcaa1x15[_0x750e[21]][_0x750e[28]]=== 500){logger[_0x750e[21]](_0x750e[20],_0xcaa1x10,_0xcaa1x15[_0x750e[21]][_0x750e[29]]);return _0xcaa1x13(_0xcaa1x15[_0x750e[21]][_0x750e[29]])};logger[_0x750e[21]](_0x750e[20],_0xcaa1x10,_0xcaa1x15[_0x750e[21]][_0x750e[29]]);return _0xcaa1x12(_0xcaa1x15[_0x750e[21]][_0x750e[29]])}else {logger[_0x750e[24]](_0x750e[20],_0xcaa1x10,_0x750e[23]);_0xcaa1x12(_0xcaa1x15[_0x750e[30]][_0x750e[29]])}})[_0x750e[22]](function(_0xcaa1x14){logger[_0x750e[21]](_0x750e[20],_0xcaa1x10,_0xcaa1x14);_0xcaa1x13(_0xcaa1x14)})})}
\ No newline at end of file
index edefeba..737ad0f 100644 (file)
@@ -1 +1 @@
-var _0x6b7c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x6D\x4C\x69\x73\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x6D\x4C\x69\x73\x74\x3A","\x6F\x6E"];_0x6b7c[0];var CmListEvents=require(_0x6b7c[1]);var events=[_0x6b7c[2],_0x6b7c[3],_0x6b7c[4]];function createListener(_0x22a7x4,_0x22a7x5){return function(_0x22a7x6){_0x22a7x5[_0x6b7c[5]](_0x22a7x4,_0x22a7x6)}}function removeListener(_0x22a7x4,_0x22a7x8){return function(){CmListEvents[_0x6b7c[6]](_0x22a7x4,_0x22a7x8)}}exports[_0x6b7c[7]]= function(_0x22a7x5){for(var _0x22a7x9=0,_0x22a7xa=events[_0x6b7c[8]];_0x22a7x9< _0x22a7xa;_0x22a7x9++){var _0x22a7x4=events[_0x22a7x9];var _0x22a7x8=createListener(_0x6b7c[9]+ _0x22a7x4,_0x22a7x5);CmListEvents[_0x6b7c[10]](_0x22a7x4,_0x22a7x8)}}
\ No newline at end of file
+var _0x119d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x6D\x4C\x69\x73\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x6D\x4C\x69\x73\x74\x3A","\x6F\x6E"];_0x119d[0];var CmListEvents=require(_0x119d[1]);var events=[_0x119d[2],_0x119d[3],_0x119d[4]];function createListener(_0x98d3x4,_0x98d3x5){return function(_0x98d3x6){_0x98d3x5[_0x119d[5]](_0x98d3x4,_0x98d3x6)}}function removeListener(_0x98d3x4,_0x98d3x8){return function(){CmListEvents[_0x119d[6]](_0x98d3x4,_0x98d3x8)}}exports[_0x119d[7]]= function(_0x98d3x5){for(var _0x98d3x9=0,_0x98d3xa=events[_0x119d[8]];_0x98d3x9< _0x98d3xa;_0x98d3x9++){var _0x98d3x4=events[_0x98d3x9];var _0x98d3x8=createListener(_0x119d[9]+ _0x98d3x4,_0x98d3x5);CmListEvents[_0x119d[10]](_0x98d3x4,_0x98d3x8)}}
\ No newline at end of file
index 81e300c..0adf688 100644 (file)
@@ -1 +1 @@
-var _0xc044=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6D\x4C\x69\x73\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2F\x63\x73\x76","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73\x43\x73\x76","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x43\x6F\x6E\x74\x61\x63\x74\x73","\x61\x64\x64\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xc044[0];var multer=require(_0xc044[1]);var util=require(_0xc044[2]);var path=require(_0xc044[3]);var express=require(_0xc044[4]);var router=express.Router();var auth=require(_0xc044[5]);var interaction=require(_0xc044[6]);var config=require(_0xc044[7]);var controller=require(_0xc044[8]);router[_0xc044[12]](_0xc044[9],auth[_0xc044[10]](),controller[_0xc044[11]]);router[_0xc044[12]](_0xc044[13],auth[_0xc044[10]](),controller[_0xc044[14]]);router[_0xc044[12]](_0xc044[15],auth[_0xc044[10]](),controller[_0xc044[16]]);router[_0xc044[12]](_0xc044[17],auth[_0xc044[10]](),controller[_0xc044[18]]);router[_0xc044[12]](_0xc044[19],controller[_0xc044[20]]);router[_0xc044[12]](_0xc044[21],auth[_0xc044[10]](),controller[_0xc044[22]]);router[_0xc044[12]](_0xc044[23],auth[_0xc044[10]](),controller[_0xc044[24]]);router[_0xc044[26]](_0xc044[9],auth[_0xc044[10]](),controller[_0xc044[25]]);router[_0xc044[26]](_0xc044[15],auth[_0xc044[10]](),controller[_0xc044[27]]);router[_0xc044[26]](_0xc044[17],auth[_0xc044[10]](),controller[_0xc044[28]]);router[_0xc044[26]](_0xc044[21],auth[_0xc044[10]](),controller[_0xc044[29]]);router[_0xc044[26]](_0xc044[23],auth[_0xc044[10]](),controller[_0xc044[30]]);router[_0xc044[32]](_0xc044[13],auth[_0xc044[10]](),controller[_0xc044[31]]);router[_0xc044[34]](_0xc044[13],auth[_0xc044[10]](),controller[_0xc044[33]]);router[_0xc044[34]](_0xc044[23],auth[_0xc044[10]](),controller[_0xc044[35]]);module[_0xc044[36]]= router
\ No newline at end of file
+var _0x4c5c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6D\x4C\x69\x73\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2F\x63\x73\x76","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73\x43\x73\x76","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x43\x6F\x6E\x74\x61\x63\x74\x73","\x61\x64\x64\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x4c5c[0];var multer=require(_0x4c5c[1]);var util=require(_0x4c5c[2]);var path=require(_0x4c5c[3]);var express=require(_0x4c5c[4]);var router=express.Router();var auth=require(_0x4c5c[5]);var interaction=require(_0x4c5c[6]);var config=require(_0x4c5c[7]);var controller=require(_0x4c5c[8]);router[_0x4c5c[12]](_0x4c5c[9],auth[_0x4c5c[10]](),controller[_0x4c5c[11]]);router[_0x4c5c[12]](_0x4c5c[13],auth[_0x4c5c[10]](),controller[_0x4c5c[14]]);router[_0x4c5c[12]](_0x4c5c[15],auth[_0x4c5c[10]](),controller[_0x4c5c[16]]);router[_0x4c5c[12]](_0x4c5c[17],auth[_0x4c5c[10]](),controller[_0x4c5c[18]]);router[_0x4c5c[12]](_0x4c5c[19],controller[_0x4c5c[20]]);router[_0x4c5c[12]](_0x4c5c[21],auth[_0x4c5c[10]](),controller[_0x4c5c[22]]);router[_0x4c5c[12]](_0x4c5c[23],auth[_0x4c5c[10]](),controller[_0x4c5c[24]]);router[_0x4c5c[26]](_0x4c5c[9],auth[_0x4c5c[10]](),controller[_0x4c5c[25]]);router[_0x4c5c[26]](_0x4c5c[15],auth[_0x4c5c[10]](),controller[_0x4c5c[27]]);router[_0x4c5c[26]](_0x4c5c[17],auth[_0x4c5c[10]](),controller[_0x4c5c[28]]);router[_0x4c5c[26]](_0x4c5c[21],auth[_0x4c5c[10]](),controller[_0x4c5c[29]]);router[_0x4c5c[26]](_0x4c5c[23],auth[_0x4c5c[10]](),controller[_0x4c5c[30]]);router[_0x4c5c[32]](_0x4c5c[13],auth[_0x4c5c[10]](),controller[_0x4c5c[31]]);router[_0x4c5c[34]](_0x4c5c[13],auth[_0x4c5c[10]](),controller[_0x4c5c[33]]);router[_0x4c5c[34]](_0x4c5c[23],auth[_0x4c5c[10]](),controller[_0x4c5c[35]]);module[_0x4c5c[36]]= router
\ No newline at end of file
index 31383e2..27eb819 100644 (file)
@@ -1 +1 @@
-var _0x7c76=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x56\x49\x52\x54\x55\x41\x4C","\x66\x69\x65\x6C\x64","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47"];_0x7c76[0];var Sequelize=require(_0x7c76[1]);module[_0x7c76[2]]= {name:{type:Sequelize[_0x7c76[3]],get:function(_0xdd78x2){return this[_0x7c76[5]](_0x7c76[4])}},field:{type:Sequelize[_0x7c76[6]],allowNull:false},operator:{type:Sequelize[_0x7c76[6]],allowNull:false},value:{type:Sequelize[_0x7c76[6]],allowNull:false}}
\ No newline at end of file
+var _0xba17=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x56\x49\x52\x54\x55\x41\x4C","\x66\x69\x65\x6C\x64","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47"];_0xba17[0];var Sequelize=require(_0xba17[1]);module[_0xba17[2]]= {name:{type:Sequelize[_0xba17[3]],get:function(_0x2b55x2){return this[_0xba17[5]](_0xba17[4])}},field:{type:Sequelize[_0xba17[6]],allowNull:false},operator:{type:Sequelize[_0xba17[6]],allowNull:false},value:{type:Sequelize[_0xba17[6]],allowNull:false}}
\ No newline at end of file
index 0f1653b..5295fc4 100644 (file)
@@ -1 +1 @@
-var _0xd7e3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x64","\x62\x6F\x64\x79","\x63\x61\x74\x63\x68","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E"];_0xd7e3[0];var jsonpatch=require(_0xd7e3[1]);var rp=require(_0xd7e3[2]);var moment=require(_0xd7e3[3]);var BPromise=require(_0xd7e3[4]);var Mustache=require(_0xd7e3[5]);var util=require(_0xd7e3[6]);var path=require(_0xd7e3[7]);var sox=require(_0xd7e3[8]);var csv=require(_0xd7e3[9]);var ejs=require(_0xd7e3[10]);var fs=require(_0xd7e3[11]);var _=require(_0xd7e3[12]);var squel=require(_0xd7e3[13]);var crypto=require(_0xd7e3[14]);var jsforce=require(_0xd7e3[15]);var deskjs=require(_0xd7e3[16]);var toCsv=require(_0xd7e3[9]);var querystring=require(_0xd7e3[17]);var Papa=require(_0xd7e3[18]);var qs=require(_0xd7e3[19]);var logger=require(_0xd7e3[21])(_0xd7e3[20]);var utils=require(_0xd7e3[22]);var config=require(_0xd7e3[23]);var db=require(_0xd7e3[25])[_0xd7e3[24]];function respondWithStatusCode(_0x9dbfx1a,_0x9dbfx1b){_0x9dbfx1b= _0x9dbfx1b|| 204;return function(_0x9dbfx1c){if(_0x9dbfx1c){return _0x9dbfx1a[_0xd7e3[26]](_0x9dbfx1b)};return _0x9dbfx1a[_0xd7e3[28]](_0x9dbfx1b)[_0xd7e3[27]]()}}function respondWithResult(_0x9dbfx1a,_0x9dbfx1b){_0x9dbfx1b= _0x9dbfx1b|| 200;return function(_0x9dbfx1c){if(_0x9dbfx1c){return _0x9dbfx1a[_0xd7e3[28]](_0x9dbfx1b)[_0xd7e3[29]](_0x9dbfx1c)}}}function respondWithFilteredResult(_0x9dbfx1a,_0x9dbfx1f){return function(_0x9dbfx1c){if(_0x9dbfx1c){var _0x9dbfx20=_0x9dbfx1c[_0xd7e3[30]],_0x9dbfx21=_0x9dbfx1f[_0xd7e3[31]],_0x9dbfx22=_0x9dbfx1f[_0xd7e3[31]]+ _0x9dbfx1f[_0xd7e3[32]],_0x9dbfx1b;if(_0x9dbfx22>= _0x9dbfx20){_0x9dbfx22= _0x9dbfx20;_0x9dbfx1b= 200}else {_0x9dbfx1b= 206};_0x9dbfx1a[_0xd7e3[28]](_0x9dbfx1b);return _0x9dbfx1a[_0xd7e3[36]](_0xd7e3[33],_0x9dbfx21+ _0xd7e3[34]+ _0x9dbfx22+ _0xd7e3[35]+ _0x9dbfx20)[_0xd7e3[29]](_0x9dbfx1c)};return null}}function patchUpdates(_0x9dbfx24){return function(_0x9dbfx1c){try{jsonpatch[_0xd7e3[37]](_0x9dbfx1c,_0x9dbfx24,true)}catch(err){return BPromise[_0xd7e3[38]](err)};return _0x9dbfx1c[_0xd7e3[39]]()}}function saveUpdates(_0x9dbfx26,_0x9dbfx1b){return function(_0x9dbfx1c){if(_0x9dbfx1c){return _0x9dbfx1c[_0xd7e3[41]](_0x9dbfx26)[_0xd7e3[40]](function(_0x9dbfx27){return _0x9dbfx27})};return null}}function removeEntity(_0x9dbfx1a,_0x9dbfx1b){return function(_0x9dbfx1c){if(_0x9dbfx1c){return _0x9dbfx1c[_0xd7e3[42]]()[_0xd7e3[40]](function(){_0x9dbfx1a[_0xd7e3[28]](204)[_0xd7e3[27]]()})}}}function handleEntityNotFound(_0x9dbfx1a,_0x9dbfx1b){return function(_0x9dbfx1c){if(!_0x9dbfx1c){_0x9dbfx1a[_0xd7e3[26]](404)};return _0x9dbfx1c}}function handleError(_0x9dbfx1a,_0x9dbfx1b){_0x9dbfx1b= _0x9dbfx1b|| 500;return function(_0x9dbfx2b){logger[_0xd7e3[44]](_0x9dbfx2b[_0xd7e3[43]]);if(_0x9dbfx2b[_0xd7e3[45]]){delete _0x9dbfx2b[_0xd7e3[45]]};_0x9dbfx1a[_0xd7e3[28]](_0x9dbfx1b)[_0xd7e3[46]](_0x9dbfx2b)}}exports[_0xd7e3[41]]= function(_0x9dbfx2c,_0x9dbfx1a){if(_0x9dbfx2c[_0xd7e3[48]][_0xd7e3[47]]){delete _0x9dbfx2c[_0xd7e3[48]][_0xd7e3[47]]};return db[_0xd7e3[52]][_0xd7e3[51]]({where:{id:_0x9dbfx2c[_0xd7e3[50]][_0xd7e3[47]]}})[_0xd7e3[40]](handleEntityNotFound(_0x9dbfx1a,null))[_0xd7e3[40]](saveUpdates(_0x9dbfx2c[_0xd7e3[48]],null))[_0xd7e3[40]](respondWithResult(_0x9dbfx1a,null))[_0xd7e3[49]](handleError(_0x9dbfx1a,null))};exports[_0xd7e3[42]]= function(_0x9dbfx2c,_0x9dbfx1a){return db[_0xd7e3[52]][_0xd7e3[51]]({where:{id:_0x9dbfx2c[_0xd7e3[50]][_0xd7e3[47]]}})[_0xd7e3[40]](handleEntityNotFound(_0x9dbfx1a,null))[_0xd7e3[40]](removeEntity(_0x9dbfx1a,null))[_0xd7e3[49]](handleError(_0x9dbfx1a,null))}
\ No newline at end of file
+var _0x780d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x64","\x62\x6F\x64\x79","\x63\x61\x74\x63\x68","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E"];_0x780d[0];var jsonpatch=require(_0x780d[1]);var rp=require(_0x780d[2]);var moment=require(_0x780d[3]);var BPromise=require(_0x780d[4]);var Mustache=require(_0x780d[5]);var util=require(_0x780d[6]);var path=require(_0x780d[7]);var sox=require(_0x780d[8]);var csv=require(_0x780d[9]);var ejs=require(_0x780d[10]);var fs=require(_0x780d[11]);var _=require(_0x780d[12]);var squel=require(_0x780d[13]);var crypto=require(_0x780d[14]);var jsforce=require(_0x780d[15]);var deskjs=require(_0x780d[16]);var toCsv=require(_0x780d[9]);var querystring=require(_0x780d[17]);var Papa=require(_0x780d[18]);var qs=require(_0x780d[19]);var logger=require(_0x780d[21])(_0x780d[20]);var utils=require(_0x780d[22]);var config=require(_0x780d[23]);var db=require(_0x780d[25])[_0x780d[24]];function respondWithStatusCode(_0xde01x1a,_0xde01x1b){_0xde01x1b= _0xde01x1b|| 204;return function(_0xde01x1c){if(_0xde01x1c){return _0xde01x1a[_0x780d[26]](_0xde01x1b)};return _0xde01x1a[_0x780d[28]](_0xde01x1b)[_0x780d[27]]()}}function respondWithResult(_0xde01x1a,_0xde01x1b){_0xde01x1b= _0xde01x1b|| 200;return function(_0xde01x1c){if(_0xde01x1c){return _0xde01x1a[_0x780d[28]](_0xde01x1b)[_0x780d[29]](_0xde01x1c)}}}function respondWithFilteredResult(_0xde01x1a,_0xde01x1f){return function(_0xde01x1c){if(_0xde01x1c){var _0xde01x20=_0xde01x1c[_0x780d[30]],_0xde01x21=_0xde01x1f[_0x780d[31]],_0xde01x22=_0xde01x1f[_0x780d[31]]+ _0xde01x1f[_0x780d[32]],_0xde01x1b;if(_0xde01x22>= _0xde01x20){_0xde01x22= _0xde01x20;_0xde01x1b= 200}else {_0xde01x1b= 206};_0xde01x1a[_0x780d[28]](_0xde01x1b);return _0xde01x1a[_0x780d[36]](_0x780d[33],_0xde01x21+ _0x780d[34]+ _0xde01x22+ _0x780d[35]+ _0xde01x20)[_0x780d[29]](_0xde01x1c)};return null}}function patchUpdates(_0xde01x24){return function(_0xde01x1c){try{jsonpatch[_0x780d[37]](_0xde01x1c,_0xde01x24,true)}catch(err){return BPromise[_0x780d[38]](err)};return _0xde01x1c[_0x780d[39]]()}}function saveUpdates(_0xde01x26,_0xde01x1b){return function(_0xde01x1c){if(_0xde01x1c){return _0xde01x1c[_0x780d[41]](_0xde01x26)[_0x780d[40]](function(_0xde01x27){return _0xde01x27})};return null}}function removeEntity(_0xde01x1a,_0xde01x1b){return function(_0xde01x1c){if(_0xde01x1c){return _0xde01x1c[_0x780d[42]]()[_0x780d[40]](function(){_0xde01x1a[_0x780d[28]](204)[_0x780d[27]]()})}}}function handleEntityNotFound(_0xde01x1a,_0xde01x1b){return function(_0xde01x1c){if(!_0xde01x1c){_0xde01x1a[_0x780d[26]](404)};return _0xde01x1c}}function handleError(_0xde01x1a,_0xde01x1b){_0xde01x1b= _0xde01x1b|| 500;return function(_0xde01x2b){logger[_0x780d[44]](_0xde01x2b[_0x780d[43]]);if(_0xde01x2b[_0x780d[45]]){delete _0xde01x2b[_0x780d[45]]};_0xde01x1a[_0x780d[28]](_0xde01x1b)[_0x780d[46]](_0xde01x2b)}}exports[_0x780d[41]]= function(_0xde01x2c,_0xde01x1a){if(_0xde01x2c[_0x780d[48]][_0x780d[47]]){delete _0xde01x2c[_0x780d[48]][_0x780d[47]]};return db[_0x780d[52]][_0x780d[51]]({where:{id:_0xde01x2c[_0x780d[50]][_0x780d[47]]}})[_0x780d[40]](handleEntityNotFound(_0xde01x1a,null))[_0x780d[40]](saveUpdates(_0xde01x2c[_0x780d[48]],null))[_0x780d[40]](respondWithResult(_0xde01x1a,null))[_0x780d[49]](handleError(_0xde01x1a,null))};exports[_0x780d[42]]= function(_0xde01x2c,_0xde01x1a){return db[_0x780d[52]][_0x780d[51]]({where:{id:_0xde01x2c[_0x780d[50]][_0x780d[47]]}})[_0x780d[40]](handleEntityNotFound(_0xde01x1a,null))[_0x780d[40]](removeEntity(_0xde01x1a,null))[_0x780d[49]](handleError(_0xde01x1a,null))}
\ No newline at end of file
index e850af1..ca7cc4d 100644 (file)
@@ -1 +1 @@
-var _0x2f45=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x74\x6F\x6F\x6C\x73\x5F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x2f45[0];var _=require(_0x2f45[1]);var util=require(_0x2f45[2]);var logger=require(_0x2f45[4])(_0x2f45[3]);var moment=require(_0x2f45[5]);var BPromise=require(_0x2f45[6]);var rp=require(_0x2f45[7]);var attributes=require(_0x2f45[8]);module[_0x2f45[9]]= function(_0x179bx8,_0x179bx9){return _0x179bx8[_0x2f45[12]](_0x2f45[10],attributes,{tableName:_0x2f45[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x1b58=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x74\x6F\x6F\x6C\x73\x5F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x1b58[0];var _=require(_0x1b58[1]);var util=require(_0x1b58[2]);var logger=require(_0x1b58[4])(_0x1b58[3]);var moment=require(_0x1b58[5]);var BPromise=require(_0x1b58[6]);var rp=require(_0x1b58[7]);var attributes=require(_0x1b58[8]);module[_0x1b58[9]]= function(_0xb15ex8,_0xb15ex9){return _0xb15ex8[_0x1b58[12]](_0x1b58[10],attributes,{tableName:_0x1b58[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 5b792c1..c4d82f1 100644 (file)
@@ -1 +1 @@
-var _0x25b7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x25b7[0];var _=require(_0x25b7[1]);var util=require(_0x25b7[2]);var moment=require(_0x25b7[3]);var BPromise=require(_0x25b7[4]);var rs=require(_0x25b7[5]);var fs=require(_0x25b7[6]);var db=require(_0x25b7[8])[_0x25b7[7]];var utils=require(_0x25b7[9]);var logger=require(_0x25b7[11])(_0x25b7[10]);var config=require(_0x25b7[12]);var jayson=require(_0x25b7[13]);var client=jayson[_0x25b7[15]][_0x25b7[14]]({port:9002});function respondWithRpcPromise(_0x81f5xe,_0x81f5xf,_0x81f5x10){return  new BPromise(function(_0x81f5x11,_0x81f5x12){return client[_0x25b7[28]](_0x81f5xe,_0x81f5x10)[_0x25b7[27]](function(_0x81f5x14){logger[_0x25b7[20]](_0x25b7[16],_0x81f5xf,_0x25b7[19]);logger[_0x25b7[23]](_0x25b7[21],_0x81f5xf,_0x25b7[19],JSON[_0x25b7[22]](_0x81f5x14));if(_0x81f5x14[_0x25b7[17]]){if(_0x81f5x14[_0x25b7[17]][_0x25b7[24]]=== 500){logger[_0x25b7[17]](_0x25b7[16],_0x81f5xf,_0x81f5x14[_0x25b7[17]][_0x25b7[25]]);return _0x81f5x12(_0x81f5x14[_0x25b7[17]][_0x25b7[25]])};logger[_0x25b7[17]](_0x25b7[16],_0x81f5xf,_0x81f5x14[_0x25b7[17]][_0x25b7[25]]);return _0x81f5x11(_0x81f5x14[_0x25b7[17]][_0x25b7[25]])}else {logger[_0x25b7[20]](_0x25b7[16],_0x81f5xf,_0x25b7[19]);_0x81f5x11(_0x81f5x14[_0x25b7[26]][_0x25b7[25]])}})[_0x25b7[18]](function(_0x81f5x13){logger[_0x25b7[17]](_0x25b7[16],_0x81f5xf,_0x81f5x13);_0x81f5x12(_0x81f5x13)})})}
\ No newline at end of file
+var _0x9bda=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x9bda[0];var _=require(_0x9bda[1]);var util=require(_0x9bda[2]);var moment=require(_0x9bda[3]);var BPromise=require(_0x9bda[4]);var rs=require(_0x9bda[5]);var fs=require(_0x9bda[6]);var db=require(_0x9bda[8])[_0x9bda[7]];var utils=require(_0x9bda[9]);var logger=require(_0x9bda[11])(_0x9bda[10]);var config=require(_0x9bda[12]);var jayson=require(_0x9bda[13]);var client=jayson[_0x9bda[15]][_0x9bda[14]]({port:9002});function respondWithRpcPromise(_0x4d0exe,_0x4d0exf,_0x4d0ex10){return  new BPromise(function(_0x4d0ex11,_0x4d0ex12){return client[_0x9bda[28]](_0x4d0exe,_0x4d0ex10)[_0x9bda[27]](function(_0x4d0ex14){logger[_0x9bda[20]](_0x9bda[16],_0x4d0exf,_0x9bda[19]);logger[_0x9bda[23]](_0x9bda[21],_0x4d0exf,_0x9bda[19],JSON[_0x9bda[22]](_0x4d0ex14));if(_0x4d0ex14[_0x9bda[17]]){if(_0x4d0ex14[_0x9bda[17]][_0x9bda[24]]=== 500){logger[_0x9bda[17]](_0x9bda[16],_0x4d0exf,_0x4d0ex14[_0x9bda[17]][_0x9bda[25]]);return _0x4d0ex12(_0x4d0ex14[_0x9bda[17]][_0x9bda[25]])};logger[_0x9bda[17]](_0x9bda[16],_0x4d0exf,_0x4d0ex14[_0x9bda[17]][_0x9bda[25]]);return _0x4d0ex11(_0x4d0ex14[_0x9bda[17]][_0x9bda[25]])}else {logger[_0x9bda[20]](_0x9bda[16],_0x4d0exf,_0x9bda[19]);_0x4d0ex11(_0x4d0ex14[_0x9bda[26]][_0x9bda[25]])}})[_0x9bda[18]](function(_0x4d0ex13){logger[_0x9bda[17]](_0x9bda[16],_0x4d0exf,_0x4d0ex13);_0x4d0ex12(_0x4d0ex13)})})}
\ No newline at end of file
index 4334de2..ce8aaca 100644 (file)
@@ -1 +1 @@
-var _0x2f66=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2f66[0];var multer=require(_0x2f66[1]);var util=require(_0x2f66[2]);var path=require(_0x2f66[3]);var express=require(_0x2f66[4]);var router=express.Router();var auth=require(_0x2f66[5]);var interaction=require(_0x2f66[6]);var config=require(_0x2f66[7]);var controller=require(_0x2f66[8]);router[_0x2f66[12]](_0x2f66[9],auth[_0x2f66[10]](),controller[_0x2f66[11]]);router[_0x2f66[14]](_0x2f66[9],auth[_0x2f66[10]](),controller[_0x2f66[13]]);module[_0x2f66[15]]= router
\ No newline at end of file
+var _0xa834=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xa834[0];var multer=require(_0xa834[1]);var util=require(_0xa834[2]);var path=require(_0xa834[3]);var express=require(_0xa834[4]);var router=express.Router();var auth=require(_0xa834[5]);var interaction=require(_0xa834[6]);var config=require(_0xa834[7]);var controller=require(_0xa834[8]);router[_0xa834[12]](_0xa834[9],auth[_0xa834[10]](),controller[_0xa834[11]]);router[_0xa834[14]](_0xa834[9],auth[_0xa834[10]](),controller[_0xa834[13]]);module[_0xa834[15]]= router
\ No newline at end of file
index 361a28a..a90b1ef 100644 (file)
@@ -1 +1 @@
-var _0xb2c1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65"];_0xb2c1[0];var Sequelize=require(_0xb2c1[1]);module[_0xb2c1[2]]= {name:{type:Sequelize[_0xb2c1[3]],allowNull:false,unique:_0xb2c1[4]},description:{type:Sequelize[_0xb2c1[3]]}}
\ No newline at end of file
+var _0x606c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65"];_0x606c[0];var Sequelize=require(_0x606c[1]);module[_0x606c[2]]= {name:{type:Sequelize[_0x606c[3]],allowNull:false,unique:_0x606c[4]},description:{type:Sequelize[_0x606c[3]]}}
\ No newline at end of file
index 9e6f921..3f3f8b8 100644 (file)
@@ -1 +1 @@
-var _0xb16e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x6C\x6F\x6E\x65","\x67\x65\x74","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x6F\x6D\x69\x74","\x61\x74\x74\x72\x55\x72\x6C","\x61\x74\x74\x72\x73","\x76\x61\x6C\x75\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F","\x69\x66\x72\x61\x6D\x65","\x61\x74\x74\x72\x50\x61\x74\x68","","\x63\x75\x73\x74\x6F\x6D","\x61\x74\x74\x72\x48\x6F\x75\x72\x46\x6F\x72\x6D\x61\x74","\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x61\x74\x74\x72\x54\x69\x6D\x65\x7A\x6F\x6E\x65","\x30\x2E\x30\x30","\x61\x74\x74\x72\x46\x6F\x6E\x74\x53\x69\x7A\x65","\x63\x6C\x6F\x63\x6B","\x61\x74\x74\x72\x4D\x65\x74\x72\x69\x63","\x74\x6F\x74\x61\x6C","\x61\x74\x74\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x63\x6F\x75\x6E\x74\x65\x72","\x6D\x75\x6C\x74\x69\x62\x61\x72\x2D\x63\x68\x61\x72\x74","\x61\x74\x74\x72\x53\x65\x72\x69\x65\x31","\x61\x74\x74\x72\x53\x65\x72\x69\x65\x32","\x61\x74\x74\x72\x53\x65\x72\x69\x65\x33","\x70\x69\x65\x2D\x63\x68\x61\x72\x74","\x61\x74\x74\x72\x52\x65\x70\x6F\x72\x74","\x61\x74\x74\x72\x52\x65\x66\x72\x65\x73\x68","\x77\x65\x62\x2D\x72\x65\x70\x6F\x72\x74","\x74\x79\x70\x65","\x77\x69\x64\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73\x3A\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x61\x64\x64\x49\x74\x65\x6D","\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x64","\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D","\x67\x65\x74\x49\x74\x65\x6D\x73","\x66\x69\x6E\x64\x4F\x6E\x65"];_0xb16e[0];var jsonpatch=require(_0xb16e[1]);var rp=require(_0xb16e[2]);var moment=require(_0xb16e[3]);var BPromise=require(_0xb16e[4]);var Mustache=require(_0xb16e[5]);var util=require(_0xb16e[6]);var path=require(_0xb16e[7]);var sox=require(_0xb16e[8]);var csv=require(_0xb16e[9]);var ejs=require(_0xb16e[10]);var fs=require(_0xb16e[11]);var _=require(_0xb16e[12]);var squel=require(_0xb16e[13]);var crypto=require(_0xb16e[14]);var jsforce=require(_0xb16e[15]);var deskjs=require(_0xb16e[16]);var toCsv=require(_0xb16e[9]);var querystring=require(_0xb16e[17]);var Papa=require(_0xb16e[18]);var qs=require(_0xb16e[19]);var logger=require(_0xb16e[21])(_0xb16e[20]);var utils=require(_0xb16e[22]);var config=require(_0xb16e[23]);var db=require(_0xb16e[25])[_0xb16e[24]];var socket=require(_0xb16e[27])({host:_0xb16e[26],port:6379});require(_0xb16e[29])[_0xb16e[28]](socket);function respondWithStatusCode(_0x8359x1b,_0x8359x1c){_0x8359x1c= _0x8359x1c|| 204;return function(_0x8359x1d){if(_0x8359x1d){return _0x8359x1b[_0xb16e[30]](_0x8359x1c)};return _0x8359x1b[_0xb16e[32]](_0x8359x1c)[_0xb16e[31]]()}}function respondWithResult(_0x8359x1b,_0x8359x1c){_0x8359x1c= _0x8359x1c|| 200;return function(_0x8359x1d){if(_0x8359x1d){return _0x8359x1b[_0xb16e[32]](_0x8359x1c)[_0xb16e[33]](_0x8359x1d)}}}function respondWithFilteredResult(_0x8359x1b,_0x8359x20){return function(_0x8359x1d){if(_0x8359x1d){var _0x8359x21=_0x8359x1d[_0xb16e[34]],_0x8359x22=_0x8359x20[_0xb16e[35]],_0x8359x23=_0x8359x20[_0xb16e[35]]+ _0x8359x20[_0xb16e[36]],_0x8359x1c;if(_0x8359x23>= _0x8359x21){_0x8359x23= _0x8359x21;_0x8359x1c= 200}else {_0x8359x1c= 206};_0x8359x1b[_0xb16e[32]](_0x8359x1c);return _0x8359x1b[_0xb16e[40]](_0xb16e[37],_0x8359x22+ _0xb16e[38]+ _0x8359x23+ _0xb16e[39]+ _0x8359x21)[_0xb16e[33]](_0x8359x1d)};return null}}function patchUpdates(_0x8359x25){return function(_0x8359x1d){try{jsonpatch[_0xb16e[41]](_0x8359x1d,_0x8359x25,true)}catch(err){return BPromise[_0xb16e[42]](err)};return _0x8359x1d[_0xb16e[43]]()}}function saveUpdates(_0x8359x27,_0x8359x1c){return function(_0x8359x1d){if(_0x8359x1d){return _0x8359x1d[_0xb16e[45]](_0x8359x27)[_0xb16e[44]](function(_0x8359x28){return _0x8359x28})};return null}}function removeEntity(_0x8359x1b,_0x8359x1c){return function(_0x8359x1d){if(_0x8359x1d){return _0x8359x1d[_0xb16e[46]]()[_0xb16e[44]](function(){_0x8359x1b[_0xb16e[32]](204)[_0xb16e[31]]()})}}}function handleEntityNotFound(_0x8359x1b,_0x8359x1c){return function(_0x8359x1d){if(!_0x8359x1d){_0x8359x1b[_0xb16e[30]](404)};return _0x8359x1d}}function handleError(_0x8359x1b,_0x8359x1c){_0x8359x1c= _0x8359x1c|| 500;return function(_0x8359x2c){logger[_0xb16e[48]](_0x8359x2c[_0xb16e[47]]);if(_0x8359x2c[_0xb16e[49]]){delete _0x8359x2c[_0xb16e[49]]};_0x8359x1b[_0xb16e[32]](_0x8359x1c)[_0xb16e[50]](_0x8359x2c)}}exports[_0xb16e[51]]= function(_0x8359x2d,_0x8359x1b){var _0x8359x20={},_0x8359x2e={},_0x8359x2f={count:0,rows:[]};_0x8359x2e[_0xb16e[52]]= _[_0xb16e[55]](db[_0xb16e[54]][_0xb16e[53]]);var _0x8359x30={dateStart:_0x8359x2d[_0xb16e[57]][_0xb16e[56]],dateEnd:_0x8359x2d[_0xb16e[57]][_0xb16e[58]]};delete _0x8359x2d[_0xb16e[57]][_0xb16e[56]];delete _0x8359x2d[_0xb16e[57]][_0xb16e[58]];_0x8359x2e[_0xb16e[57]]= _[_0xb16e[55]](_0x8359x2d[_0xb16e[57]]);_0x8359x2e[_0xb16e[59]]= _[_0xb16e[60]](_0x8359x2e[_0xb16e[52]],_0x8359x2e[_0xb16e[57]]);_0x8359x20[_0xb16e[61]]= _[_0xb16e[60]](_0x8359x2e[_0xb16e[52]],qs[_0xb16e[62]](_0x8359x2d[_0xb16e[57]][_0xb16e[62]]));_0x8359x20[_0xb16e[61]]= (_0x8359x20[_0xb16e[61]][_0xb16e[63]])?_0x8359x20[_0xb16e[61]]:_0x8359x2e[_0xb16e[52]];if(!_0x8359x2d[_0xb16e[57]][_0xb16e[65]](_0xb16e[64])){_0x8359x20[_0xb16e[36]]= qs[_0xb16e[36]](_0x8359x2d[_0xb16e[57]][_0xb16e[36]]);_0x8359x20[_0xb16e[35]]= qs[_0xb16e[35]](_0x8359x2d[_0xb16e[57]][_0xb16e[35]])};_0x8359x20[_0xb16e[66]]= qs[_0xb16e[67]](_0x8359x2d[_0xb16e[57]][_0xb16e[67]]);_0x8359x20[_0xb16e[68]]= qs[_0xb16e[59]](_[_0xb16e[69]](_0x8359x2d[_0xb16e[57]],_0x8359x2e[_0xb16e[59]]));if(_0x8359x30[_0xb16e[56]]){if(_0x8359x30[_0xb16e[58]]){_0x8359x30[_0xb16e[58]]= moment(_0x8359x30[_0xb16e[58]])[_0xb16e[71]](1,_0xb16e[70])}else {_0x8359x30[_0xb16e[58]]= moment(_0x8359x30[_0xb16e[56]])[_0xb16e[71]](1,_0xb16e[70])};_[_0xb16e[72]](_0x8359x20[_0xb16e[68]],{createdAt:{$gte:_0x8359x30[_0xb16e[56]],$lte:_0x8359x30[_0xb16e[58]]}})};if(_0x8359x2d[_0xb16e[57]][_0xb16e[73]]){_0x8359x20[_0xb16e[68]]= _[_0xb16e[72]](_0x8359x20[_0xb16e[68]],{$or:_[_0xb16e[75]](_0x8359x20[_0xb16e[61]],function(_0x8359x31){var _0x8359x2f={};_0x8359x2f[_0x8359x31]= {$like:_0xb16e[74]+ _0x8359x2d[_0xb16e[57]][_0xb16e[73]]+ _0xb16e[74]};return _0x8359x2f})})};_0x8359x20= _[_0xb16e[72]]({},_0x8359x20,_0x8359x2d[_0xb16e[76]]);var _0x8359x32={where:_0x8359x20[_0xb16e[68]]};return db[_0xb16e[54]][_0xb16e[34]](_0x8359x32)[_0xb16e[44]](function(_0x8359x21){_0x8359x2f[_0xb16e[34]]= _0x8359x21;if(_0x8359x2d[_0xb16e[57]][_0xb16e[79]]){_0x8359x20[_0xb16e[80]]= [{all:true}]};return db[_0xb16e[54]][_0xb16e[81]](_0x8359x20)})[_0xb16e[44]](function(_0x8359x33){_0x8359x2f[_0xb16e[78]]= _0x8359x33;return _0x8359x2f})[_0xb16e[44]](respondWithFilteredResult(_0x8359x1b,_0x8359x20))[_0xb16e[77]](handleError(_0x8359x1b,null))};exports[_0xb16e[82]]= function(_0x8359x2d,_0x8359x1b){var _0x8359x20={raw:false,where:{id:_0x8359x2d[_0xb16e[84]][_0xb16e[83]]}},_0x8359x2e={};_0x8359x2e[_0xb16e[52]]= _[_0xb16e[55]](db[_0xb16e[54]][_0xb16e[53]]);_0x8359x2e[_0xb16e[57]]= _[_0xb16e[55]](_0x8359x2d[_0xb16e[57]]);_0x8359x2e[_0xb16e[59]]= _[_0xb16e[60]](_0x8359x2e[_0xb16e[52]],_0x8359x2e[_0xb16e[57]]);_0x8359x20[_0xb16e[61]]= _[_0xb16e[60]](_0x8359x2e[_0xb16e[52]],qs[_0xb16e[62]](_0x8359x2d[_0xb16e[57]][_0xb16e[62]]));_0x8359x20[_0xb16e[61]]= (_0x8359x20[_0xb16e[61]][_0xb16e[63]])?_0x8359x20[_0xb16e[61]]:_0x8359x2e[_0xb16e[52]];if(_0x8359x2d[_0xb16e[57]][_0xb16e[79]]){_0x8359x20[_0xb16e[80]]= [{all:true}]};_0x8359x20= _[_0xb16e[72]]({},_0x8359x20,_0x8359x2d[_0xb16e[76]]);return db[_0xb16e[54]][_0xb16e[85]](_0x8359x20)[_0xb16e[44]](handleEntityNotFound(_0x8359x1b,null))[_0xb16e[44]](respondWithResult(_0x8359x1b,null))[_0xb16e[77]](handleError(_0x8359x1b,null))};exports[_0xb16e[86]]= function(_0x8359x2d,_0x8359x1b){return db[_0xb16e[54]][_0xb16e[86]](_0x8359x2d[_0xb16e[87]],{})[_0xb16e[44]](respondWithResult(_0x8359x1b,201))[_0xb16e[77]](handleError(_0x8359x1b,null))};exports[_0xb16e[88]]= function(_0x8359x2d,_0x8359x1b){var _0x8359x20={raw:false,where:{id:_0x8359x2d[_0xb16e[84]][_0xb16e[83]]}},_0x8359x2e={};_0x8359x2e[_0xb16e[52]]= _[_0xb16e[55]](db[_0xb16e[54]][_0xb16e[53]]);_0x8359x20[_0xb16e[61]]= _[_0xb16e[60]](_0x8359x2e[_0xb16e[52]],qs[_0xb16e[62]](_0x8359x2d[_0xb16e[57]][_0xb16e[62]]));_0x8359x20[_0xb16e[61]]= (_0x8359x20[_0xb16e[61]][_0xb16e[63]])?_0x8359x20[_0xb16e[61]]:_0x8359x2e[_0xb16e[52]];if(_0x8359x2d[_0xb16e[57]][_0xb16e[79]]){_0x8359x20[_0xb16e[80]]= [{all:true}]};_0x8359x20= _[_0xb16e[72]]({},_0x8359x20,_0x8359x2d[_0xb16e[76]]);return db[_0xb16e[54]][_0xb16e[85]](_0x8359x20)[_0xb16e[44]](handleEntityNotFound(_0x8359x1b,null))[_0xb16e[44]](function(_0x8359x1d){if(_0x8359x1d){var _0x8359x34=_0x8359x1d[_0xb16e[89]]({plain:true});_0x8359x34= qs[_0xb16e[92]](_0x8359x34,[_0xb16e[83],_0xb16e[90],_0xb16e[91]]);_0x8359x2d[_0xb16e[87]]= _[_0xb16e[92]](_0x8359x2d[_0xb16e[87]],[_0xb16e[83],_0xb16e[90],_0xb16e[91]]);return db[_0xb16e[54]][_0xb16e[86]](_[_0xb16e[72]](_0x8359x34,_0x8359x2d[_0xb16e[87]]),{include:_0x8359x2d[_0xb16e[57]][_0xb16e[79]]?[{all:true}]:undefined})}})[_0xb16e[44]](respondWithResult(_0x8359x1b,201))[_0xb16e[77]](handleError(_0x8359x1b,null))};exports[_0xb16e[45]]= function(_0x8359x2d,_0x8359x1b){if(_0x8359x2d[_0xb16e[87]][_0xb16e[83]]){delete _0x8359x2d[_0xb16e[87]][_0xb16e[83]]};return db[_0xb16e[54]][_0xb16e[85]]({where:{id:_0x8359x2d[_0xb16e[84]][_0xb16e[83]]}})[_0xb16e[44]](handleEntityNotFound(_0x8359x1b,null))[_0xb16e[44]](saveUpdates(_0x8359x2d[_0xb16e[87]],null))[_0xb16e[44]](respondWithResult(_0x8359x1b,null))[_0xb16e[77]](handleError(_0x8359x1b,null))};exports[_0xb16e[46]]= function(_0x8359x2d,_0x8359x1b){return db[_0xb16e[54]][_0xb16e[85]]({where:{id:_0x8359x2d[_0xb16e[84]][_0xb16e[83]]}})[_0xb16e[44]](handleEntityNotFound(_0x8359x1b,null))[_0xb16e[44]](removeEntity(_0x8359x1b,null))[_0xb16e[77]](handleError(_0x8359x1b,null))};function widgetAttributes(_0x8359x36){try{switch(_0x8359x36[_0xb16e[119]]){case _0xb16e[97]:return [{name:_0xb16e[93],value:_0x8359x36[_0xb16e[93]]|| (_0x8359x36[_0xb16e[94]]&& _0x8359x36[_0xb16e[94]][0]?_0x8359x36[_0xb16e[94]][0][_0xb16e[95]]:undefined)|| _0xb16e[96]}];case _0xb16e[100]:return [{name:_0xb16e[98],value:_0x8359x36[_0xb16e[98]]|| (_0x8359x36[_0xb16e[94]]&& _0x8359x36[_0xb16e[94]][0]?_0x8359x36[_0xb16e[94]][0][_0xb16e[95]]:undefined)|| _0xb16e[99]}];case _0xb16e[106]:return [{name:_0xb16e[101],value:_0x8359x36[_0xb16e[101]]|| (_0x8359x36[_0xb16e[94]]&& _0x8359x36[_0xb16e[94]][0]?_0x8359x36[_0xb16e[94]][0][_0xb16e[95]]:undefined)|| _0xb16e[102]},{name:_0xb16e[103],value:_0x8359x36[_0xb16e[103]]|| (_0x8359x36[_0xb16e[94]]&& _0x8359x36[_0xb16e[94]][1]?_0x8359x36[_0xb16e[94]][1][_0xb16e[95]]:undefined)|| _0xb16e[104]},{name:_0xb16e[105],value:_0x8359x36[_0xb16e[105]]|| (_0x8359x36[_0xb16e[94]]&& _0x8359x36[_0xb16e[94]][2]?_0x8359x36[_0xb16e[94]][2][_0xb16e[95]]:undefined)|| 12}];case _0xb16e[110]:return [{name:_0xb16e[107],value:_0x8359x36[_0xb16e[107]]|| (_0x8359x36[_0xb16e[94]]&& _0x8359x36[_0xb16e[94]][0]?_0x8359x36[_0xb16e[94]][0][_0xb16e[95]]:undefined)|| _0xb16e[108]},{name:_0xb16e[109],value:_0x8359x36[_0xb16e[109]]|| (_0x8359x36[_0xb16e[94]]&& _0x8359x36[_0xb16e[94]][1]?_0x8359x36[_0xb16e[94]][1][_0xb16e[95]]:undefined)|| []},{name:_0xb16e[105],value:_0x8359x36[_0xb16e[105]]|| (_0x8359x36[_0xb16e[94]]&& _0x8359x36[_0xb16e[94]][2]?_0x8359x36[_0xb16e[94]][2][_0xb16e[95]]:undefined)|| 20}];case _0xb16e[111]:;case _0xb16e[115]:return [{name:_0xb16e[112],value:_0x8359x36[_0xb16e[112]]|| (_0x8359x36[_0xb16e[94]]&& _0x8359x36[_0xb16e[94]][0]?_0x8359x36[_0xb16e[94]][0][_0xb16e[95]]:undefined)|| _0xb16e[108]},{name:_0xb16e[113],value:_0x8359x36[_0xb16e[113]]|| (_0x8359x36[_0xb16e[94]]&& _0x8359x36[_0xb16e[94]][1]?_0x8359x36[_0xb16e[94]][1][_0xb16e[95]]:undefined)|| null},{name:_0xb16e[114],value:_0x8359x36[_0xb16e[114]]|| (_0x8359x36[_0xb16e[94]]&& _0x8359x36[_0xb16e[94]][2]?_0x8359x36[_0xb16e[94]][2][_0xb16e[95]]:undefined)|| null},{name:_0xb16e[109],value:_0x8359x36[_0xb16e[109]]|| (_0x8359x36[_0xb16e[94]]&& _0x8359x36[_0xb16e[94]][3]?_0x8359x36[_0xb16e[94]][3][_0xb16e[95]]:undefined)|| []}];case _0xb16e[118]:return [{name:_0xb16e[116],value:_0x8359x36[_0xb16e[116]]|| (_0x8359x36[_0xb16e[94]]&& _0x8359x36[_0xb16e[94]][0]?_0x8359x36[_0xb16e[94]][0][_0xb16e[95]]:undefined)|| null},{name:_0xb16e[117],value:_0x8359x36[_0xb16e[117]]|| (_0x8359x36[_0xb16e[94]]&& _0x8359x36[_0xb16e[94]][1]?_0x8359x36[_0xb16e[94]][1][_0xb16e[95]]:undefined)|| 0}];default:return []}}catch(e){logger[_0xb16e[48]](_0xb16e[120],JSON[_0xb16e[121]](e));return []}}exports[_0xb16e[122]]= function(_0x8359x2d,_0x8359x1b,_0x8359x37){if(_0x8359x2d[_0xb16e[87]][_0xb16e[83]]){delete _0x8359x2d[_0xb16e[87]][_0xb16e[83]]};return db[_0xb16e[54]][_0xb16e[85]]({where:{id:_0x8359x2d[_0xb16e[84]][_0xb16e[83]]}})[_0xb16e[44]](handleEntityNotFound(_0x8359x1b,null))[_0xb16e[44]](function(_0x8359x1d){if(_0x8359x1d){_0x8359x2d[_0xb16e[87]][_0xb16e[123]]= _0x8359x1d[_0xb16e[83]];_0x8359x2d[_0xb16e[87]][_0xb16e[94]]= widgetAttributes(_0x8359x2d[_0xb16e[87]]);return db[_0xb16e[124]][_0xb16e[86]](_0x8359x2d[_0xb16e[87]])}})[_0xb16e[44]](respondWithResult(_0x8359x1b,null))[_0xb16e[77]](handleError(_0x8359x1b,null))};exports[_0xb16e[125]]= function(_0x8359x2d,_0x8359x1d,_0x8359x37){var _0x8359x20={};var _0x8359x2e={};var _0x8359x38;var _0x8359x21;return db[_0xb16e[54]][_0xb16e[126]]({where:{id:_0x8359x2d[_0xb16e[84]][_0xb16e[83]]}})[_0xb16e[44]](handleEntityNotFound(_0x8359x1d,null))[_0xb16e[44]](function(_0x8359x1d){if(_0x8359x1d){_0x8359x38= _0x8359x1d;_0x8359x2e[_0xb16e[52]]= _[_0xb16e[55]](db[_0xb16e[124]][_0xb16e[53]]);_0x8359x2e[_0xb16e[57]]= _[_0xb16e[55]](_0x8359x2d[_0xb16e[57]]);_0x8359x2e[_0xb16e[59]]= _[_0xb16e[60]](_0x8359x2e[_0xb16e[52]],_0x8359x2e[_0xb16e[57]]);_0x8359x20[_0xb16e[61]]= _[_0xb16e[60]](_0x8359x2e[_0xb16e[52]],qs[_0xb16e[62]](_0x8359x2d[_0xb16e[57]][_0xb16e[62]]));_0x8359x20[_0xb16e[61]]= (_0x8359x20[_0xb16e[61]][_0xb16e[63]])?_0x8359x20[_0xb16e[61]]:_0x8359x2e[_0xb16e[52]];_0x8359x20[_0xb16e[66]]= qs[_0xb16e[67]](_0x8359x2d[_0xb16e[57]][_0xb16e[67]]);_0x8359x20[_0xb16e[68]]= qs[_0xb16e[59]](_[_0xb16e[69]](_0x8359x2d[_0xb16e[57]],_0x8359x2e[_0xb16e[59]]));if(_0x8359x2d[_0xb16e[57]][_0xb16e[73]]){_0x8359x20[_0xb16e[68]]= _[_0xb16e[72]](_0x8359x20[_0xb16e[68]],{$or:_[_0xb16e[75]](_0x8359x20[_0xb16e[61]],function(_0x8359x31){var _0x8359x2f={};_0x8359x2f[_0x8359x31]= {$like:_0xb16e[74]+ _0x8359x2d[_0xb16e[57]][_0xb16e[73]]+ _0xb16e[74]};return _0x8359x2f})})};_0x8359x20= _[_0xb16e[72]]({},_0x8359x20,_0x8359x2d[_0xb16e[76]]);return _0x8359x38[_0xb16e[125]](_0x8359x20)}})[_0xb16e[44]](function(_0x8359x39){if(_0x8359x39){_0x8359x21= _0x8359x39[_0xb16e[63]];if(!_0x8359x2d[_0xb16e[57]][_0xb16e[65]](_0xb16e[64])){_0x8359x20[_0xb16e[36]]= qs[_0xb16e[36]](_0x8359x2d[_0xb16e[57]][_0xb16e[36]]);_0x8359x20[_0xb16e[35]]= qs[_0xb16e[35]](_0x8359x2d[_0xb16e[57]][_0xb16e[35]])};return _0x8359x38[_0xb16e[125]](_0x8359x20)}})[_0xb16e[44]](function(_0x8359x33){if(_0x8359x33){return _0x8359x33?{count:_0x8359x21,rows:_0x8359x33}:null}})[_0xb16e[44]](respondWithResult(_0x8359x1d,null))[_0xb16e[77]](handleError(_0x8359x1d,null))}
\ No newline at end of file
+var _0xa37f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x6C\x6F\x6E\x65","\x67\x65\x74","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x6F\x6D\x69\x74","\x61\x74\x74\x72\x55\x72\x6C","\x61\x74\x74\x72\x73","\x76\x61\x6C\x75\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F","\x69\x66\x72\x61\x6D\x65","\x61\x74\x74\x72\x50\x61\x74\x68","","\x63\x75\x73\x74\x6F\x6D","\x61\x74\x74\x72\x48\x6F\x75\x72\x46\x6F\x72\x6D\x61\x74","\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x61\x74\x74\x72\x54\x69\x6D\x65\x7A\x6F\x6E\x65","\x30\x2E\x30\x30","\x61\x74\x74\x72\x46\x6F\x6E\x74\x53\x69\x7A\x65","\x63\x6C\x6F\x63\x6B","\x61\x74\x74\x72\x4D\x65\x74\x72\x69\x63","\x74\x6F\x74\x61\x6C","\x61\x74\x74\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x63\x6F\x75\x6E\x74\x65\x72","\x6D\x75\x6C\x74\x69\x62\x61\x72\x2D\x63\x68\x61\x72\x74","\x61\x74\x74\x72\x53\x65\x72\x69\x65\x31","\x61\x74\x74\x72\x53\x65\x72\x69\x65\x32","\x61\x74\x74\x72\x53\x65\x72\x69\x65\x33","\x70\x69\x65\x2D\x63\x68\x61\x72\x74","\x61\x74\x74\x72\x52\x65\x70\x6F\x72\x74","\x61\x74\x74\x72\x52\x65\x66\x72\x65\x73\x68","\x77\x65\x62\x2D\x72\x65\x70\x6F\x72\x74","\x74\x79\x70\x65","\x77\x69\x64\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73\x3A\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x61\x64\x64\x49\x74\x65\x6D","\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x64","\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D","\x67\x65\x74\x49\x74\x65\x6D\x73","\x66\x69\x6E\x64\x4F\x6E\x65"];_0xa37f[0];var jsonpatch=require(_0xa37f[1]);var rp=require(_0xa37f[2]);var moment=require(_0xa37f[3]);var BPromise=require(_0xa37f[4]);var Mustache=require(_0xa37f[5]);var util=require(_0xa37f[6]);var path=require(_0xa37f[7]);var sox=require(_0xa37f[8]);var csv=require(_0xa37f[9]);var ejs=require(_0xa37f[10]);var fs=require(_0xa37f[11]);var _=require(_0xa37f[12]);var squel=require(_0xa37f[13]);var crypto=require(_0xa37f[14]);var jsforce=require(_0xa37f[15]);var deskjs=require(_0xa37f[16]);var toCsv=require(_0xa37f[9]);var querystring=require(_0xa37f[17]);var Papa=require(_0xa37f[18]);var qs=require(_0xa37f[19]);var logger=require(_0xa37f[21])(_0xa37f[20]);var utils=require(_0xa37f[22]);var config=require(_0xa37f[23]);var db=require(_0xa37f[25])[_0xa37f[24]];var socket=require(_0xa37f[27])({host:_0xa37f[26],port:6379});require(_0xa37f[29])[_0xa37f[28]](socket);function respondWithStatusCode(_0x9c4ex1b,_0x9c4ex1c){_0x9c4ex1c= _0x9c4ex1c|| 204;return function(_0x9c4ex1d){if(_0x9c4ex1d){return _0x9c4ex1b[_0xa37f[30]](_0x9c4ex1c)};return _0x9c4ex1b[_0xa37f[32]](_0x9c4ex1c)[_0xa37f[31]]()}}function respondWithResult(_0x9c4ex1b,_0x9c4ex1c){_0x9c4ex1c= _0x9c4ex1c|| 200;return function(_0x9c4ex1d){if(_0x9c4ex1d){return _0x9c4ex1b[_0xa37f[32]](_0x9c4ex1c)[_0xa37f[33]](_0x9c4ex1d)}}}function respondWithFilteredResult(_0x9c4ex1b,_0x9c4ex20){return function(_0x9c4ex1d){if(_0x9c4ex1d){var _0x9c4ex21=_0x9c4ex1d[_0xa37f[34]],_0x9c4ex22=_0x9c4ex20[_0xa37f[35]],_0x9c4ex23=_0x9c4ex20[_0xa37f[35]]+ _0x9c4ex20[_0xa37f[36]],_0x9c4ex1c;if(_0x9c4ex23>= _0x9c4ex21){_0x9c4ex23= _0x9c4ex21;_0x9c4ex1c= 200}else {_0x9c4ex1c= 206};_0x9c4ex1b[_0xa37f[32]](_0x9c4ex1c);return _0x9c4ex1b[_0xa37f[40]](_0xa37f[37],_0x9c4ex22+ _0xa37f[38]+ _0x9c4ex23+ _0xa37f[39]+ _0x9c4ex21)[_0xa37f[33]](_0x9c4ex1d)};return null}}function patchUpdates(_0x9c4ex25){return function(_0x9c4ex1d){try{jsonpatch[_0xa37f[41]](_0x9c4ex1d,_0x9c4ex25,true)}catch(err){return BPromise[_0xa37f[42]](err)};return _0x9c4ex1d[_0xa37f[43]]()}}function saveUpdates(_0x9c4ex27,_0x9c4ex1c){return function(_0x9c4ex1d){if(_0x9c4ex1d){return _0x9c4ex1d[_0xa37f[45]](_0x9c4ex27)[_0xa37f[44]](function(_0x9c4ex28){return _0x9c4ex28})};return null}}function removeEntity(_0x9c4ex1b,_0x9c4ex1c){return function(_0x9c4ex1d){if(_0x9c4ex1d){return _0x9c4ex1d[_0xa37f[46]]()[_0xa37f[44]](function(){_0x9c4ex1b[_0xa37f[32]](204)[_0xa37f[31]]()})}}}function handleEntityNotFound(_0x9c4ex1b,_0x9c4ex1c){return function(_0x9c4ex1d){if(!_0x9c4ex1d){_0x9c4ex1b[_0xa37f[30]](404)};return _0x9c4ex1d}}function handleError(_0x9c4ex1b,_0x9c4ex1c){_0x9c4ex1c= _0x9c4ex1c|| 500;return function(_0x9c4ex2c){logger[_0xa37f[48]](_0x9c4ex2c[_0xa37f[47]]);if(_0x9c4ex2c[_0xa37f[49]]){delete _0x9c4ex2c[_0xa37f[49]]};_0x9c4ex1b[_0xa37f[32]](_0x9c4ex1c)[_0xa37f[50]](_0x9c4ex2c)}}exports[_0xa37f[51]]= function(_0x9c4ex2d,_0x9c4ex1b){var _0x9c4ex20={},_0x9c4ex2e={},_0x9c4ex2f={count:0,rows:[]};_0x9c4ex2e[_0xa37f[52]]= _[_0xa37f[55]](db[_0xa37f[54]][_0xa37f[53]]);var _0x9c4ex30={dateStart:_0x9c4ex2d[_0xa37f[57]][_0xa37f[56]],dateEnd:_0x9c4ex2d[_0xa37f[57]][_0xa37f[58]]};delete _0x9c4ex2d[_0xa37f[57]][_0xa37f[56]];delete _0x9c4ex2d[_0xa37f[57]][_0xa37f[58]];_0x9c4ex2e[_0xa37f[57]]= _[_0xa37f[55]](_0x9c4ex2d[_0xa37f[57]]);_0x9c4ex2e[_0xa37f[59]]= _[_0xa37f[60]](_0x9c4ex2e[_0xa37f[52]],_0x9c4ex2e[_0xa37f[57]]);_0x9c4ex20[_0xa37f[61]]= _[_0xa37f[60]](_0x9c4ex2e[_0xa37f[52]],qs[_0xa37f[62]](_0x9c4ex2d[_0xa37f[57]][_0xa37f[62]]));_0x9c4ex20[_0xa37f[61]]= (_0x9c4ex20[_0xa37f[61]][_0xa37f[63]])?_0x9c4ex20[_0xa37f[61]]:_0x9c4ex2e[_0xa37f[52]];if(!_0x9c4ex2d[_0xa37f[57]][_0xa37f[65]](_0xa37f[64])){_0x9c4ex20[_0xa37f[36]]= qs[_0xa37f[36]](_0x9c4ex2d[_0xa37f[57]][_0xa37f[36]]);_0x9c4ex20[_0xa37f[35]]= qs[_0xa37f[35]](_0x9c4ex2d[_0xa37f[57]][_0xa37f[35]])};_0x9c4ex20[_0xa37f[66]]= qs[_0xa37f[67]](_0x9c4ex2d[_0xa37f[57]][_0xa37f[67]]);_0x9c4ex20[_0xa37f[68]]= qs[_0xa37f[59]](_[_0xa37f[69]](_0x9c4ex2d[_0xa37f[57]],_0x9c4ex2e[_0xa37f[59]]));if(_0x9c4ex30[_0xa37f[56]]){if(_0x9c4ex30[_0xa37f[58]]){_0x9c4ex30[_0xa37f[58]]= moment(_0x9c4ex30[_0xa37f[58]])[_0xa37f[71]](1,_0xa37f[70])}else {_0x9c4ex30[_0xa37f[58]]= moment(_0x9c4ex30[_0xa37f[56]])[_0xa37f[71]](1,_0xa37f[70])};_[_0xa37f[72]](_0x9c4ex20[_0xa37f[68]],{createdAt:{$gte:_0x9c4ex30[_0xa37f[56]],$lte:_0x9c4ex30[_0xa37f[58]]}})};if(_0x9c4ex2d[_0xa37f[57]][_0xa37f[73]]){_0x9c4ex20[_0xa37f[68]]= _[_0xa37f[72]](_0x9c4ex20[_0xa37f[68]],{$or:_[_0xa37f[75]](_0x9c4ex20[_0xa37f[61]],function(_0x9c4ex31){var _0x9c4ex2f={};_0x9c4ex2f[_0x9c4ex31]= {$like:_0xa37f[74]+ _0x9c4ex2d[_0xa37f[57]][_0xa37f[73]]+ _0xa37f[74]};return _0x9c4ex2f})})};_0x9c4ex20= _[_0xa37f[72]]({},_0x9c4ex20,_0x9c4ex2d[_0xa37f[76]]);var _0x9c4ex32={where:_0x9c4ex20[_0xa37f[68]]};return db[_0xa37f[54]][_0xa37f[34]](_0x9c4ex32)[_0xa37f[44]](function(_0x9c4ex21){_0x9c4ex2f[_0xa37f[34]]= _0x9c4ex21;if(_0x9c4ex2d[_0xa37f[57]][_0xa37f[79]]){_0x9c4ex20[_0xa37f[80]]= [{all:true}]};return db[_0xa37f[54]][_0xa37f[81]](_0x9c4ex20)})[_0xa37f[44]](function(_0x9c4ex33){_0x9c4ex2f[_0xa37f[78]]= _0x9c4ex33;return _0x9c4ex2f})[_0xa37f[44]](respondWithFilteredResult(_0x9c4ex1b,_0x9c4ex20))[_0xa37f[77]](handleError(_0x9c4ex1b,null))};exports[_0xa37f[82]]= function(_0x9c4ex2d,_0x9c4ex1b){var _0x9c4ex20={raw:false,where:{id:_0x9c4ex2d[_0xa37f[84]][_0xa37f[83]]}},_0x9c4ex2e={};_0x9c4ex2e[_0xa37f[52]]= _[_0xa37f[55]](db[_0xa37f[54]][_0xa37f[53]]);_0x9c4ex2e[_0xa37f[57]]= _[_0xa37f[55]](_0x9c4ex2d[_0xa37f[57]]);_0x9c4ex2e[_0xa37f[59]]= _[_0xa37f[60]](_0x9c4ex2e[_0xa37f[52]],_0x9c4ex2e[_0xa37f[57]]);_0x9c4ex20[_0xa37f[61]]= _[_0xa37f[60]](_0x9c4ex2e[_0xa37f[52]],qs[_0xa37f[62]](_0x9c4ex2d[_0xa37f[57]][_0xa37f[62]]));_0x9c4ex20[_0xa37f[61]]= (_0x9c4ex20[_0xa37f[61]][_0xa37f[63]])?_0x9c4ex20[_0xa37f[61]]:_0x9c4ex2e[_0xa37f[52]];if(_0x9c4ex2d[_0xa37f[57]][_0xa37f[79]]){_0x9c4ex20[_0xa37f[80]]= [{all:true}]};_0x9c4ex20= _[_0xa37f[72]]({},_0x9c4ex20,_0x9c4ex2d[_0xa37f[76]]);return db[_0xa37f[54]][_0xa37f[85]](_0x9c4ex20)[_0xa37f[44]](handleEntityNotFound(_0x9c4ex1b,null))[_0xa37f[44]](respondWithResult(_0x9c4ex1b,null))[_0xa37f[77]](handleError(_0x9c4ex1b,null))};exports[_0xa37f[86]]= function(_0x9c4ex2d,_0x9c4ex1b){return db[_0xa37f[54]][_0xa37f[86]](_0x9c4ex2d[_0xa37f[87]],{})[_0xa37f[44]](respondWithResult(_0x9c4ex1b,201))[_0xa37f[77]](handleError(_0x9c4ex1b,null))};exports[_0xa37f[88]]= function(_0x9c4ex2d,_0x9c4ex1b){var _0x9c4ex20={raw:false,where:{id:_0x9c4ex2d[_0xa37f[84]][_0xa37f[83]]}},_0x9c4ex2e={};_0x9c4ex2e[_0xa37f[52]]= _[_0xa37f[55]](db[_0xa37f[54]][_0xa37f[53]]);_0x9c4ex20[_0xa37f[61]]= _[_0xa37f[60]](_0x9c4ex2e[_0xa37f[52]],qs[_0xa37f[62]](_0x9c4ex2d[_0xa37f[57]][_0xa37f[62]]));_0x9c4ex20[_0xa37f[61]]= (_0x9c4ex20[_0xa37f[61]][_0xa37f[63]])?_0x9c4ex20[_0xa37f[61]]:_0x9c4ex2e[_0xa37f[52]];if(_0x9c4ex2d[_0xa37f[57]][_0xa37f[79]]){_0x9c4ex20[_0xa37f[80]]= [{all:true}]};_0x9c4ex20= _[_0xa37f[72]]({},_0x9c4ex20,_0x9c4ex2d[_0xa37f[76]]);return db[_0xa37f[54]][_0xa37f[85]](_0x9c4ex20)[_0xa37f[44]](handleEntityNotFound(_0x9c4ex1b,null))[_0xa37f[44]](function(_0x9c4ex1d){if(_0x9c4ex1d){var _0x9c4ex34=_0x9c4ex1d[_0xa37f[89]]({plain:true});_0x9c4ex34= qs[_0xa37f[92]](_0x9c4ex34,[_0xa37f[83],_0xa37f[90],_0xa37f[91]]);_0x9c4ex2d[_0xa37f[87]]= _[_0xa37f[92]](_0x9c4ex2d[_0xa37f[87]],[_0xa37f[83],_0xa37f[90],_0xa37f[91]]);return db[_0xa37f[54]][_0xa37f[86]](_[_0xa37f[72]](_0x9c4ex34,_0x9c4ex2d[_0xa37f[87]]),{include:_0x9c4ex2d[_0xa37f[57]][_0xa37f[79]]?[{all:true}]:undefined})}})[_0xa37f[44]](respondWithResult(_0x9c4ex1b,201))[_0xa37f[77]](handleError(_0x9c4ex1b,null))};exports[_0xa37f[45]]= function(_0x9c4ex2d,_0x9c4ex1b){if(_0x9c4ex2d[_0xa37f[87]][_0xa37f[83]]){delete _0x9c4ex2d[_0xa37f[87]][_0xa37f[83]]};return db[_0xa37f[54]][_0xa37f[85]]({where:{id:_0x9c4ex2d[_0xa37f[84]][_0xa37f[83]]}})[_0xa37f[44]](handleEntityNotFound(_0x9c4ex1b,null))[_0xa37f[44]](saveUpdates(_0x9c4ex2d[_0xa37f[87]],null))[_0xa37f[44]](respondWithResult(_0x9c4ex1b,null))[_0xa37f[77]](handleError(_0x9c4ex1b,null))};exports[_0xa37f[46]]= function(_0x9c4ex2d,_0x9c4ex1b){return db[_0xa37f[54]][_0xa37f[85]]({where:{id:_0x9c4ex2d[_0xa37f[84]][_0xa37f[83]]}})[_0xa37f[44]](handleEntityNotFound(_0x9c4ex1b,null))[_0xa37f[44]](removeEntity(_0x9c4ex1b,null))[_0xa37f[77]](handleError(_0x9c4ex1b,null))};function widgetAttributes(_0x9c4ex36){try{switch(_0x9c4ex36[_0xa37f[119]]){case _0xa37f[97]:return [{name:_0xa37f[93],value:_0x9c4ex36[_0xa37f[93]]|| (_0x9c4ex36[_0xa37f[94]]&& _0x9c4ex36[_0xa37f[94]][0]?_0x9c4ex36[_0xa37f[94]][0][_0xa37f[95]]:undefined)|| _0xa37f[96]}];case _0xa37f[100]:return [{name:_0xa37f[98],value:_0x9c4ex36[_0xa37f[98]]|| (_0x9c4ex36[_0xa37f[94]]&& _0x9c4ex36[_0xa37f[94]][0]?_0x9c4ex36[_0xa37f[94]][0][_0xa37f[95]]:undefined)|| _0xa37f[99]}];case _0xa37f[106]:return [{name:_0xa37f[101],value:_0x9c4ex36[_0xa37f[101]]|| (_0x9c4ex36[_0xa37f[94]]&& _0x9c4ex36[_0xa37f[94]][0]?_0x9c4ex36[_0xa37f[94]][0][_0xa37f[95]]:undefined)|| _0xa37f[102]},{name:_0xa37f[103],value:_0x9c4ex36[_0xa37f[103]]|| (_0x9c4ex36[_0xa37f[94]]&& _0x9c4ex36[_0xa37f[94]][1]?_0x9c4ex36[_0xa37f[94]][1][_0xa37f[95]]:undefined)|| _0xa37f[104]},{name:_0xa37f[105],value:_0x9c4ex36[_0xa37f[105]]|| (_0x9c4ex36[_0xa37f[94]]&& _0x9c4ex36[_0xa37f[94]][2]?_0x9c4ex36[_0xa37f[94]][2][_0xa37f[95]]:undefined)|| 12}];case _0xa37f[110]:return [{name:_0xa37f[107],value:_0x9c4ex36[_0xa37f[107]]|| (_0x9c4ex36[_0xa37f[94]]&& _0x9c4ex36[_0xa37f[94]][0]?_0x9c4ex36[_0xa37f[94]][0][_0xa37f[95]]:undefined)|| _0xa37f[108]},{name:_0xa37f[109],value:_0x9c4ex36[_0xa37f[109]]|| (_0x9c4ex36[_0xa37f[94]]&& _0x9c4ex36[_0xa37f[94]][1]?_0x9c4ex36[_0xa37f[94]][1][_0xa37f[95]]:undefined)|| []},{name:_0xa37f[105],value:_0x9c4ex36[_0xa37f[105]]|| (_0x9c4ex36[_0xa37f[94]]&& _0x9c4ex36[_0xa37f[94]][2]?_0x9c4ex36[_0xa37f[94]][2][_0xa37f[95]]:undefined)|| 20}];case _0xa37f[111]:;case _0xa37f[115]:return [{name:_0xa37f[112],value:_0x9c4ex36[_0xa37f[112]]|| (_0x9c4ex36[_0xa37f[94]]&& _0x9c4ex36[_0xa37f[94]][0]?_0x9c4ex36[_0xa37f[94]][0][_0xa37f[95]]:undefined)|| _0xa37f[108]},{name:_0xa37f[113],value:_0x9c4ex36[_0xa37f[113]]|| (_0x9c4ex36[_0xa37f[94]]&& _0x9c4ex36[_0xa37f[94]][1]?_0x9c4ex36[_0xa37f[94]][1][_0xa37f[95]]:undefined)|| null},{name:_0xa37f[114],value:_0x9c4ex36[_0xa37f[114]]|| (_0x9c4ex36[_0xa37f[94]]&& _0x9c4ex36[_0xa37f[94]][2]?_0x9c4ex36[_0xa37f[94]][2][_0xa37f[95]]:undefined)|| null},{name:_0xa37f[109],value:_0x9c4ex36[_0xa37f[109]]|| (_0x9c4ex36[_0xa37f[94]]&& _0x9c4ex36[_0xa37f[94]][3]?_0x9c4ex36[_0xa37f[94]][3][_0xa37f[95]]:undefined)|| []}];case _0xa37f[118]:return [{name:_0xa37f[116],value:_0x9c4ex36[_0xa37f[116]]|| (_0x9c4ex36[_0xa37f[94]]&& _0x9c4ex36[_0xa37f[94]][0]?_0x9c4ex36[_0xa37f[94]][0][_0xa37f[95]]:undefined)|| null},{name:_0xa37f[117],value:_0x9c4ex36[_0xa37f[117]]|| (_0x9c4ex36[_0xa37f[94]]&& _0x9c4ex36[_0xa37f[94]][1]?_0x9c4ex36[_0xa37f[94]][1][_0xa37f[95]]:undefined)|| 0}];default:return []}}catch(e){logger[_0xa37f[48]](_0xa37f[120],JSON[_0xa37f[121]](e));return []}}exports[_0xa37f[122]]= function(_0x9c4ex2d,_0x9c4ex1b,_0x9c4ex37){if(_0x9c4ex2d[_0xa37f[87]][_0xa37f[83]]){delete _0x9c4ex2d[_0xa37f[87]][_0xa37f[83]]};return db[_0xa37f[54]][_0xa37f[85]]({where:{id:_0x9c4ex2d[_0xa37f[84]][_0xa37f[83]]}})[_0xa37f[44]](handleEntityNotFound(_0x9c4ex1b,null))[_0xa37f[44]](function(_0x9c4ex1d){if(_0x9c4ex1d){_0x9c4ex2d[_0xa37f[87]][_0xa37f[123]]= _0x9c4ex1d[_0xa37f[83]];_0x9c4ex2d[_0xa37f[87]][_0xa37f[94]]= widgetAttributes(_0x9c4ex2d[_0xa37f[87]]);return db[_0xa37f[124]][_0xa37f[86]](_0x9c4ex2d[_0xa37f[87]])}})[_0xa37f[44]](respondWithResult(_0x9c4ex1b,null))[_0xa37f[77]](handleError(_0x9c4ex1b,null))};exports[_0xa37f[125]]= function(_0x9c4ex2d,_0x9c4ex1d,_0x9c4ex37){var _0x9c4ex20={};var _0x9c4ex2e={};var _0x9c4ex38;var _0x9c4ex21;return db[_0xa37f[54]][_0xa37f[126]]({where:{id:_0x9c4ex2d[_0xa37f[84]][_0xa37f[83]]}})[_0xa37f[44]](handleEntityNotFound(_0x9c4ex1d,null))[_0xa37f[44]](function(_0x9c4ex1d){if(_0x9c4ex1d){_0x9c4ex38= _0x9c4ex1d;_0x9c4ex2e[_0xa37f[52]]= _[_0xa37f[55]](db[_0xa37f[124]][_0xa37f[53]]);_0x9c4ex2e[_0xa37f[57]]= _[_0xa37f[55]](_0x9c4ex2d[_0xa37f[57]]);_0x9c4ex2e[_0xa37f[59]]= _[_0xa37f[60]](_0x9c4ex2e[_0xa37f[52]],_0x9c4ex2e[_0xa37f[57]]);_0x9c4ex20[_0xa37f[61]]= _[_0xa37f[60]](_0x9c4ex2e[_0xa37f[52]],qs[_0xa37f[62]](_0x9c4ex2d[_0xa37f[57]][_0xa37f[62]]));_0x9c4ex20[_0xa37f[61]]= (_0x9c4ex20[_0xa37f[61]][_0xa37f[63]])?_0x9c4ex20[_0xa37f[61]]:_0x9c4ex2e[_0xa37f[52]];_0x9c4ex20[_0xa37f[66]]= qs[_0xa37f[67]](_0x9c4ex2d[_0xa37f[57]][_0xa37f[67]]);_0x9c4ex20[_0xa37f[68]]= qs[_0xa37f[59]](_[_0xa37f[69]](_0x9c4ex2d[_0xa37f[57]],_0x9c4ex2e[_0xa37f[59]]));if(_0x9c4ex2d[_0xa37f[57]][_0xa37f[73]]){_0x9c4ex20[_0xa37f[68]]= _[_0xa37f[72]](_0x9c4ex20[_0xa37f[68]],{$or:_[_0xa37f[75]](_0x9c4ex20[_0xa37f[61]],function(_0x9c4ex31){var _0x9c4ex2f={};_0x9c4ex2f[_0x9c4ex31]= {$like:_0xa37f[74]+ _0x9c4ex2d[_0xa37f[57]][_0xa37f[73]]+ _0xa37f[74]};return _0x9c4ex2f})})};_0x9c4ex20= _[_0xa37f[72]]({},_0x9c4ex20,_0x9c4ex2d[_0xa37f[76]]);return _0x9c4ex38[_0xa37f[125]](_0x9c4ex20)}})[_0xa37f[44]](function(_0x9c4ex39){if(_0x9c4ex39){_0x9c4ex21= _0x9c4ex39[_0xa37f[63]];if(!_0x9c4ex2d[_0xa37f[57]][_0xa37f[65]](_0xa37f[64])){_0x9c4ex20[_0xa37f[36]]= qs[_0xa37f[36]](_0x9c4ex2d[_0xa37f[57]][_0xa37f[36]]);_0x9c4ex20[_0xa37f[35]]= qs[_0xa37f[35]](_0x9c4ex2d[_0xa37f[57]][_0xa37f[35]])};return _0x9c4ex38[_0xa37f[125]](_0x9c4ex20)}})[_0xa37f[44]](function(_0x9c4ex33){if(_0x9c4ex33){return _0x9c4ex33?{count:_0x9c4ex21,rows:_0x9c4ex33}:null}})[_0xa37f[44]](respondWithResult(_0x9c4ex1d,null))[_0xa37f[77]](handleError(_0x9c4ex1d,null))}
\ No newline at end of file
index dbb4277..bd32089 100644 (file)
@@ -1 +1 @@
-var _0x7725=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x7725[0];var EventEmitter=require(_0x7725[1]);var Dashboard=require(_0x7725[4])[_0x7725[3]][_0x7725[2]];var DashboardEvents= new EventEmitter();DashboardEvents[_0x7725[5]](0);var events={afterCreate:_0x7725[6],afterUpdate:_0x7725[7],afterDestroy:_0x7725[8]};function emitEvent(event){return function(_0xbe9ex7,_0xbe9ex8,_0xbe9ex9){DashboardEvents[_0x7725[11]](event+ _0x7725[9]+ _0xbe9ex7[_0x7725[10]],_0xbe9ex7);DashboardEvents[_0x7725[11]](event,_0xbe9ex7);_0xbe9ex9(null)}}for(var e in events){if(events[_0x7725[12]](e)){var event=events[e];Dashboard[_0x7725[13]](e,emitEvent(event))}};module[_0x7725[14]]= DashboardEvents
\ No newline at end of file
+var _0x41d3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x41d3[0];var EventEmitter=require(_0x41d3[1]);var Dashboard=require(_0x41d3[4])[_0x41d3[3]][_0x41d3[2]];var DashboardEvents= new EventEmitter();DashboardEvents[_0x41d3[5]](0);var events={afterCreate:_0x41d3[6],afterUpdate:_0x41d3[7],afterDestroy:_0x41d3[8]};function emitEvent(event){return function(_0x2e86x7,_0x2e86x8,_0x2e86x9){DashboardEvents[_0x41d3[11]](event+ _0x41d3[9]+ _0x2e86x7[_0x41d3[10]],_0x2e86x7);DashboardEvents[_0x41d3[11]](event,_0x2e86x7);_0x2e86x9(null)}}for(var e in events){if(events[_0x41d3[12]](e)){var event=events[e];Dashboard[_0x41d3[13]](e,emitEvent(event))}};module[_0x41d3[14]]= DashboardEvents
\ No newline at end of file
index 3dabb71..4574e23 100644 (file)
@@ -1 +1 @@
-var _0x2c72=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0x2c72[0];var _=require(_0x2c72[1]);var util=require(_0x2c72[2]);var logger=require(_0x2c72[4])(_0x2c72[3]);var moment=require(_0x2c72[5]);var BPromise=require(_0x2c72[6]);var rp=require(_0x2c72[7]);var attributes=require(_0x2c72[8]);module[_0x2c72[9]]= function(_0xab60x8,_0xab60x9){return _0xab60x8[_0x2c72[12]](_0x2c72[10],attributes,{tableName:_0x2c72[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x47db=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0x47db[0];var _=require(_0x47db[1]);var util=require(_0x47db[2]);var logger=require(_0x47db[4])(_0x47db[3]);var moment=require(_0x47db[5]);var BPromise=require(_0x47db[6]);var rp=require(_0x47db[7]);var attributes=require(_0x47db[8]);module[_0x47db[9]]= function(_0x8ebax8,_0x8ebax9){return _0x8ebax8[_0x47db[12]](_0x47db[10],attributes,{tableName:_0x47db[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 2dcbc41..ac92c80 100644 (file)
@@ -1 +1 @@
-var _0x7316=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x7316[0];var _=require(_0x7316[1]);var util=require(_0x7316[2]);var moment=require(_0x7316[3]);var BPromise=require(_0x7316[4]);var rs=require(_0x7316[5]);var fs=require(_0x7316[6]);var db=require(_0x7316[8])[_0x7316[7]];var utils=require(_0x7316[9]);var logger=require(_0x7316[11])(_0x7316[10]);var config=require(_0x7316[12]);var jayson=require(_0x7316[13]);var client=jayson[_0x7316[15]][_0x7316[14]]({port:9002});var socket=require(_0x7316[17])({host:_0x7316[16],port:6379});require(_0x7316[19])[_0x7316[18]](socket);function respondWithRpcPromise(_0x4f8dxf,_0x4f8dx10,_0x4f8dx11){return  new BPromise(function(_0x4f8dx12,_0x4f8dx13){return client[_0x7316[32]](_0x4f8dxf,_0x4f8dx11)[_0x7316[31]](function(_0x4f8dx15){logger[_0x7316[24]](_0x7316[20],_0x4f8dx10,_0x7316[23]);logger[_0x7316[27]](_0x7316[25],_0x4f8dx10,_0x7316[23],JSON[_0x7316[26]](_0x4f8dx15));if(_0x4f8dx15[_0x7316[21]]){if(_0x4f8dx15[_0x7316[21]][_0x7316[28]]=== 500){logger[_0x7316[21]](_0x7316[20],_0x4f8dx10,_0x4f8dx15[_0x7316[21]][_0x7316[29]]);return _0x4f8dx13(_0x4f8dx15[_0x7316[21]][_0x7316[29]])};logger[_0x7316[21]](_0x7316[20],_0x4f8dx10,_0x4f8dx15[_0x7316[21]][_0x7316[29]]);return _0x4f8dx12(_0x4f8dx15[_0x7316[21]][_0x7316[29]])}else {logger[_0x7316[24]](_0x7316[20],_0x4f8dx10,_0x7316[23]);_0x4f8dx12(_0x4f8dx15[_0x7316[30]][_0x7316[29]])}})[_0x7316[22]](function(_0x4f8dx14){logger[_0x7316[21]](_0x7316[20],_0x4f8dx10,_0x4f8dx14);_0x4f8dx13(_0x4f8dx14)})})}
\ No newline at end of file
+var _0x3fc9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x3fc9[0];var _=require(_0x3fc9[1]);var util=require(_0x3fc9[2]);var moment=require(_0x3fc9[3]);var BPromise=require(_0x3fc9[4]);var rs=require(_0x3fc9[5]);var fs=require(_0x3fc9[6]);var db=require(_0x3fc9[8])[_0x3fc9[7]];var utils=require(_0x3fc9[9]);var logger=require(_0x3fc9[11])(_0x3fc9[10]);var config=require(_0x3fc9[12]);var jayson=require(_0x3fc9[13]);var client=jayson[_0x3fc9[15]][_0x3fc9[14]]({port:9002});var socket=require(_0x3fc9[17])({host:_0x3fc9[16],port:6379});require(_0x3fc9[19])[_0x3fc9[18]](socket);function respondWithRpcPromise(_0xbda2xf,_0xbda2x10,_0xbda2x11){return  new BPromise(function(_0xbda2x12,_0xbda2x13){return client[_0x3fc9[32]](_0xbda2xf,_0xbda2x11)[_0x3fc9[31]](function(_0xbda2x15){logger[_0x3fc9[24]](_0x3fc9[20],_0xbda2x10,_0x3fc9[23]);logger[_0x3fc9[27]](_0x3fc9[25],_0xbda2x10,_0x3fc9[23],JSON[_0x3fc9[26]](_0xbda2x15));if(_0xbda2x15[_0x3fc9[21]]){if(_0xbda2x15[_0x3fc9[21]][_0x3fc9[28]]=== 500){logger[_0x3fc9[21]](_0x3fc9[20],_0xbda2x10,_0xbda2x15[_0x3fc9[21]][_0x3fc9[29]]);return _0xbda2x13(_0xbda2x15[_0x3fc9[21]][_0x3fc9[29]])};logger[_0x3fc9[21]](_0x3fc9[20],_0xbda2x10,_0xbda2x15[_0x3fc9[21]][_0x3fc9[29]]);return _0xbda2x12(_0xbda2x15[_0x3fc9[21]][_0x3fc9[29]])}else {logger[_0x3fc9[24]](_0x3fc9[20],_0xbda2x10,_0x3fc9[23]);_0xbda2x12(_0xbda2x15[_0x3fc9[30]][_0x3fc9[29]])}})[_0x3fc9[22]](function(_0xbda2x14){logger[_0x3fc9[21]](_0x3fc9[20],_0xbda2x10,_0xbda2x14);_0xbda2x13(_0xbda2x14)})})}
\ No newline at end of file
index ff88250..07a307a 100644 (file)
@@ -1 +1 @@
-var _0x5990=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A","\x6F\x6E"];_0x5990[0];var DashboardEvents=require(_0x5990[1]);var events=[_0x5990[2],_0x5990[3],_0x5990[4]];function createListener(_0x7ea0x4,_0x7ea0x5){return function(_0x7ea0x6){_0x7ea0x5[_0x5990[5]](_0x7ea0x4,_0x7ea0x6)}}function removeListener(_0x7ea0x4,_0x7ea0x8){return function(){DashboardEvents[_0x5990[6]](_0x7ea0x4,_0x7ea0x8)}}exports[_0x5990[7]]= function(_0x7ea0x5){for(var _0x7ea0x9=0,_0x7ea0xa=events[_0x5990[8]];_0x7ea0x9< _0x7ea0xa;_0x7ea0x9++){var _0x7ea0x4=events[_0x7ea0x9];var _0x7ea0x8=createListener(_0x5990[9]+ _0x7ea0x4,_0x7ea0x5);DashboardEvents[_0x5990[10]](_0x7ea0x4,_0x7ea0x8)}}
\ No newline at end of file
+var _0x32da=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A","\x6F\x6E"];_0x32da[0];var DashboardEvents=require(_0x32da[1]);var events=[_0x32da[2],_0x32da[3],_0x32da[4]];function createListener(_0x8a37x4,_0x8a37x5){return function(_0x8a37x6){_0x8a37x5[_0x32da[5]](_0x8a37x4,_0x8a37x6)}}function removeListener(_0x8a37x4,_0x8a37x8){return function(){DashboardEvents[_0x32da[6]](_0x8a37x4,_0x8a37x8)}}exports[_0x32da[7]]= function(_0x8a37x5){for(var _0x8a37x9=0,_0x8a37xa=events[_0x32da[8]];_0x8a37x9< _0x8a37xa;_0x8a37x9++){var _0x8a37x4=events[_0x8a37x9];var _0x8a37x8=createListener(_0x32da[9]+ _0x8a37x4,_0x8a37x5);DashboardEvents[_0x32da[10]](_0x8a37x4,_0x8a37x8)}}
\ No newline at end of file
index 4548678..a87d910 100644 (file)
@@ -1 +1 @@
-var _0x690b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x69\x74\x65\x6D\x73","\x67\x65\x74\x49\x74\x65\x6D\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x63\x6C\x6F\x6E\x65","\x63\x6C\x6F\x6E\x65","\x61\x64\x64\x49\x74\x65\x6D","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x690b[0];var multer=require(_0x690b[1]);var util=require(_0x690b[2]);var path=require(_0x690b[3]);var express=require(_0x690b[4]);var router=express.Router();var auth=require(_0x690b[5]);var interaction=require(_0x690b[6]);var config=require(_0x690b[7]);var controller=require(_0x690b[8]);router[_0x690b[12]](_0x690b[9],auth[_0x690b[10]](),controller[_0x690b[11]]);router[_0x690b[12]](_0x690b[13],auth[_0x690b[10]](),controller[_0x690b[14]]);router[_0x690b[12]](_0x690b[15],auth[_0x690b[10]](),controller[_0x690b[16]]);router[_0x690b[18]](_0x690b[9],auth[_0x690b[10]](),controller[_0x690b[17]]);router[_0x690b[18]](_0x690b[19],auth[_0x690b[10]](),controller[_0x690b[20]]);router[_0x690b[18]](_0x690b[15],auth[_0x690b[10]](),controller[_0x690b[21]]);router[_0x690b[23]](_0x690b[13],auth[_0x690b[10]](),controller[_0x690b[22]]);router[_0x690b[25]](_0x690b[13],auth[_0x690b[10]](),controller[_0x690b[24]]);module[_0x690b[26]]= router
\ No newline at end of file
+var _0x48e1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x69\x74\x65\x6D\x73","\x67\x65\x74\x49\x74\x65\x6D\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x63\x6C\x6F\x6E\x65","\x63\x6C\x6F\x6E\x65","\x61\x64\x64\x49\x74\x65\x6D","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x48e1[0];var multer=require(_0x48e1[1]);var util=require(_0x48e1[2]);var path=require(_0x48e1[3]);var express=require(_0x48e1[4]);var router=express.Router();var auth=require(_0x48e1[5]);var interaction=require(_0x48e1[6]);var config=require(_0x48e1[7]);var controller=require(_0x48e1[8]);router[_0x48e1[12]](_0x48e1[9],auth[_0x48e1[10]](),controller[_0x48e1[11]]);router[_0x48e1[12]](_0x48e1[13],auth[_0x48e1[10]](),controller[_0x48e1[14]]);router[_0x48e1[12]](_0x48e1[15],auth[_0x48e1[10]](),controller[_0x48e1[16]]);router[_0x48e1[18]](_0x48e1[9],auth[_0x48e1[10]](),controller[_0x48e1[17]]);router[_0x48e1[18]](_0x48e1[19],auth[_0x48e1[10]](),controller[_0x48e1[20]]);router[_0x48e1[18]](_0x48e1[15],auth[_0x48e1[10]](),controller[_0x48e1[21]]);router[_0x48e1[23]](_0x48e1[13],auth[_0x48e1[10]](),controller[_0x48e1[22]]);router[_0x48e1[25]](_0x48e1[13],auth[_0x48e1[10]](),controller[_0x48e1[24]]);module[_0x48e1[26]]= router
\ No newline at end of file
index fbd5560..6ca903c 100644 (file)
@@ -1 +1 @@
-var _0x7438=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x73\x71\x75\x65\x6C","\x6C\x6F\x64\x61\x73\x68","\x65\x78\x70\x6F\x72\x74\x73","\x6C\x6F\x6E\x67","\x61\x74\x74\x72\x73","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x70\x61\x72\x73\x65","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x23\x66\x66\x66\x66\x66\x66","\x23\x32\x31\x39\x36\x66\x33"];_0x7438[0];var Sequelize=require(_0x7438[1]);var squel=require(_0x7438[2]);var _=require(_0x7438[3]);module[_0x7438[4]]= {title:{type:Sequelize.STRING(20),validate:{len:[0,20]}},type:{type:Sequelize.STRING(20),allowNull:false,validate:{len:[1,20]}},attrs:{type:Sequelize.TEXT(_0x7438[5]),get:function(){try{return JSON[_0x7438[8]](this[_0x7438[7]](_0x7438[6]))}catch(e){return []}},set:function(_0x2ee2x4){try{this[_0x7438[10]](_0x7438[6],JSON[_0x7438[9]](_0x2ee2x4))}catch(e){this[_0x7438[10]](_0x7438[6],JSON[_0x7438[9]]([]))}}},sizeX:{type:Sequelize[_0x7438[11]],allowNull:false,defaultValue:1},sizeY:{type:Sequelize[_0x7438[11]],allowNull:false,defaultValue:1},row:{type:Sequelize[_0x7438[11]]},col:{type:Sequelize[_0x7438[11]]},background:{type:Sequelize[_0x7438[12]],allowNull:false,defaultValue:_0x7438[13],validate:{notEmpty:true}},foreground:{type:Sequelize[_0x7438[12]],allowNull:false,defaultValue:_0x7438[14],validate:{notEmpty:true}},link:{type:Sequelize[_0x7438[12]]}}
\ No newline at end of file
+var _0x3610=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x73\x71\x75\x65\x6C","\x6C\x6F\x64\x61\x73\x68","\x65\x78\x70\x6F\x72\x74\x73","\x6C\x6F\x6E\x67","\x61\x74\x74\x72\x73","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x70\x61\x72\x73\x65","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x23\x66\x66\x66\x66\x66\x66","\x23\x32\x31\x39\x36\x66\x33"];_0x3610[0];var Sequelize=require(_0x3610[1]);var squel=require(_0x3610[2]);var _=require(_0x3610[3]);module[_0x3610[4]]= {title:{type:Sequelize.STRING(20),validate:{len:[0,20]}},type:{type:Sequelize.STRING(20),allowNull:false,validate:{len:[1,20]}},attrs:{type:Sequelize.TEXT(_0x3610[5]),get:function(){try{return JSON[_0x3610[8]](this[_0x3610[7]](_0x3610[6]))}catch(e){return []}},set:function(_0x8f0bx4){try{this[_0x3610[10]](_0x3610[6],JSON[_0x3610[9]](_0x8f0bx4))}catch(e){this[_0x3610[10]](_0x3610[6],JSON[_0x3610[9]]([]))}}},sizeX:{type:Sequelize[_0x3610[11]],allowNull:false,defaultValue:1},sizeY:{type:Sequelize[_0x3610[11]],allowNull:false,defaultValue:1},row:{type:Sequelize[_0x3610[11]]},col:{type:Sequelize[_0x3610[11]]},background:{type:Sequelize[_0x3610[12]],allowNull:false,defaultValue:_0x3610[13],validate:{notEmpty:true}},foreground:{type:Sequelize[_0x3610[12]],allowNull:false,defaultValue:_0x3610[14],validate:{notEmpty:true}},link:{type:Sequelize[_0x3610[12]]}}
\ No newline at end of file
index 7806c39..586c1c5 100644 (file)
@@ -1 +1 @@
-var _0xdea9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64","\x61\x74\x74\x72\x55\x72\x6C","\x61\x74\x74\x72\x73","\x76\x61\x6C\x75\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F","\x69\x66\x72\x61\x6D\x65","\x61\x74\x74\x72\x50\x61\x74\x68","","\x63\x75\x73\x74\x6F\x6D","\x61\x74\x74\x72\x48\x6F\x75\x72\x46\x6F\x72\x6D\x61\x74","\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x61\x74\x74\x72\x54\x69\x6D\x65\x7A\x6F\x6E\x65","\x30\x2E\x30\x30","\x61\x74\x74\x72\x46\x6F\x6E\x74\x53\x69\x7A\x65","\x63\x6C\x6F\x63\x6B","\x61\x74\x74\x72\x4D\x65\x74\x72\x69\x63","\x74\x6F\x74\x61\x6C","\x61\x74\x74\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x63\x6F\x75\x6E\x74\x65\x72","\x6D\x75\x6C\x74\x69\x62\x61\x72\x2D\x63\x68\x61\x72\x74","\x61\x74\x74\x72\x53\x65\x72\x69\x65\x31","\x61\x74\x74\x72\x53\x65\x72\x69\x65\x32","\x61\x74\x74\x72\x53\x65\x72\x69\x65\x33","\x70\x69\x65\x2D\x63\x68\x61\x72\x74","\x61\x74\x74\x72\x52\x65\x70\x6F\x72\x74","\x61\x74\x74\x72\x52\x65\x66\x72\x65\x73\x68","\x77\x65\x62\x2D\x72\x65\x70\x6F\x72\x74","\x74\x79\x70\x65","\x77\x69\x64\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73\x3A\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xdea9[0];var jsonpatch=require(_0xdea9[1]);var rp=require(_0xdea9[2]);var moment=require(_0xdea9[3]);var BPromise=require(_0xdea9[4]);var Mustache=require(_0xdea9[5]);var util=require(_0xdea9[6]);var path=require(_0xdea9[7]);var sox=require(_0xdea9[8]);var csv=require(_0xdea9[9]);var ejs=require(_0xdea9[10]);var fs=require(_0xdea9[11]);var _=require(_0xdea9[12]);var squel=require(_0xdea9[13]);var crypto=require(_0xdea9[14]);var jsforce=require(_0xdea9[15]);var deskjs=require(_0xdea9[16]);var toCsv=require(_0xdea9[9]);var querystring=require(_0xdea9[17]);var Papa=require(_0xdea9[18]);var qs=require(_0xdea9[19]);var logger=require(_0xdea9[21])(_0xdea9[20]);var utils=require(_0xdea9[22]);var config=require(_0xdea9[23]);var db=require(_0xdea9[25])[_0xdea9[24]];var socket=require(_0xdea9[27])({host:_0xdea9[26],port:6379});require(_0xdea9[29])[_0xdea9[28]](socket);function respondWithStatusCode(_0xc122x1b,_0xc122x1c){_0xc122x1c= _0xc122x1c|| 204;return function(_0xc122x1d){if(_0xc122x1d){return _0xc122x1b[_0xdea9[30]](_0xc122x1c)};return _0xc122x1b[_0xdea9[32]](_0xc122x1c)[_0xdea9[31]]()}}function respondWithResult(_0xc122x1b,_0xc122x1c){_0xc122x1c= _0xc122x1c|| 200;return function(_0xc122x1d){if(_0xc122x1d){return _0xc122x1b[_0xdea9[32]](_0xc122x1c)[_0xdea9[33]](_0xc122x1d)}}}function respondWithFilteredResult(_0xc122x1b,_0xc122x20){return function(_0xc122x1d){if(_0xc122x1d){var _0xc122x21=_0xc122x1d[_0xdea9[34]],_0xc122x22=_0xc122x20[_0xdea9[35]],_0xc122x23=_0xc122x20[_0xdea9[35]]+ _0xc122x20[_0xdea9[36]],_0xc122x1c;if(_0xc122x23>= _0xc122x21){_0xc122x23= _0xc122x21;_0xc122x1c= 200}else {_0xc122x1c= 206};_0xc122x1b[_0xdea9[32]](_0xc122x1c);return _0xc122x1b[_0xdea9[40]](_0xdea9[37],_0xc122x22+ _0xdea9[38]+ _0xc122x23+ _0xdea9[39]+ _0xc122x21)[_0xdea9[33]](_0xc122x1d)};return null}}function patchUpdates(_0xc122x25){return function(_0xc122x1d){try{jsonpatch[_0xdea9[41]](_0xc122x1d,_0xc122x25,true)}catch(err){return BPromise[_0xdea9[42]](err)};return _0xc122x1d[_0xdea9[43]]()}}function saveUpdates(_0xc122x27,_0xc122x1c){return function(_0xc122x1d){if(_0xc122x1d){return _0xc122x1d[_0xdea9[45]](_0xc122x27)[_0xdea9[44]](function(_0xc122x28){return _0xc122x28})};return null}}function removeEntity(_0xc122x1b,_0xc122x1c){return function(_0xc122x1d){if(_0xc122x1d){return _0xc122x1d[_0xdea9[46]]()[_0xdea9[44]](function(){_0xc122x1b[_0xdea9[32]](204)[_0xdea9[31]]()})}}}function handleEntityNotFound(_0xc122x1b,_0xc122x1c){return function(_0xc122x1d){if(!_0xc122x1d){_0xc122x1b[_0xdea9[30]](404)};return _0xc122x1d}}function handleError(_0xc122x1b,_0xc122x1c){_0xc122x1c= _0xc122x1c|| 500;return function(_0xc122x2c){logger[_0xdea9[48]](_0xc122x2c[_0xdea9[47]]);if(_0xc122x2c[_0xdea9[49]]){delete _0xc122x2c[_0xdea9[49]]};_0xc122x1b[_0xdea9[32]](_0xc122x1c)[_0xdea9[50]](_0xc122x2c)}}exports[_0xdea9[51]]= function(_0xc122x2d,_0xc122x1b){var _0xc122x20={raw:false,where:{id:_0xc122x2d[_0xdea9[53]][_0xdea9[52]]}},_0xc122x2e={};_0xc122x2e[_0xdea9[54]]= _[_0xdea9[57]](db[_0xdea9[56]][_0xdea9[55]]);_0xc122x2e[_0xdea9[58]]= _[_0xdea9[57]](_0xc122x2d[_0xdea9[58]]);_0xc122x2e[_0xdea9[59]]= _[_0xdea9[60]](_0xc122x2e[_0xdea9[54]],_0xc122x2e[_0xdea9[58]]);_0xc122x20[_0xdea9[61]]= _[_0xdea9[60]](_0xc122x2e[_0xdea9[54]],qs[_0xdea9[62]](_0xc122x2d[_0xdea9[58]][_0xdea9[62]]));_0xc122x20[_0xdea9[61]]= (_0xc122x20[_0xdea9[61]][_0xdea9[63]])?_0xc122x20[_0xdea9[61]]:_0xc122x2e[_0xdea9[54]];if(_0xc122x2d[_0xdea9[58]][_0xdea9[64]]){_0xc122x20[_0xdea9[65]]= [{all:true}]};_0xc122x20= _[_0xdea9[67]]({},_0xc122x20,_0xc122x2d[_0xdea9[66]]);return db[_0xdea9[56]][_0xdea9[69]](_0xc122x20)[_0xdea9[44]](handleEntityNotFound(_0xc122x1b,null))[_0xdea9[44]](respondWithResult(_0xc122x1b,null))[_0xdea9[68]](handleError(_0xc122x1b,null))};exports[_0xdea9[46]]= function(_0xc122x2d,_0xc122x1b){return db[_0xdea9[56]][_0xdea9[69]]({where:{id:_0xc122x2d[_0xdea9[53]][_0xdea9[52]]}})[_0xdea9[44]](handleEntityNotFound(_0xc122x1b,null))[_0xdea9[44]](removeEntity(_0xc122x1b,null))[_0xdea9[68]](handleError(_0xc122x1b,null))};function widgetAttributes(_0xc122x30){try{switch(_0xc122x30[_0xdea9[96]]){case _0xdea9[74]:return [{name:_0xdea9[70],value:_0xc122x30[_0xdea9[70]]|| (_0xc122x30[_0xdea9[71]]&& _0xc122x30[_0xdea9[71]][0]?_0xc122x30[_0xdea9[71]][0][_0xdea9[72]]:undefined)|| _0xdea9[73]}];case _0xdea9[77]:return [{name:_0xdea9[75],value:_0xc122x30[_0xdea9[75]]|| (_0xc122x30[_0xdea9[71]]&& _0xc122x30[_0xdea9[71]][0]?_0xc122x30[_0xdea9[71]][0][_0xdea9[72]]:undefined)|| _0xdea9[76]}];case _0xdea9[83]:return [{name:_0xdea9[78],value:_0xc122x30[_0xdea9[78]]|| (_0xc122x30[_0xdea9[71]]&& _0xc122x30[_0xdea9[71]][0]?_0xc122x30[_0xdea9[71]][0][_0xdea9[72]]:undefined)|| _0xdea9[79]},{name:_0xdea9[80],value:_0xc122x30[_0xdea9[80]]|| (_0xc122x30[_0xdea9[71]]&& _0xc122x30[_0xdea9[71]][1]?_0xc122x30[_0xdea9[71]][1][_0xdea9[72]]:undefined)|| _0xdea9[81]},{name:_0xdea9[82],value:_0xc122x30[_0xdea9[82]]|| (_0xc122x30[_0xdea9[71]]&& _0xc122x30[_0xdea9[71]][2]?_0xc122x30[_0xdea9[71]][2][_0xdea9[72]]:undefined)|| 12}];case _0xdea9[87]:return [{name:_0xdea9[84],value:_0xc122x30[_0xdea9[84]]|| (_0xc122x30[_0xdea9[71]]&& _0xc122x30[_0xdea9[71]][0]?_0xc122x30[_0xdea9[71]][0][_0xdea9[72]]:undefined)|| _0xdea9[85]},{name:_0xdea9[86],value:_0xc122x30[_0xdea9[86]]|| (_0xc122x30[_0xdea9[71]]&& _0xc122x30[_0xdea9[71]][1]?_0xc122x30[_0xdea9[71]][1][_0xdea9[72]]:undefined)|| []},{name:_0xdea9[82],value:_0xc122x30[_0xdea9[82]]|| (_0xc122x30[_0xdea9[71]]&& _0xc122x30[_0xdea9[71]][2]?_0xc122x30[_0xdea9[71]][2][_0xdea9[72]]:undefined)|| 20}];case _0xdea9[88]:;case _0xdea9[92]:return [{name:_0xdea9[89],value:_0xc122x30[_0xdea9[89]]|| (_0xc122x30[_0xdea9[71]]&& _0xc122x30[_0xdea9[71]][0]?_0xc122x30[_0xdea9[71]][0][_0xdea9[72]]:undefined)|| _0xdea9[85]},{name:_0xdea9[90],value:_0xc122x30[_0xdea9[90]]|| (_0xc122x30[_0xdea9[71]]&& _0xc122x30[_0xdea9[71]][1]?_0xc122x30[_0xdea9[71]][1][_0xdea9[72]]:undefined)|| null},{name:_0xdea9[91],value:_0xc122x30[_0xdea9[91]]|| (_0xc122x30[_0xdea9[71]]&& _0xc122x30[_0xdea9[71]][2]?_0xc122x30[_0xdea9[71]][2][_0xdea9[72]]:undefined)|| null},{name:_0xdea9[86],value:_0xc122x30[_0xdea9[86]]|| (_0xc122x30[_0xdea9[71]]&& _0xc122x30[_0xdea9[71]][3]?_0xc122x30[_0xdea9[71]][3][_0xdea9[72]]:undefined)|| []}];case _0xdea9[95]:return [{name:_0xdea9[93],value:_0xc122x30[_0xdea9[93]]|| (_0xc122x30[_0xdea9[71]]&& _0xc122x30[_0xdea9[71]][0]?_0xc122x30[_0xdea9[71]][0][_0xdea9[72]]:undefined)|| null},{name:_0xdea9[94],value:_0xc122x30[_0xdea9[94]]|| (_0xc122x30[_0xdea9[71]]&& _0xc122x30[_0xdea9[71]][1]?_0xc122x30[_0xdea9[71]][1][_0xdea9[72]]:undefined)|| 0}];default:return []}}catch(e){logger[_0xdea9[48]](_0xdea9[97],JSON[_0xdea9[98]](e));return []}}exports[_0xdea9[99]]= function(_0xc122x2d,_0xc122x1b){if(_0xc122x2d[_0xdea9[100]]){_0xc122x2d[_0xdea9[100]][_0xdea9[71]]= widgetAttributes(_0xc122x2d[_0xdea9[100]])};return db[_0xdea9[56]][_0xdea9[99]](_0xc122x2d[_0xdea9[100]],{})[_0xdea9[44]](respondWithResult(_0xc122x1b,201))[_0xdea9[68]](handleError(_0xc122x1b,null))};exports[_0xdea9[45]]= function(_0xc122x2d,_0xc122x1b){if(_0xc122x2d[_0xdea9[100]][_0xdea9[52]]){delete _0xc122x2d[_0xdea9[100]][_0xdea9[52]]};_0xc122x2d[_0xdea9[100]][_0xdea9[71]]= widgetAttributes(_0xc122x2d[_0xdea9[100]]);return db[_0xdea9[56]][_0xdea9[69]]({where:{id:_0xc122x2d[_0xdea9[53]][_0xdea9[52]]}})[_0xdea9[44]](handleEntityNotFound(_0xc122x1b,null))[_0xdea9[44]](saveUpdates(_0xc122x2d[_0xdea9[100]],null))[_0xdea9[44]](respondWithResult(_0xc122x1b,null))[_0xdea9[68]](handleError(_0xc122x1b,null))}
\ No newline at end of file
+var _0x3782=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64","\x61\x74\x74\x72\x55\x72\x6C","\x61\x74\x74\x72\x73","\x76\x61\x6C\x75\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F","\x69\x66\x72\x61\x6D\x65","\x61\x74\x74\x72\x50\x61\x74\x68","","\x63\x75\x73\x74\x6F\x6D","\x61\x74\x74\x72\x48\x6F\x75\x72\x46\x6F\x72\x6D\x61\x74","\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x61\x74\x74\x72\x54\x69\x6D\x65\x7A\x6F\x6E\x65","\x30\x2E\x30\x30","\x61\x74\x74\x72\x46\x6F\x6E\x74\x53\x69\x7A\x65","\x63\x6C\x6F\x63\x6B","\x61\x74\x74\x72\x4D\x65\x74\x72\x69\x63","\x74\x6F\x74\x61\x6C","\x61\x74\x74\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x63\x6F\x75\x6E\x74\x65\x72","\x6D\x75\x6C\x74\x69\x62\x61\x72\x2D\x63\x68\x61\x72\x74","\x61\x74\x74\x72\x53\x65\x72\x69\x65\x31","\x61\x74\x74\x72\x53\x65\x72\x69\x65\x32","\x61\x74\x74\x72\x53\x65\x72\x69\x65\x33","\x70\x69\x65\x2D\x63\x68\x61\x72\x74","\x61\x74\x74\x72\x52\x65\x70\x6F\x72\x74","\x61\x74\x74\x72\x52\x65\x66\x72\x65\x73\x68","\x77\x65\x62\x2D\x72\x65\x70\x6F\x72\x74","\x74\x79\x70\x65","\x77\x69\x64\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73\x3A\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x3782[0];var jsonpatch=require(_0x3782[1]);var rp=require(_0x3782[2]);var moment=require(_0x3782[3]);var BPromise=require(_0x3782[4]);var Mustache=require(_0x3782[5]);var util=require(_0x3782[6]);var path=require(_0x3782[7]);var sox=require(_0x3782[8]);var csv=require(_0x3782[9]);var ejs=require(_0x3782[10]);var fs=require(_0x3782[11]);var _=require(_0x3782[12]);var squel=require(_0x3782[13]);var crypto=require(_0x3782[14]);var jsforce=require(_0x3782[15]);var deskjs=require(_0x3782[16]);var toCsv=require(_0x3782[9]);var querystring=require(_0x3782[17]);var Papa=require(_0x3782[18]);var qs=require(_0x3782[19]);var logger=require(_0x3782[21])(_0x3782[20]);var utils=require(_0x3782[22]);var config=require(_0x3782[23]);var db=require(_0x3782[25])[_0x3782[24]];var socket=require(_0x3782[27])({host:_0x3782[26],port:6379});require(_0x3782[29])[_0x3782[28]](socket);function respondWithStatusCode(_0xfb87x1b,_0xfb87x1c){_0xfb87x1c= _0xfb87x1c|| 204;return function(_0xfb87x1d){if(_0xfb87x1d){return _0xfb87x1b[_0x3782[30]](_0xfb87x1c)};return _0xfb87x1b[_0x3782[32]](_0xfb87x1c)[_0x3782[31]]()}}function respondWithResult(_0xfb87x1b,_0xfb87x1c){_0xfb87x1c= _0xfb87x1c|| 200;return function(_0xfb87x1d){if(_0xfb87x1d){return _0xfb87x1b[_0x3782[32]](_0xfb87x1c)[_0x3782[33]](_0xfb87x1d)}}}function respondWithFilteredResult(_0xfb87x1b,_0xfb87x20){return function(_0xfb87x1d){if(_0xfb87x1d){var _0xfb87x21=_0xfb87x1d[_0x3782[34]],_0xfb87x22=_0xfb87x20[_0x3782[35]],_0xfb87x23=_0xfb87x20[_0x3782[35]]+ _0xfb87x20[_0x3782[36]],_0xfb87x1c;if(_0xfb87x23>= _0xfb87x21){_0xfb87x23= _0xfb87x21;_0xfb87x1c= 200}else {_0xfb87x1c= 206};_0xfb87x1b[_0x3782[32]](_0xfb87x1c);return _0xfb87x1b[_0x3782[40]](_0x3782[37],_0xfb87x22+ _0x3782[38]+ _0xfb87x23+ _0x3782[39]+ _0xfb87x21)[_0x3782[33]](_0xfb87x1d)};return null}}function patchUpdates(_0xfb87x25){return function(_0xfb87x1d){try{jsonpatch[_0x3782[41]](_0xfb87x1d,_0xfb87x25,true)}catch(err){return BPromise[_0x3782[42]](err)};return _0xfb87x1d[_0x3782[43]]()}}function saveUpdates(_0xfb87x27,_0xfb87x1c){return function(_0xfb87x1d){if(_0xfb87x1d){return _0xfb87x1d[_0x3782[45]](_0xfb87x27)[_0x3782[44]](function(_0xfb87x28){return _0xfb87x28})};return null}}function removeEntity(_0xfb87x1b,_0xfb87x1c){return function(_0xfb87x1d){if(_0xfb87x1d){return _0xfb87x1d[_0x3782[46]]()[_0x3782[44]](function(){_0xfb87x1b[_0x3782[32]](204)[_0x3782[31]]()})}}}function handleEntityNotFound(_0xfb87x1b,_0xfb87x1c){return function(_0xfb87x1d){if(!_0xfb87x1d){_0xfb87x1b[_0x3782[30]](404)};return _0xfb87x1d}}function handleError(_0xfb87x1b,_0xfb87x1c){_0xfb87x1c= _0xfb87x1c|| 500;return function(_0xfb87x2c){logger[_0x3782[48]](_0xfb87x2c[_0x3782[47]]);if(_0xfb87x2c[_0x3782[49]]){delete _0xfb87x2c[_0x3782[49]]};_0xfb87x1b[_0x3782[32]](_0xfb87x1c)[_0x3782[50]](_0xfb87x2c)}}exports[_0x3782[51]]= function(_0xfb87x2d,_0xfb87x1b){var _0xfb87x20={raw:false,where:{id:_0xfb87x2d[_0x3782[53]][_0x3782[52]]}},_0xfb87x2e={};_0xfb87x2e[_0x3782[54]]= _[_0x3782[57]](db[_0x3782[56]][_0x3782[55]]);_0xfb87x2e[_0x3782[58]]= _[_0x3782[57]](_0xfb87x2d[_0x3782[58]]);_0xfb87x2e[_0x3782[59]]= _[_0x3782[60]](_0xfb87x2e[_0x3782[54]],_0xfb87x2e[_0x3782[58]]);_0xfb87x20[_0x3782[61]]= _[_0x3782[60]](_0xfb87x2e[_0x3782[54]],qs[_0x3782[62]](_0xfb87x2d[_0x3782[58]][_0x3782[62]]));_0xfb87x20[_0x3782[61]]= (_0xfb87x20[_0x3782[61]][_0x3782[63]])?_0xfb87x20[_0x3782[61]]:_0xfb87x2e[_0x3782[54]];if(_0xfb87x2d[_0x3782[58]][_0x3782[64]]){_0xfb87x20[_0x3782[65]]= [{all:true}]};_0xfb87x20= _[_0x3782[67]]({},_0xfb87x20,_0xfb87x2d[_0x3782[66]]);return db[_0x3782[56]][_0x3782[69]](_0xfb87x20)[_0x3782[44]](handleEntityNotFound(_0xfb87x1b,null))[_0x3782[44]](respondWithResult(_0xfb87x1b,null))[_0x3782[68]](handleError(_0xfb87x1b,null))};exports[_0x3782[46]]= function(_0xfb87x2d,_0xfb87x1b){return db[_0x3782[56]][_0x3782[69]]({where:{id:_0xfb87x2d[_0x3782[53]][_0x3782[52]]}})[_0x3782[44]](handleEntityNotFound(_0xfb87x1b,null))[_0x3782[44]](removeEntity(_0xfb87x1b,null))[_0x3782[68]](handleError(_0xfb87x1b,null))};function widgetAttributes(_0xfb87x30){try{switch(_0xfb87x30[_0x3782[96]]){case _0x3782[74]:return [{name:_0x3782[70],value:_0xfb87x30[_0x3782[70]]|| (_0xfb87x30[_0x3782[71]]&& _0xfb87x30[_0x3782[71]][0]?_0xfb87x30[_0x3782[71]][0][_0x3782[72]]:undefined)|| _0x3782[73]}];case _0x3782[77]:return [{name:_0x3782[75],value:_0xfb87x30[_0x3782[75]]|| (_0xfb87x30[_0x3782[71]]&& _0xfb87x30[_0x3782[71]][0]?_0xfb87x30[_0x3782[71]][0][_0x3782[72]]:undefined)|| _0x3782[76]}];case _0x3782[83]:return [{name:_0x3782[78],value:_0xfb87x30[_0x3782[78]]|| (_0xfb87x30[_0x3782[71]]&& _0xfb87x30[_0x3782[71]][0]?_0xfb87x30[_0x3782[71]][0][_0x3782[72]]:undefined)|| _0x3782[79]},{name:_0x3782[80],value:_0xfb87x30[_0x3782[80]]|| (_0xfb87x30[_0x3782[71]]&& _0xfb87x30[_0x3782[71]][1]?_0xfb87x30[_0x3782[71]][1][_0x3782[72]]:undefined)|| _0x3782[81]},{name:_0x3782[82],value:_0xfb87x30[_0x3782[82]]|| (_0xfb87x30[_0x3782[71]]&& _0xfb87x30[_0x3782[71]][2]?_0xfb87x30[_0x3782[71]][2][_0x3782[72]]:undefined)|| 12}];case _0x3782[87]:return [{name:_0x3782[84],value:_0xfb87x30[_0x3782[84]]|| (_0xfb87x30[_0x3782[71]]&& _0xfb87x30[_0x3782[71]][0]?_0xfb87x30[_0x3782[71]][0][_0x3782[72]]:undefined)|| _0x3782[85]},{name:_0x3782[86],value:_0xfb87x30[_0x3782[86]]|| (_0xfb87x30[_0x3782[71]]&& _0xfb87x30[_0x3782[71]][1]?_0xfb87x30[_0x3782[71]][1][_0x3782[72]]:undefined)|| []},{name:_0x3782[82],value:_0xfb87x30[_0x3782[82]]|| (_0xfb87x30[_0x3782[71]]&& _0xfb87x30[_0x3782[71]][2]?_0xfb87x30[_0x3782[71]][2][_0x3782[72]]:undefined)|| 20}];case _0x3782[88]:;case _0x3782[92]:return [{name:_0x3782[89],value:_0xfb87x30[_0x3782[89]]|| (_0xfb87x30[_0x3782[71]]&& _0xfb87x30[_0x3782[71]][0]?_0xfb87x30[_0x3782[71]][0][_0x3782[72]]:undefined)|| _0x3782[85]},{name:_0x3782[90],value:_0xfb87x30[_0x3782[90]]|| (_0xfb87x30[_0x3782[71]]&& _0xfb87x30[_0x3782[71]][1]?_0xfb87x30[_0x3782[71]][1][_0x3782[72]]:undefined)|| null},{name:_0x3782[91],value:_0xfb87x30[_0x3782[91]]|| (_0xfb87x30[_0x3782[71]]&& _0xfb87x30[_0x3782[71]][2]?_0xfb87x30[_0x3782[71]][2][_0x3782[72]]:undefined)|| null},{name:_0x3782[86],value:_0xfb87x30[_0x3782[86]]|| (_0xfb87x30[_0x3782[71]]&& _0xfb87x30[_0x3782[71]][3]?_0xfb87x30[_0x3782[71]][3][_0x3782[72]]:undefined)|| []}];case _0x3782[95]:return [{name:_0x3782[93],value:_0xfb87x30[_0x3782[93]]|| (_0xfb87x30[_0x3782[71]]&& _0xfb87x30[_0x3782[71]][0]?_0xfb87x30[_0x3782[71]][0][_0x3782[72]]:undefined)|| null},{name:_0x3782[94],value:_0xfb87x30[_0x3782[94]]|| (_0xfb87x30[_0x3782[71]]&& _0xfb87x30[_0x3782[71]][1]?_0xfb87x30[_0x3782[71]][1][_0x3782[72]]:undefined)|| 0}];default:return []}}catch(e){logger[_0x3782[48]](_0x3782[97],JSON[_0x3782[98]](e));return []}}exports[_0x3782[99]]= function(_0xfb87x2d,_0xfb87x1b){if(_0xfb87x2d[_0x3782[100]]){_0xfb87x2d[_0x3782[100]][_0x3782[71]]= widgetAttributes(_0xfb87x2d[_0x3782[100]])};return db[_0x3782[56]][_0x3782[99]](_0xfb87x2d[_0x3782[100]],{})[_0x3782[44]](respondWithResult(_0xfb87x1b,201))[_0x3782[68]](handleError(_0xfb87x1b,null))};exports[_0x3782[45]]= function(_0xfb87x2d,_0xfb87x1b){if(_0xfb87x2d[_0x3782[100]][_0x3782[52]]){delete _0xfb87x2d[_0x3782[100]][_0x3782[52]]};_0xfb87x2d[_0x3782[100]][_0x3782[71]]= widgetAttributes(_0xfb87x2d[_0x3782[100]]);return db[_0x3782[56]][_0x3782[69]]({where:{id:_0xfb87x2d[_0x3782[53]][_0x3782[52]]}})[_0x3782[44]](handleEntityNotFound(_0xfb87x1b,null))[_0x3782[44]](saveUpdates(_0xfb87x2d[_0x3782[100]],null))[_0x3782[44]](respondWithResult(_0xfb87x1b,null))[_0x3782[68]](handleError(_0xfb87x1b,null))}
\ No newline at end of file
index 1d6ae74..4497795 100644 (file)
@@ -1 +1 @@
-var _0xe8fd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xe8fd[0];var EventEmitter=require(_0xe8fd[1]);var DashboardItem=require(_0xe8fd[4])[_0xe8fd[3]][_0xe8fd[2]];var DashboardItemEvents= new EventEmitter();DashboardItemEvents[_0xe8fd[5]](0);var events={afterCreate:_0xe8fd[6],afterUpdate:_0xe8fd[7],afterDestroy:_0xe8fd[8]};function emitEvent(event){return function(_0x970ex7,_0x970ex8,_0x970ex9){DashboardItemEvents[_0xe8fd[11]](event+ _0xe8fd[9]+ _0x970ex7[_0xe8fd[10]],_0x970ex7);DashboardItemEvents[_0xe8fd[11]](event,_0x970ex7);_0x970ex9(null)}}for(var e in events){if(events[_0xe8fd[12]](e)){var event=events[e];DashboardItem[_0xe8fd[13]](e,emitEvent(event))}};module[_0xe8fd[14]]= DashboardItemEvents
\ No newline at end of file
+var _0x2cb6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x2cb6[0];var EventEmitter=require(_0x2cb6[1]);var DashboardItem=require(_0x2cb6[4])[_0x2cb6[3]][_0x2cb6[2]];var DashboardItemEvents= new EventEmitter();DashboardItemEvents[_0x2cb6[5]](0);var events={afterCreate:_0x2cb6[6],afterUpdate:_0x2cb6[7],afterDestroy:_0x2cb6[8]};function emitEvent(event){return function(_0x876ex7,_0x876ex8,_0x876ex9){DashboardItemEvents[_0x2cb6[11]](event+ _0x2cb6[9]+ _0x876ex7[_0x2cb6[10]],_0x876ex7);DashboardItemEvents[_0x2cb6[11]](event,_0x876ex7);_0x876ex9(null)}}for(var e in events){if(events[_0x2cb6[12]](e)){var event=events[e];DashboardItem[_0x2cb6[13]](e,emitEvent(event))}};module[_0x2cb6[14]]= DashboardItemEvents
\ No newline at end of file
index d99be90..120be7b 100644 (file)
@@ -1 +1 @@
-var _0x5050=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x5F\x69\x74\x65\x6D\x73","\x64\x65\x66\x69\x6E\x65"];_0x5050[0];var _=require(_0x5050[1]);var util=require(_0x5050[2]);var logger=require(_0x5050[4])(_0x5050[3]);var moment=require(_0x5050[5]);var BPromise=require(_0x5050[6]);var rp=require(_0x5050[7]);var attributes=require(_0x5050[8]);module[_0x5050[9]]= function(_0xd887x8,_0xd887x9){return _0xd887x8[_0x5050[12]](_0x5050[10],attributes,{tableName:_0x5050[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x1456=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x5F\x69\x74\x65\x6D\x73","\x64\x65\x66\x69\x6E\x65"];_0x1456[0];var _=require(_0x1456[1]);var util=require(_0x1456[2]);var logger=require(_0x1456[4])(_0x1456[3]);var moment=require(_0x1456[5]);var BPromise=require(_0x1456[6]);var rp=require(_0x1456[7]);var attributes=require(_0x1456[8]);module[_0x1456[9]]= function(_0x29b4x8,_0x29b4x9){return _0x29b4x8[_0x1456[12]](_0x1456[10],attributes,{tableName:_0x1456[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 6107bf4..51275b6 100644 (file)
@@ -1 +1 @@
-var _0x8b87=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x8b87[0];var _=require(_0x8b87[1]);var util=require(_0x8b87[2]);var moment=require(_0x8b87[3]);var BPromise=require(_0x8b87[4]);var rs=require(_0x8b87[5]);var fs=require(_0x8b87[6]);var db=require(_0x8b87[8])[_0x8b87[7]];var utils=require(_0x8b87[9]);var logger=require(_0x8b87[11])(_0x8b87[10]);var config=require(_0x8b87[12]);var jayson=require(_0x8b87[13]);var client=jayson[_0x8b87[15]][_0x8b87[14]]({port:9002});var socket=require(_0x8b87[17])({host:_0x8b87[16],port:6379});require(_0x8b87[19])[_0x8b87[18]](socket);function respondWithRpcPromise(_0x6de2xf,_0x6de2x10,_0x6de2x11){return  new BPromise(function(_0x6de2x12,_0x6de2x13){return client[_0x8b87[32]](_0x6de2xf,_0x6de2x11)[_0x8b87[31]](function(_0x6de2x15){logger[_0x8b87[24]](_0x8b87[20],_0x6de2x10,_0x8b87[23]);logger[_0x8b87[27]](_0x8b87[25],_0x6de2x10,_0x8b87[23],JSON[_0x8b87[26]](_0x6de2x15));if(_0x6de2x15[_0x8b87[21]]){if(_0x6de2x15[_0x8b87[21]][_0x8b87[28]]=== 500){logger[_0x8b87[21]](_0x8b87[20],_0x6de2x10,_0x6de2x15[_0x8b87[21]][_0x8b87[29]]);return _0x6de2x13(_0x6de2x15[_0x8b87[21]][_0x8b87[29]])};logger[_0x8b87[21]](_0x8b87[20],_0x6de2x10,_0x6de2x15[_0x8b87[21]][_0x8b87[29]]);return _0x6de2x12(_0x6de2x15[_0x8b87[21]][_0x8b87[29]])}else {logger[_0x8b87[24]](_0x8b87[20],_0x6de2x10,_0x8b87[23]);_0x6de2x12(_0x6de2x15[_0x8b87[30]][_0x8b87[29]])}})[_0x8b87[22]](function(_0x6de2x14){logger[_0x8b87[21]](_0x8b87[20],_0x6de2x10,_0x6de2x14);_0x6de2x13(_0x6de2x14)})})}
\ No newline at end of file
+var _0x6db6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x6db6[0];var _=require(_0x6db6[1]);var util=require(_0x6db6[2]);var moment=require(_0x6db6[3]);var BPromise=require(_0x6db6[4]);var rs=require(_0x6db6[5]);var fs=require(_0x6db6[6]);var db=require(_0x6db6[8])[_0x6db6[7]];var utils=require(_0x6db6[9]);var logger=require(_0x6db6[11])(_0x6db6[10]);var config=require(_0x6db6[12]);var jayson=require(_0x6db6[13]);var client=jayson[_0x6db6[15]][_0x6db6[14]]({port:9002});var socket=require(_0x6db6[17])({host:_0x6db6[16],port:6379});require(_0x6db6[19])[_0x6db6[18]](socket);function respondWithRpcPromise(_0xf00axf,_0xf00ax10,_0xf00ax11){return  new BPromise(function(_0xf00ax12,_0xf00ax13){return client[_0x6db6[32]](_0xf00axf,_0xf00ax11)[_0x6db6[31]](function(_0xf00ax15){logger[_0x6db6[24]](_0x6db6[20],_0xf00ax10,_0x6db6[23]);logger[_0x6db6[27]](_0x6db6[25],_0xf00ax10,_0x6db6[23],JSON[_0x6db6[26]](_0xf00ax15));if(_0xf00ax15[_0x6db6[21]]){if(_0xf00ax15[_0x6db6[21]][_0x6db6[28]]=== 500){logger[_0x6db6[21]](_0x6db6[20],_0xf00ax10,_0xf00ax15[_0x6db6[21]][_0x6db6[29]]);return _0xf00ax13(_0xf00ax15[_0x6db6[21]][_0x6db6[29]])};logger[_0x6db6[21]](_0x6db6[20],_0xf00ax10,_0xf00ax15[_0x6db6[21]][_0x6db6[29]]);return _0xf00ax12(_0xf00ax15[_0x6db6[21]][_0x6db6[29]])}else {logger[_0x6db6[24]](_0x6db6[20],_0xf00ax10,_0x6db6[23]);_0xf00ax12(_0xf00ax15[_0x6db6[30]][_0x6db6[29]])}})[_0x6db6[22]](function(_0xf00ax14){logger[_0x6db6[21]](_0x6db6[20],_0xf00ax10,_0xf00ax14);_0xf00ax13(_0xf00ax14)})})}
\ No newline at end of file
index efcecd4..380abb2 100644 (file)
@@ -1 +1 @@
-var _0x4f4f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D\x3A","\x6F\x6E"];_0x4f4f[0];var DashboardItemEvents=require(_0x4f4f[1]);var events=[_0x4f4f[2],_0x4f4f[3],_0x4f4f[4]];function createListener(_0x6719x4,_0x6719x5){return function(_0x6719x6){_0x6719x5[_0x4f4f[5]](_0x6719x4,_0x6719x6)}}function removeListener(_0x6719x4,_0x6719x8){return function(){DashboardItemEvents[_0x4f4f[6]](_0x6719x4,_0x6719x8)}}exports[_0x4f4f[7]]= function(_0x6719x5){for(var _0x6719x9=0,_0x6719xa=events[_0x4f4f[8]];_0x6719x9< _0x6719xa;_0x6719x9++){var _0x6719x4=events[_0x6719x9];var _0x6719x8=createListener(_0x4f4f[9]+ _0x6719x4,_0x6719x5);DashboardItemEvents[_0x4f4f[10]](_0x6719x4,_0x6719x8)}}
\ No newline at end of file
+var _0x443d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D\x3A","\x6F\x6E"];_0x443d[0];var DashboardItemEvents=require(_0x443d[1]);var events=[_0x443d[2],_0x443d[3],_0x443d[4]];function createListener(_0x32c9x4,_0x32c9x5){return function(_0x32c9x6){_0x32c9x5[_0x443d[5]](_0x32c9x4,_0x32c9x6)}}function removeListener(_0x32c9x4,_0x32c9x8){return function(){DashboardItemEvents[_0x443d[6]](_0x32c9x4,_0x32c9x8)}}exports[_0x443d[7]]= function(_0x32c9x5){for(var _0x32c9x9=0,_0x32c9xa=events[_0x443d[8]];_0x32c9x9< _0x32c9xa;_0x32c9x9++){var _0x32c9x4=events[_0x32c9x9];var _0x32c9x8=createListener(_0x443d[9]+ _0x32c9x4,_0x32c9x5);DashboardItemEvents[_0x443d[10]](_0x32c9x4,_0x32c9x8)}}
\ No newline at end of file
index b1b0ab7..754cebb 100644 (file)
@@ -1 +1 @@
-var _0xffb5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x73\x68\x6F\x77","\x67\x65\x74","\x2F","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xffb5[0];var multer=require(_0xffb5[1]);var util=require(_0xffb5[2]);var path=require(_0xffb5[3]);var express=require(_0xffb5[4]);var router=express.Router();var auth=require(_0xffb5[5]);var interaction=require(_0xffb5[6]);var config=require(_0xffb5[7]);var controller=require(_0xffb5[8]);router[_0xffb5[12]](_0xffb5[9],auth[_0xffb5[10]](),controller[_0xffb5[11]]);router[_0xffb5[15]](_0xffb5[13],auth[_0xffb5[10]](),controller[_0xffb5[14]]);router[_0xffb5[17]](_0xffb5[9],auth[_0xffb5[10]](),controller[_0xffb5[16]]);router[_0xffb5[19]](_0xffb5[9],auth[_0xffb5[10]](),controller[_0xffb5[18]]);module[_0xffb5[20]]= router
\ No newline at end of file
+var _0x7198=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x73\x68\x6F\x77","\x67\x65\x74","\x2F","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x7198[0];var multer=require(_0x7198[1]);var util=require(_0x7198[2]);var path=require(_0x7198[3]);var express=require(_0x7198[4]);var router=express.Router();var auth=require(_0x7198[5]);var interaction=require(_0x7198[6]);var config=require(_0x7198[7]);var controller=require(_0x7198[8]);router[_0x7198[12]](_0x7198[9],auth[_0x7198[10]](),controller[_0x7198[11]]);router[_0x7198[15]](_0x7198[13],auth[_0x7198[10]](),controller[_0x7198[14]]);router[_0x7198[17]](_0x7198[9],auth[_0x7198[10]](),controller[_0x7198[16]]);router[_0x7198[19]](_0x7198[9],auth[_0x7198[10]](),controller[_0x7198[18]]);module[_0x7198[20]]= router
\ No newline at end of file
index f19d6b0..44c201b 100644 (file)
@@ -1 +1 @@
-var _0x3323=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x79\x65\x73","\x6E\x6F","\x78\x43\x41\x4C\x4C\x59\x20\x4D\x6F\x74\x69\x6F\x6E\x20\x46\x61\x78","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x32\x34\x30\x30","\x34\x38\x30\x30","\x37\x32\x30\x30","\x39\x36\x30\x30","\x31\x32\x30\x30\x30","\x31\x34\x34\x30\x30","\x76\x31\x37\x2C\x76\x32\x37\x2C\x76\x32\x39","\x49\x4E\x54\x45\x47\x45\x52","\x53\x49\x50","\x49\x41\x58","\x44\x41\x44\x48\x49","\x4B\x48\x4F\x4D\x50","\x54\x45\x58\x54","\x41\x63\x63\x6F\x75\x6E\x74\x3A\x20\x7B\x7B\x61\x63\x63\x6F\x75\x6E\x74\x2E\x6E\x61\x6D\x65\x7D\x7D\x3C\x62\x72\x2F\x3E\x7B\x7B\x23\x71\x75\x65\x75\x65\x7D\x7D\x51\x75\x65\x75\x65\x3A\x20\x7B\x7B\x71\x75\x65\x75\x65\x2E\x6E\x61\x6D\x65\x7D\x7D\x3C\x62\x72\x2F\x3E\x7B\x7B\x2F\x71\x75\x65\x75\x65\x7D\x7D\x46\x72\x6F\x6D\x20\x3A\x20\x7B\x7B\x66\x72\x6F\x6D\x7D\x7D","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x3323[0];var Sequelize=require(_0x3323[1]);module[_0x3323[2]]= {name:{type:Sequelize[_0x3323[3]],allowNull:false,validate:{notEmpty:true}},description:{type:Sequelize[_0x3323[3]]},ecm:{type:Sequelize.ENUM(_0x3323[4],_0x3323[5]),defaultValue:_0x3323[4]},headerinfo:{type:Sequelize[_0x3323[3]],defaultValue:_0x3323[6]},localstationid:{type:Sequelize[_0x3323[3]],unique:_0x3323[7]},minrate:{type:Sequelize.ENUM(_0x3323[8],_0x3323[9],_0x3323[10],_0x3323[11],_0x3323[12],_0x3323[13]),defaultValue:_0x3323[9]},maxrate:{type:Sequelize.ENUM(_0x3323[8],_0x3323[9],_0x3323[10],_0x3323[11],_0x3323[12],_0x3323[13]),defaultValue:_0x3323[13]},modem:{type:Sequelize[_0x3323[3]],defaultValue:_0x3323[14]},gateway:{type:Sequelize[_0x3323[3]],defaultValue:_0x3323[5],validate:{is:/^(?:yes|no|[0-9]+)$/}},faxdetect:{type:Sequelize[_0x3323[3]],defaultValue:_0x3323[5],validate:{is:/^(?:yes|no|t38|cng|[0-9]+)$/}},t38timeout:{type:Sequelize[_0x3323[15]],defaultValue:5000,validate:{min:1000}},tech:{type:Sequelize.ENUM(_0x3323[16],_0x3323[17],_0x3323[18],_0x3323[19]),defaultValue:_0x3323[16]},key:{type:Sequelize[_0x3323[3]],allowNull:false},notificationTemplate:{type:Sequelize[_0x3323[20]],defaultValue:function(){return _0x3323[21]}},notificationSound:{type:Sequelize[_0x3323[22]],defaultValue:true},notificationShake:{type:Sequelize[_0x3323[22]],defaultValue:false},waitForTheAssignedAgent:{type:Sequelize[_0x3323[15]],validate:{min:1,max:2147483},defaultValue:10}}
\ No newline at end of file
+var _0x3097=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x79\x65\x73","\x6E\x6F","\x78\x43\x41\x4C\x4C\x59\x20\x4D\x6F\x74\x69\x6F\x6E\x20\x46\x61\x78","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x32\x34\x30\x30","\x34\x38\x30\x30","\x37\x32\x30\x30","\x39\x36\x30\x30","\x31\x32\x30\x30\x30","\x31\x34\x34\x30\x30","\x76\x31\x37\x2C\x76\x32\x37\x2C\x76\x32\x39","\x49\x4E\x54\x45\x47\x45\x52","\x53\x49\x50","\x49\x41\x58","\x44\x41\x44\x48\x49","\x4B\x48\x4F\x4D\x50","\x54\x45\x58\x54","\x41\x63\x63\x6F\x75\x6E\x74\x3A\x20\x7B\x7B\x61\x63\x63\x6F\x75\x6E\x74\x2E\x6E\x61\x6D\x65\x7D\x7D\x3C\x62\x72\x2F\x3E\x7B\x7B\x23\x71\x75\x65\x75\x65\x7D\x7D\x51\x75\x65\x75\x65\x3A\x20\x7B\x7B\x71\x75\x65\x75\x65\x2E\x6E\x61\x6D\x65\x7D\x7D\x3C\x62\x72\x2F\x3E\x7B\x7B\x2F\x71\x75\x65\x75\x65\x7D\x7D\x46\x72\x6F\x6D\x20\x3A\x20\x7B\x7B\x66\x72\x6F\x6D\x7D\x7D","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x3097[0];var Sequelize=require(_0x3097[1]);module[_0x3097[2]]= {name:{type:Sequelize[_0x3097[3]],allowNull:false,validate:{notEmpty:true}},description:{type:Sequelize[_0x3097[3]]},ecm:{type:Sequelize.ENUM(_0x3097[4],_0x3097[5]),defaultValue:_0x3097[4]},headerinfo:{type:Sequelize[_0x3097[3]],defaultValue:_0x3097[6]},localstationid:{type:Sequelize[_0x3097[3]],unique:_0x3097[7]},minrate:{type:Sequelize.ENUM(_0x3097[8],_0x3097[9],_0x3097[10],_0x3097[11],_0x3097[12],_0x3097[13]),defaultValue:_0x3097[9]},maxrate:{type:Sequelize.ENUM(_0x3097[8],_0x3097[9],_0x3097[10],_0x3097[11],_0x3097[12],_0x3097[13]),defaultValue:_0x3097[13]},modem:{type:Sequelize[_0x3097[3]],defaultValue:_0x3097[14]},gateway:{type:Sequelize[_0x3097[3]],defaultValue:_0x3097[5],validate:{is:/^(?:yes|no|[0-9]+)$/}},faxdetect:{type:Sequelize[_0x3097[3]],defaultValue:_0x3097[5],validate:{is:/^(?:yes|no|t38|cng|[0-9]+)$/}},t38timeout:{type:Sequelize[_0x3097[15]],defaultValue:5000,validate:{min:1000}},tech:{type:Sequelize.ENUM(_0x3097[16],_0x3097[17],_0x3097[18],_0x3097[19]),defaultValue:_0x3097[16]},key:{type:Sequelize[_0x3097[3]],allowNull:false},notificationTemplate:{type:Sequelize[_0x3097[20]],defaultValue:function(){return _0x3097[21]}},notificationSound:{type:Sequelize[_0x3097[22]],defaultValue:true},notificationShake:{type:Sequelize[_0x3097[22]],defaultValue:false},waitForTheAssignedAgent:{type:Sequelize[_0x3097[15]],validate:{min:1,max:2147483},defaultValue:10}}
\ No newline at end of file
index 9f7ccb7..9e5286f 100644 (file)
@@ -1 +1 @@
-var _0x3f78=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x64\x64\x41\x6E\x73\x77\x65\x72","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x72\x65\x6D\x6F\x76\x65\x41\x6E\x73\x77\x65\x72\x73","\x69\x64\x73","\x61\x64\x64\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6F\x6D\x69\x74","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x55\x73\x65\x72","\x4F\x77\x6E\x65\x72","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x54\x61\x67","\x54\x61\x67\x73","\x63\x6F\x6C\x6F\x72","\x74\x61\x67","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x67\x65\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x66\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x63\x6F\x6E\x74\x65\x78\x74","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x70\x2D\x70\x72\x6F\x76\x69\x64\x65\x72","\x65\x78\x74\x65\x6E","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x61\x70\x70","\x74\x79\x70\x65","\x73\x79\x73\x74\x65\x6D","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x61\x78\x20\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x61\x70\x70\x64\x61\x74\x61","","\x41\x6E\x73\x77\x65\x72","\x70\x75\x73\x68","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x53\x65\x74","\x65\x63\x6D","\x67\x61\x74\x65\x77\x61\x79","\x66\x61\x78\x64\x65\x74\x65\x63\x74","\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F","\x6D\x61\x78\x72\x61\x74\x65","\x6D\x69\x6E\x72\x61\x74\x65","\x6D\x6F\x64\x65\x6D","\x74\x33\x38\x74\x69\x6D\x65\x6F\x75\x74","\x46\x41\x58\x4F\x50\x54\x28","\x29\x3D","\x36","\x57\x61\x69\x74","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x32\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73\x2F\x66\x61\x78\x2D\x24\x7B\x43\x41\x4C\x4C\x45\x52\x49\x44\x28\x6E\x75\x6D\x29\x7D\x2D\x24\x7B\x43\x55\x54\x28\x55\x4E\x49\x51\x55\x45\x49\x44\x2C\x2E\x2C\x31\x29\x7D\x2D\x24\x7B\x43\x55\x54\x28\x55\x4E\x49\x51\x55\x45\x49\x44\x2C\x2E\x2C\x32\x29\x7D\x2D\x24\x7B\x53\x54\x52\x46\x54\x49\x4D\x45\x28\x2C\x2C\x25\x43\x25\x79\x25\x6D\x25\x64\x25\x48\x25\x4D\x25\x53\x29\x7D\x2D\x72\x78\x2E\x74\x69\x66\x2C\x64","\x52\x65\x63\x65\x69\x76\x65\x46\x61\x78","\x61\x64\x64\x41\x63\x63\x6F\x75\x6E\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x41\x63\x63\x6F\x75\x6E\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x74\x65\x63\x68","\x6B\x65\x79","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x54\x72\x75\x6E\x6B\x49\x64","\x4C\x69\x73\x74\x49\x64","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x24\x67\x74\x65","\x2C","\x73\x70\x6C\x69\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x74\x6F","\x53\x65\x6E\x64\x46\x61\x78\x52\x70\x63\x2C\x20\x25\x73","\x53\x65\x6E\x64\x46\x61\x78","\x69\x73\x4E\x69\x6C","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x4D\x65\x73\x73\x61\x67\x65\x73","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6F\x75\x74","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x75\x73\x65\x72","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x73\x70\x72\x65\x61\x64","\x43\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x66\x72\x6F\x6D","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x66\x61\x78","\x4C\x69\x73\x74","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x64\x65\x66\x61\x75\x6C\x74\x73","\x4C\x69\x73\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x53\x65\x6E\x64\x20\x46\x61\x78\x20\x66\x61\x69\x6C\x65\x64","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x6A\x6F\x69\x6E","\x43\x68\x65\x63\x6B\x41\x66\x74\x65\x72\x53\x65\x6E\x64","\x43\x6D\x4C\x69\x73\x74","\x44\x45\x53\x43"];_0x3f78[0];var jsonpatch=require(_0x3f78[1]);var rp=require(_0x3f78[2]);var moment=require(_0x3f78[3]);var BPromise=require(_0x3f78[4]);var Mustache=require(_0x3f78[5]);var util=require(_0x3f78[6]);var path=require(_0x3f78[7]);var sox=require(_0x3f78[8]);var csv=require(_0x3f78[9]);var ejs=require(_0x3f78[10]);var fs=require(_0x3f78[11]);var _=require(_0x3f78[12]);var squel=require(_0x3f78[13]);var crypto=require(_0x3f78[14]);var jsforce=require(_0x3f78[15]);var deskjs=require(_0x3f78[16]);var toCsv=require(_0x3f78[9]);var querystring=require(_0x3f78[17]);var Papa=require(_0x3f78[18]);var qs=require(_0x3f78[19]);var logger=require(_0x3f78[21])(_0x3f78[20]);var utils=require(_0x3f78[22]);var config=require(_0x3f78[23]);var db=require(_0x3f78[25])[_0x3f78[24]];var jayson=require(_0x3f78[26]);var client=jayson[_0x3f78[28]][_0x3f78[27]]({port:9004});var client9002=jayson[_0x3f78[28]][_0x3f78[27]]({port:9002});function respondWithRpcPromise(_0xb3b1x1d,_0xb3b1x1e,_0xb3b1x1f,_0xb3b1x20){return  new BPromise(function(_0xb3b1x21,_0xb3b1x22){var _0xb3b1x23=(_0xb3b1x20|| client);return _0xb3b1x23[_0x3f78[41]](_0xb3b1x1d,_0xb3b1x1f)[_0x3f78[40]](function(_0xb3b1x25){logger[_0x3f78[33]](_0x3f78[29],_0xb3b1x1e,_0x3f78[32]);logger[_0x3f78[36]](_0x3f78[34],_0xb3b1x1e,_0x3f78[32],JSON[_0x3f78[35]](_0xb3b1x25));if(_0xb3b1x25[_0x3f78[30]]){if(_0xb3b1x25[_0x3f78[30]][_0x3f78[37]]=== 500){logger[_0x3f78[30]](_0x3f78[29],_0xb3b1x1e,_0xb3b1x25[_0x3f78[30]][_0x3f78[38]]);return _0xb3b1x22(_0xb3b1x25[_0x3f78[30]][_0x3f78[38]])};logger[_0x3f78[30]](_0x3f78[29],_0xb3b1x1e,_0xb3b1x25[_0x3f78[30]][_0x3f78[38]]);return _0xb3b1x21(_0xb3b1x25[_0x3f78[30]][_0x3f78[38]])}else {logger[_0x3f78[33]](_0x3f78[29],_0xb3b1x1e,_0x3f78[32]);_0xb3b1x21(_0xb3b1x25[_0x3f78[39]][_0x3f78[38]])}})[_0x3f78[31]](function(_0xb3b1x24){logger[_0x3f78[30]](_0x3f78[29],_0xb3b1x1e,_0xb3b1x24);_0xb3b1x22(_0xb3b1x24)})})}function respondWithStatusCode(_0xb3b1x25,_0xb3b1x27){_0xb3b1x27= _0xb3b1x27|| 204;return function(_0xb3b1x28){if(_0xb3b1x28){return _0xb3b1x25[_0x3f78[42]](_0xb3b1x27)};return _0xb3b1x25[_0x3f78[44]](_0xb3b1x27)[_0x3f78[43]]()}}function respondWithResult(_0xb3b1x25,_0xb3b1x27){_0xb3b1x27= _0xb3b1x27|| 200;return function(_0xb3b1x28){if(_0xb3b1x28){return _0xb3b1x25[_0x3f78[44]](_0xb3b1x27)[_0x3f78[45]](_0xb3b1x28)}}}function respondWithFilteredResult(_0xb3b1x25,_0xb3b1x2b){return function(_0xb3b1x28){if(_0xb3b1x28){var _0xb3b1x2c=_0xb3b1x28[_0x3f78[46]],_0xb3b1x2d=_0xb3b1x2b[_0x3f78[47]],_0xb3b1x2e=_0xb3b1x2b[_0x3f78[47]]+ _0xb3b1x2b[_0x3f78[48]],_0xb3b1x27;if(_0xb3b1x2e>= _0xb3b1x2c){_0xb3b1x2e= _0xb3b1x2c;_0xb3b1x27= 200}else {_0xb3b1x27= 206};_0xb3b1x25[_0x3f78[44]](_0xb3b1x27);return _0xb3b1x25[_0x3f78[52]](_0x3f78[49],_0xb3b1x2d+ _0x3f78[50]+ _0xb3b1x2e+ _0x3f78[51]+ _0xb3b1x2c)[_0x3f78[45]](_0xb3b1x28)};return null}}function patchUpdates(_0xb3b1x30){return function(_0xb3b1x28){try{jsonpatch[_0x3f78[53]](_0xb3b1x28,_0xb3b1x30,true)}catch(err){return BPromise[_0x3f78[54]](err)};return _0xb3b1x28[_0x3f78[55]]()}}function saveUpdates(_0xb3b1x32,_0xb3b1x27){return function(_0xb3b1x28){if(_0xb3b1x28){return _0xb3b1x28[_0x3f78[56]](_0xb3b1x32)[_0x3f78[40]](function(_0xb3b1x33){return _0xb3b1x33})};return null}}function removeEntity(_0xb3b1x25,_0xb3b1x27){return function(_0xb3b1x28){if(_0xb3b1x28){return _0xb3b1x28[_0x3f78[57]]()[_0x3f78[40]](function(){_0xb3b1x25[_0x3f78[44]](204)[_0x3f78[43]]()})}}}function handleEntityNotFound(_0xb3b1x25,_0xb3b1x27){return function(_0xb3b1x28){if(!_0xb3b1x28){_0xb3b1x25[_0x3f78[42]](404)};return _0xb3b1x28}}function handleError(_0xb3b1x25,_0xb3b1x27){_0xb3b1x27= _0xb3b1x27|| 500;return function(_0xb3b1x24){logger[_0x3f78[30]](_0xb3b1x24[_0x3f78[58]]);if(_0xb3b1x24[_0x3f78[59]]){delete _0xb3b1x24[_0x3f78[59]]};_0xb3b1x25[_0x3f78[44]](_0xb3b1x27)[_0x3f78[60]](_0xb3b1x24)}}exports[_0x3f78[61]]= function(_0xb3b1x1f,_0xb3b1x25){var _0xb3b1x2b={},_0xb3b1x37={},_0xb3b1x38={count:0,rows:[]};_0xb3b1x37[_0x3f78[62]]= _[_0x3f78[65]](db[_0x3f78[64]][_0x3f78[63]]);var _0xb3b1x39={dateStart:_0xb3b1x1f[_0x3f78[67]][_0x3f78[66]],dateEnd:_0xb3b1x1f[_0x3f78[67]][_0x3f78[68]]};delete _0xb3b1x1f[_0x3f78[67]][_0x3f78[66]];delete _0xb3b1x1f[_0x3f78[67]][_0x3f78[68]];_0xb3b1x37[_0x3f78[67]]= _[_0x3f78[65]](_0xb3b1x1f[_0x3f78[67]]);_0xb3b1x37[_0x3f78[69]]= _[_0x3f78[70]](_0xb3b1x37[_0x3f78[62]],_0xb3b1x37[_0x3f78[67]]);_0xb3b1x2b[_0x3f78[71]]= _[_0x3f78[70]](_0xb3b1x37[_0x3f78[62]],qs[_0x3f78[72]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[72]]));_0xb3b1x2b[_0x3f78[71]]= (_0xb3b1x2b[_0x3f78[71]][_0x3f78[73]])?_0xb3b1x2b[_0x3f78[71]]:_0xb3b1x37[_0x3f78[62]];if(!_0xb3b1x1f[_0x3f78[67]][_0x3f78[75]](_0x3f78[74])){_0xb3b1x2b[_0x3f78[48]]= qs[_0x3f78[48]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[48]]);_0xb3b1x2b[_0x3f78[47]]= qs[_0x3f78[47]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[47]])};_0xb3b1x2b[_0x3f78[76]]= qs[_0x3f78[77]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[77]]);_0xb3b1x2b[_0x3f78[78]]= qs[_0x3f78[69]](_[_0x3f78[79]](_0xb3b1x1f[_0x3f78[67]],_0xb3b1x37[_0x3f78[69]]));if(_0xb3b1x39[_0x3f78[66]]){if(_0xb3b1x39[_0x3f78[68]]){_0xb3b1x39[_0x3f78[68]]= moment(_0xb3b1x39[_0x3f78[68]])[_0x3f78[81]](1,_0x3f78[80])}else {_0xb3b1x39[_0x3f78[68]]= moment(_0xb3b1x39[_0x3f78[66]])[_0x3f78[81]](1,_0x3f78[80])};_[_0x3f78[82]](_0xb3b1x2b[_0x3f78[78]],{createdAt:{$gte:_0xb3b1x39[_0x3f78[66]],$lte:_0xb3b1x39[_0x3f78[68]]}})};if(_0xb3b1x1f[_0x3f78[67]][_0x3f78[83]]){_0xb3b1x2b[_0x3f78[78]]= _[_0x3f78[82]](_0xb3b1x2b[_0x3f78[78]],{$or:_[_0x3f78[85]](_0xb3b1x2b[_0x3f78[71]],function(_0xb3b1x3a){var _0xb3b1x38={};_0xb3b1x38[_0xb3b1x3a]= {$like:_0x3f78[84]+ _0xb3b1x1f[_0x3f78[67]][_0x3f78[83]]+ _0x3f78[84]};return _0xb3b1x38})})};_0xb3b1x2b= _[_0x3f78[82]]({},_0xb3b1x2b,_0xb3b1x1f[_0x3f78[86]]);var _0xb3b1x3b={where:_0xb3b1x2b[_0x3f78[78]]};return db[_0x3f78[64]][_0x3f78[46]](_0xb3b1x3b)[_0x3f78[40]](function(_0xb3b1x2c){_0xb3b1x38[_0x3f78[46]]= _0xb3b1x2c;if(_0xb3b1x1f[_0x3f78[67]][_0x3f78[88]]){_0xb3b1x2b[_0x3f78[89]]= [{all:true}]};return db[_0x3f78[64]][_0x3f78[90]](_0xb3b1x2b)})[_0x3f78[40]](function(_0xb3b1x3c){_0xb3b1x38[_0x3f78[87]]= _0xb3b1x3c;return _0xb3b1x38})[_0x3f78[40]](respondWithFilteredResult(_0xb3b1x25,_0xb3b1x2b))[_0x3f78[31]](handleError(_0xb3b1x25,null))};exports[_0x3f78[91]]= function(_0xb3b1x1f,_0xb3b1x25){var _0xb3b1x2b={raw:false,where:{id:_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]]}},_0xb3b1x37={};_0xb3b1x37[_0x3f78[62]]= _[_0x3f78[65]](db[_0x3f78[64]][_0x3f78[63]]);_0xb3b1x37[_0x3f78[67]]= _[_0x3f78[65]](_0xb3b1x1f[_0x3f78[67]]);_0xb3b1x37[_0x3f78[69]]= _[_0x3f78[70]](_0xb3b1x37[_0x3f78[62]],_0xb3b1x37[_0x3f78[67]]);_0xb3b1x2b[_0x3f78[71]]= _[_0x3f78[70]](_0xb3b1x37[_0x3f78[62]],qs[_0x3f78[72]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[72]]));_0xb3b1x2b[_0x3f78[71]]= (_0xb3b1x2b[_0x3f78[71]][_0x3f78[73]])?_0xb3b1x2b[_0x3f78[71]]:_0xb3b1x37[_0x3f78[62]];if(_0xb3b1x1f[_0x3f78[67]][_0x3f78[88]]){_0xb3b1x2b[_0x3f78[89]]= [{all:true}]};_0xb3b1x2b= _[_0x3f78[82]]({},_0xb3b1x2b,_0xb3b1x1f[_0x3f78[86]]);return db[_0x3f78[64]][_0x3f78[94]](_0xb3b1x2b)[_0x3f78[40]](handleEntityNotFound(_0xb3b1x25,null))[_0x3f78[40]](respondWithResult(_0xb3b1x25,null))[_0x3f78[31]](handleError(_0xb3b1x25,null))};exports[_0x3f78[95]]= function(_0xb3b1x1f,_0xb3b1x25){return db[_0x3f78[64]][_0x3f78[95]](_0xb3b1x1f[_0x3f78[96]],{})[_0x3f78[40]](respondWithResult(_0xb3b1x25,201))[_0x3f78[31]](handleError(_0xb3b1x25,null))};exports[_0x3f78[56]]= function(_0xb3b1x1f,_0xb3b1x25){if(_0xb3b1x1f[_0x3f78[96]][_0x3f78[92]]){delete _0xb3b1x1f[_0x3f78[96]][_0x3f78[92]]};return db[_0x3f78[64]][_0x3f78[94]]({where:{id:_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]]}})[_0x3f78[40]](handleEntityNotFound(_0xb3b1x25,null))[_0x3f78[40]](saveUpdates(_0xb3b1x1f[_0x3f78[96]],null))[_0x3f78[40]](respondWithResult(_0xb3b1x25,null))[_0x3f78[31]](handleError(_0xb3b1x25,null))};exports[_0x3f78[57]]= function(_0xb3b1x1f,_0xb3b1x25){return db[_0x3f78[64]][_0x3f78[94]]({where:{id:_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]]}})[_0x3f78[40]](handleEntityNotFound(_0xb3b1x25,null))[_0x3f78[40]](removeEntity(_0xb3b1x25,null))[_0x3f78[31]](handleError(_0xb3b1x25,null))};exports[_0x3f78[97]]= function(_0xb3b1x1f,_0xb3b1x25){return db[_0x3f78[64]][_0x3f78[97]]()[_0x3f78[40]](respondWithResult(_0xb3b1x25,null))[_0x3f78[31]](handleError(_0xb3b1x25,null))};exports[_0x3f78[98]]= function(_0xb3b1x1f,_0xb3b1x25,_0xb3b1x3d){if(_0xb3b1x1f[_0x3f78[96]][_0x3f78[92]]){delete _0xb3b1x1f[_0x3f78[96]][_0x3f78[92]]};return db[_0x3f78[64]][_0x3f78[94]]({where:{id:_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]]}})[_0x3f78[40]](handleEntityNotFound(_0xb3b1x25,null))[_0x3f78[40]](function(_0xb3b1x28){if(_0xb3b1x28){_0xb3b1x1f[_0x3f78[96]][_0x3f78[99]]= _0xb3b1x28[_0x3f78[92]];return db[_0x3f78[100]][_0x3f78[95]](_0xb3b1x1f[_0x3f78[96]])}})[_0x3f78[40]](respondWithResult(_0xb3b1x25,null))[_0x3f78[31]](handleError(_0xb3b1x25,null))};exports[_0x3f78[101]]= function(_0xb3b1x1f,_0xb3b1x25,_0xb3b1x3d){var _0xb3b1x2b={raw:false,where:{}};var _0xb3b1x37={};var _0xb3b1x3e={count:0,rows:[]};return db[_0x3f78[64]][_0x3f78[102]]({where:{id:_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]]}})[_0x3f78[40]](handleEntityNotFound(_0xb3b1x25,null))[_0x3f78[40]](function(_0xb3b1x28){if(_0xb3b1x28){_0xb3b1x37[_0x3f78[62]]= _[_0x3f78[65]](db[_0x3f78[100]][_0x3f78[63]]);_0xb3b1x37[_0x3f78[67]]= _[_0x3f78[65]](_0xb3b1x1f[_0x3f78[67]]);_0xb3b1x37[_0x3f78[69]]= _[_0x3f78[70]](_0xb3b1x37[_0x3f78[62]],_0xb3b1x37[_0x3f78[67]]);_0xb3b1x2b[_0x3f78[71]]= _[_0x3f78[70]](_0xb3b1x37[_0x3f78[62]],qs[_0x3f78[72]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[72]]));_0xb3b1x2b[_0x3f78[71]]= (_0xb3b1x2b[_0x3f78[71]][_0x3f78[73]])?_0xb3b1x2b[_0x3f78[71]]:_0xb3b1x37[_0x3f78[62]];if(!_0xb3b1x1f[_0x3f78[67]][_0x3f78[75]](_0x3f78[74])){_0xb3b1x2b[_0x3f78[48]]= qs[_0x3f78[48]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[48]]);_0xb3b1x2b[_0x3f78[47]]= qs[_0x3f78[47]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[47]])};_0xb3b1x2b[_0x3f78[76]]= qs[_0x3f78[77]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[77]]);_0xb3b1x2b[_0x3f78[78]]= qs[_0x3f78[69]](_[_0x3f78[79]](_0xb3b1x1f[_0x3f78[67]],_0xb3b1x37[_0x3f78[69]]));_0xb3b1x2b[_0x3f78[78]][_0x3f78[99]]= _0xb3b1x28[_0x3f78[92]];if(_0xb3b1x1f[_0x3f78[67]][_0x3f78[83]]){_0xb3b1x2b[_0x3f78[78]]= _[_0x3f78[82]](_0xb3b1x2b[_0x3f78[78]],{$or:_[_0x3f78[85]](_0xb3b1x2b[_0x3f78[71]],function(_0xb3b1x3a){var _0xb3b1x38={};_0xb3b1x38[_0xb3b1x3a]= {$like:_0x3f78[84]+ _0xb3b1x1f[_0x3f78[67]][_0x3f78[83]]+ _0x3f78[84]};return _0xb3b1x38})})};_0xb3b1x2b= _[_0x3f78[82]]({},_0xb3b1x2b,_0xb3b1x1f[_0x3f78[86]]);return db[_0x3f78[100]][_0x3f78[46]]({where:_0xb3b1x2b[_0x3f78[78]]})[_0x3f78[40]](function(_0xb3b1x2c){_0xb3b1x3e[_0x3f78[46]]= _0xb3b1x2c;if(_0xb3b1x1f[_0x3f78[67]][_0x3f78[88]]){_0xb3b1x2b[_0x3f78[89]]= [{all:true}]};return db[_0x3f78[100]][_0x3f78[90]](_0xb3b1x2b)})[_0x3f78[40]](function(_0xb3b1x3c){_0xb3b1x3e[_0x3f78[87]]= _0xb3b1x3c;return _0xb3b1x3e})}})[_0x3f78[40]](respondWithFilteredResult(_0xb3b1x25,_0xb3b1x2b))[_0x3f78[31]](handleError(_0xb3b1x25,null))};exports[_0x3f78[103]]= function(_0xb3b1x1f,_0xb3b1x25,_0xb3b1x3d){var _0xb3b1x3f;return db[_0x3f78[64]][_0x3f78[94]]({where:{id:_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]]}})[_0x3f78[40]](handleEntityNotFound(_0xb3b1x25,null))[_0x3f78[40]](function(_0xb3b1x28){if(_0xb3b1x28){return _0xb3b1x28[_0x3f78[103]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[104]])}})[_0x3f78[40]](respondWithStatusCode(_0xb3b1x25,null))[_0x3f78[31]](handleError(_0xb3b1x25,null))};exports[_0x3f78[105]]= function(_0xb3b1x1f,_0xb3b1x25,_0xb3b1x3d){return db[_0x3f78[107]][_0x3f78[94]]({where:{id:_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]]}})[_0x3f78[40]](handleEntityNotFound(_0xb3b1x25,null))[_0x3f78[40]](function(_0xb3b1x28){if(_0xb3b1x28){return _0xb3b1x28[_0x3f78[105]](_0xb3b1x1f[_0x3f78[96]][_0x3f78[104]],_[_0x3f78[106]](_0xb3b1x1f[_0x3f78[96]],[_0x3f78[104],_0x3f78[92]])|| {})}})[_0x3f78[40]](respondWithResult(_0xb3b1x25,null))[_0x3f78[31]](handleError(_0xb3b1x25,null))};exports[_0x3f78[108]]= function(_0xb3b1x1f,_0xb3b1x25,_0xb3b1x3d){var _0xb3b1x2b={raw:false,where:{}};var _0xb3b1x37={};var _0xb3b1x3e={count:0,rows:[]};return db[_0x3f78[64]][_0x3f78[102]]({where:{id:_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]]}})[_0x3f78[40]](handleEntityNotFound(_0xb3b1x25,null))[_0x3f78[40]](function(_0xb3b1x28){if(_0xb3b1x28){_0xb3b1x37[_0x3f78[62]]= _[_0x3f78[65]](db[_0x3f78[107]][_0x3f78[63]]);_0xb3b1x37[_0x3f78[67]]= _[_0x3f78[65]](_0xb3b1x1f[_0x3f78[67]]);_0xb3b1x37[_0x3f78[69]]= _[_0x3f78[70]](_0xb3b1x37[_0x3f78[62]],_0xb3b1x37[_0x3f78[67]]);_0xb3b1x2b[_0x3f78[71]]= _[_0x3f78[70]](_0xb3b1x37[_0x3f78[62]],qs[_0x3f78[72]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[72]]));_0xb3b1x2b[_0x3f78[71]]= (_0xb3b1x2b[_0x3f78[71]][_0x3f78[73]])?_0xb3b1x2b[_0x3f78[71]]:_0xb3b1x37[_0x3f78[62]];if(!_0xb3b1x1f[_0x3f78[67]][_0x3f78[75]](_0x3f78[74])){_0xb3b1x2b[_0x3f78[48]]= qs[_0x3f78[48]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[48]]);_0xb3b1x2b[_0x3f78[47]]= qs[_0x3f78[47]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[47]])};_0xb3b1x2b[_0x3f78[76]]= qs[_0x3f78[77]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[77]]);_0xb3b1x2b[_0x3f78[78]]= qs[_0x3f78[69]](_[_0x3f78[79]](_0xb3b1x1f[_0x3f78[67]],_0xb3b1x37[_0x3f78[69]]));_0xb3b1x2b[_0x3f78[78]][_0x3f78[99]]= _0xb3b1x28[_0x3f78[92]];if(_0xb3b1x1f[_0x3f78[67]][_0x3f78[83]]){_0xb3b1x2b[_0x3f78[78]]= _[_0x3f78[82]](_0xb3b1x2b[_0x3f78[78]],{$or:_[_0x3f78[85]](_0xb3b1x2b[_0x3f78[71]],function(_0xb3b1x3a){var _0xb3b1x38={};_0xb3b1x38[_0xb3b1x3a]= {$like:_0x3f78[84]+ _0xb3b1x1f[_0x3f78[67]][_0x3f78[83]]+ _0x3f78[84]};return _0xb3b1x38})})};_0xb3b1x2b= _[_0x3f78[82]]({},_0xb3b1x2b,_0xb3b1x1f[_0x3f78[86]]);return db[_0x3f78[107]][_0x3f78[46]]({where:_0xb3b1x2b[_0x3f78[78]]})[_0x3f78[40]](function(_0xb3b1x2c){_0xb3b1x3e[_0x3f78[46]]= _0xb3b1x2c;if(_0xb3b1x1f[_0x3f78[67]][_0x3f78[88]]){_0xb3b1x2b[_0x3f78[89]]= [{model:db[_0x3f78[109]],as:_0x3f78[110],required:false},{model:db[_0x3f78[111]],as:_0x3f78[112],attributes:[_0x3f78[59],_0x3f78[113],_0x3f78[114]],required:false},{model:db[_0x3f78[115]],as:_0x3f78[116],attributes:[_0x3f78[92],_0x3f78[59],_0x3f78[117]],where:_0xb3b1x1f[_0x3f78[67]][_0x3f78[118]]?{id:_0xb3b1x1f[_0x3f78[67]][_0x3f78[118]]}:undefined,required:_0xb3b1x1f[_0x3f78[67]][_0x3f78[118]]?true:false}]};return db[_0x3f78[107]][_0x3f78[90]](_0xb3b1x2b)})[_0x3f78[40]](function(_0xb3b1x3c){_0xb3b1x3e[_0x3f78[87]]= _0xb3b1x3c;return _0xb3b1x3e})}})[_0x3f78[40]](respondWithFilteredResult(_0xb3b1x25,_0xb3b1x2b))[_0x3f78[31]](handleError(_0xb3b1x25,null))};exports[_0x3f78[119]]= function(_0xb3b1x1f,_0xb3b1x25,_0xb3b1x3d){return db[_0x3f78[64]][_0x3f78[102]]({where:{id:_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]]}})[_0x3f78[40]](handleEntityNotFound(_0xb3b1x25,null))[_0x3f78[40]](function(_0xb3b1x28){if(_0xb3b1x28){return db[_0x3f78[125]][_0x3f78[124]](function(_0xb3b1x40){return db[_0x3f78[122]][_0x3f78[57]]({where:{FaxAccountId:_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]]},transaction:_0xb3b1x40})[_0x3f78[40]](function(_0xb3b1x41){var _0xb3b1x42=_[_0x3f78[85]](_0xb3b1x1f[_0x3f78[96]],function(_0xb3b1x43){_0xb3b1x43[_0x3f78[99]]= _0xb3b1x1f[_0x3f78[93]][_0x3f78[92]];return _0xb3b1x43});return db[_0x3f78[122]][_0x3f78[123]](_0xb3b1x42,{transaction:_0xb3b1x40})})})[_0x3f78[40]](function(){return db[_0x3f78[122]][_0x3f78[121]]({where:{FaxAccountId:_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]]},order:_0x3f78[120]})})}})[_0x3f78[40]](respondWithResult(_0xb3b1x25,null))[_0x3f78[31]](handleError(_0xb3b1x25,null))};exports[_0x3f78[126]]= function(_0xb3b1x1f,_0xb3b1x28,_0xb3b1x3d){var _0xb3b1x2b={};var _0xb3b1x37={};var _0xb3b1x44;var _0xb3b1x2c;return db[_0x3f78[64]][_0x3f78[102]]({where:{id:_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]]}})[_0x3f78[40]](handleEntityNotFound(_0xb3b1x28,null))[_0x3f78[40]](function(_0xb3b1x28){if(_0xb3b1x28){_0xb3b1x44= _0xb3b1x28;_0xb3b1x37[_0x3f78[62]]= _[_0x3f78[65]](db[_0x3f78[122]][_0x3f78[63]]);_0xb3b1x37[_0x3f78[67]]= _[_0x3f78[65]](_0xb3b1x1f[_0x3f78[67]]);_0xb3b1x37[_0x3f78[69]]= _[_0x3f78[70]](_0xb3b1x37[_0x3f78[62]],_0xb3b1x37[_0x3f78[67]]);_0xb3b1x2b[_0x3f78[71]]= _[_0x3f78[70]](_0xb3b1x37[_0x3f78[62]],qs[_0x3f78[72]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[72]]));_0xb3b1x2b[_0x3f78[71]]= (_0xb3b1x2b[_0x3f78[71]][_0x3f78[73]])?_0xb3b1x2b[_0x3f78[71]]:_0xb3b1x37[_0x3f78[62]];_0xb3b1x2b[_0x3f78[76]]= qs[_0x3f78[77]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[77]]);_0xb3b1x2b[_0x3f78[78]]= qs[_0x3f78[69]](_[_0x3f78[79]](_0xb3b1x1f[_0x3f78[67]],_0xb3b1x37[_0x3f78[69]]));if(_0xb3b1x1f[_0x3f78[67]][_0x3f78[83]]){_0xb3b1x2b[_0x3f78[78]]= _[_0x3f78[82]](_0xb3b1x2b[_0x3f78[78]],{$or:_[_0x3f78[85]](_0xb3b1x2b[_0x3f78[71]],function(_0xb3b1x3a){var _0xb3b1x38={};_0xb3b1x38[_0xb3b1x3a]= {$like:_0x3f78[84]+ _0xb3b1x1f[_0x3f78[67]][_0x3f78[83]]+ _0x3f78[84]};return _0xb3b1x38})})};_0xb3b1x2b= _[_0x3f78[82]]({},_0xb3b1x2b,_0xb3b1x1f[_0x3f78[86]]);return _0xb3b1x44[_0x3f78[126]](_0xb3b1x2b)}})[_0x3f78[40]](function(_0xb3b1x3f){if(_0xb3b1x3f){_0xb3b1x2c= _0xb3b1x3f[_0x3f78[73]];if(!_0xb3b1x1f[_0x3f78[67]][_0x3f78[75]](_0x3f78[74])){_0xb3b1x2b[_0x3f78[48]]= qs[_0x3f78[48]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[48]]);_0xb3b1x2b[_0x3f78[47]]= qs[_0x3f78[47]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[47]])};return _0xb3b1x44[_0x3f78[126]](_0xb3b1x2b)}})[_0x3f78[40]](function(_0xb3b1x3c){if(_0xb3b1x3c){return _0xb3b1x3c?{count:_0xb3b1x2c,rows:_0xb3b1x3c}:null}})[_0x3f78[40]](respondWithResult(_0xb3b1x28,null))[_0x3f78[31]](handleError(_0xb3b1x28,null))};exports[_0x3f78[127]]= function(_0xb3b1x1f,_0xb3b1x25,_0xb3b1x3d){if(_0xb3b1x1f[_0x3f78[96]][_0x3f78[92]]){delete _0xb3b1x1f[_0x3f78[96]][_0x3f78[92]]};return db[_0x3f78[64]][_0x3f78[94]]({where:{id:_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]]}})[_0x3f78[40]](handleEntityNotFound(_0xb3b1x25,null))[_0x3f78[40]](function(_0xb3b1x28){if(_0xb3b1x28){_0xb3b1x1f[_0x3f78[96]][_0x3f78[99]]= _0xb3b1x28[_0x3f78[92]];return db[_0x3f78[128]][_0x3f78[95]](_0xb3b1x1f[_0x3f78[96]])}})[_0x3f78[40]](respondWithResult(_0xb3b1x25,null))[_0x3f78[31]](handleError(_0xb3b1x25,null))};exports[_0x3f78[129]]= function(_0xb3b1x1f,_0xb3b1x25,_0xb3b1x3d){return db[_0x3f78[130]][_0x3f78[94]]({where:{id:_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]]}})[_0x3f78[40]](handleEntityNotFound(_0xb3b1x25,null))[_0x3f78[40]](function(_0xb3b1x28){if(_0xb3b1x28){return _0xb3b1x28[_0x3f78[129]](_0xb3b1x1f[_0x3f78[96]][_0x3f78[104]],_[_0x3f78[106]](_0xb3b1x1f[_0x3f78[96]],[_0x3f78[104],_0x3f78[92]])|| {})}})[_0x3f78[40]](respondWithResult(_0xb3b1x25,null))[_0x3f78[31]](handleError(_0xb3b1x25,null))};exports[_0x3f78[131]]= function(_0xb3b1x1f,_0xb3b1x28,_0xb3b1x3d){var _0xb3b1x2b={};var _0xb3b1x37={};var _0xb3b1x44;var _0xb3b1x2c;return db[_0x3f78[64]][_0x3f78[102]]({where:{id:_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]]}})[_0x3f78[40]](handleEntityNotFound(_0xb3b1x28,null))[_0x3f78[40]](function(_0xb3b1x28){if(_0xb3b1x28){_0xb3b1x44= _0xb3b1x28;_0xb3b1x37[_0x3f78[62]]= _[_0x3f78[65]](db[_0x3f78[128]][_0x3f78[63]]);_0xb3b1x37[_0x3f78[67]]= _[_0x3f78[65]](_0xb3b1x1f[_0x3f78[67]]);_0xb3b1x37[_0x3f78[69]]= _[_0x3f78[70]](_0xb3b1x37[_0x3f78[62]],_0xb3b1x37[_0x3f78[67]]);_0xb3b1x2b[_0x3f78[71]]= _[_0x3f78[70]](_0xb3b1x37[_0x3f78[62]],qs[_0x3f78[72]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[72]]));_0xb3b1x2b[_0x3f78[71]]= (_0xb3b1x2b[_0x3f78[71]][_0x3f78[73]])?_0xb3b1x2b[_0x3f78[71]]:_0xb3b1x37[_0x3f78[62]];_0xb3b1x2b[_0x3f78[76]]= qs[_0x3f78[77]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[77]]);_0xb3b1x2b[_0x3f78[78]]= qs[_0x3f78[69]](_[_0x3f78[79]](_0xb3b1x1f[_0x3f78[67]],_0xb3b1x37[_0x3f78[69]]));if(_0xb3b1x1f[_0x3f78[67]][_0x3f78[83]]){_0xb3b1x2b[_0x3f78[78]]= _[_0x3f78[82]](_0xb3b1x2b[_0x3f78[78]],{$or:_[_0x3f78[85]](_0xb3b1x2b[_0x3f78[71]],function(_0xb3b1x3a){var _0xb3b1x38={};_0xb3b1x38[_0xb3b1x3a]= {$like:_0x3f78[84]+ _0xb3b1x1f[_0x3f78[67]][_0x3f78[83]]+ _0x3f78[84]};return _0xb3b1x38})})};_0xb3b1x2b= _[_0x3f78[82]]({},_0xb3b1x2b,_0xb3b1x1f[_0x3f78[86]]);return _0xb3b1x44[_0x3f78[131]](_0xb3b1x2b)}})[_0x3f78[40]](function(_0xb3b1x3f){if(_0xb3b1x3f){_0xb3b1x2c= _0xb3b1x3f[_0x3f78[73]];if(!_0xb3b1x1f[_0x3f78[67]][_0x3f78[75]](_0x3f78[74])){_0xb3b1x2b[_0x3f78[48]]= qs[_0x3f78[48]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[48]]);_0xb3b1x2b[_0x3f78[47]]= qs[_0x3f78[47]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[47]])};return _0xb3b1x44[_0x3f78[131]](_0xb3b1x2b)}})[_0x3f78[40]](function(_0xb3b1x3c){if(_0xb3b1x3c){return _0xb3b1x3c?{count:_0xb3b1x2c,rows:_0xb3b1x3c}:null}})[_0x3f78[40]](respondWithResult(_0xb3b1x28,null))[_0x3f78[31]](handleError(_0xb3b1x28,null))};function Extension(_0xb3b1x46,_0xb3b1x47,_0xb3b1x48,_0xb3b1x49){this[_0x3f78[132]]= _0x3f78[133];this[_0x3f78[134]]= _0xb3b1x46[_0x3f78[135]];this[_0x3f78[136]]= _0xb3b1x49;this[_0x3f78[137]]= _0x3f78[138];this[_0x3f78[139]]= _0x3f78[140];this[_0x3f78[99]]= _0xb3b1x46[_0x3f78[92]];this[_0x3f78[120]]= _0xb3b1x47;this[_0x3f78[141]]= _0xb3b1x48}function createExtensionsReciveFax(_0xb3b1x46){var _0xb3b1x47=1;var _0xb3b1x4b=[];_0xb3b1x4b[_0x3f78[144]]( new Extension(_0xb3b1x46,_0xb3b1x47,_0x3f78[142],_0x3f78[143]));_0xb3b1x47+= 1;_0xb3b1x4b[_0x3f78[144]]( new Extension(_0xb3b1x46,_0xb3b1x47,_0x3f78[145],_0x3f78[146]));_0xb3b1x47+= 1;for(var _0xb3b1x4c in _0xb3b1x46){if(_0xb3b1x46[_0x3f78[75]](_0xb3b1x4c)&& (_0xb3b1x4c=== _0x3f78[147]|| _0xb3b1x4c=== _0x3f78[135]|| _0xb3b1x4c=== _0x3f78[148]|| _0xb3b1x4c=== _0x3f78[149]|| _0xb3b1x4c=== _0x3f78[150]|| _0xb3b1x4c=== _0x3f78[151]|| _0xb3b1x4c=== _0x3f78[152]|| _0xb3b1x4c=== _0x3f78[153]|| _0xb3b1x4c=== _0x3f78[154])){_0xb3b1x4b[_0x3f78[144]]( new Extension(_0xb3b1x46,_0xb3b1x47,_0x3f78[155]+ _0xb3b1x4c+ _0x3f78[156]+ _0xb3b1x46[_0xb3b1x4c],_0x3f78[146]));_0xb3b1x47+= 1}};_0xb3b1x4b[_0x3f78[144]]( new Extension(_0xb3b1x46,_0xb3b1x47,_0x3f78[157],_0x3f78[158]));_0xb3b1x47+= 1;_0xb3b1x4b[_0x3f78[144]]( new Extension(_0xb3b1x46,_0xb3b1x47,_0x3f78[159],_0x3f78[160]));_0xb3b1x47= 0;return _0xb3b1x4b}exports[_0x3f78[161]]= function(_0xb3b1x1f,_0xb3b1x25,_0xb3b1x3d){var _0xb3b1x46;return db[_0x3f78[125]][_0x3f78[124]](function(_0xb3b1x40){return db[_0x3f78[64]][_0x3f78[95]](_0xb3b1x1f[_0x3f78[96]],{transaction:_0xb3b1x40})[_0x3f78[40]](function(_0xb3b1x25){_0xb3b1x46= _0xb3b1x25[_0x3f78[162]]({plain:true});return db[_0x3f78[163]][_0x3f78[123]](createExtensionsReciveFax(_0xb3b1x46),{transaction:_0xb3b1x40})})})[_0x3f78[40]](function(){return _0xb3b1x46})[_0x3f78[40]](respondWithResult(_0xb3b1x25,null))[_0x3f78[31]](handleError(_0xb3b1x25,null))};exports[_0x3f78[164]]= function(_0xb3b1x1f,_0xb3b1x25,_0xb3b1x3d){var _0xb3b1x46;return db[_0x3f78[125]][_0x3f78[124]](function(_0xb3b1x40){return db[_0x3f78[64]][_0x3f78[56]](_0xb3b1x1f[_0x3f78[96]],{where:{id:_0xb3b1x1f[_0x3f78[96]][_0x3f78[92]]},transaction:_0xb3b1x40})[_0x3f78[40]](function(_0xb3b1x25){return db[_0x3f78[163]][_0x3f78[57]]({where:{FaxAccountId:_0xb3b1x1f[_0x3f78[96]][_0x3f78[92]]},transaction:_0xb3b1x40})[_0x3f78[40]](function(_0xb3b1x4d){return db[_0x3f78[163]][_0x3f78[123]](createExtensionsReciveFax(_[_0x3f78[106]](_0xb3b1x1f[_0x3f78[96]],[_0x3f78[166],_0x3f78[167],_0x3f78[168],_0x3f78[169],_0x3f78[170],_0x3f78[171]])),{transaction:_0xb3b1x40})})})})[_0x3f78[40]](function(){return db[_0x3f78[64]][_0x3f78[165]](_0xb3b1x1f[_0x3f78[96]][_0x3f78[92]])})[_0x3f78[40]](respondWithResult(_0xb3b1x25,null))[_0x3f78[31]](handleError(_0xb3b1x25,null))};exports[_0x3f78[172]]= function(_0xb3b1x1f,_0xb3b1x25,_0xb3b1x3d){var _0xb3b1x2b={raw:true,where:{}};var _0xb3b1x37={};var _0xb3b1x3e={count:0,rows:[]};return db[_0x3f78[64]][_0x3f78[102]]({where:{id:_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]]}})[_0x3f78[40]](handleEntityNotFound(_0xb3b1x25,null))[_0x3f78[40]](function(_0xb3b1x28){if(_0xb3b1x28){_0xb3b1x37[_0x3f78[62]]= _[_0x3f78[65]](db[_0x3f78[173]][_0x3f78[63]]);_0xb3b1x37[_0x3f78[67]]= _[_0x3f78[65]](_0xb3b1x1f[_0x3f78[67]]);_0xb3b1x37[_0x3f78[69]]= _[_0x3f78[70]](_0xb3b1x37[_0x3f78[62]],_0xb3b1x37[_0x3f78[67]]);_0xb3b1x2b[_0x3f78[71]]= _[_0x3f78[70]](_0xb3b1x37[_0x3f78[62]],qs[_0x3f78[72]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[72]]));_0xb3b1x2b[_0x3f78[71]]= (_0xb3b1x2b[_0x3f78[71]][_0x3f78[73]])?_0xb3b1x2b[_0x3f78[71]]:_0xb3b1x37[_0x3f78[62]];if(!_0xb3b1x1f[_0x3f78[67]][_0x3f78[75]](_0x3f78[74])){_0xb3b1x2b[_0x3f78[48]]= qs[_0x3f78[48]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[48]]);_0xb3b1x2b[_0x3f78[47]]= qs[_0x3f78[47]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[47]])};_0xb3b1x2b[_0x3f78[76]]= qs[_0x3f78[77]](_0xb3b1x1f[_0x3f78[67]][_0x3f78[77]]);_0xb3b1x2b[_0x3f78[78]]= qs[_0x3f78[69]](_[_0x3f78[79]](_0xb3b1x1f[_0x3f78[67]],_0xb3b1x37[_0x3f78[69]]));_0xb3b1x2b[_0x3f78[78]][_0x3f78[99]]= _0xb3b1x28[_0x3f78[92]];if(_0xb3b1x1f[_0x3f78[67]][_0x3f78[83]]){_0xb3b1x2b[_0x3f78[78]]= _[_0x3f78[82]](_0xb3b1x2b[_0x3f78[78]],{$or:_[_0x3f78[85]](_0xb3b1x2b[_0x3f78[71]],function(_0xb3b1x3a){var _0xb3b1x38={};_0xb3b1x38[_0xb3b1x3a]= {$like:_0x3f78[84]+ _0xb3b1x1f[_0x3f78[67]][_0x3f78[83]]+ _0x3f78[84]};return _0xb3b1x38})})};if(_0xb3b1x1f[_0x3f78[67]][_0x3f78[174]]){var _0xb3b1x4e=_0xb3b1x1f[_0x3f78[67]][_0x3f78[174]][_0x3f78[176]](_0x3f78[175]);var _0xb3b1x38={};_0xb3b1x38[_0xb3b1x4e[0]]= {$gte:moment(_0xb3b1x4e[1])[_0x3f78[178]](_0x3f78[177])};_0xb3b1x2b[_0x3f78[78]]= _[_0x3f78[82]](_0xb3b1x2b[_0x3f78[78]],_0xb3b1x38)};_0xb3b1x2b= _[_0x3f78[82]]({},_0xb3b1x2b,_0xb3b1x1f[_0x3f78[86]]);return db[_0x3f78[173]][_0x3f78[46]]({where:_0xb3b1x2b[_0x3f78[78]]})[_0x3f78[40]](function(_0xb3b1x2c){_0xb3b1x3e[_0x3f78[46]]= _0xb3b1x2c;if(_0xb3b1x1f[_0x3f78[67]][_0x3f78[88]]){_0xb3b1x2b[_0x3f78[89]]= [{all:true}]};return db[_0x3f78[173]][_0x3f78[90]](_0xb3b1x2b)})[_0x3f78[40]](function(_0xb3b1x3c){_0xb3b1x3e[_0x3f78[87]]= _0xb3b1x3c;return _0xb3b1x3e})}})[_0x3f78[40]](respondWithFilteredResult(_0xb3b1x25,_0xb3b1x2b))[_0x3f78[31]](handleError(_0xb3b1x25,null))};exports[_0x3f78[60]]= function(_0xb3b1x1f,_0xb3b1x25,_0xb3b1x3d){var _0xb3b1x4f,_0xb3b1x50={},_0xb3b1x51;if(_0xb3b1x1f[_0x3f78[96]][_0x3f78[179]]){_0xb3b1x51= _0xb3b1x1f[_0x3f78[96]][_0x3f78[179]][0]};return db[_0x3f78[64]][_0x3f78[94]]({where:{id:_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]]},include:[{model:db[_0x3f78[205]],as:_0x3f78[195],include:[{model:db[_0x3f78[109]],as:_0x3f78[196],where:{fax:_0xb3b1x51},limit:1,order:[[_0x3f78[169],_0x3f78[206]]]}]}]})[_0x3f78[40]](handleEntityNotFound(_0xb3b1x25,null))[_0x3f78[40]](function(_0xb3b1x56){_0xb3b1x4f= _0xb3b1x56;if(_0xb3b1x1f[_0x3f78[96]][_0x3f78[183]]&& _0xb3b1x1f[_0x3f78[96]][_0x3f78[183]][_0x3f78[73]]){for(var _0xb3b1x47=0;_0xb3b1x47< _0xb3b1x1f[_0x3f78[96]][_0x3f78[183]][_0x3f78[73]];_0xb3b1x47+= 1){_0xb3b1x1f[_0x3f78[96]][_0x3f78[183]][_0xb3b1x47]= {filename:_0xb3b1x1f[_0x3f78[96]][_0x3f78[183]][_0xb3b1x47][_0x3f78[59]],id:_0xb3b1x1f[_0x3f78[96]][_0x3f78[183]][_0xb3b1x47][_0x3f78[92]],path:path[_0x3f78[203]](config[_0x3f78[200]],_0x3f78[201],_0xb3b1x1f[_0x3f78[96]][_0x3f78[183]][_0xb3b1x47][_0x3f78[202]])}}};return respondWithRpcPromise(_0x3f78[204],_0x3f78[204],{FaxAccountId:_[_0x3f78[182]](_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]])?undefined:_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]],path:_[_0x3f78[182]](_0xb3b1x1f[_0x3f78[96]][_0x3f78[183]][0][_0x3f78[7]])?undefined:_0xb3b1x1f[_0x3f78[96]][_0x3f78[183]][0][_0x3f78[7]],fax:_[_0x3f78[182]](_0xb3b1x1f[_0x3f78[96]][_0x3f78[179]][0])?undefined:_0xb3b1x1f[_0x3f78[96]][_0x3f78[179]][0]},client9002)})[_0x3f78[40]](function(){if(_0xb3b1x4f){if(_[_0x3f78[182]](_0xb3b1x1f[_0x3f78[96]][_0x3f78[192]])){_0xb3b1x1f[_0x3f78[96]][_0x3f78[192]]= util[_0x3f78[178]](_0x3f78[193],_0xb3b1x4f[_0x3f78[59]],_0xb3b1x4f[_0x3f78[194]])};if(_0xb3b1x4f[_0x3f78[195]]){if(_0xb3b1x4f[_0x3f78[195]][_0x3f78[196]][_0x3f78[73]]){return _0xb3b1x4f[_0x3f78[195]][_0x3f78[196]][0]}else {return db[_0x3f78[109]][_0x3f78[95]](_[_0x3f78[197]](_0xb3b1x1f[_0x3f78[96]],{firstName:_0xb3b1x1f[_0x3f78[96]][_0x3f78[179]][0],phone:_0xb3b1x1f[_0x3f78[96]][_0x3f78[179]][0],fax:_0xb3b1x1f[_0x3f78[96]][_0x3f78[179]][0],ListId:_0xb3b1x4f[_0x3f78[171]]}))}}else {throw  new Error(_0x3f78[198])}}else {throw  new Error(_0x3f78[199])}})[_0x3f78[40]](function(_0xb3b1x54){if(_0xb3b1x54){return db[_0x3f78[107]][_0x3f78[94]]({where:{ContactId:_0xb3b1x54[_0x3f78[92]],closed:false,FaxAccountId:_0xb3b1x4f[_0x3f78[92]]}})[_0x3f78[40]](function(_0xb3b1x28){if(_0xb3b1x28){return [_0xb3b1x28,false]};return db[_0x3f78[107]][_0x3f78[95]]({UserId:_0xb3b1x1f[_0x3f78[188]][_0x3f78[92]],ContactId:_0xb3b1x54[_0x3f78[92]],FaxAccountId:_0xb3b1x4f[_0x3f78[92]],fax:_0xb3b1x1f[_0x3f78[96]][_0x3f78[179]][0],firstMsgDirection:_0x3f78[186],Messages:[_[_0x3f78[82]](_0xb3b1x1f[_0x3f78[96]],{read:false,body:_0xb3b1x1f[_0x3f78[96]][_0x3f78[183]][0][_0x3f78[187]],FaxAccountId:_0xb3b1x4f[_0x3f78[92]],UserId:_0xb3b1x1f[_0x3f78[188]][_0x3f78[92]],ContactId:_0xb3b1x54[_0x3f78[92]],AttachmentId:_0xb3b1x1f[_0x3f78[96]][_0x3f78[183]][0][_0x3f78[92]]})]},{include:[{model:db[_0x3f78[173]],as:_0x3f78[184]}]})[_0x3f78[40]](function(_0xb3b1x55){return [_0xb3b1x55,true]})})}else {throw  new Error(_0x3f78[191])}})[_0x3f78[190]](function(_0xb3b1x28,_0xb3b1x52){if(_0xb3b1x52){return _0xb3b1x28};return db[_0x3f78[173]][_0x3f78[95]]({direction:_0x3f78[186],read:false,body:_0xb3b1x1f[_0x3f78[96]][_0x3f78[183]][0][_0x3f78[187]],FaxAccountId:_0xb3b1x4f[_0x3f78[92]],FaxInteractionId:_0xb3b1x28[_0x3f78[92]],UserId:_0xb3b1x1f[_0x3f78[188]][_0x3f78[92]],ContactId:_0xb3b1x28[_0x3f78[189]],AttachmentId:_0xb3b1x1f[_0x3f78[96]][_0x3f78[183]][0][_0x3f78[92]]})[_0x3f78[40]](function(_0xb3b1x53){_0xb3b1x28[_0x3f78[185]][_0x3f78[184]]= [];_0xb3b1x28[_0x3f78[185]][_0x3f78[184]][_0x3f78[144]](_0xb3b1x53[_0x3f78[185]]);return _0xb3b1x28})})[_0x3f78[40]](function(_0xb3b1x28){respondWithRpcPromise(_0x3f78[181],_0x3f78[181],{FaxAccountId:_[_0x3f78[182]](_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]])?undefined:_0xb3b1x1f[_0x3f78[93]][_0x3f78[92]],path:_[_0x3f78[182]](_0xb3b1x1f[_0x3f78[96]][_0x3f78[183]][0][_0x3f78[7]])?undefined:_0xb3b1x1f[_0x3f78[96]][_0x3f78[183]][0][_0x3f78[7]],fax:_[_0x3f78[182]](_0xb3b1x1f[_0x3f78[96]][_0x3f78[179]][0])?undefined:_0xb3b1x1f[_0x3f78[96]][_0x3f78[179]][0],AttachmentId:_0xb3b1x1f[_0x3f78[96]][_0x3f78[183]][0][_0x3f78[92]]},client9002)[_0x3f78[40]](function(_0xb3b1x25){logger[_0x3f78[33]](_0x3f78[180],_0xb3b1x25)})[_0x3f78[31]](function(_0xb3b1x24){logger[_0x3f78[33]](_0x3f78[180],_0xb3b1x24)});return _0xb3b1x28})[_0x3f78[40]](respondWithResult(_0xb3b1x25,null))[_0x3f78[31]](handleError(_0xb3b1x25,null))}
\ No newline at end of file
+var _0xa783=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x64\x64\x41\x6E\x73\x77\x65\x72","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x72\x65\x6D\x6F\x76\x65\x41\x6E\x73\x77\x65\x72\x73","\x69\x64\x73","\x61\x64\x64\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6F\x6D\x69\x74","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x55\x73\x65\x72","\x4F\x77\x6E\x65\x72","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x54\x61\x67","\x54\x61\x67\x73","\x63\x6F\x6C\x6F\x72","\x74\x61\x67","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x67\x65\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x66\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x63\x6F\x6E\x74\x65\x78\x74","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x70\x2D\x70\x72\x6F\x76\x69\x64\x65\x72","\x65\x78\x74\x65\x6E","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x61\x70\x70","\x74\x79\x70\x65","\x73\x79\x73\x74\x65\x6D","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x61\x78\x20\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x61\x70\x70\x64\x61\x74\x61","","\x41\x6E\x73\x77\x65\x72","\x70\x75\x73\x68","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x53\x65\x74","\x65\x63\x6D","\x67\x61\x74\x65\x77\x61\x79","\x66\x61\x78\x64\x65\x74\x65\x63\x74","\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F","\x6D\x61\x78\x72\x61\x74\x65","\x6D\x69\x6E\x72\x61\x74\x65","\x6D\x6F\x64\x65\x6D","\x74\x33\x38\x74\x69\x6D\x65\x6F\x75\x74","\x46\x41\x58\x4F\x50\x54\x28","\x29\x3D","\x36","\x57\x61\x69\x74","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x32\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73\x2F\x66\x61\x78\x2D\x24\x7B\x43\x41\x4C\x4C\x45\x52\x49\x44\x28\x6E\x75\x6D\x29\x7D\x2D\x24\x7B\x43\x55\x54\x28\x55\x4E\x49\x51\x55\x45\x49\x44\x2C\x2E\x2C\x31\x29\x7D\x2D\x24\x7B\x43\x55\x54\x28\x55\x4E\x49\x51\x55\x45\x49\x44\x2C\x2E\x2C\x32\x29\x7D\x2D\x24\x7B\x53\x54\x52\x46\x54\x49\x4D\x45\x28\x2C\x2C\x25\x43\x25\x79\x25\x6D\x25\x64\x25\x48\x25\x4D\x25\x53\x29\x7D\x2D\x72\x78\x2E\x74\x69\x66\x2C\x64","\x52\x65\x63\x65\x69\x76\x65\x46\x61\x78","\x61\x64\x64\x41\x63\x63\x6F\x75\x6E\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x41\x63\x63\x6F\x75\x6E\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x74\x65\x63\x68","\x6B\x65\x79","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x54\x72\x75\x6E\x6B\x49\x64","\x4C\x69\x73\x74\x49\x64","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x24\x67\x74\x65","\x2C","\x73\x70\x6C\x69\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x74\x6F","\x53\x65\x6E\x64\x46\x61\x78\x52\x70\x63\x2C\x20\x25\x73","\x53\x65\x6E\x64\x46\x61\x78","\x69\x73\x4E\x69\x6C","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x4D\x65\x73\x73\x61\x67\x65\x73","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6F\x75\x74","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x75\x73\x65\x72","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x73\x70\x72\x65\x61\x64","\x43\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x66\x72\x6F\x6D","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x66\x61\x78","\x4C\x69\x73\x74","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x64\x65\x66\x61\x75\x6C\x74\x73","\x4C\x69\x73\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x53\x65\x6E\x64\x20\x46\x61\x78\x20\x66\x61\x69\x6C\x65\x64","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x6A\x6F\x69\x6E","\x43\x68\x65\x63\x6B\x41\x66\x74\x65\x72\x53\x65\x6E\x64","\x43\x6D\x4C\x69\x73\x74","\x44\x45\x53\x43"];_0xa783[0];var jsonpatch=require(_0xa783[1]);var rp=require(_0xa783[2]);var moment=require(_0xa783[3]);var BPromise=require(_0xa783[4]);var Mustache=require(_0xa783[5]);var util=require(_0xa783[6]);var path=require(_0xa783[7]);var sox=require(_0xa783[8]);var csv=require(_0xa783[9]);var ejs=require(_0xa783[10]);var fs=require(_0xa783[11]);var _=require(_0xa783[12]);var squel=require(_0xa783[13]);var crypto=require(_0xa783[14]);var jsforce=require(_0xa783[15]);var deskjs=require(_0xa783[16]);var toCsv=require(_0xa783[9]);var querystring=require(_0xa783[17]);var Papa=require(_0xa783[18]);var qs=require(_0xa783[19]);var logger=require(_0xa783[21])(_0xa783[20]);var utils=require(_0xa783[22]);var config=require(_0xa783[23]);var db=require(_0xa783[25])[_0xa783[24]];var jayson=require(_0xa783[26]);var client=jayson[_0xa783[28]][_0xa783[27]]({port:9004});var client9002=jayson[_0xa783[28]][_0xa783[27]]({port:9002});function respondWithRpcPromise(_0xff7ex1d,_0xff7ex1e,_0xff7ex1f,_0xff7ex20){return  new BPromise(function(_0xff7ex21,_0xff7ex22){var _0xff7ex23=(_0xff7ex20|| client);return _0xff7ex23[_0xa783[41]](_0xff7ex1d,_0xff7ex1f)[_0xa783[40]](function(_0xff7ex25){logger[_0xa783[33]](_0xa783[29],_0xff7ex1e,_0xa783[32]);logger[_0xa783[36]](_0xa783[34],_0xff7ex1e,_0xa783[32],JSON[_0xa783[35]](_0xff7ex25));if(_0xff7ex25[_0xa783[30]]){if(_0xff7ex25[_0xa783[30]][_0xa783[37]]=== 500){logger[_0xa783[30]](_0xa783[29],_0xff7ex1e,_0xff7ex25[_0xa783[30]][_0xa783[38]]);return _0xff7ex22(_0xff7ex25[_0xa783[30]][_0xa783[38]])};logger[_0xa783[30]](_0xa783[29],_0xff7ex1e,_0xff7ex25[_0xa783[30]][_0xa783[38]]);return _0xff7ex21(_0xff7ex25[_0xa783[30]][_0xa783[38]])}else {logger[_0xa783[33]](_0xa783[29],_0xff7ex1e,_0xa783[32]);_0xff7ex21(_0xff7ex25[_0xa783[39]][_0xa783[38]])}})[_0xa783[31]](function(_0xff7ex24){logger[_0xa783[30]](_0xa783[29],_0xff7ex1e,_0xff7ex24);_0xff7ex22(_0xff7ex24)})})}function respondWithStatusCode(_0xff7ex25,_0xff7ex27){_0xff7ex27= _0xff7ex27|| 204;return function(_0xff7ex28){if(_0xff7ex28){return _0xff7ex25[_0xa783[42]](_0xff7ex27)};return _0xff7ex25[_0xa783[44]](_0xff7ex27)[_0xa783[43]]()}}function respondWithResult(_0xff7ex25,_0xff7ex27){_0xff7ex27= _0xff7ex27|| 200;return function(_0xff7ex28){if(_0xff7ex28){return _0xff7ex25[_0xa783[44]](_0xff7ex27)[_0xa783[45]](_0xff7ex28)}}}function respondWithFilteredResult(_0xff7ex25,_0xff7ex2b){return function(_0xff7ex28){if(_0xff7ex28){var _0xff7ex2c=_0xff7ex28[_0xa783[46]],_0xff7ex2d=_0xff7ex2b[_0xa783[47]],_0xff7ex2e=_0xff7ex2b[_0xa783[47]]+ _0xff7ex2b[_0xa783[48]],_0xff7ex27;if(_0xff7ex2e>= _0xff7ex2c){_0xff7ex2e= _0xff7ex2c;_0xff7ex27= 200}else {_0xff7ex27= 206};_0xff7ex25[_0xa783[44]](_0xff7ex27);return _0xff7ex25[_0xa783[52]](_0xa783[49],_0xff7ex2d+ _0xa783[50]+ _0xff7ex2e+ _0xa783[51]+ _0xff7ex2c)[_0xa783[45]](_0xff7ex28)};return null}}function patchUpdates(_0xff7ex30){return function(_0xff7ex28){try{jsonpatch[_0xa783[53]](_0xff7ex28,_0xff7ex30,true)}catch(err){return BPromise[_0xa783[54]](err)};return _0xff7ex28[_0xa783[55]]()}}function saveUpdates(_0xff7ex32,_0xff7ex27){return function(_0xff7ex28){if(_0xff7ex28){return _0xff7ex28[_0xa783[56]](_0xff7ex32)[_0xa783[40]](function(_0xff7ex33){return _0xff7ex33})};return null}}function removeEntity(_0xff7ex25,_0xff7ex27){return function(_0xff7ex28){if(_0xff7ex28){return _0xff7ex28[_0xa783[57]]()[_0xa783[40]](function(){_0xff7ex25[_0xa783[44]](204)[_0xa783[43]]()})}}}function handleEntityNotFound(_0xff7ex25,_0xff7ex27){return function(_0xff7ex28){if(!_0xff7ex28){_0xff7ex25[_0xa783[42]](404)};return _0xff7ex28}}function handleError(_0xff7ex25,_0xff7ex27){_0xff7ex27= _0xff7ex27|| 500;return function(_0xff7ex24){logger[_0xa783[30]](_0xff7ex24[_0xa783[58]]);if(_0xff7ex24[_0xa783[59]]){delete _0xff7ex24[_0xa783[59]]};_0xff7ex25[_0xa783[44]](_0xff7ex27)[_0xa783[60]](_0xff7ex24)}}exports[_0xa783[61]]= function(_0xff7ex1f,_0xff7ex25){var _0xff7ex2b={},_0xff7ex37={},_0xff7ex38={count:0,rows:[]};_0xff7ex37[_0xa783[62]]= _[_0xa783[65]](db[_0xa783[64]][_0xa783[63]]);var _0xff7ex39={dateStart:_0xff7ex1f[_0xa783[67]][_0xa783[66]],dateEnd:_0xff7ex1f[_0xa783[67]][_0xa783[68]]};delete _0xff7ex1f[_0xa783[67]][_0xa783[66]];delete _0xff7ex1f[_0xa783[67]][_0xa783[68]];_0xff7ex37[_0xa783[67]]= _[_0xa783[65]](_0xff7ex1f[_0xa783[67]]);_0xff7ex37[_0xa783[69]]= _[_0xa783[70]](_0xff7ex37[_0xa783[62]],_0xff7ex37[_0xa783[67]]);_0xff7ex2b[_0xa783[71]]= _[_0xa783[70]](_0xff7ex37[_0xa783[62]],qs[_0xa783[72]](_0xff7ex1f[_0xa783[67]][_0xa783[72]]));_0xff7ex2b[_0xa783[71]]= (_0xff7ex2b[_0xa783[71]][_0xa783[73]])?_0xff7ex2b[_0xa783[71]]:_0xff7ex37[_0xa783[62]];if(!_0xff7ex1f[_0xa783[67]][_0xa783[75]](_0xa783[74])){_0xff7ex2b[_0xa783[48]]= qs[_0xa783[48]](_0xff7ex1f[_0xa783[67]][_0xa783[48]]);_0xff7ex2b[_0xa783[47]]= qs[_0xa783[47]](_0xff7ex1f[_0xa783[67]][_0xa783[47]])};_0xff7ex2b[_0xa783[76]]= qs[_0xa783[77]](_0xff7ex1f[_0xa783[67]][_0xa783[77]]);_0xff7ex2b[_0xa783[78]]= qs[_0xa783[69]](_[_0xa783[79]](_0xff7ex1f[_0xa783[67]],_0xff7ex37[_0xa783[69]]));if(_0xff7ex39[_0xa783[66]]){if(_0xff7ex39[_0xa783[68]]){_0xff7ex39[_0xa783[68]]= moment(_0xff7ex39[_0xa783[68]])[_0xa783[81]](1,_0xa783[80])}else {_0xff7ex39[_0xa783[68]]= moment(_0xff7ex39[_0xa783[66]])[_0xa783[81]](1,_0xa783[80])};_[_0xa783[82]](_0xff7ex2b[_0xa783[78]],{createdAt:{$gte:_0xff7ex39[_0xa783[66]],$lte:_0xff7ex39[_0xa783[68]]}})};if(_0xff7ex1f[_0xa783[67]][_0xa783[83]]){_0xff7ex2b[_0xa783[78]]= _[_0xa783[82]](_0xff7ex2b[_0xa783[78]],{$or:_[_0xa783[85]](_0xff7ex2b[_0xa783[71]],function(_0xff7ex3a){var _0xff7ex38={};_0xff7ex38[_0xff7ex3a]= {$like:_0xa783[84]+ _0xff7ex1f[_0xa783[67]][_0xa783[83]]+ _0xa783[84]};return _0xff7ex38})})};_0xff7ex2b= _[_0xa783[82]]({},_0xff7ex2b,_0xff7ex1f[_0xa783[86]]);var _0xff7ex3b={where:_0xff7ex2b[_0xa783[78]]};return db[_0xa783[64]][_0xa783[46]](_0xff7ex3b)[_0xa783[40]](function(_0xff7ex2c){_0xff7ex38[_0xa783[46]]= _0xff7ex2c;if(_0xff7ex1f[_0xa783[67]][_0xa783[88]]){_0xff7ex2b[_0xa783[89]]= [{all:true}]};return db[_0xa783[64]][_0xa783[90]](_0xff7ex2b)})[_0xa783[40]](function(_0xff7ex3c){_0xff7ex38[_0xa783[87]]= _0xff7ex3c;return _0xff7ex38})[_0xa783[40]](respondWithFilteredResult(_0xff7ex25,_0xff7ex2b))[_0xa783[31]](handleError(_0xff7ex25,null))};exports[_0xa783[91]]= function(_0xff7ex1f,_0xff7ex25){var _0xff7ex2b={raw:false,where:{id:_0xff7ex1f[_0xa783[93]][_0xa783[92]]}},_0xff7ex37={};_0xff7ex37[_0xa783[62]]= _[_0xa783[65]](db[_0xa783[64]][_0xa783[63]]);_0xff7ex37[_0xa783[67]]= _[_0xa783[65]](_0xff7ex1f[_0xa783[67]]);_0xff7ex37[_0xa783[69]]= _[_0xa783[70]](_0xff7ex37[_0xa783[62]],_0xff7ex37[_0xa783[67]]);_0xff7ex2b[_0xa783[71]]= _[_0xa783[70]](_0xff7ex37[_0xa783[62]],qs[_0xa783[72]](_0xff7ex1f[_0xa783[67]][_0xa783[72]]));_0xff7ex2b[_0xa783[71]]= (_0xff7ex2b[_0xa783[71]][_0xa783[73]])?_0xff7ex2b[_0xa783[71]]:_0xff7ex37[_0xa783[62]];if(_0xff7ex1f[_0xa783[67]][_0xa783[88]]){_0xff7ex2b[_0xa783[89]]= [{all:true}]};_0xff7ex2b= _[_0xa783[82]]({},_0xff7ex2b,_0xff7ex1f[_0xa783[86]]);return db[_0xa783[64]][_0xa783[94]](_0xff7ex2b)[_0xa783[40]](handleEntityNotFound(_0xff7ex25,null))[_0xa783[40]](respondWithResult(_0xff7ex25,null))[_0xa783[31]](handleError(_0xff7ex25,null))};exports[_0xa783[95]]= function(_0xff7ex1f,_0xff7ex25){return db[_0xa783[64]][_0xa783[95]](_0xff7ex1f[_0xa783[96]],{})[_0xa783[40]](respondWithResult(_0xff7ex25,201))[_0xa783[31]](handleError(_0xff7ex25,null))};exports[_0xa783[56]]= function(_0xff7ex1f,_0xff7ex25){if(_0xff7ex1f[_0xa783[96]][_0xa783[92]]){delete _0xff7ex1f[_0xa783[96]][_0xa783[92]]};return db[_0xa783[64]][_0xa783[94]]({where:{id:_0xff7ex1f[_0xa783[93]][_0xa783[92]]}})[_0xa783[40]](handleEntityNotFound(_0xff7ex25,null))[_0xa783[40]](saveUpdates(_0xff7ex1f[_0xa783[96]],null))[_0xa783[40]](respondWithResult(_0xff7ex25,null))[_0xa783[31]](handleError(_0xff7ex25,null))};exports[_0xa783[57]]= function(_0xff7ex1f,_0xff7ex25){return db[_0xa783[64]][_0xa783[94]]({where:{id:_0xff7ex1f[_0xa783[93]][_0xa783[92]]}})[_0xa783[40]](handleEntityNotFound(_0xff7ex25,null))[_0xa783[40]](removeEntity(_0xff7ex25,null))[_0xa783[31]](handleError(_0xff7ex25,null))};exports[_0xa783[97]]= function(_0xff7ex1f,_0xff7ex25){return db[_0xa783[64]][_0xa783[97]]()[_0xa783[40]](respondWithResult(_0xff7ex25,null))[_0xa783[31]](handleError(_0xff7ex25,null))};exports[_0xa783[98]]= function(_0xff7ex1f,_0xff7ex25,_0xff7ex3d){if(_0xff7ex1f[_0xa783[96]][_0xa783[92]]){delete _0xff7ex1f[_0xa783[96]][_0xa783[92]]};return db[_0xa783[64]][_0xa783[94]]({where:{id:_0xff7ex1f[_0xa783[93]][_0xa783[92]]}})[_0xa783[40]](handleEntityNotFound(_0xff7ex25,null))[_0xa783[40]](function(_0xff7ex28){if(_0xff7ex28){_0xff7ex1f[_0xa783[96]][_0xa783[99]]= _0xff7ex28[_0xa783[92]];return db[_0xa783[100]][_0xa783[95]](_0xff7ex1f[_0xa783[96]])}})[_0xa783[40]](respondWithResult(_0xff7ex25,null))[_0xa783[31]](handleError(_0xff7ex25,null))};exports[_0xa783[101]]= function(_0xff7ex1f,_0xff7ex25,_0xff7ex3d){var _0xff7ex2b={raw:false,where:{}};var _0xff7ex37={};var _0xff7ex3e={count:0,rows:[]};return db[_0xa783[64]][_0xa783[102]]({where:{id:_0xff7ex1f[_0xa783[93]][_0xa783[92]]}})[_0xa783[40]](handleEntityNotFound(_0xff7ex25,null))[_0xa783[40]](function(_0xff7ex28){if(_0xff7ex28){_0xff7ex37[_0xa783[62]]= _[_0xa783[65]](db[_0xa783[100]][_0xa783[63]]);_0xff7ex37[_0xa783[67]]= _[_0xa783[65]](_0xff7ex1f[_0xa783[67]]);_0xff7ex37[_0xa783[69]]= _[_0xa783[70]](_0xff7ex37[_0xa783[62]],_0xff7ex37[_0xa783[67]]);_0xff7ex2b[_0xa783[71]]= _[_0xa783[70]](_0xff7ex37[_0xa783[62]],qs[_0xa783[72]](_0xff7ex1f[_0xa783[67]][_0xa783[72]]));_0xff7ex2b[_0xa783[71]]= (_0xff7ex2b[_0xa783[71]][_0xa783[73]])?_0xff7ex2b[_0xa783[71]]:_0xff7ex37[_0xa783[62]];if(!_0xff7ex1f[_0xa783[67]][_0xa783[75]](_0xa783[74])){_0xff7ex2b[_0xa783[48]]= qs[_0xa783[48]](_0xff7ex1f[_0xa783[67]][_0xa783[48]]);_0xff7ex2b[_0xa783[47]]= qs[_0xa783[47]](_0xff7ex1f[_0xa783[67]][_0xa783[47]])};_0xff7ex2b[_0xa783[76]]= qs[_0xa783[77]](_0xff7ex1f[_0xa783[67]][_0xa783[77]]);_0xff7ex2b[_0xa783[78]]= qs[_0xa783[69]](_[_0xa783[79]](_0xff7ex1f[_0xa783[67]],_0xff7ex37[_0xa783[69]]));_0xff7ex2b[_0xa783[78]][_0xa783[99]]= _0xff7ex28[_0xa783[92]];if(_0xff7ex1f[_0xa783[67]][_0xa783[83]]){_0xff7ex2b[_0xa783[78]]= _[_0xa783[82]](_0xff7ex2b[_0xa783[78]],{$or:_[_0xa783[85]](_0xff7ex2b[_0xa783[71]],function(_0xff7ex3a){var _0xff7ex38={};_0xff7ex38[_0xff7ex3a]= {$like:_0xa783[84]+ _0xff7ex1f[_0xa783[67]][_0xa783[83]]+ _0xa783[84]};return _0xff7ex38})})};_0xff7ex2b= _[_0xa783[82]]({},_0xff7ex2b,_0xff7ex1f[_0xa783[86]]);return db[_0xa783[100]][_0xa783[46]]({where:_0xff7ex2b[_0xa783[78]]})[_0xa783[40]](function(_0xff7ex2c){_0xff7ex3e[_0xa783[46]]= _0xff7ex2c;if(_0xff7ex1f[_0xa783[67]][_0xa783[88]]){_0xff7ex2b[_0xa783[89]]= [{all:true}]};return db[_0xa783[100]][_0xa783[90]](_0xff7ex2b)})[_0xa783[40]](function(_0xff7ex3c){_0xff7ex3e[_0xa783[87]]= _0xff7ex3c;return _0xff7ex3e})}})[_0xa783[40]](respondWithFilteredResult(_0xff7ex25,_0xff7ex2b))[_0xa783[31]](handleError(_0xff7ex25,null))};exports[_0xa783[103]]= function(_0xff7ex1f,_0xff7ex25,_0xff7ex3d){var _0xff7ex3f;return db[_0xa783[64]][_0xa783[94]]({where:{id:_0xff7ex1f[_0xa783[93]][_0xa783[92]]}})[_0xa783[40]](handleEntityNotFound(_0xff7ex25,null))[_0xa783[40]](function(_0xff7ex28){if(_0xff7ex28){return _0xff7ex28[_0xa783[103]](_0xff7ex1f[_0xa783[67]][_0xa783[104]])}})[_0xa783[40]](respondWithStatusCode(_0xff7ex25,null))[_0xa783[31]](handleError(_0xff7ex25,null))};exports[_0xa783[105]]= function(_0xff7ex1f,_0xff7ex25,_0xff7ex3d){return db[_0xa783[107]][_0xa783[94]]({where:{id:_0xff7ex1f[_0xa783[93]][_0xa783[92]]}})[_0xa783[40]](handleEntityNotFound(_0xff7ex25,null))[_0xa783[40]](function(_0xff7ex28){if(_0xff7ex28){return _0xff7ex28[_0xa783[105]](_0xff7ex1f[_0xa783[96]][_0xa783[104]],_[_0xa783[106]](_0xff7ex1f[_0xa783[96]],[_0xa783[104],_0xa783[92]])|| {})}})[_0xa783[40]](respondWithResult(_0xff7ex25,null))[_0xa783[31]](handleError(_0xff7ex25,null))};exports[_0xa783[108]]= function(_0xff7ex1f,_0xff7ex25,_0xff7ex3d){var _0xff7ex2b={raw:false,where:{}};var _0xff7ex37={};var _0xff7ex3e={count:0,rows:[]};return db[_0xa783[64]][_0xa783[102]]({where:{id:_0xff7ex1f[_0xa783[93]][_0xa783[92]]}})[_0xa783[40]](handleEntityNotFound(_0xff7ex25,null))[_0xa783[40]](function(_0xff7ex28){if(_0xff7ex28){_0xff7ex37[_0xa783[62]]= _[_0xa783[65]](db[_0xa783[107]][_0xa783[63]]);_0xff7ex37[_0xa783[67]]= _[_0xa783[65]](_0xff7ex1f[_0xa783[67]]);_0xff7ex37[_0xa783[69]]= _[_0xa783[70]](_0xff7ex37[_0xa783[62]],_0xff7ex37[_0xa783[67]]);_0xff7ex2b[_0xa783[71]]= _[_0xa783[70]](_0xff7ex37[_0xa783[62]],qs[_0xa783[72]](_0xff7ex1f[_0xa783[67]][_0xa783[72]]));_0xff7ex2b[_0xa783[71]]= (_0xff7ex2b[_0xa783[71]][_0xa783[73]])?_0xff7ex2b[_0xa783[71]]:_0xff7ex37[_0xa783[62]];if(!_0xff7ex1f[_0xa783[67]][_0xa783[75]](_0xa783[74])){_0xff7ex2b[_0xa783[48]]= qs[_0xa783[48]](_0xff7ex1f[_0xa783[67]][_0xa783[48]]);_0xff7ex2b[_0xa783[47]]= qs[_0xa783[47]](_0xff7ex1f[_0xa783[67]][_0xa783[47]])};_0xff7ex2b[_0xa783[76]]= qs[_0xa783[77]](_0xff7ex1f[_0xa783[67]][_0xa783[77]]);_0xff7ex2b[_0xa783[78]]= qs[_0xa783[69]](_[_0xa783[79]](_0xff7ex1f[_0xa783[67]],_0xff7ex37[_0xa783[69]]));_0xff7ex2b[_0xa783[78]][_0xa783[99]]= _0xff7ex28[_0xa783[92]];if(_0xff7ex1f[_0xa783[67]][_0xa783[83]]){_0xff7ex2b[_0xa783[78]]= _[_0xa783[82]](_0xff7ex2b[_0xa783[78]],{$or:_[_0xa783[85]](_0xff7ex2b[_0xa783[71]],function(_0xff7ex3a){var _0xff7ex38={};_0xff7ex38[_0xff7ex3a]= {$like:_0xa783[84]+ _0xff7ex1f[_0xa783[67]][_0xa783[83]]+ _0xa783[84]};return _0xff7ex38})})};_0xff7ex2b= _[_0xa783[82]]({},_0xff7ex2b,_0xff7ex1f[_0xa783[86]]);return db[_0xa783[107]][_0xa783[46]]({where:_0xff7ex2b[_0xa783[78]]})[_0xa783[40]](function(_0xff7ex2c){_0xff7ex3e[_0xa783[46]]= _0xff7ex2c;if(_0xff7ex1f[_0xa783[67]][_0xa783[88]]){_0xff7ex2b[_0xa783[89]]= [{model:db[_0xa783[109]],as:_0xa783[110],required:false},{model:db[_0xa783[111]],as:_0xa783[112],attributes:[_0xa783[59],_0xa783[113],_0xa783[114]],required:false},{model:db[_0xa783[115]],as:_0xa783[116],attributes:[_0xa783[92],_0xa783[59],_0xa783[117]],where:_0xff7ex1f[_0xa783[67]][_0xa783[118]]?{id:_0xff7ex1f[_0xa783[67]][_0xa783[118]]}:undefined,required:_0xff7ex1f[_0xa783[67]][_0xa783[118]]?true:false}]};return db[_0xa783[107]][_0xa783[90]](_0xff7ex2b)})[_0xa783[40]](function(_0xff7ex3c){_0xff7ex3e[_0xa783[87]]= _0xff7ex3c;return _0xff7ex3e})}})[_0xa783[40]](respondWithFilteredResult(_0xff7ex25,_0xff7ex2b))[_0xa783[31]](handleError(_0xff7ex25,null))};exports[_0xa783[119]]= function(_0xff7ex1f,_0xff7ex25,_0xff7ex3d){return db[_0xa783[64]][_0xa783[102]]({where:{id:_0xff7ex1f[_0xa783[93]][_0xa783[92]]}})[_0xa783[40]](handleEntityNotFound(_0xff7ex25,null))[_0xa783[40]](function(_0xff7ex28){if(_0xff7ex28){return db[_0xa783[125]][_0xa783[124]](function(_0xff7ex40){return db[_0xa783[122]][_0xa783[57]]({where:{FaxAccountId:_0xff7ex1f[_0xa783[93]][_0xa783[92]]},transaction:_0xff7ex40})[_0xa783[40]](function(_0xff7ex41){var _0xff7ex42=_[_0xa783[85]](_0xff7ex1f[_0xa783[96]],function(_0xff7ex43){_0xff7ex43[_0xa783[99]]= _0xff7ex1f[_0xa783[93]][_0xa783[92]];return _0xff7ex43});return db[_0xa783[122]][_0xa783[123]](_0xff7ex42,{transaction:_0xff7ex40})})})[_0xa783[40]](function(){return db[_0xa783[122]][_0xa783[121]]({where:{FaxAccountId:_0xff7ex1f[_0xa783[93]][_0xa783[92]]},order:_0xa783[120]})})}})[_0xa783[40]](respondWithResult(_0xff7ex25,null))[_0xa783[31]](handleError(_0xff7ex25,null))};exports[_0xa783[126]]= function(_0xff7ex1f,_0xff7ex28,_0xff7ex3d){var _0xff7ex2b={};var _0xff7ex37={};var _0xff7ex44;var _0xff7ex2c;return db[_0xa783[64]][_0xa783[102]]({where:{id:_0xff7ex1f[_0xa783[93]][_0xa783[92]]}})[_0xa783[40]](handleEntityNotFound(_0xff7ex28,null))[_0xa783[40]](function(_0xff7ex28){if(_0xff7ex28){_0xff7ex44= _0xff7ex28;_0xff7ex37[_0xa783[62]]= _[_0xa783[65]](db[_0xa783[122]][_0xa783[63]]);_0xff7ex37[_0xa783[67]]= _[_0xa783[65]](_0xff7ex1f[_0xa783[67]]);_0xff7ex37[_0xa783[69]]= _[_0xa783[70]](_0xff7ex37[_0xa783[62]],_0xff7ex37[_0xa783[67]]);_0xff7ex2b[_0xa783[71]]= _[_0xa783[70]](_0xff7ex37[_0xa783[62]],qs[_0xa783[72]](_0xff7ex1f[_0xa783[67]][_0xa783[72]]));_0xff7ex2b[_0xa783[71]]= (_0xff7ex2b[_0xa783[71]][_0xa783[73]])?_0xff7ex2b[_0xa783[71]]:_0xff7ex37[_0xa783[62]];_0xff7ex2b[_0xa783[76]]= qs[_0xa783[77]](_0xff7ex1f[_0xa783[67]][_0xa783[77]]);_0xff7ex2b[_0xa783[78]]= qs[_0xa783[69]](_[_0xa783[79]](_0xff7ex1f[_0xa783[67]],_0xff7ex37[_0xa783[69]]));if(_0xff7ex1f[_0xa783[67]][_0xa783[83]]){_0xff7ex2b[_0xa783[78]]= _[_0xa783[82]](_0xff7ex2b[_0xa783[78]],{$or:_[_0xa783[85]](_0xff7ex2b[_0xa783[71]],function(_0xff7ex3a){var _0xff7ex38={};_0xff7ex38[_0xff7ex3a]= {$like:_0xa783[84]+ _0xff7ex1f[_0xa783[67]][_0xa783[83]]+ _0xa783[84]};return _0xff7ex38})})};_0xff7ex2b= _[_0xa783[82]]({},_0xff7ex2b,_0xff7ex1f[_0xa783[86]]);return _0xff7ex44[_0xa783[126]](_0xff7ex2b)}})[_0xa783[40]](function(_0xff7ex3f){if(_0xff7ex3f){_0xff7ex2c= _0xff7ex3f[_0xa783[73]];if(!_0xff7ex1f[_0xa783[67]][_0xa783[75]](_0xa783[74])){_0xff7ex2b[_0xa783[48]]= qs[_0xa783[48]](_0xff7ex1f[_0xa783[67]][_0xa783[48]]);_0xff7ex2b[_0xa783[47]]= qs[_0xa783[47]](_0xff7ex1f[_0xa783[67]][_0xa783[47]])};return _0xff7ex44[_0xa783[126]](_0xff7ex2b)}})[_0xa783[40]](function(_0xff7ex3c){if(_0xff7ex3c){return _0xff7ex3c?{count:_0xff7ex2c,rows:_0xff7ex3c}:null}})[_0xa783[40]](respondWithResult(_0xff7ex28,null))[_0xa783[31]](handleError(_0xff7ex28,null))};exports[_0xa783[127]]= function(_0xff7ex1f,_0xff7ex25,_0xff7ex3d){if(_0xff7ex1f[_0xa783[96]][_0xa783[92]]){delete _0xff7ex1f[_0xa783[96]][_0xa783[92]]};return db[_0xa783[64]][_0xa783[94]]({where:{id:_0xff7ex1f[_0xa783[93]][_0xa783[92]]}})[_0xa783[40]](handleEntityNotFound(_0xff7ex25,null))[_0xa783[40]](function(_0xff7ex28){if(_0xff7ex28){_0xff7ex1f[_0xa783[96]][_0xa783[99]]= _0xff7ex28[_0xa783[92]];return db[_0xa783[128]][_0xa783[95]](_0xff7ex1f[_0xa783[96]])}})[_0xa783[40]](respondWithResult(_0xff7ex25,null))[_0xa783[31]](handleError(_0xff7ex25,null))};exports[_0xa783[129]]= function(_0xff7ex1f,_0xff7ex25,_0xff7ex3d){return db[_0xa783[130]][_0xa783[94]]({where:{id:_0xff7ex1f[_0xa783[93]][_0xa783[92]]}})[_0xa783[40]](handleEntityNotFound(_0xff7ex25,null))[_0xa783[40]](function(_0xff7ex28){if(_0xff7ex28){return _0xff7ex28[_0xa783[129]](_0xff7ex1f[_0xa783[96]][_0xa783[104]],_[_0xa783[106]](_0xff7ex1f[_0xa783[96]],[_0xa783[104],_0xa783[92]])|| {})}})[_0xa783[40]](respondWithResult(_0xff7ex25,null))[_0xa783[31]](handleError(_0xff7ex25,null))};exports[_0xa783[131]]= function(_0xff7ex1f,_0xff7ex28,_0xff7ex3d){var _0xff7ex2b={};var _0xff7ex37={};var _0xff7ex44;var _0xff7ex2c;return db[_0xa783[64]][_0xa783[102]]({where:{id:_0xff7ex1f[_0xa783[93]][_0xa783[92]]}})[_0xa783[40]](handleEntityNotFound(_0xff7ex28,null))[_0xa783[40]](function(_0xff7ex28){if(_0xff7ex28){_0xff7ex44= _0xff7ex28;_0xff7ex37[_0xa783[62]]= _[_0xa783[65]](db[_0xa783[128]][_0xa783[63]]);_0xff7ex37[_0xa783[67]]= _[_0xa783[65]](_0xff7ex1f[_0xa783[67]]);_0xff7ex37[_0xa783[69]]= _[_0xa783[70]](_0xff7ex37[_0xa783[62]],_0xff7ex37[_0xa783[67]]);_0xff7ex2b[_0xa783[71]]= _[_0xa783[70]](_0xff7ex37[_0xa783[62]],qs[_0xa783[72]](_0xff7ex1f[_0xa783[67]][_0xa783[72]]));_0xff7ex2b[_0xa783[71]]= (_0xff7ex2b[_0xa783[71]][_0xa783[73]])?_0xff7ex2b[_0xa783[71]]:_0xff7ex37[_0xa783[62]];_0xff7ex2b[_0xa783[76]]= qs[_0xa783[77]](_0xff7ex1f[_0xa783[67]][_0xa783[77]]);_0xff7ex2b[_0xa783[78]]= qs[_0xa783[69]](_[_0xa783[79]](_0xff7ex1f[_0xa783[67]],_0xff7ex37[_0xa783[69]]));if(_0xff7ex1f[_0xa783[67]][_0xa783[83]]){_0xff7ex2b[_0xa783[78]]= _[_0xa783[82]](_0xff7ex2b[_0xa783[78]],{$or:_[_0xa783[85]](_0xff7ex2b[_0xa783[71]],function(_0xff7ex3a){var _0xff7ex38={};_0xff7ex38[_0xff7ex3a]= {$like:_0xa783[84]+ _0xff7ex1f[_0xa783[67]][_0xa783[83]]+ _0xa783[84]};return _0xff7ex38})})};_0xff7ex2b= _[_0xa783[82]]({},_0xff7ex2b,_0xff7ex1f[_0xa783[86]]);return _0xff7ex44[_0xa783[131]](_0xff7ex2b)}})[_0xa783[40]](function(_0xff7ex3f){if(_0xff7ex3f){_0xff7ex2c= _0xff7ex3f[_0xa783[73]];if(!_0xff7ex1f[_0xa783[67]][_0xa783[75]](_0xa783[74])){_0xff7ex2b[_0xa783[48]]= qs[_0xa783[48]](_0xff7ex1f[_0xa783[67]][_0xa783[48]]);_0xff7ex2b[_0xa783[47]]= qs[_0xa783[47]](_0xff7ex1f[_0xa783[67]][_0xa783[47]])};return _0xff7ex44[_0xa783[131]](_0xff7ex2b)}})[_0xa783[40]](function(_0xff7ex3c){if(_0xff7ex3c){return _0xff7ex3c?{count:_0xff7ex2c,rows:_0xff7ex3c}:null}})[_0xa783[40]](respondWithResult(_0xff7ex28,null))[_0xa783[31]](handleError(_0xff7ex28,null))};function Extension(_0xff7ex46,_0xff7ex47,_0xff7ex48,_0xff7ex49){this[_0xa783[132]]= _0xa783[133];this[_0xa783[134]]= _0xff7ex46[_0xa783[135]];this[_0xa783[136]]= _0xff7ex49;this[_0xa783[137]]= _0xa783[138];this[_0xa783[139]]= _0xa783[140];this[_0xa783[99]]= _0xff7ex46[_0xa783[92]];this[_0xa783[120]]= _0xff7ex47;this[_0xa783[141]]= _0xff7ex48}function createExtensionsReciveFax(_0xff7ex46){var _0xff7ex47=1;var _0xff7ex4b=[];_0xff7ex4b[_0xa783[144]]( new Extension(_0xff7ex46,_0xff7ex47,_0xa783[142],_0xa783[143]));_0xff7ex47+= 1;_0xff7ex4b[_0xa783[144]]( new Extension(_0xff7ex46,_0xff7ex47,_0xa783[145],_0xa783[146]));_0xff7ex47+= 1;for(var _0xff7ex4c in _0xff7ex46){if(_0xff7ex46[_0xa783[75]](_0xff7ex4c)&& (_0xff7ex4c=== _0xa783[147]|| _0xff7ex4c=== _0xa783[135]|| _0xff7ex4c=== _0xa783[148]|| _0xff7ex4c=== _0xa783[149]|| _0xff7ex4c=== _0xa783[150]|| _0xff7ex4c=== _0xa783[151]|| _0xff7ex4c=== _0xa783[152]|| _0xff7ex4c=== _0xa783[153]|| _0xff7ex4c=== _0xa783[154])){_0xff7ex4b[_0xa783[144]]( new Extension(_0xff7ex46,_0xff7ex47,_0xa783[155]+ _0xff7ex4c+ _0xa783[156]+ _0xff7ex46[_0xff7ex4c],_0xa783[146]));_0xff7ex47+= 1}};_0xff7ex4b[_0xa783[144]]( new Extension(_0xff7ex46,_0xff7ex47,_0xa783[157],_0xa783[158]));_0xff7ex47+= 1;_0xff7ex4b[_0xa783[144]]( new Extension(_0xff7ex46,_0xff7ex47,_0xa783[159],_0xa783[160]));_0xff7ex47= 0;return _0xff7ex4b}exports[_0xa783[161]]= function(_0xff7ex1f,_0xff7ex25,_0xff7ex3d){var _0xff7ex46;return db[_0xa783[125]][_0xa783[124]](function(_0xff7ex40){return db[_0xa783[64]][_0xa783[95]](_0xff7ex1f[_0xa783[96]],{transaction:_0xff7ex40})[_0xa783[40]](function(_0xff7ex25){_0xff7ex46= _0xff7ex25[_0xa783[162]]({plain:true});return db[_0xa783[163]][_0xa783[123]](createExtensionsReciveFax(_0xff7ex46),{transaction:_0xff7ex40})})})[_0xa783[40]](function(){return _0xff7ex46})[_0xa783[40]](respondWithResult(_0xff7ex25,null))[_0xa783[31]](handleError(_0xff7ex25,null))};exports[_0xa783[164]]= function(_0xff7ex1f,_0xff7ex25,_0xff7ex3d){var _0xff7ex46;return db[_0xa783[125]][_0xa783[124]](function(_0xff7ex40){return db[_0xa783[64]][_0xa783[56]](_0xff7ex1f[_0xa783[96]],{where:{id:_0xff7ex1f[_0xa783[96]][_0xa783[92]]},transaction:_0xff7ex40})[_0xa783[40]](function(_0xff7ex25){return db[_0xa783[163]][_0xa783[57]]({where:{FaxAccountId:_0xff7ex1f[_0xa783[96]][_0xa783[92]]},transaction:_0xff7ex40})[_0xa783[40]](function(_0xff7ex4d){return db[_0xa783[163]][_0xa783[123]](createExtensionsReciveFax(_[_0xa783[106]](_0xff7ex1f[_0xa783[96]],[_0xa783[166],_0xa783[167],_0xa783[168],_0xa783[169],_0xa783[170],_0xa783[171]])),{transaction:_0xff7ex40})})})})[_0xa783[40]](function(){return db[_0xa783[64]][_0xa783[165]](_0xff7ex1f[_0xa783[96]][_0xa783[92]])})[_0xa783[40]](respondWithResult(_0xff7ex25,null))[_0xa783[31]](handleError(_0xff7ex25,null))};exports[_0xa783[172]]= function(_0xff7ex1f,_0xff7ex25,_0xff7ex3d){var _0xff7ex2b={raw:true,where:{}};var _0xff7ex37={};var _0xff7ex3e={count:0,rows:[]};return db[_0xa783[64]][_0xa783[102]]({where:{id:_0xff7ex1f[_0xa783[93]][_0xa783[92]]}})[_0xa783[40]](handleEntityNotFound(_0xff7ex25,null))[_0xa783[40]](function(_0xff7ex28){if(_0xff7ex28){_0xff7ex37[_0xa783[62]]= _[_0xa783[65]](db[_0xa783[173]][_0xa783[63]]);_0xff7ex37[_0xa783[67]]= _[_0xa783[65]](_0xff7ex1f[_0xa783[67]]);_0xff7ex37[_0xa783[69]]= _[_0xa783[70]](_0xff7ex37[_0xa783[62]],_0xff7ex37[_0xa783[67]]);_0xff7ex2b[_0xa783[71]]= _[_0xa783[70]](_0xff7ex37[_0xa783[62]],qs[_0xa783[72]](_0xff7ex1f[_0xa783[67]][_0xa783[72]]));_0xff7ex2b[_0xa783[71]]= (_0xff7ex2b[_0xa783[71]][_0xa783[73]])?_0xff7ex2b[_0xa783[71]]:_0xff7ex37[_0xa783[62]];if(!_0xff7ex1f[_0xa783[67]][_0xa783[75]](_0xa783[74])){_0xff7ex2b[_0xa783[48]]= qs[_0xa783[48]](_0xff7ex1f[_0xa783[67]][_0xa783[48]]);_0xff7ex2b[_0xa783[47]]= qs[_0xa783[47]](_0xff7ex1f[_0xa783[67]][_0xa783[47]])};_0xff7ex2b[_0xa783[76]]= qs[_0xa783[77]](_0xff7ex1f[_0xa783[67]][_0xa783[77]]);_0xff7ex2b[_0xa783[78]]= qs[_0xa783[69]](_[_0xa783[79]](_0xff7ex1f[_0xa783[67]],_0xff7ex37[_0xa783[69]]));_0xff7ex2b[_0xa783[78]][_0xa783[99]]= _0xff7ex28[_0xa783[92]];if(_0xff7ex1f[_0xa783[67]][_0xa783[83]]){_0xff7ex2b[_0xa783[78]]= _[_0xa783[82]](_0xff7ex2b[_0xa783[78]],{$or:_[_0xa783[85]](_0xff7ex2b[_0xa783[71]],function(_0xff7ex3a){var _0xff7ex38={};_0xff7ex38[_0xff7ex3a]= {$like:_0xa783[84]+ _0xff7ex1f[_0xa783[67]][_0xa783[83]]+ _0xa783[84]};return _0xff7ex38})})};if(_0xff7ex1f[_0xa783[67]][_0xa783[174]]){var _0xff7ex4e=_0xff7ex1f[_0xa783[67]][_0xa783[174]][_0xa783[176]](_0xa783[175]);var _0xff7ex38={};_0xff7ex38[_0xff7ex4e[0]]= {$gte:moment(_0xff7ex4e[1])[_0xa783[178]](_0xa783[177])};_0xff7ex2b[_0xa783[78]]= _[_0xa783[82]](_0xff7ex2b[_0xa783[78]],_0xff7ex38)};_0xff7ex2b= _[_0xa783[82]]({},_0xff7ex2b,_0xff7ex1f[_0xa783[86]]);return db[_0xa783[173]][_0xa783[46]]({where:_0xff7ex2b[_0xa783[78]]})[_0xa783[40]](function(_0xff7ex2c){_0xff7ex3e[_0xa783[46]]= _0xff7ex2c;if(_0xff7ex1f[_0xa783[67]][_0xa783[88]]){_0xff7ex2b[_0xa783[89]]= [{all:true}]};return db[_0xa783[173]][_0xa783[90]](_0xff7ex2b)})[_0xa783[40]](function(_0xff7ex3c){_0xff7ex3e[_0xa783[87]]= _0xff7ex3c;return _0xff7ex3e})}})[_0xa783[40]](respondWithFilteredResult(_0xff7ex25,_0xff7ex2b))[_0xa783[31]](handleError(_0xff7ex25,null))};exports[_0xa783[60]]= function(_0xff7ex1f,_0xff7ex25,_0xff7ex3d){var _0xff7ex4f,_0xff7ex50={},_0xff7ex51;if(_0xff7ex1f[_0xa783[96]][_0xa783[179]]){_0xff7ex51= _0xff7ex1f[_0xa783[96]][_0xa783[179]][0]};return db[_0xa783[64]][_0xa783[94]]({where:{id:_0xff7ex1f[_0xa783[93]][_0xa783[92]]},include:[{model:db[_0xa783[205]],as:_0xa783[195],include:[{model:db[_0xa783[109]],as:_0xa783[196],where:{fax:_0xff7ex51},limit:1,order:[[_0xa783[169],_0xa783[206]]]}]}]})[_0xa783[40]](handleEntityNotFound(_0xff7ex25,null))[_0xa783[40]](function(_0xff7ex56){_0xff7ex4f= _0xff7ex56;if(_0xff7ex1f[_0xa783[96]][_0xa783[183]]&& _0xff7ex1f[_0xa783[96]][_0xa783[183]][_0xa783[73]]){for(var _0xff7ex47=0;_0xff7ex47< _0xff7ex1f[_0xa783[96]][_0xa783[183]][_0xa783[73]];_0xff7ex47+= 1){_0xff7ex1f[_0xa783[96]][_0xa783[183]][_0xff7ex47]= {filename:_0xff7ex1f[_0xa783[96]][_0xa783[183]][_0xff7ex47][_0xa783[59]],id:_0xff7ex1f[_0xa783[96]][_0xa783[183]][_0xff7ex47][_0xa783[92]],path:path[_0xa783[203]](config[_0xa783[200]],_0xa783[201],_0xff7ex1f[_0xa783[96]][_0xa783[183]][_0xff7ex47][_0xa783[202]])}}};return respondWithRpcPromise(_0xa783[204],_0xa783[204],{FaxAccountId:_[_0xa783[182]](_0xff7ex1f[_0xa783[93]][_0xa783[92]])?undefined:_0xff7ex1f[_0xa783[93]][_0xa783[92]],path:_[_0xa783[182]](_0xff7ex1f[_0xa783[96]][_0xa783[183]][0][_0xa783[7]])?undefined:_0xff7ex1f[_0xa783[96]][_0xa783[183]][0][_0xa783[7]],fax:_[_0xa783[182]](_0xff7ex1f[_0xa783[96]][_0xa783[179]][0])?undefined:_0xff7ex1f[_0xa783[96]][_0xa783[179]][0]},client9002)})[_0xa783[40]](function(){if(_0xff7ex4f){if(_[_0xa783[182]](_0xff7ex1f[_0xa783[96]][_0xa783[192]])){_0xff7ex1f[_0xa783[96]][_0xa783[192]]= util[_0xa783[178]](_0xa783[193],_0xff7ex4f[_0xa783[59]],_0xff7ex4f[_0xa783[194]])};if(_0xff7ex4f[_0xa783[195]]){if(_0xff7ex4f[_0xa783[195]][_0xa783[196]][_0xa783[73]]){return _0xff7ex4f[_0xa783[195]][_0xa783[196]][0]}else {return db[_0xa783[109]][_0xa783[95]](_[_0xa783[197]](_0xff7ex1f[_0xa783[96]],{firstName:_0xff7ex1f[_0xa783[96]][_0xa783[179]][0],phone:_0xff7ex1f[_0xa783[96]][_0xa783[179]][0],fax:_0xff7ex1f[_0xa783[96]][_0xa783[179]][0],ListId:_0xff7ex4f[_0xa783[171]]}))}}else {throw  new Error(_0xa783[198])}}else {throw  new Error(_0xa783[199])}})[_0xa783[40]](function(_0xff7ex54){if(_0xff7ex54){return db[_0xa783[107]][_0xa783[94]]({where:{ContactId:_0xff7ex54[_0xa783[92]],closed:false,FaxAccountId:_0xff7ex4f[_0xa783[92]]}})[_0xa783[40]](function(_0xff7ex28){if(_0xff7ex28){return [_0xff7ex28,false]};return db[_0xa783[107]][_0xa783[95]]({UserId:_0xff7ex1f[_0xa783[188]][_0xa783[92]],ContactId:_0xff7ex54[_0xa783[92]],FaxAccountId:_0xff7ex4f[_0xa783[92]],fax:_0xff7ex1f[_0xa783[96]][_0xa783[179]][0],firstMsgDirection:_0xa783[186],Messages:[_[_0xa783[82]](_0xff7ex1f[_0xa783[96]],{read:false,body:_0xff7ex1f[_0xa783[96]][_0xa783[183]][0][_0xa783[187]],FaxAccountId:_0xff7ex4f[_0xa783[92]],UserId:_0xff7ex1f[_0xa783[188]][_0xa783[92]],ContactId:_0xff7ex54[_0xa783[92]],AttachmentId:_0xff7ex1f[_0xa783[96]][_0xa783[183]][0][_0xa783[92]]})]},{include:[{model:db[_0xa783[173]],as:_0xa783[184]}]})[_0xa783[40]](function(_0xff7ex55){return [_0xff7ex55,true]})})}else {throw  new Error(_0xa783[191])}})[_0xa783[190]](function(_0xff7ex28,_0xff7ex52){if(_0xff7ex52){return _0xff7ex28};return db[_0xa783[173]][_0xa783[95]]({direction:_0xa783[186],read:false,body:_0xff7ex1f[_0xa783[96]][_0xa783[183]][0][_0xa783[187]],FaxAccountId:_0xff7ex4f[_0xa783[92]],FaxInteractionId:_0xff7ex28[_0xa783[92]],UserId:_0xff7ex1f[_0xa783[188]][_0xa783[92]],ContactId:_0xff7ex28[_0xa783[189]],AttachmentId:_0xff7ex1f[_0xa783[96]][_0xa783[183]][0][_0xa783[92]]})[_0xa783[40]](function(_0xff7ex53){_0xff7ex28[_0xa783[185]][_0xa783[184]]= [];_0xff7ex28[_0xa783[185]][_0xa783[184]][_0xa783[144]](_0xff7ex53[_0xa783[185]]);return _0xff7ex28})})[_0xa783[40]](function(_0xff7ex28){respondWithRpcPromise(_0xa783[181],_0xa783[181],{FaxAccountId:_[_0xa783[182]](_0xff7ex1f[_0xa783[93]][_0xa783[92]])?undefined:_0xff7ex1f[_0xa783[93]][_0xa783[92]],path:_[_0xa783[182]](_0xff7ex1f[_0xa783[96]][_0xa783[183]][0][_0xa783[7]])?undefined:_0xff7ex1f[_0xa783[96]][_0xa783[183]][0][_0xa783[7]],fax:_[_0xa783[182]](_0xff7ex1f[_0xa783[96]][_0xa783[179]][0])?undefined:_0xff7ex1f[_0xa783[96]][_0xa783[179]][0],AttachmentId:_0xff7ex1f[_0xa783[96]][_0xa783[183]][0][_0xa783[92]]},client9002)[_0xa783[40]](function(_0xff7ex25){logger[_0xa783[33]](_0xa783[180],_0xff7ex25)})[_0xa783[31]](function(_0xff7ex24){logger[_0xa783[33]](_0xa783[180],_0xff7ex24)});return _0xff7ex28})[_0xa783[40]](respondWithResult(_0xff7ex25,null))[_0xa783[31]](handleError(_0xff7ex25,null))}
\ No newline at end of file
index de1ab2c..2e33bbc 100644 (file)
@@ -1 +1 @@
-var _0xd50d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0xd50d[0];var _=require(_0xd50d[1]);var util=require(_0xd50d[2]);var logger=require(_0xd50d[4])(_0xd50d[3]);var moment=require(_0xd50d[5]);var BPromise=require(_0xd50d[6]);var rp=require(_0xd50d[7]);var attributes=require(_0xd50d[8]);module[_0xd50d[9]]= function(_0xb87fx8,_0xb87fx9){return _0xb87fx8[_0xd50d[12]](_0xd50d[10],attributes,{tableName:_0xd50d[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xe03f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0xe03f[0];var _=require(_0xe03f[1]);var util=require(_0xe03f[2]);var logger=require(_0xe03f[4])(_0xe03f[3]);var moment=require(_0xe03f[5]);var BPromise=require(_0xe03f[6]);var rp=require(_0xe03f[7]);var attributes=require(_0xe03f[8]);module[_0xe03f[9]]= function(_0xd164x8,_0xd164x9){return _0xd164x8[_0xe03f[12]](_0xe03f[10],attributes,{tableName:_0xe03f[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index f375925..d4e7ed5 100644 (file)
@@ -1 +1 @@
-var _0x89f9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x4E\x6F\x74\x69\x66\x79\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x62\x6F\x64\x79","\x66\x61\x78","\x55\x73\x65\x72\x49\x64","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x2C","\x77\x61\x69\x74\x46\x6F\x72\x54\x68\x65\x41\x73\x73\x69\x67\x6E\x65\x64\x41\x67\x65\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x75\x6E\x73\x68\x69\x66\x74","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x53\x74\x61\x72\x74","\x73\x74\x61\x72\x74\x52\x6F\x75\x74\x69\x6E\x67","\x69\x64","\x66\x69\x6E\x64","\x55\x73\x65\x72","\x67\x65\x74","\x61\x75\x74\x6F\x63\x6C\x6F\x73\x65","\x6C\x65\x6E\x67\x74\x68","\x63\x6C\x6F\x73\x65","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x70\x75\x73\x68","\x63\x72\x65\x61\x74\x65\x64","\x69\x6E","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x49\x64","\x63\x72\x65\x61\x74\x65","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x73\x70\x72\x65\x61\x64","\x63\x6F\x6E\x74\x61\x63\x74","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x4C\x69\x73\x74","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6F\x6D\x69\x74","\x6C\x69\x73\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x61\x73\x63","\x6F\x72\x64\x65\x72\x42\x79","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x66\x72\x6F\x6D","\x4C\x69\x73\x74\x49\x64","\x64\x65\x66\x61\x75\x6C\x74\x73","\x6D\x61\x70\x4B\x65\x79","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6D\x4C\x69\x73\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6E\x6F\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x20\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6B\x65\x79\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x69\x73\x4E\x69\x6C","\x66\x72\x6F\x6D\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","","\x62\x6F\x64\x79\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x20\x61\x6E\x64\x20\x6E\x6F\x74\x20\x65\x6D\x70\x74\x79","\x6D\x61\x70\x4B\x65\x79\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x6D\x61\x70\x4B\x65\x79\x20\x69\x6E\x76\x61\x6C\x69\x64\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x89f9[0];var _=require(_0x89f9[1]);var util=require(_0x89f9[2]);var moment=require(_0x89f9[3]);var BPromise=require(_0x89f9[4]);var rs=require(_0x89f9[5]);var fs=require(_0x89f9[6]);var db=require(_0x89f9[8])[_0x89f9[7]];var utils=require(_0x89f9[9]);var logger=require(_0x89f9[11])(_0x89f9[10]);var config=require(_0x89f9[12]);var jayson=require(_0x89f9[13]);var client=jayson[_0x89f9[15]][_0x89f9[14]]({port:9004});function respondWithRpcPromise(_0xeeecxe,_0xeeecxf,_0xeeecx10){return  new BPromise(function(_0xeeecx11,_0xeeecx12){return client[_0x89f9[28]](_0xeeecxe,_0xeeecx10)[_0x89f9[27]](function(_0xeeecx14){logger[_0x89f9[20]](_0x89f9[16],_0xeeecxf,_0x89f9[19]);logger[_0x89f9[23]](_0x89f9[21],_0xeeecxf,_0x89f9[19],JSON[_0x89f9[22]](_0xeeecx14));if(_0xeeecx14[_0x89f9[17]]){if(_0xeeecx14[_0x89f9[17]][_0x89f9[24]]=== 500){logger[_0x89f9[17]](_0x89f9[16],_0xeeecxf,_0xeeecx14[_0x89f9[17]][_0x89f9[25]]);return _0xeeecx12(_0xeeecx14[_0x89f9[17]][_0x89f9[25]])};logger[_0x89f9[17]](_0x89f9[16],_0xeeecxf,_0xeeecx14[_0x89f9[17]][_0x89f9[25]]);return _0xeeecx11(_0xeeecx14[_0x89f9[17]][_0x89f9[25]])}else {logger[_0x89f9[20]](_0x89f9[16],_0xeeecxf,_0x89f9[19]);_0xeeecx11(_0xeeecx14[_0x89f9[26]][_0x89f9[25]])}})[_0x89f9[18]](function(_0xeeecx13){logger[_0x89f9[17]](_0x89f9[16],_0xeeecxf,_0xeeecx13);_0xeeecx12(_0xeeecx13)})})}exports[_0x89f9[29]]= function(_0xeeecx10){var _0xeeecx15=this;return  new Promise(function(_0xeeecx11,_0xeeecx12){return db[_0x89f9[40]][_0x89f9[39]]({raw:_0xeeecx10[_0x89f9[30]]?(_0xeeecx10[_0x89f9[30]][_0x89f9[31]]=== undefined)?true:false:true,where:_0xeeecx10[_0x89f9[30]]?_0xeeecx10[_0x89f9[30]][_0x89f9[32]]|| null:null,attributes:_0xeeecx10[_0x89f9[30]]?_0xeeecx10[_0x89f9[30]][_0x89f9[33]]|| null:null,limit:_0xeeecx10[_0x89f9[30]]?_0xeeecx10[_0x89f9[30]][_0x89f9[34]]|| null:null,include:_0xeeecx10[_0x89f9[30]]?(_0xeeecx10[_0x89f9[30]][_0x89f9[35]]?_[_0x89f9[38]](_0xeeecx10[_0x89f9[30]][_0x89f9[35]],function(_0xeeecx16){return {model:db[_0xeeecx16[_0x89f9[36]]],as:_0xeeecx16[_0x89f9[37]],attributes:_0xeeecx16[_0x89f9[33]],include:_0xeeecx16[_0x89f9[35]]?_[_0x89f9[38]](_0xeeecx16[_0x89f9[35]],function(_0xeeecx17){return {model:db[_0xeeecx17[_0x89f9[36]]],as:_0xeeecx17[_0x89f9[37]],attributes:_0xeeecx17[_0x89f9[33]],include:_0xeeecx17[_0x89f9[35]]?_[_0x89f9[38]](_0xeeecx17[_0x89f9[35]],function(_0xeeecx18){return {model:db[_0xeeecx18[_0x89f9[36]]],as:_0xeeecx18[_0x89f9[37]],attributes:_0xeeecx18[_0x89f9[33]]}}):[]}}):[]}}):[]):[]})[_0x89f9[27]](function(_0xeeecx14){logger[_0x89f9[20]](_0x89f9[29],_0xeeecx10);logger[_0x89f9[23]](_0x89f9[29],_0xeeecx10,JSON[_0x89f9[22]](_0xeeecx14));_0xeeecx11(_0xeeecx14)})[_0x89f9[18]](function(_0xeeecx13){logger[_0x89f9[17]](_0x89f9[29],_0xeeecx13[_0x89f9[25]],_0xeeecx10);_0xeeecx12(_0xeeecx15[_0x89f9[17]](500,_0xeeecx13[_0x89f9[25]]))})})};exports[_0x89f9[41]]= function(_0xeeecx10,_0xeeecx14,_0xeeecx19){var _0xeeecx15=this;return  new Promise(function(_0xeeecx11,_0xeeecx12){var _0xeeecx1a={body:_0xeeecx10[_0x89f9[42]],channel:_0x89f9[43]};var _0xeeecx1b=[];var _0xeeecx1c=[];var _0xeeecx1d={};return db[_0x89f9[87]][_0x89f9[105]]()[_0x89f9[27]](function(_0xeeecx25){if(!_0xeeecx25){throw  new db[_0x89f9[93]].ValidationError(_0x89f9[92])};_0xeeecx1b= _[_0x89f9[96]](_[_0x89f9[94]](_0xeeecx25),[_0x89f9[95],_0x89f9[89]]);_0xeeecx1c= _[_0x89f9[96]](_[_0x89f9[94]](_0xeeecx25),[_0x89f9[95],_0x89f9[89],_0x89f9[97],_0x89f9[84]]);if(_0xeeecx10[_0x89f9[42]][_0x89f9[56]]){delete _0xeeecx10[_0x89f9[42]][_0x89f9[56]]};if(_[_0x89f9[98]](_0xeeecx10[_0x89f9[42]][_0x89f9[83]])){throw  new db[_0x89f9[93]].ValidationError(_0x89f9[99])};if(_[_0x89f9[98]](_0xeeecx10[_0x89f9[42]][_0x89f9[42]])|| _0xeeecx10[_0x89f9[42]][_0x89f9[42]]=== _0x89f9[100]){throw  new db[_0x89f9[93]].ValidationError(_0x89f9[101])};if(_[_0x89f9[98]](_0xeeecx10[_0x89f9[42]][_0x89f9[86]])){throw  new db[_0x89f9[93]].ValidationError(_0x89f9[102]+ _0xeeecx1c)};if(!_[_0x89f9[103]](_0xeeecx1c,_0xeeecx10[_0x89f9[42]][_0x89f9[86]])){throw  new db[_0x89f9[93]].ValidationError(_0x89f9[104]+ _0xeeecx1c)};_0xeeecx1d[_0xeeecx10[_0x89f9[42]][_0x89f9[86]]]= _0xeeecx10[_0x89f9[42]][_0x89f9[83]]})[_0x89f9[27]](function(){return db[_0x89f9[40]][_0x89f9[57]]({where:{id:_0xeeecx10[_0x89f9[50]][_0x89f9[56]]},include:[{model:db[_0x89f9[88]],as:_0x89f9[75],include:[{model:db[_0x89f9[87]],as:_0x89f9[82],where:_0xeeecx1d,limit:1,order:[[_0x89f9[89],_0x89f9[90]]]}]},{model:db[_0x89f9[91]],as:_0x89f9[76]}]})})[_0x89f9[27]](function(_0xeeecx1e){if(_0xeeecx1e&& _0xeeecx1e[_0x89f9[75]]){var _0xeeecx23=_0xeeecx1e[_0x89f9[59]]({plain:true});_0xeeecx1a[_0x89f9[50]]= _[_0x89f9[77]](_0xeeecx23,[_0x89f9[76],_0x89f9[75]]);_0xeeecx1a[_0x89f9[53]]= _0xeeecx23[_0x89f9[76]];_0xeeecx1a[_0x89f9[78]]= _0xeeecx23[_0x89f9[75]];_0xeeecx1a[_0x89f9[53]]= _[_0x89f9[81]](_0xeeecx1a[_0x89f9[53]],[_0x89f9[79]],[_0x89f9[80]]);if(_0xeeecx1a[_0x89f9[50]][_0x89f9[76]]){delete _0xeeecx1a[_0x89f9[50]][_0x89f9[76]]};if(_0xeeecx1a[_0x89f9[50]][_0x89f9[75]]&& _0xeeecx1a[_0x89f9[50]][_0x89f9[75]][_0x89f9[82]][_0x89f9[61]]){return _0xeeecx1a[_0x89f9[50]][_0x89f9[75]][_0x89f9[82]][0]};var _0xeeecx24=_[_0x89f9[85]](_0xeeecx10[_0x89f9[42]],{firstName:_0xeeecx10[_0x89f9[42]][_0x89f9[83]],phone:_0xeeecx10[_0x89f9[42]][_0x89f9[83]],ListId:_0xeeecx23[_0x89f9[84]]});_0xeeecx24[_0xeeecx10[_0x89f9[42]][_0x89f9[86]]]= _0xeeecx10[_0x89f9[42]][_0x89f9[83]];return db[_0x89f9[87]][_0x89f9[69]](_0xeeecx24,{fields:_0xeeecx1b,raw:true})}})[_0x89f9[27]](function(_0xeeecx1e){_0xeeecx1a[_0x89f9[72]]= _0xeeecx1e;if(_0xeeecx1e){var _0xeeecx22={ContactId:_0xeeecx1e[_0x89f9[56]],FaxAccountId:_0xeeecx10[_0x89f9[50]][_0x89f9[56]],fax:_0xeeecx1e[_0x89f9[43]]};return db[_0x89f9[73]][_0x89f9[57]]({where:{ContactId:_0xeeecx1e[_0x89f9[56]],closed:false,FaxAccountId:_0xeeecx10[_0x89f9[50]][_0x89f9[56]]}})[_0x89f9[27]](function(_0xeeecx21){if(_0xeeecx21){return [_0xeeecx21,false]};return db[_0x89f9[73]][_0x89f9[69]](_0xeeecx22)[_0x89f9[27]](function(_0xeeecx21){return [_0xeeecx21,true]})})}else {throw  new Error(_0x89f9[74])}})[_0x89f9[71]](function(_0xeeecx1e,_0xeeecx20){var _0xeeecx21=_0xeeecx1e[_0x89f9[59]]({plain:true});if(_0xeeecx20){if(_0xeeecx1a[_0x89f9[50]][_0x89f9[60]]){_0xeeecx1a[_0x89f9[53]][_0x89f9[64]]({id:0,priority:_0xeeecx1a[_0x89f9[53]][_0x89f9[61]]+ 1,app:_0x89f9[62],appdata:_0x89f9[63],interval:_0x89f9[51]})};_0xeeecx21[_0x89f9[65]]= true};_0xeeecx1a[_0x89f9[45]]= _0xeeecx21;return db[_0x89f9[70]][_0x89f9[69]]({body:_0xeeecx10[_0x89f9[42]][_0x89f9[42]],FaxAccountId:_0xeeecx10[_0x89f9[50]][_0x89f9[56]],FaxInteractionId:_0xeeecx1e[_0x89f9[56]],direction:_0x89f9[66],ContactId:_0xeeecx1e[_0x89f9[67]],AttachmentId:_0xeeecx10[_0x89f9[42]][_0x89f9[68]]})})[_0x89f9[27]](function(_0xeeecx1e){_0xeeecx1a[_0x89f9[25]]= _0xeeecx1e;if(_0xeeecx1a[_0x89f9[45]][_0x89f9[44]]){return db[_0x89f9[58]][_0x89f9[57]]({attributes:[_0x89f9[56],_0x89f9[47]],where:{id:_0xeeecx1a[_0x89f9[45]][_0x89f9[44]]}})[_0x89f9[27]](function(_0xeeecx1f){if(_0xeeecx1f){_0xeeecx1a[_0x89f9[53]][_0x89f9[52]]({id:0,priority:0,app:_0x89f9[46],appdata:_0xeeecx1f[_0x89f9[47]]+ _0x89f9[48]+ (_0xeeecx1a[_0x89f9[50]][_0x89f9[49]]|| 10),interval:_0x89f9[51]})};return respondWithRpcPromise(_0x89f9[54],_0x89f9[55],_0xeeecx1a)})};return respondWithRpcPromise(_0x89f9[54],_0x89f9[55],_0xeeecx1a)})[_0x89f9[27]](function(_0xeeecx1e){_0xeeecx11(_0xeeecx1e)})[_0x89f9[18]](function(_0xeeecx13){_0xeeecx12(_0xeeecx15[_0x89f9[17]](500,_0xeeecx13[_0x89f9[25]]))})})}
\ No newline at end of file
+var _0x16d6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x4E\x6F\x74\x69\x66\x79\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x62\x6F\x64\x79","\x66\x61\x78","\x55\x73\x65\x72\x49\x64","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x2C","\x77\x61\x69\x74\x46\x6F\x72\x54\x68\x65\x41\x73\x73\x69\x67\x6E\x65\x64\x41\x67\x65\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x75\x6E\x73\x68\x69\x66\x74","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x53\x74\x61\x72\x74","\x73\x74\x61\x72\x74\x52\x6F\x75\x74\x69\x6E\x67","\x69\x64","\x66\x69\x6E\x64","\x55\x73\x65\x72","\x67\x65\x74","\x61\x75\x74\x6F\x63\x6C\x6F\x73\x65","\x6C\x65\x6E\x67\x74\x68","\x63\x6C\x6F\x73\x65","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x70\x75\x73\x68","\x63\x72\x65\x61\x74\x65\x64","\x69\x6E","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x49\x64","\x63\x72\x65\x61\x74\x65","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x73\x70\x72\x65\x61\x64","\x63\x6F\x6E\x74\x61\x63\x74","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x4C\x69\x73\x74","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6F\x6D\x69\x74","\x6C\x69\x73\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x61\x73\x63","\x6F\x72\x64\x65\x72\x42\x79","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x66\x72\x6F\x6D","\x4C\x69\x73\x74\x49\x64","\x64\x65\x66\x61\x75\x6C\x74\x73","\x6D\x61\x70\x4B\x65\x79","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6D\x4C\x69\x73\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6E\x6F\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x20\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6B\x65\x79\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x69\x73\x4E\x69\x6C","\x66\x72\x6F\x6D\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","","\x62\x6F\x64\x79\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x20\x61\x6E\x64\x20\x6E\x6F\x74\x20\x65\x6D\x70\x74\x79","\x6D\x61\x70\x4B\x65\x79\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x6D\x61\x70\x4B\x65\x79\x20\x69\x6E\x76\x61\x6C\x69\x64\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x16d6[0];var _=require(_0x16d6[1]);var util=require(_0x16d6[2]);var moment=require(_0x16d6[3]);var BPromise=require(_0x16d6[4]);var rs=require(_0x16d6[5]);var fs=require(_0x16d6[6]);var db=require(_0x16d6[8])[_0x16d6[7]];var utils=require(_0x16d6[9]);var logger=require(_0x16d6[11])(_0x16d6[10]);var config=require(_0x16d6[12]);var jayson=require(_0x16d6[13]);var client=jayson[_0x16d6[15]][_0x16d6[14]]({port:9004});function respondWithRpcPromise(_0xa6edxe,_0xa6edxf,_0xa6edx10){return  new BPromise(function(_0xa6edx11,_0xa6edx12){return client[_0x16d6[28]](_0xa6edxe,_0xa6edx10)[_0x16d6[27]](function(_0xa6edx14){logger[_0x16d6[20]](_0x16d6[16],_0xa6edxf,_0x16d6[19]);logger[_0x16d6[23]](_0x16d6[21],_0xa6edxf,_0x16d6[19],JSON[_0x16d6[22]](_0xa6edx14));if(_0xa6edx14[_0x16d6[17]]){if(_0xa6edx14[_0x16d6[17]][_0x16d6[24]]=== 500){logger[_0x16d6[17]](_0x16d6[16],_0xa6edxf,_0xa6edx14[_0x16d6[17]][_0x16d6[25]]);return _0xa6edx12(_0xa6edx14[_0x16d6[17]][_0x16d6[25]])};logger[_0x16d6[17]](_0x16d6[16],_0xa6edxf,_0xa6edx14[_0x16d6[17]][_0x16d6[25]]);return _0xa6edx11(_0xa6edx14[_0x16d6[17]][_0x16d6[25]])}else {logger[_0x16d6[20]](_0x16d6[16],_0xa6edxf,_0x16d6[19]);_0xa6edx11(_0xa6edx14[_0x16d6[26]][_0x16d6[25]])}})[_0x16d6[18]](function(_0xa6edx13){logger[_0x16d6[17]](_0x16d6[16],_0xa6edxf,_0xa6edx13);_0xa6edx12(_0xa6edx13)})})}exports[_0x16d6[29]]= function(_0xa6edx10){var _0xa6edx15=this;return  new Promise(function(_0xa6edx11,_0xa6edx12){return db[_0x16d6[40]][_0x16d6[39]]({raw:_0xa6edx10[_0x16d6[30]]?(_0xa6edx10[_0x16d6[30]][_0x16d6[31]]=== undefined)?true:false:true,where:_0xa6edx10[_0x16d6[30]]?_0xa6edx10[_0x16d6[30]][_0x16d6[32]]|| null:null,attributes:_0xa6edx10[_0x16d6[30]]?_0xa6edx10[_0x16d6[30]][_0x16d6[33]]|| null:null,limit:_0xa6edx10[_0x16d6[30]]?_0xa6edx10[_0x16d6[30]][_0x16d6[34]]|| null:null,include:_0xa6edx10[_0x16d6[30]]?(_0xa6edx10[_0x16d6[30]][_0x16d6[35]]?_[_0x16d6[38]](_0xa6edx10[_0x16d6[30]][_0x16d6[35]],function(_0xa6edx16){return {model:db[_0xa6edx16[_0x16d6[36]]],as:_0xa6edx16[_0x16d6[37]],attributes:_0xa6edx16[_0x16d6[33]],include:_0xa6edx16[_0x16d6[35]]?_[_0x16d6[38]](_0xa6edx16[_0x16d6[35]],function(_0xa6edx17){return {model:db[_0xa6edx17[_0x16d6[36]]],as:_0xa6edx17[_0x16d6[37]],attributes:_0xa6edx17[_0x16d6[33]],include:_0xa6edx17[_0x16d6[35]]?_[_0x16d6[38]](_0xa6edx17[_0x16d6[35]],function(_0xa6edx18){return {model:db[_0xa6edx18[_0x16d6[36]]],as:_0xa6edx18[_0x16d6[37]],attributes:_0xa6edx18[_0x16d6[33]]}}):[]}}):[]}}):[]):[]})[_0x16d6[27]](function(_0xa6edx14){logger[_0x16d6[20]](_0x16d6[29],_0xa6edx10);logger[_0x16d6[23]](_0x16d6[29],_0xa6edx10,JSON[_0x16d6[22]](_0xa6edx14));_0xa6edx11(_0xa6edx14)})[_0x16d6[18]](function(_0xa6edx13){logger[_0x16d6[17]](_0x16d6[29],_0xa6edx13[_0x16d6[25]],_0xa6edx10);_0xa6edx12(_0xa6edx15[_0x16d6[17]](500,_0xa6edx13[_0x16d6[25]]))})})};exports[_0x16d6[41]]= function(_0xa6edx10,_0xa6edx14,_0xa6edx19){var _0xa6edx15=this;return  new Promise(function(_0xa6edx11,_0xa6edx12){var _0xa6edx1a={body:_0xa6edx10[_0x16d6[42]],channel:_0x16d6[43]};var _0xa6edx1b=[];var _0xa6edx1c=[];var _0xa6edx1d={};return db[_0x16d6[87]][_0x16d6[105]]()[_0x16d6[27]](function(_0xa6edx25){if(!_0xa6edx25){throw  new db[_0x16d6[93]].ValidationError(_0x16d6[92])};_0xa6edx1b= _[_0x16d6[96]](_[_0x16d6[94]](_0xa6edx25),[_0x16d6[95],_0x16d6[89]]);_0xa6edx1c= _[_0x16d6[96]](_[_0x16d6[94]](_0xa6edx25),[_0x16d6[95],_0x16d6[89],_0x16d6[97],_0x16d6[84]]);if(_0xa6edx10[_0x16d6[42]][_0x16d6[56]]){delete _0xa6edx10[_0x16d6[42]][_0x16d6[56]]};if(_[_0x16d6[98]](_0xa6edx10[_0x16d6[42]][_0x16d6[83]])){throw  new db[_0x16d6[93]].ValidationError(_0x16d6[99])};if(_[_0x16d6[98]](_0xa6edx10[_0x16d6[42]][_0x16d6[42]])|| _0xa6edx10[_0x16d6[42]][_0x16d6[42]]=== _0x16d6[100]){throw  new db[_0x16d6[93]].ValidationError(_0x16d6[101])};if(_[_0x16d6[98]](_0xa6edx10[_0x16d6[42]][_0x16d6[86]])){throw  new db[_0x16d6[93]].ValidationError(_0x16d6[102]+ _0xa6edx1c)};if(!_[_0x16d6[103]](_0xa6edx1c,_0xa6edx10[_0x16d6[42]][_0x16d6[86]])){throw  new db[_0x16d6[93]].ValidationError(_0x16d6[104]+ _0xa6edx1c)};_0xa6edx1d[_0xa6edx10[_0x16d6[42]][_0x16d6[86]]]= _0xa6edx10[_0x16d6[42]][_0x16d6[83]]})[_0x16d6[27]](function(){return db[_0x16d6[40]][_0x16d6[57]]({where:{id:_0xa6edx10[_0x16d6[50]][_0x16d6[56]]},include:[{model:db[_0x16d6[88]],as:_0x16d6[75],include:[{model:db[_0x16d6[87]],as:_0x16d6[82],where:_0xa6edx1d,limit:1,order:[[_0x16d6[89],_0x16d6[90]]]}]},{model:db[_0x16d6[91]],as:_0x16d6[76]}]})})[_0x16d6[27]](function(_0xa6edx1e){if(_0xa6edx1e&& _0xa6edx1e[_0x16d6[75]]){var _0xa6edx23=_0xa6edx1e[_0x16d6[59]]({plain:true});_0xa6edx1a[_0x16d6[50]]= _[_0x16d6[77]](_0xa6edx23,[_0x16d6[76],_0x16d6[75]]);_0xa6edx1a[_0x16d6[53]]= _0xa6edx23[_0x16d6[76]];_0xa6edx1a[_0x16d6[78]]= _0xa6edx23[_0x16d6[75]];_0xa6edx1a[_0x16d6[53]]= _[_0x16d6[81]](_0xa6edx1a[_0x16d6[53]],[_0x16d6[79]],[_0x16d6[80]]);if(_0xa6edx1a[_0x16d6[50]][_0x16d6[76]]){delete _0xa6edx1a[_0x16d6[50]][_0x16d6[76]]};if(_0xa6edx1a[_0x16d6[50]][_0x16d6[75]]&& _0xa6edx1a[_0x16d6[50]][_0x16d6[75]][_0x16d6[82]][_0x16d6[61]]){return _0xa6edx1a[_0x16d6[50]][_0x16d6[75]][_0x16d6[82]][0]};var _0xa6edx24=_[_0x16d6[85]](_0xa6edx10[_0x16d6[42]],{firstName:_0xa6edx10[_0x16d6[42]][_0x16d6[83]],phone:_0xa6edx10[_0x16d6[42]][_0x16d6[83]],ListId:_0xa6edx23[_0x16d6[84]]});_0xa6edx24[_0xa6edx10[_0x16d6[42]][_0x16d6[86]]]= _0xa6edx10[_0x16d6[42]][_0x16d6[83]];return db[_0x16d6[87]][_0x16d6[69]](_0xa6edx24,{fields:_0xa6edx1b,raw:true})}})[_0x16d6[27]](function(_0xa6edx1e){_0xa6edx1a[_0x16d6[72]]= _0xa6edx1e;if(_0xa6edx1e){var _0xa6edx22={ContactId:_0xa6edx1e[_0x16d6[56]],FaxAccountId:_0xa6edx10[_0x16d6[50]][_0x16d6[56]],fax:_0xa6edx1e[_0x16d6[43]]};return db[_0x16d6[73]][_0x16d6[57]]({where:{ContactId:_0xa6edx1e[_0x16d6[56]],closed:false,FaxAccountId:_0xa6edx10[_0x16d6[50]][_0x16d6[56]]}})[_0x16d6[27]](function(_0xa6edx21){if(_0xa6edx21){return [_0xa6edx21,false]};return db[_0x16d6[73]][_0x16d6[69]](_0xa6edx22)[_0x16d6[27]](function(_0xa6edx21){return [_0xa6edx21,true]})})}else {throw  new Error(_0x16d6[74])}})[_0x16d6[71]](function(_0xa6edx1e,_0xa6edx20){var _0xa6edx21=_0xa6edx1e[_0x16d6[59]]({plain:true});if(_0xa6edx20){if(_0xa6edx1a[_0x16d6[50]][_0x16d6[60]]){_0xa6edx1a[_0x16d6[53]][_0x16d6[64]]({id:0,priority:_0xa6edx1a[_0x16d6[53]][_0x16d6[61]]+ 1,app:_0x16d6[62],appdata:_0x16d6[63],interval:_0x16d6[51]})};_0xa6edx21[_0x16d6[65]]= true};_0xa6edx1a[_0x16d6[45]]= _0xa6edx21;return db[_0x16d6[70]][_0x16d6[69]]({body:_0xa6edx10[_0x16d6[42]][_0x16d6[42]],FaxAccountId:_0xa6edx10[_0x16d6[50]][_0x16d6[56]],FaxInteractionId:_0xa6edx1e[_0x16d6[56]],direction:_0x16d6[66],ContactId:_0xa6edx1e[_0x16d6[67]],AttachmentId:_0xa6edx10[_0x16d6[42]][_0x16d6[68]]})})[_0x16d6[27]](function(_0xa6edx1e){_0xa6edx1a[_0x16d6[25]]= _0xa6edx1e;if(_0xa6edx1a[_0x16d6[45]][_0x16d6[44]]){return db[_0x16d6[58]][_0x16d6[57]]({attributes:[_0x16d6[56],_0x16d6[47]],where:{id:_0xa6edx1a[_0x16d6[45]][_0x16d6[44]]}})[_0x16d6[27]](function(_0xa6edx1f){if(_0xa6edx1f){_0xa6edx1a[_0x16d6[53]][_0x16d6[52]]({id:0,priority:0,app:_0x16d6[46],appdata:_0xa6edx1f[_0x16d6[47]]+ _0x16d6[48]+ (_0xa6edx1a[_0x16d6[50]][_0x16d6[49]]|| 10),interval:_0x16d6[51]})};return respondWithRpcPromise(_0x16d6[54],_0x16d6[55],_0xa6edx1a)})};return respondWithRpcPromise(_0x16d6[54],_0x16d6[55],_0xa6edx1a)})[_0x16d6[27]](function(_0xa6edx1e){_0xa6edx11(_0xa6edx1e)})[_0x16d6[18]](function(_0xa6edx13){_0xa6edx12(_0xa6edx15[_0x16d6[17]](500,_0xa6edx13[_0x16d6[25]]))})})}
\ No newline at end of file
index d4a8ee5..ffa0a4a 100644 (file)
@@ -1 +1 @@
-var _0xd949=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x73","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x6E\x73\x77\x65\x72","\x61\x64\x64\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2F\x61\x64\x64\x61\x63\x63\x6F\x75\x6E\x74\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x41\x63\x63\x6F\x75\x6E\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x75\x70\x64\x61\x74\x65\x61\x63\x63\x6F\x75\x6E\x74\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65\x41\x63\x63\x6F\x75\x6E\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x73\x65\x6E\x64","\x73\x65\x6E\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x6E\x73\x77\x65\x72\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xd949[0];var multer=require(_0xd949[1]);var util=require(_0xd949[2]);var path=require(_0xd949[3]);var express=require(_0xd949[4]);var router=express.Router();var auth=require(_0xd949[5]);var interaction=require(_0xd949[6]);var config=require(_0xd949[7]);var controller=require(_0xd949[8]);router[_0xd949[12]](_0xd949[9],auth[_0xd949[10]](),controller[_0xd949[11]]);router[_0xd949[12]](_0xd949[13],auth[_0xd949[10]](),controller[_0xd949[14]]);router[_0xd949[12]](_0xd949[15],auth[_0xd949[10]](),controller[_0xd949[16]]);router[_0xd949[12]](_0xd949[17],auth[_0xd949[10]](),controller[_0xd949[18]]);router[_0xd949[12]](_0xd949[19],auth[_0xd949[10]](),controller[_0xd949[20]]);router[_0xd949[12]](_0xd949[21],auth[_0xd949[10]](),controller[_0xd949[22]]);router[_0xd949[12]](_0xd949[23],auth[_0xd949[10]](),controller[_0xd949[24]]);router[_0xd949[12]](_0xd949[25],auth[_0xd949[10]](),controller[_0xd949[26]]);router[_0xd949[28]](_0xd949[9],auth[_0xd949[10]](),controller[_0xd949[27]]);router[_0xd949[28]](_0xd949[17],auth[_0xd949[10]](),controller[_0xd949[29]]);router[_0xd949[28]](_0xd949[19],auth[_0xd949[10]](),controller[_0xd949[30]]);router[_0xd949[28]](_0xd949[21],auth[_0xd949[10]](),controller[_0xd949[31]]);router[_0xd949[28]](_0xd949[23],auth[_0xd949[10]](),controller[_0xd949[32]]);router[_0xd949[28]](_0xd949[23],auth[_0xd949[10]](),controller[_0xd949[33]]);router[_0xd949[28]](_0xd949[34],auth[_0xd949[10]](),controller[_0xd949[35]]);router[_0xd949[28]](_0xd949[36],auth[_0xd949[10]](),controller[_0xd949[37]]);router[_0xd949[28]](_0xd949[38],auth[_0xd949[10]](),controller[_0xd949[39]]);router[_0xd949[41]](_0xd949[15],auth[_0xd949[10]](),controller[_0xd949[40]]);router[_0xd949[43]](_0xd949[15],auth[_0xd949[10]](),controller[_0xd949[42]]);router[_0xd949[43]](_0xd949[17],auth[_0xd949[10]](),controller[_0xd949[44]]);module[_0xd949[45]]= router
\ No newline at end of file
+var _0x476f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x73","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x6E\x73\x77\x65\x72","\x61\x64\x64\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2F\x61\x64\x64\x61\x63\x63\x6F\x75\x6E\x74\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x41\x63\x63\x6F\x75\x6E\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x75\x70\x64\x61\x74\x65\x61\x63\x63\x6F\x75\x6E\x74\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65\x41\x63\x63\x6F\x75\x6E\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x73\x65\x6E\x64","\x73\x65\x6E\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x6E\x73\x77\x65\x72\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x476f[0];var multer=require(_0x476f[1]);var util=require(_0x476f[2]);var path=require(_0x476f[3]);var express=require(_0x476f[4]);var router=express.Router();var auth=require(_0x476f[5]);var interaction=require(_0x476f[6]);var config=require(_0x476f[7]);var controller=require(_0x476f[8]);router[_0x476f[12]](_0x476f[9],auth[_0x476f[10]](),controller[_0x476f[11]]);router[_0x476f[12]](_0x476f[13],auth[_0x476f[10]](),controller[_0x476f[14]]);router[_0x476f[12]](_0x476f[15],auth[_0x476f[10]](),controller[_0x476f[16]]);router[_0x476f[12]](_0x476f[17],auth[_0x476f[10]](),controller[_0x476f[18]]);router[_0x476f[12]](_0x476f[19],auth[_0x476f[10]](),controller[_0x476f[20]]);router[_0x476f[12]](_0x476f[21],auth[_0x476f[10]](),controller[_0x476f[22]]);router[_0x476f[12]](_0x476f[23],auth[_0x476f[10]](),controller[_0x476f[24]]);router[_0x476f[12]](_0x476f[25],auth[_0x476f[10]](),controller[_0x476f[26]]);router[_0x476f[28]](_0x476f[9],auth[_0x476f[10]](),controller[_0x476f[27]]);router[_0x476f[28]](_0x476f[17],auth[_0x476f[10]](),controller[_0x476f[29]]);router[_0x476f[28]](_0x476f[19],auth[_0x476f[10]](),controller[_0x476f[30]]);router[_0x476f[28]](_0x476f[21],auth[_0x476f[10]](),controller[_0x476f[31]]);router[_0x476f[28]](_0x476f[23],auth[_0x476f[10]](),controller[_0x476f[32]]);router[_0x476f[28]](_0x476f[23],auth[_0x476f[10]](),controller[_0x476f[33]]);router[_0x476f[28]](_0x476f[34],auth[_0x476f[10]](),controller[_0x476f[35]]);router[_0x476f[28]](_0x476f[36],auth[_0x476f[10]](),controller[_0x476f[37]]);router[_0x476f[28]](_0x476f[38],auth[_0x476f[10]](),controller[_0x476f[39]]);router[_0x476f[41]](_0x476f[15],auth[_0x476f[10]](),controller[_0x476f[40]]);router[_0x476f[43]](_0x476f[15],auth[_0x476f[10]](),controller[_0x476f[42]]);router[_0x476f[43]](_0x476f[17],auth[_0x476f[10]](),controller[_0x476f[44]]);module[_0x476f[45]]= router
\ No newline at end of file
index 2f367ba..59c93ea 100644 (file)
@@ -1 +1 @@
-var _0x963f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x6E\x6F\x6F\x70","","\x2A\x2C\x2A\x2C\x2A\x2C\x2A"];_0x963f[0];var Sequelize=require(_0x963f[1]);module[_0x963f[2]]= {priority:{type:Sequelize[_0x963f[3]],allowNull:false},app:{type:Sequelize[_0x963f[4]],allowNull:false,defaultValue:_0x963f[5]},appdata:{type:Sequelize.STRING(4096),defaultValue:_0x963f[6]},description:{type:Sequelize[_0x963f[4]]},interval:{type:Sequelize[_0x963f[4]],defaultValue:_0x963f[7]}}
\ No newline at end of file
+var _0x3362=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x6E\x6F\x6F\x70","","\x2A\x2C\x2A\x2C\x2A\x2C\x2A"];_0x3362[0];var Sequelize=require(_0x3362[1]);module[_0x3362[2]]= {priority:{type:Sequelize[_0x3362[3]],allowNull:false},app:{type:Sequelize[_0x3362[4]],allowNull:false,defaultValue:_0x3362[5]},appdata:{type:Sequelize.STRING(4096),defaultValue:_0x3362[6]},description:{type:Sequelize[_0x3362[4]]},interval:{type:Sequelize[_0x3362[4]],defaultValue:_0x3362[7]}}
\ No newline at end of file
index 12afd29..71edb25 100644 (file)
@@ -1 +1 @@
-var _0x80e6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x80e6[0];var jsonpatch=require(_0x80e6[1]);var rp=require(_0x80e6[2]);var moment=require(_0x80e6[3]);var BPromise=require(_0x80e6[4]);var Mustache=require(_0x80e6[5]);var util=require(_0x80e6[6]);var path=require(_0x80e6[7]);var sox=require(_0x80e6[8]);var csv=require(_0x80e6[9]);var ejs=require(_0x80e6[10]);var fs=require(_0x80e6[11]);var _=require(_0x80e6[12]);var squel=require(_0x80e6[13]);var crypto=require(_0x80e6[14]);var jsforce=require(_0x80e6[15]);var deskjs=require(_0x80e6[16]);var toCsv=require(_0x80e6[9]);var querystring=require(_0x80e6[17]);var Papa=require(_0x80e6[18]);var qs=require(_0x80e6[19]);var logger=require(_0x80e6[21])(_0x80e6[20]);var utils=require(_0x80e6[22]);var config=require(_0x80e6[23]);var db=require(_0x80e6[25])[_0x80e6[24]];function respondWithStatusCode(_0x4127x1a,_0x4127x1b){_0x4127x1b= _0x4127x1b|| 204;return function(_0x4127x1c){if(_0x4127x1c){return _0x4127x1a[_0x80e6[26]](_0x4127x1b)};return _0x4127x1a[_0x80e6[28]](_0x4127x1b)[_0x80e6[27]]()}}function respondWithResult(_0x4127x1a,_0x4127x1b){_0x4127x1b= _0x4127x1b|| 200;return function(_0x4127x1c){if(_0x4127x1c){return _0x4127x1a[_0x80e6[28]](_0x4127x1b)[_0x80e6[29]](_0x4127x1c)}}}function respondWithFilteredResult(_0x4127x1a,_0x4127x1f){return function(_0x4127x1c){if(_0x4127x1c){var _0x4127x20=_0x4127x1c[_0x80e6[30]],_0x4127x21=_0x4127x1f[_0x80e6[31]],_0x4127x22=_0x4127x1f[_0x80e6[31]]+ _0x4127x1f[_0x80e6[32]],_0x4127x1b;if(_0x4127x22>= _0x4127x20){_0x4127x22= _0x4127x20;_0x4127x1b= 200}else {_0x4127x1b= 206};_0x4127x1a[_0x80e6[28]](_0x4127x1b);return _0x4127x1a[_0x80e6[36]](_0x80e6[33],_0x4127x21+ _0x80e6[34]+ _0x4127x22+ _0x80e6[35]+ _0x4127x20)[_0x80e6[29]](_0x4127x1c)};return null}}function patchUpdates(_0x4127x24){return function(_0x4127x1c){try{jsonpatch[_0x80e6[37]](_0x4127x1c,_0x4127x24,true)}catch(err){return BPromise[_0x80e6[38]](err)};return _0x4127x1c[_0x80e6[39]]()}}function saveUpdates(_0x4127x26,_0x4127x1b){return function(_0x4127x1c){if(_0x4127x1c){return _0x4127x1c[_0x80e6[41]](_0x4127x26)[_0x80e6[40]](function(_0x4127x27){return _0x4127x27})};return null}}function removeEntity(_0x4127x1a,_0x4127x1b){return function(_0x4127x1c){if(_0x4127x1c){return _0x4127x1c[_0x80e6[42]]()[_0x80e6[40]](function(){_0x4127x1a[_0x80e6[28]](204)[_0x80e6[27]]()})}}}function handleEntityNotFound(_0x4127x1a,_0x4127x1b){return function(_0x4127x1c){if(!_0x4127x1c){_0x4127x1a[_0x80e6[26]](404)};return _0x4127x1c}}function handleError(_0x4127x1a,_0x4127x1b){_0x4127x1b= _0x4127x1b|| 500;return function(_0x4127x2b){logger[_0x80e6[44]](_0x4127x2b[_0x80e6[43]]);if(_0x4127x2b[_0x80e6[45]]){delete _0x4127x2b[_0x80e6[45]]};_0x4127x1a[_0x80e6[28]](_0x4127x1b)[_0x80e6[46]](_0x4127x2b)}}exports[_0x80e6[47]]= function(_0x4127x2c,_0x4127x1a){var _0x4127x1f={},_0x4127x2d={},_0x4127x2e={count:0,rows:[]};_0x4127x2d[_0x80e6[48]]= _[_0x80e6[51]](db[_0x80e6[50]][_0x80e6[49]]);var _0x4127x2f={dateStart:_0x4127x2c[_0x80e6[53]][_0x80e6[52]],dateEnd:_0x4127x2c[_0x80e6[53]][_0x80e6[54]]};delete _0x4127x2c[_0x80e6[53]][_0x80e6[52]];delete _0x4127x2c[_0x80e6[53]][_0x80e6[54]];_0x4127x2d[_0x80e6[53]]= _[_0x80e6[51]](_0x4127x2c[_0x80e6[53]]);_0x4127x2d[_0x80e6[55]]= _[_0x80e6[56]](_0x4127x2d[_0x80e6[48]],_0x4127x2d[_0x80e6[53]]);_0x4127x1f[_0x80e6[57]]= _[_0x80e6[56]](_0x4127x2d[_0x80e6[48]],qs[_0x80e6[58]](_0x4127x2c[_0x80e6[53]][_0x80e6[58]]));_0x4127x1f[_0x80e6[57]]= (_0x4127x1f[_0x80e6[57]][_0x80e6[59]])?_0x4127x1f[_0x80e6[57]]:_0x4127x2d[_0x80e6[48]];if(!_0x4127x2c[_0x80e6[53]][_0x80e6[61]](_0x80e6[60])){_0x4127x1f[_0x80e6[32]]= qs[_0x80e6[32]](_0x4127x2c[_0x80e6[53]][_0x80e6[32]]);_0x4127x1f[_0x80e6[31]]= qs[_0x80e6[31]](_0x4127x2c[_0x80e6[53]][_0x80e6[31]])};_0x4127x1f[_0x80e6[62]]= qs[_0x80e6[63]](_0x4127x2c[_0x80e6[53]][_0x80e6[63]]);_0x4127x1f[_0x80e6[64]]= qs[_0x80e6[55]](_[_0x80e6[65]](_0x4127x2c[_0x80e6[53]],_0x4127x2d[_0x80e6[55]]));if(_0x4127x2f[_0x80e6[52]]){if(_0x4127x2f[_0x80e6[54]]){_0x4127x2f[_0x80e6[54]]= moment(_0x4127x2f[_0x80e6[54]])[_0x80e6[67]](1,_0x80e6[66])}else {_0x4127x2f[_0x80e6[54]]= moment(_0x4127x2f[_0x80e6[52]])[_0x80e6[67]](1,_0x80e6[66])};_[_0x80e6[68]](_0x4127x1f[_0x80e6[64]],{createdAt:{$gte:_0x4127x2f[_0x80e6[52]],$lte:_0x4127x2f[_0x80e6[54]]}})};if(_0x4127x2c[_0x80e6[53]][_0x80e6[69]]){_0x4127x1f[_0x80e6[64]]= _[_0x80e6[68]](_0x4127x1f[_0x80e6[64]],{$or:_[_0x80e6[71]](_0x4127x1f[_0x80e6[57]],function(_0x4127x30){var _0x4127x2e={};_0x4127x2e[_0x4127x30]= {$like:_0x80e6[70]+ _0x4127x2c[_0x80e6[53]][_0x80e6[69]]+ _0x80e6[70]};return _0x4127x2e})})};_0x4127x1f= _[_0x80e6[68]]({},_0x4127x1f,_0x4127x2c[_0x80e6[72]]);var _0x4127x31={where:_0x4127x1f[_0x80e6[64]]};return db[_0x80e6[50]][_0x80e6[30]](_0x4127x31)[_0x80e6[40]](function(_0x4127x20){_0x4127x2e[_0x80e6[30]]= _0x4127x20;if(_0x4127x2c[_0x80e6[53]][_0x80e6[75]]){_0x4127x1f[_0x80e6[76]]= [{all:true}]};return db[_0x80e6[50]][_0x80e6[77]](_0x4127x1f)})[_0x80e6[40]](function(_0x4127x32){_0x4127x2e[_0x80e6[74]]= _0x4127x32;return _0x4127x2e})[_0x80e6[40]](respondWithFilteredResult(_0x4127x1a,_0x4127x1f))[_0x80e6[73]](handleError(_0x4127x1a,null))};exports[_0x80e6[78]]= function(_0x4127x2c,_0x4127x1a){var _0x4127x1f={raw:true,where:{id:_0x4127x2c[_0x80e6[80]][_0x80e6[79]]}},_0x4127x2d={};_0x4127x2d[_0x80e6[48]]= _[_0x80e6[51]](db[_0x80e6[50]][_0x80e6[49]]);_0x4127x2d[_0x80e6[53]]= _[_0x80e6[51]](_0x4127x2c[_0x80e6[53]]);_0x4127x2d[_0x80e6[55]]= _[_0x80e6[56]](_0x4127x2d[_0x80e6[48]],_0x4127x2d[_0x80e6[53]]);_0x4127x1f[_0x80e6[57]]= _[_0x80e6[56]](_0x4127x2d[_0x80e6[48]],qs[_0x80e6[58]](_0x4127x2c[_0x80e6[53]][_0x80e6[58]]));_0x4127x1f[_0x80e6[57]]= (_0x4127x1f[_0x80e6[57]][_0x80e6[59]])?_0x4127x1f[_0x80e6[57]]:_0x4127x2d[_0x80e6[48]];if(_0x4127x2c[_0x80e6[53]][_0x80e6[75]]){_0x4127x1f[_0x80e6[76]]= [{all:true}]};_0x4127x1f= _[_0x80e6[68]]({},_0x4127x1f,_0x4127x2c[_0x80e6[72]]);return db[_0x80e6[50]][_0x80e6[81]](_0x4127x1f)[_0x80e6[40]](handleEntityNotFound(_0x4127x1a,null))[_0x80e6[40]](respondWithResult(_0x4127x1a,null))[_0x80e6[73]](handleError(_0x4127x1a,null))};exports[_0x80e6[82]]= function(_0x4127x2c,_0x4127x1a){return db[_0x80e6[50]][_0x80e6[82]](_0x4127x2c[_0x80e6[83]],{})[_0x80e6[40]](respondWithResult(_0x4127x1a,201))[_0x80e6[73]](handleError(_0x4127x1a,null))};exports[_0x80e6[41]]= function(_0x4127x2c,_0x4127x1a){if(_0x4127x2c[_0x80e6[83]][_0x80e6[79]]){delete _0x4127x2c[_0x80e6[83]][_0x80e6[79]]};return db[_0x80e6[50]][_0x80e6[81]]({where:{id:_0x4127x2c[_0x80e6[80]][_0x80e6[79]]}})[_0x80e6[40]](handleEntityNotFound(_0x4127x1a,null))[_0x80e6[40]](saveUpdates(_0x4127x2c[_0x80e6[83]],null))[_0x80e6[40]](respondWithResult(_0x4127x1a,null))[_0x80e6[73]](handleError(_0x4127x1a,null))};exports[_0x80e6[42]]= function(_0x4127x2c,_0x4127x1a){return db[_0x80e6[50]][_0x80e6[81]]({where:{id:_0x4127x2c[_0x80e6[80]][_0x80e6[79]]}})[_0x80e6[40]](handleEntityNotFound(_0x4127x1a,null))[_0x80e6[40]](removeEntity(_0x4127x1a,null))[_0x80e6[73]](handleError(_0x4127x1a,null))}
\ No newline at end of file
+var _0xc02d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xc02d[0];var jsonpatch=require(_0xc02d[1]);var rp=require(_0xc02d[2]);var moment=require(_0xc02d[3]);var BPromise=require(_0xc02d[4]);var Mustache=require(_0xc02d[5]);var util=require(_0xc02d[6]);var path=require(_0xc02d[7]);var sox=require(_0xc02d[8]);var csv=require(_0xc02d[9]);var ejs=require(_0xc02d[10]);var fs=require(_0xc02d[11]);var _=require(_0xc02d[12]);var squel=require(_0xc02d[13]);var crypto=require(_0xc02d[14]);var jsforce=require(_0xc02d[15]);var deskjs=require(_0xc02d[16]);var toCsv=require(_0xc02d[9]);var querystring=require(_0xc02d[17]);var Papa=require(_0xc02d[18]);var qs=require(_0xc02d[19]);var logger=require(_0xc02d[21])(_0xc02d[20]);var utils=require(_0xc02d[22]);var config=require(_0xc02d[23]);var db=require(_0xc02d[25])[_0xc02d[24]];function respondWithStatusCode(_0xd76cx1a,_0xd76cx1b){_0xd76cx1b= _0xd76cx1b|| 204;return function(_0xd76cx1c){if(_0xd76cx1c){return _0xd76cx1a[_0xc02d[26]](_0xd76cx1b)};return _0xd76cx1a[_0xc02d[28]](_0xd76cx1b)[_0xc02d[27]]()}}function respondWithResult(_0xd76cx1a,_0xd76cx1b){_0xd76cx1b= _0xd76cx1b|| 200;return function(_0xd76cx1c){if(_0xd76cx1c){return _0xd76cx1a[_0xc02d[28]](_0xd76cx1b)[_0xc02d[29]](_0xd76cx1c)}}}function respondWithFilteredResult(_0xd76cx1a,_0xd76cx1f){return function(_0xd76cx1c){if(_0xd76cx1c){var _0xd76cx20=_0xd76cx1c[_0xc02d[30]],_0xd76cx21=_0xd76cx1f[_0xc02d[31]],_0xd76cx22=_0xd76cx1f[_0xc02d[31]]+ _0xd76cx1f[_0xc02d[32]],_0xd76cx1b;if(_0xd76cx22>= _0xd76cx20){_0xd76cx22= _0xd76cx20;_0xd76cx1b= 200}else {_0xd76cx1b= 206};_0xd76cx1a[_0xc02d[28]](_0xd76cx1b);return _0xd76cx1a[_0xc02d[36]](_0xc02d[33],_0xd76cx21+ _0xc02d[34]+ _0xd76cx22+ _0xc02d[35]+ _0xd76cx20)[_0xc02d[29]](_0xd76cx1c)};return null}}function patchUpdates(_0xd76cx24){return function(_0xd76cx1c){try{jsonpatch[_0xc02d[37]](_0xd76cx1c,_0xd76cx24,true)}catch(err){return BPromise[_0xc02d[38]](err)};return _0xd76cx1c[_0xc02d[39]]()}}function saveUpdates(_0xd76cx26,_0xd76cx1b){return function(_0xd76cx1c){if(_0xd76cx1c){return _0xd76cx1c[_0xc02d[41]](_0xd76cx26)[_0xc02d[40]](function(_0xd76cx27){return _0xd76cx27})};return null}}function removeEntity(_0xd76cx1a,_0xd76cx1b){return function(_0xd76cx1c){if(_0xd76cx1c){return _0xd76cx1c[_0xc02d[42]]()[_0xc02d[40]](function(){_0xd76cx1a[_0xc02d[28]](204)[_0xc02d[27]]()})}}}function handleEntityNotFound(_0xd76cx1a,_0xd76cx1b){return function(_0xd76cx1c){if(!_0xd76cx1c){_0xd76cx1a[_0xc02d[26]](404)};return _0xd76cx1c}}function handleError(_0xd76cx1a,_0xd76cx1b){_0xd76cx1b= _0xd76cx1b|| 500;return function(_0xd76cx2b){logger[_0xc02d[44]](_0xd76cx2b[_0xc02d[43]]);if(_0xd76cx2b[_0xc02d[45]]){delete _0xd76cx2b[_0xc02d[45]]};_0xd76cx1a[_0xc02d[28]](_0xd76cx1b)[_0xc02d[46]](_0xd76cx2b)}}exports[_0xc02d[47]]= function(_0xd76cx2c,_0xd76cx1a){var _0xd76cx1f={},_0xd76cx2d={},_0xd76cx2e={count:0,rows:[]};_0xd76cx2d[_0xc02d[48]]= _[_0xc02d[51]](db[_0xc02d[50]][_0xc02d[49]]);var _0xd76cx2f={dateStart:_0xd76cx2c[_0xc02d[53]][_0xc02d[52]],dateEnd:_0xd76cx2c[_0xc02d[53]][_0xc02d[54]]};delete _0xd76cx2c[_0xc02d[53]][_0xc02d[52]];delete _0xd76cx2c[_0xc02d[53]][_0xc02d[54]];_0xd76cx2d[_0xc02d[53]]= _[_0xc02d[51]](_0xd76cx2c[_0xc02d[53]]);_0xd76cx2d[_0xc02d[55]]= _[_0xc02d[56]](_0xd76cx2d[_0xc02d[48]],_0xd76cx2d[_0xc02d[53]]);_0xd76cx1f[_0xc02d[57]]= _[_0xc02d[56]](_0xd76cx2d[_0xc02d[48]],qs[_0xc02d[58]](_0xd76cx2c[_0xc02d[53]][_0xc02d[58]]));_0xd76cx1f[_0xc02d[57]]= (_0xd76cx1f[_0xc02d[57]][_0xc02d[59]])?_0xd76cx1f[_0xc02d[57]]:_0xd76cx2d[_0xc02d[48]];if(!_0xd76cx2c[_0xc02d[53]][_0xc02d[61]](_0xc02d[60])){_0xd76cx1f[_0xc02d[32]]= qs[_0xc02d[32]](_0xd76cx2c[_0xc02d[53]][_0xc02d[32]]);_0xd76cx1f[_0xc02d[31]]= qs[_0xc02d[31]](_0xd76cx2c[_0xc02d[53]][_0xc02d[31]])};_0xd76cx1f[_0xc02d[62]]= qs[_0xc02d[63]](_0xd76cx2c[_0xc02d[53]][_0xc02d[63]]);_0xd76cx1f[_0xc02d[64]]= qs[_0xc02d[55]](_[_0xc02d[65]](_0xd76cx2c[_0xc02d[53]],_0xd76cx2d[_0xc02d[55]]));if(_0xd76cx2f[_0xc02d[52]]){if(_0xd76cx2f[_0xc02d[54]]){_0xd76cx2f[_0xc02d[54]]= moment(_0xd76cx2f[_0xc02d[54]])[_0xc02d[67]](1,_0xc02d[66])}else {_0xd76cx2f[_0xc02d[54]]= moment(_0xd76cx2f[_0xc02d[52]])[_0xc02d[67]](1,_0xc02d[66])};_[_0xc02d[68]](_0xd76cx1f[_0xc02d[64]],{createdAt:{$gte:_0xd76cx2f[_0xc02d[52]],$lte:_0xd76cx2f[_0xc02d[54]]}})};if(_0xd76cx2c[_0xc02d[53]][_0xc02d[69]]){_0xd76cx1f[_0xc02d[64]]= _[_0xc02d[68]](_0xd76cx1f[_0xc02d[64]],{$or:_[_0xc02d[71]](_0xd76cx1f[_0xc02d[57]],function(_0xd76cx30){var _0xd76cx2e={};_0xd76cx2e[_0xd76cx30]= {$like:_0xc02d[70]+ _0xd76cx2c[_0xc02d[53]][_0xc02d[69]]+ _0xc02d[70]};return _0xd76cx2e})})};_0xd76cx1f= _[_0xc02d[68]]({},_0xd76cx1f,_0xd76cx2c[_0xc02d[72]]);var _0xd76cx31={where:_0xd76cx1f[_0xc02d[64]]};return db[_0xc02d[50]][_0xc02d[30]](_0xd76cx31)[_0xc02d[40]](function(_0xd76cx20){_0xd76cx2e[_0xc02d[30]]= _0xd76cx20;if(_0xd76cx2c[_0xc02d[53]][_0xc02d[75]]){_0xd76cx1f[_0xc02d[76]]= [{all:true}]};return db[_0xc02d[50]][_0xc02d[77]](_0xd76cx1f)})[_0xc02d[40]](function(_0xd76cx32){_0xd76cx2e[_0xc02d[74]]= _0xd76cx32;return _0xd76cx2e})[_0xc02d[40]](respondWithFilteredResult(_0xd76cx1a,_0xd76cx1f))[_0xc02d[73]](handleError(_0xd76cx1a,null))};exports[_0xc02d[78]]= function(_0xd76cx2c,_0xd76cx1a){var _0xd76cx1f={raw:true,where:{id:_0xd76cx2c[_0xc02d[80]][_0xc02d[79]]}},_0xd76cx2d={};_0xd76cx2d[_0xc02d[48]]= _[_0xc02d[51]](db[_0xc02d[50]][_0xc02d[49]]);_0xd76cx2d[_0xc02d[53]]= _[_0xc02d[51]](_0xd76cx2c[_0xc02d[53]]);_0xd76cx2d[_0xc02d[55]]= _[_0xc02d[56]](_0xd76cx2d[_0xc02d[48]],_0xd76cx2d[_0xc02d[53]]);_0xd76cx1f[_0xc02d[57]]= _[_0xc02d[56]](_0xd76cx2d[_0xc02d[48]],qs[_0xc02d[58]](_0xd76cx2c[_0xc02d[53]][_0xc02d[58]]));_0xd76cx1f[_0xc02d[57]]= (_0xd76cx1f[_0xc02d[57]][_0xc02d[59]])?_0xd76cx1f[_0xc02d[57]]:_0xd76cx2d[_0xc02d[48]];if(_0xd76cx2c[_0xc02d[53]][_0xc02d[75]]){_0xd76cx1f[_0xc02d[76]]= [{all:true}]};_0xd76cx1f= _[_0xc02d[68]]({},_0xd76cx1f,_0xd76cx2c[_0xc02d[72]]);return db[_0xc02d[50]][_0xc02d[81]](_0xd76cx1f)[_0xc02d[40]](handleEntityNotFound(_0xd76cx1a,null))[_0xc02d[40]](respondWithResult(_0xd76cx1a,null))[_0xc02d[73]](handleError(_0xd76cx1a,null))};exports[_0xc02d[82]]= function(_0xd76cx2c,_0xd76cx1a){return db[_0xc02d[50]][_0xc02d[82]](_0xd76cx2c[_0xc02d[83]],{})[_0xc02d[40]](respondWithResult(_0xd76cx1a,201))[_0xc02d[73]](handleError(_0xd76cx1a,null))};exports[_0xc02d[41]]= function(_0xd76cx2c,_0xd76cx1a){if(_0xd76cx2c[_0xc02d[83]][_0xc02d[79]]){delete _0xd76cx2c[_0xc02d[83]][_0xc02d[79]]};return db[_0xc02d[50]][_0xc02d[81]]({where:{id:_0xd76cx2c[_0xc02d[80]][_0xc02d[79]]}})[_0xc02d[40]](handleEntityNotFound(_0xd76cx1a,null))[_0xc02d[40]](saveUpdates(_0xd76cx2c[_0xc02d[83]],null))[_0xc02d[40]](respondWithResult(_0xd76cx1a,null))[_0xc02d[73]](handleError(_0xd76cx1a,null))};exports[_0xc02d[42]]= function(_0xd76cx2c,_0xd76cx1a){return db[_0xc02d[50]][_0xc02d[81]]({where:{id:_0xd76cx2c[_0xc02d[80]][_0xc02d[79]]}})[_0xc02d[40]](handleEntityNotFound(_0xd76cx1a,null))[_0xc02d[40]](removeEntity(_0xd76cx1a,null))[_0xc02d[73]](handleError(_0xd76cx1a,null))}
\ No newline at end of file
index 029a713..cfef9d8 100644 (file)
@@ -1 +1 @@
-var _0x43eb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x66\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x43eb[0];var _=require(_0x43eb[1]);var util=require(_0x43eb[2]);var logger=require(_0x43eb[4])(_0x43eb[3]);var moment=require(_0x43eb[5]);var BPromise=require(_0x43eb[6]);var rp=require(_0x43eb[7]);var attributes=require(_0x43eb[8]);module[_0x43eb[9]]= function(_0xe678x8,_0xe678x9){return _0xe678x8[_0x43eb[12]](_0x43eb[10],attributes,{tableName:_0x43eb[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xc53a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x66\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xc53a[0];var _=require(_0xc53a[1]);var util=require(_0xc53a[2]);var logger=require(_0xc53a[4])(_0xc53a[3]);var moment=require(_0xc53a[5]);var BPromise=require(_0xc53a[6]);var rp=require(_0xc53a[7]);var attributes=require(_0xc53a[8]);module[_0xc53a[9]]= function(_0x46dbx8,_0x46dbx9){return _0x46dbx8[_0xc53a[12]](_0xc53a[10],attributes,{tableName:_0xc53a[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 7ae6854..8a4cc46 100644 (file)
@@ -1 +1 @@
-var _0x9012=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E"];_0x9012[0];var _=require(_0x9012[1]);var util=require(_0x9012[2]);var moment=require(_0x9012[3]);var BPromise=require(_0x9012[4]);var rs=require(_0x9012[5]);var fs=require(_0x9012[6]);var db=require(_0x9012[8])[_0x9012[7]];var utils=require(_0x9012[9]);var logger=require(_0x9012[11])(_0x9012[10]);var config=require(_0x9012[12]);var jayson=require(_0x9012[13]);var client=jayson[_0x9012[15]][_0x9012[14]]({port:9002});function respondWithRpcPromise(_0x1a5bxe,_0x1a5bxf,_0x1a5bx10){return  new BPromise(function(_0x1a5bx11,_0x1a5bx12){return client[_0x9012[28]](_0x1a5bxe,_0x1a5bx10)[_0x9012[27]](function(_0x1a5bx14){logger[_0x9012[20]](_0x9012[16],_0x1a5bxf,_0x9012[19]);logger[_0x9012[23]](_0x9012[21],_0x1a5bxf,_0x9012[19],JSON[_0x9012[22]](_0x1a5bx14));if(_0x1a5bx14[_0x9012[17]]){if(_0x1a5bx14[_0x9012[17]][_0x9012[24]]=== 500){logger[_0x9012[17]](_0x9012[16],_0x1a5bxf,_0x1a5bx14[_0x9012[17]][_0x9012[25]]);return _0x1a5bx12(_0x1a5bx14[_0x9012[17]][_0x9012[25]])};logger[_0x9012[17]](_0x9012[16],_0x1a5bxf,_0x1a5bx14[_0x9012[17]][_0x9012[25]]);return _0x1a5bx11(_0x1a5bx14[_0x9012[17]][_0x9012[25]])}else {logger[_0x9012[20]](_0x9012[16],_0x1a5bxf,_0x9012[19]);_0x1a5bx11(_0x1a5bx14[_0x9012[26]][_0x9012[25]])}})[_0x9012[18]](function(_0x1a5bx13){logger[_0x9012[17]](_0x9012[16],_0x1a5bxf,_0x1a5bx13);_0x1a5bx12(_0x1a5bx13)})})}exports[_0x9012[29]]= function(_0x1a5bx10){var _0x1a5bx15=this;return  new Promise(function(_0x1a5bx11,_0x1a5bx12){return db[_0x9012[37]][_0x9012[36]](_0x1a5bx10[_0x9012[30]],{raw:_0x1a5bx10[_0x9012[31]]?(_0x1a5bx10[_0x9012[31]][_0x9012[32]]=== undefined)?true:false:true,individualHooks:true,where:_0x1a5bx10[_0x9012[31]]?_0x1a5bx10[_0x9012[31]][_0x9012[33]]|| null:null,attributes:_0x1a5bx10[_0x9012[31]]?_0x1a5bx10[_0x9012[31]][_0x9012[34]]|| null:null,limit:_0x1a5bx10[_0x9012[31]]?_0x1a5bx10[_0x9012[31]][_0x9012[35]]|| null:null})[_0x9012[27]](function(_0x1a5bx14){logger[_0x9012[20]](_0x9012[29],_0x1a5bx10);logger[_0x9012[23]](_0x9012[29],_0x1a5bx10,JSON[_0x9012[22]](_0x1a5bx14));_0x1a5bx11(_0x1a5bx14)})[_0x9012[18]](function(_0x1a5bx13){logger[_0x9012[17]](_0x9012[29],_0x1a5bx13[_0x9012[25]],_0x1a5bx10);_0x1a5bx12(_0x1a5bx15[_0x9012[17]](500,_0x1a5bx13[_0x9012[25]]))})})}
\ No newline at end of file
+var _0xc93a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E"];_0xc93a[0];var _=require(_0xc93a[1]);var util=require(_0xc93a[2]);var moment=require(_0xc93a[3]);var BPromise=require(_0xc93a[4]);var rs=require(_0xc93a[5]);var fs=require(_0xc93a[6]);var db=require(_0xc93a[8])[_0xc93a[7]];var utils=require(_0xc93a[9]);var logger=require(_0xc93a[11])(_0xc93a[10]);var config=require(_0xc93a[12]);var jayson=require(_0xc93a[13]);var client=jayson[_0xc93a[15]][_0xc93a[14]]({port:9002});function respondWithRpcPromise(_0xc280xe,_0xc280xf,_0xc280x10){return  new BPromise(function(_0xc280x11,_0xc280x12){return client[_0xc93a[28]](_0xc280xe,_0xc280x10)[_0xc93a[27]](function(_0xc280x14){logger[_0xc93a[20]](_0xc93a[16],_0xc280xf,_0xc93a[19]);logger[_0xc93a[23]](_0xc93a[21],_0xc280xf,_0xc93a[19],JSON[_0xc93a[22]](_0xc280x14));if(_0xc280x14[_0xc93a[17]]){if(_0xc280x14[_0xc93a[17]][_0xc93a[24]]=== 500){logger[_0xc93a[17]](_0xc93a[16],_0xc280xf,_0xc280x14[_0xc93a[17]][_0xc93a[25]]);return _0xc280x12(_0xc280x14[_0xc93a[17]][_0xc93a[25]])};logger[_0xc93a[17]](_0xc93a[16],_0xc280xf,_0xc280x14[_0xc93a[17]][_0xc93a[25]]);return _0xc280x11(_0xc280x14[_0xc93a[17]][_0xc93a[25]])}else {logger[_0xc93a[20]](_0xc93a[16],_0xc280xf,_0xc93a[19]);_0xc280x11(_0xc280x14[_0xc93a[26]][_0xc93a[25]])}})[_0xc93a[18]](function(_0xc280x13){logger[_0xc93a[17]](_0xc93a[16],_0xc280xf,_0xc280x13);_0xc280x12(_0xc280x13)})})}exports[_0xc93a[29]]= function(_0xc280x10){var _0xc280x15=this;return  new Promise(function(_0xc280x11,_0xc280x12){return db[_0xc93a[37]][_0xc93a[36]](_0xc280x10[_0xc93a[30]],{raw:_0xc280x10[_0xc93a[31]]?(_0xc280x10[_0xc93a[31]][_0xc93a[32]]=== undefined)?true:false:true,individualHooks:true,where:_0xc280x10[_0xc93a[31]]?_0xc280x10[_0xc93a[31]][_0xc93a[33]]|| null:null,attributes:_0xc280x10[_0xc93a[31]]?_0xc280x10[_0xc93a[31]][_0xc93a[34]]|| null:null,limit:_0xc280x10[_0xc93a[31]]?_0xc280x10[_0xc93a[31]][_0xc93a[35]]|| null:null})[_0xc93a[27]](function(_0xc280x14){logger[_0xc93a[20]](_0xc93a[29],_0xc280x10);logger[_0xc93a[23]](_0xc93a[29],_0xc280x10,JSON[_0xc93a[22]](_0xc280x14));_0xc280x11(_0xc280x14)})[_0xc93a[18]](function(_0xc280x13){logger[_0xc93a[17]](_0xc93a[29],_0xc280x13[_0xc93a[25]],_0xc280x10);_0xc280x12(_0xc280x15[_0xc93a[17]](500,_0xc280x13[_0xc93a[25]]))})})}
\ No newline at end of file
index d145ac6..7b222b4 100644 (file)
@@ -1 +1 @@
-var _0x3d0f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x66\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x3d0f[0];var multer=require(_0x3d0f[1]);var util=require(_0x3d0f[2]);var path=require(_0x3d0f[3]);var express=require(_0x3d0f[4]);var router=express.Router();var auth=require(_0x3d0f[5]);var interaction=require(_0x3d0f[6]);var config=require(_0x3d0f[7]);var controller=require(_0x3d0f[8]);router[_0x3d0f[12]](_0x3d0f[9],auth[_0x3d0f[10]](),controller[_0x3d0f[11]]);router[_0x3d0f[12]](_0x3d0f[13],auth[_0x3d0f[10]](),controller[_0x3d0f[14]]);router[_0x3d0f[16]](_0x3d0f[9],auth[_0x3d0f[10]](),controller[_0x3d0f[15]]);router[_0x3d0f[18]](_0x3d0f[13],auth[_0x3d0f[10]](),controller[_0x3d0f[17]]);router[_0x3d0f[20]](_0x3d0f[13],auth[_0x3d0f[10]](),controller[_0x3d0f[19]]);module[_0x3d0f[21]]= router
\ No newline at end of file
+var _0xd040=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x66\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xd040[0];var multer=require(_0xd040[1]);var util=require(_0xd040[2]);var path=require(_0xd040[3]);var express=require(_0xd040[4]);var router=express.Router();var auth=require(_0xd040[5]);var interaction=require(_0xd040[6]);var config=require(_0xd040[7]);var controller=require(_0xd040[8]);router[_0xd040[12]](_0xd040[9],auth[_0xd040[10]](),controller[_0xd040[11]]);router[_0xd040[12]](_0xd040[13],auth[_0xd040[10]](),controller[_0xd040[14]]);router[_0xd040[16]](_0xd040[9],auth[_0xd040[10]](),controller[_0xd040[15]]);router[_0xd040[18]](_0xd040[13],auth[_0xd040[10]](),controller[_0xd040[17]]);router[_0xd040[20]](_0xd040[13],auth[_0xd040[10]](),controller[_0xd040[19]]);module[_0xd040[21]]= router
\ No newline at end of file
index f5faba9..21998d0 100644 (file)
@@ -1 +1 @@
-var _0xcae8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65\x41\x6E\x64\x41\x63\x63\x6F\x75\x6E\x74"];_0xcae8[0];var Sequelize=require(_0xcae8[1]);module[_0xcae8[2]]= {name:{type:Sequelize[_0xcae8[3]],unique:_0xcae8[4],allowNull:false}}
\ No newline at end of file
+var _0xe329=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65\x41\x6E\x64\x41\x63\x63\x6F\x75\x6E\x74"];_0xe329[0];var Sequelize=require(_0xe329[1]);module[_0xe329[2]]= {name:{type:Sequelize[_0xe329[3]],unique:_0xe329[4],allowNull:false}}
\ No newline at end of file
index 67b7409..84a7e65 100644 (file)
@@ -1 +1 @@
-var _0xdde8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xdde8[0];var jsonpatch=require(_0xdde8[1]);var rp=require(_0xdde8[2]);var moment=require(_0xdde8[3]);var BPromise=require(_0xdde8[4]);var Mustache=require(_0xdde8[5]);var util=require(_0xdde8[6]);var path=require(_0xdde8[7]);var sox=require(_0xdde8[8]);var csv=require(_0xdde8[9]);var ejs=require(_0xdde8[10]);var fs=require(_0xdde8[11]);var _=require(_0xdde8[12]);var squel=require(_0xdde8[13]);var crypto=require(_0xdde8[14]);var jsforce=require(_0xdde8[15]);var deskjs=require(_0xdde8[16]);var toCsv=require(_0xdde8[9]);var querystring=require(_0xdde8[17]);var Papa=require(_0xdde8[18]);var qs=require(_0xdde8[19]);var logger=require(_0xdde8[21])(_0xdde8[20]);var utils=require(_0xdde8[22]);var config=require(_0xdde8[23]);var db=require(_0xdde8[25])[_0xdde8[24]];function respondWithStatusCode(_0x8315x1a,_0x8315x1b){_0x8315x1b= _0x8315x1b|| 204;return function(_0x8315x1c){if(_0x8315x1c){return _0x8315x1a[_0xdde8[26]](_0x8315x1b)};return _0x8315x1a[_0xdde8[28]](_0x8315x1b)[_0xdde8[27]]()}}function respondWithResult(_0x8315x1a,_0x8315x1b){_0x8315x1b= _0x8315x1b|| 200;return function(_0x8315x1c){if(_0x8315x1c){return _0x8315x1a[_0xdde8[28]](_0x8315x1b)[_0xdde8[29]](_0x8315x1c)}}}function respondWithFilteredResult(_0x8315x1a,_0x8315x1f){return function(_0x8315x1c){if(_0x8315x1c){var _0x8315x20=_0x8315x1c[_0xdde8[30]],_0x8315x21=_0x8315x1f[_0xdde8[31]],_0x8315x22=_0x8315x1f[_0xdde8[31]]+ _0x8315x1f[_0xdde8[32]],_0x8315x1b;if(_0x8315x22>= _0x8315x20){_0x8315x22= _0x8315x20;_0x8315x1b= 200}else {_0x8315x1b= 206};_0x8315x1a[_0xdde8[28]](_0x8315x1b);return _0x8315x1a[_0xdde8[36]](_0xdde8[33],_0x8315x21+ _0xdde8[34]+ _0x8315x22+ _0xdde8[35]+ _0x8315x20)[_0xdde8[29]](_0x8315x1c)};return null}}function patchUpdates(_0x8315x24){return function(_0x8315x1c){try{jsonpatch[_0xdde8[37]](_0x8315x1c,_0x8315x24,true)}catch(err){return BPromise[_0xdde8[38]](err)};return _0x8315x1c[_0xdde8[39]]()}}function saveUpdates(_0x8315x26,_0x8315x1b){return function(_0x8315x1c){if(_0x8315x1c){return _0x8315x1c[_0xdde8[41]](_0x8315x26)[_0xdde8[40]](function(_0x8315x27){return _0x8315x27})};return null}}function removeEntity(_0x8315x1a,_0x8315x1b){return function(_0x8315x1c){if(_0x8315x1c){return _0x8315x1c[_0xdde8[42]]()[_0xdde8[40]](function(){_0x8315x1a[_0xdde8[28]](204)[_0xdde8[27]]()})}}}function handleEntityNotFound(_0x8315x1a,_0x8315x1b){return function(_0x8315x1c){if(!_0x8315x1c){_0x8315x1a[_0xdde8[26]](404)};return _0x8315x1c}}function handleError(_0x8315x1a,_0x8315x1b){_0x8315x1b= _0x8315x1b|| 500;return function(_0x8315x2b){logger[_0xdde8[44]](_0x8315x2b[_0xdde8[43]]);if(_0x8315x2b[_0xdde8[45]]){delete _0x8315x2b[_0xdde8[45]]};_0x8315x1a[_0xdde8[28]](_0x8315x1b)[_0xdde8[46]](_0x8315x2b)}}exports[_0xdde8[47]]= function(_0x8315x2c,_0x8315x1a){var _0x8315x1f={raw:true,where:{id:_0x8315x2c[_0xdde8[49]][_0xdde8[48]]}},_0x8315x2d={};_0x8315x2d[_0xdde8[50]]= _[_0xdde8[53]](db[_0xdde8[52]][_0xdde8[51]]);_0x8315x2d[_0xdde8[54]]= _[_0xdde8[53]](_0x8315x2c[_0xdde8[54]]);_0x8315x2d[_0xdde8[55]]= _[_0xdde8[56]](_0x8315x2d[_0xdde8[50]],_0x8315x2d[_0xdde8[54]]);_0x8315x1f[_0xdde8[57]]= _[_0xdde8[56]](_0x8315x2d[_0xdde8[50]],qs[_0xdde8[58]](_0x8315x2c[_0xdde8[54]][_0xdde8[58]]));_0x8315x1f[_0xdde8[57]]= (_0x8315x1f[_0xdde8[57]][_0xdde8[59]])?_0x8315x1f[_0xdde8[57]]:_0x8315x2d[_0xdde8[50]];if(_0x8315x2c[_0xdde8[54]][_0xdde8[60]]){_0x8315x1f[_0xdde8[61]]= [{all:true}]};_0x8315x1f= _[_0xdde8[63]]({},_0x8315x1f,_0x8315x2c[_0xdde8[62]]);return db[_0xdde8[52]][_0xdde8[65]](_0x8315x1f)[_0xdde8[40]](handleEntityNotFound(_0x8315x1a,null))[_0xdde8[40]](respondWithResult(_0x8315x1a,null))[_0xdde8[64]](handleError(_0x8315x1a,null))};exports[_0xdde8[66]]= function(_0x8315x2c,_0x8315x1a){return db[_0xdde8[52]][_0xdde8[66]](_0x8315x2c[_0xdde8[67]],{})[_0xdde8[40]](respondWithResult(_0x8315x1a,201))[_0xdde8[64]](handleError(_0x8315x1a,null))};exports[_0xdde8[41]]= function(_0x8315x2c,_0x8315x1a){if(_0x8315x2c[_0xdde8[67]][_0xdde8[48]]){delete _0x8315x2c[_0xdde8[67]][_0xdde8[48]]};return db[_0xdde8[52]][_0xdde8[65]]({where:{id:_0x8315x2c[_0xdde8[49]][_0xdde8[48]]}})[_0xdde8[40]](handleEntityNotFound(_0x8315x1a,null))[_0xdde8[40]](saveUpdates(_0x8315x2c[_0xdde8[67]],null))[_0xdde8[40]](respondWithResult(_0x8315x1a,null))[_0xdde8[64]](handleError(_0x8315x1a,null))};exports[_0xdde8[42]]= function(_0x8315x2c,_0x8315x1a){return db[_0xdde8[52]][_0xdde8[65]]({where:{id:_0x8315x2c[_0xdde8[49]][_0xdde8[48]]}})[_0xdde8[40]](handleEntityNotFound(_0x8315x1a,null))[_0xdde8[40]](removeEntity(_0x8315x1a,null))[_0xdde8[64]](handleError(_0x8315x1a,null))}
\ No newline at end of file
+var _0x96a1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x96a1[0];var jsonpatch=require(_0x96a1[1]);var rp=require(_0x96a1[2]);var moment=require(_0x96a1[3]);var BPromise=require(_0x96a1[4]);var Mustache=require(_0x96a1[5]);var util=require(_0x96a1[6]);var path=require(_0x96a1[7]);var sox=require(_0x96a1[8]);var csv=require(_0x96a1[9]);var ejs=require(_0x96a1[10]);var fs=require(_0x96a1[11]);var _=require(_0x96a1[12]);var squel=require(_0x96a1[13]);var crypto=require(_0x96a1[14]);var jsforce=require(_0x96a1[15]);var deskjs=require(_0x96a1[16]);var toCsv=require(_0x96a1[9]);var querystring=require(_0x96a1[17]);var Papa=require(_0x96a1[18]);var qs=require(_0x96a1[19]);var logger=require(_0x96a1[21])(_0x96a1[20]);var utils=require(_0x96a1[22]);var config=require(_0x96a1[23]);var db=require(_0x96a1[25])[_0x96a1[24]];function respondWithStatusCode(_0x8365x1a,_0x8365x1b){_0x8365x1b= _0x8365x1b|| 204;return function(_0x8365x1c){if(_0x8365x1c){return _0x8365x1a[_0x96a1[26]](_0x8365x1b)};return _0x8365x1a[_0x96a1[28]](_0x8365x1b)[_0x96a1[27]]()}}function respondWithResult(_0x8365x1a,_0x8365x1b){_0x8365x1b= _0x8365x1b|| 200;return function(_0x8365x1c){if(_0x8365x1c){return _0x8365x1a[_0x96a1[28]](_0x8365x1b)[_0x96a1[29]](_0x8365x1c)}}}function respondWithFilteredResult(_0x8365x1a,_0x8365x1f){return function(_0x8365x1c){if(_0x8365x1c){var _0x8365x20=_0x8365x1c[_0x96a1[30]],_0x8365x21=_0x8365x1f[_0x96a1[31]],_0x8365x22=_0x8365x1f[_0x96a1[31]]+ _0x8365x1f[_0x96a1[32]],_0x8365x1b;if(_0x8365x22>= _0x8365x20){_0x8365x22= _0x8365x20;_0x8365x1b= 200}else {_0x8365x1b= 206};_0x8365x1a[_0x96a1[28]](_0x8365x1b);return _0x8365x1a[_0x96a1[36]](_0x96a1[33],_0x8365x21+ _0x96a1[34]+ _0x8365x22+ _0x96a1[35]+ _0x8365x20)[_0x96a1[29]](_0x8365x1c)};return null}}function patchUpdates(_0x8365x24){return function(_0x8365x1c){try{jsonpatch[_0x96a1[37]](_0x8365x1c,_0x8365x24,true)}catch(err){return BPromise[_0x96a1[38]](err)};return _0x8365x1c[_0x96a1[39]]()}}function saveUpdates(_0x8365x26,_0x8365x1b){return function(_0x8365x1c){if(_0x8365x1c){return _0x8365x1c[_0x96a1[41]](_0x8365x26)[_0x96a1[40]](function(_0x8365x27){return _0x8365x27})};return null}}function removeEntity(_0x8365x1a,_0x8365x1b){return function(_0x8365x1c){if(_0x8365x1c){return _0x8365x1c[_0x96a1[42]]()[_0x96a1[40]](function(){_0x8365x1a[_0x96a1[28]](204)[_0x96a1[27]]()})}}}function handleEntityNotFound(_0x8365x1a,_0x8365x1b){return function(_0x8365x1c){if(!_0x8365x1c){_0x8365x1a[_0x96a1[26]](404)};return _0x8365x1c}}function handleError(_0x8365x1a,_0x8365x1b){_0x8365x1b= _0x8365x1b|| 500;return function(_0x8365x2b){logger[_0x96a1[44]](_0x8365x2b[_0x96a1[43]]);if(_0x8365x2b[_0x96a1[45]]){delete _0x8365x2b[_0x96a1[45]]};_0x8365x1a[_0x96a1[28]](_0x8365x1b)[_0x96a1[46]](_0x8365x2b)}}exports[_0x96a1[47]]= function(_0x8365x2c,_0x8365x1a){var _0x8365x1f={raw:true,where:{id:_0x8365x2c[_0x96a1[49]][_0x96a1[48]]}},_0x8365x2d={};_0x8365x2d[_0x96a1[50]]= _[_0x96a1[53]](db[_0x96a1[52]][_0x96a1[51]]);_0x8365x2d[_0x96a1[54]]= _[_0x96a1[53]](_0x8365x2c[_0x96a1[54]]);_0x8365x2d[_0x96a1[55]]= _[_0x96a1[56]](_0x8365x2d[_0x96a1[50]],_0x8365x2d[_0x96a1[54]]);_0x8365x1f[_0x96a1[57]]= _[_0x96a1[56]](_0x8365x2d[_0x96a1[50]],qs[_0x96a1[58]](_0x8365x2c[_0x96a1[54]][_0x96a1[58]]));_0x8365x1f[_0x96a1[57]]= (_0x8365x1f[_0x96a1[57]][_0x96a1[59]])?_0x8365x1f[_0x96a1[57]]:_0x8365x2d[_0x96a1[50]];if(_0x8365x2c[_0x96a1[54]][_0x96a1[60]]){_0x8365x1f[_0x96a1[61]]= [{all:true}]};_0x8365x1f= _[_0x96a1[63]]({},_0x8365x1f,_0x8365x2c[_0x96a1[62]]);return db[_0x96a1[52]][_0x96a1[65]](_0x8365x1f)[_0x96a1[40]](handleEntityNotFound(_0x8365x1a,null))[_0x96a1[40]](respondWithResult(_0x8365x1a,null))[_0x96a1[64]](handleError(_0x8365x1a,null))};exports[_0x96a1[66]]= function(_0x8365x2c,_0x8365x1a){return db[_0x96a1[52]][_0x96a1[66]](_0x8365x2c[_0x96a1[67]],{})[_0x96a1[40]](respondWithResult(_0x8365x1a,201))[_0x96a1[64]](handleError(_0x8365x1a,null))};exports[_0x96a1[41]]= function(_0x8365x2c,_0x8365x1a){if(_0x8365x2c[_0x96a1[67]][_0x96a1[48]]){delete _0x8365x2c[_0x96a1[67]][_0x96a1[48]]};return db[_0x96a1[52]][_0x96a1[65]]({where:{id:_0x8365x2c[_0x96a1[49]][_0x96a1[48]]}})[_0x96a1[40]](handleEntityNotFound(_0x8365x1a,null))[_0x96a1[40]](saveUpdates(_0x8365x2c[_0x96a1[67]],null))[_0x96a1[40]](respondWithResult(_0x8365x1a,null))[_0x96a1[64]](handleError(_0x8365x1a,null))};exports[_0x96a1[42]]= function(_0x8365x2c,_0x8365x1a){return db[_0x96a1[52]][_0x96a1[65]]({where:{id:_0x8365x2c[_0x96a1[49]][_0x96a1[48]]}})[_0x96a1[40]](handleEntityNotFound(_0x8365x1a,null))[_0x96a1[40]](removeEntity(_0x8365x1a,null))[_0x96a1[64]](handleError(_0x8365x1a,null))}
\ No newline at end of file
index 95b734e..d1a243a 100644 (file)
@@ -1 +1 @@
-var _0xdc03=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x66\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x66\x61\x78\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xdc03[0];var _=require(_0xdc03[1]);var util=require(_0xdc03[2]);var logger=require(_0xdc03[4])(_0xdc03[3]);var moment=require(_0xdc03[5]);var BPromise=require(_0xdc03[6]);var rp=require(_0xdc03[7]);var attributes=require(_0xdc03[8]);module[_0xdc03[9]]= function(_0xbdf2x8,_0xbdf2x9){return _0xbdf2x8[_0xdc03[12]](_0xdc03[10],attributes,{tableName:_0xdc03[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xb2fa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x66\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x66\x61\x78\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xb2fa[0];var _=require(_0xb2fa[1]);var util=require(_0xb2fa[2]);var logger=require(_0xb2fa[4])(_0xb2fa[3]);var moment=require(_0xb2fa[5]);var BPromise=require(_0xb2fa[6]);var rp=require(_0xb2fa[7]);var attributes=require(_0xb2fa[8]);module[_0xb2fa[9]]= function(_0xeb14x8,_0xeb14x9){return _0xeb14x8[_0xb2fa[12]](_0xb2fa[10],attributes,{tableName:_0xb2fa[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 397e496..1c74aaa 100644 (file)
@@ -1 +1 @@
-var _0xc405=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E"];_0xc405[0];var _=require(_0xc405[1]);var util=require(_0xc405[2]);var moment=require(_0xc405[3]);var BPromise=require(_0xc405[4]);var rs=require(_0xc405[5]);var fs=require(_0xc405[6]);var db=require(_0xc405[8])[_0xc405[7]];var utils=require(_0xc405[9]);var logger=require(_0xc405[11])(_0xc405[10]);var config=require(_0xc405[12]);var jayson=require(_0xc405[13]);var client=jayson[_0xc405[15]][_0xc405[14]]({port:9002});function respondWithRpcPromise(_0xce8cxe,_0xce8cxf,_0xce8cx10){return  new BPromise(function(_0xce8cx11,_0xce8cx12){return client[_0xc405[28]](_0xce8cxe,_0xce8cx10)[_0xc405[27]](function(_0xce8cx14){logger[_0xc405[20]](_0xc405[16],_0xce8cxf,_0xc405[19]);logger[_0xc405[23]](_0xc405[21],_0xce8cxf,_0xc405[19],JSON[_0xc405[22]](_0xce8cx14));if(_0xce8cx14[_0xc405[17]]){if(_0xce8cx14[_0xc405[17]][_0xc405[24]]=== 500){logger[_0xc405[17]](_0xc405[16],_0xce8cxf,_0xce8cx14[_0xc405[17]][_0xc405[25]]);return _0xce8cx12(_0xce8cx14[_0xc405[17]][_0xc405[25]])};logger[_0xc405[17]](_0xc405[16],_0xce8cxf,_0xce8cx14[_0xc405[17]][_0xc405[25]]);return _0xce8cx11(_0xce8cx14[_0xc405[17]][_0xc405[25]])}else {logger[_0xc405[20]](_0xc405[16],_0xce8cxf,_0xc405[19]);_0xce8cx11(_0xce8cx14[_0xc405[26]][_0xc405[25]])}})[_0xc405[18]](function(_0xce8cx13){logger[_0xc405[17]](_0xc405[16],_0xce8cxf,_0xce8cx13);_0xce8cx12(_0xce8cx13)})})}exports[_0xc405[29]]= function(_0xce8cx10){var _0xce8cx15=this;return  new Promise(function(_0xce8cx11,_0xce8cx12){return db[_0xc405[37]][_0xc405[36]](_0xce8cx10[_0xc405[30]],{raw:_0xce8cx10[_0xc405[31]]?(_0xce8cx10[_0xc405[31]][_0xc405[32]]=== undefined)?true:false:true,individualHooks:true,where:_0xce8cx10[_0xc405[31]]?_0xce8cx10[_0xc405[31]][_0xc405[33]]|| null:null,attributes:_0xce8cx10[_0xc405[31]]?_0xce8cx10[_0xc405[31]][_0xc405[34]]|| null:null,limit:_0xce8cx10[_0xc405[31]]?_0xce8cx10[_0xc405[31]][_0xc405[35]]|| null:null})[_0xc405[27]](function(_0xce8cx14){logger[_0xc405[20]](_0xc405[29],_0xce8cx10);logger[_0xc405[23]](_0xc405[29],_0xce8cx10,JSON[_0xc405[22]](_0xce8cx14));_0xce8cx11(_0xce8cx14)})[_0xc405[18]](function(_0xce8cx13){logger[_0xc405[17]](_0xc405[29],_0xce8cx13[_0xc405[25]],_0xce8cx10);_0xce8cx12(_0xce8cx15[_0xc405[17]](500,_0xce8cx13[_0xc405[25]]))})})}
\ No newline at end of file
+var _0xfc60=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E"];_0xfc60[0];var _=require(_0xfc60[1]);var util=require(_0xfc60[2]);var moment=require(_0xfc60[3]);var BPromise=require(_0xfc60[4]);var rs=require(_0xfc60[5]);var fs=require(_0xfc60[6]);var db=require(_0xfc60[8])[_0xfc60[7]];var utils=require(_0xfc60[9]);var logger=require(_0xfc60[11])(_0xfc60[10]);var config=require(_0xfc60[12]);var jayson=require(_0xfc60[13]);var client=jayson[_0xfc60[15]][_0xfc60[14]]({port:9002});function respondWithRpcPromise(_0x3bcexe,_0x3bcexf,_0x3bcex10){return  new BPromise(function(_0x3bcex11,_0x3bcex12){return client[_0xfc60[28]](_0x3bcexe,_0x3bcex10)[_0xfc60[27]](function(_0x3bcex14){logger[_0xfc60[20]](_0xfc60[16],_0x3bcexf,_0xfc60[19]);logger[_0xfc60[23]](_0xfc60[21],_0x3bcexf,_0xfc60[19],JSON[_0xfc60[22]](_0x3bcex14));if(_0x3bcex14[_0xfc60[17]]){if(_0x3bcex14[_0xfc60[17]][_0xfc60[24]]=== 500){logger[_0xfc60[17]](_0xfc60[16],_0x3bcexf,_0x3bcex14[_0xfc60[17]][_0xfc60[25]]);return _0x3bcex12(_0x3bcex14[_0xfc60[17]][_0xfc60[25]])};logger[_0xfc60[17]](_0xfc60[16],_0x3bcexf,_0x3bcex14[_0xfc60[17]][_0xfc60[25]]);return _0x3bcex11(_0x3bcex14[_0xfc60[17]][_0xfc60[25]])}else {logger[_0xfc60[20]](_0xfc60[16],_0x3bcexf,_0xfc60[19]);_0x3bcex11(_0x3bcex14[_0xfc60[26]][_0xfc60[25]])}})[_0xfc60[18]](function(_0x3bcex13){logger[_0xfc60[17]](_0xfc60[16],_0x3bcexf,_0x3bcex13);_0x3bcex12(_0x3bcex13)})})}exports[_0xfc60[29]]= function(_0x3bcex10){var _0x3bcex15=this;return  new Promise(function(_0x3bcex11,_0x3bcex12){return db[_0xfc60[37]][_0xfc60[36]](_0x3bcex10[_0xfc60[30]],{raw:_0x3bcex10[_0xfc60[31]]?(_0x3bcex10[_0xfc60[31]][_0xfc60[32]]=== undefined)?true:false:true,individualHooks:true,where:_0x3bcex10[_0xfc60[31]]?_0x3bcex10[_0xfc60[31]][_0xfc60[33]]|| null:null,attributes:_0x3bcex10[_0xfc60[31]]?_0x3bcex10[_0xfc60[31]][_0xfc60[34]]|| null:null,limit:_0x3bcex10[_0xfc60[31]]?_0x3bcex10[_0xfc60[31]][_0xfc60[35]]|| null:null})[_0xfc60[27]](function(_0x3bcex14){logger[_0xfc60[20]](_0xfc60[29],_0x3bcex10);logger[_0xfc60[23]](_0xfc60[29],_0x3bcex10,JSON[_0xfc60[22]](_0x3bcex14));_0x3bcex11(_0x3bcex14)})[_0xfc60[18]](function(_0x3bcex13){logger[_0xfc60[17]](_0xfc60[29],_0x3bcex13[_0xfc60[25]],_0x3bcex10);_0x3bcex12(_0x3bcex15[_0xfc60[17]](500,_0x3bcex13[_0xfc60[25]]))})})}
\ No newline at end of file
index d6e7e4d..dfa5610 100644 (file)
@@ -1 +1 @@
-var _0x1da4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x66\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x73\x68\x6F\x77","\x67\x65\x74","\x2F","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x1da4[0];var multer=require(_0x1da4[1]);var util=require(_0x1da4[2]);var path=require(_0x1da4[3]);var express=require(_0x1da4[4]);var router=express.Router();var auth=require(_0x1da4[5]);var interaction=require(_0x1da4[6]);var config=require(_0x1da4[7]);var controller=require(_0x1da4[8]);router[_0x1da4[12]](_0x1da4[9],auth[_0x1da4[10]](),controller[_0x1da4[11]]);router[_0x1da4[15]](_0x1da4[13],auth[_0x1da4[10]](),controller[_0x1da4[14]]);router[_0x1da4[17]](_0x1da4[9],auth[_0x1da4[10]](),controller[_0x1da4[16]]);router[_0x1da4[19]](_0x1da4[9],auth[_0x1da4[10]](),controller[_0x1da4[18]]);module[_0x1da4[20]]= router
\ No newline at end of file
+var _0xf1f8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x66\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x73\x68\x6F\x77","\x67\x65\x74","\x2F","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf1f8[0];var multer=require(_0xf1f8[1]);var util=require(_0xf1f8[2]);var path=require(_0xf1f8[3]);var express=require(_0xf1f8[4]);var router=express.Router();var auth=require(_0xf1f8[5]);var interaction=require(_0xf1f8[6]);var config=require(_0xf1f8[7]);var controller=require(_0xf1f8[8]);router[_0xf1f8[12]](_0xf1f8[9],auth[_0xf1f8[10]](),controller[_0xf1f8[11]]);router[_0xf1f8[15]](_0xf1f8[13],auth[_0xf1f8[10]](),controller[_0xf1f8[14]]);router[_0xf1f8[17]](_0xf1f8[9],auth[_0xf1f8[10]](),controller[_0xf1f8[16]]);router[_0xf1f8[19]](_0xf1f8[9],auth[_0xf1f8[10]](),controller[_0xf1f8[18]]);module[_0xf1f8[20]]= router
\ No newline at end of file
index 9632787..3a02864 100644 (file)
@@ -1 +1 @@
-var _0x176d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x42\x4F\x4F\x4C\x45\x41\x4E","\x44\x41\x54\x45","\x53\x54\x52\x49\x4E\x47","\x69\x6E","\x6F\x75\x74"];_0x176d[0];var Sequelize=require(_0x176d[1]);module[_0x176d[2]]= {closed:{type:Sequelize[_0x176d[3]],defaultValue:false},closedAt:{type:Sequelize[_0x176d[4]]},disposition:{type:Sequelize[_0x176d[5]]},note:{type:Sequelize[_0x176d[5]]},read1stAt:{type:Sequelize[_0x176d[4]]},fax:{type:Sequelize[_0x176d[5]]},firstMsgDirection:{type:Sequelize.ENUM(_0x176d[6],_0x176d[7]),defaultValue:_0x176d[6],allowNull:false},lastMsgAt:{type:Sequelize[_0x176d[4]]},lastMsgDirection:{type:Sequelize.ENUM(_0x176d[6],_0x176d[7]),defaultValue:_0x176d[6],allowNull:false}}
\ No newline at end of file
+var _0x31c3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x42\x4F\x4F\x4C\x45\x41\x4E","\x44\x41\x54\x45","\x53\x54\x52\x49\x4E\x47","\x69\x6E","\x6F\x75\x74"];_0x31c3[0];var Sequelize=require(_0x31c3[1]);module[_0x31c3[2]]= {closed:{type:Sequelize[_0x31c3[3]],defaultValue:false},closedAt:{type:Sequelize[_0x31c3[4]]},disposition:{type:Sequelize[_0x31c3[5]]},note:{type:Sequelize[_0x31c3[5]]},read1stAt:{type:Sequelize[_0x31c3[4]]},fax:{type:Sequelize[_0x31c3[5]]},firstMsgDirection:{type:Sequelize.ENUM(_0x31c3[6],_0x31c3[7]),defaultValue:_0x31c3[6],allowNull:false},lastMsgAt:{type:Sequelize[_0x31c3[4]]},lastMsgDirection:{type:Sequelize.ENUM(_0x31c3[6],_0x31c3[7]),defaultValue:_0x31c3[6],allowNull:false}}
\ No newline at end of file
index 3547385..2faaf3b 100644 (file)
@@ -1 +1 @@
-var _0xb41c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x74\x61\x67","\x54\x61\x67","\x54\x61\x67\x73","\x69\x64","\x70\x75\x73\x68","\x64\x69\x73\x74\x69\x6E\x63\x74","\x72\x65\x61\x64","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x4D\x65\x73\x73\x61\x67\x65\x73","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x69\x6E","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x55\x73\x65\x72","\x55\x73\x65\x72\x73","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x4F\x77\x6E\x65\x72","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79","\x63\x6F\x6C\x6F\x72","\x54\x68\x72\x6F\x75\x67\x68\x54\x61\x67\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x69\x64\x73","\x6F\x6D\x69\x74","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x24\x67\x74\x65","\x2C","\x73\x70\x6C\x69\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x54\x61\x67\x73","\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x54\x61\x67\x73\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x73\x65\x74\x54\x61\x67\x73","\x72\x65\x6D\x6F\x76\x65\x54\x61\x67\x73"];_0xb41c[0];var jsonpatch=require(_0xb41c[1]);var rp=require(_0xb41c[2]);var moment=require(_0xb41c[3]);var BPromise=require(_0xb41c[4]);var Mustache=require(_0xb41c[5]);var util=require(_0xb41c[6]);var path=require(_0xb41c[7]);var sox=require(_0xb41c[8]);var csv=require(_0xb41c[9]);var ejs=require(_0xb41c[10]);var fs=require(_0xb41c[11]);var _=require(_0xb41c[12]);var squel=require(_0xb41c[13]);var crypto=require(_0xb41c[14]);var jsforce=require(_0xb41c[15]);var deskjs=require(_0xb41c[16]);var toCsv=require(_0xb41c[9]);var querystring=require(_0xb41c[17]);var Papa=require(_0xb41c[18]);var qs=require(_0xb41c[19]);var logger=require(_0xb41c[21])(_0xb41c[20]);var utils=require(_0xb41c[22]);var config=require(_0xb41c[23]);var db=require(_0xb41c[25])[_0xb41c[24]];var socket=require(_0xb41c[27])({host:_0xb41c[26],port:6379});require(_0xb41c[29])[_0xb41c[28]](socket);function respondWithStatusCode(_0xb2e7x1b,_0xb2e7x1c){_0xb2e7x1c= _0xb2e7x1c|| 204;return function(_0xb2e7x1d){if(_0xb2e7x1d){return _0xb2e7x1b[_0xb41c[30]](_0xb2e7x1c)};return _0xb2e7x1b[_0xb41c[32]](_0xb2e7x1c)[_0xb41c[31]]()}}function respondWithResult(_0xb2e7x1b,_0xb2e7x1c){_0xb2e7x1c= _0xb2e7x1c|| 200;return function(_0xb2e7x1d){if(_0xb2e7x1d){return _0xb2e7x1b[_0xb41c[32]](_0xb2e7x1c)[_0xb41c[33]](_0xb2e7x1d)}}}function respondWithFilteredResult(_0xb2e7x1b,_0xb2e7x20){return function(_0xb2e7x1d){if(_0xb2e7x1d){var _0xb2e7x21=_0xb2e7x1d[_0xb41c[34]],_0xb2e7x22=_0xb2e7x20[_0xb41c[35]],_0xb2e7x23=_0xb2e7x20[_0xb41c[35]]+ _0xb2e7x20[_0xb41c[36]],_0xb2e7x1c;if(_0xb2e7x23>= _0xb2e7x21){_0xb2e7x23= _0xb2e7x21;_0xb2e7x1c= 200}else {_0xb2e7x1c= 206};_0xb2e7x1b[_0xb41c[32]](_0xb2e7x1c);return _0xb2e7x1b[_0xb41c[40]](_0xb41c[37],_0xb2e7x22+ _0xb41c[38]+ _0xb2e7x23+ _0xb41c[39]+ _0xb2e7x21)[_0xb41c[33]](_0xb2e7x1d)};return null}}function patchUpdates(_0xb2e7x25){return function(_0xb2e7x1d){try{jsonpatch[_0xb41c[41]](_0xb2e7x1d,_0xb2e7x25,true)}catch(err){return BPromise[_0xb41c[42]](err)};return _0xb2e7x1d[_0xb41c[43]]()}}function saveUpdates(_0xb2e7x27,_0xb2e7x1c){return function(_0xb2e7x1d){if(_0xb2e7x1d){return _0xb2e7x1d[_0xb41c[45]](_0xb2e7x27)[_0xb41c[44]](function(_0xb2e7x28){return _0xb2e7x28})};return null}}function removeEntity(_0xb2e7x1b,_0xb2e7x1c){return function(_0xb2e7x1d){if(_0xb2e7x1d){return _0xb2e7x1d[_0xb41c[46]]()[_0xb41c[44]](function(){_0xb2e7x1b[_0xb41c[32]](204)[_0xb41c[31]]()})}}}function handleEntityNotFound(_0xb2e7x1b,_0xb2e7x1c){return function(_0xb2e7x1d){if(!_0xb2e7x1d){_0xb2e7x1b[_0xb41c[30]](404)};return _0xb2e7x1d}}function handleError(_0xb2e7x1b,_0xb2e7x1c){_0xb2e7x1c= _0xb2e7x1c|| 500;return function(_0xb2e7x2c){logger[_0xb41c[48]](_0xb2e7x2c[_0xb41c[47]]);if(_0xb2e7x2c[_0xb41c[49]]){delete _0xb2e7x2c[_0xb41c[49]]};_0xb2e7x1b[_0xb41c[32]](_0xb2e7x1c)[_0xb41c[50]](_0xb2e7x2c)}}exports[_0xb41c[51]]= function(_0xb2e7x2d,_0xb2e7x1b){var _0xb2e7x20={},_0xb2e7x2e={},_0xb2e7x2f={count:0,rows:[]};_0xb2e7x2e[_0xb41c[52]]= _[_0xb41c[55]](db[_0xb41c[54]][_0xb41c[53]]);var _0xb2e7x30={dateStart:_0xb2e7x2d[_0xb41c[57]][_0xb41c[56]],dateEnd:_0xb2e7x2d[_0xb41c[57]][_0xb41c[58]]};delete _0xb2e7x2d[_0xb41c[57]][_0xb41c[56]];delete _0xb2e7x2d[_0xb41c[57]][_0xb41c[58]];_0xb2e7x2e[_0xb41c[57]]= _[_0xb41c[55]](_0xb2e7x2d[_0xb41c[57]]);_0xb2e7x2e[_0xb41c[59]]= _[_0xb41c[60]](_0xb2e7x2e[_0xb41c[52]],_0xb2e7x2e[_0xb41c[57]]);_0xb2e7x20[_0xb41c[61]]= _[_0xb41c[60]](_0xb2e7x2e[_0xb41c[52]],qs[_0xb41c[62]](_0xb2e7x2d[_0xb41c[57]][_0xb41c[62]]));_0xb2e7x20[_0xb41c[61]]= (_0xb2e7x20[_0xb41c[61]][_0xb41c[63]])?_0xb2e7x20[_0xb41c[61]]:_0xb2e7x2e[_0xb41c[52]];if(!_0xb2e7x2d[_0xb41c[57]][_0xb41c[65]](_0xb41c[64])){_0xb2e7x20[_0xb41c[36]]= qs[_0xb41c[36]](_0xb2e7x2d[_0xb41c[57]][_0xb41c[36]]);_0xb2e7x20[_0xb41c[35]]= qs[_0xb41c[35]](_0xb2e7x2d[_0xb41c[57]][_0xb41c[35]])};_0xb2e7x20[_0xb41c[66]]= qs[_0xb41c[67]](_0xb2e7x2d[_0xb41c[57]][_0xb41c[67]]);_0xb2e7x20[_0xb41c[68]]= qs[_0xb41c[59]](_[_0xb41c[69]](_0xb2e7x2d[_0xb41c[57]],_0xb2e7x2e[_0xb41c[59]]));if(_0xb2e7x30[_0xb41c[56]]){if(_0xb2e7x30[_0xb41c[58]]){_0xb2e7x30[_0xb41c[58]]= moment(_0xb2e7x30[_0xb41c[58]])[_0xb41c[71]](1,_0xb41c[70])}else {_0xb2e7x30[_0xb41c[58]]= moment(_0xb2e7x30[_0xb41c[56]])[_0xb41c[71]](1,_0xb41c[70])};_[_0xb41c[72]](_0xb2e7x20[_0xb41c[68]],{createdAt:{$gte:_0xb2e7x30[_0xb41c[56]],$lte:_0xb2e7x30[_0xb41c[58]]}})};if(_0xb2e7x2d[_0xb41c[57]][_0xb41c[73]]){_0xb2e7x20[_0xb41c[68]]= _[_0xb41c[72]](_0xb2e7x20[_0xb41c[68]],{$or:_[_0xb41c[75]](_0xb2e7x20[_0xb41c[61]],function(_0xb2e7x31){var _0xb2e7x2f={};_0xb2e7x2f[_0xb2e7x31]= {$like:_0xb41c[74]+ _0xb2e7x2d[_0xb41c[57]][_0xb41c[73]]+ _0xb41c[74]};return _0xb2e7x2f})})};_0xb2e7x20= _[_0xb41c[72]]({},_0xb2e7x20,_0xb2e7x2d[_0xb41c[76]]);var _0xb2e7x32={where:_0xb2e7x20[_0xb41c[68]]};_0xb2e7x32[_0xb41c[77]]= [];if(_0xb2e7x2d[_0xb41c[57]][_0xb41c[78]]){_0xb2e7x32[_0xb41c[77]][_0xb41c[82]]({model:db[_0xb41c[79]],as:_0xb41c[80],attributes:[_0xb41c[81]],where:{id:_0xb2e7x2d[_0xb41c[57]][_0xb41c[78]]},required:true});_0xb2e7x32[_0xb41c[83]]= true};if(_0xb2e7x2d[_0xb41c[57]][_0xb41c[84]]){_0xb2e7x32[_0xb41c[77]][_0xb41c[82]]({model:db[_0xb41c[85]],as:_0xb41c[86],attributes:[_0xb41c[81],_0xb41c[87],_0xb41c[88],_0xb41c[84]],where:{direction:_0xb41c[89],read:_0xb2e7x2d[_0xb41c[57]][_0xb41c[84]]|| false},required:true});_0xb2e7x32[_0xb41c[83]]= true};return db[_0xb41c[54]][_0xb41c[34]](_0xb2e7x32)[_0xb41c[44]](function(_0xb2e7x21){_0xb2e7x2f[_0xb41c[34]]= _0xb2e7x21;if(_0xb2e7x2d[_0xb41c[57]][_0xb41c[92]]){_0xb2e7x20[_0xb41c[77]]= [{model:db[_0xb41c[93]],as:_0xb41c[94],required:false,attributes:[_0xb41c[81],_0xb41c[49],_0xb41c[95]]},{model:db[_0xb41c[96]],as:_0xb41c[97],required:false},{model:db[_0xb41c[93]],as:_0xb41c[98],attributes:[_0xb41c[49],_0xb41c[95],_0xb41c[99]],required:false},{model:db[_0xb41c[100]],as:_0xb41c[101],attributes:[_0xb41c[49],_0xb41c[102]],required:false},{model:db[_0xb41c[85]],as:_0xb41c[86],attributes:[_0xb41c[81],_0xb41c[87],_0xb41c[88],_0xb41c[84]],where:{direction:_0xb41c[89],read:_0xb2e7x2d[_0xb41c[57]][_0xb41c[84]]|| false},required:_0xb2e7x2d[_0xb41c[57]][_0xb41c[84]]|| false},{model:db[_0xb41c[79]],as:_0xb41c[80],attributes:[_0xb41c[81],_0xb41c[49],_0xb41c[103]],required:_0xb2e7x2d[_0xb41c[57]][_0xb41c[78]]?true:false},{model:db[_0xb41c[79]],as:_0xb41c[104],attributes:[_0xb41c[81],_0xb41c[49],_0xb41c[103]],through:_0xb2e7x2d[_0xb41c[57]][_0xb41c[78]]?{attributes:[],where:{TagId:_0xb2e7x2d[_0xb41c[57]][_0xb41c[78]]|| undefined}}:{},required:_0xb2e7x2d[_0xb41c[57]][_0xb41c[78]]?true:false}]};return db[_0xb41c[54]][_0xb41c[105]](_0xb2e7x20)})[_0xb41c[44]](function(_0xb2e7x33){_0xb2e7x2f[_0xb41c[91]]= _0xb2e7x33;return _0xb2e7x2f})[_0xb41c[44]](respondWithFilteredResult(_0xb2e7x1b,_0xb2e7x20))[_0xb41c[90]](handleError(_0xb2e7x1b,null))};exports[_0xb41c[106]]= function(_0xb2e7x2d,_0xb2e7x1b){var _0xb2e7x20={raw:false,where:{id:_0xb2e7x2d[_0xb41c[107]][_0xb41c[81]]}},_0xb2e7x2e={};_0xb2e7x2e[_0xb41c[52]]= _[_0xb41c[55]](db[_0xb41c[54]][_0xb41c[53]]);_0xb2e7x2e[_0xb41c[57]]= _[_0xb41c[55]](_0xb2e7x2d[_0xb41c[57]]);_0xb2e7x2e[_0xb41c[59]]= _[_0xb41c[60]](_0xb2e7x2e[_0xb41c[52]],_0xb2e7x2e[_0xb41c[57]]);_0xb2e7x20[_0xb41c[61]]= _[_0xb41c[60]](_0xb2e7x2e[_0xb41c[52]],qs[_0xb41c[62]](_0xb2e7x2d[_0xb41c[57]][_0xb41c[62]]));_0xb2e7x20[_0xb41c[61]]= (_0xb2e7x20[_0xb41c[61]][_0xb41c[63]])?_0xb2e7x20[_0xb41c[61]]:_0xb2e7x2e[_0xb41c[52]];if(_0xb2e7x2d[_0xb41c[57]][_0xb41c[92]]){_0xb2e7x20[_0xb41c[77]]= [{all:true}]};_0xb2e7x20= _[_0xb41c[72]]({},_0xb2e7x20,_0xb2e7x2d[_0xb41c[76]]);return db[_0xb41c[54]][_0xb41c[108]](_0xb2e7x20)[_0xb41c[44]](handleEntityNotFound(_0xb2e7x1b,null))[_0xb41c[44]](respondWithResult(_0xb2e7x1b,null))[_0xb41c[90]](handleError(_0xb2e7x1b,null))};exports[_0xb41c[109]]= function(_0xb2e7x2d,_0xb2e7x1b){return db[_0xb41c[54]][_0xb41c[109]](_0xb2e7x2d[_0xb41c[110]],{})[_0xb41c[44]](respondWithResult(_0xb2e7x1b,201))[_0xb41c[90]](handleError(_0xb2e7x1b,null))};exports[_0xb41c[45]]= function(_0xb2e7x2d,_0xb2e7x1b){if(_0xb2e7x2d[_0xb41c[110]][_0xb41c[81]]){delete _0xb2e7x2d[_0xb41c[110]][_0xb41c[81]]};return db[_0xb41c[54]][_0xb41c[108]]({where:{id:_0xb2e7x2d[_0xb41c[107]][_0xb41c[81]]}})[_0xb41c[44]](handleEntityNotFound(_0xb2e7x1b,null))[_0xb41c[44]](saveUpdates(_0xb2e7x2d[_0xb41c[110]],null))[_0xb41c[44]](respondWithResult(_0xb2e7x1b,null))[_0xb41c[90]](handleError(_0xb2e7x1b,null))};exports[_0xb41c[46]]= function(_0xb2e7x2d,_0xb2e7x1b){return db[_0xb41c[54]][_0xb41c[108]]({where:{id:_0xb2e7x2d[_0xb41c[107]][_0xb41c[81]]}})[_0xb41c[44]](handleEntityNotFound(_0xb2e7x1b,null))[_0xb41c[44]](removeEntity(_0xb2e7x1b,null))[_0xb41c[90]](handleError(_0xb2e7x1b,null))};exports[_0xb41c[111]]= function(_0xb2e7x2d,_0xb2e7x1b){return db[_0xb41c[54]][_0xb41c[111]]()[_0xb41c[44]](respondWithResult(_0xb2e7x1b,null))[_0xb41c[90]](handleError(_0xb2e7x1b,null))};exports[_0xb41c[112]]= function(_0xb2e7x2d,_0xb2e7x1b,_0xb2e7x34){return db[_0xb41c[85]][_0xb41c[108]]({where:{id:_0xb2e7x2d[_0xb41c[107]][_0xb41c[81]]}})[_0xb41c[44]](handleEntityNotFound(_0xb2e7x1b,null))[_0xb41c[44]](function(_0xb2e7x1d){if(_0xb2e7x1d){return _0xb2e7x1d[_0xb41c[112]](_0xb2e7x2d[_0xb41c[110]][_0xb41c[113]],_[_0xb41c[114]](_0xb2e7x2d[_0xb41c[110]],[_0xb41c[113],_0xb41c[81]])|| {})}})[_0xb41c[44]](respondWithResult(_0xb2e7x1b,null))[_0xb41c[90]](handleError(_0xb2e7x1b,null))};exports[_0xb41c[115]]= function(_0xb2e7x2d,_0xb2e7x1b,_0xb2e7x34){var _0xb2e7x20={raw:false,where:{}};var _0xb2e7x2e={};var _0xb2e7x35={count:0,rows:[]};return db[_0xb41c[54]][_0xb41c[122]]({where:{id:_0xb2e7x2d[_0xb41c[107]][_0xb41c[81]]}})[_0xb41c[44]](handleEntityNotFound(_0xb2e7x1b,null))[_0xb41c[44]](function(_0xb2e7x1d){if(_0xb2e7x1d){_0xb2e7x2e[_0xb41c[52]]= _[_0xb41c[55]](db[_0xb41c[85]][_0xb41c[53]]);_0xb2e7x2e[_0xb41c[57]]= _[_0xb41c[55]](_0xb2e7x2d[_0xb41c[57]]);_0xb2e7x2e[_0xb41c[59]]= _[_0xb41c[60]](_0xb2e7x2e[_0xb41c[52]],_0xb2e7x2e[_0xb41c[57]]);_0xb2e7x20[_0xb41c[61]]= _[_0xb41c[60]](_0xb2e7x2e[_0xb41c[52]],qs[_0xb41c[62]](_0xb2e7x2d[_0xb41c[57]][_0xb41c[62]]));_0xb2e7x20[_0xb41c[61]]= (_0xb2e7x20[_0xb41c[61]][_0xb41c[63]])?_0xb2e7x20[_0xb41c[61]]:_0xb2e7x2e[_0xb41c[52]];if(!_0xb2e7x2d[_0xb41c[57]][_0xb41c[65]](_0xb41c[64])){_0xb2e7x20[_0xb41c[36]]= qs[_0xb41c[36]](_0xb2e7x2d[_0xb41c[57]][_0xb41c[36]]);_0xb2e7x20[_0xb41c[35]]= qs[_0xb41c[35]](_0xb2e7x2d[_0xb41c[57]][_0xb41c[35]])};_0xb2e7x20[_0xb41c[66]]= qs[_0xb41c[67]](_0xb2e7x2d[_0xb41c[57]][_0xb41c[67]]);_0xb2e7x20[_0xb41c[68]]= qs[_0xb41c[59]](_[_0xb41c[69]](_0xb2e7x2d[_0xb41c[57]],_0xb2e7x2e[_0xb41c[59]]));_0xb2e7x20[_0xb41c[68]][_0xb41c[116]]= _0xb2e7x1d[_0xb41c[81]];if(_0xb2e7x2d[_0xb41c[57]][_0xb41c[73]]){_0xb2e7x20[_0xb41c[68]]= _[_0xb41c[72]](_0xb2e7x20[_0xb41c[68]],{$or:_[_0xb41c[75]](_0xb2e7x20[_0xb41c[61]],function(_0xb2e7x31){var _0xb2e7x2f={};_0xb2e7x2f[_0xb2e7x31]= {$like:_0xb41c[74]+ _0xb2e7x2d[_0xb41c[57]][_0xb41c[73]]+ _0xb41c[74]};return _0xb2e7x2f})})};if(_0xb2e7x2d[_0xb41c[57]][_0xb41c[117]]){var _0xb2e7x36=_0xb2e7x2d[_0xb41c[57]][_0xb41c[117]][_0xb41c[119]](_0xb41c[118]);var _0xb2e7x2f={};_0xb2e7x2f[_0xb2e7x36[0]]= {$gte:moment(_0xb2e7x36[1])[_0xb41c[121]](_0xb41c[120])};_0xb2e7x20[_0xb41c[68]]= _[_0xb41c[72]](_0xb2e7x20[_0xb41c[68]],_0xb2e7x2f)};_0xb2e7x20= _[_0xb41c[72]]({},_0xb2e7x20,_0xb2e7x2d[_0xb41c[76]]);return db[_0xb41c[85]][_0xb41c[34]]({where:_0xb2e7x20[_0xb41c[68]]})[_0xb41c[44]](function(_0xb2e7x21){_0xb2e7x35[_0xb41c[34]]= _0xb2e7x21;if(_0xb2e7x2d[_0xb41c[57]][_0xb41c[92]]){_0xb2e7x20[_0xb41c[77]]= [{all:true}]};return db[_0xb41c[85]][_0xb41c[105]](_0xb2e7x20)})[_0xb41c[44]](function(_0xb2e7x33){_0xb2e7x35[_0xb41c[91]]= _0xb2e7x33;return _0xb2e7x35})}})[_0xb41c[44]](respondWithFilteredResult(_0xb2e7x1b,_0xb2e7x20))[_0xb41c[90]](handleError(_0xb2e7x1b,null))};exports[_0xb41c[123]]= function(_0xb2e7x2d,_0xb2e7x1b,_0xb2e7x34){return db[_0xb41c[54]][_0xb41c[108]]({where:{id:_0xb2e7x2d[_0xb41c[107]][_0xb41c[81]]}})[_0xb41c[44]](handleEntityNotFound(_0xb2e7x1b,null))[_0xb41c[44]](function(_0xb2e7x1d){if(_0xb2e7x1d){return _0xb2e7x1d[_0xb41c[127]](_0xb2e7x2d[_0xb41c[110]][_0xb41c[113]],_[_0xb41c[114]](_0xb2e7x2d[_0xb41c[110]],[_0xb41c[113],_0xb41c[81]])|| {})[_0xb41c[126]](function(){return db[_0xb41c[79]][_0xb41c[105]]({attributes:[_0xb41c[81],_0xb41c[49],_0xb41c[103]],where:{id:_0xb2e7x2d[_0xb41c[110]][_0xb41c[113]]}})})[_0xb41c[44]](function(_0xb2e7x37){socket[_0xb41c[125]](_0xb41c[124],{id:Number(_0xb2e7x2d[_0xb41c[107]][_0xb41c[81]]),tags:_0xb2e7x37|| []});return {id:Number(_0xb2e7x2d[_0xb41c[107]][_0xb41c[81]]),tags:_0xb2e7x37|| []}})}})[_0xb41c[44]](respondWithResult(_0xb2e7x1b,null))[_0xb41c[90]](handleError(_0xb2e7x1b,null))};exports[_0xb41c[128]]= function(_0xb2e7x2d,_0xb2e7x1b,_0xb2e7x34){var _0xb2e7x38;return db[_0xb41c[54]][_0xb41c[108]]({where:{id:_0xb2e7x2d[_0xb41c[107]][_0xb41c[81]]}})[_0xb41c[44]](handleEntityNotFound(_0xb2e7x1b,null))[_0xb41c[44]](function(_0xb2e7x1d){if(_0xb2e7x1d){return _0xb2e7x1d[_0xb41c[128]](_0xb2e7x2d[_0xb41c[57]][_0xb41c[113]])}})[_0xb41c[44]](respondWithStatusCode(_0xb2e7x1b,null))[_0xb41c[90]](handleError(_0xb2e7x1b,null))}
\ No newline at end of file
+var _0x784a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x74\x61\x67","\x54\x61\x67","\x54\x61\x67\x73","\x69\x64","\x70\x75\x73\x68","\x64\x69\x73\x74\x69\x6E\x63\x74","\x72\x65\x61\x64","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x4D\x65\x73\x73\x61\x67\x65\x73","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x69\x6E","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x55\x73\x65\x72","\x55\x73\x65\x72\x73","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x4F\x77\x6E\x65\x72","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79","\x63\x6F\x6C\x6F\x72","\x54\x68\x72\x6F\x75\x67\x68\x54\x61\x67\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x69\x64\x73","\x6F\x6D\x69\x74","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x24\x67\x74\x65","\x2C","\x73\x70\x6C\x69\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x54\x61\x67\x73","\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x54\x61\x67\x73\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x73\x65\x74\x54\x61\x67\x73","\x72\x65\x6D\x6F\x76\x65\x54\x61\x67\x73"];_0x784a[0];var jsonpatch=require(_0x784a[1]);var rp=require(_0x784a[2]);var moment=require(_0x784a[3]);var BPromise=require(_0x784a[4]);var Mustache=require(_0x784a[5]);var util=require(_0x784a[6]);var path=require(_0x784a[7]);var sox=require(_0x784a[8]);var csv=require(_0x784a[9]);var ejs=require(_0x784a[10]);var fs=require(_0x784a[11]);var _=require(_0x784a[12]);var squel=require(_0x784a[13]);var crypto=require(_0x784a[14]);var jsforce=require(_0x784a[15]);var deskjs=require(_0x784a[16]);var toCsv=require(_0x784a[9]);var querystring=require(_0x784a[17]);var Papa=require(_0x784a[18]);var qs=require(_0x784a[19]);var logger=require(_0x784a[21])(_0x784a[20]);var utils=require(_0x784a[22]);var config=require(_0x784a[23]);var db=require(_0x784a[25])[_0x784a[24]];var socket=require(_0x784a[27])({host:_0x784a[26],port:6379});require(_0x784a[29])[_0x784a[28]](socket);function respondWithStatusCode(_0x7a00x1b,_0x7a00x1c){_0x7a00x1c= _0x7a00x1c|| 204;return function(_0x7a00x1d){if(_0x7a00x1d){return _0x7a00x1b[_0x784a[30]](_0x7a00x1c)};return _0x7a00x1b[_0x784a[32]](_0x7a00x1c)[_0x784a[31]]()}}function respondWithResult(_0x7a00x1b,_0x7a00x1c){_0x7a00x1c= _0x7a00x1c|| 200;return function(_0x7a00x1d){if(_0x7a00x1d){return _0x7a00x1b[_0x784a[32]](_0x7a00x1c)[_0x784a[33]](_0x7a00x1d)}}}function respondWithFilteredResult(_0x7a00x1b,_0x7a00x20){return function(_0x7a00x1d){if(_0x7a00x1d){var _0x7a00x21=_0x7a00x1d[_0x784a[34]],_0x7a00x22=_0x7a00x20[_0x784a[35]],_0x7a00x23=_0x7a00x20[_0x784a[35]]+ _0x7a00x20[_0x784a[36]],_0x7a00x1c;if(_0x7a00x23>= _0x7a00x21){_0x7a00x23= _0x7a00x21;_0x7a00x1c= 200}else {_0x7a00x1c= 206};_0x7a00x1b[_0x784a[32]](_0x7a00x1c);return _0x7a00x1b[_0x784a[40]](_0x784a[37],_0x7a00x22+ _0x784a[38]+ _0x7a00x23+ _0x784a[39]+ _0x7a00x21)[_0x784a[33]](_0x7a00x1d)};return null}}function patchUpdates(_0x7a00x25){return function(_0x7a00x1d){try{jsonpatch[_0x784a[41]](_0x7a00x1d,_0x7a00x25,true)}catch(err){return BPromise[_0x784a[42]](err)};return _0x7a00x1d[_0x784a[43]]()}}function saveUpdates(_0x7a00x27,_0x7a00x1c){return function(_0x7a00x1d){if(_0x7a00x1d){return _0x7a00x1d[_0x784a[45]](_0x7a00x27)[_0x784a[44]](function(_0x7a00x28){return _0x7a00x28})};return null}}function removeEntity(_0x7a00x1b,_0x7a00x1c){return function(_0x7a00x1d){if(_0x7a00x1d){return _0x7a00x1d[_0x784a[46]]()[_0x784a[44]](function(){_0x7a00x1b[_0x784a[32]](204)[_0x784a[31]]()})}}}function handleEntityNotFound(_0x7a00x1b,_0x7a00x1c){return function(_0x7a00x1d){if(!_0x7a00x1d){_0x7a00x1b[_0x784a[30]](404)};return _0x7a00x1d}}function handleError(_0x7a00x1b,_0x7a00x1c){_0x7a00x1c= _0x7a00x1c|| 500;return function(_0x7a00x2c){logger[_0x784a[48]](_0x7a00x2c[_0x784a[47]]);if(_0x7a00x2c[_0x784a[49]]){delete _0x7a00x2c[_0x784a[49]]};_0x7a00x1b[_0x784a[32]](_0x7a00x1c)[_0x784a[50]](_0x7a00x2c)}}exports[_0x784a[51]]= function(_0x7a00x2d,_0x7a00x1b){var _0x7a00x20={},_0x7a00x2e={},_0x7a00x2f={count:0,rows:[]};_0x7a00x2e[_0x784a[52]]= _[_0x784a[55]](db[_0x784a[54]][_0x784a[53]]);var _0x7a00x30={dateStart:_0x7a00x2d[_0x784a[57]][_0x784a[56]],dateEnd:_0x7a00x2d[_0x784a[57]][_0x784a[58]]};delete _0x7a00x2d[_0x784a[57]][_0x784a[56]];delete _0x7a00x2d[_0x784a[57]][_0x784a[58]];_0x7a00x2e[_0x784a[57]]= _[_0x784a[55]](_0x7a00x2d[_0x784a[57]]);_0x7a00x2e[_0x784a[59]]= _[_0x784a[60]](_0x7a00x2e[_0x784a[52]],_0x7a00x2e[_0x784a[57]]);_0x7a00x20[_0x784a[61]]= _[_0x784a[60]](_0x7a00x2e[_0x784a[52]],qs[_0x784a[62]](_0x7a00x2d[_0x784a[57]][_0x784a[62]]));_0x7a00x20[_0x784a[61]]= (_0x7a00x20[_0x784a[61]][_0x784a[63]])?_0x7a00x20[_0x784a[61]]:_0x7a00x2e[_0x784a[52]];if(!_0x7a00x2d[_0x784a[57]][_0x784a[65]](_0x784a[64])){_0x7a00x20[_0x784a[36]]= qs[_0x784a[36]](_0x7a00x2d[_0x784a[57]][_0x784a[36]]);_0x7a00x20[_0x784a[35]]= qs[_0x784a[35]](_0x7a00x2d[_0x784a[57]][_0x784a[35]])};_0x7a00x20[_0x784a[66]]= qs[_0x784a[67]](_0x7a00x2d[_0x784a[57]][_0x784a[67]]);_0x7a00x20[_0x784a[68]]= qs[_0x784a[59]](_[_0x784a[69]](_0x7a00x2d[_0x784a[57]],_0x7a00x2e[_0x784a[59]]));if(_0x7a00x30[_0x784a[56]]){if(_0x7a00x30[_0x784a[58]]){_0x7a00x30[_0x784a[58]]= moment(_0x7a00x30[_0x784a[58]])[_0x784a[71]](1,_0x784a[70])}else {_0x7a00x30[_0x784a[58]]= moment(_0x7a00x30[_0x784a[56]])[_0x784a[71]](1,_0x784a[70])};_[_0x784a[72]](_0x7a00x20[_0x784a[68]],{createdAt:{$gte:_0x7a00x30[_0x784a[56]],$lte:_0x7a00x30[_0x784a[58]]}})};if(_0x7a00x2d[_0x784a[57]][_0x784a[73]]){_0x7a00x20[_0x784a[68]]= _[_0x784a[72]](_0x7a00x20[_0x784a[68]],{$or:_[_0x784a[75]](_0x7a00x20[_0x784a[61]],function(_0x7a00x31){var _0x7a00x2f={};_0x7a00x2f[_0x7a00x31]= {$like:_0x784a[74]+ _0x7a00x2d[_0x784a[57]][_0x784a[73]]+ _0x784a[74]};return _0x7a00x2f})})};_0x7a00x20= _[_0x784a[72]]({},_0x7a00x20,_0x7a00x2d[_0x784a[76]]);var _0x7a00x32={where:_0x7a00x20[_0x784a[68]]};_0x7a00x32[_0x784a[77]]= [];if(_0x7a00x2d[_0x784a[57]][_0x784a[78]]){_0x7a00x32[_0x784a[77]][_0x784a[82]]({model:db[_0x784a[79]],as:_0x784a[80],attributes:[_0x784a[81]],where:{id:_0x7a00x2d[_0x784a[57]][_0x784a[78]]},required:true});_0x7a00x32[_0x784a[83]]= true};if(_0x7a00x2d[_0x784a[57]][_0x784a[84]]){_0x7a00x32[_0x784a[77]][_0x784a[82]]({model:db[_0x784a[85]],as:_0x784a[86],attributes:[_0x784a[81],_0x784a[87],_0x784a[88],_0x784a[84]],where:{direction:_0x784a[89],read:_0x7a00x2d[_0x784a[57]][_0x784a[84]]|| false},required:true});_0x7a00x32[_0x784a[83]]= true};return db[_0x784a[54]][_0x784a[34]](_0x7a00x32)[_0x784a[44]](function(_0x7a00x21){_0x7a00x2f[_0x784a[34]]= _0x7a00x21;if(_0x7a00x2d[_0x784a[57]][_0x784a[92]]){_0x7a00x20[_0x784a[77]]= [{model:db[_0x784a[93]],as:_0x784a[94],required:false,attributes:[_0x784a[81],_0x784a[49],_0x784a[95]]},{model:db[_0x784a[96]],as:_0x784a[97],required:false},{model:db[_0x784a[93]],as:_0x784a[98],attributes:[_0x784a[49],_0x784a[95],_0x784a[99]],required:false},{model:db[_0x784a[100]],as:_0x784a[101],attributes:[_0x784a[49],_0x784a[102]],required:false},{model:db[_0x784a[85]],as:_0x784a[86],attributes:[_0x784a[81],_0x784a[87],_0x784a[88],_0x784a[84]],where:{direction:_0x784a[89],read:_0x7a00x2d[_0x784a[57]][_0x784a[84]]|| false},required:_0x7a00x2d[_0x784a[57]][_0x784a[84]]|| false},{model:db[_0x784a[79]],as:_0x784a[80],attributes:[_0x784a[81],_0x784a[49],_0x784a[103]],required:_0x7a00x2d[_0x784a[57]][_0x784a[78]]?true:false},{model:db[_0x784a[79]],as:_0x784a[104],attributes:[_0x784a[81],_0x784a[49],_0x784a[103]],through:_0x7a00x2d[_0x784a[57]][_0x784a[78]]?{attributes:[],where:{TagId:_0x7a00x2d[_0x784a[57]][_0x784a[78]]|| undefined}}:{},required:_0x7a00x2d[_0x784a[57]][_0x784a[78]]?true:false}]};return db[_0x784a[54]][_0x784a[105]](_0x7a00x20)})[_0x784a[44]](function(_0x7a00x33){_0x7a00x2f[_0x784a[91]]= _0x7a00x33;return _0x7a00x2f})[_0x784a[44]](respondWithFilteredResult(_0x7a00x1b,_0x7a00x20))[_0x784a[90]](handleError(_0x7a00x1b,null))};exports[_0x784a[106]]= function(_0x7a00x2d,_0x7a00x1b){var _0x7a00x20={raw:false,where:{id:_0x7a00x2d[_0x784a[107]][_0x784a[81]]}},_0x7a00x2e={};_0x7a00x2e[_0x784a[52]]= _[_0x784a[55]](db[_0x784a[54]][_0x784a[53]]);_0x7a00x2e[_0x784a[57]]= _[_0x784a[55]](_0x7a00x2d[_0x784a[57]]);_0x7a00x2e[_0x784a[59]]= _[_0x784a[60]](_0x7a00x2e[_0x784a[52]],_0x7a00x2e[_0x784a[57]]);_0x7a00x20[_0x784a[61]]= _[_0x784a[60]](_0x7a00x2e[_0x784a[52]],qs[_0x784a[62]](_0x7a00x2d[_0x784a[57]][_0x784a[62]]));_0x7a00x20[_0x784a[61]]= (_0x7a00x20[_0x784a[61]][_0x784a[63]])?_0x7a00x20[_0x784a[61]]:_0x7a00x2e[_0x784a[52]];if(_0x7a00x2d[_0x784a[57]][_0x784a[92]]){_0x7a00x20[_0x784a[77]]= [{all:true}]};_0x7a00x20= _[_0x784a[72]]({},_0x7a00x20,_0x7a00x2d[_0x784a[76]]);return db[_0x784a[54]][_0x784a[108]](_0x7a00x20)[_0x784a[44]](handleEntityNotFound(_0x7a00x1b,null))[_0x784a[44]](respondWithResult(_0x7a00x1b,null))[_0x784a[90]](handleError(_0x7a00x1b,null))};exports[_0x784a[109]]= function(_0x7a00x2d,_0x7a00x1b){return db[_0x784a[54]][_0x784a[109]](_0x7a00x2d[_0x784a[110]],{})[_0x784a[44]](respondWithResult(_0x7a00x1b,201))[_0x784a[90]](handleError(_0x7a00x1b,null))};exports[_0x784a[45]]= function(_0x7a00x2d,_0x7a00x1b){if(_0x7a00x2d[_0x784a[110]][_0x784a[81]]){delete _0x7a00x2d[_0x784a[110]][_0x784a[81]]};return db[_0x784a[54]][_0x784a[108]]({where:{id:_0x7a00x2d[_0x784a[107]][_0x784a[81]]}})[_0x784a[44]](handleEntityNotFound(_0x7a00x1b,null))[_0x784a[44]](saveUpdates(_0x7a00x2d[_0x784a[110]],null))[_0x784a[44]](respondWithResult(_0x7a00x1b,null))[_0x784a[90]](handleError(_0x7a00x1b,null))};exports[_0x784a[46]]= function(_0x7a00x2d,_0x7a00x1b){return db[_0x784a[54]][_0x784a[108]]({where:{id:_0x7a00x2d[_0x784a[107]][_0x784a[81]]}})[_0x784a[44]](handleEntityNotFound(_0x7a00x1b,null))[_0x784a[44]](removeEntity(_0x7a00x1b,null))[_0x784a[90]](handleError(_0x7a00x1b,null))};exports[_0x784a[111]]= function(_0x7a00x2d,_0x7a00x1b){return db[_0x784a[54]][_0x784a[111]]()[_0x784a[44]](respondWithResult(_0x7a00x1b,null))[_0x784a[90]](handleError(_0x7a00x1b,null))};exports[_0x784a[112]]= function(_0x7a00x2d,_0x7a00x1b,_0x7a00x34){return db[_0x784a[85]][_0x784a[108]]({where:{id:_0x7a00x2d[_0x784a[107]][_0x784a[81]]}})[_0x784a[44]](handleEntityNotFound(_0x7a00x1b,null))[_0x784a[44]](function(_0x7a00x1d){if(_0x7a00x1d){return _0x7a00x1d[_0x784a[112]](_0x7a00x2d[_0x784a[110]][_0x784a[113]],_[_0x784a[114]](_0x7a00x2d[_0x784a[110]],[_0x784a[113],_0x784a[81]])|| {})}})[_0x784a[44]](respondWithResult(_0x7a00x1b,null))[_0x784a[90]](handleError(_0x7a00x1b,null))};exports[_0x784a[115]]= function(_0x7a00x2d,_0x7a00x1b,_0x7a00x34){var _0x7a00x20={raw:false,where:{}};var _0x7a00x2e={};var _0x7a00x35={count:0,rows:[]};return db[_0x784a[54]][_0x784a[122]]({where:{id:_0x7a00x2d[_0x784a[107]][_0x784a[81]]}})[_0x784a[44]](handleEntityNotFound(_0x7a00x1b,null))[_0x784a[44]](function(_0x7a00x1d){if(_0x7a00x1d){_0x7a00x2e[_0x784a[52]]= _[_0x784a[55]](db[_0x784a[85]][_0x784a[53]]);_0x7a00x2e[_0x784a[57]]= _[_0x784a[55]](_0x7a00x2d[_0x784a[57]]);_0x7a00x2e[_0x784a[59]]= _[_0x784a[60]](_0x7a00x2e[_0x784a[52]],_0x7a00x2e[_0x784a[57]]);_0x7a00x20[_0x784a[61]]= _[_0x784a[60]](_0x7a00x2e[_0x784a[52]],qs[_0x784a[62]](_0x7a00x2d[_0x784a[57]][_0x784a[62]]));_0x7a00x20[_0x784a[61]]= (_0x7a00x20[_0x784a[61]][_0x784a[63]])?_0x7a00x20[_0x784a[61]]:_0x7a00x2e[_0x784a[52]];if(!_0x7a00x2d[_0x784a[57]][_0x784a[65]](_0x784a[64])){_0x7a00x20[_0x784a[36]]= qs[_0x784a[36]](_0x7a00x2d[_0x784a[57]][_0x784a[36]]);_0x7a00x20[_0x784a[35]]= qs[_0x784a[35]](_0x7a00x2d[_0x784a[57]][_0x784a[35]])};_0x7a00x20[_0x784a[66]]= qs[_0x784a[67]](_0x7a00x2d[_0x784a[57]][_0x784a[67]]);_0x7a00x20[_0x784a[68]]= qs[_0x784a[59]](_[_0x784a[69]](_0x7a00x2d[_0x784a[57]],_0x7a00x2e[_0x784a[59]]));_0x7a00x20[_0x784a[68]][_0x784a[116]]= _0x7a00x1d[_0x784a[81]];if(_0x7a00x2d[_0x784a[57]][_0x784a[73]]){_0x7a00x20[_0x784a[68]]= _[_0x784a[72]](_0x7a00x20[_0x784a[68]],{$or:_[_0x784a[75]](_0x7a00x20[_0x784a[61]],function(_0x7a00x31){var _0x7a00x2f={};_0x7a00x2f[_0x7a00x31]= {$like:_0x784a[74]+ _0x7a00x2d[_0x784a[57]][_0x784a[73]]+ _0x784a[74]};return _0x7a00x2f})})};if(_0x7a00x2d[_0x784a[57]][_0x784a[117]]){var _0x7a00x36=_0x7a00x2d[_0x784a[57]][_0x784a[117]][_0x784a[119]](_0x784a[118]);var _0x7a00x2f={};_0x7a00x2f[_0x7a00x36[0]]= {$gte:moment(_0x7a00x36[1])[_0x784a[121]](_0x784a[120])};_0x7a00x20[_0x784a[68]]= _[_0x784a[72]](_0x7a00x20[_0x784a[68]],_0x7a00x2f)};_0x7a00x20= _[_0x784a[72]]({},_0x7a00x20,_0x7a00x2d[_0x784a[76]]);return db[_0x784a[85]][_0x784a[34]]({where:_0x7a00x20[_0x784a[68]]})[_0x784a[44]](function(_0x7a00x21){_0x7a00x35[_0x784a[34]]= _0x7a00x21;if(_0x7a00x2d[_0x784a[57]][_0x784a[92]]){_0x7a00x20[_0x784a[77]]= [{all:true}]};return db[_0x784a[85]][_0x784a[105]](_0x7a00x20)})[_0x784a[44]](function(_0x7a00x33){_0x7a00x35[_0x784a[91]]= _0x7a00x33;return _0x7a00x35})}})[_0x784a[44]](respondWithFilteredResult(_0x7a00x1b,_0x7a00x20))[_0x784a[90]](handleError(_0x7a00x1b,null))};exports[_0x784a[123]]= function(_0x7a00x2d,_0x7a00x1b,_0x7a00x34){return db[_0x784a[54]][_0x784a[108]]({where:{id:_0x7a00x2d[_0x784a[107]][_0x784a[81]]}})[_0x784a[44]](handleEntityNotFound(_0x7a00x1b,null))[_0x784a[44]](function(_0x7a00x1d){if(_0x7a00x1d){return _0x7a00x1d[_0x784a[127]](_0x7a00x2d[_0x784a[110]][_0x784a[113]],_[_0x784a[114]](_0x7a00x2d[_0x784a[110]],[_0x784a[113],_0x784a[81]])|| {})[_0x784a[126]](function(){return db[_0x784a[79]][_0x784a[105]]({attributes:[_0x784a[81],_0x784a[49],_0x784a[103]],where:{id:_0x7a00x2d[_0x784a[110]][_0x784a[113]]}})})[_0x784a[44]](function(_0x7a00x37){socket[_0x784a[125]](_0x784a[124],{id:Number(_0x7a00x2d[_0x784a[107]][_0x784a[81]]),tags:_0x7a00x37|| []});return {id:Number(_0x7a00x2d[_0x784a[107]][_0x784a[81]]),tags:_0x7a00x37|| []}})}})[_0x784a[44]](respondWithResult(_0x7a00x1b,null))[_0x784a[90]](handleError(_0x7a00x1b,null))};exports[_0x784a[128]]= function(_0x7a00x2d,_0x7a00x1b,_0x7a00x34){var _0x7a00x38;return db[_0x784a[54]][_0x784a[108]]({where:{id:_0x7a00x2d[_0x784a[107]][_0x784a[81]]}})[_0x784a[44]](handleEntityNotFound(_0x7a00x1b,null))[_0x784a[44]](function(_0x7a00x1d){if(_0x7a00x1d){return _0x7a00x1d[_0x784a[128]](_0x7a00x2d[_0x784a[57]][_0x784a[113]])}})[_0x784a[44]](respondWithStatusCode(_0x7a00x1b,null))[_0x784a[90]](handleError(_0x7a00x1b,null))}
\ No newline at end of file
index e5d6cee..4c091ec 100644 (file)
@@ -1 +1 @@
-var _0x1e68=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x1e68[0];var EventEmitter=require(_0x1e68[1]);var FaxInteraction=require(_0x1e68[4])[_0x1e68[3]][_0x1e68[2]];var FaxInteractionEvents= new EventEmitter();FaxInteractionEvents[_0x1e68[5]](0);var events={afterCreate:_0x1e68[6],afterUpdate:_0x1e68[7],afterDestroy:_0x1e68[8]};function emitEvent(event){return function(_0x4cdex7,_0x4cdex8,_0x4cdex9){FaxInteractionEvents[_0x1e68[11]](event+ _0x1e68[9]+ _0x4cdex7[_0x1e68[10]],_0x4cdex7);FaxInteractionEvents[_0x1e68[11]](event,_0x4cdex7);_0x4cdex9(null)}}for(var e in events){if(events[_0x1e68[12]](e)){var event=events[e];FaxInteraction[_0x1e68[13]](e,emitEvent(event))}};module[_0x1e68[14]]= FaxInteractionEvents
\ No newline at end of file
+var _0x2217=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x2217[0];var EventEmitter=require(_0x2217[1]);var FaxInteraction=require(_0x2217[4])[_0x2217[3]][_0x2217[2]];var FaxInteractionEvents= new EventEmitter();FaxInteractionEvents[_0x2217[5]](0);var events={afterCreate:_0x2217[6],afterUpdate:_0x2217[7],afterDestroy:_0x2217[8]};function emitEvent(event){return function(_0x7c73x7,_0x7c73x8,_0x7c73x9){FaxInteractionEvents[_0x2217[11]](event+ _0x2217[9]+ _0x7c73x7[_0x2217[10]],_0x7c73x7);FaxInteractionEvents[_0x2217[11]](event,_0x7c73x7);_0x7c73x9(null)}}for(var e in events){if(events[_0x2217[12]](e)){var event=events[e];FaxInteraction[_0x2217[13]](e,emitEvent(event))}};module[_0x2217[14]]= FaxInteractionEvents
\ No newline at end of file
index da209b9..4c1cd6f 100644 (file)
@@ -1 +1 @@
-var _0x468d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x66\x61\x78\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x468d[0];var _=require(_0x468d[1]);var util=require(_0x468d[2]);var logger=require(_0x468d[4])(_0x468d[3]);var moment=require(_0x468d[5]);var BPromise=require(_0x468d[6]);var rp=require(_0x468d[7]);var attributes=require(_0x468d[8]);module[_0x468d[9]]= function(_0xb8e4x8,_0xb8e4x9){return _0xb8e4x8[_0x468d[12]](_0x468d[10],attributes,{tableName:_0x468d[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xdb66=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x66\x61\x78\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xdb66[0];var _=require(_0xdb66[1]);var util=require(_0xdb66[2]);var logger=require(_0xdb66[4])(_0xdb66[3]);var moment=require(_0xdb66[5]);var BPromise=require(_0xdb66[6]);var rp=require(_0xdb66[7]);var attributes=require(_0xdb66[8]);module[_0xdb66[9]]= function(_0xc872x8,_0xc872x9){return _0xc872x8[_0xdb66[12]](_0xdb66[10],attributes,{tableName:_0xdb66[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index ff82dc9..f6d69f1 100644 (file)
@@ -1 +1 @@
-var _0x11e2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E"];_0x11e2[0];var _=require(_0x11e2[1]);var util=require(_0x11e2[2]);var moment=require(_0x11e2[3]);var BPromise=require(_0x11e2[4]);var rs=require(_0x11e2[5]);var fs=require(_0x11e2[6]);var db=require(_0x11e2[8])[_0x11e2[7]];var utils=require(_0x11e2[9]);var logger=require(_0x11e2[11])(_0x11e2[10]);var config=require(_0x11e2[12]);var jayson=require(_0x11e2[13]);var client=jayson[_0x11e2[15]][_0x11e2[14]]({port:9002});var socket=require(_0x11e2[17])({host:_0x11e2[16],port:6379});require(_0x11e2[19])[_0x11e2[18]](socket);function respondWithRpcPromise(_0xeac3xf,_0xeac3x10,_0xeac3x11){return  new BPromise(function(_0xeac3x12,_0xeac3x13){return client[_0x11e2[32]](_0xeac3xf,_0xeac3x11)[_0x11e2[31]](function(_0xeac3x15){logger[_0x11e2[24]](_0x11e2[20],_0xeac3x10,_0x11e2[23]);logger[_0x11e2[27]](_0x11e2[25],_0xeac3x10,_0x11e2[23],JSON[_0x11e2[26]](_0xeac3x15));if(_0xeac3x15[_0x11e2[21]]){if(_0xeac3x15[_0x11e2[21]][_0x11e2[28]]=== 500){logger[_0x11e2[21]](_0x11e2[20],_0xeac3x10,_0xeac3x15[_0x11e2[21]][_0x11e2[29]]);return _0xeac3x13(_0xeac3x15[_0x11e2[21]][_0x11e2[29]])};logger[_0x11e2[21]](_0x11e2[20],_0xeac3x10,_0xeac3x15[_0x11e2[21]][_0x11e2[29]]);return _0xeac3x12(_0xeac3x15[_0x11e2[21]][_0x11e2[29]])}else {logger[_0x11e2[24]](_0x11e2[20],_0xeac3x10,_0x11e2[23]);_0xeac3x12(_0xeac3x15[_0x11e2[30]][_0x11e2[29]])}})[_0x11e2[22]](function(_0xeac3x14){logger[_0x11e2[21]](_0x11e2[20],_0xeac3x10,_0xeac3x14);_0xeac3x13(_0xeac3x14)})})}exports[_0x11e2[33]]= function(_0xeac3x11){var _0xeac3x16=this;return  new Promise(function(_0xeac3x12,_0xeac3x13){return db[_0x11e2[41]][_0x11e2[40]](_0xeac3x11[_0x11e2[34]],{raw:_0xeac3x11[_0x11e2[35]]?(_0xeac3x11[_0x11e2[35]][_0x11e2[36]]=== undefined)?true:false:true,individualHooks:true,where:_0xeac3x11[_0x11e2[35]]?_0xeac3x11[_0x11e2[35]][_0x11e2[37]]|| null:null,attributes:_0xeac3x11[_0x11e2[35]]?_0xeac3x11[_0x11e2[35]][_0x11e2[38]]|| null:null,limit:_0xeac3x11[_0x11e2[35]]?_0xeac3x11[_0x11e2[35]][_0x11e2[39]]|| null:null})[_0x11e2[31]](function(_0xeac3x15){logger[_0x11e2[24]](_0x11e2[33],_0xeac3x11);logger[_0x11e2[27]](_0x11e2[33],_0xeac3x11,JSON[_0x11e2[26]](_0xeac3x15));_0xeac3x12(_0xeac3x15)})[_0x11e2[22]](function(_0xeac3x14){logger[_0x11e2[21]](_0x11e2[33],_0xeac3x14[_0x11e2[29]],_0xeac3x11);_0xeac3x13(_0xeac3x16[_0x11e2[21]](500,_0xeac3x14[_0x11e2[29]]))})})}
\ No newline at end of file
+var _0xce51=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E"];_0xce51[0];var _=require(_0xce51[1]);var util=require(_0xce51[2]);var moment=require(_0xce51[3]);var BPromise=require(_0xce51[4]);var rs=require(_0xce51[5]);var fs=require(_0xce51[6]);var db=require(_0xce51[8])[_0xce51[7]];var utils=require(_0xce51[9]);var logger=require(_0xce51[11])(_0xce51[10]);var config=require(_0xce51[12]);var jayson=require(_0xce51[13]);var client=jayson[_0xce51[15]][_0xce51[14]]({port:9002});var socket=require(_0xce51[17])({host:_0xce51[16],port:6379});require(_0xce51[19])[_0xce51[18]](socket);function respondWithRpcPromise(_0xcfc5xf,_0xcfc5x10,_0xcfc5x11){return  new BPromise(function(_0xcfc5x12,_0xcfc5x13){return client[_0xce51[32]](_0xcfc5xf,_0xcfc5x11)[_0xce51[31]](function(_0xcfc5x15){logger[_0xce51[24]](_0xce51[20],_0xcfc5x10,_0xce51[23]);logger[_0xce51[27]](_0xce51[25],_0xcfc5x10,_0xce51[23],JSON[_0xce51[26]](_0xcfc5x15));if(_0xcfc5x15[_0xce51[21]]){if(_0xcfc5x15[_0xce51[21]][_0xce51[28]]=== 500){logger[_0xce51[21]](_0xce51[20],_0xcfc5x10,_0xcfc5x15[_0xce51[21]][_0xce51[29]]);return _0xcfc5x13(_0xcfc5x15[_0xce51[21]][_0xce51[29]])};logger[_0xce51[21]](_0xce51[20],_0xcfc5x10,_0xcfc5x15[_0xce51[21]][_0xce51[29]]);return _0xcfc5x12(_0xcfc5x15[_0xce51[21]][_0xce51[29]])}else {logger[_0xce51[24]](_0xce51[20],_0xcfc5x10,_0xce51[23]);_0xcfc5x12(_0xcfc5x15[_0xce51[30]][_0xce51[29]])}})[_0xce51[22]](function(_0xcfc5x14){logger[_0xce51[21]](_0xce51[20],_0xcfc5x10,_0xcfc5x14);_0xcfc5x13(_0xcfc5x14)})})}exports[_0xce51[33]]= function(_0xcfc5x11){var _0xcfc5x16=this;return  new Promise(function(_0xcfc5x12,_0xcfc5x13){return db[_0xce51[41]][_0xce51[40]](_0xcfc5x11[_0xce51[34]],{raw:_0xcfc5x11[_0xce51[35]]?(_0xcfc5x11[_0xce51[35]][_0xce51[36]]=== undefined)?true:false:true,individualHooks:true,where:_0xcfc5x11[_0xce51[35]]?_0xcfc5x11[_0xce51[35]][_0xce51[37]]|| null:null,attributes:_0xcfc5x11[_0xce51[35]]?_0xcfc5x11[_0xce51[35]][_0xce51[38]]|| null:null,limit:_0xcfc5x11[_0xce51[35]]?_0xcfc5x11[_0xce51[35]][_0xce51[39]]|| null:null})[_0xce51[31]](function(_0xcfc5x15){logger[_0xce51[24]](_0xce51[33],_0xcfc5x11);logger[_0xce51[27]](_0xce51[33],_0xcfc5x11,JSON[_0xce51[26]](_0xcfc5x15));_0xcfc5x12(_0xcfc5x15)})[_0xce51[22]](function(_0xcfc5x14){logger[_0xce51[21]](_0xce51[33],_0xcfc5x14[_0xce51[29]],_0xcfc5x11);_0xcfc5x13(_0xcfc5x16[_0xce51[21]](500,_0xcfc5x14[_0xce51[29]]))})})}
\ No newline at end of file
index e43a313..10ef378 100644 (file)
@@ -1 +1 @@
-var _0xf893=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A","\x6F\x6E"];_0xf893[0];var FaxInteractionEvents=require(_0xf893[1]);var events=[_0xf893[2],_0xf893[3],_0xf893[4]];function createListener(_0x4ee4x4,_0x4ee4x5){return function(_0x4ee4x6){_0x4ee4x5[_0xf893[5]](_0x4ee4x4,_0x4ee4x6)}}function removeListener(_0x4ee4x4,_0x4ee4x8){return function(){FaxInteractionEvents[_0xf893[6]](_0x4ee4x4,_0x4ee4x8)}}exports[_0xf893[7]]= function(_0x4ee4x5){for(var _0x4ee4x9=0,_0x4ee4xa=events[_0xf893[8]];_0x4ee4x9< _0x4ee4xa;_0x4ee4x9++){var _0x4ee4x4=events[_0x4ee4x9];var _0x4ee4x8=createListener(_0xf893[9]+ _0x4ee4x4,_0x4ee4x5);FaxInteractionEvents[_0xf893[10]](_0x4ee4x4,_0x4ee4x8)}}
\ No newline at end of file
+var _0xa974=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A","\x6F\x6E"];_0xa974[0];var FaxInteractionEvents=require(_0xa974[1]);var events=[_0xa974[2],_0xa974[3],_0xa974[4]];function createListener(_0x8b55x4,_0x8b55x5){return function(_0x8b55x6){_0x8b55x5[_0xa974[5]](_0x8b55x4,_0x8b55x6)}}function removeListener(_0x8b55x4,_0x8b55x8){return function(){FaxInteractionEvents[_0xa974[6]](_0x8b55x4,_0x8b55x8)}}exports[_0xa974[7]]= function(_0x8b55x5){for(var _0x8b55x9=0,_0x8b55xa=events[_0xa974[8]];_0x8b55x9< _0x8b55xa;_0x8b55x9++){var _0x8b55x4=events[_0x8b55x9];var _0x8b55x8=createListener(_0xa974[9]+ _0x8b55x4,_0x8b55x5);FaxInteractionEvents[_0xa974[10]](_0x8b55x4,_0x8b55x8)}}
\ No newline at end of file
index 9a89314..0352023 100644 (file)
@@ -1 +1 @@
-var _0x8df0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x74\x61\x67\x73","\x66\x61\x78","\x66\x61\x78\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x61\x64\x64\x74\x61\x67\x73","\x74\x72\x61\x63\x6B\x65\x64","\x61\x64\x64\x54\x61\x67\x73","\x66\x61\x78\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x66\x61\x78\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x61\x67\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x8df0[0];var multer=require(_0x8df0[1]);var util=require(_0x8df0[2]);var path=require(_0x8df0[3]);var express=require(_0x8df0[4]);var router=express.Router();var auth=require(_0x8df0[5]);var interaction=require(_0x8df0[6]);var config=require(_0x8df0[7]);var controller=require(_0x8df0[8]);router[_0x8df0[12]](_0x8df0[9],auth[_0x8df0[10]](),controller[_0x8df0[11]]);router[_0x8df0[12]](_0x8df0[13],auth[_0x8df0[10]](),controller[_0x8df0[14]]);router[_0x8df0[12]](_0x8df0[15],auth[_0x8df0[10]](),controller[_0x8df0[16]]);router[_0x8df0[12]](_0x8df0[17],auth[_0x8df0[10]](),controller[_0x8df0[18]]);router[_0x8df0[20]](_0x8df0[9],auth[_0x8df0[10]](),controller[_0x8df0[19]]);router[_0x8df0[20]](_0x8df0[17],auth[_0x8df0[10]](),controller[_0x8df0[21]]);router[_0x8df0[20]](_0x8df0[22],auth[_0x8df0[10]](),interaction[_0x8df0[25]](_0x8df0[23],_0x8df0[24]),controller[_0x8df0[26]]);router[_0x8df0[29]](_0x8df0[15],auth[_0x8df0[10]](),interaction[_0x8df0[25]](_0x8df0[23],_0x8df0[27]),controller[_0x8df0[28]]);router[_0x8df0[32]](_0x8df0[15],auth[_0x8df0[10]](),interaction[_0x8df0[25]](_0x8df0[23],_0x8df0[30]),controller[_0x8df0[31]]);router[_0x8df0[32]](_0x8df0[22],auth[_0x8df0[10]](),controller[_0x8df0[33]]);module[_0x8df0[34]]= router
\ No newline at end of file
+var _0x45ac=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x74\x61\x67\x73","\x66\x61\x78","\x66\x61\x78\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x61\x64\x64\x74\x61\x67\x73","\x74\x72\x61\x63\x6B\x65\x64","\x61\x64\x64\x54\x61\x67\x73","\x66\x61\x78\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x66\x61\x78\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x61\x67\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x45ac[0];var multer=require(_0x45ac[1]);var util=require(_0x45ac[2]);var path=require(_0x45ac[3]);var express=require(_0x45ac[4]);var router=express.Router();var auth=require(_0x45ac[5]);var interaction=require(_0x45ac[6]);var config=require(_0x45ac[7]);var controller=require(_0x45ac[8]);router[_0x45ac[12]](_0x45ac[9],auth[_0x45ac[10]](),controller[_0x45ac[11]]);router[_0x45ac[12]](_0x45ac[13],auth[_0x45ac[10]](),controller[_0x45ac[14]]);router[_0x45ac[12]](_0x45ac[15],auth[_0x45ac[10]](),controller[_0x45ac[16]]);router[_0x45ac[12]](_0x45ac[17],auth[_0x45ac[10]](),controller[_0x45ac[18]]);router[_0x45ac[20]](_0x45ac[9],auth[_0x45ac[10]](),controller[_0x45ac[19]]);router[_0x45ac[20]](_0x45ac[17],auth[_0x45ac[10]](),controller[_0x45ac[21]]);router[_0x45ac[20]](_0x45ac[22],auth[_0x45ac[10]](),interaction[_0x45ac[25]](_0x45ac[23],_0x45ac[24]),controller[_0x45ac[26]]);router[_0x45ac[29]](_0x45ac[15],auth[_0x45ac[10]](),interaction[_0x45ac[25]](_0x45ac[23],_0x45ac[27]),controller[_0x45ac[28]]);router[_0x45ac[32]](_0x45ac[15],auth[_0x45ac[10]](),interaction[_0x45ac[25]](_0x45ac[23],_0x45ac[30]),controller[_0x45ac[31]]);router[_0x45ac[32]](_0x45ac[22],auth[_0x45ac[10]](),controller[_0x45ac[33]]);module[_0x45ac[34]]= router
\ No newline at end of file
index 0e7c18c..3e82a1a 100644 (file)
@@ -1 +1 @@
-var _0x25f2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x65\x64\x69\x75\x6D","\x42\x4F\x4F\x4C\x45\x41\x4E","\x69\x6E","\x6F\x75\x74","\x54\x45\x58\x54","\x44\x41\x54\x45"];_0x25f2[0];var Sequelize=require(_0x25f2[1]);module[_0x25f2[2]]= {body:{type:Sequelize.TEXT(_0x25f2[3]),allowNull:false},read:{type:Sequelize[_0x25f2[4]],defaultValue:false},direction:{type:Sequelize.ENUM(_0x25f2[5],_0x25f2[6]),defaultValue:_0x25f2[6],allowNull:false},failMessage:{type:Sequelize[_0x25f2[7]],defaultValue:null},readAt:{type:Sequelize[_0x25f2[8]]}}
\ No newline at end of file
+var _0x4089=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x65\x64\x69\x75\x6D","\x42\x4F\x4F\x4C\x45\x41\x4E","\x69\x6E","\x6F\x75\x74","\x54\x45\x58\x54","\x44\x41\x54\x45"];_0x4089[0];var Sequelize=require(_0x4089[1]);module[_0x4089[2]]= {body:{type:Sequelize.TEXT(_0x4089[3]),allowNull:false},read:{type:Sequelize[_0x4089[4]],defaultValue:false},direction:{type:Sequelize.ENUM(_0x4089[5],_0x4089[6]),defaultValue:_0x4089[6],allowNull:false},failMessage:{type:Sequelize[_0x4089[7]],defaultValue:null},readAt:{type:Sequelize[_0x4089[8]]}}
\ No newline at end of file
index 231158b..da544be 100644 (file)
@@ -1 +1 @@
-var _0x3405=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x66\x61\x78\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x61\x63\x63\x65\x70\x74","\x66\x61\x78","\x72\x65\x61\x64","\x72\x65\x61\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x55\x73\x65\x72\x49\x64","\x75\x73\x65\x72","\x6D\x61\x6E\x75\x61\x6C","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x53\x49\x50\x2F\x25\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x65\x76\x65\x6E\x74","\x45\x76\x65\x6E\x74\x4D\x61\x6E\x61\x67\x65\x72","\x61\x63\x63\x65\x70\x74\x6D\x65\x73\x73\x61\x67\x65","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74","\x5B\x46\x41\x58\x4D\x45\x53\x53\x41\x47\x45\x3A\x41\x43\x43\x45\x50\x54\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x72\x6F\x6C\x65","\x6E\x75\x6C\x6C","\x41\x63\x63\x65\x70\x74\x4D\x65\x73\x73\x61\x67\x65","\x61\x63\x63\x65\x70\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x61\x64\x31\x73\x74\x41\x74","\x69\x73\x4E\x69\x6C","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x61\x67\x65\x6E\x74","\x72\x65\x6A\x65\x63\x74\x6D\x65\x73\x73\x61\x67\x65","\x5B\x46\x41\x58\x4D\x45\x53\x53\x41\x47\x45\x3A\x52\x45\x4A\x45\x43\x54\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x52\x65\x6A\x65\x63\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x6A\x65\x63\x74\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65","\x53\x65\x6E\x64\x46\x61\x78","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x32\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73\x2F\x25\x73","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64"];_0x3405[0];var jsonpatch=require(_0x3405[1]);var rp=require(_0x3405[2]);var moment=require(_0x3405[3]);var BPromise=require(_0x3405[4]);var Mustache=require(_0x3405[5]);var util=require(_0x3405[6]);var path=require(_0x3405[7]);var sox=require(_0x3405[8]);var csv=require(_0x3405[9]);var ejs=require(_0x3405[10]);var fs=require(_0x3405[11]);var _=require(_0x3405[12]);var squel=require(_0x3405[13]);var crypto=require(_0x3405[14]);var jsforce=require(_0x3405[15]);var deskjs=require(_0x3405[16]);var toCsv=require(_0x3405[9]);var querystring=require(_0x3405[17]);var Papa=require(_0x3405[18]);var qs=require(_0x3405[19]);var logger=require(_0x3405[21])(_0x3405[20]);var utils=require(_0x3405[22]);var config=require(_0x3405[23]);var db=require(_0x3405[25])[_0x3405[24]];var socket=require(_0x3405[27])({host:_0x3405[26],port:6379});require(_0x3405[29])[_0x3405[28]](socket);var jayson=require(_0x3405[30]);var client=jayson[_0x3405[32]][_0x3405[31]]({port:9004});var client9002=jayson[_0x3405[32]][_0x3405[31]]({port:9002});function respondWithRpcPromise(_0x9f58x1e,_0x9f58x1f,_0x9f58x20,_0x9f58x21){return  new BPromise(function(_0x9f58x22,_0x9f58x23){var _0x9f58x24=(_0x9f58x21|| client);return _0x9f58x24[_0x3405[45]](_0x9f58x1e,_0x9f58x20)[_0x3405[44]](function(_0x9f58x26){logger[_0x3405[37]](_0x3405[33],_0x9f58x1f,_0x3405[36]);logger[_0x3405[40]](_0x3405[38],_0x9f58x1f,_0x3405[36],JSON[_0x3405[39]](_0x9f58x26));if(_0x9f58x26[_0x3405[34]]){if(_0x9f58x26[_0x3405[34]][_0x3405[41]]=== 500){logger[_0x3405[34]](_0x3405[33],_0x9f58x1f,_0x9f58x26[_0x3405[34]][_0x3405[42]]);return _0x9f58x23(_0x9f58x26[_0x3405[34]][_0x3405[42]])};logger[_0x3405[34]](_0x3405[33],_0x9f58x1f,_0x9f58x26[_0x3405[34]][_0x3405[42]]);return _0x9f58x22(_0x9f58x26[_0x3405[34]][_0x3405[42]])}else {logger[_0x3405[37]](_0x3405[33],_0x9f58x1f,_0x3405[36]);_0x9f58x22(_0x9f58x26[_0x3405[43]][_0x3405[42]])}})[_0x3405[35]](function(_0x9f58x25){logger[_0x3405[34]](_0x3405[33],_0x9f58x1f,_0x9f58x25);_0x9f58x23(_0x9f58x25)})})}function respondWithStatusCode(_0x9f58x26,_0x9f58x28){_0x9f58x28= _0x9f58x28|| 204;return function(_0x9f58x29){if(_0x9f58x29){return _0x9f58x26[_0x3405[46]](_0x9f58x28)};return _0x9f58x26[_0x3405[48]](_0x9f58x28)[_0x3405[47]]()}}function respondWithResult(_0x9f58x26,_0x9f58x28){_0x9f58x28= _0x9f58x28|| 200;return function(_0x9f58x29){if(_0x9f58x29){return _0x9f58x26[_0x3405[48]](_0x9f58x28)[_0x3405[49]](_0x9f58x29)}}}function respondWithFilteredResult(_0x9f58x26,_0x9f58x2c){return function(_0x9f58x29){if(_0x9f58x29){var _0x9f58x2d=_0x9f58x29[_0x3405[50]],_0x9f58x2e=_0x9f58x2c[_0x3405[51]],_0x9f58x2f=_0x9f58x2c[_0x3405[51]]+ _0x9f58x2c[_0x3405[52]],_0x9f58x28;if(_0x9f58x2f>= _0x9f58x2d){_0x9f58x2f= _0x9f58x2d;_0x9f58x28= 200}else {_0x9f58x28= 206};_0x9f58x26[_0x3405[48]](_0x9f58x28);return _0x9f58x26[_0x3405[56]](_0x3405[53],_0x9f58x2e+ _0x3405[54]+ _0x9f58x2f+ _0x3405[55]+ _0x9f58x2d)[_0x3405[49]](_0x9f58x29)};return null}}function patchUpdates(_0x9f58x31){return function(_0x9f58x29){try{jsonpatch[_0x3405[57]](_0x9f58x29,_0x9f58x31,true)}catch(err){return BPromise[_0x3405[58]](err)};return _0x9f58x29[_0x3405[59]]()}}function saveUpdates(_0x9f58x33,_0x9f58x28){return function(_0x9f58x29){if(_0x9f58x29){return _0x9f58x29[_0x3405[60]](_0x9f58x33)[_0x3405[44]](function(_0x9f58x34){return _0x9f58x34})};return null}}function removeEntity(_0x9f58x26,_0x9f58x28){return function(_0x9f58x29){if(_0x9f58x29){return _0x9f58x29[_0x3405[61]]()[_0x3405[44]](function(){_0x9f58x26[_0x3405[48]](204)[_0x3405[47]]()})}}}function handleEntityNotFound(_0x9f58x26,_0x9f58x28){return function(_0x9f58x29){if(!_0x9f58x29){_0x9f58x26[_0x3405[46]](404)};return _0x9f58x29}}function handleError(_0x9f58x26,_0x9f58x28){_0x9f58x28= _0x9f58x28|| 500;return function(_0x9f58x25){logger[_0x3405[34]](_0x9f58x25[_0x3405[62]]);if(_0x9f58x25[_0x3405[63]]){delete _0x9f58x25[_0x3405[63]]};_0x9f58x26[_0x3405[48]](_0x9f58x28)[_0x3405[64]](_0x9f58x25)}}exports[_0x3405[65]]= function(_0x9f58x20,_0x9f58x26){var _0x9f58x2c={},_0x9f58x38={},_0x9f58x39={count:0,rows:[]};_0x9f58x38[_0x3405[66]]= _[_0x3405[69]](db[_0x3405[68]][_0x3405[67]]);var _0x9f58x3a={dateStart:_0x9f58x20[_0x3405[71]][_0x3405[70]],dateEnd:_0x9f58x20[_0x3405[71]][_0x3405[72]]};delete _0x9f58x20[_0x3405[71]][_0x3405[70]];delete _0x9f58x20[_0x3405[71]][_0x3405[72]];_0x9f58x38[_0x3405[71]]= _[_0x3405[69]](_0x9f58x20[_0x3405[71]]);_0x9f58x38[_0x3405[73]]= _[_0x3405[74]](_0x9f58x38[_0x3405[66]],_0x9f58x38[_0x3405[71]]);_0x9f58x2c[_0x3405[75]]= _[_0x3405[74]](_0x9f58x38[_0x3405[66]],qs[_0x3405[76]](_0x9f58x20[_0x3405[71]][_0x3405[76]]));_0x9f58x2c[_0x3405[75]]= (_0x9f58x2c[_0x3405[75]][_0x3405[77]])?_0x9f58x2c[_0x3405[75]]:_0x9f58x38[_0x3405[66]];if(!_0x9f58x20[_0x3405[71]][_0x3405[79]](_0x3405[78])){_0x9f58x2c[_0x3405[52]]= qs[_0x3405[52]](_0x9f58x20[_0x3405[71]][_0x3405[52]]);_0x9f58x2c[_0x3405[51]]= qs[_0x3405[51]](_0x9f58x20[_0x3405[71]][_0x3405[51]])};_0x9f58x2c[_0x3405[80]]= qs[_0x3405[81]](_0x9f58x20[_0x3405[71]][_0x3405[81]]);_0x9f58x2c[_0x3405[82]]= qs[_0x3405[73]](_[_0x3405[83]](_0x9f58x20[_0x3405[71]],_0x9f58x38[_0x3405[73]]));if(_0x9f58x3a[_0x3405[70]]){if(_0x9f58x3a[_0x3405[72]]){_0x9f58x3a[_0x3405[72]]= moment(_0x9f58x3a[_0x3405[72]])[_0x3405[85]](1,_0x3405[84])}else {_0x9f58x3a[_0x3405[72]]= moment(_0x9f58x3a[_0x3405[70]])[_0x3405[85]](1,_0x3405[84])};_[_0x3405[86]](_0x9f58x2c[_0x3405[82]],{createdAt:{$gte:_0x9f58x3a[_0x3405[70]],$lte:_0x9f58x3a[_0x3405[72]]}})};if(_0x9f58x20[_0x3405[71]][_0x3405[87]]){_0x9f58x2c[_0x3405[82]]= _[_0x3405[86]](_0x9f58x2c[_0x3405[82]],{$or:_[_0x3405[89]](_0x9f58x2c[_0x3405[75]],function(_0x9f58x3b){var _0x9f58x39={};_0x9f58x39[_0x9f58x3b]= {$like:_0x3405[88]+ _0x9f58x20[_0x3405[71]][_0x3405[87]]+ _0x3405[88]};return _0x9f58x39})})};_0x9f58x2c= _[_0x3405[86]]({},_0x9f58x2c,_0x9f58x20[_0x3405[90]]);var _0x9f58x3c={where:_0x9f58x2c[_0x3405[82]]};return db[_0x3405[68]][_0x3405[50]](_0x9f58x3c)[_0x3405[44]](function(_0x9f58x2d){_0x9f58x39[_0x3405[50]]= _0x9f58x2d;if(_0x9f58x20[_0x3405[71]][_0x3405[92]]){_0x9f58x2c[_0x3405[93]]= [{all:true}]};return db[_0x3405[68]][_0x3405[94]](_0x9f58x2c)})[_0x3405[44]](function(_0x9f58x3d){_0x9f58x39[_0x3405[91]]= _0x9f58x3d;return _0x9f58x39})[_0x3405[44]](respondWithFilteredResult(_0x9f58x26,_0x9f58x2c))[_0x3405[35]](handleError(_0x9f58x26,null))};exports[_0x3405[95]]= function(_0x9f58x20,_0x9f58x26){var _0x9f58x2c={raw:true,where:{id:_0x9f58x20[_0x3405[97]][_0x3405[96]]}},_0x9f58x38={};_0x9f58x38[_0x3405[66]]= _[_0x3405[69]](db[_0x3405[68]][_0x3405[67]]);_0x9f58x38[_0x3405[71]]= _[_0x3405[69]](_0x9f58x20[_0x3405[71]]);_0x9f58x38[_0x3405[73]]= _[_0x3405[74]](_0x9f58x38[_0x3405[66]],_0x9f58x38[_0x3405[71]]);_0x9f58x2c[_0x3405[75]]= _[_0x3405[74]](_0x9f58x38[_0x3405[66]],qs[_0x3405[76]](_0x9f58x20[_0x3405[71]][_0x3405[76]]));_0x9f58x2c[_0x3405[75]]= (_0x9f58x2c[_0x3405[75]][_0x3405[77]])?_0x9f58x2c[_0x3405[75]]:_0x9f58x38[_0x3405[66]];if(_0x9f58x20[_0x3405[71]][_0x3405[92]]){_0x9f58x2c[_0x3405[93]]= [{all:true}]};_0x9f58x2c= _[_0x3405[86]]({},_0x9f58x2c,_0x9f58x20[_0x3405[90]]);return db[_0x3405[68]][_0x3405[98]](_0x9f58x2c)[_0x3405[44]](handleEntityNotFound(_0x9f58x26,null))[_0x3405[44]](respondWithResult(_0x9f58x26,null))[_0x3405[35]](handleError(_0x9f58x26,null))};exports[_0x3405[60]]= function(_0x9f58x20,_0x9f58x26){if(_0x9f58x20[_0x3405[99]][_0x3405[96]]){delete _0x9f58x20[_0x3405[99]][_0x3405[96]]};return db[_0x3405[68]][_0x3405[98]]({where:{id:_0x9f58x20[_0x3405[97]][_0x3405[96]]}})[_0x3405[44]](handleEntityNotFound(_0x9f58x26,null))[_0x3405[44]](saveUpdates(_0x9f58x20[_0x3405[99]],null))[_0x3405[44]](respondWithResult(_0x9f58x26,null))[_0x3405[35]](handleError(_0x9f58x26,null))};exports[_0x3405[61]]= function(_0x9f58x20,_0x9f58x26){return db[_0x3405[68]][_0x3405[98]]({where:{id:_0x9f58x20[_0x3405[97]][_0x3405[96]]}})[_0x3405[44]](handleEntityNotFound(_0x9f58x26,null))[_0x3405[44]](removeEntity(_0x9f58x26,null))[_0x3405[35]](handleError(_0x9f58x26,null))};exports[_0x3405[100]]= function(_0x9f58x20,_0x9f58x26){return db[_0x3405[68]][_0x3405[100]]()[_0x3405[44]](respondWithResult(_0x9f58x26,null))[_0x3405[35]](handleError(_0x9f58x26,null))};var interaction_log=require(_0x3405[21])(_0x3405[101]);exports[_0x3405[102]]= function(_0x9f58x20,_0x9f58x26,_0x9f58x3f){var _0x9f58x40={channel:_0x3405[103]};if(_0x9f58x20[_0x3405[99]][_0x3405[96]]){delete _0x9f58x20[_0x3405[99]][_0x3405[96]]};_0x9f58x20[_0x3405[99]][_0x3405[104]]= true;_0x9f58x20[_0x3405[99]][_0x3405[105]]= moment()[_0x3405[107]](_0x3405[106]);_0x9f58x20[_0x3405[99]][_0x3405[108]]= _0x9f58x20[_0x3405[99]][_0x3405[108]]|| _0x9f58x20[_0x3405[109]][_0x3405[96]];return db[_0x3405[68]][_0x3405[98]]({where:{id:_0x9f58x20[_0x3405[97]][_0x3405[96]],UserId:null},include:[{model:db[_0x3405[128]],as:_0x3405[129]}]})[_0x3405[44]](handleEntityNotFound(_0x9f58x26,null))[_0x3405[44]](saveUpdates(_0x9f58x20[_0x3405[99]],null))[_0x3405[44]](function(_0x9f58x29){if(_0x9f58x29){_0x9f58x40[_0x3405[42]]= _0x9f58x29[_0x3405[118]]({plain:true});return db[_0x3405[127]][_0x3405[98]]({where:{id:_0x9f58x29[_0x3405[126]]}})};return null})[_0x3405[44]](handleEntityNotFound(_0x9f58x26,null))[_0x3405[44]](function(_0x9f58x29){if(_0x9f58x29){return _0x9f58x29[_0x3405[60]]({UserId:_0x9f58x20[_0x3405[99]][_0x3405[108]],read1stAt:_[_0x3405[125]](_0x9f58x29[_0x3405[124]])?moment()[_0x3405[107]](_0x3405[106]):undefined})};return null})[_0x3405[44]](function(_0x9f58x29){if(_0x9f58x29){_0x9f58x40[_0x3405[117]]= _0x9f58x29[_0x3405[118]]({plain:true});interaction_log[_0x3405[37]](_0x3405[119],_0x9f58x20[_0x3405[109]][_0x3405[96]],_0x9f58x20[_0x3405[109]][_0x3405[63]],_0x9f58x20[_0x3405[109]][_0x3405[120]],_0x9f58x40[_0x3405[117]][_0x3405[96]],_0x9f58x20[_0x3405[99]]?JSON[_0x3405[39]](_0x9f58x20[_0x3405[99]]):_0x3405[121]);return respondWithRpcPromise(_0x3405[122],_0x3405[123],_0x9f58x40)};return null})[_0x3405[44]](function(_0x9f58x29){if(_0x9f58x29){if(_0x9f58x20[_0x3405[99]][_0x3405[110]]){_0x9f58x40[_0x3405[42]][_0x3405[111]]= util[_0x3405[107]](_0x3405[112],_0x9f58x20[_0x3405[109]][_0x3405[63]]);_0x9f58x40[_0x3405[42]][_0x3405[113]]= _0x9f58x40[_0x3405[113]];_0x9f58x40[_0x3405[42]][_0x3405[114]]= _0x3405[102];return respondWithRpcPromise(_0x3405[115],_0x3405[115],{event:_0x3405[116],message:_0x9f58x40[_0x3405[42]]},client9002)[_0x3405[44]](function(){return _0x9f58x40})};return _0x9f58x40};return null})[_0x3405[44]](respondWithResult(_0x9f58x26,null))[_0x3405[35]](handleError(_0x9f58x26,null))};var interaction_log=require(_0x3405[21])(_0x3405[101]);exports[_0x3405[58]]= function(_0x9f58x20,_0x9f58x26,_0x9f58x3f){var _0x9f58x40={agent:{},channel:_0x3405[103]};if(_0x9f58x20[_0x3405[99]][_0x3405[96]]){delete _0x9f58x20[_0x3405[99]][_0x3405[96]]};_0x9f58x20[_0x3405[99]][_0x3405[108]]= _0x9f58x20[_0x3405[99]][_0x3405[108]]|| _0x9f58x20[_0x3405[109]][_0x3405[96]];_0x9f58x40[_0x3405[130]][_0x3405[96]]= _0x9f58x20[_0x3405[99]][_0x3405[108]];return db[_0x3405[68]][_0x3405[98]]({where:{id:_0x9f58x20[_0x3405[97]][_0x3405[96]],UserId:null}})[_0x3405[44]](handleEntityNotFound(_0x9f58x26,null))[_0x3405[44]](function(_0x9f58x29){if(_0x9f58x29){_0x9f58x40[_0x3405[42]]= _0x9f58x29[_0x3405[118]]({plain:true});return db[_0x3405[127]][_0x3405[98]]({where:{id:_0x9f58x29[_0x3405[126]]}})};return null})[_0x3405[44]](handleEntityNotFound(_0x9f58x26,null))[_0x3405[44]](function(_0x9f58x29){if(_0x9f58x29){_0x9f58x40[_0x3405[117]]= _0x9f58x29[_0x3405[118]]({plain:true});interaction_log[_0x3405[37]](_0x3405[132],_0x9f58x20[_0x3405[109]][_0x3405[96]],_0x9f58x20[_0x3405[109]][_0x3405[63]],_0x9f58x20[_0x3405[109]][_0x3405[120]],_0x9f58x40[_0x3405[117]][_0x3405[96]],_0x9f58x20[_0x3405[99]]?JSON[_0x3405[39]](_0x9f58x20[_0x3405[99]]):_0x3405[121]);return respondWithRpcPromise(_0x3405[133],_0x3405[134],_0x9f58x40)};return null})[_0x3405[44]](function(_0x9f58x29){if(_0x9f58x29){_0x9f58x29[_0x3405[42]][_0x3405[111]]= util[_0x3405[107]](_0x3405[112],_0x9f58x20[_0x3405[109]][_0x3405[63]]);_0x9f58x29[_0x3405[42]][_0x3405[113]]= _0x9f58x40[_0x3405[113]];_0x9f58x29[_0x3405[42]][_0x3405[114]]= _0x3405[58];respondWithRpcPromise(_0x3405[115],_0x3405[115],{event:_0x3405[131],message:_0x9f58x29[_0x3405[42]]},client9002);return _0x9f58x40};return null})[_0x3405[44]](respondWithResult(_0x9f58x26,null))[_0x3405[35]](handleError(_0x9f58x26,null))};exports[_0x3405[135]]= function(_0x9f58x20,_0x9f58x26){var _0x9f58x41;return db[_0x3405[68]][_0x3405[135]](_0x9f58x20[_0x3405[99]],{})[_0x3405[44]](function(_0x9f58x29){_0x9f58x41= _0x9f58x29;return db[_0x3405[128]][_0x3405[141]]({where:{id:_0x9f58x41[_0x3405[143]]}})})[_0x3405[44]](function(_0x9f58x42){if(_[_0x3405[125]](_0x9f58x42)){return}else {_0x9f58x41[_0x3405[103]]= _0x9f58x42[_0x3405[103]];return db[_0x3405[142]][_0x3405[141]]({where:{id:_0x9f58x41[_0x3405[140]]}})}})[_0x3405[44]](function(_0x9f58x29){return respondWithRpcPromise(_0x3405[136],_0x3405[136],{FaxAccountId:_[_0x3405[125]](_0x9f58x20[_0x3405[99]])?undefined:_0x9f58x20[_0x3405[99]][_0x3405[137]],path:_[_0x3405[125]](_0x9f58x29)?undefined:util[_0x3405[107]](_0x3405[138],_0x9f58x29[_0x3405[139]]),fax:_[_0x3405[125]](_0x9f58x41[_0x3405[103]])?undefined:_0x9f58x41[_0x3405[103]],AttachmentId:_0x9f58x41[_0x3405[140]]},client9002)})[_0x3405[44]](respondWithResult(_0x9f58x26,201))[_0x3405[35]](handleError(_0x9f58x26,null))}
\ No newline at end of file
+var _0xb58b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x66\x61\x78\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x61\x63\x63\x65\x70\x74","\x66\x61\x78","\x72\x65\x61\x64","\x72\x65\x61\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x55\x73\x65\x72\x49\x64","\x75\x73\x65\x72","\x6D\x61\x6E\x75\x61\x6C","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x53\x49\x50\x2F\x25\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x65\x76\x65\x6E\x74","\x45\x76\x65\x6E\x74\x4D\x61\x6E\x61\x67\x65\x72","\x61\x63\x63\x65\x70\x74\x6D\x65\x73\x73\x61\x67\x65","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74","\x5B\x46\x41\x58\x4D\x45\x53\x53\x41\x47\x45\x3A\x41\x43\x43\x45\x50\x54\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x72\x6F\x6C\x65","\x6E\x75\x6C\x6C","\x41\x63\x63\x65\x70\x74\x4D\x65\x73\x73\x61\x67\x65","\x61\x63\x63\x65\x70\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x61\x64\x31\x73\x74\x41\x74","\x69\x73\x4E\x69\x6C","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x61\x67\x65\x6E\x74","\x72\x65\x6A\x65\x63\x74\x6D\x65\x73\x73\x61\x67\x65","\x5B\x46\x41\x58\x4D\x45\x53\x53\x41\x47\x45\x3A\x52\x45\x4A\x45\x43\x54\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x52\x65\x6A\x65\x63\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x6A\x65\x63\x74\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65","\x53\x65\x6E\x64\x46\x61\x78","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x32\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73\x2F\x25\x73","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64"];_0xb58b[0];var jsonpatch=require(_0xb58b[1]);var rp=require(_0xb58b[2]);var moment=require(_0xb58b[3]);var BPromise=require(_0xb58b[4]);var Mustache=require(_0xb58b[5]);var util=require(_0xb58b[6]);var path=require(_0xb58b[7]);var sox=require(_0xb58b[8]);var csv=require(_0xb58b[9]);var ejs=require(_0xb58b[10]);var fs=require(_0xb58b[11]);var _=require(_0xb58b[12]);var squel=require(_0xb58b[13]);var crypto=require(_0xb58b[14]);var jsforce=require(_0xb58b[15]);var deskjs=require(_0xb58b[16]);var toCsv=require(_0xb58b[9]);var querystring=require(_0xb58b[17]);var Papa=require(_0xb58b[18]);var qs=require(_0xb58b[19]);var logger=require(_0xb58b[21])(_0xb58b[20]);var utils=require(_0xb58b[22]);var config=require(_0xb58b[23]);var db=require(_0xb58b[25])[_0xb58b[24]];var socket=require(_0xb58b[27])({host:_0xb58b[26],port:6379});require(_0xb58b[29])[_0xb58b[28]](socket);var jayson=require(_0xb58b[30]);var client=jayson[_0xb58b[32]][_0xb58b[31]]({port:9004});var client9002=jayson[_0xb58b[32]][_0xb58b[31]]({port:9002});function respondWithRpcPromise(_0x7170x1e,_0x7170x1f,_0x7170x20,_0x7170x21){return  new BPromise(function(_0x7170x22,_0x7170x23){var _0x7170x24=(_0x7170x21|| client);return _0x7170x24[_0xb58b[45]](_0x7170x1e,_0x7170x20)[_0xb58b[44]](function(_0x7170x26){logger[_0xb58b[37]](_0xb58b[33],_0x7170x1f,_0xb58b[36]);logger[_0xb58b[40]](_0xb58b[38],_0x7170x1f,_0xb58b[36],JSON[_0xb58b[39]](_0x7170x26));if(_0x7170x26[_0xb58b[34]]){if(_0x7170x26[_0xb58b[34]][_0xb58b[41]]=== 500){logger[_0xb58b[34]](_0xb58b[33],_0x7170x1f,_0x7170x26[_0xb58b[34]][_0xb58b[42]]);return _0x7170x23(_0x7170x26[_0xb58b[34]][_0xb58b[42]])};logger[_0xb58b[34]](_0xb58b[33],_0x7170x1f,_0x7170x26[_0xb58b[34]][_0xb58b[42]]);return _0x7170x22(_0x7170x26[_0xb58b[34]][_0xb58b[42]])}else {logger[_0xb58b[37]](_0xb58b[33],_0x7170x1f,_0xb58b[36]);_0x7170x22(_0x7170x26[_0xb58b[43]][_0xb58b[42]])}})[_0xb58b[35]](function(_0x7170x25){logger[_0xb58b[34]](_0xb58b[33],_0x7170x1f,_0x7170x25);_0x7170x23(_0x7170x25)})})}function respondWithStatusCode(_0x7170x26,_0x7170x28){_0x7170x28= _0x7170x28|| 204;return function(_0x7170x29){if(_0x7170x29){return _0x7170x26[_0xb58b[46]](_0x7170x28)};return _0x7170x26[_0xb58b[48]](_0x7170x28)[_0xb58b[47]]()}}function respondWithResult(_0x7170x26,_0x7170x28){_0x7170x28= _0x7170x28|| 200;return function(_0x7170x29){if(_0x7170x29){return _0x7170x26[_0xb58b[48]](_0x7170x28)[_0xb58b[49]](_0x7170x29)}}}function respondWithFilteredResult(_0x7170x26,_0x7170x2c){return function(_0x7170x29){if(_0x7170x29){var _0x7170x2d=_0x7170x29[_0xb58b[50]],_0x7170x2e=_0x7170x2c[_0xb58b[51]],_0x7170x2f=_0x7170x2c[_0xb58b[51]]+ _0x7170x2c[_0xb58b[52]],_0x7170x28;if(_0x7170x2f>= _0x7170x2d){_0x7170x2f= _0x7170x2d;_0x7170x28= 200}else {_0x7170x28= 206};_0x7170x26[_0xb58b[48]](_0x7170x28);return _0x7170x26[_0xb58b[56]](_0xb58b[53],_0x7170x2e+ _0xb58b[54]+ _0x7170x2f+ _0xb58b[55]+ _0x7170x2d)[_0xb58b[49]](_0x7170x29)};return null}}function patchUpdates(_0x7170x31){return function(_0x7170x29){try{jsonpatch[_0xb58b[57]](_0x7170x29,_0x7170x31,true)}catch(err){return BPromise[_0xb58b[58]](err)};return _0x7170x29[_0xb58b[59]]()}}function saveUpdates(_0x7170x33,_0x7170x28){return function(_0x7170x29){if(_0x7170x29){return _0x7170x29[_0xb58b[60]](_0x7170x33)[_0xb58b[44]](function(_0x7170x34){return _0x7170x34})};return null}}function removeEntity(_0x7170x26,_0x7170x28){return function(_0x7170x29){if(_0x7170x29){return _0x7170x29[_0xb58b[61]]()[_0xb58b[44]](function(){_0x7170x26[_0xb58b[48]](204)[_0xb58b[47]]()})}}}function handleEntityNotFound(_0x7170x26,_0x7170x28){return function(_0x7170x29){if(!_0x7170x29){_0x7170x26[_0xb58b[46]](404)};return _0x7170x29}}function handleError(_0x7170x26,_0x7170x28){_0x7170x28= _0x7170x28|| 500;return function(_0x7170x25){logger[_0xb58b[34]](_0x7170x25[_0xb58b[62]]);if(_0x7170x25[_0xb58b[63]]){delete _0x7170x25[_0xb58b[63]]};_0x7170x26[_0xb58b[48]](_0x7170x28)[_0xb58b[64]](_0x7170x25)}}exports[_0xb58b[65]]= function(_0x7170x20,_0x7170x26){var _0x7170x2c={},_0x7170x38={},_0x7170x39={count:0,rows:[]};_0x7170x38[_0xb58b[66]]= _[_0xb58b[69]](db[_0xb58b[68]][_0xb58b[67]]);var _0x7170x3a={dateStart:_0x7170x20[_0xb58b[71]][_0xb58b[70]],dateEnd:_0x7170x20[_0xb58b[71]][_0xb58b[72]]};delete _0x7170x20[_0xb58b[71]][_0xb58b[70]];delete _0x7170x20[_0xb58b[71]][_0xb58b[72]];_0x7170x38[_0xb58b[71]]= _[_0xb58b[69]](_0x7170x20[_0xb58b[71]]);_0x7170x38[_0xb58b[73]]= _[_0xb58b[74]](_0x7170x38[_0xb58b[66]],_0x7170x38[_0xb58b[71]]);_0x7170x2c[_0xb58b[75]]= _[_0xb58b[74]](_0x7170x38[_0xb58b[66]],qs[_0xb58b[76]](_0x7170x20[_0xb58b[71]][_0xb58b[76]]));_0x7170x2c[_0xb58b[75]]= (_0x7170x2c[_0xb58b[75]][_0xb58b[77]])?_0x7170x2c[_0xb58b[75]]:_0x7170x38[_0xb58b[66]];if(!_0x7170x20[_0xb58b[71]][_0xb58b[79]](_0xb58b[78])){_0x7170x2c[_0xb58b[52]]= qs[_0xb58b[52]](_0x7170x20[_0xb58b[71]][_0xb58b[52]]);_0x7170x2c[_0xb58b[51]]= qs[_0xb58b[51]](_0x7170x20[_0xb58b[71]][_0xb58b[51]])};_0x7170x2c[_0xb58b[80]]= qs[_0xb58b[81]](_0x7170x20[_0xb58b[71]][_0xb58b[81]]);_0x7170x2c[_0xb58b[82]]= qs[_0xb58b[73]](_[_0xb58b[83]](_0x7170x20[_0xb58b[71]],_0x7170x38[_0xb58b[73]]));if(_0x7170x3a[_0xb58b[70]]){if(_0x7170x3a[_0xb58b[72]]){_0x7170x3a[_0xb58b[72]]= moment(_0x7170x3a[_0xb58b[72]])[_0xb58b[85]](1,_0xb58b[84])}else {_0x7170x3a[_0xb58b[72]]= moment(_0x7170x3a[_0xb58b[70]])[_0xb58b[85]](1,_0xb58b[84])};_[_0xb58b[86]](_0x7170x2c[_0xb58b[82]],{createdAt:{$gte:_0x7170x3a[_0xb58b[70]],$lte:_0x7170x3a[_0xb58b[72]]}})};if(_0x7170x20[_0xb58b[71]][_0xb58b[87]]){_0x7170x2c[_0xb58b[82]]= _[_0xb58b[86]](_0x7170x2c[_0xb58b[82]],{$or:_[_0xb58b[89]](_0x7170x2c[_0xb58b[75]],function(_0x7170x3b){var _0x7170x39={};_0x7170x39[_0x7170x3b]= {$like:_0xb58b[88]+ _0x7170x20[_0xb58b[71]][_0xb58b[87]]+ _0xb58b[88]};return _0x7170x39})})};_0x7170x2c= _[_0xb58b[86]]({},_0x7170x2c,_0x7170x20[_0xb58b[90]]);var _0x7170x3c={where:_0x7170x2c[_0xb58b[82]]};return db[_0xb58b[68]][_0xb58b[50]](_0x7170x3c)[_0xb58b[44]](function(_0x7170x2d){_0x7170x39[_0xb58b[50]]= _0x7170x2d;if(_0x7170x20[_0xb58b[71]][_0xb58b[92]]){_0x7170x2c[_0xb58b[93]]= [{all:true}]};return db[_0xb58b[68]][_0xb58b[94]](_0x7170x2c)})[_0xb58b[44]](function(_0x7170x3d){_0x7170x39[_0xb58b[91]]= _0x7170x3d;return _0x7170x39})[_0xb58b[44]](respondWithFilteredResult(_0x7170x26,_0x7170x2c))[_0xb58b[35]](handleError(_0x7170x26,null))};exports[_0xb58b[95]]= function(_0x7170x20,_0x7170x26){var _0x7170x2c={raw:true,where:{id:_0x7170x20[_0xb58b[97]][_0xb58b[96]]}},_0x7170x38={};_0x7170x38[_0xb58b[66]]= _[_0xb58b[69]](db[_0xb58b[68]][_0xb58b[67]]);_0x7170x38[_0xb58b[71]]= _[_0xb58b[69]](_0x7170x20[_0xb58b[71]]);_0x7170x38[_0xb58b[73]]= _[_0xb58b[74]](_0x7170x38[_0xb58b[66]],_0x7170x38[_0xb58b[71]]);_0x7170x2c[_0xb58b[75]]= _[_0xb58b[74]](_0x7170x38[_0xb58b[66]],qs[_0xb58b[76]](_0x7170x20[_0xb58b[71]][_0xb58b[76]]));_0x7170x2c[_0xb58b[75]]= (_0x7170x2c[_0xb58b[75]][_0xb58b[77]])?_0x7170x2c[_0xb58b[75]]:_0x7170x38[_0xb58b[66]];if(_0x7170x20[_0xb58b[71]][_0xb58b[92]]){_0x7170x2c[_0xb58b[93]]= [{all:true}]};_0x7170x2c= _[_0xb58b[86]]({},_0x7170x2c,_0x7170x20[_0xb58b[90]]);return db[_0xb58b[68]][_0xb58b[98]](_0x7170x2c)[_0xb58b[44]](handleEntityNotFound(_0x7170x26,null))[_0xb58b[44]](respondWithResult(_0x7170x26,null))[_0xb58b[35]](handleError(_0x7170x26,null))};exports[_0xb58b[60]]= function(_0x7170x20,_0x7170x26){if(_0x7170x20[_0xb58b[99]][_0xb58b[96]]){delete _0x7170x20[_0xb58b[99]][_0xb58b[96]]};return db[_0xb58b[68]][_0xb58b[98]]({where:{id:_0x7170x20[_0xb58b[97]][_0xb58b[96]]}})[_0xb58b[44]](handleEntityNotFound(_0x7170x26,null))[_0xb58b[44]](saveUpdates(_0x7170x20[_0xb58b[99]],null))[_0xb58b[44]](respondWithResult(_0x7170x26,null))[_0xb58b[35]](handleError(_0x7170x26,null))};exports[_0xb58b[61]]= function(_0x7170x20,_0x7170x26){return db[_0xb58b[68]][_0xb58b[98]]({where:{id:_0x7170x20[_0xb58b[97]][_0xb58b[96]]}})[_0xb58b[44]](handleEntityNotFound(_0x7170x26,null))[_0xb58b[44]](removeEntity(_0x7170x26,null))[_0xb58b[35]](handleError(_0x7170x26,null))};exports[_0xb58b[100]]= function(_0x7170x20,_0x7170x26){return db[_0xb58b[68]][_0xb58b[100]]()[_0xb58b[44]](respondWithResult(_0x7170x26,null))[_0xb58b[35]](handleError(_0x7170x26,null))};var interaction_log=require(_0xb58b[21])(_0xb58b[101]);exports[_0xb58b[102]]= function(_0x7170x20,_0x7170x26,_0x7170x3f){var _0x7170x40={channel:_0xb58b[103]};if(_0x7170x20[_0xb58b[99]][_0xb58b[96]]){delete _0x7170x20[_0xb58b[99]][_0xb58b[96]]};_0x7170x20[_0xb58b[99]][_0xb58b[104]]= true;_0x7170x20[_0xb58b[99]][_0xb58b[105]]= moment()[_0xb58b[107]](_0xb58b[106]);_0x7170x20[_0xb58b[99]][_0xb58b[108]]= _0x7170x20[_0xb58b[99]][_0xb58b[108]]|| _0x7170x20[_0xb58b[109]][_0xb58b[96]];return db[_0xb58b[68]][_0xb58b[98]]({where:{id:_0x7170x20[_0xb58b[97]][_0xb58b[96]],UserId:null},include:[{model:db[_0xb58b[128]],as:_0xb58b[129]}]})[_0xb58b[44]](handleEntityNotFound(_0x7170x26,null))[_0xb58b[44]](saveUpdates(_0x7170x20[_0xb58b[99]],null))[_0xb58b[44]](function(_0x7170x29){if(_0x7170x29){_0x7170x40[_0xb58b[42]]= _0x7170x29[_0xb58b[118]]({plain:true});return db[_0xb58b[127]][_0xb58b[98]]({where:{id:_0x7170x29[_0xb58b[126]]}})};return null})[_0xb58b[44]](handleEntityNotFound(_0x7170x26,null))[_0xb58b[44]](function(_0x7170x29){if(_0x7170x29){return _0x7170x29[_0xb58b[60]]({UserId:_0x7170x20[_0xb58b[99]][_0xb58b[108]],read1stAt:_[_0xb58b[125]](_0x7170x29[_0xb58b[124]])?moment()[_0xb58b[107]](_0xb58b[106]):undefined})};return null})[_0xb58b[44]](function(_0x7170x29){if(_0x7170x29){_0x7170x40[_0xb58b[117]]= _0x7170x29[_0xb58b[118]]({plain:true});interaction_log[_0xb58b[37]](_0xb58b[119],_0x7170x20[_0xb58b[109]][_0xb58b[96]],_0x7170x20[_0xb58b[109]][_0xb58b[63]],_0x7170x20[_0xb58b[109]][_0xb58b[120]],_0x7170x40[_0xb58b[117]][_0xb58b[96]],_0x7170x20[_0xb58b[99]]?JSON[_0xb58b[39]](_0x7170x20[_0xb58b[99]]):_0xb58b[121]);return respondWithRpcPromise(_0xb58b[122],_0xb58b[123],_0x7170x40)};return null})[_0xb58b[44]](function(_0x7170x29){if(_0x7170x29){if(_0x7170x20[_0xb58b[99]][_0xb58b[110]]){_0x7170x40[_0xb58b[42]][_0xb58b[111]]= util[_0xb58b[107]](_0xb58b[112],_0x7170x20[_0xb58b[109]][_0xb58b[63]]);_0x7170x40[_0xb58b[42]][_0xb58b[113]]= _0x7170x40[_0xb58b[113]];_0x7170x40[_0xb58b[42]][_0xb58b[114]]= _0xb58b[102];return respondWithRpcPromise(_0xb58b[115],_0xb58b[115],{event:_0xb58b[116],message:_0x7170x40[_0xb58b[42]]},client9002)[_0xb58b[44]](function(){return _0x7170x40})};return _0x7170x40};return null})[_0xb58b[44]](respondWithResult(_0x7170x26,null))[_0xb58b[35]](handleError(_0x7170x26,null))};var interaction_log=require(_0xb58b[21])(_0xb58b[101]);exports[_0xb58b[58]]= function(_0x7170x20,_0x7170x26,_0x7170x3f){var _0x7170x40={agent:{},channel:_0xb58b[103]};if(_0x7170x20[_0xb58b[99]][_0xb58b[96]]){delete _0x7170x20[_0xb58b[99]][_0xb58b[96]]};_0x7170x20[_0xb58b[99]][_0xb58b[108]]= _0x7170x20[_0xb58b[99]][_0xb58b[108]]|| _0x7170x20[_0xb58b[109]][_0xb58b[96]];_0x7170x40[_0xb58b[130]][_0xb58b[96]]= _0x7170x20[_0xb58b[99]][_0xb58b[108]];return db[_0xb58b[68]][_0xb58b[98]]({where:{id:_0x7170x20[_0xb58b[97]][_0xb58b[96]],UserId:null}})[_0xb58b[44]](handleEntityNotFound(_0x7170x26,null))[_0xb58b[44]](function(_0x7170x29){if(_0x7170x29){_0x7170x40[_0xb58b[42]]= _0x7170x29[_0xb58b[118]]({plain:true});return db[_0xb58b[127]][_0xb58b[98]]({where:{id:_0x7170x29[_0xb58b[126]]}})};return null})[_0xb58b[44]](handleEntityNotFound(_0x7170x26,null))[_0xb58b[44]](function(_0x7170x29){if(_0x7170x29){_0x7170x40[_0xb58b[117]]= _0x7170x29[_0xb58b[118]]({plain:true});interaction_log[_0xb58b[37]](_0xb58b[132],_0x7170x20[_0xb58b[109]][_0xb58b[96]],_0x7170x20[_0xb58b[109]][_0xb58b[63]],_0x7170x20[_0xb58b[109]][_0xb58b[120]],_0x7170x40[_0xb58b[117]][_0xb58b[96]],_0x7170x20[_0xb58b[99]]?JSON[_0xb58b[39]](_0x7170x20[_0xb58b[99]]):_0xb58b[121]);return respondWithRpcPromise(_0xb58b[133],_0xb58b[134],_0x7170x40)};return null})[_0xb58b[44]](function(_0x7170x29){if(_0x7170x29){_0x7170x29[_0xb58b[42]][_0xb58b[111]]= util[_0xb58b[107]](_0xb58b[112],_0x7170x20[_0xb58b[109]][_0xb58b[63]]);_0x7170x29[_0xb58b[42]][_0xb58b[113]]= _0x7170x40[_0xb58b[113]];_0x7170x29[_0xb58b[42]][_0xb58b[114]]= _0xb58b[58];respondWithRpcPromise(_0xb58b[115],_0xb58b[115],{event:_0xb58b[131],message:_0x7170x29[_0xb58b[42]]},client9002);return _0x7170x40};return null})[_0xb58b[44]](respondWithResult(_0x7170x26,null))[_0xb58b[35]](handleError(_0x7170x26,null))};exports[_0xb58b[135]]= function(_0x7170x20,_0x7170x26){var _0x7170x41;return db[_0xb58b[68]][_0xb58b[135]](_0x7170x20[_0xb58b[99]],{})[_0xb58b[44]](function(_0x7170x29){_0x7170x41= _0x7170x29;return db[_0xb58b[128]][_0xb58b[141]]({where:{id:_0x7170x41[_0xb58b[143]]}})})[_0xb58b[44]](function(_0x7170x42){if(_[_0xb58b[125]](_0x7170x42)){return}else {_0x7170x41[_0xb58b[103]]= _0x7170x42[_0xb58b[103]];return db[_0xb58b[142]][_0xb58b[141]]({where:{id:_0x7170x41[_0xb58b[140]]}})}})[_0xb58b[44]](function(_0x7170x29){return respondWithRpcPromise(_0xb58b[136],_0xb58b[136],{FaxAccountId:_[_0xb58b[125]](_0x7170x20[_0xb58b[99]])?undefined:_0x7170x20[_0xb58b[99]][_0xb58b[137]],path:_[_0xb58b[125]](_0x7170x29)?undefined:util[_0xb58b[107]](_0xb58b[138],_0x7170x29[_0xb58b[139]]),fax:_[_0xb58b[125]](_0x7170x41[_0xb58b[103]])?undefined:_0x7170x41[_0xb58b[103]],AttachmentId:_0x7170x41[_0xb58b[140]]},client9002)})[_0xb58b[44]](respondWithResult(_0x7170x26,201))[_0xb58b[35]](handleError(_0x7170x26,null))}
\ No newline at end of file
index bc3586a..c6a930f 100644 (file)
@@ -1 +1 @@
-var _0xc2e6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xc2e6[0];var EventEmitter=require(_0xc2e6[1]);var FaxMessage=require(_0xc2e6[4])[_0xc2e6[3]][_0xc2e6[2]];var FaxMessageEvents= new EventEmitter();FaxMessageEvents[_0xc2e6[5]](0);var events={afterCreate:_0xc2e6[6],afterUpdate:_0xc2e6[7],afterDestroy:_0xc2e6[8]};function emitEvent(event){return function(_0xea73x7,_0xea73x8,_0xea73x9){FaxMessageEvents[_0xc2e6[11]](event+ _0xc2e6[9]+ _0xea73x7[_0xc2e6[10]],_0xea73x7);FaxMessageEvents[_0xc2e6[11]](event,_0xea73x7);_0xea73x9(null)}}for(var e in events){if(events[_0xc2e6[12]](e)){var event=events[e];FaxMessage[_0xc2e6[13]](e,emitEvent(event))}};module[_0xc2e6[14]]= FaxMessageEvents
\ No newline at end of file
+var _0xcffe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xcffe[0];var EventEmitter=require(_0xcffe[1]);var FaxMessage=require(_0xcffe[4])[_0xcffe[3]][_0xcffe[2]];var FaxMessageEvents= new EventEmitter();FaxMessageEvents[_0xcffe[5]](0);var events={afterCreate:_0xcffe[6],afterUpdate:_0xcffe[7],afterDestroy:_0xcffe[8]};function emitEvent(event){return function(_0x286ax7,_0x286ax8,_0x286ax9){FaxMessageEvents[_0xcffe[11]](event+ _0xcffe[9]+ _0x286ax7[_0xcffe[10]],_0x286ax7);FaxMessageEvents[_0xcffe[11]](event,_0x286ax7);_0x286ax9(null)}}for(var e in events){if(events[_0xcffe[12]](e)){var event=events[e];FaxMessage[_0xcffe[13]](e,emitEvent(event))}};module[_0xcffe[14]]= FaxMessageEvents
\ No newline at end of file
index 382f7ad..e2ea7b7 100644 (file)
@@ -1 +1 @@
-var _0xee57=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x6D\x6F\x64\x65\x6C\x73","\x67\x65\x74","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x69\x6E","\x6F\x75\x74","\x73\x65\x63\x72\x65\x74","\x69\x73\x4E\x69\x6C","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x75\x74\x66\x38\x6D\x62\x34","\x75\x74\x66\x38\x6D\x62\x34\x5F\x75\x6E\x69\x63\x6F\x64\x65\x5F\x63\x69","\x64\x65\x66\x69\x6E\x65"];_0xee57[0];var _=require(_0xee57[1]);var util=require(_0xee57[2]);var logger=require(_0xee57[4])(_0xee57[3]);var moment=require(_0xee57[5]);var BPromise=require(_0xee57[6]);var rp=require(_0xee57[7]);var attributes=require(_0xee57[8]);module[_0xee57[9]]= function(_0xc630x8,_0xc630x9){return _0xc630x8[_0xee57[31]](_0xee57[10],attributes,{tableName:_0xee57[11],paranoid:false,indexes:[],timestamps:true,hooks:{afterCreate:function(_0xc630xa,_0xc630xb,_0xc630xc){var _0xc630xd=_0xc630x8[_0xee57[12]];var _0xc630xe=_0xc630xa[_0xee57[13]]({plain:true});if((_0xc630xe[_0xee57[15]][_0xee57[14]]()=== _0xee57[16])|| (_0xc630xe[_0xee57[15]][_0xee57[14]]()=== _0xee57[17]&&  !_0xc630xe[_0xee57[18]]&&  !_[_0xee57[19]](_0xc630xe.UserId))){_0xc630xd[_0xee57[28]][_0xee57[27]]({where:{id:_0xc630xe[_0xee57[26]]}})[_0xee57[25]](function(_0xc630x10){if(_0xc630x10){_0xc630x10[_0xee57[24]]({lastMsgAt:_0xc630xe[_0xee57[22]],lastMsgDirection:_0xc630xe[_0xee57[15]][_0xee57[14]](),lastMsgBody:_0xc630xe[_0xee57[23]]})}})[_0xee57[21]](function(_0xc630xf){console[_0xee57[20]](_0xc630xf)})};_0xc630xc()}},charset:_0xee57[29],collate:_0xee57[30]})}
\ No newline at end of file
+var _0x67db=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x6D\x6F\x64\x65\x6C\x73","\x67\x65\x74","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x69\x6E","\x6F\x75\x74","\x73\x65\x63\x72\x65\x74","\x69\x73\x4E\x69\x6C","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x75\x74\x66\x38\x6D\x62\x34","\x75\x74\x66\x38\x6D\x62\x34\x5F\x75\x6E\x69\x63\x6F\x64\x65\x5F\x63\x69","\x64\x65\x66\x69\x6E\x65"];_0x67db[0];var _=require(_0x67db[1]);var util=require(_0x67db[2]);var logger=require(_0x67db[4])(_0x67db[3]);var moment=require(_0x67db[5]);var BPromise=require(_0x67db[6]);var rp=require(_0x67db[7]);var attributes=require(_0x67db[8]);module[_0x67db[9]]= function(_0xacebx8,_0xacebx9){return _0xacebx8[_0x67db[31]](_0x67db[10],attributes,{tableName:_0x67db[11],paranoid:false,indexes:[],timestamps:true,hooks:{afterCreate:function(_0xacebxa,_0xacebxb,_0xacebxc){var _0xacebxd=_0xacebx8[_0x67db[12]];var _0xacebxe=_0xacebxa[_0x67db[13]]({plain:true});if((_0xacebxe[_0x67db[15]][_0x67db[14]]()=== _0x67db[16])|| (_0xacebxe[_0x67db[15]][_0x67db[14]]()=== _0x67db[17]&&  !_0xacebxe[_0x67db[18]]&&  !_[_0x67db[19]](_0xacebxe.UserId))){_0xacebxd[_0x67db[28]][_0x67db[27]]({where:{id:_0xacebxe[_0x67db[26]]}})[_0x67db[25]](function(_0xacebx10){if(_0xacebx10){_0xacebx10[_0x67db[24]]({lastMsgAt:_0xacebxe[_0x67db[22]],lastMsgDirection:_0xacebxe[_0x67db[15]][_0x67db[14]](),lastMsgBody:_0xacebxe[_0x67db[23]]})}})[_0x67db[21]](function(_0xacebxf){console[_0x67db[20]](_0xacebxf)})};_0xacebxc()}},charset:_0x67db[29],collate:_0x67db[30]})}
\ No newline at end of file
index d7292c2..aca2686 100644 (file)
@@ -1 +1 @@
-var _0xfe6e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x55\x70\x64\x61\x74\x65\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65"];_0xfe6e[0];var _=require(_0xfe6e[1]);var util=require(_0xfe6e[2]);var moment=require(_0xfe6e[3]);var BPromise=require(_0xfe6e[4]);var rs=require(_0xfe6e[5]);var fs=require(_0xfe6e[6]);var db=require(_0xfe6e[8])[_0xfe6e[7]];var utils=require(_0xfe6e[9]);var logger=require(_0xfe6e[11])(_0xfe6e[10]);var config=require(_0xfe6e[12]);var jayson=require(_0xfe6e[13]);var client=jayson[_0xfe6e[15]][_0xfe6e[14]]({port:9002});var socket=require(_0xfe6e[17])({host:_0xfe6e[16],port:6379});require(_0xfe6e[19])[_0xfe6e[18]](socket);function respondWithRpcPromise(_0x83d0xf,_0x83d0x10,_0x83d0x11){return  new BPromise(function(_0x83d0x12,_0x83d0x13){return client[_0xfe6e[32]](_0x83d0xf,_0x83d0x11)[_0xfe6e[31]](function(_0x83d0x15){logger[_0xfe6e[24]](_0xfe6e[20],_0x83d0x10,_0xfe6e[23]);logger[_0xfe6e[27]](_0xfe6e[25],_0x83d0x10,_0xfe6e[23],JSON[_0xfe6e[26]](_0x83d0x15));if(_0x83d0x15[_0xfe6e[21]]){if(_0x83d0x15[_0xfe6e[21]][_0xfe6e[28]]=== 500){logger[_0xfe6e[21]](_0xfe6e[20],_0x83d0x10,_0x83d0x15[_0xfe6e[21]][_0xfe6e[29]]);return _0x83d0x13(_0x83d0x15[_0xfe6e[21]][_0xfe6e[29]])};logger[_0xfe6e[21]](_0xfe6e[20],_0x83d0x10,_0x83d0x15[_0xfe6e[21]][_0xfe6e[29]]);return _0x83d0x12(_0x83d0x15[_0xfe6e[21]][_0xfe6e[29]])}else {logger[_0xfe6e[24]](_0xfe6e[20],_0x83d0x10,_0xfe6e[23]);_0x83d0x12(_0x83d0x15[_0xfe6e[30]][_0xfe6e[29]])}})[_0xfe6e[22]](function(_0x83d0x14){logger[_0xfe6e[21]](_0xfe6e[20],_0x83d0x10,_0x83d0x14);_0x83d0x13(_0x83d0x14)})})}exports[_0xfe6e[33]]= function(_0x83d0x11){var _0x83d0x16=this;return  new Promise(function(_0x83d0x12,_0x83d0x13){return db[_0xfe6e[38]][_0xfe6e[37]](_0x83d0x11[_0xfe6e[34]],{raw:_0x83d0x11[_0xfe6e[35]]?(_0x83d0x11[_0xfe6e[35]][_0xfe6e[36]]=== undefined)?true:false:true})[_0xfe6e[31]](function(_0x83d0x15){logger[_0xfe6e[24]](_0xfe6e[33],_0x83d0x11);logger[_0xfe6e[27]](_0xfe6e[33],_0x83d0x11,JSON[_0xfe6e[26]](_0x83d0x15));_0x83d0x12(_0x83d0x15)})[_0xfe6e[22]](function(_0x83d0x14){logger[_0xfe6e[21]](_0xfe6e[33],_0x83d0x14[_0xfe6e[29]],_0x83d0x11);_0x83d0x13(_0x83d0x16[_0xfe6e[21]](500,_0x83d0x14[_0xfe6e[29]]))})})};exports[_0xfe6e[39]]= function(_0x83d0x11){var _0x83d0x16=this;return  new Promise(function(_0x83d0x12,_0x83d0x13){return db[_0xfe6e[38]][_0xfe6e[43]](_0x83d0x11[_0xfe6e[34]],{raw:_0x83d0x11[_0xfe6e[35]]?(_0x83d0x11[_0xfe6e[35]][_0xfe6e[36]]=== undefined)?true:false:true,individualHooks:true,where:_0x83d0x11[_0xfe6e[35]]?_0x83d0x11[_0xfe6e[35]][_0xfe6e[40]]|| null:null,attributes:_0x83d0x11[_0xfe6e[35]]?_0x83d0x11[_0xfe6e[35]][_0xfe6e[41]]|| null:null,limit:_0x83d0x11[_0xfe6e[35]]?_0x83d0x11[_0xfe6e[35]][_0xfe6e[42]]|| null:null})[_0xfe6e[31]](function(_0x83d0x15){logger[_0xfe6e[24]](_0xfe6e[39],_0x83d0x11);logger[_0xfe6e[27]](_0xfe6e[39],_0x83d0x11,JSON[_0xfe6e[26]](_0x83d0x15));_0x83d0x12(_0x83d0x15)})[_0xfe6e[22]](function(_0x83d0x14){logger[_0xfe6e[21]](_0xfe6e[39],_0x83d0x14[_0xfe6e[29]],_0x83d0x11);_0x83d0x13(_0x83d0x16[_0xfe6e[21]](500,_0x83d0x14[_0xfe6e[29]]))})})}
\ No newline at end of file
+var _0x34e9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x55\x70\x64\x61\x74\x65\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65"];_0x34e9[0];var _=require(_0x34e9[1]);var util=require(_0x34e9[2]);var moment=require(_0x34e9[3]);var BPromise=require(_0x34e9[4]);var rs=require(_0x34e9[5]);var fs=require(_0x34e9[6]);var db=require(_0x34e9[8])[_0x34e9[7]];var utils=require(_0x34e9[9]);var logger=require(_0x34e9[11])(_0x34e9[10]);var config=require(_0x34e9[12]);var jayson=require(_0x34e9[13]);var client=jayson[_0x34e9[15]][_0x34e9[14]]({port:9002});var socket=require(_0x34e9[17])({host:_0x34e9[16],port:6379});require(_0x34e9[19])[_0x34e9[18]](socket);function respondWithRpcPromise(_0x2860xf,_0x2860x10,_0x2860x11){return  new BPromise(function(_0x2860x12,_0x2860x13){return client[_0x34e9[32]](_0x2860xf,_0x2860x11)[_0x34e9[31]](function(_0x2860x15){logger[_0x34e9[24]](_0x34e9[20],_0x2860x10,_0x34e9[23]);logger[_0x34e9[27]](_0x34e9[25],_0x2860x10,_0x34e9[23],JSON[_0x34e9[26]](_0x2860x15));if(_0x2860x15[_0x34e9[21]]){if(_0x2860x15[_0x34e9[21]][_0x34e9[28]]=== 500){logger[_0x34e9[21]](_0x34e9[20],_0x2860x10,_0x2860x15[_0x34e9[21]][_0x34e9[29]]);return _0x2860x13(_0x2860x15[_0x34e9[21]][_0x34e9[29]])};logger[_0x34e9[21]](_0x34e9[20],_0x2860x10,_0x2860x15[_0x34e9[21]][_0x34e9[29]]);return _0x2860x12(_0x2860x15[_0x34e9[21]][_0x34e9[29]])}else {logger[_0x34e9[24]](_0x34e9[20],_0x2860x10,_0x34e9[23]);_0x2860x12(_0x2860x15[_0x34e9[30]][_0x34e9[29]])}})[_0x34e9[22]](function(_0x2860x14){logger[_0x34e9[21]](_0x34e9[20],_0x2860x10,_0x2860x14);_0x2860x13(_0x2860x14)})})}exports[_0x34e9[33]]= function(_0x2860x11){var _0x2860x16=this;return  new Promise(function(_0x2860x12,_0x2860x13){return db[_0x34e9[38]][_0x34e9[37]](_0x2860x11[_0x34e9[34]],{raw:_0x2860x11[_0x34e9[35]]?(_0x2860x11[_0x34e9[35]][_0x34e9[36]]=== undefined)?true:false:true})[_0x34e9[31]](function(_0x2860x15){logger[_0x34e9[24]](_0x34e9[33],_0x2860x11);logger[_0x34e9[27]](_0x34e9[33],_0x2860x11,JSON[_0x34e9[26]](_0x2860x15));_0x2860x12(_0x2860x15)})[_0x34e9[22]](function(_0x2860x14){logger[_0x34e9[21]](_0x34e9[33],_0x2860x14[_0x34e9[29]],_0x2860x11);_0x2860x13(_0x2860x16[_0x34e9[21]](500,_0x2860x14[_0x34e9[29]]))})})};exports[_0x34e9[39]]= function(_0x2860x11){var _0x2860x16=this;return  new Promise(function(_0x2860x12,_0x2860x13){return db[_0x34e9[38]][_0x34e9[43]](_0x2860x11[_0x34e9[34]],{raw:_0x2860x11[_0x34e9[35]]?(_0x2860x11[_0x34e9[35]][_0x34e9[36]]=== undefined)?true:false:true,individualHooks:true,where:_0x2860x11[_0x34e9[35]]?_0x2860x11[_0x34e9[35]][_0x34e9[40]]|| null:null,attributes:_0x2860x11[_0x34e9[35]]?_0x2860x11[_0x34e9[35]][_0x34e9[41]]|| null:null,limit:_0x2860x11[_0x34e9[35]]?_0x2860x11[_0x34e9[35]][_0x34e9[42]]|| null:null})[_0x34e9[31]](function(_0x2860x15){logger[_0x34e9[24]](_0x34e9[39],_0x2860x11);logger[_0x34e9[27]](_0x34e9[39],_0x2860x11,JSON[_0x34e9[26]](_0x2860x15));_0x2860x12(_0x2860x15)})[_0x34e9[22]](function(_0x2860x14){logger[_0x34e9[21]](_0x34e9[39],_0x2860x14[_0x34e9[29]],_0x2860x11);_0x2860x13(_0x2860x16[_0x34e9[21]](500,_0x2860x14[_0x34e9[29]]))})})}
\ No newline at end of file
index 68cc055..5032111 100644 (file)
@@ -1 +1 @@
-var _0x366a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E"];_0x366a[0];var FaxMessageEvents=require(_0x366a[1]);var events=[_0x366a[2],_0x366a[3],_0x366a[4]];function createListener(_0xa8cdx4,_0xa8cdx5){return function(_0xa8cdx6){_0xa8cdx5[_0x366a[5]](_0xa8cdx4,_0xa8cdx6)}}function removeListener(_0xa8cdx4,_0xa8cdx8){return function(){FaxMessageEvents[_0x366a[6]](_0xa8cdx4,_0xa8cdx8)}}exports[_0x366a[7]]= function(_0xa8cdx5){for(var _0xa8cdx9=0,_0xa8cdxa=events[_0x366a[8]];_0xa8cdx9< _0xa8cdxa;_0xa8cdx9++){var _0xa8cdx4=events[_0xa8cdx9];var _0xa8cdx8=createListener(_0x366a[9]+ _0xa8cdx4,_0xa8cdx5);FaxMessageEvents[_0x366a[10]](_0xa8cdx4,_0xa8cdx8)}}
\ No newline at end of file
+var _0x3a70=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E"];_0x3a70[0];var FaxMessageEvents=require(_0x3a70[1]);var events=[_0x3a70[2],_0x3a70[3],_0x3a70[4]];function createListener(_0xe51ax4,_0xe51ax5){return function(_0xe51ax6){_0xe51ax5[_0x3a70[5]](_0xe51ax4,_0xe51ax6)}}function removeListener(_0xe51ax4,_0xe51ax8){return function(){FaxMessageEvents[_0x3a70[6]](_0xe51ax4,_0xe51ax8)}}exports[_0x3a70[7]]= function(_0xe51ax5){for(var _0xe51ax9=0,_0xe51axa=events[_0x3a70[8]];_0xe51ax9< _0xe51axa;_0xe51ax9++){var _0xe51ax4=events[_0xe51ax9];var _0xe51ax8=createListener(_0x3a70[9]+ _0xe51ax4,_0xe51ax5);FaxMessageEvents[_0x3a70[10]](_0xe51ax4,_0xe51ax8)}}
\ No newline at end of file
index 6be762f..3612397 100644 (file)
@@ -1 +1 @@
-var _0xf5d6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x66\x61\x78","\x66\x61\x78\x6D\x65\x73\x73\x61\x67\x65\x3A\x63\x72\x65\x61\x74\x65","\x74\x72\x61\x63\x6B\x65\x64","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74","\x61\x63\x63\x65\x70\x74","\x2F\x3A\x69\x64\x2F\x72\x65\x6A\x65\x63\x74","\x72\x65\x6A\x65\x63\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf5d6[0];var multer=require(_0xf5d6[1]);var util=require(_0xf5d6[2]);var path=require(_0xf5d6[3]);var express=require(_0xf5d6[4]);var router=express.Router();var auth=require(_0xf5d6[5]);var interaction=require(_0xf5d6[6]);var config=require(_0xf5d6[7]);var controller=require(_0xf5d6[8]);router[_0xf5d6[12]](_0xf5d6[9],auth[_0xf5d6[10]](),controller[_0xf5d6[11]]);router[_0xf5d6[12]](_0xf5d6[13],auth[_0xf5d6[10]](),controller[_0xf5d6[14]]);router[_0xf5d6[12]](_0xf5d6[15],auth[_0xf5d6[10]](),controller[_0xf5d6[16]]);router[_0xf5d6[21]](_0xf5d6[9],auth[_0xf5d6[10]](),interaction[_0xf5d6[19]](_0xf5d6[17],_0xf5d6[18]),controller[_0xf5d6[20]]);router[_0xf5d6[23]](_0xf5d6[15],auth[_0xf5d6[10]](),controller[_0xf5d6[22]]);router[_0xf5d6[23]](_0xf5d6[24],auth[_0xf5d6[10]](),controller[_0xf5d6[25]]);router[_0xf5d6[23]](_0xf5d6[26],auth[_0xf5d6[10]](),controller[_0xf5d6[27]]);router[_0xf5d6[29]](_0xf5d6[15],auth[_0xf5d6[10]](),controller[_0xf5d6[28]]);module[_0xf5d6[30]]= router
\ No newline at end of file
+var _0x95e5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x66\x61\x78","\x66\x61\x78\x6D\x65\x73\x73\x61\x67\x65\x3A\x63\x72\x65\x61\x74\x65","\x74\x72\x61\x63\x6B\x65\x64","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74","\x61\x63\x63\x65\x70\x74","\x2F\x3A\x69\x64\x2F\x72\x65\x6A\x65\x63\x74","\x72\x65\x6A\x65\x63\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x95e5[0];var multer=require(_0x95e5[1]);var util=require(_0x95e5[2]);var path=require(_0x95e5[3]);var express=require(_0x95e5[4]);var router=express.Router();var auth=require(_0x95e5[5]);var interaction=require(_0x95e5[6]);var config=require(_0x95e5[7]);var controller=require(_0x95e5[8]);router[_0x95e5[12]](_0x95e5[9],auth[_0x95e5[10]](),controller[_0x95e5[11]]);router[_0x95e5[12]](_0x95e5[13],auth[_0x95e5[10]](),controller[_0x95e5[14]]);router[_0x95e5[12]](_0x95e5[15],auth[_0x95e5[10]](),controller[_0x95e5[16]]);router[_0x95e5[21]](_0x95e5[9],auth[_0x95e5[10]](),interaction[_0x95e5[19]](_0x95e5[17],_0x95e5[18]),controller[_0x95e5[20]]);router[_0x95e5[23]](_0x95e5[15],auth[_0x95e5[10]](),controller[_0x95e5[22]]);router[_0x95e5[23]](_0x95e5[24],auth[_0x95e5[10]](),controller[_0x95e5[25]]);router[_0x95e5[23]](_0x95e5[26],auth[_0x95e5[10]](),controller[_0x95e5[27]]);router[_0x95e5[29]](_0x95e5[15],auth[_0x95e5[10]](),controller[_0x95e5[28]]);module[_0x95e5[30]]= router
\ No newline at end of file
index 58313a6..faba099 100644 (file)
@@ -1 +1 @@
-var _0x4f35=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x49\x4E\x54\x45\x47\x45\x52","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E"];_0x4f35[0];var Sequelize=require(_0x4f35[1]);module[_0x4f35[2]]= {name:{type:Sequelize[_0x4f35[3]],unique:_0x4f35[4],allowNull:false,validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i}},description:{type:Sequelize[_0x4f35[3]]},timeout:{type:Sequelize[_0x4f35[5]],allowNull:false,validate:{min:1,max:2147483}},strategy:{type:Sequelize.ENUM(_0x4f35[6],_0x4f35[7],_0x4f35[8]),allowNull:false},lastAgent:{type:Sequelize[_0x4f35[5]],defaultValue:0}}
\ No newline at end of file
+var _0x33e9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x49\x4E\x54\x45\x47\x45\x52","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E"];_0x33e9[0];var Sequelize=require(_0x33e9[1]);module[_0x33e9[2]]= {name:{type:Sequelize[_0x33e9[3]],unique:_0x33e9[4],allowNull:false,validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i}},description:{type:Sequelize[_0x33e9[3]]},timeout:{type:Sequelize[_0x33e9[5]],allowNull:false,validate:{min:1,max:2147483}},strategy:{type:Sequelize.ENUM(_0x33e9[6],_0x33e9[7],_0x33e9[8]),allowNull:false},lastAgent:{type:Sequelize[_0x33e9[5]],defaultValue:0}}
\ No newline at end of file
index b0310e0..18c1908 100644 (file)
@@ -1 +1 @@
-var _0x4f45=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x46\x61\x78\x51\x75\x65\x75\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x66\x6F\x72\x6D\x61\x74","\x66\x61\x78\x50\x61\x75\x73\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x55\x73\x65\x72\x49\x64","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x55\x73\x65\x72","\x67\x65\x74","\x55\x73\x65\x72\x46\x61\x78\x51\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x54\x65\x61\x6D\x73","\x54\x65\x61\x6D","\x61\x64\x64\x54\x65\x61\x6D\x73","\x69\x64\x73","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x41\x67\x65\x6E\x74\x73","\x75\x6E\x69\x6F\x6E","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x75\x73\x65\x72\x46\x61\x78\x51\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x6F\x6D\x69\x74","\x69\x73\x41\x72\x72\x61\x79","\x75\x73\x65\x72\x46\x61\x78\x51\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x67\x65\x74\x41\x67\x65\x6E\x74\x73"];_0x4f45[0];var jsonpatch=require(_0x4f45[1]);var rp=require(_0x4f45[2]);var moment=require(_0x4f45[3]);var BPromise=require(_0x4f45[4]);var Mustache=require(_0x4f45[5]);var util=require(_0x4f45[6]);var path=require(_0x4f45[7]);var sox=require(_0x4f45[8]);var csv=require(_0x4f45[9]);var ejs=require(_0x4f45[10]);var fs=require(_0x4f45[11]);var _=require(_0x4f45[12]);var squel=require(_0x4f45[13]);var crypto=require(_0x4f45[14]);var jsforce=require(_0x4f45[15]);var deskjs=require(_0x4f45[16]);var toCsv=require(_0x4f45[9]);var querystring=require(_0x4f45[17]);var Papa=require(_0x4f45[18]);var qs=require(_0x4f45[19]);var logger=require(_0x4f45[21])(_0x4f45[20]);var utils=require(_0x4f45[22]);var config=require(_0x4f45[23]);var db=require(_0x4f45[25])[_0x4f45[24]];var socket=require(_0x4f45[27])({host:_0x4f45[26],port:6379});require(_0x4f45[29])[_0x4f45[28]](socket);function respondWithStatusCode(_0xdfecx1b,_0xdfecx1c){_0xdfecx1c= _0xdfecx1c|| 204;return function(_0xdfecx1d){if(_0xdfecx1d){return _0xdfecx1b[_0x4f45[30]](_0xdfecx1c)};return _0xdfecx1b[_0x4f45[32]](_0xdfecx1c)[_0x4f45[31]]()}}function respondWithResult(_0xdfecx1b,_0xdfecx1c){_0xdfecx1c= _0xdfecx1c|| 200;return function(_0xdfecx1d){if(_0xdfecx1d){return _0xdfecx1b[_0x4f45[32]](_0xdfecx1c)[_0x4f45[33]](_0xdfecx1d)}}}function respondWithFilteredResult(_0xdfecx1b,_0xdfecx20){return function(_0xdfecx1d){if(_0xdfecx1d){var _0xdfecx21=_0xdfecx1d[_0x4f45[34]],_0xdfecx22=_0xdfecx20[_0x4f45[35]],_0xdfecx23=_0xdfecx20[_0x4f45[35]]+ _0xdfecx20[_0x4f45[36]],_0xdfecx1c;if(_0xdfecx23>= _0xdfecx21){_0xdfecx23= _0xdfecx21;_0xdfecx1c= 200}else {_0xdfecx1c= 206};_0xdfecx1b[_0x4f45[32]](_0xdfecx1c);return _0xdfecx1b[_0x4f45[40]](_0x4f45[37],_0xdfecx22+ _0x4f45[38]+ _0xdfecx23+ _0x4f45[39]+ _0xdfecx21)[_0x4f45[33]](_0xdfecx1d)};return null}}function patchUpdates(_0xdfecx25){return function(_0xdfecx1d){try{jsonpatch[_0x4f45[41]](_0xdfecx1d,_0xdfecx25,true)}catch(err){return BPromise[_0x4f45[42]](err)};return _0xdfecx1d[_0x4f45[43]]()}}function saveUpdates(_0xdfecx27,_0xdfecx1c){return function(_0xdfecx1d){if(_0xdfecx1d){return _0xdfecx1d[_0x4f45[45]](_0xdfecx27)[_0x4f45[44]](function(_0xdfecx28){return _0xdfecx28})};return null}}function removeEntity(_0xdfecx1b,_0xdfecx1c){return function(_0xdfecx1d){if(_0xdfecx1d){return _0xdfecx1d[_0x4f45[46]]()[_0x4f45[44]](function(){_0xdfecx1b[_0x4f45[32]](204)[_0x4f45[31]]()})}}}function handleEntityNotFound(_0xdfecx1b,_0xdfecx1c){return function(_0xdfecx1d){if(!_0xdfecx1d){_0xdfecx1b[_0x4f45[30]](404)};return _0xdfecx1d}}function handleError(_0xdfecx1b,_0xdfecx1c){_0xdfecx1c= _0xdfecx1c|| 500;return function(_0xdfecx2c){logger[_0x4f45[48]](_0xdfecx2c[_0x4f45[47]]);if(_0xdfecx2c[_0x4f45[49]]){delete _0xdfecx2c[_0x4f45[49]]};_0xdfecx1b[_0x4f45[32]](_0xdfecx1c)[_0x4f45[50]](_0xdfecx2c)}}exports[_0x4f45[51]]= function(_0xdfecx2d,_0xdfecx1b){var _0xdfecx20={},_0xdfecx2e={},_0xdfecx2f={count:0,rows:[]};_0xdfecx2e[_0x4f45[52]]= _[_0x4f45[55]](db[_0x4f45[54]][_0x4f45[53]]);var _0xdfecx30={dateStart:_0xdfecx2d[_0x4f45[57]][_0x4f45[56]],dateEnd:_0xdfecx2d[_0x4f45[57]][_0x4f45[58]]};delete _0xdfecx2d[_0x4f45[57]][_0x4f45[56]];delete _0xdfecx2d[_0x4f45[57]][_0x4f45[58]];_0xdfecx2e[_0x4f45[57]]= _[_0x4f45[55]](_0xdfecx2d[_0x4f45[57]]);_0xdfecx2e[_0x4f45[59]]= _[_0x4f45[60]](_0xdfecx2e[_0x4f45[52]],_0xdfecx2e[_0x4f45[57]]);_0xdfecx20[_0x4f45[61]]= _[_0x4f45[60]](_0xdfecx2e[_0x4f45[52]],qs[_0x4f45[62]](_0xdfecx2d[_0x4f45[57]][_0x4f45[62]]));_0xdfecx20[_0x4f45[61]]= (_0xdfecx20[_0x4f45[61]][_0x4f45[63]])?_0xdfecx20[_0x4f45[61]]:_0xdfecx2e[_0x4f45[52]];if(!_0xdfecx2d[_0x4f45[57]][_0x4f45[65]](_0x4f45[64])){_0xdfecx20[_0x4f45[36]]= qs[_0x4f45[36]](_0xdfecx2d[_0x4f45[57]][_0x4f45[36]]);_0xdfecx20[_0x4f45[35]]= qs[_0x4f45[35]](_0xdfecx2d[_0x4f45[57]][_0x4f45[35]])};_0xdfecx20[_0x4f45[66]]= qs[_0x4f45[67]](_0xdfecx2d[_0x4f45[57]][_0x4f45[67]]);_0xdfecx20[_0x4f45[68]]= qs[_0x4f45[59]](_[_0x4f45[69]](_0xdfecx2d[_0x4f45[57]],_0xdfecx2e[_0x4f45[59]]));if(_0xdfecx30[_0x4f45[56]]){if(_0xdfecx30[_0x4f45[58]]){_0xdfecx30[_0x4f45[58]]= moment(_0xdfecx30[_0x4f45[58]])[_0x4f45[71]](1,_0x4f45[70])}else {_0xdfecx30[_0x4f45[58]]= moment(_0xdfecx30[_0x4f45[56]])[_0x4f45[71]](1,_0x4f45[70])};_[_0x4f45[72]](_0xdfecx20[_0x4f45[68]],{createdAt:{$gte:_0xdfecx30[_0x4f45[56]],$lte:_0xdfecx30[_0x4f45[58]]}})};if(_0xdfecx2d[_0x4f45[57]][_0x4f45[73]]){_0xdfecx20[_0x4f45[68]]= _[_0x4f45[72]](_0xdfecx20[_0x4f45[68]],{$or:_[_0x4f45[75]](_0xdfecx20[_0x4f45[61]],function(_0xdfecx31){var _0xdfecx2f={};_0xdfecx2f[_0xdfecx31]= {$like:_0x4f45[74]+ _0xdfecx2d[_0x4f45[57]][_0x4f45[73]]+ _0x4f45[74]};return _0xdfecx2f})})};_0xdfecx20= _[_0x4f45[72]]({},_0xdfecx20,_0xdfecx2d[_0x4f45[76]]);var _0xdfecx32={where:_0xdfecx20[_0x4f45[68]]};return db[_0x4f45[54]][_0x4f45[34]](_0xdfecx32)[_0x4f45[44]](function(_0xdfecx21){_0xdfecx2f[_0x4f45[34]]= _0xdfecx21;if(_0xdfecx2d[_0x4f45[57]][_0x4f45[79]]){_0xdfecx20[_0x4f45[80]]= [{all:true}]};return db[_0x4f45[54]][_0x4f45[81]](_0xdfecx20)})[_0x4f45[44]](function(_0xdfecx33){_0xdfecx2f[_0x4f45[78]]= _0xdfecx33;return _0xdfecx2f})[_0x4f45[44]](respondWithFilteredResult(_0xdfecx1b,_0xdfecx20))[_0x4f45[77]](handleError(_0xdfecx1b,null))};exports[_0x4f45[82]]= function(_0xdfecx2d,_0xdfecx1b){var _0xdfecx20={raw:true,where:{id:_0xdfecx2d[_0x4f45[84]][_0x4f45[83]]}},_0xdfecx2e={};_0xdfecx2e[_0x4f45[52]]= _[_0x4f45[55]](db[_0x4f45[54]][_0x4f45[53]]);_0xdfecx2e[_0x4f45[57]]= _[_0x4f45[55]](_0xdfecx2d[_0x4f45[57]]);_0xdfecx2e[_0x4f45[59]]= _[_0x4f45[60]](_0xdfecx2e[_0x4f45[52]],_0xdfecx2e[_0x4f45[57]]);_0xdfecx20[_0x4f45[61]]= _[_0x4f45[60]](_0xdfecx2e[_0x4f45[52]],qs[_0x4f45[62]](_0xdfecx2d[_0x4f45[57]][_0x4f45[62]]));_0xdfecx20[_0x4f45[61]]= (_0xdfecx20[_0x4f45[61]][_0x4f45[63]])?_0xdfecx20[_0x4f45[61]]:_0xdfecx2e[_0x4f45[52]];if(_0xdfecx2d[_0x4f45[57]][_0x4f45[79]]){_0xdfecx20[_0x4f45[80]]= [{all:true}]};_0xdfecx20= _[_0x4f45[72]]({},_0xdfecx20,_0xdfecx2d[_0x4f45[76]]);return db[_0x4f45[54]][_0x4f45[85]](_0xdfecx20)[_0x4f45[44]](handleEntityNotFound(_0xdfecx1b,null))[_0x4f45[44]](respondWithResult(_0xdfecx1b,null))[_0x4f45[77]](handleError(_0xdfecx1b,null))};exports[_0x4f45[86]]= function(_0xdfecx2d,_0xdfecx1b){return db[_0x4f45[54]][_0x4f45[86]](_0xdfecx2d[_0x4f45[87]],{})[_0x4f45[44]](respondWithResult(_0xdfecx1b,201))[_0x4f45[77]](handleError(_0xdfecx1b,null))};exports[_0x4f45[45]]= function(_0xdfecx2d,_0xdfecx1b){if(_0xdfecx2d[_0x4f45[87]][_0x4f45[83]]){delete _0xdfecx2d[_0x4f45[87]][_0x4f45[83]]};return db[_0x4f45[54]][_0x4f45[85]]({where:{id:_0xdfecx2d[_0x4f45[84]][_0x4f45[83]]}})[_0x4f45[44]](handleEntityNotFound(_0xdfecx1b,null))[_0x4f45[44]](saveUpdates(_0xdfecx2d[_0x4f45[87]],null))[_0x4f45[44]](respondWithResult(_0xdfecx1b,null))[_0x4f45[77]](handleError(_0xdfecx1b,null))};exports[_0x4f45[46]]= function(_0xdfecx2d,_0xdfecx1b){return db[_0x4f45[54]][_0x4f45[85]]({where:{id:_0xdfecx2d[_0x4f45[84]][_0x4f45[83]]}})[_0x4f45[44]](handleEntityNotFound(_0xdfecx1b,null))[_0x4f45[44]](removeEntity(_0xdfecx1b,null))[_0x4f45[77]](handleError(_0xdfecx1b,null))};exports[_0x4f45[88]]= function(_0xdfecx2d,_0xdfecx1b){return db[_0x4f45[54]][_0x4f45[88]]()[_0x4f45[44]](respondWithResult(_0xdfecx1b,null))[_0x4f45[77]](handleError(_0xdfecx1b,null))};exports[_0x4f45[89]]= function(_0xdfecx2d,_0xdfecx1b,_0xdfecx34){var _0xdfecx20={raw:true,where:{}},_0xdfecx2e={},_0xdfecx35;return db[_0x4f45[54]][_0x4f45[103]]({where:{id:_0xdfecx2d[_0x4f45[84]][_0x4f45[83]]}})[_0x4f45[44]](handleEntityNotFound(_0xdfecx1b,null))[_0x4f45[44]](function(_0xdfecx1d){if(_0xdfecx1d){_0xdfecx35= _0xdfecx1d[_0x4f45[100]]({plain:true});_0xdfecx2e[_0x4f45[52]]= _[_0x4f45[55]](db[_0x4f45[101]][_0x4f45[53]]);_0xdfecx2e[_0x4f45[57]]= _[_0x4f45[55]](_0xdfecx2d[_0x4f45[57]]);_0xdfecx2e[_0x4f45[59]]= _[_0x4f45[60]](_0xdfecx2e[_0x4f45[52]],_0xdfecx2e[_0x4f45[57]]);_0xdfecx20[_0x4f45[61]]= _[_0x4f45[60]](_0xdfecx2e[_0x4f45[52]],qs[_0x4f45[62]](_0xdfecx2d[_0x4f45[57]][_0x4f45[62]]));_0xdfecx20[_0x4f45[61]]= (_0xdfecx20[_0x4f45[61]][_0x4f45[63]])?_0xdfecx20[_0x4f45[61]]:_0xdfecx2e[_0x4f45[52]];if(!_0xdfecx2d[_0x4f45[57]][_0x4f45[65]](_0x4f45[64])){_0xdfecx20[_0x4f45[36]]= qs[_0x4f45[36]](_0xdfecx2d[_0x4f45[57]][_0x4f45[36]]);_0xdfecx20[_0x4f45[35]]= qs[_0x4f45[35]](_0xdfecx2d[_0x4f45[57]][_0x4f45[35]])};_0xdfecx20[_0x4f45[66]]= qs[_0x4f45[67]](_0xdfecx2d[_0x4f45[57]][_0x4f45[67]]);_0xdfecx20[_0x4f45[68]]= qs[_0x4f45[59]](_[_0x4f45[69]](_0xdfecx2d[_0x4f45[57]],_0xdfecx2e[_0x4f45[59]]));_0xdfecx20[_0x4f45[68]][_0x4f45[102]]= _0xdfecx1d[_0x4f45[83]];if(_0xdfecx2d[_0x4f45[57]][_0x4f45[73]]){_0xdfecx20[_0x4f45[68]]= _[_0x4f45[72]](_0xdfecx20[_0x4f45[68]],{$or:_[_0x4f45[75]](_0xdfecx20[_0x4f45[61]],function(_0xdfecx31){var _0xdfecx2f={};_0xdfecx2f[_0xdfecx31]= {$like:_0x4f45[74]+ _0xdfecx2d[_0x4f45[57]][_0x4f45[73]]+ _0x4f45[74]};return _0xdfecx2f})})};_0xdfecx20= _[_0x4f45[72]]({},_0xdfecx20,_0xdfecx2d[_0x4f45[76]]);return db[_0x4f45[101]][_0x4f45[81]](_0xdfecx20)}})[_0x4f45[44]](function(_0xdfecx1b){if(_0xdfecx1b){return db[_0x4f45[99]][_0x4f45[98]]({where:{id:_[_0x4f45[75]](_0xdfecx1b,_0x4f45[96]),role:_0x4f45[97]},attributes:[_0x4f45[83],_0x4f45[49],_0x4f45[93],_0x4f45[95],_0x4f45[94]]})}})[_0x4f45[44]](function(_0xdfecx1b){if(_0xdfecx1b){return {count:_0xdfecx1b[_0x4f45[34]],rows:_[_0x4f45[75]](_0xdfecx1b[_0x4f45[78]],function(_0xdfecx36){return {membername:_0xdfecx36[_0x4f45[49]],UserId:_0xdfecx36[_0x4f45[83]],queue_name:_0xdfecx35[_0x4f45[49]],FaxQueueId:_0xdfecx35[_0x4f45[83]],interface:util[_0x4f45[92]](_0x4f45[90],_0x4f45[91],_0xdfecx36[_0x4f45[49]]),penalty:0,paused:_0xdfecx36[_0x4f45[93]],createdAt:_0xdfecx36[_0x4f45[94]],updatedAt:_0xdfecx36[_0x4f45[95]]}})}}else {return {count:0,rows:[]}}})[_0x4f45[44]](respondWithFilteredResult(_0xdfecx1b,_0xdfecx20))[_0x4f45[77]](handleError(_0xdfecx1b,null))};exports[_0x4f45[104]]= function(_0xdfecx2d,_0xdfecx1d,_0xdfecx34){var _0xdfecx20={};var _0xdfecx2e={};var _0xdfecx37;var _0xdfecx21;return db[_0x4f45[54]][_0x4f45[103]]({where:{id:_0xdfecx2d[_0x4f45[84]][_0x4f45[83]]}})[_0x4f45[44]](handleEntityNotFound(_0xdfecx1d,null))[_0x4f45[44]](function(_0xdfecx1d){if(_0xdfecx1d){_0xdfecx37= _0xdfecx1d;_0xdfecx2e[_0x4f45[52]]= _[_0x4f45[55]](db[_0x4f45[105]][_0x4f45[53]]);_0xdfecx2e[_0x4f45[57]]= _[_0x4f45[55]](_0xdfecx2d[_0x4f45[57]]);_0xdfecx2e[_0x4f45[59]]= _[_0x4f45[60]](_0xdfecx2e[_0x4f45[52]],_0xdfecx2e[_0x4f45[57]]);_0xdfecx20[_0x4f45[61]]= _[_0x4f45[60]](_0xdfecx2e[_0x4f45[52]],qs[_0x4f45[62]](_0xdfecx2d[_0x4f45[57]][_0x4f45[62]]));_0xdfecx20[_0x4f45[61]]= (_0xdfecx20[_0x4f45[61]][_0x4f45[63]])?_0xdfecx20[_0x4f45[61]]:_0xdfecx2e[_0x4f45[52]];_0xdfecx20[_0x4f45[66]]= qs[_0x4f45[67]](_0xdfecx2d[_0x4f45[57]][_0x4f45[67]]);_0xdfecx20[_0x4f45[68]]= qs[_0x4f45[59]](_[_0x4f45[69]](_0xdfecx2d[_0x4f45[57]],_0xdfecx2e[_0x4f45[59]]));if(_0xdfecx2d[_0x4f45[57]][_0x4f45[73]]){_0xdfecx20[_0x4f45[68]]= _[_0x4f45[72]](_0xdfecx20[_0x4f45[68]],{$or:_[_0x4f45[75]](_0xdfecx20[_0x4f45[61]],function(_0xdfecx31){var _0xdfecx2f={};_0xdfecx2f[_0xdfecx31]= {$like:_0x4f45[74]+ _0xdfecx2d[_0x4f45[57]][_0x4f45[73]]+ _0x4f45[74]};return _0xdfecx2f})})};_0xdfecx20= _[_0x4f45[72]]({},_0xdfecx20,_0xdfecx2d[_0x4f45[76]]);return _0xdfecx37[_0x4f45[104]](_0xdfecx20)}})[_0x4f45[44]](function(_0xdfecx38){if(_0xdfecx38){_0xdfecx21= _0xdfecx38[_0x4f45[63]];if(!_0xdfecx2d[_0x4f45[57]][_0x4f45[65]](_0x4f45[64])){_0xdfecx20[_0x4f45[36]]= qs[_0x4f45[36]](_0xdfecx2d[_0x4f45[57]][_0x4f45[36]]);_0xdfecx20[_0x4f45[35]]= qs[_0x4f45[35]](_0xdfecx2d[_0x4f45[57]][_0x4f45[35]])};return _0xdfecx37[_0x4f45[104]](_0xdfecx20)}})[_0x4f45[44]](function(_0xdfecx33){if(_0xdfecx33){return _0xdfecx33?{count:_0xdfecx21,rows:_0xdfecx33}:null}})[_0x4f45[44]](respondWithResult(_0xdfecx1d,null))[_0x4f45[77]](handleError(_0xdfecx1d,null))};exports[_0x4f45[106]]= function(_0xdfecx2d,_0xdfecx1b,_0xdfecx34){var _0xdfecx39=[];var _0xdfecx35;return db[_0x4f45[105]][_0x4f45[81]]({where:{id:_0xdfecx2d[_0x4f45[87]][_0x4f45[107]]},attributes:[_0x4f45[83]],include:[{model:db[_0x4f45[99]],as:_0x4f45[110],attributes:[_0x4f45[83]],raw:true}]})[_0x4f45[44]](function(_0xdfecx3c){if(_0xdfecx3c){for(var _0xdfecx3d=0;_0xdfecx3d< _0xdfecx3c[_0x4f45[63]];_0xdfecx3d+= 1){for(var _0xdfecx3e=0;_0xdfecx3e< _0xdfecx3c[_0xdfecx3d][_0x4f45[110]][_0x4f45[63]];_0xdfecx3e+= 1){_0xdfecx39= _[_0x4f45[111]](_0xdfecx39,[_0xdfecx3c[_0xdfecx3d][_0x4f45[110]][_0xdfecx3e][_0x4f45[83]]])}};return _0xdfecx39}})[_0x4f45[44]](function(_0xdfecx3b){if(_0xdfecx3b){return db[_0x4f45[54]][_0x4f45[85]]({where:{id:_0xdfecx2d[_0x4f45[84]][_0x4f45[83]]}})}})[_0x4f45[44]](function(_0xdfecx3a){if(_0xdfecx3a){_0xdfecx35= _0xdfecx3a;return _0xdfecx35[_0x4f45[109]](_0xdfecx39,{penalty:_0xdfecx2d[_0x4f45[87]][_0x4f45[108]]})}})[_0x4f45[44]](function(_0xdfecx1d){if(_0xdfecx1d){return _0xdfecx35[_0x4f45[106]](_0xdfecx2d[_0x4f45[87]][_0x4f45[107]])}})[_0x4f45[44]](handleEntityNotFound(_0xdfecx1b,null))[_0x4f45[44]](respondWithStatusCode(_0xdfecx1b,null))[_0x4f45[77]](handleError(_0xdfecx1b,null))};exports[_0x4f45[112]]= function(_0xdfecx2d,_0xdfecx1b,_0xdfecx34){var _0xdfecx39=[];var _0xdfecx35;return db[_0x4f45[105]][_0x4f45[81]]({where:{id:_0xdfecx2d[_0x4f45[57]][_0x4f45[107]]},attributes:[_0x4f45[83]],include:[{model:db[_0x4f45[99]],as:_0x4f45[110],attributes:[_0x4f45[83]],raw:true}]})[_0x4f45[44]](function(_0xdfecx3c){if(_0xdfecx3c){for(var _0xdfecx3d=0;_0xdfecx3d< _0xdfecx3c[_0x4f45[63]];_0xdfecx3d+= 1){for(var _0xdfecx3e=0;_0xdfecx3e< _0xdfecx3c[_0xdfecx3d][_0x4f45[110]][_0x4f45[63]];_0xdfecx3e+= 1){_0xdfecx39= _[_0x4f45[111]](_0xdfecx39,[_0xdfecx3c[_0xdfecx3d][_0x4f45[110]][_0xdfecx3e][_0x4f45[83]]])}};return _0xdfecx39}})[_0x4f45[44]](function(_0xdfecx3b){if(_0xdfecx3b){return db[_0x4f45[54]][_0x4f45[85]]({where:{id:_0xdfecx2d[_0x4f45[84]][_0x4f45[83]]}})}})[_0x4f45[44]](function(_0xdfecx3a){if(_0xdfecx3a){_0xdfecx35= _0xdfecx3a;return _0xdfecx35[_0x4f45[113]](_0xdfecx39)}})[_0x4f45[44]](function(_0xdfecx1d){if(_0xdfecx35){return _0xdfecx35[_0x4f45[112]](_0xdfecx2d[_0x4f45[57]][_0x4f45[107]])}})[_0x4f45[44]](handleEntityNotFound(_0xdfecx1b,null))[_0x4f45[44]](respondWithStatusCode(_0xdfecx1b,null))[_0x4f45[77]](handleError(_0xdfecx1b,null))};exports[_0x4f45[109]]= function(_0xdfecx2d,_0xdfecx1b,_0xdfecx34){return db[_0x4f45[54]][_0x4f45[85]]({where:{id:_0xdfecx2d[_0x4f45[84]][_0x4f45[83]]}})[_0x4f45[44]](handleEntityNotFound(_0xdfecx1b,null))[_0x4f45[44]](function(_0xdfecx1d){if(_0xdfecx1d){return _0xdfecx1d[_0x4f45[109]](_0xdfecx2d[_0x4f45[87]][_0x4f45[107]],_[_0x4f45[117]](_0xdfecx2d[_0x4f45[87]],[_0x4f45[107],_0x4f45[83]])|| {})[_0x4f45[116]](function(_0xdfecx38){for(var _0xdfecx3d=0;_0xdfecx3d< _0xdfecx2d[_0x4f45[87]][_0x4f45[107]][_0x4f45[63]];_0xdfecx3d+= 1){socket[_0x4f45[115]](_0x4f45[114],{UserId:_0xdfecx2d[_0x4f45[87]][_0x4f45[107]][_0xdfecx3d],FaxQueueId:_0xdfecx2d[_0x4f45[84]][_0x4f45[83]]})};return _0xdfecx38})}})[_0x4f45[44]](respondWithResult(_0xdfecx1b,null))[_0x4f45[77]](handleError(_0xdfecx1b,null))};exports[_0x4f45[113]]= function(_0xdfecx2d,_0xdfecx1b,_0xdfecx34){var _0xdfecx38;return db[_0x4f45[54]][_0x4f45[85]]({where:{id:_0xdfecx2d[_0x4f45[84]][_0x4f45[83]]}})[_0x4f45[44]](handleEntityNotFound(_0xdfecx1b,null))[_0x4f45[44]](function(_0xdfecx1d){if(_0xdfecx1d){return _0xdfecx1d[_0x4f45[113]](_0xdfecx2d[_0x4f45[57]][_0x4f45[107]])[_0x4f45[44]](function(_0xdfecx38){if(_[_0x4f45[118]](_0xdfecx2d[_0x4f45[57]][_0x4f45[107]])){for(var _0xdfecx3d=0;_0xdfecx3d< _0xdfecx2d[_0x4f45[57]][_0x4f45[107]][_0x4f45[63]];_0xdfecx3d+= 1){socket[_0x4f45[115]](_0x4f45[119],{UserId:_0xdfecx2d[_0x4f45[57]][_0x4f45[107]][_0xdfecx3d],FaxQueueId:_0xdfecx2d[_0x4f45[84]][_0x4f45[83]]})}}else {socket[_0x4f45[115]](_0x4f45[119],{UserId:_0xdfecx2d[_0x4f45[57]][_0x4f45[107]],FaxQueueId:_0xdfecx2d[_0x4f45[84]][_0x4f45[83]]})}})}})[_0x4f45[44]](respondWithStatusCode(_0xdfecx1b,null))[_0x4f45[77]](handleError(_0xdfecx1b,null))};exports[_0x4f45[120]]= function(_0xdfecx2d,_0xdfecx1d,_0xdfecx34){var _0xdfecx20={};var _0xdfecx2e={};var _0xdfecx37;var _0xdfecx21;return db[_0x4f45[54]][_0x4f45[103]]({where:{id:_0xdfecx2d[_0x4f45[84]][_0x4f45[83]]}})[_0x4f45[44]](handleEntityNotFound(_0xdfecx1d,null))[_0x4f45[44]](function(_0xdfecx1d){if(_0xdfecx1d){_0xdfecx37= _0xdfecx1d;_0xdfecx2e[_0x4f45[52]]= _[_0x4f45[55]](db[_0x4f45[99]][_0x4f45[53]]);_0xdfecx2e[_0x4f45[57]]= _[_0x4f45[55]](_0xdfecx2d[_0x4f45[57]]);_0xdfecx2e[_0x4f45[59]]= _[_0x4f45[60]](_0xdfecx2e[_0x4f45[52]],_0xdfecx2e[_0x4f45[57]]);_0xdfecx20[_0x4f45[61]]= _[_0x4f45[60]](_0xdfecx2e[_0x4f45[52]],qs[_0x4f45[62]](_0xdfecx2d[_0x4f45[57]][_0x4f45[62]]));_0xdfecx20[_0x4f45[61]]= (_0xdfecx20[_0x4f45[61]][_0x4f45[63]])?_0xdfecx20[_0x4f45[61]]:_0xdfecx2e[_0x4f45[52]];_0xdfecx20[_0x4f45[66]]= qs[_0x4f45[67]](_0xdfecx2d[_0x4f45[57]][_0x4f45[67]]);_0xdfecx20[_0x4f45[68]]= qs[_0x4f45[59]](_[_0x4f45[69]](_0xdfecx2d[_0x4f45[57]],_0xdfecx2e[_0x4f45[59]]));if(_0xdfecx2d[_0x4f45[57]][_0x4f45[73]]){_0xdfecx20[_0x4f45[68]]= _[_0x4f45[72]](_0xdfecx20[_0x4f45[68]],{$or:_[_0x4f45[75]](_0xdfecx20[_0x4f45[61]],function(_0xdfecx31){var _0xdfecx2f={};_0xdfecx2f[_0xdfecx31]= {$like:_0x4f45[74]+ _0xdfecx2d[_0x4f45[57]][_0x4f45[73]]+ _0x4f45[74]};return _0xdfecx2f})})};_0xdfecx20= _[_0x4f45[72]]({},_0xdfecx20,_0xdfecx2d[_0x4f45[76]]);return _0xdfecx37[_0x4f45[120]](_0xdfecx20)}})[_0x4f45[44]](function(_0xdfecx38){if(_0xdfecx38){_0xdfecx21= _0xdfecx38[_0x4f45[63]];if(!_0xdfecx2d[_0x4f45[57]][_0x4f45[65]](_0x4f45[64])){_0xdfecx20[_0x4f45[36]]= qs[_0x4f45[36]](_0xdfecx2d[_0x4f45[57]][_0x4f45[36]]);_0xdfecx20[_0x4f45[35]]= qs[_0x4f45[35]](_0xdfecx2d[_0x4f45[57]][_0x4f45[35]])};return _0xdfecx37[_0x4f45[120]](_0xdfecx20)}})[_0x4f45[44]](function(_0xdfecx33){if(_0xdfecx33){return _0xdfecx33?{count:_0xdfecx21,rows:_0xdfecx33}:null}})[_0x4f45[44]](respondWithResult(_0xdfecx1d,null))[_0x4f45[77]](handleError(_0xdfecx1d,null))}
\ No newline at end of file
+var _0x8efa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x46\x61\x78\x51\x75\x65\x75\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x66\x6F\x72\x6D\x61\x74","\x66\x61\x78\x50\x61\x75\x73\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x55\x73\x65\x72\x49\x64","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x55\x73\x65\x72","\x67\x65\x74","\x55\x73\x65\x72\x46\x61\x78\x51\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x54\x65\x61\x6D\x73","\x54\x65\x61\x6D","\x61\x64\x64\x54\x65\x61\x6D\x73","\x69\x64\x73","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x41\x67\x65\x6E\x74\x73","\x75\x6E\x69\x6F\x6E","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x75\x73\x65\x72\x46\x61\x78\x51\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x6F\x6D\x69\x74","\x69\x73\x41\x72\x72\x61\x79","\x75\x73\x65\x72\x46\x61\x78\x51\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x67\x65\x74\x41\x67\x65\x6E\x74\x73"];_0x8efa[0];var jsonpatch=require(_0x8efa[1]);var rp=require(_0x8efa[2]);var moment=require(_0x8efa[3]);var BPromise=require(_0x8efa[4]);var Mustache=require(_0x8efa[5]);var util=require(_0x8efa[6]);var path=require(_0x8efa[7]);var sox=require(_0x8efa[8]);var csv=require(_0x8efa[9]);var ejs=require(_0x8efa[10]);var fs=require(_0x8efa[11]);var _=require(_0x8efa[12]);var squel=require(_0x8efa[13]);var crypto=require(_0x8efa[14]);var jsforce=require(_0x8efa[15]);var deskjs=require(_0x8efa[16]);var toCsv=require(_0x8efa[9]);var querystring=require(_0x8efa[17]);var Papa=require(_0x8efa[18]);var qs=require(_0x8efa[19]);var logger=require(_0x8efa[21])(_0x8efa[20]);var utils=require(_0x8efa[22]);var config=require(_0x8efa[23]);var db=require(_0x8efa[25])[_0x8efa[24]];var socket=require(_0x8efa[27])({host:_0x8efa[26],port:6379});require(_0x8efa[29])[_0x8efa[28]](socket);function respondWithStatusCode(_0x342ex1b,_0x342ex1c){_0x342ex1c= _0x342ex1c|| 204;return function(_0x342ex1d){if(_0x342ex1d){return _0x342ex1b[_0x8efa[30]](_0x342ex1c)};return _0x342ex1b[_0x8efa[32]](_0x342ex1c)[_0x8efa[31]]()}}function respondWithResult(_0x342ex1b,_0x342ex1c){_0x342ex1c= _0x342ex1c|| 200;return function(_0x342ex1d){if(_0x342ex1d){return _0x342ex1b[_0x8efa[32]](_0x342ex1c)[_0x8efa[33]](_0x342ex1d)}}}function respondWithFilteredResult(_0x342ex1b,_0x342ex20){return function(_0x342ex1d){if(_0x342ex1d){var _0x342ex21=_0x342ex1d[_0x8efa[34]],_0x342ex22=_0x342ex20[_0x8efa[35]],_0x342ex23=_0x342ex20[_0x8efa[35]]+ _0x342ex20[_0x8efa[36]],_0x342ex1c;if(_0x342ex23>= _0x342ex21){_0x342ex23= _0x342ex21;_0x342ex1c= 200}else {_0x342ex1c= 206};_0x342ex1b[_0x8efa[32]](_0x342ex1c);return _0x342ex1b[_0x8efa[40]](_0x8efa[37],_0x342ex22+ _0x8efa[38]+ _0x342ex23+ _0x8efa[39]+ _0x342ex21)[_0x8efa[33]](_0x342ex1d)};return null}}function patchUpdates(_0x342ex25){return function(_0x342ex1d){try{jsonpatch[_0x8efa[41]](_0x342ex1d,_0x342ex25,true)}catch(err){return BPromise[_0x8efa[42]](err)};return _0x342ex1d[_0x8efa[43]]()}}function saveUpdates(_0x342ex27,_0x342ex1c){return function(_0x342ex1d){if(_0x342ex1d){return _0x342ex1d[_0x8efa[45]](_0x342ex27)[_0x8efa[44]](function(_0x342ex28){return _0x342ex28})};return null}}function removeEntity(_0x342ex1b,_0x342ex1c){return function(_0x342ex1d){if(_0x342ex1d){return _0x342ex1d[_0x8efa[46]]()[_0x8efa[44]](function(){_0x342ex1b[_0x8efa[32]](204)[_0x8efa[31]]()})}}}function handleEntityNotFound(_0x342ex1b,_0x342ex1c){return function(_0x342ex1d){if(!_0x342ex1d){_0x342ex1b[_0x8efa[30]](404)};return _0x342ex1d}}function handleError(_0x342ex1b,_0x342ex1c){_0x342ex1c= _0x342ex1c|| 500;return function(_0x342ex2c){logger[_0x8efa[48]](_0x342ex2c[_0x8efa[47]]);if(_0x342ex2c[_0x8efa[49]]){delete _0x342ex2c[_0x8efa[49]]};_0x342ex1b[_0x8efa[32]](_0x342ex1c)[_0x8efa[50]](_0x342ex2c)}}exports[_0x8efa[51]]= function(_0x342ex2d,_0x342ex1b){var _0x342ex20={},_0x342ex2e={},_0x342ex2f={count:0,rows:[]};_0x342ex2e[_0x8efa[52]]= _[_0x8efa[55]](db[_0x8efa[54]][_0x8efa[53]]);var _0x342ex30={dateStart:_0x342ex2d[_0x8efa[57]][_0x8efa[56]],dateEnd:_0x342ex2d[_0x8efa[57]][_0x8efa[58]]};delete _0x342ex2d[_0x8efa[57]][_0x8efa[56]];delete _0x342ex2d[_0x8efa[57]][_0x8efa[58]];_0x342ex2e[_0x8efa[57]]= _[_0x8efa[55]](_0x342ex2d[_0x8efa[57]]);_0x342ex2e[_0x8efa[59]]= _[_0x8efa[60]](_0x342ex2e[_0x8efa[52]],_0x342ex2e[_0x8efa[57]]);_0x342ex20[_0x8efa[61]]= _[_0x8efa[60]](_0x342ex2e[_0x8efa[52]],qs[_0x8efa[62]](_0x342ex2d[_0x8efa[57]][_0x8efa[62]]));_0x342ex20[_0x8efa[61]]= (_0x342ex20[_0x8efa[61]][_0x8efa[63]])?_0x342ex20[_0x8efa[61]]:_0x342ex2e[_0x8efa[52]];if(!_0x342ex2d[_0x8efa[57]][_0x8efa[65]](_0x8efa[64])){_0x342ex20[_0x8efa[36]]= qs[_0x8efa[36]](_0x342ex2d[_0x8efa[57]][_0x8efa[36]]);_0x342ex20[_0x8efa[35]]= qs[_0x8efa[35]](_0x342ex2d[_0x8efa[57]][_0x8efa[35]])};_0x342ex20[_0x8efa[66]]= qs[_0x8efa[67]](_0x342ex2d[_0x8efa[57]][_0x8efa[67]]);_0x342ex20[_0x8efa[68]]= qs[_0x8efa[59]](_[_0x8efa[69]](_0x342ex2d[_0x8efa[57]],_0x342ex2e[_0x8efa[59]]));if(_0x342ex30[_0x8efa[56]]){if(_0x342ex30[_0x8efa[58]]){_0x342ex30[_0x8efa[58]]= moment(_0x342ex30[_0x8efa[58]])[_0x8efa[71]](1,_0x8efa[70])}else {_0x342ex30[_0x8efa[58]]= moment(_0x342ex30[_0x8efa[56]])[_0x8efa[71]](1,_0x8efa[70])};_[_0x8efa[72]](_0x342ex20[_0x8efa[68]],{createdAt:{$gte:_0x342ex30[_0x8efa[56]],$lte:_0x342ex30[_0x8efa[58]]}})};if(_0x342ex2d[_0x8efa[57]][_0x8efa[73]]){_0x342ex20[_0x8efa[68]]= _[_0x8efa[72]](_0x342ex20[_0x8efa[68]],{$or:_[_0x8efa[75]](_0x342ex20[_0x8efa[61]],function(_0x342ex31){var _0x342ex2f={};_0x342ex2f[_0x342ex31]= {$like:_0x8efa[74]+ _0x342ex2d[_0x8efa[57]][_0x8efa[73]]+ _0x8efa[74]};return _0x342ex2f})})};_0x342ex20= _[_0x8efa[72]]({},_0x342ex20,_0x342ex2d[_0x8efa[76]]);var _0x342ex32={where:_0x342ex20[_0x8efa[68]]};return db[_0x8efa[54]][_0x8efa[34]](_0x342ex32)[_0x8efa[44]](function(_0x342ex21){_0x342ex2f[_0x8efa[34]]= _0x342ex21;if(_0x342ex2d[_0x8efa[57]][_0x8efa[79]]){_0x342ex20[_0x8efa[80]]= [{all:true}]};return db[_0x8efa[54]][_0x8efa[81]](_0x342ex20)})[_0x8efa[44]](function(_0x342ex33){_0x342ex2f[_0x8efa[78]]= _0x342ex33;return _0x342ex2f})[_0x8efa[44]](respondWithFilteredResult(_0x342ex1b,_0x342ex20))[_0x8efa[77]](handleError(_0x342ex1b,null))};exports[_0x8efa[82]]= function(_0x342ex2d,_0x342ex1b){var _0x342ex20={raw:true,where:{id:_0x342ex2d[_0x8efa[84]][_0x8efa[83]]}},_0x342ex2e={};_0x342ex2e[_0x8efa[52]]= _[_0x8efa[55]](db[_0x8efa[54]][_0x8efa[53]]);_0x342ex2e[_0x8efa[57]]= _[_0x8efa[55]](_0x342ex2d[_0x8efa[57]]);_0x342ex2e[_0x8efa[59]]= _[_0x8efa[60]](_0x342ex2e[_0x8efa[52]],_0x342ex2e[_0x8efa[57]]);_0x342ex20[_0x8efa[61]]= _[_0x8efa[60]](_0x342ex2e[_0x8efa[52]],qs[_0x8efa[62]](_0x342ex2d[_0x8efa[57]][_0x8efa[62]]));_0x342ex20[_0x8efa[61]]= (_0x342ex20[_0x8efa[61]][_0x8efa[63]])?_0x342ex20[_0x8efa[61]]:_0x342ex2e[_0x8efa[52]];if(_0x342ex2d[_0x8efa[57]][_0x8efa[79]]){_0x342ex20[_0x8efa[80]]= [{all:true}]};_0x342ex20= _[_0x8efa[72]]({},_0x342ex20,_0x342ex2d[_0x8efa[76]]);return db[_0x8efa[54]][_0x8efa[85]](_0x342ex20)[_0x8efa[44]](handleEntityNotFound(_0x342ex1b,null))[_0x8efa[44]](respondWithResult(_0x342ex1b,null))[_0x8efa[77]](handleError(_0x342ex1b,null))};exports[_0x8efa[86]]= function(_0x342ex2d,_0x342ex1b){return db[_0x8efa[54]][_0x8efa[86]](_0x342ex2d[_0x8efa[87]],{})[_0x8efa[44]](respondWithResult(_0x342ex1b,201))[_0x8efa[77]](handleError(_0x342ex1b,null))};exports[_0x8efa[45]]= function(_0x342ex2d,_0x342ex1b){if(_0x342ex2d[_0x8efa[87]][_0x8efa[83]]){delete _0x342ex2d[_0x8efa[87]][_0x8efa[83]]};return db[_0x8efa[54]][_0x8efa[85]]({where:{id:_0x342ex2d[_0x8efa[84]][_0x8efa[83]]}})[_0x8efa[44]](handleEntityNotFound(_0x342ex1b,null))[_0x8efa[44]](saveUpdates(_0x342ex2d[_0x8efa[87]],null))[_0x8efa[44]](respondWithResult(_0x342ex1b,null))[_0x8efa[77]](handleError(_0x342ex1b,null))};exports[_0x8efa[46]]= function(_0x342ex2d,_0x342ex1b){return db[_0x8efa[54]][_0x8efa[85]]({where:{id:_0x342ex2d[_0x8efa[84]][_0x8efa[83]]}})[_0x8efa[44]](handleEntityNotFound(_0x342ex1b,null))[_0x8efa[44]](removeEntity(_0x342ex1b,null))[_0x8efa[77]](handleError(_0x342ex1b,null))};exports[_0x8efa[88]]= function(_0x342ex2d,_0x342ex1b){return db[_0x8efa[54]][_0x8efa[88]]()[_0x8efa[44]](respondWithResult(_0x342ex1b,null))[_0x8efa[77]](handleError(_0x342ex1b,null))};exports[_0x8efa[89]]= function(_0x342ex2d,_0x342ex1b,_0x342ex34){var _0x342ex20={raw:true,where:{}},_0x342ex2e={},_0x342ex35;return db[_0x8efa[54]][_0x8efa[103]]({where:{id:_0x342ex2d[_0x8efa[84]][_0x8efa[83]]}})[_0x8efa[44]](handleEntityNotFound(_0x342ex1b,null))[_0x8efa[44]](function(_0x342ex1d){if(_0x342ex1d){_0x342ex35= _0x342ex1d[_0x8efa[100]]({plain:true});_0x342ex2e[_0x8efa[52]]= _[_0x8efa[55]](db[_0x8efa[101]][_0x8efa[53]]);_0x342ex2e[_0x8efa[57]]= _[_0x8efa[55]](_0x342ex2d[_0x8efa[57]]);_0x342ex2e[_0x8efa[59]]= _[_0x8efa[60]](_0x342ex2e[_0x8efa[52]],_0x342ex2e[_0x8efa[57]]);_0x342ex20[_0x8efa[61]]= _[_0x8efa[60]](_0x342ex2e[_0x8efa[52]],qs[_0x8efa[62]](_0x342ex2d[_0x8efa[57]][_0x8efa[62]]));_0x342ex20[_0x8efa[61]]= (_0x342ex20[_0x8efa[61]][_0x8efa[63]])?_0x342ex20[_0x8efa[61]]:_0x342ex2e[_0x8efa[52]];if(!_0x342ex2d[_0x8efa[57]][_0x8efa[65]](_0x8efa[64])){_0x342ex20[_0x8efa[36]]= qs[_0x8efa[36]](_0x342ex2d[_0x8efa[57]][_0x8efa[36]]);_0x342ex20[_0x8efa[35]]= qs[_0x8efa[35]](_0x342ex2d[_0x8efa[57]][_0x8efa[35]])};_0x342ex20[_0x8efa[66]]= qs[_0x8efa[67]](_0x342ex2d[_0x8efa[57]][_0x8efa[67]]);_0x342ex20[_0x8efa[68]]= qs[_0x8efa[59]](_[_0x8efa[69]](_0x342ex2d[_0x8efa[57]],_0x342ex2e[_0x8efa[59]]));_0x342ex20[_0x8efa[68]][_0x8efa[102]]= _0x342ex1d[_0x8efa[83]];if(_0x342ex2d[_0x8efa[57]][_0x8efa[73]]){_0x342ex20[_0x8efa[68]]= _[_0x8efa[72]](_0x342ex20[_0x8efa[68]],{$or:_[_0x8efa[75]](_0x342ex20[_0x8efa[61]],function(_0x342ex31){var _0x342ex2f={};_0x342ex2f[_0x342ex31]= {$like:_0x8efa[74]+ _0x342ex2d[_0x8efa[57]][_0x8efa[73]]+ _0x8efa[74]};return _0x342ex2f})})};_0x342ex20= _[_0x8efa[72]]({},_0x342ex20,_0x342ex2d[_0x8efa[76]]);return db[_0x8efa[101]][_0x8efa[81]](_0x342ex20)}})[_0x8efa[44]](function(_0x342ex1b){if(_0x342ex1b){return db[_0x8efa[99]][_0x8efa[98]]({where:{id:_[_0x8efa[75]](_0x342ex1b,_0x8efa[96]),role:_0x8efa[97]},attributes:[_0x8efa[83],_0x8efa[49],_0x8efa[93],_0x8efa[95],_0x8efa[94]]})}})[_0x8efa[44]](function(_0x342ex1b){if(_0x342ex1b){return {count:_0x342ex1b[_0x8efa[34]],rows:_[_0x8efa[75]](_0x342ex1b[_0x8efa[78]],function(_0x342ex36){return {membername:_0x342ex36[_0x8efa[49]],UserId:_0x342ex36[_0x8efa[83]],queue_name:_0x342ex35[_0x8efa[49]],FaxQueueId:_0x342ex35[_0x8efa[83]],interface:util[_0x8efa[92]](_0x8efa[90],_0x8efa[91],_0x342ex36[_0x8efa[49]]),penalty:0,paused:_0x342ex36[_0x8efa[93]],createdAt:_0x342ex36[_0x8efa[94]],updatedAt:_0x342ex36[_0x8efa[95]]}})}}else {return {count:0,rows:[]}}})[_0x8efa[44]](respondWithFilteredResult(_0x342ex1b,_0x342ex20))[_0x8efa[77]](handleError(_0x342ex1b,null))};exports[_0x8efa[104]]= function(_0x342ex2d,_0x342ex1d,_0x342ex34){var _0x342ex20={};var _0x342ex2e={};var _0x342ex37;var _0x342ex21;return db[_0x8efa[54]][_0x8efa[103]]({where:{id:_0x342ex2d[_0x8efa[84]][_0x8efa[83]]}})[_0x8efa[44]](handleEntityNotFound(_0x342ex1d,null))[_0x8efa[44]](function(_0x342ex1d){if(_0x342ex1d){_0x342ex37= _0x342ex1d;_0x342ex2e[_0x8efa[52]]= _[_0x8efa[55]](db[_0x8efa[105]][_0x8efa[53]]);_0x342ex2e[_0x8efa[57]]= _[_0x8efa[55]](_0x342ex2d[_0x8efa[57]]);_0x342ex2e[_0x8efa[59]]= _[_0x8efa[60]](_0x342ex2e[_0x8efa[52]],_0x342ex2e[_0x8efa[57]]);_0x342ex20[_0x8efa[61]]= _[_0x8efa[60]](_0x342ex2e[_0x8efa[52]],qs[_0x8efa[62]](_0x342ex2d[_0x8efa[57]][_0x8efa[62]]));_0x342ex20[_0x8efa[61]]= (_0x342ex20[_0x8efa[61]][_0x8efa[63]])?_0x342ex20[_0x8efa[61]]:_0x342ex2e[_0x8efa[52]];_0x342ex20[_0x8efa[66]]= qs[_0x8efa[67]](_0x342ex2d[_0x8efa[57]][_0x8efa[67]]);_0x342ex20[_0x8efa[68]]= qs[_0x8efa[59]](_[_0x8efa[69]](_0x342ex2d[_0x8efa[57]],_0x342ex2e[_0x8efa[59]]));if(_0x342ex2d[_0x8efa[57]][_0x8efa[73]]){_0x342ex20[_0x8efa[68]]= _[_0x8efa[72]](_0x342ex20[_0x8efa[68]],{$or:_[_0x8efa[75]](_0x342ex20[_0x8efa[61]],function(_0x342ex31){var _0x342ex2f={};_0x342ex2f[_0x342ex31]= {$like:_0x8efa[74]+ _0x342ex2d[_0x8efa[57]][_0x8efa[73]]+ _0x8efa[74]};return _0x342ex2f})})};_0x342ex20= _[_0x8efa[72]]({},_0x342ex20,_0x342ex2d[_0x8efa[76]]);return _0x342ex37[_0x8efa[104]](_0x342ex20)}})[_0x8efa[44]](function(_0x342ex38){if(_0x342ex38){_0x342ex21= _0x342ex38[_0x8efa[63]];if(!_0x342ex2d[_0x8efa[57]][_0x8efa[65]](_0x8efa[64])){_0x342ex20[_0x8efa[36]]= qs[_0x8efa[36]](_0x342ex2d[_0x8efa[57]][_0x8efa[36]]);_0x342ex20[_0x8efa[35]]= qs[_0x8efa[35]](_0x342ex2d[_0x8efa[57]][_0x8efa[35]])};return _0x342ex37[_0x8efa[104]](_0x342ex20)}})[_0x8efa[44]](function(_0x342ex33){if(_0x342ex33){return _0x342ex33?{count:_0x342ex21,rows:_0x342ex33}:null}})[_0x8efa[44]](respondWithResult(_0x342ex1d,null))[_0x8efa[77]](handleError(_0x342ex1d,null))};exports[_0x8efa[106]]= function(_0x342ex2d,_0x342ex1b,_0x342ex34){var _0x342ex39=[];var _0x342ex35;return db[_0x8efa[105]][_0x8efa[81]]({where:{id:_0x342ex2d[_0x8efa[87]][_0x8efa[107]]},attributes:[_0x8efa[83]],include:[{model:db[_0x8efa[99]],as:_0x8efa[110],attributes:[_0x8efa[83]],raw:true}]})[_0x8efa[44]](function(_0x342ex3c){if(_0x342ex3c){for(var _0x342ex3d=0;_0x342ex3d< _0x342ex3c[_0x8efa[63]];_0x342ex3d+= 1){for(var _0x342ex3e=0;_0x342ex3e< _0x342ex3c[_0x342ex3d][_0x8efa[110]][_0x8efa[63]];_0x342ex3e+= 1){_0x342ex39= _[_0x8efa[111]](_0x342ex39,[_0x342ex3c[_0x342ex3d][_0x8efa[110]][_0x342ex3e][_0x8efa[83]]])}};return _0x342ex39}})[_0x8efa[44]](function(_0x342ex3b){if(_0x342ex3b){return db[_0x8efa[54]][_0x8efa[85]]({where:{id:_0x342ex2d[_0x8efa[84]][_0x8efa[83]]}})}})[_0x8efa[44]](function(_0x342ex3a){if(_0x342ex3a){_0x342ex35= _0x342ex3a;return _0x342ex35[_0x8efa[109]](_0x342ex39,{penalty:_0x342ex2d[_0x8efa[87]][_0x8efa[108]]})}})[_0x8efa[44]](function(_0x342ex1d){if(_0x342ex1d){return _0x342ex35[_0x8efa[106]](_0x342ex2d[_0x8efa[87]][_0x8efa[107]])}})[_0x8efa[44]](handleEntityNotFound(_0x342ex1b,null))[_0x8efa[44]](respondWithStatusCode(_0x342ex1b,null))[_0x8efa[77]](handleError(_0x342ex1b,null))};exports[_0x8efa[112]]= function(_0x342ex2d,_0x342ex1b,_0x342ex34){var _0x342ex39=[];var _0x342ex35;return db[_0x8efa[105]][_0x8efa[81]]({where:{id:_0x342ex2d[_0x8efa[57]][_0x8efa[107]]},attributes:[_0x8efa[83]],include:[{model:db[_0x8efa[99]],as:_0x8efa[110],attributes:[_0x8efa[83]],raw:true}]})[_0x8efa[44]](function(_0x342ex3c){if(_0x342ex3c){for(var _0x342ex3d=0;_0x342ex3d< _0x342ex3c[_0x8efa[63]];_0x342ex3d+= 1){for(var _0x342ex3e=0;_0x342ex3e< _0x342ex3c[_0x342ex3d][_0x8efa[110]][_0x8efa[63]];_0x342ex3e+= 1){_0x342ex39= _[_0x8efa[111]](_0x342ex39,[_0x342ex3c[_0x342ex3d][_0x8efa[110]][_0x342ex3e][_0x8efa[83]]])}};return _0x342ex39}})[_0x8efa[44]](function(_0x342ex3b){if(_0x342ex3b){return db[_0x8efa[54]][_0x8efa[85]]({where:{id:_0x342ex2d[_0x8efa[84]][_0x8efa[83]]}})}})[_0x8efa[44]](function(_0x342ex3a){if(_0x342ex3a){_0x342ex35= _0x342ex3a;return _0x342ex35[_0x8efa[113]](_0x342ex39)}})[_0x8efa[44]](function(_0x342ex1d){if(_0x342ex35){return _0x342ex35[_0x8efa[112]](_0x342ex2d[_0x8efa[57]][_0x8efa[107]])}})[_0x8efa[44]](handleEntityNotFound(_0x342ex1b,null))[_0x8efa[44]](respondWithStatusCode(_0x342ex1b,null))[_0x8efa[77]](handleError(_0x342ex1b,null))};exports[_0x8efa[109]]= function(_0x342ex2d,_0x342ex1b,_0x342ex34){return db[_0x8efa[54]][_0x8efa[85]]({where:{id:_0x342ex2d[_0x8efa[84]][_0x8efa[83]]}})[_0x8efa[44]](handleEntityNotFound(_0x342ex1b,null))[_0x8efa[44]](function(_0x342ex1d){if(_0x342ex1d){return _0x342ex1d[_0x8efa[109]](_0x342ex2d[_0x8efa[87]][_0x8efa[107]],_[_0x8efa[117]](_0x342ex2d[_0x8efa[87]],[_0x8efa[107],_0x8efa[83]])|| {})[_0x8efa[116]](function(_0x342ex38){for(var _0x342ex3d=0;_0x342ex3d< _0x342ex2d[_0x8efa[87]][_0x8efa[107]][_0x8efa[63]];_0x342ex3d+= 1){socket[_0x8efa[115]](_0x8efa[114],{UserId:_0x342ex2d[_0x8efa[87]][_0x8efa[107]][_0x342ex3d],FaxQueueId:_0x342ex2d[_0x8efa[84]][_0x8efa[83]]})};return _0x342ex38})}})[_0x8efa[44]](respondWithResult(_0x342ex1b,null))[_0x8efa[77]](handleError(_0x342ex1b,null))};exports[_0x8efa[113]]= function(_0x342ex2d,_0x342ex1b,_0x342ex34){var _0x342ex38;return db[_0x8efa[54]][_0x8efa[85]]({where:{id:_0x342ex2d[_0x8efa[84]][_0x8efa[83]]}})[_0x8efa[44]](handleEntityNotFound(_0x342ex1b,null))[_0x8efa[44]](function(_0x342ex1d){if(_0x342ex1d){return _0x342ex1d[_0x8efa[113]](_0x342ex2d[_0x8efa[57]][_0x8efa[107]])[_0x8efa[44]](function(_0x342ex38){if(_[_0x8efa[118]](_0x342ex2d[_0x8efa[57]][_0x8efa[107]])){for(var _0x342ex3d=0;_0x342ex3d< _0x342ex2d[_0x8efa[57]][_0x8efa[107]][_0x8efa[63]];_0x342ex3d+= 1){socket[_0x8efa[115]](_0x8efa[119],{UserId:_0x342ex2d[_0x8efa[57]][_0x8efa[107]][_0x342ex3d],FaxQueueId:_0x342ex2d[_0x8efa[84]][_0x8efa[83]]})}}else {socket[_0x8efa[115]](_0x8efa[119],{UserId:_0x342ex2d[_0x8efa[57]][_0x8efa[107]],FaxQueueId:_0x342ex2d[_0x8efa[84]][_0x8efa[83]]})}})}})[_0x8efa[44]](respondWithStatusCode(_0x342ex1b,null))[_0x8efa[77]](handleError(_0x342ex1b,null))};exports[_0x8efa[120]]= function(_0x342ex2d,_0x342ex1d,_0x342ex34){var _0x342ex20={};var _0x342ex2e={};var _0x342ex37;var _0x342ex21;return db[_0x8efa[54]][_0x8efa[103]]({where:{id:_0x342ex2d[_0x8efa[84]][_0x8efa[83]]}})[_0x8efa[44]](handleEntityNotFound(_0x342ex1d,null))[_0x8efa[44]](function(_0x342ex1d){if(_0x342ex1d){_0x342ex37= _0x342ex1d;_0x342ex2e[_0x8efa[52]]= _[_0x8efa[55]](db[_0x8efa[99]][_0x8efa[53]]);_0x342ex2e[_0x8efa[57]]= _[_0x8efa[55]](_0x342ex2d[_0x8efa[57]]);_0x342ex2e[_0x8efa[59]]= _[_0x8efa[60]](_0x342ex2e[_0x8efa[52]],_0x342ex2e[_0x8efa[57]]);_0x342ex20[_0x8efa[61]]= _[_0x8efa[60]](_0x342ex2e[_0x8efa[52]],qs[_0x8efa[62]](_0x342ex2d[_0x8efa[57]][_0x8efa[62]]));_0x342ex20[_0x8efa[61]]= (_0x342ex20[_0x8efa[61]][_0x8efa[63]])?_0x342ex20[_0x8efa[61]]:_0x342ex2e[_0x8efa[52]];_0x342ex20[_0x8efa[66]]= qs[_0x8efa[67]](_0x342ex2d[_0x8efa[57]][_0x8efa[67]]);_0x342ex20[_0x8efa[68]]= qs[_0x8efa[59]](_[_0x8efa[69]](_0x342ex2d[_0x8efa[57]],_0x342ex2e[_0x8efa[59]]));if(_0x342ex2d[_0x8efa[57]][_0x8efa[73]]){_0x342ex20[_0x8efa[68]]= _[_0x8efa[72]](_0x342ex20[_0x8efa[68]],{$or:_[_0x8efa[75]](_0x342ex20[_0x8efa[61]],function(_0x342ex31){var _0x342ex2f={};_0x342ex2f[_0x342ex31]= {$like:_0x8efa[74]+ _0x342ex2d[_0x8efa[57]][_0x8efa[73]]+ _0x8efa[74]};return _0x342ex2f})})};_0x342ex20= _[_0x8efa[72]]({},_0x342ex20,_0x342ex2d[_0x8efa[76]]);return _0x342ex37[_0x8efa[120]](_0x342ex20)}})[_0x8efa[44]](function(_0x342ex38){if(_0x342ex38){_0x342ex21= _0x342ex38[_0x8efa[63]];if(!_0x342ex2d[_0x8efa[57]][_0x8efa[65]](_0x8efa[64])){_0x342ex20[_0x8efa[36]]= qs[_0x8efa[36]](_0x342ex2d[_0x8efa[57]][_0x8efa[36]]);_0x342ex20[_0x8efa[35]]= qs[_0x8efa[35]](_0x342ex2d[_0x8efa[57]][_0x8efa[35]])};return _0x342ex37[_0x8efa[120]](_0x342ex20)}})[_0x8efa[44]](function(_0x342ex33){if(_0x342ex33){return _0x342ex33?{count:_0x342ex21,rows:_0x342ex33}:null}})[_0x8efa[44]](respondWithResult(_0x342ex1d,null))[_0x8efa[77]](handleError(_0x342ex1d,null))}
\ No newline at end of file
index 09f5ed9..773b858 100644 (file)
@@ -1 +1 @@
-var _0xf1ca=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x61\x78\x51\x75\x65\x75\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xf1ca[0];var EventEmitter=require(_0xf1ca[1]);var FaxQueue=require(_0xf1ca[4])[_0xf1ca[3]][_0xf1ca[2]];var FaxQueueEvents= new EventEmitter();FaxQueueEvents[_0xf1ca[5]](0);var events={afterCreate:_0xf1ca[6],afterUpdate:_0xf1ca[7],afterDestroy:_0xf1ca[8]};function emitEvent(event){return function(_0x5de7x7,_0x5de7x8,_0x5de7x9){FaxQueueEvents[_0xf1ca[11]](event+ _0xf1ca[9]+ _0x5de7x7[_0xf1ca[10]],_0x5de7x7);FaxQueueEvents[_0xf1ca[11]](event,_0x5de7x7);_0x5de7x9(null)}}for(var e in events){if(events[_0xf1ca[12]](e)){var event=events[e];FaxQueue[_0xf1ca[13]](e,emitEvent(event))}};module[_0xf1ca[14]]= FaxQueueEvents
\ No newline at end of file
+var _0xa0b9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x61\x78\x51\x75\x65\x75\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xa0b9[0];var EventEmitter=require(_0xa0b9[1]);var FaxQueue=require(_0xa0b9[4])[_0xa0b9[3]][_0xa0b9[2]];var FaxQueueEvents= new EventEmitter();FaxQueueEvents[_0xa0b9[5]](0);var events={afterCreate:_0xa0b9[6],afterUpdate:_0xa0b9[7],afterDestroy:_0xa0b9[8]};function emitEvent(event){return function(_0xa2c3x7,_0xa2c3x8,_0xa2c3x9){FaxQueueEvents[_0xa0b9[11]](event+ _0xa0b9[9]+ _0xa2c3x7[_0xa0b9[10]],_0xa2c3x7);FaxQueueEvents[_0xa0b9[11]](event,_0xa2c3x7);_0xa2c3x9(null)}}for(var e in events){if(events[_0xa0b9[12]](e)){var event=events[e];FaxQueue[_0xa0b9[13]](e,emitEvent(event))}};module[_0xa0b9[14]]= FaxQueueEvents
\ No newline at end of file
index dc101c6..dce703b 100644 (file)
@@ -1 +1 @@
-var _0x6826=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x51\x75\x65\x75\x65","\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x6826[0];var _=require(_0x6826[1]);var util=require(_0x6826[2]);var logger=require(_0x6826[4])(_0x6826[3]);var moment=require(_0x6826[5]);var BPromise=require(_0x6826[6]);var rp=require(_0x6826[7]);var attributes=require(_0x6826[8]);module[_0x6826[9]]= function(_0x436fx8,_0x436fx9){return _0x436fx8[_0x6826[12]](_0x6826[10],attributes,{tableName:_0x6826[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x1a67=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x51\x75\x65\x75\x65","\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x1a67[0];var _=require(_0x1a67[1]);var util=require(_0x1a67[2]);var logger=require(_0x1a67[4])(_0x1a67[3]);var moment=require(_0x1a67[5]);var BPromise=require(_0x1a67[6]);var rp=require(_0x1a67[7]);var attributes=require(_0x1a67[8]);module[_0x1a67[9]]= function(_0xbd72x8,_0xbd72x9){return _0xbd72x8[_0x1a67[12]](_0x1a67[10],attributes,{tableName:_0x1a67[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 91ebb54..b45b2b2 100644 (file)
@@ -1 +1 @@
-var _0x12bb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x46\x61\x78\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x61\x78\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x46\x61\x78\x51\x75\x65\x75\x65","\x53\x68\x6F\x77\x46\x61\x78\x51\x75\x65\x75\x65","\x66\x69\x6E\x64"];_0x12bb[0];var _=require(_0x12bb[1]);var util=require(_0x12bb[2]);var moment=require(_0x12bb[3]);var BPromise=require(_0x12bb[4]);var rs=require(_0x12bb[5]);var fs=require(_0x12bb[6]);var db=require(_0x12bb[8])[_0x12bb[7]];var utils=require(_0x12bb[9]);var logger=require(_0x12bb[11])(_0x12bb[10]);var config=require(_0x12bb[12]);var jayson=require(_0x12bb[13]);var client=jayson[_0x12bb[15]][_0x12bb[14]]({port:9002});var socket=require(_0x12bb[17])({host:_0x12bb[16],port:6379});require(_0x12bb[19])[_0x12bb[18]](socket);function respondWithRpcPromise(_0x3611xf,_0x3611x10,_0x3611x11){return  new BPromise(function(_0x3611x12,_0x3611x13){return client[_0x12bb[32]](_0x3611xf,_0x3611x11)[_0x12bb[31]](function(_0x3611x15){logger[_0x12bb[24]](_0x12bb[20],_0x3611x10,_0x12bb[23]);logger[_0x12bb[27]](_0x12bb[25],_0x3611x10,_0x12bb[23],JSON[_0x12bb[26]](_0x3611x15));if(_0x3611x15[_0x12bb[21]]){if(_0x3611x15[_0x12bb[21]][_0x12bb[28]]=== 500){logger[_0x12bb[21]](_0x12bb[20],_0x3611x10,_0x3611x15[_0x12bb[21]][_0x12bb[29]]);return _0x3611x13(_0x3611x15[_0x12bb[21]][_0x12bb[29]])};logger[_0x12bb[21]](_0x12bb[20],_0x3611x10,_0x3611x15[_0x12bb[21]][_0x12bb[29]]);return _0x3611x12(_0x3611x15[_0x12bb[21]][_0x12bb[29]])}else {logger[_0x12bb[24]](_0x12bb[20],_0x3611x10,_0x12bb[23]);_0x3611x12(_0x3611x15[_0x12bb[30]][_0x12bb[29]])}})[_0x12bb[22]](function(_0x3611x14){logger[_0x12bb[21]](_0x12bb[20],_0x3611x10,_0x3611x14);_0x3611x13(_0x3611x14)})})}exports[_0x12bb[33]]= function(_0x3611x11){var _0x3611x16=this;return  new Promise(function(_0x3611x12,_0x3611x13){return db[_0x12bb[44]][_0x12bb[43]]({raw:_0x3611x11[_0x12bb[34]]?(_0x3611x11[_0x12bb[34]][_0x12bb[35]]=== undefined)?true:false:true,where:_0x3611x11[_0x12bb[34]]?_0x3611x11[_0x12bb[34]][_0x12bb[36]]|| null:null,attributes:_0x3611x11[_0x12bb[34]]?_0x3611x11[_0x12bb[34]][_0x12bb[37]]|| null:null,limit:_0x3611x11[_0x12bb[34]]?_0x3611x11[_0x12bb[34]][_0x12bb[38]]|| null:null,include:_0x3611x11[_0x12bb[34]]?(_0x3611x11[_0x12bb[34]][_0x12bb[39]]?_[_0x12bb[42]](_0x3611x11[_0x12bb[34]][_0x12bb[39]],function(_0x3611x17){return {model:db[_0x3611x17[_0x12bb[40]]],as:_0x3611x17[_0x12bb[41]],attributes:_0x3611x17[_0x12bb[37]],include:_0x3611x17[_0x12bb[39]]?_[_0x12bb[42]](_0x3611x17[_0x12bb[39]],function(_0x3611x18){return {model:db[_0x3611x18[_0x12bb[40]]],as:_0x3611x18[_0x12bb[41]],attributes:_0x3611x18[_0x12bb[37]],include:_0x3611x18[_0x12bb[39]]?_[_0x12bb[42]](_0x3611x18[_0x12bb[39]],function(_0x3611x19){return {model:db[_0x3611x19[_0x12bb[40]]],as:_0x3611x19[_0x12bb[41]],attributes:_0x3611x19[_0x12bb[37]]}}):[]}}):[]}}):[]):[]})[_0x12bb[31]](function(_0x3611x15){logger[_0x12bb[24]](_0x12bb[33],_0x3611x11);logger[_0x12bb[27]](_0x12bb[33],_0x3611x11,JSON[_0x12bb[26]](_0x3611x15));_0x3611x12(_0x3611x15)})[_0x12bb[22]](function(_0x3611x14){logger[_0x12bb[21]](_0x12bb[33],_0x3611x14[_0x12bb[29]],_0x3611x11);_0x3611x13(_0x3611x16[_0x12bb[21]](500,_0x3611x14[_0x12bb[29]]))})})};exports[_0x12bb[45]]= function(_0x3611x11){var _0x3611x16=this;return  new Promise(function(_0x3611x12,_0x3611x13){return db[_0x12bb[44]][_0x12bb[46]]({raw:_0x3611x11[_0x12bb[34]]?(_0x3611x11[_0x12bb[34]][_0x12bb[35]]=== undefined)?true:false:true,where:_0x3611x11[_0x12bb[34]]?_0x3611x11[_0x12bb[34]][_0x12bb[36]]|| null:null,attributes:_0x3611x11[_0x12bb[34]]?_0x3611x11[_0x12bb[34]][_0x12bb[37]]|| null:null,include:_0x3611x11[_0x12bb[34]]?(_0x3611x11[_0x12bb[34]][_0x12bb[39]]?_[_0x12bb[42]](_0x3611x11[_0x12bb[34]][_0x12bb[39]],function(_0x3611x17){return {model:db[_0x3611x17[_0x12bb[40]]],as:_0x3611x17[_0x12bb[41]],attributes:_0x3611x17[_0x12bb[37]],include:_0x3611x17[_0x12bb[39]]?_[_0x12bb[42]](_0x3611x17[_0x12bb[39]],function(_0x3611x18){return {model:db[_0x3611x18[_0x12bb[40]]],as:_0x3611x18[_0x12bb[41]],attributes:_0x3611x18[_0x12bb[37]],include:_0x3611x18[_0x12bb[39]]?_[_0x12bb[42]](_0x3611x18[_0x12bb[39]],function(_0x3611x19){return {model:db[_0x3611x19[_0x12bb[40]]],as:_0x3611x19[_0x12bb[41]],attributes:_0x3611x19[_0x12bb[37]]}}):[]}}):[]}}):[]):[]})[_0x12bb[31]](function(_0x3611x15){logger[_0x12bb[24]](_0x12bb[45],_0x3611x11);logger[_0x12bb[27]](_0x12bb[45],_0x3611x11,JSON[_0x12bb[26]](_0x3611x15));_0x3611x12(_0x3611x15)})[_0x12bb[22]](function(_0x3611x14){logger[_0x12bb[21]](_0x12bb[45],_0x3611x14[_0x12bb[29]],_0x3611x11);_0x3611x13(_0x3611x16[_0x12bb[21]](500,_0x3611x14[_0x12bb[29]]))})})}
\ No newline at end of file
+var _0xc6e9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x46\x61\x78\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x61\x78\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x46\x61\x78\x51\x75\x65\x75\x65","\x53\x68\x6F\x77\x46\x61\x78\x51\x75\x65\x75\x65","\x66\x69\x6E\x64"];_0xc6e9[0];var _=require(_0xc6e9[1]);var util=require(_0xc6e9[2]);var moment=require(_0xc6e9[3]);var BPromise=require(_0xc6e9[4]);var rs=require(_0xc6e9[5]);var fs=require(_0xc6e9[6]);var db=require(_0xc6e9[8])[_0xc6e9[7]];var utils=require(_0xc6e9[9]);var logger=require(_0xc6e9[11])(_0xc6e9[10]);var config=require(_0xc6e9[12]);var jayson=require(_0xc6e9[13]);var client=jayson[_0xc6e9[15]][_0xc6e9[14]]({port:9002});var socket=require(_0xc6e9[17])({host:_0xc6e9[16],port:6379});require(_0xc6e9[19])[_0xc6e9[18]](socket);function respondWithRpcPromise(_0xece2xf,_0xece2x10,_0xece2x11){return  new BPromise(function(_0xece2x12,_0xece2x13){return client[_0xc6e9[32]](_0xece2xf,_0xece2x11)[_0xc6e9[31]](function(_0xece2x15){logger[_0xc6e9[24]](_0xc6e9[20],_0xece2x10,_0xc6e9[23]);logger[_0xc6e9[27]](_0xc6e9[25],_0xece2x10,_0xc6e9[23],JSON[_0xc6e9[26]](_0xece2x15));if(_0xece2x15[_0xc6e9[21]]){if(_0xece2x15[_0xc6e9[21]][_0xc6e9[28]]=== 500){logger[_0xc6e9[21]](_0xc6e9[20],_0xece2x10,_0xece2x15[_0xc6e9[21]][_0xc6e9[29]]);return _0xece2x13(_0xece2x15[_0xc6e9[21]][_0xc6e9[29]])};logger[_0xc6e9[21]](_0xc6e9[20],_0xece2x10,_0xece2x15[_0xc6e9[21]][_0xc6e9[29]]);return _0xece2x12(_0xece2x15[_0xc6e9[21]][_0xc6e9[29]])}else {logger[_0xc6e9[24]](_0xc6e9[20],_0xece2x10,_0xc6e9[23]);_0xece2x12(_0xece2x15[_0xc6e9[30]][_0xc6e9[29]])}})[_0xc6e9[22]](function(_0xece2x14){logger[_0xc6e9[21]](_0xc6e9[20],_0xece2x10,_0xece2x14);_0xece2x13(_0xece2x14)})})}exports[_0xc6e9[33]]= function(_0xece2x11){var _0xece2x16=this;return  new Promise(function(_0xece2x12,_0xece2x13){return db[_0xc6e9[44]][_0xc6e9[43]]({raw:_0xece2x11[_0xc6e9[34]]?(_0xece2x11[_0xc6e9[34]][_0xc6e9[35]]=== undefined)?true:false:true,where:_0xece2x11[_0xc6e9[34]]?_0xece2x11[_0xc6e9[34]][_0xc6e9[36]]|| null:null,attributes:_0xece2x11[_0xc6e9[34]]?_0xece2x11[_0xc6e9[34]][_0xc6e9[37]]|| null:null,limit:_0xece2x11[_0xc6e9[34]]?_0xece2x11[_0xc6e9[34]][_0xc6e9[38]]|| null:null,include:_0xece2x11[_0xc6e9[34]]?(_0xece2x11[_0xc6e9[34]][_0xc6e9[39]]?_[_0xc6e9[42]](_0xece2x11[_0xc6e9[34]][_0xc6e9[39]],function(_0xece2x17){return {model:db[_0xece2x17[_0xc6e9[40]]],as:_0xece2x17[_0xc6e9[41]],attributes:_0xece2x17[_0xc6e9[37]],include:_0xece2x17[_0xc6e9[39]]?_[_0xc6e9[42]](_0xece2x17[_0xc6e9[39]],function(_0xece2x18){return {model:db[_0xece2x18[_0xc6e9[40]]],as:_0xece2x18[_0xc6e9[41]],attributes:_0xece2x18[_0xc6e9[37]],include:_0xece2x18[_0xc6e9[39]]?_[_0xc6e9[42]](_0xece2x18[_0xc6e9[39]],function(_0xece2x19){return {model:db[_0xece2x19[_0xc6e9[40]]],as:_0xece2x19[_0xc6e9[41]],attributes:_0xece2x19[_0xc6e9[37]]}}):[]}}):[]}}):[]):[]})[_0xc6e9[31]](function(_0xece2x15){logger[_0xc6e9[24]](_0xc6e9[33],_0xece2x11);logger[_0xc6e9[27]](_0xc6e9[33],_0xece2x11,JSON[_0xc6e9[26]](_0xece2x15));_0xece2x12(_0xece2x15)})[_0xc6e9[22]](function(_0xece2x14){logger[_0xc6e9[21]](_0xc6e9[33],_0xece2x14[_0xc6e9[29]],_0xece2x11);_0xece2x13(_0xece2x16[_0xc6e9[21]](500,_0xece2x14[_0xc6e9[29]]))})})};exports[_0xc6e9[45]]= function(_0xece2x11){var _0xece2x16=this;return  new Promise(function(_0xece2x12,_0xece2x13){return db[_0xc6e9[44]][_0xc6e9[46]]({raw:_0xece2x11[_0xc6e9[34]]?(_0xece2x11[_0xc6e9[34]][_0xc6e9[35]]=== undefined)?true:false:true,where:_0xece2x11[_0xc6e9[34]]?_0xece2x11[_0xc6e9[34]][_0xc6e9[36]]|| null:null,attributes:_0xece2x11[_0xc6e9[34]]?_0xece2x11[_0xc6e9[34]][_0xc6e9[37]]|| null:null,include:_0xece2x11[_0xc6e9[34]]?(_0xece2x11[_0xc6e9[34]][_0xc6e9[39]]?_[_0xc6e9[42]](_0xece2x11[_0xc6e9[34]][_0xc6e9[39]],function(_0xece2x17){return {model:db[_0xece2x17[_0xc6e9[40]]],as:_0xece2x17[_0xc6e9[41]],attributes:_0xece2x17[_0xc6e9[37]],include:_0xece2x17[_0xc6e9[39]]?_[_0xc6e9[42]](_0xece2x17[_0xc6e9[39]],function(_0xece2x18){return {model:db[_0xece2x18[_0xc6e9[40]]],as:_0xece2x18[_0xc6e9[41]],attributes:_0xece2x18[_0xc6e9[37]],include:_0xece2x18[_0xc6e9[39]]?_[_0xc6e9[42]](_0xece2x18[_0xc6e9[39]],function(_0xece2x19){return {model:db[_0xece2x19[_0xc6e9[40]]],as:_0xece2x19[_0xc6e9[41]],attributes:_0xece2x19[_0xc6e9[37]]}}):[]}}):[]}}):[]):[]})[_0xc6e9[31]](function(_0xece2x15){logger[_0xc6e9[24]](_0xc6e9[45],_0xece2x11);logger[_0xc6e9[27]](_0xc6e9[45],_0xece2x11,JSON[_0xc6e9[26]](_0xece2x15));_0xece2x12(_0xece2x15)})[_0xc6e9[22]](function(_0xece2x14){logger[_0xc6e9[21]](_0xc6e9[45],_0xece2x14[_0xc6e9[29]],_0xece2x11);_0xece2x13(_0xece2x16[_0xc6e9[21]](500,_0xece2x14[_0xc6e9[29]]))})})}
\ No newline at end of file
index 6299600..b36f830 100644 (file)
@@ -1 +1 @@
-var _0x33da=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x78\x51\x75\x65\x75\x65\x3A","\x6F\x6E"];_0x33da[0];var FaxQueueEvents=require(_0x33da[1]);var events=[_0x33da[2],_0x33da[3],_0x33da[4]];function createListener(_0xfb29x4,_0xfb29x5){return function(_0xfb29x6){_0xfb29x5[_0x33da[5]](_0xfb29x4,_0xfb29x6)}}function removeListener(_0xfb29x4,_0xfb29x8){return function(){FaxQueueEvents[_0x33da[6]](_0xfb29x4,_0xfb29x8)}}exports[_0x33da[7]]= function(_0xfb29x5){for(var _0xfb29x9=0,_0xfb29xa=events[_0x33da[8]];_0xfb29x9< _0xfb29xa;_0xfb29x9++){var _0xfb29x4=events[_0xfb29x9];var _0xfb29x8=createListener(_0x33da[9]+ _0xfb29x4,_0xfb29x5);FaxQueueEvents[_0x33da[10]](_0xfb29x4,_0xfb29x8)}}
\ No newline at end of file
+var _0x12ea=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x78\x51\x75\x65\x75\x65\x3A","\x6F\x6E"];_0x12ea[0];var FaxQueueEvents=require(_0x12ea[1]);var events=[_0x12ea[2],_0x12ea[3],_0x12ea[4]];function createListener(_0xa0e5x4,_0xa0e5x5){return function(_0xa0e5x6){_0xa0e5x5[_0x12ea[5]](_0xa0e5x4,_0xa0e5x6)}}function removeListener(_0xa0e5x4,_0xa0e5x8){return function(){FaxQueueEvents[_0x12ea[6]](_0xa0e5x4,_0xa0e5x8)}}exports[_0x12ea[7]]= function(_0xa0e5x5){for(var _0xa0e5x9=0,_0xa0e5xa=events[_0x12ea[8]];_0xa0e5x9< _0xa0e5xa;_0xa0e5x9++){var _0xa0e5x4=events[_0xa0e5x9];var _0xa0e5x8=createListener(_0x12ea[9]+ _0xa0e5x4,_0xa0e5x5);FaxQueueEvents[_0x12ea[10]](_0xa0e5x4,_0xa0e5x8)}}
\ No newline at end of file
index 1fdfd2b..609737f 100644 (file)
@@ -1 +1 @@
-var _0xb79c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6D\x65\x6D\x62\x65\x72\x73","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x74\x65\x61\x6D\x73","\x67\x65\x74\x54\x65\x61\x6D\x73","\x2F\x3A\x69\x64\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x54\x65\x61\x6D\x73","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xb79c[0];var multer=require(_0xb79c[1]);var util=require(_0xb79c[2]);var path=require(_0xb79c[3]);var express=require(_0xb79c[4]);var router=express.Router();var auth=require(_0xb79c[5]);var interaction=require(_0xb79c[6]);var config=require(_0xb79c[7]);var controller=require(_0xb79c[8]);router[_0xb79c[12]](_0xb79c[9],auth[_0xb79c[10]](),controller[_0xb79c[11]]);router[_0xb79c[12]](_0xb79c[13],auth[_0xb79c[10]](),controller[_0xb79c[14]]);router[_0xb79c[12]](_0xb79c[15],auth[_0xb79c[10]](),controller[_0xb79c[16]]);router[_0xb79c[12]](_0xb79c[17],auth[_0xb79c[10]](),controller[_0xb79c[18]]);router[_0xb79c[12]](_0xb79c[19],auth[_0xb79c[10]](),controller[_0xb79c[20]]);router[_0xb79c[12]](_0xb79c[21],auth[_0xb79c[10]](),controller[_0xb79c[22]]);router[_0xb79c[24]](_0xb79c[9],auth[_0xb79c[10]](),controller[_0xb79c[23]]);router[_0xb79c[24]](_0xb79c[19],auth[_0xb79c[10]](),controller[_0xb79c[25]]);router[_0xb79c[24]](_0xb79c[21],auth[_0xb79c[10]](),controller[_0xb79c[26]]);router[_0xb79c[28]](_0xb79c[15],auth[_0xb79c[10]](),controller[_0xb79c[27]]);router[_0xb79c[30]](_0xb79c[15],auth[_0xb79c[10]](),controller[_0xb79c[29]]);router[_0xb79c[30]](_0xb79c[19],auth[_0xb79c[10]](),controller[_0xb79c[31]]);router[_0xb79c[30]](_0xb79c[21],auth[_0xb79c[10]](),controller[_0xb79c[32]]);module[_0xb79c[33]]= router
\ No newline at end of file
+var _0xaeeb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6D\x65\x6D\x62\x65\x72\x73","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x74\x65\x61\x6D\x73","\x67\x65\x74\x54\x65\x61\x6D\x73","\x2F\x3A\x69\x64\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x54\x65\x61\x6D\x73","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xaeeb[0];var multer=require(_0xaeeb[1]);var util=require(_0xaeeb[2]);var path=require(_0xaeeb[3]);var express=require(_0xaeeb[4]);var router=express.Router();var auth=require(_0xaeeb[5]);var interaction=require(_0xaeeb[6]);var config=require(_0xaeeb[7]);var controller=require(_0xaeeb[8]);router[_0xaeeb[12]](_0xaeeb[9],auth[_0xaeeb[10]](),controller[_0xaeeb[11]]);router[_0xaeeb[12]](_0xaeeb[13],auth[_0xaeeb[10]](),controller[_0xaeeb[14]]);router[_0xaeeb[12]](_0xaeeb[15],auth[_0xaeeb[10]](),controller[_0xaeeb[16]]);router[_0xaeeb[12]](_0xaeeb[17],auth[_0xaeeb[10]](),controller[_0xaeeb[18]]);router[_0xaeeb[12]](_0xaeeb[19],auth[_0xaeeb[10]](),controller[_0xaeeb[20]]);router[_0xaeeb[12]](_0xaeeb[21],auth[_0xaeeb[10]](),controller[_0xaeeb[22]]);router[_0xaeeb[24]](_0xaeeb[9],auth[_0xaeeb[10]](),controller[_0xaeeb[23]]);router[_0xaeeb[24]](_0xaeeb[19],auth[_0xaeeb[10]](),controller[_0xaeeb[25]]);router[_0xaeeb[24]](_0xaeeb[21],auth[_0xaeeb[10]](),controller[_0xaeeb[26]]);router[_0xaeeb[28]](_0xaeeb[15],auth[_0xaeeb[10]](),controller[_0xaeeb[27]]);router[_0xaeeb[30]](_0xaeeb[15],auth[_0xaeeb[10]](),controller[_0xaeeb[29]]);router[_0xaeeb[30]](_0xaeeb[19],auth[_0xaeeb[10]](),controller[_0xaeeb[31]]);router[_0xaeeb[30]](_0xaeeb[21],auth[_0xaeeb[10]](),controller[_0xaeeb[32]]);module[_0xaeeb[33]]= router
\ No newline at end of file
index d52b193..856bc93 100644 (file)
@@ -1 +1 @@
-var _0x5498=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45"];_0x5498[0];var moment=require(_0x5498[1]);var Sequelize=require(_0x5498[2]);module[_0x5498[3]]= {uniqueid:{type:Sequelize[_0x5498[4]],allowNull:false},from:{type:Sequelize[_0x5498[4]]},joinAt:{type:Sequelize[_0x5498[5]]},leaveAt:{type:Sequelize[_0x5498[5]]},acceptAt:{type:Sequelize[_0x5498[5]]},exitAt:{type:Sequelize[_0x5498[5]]},reason:{type:Sequelize[_0x5498[4]]}}
\ No newline at end of file
+var _0x7ef0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45"];_0x7ef0[0];var moment=require(_0x7ef0[1]);var Sequelize=require(_0x7ef0[2]);module[_0x7ef0[3]]= {uniqueid:{type:Sequelize[_0x7ef0[4]],allowNull:false},from:{type:Sequelize[_0x7ef0[4]]},joinAt:{type:Sequelize[_0x7ef0[5]]},leaveAt:{type:Sequelize[_0x7ef0[5]]},acceptAt:{type:Sequelize[_0x7ef0[5]]},exitAt:{type:Sequelize[_0x7ef0[5]]},reason:{type:Sequelize[_0x7ef0[4]]}}
\ No newline at end of file
index 8583d4e..71c7dfb 100644 (file)
@@ -1 +1 @@
-var _0x42cd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x42cd[0];var jsonpatch=require(_0x42cd[1]);var rp=require(_0x42cd[2]);var moment=require(_0x42cd[3]);var BPromise=require(_0x42cd[4]);var Mustache=require(_0x42cd[5]);var util=require(_0x42cd[6]);var path=require(_0x42cd[7]);var sox=require(_0x42cd[8]);var csv=require(_0x42cd[9]);var ejs=require(_0x42cd[10]);var fs=require(_0x42cd[11]);var _=require(_0x42cd[12]);var squel=require(_0x42cd[13]);var crypto=require(_0x42cd[14]);var jsforce=require(_0x42cd[15]);var deskjs=require(_0x42cd[16]);var toCsv=require(_0x42cd[9]);var querystring=require(_0x42cd[17]);var Papa=require(_0x42cd[18]);var qs=require(_0x42cd[19]);var logger=require(_0x42cd[21])(_0x42cd[20]);var utils=require(_0x42cd[22]);var config=require(_0x42cd[23]);var db=require(_0x42cd[25])[_0x42cd[24]];function respondWithStatusCode(_0xf405x1a,_0xf405x1b){_0xf405x1b= _0xf405x1b|| 204;return function(_0xf405x1c){if(_0xf405x1c){return _0xf405x1a[_0x42cd[26]](_0xf405x1b)};return _0xf405x1a[_0x42cd[28]](_0xf405x1b)[_0x42cd[27]]()}}function respondWithResult(_0xf405x1a,_0xf405x1b){_0xf405x1b= _0xf405x1b|| 200;return function(_0xf405x1c){if(_0xf405x1c){return _0xf405x1a[_0x42cd[28]](_0xf405x1b)[_0x42cd[29]](_0xf405x1c)}}}function respondWithFilteredResult(_0xf405x1a,_0xf405x1f){return function(_0xf405x1c){if(_0xf405x1c){var _0xf405x20=_0xf405x1c[_0x42cd[30]],_0xf405x21=_0xf405x1f[_0x42cd[31]],_0xf405x22=_0xf405x1f[_0x42cd[31]]+ _0xf405x1f[_0x42cd[32]],_0xf405x1b;if(_0xf405x22>= _0xf405x20){_0xf405x22= _0xf405x20;_0xf405x1b= 200}else {_0xf405x1b= 206};_0xf405x1a[_0x42cd[28]](_0xf405x1b);return _0xf405x1a[_0x42cd[36]](_0x42cd[33],_0xf405x21+ _0x42cd[34]+ _0xf405x22+ _0x42cd[35]+ _0xf405x20)[_0x42cd[29]](_0xf405x1c)};return null}}function patchUpdates(_0xf405x24){return function(_0xf405x1c){try{jsonpatch[_0x42cd[37]](_0xf405x1c,_0xf405x24,true)}catch(err){return BPromise[_0x42cd[38]](err)};return _0xf405x1c[_0x42cd[39]]()}}function saveUpdates(_0xf405x26,_0xf405x1b){return function(_0xf405x1c){if(_0xf405x1c){return _0xf405x1c[_0x42cd[41]](_0xf405x26)[_0x42cd[40]](function(_0xf405x27){return _0xf405x27})};return null}}function removeEntity(_0xf405x1a,_0xf405x1b){return function(_0xf405x1c){if(_0xf405x1c){return _0xf405x1c[_0x42cd[42]]()[_0x42cd[40]](function(){_0xf405x1a[_0x42cd[28]](204)[_0x42cd[27]]()})}}}function handleEntityNotFound(_0xf405x1a,_0xf405x1b){return function(_0xf405x1c){if(!_0xf405x1c){_0xf405x1a[_0x42cd[26]](404)};return _0xf405x1c}}function handleError(_0xf405x1a,_0xf405x1b){_0xf405x1b= _0xf405x1b|| 500;return function(_0xf405x2b){logger[_0x42cd[44]](_0xf405x2b[_0x42cd[43]]);if(_0xf405x2b[_0x42cd[45]]){delete _0xf405x2b[_0x42cd[45]]};_0xf405x1a[_0x42cd[28]](_0xf405x1b)[_0x42cd[46]](_0xf405x2b)}}exports[_0x42cd[47]]= function(_0xf405x2c,_0xf405x1a){var _0xf405x1f={},_0xf405x2d={},_0xf405x2e={count:0,rows:[]};_0xf405x2d[_0x42cd[48]]= _[_0x42cd[51]](db[_0x42cd[50]][_0x42cd[49]]);var _0xf405x2f={dateStart:_0xf405x2c[_0x42cd[53]][_0x42cd[52]],dateEnd:_0xf405x2c[_0x42cd[53]][_0x42cd[54]]};delete _0xf405x2c[_0x42cd[53]][_0x42cd[52]];delete _0xf405x2c[_0x42cd[53]][_0x42cd[54]];_0xf405x2d[_0x42cd[53]]= _[_0x42cd[51]](_0xf405x2c[_0x42cd[53]]);_0xf405x2d[_0x42cd[55]]= _[_0x42cd[56]](_0xf405x2d[_0x42cd[48]],_0xf405x2d[_0x42cd[53]]);_0xf405x1f[_0x42cd[57]]= _[_0x42cd[56]](_0xf405x2d[_0x42cd[48]],qs[_0x42cd[58]](_0xf405x2c[_0x42cd[53]][_0x42cd[58]]));_0xf405x1f[_0x42cd[57]]= (_0xf405x1f[_0x42cd[57]][_0x42cd[59]])?_0xf405x1f[_0x42cd[57]]:_0xf405x2d[_0x42cd[48]];if(!_0xf405x2c[_0x42cd[53]][_0x42cd[61]](_0x42cd[60])){_0xf405x1f[_0x42cd[32]]= qs[_0x42cd[32]](_0xf405x2c[_0x42cd[53]][_0x42cd[32]]);_0xf405x1f[_0x42cd[31]]= qs[_0x42cd[31]](_0xf405x2c[_0x42cd[53]][_0x42cd[31]])};_0xf405x1f[_0x42cd[62]]= qs[_0x42cd[63]](_0xf405x2c[_0x42cd[53]][_0x42cd[63]]);_0xf405x1f[_0x42cd[64]]= qs[_0x42cd[55]](_[_0x42cd[65]](_0xf405x2c[_0x42cd[53]],_0xf405x2d[_0x42cd[55]]));if(_0xf405x2f[_0x42cd[52]]){if(_0xf405x2f[_0x42cd[54]]){_0xf405x2f[_0x42cd[54]]= moment(_0xf405x2f[_0x42cd[54]])[_0x42cd[67]](1,_0x42cd[66])}else {_0xf405x2f[_0x42cd[54]]= moment(_0xf405x2f[_0x42cd[52]])[_0x42cd[67]](1,_0x42cd[66])};_[_0x42cd[68]](_0xf405x1f[_0x42cd[64]],{createdAt:{$gte:_0xf405x2f[_0x42cd[52]],$lte:_0xf405x2f[_0x42cd[54]]}})};if(_0xf405x2c[_0x42cd[53]][_0x42cd[69]]){_0xf405x1f[_0x42cd[64]]= _[_0x42cd[68]](_0xf405x1f[_0x42cd[64]],{$or:_[_0x42cd[71]](_0xf405x1f[_0x42cd[57]],function(_0xf405x30){var _0xf405x2e={};_0xf405x2e[_0xf405x30]= {$like:_0x42cd[70]+ _0xf405x2c[_0x42cd[53]][_0x42cd[69]]+ _0x42cd[70]};return _0xf405x2e})})};_0xf405x1f= _[_0x42cd[68]]({},_0xf405x1f,_0xf405x2c[_0x42cd[72]]);var _0xf405x31={where:_0xf405x1f[_0x42cd[64]]};return db[_0x42cd[50]][_0x42cd[30]](_0xf405x31)[_0x42cd[40]](function(_0xf405x20){_0xf405x2e[_0x42cd[30]]= _0xf405x20;if(_0xf405x2c[_0x42cd[53]][_0x42cd[75]]){_0xf405x1f[_0x42cd[76]]= [{all:true}]};return db[_0x42cd[50]][_0x42cd[77]](_0xf405x1f)})[_0x42cd[40]](function(_0xf405x32){_0xf405x2e[_0x42cd[74]]= _0xf405x32;return _0xf405x2e})[_0x42cd[40]](respondWithFilteredResult(_0xf405x1a,_0xf405x1f))[_0x42cd[73]](handleError(_0xf405x1a,null))};exports[_0x42cd[78]]= function(_0xf405x2c,_0xf405x1a){var _0xf405x1f={raw:true,where:{id:_0xf405x2c[_0x42cd[80]][_0x42cd[79]]}},_0xf405x2d={};_0xf405x2d[_0x42cd[48]]= _[_0x42cd[51]](db[_0x42cd[50]][_0x42cd[49]]);_0xf405x2d[_0x42cd[53]]= _[_0x42cd[51]](_0xf405x2c[_0x42cd[53]]);_0xf405x2d[_0x42cd[55]]= _[_0x42cd[56]](_0xf405x2d[_0x42cd[48]],_0xf405x2d[_0x42cd[53]]);_0xf405x1f[_0x42cd[57]]= _[_0x42cd[56]](_0xf405x2d[_0x42cd[48]],qs[_0x42cd[58]](_0xf405x2c[_0x42cd[53]][_0x42cd[58]]));_0xf405x1f[_0x42cd[57]]= (_0xf405x1f[_0x42cd[57]][_0x42cd[59]])?_0xf405x1f[_0x42cd[57]]:_0xf405x2d[_0x42cd[48]];if(_0xf405x2c[_0x42cd[53]][_0x42cd[75]]){_0xf405x1f[_0x42cd[76]]= [{all:true}]};_0xf405x1f= _[_0x42cd[68]]({},_0xf405x1f,_0xf405x2c[_0x42cd[72]]);return db[_0x42cd[50]][_0x42cd[81]](_0xf405x1f)[_0x42cd[40]](handleEntityNotFound(_0xf405x1a,null))[_0x42cd[40]](respondWithResult(_0xf405x1a,null))[_0x42cd[73]](handleError(_0xf405x1a,null))};exports[_0x42cd[82]]= function(_0xf405x2c,_0xf405x1a){return db[_0x42cd[50]][_0x42cd[82]](_0xf405x2c[_0x42cd[83]],{})[_0x42cd[40]](respondWithResult(_0xf405x1a,201))[_0x42cd[73]](handleError(_0xf405x1a,null))};exports[_0x42cd[41]]= function(_0xf405x2c,_0xf405x1a){if(_0xf405x2c[_0x42cd[83]][_0x42cd[79]]){delete _0xf405x2c[_0x42cd[83]][_0x42cd[79]]};return db[_0x42cd[50]][_0x42cd[81]]({where:{id:_0xf405x2c[_0x42cd[80]][_0x42cd[79]]}})[_0x42cd[40]](handleEntityNotFound(_0xf405x1a,null))[_0x42cd[40]](saveUpdates(_0xf405x2c[_0x42cd[83]],null))[_0x42cd[40]](respondWithResult(_0xf405x1a,null))[_0x42cd[73]](handleError(_0xf405x1a,null))};exports[_0x42cd[42]]= function(_0xf405x2c,_0xf405x1a){return db[_0x42cd[50]][_0x42cd[81]]({where:{id:_0xf405x2c[_0x42cd[80]][_0x42cd[79]]}})[_0x42cd[40]](handleEntityNotFound(_0xf405x1a,null))[_0x42cd[40]](removeEntity(_0xf405x1a,null))[_0x42cd[73]](handleError(_0xf405x1a,null))};exports[_0x42cd[84]]= function(_0xf405x2c,_0xf405x1a){return db[_0x42cd[50]][_0x42cd[84]]()[_0x42cd[40]](respondWithResult(_0xf405x1a,null))[_0x42cd[73]](handleError(_0xf405x1a,null))}
\ No newline at end of file
+var _0x42da=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x42da[0];var jsonpatch=require(_0x42da[1]);var rp=require(_0x42da[2]);var moment=require(_0x42da[3]);var BPromise=require(_0x42da[4]);var Mustache=require(_0x42da[5]);var util=require(_0x42da[6]);var path=require(_0x42da[7]);var sox=require(_0x42da[8]);var csv=require(_0x42da[9]);var ejs=require(_0x42da[10]);var fs=require(_0x42da[11]);var _=require(_0x42da[12]);var squel=require(_0x42da[13]);var crypto=require(_0x42da[14]);var jsforce=require(_0x42da[15]);var deskjs=require(_0x42da[16]);var toCsv=require(_0x42da[9]);var querystring=require(_0x42da[17]);var Papa=require(_0x42da[18]);var qs=require(_0x42da[19]);var logger=require(_0x42da[21])(_0x42da[20]);var utils=require(_0x42da[22]);var config=require(_0x42da[23]);var db=require(_0x42da[25])[_0x42da[24]];function respondWithStatusCode(_0xf656x1a,_0xf656x1b){_0xf656x1b= _0xf656x1b|| 204;return function(_0xf656x1c){if(_0xf656x1c){return _0xf656x1a[_0x42da[26]](_0xf656x1b)};return _0xf656x1a[_0x42da[28]](_0xf656x1b)[_0x42da[27]]()}}function respondWithResult(_0xf656x1a,_0xf656x1b){_0xf656x1b= _0xf656x1b|| 200;return function(_0xf656x1c){if(_0xf656x1c){return _0xf656x1a[_0x42da[28]](_0xf656x1b)[_0x42da[29]](_0xf656x1c)}}}function respondWithFilteredResult(_0xf656x1a,_0xf656x1f){return function(_0xf656x1c){if(_0xf656x1c){var _0xf656x20=_0xf656x1c[_0x42da[30]],_0xf656x21=_0xf656x1f[_0x42da[31]],_0xf656x22=_0xf656x1f[_0x42da[31]]+ _0xf656x1f[_0x42da[32]],_0xf656x1b;if(_0xf656x22>= _0xf656x20){_0xf656x22= _0xf656x20;_0xf656x1b= 200}else {_0xf656x1b= 206};_0xf656x1a[_0x42da[28]](_0xf656x1b);return _0xf656x1a[_0x42da[36]](_0x42da[33],_0xf656x21+ _0x42da[34]+ _0xf656x22+ _0x42da[35]+ _0xf656x20)[_0x42da[29]](_0xf656x1c)};return null}}function patchUpdates(_0xf656x24){return function(_0xf656x1c){try{jsonpatch[_0x42da[37]](_0xf656x1c,_0xf656x24,true)}catch(err){return BPromise[_0x42da[38]](err)};return _0xf656x1c[_0x42da[39]]()}}function saveUpdates(_0xf656x26,_0xf656x1b){return function(_0xf656x1c){if(_0xf656x1c){return _0xf656x1c[_0x42da[41]](_0xf656x26)[_0x42da[40]](function(_0xf656x27){return _0xf656x27})};return null}}function removeEntity(_0xf656x1a,_0xf656x1b){return function(_0xf656x1c){if(_0xf656x1c){return _0xf656x1c[_0x42da[42]]()[_0x42da[40]](function(){_0xf656x1a[_0x42da[28]](204)[_0x42da[27]]()})}}}function handleEntityNotFound(_0xf656x1a,_0xf656x1b){return function(_0xf656x1c){if(!_0xf656x1c){_0xf656x1a[_0x42da[26]](404)};return _0xf656x1c}}function handleError(_0xf656x1a,_0xf656x1b){_0xf656x1b= _0xf656x1b|| 500;return function(_0xf656x2b){logger[_0x42da[44]](_0xf656x2b[_0x42da[43]]);if(_0xf656x2b[_0x42da[45]]){delete _0xf656x2b[_0x42da[45]]};_0xf656x1a[_0x42da[28]](_0xf656x1b)[_0x42da[46]](_0xf656x2b)}}exports[_0x42da[47]]= function(_0xf656x2c,_0xf656x1a){var _0xf656x1f={},_0xf656x2d={},_0xf656x2e={count:0,rows:[]};_0xf656x2d[_0x42da[48]]= _[_0x42da[51]](db[_0x42da[50]][_0x42da[49]]);var _0xf656x2f={dateStart:_0xf656x2c[_0x42da[53]][_0x42da[52]],dateEnd:_0xf656x2c[_0x42da[53]][_0x42da[54]]};delete _0xf656x2c[_0x42da[53]][_0x42da[52]];delete _0xf656x2c[_0x42da[53]][_0x42da[54]];_0xf656x2d[_0x42da[53]]= _[_0x42da[51]](_0xf656x2c[_0x42da[53]]);_0xf656x2d[_0x42da[55]]= _[_0x42da[56]](_0xf656x2d[_0x42da[48]],_0xf656x2d[_0x42da[53]]);_0xf656x1f[_0x42da[57]]= _[_0x42da[56]](_0xf656x2d[_0x42da[48]],qs[_0x42da[58]](_0xf656x2c[_0x42da[53]][_0x42da[58]]));_0xf656x1f[_0x42da[57]]= (_0xf656x1f[_0x42da[57]][_0x42da[59]])?_0xf656x1f[_0x42da[57]]:_0xf656x2d[_0x42da[48]];if(!_0xf656x2c[_0x42da[53]][_0x42da[61]](_0x42da[60])){_0xf656x1f[_0x42da[32]]= qs[_0x42da[32]](_0xf656x2c[_0x42da[53]][_0x42da[32]]);_0xf656x1f[_0x42da[31]]= qs[_0x42da[31]](_0xf656x2c[_0x42da[53]][_0x42da[31]])};_0xf656x1f[_0x42da[62]]= qs[_0x42da[63]](_0xf656x2c[_0x42da[53]][_0x42da[63]]);_0xf656x1f[_0x42da[64]]= qs[_0x42da[55]](_[_0x42da[65]](_0xf656x2c[_0x42da[53]],_0xf656x2d[_0x42da[55]]));if(_0xf656x2f[_0x42da[52]]){if(_0xf656x2f[_0x42da[54]]){_0xf656x2f[_0x42da[54]]= moment(_0xf656x2f[_0x42da[54]])[_0x42da[67]](1,_0x42da[66])}else {_0xf656x2f[_0x42da[54]]= moment(_0xf656x2f[_0x42da[52]])[_0x42da[67]](1,_0x42da[66])};_[_0x42da[68]](_0xf656x1f[_0x42da[64]],{createdAt:{$gte:_0xf656x2f[_0x42da[52]],$lte:_0xf656x2f[_0x42da[54]]}})};if(_0xf656x2c[_0x42da[53]][_0x42da[69]]){_0xf656x1f[_0x42da[64]]= _[_0x42da[68]](_0xf656x1f[_0x42da[64]],{$or:_[_0x42da[71]](_0xf656x1f[_0x42da[57]],function(_0xf656x30){var _0xf656x2e={};_0xf656x2e[_0xf656x30]= {$like:_0x42da[70]+ _0xf656x2c[_0x42da[53]][_0x42da[69]]+ _0x42da[70]};return _0xf656x2e})})};_0xf656x1f= _[_0x42da[68]]({},_0xf656x1f,_0xf656x2c[_0x42da[72]]);var _0xf656x31={where:_0xf656x1f[_0x42da[64]]};return db[_0x42da[50]][_0x42da[30]](_0xf656x31)[_0x42da[40]](function(_0xf656x20){_0xf656x2e[_0x42da[30]]= _0xf656x20;if(_0xf656x2c[_0x42da[53]][_0x42da[75]]){_0xf656x1f[_0x42da[76]]= [{all:true}]};return db[_0x42da[50]][_0x42da[77]](_0xf656x1f)})[_0x42da[40]](function(_0xf656x32){_0xf656x2e[_0x42da[74]]= _0xf656x32;return _0xf656x2e})[_0x42da[40]](respondWithFilteredResult(_0xf656x1a,_0xf656x1f))[_0x42da[73]](handleError(_0xf656x1a,null))};exports[_0x42da[78]]= function(_0xf656x2c,_0xf656x1a){var _0xf656x1f={raw:true,where:{id:_0xf656x2c[_0x42da[80]][_0x42da[79]]}},_0xf656x2d={};_0xf656x2d[_0x42da[48]]= _[_0x42da[51]](db[_0x42da[50]][_0x42da[49]]);_0xf656x2d[_0x42da[53]]= _[_0x42da[51]](_0xf656x2c[_0x42da[53]]);_0xf656x2d[_0x42da[55]]= _[_0x42da[56]](_0xf656x2d[_0x42da[48]],_0xf656x2d[_0x42da[53]]);_0xf656x1f[_0x42da[57]]= _[_0x42da[56]](_0xf656x2d[_0x42da[48]],qs[_0x42da[58]](_0xf656x2c[_0x42da[53]][_0x42da[58]]));_0xf656x1f[_0x42da[57]]= (_0xf656x1f[_0x42da[57]][_0x42da[59]])?_0xf656x1f[_0x42da[57]]:_0xf656x2d[_0x42da[48]];if(_0xf656x2c[_0x42da[53]][_0x42da[75]]){_0xf656x1f[_0x42da[76]]= [{all:true}]};_0xf656x1f= _[_0x42da[68]]({},_0xf656x1f,_0xf656x2c[_0x42da[72]]);return db[_0x42da[50]][_0x42da[81]](_0xf656x1f)[_0x42da[40]](handleEntityNotFound(_0xf656x1a,null))[_0x42da[40]](respondWithResult(_0xf656x1a,null))[_0x42da[73]](handleError(_0xf656x1a,null))};exports[_0x42da[82]]= function(_0xf656x2c,_0xf656x1a){return db[_0x42da[50]][_0x42da[82]](_0xf656x2c[_0x42da[83]],{})[_0x42da[40]](respondWithResult(_0xf656x1a,201))[_0x42da[73]](handleError(_0xf656x1a,null))};exports[_0x42da[41]]= function(_0xf656x2c,_0xf656x1a){if(_0xf656x2c[_0x42da[83]][_0x42da[79]]){delete _0xf656x2c[_0x42da[83]][_0x42da[79]]};return db[_0x42da[50]][_0x42da[81]]({where:{id:_0xf656x2c[_0x42da[80]][_0x42da[79]]}})[_0x42da[40]](handleEntityNotFound(_0xf656x1a,null))[_0x42da[40]](saveUpdates(_0xf656x2c[_0x42da[83]],null))[_0x42da[40]](respondWithResult(_0xf656x1a,null))[_0x42da[73]](handleError(_0xf656x1a,null))};exports[_0x42da[42]]= function(_0xf656x2c,_0xf656x1a){return db[_0x42da[50]][_0x42da[81]]({where:{id:_0xf656x2c[_0x42da[80]][_0x42da[79]]}})[_0x42da[40]](handleEntityNotFound(_0xf656x1a,null))[_0x42da[40]](removeEntity(_0xf656x1a,null))[_0x42da[73]](handleError(_0xf656x1a,null))};exports[_0x42da[84]]= function(_0xf656x2c,_0xf656x1a){return db[_0x42da[50]][_0x42da[84]]()[_0x42da[40]](respondWithResult(_0xf656x1a,null))[_0x42da[73]](handleError(_0xf656x1a,null))}
\ No newline at end of file
index 4d63ace..62ea4b1 100644 (file)
@@ -1 +1 @@
-var _0x54e2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0x54e2[0];var _=require(_0x54e2[1]);var util=require(_0x54e2[2]);var logger=require(_0x54e2[4])(_0x54e2[3]);var moment=require(_0x54e2[5]);var BPromise=require(_0x54e2[6]);var rp=require(_0x54e2[7]);var attributes=require(_0x54e2[8]);module[_0x54e2[9]]= function(_0x915fx8,_0x915fx9){return _0x915fx8[_0x54e2[13]](_0x54e2[10],attributes,{tableName:_0x54e2[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x54e2[12],"\x66\x69\x65\x6C\x64\x73":[_0x54e2[12]]}],timestamps:true})}
\ No newline at end of file
+var _0xf79b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0xf79b[0];var _=require(_0xf79b[1]);var util=require(_0xf79b[2]);var logger=require(_0xf79b[4])(_0xf79b[3]);var moment=require(_0xf79b[5]);var BPromise=require(_0xf79b[6]);var rp=require(_0xf79b[7]);var attributes=require(_0xf79b[8]);module[_0xf79b[9]]= function(_0x7926x8,_0x7926x9){return _0x7926x8[_0xf79b[13]](_0xf79b[10],attributes,{tableName:_0xf79b[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0xf79b[12],"\x66\x69\x65\x6C\x64\x73":[_0xf79b[12]]}],timestamps:true})}
\ No newline at end of file
index bdb2730..bcb6750 100644 (file)
@@ -1 +1 @@
-var _0x6309=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x55\x70\x64\x61\x74\x65\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65"];_0x6309[0];var _=require(_0x6309[1]);var util=require(_0x6309[2]);var moment=require(_0x6309[3]);var BPromise=require(_0x6309[4]);var rs=require(_0x6309[5]);var fs=require(_0x6309[6]);var db=require(_0x6309[8])[_0x6309[7]];var utils=require(_0x6309[9]);var logger=require(_0x6309[11])(_0x6309[10]);var config=require(_0x6309[12]);var jayson=require(_0x6309[13]);var client=jayson[_0x6309[15]][_0x6309[14]]({port:9002});function respondWithRpcPromise(_0xe5f7xe,_0xe5f7xf,_0xe5f7x10){return  new BPromise(function(_0xe5f7x11,_0xe5f7x12){return client[_0x6309[28]](_0xe5f7xe,_0xe5f7x10)[_0x6309[27]](function(_0xe5f7x14){logger[_0x6309[20]](_0x6309[16],_0xe5f7xf,_0x6309[19]);logger[_0x6309[23]](_0x6309[21],_0xe5f7xf,_0x6309[19],JSON[_0x6309[22]](_0xe5f7x14));if(_0xe5f7x14[_0x6309[17]]){if(_0xe5f7x14[_0x6309[17]][_0x6309[24]]=== 500){logger[_0x6309[17]](_0x6309[16],_0xe5f7xf,_0xe5f7x14[_0x6309[17]][_0x6309[25]]);return _0xe5f7x12(_0xe5f7x14[_0x6309[17]][_0x6309[25]])};logger[_0x6309[17]](_0x6309[16],_0xe5f7xf,_0xe5f7x14[_0x6309[17]][_0x6309[25]]);return _0xe5f7x11(_0xe5f7x14[_0x6309[17]][_0x6309[25]])}else {logger[_0x6309[20]](_0x6309[16],_0xe5f7xf,_0x6309[19]);_0xe5f7x11(_0xe5f7x14[_0x6309[26]][_0x6309[25]])}})[_0x6309[18]](function(_0xe5f7x13){logger[_0x6309[17]](_0x6309[16],_0xe5f7xf,_0xe5f7x13);_0xe5f7x12(_0xe5f7x13)})})}exports[_0x6309[29]]= function(_0xe5f7x10){var _0xe5f7x15=this;return  new Promise(function(_0xe5f7x11,_0xe5f7x12){return db[_0x6309[34]][_0x6309[33]](_0xe5f7x10[_0x6309[30]],{raw:_0xe5f7x10[_0x6309[31]]?(_0xe5f7x10[_0x6309[31]][_0x6309[32]]=== undefined)?true:false:true})[_0x6309[27]](function(_0xe5f7x14){logger[_0x6309[20]](_0x6309[29],_0xe5f7x10);logger[_0x6309[23]](_0x6309[29],_0xe5f7x10,JSON[_0x6309[22]](_0xe5f7x14));_0xe5f7x11(_0xe5f7x14)})[_0x6309[18]](function(_0xe5f7x13){logger[_0x6309[17]](_0x6309[29],_0xe5f7x13[_0x6309[25]],_0xe5f7x10);_0xe5f7x12(_0xe5f7x15[_0x6309[17]](500,_0xe5f7x13[_0x6309[25]]))})})};exports[_0x6309[35]]= function(_0xe5f7x10){var _0xe5f7x15=this;return  new Promise(function(_0xe5f7x11,_0xe5f7x12){return db[_0x6309[34]][_0x6309[39]](_0xe5f7x10[_0x6309[30]],{raw:_0xe5f7x10[_0x6309[31]]?(_0xe5f7x10[_0x6309[31]][_0x6309[32]]=== undefined)?true:false:true,individualHooks:true,where:_0xe5f7x10[_0x6309[31]]?_0xe5f7x10[_0x6309[31]][_0x6309[36]]|| null:null,attributes:_0xe5f7x10[_0x6309[31]]?_0xe5f7x10[_0x6309[31]][_0x6309[37]]|| null:null,limit:_0xe5f7x10[_0x6309[31]]?_0xe5f7x10[_0x6309[31]][_0x6309[38]]|| null:null})[_0x6309[27]](function(_0xe5f7x14){logger[_0x6309[20]](_0x6309[35],_0xe5f7x10);logger[_0x6309[23]](_0x6309[35],_0xe5f7x10,JSON[_0x6309[22]](_0xe5f7x14));_0xe5f7x11(_0xe5f7x14)})[_0x6309[18]](function(_0xe5f7x13){logger[_0x6309[17]](_0x6309[35],_0xe5f7x13[_0x6309[25]],_0xe5f7x10);_0xe5f7x12(_0xe5f7x15[_0x6309[17]](500,_0xe5f7x13[_0x6309[25]]))})})}
\ No newline at end of file
+var _0xb1e3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x55\x70\x64\x61\x74\x65\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65"];_0xb1e3[0];var _=require(_0xb1e3[1]);var util=require(_0xb1e3[2]);var moment=require(_0xb1e3[3]);var BPromise=require(_0xb1e3[4]);var rs=require(_0xb1e3[5]);var fs=require(_0xb1e3[6]);var db=require(_0xb1e3[8])[_0xb1e3[7]];var utils=require(_0xb1e3[9]);var logger=require(_0xb1e3[11])(_0xb1e3[10]);var config=require(_0xb1e3[12]);var jayson=require(_0xb1e3[13]);var client=jayson[_0xb1e3[15]][_0xb1e3[14]]({port:9002});function respondWithRpcPromise(_0x41c9xe,_0x41c9xf,_0x41c9x10){return  new BPromise(function(_0x41c9x11,_0x41c9x12){return client[_0xb1e3[28]](_0x41c9xe,_0x41c9x10)[_0xb1e3[27]](function(_0x41c9x14){logger[_0xb1e3[20]](_0xb1e3[16],_0x41c9xf,_0xb1e3[19]);logger[_0xb1e3[23]](_0xb1e3[21],_0x41c9xf,_0xb1e3[19],JSON[_0xb1e3[22]](_0x41c9x14));if(_0x41c9x14[_0xb1e3[17]]){if(_0x41c9x14[_0xb1e3[17]][_0xb1e3[24]]=== 500){logger[_0xb1e3[17]](_0xb1e3[16],_0x41c9xf,_0x41c9x14[_0xb1e3[17]][_0xb1e3[25]]);return _0x41c9x12(_0x41c9x14[_0xb1e3[17]][_0xb1e3[25]])};logger[_0xb1e3[17]](_0xb1e3[16],_0x41c9xf,_0x41c9x14[_0xb1e3[17]][_0xb1e3[25]]);return _0x41c9x11(_0x41c9x14[_0xb1e3[17]][_0xb1e3[25]])}else {logger[_0xb1e3[20]](_0xb1e3[16],_0x41c9xf,_0xb1e3[19]);_0x41c9x11(_0x41c9x14[_0xb1e3[26]][_0xb1e3[25]])}})[_0xb1e3[18]](function(_0x41c9x13){logger[_0xb1e3[17]](_0xb1e3[16],_0x41c9xf,_0x41c9x13);_0x41c9x12(_0x41c9x13)})})}exports[_0xb1e3[29]]= function(_0x41c9x10){var _0x41c9x15=this;return  new Promise(function(_0x41c9x11,_0x41c9x12){return db[_0xb1e3[34]][_0xb1e3[33]](_0x41c9x10[_0xb1e3[30]],{raw:_0x41c9x10[_0xb1e3[31]]?(_0x41c9x10[_0xb1e3[31]][_0xb1e3[32]]=== undefined)?true:false:true})[_0xb1e3[27]](function(_0x41c9x14){logger[_0xb1e3[20]](_0xb1e3[29],_0x41c9x10);logger[_0xb1e3[23]](_0xb1e3[29],_0x41c9x10,JSON[_0xb1e3[22]](_0x41c9x14));_0x41c9x11(_0x41c9x14)})[_0xb1e3[18]](function(_0x41c9x13){logger[_0xb1e3[17]](_0xb1e3[29],_0x41c9x13[_0xb1e3[25]],_0x41c9x10);_0x41c9x12(_0x41c9x15[_0xb1e3[17]](500,_0x41c9x13[_0xb1e3[25]]))})})};exports[_0xb1e3[35]]= function(_0x41c9x10){var _0x41c9x15=this;return  new Promise(function(_0x41c9x11,_0x41c9x12){return db[_0xb1e3[34]][_0xb1e3[39]](_0x41c9x10[_0xb1e3[30]],{raw:_0x41c9x10[_0xb1e3[31]]?(_0x41c9x10[_0xb1e3[31]][_0xb1e3[32]]=== undefined)?true:false:true,individualHooks:true,where:_0x41c9x10[_0xb1e3[31]]?_0x41c9x10[_0xb1e3[31]][_0xb1e3[36]]|| null:null,attributes:_0x41c9x10[_0xb1e3[31]]?_0x41c9x10[_0xb1e3[31]][_0xb1e3[37]]|| null:null,limit:_0x41c9x10[_0xb1e3[31]]?_0x41c9x10[_0xb1e3[31]][_0xb1e3[38]]|| null:null})[_0xb1e3[27]](function(_0x41c9x14){logger[_0xb1e3[20]](_0xb1e3[35],_0x41c9x10);logger[_0xb1e3[23]](_0xb1e3[35],_0x41c9x10,JSON[_0xb1e3[22]](_0x41c9x14));_0x41c9x11(_0x41c9x14)})[_0xb1e3[18]](function(_0x41c9x13){logger[_0xb1e3[17]](_0xb1e3[35],_0x41c9x13[_0xb1e3[25]],_0x41c9x10);_0x41c9x12(_0x41c9x15[_0xb1e3[17]](500,_0x41c9x13[_0xb1e3[25]]))})})}
\ No newline at end of file
index e7e98ac..f1d0e42 100644 (file)
@@ -1 +1 @@
-var _0x80eb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x80eb[0];var multer=require(_0x80eb[1]);var util=require(_0x80eb[2]);var path=require(_0x80eb[3]);var express=require(_0x80eb[4]);var router=express.Router();var auth=require(_0x80eb[5]);var interaction=require(_0x80eb[6]);var config=require(_0x80eb[7]);var controller=require(_0x80eb[8]);router[_0x80eb[12]](_0x80eb[9],auth[_0x80eb[10]](),controller[_0x80eb[11]]);router[_0x80eb[12]](_0x80eb[13],auth[_0x80eb[10]](),controller[_0x80eb[14]]);router[_0x80eb[12]](_0x80eb[15],auth[_0x80eb[10]](),controller[_0x80eb[16]]);router[_0x80eb[18]](_0x80eb[9],auth[_0x80eb[10]](),controller[_0x80eb[17]]);router[_0x80eb[20]](_0x80eb[15],auth[_0x80eb[10]](),controller[_0x80eb[19]]);router[_0x80eb[22]](_0x80eb[15],auth[_0x80eb[10]](),controller[_0x80eb[21]]);module[_0x80eb[23]]= router
\ No newline at end of file
+var _0x814e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x814e[0];var multer=require(_0x814e[1]);var util=require(_0x814e[2]);var path=require(_0x814e[3]);var express=require(_0x814e[4]);var router=express.Router();var auth=require(_0x814e[5]);var interaction=require(_0x814e[6]);var config=require(_0x814e[7]);var controller=require(_0x814e[8]);router[_0x814e[12]](_0x814e[9],auth[_0x814e[10]](),controller[_0x814e[11]]);router[_0x814e[12]](_0x814e[13],auth[_0x814e[10]](),controller[_0x814e[14]]);router[_0x814e[12]](_0x814e[15],auth[_0x814e[10]](),controller[_0x814e[16]]);router[_0x814e[18]](_0x814e[9],auth[_0x814e[10]](),controller[_0x814e[17]]);router[_0x814e[20]](_0x814e[15],auth[_0x814e[10]](),controller[_0x814e[19]]);router[_0x814e[22]](_0x814e[15],auth[_0x814e[10]](),controller[_0x814e[21]]);module[_0x814e[23]]= router
\ No newline at end of file
index daf8f58..3d15c6c 100644 (file)
@@ -1 +1 @@
-var _0xe586=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xe586[0];var multer=require(_0xe586[1]);var util=require(_0xe586[2]);var path=require(_0xe586[3]);var express=require(_0xe586[4]);var router=express.Router();var auth=require(_0xe586[5]);var interaction=require(_0xe586[6]);var config=require(_0xe586[7]);var controller=require(_0xe586[8]);router[_0xe586[12]](_0xe586[9],auth[_0xe586[10]](),controller[_0xe586[11]]);router[_0xe586[12]](_0xe586[13],auth[_0xe586[10]](),controller[_0xe586[14]]);router[_0xe586[12]](_0xe586[15],auth[_0xe586[10]](),controller[_0xe586[16]]);router[_0xe586[12]](_0xe586[17],auth[_0xe586[10]](),controller[_0xe586[18]]);router[_0xe586[20]](_0xe586[9],auth[_0xe586[10]](),controller[_0xe586[19]]);router[_0xe586[20]](_0xe586[15],auth[_0xe586[10]](),controller[_0xe586[21]]);router[_0xe586[23]](_0xe586[13],auth[_0xe586[10]](),controller[_0xe586[22]]);router[_0xe586[25]](_0xe586[13],auth[_0xe586[10]](),controller[_0xe586[24]]);module[_0xe586[26]]= router
\ No newline at end of file
+var _0x48ff=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x48ff[0];var multer=require(_0x48ff[1]);var util=require(_0x48ff[2]);var path=require(_0x48ff[3]);var express=require(_0x48ff[4]);var router=express.Router();var auth=require(_0x48ff[5]);var interaction=require(_0x48ff[6]);var config=require(_0x48ff[7]);var controller=require(_0x48ff[8]);router[_0x48ff[12]](_0x48ff[9],auth[_0x48ff[10]](),controller[_0x48ff[11]]);router[_0x48ff[12]](_0x48ff[13],auth[_0x48ff[10]](),controller[_0x48ff[14]]);router[_0x48ff[12]](_0x48ff[15],auth[_0x48ff[10]](),controller[_0x48ff[16]]);router[_0x48ff[12]](_0x48ff[17],auth[_0x48ff[10]](),controller[_0x48ff[18]]);router[_0x48ff[20]](_0x48ff[9],auth[_0x48ff[10]](),controller[_0x48ff[19]]);router[_0x48ff[20]](_0x48ff[15],auth[_0x48ff[10]](),controller[_0x48ff[21]]);router[_0x48ff[23]](_0x48ff[13],auth[_0x48ff[10]](),controller[_0x48ff[22]]);router[_0x48ff[25]](_0x48ff[13],auth[_0x48ff[10]](),controller[_0x48ff[24]]);module[_0x48ff[26]]= router
\ No newline at end of file
index c13d968..1ea0f1a 100644 (file)
@@ -1 +1 @@
-var _0x9cc8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x62\x61\x73\x69\x63","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x54\x61\x62","\x6E\x65\x77\x54\x61\x62"];_0x9cc8[0];var Sequelize=require(_0x9cc8[1]);module[_0x9cc8[2]]= {name:{type:Sequelize[_0x9cc8[3]]},description:{type:Sequelize[_0x9cc8[3]]},username:{type:Sequelize[_0x9cc8[3]]},remoteUri:{type:Sequelize[_0x9cc8[3]]},authType:{type:Sequelize.ENUM(_0x9cc8[4]),defaultValue:_0x9cc8[4]},password:{type:Sequelize[_0x9cc8[3]]},consumerKey:{type:Sequelize[_0x9cc8[3]]},consumerSecret:{type:Sequelize[_0x9cc8[3]]},token:{type:Sequelize[_0x9cc8[3]]},tokenSecret:{type:Sequelize[_0x9cc8[3]]},serverUrl:{type:Sequelize[_0x9cc8[3]]},type:{type:Sequelize.ENUM(_0x9cc8[5],_0x9cc8[6]),defaultValue:_0x9cc8[5]}}
\ No newline at end of file
+var _0x9ff6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x62\x61\x73\x69\x63","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x54\x61\x62","\x6E\x65\x77\x54\x61\x62"];_0x9ff6[0];var Sequelize=require(_0x9ff6[1]);module[_0x9ff6[2]]= {name:{type:Sequelize[_0x9ff6[3]]},description:{type:Sequelize[_0x9ff6[3]]},username:{type:Sequelize[_0x9ff6[3]]},remoteUri:{type:Sequelize[_0x9ff6[3]]},authType:{type:Sequelize.ENUM(_0x9ff6[4]),defaultValue:_0x9ff6[4]},password:{type:Sequelize[_0x9ff6[3]]},consumerKey:{type:Sequelize[_0x9ff6[3]]},consumerSecret:{type:Sequelize[_0x9ff6[3]]},token:{type:Sequelize[_0x9ff6[3]]},tokenSecret:{type:Sequelize[_0x9ff6[3]]},serverUrl:{type:Sequelize[_0x9ff6[3]]},type:{type:Sequelize.ENUM(_0x9ff6[5],_0x9ff6[6]),defaultValue:_0x9ff6[5]}}
\ No newline at end of file
index 6314a6f..57ae167 100644 (file)
@@ -1 +1 @@
-var _0x7d28=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x79\x70\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x70\x72\x69\x6F\x72\x69\x74\x79","\x74\x65\x73\x74","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73","\x47\x45\x54","\x25\x73\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x66\x6F\x72\x6D\x61\x74","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x61\x75\x74\x68\x54\x79\x70\x65","\x62\x61\x73\x69\x63","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x68\x65\x61\x64\x65\x72\x73","\x42\x61\x73\x69\x63\x20\x25\x73","\x62\x61\x73\x65\x36\x34","\x25\x73\x3A\x25\x73","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x65\x6E\x74\x72\x69\x65\x73","\x5F\x65\x6D\x62\x65\x64\x64\x65\x64","\x61\x63\x74\x69\x76\x65","\x6C\x61\x62\x65\x6C","\x63\x6F\x6E\x63\x61\x74","\x63\x6F\x6E\x73\x75\x6D\x65\x72\x4B\x65\x79","\x63\x6F\x6E\x73\x75\x6D\x65\x72\x53\x65\x63\x72\x65\x74","\x74\x6F\x6B\x65\x6E","\x74\x6F\x6B\x65\x6E\x53\x65\x63\x72\x65\x74"];_0x7d28[0];var jsonpatch=require(_0x7d28[1]);var rp=require(_0x7d28[2]);var moment=require(_0x7d28[3]);var BPromise=require(_0x7d28[4]);var Mustache=require(_0x7d28[5]);var util=require(_0x7d28[6]);var path=require(_0x7d28[7]);var sox=require(_0x7d28[8]);var csv=require(_0x7d28[9]);var ejs=require(_0x7d28[10]);var fs=require(_0x7d28[11]);var _=require(_0x7d28[12]);var squel=require(_0x7d28[13]);var crypto=require(_0x7d28[14]);var jsforce=require(_0x7d28[15]);var deskjs=require(_0x7d28[16]);var toCsv=require(_0x7d28[9]);var querystring=require(_0x7d28[17]);var Papa=require(_0x7d28[18]);var qs=require(_0x7d28[19]);var logger=require(_0x7d28[21])(_0x7d28[20]);var utils=require(_0x7d28[22]);var config=require(_0x7d28[23]);var db=require(_0x7d28[25])[_0x7d28[24]];var integrations=require(_0x7d28[26]);var jayson=require(_0x7d28[27]);var client=jayson[_0x7d28[29]][_0x7d28[28]]({port:9002});function respondWithRpcPromise(_0x3ec6x1d,_0x3ec6x1e,_0x3ec6x1f,_0x3ec6x20){return  new BPromise(function(_0x3ec6x21,_0x3ec6x22){var _0x3ec6x23=(_0x3ec6x20|| client);return _0x3ec6x23[_0x7d28[42]](_0x3ec6x1d,_0x3ec6x1f)[_0x7d28[41]](function(_0x3ec6x25){logger[_0x7d28[34]](_0x7d28[30],_0x3ec6x1e,_0x7d28[33]);logger[_0x7d28[37]](_0x7d28[35],_0x3ec6x1e,_0x7d28[33],JSON[_0x7d28[36]](_0x3ec6x25));if(_0x3ec6x25[_0x7d28[31]]){if(_0x3ec6x25[_0x7d28[31]][_0x7d28[38]]=== 500){logger[_0x7d28[31]](_0x7d28[30],_0x3ec6x1e,_0x3ec6x25[_0x7d28[31]][_0x7d28[39]]);return _0x3ec6x22(_0x3ec6x25[_0x7d28[31]][_0x7d28[39]])};logger[_0x7d28[31]](_0x7d28[30],_0x3ec6x1e,_0x3ec6x25[_0x7d28[31]][_0x7d28[39]]);return _0x3ec6x21(_0x3ec6x25[_0x7d28[31]][_0x7d28[39]])}else {logger[_0x7d28[34]](_0x7d28[30],_0x3ec6x1e,_0x7d28[33]);_0x3ec6x21(_0x3ec6x25[_0x7d28[40]][_0x7d28[39]])}})[_0x7d28[32]](function(_0x3ec6x24){logger[_0x7d28[31]](_0x7d28[30],_0x3ec6x1e,_0x3ec6x24);_0x3ec6x22(_0x3ec6x24)})})}function respondWithStatusCode(_0x3ec6x25,_0x3ec6x27){_0x3ec6x27= _0x3ec6x27|| 204;return function(_0x3ec6x28){if(_0x3ec6x28){return _0x3ec6x25[_0x7d28[43]](_0x3ec6x27)};return _0x3ec6x25[_0x7d28[45]](_0x3ec6x27)[_0x7d28[44]]()}}function respondWithResult(_0x3ec6x25,_0x3ec6x27){_0x3ec6x27= _0x3ec6x27|| 200;return function(_0x3ec6x28){if(_0x3ec6x28){return _0x3ec6x25[_0x7d28[45]](_0x3ec6x27)[_0x7d28[46]](_0x3ec6x28)}}}function respondWithFilteredResult(_0x3ec6x25,_0x3ec6x2b){return function(_0x3ec6x28){if(_0x3ec6x28){var _0x3ec6x2c=_0x3ec6x28[_0x7d28[47]],_0x3ec6x2d=_0x3ec6x2b[_0x7d28[48]],_0x3ec6x2e=_0x3ec6x2b[_0x7d28[48]]+ _0x3ec6x2b[_0x7d28[49]],_0x3ec6x27;if(_0x3ec6x2e>= _0x3ec6x2c){_0x3ec6x2e= _0x3ec6x2c;_0x3ec6x27= 200}else {_0x3ec6x27= 206};_0x3ec6x25[_0x7d28[45]](_0x3ec6x27);return _0x3ec6x25[_0x7d28[53]](_0x7d28[50],_0x3ec6x2d+ _0x7d28[51]+ _0x3ec6x2e+ _0x7d28[52]+ _0x3ec6x2c)[_0x7d28[46]](_0x3ec6x28)};return null}}function patchUpdates(_0x3ec6x30){return function(_0x3ec6x28){try{jsonpatch[_0x7d28[54]](_0x3ec6x28,_0x3ec6x30,true)}catch(err){return BPromise[_0x7d28[55]](err)};return _0x3ec6x28[_0x7d28[56]]()}}function saveUpdates(_0x3ec6x32,_0x3ec6x27){return function(_0x3ec6x28){if(_0x3ec6x28){return _0x3ec6x28[_0x7d28[57]](_0x3ec6x32)[_0x7d28[41]](function(_0x3ec6x33){return _0x3ec6x33})};return null}}function removeEntity(_0x3ec6x25,_0x3ec6x27){return function(_0x3ec6x28){if(_0x3ec6x28){return _0x3ec6x28[_0x7d28[58]]()[_0x7d28[41]](function(){_0x3ec6x25[_0x7d28[45]](204)[_0x7d28[44]]()})}}}function handleEntityNotFound(_0x3ec6x25,_0x3ec6x27){return function(_0x3ec6x28){if(!_0x3ec6x28){_0x3ec6x25[_0x7d28[43]](404)};return _0x3ec6x28}}function handleError(_0x3ec6x25,_0x3ec6x27){_0x3ec6x27= _0x3ec6x27|| 500;return function(_0x3ec6x24){logger[_0x7d28[31]](_0x3ec6x24[_0x7d28[59]]);if(_0x3ec6x24[_0x7d28[60]]){delete _0x3ec6x24[_0x7d28[60]]};_0x3ec6x25[_0x7d28[45]](_0x3ec6x27)[_0x7d28[61]](_0x3ec6x24)}}exports[_0x7d28[62]]= function(_0x3ec6x1f,_0x3ec6x25){var _0x3ec6x2b={},_0x3ec6x37={},_0x3ec6x38={count:0,rows:[]};_0x3ec6x37[_0x7d28[63]]= _[_0x7d28[66]](db[_0x7d28[65]][_0x7d28[64]]);var _0x3ec6x39={dateStart:_0x3ec6x1f[_0x7d28[68]][_0x7d28[67]],dateEnd:_0x3ec6x1f[_0x7d28[68]][_0x7d28[69]]};delete _0x3ec6x1f[_0x7d28[68]][_0x7d28[67]];delete _0x3ec6x1f[_0x7d28[68]][_0x7d28[69]];_0x3ec6x37[_0x7d28[68]]= _[_0x7d28[66]](_0x3ec6x1f[_0x7d28[68]]);_0x3ec6x37[_0x7d28[70]]= _[_0x7d28[71]](_0x3ec6x37[_0x7d28[63]],_0x3ec6x37[_0x7d28[68]]);_0x3ec6x2b[_0x7d28[72]]= _[_0x7d28[71]](_0x3ec6x37[_0x7d28[63]],qs[_0x7d28[73]](_0x3ec6x1f[_0x7d28[68]][_0x7d28[73]]));_0x3ec6x2b[_0x7d28[72]]= (_0x3ec6x2b[_0x7d28[72]][_0x7d28[74]])?_0x3ec6x2b[_0x7d28[72]]:_0x3ec6x37[_0x7d28[63]];if(!_0x3ec6x1f[_0x7d28[68]][_0x7d28[76]](_0x7d28[75])){_0x3ec6x2b[_0x7d28[49]]= qs[_0x7d28[49]](_0x3ec6x1f[_0x7d28[68]][_0x7d28[49]]);_0x3ec6x2b[_0x7d28[48]]= qs[_0x7d28[48]](_0x3ec6x1f[_0x7d28[68]][_0x7d28[48]])};_0x3ec6x2b[_0x7d28[77]]= qs[_0x7d28[78]](_0x3ec6x1f[_0x7d28[68]][_0x7d28[78]]);_0x3ec6x2b[_0x7d28[79]]= qs[_0x7d28[70]](_[_0x7d28[80]](_0x3ec6x1f[_0x7d28[68]],_0x3ec6x37[_0x7d28[70]]));if(_0x3ec6x39[_0x7d28[67]]){if(_0x3ec6x39[_0x7d28[69]]){_0x3ec6x39[_0x7d28[69]]= moment(_0x3ec6x39[_0x7d28[69]])[_0x7d28[82]](1,_0x7d28[81])}else {_0x3ec6x39[_0x7d28[69]]= moment(_0x3ec6x39[_0x7d28[67]])[_0x7d28[82]](1,_0x7d28[81])};_[_0x7d28[83]](_0x3ec6x2b[_0x7d28[79]],{createdAt:{$gte:_0x3ec6x39[_0x7d28[67]],$lte:_0x3ec6x39[_0x7d28[69]]}})};if(_0x3ec6x1f[_0x7d28[68]][_0x7d28[84]]){_0x3ec6x2b[_0x7d28[79]]= _[_0x7d28[83]](_0x3ec6x2b[_0x7d28[79]],{$or:_[_0x7d28[86]](_0x3ec6x2b[_0x7d28[72]],function(_0x3ec6x3a){var _0x3ec6x38={};_0x3ec6x38[_0x3ec6x3a]= {$like:_0x7d28[85]+ _0x3ec6x1f[_0x7d28[68]][_0x7d28[84]]+ _0x7d28[85]};return _0x3ec6x38})})};_0x3ec6x2b= _[_0x7d28[83]]({},_0x3ec6x2b,_0x3ec6x1f[_0x7d28[87]]);var _0x3ec6x3b={where:_0x3ec6x2b[_0x7d28[79]]};return db[_0x7d28[65]][_0x7d28[47]](_0x3ec6x3b)[_0x7d28[41]](function(_0x3ec6x2c){_0x3ec6x38[_0x7d28[47]]= _0x3ec6x2c;if(_0x3ec6x1f[_0x7d28[68]][_0x7d28[89]]){_0x3ec6x2b[_0x7d28[90]]= [{all:true}]};return db[_0x7d28[65]][_0x7d28[91]](_0x3ec6x2b)})[_0x7d28[41]](function(_0x3ec6x3c){_0x3ec6x38[_0x7d28[88]]= _0x3ec6x3c;return _0x3ec6x38})[_0x7d28[41]](respondWithFilteredResult(_0x3ec6x25,_0x3ec6x2b))[_0x7d28[32]](handleError(_0x3ec6x25,null))};exports[_0x7d28[92]]= function(_0x3ec6x1f,_0x3ec6x25){var _0x3ec6x2b={raw:false,where:{id:_0x3ec6x1f[_0x7d28[94]][_0x7d28[93]]}},_0x3ec6x37={};_0x3ec6x37[_0x7d28[63]]= _[_0x7d28[66]](db[_0x7d28[65]][_0x7d28[64]]);_0x3ec6x37[_0x7d28[68]]= _[_0x7d28[66]](_0x3ec6x1f[_0x7d28[68]]);_0x3ec6x37[_0x7d28[70]]= _[_0x7d28[71]](_0x3ec6x37[_0x7d28[63]],_0x3ec6x37[_0x7d28[68]]);_0x3ec6x2b[_0x7d28[72]]= _[_0x7d28[71]](_0x3ec6x37[_0x7d28[63]],qs[_0x7d28[73]](_0x3ec6x1f[_0x7d28[68]][_0x7d28[73]]));_0x3ec6x2b[_0x7d28[72]]= (_0x3ec6x2b[_0x7d28[72]][_0x7d28[74]])?_0x3ec6x2b[_0x7d28[72]]:_0x3ec6x37[_0x7d28[63]];if(_0x3ec6x1f[_0x7d28[68]][_0x7d28[89]]){_0x3ec6x2b[_0x7d28[90]]= [{all:true}]};_0x3ec6x2b= _[_0x7d28[83]]({},_0x3ec6x2b,_0x3ec6x1f[_0x7d28[87]]);return db[_0x7d28[65]][_0x7d28[95]](_0x3ec6x2b)[_0x7d28[41]](handleEntityNotFound(_0x3ec6x25,null))[_0x7d28[41]](respondWithResult(_0x3ec6x25,null))[_0x7d28[32]](handleError(_0x3ec6x25,null))};exports[_0x7d28[96]]= function(_0x3ec6x1f,_0x3ec6x25){return db[_0x7d28[65]][_0x7d28[96]](_0x3ec6x1f[_0x7d28[97]],{})[_0x7d28[41]](respondWithResult(_0x3ec6x25,201))[_0x7d28[32]](handleError(_0x3ec6x25,null))};exports[_0x7d28[57]]= function(_0x3ec6x1f,_0x3ec6x25){if(_0x3ec6x1f[_0x7d28[97]][_0x7d28[93]]){delete _0x3ec6x1f[_0x7d28[97]][_0x7d28[93]]};return db[_0x7d28[65]][_0x7d28[95]]({where:{id:_0x3ec6x1f[_0x7d28[94]][_0x7d28[93]]}})[_0x7d28[41]](handleEntityNotFound(_0x3ec6x25,null))[_0x7d28[41]](saveUpdates(_0x3ec6x1f[_0x7d28[97]],null))[_0x7d28[41]](respondWithResult(_0x3ec6x25,null))[_0x7d28[32]](handleError(_0x3ec6x25,null))};exports[_0x7d28[58]]= function(_0x3ec6x1f,_0x3ec6x25){return db[_0x7d28[65]][_0x7d28[95]]({where:{id:_0x3ec6x1f[_0x7d28[94]][_0x7d28[93]]}})[_0x7d28[41]](handleEntityNotFound(_0x3ec6x25,null))[_0x7d28[41]](removeEntity(_0x3ec6x25,null))[_0x7d28[32]](handleError(_0x3ec6x25,null))};exports[_0x7d28[98]]= function(_0x3ec6x1f,_0x3ec6x28,_0x3ec6x3d){var _0x3ec6x2b={};var _0x3ec6x37={};var _0x3ec6x3e;var _0x3ec6x2c;return db[_0x7d28[65]][_0x7d28[100]]({where:{id:_0x3ec6x1f[_0x7d28[94]][_0x7d28[93]]}})[_0x7d28[41]](handleEntityNotFound(_0x3ec6x28,null))[_0x7d28[41]](function(_0x3ec6x28){if(_0x3ec6x28){_0x3ec6x3e= _0x3ec6x28;_0x3ec6x37[_0x7d28[63]]= _[_0x7d28[66]](db[_0x7d28[99]][_0x7d28[64]]);_0x3ec6x37[_0x7d28[68]]= _[_0x7d28[66]](_0x3ec6x1f[_0x7d28[68]]);_0x3ec6x37[_0x7d28[70]]= _[_0x7d28[71]](_0x3ec6x37[_0x7d28[63]],_0x3ec6x37[_0x7d28[68]]);_0x3ec6x2b[_0x7d28[72]]= _[_0x7d28[71]](_0x3ec6x37[_0x7d28[63]],qs[_0x7d28[73]](_0x3ec6x1f[_0x7d28[68]][_0x7d28[73]]));_0x3ec6x2b[_0x7d28[72]]= (_0x3ec6x2b[_0x7d28[72]][_0x7d28[74]])?_0x3ec6x2b[_0x7d28[72]]:_0x3ec6x37[_0x7d28[63]];_0x3ec6x2b[_0x7d28[77]]= qs[_0x7d28[78]](_0x3ec6x1f[_0x7d28[68]][_0x7d28[78]]);_0x3ec6x2b[_0x7d28[79]]= qs[_0x7d28[70]](_[_0x7d28[80]](_0x3ec6x1f[_0x7d28[68]],_0x3ec6x37[_0x7d28[70]]));if(_0x3ec6x1f[_0x7d28[68]][_0x7d28[84]]){_0x3ec6x2b[_0x7d28[79]]= _[_0x7d28[83]](_0x3ec6x2b[_0x7d28[79]],{$or:_[_0x7d28[86]](_0x3ec6x2b[_0x7d28[72]],function(_0x3ec6x3a){var _0x3ec6x38={};_0x3ec6x38[_0x3ec6x3a]= {$like:_0x7d28[85]+ _0x3ec6x1f[_0x7d28[68]][_0x7d28[84]]+ _0x7d28[85]};return _0x3ec6x38})})};_0x3ec6x2b= _[_0x7d28[83]]({},_0x3ec6x2b,_0x3ec6x1f[_0x7d28[87]]);return _0x3ec6x3e[_0x7d28[98]](_0x3ec6x2b)}})[_0x7d28[41]](function(_0x3ec6x3f){if(_0x3ec6x3f){_0x3ec6x2c= _0x3ec6x3f[_0x7d28[74]];if(!_0x3ec6x1f[_0x7d28[68]][_0x7d28[76]](_0x7d28[75])){_0x3ec6x2b[_0x7d28[49]]= qs[_0x7d28[49]](_0x3ec6x1f[_0x7d28[68]][_0x7d28[49]]);_0x3ec6x2b[_0x7d28[48]]= qs[_0x7d28[48]](_0x3ec6x1f[_0x7d28[68]][_0x7d28[48]])};return _0x3ec6x3e[_0x7d28[98]](_0x3ec6x2b)}})[_0x7d28[41]](function(_0x3ec6x3c){if(_0x3ec6x3c){return _0x3ec6x3c?{count:_0x3ec6x2c,rows:_0x3ec6x3c}:null}})[_0x7d28[41]](respondWithResult(_0x3ec6x28,null))[_0x7d28[32]](handleError(_0x3ec6x28,null))};exports[_0x7d28[101]]= function(_0x3ec6x1f,_0x3ec6x25,_0x3ec6x3d){if(_0x3ec6x1f[_0x7d28[97]][_0x7d28[93]]){delete _0x3ec6x1f[_0x7d28[97]][_0x7d28[93]]};return db[_0x7d28[65]][_0x7d28[100]]({where:{id:_0x3ec6x1f[_0x7d28[94]][_0x7d28[93]]}})[_0x7d28[41]](handleEntityNotFound(_0x3ec6x25,null))[_0x7d28[41]](function(_0x3ec6x28){if(_0x3ec6x28){_0x3ec6x1f[_0x7d28[97]][_0x7d28[102]]= _0x3ec6x28[_0x7d28[93]];_0x3ec6x1f[_0x7d28[97]][_0x7d28[103]]= integrations[_0x7d28[106]](_0x3ec6x1f[_0x7d28[97]][_0x7d28[104]],_0x3ec6x1f[_0x7d28[97]][_0x7d28[105]]);_0x3ec6x1f[_0x7d28[97]][_0x7d28[107]]= integrations[_0x7d28[108]](_0x3ec6x1f[_0x7d28[97]][_0x7d28[104]],_0x3ec6x1f[_0x7d28[97]][_0x7d28[105]]);return db[_0x7d28[99]][_0x7d28[96]](_0x3ec6x1f[_0x7d28[97]],{include:[{model:db[_0x7d28[109]],as:_0x7d28[103]},{model:db[_0x7d28[109]],as:_0x7d28[107]}]})};return null})[_0x7d28[41]](respondWithResult(_0x3ec6x25,null))[_0x7d28[32]](handleError(_0x3ec6x25,null))};exports[_0x7d28[110]]= function(_0x3ec6x1f,_0x3ec6x25,_0x3ec6x3d){var _0x3ec6x40=[{name:_0x7d28[111],label:_0x7d28[111],custom:false,options:[{name:1,value:1},{name:2,value:2},{name:3,value:3},{name:4,value:4},{name:5,value:5},{name:6,value:6},{name:7,value:7},{name:8,value:8},{name:9,value:9},{name:10,value:10}]}];return db[_0x7d28[65]][_0x7d28[100]]({where:{id:_0x3ec6x1f[_0x7d28[94]][_0x7d28[93]]},attributes:[_0x7d28[93],_0x7d28[118],_0x7d28[121],_0x7d28[128],_0x7d28[129],_0x7d28[135],_0x7d28[136],_0x7d28[137],_0x7d28[138]]})[_0x7d28[41]](handleEntityNotFound(_0x3ec6x25,null))[_0x7d28[41]](function(_0x3ec6x28){if(_0x3ec6x28){var _0x3ec6x2b={method:_0x7d28[116],uri:util[_0x7d28[119]](_0x7d28[117],_0x3ec6x28[_0x7d28[118]]),headers:{"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x7d28[120],Accept:_0x7d28[120]},json:true};if(_0x3ec6x28[_0x7d28[121]]=== _0x7d28[122]){_0x3ec6x2b[_0x7d28[124]][_0x7d28[123]]= util[_0x7d28[119]](_0x7d28[125], new Buffer(util[_0x7d28[119]](_0x7d28[127],_0x3ec6x28[_0x7d28[128]],_0x3ec6x28[_0x7d28[129]])).toString(_0x7d28[126]))};return rp(_0x3ec6x2b)[_0x7d28[41]](function(_0x3ec6x41){return _0x3ec6x40[_0x7d28[134]](_[_0x7d28[86]](_0x3ec6x41[_0x7d28[131]][_0x7d28[130]],function(_0x3ec6x42){return {id:_0x3ec6x42[_0x7d28[60]],name:_0x3ec6x42[_0x7d28[60]],type:_0x3ec6x42[_0x7d28[105]],active:_0x3ec6x42[_0x7d28[132]],label:_0x3ec6x42[_0x7d28[133]],custom:true}}))})}})[_0x7d28[41]](function(_0x3ec6x3c){return {count:_0x3ec6x3c[_0x7d28[74]],rows:_0x3ec6x3c}})[_0x7d28[41]](respondWithResult(_0x3ec6x25,null))[_0x7d28[32]](function(_0x3ec6x24){var _0x3ec6x27=_0x3ec6x1f[_0x7d28[68]][_0x7d28[112]]?500:(_0x3ec6x24[_0x7d28[113]]|| 500);logger[_0x7d28[31]](_0x7d28[114],_0x7d28[110],_0x3ec6x27,JSON[_0x7d28[36]](_0x3ec6x24));delete _0x3ec6x24[_0x7d28[60]];if(_0x3ec6x27=== 401){_0x3ec6x27= 400};_0x3ec6x25[_0x7d28[45]](_0x3ec6x27)[_0x7d28[61]](_0x3ec6x1f[_0x7d28[68]][_0x7d28[112]]?{message:_0x7d28[115],statusCode:_0x3ec6x24[_0x7d28[113]]}:_0x3ec6x24)})}
\ No newline at end of file
+var _0x5dba=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x79\x70\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x70\x72\x69\x6F\x72\x69\x74\x79","\x74\x65\x73\x74","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73","\x47\x45\x54","\x25\x73\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x66\x6F\x72\x6D\x61\x74","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x61\x75\x74\x68\x54\x79\x70\x65","\x62\x61\x73\x69\x63","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x68\x65\x61\x64\x65\x72\x73","\x42\x61\x73\x69\x63\x20\x25\x73","\x62\x61\x73\x65\x36\x34","\x25\x73\x3A\x25\x73","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x65\x6E\x74\x72\x69\x65\x73","\x5F\x65\x6D\x62\x65\x64\x64\x65\x64","\x61\x63\x74\x69\x76\x65","\x6C\x61\x62\x65\x6C","\x63\x6F\x6E\x63\x61\x74","\x63\x6F\x6E\x73\x75\x6D\x65\x72\x4B\x65\x79","\x63\x6F\x6E\x73\x75\x6D\x65\x72\x53\x65\x63\x72\x65\x74","\x74\x6F\x6B\x65\x6E","\x74\x6F\x6B\x65\x6E\x53\x65\x63\x72\x65\x74"];_0x5dba[0];var jsonpatch=require(_0x5dba[1]);var rp=require(_0x5dba[2]);var moment=require(_0x5dba[3]);var BPromise=require(_0x5dba[4]);var Mustache=require(_0x5dba[5]);var util=require(_0x5dba[6]);var path=require(_0x5dba[7]);var sox=require(_0x5dba[8]);var csv=require(_0x5dba[9]);var ejs=require(_0x5dba[10]);var fs=require(_0x5dba[11]);var _=require(_0x5dba[12]);var squel=require(_0x5dba[13]);var crypto=require(_0x5dba[14]);var jsforce=require(_0x5dba[15]);var deskjs=require(_0x5dba[16]);var toCsv=require(_0x5dba[9]);var querystring=require(_0x5dba[17]);var Papa=require(_0x5dba[18]);var qs=require(_0x5dba[19]);var logger=require(_0x5dba[21])(_0x5dba[20]);var utils=require(_0x5dba[22]);var config=require(_0x5dba[23]);var db=require(_0x5dba[25])[_0x5dba[24]];var integrations=require(_0x5dba[26]);var jayson=require(_0x5dba[27]);var client=jayson[_0x5dba[29]][_0x5dba[28]]({port:9002});function respondWithRpcPromise(_0xcc6bx1d,_0xcc6bx1e,_0xcc6bx1f,_0xcc6bx20){return  new BPromise(function(_0xcc6bx21,_0xcc6bx22){var _0xcc6bx23=(_0xcc6bx20|| client);return _0xcc6bx23[_0x5dba[42]](_0xcc6bx1d,_0xcc6bx1f)[_0x5dba[41]](function(_0xcc6bx25){logger[_0x5dba[34]](_0x5dba[30],_0xcc6bx1e,_0x5dba[33]);logger[_0x5dba[37]](_0x5dba[35],_0xcc6bx1e,_0x5dba[33],JSON[_0x5dba[36]](_0xcc6bx25));if(_0xcc6bx25[_0x5dba[31]]){if(_0xcc6bx25[_0x5dba[31]][_0x5dba[38]]=== 500){logger[_0x5dba[31]](_0x5dba[30],_0xcc6bx1e,_0xcc6bx25[_0x5dba[31]][_0x5dba[39]]);return _0xcc6bx22(_0xcc6bx25[_0x5dba[31]][_0x5dba[39]])};logger[_0x5dba[31]](_0x5dba[30],_0xcc6bx1e,_0xcc6bx25[_0x5dba[31]][_0x5dba[39]]);return _0xcc6bx21(_0xcc6bx25[_0x5dba[31]][_0x5dba[39]])}else {logger[_0x5dba[34]](_0x5dba[30],_0xcc6bx1e,_0x5dba[33]);_0xcc6bx21(_0xcc6bx25[_0x5dba[40]][_0x5dba[39]])}})[_0x5dba[32]](function(_0xcc6bx24){logger[_0x5dba[31]](_0x5dba[30],_0xcc6bx1e,_0xcc6bx24);_0xcc6bx22(_0xcc6bx24)})})}function respondWithStatusCode(_0xcc6bx25,_0xcc6bx27){_0xcc6bx27= _0xcc6bx27|| 204;return function(_0xcc6bx28){if(_0xcc6bx28){return _0xcc6bx25[_0x5dba[43]](_0xcc6bx27)};return _0xcc6bx25[_0x5dba[45]](_0xcc6bx27)[_0x5dba[44]]()}}function respondWithResult(_0xcc6bx25,_0xcc6bx27){_0xcc6bx27= _0xcc6bx27|| 200;return function(_0xcc6bx28){if(_0xcc6bx28){return _0xcc6bx25[_0x5dba[45]](_0xcc6bx27)[_0x5dba[46]](_0xcc6bx28)}}}function respondWithFilteredResult(_0xcc6bx25,_0xcc6bx2b){return function(_0xcc6bx28){if(_0xcc6bx28){var _0xcc6bx2c=_0xcc6bx28[_0x5dba[47]],_0xcc6bx2d=_0xcc6bx2b[_0x5dba[48]],_0xcc6bx2e=_0xcc6bx2b[_0x5dba[48]]+ _0xcc6bx2b[_0x5dba[49]],_0xcc6bx27;if(_0xcc6bx2e>= _0xcc6bx2c){_0xcc6bx2e= _0xcc6bx2c;_0xcc6bx27= 200}else {_0xcc6bx27= 206};_0xcc6bx25[_0x5dba[45]](_0xcc6bx27);return _0xcc6bx25[_0x5dba[53]](_0x5dba[50],_0xcc6bx2d+ _0x5dba[51]+ _0xcc6bx2e+ _0x5dba[52]+ _0xcc6bx2c)[_0x5dba[46]](_0xcc6bx28)};return null}}function patchUpdates(_0xcc6bx30){return function(_0xcc6bx28){try{jsonpatch[_0x5dba[54]](_0xcc6bx28,_0xcc6bx30,true)}catch(err){return BPromise[_0x5dba[55]](err)};return _0xcc6bx28[_0x5dba[56]]()}}function saveUpdates(_0xcc6bx32,_0xcc6bx27){return function(_0xcc6bx28){if(_0xcc6bx28){return _0xcc6bx28[_0x5dba[57]](_0xcc6bx32)[_0x5dba[41]](function(_0xcc6bx33){return _0xcc6bx33})};return null}}function removeEntity(_0xcc6bx25,_0xcc6bx27){return function(_0xcc6bx28){if(_0xcc6bx28){return _0xcc6bx28[_0x5dba[58]]()[_0x5dba[41]](function(){_0xcc6bx25[_0x5dba[45]](204)[_0x5dba[44]]()})}}}function handleEntityNotFound(_0xcc6bx25,_0xcc6bx27){return function(_0xcc6bx28){if(!_0xcc6bx28){_0xcc6bx25[_0x5dba[43]](404)};return _0xcc6bx28}}function handleError(_0xcc6bx25,_0xcc6bx27){_0xcc6bx27= _0xcc6bx27|| 500;return function(_0xcc6bx24){logger[_0x5dba[31]](_0xcc6bx24[_0x5dba[59]]);if(_0xcc6bx24[_0x5dba[60]]){delete _0xcc6bx24[_0x5dba[60]]};_0xcc6bx25[_0x5dba[45]](_0xcc6bx27)[_0x5dba[61]](_0xcc6bx24)}}exports[_0x5dba[62]]= function(_0xcc6bx1f,_0xcc6bx25){var _0xcc6bx2b={},_0xcc6bx37={},_0xcc6bx38={count:0,rows:[]};_0xcc6bx37[_0x5dba[63]]= _[_0x5dba[66]](db[_0x5dba[65]][_0x5dba[64]]);var _0xcc6bx39={dateStart:_0xcc6bx1f[_0x5dba[68]][_0x5dba[67]],dateEnd:_0xcc6bx1f[_0x5dba[68]][_0x5dba[69]]};delete _0xcc6bx1f[_0x5dba[68]][_0x5dba[67]];delete _0xcc6bx1f[_0x5dba[68]][_0x5dba[69]];_0xcc6bx37[_0x5dba[68]]= _[_0x5dba[66]](_0xcc6bx1f[_0x5dba[68]]);_0xcc6bx37[_0x5dba[70]]= _[_0x5dba[71]](_0xcc6bx37[_0x5dba[63]],_0xcc6bx37[_0x5dba[68]]);_0xcc6bx2b[_0x5dba[72]]= _[_0x5dba[71]](_0xcc6bx37[_0x5dba[63]],qs[_0x5dba[73]](_0xcc6bx1f[_0x5dba[68]][_0x5dba[73]]));_0xcc6bx2b[_0x5dba[72]]= (_0xcc6bx2b[_0x5dba[72]][_0x5dba[74]])?_0xcc6bx2b[_0x5dba[72]]:_0xcc6bx37[_0x5dba[63]];if(!_0xcc6bx1f[_0x5dba[68]][_0x5dba[76]](_0x5dba[75])){_0xcc6bx2b[_0x5dba[49]]= qs[_0x5dba[49]](_0xcc6bx1f[_0x5dba[68]][_0x5dba[49]]);_0xcc6bx2b[_0x5dba[48]]= qs[_0x5dba[48]](_0xcc6bx1f[_0x5dba[68]][_0x5dba[48]])};_0xcc6bx2b[_0x5dba[77]]= qs[_0x5dba[78]](_0xcc6bx1f[_0x5dba[68]][_0x5dba[78]]);_0xcc6bx2b[_0x5dba[79]]= qs[_0x5dba[70]](_[_0x5dba[80]](_0xcc6bx1f[_0x5dba[68]],_0xcc6bx37[_0x5dba[70]]));if(_0xcc6bx39[_0x5dba[67]]){if(_0xcc6bx39[_0x5dba[69]]){_0xcc6bx39[_0x5dba[69]]= moment(_0xcc6bx39[_0x5dba[69]])[_0x5dba[82]](1,_0x5dba[81])}else {_0xcc6bx39[_0x5dba[69]]= moment(_0xcc6bx39[_0x5dba[67]])[_0x5dba[82]](1,_0x5dba[81])};_[_0x5dba[83]](_0xcc6bx2b[_0x5dba[79]],{createdAt:{$gte:_0xcc6bx39[_0x5dba[67]],$lte:_0xcc6bx39[_0x5dba[69]]}})};if(_0xcc6bx1f[_0x5dba[68]][_0x5dba[84]]){_0xcc6bx2b[_0x5dba[79]]= _[_0x5dba[83]](_0xcc6bx2b[_0x5dba[79]],{$or:_[_0x5dba[86]](_0xcc6bx2b[_0x5dba[72]],function(_0xcc6bx3a){var _0xcc6bx38={};_0xcc6bx38[_0xcc6bx3a]= {$like:_0x5dba[85]+ _0xcc6bx1f[_0x5dba[68]][_0x5dba[84]]+ _0x5dba[85]};return _0xcc6bx38})})};_0xcc6bx2b= _[_0x5dba[83]]({},_0xcc6bx2b,_0xcc6bx1f[_0x5dba[87]]);var _0xcc6bx3b={where:_0xcc6bx2b[_0x5dba[79]]};return db[_0x5dba[65]][_0x5dba[47]](_0xcc6bx3b)[_0x5dba[41]](function(_0xcc6bx2c){_0xcc6bx38[_0x5dba[47]]= _0xcc6bx2c;if(_0xcc6bx1f[_0x5dba[68]][_0x5dba[89]]){_0xcc6bx2b[_0x5dba[90]]= [{all:true}]};return db[_0x5dba[65]][_0x5dba[91]](_0xcc6bx2b)})[_0x5dba[41]](function(_0xcc6bx3c){_0xcc6bx38[_0x5dba[88]]= _0xcc6bx3c;return _0xcc6bx38})[_0x5dba[41]](respondWithFilteredResult(_0xcc6bx25,_0xcc6bx2b))[_0x5dba[32]](handleError(_0xcc6bx25,null))};exports[_0x5dba[92]]= function(_0xcc6bx1f,_0xcc6bx25){var _0xcc6bx2b={raw:false,where:{id:_0xcc6bx1f[_0x5dba[94]][_0x5dba[93]]}},_0xcc6bx37={};_0xcc6bx37[_0x5dba[63]]= _[_0x5dba[66]](db[_0x5dba[65]][_0x5dba[64]]);_0xcc6bx37[_0x5dba[68]]= _[_0x5dba[66]](_0xcc6bx1f[_0x5dba[68]]);_0xcc6bx37[_0x5dba[70]]= _[_0x5dba[71]](_0xcc6bx37[_0x5dba[63]],_0xcc6bx37[_0x5dba[68]]);_0xcc6bx2b[_0x5dba[72]]= _[_0x5dba[71]](_0xcc6bx37[_0x5dba[63]],qs[_0x5dba[73]](_0xcc6bx1f[_0x5dba[68]][_0x5dba[73]]));_0xcc6bx2b[_0x5dba[72]]= (_0xcc6bx2b[_0x5dba[72]][_0x5dba[74]])?_0xcc6bx2b[_0x5dba[72]]:_0xcc6bx37[_0x5dba[63]];if(_0xcc6bx1f[_0x5dba[68]][_0x5dba[89]]){_0xcc6bx2b[_0x5dba[90]]= [{all:true}]};_0xcc6bx2b= _[_0x5dba[83]]({},_0xcc6bx2b,_0xcc6bx1f[_0x5dba[87]]);return db[_0x5dba[65]][_0x5dba[95]](_0xcc6bx2b)[_0x5dba[41]](handleEntityNotFound(_0xcc6bx25,null))[_0x5dba[41]](respondWithResult(_0xcc6bx25,null))[_0x5dba[32]](handleError(_0xcc6bx25,null))};exports[_0x5dba[96]]= function(_0xcc6bx1f,_0xcc6bx25){return db[_0x5dba[65]][_0x5dba[96]](_0xcc6bx1f[_0x5dba[97]],{})[_0x5dba[41]](respondWithResult(_0xcc6bx25,201))[_0x5dba[32]](handleError(_0xcc6bx25,null))};exports[_0x5dba[57]]= function(_0xcc6bx1f,_0xcc6bx25){if(_0xcc6bx1f[_0x5dba[97]][_0x5dba[93]]){delete _0xcc6bx1f[_0x5dba[97]][_0x5dba[93]]};return db[_0x5dba[65]][_0x5dba[95]]({where:{id:_0xcc6bx1f[_0x5dba[94]][_0x5dba[93]]}})[_0x5dba[41]](handleEntityNotFound(_0xcc6bx25,null))[_0x5dba[41]](saveUpdates(_0xcc6bx1f[_0x5dba[97]],null))[_0x5dba[41]](respondWithResult(_0xcc6bx25,null))[_0x5dba[32]](handleError(_0xcc6bx25,null))};exports[_0x5dba[58]]= function(_0xcc6bx1f,_0xcc6bx25){return db[_0x5dba[65]][_0x5dba[95]]({where:{id:_0xcc6bx1f[_0x5dba[94]][_0x5dba[93]]}})[_0x5dba[41]](handleEntityNotFound(_0xcc6bx25,null))[_0x5dba[41]](removeEntity(_0xcc6bx25,null))[_0x5dba[32]](handleError(_0xcc6bx25,null))};exports[_0x5dba[98]]= function(_0xcc6bx1f,_0xcc6bx28,_0xcc6bx3d){var _0xcc6bx2b={};var _0xcc6bx37={};var _0xcc6bx3e;var _0xcc6bx2c;return db[_0x5dba[65]][_0x5dba[100]]({where:{id:_0xcc6bx1f[_0x5dba[94]][_0x5dba[93]]}})[_0x5dba[41]](handleEntityNotFound(_0xcc6bx28,null))[_0x5dba[41]](function(_0xcc6bx28){if(_0xcc6bx28){_0xcc6bx3e= _0xcc6bx28;_0xcc6bx37[_0x5dba[63]]= _[_0x5dba[66]](db[_0x5dba[99]][_0x5dba[64]]);_0xcc6bx37[_0x5dba[68]]= _[_0x5dba[66]](_0xcc6bx1f[_0x5dba[68]]);_0xcc6bx37[_0x5dba[70]]= _[_0x5dba[71]](_0xcc6bx37[_0x5dba[63]],_0xcc6bx37[_0x5dba[68]]);_0xcc6bx2b[_0x5dba[72]]= _[_0x5dba[71]](_0xcc6bx37[_0x5dba[63]],qs[_0x5dba[73]](_0xcc6bx1f[_0x5dba[68]][_0x5dba[73]]));_0xcc6bx2b[_0x5dba[72]]= (_0xcc6bx2b[_0x5dba[72]][_0x5dba[74]])?_0xcc6bx2b[_0x5dba[72]]:_0xcc6bx37[_0x5dba[63]];_0xcc6bx2b[_0x5dba[77]]= qs[_0x5dba[78]](_0xcc6bx1f[_0x5dba[68]][_0x5dba[78]]);_0xcc6bx2b[_0x5dba[79]]= qs[_0x5dba[70]](_[_0x5dba[80]](_0xcc6bx1f[_0x5dba[68]],_0xcc6bx37[_0x5dba[70]]));if(_0xcc6bx1f[_0x5dba[68]][_0x5dba[84]]){_0xcc6bx2b[_0x5dba[79]]= _[_0x5dba[83]](_0xcc6bx2b[_0x5dba[79]],{$or:_[_0x5dba[86]](_0xcc6bx2b[_0x5dba[72]],function(_0xcc6bx3a){var _0xcc6bx38={};_0xcc6bx38[_0xcc6bx3a]= {$like:_0x5dba[85]+ _0xcc6bx1f[_0x5dba[68]][_0x5dba[84]]+ _0x5dba[85]};return _0xcc6bx38})})};_0xcc6bx2b= _[_0x5dba[83]]({},_0xcc6bx2b,_0xcc6bx1f[_0x5dba[87]]);return _0xcc6bx3e[_0x5dba[98]](_0xcc6bx2b)}})[_0x5dba[41]](function(_0xcc6bx3f){if(_0xcc6bx3f){_0xcc6bx2c= _0xcc6bx3f[_0x5dba[74]];if(!_0xcc6bx1f[_0x5dba[68]][_0x5dba[76]](_0x5dba[75])){_0xcc6bx2b[_0x5dba[49]]= qs[_0x5dba[49]](_0xcc6bx1f[_0x5dba[68]][_0x5dba[49]]);_0xcc6bx2b[_0x5dba[48]]= qs[_0x5dba[48]](_0xcc6bx1f[_0x5dba[68]][_0x5dba[48]])};return _0xcc6bx3e[_0x5dba[98]](_0xcc6bx2b)}})[_0x5dba[41]](function(_0xcc6bx3c){if(_0xcc6bx3c){return _0xcc6bx3c?{count:_0xcc6bx2c,rows:_0xcc6bx3c}:null}})[_0x5dba[41]](respondWithResult(_0xcc6bx28,null))[_0x5dba[32]](handleError(_0xcc6bx28,null))};exports[_0x5dba[101]]= function(_0xcc6bx1f,_0xcc6bx25,_0xcc6bx3d){if(_0xcc6bx1f[_0x5dba[97]][_0x5dba[93]]){delete _0xcc6bx1f[_0x5dba[97]][_0x5dba[93]]};return db[_0x5dba[65]][_0x5dba[100]]({where:{id:_0xcc6bx1f[_0x5dba[94]][_0x5dba[93]]}})[_0x5dba[41]](handleEntityNotFound(_0xcc6bx25,null))[_0x5dba[41]](function(_0xcc6bx28){if(_0xcc6bx28){_0xcc6bx1f[_0x5dba[97]][_0x5dba[102]]= _0xcc6bx28[_0x5dba[93]];_0xcc6bx1f[_0x5dba[97]][_0x5dba[103]]= integrations[_0x5dba[106]](_0xcc6bx1f[_0x5dba[97]][_0x5dba[104]],_0xcc6bx1f[_0x5dba[97]][_0x5dba[105]]);_0xcc6bx1f[_0x5dba[97]][_0x5dba[107]]= integrations[_0x5dba[108]](_0xcc6bx1f[_0x5dba[97]][_0x5dba[104]],_0xcc6bx1f[_0x5dba[97]][_0x5dba[105]]);return db[_0x5dba[99]][_0x5dba[96]](_0xcc6bx1f[_0x5dba[97]],{include:[{model:db[_0x5dba[109]],as:_0x5dba[103]},{model:db[_0x5dba[109]],as:_0x5dba[107]}]})};return null})[_0x5dba[41]](respondWithResult(_0xcc6bx25,null))[_0x5dba[32]](handleError(_0xcc6bx25,null))};exports[_0x5dba[110]]= function(_0xcc6bx1f,_0xcc6bx25,_0xcc6bx3d){var _0xcc6bx40=[{name:_0x5dba[111],label:_0x5dba[111],custom:false,options:[{name:1,value:1},{name:2,value:2},{name:3,value:3},{name:4,value:4},{name:5,value:5},{name:6,value:6},{name:7,value:7},{name:8,value:8},{name:9,value:9},{name:10,value:10}]}];return db[_0x5dba[65]][_0x5dba[100]]({where:{id:_0xcc6bx1f[_0x5dba[94]][_0x5dba[93]]},attributes:[_0x5dba[93],_0x5dba[118],_0x5dba[121],_0x5dba[128],_0x5dba[129],_0x5dba[135],_0x5dba[136],_0x5dba[137],_0x5dba[138]]})[_0x5dba[41]](handleEntityNotFound(_0xcc6bx25,null))[_0x5dba[41]](function(_0xcc6bx28){if(_0xcc6bx28){var _0xcc6bx2b={method:_0x5dba[116],uri:util[_0x5dba[119]](_0x5dba[117],_0xcc6bx28[_0x5dba[118]]),headers:{"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x5dba[120],Accept:_0x5dba[120]},json:true};if(_0xcc6bx28[_0x5dba[121]]=== _0x5dba[122]){_0xcc6bx2b[_0x5dba[124]][_0x5dba[123]]= util[_0x5dba[119]](_0x5dba[125], new Buffer(util[_0x5dba[119]](_0x5dba[127],_0xcc6bx28[_0x5dba[128]],_0xcc6bx28[_0x5dba[129]])).toString(_0x5dba[126]))};return rp(_0xcc6bx2b)[_0x5dba[41]](function(_0xcc6bx41){return _0xcc6bx40[_0x5dba[134]](_[_0x5dba[86]](_0xcc6bx41[_0x5dba[131]][_0x5dba[130]],function(_0xcc6bx42){return {id:_0xcc6bx42[_0x5dba[60]],name:_0xcc6bx42[_0x5dba[60]],type:_0xcc6bx42[_0x5dba[105]],active:_0xcc6bx42[_0x5dba[132]],label:_0xcc6bx42[_0x5dba[133]],custom:true}}))})}})[_0x5dba[41]](function(_0xcc6bx3c){return {count:_0xcc6bx3c[_0x5dba[74]],rows:_0xcc6bx3c}})[_0x5dba[41]](respondWithResult(_0xcc6bx25,null))[_0x5dba[32]](function(_0xcc6bx24){var _0xcc6bx27=_0xcc6bx1f[_0x5dba[68]][_0x5dba[112]]?500:(_0xcc6bx24[_0x5dba[113]]|| 500);logger[_0x5dba[31]](_0x5dba[114],_0x5dba[110],_0xcc6bx27,JSON[_0x5dba[36]](_0xcc6bx24));delete _0xcc6bx24[_0x5dba[60]];if(_0xcc6bx27=== 401){_0xcc6bx27= 400};_0xcc6bx25[_0x5dba[45]](_0xcc6bx27)[_0x5dba[61]](_0xcc6bx1f[_0x5dba[68]][_0x5dba[112]]?{message:_0x5dba[115],statusCode:_0xcc6bx24[_0x5dba[113]]}:_0xcc6bx24)})}
\ No newline at end of file
index e705375..aa95a94 100644 (file)
@@ -1 +1 @@
-var _0xfc97=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x74\x5F\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0xfc97[0];var _=require(_0xfc97[1]);var util=require(_0xfc97[2]);var logger=require(_0xfc97[4])(_0xfc97[3]);var moment=require(_0xfc97[5]);var BPromise=require(_0xfc97[6]);var rp=require(_0xfc97[7]);var attributes=require(_0xfc97[8]);var integrations=require(_0xfc97[9]);module[_0xfc97[10]]= function(_0xe66ax9,_0xe66axa){return _0xe66ax9[_0xfc97[13]](_0xfc97[11],attributes,{tableName:_0xfc97[12],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x5b8c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x74\x5F\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x5b8c[0];var _=require(_0x5b8c[1]);var util=require(_0x5b8c[2]);var logger=require(_0x5b8c[4])(_0x5b8c[3]);var moment=require(_0x5b8c[5]);var BPromise=require(_0x5b8c[6]);var rp=require(_0x5b8c[7]);var attributes=require(_0x5b8c[8]);var integrations=require(_0x5b8c[9]);module[_0x5b8c[10]]= function(_0xb4a2x9,_0xb4a2xa){return _0xb4a2x9[_0x5b8c[13]](_0x5b8c[11],attributes,{tableName:_0x5b8c[12],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 0b35420..7e1d232 100644 (file)
@@ -1 +1 @@
-var _0x261c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x53\x68\x6F\x77\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x66\x69\x6E\x64"];_0x261c[0];var _=require(_0x261c[1]);var util=require(_0x261c[2]);var moment=require(_0x261c[3]);var BPromise=require(_0x261c[4]);var rs=require(_0x261c[5]);var fs=require(_0x261c[6]);var db=require(_0x261c[8])[_0x261c[7]];var utils=require(_0x261c[9]);var logger=require(_0x261c[11])(_0x261c[10]);var config=require(_0x261c[12]);var jayson=require(_0x261c[13]);var client=jayson[_0x261c[15]][_0x261c[14]]({port:9002});function respondWithRpcPromise(_0x2037xe,_0x2037xf,_0x2037x10){return  new BPromise(function(_0x2037x11,_0x2037x12){return client[_0x261c[28]](_0x2037xe,_0x2037x10)[_0x261c[27]](function(_0x2037x14){logger[_0x261c[20]](_0x261c[16],_0x2037xf,_0x261c[19]);logger[_0x261c[23]](_0x261c[21],_0x2037xf,_0x261c[19],JSON[_0x261c[22]](_0x2037x14));if(_0x2037x14[_0x261c[17]]){if(_0x2037x14[_0x261c[17]][_0x261c[24]]=== 500){logger[_0x261c[17]](_0x261c[16],_0x2037xf,_0x2037x14[_0x261c[17]][_0x261c[25]]);return _0x2037x12(_0x2037x14[_0x261c[17]][_0x261c[25]])};logger[_0x261c[17]](_0x261c[16],_0x2037xf,_0x2037x14[_0x261c[17]][_0x261c[25]]);return _0x2037x11(_0x2037x14[_0x261c[17]][_0x261c[25]])}else {logger[_0x261c[20]](_0x261c[16],_0x2037xf,_0x261c[19]);_0x2037x11(_0x2037x14[_0x261c[26]][_0x261c[25]])}})[_0x261c[18]](function(_0x2037x13){logger[_0x261c[17]](_0x261c[16],_0x2037xf,_0x2037x13);_0x2037x12(_0x2037x13)})})}exports[_0x261c[29]]= function(_0x2037x10){var _0x2037x15=this;return  new Promise(function(_0x2037x11,_0x2037x12){return db[_0x261c[40]][_0x261c[39]]({raw:_0x2037x10[_0x261c[30]]?(_0x2037x10[_0x261c[30]][_0x261c[31]]=== undefined)?true:false:true,where:_0x2037x10[_0x261c[30]]?_0x2037x10[_0x261c[30]][_0x261c[32]]|| null:null,attributes:_0x2037x10[_0x261c[30]]?_0x2037x10[_0x261c[30]][_0x261c[33]]|| null:null,limit:_0x2037x10[_0x261c[30]]?_0x2037x10[_0x261c[30]][_0x261c[34]]|| null:null,include:_0x2037x10[_0x261c[30]]?(_0x2037x10[_0x261c[30]][_0x261c[35]]?_[_0x261c[38]](_0x2037x10[_0x261c[30]][_0x261c[35]],function(_0x2037x16){return {model:db[_0x2037x16[_0x261c[36]]],as:_0x2037x16[_0x261c[37]],attributes:_0x2037x16[_0x261c[33]],include:_0x2037x16[_0x261c[35]]?_[_0x261c[38]](_0x2037x16[_0x261c[35]],function(_0x2037x17){return {model:db[_0x2037x17[_0x261c[36]]],as:_0x2037x17[_0x261c[37]],attributes:_0x2037x17[_0x261c[33]],include:_0x2037x17[_0x261c[35]]?_[_0x261c[38]](_0x2037x17[_0x261c[35]],function(_0x2037x18){return {model:db[_0x2037x18[_0x261c[36]]],as:_0x2037x18[_0x261c[37]],attributes:_0x2037x18[_0x261c[33]]}}):[]}}):[]}}):[]):[]})[_0x261c[27]](function(_0x2037x14){logger[_0x261c[20]](_0x261c[29],_0x2037x10);logger[_0x261c[23]](_0x261c[29],_0x2037x10,JSON[_0x261c[22]](_0x2037x14));_0x2037x11(_0x2037x14)})[_0x261c[18]](function(_0x2037x13){logger[_0x261c[17]](_0x261c[29],_0x2037x13[_0x261c[25]],_0x2037x10);_0x2037x12(_0x2037x15[_0x261c[17]](500,_0x2037x13[_0x261c[25]]))})})};exports[_0x261c[41]]= function(_0x2037x10){var _0x2037x15=this;return  new Promise(function(_0x2037x11,_0x2037x12){return db[_0x261c[40]][_0x261c[42]]({raw:_0x2037x10[_0x261c[30]]?(_0x2037x10[_0x261c[30]][_0x261c[31]]=== undefined)?true:false:true,where:_0x2037x10[_0x261c[30]]?_0x2037x10[_0x261c[30]][_0x261c[32]]|| null:null,attributes:_0x2037x10[_0x261c[30]]?_0x2037x10[_0x261c[30]][_0x261c[33]]|| null:null,include:_0x2037x10[_0x261c[30]]?(_0x2037x10[_0x261c[30]][_0x261c[35]]?_[_0x261c[38]](_0x2037x10[_0x261c[30]][_0x261c[35]],function(_0x2037x16){return {model:db[_0x2037x16[_0x261c[36]]],as:_0x2037x16[_0x261c[37]],attributes:_0x2037x16[_0x261c[33]],include:_0x2037x16[_0x261c[35]]?_[_0x261c[38]](_0x2037x16[_0x261c[35]],function(_0x2037x17){return {model:db[_0x2037x17[_0x261c[36]]],as:_0x2037x17[_0x261c[37]],attributes:_0x2037x17[_0x261c[33]],include:_0x2037x17[_0x261c[35]]?_[_0x261c[38]](_0x2037x17[_0x261c[35]],function(_0x2037x18){return {model:db[_0x2037x18[_0x261c[36]]],as:_0x2037x18[_0x261c[37]],attributes:_0x2037x18[_0x261c[33]]}}):[]}}):[]}}):[]):[]})[_0x261c[27]](function(_0x2037x14){logger[_0x261c[20]](_0x261c[41],_0x2037x10);logger[_0x261c[23]](_0x261c[41],_0x2037x10,JSON[_0x261c[22]](_0x2037x14));_0x2037x11(_0x2037x14)})[_0x261c[18]](function(_0x2037x13){logger[_0x261c[17]](_0x261c[41],_0x2037x13[_0x261c[25]],_0x2037x10);_0x2037x12(_0x2037x15[_0x261c[17]](500,_0x2037x13[_0x261c[25]]))})})}
\ No newline at end of file
+var _0x8f93=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x53\x68\x6F\x77\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x66\x69\x6E\x64"];_0x8f93[0];var _=require(_0x8f93[1]);var util=require(_0x8f93[2]);var moment=require(_0x8f93[3]);var BPromise=require(_0x8f93[4]);var rs=require(_0x8f93[5]);var fs=require(_0x8f93[6]);var db=require(_0x8f93[8])[_0x8f93[7]];var utils=require(_0x8f93[9]);var logger=require(_0x8f93[11])(_0x8f93[10]);var config=require(_0x8f93[12]);var jayson=require(_0x8f93[13]);var client=jayson[_0x8f93[15]][_0x8f93[14]]({port:9002});function respondWithRpcPromise(_0x1137xe,_0x1137xf,_0x1137x10){return  new BPromise(function(_0x1137x11,_0x1137x12){return client[_0x8f93[28]](_0x1137xe,_0x1137x10)[_0x8f93[27]](function(_0x1137x14){logger[_0x8f93[20]](_0x8f93[16],_0x1137xf,_0x8f93[19]);logger[_0x8f93[23]](_0x8f93[21],_0x1137xf,_0x8f93[19],JSON[_0x8f93[22]](_0x1137x14));if(_0x1137x14[_0x8f93[17]]){if(_0x1137x14[_0x8f93[17]][_0x8f93[24]]=== 500){logger[_0x8f93[17]](_0x8f93[16],_0x1137xf,_0x1137x14[_0x8f93[17]][_0x8f93[25]]);return _0x1137x12(_0x1137x14[_0x8f93[17]][_0x8f93[25]])};logger[_0x8f93[17]](_0x8f93[16],_0x1137xf,_0x1137x14[_0x8f93[17]][_0x8f93[25]]);return _0x1137x11(_0x1137x14[_0x8f93[17]][_0x8f93[25]])}else {logger[_0x8f93[20]](_0x8f93[16],_0x1137xf,_0x8f93[19]);_0x1137x11(_0x1137x14[_0x8f93[26]][_0x8f93[25]])}})[_0x8f93[18]](function(_0x1137x13){logger[_0x8f93[17]](_0x8f93[16],_0x1137xf,_0x1137x13);_0x1137x12(_0x1137x13)})})}exports[_0x8f93[29]]= function(_0x1137x10){var _0x1137x15=this;return  new Promise(function(_0x1137x11,_0x1137x12){return db[_0x8f93[40]][_0x8f93[39]]({raw:_0x1137x10[_0x8f93[30]]?(_0x1137x10[_0x8f93[30]][_0x8f93[31]]=== undefined)?true:false:true,where:_0x1137x10[_0x8f93[30]]?_0x1137x10[_0x8f93[30]][_0x8f93[32]]|| null:null,attributes:_0x1137x10[_0x8f93[30]]?_0x1137x10[_0x8f93[30]][_0x8f93[33]]|| null:null,limit:_0x1137x10[_0x8f93[30]]?_0x1137x10[_0x8f93[30]][_0x8f93[34]]|| null:null,include:_0x1137x10[_0x8f93[30]]?(_0x1137x10[_0x8f93[30]][_0x8f93[35]]?_[_0x8f93[38]](_0x1137x10[_0x8f93[30]][_0x8f93[35]],function(_0x1137x16){return {model:db[_0x1137x16[_0x8f93[36]]],as:_0x1137x16[_0x8f93[37]],attributes:_0x1137x16[_0x8f93[33]],include:_0x1137x16[_0x8f93[35]]?_[_0x8f93[38]](_0x1137x16[_0x8f93[35]],function(_0x1137x17){return {model:db[_0x1137x17[_0x8f93[36]]],as:_0x1137x17[_0x8f93[37]],attributes:_0x1137x17[_0x8f93[33]],include:_0x1137x17[_0x8f93[35]]?_[_0x8f93[38]](_0x1137x17[_0x8f93[35]],function(_0x1137x18){return {model:db[_0x1137x18[_0x8f93[36]]],as:_0x1137x18[_0x8f93[37]],attributes:_0x1137x18[_0x8f93[33]]}}):[]}}):[]}}):[]):[]})[_0x8f93[27]](function(_0x1137x14){logger[_0x8f93[20]](_0x8f93[29],_0x1137x10);logger[_0x8f93[23]](_0x8f93[29],_0x1137x10,JSON[_0x8f93[22]](_0x1137x14));_0x1137x11(_0x1137x14)})[_0x8f93[18]](function(_0x1137x13){logger[_0x8f93[17]](_0x8f93[29],_0x1137x13[_0x8f93[25]],_0x1137x10);_0x1137x12(_0x1137x15[_0x8f93[17]](500,_0x1137x13[_0x8f93[25]]))})})};exports[_0x8f93[41]]= function(_0x1137x10){var _0x1137x15=this;return  new Promise(function(_0x1137x11,_0x1137x12){return db[_0x8f93[40]][_0x8f93[42]]({raw:_0x1137x10[_0x8f93[30]]?(_0x1137x10[_0x8f93[30]][_0x8f93[31]]=== undefined)?true:false:true,where:_0x1137x10[_0x8f93[30]]?_0x1137x10[_0x8f93[30]][_0x8f93[32]]|| null:null,attributes:_0x1137x10[_0x8f93[30]]?_0x1137x10[_0x8f93[30]][_0x8f93[33]]|| null:null,include:_0x1137x10[_0x8f93[30]]?(_0x1137x10[_0x8f93[30]][_0x8f93[35]]?_[_0x8f93[38]](_0x1137x10[_0x8f93[30]][_0x8f93[35]],function(_0x1137x16){return {model:db[_0x1137x16[_0x8f93[36]]],as:_0x1137x16[_0x8f93[37]],attributes:_0x1137x16[_0x8f93[33]],include:_0x1137x16[_0x8f93[35]]?_[_0x8f93[38]](_0x1137x16[_0x8f93[35]],function(_0x1137x17){return {model:db[_0x1137x17[_0x8f93[36]]],as:_0x1137x17[_0x8f93[37]],attributes:_0x1137x17[_0x8f93[33]],include:_0x1137x17[_0x8f93[35]]?_[_0x8f93[38]](_0x1137x17[_0x8f93[35]],function(_0x1137x18){return {model:db[_0x1137x18[_0x8f93[36]]],as:_0x1137x18[_0x8f93[37]],attributes:_0x1137x18[_0x8f93[33]]}}):[]}}):[]}}):[]):[]})[_0x8f93[27]](function(_0x1137x14){logger[_0x8f93[20]](_0x8f93[41],_0x1137x10);logger[_0x8f93[23]](_0x8f93[41],_0x1137x10,JSON[_0x8f93[22]](_0x1137x14));_0x1137x11(_0x1137x14)})[_0x8f93[18]](function(_0x1137x13){logger[_0x8f93[17]](_0x8f93[41],_0x1137x13[_0x8f93[25]],_0x1137x10);_0x1137x12(_0x1137x15[_0x8f93[17]](500,_0x1137x13[_0x8f93[25]]))})})}
\ No newline at end of file
index 95b331d..4d5c26f 100644 (file)
@@ -1 +1 @@
-var _0xa757=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x73\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x2F\x3A\x69\x64\x2F\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x74\x61\x67\x73","\x67\x65\x74\x54\x61\x67\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x73\x65\x74\x54\x61\x67\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xa757[0];var multer=require(_0xa757[1]);var util=require(_0xa757[2]);var path=require(_0xa757[3]);var express=require(_0xa757[4]);var router=express.Router();var auth=require(_0xa757[5]);var interaction=require(_0xa757[6]);var config=require(_0xa757[7]);var controller=require(_0xa757[8]);router[_0xa757[12]](_0xa757[9],auth[_0xa757[10]](),controller[_0xa757[11]]);router[_0xa757[12]](_0xa757[13],auth[_0xa757[10]](),controller[_0xa757[14]]);router[_0xa757[12]](_0xa757[15],auth[_0xa757[10]](),controller[_0xa757[16]]);router[_0xa757[12]](_0xa757[17],auth[_0xa757[10]](),controller[_0xa757[18]]);router[_0xa757[12]](_0xa757[19],auth[_0xa757[10]](),controller[_0xa757[20]]);router[_0xa757[12]](_0xa757[21],auth[_0xa757[10]](),controller[_0xa757[22]]);router[_0xa757[24]](_0xa757[9],auth[_0xa757[10]](),controller[_0xa757[23]]);router[_0xa757[24]](_0xa757[21],auth[_0xa757[10]](),controller[_0xa757[25]]);router[_0xa757[27]](_0xa757[13],auth[_0xa757[10]](),controller[_0xa757[26]]);router[_0xa757[29]](_0xa757[13],auth[_0xa757[10]](),controller[_0xa757[28]]);module[_0xa757[30]]= router
\ No newline at end of file
+var _0xd581=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x73\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x2F\x3A\x69\x64\x2F\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x74\x61\x67\x73","\x67\x65\x74\x54\x61\x67\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x73\x65\x74\x54\x61\x67\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xd581[0];var multer=require(_0xd581[1]);var util=require(_0xd581[2]);var path=require(_0xd581[3]);var express=require(_0xd581[4]);var router=express.Router();var auth=require(_0xd581[5]);var interaction=require(_0xd581[6]);var config=require(_0xd581[7]);var controller=require(_0xd581[8]);router[_0xd581[12]](_0xd581[9],auth[_0xd581[10]](),controller[_0xd581[11]]);router[_0xd581[12]](_0xd581[13],auth[_0xd581[10]](),controller[_0xd581[14]]);router[_0xd581[12]](_0xd581[15],auth[_0xd581[10]](),controller[_0xd581[16]]);router[_0xd581[12]](_0xd581[17],auth[_0xd581[10]](),controller[_0xd581[18]]);router[_0xd581[12]](_0xd581[19],auth[_0xd581[10]](),controller[_0xd581[20]]);router[_0xd581[12]](_0xd581[21],auth[_0xd581[10]](),controller[_0xd581[22]]);router[_0xd581[24]](_0xd581[9],auth[_0xd581[10]](),controller[_0xd581[23]]);router[_0xd581[24]](_0xd581[21],auth[_0xd581[10]](),controller[_0xd581[25]]);router[_0xd581[27]](_0xd581[13],auth[_0xd581[10]](),controller[_0xd581[26]]);router[_0xd581[29]](_0xd581[13],auth[_0xd581[10]](),controller[_0xd581[28]]);module[_0xd581[30]]= router
\ No newline at end of file
index 4adf5d0..74a36b7 100644 (file)
@@ -1 +1 @@
-var _0x5867=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0x5867[0];var Sequelize=require(_0x5867[1]);module[_0x5867[2]]= {name:{type:Sequelize[_0x5867[3]]},description:{type:Sequelize[_0x5867[3]]}}
\ No newline at end of file
+var _0x1365=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0x1365[0];var Sequelize=require(_0x1365[1]);module[_0x1365[2]]= {name:{type:Sequelize[_0x1365[3]]},description:{type:Sequelize[_0x1365[3]]}}
\ No newline at end of file
index f1127af..7a277bb 100644 (file)
@@ -1 +1 @@
-var _0xc2c7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x54\x61\x67\x73","\x54\x61\x67","\x73\x65\x74\x54\x61\x67\x73","\x69\x64\x73"];_0xc2c7[0];var jsonpatch=require(_0xc2c7[1]);var rp=require(_0xc2c7[2]);var moment=require(_0xc2c7[3]);var BPromise=require(_0xc2c7[4]);var Mustache=require(_0xc2c7[5]);var util=require(_0xc2c7[6]);var path=require(_0xc2c7[7]);var sox=require(_0xc2c7[8]);var csv=require(_0xc2c7[9]);var ejs=require(_0xc2c7[10]);var fs=require(_0xc2c7[11]);var _=require(_0xc2c7[12]);var squel=require(_0xc2c7[13]);var crypto=require(_0xc2c7[14]);var jsforce=require(_0xc2c7[15]);var deskjs=require(_0xc2c7[16]);var toCsv=require(_0xc2c7[9]);var querystring=require(_0xc2c7[17]);var Papa=require(_0xc2c7[18]);var qs=require(_0xc2c7[19]);var logger=require(_0xc2c7[21])(_0xc2c7[20]);var utils=require(_0xc2c7[22]);var config=require(_0xc2c7[23]);var db=require(_0xc2c7[25])[_0xc2c7[24]];var jayson=require(_0xc2c7[26]);var client=jayson[_0xc2c7[28]][_0xc2c7[27]]({port:9002});function respondWithRpcPromise(_0x5ca5x1c,_0x5ca5x1d,_0x5ca5x1e,_0x5ca5x1f){return  new BPromise(function(_0x5ca5x20,_0x5ca5x21){var _0x5ca5x22=(_0x5ca5x1f|| client);return _0x5ca5x22[_0xc2c7[41]](_0x5ca5x1c,_0x5ca5x1e)[_0xc2c7[40]](function(_0x5ca5x24){logger[_0xc2c7[33]](_0xc2c7[29],_0x5ca5x1d,_0xc2c7[32]);logger[_0xc2c7[36]](_0xc2c7[34],_0x5ca5x1d,_0xc2c7[32],JSON[_0xc2c7[35]](_0x5ca5x24));if(_0x5ca5x24[_0xc2c7[30]]){if(_0x5ca5x24[_0xc2c7[30]][_0xc2c7[37]]=== 500){logger[_0xc2c7[30]](_0xc2c7[29],_0x5ca5x1d,_0x5ca5x24[_0xc2c7[30]][_0xc2c7[38]]);return _0x5ca5x21(_0x5ca5x24[_0xc2c7[30]][_0xc2c7[38]])};logger[_0xc2c7[30]](_0xc2c7[29],_0x5ca5x1d,_0x5ca5x24[_0xc2c7[30]][_0xc2c7[38]]);return _0x5ca5x20(_0x5ca5x24[_0xc2c7[30]][_0xc2c7[38]])}else {logger[_0xc2c7[33]](_0xc2c7[29],_0x5ca5x1d,_0xc2c7[32]);_0x5ca5x20(_0x5ca5x24[_0xc2c7[39]][_0xc2c7[38]])}})[_0xc2c7[31]](function(_0x5ca5x23){logger[_0xc2c7[30]](_0xc2c7[29],_0x5ca5x1d,_0x5ca5x23);_0x5ca5x21(_0x5ca5x23)})})}function respondWithStatusCode(_0x5ca5x24,_0x5ca5x26){_0x5ca5x26= _0x5ca5x26|| 204;return function(_0x5ca5x27){if(_0x5ca5x27){return _0x5ca5x24[_0xc2c7[42]](_0x5ca5x26)};return _0x5ca5x24[_0xc2c7[44]](_0x5ca5x26)[_0xc2c7[43]]()}}function respondWithResult(_0x5ca5x24,_0x5ca5x26){_0x5ca5x26= _0x5ca5x26|| 200;return function(_0x5ca5x27){if(_0x5ca5x27){return _0x5ca5x24[_0xc2c7[44]](_0x5ca5x26)[_0xc2c7[45]](_0x5ca5x27)}}}function respondWithFilteredResult(_0x5ca5x24,_0x5ca5x2a){return function(_0x5ca5x27){if(_0x5ca5x27){var _0x5ca5x2b=_0x5ca5x27[_0xc2c7[46]],_0x5ca5x2c=_0x5ca5x2a[_0xc2c7[47]],_0x5ca5x2d=_0x5ca5x2a[_0xc2c7[47]]+ _0x5ca5x2a[_0xc2c7[48]],_0x5ca5x26;if(_0x5ca5x2d>= _0x5ca5x2b){_0x5ca5x2d= _0x5ca5x2b;_0x5ca5x26= 200}else {_0x5ca5x26= 206};_0x5ca5x24[_0xc2c7[44]](_0x5ca5x26);return _0x5ca5x24[_0xc2c7[52]](_0xc2c7[49],_0x5ca5x2c+ _0xc2c7[50]+ _0x5ca5x2d+ _0xc2c7[51]+ _0x5ca5x2b)[_0xc2c7[45]](_0x5ca5x27)};return null}}function patchUpdates(_0x5ca5x2f){return function(_0x5ca5x27){try{jsonpatch[_0xc2c7[53]](_0x5ca5x27,_0x5ca5x2f,true)}catch(err){return BPromise[_0xc2c7[54]](err)};return _0x5ca5x27[_0xc2c7[55]]()}}function saveUpdates(_0x5ca5x31,_0x5ca5x26){return function(_0x5ca5x27){if(_0x5ca5x27){return _0x5ca5x27[_0xc2c7[56]](_0x5ca5x31)[_0xc2c7[40]](function(_0x5ca5x32){return _0x5ca5x32})};return null}}function removeEntity(_0x5ca5x24,_0x5ca5x26){return function(_0x5ca5x27){if(_0x5ca5x27){return _0x5ca5x27[_0xc2c7[57]]()[_0xc2c7[40]](function(){_0x5ca5x24[_0xc2c7[44]](204)[_0xc2c7[43]]()})}}}function handleEntityNotFound(_0x5ca5x24,_0x5ca5x26){return function(_0x5ca5x27){if(!_0x5ca5x27){_0x5ca5x24[_0xc2c7[42]](404)};return _0x5ca5x27}}function handleError(_0x5ca5x24,_0x5ca5x26){_0x5ca5x26= _0x5ca5x26|| 500;return function(_0x5ca5x23){logger[_0xc2c7[30]](_0x5ca5x23[_0xc2c7[58]]);if(_0x5ca5x23[_0xc2c7[59]]){delete _0x5ca5x23[_0xc2c7[59]]};_0x5ca5x24[_0xc2c7[44]](_0x5ca5x26)[_0xc2c7[60]](_0x5ca5x23)}}exports[_0xc2c7[61]]= function(_0x5ca5x1e,_0x5ca5x24){var _0x5ca5x2a={},_0x5ca5x36={},_0x5ca5x37={count:0,rows:[]};_0x5ca5x36[_0xc2c7[62]]= _[_0xc2c7[65]](db[_0xc2c7[64]][_0xc2c7[63]]);var _0x5ca5x38={dateStart:_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[66]],dateEnd:_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[68]]};delete _0x5ca5x1e[_0xc2c7[67]][_0xc2c7[66]];delete _0x5ca5x1e[_0xc2c7[67]][_0xc2c7[68]];_0x5ca5x36[_0xc2c7[67]]= _[_0xc2c7[65]](_0x5ca5x1e[_0xc2c7[67]]);_0x5ca5x36[_0xc2c7[69]]= _[_0xc2c7[70]](_0x5ca5x36[_0xc2c7[62]],_0x5ca5x36[_0xc2c7[67]]);_0x5ca5x2a[_0xc2c7[71]]= _[_0xc2c7[70]](_0x5ca5x36[_0xc2c7[62]],qs[_0xc2c7[72]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[72]]));_0x5ca5x2a[_0xc2c7[71]]= (_0x5ca5x2a[_0xc2c7[71]][_0xc2c7[73]])?_0x5ca5x2a[_0xc2c7[71]]:_0x5ca5x36[_0xc2c7[62]];if(!_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[75]](_0xc2c7[74])){_0x5ca5x2a[_0xc2c7[48]]= qs[_0xc2c7[48]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[48]]);_0x5ca5x2a[_0xc2c7[47]]= qs[_0xc2c7[47]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[47]])};_0x5ca5x2a[_0xc2c7[76]]= qs[_0xc2c7[77]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[77]]);_0x5ca5x2a[_0xc2c7[78]]= qs[_0xc2c7[69]](_[_0xc2c7[79]](_0x5ca5x1e[_0xc2c7[67]],_0x5ca5x36[_0xc2c7[69]]));if(_0x5ca5x38[_0xc2c7[66]]){if(_0x5ca5x38[_0xc2c7[68]]){_0x5ca5x38[_0xc2c7[68]]= moment(_0x5ca5x38[_0xc2c7[68]])[_0xc2c7[81]](1,_0xc2c7[80])}else {_0x5ca5x38[_0xc2c7[68]]= moment(_0x5ca5x38[_0xc2c7[66]])[_0xc2c7[81]](1,_0xc2c7[80])};_[_0xc2c7[82]](_0x5ca5x2a[_0xc2c7[78]],{createdAt:{$gte:_0x5ca5x38[_0xc2c7[66]],$lte:_0x5ca5x38[_0xc2c7[68]]}})};if(_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[83]]){_0x5ca5x2a[_0xc2c7[78]]= _[_0xc2c7[82]](_0x5ca5x2a[_0xc2c7[78]],{$or:_[_0xc2c7[85]](_0x5ca5x2a[_0xc2c7[71]],function(_0x5ca5x39){var _0x5ca5x37={};_0x5ca5x37[_0x5ca5x39]= {$like:_0xc2c7[84]+ _0x5ca5x1e[_0xc2c7[67]][_0xc2c7[83]]+ _0xc2c7[84]};return _0x5ca5x37})})};_0x5ca5x2a= _[_0xc2c7[82]]({},_0x5ca5x2a,_0x5ca5x1e[_0xc2c7[86]]);var _0x5ca5x3a={where:_0x5ca5x2a[_0xc2c7[78]]};return db[_0xc2c7[64]][_0xc2c7[46]](_0x5ca5x3a)[_0xc2c7[40]](function(_0x5ca5x2b){_0x5ca5x37[_0xc2c7[46]]= _0x5ca5x2b;if(_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[88]]){_0x5ca5x2a[_0xc2c7[89]]= [{all:true}]};return db[_0xc2c7[64]][_0xc2c7[90]](_0x5ca5x2a)})[_0xc2c7[40]](function(_0x5ca5x3b){_0x5ca5x37[_0xc2c7[87]]= _0x5ca5x3b;return _0x5ca5x37})[_0xc2c7[40]](respondWithFilteredResult(_0x5ca5x24,_0x5ca5x2a))[_0xc2c7[31]](handleError(_0x5ca5x24,null))};exports[_0xc2c7[91]]= function(_0x5ca5x1e,_0x5ca5x24){var _0x5ca5x2a={raw:false,where:{id:_0x5ca5x1e[_0xc2c7[93]][_0xc2c7[92]]}},_0x5ca5x36={};_0x5ca5x36[_0xc2c7[62]]= _[_0xc2c7[65]](db[_0xc2c7[64]][_0xc2c7[63]]);_0x5ca5x36[_0xc2c7[67]]= _[_0xc2c7[65]](_0x5ca5x1e[_0xc2c7[67]]);_0x5ca5x36[_0xc2c7[69]]= _[_0xc2c7[70]](_0x5ca5x36[_0xc2c7[62]],_0x5ca5x36[_0xc2c7[67]]);_0x5ca5x2a[_0xc2c7[71]]= _[_0xc2c7[70]](_0x5ca5x36[_0xc2c7[62]],qs[_0xc2c7[72]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[72]]));_0x5ca5x2a[_0xc2c7[71]]= (_0x5ca5x2a[_0xc2c7[71]][_0xc2c7[73]])?_0x5ca5x2a[_0xc2c7[71]]:_0x5ca5x36[_0xc2c7[62]];if(_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[88]]){_0x5ca5x2a[_0xc2c7[89]]= [{all:true}]};_0x5ca5x2a= _[_0xc2c7[82]]({},_0x5ca5x2a,_0x5ca5x1e[_0xc2c7[86]]);return db[_0xc2c7[64]][_0xc2c7[94]](_0x5ca5x2a)[_0xc2c7[40]](handleEntityNotFound(_0x5ca5x24,null))[_0xc2c7[40]](respondWithResult(_0x5ca5x24,null))[_0xc2c7[31]](handleError(_0x5ca5x24,null))};exports[_0xc2c7[95]]= function(_0x5ca5x1e,_0x5ca5x24){return db[_0xc2c7[64]][_0xc2c7[95]](_0x5ca5x1e[_0xc2c7[96]],{})[_0xc2c7[40]](respondWithResult(_0x5ca5x24,201))[_0xc2c7[31]](handleError(_0x5ca5x24,null))};exports[_0xc2c7[56]]= function(_0x5ca5x1e,_0x5ca5x24){if(_0x5ca5x1e[_0xc2c7[96]][_0xc2c7[92]]){delete _0x5ca5x1e[_0xc2c7[96]][_0xc2c7[92]]};return db[_0xc2c7[64]][_0xc2c7[94]]({where:{id:_0x5ca5x1e[_0xc2c7[93]][_0xc2c7[92]]}})[_0xc2c7[40]](handleEntityNotFound(_0x5ca5x24,null))[_0xc2c7[40]](saveUpdates(_0x5ca5x1e[_0xc2c7[96]],null))[_0xc2c7[40]](respondWithResult(_0x5ca5x24,null))[_0xc2c7[31]](handleError(_0x5ca5x24,null))};exports[_0xc2c7[57]]= function(_0x5ca5x1e,_0x5ca5x24){return db[_0xc2c7[64]][_0xc2c7[94]]({where:{id:_0x5ca5x1e[_0xc2c7[93]][_0xc2c7[92]]}})[_0xc2c7[40]](handleEntityNotFound(_0x5ca5x24,null))[_0xc2c7[40]](removeEntity(_0x5ca5x24,null))[_0xc2c7[31]](handleError(_0x5ca5x24,null))};exports[_0xc2c7[97]]= function(_0x5ca5x1e,_0x5ca5x27,_0x5ca5x3c){var _0x5ca5x2a={};var _0x5ca5x36={};var _0x5ca5x3d;var _0x5ca5x2b;return db[_0xc2c7[64]][_0xc2c7[99]]({where:{id:_0x5ca5x1e[_0xc2c7[93]][_0xc2c7[92]]}})[_0xc2c7[40]](handleEntityNotFound(_0x5ca5x27,null))[_0xc2c7[40]](function(_0x5ca5x27){if(_0x5ca5x27){_0x5ca5x3d= _0x5ca5x27;_0x5ca5x36[_0xc2c7[62]]= _[_0xc2c7[65]](db[_0xc2c7[98]][_0xc2c7[63]]);_0x5ca5x36[_0xc2c7[67]]= _[_0xc2c7[65]](_0x5ca5x1e[_0xc2c7[67]]);_0x5ca5x36[_0xc2c7[69]]= _[_0xc2c7[70]](_0x5ca5x36[_0xc2c7[62]],_0x5ca5x36[_0xc2c7[67]]);_0x5ca5x2a[_0xc2c7[71]]= _[_0xc2c7[70]](_0x5ca5x36[_0xc2c7[62]],qs[_0xc2c7[72]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[72]]));_0x5ca5x2a[_0xc2c7[71]]= (_0x5ca5x2a[_0xc2c7[71]][_0xc2c7[73]])?_0x5ca5x2a[_0xc2c7[71]]:_0x5ca5x36[_0xc2c7[62]];_0x5ca5x2a[_0xc2c7[76]]= qs[_0xc2c7[77]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[77]]);_0x5ca5x2a[_0xc2c7[78]]= qs[_0xc2c7[69]](_[_0xc2c7[79]](_0x5ca5x1e[_0xc2c7[67]],_0x5ca5x36[_0xc2c7[69]]));if(_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[83]]){_0x5ca5x2a[_0xc2c7[78]]= _[_0xc2c7[82]](_0x5ca5x2a[_0xc2c7[78]],{$or:_[_0xc2c7[85]](_0x5ca5x2a[_0xc2c7[71]],function(_0x5ca5x39){var _0x5ca5x37={};_0x5ca5x37[_0x5ca5x39]= {$like:_0xc2c7[84]+ _0x5ca5x1e[_0xc2c7[67]][_0xc2c7[83]]+ _0xc2c7[84]};return _0x5ca5x37})})};_0x5ca5x2a= _[_0xc2c7[82]]({},_0x5ca5x2a,_0x5ca5x1e[_0xc2c7[86]]);return _0x5ca5x3d[_0xc2c7[97]](_0x5ca5x2a)}})[_0xc2c7[40]](function(_0x5ca5x3e){if(_0x5ca5x3e){_0x5ca5x2b= _0x5ca5x3e[_0xc2c7[73]];if(!_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[75]](_0xc2c7[74])){_0x5ca5x2a[_0xc2c7[48]]= qs[_0xc2c7[48]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[48]]);_0x5ca5x2a[_0xc2c7[47]]= qs[_0xc2c7[47]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[47]])};return _0x5ca5x3d[_0xc2c7[97]](_0x5ca5x2a)}})[_0xc2c7[40]](function(_0x5ca5x3b){if(_0x5ca5x3b){return _0x5ca5x3b?{count:_0x5ca5x2b,rows:_0x5ca5x3b}:null}})[_0xc2c7[40]](respondWithResult(_0x5ca5x27,null))[_0xc2c7[31]](handleError(_0x5ca5x27,null))};exports[_0xc2c7[100]]= function(_0x5ca5x1e,_0x5ca5x27,_0x5ca5x3c){var _0x5ca5x2a={};var _0x5ca5x36={};var _0x5ca5x3d;var _0x5ca5x2b;return db[_0xc2c7[64]][_0xc2c7[99]]({where:{id:_0x5ca5x1e[_0xc2c7[93]][_0xc2c7[92]]}})[_0xc2c7[40]](handleEntityNotFound(_0x5ca5x27,null))[_0xc2c7[40]](function(_0x5ca5x27){if(_0x5ca5x27){_0x5ca5x3d= _0x5ca5x27;_0x5ca5x36[_0xc2c7[62]]= _[_0xc2c7[65]](db[_0xc2c7[98]][_0xc2c7[63]]);_0x5ca5x36[_0xc2c7[67]]= _[_0xc2c7[65]](_0x5ca5x1e[_0xc2c7[67]]);_0x5ca5x36[_0xc2c7[69]]= _[_0xc2c7[70]](_0x5ca5x36[_0xc2c7[62]],_0x5ca5x36[_0xc2c7[67]]);_0x5ca5x2a[_0xc2c7[71]]= _[_0xc2c7[70]](_0x5ca5x36[_0xc2c7[62]],qs[_0xc2c7[72]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[72]]));_0x5ca5x2a[_0xc2c7[71]]= (_0x5ca5x2a[_0xc2c7[71]][_0xc2c7[73]])?_0x5ca5x2a[_0xc2c7[71]]:_0x5ca5x36[_0xc2c7[62]];_0x5ca5x2a[_0xc2c7[76]]= qs[_0xc2c7[77]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[77]]);_0x5ca5x2a[_0xc2c7[78]]= qs[_0xc2c7[69]](_[_0xc2c7[79]](_0x5ca5x1e[_0xc2c7[67]],_0x5ca5x36[_0xc2c7[69]]));if(_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[83]]){_0x5ca5x2a[_0xc2c7[78]]= _[_0xc2c7[82]](_0x5ca5x2a[_0xc2c7[78]],{$or:_[_0xc2c7[85]](_0x5ca5x2a[_0xc2c7[71]],function(_0x5ca5x39){var _0x5ca5x37={};_0x5ca5x37[_0x5ca5x39]= {$like:_0xc2c7[84]+ _0x5ca5x1e[_0xc2c7[67]][_0xc2c7[83]]+ _0xc2c7[84]};return _0x5ca5x37})})};_0x5ca5x2a= _[_0xc2c7[82]]({},_0x5ca5x2a,_0x5ca5x1e[_0xc2c7[86]]);return _0x5ca5x3d[_0xc2c7[100]](_0x5ca5x2a)}})[_0xc2c7[40]](function(_0x5ca5x3e){if(_0x5ca5x3e){_0x5ca5x2b= _0x5ca5x3e[_0xc2c7[73]];if(!_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[75]](_0xc2c7[74])){_0x5ca5x2a[_0xc2c7[48]]= qs[_0xc2c7[48]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[48]]);_0x5ca5x2a[_0xc2c7[47]]= qs[_0xc2c7[47]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[47]])};return _0x5ca5x3d[_0xc2c7[100]](_0x5ca5x2a)}})[_0xc2c7[40]](function(_0x5ca5x3b){if(_0x5ca5x3b){return _0x5ca5x3b?{count:_0x5ca5x2b,rows:_0x5ca5x3b}:null}})[_0xc2c7[40]](respondWithResult(_0x5ca5x27,null))[_0xc2c7[31]](handleError(_0x5ca5x27,null))};exports[_0xc2c7[101]]= function(_0x5ca5x1e,_0x5ca5x27,_0x5ca5x3c){var _0x5ca5x2a={};var _0x5ca5x36={};var _0x5ca5x3d;var _0x5ca5x2b;return db[_0xc2c7[64]][_0xc2c7[99]]({where:{id:_0x5ca5x1e[_0xc2c7[93]][_0xc2c7[92]]}})[_0xc2c7[40]](handleEntityNotFound(_0x5ca5x27,null))[_0xc2c7[40]](function(_0x5ca5x27){if(_0x5ca5x27){_0x5ca5x3d= _0x5ca5x27;_0x5ca5x36[_0xc2c7[62]]= _[_0xc2c7[65]](db[_0xc2c7[98]][_0xc2c7[63]]);_0x5ca5x36[_0xc2c7[67]]= _[_0xc2c7[65]](_0x5ca5x1e[_0xc2c7[67]]);_0x5ca5x36[_0xc2c7[69]]= _[_0xc2c7[70]](_0x5ca5x36[_0xc2c7[62]],_0x5ca5x36[_0xc2c7[67]]);_0x5ca5x2a[_0xc2c7[71]]= _[_0xc2c7[70]](_0x5ca5x36[_0xc2c7[62]],qs[_0xc2c7[72]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[72]]));_0x5ca5x2a[_0xc2c7[71]]= (_0x5ca5x2a[_0xc2c7[71]][_0xc2c7[73]])?_0x5ca5x2a[_0xc2c7[71]]:_0x5ca5x36[_0xc2c7[62]];_0x5ca5x2a[_0xc2c7[76]]= qs[_0xc2c7[77]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[77]]);_0x5ca5x2a[_0xc2c7[78]]= qs[_0xc2c7[69]](_[_0xc2c7[79]](_0x5ca5x1e[_0xc2c7[67]],_0x5ca5x36[_0xc2c7[69]]));if(_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[83]]){_0x5ca5x2a[_0xc2c7[78]]= _[_0xc2c7[82]](_0x5ca5x2a[_0xc2c7[78]],{$or:_[_0xc2c7[85]](_0x5ca5x2a[_0xc2c7[71]],function(_0x5ca5x39){var _0x5ca5x37={};_0x5ca5x37[_0x5ca5x39]= {$like:_0xc2c7[84]+ _0x5ca5x1e[_0xc2c7[67]][_0xc2c7[83]]+ _0xc2c7[84]};return _0x5ca5x37})})};_0x5ca5x2a= _[_0xc2c7[82]]({},_0x5ca5x2a,_0x5ca5x1e[_0xc2c7[86]]);return _0x5ca5x3d[_0xc2c7[101]](_0x5ca5x2a)}})[_0xc2c7[40]](function(_0x5ca5x3e){if(_0x5ca5x3e){_0x5ca5x2b= _0x5ca5x3e[_0xc2c7[73]];if(!_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[75]](_0xc2c7[74])){_0x5ca5x2a[_0xc2c7[48]]= qs[_0xc2c7[48]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[48]]);_0x5ca5x2a[_0xc2c7[47]]= qs[_0xc2c7[47]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[47]])};return _0x5ca5x3d[_0xc2c7[101]](_0x5ca5x2a)}})[_0xc2c7[40]](function(_0x5ca5x3b){if(_0x5ca5x3b){return _0x5ca5x3b?{count:_0x5ca5x2b,rows:_0x5ca5x3b}:null}})[_0xc2c7[40]](respondWithResult(_0x5ca5x27,null))[_0xc2c7[31]](handleError(_0x5ca5x27,null))};exports[_0xc2c7[102]]= function(_0x5ca5x1e,_0x5ca5x27,_0x5ca5x3c){var _0x5ca5x2a={};var _0x5ca5x36={};var _0x5ca5x3d;var _0x5ca5x2b;return db[_0xc2c7[64]][_0xc2c7[99]]({where:{id:_0x5ca5x1e[_0xc2c7[93]][_0xc2c7[92]]}})[_0xc2c7[40]](handleEntityNotFound(_0x5ca5x27,null))[_0xc2c7[40]](function(_0x5ca5x27){if(_0x5ca5x27){_0x5ca5x3d= _0x5ca5x27;_0x5ca5x36[_0xc2c7[62]]= _[_0xc2c7[65]](db[_0xc2c7[103]][_0xc2c7[63]]);_0x5ca5x36[_0xc2c7[67]]= _[_0xc2c7[65]](_0x5ca5x1e[_0xc2c7[67]]);_0x5ca5x36[_0xc2c7[69]]= _[_0xc2c7[70]](_0x5ca5x36[_0xc2c7[62]],_0x5ca5x36[_0xc2c7[67]]);_0x5ca5x2a[_0xc2c7[71]]= _[_0xc2c7[70]](_0x5ca5x36[_0xc2c7[62]],qs[_0xc2c7[72]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[72]]));_0x5ca5x2a[_0xc2c7[71]]= (_0x5ca5x2a[_0xc2c7[71]][_0xc2c7[73]])?_0x5ca5x2a[_0xc2c7[71]]:_0x5ca5x36[_0xc2c7[62]];_0x5ca5x2a[_0xc2c7[76]]= qs[_0xc2c7[77]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[77]]);_0x5ca5x2a[_0xc2c7[78]]= qs[_0xc2c7[69]](_[_0xc2c7[79]](_0x5ca5x1e[_0xc2c7[67]],_0x5ca5x36[_0xc2c7[69]]));if(_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[83]]){_0x5ca5x2a[_0xc2c7[78]]= _[_0xc2c7[82]](_0x5ca5x2a[_0xc2c7[78]],{$or:_[_0xc2c7[85]](_0x5ca5x2a[_0xc2c7[71]],function(_0x5ca5x39){var _0x5ca5x37={};_0x5ca5x37[_0x5ca5x39]= {$like:_0xc2c7[84]+ _0x5ca5x1e[_0xc2c7[67]][_0xc2c7[83]]+ _0xc2c7[84]};return _0x5ca5x37})})};_0x5ca5x2a= _[_0xc2c7[82]]({},_0x5ca5x2a,_0x5ca5x1e[_0xc2c7[86]]);return _0x5ca5x3d[_0xc2c7[102]](_0x5ca5x2a)}})[_0xc2c7[40]](function(_0x5ca5x3e){if(_0x5ca5x3e){_0x5ca5x2b= _0x5ca5x3e[_0xc2c7[73]];if(!_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[75]](_0xc2c7[74])){_0x5ca5x2a[_0xc2c7[48]]= qs[_0xc2c7[48]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[48]]);_0x5ca5x2a[_0xc2c7[47]]= qs[_0xc2c7[47]](_0x5ca5x1e[_0xc2c7[67]][_0xc2c7[47]])};return _0x5ca5x3d[_0xc2c7[102]](_0x5ca5x2a)}})[_0xc2c7[40]](function(_0x5ca5x3b){if(_0x5ca5x3b){return _0x5ca5x3b?{count:_0x5ca5x2b,rows:_0x5ca5x3b}:null}})[_0xc2c7[40]](respondWithResult(_0x5ca5x27,null))[_0xc2c7[31]](handleError(_0x5ca5x27,null))};exports[_0xc2c7[104]]= function(_0x5ca5x1e,_0x5ca5x24,_0x5ca5x3c){if(_0x5ca5x1e[_0xc2c7[96]][_0xc2c7[92]]){delete _0x5ca5x1e[_0xc2c7[96]][_0xc2c7[92]]};return db[_0xc2c7[64]][_0xc2c7[99]]({where:{id:_0x5ca5x1e[_0xc2c7[93]][_0xc2c7[92]]}})[_0xc2c7[40]](handleEntityNotFound(_0x5ca5x24,null))[_0xc2c7[40]](function(_0x5ca5x27){if(_0x5ca5x27){return _0x5ca5x27[_0xc2c7[104]](_0x5ca5x1e[_0xc2c7[96]][_0xc2c7[105]])};return null})[_0xc2c7[40]](respondWithResult(_0x5ca5x24,null))[_0xc2c7[31]](handleError(_0x5ca5x24,null))}
\ No newline at end of file
+var _0xf826=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x54\x61\x67\x73","\x54\x61\x67","\x73\x65\x74\x54\x61\x67\x73","\x69\x64\x73"];_0xf826[0];var jsonpatch=require(_0xf826[1]);var rp=require(_0xf826[2]);var moment=require(_0xf826[3]);var BPromise=require(_0xf826[4]);var Mustache=require(_0xf826[5]);var util=require(_0xf826[6]);var path=require(_0xf826[7]);var sox=require(_0xf826[8]);var csv=require(_0xf826[9]);var ejs=require(_0xf826[10]);var fs=require(_0xf826[11]);var _=require(_0xf826[12]);var squel=require(_0xf826[13]);var crypto=require(_0xf826[14]);var jsforce=require(_0xf826[15]);var deskjs=require(_0xf826[16]);var toCsv=require(_0xf826[9]);var querystring=require(_0xf826[17]);var Papa=require(_0xf826[18]);var qs=require(_0xf826[19]);var logger=require(_0xf826[21])(_0xf826[20]);var utils=require(_0xf826[22]);var config=require(_0xf826[23]);var db=require(_0xf826[25])[_0xf826[24]];var jayson=require(_0xf826[26]);var client=jayson[_0xf826[28]][_0xf826[27]]({port:9002});function respondWithRpcPromise(_0xb3e4x1c,_0xb3e4x1d,_0xb3e4x1e,_0xb3e4x1f){return  new BPromise(function(_0xb3e4x20,_0xb3e4x21){var _0xb3e4x22=(_0xb3e4x1f|| client);return _0xb3e4x22[_0xf826[41]](_0xb3e4x1c,_0xb3e4x1e)[_0xf826[40]](function(_0xb3e4x24){logger[_0xf826[33]](_0xf826[29],_0xb3e4x1d,_0xf826[32]);logger[_0xf826[36]](_0xf826[34],_0xb3e4x1d,_0xf826[32],JSON[_0xf826[35]](_0xb3e4x24));if(_0xb3e4x24[_0xf826[30]]){if(_0xb3e4x24[_0xf826[30]][_0xf826[37]]=== 500){logger[_0xf826[30]](_0xf826[29],_0xb3e4x1d,_0xb3e4x24[_0xf826[30]][_0xf826[38]]);return _0xb3e4x21(_0xb3e4x24[_0xf826[30]][_0xf826[38]])};logger[_0xf826[30]](_0xf826[29],_0xb3e4x1d,_0xb3e4x24[_0xf826[30]][_0xf826[38]]);return _0xb3e4x20(_0xb3e4x24[_0xf826[30]][_0xf826[38]])}else {logger[_0xf826[33]](_0xf826[29],_0xb3e4x1d,_0xf826[32]);_0xb3e4x20(_0xb3e4x24[_0xf826[39]][_0xf826[38]])}})[_0xf826[31]](function(_0xb3e4x23){logger[_0xf826[30]](_0xf826[29],_0xb3e4x1d,_0xb3e4x23);_0xb3e4x21(_0xb3e4x23)})})}function respondWithStatusCode(_0xb3e4x24,_0xb3e4x26){_0xb3e4x26= _0xb3e4x26|| 204;return function(_0xb3e4x27){if(_0xb3e4x27){return _0xb3e4x24[_0xf826[42]](_0xb3e4x26)};return _0xb3e4x24[_0xf826[44]](_0xb3e4x26)[_0xf826[43]]()}}function respondWithResult(_0xb3e4x24,_0xb3e4x26){_0xb3e4x26= _0xb3e4x26|| 200;return function(_0xb3e4x27){if(_0xb3e4x27){return _0xb3e4x24[_0xf826[44]](_0xb3e4x26)[_0xf826[45]](_0xb3e4x27)}}}function respondWithFilteredResult(_0xb3e4x24,_0xb3e4x2a){return function(_0xb3e4x27){if(_0xb3e4x27){var _0xb3e4x2b=_0xb3e4x27[_0xf826[46]],_0xb3e4x2c=_0xb3e4x2a[_0xf826[47]],_0xb3e4x2d=_0xb3e4x2a[_0xf826[47]]+ _0xb3e4x2a[_0xf826[48]],_0xb3e4x26;if(_0xb3e4x2d>= _0xb3e4x2b){_0xb3e4x2d= _0xb3e4x2b;_0xb3e4x26= 200}else {_0xb3e4x26= 206};_0xb3e4x24[_0xf826[44]](_0xb3e4x26);return _0xb3e4x24[_0xf826[52]](_0xf826[49],_0xb3e4x2c+ _0xf826[50]+ _0xb3e4x2d+ _0xf826[51]+ _0xb3e4x2b)[_0xf826[45]](_0xb3e4x27)};return null}}function patchUpdates(_0xb3e4x2f){return function(_0xb3e4x27){try{jsonpatch[_0xf826[53]](_0xb3e4x27,_0xb3e4x2f,true)}catch(err){return BPromise[_0xf826[54]](err)};return _0xb3e4x27[_0xf826[55]]()}}function saveUpdates(_0xb3e4x31,_0xb3e4x26){return function(_0xb3e4x27){if(_0xb3e4x27){return _0xb3e4x27[_0xf826[56]](_0xb3e4x31)[_0xf826[40]](function(_0xb3e4x32){return _0xb3e4x32})};return null}}function removeEntity(_0xb3e4x24,_0xb3e4x26){return function(_0xb3e4x27){if(_0xb3e4x27){return _0xb3e4x27[_0xf826[57]]()[_0xf826[40]](function(){_0xb3e4x24[_0xf826[44]](204)[_0xf826[43]]()})}}}function handleEntityNotFound(_0xb3e4x24,_0xb3e4x26){return function(_0xb3e4x27){if(!_0xb3e4x27){_0xb3e4x24[_0xf826[42]](404)};return _0xb3e4x27}}function handleError(_0xb3e4x24,_0xb3e4x26){_0xb3e4x26= _0xb3e4x26|| 500;return function(_0xb3e4x23){logger[_0xf826[30]](_0xb3e4x23[_0xf826[58]]);if(_0xb3e4x23[_0xf826[59]]){delete _0xb3e4x23[_0xf826[59]]};_0xb3e4x24[_0xf826[44]](_0xb3e4x26)[_0xf826[60]](_0xb3e4x23)}}exports[_0xf826[61]]= function(_0xb3e4x1e,_0xb3e4x24){var _0xb3e4x2a={},_0xb3e4x36={},_0xb3e4x37={count:0,rows:[]};_0xb3e4x36[_0xf826[62]]= _[_0xf826[65]](db[_0xf826[64]][_0xf826[63]]);var _0xb3e4x38={dateStart:_0xb3e4x1e[_0xf826[67]][_0xf826[66]],dateEnd:_0xb3e4x1e[_0xf826[67]][_0xf826[68]]};delete _0xb3e4x1e[_0xf826[67]][_0xf826[66]];delete _0xb3e4x1e[_0xf826[67]][_0xf826[68]];_0xb3e4x36[_0xf826[67]]= _[_0xf826[65]](_0xb3e4x1e[_0xf826[67]]);_0xb3e4x36[_0xf826[69]]= _[_0xf826[70]](_0xb3e4x36[_0xf826[62]],_0xb3e4x36[_0xf826[67]]);_0xb3e4x2a[_0xf826[71]]= _[_0xf826[70]](_0xb3e4x36[_0xf826[62]],qs[_0xf826[72]](_0xb3e4x1e[_0xf826[67]][_0xf826[72]]));_0xb3e4x2a[_0xf826[71]]= (_0xb3e4x2a[_0xf826[71]][_0xf826[73]])?_0xb3e4x2a[_0xf826[71]]:_0xb3e4x36[_0xf826[62]];if(!_0xb3e4x1e[_0xf826[67]][_0xf826[75]](_0xf826[74])){_0xb3e4x2a[_0xf826[48]]= qs[_0xf826[48]](_0xb3e4x1e[_0xf826[67]][_0xf826[48]]);_0xb3e4x2a[_0xf826[47]]= qs[_0xf826[47]](_0xb3e4x1e[_0xf826[67]][_0xf826[47]])};_0xb3e4x2a[_0xf826[76]]= qs[_0xf826[77]](_0xb3e4x1e[_0xf826[67]][_0xf826[77]]);_0xb3e4x2a[_0xf826[78]]= qs[_0xf826[69]](_[_0xf826[79]](_0xb3e4x1e[_0xf826[67]],_0xb3e4x36[_0xf826[69]]));if(_0xb3e4x38[_0xf826[66]]){if(_0xb3e4x38[_0xf826[68]]){_0xb3e4x38[_0xf826[68]]= moment(_0xb3e4x38[_0xf826[68]])[_0xf826[81]](1,_0xf826[80])}else {_0xb3e4x38[_0xf826[68]]= moment(_0xb3e4x38[_0xf826[66]])[_0xf826[81]](1,_0xf826[80])};_[_0xf826[82]](_0xb3e4x2a[_0xf826[78]],{createdAt:{$gte:_0xb3e4x38[_0xf826[66]],$lte:_0xb3e4x38[_0xf826[68]]}})};if(_0xb3e4x1e[_0xf826[67]][_0xf826[83]]){_0xb3e4x2a[_0xf826[78]]= _[_0xf826[82]](_0xb3e4x2a[_0xf826[78]],{$or:_[_0xf826[85]](_0xb3e4x2a[_0xf826[71]],function(_0xb3e4x39){var _0xb3e4x37={};_0xb3e4x37[_0xb3e4x39]= {$like:_0xf826[84]+ _0xb3e4x1e[_0xf826[67]][_0xf826[83]]+ _0xf826[84]};return _0xb3e4x37})})};_0xb3e4x2a= _[_0xf826[82]]({},_0xb3e4x2a,_0xb3e4x1e[_0xf826[86]]);var _0xb3e4x3a={where:_0xb3e4x2a[_0xf826[78]]};return db[_0xf826[64]][_0xf826[46]](_0xb3e4x3a)[_0xf826[40]](function(_0xb3e4x2b){_0xb3e4x37[_0xf826[46]]= _0xb3e4x2b;if(_0xb3e4x1e[_0xf826[67]][_0xf826[88]]){_0xb3e4x2a[_0xf826[89]]= [{all:true}]};return db[_0xf826[64]][_0xf826[90]](_0xb3e4x2a)})[_0xf826[40]](function(_0xb3e4x3b){_0xb3e4x37[_0xf826[87]]= _0xb3e4x3b;return _0xb3e4x37})[_0xf826[40]](respondWithFilteredResult(_0xb3e4x24,_0xb3e4x2a))[_0xf826[31]](handleError(_0xb3e4x24,null))};exports[_0xf826[91]]= function(_0xb3e4x1e,_0xb3e4x24){var _0xb3e4x2a={raw:false,where:{id:_0xb3e4x1e[_0xf826[93]][_0xf826[92]]}},_0xb3e4x36={};_0xb3e4x36[_0xf826[62]]= _[_0xf826[65]](db[_0xf826[64]][_0xf826[63]]);_0xb3e4x36[_0xf826[67]]= _[_0xf826[65]](_0xb3e4x1e[_0xf826[67]]);_0xb3e4x36[_0xf826[69]]= _[_0xf826[70]](_0xb3e4x36[_0xf826[62]],_0xb3e4x36[_0xf826[67]]);_0xb3e4x2a[_0xf826[71]]= _[_0xf826[70]](_0xb3e4x36[_0xf826[62]],qs[_0xf826[72]](_0xb3e4x1e[_0xf826[67]][_0xf826[72]]));_0xb3e4x2a[_0xf826[71]]= (_0xb3e4x2a[_0xf826[71]][_0xf826[73]])?_0xb3e4x2a[_0xf826[71]]:_0xb3e4x36[_0xf826[62]];if(_0xb3e4x1e[_0xf826[67]][_0xf826[88]]){_0xb3e4x2a[_0xf826[89]]= [{all:true}]};_0xb3e4x2a= _[_0xf826[82]]({},_0xb3e4x2a,_0xb3e4x1e[_0xf826[86]]);return db[_0xf826[64]][_0xf826[94]](_0xb3e4x2a)[_0xf826[40]](handleEntityNotFound(_0xb3e4x24,null))[_0xf826[40]](respondWithResult(_0xb3e4x24,null))[_0xf826[31]](handleError(_0xb3e4x24,null))};exports[_0xf826[95]]= function(_0xb3e4x1e,_0xb3e4x24){return db[_0xf826[64]][_0xf826[95]](_0xb3e4x1e[_0xf826[96]],{})[_0xf826[40]](respondWithResult(_0xb3e4x24,201))[_0xf826[31]](handleError(_0xb3e4x24,null))};exports[_0xf826[56]]= function(_0xb3e4x1e,_0xb3e4x24){if(_0xb3e4x1e[_0xf826[96]][_0xf826[92]]){delete _0xb3e4x1e[_0xf826[96]][_0xf826[92]]};return db[_0xf826[64]][_0xf826[94]]({where:{id:_0xb3e4x1e[_0xf826[93]][_0xf826[92]]}})[_0xf826[40]](handleEntityNotFound(_0xb3e4x24,null))[_0xf826[40]](saveUpdates(_0xb3e4x1e[_0xf826[96]],null))[_0xf826[40]](respondWithResult(_0xb3e4x24,null))[_0xf826[31]](handleError(_0xb3e4x24,null))};exports[_0xf826[57]]= function(_0xb3e4x1e,_0xb3e4x24){return db[_0xf826[64]][_0xf826[94]]({where:{id:_0xb3e4x1e[_0xf826[93]][_0xf826[92]]}})[_0xf826[40]](handleEntityNotFound(_0xb3e4x24,null))[_0xf826[40]](removeEntity(_0xb3e4x24,null))[_0xf826[31]](handleError(_0xb3e4x24,null))};exports[_0xf826[97]]= function(_0xb3e4x1e,_0xb3e4x27,_0xb3e4x3c){var _0xb3e4x2a={};var _0xb3e4x36={};var _0xb3e4x3d;var _0xb3e4x2b;return db[_0xf826[64]][_0xf826[99]]({where:{id:_0xb3e4x1e[_0xf826[93]][_0xf826[92]]}})[_0xf826[40]](handleEntityNotFound(_0xb3e4x27,null))[_0xf826[40]](function(_0xb3e4x27){if(_0xb3e4x27){_0xb3e4x3d= _0xb3e4x27;_0xb3e4x36[_0xf826[62]]= _[_0xf826[65]](db[_0xf826[98]][_0xf826[63]]);_0xb3e4x36[_0xf826[67]]= _[_0xf826[65]](_0xb3e4x1e[_0xf826[67]]);_0xb3e4x36[_0xf826[69]]= _[_0xf826[70]](_0xb3e4x36[_0xf826[62]],_0xb3e4x36[_0xf826[67]]);_0xb3e4x2a[_0xf826[71]]= _[_0xf826[70]](_0xb3e4x36[_0xf826[62]],qs[_0xf826[72]](_0xb3e4x1e[_0xf826[67]][_0xf826[72]]));_0xb3e4x2a[_0xf826[71]]= (_0xb3e4x2a[_0xf826[71]][_0xf826[73]])?_0xb3e4x2a[_0xf826[71]]:_0xb3e4x36[_0xf826[62]];_0xb3e4x2a[_0xf826[76]]= qs[_0xf826[77]](_0xb3e4x1e[_0xf826[67]][_0xf826[77]]);_0xb3e4x2a[_0xf826[78]]= qs[_0xf826[69]](_[_0xf826[79]](_0xb3e4x1e[_0xf826[67]],_0xb3e4x36[_0xf826[69]]));if(_0xb3e4x1e[_0xf826[67]][_0xf826[83]]){_0xb3e4x2a[_0xf826[78]]= _[_0xf826[82]](_0xb3e4x2a[_0xf826[78]],{$or:_[_0xf826[85]](_0xb3e4x2a[_0xf826[71]],function(_0xb3e4x39){var _0xb3e4x37={};_0xb3e4x37[_0xb3e4x39]= {$like:_0xf826[84]+ _0xb3e4x1e[_0xf826[67]][_0xf826[83]]+ _0xf826[84]};return _0xb3e4x37})})};_0xb3e4x2a= _[_0xf826[82]]({},_0xb3e4x2a,_0xb3e4x1e[_0xf826[86]]);return _0xb3e4x3d[_0xf826[97]](_0xb3e4x2a)}})[_0xf826[40]](function(_0xb3e4x3e){if(_0xb3e4x3e){_0xb3e4x2b= _0xb3e4x3e[_0xf826[73]];if(!_0xb3e4x1e[_0xf826[67]][_0xf826[75]](_0xf826[74])){_0xb3e4x2a[_0xf826[48]]= qs[_0xf826[48]](_0xb3e4x1e[_0xf826[67]][_0xf826[48]]);_0xb3e4x2a[_0xf826[47]]= qs[_0xf826[47]](_0xb3e4x1e[_0xf826[67]][_0xf826[47]])};return _0xb3e4x3d[_0xf826[97]](_0xb3e4x2a)}})[_0xf826[40]](function(_0xb3e4x3b){if(_0xb3e4x3b){return _0xb3e4x3b?{count:_0xb3e4x2b,rows:_0xb3e4x3b}:null}})[_0xf826[40]](respondWithResult(_0xb3e4x27,null))[_0xf826[31]](handleError(_0xb3e4x27,null))};exports[_0xf826[100]]= function(_0xb3e4x1e,_0xb3e4x27,_0xb3e4x3c){var _0xb3e4x2a={};var _0xb3e4x36={};var _0xb3e4x3d;var _0xb3e4x2b;return db[_0xf826[64]][_0xf826[99]]({where:{id:_0xb3e4x1e[_0xf826[93]][_0xf826[92]]}})[_0xf826[40]](handleEntityNotFound(_0xb3e4x27,null))[_0xf826[40]](function(_0xb3e4x27){if(_0xb3e4x27){_0xb3e4x3d= _0xb3e4x27;_0xb3e4x36[_0xf826[62]]= _[_0xf826[65]](db[_0xf826[98]][_0xf826[63]]);_0xb3e4x36[_0xf826[67]]= _[_0xf826[65]](_0xb3e4x1e[_0xf826[67]]);_0xb3e4x36[_0xf826[69]]= _[_0xf826[70]](_0xb3e4x36[_0xf826[62]],_0xb3e4x36[_0xf826[67]]);_0xb3e4x2a[_0xf826[71]]= _[_0xf826[70]](_0xb3e4x36[_0xf826[62]],qs[_0xf826[72]](_0xb3e4x1e[_0xf826[67]][_0xf826[72]]));_0xb3e4x2a[_0xf826[71]]= (_0xb3e4x2a[_0xf826[71]][_0xf826[73]])?_0xb3e4x2a[_0xf826[71]]:_0xb3e4x36[_0xf826[62]];_0xb3e4x2a[_0xf826[76]]= qs[_0xf826[77]](_0xb3e4x1e[_0xf826[67]][_0xf826[77]]);_0xb3e4x2a[_0xf826[78]]= qs[_0xf826[69]](_[_0xf826[79]](_0xb3e4x1e[_0xf826[67]],_0xb3e4x36[_0xf826[69]]));if(_0xb3e4x1e[_0xf826[67]][_0xf826[83]]){_0xb3e4x2a[_0xf826[78]]= _[_0xf826[82]](_0xb3e4x2a[_0xf826[78]],{$or:_[_0xf826[85]](_0xb3e4x2a[_0xf826[71]],function(_0xb3e4x39){var _0xb3e4x37={};_0xb3e4x37[_0xb3e4x39]= {$like:_0xf826[84]+ _0xb3e4x1e[_0xf826[67]][_0xf826[83]]+ _0xf826[84]};return _0xb3e4x37})})};_0xb3e4x2a= _[_0xf826[82]]({},_0xb3e4x2a,_0xb3e4x1e[_0xf826[86]]);return _0xb3e4x3d[_0xf826[100]](_0xb3e4x2a)}})[_0xf826[40]](function(_0xb3e4x3e){if(_0xb3e4x3e){_0xb3e4x2b= _0xb3e4x3e[_0xf826[73]];if(!_0xb3e4x1e[_0xf826[67]][_0xf826[75]](_0xf826[74])){_0xb3e4x2a[_0xf826[48]]= qs[_0xf826[48]](_0xb3e4x1e[_0xf826[67]][_0xf826[48]]);_0xb3e4x2a[_0xf826[47]]= qs[_0xf826[47]](_0xb3e4x1e[_0xf826[67]][_0xf826[47]])};return _0xb3e4x3d[_0xf826[100]](_0xb3e4x2a)}})[_0xf826[40]](function(_0xb3e4x3b){if(_0xb3e4x3b){return _0xb3e4x3b?{count:_0xb3e4x2b,rows:_0xb3e4x3b}:null}})[_0xf826[40]](respondWithResult(_0xb3e4x27,null))[_0xf826[31]](handleError(_0xb3e4x27,null))};exports[_0xf826[101]]= function(_0xb3e4x1e,_0xb3e4x27,_0xb3e4x3c){var _0xb3e4x2a={};var _0xb3e4x36={};var _0xb3e4x3d;var _0xb3e4x2b;return db[_0xf826[64]][_0xf826[99]]({where:{id:_0xb3e4x1e[_0xf826[93]][_0xf826[92]]}})[_0xf826[40]](handleEntityNotFound(_0xb3e4x27,null))[_0xf826[40]](function(_0xb3e4x27){if(_0xb3e4x27){_0xb3e4x3d= _0xb3e4x27;_0xb3e4x36[_0xf826[62]]= _[_0xf826[65]](db[_0xf826[98]][_0xf826[63]]);_0xb3e4x36[_0xf826[67]]= _[_0xf826[65]](_0xb3e4x1e[_0xf826[67]]);_0xb3e4x36[_0xf826[69]]= _[_0xf826[70]](_0xb3e4x36[_0xf826[62]],_0xb3e4x36[_0xf826[67]]);_0xb3e4x2a[_0xf826[71]]= _[_0xf826[70]](_0xb3e4x36[_0xf826[62]],qs[_0xf826[72]](_0xb3e4x1e[_0xf826[67]][_0xf826[72]]));_0xb3e4x2a[_0xf826[71]]= (_0xb3e4x2a[_0xf826[71]][_0xf826[73]])?_0xb3e4x2a[_0xf826[71]]:_0xb3e4x36[_0xf826[62]];_0xb3e4x2a[_0xf826[76]]= qs[_0xf826[77]](_0xb3e4x1e[_0xf826[67]][_0xf826[77]]);_0xb3e4x2a[_0xf826[78]]= qs[_0xf826[69]](_[_0xf826[79]](_0xb3e4x1e[_0xf826[67]],_0xb3e4x36[_0xf826[69]]));if(_0xb3e4x1e[_0xf826[67]][_0xf826[83]]){_0xb3e4x2a[_0xf826[78]]= _[_0xf826[82]](_0xb3e4x2a[_0xf826[78]],{$or:_[_0xf826[85]](_0xb3e4x2a[_0xf826[71]],function(_0xb3e4x39){var _0xb3e4x37={};_0xb3e4x37[_0xb3e4x39]= {$like:_0xf826[84]+ _0xb3e4x1e[_0xf826[67]][_0xf826[83]]+ _0xf826[84]};return _0xb3e4x37})})};_0xb3e4x2a= _[_0xf826[82]]({},_0xb3e4x2a,_0xb3e4x1e[_0xf826[86]]);return _0xb3e4x3d[_0xf826[101]](_0xb3e4x2a)}})[_0xf826[40]](function(_0xb3e4x3e){if(_0xb3e4x3e){_0xb3e4x2b= _0xb3e4x3e[_0xf826[73]];if(!_0xb3e4x1e[_0xf826[67]][_0xf826[75]](_0xf826[74])){_0xb3e4x2a[_0xf826[48]]= qs[_0xf826[48]](_0xb3e4x1e[_0xf826[67]][_0xf826[48]]);_0xb3e4x2a[_0xf826[47]]= qs[_0xf826[47]](_0xb3e4x1e[_0xf826[67]][_0xf826[47]])};return _0xb3e4x3d[_0xf826[101]](_0xb3e4x2a)}})[_0xf826[40]](function(_0xb3e4x3b){if(_0xb3e4x3b){return _0xb3e4x3b?{count:_0xb3e4x2b,rows:_0xb3e4x3b}:null}})[_0xf826[40]](respondWithResult(_0xb3e4x27,null))[_0xf826[31]](handleError(_0xb3e4x27,null))};exports[_0xf826[102]]= function(_0xb3e4x1e,_0xb3e4x27,_0xb3e4x3c){var _0xb3e4x2a={};var _0xb3e4x36={};var _0xb3e4x3d;var _0xb3e4x2b;return db[_0xf826[64]][_0xf826[99]]({where:{id:_0xb3e4x1e[_0xf826[93]][_0xf826[92]]}})[_0xf826[40]](handleEntityNotFound(_0xb3e4x27,null))[_0xf826[40]](function(_0xb3e4x27){if(_0xb3e4x27){_0xb3e4x3d= _0xb3e4x27;_0xb3e4x36[_0xf826[62]]= _[_0xf826[65]](db[_0xf826[103]][_0xf826[63]]);_0xb3e4x36[_0xf826[67]]= _[_0xf826[65]](_0xb3e4x1e[_0xf826[67]]);_0xb3e4x36[_0xf826[69]]= _[_0xf826[70]](_0xb3e4x36[_0xf826[62]],_0xb3e4x36[_0xf826[67]]);_0xb3e4x2a[_0xf826[71]]= _[_0xf826[70]](_0xb3e4x36[_0xf826[62]],qs[_0xf826[72]](_0xb3e4x1e[_0xf826[67]][_0xf826[72]]));_0xb3e4x2a[_0xf826[71]]= (_0xb3e4x2a[_0xf826[71]][_0xf826[73]])?_0xb3e4x2a[_0xf826[71]]:_0xb3e4x36[_0xf826[62]];_0xb3e4x2a[_0xf826[76]]= qs[_0xf826[77]](_0xb3e4x1e[_0xf826[67]][_0xf826[77]]);_0xb3e4x2a[_0xf826[78]]= qs[_0xf826[69]](_[_0xf826[79]](_0xb3e4x1e[_0xf826[67]],_0xb3e4x36[_0xf826[69]]));if(_0xb3e4x1e[_0xf826[67]][_0xf826[83]]){_0xb3e4x2a[_0xf826[78]]= _[_0xf826[82]](_0xb3e4x2a[_0xf826[78]],{$or:_[_0xf826[85]](_0xb3e4x2a[_0xf826[71]],function(_0xb3e4x39){var _0xb3e4x37={};_0xb3e4x37[_0xb3e4x39]= {$like:_0xf826[84]+ _0xb3e4x1e[_0xf826[67]][_0xf826[83]]+ _0xf826[84]};return _0xb3e4x37})})};_0xb3e4x2a= _[_0xf826[82]]({},_0xb3e4x2a,_0xb3e4x1e[_0xf826[86]]);return _0xb3e4x3d[_0xf826[102]](_0xb3e4x2a)}})[_0xf826[40]](function(_0xb3e4x3e){if(_0xb3e4x3e){_0xb3e4x2b= _0xb3e4x3e[_0xf826[73]];if(!_0xb3e4x1e[_0xf826[67]][_0xf826[75]](_0xf826[74])){_0xb3e4x2a[_0xf826[48]]= qs[_0xf826[48]](_0xb3e4x1e[_0xf826[67]][_0xf826[48]]);_0xb3e4x2a[_0xf826[47]]= qs[_0xf826[47]](_0xb3e4x1e[_0xf826[67]][_0xf826[47]])};return _0xb3e4x3d[_0xf826[102]](_0xb3e4x2a)}})[_0xf826[40]](function(_0xb3e4x3b){if(_0xb3e4x3b){return _0xb3e4x3b?{count:_0xb3e4x2b,rows:_0xb3e4x3b}:null}})[_0xf826[40]](respondWithResult(_0xb3e4x27,null))[_0xf826[31]](handleError(_0xb3e4x27,null))};exports[_0xf826[104]]= function(_0xb3e4x1e,_0xb3e4x24,_0xb3e4x3c){if(_0xb3e4x1e[_0xf826[96]][_0xf826[92]]){delete _0xb3e4x1e[_0xf826[96]][_0xf826[92]]};return db[_0xf826[64]][_0xf826[99]]({where:{id:_0xb3e4x1e[_0xf826[93]][_0xf826[92]]}})[_0xf826[40]](handleEntityNotFound(_0xb3e4x24,null))[_0xf826[40]](function(_0xb3e4x27){if(_0xb3e4x27){return _0xb3e4x27[_0xf826[104]](_0xb3e4x1e[_0xf826[96]][_0xf826[105]])};return null})[_0xf826[40]](respondWithResult(_0xb3e4x24,null))[_0xf826[31]](handleError(_0xb3e4x24,null))}
\ No newline at end of file
index c689ccf..52fd9c3 100644 (file)
@@ -1 +1 @@
-var _0xa6b9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x69\x6E\x74\x5F\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xa6b9[0];var _=require(_0xa6b9[1]);var util=require(_0xa6b9[2]);var logger=require(_0xa6b9[4])(_0xa6b9[3]);var moment=require(_0xa6b9[5]);var BPromise=require(_0xa6b9[6]);var rp=require(_0xa6b9[7]);var attributes=require(_0xa6b9[8]);module[_0xa6b9[9]]= function(_0x54b3x8,_0x54b3x9){return _0x54b3x8[_0xa6b9[12]](_0xa6b9[10],attributes,{tableName:_0xa6b9[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x460a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x69\x6E\x74\x5F\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x460a[0];var _=require(_0x460a[1]);var util=require(_0x460a[2]);var logger=require(_0x460a[4])(_0x460a[3]);var moment=require(_0x460a[5]);var BPromise=require(_0x460a[6]);var rp=require(_0x460a[7]);var attributes=require(_0x460a[8]);module[_0x460a[9]]= function(_0x75bdx8,_0x75bdx9){return _0x75bdx8[_0x460a[12]](_0x460a[10],attributes,{tableName:_0x460a[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 24c97fb..d9e0072 100644 (file)
@@ -1 +1 @@
-var _0xdfc7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xdfc7[0];var _=require(_0xdfc7[1]);var util=require(_0xdfc7[2]);var moment=require(_0xdfc7[3]);var BPromise=require(_0xdfc7[4]);var rs=require(_0xdfc7[5]);var fs=require(_0xdfc7[6]);var db=require(_0xdfc7[8])[_0xdfc7[7]];var utils=require(_0xdfc7[9]);var logger=require(_0xdfc7[11])(_0xdfc7[10]);var config=require(_0xdfc7[12]);var jayson=require(_0xdfc7[13]);var client=jayson[_0xdfc7[15]][_0xdfc7[14]]({port:9002});function respondWithRpcPromise(_0xc0b0xe,_0xc0b0xf,_0xc0b0x10){return  new BPromise(function(_0xc0b0x11,_0xc0b0x12){return client[_0xdfc7[28]](_0xc0b0xe,_0xc0b0x10)[_0xdfc7[27]](function(_0xc0b0x14){logger[_0xdfc7[20]](_0xdfc7[16],_0xc0b0xf,_0xdfc7[19]);logger[_0xdfc7[23]](_0xdfc7[21],_0xc0b0xf,_0xdfc7[19],JSON[_0xdfc7[22]](_0xc0b0x14));if(_0xc0b0x14[_0xdfc7[17]]){if(_0xc0b0x14[_0xdfc7[17]][_0xdfc7[24]]=== 500){logger[_0xdfc7[17]](_0xdfc7[16],_0xc0b0xf,_0xc0b0x14[_0xdfc7[17]][_0xdfc7[25]]);return _0xc0b0x12(_0xc0b0x14[_0xdfc7[17]][_0xdfc7[25]])};logger[_0xdfc7[17]](_0xdfc7[16],_0xc0b0xf,_0xc0b0x14[_0xdfc7[17]][_0xdfc7[25]]);return _0xc0b0x11(_0xc0b0x14[_0xdfc7[17]][_0xdfc7[25]])}else {logger[_0xdfc7[20]](_0xdfc7[16],_0xc0b0xf,_0xdfc7[19]);_0xc0b0x11(_0xc0b0x14[_0xdfc7[26]][_0xdfc7[25]])}})[_0xdfc7[18]](function(_0xc0b0x13){logger[_0xdfc7[17]](_0xdfc7[16],_0xc0b0xf,_0xc0b0x13);_0xc0b0x12(_0xc0b0x13)})})}
\ No newline at end of file
+var _0x6653=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x6653[0];var _=require(_0x6653[1]);var util=require(_0x6653[2]);var moment=require(_0x6653[3]);var BPromise=require(_0x6653[4]);var rs=require(_0x6653[5]);var fs=require(_0x6653[6]);var db=require(_0x6653[8])[_0x6653[7]];var utils=require(_0x6653[9]);var logger=require(_0x6653[11])(_0x6653[10]);var config=require(_0x6653[12]);var jayson=require(_0x6653[13]);var client=jayson[_0x6653[15]][_0x6653[14]]({port:9002});function respondWithRpcPromise(_0x8409xe,_0x8409xf,_0x8409x10){return  new BPromise(function(_0x8409x11,_0x8409x12){return client[_0x6653[28]](_0x8409xe,_0x8409x10)[_0x6653[27]](function(_0x8409x14){logger[_0x6653[20]](_0x6653[16],_0x8409xf,_0x6653[19]);logger[_0x6653[23]](_0x6653[21],_0x8409xf,_0x6653[19],JSON[_0x6653[22]](_0x8409x14));if(_0x8409x14[_0x6653[17]]){if(_0x8409x14[_0x6653[17]][_0x6653[24]]=== 500){logger[_0x6653[17]](_0x6653[16],_0x8409xf,_0x8409x14[_0x6653[17]][_0x6653[25]]);return _0x8409x12(_0x8409x14[_0x6653[17]][_0x6653[25]])};logger[_0x6653[17]](_0x6653[16],_0x8409xf,_0x8409x14[_0x6653[17]][_0x6653[25]]);return _0x8409x11(_0x8409x14[_0x6653[17]][_0x6653[25]])}else {logger[_0x6653[20]](_0x6653[16],_0x8409xf,_0x6653[19]);_0x8409x11(_0x8409x14[_0x6653[26]][_0x6653[25]])}})[_0x6653[18]](function(_0x8409x13){logger[_0x6653[17]](_0x6653[16],_0x8409xf,_0x8409x13);_0x8409x12(_0x8409x13)})})}
\ No newline at end of file
index 1763c0a..f7863a9 100644 (file)
@@ -1 +1 @@
-var _0xa8bc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x44\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xa8bc[0];var multer=require(_0xa8bc[1]);var util=require(_0xa8bc[2]);var path=require(_0xa8bc[3]);var express=require(_0xa8bc[4]);var router=express.Router();var auth=require(_0xa8bc[5]);var interaction=require(_0xa8bc[6]);var config=require(_0xa8bc[7]);var controller=require(_0xa8bc[8]);router[_0xa8bc[12]](_0xa8bc[9],auth[_0xa8bc[10]](),controller[_0xa8bc[11]]);router[_0xa8bc[12]](_0xa8bc[13],auth[_0xa8bc[10]](),controller[_0xa8bc[14]]);router[_0xa8bc[16]](_0xa8bc[9],auth[_0xa8bc[10]](),controller[_0xa8bc[15]]);router[_0xa8bc[18]](_0xa8bc[13],auth[_0xa8bc[10]](),controller[_0xa8bc[17]]);router[_0xa8bc[20]](_0xa8bc[13],auth[_0xa8bc[10]](),controller[_0xa8bc[19]]);module[_0xa8bc[21]]= router
\ No newline at end of file
+var _0xff1e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x44\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xff1e[0];var multer=require(_0xff1e[1]);var util=require(_0xff1e[2]);var path=require(_0xff1e[3]);var express=require(_0xff1e[4]);var router=express.Router();var auth=require(_0xff1e[5]);var interaction=require(_0xff1e[6]);var config=require(_0xff1e[7]);var controller=require(_0xff1e[8]);router[_0xff1e[12]](_0xff1e[9],auth[_0xff1e[10]](),controller[_0xff1e[11]]);router[_0xff1e[12]](_0xff1e[13],auth[_0xff1e[10]](),controller[_0xff1e[14]]);router[_0xff1e[16]](_0xff1e[9],auth[_0xff1e[10]](),controller[_0xff1e[15]]);router[_0xff1e[18]](_0xff1e[13],auth[_0xff1e[10]](),controller[_0xff1e[17]]);router[_0xff1e[20]](_0xff1e[13],auth[_0xff1e[10]](),controller[_0xff1e[19]]);module[_0xff1e[21]]= router
\ No newline at end of file
index 04663ff..a01f82c 100644 (file)
@@ -1 +1 @@
-var _0xf51f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x73\x74\x72\x69\x6E\x67","\x76\x61\x72\x69\x61\x62\x6C\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0xf51f[0];var Sequelize=require(_0xf51f[1]);module[_0xf51f[2]]= {type:{type:Sequelize.ENUM(_0xf51f[3],_0xf51f[4],_0xf51f[5],_0xf51f[6]),defaultValue:_0xf51f[3]},content:{type:Sequelize[_0xf51f[7]]},key:{type:Sequelize[_0xf51f[7]]},keyType:{type:Sequelize.ENUM(_0xf51f[3],_0xf51f[4],_0xf51f[5])},keyContent:{type:Sequelize[_0xf51f[7]]},idField:{type:Sequelize[_0xf51f[7]]},nameField:{type:Sequelize[_0xf51f[7]]},customField:{type:Sequelize[_0xf51f[8]],defaultValue:true},variableName:{type:Sequelize[_0xf51f[7]]}}
\ No newline at end of file
+var _0x928a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x73\x74\x72\x69\x6E\x67","\x76\x61\x72\x69\x61\x62\x6C\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x928a[0];var Sequelize=require(_0x928a[1]);module[_0x928a[2]]= {type:{type:Sequelize.ENUM(_0x928a[3],_0x928a[4],_0x928a[5],_0x928a[6]),defaultValue:_0x928a[3]},content:{type:Sequelize[_0x928a[7]]},key:{type:Sequelize[_0x928a[7]]},keyType:{type:Sequelize.ENUM(_0x928a[3],_0x928a[4],_0x928a[5])},keyContent:{type:Sequelize[_0x928a[7]]},idField:{type:Sequelize[_0x928a[7]]},nameField:{type:Sequelize[_0x928a[7]]},customField:{type:Sequelize[_0x928a[8]],defaultValue:true},variableName:{type:Sequelize[_0x928a[7]]}}
\ No newline at end of file
index a3c28ac..3270f7b 100644 (file)
@@ -1 +1 @@
-var _0x6253=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x6253[0];var jsonpatch=require(_0x6253[1]);var rp=require(_0x6253[2]);var moment=require(_0x6253[3]);var BPromise=require(_0x6253[4]);var Mustache=require(_0x6253[5]);var util=require(_0x6253[6]);var path=require(_0x6253[7]);var sox=require(_0x6253[8]);var csv=require(_0x6253[9]);var ejs=require(_0x6253[10]);var fs=require(_0x6253[11]);var _=require(_0x6253[12]);var squel=require(_0x6253[13]);var crypto=require(_0x6253[14]);var jsforce=require(_0x6253[15]);var deskjs=require(_0x6253[16]);var toCsv=require(_0x6253[9]);var querystring=require(_0x6253[17]);var Papa=require(_0x6253[18]);var qs=require(_0x6253[19]);var logger=require(_0x6253[21])(_0x6253[20]);var utils=require(_0x6253[22]);var config=require(_0x6253[23]);var db=require(_0x6253[25])[_0x6253[24]];function respondWithStatusCode(_0xd67fx1a,_0xd67fx1b){_0xd67fx1b= _0xd67fx1b|| 204;return function(_0xd67fx1c){if(_0xd67fx1c){return _0xd67fx1a[_0x6253[26]](_0xd67fx1b)};return _0xd67fx1a[_0x6253[28]](_0xd67fx1b)[_0x6253[27]]()}}function respondWithResult(_0xd67fx1a,_0xd67fx1b){_0xd67fx1b= _0xd67fx1b|| 200;return function(_0xd67fx1c){if(_0xd67fx1c){return _0xd67fx1a[_0x6253[28]](_0xd67fx1b)[_0x6253[29]](_0xd67fx1c)}}}function respondWithFilteredResult(_0xd67fx1a,_0xd67fx1f){return function(_0xd67fx1c){if(_0xd67fx1c){var _0xd67fx20=_0xd67fx1c[_0x6253[30]],_0xd67fx21=_0xd67fx1f[_0x6253[31]],_0xd67fx22=_0xd67fx1f[_0x6253[31]]+ _0xd67fx1f[_0x6253[32]],_0xd67fx1b;if(_0xd67fx22>= _0xd67fx20){_0xd67fx22= _0xd67fx20;_0xd67fx1b= 200}else {_0xd67fx1b= 206};_0xd67fx1a[_0x6253[28]](_0xd67fx1b);return _0xd67fx1a[_0x6253[36]](_0x6253[33],_0xd67fx21+ _0x6253[34]+ _0xd67fx22+ _0x6253[35]+ _0xd67fx20)[_0x6253[29]](_0xd67fx1c)};return null}}function patchUpdates(_0xd67fx24){return function(_0xd67fx1c){try{jsonpatch[_0x6253[37]](_0xd67fx1c,_0xd67fx24,true)}catch(err){return BPromise[_0x6253[38]](err)};return _0xd67fx1c[_0x6253[39]]()}}function saveUpdates(_0xd67fx26,_0xd67fx1b){return function(_0xd67fx1c){if(_0xd67fx1c){return _0xd67fx1c[_0x6253[41]](_0xd67fx26)[_0x6253[40]](function(_0xd67fx27){return _0xd67fx27})};return null}}function removeEntity(_0xd67fx1a,_0xd67fx1b){return function(_0xd67fx1c){if(_0xd67fx1c){return _0xd67fx1c[_0x6253[42]]()[_0x6253[40]](function(){_0xd67fx1a[_0x6253[28]](204)[_0x6253[27]]()})}}}function handleEntityNotFound(_0xd67fx1a,_0xd67fx1b){return function(_0xd67fx1c){if(!_0xd67fx1c){_0xd67fx1a[_0x6253[26]](404)};return _0xd67fx1c}}function handleError(_0xd67fx1a,_0xd67fx1b){_0xd67fx1b= _0xd67fx1b|| 500;return function(_0xd67fx2b){logger[_0x6253[44]](_0xd67fx2b[_0x6253[43]]);if(_0xd67fx2b[_0x6253[45]]){delete _0xd67fx2b[_0x6253[45]]};_0xd67fx1a[_0x6253[28]](_0xd67fx1b)[_0x6253[46]](_0xd67fx2b)}}exports[_0x6253[47]]= function(_0xd67fx2c,_0xd67fx1a){var _0xd67fx1f={},_0xd67fx2d={},_0xd67fx2e={count:0,rows:[]};_0xd67fx2d[_0x6253[48]]= _[_0x6253[51]](db[_0x6253[50]][_0x6253[49]]);var _0xd67fx2f={dateStart:_0xd67fx2c[_0x6253[53]][_0x6253[52]],dateEnd:_0xd67fx2c[_0x6253[53]][_0x6253[54]]};delete _0xd67fx2c[_0x6253[53]][_0x6253[52]];delete _0xd67fx2c[_0x6253[53]][_0x6253[54]];_0xd67fx2d[_0x6253[53]]= _[_0x6253[51]](_0xd67fx2c[_0x6253[53]]);_0xd67fx2d[_0x6253[55]]= _[_0x6253[56]](_0xd67fx2d[_0x6253[48]],_0xd67fx2d[_0x6253[53]]);_0xd67fx1f[_0x6253[57]]= _[_0x6253[56]](_0xd67fx2d[_0x6253[48]],qs[_0x6253[58]](_0xd67fx2c[_0x6253[53]][_0x6253[58]]));_0xd67fx1f[_0x6253[57]]= (_0xd67fx1f[_0x6253[57]][_0x6253[59]])?_0xd67fx1f[_0x6253[57]]:_0xd67fx2d[_0x6253[48]];if(!_0xd67fx2c[_0x6253[53]][_0x6253[61]](_0x6253[60])){_0xd67fx1f[_0x6253[32]]= qs[_0x6253[32]](_0xd67fx2c[_0x6253[53]][_0x6253[32]]);_0xd67fx1f[_0x6253[31]]= qs[_0x6253[31]](_0xd67fx2c[_0x6253[53]][_0x6253[31]])};_0xd67fx1f[_0x6253[62]]= qs[_0x6253[63]](_0xd67fx2c[_0x6253[53]][_0x6253[63]]);_0xd67fx1f[_0x6253[64]]= qs[_0x6253[55]](_[_0x6253[65]](_0xd67fx2c[_0x6253[53]],_0xd67fx2d[_0x6253[55]]));if(_0xd67fx2f[_0x6253[52]]){if(_0xd67fx2f[_0x6253[54]]){_0xd67fx2f[_0x6253[54]]= moment(_0xd67fx2f[_0x6253[54]])[_0x6253[67]](1,_0x6253[66])}else {_0xd67fx2f[_0x6253[54]]= moment(_0xd67fx2f[_0x6253[52]])[_0x6253[67]](1,_0x6253[66])};_[_0x6253[68]](_0xd67fx1f[_0x6253[64]],{createdAt:{$gte:_0xd67fx2f[_0x6253[52]],$lte:_0xd67fx2f[_0x6253[54]]}})};if(_0xd67fx2c[_0x6253[53]][_0x6253[69]]){_0xd67fx1f[_0x6253[64]]= _[_0x6253[68]](_0xd67fx1f[_0x6253[64]],{$or:_[_0x6253[71]](_0xd67fx1f[_0x6253[57]],function(_0xd67fx30){var _0xd67fx2e={};_0xd67fx2e[_0xd67fx30]= {$like:_0x6253[70]+ _0xd67fx2c[_0x6253[53]][_0x6253[69]]+ _0x6253[70]};return _0xd67fx2e})})};_0xd67fx1f= _[_0x6253[68]]({},_0xd67fx1f,_0xd67fx2c[_0x6253[72]]);var _0xd67fx31={where:_0xd67fx1f[_0x6253[64]]};return db[_0x6253[50]][_0x6253[30]](_0xd67fx31)[_0x6253[40]](function(_0xd67fx20){_0xd67fx2e[_0x6253[30]]= _0xd67fx20;if(_0xd67fx2c[_0x6253[53]][_0x6253[75]]){_0xd67fx1f[_0x6253[76]]= [{all:true}]};return db[_0x6253[50]][_0x6253[77]](_0xd67fx1f)})[_0x6253[40]](function(_0xd67fx32){_0xd67fx2e[_0x6253[74]]= _0xd67fx32;return _0xd67fx2e})[_0x6253[40]](respondWithFilteredResult(_0xd67fx1a,_0xd67fx1f))[_0x6253[73]](handleError(_0xd67fx1a,null))};exports[_0x6253[78]]= function(_0xd67fx2c,_0xd67fx1a){var _0xd67fx1f={raw:true,where:{id:_0xd67fx2c[_0x6253[80]][_0x6253[79]]}},_0xd67fx2d={};_0xd67fx2d[_0x6253[48]]= _[_0x6253[51]](db[_0x6253[50]][_0x6253[49]]);_0xd67fx2d[_0x6253[53]]= _[_0x6253[51]](_0xd67fx2c[_0x6253[53]]);_0xd67fx2d[_0x6253[55]]= _[_0x6253[56]](_0xd67fx2d[_0x6253[48]],_0xd67fx2d[_0x6253[53]]);_0xd67fx1f[_0x6253[57]]= _[_0x6253[56]](_0xd67fx2d[_0x6253[48]],qs[_0x6253[58]](_0xd67fx2c[_0x6253[53]][_0x6253[58]]));_0xd67fx1f[_0x6253[57]]= (_0xd67fx1f[_0x6253[57]][_0x6253[59]])?_0xd67fx1f[_0x6253[57]]:_0xd67fx2d[_0x6253[48]];if(_0xd67fx2c[_0x6253[53]][_0x6253[75]]){_0xd67fx1f[_0x6253[76]]= [{all:true}]};_0xd67fx1f= _[_0x6253[68]]({},_0xd67fx1f,_0xd67fx2c[_0x6253[72]]);return db[_0x6253[50]][_0x6253[81]](_0xd67fx1f)[_0x6253[40]](handleEntityNotFound(_0xd67fx1a,null))[_0x6253[40]](respondWithResult(_0xd67fx1a,null))[_0x6253[73]](handleError(_0xd67fx1a,null))};exports[_0x6253[82]]= function(_0xd67fx2c,_0xd67fx1a){return db[_0x6253[50]][_0x6253[82]](_0xd67fx2c[_0x6253[83]],{})[_0x6253[40]](respondWithResult(_0xd67fx1a,201))[_0x6253[73]](handleError(_0xd67fx1a,null))};exports[_0x6253[41]]= function(_0xd67fx2c,_0xd67fx1a){if(_0xd67fx2c[_0x6253[83]][_0x6253[79]]){delete _0xd67fx2c[_0x6253[83]][_0x6253[79]]};return db[_0x6253[50]][_0x6253[81]]({where:{id:_0xd67fx2c[_0x6253[80]][_0x6253[79]]}})[_0x6253[40]](handleEntityNotFound(_0xd67fx1a,null))[_0x6253[40]](saveUpdates(_0xd67fx2c[_0x6253[83]],null))[_0x6253[40]](respondWithResult(_0xd67fx1a,null))[_0x6253[73]](handleError(_0xd67fx1a,null))};exports[_0x6253[42]]= function(_0xd67fx2c,_0xd67fx1a){return db[_0x6253[50]][_0x6253[81]]({where:{id:_0xd67fx2c[_0x6253[80]][_0x6253[79]]}})[_0x6253[40]](handleEntityNotFound(_0xd67fx1a,null))[_0x6253[40]](removeEntity(_0xd67fx1a,null))[_0x6253[73]](handleError(_0xd67fx1a,null))}
\ No newline at end of file
+var _0x3157=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x3157[0];var jsonpatch=require(_0x3157[1]);var rp=require(_0x3157[2]);var moment=require(_0x3157[3]);var BPromise=require(_0x3157[4]);var Mustache=require(_0x3157[5]);var util=require(_0x3157[6]);var path=require(_0x3157[7]);var sox=require(_0x3157[8]);var csv=require(_0x3157[9]);var ejs=require(_0x3157[10]);var fs=require(_0x3157[11]);var _=require(_0x3157[12]);var squel=require(_0x3157[13]);var crypto=require(_0x3157[14]);var jsforce=require(_0x3157[15]);var deskjs=require(_0x3157[16]);var toCsv=require(_0x3157[9]);var querystring=require(_0x3157[17]);var Papa=require(_0x3157[18]);var qs=require(_0x3157[19]);var logger=require(_0x3157[21])(_0x3157[20]);var utils=require(_0x3157[22]);var config=require(_0x3157[23]);var db=require(_0x3157[25])[_0x3157[24]];function respondWithStatusCode(_0x6ef1x1a,_0x6ef1x1b){_0x6ef1x1b= _0x6ef1x1b|| 204;return function(_0x6ef1x1c){if(_0x6ef1x1c){return _0x6ef1x1a[_0x3157[26]](_0x6ef1x1b)};return _0x6ef1x1a[_0x3157[28]](_0x6ef1x1b)[_0x3157[27]]()}}function respondWithResult(_0x6ef1x1a,_0x6ef1x1b){_0x6ef1x1b= _0x6ef1x1b|| 200;return function(_0x6ef1x1c){if(_0x6ef1x1c){return _0x6ef1x1a[_0x3157[28]](_0x6ef1x1b)[_0x3157[29]](_0x6ef1x1c)}}}function respondWithFilteredResult(_0x6ef1x1a,_0x6ef1x1f){return function(_0x6ef1x1c){if(_0x6ef1x1c){var _0x6ef1x20=_0x6ef1x1c[_0x3157[30]],_0x6ef1x21=_0x6ef1x1f[_0x3157[31]],_0x6ef1x22=_0x6ef1x1f[_0x3157[31]]+ _0x6ef1x1f[_0x3157[32]],_0x6ef1x1b;if(_0x6ef1x22>= _0x6ef1x20){_0x6ef1x22= _0x6ef1x20;_0x6ef1x1b= 200}else {_0x6ef1x1b= 206};_0x6ef1x1a[_0x3157[28]](_0x6ef1x1b);return _0x6ef1x1a[_0x3157[36]](_0x3157[33],_0x6ef1x21+ _0x3157[34]+ _0x6ef1x22+ _0x3157[35]+ _0x6ef1x20)[_0x3157[29]](_0x6ef1x1c)};return null}}function patchUpdates(_0x6ef1x24){return function(_0x6ef1x1c){try{jsonpatch[_0x3157[37]](_0x6ef1x1c,_0x6ef1x24,true)}catch(err){return BPromise[_0x3157[38]](err)};return _0x6ef1x1c[_0x3157[39]]()}}function saveUpdates(_0x6ef1x26,_0x6ef1x1b){return function(_0x6ef1x1c){if(_0x6ef1x1c){return _0x6ef1x1c[_0x3157[41]](_0x6ef1x26)[_0x3157[40]](function(_0x6ef1x27){return _0x6ef1x27})};return null}}function removeEntity(_0x6ef1x1a,_0x6ef1x1b){return function(_0x6ef1x1c){if(_0x6ef1x1c){return _0x6ef1x1c[_0x3157[42]]()[_0x3157[40]](function(){_0x6ef1x1a[_0x3157[28]](204)[_0x3157[27]]()})}}}function handleEntityNotFound(_0x6ef1x1a,_0x6ef1x1b){return function(_0x6ef1x1c){if(!_0x6ef1x1c){_0x6ef1x1a[_0x3157[26]](404)};return _0x6ef1x1c}}function handleError(_0x6ef1x1a,_0x6ef1x1b){_0x6ef1x1b= _0x6ef1x1b|| 500;return function(_0x6ef1x2b){logger[_0x3157[44]](_0x6ef1x2b[_0x3157[43]]);if(_0x6ef1x2b[_0x3157[45]]){delete _0x6ef1x2b[_0x3157[45]]};_0x6ef1x1a[_0x3157[28]](_0x6ef1x1b)[_0x3157[46]](_0x6ef1x2b)}}exports[_0x3157[47]]= function(_0x6ef1x2c,_0x6ef1x1a){var _0x6ef1x1f={},_0x6ef1x2d={},_0x6ef1x2e={count:0,rows:[]};_0x6ef1x2d[_0x3157[48]]= _[_0x3157[51]](db[_0x3157[50]][_0x3157[49]]);var _0x6ef1x2f={dateStart:_0x6ef1x2c[_0x3157[53]][_0x3157[52]],dateEnd:_0x6ef1x2c[_0x3157[53]][_0x3157[54]]};delete _0x6ef1x2c[_0x3157[53]][_0x3157[52]];delete _0x6ef1x2c[_0x3157[53]][_0x3157[54]];_0x6ef1x2d[_0x3157[53]]= _[_0x3157[51]](_0x6ef1x2c[_0x3157[53]]);_0x6ef1x2d[_0x3157[55]]= _[_0x3157[56]](_0x6ef1x2d[_0x3157[48]],_0x6ef1x2d[_0x3157[53]]);_0x6ef1x1f[_0x3157[57]]= _[_0x3157[56]](_0x6ef1x2d[_0x3157[48]],qs[_0x3157[58]](_0x6ef1x2c[_0x3157[53]][_0x3157[58]]));_0x6ef1x1f[_0x3157[57]]= (_0x6ef1x1f[_0x3157[57]][_0x3157[59]])?_0x6ef1x1f[_0x3157[57]]:_0x6ef1x2d[_0x3157[48]];if(!_0x6ef1x2c[_0x3157[53]][_0x3157[61]](_0x3157[60])){_0x6ef1x1f[_0x3157[32]]= qs[_0x3157[32]](_0x6ef1x2c[_0x3157[53]][_0x3157[32]]);_0x6ef1x1f[_0x3157[31]]= qs[_0x3157[31]](_0x6ef1x2c[_0x3157[53]][_0x3157[31]])};_0x6ef1x1f[_0x3157[62]]= qs[_0x3157[63]](_0x6ef1x2c[_0x3157[53]][_0x3157[63]]);_0x6ef1x1f[_0x3157[64]]= qs[_0x3157[55]](_[_0x3157[65]](_0x6ef1x2c[_0x3157[53]],_0x6ef1x2d[_0x3157[55]]));if(_0x6ef1x2f[_0x3157[52]]){if(_0x6ef1x2f[_0x3157[54]]){_0x6ef1x2f[_0x3157[54]]= moment(_0x6ef1x2f[_0x3157[54]])[_0x3157[67]](1,_0x3157[66])}else {_0x6ef1x2f[_0x3157[54]]= moment(_0x6ef1x2f[_0x3157[52]])[_0x3157[67]](1,_0x3157[66])};_[_0x3157[68]](_0x6ef1x1f[_0x3157[64]],{createdAt:{$gte:_0x6ef1x2f[_0x3157[52]],$lte:_0x6ef1x2f[_0x3157[54]]}})};if(_0x6ef1x2c[_0x3157[53]][_0x3157[69]]){_0x6ef1x1f[_0x3157[64]]= _[_0x3157[68]](_0x6ef1x1f[_0x3157[64]],{$or:_[_0x3157[71]](_0x6ef1x1f[_0x3157[57]],function(_0x6ef1x30){var _0x6ef1x2e={};_0x6ef1x2e[_0x6ef1x30]= {$like:_0x3157[70]+ _0x6ef1x2c[_0x3157[53]][_0x3157[69]]+ _0x3157[70]};return _0x6ef1x2e})})};_0x6ef1x1f= _[_0x3157[68]]({},_0x6ef1x1f,_0x6ef1x2c[_0x3157[72]]);var _0x6ef1x31={where:_0x6ef1x1f[_0x3157[64]]};return db[_0x3157[50]][_0x3157[30]](_0x6ef1x31)[_0x3157[40]](function(_0x6ef1x20){_0x6ef1x2e[_0x3157[30]]= _0x6ef1x20;if(_0x6ef1x2c[_0x3157[53]][_0x3157[75]]){_0x6ef1x1f[_0x3157[76]]= [{all:true}]};return db[_0x3157[50]][_0x3157[77]](_0x6ef1x1f)})[_0x3157[40]](function(_0x6ef1x32){_0x6ef1x2e[_0x3157[74]]= _0x6ef1x32;return _0x6ef1x2e})[_0x3157[40]](respondWithFilteredResult(_0x6ef1x1a,_0x6ef1x1f))[_0x3157[73]](handleError(_0x6ef1x1a,null))};exports[_0x3157[78]]= function(_0x6ef1x2c,_0x6ef1x1a){var _0x6ef1x1f={raw:true,where:{id:_0x6ef1x2c[_0x3157[80]][_0x3157[79]]}},_0x6ef1x2d={};_0x6ef1x2d[_0x3157[48]]= _[_0x3157[51]](db[_0x3157[50]][_0x3157[49]]);_0x6ef1x2d[_0x3157[53]]= _[_0x3157[51]](_0x6ef1x2c[_0x3157[53]]);_0x6ef1x2d[_0x3157[55]]= _[_0x3157[56]](_0x6ef1x2d[_0x3157[48]],_0x6ef1x2d[_0x3157[53]]);_0x6ef1x1f[_0x3157[57]]= _[_0x3157[56]](_0x6ef1x2d[_0x3157[48]],qs[_0x3157[58]](_0x6ef1x2c[_0x3157[53]][_0x3157[58]]));_0x6ef1x1f[_0x3157[57]]= (_0x6ef1x1f[_0x3157[57]][_0x3157[59]])?_0x6ef1x1f[_0x3157[57]]:_0x6ef1x2d[_0x3157[48]];if(_0x6ef1x2c[_0x3157[53]][_0x3157[75]]){_0x6ef1x1f[_0x3157[76]]= [{all:true}]};_0x6ef1x1f= _[_0x3157[68]]({},_0x6ef1x1f,_0x6ef1x2c[_0x3157[72]]);return db[_0x3157[50]][_0x3157[81]](_0x6ef1x1f)[_0x3157[40]](handleEntityNotFound(_0x6ef1x1a,null))[_0x3157[40]](respondWithResult(_0x6ef1x1a,null))[_0x3157[73]](handleError(_0x6ef1x1a,null))};exports[_0x3157[82]]= function(_0x6ef1x2c,_0x6ef1x1a){return db[_0x3157[50]][_0x3157[82]](_0x6ef1x2c[_0x3157[83]],{})[_0x3157[40]](respondWithResult(_0x6ef1x1a,201))[_0x3157[73]](handleError(_0x6ef1x1a,null))};exports[_0x3157[41]]= function(_0x6ef1x2c,_0x6ef1x1a){if(_0x6ef1x2c[_0x3157[83]][_0x3157[79]]){delete _0x6ef1x2c[_0x3157[83]][_0x3157[79]]};return db[_0x3157[50]][_0x3157[81]]({where:{id:_0x6ef1x2c[_0x3157[80]][_0x3157[79]]}})[_0x3157[40]](handleEntityNotFound(_0x6ef1x1a,null))[_0x3157[40]](saveUpdates(_0x6ef1x2c[_0x3157[83]],null))[_0x3157[40]](respondWithResult(_0x6ef1x1a,null))[_0x3157[73]](handleError(_0x6ef1x1a,null))};exports[_0x3157[42]]= function(_0x6ef1x2c,_0x6ef1x1a){return db[_0x3157[50]][_0x3157[81]]({where:{id:_0x6ef1x2c[_0x3157[80]][_0x3157[79]]}})[_0x3157[40]](handleEntityNotFound(_0x6ef1x1a,null))[_0x3157[40]](removeEntity(_0x6ef1x1a,null))[_0x3157[73]](handleError(_0x6ef1x1a,null))}
\ No newline at end of file
index 605e9ec..557a3eb 100644 (file)
@@ -1 +1 @@
-var _0x437b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x44\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x69\x6E\x74\x5F\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0x437b[0];var _=require(_0x437b[1]);var util=require(_0x437b[2]);var logger=require(_0x437b[4])(_0x437b[3]);var moment=require(_0x437b[5]);var BPromise=require(_0x437b[6]);var rp=require(_0x437b[7]);var attributes=require(_0x437b[8]);module[_0x437b[9]]= function(_0xa9e5x8,_0xa9e5x9){return _0xa9e5x8[_0x437b[12]](_0x437b[10],attributes,{tableName:_0x437b[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x2094=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x44\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x69\x6E\x74\x5F\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0x2094[0];var _=require(_0x2094[1]);var util=require(_0x2094[2]);var logger=require(_0x2094[4])(_0x2094[3]);var moment=require(_0x2094[5]);var BPromise=require(_0x2094[6]);var rp=require(_0x2094[7]);var attributes=require(_0x2094[8]);module[_0x2094[9]]= function(_0x6169x8,_0x6169x9){return _0x6169x8[_0x2094[12]](_0x2094[10],attributes,{tableName:_0x2094[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index ce61b6b..3017109 100644 (file)
@@ -1 +1 @@
-var _0x6879=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x6879[0];var _=require(_0x6879[1]);var util=require(_0x6879[2]);var moment=require(_0x6879[3]);var BPromise=require(_0x6879[4]);var rs=require(_0x6879[5]);var fs=require(_0x6879[6]);var db=require(_0x6879[8])[_0x6879[7]];var utils=require(_0x6879[9]);var logger=require(_0x6879[11])(_0x6879[10]);var config=require(_0x6879[12]);var jayson=require(_0x6879[13]);var client=jayson[_0x6879[15]][_0x6879[14]]({port:9002});function respondWithRpcPromise(_0xc13bxe,_0xc13bxf,_0xc13bx10){return  new BPromise(function(_0xc13bx11,_0xc13bx12){return client[_0x6879[28]](_0xc13bxe,_0xc13bx10)[_0x6879[27]](function(_0xc13bx14){logger[_0x6879[20]](_0x6879[16],_0xc13bxf,_0x6879[19]);logger[_0x6879[23]](_0x6879[21],_0xc13bxf,_0x6879[19],JSON[_0x6879[22]](_0xc13bx14));if(_0xc13bx14[_0x6879[17]]){if(_0xc13bx14[_0x6879[17]][_0x6879[24]]=== 500){logger[_0x6879[17]](_0x6879[16],_0xc13bxf,_0xc13bx14[_0x6879[17]][_0x6879[25]]);return _0xc13bx12(_0xc13bx14[_0x6879[17]][_0x6879[25]])};logger[_0x6879[17]](_0x6879[16],_0xc13bxf,_0xc13bx14[_0x6879[17]][_0x6879[25]]);return _0xc13bx11(_0xc13bx14[_0x6879[17]][_0x6879[25]])}else {logger[_0x6879[20]](_0x6879[16],_0xc13bxf,_0x6879[19]);_0xc13bx11(_0xc13bx14[_0x6879[26]][_0x6879[25]])}})[_0x6879[18]](function(_0xc13bx13){logger[_0x6879[17]](_0x6879[16],_0xc13bxf,_0xc13bx13);_0xc13bx12(_0xc13bx13)})})}
\ No newline at end of file
+var _0x862f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x862f[0];var _=require(_0x862f[1]);var util=require(_0x862f[2]);var moment=require(_0x862f[3]);var BPromise=require(_0x862f[4]);var rs=require(_0x862f[5]);var fs=require(_0x862f[6]);var db=require(_0x862f[8])[_0x862f[7]];var utils=require(_0x862f[9]);var logger=require(_0x862f[11])(_0x862f[10]);var config=require(_0x862f[12]);var jayson=require(_0x862f[13]);var client=jayson[_0x862f[15]][_0x862f[14]]({port:9002});function respondWithRpcPromise(_0xc6abxe,_0xc6abxf,_0xc6abx10){return  new BPromise(function(_0xc6abx11,_0xc6abx12){return client[_0x862f[28]](_0xc6abxe,_0xc6abx10)[_0x862f[27]](function(_0xc6abx14){logger[_0x862f[20]](_0x862f[16],_0xc6abxf,_0x862f[19]);logger[_0x862f[23]](_0x862f[21],_0xc6abxf,_0x862f[19],JSON[_0x862f[22]](_0xc6abx14));if(_0xc6abx14[_0x862f[17]]){if(_0xc6abx14[_0x862f[17]][_0x862f[24]]=== 500){logger[_0x862f[17]](_0x862f[16],_0xc6abxf,_0xc6abx14[_0x862f[17]][_0x862f[25]]);return _0xc6abx12(_0xc6abx14[_0x862f[17]][_0x862f[25]])};logger[_0x862f[17]](_0x862f[16],_0xc6abxf,_0xc6abx14[_0x862f[17]][_0x862f[25]]);return _0xc6abx11(_0xc6abx14[_0x862f[17]][_0x862f[25]])}else {logger[_0x862f[20]](_0x862f[16],_0xc6abxf,_0x862f[19]);_0xc6abx11(_0xc6abx14[_0x862f[26]][_0x862f[25]])}})[_0x862f[18]](function(_0xc6abx13){logger[_0x862f[17]](_0x862f[16],_0xc6abxf,_0xc6abx13);_0xc6abx12(_0xc6abx13)})})}
\ No newline at end of file
index b5400d3..6a37899 100644 (file)
@@ -1 +1 @@
-var _0x1cca=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x1cca[0];var multer=require(_0x1cca[1]);var util=require(_0x1cca[2]);var path=require(_0x1cca[3]);var express=require(_0x1cca[4]);var router=express.Router();var auth=require(_0x1cca[5]);var interaction=require(_0x1cca[6]);var config=require(_0x1cca[7]);var controller=require(_0x1cca[8]);router[_0x1cca[12]](_0x1cca[9],auth[_0x1cca[10]](),controller[_0x1cca[11]]);router[_0x1cca[12]](_0x1cca[13],auth[_0x1cca[10]](),controller[_0x1cca[14]]);router[_0x1cca[12]](_0x1cca[15],auth[_0x1cca[10]](),controller[_0x1cca[16]]);router[_0x1cca[12]](_0x1cca[17],auth[_0x1cca[10]](),controller[_0x1cca[18]]);router[_0x1cca[20]](_0x1cca[9],auth[_0x1cca[10]](),controller[_0x1cca[19]]);router[_0x1cca[20]](_0x1cca[15],auth[_0x1cca[10]](),controller[_0x1cca[21]]);router[_0x1cca[23]](_0x1cca[13],auth[_0x1cca[10]](),controller[_0x1cca[22]]);router[_0x1cca[25]](_0x1cca[13],auth[_0x1cca[10]](),controller[_0x1cca[24]]);module[_0x1cca[26]]= router
\ No newline at end of file
+var _0x7583=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x7583[0];var multer=require(_0x7583[1]);var util=require(_0x7583[2]);var path=require(_0x7583[3]);var express=require(_0x7583[4]);var router=express.Router();var auth=require(_0x7583[5]);var interaction=require(_0x7583[6]);var config=require(_0x7583[7]);var controller=require(_0x7583[8]);router[_0x7583[12]](_0x7583[9],auth[_0x7583[10]](),controller[_0x7583[11]]);router[_0x7583[12]](_0x7583[13],auth[_0x7583[10]](),controller[_0x7583[14]]);router[_0x7583[12]](_0x7583[15],auth[_0x7583[10]](),controller[_0x7583[16]]);router[_0x7583[12]](_0x7583[17],auth[_0x7583[10]](),controller[_0x7583[18]]);router[_0x7583[20]](_0x7583[9],auth[_0x7583[10]](),controller[_0x7583[19]]);router[_0x7583[20]](_0x7583[15],auth[_0x7583[10]](),controller[_0x7583[21]]);router[_0x7583[23]](_0x7583[13],auth[_0x7583[10]](),controller[_0x7583[22]]);router[_0x7583[25]](_0x7583[13],auth[_0x7583[10]](),controller[_0x7583[24]]);module[_0x7583[26]]= router
\ No newline at end of file
index 29a1ad4..08c0339 100644 (file)
@@ -1 +1 @@
-var _0xf4d8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69"];_0xf4d8[0];var Sequelize=require(_0xf4d8[1]);module[_0xf4d8[2]]= {name:{type:Sequelize[_0xf4d8[3]]},description:{type:Sequelize[_0xf4d8[3]]},username:{type:Sequelize[_0xf4d8[3]],unique:_0xf4d8[4]},apiKey:{type:Sequelize[_0xf4d8[3]]},remoteUri:{type:Sequelize[_0xf4d8[3]],unique:_0xf4d8[5]},serverUrl:{type:Sequelize[_0xf4d8[3]]}}
\ No newline at end of file
+var _0x719f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69"];_0x719f[0];var Sequelize=require(_0x719f[1]);module[_0x719f[2]]= {name:{type:Sequelize[_0x719f[3]]},description:{type:Sequelize[_0x719f[3]]},username:{type:Sequelize[_0x719f[3]],unique:_0x719f[4]},apiKey:{type:Sequelize[_0x719f[3]]},remoteUri:{type:Sequelize[_0x719f[3]],unique:_0x719f[5]},serverUrl:{type:Sequelize[_0x719f[3]]}}
\ No newline at end of file
index 8779c31..1e2e3e2 100644 (file)
@@ -1 +1 @@
-var _0xc50b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x79\x70\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x74\x65\x73\x74","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73","\x72\x65\x71\x75\x65\x73\x74\x65\x72","\x73\x75\x62\x6A\x65\x63\x74","\x61\x67\x65\x6E\x74","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x70\x72\x69\x6F\x72\x69\x74\x79","\x67\x72\x6F\x75\x70","\x73\x6F\x75\x72\x63\x65","\x74\x69\x63\x6B\x65\x74\x5F\x74\x79\x70\x65","\x63\x6F\x6D\x70\x61\x6E\x79","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x64\x65\x66\x61\x75\x6C\x74","\x63\x75\x73\x74\x6F\x6D\x5F\x74\x65\x78\x74","\x72\x65\x6D\x6F\x76\x65","\x6C\x61\x62\x65\x6C","\x63\x68\x6F\x69\x63\x65\x73","\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65","\x47\x45\x54","\x25\x73\x25\x73","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x70\x69\x2F\x76\x32\x2F\x74\x69\x63\x6B\x65\x74\x5F\x66\x69\x65\x6C\x64\x73","\x66\x6F\x72\x6D\x61\x74","\x42\x61\x73\x69\x63\x20\x25\x73","\x62\x61\x73\x65\x36\x34","\x25\x73\x3A\x58","\x61\x70\x69\x4B\x65\x79"];_0xc50b[0];var jsonpatch=require(_0xc50b[1]);var rp=require(_0xc50b[2]);var moment=require(_0xc50b[3]);var BPromise=require(_0xc50b[4]);var Mustache=require(_0xc50b[5]);var util=require(_0xc50b[6]);var path=require(_0xc50b[7]);var sox=require(_0xc50b[8]);var csv=require(_0xc50b[9]);var ejs=require(_0xc50b[10]);var fs=require(_0xc50b[11]);var _=require(_0xc50b[12]);var squel=require(_0xc50b[13]);var crypto=require(_0xc50b[14]);var jsforce=require(_0xc50b[15]);var deskjs=require(_0xc50b[16]);var toCsv=require(_0xc50b[9]);var querystring=require(_0xc50b[17]);var Papa=require(_0xc50b[18]);var qs=require(_0xc50b[19]);var logger=require(_0xc50b[21])(_0xc50b[20]);var utils=require(_0xc50b[22]);var config=require(_0xc50b[23]);var db=require(_0xc50b[25])[_0xc50b[24]];var integrations=require(_0xc50b[26]);var jayson=require(_0xc50b[27]);var client=jayson[_0xc50b[29]][_0xc50b[28]]({port:9002});function respondWithRpcPromise(_0x15fbx1d,_0x15fbx1e,_0x15fbx1f,_0x15fbx20){return  new BPromise(function(_0x15fbx21,_0x15fbx22){var _0x15fbx23=(_0x15fbx20|| client);return _0x15fbx23[_0xc50b[42]](_0x15fbx1d,_0x15fbx1f)[_0xc50b[41]](function(_0x15fbx25){logger[_0xc50b[34]](_0xc50b[30],_0x15fbx1e,_0xc50b[33]);logger[_0xc50b[37]](_0xc50b[35],_0x15fbx1e,_0xc50b[33],JSON[_0xc50b[36]](_0x15fbx25));if(_0x15fbx25[_0xc50b[31]]){if(_0x15fbx25[_0xc50b[31]][_0xc50b[38]]=== 500){logger[_0xc50b[31]](_0xc50b[30],_0x15fbx1e,_0x15fbx25[_0xc50b[31]][_0xc50b[39]]);return _0x15fbx22(_0x15fbx25[_0xc50b[31]][_0xc50b[39]])};logger[_0xc50b[31]](_0xc50b[30],_0x15fbx1e,_0x15fbx25[_0xc50b[31]][_0xc50b[39]]);return _0x15fbx21(_0x15fbx25[_0xc50b[31]][_0xc50b[39]])}else {logger[_0xc50b[34]](_0xc50b[30],_0x15fbx1e,_0xc50b[33]);_0x15fbx21(_0x15fbx25[_0xc50b[40]][_0xc50b[39]])}})[_0xc50b[32]](function(_0x15fbx24){logger[_0xc50b[31]](_0xc50b[30],_0x15fbx1e,_0x15fbx24);_0x15fbx22(_0x15fbx24)})})}function respondWithStatusCode(_0x15fbx25,_0x15fbx27){_0x15fbx27= _0x15fbx27|| 204;return function(_0x15fbx28){if(_0x15fbx28){return _0x15fbx25[_0xc50b[43]](_0x15fbx27)};return _0x15fbx25[_0xc50b[45]](_0x15fbx27)[_0xc50b[44]]()}}function respondWithResult(_0x15fbx25,_0x15fbx27){_0x15fbx27= _0x15fbx27|| 200;return function(_0x15fbx28){if(_0x15fbx28){return _0x15fbx25[_0xc50b[45]](_0x15fbx27)[_0xc50b[46]](_0x15fbx28)}}}function respondWithFilteredResult(_0x15fbx25,_0x15fbx2b){return function(_0x15fbx28){if(_0x15fbx28){var _0x15fbx2c=_0x15fbx28[_0xc50b[47]],_0x15fbx2d=_0x15fbx2b[_0xc50b[48]],_0x15fbx2e=_0x15fbx2b[_0xc50b[48]]+ _0x15fbx2b[_0xc50b[49]],_0x15fbx27;if(_0x15fbx2e>= _0x15fbx2c){_0x15fbx2e= _0x15fbx2c;_0x15fbx27= 200}else {_0x15fbx27= 206};_0x15fbx25[_0xc50b[45]](_0x15fbx27);return _0x15fbx25[_0xc50b[53]](_0xc50b[50],_0x15fbx2d+ _0xc50b[51]+ _0x15fbx2e+ _0xc50b[52]+ _0x15fbx2c)[_0xc50b[46]](_0x15fbx28)};return null}}function patchUpdates(_0x15fbx30){return function(_0x15fbx28){try{jsonpatch[_0xc50b[54]](_0x15fbx28,_0x15fbx30,true)}catch(err){return BPromise[_0xc50b[55]](err)};return _0x15fbx28[_0xc50b[56]]()}}function saveUpdates(_0x15fbx32,_0x15fbx27){return function(_0x15fbx28){if(_0x15fbx28){return _0x15fbx28[_0xc50b[57]](_0x15fbx32)[_0xc50b[41]](function(_0x15fbx33){return _0x15fbx33})};return null}}function removeEntity(_0x15fbx25,_0x15fbx27){return function(_0x15fbx28){if(_0x15fbx28){return _0x15fbx28[_0xc50b[58]]()[_0xc50b[41]](function(){_0x15fbx25[_0xc50b[45]](204)[_0xc50b[44]]()})}}}function handleEntityNotFound(_0x15fbx25,_0x15fbx27){return function(_0x15fbx28){if(!_0x15fbx28){_0x15fbx25[_0xc50b[43]](404)};return _0x15fbx28}}function handleError(_0x15fbx25,_0x15fbx27){_0x15fbx27= _0x15fbx27|| 500;return function(_0x15fbx24){logger[_0xc50b[31]](_0x15fbx24[_0xc50b[59]]);if(_0x15fbx24[_0xc50b[60]]){delete _0x15fbx24[_0xc50b[60]]};_0x15fbx25[_0xc50b[45]](_0x15fbx27)[_0xc50b[61]](_0x15fbx24)}}exports[_0xc50b[62]]= function(_0x15fbx1f,_0x15fbx25){var _0x15fbx2b={},_0x15fbx37={},_0x15fbx38={count:0,rows:[]};_0x15fbx37[_0xc50b[63]]= _[_0xc50b[66]](db[_0xc50b[65]][_0xc50b[64]]);var _0x15fbx39={dateStart:_0x15fbx1f[_0xc50b[68]][_0xc50b[67]],dateEnd:_0x15fbx1f[_0xc50b[68]][_0xc50b[69]]};delete _0x15fbx1f[_0xc50b[68]][_0xc50b[67]];delete _0x15fbx1f[_0xc50b[68]][_0xc50b[69]];_0x15fbx37[_0xc50b[68]]= _[_0xc50b[66]](_0x15fbx1f[_0xc50b[68]]);_0x15fbx37[_0xc50b[70]]= _[_0xc50b[71]](_0x15fbx37[_0xc50b[63]],_0x15fbx37[_0xc50b[68]]);_0x15fbx2b[_0xc50b[72]]= _[_0xc50b[71]](_0x15fbx37[_0xc50b[63]],qs[_0xc50b[73]](_0x15fbx1f[_0xc50b[68]][_0xc50b[73]]));_0x15fbx2b[_0xc50b[72]]= (_0x15fbx2b[_0xc50b[72]][_0xc50b[74]])?_0x15fbx2b[_0xc50b[72]]:_0x15fbx37[_0xc50b[63]];if(!_0x15fbx1f[_0xc50b[68]][_0xc50b[76]](_0xc50b[75])){_0x15fbx2b[_0xc50b[49]]= qs[_0xc50b[49]](_0x15fbx1f[_0xc50b[68]][_0xc50b[49]]);_0x15fbx2b[_0xc50b[48]]= qs[_0xc50b[48]](_0x15fbx1f[_0xc50b[68]][_0xc50b[48]])};_0x15fbx2b[_0xc50b[77]]= qs[_0xc50b[78]](_0x15fbx1f[_0xc50b[68]][_0xc50b[78]]);_0x15fbx2b[_0xc50b[79]]= qs[_0xc50b[70]](_[_0xc50b[80]](_0x15fbx1f[_0xc50b[68]],_0x15fbx37[_0xc50b[70]]));if(_0x15fbx39[_0xc50b[67]]){if(_0x15fbx39[_0xc50b[69]]){_0x15fbx39[_0xc50b[69]]= moment(_0x15fbx39[_0xc50b[69]])[_0xc50b[82]](1,_0xc50b[81])}else {_0x15fbx39[_0xc50b[69]]= moment(_0x15fbx39[_0xc50b[67]])[_0xc50b[82]](1,_0xc50b[81])};_[_0xc50b[83]](_0x15fbx2b[_0xc50b[79]],{createdAt:{$gte:_0x15fbx39[_0xc50b[67]],$lte:_0x15fbx39[_0xc50b[69]]}})};if(_0x15fbx1f[_0xc50b[68]][_0xc50b[84]]){_0x15fbx2b[_0xc50b[79]]= _[_0xc50b[83]](_0x15fbx2b[_0xc50b[79]],{$or:_[_0xc50b[86]](_0x15fbx2b[_0xc50b[72]],function(_0x15fbx3a){var _0x15fbx38={};_0x15fbx38[_0x15fbx3a]= {$like:_0xc50b[85]+ _0x15fbx1f[_0xc50b[68]][_0xc50b[84]]+ _0xc50b[85]};return _0x15fbx38})})};_0x15fbx2b= _[_0xc50b[83]]({},_0x15fbx2b,_0x15fbx1f[_0xc50b[87]]);var _0x15fbx3b={where:_0x15fbx2b[_0xc50b[79]]};return db[_0xc50b[65]][_0xc50b[47]](_0x15fbx3b)[_0xc50b[41]](function(_0x15fbx2c){_0x15fbx38[_0xc50b[47]]= _0x15fbx2c;if(_0x15fbx1f[_0xc50b[68]][_0xc50b[89]]){_0x15fbx2b[_0xc50b[90]]= [{all:true}]};return db[_0xc50b[65]][_0xc50b[91]](_0x15fbx2b)})[_0xc50b[41]](function(_0x15fbx3c){_0x15fbx38[_0xc50b[88]]= _0x15fbx3c;return _0x15fbx38})[_0xc50b[41]](respondWithFilteredResult(_0x15fbx25,_0x15fbx2b))[_0xc50b[32]](handleError(_0x15fbx25,null))};exports[_0xc50b[92]]= function(_0x15fbx1f,_0x15fbx25){var _0x15fbx2b={raw:false,where:{id:_0x15fbx1f[_0xc50b[94]][_0xc50b[93]]}},_0x15fbx37={};_0x15fbx37[_0xc50b[63]]= _[_0xc50b[66]](db[_0xc50b[65]][_0xc50b[64]]);_0x15fbx37[_0xc50b[68]]= _[_0xc50b[66]](_0x15fbx1f[_0xc50b[68]]);_0x15fbx37[_0xc50b[70]]= _[_0xc50b[71]](_0x15fbx37[_0xc50b[63]],_0x15fbx37[_0xc50b[68]]);_0x15fbx2b[_0xc50b[72]]= _[_0xc50b[71]](_0x15fbx37[_0xc50b[63]],qs[_0xc50b[73]](_0x15fbx1f[_0xc50b[68]][_0xc50b[73]]));_0x15fbx2b[_0xc50b[72]]= (_0x15fbx2b[_0xc50b[72]][_0xc50b[74]])?_0x15fbx2b[_0xc50b[72]]:_0x15fbx37[_0xc50b[63]];if(_0x15fbx1f[_0xc50b[68]][_0xc50b[89]]){_0x15fbx2b[_0xc50b[90]]= [{all:true}]};_0x15fbx2b= _[_0xc50b[83]]({},_0x15fbx2b,_0x15fbx1f[_0xc50b[87]]);return db[_0xc50b[65]][_0xc50b[95]](_0x15fbx2b)[_0xc50b[41]](handleEntityNotFound(_0x15fbx25,null))[_0xc50b[41]](respondWithResult(_0x15fbx25,null))[_0xc50b[32]](handleError(_0x15fbx25,null))};exports[_0xc50b[96]]= function(_0x15fbx1f,_0x15fbx25){return db[_0xc50b[65]][_0xc50b[96]](_0x15fbx1f[_0xc50b[97]],{})[_0xc50b[41]](respondWithResult(_0x15fbx25,201))[_0xc50b[32]](handleError(_0x15fbx25,null))};exports[_0xc50b[57]]= function(_0x15fbx1f,_0x15fbx25){if(_0x15fbx1f[_0xc50b[97]][_0xc50b[93]]){delete _0x15fbx1f[_0xc50b[97]][_0xc50b[93]]};return db[_0xc50b[65]][_0xc50b[95]]({where:{id:_0x15fbx1f[_0xc50b[94]][_0xc50b[93]]}})[_0xc50b[41]](handleEntityNotFound(_0x15fbx25,null))[_0xc50b[41]](saveUpdates(_0x15fbx1f[_0xc50b[97]],null))[_0xc50b[41]](respondWithResult(_0x15fbx25,null))[_0xc50b[32]](handleError(_0x15fbx25,null))};exports[_0xc50b[58]]= function(_0x15fbx1f,_0x15fbx25){return db[_0xc50b[65]][_0xc50b[95]]({where:{id:_0x15fbx1f[_0xc50b[94]][_0xc50b[93]]}})[_0xc50b[41]](handleEntityNotFound(_0x15fbx25,null))[_0xc50b[41]](removeEntity(_0x15fbx25,null))[_0xc50b[32]](handleError(_0x15fbx25,null))};exports[_0xc50b[98]]= function(_0x15fbx1f,_0x15fbx28,_0x15fbx3d){var _0x15fbx2b={};var _0x15fbx37={};var _0x15fbx3e;var _0x15fbx2c;return db[_0xc50b[65]][_0xc50b[100]]({where:{id:_0x15fbx1f[_0xc50b[94]][_0xc50b[93]]}})[_0xc50b[41]](handleEntityNotFound(_0x15fbx28,null))[_0xc50b[41]](function(_0x15fbx28){if(_0x15fbx28){_0x15fbx3e= _0x15fbx28;_0x15fbx37[_0xc50b[63]]= _[_0xc50b[66]](db[_0xc50b[99]][_0xc50b[64]]);_0x15fbx37[_0xc50b[68]]= _[_0xc50b[66]](_0x15fbx1f[_0xc50b[68]]);_0x15fbx37[_0xc50b[70]]= _[_0xc50b[71]](_0x15fbx37[_0xc50b[63]],_0x15fbx37[_0xc50b[68]]);_0x15fbx2b[_0xc50b[72]]= _[_0xc50b[71]](_0x15fbx37[_0xc50b[63]],qs[_0xc50b[73]](_0x15fbx1f[_0xc50b[68]][_0xc50b[73]]));_0x15fbx2b[_0xc50b[72]]= (_0x15fbx2b[_0xc50b[72]][_0xc50b[74]])?_0x15fbx2b[_0xc50b[72]]:_0x15fbx37[_0xc50b[63]];_0x15fbx2b[_0xc50b[77]]= qs[_0xc50b[78]](_0x15fbx1f[_0xc50b[68]][_0xc50b[78]]);_0x15fbx2b[_0xc50b[79]]= qs[_0xc50b[70]](_[_0xc50b[80]](_0x15fbx1f[_0xc50b[68]],_0x15fbx37[_0xc50b[70]]));if(_0x15fbx1f[_0xc50b[68]][_0xc50b[84]]){_0x15fbx2b[_0xc50b[79]]= _[_0xc50b[83]](_0x15fbx2b[_0xc50b[79]],{$or:_[_0xc50b[86]](_0x15fbx2b[_0xc50b[72]],function(_0x15fbx3a){var _0x15fbx38={};_0x15fbx38[_0x15fbx3a]= {$like:_0xc50b[85]+ _0x15fbx1f[_0xc50b[68]][_0xc50b[84]]+ _0xc50b[85]};return _0x15fbx38})})};_0x15fbx2b= _[_0xc50b[83]]({},_0x15fbx2b,_0x15fbx1f[_0xc50b[87]]);return _0x15fbx3e[_0xc50b[98]](_0x15fbx2b)}})[_0xc50b[41]](function(_0x15fbx3f){if(_0x15fbx3f){_0x15fbx2c= _0x15fbx3f[_0xc50b[74]];if(!_0x15fbx1f[_0xc50b[68]][_0xc50b[76]](_0xc50b[75])){_0x15fbx2b[_0xc50b[49]]= qs[_0xc50b[49]](_0x15fbx1f[_0xc50b[68]][_0xc50b[49]]);_0x15fbx2b[_0xc50b[48]]= qs[_0xc50b[48]](_0x15fbx1f[_0xc50b[68]][_0xc50b[48]])};return _0x15fbx3e[_0xc50b[98]](_0x15fbx2b)}})[_0xc50b[41]](function(_0x15fbx3c){if(_0x15fbx3c){return _0x15fbx3c?{count:_0x15fbx2c,rows:_0x15fbx3c}:null}})[_0xc50b[41]](respondWithResult(_0x15fbx28,null))[_0xc50b[32]](handleError(_0x15fbx28,null))};exports[_0xc50b[101]]= function(_0x15fbx1f,_0x15fbx25,_0x15fbx3d){if(_0x15fbx1f[_0xc50b[97]][_0xc50b[93]]){delete _0x15fbx1f[_0xc50b[97]][_0xc50b[93]]};return db[_0xc50b[65]][_0xc50b[100]]({where:{id:_0x15fbx1f[_0xc50b[94]][_0xc50b[93]]}})[_0xc50b[41]](handleEntityNotFound(_0x15fbx25,null))[_0xc50b[41]](function(_0x15fbx28){if(_0x15fbx28){_0x15fbx1f[_0xc50b[97]][_0xc50b[102]]= _0x15fbx28[_0xc50b[93]];_0x15fbx1f[_0xc50b[97]][_0xc50b[103]]= integrations[_0xc50b[106]](_0x15fbx1f[_0xc50b[97]][_0xc50b[104]],_0x15fbx1f[_0xc50b[97]][_0xc50b[105]]);_0x15fbx1f[_0xc50b[97]][_0xc50b[107]]= integrations[_0xc50b[108]](_0x15fbx1f[_0xc50b[97]][_0xc50b[104]],_0x15fbx1f[_0xc50b[97]][_0xc50b[105]]);return db[_0xc50b[99]][_0xc50b[96]](_0x15fbx1f[_0xc50b[97]],{include:[{model:db[_0xc50b[109]],as:_0xc50b[103]},{model:db[_0xc50b[109]],as:_0xc50b[107]}]})};return null})[_0xc50b[41]](respondWithResult(_0x15fbx25,null))[_0xc50b[32]](handleError(_0x15fbx25,null))};exports[_0xc50b[110]]= function(_0x15fbx1f,_0x15fbx25,_0x15fbx3d){return db[_0xc50b[65]][_0xc50b[100]]({where:{id:_0x15fbx1f[_0xc50b[94]][_0xc50b[93]]},attributes:[_0xc50b[93],_0xc50b[133],_0xc50b[139]]})[_0xc50b[41]](handleEntityNotFound(_0x15fbx25,null))[_0xc50b[41]](function(_0x15fbx28){if(_0x15fbx28){return rp({method:_0xc50b[131],uri:util[_0xc50b[135]](_0xc50b[132],_0x15fbx28[_0xc50b[133]],_0xc50b[134]),headers:{Authorization:util[_0xc50b[135]](_0xc50b[136], new Buffer(util[_0xc50b[135]](_0xc50b[138],_0x15fbx28[_0xc50b[139]])).toString(_0xc50b[137]))},json:true})}})[_0xc50b[41]](function(_0x15fbx3f){if(_0x15fbx3f){var _0x15fbx40=[_0xc50b[115],_0xc50b[116],_0xc50b[117],_0xc50b[118],_0xc50b[45],_0xc50b[119],_0xc50b[120],_0xc50b[121],_0xc50b[122],_0xc50b[120],_0xc50b[123]];_[_0xc50b[127]](_0x15fbx3f,function(_0x15fbx41){return _0x15fbx40[_0xc50b[124]](_0x15fbx41[_0xc50b[60]])|| (!_0x15fbx41[_0xc50b[125]]&& _0x15fbx41[_0xc50b[105]]!== _0xc50b[126])});return {count:_0x15fbx3f[_0xc50b[74]],rows:_[_0xc50b[86]](_0x15fbx3f,function(_0x15fbx28){return {id:_0x15fbx28[_0xc50b[60]],name:_0x15fbx28[_0xc50b[128]],custom:!_0x15fbx28[_0xc50b[125]],options:_0x15fbx28[_0xc50b[129]]?_[_0xc50b[86]](_0x15fbx28[_0xc50b[129]],function(_0x15fbx42){return {name:_[_0xc50b[130]](_0x15fbx42),value:_0x15fbx42}}):[]}})}}})[_0xc50b[41]](respondWithResult(_0x15fbx25,null))[_0xc50b[32]](function(_0x15fbx24){var _0x15fbx27=_0x15fbx1f[_0xc50b[68]][_0xc50b[111]]?500:(_0x15fbx24[_0xc50b[112]]|| 500);logger[_0xc50b[31]](_0xc50b[113],_0xc50b[110],_0x15fbx27,JSON[_0xc50b[36]](_0x15fbx24));delete _0x15fbx24[_0xc50b[60]];if(_0x15fbx27=== 401){_0x15fbx27= 400};_0x15fbx25[_0xc50b[45]](_0x15fbx27)[_0xc50b[61]](_0x15fbx1f[_0xc50b[68]][_0xc50b[111]]?{message:_0xc50b[114],statusCode:_0x15fbx24[_0xc50b[112]]}:_0x15fbx24)})}
\ No newline at end of file
+var _0x78b0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x79\x70\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x74\x65\x73\x74","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73","\x72\x65\x71\x75\x65\x73\x74\x65\x72","\x73\x75\x62\x6A\x65\x63\x74","\x61\x67\x65\x6E\x74","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x70\x72\x69\x6F\x72\x69\x74\x79","\x67\x72\x6F\x75\x70","\x73\x6F\x75\x72\x63\x65","\x74\x69\x63\x6B\x65\x74\x5F\x74\x79\x70\x65","\x63\x6F\x6D\x70\x61\x6E\x79","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x64\x65\x66\x61\x75\x6C\x74","\x63\x75\x73\x74\x6F\x6D\x5F\x74\x65\x78\x74","\x72\x65\x6D\x6F\x76\x65","\x6C\x61\x62\x65\x6C","\x63\x68\x6F\x69\x63\x65\x73","\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65","\x47\x45\x54","\x25\x73\x25\x73","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x70\x69\x2F\x76\x32\x2F\x74\x69\x63\x6B\x65\x74\x5F\x66\x69\x65\x6C\x64\x73","\x66\x6F\x72\x6D\x61\x74","\x42\x61\x73\x69\x63\x20\x25\x73","\x62\x61\x73\x65\x36\x34","\x25\x73\x3A\x58","\x61\x70\x69\x4B\x65\x79"];_0x78b0[0];var jsonpatch=require(_0x78b0[1]);var rp=require(_0x78b0[2]);var moment=require(_0x78b0[3]);var BPromise=require(_0x78b0[4]);var Mustache=require(_0x78b0[5]);var util=require(_0x78b0[6]);var path=require(_0x78b0[7]);var sox=require(_0x78b0[8]);var csv=require(_0x78b0[9]);var ejs=require(_0x78b0[10]);var fs=require(_0x78b0[11]);var _=require(_0x78b0[12]);var squel=require(_0x78b0[13]);var crypto=require(_0x78b0[14]);var jsforce=require(_0x78b0[15]);var deskjs=require(_0x78b0[16]);var toCsv=require(_0x78b0[9]);var querystring=require(_0x78b0[17]);var Papa=require(_0x78b0[18]);var qs=require(_0x78b0[19]);var logger=require(_0x78b0[21])(_0x78b0[20]);var utils=require(_0x78b0[22]);var config=require(_0x78b0[23]);var db=require(_0x78b0[25])[_0x78b0[24]];var integrations=require(_0x78b0[26]);var jayson=require(_0x78b0[27]);var client=jayson[_0x78b0[29]][_0x78b0[28]]({port:9002});function respondWithRpcPromise(_0x9317x1d,_0x9317x1e,_0x9317x1f,_0x9317x20){return  new BPromise(function(_0x9317x21,_0x9317x22){var _0x9317x23=(_0x9317x20|| client);return _0x9317x23[_0x78b0[42]](_0x9317x1d,_0x9317x1f)[_0x78b0[41]](function(_0x9317x25){logger[_0x78b0[34]](_0x78b0[30],_0x9317x1e,_0x78b0[33]);logger[_0x78b0[37]](_0x78b0[35],_0x9317x1e,_0x78b0[33],JSON[_0x78b0[36]](_0x9317x25));if(_0x9317x25[_0x78b0[31]]){if(_0x9317x25[_0x78b0[31]][_0x78b0[38]]=== 500){logger[_0x78b0[31]](_0x78b0[30],_0x9317x1e,_0x9317x25[_0x78b0[31]][_0x78b0[39]]);return _0x9317x22(_0x9317x25[_0x78b0[31]][_0x78b0[39]])};logger[_0x78b0[31]](_0x78b0[30],_0x9317x1e,_0x9317x25[_0x78b0[31]][_0x78b0[39]]);return _0x9317x21(_0x9317x25[_0x78b0[31]][_0x78b0[39]])}else {logger[_0x78b0[34]](_0x78b0[30],_0x9317x1e,_0x78b0[33]);_0x9317x21(_0x9317x25[_0x78b0[40]][_0x78b0[39]])}})[_0x78b0[32]](function(_0x9317x24){logger[_0x78b0[31]](_0x78b0[30],_0x9317x1e,_0x9317x24);_0x9317x22(_0x9317x24)})})}function respondWithStatusCode(_0x9317x25,_0x9317x27){_0x9317x27= _0x9317x27|| 204;return function(_0x9317x28){if(_0x9317x28){return _0x9317x25[_0x78b0[43]](_0x9317x27)};return _0x9317x25[_0x78b0[45]](_0x9317x27)[_0x78b0[44]]()}}function respondWithResult(_0x9317x25,_0x9317x27){_0x9317x27= _0x9317x27|| 200;return function(_0x9317x28){if(_0x9317x28){return _0x9317x25[_0x78b0[45]](_0x9317x27)[_0x78b0[46]](_0x9317x28)}}}function respondWithFilteredResult(_0x9317x25,_0x9317x2b){return function(_0x9317x28){if(_0x9317x28){var _0x9317x2c=_0x9317x28[_0x78b0[47]],_0x9317x2d=_0x9317x2b[_0x78b0[48]],_0x9317x2e=_0x9317x2b[_0x78b0[48]]+ _0x9317x2b[_0x78b0[49]],_0x9317x27;if(_0x9317x2e>= _0x9317x2c){_0x9317x2e= _0x9317x2c;_0x9317x27= 200}else {_0x9317x27= 206};_0x9317x25[_0x78b0[45]](_0x9317x27);return _0x9317x25[_0x78b0[53]](_0x78b0[50],_0x9317x2d+ _0x78b0[51]+ _0x9317x2e+ _0x78b0[52]+ _0x9317x2c)[_0x78b0[46]](_0x9317x28)};return null}}function patchUpdates(_0x9317x30){return function(_0x9317x28){try{jsonpatch[_0x78b0[54]](_0x9317x28,_0x9317x30,true)}catch(err){return BPromise[_0x78b0[55]](err)};return _0x9317x28[_0x78b0[56]]()}}function saveUpdates(_0x9317x32,_0x9317x27){return function(_0x9317x28){if(_0x9317x28){return _0x9317x28[_0x78b0[57]](_0x9317x32)[_0x78b0[41]](function(_0x9317x33){return _0x9317x33})};return null}}function removeEntity(_0x9317x25,_0x9317x27){return function(_0x9317x28){if(_0x9317x28){return _0x9317x28[_0x78b0[58]]()[_0x78b0[41]](function(){_0x9317x25[_0x78b0[45]](204)[_0x78b0[44]]()})}}}function handleEntityNotFound(_0x9317x25,_0x9317x27){return function(_0x9317x28){if(!_0x9317x28){_0x9317x25[_0x78b0[43]](404)};return _0x9317x28}}function handleError(_0x9317x25,_0x9317x27){_0x9317x27= _0x9317x27|| 500;return function(_0x9317x24){logger[_0x78b0[31]](_0x9317x24[_0x78b0[59]]);if(_0x9317x24[_0x78b0[60]]){delete _0x9317x24[_0x78b0[60]]};_0x9317x25[_0x78b0[45]](_0x9317x27)[_0x78b0[61]](_0x9317x24)}}exports[_0x78b0[62]]= function(_0x9317x1f,_0x9317x25){var _0x9317x2b={},_0x9317x37={},_0x9317x38={count:0,rows:[]};_0x9317x37[_0x78b0[63]]= _[_0x78b0[66]](db[_0x78b0[65]][_0x78b0[64]]);var _0x9317x39={dateStart:_0x9317x1f[_0x78b0[68]][_0x78b0[67]],dateEnd:_0x9317x1f[_0x78b0[68]][_0x78b0[69]]};delete _0x9317x1f[_0x78b0[68]][_0x78b0[67]];delete _0x9317x1f[_0x78b0[68]][_0x78b0[69]];_0x9317x37[_0x78b0[68]]= _[_0x78b0[66]](_0x9317x1f[_0x78b0[68]]);_0x9317x37[_0x78b0[70]]= _[_0x78b0[71]](_0x9317x37[_0x78b0[63]],_0x9317x37[_0x78b0[68]]);_0x9317x2b[_0x78b0[72]]= _[_0x78b0[71]](_0x9317x37[_0x78b0[63]],qs[_0x78b0[73]](_0x9317x1f[_0x78b0[68]][_0x78b0[73]]));_0x9317x2b[_0x78b0[72]]= (_0x9317x2b[_0x78b0[72]][_0x78b0[74]])?_0x9317x2b[_0x78b0[72]]:_0x9317x37[_0x78b0[63]];if(!_0x9317x1f[_0x78b0[68]][_0x78b0[76]](_0x78b0[75])){_0x9317x2b[_0x78b0[49]]= qs[_0x78b0[49]](_0x9317x1f[_0x78b0[68]][_0x78b0[49]]);_0x9317x2b[_0x78b0[48]]= qs[_0x78b0[48]](_0x9317x1f[_0x78b0[68]][_0x78b0[48]])};_0x9317x2b[_0x78b0[77]]= qs[_0x78b0[78]](_0x9317x1f[_0x78b0[68]][_0x78b0[78]]);_0x9317x2b[_0x78b0[79]]= qs[_0x78b0[70]](_[_0x78b0[80]](_0x9317x1f[_0x78b0[68]],_0x9317x37[_0x78b0[70]]));if(_0x9317x39[_0x78b0[67]]){if(_0x9317x39[_0x78b0[69]]){_0x9317x39[_0x78b0[69]]= moment(_0x9317x39[_0x78b0[69]])[_0x78b0[82]](1,_0x78b0[81])}else {_0x9317x39[_0x78b0[69]]= moment(_0x9317x39[_0x78b0[67]])[_0x78b0[82]](1,_0x78b0[81])};_[_0x78b0[83]](_0x9317x2b[_0x78b0[79]],{createdAt:{$gte:_0x9317x39[_0x78b0[67]],$lte:_0x9317x39[_0x78b0[69]]}})};if(_0x9317x1f[_0x78b0[68]][_0x78b0[84]]){_0x9317x2b[_0x78b0[79]]= _[_0x78b0[83]](_0x9317x2b[_0x78b0[79]],{$or:_[_0x78b0[86]](_0x9317x2b[_0x78b0[72]],function(_0x9317x3a){var _0x9317x38={};_0x9317x38[_0x9317x3a]= {$like:_0x78b0[85]+ _0x9317x1f[_0x78b0[68]][_0x78b0[84]]+ _0x78b0[85]};return _0x9317x38})})};_0x9317x2b= _[_0x78b0[83]]({},_0x9317x2b,_0x9317x1f[_0x78b0[87]]);var _0x9317x3b={where:_0x9317x2b[_0x78b0[79]]};return db[_0x78b0[65]][_0x78b0[47]](_0x9317x3b)[_0x78b0[41]](function(_0x9317x2c){_0x9317x38[_0x78b0[47]]= _0x9317x2c;if(_0x9317x1f[_0x78b0[68]][_0x78b0[89]]){_0x9317x2b[_0x78b0[90]]= [{all:true}]};return db[_0x78b0[65]][_0x78b0[91]](_0x9317x2b)})[_0x78b0[41]](function(_0x9317x3c){_0x9317x38[_0x78b0[88]]= _0x9317x3c;return _0x9317x38})[_0x78b0[41]](respondWithFilteredResult(_0x9317x25,_0x9317x2b))[_0x78b0[32]](handleError(_0x9317x25,null))};exports[_0x78b0[92]]= function(_0x9317x1f,_0x9317x25){var _0x9317x2b={raw:false,where:{id:_0x9317x1f[_0x78b0[94]][_0x78b0[93]]}},_0x9317x37={};_0x9317x37[_0x78b0[63]]= _[_0x78b0[66]](db[_0x78b0[65]][_0x78b0[64]]);_0x9317x37[_0x78b0[68]]= _[_0x78b0[66]](_0x9317x1f[_0x78b0[68]]);_0x9317x37[_0x78b0[70]]= _[_0x78b0[71]](_0x9317x37[_0x78b0[63]],_0x9317x37[_0x78b0[68]]);_0x9317x2b[_0x78b0[72]]= _[_0x78b0[71]](_0x9317x37[_0x78b0[63]],qs[_0x78b0[73]](_0x9317x1f[_0x78b0[68]][_0x78b0[73]]));_0x9317x2b[_0x78b0[72]]= (_0x9317x2b[_0x78b0[72]][_0x78b0[74]])?_0x9317x2b[_0x78b0[72]]:_0x9317x37[_0x78b0[63]];if(_0x9317x1f[_0x78b0[68]][_0x78b0[89]]){_0x9317x2b[_0x78b0[90]]= [{all:true}]};_0x9317x2b= _[_0x78b0[83]]({},_0x9317x2b,_0x9317x1f[_0x78b0[87]]);return db[_0x78b0[65]][_0x78b0[95]](_0x9317x2b)[_0x78b0[41]](handleEntityNotFound(_0x9317x25,null))[_0x78b0[41]](respondWithResult(_0x9317x25,null))[_0x78b0[32]](handleError(_0x9317x25,null))};exports[_0x78b0[96]]= function(_0x9317x1f,_0x9317x25){return db[_0x78b0[65]][_0x78b0[96]](_0x9317x1f[_0x78b0[97]],{})[_0x78b0[41]](respondWithResult(_0x9317x25,201))[_0x78b0[32]](handleError(_0x9317x25,null))};exports[_0x78b0[57]]= function(_0x9317x1f,_0x9317x25){if(_0x9317x1f[_0x78b0[97]][_0x78b0[93]]){delete _0x9317x1f[_0x78b0[97]][_0x78b0[93]]};return db[_0x78b0[65]][_0x78b0[95]]({where:{id:_0x9317x1f[_0x78b0[94]][_0x78b0[93]]}})[_0x78b0[41]](handleEntityNotFound(_0x9317x25,null))[_0x78b0[41]](saveUpdates(_0x9317x1f[_0x78b0[97]],null))[_0x78b0[41]](respondWithResult(_0x9317x25,null))[_0x78b0[32]](handleError(_0x9317x25,null))};exports[_0x78b0[58]]= function(_0x9317x1f,_0x9317x25){return db[_0x78b0[65]][_0x78b0[95]]({where:{id:_0x9317x1f[_0x78b0[94]][_0x78b0[93]]}})[_0x78b0[41]](handleEntityNotFound(_0x9317x25,null))[_0x78b0[41]](removeEntity(_0x9317x25,null))[_0x78b0[32]](handleError(_0x9317x25,null))};exports[_0x78b0[98]]= function(_0x9317x1f,_0x9317x28,_0x9317x3d){var _0x9317x2b={};var _0x9317x37={};var _0x9317x3e;var _0x9317x2c;return db[_0x78b0[65]][_0x78b0[100]]({where:{id:_0x9317x1f[_0x78b0[94]][_0x78b0[93]]}})[_0x78b0[41]](handleEntityNotFound(_0x9317x28,null))[_0x78b0[41]](function(_0x9317x28){if(_0x9317x28){_0x9317x3e= _0x9317x28;_0x9317x37[_0x78b0[63]]= _[_0x78b0[66]](db[_0x78b0[99]][_0x78b0[64]]);_0x9317x37[_0x78b0[68]]= _[_0x78b0[66]](_0x9317x1f[_0x78b0[68]]);_0x9317x37[_0x78b0[70]]= _[_0x78b0[71]](_0x9317x37[_0x78b0[63]],_0x9317x37[_0x78b0[68]]);_0x9317x2b[_0x78b0[72]]= _[_0x78b0[71]](_0x9317x37[_0x78b0[63]],qs[_0x78b0[73]](_0x9317x1f[_0x78b0[68]][_0x78b0[73]]));_0x9317x2b[_0x78b0[72]]= (_0x9317x2b[_0x78b0[72]][_0x78b0[74]])?_0x9317x2b[_0x78b0[72]]:_0x9317x37[_0x78b0[63]];_0x9317x2b[_0x78b0[77]]= qs[_0x78b0[78]](_0x9317x1f[_0x78b0[68]][_0x78b0[78]]);_0x9317x2b[_0x78b0[79]]= qs[_0x78b0[70]](_[_0x78b0[80]](_0x9317x1f[_0x78b0[68]],_0x9317x37[_0x78b0[70]]));if(_0x9317x1f[_0x78b0[68]][_0x78b0[84]]){_0x9317x2b[_0x78b0[79]]= _[_0x78b0[83]](_0x9317x2b[_0x78b0[79]],{$or:_[_0x78b0[86]](_0x9317x2b[_0x78b0[72]],function(_0x9317x3a){var _0x9317x38={};_0x9317x38[_0x9317x3a]= {$like:_0x78b0[85]+ _0x9317x1f[_0x78b0[68]][_0x78b0[84]]+ _0x78b0[85]};return _0x9317x38})})};_0x9317x2b= _[_0x78b0[83]]({},_0x9317x2b,_0x9317x1f[_0x78b0[87]]);return _0x9317x3e[_0x78b0[98]](_0x9317x2b)}})[_0x78b0[41]](function(_0x9317x3f){if(_0x9317x3f){_0x9317x2c= _0x9317x3f[_0x78b0[74]];if(!_0x9317x1f[_0x78b0[68]][_0x78b0[76]](_0x78b0[75])){_0x9317x2b[_0x78b0[49]]= qs[_0x78b0[49]](_0x9317x1f[_0x78b0[68]][_0x78b0[49]]);_0x9317x2b[_0x78b0[48]]= qs[_0x78b0[48]](_0x9317x1f[_0x78b0[68]][_0x78b0[48]])};return _0x9317x3e[_0x78b0[98]](_0x9317x2b)}})[_0x78b0[41]](function(_0x9317x3c){if(_0x9317x3c){return _0x9317x3c?{count:_0x9317x2c,rows:_0x9317x3c}:null}})[_0x78b0[41]](respondWithResult(_0x9317x28,null))[_0x78b0[32]](handleError(_0x9317x28,null))};exports[_0x78b0[101]]= function(_0x9317x1f,_0x9317x25,_0x9317x3d){if(_0x9317x1f[_0x78b0[97]][_0x78b0[93]]){delete _0x9317x1f[_0x78b0[97]][_0x78b0[93]]};return db[_0x78b0[65]][_0x78b0[100]]({where:{id:_0x9317x1f[_0x78b0[94]][_0x78b0[93]]}})[_0x78b0[41]](handleEntityNotFound(_0x9317x25,null))[_0x78b0[41]](function(_0x9317x28){if(_0x9317x28){_0x9317x1f[_0x78b0[97]][_0x78b0[102]]= _0x9317x28[_0x78b0[93]];_0x9317x1f[_0x78b0[97]][_0x78b0[103]]= integrations[_0x78b0[106]](_0x9317x1f[_0x78b0[97]][_0x78b0[104]],_0x9317x1f[_0x78b0[97]][_0x78b0[105]]);_0x9317x1f[_0x78b0[97]][_0x78b0[107]]= integrations[_0x78b0[108]](_0x9317x1f[_0x78b0[97]][_0x78b0[104]],_0x9317x1f[_0x78b0[97]][_0x78b0[105]]);return db[_0x78b0[99]][_0x78b0[96]](_0x9317x1f[_0x78b0[97]],{include:[{model:db[_0x78b0[109]],as:_0x78b0[103]},{model:db[_0x78b0[109]],as:_0x78b0[107]}]})};return null})[_0x78b0[41]](respondWithResult(_0x9317x25,null))[_0x78b0[32]](handleError(_0x9317x25,null))};exports[_0x78b0[110]]= function(_0x9317x1f,_0x9317x25,_0x9317x3d){return db[_0x78b0[65]][_0x78b0[100]]({where:{id:_0x9317x1f[_0x78b0[94]][_0x78b0[93]]},attributes:[_0x78b0[93],_0x78b0[133],_0x78b0[139]]})[_0x78b0[41]](handleEntityNotFound(_0x9317x25,null))[_0x78b0[41]](function(_0x9317x28){if(_0x9317x28){return rp({method:_0x78b0[131],uri:util[_0x78b0[135]](_0x78b0[132],_0x9317x28[_0x78b0[133]],_0x78b0[134]),headers:{Authorization:util[_0x78b0[135]](_0x78b0[136], new Buffer(util[_0x78b0[135]](_0x78b0[138],_0x9317x28[_0x78b0[139]])).toString(_0x78b0[137]))},json:true})}})[_0x78b0[41]](function(_0x9317x3f){if(_0x9317x3f){var _0x9317x40=[_0x78b0[115],_0x78b0[116],_0x78b0[117],_0x78b0[118],_0x78b0[45],_0x78b0[119],_0x78b0[120],_0x78b0[121],_0x78b0[122],_0x78b0[120],_0x78b0[123]];_[_0x78b0[127]](_0x9317x3f,function(_0x9317x41){return _0x9317x40[_0x78b0[124]](_0x9317x41[_0x78b0[60]])|| (!_0x9317x41[_0x78b0[125]]&& _0x9317x41[_0x78b0[105]]!== _0x78b0[126])});return {count:_0x9317x3f[_0x78b0[74]],rows:_[_0x78b0[86]](_0x9317x3f,function(_0x9317x28){return {id:_0x9317x28[_0x78b0[60]],name:_0x9317x28[_0x78b0[128]],custom:!_0x9317x28[_0x78b0[125]],options:_0x9317x28[_0x78b0[129]]?_[_0x78b0[86]](_0x9317x28[_0x78b0[129]],function(_0x9317x42){return {name:_[_0x78b0[130]](_0x9317x42),value:_0x9317x42}}):[]}})}}})[_0x78b0[41]](respondWithResult(_0x9317x25,null))[_0x78b0[32]](function(_0x9317x24){var _0x9317x27=_0x9317x1f[_0x78b0[68]][_0x78b0[111]]?500:(_0x9317x24[_0x78b0[112]]|| 500);logger[_0x78b0[31]](_0x78b0[113],_0x78b0[110],_0x9317x27,JSON[_0x78b0[36]](_0x9317x24));delete _0x9317x24[_0x78b0[60]];if(_0x9317x27=== 401){_0x9317x27= 400};_0x9317x25[_0x78b0[45]](_0x9317x27)[_0x78b0[61]](_0x9317x1f[_0x78b0[68]][_0x78b0[111]]?{message:_0x78b0[114],statusCode:_0x9317x24[_0x78b0[112]]}:_0x9317x24)})}
\ No newline at end of file
index 1a9ca02..809e324 100644 (file)
@@ -1 +1 @@
-var _0x5bad=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x74\x5F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x5bad[0];var _=require(_0x5bad[1]);var util=require(_0x5bad[2]);var logger=require(_0x5bad[4])(_0x5bad[3]);var moment=require(_0x5bad[5]);var BPromise=require(_0x5bad[6]);var rp=require(_0x5bad[7]);var attributes=require(_0x5bad[8]);var integrations=require(_0x5bad[9]);module[_0x5bad[10]]= function(_0xd301x9,_0xd301xa){return _0xd301x9[_0x5bad[13]](_0x5bad[11],attributes,{tableName:_0x5bad[12],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xf717=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x74\x5F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0xf717[0];var _=require(_0xf717[1]);var util=require(_0xf717[2]);var logger=require(_0xf717[4])(_0xf717[3]);var moment=require(_0xf717[5]);var BPromise=require(_0xf717[6]);var rp=require(_0xf717[7]);var attributes=require(_0xf717[8]);var integrations=require(_0xf717[9]);module[_0xf717[10]]= function(_0x7357x9,_0x7357xa){return _0x7357x9[_0xf717[13]](_0xf717[11],attributes,{tableName:_0xf717[12],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index d326430..614542f 100644 (file)
@@ -1 +1 @@
-var _0x9d24=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x53\x68\x6F\x77\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x66\x69\x6E\x64"];_0x9d24[0];var _=require(_0x9d24[1]);var util=require(_0x9d24[2]);var moment=require(_0x9d24[3]);var BPromise=require(_0x9d24[4]);var rs=require(_0x9d24[5]);var fs=require(_0x9d24[6]);var db=require(_0x9d24[8])[_0x9d24[7]];var utils=require(_0x9d24[9]);var logger=require(_0x9d24[11])(_0x9d24[10]);var config=require(_0x9d24[12]);var jayson=require(_0x9d24[13]);var client=jayson[_0x9d24[15]][_0x9d24[14]]({port:9002});function respondWithRpcPromise(_0x9e6dxe,_0x9e6dxf,_0x9e6dx10){return  new BPromise(function(_0x9e6dx11,_0x9e6dx12){return client[_0x9d24[28]](_0x9e6dxe,_0x9e6dx10)[_0x9d24[27]](function(_0x9e6dx14){logger[_0x9d24[20]](_0x9d24[16],_0x9e6dxf,_0x9d24[19]);logger[_0x9d24[23]](_0x9d24[21],_0x9e6dxf,_0x9d24[19],JSON[_0x9d24[22]](_0x9e6dx14));if(_0x9e6dx14[_0x9d24[17]]){if(_0x9e6dx14[_0x9d24[17]][_0x9d24[24]]=== 500){logger[_0x9d24[17]](_0x9d24[16],_0x9e6dxf,_0x9e6dx14[_0x9d24[17]][_0x9d24[25]]);return _0x9e6dx12(_0x9e6dx14[_0x9d24[17]][_0x9d24[25]])};logger[_0x9d24[17]](_0x9d24[16],_0x9e6dxf,_0x9e6dx14[_0x9d24[17]][_0x9d24[25]]);return _0x9e6dx11(_0x9e6dx14[_0x9d24[17]][_0x9d24[25]])}else {logger[_0x9d24[20]](_0x9d24[16],_0x9e6dxf,_0x9d24[19]);_0x9e6dx11(_0x9e6dx14[_0x9d24[26]][_0x9d24[25]])}})[_0x9d24[18]](function(_0x9e6dx13){logger[_0x9d24[17]](_0x9d24[16],_0x9e6dxf,_0x9e6dx13);_0x9e6dx12(_0x9e6dx13)})})}exports[_0x9d24[29]]= function(_0x9e6dx10){var _0x9e6dx15=this;return  new Promise(function(_0x9e6dx11,_0x9e6dx12){return db[_0x9d24[40]][_0x9d24[39]]({raw:_0x9e6dx10[_0x9d24[30]]?(_0x9e6dx10[_0x9d24[30]][_0x9d24[31]]=== undefined)?true:false:true,where:_0x9e6dx10[_0x9d24[30]]?_0x9e6dx10[_0x9d24[30]][_0x9d24[32]]|| null:null,attributes:_0x9e6dx10[_0x9d24[30]]?_0x9e6dx10[_0x9d24[30]][_0x9d24[33]]|| null:null,limit:_0x9e6dx10[_0x9d24[30]]?_0x9e6dx10[_0x9d24[30]][_0x9d24[34]]|| null:null,include:_0x9e6dx10[_0x9d24[30]]?(_0x9e6dx10[_0x9d24[30]][_0x9d24[35]]?_[_0x9d24[38]](_0x9e6dx10[_0x9d24[30]][_0x9d24[35]],function(_0x9e6dx16){return {model:db[_0x9e6dx16[_0x9d24[36]]],as:_0x9e6dx16[_0x9d24[37]],attributes:_0x9e6dx16[_0x9d24[33]],include:_0x9e6dx16[_0x9d24[35]]?_[_0x9d24[38]](_0x9e6dx16[_0x9d24[35]],function(_0x9e6dx17){return {model:db[_0x9e6dx17[_0x9d24[36]]],as:_0x9e6dx17[_0x9d24[37]],attributes:_0x9e6dx17[_0x9d24[33]],include:_0x9e6dx17[_0x9d24[35]]?_[_0x9d24[38]](_0x9e6dx17[_0x9d24[35]],function(_0x9e6dx18){return {model:db[_0x9e6dx18[_0x9d24[36]]],as:_0x9e6dx18[_0x9d24[37]],attributes:_0x9e6dx18[_0x9d24[33]]}}):[]}}):[]}}):[]):[]})[_0x9d24[27]](function(_0x9e6dx14){logger[_0x9d24[20]](_0x9d24[29],_0x9e6dx10);logger[_0x9d24[23]](_0x9d24[29],_0x9e6dx10,JSON[_0x9d24[22]](_0x9e6dx14));_0x9e6dx11(_0x9e6dx14)})[_0x9d24[18]](function(_0x9e6dx13){logger[_0x9d24[17]](_0x9d24[29],_0x9e6dx13[_0x9d24[25]],_0x9e6dx10);_0x9e6dx12(_0x9e6dx15[_0x9d24[17]](500,_0x9e6dx13[_0x9d24[25]]))})})};exports[_0x9d24[41]]= function(_0x9e6dx10){var _0x9e6dx15=this;return  new Promise(function(_0x9e6dx11,_0x9e6dx12){return db[_0x9d24[40]][_0x9d24[42]]({raw:_0x9e6dx10[_0x9d24[30]]?(_0x9e6dx10[_0x9d24[30]][_0x9d24[31]]=== undefined)?true:false:true,where:_0x9e6dx10[_0x9d24[30]]?_0x9e6dx10[_0x9d24[30]][_0x9d24[32]]|| null:null,attributes:_0x9e6dx10[_0x9d24[30]]?_0x9e6dx10[_0x9d24[30]][_0x9d24[33]]|| null:null,include:_0x9e6dx10[_0x9d24[30]]?(_0x9e6dx10[_0x9d24[30]][_0x9d24[35]]?_[_0x9d24[38]](_0x9e6dx10[_0x9d24[30]][_0x9d24[35]],function(_0x9e6dx16){return {model:db[_0x9e6dx16[_0x9d24[36]]],as:_0x9e6dx16[_0x9d24[37]],attributes:_0x9e6dx16[_0x9d24[33]],include:_0x9e6dx16[_0x9d24[35]]?_[_0x9d24[38]](_0x9e6dx16[_0x9d24[35]],function(_0x9e6dx17){return {model:db[_0x9e6dx17[_0x9d24[36]]],as:_0x9e6dx17[_0x9d24[37]],attributes:_0x9e6dx17[_0x9d24[33]],include:_0x9e6dx17[_0x9d24[35]]?_[_0x9d24[38]](_0x9e6dx17[_0x9d24[35]],function(_0x9e6dx18){return {model:db[_0x9e6dx18[_0x9d24[36]]],as:_0x9e6dx18[_0x9d24[37]],attributes:_0x9e6dx18[_0x9d24[33]]}}):[]}}):[]}}):[]):[]})[_0x9d24[27]](function(_0x9e6dx14){logger[_0x9d24[20]](_0x9d24[41],_0x9e6dx10);logger[_0x9d24[23]](_0x9d24[41],_0x9e6dx10,JSON[_0x9d24[22]](_0x9e6dx14));_0x9e6dx11(_0x9e6dx14)})[_0x9d24[18]](function(_0x9e6dx13){logger[_0x9d24[17]](_0x9d24[41],_0x9e6dx13[_0x9d24[25]],_0x9e6dx10);_0x9e6dx12(_0x9e6dx15[_0x9d24[17]](500,_0x9e6dx13[_0x9d24[25]]))})})}
\ No newline at end of file
+var _0x2da8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x53\x68\x6F\x77\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x66\x69\x6E\x64"];_0x2da8[0];var _=require(_0x2da8[1]);var util=require(_0x2da8[2]);var moment=require(_0x2da8[3]);var BPromise=require(_0x2da8[4]);var rs=require(_0x2da8[5]);var fs=require(_0x2da8[6]);var db=require(_0x2da8[8])[_0x2da8[7]];var utils=require(_0x2da8[9]);var logger=require(_0x2da8[11])(_0x2da8[10]);var config=require(_0x2da8[12]);var jayson=require(_0x2da8[13]);var client=jayson[_0x2da8[15]][_0x2da8[14]]({port:9002});function respondWithRpcPromise(_0xf7f8xe,_0xf7f8xf,_0xf7f8x10){return  new BPromise(function(_0xf7f8x11,_0xf7f8x12){return client[_0x2da8[28]](_0xf7f8xe,_0xf7f8x10)[_0x2da8[27]](function(_0xf7f8x14){logger[_0x2da8[20]](_0x2da8[16],_0xf7f8xf,_0x2da8[19]);logger[_0x2da8[23]](_0x2da8[21],_0xf7f8xf,_0x2da8[19],JSON[_0x2da8[22]](_0xf7f8x14));if(_0xf7f8x14[_0x2da8[17]]){if(_0xf7f8x14[_0x2da8[17]][_0x2da8[24]]=== 500){logger[_0x2da8[17]](_0x2da8[16],_0xf7f8xf,_0xf7f8x14[_0x2da8[17]][_0x2da8[25]]);return _0xf7f8x12(_0xf7f8x14[_0x2da8[17]][_0x2da8[25]])};logger[_0x2da8[17]](_0x2da8[16],_0xf7f8xf,_0xf7f8x14[_0x2da8[17]][_0x2da8[25]]);return _0xf7f8x11(_0xf7f8x14[_0x2da8[17]][_0x2da8[25]])}else {logger[_0x2da8[20]](_0x2da8[16],_0xf7f8xf,_0x2da8[19]);_0xf7f8x11(_0xf7f8x14[_0x2da8[26]][_0x2da8[25]])}})[_0x2da8[18]](function(_0xf7f8x13){logger[_0x2da8[17]](_0x2da8[16],_0xf7f8xf,_0xf7f8x13);_0xf7f8x12(_0xf7f8x13)})})}exports[_0x2da8[29]]= function(_0xf7f8x10){var _0xf7f8x15=this;return  new Promise(function(_0xf7f8x11,_0xf7f8x12){return db[_0x2da8[40]][_0x2da8[39]]({raw:_0xf7f8x10[_0x2da8[30]]?(_0xf7f8x10[_0x2da8[30]][_0x2da8[31]]=== undefined)?true:false:true,where:_0xf7f8x10[_0x2da8[30]]?_0xf7f8x10[_0x2da8[30]][_0x2da8[32]]|| null:null,attributes:_0xf7f8x10[_0x2da8[30]]?_0xf7f8x10[_0x2da8[30]][_0x2da8[33]]|| null:null,limit:_0xf7f8x10[_0x2da8[30]]?_0xf7f8x10[_0x2da8[30]][_0x2da8[34]]|| null:null,include:_0xf7f8x10[_0x2da8[30]]?(_0xf7f8x10[_0x2da8[30]][_0x2da8[35]]?_[_0x2da8[38]](_0xf7f8x10[_0x2da8[30]][_0x2da8[35]],function(_0xf7f8x16){return {model:db[_0xf7f8x16[_0x2da8[36]]],as:_0xf7f8x16[_0x2da8[37]],attributes:_0xf7f8x16[_0x2da8[33]],include:_0xf7f8x16[_0x2da8[35]]?_[_0x2da8[38]](_0xf7f8x16[_0x2da8[35]],function(_0xf7f8x17){return {model:db[_0xf7f8x17[_0x2da8[36]]],as:_0xf7f8x17[_0x2da8[37]],attributes:_0xf7f8x17[_0x2da8[33]],include:_0xf7f8x17[_0x2da8[35]]?_[_0x2da8[38]](_0xf7f8x17[_0x2da8[35]],function(_0xf7f8x18){return {model:db[_0xf7f8x18[_0x2da8[36]]],as:_0xf7f8x18[_0x2da8[37]],attributes:_0xf7f8x18[_0x2da8[33]]}}):[]}}):[]}}):[]):[]})[_0x2da8[27]](function(_0xf7f8x14){logger[_0x2da8[20]](_0x2da8[29],_0xf7f8x10);logger[_0x2da8[23]](_0x2da8[29],_0xf7f8x10,JSON[_0x2da8[22]](_0xf7f8x14));_0xf7f8x11(_0xf7f8x14)})[_0x2da8[18]](function(_0xf7f8x13){logger[_0x2da8[17]](_0x2da8[29],_0xf7f8x13[_0x2da8[25]],_0xf7f8x10);_0xf7f8x12(_0xf7f8x15[_0x2da8[17]](500,_0xf7f8x13[_0x2da8[25]]))})})};exports[_0x2da8[41]]= function(_0xf7f8x10){var _0xf7f8x15=this;return  new Promise(function(_0xf7f8x11,_0xf7f8x12){return db[_0x2da8[40]][_0x2da8[42]]({raw:_0xf7f8x10[_0x2da8[30]]?(_0xf7f8x10[_0x2da8[30]][_0x2da8[31]]=== undefined)?true:false:true,where:_0xf7f8x10[_0x2da8[30]]?_0xf7f8x10[_0x2da8[30]][_0x2da8[32]]|| null:null,attributes:_0xf7f8x10[_0x2da8[30]]?_0xf7f8x10[_0x2da8[30]][_0x2da8[33]]|| null:null,include:_0xf7f8x10[_0x2da8[30]]?(_0xf7f8x10[_0x2da8[30]][_0x2da8[35]]?_[_0x2da8[38]](_0xf7f8x10[_0x2da8[30]][_0x2da8[35]],function(_0xf7f8x16){return {model:db[_0xf7f8x16[_0x2da8[36]]],as:_0xf7f8x16[_0x2da8[37]],attributes:_0xf7f8x16[_0x2da8[33]],include:_0xf7f8x16[_0x2da8[35]]?_[_0x2da8[38]](_0xf7f8x16[_0x2da8[35]],function(_0xf7f8x17){return {model:db[_0xf7f8x17[_0x2da8[36]]],as:_0xf7f8x17[_0x2da8[37]],attributes:_0xf7f8x17[_0x2da8[33]],include:_0xf7f8x17[_0x2da8[35]]?_[_0x2da8[38]](_0xf7f8x17[_0x2da8[35]],function(_0xf7f8x18){return {model:db[_0xf7f8x18[_0x2da8[36]]],as:_0xf7f8x18[_0x2da8[37]],attributes:_0xf7f8x18[_0x2da8[33]]}}):[]}}):[]}}):[]):[]})[_0x2da8[27]](function(_0xf7f8x14){logger[_0x2da8[20]](_0x2da8[41],_0xf7f8x10);logger[_0x2da8[23]](_0x2da8[41],_0xf7f8x10,JSON[_0x2da8[22]](_0xf7f8x14));_0xf7f8x11(_0xf7f8x14)})[_0x2da8[18]](function(_0xf7f8x13){logger[_0x2da8[17]](_0x2da8[41],_0xf7f8x13[_0x2da8[25]],_0xf7f8x10);_0xf7f8x12(_0xf7f8x15[_0x2da8[17]](500,_0xf7f8x13[_0x2da8[25]]))})})}
\ No newline at end of file
index 07d425a..1e134be 100644 (file)
@@ -1 +1 @@
-var _0xa042=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x73\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x2F\x3A\x69\x64\x2F\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x74\x61\x67\x73","\x67\x65\x74\x54\x61\x67\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x73\x65\x74\x54\x61\x67\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xa042[0];var multer=require(_0xa042[1]);var util=require(_0xa042[2]);var path=require(_0xa042[3]);var express=require(_0xa042[4]);var router=express.Router();var auth=require(_0xa042[5]);var interaction=require(_0xa042[6]);var config=require(_0xa042[7]);var controller=require(_0xa042[8]);router[_0xa042[12]](_0xa042[9],auth[_0xa042[10]](),controller[_0xa042[11]]);router[_0xa042[12]](_0xa042[13],auth[_0xa042[10]](),controller[_0xa042[14]]);router[_0xa042[12]](_0xa042[15],auth[_0xa042[10]](),controller[_0xa042[16]]);router[_0xa042[12]](_0xa042[17],auth[_0xa042[10]](),controller[_0xa042[18]]);router[_0xa042[12]](_0xa042[19],auth[_0xa042[10]](),controller[_0xa042[20]]);router[_0xa042[12]](_0xa042[21],auth[_0xa042[10]](),controller[_0xa042[22]]);router[_0xa042[24]](_0xa042[9],auth[_0xa042[10]](),controller[_0xa042[23]]);router[_0xa042[24]](_0xa042[21],auth[_0xa042[10]](),controller[_0xa042[25]]);router[_0xa042[27]](_0xa042[13],auth[_0xa042[10]](),controller[_0xa042[26]]);router[_0xa042[29]](_0xa042[13],auth[_0xa042[10]](),controller[_0xa042[28]]);module[_0xa042[30]]= router
\ No newline at end of file
+var _0x309b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x73\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x2F\x3A\x69\x64\x2F\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x74\x61\x67\x73","\x67\x65\x74\x54\x61\x67\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x73\x65\x74\x54\x61\x67\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x309b[0];var multer=require(_0x309b[1]);var util=require(_0x309b[2]);var path=require(_0x309b[3]);var express=require(_0x309b[4]);var router=express.Router();var auth=require(_0x309b[5]);var interaction=require(_0x309b[6]);var config=require(_0x309b[7]);var controller=require(_0x309b[8]);router[_0x309b[12]](_0x309b[9],auth[_0x309b[10]](),controller[_0x309b[11]]);router[_0x309b[12]](_0x309b[13],auth[_0x309b[10]](),controller[_0x309b[14]]);router[_0x309b[12]](_0x309b[15],auth[_0x309b[10]](),controller[_0x309b[16]]);router[_0x309b[12]](_0x309b[17],auth[_0x309b[10]](),controller[_0x309b[18]]);router[_0x309b[12]](_0x309b[19],auth[_0x309b[10]](),controller[_0x309b[20]]);router[_0x309b[12]](_0x309b[21],auth[_0x309b[10]](),controller[_0x309b[22]]);router[_0x309b[24]](_0x309b[9],auth[_0x309b[10]](),controller[_0x309b[23]]);router[_0x309b[24]](_0x309b[21],auth[_0x309b[10]](),controller[_0x309b[25]]);router[_0x309b[27]](_0x309b[13],auth[_0x309b[10]](),controller[_0x309b[26]]);router[_0x309b[29]](_0x309b[13],auth[_0x309b[10]](),controller[_0x309b[28]]);module[_0x309b[30]]= router
\ No newline at end of file
index c1f09fa..08d81ca 100644 (file)
@@ -1 +1 @@
-var _0x463b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0x463b[0];var Sequelize=require(_0x463b[1]);module[_0x463b[2]]= {name:{type:Sequelize[_0x463b[3]]},description:{type:Sequelize[_0x463b[3]]}}
\ No newline at end of file
+var _0xea39=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0xea39[0];var Sequelize=require(_0xea39[1]);module[_0xea39[2]]= {name:{type:Sequelize[_0xea39[3]]},description:{type:Sequelize[_0xea39[3]]}}
\ No newline at end of file
index 5df4874..7ac875e 100644 (file)
@@ -1 +1 @@
-var _0x534d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x54\x61\x67\x73","\x54\x61\x67","\x73\x65\x74\x54\x61\x67\x73","\x69\x64\x73"];_0x534d[0];var jsonpatch=require(_0x534d[1]);var rp=require(_0x534d[2]);var moment=require(_0x534d[3]);var BPromise=require(_0x534d[4]);var Mustache=require(_0x534d[5]);var util=require(_0x534d[6]);var path=require(_0x534d[7]);var sox=require(_0x534d[8]);var csv=require(_0x534d[9]);var ejs=require(_0x534d[10]);var fs=require(_0x534d[11]);var _=require(_0x534d[12]);var squel=require(_0x534d[13]);var crypto=require(_0x534d[14]);var jsforce=require(_0x534d[15]);var deskjs=require(_0x534d[16]);var toCsv=require(_0x534d[9]);var querystring=require(_0x534d[17]);var Papa=require(_0x534d[18]);var qs=require(_0x534d[19]);var logger=require(_0x534d[21])(_0x534d[20]);var utils=require(_0x534d[22]);var config=require(_0x534d[23]);var db=require(_0x534d[25])[_0x534d[24]];var jayson=require(_0x534d[26]);var client=jayson[_0x534d[28]][_0x534d[27]]({port:9002});function respondWithRpcPromise(_0x8ec5x1c,_0x8ec5x1d,_0x8ec5x1e,_0x8ec5x1f){return  new BPromise(function(_0x8ec5x20,_0x8ec5x21){var _0x8ec5x22=(_0x8ec5x1f|| client);return _0x8ec5x22[_0x534d[41]](_0x8ec5x1c,_0x8ec5x1e)[_0x534d[40]](function(_0x8ec5x24){logger[_0x534d[33]](_0x534d[29],_0x8ec5x1d,_0x534d[32]);logger[_0x534d[36]](_0x534d[34],_0x8ec5x1d,_0x534d[32],JSON[_0x534d[35]](_0x8ec5x24));if(_0x8ec5x24[_0x534d[30]]){if(_0x8ec5x24[_0x534d[30]][_0x534d[37]]=== 500){logger[_0x534d[30]](_0x534d[29],_0x8ec5x1d,_0x8ec5x24[_0x534d[30]][_0x534d[38]]);return _0x8ec5x21(_0x8ec5x24[_0x534d[30]][_0x534d[38]])};logger[_0x534d[30]](_0x534d[29],_0x8ec5x1d,_0x8ec5x24[_0x534d[30]][_0x534d[38]]);return _0x8ec5x20(_0x8ec5x24[_0x534d[30]][_0x534d[38]])}else {logger[_0x534d[33]](_0x534d[29],_0x8ec5x1d,_0x534d[32]);_0x8ec5x20(_0x8ec5x24[_0x534d[39]][_0x534d[38]])}})[_0x534d[31]](function(_0x8ec5x23){logger[_0x534d[30]](_0x534d[29],_0x8ec5x1d,_0x8ec5x23);_0x8ec5x21(_0x8ec5x23)})})}function respondWithStatusCode(_0x8ec5x24,_0x8ec5x26){_0x8ec5x26= _0x8ec5x26|| 204;return function(_0x8ec5x27){if(_0x8ec5x27){return _0x8ec5x24[_0x534d[42]](_0x8ec5x26)};return _0x8ec5x24[_0x534d[44]](_0x8ec5x26)[_0x534d[43]]()}}function respondWithResult(_0x8ec5x24,_0x8ec5x26){_0x8ec5x26= _0x8ec5x26|| 200;return function(_0x8ec5x27){if(_0x8ec5x27){return _0x8ec5x24[_0x534d[44]](_0x8ec5x26)[_0x534d[45]](_0x8ec5x27)}}}function respondWithFilteredResult(_0x8ec5x24,_0x8ec5x2a){return function(_0x8ec5x27){if(_0x8ec5x27){var _0x8ec5x2b=_0x8ec5x27[_0x534d[46]],_0x8ec5x2c=_0x8ec5x2a[_0x534d[47]],_0x8ec5x2d=_0x8ec5x2a[_0x534d[47]]+ _0x8ec5x2a[_0x534d[48]],_0x8ec5x26;if(_0x8ec5x2d>= _0x8ec5x2b){_0x8ec5x2d= _0x8ec5x2b;_0x8ec5x26= 200}else {_0x8ec5x26= 206};_0x8ec5x24[_0x534d[44]](_0x8ec5x26);return _0x8ec5x24[_0x534d[52]](_0x534d[49],_0x8ec5x2c+ _0x534d[50]+ _0x8ec5x2d+ _0x534d[51]+ _0x8ec5x2b)[_0x534d[45]](_0x8ec5x27)};return null}}function patchUpdates(_0x8ec5x2f){return function(_0x8ec5x27){try{jsonpatch[_0x534d[53]](_0x8ec5x27,_0x8ec5x2f,true)}catch(err){return BPromise[_0x534d[54]](err)};return _0x8ec5x27[_0x534d[55]]()}}function saveUpdates(_0x8ec5x31,_0x8ec5x26){return function(_0x8ec5x27){if(_0x8ec5x27){return _0x8ec5x27[_0x534d[56]](_0x8ec5x31)[_0x534d[40]](function(_0x8ec5x32){return _0x8ec5x32})};return null}}function removeEntity(_0x8ec5x24,_0x8ec5x26){return function(_0x8ec5x27){if(_0x8ec5x27){return _0x8ec5x27[_0x534d[57]]()[_0x534d[40]](function(){_0x8ec5x24[_0x534d[44]](204)[_0x534d[43]]()})}}}function handleEntityNotFound(_0x8ec5x24,_0x8ec5x26){return function(_0x8ec5x27){if(!_0x8ec5x27){_0x8ec5x24[_0x534d[42]](404)};return _0x8ec5x27}}function handleError(_0x8ec5x24,_0x8ec5x26){_0x8ec5x26= _0x8ec5x26|| 500;return function(_0x8ec5x23){logger[_0x534d[30]](_0x8ec5x23[_0x534d[58]]);if(_0x8ec5x23[_0x534d[59]]){delete _0x8ec5x23[_0x534d[59]]};_0x8ec5x24[_0x534d[44]](_0x8ec5x26)[_0x534d[60]](_0x8ec5x23)}}exports[_0x534d[61]]= function(_0x8ec5x1e,_0x8ec5x24){var _0x8ec5x2a={},_0x8ec5x36={},_0x8ec5x37={count:0,rows:[]};_0x8ec5x36[_0x534d[62]]= _[_0x534d[65]](db[_0x534d[64]][_0x534d[63]]);var _0x8ec5x38={dateStart:_0x8ec5x1e[_0x534d[67]][_0x534d[66]],dateEnd:_0x8ec5x1e[_0x534d[67]][_0x534d[68]]};delete _0x8ec5x1e[_0x534d[67]][_0x534d[66]];delete _0x8ec5x1e[_0x534d[67]][_0x534d[68]];_0x8ec5x36[_0x534d[67]]= _[_0x534d[65]](_0x8ec5x1e[_0x534d[67]]);_0x8ec5x36[_0x534d[69]]= _[_0x534d[70]](_0x8ec5x36[_0x534d[62]],_0x8ec5x36[_0x534d[67]]);_0x8ec5x2a[_0x534d[71]]= _[_0x534d[70]](_0x8ec5x36[_0x534d[62]],qs[_0x534d[72]](_0x8ec5x1e[_0x534d[67]][_0x534d[72]]));_0x8ec5x2a[_0x534d[71]]= (_0x8ec5x2a[_0x534d[71]][_0x534d[73]])?_0x8ec5x2a[_0x534d[71]]:_0x8ec5x36[_0x534d[62]];if(!_0x8ec5x1e[_0x534d[67]][_0x534d[75]](_0x534d[74])){_0x8ec5x2a[_0x534d[48]]= qs[_0x534d[48]](_0x8ec5x1e[_0x534d[67]][_0x534d[48]]);_0x8ec5x2a[_0x534d[47]]= qs[_0x534d[47]](_0x8ec5x1e[_0x534d[67]][_0x534d[47]])};_0x8ec5x2a[_0x534d[76]]= qs[_0x534d[77]](_0x8ec5x1e[_0x534d[67]][_0x534d[77]]);_0x8ec5x2a[_0x534d[78]]= qs[_0x534d[69]](_[_0x534d[79]](_0x8ec5x1e[_0x534d[67]],_0x8ec5x36[_0x534d[69]]));if(_0x8ec5x38[_0x534d[66]]){if(_0x8ec5x38[_0x534d[68]]){_0x8ec5x38[_0x534d[68]]= moment(_0x8ec5x38[_0x534d[68]])[_0x534d[81]](1,_0x534d[80])}else {_0x8ec5x38[_0x534d[68]]= moment(_0x8ec5x38[_0x534d[66]])[_0x534d[81]](1,_0x534d[80])};_[_0x534d[82]](_0x8ec5x2a[_0x534d[78]],{createdAt:{$gte:_0x8ec5x38[_0x534d[66]],$lte:_0x8ec5x38[_0x534d[68]]}})};if(_0x8ec5x1e[_0x534d[67]][_0x534d[83]]){_0x8ec5x2a[_0x534d[78]]= _[_0x534d[82]](_0x8ec5x2a[_0x534d[78]],{$or:_[_0x534d[85]](_0x8ec5x2a[_0x534d[71]],function(_0x8ec5x39){var _0x8ec5x37={};_0x8ec5x37[_0x8ec5x39]= {$like:_0x534d[84]+ _0x8ec5x1e[_0x534d[67]][_0x534d[83]]+ _0x534d[84]};return _0x8ec5x37})})};_0x8ec5x2a= _[_0x534d[82]]({},_0x8ec5x2a,_0x8ec5x1e[_0x534d[86]]);var _0x8ec5x3a={where:_0x8ec5x2a[_0x534d[78]]};return db[_0x534d[64]][_0x534d[46]](_0x8ec5x3a)[_0x534d[40]](function(_0x8ec5x2b){_0x8ec5x37[_0x534d[46]]= _0x8ec5x2b;if(_0x8ec5x1e[_0x534d[67]][_0x534d[88]]){_0x8ec5x2a[_0x534d[89]]= [{all:true}]};return db[_0x534d[64]][_0x534d[90]](_0x8ec5x2a)})[_0x534d[40]](function(_0x8ec5x3b){_0x8ec5x37[_0x534d[87]]= _0x8ec5x3b;return _0x8ec5x37})[_0x534d[40]](respondWithFilteredResult(_0x8ec5x24,_0x8ec5x2a))[_0x534d[31]](handleError(_0x8ec5x24,null))};exports[_0x534d[91]]= function(_0x8ec5x1e,_0x8ec5x24){var _0x8ec5x2a={raw:false,where:{id:_0x8ec5x1e[_0x534d[93]][_0x534d[92]]}},_0x8ec5x36={};_0x8ec5x36[_0x534d[62]]= _[_0x534d[65]](db[_0x534d[64]][_0x534d[63]]);_0x8ec5x36[_0x534d[67]]= _[_0x534d[65]](_0x8ec5x1e[_0x534d[67]]);_0x8ec5x36[_0x534d[69]]= _[_0x534d[70]](_0x8ec5x36[_0x534d[62]],_0x8ec5x36[_0x534d[67]]);_0x8ec5x2a[_0x534d[71]]= _[_0x534d[70]](_0x8ec5x36[_0x534d[62]],qs[_0x534d[72]](_0x8ec5x1e[_0x534d[67]][_0x534d[72]]));_0x8ec5x2a[_0x534d[71]]= (_0x8ec5x2a[_0x534d[71]][_0x534d[73]])?_0x8ec5x2a[_0x534d[71]]:_0x8ec5x36[_0x534d[62]];if(_0x8ec5x1e[_0x534d[67]][_0x534d[88]]){_0x8ec5x2a[_0x534d[89]]= [{all:true}]};_0x8ec5x2a= _[_0x534d[82]]({},_0x8ec5x2a,_0x8ec5x1e[_0x534d[86]]);return db[_0x534d[64]][_0x534d[94]](_0x8ec5x2a)[_0x534d[40]](handleEntityNotFound(_0x8ec5x24,null))[_0x534d[40]](respondWithResult(_0x8ec5x24,null))[_0x534d[31]](handleError(_0x8ec5x24,null))};exports[_0x534d[95]]= function(_0x8ec5x1e,_0x8ec5x24){return db[_0x534d[64]][_0x534d[95]](_0x8ec5x1e[_0x534d[96]],{})[_0x534d[40]](respondWithResult(_0x8ec5x24,201))[_0x534d[31]](handleError(_0x8ec5x24,null))};exports[_0x534d[56]]= function(_0x8ec5x1e,_0x8ec5x24){if(_0x8ec5x1e[_0x534d[96]][_0x534d[92]]){delete _0x8ec5x1e[_0x534d[96]][_0x534d[92]]};return db[_0x534d[64]][_0x534d[94]]({where:{id:_0x8ec5x1e[_0x534d[93]][_0x534d[92]]}})[_0x534d[40]](handleEntityNotFound(_0x8ec5x24,null))[_0x534d[40]](saveUpdates(_0x8ec5x1e[_0x534d[96]],null))[_0x534d[40]](respondWithResult(_0x8ec5x24,null))[_0x534d[31]](handleError(_0x8ec5x24,null))};exports[_0x534d[57]]= function(_0x8ec5x1e,_0x8ec5x24){return db[_0x534d[64]][_0x534d[94]]({where:{id:_0x8ec5x1e[_0x534d[93]][_0x534d[92]]}})[_0x534d[40]](handleEntityNotFound(_0x8ec5x24,null))[_0x534d[40]](removeEntity(_0x8ec5x24,null))[_0x534d[31]](handleError(_0x8ec5x24,null))};exports[_0x534d[97]]= function(_0x8ec5x1e,_0x8ec5x27,_0x8ec5x3c){var _0x8ec5x2a={};var _0x8ec5x36={};var _0x8ec5x3d;var _0x8ec5x2b;return db[_0x534d[64]][_0x534d[99]]({where:{id:_0x8ec5x1e[_0x534d[93]][_0x534d[92]]}})[_0x534d[40]](handleEntityNotFound(_0x8ec5x27,null))[_0x534d[40]](function(_0x8ec5x27){if(_0x8ec5x27){_0x8ec5x3d= _0x8ec5x27;_0x8ec5x36[_0x534d[62]]= _[_0x534d[65]](db[_0x534d[98]][_0x534d[63]]);_0x8ec5x36[_0x534d[67]]= _[_0x534d[65]](_0x8ec5x1e[_0x534d[67]]);_0x8ec5x36[_0x534d[69]]= _[_0x534d[70]](_0x8ec5x36[_0x534d[62]],_0x8ec5x36[_0x534d[67]]);_0x8ec5x2a[_0x534d[71]]= _[_0x534d[70]](_0x8ec5x36[_0x534d[62]],qs[_0x534d[72]](_0x8ec5x1e[_0x534d[67]][_0x534d[72]]));_0x8ec5x2a[_0x534d[71]]= (_0x8ec5x2a[_0x534d[71]][_0x534d[73]])?_0x8ec5x2a[_0x534d[71]]:_0x8ec5x36[_0x534d[62]];_0x8ec5x2a[_0x534d[76]]= qs[_0x534d[77]](_0x8ec5x1e[_0x534d[67]][_0x534d[77]]);_0x8ec5x2a[_0x534d[78]]= qs[_0x534d[69]](_[_0x534d[79]](_0x8ec5x1e[_0x534d[67]],_0x8ec5x36[_0x534d[69]]));if(_0x8ec5x1e[_0x534d[67]][_0x534d[83]]){_0x8ec5x2a[_0x534d[78]]= _[_0x534d[82]](_0x8ec5x2a[_0x534d[78]],{$or:_[_0x534d[85]](_0x8ec5x2a[_0x534d[71]],function(_0x8ec5x39){var _0x8ec5x37={};_0x8ec5x37[_0x8ec5x39]= {$like:_0x534d[84]+ _0x8ec5x1e[_0x534d[67]][_0x534d[83]]+ _0x534d[84]};return _0x8ec5x37})})};_0x8ec5x2a= _[_0x534d[82]]({},_0x8ec5x2a,_0x8ec5x1e[_0x534d[86]]);return _0x8ec5x3d[_0x534d[97]](_0x8ec5x2a)}})[_0x534d[40]](function(_0x8ec5x3e){if(_0x8ec5x3e){_0x8ec5x2b= _0x8ec5x3e[_0x534d[73]];if(!_0x8ec5x1e[_0x534d[67]][_0x534d[75]](_0x534d[74])){_0x8ec5x2a[_0x534d[48]]= qs[_0x534d[48]](_0x8ec5x1e[_0x534d[67]][_0x534d[48]]);_0x8ec5x2a[_0x534d[47]]= qs[_0x534d[47]](_0x8ec5x1e[_0x534d[67]][_0x534d[47]])};return _0x8ec5x3d[_0x534d[97]](_0x8ec5x2a)}})[_0x534d[40]](function(_0x8ec5x3b){if(_0x8ec5x3b){return _0x8ec5x3b?{count:_0x8ec5x2b,rows:_0x8ec5x3b}:null}})[_0x534d[40]](respondWithResult(_0x8ec5x27,null))[_0x534d[31]](handleError(_0x8ec5x27,null))};exports[_0x534d[100]]= function(_0x8ec5x1e,_0x8ec5x27,_0x8ec5x3c){var _0x8ec5x2a={};var _0x8ec5x36={};var _0x8ec5x3d;var _0x8ec5x2b;return db[_0x534d[64]][_0x534d[99]]({where:{id:_0x8ec5x1e[_0x534d[93]][_0x534d[92]]}})[_0x534d[40]](handleEntityNotFound(_0x8ec5x27,null))[_0x534d[40]](function(_0x8ec5x27){if(_0x8ec5x27){_0x8ec5x3d= _0x8ec5x27;_0x8ec5x36[_0x534d[62]]= _[_0x534d[65]](db[_0x534d[98]][_0x534d[63]]);_0x8ec5x36[_0x534d[67]]= _[_0x534d[65]](_0x8ec5x1e[_0x534d[67]]);_0x8ec5x36[_0x534d[69]]= _[_0x534d[70]](_0x8ec5x36[_0x534d[62]],_0x8ec5x36[_0x534d[67]]);_0x8ec5x2a[_0x534d[71]]= _[_0x534d[70]](_0x8ec5x36[_0x534d[62]],qs[_0x534d[72]](_0x8ec5x1e[_0x534d[67]][_0x534d[72]]));_0x8ec5x2a[_0x534d[71]]= (_0x8ec5x2a[_0x534d[71]][_0x534d[73]])?_0x8ec5x2a[_0x534d[71]]:_0x8ec5x36[_0x534d[62]];_0x8ec5x2a[_0x534d[76]]= qs[_0x534d[77]](_0x8ec5x1e[_0x534d[67]][_0x534d[77]]);_0x8ec5x2a[_0x534d[78]]= qs[_0x534d[69]](_[_0x534d[79]](_0x8ec5x1e[_0x534d[67]],_0x8ec5x36[_0x534d[69]]));if(_0x8ec5x1e[_0x534d[67]][_0x534d[83]]){_0x8ec5x2a[_0x534d[78]]= _[_0x534d[82]](_0x8ec5x2a[_0x534d[78]],{$or:_[_0x534d[85]](_0x8ec5x2a[_0x534d[71]],function(_0x8ec5x39){var _0x8ec5x37={};_0x8ec5x37[_0x8ec5x39]= {$like:_0x534d[84]+ _0x8ec5x1e[_0x534d[67]][_0x534d[83]]+ _0x534d[84]};return _0x8ec5x37})})};_0x8ec5x2a= _[_0x534d[82]]({},_0x8ec5x2a,_0x8ec5x1e[_0x534d[86]]);return _0x8ec5x3d[_0x534d[100]](_0x8ec5x2a)}})[_0x534d[40]](function(_0x8ec5x3e){if(_0x8ec5x3e){_0x8ec5x2b= _0x8ec5x3e[_0x534d[73]];if(!_0x8ec5x1e[_0x534d[67]][_0x534d[75]](_0x534d[74])){_0x8ec5x2a[_0x534d[48]]= qs[_0x534d[48]](_0x8ec5x1e[_0x534d[67]][_0x534d[48]]);_0x8ec5x2a[_0x534d[47]]= qs[_0x534d[47]](_0x8ec5x1e[_0x534d[67]][_0x534d[47]])};return _0x8ec5x3d[_0x534d[100]](_0x8ec5x2a)}})[_0x534d[40]](function(_0x8ec5x3b){if(_0x8ec5x3b){return _0x8ec5x3b?{count:_0x8ec5x2b,rows:_0x8ec5x3b}:null}})[_0x534d[40]](respondWithResult(_0x8ec5x27,null))[_0x534d[31]](handleError(_0x8ec5x27,null))};exports[_0x534d[101]]= function(_0x8ec5x1e,_0x8ec5x27,_0x8ec5x3c){var _0x8ec5x2a={};var _0x8ec5x36={};var _0x8ec5x3d;var _0x8ec5x2b;return db[_0x534d[64]][_0x534d[99]]({where:{id:_0x8ec5x1e[_0x534d[93]][_0x534d[92]]}})[_0x534d[40]](handleEntityNotFound(_0x8ec5x27,null))[_0x534d[40]](function(_0x8ec5x27){if(_0x8ec5x27){_0x8ec5x3d= _0x8ec5x27;_0x8ec5x36[_0x534d[62]]= _[_0x534d[65]](db[_0x534d[98]][_0x534d[63]]);_0x8ec5x36[_0x534d[67]]= _[_0x534d[65]](_0x8ec5x1e[_0x534d[67]]);_0x8ec5x36[_0x534d[69]]= _[_0x534d[70]](_0x8ec5x36[_0x534d[62]],_0x8ec5x36[_0x534d[67]]);_0x8ec5x2a[_0x534d[71]]= _[_0x534d[70]](_0x8ec5x36[_0x534d[62]],qs[_0x534d[72]](_0x8ec5x1e[_0x534d[67]][_0x534d[72]]));_0x8ec5x2a[_0x534d[71]]= (_0x8ec5x2a[_0x534d[71]][_0x534d[73]])?_0x8ec5x2a[_0x534d[71]]:_0x8ec5x36[_0x534d[62]];_0x8ec5x2a[_0x534d[76]]= qs[_0x534d[77]](_0x8ec5x1e[_0x534d[67]][_0x534d[77]]);_0x8ec5x2a[_0x534d[78]]= qs[_0x534d[69]](_[_0x534d[79]](_0x8ec5x1e[_0x534d[67]],_0x8ec5x36[_0x534d[69]]));if(_0x8ec5x1e[_0x534d[67]][_0x534d[83]]){_0x8ec5x2a[_0x534d[78]]= _[_0x534d[82]](_0x8ec5x2a[_0x534d[78]],{$or:_[_0x534d[85]](_0x8ec5x2a[_0x534d[71]],function(_0x8ec5x39){var _0x8ec5x37={};_0x8ec5x37[_0x8ec5x39]= {$like:_0x534d[84]+ _0x8ec5x1e[_0x534d[67]][_0x534d[83]]+ _0x534d[84]};return _0x8ec5x37})})};_0x8ec5x2a= _[_0x534d[82]]({},_0x8ec5x2a,_0x8ec5x1e[_0x534d[86]]);return _0x8ec5x3d[_0x534d[101]](_0x8ec5x2a)}})[_0x534d[40]](function(_0x8ec5x3e){if(_0x8ec5x3e){_0x8ec5x2b= _0x8ec5x3e[_0x534d[73]];if(!_0x8ec5x1e[_0x534d[67]][_0x534d[75]](_0x534d[74])){_0x8ec5x2a[_0x534d[48]]= qs[_0x534d[48]](_0x8ec5x1e[_0x534d[67]][_0x534d[48]]);_0x8ec5x2a[_0x534d[47]]= qs[_0x534d[47]](_0x8ec5x1e[_0x534d[67]][_0x534d[47]])};return _0x8ec5x3d[_0x534d[101]](_0x8ec5x2a)}})[_0x534d[40]](function(_0x8ec5x3b){if(_0x8ec5x3b){return _0x8ec5x3b?{count:_0x8ec5x2b,rows:_0x8ec5x3b}:null}})[_0x534d[40]](respondWithResult(_0x8ec5x27,null))[_0x534d[31]](handleError(_0x8ec5x27,null))};exports[_0x534d[102]]= function(_0x8ec5x1e,_0x8ec5x27,_0x8ec5x3c){var _0x8ec5x2a={};var _0x8ec5x36={};var _0x8ec5x3d;var _0x8ec5x2b;return db[_0x534d[64]][_0x534d[99]]({where:{id:_0x8ec5x1e[_0x534d[93]][_0x534d[92]]}})[_0x534d[40]](handleEntityNotFound(_0x8ec5x27,null))[_0x534d[40]](function(_0x8ec5x27){if(_0x8ec5x27){_0x8ec5x3d= _0x8ec5x27;_0x8ec5x36[_0x534d[62]]= _[_0x534d[65]](db[_0x534d[103]][_0x534d[63]]);_0x8ec5x36[_0x534d[67]]= _[_0x534d[65]](_0x8ec5x1e[_0x534d[67]]);_0x8ec5x36[_0x534d[69]]= _[_0x534d[70]](_0x8ec5x36[_0x534d[62]],_0x8ec5x36[_0x534d[67]]);_0x8ec5x2a[_0x534d[71]]= _[_0x534d[70]](_0x8ec5x36[_0x534d[62]],qs[_0x534d[72]](_0x8ec5x1e[_0x534d[67]][_0x534d[72]]));_0x8ec5x2a[_0x534d[71]]= (_0x8ec5x2a[_0x534d[71]][_0x534d[73]])?_0x8ec5x2a[_0x534d[71]]:_0x8ec5x36[_0x534d[62]];_0x8ec5x2a[_0x534d[76]]= qs[_0x534d[77]](_0x8ec5x1e[_0x534d[67]][_0x534d[77]]);_0x8ec5x2a[_0x534d[78]]= qs[_0x534d[69]](_[_0x534d[79]](_0x8ec5x1e[_0x534d[67]],_0x8ec5x36[_0x534d[69]]));if(_0x8ec5x1e[_0x534d[67]][_0x534d[83]]){_0x8ec5x2a[_0x534d[78]]= _[_0x534d[82]](_0x8ec5x2a[_0x534d[78]],{$or:_[_0x534d[85]](_0x8ec5x2a[_0x534d[71]],function(_0x8ec5x39){var _0x8ec5x37={};_0x8ec5x37[_0x8ec5x39]= {$like:_0x534d[84]+ _0x8ec5x1e[_0x534d[67]][_0x534d[83]]+ _0x534d[84]};return _0x8ec5x37})})};_0x8ec5x2a= _[_0x534d[82]]({},_0x8ec5x2a,_0x8ec5x1e[_0x534d[86]]);return _0x8ec5x3d[_0x534d[102]](_0x8ec5x2a)}})[_0x534d[40]](function(_0x8ec5x3e){if(_0x8ec5x3e){_0x8ec5x2b= _0x8ec5x3e[_0x534d[73]];if(!_0x8ec5x1e[_0x534d[67]][_0x534d[75]](_0x534d[74])){_0x8ec5x2a[_0x534d[48]]= qs[_0x534d[48]](_0x8ec5x1e[_0x534d[67]][_0x534d[48]]);_0x8ec5x2a[_0x534d[47]]= qs[_0x534d[47]](_0x8ec5x1e[_0x534d[67]][_0x534d[47]])};return _0x8ec5x3d[_0x534d[102]](_0x8ec5x2a)}})[_0x534d[40]](function(_0x8ec5x3b){if(_0x8ec5x3b){return _0x8ec5x3b?{count:_0x8ec5x2b,rows:_0x8ec5x3b}:null}})[_0x534d[40]](respondWithResult(_0x8ec5x27,null))[_0x534d[31]](handleError(_0x8ec5x27,null))};exports[_0x534d[104]]= function(_0x8ec5x1e,_0x8ec5x24,_0x8ec5x3c){if(_0x8ec5x1e[_0x534d[96]][_0x534d[92]]){delete _0x8ec5x1e[_0x534d[96]][_0x534d[92]]};return db[_0x534d[64]][_0x534d[99]]({where:{id:_0x8ec5x1e[_0x534d[93]][_0x534d[92]]}})[_0x534d[40]](handleEntityNotFound(_0x8ec5x24,null))[_0x534d[40]](function(_0x8ec5x27){if(_0x8ec5x27){return _0x8ec5x27[_0x534d[104]](_0x8ec5x1e[_0x534d[96]][_0x534d[105]])};return null})[_0x534d[40]](respondWithResult(_0x8ec5x24,null))[_0x534d[31]](handleError(_0x8ec5x24,null))}
\ No newline at end of file
+var _0xa2eb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x54\x61\x67\x73","\x54\x61\x67","\x73\x65\x74\x54\x61\x67\x73","\x69\x64\x73"];_0xa2eb[0];var jsonpatch=require(_0xa2eb[1]);var rp=require(_0xa2eb[2]);var moment=require(_0xa2eb[3]);var BPromise=require(_0xa2eb[4]);var Mustache=require(_0xa2eb[5]);var util=require(_0xa2eb[6]);var path=require(_0xa2eb[7]);var sox=require(_0xa2eb[8]);var csv=require(_0xa2eb[9]);var ejs=require(_0xa2eb[10]);var fs=require(_0xa2eb[11]);var _=require(_0xa2eb[12]);var squel=require(_0xa2eb[13]);var crypto=require(_0xa2eb[14]);var jsforce=require(_0xa2eb[15]);var deskjs=require(_0xa2eb[16]);var toCsv=require(_0xa2eb[9]);var querystring=require(_0xa2eb[17]);var Papa=require(_0xa2eb[18]);var qs=require(_0xa2eb[19]);var logger=require(_0xa2eb[21])(_0xa2eb[20]);var utils=require(_0xa2eb[22]);var config=require(_0xa2eb[23]);var db=require(_0xa2eb[25])[_0xa2eb[24]];var jayson=require(_0xa2eb[26]);var client=jayson[_0xa2eb[28]][_0xa2eb[27]]({port:9002});function respondWithRpcPromise(_0x3af0x1c,_0x3af0x1d,_0x3af0x1e,_0x3af0x1f){return  new BPromise(function(_0x3af0x20,_0x3af0x21){var _0x3af0x22=(_0x3af0x1f|| client);return _0x3af0x22[_0xa2eb[41]](_0x3af0x1c,_0x3af0x1e)[_0xa2eb[40]](function(_0x3af0x24){logger[_0xa2eb[33]](_0xa2eb[29],_0x3af0x1d,_0xa2eb[32]);logger[_0xa2eb[36]](_0xa2eb[34],_0x3af0x1d,_0xa2eb[32],JSON[_0xa2eb[35]](_0x3af0x24));if(_0x3af0x24[_0xa2eb[30]]){if(_0x3af0x24[_0xa2eb[30]][_0xa2eb[37]]=== 500){logger[_0xa2eb[30]](_0xa2eb[29],_0x3af0x1d,_0x3af0x24[_0xa2eb[30]][_0xa2eb[38]]);return _0x3af0x21(_0x3af0x24[_0xa2eb[30]][_0xa2eb[38]])};logger[_0xa2eb[30]](_0xa2eb[29],_0x3af0x1d,_0x3af0x24[_0xa2eb[30]][_0xa2eb[38]]);return _0x3af0x20(_0x3af0x24[_0xa2eb[30]][_0xa2eb[38]])}else {logger[_0xa2eb[33]](_0xa2eb[29],_0x3af0x1d,_0xa2eb[32]);_0x3af0x20(_0x3af0x24[_0xa2eb[39]][_0xa2eb[38]])}})[_0xa2eb[31]](function(_0x3af0x23){logger[_0xa2eb[30]](_0xa2eb[29],_0x3af0x1d,_0x3af0x23);_0x3af0x21(_0x3af0x23)})})}function respondWithStatusCode(_0x3af0x24,_0x3af0x26){_0x3af0x26= _0x3af0x26|| 204;return function(_0x3af0x27){if(_0x3af0x27){return _0x3af0x24[_0xa2eb[42]](_0x3af0x26)};return _0x3af0x24[_0xa2eb[44]](_0x3af0x26)[_0xa2eb[43]]()}}function respondWithResult(_0x3af0x24,_0x3af0x26){_0x3af0x26= _0x3af0x26|| 200;return function(_0x3af0x27){if(_0x3af0x27){return _0x3af0x24[_0xa2eb[44]](_0x3af0x26)[_0xa2eb[45]](_0x3af0x27)}}}function respondWithFilteredResult(_0x3af0x24,_0x3af0x2a){return function(_0x3af0x27){if(_0x3af0x27){var _0x3af0x2b=_0x3af0x27[_0xa2eb[46]],_0x3af0x2c=_0x3af0x2a[_0xa2eb[47]],_0x3af0x2d=_0x3af0x2a[_0xa2eb[47]]+ _0x3af0x2a[_0xa2eb[48]],_0x3af0x26;if(_0x3af0x2d>= _0x3af0x2b){_0x3af0x2d= _0x3af0x2b;_0x3af0x26= 200}else {_0x3af0x26= 206};_0x3af0x24[_0xa2eb[44]](_0x3af0x26);return _0x3af0x24[_0xa2eb[52]](_0xa2eb[49],_0x3af0x2c+ _0xa2eb[50]+ _0x3af0x2d+ _0xa2eb[51]+ _0x3af0x2b)[_0xa2eb[45]](_0x3af0x27)};return null}}function patchUpdates(_0x3af0x2f){return function(_0x3af0x27){try{jsonpatch[_0xa2eb[53]](_0x3af0x27,_0x3af0x2f,true)}catch(err){return BPromise[_0xa2eb[54]](err)};return _0x3af0x27[_0xa2eb[55]]()}}function saveUpdates(_0x3af0x31,_0x3af0x26){return function(_0x3af0x27){if(_0x3af0x27){return _0x3af0x27[_0xa2eb[56]](_0x3af0x31)[_0xa2eb[40]](function(_0x3af0x32){return _0x3af0x32})};return null}}function removeEntity(_0x3af0x24,_0x3af0x26){return function(_0x3af0x27){if(_0x3af0x27){return _0x3af0x27[_0xa2eb[57]]()[_0xa2eb[40]](function(){_0x3af0x24[_0xa2eb[44]](204)[_0xa2eb[43]]()})}}}function handleEntityNotFound(_0x3af0x24,_0x3af0x26){return function(_0x3af0x27){if(!_0x3af0x27){_0x3af0x24[_0xa2eb[42]](404)};return _0x3af0x27}}function handleError(_0x3af0x24,_0x3af0x26){_0x3af0x26= _0x3af0x26|| 500;return function(_0x3af0x23){logger[_0xa2eb[30]](_0x3af0x23[_0xa2eb[58]]);if(_0x3af0x23[_0xa2eb[59]]){delete _0x3af0x23[_0xa2eb[59]]};_0x3af0x24[_0xa2eb[44]](_0x3af0x26)[_0xa2eb[60]](_0x3af0x23)}}exports[_0xa2eb[61]]= function(_0x3af0x1e,_0x3af0x24){var _0x3af0x2a={},_0x3af0x36={},_0x3af0x37={count:0,rows:[]};_0x3af0x36[_0xa2eb[62]]= _[_0xa2eb[65]](db[_0xa2eb[64]][_0xa2eb[63]]);var _0x3af0x38={dateStart:_0x3af0x1e[_0xa2eb[67]][_0xa2eb[66]],dateEnd:_0x3af0x1e[_0xa2eb[67]][_0xa2eb[68]]};delete _0x3af0x1e[_0xa2eb[67]][_0xa2eb[66]];delete _0x3af0x1e[_0xa2eb[67]][_0xa2eb[68]];_0x3af0x36[_0xa2eb[67]]= _[_0xa2eb[65]](_0x3af0x1e[_0xa2eb[67]]);_0x3af0x36[_0xa2eb[69]]= _[_0xa2eb[70]](_0x3af0x36[_0xa2eb[62]],_0x3af0x36[_0xa2eb[67]]);_0x3af0x2a[_0xa2eb[71]]= _[_0xa2eb[70]](_0x3af0x36[_0xa2eb[62]],qs[_0xa2eb[72]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[72]]));_0x3af0x2a[_0xa2eb[71]]= (_0x3af0x2a[_0xa2eb[71]][_0xa2eb[73]])?_0x3af0x2a[_0xa2eb[71]]:_0x3af0x36[_0xa2eb[62]];if(!_0x3af0x1e[_0xa2eb[67]][_0xa2eb[75]](_0xa2eb[74])){_0x3af0x2a[_0xa2eb[48]]= qs[_0xa2eb[48]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[48]]);_0x3af0x2a[_0xa2eb[47]]= qs[_0xa2eb[47]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[47]])};_0x3af0x2a[_0xa2eb[76]]= qs[_0xa2eb[77]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[77]]);_0x3af0x2a[_0xa2eb[78]]= qs[_0xa2eb[69]](_[_0xa2eb[79]](_0x3af0x1e[_0xa2eb[67]],_0x3af0x36[_0xa2eb[69]]));if(_0x3af0x38[_0xa2eb[66]]){if(_0x3af0x38[_0xa2eb[68]]){_0x3af0x38[_0xa2eb[68]]= moment(_0x3af0x38[_0xa2eb[68]])[_0xa2eb[81]](1,_0xa2eb[80])}else {_0x3af0x38[_0xa2eb[68]]= moment(_0x3af0x38[_0xa2eb[66]])[_0xa2eb[81]](1,_0xa2eb[80])};_[_0xa2eb[82]](_0x3af0x2a[_0xa2eb[78]],{createdAt:{$gte:_0x3af0x38[_0xa2eb[66]],$lte:_0x3af0x38[_0xa2eb[68]]}})};if(_0x3af0x1e[_0xa2eb[67]][_0xa2eb[83]]){_0x3af0x2a[_0xa2eb[78]]= _[_0xa2eb[82]](_0x3af0x2a[_0xa2eb[78]],{$or:_[_0xa2eb[85]](_0x3af0x2a[_0xa2eb[71]],function(_0x3af0x39){var _0x3af0x37={};_0x3af0x37[_0x3af0x39]= {$like:_0xa2eb[84]+ _0x3af0x1e[_0xa2eb[67]][_0xa2eb[83]]+ _0xa2eb[84]};return _0x3af0x37})})};_0x3af0x2a= _[_0xa2eb[82]]({},_0x3af0x2a,_0x3af0x1e[_0xa2eb[86]]);var _0x3af0x3a={where:_0x3af0x2a[_0xa2eb[78]]};return db[_0xa2eb[64]][_0xa2eb[46]](_0x3af0x3a)[_0xa2eb[40]](function(_0x3af0x2b){_0x3af0x37[_0xa2eb[46]]= _0x3af0x2b;if(_0x3af0x1e[_0xa2eb[67]][_0xa2eb[88]]){_0x3af0x2a[_0xa2eb[89]]= [{all:true}]};return db[_0xa2eb[64]][_0xa2eb[90]](_0x3af0x2a)})[_0xa2eb[40]](function(_0x3af0x3b){_0x3af0x37[_0xa2eb[87]]= _0x3af0x3b;return _0x3af0x37})[_0xa2eb[40]](respondWithFilteredResult(_0x3af0x24,_0x3af0x2a))[_0xa2eb[31]](handleError(_0x3af0x24,null))};exports[_0xa2eb[91]]= function(_0x3af0x1e,_0x3af0x24){var _0x3af0x2a={raw:false,where:{id:_0x3af0x1e[_0xa2eb[93]][_0xa2eb[92]]}},_0x3af0x36={};_0x3af0x36[_0xa2eb[62]]= _[_0xa2eb[65]](db[_0xa2eb[64]][_0xa2eb[63]]);_0x3af0x36[_0xa2eb[67]]= _[_0xa2eb[65]](_0x3af0x1e[_0xa2eb[67]]);_0x3af0x36[_0xa2eb[69]]= _[_0xa2eb[70]](_0x3af0x36[_0xa2eb[62]],_0x3af0x36[_0xa2eb[67]]);_0x3af0x2a[_0xa2eb[71]]= _[_0xa2eb[70]](_0x3af0x36[_0xa2eb[62]],qs[_0xa2eb[72]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[72]]));_0x3af0x2a[_0xa2eb[71]]= (_0x3af0x2a[_0xa2eb[71]][_0xa2eb[73]])?_0x3af0x2a[_0xa2eb[71]]:_0x3af0x36[_0xa2eb[62]];if(_0x3af0x1e[_0xa2eb[67]][_0xa2eb[88]]){_0x3af0x2a[_0xa2eb[89]]= [{all:true}]};_0x3af0x2a= _[_0xa2eb[82]]({},_0x3af0x2a,_0x3af0x1e[_0xa2eb[86]]);return db[_0xa2eb[64]][_0xa2eb[94]](_0x3af0x2a)[_0xa2eb[40]](handleEntityNotFound(_0x3af0x24,null))[_0xa2eb[40]](respondWithResult(_0x3af0x24,null))[_0xa2eb[31]](handleError(_0x3af0x24,null))};exports[_0xa2eb[95]]= function(_0x3af0x1e,_0x3af0x24){return db[_0xa2eb[64]][_0xa2eb[95]](_0x3af0x1e[_0xa2eb[96]],{})[_0xa2eb[40]](respondWithResult(_0x3af0x24,201))[_0xa2eb[31]](handleError(_0x3af0x24,null))};exports[_0xa2eb[56]]= function(_0x3af0x1e,_0x3af0x24){if(_0x3af0x1e[_0xa2eb[96]][_0xa2eb[92]]){delete _0x3af0x1e[_0xa2eb[96]][_0xa2eb[92]]};return db[_0xa2eb[64]][_0xa2eb[94]]({where:{id:_0x3af0x1e[_0xa2eb[93]][_0xa2eb[92]]}})[_0xa2eb[40]](handleEntityNotFound(_0x3af0x24,null))[_0xa2eb[40]](saveUpdates(_0x3af0x1e[_0xa2eb[96]],null))[_0xa2eb[40]](respondWithResult(_0x3af0x24,null))[_0xa2eb[31]](handleError(_0x3af0x24,null))};exports[_0xa2eb[57]]= function(_0x3af0x1e,_0x3af0x24){return db[_0xa2eb[64]][_0xa2eb[94]]({where:{id:_0x3af0x1e[_0xa2eb[93]][_0xa2eb[92]]}})[_0xa2eb[40]](handleEntityNotFound(_0x3af0x24,null))[_0xa2eb[40]](removeEntity(_0x3af0x24,null))[_0xa2eb[31]](handleError(_0x3af0x24,null))};exports[_0xa2eb[97]]= function(_0x3af0x1e,_0x3af0x27,_0x3af0x3c){var _0x3af0x2a={};var _0x3af0x36={};var _0x3af0x3d;var _0x3af0x2b;return db[_0xa2eb[64]][_0xa2eb[99]]({where:{id:_0x3af0x1e[_0xa2eb[93]][_0xa2eb[92]]}})[_0xa2eb[40]](handleEntityNotFound(_0x3af0x27,null))[_0xa2eb[40]](function(_0x3af0x27){if(_0x3af0x27){_0x3af0x3d= _0x3af0x27;_0x3af0x36[_0xa2eb[62]]= _[_0xa2eb[65]](db[_0xa2eb[98]][_0xa2eb[63]]);_0x3af0x36[_0xa2eb[67]]= _[_0xa2eb[65]](_0x3af0x1e[_0xa2eb[67]]);_0x3af0x36[_0xa2eb[69]]= _[_0xa2eb[70]](_0x3af0x36[_0xa2eb[62]],_0x3af0x36[_0xa2eb[67]]);_0x3af0x2a[_0xa2eb[71]]= _[_0xa2eb[70]](_0x3af0x36[_0xa2eb[62]],qs[_0xa2eb[72]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[72]]));_0x3af0x2a[_0xa2eb[71]]= (_0x3af0x2a[_0xa2eb[71]][_0xa2eb[73]])?_0x3af0x2a[_0xa2eb[71]]:_0x3af0x36[_0xa2eb[62]];_0x3af0x2a[_0xa2eb[76]]= qs[_0xa2eb[77]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[77]]);_0x3af0x2a[_0xa2eb[78]]= qs[_0xa2eb[69]](_[_0xa2eb[79]](_0x3af0x1e[_0xa2eb[67]],_0x3af0x36[_0xa2eb[69]]));if(_0x3af0x1e[_0xa2eb[67]][_0xa2eb[83]]){_0x3af0x2a[_0xa2eb[78]]= _[_0xa2eb[82]](_0x3af0x2a[_0xa2eb[78]],{$or:_[_0xa2eb[85]](_0x3af0x2a[_0xa2eb[71]],function(_0x3af0x39){var _0x3af0x37={};_0x3af0x37[_0x3af0x39]= {$like:_0xa2eb[84]+ _0x3af0x1e[_0xa2eb[67]][_0xa2eb[83]]+ _0xa2eb[84]};return _0x3af0x37})})};_0x3af0x2a= _[_0xa2eb[82]]({},_0x3af0x2a,_0x3af0x1e[_0xa2eb[86]]);return _0x3af0x3d[_0xa2eb[97]](_0x3af0x2a)}})[_0xa2eb[40]](function(_0x3af0x3e){if(_0x3af0x3e){_0x3af0x2b= _0x3af0x3e[_0xa2eb[73]];if(!_0x3af0x1e[_0xa2eb[67]][_0xa2eb[75]](_0xa2eb[74])){_0x3af0x2a[_0xa2eb[48]]= qs[_0xa2eb[48]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[48]]);_0x3af0x2a[_0xa2eb[47]]= qs[_0xa2eb[47]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[47]])};return _0x3af0x3d[_0xa2eb[97]](_0x3af0x2a)}})[_0xa2eb[40]](function(_0x3af0x3b){if(_0x3af0x3b){return _0x3af0x3b?{count:_0x3af0x2b,rows:_0x3af0x3b}:null}})[_0xa2eb[40]](respondWithResult(_0x3af0x27,null))[_0xa2eb[31]](handleError(_0x3af0x27,null))};exports[_0xa2eb[100]]= function(_0x3af0x1e,_0x3af0x27,_0x3af0x3c){var _0x3af0x2a={};var _0x3af0x36={};var _0x3af0x3d;var _0x3af0x2b;return db[_0xa2eb[64]][_0xa2eb[99]]({where:{id:_0x3af0x1e[_0xa2eb[93]][_0xa2eb[92]]}})[_0xa2eb[40]](handleEntityNotFound(_0x3af0x27,null))[_0xa2eb[40]](function(_0x3af0x27){if(_0x3af0x27){_0x3af0x3d= _0x3af0x27;_0x3af0x36[_0xa2eb[62]]= _[_0xa2eb[65]](db[_0xa2eb[98]][_0xa2eb[63]]);_0x3af0x36[_0xa2eb[67]]= _[_0xa2eb[65]](_0x3af0x1e[_0xa2eb[67]]);_0x3af0x36[_0xa2eb[69]]= _[_0xa2eb[70]](_0x3af0x36[_0xa2eb[62]],_0x3af0x36[_0xa2eb[67]]);_0x3af0x2a[_0xa2eb[71]]= _[_0xa2eb[70]](_0x3af0x36[_0xa2eb[62]],qs[_0xa2eb[72]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[72]]));_0x3af0x2a[_0xa2eb[71]]= (_0x3af0x2a[_0xa2eb[71]][_0xa2eb[73]])?_0x3af0x2a[_0xa2eb[71]]:_0x3af0x36[_0xa2eb[62]];_0x3af0x2a[_0xa2eb[76]]= qs[_0xa2eb[77]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[77]]);_0x3af0x2a[_0xa2eb[78]]= qs[_0xa2eb[69]](_[_0xa2eb[79]](_0x3af0x1e[_0xa2eb[67]],_0x3af0x36[_0xa2eb[69]]));if(_0x3af0x1e[_0xa2eb[67]][_0xa2eb[83]]){_0x3af0x2a[_0xa2eb[78]]= _[_0xa2eb[82]](_0x3af0x2a[_0xa2eb[78]],{$or:_[_0xa2eb[85]](_0x3af0x2a[_0xa2eb[71]],function(_0x3af0x39){var _0x3af0x37={};_0x3af0x37[_0x3af0x39]= {$like:_0xa2eb[84]+ _0x3af0x1e[_0xa2eb[67]][_0xa2eb[83]]+ _0xa2eb[84]};return _0x3af0x37})})};_0x3af0x2a= _[_0xa2eb[82]]({},_0x3af0x2a,_0x3af0x1e[_0xa2eb[86]]);return _0x3af0x3d[_0xa2eb[100]](_0x3af0x2a)}})[_0xa2eb[40]](function(_0x3af0x3e){if(_0x3af0x3e){_0x3af0x2b= _0x3af0x3e[_0xa2eb[73]];if(!_0x3af0x1e[_0xa2eb[67]][_0xa2eb[75]](_0xa2eb[74])){_0x3af0x2a[_0xa2eb[48]]= qs[_0xa2eb[48]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[48]]);_0x3af0x2a[_0xa2eb[47]]= qs[_0xa2eb[47]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[47]])};return _0x3af0x3d[_0xa2eb[100]](_0x3af0x2a)}})[_0xa2eb[40]](function(_0x3af0x3b){if(_0x3af0x3b){return _0x3af0x3b?{count:_0x3af0x2b,rows:_0x3af0x3b}:null}})[_0xa2eb[40]](respondWithResult(_0x3af0x27,null))[_0xa2eb[31]](handleError(_0x3af0x27,null))};exports[_0xa2eb[101]]= function(_0x3af0x1e,_0x3af0x27,_0x3af0x3c){var _0x3af0x2a={};var _0x3af0x36={};var _0x3af0x3d;var _0x3af0x2b;return db[_0xa2eb[64]][_0xa2eb[99]]({where:{id:_0x3af0x1e[_0xa2eb[93]][_0xa2eb[92]]}})[_0xa2eb[40]](handleEntityNotFound(_0x3af0x27,null))[_0xa2eb[40]](function(_0x3af0x27){if(_0x3af0x27){_0x3af0x3d= _0x3af0x27;_0x3af0x36[_0xa2eb[62]]= _[_0xa2eb[65]](db[_0xa2eb[98]][_0xa2eb[63]]);_0x3af0x36[_0xa2eb[67]]= _[_0xa2eb[65]](_0x3af0x1e[_0xa2eb[67]]);_0x3af0x36[_0xa2eb[69]]= _[_0xa2eb[70]](_0x3af0x36[_0xa2eb[62]],_0x3af0x36[_0xa2eb[67]]);_0x3af0x2a[_0xa2eb[71]]= _[_0xa2eb[70]](_0x3af0x36[_0xa2eb[62]],qs[_0xa2eb[72]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[72]]));_0x3af0x2a[_0xa2eb[71]]= (_0x3af0x2a[_0xa2eb[71]][_0xa2eb[73]])?_0x3af0x2a[_0xa2eb[71]]:_0x3af0x36[_0xa2eb[62]];_0x3af0x2a[_0xa2eb[76]]= qs[_0xa2eb[77]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[77]]);_0x3af0x2a[_0xa2eb[78]]= qs[_0xa2eb[69]](_[_0xa2eb[79]](_0x3af0x1e[_0xa2eb[67]],_0x3af0x36[_0xa2eb[69]]));if(_0x3af0x1e[_0xa2eb[67]][_0xa2eb[83]]){_0x3af0x2a[_0xa2eb[78]]= _[_0xa2eb[82]](_0x3af0x2a[_0xa2eb[78]],{$or:_[_0xa2eb[85]](_0x3af0x2a[_0xa2eb[71]],function(_0x3af0x39){var _0x3af0x37={};_0x3af0x37[_0x3af0x39]= {$like:_0xa2eb[84]+ _0x3af0x1e[_0xa2eb[67]][_0xa2eb[83]]+ _0xa2eb[84]};return _0x3af0x37})})};_0x3af0x2a= _[_0xa2eb[82]]({},_0x3af0x2a,_0x3af0x1e[_0xa2eb[86]]);return _0x3af0x3d[_0xa2eb[101]](_0x3af0x2a)}})[_0xa2eb[40]](function(_0x3af0x3e){if(_0x3af0x3e){_0x3af0x2b= _0x3af0x3e[_0xa2eb[73]];if(!_0x3af0x1e[_0xa2eb[67]][_0xa2eb[75]](_0xa2eb[74])){_0x3af0x2a[_0xa2eb[48]]= qs[_0xa2eb[48]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[48]]);_0x3af0x2a[_0xa2eb[47]]= qs[_0xa2eb[47]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[47]])};return _0x3af0x3d[_0xa2eb[101]](_0x3af0x2a)}})[_0xa2eb[40]](function(_0x3af0x3b){if(_0x3af0x3b){return _0x3af0x3b?{count:_0x3af0x2b,rows:_0x3af0x3b}:null}})[_0xa2eb[40]](respondWithResult(_0x3af0x27,null))[_0xa2eb[31]](handleError(_0x3af0x27,null))};exports[_0xa2eb[102]]= function(_0x3af0x1e,_0x3af0x27,_0x3af0x3c){var _0x3af0x2a={};var _0x3af0x36={};var _0x3af0x3d;var _0x3af0x2b;return db[_0xa2eb[64]][_0xa2eb[99]]({where:{id:_0x3af0x1e[_0xa2eb[93]][_0xa2eb[92]]}})[_0xa2eb[40]](handleEntityNotFound(_0x3af0x27,null))[_0xa2eb[40]](function(_0x3af0x27){if(_0x3af0x27){_0x3af0x3d= _0x3af0x27;_0x3af0x36[_0xa2eb[62]]= _[_0xa2eb[65]](db[_0xa2eb[103]][_0xa2eb[63]]);_0x3af0x36[_0xa2eb[67]]= _[_0xa2eb[65]](_0x3af0x1e[_0xa2eb[67]]);_0x3af0x36[_0xa2eb[69]]= _[_0xa2eb[70]](_0x3af0x36[_0xa2eb[62]],_0x3af0x36[_0xa2eb[67]]);_0x3af0x2a[_0xa2eb[71]]= _[_0xa2eb[70]](_0x3af0x36[_0xa2eb[62]],qs[_0xa2eb[72]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[72]]));_0x3af0x2a[_0xa2eb[71]]= (_0x3af0x2a[_0xa2eb[71]][_0xa2eb[73]])?_0x3af0x2a[_0xa2eb[71]]:_0x3af0x36[_0xa2eb[62]];_0x3af0x2a[_0xa2eb[76]]= qs[_0xa2eb[77]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[77]]);_0x3af0x2a[_0xa2eb[78]]= qs[_0xa2eb[69]](_[_0xa2eb[79]](_0x3af0x1e[_0xa2eb[67]],_0x3af0x36[_0xa2eb[69]]));if(_0x3af0x1e[_0xa2eb[67]][_0xa2eb[83]]){_0x3af0x2a[_0xa2eb[78]]= _[_0xa2eb[82]](_0x3af0x2a[_0xa2eb[78]],{$or:_[_0xa2eb[85]](_0x3af0x2a[_0xa2eb[71]],function(_0x3af0x39){var _0x3af0x37={};_0x3af0x37[_0x3af0x39]= {$like:_0xa2eb[84]+ _0x3af0x1e[_0xa2eb[67]][_0xa2eb[83]]+ _0xa2eb[84]};return _0x3af0x37})})};_0x3af0x2a= _[_0xa2eb[82]]({},_0x3af0x2a,_0x3af0x1e[_0xa2eb[86]]);return _0x3af0x3d[_0xa2eb[102]](_0x3af0x2a)}})[_0xa2eb[40]](function(_0x3af0x3e){if(_0x3af0x3e){_0x3af0x2b= _0x3af0x3e[_0xa2eb[73]];if(!_0x3af0x1e[_0xa2eb[67]][_0xa2eb[75]](_0xa2eb[74])){_0x3af0x2a[_0xa2eb[48]]= qs[_0xa2eb[48]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[48]]);_0x3af0x2a[_0xa2eb[47]]= qs[_0xa2eb[47]](_0x3af0x1e[_0xa2eb[67]][_0xa2eb[47]])};return _0x3af0x3d[_0xa2eb[102]](_0x3af0x2a)}})[_0xa2eb[40]](function(_0x3af0x3b){if(_0x3af0x3b){return _0x3af0x3b?{count:_0x3af0x2b,rows:_0x3af0x3b}:null}})[_0xa2eb[40]](respondWithResult(_0x3af0x27,null))[_0xa2eb[31]](handleError(_0x3af0x27,null))};exports[_0xa2eb[104]]= function(_0x3af0x1e,_0x3af0x24,_0x3af0x3c){if(_0x3af0x1e[_0xa2eb[96]][_0xa2eb[92]]){delete _0x3af0x1e[_0xa2eb[96]][_0xa2eb[92]]};return db[_0xa2eb[64]][_0xa2eb[99]]({where:{id:_0x3af0x1e[_0xa2eb[93]][_0xa2eb[92]]}})[_0xa2eb[40]](handleEntityNotFound(_0x3af0x24,null))[_0xa2eb[40]](function(_0x3af0x27){if(_0x3af0x27){return _0x3af0x27[_0xa2eb[104]](_0x3af0x1e[_0xa2eb[96]][_0xa2eb[105]])};return null})[_0xa2eb[40]](respondWithResult(_0x3af0x24,null))[_0xa2eb[31]](handleError(_0x3af0x24,null))}
\ No newline at end of file
index d82b45c..c1bb970 100644 (file)
@@ -1 +1 @@
-var _0xfd6a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x69\x6E\x74\x5F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xfd6a[0];var _=require(_0xfd6a[1]);var util=require(_0xfd6a[2]);var logger=require(_0xfd6a[4])(_0xfd6a[3]);var moment=require(_0xfd6a[5]);var BPromise=require(_0xfd6a[6]);var rp=require(_0xfd6a[7]);var attributes=require(_0xfd6a[8]);module[_0xfd6a[9]]= function(_0x2a59x8,_0x2a59x9){return _0x2a59x8[_0xfd6a[12]](_0xfd6a[10],attributes,{tableName:_0xfd6a[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x4edc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x69\x6E\x74\x5F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x4edc[0];var _=require(_0x4edc[1]);var util=require(_0x4edc[2]);var logger=require(_0x4edc[4])(_0x4edc[3]);var moment=require(_0x4edc[5]);var BPromise=require(_0x4edc[6]);var rp=require(_0x4edc[7]);var attributes=require(_0x4edc[8]);module[_0x4edc[9]]= function(_0xc62bx8,_0xc62bx9){return _0xc62bx8[_0x4edc[12]](_0x4edc[10],attributes,{tableName:_0x4edc[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 45b7dff..14f395e 100644 (file)
@@ -1 +1 @@
-var _0xeaa5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xeaa5[0];var _=require(_0xeaa5[1]);var util=require(_0xeaa5[2]);var moment=require(_0xeaa5[3]);var BPromise=require(_0xeaa5[4]);var rs=require(_0xeaa5[5]);var fs=require(_0xeaa5[6]);var db=require(_0xeaa5[8])[_0xeaa5[7]];var utils=require(_0xeaa5[9]);var logger=require(_0xeaa5[11])(_0xeaa5[10]);var config=require(_0xeaa5[12]);var jayson=require(_0xeaa5[13]);var client=jayson[_0xeaa5[15]][_0xeaa5[14]]({port:9002});function respondWithRpcPromise(_0xaa5bxe,_0xaa5bxf,_0xaa5bx10){return  new BPromise(function(_0xaa5bx11,_0xaa5bx12){return client[_0xeaa5[28]](_0xaa5bxe,_0xaa5bx10)[_0xeaa5[27]](function(_0xaa5bx14){logger[_0xeaa5[20]](_0xeaa5[16],_0xaa5bxf,_0xeaa5[19]);logger[_0xeaa5[23]](_0xeaa5[21],_0xaa5bxf,_0xeaa5[19],JSON[_0xeaa5[22]](_0xaa5bx14));if(_0xaa5bx14[_0xeaa5[17]]){if(_0xaa5bx14[_0xeaa5[17]][_0xeaa5[24]]=== 500){logger[_0xeaa5[17]](_0xeaa5[16],_0xaa5bxf,_0xaa5bx14[_0xeaa5[17]][_0xeaa5[25]]);return _0xaa5bx12(_0xaa5bx14[_0xeaa5[17]][_0xeaa5[25]])};logger[_0xeaa5[17]](_0xeaa5[16],_0xaa5bxf,_0xaa5bx14[_0xeaa5[17]][_0xeaa5[25]]);return _0xaa5bx11(_0xaa5bx14[_0xeaa5[17]][_0xeaa5[25]])}else {logger[_0xeaa5[20]](_0xeaa5[16],_0xaa5bxf,_0xeaa5[19]);_0xaa5bx11(_0xaa5bx14[_0xeaa5[26]][_0xeaa5[25]])}})[_0xeaa5[18]](function(_0xaa5bx13){logger[_0xeaa5[17]](_0xeaa5[16],_0xaa5bxf,_0xaa5bx13);_0xaa5bx12(_0xaa5bx13)})})}
\ No newline at end of file
+var _0x15b2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x15b2[0];var _=require(_0x15b2[1]);var util=require(_0x15b2[2]);var moment=require(_0x15b2[3]);var BPromise=require(_0x15b2[4]);var rs=require(_0x15b2[5]);var fs=require(_0x15b2[6]);var db=require(_0x15b2[8])[_0x15b2[7]];var utils=require(_0x15b2[9]);var logger=require(_0x15b2[11])(_0x15b2[10]);var config=require(_0x15b2[12]);var jayson=require(_0x15b2[13]);var client=jayson[_0x15b2[15]][_0x15b2[14]]({port:9002});function respondWithRpcPromise(_0x496fxe,_0x496fxf,_0x496fx10){return  new BPromise(function(_0x496fx11,_0x496fx12){return client[_0x15b2[28]](_0x496fxe,_0x496fx10)[_0x15b2[27]](function(_0x496fx14){logger[_0x15b2[20]](_0x15b2[16],_0x496fxf,_0x15b2[19]);logger[_0x15b2[23]](_0x15b2[21],_0x496fxf,_0x15b2[19],JSON[_0x15b2[22]](_0x496fx14));if(_0x496fx14[_0x15b2[17]]){if(_0x496fx14[_0x15b2[17]][_0x15b2[24]]=== 500){logger[_0x15b2[17]](_0x15b2[16],_0x496fxf,_0x496fx14[_0x15b2[17]][_0x15b2[25]]);return _0x496fx12(_0x496fx14[_0x15b2[17]][_0x15b2[25]])};logger[_0x15b2[17]](_0x15b2[16],_0x496fxf,_0x496fx14[_0x15b2[17]][_0x15b2[25]]);return _0x496fx11(_0x496fx14[_0x15b2[17]][_0x15b2[25]])}else {logger[_0x15b2[20]](_0x15b2[16],_0x496fxf,_0x15b2[19]);_0x496fx11(_0x496fx14[_0x15b2[26]][_0x15b2[25]])}})[_0x15b2[18]](function(_0x496fx13){logger[_0x15b2[17]](_0x15b2[16],_0x496fxf,_0x496fx13);_0x496fx12(_0x496fx13)})})}
\ No newline at end of file
index ddb1a47..920dd9c 100644 (file)
@@ -1 +1 @@
-var _0x2980=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2980[0];var multer=require(_0x2980[1]);var util=require(_0x2980[2]);var path=require(_0x2980[3]);var express=require(_0x2980[4]);var router=express.Router();var auth=require(_0x2980[5]);var interaction=require(_0x2980[6]);var config=require(_0x2980[7]);var controller=require(_0x2980[8]);router[_0x2980[12]](_0x2980[9],auth[_0x2980[10]](),controller[_0x2980[11]]);router[_0x2980[12]](_0x2980[13],auth[_0x2980[10]](),controller[_0x2980[14]]);router[_0x2980[16]](_0x2980[9],auth[_0x2980[10]](),controller[_0x2980[15]]);router[_0x2980[18]](_0x2980[13],auth[_0x2980[10]](),controller[_0x2980[17]]);router[_0x2980[20]](_0x2980[13],auth[_0x2980[10]](),controller[_0x2980[19]]);module[_0x2980[21]]= router
\ No newline at end of file
+var _0xd796=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xd796[0];var multer=require(_0xd796[1]);var util=require(_0xd796[2]);var path=require(_0xd796[3]);var express=require(_0xd796[4]);var router=express.Router();var auth=require(_0xd796[5]);var interaction=require(_0xd796[6]);var config=require(_0xd796[7]);var controller=require(_0xd796[8]);router[_0xd796[12]](_0xd796[9],auth[_0xd796[10]](),controller[_0xd796[11]]);router[_0xd796[12]](_0xd796[13],auth[_0xd796[10]](),controller[_0xd796[14]]);router[_0xd796[16]](_0xd796[9],auth[_0xd796[10]](),controller[_0xd796[15]]);router[_0xd796[18]](_0xd796[13],auth[_0xd796[10]](),controller[_0xd796[17]]);router[_0xd796[20]](_0xd796[13],auth[_0xd796[10]](),controller[_0xd796[19]]);module[_0xd796[21]]= router
\ No newline at end of file
index 7701b31..59a870e 100644 (file)
@@ -1 +1 @@
-var _0x3b04=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x73\x74\x72\x69\x6E\x67","\x76\x61\x72\x69\x61\x62\x6C\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x3b04[0];var Sequelize=require(_0x3b04[1]);module[_0x3b04[2]]= {type:{type:Sequelize.ENUM(_0x3b04[3],_0x3b04[4],_0x3b04[5],_0x3b04[6]),defaultValue:_0x3b04[3]},content:{type:Sequelize[_0x3b04[7]]},key:{type:Sequelize[_0x3b04[7]]},keyType:{type:Sequelize.ENUM(_0x3b04[3],_0x3b04[4],_0x3b04[5])},keyContent:{type:Sequelize[_0x3b04[7]]},idField:{type:Sequelize[_0x3b04[7]]},nameField:{type:Sequelize[_0x3b04[7]]},customField:{type:Sequelize[_0x3b04[8]],defaultValue:true},variableName:{type:Sequelize[_0x3b04[7]]}}
\ No newline at end of file
+var _0xfbbb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x73\x74\x72\x69\x6E\x67","\x76\x61\x72\x69\x61\x62\x6C\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0xfbbb[0];var Sequelize=require(_0xfbbb[1]);module[_0xfbbb[2]]= {type:{type:Sequelize.ENUM(_0xfbbb[3],_0xfbbb[4],_0xfbbb[5],_0xfbbb[6]),defaultValue:_0xfbbb[3]},content:{type:Sequelize[_0xfbbb[7]]},key:{type:Sequelize[_0xfbbb[7]]},keyType:{type:Sequelize.ENUM(_0xfbbb[3],_0xfbbb[4],_0xfbbb[5])},keyContent:{type:Sequelize[_0xfbbb[7]]},idField:{type:Sequelize[_0xfbbb[7]]},nameField:{type:Sequelize[_0xfbbb[7]]},customField:{type:Sequelize[_0xfbbb[8]],defaultValue:true},variableName:{type:Sequelize[_0xfbbb[7]]}}
\ No newline at end of file
index 8d30bcb..22028ee 100644 (file)
@@ -1 +1 @@
-var _0xdadd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xdadd[0];var jsonpatch=require(_0xdadd[1]);var rp=require(_0xdadd[2]);var moment=require(_0xdadd[3]);var BPromise=require(_0xdadd[4]);var Mustache=require(_0xdadd[5]);var util=require(_0xdadd[6]);var path=require(_0xdadd[7]);var sox=require(_0xdadd[8]);var csv=require(_0xdadd[9]);var ejs=require(_0xdadd[10]);var fs=require(_0xdadd[11]);var _=require(_0xdadd[12]);var squel=require(_0xdadd[13]);var crypto=require(_0xdadd[14]);var jsforce=require(_0xdadd[15]);var deskjs=require(_0xdadd[16]);var toCsv=require(_0xdadd[9]);var querystring=require(_0xdadd[17]);var Papa=require(_0xdadd[18]);var qs=require(_0xdadd[19]);var logger=require(_0xdadd[21])(_0xdadd[20]);var utils=require(_0xdadd[22]);var config=require(_0xdadd[23]);var db=require(_0xdadd[25])[_0xdadd[24]];function respondWithStatusCode(_0xf007x1a,_0xf007x1b){_0xf007x1b= _0xf007x1b|| 204;return function(_0xf007x1c){if(_0xf007x1c){return _0xf007x1a[_0xdadd[26]](_0xf007x1b)};return _0xf007x1a[_0xdadd[28]](_0xf007x1b)[_0xdadd[27]]()}}function respondWithResult(_0xf007x1a,_0xf007x1b){_0xf007x1b= _0xf007x1b|| 200;return function(_0xf007x1c){if(_0xf007x1c){return _0xf007x1a[_0xdadd[28]](_0xf007x1b)[_0xdadd[29]](_0xf007x1c)}}}function respondWithFilteredResult(_0xf007x1a,_0xf007x1f){return function(_0xf007x1c){if(_0xf007x1c){var _0xf007x20=_0xf007x1c[_0xdadd[30]],_0xf007x21=_0xf007x1f[_0xdadd[31]],_0xf007x22=_0xf007x1f[_0xdadd[31]]+ _0xf007x1f[_0xdadd[32]],_0xf007x1b;if(_0xf007x22>= _0xf007x20){_0xf007x22= _0xf007x20;_0xf007x1b= 200}else {_0xf007x1b= 206};_0xf007x1a[_0xdadd[28]](_0xf007x1b);return _0xf007x1a[_0xdadd[36]](_0xdadd[33],_0xf007x21+ _0xdadd[34]+ _0xf007x22+ _0xdadd[35]+ _0xf007x20)[_0xdadd[29]](_0xf007x1c)};return null}}function patchUpdates(_0xf007x24){return function(_0xf007x1c){try{jsonpatch[_0xdadd[37]](_0xf007x1c,_0xf007x24,true)}catch(err){return BPromise[_0xdadd[38]](err)};return _0xf007x1c[_0xdadd[39]]()}}function saveUpdates(_0xf007x26,_0xf007x1b){return function(_0xf007x1c){if(_0xf007x1c){return _0xf007x1c[_0xdadd[41]](_0xf007x26)[_0xdadd[40]](function(_0xf007x27){return _0xf007x27})};return null}}function removeEntity(_0xf007x1a,_0xf007x1b){return function(_0xf007x1c){if(_0xf007x1c){return _0xf007x1c[_0xdadd[42]]()[_0xdadd[40]](function(){_0xf007x1a[_0xdadd[28]](204)[_0xdadd[27]]()})}}}function handleEntityNotFound(_0xf007x1a,_0xf007x1b){return function(_0xf007x1c){if(!_0xf007x1c){_0xf007x1a[_0xdadd[26]](404)};return _0xf007x1c}}function handleError(_0xf007x1a,_0xf007x1b){_0xf007x1b= _0xf007x1b|| 500;return function(_0xf007x2b){logger[_0xdadd[44]](_0xf007x2b[_0xdadd[43]]);if(_0xf007x2b[_0xdadd[45]]){delete _0xf007x2b[_0xdadd[45]]};_0xf007x1a[_0xdadd[28]](_0xf007x1b)[_0xdadd[46]](_0xf007x2b)}}exports[_0xdadd[47]]= function(_0xf007x2c,_0xf007x1a){var _0xf007x1f={},_0xf007x2d={},_0xf007x2e={count:0,rows:[]};_0xf007x2d[_0xdadd[48]]= _[_0xdadd[51]](db[_0xdadd[50]][_0xdadd[49]]);var _0xf007x2f={dateStart:_0xf007x2c[_0xdadd[53]][_0xdadd[52]],dateEnd:_0xf007x2c[_0xdadd[53]][_0xdadd[54]]};delete _0xf007x2c[_0xdadd[53]][_0xdadd[52]];delete _0xf007x2c[_0xdadd[53]][_0xdadd[54]];_0xf007x2d[_0xdadd[53]]= _[_0xdadd[51]](_0xf007x2c[_0xdadd[53]]);_0xf007x2d[_0xdadd[55]]= _[_0xdadd[56]](_0xf007x2d[_0xdadd[48]],_0xf007x2d[_0xdadd[53]]);_0xf007x1f[_0xdadd[57]]= _[_0xdadd[56]](_0xf007x2d[_0xdadd[48]],qs[_0xdadd[58]](_0xf007x2c[_0xdadd[53]][_0xdadd[58]]));_0xf007x1f[_0xdadd[57]]= (_0xf007x1f[_0xdadd[57]][_0xdadd[59]])?_0xf007x1f[_0xdadd[57]]:_0xf007x2d[_0xdadd[48]];if(!_0xf007x2c[_0xdadd[53]][_0xdadd[61]](_0xdadd[60])){_0xf007x1f[_0xdadd[32]]= qs[_0xdadd[32]](_0xf007x2c[_0xdadd[53]][_0xdadd[32]]);_0xf007x1f[_0xdadd[31]]= qs[_0xdadd[31]](_0xf007x2c[_0xdadd[53]][_0xdadd[31]])};_0xf007x1f[_0xdadd[62]]= qs[_0xdadd[63]](_0xf007x2c[_0xdadd[53]][_0xdadd[63]]);_0xf007x1f[_0xdadd[64]]= qs[_0xdadd[55]](_[_0xdadd[65]](_0xf007x2c[_0xdadd[53]],_0xf007x2d[_0xdadd[55]]));if(_0xf007x2f[_0xdadd[52]]){if(_0xf007x2f[_0xdadd[54]]){_0xf007x2f[_0xdadd[54]]= moment(_0xf007x2f[_0xdadd[54]])[_0xdadd[67]](1,_0xdadd[66])}else {_0xf007x2f[_0xdadd[54]]= moment(_0xf007x2f[_0xdadd[52]])[_0xdadd[67]](1,_0xdadd[66])};_[_0xdadd[68]](_0xf007x1f[_0xdadd[64]],{createdAt:{$gte:_0xf007x2f[_0xdadd[52]],$lte:_0xf007x2f[_0xdadd[54]]}})};if(_0xf007x2c[_0xdadd[53]][_0xdadd[69]]){_0xf007x1f[_0xdadd[64]]= _[_0xdadd[68]](_0xf007x1f[_0xdadd[64]],{$or:_[_0xdadd[71]](_0xf007x1f[_0xdadd[57]],function(_0xf007x30){var _0xf007x2e={};_0xf007x2e[_0xf007x30]= {$like:_0xdadd[70]+ _0xf007x2c[_0xdadd[53]][_0xdadd[69]]+ _0xdadd[70]};return _0xf007x2e})})};_0xf007x1f= _[_0xdadd[68]]({},_0xf007x1f,_0xf007x2c[_0xdadd[72]]);var _0xf007x31={where:_0xf007x1f[_0xdadd[64]]};return db[_0xdadd[50]][_0xdadd[30]](_0xf007x31)[_0xdadd[40]](function(_0xf007x20){_0xf007x2e[_0xdadd[30]]= _0xf007x20;if(_0xf007x2c[_0xdadd[53]][_0xdadd[75]]){_0xf007x1f[_0xdadd[76]]= [{all:true}]};return db[_0xdadd[50]][_0xdadd[77]](_0xf007x1f)})[_0xdadd[40]](function(_0xf007x32){_0xf007x2e[_0xdadd[74]]= _0xf007x32;return _0xf007x2e})[_0xdadd[40]](respondWithFilteredResult(_0xf007x1a,_0xf007x1f))[_0xdadd[73]](handleError(_0xf007x1a,null))};exports[_0xdadd[78]]= function(_0xf007x2c,_0xf007x1a){var _0xf007x1f={raw:true,where:{id:_0xf007x2c[_0xdadd[80]][_0xdadd[79]]}},_0xf007x2d={};_0xf007x2d[_0xdadd[48]]= _[_0xdadd[51]](db[_0xdadd[50]][_0xdadd[49]]);_0xf007x2d[_0xdadd[53]]= _[_0xdadd[51]](_0xf007x2c[_0xdadd[53]]);_0xf007x2d[_0xdadd[55]]= _[_0xdadd[56]](_0xf007x2d[_0xdadd[48]],_0xf007x2d[_0xdadd[53]]);_0xf007x1f[_0xdadd[57]]= _[_0xdadd[56]](_0xf007x2d[_0xdadd[48]],qs[_0xdadd[58]](_0xf007x2c[_0xdadd[53]][_0xdadd[58]]));_0xf007x1f[_0xdadd[57]]= (_0xf007x1f[_0xdadd[57]][_0xdadd[59]])?_0xf007x1f[_0xdadd[57]]:_0xf007x2d[_0xdadd[48]];if(_0xf007x2c[_0xdadd[53]][_0xdadd[75]]){_0xf007x1f[_0xdadd[76]]= [{all:true}]};_0xf007x1f= _[_0xdadd[68]]({},_0xf007x1f,_0xf007x2c[_0xdadd[72]]);return db[_0xdadd[50]][_0xdadd[81]](_0xf007x1f)[_0xdadd[40]](handleEntityNotFound(_0xf007x1a,null))[_0xdadd[40]](respondWithResult(_0xf007x1a,null))[_0xdadd[73]](handleError(_0xf007x1a,null))};exports[_0xdadd[82]]= function(_0xf007x2c,_0xf007x1a){return db[_0xdadd[50]][_0xdadd[82]](_0xf007x2c[_0xdadd[83]],{})[_0xdadd[40]](respondWithResult(_0xf007x1a,201))[_0xdadd[73]](handleError(_0xf007x1a,null))};exports[_0xdadd[41]]= function(_0xf007x2c,_0xf007x1a){if(_0xf007x2c[_0xdadd[83]][_0xdadd[79]]){delete _0xf007x2c[_0xdadd[83]][_0xdadd[79]]};return db[_0xdadd[50]][_0xdadd[81]]({where:{id:_0xf007x2c[_0xdadd[80]][_0xdadd[79]]}})[_0xdadd[40]](handleEntityNotFound(_0xf007x1a,null))[_0xdadd[40]](saveUpdates(_0xf007x2c[_0xdadd[83]],null))[_0xdadd[40]](respondWithResult(_0xf007x1a,null))[_0xdadd[73]](handleError(_0xf007x1a,null))};exports[_0xdadd[42]]= function(_0xf007x2c,_0xf007x1a){return db[_0xdadd[50]][_0xdadd[81]]({where:{id:_0xf007x2c[_0xdadd[80]][_0xdadd[79]]}})[_0xdadd[40]](handleEntityNotFound(_0xf007x1a,null))[_0xdadd[40]](removeEntity(_0xf007x1a,null))[_0xdadd[73]](handleError(_0xf007x1a,null))}
\ No newline at end of file
+var _0xed33=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xed33[0];var jsonpatch=require(_0xed33[1]);var rp=require(_0xed33[2]);var moment=require(_0xed33[3]);var BPromise=require(_0xed33[4]);var Mustache=require(_0xed33[5]);var util=require(_0xed33[6]);var path=require(_0xed33[7]);var sox=require(_0xed33[8]);var csv=require(_0xed33[9]);var ejs=require(_0xed33[10]);var fs=require(_0xed33[11]);var _=require(_0xed33[12]);var squel=require(_0xed33[13]);var crypto=require(_0xed33[14]);var jsforce=require(_0xed33[15]);var deskjs=require(_0xed33[16]);var toCsv=require(_0xed33[9]);var querystring=require(_0xed33[17]);var Papa=require(_0xed33[18]);var qs=require(_0xed33[19]);var logger=require(_0xed33[21])(_0xed33[20]);var utils=require(_0xed33[22]);var config=require(_0xed33[23]);var db=require(_0xed33[25])[_0xed33[24]];function respondWithStatusCode(_0x8627x1a,_0x8627x1b){_0x8627x1b= _0x8627x1b|| 204;return function(_0x8627x1c){if(_0x8627x1c){return _0x8627x1a[_0xed33[26]](_0x8627x1b)};return _0x8627x1a[_0xed33[28]](_0x8627x1b)[_0xed33[27]]()}}function respondWithResult(_0x8627x1a,_0x8627x1b){_0x8627x1b= _0x8627x1b|| 200;return function(_0x8627x1c){if(_0x8627x1c){return _0x8627x1a[_0xed33[28]](_0x8627x1b)[_0xed33[29]](_0x8627x1c)}}}function respondWithFilteredResult(_0x8627x1a,_0x8627x1f){return function(_0x8627x1c){if(_0x8627x1c){var _0x8627x20=_0x8627x1c[_0xed33[30]],_0x8627x21=_0x8627x1f[_0xed33[31]],_0x8627x22=_0x8627x1f[_0xed33[31]]+ _0x8627x1f[_0xed33[32]],_0x8627x1b;if(_0x8627x22>= _0x8627x20){_0x8627x22= _0x8627x20;_0x8627x1b= 200}else {_0x8627x1b= 206};_0x8627x1a[_0xed33[28]](_0x8627x1b);return _0x8627x1a[_0xed33[36]](_0xed33[33],_0x8627x21+ _0xed33[34]+ _0x8627x22+ _0xed33[35]+ _0x8627x20)[_0xed33[29]](_0x8627x1c)};return null}}function patchUpdates(_0x8627x24){return function(_0x8627x1c){try{jsonpatch[_0xed33[37]](_0x8627x1c,_0x8627x24,true)}catch(err){return BPromise[_0xed33[38]](err)};return _0x8627x1c[_0xed33[39]]()}}function saveUpdates(_0x8627x26,_0x8627x1b){return function(_0x8627x1c){if(_0x8627x1c){return _0x8627x1c[_0xed33[41]](_0x8627x26)[_0xed33[40]](function(_0x8627x27){return _0x8627x27})};return null}}function removeEntity(_0x8627x1a,_0x8627x1b){return function(_0x8627x1c){if(_0x8627x1c){return _0x8627x1c[_0xed33[42]]()[_0xed33[40]](function(){_0x8627x1a[_0xed33[28]](204)[_0xed33[27]]()})}}}function handleEntityNotFound(_0x8627x1a,_0x8627x1b){return function(_0x8627x1c){if(!_0x8627x1c){_0x8627x1a[_0xed33[26]](404)};return _0x8627x1c}}function handleError(_0x8627x1a,_0x8627x1b){_0x8627x1b= _0x8627x1b|| 500;return function(_0x8627x2b){logger[_0xed33[44]](_0x8627x2b[_0xed33[43]]);if(_0x8627x2b[_0xed33[45]]){delete _0x8627x2b[_0xed33[45]]};_0x8627x1a[_0xed33[28]](_0x8627x1b)[_0xed33[46]](_0x8627x2b)}}exports[_0xed33[47]]= function(_0x8627x2c,_0x8627x1a){var _0x8627x1f={},_0x8627x2d={},_0x8627x2e={count:0,rows:[]};_0x8627x2d[_0xed33[48]]= _[_0xed33[51]](db[_0xed33[50]][_0xed33[49]]);var _0x8627x2f={dateStart:_0x8627x2c[_0xed33[53]][_0xed33[52]],dateEnd:_0x8627x2c[_0xed33[53]][_0xed33[54]]};delete _0x8627x2c[_0xed33[53]][_0xed33[52]];delete _0x8627x2c[_0xed33[53]][_0xed33[54]];_0x8627x2d[_0xed33[53]]= _[_0xed33[51]](_0x8627x2c[_0xed33[53]]);_0x8627x2d[_0xed33[55]]= _[_0xed33[56]](_0x8627x2d[_0xed33[48]],_0x8627x2d[_0xed33[53]]);_0x8627x1f[_0xed33[57]]= _[_0xed33[56]](_0x8627x2d[_0xed33[48]],qs[_0xed33[58]](_0x8627x2c[_0xed33[53]][_0xed33[58]]));_0x8627x1f[_0xed33[57]]= (_0x8627x1f[_0xed33[57]][_0xed33[59]])?_0x8627x1f[_0xed33[57]]:_0x8627x2d[_0xed33[48]];if(!_0x8627x2c[_0xed33[53]][_0xed33[61]](_0xed33[60])){_0x8627x1f[_0xed33[32]]= qs[_0xed33[32]](_0x8627x2c[_0xed33[53]][_0xed33[32]]);_0x8627x1f[_0xed33[31]]= qs[_0xed33[31]](_0x8627x2c[_0xed33[53]][_0xed33[31]])};_0x8627x1f[_0xed33[62]]= qs[_0xed33[63]](_0x8627x2c[_0xed33[53]][_0xed33[63]]);_0x8627x1f[_0xed33[64]]= qs[_0xed33[55]](_[_0xed33[65]](_0x8627x2c[_0xed33[53]],_0x8627x2d[_0xed33[55]]));if(_0x8627x2f[_0xed33[52]]){if(_0x8627x2f[_0xed33[54]]){_0x8627x2f[_0xed33[54]]= moment(_0x8627x2f[_0xed33[54]])[_0xed33[67]](1,_0xed33[66])}else {_0x8627x2f[_0xed33[54]]= moment(_0x8627x2f[_0xed33[52]])[_0xed33[67]](1,_0xed33[66])};_[_0xed33[68]](_0x8627x1f[_0xed33[64]],{createdAt:{$gte:_0x8627x2f[_0xed33[52]],$lte:_0x8627x2f[_0xed33[54]]}})};if(_0x8627x2c[_0xed33[53]][_0xed33[69]]){_0x8627x1f[_0xed33[64]]= _[_0xed33[68]](_0x8627x1f[_0xed33[64]],{$or:_[_0xed33[71]](_0x8627x1f[_0xed33[57]],function(_0x8627x30){var _0x8627x2e={};_0x8627x2e[_0x8627x30]= {$like:_0xed33[70]+ _0x8627x2c[_0xed33[53]][_0xed33[69]]+ _0xed33[70]};return _0x8627x2e})})};_0x8627x1f= _[_0xed33[68]]({},_0x8627x1f,_0x8627x2c[_0xed33[72]]);var _0x8627x31={where:_0x8627x1f[_0xed33[64]]};return db[_0xed33[50]][_0xed33[30]](_0x8627x31)[_0xed33[40]](function(_0x8627x20){_0x8627x2e[_0xed33[30]]= _0x8627x20;if(_0x8627x2c[_0xed33[53]][_0xed33[75]]){_0x8627x1f[_0xed33[76]]= [{all:true}]};return db[_0xed33[50]][_0xed33[77]](_0x8627x1f)})[_0xed33[40]](function(_0x8627x32){_0x8627x2e[_0xed33[74]]= _0x8627x32;return _0x8627x2e})[_0xed33[40]](respondWithFilteredResult(_0x8627x1a,_0x8627x1f))[_0xed33[73]](handleError(_0x8627x1a,null))};exports[_0xed33[78]]= function(_0x8627x2c,_0x8627x1a){var _0x8627x1f={raw:true,where:{id:_0x8627x2c[_0xed33[80]][_0xed33[79]]}},_0x8627x2d={};_0x8627x2d[_0xed33[48]]= _[_0xed33[51]](db[_0xed33[50]][_0xed33[49]]);_0x8627x2d[_0xed33[53]]= _[_0xed33[51]](_0x8627x2c[_0xed33[53]]);_0x8627x2d[_0xed33[55]]= _[_0xed33[56]](_0x8627x2d[_0xed33[48]],_0x8627x2d[_0xed33[53]]);_0x8627x1f[_0xed33[57]]= _[_0xed33[56]](_0x8627x2d[_0xed33[48]],qs[_0xed33[58]](_0x8627x2c[_0xed33[53]][_0xed33[58]]));_0x8627x1f[_0xed33[57]]= (_0x8627x1f[_0xed33[57]][_0xed33[59]])?_0x8627x1f[_0xed33[57]]:_0x8627x2d[_0xed33[48]];if(_0x8627x2c[_0xed33[53]][_0xed33[75]]){_0x8627x1f[_0xed33[76]]= [{all:true}]};_0x8627x1f= _[_0xed33[68]]({},_0x8627x1f,_0x8627x2c[_0xed33[72]]);return db[_0xed33[50]][_0xed33[81]](_0x8627x1f)[_0xed33[40]](handleEntityNotFound(_0x8627x1a,null))[_0xed33[40]](respondWithResult(_0x8627x1a,null))[_0xed33[73]](handleError(_0x8627x1a,null))};exports[_0xed33[82]]= function(_0x8627x2c,_0x8627x1a){return db[_0xed33[50]][_0xed33[82]](_0x8627x2c[_0xed33[83]],{})[_0xed33[40]](respondWithResult(_0x8627x1a,201))[_0xed33[73]](handleError(_0x8627x1a,null))};exports[_0xed33[41]]= function(_0x8627x2c,_0x8627x1a){if(_0x8627x2c[_0xed33[83]][_0xed33[79]]){delete _0x8627x2c[_0xed33[83]][_0xed33[79]]};return db[_0xed33[50]][_0xed33[81]]({where:{id:_0x8627x2c[_0xed33[80]][_0xed33[79]]}})[_0xed33[40]](handleEntityNotFound(_0x8627x1a,null))[_0xed33[40]](saveUpdates(_0x8627x2c[_0xed33[83]],null))[_0xed33[40]](respondWithResult(_0x8627x1a,null))[_0xed33[73]](handleError(_0x8627x1a,null))};exports[_0xed33[42]]= function(_0x8627x2c,_0x8627x1a){return db[_0xed33[50]][_0xed33[81]]({where:{id:_0x8627x2c[_0xed33[80]][_0xed33[79]]}})[_0xed33[40]](handleEntityNotFound(_0x8627x1a,null))[_0xed33[40]](removeEntity(_0x8627x1a,null))[_0xed33[73]](handleError(_0x8627x1a,null))}
\ No newline at end of file
index 7000229..5646a5e 100644 (file)
@@ -1 +1 @@
-var _0x7115=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x69\x6E\x74\x5F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0x7115[0];var _=require(_0x7115[1]);var util=require(_0x7115[2]);var logger=require(_0x7115[4])(_0x7115[3]);var moment=require(_0x7115[5]);var BPromise=require(_0x7115[6]);var rp=require(_0x7115[7]);var attributes=require(_0x7115[8]);module[_0x7115[9]]= function(_0xa14cx8,_0xa14cx9){return _0xa14cx8[_0x7115[12]](_0x7115[10],attributes,{tableName:_0x7115[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xdce4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x69\x6E\x74\x5F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0xdce4[0];var _=require(_0xdce4[1]);var util=require(_0xdce4[2]);var logger=require(_0xdce4[4])(_0xdce4[3]);var moment=require(_0xdce4[5]);var BPromise=require(_0xdce4[6]);var rp=require(_0xdce4[7]);var attributes=require(_0xdce4[8]);module[_0xdce4[9]]= function(_0xf580x8,_0xf580x9){return _0xf580x8[_0xdce4[12]](_0xdce4[10],attributes,{tableName:_0xdce4[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 79a691a..dd0a837 100644 (file)
@@ -1 +1 @@
-var _0xa468=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xa468[0];var _=require(_0xa468[1]);var util=require(_0xa468[2]);var moment=require(_0xa468[3]);var BPromise=require(_0xa468[4]);var rs=require(_0xa468[5]);var fs=require(_0xa468[6]);var db=require(_0xa468[8])[_0xa468[7]];var utils=require(_0xa468[9]);var logger=require(_0xa468[11])(_0xa468[10]);var config=require(_0xa468[12]);var jayson=require(_0xa468[13]);var client=jayson[_0xa468[15]][_0xa468[14]]({port:9002});function respondWithRpcPromise(_0x7adaxe,_0x7adaxf,_0x7adax10){return  new BPromise(function(_0x7adax11,_0x7adax12){return client[_0xa468[28]](_0x7adaxe,_0x7adax10)[_0xa468[27]](function(_0x7adax14){logger[_0xa468[20]](_0xa468[16],_0x7adaxf,_0xa468[19]);logger[_0xa468[23]](_0xa468[21],_0x7adaxf,_0xa468[19],JSON[_0xa468[22]](_0x7adax14));if(_0x7adax14[_0xa468[17]]){if(_0x7adax14[_0xa468[17]][_0xa468[24]]=== 500){logger[_0xa468[17]](_0xa468[16],_0x7adaxf,_0x7adax14[_0xa468[17]][_0xa468[25]]);return _0x7adax12(_0x7adax14[_0xa468[17]][_0xa468[25]])};logger[_0xa468[17]](_0xa468[16],_0x7adaxf,_0x7adax14[_0xa468[17]][_0xa468[25]]);return _0x7adax11(_0x7adax14[_0xa468[17]][_0xa468[25]])}else {logger[_0xa468[20]](_0xa468[16],_0x7adaxf,_0xa468[19]);_0x7adax11(_0x7adax14[_0xa468[26]][_0xa468[25]])}})[_0xa468[18]](function(_0x7adax13){logger[_0xa468[17]](_0xa468[16],_0x7adaxf,_0x7adax13);_0x7adax12(_0x7adax13)})})}
\ No newline at end of file
+var _0xf7a1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xf7a1[0];var _=require(_0xf7a1[1]);var util=require(_0xf7a1[2]);var moment=require(_0xf7a1[3]);var BPromise=require(_0xf7a1[4]);var rs=require(_0xf7a1[5]);var fs=require(_0xf7a1[6]);var db=require(_0xf7a1[8])[_0xf7a1[7]];var utils=require(_0xf7a1[9]);var logger=require(_0xf7a1[11])(_0xf7a1[10]);var config=require(_0xf7a1[12]);var jayson=require(_0xf7a1[13]);var client=jayson[_0xf7a1[15]][_0xf7a1[14]]({port:9002});function respondWithRpcPromise(_0x4f21xe,_0x4f21xf,_0x4f21x10){return  new BPromise(function(_0x4f21x11,_0x4f21x12){return client[_0xf7a1[28]](_0x4f21xe,_0x4f21x10)[_0xf7a1[27]](function(_0x4f21x14){logger[_0xf7a1[20]](_0xf7a1[16],_0x4f21xf,_0xf7a1[19]);logger[_0xf7a1[23]](_0xf7a1[21],_0x4f21xf,_0xf7a1[19],JSON[_0xf7a1[22]](_0x4f21x14));if(_0x4f21x14[_0xf7a1[17]]){if(_0x4f21x14[_0xf7a1[17]][_0xf7a1[24]]=== 500){logger[_0xf7a1[17]](_0xf7a1[16],_0x4f21xf,_0x4f21x14[_0xf7a1[17]][_0xf7a1[25]]);return _0x4f21x12(_0x4f21x14[_0xf7a1[17]][_0xf7a1[25]])};logger[_0xf7a1[17]](_0xf7a1[16],_0x4f21xf,_0x4f21x14[_0xf7a1[17]][_0xf7a1[25]]);return _0x4f21x11(_0x4f21x14[_0xf7a1[17]][_0xf7a1[25]])}else {logger[_0xf7a1[20]](_0xf7a1[16],_0x4f21xf,_0xf7a1[19]);_0x4f21x11(_0x4f21x14[_0xf7a1[26]][_0xf7a1[25]])}})[_0xf7a1[18]](function(_0x4f21x13){logger[_0xf7a1[17]](_0xf7a1[16],_0x4f21xf,_0x4f21x13);_0x4f21x12(_0x4f21x13)})})}
\ No newline at end of file
index 05c17b2..640a043 100644 (file)
@@ -1 +1 @@
-var _0x8ed3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x8ed3[0];var multer=require(_0x8ed3[1]);var util=require(_0x8ed3[2]);var path=require(_0x8ed3[3]);var express=require(_0x8ed3[4]);var router=express.Router();var auth=require(_0x8ed3[5]);var interaction=require(_0x8ed3[6]);var config=require(_0x8ed3[7]);var controller=require(_0x8ed3[8]);router[_0x8ed3[12]](_0x8ed3[9],auth[_0x8ed3[10]](),controller[_0x8ed3[11]]);router[_0x8ed3[12]](_0x8ed3[13],auth[_0x8ed3[10]](),controller[_0x8ed3[14]]);router[_0x8ed3[12]](_0x8ed3[15],auth[_0x8ed3[10]](),controller[_0x8ed3[16]]);router[_0x8ed3[12]](_0x8ed3[17],auth[_0x8ed3[10]](),controller[_0x8ed3[18]]);router[_0x8ed3[20]](_0x8ed3[9],auth[_0x8ed3[10]](),controller[_0x8ed3[19]]);router[_0x8ed3[20]](_0x8ed3[15],auth[_0x8ed3[10]](),controller[_0x8ed3[21]]);router[_0x8ed3[23]](_0x8ed3[13],auth[_0x8ed3[10]](),controller[_0x8ed3[22]]);router[_0x8ed3[25]](_0x8ed3[13],auth[_0x8ed3[10]](),controller[_0x8ed3[24]]);module[_0x8ed3[26]]= router
\ No newline at end of file
+var _0x6c9a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6c9a[0];var multer=require(_0x6c9a[1]);var util=require(_0x6c9a[2]);var path=require(_0x6c9a[3]);var express=require(_0x6c9a[4]);var router=express.Router();var auth=require(_0x6c9a[5]);var interaction=require(_0x6c9a[6]);var config=require(_0x6c9a[7]);var controller=require(_0x6c9a[8]);router[_0x6c9a[12]](_0x6c9a[9],auth[_0x6c9a[10]](),controller[_0x6c9a[11]]);router[_0x6c9a[12]](_0x6c9a[13],auth[_0x6c9a[10]](),controller[_0x6c9a[14]]);router[_0x6c9a[12]](_0x6c9a[15],auth[_0x6c9a[10]](),controller[_0x6c9a[16]]);router[_0x6c9a[12]](_0x6c9a[17],auth[_0x6c9a[10]](),controller[_0x6c9a[18]]);router[_0x6c9a[20]](_0x6c9a[9],auth[_0x6c9a[10]](),controller[_0x6c9a[19]]);router[_0x6c9a[20]](_0x6c9a[15],auth[_0x6c9a[10]](),controller[_0x6c9a[21]]);router[_0x6c9a[23]](_0x6c9a[13],auth[_0x6c9a[10]](),controller[_0x6c9a[22]]);router[_0x6c9a[25]](_0x6c9a[13],auth[_0x6c9a[10]](),controller[_0x6c9a[24]]);module[_0x6c9a[26]]= router
\ No newline at end of file
index 7af4072..084c87c 100644 (file)
@@ -1 +1 @@
-var _0x53d3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x54\x61\x62","\x6E\x65\x77\x54\x61\x62"];_0x53d3[0];var Sequelize=require(_0x53d3[1]);module[_0x53d3[2]]= {name:{type:Sequelize[_0x53d3[3]]},description:{type:Sequelize[_0x53d3[3]]},username:{type:Sequelize[_0x53d3[3]],unique:_0x53d3[4]},remoteUri:{type:Sequelize[_0x53d3[3]]},password:{type:Sequelize[_0x53d3[3]]},clientId:{type:Sequelize[_0x53d3[3]]},clientSecret:{type:Sequelize[_0x53d3[3]]},securityToken:{type:Sequelize[_0x53d3[3]]},serverUrl:{type:Sequelize[_0x53d3[3]]},type:{type:Sequelize.ENUM(_0x53d3[5],_0x53d3[6]),defaultValue:_0x53d3[5]}}
\ No newline at end of file
+var _0xdd8a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x54\x61\x62","\x6E\x65\x77\x54\x61\x62"];_0xdd8a[0];var Sequelize=require(_0xdd8a[1]);module[_0xdd8a[2]]= {name:{type:Sequelize[_0xdd8a[3]]},description:{type:Sequelize[_0xdd8a[3]]},username:{type:Sequelize[_0xdd8a[3]],unique:_0xdd8a[4]},remoteUri:{type:Sequelize[_0xdd8a[3]]},password:{type:Sequelize[_0xdd8a[3]]},clientId:{type:Sequelize[_0xdd8a[3]]},clientSecret:{type:Sequelize[_0xdd8a[3]]},securityToken:{type:Sequelize[_0xdd8a[3]]},serverUrl:{type:Sequelize[_0xdd8a[3]]},type:{type:Sequelize.ENUM(_0xdd8a[5],_0xdd8a[6]),defaultValue:_0xdd8a[5]}}
\ No newline at end of file
index 61b41dd..3a1675f 100644 (file)
@@ -1 +1 @@
-var _0x9835=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x79\x70\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x74\x65\x73\x74","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73","\x43\x61\x6C\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x43\x61\x6C\x6C\x44\x75\x72\x61\x74\x69\x6F\x6E\x49\x6E\x53\x65\x63\x6F\x6E\x64\x73","\x43\x61\x6C\x6C\x4F\x62\x6A\x65\x63\x74","\x43\x61\x6C\x6C\x54\x79\x70\x65","\x49\x73\x41\x72\x63\x68\x69\x76\x65\x64","\x50\x72\x69\x6F\x72\x69\x74\x79","\x53\x74\x61\x74\x75\x73","\x54\x79\x70\x65","\x63\x75\x73\x74\x6F\x6D","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x72\x65\x6D\x6F\x76\x65","\x6C\x61\x62\x65\x6C","\x70\x69\x63\x6B\x6C\x69\x73\x74\x56\x61\x6C\x75\x65\x73","\x76\x61\x6C\x75\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x54\x61\x73\x6B","\x73\x6F\x62\x6A\x65\x63\x74","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x63\x6C\x69\x65\x6E\x74\x49\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x73\x65\x63\x75\x72\x69\x74\x79\x54\x6F\x6B\x65\x6E","\x63\x6F\x6E\x63\x61\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x6C\x6F\x67\x69\x6E"];_0x9835[0];var jsonpatch=require(_0x9835[1]);var rp=require(_0x9835[2]);var moment=require(_0x9835[3]);var BPromise=require(_0x9835[4]);var Mustache=require(_0x9835[5]);var util=require(_0x9835[6]);var path=require(_0x9835[7]);var sox=require(_0x9835[8]);var csv=require(_0x9835[9]);var ejs=require(_0x9835[10]);var fs=require(_0x9835[11]);var _=require(_0x9835[12]);var squel=require(_0x9835[13]);var crypto=require(_0x9835[14]);var jsforce=require(_0x9835[15]);var deskjs=require(_0x9835[16]);var toCsv=require(_0x9835[9]);var querystring=require(_0x9835[17]);var Papa=require(_0x9835[18]);var qs=require(_0x9835[19]);var logger=require(_0x9835[21])(_0x9835[20]);var utils=require(_0x9835[22]);var config=require(_0x9835[23]);var db=require(_0x9835[25])[_0x9835[24]];var integrations=require(_0x9835[26]);var jayson=require(_0x9835[27]);var client=jayson[_0x9835[29]][_0x9835[28]]({port:9002});function respondWithRpcPromise(_0x3641x1d,_0x3641x1e,_0x3641x1f,_0x3641x20){return  new BPromise(function(_0x3641x21,_0x3641x22){var _0x3641x23=(_0x3641x20|| client);return _0x3641x23[_0x9835[42]](_0x3641x1d,_0x3641x1f)[_0x9835[41]](function(_0x3641x25){logger[_0x9835[34]](_0x9835[30],_0x3641x1e,_0x9835[33]);logger[_0x9835[37]](_0x9835[35],_0x3641x1e,_0x9835[33],JSON[_0x9835[36]](_0x3641x25));if(_0x3641x25[_0x9835[31]]){if(_0x3641x25[_0x9835[31]][_0x9835[38]]=== 500){logger[_0x9835[31]](_0x9835[30],_0x3641x1e,_0x3641x25[_0x9835[31]][_0x9835[39]]);return _0x3641x22(_0x3641x25[_0x9835[31]][_0x9835[39]])};logger[_0x9835[31]](_0x9835[30],_0x3641x1e,_0x3641x25[_0x9835[31]][_0x9835[39]]);return _0x3641x21(_0x3641x25[_0x9835[31]][_0x9835[39]])}else {logger[_0x9835[34]](_0x9835[30],_0x3641x1e,_0x9835[33]);_0x3641x21(_0x3641x25[_0x9835[40]][_0x9835[39]])}})[_0x9835[32]](function(_0x3641x24){logger[_0x9835[31]](_0x9835[30],_0x3641x1e,_0x3641x24);_0x3641x22(_0x3641x24)})})}function respondWithStatusCode(_0x3641x25,_0x3641x27){_0x3641x27= _0x3641x27|| 204;return function(_0x3641x28){if(_0x3641x28){return _0x3641x25[_0x9835[43]](_0x3641x27)};return _0x3641x25[_0x9835[45]](_0x3641x27)[_0x9835[44]]()}}function respondWithResult(_0x3641x25,_0x3641x27){_0x3641x27= _0x3641x27|| 200;return function(_0x3641x28){if(_0x3641x28){return _0x3641x25[_0x9835[45]](_0x3641x27)[_0x9835[46]](_0x3641x28)}}}function respondWithFilteredResult(_0x3641x25,_0x3641x2b){return function(_0x3641x28){if(_0x3641x28){var _0x3641x2c=_0x3641x28[_0x9835[47]],_0x3641x2d=_0x3641x2b[_0x9835[48]],_0x3641x2e=_0x3641x2b[_0x9835[48]]+ _0x3641x2b[_0x9835[49]],_0x3641x27;if(_0x3641x2e>= _0x3641x2c){_0x3641x2e= _0x3641x2c;_0x3641x27= 200}else {_0x3641x27= 206};_0x3641x25[_0x9835[45]](_0x3641x27);return _0x3641x25[_0x9835[53]](_0x9835[50],_0x3641x2d+ _0x9835[51]+ _0x3641x2e+ _0x9835[52]+ _0x3641x2c)[_0x9835[46]](_0x3641x28)};return null}}function patchUpdates(_0x3641x30){return function(_0x3641x28){try{jsonpatch[_0x9835[54]](_0x3641x28,_0x3641x30,true)}catch(err){return BPromise[_0x9835[55]](err)};return _0x3641x28[_0x9835[56]]()}}function saveUpdates(_0x3641x32,_0x3641x27){return function(_0x3641x28){if(_0x3641x28){return _0x3641x28[_0x9835[57]](_0x3641x32)[_0x9835[41]](function(_0x3641x33){return _0x3641x33})};return null}}function removeEntity(_0x3641x25,_0x3641x27){return function(_0x3641x28){if(_0x3641x28){return _0x3641x28[_0x9835[58]]()[_0x9835[41]](function(){_0x3641x25[_0x9835[45]](204)[_0x9835[44]]()})}}}function handleEntityNotFound(_0x3641x25,_0x3641x27){return function(_0x3641x28){if(!_0x3641x28){_0x3641x25[_0x9835[43]](404)};return _0x3641x28}}function handleError(_0x3641x25,_0x3641x27){_0x3641x27= _0x3641x27|| 500;return function(_0x3641x24){logger[_0x9835[31]](_0x3641x24[_0x9835[59]]);if(_0x3641x24[_0x9835[60]]){delete _0x3641x24[_0x9835[60]]};_0x3641x25[_0x9835[45]](_0x3641x27)[_0x9835[61]](_0x3641x24)}}exports[_0x9835[62]]= function(_0x3641x1f,_0x3641x25){var _0x3641x2b={},_0x3641x37={},_0x3641x38={count:0,rows:[]};_0x3641x37[_0x9835[63]]= _[_0x9835[66]](db[_0x9835[65]][_0x9835[64]]);var _0x3641x39={dateStart:_0x3641x1f[_0x9835[68]][_0x9835[67]],dateEnd:_0x3641x1f[_0x9835[68]][_0x9835[69]]};delete _0x3641x1f[_0x9835[68]][_0x9835[67]];delete _0x3641x1f[_0x9835[68]][_0x9835[69]];_0x3641x37[_0x9835[68]]= _[_0x9835[66]](_0x3641x1f[_0x9835[68]]);_0x3641x37[_0x9835[70]]= _[_0x9835[71]](_0x3641x37[_0x9835[63]],_0x3641x37[_0x9835[68]]);_0x3641x2b[_0x9835[72]]= _[_0x9835[71]](_0x3641x37[_0x9835[63]],qs[_0x9835[73]](_0x3641x1f[_0x9835[68]][_0x9835[73]]));_0x3641x2b[_0x9835[72]]= (_0x3641x2b[_0x9835[72]][_0x9835[74]])?_0x3641x2b[_0x9835[72]]:_0x3641x37[_0x9835[63]];if(!_0x3641x1f[_0x9835[68]][_0x9835[76]](_0x9835[75])){_0x3641x2b[_0x9835[49]]= qs[_0x9835[49]](_0x3641x1f[_0x9835[68]][_0x9835[49]]);_0x3641x2b[_0x9835[48]]= qs[_0x9835[48]](_0x3641x1f[_0x9835[68]][_0x9835[48]])};_0x3641x2b[_0x9835[77]]= qs[_0x9835[78]](_0x3641x1f[_0x9835[68]][_0x9835[78]]);_0x3641x2b[_0x9835[79]]= qs[_0x9835[70]](_[_0x9835[80]](_0x3641x1f[_0x9835[68]],_0x3641x37[_0x9835[70]]));if(_0x3641x39[_0x9835[67]]){if(_0x3641x39[_0x9835[69]]){_0x3641x39[_0x9835[69]]= moment(_0x3641x39[_0x9835[69]])[_0x9835[82]](1,_0x9835[81])}else {_0x3641x39[_0x9835[69]]= moment(_0x3641x39[_0x9835[67]])[_0x9835[82]](1,_0x9835[81])};_[_0x9835[83]](_0x3641x2b[_0x9835[79]],{createdAt:{$gte:_0x3641x39[_0x9835[67]],$lte:_0x3641x39[_0x9835[69]]}})};if(_0x3641x1f[_0x9835[68]][_0x9835[84]]){_0x3641x2b[_0x9835[79]]= _[_0x9835[83]](_0x3641x2b[_0x9835[79]],{$or:_[_0x9835[86]](_0x3641x2b[_0x9835[72]],function(_0x3641x3a){var _0x3641x38={};_0x3641x38[_0x3641x3a]= {$like:_0x9835[85]+ _0x3641x1f[_0x9835[68]][_0x9835[84]]+ _0x9835[85]};return _0x3641x38})})};_0x3641x2b= _[_0x9835[83]]({},_0x3641x2b,_0x3641x1f[_0x9835[87]]);var _0x3641x3b={where:_0x3641x2b[_0x9835[79]]};return db[_0x9835[65]][_0x9835[47]](_0x3641x3b)[_0x9835[41]](function(_0x3641x2c){_0x3641x38[_0x9835[47]]= _0x3641x2c;if(_0x3641x1f[_0x9835[68]][_0x9835[89]]){_0x3641x2b[_0x9835[90]]= [{all:true}]};return db[_0x9835[65]][_0x9835[91]](_0x3641x2b)})[_0x9835[41]](function(_0x3641x3c){_0x3641x38[_0x9835[88]]= _0x3641x3c;return _0x3641x38})[_0x9835[41]](respondWithFilteredResult(_0x3641x25,_0x3641x2b))[_0x9835[32]](handleError(_0x3641x25,null))};exports[_0x9835[92]]= function(_0x3641x1f,_0x3641x25){var _0x3641x2b={raw:false,where:{id:_0x3641x1f[_0x9835[94]][_0x9835[93]]}},_0x3641x37={};_0x3641x37[_0x9835[63]]= _[_0x9835[66]](db[_0x9835[65]][_0x9835[64]]);_0x3641x37[_0x9835[68]]= _[_0x9835[66]](_0x3641x1f[_0x9835[68]]);_0x3641x37[_0x9835[70]]= _[_0x9835[71]](_0x3641x37[_0x9835[63]],_0x3641x37[_0x9835[68]]);_0x3641x2b[_0x9835[72]]= _[_0x9835[71]](_0x3641x37[_0x9835[63]],qs[_0x9835[73]](_0x3641x1f[_0x9835[68]][_0x9835[73]]));_0x3641x2b[_0x9835[72]]= (_0x3641x2b[_0x9835[72]][_0x9835[74]])?_0x3641x2b[_0x9835[72]]:_0x3641x37[_0x9835[63]];if(_0x3641x1f[_0x9835[68]][_0x9835[89]]){_0x3641x2b[_0x9835[90]]= [{all:true}]};_0x3641x2b= _[_0x9835[83]]({},_0x3641x2b,_0x3641x1f[_0x9835[87]]);return db[_0x9835[65]][_0x9835[95]](_0x3641x2b)[_0x9835[41]](handleEntityNotFound(_0x3641x25,null))[_0x9835[41]](respondWithResult(_0x3641x25,null))[_0x9835[32]](handleError(_0x3641x25,null))};exports[_0x9835[96]]= function(_0x3641x1f,_0x3641x25){return db[_0x9835[65]][_0x9835[96]](_0x3641x1f[_0x9835[97]],{})[_0x9835[41]](respondWithResult(_0x3641x25,201))[_0x9835[32]](handleError(_0x3641x25,null))};exports[_0x9835[57]]= function(_0x3641x1f,_0x3641x25){if(_0x3641x1f[_0x9835[97]][_0x9835[93]]){delete _0x3641x1f[_0x9835[97]][_0x9835[93]]};return db[_0x9835[65]][_0x9835[95]]({where:{id:_0x3641x1f[_0x9835[94]][_0x9835[93]]}})[_0x9835[41]](handleEntityNotFound(_0x3641x25,null))[_0x9835[41]](saveUpdates(_0x3641x1f[_0x9835[97]],null))[_0x9835[41]](respondWithResult(_0x3641x25,null))[_0x9835[32]](handleError(_0x3641x25,null))};exports[_0x9835[58]]= function(_0x3641x1f,_0x3641x25){return db[_0x9835[65]][_0x9835[95]]({where:{id:_0x3641x1f[_0x9835[94]][_0x9835[93]]}})[_0x9835[41]](handleEntityNotFound(_0x3641x25,null))[_0x9835[41]](removeEntity(_0x3641x25,null))[_0x9835[32]](handleError(_0x3641x25,null))};exports[_0x9835[98]]= function(_0x3641x1f,_0x3641x28,_0x3641x3d){var _0x3641x2b={};var _0x3641x37={};var _0x3641x3e;var _0x3641x2c;return db[_0x9835[65]][_0x9835[100]]({where:{id:_0x3641x1f[_0x9835[94]][_0x9835[93]]}})[_0x9835[41]](handleEntityNotFound(_0x3641x28,null))[_0x9835[41]](function(_0x3641x28){if(_0x3641x28){_0x3641x3e= _0x3641x28;_0x3641x37[_0x9835[63]]= _[_0x9835[66]](db[_0x9835[99]][_0x9835[64]]);_0x3641x37[_0x9835[68]]= _[_0x9835[66]](_0x3641x1f[_0x9835[68]]);_0x3641x37[_0x9835[70]]= _[_0x9835[71]](_0x3641x37[_0x9835[63]],_0x3641x37[_0x9835[68]]);_0x3641x2b[_0x9835[72]]= _[_0x9835[71]](_0x3641x37[_0x9835[63]],qs[_0x9835[73]](_0x3641x1f[_0x9835[68]][_0x9835[73]]));_0x3641x2b[_0x9835[72]]= (_0x3641x2b[_0x9835[72]][_0x9835[74]])?_0x3641x2b[_0x9835[72]]:_0x3641x37[_0x9835[63]];_0x3641x2b[_0x9835[77]]= qs[_0x9835[78]](_0x3641x1f[_0x9835[68]][_0x9835[78]]);_0x3641x2b[_0x9835[79]]= qs[_0x9835[70]](_[_0x9835[80]](_0x3641x1f[_0x9835[68]],_0x3641x37[_0x9835[70]]));if(_0x3641x1f[_0x9835[68]][_0x9835[84]]){_0x3641x2b[_0x9835[79]]= _[_0x9835[83]](_0x3641x2b[_0x9835[79]],{$or:_[_0x9835[86]](_0x3641x2b[_0x9835[72]],function(_0x3641x3a){var _0x3641x38={};_0x3641x38[_0x3641x3a]= {$like:_0x9835[85]+ _0x3641x1f[_0x9835[68]][_0x9835[84]]+ _0x9835[85]};return _0x3641x38})})};_0x3641x2b= _[_0x9835[83]]({},_0x3641x2b,_0x3641x1f[_0x9835[87]]);return _0x3641x3e[_0x9835[98]](_0x3641x2b)}})[_0x9835[41]](function(_0x3641x3f){if(_0x3641x3f){_0x3641x2c= _0x3641x3f[_0x9835[74]];if(!_0x3641x1f[_0x9835[68]][_0x9835[76]](_0x9835[75])){_0x3641x2b[_0x9835[49]]= qs[_0x9835[49]](_0x3641x1f[_0x9835[68]][_0x9835[49]]);_0x3641x2b[_0x9835[48]]= qs[_0x9835[48]](_0x3641x1f[_0x9835[68]][_0x9835[48]])};return _0x3641x3e[_0x9835[98]](_0x3641x2b)}})[_0x9835[41]](function(_0x3641x3c){if(_0x3641x3c){return _0x3641x3c?{count:_0x3641x2c,rows:_0x3641x3c}:null}})[_0x9835[41]](respondWithResult(_0x3641x28,null))[_0x9835[32]](handleError(_0x3641x28,null))};exports[_0x9835[101]]= function(_0x3641x1f,_0x3641x25,_0x3641x3d){if(_0x3641x1f[_0x9835[97]][_0x9835[93]]){delete _0x3641x1f[_0x9835[97]][_0x9835[93]]};return db[_0x9835[65]][_0x9835[100]]({where:{id:_0x3641x1f[_0x9835[94]][_0x9835[93]]}})[_0x9835[41]](handleEntityNotFound(_0x3641x25,null))[_0x9835[41]](function(_0x3641x28){if(_0x3641x28){_0x3641x1f[_0x9835[97]][_0x9835[102]]= _0x3641x28[_0x9835[93]];_0x3641x1f[_0x9835[97]][_0x9835[103]]= integrations[_0x9835[106]](_0x3641x1f[_0x9835[97]][_0x9835[104]],_0x3641x1f[_0x9835[97]][_0x9835[105]]);_0x3641x1f[_0x9835[97]][_0x9835[107]]= integrations[_0x9835[108]](_0x3641x1f[_0x9835[97]][_0x9835[104]],_0x3641x1f[_0x9835[97]][_0x9835[105]]);return db[_0x9835[99]][_0x9835[96]](_0x3641x1f[_0x9835[97]],{include:[{model:db[_0x9835[109]],as:_0x9835[103]},{model:db[_0x9835[109]],as:_0x9835[107]}]})};return null})[_0x9835[41]](respondWithResult(_0x3641x25,null))[_0x9835[32]](handleError(_0x3641x25,null))};exports[_0x9835[110]]= function(_0x3641x1f,_0x3641x25,_0x3641x3d){var _0x3641x40;return db[_0x9835[65]][_0x9835[100]]({where:{id:_0x3641x1f[_0x9835[94]][_0x9835[93]]},attributes:[_0x9835[93],_0x9835[132],_0x9835[133],_0x9835[134],_0x9835[135],_0x9835[138],_0x9835[136]]})[_0x9835[41]](handleEntityNotFound(_0x3641x25,null))[_0x9835[41]](function(_0x3641x28){if(_0x3641x28){_0x3641x40=  new jsforce.Connection({oauth2:{loginUrl:_0x3641x28[_0x9835[132]],clientId:_0x3641x28[_0x9835[133]],clientSecret:_0x3641x28[_0x9835[134]]}});return _0x3641x40[_0x9835[139]](_0x3641x28[_0x9835[135]],_0x3641x28[_0x9835[138]][_0x9835[137]](_0x3641x28[_0x9835[136]]))}})[_0x9835[41]](function(_0x3641x28){if(_0x3641x28){return _0x3641x40[_0x9835[131]](_0x9835[130])[_0x9835[129]]()}})[_0x9835[41]](function(_0x3641x28){var _0x3641x41=[_0x9835[115],_0x9835[116],_0x9835[117],_0x9835[118],_0x9835[119],_0x9835[120],_0x9835[121],_0x9835[122]];if(_0x3641x28){_[_0x9835[125]](_0x3641x28[_0x9835[73]],function(_0x3641x42){return (_0x3641x42[_0x9835[123]]=== false&&  !_0x3641x41[_0x9835[124]](_0x3641x42[_0x9835[60]]))});return {count:_0x3641x28[_0x9835[73]][_0x9835[74]],rows:_[_0x9835[86]](_0x3641x28[_0x9835[73]],function(_0x3641x42){return {id:_0x3641x42[_0x9835[60]],name:_0x3641x42[_0x9835[126]],custom:_0x3641x42[_0x9835[123]],options:_0x3641x42[_0x9835[127]]?_[_0x9835[86]](_0x3641x42[_0x9835[127]],function(_0x3641x3a){return {name:_0x3641x3a[_0x9835[126]],value:_0x3641x3a[_0x9835[128]]}}):[]}})}}})[_0x9835[41]](respondWithResult(_0x3641x25,null))[_0x9835[32]](function(_0x3641x24){var _0x3641x27=_0x3641x1f[_0x9835[68]][_0x9835[111]]?500:(_0x3641x24[_0x9835[112]]|| 500);logger[_0x9835[31]](_0x9835[113],_0x9835[110],_0x3641x27,JSON[_0x9835[36]](_0x3641x24));delete _0x3641x24[_0x9835[60]];if(_0x3641x27=== 401){_0x3641x27= 400};_0x3641x25[_0x9835[45]](_0x3641x27)[_0x9835[61]](_0x3641x1f[_0x9835[68]][_0x9835[111]]?{message:_0x9835[114],statusCode:_0x3641x24[_0x9835[112]]}:_0x3641x24)})}
\ No newline at end of file
+var _0x70f0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x79\x70\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x74\x65\x73\x74","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73","\x43\x61\x6C\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x43\x61\x6C\x6C\x44\x75\x72\x61\x74\x69\x6F\x6E\x49\x6E\x53\x65\x63\x6F\x6E\x64\x73","\x43\x61\x6C\x6C\x4F\x62\x6A\x65\x63\x74","\x43\x61\x6C\x6C\x54\x79\x70\x65","\x49\x73\x41\x72\x63\x68\x69\x76\x65\x64","\x50\x72\x69\x6F\x72\x69\x74\x79","\x53\x74\x61\x74\x75\x73","\x54\x79\x70\x65","\x63\x75\x73\x74\x6F\x6D","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x72\x65\x6D\x6F\x76\x65","\x6C\x61\x62\x65\x6C","\x70\x69\x63\x6B\x6C\x69\x73\x74\x56\x61\x6C\x75\x65\x73","\x76\x61\x6C\x75\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x54\x61\x73\x6B","\x73\x6F\x62\x6A\x65\x63\x74","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x63\x6C\x69\x65\x6E\x74\x49\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x73\x65\x63\x75\x72\x69\x74\x79\x54\x6F\x6B\x65\x6E","\x63\x6F\x6E\x63\x61\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x6C\x6F\x67\x69\x6E"];_0x70f0[0];var jsonpatch=require(_0x70f0[1]);var rp=require(_0x70f0[2]);var moment=require(_0x70f0[3]);var BPromise=require(_0x70f0[4]);var Mustache=require(_0x70f0[5]);var util=require(_0x70f0[6]);var path=require(_0x70f0[7]);var sox=require(_0x70f0[8]);var csv=require(_0x70f0[9]);var ejs=require(_0x70f0[10]);var fs=require(_0x70f0[11]);var _=require(_0x70f0[12]);var squel=require(_0x70f0[13]);var crypto=require(_0x70f0[14]);var jsforce=require(_0x70f0[15]);var deskjs=require(_0x70f0[16]);var toCsv=require(_0x70f0[9]);var querystring=require(_0x70f0[17]);var Papa=require(_0x70f0[18]);var qs=require(_0x70f0[19]);var logger=require(_0x70f0[21])(_0x70f0[20]);var utils=require(_0x70f0[22]);var config=require(_0x70f0[23]);var db=require(_0x70f0[25])[_0x70f0[24]];var integrations=require(_0x70f0[26]);var jayson=require(_0x70f0[27]);var client=jayson[_0x70f0[29]][_0x70f0[28]]({port:9002});function respondWithRpcPromise(_0xfdc1x1d,_0xfdc1x1e,_0xfdc1x1f,_0xfdc1x20){return  new BPromise(function(_0xfdc1x21,_0xfdc1x22){var _0xfdc1x23=(_0xfdc1x20|| client);return _0xfdc1x23[_0x70f0[42]](_0xfdc1x1d,_0xfdc1x1f)[_0x70f0[41]](function(_0xfdc1x25){logger[_0x70f0[34]](_0x70f0[30],_0xfdc1x1e,_0x70f0[33]);logger[_0x70f0[37]](_0x70f0[35],_0xfdc1x1e,_0x70f0[33],JSON[_0x70f0[36]](_0xfdc1x25));if(_0xfdc1x25[_0x70f0[31]]){if(_0xfdc1x25[_0x70f0[31]][_0x70f0[38]]=== 500){logger[_0x70f0[31]](_0x70f0[30],_0xfdc1x1e,_0xfdc1x25[_0x70f0[31]][_0x70f0[39]]);return _0xfdc1x22(_0xfdc1x25[_0x70f0[31]][_0x70f0[39]])};logger[_0x70f0[31]](_0x70f0[30],_0xfdc1x1e,_0xfdc1x25[_0x70f0[31]][_0x70f0[39]]);return _0xfdc1x21(_0xfdc1x25[_0x70f0[31]][_0x70f0[39]])}else {logger[_0x70f0[34]](_0x70f0[30],_0xfdc1x1e,_0x70f0[33]);_0xfdc1x21(_0xfdc1x25[_0x70f0[40]][_0x70f0[39]])}})[_0x70f0[32]](function(_0xfdc1x24){logger[_0x70f0[31]](_0x70f0[30],_0xfdc1x1e,_0xfdc1x24);_0xfdc1x22(_0xfdc1x24)})})}function respondWithStatusCode(_0xfdc1x25,_0xfdc1x27){_0xfdc1x27= _0xfdc1x27|| 204;return function(_0xfdc1x28){if(_0xfdc1x28){return _0xfdc1x25[_0x70f0[43]](_0xfdc1x27)};return _0xfdc1x25[_0x70f0[45]](_0xfdc1x27)[_0x70f0[44]]()}}function respondWithResult(_0xfdc1x25,_0xfdc1x27){_0xfdc1x27= _0xfdc1x27|| 200;return function(_0xfdc1x28){if(_0xfdc1x28){return _0xfdc1x25[_0x70f0[45]](_0xfdc1x27)[_0x70f0[46]](_0xfdc1x28)}}}function respondWithFilteredResult(_0xfdc1x25,_0xfdc1x2b){return function(_0xfdc1x28){if(_0xfdc1x28){var _0xfdc1x2c=_0xfdc1x28[_0x70f0[47]],_0xfdc1x2d=_0xfdc1x2b[_0x70f0[48]],_0xfdc1x2e=_0xfdc1x2b[_0x70f0[48]]+ _0xfdc1x2b[_0x70f0[49]],_0xfdc1x27;if(_0xfdc1x2e>= _0xfdc1x2c){_0xfdc1x2e= _0xfdc1x2c;_0xfdc1x27= 200}else {_0xfdc1x27= 206};_0xfdc1x25[_0x70f0[45]](_0xfdc1x27);return _0xfdc1x25[_0x70f0[53]](_0x70f0[50],_0xfdc1x2d+ _0x70f0[51]+ _0xfdc1x2e+ _0x70f0[52]+ _0xfdc1x2c)[_0x70f0[46]](_0xfdc1x28)};return null}}function patchUpdates(_0xfdc1x30){return function(_0xfdc1x28){try{jsonpatch[_0x70f0[54]](_0xfdc1x28,_0xfdc1x30,true)}catch(err){return BPromise[_0x70f0[55]](err)};return _0xfdc1x28[_0x70f0[56]]()}}function saveUpdates(_0xfdc1x32,_0xfdc1x27){return function(_0xfdc1x28){if(_0xfdc1x28){return _0xfdc1x28[_0x70f0[57]](_0xfdc1x32)[_0x70f0[41]](function(_0xfdc1x33){return _0xfdc1x33})};return null}}function removeEntity(_0xfdc1x25,_0xfdc1x27){return function(_0xfdc1x28){if(_0xfdc1x28){return _0xfdc1x28[_0x70f0[58]]()[_0x70f0[41]](function(){_0xfdc1x25[_0x70f0[45]](204)[_0x70f0[44]]()})}}}function handleEntityNotFound(_0xfdc1x25,_0xfdc1x27){return function(_0xfdc1x28){if(!_0xfdc1x28){_0xfdc1x25[_0x70f0[43]](404)};return _0xfdc1x28}}function handleError(_0xfdc1x25,_0xfdc1x27){_0xfdc1x27= _0xfdc1x27|| 500;return function(_0xfdc1x24){logger[_0x70f0[31]](_0xfdc1x24[_0x70f0[59]]);if(_0xfdc1x24[_0x70f0[60]]){delete _0xfdc1x24[_0x70f0[60]]};_0xfdc1x25[_0x70f0[45]](_0xfdc1x27)[_0x70f0[61]](_0xfdc1x24)}}exports[_0x70f0[62]]= function(_0xfdc1x1f,_0xfdc1x25){var _0xfdc1x2b={},_0xfdc1x37={},_0xfdc1x38={count:0,rows:[]};_0xfdc1x37[_0x70f0[63]]= _[_0x70f0[66]](db[_0x70f0[65]][_0x70f0[64]]);var _0xfdc1x39={dateStart:_0xfdc1x1f[_0x70f0[68]][_0x70f0[67]],dateEnd:_0xfdc1x1f[_0x70f0[68]][_0x70f0[69]]};delete _0xfdc1x1f[_0x70f0[68]][_0x70f0[67]];delete _0xfdc1x1f[_0x70f0[68]][_0x70f0[69]];_0xfdc1x37[_0x70f0[68]]= _[_0x70f0[66]](_0xfdc1x1f[_0x70f0[68]]);_0xfdc1x37[_0x70f0[70]]= _[_0x70f0[71]](_0xfdc1x37[_0x70f0[63]],_0xfdc1x37[_0x70f0[68]]);_0xfdc1x2b[_0x70f0[72]]= _[_0x70f0[71]](_0xfdc1x37[_0x70f0[63]],qs[_0x70f0[73]](_0xfdc1x1f[_0x70f0[68]][_0x70f0[73]]));_0xfdc1x2b[_0x70f0[72]]= (_0xfdc1x2b[_0x70f0[72]][_0x70f0[74]])?_0xfdc1x2b[_0x70f0[72]]:_0xfdc1x37[_0x70f0[63]];if(!_0xfdc1x1f[_0x70f0[68]][_0x70f0[76]](_0x70f0[75])){_0xfdc1x2b[_0x70f0[49]]= qs[_0x70f0[49]](_0xfdc1x1f[_0x70f0[68]][_0x70f0[49]]);_0xfdc1x2b[_0x70f0[48]]= qs[_0x70f0[48]](_0xfdc1x1f[_0x70f0[68]][_0x70f0[48]])};_0xfdc1x2b[_0x70f0[77]]= qs[_0x70f0[78]](_0xfdc1x1f[_0x70f0[68]][_0x70f0[78]]);_0xfdc1x2b[_0x70f0[79]]= qs[_0x70f0[70]](_[_0x70f0[80]](_0xfdc1x1f[_0x70f0[68]],_0xfdc1x37[_0x70f0[70]]));if(_0xfdc1x39[_0x70f0[67]]){if(_0xfdc1x39[_0x70f0[69]]){_0xfdc1x39[_0x70f0[69]]= moment(_0xfdc1x39[_0x70f0[69]])[_0x70f0[82]](1,_0x70f0[81])}else {_0xfdc1x39[_0x70f0[69]]= moment(_0xfdc1x39[_0x70f0[67]])[_0x70f0[82]](1,_0x70f0[81])};_[_0x70f0[83]](_0xfdc1x2b[_0x70f0[79]],{createdAt:{$gte:_0xfdc1x39[_0x70f0[67]],$lte:_0xfdc1x39[_0x70f0[69]]}})};if(_0xfdc1x1f[_0x70f0[68]][_0x70f0[84]]){_0xfdc1x2b[_0x70f0[79]]= _[_0x70f0[83]](_0xfdc1x2b[_0x70f0[79]],{$or:_[_0x70f0[86]](_0xfdc1x2b[_0x70f0[72]],function(_0xfdc1x3a){var _0xfdc1x38={};_0xfdc1x38[_0xfdc1x3a]= {$like:_0x70f0[85]+ _0xfdc1x1f[_0x70f0[68]][_0x70f0[84]]+ _0x70f0[85]};return _0xfdc1x38})})};_0xfdc1x2b= _[_0x70f0[83]]({},_0xfdc1x2b,_0xfdc1x1f[_0x70f0[87]]);var _0xfdc1x3b={where:_0xfdc1x2b[_0x70f0[79]]};return db[_0x70f0[65]][_0x70f0[47]](_0xfdc1x3b)[_0x70f0[41]](function(_0xfdc1x2c){_0xfdc1x38[_0x70f0[47]]= _0xfdc1x2c;if(_0xfdc1x1f[_0x70f0[68]][_0x70f0[89]]){_0xfdc1x2b[_0x70f0[90]]= [{all:true}]};return db[_0x70f0[65]][_0x70f0[91]](_0xfdc1x2b)})[_0x70f0[41]](function(_0xfdc1x3c){_0xfdc1x38[_0x70f0[88]]= _0xfdc1x3c;return _0xfdc1x38})[_0x70f0[41]](respondWithFilteredResult(_0xfdc1x25,_0xfdc1x2b))[_0x70f0[32]](handleError(_0xfdc1x25,null))};exports[_0x70f0[92]]= function(_0xfdc1x1f,_0xfdc1x25){var _0xfdc1x2b={raw:false,where:{id:_0xfdc1x1f[_0x70f0[94]][_0x70f0[93]]}},_0xfdc1x37={};_0xfdc1x37[_0x70f0[63]]= _[_0x70f0[66]](db[_0x70f0[65]][_0x70f0[64]]);_0xfdc1x37[_0x70f0[68]]= _[_0x70f0[66]](_0xfdc1x1f[_0x70f0[68]]);_0xfdc1x37[_0x70f0[70]]= _[_0x70f0[71]](_0xfdc1x37[_0x70f0[63]],_0xfdc1x37[_0x70f0[68]]);_0xfdc1x2b[_0x70f0[72]]= _[_0x70f0[71]](_0xfdc1x37[_0x70f0[63]],qs[_0x70f0[73]](_0xfdc1x1f[_0x70f0[68]][_0x70f0[73]]));_0xfdc1x2b[_0x70f0[72]]= (_0xfdc1x2b[_0x70f0[72]][_0x70f0[74]])?_0xfdc1x2b[_0x70f0[72]]:_0xfdc1x37[_0x70f0[63]];if(_0xfdc1x1f[_0x70f0[68]][_0x70f0[89]]){_0xfdc1x2b[_0x70f0[90]]= [{all:true}]};_0xfdc1x2b= _[_0x70f0[83]]({},_0xfdc1x2b,_0xfdc1x1f[_0x70f0[87]]);return db[_0x70f0[65]][_0x70f0[95]](_0xfdc1x2b)[_0x70f0[41]](handleEntityNotFound(_0xfdc1x25,null))[_0x70f0[41]](respondWithResult(_0xfdc1x25,null))[_0x70f0[32]](handleError(_0xfdc1x25,null))};exports[_0x70f0[96]]= function(_0xfdc1x1f,_0xfdc1x25){return db[_0x70f0[65]][_0x70f0[96]](_0xfdc1x1f[_0x70f0[97]],{})[_0x70f0[41]](respondWithResult(_0xfdc1x25,201))[_0x70f0[32]](handleError(_0xfdc1x25,null))};exports[_0x70f0[57]]= function(_0xfdc1x1f,_0xfdc1x25){if(_0xfdc1x1f[_0x70f0[97]][_0x70f0[93]]){delete _0xfdc1x1f[_0x70f0[97]][_0x70f0[93]]};return db[_0x70f0[65]][_0x70f0[95]]({where:{id:_0xfdc1x1f[_0x70f0[94]][_0x70f0[93]]}})[_0x70f0[41]](handleEntityNotFound(_0xfdc1x25,null))[_0x70f0[41]](saveUpdates(_0xfdc1x1f[_0x70f0[97]],null))[_0x70f0[41]](respondWithResult(_0xfdc1x25,null))[_0x70f0[32]](handleError(_0xfdc1x25,null))};exports[_0x70f0[58]]= function(_0xfdc1x1f,_0xfdc1x25){return db[_0x70f0[65]][_0x70f0[95]]({where:{id:_0xfdc1x1f[_0x70f0[94]][_0x70f0[93]]}})[_0x70f0[41]](handleEntityNotFound(_0xfdc1x25,null))[_0x70f0[41]](removeEntity(_0xfdc1x25,null))[_0x70f0[32]](handleError(_0xfdc1x25,null))};exports[_0x70f0[98]]= function(_0xfdc1x1f,_0xfdc1x28,_0xfdc1x3d){var _0xfdc1x2b={};var _0xfdc1x37={};var _0xfdc1x3e;var _0xfdc1x2c;return db[_0x70f0[65]][_0x70f0[100]]({where:{id:_0xfdc1x1f[_0x70f0[94]][_0x70f0[93]]}})[_0x70f0[41]](handleEntityNotFound(_0xfdc1x28,null))[_0x70f0[41]](function(_0xfdc1x28){if(_0xfdc1x28){_0xfdc1x3e= _0xfdc1x28;_0xfdc1x37[_0x70f0[63]]= _[_0x70f0[66]](db[_0x70f0[99]][_0x70f0[64]]);_0xfdc1x37[_0x70f0[68]]= _[_0x70f0[66]](_0xfdc1x1f[_0x70f0[68]]);_0xfdc1x37[_0x70f0[70]]= _[_0x70f0[71]](_0xfdc1x37[_0x70f0[63]],_0xfdc1x37[_0x70f0[68]]);_0xfdc1x2b[_0x70f0[72]]= _[_0x70f0[71]](_0xfdc1x37[_0x70f0[63]],qs[_0x70f0[73]](_0xfdc1x1f[_0x70f0[68]][_0x70f0[73]]));_0xfdc1x2b[_0x70f0[72]]= (_0xfdc1x2b[_0x70f0[72]][_0x70f0[74]])?_0xfdc1x2b[_0x70f0[72]]:_0xfdc1x37[_0x70f0[63]];_0xfdc1x2b[_0x70f0[77]]= qs[_0x70f0[78]](_0xfdc1x1f[_0x70f0[68]][_0x70f0[78]]);_0xfdc1x2b[_0x70f0[79]]= qs[_0x70f0[70]](_[_0x70f0[80]](_0xfdc1x1f[_0x70f0[68]],_0xfdc1x37[_0x70f0[70]]));if(_0xfdc1x1f[_0x70f0[68]][_0x70f0[84]]){_0xfdc1x2b[_0x70f0[79]]= _[_0x70f0[83]](_0xfdc1x2b[_0x70f0[79]],{$or:_[_0x70f0[86]](_0xfdc1x2b[_0x70f0[72]],function(_0xfdc1x3a){var _0xfdc1x38={};_0xfdc1x38[_0xfdc1x3a]= {$like:_0x70f0[85]+ _0xfdc1x1f[_0x70f0[68]][_0x70f0[84]]+ _0x70f0[85]};return _0xfdc1x38})})};_0xfdc1x2b= _[_0x70f0[83]]({},_0xfdc1x2b,_0xfdc1x1f[_0x70f0[87]]);return _0xfdc1x3e[_0x70f0[98]](_0xfdc1x2b)}})[_0x70f0[41]](function(_0xfdc1x3f){if(_0xfdc1x3f){_0xfdc1x2c= _0xfdc1x3f[_0x70f0[74]];if(!_0xfdc1x1f[_0x70f0[68]][_0x70f0[76]](_0x70f0[75])){_0xfdc1x2b[_0x70f0[49]]= qs[_0x70f0[49]](_0xfdc1x1f[_0x70f0[68]][_0x70f0[49]]);_0xfdc1x2b[_0x70f0[48]]= qs[_0x70f0[48]](_0xfdc1x1f[_0x70f0[68]][_0x70f0[48]])};return _0xfdc1x3e[_0x70f0[98]](_0xfdc1x2b)}})[_0x70f0[41]](function(_0xfdc1x3c){if(_0xfdc1x3c){return _0xfdc1x3c?{count:_0xfdc1x2c,rows:_0xfdc1x3c}:null}})[_0x70f0[41]](respondWithResult(_0xfdc1x28,null))[_0x70f0[32]](handleError(_0xfdc1x28,null))};exports[_0x70f0[101]]= function(_0xfdc1x1f,_0xfdc1x25,_0xfdc1x3d){if(_0xfdc1x1f[_0x70f0[97]][_0x70f0[93]]){delete _0xfdc1x1f[_0x70f0[97]][_0x70f0[93]]};return db[_0x70f0[65]][_0x70f0[100]]({where:{id:_0xfdc1x1f[_0x70f0[94]][_0x70f0[93]]}})[_0x70f0[41]](handleEntityNotFound(_0xfdc1x25,null))[_0x70f0[41]](function(_0xfdc1x28){if(_0xfdc1x28){_0xfdc1x1f[_0x70f0[97]][_0x70f0[102]]= _0xfdc1x28[_0x70f0[93]];_0xfdc1x1f[_0x70f0[97]][_0x70f0[103]]= integrations[_0x70f0[106]](_0xfdc1x1f[_0x70f0[97]][_0x70f0[104]],_0xfdc1x1f[_0x70f0[97]][_0x70f0[105]]);_0xfdc1x1f[_0x70f0[97]][_0x70f0[107]]= integrations[_0x70f0[108]](_0xfdc1x1f[_0x70f0[97]][_0x70f0[104]],_0xfdc1x1f[_0x70f0[97]][_0x70f0[105]]);return db[_0x70f0[99]][_0x70f0[96]](_0xfdc1x1f[_0x70f0[97]],{include:[{model:db[_0x70f0[109]],as:_0x70f0[103]},{model:db[_0x70f0[109]],as:_0x70f0[107]}]})};return null})[_0x70f0[41]](respondWithResult(_0xfdc1x25,null))[_0x70f0[32]](handleError(_0xfdc1x25,null))};exports[_0x70f0[110]]= function(_0xfdc1x1f,_0xfdc1x25,_0xfdc1x3d){var _0xfdc1x40;return db[_0x70f0[65]][_0x70f0[100]]({where:{id:_0xfdc1x1f[_0x70f0[94]][_0x70f0[93]]},attributes:[_0x70f0[93],_0x70f0[132],_0x70f0[133],_0x70f0[134],_0x70f0[135],_0x70f0[138],_0x70f0[136]]})[_0x70f0[41]](handleEntityNotFound(_0xfdc1x25,null))[_0x70f0[41]](function(_0xfdc1x28){if(_0xfdc1x28){_0xfdc1x40=  new jsforce.Connection({oauth2:{loginUrl:_0xfdc1x28[_0x70f0[132]],clientId:_0xfdc1x28[_0x70f0[133]],clientSecret:_0xfdc1x28[_0x70f0[134]]}});return _0xfdc1x40[_0x70f0[139]](_0xfdc1x28[_0x70f0[135]],_0xfdc1x28[_0x70f0[138]][_0x70f0[137]](_0xfdc1x28[_0x70f0[136]]))}})[_0x70f0[41]](function(_0xfdc1x28){if(_0xfdc1x28){return _0xfdc1x40[_0x70f0[131]](_0x70f0[130])[_0x70f0[129]]()}})[_0x70f0[41]](function(_0xfdc1x28){var _0xfdc1x41=[_0x70f0[115],_0x70f0[116],_0x70f0[117],_0x70f0[118],_0x70f0[119],_0x70f0[120],_0x70f0[121],_0x70f0[122]];if(_0xfdc1x28){_[_0x70f0[125]](_0xfdc1x28[_0x70f0[73]],function(_0xfdc1x42){return (_0xfdc1x42[_0x70f0[123]]=== false&&  !_0xfdc1x41[_0x70f0[124]](_0xfdc1x42[_0x70f0[60]]))});return {count:_0xfdc1x28[_0x70f0[73]][_0x70f0[74]],rows:_[_0x70f0[86]](_0xfdc1x28[_0x70f0[73]],function(_0xfdc1x42){return {id:_0xfdc1x42[_0x70f0[60]],name:_0xfdc1x42[_0x70f0[126]],custom:_0xfdc1x42[_0x70f0[123]],options:_0xfdc1x42[_0x70f0[127]]?_[_0x70f0[86]](_0xfdc1x42[_0x70f0[127]],function(_0xfdc1x3a){return {name:_0xfdc1x3a[_0x70f0[126]],value:_0xfdc1x3a[_0x70f0[128]]}}):[]}})}}})[_0x70f0[41]](respondWithResult(_0xfdc1x25,null))[_0x70f0[32]](function(_0xfdc1x24){var _0xfdc1x27=_0xfdc1x1f[_0x70f0[68]][_0x70f0[111]]?500:(_0xfdc1x24[_0x70f0[112]]|| 500);logger[_0x70f0[31]](_0x70f0[113],_0x70f0[110],_0xfdc1x27,JSON[_0x70f0[36]](_0xfdc1x24));delete _0xfdc1x24[_0x70f0[60]];if(_0xfdc1x27=== 401){_0xfdc1x27= 400};_0xfdc1x25[_0x70f0[45]](_0xfdc1x27)[_0x70f0[61]](_0xfdc1x1f[_0x70f0[68]][_0x70f0[111]]?{message:_0x70f0[114],statusCode:_0xfdc1x24[_0x70f0[112]]}:_0xfdc1x24)})}
\ No newline at end of file
index 8a76089..c95eb46 100644 (file)
@@ -1 +1 @@
-var _0xc844=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x74\x5F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0xc844[0];var _=require(_0xc844[1]);var util=require(_0xc844[2]);var logger=require(_0xc844[4])(_0xc844[3]);var moment=require(_0xc844[5]);var BPromise=require(_0xc844[6]);var rp=require(_0xc844[7]);var attributes=require(_0xc844[8]);var integrations=require(_0xc844[9]);module[_0xc844[10]]= function(_0x4b28x9,_0x4b28xa){return _0x4b28x9[_0xc844[13]](_0xc844[11],attributes,{tableName:_0xc844[12],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xc7c1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x74\x5F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0xc7c1[0];var _=require(_0xc7c1[1]);var util=require(_0xc7c1[2]);var logger=require(_0xc7c1[4])(_0xc7c1[3]);var moment=require(_0xc7c1[5]);var BPromise=require(_0xc7c1[6]);var rp=require(_0xc7c1[7]);var attributes=require(_0xc7c1[8]);var integrations=require(_0xc7c1[9]);module[_0xc7c1[10]]= function(_0xfb19x9,_0xfb19xa){return _0xfb19x9[_0xc7c1[13]](_0xc7c1[11],attributes,{tableName:_0xc7c1[12],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 430bac7..f012719 100644 (file)
@@ -1 +1 @@
-var _0x9eab=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x53\x68\x6F\x77\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x66\x69\x6E\x64"];_0x9eab[0];var _=require(_0x9eab[1]);var util=require(_0x9eab[2]);var moment=require(_0x9eab[3]);var BPromise=require(_0x9eab[4]);var rs=require(_0x9eab[5]);var fs=require(_0x9eab[6]);var db=require(_0x9eab[8])[_0x9eab[7]];var utils=require(_0x9eab[9]);var logger=require(_0x9eab[11])(_0x9eab[10]);var config=require(_0x9eab[12]);var jayson=require(_0x9eab[13]);var client=jayson[_0x9eab[15]][_0x9eab[14]]({port:9002});function respondWithRpcPromise(_0x4f8cxe,_0x4f8cxf,_0x4f8cx10){return  new BPromise(function(_0x4f8cx11,_0x4f8cx12){return client[_0x9eab[28]](_0x4f8cxe,_0x4f8cx10)[_0x9eab[27]](function(_0x4f8cx14){logger[_0x9eab[20]](_0x9eab[16],_0x4f8cxf,_0x9eab[19]);logger[_0x9eab[23]](_0x9eab[21],_0x4f8cxf,_0x9eab[19],JSON[_0x9eab[22]](_0x4f8cx14));if(_0x4f8cx14[_0x9eab[17]]){if(_0x4f8cx14[_0x9eab[17]][_0x9eab[24]]=== 500){logger[_0x9eab[17]](_0x9eab[16],_0x4f8cxf,_0x4f8cx14[_0x9eab[17]][_0x9eab[25]]);return _0x4f8cx12(_0x4f8cx14[_0x9eab[17]][_0x9eab[25]])};logger[_0x9eab[17]](_0x9eab[16],_0x4f8cxf,_0x4f8cx14[_0x9eab[17]][_0x9eab[25]]);return _0x4f8cx11(_0x4f8cx14[_0x9eab[17]][_0x9eab[25]])}else {logger[_0x9eab[20]](_0x9eab[16],_0x4f8cxf,_0x9eab[19]);_0x4f8cx11(_0x4f8cx14[_0x9eab[26]][_0x9eab[25]])}})[_0x9eab[18]](function(_0x4f8cx13){logger[_0x9eab[17]](_0x9eab[16],_0x4f8cxf,_0x4f8cx13);_0x4f8cx12(_0x4f8cx13)})})}exports[_0x9eab[29]]= function(_0x4f8cx10){var _0x4f8cx15=this;return  new Promise(function(_0x4f8cx11,_0x4f8cx12){return db[_0x9eab[40]][_0x9eab[39]]({raw:_0x4f8cx10[_0x9eab[30]]?(_0x4f8cx10[_0x9eab[30]][_0x9eab[31]]=== undefined)?true:false:true,where:_0x4f8cx10[_0x9eab[30]]?_0x4f8cx10[_0x9eab[30]][_0x9eab[32]]|| null:null,attributes:_0x4f8cx10[_0x9eab[30]]?_0x4f8cx10[_0x9eab[30]][_0x9eab[33]]|| null:null,limit:_0x4f8cx10[_0x9eab[30]]?_0x4f8cx10[_0x9eab[30]][_0x9eab[34]]|| null:null,include:_0x4f8cx10[_0x9eab[30]]?(_0x4f8cx10[_0x9eab[30]][_0x9eab[35]]?_[_0x9eab[38]](_0x4f8cx10[_0x9eab[30]][_0x9eab[35]],function(_0x4f8cx16){return {model:db[_0x4f8cx16[_0x9eab[36]]],as:_0x4f8cx16[_0x9eab[37]],attributes:_0x4f8cx16[_0x9eab[33]],include:_0x4f8cx16[_0x9eab[35]]?_[_0x9eab[38]](_0x4f8cx16[_0x9eab[35]],function(_0x4f8cx17){return {model:db[_0x4f8cx17[_0x9eab[36]]],as:_0x4f8cx17[_0x9eab[37]],attributes:_0x4f8cx17[_0x9eab[33]],include:_0x4f8cx17[_0x9eab[35]]?_[_0x9eab[38]](_0x4f8cx17[_0x9eab[35]],function(_0x4f8cx18){return {model:db[_0x4f8cx18[_0x9eab[36]]],as:_0x4f8cx18[_0x9eab[37]],attributes:_0x4f8cx18[_0x9eab[33]]}}):[]}}):[]}}):[]):[]})[_0x9eab[27]](function(_0x4f8cx14){logger[_0x9eab[20]](_0x9eab[29],_0x4f8cx10);logger[_0x9eab[23]](_0x9eab[29],_0x4f8cx10,JSON[_0x9eab[22]](_0x4f8cx14));_0x4f8cx11(_0x4f8cx14)})[_0x9eab[18]](function(_0x4f8cx13){logger[_0x9eab[17]](_0x9eab[29],_0x4f8cx13[_0x9eab[25]],_0x4f8cx10);_0x4f8cx12(_0x4f8cx15[_0x9eab[17]](500,_0x4f8cx13[_0x9eab[25]]))})})};exports[_0x9eab[41]]= function(_0x4f8cx10){var _0x4f8cx15=this;return  new Promise(function(_0x4f8cx11,_0x4f8cx12){return db[_0x9eab[40]][_0x9eab[42]]({raw:_0x4f8cx10[_0x9eab[30]]?(_0x4f8cx10[_0x9eab[30]][_0x9eab[31]]=== undefined)?true:false:true,where:_0x4f8cx10[_0x9eab[30]]?_0x4f8cx10[_0x9eab[30]][_0x9eab[32]]|| null:null,attributes:_0x4f8cx10[_0x9eab[30]]?_0x4f8cx10[_0x9eab[30]][_0x9eab[33]]|| null:null,include:_0x4f8cx10[_0x9eab[30]]?(_0x4f8cx10[_0x9eab[30]][_0x9eab[35]]?_[_0x9eab[38]](_0x4f8cx10[_0x9eab[30]][_0x9eab[35]],function(_0x4f8cx16){return {model:db[_0x4f8cx16[_0x9eab[36]]],as:_0x4f8cx16[_0x9eab[37]],attributes:_0x4f8cx16[_0x9eab[33]],include:_0x4f8cx16[_0x9eab[35]]?_[_0x9eab[38]](_0x4f8cx16[_0x9eab[35]],function(_0x4f8cx17){return {model:db[_0x4f8cx17[_0x9eab[36]]],as:_0x4f8cx17[_0x9eab[37]],attributes:_0x4f8cx17[_0x9eab[33]],include:_0x4f8cx17[_0x9eab[35]]?_[_0x9eab[38]](_0x4f8cx17[_0x9eab[35]],function(_0x4f8cx18){return {model:db[_0x4f8cx18[_0x9eab[36]]],as:_0x4f8cx18[_0x9eab[37]],attributes:_0x4f8cx18[_0x9eab[33]]}}):[]}}):[]}}):[]):[]})[_0x9eab[27]](function(_0x4f8cx14){logger[_0x9eab[20]](_0x9eab[41],_0x4f8cx10);logger[_0x9eab[23]](_0x9eab[41],_0x4f8cx10,JSON[_0x9eab[22]](_0x4f8cx14));_0x4f8cx11(_0x4f8cx14)})[_0x9eab[18]](function(_0x4f8cx13){logger[_0x9eab[17]](_0x9eab[41],_0x4f8cx13[_0x9eab[25]],_0x4f8cx10);_0x4f8cx12(_0x4f8cx15[_0x9eab[17]](500,_0x4f8cx13[_0x9eab[25]]))})})}
\ No newline at end of file
+var _0x32ac=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x53\x68\x6F\x77\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x66\x69\x6E\x64"];_0x32ac[0];var _=require(_0x32ac[1]);var util=require(_0x32ac[2]);var moment=require(_0x32ac[3]);var BPromise=require(_0x32ac[4]);var rs=require(_0x32ac[5]);var fs=require(_0x32ac[6]);var db=require(_0x32ac[8])[_0x32ac[7]];var utils=require(_0x32ac[9]);var logger=require(_0x32ac[11])(_0x32ac[10]);var config=require(_0x32ac[12]);var jayson=require(_0x32ac[13]);var client=jayson[_0x32ac[15]][_0x32ac[14]]({port:9002});function respondWithRpcPromise(_0xd1ddxe,_0xd1ddxf,_0xd1ddx10){return  new BPromise(function(_0xd1ddx11,_0xd1ddx12){return client[_0x32ac[28]](_0xd1ddxe,_0xd1ddx10)[_0x32ac[27]](function(_0xd1ddx14){logger[_0x32ac[20]](_0x32ac[16],_0xd1ddxf,_0x32ac[19]);logger[_0x32ac[23]](_0x32ac[21],_0xd1ddxf,_0x32ac[19],JSON[_0x32ac[22]](_0xd1ddx14));if(_0xd1ddx14[_0x32ac[17]]){if(_0xd1ddx14[_0x32ac[17]][_0x32ac[24]]=== 500){logger[_0x32ac[17]](_0x32ac[16],_0xd1ddxf,_0xd1ddx14[_0x32ac[17]][_0x32ac[25]]);return _0xd1ddx12(_0xd1ddx14[_0x32ac[17]][_0x32ac[25]])};logger[_0x32ac[17]](_0x32ac[16],_0xd1ddxf,_0xd1ddx14[_0x32ac[17]][_0x32ac[25]]);return _0xd1ddx11(_0xd1ddx14[_0x32ac[17]][_0x32ac[25]])}else {logger[_0x32ac[20]](_0x32ac[16],_0xd1ddxf,_0x32ac[19]);_0xd1ddx11(_0xd1ddx14[_0x32ac[26]][_0x32ac[25]])}})[_0x32ac[18]](function(_0xd1ddx13){logger[_0x32ac[17]](_0x32ac[16],_0xd1ddxf,_0xd1ddx13);_0xd1ddx12(_0xd1ddx13)})})}exports[_0x32ac[29]]= function(_0xd1ddx10){var _0xd1ddx15=this;return  new Promise(function(_0xd1ddx11,_0xd1ddx12){return db[_0x32ac[40]][_0x32ac[39]]({raw:_0xd1ddx10[_0x32ac[30]]?(_0xd1ddx10[_0x32ac[30]][_0x32ac[31]]=== undefined)?true:false:true,where:_0xd1ddx10[_0x32ac[30]]?_0xd1ddx10[_0x32ac[30]][_0x32ac[32]]|| null:null,attributes:_0xd1ddx10[_0x32ac[30]]?_0xd1ddx10[_0x32ac[30]][_0x32ac[33]]|| null:null,limit:_0xd1ddx10[_0x32ac[30]]?_0xd1ddx10[_0x32ac[30]][_0x32ac[34]]|| null:null,include:_0xd1ddx10[_0x32ac[30]]?(_0xd1ddx10[_0x32ac[30]][_0x32ac[35]]?_[_0x32ac[38]](_0xd1ddx10[_0x32ac[30]][_0x32ac[35]],function(_0xd1ddx16){return {model:db[_0xd1ddx16[_0x32ac[36]]],as:_0xd1ddx16[_0x32ac[37]],attributes:_0xd1ddx16[_0x32ac[33]],include:_0xd1ddx16[_0x32ac[35]]?_[_0x32ac[38]](_0xd1ddx16[_0x32ac[35]],function(_0xd1ddx17){return {model:db[_0xd1ddx17[_0x32ac[36]]],as:_0xd1ddx17[_0x32ac[37]],attributes:_0xd1ddx17[_0x32ac[33]],include:_0xd1ddx17[_0x32ac[35]]?_[_0x32ac[38]](_0xd1ddx17[_0x32ac[35]],function(_0xd1ddx18){return {model:db[_0xd1ddx18[_0x32ac[36]]],as:_0xd1ddx18[_0x32ac[37]],attributes:_0xd1ddx18[_0x32ac[33]]}}):[]}}):[]}}):[]):[]})[_0x32ac[27]](function(_0xd1ddx14){logger[_0x32ac[20]](_0x32ac[29],_0xd1ddx10);logger[_0x32ac[23]](_0x32ac[29],_0xd1ddx10,JSON[_0x32ac[22]](_0xd1ddx14));_0xd1ddx11(_0xd1ddx14)})[_0x32ac[18]](function(_0xd1ddx13){logger[_0x32ac[17]](_0x32ac[29],_0xd1ddx13[_0x32ac[25]],_0xd1ddx10);_0xd1ddx12(_0xd1ddx15[_0x32ac[17]](500,_0xd1ddx13[_0x32ac[25]]))})})};exports[_0x32ac[41]]= function(_0xd1ddx10){var _0xd1ddx15=this;return  new Promise(function(_0xd1ddx11,_0xd1ddx12){return db[_0x32ac[40]][_0x32ac[42]]({raw:_0xd1ddx10[_0x32ac[30]]?(_0xd1ddx10[_0x32ac[30]][_0x32ac[31]]=== undefined)?true:false:true,where:_0xd1ddx10[_0x32ac[30]]?_0xd1ddx10[_0x32ac[30]][_0x32ac[32]]|| null:null,attributes:_0xd1ddx10[_0x32ac[30]]?_0xd1ddx10[_0x32ac[30]][_0x32ac[33]]|| null:null,include:_0xd1ddx10[_0x32ac[30]]?(_0xd1ddx10[_0x32ac[30]][_0x32ac[35]]?_[_0x32ac[38]](_0xd1ddx10[_0x32ac[30]][_0x32ac[35]],function(_0xd1ddx16){return {model:db[_0xd1ddx16[_0x32ac[36]]],as:_0xd1ddx16[_0x32ac[37]],attributes:_0xd1ddx16[_0x32ac[33]],include:_0xd1ddx16[_0x32ac[35]]?_[_0x32ac[38]](_0xd1ddx16[_0x32ac[35]],function(_0xd1ddx17){return {model:db[_0xd1ddx17[_0x32ac[36]]],as:_0xd1ddx17[_0x32ac[37]],attributes:_0xd1ddx17[_0x32ac[33]],include:_0xd1ddx17[_0x32ac[35]]?_[_0x32ac[38]](_0xd1ddx17[_0x32ac[35]],function(_0xd1ddx18){return {model:db[_0xd1ddx18[_0x32ac[36]]],as:_0xd1ddx18[_0x32ac[37]],attributes:_0xd1ddx18[_0x32ac[33]]}}):[]}}):[]}}):[]):[]})[_0x32ac[27]](function(_0xd1ddx14){logger[_0x32ac[20]](_0x32ac[41],_0xd1ddx10);logger[_0x32ac[23]](_0x32ac[41],_0xd1ddx10,JSON[_0x32ac[22]](_0xd1ddx14));_0xd1ddx11(_0xd1ddx14)})[_0x32ac[18]](function(_0xd1ddx13){logger[_0x32ac[17]](_0x32ac[41],_0xd1ddx13[_0x32ac[25]],_0xd1ddx10);_0xd1ddx12(_0xd1ddx15[_0x32ac[17]](500,_0xd1ddx13[_0x32ac[25]]))})})}
\ No newline at end of file
index 1a03723..c549653 100644 (file)
@@ -1 +1 @@
-var _0x4ab9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x73\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x2F\x3A\x69\x64\x2F\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4ab9[0];var multer=require(_0x4ab9[1]);var util=require(_0x4ab9[2]);var path=require(_0x4ab9[3]);var express=require(_0x4ab9[4]);var router=express.Router();var auth=require(_0x4ab9[5]);var interaction=require(_0x4ab9[6]);var config=require(_0x4ab9[7]);var controller=require(_0x4ab9[8]);router[_0x4ab9[12]](_0x4ab9[9],auth[_0x4ab9[10]](),controller[_0x4ab9[11]]);router[_0x4ab9[12]](_0x4ab9[13],auth[_0x4ab9[10]](),controller[_0x4ab9[14]]);router[_0x4ab9[12]](_0x4ab9[15],auth[_0x4ab9[10]](),controller[_0x4ab9[16]]);router[_0x4ab9[12]](_0x4ab9[17],auth[_0x4ab9[10]](),controller[_0x4ab9[18]]);router[_0x4ab9[12]](_0x4ab9[19],auth[_0x4ab9[10]](),controller[_0x4ab9[20]]);router[_0x4ab9[22]](_0x4ab9[9],auth[_0x4ab9[10]](),controller[_0x4ab9[21]]);router[_0x4ab9[24]](_0x4ab9[13],auth[_0x4ab9[10]](),controller[_0x4ab9[23]]);router[_0x4ab9[26]](_0x4ab9[13],auth[_0x4ab9[10]](),controller[_0x4ab9[25]]);module[_0x4ab9[27]]= router
\ No newline at end of file
+var _0xf024=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x73\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x2F\x3A\x69\x64\x2F\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf024[0];var multer=require(_0xf024[1]);var util=require(_0xf024[2]);var path=require(_0xf024[3]);var express=require(_0xf024[4]);var router=express.Router();var auth=require(_0xf024[5]);var interaction=require(_0xf024[6]);var config=require(_0xf024[7]);var controller=require(_0xf024[8]);router[_0xf024[12]](_0xf024[9],auth[_0xf024[10]](),controller[_0xf024[11]]);router[_0xf024[12]](_0xf024[13],auth[_0xf024[10]](),controller[_0xf024[14]]);router[_0xf024[12]](_0xf024[15],auth[_0xf024[10]](),controller[_0xf024[16]]);router[_0xf024[12]](_0xf024[17],auth[_0xf024[10]](),controller[_0xf024[18]]);router[_0xf024[12]](_0xf024[19],auth[_0xf024[10]](),controller[_0xf024[20]]);router[_0xf024[22]](_0xf024[9],auth[_0xf024[10]](),controller[_0xf024[21]]);router[_0xf024[24]](_0xf024[13],auth[_0xf024[10]](),controller[_0xf024[23]]);router[_0xf024[26]](_0xf024[13],auth[_0xf024[10]](),controller[_0xf024[25]]);module[_0xf024[27]]= router
\ No newline at end of file
index c863db4..7223d8d 100644 (file)
@@ -1 +1 @@
-var _0xd33b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6C\x65\x61\x64","\x63\x6F\x6E\x74\x61\x63\x74","\x6C\x65\x61\x64","\x6E\x6F\x74\x68\x69\x6E\x67"];_0xd33b[0];var Sequelize=require(_0xd33b[1]);module[_0xd33b[2]]= {name:{type:Sequelize[_0xd33b[3]]},description:{type:Sequelize[_0xd33b[3]]},moduleSearch:{type:Sequelize.ENUM(_0xd33b[4],_0xd33b[5],_0xd33b[6]),defaultValue:_0xd33b[4]},moduleCreate:{type:Sequelize.ENUM(_0xd33b[7],_0xd33b[5],_0xd33b[6]),defaultValue:_0xd33b[6]}}
\ No newline at end of file
+var _0x69bc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6C\x65\x61\x64","\x63\x6F\x6E\x74\x61\x63\x74","\x6C\x65\x61\x64","\x6E\x6F\x74\x68\x69\x6E\x67"];_0x69bc[0];var Sequelize=require(_0x69bc[1]);module[_0x69bc[2]]= {name:{type:Sequelize[_0x69bc[3]]},description:{type:Sequelize[_0x69bc[3]]},moduleSearch:{type:Sequelize.ENUM(_0x69bc[4],_0x69bc[5],_0x69bc[6]),defaultValue:_0x69bc[4]},moduleCreate:{type:Sequelize.ENUM(_0x69bc[7],_0x69bc[5],_0x69bc[6]),defaultValue:_0x69bc[6]}}
\ No newline at end of file
index 719e881..65fc1f8 100644 (file)
@@ -1 +1 @@
-var _0x6504=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73"];_0x6504[0];var jsonpatch=require(_0x6504[1]);var rp=require(_0x6504[2]);var moment=require(_0x6504[3]);var BPromise=require(_0x6504[4]);var Mustache=require(_0x6504[5]);var util=require(_0x6504[6]);var path=require(_0x6504[7]);var sox=require(_0x6504[8]);var csv=require(_0x6504[9]);var ejs=require(_0x6504[10]);var fs=require(_0x6504[11]);var _=require(_0x6504[12]);var squel=require(_0x6504[13]);var crypto=require(_0x6504[14]);var jsforce=require(_0x6504[15]);var deskjs=require(_0x6504[16]);var toCsv=require(_0x6504[9]);var querystring=require(_0x6504[17]);var Papa=require(_0x6504[18]);var qs=require(_0x6504[19]);var logger=require(_0x6504[21])(_0x6504[20]);var utils=require(_0x6504[22]);var config=require(_0x6504[23]);var db=require(_0x6504[25])[_0x6504[24]];var jayson=require(_0x6504[26]);var client=jayson[_0x6504[28]][_0x6504[27]]({port:9002});function respondWithRpcPromise(_0x108ex1c,_0x108ex1d,_0x108ex1e,_0x108ex1f){return  new BPromise(function(_0x108ex20,_0x108ex21){var _0x108ex22=(_0x108ex1f|| client);return _0x108ex22[_0x6504[41]](_0x108ex1c,_0x108ex1e)[_0x6504[40]](function(_0x108ex24){logger[_0x6504[33]](_0x6504[29],_0x108ex1d,_0x6504[32]);logger[_0x6504[36]](_0x6504[34],_0x108ex1d,_0x6504[32],JSON[_0x6504[35]](_0x108ex24));if(_0x108ex24[_0x6504[30]]){if(_0x108ex24[_0x6504[30]][_0x6504[37]]=== 500){logger[_0x6504[30]](_0x6504[29],_0x108ex1d,_0x108ex24[_0x6504[30]][_0x6504[38]]);return _0x108ex21(_0x108ex24[_0x6504[30]][_0x6504[38]])};logger[_0x6504[30]](_0x6504[29],_0x108ex1d,_0x108ex24[_0x6504[30]][_0x6504[38]]);return _0x108ex20(_0x108ex24[_0x6504[30]][_0x6504[38]])}else {logger[_0x6504[33]](_0x6504[29],_0x108ex1d,_0x6504[32]);_0x108ex20(_0x108ex24[_0x6504[39]][_0x6504[38]])}})[_0x6504[31]](function(_0x108ex23){logger[_0x6504[30]](_0x6504[29],_0x108ex1d,_0x108ex23);_0x108ex21(_0x108ex23)})})}function respondWithStatusCode(_0x108ex24,_0x108ex26){_0x108ex26= _0x108ex26|| 204;return function(_0x108ex27){if(_0x108ex27){return _0x108ex24[_0x6504[42]](_0x108ex26)};return _0x108ex24[_0x6504[44]](_0x108ex26)[_0x6504[43]]()}}function respondWithResult(_0x108ex24,_0x108ex26){_0x108ex26= _0x108ex26|| 200;return function(_0x108ex27){if(_0x108ex27){return _0x108ex24[_0x6504[44]](_0x108ex26)[_0x6504[45]](_0x108ex27)}}}function respondWithFilteredResult(_0x108ex24,_0x108ex2a){return function(_0x108ex27){if(_0x108ex27){var _0x108ex2b=_0x108ex27[_0x6504[46]],_0x108ex2c=_0x108ex2a[_0x6504[47]],_0x108ex2d=_0x108ex2a[_0x6504[47]]+ _0x108ex2a[_0x6504[48]],_0x108ex26;if(_0x108ex2d>= _0x108ex2b){_0x108ex2d= _0x108ex2b;_0x108ex26= 200}else {_0x108ex26= 206};_0x108ex24[_0x6504[44]](_0x108ex26);return _0x108ex24[_0x6504[52]](_0x6504[49],_0x108ex2c+ _0x6504[50]+ _0x108ex2d+ _0x6504[51]+ _0x108ex2b)[_0x6504[45]](_0x108ex27)};return null}}function patchUpdates(_0x108ex2f){return function(_0x108ex27){try{jsonpatch[_0x6504[53]](_0x108ex27,_0x108ex2f,true)}catch(err){return BPromise[_0x6504[54]](err)};return _0x108ex27[_0x6504[55]]()}}function saveUpdates(_0x108ex31,_0x108ex26){return function(_0x108ex27){if(_0x108ex27){return _0x108ex27[_0x6504[56]](_0x108ex31)[_0x6504[40]](function(_0x108ex32){return _0x108ex32})};return null}}function removeEntity(_0x108ex24,_0x108ex26){return function(_0x108ex27){if(_0x108ex27){return _0x108ex27[_0x6504[57]]()[_0x6504[40]](function(){_0x108ex24[_0x6504[44]](204)[_0x6504[43]]()})}}}function handleEntityNotFound(_0x108ex24,_0x108ex26){return function(_0x108ex27){if(!_0x108ex27){_0x108ex24[_0x6504[42]](404)};return _0x108ex27}}function handleError(_0x108ex24,_0x108ex26){_0x108ex26= _0x108ex26|| 500;return function(_0x108ex23){logger[_0x6504[30]](_0x108ex23[_0x6504[58]]);if(_0x108ex23[_0x6504[59]]){delete _0x108ex23[_0x6504[59]]};_0x108ex24[_0x6504[44]](_0x108ex26)[_0x6504[60]](_0x108ex23)}}exports[_0x6504[61]]= function(_0x108ex1e,_0x108ex24){var _0x108ex2a={},_0x108ex36={},_0x108ex37={count:0,rows:[]};_0x108ex36[_0x6504[62]]= _[_0x6504[65]](db[_0x6504[64]][_0x6504[63]]);var _0x108ex38={dateStart:_0x108ex1e[_0x6504[67]][_0x6504[66]],dateEnd:_0x108ex1e[_0x6504[67]][_0x6504[68]]};delete _0x108ex1e[_0x6504[67]][_0x6504[66]];delete _0x108ex1e[_0x6504[67]][_0x6504[68]];_0x108ex36[_0x6504[67]]= _[_0x6504[65]](_0x108ex1e[_0x6504[67]]);_0x108ex36[_0x6504[69]]= _[_0x6504[70]](_0x108ex36[_0x6504[62]],_0x108ex36[_0x6504[67]]);_0x108ex2a[_0x6504[71]]= _[_0x6504[70]](_0x108ex36[_0x6504[62]],qs[_0x6504[72]](_0x108ex1e[_0x6504[67]][_0x6504[72]]));_0x108ex2a[_0x6504[71]]= (_0x108ex2a[_0x6504[71]][_0x6504[73]])?_0x108ex2a[_0x6504[71]]:_0x108ex36[_0x6504[62]];if(!_0x108ex1e[_0x6504[67]][_0x6504[75]](_0x6504[74])){_0x108ex2a[_0x6504[48]]= qs[_0x6504[48]](_0x108ex1e[_0x6504[67]][_0x6504[48]]);_0x108ex2a[_0x6504[47]]= qs[_0x6504[47]](_0x108ex1e[_0x6504[67]][_0x6504[47]])};_0x108ex2a[_0x6504[76]]= qs[_0x6504[77]](_0x108ex1e[_0x6504[67]][_0x6504[77]]);_0x108ex2a[_0x6504[78]]= qs[_0x6504[69]](_[_0x6504[79]](_0x108ex1e[_0x6504[67]],_0x108ex36[_0x6504[69]]));if(_0x108ex38[_0x6504[66]]){if(_0x108ex38[_0x6504[68]]){_0x108ex38[_0x6504[68]]= moment(_0x108ex38[_0x6504[68]])[_0x6504[81]](1,_0x6504[80])}else {_0x108ex38[_0x6504[68]]= moment(_0x108ex38[_0x6504[66]])[_0x6504[81]](1,_0x6504[80])};_[_0x6504[82]](_0x108ex2a[_0x6504[78]],{createdAt:{$gte:_0x108ex38[_0x6504[66]],$lte:_0x108ex38[_0x6504[68]]}})};if(_0x108ex1e[_0x6504[67]][_0x6504[83]]){_0x108ex2a[_0x6504[78]]= _[_0x6504[82]](_0x108ex2a[_0x6504[78]],{$or:_[_0x6504[85]](_0x108ex2a[_0x6504[71]],function(_0x108ex39){var _0x108ex37={};_0x108ex37[_0x108ex39]= {$like:_0x6504[84]+ _0x108ex1e[_0x6504[67]][_0x6504[83]]+ _0x6504[84]};return _0x108ex37})})};_0x108ex2a= _[_0x6504[82]]({},_0x108ex2a,_0x108ex1e[_0x6504[86]]);var _0x108ex3a={where:_0x108ex2a[_0x6504[78]]};return db[_0x6504[64]][_0x6504[46]](_0x108ex3a)[_0x6504[40]](function(_0x108ex2b){_0x108ex37[_0x6504[46]]= _0x108ex2b;if(_0x108ex1e[_0x6504[67]][_0x6504[88]]){_0x108ex2a[_0x6504[89]]= [{all:true}]};return db[_0x6504[64]][_0x6504[90]](_0x108ex2a)})[_0x6504[40]](function(_0x108ex3b){_0x108ex37[_0x6504[87]]= _0x108ex3b;return _0x108ex37})[_0x6504[40]](respondWithFilteredResult(_0x108ex24,_0x108ex2a))[_0x6504[31]](handleError(_0x108ex24,null))};exports[_0x6504[91]]= function(_0x108ex1e,_0x108ex24){var _0x108ex2a={raw:false,where:{id:_0x108ex1e[_0x6504[93]][_0x6504[92]]}},_0x108ex36={};_0x108ex36[_0x6504[62]]= _[_0x6504[65]](db[_0x6504[64]][_0x6504[63]]);_0x108ex36[_0x6504[67]]= _[_0x6504[65]](_0x108ex1e[_0x6504[67]]);_0x108ex36[_0x6504[69]]= _[_0x6504[70]](_0x108ex36[_0x6504[62]],_0x108ex36[_0x6504[67]]);_0x108ex2a[_0x6504[71]]= _[_0x6504[70]](_0x108ex36[_0x6504[62]],qs[_0x6504[72]](_0x108ex1e[_0x6504[67]][_0x6504[72]]));_0x108ex2a[_0x6504[71]]= (_0x108ex2a[_0x6504[71]][_0x6504[73]])?_0x108ex2a[_0x6504[71]]:_0x108ex36[_0x6504[62]];if(_0x108ex1e[_0x6504[67]][_0x6504[88]]){_0x108ex2a[_0x6504[89]]= [{all:true}]};_0x108ex2a= _[_0x6504[82]]({},_0x108ex2a,_0x108ex1e[_0x6504[86]]);return db[_0x6504[64]][_0x6504[94]](_0x108ex2a)[_0x6504[40]](handleEntityNotFound(_0x108ex24,null))[_0x6504[40]](respondWithResult(_0x108ex24,null))[_0x6504[31]](handleError(_0x108ex24,null))};exports[_0x6504[95]]= function(_0x108ex1e,_0x108ex24){return db[_0x6504[64]][_0x6504[95]](_0x108ex1e[_0x6504[96]],{})[_0x6504[40]](respondWithResult(_0x108ex24,201))[_0x6504[31]](handleError(_0x108ex24,null))};exports[_0x6504[56]]= function(_0x108ex1e,_0x108ex24){if(_0x108ex1e[_0x6504[96]][_0x6504[92]]){delete _0x108ex1e[_0x6504[96]][_0x6504[92]]};return db[_0x6504[64]][_0x6504[94]]({where:{id:_0x108ex1e[_0x6504[93]][_0x6504[92]]}})[_0x6504[40]](handleEntityNotFound(_0x108ex24,null))[_0x6504[40]](saveUpdates(_0x108ex1e[_0x6504[96]],null))[_0x6504[40]](respondWithResult(_0x108ex24,null))[_0x6504[31]](handleError(_0x108ex24,null))};exports[_0x6504[57]]= function(_0x108ex1e,_0x108ex24){return db[_0x6504[64]][_0x6504[94]]({where:{id:_0x108ex1e[_0x6504[93]][_0x6504[92]]}})[_0x6504[40]](handleEntityNotFound(_0x108ex24,null))[_0x6504[40]](removeEntity(_0x108ex24,null))[_0x6504[31]](handleError(_0x108ex24,null))};exports[_0x6504[97]]= function(_0x108ex1e,_0x108ex27,_0x108ex3c){var _0x108ex2a={};var _0x108ex36={};var _0x108ex3d;var _0x108ex2b;return db[_0x6504[64]][_0x6504[99]]({where:{id:_0x108ex1e[_0x6504[93]][_0x6504[92]]}})[_0x6504[40]](handleEntityNotFound(_0x108ex27,null))[_0x6504[40]](function(_0x108ex27){if(_0x108ex27){_0x108ex3d= _0x108ex27;_0x108ex36[_0x6504[62]]= _[_0x6504[65]](db[_0x6504[98]][_0x6504[63]]);_0x108ex36[_0x6504[67]]= _[_0x6504[65]](_0x108ex1e[_0x6504[67]]);_0x108ex36[_0x6504[69]]= _[_0x6504[70]](_0x108ex36[_0x6504[62]],_0x108ex36[_0x6504[67]]);_0x108ex2a[_0x6504[71]]= _[_0x6504[70]](_0x108ex36[_0x6504[62]],qs[_0x6504[72]](_0x108ex1e[_0x6504[67]][_0x6504[72]]));_0x108ex2a[_0x6504[71]]= (_0x108ex2a[_0x6504[71]][_0x6504[73]])?_0x108ex2a[_0x6504[71]]:_0x108ex36[_0x6504[62]];_0x108ex2a[_0x6504[76]]= qs[_0x6504[77]](_0x108ex1e[_0x6504[67]][_0x6504[77]]);_0x108ex2a[_0x6504[78]]= qs[_0x6504[69]](_[_0x6504[79]](_0x108ex1e[_0x6504[67]],_0x108ex36[_0x6504[69]]));if(_0x108ex1e[_0x6504[67]][_0x6504[83]]){_0x108ex2a[_0x6504[78]]= _[_0x6504[82]](_0x108ex2a[_0x6504[78]],{$or:_[_0x6504[85]](_0x108ex2a[_0x6504[71]],function(_0x108ex39){var _0x108ex37={};_0x108ex37[_0x108ex39]= {$like:_0x6504[84]+ _0x108ex1e[_0x6504[67]][_0x6504[83]]+ _0x6504[84]};return _0x108ex37})})};_0x108ex2a= _[_0x6504[82]]({},_0x108ex2a,_0x108ex1e[_0x6504[86]]);return _0x108ex3d[_0x6504[97]](_0x108ex2a)}})[_0x6504[40]](function(_0x108ex3e){if(_0x108ex3e){_0x108ex2b= _0x108ex3e[_0x6504[73]];if(!_0x108ex1e[_0x6504[67]][_0x6504[75]](_0x6504[74])){_0x108ex2a[_0x6504[48]]= qs[_0x6504[48]](_0x108ex1e[_0x6504[67]][_0x6504[48]]);_0x108ex2a[_0x6504[47]]= qs[_0x6504[47]](_0x108ex1e[_0x6504[67]][_0x6504[47]])};return _0x108ex3d[_0x6504[97]](_0x108ex2a)}})[_0x6504[40]](function(_0x108ex3b){if(_0x108ex3b){return _0x108ex3b?{count:_0x108ex2b,rows:_0x108ex3b}:null}})[_0x6504[40]](respondWithResult(_0x108ex27,null))[_0x6504[31]](handleError(_0x108ex27,null))};exports[_0x6504[100]]= function(_0x108ex1e,_0x108ex27,_0x108ex3c){var _0x108ex2a={};var _0x108ex36={};var _0x108ex3d;var _0x108ex2b;return db[_0x6504[64]][_0x6504[99]]({where:{id:_0x108ex1e[_0x6504[93]][_0x6504[92]]}})[_0x6504[40]](handleEntityNotFound(_0x108ex27,null))[_0x6504[40]](function(_0x108ex27){if(_0x108ex27){_0x108ex3d= _0x108ex27;_0x108ex36[_0x6504[62]]= _[_0x6504[65]](db[_0x6504[98]][_0x6504[63]]);_0x108ex36[_0x6504[67]]= _[_0x6504[65]](_0x108ex1e[_0x6504[67]]);_0x108ex36[_0x6504[69]]= _[_0x6504[70]](_0x108ex36[_0x6504[62]],_0x108ex36[_0x6504[67]]);_0x108ex2a[_0x6504[71]]= _[_0x6504[70]](_0x108ex36[_0x6504[62]],qs[_0x6504[72]](_0x108ex1e[_0x6504[67]][_0x6504[72]]));_0x108ex2a[_0x6504[71]]= (_0x108ex2a[_0x6504[71]][_0x6504[73]])?_0x108ex2a[_0x6504[71]]:_0x108ex36[_0x6504[62]];_0x108ex2a[_0x6504[76]]= qs[_0x6504[77]](_0x108ex1e[_0x6504[67]][_0x6504[77]]);_0x108ex2a[_0x6504[78]]= qs[_0x6504[69]](_[_0x6504[79]](_0x108ex1e[_0x6504[67]],_0x108ex36[_0x6504[69]]));if(_0x108ex1e[_0x6504[67]][_0x6504[83]]){_0x108ex2a[_0x6504[78]]= _[_0x6504[82]](_0x108ex2a[_0x6504[78]],{$or:_[_0x6504[85]](_0x108ex2a[_0x6504[71]],function(_0x108ex39){var _0x108ex37={};_0x108ex37[_0x108ex39]= {$like:_0x6504[84]+ _0x108ex1e[_0x6504[67]][_0x6504[83]]+ _0x6504[84]};return _0x108ex37})})};_0x108ex2a= _[_0x6504[82]]({},_0x108ex2a,_0x108ex1e[_0x6504[86]]);return _0x108ex3d[_0x6504[100]](_0x108ex2a)}})[_0x6504[40]](function(_0x108ex3e){if(_0x108ex3e){_0x108ex2b= _0x108ex3e[_0x6504[73]];if(!_0x108ex1e[_0x6504[67]][_0x6504[75]](_0x6504[74])){_0x108ex2a[_0x6504[48]]= qs[_0x6504[48]](_0x108ex1e[_0x6504[67]][_0x6504[48]]);_0x108ex2a[_0x6504[47]]= qs[_0x6504[47]](_0x108ex1e[_0x6504[67]][_0x6504[47]])};return _0x108ex3d[_0x6504[100]](_0x108ex2a)}})[_0x6504[40]](function(_0x108ex3b){if(_0x108ex3b){return _0x108ex3b?{count:_0x108ex2b,rows:_0x108ex3b}:null}})[_0x6504[40]](respondWithResult(_0x108ex27,null))[_0x6504[31]](handleError(_0x108ex27,null))};exports[_0x6504[101]]= function(_0x108ex1e,_0x108ex27,_0x108ex3c){var _0x108ex2a={};var _0x108ex36={};var _0x108ex3d;var _0x108ex2b;return db[_0x6504[64]][_0x6504[99]]({where:{id:_0x108ex1e[_0x6504[93]][_0x6504[92]]}})[_0x6504[40]](handleEntityNotFound(_0x108ex27,null))[_0x6504[40]](function(_0x108ex27){if(_0x108ex27){_0x108ex3d= _0x108ex27;_0x108ex36[_0x6504[62]]= _[_0x6504[65]](db[_0x6504[98]][_0x6504[63]]);_0x108ex36[_0x6504[67]]= _[_0x6504[65]](_0x108ex1e[_0x6504[67]]);_0x108ex36[_0x6504[69]]= _[_0x6504[70]](_0x108ex36[_0x6504[62]],_0x108ex36[_0x6504[67]]);_0x108ex2a[_0x6504[71]]= _[_0x6504[70]](_0x108ex36[_0x6504[62]],qs[_0x6504[72]](_0x108ex1e[_0x6504[67]][_0x6504[72]]));_0x108ex2a[_0x6504[71]]= (_0x108ex2a[_0x6504[71]][_0x6504[73]])?_0x108ex2a[_0x6504[71]]:_0x108ex36[_0x6504[62]];_0x108ex2a[_0x6504[76]]= qs[_0x6504[77]](_0x108ex1e[_0x6504[67]][_0x6504[77]]);_0x108ex2a[_0x6504[78]]= qs[_0x6504[69]](_[_0x6504[79]](_0x108ex1e[_0x6504[67]],_0x108ex36[_0x6504[69]]));if(_0x108ex1e[_0x6504[67]][_0x6504[83]]){_0x108ex2a[_0x6504[78]]= _[_0x6504[82]](_0x108ex2a[_0x6504[78]],{$or:_[_0x6504[85]](_0x108ex2a[_0x6504[71]],function(_0x108ex39){var _0x108ex37={};_0x108ex37[_0x108ex39]= {$like:_0x6504[84]+ _0x108ex1e[_0x6504[67]][_0x6504[83]]+ _0x6504[84]};return _0x108ex37})})};_0x108ex2a= _[_0x6504[82]]({},_0x108ex2a,_0x108ex1e[_0x6504[86]]);return _0x108ex3d[_0x6504[101]](_0x108ex2a)}})[_0x6504[40]](function(_0x108ex3e){if(_0x108ex3e){_0x108ex2b= _0x108ex3e[_0x6504[73]];if(!_0x108ex1e[_0x6504[67]][_0x6504[75]](_0x6504[74])){_0x108ex2a[_0x6504[48]]= qs[_0x6504[48]](_0x108ex1e[_0x6504[67]][_0x6504[48]]);_0x108ex2a[_0x6504[47]]= qs[_0x6504[47]](_0x108ex1e[_0x6504[67]][_0x6504[47]])};return _0x108ex3d[_0x6504[101]](_0x108ex2a)}})[_0x6504[40]](function(_0x108ex3b){if(_0x108ex3b){return _0x108ex3b?{count:_0x108ex2b,rows:_0x108ex3b}:null}})[_0x6504[40]](respondWithResult(_0x108ex27,null))[_0x6504[31]](handleError(_0x108ex27,null))}
\ No newline at end of file
+var _0x69b1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73"];_0x69b1[0];var jsonpatch=require(_0x69b1[1]);var rp=require(_0x69b1[2]);var moment=require(_0x69b1[3]);var BPromise=require(_0x69b1[4]);var Mustache=require(_0x69b1[5]);var util=require(_0x69b1[6]);var path=require(_0x69b1[7]);var sox=require(_0x69b1[8]);var csv=require(_0x69b1[9]);var ejs=require(_0x69b1[10]);var fs=require(_0x69b1[11]);var _=require(_0x69b1[12]);var squel=require(_0x69b1[13]);var crypto=require(_0x69b1[14]);var jsforce=require(_0x69b1[15]);var deskjs=require(_0x69b1[16]);var toCsv=require(_0x69b1[9]);var querystring=require(_0x69b1[17]);var Papa=require(_0x69b1[18]);var qs=require(_0x69b1[19]);var logger=require(_0x69b1[21])(_0x69b1[20]);var utils=require(_0x69b1[22]);var config=require(_0x69b1[23]);var db=require(_0x69b1[25])[_0x69b1[24]];var jayson=require(_0x69b1[26]);var client=jayson[_0x69b1[28]][_0x69b1[27]]({port:9002});function respondWithRpcPromise(_0x2779x1c,_0x2779x1d,_0x2779x1e,_0x2779x1f){return  new BPromise(function(_0x2779x20,_0x2779x21){var _0x2779x22=(_0x2779x1f|| client);return _0x2779x22[_0x69b1[41]](_0x2779x1c,_0x2779x1e)[_0x69b1[40]](function(_0x2779x24){logger[_0x69b1[33]](_0x69b1[29],_0x2779x1d,_0x69b1[32]);logger[_0x69b1[36]](_0x69b1[34],_0x2779x1d,_0x69b1[32],JSON[_0x69b1[35]](_0x2779x24));if(_0x2779x24[_0x69b1[30]]){if(_0x2779x24[_0x69b1[30]][_0x69b1[37]]=== 500){logger[_0x69b1[30]](_0x69b1[29],_0x2779x1d,_0x2779x24[_0x69b1[30]][_0x69b1[38]]);return _0x2779x21(_0x2779x24[_0x69b1[30]][_0x69b1[38]])};logger[_0x69b1[30]](_0x69b1[29],_0x2779x1d,_0x2779x24[_0x69b1[30]][_0x69b1[38]]);return _0x2779x20(_0x2779x24[_0x69b1[30]][_0x69b1[38]])}else {logger[_0x69b1[33]](_0x69b1[29],_0x2779x1d,_0x69b1[32]);_0x2779x20(_0x2779x24[_0x69b1[39]][_0x69b1[38]])}})[_0x69b1[31]](function(_0x2779x23){logger[_0x69b1[30]](_0x69b1[29],_0x2779x1d,_0x2779x23);_0x2779x21(_0x2779x23)})})}function respondWithStatusCode(_0x2779x24,_0x2779x26){_0x2779x26= _0x2779x26|| 204;return function(_0x2779x27){if(_0x2779x27){return _0x2779x24[_0x69b1[42]](_0x2779x26)};return _0x2779x24[_0x69b1[44]](_0x2779x26)[_0x69b1[43]]()}}function respondWithResult(_0x2779x24,_0x2779x26){_0x2779x26= _0x2779x26|| 200;return function(_0x2779x27){if(_0x2779x27){return _0x2779x24[_0x69b1[44]](_0x2779x26)[_0x69b1[45]](_0x2779x27)}}}function respondWithFilteredResult(_0x2779x24,_0x2779x2a){return function(_0x2779x27){if(_0x2779x27){var _0x2779x2b=_0x2779x27[_0x69b1[46]],_0x2779x2c=_0x2779x2a[_0x69b1[47]],_0x2779x2d=_0x2779x2a[_0x69b1[47]]+ _0x2779x2a[_0x69b1[48]],_0x2779x26;if(_0x2779x2d>= _0x2779x2b){_0x2779x2d= _0x2779x2b;_0x2779x26= 200}else {_0x2779x26= 206};_0x2779x24[_0x69b1[44]](_0x2779x26);return _0x2779x24[_0x69b1[52]](_0x69b1[49],_0x2779x2c+ _0x69b1[50]+ _0x2779x2d+ _0x69b1[51]+ _0x2779x2b)[_0x69b1[45]](_0x2779x27)};return null}}function patchUpdates(_0x2779x2f){return function(_0x2779x27){try{jsonpatch[_0x69b1[53]](_0x2779x27,_0x2779x2f,true)}catch(err){return BPromise[_0x69b1[54]](err)};return _0x2779x27[_0x69b1[55]]()}}function saveUpdates(_0x2779x31,_0x2779x26){return function(_0x2779x27){if(_0x2779x27){return _0x2779x27[_0x69b1[56]](_0x2779x31)[_0x69b1[40]](function(_0x2779x32){return _0x2779x32})};return null}}function removeEntity(_0x2779x24,_0x2779x26){return function(_0x2779x27){if(_0x2779x27){return _0x2779x27[_0x69b1[57]]()[_0x69b1[40]](function(){_0x2779x24[_0x69b1[44]](204)[_0x69b1[43]]()})}}}function handleEntityNotFound(_0x2779x24,_0x2779x26){return function(_0x2779x27){if(!_0x2779x27){_0x2779x24[_0x69b1[42]](404)};return _0x2779x27}}function handleError(_0x2779x24,_0x2779x26){_0x2779x26= _0x2779x26|| 500;return function(_0x2779x23){logger[_0x69b1[30]](_0x2779x23[_0x69b1[58]]);if(_0x2779x23[_0x69b1[59]]){delete _0x2779x23[_0x69b1[59]]};_0x2779x24[_0x69b1[44]](_0x2779x26)[_0x69b1[60]](_0x2779x23)}}exports[_0x69b1[61]]= function(_0x2779x1e,_0x2779x24){var _0x2779x2a={},_0x2779x36={},_0x2779x37={count:0,rows:[]};_0x2779x36[_0x69b1[62]]= _[_0x69b1[65]](db[_0x69b1[64]][_0x69b1[63]]);var _0x2779x38={dateStart:_0x2779x1e[_0x69b1[67]][_0x69b1[66]],dateEnd:_0x2779x1e[_0x69b1[67]][_0x69b1[68]]};delete _0x2779x1e[_0x69b1[67]][_0x69b1[66]];delete _0x2779x1e[_0x69b1[67]][_0x69b1[68]];_0x2779x36[_0x69b1[67]]= _[_0x69b1[65]](_0x2779x1e[_0x69b1[67]]);_0x2779x36[_0x69b1[69]]= _[_0x69b1[70]](_0x2779x36[_0x69b1[62]],_0x2779x36[_0x69b1[67]]);_0x2779x2a[_0x69b1[71]]= _[_0x69b1[70]](_0x2779x36[_0x69b1[62]],qs[_0x69b1[72]](_0x2779x1e[_0x69b1[67]][_0x69b1[72]]));_0x2779x2a[_0x69b1[71]]= (_0x2779x2a[_0x69b1[71]][_0x69b1[73]])?_0x2779x2a[_0x69b1[71]]:_0x2779x36[_0x69b1[62]];if(!_0x2779x1e[_0x69b1[67]][_0x69b1[75]](_0x69b1[74])){_0x2779x2a[_0x69b1[48]]= qs[_0x69b1[48]](_0x2779x1e[_0x69b1[67]][_0x69b1[48]]);_0x2779x2a[_0x69b1[47]]= qs[_0x69b1[47]](_0x2779x1e[_0x69b1[67]][_0x69b1[47]])};_0x2779x2a[_0x69b1[76]]= qs[_0x69b1[77]](_0x2779x1e[_0x69b1[67]][_0x69b1[77]]);_0x2779x2a[_0x69b1[78]]= qs[_0x69b1[69]](_[_0x69b1[79]](_0x2779x1e[_0x69b1[67]],_0x2779x36[_0x69b1[69]]));if(_0x2779x38[_0x69b1[66]]){if(_0x2779x38[_0x69b1[68]]){_0x2779x38[_0x69b1[68]]= moment(_0x2779x38[_0x69b1[68]])[_0x69b1[81]](1,_0x69b1[80])}else {_0x2779x38[_0x69b1[68]]= moment(_0x2779x38[_0x69b1[66]])[_0x69b1[81]](1,_0x69b1[80])};_[_0x69b1[82]](_0x2779x2a[_0x69b1[78]],{createdAt:{$gte:_0x2779x38[_0x69b1[66]],$lte:_0x2779x38[_0x69b1[68]]}})};if(_0x2779x1e[_0x69b1[67]][_0x69b1[83]]){_0x2779x2a[_0x69b1[78]]= _[_0x69b1[82]](_0x2779x2a[_0x69b1[78]],{$or:_[_0x69b1[85]](_0x2779x2a[_0x69b1[71]],function(_0x2779x39){var _0x2779x37={};_0x2779x37[_0x2779x39]= {$like:_0x69b1[84]+ _0x2779x1e[_0x69b1[67]][_0x69b1[83]]+ _0x69b1[84]};return _0x2779x37})})};_0x2779x2a= _[_0x69b1[82]]({},_0x2779x2a,_0x2779x1e[_0x69b1[86]]);var _0x2779x3a={where:_0x2779x2a[_0x69b1[78]]};return db[_0x69b1[64]][_0x69b1[46]](_0x2779x3a)[_0x69b1[40]](function(_0x2779x2b){_0x2779x37[_0x69b1[46]]= _0x2779x2b;if(_0x2779x1e[_0x69b1[67]][_0x69b1[88]]){_0x2779x2a[_0x69b1[89]]= [{all:true}]};return db[_0x69b1[64]][_0x69b1[90]](_0x2779x2a)})[_0x69b1[40]](function(_0x2779x3b){_0x2779x37[_0x69b1[87]]= _0x2779x3b;return _0x2779x37})[_0x69b1[40]](respondWithFilteredResult(_0x2779x24,_0x2779x2a))[_0x69b1[31]](handleError(_0x2779x24,null))};exports[_0x69b1[91]]= function(_0x2779x1e,_0x2779x24){var _0x2779x2a={raw:false,where:{id:_0x2779x1e[_0x69b1[93]][_0x69b1[92]]}},_0x2779x36={};_0x2779x36[_0x69b1[62]]= _[_0x69b1[65]](db[_0x69b1[64]][_0x69b1[63]]);_0x2779x36[_0x69b1[67]]= _[_0x69b1[65]](_0x2779x1e[_0x69b1[67]]);_0x2779x36[_0x69b1[69]]= _[_0x69b1[70]](_0x2779x36[_0x69b1[62]],_0x2779x36[_0x69b1[67]]);_0x2779x2a[_0x69b1[71]]= _[_0x69b1[70]](_0x2779x36[_0x69b1[62]],qs[_0x69b1[72]](_0x2779x1e[_0x69b1[67]][_0x69b1[72]]));_0x2779x2a[_0x69b1[71]]= (_0x2779x2a[_0x69b1[71]][_0x69b1[73]])?_0x2779x2a[_0x69b1[71]]:_0x2779x36[_0x69b1[62]];if(_0x2779x1e[_0x69b1[67]][_0x69b1[88]]){_0x2779x2a[_0x69b1[89]]= [{all:true}]};_0x2779x2a= _[_0x69b1[82]]({},_0x2779x2a,_0x2779x1e[_0x69b1[86]]);return db[_0x69b1[64]][_0x69b1[94]](_0x2779x2a)[_0x69b1[40]](handleEntityNotFound(_0x2779x24,null))[_0x69b1[40]](respondWithResult(_0x2779x24,null))[_0x69b1[31]](handleError(_0x2779x24,null))};exports[_0x69b1[95]]= function(_0x2779x1e,_0x2779x24){return db[_0x69b1[64]][_0x69b1[95]](_0x2779x1e[_0x69b1[96]],{})[_0x69b1[40]](respondWithResult(_0x2779x24,201))[_0x69b1[31]](handleError(_0x2779x24,null))};exports[_0x69b1[56]]= function(_0x2779x1e,_0x2779x24){if(_0x2779x1e[_0x69b1[96]][_0x69b1[92]]){delete _0x2779x1e[_0x69b1[96]][_0x69b1[92]]};return db[_0x69b1[64]][_0x69b1[94]]({where:{id:_0x2779x1e[_0x69b1[93]][_0x69b1[92]]}})[_0x69b1[40]](handleEntityNotFound(_0x2779x24,null))[_0x69b1[40]](saveUpdates(_0x2779x1e[_0x69b1[96]],null))[_0x69b1[40]](respondWithResult(_0x2779x24,null))[_0x69b1[31]](handleError(_0x2779x24,null))};exports[_0x69b1[57]]= function(_0x2779x1e,_0x2779x24){return db[_0x69b1[64]][_0x69b1[94]]({where:{id:_0x2779x1e[_0x69b1[93]][_0x69b1[92]]}})[_0x69b1[40]](handleEntityNotFound(_0x2779x24,null))[_0x69b1[40]](removeEntity(_0x2779x24,null))[_0x69b1[31]](handleError(_0x2779x24,null))};exports[_0x69b1[97]]= function(_0x2779x1e,_0x2779x27,_0x2779x3c){var _0x2779x2a={};var _0x2779x36={};var _0x2779x3d;var _0x2779x2b;return db[_0x69b1[64]][_0x69b1[99]]({where:{id:_0x2779x1e[_0x69b1[93]][_0x69b1[92]]}})[_0x69b1[40]](handleEntityNotFound(_0x2779x27,null))[_0x69b1[40]](function(_0x2779x27){if(_0x2779x27){_0x2779x3d= _0x2779x27;_0x2779x36[_0x69b1[62]]= _[_0x69b1[65]](db[_0x69b1[98]][_0x69b1[63]]);_0x2779x36[_0x69b1[67]]= _[_0x69b1[65]](_0x2779x1e[_0x69b1[67]]);_0x2779x36[_0x69b1[69]]= _[_0x69b1[70]](_0x2779x36[_0x69b1[62]],_0x2779x36[_0x69b1[67]]);_0x2779x2a[_0x69b1[71]]= _[_0x69b1[70]](_0x2779x36[_0x69b1[62]],qs[_0x69b1[72]](_0x2779x1e[_0x69b1[67]][_0x69b1[72]]));_0x2779x2a[_0x69b1[71]]= (_0x2779x2a[_0x69b1[71]][_0x69b1[73]])?_0x2779x2a[_0x69b1[71]]:_0x2779x36[_0x69b1[62]];_0x2779x2a[_0x69b1[76]]= qs[_0x69b1[77]](_0x2779x1e[_0x69b1[67]][_0x69b1[77]]);_0x2779x2a[_0x69b1[78]]= qs[_0x69b1[69]](_[_0x69b1[79]](_0x2779x1e[_0x69b1[67]],_0x2779x36[_0x69b1[69]]));if(_0x2779x1e[_0x69b1[67]][_0x69b1[83]]){_0x2779x2a[_0x69b1[78]]= _[_0x69b1[82]](_0x2779x2a[_0x69b1[78]],{$or:_[_0x69b1[85]](_0x2779x2a[_0x69b1[71]],function(_0x2779x39){var _0x2779x37={};_0x2779x37[_0x2779x39]= {$like:_0x69b1[84]+ _0x2779x1e[_0x69b1[67]][_0x69b1[83]]+ _0x69b1[84]};return _0x2779x37})})};_0x2779x2a= _[_0x69b1[82]]({},_0x2779x2a,_0x2779x1e[_0x69b1[86]]);return _0x2779x3d[_0x69b1[97]](_0x2779x2a)}})[_0x69b1[40]](function(_0x2779x3e){if(_0x2779x3e){_0x2779x2b= _0x2779x3e[_0x69b1[73]];if(!_0x2779x1e[_0x69b1[67]][_0x69b1[75]](_0x69b1[74])){_0x2779x2a[_0x69b1[48]]= qs[_0x69b1[48]](_0x2779x1e[_0x69b1[67]][_0x69b1[48]]);_0x2779x2a[_0x69b1[47]]= qs[_0x69b1[47]](_0x2779x1e[_0x69b1[67]][_0x69b1[47]])};return _0x2779x3d[_0x69b1[97]](_0x2779x2a)}})[_0x69b1[40]](function(_0x2779x3b){if(_0x2779x3b){return _0x2779x3b?{count:_0x2779x2b,rows:_0x2779x3b}:null}})[_0x69b1[40]](respondWithResult(_0x2779x27,null))[_0x69b1[31]](handleError(_0x2779x27,null))};exports[_0x69b1[100]]= function(_0x2779x1e,_0x2779x27,_0x2779x3c){var _0x2779x2a={};var _0x2779x36={};var _0x2779x3d;var _0x2779x2b;return db[_0x69b1[64]][_0x69b1[99]]({where:{id:_0x2779x1e[_0x69b1[93]][_0x69b1[92]]}})[_0x69b1[40]](handleEntityNotFound(_0x2779x27,null))[_0x69b1[40]](function(_0x2779x27){if(_0x2779x27){_0x2779x3d= _0x2779x27;_0x2779x36[_0x69b1[62]]= _[_0x69b1[65]](db[_0x69b1[98]][_0x69b1[63]]);_0x2779x36[_0x69b1[67]]= _[_0x69b1[65]](_0x2779x1e[_0x69b1[67]]);_0x2779x36[_0x69b1[69]]= _[_0x69b1[70]](_0x2779x36[_0x69b1[62]],_0x2779x36[_0x69b1[67]]);_0x2779x2a[_0x69b1[71]]= _[_0x69b1[70]](_0x2779x36[_0x69b1[62]],qs[_0x69b1[72]](_0x2779x1e[_0x69b1[67]][_0x69b1[72]]));_0x2779x2a[_0x69b1[71]]= (_0x2779x2a[_0x69b1[71]][_0x69b1[73]])?_0x2779x2a[_0x69b1[71]]:_0x2779x36[_0x69b1[62]];_0x2779x2a[_0x69b1[76]]= qs[_0x69b1[77]](_0x2779x1e[_0x69b1[67]][_0x69b1[77]]);_0x2779x2a[_0x69b1[78]]= qs[_0x69b1[69]](_[_0x69b1[79]](_0x2779x1e[_0x69b1[67]],_0x2779x36[_0x69b1[69]]));if(_0x2779x1e[_0x69b1[67]][_0x69b1[83]]){_0x2779x2a[_0x69b1[78]]= _[_0x69b1[82]](_0x2779x2a[_0x69b1[78]],{$or:_[_0x69b1[85]](_0x2779x2a[_0x69b1[71]],function(_0x2779x39){var _0x2779x37={};_0x2779x37[_0x2779x39]= {$like:_0x69b1[84]+ _0x2779x1e[_0x69b1[67]][_0x69b1[83]]+ _0x69b1[84]};return _0x2779x37})})};_0x2779x2a= _[_0x69b1[82]]({},_0x2779x2a,_0x2779x1e[_0x69b1[86]]);return _0x2779x3d[_0x69b1[100]](_0x2779x2a)}})[_0x69b1[40]](function(_0x2779x3e){if(_0x2779x3e){_0x2779x2b= _0x2779x3e[_0x69b1[73]];if(!_0x2779x1e[_0x69b1[67]][_0x69b1[75]](_0x69b1[74])){_0x2779x2a[_0x69b1[48]]= qs[_0x69b1[48]](_0x2779x1e[_0x69b1[67]][_0x69b1[48]]);_0x2779x2a[_0x69b1[47]]= qs[_0x69b1[47]](_0x2779x1e[_0x69b1[67]][_0x69b1[47]])};return _0x2779x3d[_0x69b1[100]](_0x2779x2a)}})[_0x69b1[40]](function(_0x2779x3b){if(_0x2779x3b){return _0x2779x3b?{count:_0x2779x2b,rows:_0x2779x3b}:null}})[_0x69b1[40]](respondWithResult(_0x2779x27,null))[_0x69b1[31]](handleError(_0x2779x27,null))};exports[_0x69b1[101]]= function(_0x2779x1e,_0x2779x27,_0x2779x3c){var _0x2779x2a={};var _0x2779x36={};var _0x2779x3d;var _0x2779x2b;return db[_0x69b1[64]][_0x69b1[99]]({where:{id:_0x2779x1e[_0x69b1[93]][_0x69b1[92]]}})[_0x69b1[40]](handleEntityNotFound(_0x2779x27,null))[_0x69b1[40]](function(_0x2779x27){if(_0x2779x27){_0x2779x3d= _0x2779x27;_0x2779x36[_0x69b1[62]]= _[_0x69b1[65]](db[_0x69b1[98]][_0x69b1[63]]);_0x2779x36[_0x69b1[67]]= _[_0x69b1[65]](_0x2779x1e[_0x69b1[67]]);_0x2779x36[_0x69b1[69]]= _[_0x69b1[70]](_0x2779x36[_0x69b1[62]],_0x2779x36[_0x69b1[67]]);_0x2779x2a[_0x69b1[71]]= _[_0x69b1[70]](_0x2779x36[_0x69b1[62]],qs[_0x69b1[72]](_0x2779x1e[_0x69b1[67]][_0x69b1[72]]));_0x2779x2a[_0x69b1[71]]= (_0x2779x2a[_0x69b1[71]][_0x69b1[73]])?_0x2779x2a[_0x69b1[71]]:_0x2779x36[_0x69b1[62]];_0x2779x2a[_0x69b1[76]]= qs[_0x69b1[77]](_0x2779x1e[_0x69b1[67]][_0x69b1[77]]);_0x2779x2a[_0x69b1[78]]= qs[_0x69b1[69]](_[_0x69b1[79]](_0x2779x1e[_0x69b1[67]],_0x2779x36[_0x69b1[69]]));if(_0x2779x1e[_0x69b1[67]][_0x69b1[83]]){_0x2779x2a[_0x69b1[78]]= _[_0x69b1[82]](_0x2779x2a[_0x69b1[78]],{$or:_[_0x69b1[85]](_0x2779x2a[_0x69b1[71]],function(_0x2779x39){var _0x2779x37={};_0x2779x37[_0x2779x39]= {$like:_0x69b1[84]+ _0x2779x1e[_0x69b1[67]][_0x69b1[83]]+ _0x69b1[84]};return _0x2779x37})})};_0x2779x2a= _[_0x69b1[82]]({},_0x2779x2a,_0x2779x1e[_0x69b1[86]]);return _0x2779x3d[_0x69b1[101]](_0x2779x2a)}})[_0x69b1[40]](function(_0x2779x3e){if(_0x2779x3e){_0x2779x2b= _0x2779x3e[_0x69b1[73]];if(!_0x2779x1e[_0x69b1[67]][_0x69b1[75]](_0x69b1[74])){_0x2779x2a[_0x69b1[48]]= qs[_0x69b1[48]](_0x2779x1e[_0x69b1[67]][_0x69b1[48]]);_0x2779x2a[_0x69b1[47]]= qs[_0x69b1[47]](_0x2779x1e[_0x69b1[67]][_0x69b1[47]])};return _0x2779x3d[_0x69b1[101]](_0x2779x2a)}})[_0x69b1[40]](function(_0x2779x3b){if(_0x2779x3b){return _0x2779x3b?{count:_0x2779x2b,rows:_0x2779x3b}:null}})[_0x69b1[40]](respondWithResult(_0x2779x27,null))[_0x69b1[31]](handleError(_0x2779x27,null))}
\ No newline at end of file
index a4fd2c7..79269ff 100644 (file)
@@ -1 +1 @@
-var _0xae37=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x69\x6E\x74\x5F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xae37[0];var _=require(_0xae37[1]);var util=require(_0xae37[2]);var logger=require(_0xae37[4])(_0xae37[3]);var moment=require(_0xae37[5]);var BPromise=require(_0xae37[6]);var rp=require(_0xae37[7]);var attributes=require(_0xae37[8]);module[_0xae37[9]]= function(_0x5171x8,_0x5171x9){return _0x5171x8[_0xae37[12]](_0xae37[10],attributes,{tableName:_0xae37[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xe5a6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x69\x6E\x74\x5F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xe5a6[0];var _=require(_0xe5a6[1]);var util=require(_0xe5a6[2]);var logger=require(_0xe5a6[4])(_0xe5a6[3]);var moment=require(_0xe5a6[5]);var BPromise=require(_0xe5a6[6]);var rp=require(_0xe5a6[7]);var attributes=require(_0xe5a6[8]);module[_0xe5a6[9]]= function(_0xe1a2x8,_0xe1a2x9){return _0xe1a2x8[_0xe5a6[12]](_0xe5a6[10],attributes,{tableName:_0xe5a6[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index f16de2b..b8a07ba 100644 (file)
@@ -1 +1 @@
-var _0x5e8d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x5e8d[0];var _=require(_0x5e8d[1]);var util=require(_0x5e8d[2]);var moment=require(_0x5e8d[3]);var BPromise=require(_0x5e8d[4]);var rs=require(_0x5e8d[5]);var fs=require(_0x5e8d[6]);var db=require(_0x5e8d[8])[_0x5e8d[7]];var utils=require(_0x5e8d[9]);var logger=require(_0x5e8d[11])(_0x5e8d[10]);var config=require(_0x5e8d[12]);var jayson=require(_0x5e8d[13]);var client=jayson[_0x5e8d[15]][_0x5e8d[14]]({port:9002});function respondWithRpcPromise(_0xd9d0xe,_0xd9d0xf,_0xd9d0x10){return  new BPromise(function(_0xd9d0x11,_0xd9d0x12){return client[_0x5e8d[28]](_0xd9d0xe,_0xd9d0x10)[_0x5e8d[27]](function(_0xd9d0x14){logger[_0x5e8d[20]](_0x5e8d[16],_0xd9d0xf,_0x5e8d[19]);logger[_0x5e8d[23]](_0x5e8d[21],_0xd9d0xf,_0x5e8d[19],JSON[_0x5e8d[22]](_0xd9d0x14));if(_0xd9d0x14[_0x5e8d[17]]){if(_0xd9d0x14[_0x5e8d[17]][_0x5e8d[24]]=== 500){logger[_0x5e8d[17]](_0x5e8d[16],_0xd9d0xf,_0xd9d0x14[_0x5e8d[17]][_0x5e8d[25]]);return _0xd9d0x12(_0xd9d0x14[_0x5e8d[17]][_0x5e8d[25]])};logger[_0x5e8d[17]](_0x5e8d[16],_0xd9d0xf,_0xd9d0x14[_0x5e8d[17]][_0x5e8d[25]]);return _0xd9d0x11(_0xd9d0x14[_0x5e8d[17]][_0x5e8d[25]])}else {logger[_0x5e8d[20]](_0x5e8d[16],_0xd9d0xf,_0x5e8d[19]);_0xd9d0x11(_0xd9d0x14[_0x5e8d[26]][_0x5e8d[25]])}})[_0x5e8d[18]](function(_0xd9d0x13){logger[_0x5e8d[17]](_0x5e8d[16],_0xd9d0xf,_0xd9d0x13);_0xd9d0x12(_0xd9d0x13)})})}
\ No newline at end of file
+var _0x7da0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x7da0[0];var _=require(_0x7da0[1]);var util=require(_0x7da0[2]);var moment=require(_0x7da0[3]);var BPromise=require(_0x7da0[4]);var rs=require(_0x7da0[5]);var fs=require(_0x7da0[6]);var db=require(_0x7da0[8])[_0x7da0[7]];var utils=require(_0x7da0[9]);var logger=require(_0x7da0[11])(_0x7da0[10]);var config=require(_0x7da0[12]);var jayson=require(_0x7da0[13]);var client=jayson[_0x7da0[15]][_0x7da0[14]]({port:9002});function respondWithRpcPromise(_0x586bxe,_0x586bxf,_0x586bx10){return  new BPromise(function(_0x586bx11,_0x586bx12){return client[_0x7da0[28]](_0x586bxe,_0x586bx10)[_0x7da0[27]](function(_0x586bx14){logger[_0x7da0[20]](_0x7da0[16],_0x586bxf,_0x7da0[19]);logger[_0x7da0[23]](_0x7da0[21],_0x586bxf,_0x7da0[19],JSON[_0x7da0[22]](_0x586bx14));if(_0x586bx14[_0x7da0[17]]){if(_0x586bx14[_0x7da0[17]][_0x7da0[24]]=== 500){logger[_0x7da0[17]](_0x7da0[16],_0x586bxf,_0x586bx14[_0x7da0[17]][_0x7da0[25]]);return _0x586bx12(_0x586bx14[_0x7da0[17]][_0x7da0[25]])};logger[_0x7da0[17]](_0x7da0[16],_0x586bxf,_0x586bx14[_0x7da0[17]][_0x7da0[25]]);return _0x586bx11(_0x586bx14[_0x7da0[17]][_0x7da0[25]])}else {logger[_0x7da0[20]](_0x7da0[16],_0x586bxf,_0x7da0[19]);_0x586bx11(_0x586bx14[_0x7da0[26]][_0x7da0[25]])}})[_0x7da0[18]](function(_0x586bx13){logger[_0x7da0[17]](_0x7da0[16],_0x586bxf,_0x586bx13);_0x586bx12(_0x586bx13)})})}
\ No newline at end of file
index 21239f0..9fcce09 100644 (file)
@@ -1 +1 @@
-var _0x2b19=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2b19[0];var multer=require(_0x2b19[1]);var util=require(_0x2b19[2]);var path=require(_0x2b19[3]);var express=require(_0x2b19[4]);var router=express.Router();var auth=require(_0x2b19[5]);var interaction=require(_0x2b19[6]);var config=require(_0x2b19[7]);var controller=require(_0x2b19[8]);router[_0x2b19[12]](_0x2b19[9],auth[_0x2b19[10]](),controller[_0x2b19[11]]);router[_0x2b19[12]](_0x2b19[13],auth[_0x2b19[10]](),controller[_0x2b19[14]]);router[_0x2b19[16]](_0x2b19[9],auth[_0x2b19[10]](),controller[_0x2b19[15]]);router[_0x2b19[18]](_0x2b19[13],auth[_0x2b19[10]](),controller[_0x2b19[17]]);router[_0x2b19[20]](_0x2b19[13],auth[_0x2b19[10]](),controller[_0x2b19[19]]);module[_0x2b19[21]]= router
\ No newline at end of file
+var _0xe611=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xe611[0];var multer=require(_0xe611[1]);var util=require(_0xe611[2]);var path=require(_0xe611[3]);var express=require(_0xe611[4]);var router=express.Router();var auth=require(_0xe611[5]);var interaction=require(_0xe611[6]);var config=require(_0xe611[7]);var controller=require(_0xe611[8]);router[_0xe611[12]](_0xe611[9],auth[_0xe611[10]](),controller[_0xe611[11]]);router[_0xe611[12]](_0xe611[13],auth[_0xe611[10]](),controller[_0xe611[14]]);router[_0xe611[16]](_0xe611[9],auth[_0xe611[10]](),controller[_0xe611[15]]);router[_0xe611[18]](_0xe611[13],auth[_0xe611[10]](),controller[_0xe611[17]]);router[_0xe611[20]](_0xe611[13],auth[_0xe611[10]](),controller[_0xe611[19]]);module[_0xe611[21]]= router
\ No newline at end of file
index e4d8c73..afb9398 100644 (file)
@@ -1 +1 @@
-var _0x48ba=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x73\x74\x72\x69\x6E\x67","\x76\x61\x72\x69\x61\x62\x6C\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47"];_0x48ba[0];var Sequelize=require(_0x48ba[1]);module[_0x48ba[2]]= {type:{type:Sequelize.ENUM(_0x48ba[3],_0x48ba[4],_0x48ba[5],_0x48ba[6]),defaultValue:_0x48ba[3]},content:{type:Sequelize[_0x48ba[7]]},key:{type:Sequelize[_0x48ba[7]]},keyType:{type:Sequelize.ENUM(_0x48ba[3],_0x48ba[4],_0x48ba[5])},keyContent:{type:Sequelize[_0x48ba[7]]},idField:{type:Sequelize[_0x48ba[7]]},variableName:{type:Sequelize[_0x48ba[7]]}}
\ No newline at end of file
+var _0x7af3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x73\x74\x72\x69\x6E\x67","\x76\x61\x72\x69\x61\x62\x6C\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47"];_0x7af3[0];var Sequelize=require(_0x7af3[1]);module[_0x7af3[2]]= {type:{type:Sequelize.ENUM(_0x7af3[3],_0x7af3[4],_0x7af3[5],_0x7af3[6]),defaultValue:_0x7af3[3]},content:{type:Sequelize[_0x7af3[7]]},key:{type:Sequelize[_0x7af3[7]]},keyType:{type:Sequelize.ENUM(_0x7af3[3],_0x7af3[4],_0x7af3[5])},keyContent:{type:Sequelize[_0x7af3[7]]},idField:{type:Sequelize[_0x7af3[7]]},variableName:{type:Sequelize[_0x7af3[7]]}}
\ No newline at end of file
index 0f885b5..ac90640 100644 (file)
@@ -1 +1 @@
-var _0xa60d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xa60d[0];var jsonpatch=require(_0xa60d[1]);var rp=require(_0xa60d[2]);var moment=require(_0xa60d[3]);var BPromise=require(_0xa60d[4]);var Mustache=require(_0xa60d[5]);var util=require(_0xa60d[6]);var path=require(_0xa60d[7]);var sox=require(_0xa60d[8]);var csv=require(_0xa60d[9]);var ejs=require(_0xa60d[10]);var fs=require(_0xa60d[11]);var _=require(_0xa60d[12]);var squel=require(_0xa60d[13]);var crypto=require(_0xa60d[14]);var jsforce=require(_0xa60d[15]);var deskjs=require(_0xa60d[16]);var toCsv=require(_0xa60d[9]);var querystring=require(_0xa60d[17]);var Papa=require(_0xa60d[18]);var qs=require(_0xa60d[19]);var logger=require(_0xa60d[21])(_0xa60d[20]);var utils=require(_0xa60d[22]);var config=require(_0xa60d[23]);var db=require(_0xa60d[25])[_0xa60d[24]];function respondWithStatusCode(_0xee8cx1a,_0xee8cx1b){_0xee8cx1b= _0xee8cx1b|| 204;return function(_0xee8cx1c){if(_0xee8cx1c){return _0xee8cx1a[_0xa60d[26]](_0xee8cx1b)};return _0xee8cx1a[_0xa60d[28]](_0xee8cx1b)[_0xa60d[27]]()}}function respondWithResult(_0xee8cx1a,_0xee8cx1b){_0xee8cx1b= _0xee8cx1b|| 200;return function(_0xee8cx1c){if(_0xee8cx1c){return _0xee8cx1a[_0xa60d[28]](_0xee8cx1b)[_0xa60d[29]](_0xee8cx1c)}}}function respondWithFilteredResult(_0xee8cx1a,_0xee8cx1f){return function(_0xee8cx1c){if(_0xee8cx1c){var _0xee8cx20=_0xee8cx1c[_0xa60d[30]],_0xee8cx21=_0xee8cx1f[_0xa60d[31]],_0xee8cx22=_0xee8cx1f[_0xa60d[31]]+ _0xee8cx1f[_0xa60d[32]],_0xee8cx1b;if(_0xee8cx22>= _0xee8cx20){_0xee8cx22= _0xee8cx20;_0xee8cx1b= 200}else {_0xee8cx1b= 206};_0xee8cx1a[_0xa60d[28]](_0xee8cx1b);return _0xee8cx1a[_0xa60d[36]](_0xa60d[33],_0xee8cx21+ _0xa60d[34]+ _0xee8cx22+ _0xa60d[35]+ _0xee8cx20)[_0xa60d[29]](_0xee8cx1c)};return null}}function patchUpdates(_0xee8cx24){return function(_0xee8cx1c){try{jsonpatch[_0xa60d[37]](_0xee8cx1c,_0xee8cx24,true)}catch(err){return BPromise[_0xa60d[38]](err)};return _0xee8cx1c[_0xa60d[39]]()}}function saveUpdates(_0xee8cx26,_0xee8cx1b){return function(_0xee8cx1c){if(_0xee8cx1c){return _0xee8cx1c[_0xa60d[41]](_0xee8cx26)[_0xa60d[40]](function(_0xee8cx27){return _0xee8cx27})};return null}}function removeEntity(_0xee8cx1a,_0xee8cx1b){return function(_0xee8cx1c){if(_0xee8cx1c){return _0xee8cx1c[_0xa60d[42]]()[_0xa60d[40]](function(){_0xee8cx1a[_0xa60d[28]](204)[_0xa60d[27]]()})}}}function handleEntityNotFound(_0xee8cx1a,_0xee8cx1b){return function(_0xee8cx1c){if(!_0xee8cx1c){_0xee8cx1a[_0xa60d[26]](404)};return _0xee8cx1c}}function handleError(_0xee8cx1a,_0xee8cx1b){_0xee8cx1b= _0xee8cx1b|| 500;return function(_0xee8cx2b){logger[_0xa60d[44]](_0xee8cx2b[_0xa60d[43]]);if(_0xee8cx2b[_0xa60d[45]]){delete _0xee8cx2b[_0xa60d[45]]};_0xee8cx1a[_0xa60d[28]](_0xee8cx1b)[_0xa60d[46]](_0xee8cx2b)}}exports[_0xa60d[47]]= function(_0xee8cx2c,_0xee8cx1a){var _0xee8cx1f={},_0xee8cx2d={},_0xee8cx2e={count:0,rows:[]};_0xee8cx2d[_0xa60d[48]]= _[_0xa60d[51]](db[_0xa60d[50]][_0xa60d[49]]);var _0xee8cx2f={dateStart:_0xee8cx2c[_0xa60d[53]][_0xa60d[52]],dateEnd:_0xee8cx2c[_0xa60d[53]][_0xa60d[54]]};delete _0xee8cx2c[_0xa60d[53]][_0xa60d[52]];delete _0xee8cx2c[_0xa60d[53]][_0xa60d[54]];_0xee8cx2d[_0xa60d[53]]= _[_0xa60d[51]](_0xee8cx2c[_0xa60d[53]]);_0xee8cx2d[_0xa60d[55]]= _[_0xa60d[56]](_0xee8cx2d[_0xa60d[48]],_0xee8cx2d[_0xa60d[53]]);_0xee8cx1f[_0xa60d[57]]= _[_0xa60d[56]](_0xee8cx2d[_0xa60d[48]],qs[_0xa60d[58]](_0xee8cx2c[_0xa60d[53]][_0xa60d[58]]));_0xee8cx1f[_0xa60d[57]]= (_0xee8cx1f[_0xa60d[57]][_0xa60d[59]])?_0xee8cx1f[_0xa60d[57]]:_0xee8cx2d[_0xa60d[48]];if(!_0xee8cx2c[_0xa60d[53]][_0xa60d[61]](_0xa60d[60])){_0xee8cx1f[_0xa60d[32]]= qs[_0xa60d[32]](_0xee8cx2c[_0xa60d[53]][_0xa60d[32]]);_0xee8cx1f[_0xa60d[31]]= qs[_0xa60d[31]](_0xee8cx2c[_0xa60d[53]][_0xa60d[31]])};_0xee8cx1f[_0xa60d[62]]= qs[_0xa60d[63]](_0xee8cx2c[_0xa60d[53]][_0xa60d[63]]);_0xee8cx1f[_0xa60d[64]]= qs[_0xa60d[55]](_[_0xa60d[65]](_0xee8cx2c[_0xa60d[53]],_0xee8cx2d[_0xa60d[55]]));if(_0xee8cx2f[_0xa60d[52]]){if(_0xee8cx2f[_0xa60d[54]]){_0xee8cx2f[_0xa60d[54]]= moment(_0xee8cx2f[_0xa60d[54]])[_0xa60d[67]](1,_0xa60d[66])}else {_0xee8cx2f[_0xa60d[54]]= moment(_0xee8cx2f[_0xa60d[52]])[_0xa60d[67]](1,_0xa60d[66])};_[_0xa60d[68]](_0xee8cx1f[_0xa60d[64]],{createdAt:{$gte:_0xee8cx2f[_0xa60d[52]],$lte:_0xee8cx2f[_0xa60d[54]]}})};if(_0xee8cx2c[_0xa60d[53]][_0xa60d[69]]){_0xee8cx1f[_0xa60d[64]]= _[_0xa60d[68]](_0xee8cx1f[_0xa60d[64]],{$or:_[_0xa60d[71]](_0xee8cx1f[_0xa60d[57]],function(_0xee8cx30){var _0xee8cx2e={};_0xee8cx2e[_0xee8cx30]= {$like:_0xa60d[70]+ _0xee8cx2c[_0xa60d[53]][_0xa60d[69]]+ _0xa60d[70]};return _0xee8cx2e})})};_0xee8cx1f= _[_0xa60d[68]]({},_0xee8cx1f,_0xee8cx2c[_0xa60d[72]]);var _0xee8cx31={where:_0xee8cx1f[_0xa60d[64]]};return db[_0xa60d[50]][_0xa60d[30]](_0xee8cx31)[_0xa60d[40]](function(_0xee8cx20){_0xee8cx2e[_0xa60d[30]]= _0xee8cx20;if(_0xee8cx2c[_0xa60d[53]][_0xa60d[75]]){_0xee8cx1f[_0xa60d[76]]= [{all:true}]};return db[_0xa60d[50]][_0xa60d[77]](_0xee8cx1f)})[_0xa60d[40]](function(_0xee8cx32){_0xee8cx2e[_0xa60d[74]]= _0xee8cx32;return _0xee8cx2e})[_0xa60d[40]](respondWithFilteredResult(_0xee8cx1a,_0xee8cx1f))[_0xa60d[73]](handleError(_0xee8cx1a,null))};exports[_0xa60d[78]]= function(_0xee8cx2c,_0xee8cx1a){var _0xee8cx1f={raw:true,where:{id:_0xee8cx2c[_0xa60d[80]][_0xa60d[79]]}},_0xee8cx2d={};_0xee8cx2d[_0xa60d[48]]= _[_0xa60d[51]](db[_0xa60d[50]][_0xa60d[49]]);_0xee8cx2d[_0xa60d[53]]= _[_0xa60d[51]](_0xee8cx2c[_0xa60d[53]]);_0xee8cx2d[_0xa60d[55]]= _[_0xa60d[56]](_0xee8cx2d[_0xa60d[48]],_0xee8cx2d[_0xa60d[53]]);_0xee8cx1f[_0xa60d[57]]= _[_0xa60d[56]](_0xee8cx2d[_0xa60d[48]],qs[_0xa60d[58]](_0xee8cx2c[_0xa60d[53]][_0xa60d[58]]));_0xee8cx1f[_0xa60d[57]]= (_0xee8cx1f[_0xa60d[57]][_0xa60d[59]])?_0xee8cx1f[_0xa60d[57]]:_0xee8cx2d[_0xa60d[48]];if(_0xee8cx2c[_0xa60d[53]][_0xa60d[75]]){_0xee8cx1f[_0xa60d[76]]= [{all:true}]};_0xee8cx1f= _[_0xa60d[68]]({},_0xee8cx1f,_0xee8cx2c[_0xa60d[72]]);return db[_0xa60d[50]][_0xa60d[81]](_0xee8cx1f)[_0xa60d[40]](handleEntityNotFound(_0xee8cx1a,null))[_0xa60d[40]](respondWithResult(_0xee8cx1a,null))[_0xa60d[73]](handleError(_0xee8cx1a,null))};exports[_0xa60d[82]]= function(_0xee8cx2c,_0xee8cx1a){return db[_0xa60d[50]][_0xa60d[82]](_0xee8cx2c[_0xa60d[83]],{})[_0xa60d[40]](respondWithResult(_0xee8cx1a,201))[_0xa60d[73]](handleError(_0xee8cx1a,null))};exports[_0xa60d[41]]= function(_0xee8cx2c,_0xee8cx1a){if(_0xee8cx2c[_0xa60d[83]][_0xa60d[79]]){delete _0xee8cx2c[_0xa60d[83]][_0xa60d[79]]};return db[_0xa60d[50]][_0xa60d[81]]({where:{id:_0xee8cx2c[_0xa60d[80]][_0xa60d[79]]}})[_0xa60d[40]](handleEntityNotFound(_0xee8cx1a,null))[_0xa60d[40]](saveUpdates(_0xee8cx2c[_0xa60d[83]],null))[_0xa60d[40]](respondWithResult(_0xee8cx1a,null))[_0xa60d[73]](handleError(_0xee8cx1a,null))};exports[_0xa60d[42]]= function(_0xee8cx2c,_0xee8cx1a){return db[_0xa60d[50]][_0xa60d[81]]({where:{id:_0xee8cx2c[_0xa60d[80]][_0xa60d[79]]}})[_0xa60d[40]](handleEntityNotFound(_0xee8cx1a,null))[_0xa60d[40]](removeEntity(_0xee8cx1a,null))[_0xa60d[73]](handleError(_0xee8cx1a,null))}
\ No newline at end of file
+var _0x79b3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x79b3[0];var jsonpatch=require(_0x79b3[1]);var rp=require(_0x79b3[2]);var moment=require(_0x79b3[3]);var BPromise=require(_0x79b3[4]);var Mustache=require(_0x79b3[5]);var util=require(_0x79b3[6]);var path=require(_0x79b3[7]);var sox=require(_0x79b3[8]);var csv=require(_0x79b3[9]);var ejs=require(_0x79b3[10]);var fs=require(_0x79b3[11]);var _=require(_0x79b3[12]);var squel=require(_0x79b3[13]);var crypto=require(_0x79b3[14]);var jsforce=require(_0x79b3[15]);var deskjs=require(_0x79b3[16]);var toCsv=require(_0x79b3[9]);var querystring=require(_0x79b3[17]);var Papa=require(_0x79b3[18]);var qs=require(_0x79b3[19]);var logger=require(_0x79b3[21])(_0x79b3[20]);var utils=require(_0x79b3[22]);var config=require(_0x79b3[23]);var db=require(_0x79b3[25])[_0x79b3[24]];function respondWithStatusCode(_0x7ac6x1a,_0x7ac6x1b){_0x7ac6x1b= _0x7ac6x1b|| 204;return function(_0x7ac6x1c){if(_0x7ac6x1c){return _0x7ac6x1a[_0x79b3[26]](_0x7ac6x1b)};return _0x7ac6x1a[_0x79b3[28]](_0x7ac6x1b)[_0x79b3[27]]()}}function respondWithResult(_0x7ac6x1a,_0x7ac6x1b){_0x7ac6x1b= _0x7ac6x1b|| 200;return function(_0x7ac6x1c){if(_0x7ac6x1c){return _0x7ac6x1a[_0x79b3[28]](_0x7ac6x1b)[_0x79b3[29]](_0x7ac6x1c)}}}function respondWithFilteredResult(_0x7ac6x1a,_0x7ac6x1f){return function(_0x7ac6x1c){if(_0x7ac6x1c){var _0x7ac6x20=_0x7ac6x1c[_0x79b3[30]],_0x7ac6x21=_0x7ac6x1f[_0x79b3[31]],_0x7ac6x22=_0x7ac6x1f[_0x79b3[31]]+ _0x7ac6x1f[_0x79b3[32]],_0x7ac6x1b;if(_0x7ac6x22>= _0x7ac6x20){_0x7ac6x22= _0x7ac6x20;_0x7ac6x1b= 200}else {_0x7ac6x1b= 206};_0x7ac6x1a[_0x79b3[28]](_0x7ac6x1b);return _0x7ac6x1a[_0x79b3[36]](_0x79b3[33],_0x7ac6x21+ _0x79b3[34]+ _0x7ac6x22+ _0x79b3[35]+ _0x7ac6x20)[_0x79b3[29]](_0x7ac6x1c)};return null}}function patchUpdates(_0x7ac6x24){return function(_0x7ac6x1c){try{jsonpatch[_0x79b3[37]](_0x7ac6x1c,_0x7ac6x24,true)}catch(err){return BPromise[_0x79b3[38]](err)};return _0x7ac6x1c[_0x79b3[39]]()}}function saveUpdates(_0x7ac6x26,_0x7ac6x1b){return function(_0x7ac6x1c){if(_0x7ac6x1c){return _0x7ac6x1c[_0x79b3[41]](_0x7ac6x26)[_0x79b3[40]](function(_0x7ac6x27){return _0x7ac6x27})};return null}}function removeEntity(_0x7ac6x1a,_0x7ac6x1b){return function(_0x7ac6x1c){if(_0x7ac6x1c){return _0x7ac6x1c[_0x79b3[42]]()[_0x79b3[40]](function(){_0x7ac6x1a[_0x79b3[28]](204)[_0x79b3[27]]()})}}}function handleEntityNotFound(_0x7ac6x1a,_0x7ac6x1b){return function(_0x7ac6x1c){if(!_0x7ac6x1c){_0x7ac6x1a[_0x79b3[26]](404)};return _0x7ac6x1c}}function handleError(_0x7ac6x1a,_0x7ac6x1b){_0x7ac6x1b= _0x7ac6x1b|| 500;return function(_0x7ac6x2b){logger[_0x79b3[44]](_0x7ac6x2b[_0x79b3[43]]);if(_0x7ac6x2b[_0x79b3[45]]){delete _0x7ac6x2b[_0x79b3[45]]};_0x7ac6x1a[_0x79b3[28]](_0x7ac6x1b)[_0x79b3[46]](_0x7ac6x2b)}}exports[_0x79b3[47]]= function(_0x7ac6x2c,_0x7ac6x1a){var _0x7ac6x1f={},_0x7ac6x2d={},_0x7ac6x2e={count:0,rows:[]};_0x7ac6x2d[_0x79b3[48]]= _[_0x79b3[51]](db[_0x79b3[50]][_0x79b3[49]]);var _0x7ac6x2f={dateStart:_0x7ac6x2c[_0x79b3[53]][_0x79b3[52]],dateEnd:_0x7ac6x2c[_0x79b3[53]][_0x79b3[54]]};delete _0x7ac6x2c[_0x79b3[53]][_0x79b3[52]];delete _0x7ac6x2c[_0x79b3[53]][_0x79b3[54]];_0x7ac6x2d[_0x79b3[53]]= _[_0x79b3[51]](_0x7ac6x2c[_0x79b3[53]]);_0x7ac6x2d[_0x79b3[55]]= _[_0x79b3[56]](_0x7ac6x2d[_0x79b3[48]],_0x7ac6x2d[_0x79b3[53]]);_0x7ac6x1f[_0x79b3[57]]= _[_0x79b3[56]](_0x7ac6x2d[_0x79b3[48]],qs[_0x79b3[58]](_0x7ac6x2c[_0x79b3[53]][_0x79b3[58]]));_0x7ac6x1f[_0x79b3[57]]= (_0x7ac6x1f[_0x79b3[57]][_0x79b3[59]])?_0x7ac6x1f[_0x79b3[57]]:_0x7ac6x2d[_0x79b3[48]];if(!_0x7ac6x2c[_0x79b3[53]][_0x79b3[61]](_0x79b3[60])){_0x7ac6x1f[_0x79b3[32]]= qs[_0x79b3[32]](_0x7ac6x2c[_0x79b3[53]][_0x79b3[32]]);_0x7ac6x1f[_0x79b3[31]]= qs[_0x79b3[31]](_0x7ac6x2c[_0x79b3[53]][_0x79b3[31]])};_0x7ac6x1f[_0x79b3[62]]= qs[_0x79b3[63]](_0x7ac6x2c[_0x79b3[53]][_0x79b3[63]]);_0x7ac6x1f[_0x79b3[64]]= qs[_0x79b3[55]](_[_0x79b3[65]](_0x7ac6x2c[_0x79b3[53]],_0x7ac6x2d[_0x79b3[55]]));if(_0x7ac6x2f[_0x79b3[52]]){if(_0x7ac6x2f[_0x79b3[54]]){_0x7ac6x2f[_0x79b3[54]]= moment(_0x7ac6x2f[_0x79b3[54]])[_0x79b3[67]](1,_0x79b3[66])}else {_0x7ac6x2f[_0x79b3[54]]= moment(_0x7ac6x2f[_0x79b3[52]])[_0x79b3[67]](1,_0x79b3[66])};_[_0x79b3[68]](_0x7ac6x1f[_0x79b3[64]],{createdAt:{$gte:_0x7ac6x2f[_0x79b3[52]],$lte:_0x7ac6x2f[_0x79b3[54]]}})};if(_0x7ac6x2c[_0x79b3[53]][_0x79b3[69]]){_0x7ac6x1f[_0x79b3[64]]= _[_0x79b3[68]](_0x7ac6x1f[_0x79b3[64]],{$or:_[_0x79b3[71]](_0x7ac6x1f[_0x79b3[57]],function(_0x7ac6x30){var _0x7ac6x2e={};_0x7ac6x2e[_0x7ac6x30]= {$like:_0x79b3[70]+ _0x7ac6x2c[_0x79b3[53]][_0x79b3[69]]+ _0x79b3[70]};return _0x7ac6x2e})})};_0x7ac6x1f= _[_0x79b3[68]]({},_0x7ac6x1f,_0x7ac6x2c[_0x79b3[72]]);var _0x7ac6x31={where:_0x7ac6x1f[_0x79b3[64]]};return db[_0x79b3[50]][_0x79b3[30]](_0x7ac6x31)[_0x79b3[40]](function(_0x7ac6x20){_0x7ac6x2e[_0x79b3[30]]= _0x7ac6x20;if(_0x7ac6x2c[_0x79b3[53]][_0x79b3[75]]){_0x7ac6x1f[_0x79b3[76]]= [{all:true}]};return db[_0x79b3[50]][_0x79b3[77]](_0x7ac6x1f)})[_0x79b3[40]](function(_0x7ac6x32){_0x7ac6x2e[_0x79b3[74]]= _0x7ac6x32;return _0x7ac6x2e})[_0x79b3[40]](respondWithFilteredResult(_0x7ac6x1a,_0x7ac6x1f))[_0x79b3[73]](handleError(_0x7ac6x1a,null))};exports[_0x79b3[78]]= function(_0x7ac6x2c,_0x7ac6x1a){var _0x7ac6x1f={raw:true,where:{id:_0x7ac6x2c[_0x79b3[80]][_0x79b3[79]]}},_0x7ac6x2d={};_0x7ac6x2d[_0x79b3[48]]= _[_0x79b3[51]](db[_0x79b3[50]][_0x79b3[49]]);_0x7ac6x2d[_0x79b3[53]]= _[_0x79b3[51]](_0x7ac6x2c[_0x79b3[53]]);_0x7ac6x2d[_0x79b3[55]]= _[_0x79b3[56]](_0x7ac6x2d[_0x79b3[48]],_0x7ac6x2d[_0x79b3[53]]);_0x7ac6x1f[_0x79b3[57]]= _[_0x79b3[56]](_0x7ac6x2d[_0x79b3[48]],qs[_0x79b3[58]](_0x7ac6x2c[_0x79b3[53]][_0x79b3[58]]));_0x7ac6x1f[_0x79b3[57]]= (_0x7ac6x1f[_0x79b3[57]][_0x79b3[59]])?_0x7ac6x1f[_0x79b3[57]]:_0x7ac6x2d[_0x79b3[48]];if(_0x7ac6x2c[_0x79b3[53]][_0x79b3[75]]){_0x7ac6x1f[_0x79b3[76]]= [{all:true}]};_0x7ac6x1f= _[_0x79b3[68]]({},_0x7ac6x1f,_0x7ac6x2c[_0x79b3[72]]);return db[_0x79b3[50]][_0x79b3[81]](_0x7ac6x1f)[_0x79b3[40]](handleEntityNotFound(_0x7ac6x1a,null))[_0x79b3[40]](respondWithResult(_0x7ac6x1a,null))[_0x79b3[73]](handleError(_0x7ac6x1a,null))};exports[_0x79b3[82]]= function(_0x7ac6x2c,_0x7ac6x1a){return db[_0x79b3[50]][_0x79b3[82]](_0x7ac6x2c[_0x79b3[83]],{})[_0x79b3[40]](respondWithResult(_0x7ac6x1a,201))[_0x79b3[73]](handleError(_0x7ac6x1a,null))};exports[_0x79b3[41]]= function(_0x7ac6x2c,_0x7ac6x1a){if(_0x7ac6x2c[_0x79b3[83]][_0x79b3[79]]){delete _0x7ac6x2c[_0x79b3[83]][_0x79b3[79]]};return db[_0x79b3[50]][_0x79b3[81]]({where:{id:_0x7ac6x2c[_0x79b3[80]][_0x79b3[79]]}})[_0x79b3[40]](handleEntityNotFound(_0x7ac6x1a,null))[_0x79b3[40]](saveUpdates(_0x7ac6x2c[_0x79b3[83]],null))[_0x79b3[40]](respondWithResult(_0x7ac6x1a,null))[_0x79b3[73]](handleError(_0x7ac6x1a,null))};exports[_0x79b3[42]]= function(_0x7ac6x2c,_0x7ac6x1a){return db[_0x79b3[50]][_0x79b3[81]]({where:{id:_0x7ac6x2c[_0x79b3[80]][_0x79b3[79]]}})[_0x79b3[40]](handleEntityNotFound(_0x7ac6x1a,null))[_0x79b3[40]](removeEntity(_0x7ac6x1a,null))[_0x79b3[73]](handleError(_0x7ac6x1a,null))}
\ No newline at end of file
index 50828ed..ab84f39 100644 (file)
@@ -1 +1 @@
-var _0x3a50=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x69\x6E\x74\x5F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0x3a50[0];var _=require(_0x3a50[1]);var util=require(_0x3a50[2]);var logger=require(_0x3a50[4])(_0x3a50[3]);var moment=require(_0x3a50[5]);var BPromise=require(_0x3a50[6]);var rp=require(_0x3a50[7]);var attributes=require(_0x3a50[8]);module[_0x3a50[9]]= function(_0xa1eex8,_0xa1eex9){return _0xa1eex8[_0x3a50[12]](_0x3a50[10],attributes,{tableName:_0x3a50[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xfde4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x69\x6E\x74\x5F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0xfde4[0];var _=require(_0xfde4[1]);var util=require(_0xfde4[2]);var logger=require(_0xfde4[4])(_0xfde4[3]);var moment=require(_0xfde4[5]);var BPromise=require(_0xfde4[6]);var rp=require(_0xfde4[7]);var attributes=require(_0xfde4[8]);module[_0xfde4[9]]= function(_0xb160x8,_0xb160x9){return _0xb160x8[_0xfde4[12]](_0xfde4[10],attributes,{tableName:_0xfde4[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 225cd97..28f85b8 100644 (file)
@@ -1 +1 @@
-var _0xdb60=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xdb60[0];var _=require(_0xdb60[1]);var util=require(_0xdb60[2]);var moment=require(_0xdb60[3]);var BPromise=require(_0xdb60[4]);var rs=require(_0xdb60[5]);var fs=require(_0xdb60[6]);var db=require(_0xdb60[8])[_0xdb60[7]];var utils=require(_0xdb60[9]);var logger=require(_0xdb60[11])(_0xdb60[10]);var config=require(_0xdb60[12]);var jayson=require(_0xdb60[13]);var client=jayson[_0xdb60[15]][_0xdb60[14]]({port:9002});function respondWithRpcPromise(_0xb860xe,_0xb860xf,_0xb860x10){return  new BPromise(function(_0xb860x11,_0xb860x12){return client[_0xdb60[28]](_0xb860xe,_0xb860x10)[_0xdb60[27]](function(_0xb860x14){logger[_0xdb60[20]](_0xdb60[16],_0xb860xf,_0xdb60[19]);logger[_0xdb60[23]](_0xdb60[21],_0xb860xf,_0xdb60[19],JSON[_0xdb60[22]](_0xb860x14));if(_0xb860x14[_0xdb60[17]]){if(_0xb860x14[_0xdb60[17]][_0xdb60[24]]=== 500){logger[_0xdb60[17]](_0xdb60[16],_0xb860xf,_0xb860x14[_0xdb60[17]][_0xdb60[25]]);return _0xb860x12(_0xb860x14[_0xdb60[17]][_0xdb60[25]])};logger[_0xdb60[17]](_0xdb60[16],_0xb860xf,_0xb860x14[_0xdb60[17]][_0xdb60[25]]);return _0xb860x11(_0xb860x14[_0xdb60[17]][_0xdb60[25]])}else {logger[_0xdb60[20]](_0xdb60[16],_0xb860xf,_0xdb60[19]);_0xb860x11(_0xb860x14[_0xdb60[26]][_0xdb60[25]])}})[_0xdb60[18]](function(_0xb860x13){logger[_0xdb60[17]](_0xdb60[16],_0xb860xf,_0xb860x13);_0xb860x12(_0xb860x13)})})}
\ No newline at end of file
+var _0x7972=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x7972[0];var _=require(_0x7972[1]);var util=require(_0x7972[2]);var moment=require(_0x7972[3]);var BPromise=require(_0x7972[4]);var rs=require(_0x7972[5]);var fs=require(_0x7972[6]);var db=require(_0x7972[8])[_0x7972[7]];var utils=require(_0x7972[9]);var logger=require(_0x7972[11])(_0x7972[10]);var config=require(_0x7972[12]);var jayson=require(_0x7972[13]);var client=jayson[_0x7972[15]][_0x7972[14]]({port:9002});function respondWithRpcPromise(_0x8e26xe,_0x8e26xf,_0x8e26x10){return  new BPromise(function(_0x8e26x11,_0x8e26x12){return client[_0x7972[28]](_0x8e26xe,_0x8e26x10)[_0x7972[27]](function(_0x8e26x14){logger[_0x7972[20]](_0x7972[16],_0x8e26xf,_0x7972[19]);logger[_0x7972[23]](_0x7972[21],_0x8e26xf,_0x7972[19],JSON[_0x7972[22]](_0x8e26x14));if(_0x8e26x14[_0x7972[17]]){if(_0x8e26x14[_0x7972[17]][_0x7972[24]]=== 500){logger[_0x7972[17]](_0x7972[16],_0x8e26xf,_0x8e26x14[_0x7972[17]][_0x7972[25]]);return _0x8e26x12(_0x8e26x14[_0x7972[17]][_0x7972[25]])};logger[_0x7972[17]](_0x7972[16],_0x8e26xf,_0x8e26x14[_0x7972[17]][_0x7972[25]]);return _0x8e26x11(_0x8e26x14[_0x7972[17]][_0x7972[25]])}else {logger[_0x7972[20]](_0x7972[16],_0x8e26xf,_0x7972[19]);_0x8e26x11(_0x8e26x14[_0x7972[26]][_0x7972[25]])}})[_0x7972[18]](function(_0x8e26x13){logger[_0x7972[17]](_0x7972[16],_0x8e26xf,_0x8e26x13);_0x8e26x12(_0x8e26x13)})})}
\ No newline at end of file
index 4dbb3ae..b93eff4 100644 (file)
@@ -1 +1 @@
-var _0x1ca2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x1ca2[0];var multer=require(_0x1ca2[1]);var util=require(_0x1ca2[2]);var path=require(_0x1ca2[3]);var express=require(_0x1ca2[4]);var router=express.Router();var auth=require(_0x1ca2[5]);var interaction=require(_0x1ca2[6]);var config=require(_0x1ca2[7]);var controller=require(_0x1ca2[8]);router[_0x1ca2[12]](_0x1ca2[9],auth[_0x1ca2[10]](),controller[_0x1ca2[11]]);router[_0x1ca2[12]](_0x1ca2[13],auth[_0x1ca2[10]](),controller[_0x1ca2[14]]);router[_0x1ca2[12]](_0x1ca2[15],auth[_0x1ca2[10]](),controller[_0x1ca2[16]]);router[_0x1ca2[12]](_0x1ca2[17],auth[_0x1ca2[10]](),controller[_0x1ca2[18]]);router[_0x1ca2[20]](_0x1ca2[9],auth[_0x1ca2[10]](),controller[_0x1ca2[19]]);router[_0x1ca2[20]](_0x1ca2[15],auth[_0x1ca2[10]](),controller[_0x1ca2[21]]);router[_0x1ca2[23]](_0x1ca2[13],auth[_0x1ca2[10]](),controller[_0x1ca2[22]]);router[_0x1ca2[25]](_0x1ca2[13],auth[_0x1ca2[10]](),controller[_0x1ca2[24]]);module[_0x1ca2[26]]= router
\ No newline at end of file
+var _0x2d44=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2d44[0];var multer=require(_0x2d44[1]);var util=require(_0x2d44[2]);var path=require(_0x2d44[3]);var express=require(_0x2d44[4]);var router=express.Router();var auth=require(_0x2d44[5]);var interaction=require(_0x2d44[6]);var config=require(_0x2d44[7]);var controller=require(_0x2d44[8]);router[_0x2d44[12]](_0x2d44[9],auth[_0x2d44[10]](),controller[_0x2d44[11]]);router[_0x2d44[12]](_0x2d44[13],auth[_0x2d44[10]](),controller[_0x2d44[14]]);router[_0x2d44[12]](_0x2d44[15],auth[_0x2d44[10]](),controller[_0x2d44[16]]);router[_0x2d44[12]](_0x2d44[17],auth[_0x2d44[10]](),controller[_0x2d44[18]]);router[_0x2d44[20]](_0x2d44[9],auth[_0x2d44[10]](),controller[_0x2d44[19]]);router[_0x2d44[20]](_0x2d44[15],auth[_0x2d44[10]](),controller[_0x2d44[21]]);router[_0x2d44[23]](_0x2d44[13],auth[_0x2d44[10]](),controller[_0x2d44[22]]);router[_0x2d44[25]](_0x2d44[13],auth[_0x2d44[10]](),controller[_0x2d44[24]]);module[_0x2d44[26]]= router
\ No newline at end of file
index bd78d5f..82e36f2 100644 (file)
@@ -1 +1 @@
-var _0x65a7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69"];_0x65a7[0];var Sequelize=require(_0x65a7[1]);module[_0x65a7[2]]= {name:{type:Sequelize[_0x65a7[3]]},description:{type:Sequelize[_0x65a7[3]]},username:{type:Sequelize[_0x65a7[3]],unique:_0x65a7[4]},password:{type:Sequelize[_0x65a7[3]]},remoteUri:{type:Sequelize[_0x65a7[3]],unique:_0x65a7[5]},serverUrl:{type:Sequelize[_0x65a7[3]]}}
\ No newline at end of file
+var _0x22b2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69"];_0x22b2[0];var Sequelize=require(_0x22b2[1]);module[_0x22b2[2]]= {name:{type:Sequelize[_0x22b2[3]]},description:{type:Sequelize[_0x22b2[3]]},username:{type:Sequelize[_0x22b2[3]],unique:_0x22b2[4]},password:{type:Sequelize[_0x22b2[3]]},remoteUri:{type:Sequelize[_0x22b2[3]],unique:_0x22b2[5]},serverUrl:{type:Sequelize[_0x22b2[3]]}}
\ No newline at end of file
index da423df..656ef4a 100644 (file)
@@ -1 +1 @@
-var _0x9b7e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x79\x70\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x74\x65\x73\x74","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73","\x6D\x6F\x64\x75\x6C\x65\x5F\x66\x69\x65\x6C\x64\x73","\x76\x61\x6C\x75\x65\x73","\x6C\x61\x62\x65\x6C","\x5F\x63","\x65\x6E\x64\x73\x57\x69\x74\x68","\x76\x61\x6C\x75\x65","\x50\x4F\x53\x54","\x25\x73\x25\x73","\x2F\x73\x65\x72\x76\x69\x63\x65\x2F\x76\x34\x5F\x31\x2F\x72\x65\x73\x74\x2E\x70\x68\x70","\x66\x6F\x72\x6D\x61\x74","\x67\x65\x74\x5F\x6D\x6F\x64\x75\x6C\x65\x5F\x66\x69\x65\x6C\x64\x73","\x4A\x53\x4F\x4E","\x43\x61\x6C\x6C\x73","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x6C\x6F\x67\x69\x6E","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x50\x4C\x41\x49\x4E","\x78\x43\x41\x4C\x4C\x59\x20\x4D\x6F\x74\x69\x6F\x6E\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E"];_0x9b7e[0];var jsonpatch=require(_0x9b7e[1]);var rp=require(_0x9b7e[2]);var moment=require(_0x9b7e[3]);var BPromise=require(_0x9b7e[4]);var Mustache=require(_0x9b7e[5]);var util=require(_0x9b7e[6]);var path=require(_0x9b7e[7]);var sox=require(_0x9b7e[8]);var csv=require(_0x9b7e[9]);var ejs=require(_0x9b7e[10]);var fs=require(_0x9b7e[11]);var _=require(_0x9b7e[12]);var squel=require(_0x9b7e[13]);var crypto=require(_0x9b7e[14]);var jsforce=require(_0x9b7e[15]);var deskjs=require(_0x9b7e[16]);var toCsv=require(_0x9b7e[9]);var querystring=require(_0x9b7e[17]);var Papa=require(_0x9b7e[18]);var qs=require(_0x9b7e[19]);var logger=require(_0x9b7e[21])(_0x9b7e[20]);var utils=require(_0x9b7e[22]);var config=require(_0x9b7e[23]);var db=require(_0x9b7e[25])[_0x9b7e[24]];var integrations=require(_0x9b7e[26]);var jayson=require(_0x9b7e[27]);var client=jayson[_0x9b7e[29]][_0x9b7e[28]]({port:9002});function respondWithRpcPromise(_0xfe3ex1d,_0xfe3ex1e,_0xfe3ex1f,_0xfe3ex20){return  new BPromise(function(_0xfe3ex21,_0xfe3ex22){var _0xfe3ex23=(_0xfe3ex20|| client);return _0xfe3ex23[_0x9b7e[42]](_0xfe3ex1d,_0xfe3ex1f)[_0x9b7e[41]](function(_0xfe3ex25){logger[_0x9b7e[34]](_0x9b7e[30],_0xfe3ex1e,_0x9b7e[33]);logger[_0x9b7e[37]](_0x9b7e[35],_0xfe3ex1e,_0x9b7e[33],JSON[_0x9b7e[36]](_0xfe3ex25));if(_0xfe3ex25[_0x9b7e[31]]){if(_0xfe3ex25[_0x9b7e[31]][_0x9b7e[38]]=== 500){logger[_0x9b7e[31]](_0x9b7e[30],_0xfe3ex1e,_0xfe3ex25[_0x9b7e[31]][_0x9b7e[39]]);return _0xfe3ex22(_0xfe3ex25[_0x9b7e[31]][_0x9b7e[39]])};logger[_0x9b7e[31]](_0x9b7e[30],_0xfe3ex1e,_0xfe3ex25[_0x9b7e[31]][_0x9b7e[39]]);return _0xfe3ex21(_0xfe3ex25[_0x9b7e[31]][_0x9b7e[39]])}else {logger[_0x9b7e[34]](_0x9b7e[30],_0xfe3ex1e,_0x9b7e[33]);_0xfe3ex21(_0xfe3ex25[_0x9b7e[40]][_0x9b7e[39]])}})[_0x9b7e[32]](function(_0xfe3ex24){logger[_0x9b7e[31]](_0x9b7e[30],_0xfe3ex1e,_0xfe3ex24);_0xfe3ex22(_0xfe3ex24)})})}function respondWithStatusCode(_0xfe3ex25,_0xfe3ex27){_0xfe3ex27= _0xfe3ex27|| 204;return function(_0xfe3ex28){if(_0xfe3ex28){return _0xfe3ex25[_0x9b7e[43]](_0xfe3ex27)};return _0xfe3ex25[_0x9b7e[45]](_0xfe3ex27)[_0x9b7e[44]]()}}function respondWithResult(_0xfe3ex25,_0xfe3ex27){_0xfe3ex27= _0xfe3ex27|| 200;return function(_0xfe3ex28){if(_0xfe3ex28){return _0xfe3ex25[_0x9b7e[45]](_0xfe3ex27)[_0x9b7e[46]](_0xfe3ex28)}}}function respondWithFilteredResult(_0xfe3ex25,_0xfe3ex2b){return function(_0xfe3ex28){if(_0xfe3ex28){var _0xfe3ex2c=_0xfe3ex28[_0x9b7e[47]],_0xfe3ex2d=_0xfe3ex2b[_0x9b7e[48]],_0xfe3ex2e=_0xfe3ex2b[_0x9b7e[48]]+ _0xfe3ex2b[_0x9b7e[49]],_0xfe3ex27;if(_0xfe3ex2e>= _0xfe3ex2c){_0xfe3ex2e= _0xfe3ex2c;_0xfe3ex27= 200}else {_0xfe3ex27= 206};_0xfe3ex25[_0x9b7e[45]](_0xfe3ex27);return _0xfe3ex25[_0x9b7e[53]](_0x9b7e[50],_0xfe3ex2d+ _0x9b7e[51]+ _0xfe3ex2e+ _0x9b7e[52]+ _0xfe3ex2c)[_0x9b7e[46]](_0xfe3ex28)};return null}}function patchUpdates(_0xfe3ex30){return function(_0xfe3ex28){try{jsonpatch[_0x9b7e[54]](_0xfe3ex28,_0xfe3ex30,true)}catch(err){return BPromise[_0x9b7e[55]](err)};return _0xfe3ex28[_0x9b7e[56]]()}}function saveUpdates(_0xfe3ex32,_0xfe3ex27){return function(_0xfe3ex28){if(_0xfe3ex28){return _0xfe3ex28[_0x9b7e[57]](_0xfe3ex32)[_0x9b7e[41]](function(_0xfe3ex33){return _0xfe3ex33})};return null}}function removeEntity(_0xfe3ex25,_0xfe3ex27){return function(_0xfe3ex28){if(_0xfe3ex28){return _0xfe3ex28[_0x9b7e[58]]()[_0x9b7e[41]](function(){_0xfe3ex25[_0x9b7e[45]](204)[_0x9b7e[44]]()})}}}function handleEntityNotFound(_0xfe3ex25,_0xfe3ex27){return function(_0xfe3ex28){if(!_0xfe3ex28){_0xfe3ex25[_0x9b7e[43]](404)};return _0xfe3ex28}}function handleError(_0xfe3ex25,_0xfe3ex27){_0xfe3ex27= _0xfe3ex27|| 500;return function(_0xfe3ex24){logger[_0x9b7e[31]](_0xfe3ex24[_0x9b7e[59]]);if(_0xfe3ex24[_0x9b7e[60]]){delete _0xfe3ex24[_0x9b7e[60]]};_0xfe3ex25[_0x9b7e[45]](_0xfe3ex27)[_0x9b7e[61]](_0xfe3ex24)}}exports[_0x9b7e[62]]= function(_0xfe3ex1f,_0xfe3ex25){var _0xfe3ex2b={},_0xfe3ex37={},_0xfe3ex38={count:0,rows:[]};_0xfe3ex37[_0x9b7e[63]]= _[_0x9b7e[66]](db[_0x9b7e[65]][_0x9b7e[64]]);var _0xfe3ex39={dateStart:_0xfe3ex1f[_0x9b7e[68]][_0x9b7e[67]],dateEnd:_0xfe3ex1f[_0x9b7e[68]][_0x9b7e[69]]};delete _0xfe3ex1f[_0x9b7e[68]][_0x9b7e[67]];delete _0xfe3ex1f[_0x9b7e[68]][_0x9b7e[69]];_0xfe3ex37[_0x9b7e[68]]= _[_0x9b7e[66]](_0xfe3ex1f[_0x9b7e[68]]);_0xfe3ex37[_0x9b7e[70]]= _[_0x9b7e[71]](_0xfe3ex37[_0x9b7e[63]],_0xfe3ex37[_0x9b7e[68]]);_0xfe3ex2b[_0x9b7e[72]]= _[_0x9b7e[71]](_0xfe3ex37[_0x9b7e[63]],qs[_0x9b7e[73]](_0xfe3ex1f[_0x9b7e[68]][_0x9b7e[73]]));_0xfe3ex2b[_0x9b7e[72]]= (_0xfe3ex2b[_0x9b7e[72]][_0x9b7e[74]])?_0xfe3ex2b[_0x9b7e[72]]:_0xfe3ex37[_0x9b7e[63]];if(!_0xfe3ex1f[_0x9b7e[68]][_0x9b7e[76]](_0x9b7e[75])){_0xfe3ex2b[_0x9b7e[49]]= qs[_0x9b7e[49]](_0xfe3ex1f[_0x9b7e[68]][_0x9b7e[49]]);_0xfe3ex2b[_0x9b7e[48]]= qs[_0x9b7e[48]](_0xfe3ex1f[_0x9b7e[68]][_0x9b7e[48]])};_0xfe3ex2b[_0x9b7e[77]]= qs[_0x9b7e[78]](_0xfe3ex1f[_0x9b7e[68]][_0x9b7e[78]]);_0xfe3ex2b[_0x9b7e[79]]= qs[_0x9b7e[70]](_[_0x9b7e[80]](_0xfe3ex1f[_0x9b7e[68]],_0xfe3ex37[_0x9b7e[70]]));if(_0xfe3ex39[_0x9b7e[67]]){if(_0xfe3ex39[_0x9b7e[69]]){_0xfe3ex39[_0x9b7e[69]]= moment(_0xfe3ex39[_0x9b7e[69]])[_0x9b7e[82]](1,_0x9b7e[81])}else {_0xfe3ex39[_0x9b7e[69]]= moment(_0xfe3ex39[_0x9b7e[67]])[_0x9b7e[82]](1,_0x9b7e[81])};_[_0x9b7e[83]](_0xfe3ex2b[_0x9b7e[79]],{createdAt:{$gte:_0xfe3ex39[_0x9b7e[67]],$lte:_0xfe3ex39[_0x9b7e[69]]}})};if(_0xfe3ex1f[_0x9b7e[68]][_0x9b7e[84]]){_0xfe3ex2b[_0x9b7e[79]]= _[_0x9b7e[83]](_0xfe3ex2b[_0x9b7e[79]],{$or:_[_0x9b7e[86]](_0xfe3ex2b[_0x9b7e[72]],function(_0xfe3ex3a){var _0xfe3ex38={};_0xfe3ex38[_0xfe3ex3a]= {$like:_0x9b7e[85]+ _0xfe3ex1f[_0x9b7e[68]][_0x9b7e[84]]+ _0x9b7e[85]};return _0xfe3ex38})})};_0xfe3ex2b= _[_0x9b7e[83]]({},_0xfe3ex2b,_0xfe3ex1f[_0x9b7e[87]]);var _0xfe3ex3b={where:_0xfe3ex2b[_0x9b7e[79]]};return db[_0x9b7e[65]][_0x9b7e[47]](_0xfe3ex3b)[_0x9b7e[41]](function(_0xfe3ex2c){_0xfe3ex38[_0x9b7e[47]]= _0xfe3ex2c;if(_0xfe3ex1f[_0x9b7e[68]][_0x9b7e[89]]){_0xfe3ex2b[_0x9b7e[90]]= [{all:true}]};return db[_0x9b7e[65]][_0x9b7e[91]](_0xfe3ex2b)})[_0x9b7e[41]](function(_0xfe3ex3c){_0xfe3ex38[_0x9b7e[88]]= _0xfe3ex3c;return _0xfe3ex38})[_0x9b7e[41]](respondWithFilteredResult(_0xfe3ex25,_0xfe3ex2b))[_0x9b7e[32]](handleError(_0xfe3ex25,null))};exports[_0x9b7e[92]]= function(_0xfe3ex1f,_0xfe3ex25){var _0xfe3ex2b={raw:false,where:{id:_0xfe3ex1f[_0x9b7e[94]][_0x9b7e[93]]}},_0xfe3ex37={};_0xfe3ex37[_0x9b7e[63]]= _[_0x9b7e[66]](db[_0x9b7e[65]][_0x9b7e[64]]);_0xfe3ex37[_0x9b7e[68]]= _[_0x9b7e[66]](_0xfe3ex1f[_0x9b7e[68]]);_0xfe3ex37[_0x9b7e[70]]= _[_0x9b7e[71]](_0xfe3ex37[_0x9b7e[63]],_0xfe3ex37[_0x9b7e[68]]);_0xfe3ex2b[_0x9b7e[72]]= _[_0x9b7e[71]](_0xfe3ex37[_0x9b7e[63]],qs[_0x9b7e[73]](_0xfe3ex1f[_0x9b7e[68]][_0x9b7e[73]]));_0xfe3ex2b[_0x9b7e[72]]= (_0xfe3ex2b[_0x9b7e[72]][_0x9b7e[74]])?_0xfe3ex2b[_0x9b7e[72]]:_0xfe3ex37[_0x9b7e[63]];if(_0xfe3ex1f[_0x9b7e[68]][_0x9b7e[89]]){_0xfe3ex2b[_0x9b7e[90]]= [{all:true}]};_0xfe3ex2b= _[_0x9b7e[83]]({},_0xfe3ex2b,_0xfe3ex1f[_0x9b7e[87]]);return db[_0x9b7e[65]][_0x9b7e[95]](_0xfe3ex2b)[_0x9b7e[41]](handleEntityNotFound(_0xfe3ex25,null))[_0x9b7e[41]](respondWithResult(_0xfe3ex25,null))[_0x9b7e[32]](handleError(_0xfe3ex25,null))};exports[_0x9b7e[96]]= function(_0xfe3ex1f,_0xfe3ex25){return db[_0x9b7e[65]][_0x9b7e[96]](_0xfe3ex1f[_0x9b7e[97]],{})[_0x9b7e[41]](respondWithResult(_0xfe3ex25,201))[_0x9b7e[32]](handleError(_0xfe3ex25,null))};exports[_0x9b7e[57]]= function(_0xfe3ex1f,_0xfe3ex25){if(_0xfe3ex1f[_0x9b7e[97]][_0x9b7e[93]]){delete _0xfe3ex1f[_0x9b7e[97]][_0x9b7e[93]]};return db[_0x9b7e[65]][_0x9b7e[95]]({where:{id:_0xfe3ex1f[_0x9b7e[94]][_0x9b7e[93]]}})[_0x9b7e[41]](handleEntityNotFound(_0xfe3ex25,null))[_0x9b7e[41]](saveUpdates(_0xfe3ex1f[_0x9b7e[97]],null))[_0x9b7e[41]](respondWithResult(_0xfe3ex25,null))[_0x9b7e[32]](handleError(_0xfe3ex25,null))};exports[_0x9b7e[58]]= function(_0xfe3ex1f,_0xfe3ex25){return db[_0x9b7e[65]][_0x9b7e[95]]({where:{id:_0xfe3ex1f[_0x9b7e[94]][_0x9b7e[93]]}})[_0x9b7e[41]](handleEntityNotFound(_0xfe3ex25,null))[_0x9b7e[41]](removeEntity(_0xfe3ex25,null))[_0x9b7e[32]](handleError(_0xfe3ex25,null))};exports[_0x9b7e[98]]= function(_0xfe3ex1f,_0xfe3ex28,_0xfe3ex3d){var _0xfe3ex2b={};var _0xfe3ex37={};var _0xfe3ex3e;var _0xfe3ex2c;return db[_0x9b7e[65]][_0x9b7e[100]]({where:{id:_0xfe3ex1f[_0x9b7e[94]][_0x9b7e[93]]}})[_0x9b7e[41]](handleEntityNotFound(_0xfe3ex28,null))[_0x9b7e[41]](function(_0xfe3ex28){if(_0xfe3ex28){_0xfe3ex3e= _0xfe3ex28;_0xfe3ex37[_0x9b7e[63]]= _[_0x9b7e[66]](db[_0x9b7e[99]][_0x9b7e[64]]);_0xfe3ex37[_0x9b7e[68]]= _[_0x9b7e[66]](_0xfe3ex1f[_0x9b7e[68]]);_0xfe3ex37[_0x9b7e[70]]= _[_0x9b7e[71]](_0xfe3ex37[_0x9b7e[63]],_0xfe3ex37[_0x9b7e[68]]);_0xfe3ex2b[_0x9b7e[72]]= _[_0x9b7e[71]](_0xfe3ex37[_0x9b7e[63]],qs[_0x9b7e[73]](_0xfe3ex1f[_0x9b7e[68]][_0x9b7e[73]]));_0xfe3ex2b[_0x9b7e[72]]= (_0xfe3ex2b[_0x9b7e[72]][_0x9b7e[74]])?_0xfe3ex2b[_0x9b7e[72]]:_0xfe3ex37[_0x9b7e[63]];_0xfe3ex2b[_0x9b7e[77]]= qs[_0x9b7e[78]](_0xfe3ex1f[_0x9b7e[68]][_0x9b7e[78]]);_0xfe3ex2b[_0x9b7e[79]]= qs[_0x9b7e[70]](_[_0x9b7e[80]](_0xfe3ex1f[_0x9b7e[68]],_0xfe3ex37[_0x9b7e[70]]));if(_0xfe3ex1f[_0x9b7e[68]][_0x9b7e[84]]){_0xfe3ex2b[_0x9b7e[79]]= _[_0x9b7e[83]](_0xfe3ex2b[_0x9b7e[79]],{$or:_[_0x9b7e[86]](_0xfe3ex2b[_0x9b7e[72]],function(_0xfe3ex3a){var _0xfe3ex38={};_0xfe3ex38[_0xfe3ex3a]= {$like:_0x9b7e[85]+ _0xfe3ex1f[_0x9b7e[68]][_0x9b7e[84]]+ _0x9b7e[85]};return _0xfe3ex38})})};_0xfe3ex2b= _[_0x9b7e[83]]({},_0xfe3ex2b,_0xfe3ex1f[_0x9b7e[87]]);return _0xfe3ex3e[_0x9b7e[98]](_0xfe3ex2b)}})[_0x9b7e[41]](function(_0xfe3ex3f){if(_0xfe3ex3f){_0xfe3ex2c= _0xfe3ex3f[_0x9b7e[74]];if(!_0xfe3ex1f[_0x9b7e[68]][_0x9b7e[76]](_0x9b7e[75])){_0xfe3ex2b[_0x9b7e[49]]= qs[_0x9b7e[49]](_0xfe3ex1f[_0x9b7e[68]][_0x9b7e[49]]);_0xfe3ex2b[_0x9b7e[48]]= qs[_0x9b7e[48]](_0xfe3ex1f[_0x9b7e[68]][_0x9b7e[48]])};return _0xfe3ex3e[_0x9b7e[98]](_0xfe3ex2b)}})[_0x9b7e[41]](function(_0xfe3ex3c){if(_0xfe3ex3c){return _0xfe3ex3c?{count:_0xfe3ex2c,rows:_0xfe3ex3c}:null}})[_0x9b7e[41]](respondWithResult(_0xfe3ex28,null))[_0x9b7e[32]](handleError(_0xfe3ex28,null))};exports[_0x9b7e[101]]= function(_0xfe3ex1f,_0xfe3ex25,_0xfe3ex3d){if(_0xfe3ex1f[_0x9b7e[97]][_0x9b7e[93]]){delete _0xfe3ex1f[_0x9b7e[97]][_0x9b7e[93]]};return db[_0x9b7e[65]][_0x9b7e[100]]({where:{id:_0xfe3ex1f[_0x9b7e[94]][_0x9b7e[93]]}})[_0x9b7e[41]](handleEntityNotFound(_0xfe3ex25,null))[_0x9b7e[41]](function(_0xfe3ex28){if(_0xfe3ex28){_0xfe3ex1f[_0x9b7e[97]][_0x9b7e[102]]= _0xfe3ex28[_0x9b7e[93]];_0xfe3ex1f[_0x9b7e[97]][_0x9b7e[103]]= integrations[_0x9b7e[106]](_0xfe3ex1f[_0x9b7e[97]][_0x9b7e[104]],_0xfe3ex1f[_0x9b7e[97]][_0x9b7e[105]]);_0xfe3ex1f[_0x9b7e[97]][_0x9b7e[107]]= integrations[_0x9b7e[108]](_0xfe3ex1f[_0x9b7e[97]][_0x9b7e[104]],_0xfe3ex1f[_0x9b7e[97]][_0x9b7e[105]]);return db[_0x9b7e[99]][_0x9b7e[96]](_0xfe3ex1f[_0x9b7e[97]],{include:[{model:db[_0x9b7e[109]],as:_0x9b7e[103]},{model:db[_0x9b7e[109]],as:_0x9b7e[107]}]})};return null})[_0x9b7e[41]](respondWithResult(_0xfe3ex25,null))[_0x9b7e[32]](handleError(_0xfe3ex25,null))};exports[_0x9b7e[110]]= function(_0xfe3ex1f,_0xfe3ex25,_0xfe3ex3d){var _0xfe3ex40;return db[_0x9b7e[65]][_0x9b7e[100]]({where:{id:_0xfe3ex1f[_0x9b7e[94]][_0x9b7e[93]]},attributes:[_0x9b7e[93],_0x9b7e[130],_0x9b7e[131],_0x9b7e[128]]})[_0x9b7e[41]](handleEntityNotFound(_0xfe3ex25,null))[_0x9b7e[41]](function(_0xfe3ex28){if(_0xfe3ex28){_0xfe3ex40= _0xfe3ex28[_0x9b7e[128]];return rp({method:_0x9b7e[121],uri:util[_0x9b7e[124]](_0x9b7e[122],_0xfe3ex40,_0x9b7e[123]),json:true,form:{method:_0x9b7e[129],input_type:_0x9b7e[126],response_type:_0x9b7e[126],rest_data:JSON[_0x9b7e[36]]({user_auth:{user_name:_0xfe3ex28[_0x9b7e[130]],password:_0xfe3ex28[_0x9b7e[131]],encryption:_0x9b7e[132]},application:_0x9b7e[133]})}})}})[_0x9b7e[41]](function(_0xfe3ex28){if(_0xfe3ex28){return rp({method:_0x9b7e[121],uri:util[_0x9b7e[124]](_0x9b7e[122],_0xfe3ex40,_0x9b7e[123]),json:true,form:{method:_0x9b7e[125],input_type:_0x9b7e[126],response_type:_0x9b7e[126],rest_data:JSON[_0x9b7e[36]]({session:_0xfe3ex28[_0x9b7e[93]],module_name:_0x9b7e[127]})}})}})[_0x9b7e[41]](function(_0xfe3ex28){if(_0xfe3ex28){var _0xfe3ex41=_[_0x9b7e[116]](_0xfe3ex28[_0x9b7e[115]]);return {count:_0xfe3ex41[_0x9b7e[74]],rows:_[_0x9b7e[86]](_0xfe3ex41,function(_0xfe3ex42){return {id:_0xfe3ex42[_0x9b7e[60]],name:_0xfe3ex42[_0x9b7e[117]],custom:_[_0x9b7e[119]](_0xfe3ex42[_0x9b7e[60]],_0x9b7e[118])?true:false,options:_0xfe3ex42[_0x9b7e[87]]?_[_0x9b7e[86]](_[_0x9b7e[116]](_0xfe3ex42[_0x9b7e[87]]),function(_0xfe3ex42){return {name:_0xfe3ex42[_0x9b7e[120]],value:_0xfe3ex42[_0x9b7e[60]]}}):[]}})}}})[_0x9b7e[41]](respondWithResult(_0xfe3ex25,null))[_0x9b7e[32]](function(_0xfe3ex24){var _0xfe3ex27=_0xfe3ex1f[_0x9b7e[68]][_0x9b7e[111]]?500:(_0xfe3ex24[_0x9b7e[112]]|| 500);logger[_0x9b7e[31]](_0x9b7e[113],_0x9b7e[110],_0xfe3ex27,JSON[_0x9b7e[36]](_0xfe3ex24));delete _0xfe3ex24[_0x9b7e[60]];if(_0xfe3ex27=== 401){_0xfe3ex27= 400};_0xfe3ex25[_0x9b7e[45]](_0xfe3ex27)[_0x9b7e[61]](_0xfe3ex1f[_0x9b7e[68]][_0x9b7e[111]]?{message:_0x9b7e[114],statusCode:_0xfe3ex24[_0x9b7e[112]]}:_0xfe3ex24)})}
\ No newline at end of file
+var _0xc6ff=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x79\x70\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x74\x65\x73\x74","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73","\x6D\x6F\x64\x75\x6C\x65\x5F\x66\x69\x65\x6C\x64\x73","\x76\x61\x6C\x75\x65\x73","\x6C\x61\x62\x65\x6C","\x5F\x63","\x65\x6E\x64\x73\x57\x69\x74\x68","\x76\x61\x6C\x75\x65","\x50\x4F\x53\x54","\x25\x73\x25\x73","\x2F\x73\x65\x72\x76\x69\x63\x65\x2F\x76\x34\x5F\x31\x2F\x72\x65\x73\x74\x2E\x70\x68\x70","\x66\x6F\x72\x6D\x61\x74","\x67\x65\x74\x5F\x6D\x6F\x64\x75\x6C\x65\x5F\x66\x69\x65\x6C\x64\x73","\x4A\x53\x4F\x4E","\x43\x61\x6C\x6C\x73","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x6C\x6F\x67\x69\x6E","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x50\x4C\x41\x49\x4E","\x78\x43\x41\x4C\x4C\x59\x20\x4D\x6F\x74\x69\x6F\x6E\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E"];_0xc6ff[0];var jsonpatch=require(_0xc6ff[1]);var rp=require(_0xc6ff[2]);var moment=require(_0xc6ff[3]);var BPromise=require(_0xc6ff[4]);var Mustache=require(_0xc6ff[5]);var util=require(_0xc6ff[6]);var path=require(_0xc6ff[7]);var sox=require(_0xc6ff[8]);var csv=require(_0xc6ff[9]);var ejs=require(_0xc6ff[10]);var fs=require(_0xc6ff[11]);var _=require(_0xc6ff[12]);var squel=require(_0xc6ff[13]);var crypto=require(_0xc6ff[14]);var jsforce=require(_0xc6ff[15]);var deskjs=require(_0xc6ff[16]);var toCsv=require(_0xc6ff[9]);var querystring=require(_0xc6ff[17]);var Papa=require(_0xc6ff[18]);var qs=require(_0xc6ff[19]);var logger=require(_0xc6ff[21])(_0xc6ff[20]);var utils=require(_0xc6ff[22]);var config=require(_0xc6ff[23]);var db=require(_0xc6ff[25])[_0xc6ff[24]];var integrations=require(_0xc6ff[26]);var jayson=require(_0xc6ff[27]);var client=jayson[_0xc6ff[29]][_0xc6ff[28]]({port:9002});function respondWithRpcPromise(_0xe4d3x1d,_0xe4d3x1e,_0xe4d3x1f,_0xe4d3x20){return  new BPromise(function(_0xe4d3x21,_0xe4d3x22){var _0xe4d3x23=(_0xe4d3x20|| client);return _0xe4d3x23[_0xc6ff[42]](_0xe4d3x1d,_0xe4d3x1f)[_0xc6ff[41]](function(_0xe4d3x25){logger[_0xc6ff[34]](_0xc6ff[30],_0xe4d3x1e,_0xc6ff[33]);logger[_0xc6ff[37]](_0xc6ff[35],_0xe4d3x1e,_0xc6ff[33],JSON[_0xc6ff[36]](_0xe4d3x25));if(_0xe4d3x25[_0xc6ff[31]]){if(_0xe4d3x25[_0xc6ff[31]][_0xc6ff[38]]=== 500){logger[_0xc6ff[31]](_0xc6ff[30],_0xe4d3x1e,_0xe4d3x25[_0xc6ff[31]][_0xc6ff[39]]);return _0xe4d3x22(_0xe4d3x25[_0xc6ff[31]][_0xc6ff[39]])};logger[_0xc6ff[31]](_0xc6ff[30],_0xe4d3x1e,_0xe4d3x25[_0xc6ff[31]][_0xc6ff[39]]);return _0xe4d3x21(_0xe4d3x25[_0xc6ff[31]][_0xc6ff[39]])}else {logger[_0xc6ff[34]](_0xc6ff[30],_0xe4d3x1e,_0xc6ff[33]);_0xe4d3x21(_0xe4d3x25[_0xc6ff[40]][_0xc6ff[39]])}})[_0xc6ff[32]](function(_0xe4d3x24){logger[_0xc6ff[31]](_0xc6ff[30],_0xe4d3x1e,_0xe4d3x24);_0xe4d3x22(_0xe4d3x24)})})}function respondWithStatusCode(_0xe4d3x25,_0xe4d3x27){_0xe4d3x27= _0xe4d3x27|| 204;return function(_0xe4d3x28){if(_0xe4d3x28){return _0xe4d3x25[_0xc6ff[43]](_0xe4d3x27)};return _0xe4d3x25[_0xc6ff[45]](_0xe4d3x27)[_0xc6ff[44]]()}}function respondWithResult(_0xe4d3x25,_0xe4d3x27){_0xe4d3x27= _0xe4d3x27|| 200;return function(_0xe4d3x28){if(_0xe4d3x28){return _0xe4d3x25[_0xc6ff[45]](_0xe4d3x27)[_0xc6ff[46]](_0xe4d3x28)}}}function respondWithFilteredResult(_0xe4d3x25,_0xe4d3x2b){return function(_0xe4d3x28){if(_0xe4d3x28){var _0xe4d3x2c=_0xe4d3x28[_0xc6ff[47]],_0xe4d3x2d=_0xe4d3x2b[_0xc6ff[48]],_0xe4d3x2e=_0xe4d3x2b[_0xc6ff[48]]+ _0xe4d3x2b[_0xc6ff[49]],_0xe4d3x27;if(_0xe4d3x2e>= _0xe4d3x2c){_0xe4d3x2e= _0xe4d3x2c;_0xe4d3x27= 200}else {_0xe4d3x27= 206};_0xe4d3x25[_0xc6ff[45]](_0xe4d3x27);return _0xe4d3x25[_0xc6ff[53]](_0xc6ff[50],_0xe4d3x2d+ _0xc6ff[51]+ _0xe4d3x2e+ _0xc6ff[52]+ _0xe4d3x2c)[_0xc6ff[46]](_0xe4d3x28)};return null}}function patchUpdates(_0xe4d3x30){return function(_0xe4d3x28){try{jsonpatch[_0xc6ff[54]](_0xe4d3x28,_0xe4d3x30,true)}catch(err){return BPromise[_0xc6ff[55]](err)};return _0xe4d3x28[_0xc6ff[56]]()}}function saveUpdates(_0xe4d3x32,_0xe4d3x27){return function(_0xe4d3x28){if(_0xe4d3x28){return _0xe4d3x28[_0xc6ff[57]](_0xe4d3x32)[_0xc6ff[41]](function(_0xe4d3x33){return _0xe4d3x33})};return null}}function removeEntity(_0xe4d3x25,_0xe4d3x27){return function(_0xe4d3x28){if(_0xe4d3x28){return _0xe4d3x28[_0xc6ff[58]]()[_0xc6ff[41]](function(){_0xe4d3x25[_0xc6ff[45]](204)[_0xc6ff[44]]()})}}}function handleEntityNotFound(_0xe4d3x25,_0xe4d3x27){return function(_0xe4d3x28){if(!_0xe4d3x28){_0xe4d3x25[_0xc6ff[43]](404)};return _0xe4d3x28}}function handleError(_0xe4d3x25,_0xe4d3x27){_0xe4d3x27= _0xe4d3x27|| 500;return function(_0xe4d3x24){logger[_0xc6ff[31]](_0xe4d3x24[_0xc6ff[59]]);if(_0xe4d3x24[_0xc6ff[60]]){delete _0xe4d3x24[_0xc6ff[60]]};_0xe4d3x25[_0xc6ff[45]](_0xe4d3x27)[_0xc6ff[61]](_0xe4d3x24)}}exports[_0xc6ff[62]]= function(_0xe4d3x1f,_0xe4d3x25){var _0xe4d3x2b={},_0xe4d3x37={},_0xe4d3x38={count:0,rows:[]};_0xe4d3x37[_0xc6ff[63]]= _[_0xc6ff[66]](db[_0xc6ff[65]][_0xc6ff[64]]);var _0xe4d3x39={dateStart:_0xe4d3x1f[_0xc6ff[68]][_0xc6ff[67]],dateEnd:_0xe4d3x1f[_0xc6ff[68]][_0xc6ff[69]]};delete _0xe4d3x1f[_0xc6ff[68]][_0xc6ff[67]];delete _0xe4d3x1f[_0xc6ff[68]][_0xc6ff[69]];_0xe4d3x37[_0xc6ff[68]]= _[_0xc6ff[66]](_0xe4d3x1f[_0xc6ff[68]]);_0xe4d3x37[_0xc6ff[70]]= _[_0xc6ff[71]](_0xe4d3x37[_0xc6ff[63]],_0xe4d3x37[_0xc6ff[68]]);_0xe4d3x2b[_0xc6ff[72]]= _[_0xc6ff[71]](_0xe4d3x37[_0xc6ff[63]],qs[_0xc6ff[73]](_0xe4d3x1f[_0xc6ff[68]][_0xc6ff[73]]));_0xe4d3x2b[_0xc6ff[72]]= (_0xe4d3x2b[_0xc6ff[72]][_0xc6ff[74]])?_0xe4d3x2b[_0xc6ff[72]]:_0xe4d3x37[_0xc6ff[63]];if(!_0xe4d3x1f[_0xc6ff[68]][_0xc6ff[76]](_0xc6ff[75])){_0xe4d3x2b[_0xc6ff[49]]= qs[_0xc6ff[49]](_0xe4d3x1f[_0xc6ff[68]][_0xc6ff[49]]);_0xe4d3x2b[_0xc6ff[48]]= qs[_0xc6ff[48]](_0xe4d3x1f[_0xc6ff[68]][_0xc6ff[48]])};_0xe4d3x2b[_0xc6ff[77]]= qs[_0xc6ff[78]](_0xe4d3x1f[_0xc6ff[68]][_0xc6ff[78]]);_0xe4d3x2b[_0xc6ff[79]]= qs[_0xc6ff[70]](_[_0xc6ff[80]](_0xe4d3x1f[_0xc6ff[68]],_0xe4d3x37[_0xc6ff[70]]));if(_0xe4d3x39[_0xc6ff[67]]){if(_0xe4d3x39[_0xc6ff[69]]){_0xe4d3x39[_0xc6ff[69]]= moment(_0xe4d3x39[_0xc6ff[69]])[_0xc6ff[82]](1,_0xc6ff[81])}else {_0xe4d3x39[_0xc6ff[69]]= moment(_0xe4d3x39[_0xc6ff[67]])[_0xc6ff[82]](1,_0xc6ff[81])};_[_0xc6ff[83]](_0xe4d3x2b[_0xc6ff[79]],{createdAt:{$gte:_0xe4d3x39[_0xc6ff[67]],$lte:_0xe4d3x39[_0xc6ff[69]]}})};if(_0xe4d3x1f[_0xc6ff[68]][_0xc6ff[84]]){_0xe4d3x2b[_0xc6ff[79]]= _[_0xc6ff[83]](_0xe4d3x2b[_0xc6ff[79]],{$or:_[_0xc6ff[86]](_0xe4d3x2b[_0xc6ff[72]],function(_0xe4d3x3a){var _0xe4d3x38={};_0xe4d3x38[_0xe4d3x3a]= {$like:_0xc6ff[85]+ _0xe4d3x1f[_0xc6ff[68]][_0xc6ff[84]]+ _0xc6ff[85]};return _0xe4d3x38})})};_0xe4d3x2b= _[_0xc6ff[83]]({},_0xe4d3x2b,_0xe4d3x1f[_0xc6ff[87]]);var _0xe4d3x3b={where:_0xe4d3x2b[_0xc6ff[79]]};return db[_0xc6ff[65]][_0xc6ff[47]](_0xe4d3x3b)[_0xc6ff[41]](function(_0xe4d3x2c){_0xe4d3x38[_0xc6ff[47]]= _0xe4d3x2c;if(_0xe4d3x1f[_0xc6ff[68]][_0xc6ff[89]]){_0xe4d3x2b[_0xc6ff[90]]= [{all:true}]};return db[_0xc6ff[65]][_0xc6ff[91]](_0xe4d3x2b)})[_0xc6ff[41]](function(_0xe4d3x3c){_0xe4d3x38[_0xc6ff[88]]= _0xe4d3x3c;return _0xe4d3x38})[_0xc6ff[41]](respondWithFilteredResult(_0xe4d3x25,_0xe4d3x2b))[_0xc6ff[32]](handleError(_0xe4d3x25,null))};exports[_0xc6ff[92]]= function(_0xe4d3x1f,_0xe4d3x25){var _0xe4d3x2b={raw:false,where:{id:_0xe4d3x1f[_0xc6ff[94]][_0xc6ff[93]]}},_0xe4d3x37={};_0xe4d3x37[_0xc6ff[63]]= _[_0xc6ff[66]](db[_0xc6ff[65]][_0xc6ff[64]]);_0xe4d3x37[_0xc6ff[68]]= _[_0xc6ff[66]](_0xe4d3x1f[_0xc6ff[68]]);_0xe4d3x37[_0xc6ff[70]]= _[_0xc6ff[71]](_0xe4d3x37[_0xc6ff[63]],_0xe4d3x37[_0xc6ff[68]]);_0xe4d3x2b[_0xc6ff[72]]= _[_0xc6ff[71]](_0xe4d3x37[_0xc6ff[63]],qs[_0xc6ff[73]](_0xe4d3x1f[_0xc6ff[68]][_0xc6ff[73]]));_0xe4d3x2b[_0xc6ff[72]]= (_0xe4d3x2b[_0xc6ff[72]][_0xc6ff[74]])?_0xe4d3x2b[_0xc6ff[72]]:_0xe4d3x37[_0xc6ff[63]];if(_0xe4d3x1f[_0xc6ff[68]][_0xc6ff[89]]){_0xe4d3x2b[_0xc6ff[90]]= [{all:true}]};_0xe4d3x2b= _[_0xc6ff[83]]({},_0xe4d3x2b,_0xe4d3x1f[_0xc6ff[87]]);return db[_0xc6ff[65]][_0xc6ff[95]](_0xe4d3x2b)[_0xc6ff[41]](handleEntityNotFound(_0xe4d3x25,null))[_0xc6ff[41]](respondWithResult(_0xe4d3x25,null))[_0xc6ff[32]](handleError(_0xe4d3x25,null))};exports[_0xc6ff[96]]= function(_0xe4d3x1f,_0xe4d3x25){return db[_0xc6ff[65]][_0xc6ff[96]](_0xe4d3x1f[_0xc6ff[97]],{})[_0xc6ff[41]](respondWithResult(_0xe4d3x25,201))[_0xc6ff[32]](handleError(_0xe4d3x25,null))};exports[_0xc6ff[57]]= function(_0xe4d3x1f,_0xe4d3x25){if(_0xe4d3x1f[_0xc6ff[97]][_0xc6ff[93]]){delete _0xe4d3x1f[_0xc6ff[97]][_0xc6ff[93]]};return db[_0xc6ff[65]][_0xc6ff[95]]({where:{id:_0xe4d3x1f[_0xc6ff[94]][_0xc6ff[93]]}})[_0xc6ff[41]](handleEntityNotFound(_0xe4d3x25,null))[_0xc6ff[41]](saveUpdates(_0xe4d3x1f[_0xc6ff[97]],null))[_0xc6ff[41]](respondWithResult(_0xe4d3x25,null))[_0xc6ff[32]](handleError(_0xe4d3x25,null))};exports[_0xc6ff[58]]= function(_0xe4d3x1f,_0xe4d3x25){return db[_0xc6ff[65]][_0xc6ff[95]]({where:{id:_0xe4d3x1f[_0xc6ff[94]][_0xc6ff[93]]}})[_0xc6ff[41]](handleEntityNotFound(_0xe4d3x25,null))[_0xc6ff[41]](removeEntity(_0xe4d3x25,null))[_0xc6ff[32]](handleError(_0xe4d3x25,null))};exports[_0xc6ff[98]]= function(_0xe4d3x1f,_0xe4d3x28,_0xe4d3x3d){var _0xe4d3x2b={};var _0xe4d3x37={};var _0xe4d3x3e;var _0xe4d3x2c;return db[_0xc6ff[65]][_0xc6ff[100]]({where:{id:_0xe4d3x1f[_0xc6ff[94]][_0xc6ff[93]]}})[_0xc6ff[41]](handleEntityNotFound(_0xe4d3x28,null))[_0xc6ff[41]](function(_0xe4d3x28){if(_0xe4d3x28){_0xe4d3x3e= _0xe4d3x28;_0xe4d3x37[_0xc6ff[63]]= _[_0xc6ff[66]](db[_0xc6ff[99]][_0xc6ff[64]]);_0xe4d3x37[_0xc6ff[68]]= _[_0xc6ff[66]](_0xe4d3x1f[_0xc6ff[68]]);_0xe4d3x37[_0xc6ff[70]]= _[_0xc6ff[71]](_0xe4d3x37[_0xc6ff[63]],_0xe4d3x37[_0xc6ff[68]]);_0xe4d3x2b[_0xc6ff[72]]= _[_0xc6ff[71]](_0xe4d3x37[_0xc6ff[63]],qs[_0xc6ff[73]](_0xe4d3x1f[_0xc6ff[68]][_0xc6ff[73]]));_0xe4d3x2b[_0xc6ff[72]]= (_0xe4d3x2b[_0xc6ff[72]][_0xc6ff[74]])?_0xe4d3x2b[_0xc6ff[72]]:_0xe4d3x37[_0xc6ff[63]];_0xe4d3x2b[_0xc6ff[77]]= qs[_0xc6ff[78]](_0xe4d3x1f[_0xc6ff[68]][_0xc6ff[78]]);_0xe4d3x2b[_0xc6ff[79]]= qs[_0xc6ff[70]](_[_0xc6ff[80]](_0xe4d3x1f[_0xc6ff[68]],_0xe4d3x37[_0xc6ff[70]]));if(_0xe4d3x1f[_0xc6ff[68]][_0xc6ff[84]]){_0xe4d3x2b[_0xc6ff[79]]= _[_0xc6ff[83]](_0xe4d3x2b[_0xc6ff[79]],{$or:_[_0xc6ff[86]](_0xe4d3x2b[_0xc6ff[72]],function(_0xe4d3x3a){var _0xe4d3x38={};_0xe4d3x38[_0xe4d3x3a]= {$like:_0xc6ff[85]+ _0xe4d3x1f[_0xc6ff[68]][_0xc6ff[84]]+ _0xc6ff[85]};return _0xe4d3x38})})};_0xe4d3x2b= _[_0xc6ff[83]]({},_0xe4d3x2b,_0xe4d3x1f[_0xc6ff[87]]);return _0xe4d3x3e[_0xc6ff[98]](_0xe4d3x2b)}})[_0xc6ff[41]](function(_0xe4d3x3f){if(_0xe4d3x3f){_0xe4d3x2c= _0xe4d3x3f[_0xc6ff[74]];if(!_0xe4d3x1f[_0xc6ff[68]][_0xc6ff[76]](_0xc6ff[75])){_0xe4d3x2b[_0xc6ff[49]]= qs[_0xc6ff[49]](_0xe4d3x1f[_0xc6ff[68]][_0xc6ff[49]]);_0xe4d3x2b[_0xc6ff[48]]= qs[_0xc6ff[48]](_0xe4d3x1f[_0xc6ff[68]][_0xc6ff[48]])};return _0xe4d3x3e[_0xc6ff[98]](_0xe4d3x2b)}})[_0xc6ff[41]](function(_0xe4d3x3c){if(_0xe4d3x3c){return _0xe4d3x3c?{count:_0xe4d3x2c,rows:_0xe4d3x3c}:null}})[_0xc6ff[41]](respondWithResult(_0xe4d3x28,null))[_0xc6ff[32]](handleError(_0xe4d3x28,null))};exports[_0xc6ff[101]]= function(_0xe4d3x1f,_0xe4d3x25,_0xe4d3x3d){if(_0xe4d3x1f[_0xc6ff[97]][_0xc6ff[93]]){delete _0xe4d3x1f[_0xc6ff[97]][_0xc6ff[93]]};return db[_0xc6ff[65]][_0xc6ff[100]]({where:{id:_0xe4d3x1f[_0xc6ff[94]][_0xc6ff[93]]}})[_0xc6ff[41]](handleEntityNotFound(_0xe4d3x25,null))[_0xc6ff[41]](function(_0xe4d3x28){if(_0xe4d3x28){_0xe4d3x1f[_0xc6ff[97]][_0xc6ff[102]]= _0xe4d3x28[_0xc6ff[93]];_0xe4d3x1f[_0xc6ff[97]][_0xc6ff[103]]= integrations[_0xc6ff[106]](_0xe4d3x1f[_0xc6ff[97]][_0xc6ff[104]],_0xe4d3x1f[_0xc6ff[97]][_0xc6ff[105]]);_0xe4d3x1f[_0xc6ff[97]][_0xc6ff[107]]= integrations[_0xc6ff[108]](_0xe4d3x1f[_0xc6ff[97]][_0xc6ff[104]],_0xe4d3x1f[_0xc6ff[97]][_0xc6ff[105]]);return db[_0xc6ff[99]][_0xc6ff[96]](_0xe4d3x1f[_0xc6ff[97]],{include:[{model:db[_0xc6ff[109]],as:_0xc6ff[103]},{model:db[_0xc6ff[109]],as:_0xc6ff[107]}]})};return null})[_0xc6ff[41]](respondWithResult(_0xe4d3x25,null))[_0xc6ff[32]](handleError(_0xe4d3x25,null))};exports[_0xc6ff[110]]= function(_0xe4d3x1f,_0xe4d3x25,_0xe4d3x3d){var _0xe4d3x40;return db[_0xc6ff[65]][_0xc6ff[100]]({where:{id:_0xe4d3x1f[_0xc6ff[94]][_0xc6ff[93]]},attributes:[_0xc6ff[93],_0xc6ff[130],_0xc6ff[131],_0xc6ff[128]]})[_0xc6ff[41]](handleEntityNotFound(_0xe4d3x25,null))[_0xc6ff[41]](function(_0xe4d3x28){if(_0xe4d3x28){_0xe4d3x40= _0xe4d3x28[_0xc6ff[128]];return rp({method:_0xc6ff[121],uri:util[_0xc6ff[124]](_0xc6ff[122],_0xe4d3x40,_0xc6ff[123]),json:true,form:{method:_0xc6ff[129],input_type:_0xc6ff[126],response_type:_0xc6ff[126],rest_data:JSON[_0xc6ff[36]]({user_auth:{user_name:_0xe4d3x28[_0xc6ff[130]],password:_0xe4d3x28[_0xc6ff[131]],encryption:_0xc6ff[132]},application:_0xc6ff[133]})}})}})[_0xc6ff[41]](function(_0xe4d3x28){if(_0xe4d3x28){return rp({method:_0xc6ff[121],uri:util[_0xc6ff[124]](_0xc6ff[122],_0xe4d3x40,_0xc6ff[123]),json:true,form:{method:_0xc6ff[125],input_type:_0xc6ff[126],response_type:_0xc6ff[126],rest_data:JSON[_0xc6ff[36]]({session:_0xe4d3x28[_0xc6ff[93]],module_name:_0xc6ff[127]})}})}})[_0xc6ff[41]](function(_0xe4d3x28){if(_0xe4d3x28){var _0xe4d3x41=_[_0xc6ff[116]](_0xe4d3x28[_0xc6ff[115]]);return {count:_0xe4d3x41[_0xc6ff[74]],rows:_[_0xc6ff[86]](_0xe4d3x41,function(_0xe4d3x42){return {id:_0xe4d3x42[_0xc6ff[60]],name:_0xe4d3x42[_0xc6ff[117]],custom:_[_0xc6ff[119]](_0xe4d3x42[_0xc6ff[60]],_0xc6ff[118])?true:false,options:_0xe4d3x42[_0xc6ff[87]]?_[_0xc6ff[86]](_[_0xc6ff[116]](_0xe4d3x42[_0xc6ff[87]]),function(_0xe4d3x42){return {name:_0xe4d3x42[_0xc6ff[120]],value:_0xe4d3x42[_0xc6ff[60]]}}):[]}})}}})[_0xc6ff[41]](respondWithResult(_0xe4d3x25,null))[_0xc6ff[32]](function(_0xe4d3x24){var _0xe4d3x27=_0xe4d3x1f[_0xc6ff[68]][_0xc6ff[111]]?500:(_0xe4d3x24[_0xc6ff[112]]|| 500);logger[_0xc6ff[31]](_0xc6ff[113],_0xc6ff[110],_0xe4d3x27,JSON[_0xc6ff[36]](_0xe4d3x24));delete _0xe4d3x24[_0xc6ff[60]];if(_0xe4d3x27=== 401){_0xe4d3x27= 400};_0xe4d3x25[_0xc6ff[45]](_0xe4d3x27)[_0xc6ff[61]](_0xe4d3x1f[_0xc6ff[68]][_0xc6ff[111]]?{message:_0xc6ff[114],statusCode:_0xe4d3x24[_0xc6ff[112]]}:_0xe4d3x24)})}
\ No newline at end of file
index ff1cbdc..a075a76 100644 (file)
@@ -1 +1 @@
-var _0x16f3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x74\x5F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x16f3[0];var _=require(_0x16f3[1]);var util=require(_0x16f3[2]);var logger=require(_0x16f3[4])(_0x16f3[3]);var moment=require(_0x16f3[5]);var BPromise=require(_0x16f3[6]);var rp=require(_0x16f3[7]);var attributes=require(_0x16f3[8]);var integrations=require(_0x16f3[9]);module[_0x16f3[10]]= function(_0xa4fbx9,_0xa4fbxa){return _0xa4fbx9[_0x16f3[13]](_0x16f3[11],attributes,{tableName:_0x16f3[12],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xe889=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x74\x5F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0xe889[0];var _=require(_0xe889[1]);var util=require(_0xe889[2]);var logger=require(_0xe889[4])(_0xe889[3]);var moment=require(_0xe889[5]);var BPromise=require(_0xe889[6]);var rp=require(_0xe889[7]);var attributes=require(_0xe889[8]);var integrations=require(_0xe889[9]);module[_0xe889[10]]= function(_0x748cx9,_0x748cxa){return _0x748cx9[_0xe889[13]](_0xe889[11],attributes,{tableName:_0xe889[12],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 1cf4e68..0bd439b 100644 (file)
@@ -1 +1 @@
-var _0xc412=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x53\x68\x6F\x77\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x66\x69\x6E\x64"];_0xc412[0];var _=require(_0xc412[1]);var util=require(_0xc412[2]);var moment=require(_0xc412[3]);var BPromise=require(_0xc412[4]);var rs=require(_0xc412[5]);var fs=require(_0xc412[6]);var db=require(_0xc412[8])[_0xc412[7]];var utils=require(_0xc412[9]);var logger=require(_0xc412[11])(_0xc412[10]);var config=require(_0xc412[12]);var jayson=require(_0xc412[13]);var client=jayson[_0xc412[15]][_0xc412[14]]({port:9002});function respondWithRpcPromise(_0x4f6fxe,_0x4f6fxf,_0x4f6fx10){return  new BPromise(function(_0x4f6fx11,_0x4f6fx12){return client[_0xc412[28]](_0x4f6fxe,_0x4f6fx10)[_0xc412[27]](function(_0x4f6fx14){logger[_0xc412[20]](_0xc412[16],_0x4f6fxf,_0xc412[19]);logger[_0xc412[23]](_0xc412[21],_0x4f6fxf,_0xc412[19],JSON[_0xc412[22]](_0x4f6fx14));if(_0x4f6fx14[_0xc412[17]]){if(_0x4f6fx14[_0xc412[17]][_0xc412[24]]=== 500){logger[_0xc412[17]](_0xc412[16],_0x4f6fxf,_0x4f6fx14[_0xc412[17]][_0xc412[25]]);return _0x4f6fx12(_0x4f6fx14[_0xc412[17]][_0xc412[25]])};logger[_0xc412[17]](_0xc412[16],_0x4f6fxf,_0x4f6fx14[_0xc412[17]][_0xc412[25]]);return _0x4f6fx11(_0x4f6fx14[_0xc412[17]][_0xc412[25]])}else {logger[_0xc412[20]](_0xc412[16],_0x4f6fxf,_0xc412[19]);_0x4f6fx11(_0x4f6fx14[_0xc412[26]][_0xc412[25]])}})[_0xc412[18]](function(_0x4f6fx13){logger[_0xc412[17]](_0xc412[16],_0x4f6fxf,_0x4f6fx13);_0x4f6fx12(_0x4f6fx13)})})}exports[_0xc412[29]]= function(_0x4f6fx10){var _0x4f6fx15=this;return  new Promise(function(_0x4f6fx11,_0x4f6fx12){return db[_0xc412[40]][_0xc412[39]]({raw:_0x4f6fx10[_0xc412[30]]?(_0x4f6fx10[_0xc412[30]][_0xc412[31]]=== undefined)?true:false:true,where:_0x4f6fx10[_0xc412[30]]?_0x4f6fx10[_0xc412[30]][_0xc412[32]]|| null:null,attributes:_0x4f6fx10[_0xc412[30]]?_0x4f6fx10[_0xc412[30]][_0xc412[33]]|| null:null,limit:_0x4f6fx10[_0xc412[30]]?_0x4f6fx10[_0xc412[30]][_0xc412[34]]|| null:null,include:_0x4f6fx10[_0xc412[30]]?(_0x4f6fx10[_0xc412[30]][_0xc412[35]]?_[_0xc412[38]](_0x4f6fx10[_0xc412[30]][_0xc412[35]],function(_0x4f6fx16){return {model:db[_0x4f6fx16[_0xc412[36]]],as:_0x4f6fx16[_0xc412[37]],attributes:_0x4f6fx16[_0xc412[33]],include:_0x4f6fx16[_0xc412[35]]?_[_0xc412[38]](_0x4f6fx16[_0xc412[35]],function(_0x4f6fx17){return {model:db[_0x4f6fx17[_0xc412[36]]],as:_0x4f6fx17[_0xc412[37]],attributes:_0x4f6fx17[_0xc412[33]],include:_0x4f6fx17[_0xc412[35]]?_[_0xc412[38]](_0x4f6fx17[_0xc412[35]],function(_0x4f6fx18){return {model:db[_0x4f6fx18[_0xc412[36]]],as:_0x4f6fx18[_0xc412[37]],attributes:_0x4f6fx18[_0xc412[33]]}}):[]}}):[]}}):[]):[]})[_0xc412[27]](function(_0x4f6fx14){logger[_0xc412[20]](_0xc412[29],_0x4f6fx10);logger[_0xc412[23]](_0xc412[29],_0x4f6fx10,JSON[_0xc412[22]](_0x4f6fx14));_0x4f6fx11(_0x4f6fx14)})[_0xc412[18]](function(_0x4f6fx13){logger[_0xc412[17]](_0xc412[29],_0x4f6fx13[_0xc412[25]],_0x4f6fx10);_0x4f6fx12(_0x4f6fx15[_0xc412[17]](500,_0x4f6fx13[_0xc412[25]]))})})};exports[_0xc412[41]]= function(_0x4f6fx10){var _0x4f6fx15=this;return  new Promise(function(_0x4f6fx11,_0x4f6fx12){return db[_0xc412[40]][_0xc412[42]]({raw:_0x4f6fx10[_0xc412[30]]?(_0x4f6fx10[_0xc412[30]][_0xc412[31]]=== undefined)?true:false:true,where:_0x4f6fx10[_0xc412[30]]?_0x4f6fx10[_0xc412[30]][_0xc412[32]]|| null:null,attributes:_0x4f6fx10[_0xc412[30]]?_0x4f6fx10[_0xc412[30]][_0xc412[33]]|| null:null,include:_0x4f6fx10[_0xc412[30]]?(_0x4f6fx10[_0xc412[30]][_0xc412[35]]?_[_0xc412[38]](_0x4f6fx10[_0xc412[30]][_0xc412[35]],function(_0x4f6fx16){return {model:db[_0x4f6fx16[_0xc412[36]]],as:_0x4f6fx16[_0xc412[37]],attributes:_0x4f6fx16[_0xc412[33]],include:_0x4f6fx16[_0xc412[35]]?_[_0xc412[38]](_0x4f6fx16[_0xc412[35]],function(_0x4f6fx17){return {model:db[_0x4f6fx17[_0xc412[36]]],as:_0x4f6fx17[_0xc412[37]],attributes:_0x4f6fx17[_0xc412[33]],include:_0x4f6fx17[_0xc412[35]]?_[_0xc412[38]](_0x4f6fx17[_0xc412[35]],function(_0x4f6fx18){return {model:db[_0x4f6fx18[_0xc412[36]]],as:_0x4f6fx18[_0xc412[37]],attributes:_0x4f6fx18[_0xc412[33]]}}):[]}}):[]}}):[]):[]})[_0xc412[27]](function(_0x4f6fx14){logger[_0xc412[20]](_0xc412[41],_0x4f6fx10);logger[_0xc412[23]](_0xc412[41],_0x4f6fx10,JSON[_0xc412[22]](_0x4f6fx14));_0x4f6fx11(_0x4f6fx14)})[_0xc412[18]](function(_0x4f6fx13){logger[_0xc412[17]](_0xc412[41],_0x4f6fx13[_0xc412[25]],_0x4f6fx10);_0x4f6fx12(_0x4f6fx15[_0xc412[17]](500,_0x4f6fx13[_0xc412[25]]))})})}
\ No newline at end of file
+var _0x4afa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x53\x68\x6F\x77\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x66\x69\x6E\x64"];_0x4afa[0];var _=require(_0x4afa[1]);var util=require(_0x4afa[2]);var moment=require(_0x4afa[3]);var BPromise=require(_0x4afa[4]);var rs=require(_0x4afa[5]);var fs=require(_0x4afa[6]);var db=require(_0x4afa[8])[_0x4afa[7]];var utils=require(_0x4afa[9]);var logger=require(_0x4afa[11])(_0x4afa[10]);var config=require(_0x4afa[12]);var jayson=require(_0x4afa[13]);var client=jayson[_0x4afa[15]][_0x4afa[14]]({port:9002});function respondWithRpcPromise(_0x4d0bxe,_0x4d0bxf,_0x4d0bx10){return  new BPromise(function(_0x4d0bx11,_0x4d0bx12){return client[_0x4afa[28]](_0x4d0bxe,_0x4d0bx10)[_0x4afa[27]](function(_0x4d0bx14){logger[_0x4afa[20]](_0x4afa[16],_0x4d0bxf,_0x4afa[19]);logger[_0x4afa[23]](_0x4afa[21],_0x4d0bxf,_0x4afa[19],JSON[_0x4afa[22]](_0x4d0bx14));if(_0x4d0bx14[_0x4afa[17]]){if(_0x4d0bx14[_0x4afa[17]][_0x4afa[24]]=== 500){logger[_0x4afa[17]](_0x4afa[16],_0x4d0bxf,_0x4d0bx14[_0x4afa[17]][_0x4afa[25]]);return _0x4d0bx12(_0x4d0bx14[_0x4afa[17]][_0x4afa[25]])};logger[_0x4afa[17]](_0x4afa[16],_0x4d0bxf,_0x4d0bx14[_0x4afa[17]][_0x4afa[25]]);return _0x4d0bx11(_0x4d0bx14[_0x4afa[17]][_0x4afa[25]])}else {logger[_0x4afa[20]](_0x4afa[16],_0x4d0bxf,_0x4afa[19]);_0x4d0bx11(_0x4d0bx14[_0x4afa[26]][_0x4afa[25]])}})[_0x4afa[18]](function(_0x4d0bx13){logger[_0x4afa[17]](_0x4afa[16],_0x4d0bxf,_0x4d0bx13);_0x4d0bx12(_0x4d0bx13)})})}exports[_0x4afa[29]]= function(_0x4d0bx10){var _0x4d0bx15=this;return  new Promise(function(_0x4d0bx11,_0x4d0bx12){return db[_0x4afa[40]][_0x4afa[39]]({raw:_0x4d0bx10[_0x4afa[30]]?(_0x4d0bx10[_0x4afa[30]][_0x4afa[31]]=== undefined)?true:false:true,where:_0x4d0bx10[_0x4afa[30]]?_0x4d0bx10[_0x4afa[30]][_0x4afa[32]]|| null:null,attributes:_0x4d0bx10[_0x4afa[30]]?_0x4d0bx10[_0x4afa[30]][_0x4afa[33]]|| null:null,limit:_0x4d0bx10[_0x4afa[30]]?_0x4d0bx10[_0x4afa[30]][_0x4afa[34]]|| null:null,include:_0x4d0bx10[_0x4afa[30]]?(_0x4d0bx10[_0x4afa[30]][_0x4afa[35]]?_[_0x4afa[38]](_0x4d0bx10[_0x4afa[30]][_0x4afa[35]],function(_0x4d0bx16){return {model:db[_0x4d0bx16[_0x4afa[36]]],as:_0x4d0bx16[_0x4afa[37]],attributes:_0x4d0bx16[_0x4afa[33]],include:_0x4d0bx16[_0x4afa[35]]?_[_0x4afa[38]](_0x4d0bx16[_0x4afa[35]],function(_0x4d0bx17){return {model:db[_0x4d0bx17[_0x4afa[36]]],as:_0x4d0bx17[_0x4afa[37]],attributes:_0x4d0bx17[_0x4afa[33]],include:_0x4d0bx17[_0x4afa[35]]?_[_0x4afa[38]](_0x4d0bx17[_0x4afa[35]],function(_0x4d0bx18){return {model:db[_0x4d0bx18[_0x4afa[36]]],as:_0x4d0bx18[_0x4afa[37]],attributes:_0x4d0bx18[_0x4afa[33]]}}):[]}}):[]}}):[]):[]})[_0x4afa[27]](function(_0x4d0bx14){logger[_0x4afa[20]](_0x4afa[29],_0x4d0bx10);logger[_0x4afa[23]](_0x4afa[29],_0x4d0bx10,JSON[_0x4afa[22]](_0x4d0bx14));_0x4d0bx11(_0x4d0bx14)})[_0x4afa[18]](function(_0x4d0bx13){logger[_0x4afa[17]](_0x4afa[29],_0x4d0bx13[_0x4afa[25]],_0x4d0bx10);_0x4d0bx12(_0x4d0bx15[_0x4afa[17]](500,_0x4d0bx13[_0x4afa[25]]))})})};exports[_0x4afa[41]]= function(_0x4d0bx10){var _0x4d0bx15=this;return  new Promise(function(_0x4d0bx11,_0x4d0bx12){return db[_0x4afa[40]][_0x4afa[42]]({raw:_0x4d0bx10[_0x4afa[30]]?(_0x4d0bx10[_0x4afa[30]][_0x4afa[31]]=== undefined)?true:false:true,where:_0x4d0bx10[_0x4afa[30]]?_0x4d0bx10[_0x4afa[30]][_0x4afa[32]]|| null:null,attributes:_0x4d0bx10[_0x4afa[30]]?_0x4d0bx10[_0x4afa[30]][_0x4afa[33]]|| null:null,include:_0x4d0bx10[_0x4afa[30]]?(_0x4d0bx10[_0x4afa[30]][_0x4afa[35]]?_[_0x4afa[38]](_0x4d0bx10[_0x4afa[30]][_0x4afa[35]],function(_0x4d0bx16){return {model:db[_0x4d0bx16[_0x4afa[36]]],as:_0x4d0bx16[_0x4afa[37]],attributes:_0x4d0bx16[_0x4afa[33]],include:_0x4d0bx16[_0x4afa[35]]?_[_0x4afa[38]](_0x4d0bx16[_0x4afa[35]],function(_0x4d0bx17){return {model:db[_0x4d0bx17[_0x4afa[36]]],as:_0x4d0bx17[_0x4afa[37]],attributes:_0x4d0bx17[_0x4afa[33]],include:_0x4d0bx17[_0x4afa[35]]?_[_0x4afa[38]](_0x4d0bx17[_0x4afa[35]],function(_0x4d0bx18){return {model:db[_0x4d0bx18[_0x4afa[36]]],as:_0x4d0bx18[_0x4afa[37]],attributes:_0x4d0bx18[_0x4afa[33]]}}):[]}}):[]}}):[]):[]})[_0x4afa[27]](function(_0x4d0bx14){logger[_0x4afa[20]](_0x4afa[41],_0x4d0bx10);logger[_0x4afa[23]](_0x4afa[41],_0x4d0bx10,JSON[_0x4afa[22]](_0x4d0bx14));_0x4d0bx11(_0x4d0bx14)})[_0x4afa[18]](function(_0x4d0bx13){logger[_0x4afa[17]](_0x4afa[41],_0x4d0bx13[_0x4afa[25]],_0x4d0bx10);_0x4d0bx12(_0x4d0bx15[_0x4afa[17]](500,_0x4d0bx13[_0x4afa[25]]))})})}
\ No newline at end of file
index 166a0ba..f33ea14 100644 (file)
@@ -1 +1 @@
-var _0x78c3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x73\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x2F\x3A\x69\x64\x2F\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x78c3[0];var multer=require(_0x78c3[1]);var util=require(_0x78c3[2]);var path=require(_0x78c3[3]);var express=require(_0x78c3[4]);var router=express.Router();var auth=require(_0x78c3[5]);var interaction=require(_0x78c3[6]);var config=require(_0x78c3[7]);var controller=require(_0x78c3[8]);router[_0x78c3[12]](_0x78c3[9],auth[_0x78c3[10]](),controller[_0x78c3[11]]);router[_0x78c3[12]](_0x78c3[13],auth[_0x78c3[10]](),controller[_0x78c3[14]]);router[_0x78c3[12]](_0x78c3[15],auth[_0x78c3[10]](),controller[_0x78c3[16]]);router[_0x78c3[12]](_0x78c3[17],auth[_0x78c3[10]](),controller[_0x78c3[18]]);router[_0x78c3[12]](_0x78c3[19],auth[_0x78c3[10]](),controller[_0x78c3[20]]);router[_0x78c3[22]](_0x78c3[9],auth[_0x78c3[10]](),controller[_0x78c3[21]]);router[_0x78c3[24]](_0x78c3[13],auth[_0x78c3[10]](),controller[_0x78c3[23]]);router[_0x78c3[26]](_0x78c3[13],auth[_0x78c3[10]](),controller[_0x78c3[25]]);module[_0x78c3[27]]= router
\ No newline at end of file
+var _0x9367=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x73\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x2F\x3A\x69\x64\x2F\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9367[0];var multer=require(_0x9367[1]);var util=require(_0x9367[2]);var path=require(_0x9367[3]);var express=require(_0x9367[4]);var router=express.Router();var auth=require(_0x9367[5]);var interaction=require(_0x9367[6]);var config=require(_0x9367[7]);var controller=require(_0x9367[8]);router[_0x9367[12]](_0x9367[9],auth[_0x9367[10]](),controller[_0x9367[11]]);router[_0x9367[12]](_0x9367[13],auth[_0x9367[10]](),controller[_0x9367[14]]);router[_0x9367[12]](_0x9367[15],auth[_0x9367[10]](),controller[_0x9367[16]]);router[_0x9367[12]](_0x9367[17],auth[_0x9367[10]](),controller[_0x9367[18]]);router[_0x9367[12]](_0x9367[19],auth[_0x9367[10]](),controller[_0x9367[20]]);router[_0x9367[22]](_0x9367[9],auth[_0x9367[10]](),controller[_0x9367[21]]);router[_0x9367[24]](_0x9367[13],auth[_0x9367[10]](),controller[_0x9367[23]]);router[_0x9367[26]](_0x9367[13],auth[_0x9367[10]](),controller[_0x9367[25]]);module[_0x9367[27]]= router
\ No newline at end of file
index c4f64ba..183e02d 100644 (file)
@@ -1 +1 @@
-var _0xd6b3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0xd6b3[0];var Sequelize=require(_0xd6b3[1]);module[_0xd6b3[2]]= {name:{type:Sequelize[_0xd6b3[3]]},description:{type:Sequelize[_0xd6b3[3]]}}
\ No newline at end of file
+var _0x4ef2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0x4ef2[0];var Sequelize=require(_0x4ef2[1]);module[_0x4ef2[2]]= {name:{type:Sequelize[_0x4ef2[3]]},description:{type:Sequelize[_0x4ef2[3]]}}
\ No newline at end of file
index f59bddf..007f4aa 100644 (file)
@@ -1 +1 @@
-var _0x518f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73"];_0x518f[0];var jsonpatch=require(_0x518f[1]);var rp=require(_0x518f[2]);var moment=require(_0x518f[3]);var BPromise=require(_0x518f[4]);var Mustache=require(_0x518f[5]);var util=require(_0x518f[6]);var path=require(_0x518f[7]);var sox=require(_0x518f[8]);var csv=require(_0x518f[9]);var ejs=require(_0x518f[10]);var fs=require(_0x518f[11]);var _=require(_0x518f[12]);var squel=require(_0x518f[13]);var crypto=require(_0x518f[14]);var jsforce=require(_0x518f[15]);var deskjs=require(_0x518f[16]);var toCsv=require(_0x518f[9]);var querystring=require(_0x518f[17]);var Papa=require(_0x518f[18]);var qs=require(_0x518f[19]);var logger=require(_0x518f[21])(_0x518f[20]);var utils=require(_0x518f[22]);var config=require(_0x518f[23]);var db=require(_0x518f[25])[_0x518f[24]];var jayson=require(_0x518f[26]);var client=jayson[_0x518f[28]][_0x518f[27]]({port:9002});function respondWithRpcPromise(_0xd432x1c,_0xd432x1d,_0xd432x1e,_0xd432x1f){return  new BPromise(function(_0xd432x20,_0xd432x21){var _0xd432x22=(_0xd432x1f|| client);return _0xd432x22[_0x518f[41]](_0xd432x1c,_0xd432x1e)[_0x518f[40]](function(_0xd432x24){logger[_0x518f[33]](_0x518f[29],_0xd432x1d,_0x518f[32]);logger[_0x518f[36]](_0x518f[34],_0xd432x1d,_0x518f[32],JSON[_0x518f[35]](_0xd432x24));if(_0xd432x24[_0x518f[30]]){if(_0xd432x24[_0x518f[30]][_0x518f[37]]=== 500){logger[_0x518f[30]](_0x518f[29],_0xd432x1d,_0xd432x24[_0x518f[30]][_0x518f[38]]);return _0xd432x21(_0xd432x24[_0x518f[30]][_0x518f[38]])};logger[_0x518f[30]](_0x518f[29],_0xd432x1d,_0xd432x24[_0x518f[30]][_0x518f[38]]);return _0xd432x20(_0xd432x24[_0x518f[30]][_0x518f[38]])}else {logger[_0x518f[33]](_0x518f[29],_0xd432x1d,_0x518f[32]);_0xd432x20(_0xd432x24[_0x518f[39]][_0x518f[38]])}})[_0x518f[31]](function(_0xd432x23){logger[_0x518f[30]](_0x518f[29],_0xd432x1d,_0xd432x23);_0xd432x21(_0xd432x23)})})}function respondWithStatusCode(_0xd432x24,_0xd432x26){_0xd432x26= _0xd432x26|| 204;return function(_0xd432x27){if(_0xd432x27){return _0xd432x24[_0x518f[42]](_0xd432x26)};return _0xd432x24[_0x518f[44]](_0xd432x26)[_0x518f[43]]()}}function respondWithResult(_0xd432x24,_0xd432x26){_0xd432x26= _0xd432x26|| 200;return function(_0xd432x27){if(_0xd432x27){return _0xd432x24[_0x518f[44]](_0xd432x26)[_0x518f[45]](_0xd432x27)}}}function respondWithFilteredResult(_0xd432x24,_0xd432x2a){return function(_0xd432x27){if(_0xd432x27){var _0xd432x2b=_0xd432x27[_0x518f[46]],_0xd432x2c=_0xd432x2a[_0x518f[47]],_0xd432x2d=_0xd432x2a[_0x518f[47]]+ _0xd432x2a[_0x518f[48]],_0xd432x26;if(_0xd432x2d>= _0xd432x2b){_0xd432x2d= _0xd432x2b;_0xd432x26= 200}else {_0xd432x26= 206};_0xd432x24[_0x518f[44]](_0xd432x26);return _0xd432x24[_0x518f[52]](_0x518f[49],_0xd432x2c+ _0x518f[50]+ _0xd432x2d+ _0x518f[51]+ _0xd432x2b)[_0x518f[45]](_0xd432x27)};return null}}function patchUpdates(_0xd432x2f){return function(_0xd432x27){try{jsonpatch[_0x518f[53]](_0xd432x27,_0xd432x2f,true)}catch(err){return BPromise[_0x518f[54]](err)};return _0xd432x27[_0x518f[55]]()}}function saveUpdates(_0xd432x31,_0xd432x26){return function(_0xd432x27){if(_0xd432x27){return _0xd432x27[_0x518f[56]](_0xd432x31)[_0x518f[40]](function(_0xd432x32){return _0xd432x32})};return null}}function removeEntity(_0xd432x24,_0xd432x26){return function(_0xd432x27){if(_0xd432x27){return _0xd432x27[_0x518f[57]]()[_0x518f[40]](function(){_0xd432x24[_0x518f[44]](204)[_0x518f[43]]()})}}}function handleEntityNotFound(_0xd432x24,_0xd432x26){return function(_0xd432x27){if(!_0xd432x27){_0xd432x24[_0x518f[42]](404)};return _0xd432x27}}function handleError(_0xd432x24,_0xd432x26){_0xd432x26= _0xd432x26|| 500;return function(_0xd432x23){logger[_0x518f[30]](_0xd432x23[_0x518f[58]]);if(_0xd432x23[_0x518f[59]]){delete _0xd432x23[_0x518f[59]]};_0xd432x24[_0x518f[44]](_0xd432x26)[_0x518f[60]](_0xd432x23)}}exports[_0x518f[61]]= function(_0xd432x1e,_0xd432x24){var _0xd432x2a={},_0xd432x36={},_0xd432x37={count:0,rows:[]};_0xd432x36[_0x518f[62]]= _[_0x518f[65]](db[_0x518f[64]][_0x518f[63]]);var _0xd432x38={dateStart:_0xd432x1e[_0x518f[67]][_0x518f[66]],dateEnd:_0xd432x1e[_0x518f[67]][_0x518f[68]]};delete _0xd432x1e[_0x518f[67]][_0x518f[66]];delete _0xd432x1e[_0x518f[67]][_0x518f[68]];_0xd432x36[_0x518f[67]]= _[_0x518f[65]](_0xd432x1e[_0x518f[67]]);_0xd432x36[_0x518f[69]]= _[_0x518f[70]](_0xd432x36[_0x518f[62]],_0xd432x36[_0x518f[67]]);_0xd432x2a[_0x518f[71]]= _[_0x518f[70]](_0xd432x36[_0x518f[62]],qs[_0x518f[72]](_0xd432x1e[_0x518f[67]][_0x518f[72]]));_0xd432x2a[_0x518f[71]]= (_0xd432x2a[_0x518f[71]][_0x518f[73]])?_0xd432x2a[_0x518f[71]]:_0xd432x36[_0x518f[62]];if(!_0xd432x1e[_0x518f[67]][_0x518f[75]](_0x518f[74])){_0xd432x2a[_0x518f[48]]= qs[_0x518f[48]](_0xd432x1e[_0x518f[67]][_0x518f[48]]);_0xd432x2a[_0x518f[47]]= qs[_0x518f[47]](_0xd432x1e[_0x518f[67]][_0x518f[47]])};_0xd432x2a[_0x518f[76]]= qs[_0x518f[77]](_0xd432x1e[_0x518f[67]][_0x518f[77]]);_0xd432x2a[_0x518f[78]]= qs[_0x518f[69]](_[_0x518f[79]](_0xd432x1e[_0x518f[67]],_0xd432x36[_0x518f[69]]));if(_0xd432x38[_0x518f[66]]){if(_0xd432x38[_0x518f[68]]){_0xd432x38[_0x518f[68]]= moment(_0xd432x38[_0x518f[68]])[_0x518f[81]](1,_0x518f[80])}else {_0xd432x38[_0x518f[68]]= moment(_0xd432x38[_0x518f[66]])[_0x518f[81]](1,_0x518f[80])};_[_0x518f[82]](_0xd432x2a[_0x518f[78]],{createdAt:{$gte:_0xd432x38[_0x518f[66]],$lte:_0xd432x38[_0x518f[68]]}})};if(_0xd432x1e[_0x518f[67]][_0x518f[83]]){_0xd432x2a[_0x518f[78]]= _[_0x518f[82]](_0xd432x2a[_0x518f[78]],{$or:_[_0x518f[85]](_0xd432x2a[_0x518f[71]],function(_0xd432x39){var _0xd432x37={};_0xd432x37[_0xd432x39]= {$like:_0x518f[84]+ _0xd432x1e[_0x518f[67]][_0x518f[83]]+ _0x518f[84]};return _0xd432x37})})};_0xd432x2a= _[_0x518f[82]]({},_0xd432x2a,_0xd432x1e[_0x518f[86]]);var _0xd432x3a={where:_0xd432x2a[_0x518f[78]]};return db[_0x518f[64]][_0x518f[46]](_0xd432x3a)[_0x518f[40]](function(_0xd432x2b){_0xd432x37[_0x518f[46]]= _0xd432x2b;if(_0xd432x1e[_0x518f[67]][_0x518f[88]]){_0xd432x2a[_0x518f[89]]= [{all:true}]};return db[_0x518f[64]][_0x518f[90]](_0xd432x2a)})[_0x518f[40]](function(_0xd432x3b){_0xd432x37[_0x518f[87]]= _0xd432x3b;return _0xd432x37})[_0x518f[40]](respondWithFilteredResult(_0xd432x24,_0xd432x2a))[_0x518f[31]](handleError(_0xd432x24,null))};exports[_0x518f[91]]= function(_0xd432x1e,_0xd432x24){var _0xd432x2a={raw:false,where:{id:_0xd432x1e[_0x518f[93]][_0x518f[92]]}},_0xd432x36={};_0xd432x36[_0x518f[62]]= _[_0x518f[65]](db[_0x518f[64]][_0x518f[63]]);_0xd432x36[_0x518f[67]]= _[_0x518f[65]](_0xd432x1e[_0x518f[67]]);_0xd432x36[_0x518f[69]]= _[_0x518f[70]](_0xd432x36[_0x518f[62]],_0xd432x36[_0x518f[67]]);_0xd432x2a[_0x518f[71]]= _[_0x518f[70]](_0xd432x36[_0x518f[62]],qs[_0x518f[72]](_0xd432x1e[_0x518f[67]][_0x518f[72]]));_0xd432x2a[_0x518f[71]]= (_0xd432x2a[_0x518f[71]][_0x518f[73]])?_0xd432x2a[_0x518f[71]]:_0xd432x36[_0x518f[62]];if(_0xd432x1e[_0x518f[67]][_0x518f[88]]){_0xd432x2a[_0x518f[89]]= [{all:true}]};_0xd432x2a= _[_0x518f[82]]({},_0xd432x2a,_0xd432x1e[_0x518f[86]]);return db[_0x518f[64]][_0x518f[94]](_0xd432x2a)[_0x518f[40]](handleEntityNotFound(_0xd432x24,null))[_0x518f[40]](respondWithResult(_0xd432x24,null))[_0x518f[31]](handleError(_0xd432x24,null))};exports[_0x518f[95]]= function(_0xd432x1e,_0xd432x24){return db[_0x518f[64]][_0x518f[95]](_0xd432x1e[_0x518f[96]],{})[_0x518f[40]](respondWithResult(_0xd432x24,201))[_0x518f[31]](handleError(_0xd432x24,null))};exports[_0x518f[56]]= function(_0xd432x1e,_0xd432x24){if(_0xd432x1e[_0x518f[96]][_0x518f[92]]){delete _0xd432x1e[_0x518f[96]][_0x518f[92]]};return db[_0x518f[64]][_0x518f[94]]({where:{id:_0xd432x1e[_0x518f[93]][_0x518f[92]]}})[_0x518f[40]](handleEntityNotFound(_0xd432x24,null))[_0x518f[40]](saveUpdates(_0xd432x1e[_0x518f[96]],null))[_0x518f[40]](respondWithResult(_0xd432x24,null))[_0x518f[31]](handleError(_0xd432x24,null))};exports[_0x518f[57]]= function(_0xd432x1e,_0xd432x24){return db[_0x518f[64]][_0x518f[94]]({where:{id:_0xd432x1e[_0x518f[93]][_0x518f[92]]}})[_0x518f[40]](handleEntityNotFound(_0xd432x24,null))[_0x518f[40]](removeEntity(_0xd432x24,null))[_0x518f[31]](handleError(_0xd432x24,null))};exports[_0x518f[97]]= function(_0xd432x1e,_0xd432x27,_0xd432x3c){var _0xd432x2a={};var _0xd432x36={};var _0xd432x3d;var _0xd432x2b;return db[_0x518f[64]][_0x518f[99]]({where:{id:_0xd432x1e[_0x518f[93]][_0x518f[92]]}})[_0x518f[40]](handleEntityNotFound(_0xd432x27,null))[_0x518f[40]](function(_0xd432x27){if(_0xd432x27){_0xd432x3d= _0xd432x27;_0xd432x36[_0x518f[62]]= _[_0x518f[65]](db[_0x518f[98]][_0x518f[63]]);_0xd432x36[_0x518f[67]]= _[_0x518f[65]](_0xd432x1e[_0x518f[67]]);_0xd432x36[_0x518f[69]]= _[_0x518f[70]](_0xd432x36[_0x518f[62]],_0xd432x36[_0x518f[67]]);_0xd432x2a[_0x518f[71]]= _[_0x518f[70]](_0xd432x36[_0x518f[62]],qs[_0x518f[72]](_0xd432x1e[_0x518f[67]][_0x518f[72]]));_0xd432x2a[_0x518f[71]]= (_0xd432x2a[_0x518f[71]][_0x518f[73]])?_0xd432x2a[_0x518f[71]]:_0xd432x36[_0x518f[62]];_0xd432x2a[_0x518f[76]]= qs[_0x518f[77]](_0xd432x1e[_0x518f[67]][_0x518f[77]]);_0xd432x2a[_0x518f[78]]= qs[_0x518f[69]](_[_0x518f[79]](_0xd432x1e[_0x518f[67]],_0xd432x36[_0x518f[69]]));if(_0xd432x1e[_0x518f[67]][_0x518f[83]]){_0xd432x2a[_0x518f[78]]= _[_0x518f[82]](_0xd432x2a[_0x518f[78]],{$or:_[_0x518f[85]](_0xd432x2a[_0x518f[71]],function(_0xd432x39){var _0xd432x37={};_0xd432x37[_0xd432x39]= {$like:_0x518f[84]+ _0xd432x1e[_0x518f[67]][_0x518f[83]]+ _0x518f[84]};return _0xd432x37})})};_0xd432x2a= _[_0x518f[82]]({},_0xd432x2a,_0xd432x1e[_0x518f[86]]);return _0xd432x3d[_0x518f[97]](_0xd432x2a)}})[_0x518f[40]](function(_0xd432x3e){if(_0xd432x3e){_0xd432x2b= _0xd432x3e[_0x518f[73]];if(!_0xd432x1e[_0x518f[67]][_0x518f[75]](_0x518f[74])){_0xd432x2a[_0x518f[48]]= qs[_0x518f[48]](_0xd432x1e[_0x518f[67]][_0x518f[48]]);_0xd432x2a[_0x518f[47]]= qs[_0x518f[47]](_0xd432x1e[_0x518f[67]][_0x518f[47]])};return _0xd432x3d[_0x518f[97]](_0xd432x2a)}})[_0x518f[40]](function(_0xd432x3b){if(_0xd432x3b){return _0xd432x3b?{count:_0xd432x2b,rows:_0xd432x3b}:null}})[_0x518f[40]](respondWithResult(_0xd432x27,null))[_0x518f[31]](handleError(_0xd432x27,null))};exports[_0x518f[100]]= function(_0xd432x1e,_0xd432x27,_0xd432x3c){var _0xd432x2a={};var _0xd432x36={};var _0xd432x3d;var _0xd432x2b;return db[_0x518f[64]][_0x518f[99]]({where:{id:_0xd432x1e[_0x518f[93]][_0x518f[92]]}})[_0x518f[40]](handleEntityNotFound(_0xd432x27,null))[_0x518f[40]](function(_0xd432x27){if(_0xd432x27){_0xd432x3d= _0xd432x27;_0xd432x36[_0x518f[62]]= _[_0x518f[65]](db[_0x518f[98]][_0x518f[63]]);_0xd432x36[_0x518f[67]]= _[_0x518f[65]](_0xd432x1e[_0x518f[67]]);_0xd432x36[_0x518f[69]]= _[_0x518f[70]](_0xd432x36[_0x518f[62]],_0xd432x36[_0x518f[67]]);_0xd432x2a[_0x518f[71]]= _[_0x518f[70]](_0xd432x36[_0x518f[62]],qs[_0x518f[72]](_0xd432x1e[_0x518f[67]][_0x518f[72]]));_0xd432x2a[_0x518f[71]]= (_0xd432x2a[_0x518f[71]][_0x518f[73]])?_0xd432x2a[_0x518f[71]]:_0xd432x36[_0x518f[62]];_0xd432x2a[_0x518f[76]]= qs[_0x518f[77]](_0xd432x1e[_0x518f[67]][_0x518f[77]]);_0xd432x2a[_0x518f[78]]= qs[_0x518f[69]](_[_0x518f[79]](_0xd432x1e[_0x518f[67]],_0xd432x36[_0x518f[69]]));if(_0xd432x1e[_0x518f[67]][_0x518f[83]]){_0xd432x2a[_0x518f[78]]= _[_0x518f[82]](_0xd432x2a[_0x518f[78]],{$or:_[_0x518f[85]](_0xd432x2a[_0x518f[71]],function(_0xd432x39){var _0xd432x37={};_0xd432x37[_0xd432x39]= {$like:_0x518f[84]+ _0xd432x1e[_0x518f[67]][_0x518f[83]]+ _0x518f[84]};return _0xd432x37})})};_0xd432x2a= _[_0x518f[82]]({},_0xd432x2a,_0xd432x1e[_0x518f[86]]);return _0xd432x3d[_0x518f[100]](_0xd432x2a)}})[_0x518f[40]](function(_0xd432x3e){if(_0xd432x3e){_0xd432x2b= _0xd432x3e[_0x518f[73]];if(!_0xd432x1e[_0x518f[67]][_0x518f[75]](_0x518f[74])){_0xd432x2a[_0x518f[48]]= qs[_0x518f[48]](_0xd432x1e[_0x518f[67]][_0x518f[48]]);_0xd432x2a[_0x518f[47]]= qs[_0x518f[47]](_0xd432x1e[_0x518f[67]][_0x518f[47]])};return _0xd432x3d[_0x518f[100]](_0xd432x2a)}})[_0x518f[40]](function(_0xd432x3b){if(_0xd432x3b){return _0xd432x3b?{count:_0xd432x2b,rows:_0xd432x3b}:null}})[_0x518f[40]](respondWithResult(_0xd432x27,null))[_0x518f[31]](handleError(_0xd432x27,null))};exports[_0x518f[101]]= function(_0xd432x1e,_0xd432x27,_0xd432x3c){var _0xd432x2a={};var _0xd432x36={};var _0xd432x3d;var _0xd432x2b;return db[_0x518f[64]][_0x518f[99]]({where:{id:_0xd432x1e[_0x518f[93]][_0x518f[92]]}})[_0x518f[40]](handleEntityNotFound(_0xd432x27,null))[_0x518f[40]](function(_0xd432x27){if(_0xd432x27){_0xd432x3d= _0xd432x27;_0xd432x36[_0x518f[62]]= _[_0x518f[65]](db[_0x518f[98]][_0x518f[63]]);_0xd432x36[_0x518f[67]]= _[_0x518f[65]](_0xd432x1e[_0x518f[67]]);_0xd432x36[_0x518f[69]]= _[_0x518f[70]](_0xd432x36[_0x518f[62]],_0xd432x36[_0x518f[67]]);_0xd432x2a[_0x518f[71]]= _[_0x518f[70]](_0xd432x36[_0x518f[62]],qs[_0x518f[72]](_0xd432x1e[_0x518f[67]][_0x518f[72]]));_0xd432x2a[_0x518f[71]]= (_0xd432x2a[_0x518f[71]][_0x518f[73]])?_0xd432x2a[_0x518f[71]]:_0xd432x36[_0x518f[62]];_0xd432x2a[_0x518f[76]]= qs[_0x518f[77]](_0xd432x1e[_0x518f[67]][_0x518f[77]]);_0xd432x2a[_0x518f[78]]= qs[_0x518f[69]](_[_0x518f[79]](_0xd432x1e[_0x518f[67]],_0xd432x36[_0x518f[69]]));if(_0xd432x1e[_0x518f[67]][_0x518f[83]]){_0xd432x2a[_0x518f[78]]= _[_0x518f[82]](_0xd432x2a[_0x518f[78]],{$or:_[_0x518f[85]](_0xd432x2a[_0x518f[71]],function(_0xd432x39){var _0xd432x37={};_0xd432x37[_0xd432x39]= {$like:_0x518f[84]+ _0xd432x1e[_0x518f[67]][_0x518f[83]]+ _0x518f[84]};return _0xd432x37})})};_0xd432x2a= _[_0x518f[82]]({},_0xd432x2a,_0xd432x1e[_0x518f[86]]);return _0xd432x3d[_0x518f[101]](_0xd432x2a)}})[_0x518f[40]](function(_0xd432x3e){if(_0xd432x3e){_0xd432x2b= _0xd432x3e[_0x518f[73]];if(!_0xd432x1e[_0x518f[67]][_0x518f[75]](_0x518f[74])){_0xd432x2a[_0x518f[48]]= qs[_0x518f[48]](_0xd432x1e[_0x518f[67]][_0x518f[48]]);_0xd432x2a[_0x518f[47]]= qs[_0x518f[47]](_0xd432x1e[_0x518f[67]][_0x518f[47]])};return _0xd432x3d[_0x518f[101]](_0xd432x2a)}})[_0x518f[40]](function(_0xd432x3b){if(_0xd432x3b){return _0xd432x3b?{count:_0xd432x2b,rows:_0xd432x3b}:null}})[_0x518f[40]](respondWithResult(_0xd432x27,null))[_0x518f[31]](handleError(_0xd432x27,null))}
\ No newline at end of file
+var _0x6340=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73"];_0x6340[0];var jsonpatch=require(_0x6340[1]);var rp=require(_0x6340[2]);var moment=require(_0x6340[3]);var BPromise=require(_0x6340[4]);var Mustache=require(_0x6340[5]);var util=require(_0x6340[6]);var path=require(_0x6340[7]);var sox=require(_0x6340[8]);var csv=require(_0x6340[9]);var ejs=require(_0x6340[10]);var fs=require(_0x6340[11]);var _=require(_0x6340[12]);var squel=require(_0x6340[13]);var crypto=require(_0x6340[14]);var jsforce=require(_0x6340[15]);var deskjs=require(_0x6340[16]);var toCsv=require(_0x6340[9]);var querystring=require(_0x6340[17]);var Papa=require(_0x6340[18]);var qs=require(_0x6340[19]);var logger=require(_0x6340[21])(_0x6340[20]);var utils=require(_0x6340[22]);var config=require(_0x6340[23]);var db=require(_0x6340[25])[_0x6340[24]];var jayson=require(_0x6340[26]);var client=jayson[_0x6340[28]][_0x6340[27]]({port:9002});function respondWithRpcPromise(_0xde12x1c,_0xde12x1d,_0xde12x1e,_0xde12x1f){return  new BPromise(function(_0xde12x20,_0xde12x21){var _0xde12x22=(_0xde12x1f|| client);return _0xde12x22[_0x6340[41]](_0xde12x1c,_0xde12x1e)[_0x6340[40]](function(_0xde12x24){logger[_0x6340[33]](_0x6340[29],_0xde12x1d,_0x6340[32]);logger[_0x6340[36]](_0x6340[34],_0xde12x1d,_0x6340[32],JSON[_0x6340[35]](_0xde12x24));if(_0xde12x24[_0x6340[30]]){if(_0xde12x24[_0x6340[30]][_0x6340[37]]=== 500){logger[_0x6340[30]](_0x6340[29],_0xde12x1d,_0xde12x24[_0x6340[30]][_0x6340[38]]);return _0xde12x21(_0xde12x24[_0x6340[30]][_0x6340[38]])};logger[_0x6340[30]](_0x6340[29],_0xde12x1d,_0xde12x24[_0x6340[30]][_0x6340[38]]);return _0xde12x20(_0xde12x24[_0x6340[30]][_0x6340[38]])}else {logger[_0x6340[33]](_0x6340[29],_0xde12x1d,_0x6340[32]);_0xde12x20(_0xde12x24[_0x6340[39]][_0x6340[38]])}})[_0x6340[31]](function(_0xde12x23){logger[_0x6340[30]](_0x6340[29],_0xde12x1d,_0xde12x23);_0xde12x21(_0xde12x23)})})}function respondWithStatusCode(_0xde12x24,_0xde12x26){_0xde12x26= _0xde12x26|| 204;return function(_0xde12x27){if(_0xde12x27){return _0xde12x24[_0x6340[42]](_0xde12x26)};return _0xde12x24[_0x6340[44]](_0xde12x26)[_0x6340[43]]()}}function respondWithResult(_0xde12x24,_0xde12x26){_0xde12x26= _0xde12x26|| 200;return function(_0xde12x27){if(_0xde12x27){return _0xde12x24[_0x6340[44]](_0xde12x26)[_0x6340[45]](_0xde12x27)}}}function respondWithFilteredResult(_0xde12x24,_0xde12x2a){return function(_0xde12x27){if(_0xde12x27){var _0xde12x2b=_0xde12x27[_0x6340[46]],_0xde12x2c=_0xde12x2a[_0x6340[47]],_0xde12x2d=_0xde12x2a[_0x6340[47]]+ _0xde12x2a[_0x6340[48]],_0xde12x26;if(_0xde12x2d>= _0xde12x2b){_0xde12x2d= _0xde12x2b;_0xde12x26= 200}else {_0xde12x26= 206};_0xde12x24[_0x6340[44]](_0xde12x26);return _0xde12x24[_0x6340[52]](_0x6340[49],_0xde12x2c+ _0x6340[50]+ _0xde12x2d+ _0x6340[51]+ _0xde12x2b)[_0x6340[45]](_0xde12x27)};return null}}function patchUpdates(_0xde12x2f){return function(_0xde12x27){try{jsonpatch[_0x6340[53]](_0xde12x27,_0xde12x2f,true)}catch(err){return BPromise[_0x6340[54]](err)};return _0xde12x27[_0x6340[55]]()}}function saveUpdates(_0xde12x31,_0xde12x26){return function(_0xde12x27){if(_0xde12x27){return _0xde12x27[_0x6340[56]](_0xde12x31)[_0x6340[40]](function(_0xde12x32){return _0xde12x32})};return null}}function removeEntity(_0xde12x24,_0xde12x26){return function(_0xde12x27){if(_0xde12x27){return _0xde12x27[_0x6340[57]]()[_0x6340[40]](function(){_0xde12x24[_0x6340[44]](204)[_0x6340[43]]()})}}}function handleEntityNotFound(_0xde12x24,_0xde12x26){return function(_0xde12x27){if(!_0xde12x27){_0xde12x24[_0x6340[42]](404)};return _0xde12x27}}function handleError(_0xde12x24,_0xde12x26){_0xde12x26= _0xde12x26|| 500;return function(_0xde12x23){logger[_0x6340[30]](_0xde12x23[_0x6340[58]]);if(_0xde12x23[_0x6340[59]]){delete _0xde12x23[_0x6340[59]]};_0xde12x24[_0x6340[44]](_0xde12x26)[_0x6340[60]](_0xde12x23)}}exports[_0x6340[61]]= function(_0xde12x1e,_0xde12x24){var _0xde12x2a={},_0xde12x36={},_0xde12x37={count:0,rows:[]};_0xde12x36[_0x6340[62]]= _[_0x6340[65]](db[_0x6340[64]][_0x6340[63]]);var _0xde12x38={dateStart:_0xde12x1e[_0x6340[67]][_0x6340[66]],dateEnd:_0xde12x1e[_0x6340[67]][_0x6340[68]]};delete _0xde12x1e[_0x6340[67]][_0x6340[66]];delete _0xde12x1e[_0x6340[67]][_0x6340[68]];_0xde12x36[_0x6340[67]]= _[_0x6340[65]](_0xde12x1e[_0x6340[67]]);_0xde12x36[_0x6340[69]]= _[_0x6340[70]](_0xde12x36[_0x6340[62]],_0xde12x36[_0x6340[67]]);_0xde12x2a[_0x6340[71]]= _[_0x6340[70]](_0xde12x36[_0x6340[62]],qs[_0x6340[72]](_0xde12x1e[_0x6340[67]][_0x6340[72]]));_0xde12x2a[_0x6340[71]]= (_0xde12x2a[_0x6340[71]][_0x6340[73]])?_0xde12x2a[_0x6340[71]]:_0xde12x36[_0x6340[62]];if(!_0xde12x1e[_0x6340[67]][_0x6340[75]](_0x6340[74])){_0xde12x2a[_0x6340[48]]= qs[_0x6340[48]](_0xde12x1e[_0x6340[67]][_0x6340[48]]);_0xde12x2a[_0x6340[47]]= qs[_0x6340[47]](_0xde12x1e[_0x6340[67]][_0x6340[47]])};_0xde12x2a[_0x6340[76]]= qs[_0x6340[77]](_0xde12x1e[_0x6340[67]][_0x6340[77]]);_0xde12x2a[_0x6340[78]]= qs[_0x6340[69]](_[_0x6340[79]](_0xde12x1e[_0x6340[67]],_0xde12x36[_0x6340[69]]));if(_0xde12x38[_0x6340[66]]){if(_0xde12x38[_0x6340[68]]){_0xde12x38[_0x6340[68]]= moment(_0xde12x38[_0x6340[68]])[_0x6340[81]](1,_0x6340[80])}else {_0xde12x38[_0x6340[68]]= moment(_0xde12x38[_0x6340[66]])[_0x6340[81]](1,_0x6340[80])};_[_0x6340[82]](_0xde12x2a[_0x6340[78]],{createdAt:{$gte:_0xde12x38[_0x6340[66]],$lte:_0xde12x38[_0x6340[68]]}})};if(_0xde12x1e[_0x6340[67]][_0x6340[83]]){_0xde12x2a[_0x6340[78]]= _[_0x6340[82]](_0xde12x2a[_0x6340[78]],{$or:_[_0x6340[85]](_0xde12x2a[_0x6340[71]],function(_0xde12x39){var _0xde12x37={};_0xde12x37[_0xde12x39]= {$like:_0x6340[84]+ _0xde12x1e[_0x6340[67]][_0x6340[83]]+ _0x6340[84]};return _0xde12x37})})};_0xde12x2a= _[_0x6340[82]]({},_0xde12x2a,_0xde12x1e[_0x6340[86]]);var _0xde12x3a={where:_0xde12x2a[_0x6340[78]]};return db[_0x6340[64]][_0x6340[46]](_0xde12x3a)[_0x6340[40]](function(_0xde12x2b){_0xde12x37[_0x6340[46]]= _0xde12x2b;if(_0xde12x1e[_0x6340[67]][_0x6340[88]]){_0xde12x2a[_0x6340[89]]= [{all:true}]};return db[_0x6340[64]][_0x6340[90]](_0xde12x2a)})[_0x6340[40]](function(_0xde12x3b){_0xde12x37[_0x6340[87]]= _0xde12x3b;return _0xde12x37})[_0x6340[40]](respondWithFilteredResult(_0xde12x24,_0xde12x2a))[_0x6340[31]](handleError(_0xde12x24,null))};exports[_0x6340[91]]= function(_0xde12x1e,_0xde12x24){var _0xde12x2a={raw:false,where:{id:_0xde12x1e[_0x6340[93]][_0x6340[92]]}},_0xde12x36={};_0xde12x36[_0x6340[62]]= _[_0x6340[65]](db[_0x6340[64]][_0x6340[63]]);_0xde12x36[_0x6340[67]]= _[_0x6340[65]](_0xde12x1e[_0x6340[67]]);_0xde12x36[_0x6340[69]]= _[_0x6340[70]](_0xde12x36[_0x6340[62]],_0xde12x36[_0x6340[67]]);_0xde12x2a[_0x6340[71]]= _[_0x6340[70]](_0xde12x36[_0x6340[62]],qs[_0x6340[72]](_0xde12x1e[_0x6340[67]][_0x6340[72]]));_0xde12x2a[_0x6340[71]]= (_0xde12x2a[_0x6340[71]][_0x6340[73]])?_0xde12x2a[_0x6340[71]]:_0xde12x36[_0x6340[62]];if(_0xde12x1e[_0x6340[67]][_0x6340[88]]){_0xde12x2a[_0x6340[89]]= [{all:true}]};_0xde12x2a= _[_0x6340[82]]({},_0xde12x2a,_0xde12x1e[_0x6340[86]]);return db[_0x6340[64]][_0x6340[94]](_0xde12x2a)[_0x6340[40]](handleEntityNotFound(_0xde12x24,null))[_0x6340[40]](respondWithResult(_0xde12x24,null))[_0x6340[31]](handleError(_0xde12x24,null))};exports[_0x6340[95]]= function(_0xde12x1e,_0xde12x24){return db[_0x6340[64]][_0x6340[95]](_0xde12x1e[_0x6340[96]],{})[_0x6340[40]](respondWithResult(_0xde12x24,201))[_0x6340[31]](handleError(_0xde12x24,null))};exports[_0x6340[56]]= function(_0xde12x1e,_0xde12x24){if(_0xde12x1e[_0x6340[96]][_0x6340[92]]){delete _0xde12x1e[_0x6340[96]][_0x6340[92]]};return db[_0x6340[64]][_0x6340[94]]({where:{id:_0xde12x1e[_0x6340[93]][_0x6340[92]]}})[_0x6340[40]](handleEntityNotFound(_0xde12x24,null))[_0x6340[40]](saveUpdates(_0xde12x1e[_0x6340[96]],null))[_0x6340[40]](respondWithResult(_0xde12x24,null))[_0x6340[31]](handleError(_0xde12x24,null))};exports[_0x6340[57]]= function(_0xde12x1e,_0xde12x24){return db[_0x6340[64]][_0x6340[94]]({where:{id:_0xde12x1e[_0x6340[93]][_0x6340[92]]}})[_0x6340[40]](handleEntityNotFound(_0xde12x24,null))[_0x6340[40]](removeEntity(_0xde12x24,null))[_0x6340[31]](handleError(_0xde12x24,null))};exports[_0x6340[97]]= function(_0xde12x1e,_0xde12x27,_0xde12x3c){var _0xde12x2a={};var _0xde12x36={};var _0xde12x3d;var _0xde12x2b;return db[_0x6340[64]][_0x6340[99]]({where:{id:_0xde12x1e[_0x6340[93]][_0x6340[92]]}})[_0x6340[40]](handleEntityNotFound(_0xde12x27,null))[_0x6340[40]](function(_0xde12x27){if(_0xde12x27){_0xde12x3d= _0xde12x27;_0xde12x36[_0x6340[62]]= _[_0x6340[65]](db[_0x6340[98]][_0x6340[63]]);_0xde12x36[_0x6340[67]]= _[_0x6340[65]](_0xde12x1e[_0x6340[67]]);_0xde12x36[_0x6340[69]]= _[_0x6340[70]](_0xde12x36[_0x6340[62]],_0xde12x36[_0x6340[67]]);_0xde12x2a[_0x6340[71]]= _[_0x6340[70]](_0xde12x36[_0x6340[62]],qs[_0x6340[72]](_0xde12x1e[_0x6340[67]][_0x6340[72]]));_0xde12x2a[_0x6340[71]]= (_0xde12x2a[_0x6340[71]][_0x6340[73]])?_0xde12x2a[_0x6340[71]]:_0xde12x36[_0x6340[62]];_0xde12x2a[_0x6340[76]]= qs[_0x6340[77]](_0xde12x1e[_0x6340[67]][_0x6340[77]]);_0xde12x2a[_0x6340[78]]= qs[_0x6340[69]](_[_0x6340[79]](_0xde12x1e[_0x6340[67]],_0xde12x36[_0x6340[69]]));if(_0xde12x1e[_0x6340[67]][_0x6340[83]]){_0xde12x2a[_0x6340[78]]= _[_0x6340[82]](_0xde12x2a[_0x6340[78]],{$or:_[_0x6340[85]](_0xde12x2a[_0x6340[71]],function(_0xde12x39){var _0xde12x37={};_0xde12x37[_0xde12x39]= {$like:_0x6340[84]+ _0xde12x1e[_0x6340[67]][_0x6340[83]]+ _0x6340[84]};return _0xde12x37})})};_0xde12x2a= _[_0x6340[82]]({},_0xde12x2a,_0xde12x1e[_0x6340[86]]);return _0xde12x3d[_0x6340[97]](_0xde12x2a)}})[_0x6340[40]](function(_0xde12x3e){if(_0xde12x3e){_0xde12x2b= _0xde12x3e[_0x6340[73]];if(!_0xde12x1e[_0x6340[67]][_0x6340[75]](_0x6340[74])){_0xde12x2a[_0x6340[48]]= qs[_0x6340[48]](_0xde12x1e[_0x6340[67]][_0x6340[48]]);_0xde12x2a[_0x6340[47]]= qs[_0x6340[47]](_0xde12x1e[_0x6340[67]][_0x6340[47]])};return _0xde12x3d[_0x6340[97]](_0xde12x2a)}})[_0x6340[40]](function(_0xde12x3b){if(_0xde12x3b){return _0xde12x3b?{count:_0xde12x2b,rows:_0xde12x3b}:null}})[_0x6340[40]](respondWithResult(_0xde12x27,null))[_0x6340[31]](handleError(_0xde12x27,null))};exports[_0x6340[100]]= function(_0xde12x1e,_0xde12x27,_0xde12x3c){var _0xde12x2a={};var _0xde12x36={};var _0xde12x3d;var _0xde12x2b;return db[_0x6340[64]][_0x6340[99]]({where:{id:_0xde12x1e[_0x6340[93]][_0x6340[92]]}})[_0x6340[40]](handleEntityNotFound(_0xde12x27,null))[_0x6340[40]](function(_0xde12x27){if(_0xde12x27){_0xde12x3d= _0xde12x27;_0xde12x36[_0x6340[62]]= _[_0x6340[65]](db[_0x6340[98]][_0x6340[63]]);_0xde12x36[_0x6340[67]]= _[_0x6340[65]](_0xde12x1e[_0x6340[67]]);_0xde12x36[_0x6340[69]]= _[_0x6340[70]](_0xde12x36[_0x6340[62]],_0xde12x36[_0x6340[67]]);_0xde12x2a[_0x6340[71]]= _[_0x6340[70]](_0xde12x36[_0x6340[62]],qs[_0x6340[72]](_0xde12x1e[_0x6340[67]][_0x6340[72]]));_0xde12x2a[_0x6340[71]]= (_0xde12x2a[_0x6340[71]][_0x6340[73]])?_0xde12x2a[_0x6340[71]]:_0xde12x36[_0x6340[62]];_0xde12x2a[_0x6340[76]]= qs[_0x6340[77]](_0xde12x1e[_0x6340[67]][_0x6340[77]]);_0xde12x2a[_0x6340[78]]= qs[_0x6340[69]](_[_0x6340[79]](_0xde12x1e[_0x6340[67]],_0xde12x36[_0x6340[69]]));if(_0xde12x1e[_0x6340[67]][_0x6340[83]]){_0xde12x2a[_0x6340[78]]= _[_0x6340[82]](_0xde12x2a[_0x6340[78]],{$or:_[_0x6340[85]](_0xde12x2a[_0x6340[71]],function(_0xde12x39){var _0xde12x37={};_0xde12x37[_0xde12x39]= {$like:_0x6340[84]+ _0xde12x1e[_0x6340[67]][_0x6340[83]]+ _0x6340[84]};return _0xde12x37})})};_0xde12x2a= _[_0x6340[82]]({},_0xde12x2a,_0xde12x1e[_0x6340[86]]);return _0xde12x3d[_0x6340[100]](_0xde12x2a)}})[_0x6340[40]](function(_0xde12x3e){if(_0xde12x3e){_0xde12x2b= _0xde12x3e[_0x6340[73]];if(!_0xde12x1e[_0x6340[67]][_0x6340[75]](_0x6340[74])){_0xde12x2a[_0x6340[48]]= qs[_0x6340[48]](_0xde12x1e[_0x6340[67]][_0x6340[48]]);_0xde12x2a[_0x6340[47]]= qs[_0x6340[47]](_0xde12x1e[_0x6340[67]][_0x6340[47]])};return _0xde12x3d[_0x6340[100]](_0xde12x2a)}})[_0x6340[40]](function(_0xde12x3b){if(_0xde12x3b){return _0xde12x3b?{count:_0xde12x2b,rows:_0xde12x3b}:null}})[_0x6340[40]](respondWithResult(_0xde12x27,null))[_0x6340[31]](handleError(_0xde12x27,null))};exports[_0x6340[101]]= function(_0xde12x1e,_0xde12x27,_0xde12x3c){var _0xde12x2a={};var _0xde12x36={};var _0xde12x3d;var _0xde12x2b;return db[_0x6340[64]][_0x6340[99]]({where:{id:_0xde12x1e[_0x6340[93]][_0x6340[92]]}})[_0x6340[40]](handleEntityNotFound(_0xde12x27,null))[_0x6340[40]](function(_0xde12x27){if(_0xde12x27){_0xde12x3d= _0xde12x27;_0xde12x36[_0x6340[62]]= _[_0x6340[65]](db[_0x6340[98]][_0x6340[63]]);_0xde12x36[_0x6340[67]]= _[_0x6340[65]](_0xde12x1e[_0x6340[67]]);_0xde12x36[_0x6340[69]]= _[_0x6340[70]](_0xde12x36[_0x6340[62]],_0xde12x36[_0x6340[67]]);_0xde12x2a[_0x6340[71]]= _[_0x6340[70]](_0xde12x36[_0x6340[62]],qs[_0x6340[72]](_0xde12x1e[_0x6340[67]][_0x6340[72]]));_0xde12x2a[_0x6340[71]]= (_0xde12x2a[_0x6340[71]][_0x6340[73]])?_0xde12x2a[_0x6340[71]]:_0xde12x36[_0x6340[62]];_0xde12x2a[_0x6340[76]]= qs[_0x6340[77]](_0xde12x1e[_0x6340[67]][_0x6340[77]]);_0xde12x2a[_0x6340[78]]= qs[_0x6340[69]](_[_0x6340[79]](_0xde12x1e[_0x6340[67]],_0xde12x36[_0x6340[69]]));if(_0xde12x1e[_0x6340[67]][_0x6340[83]]){_0xde12x2a[_0x6340[78]]= _[_0x6340[82]](_0xde12x2a[_0x6340[78]],{$or:_[_0x6340[85]](_0xde12x2a[_0x6340[71]],function(_0xde12x39){var _0xde12x37={};_0xde12x37[_0xde12x39]= {$like:_0x6340[84]+ _0xde12x1e[_0x6340[67]][_0x6340[83]]+ _0x6340[84]};return _0xde12x37})})};_0xde12x2a= _[_0x6340[82]]({},_0xde12x2a,_0xde12x1e[_0x6340[86]]);return _0xde12x3d[_0x6340[101]](_0xde12x2a)}})[_0x6340[40]](function(_0xde12x3e){if(_0xde12x3e){_0xde12x2b= _0xde12x3e[_0x6340[73]];if(!_0xde12x1e[_0x6340[67]][_0x6340[75]](_0x6340[74])){_0xde12x2a[_0x6340[48]]= qs[_0x6340[48]](_0xde12x1e[_0x6340[67]][_0x6340[48]]);_0xde12x2a[_0x6340[47]]= qs[_0x6340[47]](_0xde12x1e[_0x6340[67]][_0x6340[47]])};return _0xde12x3d[_0x6340[101]](_0xde12x2a)}})[_0x6340[40]](function(_0xde12x3b){if(_0xde12x3b){return _0xde12x3b?{count:_0xde12x2b,rows:_0xde12x3b}:null}})[_0x6340[40]](respondWithResult(_0xde12x27,null))[_0x6340[31]](handleError(_0xde12x27,null))}
\ No newline at end of file
index df5e36f..c80687d 100644 (file)
@@ -1 +1 @@
-var _0x60d1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x69\x6E\x74\x5F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x60d1[0];var _=require(_0x60d1[1]);var util=require(_0x60d1[2]);var logger=require(_0x60d1[4])(_0x60d1[3]);var moment=require(_0x60d1[5]);var BPromise=require(_0x60d1[6]);var rp=require(_0x60d1[7]);var attributes=require(_0x60d1[8]);module[_0x60d1[9]]= function(_0x82f2x8,_0x82f2x9){return _0x82f2x8[_0x60d1[12]](_0x60d1[10],attributes,{tableName:_0x60d1[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x52a6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x69\x6E\x74\x5F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x52a6[0];var _=require(_0x52a6[1]);var util=require(_0x52a6[2]);var logger=require(_0x52a6[4])(_0x52a6[3]);var moment=require(_0x52a6[5]);var BPromise=require(_0x52a6[6]);var rp=require(_0x52a6[7]);var attributes=require(_0x52a6[8]);module[_0x52a6[9]]= function(_0xb8b0x8,_0xb8b0x9){return _0xb8b0x8[_0x52a6[12]](_0x52a6[10],attributes,{tableName:_0x52a6[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index f1a9115..20c8fae 100644 (file)
@@ -1 +1 @@
-var _0x9b18=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x9b18[0];var _=require(_0x9b18[1]);var util=require(_0x9b18[2]);var moment=require(_0x9b18[3]);var BPromise=require(_0x9b18[4]);var rs=require(_0x9b18[5]);var fs=require(_0x9b18[6]);var db=require(_0x9b18[8])[_0x9b18[7]];var utils=require(_0x9b18[9]);var logger=require(_0x9b18[11])(_0x9b18[10]);var config=require(_0x9b18[12]);var jayson=require(_0x9b18[13]);var client=jayson[_0x9b18[15]][_0x9b18[14]]({port:9002});function respondWithRpcPromise(_0x1099xe,_0x1099xf,_0x1099x10){return  new BPromise(function(_0x1099x11,_0x1099x12){return client[_0x9b18[28]](_0x1099xe,_0x1099x10)[_0x9b18[27]](function(_0x1099x14){logger[_0x9b18[20]](_0x9b18[16],_0x1099xf,_0x9b18[19]);logger[_0x9b18[23]](_0x9b18[21],_0x1099xf,_0x9b18[19],JSON[_0x9b18[22]](_0x1099x14));if(_0x1099x14[_0x9b18[17]]){if(_0x1099x14[_0x9b18[17]][_0x9b18[24]]=== 500){logger[_0x9b18[17]](_0x9b18[16],_0x1099xf,_0x1099x14[_0x9b18[17]][_0x9b18[25]]);return _0x1099x12(_0x1099x14[_0x9b18[17]][_0x9b18[25]])};logger[_0x9b18[17]](_0x9b18[16],_0x1099xf,_0x1099x14[_0x9b18[17]][_0x9b18[25]]);return _0x1099x11(_0x1099x14[_0x9b18[17]][_0x9b18[25]])}else {logger[_0x9b18[20]](_0x9b18[16],_0x1099xf,_0x9b18[19]);_0x1099x11(_0x1099x14[_0x9b18[26]][_0x9b18[25]])}})[_0x9b18[18]](function(_0x1099x13){logger[_0x9b18[17]](_0x9b18[16],_0x1099xf,_0x1099x13);_0x1099x12(_0x1099x13)})})}
\ No newline at end of file
+var _0x3447=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x3447[0];var _=require(_0x3447[1]);var util=require(_0x3447[2]);var moment=require(_0x3447[3]);var BPromise=require(_0x3447[4]);var rs=require(_0x3447[5]);var fs=require(_0x3447[6]);var db=require(_0x3447[8])[_0x3447[7]];var utils=require(_0x3447[9]);var logger=require(_0x3447[11])(_0x3447[10]);var config=require(_0x3447[12]);var jayson=require(_0x3447[13]);var client=jayson[_0x3447[15]][_0x3447[14]]({port:9002});function respondWithRpcPromise(_0x7d17xe,_0x7d17xf,_0x7d17x10){return  new BPromise(function(_0x7d17x11,_0x7d17x12){return client[_0x3447[28]](_0x7d17xe,_0x7d17x10)[_0x3447[27]](function(_0x7d17x14){logger[_0x3447[20]](_0x3447[16],_0x7d17xf,_0x3447[19]);logger[_0x3447[23]](_0x3447[21],_0x7d17xf,_0x3447[19],JSON[_0x3447[22]](_0x7d17x14));if(_0x7d17x14[_0x3447[17]]){if(_0x7d17x14[_0x3447[17]][_0x3447[24]]=== 500){logger[_0x3447[17]](_0x3447[16],_0x7d17xf,_0x7d17x14[_0x3447[17]][_0x3447[25]]);return _0x7d17x12(_0x7d17x14[_0x3447[17]][_0x3447[25]])};logger[_0x3447[17]](_0x3447[16],_0x7d17xf,_0x7d17x14[_0x3447[17]][_0x3447[25]]);return _0x7d17x11(_0x7d17x14[_0x3447[17]][_0x3447[25]])}else {logger[_0x3447[20]](_0x3447[16],_0x7d17xf,_0x3447[19]);_0x7d17x11(_0x7d17x14[_0x3447[26]][_0x3447[25]])}})[_0x3447[18]](function(_0x7d17x13){logger[_0x3447[17]](_0x3447[16],_0x7d17xf,_0x7d17x13);_0x7d17x12(_0x7d17x13)})})}
\ No newline at end of file
index 8fee876..cdd0653 100644 (file)
@@ -1 +1 @@
-var _0xa3af=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xa3af[0];var multer=require(_0xa3af[1]);var util=require(_0xa3af[2]);var path=require(_0xa3af[3]);var express=require(_0xa3af[4]);var router=express.Router();var auth=require(_0xa3af[5]);var interaction=require(_0xa3af[6]);var config=require(_0xa3af[7]);var controller=require(_0xa3af[8]);router[_0xa3af[12]](_0xa3af[9],auth[_0xa3af[10]](),controller[_0xa3af[11]]);router[_0xa3af[12]](_0xa3af[13],auth[_0xa3af[10]](),controller[_0xa3af[14]]);router[_0xa3af[16]](_0xa3af[9],auth[_0xa3af[10]](),controller[_0xa3af[15]]);router[_0xa3af[18]](_0xa3af[13],auth[_0xa3af[10]](),controller[_0xa3af[17]]);router[_0xa3af[20]](_0xa3af[13],auth[_0xa3af[10]](),controller[_0xa3af[19]]);module[_0xa3af[21]]= router
\ No newline at end of file
+var _0xd882=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xd882[0];var multer=require(_0xd882[1]);var util=require(_0xd882[2]);var path=require(_0xd882[3]);var express=require(_0xd882[4]);var router=express.Router();var auth=require(_0xd882[5]);var interaction=require(_0xd882[6]);var config=require(_0xd882[7]);var controller=require(_0xd882[8]);router[_0xd882[12]](_0xd882[9],auth[_0xd882[10]](),controller[_0xd882[11]]);router[_0xd882[12]](_0xd882[13],auth[_0xd882[10]](),controller[_0xd882[14]]);router[_0xd882[16]](_0xd882[9],auth[_0xd882[10]](),controller[_0xd882[15]]);router[_0xd882[18]](_0xd882[13],auth[_0xd882[10]](),controller[_0xd882[17]]);router[_0xd882[20]](_0xd882[13],auth[_0xd882[10]](),controller[_0xd882[19]]);module[_0xd882[21]]= router
\ No newline at end of file
index 659a9bd..4065322 100644 (file)
@@ -1 +1 @@
-var _0x4c1d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x73\x74\x72\x69\x6E\x67","\x76\x61\x72\x69\x61\x62\x6C\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x4c1d[0];var Sequelize=require(_0x4c1d[1]);module[_0x4c1d[2]]= {type:{type:Sequelize.ENUM(_0x4c1d[3],_0x4c1d[4],_0x4c1d[5],_0x4c1d[6]),defaultValue:_0x4c1d[3]},content:{type:Sequelize[_0x4c1d[7]]},key:{type:Sequelize[_0x4c1d[7]]},keyType:{type:Sequelize.ENUM(_0x4c1d[3],_0x4c1d[4],_0x4c1d[5])},keyContent:{type:Sequelize[_0x4c1d[7]]},idField:{type:Sequelize[_0x4c1d[7]]},nameField:{type:Sequelize[_0x4c1d[7]]},customField:{type:Sequelize[_0x4c1d[8]],defaultValue:true},variableName:{type:Sequelize[_0x4c1d[7]]}}
\ No newline at end of file
+var _0xbf99=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x73\x74\x72\x69\x6E\x67","\x76\x61\x72\x69\x61\x62\x6C\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0xbf99[0];var Sequelize=require(_0xbf99[1]);module[_0xbf99[2]]= {type:{type:Sequelize.ENUM(_0xbf99[3],_0xbf99[4],_0xbf99[5],_0xbf99[6]),defaultValue:_0xbf99[3]},content:{type:Sequelize[_0xbf99[7]]},key:{type:Sequelize[_0xbf99[7]]},keyType:{type:Sequelize.ENUM(_0xbf99[3],_0xbf99[4],_0xbf99[5])},keyContent:{type:Sequelize[_0xbf99[7]]},idField:{type:Sequelize[_0xbf99[7]]},nameField:{type:Sequelize[_0xbf99[7]]},customField:{type:Sequelize[_0xbf99[8]],defaultValue:true},variableName:{type:Sequelize[_0xbf99[7]]}}
\ No newline at end of file
index 70b48e2..216aa52 100644 (file)
@@ -1 +1 @@
-var _0x2f40=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x2f40[0];var jsonpatch=require(_0x2f40[1]);var rp=require(_0x2f40[2]);var moment=require(_0x2f40[3]);var BPromise=require(_0x2f40[4]);var Mustache=require(_0x2f40[5]);var util=require(_0x2f40[6]);var path=require(_0x2f40[7]);var sox=require(_0x2f40[8]);var csv=require(_0x2f40[9]);var ejs=require(_0x2f40[10]);var fs=require(_0x2f40[11]);var _=require(_0x2f40[12]);var squel=require(_0x2f40[13]);var crypto=require(_0x2f40[14]);var jsforce=require(_0x2f40[15]);var deskjs=require(_0x2f40[16]);var toCsv=require(_0x2f40[9]);var querystring=require(_0x2f40[17]);var Papa=require(_0x2f40[18]);var qs=require(_0x2f40[19]);var logger=require(_0x2f40[21])(_0x2f40[20]);var utils=require(_0x2f40[22]);var config=require(_0x2f40[23]);var db=require(_0x2f40[25])[_0x2f40[24]];function respondWithStatusCode(_0x88bbx1a,_0x88bbx1b){_0x88bbx1b= _0x88bbx1b|| 204;return function(_0x88bbx1c){if(_0x88bbx1c){return _0x88bbx1a[_0x2f40[26]](_0x88bbx1b)};return _0x88bbx1a[_0x2f40[28]](_0x88bbx1b)[_0x2f40[27]]()}}function respondWithResult(_0x88bbx1a,_0x88bbx1b){_0x88bbx1b= _0x88bbx1b|| 200;return function(_0x88bbx1c){if(_0x88bbx1c){return _0x88bbx1a[_0x2f40[28]](_0x88bbx1b)[_0x2f40[29]](_0x88bbx1c)}}}function respondWithFilteredResult(_0x88bbx1a,_0x88bbx1f){return function(_0x88bbx1c){if(_0x88bbx1c){var _0x88bbx20=_0x88bbx1c[_0x2f40[30]],_0x88bbx21=_0x88bbx1f[_0x2f40[31]],_0x88bbx22=_0x88bbx1f[_0x2f40[31]]+ _0x88bbx1f[_0x2f40[32]],_0x88bbx1b;if(_0x88bbx22>= _0x88bbx20){_0x88bbx22= _0x88bbx20;_0x88bbx1b= 200}else {_0x88bbx1b= 206};_0x88bbx1a[_0x2f40[28]](_0x88bbx1b);return _0x88bbx1a[_0x2f40[36]](_0x2f40[33],_0x88bbx21+ _0x2f40[34]+ _0x88bbx22+ _0x2f40[35]+ _0x88bbx20)[_0x2f40[29]](_0x88bbx1c)};return null}}function patchUpdates(_0x88bbx24){return function(_0x88bbx1c){try{jsonpatch[_0x2f40[37]](_0x88bbx1c,_0x88bbx24,true)}catch(err){return BPromise[_0x2f40[38]](err)};return _0x88bbx1c[_0x2f40[39]]()}}function saveUpdates(_0x88bbx26,_0x88bbx1b){return function(_0x88bbx1c){if(_0x88bbx1c){return _0x88bbx1c[_0x2f40[41]](_0x88bbx26)[_0x2f40[40]](function(_0x88bbx27){return _0x88bbx27})};return null}}function removeEntity(_0x88bbx1a,_0x88bbx1b){return function(_0x88bbx1c){if(_0x88bbx1c){return _0x88bbx1c[_0x2f40[42]]()[_0x2f40[40]](function(){_0x88bbx1a[_0x2f40[28]](204)[_0x2f40[27]]()})}}}function handleEntityNotFound(_0x88bbx1a,_0x88bbx1b){return function(_0x88bbx1c){if(!_0x88bbx1c){_0x88bbx1a[_0x2f40[26]](404)};return _0x88bbx1c}}function handleError(_0x88bbx1a,_0x88bbx1b){_0x88bbx1b= _0x88bbx1b|| 500;return function(_0x88bbx2b){logger[_0x2f40[44]](_0x88bbx2b[_0x2f40[43]]);if(_0x88bbx2b[_0x2f40[45]]){delete _0x88bbx2b[_0x2f40[45]]};_0x88bbx1a[_0x2f40[28]](_0x88bbx1b)[_0x2f40[46]](_0x88bbx2b)}}exports[_0x2f40[47]]= function(_0x88bbx2c,_0x88bbx1a){var _0x88bbx1f={},_0x88bbx2d={},_0x88bbx2e={count:0,rows:[]};_0x88bbx2d[_0x2f40[48]]= _[_0x2f40[51]](db[_0x2f40[50]][_0x2f40[49]]);var _0x88bbx2f={dateStart:_0x88bbx2c[_0x2f40[53]][_0x2f40[52]],dateEnd:_0x88bbx2c[_0x2f40[53]][_0x2f40[54]]};delete _0x88bbx2c[_0x2f40[53]][_0x2f40[52]];delete _0x88bbx2c[_0x2f40[53]][_0x2f40[54]];_0x88bbx2d[_0x2f40[53]]= _[_0x2f40[51]](_0x88bbx2c[_0x2f40[53]]);_0x88bbx2d[_0x2f40[55]]= _[_0x2f40[56]](_0x88bbx2d[_0x2f40[48]],_0x88bbx2d[_0x2f40[53]]);_0x88bbx1f[_0x2f40[57]]= _[_0x2f40[56]](_0x88bbx2d[_0x2f40[48]],qs[_0x2f40[58]](_0x88bbx2c[_0x2f40[53]][_0x2f40[58]]));_0x88bbx1f[_0x2f40[57]]= (_0x88bbx1f[_0x2f40[57]][_0x2f40[59]])?_0x88bbx1f[_0x2f40[57]]:_0x88bbx2d[_0x2f40[48]];if(!_0x88bbx2c[_0x2f40[53]][_0x2f40[61]](_0x2f40[60])){_0x88bbx1f[_0x2f40[32]]= qs[_0x2f40[32]](_0x88bbx2c[_0x2f40[53]][_0x2f40[32]]);_0x88bbx1f[_0x2f40[31]]= qs[_0x2f40[31]](_0x88bbx2c[_0x2f40[53]][_0x2f40[31]])};_0x88bbx1f[_0x2f40[62]]= qs[_0x2f40[63]](_0x88bbx2c[_0x2f40[53]][_0x2f40[63]]);_0x88bbx1f[_0x2f40[64]]= qs[_0x2f40[55]](_[_0x2f40[65]](_0x88bbx2c[_0x2f40[53]],_0x88bbx2d[_0x2f40[55]]));if(_0x88bbx2f[_0x2f40[52]]){if(_0x88bbx2f[_0x2f40[54]]){_0x88bbx2f[_0x2f40[54]]= moment(_0x88bbx2f[_0x2f40[54]])[_0x2f40[67]](1,_0x2f40[66])}else {_0x88bbx2f[_0x2f40[54]]= moment(_0x88bbx2f[_0x2f40[52]])[_0x2f40[67]](1,_0x2f40[66])};_[_0x2f40[68]](_0x88bbx1f[_0x2f40[64]],{createdAt:{$gte:_0x88bbx2f[_0x2f40[52]],$lte:_0x88bbx2f[_0x2f40[54]]}})};if(_0x88bbx2c[_0x2f40[53]][_0x2f40[69]]){_0x88bbx1f[_0x2f40[64]]= _[_0x2f40[68]](_0x88bbx1f[_0x2f40[64]],{$or:_[_0x2f40[71]](_0x88bbx1f[_0x2f40[57]],function(_0x88bbx30){var _0x88bbx2e={};_0x88bbx2e[_0x88bbx30]= {$like:_0x2f40[70]+ _0x88bbx2c[_0x2f40[53]][_0x2f40[69]]+ _0x2f40[70]};return _0x88bbx2e})})};_0x88bbx1f= _[_0x2f40[68]]({},_0x88bbx1f,_0x88bbx2c[_0x2f40[72]]);var _0x88bbx31={where:_0x88bbx1f[_0x2f40[64]]};return db[_0x2f40[50]][_0x2f40[30]](_0x88bbx31)[_0x2f40[40]](function(_0x88bbx20){_0x88bbx2e[_0x2f40[30]]= _0x88bbx20;if(_0x88bbx2c[_0x2f40[53]][_0x2f40[75]]){_0x88bbx1f[_0x2f40[76]]= [{all:true}]};return db[_0x2f40[50]][_0x2f40[77]](_0x88bbx1f)})[_0x2f40[40]](function(_0x88bbx32){_0x88bbx2e[_0x2f40[74]]= _0x88bbx32;return _0x88bbx2e})[_0x2f40[40]](respondWithFilteredResult(_0x88bbx1a,_0x88bbx1f))[_0x2f40[73]](handleError(_0x88bbx1a,null))};exports[_0x2f40[78]]= function(_0x88bbx2c,_0x88bbx1a){var _0x88bbx1f={raw:true,where:{id:_0x88bbx2c[_0x2f40[80]][_0x2f40[79]]}},_0x88bbx2d={};_0x88bbx2d[_0x2f40[48]]= _[_0x2f40[51]](db[_0x2f40[50]][_0x2f40[49]]);_0x88bbx2d[_0x2f40[53]]= _[_0x2f40[51]](_0x88bbx2c[_0x2f40[53]]);_0x88bbx2d[_0x2f40[55]]= _[_0x2f40[56]](_0x88bbx2d[_0x2f40[48]],_0x88bbx2d[_0x2f40[53]]);_0x88bbx1f[_0x2f40[57]]= _[_0x2f40[56]](_0x88bbx2d[_0x2f40[48]],qs[_0x2f40[58]](_0x88bbx2c[_0x2f40[53]][_0x2f40[58]]));_0x88bbx1f[_0x2f40[57]]= (_0x88bbx1f[_0x2f40[57]][_0x2f40[59]])?_0x88bbx1f[_0x2f40[57]]:_0x88bbx2d[_0x2f40[48]];if(_0x88bbx2c[_0x2f40[53]][_0x2f40[75]]){_0x88bbx1f[_0x2f40[76]]= [{all:true}]};_0x88bbx1f= _[_0x2f40[68]]({},_0x88bbx1f,_0x88bbx2c[_0x2f40[72]]);return db[_0x2f40[50]][_0x2f40[81]](_0x88bbx1f)[_0x2f40[40]](handleEntityNotFound(_0x88bbx1a,null))[_0x2f40[40]](respondWithResult(_0x88bbx1a,null))[_0x2f40[73]](handleError(_0x88bbx1a,null))};exports[_0x2f40[82]]= function(_0x88bbx2c,_0x88bbx1a){return db[_0x2f40[50]][_0x2f40[82]](_0x88bbx2c[_0x2f40[83]],{})[_0x2f40[40]](respondWithResult(_0x88bbx1a,201))[_0x2f40[73]](handleError(_0x88bbx1a,null))};exports[_0x2f40[41]]= function(_0x88bbx2c,_0x88bbx1a){if(_0x88bbx2c[_0x2f40[83]][_0x2f40[79]]){delete _0x88bbx2c[_0x2f40[83]][_0x2f40[79]]};return db[_0x2f40[50]][_0x2f40[81]]({where:{id:_0x88bbx2c[_0x2f40[80]][_0x2f40[79]]}})[_0x2f40[40]](handleEntityNotFound(_0x88bbx1a,null))[_0x2f40[40]](saveUpdates(_0x88bbx2c[_0x2f40[83]],null))[_0x2f40[40]](respondWithResult(_0x88bbx1a,null))[_0x2f40[73]](handleError(_0x88bbx1a,null))};exports[_0x2f40[42]]= function(_0x88bbx2c,_0x88bbx1a){return db[_0x2f40[50]][_0x2f40[81]]({where:{id:_0x88bbx2c[_0x2f40[80]][_0x2f40[79]]}})[_0x2f40[40]](handleEntityNotFound(_0x88bbx1a,null))[_0x2f40[40]](removeEntity(_0x88bbx1a,null))[_0x2f40[73]](handleError(_0x88bbx1a,null))}
\ No newline at end of file
+var _0xa72b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xa72b[0];var jsonpatch=require(_0xa72b[1]);var rp=require(_0xa72b[2]);var moment=require(_0xa72b[3]);var BPromise=require(_0xa72b[4]);var Mustache=require(_0xa72b[5]);var util=require(_0xa72b[6]);var path=require(_0xa72b[7]);var sox=require(_0xa72b[8]);var csv=require(_0xa72b[9]);var ejs=require(_0xa72b[10]);var fs=require(_0xa72b[11]);var _=require(_0xa72b[12]);var squel=require(_0xa72b[13]);var crypto=require(_0xa72b[14]);var jsforce=require(_0xa72b[15]);var deskjs=require(_0xa72b[16]);var toCsv=require(_0xa72b[9]);var querystring=require(_0xa72b[17]);var Papa=require(_0xa72b[18]);var qs=require(_0xa72b[19]);var logger=require(_0xa72b[21])(_0xa72b[20]);var utils=require(_0xa72b[22]);var config=require(_0xa72b[23]);var db=require(_0xa72b[25])[_0xa72b[24]];function respondWithStatusCode(_0xb01fx1a,_0xb01fx1b){_0xb01fx1b= _0xb01fx1b|| 204;return function(_0xb01fx1c){if(_0xb01fx1c){return _0xb01fx1a[_0xa72b[26]](_0xb01fx1b)};return _0xb01fx1a[_0xa72b[28]](_0xb01fx1b)[_0xa72b[27]]()}}function respondWithResult(_0xb01fx1a,_0xb01fx1b){_0xb01fx1b= _0xb01fx1b|| 200;return function(_0xb01fx1c){if(_0xb01fx1c){return _0xb01fx1a[_0xa72b[28]](_0xb01fx1b)[_0xa72b[29]](_0xb01fx1c)}}}function respondWithFilteredResult(_0xb01fx1a,_0xb01fx1f){return function(_0xb01fx1c){if(_0xb01fx1c){var _0xb01fx20=_0xb01fx1c[_0xa72b[30]],_0xb01fx21=_0xb01fx1f[_0xa72b[31]],_0xb01fx22=_0xb01fx1f[_0xa72b[31]]+ _0xb01fx1f[_0xa72b[32]],_0xb01fx1b;if(_0xb01fx22>= _0xb01fx20){_0xb01fx22= _0xb01fx20;_0xb01fx1b= 200}else {_0xb01fx1b= 206};_0xb01fx1a[_0xa72b[28]](_0xb01fx1b);return _0xb01fx1a[_0xa72b[36]](_0xa72b[33],_0xb01fx21+ _0xa72b[34]+ _0xb01fx22+ _0xa72b[35]+ _0xb01fx20)[_0xa72b[29]](_0xb01fx1c)};return null}}function patchUpdates(_0xb01fx24){return function(_0xb01fx1c){try{jsonpatch[_0xa72b[37]](_0xb01fx1c,_0xb01fx24,true)}catch(err){return BPromise[_0xa72b[38]](err)};return _0xb01fx1c[_0xa72b[39]]()}}function saveUpdates(_0xb01fx26,_0xb01fx1b){return function(_0xb01fx1c){if(_0xb01fx1c){return _0xb01fx1c[_0xa72b[41]](_0xb01fx26)[_0xa72b[40]](function(_0xb01fx27){return _0xb01fx27})};return null}}function removeEntity(_0xb01fx1a,_0xb01fx1b){return function(_0xb01fx1c){if(_0xb01fx1c){return _0xb01fx1c[_0xa72b[42]]()[_0xa72b[40]](function(){_0xb01fx1a[_0xa72b[28]](204)[_0xa72b[27]]()})}}}function handleEntityNotFound(_0xb01fx1a,_0xb01fx1b){return function(_0xb01fx1c){if(!_0xb01fx1c){_0xb01fx1a[_0xa72b[26]](404)};return _0xb01fx1c}}function handleError(_0xb01fx1a,_0xb01fx1b){_0xb01fx1b= _0xb01fx1b|| 500;return function(_0xb01fx2b){logger[_0xa72b[44]](_0xb01fx2b[_0xa72b[43]]);if(_0xb01fx2b[_0xa72b[45]]){delete _0xb01fx2b[_0xa72b[45]]};_0xb01fx1a[_0xa72b[28]](_0xb01fx1b)[_0xa72b[46]](_0xb01fx2b)}}exports[_0xa72b[47]]= function(_0xb01fx2c,_0xb01fx1a){var _0xb01fx1f={},_0xb01fx2d={},_0xb01fx2e={count:0,rows:[]};_0xb01fx2d[_0xa72b[48]]= _[_0xa72b[51]](db[_0xa72b[50]][_0xa72b[49]]);var _0xb01fx2f={dateStart:_0xb01fx2c[_0xa72b[53]][_0xa72b[52]],dateEnd:_0xb01fx2c[_0xa72b[53]][_0xa72b[54]]};delete _0xb01fx2c[_0xa72b[53]][_0xa72b[52]];delete _0xb01fx2c[_0xa72b[53]][_0xa72b[54]];_0xb01fx2d[_0xa72b[53]]= _[_0xa72b[51]](_0xb01fx2c[_0xa72b[53]]);_0xb01fx2d[_0xa72b[55]]= _[_0xa72b[56]](_0xb01fx2d[_0xa72b[48]],_0xb01fx2d[_0xa72b[53]]);_0xb01fx1f[_0xa72b[57]]= _[_0xa72b[56]](_0xb01fx2d[_0xa72b[48]],qs[_0xa72b[58]](_0xb01fx2c[_0xa72b[53]][_0xa72b[58]]));_0xb01fx1f[_0xa72b[57]]= (_0xb01fx1f[_0xa72b[57]][_0xa72b[59]])?_0xb01fx1f[_0xa72b[57]]:_0xb01fx2d[_0xa72b[48]];if(!_0xb01fx2c[_0xa72b[53]][_0xa72b[61]](_0xa72b[60])){_0xb01fx1f[_0xa72b[32]]= qs[_0xa72b[32]](_0xb01fx2c[_0xa72b[53]][_0xa72b[32]]);_0xb01fx1f[_0xa72b[31]]= qs[_0xa72b[31]](_0xb01fx2c[_0xa72b[53]][_0xa72b[31]])};_0xb01fx1f[_0xa72b[62]]= qs[_0xa72b[63]](_0xb01fx2c[_0xa72b[53]][_0xa72b[63]]);_0xb01fx1f[_0xa72b[64]]= qs[_0xa72b[55]](_[_0xa72b[65]](_0xb01fx2c[_0xa72b[53]],_0xb01fx2d[_0xa72b[55]]));if(_0xb01fx2f[_0xa72b[52]]){if(_0xb01fx2f[_0xa72b[54]]){_0xb01fx2f[_0xa72b[54]]= moment(_0xb01fx2f[_0xa72b[54]])[_0xa72b[67]](1,_0xa72b[66])}else {_0xb01fx2f[_0xa72b[54]]= moment(_0xb01fx2f[_0xa72b[52]])[_0xa72b[67]](1,_0xa72b[66])};_[_0xa72b[68]](_0xb01fx1f[_0xa72b[64]],{createdAt:{$gte:_0xb01fx2f[_0xa72b[52]],$lte:_0xb01fx2f[_0xa72b[54]]}})};if(_0xb01fx2c[_0xa72b[53]][_0xa72b[69]]){_0xb01fx1f[_0xa72b[64]]= _[_0xa72b[68]](_0xb01fx1f[_0xa72b[64]],{$or:_[_0xa72b[71]](_0xb01fx1f[_0xa72b[57]],function(_0xb01fx30){var _0xb01fx2e={};_0xb01fx2e[_0xb01fx30]= {$like:_0xa72b[70]+ _0xb01fx2c[_0xa72b[53]][_0xa72b[69]]+ _0xa72b[70]};return _0xb01fx2e})})};_0xb01fx1f= _[_0xa72b[68]]({},_0xb01fx1f,_0xb01fx2c[_0xa72b[72]]);var _0xb01fx31={where:_0xb01fx1f[_0xa72b[64]]};return db[_0xa72b[50]][_0xa72b[30]](_0xb01fx31)[_0xa72b[40]](function(_0xb01fx20){_0xb01fx2e[_0xa72b[30]]= _0xb01fx20;if(_0xb01fx2c[_0xa72b[53]][_0xa72b[75]]){_0xb01fx1f[_0xa72b[76]]= [{all:true}]};return db[_0xa72b[50]][_0xa72b[77]](_0xb01fx1f)})[_0xa72b[40]](function(_0xb01fx32){_0xb01fx2e[_0xa72b[74]]= _0xb01fx32;return _0xb01fx2e})[_0xa72b[40]](respondWithFilteredResult(_0xb01fx1a,_0xb01fx1f))[_0xa72b[73]](handleError(_0xb01fx1a,null))};exports[_0xa72b[78]]= function(_0xb01fx2c,_0xb01fx1a){var _0xb01fx1f={raw:true,where:{id:_0xb01fx2c[_0xa72b[80]][_0xa72b[79]]}},_0xb01fx2d={};_0xb01fx2d[_0xa72b[48]]= _[_0xa72b[51]](db[_0xa72b[50]][_0xa72b[49]]);_0xb01fx2d[_0xa72b[53]]= _[_0xa72b[51]](_0xb01fx2c[_0xa72b[53]]);_0xb01fx2d[_0xa72b[55]]= _[_0xa72b[56]](_0xb01fx2d[_0xa72b[48]],_0xb01fx2d[_0xa72b[53]]);_0xb01fx1f[_0xa72b[57]]= _[_0xa72b[56]](_0xb01fx2d[_0xa72b[48]],qs[_0xa72b[58]](_0xb01fx2c[_0xa72b[53]][_0xa72b[58]]));_0xb01fx1f[_0xa72b[57]]= (_0xb01fx1f[_0xa72b[57]][_0xa72b[59]])?_0xb01fx1f[_0xa72b[57]]:_0xb01fx2d[_0xa72b[48]];if(_0xb01fx2c[_0xa72b[53]][_0xa72b[75]]){_0xb01fx1f[_0xa72b[76]]= [{all:true}]};_0xb01fx1f= _[_0xa72b[68]]({},_0xb01fx1f,_0xb01fx2c[_0xa72b[72]]);return db[_0xa72b[50]][_0xa72b[81]](_0xb01fx1f)[_0xa72b[40]](handleEntityNotFound(_0xb01fx1a,null))[_0xa72b[40]](respondWithResult(_0xb01fx1a,null))[_0xa72b[73]](handleError(_0xb01fx1a,null))};exports[_0xa72b[82]]= function(_0xb01fx2c,_0xb01fx1a){return db[_0xa72b[50]][_0xa72b[82]](_0xb01fx2c[_0xa72b[83]],{})[_0xa72b[40]](respondWithResult(_0xb01fx1a,201))[_0xa72b[73]](handleError(_0xb01fx1a,null))};exports[_0xa72b[41]]= function(_0xb01fx2c,_0xb01fx1a){if(_0xb01fx2c[_0xa72b[83]][_0xa72b[79]]){delete _0xb01fx2c[_0xa72b[83]][_0xa72b[79]]};return db[_0xa72b[50]][_0xa72b[81]]({where:{id:_0xb01fx2c[_0xa72b[80]][_0xa72b[79]]}})[_0xa72b[40]](handleEntityNotFound(_0xb01fx1a,null))[_0xa72b[40]](saveUpdates(_0xb01fx2c[_0xa72b[83]],null))[_0xa72b[40]](respondWithResult(_0xb01fx1a,null))[_0xa72b[73]](handleError(_0xb01fx1a,null))};exports[_0xa72b[42]]= function(_0xb01fx2c,_0xb01fx1a){return db[_0xa72b[50]][_0xa72b[81]]({where:{id:_0xb01fx2c[_0xa72b[80]][_0xa72b[79]]}})[_0xa72b[40]](handleEntityNotFound(_0xb01fx1a,null))[_0xa72b[40]](removeEntity(_0xb01fx1a,null))[_0xa72b[73]](handleError(_0xb01fx1a,null))}
\ No newline at end of file
index 3404170..ab26829 100644 (file)
@@ -1 +1 @@
-var _0x60cb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x69\x6E\x74\x5F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0x60cb[0];var _=require(_0x60cb[1]);var util=require(_0x60cb[2]);var logger=require(_0x60cb[4])(_0x60cb[3]);var moment=require(_0x60cb[5]);var BPromise=require(_0x60cb[6]);var rp=require(_0x60cb[7]);var attributes=require(_0x60cb[8]);module[_0x60cb[9]]= function(_0x1680x8,_0x1680x9){return _0x1680x8[_0x60cb[12]](_0x60cb[10],attributes,{tableName:_0x60cb[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x258e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x69\x6E\x74\x5F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0x258e[0];var _=require(_0x258e[1]);var util=require(_0x258e[2]);var logger=require(_0x258e[4])(_0x258e[3]);var moment=require(_0x258e[5]);var BPromise=require(_0x258e[6]);var rp=require(_0x258e[7]);var attributes=require(_0x258e[8]);module[_0x258e[9]]= function(_0x2644x8,_0x2644x9){return _0x2644x8[_0x258e[12]](_0x258e[10],attributes,{tableName:_0x258e[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index c64b785..be9e414 100644 (file)
@@ -1 +1 @@
-var _0xa51c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xa51c[0];var _=require(_0xa51c[1]);var util=require(_0xa51c[2]);var moment=require(_0xa51c[3]);var BPromise=require(_0xa51c[4]);var rs=require(_0xa51c[5]);var fs=require(_0xa51c[6]);var db=require(_0xa51c[8])[_0xa51c[7]];var utils=require(_0xa51c[9]);var logger=require(_0xa51c[11])(_0xa51c[10]);var config=require(_0xa51c[12]);var jayson=require(_0xa51c[13]);var client=jayson[_0xa51c[15]][_0xa51c[14]]({port:9002});function respondWithRpcPromise(_0xf93dxe,_0xf93dxf,_0xf93dx10){return  new BPromise(function(_0xf93dx11,_0xf93dx12){return client[_0xa51c[28]](_0xf93dxe,_0xf93dx10)[_0xa51c[27]](function(_0xf93dx14){logger[_0xa51c[20]](_0xa51c[16],_0xf93dxf,_0xa51c[19]);logger[_0xa51c[23]](_0xa51c[21],_0xf93dxf,_0xa51c[19],JSON[_0xa51c[22]](_0xf93dx14));if(_0xf93dx14[_0xa51c[17]]){if(_0xf93dx14[_0xa51c[17]][_0xa51c[24]]=== 500){logger[_0xa51c[17]](_0xa51c[16],_0xf93dxf,_0xf93dx14[_0xa51c[17]][_0xa51c[25]]);return _0xf93dx12(_0xf93dx14[_0xa51c[17]][_0xa51c[25]])};logger[_0xa51c[17]](_0xa51c[16],_0xf93dxf,_0xf93dx14[_0xa51c[17]][_0xa51c[25]]);return _0xf93dx11(_0xf93dx14[_0xa51c[17]][_0xa51c[25]])}else {logger[_0xa51c[20]](_0xa51c[16],_0xf93dxf,_0xa51c[19]);_0xf93dx11(_0xf93dx14[_0xa51c[26]][_0xa51c[25]])}})[_0xa51c[18]](function(_0xf93dx13){logger[_0xa51c[17]](_0xa51c[16],_0xf93dxf,_0xf93dx13);_0xf93dx12(_0xf93dx13)})})}
\ No newline at end of file
+var _0xe4ed=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xe4ed[0];var _=require(_0xe4ed[1]);var util=require(_0xe4ed[2]);var moment=require(_0xe4ed[3]);var BPromise=require(_0xe4ed[4]);var rs=require(_0xe4ed[5]);var fs=require(_0xe4ed[6]);var db=require(_0xe4ed[8])[_0xe4ed[7]];var utils=require(_0xe4ed[9]);var logger=require(_0xe4ed[11])(_0xe4ed[10]);var config=require(_0xe4ed[12]);var jayson=require(_0xe4ed[13]);var client=jayson[_0xe4ed[15]][_0xe4ed[14]]({port:9002});function respondWithRpcPromise(_0xf384xe,_0xf384xf,_0xf384x10){return  new BPromise(function(_0xf384x11,_0xf384x12){return client[_0xe4ed[28]](_0xf384xe,_0xf384x10)[_0xe4ed[27]](function(_0xf384x14){logger[_0xe4ed[20]](_0xe4ed[16],_0xf384xf,_0xe4ed[19]);logger[_0xe4ed[23]](_0xe4ed[21],_0xf384xf,_0xe4ed[19],JSON[_0xe4ed[22]](_0xf384x14));if(_0xf384x14[_0xe4ed[17]]){if(_0xf384x14[_0xe4ed[17]][_0xe4ed[24]]=== 500){logger[_0xe4ed[17]](_0xe4ed[16],_0xf384xf,_0xf384x14[_0xe4ed[17]][_0xe4ed[25]]);return _0xf384x12(_0xf384x14[_0xe4ed[17]][_0xe4ed[25]])};logger[_0xe4ed[17]](_0xe4ed[16],_0xf384xf,_0xf384x14[_0xe4ed[17]][_0xe4ed[25]]);return _0xf384x11(_0xf384x14[_0xe4ed[17]][_0xe4ed[25]])}else {logger[_0xe4ed[20]](_0xe4ed[16],_0xf384xf,_0xe4ed[19]);_0xf384x11(_0xf384x14[_0xe4ed[26]][_0xe4ed[25]])}})[_0xe4ed[18]](function(_0xf384x13){logger[_0xe4ed[17]](_0xe4ed[16],_0xf384xf,_0xf384x13);_0xf384x12(_0xf384x13)})})}
\ No newline at end of file
index 80bb8a1..2ed2578 100644 (file)
@@ -1 +1 @@
-var _0xdbce=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xdbce[0];var multer=require(_0xdbce[1]);var util=require(_0xdbce[2]);var path=require(_0xdbce[3]);var express=require(_0xdbce[4]);var router=express.Router();var auth=require(_0xdbce[5]);var interaction=require(_0xdbce[6]);var config=require(_0xdbce[7]);var controller=require(_0xdbce[8]);router[_0xdbce[12]](_0xdbce[9],auth[_0xdbce[10]](),controller[_0xdbce[11]]);router[_0xdbce[12]](_0xdbce[13],auth[_0xdbce[10]](),controller[_0xdbce[14]]);router[_0xdbce[12]](_0xdbce[15],auth[_0xdbce[10]](),controller[_0xdbce[16]]);router[_0xdbce[12]](_0xdbce[17],auth[_0xdbce[10]](),controller[_0xdbce[18]]);router[_0xdbce[20]](_0xdbce[9],auth[_0xdbce[10]](),controller[_0xdbce[19]]);router[_0xdbce[20]](_0xdbce[15],auth[_0xdbce[10]](),controller[_0xdbce[21]]);router[_0xdbce[23]](_0xdbce[13],auth[_0xdbce[10]](),controller[_0xdbce[22]]);router[_0xdbce[25]](_0xdbce[13],auth[_0xdbce[10]](),controller[_0xdbce[24]]);module[_0xdbce[26]]= router
\ No newline at end of file
+var _0x3c2e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x3c2e[0];var multer=require(_0x3c2e[1]);var util=require(_0x3c2e[2]);var path=require(_0x3c2e[3]);var express=require(_0x3c2e[4]);var router=express.Router();var auth=require(_0x3c2e[5]);var interaction=require(_0x3c2e[6]);var config=require(_0x3c2e[7]);var controller=require(_0x3c2e[8]);router[_0x3c2e[12]](_0x3c2e[9],auth[_0x3c2e[10]](),controller[_0x3c2e[11]]);router[_0x3c2e[12]](_0x3c2e[13],auth[_0x3c2e[10]](),controller[_0x3c2e[14]]);router[_0x3c2e[12]](_0x3c2e[15],auth[_0x3c2e[10]](),controller[_0x3c2e[16]]);router[_0x3c2e[12]](_0x3c2e[17],auth[_0x3c2e[10]](),controller[_0x3c2e[18]]);router[_0x3c2e[20]](_0x3c2e[9],auth[_0x3c2e[10]](),controller[_0x3c2e[19]]);router[_0x3c2e[20]](_0x3c2e[15],auth[_0x3c2e[10]](),controller[_0x3c2e[21]]);router[_0x3c2e[23]](_0x3c2e[13],auth[_0x3c2e[10]](),controller[_0x3c2e[22]]);router[_0x3c2e[25]](_0x3c2e[13],auth[_0x3c2e[10]](),controller[_0x3c2e[24]]);module[_0x3c2e[26]]= router
\ No newline at end of file
index cf3d173..fa699ea 100644 (file)
@@ -1 +1 @@
-var _0x9597=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x70\x61\x73\x73\x77\x6F\x72\x64","\x74\x6F\x6B\x65\x6E","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x54\x61\x62","\x6E\x65\x77\x54\x61\x62"];_0x9597[0];var Sequelize=require(_0x9597[1]);module[_0x9597[2]]= {name:{type:Sequelize[_0x9597[3]]},description:{type:Sequelize[_0x9597[3]]},username:{type:Sequelize[_0x9597[3]],unique:_0x9597[4]},password:{type:Sequelize[_0x9597[3]]},token:{type:Sequelize[_0x9597[3]]},remoteUri:{type:Sequelize[_0x9597[3]],unique:_0x9597[5]},authType:{type:Sequelize.ENUM(_0x9597[6],_0x9597[7]),defaultValue:_0x9597[6]},serverUrl:{type:Sequelize[_0x9597[3]]},type:{type:Sequelize.ENUM(_0x9597[8],_0x9597[9]),defaultValue:_0x9597[8]}}
\ No newline at end of file
+var _0x1157=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x70\x61\x73\x73\x77\x6F\x72\x64","\x74\x6F\x6B\x65\x6E","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x54\x61\x62","\x6E\x65\x77\x54\x61\x62"];_0x1157[0];var Sequelize=require(_0x1157[1]);module[_0x1157[2]]= {name:{type:Sequelize[_0x1157[3]]},description:{type:Sequelize[_0x1157[3]]},username:{type:Sequelize[_0x1157[3]],unique:_0x1157[4]},password:{type:Sequelize[_0x1157[3]]},token:{type:Sequelize[_0x1157[3]]},remoteUri:{type:Sequelize[_0x1157[3]],unique:_0x1157[5]},authType:{type:Sequelize.ENUM(_0x1157[6],_0x1157[7]),defaultValue:_0x1157[6]},serverUrl:{type:Sequelize[_0x1157[3]]},type:{type:Sequelize.ENUM(_0x1157[8],_0x1157[9]),defaultValue:_0x1157[8]}}
\ No newline at end of file
index 51fdad7..ea5a89c 100644 (file)
@@ -1 +1 @@
-var _0xc41e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x79\x70\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x74\x65\x73\x74","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73","\x73\x75\x62\x6A\x65\x63\x74","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x67\x72\x6F\x75\x70","\x61\x73\x73\x69\x67\x6E\x65\x65","\x74\x69\x63\x6B\x65\x74\x5F\x66\x69\x65\x6C\x64\x73","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x72\x65\x6D\x6F\x76\x65","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x74\x69\x74\x6C\x65","\x73\x79\x73\x74\x65\x6D\x5F\x66\x69\x65\x6C\x64\x5F\x6F\x70\x74\x69\x6F\x6E\x73","\x47\x45\x54","\x25\x73\x25\x73","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x66\x6F\x72\x6D\x61\x74","\x68\x65\x61\x64\x65\x72\x73","\x42\x61\x73\x69\x63\x20\x25\x73","\x62\x61\x73\x65\x36\x34","\x25\x73\x3A\x25\x73","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x25\x73\x2F\x74\x6F\x6B\x65\x6E\x3A\x25\x73","\x74\x6F\x6B\x65\x6E","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E\x20\x74\x79\x70\x65","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x61\x75\x74\x68\x54\x79\x70\x65"];_0xc41e[0];var jsonpatch=require(_0xc41e[1]);var rp=require(_0xc41e[2]);var moment=require(_0xc41e[3]);var BPromise=require(_0xc41e[4]);var Mustache=require(_0xc41e[5]);var util=require(_0xc41e[6]);var path=require(_0xc41e[7]);var sox=require(_0xc41e[8]);var csv=require(_0xc41e[9]);var ejs=require(_0xc41e[10]);var fs=require(_0xc41e[11]);var _=require(_0xc41e[12]);var squel=require(_0xc41e[13]);var crypto=require(_0xc41e[14]);var jsforce=require(_0xc41e[15]);var deskjs=require(_0xc41e[16]);var toCsv=require(_0xc41e[9]);var querystring=require(_0xc41e[17]);var Papa=require(_0xc41e[18]);var qs=require(_0xc41e[19]);var logger=require(_0xc41e[21])(_0xc41e[20]);var utils=require(_0xc41e[22]);var config=require(_0xc41e[23]);var db=require(_0xc41e[25])[_0xc41e[24]];var integrations=require(_0xc41e[26]);var jayson=require(_0xc41e[27]);var client=jayson[_0xc41e[29]][_0xc41e[28]]({port:9002});function respondWithRpcPromise(_0x7490x1d,_0x7490x1e,_0x7490x1f,_0x7490x20){return  new BPromise(function(_0x7490x21,_0x7490x22){var _0x7490x23=(_0x7490x20|| client);return _0x7490x23[_0xc41e[42]](_0x7490x1d,_0x7490x1f)[_0xc41e[41]](function(_0x7490x25){logger[_0xc41e[34]](_0xc41e[30],_0x7490x1e,_0xc41e[33]);logger[_0xc41e[37]](_0xc41e[35],_0x7490x1e,_0xc41e[33],JSON[_0xc41e[36]](_0x7490x25));if(_0x7490x25[_0xc41e[31]]){if(_0x7490x25[_0xc41e[31]][_0xc41e[38]]=== 500){logger[_0xc41e[31]](_0xc41e[30],_0x7490x1e,_0x7490x25[_0xc41e[31]][_0xc41e[39]]);return _0x7490x22(_0x7490x25[_0xc41e[31]][_0xc41e[39]])};logger[_0xc41e[31]](_0xc41e[30],_0x7490x1e,_0x7490x25[_0xc41e[31]][_0xc41e[39]]);return _0x7490x21(_0x7490x25[_0xc41e[31]][_0xc41e[39]])}else {logger[_0xc41e[34]](_0xc41e[30],_0x7490x1e,_0xc41e[33]);_0x7490x21(_0x7490x25[_0xc41e[40]][_0xc41e[39]])}})[_0xc41e[32]](function(_0x7490x24){logger[_0xc41e[31]](_0xc41e[30],_0x7490x1e,_0x7490x24);_0x7490x22(_0x7490x24)})})}function respondWithStatusCode(_0x7490x25,_0x7490x27){_0x7490x27= _0x7490x27|| 204;return function(_0x7490x28){if(_0x7490x28){return _0x7490x25[_0xc41e[43]](_0x7490x27)};return _0x7490x25[_0xc41e[45]](_0x7490x27)[_0xc41e[44]]()}}function respondWithResult(_0x7490x25,_0x7490x27){_0x7490x27= _0x7490x27|| 200;return function(_0x7490x28){if(_0x7490x28){return _0x7490x25[_0xc41e[45]](_0x7490x27)[_0xc41e[46]](_0x7490x28)}}}function respondWithFilteredResult(_0x7490x25,_0x7490x2b){return function(_0x7490x28){if(_0x7490x28){var _0x7490x2c=_0x7490x28[_0xc41e[47]],_0x7490x2d=_0x7490x2b[_0xc41e[48]],_0x7490x2e=_0x7490x2b[_0xc41e[48]]+ _0x7490x2b[_0xc41e[49]],_0x7490x27;if(_0x7490x2e>= _0x7490x2c){_0x7490x2e= _0x7490x2c;_0x7490x27= 200}else {_0x7490x27= 206};_0x7490x25[_0xc41e[45]](_0x7490x27);return _0x7490x25[_0xc41e[53]](_0xc41e[50],_0x7490x2d+ _0xc41e[51]+ _0x7490x2e+ _0xc41e[52]+ _0x7490x2c)[_0xc41e[46]](_0x7490x28)};return null}}function patchUpdates(_0x7490x30){return function(_0x7490x28){try{jsonpatch[_0xc41e[54]](_0x7490x28,_0x7490x30,true)}catch(err){return BPromise[_0xc41e[55]](err)};return _0x7490x28[_0xc41e[56]]()}}function saveUpdates(_0x7490x32,_0x7490x27){return function(_0x7490x28){if(_0x7490x28){return _0x7490x28[_0xc41e[57]](_0x7490x32)[_0xc41e[41]](function(_0x7490x33){return _0x7490x33})};return null}}function removeEntity(_0x7490x25,_0x7490x27){return function(_0x7490x28){if(_0x7490x28){return _0x7490x28[_0xc41e[58]]()[_0xc41e[41]](function(){_0x7490x25[_0xc41e[45]](204)[_0xc41e[44]]()})}}}function handleEntityNotFound(_0x7490x25,_0x7490x27){return function(_0x7490x28){if(!_0x7490x28){_0x7490x25[_0xc41e[43]](404)};return _0x7490x28}}function handleError(_0x7490x25,_0x7490x27){_0x7490x27= _0x7490x27|| 500;return function(_0x7490x24){logger[_0xc41e[31]](_0x7490x24[_0xc41e[59]]);if(_0x7490x24[_0xc41e[60]]){delete _0x7490x24[_0xc41e[60]]};_0x7490x25[_0xc41e[45]](_0x7490x27)[_0xc41e[61]](_0x7490x24)}}exports[_0xc41e[62]]= function(_0x7490x1f,_0x7490x25){var _0x7490x2b={},_0x7490x37={},_0x7490x38={count:0,rows:[]};_0x7490x37[_0xc41e[63]]= _[_0xc41e[66]](db[_0xc41e[65]][_0xc41e[64]]);var _0x7490x39={dateStart:_0x7490x1f[_0xc41e[68]][_0xc41e[67]],dateEnd:_0x7490x1f[_0xc41e[68]][_0xc41e[69]]};delete _0x7490x1f[_0xc41e[68]][_0xc41e[67]];delete _0x7490x1f[_0xc41e[68]][_0xc41e[69]];_0x7490x37[_0xc41e[68]]= _[_0xc41e[66]](_0x7490x1f[_0xc41e[68]]);_0x7490x37[_0xc41e[70]]= _[_0xc41e[71]](_0x7490x37[_0xc41e[63]],_0x7490x37[_0xc41e[68]]);_0x7490x2b[_0xc41e[72]]= _[_0xc41e[71]](_0x7490x37[_0xc41e[63]],qs[_0xc41e[73]](_0x7490x1f[_0xc41e[68]][_0xc41e[73]]));_0x7490x2b[_0xc41e[72]]= (_0x7490x2b[_0xc41e[72]][_0xc41e[74]])?_0x7490x2b[_0xc41e[72]]:_0x7490x37[_0xc41e[63]];if(!_0x7490x1f[_0xc41e[68]][_0xc41e[76]](_0xc41e[75])){_0x7490x2b[_0xc41e[49]]= qs[_0xc41e[49]](_0x7490x1f[_0xc41e[68]][_0xc41e[49]]);_0x7490x2b[_0xc41e[48]]= qs[_0xc41e[48]](_0x7490x1f[_0xc41e[68]][_0xc41e[48]])};_0x7490x2b[_0xc41e[77]]= qs[_0xc41e[78]](_0x7490x1f[_0xc41e[68]][_0xc41e[78]]);_0x7490x2b[_0xc41e[79]]= qs[_0xc41e[70]](_[_0xc41e[80]](_0x7490x1f[_0xc41e[68]],_0x7490x37[_0xc41e[70]]));if(_0x7490x39[_0xc41e[67]]){if(_0x7490x39[_0xc41e[69]]){_0x7490x39[_0xc41e[69]]= moment(_0x7490x39[_0xc41e[69]])[_0xc41e[82]](1,_0xc41e[81])}else {_0x7490x39[_0xc41e[69]]= moment(_0x7490x39[_0xc41e[67]])[_0xc41e[82]](1,_0xc41e[81])};_[_0xc41e[83]](_0x7490x2b[_0xc41e[79]],{createdAt:{$gte:_0x7490x39[_0xc41e[67]],$lte:_0x7490x39[_0xc41e[69]]}})};if(_0x7490x1f[_0xc41e[68]][_0xc41e[84]]){_0x7490x2b[_0xc41e[79]]= _[_0xc41e[83]](_0x7490x2b[_0xc41e[79]],{$or:_[_0xc41e[86]](_0x7490x2b[_0xc41e[72]],function(_0x7490x3a){var _0x7490x38={};_0x7490x38[_0x7490x3a]= {$like:_0xc41e[85]+ _0x7490x1f[_0xc41e[68]][_0xc41e[84]]+ _0xc41e[85]};return _0x7490x38})})};_0x7490x2b= _[_0xc41e[83]]({},_0x7490x2b,_0x7490x1f[_0xc41e[87]]);var _0x7490x3b={where:_0x7490x2b[_0xc41e[79]]};return db[_0xc41e[65]][_0xc41e[47]](_0x7490x3b)[_0xc41e[41]](function(_0x7490x2c){_0x7490x38[_0xc41e[47]]= _0x7490x2c;if(_0x7490x1f[_0xc41e[68]][_0xc41e[89]]){_0x7490x2b[_0xc41e[90]]= [{all:true}]};return db[_0xc41e[65]][_0xc41e[91]](_0x7490x2b)})[_0xc41e[41]](function(_0x7490x3c){_0x7490x38[_0xc41e[88]]= _0x7490x3c;return _0x7490x38})[_0xc41e[41]](respondWithFilteredResult(_0x7490x25,_0x7490x2b))[_0xc41e[32]](handleError(_0x7490x25,null))};exports[_0xc41e[92]]= function(_0x7490x1f,_0x7490x25){var _0x7490x2b={raw:false,where:{id:_0x7490x1f[_0xc41e[94]][_0xc41e[93]]}},_0x7490x37={};_0x7490x37[_0xc41e[63]]= _[_0xc41e[66]](db[_0xc41e[65]][_0xc41e[64]]);_0x7490x37[_0xc41e[68]]= _[_0xc41e[66]](_0x7490x1f[_0xc41e[68]]);_0x7490x37[_0xc41e[70]]= _[_0xc41e[71]](_0x7490x37[_0xc41e[63]],_0x7490x37[_0xc41e[68]]);_0x7490x2b[_0xc41e[72]]= _[_0xc41e[71]](_0x7490x37[_0xc41e[63]],qs[_0xc41e[73]](_0x7490x1f[_0xc41e[68]][_0xc41e[73]]));_0x7490x2b[_0xc41e[72]]= (_0x7490x2b[_0xc41e[72]][_0xc41e[74]])?_0x7490x2b[_0xc41e[72]]:_0x7490x37[_0xc41e[63]];if(_0x7490x1f[_0xc41e[68]][_0xc41e[89]]){_0x7490x2b[_0xc41e[90]]= [{all:true}]};_0x7490x2b= _[_0xc41e[83]]({},_0x7490x2b,_0x7490x1f[_0xc41e[87]]);return db[_0xc41e[65]][_0xc41e[95]](_0x7490x2b)[_0xc41e[41]](handleEntityNotFound(_0x7490x25,null))[_0xc41e[41]](respondWithResult(_0x7490x25,null))[_0xc41e[32]](handleError(_0x7490x25,null))};exports[_0xc41e[96]]= function(_0x7490x1f,_0x7490x25){return db[_0xc41e[65]][_0xc41e[96]](_0x7490x1f[_0xc41e[97]],{})[_0xc41e[41]](respondWithResult(_0x7490x25,201))[_0xc41e[32]](handleError(_0x7490x25,null))};exports[_0xc41e[57]]= function(_0x7490x1f,_0x7490x25){if(_0x7490x1f[_0xc41e[97]][_0xc41e[93]]){delete _0x7490x1f[_0xc41e[97]][_0xc41e[93]]};return db[_0xc41e[65]][_0xc41e[95]]({where:{id:_0x7490x1f[_0xc41e[94]][_0xc41e[93]]}})[_0xc41e[41]](handleEntityNotFound(_0x7490x25,null))[_0xc41e[41]](saveUpdates(_0x7490x1f[_0xc41e[97]],null))[_0xc41e[41]](respondWithResult(_0x7490x25,null))[_0xc41e[32]](handleError(_0x7490x25,null))};exports[_0xc41e[58]]= function(_0x7490x1f,_0x7490x25){return db[_0xc41e[65]][_0xc41e[95]]({where:{id:_0x7490x1f[_0xc41e[94]][_0xc41e[93]]}})[_0xc41e[41]](handleEntityNotFound(_0x7490x25,null))[_0xc41e[41]](removeEntity(_0x7490x25,null))[_0xc41e[32]](handleError(_0x7490x25,null))};exports[_0xc41e[98]]= function(_0x7490x1f,_0x7490x28,_0x7490x3d){var _0x7490x2b={};var _0x7490x37={};var _0x7490x3e;var _0x7490x2c;return db[_0xc41e[65]][_0xc41e[100]]({where:{id:_0x7490x1f[_0xc41e[94]][_0xc41e[93]]}})[_0xc41e[41]](handleEntityNotFound(_0x7490x28,null))[_0xc41e[41]](function(_0x7490x28){if(_0x7490x28){_0x7490x3e= _0x7490x28;_0x7490x37[_0xc41e[63]]= _[_0xc41e[66]](db[_0xc41e[99]][_0xc41e[64]]);_0x7490x37[_0xc41e[68]]= _[_0xc41e[66]](_0x7490x1f[_0xc41e[68]]);_0x7490x37[_0xc41e[70]]= _[_0xc41e[71]](_0x7490x37[_0xc41e[63]],_0x7490x37[_0xc41e[68]]);_0x7490x2b[_0xc41e[72]]= _[_0xc41e[71]](_0x7490x37[_0xc41e[63]],qs[_0xc41e[73]](_0x7490x1f[_0xc41e[68]][_0xc41e[73]]));_0x7490x2b[_0xc41e[72]]= (_0x7490x2b[_0xc41e[72]][_0xc41e[74]])?_0x7490x2b[_0xc41e[72]]:_0x7490x37[_0xc41e[63]];_0x7490x2b[_0xc41e[77]]= qs[_0xc41e[78]](_0x7490x1f[_0xc41e[68]][_0xc41e[78]]);_0x7490x2b[_0xc41e[79]]= qs[_0xc41e[70]](_[_0xc41e[80]](_0x7490x1f[_0xc41e[68]],_0x7490x37[_0xc41e[70]]));if(_0x7490x1f[_0xc41e[68]][_0xc41e[84]]){_0x7490x2b[_0xc41e[79]]= _[_0xc41e[83]](_0x7490x2b[_0xc41e[79]],{$or:_[_0xc41e[86]](_0x7490x2b[_0xc41e[72]],function(_0x7490x3a){var _0x7490x38={};_0x7490x38[_0x7490x3a]= {$like:_0xc41e[85]+ _0x7490x1f[_0xc41e[68]][_0xc41e[84]]+ _0xc41e[85]};return _0x7490x38})})};_0x7490x2b= _[_0xc41e[83]]({},_0x7490x2b,_0x7490x1f[_0xc41e[87]]);return _0x7490x3e[_0xc41e[98]](_0x7490x2b)}})[_0xc41e[41]](function(_0x7490x3f){if(_0x7490x3f){_0x7490x2c= _0x7490x3f[_0xc41e[74]];if(!_0x7490x1f[_0xc41e[68]][_0xc41e[76]](_0xc41e[75])){_0x7490x2b[_0xc41e[49]]= qs[_0xc41e[49]](_0x7490x1f[_0xc41e[68]][_0xc41e[49]]);_0x7490x2b[_0xc41e[48]]= qs[_0xc41e[48]](_0x7490x1f[_0xc41e[68]][_0xc41e[48]])};return _0x7490x3e[_0xc41e[98]](_0x7490x2b)}})[_0xc41e[41]](function(_0x7490x3c){if(_0x7490x3c){return _0x7490x3c?{count:_0x7490x2c,rows:_0x7490x3c}:null}})[_0xc41e[41]](respondWithResult(_0x7490x28,null))[_0xc41e[32]](handleError(_0x7490x28,null))};exports[_0xc41e[101]]= function(_0x7490x1f,_0x7490x25,_0x7490x3d){if(_0x7490x1f[_0xc41e[97]][_0xc41e[93]]){delete _0x7490x1f[_0xc41e[97]][_0xc41e[93]]};return db[_0xc41e[65]][_0xc41e[100]]({where:{id:_0x7490x1f[_0xc41e[94]][_0xc41e[93]]}})[_0xc41e[41]](handleEntityNotFound(_0x7490x25,null))[_0xc41e[41]](function(_0x7490x28){if(_0x7490x28){_0x7490x1f[_0xc41e[97]][_0xc41e[102]]= _0x7490x28[_0xc41e[93]];_0x7490x1f[_0xc41e[97]][_0xc41e[103]]= integrations[_0xc41e[106]](_0x7490x1f[_0xc41e[97]][_0xc41e[104]],_0x7490x1f[_0xc41e[97]][_0xc41e[105]]);_0x7490x1f[_0xc41e[97]][_0xc41e[107]]= integrations[_0xc41e[108]](_0x7490x1f[_0xc41e[97]][_0xc41e[104]],_0x7490x1f[_0xc41e[97]][_0xc41e[105]]);return db[_0xc41e[99]][_0xc41e[96]](_0x7490x1f[_0xc41e[97]],{include:[{model:db[_0xc41e[109]],as:_0xc41e[103]},{model:db[_0xc41e[109]],as:_0xc41e[107]}]})};return null})[_0xc41e[41]](respondWithResult(_0x7490x25,null))[_0xc41e[32]](handleError(_0x7490x25,null))};exports[_0xc41e[110]]= function(_0x7490x1f,_0x7490x25,_0x7490x3d){return db[_0xc41e[65]][_0xc41e[100]]({where:{id:_0x7490x1f[_0xc41e[94]][_0xc41e[93]]},attributes:[_0xc41e[93],_0xc41e[133],_0xc41e[134],_0xc41e[136],_0xc41e[139],_0xc41e[127]]})[_0xc41e[41]](handleEntityNotFound(_0x7490x25,null))[_0xc41e[41]](function(_0x7490x28){if(_0x7490x28){var _0x7490x2b={method:_0xc41e[125],uri:util[_0xc41e[128]](_0xc41e[126],_0x7490x28[_0xc41e[127]],_0xc41e[119]),json:true};switch(_0x7490x28[_0xc41e[139]]){case _0xc41e[134]:_0x7490x2b[_0xc41e[129]]= {Authorization:util[_0xc41e[128]](_0xc41e[130], new Buffer(util[_0xc41e[128]](_0xc41e[132],_0x7490x28[_0xc41e[133]],_0x7490x28[_0xc41e[134]])).toString(_0xc41e[131]))};break;case _0xc41e[136]:_0x7490x2b[_0xc41e[129]]= {Authorization:util[_0xc41e[128]](_0xc41e[130], new Buffer(util[_0xc41e[128]](_0xc41e[135],_0x7490x28[_0xc41e[133]],_0x7490x28[_0xc41e[136]])).toString(_0xc41e[131]))};break;default:throw  new db[_0xc41e[138]].ValidationError(_0xc41e[137])};return rp(_0x7490x2b)}})[_0xc41e[41]](function(_0x7490x3f){if(_0x7490x3f){var _0x7490x40=[_0xc41e[115],_0xc41e[116],_0xc41e[117],_0xc41e[118]];_[_0xc41e[121]](_0x7490x3f[_0xc41e[119]],function(_0x7490x41){return _0x7490x40[_0xc41e[120]](_0x7490x41[_0xc41e[105]])});return {count:_0x7490x3f[_0xc41e[119]][_0xc41e[74]],rows:_[_0xc41e[86]](_0x7490x3f[_0xc41e[119]],function(_0x7490x28){return {id:_0x7490x28[_0xc41e[93]],name:_0x7490x28[_0xc41e[122]]> 7?_0x7490x28[_0xc41e[123]]:_0x7490x28[_0xc41e[105]],custom:_0x7490x28[_0xc41e[122]]> 7?true:false,options:_0x7490x28[_0xc41e[124]]?_0x7490x28[_0xc41e[124]]:[]}})}}})[_0xc41e[41]](respondWithResult(_0x7490x25,null))[_0xc41e[32]](function(_0x7490x24){var _0x7490x27=_0x7490x1f[_0xc41e[68]][_0xc41e[111]]?500:(_0x7490x24[_0xc41e[112]]|| 500);logger[_0xc41e[31]](_0xc41e[113],_0xc41e[110],_0x7490x27,JSON[_0xc41e[36]](_0x7490x24));delete _0x7490x24[_0xc41e[60]];if(_0x7490x27=== 401){_0x7490x27= 400};_0x7490x25[_0xc41e[45]](_0x7490x27)[_0xc41e[61]](_0x7490x1f[_0xc41e[68]][_0xc41e[111]]?{message:_0xc41e[114],statusCode:_0x7490x24[_0xc41e[112]]}:_0x7490x24)})}
\ No newline at end of file
+var _0x51a2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x79\x70\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x74\x65\x73\x74","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73","\x73\x75\x62\x6A\x65\x63\x74","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x67\x72\x6F\x75\x70","\x61\x73\x73\x69\x67\x6E\x65\x65","\x74\x69\x63\x6B\x65\x74\x5F\x66\x69\x65\x6C\x64\x73","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x72\x65\x6D\x6F\x76\x65","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x74\x69\x74\x6C\x65","\x73\x79\x73\x74\x65\x6D\x5F\x66\x69\x65\x6C\x64\x5F\x6F\x70\x74\x69\x6F\x6E\x73","\x47\x45\x54","\x25\x73\x25\x73","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x66\x6F\x72\x6D\x61\x74","\x68\x65\x61\x64\x65\x72\x73","\x42\x61\x73\x69\x63\x20\x25\x73","\x62\x61\x73\x65\x36\x34","\x25\x73\x3A\x25\x73","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x25\x73\x2F\x74\x6F\x6B\x65\x6E\x3A\x25\x73","\x74\x6F\x6B\x65\x6E","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E\x20\x74\x79\x70\x65","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x61\x75\x74\x68\x54\x79\x70\x65"];_0x51a2[0];var jsonpatch=require(_0x51a2[1]);var rp=require(_0x51a2[2]);var moment=require(_0x51a2[3]);var BPromise=require(_0x51a2[4]);var Mustache=require(_0x51a2[5]);var util=require(_0x51a2[6]);var path=require(_0x51a2[7]);var sox=require(_0x51a2[8]);var csv=require(_0x51a2[9]);var ejs=require(_0x51a2[10]);var fs=require(_0x51a2[11]);var _=require(_0x51a2[12]);var squel=require(_0x51a2[13]);var crypto=require(_0x51a2[14]);var jsforce=require(_0x51a2[15]);var deskjs=require(_0x51a2[16]);var toCsv=require(_0x51a2[9]);var querystring=require(_0x51a2[17]);var Papa=require(_0x51a2[18]);var qs=require(_0x51a2[19]);var logger=require(_0x51a2[21])(_0x51a2[20]);var utils=require(_0x51a2[22]);var config=require(_0x51a2[23]);var db=require(_0x51a2[25])[_0x51a2[24]];var integrations=require(_0x51a2[26]);var jayson=require(_0x51a2[27]);var client=jayson[_0x51a2[29]][_0x51a2[28]]({port:9002});function respondWithRpcPromise(_0xf654x1d,_0xf654x1e,_0xf654x1f,_0xf654x20){return  new BPromise(function(_0xf654x21,_0xf654x22){var _0xf654x23=(_0xf654x20|| client);return _0xf654x23[_0x51a2[42]](_0xf654x1d,_0xf654x1f)[_0x51a2[41]](function(_0xf654x25){logger[_0x51a2[34]](_0x51a2[30],_0xf654x1e,_0x51a2[33]);logger[_0x51a2[37]](_0x51a2[35],_0xf654x1e,_0x51a2[33],JSON[_0x51a2[36]](_0xf654x25));if(_0xf654x25[_0x51a2[31]]){if(_0xf654x25[_0x51a2[31]][_0x51a2[38]]=== 500){logger[_0x51a2[31]](_0x51a2[30],_0xf654x1e,_0xf654x25[_0x51a2[31]][_0x51a2[39]]);return _0xf654x22(_0xf654x25[_0x51a2[31]][_0x51a2[39]])};logger[_0x51a2[31]](_0x51a2[30],_0xf654x1e,_0xf654x25[_0x51a2[31]][_0x51a2[39]]);return _0xf654x21(_0xf654x25[_0x51a2[31]][_0x51a2[39]])}else {logger[_0x51a2[34]](_0x51a2[30],_0xf654x1e,_0x51a2[33]);_0xf654x21(_0xf654x25[_0x51a2[40]][_0x51a2[39]])}})[_0x51a2[32]](function(_0xf654x24){logger[_0x51a2[31]](_0x51a2[30],_0xf654x1e,_0xf654x24);_0xf654x22(_0xf654x24)})})}function respondWithStatusCode(_0xf654x25,_0xf654x27){_0xf654x27= _0xf654x27|| 204;return function(_0xf654x28){if(_0xf654x28){return _0xf654x25[_0x51a2[43]](_0xf654x27)};return _0xf654x25[_0x51a2[45]](_0xf654x27)[_0x51a2[44]]()}}function respondWithResult(_0xf654x25,_0xf654x27){_0xf654x27= _0xf654x27|| 200;return function(_0xf654x28){if(_0xf654x28){return _0xf654x25[_0x51a2[45]](_0xf654x27)[_0x51a2[46]](_0xf654x28)}}}function respondWithFilteredResult(_0xf654x25,_0xf654x2b){return function(_0xf654x28){if(_0xf654x28){var _0xf654x2c=_0xf654x28[_0x51a2[47]],_0xf654x2d=_0xf654x2b[_0x51a2[48]],_0xf654x2e=_0xf654x2b[_0x51a2[48]]+ _0xf654x2b[_0x51a2[49]],_0xf654x27;if(_0xf654x2e>= _0xf654x2c){_0xf654x2e= _0xf654x2c;_0xf654x27= 200}else {_0xf654x27= 206};_0xf654x25[_0x51a2[45]](_0xf654x27);return _0xf654x25[_0x51a2[53]](_0x51a2[50],_0xf654x2d+ _0x51a2[51]+ _0xf654x2e+ _0x51a2[52]+ _0xf654x2c)[_0x51a2[46]](_0xf654x28)};return null}}function patchUpdates(_0xf654x30){return function(_0xf654x28){try{jsonpatch[_0x51a2[54]](_0xf654x28,_0xf654x30,true)}catch(err){return BPromise[_0x51a2[55]](err)};return _0xf654x28[_0x51a2[56]]()}}function saveUpdates(_0xf654x32,_0xf654x27){return function(_0xf654x28){if(_0xf654x28){return _0xf654x28[_0x51a2[57]](_0xf654x32)[_0x51a2[41]](function(_0xf654x33){return _0xf654x33})};return null}}function removeEntity(_0xf654x25,_0xf654x27){return function(_0xf654x28){if(_0xf654x28){return _0xf654x28[_0x51a2[58]]()[_0x51a2[41]](function(){_0xf654x25[_0x51a2[45]](204)[_0x51a2[44]]()})}}}function handleEntityNotFound(_0xf654x25,_0xf654x27){return function(_0xf654x28){if(!_0xf654x28){_0xf654x25[_0x51a2[43]](404)};return _0xf654x28}}function handleError(_0xf654x25,_0xf654x27){_0xf654x27= _0xf654x27|| 500;return function(_0xf654x24){logger[_0x51a2[31]](_0xf654x24[_0x51a2[59]]);if(_0xf654x24[_0x51a2[60]]){delete _0xf654x24[_0x51a2[60]]};_0xf654x25[_0x51a2[45]](_0xf654x27)[_0x51a2[61]](_0xf654x24)}}exports[_0x51a2[62]]= function(_0xf654x1f,_0xf654x25){var _0xf654x2b={},_0xf654x37={},_0xf654x38={count:0,rows:[]};_0xf654x37[_0x51a2[63]]= _[_0x51a2[66]](db[_0x51a2[65]][_0x51a2[64]]);var _0xf654x39={dateStart:_0xf654x1f[_0x51a2[68]][_0x51a2[67]],dateEnd:_0xf654x1f[_0x51a2[68]][_0x51a2[69]]};delete _0xf654x1f[_0x51a2[68]][_0x51a2[67]];delete _0xf654x1f[_0x51a2[68]][_0x51a2[69]];_0xf654x37[_0x51a2[68]]= _[_0x51a2[66]](_0xf654x1f[_0x51a2[68]]);_0xf654x37[_0x51a2[70]]= _[_0x51a2[71]](_0xf654x37[_0x51a2[63]],_0xf654x37[_0x51a2[68]]);_0xf654x2b[_0x51a2[72]]= _[_0x51a2[71]](_0xf654x37[_0x51a2[63]],qs[_0x51a2[73]](_0xf654x1f[_0x51a2[68]][_0x51a2[73]]));_0xf654x2b[_0x51a2[72]]= (_0xf654x2b[_0x51a2[72]][_0x51a2[74]])?_0xf654x2b[_0x51a2[72]]:_0xf654x37[_0x51a2[63]];if(!_0xf654x1f[_0x51a2[68]][_0x51a2[76]](_0x51a2[75])){_0xf654x2b[_0x51a2[49]]= qs[_0x51a2[49]](_0xf654x1f[_0x51a2[68]][_0x51a2[49]]);_0xf654x2b[_0x51a2[48]]= qs[_0x51a2[48]](_0xf654x1f[_0x51a2[68]][_0x51a2[48]])};_0xf654x2b[_0x51a2[77]]= qs[_0x51a2[78]](_0xf654x1f[_0x51a2[68]][_0x51a2[78]]);_0xf654x2b[_0x51a2[79]]= qs[_0x51a2[70]](_[_0x51a2[80]](_0xf654x1f[_0x51a2[68]],_0xf654x37[_0x51a2[70]]));if(_0xf654x39[_0x51a2[67]]){if(_0xf654x39[_0x51a2[69]]){_0xf654x39[_0x51a2[69]]= moment(_0xf654x39[_0x51a2[69]])[_0x51a2[82]](1,_0x51a2[81])}else {_0xf654x39[_0x51a2[69]]= moment(_0xf654x39[_0x51a2[67]])[_0x51a2[82]](1,_0x51a2[81])};_[_0x51a2[83]](_0xf654x2b[_0x51a2[79]],{createdAt:{$gte:_0xf654x39[_0x51a2[67]],$lte:_0xf654x39[_0x51a2[69]]}})};if(_0xf654x1f[_0x51a2[68]][_0x51a2[84]]){_0xf654x2b[_0x51a2[79]]= _[_0x51a2[83]](_0xf654x2b[_0x51a2[79]],{$or:_[_0x51a2[86]](_0xf654x2b[_0x51a2[72]],function(_0xf654x3a){var _0xf654x38={};_0xf654x38[_0xf654x3a]= {$like:_0x51a2[85]+ _0xf654x1f[_0x51a2[68]][_0x51a2[84]]+ _0x51a2[85]};return _0xf654x38})})};_0xf654x2b= _[_0x51a2[83]]({},_0xf654x2b,_0xf654x1f[_0x51a2[87]]);var _0xf654x3b={where:_0xf654x2b[_0x51a2[79]]};return db[_0x51a2[65]][_0x51a2[47]](_0xf654x3b)[_0x51a2[41]](function(_0xf654x2c){_0xf654x38[_0x51a2[47]]= _0xf654x2c;if(_0xf654x1f[_0x51a2[68]][_0x51a2[89]]){_0xf654x2b[_0x51a2[90]]= [{all:true}]};return db[_0x51a2[65]][_0x51a2[91]](_0xf654x2b)})[_0x51a2[41]](function(_0xf654x3c){_0xf654x38[_0x51a2[88]]= _0xf654x3c;return _0xf654x38})[_0x51a2[41]](respondWithFilteredResult(_0xf654x25,_0xf654x2b))[_0x51a2[32]](handleError(_0xf654x25,null))};exports[_0x51a2[92]]= function(_0xf654x1f,_0xf654x25){var _0xf654x2b={raw:false,where:{id:_0xf654x1f[_0x51a2[94]][_0x51a2[93]]}},_0xf654x37={};_0xf654x37[_0x51a2[63]]= _[_0x51a2[66]](db[_0x51a2[65]][_0x51a2[64]]);_0xf654x37[_0x51a2[68]]= _[_0x51a2[66]](_0xf654x1f[_0x51a2[68]]);_0xf654x37[_0x51a2[70]]= _[_0x51a2[71]](_0xf654x37[_0x51a2[63]],_0xf654x37[_0x51a2[68]]);_0xf654x2b[_0x51a2[72]]= _[_0x51a2[71]](_0xf654x37[_0x51a2[63]],qs[_0x51a2[73]](_0xf654x1f[_0x51a2[68]][_0x51a2[73]]));_0xf654x2b[_0x51a2[72]]= (_0xf654x2b[_0x51a2[72]][_0x51a2[74]])?_0xf654x2b[_0x51a2[72]]:_0xf654x37[_0x51a2[63]];if(_0xf654x1f[_0x51a2[68]][_0x51a2[89]]){_0xf654x2b[_0x51a2[90]]= [{all:true}]};_0xf654x2b= _[_0x51a2[83]]({},_0xf654x2b,_0xf654x1f[_0x51a2[87]]);return db[_0x51a2[65]][_0x51a2[95]](_0xf654x2b)[_0x51a2[41]](handleEntityNotFound(_0xf654x25,null))[_0x51a2[41]](respondWithResult(_0xf654x25,null))[_0x51a2[32]](handleError(_0xf654x25,null))};exports[_0x51a2[96]]= function(_0xf654x1f,_0xf654x25){return db[_0x51a2[65]][_0x51a2[96]](_0xf654x1f[_0x51a2[97]],{})[_0x51a2[41]](respondWithResult(_0xf654x25,201))[_0x51a2[32]](handleError(_0xf654x25,null))};exports[_0x51a2[57]]= function(_0xf654x1f,_0xf654x25){if(_0xf654x1f[_0x51a2[97]][_0x51a2[93]]){delete _0xf654x1f[_0x51a2[97]][_0x51a2[93]]};return db[_0x51a2[65]][_0x51a2[95]]({where:{id:_0xf654x1f[_0x51a2[94]][_0x51a2[93]]}})[_0x51a2[41]](handleEntityNotFound(_0xf654x25,null))[_0x51a2[41]](saveUpdates(_0xf654x1f[_0x51a2[97]],null))[_0x51a2[41]](respondWithResult(_0xf654x25,null))[_0x51a2[32]](handleError(_0xf654x25,null))};exports[_0x51a2[58]]= function(_0xf654x1f,_0xf654x25){return db[_0x51a2[65]][_0x51a2[95]]({where:{id:_0xf654x1f[_0x51a2[94]][_0x51a2[93]]}})[_0x51a2[41]](handleEntityNotFound(_0xf654x25,null))[_0x51a2[41]](removeEntity(_0xf654x25,null))[_0x51a2[32]](handleError(_0xf654x25,null))};exports[_0x51a2[98]]= function(_0xf654x1f,_0xf654x28,_0xf654x3d){var _0xf654x2b={};var _0xf654x37={};var _0xf654x3e;var _0xf654x2c;return db[_0x51a2[65]][_0x51a2[100]]({where:{id:_0xf654x1f[_0x51a2[94]][_0x51a2[93]]}})[_0x51a2[41]](handleEntityNotFound(_0xf654x28,null))[_0x51a2[41]](function(_0xf654x28){if(_0xf654x28){_0xf654x3e= _0xf654x28;_0xf654x37[_0x51a2[63]]= _[_0x51a2[66]](db[_0x51a2[99]][_0x51a2[64]]);_0xf654x37[_0x51a2[68]]= _[_0x51a2[66]](_0xf654x1f[_0x51a2[68]]);_0xf654x37[_0x51a2[70]]= _[_0x51a2[71]](_0xf654x37[_0x51a2[63]],_0xf654x37[_0x51a2[68]]);_0xf654x2b[_0x51a2[72]]= _[_0x51a2[71]](_0xf654x37[_0x51a2[63]],qs[_0x51a2[73]](_0xf654x1f[_0x51a2[68]][_0x51a2[73]]));_0xf654x2b[_0x51a2[72]]= (_0xf654x2b[_0x51a2[72]][_0x51a2[74]])?_0xf654x2b[_0x51a2[72]]:_0xf654x37[_0x51a2[63]];_0xf654x2b[_0x51a2[77]]= qs[_0x51a2[78]](_0xf654x1f[_0x51a2[68]][_0x51a2[78]]);_0xf654x2b[_0x51a2[79]]= qs[_0x51a2[70]](_[_0x51a2[80]](_0xf654x1f[_0x51a2[68]],_0xf654x37[_0x51a2[70]]));if(_0xf654x1f[_0x51a2[68]][_0x51a2[84]]){_0xf654x2b[_0x51a2[79]]= _[_0x51a2[83]](_0xf654x2b[_0x51a2[79]],{$or:_[_0x51a2[86]](_0xf654x2b[_0x51a2[72]],function(_0xf654x3a){var _0xf654x38={};_0xf654x38[_0xf654x3a]= {$like:_0x51a2[85]+ _0xf654x1f[_0x51a2[68]][_0x51a2[84]]+ _0x51a2[85]};return _0xf654x38})})};_0xf654x2b= _[_0x51a2[83]]({},_0xf654x2b,_0xf654x1f[_0x51a2[87]]);return _0xf654x3e[_0x51a2[98]](_0xf654x2b)}})[_0x51a2[41]](function(_0xf654x3f){if(_0xf654x3f){_0xf654x2c= _0xf654x3f[_0x51a2[74]];if(!_0xf654x1f[_0x51a2[68]][_0x51a2[76]](_0x51a2[75])){_0xf654x2b[_0x51a2[49]]= qs[_0x51a2[49]](_0xf654x1f[_0x51a2[68]][_0x51a2[49]]);_0xf654x2b[_0x51a2[48]]= qs[_0x51a2[48]](_0xf654x1f[_0x51a2[68]][_0x51a2[48]])};return _0xf654x3e[_0x51a2[98]](_0xf654x2b)}})[_0x51a2[41]](function(_0xf654x3c){if(_0xf654x3c){return _0xf654x3c?{count:_0xf654x2c,rows:_0xf654x3c}:null}})[_0x51a2[41]](respondWithResult(_0xf654x28,null))[_0x51a2[32]](handleError(_0xf654x28,null))};exports[_0x51a2[101]]= function(_0xf654x1f,_0xf654x25,_0xf654x3d){if(_0xf654x1f[_0x51a2[97]][_0x51a2[93]]){delete _0xf654x1f[_0x51a2[97]][_0x51a2[93]]};return db[_0x51a2[65]][_0x51a2[100]]({where:{id:_0xf654x1f[_0x51a2[94]][_0x51a2[93]]}})[_0x51a2[41]](handleEntityNotFound(_0xf654x25,null))[_0x51a2[41]](function(_0xf654x28){if(_0xf654x28){_0xf654x1f[_0x51a2[97]][_0x51a2[102]]= _0xf654x28[_0x51a2[93]];_0xf654x1f[_0x51a2[97]][_0x51a2[103]]= integrations[_0x51a2[106]](_0xf654x1f[_0x51a2[97]][_0x51a2[104]],_0xf654x1f[_0x51a2[97]][_0x51a2[105]]);_0xf654x1f[_0x51a2[97]][_0x51a2[107]]= integrations[_0x51a2[108]](_0xf654x1f[_0x51a2[97]][_0x51a2[104]],_0xf654x1f[_0x51a2[97]][_0x51a2[105]]);return db[_0x51a2[99]][_0x51a2[96]](_0xf654x1f[_0x51a2[97]],{include:[{model:db[_0x51a2[109]],as:_0x51a2[103]},{model:db[_0x51a2[109]],as:_0x51a2[107]}]})};return null})[_0x51a2[41]](respondWithResult(_0xf654x25,null))[_0x51a2[32]](handleError(_0xf654x25,null))};exports[_0x51a2[110]]= function(_0xf654x1f,_0xf654x25,_0xf654x3d){return db[_0x51a2[65]][_0x51a2[100]]({where:{id:_0xf654x1f[_0x51a2[94]][_0x51a2[93]]},attributes:[_0x51a2[93],_0x51a2[133],_0x51a2[134],_0x51a2[136],_0x51a2[139],_0x51a2[127]]})[_0x51a2[41]](handleEntityNotFound(_0xf654x25,null))[_0x51a2[41]](function(_0xf654x28){if(_0xf654x28){var _0xf654x2b={method:_0x51a2[125],uri:util[_0x51a2[128]](_0x51a2[126],_0xf654x28[_0x51a2[127]],_0x51a2[119]),json:true};switch(_0xf654x28[_0x51a2[139]]){case _0x51a2[134]:_0xf654x2b[_0x51a2[129]]= {Authorization:util[_0x51a2[128]](_0x51a2[130], new Buffer(util[_0x51a2[128]](_0x51a2[132],_0xf654x28[_0x51a2[133]],_0xf654x28[_0x51a2[134]])).toString(_0x51a2[131]))};break;case _0x51a2[136]:_0xf654x2b[_0x51a2[129]]= {Authorization:util[_0x51a2[128]](_0x51a2[130], new Buffer(util[_0x51a2[128]](_0x51a2[135],_0xf654x28[_0x51a2[133]],_0xf654x28[_0x51a2[136]])).toString(_0x51a2[131]))};break;default:throw  new db[_0x51a2[138]].ValidationError(_0x51a2[137])};return rp(_0xf654x2b)}})[_0x51a2[41]](function(_0xf654x3f){if(_0xf654x3f){var _0xf654x40=[_0x51a2[115],_0x51a2[116],_0x51a2[117],_0x51a2[118]];_[_0x51a2[121]](_0xf654x3f[_0x51a2[119]],function(_0xf654x41){return _0xf654x40[_0x51a2[120]](_0xf654x41[_0x51a2[105]])});return {count:_0xf654x3f[_0x51a2[119]][_0x51a2[74]],rows:_[_0x51a2[86]](_0xf654x3f[_0x51a2[119]],function(_0xf654x28){return {id:_0xf654x28[_0x51a2[93]],name:_0xf654x28[_0x51a2[122]]> 7?_0xf654x28[_0x51a2[123]]:_0xf654x28[_0x51a2[105]],custom:_0xf654x28[_0x51a2[122]]> 7?true:false,options:_0xf654x28[_0x51a2[124]]?_0xf654x28[_0x51a2[124]]:[]}})}}})[_0x51a2[41]](respondWithResult(_0xf654x25,null))[_0x51a2[32]](function(_0xf654x24){var _0xf654x27=_0xf654x1f[_0x51a2[68]][_0x51a2[111]]?500:(_0xf654x24[_0x51a2[112]]|| 500);logger[_0x51a2[31]](_0x51a2[113],_0x51a2[110],_0xf654x27,JSON[_0x51a2[36]](_0xf654x24));delete _0xf654x24[_0x51a2[60]];if(_0xf654x27=== 401){_0xf654x27= 400};_0xf654x25[_0x51a2[45]](_0xf654x27)[_0x51a2[61]](_0xf654x1f[_0x51a2[68]][_0x51a2[111]]?{message:_0x51a2[114],statusCode:_0xf654x24[_0x51a2[112]]}:_0xf654x24)})}
\ No newline at end of file
index 791acd5..614ef52 100644 (file)
@@ -1 +1 @@
-var _0x5397=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x74\x5F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x5397[0];var _=require(_0x5397[1]);var util=require(_0x5397[2]);var logger=require(_0x5397[4])(_0x5397[3]);var moment=require(_0x5397[5]);var BPromise=require(_0x5397[6]);var rp=require(_0x5397[7]);var attributes=require(_0x5397[8]);var integrations=require(_0x5397[9]);module[_0x5397[10]]= function(_0x6125x9,_0x6125xa){return _0x6125x9[_0x5397[13]](_0x5397[11],attributes,{tableName:_0x5397[12],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x186c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x74\x5F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x186c[0];var _=require(_0x186c[1]);var util=require(_0x186c[2]);var logger=require(_0x186c[4])(_0x186c[3]);var moment=require(_0x186c[5]);var BPromise=require(_0x186c[6]);var rp=require(_0x186c[7]);var attributes=require(_0x186c[8]);var integrations=require(_0x186c[9]);module[_0x186c[10]]= function(_0xefbdx9,_0xefbdxa){return _0xefbdx9[_0x186c[13]](_0x186c[11],attributes,{tableName:_0x186c[12],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index a564215..7a41b7e 100644 (file)
@@ -1 +1 @@
-var _0x72db=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x53\x68\x6F\x77\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x66\x69\x6E\x64"];_0x72db[0];var _=require(_0x72db[1]);var util=require(_0x72db[2]);var moment=require(_0x72db[3]);var BPromise=require(_0x72db[4]);var rs=require(_0x72db[5]);var fs=require(_0x72db[6]);var db=require(_0x72db[8])[_0x72db[7]];var utils=require(_0x72db[9]);var logger=require(_0x72db[11])(_0x72db[10]);var config=require(_0x72db[12]);var jayson=require(_0x72db[13]);var client=jayson[_0x72db[15]][_0x72db[14]]({port:9002});function respondWithRpcPromise(_0xeca1xe,_0xeca1xf,_0xeca1x10){return  new BPromise(function(_0xeca1x11,_0xeca1x12){return client[_0x72db[28]](_0xeca1xe,_0xeca1x10)[_0x72db[27]](function(_0xeca1x14){logger[_0x72db[20]](_0x72db[16],_0xeca1xf,_0x72db[19]);logger[_0x72db[23]](_0x72db[21],_0xeca1xf,_0x72db[19],JSON[_0x72db[22]](_0xeca1x14));if(_0xeca1x14[_0x72db[17]]){if(_0xeca1x14[_0x72db[17]][_0x72db[24]]=== 500){logger[_0x72db[17]](_0x72db[16],_0xeca1xf,_0xeca1x14[_0x72db[17]][_0x72db[25]]);return _0xeca1x12(_0xeca1x14[_0x72db[17]][_0x72db[25]])};logger[_0x72db[17]](_0x72db[16],_0xeca1xf,_0xeca1x14[_0x72db[17]][_0x72db[25]]);return _0xeca1x11(_0xeca1x14[_0x72db[17]][_0x72db[25]])}else {logger[_0x72db[20]](_0x72db[16],_0xeca1xf,_0x72db[19]);_0xeca1x11(_0xeca1x14[_0x72db[26]][_0x72db[25]])}})[_0x72db[18]](function(_0xeca1x13){logger[_0x72db[17]](_0x72db[16],_0xeca1xf,_0xeca1x13);_0xeca1x12(_0xeca1x13)})})}exports[_0x72db[29]]= function(_0xeca1x10){var _0xeca1x15=this;return  new Promise(function(_0xeca1x11,_0xeca1x12){return db[_0x72db[40]][_0x72db[39]]({raw:_0xeca1x10[_0x72db[30]]?(_0xeca1x10[_0x72db[30]][_0x72db[31]]=== undefined)?true:false:true,where:_0xeca1x10[_0x72db[30]]?_0xeca1x10[_0x72db[30]][_0x72db[32]]|| null:null,attributes:_0xeca1x10[_0x72db[30]]?_0xeca1x10[_0x72db[30]][_0x72db[33]]|| null:null,limit:_0xeca1x10[_0x72db[30]]?_0xeca1x10[_0x72db[30]][_0x72db[34]]|| null:null,include:_0xeca1x10[_0x72db[30]]?(_0xeca1x10[_0x72db[30]][_0x72db[35]]?_[_0x72db[38]](_0xeca1x10[_0x72db[30]][_0x72db[35]],function(_0xeca1x16){return {model:db[_0xeca1x16[_0x72db[36]]],as:_0xeca1x16[_0x72db[37]],attributes:_0xeca1x16[_0x72db[33]],include:_0xeca1x16[_0x72db[35]]?_[_0x72db[38]](_0xeca1x16[_0x72db[35]],function(_0xeca1x17){return {model:db[_0xeca1x17[_0x72db[36]]],as:_0xeca1x17[_0x72db[37]],attributes:_0xeca1x17[_0x72db[33]],include:_0xeca1x17[_0x72db[35]]?_[_0x72db[38]](_0xeca1x17[_0x72db[35]],function(_0xeca1x18){return {model:db[_0xeca1x18[_0x72db[36]]],as:_0xeca1x18[_0x72db[37]],attributes:_0xeca1x18[_0x72db[33]]}}):[]}}):[]}}):[]):[]})[_0x72db[27]](function(_0xeca1x14){logger[_0x72db[20]](_0x72db[29],_0xeca1x10);logger[_0x72db[23]](_0x72db[29],_0xeca1x10,JSON[_0x72db[22]](_0xeca1x14));_0xeca1x11(_0xeca1x14)})[_0x72db[18]](function(_0xeca1x13){logger[_0x72db[17]](_0x72db[29],_0xeca1x13[_0x72db[25]],_0xeca1x10);_0xeca1x12(_0xeca1x15[_0x72db[17]](500,_0xeca1x13[_0x72db[25]]))})})};exports[_0x72db[41]]= function(_0xeca1x10){var _0xeca1x15=this;return  new Promise(function(_0xeca1x11,_0xeca1x12){return db[_0x72db[40]][_0x72db[42]]({raw:_0xeca1x10[_0x72db[30]]?(_0xeca1x10[_0x72db[30]][_0x72db[31]]=== undefined)?true:false:true,where:_0xeca1x10[_0x72db[30]]?_0xeca1x10[_0x72db[30]][_0x72db[32]]|| null:null,attributes:_0xeca1x10[_0x72db[30]]?_0xeca1x10[_0x72db[30]][_0x72db[33]]|| null:null,include:_0xeca1x10[_0x72db[30]]?(_0xeca1x10[_0x72db[30]][_0x72db[35]]?_[_0x72db[38]](_0xeca1x10[_0x72db[30]][_0x72db[35]],function(_0xeca1x16){return {model:db[_0xeca1x16[_0x72db[36]]],as:_0xeca1x16[_0x72db[37]],attributes:_0xeca1x16[_0x72db[33]],include:_0xeca1x16[_0x72db[35]]?_[_0x72db[38]](_0xeca1x16[_0x72db[35]],function(_0xeca1x17){return {model:db[_0xeca1x17[_0x72db[36]]],as:_0xeca1x17[_0x72db[37]],attributes:_0xeca1x17[_0x72db[33]],include:_0xeca1x17[_0x72db[35]]?_[_0x72db[38]](_0xeca1x17[_0x72db[35]],function(_0xeca1x18){return {model:db[_0xeca1x18[_0x72db[36]]],as:_0xeca1x18[_0x72db[37]],attributes:_0xeca1x18[_0x72db[33]]}}):[]}}):[]}}):[]):[]})[_0x72db[27]](function(_0xeca1x14){logger[_0x72db[20]](_0x72db[41],_0xeca1x10);logger[_0x72db[23]](_0x72db[41],_0xeca1x10,JSON[_0x72db[22]](_0xeca1x14));_0xeca1x11(_0xeca1x14)})[_0x72db[18]](function(_0xeca1x13){logger[_0x72db[17]](_0x72db[41],_0xeca1x13[_0x72db[25]],_0xeca1x10);_0xeca1x12(_0xeca1x15[_0x72db[17]](500,_0xeca1x13[_0x72db[25]]))})})}
\ No newline at end of file
+var _0xbdaa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x53\x68\x6F\x77\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x66\x69\x6E\x64"];_0xbdaa[0];var _=require(_0xbdaa[1]);var util=require(_0xbdaa[2]);var moment=require(_0xbdaa[3]);var BPromise=require(_0xbdaa[4]);var rs=require(_0xbdaa[5]);var fs=require(_0xbdaa[6]);var db=require(_0xbdaa[8])[_0xbdaa[7]];var utils=require(_0xbdaa[9]);var logger=require(_0xbdaa[11])(_0xbdaa[10]);var config=require(_0xbdaa[12]);var jayson=require(_0xbdaa[13]);var client=jayson[_0xbdaa[15]][_0xbdaa[14]]({port:9002});function respondWithRpcPromise(_0x95bbxe,_0x95bbxf,_0x95bbx10){return  new BPromise(function(_0x95bbx11,_0x95bbx12){return client[_0xbdaa[28]](_0x95bbxe,_0x95bbx10)[_0xbdaa[27]](function(_0x95bbx14){logger[_0xbdaa[20]](_0xbdaa[16],_0x95bbxf,_0xbdaa[19]);logger[_0xbdaa[23]](_0xbdaa[21],_0x95bbxf,_0xbdaa[19],JSON[_0xbdaa[22]](_0x95bbx14));if(_0x95bbx14[_0xbdaa[17]]){if(_0x95bbx14[_0xbdaa[17]][_0xbdaa[24]]=== 500){logger[_0xbdaa[17]](_0xbdaa[16],_0x95bbxf,_0x95bbx14[_0xbdaa[17]][_0xbdaa[25]]);return _0x95bbx12(_0x95bbx14[_0xbdaa[17]][_0xbdaa[25]])};logger[_0xbdaa[17]](_0xbdaa[16],_0x95bbxf,_0x95bbx14[_0xbdaa[17]][_0xbdaa[25]]);return _0x95bbx11(_0x95bbx14[_0xbdaa[17]][_0xbdaa[25]])}else {logger[_0xbdaa[20]](_0xbdaa[16],_0x95bbxf,_0xbdaa[19]);_0x95bbx11(_0x95bbx14[_0xbdaa[26]][_0xbdaa[25]])}})[_0xbdaa[18]](function(_0x95bbx13){logger[_0xbdaa[17]](_0xbdaa[16],_0x95bbxf,_0x95bbx13);_0x95bbx12(_0x95bbx13)})})}exports[_0xbdaa[29]]= function(_0x95bbx10){var _0x95bbx15=this;return  new Promise(function(_0x95bbx11,_0x95bbx12){return db[_0xbdaa[40]][_0xbdaa[39]]({raw:_0x95bbx10[_0xbdaa[30]]?(_0x95bbx10[_0xbdaa[30]][_0xbdaa[31]]=== undefined)?true:false:true,where:_0x95bbx10[_0xbdaa[30]]?_0x95bbx10[_0xbdaa[30]][_0xbdaa[32]]|| null:null,attributes:_0x95bbx10[_0xbdaa[30]]?_0x95bbx10[_0xbdaa[30]][_0xbdaa[33]]|| null:null,limit:_0x95bbx10[_0xbdaa[30]]?_0x95bbx10[_0xbdaa[30]][_0xbdaa[34]]|| null:null,include:_0x95bbx10[_0xbdaa[30]]?(_0x95bbx10[_0xbdaa[30]][_0xbdaa[35]]?_[_0xbdaa[38]](_0x95bbx10[_0xbdaa[30]][_0xbdaa[35]],function(_0x95bbx16){return {model:db[_0x95bbx16[_0xbdaa[36]]],as:_0x95bbx16[_0xbdaa[37]],attributes:_0x95bbx16[_0xbdaa[33]],include:_0x95bbx16[_0xbdaa[35]]?_[_0xbdaa[38]](_0x95bbx16[_0xbdaa[35]],function(_0x95bbx17){return {model:db[_0x95bbx17[_0xbdaa[36]]],as:_0x95bbx17[_0xbdaa[37]],attributes:_0x95bbx17[_0xbdaa[33]],include:_0x95bbx17[_0xbdaa[35]]?_[_0xbdaa[38]](_0x95bbx17[_0xbdaa[35]],function(_0x95bbx18){return {model:db[_0x95bbx18[_0xbdaa[36]]],as:_0x95bbx18[_0xbdaa[37]],attributes:_0x95bbx18[_0xbdaa[33]]}}):[]}}):[]}}):[]):[]})[_0xbdaa[27]](function(_0x95bbx14){logger[_0xbdaa[20]](_0xbdaa[29],_0x95bbx10);logger[_0xbdaa[23]](_0xbdaa[29],_0x95bbx10,JSON[_0xbdaa[22]](_0x95bbx14));_0x95bbx11(_0x95bbx14)})[_0xbdaa[18]](function(_0x95bbx13){logger[_0xbdaa[17]](_0xbdaa[29],_0x95bbx13[_0xbdaa[25]],_0x95bbx10);_0x95bbx12(_0x95bbx15[_0xbdaa[17]](500,_0x95bbx13[_0xbdaa[25]]))})})};exports[_0xbdaa[41]]= function(_0x95bbx10){var _0x95bbx15=this;return  new Promise(function(_0x95bbx11,_0x95bbx12){return db[_0xbdaa[40]][_0xbdaa[42]]({raw:_0x95bbx10[_0xbdaa[30]]?(_0x95bbx10[_0xbdaa[30]][_0xbdaa[31]]=== undefined)?true:false:true,where:_0x95bbx10[_0xbdaa[30]]?_0x95bbx10[_0xbdaa[30]][_0xbdaa[32]]|| null:null,attributes:_0x95bbx10[_0xbdaa[30]]?_0x95bbx10[_0xbdaa[30]][_0xbdaa[33]]|| null:null,include:_0x95bbx10[_0xbdaa[30]]?(_0x95bbx10[_0xbdaa[30]][_0xbdaa[35]]?_[_0xbdaa[38]](_0x95bbx10[_0xbdaa[30]][_0xbdaa[35]],function(_0x95bbx16){return {model:db[_0x95bbx16[_0xbdaa[36]]],as:_0x95bbx16[_0xbdaa[37]],attributes:_0x95bbx16[_0xbdaa[33]],include:_0x95bbx16[_0xbdaa[35]]?_[_0xbdaa[38]](_0x95bbx16[_0xbdaa[35]],function(_0x95bbx17){return {model:db[_0x95bbx17[_0xbdaa[36]]],as:_0x95bbx17[_0xbdaa[37]],attributes:_0x95bbx17[_0xbdaa[33]],include:_0x95bbx17[_0xbdaa[35]]?_[_0xbdaa[38]](_0x95bbx17[_0xbdaa[35]],function(_0x95bbx18){return {model:db[_0x95bbx18[_0xbdaa[36]]],as:_0x95bbx18[_0xbdaa[37]],attributes:_0x95bbx18[_0xbdaa[33]]}}):[]}}):[]}}):[]):[]})[_0xbdaa[27]](function(_0x95bbx14){logger[_0xbdaa[20]](_0xbdaa[41],_0x95bbx10);logger[_0xbdaa[23]](_0xbdaa[41],_0x95bbx10,JSON[_0xbdaa[22]](_0x95bbx14));_0x95bbx11(_0x95bbx14)})[_0xbdaa[18]](function(_0x95bbx13){logger[_0xbdaa[17]](_0xbdaa[41],_0x95bbx13[_0xbdaa[25]],_0x95bbx10);_0x95bbx12(_0x95bbx15[_0xbdaa[17]](500,_0x95bbx13[_0xbdaa[25]]))})})}
\ No newline at end of file
index 8bf7536..56fea8f 100644 (file)
@@ -1 +1 @@
-var _0xc653=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x73\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x2F\x3A\x69\x64\x2F\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x74\x61\x67\x73","\x67\x65\x74\x54\x61\x67\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x73\x65\x74\x54\x61\x67\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc653[0];var multer=require(_0xc653[1]);var util=require(_0xc653[2]);var path=require(_0xc653[3]);var express=require(_0xc653[4]);var router=express.Router();var auth=require(_0xc653[5]);var interaction=require(_0xc653[6]);var config=require(_0xc653[7]);var controller=require(_0xc653[8]);router[_0xc653[12]](_0xc653[9],auth[_0xc653[10]](),controller[_0xc653[11]]);router[_0xc653[12]](_0xc653[13],auth[_0xc653[10]](),controller[_0xc653[14]]);router[_0xc653[12]](_0xc653[15],auth[_0xc653[10]](),controller[_0xc653[16]]);router[_0xc653[12]](_0xc653[17],auth[_0xc653[10]](),controller[_0xc653[18]]);router[_0xc653[12]](_0xc653[19],auth[_0xc653[10]](),controller[_0xc653[20]]);router[_0xc653[12]](_0xc653[21],auth[_0xc653[10]](),controller[_0xc653[22]]);router[_0xc653[24]](_0xc653[9],auth[_0xc653[10]](),controller[_0xc653[23]]);router[_0xc653[24]](_0xc653[21],auth[_0xc653[10]](),controller[_0xc653[25]]);router[_0xc653[27]](_0xc653[13],auth[_0xc653[10]](),controller[_0xc653[26]]);router[_0xc653[29]](_0xc653[13],auth[_0xc653[10]](),controller[_0xc653[28]]);module[_0xc653[30]]= router
\ No newline at end of file
+var _0x302a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x73\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x2F\x3A\x69\x64\x2F\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x74\x61\x67\x73","\x67\x65\x74\x54\x61\x67\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x73\x65\x74\x54\x61\x67\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x302a[0];var multer=require(_0x302a[1]);var util=require(_0x302a[2]);var path=require(_0x302a[3]);var express=require(_0x302a[4]);var router=express.Router();var auth=require(_0x302a[5]);var interaction=require(_0x302a[6]);var config=require(_0x302a[7]);var controller=require(_0x302a[8]);router[_0x302a[12]](_0x302a[9],auth[_0x302a[10]](),controller[_0x302a[11]]);router[_0x302a[12]](_0x302a[13],auth[_0x302a[10]](),controller[_0x302a[14]]);router[_0x302a[12]](_0x302a[15],auth[_0x302a[10]](),controller[_0x302a[16]]);router[_0x302a[12]](_0x302a[17],auth[_0x302a[10]](),controller[_0x302a[18]]);router[_0x302a[12]](_0x302a[19],auth[_0x302a[10]](),controller[_0x302a[20]]);router[_0x302a[12]](_0x302a[21],auth[_0x302a[10]](),controller[_0x302a[22]]);router[_0x302a[24]](_0x302a[9],auth[_0x302a[10]](),controller[_0x302a[23]]);router[_0x302a[24]](_0x302a[21],auth[_0x302a[10]](),controller[_0x302a[25]]);router[_0x302a[27]](_0x302a[13],auth[_0x302a[10]](),controller[_0x302a[26]]);router[_0x302a[29]](_0x302a[13],auth[_0x302a[10]](),controller[_0x302a[28]]);module[_0x302a[30]]= router
\ No newline at end of file
index 86eeec7..9016536 100644 (file)
@@ -1 +1 @@
-var _0x821a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0x821a[0];var Sequelize=require(_0x821a[1]);module[_0x821a[2]]= {name:{type:Sequelize[_0x821a[3]]},description:{type:Sequelize[_0x821a[3]]}}
\ No newline at end of file
+var _0xe965=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0xe965[0];var Sequelize=require(_0xe965[1]);module[_0xe965[2]]= {name:{type:Sequelize[_0xe965[3]]},description:{type:Sequelize[_0xe965[3]]}}
\ No newline at end of file
index 129ac9f..53d4cf0 100644 (file)
@@ -1 +1 @@
-var _0x4ff4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x54\x61\x67\x73","\x54\x61\x67","\x73\x65\x74\x54\x61\x67\x73","\x69\x64\x73"];_0x4ff4[0];var jsonpatch=require(_0x4ff4[1]);var rp=require(_0x4ff4[2]);var moment=require(_0x4ff4[3]);var BPromise=require(_0x4ff4[4]);var Mustache=require(_0x4ff4[5]);var util=require(_0x4ff4[6]);var path=require(_0x4ff4[7]);var sox=require(_0x4ff4[8]);var csv=require(_0x4ff4[9]);var ejs=require(_0x4ff4[10]);var fs=require(_0x4ff4[11]);var _=require(_0x4ff4[12]);var squel=require(_0x4ff4[13]);var crypto=require(_0x4ff4[14]);var jsforce=require(_0x4ff4[15]);var deskjs=require(_0x4ff4[16]);var toCsv=require(_0x4ff4[9]);var querystring=require(_0x4ff4[17]);var Papa=require(_0x4ff4[18]);var qs=require(_0x4ff4[19]);var logger=require(_0x4ff4[21])(_0x4ff4[20]);var utils=require(_0x4ff4[22]);var config=require(_0x4ff4[23]);var db=require(_0x4ff4[25])[_0x4ff4[24]];var jayson=require(_0x4ff4[26]);var client=jayson[_0x4ff4[28]][_0x4ff4[27]]({port:9002});function respondWithRpcPromise(_0x7ef1x1c,_0x7ef1x1d,_0x7ef1x1e,_0x7ef1x1f){return  new BPromise(function(_0x7ef1x20,_0x7ef1x21){var _0x7ef1x22=(_0x7ef1x1f|| client);return _0x7ef1x22[_0x4ff4[41]](_0x7ef1x1c,_0x7ef1x1e)[_0x4ff4[40]](function(_0x7ef1x24){logger[_0x4ff4[33]](_0x4ff4[29],_0x7ef1x1d,_0x4ff4[32]);logger[_0x4ff4[36]](_0x4ff4[34],_0x7ef1x1d,_0x4ff4[32],JSON[_0x4ff4[35]](_0x7ef1x24));if(_0x7ef1x24[_0x4ff4[30]]){if(_0x7ef1x24[_0x4ff4[30]][_0x4ff4[37]]=== 500){logger[_0x4ff4[30]](_0x4ff4[29],_0x7ef1x1d,_0x7ef1x24[_0x4ff4[30]][_0x4ff4[38]]);return _0x7ef1x21(_0x7ef1x24[_0x4ff4[30]][_0x4ff4[38]])};logger[_0x4ff4[30]](_0x4ff4[29],_0x7ef1x1d,_0x7ef1x24[_0x4ff4[30]][_0x4ff4[38]]);return _0x7ef1x20(_0x7ef1x24[_0x4ff4[30]][_0x4ff4[38]])}else {logger[_0x4ff4[33]](_0x4ff4[29],_0x7ef1x1d,_0x4ff4[32]);_0x7ef1x20(_0x7ef1x24[_0x4ff4[39]][_0x4ff4[38]])}})[_0x4ff4[31]](function(_0x7ef1x23){logger[_0x4ff4[30]](_0x4ff4[29],_0x7ef1x1d,_0x7ef1x23);_0x7ef1x21(_0x7ef1x23)})})}function respondWithStatusCode(_0x7ef1x24,_0x7ef1x26){_0x7ef1x26= _0x7ef1x26|| 204;return function(_0x7ef1x27){if(_0x7ef1x27){return _0x7ef1x24[_0x4ff4[42]](_0x7ef1x26)};return _0x7ef1x24[_0x4ff4[44]](_0x7ef1x26)[_0x4ff4[43]]()}}function respondWithResult(_0x7ef1x24,_0x7ef1x26){_0x7ef1x26= _0x7ef1x26|| 200;return function(_0x7ef1x27){if(_0x7ef1x27){return _0x7ef1x24[_0x4ff4[44]](_0x7ef1x26)[_0x4ff4[45]](_0x7ef1x27)}}}function respondWithFilteredResult(_0x7ef1x24,_0x7ef1x2a){return function(_0x7ef1x27){if(_0x7ef1x27){var _0x7ef1x2b=_0x7ef1x27[_0x4ff4[46]],_0x7ef1x2c=_0x7ef1x2a[_0x4ff4[47]],_0x7ef1x2d=_0x7ef1x2a[_0x4ff4[47]]+ _0x7ef1x2a[_0x4ff4[48]],_0x7ef1x26;if(_0x7ef1x2d>= _0x7ef1x2b){_0x7ef1x2d= _0x7ef1x2b;_0x7ef1x26= 200}else {_0x7ef1x26= 206};_0x7ef1x24[_0x4ff4[44]](_0x7ef1x26);return _0x7ef1x24[_0x4ff4[52]](_0x4ff4[49],_0x7ef1x2c+ _0x4ff4[50]+ _0x7ef1x2d+ _0x4ff4[51]+ _0x7ef1x2b)[_0x4ff4[45]](_0x7ef1x27)};return null}}function patchUpdates(_0x7ef1x2f){return function(_0x7ef1x27){try{jsonpatch[_0x4ff4[53]](_0x7ef1x27,_0x7ef1x2f,true)}catch(err){return BPromise[_0x4ff4[54]](err)};return _0x7ef1x27[_0x4ff4[55]]()}}function saveUpdates(_0x7ef1x31,_0x7ef1x26){return function(_0x7ef1x27){if(_0x7ef1x27){return _0x7ef1x27[_0x4ff4[56]](_0x7ef1x31)[_0x4ff4[40]](function(_0x7ef1x32){return _0x7ef1x32})};return null}}function removeEntity(_0x7ef1x24,_0x7ef1x26){return function(_0x7ef1x27){if(_0x7ef1x27){return _0x7ef1x27[_0x4ff4[57]]()[_0x4ff4[40]](function(){_0x7ef1x24[_0x4ff4[44]](204)[_0x4ff4[43]]()})}}}function handleEntityNotFound(_0x7ef1x24,_0x7ef1x26){return function(_0x7ef1x27){if(!_0x7ef1x27){_0x7ef1x24[_0x4ff4[42]](404)};return _0x7ef1x27}}function handleError(_0x7ef1x24,_0x7ef1x26){_0x7ef1x26= _0x7ef1x26|| 500;return function(_0x7ef1x23){logger[_0x4ff4[30]](_0x7ef1x23[_0x4ff4[58]]);if(_0x7ef1x23[_0x4ff4[59]]){delete _0x7ef1x23[_0x4ff4[59]]};_0x7ef1x24[_0x4ff4[44]](_0x7ef1x26)[_0x4ff4[60]](_0x7ef1x23)}}exports[_0x4ff4[61]]= function(_0x7ef1x1e,_0x7ef1x24){var _0x7ef1x2a={},_0x7ef1x36={},_0x7ef1x37={count:0,rows:[]};_0x7ef1x36[_0x4ff4[62]]= _[_0x4ff4[65]](db[_0x4ff4[64]][_0x4ff4[63]]);var _0x7ef1x38={dateStart:_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[66]],dateEnd:_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[68]]};delete _0x7ef1x1e[_0x4ff4[67]][_0x4ff4[66]];delete _0x7ef1x1e[_0x4ff4[67]][_0x4ff4[68]];_0x7ef1x36[_0x4ff4[67]]= _[_0x4ff4[65]](_0x7ef1x1e[_0x4ff4[67]]);_0x7ef1x36[_0x4ff4[69]]= _[_0x4ff4[70]](_0x7ef1x36[_0x4ff4[62]],_0x7ef1x36[_0x4ff4[67]]);_0x7ef1x2a[_0x4ff4[71]]= _[_0x4ff4[70]](_0x7ef1x36[_0x4ff4[62]],qs[_0x4ff4[72]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[72]]));_0x7ef1x2a[_0x4ff4[71]]= (_0x7ef1x2a[_0x4ff4[71]][_0x4ff4[73]])?_0x7ef1x2a[_0x4ff4[71]]:_0x7ef1x36[_0x4ff4[62]];if(!_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[75]](_0x4ff4[74])){_0x7ef1x2a[_0x4ff4[48]]= qs[_0x4ff4[48]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[48]]);_0x7ef1x2a[_0x4ff4[47]]= qs[_0x4ff4[47]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[47]])};_0x7ef1x2a[_0x4ff4[76]]= qs[_0x4ff4[77]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[77]]);_0x7ef1x2a[_0x4ff4[78]]= qs[_0x4ff4[69]](_[_0x4ff4[79]](_0x7ef1x1e[_0x4ff4[67]],_0x7ef1x36[_0x4ff4[69]]));if(_0x7ef1x38[_0x4ff4[66]]){if(_0x7ef1x38[_0x4ff4[68]]){_0x7ef1x38[_0x4ff4[68]]= moment(_0x7ef1x38[_0x4ff4[68]])[_0x4ff4[81]](1,_0x4ff4[80])}else {_0x7ef1x38[_0x4ff4[68]]= moment(_0x7ef1x38[_0x4ff4[66]])[_0x4ff4[81]](1,_0x4ff4[80])};_[_0x4ff4[82]](_0x7ef1x2a[_0x4ff4[78]],{createdAt:{$gte:_0x7ef1x38[_0x4ff4[66]],$lte:_0x7ef1x38[_0x4ff4[68]]}})};if(_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[83]]){_0x7ef1x2a[_0x4ff4[78]]= _[_0x4ff4[82]](_0x7ef1x2a[_0x4ff4[78]],{$or:_[_0x4ff4[85]](_0x7ef1x2a[_0x4ff4[71]],function(_0x7ef1x39){var _0x7ef1x37={};_0x7ef1x37[_0x7ef1x39]= {$like:_0x4ff4[84]+ _0x7ef1x1e[_0x4ff4[67]][_0x4ff4[83]]+ _0x4ff4[84]};return _0x7ef1x37})})};_0x7ef1x2a= _[_0x4ff4[82]]({},_0x7ef1x2a,_0x7ef1x1e[_0x4ff4[86]]);var _0x7ef1x3a={where:_0x7ef1x2a[_0x4ff4[78]]};return db[_0x4ff4[64]][_0x4ff4[46]](_0x7ef1x3a)[_0x4ff4[40]](function(_0x7ef1x2b){_0x7ef1x37[_0x4ff4[46]]= _0x7ef1x2b;if(_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[88]]){_0x7ef1x2a[_0x4ff4[89]]= [{all:true}]};return db[_0x4ff4[64]][_0x4ff4[90]](_0x7ef1x2a)})[_0x4ff4[40]](function(_0x7ef1x3b){_0x7ef1x37[_0x4ff4[87]]= _0x7ef1x3b;return _0x7ef1x37})[_0x4ff4[40]](respondWithFilteredResult(_0x7ef1x24,_0x7ef1x2a))[_0x4ff4[31]](handleError(_0x7ef1x24,null))};exports[_0x4ff4[91]]= function(_0x7ef1x1e,_0x7ef1x24){var _0x7ef1x2a={raw:false,where:{id:_0x7ef1x1e[_0x4ff4[93]][_0x4ff4[92]]}},_0x7ef1x36={};_0x7ef1x36[_0x4ff4[62]]= _[_0x4ff4[65]](db[_0x4ff4[64]][_0x4ff4[63]]);_0x7ef1x36[_0x4ff4[67]]= _[_0x4ff4[65]](_0x7ef1x1e[_0x4ff4[67]]);_0x7ef1x36[_0x4ff4[69]]= _[_0x4ff4[70]](_0x7ef1x36[_0x4ff4[62]],_0x7ef1x36[_0x4ff4[67]]);_0x7ef1x2a[_0x4ff4[71]]= _[_0x4ff4[70]](_0x7ef1x36[_0x4ff4[62]],qs[_0x4ff4[72]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[72]]));_0x7ef1x2a[_0x4ff4[71]]= (_0x7ef1x2a[_0x4ff4[71]][_0x4ff4[73]])?_0x7ef1x2a[_0x4ff4[71]]:_0x7ef1x36[_0x4ff4[62]];if(_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[88]]){_0x7ef1x2a[_0x4ff4[89]]= [{all:true}]};_0x7ef1x2a= _[_0x4ff4[82]]({},_0x7ef1x2a,_0x7ef1x1e[_0x4ff4[86]]);return db[_0x4ff4[64]][_0x4ff4[94]](_0x7ef1x2a)[_0x4ff4[40]](handleEntityNotFound(_0x7ef1x24,null))[_0x4ff4[40]](respondWithResult(_0x7ef1x24,null))[_0x4ff4[31]](handleError(_0x7ef1x24,null))};exports[_0x4ff4[95]]= function(_0x7ef1x1e,_0x7ef1x24){return db[_0x4ff4[64]][_0x4ff4[95]](_0x7ef1x1e[_0x4ff4[96]],{})[_0x4ff4[40]](respondWithResult(_0x7ef1x24,201))[_0x4ff4[31]](handleError(_0x7ef1x24,null))};exports[_0x4ff4[56]]= function(_0x7ef1x1e,_0x7ef1x24){if(_0x7ef1x1e[_0x4ff4[96]][_0x4ff4[92]]){delete _0x7ef1x1e[_0x4ff4[96]][_0x4ff4[92]]};return db[_0x4ff4[64]][_0x4ff4[94]]({where:{id:_0x7ef1x1e[_0x4ff4[93]][_0x4ff4[92]]}})[_0x4ff4[40]](handleEntityNotFound(_0x7ef1x24,null))[_0x4ff4[40]](saveUpdates(_0x7ef1x1e[_0x4ff4[96]],null))[_0x4ff4[40]](respondWithResult(_0x7ef1x24,null))[_0x4ff4[31]](handleError(_0x7ef1x24,null))};exports[_0x4ff4[57]]= function(_0x7ef1x1e,_0x7ef1x24){return db[_0x4ff4[64]][_0x4ff4[94]]({where:{id:_0x7ef1x1e[_0x4ff4[93]][_0x4ff4[92]]}})[_0x4ff4[40]](handleEntityNotFound(_0x7ef1x24,null))[_0x4ff4[40]](removeEntity(_0x7ef1x24,null))[_0x4ff4[31]](handleError(_0x7ef1x24,null))};exports[_0x4ff4[97]]= function(_0x7ef1x1e,_0x7ef1x27,_0x7ef1x3c){var _0x7ef1x2a={};var _0x7ef1x36={};var _0x7ef1x3d;var _0x7ef1x2b;return db[_0x4ff4[64]][_0x4ff4[99]]({where:{id:_0x7ef1x1e[_0x4ff4[93]][_0x4ff4[92]]}})[_0x4ff4[40]](handleEntityNotFound(_0x7ef1x27,null))[_0x4ff4[40]](function(_0x7ef1x27){if(_0x7ef1x27){_0x7ef1x3d= _0x7ef1x27;_0x7ef1x36[_0x4ff4[62]]= _[_0x4ff4[65]](db[_0x4ff4[98]][_0x4ff4[63]]);_0x7ef1x36[_0x4ff4[67]]= _[_0x4ff4[65]](_0x7ef1x1e[_0x4ff4[67]]);_0x7ef1x36[_0x4ff4[69]]= _[_0x4ff4[70]](_0x7ef1x36[_0x4ff4[62]],_0x7ef1x36[_0x4ff4[67]]);_0x7ef1x2a[_0x4ff4[71]]= _[_0x4ff4[70]](_0x7ef1x36[_0x4ff4[62]],qs[_0x4ff4[72]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[72]]));_0x7ef1x2a[_0x4ff4[71]]= (_0x7ef1x2a[_0x4ff4[71]][_0x4ff4[73]])?_0x7ef1x2a[_0x4ff4[71]]:_0x7ef1x36[_0x4ff4[62]];_0x7ef1x2a[_0x4ff4[76]]= qs[_0x4ff4[77]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[77]]);_0x7ef1x2a[_0x4ff4[78]]= qs[_0x4ff4[69]](_[_0x4ff4[79]](_0x7ef1x1e[_0x4ff4[67]],_0x7ef1x36[_0x4ff4[69]]));if(_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[83]]){_0x7ef1x2a[_0x4ff4[78]]= _[_0x4ff4[82]](_0x7ef1x2a[_0x4ff4[78]],{$or:_[_0x4ff4[85]](_0x7ef1x2a[_0x4ff4[71]],function(_0x7ef1x39){var _0x7ef1x37={};_0x7ef1x37[_0x7ef1x39]= {$like:_0x4ff4[84]+ _0x7ef1x1e[_0x4ff4[67]][_0x4ff4[83]]+ _0x4ff4[84]};return _0x7ef1x37})})};_0x7ef1x2a= _[_0x4ff4[82]]({},_0x7ef1x2a,_0x7ef1x1e[_0x4ff4[86]]);return _0x7ef1x3d[_0x4ff4[97]](_0x7ef1x2a)}})[_0x4ff4[40]](function(_0x7ef1x3e){if(_0x7ef1x3e){_0x7ef1x2b= _0x7ef1x3e[_0x4ff4[73]];if(!_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[75]](_0x4ff4[74])){_0x7ef1x2a[_0x4ff4[48]]= qs[_0x4ff4[48]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[48]]);_0x7ef1x2a[_0x4ff4[47]]= qs[_0x4ff4[47]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[47]])};return _0x7ef1x3d[_0x4ff4[97]](_0x7ef1x2a)}})[_0x4ff4[40]](function(_0x7ef1x3b){if(_0x7ef1x3b){return _0x7ef1x3b?{count:_0x7ef1x2b,rows:_0x7ef1x3b}:null}})[_0x4ff4[40]](respondWithResult(_0x7ef1x27,null))[_0x4ff4[31]](handleError(_0x7ef1x27,null))};exports[_0x4ff4[100]]= function(_0x7ef1x1e,_0x7ef1x27,_0x7ef1x3c){var _0x7ef1x2a={};var _0x7ef1x36={};var _0x7ef1x3d;var _0x7ef1x2b;return db[_0x4ff4[64]][_0x4ff4[99]]({where:{id:_0x7ef1x1e[_0x4ff4[93]][_0x4ff4[92]]}})[_0x4ff4[40]](handleEntityNotFound(_0x7ef1x27,null))[_0x4ff4[40]](function(_0x7ef1x27){if(_0x7ef1x27){_0x7ef1x3d= _0x7ef1x27;_0x7ef1x36[_0x4ff4[62]]= _[_0x4ff4[65]](db[_0x4ff4[98]][_0x4ff4[63]]);_0x7ef1x36[_0x4ff4[67]]= _[_0x4ff4[65]](_0x7ef1x1e[_0x4ff4[67]]);_0x7ef1x36[_0x4ff4[69]]= _[_0x4ff4[70]](_0x7ef1x36[_0x4ff4[62]],_0x7ef1x36[_0x4ff4[67]]);_0x7ef1x2a[_0x4ff4[71]]= _[_0x4ff4[70]](_0x7ef1x36[_0x4ff4[62]],qs[_0x4ff4[72]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[72]]));_0x7ef1x2a[_0x4ff4[71]]= (_0x7ef1x2a[_0x4ff4[71]][_0x4ff4[73]])?_0x7ef1x2a[_0x4ff4[71]]:_0x7ef1x36[_0x4ff4[62]];_0x7ef1x2a[_0x4ff4[76]]= qs[_0x4ff4[77]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[77]]);_0x7ef1x2a[_0x4ff4[78]]= qs[_0x4ff4[69]](_[_0x4ff4[79]](_0x7ef1x1e[_0x4ff4[67]],_0x7ef1x36[_0x4ff4[69]]));if(_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[83]]){_0x7ef1x2a[_0x4ff4[78]]= _[_0x4ff4[82]](_0x7ef1x2a[_0x4ff4[78]],{$or:_[_0x4ff4[85]](_0x7ef1x2a[_0x4ff4[71]],function(_0x7ef1x39){var _0x7ef1x37={};_0x7ef1x37[_0x7ef1x39]= {$like:_0x4ff4[84]+ _0x7ef1x1e[_0x4ff4[67]][_0x4ff4[83]]+ _0x4ff4[84]};return _0x7ef1x37})})};_0x7ef1x2a= _[_0x4ff4[82]]({},_0x7ef1x2a,_0x7ef1x1e[_0x4ff4[86]]);return _0x7ef1x3d[_0x4ff4[100]](_0x7ef1x2a)}})[_0x4ff4[40]](function(_0x7ef1x3e){if(_0x7ef1x3e){_0x7ef1x2b= _0x7ef1x3e[_0x4ff4[73]];if(!_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[75]](_0x4ff4[74])){_0x7ef1x2a[_0x4ff4[48]]= qs[_0x4ff4[48]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[48]]);_0x7ef1x2a[_0x4ff4[47]]= qs[_0x4ff4[47]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[47]])};return _0x7ef1x3d[_0x4ff4[100]](_0x7ef1x2a)}})[_0x4ff4[40]](function(_0x7ef1x3b){if(_0x7ef1x3b){return _0x7ef1x3b?{count:_0x7ef1x2b,rows:_0x7ef1x3b}:null}})[_0x4ff4[40]](respondWithResult(_0x7ef1x27,null))[_0x4ff4[31]](handleError(_0x7ef1x27,null))};exports[_0x4ff4[101]]= function(_0x7ef1x1e,_0x7ef1x27,_0x7ef1x3c){var _0x7ef1x2a={};var _0x7ef1x36={};var _0x7ef1x3d;var _0x7ef1x2b;return db[_0x4ff4[64]][_0x4ff4[99]]({where:{id:_0x7ef1x1e[_0x4ff4[93]][_0x4ff4[92]]}})[_0x4ff4[40]](handleEntityNotFound(_0x7ef1x27,null))[_0x4ff4[40]](function(_0x7ef1x27){if(_0x7ef1x27){_0x7ef1x3d= _0x7ef1x27;_0x7ef1x36[_0x4ff4[62]]= _[_0x4ff4[65]](db[_0x4ff4[98]][_0x4ff4[63]]);_0x7ef1x36[_0x4ff4[67]]= _[_0x4ff4[65]](_0x7ef1x1e[_0x4ff4[67]]);_0x7ef1x36[_0x4ff4[69]]= _[_0x4ff4[70]](_0x7ef1x36[_0x4ff4[62]],_0x7ef1x36[_0x4ff4[67]]);_0x7ef1x2a[_0x4ff4[71]]= _[_0x4ff4[70]](_0x7ef1x36[_0x4ff4[62]],qs[_0x4ff4[72]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[72]]));_0x7ef1x2a[_0x4ff4[71]]= (_0x7ef1x2a[_0x4ff4[71]][_0x4ff4[73]])?_0x7ef1x2a[_0x4ff4[71]]:_0x7ef1x36[_0x4ff4[62]];_0x7ef1x2a[_0x4ff4[76]]= qs[_0x4ff4[77]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[77]]);_0x7ef1x2a[_0x4ff4[78]]= qs[_0x4ff4[69]](_[_0x4ff4[79]](_0x7ef1x1e[_0x4ff4[67]],_0x7ef1x36[_0x4ff4[69]]));if(_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[83]]){_0x7ef1x2a[_0x4ff4[78]]= _[_0x4ff4[82]](_0x7ef1x2a[_0x4ff4[78]],{$or:_[_0x4ff4[85]](_0x7ef1x2a[_0x4ff4[71]],function(_0x7ef1x39){var _0x7ef1x37={};_0x7ef1x37[_0x7ef1x39]= {$like:_0x4ff4[84]+ _0x7ef1x1e[_0x4ff4[67]][_0x4ff4[83]]+ _0x4ff4[84]};return _0x7ef1x37})})};_0x7ef1x2a= _[_0x4ff4[82]]({},_0x7ef1x2a,_0x7ef1x1e[_0x4ff4[86]]);return _0x7ef1x3d[_0x4ff4[101]](_0x7ef1x2a)}})[_0x4ff4[40]](function(_0x7ef1x3e){if(_0x7ef1x3e){_0x7ef1x2b= _0x7ef1x3e[_0x4ff4[73]];if(!_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[75]](_0x4ff4[74])){_0x7ef1x2a[_0x4ff4[48]]= qs[_0x4ff4[48]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[48]]);_0x7ef1x2a[_0x4ff4[47]]= qs[_0x4ff4[47]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[47]])};return _0x7ef1x3d[_0x4ff4[101]](_0x7ef1x2a)}})[_0x4ff4[40]](function(_0x7ef1x3b){if(_0x7ef1x3b){return _0x7ef1x3b?{count:_0x7ef1x2b,rows:_0x7ef1x3b}:null}})[_0x4ff4[40]](respondWithResult(_0x7ef1x27,null))[_0x4ff4[31]](handleError(_0x7ef1x27,null))};exports[_0x4ff4[102]]= function(_0x7ef1x1e,_0x7ef1x27,_0x7ef1x3c){var _0x7ef1x2a={};var _0x7ef1x36={};var _0x7ef1x3d;var _0x7ef1x2b;return db[_0x4ff4[64]][_0x4ff4[99]]({where:{id:_0x7ef1x1e[_0x4ff4[93]][_0x4ff4[92]]}})[_0x4ff4[40]](handleEntityNotFound(_0x7ef1x27,null))[_0x4ff4[40]](function(_0x7ef1x27){if(_0x7ef1x27){_0x7ef1x3d= _0x7ef1x27;_0x7ef1x36[_0x4ff4[62]]= _[_0x4ff4[65]](db[_0x4ff4[103]][_0x4ff4[63]]);_0x7ef1x36[_0x4ff4[67]]= _[_0x4ff4[65]](_0x7ef1x1e[_0x4ff4[67]]);_0x7ef1x36[_0x4ff4[69]]= _[_0x4ff4[70]](_0x7ef1x36[_0x4ff4[62]],_0x7ef1x36[_0x4ff4[67]]);_0x7ef1x2a[_0x4ff4[71]]= _[_0x4ff4[70]](_0x7ef1x36[_0x4ff4[62]],qs[_0x4ff4[72]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[72]]));_0x7ef1x2a[_0x4ff4[71]]= (_0x7ef1x2a[_0x4ff4[71]][_0x4ff4[73]])?_0x7ef1x2a[_0x4ff4[71]]:_0x7ef1x36[_0x4ff4[62]];_0x7ef1x2a[_0x4ff4[76]]= qs[_0x4ff4[77]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[77]]);_0x7ef1x2a[_0x4ff4[78]]= qs[_0x4ff4[69]](_[_0x4ff4[79]](_0x7ef1x1e[_0x4ff4[67]],_0x7ef1x36[_0x4ff4[69]]));if(_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[83]]){_0x7ef1x2a[_0x4ff4[78]]= _[_0x4ff4[82]](_0x7ef1x2a[_0x4ff4[78]],{$or:_[_0x4ff4[85]](_0x7ef1x2a[_0x4ff4[71]],function(_0x7ef1x39){var _0x7ef1x37={};_0x7ef1x37[_0x7ef1x39]= {$like:_0x4ff4[84]+ _0x7ef1x1e[_0x4ff4[67]][_0x4ff4[83]]+ _0x4ff4[84]};return _0x7ef1x37})})};_0x7ef1x2a= _[_0x4ff4[82]]({},_0x7ef1x2a,_0x7ef1x1e[_0x4ff4[86]]);return _0x7ef1x3d[_0x4ff4[102]](_0x7ef1x2a)}})[_0x4ff4[40]](function(_0x7ef1x3e){if(_0x7ef1x3e){_0x7ef1x2b= _0x7ef1x3e[_0x4ff4[73]];if(!_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[75]](_0x4ff4[74])){_0x7ef1x2a[_0x4ff4[48]]= qs[_0x4ff4[48]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[48]]);_0x7ef1x2a[_0x4ff4[47]]= qs[_0x4ff4[47]](_0x7ef1x1e[_0x4ff4[67]][_0x4ff4[47]])};return _0x7ef1x3d[_0x4ff4[102]](_0x7ef1x2a)}})[_0x4ff4[40]](function(_0x7ef1x3b){if(_0x7ef1x3b){return _0x7ef1x3b?{count:_0x7ef1x2b,rows:_0x7ef1x3b}:null}})[_0x4ff4[40]](respondWithResult(_0x7ef1x27,null))[_0x4ff4[31]](handleError(_0x7ef1x27,null))};exports[_0x4ff4[104]]= function(_0x7ef1x1e,_0x7ef1x24,_0x7ef1x3c){if(_0x7ef1x1e[_0x4ff4[96]][_0x4ff4[92]]){delete _0x7ef1x1e[_0x4ff4[96]][_0x4ff4[92]]};return db[_0x4ff4[64]][_0x4ff4[99]]({where:{id:_0x7ef1x1e[_0x4ff4[93]][_0x4ff4[92]]}})[_0x4ff4[40]](handleEntityNotFound(_0x7ef1x24,null))[_0x4ff4[40]](function(_0x7ef1x27){if(_0x7ef1x27){return _0x7ef1x27[_0x4ff4[104]](_0x7ef1x1e[_0x4ff4[96]][_0x4ff4[105]])};return null})[_0x4ff4[40]](respondWithResult(_0x7ef1x24,null))[_0x4ff4[31]](handleError(_0x7ef1x24,null))}
\ No newline at end of file
+var _0x9892=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x54\x61\x67\x73","\x54\x61\x67","\x73\x65\x74\x54\x61\x67\x73","\x69\x64\x73"];_0x9892[0];var jsonpatch=require(_0x9892[1]);var rp=require(_0x9892[2]);var moment=require(_0x9892[3]);var BPromise=require(_0x9892[4]);var Mustache=require(_0x9892[5]);var util=require(_0x9892[6]);var path=require(_0x9892[7]);var sox=require(_0x9892[8]);var csv=require(_0x9892[9]);var ejs=require(_0x9892[10]);var fs=require(_0x9892[11]);var _=require(_0x9892[12]);var squel=require(_0x9892[13]);var crypto=require(_0x9892[14]);var jsforce=require(_0x9892[15]);var deskjs=require(_0x9892[16]);var toCsv=require(_0x9892[9]);var querystring=require(_0x9892[17]);var Papa=require(_0x9892[18]);var qs=require(_0x9892[19]);var logger=require(_0x9892[21])(_0x9892[20]);var utils=require(_0x9892[22]);var config=require(_0x9892[23]);var db=require(_0x9892[25])[_0x9892[24]];var jayson=require(_0x9892[26]);var client=jayson[_0x9892[28]][_0x9892[27]]({port:9002});function respondWithRpcPromise(_0xfc44x1c,_0xfc44x1d,_0xfc44x1e,_0xfc44x1f){return  new BPromise(function(_0xfc44x20,_0xfc44x21){var _0xfc44x22=(_0xfc44x1f|| client);return _0xfc44x22[_0x9892[41]](_0xfc44x1c,_0xfc44x1e)[_0x9892[40]](function(_0xfc44x24){logger[_0x9892[33]](_0x9892[29],_0xfc44x1d,_0x9892[32]);logger[_0x9892[36]](_0x9892[34],_0xfc44x1d,_0x9892[32],JSON[_0x9892[35]](_0xfc44x24));if(_0xfc44x24[_0x9892[30]]){if(_0xfc44x24[_0x9892[30]][_0x9892[37]]=== 500){logger[_0x9892[30]](_0x9892[29],_0xfc44x1d,_0xfc44x24[_0x9892[30]][_0x9892[38]]);return _0xfc44x21(_0xfc44x24[_0x9892[30]][_0x9892[38]])};logger[_0x9892[30]](_0x9892[29],_0xfc44x1d,_0xfc44x24[_0x9892[30]][_0x9892[38]]);return _0xfc44x20(_0xfc44x24[_0x9892[30]][_0x9892[38]])}else {logger[_0x9892[33]](_0x9892[29],_0xfc44x1d,_0x9892[32]);_0xfc44x20(_0xfc44x24[_0x9892[39]][_0x9892[38]])}})[_0x9892[31]](function(_0xfc44x23){logger[_0x9892[30]](_0x9892[29],_0xfc44x1d,_0xfc44x23);_0xfc44x21(_0xfc44x23)})})}function respondWithStatusCode(_0xfc44x24,_0xfc44x26){_0xfc44x26= _0xfc44x26|| 204;return function(_0xfc44x27){if(_0xfc44x27){return _0xfc44x24[_0x9892[42]](_0xfc44x26)};return _0xfc44x24[_0x9892[44]](_0xfc44x26)[_0x9892[43]]()}}function respondWithResult(_0xfc44x24,_0xfc44x26){_0xfc44x26= _0xfc44x26|| 200;return function(_0xfc44x27){if(_0xfc44x27){return _0xfc44x24[_0x9892[44]](_0xfc44x26)[_0x9892[45]](_0xfc44x27)}}}function respondWithFilteredResult(_0xfc44x24,_0xfc44x2a){return function(_0xfc44x27){if(_0xfc44x27){var _0xfc44x2b=_0xfc44x27[_0x9892[46]],_0xfc44x2c=_0xfc44x2a[_0x9892[47]],_0xfc44x2d=_0xfc44x2a[_0x9892[47]]+ _0xfc44x2a[_0x9892[48]],_0xfc44x26;if(_0xfc44x2d>= _0xfc44x2b){_0xfc44x2d= _0xfc44x2b;_0xfc44x26= 200}else {_0xfc44x26= 206};_0xfc44x24[_0x9892[44]](_0xfc44x26);return _0xfc44x24[_0x9892[52]](_0x9892[49],_0xfc44x2c+ _0x9892[50]+ _0xfc44x2d+ _0x9892[51]+ _0xfc44x2b)[_0x9892[45]](_0xfc44x27)};return null}}function patchUpdates(_0xfc44x2f){return function(_0xfc44x27){try{jsonpatch[_0x9892[53]](_0xfc44x27,_0xfc44x2f,true)}catch(err){return BPromise[_0x9892[54]](err)};return _0xfc44x27[_0x9892[55]]()}}function saveUpdates(_0xfc44x31,_0xfc44x26){return function(_0xfc44x27){if(_0xfc44x27){return _0xfc44x27[_0x9892[56]](_0xfc44x31)[_0x9892[40]](function(_0xfc44x32){return _0xfc44x32})};return null}}function removeEntity(_0xfc44x24,_0xfc44x26){return function(_0xfc44x27){if(_0xfc44x27){return _0xfc44x27[_0x9892[57]]()[_0x9892[40]](function(){_0xfc44x24[_0x9892[44]](204)[_0x9892[43]]()})}}}function handleEntityNotFound(_0xfc44x24,_0xfc44x26){return function(_0xfc44x27){if(!_0xfc44x27){_0xfc44x24[_0x9892[42]](404)};return _0xfc44x27}}function handleError(_0xfc44x24,_0xfc44x26){_0xfc44x26= _0xfc44x26|| 500;return function(_0xfc44x23){logger[_0x9892[30]](_0xfc44x23[_0x9892[58]]);if(_0xfc44x23[_0x9892[59]]){delete _0xfc44x23[_0x9892[59]]};_0xfc44x24[_0x9892[44]](_0xfc44x26)[_0x9892[60]](_0xfc44x23)}}exports[_0x9892[61]]= function(_0xfc44x1e,_0xfc44x24){var _0xfc44x2a={},_0xfc44x36={},_0xfc44x37={count:0,rows:[]};_0xfc44x36[_0x9892[62]]= _[_0x9892[65]](db[_0x9892[64]][_0x9892[63]]);var _0xfc44x38={dateStart:_0xfc44x1e[_0x9892[67]][_0x9892[66]],dateEnd:_0xfc44x1e[_0x9892[67]][_0x9892[68]]};delete _0xfc44x1e[_0x9892[67]][_0x9892[66]];delete _0xfc44x1e[_0x9892[67]][_0x9892[68]];_0xfc44x36[_0x9892[67]]= _[_0x9892[65]](_0xfc44x1e[_0x9892[67]]);_0xfc44x36[_0x9892[69]]= _[_0x9892[70]](_0xfc44x36[_0x9892[62]],_0xfc44x36[_0x9892[67]]);_0xfc44x2a[_0x9892[71]]= _[_0x9892[70]](_0xfc44x36[_0x9892[62]],qs[_0x9892[72]](_0xfc44x1e[_0x9892[67]][_0x9892[72]]));_0xfc44x2a[_0x9892[71]]= (_0xfc44x2a[_0x9892[71]][_0x9892[73]])?_0xfc44x2a[_0x9892[71]]:_0xfc44x36[_0x9892[62]];if(!_0xfc44x1e[_0x9892[67]][_0x9892[75]](_0x9892[74])){_0xfc44x2a[_0x9892[48]]= qs[_0x9892[48]](_0xfc44x1e[_0x9892[67]][_0x9892[48]]);_0xfc44x2a[_0x9892[47]]= qs[_0x9892[47]](_0xfc44x1e[_0x9892[67]][_0x9892[47]])};_0xfc44x2a[_0x9892[76]]= qs[_0x9892[77]](_0xfc44x1e[_0x9892[67]][_0x9892[77]]);_0xfc44x2a[_0x9892[78]]= qs[_0x9892[69]](_[_0x9892[79]](_0xfc44x1e[_0x9892[67]],_0xfc44x36[_0x9892[69]]));if(_0xfc44x38[_0x9892[66]]){if(_0xfc44x38[_0x9892[68]]){_0xfc44x38[_0x9892[68]]= moment(_0xfc44x38[_0x9892[68]])[_0x9892[81]](1,_0x9892[80])}else {_0xfc44x38[_0x9892[68]]= moment(_0xfc44x38[_0x9892[66]])[_0x9892[81]](1,_0x9892[80])};_[_0x9892[82]](_0xfc44x2a[_0x9892[78]],{createdAt:{$gte:_0xfc44x38[_0x9892[66]],$lte:_0xfc44x38[_0x9892[68]]}})};if(_0xfc44x1e[_0x9892[67]][_0x9892[83]]){_0xfc44x2a[_0x9892[78]]= _[_0x9892[82]](_0xfc44x2a[_0x9892[78]],{$or:_[_0x9892[85]](_0xfc44x2a[_0x9892[71]],function(_0xfc44x39){var _0xfc44x37={};_0xfc44x37[_0xfc44x39]= {$like:_0x9892[84]+ _0xfc44x1e[_0x9892[67]][_0x9892[83]]+ _0x9892[84]};return _0xfc44x37})})};_0xfc44x2a= _[_0x9892[82]]({},_0xfc44x2a,_0xfc44x1e[_0x9892[86]]);var _0xfc44x3a={where:_0xfc44x2a[_0x9892[78]]};return db[_0x9892[64]][_0x9892[46]](_0xfc44x3a)[_0x9892[40]](function(_0xfc44x2b){_0xfc44x37[_0x9892[46]]= _0xfc44x2b;if(_0xfc44x1e[_0x9892[67]][_0x9892[88]]){_0xfc44x2a[_0x9892[89]]= [{all:true}]};return db[_0x9892[64]][_0x9892[90]](_0xfc44x2a)})[_0x9892[40]](function(_0xfc44x3b){_0xfc44x37[_0x9892[87]]= _0xfc44x3b;return _0xfc44x37})[_0x9892[40]](respondWithFilteredResult(_0xfc44x24,_0xfc44x2a))[_0x9892[31]](handleError(_0xfc44x24,null))};exports[_0x9892[91]]= function(_0xfc44x1e,_0xfc44x24){var _0xfc44x2a={raw:false,where:{id:_0xfc44x1e[_0x9892[93]][_0x9892[92]]}},_0xfc44x36={};_0xfc44x36[_0x9892[62]]= _[_0x9892[65]](db[_0x9892[64]][_0x9892[63]]);_0xfc44x36[_0x9892[67]]= _[_0x9892[65]](_0xfc44x1e[_0x9892[67]]);_0xfc44x36[_0x9892[69]]= _[_0x9892[70]](_0xfc44x36[_0x9892[62]],_0xfc44x36[_0x9892[67]]);_0xfc44x2a[_0x9892[71]]= _[_0x9892[70]](_0xfc44x36[_0x9892[62]],qs[_0x9892[72]](_0xfc44x1e[_0x9892[67]][_0x9892[72]]));_0xfc44x2a[_0x9892[71]]= (_0xfc44x2a[_0x9892[71]][_0x9892[73]])?_0xfc44x2a[_0x9892[71]]:_0xfc44x36[_0x9892[62]];if(_0xfc44x1e[_0x9892[67]][_0x9892[88]]){_0xfc44x2a[_0x9892[89]]= [{all:true}]};_0xfc44x2a= _[_0x9892[82]]({},_0xfc44x2a,_0xfc44x1e[_0x9892[86]]);return db[_0x9892[64]][_0x9892[94]](_0xfc44x2a)[_0x9892[40]](handleEntityNotFound(_0xfc44x24,null))[_0x9892[40]](respondWithResult(_0xfc44x24,null))[_0x9892[31]](handleError(_0xfc44x24,null))};exports[_0x9892[95]]= function(_0xfc44x1e,_0xfc44x24){return db[_0x9892[64]][_0x9892[95]](_0xfc44x1e[_0x9892[96]],{})[_0x9892[40]](respondWithResult(_0xfc44x24,201))[_0x9892[31]](handleError(_0xfc44x24,null))};exports[_0x9892[56]]= function(_0xfc44x1e,_0xfc44x24){if(_0xfc44x1e[_0x9892[96]][_0x9892[92]]){delete _0xfc44x1e[_0x9892[96]][_0x9892[92]]};return db[_0x9892[64]][_0x9892[94]]({where:{id:_0xfc44x1e[_0x9892[93]][_0x9892[92]]}})[_0x9892[40]](handleEntityNotFound(_0xfc44x24,null))[_0x9892[40]](saveUpdates(_0xfc44x1e[_0x9892[96]],null))[_0x9892[40]](respondWithResult(_0xfc44x24,null))[_0x9892[31]](handleError(_0xfc44x24,null))};exports[_0x9892[57]]= function(_0xfc44x1e,_0xfc44x24){return db[_0x9892[64]][_0x9892[94]]({where:{id:_0xfc44x1e[_0x9892[93]][_0x9892[92]]}})[_0x9892[40]](handleEntityNotFound(_0xfc44x24,null))[_0x9892[40]](removeEntity(_0xfc44x24,null))[_0x9892[31]](handleError(_0xfc44x24,null))};exports[_0x9892[97]]= function(_0xfc44x1e,_0xfc44x27,_0xfc44x3c){var _0xfc44x2a={};var _0xfc44x36={};var _0xfc44x3d;var _0xfc44x2b;return db[_0x9892[64]][_0x9892[99]]({where:{id:_0xfc44x1e[_0x9892[93]][_0x9892[92]]}})[_0x9892[40]](handleEntityNotFound(_0xfc44x27,null))[_0x9892[40]](function(_0xfc44x27){if(_0xfc44x27){_0xfc44x3d= _0xfc44x27;_0xfc44x36[_0x9892[62]]= _[_0x9892[65]](db[_0x9892[98]][_0x9892[63]]);_0xfc44x36[_0x9892[67]]= _[_0x9892[65]](_0xfc44x1e[_0x9892[67]]);_0xfc44x36[_0x9892[69]]= _[_0x9892[70]](_0xfc44x36[_0x9892[62]],_0xfc44x36[_0x9892[67]]);_0xfc44x2a[_0x9892[71]]= _[_0x9892[70]](_0xfc44x36[_0x9892[62]],qs[_0x9892[72]](_0xfc44x1e[_0x9892[67]][_0x9892[72]]));_0xfc44x2a[_0x9892[71]]= (_0xfc44x2a[_0x9892[71]][_0x9892[73]])?_0xfc44x2a[_0x9892[71]]:_0xfc44x36[_0x9892[62]];_0xfc44x2a[_0x9892[76]]= qs[_0x9892[77]](_0xfc44x1e[_0x9892[67]][_0x9892[77]]);_0xfc44x2a[_0x9892[78]]= qs[_0x9892[69]](_[_0x9892[79]](_0xfc44x1e[_0x9892[67]],_0xfc44x36[_0x9892[69]]));if(_0xfc44x1e[_0x9892[67]][_0x9892[83]]){_0xfc44x2a[_0x9892[78]]= _[_0x9892[82]](_0xfc44x2a[_0x9892[78]],{$or:_[_0x9892[85]](_0xfc44x2a[_0x9892[71]],function(_0xfc44x39){var _0xfc44x37={};_0xfc44x37[_0xfc44x39]= {$like:_0x9892[84]+ _0xfc44x1e[_0x9892[67]][_0x9892[83]]+ _0x9892[84]};return _0xfc44x37})})};_0xfc44x2a= _[_0x9892[82]]({},_0xfc44x2a,_0xfc44x1e[_0x9892[86]]);return _0xfc44x3d[_0x9892[97]](_0xfc44x2a)}})[_0x9892[40]](function(_0xfc44x3e){if(_0xfc44x3e){_0xfc44x2b= _0xfc44x3e[_0x9892[73]];if(!_0xfc44x1e[_0x9892[67]][_0x9892[75]](_0x9892[74])){_0xfc44x2a[_0x9892[48]]= qs[_0x9892[48]](_0xfc44x1e[_0x9892[67]][_0x9892[48]]);_0xfc44x2a[_0x9892[47]]= qs[_0x9892[47]](_0xfc44x1e[_0x9892[67]][_0x9892[47]])};return _0xfc44x3d[_0x9892[97]](_0xfc44x2a)}})[_0x9892[40]](function(_0xfc44x3b){if(_0xfc44x3b){return _0xfc44x3b?{count:_0xfc44x2b,rows:_0xfc44x3b}:null}})[_0x9892[40]](respondWithResult(_0xfc44x27,null))[_0x9892[31]](handleError(_0xfc44x27,null))};exports[_0x9892[100]]= function(_0xfc44x1e,_0xfc44x27,_0xfc44x3c){var _0xfc44x2a={};var _0xfc44x36={};var _0xfc44x3d;var _0xfc44x2b;return db[_0x9892[64]][_0x9892[99]]({where:{id:_0xfc44x1e[_0x9892[93]][_0x9892[92]]}})[_0x9892[40]](handleEntityNotFound(_0xfc44x27,null))[_0x9892[40]](function(_0xfc44x27){if(_0xfc44x27){_0xfc44x3d= _0xfc44x27;_0xfc44x36[_0x9892[62]]= _[_0x9892[65]](db[_0x9892[98]][_0x9892[63]]);_0xfc44x36[_0x9892[67]]= _[_0x9892[65]](_0xfc44x1e[_0x9892[67]]);_0xfc44x36[_0x9892[69]]= _[_0x9892[70]](_0xfc44x36[_0x9892[62]],_0xfc44x36[_0x9892[67]]);_0xfc44x2a[_0x9892[71]]= _[_0x9892[70]](_0xfc44x36[_0x9892[62]],qs[_0x9892[72]](_0xfc44x1e[_0x9892[67]][_0x9892[72]]));_0xfc44x2a[_0x9892[71]]= (_0xfc44x2a[_0x9892[71]][_0x9892[73]])?_0xfc44x2a[_0x9892[71]]:_0xfc44x36[_0x9892[62]];_0xfc44x2a[_0x9892[76]]= qs[_0x9892[77]](_0xfc44x1e[_0x9892[67]][_0x9892[77]]);_0xfc44x2a[_0x9892[78]]= qs[_0x9892[69]](_[_0x9892[79]](_0xfc44x1e[_0x9892[67]],_0xfc44x36[_0x9892[69]]));if(_0xfc44x1e[_0x9892[67]][_0x9892[83]]){_0xfc44x2a[_0x9892[78]]= _[_0x9892[82]](_0xfc44x2a[_0x9892[78]],{$or:_[_0x9892[85]](_0xfc44x2a[_0x9892[71]],function(_0xfc44x39){var _0xfc44x37={};_0xfc44x37[_0xfc44x39]= {$like:_0x9892[84]+ _0xfc44x1e[_0x9892[67]][_0x9892[83]]+ _0x9892[84]};return _0xfc44x37})})};_0xfc44x2a= _[_0x9892[82]]({},_0xfc44x2a,_0xfc44x1e[_0x9892[86]]);return _0xfc44x3d[_0x9892[100]](_0xfc44x2a)}})[_0x9892[40]](function(_0xfc44x3e){if(_0xfc44x3e){_0xfc44x2b= _0xfc44x3e[_0x9892[73]];if(!_0xfc44x1e[_0x9892[67]][_0x9892[75]](_0x9892[74])){_0xfc44x2a[_0x9892[48]]= qs[_0x9892[48]](_0xfc44x1e[_0x9892[67]][_0x9892[48]]);_0xfc44x2a[_0x9892[47]]= qs[_0x9892[47]](_0xfc44x1e[_0x9892[67]][_0x9892[47]])};return _0xfc44x3d[_0x9892[100]](_0xfc44x2a)}})[_0x9892[40]](function(_0xfc44x3b){if(_0xfc44x3b){return _0xfc44x3b?{count:_0xfc44x2b,rows:_0xfc44x3b}:null}})[_0x9892[40]](respondWithResult(_0xfc44x27,null))[_0x9892[31]](handleError(_0xfc44x27,null))};exports[_0x9892[101]]= function(_0xfc44x1e,_0xfc44x27,_0xfc44x3c){var _0xfc44x2a={};var _0xfc44x36={};var _0xfc44x3d;var _0xfc44x2b;return db[_0x9892[64]][_0x9892[99]]({where:{id:_0xfc44x1e[_0x9892[93]][_0x9892[92]]}})[_0x9892[40]](handleEntityNotFound(_0xfc44x27,null))[_0x9892[40]](function(_0xfc44x27){if(_0xfc44x27){_0xfc44x3d= _0xfc44x27;_0xfc44x36[_0x9892[62]]= _[_0x9892[65]](db[_0x9892[98]][_0x9892[63]]);_0xfc44x36[_0x9892[67]]= _[_0x9892[65]](_0xfc44x1e[_0x9892[67]]);_0xfc44x36[_0x9892[69]]= _[_0x9892[70]](_0xfc44x36[_0x9892[62]],_0xfc44x36[_0x9892[67]]);_0xfc44x2a[_0x9892[71]]= _[_0x9892[70]](_0xfc44x36[_0x9892[62]],qs[_0x9892[72]](_0xfc44x1e[_0x9892[67]][_0x9892[72]]));_0xfc44x2a[_0x9892[71]]= (_0xfc44x2a[_0x9892[71]][_0x9892[73]])?_0xfc44x2a[_0x9892[71]]:_0xfc44x36[_0x9892[62]];_0xfc44x2a[_0x9892[76]]= qs[_0x9892[77]](_0xfc44x1e[_0x9892[67]][_0x9892[77]]);_0xfc44x2a[_0x9892[78]]= qs[_0x9892[69]](_[_0x9892[79]](_0xfc44x1e[_0x9892[67]],_0xfc44x36[_0x9892[69]]));if(_0xfc44x1e[_0x9892[67]][_0x9892[83]]){_0xfc44x2a[_0x9892[78]]= _[_0x9892[82]](_0xfc44x2a[_0x9892[78]],{$or:_[_0x9892[85]](_0xfc44x2a[_0x9892[71]],function(_0xfc44x39){var _0xfc44x37={};_0xfc44x37[_0xfc44x39]= {$like:_0x9892[84]+ _0xfc44x1e[_0x9892[67]][_0x9892[83]]+ _0x9892[84]};return _0xfc44x37})})};_0xfc44x2a= _[_0x9892[82]]({},_0xfc44x2a,_0xfc44x1e[_0x9892[86]]);return _0xfc44x3d[_0x9892[101]](_0xfc44x2a)}})[_0x9892[40]](function(_0xfc44x3e){if(_0xfc44x3e){_0xfc44x2b= _0xfc44x3e[_0x9892[73]];if(!_0xfc44x1e[_0x9892[67]][_0x9892[75]](_0x9892[74])){_0xfc44x2a[_0x9892[48]]= qs[_0x9892[48]](_0xfc44x1e[_0x9892[67]][_0x9892[48]]);_0xfc44x2a[_0x9892[47]]= qs[_0x9892[47]](_0xfc44x1e[_0x9892[67]][_0x9892[47]])};return _0xfc44x3d[_0x9892[101]](_0xfc44x2a)}})[_0x9892[40]](function(_0xfc44x3b){if(_0xfc44x3b){return _0xfc44x3b?{count:_0xfc44x2b,rows:_0xfc44x3b}:null}})[_0x9892[40]](respondWithResult(_0xfc44x27,null))[_0x9892[31]](handleError(_0xfc44x27,null))};exports[_0x9892[102]]= function(_0xfc44x1e,_0xfc44x27,_0xfc44x3c){var _0xfc44x2a={};var _0xfc44x36={};var _0xfc44x3d;var _0xfc44x2b;return db[_0x9892[64]][_0x9892[99]]({where:{id:_0xfc44x1e[_0x9892[93]][_0x9892[92]]}})[_0x9892[40]](handleEntityNotFound(_0xfc44x27,null))[_0x9892[40]](function(_0xfc44x27){if(_0xfc44x27){_0xfc44x3d= _0xfc44x27;_0xfc44x36[_0x9892[62]]= _[_0x9892[65]](db[_0x9892[103]][_0x9892[63]]);_0xfc44x36[_0x9892[67]]= _[_0x9892[65]](_0xfc44x1e[_0x9892[67]]);_0xfc44x36[_0x9892[69]]= _[_0x9892[70]](_0xfc44x36[_0x9892[62]],_0xfc44x36[_0x9892[67]]);_0xfc44x2a[_0x9892[71]]= _[_0x9892[70]](_0xfc44x36[_0x9892[62]],qs[_0x9892[72]](_0xfc44x1e[_0x9892[67]][_0x9892[72]]));_0xfc44x2a[_0x9892[71]]= (_0xfc44x2a[_0x9892[71]][_0x9892[73]])?_0xfc44x2a[_0x9892[71]]:_0xfc44x36[_0x9892[62]];_0xfc44x2a[_0x9892[76]]= qs[_0x9892[77]](_0xfc44x1e[_0x9892[67]][_0x9892[77]]);_0xfc44x2a[_0x9892[78]]= qs[_0x9892[69]](_[_0x9892[79]](_0xfc44x1e[_0x9892[67]],_0xfc44x36[_0x9892[69]]));if(_0xfc44x1e[_0x9892[67]][_0x9892[83]]){_0xfc44x2a[_0x9892[78]]= _[_0x9892[82]](_0xfc44x2a[_0x9892[78]],{$or:_[_0x9892[85]](_0xfc44x2a[_0x9892[71]],function(_0xfc44x39){var _0xfc44x37={};_0xfc44x37[_0xfc44x39]= {$like:_0x9892[84]+ _0xfc44x1e[_0x9892[67]][_0x9892[83]]+ _0x9892[84]};return _0xfc44x37})})};_0xfc44x2a= _[_0x9892[82]]({},_0xfc44x2a,_0xfc44x1e[_0x9892[86]]);return _0xfc44x3d[_0x9892[102]](_0xfc44x2a)}})[_0x9892[40]](function(_0xfc44x3e){if(_0xfc44x3e){_0xfc44x2b= _0xfc44x3e[_0x9892[73]];if(!_0xfc44x1e[_0x9892[67]][_0x9892[75]](_0x9892[74])){_0xfc44x2a[_0x9892[48]]= qs[_0x9892[48]](_0xfc44x1e[_0x9892[67]][_0x9892[48]]);_0xfc44x2a[_0x9892[47]]= qs[_0x9892[47]](_0xfc44x1e[_0x9892[67]][_0x9892[47]])};return _0xfc44x3d[_0x9892[102]](_0xfc44x2a)}})[_0x9892[40]](function(_0xfc44x3b){if(_0xfc44x3b){return _0xfc44x3b?{count:_0xfc44x2b,rows:_0xfc44x3b}:null}})[_0x9892[40]](respondWithResult(_0xfc44x27,null))[_0x9892[31]](handleError(_0xfc44x27,null))};exports[_0x9892[104]]= function(_0xfc44x1e,_0xfc44x24,_0xfc44x3c){if(_0xfc44x1e[_0x9892[96]][_0x9892[92]]){delete _0xfc44x1e[_0x9892[96]][_0x9892[92]]};return db[_0x9892[64]][_0x9892[99]]({where:{id:_0xfc44x1e[_0x9892[93]][_0x9892[92]]}})[_0x9892[40]](handleEntityNotFound(_0xfc44x24,null))[_0x9892[40]](function(_0xfc44x27){if(_0xfc44x27){return _0xfc44x27[_0x9892[104]](_0xfc44x1e[_0x9892[96]][_0x9892[105]])};return null})[_0x9892[40]](respondWithResult(_0xfc44x24,null))[_0x9892[31]](handleError(_0xfc44x24,null))}
\ No newline at end of file
index 1269129..f8bdd67 100644 (file)
@@ -1 +1 @@
-var _0x50dc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x69\x6E\x74\x5F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x50dc[0];var _=require(_0x50dc[1]);var util=require(_0x50dc[2]);var logger=require(_0x50dc[4])(_0x50dc[3]);var moment=require(_0x50dc[5]);var BPromise=require(_0x50dc[6]);var rp=require(_0x50dc[7]);var attributes=require(_0x50dc[8]);module[_0x50dc[9]]= function(_0x666ex8,_0x666ex9){return _0x666ex8[_0x50dc[12]](_0x50dc[10],attributes,{tableName:_0x50dc[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x43ed=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x69\x6E\x74\x5F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x43ed[0];var _=require(_0x43ed[1]);var util=require(_0x43ed[2]);var logger=require(_0x43ed[4])(_0x43ed[3]);var moment=require(_0x43ed[5]);var BPromise=require(_0x43ed[6]);var rp=require(_0x43ed[7]);var attributes=require(_0x43ed[8]);module[_0x43ed[9]]= function(_0x9d33x8,_0x9d33x9){return _0x9d33x8[_0x43ed[12]](_0x43ed[10],attributes,{tableName:_0x43ed[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 55863b1..706b4e0 100644 (file)
@@ -1 +1 @@
-var _0x2d9c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x2d9c[0];var _=require(_0x2d9c[1]);var util=require(_0x2d9c[2]);var moment=require(_0x2d9c[3]);var BPromise=require(_0x2d9c[4]);var rs=require(_0x2d9c[5]);var fs=require(_0x2d9c[6]);var db=require(_0x2d9c[8])[_0x2d9c[7]];var utils=require(_0x2d9c[9]);var logger=require(_0x2d9c[11])(_0x2d9c[10]);var config=require(_0x2d9c[12]);var jayson=require(_0x2d9c[13]);var client=jayson[_0x2d9c[15]][_0x2d9c[14]]({port:9002});function respondWithRpcPromise(_0xba45xe,_0xba45xf,_0xba45x10){return  new BPromise(function(_0xba45x11,_0xba45x12){return client[_0x2d9c[28]](_0xba45xe,_0xba45x10)[_0x2d9c[27]](function(_0xba45x14){logger[_0x2d9c[20]](_0x2d9c[16],_0xba45xf,_0x2d9c[19]);logger[_0x2d9c[23]](_0x2d9c[21],_0xba45xf,_0x2d9c[19],JSON[_0x2d9c[22]](_0xba45x14));if(_0xba45x14[_0x2d9c[17]]){if(_0xba45x14[_0x2d9c[17]][_0x2d9c[24]]=== 500){logger[_0x2d9c[17]](_0x2d9c[16],_0xba45xf,_0xba45x14[_0x2d9c[17]][_0x2d9c[25]]);return _0xba45x12(_0xba45x14[_0x2d9c[17]][_0x2d9c[25]])};logger[_0x2d9c[17]](_0x2d9c[16],_0xba45xf,_0xba45x14[_0x2d9c[17]][_0x2d9c[25]]);return _0xba45x11(_0xba45x14[_0x2d9c[17]][_0x2d9c[25]])}else {logger[_0x2d9c[20]](_0x2d9c[16],_0xba45xf,_0x2d9c[19]);_0xba45x11(_0xba45x14[_0x2d9c[26]][_0x2d9c[25]])}})[_0x2d9c[18]](function(_0xba45x13){logger[_0x2d9c[17]](_0x2d9c[16],_0xba45xf,_0xba45x13);_0xba45x12(_0xba45x13)})})}
\ No newline at end of file
+var _0xbbe8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xbbe8[0];var _=require(_0xbbe8[1]);var util=require(_0xbbe8[2]);var moment=require(_0xbbe8[3]);var BPromise=require(_0xbbe8[4]);var rs=require(_0xbbe8[5]);var fs=require(_0xbbe8[6]);var db=require(_0xbbe8[8])[_0xbbe8[7]];var utils=require(_0xbbe8[9]);var logger=require(_0xbbe8[11])(_0xbbe8[10]);var config=require(_0xbbe8[12]);var jayson=require(_0xbbe8[13]);var client=jayson[_0xbbe8[15]][_0xbbe8[14]]({port:9002});function respondWithRpcPromise(_0x4696xe,_0x4696xf,_0x4696x10){return  new BPromise(function(_0x4696x11,_0x4696x12){return client[_0xbbe8[28]](_0x4696xe,_0x4696x10)[_0xbbe8[27]](function(_0x4696x14){logger[_0xbbe8[20]](_0xbbe8[16],_0x4696xf,_0xbbe8[19]);logger[_0xbbe8[23]](_0xbbe8[21],_0x4696xf,_0xbbe8[19],JSON[_0xbbe8[22]](_0x4696x14));if(_0x4696x14[_0xbbe8[17]]){if(_0x4696x14[_0xbbe8[17]][_0xbbe8[24]]=== 500){logger[_0xbbe8[17]](_0xbbe8[16],_0x4696xf,_0x4696x14[_0xbbe8[17]][_0xbbe8[25]]);return _0x4696x12(_0x4696x14[_0xbbe8[17]][_0xbbe8[25]])};logger[_0xbbe8[17]](_0xbbe8[16],_0x4696xf,_0x4696x14[_0xbbe8[17]][_0xbbe8[25]]);return _0x4696x11(_0x4696x14[_0xbbe8[17]][_0xbbe8[25]])}else {logger[_0xbbe8[20]](_0xbbe8[16],_0x4696xf,_0xbbe8[19]);_0x4696x11(_0x4696x14[_0xbbe8[26]][_0xbbe8[25]])}})[_0xbbe8[18]](function(_0x4696x13){logger[_0xbbe8[17]](_0xbbe8[16],_0x4696xf,_0x4696x13);_0x4696x12(_0x4696x13)})})}
\ No newline at end of file
index 8265629..354b70a 100644 (file)
@@ -1 +1 @@
-var _0x9e7f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9e7f[0];var multer=require(_0x9e7f[1]);var util=require(_0x9e7f[2]);var path=require(_0x9e7f[3]);var express=require(_0x9e7f[4]);var router=express.Router();var auth=require(_0x9e7f[5]);var interaction=require(_0x9e7f[6]);var config=require(_0x9e7f[7]);var controller=require(_0x9e7f[8]);router[_0x9e7f[12]](_0x9e7f[9],auth[_0x9e7f[10]](),controller[_0x9e7f[11]]);router[_0x9e7f[12]](_0x9e7f[13],auth[_0x9e7f[10]](),controller[_0x9e7f[14]]);router[_0x9e7f[16]](_0x9e7f[9],auth[_0x9e7f[10]](),controller[_0x9e7f[15]]);router[_0x9e7f[18]](_0x9e7f[13],auth[_0x9e7f[10]](),controller[_0x9e7f[17]]);router[_0x9e7f[20]](_0x9e7f[13],auth[_0x9e7f[10]](),controller[_0x9e7f[19]]);module[_0x9e7f[21]]= router
\ No newline at end of file
+var _0x8f7e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x8f7e[0];var multer=require(_0x8f7e[1]);var util=require(_0x8f7e[2]);var path=require(_0x8f7e[3]);var express=require(_0x8f7e[4]);var router=express.Router();var auth=require(_0x8f7e[5]);var interaction=require(_0x8f7e[6]);var config=require(_0x8f7e[7]);var controller=require(_0x8f7e[8]);router[_0x8f7e[12]](_0x8f7e[9],auth[_0x8f7e[10]](),controller[_0x8f7e[11]]);router[_0x8f7e[12]](_0x8f7e[13],auth[_0x8f7e[10]](),controller[_0x8f7e[14]]);router[_0x8f7e[16]](_0x8f7e[9],auth[_0x8f7e[10]](),controller[_0x8f7e[15]]);router[_0x8f7e[18]](_0x8f7e[13],auth[_0x8f7e[10]](),controller[_0x8f7e[17]]);router[_0x8f7e[20]](_0x8f7e[13],auth[_0x8f7e[10]](),controller[_0x8f7e[19]]);module[_0x8f7e[21]]= router
\ No newline at end of file
index 8232340..3751fc8 100644 (file)
@@ -1 +1 @@
-var _0x41fc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x73\x74\x72\x69\x6E\x67","\x76\x61\x72\x69\x61\x62\x6C\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x41fc[0];var Sequelize=require(_0x41fc[1]);module[_0x41fc[2]]= {type:{type:Sequelize.ENUM(_0x41fc[3],_0x41fc[4],_0x41fc[5],_0x41fc[6]),defaultValue:_0x41fc[3]},content:{type:Sequelize[_0x41fc[7]]},key:{type:Sequelize[_0x41fc[7]]},keyType:{type:Sequelize.ENUM(_0x41fc[3],_0x41fc[4],_0x41fc[5])},keyContent:{type:Sequelize[_0x41fc[7]]},idField:{type:Sequelize[_0x41fc[7]]},nameField:{type:Sequelize[_0x41fc[7]]},customField:{type:Sequelize[_0x41fc[8]],defaultValue:true},variableName:{type:Sequelize[_0x41fc[7]]}}
\ No newline at end of file
+var _0x8dc9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x73\x74\x72\x69\x6E\x67","\x76\x61\x72\x69\x61\x62\x6C\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x8dc9[0];var Sequelize=require(_0x8dc9[1]);module[_0x8dc9[2]]= {type:{type:Sequelize.ENUM(_0x8dc9[3],_0x8dc9[4],_0x8dc9[5],_0x8dc9[6]),defaultValue:_0x8dc9[3]},content:{type:Sequelize[_0x8dc9[7]]},key:{type:Sequelize[_0x8dc9[7]]},keyType:{type:Sequelize.ENUM(_0x8dc9[3],_0x8dc9[4],_0x8dc9[5])},keyContent:{type:Sequelize[_0x8dc9[7]]},idField:{type:Sequelize[_0x8dc9[7]]},nameField:{type:Sequelize[_0x8dc9[7]]},customField:{type:Sequelize[_0x8dc9[8]],defaultValue:true},variableName:{type:Sequelize[_0x8dc9[7]]}}
\ No newline at end of file
index 1caf143..8b52b9c 100644 (file)
@@ -1 +1 @@
-var _0x6e10=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x6e10[0];var jsonpatch=require(_0x6e10[1]);var rp=require(_0x6e10[2]);var moment=require(_0x6e10[3]);var BPromise=require(_0x6e10[4]);var Mustache=require(_0x6e10[5]);var util=require(_0x6e10[6]);var path=require(_0x6e10[7]);var sox=require(_0x6e10[8]);var csv=require(_0x6e10[9]);var ejs=require(_0x6e10[10]);var fs=require(_0x6e10[11]);var _=require(_0x6e10[12]);var squel=require(_0x6e10[13]);var crypto=require(_0x6e10[14]);var jsforce=require(_0x6e10[15]);var deskjs=require(_0x6e10[16]);var toCsv=require(_0x6e10[9]);var querystring=require(_0x6e10[17]);var Papa=require(_0x6e10[18]);var qs=require(_0x6e10[19]);var logger=require(_0x6e10[21])(_0x6e10[20]);var utils=require(_0x6e10[22]);var config=require(_0x6e10[23]);var db=require(_0x6e10[25])[_0x6e10[24]];function respondWithStatusCode(_0x72d2x1a,_0x72d2x1b){_0x72d2x1b= _0x72d2x1b|| 204;return function(_0x72d2x1c){if(_0x72d2x1c){return _0x72d2x1a[_0x6e10[26]](_0x72d2x1b)};return _0x72d2x1a[_0x6e10[28]](_0x72d2x1b)[_0x6e10[27]]()}}function respondWithResult(_0x72d2x1a,_0x72d2x1b){_0x72d2x1b= _0x72d2x1b|| 200;return function(_0x72d2x1c){if(_0x72d2x1c){return _0x72d2x1a[_0x6e10[28]](_0x72d2x1b)[_0x6e10[29]](_0x72d2x1c)}}}function respondWithFilteredResult(_0x72d2x1a,_0x72d2x1f){return function(_0x72d2x1c){if(_0x72d2x1c){var _0x72d2x20=_0x72d2x1c[_0x6e10[30]],_0x72d2x21=_0x72d2x1f[_0x6e10[31]],_0x72d2x22=_0x72d2x1f[_0x6e10[31]]+ _0x72d2x1f[_0x6e10[32]],_0x72d2x1b;if(_0x72d2x22>= _0x72d2x20){_0x72d2x22= _0x72d2x20;_0x72d2x1b= 200}else {_0x72d2x1b= 206};_0x72d2x1a[_0x6e10[28]](_0x72d2x1b);return _0x72d2x1a[_0x6e10[36]](_0x6e10[33],_0x72d2x21+ _0x6e10[34]+ _0x72d2x22+ _0x6e10[35]+ _0x72d2x20)[_0x6e10[29]](_0x72d2x1c)};return null}}function patchUpdates(_0x72d2x24){return function(_0x72d2x1c){try{jsonpatch[_0x6e10[37]](_0x72d2x1c,_0x72d2x24,true)}catch(err){return BPromise[_0x6e10[38]](err)};return _0x72d2x1c[_0x6e10[39]]()}}function saveUpdates(_0x72d2x26,_0x72d2x1b){return function(_0x72d2x1c){if(_0x72d2x1c){return _0x72d2x1c[_0x6e10[41]](_0x72d2x26)[_0x6e10[40]](function(_0x72d2x27){return _0x72d2x27})};return null}}function removeEntity(_0x72d2x1a,_0x72d2x1b){return function(_0x72d2x1c){if(_0x72d2x1c){return _0x72d2x1c[_0x6e10[42]]()[_0x6e10[40]](function(){_0x72d2x1a[_0x6e10[28]](204)[_0x6e10[27]]()})}}}function handleEntityNotFound(_0x72d2x1a,_0x72d2x1b){return function(_0x72d2x1c){if(!_0x72d2x1c){_0x72d2x1a[_0x6e10[26]](404)};return _0x72d2x1c}}function handleError(_0x72d2x1a,_0x72d2x1b){_0x72d2x1b= _0x72d2x1b|| 500;return function(_0x72d2x2b){logger[_0x6e10[44]](_0x72d2x2b[_0x6e10[43]]);if(_0x72d2x2b[_0x6e10[45]]){delete _0x72d2x2b[_0x6e10[45]]};_0x72d2x1a[_0x6e10[28]](_0x72d2x1b)[_0x6e10[46]](_0x72d2x2b)}}exports[_0x6e10[47]]= function(_0x72d2x2c,_0x72d2x1a){var _0x72d2x1f={},_0x72d2x2d={},_0x72d2x2e={count:0,rows:[]};_0x72d2x2d[_0x6e10[48]]= _[_0x6e10[51]](db[_0x6e10[50]][_0x6e10[49]]);var _0x72d2x2f={dateStart:_0x72d2x2c[_0x6e10[53]][_0x6e10[52]],dateEnd:_0x72d2x2c[_0x6e10[53]][_0x6e10[54]]};delete _0x72d2x2c[_0x6e10[53]][_0x6e10[52]];delete _0x72d2x2c[_0x6e10[53]][_0x6e10[54]];_0x72d2x2d[_0x6e10[53]]= _[_0x6e10[51]](_0x72d2x2c[_0x6e10[53]]);_0x72d2x2d[_0x6e10[55]]= _[_0x6e10[56]](_0x72d2x2d[_0x6e10[48]],_0x72d2x2d[_0x6e10[53]]);_0x72d2x1f[_0x6e10[57]]= _[_0x6e10[56]](_0x72d2x2d[_0x6e10[48]],qs[_0x6e10[58]](_0x72d2x2c[_0x6e10[53]][_0x6e10[58]]));_0x72d2x1f[_0x6e10[57]]= (_0x72d2x1f[_0x6e10[57]][_0x6e10[59]])?_0x72d2x1f[_0x6e10[57]]:_0x72d2x2d[_0x6e10[48]];if(!_0x72d2x2c[_0x6e10[53]][_0x6e10[61]](_0x6e10[60])){_0x72d2x1f[_0x6e10[32]]= qs[_0x6e10[32]](_0x72d2x2c[_0x6e10[53]][_0x6e10[32]]);_0x72d2x1f[_0x6e10[31]]= qs[_0x6e10[31]](_0x72d2x2c[_0x6e10[53]][_0x6e10[31]])};_0x72d2x1f[_0x6e10[62]]= qs[_0x6e10[63]](_0x72d2x2c[_0x6e10[53]][_0x6e10[63]]);_0x72d2x1f[_0x6e10[64]]= qs[_0x6e10[55]](_[_0x6e10[65]](_0x72d2x2c[_0x6e10[53]],_0x72d2x2d[_0x6e10[55]]));if(_0x72d2x2f[_0x6e10[52]]){if(_0x72d2x2f[_0x6e10[54]]){_0x72d2x2f[_0x6e10[54]]= moment(_0x72d2x2f[_0x6e10[54]])[_0x6e10[67]](1,_0x6e10[66])}else {_0x72d2x2f[_0x6e10[54]]= moment(_0x72d2x2f[_0x6e10[52]])[_0x6e10[67]](1,_0x6e10[66])};_[_0x6e10[68]](_0x72d2x1f[_0x6e10[64]],{createdAt:{$gte:_0x72d2x2f[_0x6e10[52]],$lte:_0x72d2x2f[_0x6e10[54]]}})};if(_0x72d2x2c[_0x6e10[53]][_0x6e10[69]]){_0x72d2x1f[_0x6e10[64]]= _[_0x6e10[68]](_0x72d2x1f[_0x6e10[64]],{$or:_[_0x6e10[71]](_0x72d2x1f[_0x6e10[57]],function(_0x72d2x30){var _0x72d2x2e={};_0x72d2x2e[_0x72d2x30]= {$like:_0x6e10[70]+ _0x72d2x2c[_0x6e10[53]][_0x6e10[69]]+ _0x6e10[70]};return _0x72d2x2e})})};_0x72d2x1f= _[_0x6e10[68]]({},_0x72d2x1f,_0x72d2x2c[_0x6e10[72]]);var _0x72d2x31={where:_0x72d2x1f[_0x6e10[64]]};return db[_0x6e10[50]][_0x6e10[30]](_0x72d2x31)[_0x6e10[40]](function(_0x72d2x20){_0x72d2x2e[_0x6e10[30]]= _0x72d2x20;if(_0x72d2x2c[_0x6e10[53]][_0x6e10[75]]){_0x72d2x1f[_0x6e10[76]]= [{all:true}]};return db[_0x6e10[50]][_0x6e10[77]](_0x72d2x1f)})[_0x6e10[40]](function(_0x72d2x32){_0x72d2x2e[_0x6e10[74]]= _0x72d2x32;return _0x72d2x2e})[_0x6e10[40]](respondWithFilteredResult(_0x72d2x1a,_0x72d2x1f))[_0x6e10[73]](handleError(_0x72d2x1a,null))};exports[_0x6e10[78]]= function(_0x72d2x2c,_0x72d2x1a){var _0x72d2x1f={raw:true,where:{id:_0x72d2x2c[_0x6e10[80]][_0x6e10[79]]}},_0x72d2x2d={};_0x72d2x2d[_0x6e10[48]]= _[_0x6e10[51]](db[_0x6e10[50]][_0x6e10[49]]);_0x72d2x2d[_0x6e10[53]]= _[_0x6e10[51]](_0x72d2x2c[_0x6e10[53]]);_0x72d2x2d[_0x6e10[55]]= _[_0x6e10[56]](_0x72d2x2d[_0x6e10[48]],_0x72d2x2d[_0x6e10[53]]);_0x72d2x1f[_0x6e10[57]]= _[_0x6e10[56]](_0x72d2x2d[_0x6e10[48]],qs[_0x6e10[58]](_0x72d2x2c[_0x6e10[53]][_0x6e10[58]]));_0x72d2x1f[_0x6e10[57]]= (_0x72d2x1f[_0x6e10[57]][_0x6e10[59]])?_0x72d2x1f[_0x6e10[57]]:_0x72d2x2d[_0x6e10[48]];if(_0x72d2x2c[_0x6e10[53]][_0x6e10[75]]){_0x72d2x1f[_0x6e10[76]]= [{all:true}]};_0x72d2x1f= _[_0x6e10[68]]({},_0x72d2x1f,_0x72d2x2c[_0x6e10[72]]);return db[_0x6e10[50]][_0x6e10[81]](_0x72d2x1f)[_0x6e10[40]](handleEntityNotFound(_0x72d2x1a,null))[_0x6e10[40]](respondWithResult(_0x72d2x1a,null))[_0x6e10[73]](handleError(_0x72d2x1a,null))};exports[_0x6e10[82]]= function(_0x72d2x2c,_0x72d2x1a){return db[_0x6e10[50]][_0x6e10[82]](_0x72d2x2c[_0x6e10[83]],{})[_0x6e10[40]](respondWithResult(_0x72d2x1a,201))[_0x6e10[73]](handleError(_0x72d2x1a,null))};exports[_0x6e10[41]]= function(_0x72d2x2c,_0x72d2x1a){if(_0x72d2x2c[_0x6e10[83]][_0x6e10[79]]){delete _0x72d2x2c[_0x6e10[83]][_0x6e10[79]]};return db[_0x6e10[50]][_0x6e10[81]]({where:{id:_0x72d2x2c[_0x6e10[80]][_0x6e10[79]]}})[_0x6e10[40]](handleEntityNotFound(_0x72d2x1a,null))[_0x6e10[40]](saveUpdates(_0x72d2x2c[_0x6e10[83]],null))[_0x6e10[40]](respondWithResult(_0x72d2x1a,null))[_0x6e10[73]](handleError(_0x72d2x1a,null))};exports[_0x6e10[42]]= function(_0x72d2x2c,_0x72d2x1a){return db[_0x6e10[50]][_0x6e10[81]]({where:{id:_0x72d2x2c[_0x6e10[80]][_0x6e10[79]]}})[_0x6e10[40]](handleEntityNotFound(_0x72d2x1a,null))[_0x6e10[40]](removeEntity(_0x72d2x1a,null))[_0x6e10[73]](handleError(_0x72d2x1a,null))}
\ No newline at end of file
+var _0xbd63=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xbd63[0];var jsonpatch=require(_0xbd63[1]);var rp=require(_0xbd63[2]);var moment=require(_0xbd63[3]);var BPromise=require(_0xbd63[4]);var Mustache=require(_0xbd63[5]);var util=require(_0xbd63[6]);var path=require(_0xbd63[7]);var sox=require(_0xbd63[8]);var csv=require(_0xbd63[9]);var ejs=require(_0xbd63[10]);var fs=require(_0xbd63[11]);var _=require(_0xbd63[12]);var squel=require(_0xbd63[13]);var crypto=require(_0xbd63[14]);var jsforce=require(_0xbd63[15]);var deskjs=require(_0xbd63[16]);var toCsv=require(_0xbd63[9]);var querystring=require(_0xbd63[17]);var Papa=require(_0xbd63[18]);var qs=require(_0xbd63[19]);var logger=require(_0xbd63[21])(_0xbd63[20]);var utils=require(_0xbd63[22]);var config=require(_0xbd63[23]);var db=require(_0xbd63[25])[_0xbd63[24]];function respondWithStatusCode(_0xe8ebx1a,_0xe8ebx1b){_0xe8ebx1b= _0xe8ebx1b|| 204;return function(_0xe8ebx1c){if(_0xe8ebx1c){return _0xe8ebx1a[_0xbd63[26]](_0xe8ebx1b)};return _0xe8ebx1a[_0xbd63[28]](_0xe8ebx1b)[_0xbd63[27]]()}}function respondWithResult(_0xe8ebx1a,_0xe8ebx1b){_0xe8ebx1b= _0xe8ebx1b|| 200;return function(_0xe8ebx1c){if(_0xe8ebx1c){return _0xe8ebx1a[_0xbd63[28]](_0xe8ebx1b)[_0xbd63[29]](_0xe8ebx1c)}}}function respondWithFilteredResult(_0xe8ebx1a,_0xe8ebx1f){return function(_0xe8ebx1c){if(_0xe8ebx1c){var _0xe8ebx20=_0xe8ebx1c[_0xbd63[30]],_0xe8ebx21=_0xe8ebx1f[_0xbd63[31]],_0xe8ebx22=_0xe8ebx1f[_0xbd63[31]]+ _0xe8ebx1f[_0xbd63[32]],_0xe8ebx1b;if(_0xe8ebx22>= _0xe8ebx20){_0xe8ebx22= _0xe8ebx20;_0xe8ebx1b= 200}else {_0xe8ebx1b= 206};_0xe8ebx1a[_0xbd63[28]](_0xe8ebx1b);return _0xe8ebx1a[_0xbd63[36]](_0xbd63[33],_0xe8ebx21+ _0xbd63[34]+ _0xe8ebx22+ _0xbd63[35]+ _0xe8ebx20)[_0xbd63[29]](_0xe8ebx1c)};return null}}function patchUpdates(_0xe8ebx24){return function(_0xe8ebx1c){try{jsonpatch[_0xbd63[37]](_0xe8ebx1c,_0xe8ebx24,true)}catch(err){return BPromise[_0xbd63[38]](err)};return _0xe8ebx1c[_0xbd63[39]]()}}function saveUpdates(_0xe8ebx26,_0xe8ebx1b){return function(_0xe8ebx1c){if(_0xe8ebx1c){return _0xe8ebx1c[_0xbd63[41]](_0xe8ebx26)[_0xbd63[40]](function(_0xe8ebx27){return _0xe8ebx27})};return null}}function removeEntity(_0xe8ebx1a,_0xe8ebx1b){return function(_0xe8ebx1c){if(_0xe8ebx1c){return _0xe8ebx1c[_0xbd63[42]]()[_0xbd63[40]](function(){_0xe8ebx1a[_0xbd63[28]](204)[_0xbd63[27]]()})}}}function handleEntityNotFound(_0xe8ebx1a,_0xe8ebx1b){return function(_0xe8ebx1c){if(!_0xe8ebx1c){_0xe8ebx1a[_0xbd63[26]](404)};return _0xe8ebx1c}}function handleError(_0xe8ebx1a,_0xe8ebx1b){_0xe8ebx1b= _0xe8ebx1b|| 500;return function(_0xe8ebx2b){logger[_0xbd63[44]](_0xe8ebx2b[_0xbd63[43]]);if(_0xe8ebx2b[_0xbd63[45]]){delete _0xe8ebx2b[_0xbd63[45]]};_0xe8ebx1a[_0xbd63[28]](_0xe8ebx1b)[_0xbd63[46]](_0xe8ebx2b)}}exports[_0xbd63[47]]= function(_0xe8ebx2c,_0xe8ebx1a){var _0xe8ebx1f={},_0xe8ebx2d={},_0xe8ebx2e={count:0,rows:[]};_0xe8ebx2d[_0xbd63[48]]= _[_0xbd63[51]](db[_0xbd63[50]][_0xbd63[49]]);var _0xe8ebx2f={dateStart:_0xe8ebx2c[_0xbd63[53]][_0xbd63[52]],dateEnd:_0xe8ebx2c[_0xbd63[53]][_0xbd63[54]]};delete _0xe8ebx2c[_0xbd63[53]][_0xbd63[52]];delete _0xe8ebx2c[_0xbd63[53]][_0xbd63[54]];_0xe8ebx2d[_0xbd63[53]]= _[_0xbd63[51]](_0xe8ebx2c[_0xbd63[53]]);_0xe8ebx2d[_0xbd63[55]]= _[_0xbd63[56]](_0xe8ebx2d[_0xbd63[48]],_0xe8ebx2d[_0xbd63[53]]);_0xe8ebx1f[_0xbd63[57]]= _[_0xbd63[56]](_0xe8ebx2d[_0xbd63[48]],qs[_0xbd63[58]](_0xe8ebx2c[_0xbd63[53]][_0xbd63[58]]));_0xe8ebx1f[_0xbd63[57]]= (_0xe8ebx1f[_0xbd63[57]][_0xbd63[59]])?_0xe8ebx1f[_0xbd63[57]]:_0xe8ebx2d[_0xbd63[48]];if(!_0xe8ebx2c[_0xbd63[53]][_0xbd63[61]](_0xbd63[60])){_0xe8ebx1f[_0xbd63[32]]= qs[_0xbd63[32]](_0xe8ebx2c[_0xbd63[53]][_0xbd63[32]]);_0xe8ebx1f[_0xbd63[31]]= qs[_0xbd63[31]](_0xe8ebx2c[_0xbd63[53]][_0xbd63[31]])};_0xe8ebx1f[_0xbd63[62]]= qs[_0xbd63[63]](_0xe8ebx2c[_0xbd63[53]][_0xbd63[63]]);_0xe8ebx1f[_0xbd63[64]]= qs[_0xbd63[55]](_[_0xbd63[65]](_0xe8ebx2c[_0xbd63[53]],_0xe8ebx2d[_0xbd63[55]]));if(_0xe8ebx2f[_0xbd63[52]]){if(_0xe8ebx2f[_0xbd63[54]]){_0xe8ebx2f[_0xbd63[54]]= moment(_0xe8ebx2f[_0xbd63[54]])[_0xbd63[67]](1,_0xbd63[66])}else {_0xe8ebx2f[_0xbd63[54]]= moment(_0xe8ebx2f[_0xbd63[52]])[_0xbd63[67]](1,_0xbd63[66])};_[_0xbd63[68]](_0xe8ebx1f[_0xbd63[64]],{createdAt:{$gte:_0xe8ebx2f[_0xbd63[52]],$lte:_0xe8ebx2f[_0xbd63[54]]}})};if(_0xe8ebx2c[_0xbd63[53]][_0xbd63[69]]){_0xe8ebx1f[_0xbd63[64]]= _[_0xbd63[68]](_0xe8ebx1f[_0xbd63[64]],{$or:_[_0xbd63[71]](_0xe8ebx1f[_0xbd63[57]],function(_0xe8ebx30){var _0xe8ebx2e={};_0xe8ebx2e[_0xe8ebx30]= {$like:_0xbd63[70]+ _0xe8ebx2c[_0xbd63[53]][_0xbd63[69]]+ _0xbd63[70]};return _0xe8ebx2e})})};_0xe8ebx1f= _[_0xbd63[68]]({},_0xe8ebx1f,_0xe8ebx2c[_0xbd63[72]]);var _0xe8ebx31={where:_0xe8ebx1f[_0xbd63[64]]};return db[_0xbd63[50]][_0xbd63[30]](_0xe8ebx31)[_0xbd63[40]](function(_0xe8ebx20){_0xe8ebx2e[_0xbd63[30]]= _0xe8ebx20;if(_0xe8ebx2c[_0xbd63[53]][_0xbd63[75]]){_0xe8ebx1f[_0xbd63[76]]= [{all:true}]};return db[_0xbd63[50]][_0xbd63[77]](_0xe8ebx1f)})[_0xbd63[40]](function(_0xe8ebx32){_0xe8ebx2e[_0xbd63[74]]= _0xe8ebx32;return _0xe8ebx2e})[_0xbd63[40]](respondWithFilteredResult(_0xe8ebx1a,_0xe8ebx1f))[_0xbd63[73]](handleError(_0xe8ebx1a,null))};exports[_0xbd63[78]]= function(_0xe8ebx2c,_0xe8ebx1a){var _0xe8ebx1f={raw:true,where:{id:_0xe8ebx2c[_0xbd63[80]][_0xbd63[79]]}},_0xe8ebx2d={};_0xe8ebx2d[_0xbd63[48]]= _[_0xbd63[51]](db[_0xbd63[50]][_0xbd63[49]]);_0xe8ebx2d[_0xbd63[53]]= _[_0xbd63[51]](_0xe8ebx2c[_0xbd63[53]]);_0xe8ebx2d[_0xbd63[55]]= _[_0xbd63[56]](_0xe8ebx2d[_0xbd63[48]],_0xe8ebx2d[_0xbd63[53]]);_0xe8ebx1f[_0xbd63[57]]= _[_0xbd63[56]](_0xe8ebx2d[_0xbd63[48]],qs[_0xbd63[58]](_0xe8ebx2c[_0xbd63[53]][_0xbd63[58]]));_0xe8ebx1f[_0xbd63[57]]= (_0xe8ebx1f[_0xbd63[57]][_0xbd63[59]])?_0xe8ebx1f[_0xbd63[57]]:_0xe8ebx2d[_0xbd63[48]];if(_0xe8ebx2c[_0xbd63[53]][_0xbd63[75]]){_0xe8ebx1f[_0xbd63[76]]= [{all:true}]};_0xe8ebx1f= _[_0xbd63[68]]({},_0xe8ebx1f,_0xe8ebx2c[_0xbd63[72]]);return db[_0xbd63[50]][_0xbd63[81]](_0xe8ebx1f)[_0xbd63[40]](handleEntityNotFound(_0xe8ebx1a,null))[_0xbd63[40]](respondWithResult(_0xe8ebx1a,null))[_0xbd63[73]](handleError(_0xe8ebx1a,null))};exports[_0xbd63[82]]= function(_0xe8ebx2c,_0xe8ebx1a){return db[_0xbd63[50]][_0xbd63[82]](_0xe8ebx2c[_0xbd63[83]],{})[_0xbd63[40]](respondWithResult(_0xe8ebx1a,201))[_0xbd63[73]](handleError(_0xe8ebx1a,null))};exports[_0xbd63[41]]= function(_0xe8ebx2c,_0xe8ebx1a){if(_0xe8ebx2c[_0xbd63[83]][_0xbd63[79]]){delete _0xe8ebx2c[_0xbd63[83]][_0xbd63[79]]};return db[_0xbd63[50]][_0xbd63[81]]({where:{id:_0xe8ebx2c[_0xbd63[80]][_0xbd63[79]]}})[_0xbd63[40]](handleEntityNotFound(_0xe8ebx1a,null))[_0xbd63[40]](saveUpdates(_0xe8ebx2c[_0xbd63[83]],null))[_0xbd63[40]](respondWithResult(_0xe8ebx1a,null))[_0xbd63[73]](handleError(_0xe8ebx1a,null))};exports[_0xbd63[42]]= function(_0xe8ebx2c,_0xe8ebx1a){return db[_0xbd63[50]][_0xbd63[81]]({where:{id:_0xe8ebx2c[_0xbd63[80]][_0xbd63[79]]}})[_0xbd63[40]](handleEntityNotFound(_0xe8ebx1a,null))[_0xbd63[40]](removeEntity(_0xe8ebx1a,null))[_0xbd63[73]](handleError(_0xe8ebx1a,null))}
\ No newline at end of file
index 2d13f57..d49e3c5 100644 (file)
@@ -1 +1 @@
-var _0x7419=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x69\x6E\x74\x5F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0x7419[0];var _=require(_0x7419[1]);var util=require(_0x7419[2]);var logger=require(_0x7419[4])(_0x7419[3]);var moment=require(_0x7419[5]);var BPromise=require(_0x7419[6]);var rp=require(_0x7419[7]);var attributes=require(_0x7419[8]);module[_0x7419[9]]= function(_0x77cbx8,_0x77cbx9){return _0x77cbx8[_0x7419[12]](_0x7419[10],attributes,{tableName:_0x7419[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x8e75=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x69\x6E\x74\x5F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0x8e75[0];var _=require(_0x8e75[1]);var util=require(_0x8e75[2]);var logger=require(_0x8e75[4])(_0x8e75[3]);var moment=require(_0x8e75[5]);var BPromise=require(_0x8e75[6]);var rp=require(_0x8e75[7]);var attributes=require(_0x8e75[8]);module[_0x8e75[9]]= function(_0x1a22x8,_0x1a22x9){return _0x1a22x8[_0x8e75[12]](_0x8e75[10],attributes,{tableName:_0x8e75[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index db9996c..e12d469 100644 (file)
@@ -1 +1 @@
-var _0x19b7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x19b7[0];var _=require(_0x19b7[1]);var util=require(_0x19b7[2]);var moment=require(_0x19b7[3]);var BPromise=require(_0x19b7[4]);var rs=require(_0x19b7[5]);var fs=require(_0x19b7[6]);var db=require(_0x19b7[8])[_0x19b7[7]];var utils=require(_0x19b7[9]);var logger=require(_0x19b7[11])(_0x19b7[10]);var config=require(_0x19b7[12]);var jayson=require(_0x19b7[13]);var client=jayson[_0x19b7[15]][_0x19b7[14]]({port:9002});function respondWithRpcPromise(_0xa22exe,_0xa22exf,_0xa22ex10){return  new BPromise(function(_0xa22ex11,_0xa22ex12){return client[_0x19b7[28]](_0xa22exe,_0xa22ex10)[_0x19b7[27]](function(_0xa22ex14){logger[_0x19b7[20]](_0x19b7[16],_0xa22exf,_0x19b7[19]);logger[_0x19b7[23]](_0x19b7[21],_0xa22exf,_0x19b7[19],JSON[_0x19b7[22]](_0xa22ex14));if(_0xa22ex14[_0x19b7[17]]){if(_0xa22ex14[_0x19b7[17]][_0x19b7[24]]=== 500){logger[_0x19b7[17]](_0x19b7[16],_0xa22exf,_0xa22ex14[_0x19b7[17]][_0x19b7[25]]);return _0xa22ex12(_0xa22ex14[_0x19b7[17]][_0x19b7[25]])};logger[_0x19b7[17]](_0x19b7[16],_0xa22exf,_0xa22ex14[_0x19b7[17]][_0x19b7[25]]);return _0xa22ex11(_0xa22ex14[_0x19b7[17]][_0x19b7[25]])}else {logger[_0x19b7[20]](_0x19b7[16],_0xa22exf,_0x19b7[19]);_0xa22ex11(_0xa22ex14[_0x19b7[26]][_0x19b7[25]])}})[_0x19b7[18]](function(_0xa22ex13){logger[_0x19b7[17]](_0x19b7[16],_0xa22exf,_0xa22ex13);_0xa22ex12(_0xa22ex13)})})}
\ No newline at end of file
+var _0xb35d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xb35d[0];var _=require(_0xb35d[1]);var util=require(_0xb35d[2]);var moment=require(_0xb35d[3]);var BPromise=require(_0xb35d[4]);var rs=require(_0xb35d[5]);var fs=require(_0xb35d[6]);var db=require(_0xb35d[8])[_0xb35d[7]];var utils=require(_0xb35d[9]);var logger=require(_0xb35d[11])(_0xb35d[10]);var config=require(_0xb35d[12]);var jayson=require(_0xb35d[13]);var client=jayson[_0xb35d[15]][_0xb35d[14]]({port:9002});function respondWithRpcPromise(_0x2551xe,_0x2551xf,_0x2551x10){return  new BPromise(function(_0x2551x11,_0x2551x12){return client[_0xb35d[28]](_0x2551xe,_0x2551x10)[_0xb35d[27]](function(_0x2551x14){logger[_0xb35d[20]](_0xb35d[16],_0x2551xf,_0xb35d[19]);logger[_0xb35d[23]](_0xb35d[21],_0x2551xf,_0xb35d[19],JSON[_0xb35d[22]](_0x2551x14));if(_0x2551x14[_0xb35d[17]]){if(_0x2551x14[_0xb35d[17]][_0xb35d[24]]=== 500){logger[_0xb35d[17]](_0xb35d[16],_0x2551xf,_0x2551x14[_0xb35d[17]][_0xb35d[25]]);return _0x2551x12(_0x2551x14[_0xb35d[17]][_0xb35d[25]])};logger[_0xb35d[17]](_0xb35d[16],_0x2551xf,_0x2551x14[_0xb35d[17]][_0xb35d[25]]);return _0x2551x11(_0x2551x14[_0xb35d[17]][_0xb35d[25]])}else {logger[_0xb35d[20]](_0xb35d[16],_0x2551xf,_0xb35d[19]);_0x2551x11(_0x2551x14[_0xb35d[26]][_0xb35d[25]])}})[_0xb35d[18]](function(_0x2551x13){logger[_0xb35d[17]](_0xb35d[16],_0x2551xf,_0x2551x13);_0x2551x12(_0x2551x13)})})}
\ No newline at end of file
index 556bcdb..a407d5d 100644 (file)
@@ -1 +1 @@
-var _0xb0ea=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xb0ea[0];var multer=require(_0xb0ea[1]);var util=require(_0xb0ea[2]);var path=require(_0xb0ea[3]);var express=require(_0xb0ea[4]);var router=express.Router();var auth=require(_0xb0ea[5]);var interaction=require(_0xb0ea[6]);var config=require(_0xb0ea[7]);var controller=require(_0xb0ea[8]);router[_0xb0ea[12]](_0xb0ea[9],auth[_0xb0ea[10]](),controller[_0xb0ea[11]]);router[_0xb0ea[12]](_0xb0ea[13],auth[_0xb0ea[10]](),controller[_0xb0ea[14]]);router[_0xb0ea[12]](_0xb0ea[15],auth[_0xb0ea[10]](),controller[_0xb0ea[16]]);router[_0xb0ea[12]](_0xb0ea[17],auth[_0xb0ea[10]](),controller[_0xb0ea[18]]);router[_0xb0ea[20]](_0xb0ea[9],auth[_0xb0ea[10]](),controller[_0xb0ea[19]]);router[_0xb0ea[20]](_0xb0ea[15],auth[_0xb0ea[10]](),controller[_0xb0ea[21]]);router[_0xb0ea[23]](_0xb0ea[13],auth[_0xb0ea[10]](),controller[_0xb0ea[22]]);router[_0xb0ea[25]](_0xb0ea[13],auth[_0xb0ea[10]](),controller[_0xb0ea[24]]);module[_0xb0ea[26]]= router
\ No newline at end of file
+var _0xbd46=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xbd46[0];var multer=require(_0xbd46[1]);var util=require(_0xbd46[2]);var path=require(_0xbd46[3]);var express=require(_0xbd46[4]);var router=express.Router();var auth=require(_0xbd46[5]);var interaction=require(_0xbd46[6]);var config=require(_0xbd46[7]);var controller=require(_0xbd46[8]);router[_0xbd46[12]](_0xbd46[9],auth[_0xbd46[10]](),controller[_0xbd46[11]]);router[_0xbd46[12]](_0xbd46[13],auth[_0xbd46[10]](),controller[_0xbd46[14]]);router[_0xbd46[12]](_0xbd46[15],auth[_0xbd46[10]](),controller[_0xbd46[16]]);router[_0xbd46[12]](_0xbd46[17],auth[_0xbd46[10]](),controller[_0xbd46[18]]);router[_0xbd46[20]](_0xbd46[9],auth[_0xbd46[10]](),controller[_0xbd46[19]]);router[_0xbd46[20]](_0xbd46[15],auth[_0xbd46[10]](),controller[_0xbd46[21]]);router[_0xbd46[23]](_0xbd46[13],auth[_0xbd46[10]](),controller[_0xbd46[22]]);router[_0xbd46[25]](_0xbd46[13],auth[_0xbd46[10]](),controller[_0xbd46[24]]);module[_0xbd46[26]]= router
\ No newline at end of file
index c546c6a..bfc2552 100644 (file)
@@ -1 +1 @@
-var _0xf8a0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0xf8a0[0];var Sequelize=require(_0xf8a0[1]);module[_0xf8a0[2]]= {name:{type:Sequelize[_0xf8a0[3]]},description:{type:Sequelize[_0xf8a0[3]]},authToken:{type:Sequelize[_0xf8a0[3]]},host:{type:Sequelize[_0xf8a0[3]]},serverUrl:{type:Sequelize[_0xf8a0[3]]}}
\ No newline at end of file
+var _0xffa5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0xffa5[0];var Sequelize=require(_0xffa5[1]);module[_0xffa5[2]]= {name:{type:Sequelize[_0xffa5[3]]},description:{type:Sequelize[_0xffa5[3]]},authToken:{type:Sequelize[_0xffa5[3]]},host:{type:Sequelize[_0xffa5[3]]},serverUrl:{type:Sequelize[_0xffa5[3]]}}
\ No newline at end of file
index abe056b..13187c3 100644 (file)
@@ -1 +1 @@
-var _0xde8b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x79\x70\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x74\x65\x73\x74","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x43\x61\x6C\x6C\x73","\x73\x65\x63\x74\x69\x6F\x6E","\x46\x4C","\x43\x61\x6C\x6C\x20\x50\x75\x72\x70\x6F\x73\x65","\x64\x76","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x6C\x61\x62\x65\x6C","\x63\x75\x73\x74\x6F\x6D\x66\x69\x65\x6C\x64","\x74\x72\x75\x65","\x50\x69\x63\x6B\x20\x4C\x69\x73\x74","\x76\x61\x6C","\x70\x75\x73\x68","\x47\x45\x54","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x72\x6D\x2E\x25\x73\x2F\x63\x72\x6D\x2F\x70\x72\x69\x76\x61\x74\x65\x2F\x6A\x73\x6F\x6E\x2F\x43\x61\x6C\x6C\x73\x2F\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x68\x6F\x73\x74","\x66\x6F\x72\x6D\x61\x74","\x61\x75\x74\x68\x54\x6F\x6B\x65\x6E","\x63\x72\x6D\x61\x70\x69"];_0xde8b[0];var jsonpatch=require(_0xde8b[1]);var rp=require(_0xde8b[2]);var moment=require(_0xde8b[3]);var BPromise=require(_0xde8b[4]);var Mustache=require(_0xde8b[5]);var util=require(_0xde8b[6]);var path=require(_0xde8b[7]);var sox=require(_0xde8b[8]);var csv=require(_0xde8b[9]);var ejs=require(_0xde8b[10]);var fs=require(_0xde8b[11]);var _=require(_0xde8b[12]);var squel=require(_0xde8b[13]);var crypto=require(_0xde8b[14]);var jsforce=require(_0xde8b[15]);var deskjs=require(_0xde8b[16]);var toCsv=require(_0xde8b[9]);var querystring=require(_0xde8b[17]);var Papa=require(_0xde8b[18]);var qs=require(_0xde8b[19]);var logger=require(_0xde8b[21])(_0xde8b[20]);var utils=require(_0xde8b[22]);var config=require(_0xde8b[23]);var db=require(_0xde8b[25])[_0xde8b[24]];var integrations=require(_0xde8b[26]);var jayson=require(_0xde8b[27]);var client=jayson[_0xde8b[29]][_0xde8b[28]]({port:9002});function respondWithRpcPromise(_0x4adbx1d,_0x4adbx1e,_0x4adbx1f,_0x4adbx20){return  new BPromise(function(_0x4adbx21,_0x4adbx22){var _0x4adbx23=(_0x4adbx20|| client);return _0x4adbx23[_0xde8b[42]](_0x4adbx1d,_0x4adbx1f)[_0xde8b[41]](function(_0x4adbx25){logger[_0xde8b[34]](_0xde8b[30],_0x4adbx1e,_0xde8b[33]);logger[_0xde8b[37]](_0xde8b[35],_0x4adbx1e,_0xde8b[33],JSON[_0xde8b[36]](_0x4adbx25));if(_0x4adbx25[_0xde8b[31]]){if(_0x4adbx25[_0xde8b[31]][_0xde8b[38]]=== 500){logger[_0xde8b[31]](_0xde8b[30],_0x4adbx1e,_0x4adbx25[_0xde8b[31]][_0xde8b[39]]);return _0x4adbx22(_0x4adbx25[_0xde8b[31]][_0xde8b[39]])};logger[_0xde8b[31]](_0xde8b[30],_0x4adbx1e,_0x4adbx25[_0xde8b[31]][_0xde8b[39]]);return _0x4adbx21(_0x4adbx25[_0xde8b[31]][_0xde8b[39]])}else {logger[_0xde8b[34]](_0xde8b[30],_0x4adbx1e,_0xde8b[33]);_0x4adbx21(_0x4adbx25[_0xde8b[40]][_0xde8b[39]])}})[_0xde8b[32]](function(_0x4adbx24){logger[_0xde8b[31]](_0xde8b[30],_0x4adbx1e,_0x4adbx24);_0x4adbx22(_0x4adbx24)})})}function respondWithStatusCode(_0x4adbx25,_0x4adbx27){_0x4adbx27= _0x4adbx27|| 204;return function(_0x4adbx28){if(_0x4adbx28){return _0x4adbx25[_0xde8b[43]](_0x4adbx27)};return _0x4adbx25[_0xde8b[45]](_0x4adbx27)[_0xde8b[44]]()}}function respondWithResult(_0x4adbx25,_0x4adbx27){_0x4adbx27= _0x4adbx27|| 200;return function(_0x4adbx28){if(_0x4adbx28){return _0x4adbx25[_0xde8b[45]](_0x4adbx27)[_0xde8b[46]](_0x4adbx28)}}}function respondWithFilteredResult(_0x4adbx25,_0x4adbx2b){return function(_0x4adbx28){if(_0x4adbx28){var _0x4adbx2c=_0x4adbx28[_0xde8b[47]],_0x4adbx2d=_0x4adbx2b[_0xde8b[48]],_0x4adbx2e=_0x4adbx2b[_0xde8b[48]]+ _0x4adbx2b[_0xde8b[49]],_0x4adbx27;if(_0x4adbx2e>= _0x4adbx2c){_0x4adbx2e= _0x4adbx2c;_0x4adbx27= 200}else {_0x4adbx27= 206};_0x4adbx25[_0xde8b[45]](_0x4adbx27);return _0x4adbx25[_0xde8b[53]](_0xde8b[50],_0x4adbx2d+ _0xde8b[51]+ _0x4adbx2e+ _0xde8b[52]+ _0x4adbx2c)[_0xde8b[46]](_0x4adbx28)};return null}}function patchUpdates(_0x4adbx30){return function(_0x4adbx28){try{jsonpatch[_0xde8b[54]](_0x4adbx28,_0x4adbx30,true)}catch(err){return BPromise[_0xde8b[55]](err)};return _0x4adbx28[_0xde8b[56]]()}}function saveUpdates(_0x4adbx32,_0x4adbx27){return function(_0x4adbx28){if(_0x4adbx28){return _0x4adbx28[_0xde8b[57]](_0x4adbx32)[_0xde8b[41]](function(_0x4adbx33){return _0x4adbx33})};return null}}function removeEntity(_0x4adbx25,_0x4adbx27){return function(_0x4adbx28){if(_0x4adbx28){return _0x4adbx28[_0xde8b[58]]()[_0xde8b[41]](function(){_0x4adbx25[_0xde8b[45]](204)[_0xde8b[44]]()})}}}function handleEntityNotFound(_0x4adbx25,_0x4adbx27){return function(_0x4adbx28){if(!_0x4adbx28){_0x4adbx25[_0xde8b[43]](404)};return _0x4adbx28}}function handleError(_0x4adbx25,_0x4adbx27){_0x4adbx27= _0x4adbx27|| 500;return function(_0x4adbx24){logger[_0xde8b[31]](_0x4adbx24[_0xde8b[59]]);if(_0x4adbx24[_0xde8b[60]]){delete _0x4adbx24[_0xde8b[60]]};_0x4adbx25[_0xde8b[45]](_0x4adbx27)[_0xde8b[61]](_0x4adbx24)}}exports[_0xde8b[62]]= function(_0x4adbx1f,_0x4adbx25){var _0x4adbx2b={},_0x4adbx37={},_0x4adbx38={count:0,rows:[]};_0x4adbx37[_0xde8b[63]]= _[_0xde8b[66]](db[_0xde8b[65]][_0xde8b[64]]);var _0x4adbx39={dateStart:_0x4adbx1f[_0xde8b[68]][_0xde8b[67]],dateEnd:_0x4adbx1f[_0xde8b[68]][_0xde8b[69]]};delete _0x4adbx1f[_0xde8b[68]][_0xde8b[67]];delete _0x4adbx1f[_0xde8b[68]][_0xde8b[69]];_0x4adbx37[_0xde8b[68]]= _[_0xde8b[66]](_0x4adbx1f[_0xde8b[68]]);_0x4adbx37[_0xde8b[70]]= _[_0xde8b[71]](_0x4adbx37[_0xde8b[63]],_0x4adbx37[_0xde8b[68]]);_0x4adbx2b[_0xde8b[72]]= _[_0xde8b[71]](_0x4adbx37[_0xde8b[63]],qs[_0xde8b[73]](_0x4adbx1f[_0xde8b[68]][_0xde8b[73]]));_0x4adbx2b[_0xde8b[72]]= (_0x4adbx2b[_0xde8b[72]][_0xde8b[74]])?_0x4adbx2b[_0xde8b[72]]:_0x4adbx37[_0xde8b[63]];if(!_0x4adbx1f[_0xde8b[68]][_0xde8b[76]](_0xde8b[75])){_0x4adbx2b[_0xde8b[49]]= qs[_0xde8b[49]](_0x4adbx1f[_0xde8b[68]][_0xde8b[49]]);_0x4adbx2b[_0xde8b[48]]= qs[_0xde8b[48]](_0x4adbx1f[_0xde8b[68]][_0xde8b[48]])};_0x4adbx2b[_0xde8b[77]]= qs[_0xde8b[78]](_0x4adbx1f[_0xde8b[68]][_0xde8b[78]]);_0x4adbx2b[_0xde8b[79]]= qs[_0xde8b[70]](_[_0xde8b[80]](_0x4adbx1f[_0xde8b[68]],_0x4adbx37[_0xde8b[70]]));if(_0x4adbx39[_0xde8b[67]]){if(_0x4adbx39[_0xde8b[69]]){_0x4adbx39[_0xde8b[69]]= moment(_0x4adbx39[_0xde8b[69]])[_0xde8b[82]](1,_0xde8b[81])}else {_0x4adbx39[_0xde8b[69]]= moment(_0x4adbx39[_0xde8b[67]])[_0xde8b[82]](1,_0xde8b[81])};_[_0xde8b[83]](_0x4adbx2b[_0xde8b[79]],{createdAt:{$gte:_0x4adbx39[_0xde8b[67]],$lte:_0x4adbx39[_0xde8b[69]]}})};if(_0x4adbx1f[_0xde8b[68]][_0xde8b[84]]){_0x4adbx2b[_0xde8b[79]]= _[_0xde8b[83]](_0x4adbx2b[_0xde8b[79]],{$or:_[_0xde8b[86]](_0x4adbx2b[_0xde8b[72]],function(_0x4adbx3a){var _0x4adbx38={};_0x4adbx38[_0x4adbx3a]= {$like:_0xde8b[85]+ _0x4adbx1f[_0xde8b[68]][_0xde8b[84]]+ _0xde8b[85]};return _0x4adbx38})})};_0x4adbx2b= _[_0xde8b[83]]({},_0x4adbx2b,_0x4adbx1f[_0xde8b[87]]);var _0x4adbx3b={where:_0x4adbx2b[_0xde8b[79]]};return db[_0xde8b[65]][_0xde8b[47]](_0x4adbx3b)[_0xde8b[41]](function(_0x4adbx2c){_0x4adbx38[_0xde8b[47]]= _0x4adbx2c;if(_0x4adbx1f[_0xde8b[68]][_0xde8b[89]]){_0x4adbx2b[_0xde8b[90]]= [{all:true}]};return db[_0xde8b[65]][_0xde8b[91]](_0x4adbx2b)})[_0xde8b[41]](function(_0x4adbx3c){_0x4adbx38[_0xde8b[88]]= _0x4adbx3c;return _0x4adbx38})[_0xde8b[41]](respondWithFilteredResult(_0x4adbx25,_0x4adbx2b))[_0xde8b[32]](handleError(_0x4adbx25,null))};exports[_0xde8b[92]]= function(_0x4adbx1f,_0x4adbx25){var _0x4adbx2b={raw:false,where:{id:_0x4adbx1f[_0xde8b[94]][_0xde8b[93]]}},_0x4adbx37={};_0x4adbx37[_0xde8b[63]]= _[_0xde8b[66]](db[_0xde8b[65]][_0xde8b[64]]);_0x4adbx37[_0xde8b[68]]= _[_0xde8b[66]](_0x4adbx1f[_0xde8b[68]]);_0x4adbx37[_0xde8b[70]]= _[_0xde8b[71]](_0x4adbx37[_0xde8b[63]],_0x4adbx37[_0xde8b[68]]);_0x4adbx2b[_0xde8b[72]]= _[_0xde8b[71]](_0x4adbx37[_0xde8b[63]],qs[_0xde8b[73]](_0x4adbx1f[_0xde8b[68]][_0xde8b[73]]));_0x4adbx2b[_0xde8b[72]]= (_0x4adbx2b[_0xde8b[72]][_0xde8b[74]])?_0x4adbx2b[_0xde8b[72]]:_0x4adbx37[_0xde8b[63]];if(_0x4adbx1f[_0xde8b[68]][_0xde8b[89]]){_0x4adbx2b[_0xde8b[90]]= [{all:true}]};_0x4adbx2b= _[_0xde8b[83]]({},_0x4adbx2b,_0x4adbx1f[_0xde8b[87]]);return db[_0xde8b[65]][_0xde8b[95]](_0x4adbx2b)[_0xde8b[41]](handleEntityNotFound(_0x4adbx25,null))[_0xde8b[41]](respondWithResult(_0x4adbx25,null))[_0xde8b[32]](handleError(_0x4adbx25,null))};exports[_0xde8b[96]]= function(_0x4adbx1f,_0x4adbx25){return db[_0xde8b[65]][_0xde8b[96]](_0x4adbx1f[_0xde8b[97]],{})[_0xde8b[41]](respondWithResult(_0x4adbx25,201))[_0xde8b[32]](handleError(_0x4adbx25,null))};exports[_0xde8b[57]]= function(_0x4adbx1f,_0x4adbx25){if(_0x4adbx1f[_0xde8b[97]][_0xde8b[93]]){delete _0x4adbx1f[_0xde8b[97]][_0xde8b[93]]};return db[_0xde8b[65]][_0xde8b[95]]({where:{id:_0x4adbx1f[_0xde8b[94]][_0xde8b[93]]}})[_0xde8b[41]](handleEntityNotFound(_0x4adbx25,null))[_0xde8b[41]](saveUpdates(_0x4adbx1f[_0xde8b[97]],null))[_0xde8b[41]](respondWithResult(_0x4adbx25,null))[_0xde8b[32]](handleError(_0x4adbx25,null))};exports[_0xde8b[58]]= function(_0x4adbx1f,_0x4adbx25){return db[_0xde8b[65]][_0xde8b[95]]({where:{id:_0x4adbx1f[_0xde8b[94]][_0xde8b[93]]}})[_0xde8b[41]](handleEntityNotFound(_0x4adbx25,null))[_0xde8b[41]](removeEntity(_0x4adbx25,null))[_0xde8b[32]](handleError(_0x4adbx25,null))};exports[_0xde8b[98]]= function(_0x4adbx1f,_0x4adbx28,_0x4adbx3d){var _0x4adbx2b={};var _0x4adbx37={};var _0x4adbx3e;var _0x4adbx2c;return db[_0xde8b[65]][_0xde8b[100]]({where:{id:_0x4adbx1f[_0xde8b[94]][_0xde8b[93]]}})[_0xde8b[41]](handleEntityNotFound(_0x4adbx28,null))[_0xde8b[41]](function(_0x4adbx28){if(_0x4adbx28){_0x4adbx3e= _0x4adbx28;_0x4adbx37[_0xde8b[63]]= _[_0xde8b[66]](db[_0xde8b[99]][_0xde8b[64]]);_0x4adbx37[_0xde8b[68]]= _[_0xde8b[66]](_0x4adbx1f[_0xde8b[68]]);_0x4adbx37[_0xde8b[70]]= _[_0xde8b[71]](_0x4adbx37[_0xde8b[63]],_0x4adbx37[_0xde8b[68]]);_0x4adbx2b[_0xde8b[72]]= _[_0xde8b[71]](_0x4adbx37[_0xde8b[63]],qs[_0xde8b[73]](_0x4adbx1f[_0xde8b[68]][_0xde8b[73]]));_0x4adbx2b[_0xde8b[72]]= (_0x4adbx2b[_0xde8b[72]][_0xde8b[74]])?_0x4adbx2b[_0xde8b[72]]:_0x4adbx37[_0xde8b[63]];_0x4adbx2b[_0xde8b[77]]= qs[_0xde8b[78]](_0x4adbx1f[_0xde8b[68]][_0xde8b[78]]);_0x4adbx2b[_0xde8b[79]]= qs[_0xde8b[70]](_[_0xde8b[80]](_0x4adbx1f[_0xde8b[68]],_0x4adbx37[_0xde8b[70]]));if(_0x4adbx1f[_0xde8b[68]][_0xde8b[84]]){_0x4adbx2b[_0xde8b[79]]= _[_0xde8b[83]](_0x4adbx2b[_0xde8b[79]],{$or:_[_0xde8b[86]](_0x4adbx2b[_0xde8b[72]],function(_0x4adbx3a){var _0x4adbx38={};_0x4adbx38[_0x4adbx3a]= {$like:_0xde8b[85]+ _0x4adbx1f[_0xde8b[68]][_0xde8b[84]]+ _0xde8b[85]};return _0x4adbx38})})};_0x4adbx2b= _[_0xde8b[83]]({},_0x4adbx2b,_0x4adbx1f[_0xde8b[87]]);return _0x4adbx3e[_0xde8b[98]](_0x4adbx2b)}})[_0xde8b[41]](function(_0x4adbx3f){if(_0x4adbx3f){_0x4adbx2c= _0x4adbx3f[_0xde8b[74]];if(!_0x4adbx1f[_0xde8b[68]][_0xde8b[76]](_0xde8b[75])){_0x4adbx2b[_0xde8b[49]]= qs[_0xde8b[49]](_0x4adbx1f[_0xde8b[68]][_0xde8b[49]]);_0x4adbx2b[_0xde8b[48]]= qs[_0xde8b[48]](_0x4adbx1f[_0xde8b[68]][_0xde8b[48]])};return _0x4adbx3e[_0xde8b[98]](_0x4adbx2b)}})[_0xde8b[41]](function(_0x4adbx3c){if(_0x4adbx3c){return _0x4adbx3c?{count:_0x4adbx2c,rows:_0x4adbx3c}:null}})[_0xde8b[41]](respondWithResult(_0x4adbx28,null))[_0xde8b[32]](handleError(_0x4adbx28,null))};exports[_0xde8b[101]]= function(_0x4adbx1f,_0x4adbx25,_0x4adbx3d){if(_0x4adbx1f[_0xde8b[97]][_0xde8b[93]]){delete _0x4adbx1f[_0xde8b[97]][_0xde8b[93]]};return db[_0xde8b[65]][_0xde8b[100]]({where:{id:_0x4adbx1f[_0xde8b[94]][_0xde8b[93]]}})[_0xde8b[41]](handleEntityNotFound(_0x4adbx25,null))[_0xde8b[41]](function(_0x4adbx28){if(_0x4adbx28){_0x4adbx1f[_0xde8b[97]][_0xde8b[102]]= _0x4adbx28[_0xde8b[93]];_0x4adbx1f[_0xde8b[97]][_0xde8b[103]]= integrations[_0xde8b[106]](_0x4adbx1f[_0xde8b[97]][_0xde8b[104]],_0x4adbx1f[_0xde8b[97]][_0xde8b[105]]);_0x4adbx1f[_0xde8b[97]][_0xde8b[107]]= integrations[_0xde8b[108]](_0x4adbx1f[_0xde8b[97]][_0xde8b[104]],_0x4adbx1f[_0xde8b[97]][_0xde8b[105]]);return db[_0xde8b[99]][_0xde8b[96]](_0x4adbx1f[_0xde8b[97]],{include:[{model:db[_0xde8b[109]],as:_0xde8b[103]},{model:db[_0xde8b[109]],as:_0xde8b[107]}]})};return null})[_0xde8b[41]](respondWithResult(_0x4adbx25,null))[_0xde8b[32]](handleError(_0x4adbx25,null))};exports[_0xde8b[110]]= function(_0x4adbx1f,_0x4adbx25,_0x4adbx3d){return db[_0xde8b[65]][_0xde8b[100]]({where:{id:_0x4adbx1f[_0xde8b[94]][_0xde8b[93]]},attributes:[_0xde8b[93],_0xde8b[130],_0xde8b[132]]})[_0xde8b[41]](handleEntityNotFound(_0x4adbx25,null))[_0xde8b[41]](function(_0x4adbx28){if(_0x4adbx28){return rp({method:_0xde8b[128],uri:util[_0xde8b[131]](_0xde8b[129],_0x4adbx28[_0xde8b[130]]),qs:{authtoken:_0x4adbx28[_0xde8b[132]],scope:_0xde8b[133]},json:true})}})[_0xde8b[41]](function(_0x4adbx3f){if(_0x4adbx3f){if(_0x4adbx3f[_0xde8b[115]]&& _0x4adbx3f[_0xde8b[115]][_0xde8b[31]]){throw  new Error(_0x4adbx3f[_0xde8b[115]][_0xde8b[31]][_0xde8b[39]])};var _0x4adbx40=[];if(_0x4adbx3f[_0xde8b[116]]&& _0x4adbx3f[_0xde8b[116]][_0xde8b[117]]){if(_0x4adbx3f[_0xde8b[116]][_0xde8b[117]][_0xde8b[118]]){var _0x4adbx41=[_0xde8b[119]];for(var _0x4adbx42=0,_0x4adbx43=_0x4adbx3f[_0xde8b[116]][_0xde8b[117]][_0xde8b[118]][_0xde8b[74]];_0x4adbx42< _0x4adbx43;_0x4adbx42++){if(_[_0xde8b[121]](_0x4adbx41,_0x4adbx3f[_0xde8b[116]][_0xde8b[117]][_0xde8b[118]][_0x4adbx42][_0xde8b[120]])){_0x4adbx40[_0xde8b[127]]({id:_0x4adbx3f[_0xde8b[116]][_0xde8b[117]][_0xde8b[118]][_0x4adbx42][_0xde8b[120]],name:_0x4adbx3f[_0xde8b[116]][_0xde8b[117]][_0xde8b[118]][_0x4adbx42][_0xde8b[122]],custom:_0x4adbx3f[_0xde8b[116]][_0xde8b[117]][_0xde8b[118]][_0x4adbx42][_0xde8b[123]]=== _0xde8b[124]?true:false,options:(_0x4adbx3f[_0xde8b[116]][_0xde8b[117]][_0xde8b[118]][_0x4adbx42][_0xde8b[105]]=== _0xde8b[125]&& _0x4adbx3f[_0xde8b[116]][_0xde8b[117]][_0xde8b[118]][_0x4adbx42][_0xde8b[126]])?_[_0xde8b[86]](_0x4adbx3f[_0xde8b[116]][_0xde8b[117]][_0xde8b[118]][_0x4adbx42][_0xde8b[126]],function(_0x4adbx3a){return {name:_0x4adbx3a,value:_0x4adbx3a}}):[]})}}}};return {count:_0x4adbx40[_0xde8b[74]],rows:_0x4adbx40}}})[_0xde8b[41]](respondWithResult(_0x4adbx25,null))[_0xde8b[32]](function(_0x4adbx24){var _0x4adbx27=_0x4adbx1f[_0xde8b[68]][_0xde8b[111]]?500:(_0x4adbx24[_0xde8b[112]]|| 500);logger[_0xde8b[31]](_0xde8b[113],_0xde8b[110],_0x4adbx27,JSON[_0xde8b[36]](_0x4adbx24));delete _0x4adbx24[_0xde8b[60]];if(_0x4adbx27=== 401){_0x4adbx27= 400};_0x4adbx25[_0xde8b[45]](_0x4adbx27)[_0xde8b[61]](_0x4adbx1f[_0xde8b[68]][_0xde8b[111]]?{message:_0xde8b[114],statusCode:_0x4adbx24[_0xde8b[112]]}:_0x4adbx24)})}
\ No newline at end of file
+var _0xb0e5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x79\x70\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x74\x65\x73\x74","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x43\x61\x6C\x6C\x73","\x73\x65\x63\x74\x69\x6F\x6E","\x46\x4C","\x43\x61\x6C\x6C\x20\x50\x75\x72\x70\x6F\x73\x65","\x64\x76","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x6C\x61\x62\x65\x6C","\x63\x75\x73\x74\x6F\x6D\x66\x69\x65\x6C\x64","\x74\x72\x75\x65","\x50\x69\x63\x6B\x20\x4C\x69\x73\x74","\x76\x61\x6C","\x70\x75\x73\x68","\x47\x45\x54","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x72\x6D\x2E\x25\x73\x2F\x63\x72\x6D\x2F\x70\x72\x69\x76\x61\x74\x65\x2F\x6A\x73\x6F\x6E\x2F\x43\x61\x6C\x6C\x73\x2F\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x68\x6F\x73\x74","\x66\x6F\x72\x6D\x61\x74","\x61\x75\x74\x68\x54\x6F\x6B\x65\x6E","\x63\x72\x6D\x61\x70\x69"];_0xb0e5[0];var jsonpatch=require(_0xb0e5[1]);var rp=require(_0xb0e5[2]);var moment=require(_0xb0e5[3]);var BPromise=require(_0xb0e5[4]);var Mustache=require(_0xb0e5[5]);var util=require(_0xb0e5[6]);var path=require(_0xb0e5[7]);var sox=require(_0xb0e5[8]);var csv=require(_0xb0e5[9]);var ejs=require(_0xb0e5[10]);var fs=require(_0xb0e5[11]);var _=require(_0xb0e5[12]);var squel=require(_0xb0e5[13]);var crypto=require(_0xb0e5[14]);var jsforce=require(_0xb0e5[15]);var deskjs=require(_0xb0e5[16]);var toCsv=require(_0xb0e5[9]);var querystring=require(_0xb0e5[17]);var Papa=require(_0xb0e5[18]);var qs=require(_0xb0e5[19]);var logger=require(_0xb0e5[21])(_0xb0e5[20]);var utils=require(_0xb0e5[22]);var config=require(_0xb0e5[23]);var db=require(_0xb0e5[25])[_0xb0e5[24]];var integrations=require(_0xb0e5[26]);var jayson=require(_0xb0e5[27]);var client=jayson[_0xb0e5[29]][_0xb0e5[28]]({port:9002});function respondWithRpcPromise(_0xddb6x1d,_0xddb6x1e,_0xddb6x1f,_0xddb6x20){return  new BPromise(function(_0xddb6x21,_0xddb6x22){var _0xddb6x23=(_0xddb6x20|| client);return _0xddb6x23[_0xb0e5[42]](_0xddb6x1d,_0xddb6x1f)[_0xb0e5[41]](function(_0xddb6x25){logger[_0xb0e5[34]](_0xb0e5[30],_0xddb6x1e,_0xb0e5[33]);logger[_0xb0e5[37]](_0xb0e5[35],_0xddb6x1e,_0xb0e5[33],JSON[_0xb0e5[36]](_0xddb6x25));if(_0xddb6x25[_0xb0e5[31]]){if(_0xddb6x25[_0xb0e5[31]][_0xb0e5[38]]=== 500){logger[_0xb0e5[31]](_0xb0e5[30],_0xddb6x1e,_0xddb6x25[_0xb0e5[31]][_0xb0e5[39]]);return _0xddb6x22(_0xddb6x25[_0xb0e5[31]][_0xb0e5[39]])};logger[_0xb0e5[31]](_0xb0e5[30],_0xddb6x1e,_0xddb6x25[_0xb0e5[31]][_0xb0e5[39]]);return _0xddb6x21(_0xddb6x25[_0xb0e5[31]][_0xb0e5[39]])}else {logger[_0xb0e5[34]](_0xb0e5[30],_0xddb6x1e,_0xb0e5[33]);_0xddb6x21(_0xddb6x25[_0xb0e5[40]][_0xb0e5[39]])}})[_0xb0e5[32]](function(_0xddb6x24){logger[_0xb0e5[31]](_0xb0e5[30],_0xddb6x1e,_0xddb6x24);_0xddb6x22(_0xddb6x24)})})}function respondWithStatusCode(_0xddb6x25,_0xddb6x27){_0xddb6x27= _0xddb6x27|| 204;return function(_0xddb6x28){if(_0xddb6x28){return _0xddb6x25[_0xb0e5[43]](_0xddb6x27)};return _0xddb6x25[_0xb0e5[45]](_0xddb6x27)[_0xb0e5[44]]()}}function respondWithResult(_0xddb6x25,_0xddb6x27){_0xddb6x27= _0xddb6x27|| 200;return function(_0xddb6x28){if(_0xddb6x28){return _0xddb6x25[_0xb0e5[45]](_0xddb6x27)[_0xb0e5[46]](_0xddb6x28)}}}function respondWithFilteredResult(_0xddb6x25,_0xddb6x2b){return function(_0xddb6x28){if(_0xddb6x28){var _0xddb6x2c=_0xddb6x28[_0xb0e5[47]],_0xddb6x2d=_0xddb6x2b[_0xb0e5[48]],_0xddb6x2e=_0xddb6x2b[_0xb0e5[48]]+ _0xddb6x2b[_0xb0e5[49]],_0xddb6x27;if(_0xddb6x2e>= _0xddb6x2c){_0xddb6x2e= _0xddb6x2c;_0xddb6x27= 200}else {_0xddb6x27= 206};_0xddb6x25[_0xb0e5[45]](_0xddb6x27);return _0xddb6x25[_0xb0e5[53]](_0xb0e5[50],_0xddb6x2d+ _0xb0e5[51]+ _0xddb6x2e+ _0xb0e5[52]+ _0xddb6x2c)[_0xb0e5[46]](_0xddb6x28)};return null}}function patchUpdates(_0xddb6x30){return function(_0xddb6x28){try{jsonpatch[_0xb0e5[54]](_0xddb6x28,_0xddb6x30,true)}catch(err){return BPromise[_0xb0e5[55]](err)};return _0xddb6x28[_0xb0e5[56]]()}}function saveUpdates(_0xddb6x32,_0xddb6x27){return function(_0xddb6x28){if(_0xddb6x28){return _0xddb6x28[_0xb0e5[57]](_0xddb6x32)[_0xb0e5[41]](function(_0xddb6x33){return _0xddb6x33})};return null}}function removeEntity(_0xddb6x25,_0xddb6x27){return function(_0xddb6x28){if(_0xddb6x28){return _0xddb6x28[_0xb0e5[58]]()[_0xb0e5[41]](function(){_0xddb6x25[_0xb0e5[45]](204)[_0xb0e5[44]]()})}}}function handleEntityNotFound(_0xddb6x25,_0xddb6x27){return function(_0xddb6x28){if(!_0xddb6x28){_0xddb6x25[_0xb0e5[43]](404)};return _0xddb6x28}}function handleError(_0xddb6x25,_0xddb6x27){_0xddb6x27= _0xddb6x27|| 500;return function(_0xddb6x24){logger[_0xb0e5[31]](_0xddb6x24[_0xb0e5[59]]);if(_0xddb6x24[_0xb0e5[60]]){delete _0xddb6x24[_0xb0e5[60]]};_0xddb6x25[_0xb0e5[45]](_0xddb6x27)[_0xb0e5[61]](_0xddb6x24)}}exports[_0xb0e5[62]]= function(_0xddb6x1f,_0xddb6x25){var _0xddb6x2b={},_0xddb6x37={},_0xddb6x38={count:0,rows:[]};_0xddb6x37[_0xb0e5[63]]= _[_0xb0e5[66]](db[_0xb0e5[65]][_0xb0e5[64]]);var _0xddb6x39={dateStart:_0xddb6x1f[_0xb0e5[68]][_0xb0e5[67]],dateEnd:_0xddb6x1f[_0xb0e5[68]][_0xb0e5[69]]};delete _0xddb6x1f[_0xb0e5[68]][_0xb0e5[67]];delete _0xddb6x1f[_0xb0e5[68]][_0xb0e5[69]];_0xddb6x37[_0xb0e5[68]]= _[_0xb0e5[66]](_0xddb6x1f[_0xb0e5[68]]);_0xddb6x37[_0xb0e5[70]]= _[_0xb0e5[71]](_0xddb6x37[_0xb0e5[63]],_0xddb6x37[_0xb0e5[68]]);_0xddb6x2b[_0xb0e5[72]]= _[_0xb0e5[71]](_0xddb6x37[_0xb0e5[63]],qs[_0xb0e5[73]](_0xddb6x1f[_0xb0e5[68]][_0xb0e5[73]]));_0xddb6x2b[_0xb0e5[72]]= (_0xddb6x2b[_0xb0e5[72]][_0xb0e5[74]])?_0xddb6x2b[_0xb0e5[72]]:_0xddb6x37[_0xb0e5[63]];if(!_0xddb6x1f[_0xb0e5[68]][_0xb0e5[76]](_0xb0e5[75])){_0xddb6x2b[_0xb0e5[49]]= qs[_0xb0e5[49]](_0xddb6x1f[_0xb0e5[68]][_0xb0e5[49]]);_0xddb6x2b[_0xb0e5[48]]= qs[_0xb0e5[48]](_0xddb6x1f[_0xb0e5[68]][_0xb0e5[48]])};_0xddb6x2b[_0xb0e5[77]]= qs[_0xb0e5[78]](_0xddb6x1f[_0xb0e5[68]][_0xb0e5[78]]);_0xddb6x2b[_0xb0e5[79]]= qs[_0xb0e5[70]](_[_0xb0e5[80]](_0xddb6x1f[_0xb0e5[68]],_0xddb6x37[_0xb0e5[70]]));if(_0xddb6x39[_0xb0e5[67]]){if(_0xddb6x39[_0xb0e5[69]]){_0xddb6x39[_0xb0e5[69]]= moment(_0xddb6x39[_0xb0e5[69]])[_0xb0e5[82]](1,_0xb0e5[81])}else {_0xddb6x39[_0xb0e5[69]]= moment(_0xddb6x39[_0xb0e5[67]])[_0xb0e5[82]](1,_0xb0e5[81])};_[_0xb0e5[83]](_0xddb6x2b[_0xb0e5[79]],{createdAt:{$gte:_0xddb6x39[_0xb0e5[67]],$lte:_0xddb6x39[_0xb0e5[69]]}})};if(_0xddb6x1f[_0xb0e5[68]][_0xb0e5[84]]){_0xddb6x2b[_0xb0e5[79]]= _[_0xb0e5[83]](_0xddb6x2b[_0xb0e5[79]],{$or:_[_0xb0e5[86]](_0xddb6x2b[_0xb0e5[72]],function(_0xddb6x3a){var _0xddb6x38={};_0xddb6x38[_0xddb6x3a]= {$like:_0xb0e5[85]+ _0xddb6x1f[_0xb0e5[68]][_0xb0e5[84]]+ _0xb0e5[85]};return _0xddb6x38})})};_0xddb6x2b= _[_0xb0e5[83]]({},_0xddb6x2b,_0xddb6x1f[_0xb0e5[87]]);var _0xddb6x3b={where:_0xddb6x2b[_0xb0e5[79]]};return db[_0xb0e5[65]][_0xb0e5[47]](_0xddb6x3b)[_0xb0e5[41]](function(_0xddb6x2c){_0xddb6x38[_0xb0e5[47]]= _0xddb6x2c;if(_0xddb6x1f[_0xb0e5[68]][_0xb0e5[89]]){_0xddb6x2b[_0xb0e5[90]]= [{all:true}]};return db[_0xb0e5[65]][_0xb0e5[91]](_0xddb6x2b)})[_0xb0e5[41]](function(_0xddb6x3c){_0xddb6x38[_0xb0e5[88]]= _0xddb6x3c;return _0xddb6x38})[_0xb0e5[41]](respondWithFilteredResult(_0xddb6x25,_0xddb6x2b))[_0xb0e5[32]](handleError(_0xddb6x25,null))};exports[_0xb0e5[92]]= function(_0xddb6x1f,_0xddb6x25){var _0xddb6x2b={raw:false,where:{id:_0xddb6x1f[_0xb0e5[94]][_0xb0e5[93]]}},_0xddb6x37={};_0xddb6x37[_0xb0e5[63]]= _[_0xb0e5[66]](db[_0xb0e5[65]][_0xb0e5[64]]);_0xddb6x37[_0xb0e5[68]]= _[_0xb0e5[66]](_0xddb6x1f[_0xb0e5[68]]);_0xddb6x37[_0xb0e5[70]]= _[_0xb0e5[71]](_0xddb6x37[_0xb0e5[63]],_0xddb6x37[_0xb0e5[68]]);_0xddb6x2b[_0xb0e5[72]]= _[_0xb0e5[71]](_0xddb6x37[_0xb0e5[63]],qs[_0xb0e5[73]](_0xddb6x1f[_0xb0e5[68]][_0xb0e5[73]]));_0xddb6x2b[_0xb0e5[72]]= (_0xddb6x2b[_0xb0e5[72]][_0xb0e5[74]])?_0xddb6x2b[_0xb0e5[72]]:_0xddb6x37[_0xb0e5[63]];if(_0xddb6x1f[_0xb0e5[68]][_0xb0e5[89]]){_0xddb6x2b[_0xb0e5[90]]= [{all:true}]};_0xddb6x2b= _[_0xb0e5[83]]({},_0xddb6x2b,_0xddb6x1f[_0xb0e5[87]]);return db[_0xb0e5[65]][_0xb0e5[95]](_0xddb6x2b)[_0xb0e5[41]](handleEntityNotFound(_0xddb6x25,null))[_0xb0e5[41]](respondWithResult(_0xddb6x25,null))[_0xb0e5[32]](handleError(_0xddb6x25,null))};exports[_0xb0e5[96]]= function(_0xddb6x1f,_0xddb6x25){return db[_0xb0e5[65]][_0xb0e5[96]](_0xddb6x1f[_0xb0e5[97]],{})[_0xb0e5[41]](respondWithResult(_0xddb6x25,201))[_0xb0e5[32]](handleError(_0xddb6x25,null))};exports[_0xb0e5[57]]= function(_0xddb6x1f,_0xddb6x25){if(_0xddb6x1f[_0xb0e5[97]][_0xb0e5[93]]){delete _0xddb6x1f[_0xb0e5[97]][_0xb0e5[93]]};return db[_0xb0e5[65]][_0xb0e5[95]]({where:{id:_0xddb6x1f[_0xb0e5[94]][_0xb0e5[93]]}})[_0xb0e5[41]](handleEntityNotFound(_0xddb6x25,null))[_0xb0e5[41]](saveUpdates(_0xddb6x1f[_0xb0e5[97]],null))[_0xb0e5[41]](respondWithResult(_0xddb6x25,null))[_0xb0e5[32]](handleError(_0xddb6x25,null))};exports[_0xb0e5[58]]= function(_0xddb6x1f,_0xddb6x25){return db[_0xb0e5[65]][_0xb0e5[95]]({where:{id:_0xddb6x1f[_0xb0e5[94]][_0xb0e5[93]]}})[_0xb0e5[41]](handleEntityNotFound(_0xddb6x25,null))[_0xb0e5[41]](removeEntity(_0xddb6x25,null))[_0xb0e5[32]](handleError(_0xddb6x25,null))};exports[_0xb0e5[98]]= function(_0xddb6x1f,_0xddb6x28,_0xddb6x3d){var _0xddb6x2b={};var _0xddb6x37={};var _0xddb6x3e;var _0xddb6x2c;return db[_0xb0e5[65]][_0xb0e5[100]]({where:{id:_0xddb6x1f[_0xb0e5[94]][_0xb0e5[93]]}})[_0xb0e5[41]](handleEntityNotFound(_0xddb6x28,null))[_0xb0e5[41]](function(_0xddb6x28){if(_0xddb6x28){_0xddb6x3e= _0xddb6x28;_0xddb6x37[_0xb0e5[63]]= _[_0xb0e5[66]](db[_0xb0e5[99]][_0xb0e5[64]]);_0xddb6x37[_0xb0e5[68]]= _[_0xb0e5[66]](_0xddb6x1f[_0xb0e5[68]]);_0xddb6x37[_0xb0e5[70]]= _[_0xb0e5[71]](_0xddb6x37[_0xb0e5[63]],_0xddb6x37[_0xb0e5[68]]);_0xddb6x2b[_0xb0e5[72]]= _[_0xb0e5[71]](_0xddb6x37[_0xb0e5[63]],qs[_0xb0e5[73]](_0xddb6x1f[_0xb0e5[68]][_0xb0e5[73]]));_0xddb6x2b[_0xb0e5[72]]= (_0xddb6x2b[_0xb0e5[72]][_0xb0e5[74]])?_0xddb6x2b[_0xb0e5[72]]:_0xddb6x37[_0xb0e5[63]];_0xddb6x2b[_0xb0e5[77]]= qs[_0xb0e5[78]](_0xddb6x1f[_0xb0e5[68]][_0xb0e5[78]]);_0xddb6x2b[_0xb0e5[79]]= qs[_0xb0e5[70]](_[_0xb0e5[80]](_0xddb6x1f[_0xb0e5[68]],_0xddb6x37[_0xb0e5[70]]));if(_0xddb6x1f[_0xb0e5[68]][_0xb0e5[84]]){_0xddb6x2b[_0xb0e5[79]]= _[_0xb0e5[83]](_0xddb6x2b[_0xb0e5[79]],{$or:_[_0xb0e5[86]](_0xddb6x2b[_0xb0e5[72]],function(_0xddb6x3a){var _0xddb6x38={};_0xddb6x38[_0xddb6x3a]= {$like:_0xb0e5[85]+ _0xddb6x1f[_0xb0e5[68]][_0xb0e5[84]]+ _0xb0e5[85]};return _0xddb6x38})})};_0xddb6x2b= _[_0xb0e5[83]]({},_0xddb6x2b,_0xddb6x1f[_0xb0e5[87]]);return _0xddb6x3e[_0xb0e5[98]](_0xddb6x2b)}})[_0xb0e5[41]](function(_0xddb6x3f){if(_0xddb6x3f){_0xddb6x2c= _0xddb6x3f[_0xb0e5[74]];if(!_0xddb6x1f[_0xb0e5[68]][_0xb0e5[76]](_0xb0e5[75])){_0xddb6x2b[_0xb0e5[49]]= qs[_0xb0e5[49]](_0xddb6x1f[_0xb0e5[68]][_0xb0e5[49]]);_0xddb6x2b[_0xb0e5[48]]= qs[_0xb0e5[48]](_0xddb6x1f[_0xb0e5[68]][_0xb0e5[48]])};return _0xddb6x3e[_0xb0e5[98]](_0xddb6x2b)}})[_0xb0e5[41]](function(_0xddb6x3c){if(_0xddb6x3c){return _0xddb6x3c?{count:_0xddb6x2c,rows:_0xddb6x3c}:null}})[_0xb0e5[41]](respondWithResult(_0xddb6x28,null))[_0xb0e5[32]](handleError(_0xddb6x28,null))};exports[_0xb0e5[101]]= function(_0xddb6x1f,_0xddb6x25,_0xddb6x3d){if(_0xddb6x1f[_0xb0e5[97]][_0xb0e5[93]]){delete _0xddb6x1f[_0xb0e5[97]][_0xb0e5[93]]};return db[_0xb0e5[65]][_0xb0e5[100]]({where:{id:_0xddb6x1f[_0xb0e5[94]][_0xb0e5[93]]}})[_0xb0e5[41]](handleEntityNotFound(_0xddb6x25,null))[_0xb0e5[41]](function(_0xddb6x28){if(_0xddb6x28){_0xddb6x1f[_0xb0e5[97]][_0xb0e5[102]]= _0xddb6x28[_0xb0e5[93]];_0xddb6x1f[_0xb0e5[97]][_0xb0e5[103]]= integrations[_0xb0e5[106]](_0xddb6x1f[_0xb0e5[97]][_0xb0e5[104]],_0xddb6x1f[_0xb0e5[97]][_0xb0e5[105]]);_0xddb6x1f[_0xb0e5[97]][_0xb0e5[107]]= integrations[_0xb0e5[108]](_0xddb6x1f[_0xb0e5[97]][_0xb0e5[104]],_0xddb6x1f[_0xb0e5[97]][_0xb0e5[105]]);return db[_0xb0e5[99]][_0xb0e5[96]](_0xddb6x1f[_0xb0e5[97]],{include:[{model:db[_0xb0e5[109]],as:_0xb0e5[103]},{model:db[_0xb0e5[109]],as:_0xb0e5[107]}]})};return null})[_0xb0e5[41]](respondWithResult(_0xddb6x25,null))[_0xb0e5[32]](handleError(_0xddb6x25,null))};exports[_0xb0e5[110]]= function(_0xddb6x1f,_0xddb6x25,_0xddb6x3d){return db[_0xb0e5[65]][_0xb0e5[100]]({where:{id:_0xddb6x1f[_0xb0e5[94]][_0xb0e5[93]]},attributes:[_0xb0e5[93],_0xb0e5[130],_0xb0e5[132]]})[_0xb0e5[41]](handleEntityNotFound(_0xddb6x25,null))[_0xb0e5[41]](function(_0xddb6x28){if(_0xddb6x28){return rp({method:_0xb0e5[128],uri:util[_0xb0e5[131]](_0xb0e5[129],_0xddb6x28[_0xb0e5[130]]),qs:{authtoken:_0xddb6x28[_0xb0e5[132]],scope:_0xb0e5[133]},json:true})}})[_0xb0e5[41]](function(_0xddb6x3f){if(_0xddb6x3f){if(_0xddb6x3f[_0xb0e5[115]]&& _0xddb6x3f[_0xb0e5[115]][_0xb0e5[31]]){throw  new Error(_0xddb6x3f[_0xb0e5[115]][_0xb0e5[31]][_0xb0e5[39]])};var _0xddb6x40=[];if(_0xddb6x3f[_0xb0e5[116]]&& _0xddb6x3f[_0xb0e5[116]][_0xb0e5[117]]){if(_0xddb6x3f[_0xb0e5[116]][_0xb0e5[117]][_0xb0e5[118]]){var _0xddb6x41=[_0xb0e5[119]];for(var _0xddb6x42=0,_0xddb6x43=_0xddb6x3f[_0xb0e5[116]][_0xb0e5[117]][_0xb0e5[118]][_0xb0e5[74]];_0xddb6x42< _0xddb6x43;_0xddb6x42++){if(_[_0xb0e5[121]](_0xddb6x41,_0xddb6x3f[_0xb0e5[116]][_0xb0e5[117]][_0xb0e5[118]][_0xddb6x42][_0xb0e5[120]])){_0xddb6x40[_0xb0e5[127]]({id:_0xddb6x3f[_0xb0e5[116]][_0xb0e5[117]][_0xb0e5[118]][_0xddb6x42][_0xb0e5[120]],name:_0xddb6x3f[_0xb0e5[116]][_0xb0e5[117]][_0xb0e5[118]][_0xddb6x42][_0xb0e5[122]],custom:_0xddb6x3f[_0xb0e5[116]][_0xb0e5[117]][_0xb0e5[118]][_0xddb6x42][_0xb0e5[123]]=== _0xb0e5[124]?true:false,options:(_0xddb6x3f[_0xb0e5[116]][_0xb0e5[117]][_0xb0e5[118]][_0xddb6x42][_0xb0e5[105]]=== _0xb0e5[125]&& _0xddb6x3f[_0xb0e5[116]][_0xb0e5[117]][_0xb0e5[118]][_0xddb6x42][_0xb0e5[126]])?_[_0xb0e5[86]](_0xddb6x3f[_0xb0e5[116]][_0xb0e5[117]][_0xb0e5[118]][_0xddb6x42][_0xb0e5[126]],function(_0xddb6x3a){return {name:_0xddb6x3a,value:_0xddb6x3a}}):[]})}}}};return {count:_0xddb6x40[_0xb0e5[74]],rows:_0xddb6x40}}})[_0xb0e5[41]](respondWithResult(_0xddb6x25,null))[_0xb0e5[32]](function(_0xddb6x24){var _0xddb6x27=_0xddb6x1f[_0xb0e5[68]][_0xb0e5[111]]?500:(_0xddb6x24[_0xb0e5[112]]|| 500);logger[_0xb0e5[31]](_0xb0e5[113],_0xb0e5[110],_0xddb6x27,JSON[_0xb0e5[36]](_0xddb6x24));delete _0xddb6x24[_0xb0e5[60]];if(_0xddb6x27=== 401){_0xddb6x27= 400};_0xddb6x25[_0xb0e5[45]](_0xddb6x27)[_0xb0e5[61]](_0xddb6x1f[_0xb0e5[68]][_0xb0e5[111]]?{message:_0xb0e5[114],statusCode:_0xddb6x24[_0xb0e5[112]]}:_0xddb6x24)})}
\ No newline at end of file
index b21fe46..a6044b5 100644 (file)
@@ -1 +1 @@
-var _0x6ead=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x74\x5F\x7A\x6F\x68\x6F\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x6ead[0];var _=require(_0x6ead[1]);var util=require(_0x6ead[2]);var logger=require(_0x6ead[4])(_0x6ead[3]);var moment=require(_0x6ead[5]);var BPromise=require(_0x6ead[6]);var rp=require(_0x6ead[7]);var attributes=require(_0x6ead[8]);var integrations=require(_0x6ead[9]);module[_0x6ead[10]]= function(_0x2484x9,_0x2484xa){return _0x2484x9[_0x6ead[13]](_0x6ead[11],attributes,{tableName:_0x6ead[12],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xfc84=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x74\x5F\x7A\x6F\x68\x6F\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0xfc84[0];var _=require(_0xfc84[1]);var util=require(_0xfc84[2]);var logger=require(_0xfc84[4])(_0xfc84[3]);var moment=require(_0xfc84[5]);var BPromise=require(_0xfc84[6]);var rp=require(_0xfc84[7]);var attributes=require(_0xfc84[8]);var integrations=require(_0xfc84[9]);module[_0xfc84[10]]= function(_0x5053x9,_0x5053xa){return _0x5053x9[_0xfc84[13]](_0xfc84[11],attributes,{tableName:_0xfc84[12],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 931d403..c542f5d 100644 (file)
@@ -1 +1 @@
-var _0xb45d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74","\x53\x68\x6F\x77\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74","\x66\x69\x6E\x64"];_0xb45d[0];var _=require(_0xb45d[1]);var util=require(_0xb45d[2]);var moment=require(_0xb45d[3]);var BPromise=require(_0xb45d[4]);var rs=require(_0xb45d[5]);var fs=require(_0xb45d[6]);var db=require(_0xb45d[8])[_0xb45d[7]];var utils=require(_0xb45d[9]);var logger=require(_0xb45d[11])(_0xb45d[10]);var config=require(_0xb45d[12]);var jayson=require(_0xb45d[13]);var client=jayson[_0xb45d[15]][_0xb45d[14]]({port:9002});function respondWithRpcPromise(_0x8409xe,_0x8409xf,_0x8409x10){return  new BPromise(function(_0x8409x11,_0x8409x12){return client[_0xb45d[28]](_0x8409xe,_0x8409x10)[_0xb45d[27]](function(_0x8409x14){logger[_0xb45d[20]](_0xb45d[16],_0x8409xf,_0xb45d[19]);logger[_0xb45d[23]](_0xb45d[21],_0x8409xf,_0xb45d[19],JSON[_0xb45d[22]](_0x8409x14));if(_0x8409x14[_0xb45d[17]]){if(_0x8409x14[_0xb45d[17]][_0xb45d[24]]=== 500){logger[_0xb45d[17]](_0xb45d[16],_0x8409xf,_0x8409x14[_0xb45d[17]][_0xb45d[25]]);return _0x8409x12(_0x8409x14[_0xb45d[17]][_0xb45d[25]])};logger[_0xb45d[17]](_0xb45d[16],_0x8409xf,_0x8409x14[_0xb45d[17]][_0xb45d[25]]);return _0x8409x11(_0x8409x14[_0xb45d[17]][_0xb45d[25]])}else {logger[_0xb45d[20]](_0xb45d[16],_0x8409xf,_0xb45d[19]);_0x8409x11(_0x8409x14[_0xb45d[26]][_0xb45d[25]])}})[_0xb45d[18]](function(_0x8409x13){logger[_0xb45d[17]](_0xb45d[16],_0x8409xf,_0x8409x13);_0x8409x12(_0x8409x13)})})}exports[_0xb45d[29]]= function(_0x8409x10){var _0x8409x15=this;return  new Promise(function(_0x8409x11,_0x8409x12){return db[_0xb45d[40]][_0xb45d[39]]({raw:_0x8409x10[_0xb45d[30]]?(_0x8409x10[_0xb45d[30]][_0xb45d[31]]=== undefined)?true:false:true,where:_0x8409x10[_0xb45d[30]]?_0x8409x10[_0xb45d[30]][_0xb45d[32]]|| null:null,attributes:_0x8409x10[_0xb45d[30]]?_0x8409x10[_0xb45d[30]][_0xb45d[33]]|| null:null,limit:_0x8409x10[_0xb45d[30]]?_0x8409x10[_0xb45d[30]][_0xb45d[34]]|| null:null,include:_0x8409x10[_0xb45d[30]]?(_0x8409x10[_0xb45d[30]][_0xb45d[35]]?_[_0xb45d[38]](_0x8409x10[_0xb45d[30]][_0xb45d[35]],function(_0x8409x16){return {model:db[_0x8409x16[_0xb45d[36]]],as:_0x8409x16[_0xb45d[37]],attributes:_0x8409x16[_0xb45d[33]],include:_0x8409x16[_0xb45d[35]]?_[_0xb45d[38]](_0x8409x16[_0xb45d[35]],function(_0x8409x17){return {model:db[_0x8409x17[_0xb45d[36]]],as:_0x8409x17[_0xb45d[37]],attributes:_0x8409x17[_0xb45d[33]],include:_0x8409x17[_0xb45d[35]]?_[_0xb45d[38]](_0x8409x17[_0xb45d[35]],function(_0x8409x18){return {model:db[_0x8409x18[_0xb45d[36]]],as:_0x8409x18[_0xb45d[37]],attributes:_0x8409x18[_0xb45d[33]]}}):[]}}):[]}}):[]):[]})[_0xb45d[27]](function(_0x8409x14){logger[_0xb45d[20]](_0xb45d[29],_0x8409x10);logger[_0xb45d[23]](_0xb45d[29],_0x8409x10,JSON[_0xb45d[22]](_0x8409x14));_0x8409x11(_0x8409x14)})[_0xb45d[18]](function(_0x8409x13){logger[_0xb45d[17]](_0xb45d[29],_0x8409x13[_0xb45d[25]],_0x8409x10);_0x8409x12(_0x8409x15[_0xb45d[17]](500,_0x8409x13[_0xb45d[25]]))})})};exports[_0xb45d[41]]= function(_0x8409x10){var _0x8409x15=this;return  new Promise(function(_0x8409x11,_0x8409x12){return db[_0xb45d[40]][_0xb45d[42]]({raw:_0x8409x10[_0xb45d[30]]?(_0x8409x10[_0xb45d[30]][_0xb45d[31]]=== undefined)?true:false:true,where:_0x8409x10[_0xb45d[30]]?_0x8409x10[_0xb45d[30]][_0xb45d[32]]|| null:null,attributes:_0x8409x10[_0xb45d[30]]?_0x8409x10[_0xb45d[30]][_0xb45d[33]]|| null:null,include:_0x8409x10[_0xb45d[30]]?(_0x8409x10[_0xb45d[30]][_0xb45d[35]]?_[_0xb45d[38]](_0x8409x10[_0xb45d[30]][_0xb45d[35]],function(_0x8409x16){return {model:db[_0x8409x16[_0xb45d[36]]],as:_0x8409x16[_0xb45d[37]],attributes:_0x8409x16[_0xb45d[33]],include:_0x8409x16[_0xb45d[35]]?_[_0xb45d[38]](_0x8409x16[_0xb45d[35]],function(_0x8409x17){return {model:db[_0x8409x17[_0xb45d[36]]],as:_0x8409x17[_0xb45d[37]],attributes:_0x8409x17[_0xb45d[33]],include:_0x8409x17[_0xb45d[35]]?_[_0xb45d[38]](_0x8409x17[_0xb45d[35]],function(_0x8409x18){return {model:db[_0x8409x18[_0xb45d[36]]],as:_0x8409x18[_0xb45d[37]],attributes:_0x8409x18[_0xb45d[33]]}}):[]}}):[]}}):[]):[]})[_0xb45d[27]](function(_0x8409x14){logger[_0xb45d[20]](_0xb45d[41],_0x8409x10);logger[_0xb45d[23]](_0xb45d[41],_0x8409x10,JSON[_0xb45d[22]](_0x8409x14));_0x8409x11(_0x8409x14)})[_0xb45d[18]](function(_0x8409x13){logger[_0xb45d[17]](_0xb45d[41],_0x8409x13[_0xb45d[25]],_0x8409x10);_0x8409x12(_0x8409x15[_0xb45d[17]](500,_0x8409x13[_0xb45d[25]]))})})}
\ No newline at end of file
+var _0x3603=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74","\x53\x68\x6F\x77\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74","\x66\x69\x6E\x64"];_0x3603[0];var _=require(_0x3603[1]);var util=require(_0x3603[2]);var moment=require(_0x3603[3]);var BPromise=require(_0x3603[4]);var rs=require(_0x3603[5]);var fs=require(_0x3603[6]);var db=require(_0x3603[8])[_0x3603[7]];var utils=require(_0x3603[9]);var logger=require(_0x3603[11])(_0x3603[10]);var config=require(_0x3603[12]);var jayson=require(_0x3603[13]);var client=jayson[_0x3603[15]][_0x3603[14]]({port:9002});function respondWithRpcPromise(_0xd03cxe,_0xd03cxf,_0xd03cx10){return  new BPromise(function(_0xd03cx11,_0xd03cx12){return client[_0x3603[28]](_0xd03cxe,_0xd03cx10)[_0x3603[27]](function(_0xd03cx14){logger[_0x3603[20]](_0x3603[16],_0xd03cxf,_0x3603[19]);logger[_0x3603[23]](_0x3603[21],_0xd03cxf,_0x3603[19],JSON[_0x3603[22]](_0xd03cx14));if(_0xd03cx14[_0x3603[17]]){if(_0xd03cx14[_0x3603[17]][_0x3603[24]]=== 500){logger[_0x3603[17]](_0x3603[16],_0xd03cxf,_0xd03cx14[_0x3603[17]][_0x3603[25]]);return _0xd03cx12(_0xd03cx14[_0x3603[17]][_0x3603[25]])};logger[_0x3603[17]](_0x3603[16],_0xd03cxf,_0xd03cx14[_0x3603[17]][_0x3603[25]]);return _0xd03cx11(_0xd03cx14[_0x3603[17]][_0x3603[25]])}else {logger[_0x3603[20]](_0x3603[16],_0xd03cxf,_0x3603[19]);_0xd03cx11(_0xd03cx14[_0x3603[26]][_0x3603[25]])}})[_0x3603[18]](function(_0xd03cx13){logger[_0x3603[17]](_0x3603[16],_0xd03cxf,_0xd03cx13);_0xd03cx12(_0xd03cx13)})})}exports[_0x3603[29]]= function(_0xd03cx10){var _0xd03cx15=this;return  new Promise(function(_0xd03cx11,_0xd03cx12){return db[_0x3603[40]][_0x3603[39]]({raw:_0xd03cx10[_0x3603[30]]?(_0xd03cx10[_0x3603[30]][_0x3603[31]]=== undefined)?true:false:true,where:_0xd03cx10[_0x3603[30]]?_0xd03cx10[_0x3603[30]][_0x3603[32]]|| null:null,attributes:_0xd03cx10[_0x3603[30]]?_0xd03cx10[_0x3603[30]][_0x3603[33]]|| null:null,limit:_0xd03cx10[_0x3603[30]]?_0xd03cx10[_0x3603[30]][_0x3603[34]]|| null:null,include:_0xd03cx10[_0x3603[30]]?(_0xd03cx10[_0x3603[30]][_0x3603[35]]?_[_0x3603[38]](_0xd03cx10[_0x3603[30]][_0x3603[35]],function(_0xd03cx16){return {model:db[_0xd03cx16[_0x3603[36]]],as:_0xd03cx16[_0x3603[37]],attributes:_0xd03cx16[_0x3603[33]],include:_0xd03cx16[_0x3603[35]]?_[_0x3603[38]](_0xd03cx16[_0x3603[35]],function(_0xd03cx17){return {model:db[_0xd03cx17[_0x3603[36]]],as:_0xd03cx17[_0x3603[37]],attributes:_0xd03cx17[_0x3603[33]],include:_0xd03cx17[_0x3603[35]]?_[_0x3603[38]](_0xd03cx17[_0x3603[35]],function(_0xd03cx18){return {model:db[_0xd03cx18[_0x3603[36]]],as:_0xd03cx18[_0x3603[37]],attributes:_0xd03cx18[_0x3603[33]]}}):[]}}):[]}}):[]):[]})[_0x3603[27]](function(_0xd03cx14){logger[_0x3603[20]](_0x3603[29],_0xd03cx10);logger[_0x3603[23]](_0x3603[29],_0xd03cx10,JSON[_0x3603[22]](_0xd03cx14));_0xd03cx11(_0xd03cx14)})[_0x3603[18]](function(_0xd03cx13){logger[_0x3603[17]](_0x3603[29],_0xd03cx13[_0x3603[25]],_0xd03cx10);_0xd03cx12(_0xd03cx15[_0x3603[17]](500,_0xd03cx13[_0x3603[25]]))})})};exports[_0x3603[41]]= function(_0xd03cx10){var _0xd03cx15=this;return  new Promise(function(_0xd03cx11,_0xd03cx12){return db[_0x3603[40]][_0x3603[42]]({raw:_0xd03cx10[_0x3603[30]]?(_0xd03cx10[_0x3603[30]][_0x3603[31]]=== undefined)?true:false:true,where:_0xd03cx10[_0x3603[30]]?_0xd03cx10[_0x3603[30]][_0x3603[32]]|| null:null,attributes:_0xd03cx10[_0x3603[30]]?_0xd03cx10[_0x3603[30]][_0x3603[33]]|| null:null,include:_0xd03cx10[_0x3603[30]]?(_0xd03cx10[_0x3603[30]][_0x3603[35]]?_[_0x3603[38]](_0xd03cx10[_0x3603[30]][_0x3603[35]],function(_0xd03cx16){return {model:db[_0xd03cx16[_0x3603[36]]],as:_0xd03cx16[_0x3603[37]],attributes:_0xd03cx16[_0x3603[33]],include:_0xd03cx16[_0x3603[35]]?_[_0x3603[38]](_0xd03cx16[_0x3603[35]],function(_0xd03cx17){return {model:db[_0xd03cx17[_0x3603[36]]],as:_0xd03cx17[_0x3603[37]],attributes:_0xd03cx17[_0x3603[33]],include:_0xd03cx17[_0x3603[35]]?_[_0x3603[38]](_0xd03cx17[_0x3603[35]],function(_0xd03cx18){return {model:db[_0xd03cx18[_0x3603[36]]],as:_0xd03cx18[_0x3603[37]],attributes:_0xd03cx18[_0x3603[33]]}}):[]}}):[]}}):[]):[]})[_0x3603[27]](function(_0xd03cx14){logger[_0x3603[20]](_0x3603[41],_0xd03cx10);logger[_0x3603[23]](_0x3603[41],_0xd03cx10,JSON[_0x3603[22]](_0xd03cx14));_0xd03cx11(_0xd03cx14)})[_0x3603[18]](function(_0xd03cx13){logger[_0x3603[17]](_0x3603[41],_0xd03cx13[_0x3603[25]],_0xd03cx10);_0xd03cx12(_0xd03cx15[_0x3603[17]](500,_0xd03cx13[_0x3603[25]]))})})}
\ No newline at end of file
index d555dd1..fdc240a 100644 (file)
@@ -1 +1 @@
-var _0xbfdf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x73\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x2F\x3A\x69\x64\x2F\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xbfdf[0];var multer=require(_0xbfdf[1]);var util=require(_0xbfdf[2]);var path=require(_0xbfdf[3]);var express=require(_0xbfdf[4]);var router=express.Router();var auth=require(_0xbfdf[5]);var interaction=require(_0xbfdf[6]);var config=require(_0xbfdf[7]);var controller=require(_0xbfdf[8]);router[_0xbfdf[12]](_0xbfdf[9],auth[_0xbfdf[10]](),controller[_0xbfdf[11]]);router[_0xbfdf[12]](_0xbfdf[13],auth[_0xbfdf[10]](),controller[_0xbfdf[14]]);router[_0xbfdf[12]](_0xbfdf[15],auth[_0xbfdf[10]](),controller[_0xbfdf[16]]);router[_0xbfdf[12]](_0xbfdf[17],auth[_0xbfdf[10]](),controller[_0xbfdf[18]]);router[_0xbfdf[12]](_0xbfdf[19],auth[_0xbfdf[10]](),controller[_0xbfdf[20]]);router[_0xbfdf[22]](_0xbfdf[9],auth[_0xbfdf[10]](),controller[_0xbfdf[21]]);router[_0xbfdf[24]](_0xbfdf[13],auth[_0xbfdf[10]](),controller[_0xbfdf[23]]);router[_0xbfdf[26]](_0xbfdf[13],auth[_0xbfdf[10]](),controller[_0xbfdf[25]]);module[_0xbfdf[27]]= router
\ No newline at end of file
+var _0x2583=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x73\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x2F\x3A\x69\x64\x2F\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2583[0];var multer=require(_0x2583[1]);var util=require(_0x2583[2]);var path=require(_0x2583[3]);var express=require(_0x2583[4]);var router=express.Router();var auth=require(_0x2583[5]);var interaction=require(_0x2583[6]);var config=require(_0x2583[7]);var controller=require(_0x2583[8]);router[_0x2583[12]](_0x2583[9],auth[_0x2583[10]](),controller[_0x2583[11]]);router[_0x2583[12]](_0x2583[13],auth[_0x2583[10]](),controller[_0x2583[14]]);router[_0x2583[12]](_0x2583[15],auth[_0x2583[10]](),controller[_0x2583[16]]);router[_0x2583[12]](_0x2583[17],auth[_0x2583[10]](),controller[_0x2583[18]]);router[_0x2583[12]](_0x2583[19],auth[_0x2583[10]](),controller[_0x2583[20]]);router[_0x2583[22]](_0x2583[9],auth[_0x2583[10]](),controller[_0x2583[21]]);router[_0x2583[24]](_0x2583[13],auth[_0x2583[10]](),controller[_0x2583[23]]);router[_0x2583[26]](_0x2583[13],auth[_0x2583[10]](),controller[_0x2583[25]]);module[_0x2583[27]]= router
\ No newline at end of file
index cbd844f..83fb436 100644 (file)
@@ -1 +1 @@
-var _0x3b9e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0x3b9e[0];var Sequelize=require(_0x3b9e[1]);module[_0x3b9e[2]]= {name:{type:Sequelize[_0x3b9e[3]]},description:{type:Sequelize[_0x3b9e[3]]}}
\ No newline at end of file
+var _0xd71a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0xd71a[0];var Sequelize=require(_0xd71a[1]);module[_0xd71a[2]]= {name:{type:Sequelize[_0xd71a[3]]},description:{type:Sequelize[_0xd71a[3]]}}
\ No newline at end of file
index 2b1a8d3..a0f439e 100644 (file)
@@ -1 +1 @@
-var _0x7f4d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73"];_0x7f4d[0];var jsonpatch=require(_0x7f4d[1]);var rp=require(_0x7f4d[2]);var moment=require(_0x7f4d[3]);var BPromise=require(_0x7f4d[4]);var Mustache=require(_0x7f4d[5]);var util=require(_0x7f4d[6]);var path=require(_0x7f4d[7]);var sox=require(_0x7f4d[8]);var csv=require(_0x7f4d[9]);var ejs=require(_0x7f4d[10]);var fs=require(_0x7f4d[11]);var _=require(_0x7f4d[12]);var squel=require(_0x7f4d[13]);var crypto=require(_0x7f4d[14]);var jsforce=require(_0x7f4d[15]);var deskjs=require(_0x7f4d[16]);var toCsv=require(_0x7f4d[9]);var querystring=require(_0x7f4d[17]);var Papa=require(_0x7f4d[18]);var qs=require(_0x7f4d[19]);var logger=require(_0x7f4d[21])(_0x7f4d[20]);var utils=require(_0x7f4d[22]);var config=require(_0x7f4d[23]);var db=require(_0x7f4d[25])[_0x7f4d[24]];var jayson=require(_0x7f4d[26]);var client=jayson[_0x7f4d[28]][_0x7f4d[27]]({port:9002});function respondWithRpcPromise(_0xd59ax1c,_0xd59ax1d,_0xd59ax1e,_0xd59ax1f){return  new BPromise(function(_0xd59ax20,_0xd59ax21){var _0xd59ax22=(_0xd59ax1f|| client);return _0xd59ax22[_0x7f4d[41]](_0xd59ax1c,_0xd59ax1e)[_0x7f4d[40]](function(_0xd59ax24){logger[_0x7f4d[33]](_0x7f4d[29],_0xd59ax1d,_0x7f4d[32]);logger[_0x7f4d[36]](_0x7f4d[34],_0xd59ax1d,_0x7f4d[32],JSON[_0x7f4d[35]](_0xd59ax24));if(_0xd59ax24[_0x7f4d[30]]){if(_0xd59ax24[_0x7f4d[30]][_0x7f4d[37]]=== 500){logger[_0x7f4d[30]](_0x7f4d[29],_0xd59ax1d,_0xd59ax24[_0x7f4d[30]][_0x7f4d[38]]);return _0xd59ax21(_0xd59ax24[_0x7f4d[30]][_0x7f4d[38]])};logger[_0x7f4d[30]](_0x7f4d[29],_0xd59ax1d,_0xd59ax24[_0x7f4d[30]][_0x7f4d[38]]);return _0xd59ax20(_0xd59ax24[_0x7f4d[30]][_0x7f4d[38]])}else {logger[_0x7f4d[33]](_0x7f4d[29],_0xd59ax1d,_0x7f4d[32]);_0xd59ax20(_0xd59ax24[_0x7f4d[39]][_0x7f4d[38]])}})[_0x7f4d[31]](function(_0xd59ax23){logger[_0x7f4d[30]](_0x7f4d[29],_0xd59ax1d,_0xd59ax23);_0xd59ax21(_0xd59ax23)})})}function respondWithStatusCode(_0xd59ax24,_0xd59ax26){_0xd59ax26= _0xd59ax26|| 204;return function(_0xd59ax27){if(_0xd59ax27){return _0xd59ax24[_0x7f4d[42]](_0xd59ax26)};return _0xd59ax24[_0x7f4d[44]](_0xd59ax26)[_0x7f4d[43]]()}}function respondWithResult(_0xd59ax24,_0xd59ax26){_0xd59ax26= _0xd59ax26|| 200;return function(_0xd59ax27){if(_0xd59ax27){return _0xd59ax24[_0x7f4d[44]](_0xd59ax26)[_0x7f4d[45]](_0xd59ax27)}}}function respondWithFilteredResult(_0xd59ax24,_0xd59ax2a){return function(_0xd59ax27){if(_0xd59ax27){var _0xd59ax2b=_0xd59ax27[_0x7f4d[46]],_0xd59ax2c=_0xd59ax2a[_0x7f4d[47]],_0xd59ax2d=_0xd59ax2a[_0x7f4d[47]]+ _0xd59ax2a[_0x7f4d[48]],_0xd59ax26;if(_0xd59ax2d>= _0xd59ax2b){_0xd59ax2d= _0xd59ax2b;_0xd59ax26= 200}else {_0xd59ax26= 206};_0xd59ax24[_0x7f4d[44]](_0xd59ax26);return _0xd59ax24[_0x7f4d[52]](_0x7f4d[49],_0xd59ax2c+ _0x7f4d[50]+ _0xd59ax2d+ _0x7f4d[51]+ _0xd59ax2b)[_0x7f4d[45]](_0xd59ax27)};return null}}function patchUpdates(_0xd59ax2f){return function(_0xd59ax27){try{jsonpatch[_0x7f4d[53]](_0xd59ax27,_0xd59ax2f,true)}catch(err){return BPromise[_0x7f4d[54]](err)};return _0xd59ax27[_0x7f4d[55]]()}}function saveUpdates(_0xd59ax31,_0xd59ax26){return function(_0xd59ax27){if(_0xd59ax27){return _0xd59ax27[_0x7f4d[56]](_0xd59ax31)[_0x7f4d[40]](function(_0xd59ax32){return _0xd59ax32})};return null}}function removeEntity(_0xd59ax24,_0xd59ax26){return function(_0xd59ax27){if(_0xd59ax27){return _0xd59ax27[_0x7f4d[57]]()[_0x7f4d[40]](function(){_0xd59ax24[_0x7f4d[44]](204)[_0x7f4d[43]]()})}}}function handleEntityNotFound(_0xd59ax24,_0xd59ax26){return function(_0xd59ax27){if(!_0xd59ax27){_0xd59ax24[_0x7f4d[42]](404)};return _0xd59ax27}}function handleError(_0xd59ax24,_0xd59ax26){_0xd59ax26= _0xd59ax26|| 500;return function(_0xd59ax23){logger[_0x7f4d[30]](_0xd59ax23[_0x7f4d[58]]);if(_0xd59ax23[_0x7f4d[59]]){delete _0xd59ax23[_0x7f4d[59]]};_0xd59ax24[_0x7f4d[44]](_0xd59ax26)[_0x7f4d[60]](_0xd59ax23)}}exports[_0x7f4d[61]]= function(_0xd59ax1e,_0xd59ax24){var _0xd59ax2a={},_0xd59ax36={},_0xd59ax37={count:0,rows:[]};_0xd59ax36[_0x7f4d[62]]= _[_0x7f4d[65]](db[_0x7f4d[64]][_0x7f4d[63]]);var _0xd59ax38={dateStart:_0xd59ax1e[_0x7f4d[67]][_0x7f4d[66]],dateEnd:_0xd59ax1e[_0x7f4d[67]][_0x7f4d[68]]};delete _0xd59ax1e[_0x7f4d[67]][_0x7f4d[66]];delete _0xd59ax1e[_0x7f4d[67]][_0x7f4d[68]];_0xd59ax36[_0x7f4d[67]]= _[_0x7f4d[65]](_0xd59ax1e[_0x7f4d[67]]);_0xd59ax36[_0x7f4d[69]]= _[_0x7f4d[70]](_0xd59ax36[_0x7f4d[62]],_0xd59ax36[_0x7f4d[67]]);_0xd59ax2a[_0x7f4d[71]]= _[_0x7f4d[70]](_0xd59ax36[_0x7f4d[62]],qs[_0x7f4d[72]](_0xd59ax1e[_0x7f4d[67]][_0x7f4d[72]]));_0xd59ax2a[_0x7f4d[71]]= (_0xd59ax2a[_0x7f4d[71]][_0x7f4d[73]])?_0xd59ax2a[_0x7f4d[71]]:_0xd59ax36[_0x7f4d[62]];if(!_0xd59ax1e[_0x7f4d[67]][_0x7f4d[75]](_0x7f4d[74])){_0xd59ax2a[_0x7f4d[48]]= qs[_0x7f4d[48]](_0xd59ax1e[_0x7f4d[67]][_0x7f4d[48]]);_0xd59ax2a[_0x7f4d[47]]= qs[_0x7f4d[47]](_0xd59ax1e[_0x7f4d[67]][_0x7f4d[47]])};_0xd59ax2a[_0x7f4d[76]]= qs[_0x7f4d[77]](_0xd59ax1e[_0x7f4d[67]][_0x7f4d[77]]);_0xd59ax2a[_0x7f4d[78]]= qs[_0x7f4d[69]](_[_0x7f4d[79]](_0xd59ax1e[_0x7f4d[67]],_0xd59ax36[_0x7f4d[69]]));if(_0xd59ax38[_0x7f4d[66]]){if(_0xd59ax38[_0x7f4d[68]]){_0xd59ax38[_0x7f4d[68]]= moment(_0xd59ax38[_0x7f4d[68]])[_0x7f4d[81]](1,_0x7f4d[80])}else {_0xd59ax38[_0x7f4d[68]]= moment(_0xd59ax38[_0x7f4d[66]])[_0x7f4d[81]](1,_0x7f4d[80])};_[_0x7f4d[82]](_0xd59ax2a[_0x7f4d[78]],{createdAt:{$gte:_0xd59ax38[_0x7f4d[66]],$lte:_0xd59ax38[_0x7f4d[68]]}})};if(_0xd59ax1e[_0x7f4d[67]][_0x7f4d[83]]){_0xd59ax2a[_0x7f4d[78]]= _[_0x7f4d[82]](_0xd59ax2a[_0x7f4d[78]],{$or:_[_0x7f4d[85]](_0xd59ax2a[_0x7f4d[71]],function(_0xd59ax39){var _0xd59ax37={};_0xd59ax37[_0xd59ax39]= {$like:_0x7f4d[84]+ _0xd59ax1e[_0x7f4d[67]][_0x7f4d[83]]+ _0x7f4d[84]};return _0xd59ax37})})};_0xd59ax2a= _[_0x7f4d[82]]({},_0xd59ax2a,_0xd59ax1e[_0x7f4d[86]]);var _0xd59ax3a={where:_0xd59ax2a[_0x7f4d[78]]};return db[_0x7f4d[64]][_0x7f4d[46]](_0xd59ax3a)[_0x7f4d[40]](function(_0xd59ax2b){_0xd59ax37[_0x7f4d[46]]= _0xd59ax2b;if(_0xd59ax1e[_0x7f4d[67]][_0x7f4d[88]]){_0xd59ax2a[_0x7f4d[89]]= [{all:true}]};return db[_0x7f4d[64]][_0x7f4d[90]](_0xd59ax2a)})[_0x7f4d[40]](function(_0xd59ax3b){_0xd59ax37[_0x7f4d[87]]= _0xd59ax3b;return _0xd59ax37})[_0x7f4d[40]](respondWithFilteredResult(_0xd59ax24,_0xd59ax2a))[_0x7f4d[31]](handleError(_0xd59ax24,null))};exports[_0x7f4d[91]]= function(_0xd59ax1e,_0xd59ax24){var _0xd59ax2a={raw:false,where:{id:_0xd59ax1e[_0x7f4d[93]][_0x7f4d[92]]}},_0xd59ax36={};_0xd59ax36[_0x7f4d[62]]= _[_0x7f4d[65]](db[_0x7f4d[64]][_0x7f4d[63]]);_0xd59ax36[_0x7f4d[67]]= _[_0x7f4d[65]](_0xd59ax1e[_0x7f4d[67]]);_0xd59ax36[_0x7f4d[69]]= _[_0x7f4d[70]](_0xd59ax36[_0x7f4d[62]],_0xd59ax36[_0x7f4d[67]]);_0xd59ax2a[_0x7f4d[71]]= _[_0x7f4d[70]](_0xd59ax36[_0x7f4d[62]],qs[_0x7f4d[72]](_0xd59ax1e[_0x7f4d[67]][_0x7f4d[72]]));_0xd59ax2a[_0x7f4d[71]]= (_0xd59ax2a[_0x7f4d[71]][_0x7f4d[73]])?_0xd59ax2a[_0x7f4d[71]]:_0xd59ax36[_0x7f4d[62]];if(_0xd59ax1e[_0x7f4d[67]][_0x7f4d[88]]){_0xd59ax2a[_0x7f4d[89]]= [{all:true}]};_0xd59ax2a= _[_0x7f4d[82]]({},_0xd59ax2a,_0xd59ax1e[_0x7f4d[86]]);return db[_0x7f4d[64]][_0x7f4d[94]](_0xd59ax2a)[_0x7f4d[40]](handleEntityNotFound(_0xd59ax24,null))[_0x7f4d[40]](respondWithResult(_0xd59ax24,null))[_0x7f4d[31]](handleError(_0xd59ax24,null))};exports[_0x7f4d[95]]= function(_0xd59ax1e,_0xd59ax24){return db[_0x7f4d[64]][_0x7f4d[95]](_0xd59ax1e[_0x7f4d[96]],{})[_0x7f4d[40]](respondWithResult(_0xd59ax24,201))[_0x7f4d[31]](handleError(_0xd59ax24,null))};exports[_0x7f4d[56]]= function(_0xd59ax1e,_0xd59ax24){if(_0xd59ax1e[_0x7f4d[96]][_0x7f4d[92]]){delete _0xd59ax1e[_0x7f4d[96]][_0x7f4d[92]]};return db[_0x7f4d[64]][_0x7f4d[94]]({where:{id:_0xd59ax1e[_0x7f4d[93]][_0x7f4d[92]]}})[_0x7f4d[40]](handleEntityNotFound(_0xd59ax24,null))[_0x7f4d[40]](saveUpdates(_0xd59ax1e[_0x7f4d[96]],null))[_0x7f4d[40]](respondWithResult(_0xd59ax24,null))[_0x7f4d[31]](handleError(_0xd59ax24,null))};exports[_0x7f4d[57]]= function(_0xd59ax1e,_0xd59ax24){return db[_0x7f4d[64]][_0x7f4d[94]]({where:{id:_0xd59ax1e[_0x7f4d[93]][_0x7f4d[92]]}})[_0x7f4d[40]](handleEntityNotFound(_0xd59ax24,null))[_0x7f4d[40]](removeEntity(_0xd59ax24,null))[_0x7f4d[31]](handleError(_0xd59ax24,null))};exports[_0x7f4d[97]]= function(_0xd59ax1e,_0xd59ax27,_0xd59ax3c){var _0xd59ax2a={};var _0xd59ax36={};var _0xd59ax3d;var _0xd59ax2b;return db[_0x7f4d[64]][_0x7f4d[99]]({where:{id:_0xd59ax1e[_0x7f4d[93]][_0x7f4d[92]]}})[_0x7f4d[40]](handleEntityNotFound(_0xd59ax27,null))[_0x7f4d[40]](function(_0xd59ax27){if(_0xd59ax27){_0xd59ax3d= _0xd59ax27;_0xd59ax36[_0x7f4d[62]]= _[_0x7f4d[65]](db[_0x7f4d[98]][_0x7f4d[63]]);_0xd59ax36[_0x7f4d[67]]= _[_0x7f4d[65]](_0xd59ax1e[_0x7f4d[67]]);_0xd59ax36[_0x7f4d[69]]= _[_0x7f4d[70]](_0xd59ax36[_0x7f4d[62]],_0xd59ax36[_0x7f4d[67]]);_0xd59ax2a[_0x7f4d[71]]= _[_0x7f4d[70]](_0xd59ax36[_0x7f4d[62]],qs[_0x7f4d[72]](_0xd59ax1e[_0x7f4d[67]][_0x7f4d[72]]));_0xd59ax2a[_0x7f4d[71]]= (_0xd59ax2a[_0x7f4d[71]][_0x7f4d[73]])?_0xd59ax2a[_0x7f4d[71]]:_0xd59ax36[_0x7f4d[62]];_0xd59ax2a[_0x7f4d[76]]= qs[_0x7f4d[77]](_0xd59ax1e[_0x7f4d[67]][_0x7f4d[77]]);_0xd59ax2a[_0x7f4d[78]]= qs[_0x7f4d[69]](_[_0x7f4d[79]](_0xd59ax1e[_0x7f4d[67]],_0xd59ax36[_0x7f4d[69]]));if(_0xd59ax1e[_0x7f4d[67]][_0x7f4d[83]]){_0xd59ax2a[_0x7f4d[78]]= _[_0x7f4d[82]](_0xd59ax2a[_0x7f4d[78]],{$or:_[_0x7f4d[85]](_0xd59ax2a[_0x7f4d[71]],function(_0xd59ax39){var _0xd59ax37={};_0xd59ax37[_0xd59ax39]= {$like:_0x7f4d[84]+ _0xd59ax1e[_0x7f4d[67]][_0x7f4d[83]]+ _0x7f4d[84]};return _0xd59ax37})})};_0xd59ax2a= _[_0x7f4d[82]]({},_0xd59ax2a,_0xd59ax1e[_0x7f4d[86]]);return _0xd59ax3d[_0x7f4d[97]](_0xd59ax2a)}})[_0x7f4d[40]](function(_0xd59ax3e){if(_0xd59ax3e){_0xd59ax2b= _0xd59ax3e[_0x7f4d[73]];if(!_0xd59ax1e[_0x7f4d[67]][_0x7f4d[75]](_0x7f4d[74])){_0xd59ax2a[_0x7f4d[48]]= qs[_0x7f4d[48]](_0xd59ax1e[_0x7f4d[67]][_0x7f4d[48]]);_0xd59ax2a[_0x7f4d[47]]= qs[_0x7f4d[47]](_0xd59ax1e[_0x7f4d[67]][_0x7f4d[47]])};return _0xd59ax3d[_0x7f4d[97]](_0xd59ax2a)}})[_0x7f4d[40]](function(_0xd59ax3b){if(_0xd59ax3b){return _0xd59ax3b?{count:_0xd59ax2b,rows:_0xd59ax3b}:null}})[_0x7f4d[40]](respondWithResult(_0xd59ax27,null))[_0x7f4d[31]](handleError(_0xd59ax27,null))};exports[_0x7f4d[100]]= function(_0xd59ax1e,_0xd59ax27,_0xd59ax3c){var _0xd59ax2a={};var _0xd59ax36={};var _0xd59ax3d;var _0xd59ax2b;return db[_0x7f4d[64]][_0x7f4d[99]]({where:{id:_0xd59ax1e[_0x7f4d[93]][_0x7f4d[92]]}})[_0x7f4d[40]](handleEntityNotFound(_0xd59ax27,null))[_0x7f4d[40]](function(_0xd59ax27){if(_0xd59ax27){_0xd59ax3d= _0xd59ax27;_0xd59ax36[_0x7f4d[62]]= _[_0x7f4d[65]](db[_0x7f4d[98]][_0x7f4d[63]]);_0xd59ax36[_0x7f4d[67]]= _[_0x7f4d[65]](_0xd59ax1e[_0x7f4d[67]]);_0xd59ax36[_0x7f4d[69]]= _[_0x7f4d[70]](_0xd59ax36[_0x7f4d[62]],_0xd59ax36[_0x7f4d[67]]);_0xd59ax2a[_0x7f4d[71]]= _[_0x7f4d[70]](_0xd59ax36[_0x7f4d[62]],qs[_0x7f4d[72]](_0xd59ax1e[_0x7f4d[67]][_0x7f4d[72]]));_0xd59ax2a[_0x7f4d[71]]= (_0xd59ax2a[_0x7f4d[71]][_0x7f4d[73]])?_0xd59ax2a[_0x7f4d[71]]:_0xd59ax36[_0x7f4d[62]];_0xd59ax2a[_0x7f4d[76]]= qs[_0x7f4d[77]](_0xd59ax1e[_0x7f4d[67]][_0x7f4d[77]]);_0xd59ax2a[_0x7f4d[78]]= qs[_0x7f4d[69]](_[_0x7f4d[79]](_0xd59ax1e[_0x7f4d[67]],_0xd59ax36[_0x7f4d[69]]));if(_0xd59ax1e[_0x7f4d[67]][_0x7f4d[83]]){_0xd59ax2a[_0x7f4d[78]]= _[_0x7f4d[82]](_0xd59ax2a[_0x7f4d[78]],{$or:_[_0x7f4d[85]](_0xd59ax2a[_0x7f4d[71]],function(_0xd59ax39){var _0xd59ax37={};_0xd59ax37[_0xd59ax39]= {$like:_0x7f4d[84]+ _0xd59ax1e[_0x7f4d[67]][_0x7f4d[83]]+ _0x7f4d[84]};return _0xd59ax37})})};_0xd59ax2a= _[_0x7f4d[82]]({},_0xd59ax2a,_0xd59ax1e[_0x7f4d[86]]);return _0xd59ax3d[_0x7f4d[100]](_0xd59ax2a)}})[_0x7f4d[40]](function(_0xd59ax3e){if(_0xd59ax3e){_0xd59ax2b= _0xd59ax3e[_0x7f4d[73]];if(!_0xd59ax1e[_0x7f4d[67]][_0x7f4d[75]](_0x7f4d[74])){_0xd59ax2a[_0x7f4d[48]]= qs[_0x7f4d[48]](_0xd59ax1e[_0x7f4d[67]][_0x7f4d[48]]);_0xd59ax2a[_0x7f4d[47]]= qs[_0x7f4d[47]](_0xd59ax1e[_0x7f4d[67]][_0x7f4d[47]])};return _0xd59ax3d[_0x7f4d[100]](_0xd59ax2a)}})[_0x7f4d[40]](function(_0xd59ax3b){if(_0xd59ax3b){return _0xd59ax3b?{count:_0xd59ax2b,rows:_0xd59ax3b}:null}})[_0x7f4d[40]](respondWithResult(_0xd59ax27,null))[_0x7f4d[31]](handleError(_0xd59ax27,null))};exports[_0x7f4d[101]]= function(_0xd59ax1e,_0xd59ax27,_0xd59ax3c){var _0xd59ax2a={};var _0xd59ax36={};var _0xd59ax3d;var _0xd59ax2b;return db[_0x7f4d[64]][_0x7f4d[99]]({where:{id:_0xd59ax1e[_0x7f4d[93]][_0x7f4d[92]]}})[_0x7f4d[40]](handleEntityNotFound(_0xd59ax27,null))[_0x7f4d[40]](function(_0xd59ax27){if(_0xd59ax27){_0xd59ax3d= _0xd59ax27;_0xd59ax36[_0x7f4d[62]]= _[_0x7f4d[65]](db[_0x7f4d[98]][_0x7f4d[63]]);_0xd59ax36[_0x7f4d[67]]= _[_0x7f4d[65]](_0xd59ax1e[_0x7f4d[67]]);_0xd59ax36[_0x7f4d[69]]= _[_0x7f4d[70]](_0xd59ax36[_0x7f4d[62]],_0xd59ax36[_0x7f4d[67]]);_0xd59ax2a[_0x7f4d[71]]= _[_0x7f4d[70]](_0xd59ax36[_0x7f4d[62]],qs[_0x7f4d[72]](_0xd59ax1e[_0x7f4d[67]][_0x7f4d[72]]));_0xd59ax2a[_0x7f4d[71]]= (_0xd59ax2a[_0x7f4d[71]][_0x7f4d[73]])?_0xd59ax2a[_0x7f4d[71]]:_0xd59ax36[_0x7f4d[62]];_0xd59ax2a[_0x7f4d[76]]= qs[_0x7f4d[77]](_0xd59ax1e[_0x7f4d[67]][_0x7f4d[77]]);_0xd59ax2a[_0x7f4d[78]]= qs[_0x7f4d[69]](_[_0x7f4d[79]](_0xd59ax1e[_0x7f4d[67]],_0xd59ax36[_0x7f4d[69]]));if(_0xd59ax1e[_0x7f4d[67]][_0x7f4d[83]]){_0xd59ax2a[_0x7f4d[78]]= _[_0x7f4d[82]](_0xd59ax2a[_0x7f4d[78]],{$or:_[_0x7f4d[85]](_0xd59ax2a[_0x7f4d[71]],function(_0xd59ax39){var _0xd59ax37={};_0xd59ax37[_0xd59ax39]= {$like:_0x7f4d[84]+ _0xd59ax1e[_0x7f4d[67]][_0x7f4d[83]]+ _0x7f4d[84]};return _0xd59ax37})})};_0xd59ax2a= _[_0x7f4d[82]]({},_0xd59ax2a,_0xd59ax1e[_0x7f4d[86]]);return _0xd59ax3d[_0x7f4d[101]](_0xd59ax2a)}})[_0x7f4d[40]](function(_0xd59ax3e){if(_0xd59ax3e){_0xd59ax2b= _0xd59ax3e[_0x7f4d[73]];if(!_0xd59ax1e[_0x7f4d[67]][_0x7f4d[75]](_0x7f4d[74])){_0xd59ax2a[_0x7f4d[48]]= qs[_0x7f4d[48]](_0xd59ax1e[_0x7f4d[67]][_0x7f4d[48]]);_0xd59ax2a[_0x7f4d[47]]= qs[_0x7f4d[47]](_0xd59ax1e[_0x7f4d[67]][_0x7f4d[47]])};return _0xd59ax3d[_0x7f4d[101]](_0xd59ax2a)}})[_0x7f4d[40]](function(_0xd59ax3b){if(_0xd59ax3b){return _0xd59ax3b?{count:_0xd59ax2b,rows:_0xd59ax3b}:null}})[_0x7f4d[40]](respondWithResult(_0xd59ax27,null))[_0x7f4d[31]](handleError(_0xd59ax27,null))}
\ No newline at end of file
+var _0x40af=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73"];_0x40af[0];var jsonpatch=require(_0x40af[1]);var rp=require(_0x40af[2]);var moment=require(_0x40af[3]);var BPromise=require(_0x40af[4]);var Mustache=require(_0x40af[5]);var util=require(_0x40af[6]);var path=require(_0x40af[7]);var sox=require(_0x40af[8]);var csv=require(_0x40af[9]);var ejs=require(_0x40af[10]);var fs=require(_0x40af[11]);var _=require(_0x40af[12]);var squel=require(_0x40af[13]);var crypto=require(_0x40af[14]);var jsforce=require(_0x40af[15]);var deskjs=require(_0x40af[16]);var toCsv=require(_0x40af[9]);var querystring=require(_0x40af[17]);var Papa=require(_0x40af[18]);var qs=require(_0x40af[19]);var logger=require(_0x40af[21])(_0x40af[20]);var utils=require(_0x40af[22]);var config=require(_0x40af[23]);var db=require(_0x40af[25])[_0x40af[24]];var jayson=require(_0x40af[26]);var client=jayson[_0x40af[28]][_0x40af[27]]({port:9002});function respondWithRpcPromise(_0x1acfx1c,_0x1acfx1d,_0x1acfx1e,_0x1acfx1f){return  new BPromise(function(_0x1acfx20,_0x1acfx21){var _0x1acfx22=(_0x1acfx1f|| client);return _0x1acfx22[_0x40af[41]](_0x1acfx1c,_0x1acfx1e)[_0x40af[40]](function(_0x1acfx24){logger[_0x40af[33]](_0x40af[29],_0x1acfx1d,_0x40af[32]);logger[_0x40af[36]](_0x40af[34],_0x1acfx1d,_0x40af[32],JSON[_0x40af[35]](_0x1acfx24));if(_0x1acfx24[_0x40af[30]]){if(_0x1acfx24[_0x40af[30]][_0x40af[37]]=== 500){logger[_0x40af[30]](_0x40af[29],_0x1acfx1d,_0x1acfx24[_0x40af[30]][_0x40af[38]]);return _0x1acfx21(_0x1acfx24[_0x40af[30]][_0x40af[38]])};logger[_0x40af[30]](_0x40af[29],_0x1acfx1d,_0x1acfx24[_0x40af[30]][_0x40af[38]]);return _0x1acfx20(_0x1acfx24[_0x40af[30]][_0x40af[38]])}else {logger[_0x40af[33]](_0x40af[29],_0x1acfx1d,_0x40af[32]);_0x1acfx20(_0x1acfx24[_0x40af[39]][_0x40af[38]])}})[_0x40af[31]](function(_0x1acfx23){logger[_0x40af[30]](_0x40af[29],_0x1acfx1d,_0x1acfx23);_0x1acfx21(_0x1acfx23)})})}function respondWithStatusCode(_0x1acfx24,_0x1acfx26){_0x1acfx26= _0x1acfx26|| 204;return function(_0x1acfx27){if(_0x1acfx27){return _0x1acfx24[_0x40af[42]](_0x1acfx26)};return _0x1acfx24[_0x40af[44]](_0x1acfx26)[_0x40af[43]]()}}function respondWithResult(_0x1acfx24,_0x1acfx26){_0x1acfx26= _0x1acfx26|| 200;return function(_0x1acfx27){if(_0x1acfx27){return _0x1acfx24[_0x40af[44]](_0x1acfx26)[_0x40af[45]](_0x1acfx27)}}}function respondWithFilteredResult(_0x1acfx24,_0x1acfx2a){return function(_0x1acfx27){if(_0x1acfx27){var _0x1acfx2b=_0x1acfx27[_0x40af[46]],_0x1acfx2c=_0x1acfx2a[_0x40af[47]],_0x1acfx2d=_0x1acfx2a[_0x40af[47]]+ _0x1acfx2a[_0x40af[48]],_0x1acfx26;if(_0x1acfx2d>= _0x1acfx2b){_0x1acfx2d= _0x1acfx2b;_0x1acfx26= 200}else {_0x1acfx26= 206};_0x1acfx24[_0x40af[44]](_0x1acfx26);return _0x1acfx24[_0x40af[52]](_0x40af[49],_0x1acfx2c+ _0x40af[50]+ _0x1acfx2d+ _0x40af[51]+ _0x1acfx2b)[_0x40af[45]](_0x1acfx27)};return null}}function patchUpdates(_0x1acfx2f){return function(_0x1acfx27){try{jsonpatch[_0x40af[53]](_0x1acfx27,_0x1acfx2f,true)}catch(err){return BPromise[_0x40af[54]](err)};return _0x1acfx27[_0x40af[55]]()}}function saveUpdates(_0x1acfx31,_0x1acfx26){return function(_0x1acfx27){if(_0x1acfx27){return _0x1acfx27[_0x40af[56]](_0x1acfx31)[_0x40af[40]](function(_0x1acfx32){return _0x1acfx32})};return null}}function removeEntity(_0x1acfx24,_0x1acfx26){return function(_0x1acfx27){if(_0x1acfx27){return _0x1acfx27[_0x40af[57]]()[_0x40af[40]](function(){_0x1acfx24[_0x40af[44]](204)[_0x40af[43]]()})}}}function handleEntityNotFound(_0x1acfx24,_0x1acfx26){return function(_0x1acfx27){if(!_0x1acfx27){_0x1acfx24[_0x40af[42]](404)};return _0x1acfx27}}function handleError(_0x1acfx24,_0x1acfx26){_0x1acfx26= _0x1acfx26|| 500;return function(_0x1acfx23){logger[_0x40af[30]](_0x1acfx23[_0x40af[58]]);if(_0x1acfx23[_0x40af[59]]){delete _0x1acfx23[_0x40af[59]]};_0x1acfx24[_0x40af[44]](_0x1acfx26)[_0x40af[60]](_0x1acfx23)}}exports[_0x40af[61]]= function(_0x1acfx1e,_0x1acfx24){var _0x1acfx2a={},_0x1acfx36={},_0x1acfx37={count:0,rows:[]};_0x1acfx36[_0x40af[62]]= _[_0x40af[65]](db[_0x40af[64]][_0x40af[63]]);var _0x1acfx38={dateStart:_0x1acfx1e[_0x40af[67]][_0x40af[66]],dateEnd:_0x1acfx1e[_0x40af[67]][_0x40af[68]]};delete _0x1acfx1e[_0x40af[67]][_0x40af[66]];delete _0x1acfx1e[_0x40af[67]][_0x40af[68]];_0x1acfx36[_0x40af[67]]= _[_0x40af[65]](_0x1acfx1e[_0x40af[67]]);_0x1acfx36[_0x40af[69]]= _[_0x40af[70]](_0x1acfx36[_0x40af[62]],_0x1acfx36[_0x40af[67]]);_0x1acfx2a[_0x40af[71]]= _[_0x40af[70]](_0x1acfx36[_0x40af[62]],qs[_0x40af[72]](_0x1acfx1e[_0x40af[67]][_0x40af[72]]));_0x1acfx2a[_0x40af[71]]= (_0x1acfx2a[_0x40af[71]][_0x40af[73]])?_0x1acfx2a[_0x40af[71]]:_0x1acfx36[_0x40af[62]];if(!_0x1acfx1e[_0x40af[67]][_0x40af[75]](_0x40af[74])){_0x1acfx2a[_0x40af[48]]= qs[_0x40af[48]](_0x1acfx1e[_0x40af[67]][_0x40af[48]]);_0x1acfx2a[_0x40af[47]]= qs[_0x40af[47]](_0x1acfx1e[_0x40af[67]][_0x40af[47]])};_0x1acfx2a[_0x40af[76]]= qs[_0x40af[77]](_0x1acfx1e[_0x40af[67]][_0x40af[77]]);_0x1acfx2a[_0x40af[78]]= qs[_0x40af[69]](_[_0x40af[79]](_0x1acfx1e[_0x40af[67]],_0x1acfx36[_0x40af[69]]));if(_0x1acfx38[_0x40af[66]]){if(_0x1acfx38[_0x40af[68]]){_0x1acfx38[_0x40af[68]]= moment(_0x1acfx38[_0x40af[68]])[_0x40af[81]](1,_0x40af[80])}else {_0x1acfx38[_0x40af[68]]= moment(_0x1acfx38[_0x40af[66]])[_0x40af[81]](1,_0x40af[80])};_[_0x40af[82]](_0x1acfx2a[_0x40af[78]],{createdAt:{$gte:_0x1acfx38[_0x40af[66]],$lte:_0x1acfx38[_0x40af[68]]}})};if(_0x1acfx1e[_0x40af[67]][_0x40af[83]]){_0x1acfx2a[_0x40af[78]]= _[_0x40af[82]](_0x1acfx2a[_0x40af[78]],{$or:_[_0x40af[85]](_0x1acfx2a[_0x40af[71]],function(_0x1acfx39){var _0x1acfx37={};_0x1acfx37[_0x1acfx39]= {$like:_0x40af[84]+ _0x1acfx1e[_0x40af[67]][_0x40af[83]]+ _0x40af[84]};return _0x1acfx37})})};_0x1acfx2a= _[_0x40af[82]]({},_0x1acfx2a,_0x1acfx1e[_0x40af[86]]);var _0x1acfx3a={where:_0x1acfx2a[_0x40af[78]]};return db[_0x40af[64]][_0x40af[46]](_0x1acfx3a)[_0x40af[40]](function(_0x1acfx2b){_0x1acfx37[_0x40af[46]]= _0x1acfx2b;if(_0x1acfx1e[_0x40af[67]][_0x40af[88]]){_0x1acfx2a[_0x40af[89]]= [{all:true}]};return db[_0x40af[64]][_0x40af[90]](_0x1acfx2a)})[_0x40af[40]](function(_0x1acfx3b){_0x1acfx37[_0x40af[87]]= _0x1acfx3b;return _0x1acfx37})[_0x40af[40]](respondWithFilteredResult(_0x1acfx24,_0x1acfx2a))[_0x40af[31]](handleError(_0x1acfx24,null))};exports[_0x40af[91]]= function(_0x1acfx1e,_0x1acfx24){var _0x1acfx2a={raw:false,where:{id:_0x1acfx1e[_0x40af[93]][_0x40af[92]]}},_0x1acfx36={};_0x1acfx36[_0x40af[62]]= _[_0x40af[65]](db[_0x40af[64]][_0x40af[63]]);_0x1acfx36[_0x40af[67]]= _[_0x40af[65]](_0x1acfx1e[_0x40af[67]]);_0x1acfx36[_0x40af[69]]= _[_0x40af[70]](_0x1acfx36[_0x40af[62]],_0x1acfx36[_0x40af[67]]);_0x1acfx2a[_0x40af[71]]= _[_0x40af[70]](_0x1acfx36[_0x40af[62]],qs[_0x40af[72]](_0x1acfx1e[_0x40af[67]][_0x40af[72]]));_0x1acfx2a[_0x40af[71]]= (_0x1acfx2a[_0x40af[71]][_0x40af[73]])?_0x1acfx2a[_0x40af[71]]:_0x1acfx36[_0x40af[62]];if(_0x1acfx1e[_0x40af[67]][_0x40af[88]]){_0x1acfx2a[_0x40af[89]]= [{all:true}]};_0x1acfx2a= _[_0x40af[82]]({},_0x1acfx2a,_0x1acfx1e[_0x40af[86]]);return db[_0x40af[64]][_0x40af[94]](_0x1acfx2a)[_0x40af[40]](handleEntityNotFound(_0x1acfx24,null))[_0x40af[40]](respondWithResult(_0x1acfx24,null))[_0x40af[31]](handleError(_0x1acfx24,null))};exports[_0x40af[95]]= function(_0x1acfx1e,_0x1acfx24){return db[_0x40af[64]][_0x40af[95]](_0x1acfx1e[_0x40af[96]],{})[_0x40af[40]](respondWithResult(_0x1acfx24,201))[_0x40af[31]](handleError(_0x1acfx24,null))};exports[_0x40af[56]]= function(_0x1acfx1e,_0x1acfx24){if(_0x1acfx1e[_0x40af[96]][_0x40af[92]]){delete _0x1acfx1e[_0x40af[96]][_0x40af[92]]};return db[_0x40af[64]][_0x40af[94]]({where:{id:_0x1acfx1e[_0x40af[93]][_0x40af[92]]}})[_0x40af[40]](handleEntityNotFound(_0x1acfx24,null))[_0x40af[40]](saveUpdates(_0x1acfx1e[_0x40af[96]],null))[_0x40af[40]](respondWithResult(_0x1acfx24,null))[_0x40af[31]](handleError(_0x1acfx24,null))};exports[_0x40af[57]]= function(_0x1acfx1e,_0x1acfx24){return db[_0x40af[64]][_0x40af[94]]({where:{id:_0x1acfx1e[_0x40af[93]][_0x40af[92]]}})[_0x40af[40]](handleEntityNotFound(_0x1acfx24,null))[_0x40af[40]](removeEntity(_0x1acfx24,null))[_0x40af[31]](handleError(_0x1acfx24,null))};exports[_0x40af[97]]= function(_0x1acfx1e,_0x1acfx27,_0x1acfx3c){var _0x1acfx2a={};var _0x1acfx36={};var _0x1acfx3d;var _0x1acfx2b;return db[_0x40af[64]][_0x40af[99]]({where:{id:_0x1acfx1e[_0x40af[93]][_0x40af[92]]}})[_0x40af[40]](handleEntityNotFound(_0x1acfx27,null))[_0x40af[40]](function(_0x1acfx27){if(_0x1acfx27){_0x1acfx3d= _0x1acfx27;_0x1acfx36[_0x40af[62]]= _[_0x40af[65]](db[_0x40af[98]][_0x40af[63]]);_0x1acfx36[_0x40af[67]]= _[_0x40af[65]](_0x1acfx1e[_0x40af[67]]);_0x1acfx36[_0x40af[69]]= _[_0x40af[70]](_0x1acfx36[_0x40af[62]],_0x1acfx36[_0x40af[67]]);_0x1acfx2a[_0x40af[71]]= _[_0x40af[70]](_0x1acfx36[_0x40af[62]],qs[_0x40af[72]](_0x1acfx1e[_0x40af[67]][_0x40af[72]]));_0x1acfx2a[_0x40af[71]]= (_0x1acfx2a[_0x40af[71]][_0x40af[73]])?_0x1acfx2a[_0x40af[71]]:_0x1acfx36[_0x40af[62]];_0x1acfx2a[_0x40af[76]]= qs[_0x40af[77]](_0x1acfx1e[_0x40af[67]][_0x40af[77]]);_0x1acfx2a[_0x40af[78]]= qs[_0x40af[69]](_[_0x40af[79]](_0x1acfx1e[_0x40af[67]],_0x1acfx36[_0x40af[69]]));if(_0x1acfx1e[_0x40af[67]][_0x40af[83]]){_0x1acfx2a[_0x40af[78]]= _[_0x40af[82]](_0x1acfx2a[_0x40af[78]],{$or:_[_0x40af[85]](_0x1acfx2a[_0x40af[71]],function(_0x1acfx39){var _0x1acfx37={};_0x1acfx37[_0x1acfx39]= {$like:_0x40af[84]+ _0x1acfx1e[_0x40af[67]][_0x40af[83]]+ _0x40af[84]};return _0x1acfx37})})};_0x1acfx2a= _[_0x40af[82]]({},_0x1acfx2a,_0x1acfx1e[_0x40af[86]]);return _0x1acfx3d[_0x40af[97]](_0x1acfx2a)}})[_0x40af[40]](function(_0x1acfx3e){if(_0x1acfx3e){_0x1acfx2b= _0x1acfx3e[_0x40af[73]];if(!_0x1acfx1e[_0x40af[67]][_0x40af[75]](_0x40af[74])){_0x1acfx2a[_0x40af[48]]= qs[_0x40af[48]](_0x1acfx1e[_0x40af[67]][_0x40af[48]]);_0x1acfx2a[_0x40af[47]]= qs[_0x40af[47]](_0x1acfx1e[_0x40af[67]][_0x40af[47]])};return _0x1acfx3d[_0x40af[97]](_0x1acfx2a)}})[_0x40af[40]](function(_0x1acfx3b){if(_0x1acfx3b){return _0x1acfx3b?{count:_0x1acfx2b,rows:_0x1acfx3b}:null}})[_0x40af[40]](respondWithResult(_0x1acfx27,null))[_0x40af[31]](handleError(_0x1acfx27,null))};exports[_0x40af[100]]= function(_0x1acfx1e,_0x1acfx27,_0x1acfx3c){var _0x1acfx2a={};var _0x1acfx36={};var _0x1acfx3d;var _0x1acfx2b;return db[_0x40af[64]][_0x40af[99]]({where:{id:_0x1acfx1e[_0x40af[93]][_0x40af[92]]}})[_0x40af[40]](handleEntityNotFound(_0x1acfx27,null))[_0x40af[40]](function(_0x1acfx27){if(_0x1acfx27){_0x1acfx3d= _0x1acfx27;_0x1acfx36[_0x40af[62]]= _[_0x40af[65]](db[_0x40af[98]][_0x40af[63]]);_0x1acfx36[_0x40af[67]]= _[_0x40af[65]](_0x1acfx1e[_0x40af[67]]);_0x1acfx36[_0x40af[69]]= _[_0x40af[70]](_0x1acfx36[_0x40af[62]],_0x1acfx36[_0x40af[67]]);_0x1acfx2a[_0x40af[71]]= _[_0x40af[70]](_0x1acfx36[_0x40af[62]],qs[_0x40af[72]](_0x1acfx1e[_0x40af[67]][_0x40af[72]]));_0x1acfx2a[_0x40af[71]]= (_0x1acfx2a[_0x40af[71]][_0x40af[73]])?_0x1acfx2a[_0x40af[71]]:_0x1acfx36[_0x40af[62]];_0x1acfx2a[_0x40af[76]]= qs[_0x40af[77]](_0x1acfx1e[_0x40af[67]][_0x40af[77]]);_0x1acfx2a[_0x40af[78]]= qs[_0x40af[69]](_[_0x40af[79]](_0x1acfx1e[_0x40af[67]],_0x1acfx36[_0x40af[69]]));if(_0x1acfx1e[_0x40af[67]][_0x40af[83]]){_0x1acfx2a[_0x40af[78]]= _[_0x40af[82]](_0x1acfx2a[_0x40af[78]],{$or:_[_0x40af[85]](_0x1acfx2a[_0x40af[71]],function(_0x1acfx39){var _0x1acfx37={};_0x1acfx37[_0x1acfx39]= {$like:_0x40af[84]+ _0x1acfx1e[_0x40af[67]][_0x40af[83]]+ _0x40af[84]};return _0x1acfx37})})};_0x1acfx2a= _[_0x40af[82]]({},_0x1acfx2a,_0x1acfx1e[_0x40af[86]]);return _0x1acfx3d[_0x40af[100]](_0x1acfx2a)}})[_0x40af[40]](function(_0x1acfx3e){if(_0x1acfx3e){_0x1acfx2b= _0x1acfx3e[_0x40af[73]];if(!_0x1acfx1e[_0x40af[67]][_0x40af[75]](_0x40af[74])){_0x1acfx2a[_0x40af[48]]= qs[_0x40af[48]](_0x1acfx1e[_0x40af[67]][_0x40af[48]]);_0x1acfx2a[_0x40af[47]]= qs[_0x40af[47]](_0x1acfx1e[_0x40af[67]][_0x40af[47]])};return _0x1acfx3d[_0x40af[100]](_0x1acfx2a)}})[_0x40af[40]](function(_0x1acfx3b){if(_0x1acfx3b){return _0x1acfx3b?{count:_0x1acfx2b,rows:_0x1acfx3b}:null}})[_0x40af[40]](respondWithResult(_0x1acfx27,null))[_0x40af[31]](handleError(_0x1acfx27,null))};exports[_0x40af[101]]= function(_0x1acfx1e,_0x1acfx27,_0x1acfx3c){var _0x1acfx2a={};var _0x1acfx36={};var _0x1acfx3d;var _0x1acfx2b;return db[_0x40af[64]][_0x40af[99]]({where:{id:_0x1acfx1e[_0x40af[93]][_0x40af[92]]}})[_0x40af[40]](handleEntityNotFound(_0x1acfx27,null))[_0x40af[40]](function(_0x1acfx27){if(_0x1acfx27){_0x1acfx3d= _0x1acfx27;_0x1acfx36[_0x40af[62]]= _[_0x40af[65]](db[_0x40af[98]][_0x40af[63]]);_0x1acfx36[_0x40af[67]]= _[_0x40af[65]](_0x1acfx1e[_0x40af[67]]);_0x1acfx36[_0x40af[69]]= _[_0x40af[70]](_0x1acfx36[_0x40af[62]],_0x1acfx36[_0x40af[67]]);_0x1acfx2a[_0x40af[71]]= _[_0x40af[70]](_0x1acfx36[_0x40af[62]],qs[_0x40af[72]](_0x1acfx1e[_0x40af[67]][_0x40af[72]]));_0x1acfx2a[_0x40af[71]]= (_0x1acfx2a[_0x40af[71]][_0x40af[73]])?_0x1acfx2a[_0x40af[71]]:_0x1acfx36[_0x40af[62]];_0x1acfx2a[_0x40af[76]]= qs[_0x40af[77]](_0x1acfx1e[_0x40af[67]][_0x40af[77]]);_0x1acfx2a[_0x40af[78]]= qs[_0x40af[69]](_[_0x40af[79]](_0x1acfx1e[_0x40af[67]],_0x1acfx36[_0x40af[69]]));if(_0x1acfx1e[_0x40af[67]][_0x40af[83]]){_0x1acfx2a[_0x40af[78]]= _[_0x40af[82]](_0x1acfx2a[_0x40af[78]],{$or:_[_0x40af[85]](_0x1acfx2a[_0x40af[71]],function(_0x1acfx39){var _0x1acfx37={};_0x1acfx37[_0x1acfx39]= {$like:_0x40af[84]+ _0x1acfx1e[_0x40af[67]][_0x40af[83]]+ _0x40af[84]};return _0x1acfx37})})};_0x1acfx2a= _[_0x40af[82]]({},_0x1acfx2a,_0x1acfx1e[_0x40af[86]]);return _0x1acfx3d[_0x40af[101]](_0x1acfx2a)}})[_0x40af[40]](function(_0x1acfx3e){if(_0x1acfx3e){_0x1acfx2b= _0x1acfx3e[_0x40af[73]];if(!_0x1acfx1e[_0x40af[67]][_0x40af[75]](_0x40af[74])){_0x1acfx2a[_0x40af[48]]= qs[_0x40af[48]](_0x1acfx1e[_0x40af[67]][_0x40af[48]]);_0x1acfx2a[_0x40af[47]]= qs[_0x40af[47]](_0x1acfx1e[_0x40af[67]][_0x40af[47]])};return _0x1acfx3d[_0x40af[101]](_0x1acfx2a)}})[_0x40af[40]](function(_0x1acfx3b){if(_0x1acfx3b){return _0x1acfx3b?{count:_0x1acfx2b,rows:_0x1acfx3b}:null}})[_0x40af[40]](respondWithResult(_0x1acfx27,null))[_0x40af[31]](handleError(_0x1acfx27,null))}
\ No newline at end of file
index 7e8683f..70d59ea 100644 (file)
@@ -1 +1 @@
-var _0xa816=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x69\x6E\x74\x5F\x7A\x6F\x68\x6F\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xa816[0];var _=require(_0xa816[1]);var util=require(_0xa816[2]);var logger=require(_0xa816[4])(_0xa816[3]);var moment=require(_0xa816[5]);var BPromise=require(_0xa816[6]);var rp=require(_0xa816[7]);var attributes=require(_0xa816[8]);module[_0xa816[9]]= function(_0xf9edx8,_0xf9edx9){return _0xf9edx8[_0xa816[12]](_0xa816[10],attributes,{tableName:_0xa816[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x3bbe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x69\x6E\x74\x5F\x7A\x6F\x68\x6F\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x3bbe[0];var _=require(_0x3bbe[1]);var util=require(_0x3bbe[2]);var logger=require(_0x3bbe[4])(_0x3bbe[3]);var moment=require(_0x3bbe[5]);var BPromise=require(_0x3bbe[6]);var rp=require(_0x3bbe[7]);var attributes=require(_0x3bbe[8]);module[_0x3bbe[9]]= function(_0x3eb1x8,_0x3eb1x9){return _0x3eb1x8[_0x3bbe[12]](_0x3bbe[10],attributes,{tableName:_0x3bbe[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index ee66e2b..1d28cc9 100644 (file)
@@ -1 +1 @@
-var _0xd4dc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xd4dc[0];var _=require(_0xd4dc[1]);var util=require(_0xd4dc[2]);var moment=require(_0xd4dc[3]);var BPromise=require(_0xd4dc[4]);var rs=require(_0xd4dc[5]);var fs=require(_0xd4dc[6]);var db=require(_0xd4dc[8])[_0xd4dc[7]];var utils=require(_0xd4dc[9]);var logger=require(_0xd4dc[11])(_0xd4dc[10]);var config=require(_0xd4dc[12]);var jayson=require(_0xd4dc[13]);var client=jayson[_0xd4dc[15]][_0xd4dc[14]]({port:9002});function respondWithRpcPromise(_0xc7e0xe,_0xc7e0xf,_0xc7e0x10){return  new BPromise(function(_0xc7e0x11,_0xc7e0x12){return client[_0xd4dc[28]](_0xc7e0xe,_0xc7e0x10)[_0xd4dc[27]](function(_0xc7e0x14){logger[_0xd4dc[20]](_0xd4dc[16],_0xc7e0xf,_0xd4dc[19]);logger[_0xd4dc[23]](_0xd4dc[21],_0xc7e0xf,_0xd4dc[19],JSON[_0xd4dc[22]](_0xc7e0x14));if(_0xc7e0x14[_0xd4dc[17]]){if(_0xc7e0x14[_0xd4dc[17]][_0xd4dc[24]]=== 500){logger[_0xd4dc[17]](_0xd4dc[16],_0xc7e0xf,_0xc7e0x14[_0xd4dc[17]][_0xd4dc[25]]);return _0xc7e0x12(_0xc7e0x14[_0xd4dc[17]][_0xd4dc[25]])};logger[_0xd4dc[17]](_0xd4dc[16],_0xc7e0xf,_0xc7e0x14[_0xd4dc[17]][_0xd4dc[25]]);return _0xc7e0x11(_0xc7e0x14[_0xd4dc[17]][_0xd4dc[25]])}else {logger[_0xd4dc[20]](_0xd4dc[16],_0xc7e0xf,_0xd4dc[19]);_0xc7e0x11(_0xc7e0x14[_0xd4dc[26]][_0xd4dc[25]])}})[_0xd4dc[18]](function(_0xc7e0x13){logger[_0xd4dc[17]](_0xd4dc[16],_0xc7e0xf,_0xc7e0x13);_0xc7e0x12(_0xc7e0x13)})})}
\ No newline at end of file
+var _0xe889=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xe889[0];var _=require(_0xe889[1]);var util=require(_0xe889[2]);var moment=require(_0xe889[3]);var BPromise=require(_0xe889[4]);var rs=require(_0xe889[5]);var fs=require(_0xe889[6]);var db=require(_0xe889[8])[_0xe889[7]];var utils=require(_0xe889[9]);var logger=require(_0xe889[11])(_0xe889[10]);var config=require(_0xe889[12]);var jayson=require(_0xe889[13]);var client=jayson[_0xe889[15]][_0xe889[14]]({port:9002});function respondWithRpcPromise(_0x46a7xe,_0x46a7xf,_0x46a7x10){return  new BPromise(function(_0x46a7x11,_0x46a7x12){return client[_0xe889[28]](_0x46a7xe,_0x46a7x10)[_0xe889[27]](function(_0x46a7x14){logger[_0xe889[20]](_0xe889[16],_0x46a7xf,_0xe889[19]);logger[_0xe889[23]](_0xe889[21],_0x46a7xf,_0xe889[19],JSON[_0xe889[22]](_0x46a7x14));if(_0x46a7x14[_0xe889[17]]){if(_0x46a7x14[_0xe889[17]][_0xe889[24]]=== 500){logger[_0xe889[17]](_0xe889[16],_0x46a7xf,_0x46a7x14[_0xe889[17]][_0xe889[25]]);return _0x46a7x12(_0x46a7x14[_0xe889[17]][_0xe889[25]])};logger[_0xe889[17]](_0xe889[16],_0x46a7xf,_0x46a7x14[_0xe889[17]][_0xe889[25]]);return _0x46a7x11(_0x46a7x14[_0xe889[17]][_0xe889[25]])}else {logger[_0xe889[20]](_0xe889[16],_0x46a7xf,_0xe889[19]);_0x46a7x11(_0x46a7x14[_0xe889[26]][_0xe889[25]])}})[_0xe889[18]](function(_0x46a7x13){logger[_0xe889[17]](_0xe889[16],_0x46a7xf,_0x46a7x13);_0x46a7x12(_0x46a7x13)})})}
\ No newline at end of file
index 34345da..ec003d9 100644 (file)
@@ -1 +1 @@
-var _0x923c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x923c[0];var multer=require(_0x923c[1]);var util=require(_0x923c[2]);var path=require(_0x923c[3]);var express=require(_0x923c[4]);var router=express.Router();var auth=require(_0x923c[5]);var interaction=require(_0x923c[6]);var config=require(_0x923c[7]);var controller=require(_0x923c[8]);router[_0x923c[12]](_0x923c[9],auth[_0x923c[10]](),controller[_0x923c[11]]);router[_0x923c[12]](_0x923c[13],auth[_0x923c[10]](),controller[_0x923c[14]]);router[_0x923c[16]](_0x923c[9],auth[_0x923c[10]](),controller[_0x923c[15]]);router[_0x923c[18]](_0x923c[13],auth[_0x923c[10]](),controller[_0x923c[17]]);router[_0x923c[20]](_0x923c[13],auth[_0x923c[10]](),controller[_0x923c[19]]);module[_0x923c[21]]= router
\ No newline at end of file
+var _0x707c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x707c[0];var multer=require(_0x707c[1]);var util=require(_0x707c[2]);var path=require(_0x707c[3]);var express=require(_0x707c[4]);var router=express.Router();var auth=require(_0x707c[5]);var interaction=require(_0x707c[6]);var config=require(_0x707c[7]);var controller=require(_0x707c[8]);router[_0x707c[12]](_0x707c[9],auth[_0x707c[10]](),controller[_0x707c[11]]);router[_0x707c[12]](_0x707c[13],auth[_0x707c[10]](),controller[_0x707c[14]]);router[_0x707c[16]](_0x707c[9],auth[_0x707c[10]](),controller[_0x707c[15]]);router[_0x707c[18]](_0x707c[13],auth[_0x707c[10]](),controller[_0x707c[17]]);router[_0x707c[20]](_0x707c[13],auth[_0x707c[10]](),controller[_0x707c[19]]);module[_0x707c[21]]= router
\ No newline at end of file
index f690fe7..427fde1 100644 (file)
@@ -1 +1 @@
-var _0x306b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x73\x74\x72\x69\x6E\x67","\x76\x61\x72\x69\x61\x62\x6C\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x306b[0];var Sequelize=require(_0x306b[1]);module[_0x306b[2]]= {type:{type:Sequelize.ENUM(_0x306b[3],_0x306b[4],_0x306b[5],_0x306b[6]),defaultValue:_0x306b[3]},content:{type:Sequelize[_0x306b[7]]},key:{type:Sequelize[_0x306b[7]]},keyType:{type:Sequelize.ENUM(_0x306b[3],_0x306b[4],_0x306b[5])},keyContent:{type:Sequelize[_0x306b[7]]},idField:{type:Sequelize[_0x306b[7]]},nameField:{type:Sequelize[_0x306b[7]]},customField:{type:Sequelize[_0x306b[8]],defaultValue:true},variableName:{type:Sequelize[_0x306b[7]]}}
\ No newline at end of file
+var _0xc0fc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x73\x74\x72\x69\x6E\x67","\x76\x61\x72\x69\x61\x62\x6C\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0xc0fc[0];var Sequelize=require(_0xc0fc[1]);module[_0xc0fc[2]]= {type:{type:Sequelize.ENUM(_0xc0fc[3],_0xc0fc[4],_0xc0fc[5],_0xc0fc[6]),defaultValue:_0xc0fc[3]},content:{type:Sequelize[_0xc0fc[7]]},key:{type:Sequelize[_0xc0fc[7]]},keyType:{type:Sequelize.ENUM(_0xc0fc[3],_0xc0fc[4],_0xc0fc[5])},keyContent:{type:Sequelize[_0xc0fc[7]]},idField:{type:Sequelize[_0xc0fc[7]]},nameField:{type:Sequelize[_0xc0fc[7]]},customField:{type:Sequelize[_0xc0fc[8]],defaultValue:true},variableName:{type:Sequelize[_0xc0fc[7]]}}
\ No newline at end of file
index fc71325..6ca86ba 100644 (file)
@@ -1 +1 @@
-var _0x9a77=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x9a77[0];var jsonpatch=require(_0x9a77[1]);var rp=require(_0x9a77[2]);var moment=require(_0x9a77[3]);var BPromise=require(_0x9a77[4]);var Mustache=require(_0x9a77[5]);var util=require(_0x9a77[6]);var path=require(_0x9a77[7]);var sox=require(_0x9a77[8]);var csv=require(_0x9a77[9]);var ejs=require(_0x9a77[10]);var fs=require(_0x9a77[11]);var _=require(_0x9a77[12]);var squel=require(_0x9a77[13]);var crypto=require(_0x9a77[14]);var jsforce=require(_0x9a77[15]);var deskjs=require(_0x9a77[16]);var toCsv=require(_0x9a77[9]);var querystring=require(_0x9a77[17]);var Papa=require(_0x9a77[18]);var qs=require(_0x9a77[19]);var logger=require(_0x9a77[21])(_0x9a77[20]);var utils=require(_0x9a77[22]);var config=require(_0x9a77[23]);var db=require(_0x9a77[25])[_0x9a77[24]];function respondWithStatusCode(_0x85cdx1a,_0x85cdx1b){_0x85cdx1b= _0x85cdx1b|| 204;return function(_0x85cdx1c){if(_0x85cdx1c){return _0x85cdx1a[_0x9a77[26]](_0x85cdx1b)};return _0x85cdx1a[_0x9a77[28]](_0x85cdx1b)[_0x9a77[27]]()}}function respondWithResult(_0x85cdx1a,_0x85cdx1b){_0x85cdx1b= _0x85cdx1b|| 200;return function(_0x85cdx1c){if(_0x85cdx1c){return _0x85cdx1a[_0x9a77[28]](_0x85cdx1b)[_0x9a77[29]](_0x85cdx1c)}}}function respondWithFilteredResult(_0x85cdx1a,_0x85cdx1f){return function(_0x85cdx1c){if(_0x85cdx1c){var _0x85cdx20=_0x85cdx1c[_0x9a77[30]],_0x85cdx21=_0x85cdx1f[_0x9a77[31]],_0x85cdx22=_0x85cdx1f[_0x9a77[31]]+ _0x85cdx1f[_0x9a77[32]],_0x85cdx1b;if(_0x85cdx22>= _0x85cdx20){_0x85cdx22= _0x85cdx20;_0x85cdx1b= 200}else {_0x85cdx1b= 206};_0x85cdx1a[_0x9a77[28]](_0x85cdx1b);return _0x85cdx1a[_0x9a77[36]](_0x9a77[33],_0x85cdx21+ _0x9a77[34]+ _0x85cdx22+ _0x9a77[35]+ _0x85cdx20)[_0x9a77[29]](_0x85cdx1c)};return null}}function patchUpdates(_0x85cdx24){return function(_0x85cdx1c){try{jsonpatch[_0x9a77[37]](_0x85cdx1c,_0x85cdx24,true)}catch(err){return BPromise[_0x9a77[38]](err)};return _0x85cdx1c[_0x9a77[39]]()}}function saveUpdates(_0x85cdx26,_0x85cdx1b){return function(_0x85cdx1c){if(_0x85cdx1c){return _0x85cdx1c[_0x9a77[41]](_0x85cdx26)[_0x9a77[40]](function(_0x85cdx27){return _0x85cdx27})};return null}}function removeEntity(_0x85cdx1a,_0x85cdx1b){return function(_0x85cdx1c){if(_0x85cdx1c){return _0x85cdx1c[_0x9a77[42]]()[_0x9a77[40]](function(){_0x85cdx1a[_0x9a77[28]](204)[_0x9a77[27]]()})}}}function handleEntityNotFound(_0x85cdx1a,_0x85cdx1b){return function(_0x85cdx1c){if(!_0x85cdx1c){_0x85cdx1a[_0x9a77[26]](404)};return _0x85cdx1c}}function handleError(_0x85cdx1a,_0x85cdx1b){_0x85cdx1b= _0x85cdx1b|| 500;return function(_0x85cdx2b){logger[_0x9a77[44]](_0x85cdx2b[_0x9a77[43]]);if(_0x85cdx2b[_0x9a77[45]]){delete _0x85cdx2b[_0x9a77[45]]};_0x85cdx1a[_0x9a77[28]](_0x85cdx1b)[_0x9a77[46]](_0x85cdx2b)}}exports[_0x9a77[47]]= function(_0x85cdx2c,_0x85cdx1a){var _0x85cdx1f={},_0x85cdx2d={},_0x85cdx2e={count:0,rows:[]};_0x85cdx2d[_0x9a77[48]]= _[_0x9a77[51]](db[_0x9a77[50]][_0x9a77[49]]);var _0x85cdx2f={dateStart:_0x85cdx2c[_0x9a77[53]][_0x9a77[52]],dateEnd:_0x85cdx2c[_0x9a77[53]][_0x9a77[54]]};delete _0x85cdx2c[_0x9a77[53]][_0x9a77[52]];delete _0x85cdx2c[_0x9a77[53]][_0x9a77[54]];_0x85cdx2d[_0x9a77[53]]= _[_0x9a77[51]](_0x85cdx2c[_0x9a77[53]]);_0x85cdx2d[_0x9a77[55]]= _[_0x9a77[56]](_0x85cdx2d[_0x9a77[48]],_0x85cdx2d[_0x9a77[53]]);_0x85cdx1f[_0x9a77[57]]= _[_0x9a77[56]](_0x85cdx2d[_0x9a77[48]],qs[_0x9a77[58]](_0x85cdx2c[_0x9a77[53]][_0x9a77[58]]));_0x85cdx1f[_0x9a77[57]]= (_0x85cdx1f[_0x9a77[57]][_0x9a77[59]])?_0x85cdx1f[_0x9a77[57]]:_0x85cdx2d[_0x9a77[48]];if(!_0x85cdx2c[_0x9a77[53]][_0x9a77[61]](_0x9a77[60])){_0x85cdx1f[_0x9a77[32]]= qs[_0x9a77[32]](_0x85cdx2c[_0x9a77[53]][_0x9a77[32]]);_0x85cdx1f[_0x9a77[31]]= qs[_0x9a77[31]](_0x85cdx2c[_0x9a77[53]][_0x9a77[31]])};_0x85cdx1f[_0x9a77[62]]= qs[_0x9a77[63]](_0x85cdx2c[_0x9a77[53]][_0x9a77[63]]);_0x85cdx1f[_0x9a77[64]]= qs[_0x9a77[55]](_[_0x9a77[65]](_0x85cdx2c[_0x9a77[53]],_0x85cdx2d[_0x9a77[55]]));if(_0x85cdx2f[_0x9a77[52]]){if(_0x85cdx2f[_0x9a77[54]]){_0x85cdx2f[_0x9a77[54]]= moment(_0x85cdx2f[_0x9a77[54]])[_0x9a77[67]](1,_0x9a77[66])}else {_0x85cdx2f[_0x9a77[54]]= moment(_0x85cdx2f[_0x9a77[52]])[_0x9a77[67]](1,_0x9a77[66])};_[_0x9a77[68]](_0x85cdx1f[_0x9a77[64]],{createdAt:{$gte:_0x85cdx2f[_0x9a77[52]],$lte:_0x85cdx2f[_0x9a77[54]]}})};if(_0x85cdx2c[_0x9a77[53]][_0x9a77[69]]){_0x85cdx1f[_0x9a77[64]]= _[_0x9a77[68]](_0x85cdx1f[_0x9a77[64]],{$or:_[_0x9a77[71]](_0x85cdx1f[_0x9a77[57]],function(_0x85cdx30){var _0x85cdx2e={};_0x85cdx2e[_0x85cdx30]= {$like:_0x9a77[70]+ _0x85cdx2c[_0x9a77[53]][_0x9a77[69]]+ _0x9a77[70]};return _0x85cdx2e})})};_0x85cdx1f= _[_0x9a77[68]]({},_0x85cdx1f,_0x85cdx2c[_0x9a77[72]]);var _0x85cdx31={where:_0x85cdx1f[_0x9a77[64]]};return db[_0x9a77[50]][_0x9a77[30]](_0x85cdx31)[_0x9a77[40]](function(_0x85cdx20){_0x85cdx2e[_0x9a77[30]]= _0x85cdx20;if(_0x85cdx2c[_0x9a77[53]][_0x9a77[75]]){_0x85cdx1f[_0x9a77[76]]= [{all:true}]};return db[_0x9a77[50]][_0x9a77[77]](_0x85cdx1f)})[_0x9a77[40]](function(_0x85cdx32){_0x85cdx2e[_0x9a77[74]]= _0x85cdx32;return _0x85cdx2e})[_0x9a77[40]](respondWithFilteredResult(_0x85cdx1a,_0x85cdx1f))[_0x9a77[73]](handleError(_0x85cdx1a,null))};exports[_0x9a77[78]]= function(_0x85cdx2c,_0x85cdx1a){var _0x85cdx1f={raw:true,where:{id:_0x85cdx2c[_0x9a77[80]][_0x9a77[79]]}},_0x85cdx2d={};_0x85cdx2d[_0x9a77[48]]= _[_0x9a77[51]](db[_0x9a77[50]][_0x9a77[49]]);_0x85cdx2d[_0x9a77[53]]= _[_0x9a77[51]](_0x85cdx2c[_0x9a77[53]]);_0x85cdx2d[_0x9a77[55]]= _[_0x9a77[56]](_0x85cdx2d[_0x9a77[48]],_0x85cdx2d[_0x9a77[53]]);_0x85cdx1f[_0x9a77[57]]= _[_0x9a77[56]](_0x85cdx2d[_0x9a77[48]],qs[_0x9a77[58]](_0x85cdx2c[_0x9a77[53]][_0x9a77[58]]));_0x85cdx1f[_0x9a77[57]]= (_0x85cdx1f[_0x9a77[57]][_0x9a77[59]])?_0x85cdx1f[_0x9a77[57]]:_0x85cdx2d[_0x9a77[48]];if(_0x85cdx2c[_0x9a77[53]][_0x9a77[75]]){_0x85cdx1f[_0x9a77[76]]= [{all:true}]};_0x85cdx1f= _[_0x9a77[68]]({},_0x85cdx1f,_0x85cdx2c[_0x9a77[72]]);return db[_0x9a77[50]][_0x9a77[81]](_0x85cdx1f)[_0x9a77[40]](handleEntityNotFound(_0x85cdx1a,null))[_0x9a77[40]](respondWithResult(_0x85cdx1a,null))[_0x9a77[73]](handleError(_0x85cdx1a,null))};exports[_0x9a77[82]]= function(_0x85cdx2c,_0x85cdx1a){return db[_0x9a77[50]][_0x9a77[82]](_0x85cdx2c[_0x9a77[83]],{})[_0x9a77[40]](respondWithResult(_0x85cdx1a,201))[_0x9a77[73]](handleError(_0x85cdx1a,null))};exports[_0x9a77[41]]= function(_0x85cdx2c,_0x85cdx1a){if(_0x85cdx2c[_0x9a77[83]][_0x9a77[79]]){delete _0x85cdx2c[_0x9a77[83]][_0x9a77[79]]};return db[_0x9a77[50]][_0x9a77[81]]({where:{id:_0x85cdx2c[_0x9a77[80]][_0x9a77[79]]}})[_0x9a77[40]](handleEntityNotFound(_0x85cdx1a,null))[_0x9a77[40]](saveUpdates(_0x85cdx2c[_0x9a77[83]],null))[_0x9a77[40]](respondWithResult(_0x85cdx1a,null))[_0x9a77[73]](handleError(_0x85cdx1a,null))};exports[_0x9a77[42]]= function(_0x85cdx2c,_0x85cdx1a){return db[_0x9a77[50]][_0x9a77[81]]({where:{id:_0x85cdx2c[_0x9a77[80]][_0x9a77[79]]}})[_0x9a77[40]](handleEntityNotFound(_0x85cdx1a,null))[_0x9a77[40]](removeEntity(_0x85cdx1a,null))[_0x9a77[73]](handleError(_0x85cdx1a,null))}
\ No newline at end of file
+var _0xb0db=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xb0db[0];var jsonpatch=require(_0xb0db[1]);var rp=require(_0xb0db[2]);var moment=require(_0xb0db[3]);var BPromise=require(_0xb0db[4]);var Mustache=require(_0xb0db[5]);var util=require(_0xb0db[6]);var path=require(_0xb0db[7]);var sox=require(_0xb0db[8]);var csv=require(_0xb0db[9]);var ejs=require(_0xb0db[10]);var fs=require(_0xb0db[11]);var _=require(_0xb0db[12]);var squel=require(_0xb0db[13]);var crypto=require(_0xb0db[14]);var jsforce=require(_0xb0db[15]);var deskjs=require(_0xb0db[16]);var toCsv=require(_0xb0db[9]);var querystring=require(_0xb0db[17]);var Papa=require(_0xb0db[18]);var qs=require(_0xb0db[19]);var logger=require(_0xb0db[21])(_0xb0db[20]);var utils=require(_0xb0db[22]);var config=require(_0xb0db[23]);var db=require(_0xb0db[25])[_0xb0db[24]];function respondWithStatusCode(_0x7e6dx1a,_0x7e6dx1b){_0x7e6dx1b= _0x7e6dx1b|| 204;return function(_0x7e6dx1c){if(_0x7e6dx1c){return _0x7e6dx1a[_0xb0db[26]](_0x7e6dx1b)};return _0x7e6dx1a[_0xb0db[28]](_0x7e6dx1b)[_0xb0db[27]]()}}function respondWithResult(_0x7e6dx1a,_0x7e6dx1b){_0x7e6dx1b= _0x7e6dx1b|| 200;return function(_0x7e6dx1c){if(_0x7e6dx1c){return _0x7e6dx1a[_0xb0db[28]](_0x7e6dx1b)[_0xb0db[29]](_0x7e6dx1c)}}}function respondWithFilteredResult(_0x7e6dx1a,_0x7e6dx1f){return function(_0x7e6dx1c){if(_0x7e6dx1c){var _0x7e6dx20=_0x7e6dx1c[_0xb0db[30]],_0x7e6dx21=_0x7e6dx1f[_0xb0db[31]],_0x7e6dx22=_0x7e6dx1f[_0xb0db[31]]+ _0x7e6dx1f[_0xb0db[32]],_0x7e6dx1b;if(_0x7e6dx22>= _0x7e6dx20){_0x7e6dx22= _0x7e6dx20;_0x7e6dx1b= 200}else {_0x7e6dx1b= 206};_0x7e6dx1a[_0xb0db[28]](_0x7e6dx1b);return _0x7e6dx1a[_0xb0db[36]](_0xb0db[33],_0x7e6dx21+ _0xb0db[34]+ _0x7e6dx22+ _0xb0db[35]+ _0x7e6dx20)[_0xb0db[29]](_0x7e6dx1c)};return null}}function patchUpdates(_0x7e6dx24){return function(_0x7e6dx1c){try{jsonpatch[_0xb0db[37]](_0x7e6dx1c,_0x7e6dx24,true)}catch(err){return BPromise[_0xb0db[38]](err)};return _0x7e6dx1c[_0xb0db[39]]()}}function saveUpdates(_0x7e6dx26,_0x7e6dx1b){return function(_0x7e6dx1c){if(_0x7e6dx1c){return _0x7e6dx1c[_0xb0db[41]](_0x7e6dx26)[_0xb0db[40]](function(_0x7e6dx27){return _0x7e6dx27})};return null}}function removeEntity(_0x7e6dx1a,_0x7e6dx1b){return function(_0x7e6dx1c){if(_0x7e6dx1c){return _0x7e6dx1c[_0xb0db[42]]()[_0xb0db[40]](function(){_0x7e6dx1a[_0xb0db[28]](204)[_0xb0db[27]]()})}}}function handleEntityNotFound(_0x7e6dx1a,_0x7e6dx1b){return function(_0x7e6dx1c){if(!_0x7e6dx1c){_0x7e6dx1a[_0xb0db[26]](404)};return _0x7e6dx1c}}function handleError(_0x7e6dx1a,_0x7e6dx1b){_0x7e6dx1b= _0x7e6dx1b|| 500;return function(_0x7e6dx2b){logger[_0xb0db[44]](_0x7e6dx2b[_0xb0db[43]]);if(_0x7e6dx2b[_0xb0db[45]]){delete _0x7e6dx2b[_0xb0db[45]]};_0x7e6dx1a[_0xb0db[28]](_0x7e6dx1b)[_0xb0db[46]](_0x7e6dx2b)}}exports[_0xb0db[47]]= function(_0x7e6dx2c,_0x7e6dx1a){var _0x7e6dx1f={},_0x7e6dx2d={},_0x7e6dx2e={count:0,rows:[]};_0x7e6dx2d[_0xb0db[48]]= _[_0xb0db[51]](db[_0xb0db[50]][_0xb0db[49]]);var _0x7e6dx2f={dateStart:_0x7e6dx2c[_0xb0db[53]][_0xb0db[52]],dateEnd:_0x7e6dx2c[_0xb0db[53]][_0xb0db[54]]};delete _0x7e6dx2c[_0xb0db[53]][_0xb0db[52]];delete _0x7e6dx2c[_0xb0db[53]][_0xb0db[54]];_0x7e6dx2d[_0xb0db[53]]= _[_0xb0db[51]](_0x7e6dx2c[_0xb0db[53]]);_0x7e6dx2d[_0xb0db[55]]= _[_0xb0db[56]](_0x7e6dx2d[_0xb0db[48]],_0x7e6dx2d[_0xb0db[53]]);_0x7e6dx1f[_0xb0db[57]]= _[_0xb0db[56]](_0x7e6dx2d[_0xb0db[48]],qs[_0xb0db[58]](_0x7e6dx2c[_0xb0db[53]][_0xb0db[58]]));_0x7e6dx1f[_0xb0db[57]]= (_0x7e6dx1f[_0xb0db[57]][_0xb0db[59]])?_0x7e6dx1f[_0xb0db[57]]:_0x7e6dx2d[_0xb0db[48]];if(!_0x7e6dx2c[_0xb0db[53]][_0xb0db[61]](_0xb0db[60])){_0x7e6dx1f[_0xb0db[32]]= qs[_0xb0db[32]](_0x7e6dx2c[_0xb0db[53]][_0xb0db[32]]);_0x7e6dx1f[_0xb0db[31]]= qs[_0xb0db[31]](_0x7e6dx2c[_0xb0db[53]][_0xb0db[31]])};_0x7e6dx1f[_0xb0db[62]]= qs[_0xb0db[63]](_0x7e6dx2c[_0xb0db[53]][_0xb0db[63]]);_0x7e6dx1f[_0xb0db[64]]= qs[_0xb0db[55]](_[_0xb0db[65]](_0x7e6dx2c[_0xb0db[53]],_0x7e6dx2d[_0xb0db[55]]));if(_0x7e6dx2f[_0xb0db[52]]){if(_0x7e6dx2f[_0xb0db[54]]){_0x7e6dx2f[_0xb0db[54]]= moment(_0x7e6dx2f[_0xb0db[54]])[_0xb0db[67]](1,_0xb0db[66])}else {_0x7e6dx2f[_0xb0db[54]]= moment(_0x7e6dx2f[_0xb0db[52]])[_0xb0db[67]](1,_0xb0db[66])};_[_0xb0db[68]](_0x7e6dx1f[_0xb0db[64]],{createdAt:{$gte:_0x7e6dx2f[_0xb0db[52]],$lte:_0x7e6dx2f[_0xb0db[54]]}})};if(_0x7e6dx2c[_0xb0db[53]][_0xb0db[69]]){_0x7e6dx1f[_0xb0db[64]]= _[_0xb0db[68]](_0x7e6dx1f[_0xb0db[64]],{$or:_[_0xb0db[71]](_0x7e6dx1f[_0xb0db[57]],function(_0x7e6dx30){var _0x7e6dx2e={};_0x7e6dx2e[_0x7e6dx30]= {$like:_0xb0db[70]+ _0x7e6dx2c[_0xb0db[53]][_0xb0db[69]]+ _0xb0db[70]};return _0x7e6dx2e})})};_0x7e6dx1f= _[_0xb0db[68]]({},_0x7e6dx1f,_0x7e6dx2c[_0xb0db[72]]);var _0x7e6dx31={where:_0x7e6dx1f[_0xb0db[64]]};return db[_0xb0db[50]][_0xb0db[30]](_0x7e6dx31)[_0xb0db[40]](function(_0x7e6dx20){_0x7e6dx2e[_0xb0db[30]]= _0x7e6dx20;if(_0x7e6dx2c[_0xb0db[53]][_0xb0db[75]]){_0x7e6dx1f[_0xb0db[76]]= [{all:true}]};return db[_0xb0db[50]][_0xb0db[77]](_0x7e6dx1f)})[_0xb0db[40]](function(_0x7e6dx32){_0x7e6dx2e[_0xb0db[74]]= _0x7e6dx32;return _0x7e6dx2e})[_0xb0db[40]](respondWithFilteredResult(_0x7e6dx1a,_0x7e6dx1f))[_0xb0db[73]](handleError(_0x7e6dx1a,null))};exports[_0xb0db[78]]= function(_0x7e6dx2c,_0x7e6dx1a){var _0x7e6dx1f={raw:true,where:{id:_0x7e6dx2c[_0xb0db[80]][_0xb0db[79]]}},_0x7e6dx2d={};_0x7e6dx2d[_0xb0db[48]]= _[_0xb0db[51]](db[_0xb0db[50]][_0xb0db[49]]);_0x7e6dx2d[_0xb0db[53]]= _[_0xb0db[51]](_0x7e6dx2c[_0xb0db[53]]);_0x7e6dx2d[_0xb0db[55]]= _[_0xb0db[56]](_0x7e6dx2d[_0xb0db[48]],_0x7e6dx2d[_0xb0db[53]]);_0x7e6dx1f[_0xb0db[57]]= _[_0xb0db[56]](_0x7e6dx2d[_0xb0db[48]],qs[_0xb0db[58]](_0x7e6dx2c[_0xb0db[53]][_0xb0db[58]]));_0x7e6dx1f[_0xb0db[57]]= (_0x7e6dx1f[_0xb0db[57]][_0xb0db[59]])?_0x7e6dx1f[_0xb0db[57]]:_0x7e6dx2d[_0xb0db[48]];if(_0x7e6dx2c[_0xb0db[53]][_0xb0db[75]]){_0x7e6dx1f[_0xb0db[76]]= [{all:true}]};_0x7e6dx1f= _[_0xb0db[68]]({},_0x7e6dx1f,_0x7e6dx2c[_0xb0db[72]]);return db[_0xb0db[50]][_0xb0db[81]](_0x7e6dx1f)[_0xb0db[40]](handleEntityNotFound(_0x7e6dx1a,null))[_0xb0db[40]](respondWithResult(_0x7e6dx1a,null))[_0xb0db[73]](handleError(_0x7e6dx1a,null))};exports[_0xb0db[82]]= function(_0x7e6dx2c,_0x7e6dx1a){return db[_0xb0db[50]][_0xb0db[82]](_0x7e6dx2c[_0xb0db[83]],{})[_0xb0db[40]](respondWithResult(_0x7e6dx1a,201))[_0xb0db[73]](handleError(_0x7e6dx1a,null))};exports[_0xb0db[41]]= function(_0x7e6dx2c,_0x7e6dx1a){if(_0x7e6dx2c[_0xb0db[83]][_0xb0db[79]]){delete _0x7e6dx2c[_0xb0db[83]][_0xb0db[79]]};return db[_0xb0db[50]][_0xb0db[81]]({where:{id:_0x7e6dx2c[_0xb0db[80]][_0xb0db[79]]}})[_0xb0db[40]](handleEntityNotFound(_0x7e6dx1a,null))[_0xb0db[40]](saveUpdates(_0x7e6dx2c[_0xb0db[83]],null))[_0xb0db[40]](respondWithResult(_0x7e6dx1a,null))[_0xb0db[73]](handleError(_0x7e6dx1a,null))};exports[_0xb0db[42]]= function(_0x7e6dx2c,_0x7e6dx1a){return db[_0xb0db[50]][_0xb0db[81]]({where:{id:_0x7e6dx2c[_0xb0db[80]][_0xb0db[79]]}})[_0xb0db[40]](handleEntityNotFound(_0x7e6dx1a,null))[_0xb0db[40]](removeEntity(_0x7e6dx1a,null))[_0xb0db[73]](handleError(_0x7e6dx1a,null))}
\ No newline at end of file
index f7321f6..35ba69f 100644 (file)
@@ -1 +1 @@
-var _0xa281=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64","\x69\x6E\x74\x5F\x7A\x6F\x68\x6F\x5F\x66\x69\x65\x6C\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0xa281[0];var _=require(_0xa281[1]);var util=require(_0xa281[2]);var logger=require(_0xa281[4])(_0xa281[3]);var moment=require(_0xa281[5]);var BPromise=require(_0xa281[6]);var rp=require(_0xa281[7]);var attributes=require(_0xa281[8]);module[_0xa281[9]]= function(_0xf9d4x8,_0xf9d4x9){return _0xf9d4x8[_0xa281[12]](_0xa281[10],attributes,{tableName:_0xa281[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x8a05=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64","\x69\x6E\x74\x5F\x7A\x6F\x68\x6F\x5F\x66\x69\x65\x6C\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0x8a05[0];var _=require(_0x8a05[1]);var util=require(_0x8a05[2]);var logger=require(_0x8a05[4])(_0x8a05[3]);var moment=require(_0x8a05[5]);var BPromise=require(_0x8a05[6]);var rp=require(_0x8a05[7]);var attributes=require(_0x8a05[8]);module[_0x8a05[9]]= function(_0x5f9ex8,_0x5f9ex9){return _0x5f9ex8[_0x8a05[12]](_0x8a05[10],attributes,{tableName:_0x8a05[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 3600b1d..1788163 100644 (file)
@@ -1 +1 @@
-var _0x7953=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x7953[0];var _=require(_0x7953[1]);var util=require(_0x7953[2]);var moment=require(_0x7953[3]);var BPromise=require(_0x7953[4]);var rs=require(_0x7953[5]);var fs=require(_0x7953[6]);var db=require(_0x7953[8])[_0x7953[7]];var utils=require(_0x7953[9]);var logger=require(_0x7953[11])(_0x7953[10]);var config=require(_0x7953[12]);var jayson=require(_0x7953[13]);var client=jayson[_0x7953[15]][_0x7953[14]]({port:9002});function respondWithRpcPromise(_0x3eb2xe,_0x3eb2xf,_0x3eb2x10){return  new BPromise(function(_0x3eb2x11,_0x3eb2x12){return client[_0x7953[28]](_0x3eb2xe,_0x3eb2x10)[_0x7953[27]](function(_0x3eb2x14){logger[_0x7953[20]](_0x7953[16],_0x3eb2xf,_0x7953[19]);logger[_0x7953[23]](_0x7953[21],_0x3eb2xf,_0x7953[19],JSON[_0x7953[22]](_0x3eb2x14));if(_0x3eb2x14[_0x7953[17]]){if(_0x3eb2x14[_0x7953[17]][_0x7953[24]]=== 500){logger[_0x7953[17]](_0x7953[16],_0x3eb2xf,_0x3eb2x14[_0x7953[17]][_0x7953[25]]);return _0x3eb2x12(_0x3eb2x14[_0x7953[17]][_0x7953[25]])};logger[_0x7953[17]](_0x7953[16],_0x3eb2xf,_0x3eb2x14[_0x7953[17]][_0x7953[25]]);return _0x3eb2x11(_0x3eb2x14[_0x7953[17]][_0x7953[25]])}else {logger[_0x7953[20]](_0x7953[16],_0x3eb2xf,_0x7953[19]);_0x3eb2x11(_0x3eb2x14[_0x7953[26]][_0x7953[25]])}})[_0x7953[18]](function(_0x3eb2x13){logger[_0x7953[17]](_0x7953[16],_0x3eb2xf,_0x3eb2x13);_0x3eb2x12(_0x3eb2x13)})})}
\ No newline at end of file
+var _0xb3da=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xb3da[0];var _=require(_0xb3da[1]);var util=require(_0xb3da[2]);var moment=require(_0xb3da[3]);var BPromise=require(_0xb3da[4]);var rs=require(_0xb3da[5]);var fs=require(_0xb3da[6]);var db=require(_0xb3da[8])[_0xb3da[7]];var utils=require(_0xb3da[9]);var logger=require(_0xb3da[11])(_0xb3da[10]);var config=require(_0xb3da[12]);var jayson=require(_0xb3da[13]);var client=jayson[_0xb3da[15]][_0xb3da[14]]({port:9002});function respondWithRpcPromise(_0x411fxe,_0x411fxf,_0x411fx10){return  new BPromise(function(_0x411fx11,_0x411fx12){return client[_0xb3da[28]](_0x411fxe,_0x411fx10)[_0xb3da[27]](function(_0x411fx14){logger[_0xb3da[20]](_0xb3da[16],_0x411fxf,_0xb3da[19]);logger[_0xb3da[23]](_0xb3da[21],_0x411fxf,_0xb3da[19],JSON[_0xb3da[22]](_0x411fx14));if(_0x411fx14[_0xb3da[17]]){if(_0x411fx14[_0xb3da[17]][_0xb3da[24]]=== 500){logger[_0xb3da[17]](_0xb3da[16],_0x411fxf,_0x411fx14[_0xb3da[17]][_0xb3da[25]]);return _0x411fx12(_0x411fx14[_0xb3da[17]][_0xb3da[25]])};logger[_0xb3da[17]](_0xb3da[16],_0x411fxf,_0x411fx14[_0xb3da[17]][_0xb3da[25]]);return _0x411fx11(_0x411fx14[_0xb3da[17]][_0xb3da[25]])}else {logger[_0xb3da[20]](_0xb3da[16],_0x411fxf,_0xb3da[19]);_0x411fx11(_0x411fx14[_0xb3da[26]][_0xb3da[25]])}})[_0xb3da[18]](function(_0x411fx13){logger[_0xb3da[17]](_0xb3da[16],_0x411fxf,_0x411fx13);_0x411fx12(_0x411fx13)})})}
\ No newline at end of file
index 5b7e7d3..7919d29 100644 (file)
@@ -1 +1 @@
-var _0xb308=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xb308[0];var multer=require(_0xb308[1]);var util=require(_0xb308[2]);var path=require(_0xb308[3]);var express=require(_0xb308[4]);var router=express.Router();var auth=require(_0xb308[5]);var interaction=require(_0xb308[6]);var config=require(_0xb308[7]);module[_0xb308[8]]= router
\ No newline at end of file
+var _0x28a3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x28a3[0];var multer=require(_0x28a3[1]);var util=require(_0x28a3[2]);var path=require(_0x28a3[3]);var express=require(_0x28a3[4]);var router=express.Router();var auth=require(_0x28a3[5]);var interaction=require(_0x28a3[6]);var config=require(_0x28a3[7]);module[_0x28a3[8]]= router
\ No newline at end of file
index ead5e24..633ef61 100644 (file)
@@ -1 +1 @@
-var _0xfb9f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x75\x6E\x69\x71\x75\x65\x5F\x6E\x61\x6D\x65\x5F\x61\x6E\x64\x5F\x76\x65\x72\x73\x69\x6F\x6E","\x61\x70\x70\x2E\x6A\x73","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x73\x74\x61\x74\x65","\x23"];_0xfb9f[0];var Sequelize=require(_0xfb9f[1]);module[_0xfb9f[2]]= {name:{type:Sequelize[_0xfb9f[3]],allowNull:false,unique:_0xfb9f[4]},version:{type:Sequelize[_0xfb9f[3]],allowNull:false,unique:_0xfb9f[4]},main:{type:Sequelize[_0xfb9f[3]],defaultValue:_0xfb9f[5]},filename:{type:Sequelize[_0xfb9f[3]]},path:{type:Sequelize[_0xfb9f[3]]},type:{type:Sequelize[_0xfb9f[3]]},size:{type:Sequelize[_0xfb9f[6]]},active:{type:Sequelize[_0xfb9f[7]],defaultValue:false},author:{type:Sequelize[_0xfb9f[3]]},logo:{type:Sequelize[_0xfb9f[3]]},state:{type:Sequelize[_0xfb9f[3]],unique:_0xfb9f[8]},description:{type:Sequelize[_0xfb9f[3]]},title:{type:Sequelize[_0xfb9f[3]]},remoteUri:{type:Sequelize[_0xfb9f[3]]},link:{type:Sequelize[_0xfb9f[3]],defaultValue:_0xfb9f[9]}}
\ No newline at end of file
+var _0x238f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x75\x6E\x69\x71\x75\x65\x5F\x6E\x61\x6D\x65\x5F\x61\x6E\x64\x5F\x76\x65\x72\x73\x69\x6F\x6E","\x61\x70\x70\x2E\x6A\x73","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x73\x74\x61\x74\x65","\x23"];_0x238f[0];var Sequelize=require(_0x238f[1]);module[_0x238f[2]]= {name:{type:Sequelize[_0x238f[3]],allowNull:false,unique:_0x238f[4]},version:{type:Sequelize[_0x238f[3]],allowNull:false,unique:_0x238f[4]},main:{type:Sequelize[_0x238f[3]],defaultValue:_0x238f[5]},filename:{type:Sequelize[_0x238f[3]]},path:{type:Sequelize[_0x238f[3]]},type:{type:Sequelize[_0x238f[3]]},size:{type:Sequelize[_0x238f[6]]},active:{type:Sequelize[_0x238f[7]],defaultValue:false},author:{type:Sequelize[_0x238f[3]]},logo:{type:Sequelize[_0x238f[3]]},state:{type:Sequelize[_0x238f[3]],unique:_0x238f[8]},description:{type:Sequelize[_0x238f[3]]},title:{type:Sequelize[_0x238f[3]]},remoteUri:{type:Sequelize[_0x238f[3]]},link:{type:Sequelize[_0x238f[3]],defaultValue:_0x238f[9]}}
\ No newline at end of file
index 8933053..e06d328 100644 (file)
@@ -1 +1 @@
-var _0x2629=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x2629[0];var jsonpatch=require(_0x2629[1]);var rp=require(_0x2629[2]);var moment=require(_0x2629[3]);var BPromise=require(_0x2629[4]);var Mustache=require(_0x2629[5]);var util=require(_0x2629[6]);var path=require(_0x2629[7]);var sox=require(_0x2629[8]);var csv=require(_0x2629[9]);var ejs=require(_0x2629[10]);var fs=require(_0x2629[11]);var _=require(_0x2629[12]);var squel=require(_0x2629[13]);var crypto=require(_0x2629[14]);var jsforce=require(_0x2629[15]);var deskjs=require(_0x2629[16]);var toCsv=require(_0x2629[9]);var querystring=require(_0x2629[17]);var Papa=require(_0x2629[18]);var qs=require(_0x2629[19]);var logger=require(_0x2629[21])(_0x2629[20]);var utils=require(_0x2629[22]);var config=require(_0x2629[23]);var db=require(_0x2629[25])[_0x2629[24]];function respondWithStatusCode(_0xbe71x1a,_0xbe71x1b){_0xbe71x1b= _0xbe71x1b|| 204;return function(_0xbe71x1c){if(_0xbe71x1c){return _0xbe71x1a[_0x2629[26]](_0xbe71x1b)};return _0xbe71x1a[_0x2629[28]](_0xbe71x1b)[_0x2629[27]]()}}function respondWithResult(_0xbe71x1a,_0xbe71x1b){_0xbe71x1b= _0xbe71x1b|| 200;return function(_0xbe71x1c){if(_0xbe71x1c){return _0xbe71x1a[_0x2629[28]](_0xbe71x1b)[_0x2629[29]](_0xbe71x1c)}}}function respondWithFilteredResult(_0xbe71x1a,_0xbe71x1f){return function(_0xbe71x1c){if(_0xbe71x1c){var _0xbe71x20=_0xbe71x1c[_0x2629[30]],_0xbe71x21=_0xbe71x1f[_0x2629[31]],_0xbe71x22=_0xbe71x1f[_0x2629[31]]+ _0xbe71x1f[_0x2629[32]],_0xbe71x1b;if(_0xbe71x22>= _0xbe71x20){_0xbe71x22= _0xbe71x20;_0xbe71x1b= 200}else {_0xbe71x1b= 206};_0xbe71x1a[_0x2629[28]](_0xbe71x1b);return _0xbe71x1a[_0x2629[36]](_0x2629[33],_0xbe71x21+ _0x2629[34]+ _0xbe71x22+ _0x2629[35]+ _0xbe71x20)[_0x2629[29]](_0xbe71x1c)};return null}}function patchUpdates(_0xbe71x24){return function(_0xbe71x1c){try{jsonpatch[_0x2629[37]](_0xbe71x1c,_0xbe71x24,true)}catch(err){return BPromise[_0x2629[38]](err)};return _0xbe71x1c[_0x2629[39]]()}}function saveUpdates(_0xbe71x26,_0xbe71x1b){return function(_0xbe71x1c){if(_0xbe71x1c){return _0xbe71x1c[_0x2629[41]](_0xbe71x26)[_0x2629[40]](function(_0xbe71x27){return _0xbe71x27})};return null}}function removeEntity(_0xbe71x1a,_0xbe71x1b){return function(_0xbe71x1c){if(_0xbe71x1c){return _0xbe71x1c[_0x2629[42]]()[_0x2629[40]](function(){_0xbe71x1a[_0x2629[28]](204)[_0x2629[27]]()})}}}function handleEntityNotFound(_0xbe71x1a,_0xbe71x1b){return function(_0xbe71x1c){if(!_0xbe71x1c){_0xbe71x1a[_0x2629[26]](404)};return _0xbe71x1c}}function handleError(_0xbe71x1a,_0xbe71x1b){_0xbe71x1b= _0xbe71x1b|| 500;return function(_0xbe71x2b){logger[_0x2629[44]](_0xbe71x2b[_0x2629[43]]);if(_0xbe71x2b[_0x2629[45]]){delete _0xbe71x2b[_0x2629[45]]};_0xbe71x1a[_0x2629[28]](_0xbe71x1b)[_0x2629[46]](_0xbe71x2b)}}exports[_0x2629[47]]= function(_0xbe71x2c,_0xbe71x1a){var _0xbe71x1f={},_0xbe71x2d={},_0xbe71x2e={count:0,rows:[]};_0xbe71x2d[_0x2629[48]]= _[_0x2629[51]](db[_0x2629[50]][_0x2629[49]]);var _0xbe71x2f={dateStart:_0xbe71x2c[_0x2629[53]][_0x2629[52]],dateEnd:_0xbe71x2c[_0x2629[53]][_0x2629[54]]};delete _0xbe71x2c[_0x2629[53]][_0x2629[52]];delete _0xbe71x2c[_0x2629[53]][_0x2629[54]];_0xbe71x2d[_0x2629[53]]= _[_0x2629[51]](_0xbe71x2c[_0x2629[53]]);_0xbe71x2d[_0x2629[55]]= _[_0x2629[56]](_0xbe71x2d[_0x2629[48]],_0xbe71x2d[_0x2629[53]]);_0xbe71x1f[_0x2629[57]]= _[_0x2629[56]](_0xbe71x2d[_0x2629[48]],qs[_0x2629[58]](_0xbe71x2c[_0x2629[53]][_0x2629[58]]));_0xbe71x1f[_0x2629[57]]= (_0xbe71x1f[_0x2629[57]][_0x2629[59]])?_0xbe71x1f[_0x2629[57]]:_0xbe71x2d[_0x2629[48]];if(!_0xbe71x2c[_0x2629[53]][_0x2629[61]](_0x2629[60])){_0xbe71x1f[_0x2629[32]]= qs[_0x2629[32]](_0xbe71x2c[_0x2629[53]][_0x2629[32]]);_0xbe71x1f[_0x2629[31]]= qs[_0x2629[31]](_0xbe71x2c[_0x2629[53]][_0x2629[31]])};_0xbe71x1f[_0x2629[62]]= qs[_0x2629[63]](_0xbe71x2c[_0x2629[53]][_0x2629[63]]);_0xbe71x1f[_0x2629[64]]= qs[_0x2629[55]](_[_0x2629[65]](_0xbe71x2c[_0x2629[53]],_0xbe71x2d[_0x2629[55]]));if(_0xbe71x2f[_0x2629[52]]){if(_0xbe71x2f[_0x2629[54]]){_0xbe71x2f[_0x2629[54]]= moment(_0xbe71x2f[_0x2629[54]])[_0x2629[67]](1,_0x2629[66])}else {_0xbe71x2f[_0x2629[54]]= moment(_0xbe71x2f[_0x2629[52]])[_0x2629[67]](1,_0x2629[66])};_[_0x2629[68]](_0xbe71x1f[_0x2629[64]],{createdAt:{$gte:_0xbe71x2f[_0x2629[52]],$lte:_0xbe71x2f[_0x2629[54]]}})};if(_0xbe71x2c[_0x2629[53]][_0x2629[69]]){_0xbe71x1f[_0x2629[64]]= _[_0x2629[68]](_0xbe71x1f[_0x2629[64]],{$or:_[_0x2629[71]](_0xbe71x1f[_0x2629[57]],function(_0xbe71x30){var _0xbe71x2e={};_0xbe71x2e[_0xbe71x30]= {$like:_0x2629[70]+ _0xbe71x2c[_0x2629[53]][_0x2629[69]]+ _0x2629[70]};return _0xbe71x2e})})};_0xbe71x1f= _[_0x2629[68]]({},_0xbe71x1f,_0xbe71x2c[_0x2629[72]]);var _0xbe71x31={where:_0xbe71x1f[_0x2629[64]]};return db[_0x2629[50]][_0x2629[30]](_0xbe71x31)[_0x2629[40]](function(_0xbe71x20){_0xbe71x2e[_0x2629[30]]= _0xbe71x20;if(_0xbe71x2c[_0x2629[53]][_0x2629[75]]){_0xbe71x1f[_0x2629[76]]= [{all:true}]};return db[_0x2629[50]][_0x2629[77]](_0xbe71x1f)})[_0x2629[40]](function(_0xbe71x32){_0xbe71x2e[_0x2629[74]]= _0xbe71x32;return _0xbe71x2e})[_0x2629[40]](respondWithFilteredResult(_0xbe71x1a,_0xbe71x1f))[_0x2629[73]](handleError(_0xbe71x1a,null))};exports[_0x2629[78]]= function(_0xbe71x2c,_0xbe71x1a){var _0xbe71x1f={raw:false,where:{id:_0xbe71x2c[_0x2629[80]][_0x2629[79]]}},_0xbe71x2d={};_0xbe71x2d[_0x2629[48]]= _[_0x2629[51]](db[_0x2629[50]][_0x2629[49]]);_0xbe71x2d[_0x2629[53]]= _[_0x2629[51]](_0xbe71x2c[_0x2629[53]]);_0xbe71x2d[_0x2629[55]]= _[_0x2629[56]](_0xbe71x2d[_0x2629[48]],_0xbe71x2d[_0x2629[53]]);_0xbe71x1f[_0x2629[57]]= _[_0x2629[56]](_0xbe71x2d[_0x2629[48]],qs[_0x2629[58]](_0xbe71x2c[_0x2629[53]][_0x2629[58]]));_0xbe71x1f[_0x2629[57]]= (_0xbe71x1f[_0x2629[57]][_0x2629[59]])?_0xbe71x1f[_0x2629[57]]:_0xbe71x2d[_0x2629[48]];if(_0xbe71x2c[_0x2629[53]][_0x2629[75]]){_0xbe71x1f[_0x2629[76]]= [{all:true}]};_0xbe71x1f= _[_0x2629[68]]({},_0xbe71x1f,_0xbe71x2c[_0x2629[72]]);return db[_0x2629[50]][_0x2629[81]](_0xbe71x1f)[_0x2629[40]](handleEntityNotFound(_0xbe71x1a,null))[_0x2629[40]](respondWithResult(_0xbe71x1a,null))[_0x2629[73]](handleError(_0xbe71x1a,null))};exports[_0x2629[82]]= function(_0xbe71x2c,_0xbe71x1a){return db[_0x2629[50]][_0x2629[82]](_0xbe71x2c[_0x2629[83]],{})[_0x2629[40]](respondWithResult(_0xbe71x1a,201))[_0x2629[73]](handleError(_0xbe71x1a,null))};exports[_0x2629[41]]= function(_0xbe71x2c,_0xbe71x1a){if(_0xbe71x2c[_0x2629[83]][_0x2629[79]]){delete _0xbe71x2c[_0x2629[83]][_0x2629[79]]};return db[_0x2629[50]][_0x2629[81]]({where:{id:_0xbe71x2c[_0x2629[80]][_0x2629[79]]}})[_0x2629[40]](handleEntityNotFound(_0xbe71x1a,null))[_0x2629[40]](saveUpdates(_0xbe71x2c[_0x2629[83]],null))[_0x2629[40]](respondWithResult(_0xbe71x1a,null))[_0x2629[73]](handleError(_0xbe71x1a,null))};exports[_0x2629[42]]= function(_0xbe71x2c,_0xbe71x1a){return db[_0x2629[50]][_0x2629[81]]({where:{id:_0xbe71x2c[_0x2629[80]][_0x2629[79]]}})[_0x2629[40]](handleEntityNotFound(_0xbe71x1a,null))[_0x2629[40]](removeEntity(_0xbe71x1a,null))[_0x2629[73]](handleError(_0xbe71x1a,null))}
\ No newline at end of file
+var _0x5b10=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x5b10[0];var jsonpatch=require(_0x5b10[1]);var rp=require(_0x5b10[2]);var moment=require(_0x5b10[3]);var BPromise=require(_0x5b10[4]);var Mustache=require(_0x5b10[5]);var util=require(_0x5b10[6]);var path=require(_0x5b10[7]);var sox=require(_0x5b10[8]);var csv=require(_0x5b10[9]);var ejs=require(_0x5b10[10]);var fs=require(_0x5b10[11]);var _=require(_0x5b10[12]);var squel=require(_0x5b10[13]);var crypto=require(_0x5b10[14]);var jsforce=require(_0x5b10[15]);var deskjs=require(_0x5b10[16]);var toCsv=require(_0x5b10[9]);var querystring=require(_0x5b10[17]);var Papa=require(_0x5b10[18]);var qs=require(_0x5b10[19]);var logger=require(_0x5b10[21])(_0x5b10[20]);var utils=require(_0x5b10[22]);var config=require(_0x5b10[23]);var db=require(_0x5b10[25])[_0x5b10[24]];function respondWithStatusCode(_0xc0e1x1a,_0xc0e1x1b){_0xc0e1x1b= _0xc0e1x1b|| 204;return function(_0xc0e1x1c){if(_0xc0e1x1c){return _0xc0e1x1a[_0x5b10[26]](_0xc0e1x1b)};return _0xc0e1x1a[_0x5b10[28]](_0xc0e1x1b)[_0x5b10[27]]()}}function respondWithResult(_0xc0e1x1a,_0xc0e1x1b){_0xc0e1x1b= _0xc0e1x1b|| 200;return function(_0xc0e1x1c){if(_0xc0e1x1c){return _0xc0e1x1a[_0x5b10[28]](_0xc0e1x1b)[_0x5b10[29]](_0xc0e1x1c)}}}function respondWithFilteredResult(_0xc0e1x1a,_0xc0e1x1f){return function(_0xc0e1x1c){if(_0xc0e1x1c){var _0xc0e1x20=_0xc0e1x1c[_0x5b10[30]],_0xc0e1x21=_0xc0e1x1f[_0x5b10[31]],_0xc0e1x22=_0xc0e1x1f[_0x5b10[31]]+ _0xc0e1x1f[_0x5b10[32]],_0xc0e1x1b;if(_0xc0e1x22>= _0xc0e1x20){_0xc0e1x22= _0xc0e1x20;_0xc0e1x1b= 200}else {_0xc0e1x1b= 206};_0xc0e1x1a[_0x5b10[28]](_0xc0e1x1b);return _0xc0e1x1a[_0x5b10[36]](_0x5b10[33],_0xc0e1x21+ _0x5b10[34]+ _0xc0e1x22+ _0x5b10[35]+ _0xc0e1x20)[_0x5b10[29]](_0xc0e1x1c)};return null}}function patchUpdates(_0xc0e1x24){return function(_0xc0e1x1c){try{jsonpatch[_0x5b10[37]](_0xc0e1x1c,_0xc0e1x24,true)}catch(err){return BPromise[_0x5b10[38]](err)};return _0xc0e1x1c[_0x5b10[39]]()}}function saveUpdates(_0xc0e1x26,_0xc0e1x1b){return function(_0xc0e1x1c){if(_0xc0e1x1c){return _0xc0e1x1c[_0x5b10[41]](_0xc0e1x26)[_0x5b10[40]](function(_0xc0e1x27){return _0xc0e1x27})};return null}}function removeEntity(_0xc0e1x1a,_0xc0e1x1b){return function(_0xc0e1x1c){if(_0xc0e1x1c){return _0xc0e1x1c[_0x5b10[42]]()[_0x5b10[40]](function(){_0xc0e1x1a[_0x5b10[28]](204)[_0x5b10[27]]()})}}}function handleEntityNotFound(_0xc0e1x1a,_0xc0e1x1b){return function(_0xc0e1x1c){if(!_0xc0e1x1c){_0xc0e1x1a[_0x5b10[26]](404)};return _0xc0e1x1c}}function handleError(_0xc0e1x1a,_0xc0e1x1b){_0xc0e1x1b= _0xc0e1x1b|| 500;return function(_0xc0e1x2b){logger[_0x5b10[44]](_0xc0e1x2b[_0x5b10[43]]);if(_0xc0e1x2b[_0x5b10[45]]){delete _0xc0e1x2b[_0x5b10[45]]};_0xc0e1x1a[_0x5b10[28]](_0xc0e1x1b)[_0x5b10[46]](_0xc0e1x2b)}}exports[_0x5b10[47]]= function(_0xc0e1x2c,_0xc0e1x1a){var _0xc0e1x1f={},_0xc0e1x2d={},_0xc0e1x2e={count:0,rows:[]};_0xc0e1x2d[_0x5b10[48]]= _[_0x5b10[51]](db[_0x5b10[50]][_0x5b10[49]]);var _0xc0e1x2f={dateStart:_0xc0e1x2c[_0x5b10[53]][_0x5b10[52]],dateEnd:_0xc0e1x2c[_0x5b10[53]][_0x5b10[54]]};delete _0xc0e1x2c[_0x5b10[53]][_0x5b10[52]];delete _0xc0e1x2c[_0x5b10[53]][_0x5b10[54]];_0xc0e1x2d[_0x5b10[53]]= _[_0x5b10[51]](_0xc0e1x2c[_0x5b10[53]]);_0xc0e1x2d[_0x5b10[55]]= _[_0x5b10[56]](_0xc0e1x2d[_0x5b10[48]],_0xc0e1x2d[_0x5b10[53]]);_0xc0e1x1f[_0x5b10[57]]= _[_0x5b10[56]](_0xc0e1x2d[_0x5b10[48]],qs[_0x5b10[58]](_0xc0e1x2c[_0x5b10[53]][_0x5b10[58]]));_0xc0e1x1f[_0x5b10[57]]= (_0xc0e1x1f[_0x5b10[57]][_0x5b10[59]])?_0xc0e1x1f[_0x5b10[57]]:_0xc0e1x2d[_0x5b10[48]];if(!_0xc0e1x2c[_0x5b10[53]][_0x5b10[61]](_0x5b10[60])){_0xc0e1x1f[_0x5b10[32]]= qs[_0x5b10[32]](_0xc0e1x2c[_0x5b10[53]][_0x5b10[32]]);_0xc0e1x1f[_0x5b10[31]]= qs[_0x5b10[31]](_0xc0e1x2c[_0x5b10[53]][_0x5b10[31]])};_0xc0e1x1f[_0x5b10[62]]= qs[_0x5b10[63]](_0xc0e1x2c[_0x5b10[53]][_0x5b10[63]]);_0xc0e1x1f[_0x5b10[64]]= qs[_0x5b10[55]](_[_0x5b10[65]](_0xc0e1x2c[_0x5b10[53]],_0xc0e1x2d[_0x5b10[55]]));if(_0xc0e1x2f[_0x5b10[52]]){if(_0xc0e1x2f[_0x5b10[54]]){_0xc0e1x2f[_0x5b10[54]]= moment(_0xc0e1x2f[_0x5b10[54]])[_0x5b10[67]](1,_0x5b10[66])}else {_0xc0e1x2f[_0x5b10[54]]= moment(_0xc0e1x2f[_0x5b10[52]])[_0x5b10[67]](1,_0x5b10[66])};_[_0x5b10[68]](_0xc0e1x1f[_0x5b10[64]],{createdAt:{$gte:_0xc0e1x2f[_0x5b10[52]],$lte:_0xc0e1x2f[_0x5b10[54]]}})};if(_0xc0e1x2c[_0x5b10[53]][_0x5b10[69]]){_0xc0e1x1f[_0x5b10[64]]= _[_0x5b10[68]](_0xc0e1x1f[_0x5b10[64]],{$or:_[_0x5b10[71]](_0xc0e1x1f[_0x5b10[57]],function(_0xc0e1x30){var _0xc0e1x2e={};_0xc0e1x2e[_0xc0e1x30]= {$like:_0x5b10[70]+ _0xc0e1x2c[_0x5b10[53]][_0x5b10[69]]+ _0x5b10[70]};return _0xc0e1x2e})})};_0xc0e1x1f= _[_0x5b10[68]]({},_0xc0e1x1f,_0xc0e1x2c[_0x5b10[72]]);var _0xc0e1x31={where:_0xc0e1x1f[_0x5b10[64]]};return db[_0x5b10[50]][_0x5b10[30]](_0xc0e1x31)[_0x5b10[40]](function(_0xc0e1x20){_0xc0e1x2e[_0x5b10[30]]= _0xc0e1x20;if(_0xc0e1x2c[_0x5b10[53]][_0x5b10[75]]){_0xc0e1x1f[_0x5b10[76]]= [{all:true}]};return db[_0x5b10[50]][_0x5b10[77]](_0xc0e1x1f)})[_0x5b10[40]](function(_0xc0e1x32){_0xc0e1x2e[_0x5b10[74]]= _0xc0e1x32;return _0xc0e1x2e})[_0x5b10[40]](respondWithFilteredResult(_0xc0e1x1a,_0xc0e1x1f))[_0x5b10[73]](handleError(_0xc0e1x1a,null))};exports[_0x5b10[78]]= function(_0xc0e1x2c,_0xc0e1x1a){var _0xc0e1x1f={raw:false,where:{id:_0xc0e1x2c[_0x5b10[80]][_0x5b10[79]]}},_0xc0e1x2d={};_0xc0e1x2d[_0x5b10[48]]= _[_0x5b10[51]](db[_0x5b10[50]][_0x5b10[49]]);_0xc0e1x2d[_0x5b10[53]]= _[_0x5b10[51]](_0xc0e1x2c[_0x5b10[53]]);_0xc0e1x2d[_0x5b10[55]]= _[_0x5b10[56]](_0xc0e1x2d[_0x5b10[48]],_0xc0e1x2d[_0x5b10[53]]);_0xc0e1x1f[_0x5b10[57]]= _[_0x5b10[56]](_0xc0e1x2d[_0x5b10[48]],qs[_0x5b10[58]](_0xc0e1x2c[_0x5b10[53]][_0x5b10[58]]));_0xc0e1x1f[_0x5b10[57]]= (_0xc0e1x1f[_0x5b10[57]][_0x5b10[59]])?_0xc0e1x1f[_0x5b10[57]]:_0xc0e1x2d[_0x5b10[48]];if(_0xc0e1x2c[_0x5b10[53]][_0x5b10[75]]){_0xc0e1x1f[_0x5b10[76]]= [{all:true}]};_0xc0e1x1f= _[_0x5b10[68]]({},_0xc0e1x1f,_0xc0e1x2c[_0x5b10[72]]);return db[_0x5b10[50]][_0x5b10[81]](_0xc0e1x1f)[_0x5b10[40]](handleEntityNotFound(_0xc0e1x1a,null))[_0x5b10[40]](respondWithResult(_0xc0e1x1a,null))[_0x5b10[73]](handleError(_0xc0e1x1a,null))};exports[_0x5b10[82]]= function(_0xc0e1x2c,_0xc0e1x1a){return db[_0x5b10[50]][_0x5b10[82]](_0xc0e1x2c[_0x5b10[83]],{})[_0x5b10[40]](respondWithResult(_0xc0e1x1a,201))[_0x5b10[73]](handleError(_0xc0e1x1a,null))};exports[_0x5b10[41]]= function(_0xc0e1x2c,_0xc0e1x1a){if(_0xc0e1x2c[_0x5b10[83]][_0x5b10[79]]){delete _0xc0e1x2c[_0x5b10[83]][_0x5b10[79]]};return db[_0x5b10[50]][_0x5b10[81]]({where:{id:_0xc0e1x2c[_0x5b10[80]][_0x5b10[79]]}})[_0x5b10[40]](handleEntityNotFound(_0xc0e1x1a,null))[_0x5b10[40]](saveUpdates(_0xc0e1x2c[_0x5b10[83]],null))[_0x5b10[40]](respondWithResult(_0xc0e1x1a,null))[_0x5b10[73]](handleError(_0xc0e1x1a,null))};exports[_0x5b10[42]]= function(_0xc0e1x2c,_0xc0e1x1a){return db[_0x5b10[50]][_0x5b10[81]]({where:{id:_0xc0e1x2c[_0x5b10[80]][_0x5b10[79]]}})[_0x5b10[40]](handleEntityNotFound(_0xc0e1x1a,null))[_0x5b10[40]](removeEntity(_0xc0e1x1a,null))[_0x5b10[73]](handleError(_0xc0e1x1a,null))}
\ No newline at end of file
index 370a02b..0a3ee90 100644 (file)
@@ -1 +1 @@
-var _0x3a99=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x3a99[0];var _=require(_0x3a99[1]);var util=require(_0x3a99[2]);var logger=require(_0x3a99[4])(_0x3a99[3]);var moment=require(_0x3a99[5]);var BPromise=require(_0x3a99[6]);var rp=require(_0x3a99[7]);var attributes=require(_0x3a99[8]);module[_0x3a99[9]]= function(_0xe7fax8,_0xe7fax9){return _0xe7fax8[_0x3a99[12]](_0x3a99[10],attributes,{tableName:_0x3a99[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x9e5f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x9e5f[0];var _=require(_0x9e5f[1]);var util=require(_0x9e5f[2]);var logger=require(_0x9e5f[4])(_0x9e5f[3]);var moment=require(_0x9e5f[5]);var BPromise=require(_0x9e5f[6]);var rp=require(_0x9e5f[7]);var attributes=require(_0x9e5f[8]);module[_0x9e5f[9]]= function(_0x4307x8,_0x4307x9){return _0x4307x8[_0x9e5f[12]](_0x9e5f[10],attributes,{tableName:_0x9e5f[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 52b6978..7231138 100644 (file)
@@ -1 +1 @@
-var _0xb643=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xb643[0];var _=require(_0xb643[1]);var util=require(_0xb643[2]);var moment=require(_0xb643[3]);var BPromise=require(_0xb643[4]);var rs=require(_0xb643[5]);var fs=require(_0xb643[6]);var db=require(_0xb643[8])[_0xb643[7]];var utils=require(_0xb643[9]);var logger=require(_0xb643[11])(_0xb643[10]);var config=require(_0xb643[12]);var jayson=require(_0xb643[13]);var client=jayson[_0xb643[15]][_0xb643[14]]({port:9002});function respondWithRpcPromise(_0xfb81xe,_0xfb81xf,_0xfb81x10){return  new BPromise(function(_0xfb81x11,_0xfb81x12){return client[_0xb643[28]](_0xfb81xe,_0xfb81x10)[_0xb643[27]](function(_0xfb81x14){logger[_0xb643[20]](_0xb643[16],_0xfb81xf,_0xb643[19]);logger[_0xb643[23]](_0xb643[21],_0xfb81xf,_0xb643[19],JSON[_0xb643[22]](_0xfb81x14));if(_0xfb81x14[_0xb643[17]]){if(_0xfb81x14[_0xb643[17]][_0xb643[24]]=== 500){logger[_0xb643[17]](_0xb643[16],_0xfb81xf,_0xfb81x14[_0xb643[17]][_0xb643[25]]);return _0xfb81x12(_0xfb81x14[_0xb643[17]][_0xb643[25]])};logger[_0xb643[17]](_0xb643[16],_0xfb81xf,_0xfb81x14[_0xb643[17]][_0xb643[25]]);return _0xfb81x11(_0xfb81x14[_0xb643[17]][_0xb643[25]])}else {logger[_0xb643[20]](_0xb643[16],_0xfb81xf,_0xb643[19]);_0xfb81x11(_0xfb81x14[_0xb643[26]][_0xb643[25]])}})[_0xb643[18]](function(_0xfb81x13){logger[_0xb643[17]](_0xb643[16],_0xfb81xf,_0xfb81x13);_0xfb81x12(_0xfb81x13)})})}
\ No newline at end of file
+var _0x14b7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x14b7[0];var _=require(_0x14b7[1]);var util=require(_0x14b7[2]);var moment=require(_0x14b7[3]);var BPromise=require(_0x14b7[4]);var rs=require(_0x14b7[5]);var fs=require(_0x14b7[6]);var db=require(_0x14b7[8])[_0x14b7[7]];var utils=require(_0x14b7[9]);var logger=require(_0x14b7[11])(_0x14b7[10]);var config=require(_0x14b7[12]);var jayson=require(_0x14b7[13]);var client=jayson[_0x14b7[15]][_0x14b7[14]]({port:9002});function respondWithRpcPromise(_0xd42bxe,_0xd42bxf,_0xd42bx10){return  new BPromise(function(_0xd42bx11,_0xd42bx12){return client[_0x14b7[28]](_0xd42bxe,_0xd42bx10)[_0x14b7[27]](function(_0xd42bx14){logger[_0x14b7[20]](_0x14b7[16],_0xd42bxf,_0x14b7[19]);logger[_0x14b7[23]](_0x14b7[21],_0xd42bxf,_0x14b7[19],JSON[_0x14b7[22]](_0xd42bx14));if(_0xd42bx14[_0x14b7[17]]){if(_0xd42bx14[_0x14b7[17]][_0x14b7[24]]=== 500){logger[_0x14b7[17]](_0x14b7[16],_0xd42bxf,_0xd42bx14[_0x14b7[17]][_0x14b7[25]]);return _0xd42bx12(_0xd42bx14[_0x14b7[17]][_0x14b7[25]])};logger[_0x14b7[17]](_0x14b7[16],_0xd42bxf,_0xd42bx14[_0x14b7[17]][_0x14b7[25]]);return _0xd42bx11(_0xd42bx14[_0x14b7[17]][_0x14b7[25]])}else {logger[_0x14b7[20]](_0x14b7[16],_0xd42bxf,_0x14b7[19]);_0xd42bx11(_0xd42bx14[_0x14b7[26]][_0x14b7[25]])}})[_0x14b7[18]](function(_0xd42bx13){logger[_0x14b7[17]](_0x14b7[16],_0xd42bxf,_0xd42bx13);_0xd42bx12(_0xd42bx13)})})}
\ No newline at end of file
index b0160c9..79b7993 100644 (file)
@@ -1 +1 @@
-var _0x3b10=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x3b10[0];var multer=require(_0x3b10[1]);var util=require(_0x3b10[2]);var path=require(_0x3b10[3]);var express=require(_0x3b10[4]);var router=express.Router();var auth=require(_0x3b10[5]);var interaction=require(_0x3b10[6]);var config=require(_0x3b10[7]);var controller=require(_0x3b10[8]);router[_0x3b10[12]](_0x3b10[9],auth[_0x3b10[10]](),controller[_0x3b10[11]]);router[_0x3b10[12]](_0x3b10[13],auth[_0x3b10[10]](),controller[_0x3b10[14]]);router[_0x3b10[12]](_0x3b10[15],auth[_0x3b10[10]](),controller[_0x3b10[16]]);router[_0x3b10[18]](_0x3b10[9],auth[_0x3b10[10]](),controller[_0x3b10[17]]);router[_0x3b10[20]](_0x3b10[15],auth[_0x3b10[10]](),controller[_0x3b10[19]]);router[_0x3b10[22]](_0x3b10[15],auth[_0x3b10[10]](),controller[_0x3b10[21]]);module[_0x3b10[23]]= router
\ No newline at end of file
+var _0x2e12=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2e12[0];var multer=require(_0x2e12[1]);var util=require(_0x2e12[2]);var path=require(_0x2e12[3]);var express=require(_0x2e12[4]);var router=express.Router();var auth=require(_0x2e12[5]);var interaction=require(_0x2e12[6]);var config=require(_0x2e12[7]);var controller=require(_0x2e12[8]);router[_0x2e12[12]](_0x2e12[9],auth[_0x2e12[10]](),controller[_0x2e12[11]]);router[_0x2e12[12]](_0x2e12[13],auth[_0x2e12[10]](),controller[_0x2e12[14]]);router[_0x2e12[12]](_0x2e12[15],auth[_0x2e12[10]](),controller[_0x2e12[16]]);router[_0x2e12[18]](_0x2e12[9],auth[_0x2e12[10]](),controller[_0x2e12[17]]);router[_0x2e12[20]](_0x2e12[15],auth[_0x2e12[10]](),controller[_0x2e12[19]]);router[_0x2e12[22]](_0x2e12[15],auth[_0x2e12[10]](),controller[_0x2e12[21]]);module[_0x2e12[23]]= router
\ No newline at end of file
index fdefbbc..c5c9174 100644 (file)
@@ -1 +1 @@
-var _0x69aa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x44\x41\x54\x45","\x42\x4F\x4F\x4C\x45\x41\x4E","\x54\x45\x58\x54","\x53\x45\x4E\x54","\x53\x45\x4E\x44\x49\x4E\x47","\x52\x45\x43\x45\x49\x56\x45\x44","\x46\x41\x49\x4C\x45\x44"];_0x69aa[0];var Sequelize=require(_0x69aa[1]);module[_0x69aa[2]]= {integration:{type:Sequelize[_0x69aa[3]]},eventChannel:{type:Sequelize[_0x69aa[3]]},exitStatus:{type:Sequelize[_0x69aa[3]]},ticketId:{type:Sequelize[_0x69aa[3]]},integrationId:{type:Sequelize[_0x69aa[4]]},contacts:{type:Sequelize[_0x69aa[3]]},uniqueid:{type:Sequelize[_0x69aa[3]]},calleridnum:{type:Sequelize[_0x69aa[3]]},calleridname:{type:Sequelize[_0x69aa[3]]},queue:{type:Sequelize[_0x69aa[3]]},interface:{type:Sequelize[_0x69aa[3]]},membername:{type:Sequelize[_0x69aa[3]]},agentcalledAt:{type:Sequelize[_0x69aa[5]]},agentconnectAt:{type:Sequelize[_0x69aa[5]]},holdtime:{type:Sequelize[_0x69aa[4]]},agentcomplete:{type:Sequelize[_0x69aa[6]],defaultValue:false},agentcompleteAt:{type:Sequelize[_0x69aa[5]]},talktime:{type:Sequelize[_0x69aa[4]]},agentacw:{type:Sequelize[_0x69aa[6]],defaultValue:false},acwtime:{type:Sequelize[_0x69aa[4]]},reason:{type:Sequelize[_0x69aa[3]]},agentringnoanswer:{type:Sequelize[_0x69aa[6]],defaultValue:false},agentringnoanswerAt:{type:Sequelize[_0x69aa[5]]},agentdump:{type:Sequelize[_0x69aa[6]],defaultValue:false},agentdumpAt:{type:Sequelize[_0x69aa[5]]},lastevent:{type:Sequelize[_0x69aa[3]]},channel:{type:Sequelize[_0x69aa[3]]},channelstate:{type:Sequelize[_0x69aa[4]]},channelstatedesc:{type:Sequelize[_0x69aa[3]]},connectedlinenum:{type:Sequelize[_0x69aa[3]]},connectedlinename:{type:Sequelize[_0x69aa[3]]},language:{type:Sequelize[_0x69aa[3]]},accountcode:{type:Sequelize[_0x69aa[3]]},context:{type:Sequelize[_0x69aa[3]]},exten:{type:Sequelize[_0x69aa[3]]},priority:{type:Sequelize[_0x69aa[3]]},destchannel:{type:Sequelize[_0x69aa[3]]},destchannelstate:{type:Sequelize[_0x69aa[4]]},destchannelstatedesc:{type:Sequelize[_0x69aa[3]]},destcalleridnum:{type:Sequelize[_0x69aa[3]]},destcalleridname:{type:Sequelize[_0x69aa[3]]},destconnectedlinenum:{type:Sequelize[_0x69aa[3]]},destconnectedlinename:{type:Sequelize[_0x69aa[3]]},destlanguage:{type:Sequelize[_0x69aa[3]]},destaccountcode:{type:Sequelize[_0x69aa[3]]},destcontext:{type:Sequelize[_0x69aa[3]]},destexten:{type:Sequelize[_0x69aa[3]]},destpriority:{type:Sequelize[_0x69aa[3]]},destuniqueid:{type:Sequelize[_0x69aa[3]]},messageId:{type:Sequelize[_0x69aa[3]]},inReplyTo:{type:Sequelize[_0x69aa[3]]},subject:{type:Sequelize[_0x69aa[3]]},from:{type:Sequelize[_0x69aa[3]]},to:{type:Sequelize[_0x69aa[3]]},cc:{type:Sequelize[_0x69aa[3]]},attachment:{type:Sequelize[_0x69aa[7]]},html:{type:Sequelize[_0x69aa[7]]},text:{type:Sequelize[_0x69aa[7]]},status:{type:Sequelize.ENUM(_0x69aa[8],_0x69aa[9],_0x69aa[10],_0x69aa[11])},url:{type:Sequelize[_0x69aa[3]]},app:{type:Sequelize[_0x69aa[3]]},appdata:{type:Sequelize[_0x69aa[3]]},projectId:{type:Sequelize[_0x69aa[4]]}}
\ No newline at end of file
+var _0x5908=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x44\x41\x54\x45","\x42\x4F\x4F\x4C\x45\x41\x4E","\x54\x45\x58\x54","\x53\x45\x4E\x54","\x53\x45\x4E\x44\x49\x4E\x47","\x52\x45\x43\x45\x49\x56\x45\x44","\x46\x41\x49\x4C\x45\x44"];_0x5908[0];var Sequelize=require(_0x5908[1]);module[_0x5908[2]]= {integration:{type:Sequelize[_0x5908[3]]},eventChannel:{type:Sequelize[_0x5908[3]]},exitStatus:{type:Sequelize[_0x5908[3]]},ticketId:{type:Sequelize[_0x5908[3]]},integrationId:{type:Sequelize[_0x5908[4]]},contacts:{type:Sequelize[_0x5908[3]]},uniqueid:{type:Sequelize[_0x5908[3]]},calleridnum:{type:Sequelize[_0x5908[3]]},calleridname:{type:Sequelize[_0x5908[3]]},queue:{type:Sequelize[_0x5908[3]]},interface:{type:Sequelize[_0x5908[3]]},membername:{type:Sequelize[_0x5908[3]]},agentcalledAt:{type:Sequelize[_0x5908[5]]},agentconnectAt:{type:Sequelize[_0x5908[5]]},holdtime:{type:Sequelize[_0x5908[4]]},agentcomplete:{type:Sequelize[_0x5908[6]],defaultValue:false},agentcompleteAt:{type:Sequelize[_0x5908[5]]},talktime:{type:Sequelize[_0x5908[4]]},agentacw:{type:Sequelize[_0x5908[6]],defaultValue:false},acwtime:{type:Sequelize[_0x5908[4]]},reason:{type:Sequelize[_0x5908[3]]},agentringnoanswer:{type:Sequelize[_0x5908[6]],defaultValue:false},agentringnoanswerAt:{type:Sequelize[_0x5908[5]]},agentdump:{type:Sequelize[_0x5908[6]],defaultValue:false},agentdumpAt:{type:Sequelize[_0x5908[5]]},lastevent:{type:Sequelize[_0x5908[3]]},channel:{type:Sequelize[_0x5908[3]]},channelstate:{type:Sequelize[_0x5908[4]]},channelstatedesc:{type:Sequelize[_0x5908[3]]},connectedlinenum:{type:Sequelize[_0x5908[3]]},connectedlinename:{type:Sequelize[_0x5908[3]]},language:{type:Sequelize[_0x5908[3]]},accountcode:{type:Sequelize[_0x5908[3]]},context:{type:Sequelize[_0x5908[3]]},exten:{type:Sequelize[_0x5908[3]]},priority:{type:Sequelize[_0x5908[3]]},destchannel:{type:Sequelize[_0x5908[3]]},destchannelstate:{type:Sequelize[_0x5908[4]]},destchannelstatedesc:{type:Sequelize[_0x5908[3]]},destcalleridnum:{type:Sequelize[_0x5908[3]]},destcalleridname:{type:Sequelize[_0x5908[3]]},destconnectedlinenum:{type:Sequelize[_0x5908[3]]},destconnectedlinename:{type:Sequelize[_0x5908[3]]},destlanguage:{type:Sequelize[_0x5908[3]]},destaccountcode:{type:Sequelize[_0x5908[3]]},destcontext:{type:Sequelize[_0x5908[3]]},destexten:{type:Sequelize[_0x5908[3]]},destpriority:{type:Sequelize[_0x5908[3]]},destuniqueid:{type:Sequelize[_0x5908[3]]},messageId:{type:Sequelize[_0x5908[3]]},inReplyTo:{type:Sequelize[_0x5908[3]]},subject:{type:Sequelize[_0x5908[3]]},from:{type:Sequelize[_0x5908[3]]},to:{type:Sequelize[_0x5908[3]]},cc:{type:Sequelize[_0x5908[3]]},attachment:{type:Sequelize[_0x5908[7]]},html:{type:Sequelize[_0x5908[7]]},text:{type:Sequelize[_0x5908[7]]},status:{type:Sequelize.ENUM(_0x5908[8],_0x5908[9],_0x5908[10],_0x5908[11])},url:{type:Sequelize[_0x5908[3]]},app:{type:Sequelize[_0x5908[3]]},appdata:{type:Sequelize[_0x5908[3]]},projectId:{type:Sequelize[_0x5908[4]]}}
\ No newline at end of file
index f8d4b79..696a574 100644 (file)
@@ -1 +1 @@
-var _0x7329=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x7329[0];var jsonpatch=require(_0x7329[1]);var rp=require(_0x7329[2]);var moment=require(_0x7329[3]);var BPromise=require(_0x7329[4]);var Mustache=require(_0x7329[5]);var util=require(_0x7329[6]);var path=require(_0x7329[7]);var sox=require(_0x7329[8]);var csv=require(_0x7329[9]);var ejs=require(_0x7329[10]);var fs=require(_0x7329[11]);var _=require(_0x7329[12]);var squel=require(_0x7329[13]);var crypto=require(_0x7329[14]);var jsforce=require(_0x7329[15]);var deskjs=require(_0x7329[16]);var toCsv=require(_0x7329[9]);var querystring=require(_0x7329[17]);var Papa=require(_0x7329[18]);var qs=require(_0x7329[19]);var logger=require(_0x7329[21])(_0x7329[20]);var utils=require(_0x7329[22]);var config=require(_0x7329[23]);var db=require(_0x7329[25])[_0x7329[24]];function respondWithStatusCode(_0x97a5x1a,_0x97a5x1b){_0x97a5x1b= _0x97a5x1b|| 204;return function(_0x97a5x1c){if(_0x97a5x1c){return _0x97a5x1a[_0x7329[26]](_0x97a5x1b)};return _0x97a5x1a[_0x7329[28]](_0x97a5x1b)[_0x7329[27]]()}}function respondWithResult(_0x97a5x1a,_0x97a5x1b){_0x97a5x1b= _0x97a5x1b|| 200;return function(_0x97a5x1c){if(_0x97a5x1c){return _0x97a5x1a[_0x7329[28]](_0x97a5x1b)[_0x7329[29]](_0x97a5x1c)}}}function respondWithFilteredResult(_0x97a5x1a,_0x97a5x1f){return function(_0x97a5x1c){if(_0x97a5x1c){var _0x97a5x20=_0x97a5x1c[_0x7329[30]],_0x97a5x21=_0x97a5x1f[_0x7329[31]],_0x97a5x22=_0x97a5x1f[_0x7329[31]]+ _0x97a5x1f[_0x7329[32]],_0x97a5x1b;if(_0x97a5x22>= _0x97a5x20){_0x97a5x22= _0x97a5x20;_0x97a5x1b= 200}else {_0x97a5x1b= 206};_0x97a5x1a[_0x7329[28]](_0x97a5x1b);return _0x97a5x1a[_0x7329[36]](_0x7329[33],_0x97a5x21+ _0x7329[34]+ _0x97a5x22+ _0x7329[35]+ _0x97a5x20)[_0x7329[29]](_0x97a5x1c)};return null}}function patchUpdates(_0x97a5x24){return function(_0x97a5x1c){try{jsonpatch[_0x7329[37]](_0x97a5x1c,_0x97a5x24,true)}catch(err){return BPromise[_0x7329[38]](err)};return _0x97a5x1c[_0x7329[39]]()}}function saveUpdates(_0x97a5x26,_0x97a5x1b){return function(_0x97a5x1c){if(_0x97a5x1c){return _0x97a5x1c[_0x7329[41]](_0x97a5x26)[_0x7329[40]](function(_0x97a5x27){return _0x97a5x27})};return null}}function removeEntity(_0x97a5x1a,_0x97a5x1b){return function(_0x97a5x1c){if(_0x97a5x1c){return _0x97a5x1c[_0x7329[42]]()[_0x7329[40]](function(){_0x97a5x1a[_0x7329[28]](204)[_0x7329[27]]()})}}}function handleEntityNotFound(_0x97a5x1a,_0x97a5x1b){return function(_0x97a5x1c){if(!_0x97a5x1c){_0x97a5x1a[_0x7329[26]](404)};return _0x97a5x1c}}function handleError(_0x97a5x1a,_0x97a5x1b){_0x97a5x1b= _0x97a5x1b|| 500;return function(_0x97a5x2b){logger[_0x7329[44]](_0x97a5x2b[_0x7329[43]]);if(_0x97a5x2b[_0x7329[45]]){delete _0x97a5x2b[_0x7329[45]]};_0x97a5x1a[_0x7329[28]](_0x97a5x1b)[_0x7329[46]](_0x97a5x2b)}}exports[_0x7329[47]]= function(_0x97a5x2c,_0x97a5x1a){var _0x97a5x1f={},_0x97a5x2d={},_0x97a5x2e={count:0,rows:[]};_0x97a5x2d[_0x7329[48]]= _[_0x7329[51]](db[_0x7329[50]][_0x7329[49]]);var _0x97a5x2f={dateStart:_0x97a5x2c[_0x7329[53]][_0x7329[52]],dateEnd:_0x97a5x2c[_0x7329[53]][_0x7329[54]]};delete _0x97a5x2c[_0x7329[53]][_0x7329[52]];delete _0x97a5x2c[_0x7329[53]][_0x7329[54]];_0x97a5x2d[_0x7329[53]]= _[_0x7329[51]](_0x97a5x2c[_0x7329[53]]);_0x97a5x2d[_0x7329[55]]= _[_0x7329[56]](_0x97a5x2d[_0x7329[48]],_0x97a5x2d[_0x7329[53]]);_0x97a5x1f[_0x7329[57]]= _[_0x7329[56]](_0x97a5x2d[_0x7329[48]],qs[_0x7329[58]](_0x97a5x2c[_0x7329[53]][_0x7329[58]]));_0x97a5x1f[_0x7329[57]]= (_0x97a5x1f[_0x7329[57]][_0x7329[59]])?_0x97a5x1f[_0x7329[57]]:_0x97a5x2d[_0x7329[48]];if(!_0x97a5x2c[_0x7329[53]][_0x7329[61]](_0x7329[60])){_0x97a5x1f[_0x7329[32]]= qs[_0x7329[32]](_0x97a5x2c[_0x7329[53]][_0x7329[32]]);_0x97a5x1f[_0x7329[31]]= qs[_0x7329[31]](_0x97a5x2c[_0x7329[53]][_0x7329[31]])};_0x97a5x1f[_0x7329[62]]= qs[_0x7329[63]](_0x97a5x2c[_0x7329[53]][_0x7329[63]]);_0x97a5x1f[_0x7329[64]]= qs[_0x7329[55]](_[_0x7329[65]](_0x97a5x2c[_0x7329[53]],_0x97a5x2d[_0x7329[55]]));if(_0x97a5x2f[_0x7329[52]]){if(_0x97a5x2f[_0x7329[54]]){_0x97a5x2f[_0x7329[54]]= moment(_0x97a5x2f[_0x7329[54]])[_0x7329[67]](1,_0x7329[66])}else {_0x97a5x2f[_0x7329[54]]= moment(_0x97a5x2f[_0x7329[52]])[_0x7329[67]](1,_0x7329[66])};_[_0x7329[68]](_0x97a5x1f[_0x7329[64]],{createdAt:{$gte:_0x97a5x2f[_0x7329[52]],$lte:_0x97a5x2f[_0x7329[54]]}})};if(_0x97a5x2c[_0x7329[53]][_0x7329[69]]){_0x97a5x1f[_0x7329[64]]= _[_0x7329[68]](_0x97a5x1f[_0x7329[64]],{$or:_[_0x7329[71]](_0x97a5x1f[_0x7329[57]],function(_0x97a5x30){var _0x97a5x2e={};_0x97a5x2e[_0x97a5x30]= {$like:_0x7329[70]+ _0x97a5x2c[_0x7329[53]][_0x7329[69]]+ _0x7329[70]};return _0x97a5x2e})})};_0x97a5x1f= _[_0x7329[68]]({},_0x97a5x1f,_0x97a5x2c[_0x7329[72]]);var _0x97a5x31={where:_0x97a5x1f[_0x7329[64]]};return db[_0x7329[50]][_0x7329[30]](_0x97a5x31)[_0x7329[40]](function(_0x97a5x20){_0x97a5x2e[_0x7329[30]]= _0x97a5x20;if(_0x97a5x2c[_0x7329[53]][_0x7329[75]]){_0x97a5x1f[_0x7329[76]]= [{all:true}]};return db[_0x7329[50]][_0x7329[77]](_0x97a5x1f)})[_0x7329[40]](function(_0x97a5x32){_0x97a5x2e[_0x7329[74]]= _0x97a5x32;return _0x97a5x2e})[_0x7329[40]](respondWithFilteredResult(_0x97a5x1a,_0x97a5x1f))[_0x7329[73]](handleError(_0x97a5x1a,null))};exports[_0x7329[78]]= function(_0x97a5x2c,_0x97a5x1a){var _0x97a5x1f={raw:false,where:{id:_0x97a5x2c[_0x7329[80]][_0x7329[79]]}},_0x97a5x2d={};_0x97a5x2d[_0x7329[48]]= _[_0x7329[51]](db[_0x7329[50]][_0x7329[49]]);_0x97a5x2d[_0x7329[53]]= _[_0x7329[51]](_0x97a5x2c[_0x7329[53]]);_0x97a5x2d[_0x7329[55]]= _[_0x7329[56]](_0x97a5x2d[_0x7329[48]],_0x97a5x2d[_0x7329[53]]);_0x97a5x1f[_0x7329[57]]= _[_0x7329[56]](_0x97a5x2d[_0x7329[48]],qs[_0x7329[58]](_0x97a5x2c[_0x7329[53]][_0x7329[58]]));_0x97a5x1f[_0x7329[57]]= (_0x97a5x1f[_0x7329[57]][_0x7329[59]])?_0x97a5x1f[_0x7329[57]]:_0x97a5x2d[_0x7329[48]];if(_0x97a5x2c[_0x7329[53]][_0x7329[75]]){_0x97a5x1f[_0x7329[76]]= [{all:true}]};_0x97a5x1f= _[_0x7329[68]]({},_0x97a5x1f,_0x97a5x2c[_0x7329[72]]);return db[_0x7329[50]][_0x7329[81]](_0x97a5x1f)[_0x7329[40]](handleEntityNotFound(_0x97a5x1a,null))[_0x7329[40]](respondWithResult(_0x97a5x1a,null))[_0x7329[73]](handleError(_0x97a5x1a,null))};exports[_0x7329[82]]= function(_0x97a5x2c,_0x97a5x1a){return db[_0x7329[50]][_0x7329[82]](_0x97a5x2c[_0x7329[83]],{})[_0x7329[40]](respondWithResult(_0x97a5x1a,201))[_0x7329[73]](handleError(_0x97a5x1a,null))};exports[_0x7329[41]]= function(_0x97a5x2c,_0x97a5x1a){if(_0x97a5x2c[_0x7329[83]][_0x7329[79]]){delete _0x97a5x2c[_0x7329[83]][_0x7329[79]]};return db[_0x7329[50]][_0x7329[81]]({where:{id:_0x97a5x2c[_0x7329[80]][_0x7329[79]]}})[_0x7329[40]](handleEntityNotFound(_0x97a5x1a,null))[_0x7329[40]](saveUpdates(_0x97a5x2c[_0x7329[83]],null))[_0x7329[40]](respondWithResult(_0x97a5x1a,null))[_0x7329[73]](handleError(_0x97a5x1a,null))};exports[_0x7329[42]]= function(_0x97a5x2c,_0x97a5x1a){return db[_0x7329[50]][_0x7329[81]]({where:{id:_0x97a5x2c[_0x7329[80]][_0x7329[79]]}})[_0x7329[40]](handleEntityNotFound(_0x97a5x1a,null))[_0x7329[40]](removeEntity(_0x97a5x1a,null))[_0x7329[73]](handleError(_0x97a5x1a,null))};exports[_0x7329[84]]= function(_0x97a5x2c,_0x97a5x1a){return db[_0x7329[50]][_0x7329[84]]()[_0x7329[40]](respondWithResult(_0x97a5x1a,null))[_0x7329[73]](handleError(_0x97a5x1a,null))}
\ No newline at end of file
+var _0xb1f3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xb1f3[0];var jsonpatch=require(_0xb1f3[1]);var rp=require(_0xb1f3[2]);var moment=require(_0xb1f3[3]);var BPromise=require(_0xb1f3[4]);var Mustache=require(_0xb1f3[5]);var util=require(_0xb1f3[6]);var path=require(_0xb1f3[7]);var sox=require(_0xb1f3[8]);var csv=require(_0xb1f3[9]);var ejs=require(_0xb1f3[10]);var fs=require(_0xb1f3[11]);var _=require(_0xb1f3[12]);var squel=require(_0xb1f3[13]);var crypto=require(_0xb1f3[14]);var jsforce=require(_0xb1f3[15]);var deskjs=require(_0xb1f3[16]);var toCsv=require(_0xb1f3[9]);var querystring=require(_0xb1f3[17]);var Papa=require(_0xb1f3[18]);var qs=require(_0xb1f3[19]);var logger=require(_0xb1f3[21])(_0xb1f3[20]);var utils=require(_0xb1f3[22]);var config=require(_0xb1f3[23]);var db=require(_0xb1f3[25])[_0xb1f3[24]];function respondWithStatusCode(_0xc9e8x1a,_0xc9e8x1b){_0xc9e8x1b= _0xc9e8x1b|| 204;return function(_0xc9e8x1c){if(_0xc9e8x1c){return _0xc9e8x1a[_0xb1f3[26]](_0xc9e8x1b)};return _0xc9e8x1a[_0xb1f3[28]](_0xc9e8x1b)[_0xb1f3[27]]()}}function respondWithResult(_0xc9e8x1a,_0xc9e8x1b){_0xc9e8x1b= _0xc9e8x1b|| 200;return function(_0xc9e8x1c){if(_0xc9e8x1c){return _0xc9e8x1a[_0xb1f3[28]](_0xc9e8x1b)[_0xb1f3[29]](_0xc9e8x1c)}}}function respondWithFilteredResult(_0xc9e8x1a,_0xc9e8x1f){return function(_0xc9e8x1c){if(_0xc9e8x1c){var _0xc9e8x20=_0xc9e8x1c[_0xb1f3[30]],_0xc9e8x21=_0xc9e8x1f[_0xb1f3[31]],_0xc9e8x22=_0xc9e8x1f[_0xb1f3[31]]+ _0xc9e8x1f[_0xb1f3[32]],_0xc9e8x1b;if(_0xc9e8x22>= _0xc9e8x20){_0xc9e8x22= _0xc9e8x20;_0xc9e8x1b= 200}else {_0xc9e8x1b= 206};_0xc9e8x1a[_0xb1f3[28]](_0xc9e8x1b);return _0xc9e8x1a[_0xb1f3[36]](_0xb1f3[33],_0xc9e8x21+ _0xb1f3[34]+ _0xc9e8x22+ _0xb1f3[35]+ _0xc9e8x20)[_0xb1f3[29]](_0xc9e8x1c)};return null}}function patchUpdates(_0xc9e8x24){return function(_0xc9e8x1c){try{jsonpatch[_0xb1f3[37]](_0xc9e8x1c,_0xc9e8x24,true)}catch(err){return BPromise[_0xb1f3[38]](err)};return _0xc9e8x1c[_0xb1f3[39]]()}}function saveUpdates(_0xc9e8x26,_0xc9e8x1b){return function(_0xc9e8x1c){if(_0xc9e8x1c){return _0xc9e8x1c[_0xb1f3[41]](_0xc9e8x26)[_0xb1f3[40]](function(_0xc9e8x27){return _0xc9e8x27})};return null}}function removeEntity(_0xc9e8x1a,_0xc9e8x1b){return function(_0xc9e8x1c){if(_0xc9e8x1c){return _0xc9e8x1c[_0xb1f3[42]]()[_0xb1f3[40]](function(){_0xc9e8x1a[_0xb1f3[28]](204)[_0xb1f3[27]]()})}}}function handleEntityNotFound(_0xc9e8x1a,_0xc9e8x1b){return function(_0xc9e8x1c){if(!_0xc9e8x1c){_0xc9e8x1a[_0xb1f3[26]](404)};return _0xc9e8x1c}}function handleError(_0xc9e8x1a,_0xc9e8x1b){_0xc9e8x1b= _0xc9e8x1b|| 500;return function(_0xc9e8x2b){logger[_0xb1f3[44]](_0xc9e8x2b[_0xb1f3[43]]);if(_0xc9e8x2b[_0xb1f3[45]]){delete _0xc9e8x2b[_0xb1f3[45]]};_0xc9e8x1a[_0xb1f3[28]](_0xc9e8x1b)[_0xb1f3[46]](_0xc9e8x2b)}}exports[_0xb1f3[47]]= function(_0xc9e8x2c,_0xc9e8x1a){var _0xc9e8x1f={},_0xc9e8x2d={},_0xc9e8x2e={count:0,rows:[]};_0xc9e8x2d[_0xb1f3[48]]= _[_0xb1f3[51]](db[_0xb1f3[50]][_0xb1f3[49]]);var _0xc9e8x2f={dateStart:_0xc9e8x2c[_0xb1f3[53]][_0xb1f3[52]],dateEnd:_0xc9e8x2c[_0xb1f3[53]][_0xb1f3[54]]};delete _0xc9e8x2c[_0xb1f3[53]][_0xb1f3[52]];delete _0xc9e8x2c[_0xb1f3[53]][_0xb1f3[54]];_0xc9e8x2d[_0xb1f3[53]]= _[_0xb1f3[51]](_0xc9e8x2c[_0xb1f3[53]]);_0xc9e8x2d[_0xb1f3[55]]= _[_0xb1f3[56]](_0xc9e8x2d[_0xb1f3[48]],_0xc9e8x2d[_0xb1f3[53]]);_0xc9e8x1f[_0xb1f3[57]]= _[_0xb1f3[56]](_0xc9e8x2d[_0xb1f3[48]],qs[_0xb1f3[58]](_0xc9e8x2c[_0xb1f3[53]][_0xb1f3[58]]));_0xc9e8x1f[_0xb1f3[57]]= (_0xc9e8x1f[_0xb1f3[57]][_0xb1f3[59]])?_0xc9e8x1f[_0xb1f3[57]]:_0xc9e8x2d[_0xb1f3[48]];if(!_0xc9e8x2c[_0xb1f3[53]][_0xb1f3[61]](_0xb1f3[60])){_0xc9e8x1f[_0xb1f3[32]]= qs[_0xb1f3[32]](_0xc9e8x2c[_0xb1f3[53]][_0xb1f3[32]]);_0xc9e8x1f[_0xb1f3[31]]= qs[_0xb1f3[31]](_0xc9e8x2c[_0xb1f3[53]][_0xb1f3[31]])};_0xc9e8x1f[_0xb1f3[62]]= qs[_0xb1f3[63]](_0xc9e8x2c[_0xb1f3[53]][_0xb1f3[63]]);_0xc9e8x1f[_0xb1f3[64]]= qs[_0xb1f3[55]](_[_0xb1f3[65]](_0xc9e8x2c[_0xb1f3[53]],_0xc9e8x2d[_0xb1f3[55]]));if(_0xc9e8x2f[_0xb1f3[52]]){if(_0xc9e8x2f[_0xb1f3[54]]){_0xc9e8x2f[_0xb1f3[54]]= moment(_0xc9e8x2f[_0xb1f3[54]])[_0xb1f3[67]](1,_0xb1f3[66])}else {_0xc9e8x2f[_0xb1f3[54]]= moment(_0xc9e8x2f[_0xb1f3[52]])[_0xb1f3[67]](1,_0xb1f3[66])};_[_0xb1f3[68]](_0xc9e8x1f[_0xb1f3[64]],{createdAt:{$gte:_0xc9e8x2f[_0xb1f3[52]],$lte:_0xc9e8x2f[_0xb1f3[54]]}})};if(_0xc9e8x2c[_0xb1f3[53]][_0xb1f3[69]]){_0xc9e8x1f[_0xb1f3[64]]= _[_0xb1f3[68]](_0xc9e8x1f[_0xb1f3[64]],{$or:_[_0xb1f3[71]](_0xc9e8x1f[_0xb1f3[57]],function(_0xc9e8x30){var _0xc9e8x2e={};_0xc9e8x2e[_0xc9e8x30]= {$like:_0xb1f3[70]+ _0xc9e8x2c[_0xb1f3[53]][_0xb1f3[69]]+ _0xb1f3[70]};return _0xc9e8x2e})})};_0xc9e8x1f= _[_0xb1f3[68]]({},_0xc9e8x1f,_0xc9e8x2c[_0xb1f3[72]]);var _0xc9e8x31={where:_0xc9e8x1f[_0xb1f3[64]]};return db[_0xb1f3[50]][_0xb1f3[30]](_0xc9e8x31)[_0xb1f3[40]](function(_0xc9e8x20){_0xc9e8x2e[_0xb1f3[30]]= _0xc9e8x20;if(_0xc9e8x2c[_0xb1f3[53]][_0xb1f3[75]]){_0xc9e8x1f[_0xb1f3[76]]= [{all:true}]};return db[_0xb1f3[50]][_0xb1f3[77]](_0xc9e8x1f)})[_0xb1f3[40]](function(_0xc9e8x32){_0xc9e8x2e[_0xb1f3[74]]= _0xc9e8x32;return _0xc9e8x2e})[_0xb1f3[40]](respondWithFilteredResult(_0xc9e8x1a,_0xc9e8x1f))[_0xb1f3[73]](handleError(_0xc9e8x1a,null))};exports[_0xb1f3[78]]= function(_0xc9e8x2c,_0xc9e8x1a){var _0xc9e8x1f={raw:false,where:{id:_0xc9e8x2c[_0xb1f3[80]][_0xb1f3[79]]}},_0xc9e8x2d={};_0xc9e8x2d[_0xb1f3[48]]= _[_0xb1f3[51]](db[_0xb1f3[50]][_0xb1f3[49]]);_0xc9e8x2d[_0xb1f3[53]]= _[_0xb1f3[51]](_0xc9e8x2c[_0xb1f3[53]]);_0xc9e8x2d[_0xb1f3[55]]= _[_0xb1f3[56]](_0xc9e8x2d[_0xb1f3[48]],_0xc9e8x2d[_0xb1f3[53]]);_0xc9e8x1f[_0xb1f3[57]]= _[_0xb1f3[56]](_0xc9e8x2d[_0xb1f3[48]],qs[_0xb1f3[58]](_0xc9e8x2c[_0xb1f3[53]][_0xb1f3[58]]));_0xc9e8x1f[_0xb1f3[57]]= (_0xc9e8x1f[_0xb1f3[57]][_0xb1f3[59]])?_0xc9e8x1f[_0xb1f3[57]]:_0xc9e8x2d[_0xb1f3[48]];if(_0xc9e8x2c[_0xb1f3[53]][_0xb1f3[75]]){_0xc9e8x1f[_0xb1f3[76]]= [{all:true}]};_0xc9e8x1f= _[_0xb1f3[68]]({},_0xc9e8x1f,_0xc9e8x2c[_0xb1f3[72]]);return db[_0xb1f3[50]][_0xb1f3[81]](_0xc9e8x1f)[_0xb1f3[40]](handleEntityNotFound(_0xc9e8x1a,null))[_0xb1f3[40]](respondWithResult(_0xc9e8x1a,null))[_0xb1f3[73]](handleError(_0xc9e8x1a,null))};exports[_0xb1f3[82]]= function(_0xc9e8x2c,_0xc9e8x1a){return db[_0xb1f3[50]][_0xb1f3[82]](_0xc9e8x2c[_0xb1f3[83]],{})[_0xb1f3[40]](respondWithResult(_0xc9e8x1a,201))[_0xb1f3[73]](handleError(_0xc9e8x1a,null))};exports[_0xb1f3[41]]= function(_0xc9e8x2c,_0xc9e8x1a){if(_0xc9e8x2c[_0xb1f3[83]][_0xb1f3[79]]){delete _0xc9e8x2c[_0xb1f3[83]][_0xb1f3[79]]};return db[_0xb1f3[50]][_0xb1f3[81]]({where:{id:_0xc9e8x2c[_0xb1f3[80]][_0xb1f3[79]]}})[_0xb1f3[40]](handleEntityNotFound(_0xc9e8x1a,null))[_0xb1f3[40]](saveUpdates(_0xc9e8x2c[_0xb1f3[83]],null))[_0xb1f3[40]](respondWithResult(_0xc9e8x1a,null))[_0xb1f3[73]](handleError(_0xc9e8x1a,null))};exports[_0xb1f3[42]]= function(_0xc9e8x2c,_0xc9e8x1a){return db[_0xb1f3[50]][_0xb1f3[81]]({where:{id:_0xc9e8x2c[_0xb1f3[80]][_0xb1f3[79]]}})[_0xb1f3[40]](handleEntityNotFound(_0xc9e8x1a,null))[_0xb1f3[40]](removeEntity(_0xc9e8x1a,null))[_0xb1f3[73]](handleError(_0xc9e8x1a,null))};exports[_0xb1f3[84]]= function(_0xc9e8x2c,_0xc9e8x1a){return db[_0xb1f3[50]][_0xb1f3[84]]()[_0xb1f3[40]](respondWithResult(_0xc9e8x1a,null))[_0xb1f3[73]](handleError(_0xc9e8x1a,null))}
\ No newline at end of file
index c9f3c9b..8bbba4b 100644 (file)
@@ -1 +1 @@
-var _0xe8a4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x64\x65\x66\x69\x6E\x65"];_0xe8a4[0];var _=require(_0xe8a4[1]);var util=require(_0xe8a4[2]);var logger=require(_0xe8a4[4])(_0xe8a4[3]);var moment=require(_0xe8a4[5]);var BPromise=require(_0xe8a4[6]);var rp=require(_0xe8a4[7]);var attributes=require(_0xe8a4[8]);module[_0xe8a4[9]]= function(_0x19e8x8,_0x19e8x9){return _0x19e8x8[_0xe8a4[12]](_0xe8a4[10],attributes,{tableName:_0xe8a4[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x41fb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x64\x65\x66\x69\x6E\x65"];_0x41fb[0];var _=require(_0x41fb[1]);var util=require(_0x41fb[2]);var logger=require(_0x41fb[4])(_0x41fb[3]);var moment=require(_0x41fb[5]);var BPromise=require(_0x41fb[6]);var rp=require(_0x41fb[7]);var attributes=require(_0x41fb[8]);module[_0x41fb[9]]= function(_0xc482x8,_0xc482x9){return _0xc482x8[_0x41fb[12]](_0x41fb[10],attributes,{tableName:_0x41fb[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 36fa1a8..238a567 100644 (file)
@@ -1 +1 @@
-var _0x611e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x611e[0];var _=require(_0x611e[1]);var util=require(_0x611e[2]);var moment=require(_0x611e[3]);var BPromise=require(_0x611e[4]);var rs=require(_0x611e[5]);var fs=require(_0x611e[6]);var db=require(_0x611e[8])[_0x611e[7]];var utils=require(_0x611e[9]);var logger=require(_0x611e[11])(_0x611e[10]);var config=require(_0x611e[12]);var jayson=require(_0x611e[13]);var client=jayson[_0x611e[15]][_0x611e[14]]({port:9002});function respondWithRpcPromise(_0x81e3xe,_0x81e3xf,_0x81e3x10){return  new BPromise(function(_0x81e3x11,_0x81e3x12){return client[_0x611e[28]](_0x81e3xe,_0x81e3x10)[_0x611e[27]](function(_0x81e3x14){logger[_0x611e[20]](_0x611e[16],_0x81e3xf,_0x611e[19]);logger[_0x611e[23]](_0x611e[21],_0x81e3xf,_0x611e[19],JSON[_0x611e[22]](_0x81e3x14));if(_0x81e3x14[_0x611e[17]]){if(_0x81e3x14[_0x611e[17]][_0x611e[24]]=== 500){logger[_0x611e[17]](_0x611e[16],_0x81e3xf,_0x81e3x14[_0x611e[17]][_0x611e[25]]);return _0x81e3x12(_0x81e3x14[_0x611e[17]][_0x611e[25]])};logger[_0x611e[17]](_0x611e[16],_0x81e3xf,_0x81e3x14[_0x611e[17]][_0x611e[25]]);return _0x81e3x11(_0x81e3x14[_0x611e[17]][_0x611e[25]])}else {logger[_0x611e[20]](_0x611e[16],_0x81e3xf,_0x611e[19]);_0x81e3x11(_0x81e3x14[_0x611e[26]][_0x611e[25]])}})[_0x611e[18]](function(_0x81e3x13){logger[_0x611e[17]](_0x611e[16],_0x81e3xf,_0x81e3x13);_0x81e3x12(_0x81e3x13)})})}
\ No newline at end of file
+var _0x69a3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x69a3[0];var _=require(_0x69a3[1]);var util=require(_0x69a3[2]);var moment=require(_0x69a3[3]);var BPromise=require(_0x69a3[4]);var rs=require(_0x69a3[5]);var fs=require(_0x69a3[6]);var db=require(_0x69a3[8])[_0x69a3[7]];var utils=require(_0x69a3[9]);var logger=require(_0x69a3[11])(_0x69a3[10]);var config=require(_0x69a3[12]);var jayson=require(_0x69a3[13]);var client=jayson[_0x69a3[15]][_0x69a3[14]]({port:9002});function respondWithRpcPromise(_0x7858xe,_0x7858xf,_0x7858x10){return  new BPromise(function(_0x7858x11,_0x7858x12){return client[_0x69a3[28]](_0x7858xe,_0x7858x10)[_0x69a3[27]](function(_0x7858x14){logger[_0x69a3[20]](_0x69a3[16],_0x7858xf,_0x69a3[19]);logger[_0x69a3[23]](_0x69a3[21],_0x7858xf,_0x69a3[19],JSON[_0x69a3[22]](_0x7858x14));if(_0x7858x14[_0x69a3[17]]){if(_0x7858x14[_0x69a3[17]][_0x69a3[24]]=== 500){logger[_0x69a3[17]](_0x69a3[16],_0x7858xf,_0x7858x14[_0x69a3[17]][_0x69a3[25]]);return _0x7858x12(_0x7858x14[_0x69a3[17]][_0x69a3[25]])};logger[_0x69a3[17]](_0x69a3[16],_0x7858xf,_0x7858x14[_0x69a3[17]][_0x69a3[25]]);return _0x7858x11(_0x7858x14[_0x69a3[17]][_0x69a3[25]])}else {logger[_0x69a3[20]](_0x69a3[16],_0x7858xf,_0x69a3[19]);_0x7858x11(_0x7858x14[_0x69a3[26]][_0x69a3[25]])}})[_0x69a3[18]](function(_0x7858x13){logger[_0x69a3[17]](_0x69a3[16],_0x7858xf,_0x7858x13);_0x7858x12(_0x7858x13)})})}
\ No newline at end of file
index 761c11a..be34edb 100644 (file)
@@ -1 +1 @@
-var _0x9f4b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x73\x75\x62\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x67\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2F\x3A\x69\x64\x2F\x73\x75\x62\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C\x73\x2F\x63\x72\x65\x61\x74\x65\x5F\x6D\x61\x6E\x79","\x61\x64\x64\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9f4b[0];var multer=require(_0x9f4b[1]);var util=require(_0x9f4b[2]);var path=require(_0x9f4b[3]);var express=require(_0x9f4b[4]);var router=express.Router();var auth=require(_0x9f4b[5]);var interaction=require(_0x9f4b[6]);var config=require(_0x9f4b[7]);var controller=require(_0x9f4b[8]);router[_0x9f4b[12]](_0x9f4b[9],auth[_0x9f4b[10]](),controller[_0x9f4b[11]]);router[_0x9f4b[12]](_0x9f4b[13],auth[_0x9f4b[10]](),controller[_0x9f4b[14]]);router[_0x9f4b[12]](_0x9f4b[15],auth[_0x9f4b[10]](),controller[_0x9f4b[16]]);router[_0x9f4b[18]](_0x9f4b[9],auth[_0x9f4b[10]](),controller[_0x9f4b[17]]);router[_0x9f4b[18]](_0x9f4b[15],auth[_0x9f4b[10]](),controller[_0x9f4b[19]]);router[_0x9f4b[18]](_0x9f4b[20],auth[_0x9f4b[10]](),controller[_0x9f4b[21]]);router[_0x9f4b[23]](_0x9f4b[13],auth[_0x9f4b[10]](),controller[_0x9f4b[22]]);router[_0x9f4b[25]](_0x9f4b[13],auth[_0x9f4b[10]](),controller[_0x9f4b[24]]);module[_0x9f4b[26]]= router
\ No newline at end of file
+var _0x9174=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x73\x75\x62\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x67\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2F\x3A\x69\x64\x2F\x73\x75\x62\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C\x73\x2F\x63\x72\x65\x61\x74\x65\x5F\x6D\x61\x6E\x79","\x61\x64\x64\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9174[0];var multer=require(_0x9174[1]);var util=require(_0x9174[2]);var path=require(_0x9174[3]);var express=require(_0x9174[4]);var router=express.Router();var auth=require(_0x9174[5]);var interaction=require(_0x9174[6]);var config=require(_0x9174[7]);var controller=require(_0x9174[8]);router[_0x9174[12]](_0x9174[9],auth[_0x9174[10]](),controller[_0x9174[11]]);router[_0x9174[12]](_0x9174[13],auth[_0x9174[10]](),controller[_0x9174[14]]);router[_0x9174[12]](_0x9174[15],auth[_0x9174[10]](),controller[_0x9174[16]]);router[_0x9174[18]](_0x9174[9],auth[_0x9174[10]](),controller[_0x9174[17]]);router[_0x9174[18]](_0x9174[15],auth[_0x9174[10]](),controller[_0x9174[19]]);router[_0x9174[18]](_0x9174[20],auth[_0x9174[10]](),controller[_0x9174[21]]);router[_0x9174[23]](_0x9174[13],auth[_0x9174[10]](),controller[_0x9174[22]]);router[_0x9174[25]](_0x9174[13],auth[_0x9174[10]](),controller[_0x9174[24]]);module[_0x9174[26]]= router
\ No newline at end of file
index df03e7e..9e6cd6c 100644 (file)
@@ -1 +1 @@
-var _0xd9af=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0xd9af[0];var Sequelize=require(_0xd9af[1]);module[_0xd9af[2]]= {name:{type:Sequelize[_0xd9af[3]]},description:{type:Sequelize[_0xd9af[3]]},interval:{type:Sequelize[_0xd9af[3]],allowNull:true}}
\ No newline at end of file
+var _0xb5a2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0xb5a2[0];var Sequelize=require(_0xb5a2[1]);module[_0xb5a2[2]]= {name:{type:Sequelize[_0xb5a2[3]]},description:{type:Sequelize[_0xb5a2[3]]},interval:{type:Sequelize[_0xb5a2[3]],allowNull:true}}
\ No newline at end of file
index a13aa00..f916af7 100644 (file)
@@ -1 +1 @@
-var _0xc26d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73\x2F\x72\x65\x77\x72\x69\x74\x65","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x61\x64\x64\x49\x6E\x74\x65\x72\x76\x61\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x67\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65"];_0xc26d[0];var jsonpatch=require(_0xc26d[1]);var rp=require(_0xc26d[2]);var moment=require(_0xc26d[3]);var BPromise=require(_0xc26d[4]);var Mustache=require(_0xc26d[5]);var util=require(_0xc26d[6]);var path=require(_0xc26d[7]);var sox=require(_0xc26d[8]);var csv=require(_0xc26d[9]);var ejs=require(_0xc26d[10]);var fs=require(_0xc26d[11]);var _=require(_0xc26d[12]);var squel=require(_0xc26d[13]);var crypto=require(_0xc26d[14]);var jsforce=require(_0xc26d[15]);var deskjs=require(_0xc26d[16]);var toCsv=require(_0xc26d[9]);var querystring=require(_0xc26d[17]);var Papa=require(_0xc26d[18]);var qs=require(_0xc26d[19]);var logger=require(_0xc26d[21])(_0xc26d[20]);var utils=require(_0xc26d[22]);var config=require(_0xc26d[23]);var db=require(_0xc26d[25])[_0xc26d[24]];var extensions=require(_0xc26d[26]);function respondWithStatusCode(_0x7e37x1b,_0x7e37x1c){_0x7e37x1c= _0x7e37x1c|| 204;return function(_0x7e37x1d){if(_0x7e37x1d){return _0x7e37x1b[_0xc26d[27]](_0x7e37x1c)};return _0x7e37x1b[_0xc26d[29]](_0x7e37x1c)[_0xc26d[28]]()}}function respondWithResult(_0x7e37x1b,_0x7e37x1c){_0x7e37x1c= _0x7e37x1c|| 200;return function(_0x7e37x1d){if(_0x7e37x1d){return _0x7e37x1b[_0xc26d[29]](_0x7e37x1c)[_0xc26d[30]](_0x7e37x1d)}}}function respondWithFilteredResult(_0x7e37x1b,_0x7e37x20){return function(_0x7e37x1d){if(_0x7e37x1d){var _0x7e37x21=_0x7e37x1d[_0xc26d[31]],_0x7e37x22=_0x7e37x20[_0xc26d[32]],_0x7e37x23=_0x7e37x20[_0xc26d[32]]+ _0x7e37x20[_0xc26d[33]],_0x7e37x1c;if(_0x7e37x23>= _0x7e37x21){_0x7e37x23= _0x7e37x21;_0x7e37x1c= 200}else {_0x7e37x1c= 206};_0x7e37x1b[_0xc26d[29]](_0x7e37x1c);return _0x7e37x1b[_0xc26d[37]](_0xc26d[34],_0x7e37x22+ _0xc26d[35]+ _0x7e37x23+ _0xc26d[36]+ _0x7e37x21)[_0xc26d[30]](_0x7e37x1d)};return null}}function patchUpdates(_0x7e37x25){return function(_0x7e37x1d){try{jsonpatch[_0xc26d[38]](_0x7e37x1d,_0x7e37x25,true)}catch(err){return BPromise[_0xc26d[39]](err)};return _0x7e37x1d[_0xc26d[40]]()}}function saveUpdates(_0x7e37x27,_0x7e37x1c){return function(_0x7e37x1d){if(_0x7e37x1d){return _0x7e37x1d[_0xc26d[42]](_0x7e37x27)[_0xc26d[41]](function(_0x7e37x28){return _0x7e37x28})};return null}}function removeEntity(_0x7e37x1b,_0x7e37x1c){return function(_0x7e37x1d){if(_0x7e37x1d){return _0x7e37x1d[_0xc26d[43]]()[_0xc26d[41]](function(){_0x7e37x1b[_0xc26d[29]](204)[_0xc26d[28]]()})}}}function handleEntityNotFound(_0x7e37x1b,_0x7e37x1c){return function(_0x7e37x1d){if(!_0x7e37x1d){_0x7e37x1b[_0xc26d[27]](404)};return _0x7e37x1d}}function handleError(_0x7e37x1b,_0x7e37x1c){_0x7e37x1c= _0x7e37x1c|| 500;return function(_0x7e37x2c){logger[_0xc26d[45]](_0x7e37x2c[_0xc26d[44]]);if(_0x7e37x2c[_0xc26d[46]]){delete _0x7e37x2c[_0xc26d[46]]};_0x7e37x1b[_0xc26d[29]](_0x7e37x1c)[_0xc26d[47]](_0x7e37x2c)}}exports[_0xc26d[48]]= function(_0x7e37x2d,_0x7e37x1b){var _0x7e37x20={},_0x7e37x2e={},_0x7e37x2f={count:0,rows:[]};_0x7e37x2e[_0xc26d[49]]= _[_0xc26d[52]](db[_0xc26d[51]][_0xc26d[50]]);var _0x7e37x30={dateStart:_0x7e37x2d[_0xc26d[54]][_0xc26d[53]],dateEnd:_0x7e37x2d[_0xc26d[54]][_0xc26d[55]]};delete _0x7e37x2d[_0xc26d[54]][_0xc26d[53]];delete _0x7e37x2d[_0xc26d[54]][_0xc26d[55]];_0x7e37x2e[_0xc26d[54]]= _[_0xc26d[52]](_0x7e37x2d[_0xc26d[54]]);_0x7e37x2e[_0xc26d[56]]= _[_0xc26d[57]](_0x7e37x2e[_0xc26d[49]],_0x7e37x2e[_0xc26d[54]]);_0x7e37x20[_0xc26d[58]]= _[_0xc26d[57]](_0x7e37x2e[_0xc26d[49]],qs[_0xc26d[59]](_0x7e37x2d[_0xc26d[54]][_0xc26d[59]]));_0x7e37x20[_0xc26d[58]]= (_0x7e37x20[_0xc26d[58]][_0xc26d[60]])?_0x7e37x20[_0xc26d[58]]:_0x7e37x2e[_0xc26d[49]];if(!_0x7e37x2d[_0xc26d[54]][_0xc26d[62]](_0xc26d[61])){_0x7e37x20[_0xc26d[33]]= qs[_0xc26d[33]](_0x7e37x2d[_0xc26d[54]][_0xc26d[33]]);_0x7e37x20[_0xc26d[32]]= qs[_0xc26d[32]](_0x7e37x2d[_0xc26d[54]][_0xc26d[32]])};_0x7e37x20[_0xc26d[63]]= qs[_0xc26d[64]](_0x7e37x2d[_0xc26d[54]][_0xc26d[64]]);_0x7e37x20[_0xc26d[65]]= qs[_0xc26d[56]](_[_0xc26d[66]](_0x7e37x2d[_0xc26d[54]],_0x7e37x2e[_0xc26d[56]]));if(_0x7e37x30[_0xc26d[53]]){if(_0x7e37x30[_0xc26d[55]]){_0x7e37x30[_0xc26d[55]]= moment(_0x7e37x30[_0xc26d[55]])[_0xc26d[68]](1,_0xc26d[67])}else {_0x7e37x30[_0xc26d[55]]= moment(_0x7e37x30[_0xc26d[53]])[_0xc26d[68]](1,_0xc26d[67])};_[_0xc26d[69]](_0x7e37x20[_0xc26d[65]],{createdAt:{$gte:_0x7e37x30[_0xc26d[53]],$lte:_0x7e37x30[_0xc26d[55]]}})};if(_0x7e37x2d[_0xc26d[54]][_0xc26d[70]]){_0x7e37x20[_0xc26d[65]]= _[_0xc26d[69]](_0x7e37x20[_0xc26d[65]],{$or:_[_0xc26d[72]](_0x7e37x20[_0xc26d[58]],function(_0x7e37x31){var _0x7e37x2f={};_0x7e37x2f[_0x7e37x31]= {$like:_0xc26d[71]+ _0x7e37x2d[_0xc26d[54]][_0xc26d[70]]+ _0xc26d[71]};return _0x7e37x2f})})};_0x7e37x20= _[_0xc26d[69]]({},_0x7e37x20,_0x7e37x2d[_0xc26d[73]]);var _0x7e37x32={where:_0x7e37x20[_0xc26d[65]]};return db[_0xc26d[51]][_0xc26d[31]](_0x7e37x32)[_0xc26d[41]](function(_0x7e37x21){_0x7e37x2f[_0xc26d[31]]= _0x7e37x21;if(_0x7e37x2d[_0xc26d[54]][_0xc26d[76]]){_0x7e37x20[_0xc26d[77]]= [{all:true}]};return db[_0xc26d[51]][_0xc26d[78]](_0x7e37x20)})[_0xc26d[41]](function(_0x7e37x33){_0x7e37x2f[_0xc26d[75]]= _0x7e37x33;return _0x7e37x2f})[_0xc26d[41]](respondWithFilteredResult(_0x7e37x1b,_0x7e37x20))[_0xc26d[74]](handleError(_0x7e37x1b,null))};exports[_0xc26d[79]]= function(_0x7e37x2d,_0x7e37x1b){var _0x7e37x20={raw:true,where:{id:_0x7e37x2d[_0xc26d[81]][_0xc26d[80]]}},_0x7e37x2e={};_0x7e37x2e[_0xc26d[49]]= _[_0xc26d[52]](db[_0xc26d[51]][_0xc26d[50]]);_0x7e37x2e[_0xc26d[54]]= _[_0xc26d[52]](_0x7e37x2d[_0xc26d[54]]);_0x7e37x2e[_0xc26d[56]]= _[_0xc26d[57]](_0x7e37x2e[_0xc26d[49]],_0x7e37x2e[_0xc26d[54]]);_0x7e37x20[_0xc26d[58]]= _[_0xc26d[57]](_0x7e37x2e[_0xc26d[49]],qs[_0xc26d[59]](_0x7e37x2d[_0xc26d[54]][_0xc26d[59]]));_0x7e37x20[_0xc26d[58]]= (_0x7e37x20[_0xc26d[58]][_0xc26d[60]])?_0x7e37x20[_0xc26d[58]]:_0x7e37x2e[_0xc26d[49]];if(_0x7e37x2d[_0xc26d[54]][_0xc26d[76]]){_0x7e37x20[_0xc26d[77]]= [{all:true}]};_0x7e37x20= _[_0xc26d[69]]({},_0x7e37x20,_0x7e37x2d[_0xc26d[73]]);return db[_0xc26d[51]][_0xc26d[82]](_0x7e37x20)[_0xc26d[41]](handleEntityNotFound(_0x7e37x1b,null))[_0xc26d[41]](respondWithResult(_0x7e37x1b,null))[_0xc26d[74]](handleError(_0x7e37x1b,null))};exports[_0xc26d[83]]= function(_0x7e37x2d,_0x7e37x1b){return db[_0xc26d[51]][_0xc26d[83]](_0x7e37x2d[_0xc26d[84]],{})[_0xc26d[41]](respondWithResult(_0x7e37x1b,201))[_0xc26d[74]](handleError(_0x7e37x1b,null))};exports[_0xc26d[42]]= function(_0x7e37x2d,_0x7e37x1b){if(_0x7e37x2d[_0xc26d[84]][_0xc26d[80]]){delete _0x7e37x2d[_0xc26d[84]][_0xc26d[80]]};return db[_0xc26d[51]][_0xc26d[82]]({where:{id:_0x7e37x2d[_0xc26d[81]][_0xc26d[80]]}})[_0xc26d[41]](handleEntityNotFound(_0x7e37x1b,null))[_0xc26d[41]](saveUpdates(_0x7e37x2d[_0xc26d[84]],null))[_0xc26d[41]](respondWithResult(_0x7e37x1b,null))[_0xc26d[74]](handleError(_0x7e37x1b,null))};exports[_0xc26d[43]]= function(_0x7e37x2d,_0x7e37x1b){return db[_0xc26d[51]][_0xc26d[82]]({where:{id:_0x7e37x2d[_0xc26d[81]][_0xc26d[80]]}})[_0xc26d[41]](handleEntityNotFound(_0x7e37x1b,null))[_0xc26d[41]](removeEntity(_0x7e37x1b,null))[_0xc26d[74]](handleError(_0x7e37x1b,null))};exports[_0xc26d[85]]= function(_0x7e37x2d,_0x7e37x1b,_0x7e37x34){if(_0x7e37x2d[_0xc26d[84]][_0xc26d[80]]){delete _0x7e37x2d[_0xc26d[84]][_0xc26d[80]]};return db[_0xc26d[51]][_0xc26d[82]]({where:{id:_0x7e37x2d[_0xc26d[81]][_0xc26d[80]]}})[_0xc26d[41]](handleEntityNotFound(_0x7e37x1b,null))[_0xc26d[41]](function(_0x7e37x1d){if(_0x7e37x1d){_0x7e37x2d[_0xc26d[84]][_0xc26d[86]]= _0x7e37x1d[_0xc26d[80]];return db[_0xc26d[51]][_0xc26d[83]](_0x7e37x2d[_0xc26d[84]])}})[_0xc26d[41]](respondWithResult(_0x7e37x1b,null))[_0xc26d[74]](handleError(_0x7e37x1b,null))};exports[_0xc26d[87]]= function(_0x7e37x2d,_0x7e37x1d,_0x7e37x34){var _0x7e37x20={};var _0x7e37x2e={};var _0x7e37x35;var _0x7e37x21;return db[_0xc26d[51]][_0xc26d[88]]({where:{id:_0x7e37x2d[_0xc26d[81]][_0xc26d[80]]}})[_0xc26d[41]](handleEntityNotFound(_0x7e37x1d,null))[_0xc26d[41]](function(_0x7e37x1d){if(_0x7e37x1d){_0x7e37x35= _0x7e37x1d;_0x7e37x2e[_0xc26d[49]]= _[_0xc26d[52]](db[_0xc26d[51]][_0xc26d[50]]);_0x7e37x2e[_0xc26d[54]]= _[_0xc26d[52]](_0x7e37x2d[_0xc26d[54]]);_0x7e37x2e[_0xc26d[56]]= _[_0xc26d[57]](_0x7e37x2e[_0xc26d[49]],_0x7e37x2e[_0xc26d[54]]);_0x7e37x20[_0xc26d[58]]= _[_0xc26d[57]](_0x7e37x2e[_0xc26d[49]],qs[_0xc26d[59]](_0x7e37x2d[_0xc26d[54]][_0xc26d[59]]));_0x7e37x20[_0xc26d[58]]= (_0x7e37x20[_0xc26d[58]][_0xc26d[60]])?_0x7e37x20[_0xc26d[58]]:_0x7e37x2e[_0xc26d[49]];_0x7e37x20[_0xc26d[63]]= qs[_0xc26d[64]](_0x7e37x2d[_0xc26d[54]][_0xc26d[64]]);_0x7e37x20[_0xc26d[65]]= qs[_0xc26d[56]](_[_0xc26d[66]](_0x7e37x2d[_0xc26d[54]],_0x7e37x2e[_0xc26d[56]]));if(_0x7e37x2d[_0xc26d[54]][_0xc26d[70]]){_0x7e37x20[_0xc26d[65]]= _[_0xc26d[69]](_0x7e37x20[_0xc26d[65]],{$or:_[_0xc26d[72]](_0x7e37x20[_0xc26d[58]],function(_0x7e37x31){var _0x7e37x2f={};_0x7e37x2f[_0x7e37x31]= {$like:_0xc26d[71]+ _0x7e37x2d[_0xc26d[54]][_0xc26d[70]]+ _0xc26d[71]};return _0x7e37x2f})})};_0x7e37x20= _[_0xc26d[69]]({},_0x7e37x20,_0x7e37x2d[_0xc26d[73]]);return _0x7e37x35[_0xc26d[87]](_0x7e37x20)}})[_0xc26d[41]](function(_0x7e37x36){if(_0x7e37x36){_0x7e37x21= _0x7e37x36[_0xc26d[60]];if(!_0x7e37x2d[_0xc26d[54]][_0xc26d[62]](_0xc26d[61])){_0x7e37x20[_0xc26d[33]]= qs[_0xc26d[33]](_0x7e37x2d[_0xc26d[54]][_0xc26d[33]]);_0x7e37x20[_0xc26d[32]]= qs[_0xc26d[32]](_0x7e37x2d[_0xc26d[54]][_0xc26d[32]])};return _0x7e37x35[_0xc26d[87]](_0x7e37x20)}})[_0xc26d[41]](function(_0x7e37x33){if(_0x7e37x33){return _0x7e37x33?{count:_0x7e37x21,rows:_0x7e37x33}:null}})[_0xc26d[41]](respondWithResult(_0x7e37x1d,null))[_0xc26d[74]](handleError(_0x7e37x1d,null))};exports[_0xc26d[89]]= function(_0x7e37x2d,_0x7e37x1b,_0x7e37x34){return db[_0xc26d[51]][_0xc26d[88]]({where:{id:_0x7e37x2d[_0xc26d[81]][_0xc26d[80]]}})[_0xc26d[41]](handleEntityNotFound(_0x7e37x1b,null))[_0xc26d[41]](function(_0x7e37x1d){if(_0x7e37x1d){return db[_0xc26d[92]][_0xc26d[91]](function(_0x7e37x37){return db[_0xc26d[51]][_0xc26d[43]]({where:{IntervalId:_0x7e37x2d[_0xc26d[81]][_0xc26d[80]]},transaction:_0x7e37x37})[_0xc26d[41]](function(_0x7e37x38){var _0x7e37x39=_[_0xc26d[72]](_0x7e37x2d[_0xc26d[84]],function(_0x7e37x3a){delete _0x7e37x3a[_0xc26d[80]];_0x7e37x3a[_0xc26d[86]]= _0x7e37x2d[_0xc26d[81]][_0xc26d[80]];return _0x7e37x3a});return db[_0xc26d[51]][_0xc26d[90]](_0x7e37x39,{transaction:_0x7e37x37})})})[_0xc26d[41]](function(){return db[_0xc26d[51]][_0xc26d[78]]({where:{IntervalId:_0x7e37x2d[_0xc26d[81]][_0xc26d[80]]}})})}})[_0xc26d[41]](respondWithResult(_0x7e37x1b,null))[_0xc26d[74]](handleError(_0x7e37x1b,null))}
\ No newline at end of file
+var _0xa376=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73\x2F\x72\x65\x77\x72\x69\x74\x65","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x61\x64\x64\x49\x6E\x74\x65\x72\x76\x61\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x67\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65"];_0xa376[0];var jsonpatch=require(_0xa376[1]);var rp=require(_0xa376[2]);var moment=require(_0xa376[3]);var BPromise=require(_0xa376[4]);var Mustache=require(_0xa376[5]);var util=require(_0xa376[6]);var path=require(_0xa376[7]);var sox=require(_0xa376[8]);var csv=require(_0xa376[9]);var ejs=require(_0xa376[10]);var fs=require(_0xa376[11]);var _=require(_0xa376[12]);var squel=require(_0xa376[13]);var crypto=require(_0xa376[14]);var jsforce=require(_0xa376[15]);var deskjs=require(_0xa376[16]);var toCsv=require(_0xa376[9]);var querystring=require(_0xa376[17]);var Papa=require(_0xa376[18]);var qs=require(_0xa376[19]);var logger=require(_0xa376[21])(_0xa376[20]);var utils=require(_0xa376[22]);var config=require(_0xa376[23]);var db=require(_0xa376[25])[_0xa376[24]];var extensions=require(_0xa376[26]);function respondWithStatusCode(_0x9496x1b,_0x9496x1c){_0x9496x1c= _0x9496x1c|| 204;return function(_0x9496x1d){if(_0x9496x1d){return _0x9496x1b[_0xa376[27]](_0x9496x1c)};return _0x9496x1b[_0xa376[29]](_0x9496x1c)[_0xa376[28]]()}}function respondWithResult(_0x9496x1b,_0x9496x1c){_0x9496x1c= _0x9496x1c|| 200;return function(_0x9496x1d){if(_0x9496x1d){return _0x9496x1b[_0xa376[29]](_0x9496x1c)[_0xa376[30]](_0x9496x1d)}}}function respondWithFilteredResult(_0x9496x1b,_0x9496x20){return function(_0x9496x1d){if(_0x9496x1d){var _0x9496x21=_0x9496x1d[_0xa376[31]],_0x9496x22=_0x9496x20[_0xa376[32]],_0x9496x23=_0x9496x20[_0xa376[32]]+ _0x9496x20[_0xa376[33]],_0x9496x1c;if(_0x9496x23>= _0x9496x21){_0x9496x23= _0x9496x21;_0x9496x1c= 200}else {_0x9496x1c= 206};_0x9496x1b[_0xa376[29]](_0x9496x1c);return _0x9496x1b[_0xa376[37]](_0xa376[34],_0x9496x22+ _0xa376[35]+ _0x9496x23+ _0xa376[36]+ _0x9496x21)[_0xa376[30]](_0x9496x1d)};return null}}function patchUpdates(_0x9496x25){return function(_0x9496x1d){try{jsonpatch[_0xa376[38]](_0x9496x1d,_0x9496x25,true)}catch(err){return BPromise[_0xa376[39]](err)};return _0x9496x1d[_0xa376[40]]()}}function saveUpdates(_0x9496x27,_0x9496x1c){return function(_0x9496x1d){if(_0x9496x1d){return _0x9496x1d[_0xa376[42]](_0x9496x27)[_0xa376[41]](function(_0x9496x28){return _0x9496x28})};return null}}function removeEntity(_0x9496x1b,_0x9496x1c){return function(_0x9496x1d){if(_0x9496x1d){return _0x9496x1d[_0xa376[43]]()[_0xa376[41]](function(){_0x9496x1b[_0xa376[29]](204)[_0xa376[28]]()})}}}function handleEntityNotFound(_0x9496x1b,_0x9496x1c){return function(_0x9496x1d){if(!_0x9496x1d){_0x9496x1b[_0xa376[27]](404)};return _0x9496x1d}}function handleError(_0x9496x1b,_0x9496x1c){_0x9496x1c= _0x9496x1c|| 500;return function(_0x9496x2c){logger[_0xa376[45]](_0x9496x2c[_0xa376[44]]);if(_0x9496x2c[_0xa376[46]]){delete _0x9496x2c[_0xa376[46]]};_0x9496x1b[_0xa376[29]](_0x9496x1c)[_0xa376[47]](_0x9496x2c)}}exports[_0xa376[48]]= function(_0x9496x2d,_0x9496x1b){var _0x9496x20={},_0x9496x2e={},_0x9496x2f={count:0,rows:[]};_0x9496x2e[_0xa376[49]]= _[_0xa376[52]](db[_0xa376[51]][_0xa376[50]]);var _0x9496x30={dateStart:_0x9496x2d[_0xa376[54]][_0xa376[53]],dateEnd:_0x9496x2d[_0xa376[54]][_0xa376[55]]};delete _0x9496x2d[_0xa376[54]][_0xa376[53]];delete _0x9496x2d[_0xa376[54]][_0xa376[55]];_0x9496x2e[_0xa376[54]]= _[_0xa376[52]](_0x9496x2d[_0xa376[54]]);_0x9496x2e[_0xa376[56]]= _[_0xa376[57]](_0x9496x2e[_0xa376[49]],_0x9496x2e[_0xa376[54]]);_0x9496x20[_0xa376[58]]= _[_0xa376[57]](_0x9496x2e[_0xa376[49]],qs[_0xa376[59]](_0x9496x2d[_0xa376[54]][_0xa376[59]]));_0x9496x20[_0xa376[58]]= (_0x9496x20[_0xa376[58]][_0xa376[60]])?_0x9496x20[_0xa376[58]]:_0x9496x2e[_0xa376[49]];if(!_0x9496x2d[_0xa376[54]][_0xa376[62]](_0xa376[61])){_0x9496x20[_0xa376[33]]= qs[_0xa376[33]](_0x9496x2d[_0xa376[54]][_0xa376[33]]);_0x9496x20[_0xa376[32]]= qs[_0xa376[32]](_0x9496x2d[_0xa376[54]][_0xa376[32]])};_0x9496x20[_0xa376[63]]= qs[_0xa376[64]](_0x9496x2d[_0xa376[54]][_0xa376[64]]);_0x9496x20[_0xa376[65]]= qs[_0xa376[56]](_[_0xa376[66]](_0x9496x2d[_0xa376[54]],_0x9496x2e[_0xa376[56]]));if(_0x9496x30[_0xa376[53]]){if(_0x9496x30[_0xa376[55]]){_0x9496x30[_0xa376[55]]= moment(_0x9496x30[_0xa376[55]])[_0xa376[68]](1,_0xa376[67])}else {_0x9496x30[_0xa376[55]]= moment(_0x9496x30[_0xa376[53]])[_0xa376[68]](1,_0xa376[67])};_[_0xa376[69]](_0x9496x20[_0xa376[65]],{createdAt:{$gte:_0x9496x30[_0xa376[53]],$lte:_0x9496x30[_0xa376[55]]}})};if(_0x9496x2d[_0xa376[54]][_0xa376[70]]){_0x9496x20[_0xa376[65]]= _[_0xa376[69]](_0x9496x20[_0xa376[65]],{$or:_[_0xa376[72]](_0x9496x20[_0xa376[58]],function(_0x9496x31){var _0x9496x2f={};_0x9496x2f[_0x9496x31]= {$like:_0xa376[71]+ _0x9496x2d[_0xa376[54]][_0xa376[70]]+ _0xa376[71]};return _0x9496x2f})})};_0x9496x20= _[_0xa376[69]]({},_0x9496x20,_0x9496x2d[_0xa376[73]]);var _0x9496x32={where:_0x9496x20[_0xa376[65]]};return db[_0xa376[51]][_0xa376[31]](_0x9496x32)[_0xa376[41]](function(_0x9496x21){_0x9496x2f[_0xa376[31]]= _0x9496x21;if(_0x9496x2d[_0xa376[54]][_0xa376[76]]){_0x9496x20[_0xa376[77]]= [{all:true}]};return db[_0xa376[51]][_0xa376[78]](_0x9496x20)})[_0xa376[41]](function(_0x9496x33){_0x9496x2f[_0xa376[75]]= _0x9496x33;return _0x9496x2f})[_0xa376[41]](respondWithFilteredResult(_0x9496x1b,_0x9496x20))[_0xa376[74]](handleError(_0x9496x1b,null))};exports[_0xa376[79]]= function(_0x9496x2d,_0x9496x1b){var _0x9496x20={raw:true,where:{id:_0x9496x2d[_0xa376[81]][_0xa376[80]]}},_0x9496x2e={};_0x9496x2e[_0xa376[49]]= _[_0xa376[52]](db[_0xa376[51]][_0xa376[50]]);_0x9496x2e[_0xa376[54]]= _[_0xa376[52]](_0x9496x2d[_0xa376[54]]);_0x9496x2e[_0xa376[56]]= _[_0xa376[57]](_0x9496x2e[_0xa376[49]],_0x9496x2e[_0xa376[54]]);_0x9496x20[_0xa376[58]]= _[_0xa376[57]](_0x9496x2e[_0xa376[49]],qs[_0xa376[59]](_0x9496x2d[_0xa376[54]][_0xa376[59]]));_0x9496x20[_0xa376[58]]= (_0x9496x20[_0xa376[58]][_0xa376[60]])?_0x9496x20[_0xa376[58]]:_0x9496x2e[_0xa376[49]];if(_0x9496x2d[_0xa376[54]][_0xa376[76]]){_0x9496x20[_0xa376[77]]= [{all:true}]};_0x9496x20= _[_0xa376[69]]({},_0x9496x20,_0x9496x2d[_0xa376[73]]);return db[_0xa376[51]][_0xa376[82]](_0x9496x20)[_0xa376[41]](handleEntityNotFound(_0x9496x1b,null))[_0xa376[41]](respondWithResult(_0x9496x1b,null))[_0xa376[74]](handleError(_0x9496x1b,null))};exports[_0xa376[83]]= function(_0x9496x2d,_0x9496x1b){return db[_0xa376[51]][_0xa376[83]](_0x9496x2d[_0xa376[84]],{})[_0xa376[41]](respondWithResult(_0x9496x1b,201))[_0xa376[74]](handleError(_0x9496x1b,null))};exports[_0xa376[42]]= function(_0x9496x2d,_0x9496x1b){if(_0x9496x2d[_0xa376[84]][_0xa376[80]]){delete _0x9496x2d[_0xa376[84]][_0xa376[80]]};return db[_0xa376[51]][_0xa376[82]]({where:{id:_0x9496x2d[_0xa376[81]][_0xa376[80]]}})[_0xa376[41]](handleEntityNotFound(_0x9496x1b,null))[_0xa376[41]](saveUpdates(_0x9496x2d[_0xa376[84]],null))[_0xa376[41]](respondWithResult(_0x9496x1b,null))[_0xa376[74]](handleError(_0x9496x1b,null))};exports[_0xa376[43]]= function(_0x9496x2d,_0x9496x1b){return db[_0xa376[51]][_0xa376[82]]({where:{id:_0x9496x2d[_0xa376[81]][_0xa376[80]]}})[_0xa376[41]](handleEntityNotFound(_0x9496x1b,null))[_0xa376[41]](removeEntity(_0x9496x1b,null))[_0xa376[74]](handleError(_0x9496x1b,null))};exports[_0xa376[85]]= function(_0x9496x2d,_0x9496x1b,_0x9496x34){if(_0x9496x2d[_0xa376[84]][_0xa376[80]]){delete _0x9496x2d[_0xa376[84]][_0xa376[80]]};return db[_0xa376[51]][_0xa376[82]]({where:{id:_0x9496x2d[_0xa376[81]][_0xa376[80]]}})[_0xa376[41]](handleEntityNotFound(_0x9496x1b,null))[_0xa376[41]](function(_0x9496x1d){if(_0x9496x1d){_0x9496x2d[_0xa376[84]][_0xa376[86]]= _0x9496x1d[_0xa376[80]];return db[_0xa376[51]][_0xa376[83]](_0x9496x2d[_0xa376[84]])}})[_0xa376[41]](respondWithResult(_0x9496x1b,null))[_0xa376[74]](handleError(_0x9496x1b,null))};exports[_0xa376[87]]= function(_0x9496x2d,_0x9496x1d,_0x9496x34){var _0x9496x20={};var _0x9496x2e={};var _0x9496x35;var _0x9496x21;return db[_0xa376[51]][_0xa376[88]]({where:{id:_0x9496x2d[_0xa376[81]][_0xa376[80]]}})[_0xa376[41]](handleEntityNotFound(_0x9496x1d,null))[_0xa376[41]](function(_0x9496x1d){if(_0x9496x1d){_0x9496x35= _0x9496x1d;_0x9496x2e[_0xa376[49]]= _[_0xa376[52]](db[_0xa376[51]][_0xa376[50]]);_0x9496x2e[_0xa376[54]]= _[_0xa376[52]](_0x9496x2d[_0xa376[54]]);_0x9496x2e[_0xa376[56]]= _[_0xa376[57]](_0x9496x2e[_0xa376[49]],_0x9496x2e[_0xa376[54]]);_0x9496x20[_0xa376[58]]= _[_0xa376[57]](_0x9496x2e[_0xa376[49]],qs[_0xa376[59]](_0x9496x2d[_0xa376[54]][_0xa376[59]]));_0x9496x20[_0xa376[58]]= (_0x9496x20[_0xa376[58]][_0xa376[60]])?_0x9496x20[_0xa376[58]]:_0x9496x2e[_0xa376[49]];_0x9496x20[_0xa376[63]]= qs[_0xa376[64]](_0x9496x2d[_0xa376[54]][_0xa376[64]]);_0x9496x20[_0xa376[65]]= qs[_0xa376[56]](_[_0xa376[66]](_0x9496x2d[_0xa376[54]],_0x9496x2e[_0xa376[56]]));if(_0x9496x2d[_0xa376[54]][_0xa376[70]]){_0x9496x20[_0xa376[65]]= _[_0xa376[69]](_0x9496x20[_0xa376[65]],{$or:_[_0xa376[72]](_0x9496x20[_0xa376[58]],function(_0x9496x31){var _0x9496x2f={};_0x9496x2f[_0x9496x31]= {$like:_0xa376[71]+ _0x9496x2d[_0xa376[54]][_0xa376[70]]+ _0xa376[71]};return _0x9496x2f})})};_0x9496x20= _[_0xa376[69]]({},_0x9496x20,_0x9496x2d[_0xa376[73]]);return _0x9496x35[_0xa376[87]](_0x9496x20)}})[_0xa376[41]](function(_0x9496x36){if(_0x9496x36){_0x9496x21= _0x9496x36[_0xa376[60]];if(!_0x9496x2d[_0xa376[54]][_0xa376[62]](_0xa376[61])){_0x9496x20[_0xa376[33]]= qs[_0xa376[33]](_0x9496x2d[_0xa376[54]][_0xa376[33]]);_0x9496x20[_0xa376[32]]= qs[_0xa376[32]](_0x9496x2d[_0xa376[54]][_0xa376[32]])};return _0x9496x35[_0xa376[87]](_0x9496x20)}})[_0xa376[41]](function(_0x9496x33){if(_0x9496x33){return _0x9496x33?{count:_0x9496x21,rows:_0x9496x33}:null}})[_0xa376[41]](respondWithResult(_0x9496x1d,null))[_0xa376[74]](handleError(_0x9496x1d,null))};exports[_0xa376[89]]= function(_0x9496x2d,_0x9496x1b,_0x9496x34){return db[_0xa376[51]][_0xa376[88]]({where:{id:_0x9496x2d[_0xa376[81]][_0xa376[80]]}})[_0xa376[41]](handleEntityNotFound(_0x9496x1b,null))[_0xa376[41]](function(_0x9496x1d){if(_0x9496x1d){return db[_0xa376[92]][_0xa376[91]](function(_0x9496x37){return db[_0xa376[51]][_0xa376[43]]({where:{IntervalId:_0x9496x2d[_0xa376[81]][_0xa376[80]]},transaction:_0x9496x37})[_0xa376[41]](function(_0x9496x38){var _0x9496x39=_[_0xa376[72]](_0x9496x2d[_0xa376[84]],function(_0x9496x3a){delete _0x9496x3a[_0xa376[80]];_0x9496x3a[_0xa376[86]]= _0x9496x2d[_0xa376[81]][_0xa376[80]];return _0x9496x3a});return db[_0xa376[51]][_0xa376[90]](_0x9496x39,{transaction:_0x9496x37})})})[_0xa376[41]](function(){return db[_0xa376[51]][_0xa376[78]]({where:{IntervalId:_0x9496x2d[_0xa376[81]][_0xa376[80]]}})})}})[_0xa376[41]](respondWithResult(_0x9496x1b,null))[_0xa376[74]](handleError(_0x9496x1b,null))}
\ No newline at end of file
index 2dc566a..c235463 100644 (file)
@@ -1 +1 @@
-var _0x9978=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73\x2F\x72\x65\x77\x72\x69\x74\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x74\x6F\x6F\x6C\x73\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x72\x65\x77\x72\x69\x74\x65","\x64\x65\x66\x69\x6E\x65"];_0x9978[0];var _=require(_0x9978[1]);var util=require(_0x9978[2]);var logger=require(_0x9978[4])(_0x9978[3]);var moment=require(_0x9978[5]);var BPromise=require(_0x9978[6]);var rp=require(_0x9978[7]);var attributes=require(_0x9978[8]);var extensions=require(_0x9978[9]);module[_0x9978[10]]= function(_0x9ed8x9,_0x9ed8xa){return _0x9ed8x9[_0x9978[14]](_0x9978[11],attributes,{tableName:_0x9978[12],paranoid:false,indexes:[],timestamps:true,hooks:{afterCreate:function(_0x9ed8xb,_0x9ed8xc){extensions[_0x9978[13]](_0x9ed8x9,_0x9ed8xb)},afterBulkCreate:function(_0x9ed8xd,_0x9ed8xc,_0x9ed8xe){_0x9ed8xe();extensions[_0x9978[13]](_0x9ed8x9,_0x9ed8xd[0])},afterUpdate:function(_0x9ed8xb,_0x9ed8xc){extensions[_0x9978[13]](_0x9ed8x9,_0x9ed8xb)},afterDestroy:function(_0x9ed8xb,_0x9ed8xc){extensions[_0x9978[13]](_0x9ed8x9,_0x9ed8xb)}}})}
\ No newline at end of file
+var _0x3730=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73\x2F\x72\x65\x77\x72\x69\x74\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x74\x6F\x6F\x6C\x73\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x72\x65\x77\x72\x69\x74\x65","\x64\x65\x66\x69\x6E\x65"];_0x3730[0];var _=require(_0x3730[1]);var util=require(_0x3730[2]);var logger=require(_0x3730[4])(_0x3730[3]);var moment=require(_0x3730[5]);var BPromise=require(_0x3730[6]);var rp=require(_0x3730[7]);var attributes=require(_0x3730[8]);var extensions=require(_0x3730[9]);module[_0x3730[10]]= function(_0xf615x9,_0xf615xa){return _0xf615x9[_0x3730[14]](_0x3730[11],attributes,{tableName:_0x3730[12],paranoid:false,indexes:[],timestamps:true,hooks:{afterCreate:function(_0xf615xb,_0xf615xc){extensions[_0x3730[13]](_0xf615x9,_0xf615xb)},afterBulkCreate:function(_0xf615xd,_0xf615xc,_0xf615xe){_0xf615xe();extensions[_0x3730[13]](_0xf615x9,_0xf615xd[0])},afterUpdate:function(_0xf615xb,_0xf615xc){extensions[_0x3730[13]](_0xf615x9,_0xf615xb)},afterDestroy:function(_0xf615xb,_0xf615xc){extensions[_0x3730[13]](_0xf615x9,_0xf615xb)}}})}
\ No newline at end of file
index ee4cfa3..498da16 100644 (file)
@@ -1 +1 @@
-var _0xc641=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x49\x6E\x74\x65\x72\x76\x61\x6C\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x49\x6E\x74\x65\x72\x76\x61\x6C\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x53\x68\x6F\x77\x49\x6E\x74\x65\x72\x76\x61\x6C","\x66\x69\x6E\x64"];_0xc641[0];var _=require(_0xc641[1]);var util=require(_0xc641[2]);var moment=require(_0xc641[3]);var BPromise=require(_0xc641[4]);var rs=require(_0xc641[5]);var fs=require(_0xc641[6]);var db=require(_0xc641[8])[_0xc641[7]];var utils=require(_0xc641[9]);var logger=require(_0xc641[11])(_0xc641[10]);var config=require(_0xc641[12]);var jayson=require(_0xc641[13]);var client=jayson[_0xc641[15]][_0xc641[14]]({port:9002});function respondWithRpcPromise(_0x3f36xe,_0x3f36xf,_0x3f36x10){return  new BPromise(function(_0x3f36x11,_0x3f36x12){return client[_0xc641[28]](_0x3f36xe,_0x3f36x10)[_0xc641[27]](function(_0x3f36x14){logger[_0xc641[20]](_0xc641[16],_0x3f36xf,_0xc641[19]);logger[_0xc641[23]](_0xc641[21],_0x3f36xf,_0xc641[19],JSON[_0xc641[22]](_0x3f36x14));if(_0x3f36x14[_0xc641[17]]){if(_0x3f36x14[_0xc641[17]][_0xc641[24]]=== 500){logger[_0xc641[17]](_0xc641[16],_0x3f36xf,_0x3f36x14[_0xc641[17]][_0xc641[25]]);return _0x3f36x12(_0x3f36x14[_0xc641[17]][_0xc641[25]])};logger[_0xc641[17]](_0xc641[16],_0x3f36xf,_0x3f36x14[_0xc641[17]][_0xc641[25]]);return _0x3f36x11(_0x3f36x14[_0xc641[17]][_0xc641[25]])}else {logger[_0xc641[20]](_0xc641[16],_0x3f36xf,_0xc641[19]);_0x3f36x11(_0x3f36x14[_0xc641[26]][_0xc641[25]])}})[_0xc641[18]](function(_0x3f36x13){logger[_0xc641[17]](_0xc641[16],_0x3f36xf,_0x3f36x13);_0x3f36x12(_0x3f36x13)})})}exports[_0xc641[29]]= function(_0x3f36x10){var _0x3f36x15=this;return  new Promise(function(_0x3f36x11,_0x3f36x12){return db[_0xc641[40]][_0xc641[39]]({raw:_0x3f36x10[_0xc641[30]]?(_0x3f36x10[_0xc641[30]][_0xc641[31]]=== undefined)?true:false:true,where:_0x3f36x10[_0xc641[30]]?_0x3f36x10[_0xc641[30]][_0xc641[32]]|| null:null,attributes:_0x3f36x10[_0xc641[30]]?_0x3f36x10[_0xc641[30]][_0xc641[33]]|| null:null,limit:_0x3f36x10[_0xc641[30]]?_0x3f36x10[_0xc641[30]][_0xc641[34]]|| null:null,include:_0x3f36x10[_0xc641[30]]?(_0x3f36x10[_0xc641[30]][_0xc641[35]]?_[_0xc641[38]](_0x3f36x10[_0xc641[30]][_0xc641[35]],function(_0x3f36x16){return {model:db[_0x3f36x16[_0xc641[36]]],as:_0x3f36x16[_0xc641[37]],attributes:_0x3f36x16[_0xc641[33]],include:_0x3f36x16[_0xc641[35]]?_[_0xc641[38]](_0x3f36x16[_0xc641[35]],function(_0x3f36x17){return {model:db[_0x3f36x17[_0xc641[36]]],as:_0x3f36x17[_0xc641[37]],attributes:_0x3f36x17[_0xc641[33]],include:_0x3f36x17[_0xc641[35]]?_[_0xc641[38]](_0x3f36x17[_0xc641[35]],function(_0x3f36x18){return {model:db[_0x3f36x18[_0xc641[36]]],as:_0x3f36x18[_0xc641[37]],attributes:_0x3f36x18[_0xc641[33]]}}):[]}}):[]}}):[]):[]})[_0xc641[27]](function(_0x3f36x14){logger[_0xc641[20]](_0xc641[29],_0x3f36x10);logger[_0xc641[23]](_0xc641[29],_0x3f36x10,JSON[_0xc641[22]](_0x3f36x14));_0x3f36x11(_0x3f36x14)})[_0xc641[18]](function(_0x3f36x13){logger[_0xc641[17]](_0xc641[29],_0x3f36x13[_0xc641[25]],_0x3f36x10);_0x3f36x12(_0x3f36x15[_0xc641[17]](500,_0x3f36x13[_0xc641[25]]))})})};exports[_0xc641[41]]= function(_0x3f36x10){var _0x3f36x15=this;return  new Promise(function(_0x3f36x11,_0x3f36x12){return db[_0xc641[40]][_0xc641[42]]({raw:_0x3f36x10[_0xc641[30]]?(_0x3f36x10[_0xc641[30]][_0xc641[31]]=== undefined)?true:false:true,where:_0x3f36x10[_0xc641[30]]?_0x3f36x10[_0xc641[30]][_0xc641[32]]|| null:null,attributes:_0x3f36x10[_0xc641[30]]?_0x3f36x10[_0xc641[30]][_0xc641[33]]|| null:null,include:_0x3f36x10[_0xc641[30]]?(_0x3f36x10[_0xc641[30]][_0xc641[35]]?_[_0xc641[38]](_0x3f36x10[_0xc641[30]][_0xc641[35]],function(_0x3f36x16){return {model:db[_0x3f36x16[_0xc641[36]]],as:_0x3f36x16[_0xc641[37]],attributes:_0x3f36x16[_0xc641[33]],include:_0x3f36x16[_0xc641[35]]?_[_0xc641[38]](_0x3f36x16[_0xc641[35]],function(_0x3f36x17){return {model:db[_0x3f36x17[_0xc641[36]]],as:_0x3f36x17[_0xc641[37]],attributes:_0x3f36x17[_0xc641[33]],include:_0x3f36x17[_0xc641[35]]?_[_0xc641[38]](_0x3f36x17[_0xc641[35]],function(_0x3f36x18){return {model:db[_0x3f36x18[_0xc641[36]]],as:_0x3f36x18[_0xc641[37]],attributes:_0x3f36x18[_0xc641[33]]}}):[]}}):[]}}):[]):[]})[_0xc641[27]](function(_0x3f36x14){logger[_0xc641[20]](_0xc641[41],_0x3f36x10);logger[_0xc641[23]](_0xc641[41],_0x3f36x10,JSON[_0xc641[22]](_0x3f36x14));_0x3f36x11(_0x3f36x14)})[_0xc641[18]](function(_0x3f36x13){logger[_0xc641[17]](_0xc641[41],_0x3f36x13[_0xc641[25]],_0x3f36x10);_0x3f36x12(_0x3f36x15[_0xc641[17]](500,_0x3f36x13[_0xc641[25]]))})})}
\ No newline at end of file
+var _0xa2c4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x49\x6E\x74\x65\x72\x76\x61\x6C\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x49\x6E\x74\x65\x72\x76\x61\x6C\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x53\x68\x6F\x77\x49\x6E\x74\x65\x72\x76\x61\x6C","\x66\x69\x6E\x64"];_0xa2c4[0];var _=require(_0xa2c4[1]);var util=require(_0xa2c4[2]);var moment=require(_0xa2c4[3]);var BPromise=require(_0xa2c4[4]);var rs=require(_0xa2c4[5]);var fs=require(_0xa2c4[6]);var db=require(_0xa2c4[8])[_0xa2c4[7]];var utils=require(_0xa2c4[9]);var logger=require(_0xa2c4[11])(_0xa2c4[10]);var config=require(_0xa2c4[12]);var jayson=require(_0xa2c4[13]);var client=jayson[_0xa2c4[15]][_0xa2c4[14]]({port:9002});function respondWithRpcPromise(_0xb3b9xe,_0xb3b9xf,_0xb3b9x10){return  new BPromise(function(_0xb3b9x11,_0xb3b9x12){return client[_0xa2c4[28]](_0xb3b9xe,_0xb3b9x10)[_0xa2c4[27]](function(_0xb3b9x14){logger[_0xa2c4[20]](_0xa2c4[16],_0xb3b9xf,_0xa2c4[19]);logger[_0xa2c4[23]](_0xa2c4[21],_0xb3b9xf,_0xa2c4[19],JSON[_0xa2c4[22]](_0xb3b9x14));if(_0xb3b9x14[_0xa2c4[17]]){if(_0xb3b9x14[_0xa2c4[17]][_0xa2c4[24]]=== 500){logger[_0xa2c4[17]](_0xa2c4[16],_0xb3b9xf,_0xb3b9x14[_0xa2c4[17]][_0xa2c4[25]]);return _0xb3b9x12(_0xb3b9x14[_0xa2c4[17]][_0xa2c4[25]])};logger[_0xa2c4[17]](_0xa2c4[16],_0xb3b9xf,_0xb3b9x14[_0xa2c4[17]][_0xa2c4[25]]);return _0xb3b9x11(_0xb3b9x14[_0xa2c4[17]][_0xa2c4[25]])}else {logger[_0xa2c4[20]](_0xa2c4[16],_0xb3b9xf,_0xa2c4[19]);_0xb3b9x11(_0xb3b9x14[_0xa2c4[26]][_0xa2c4[25]])}})[_0xa2c4[18]](function(_0xb3b9x13){logger[_0xa2c4[17]](_0xa2c4[16],_0xb3b9xf,_0xb3b9x13);_0xb3b9x12(_0xb3b9x13)})})}exports[_0xa2c4[29]]= function(_0xb3b9x10){var _0xb3b9x15=this;return  new Promise(function(_0xb3b9x11,_0xb3b9x12){return db[_0xa2c4[40]][_0xa2c4[39]]({raw:_0xb3b9x10[_0xa2c4[30]]?(_0xb3b9x10[_0xa2c4[30]][_0xa2c4[31]]=== undefined)?true:false:true,where:_0xb3b9x10[_0xa2c4[30]]?_0xb3b9x10[_0xa2c4[30]][_0xa2c4[32]]|| null:null,attributes:_0xb3b9x10[_0xa2c4[30]]?_0xb3b9x10[_0xa2c4[30]][_0xa2c4[33]]|| null:null,limit:_0xb3b9x10[_0xa2c4[30]]?_0xb3b9x10[_0xa2c4[30]][_0xa2c4[34]]|| null:null,include:_0xb3b9x10[_0xa2c4[30]]?(_0xb3b9x10[_0xa2c4[30]][_0xa2c4[35]]?_[_0xa2c4[38]](_0xb3b9x10[_0xa2c4[30]][_0xa2c4[35]],function(_0xb3b9x16){return {model:db[_0xb3b9x16[_0xa2c4[36]]],as:_0xb3b9x16[_0xa2c4[37]],attributes:_0xb3b9x16[_0xa2c4[33]],include:_0xb3b9x16[_0xa2c4[35]]?_[_0xa2c4[38]](_0xb3b9x16[_0xa2c4[35]],function(_0xb3b9x17){return {model:db[_0xb3b9x17[_0xa2c4[36]]],as:_0xb3b9x17[_0xa2c4[37]],attributes:_0xb3b9x17[_0xa2c4[33]],include:_0xb3b9x17[_0xa2c4[35]]?_[_0xa2c4[38]](_0xb3b9x17[_0xa2c4[35]],function(_0xb3b9x18){return {model:db[_0xb3b9x18[_0xa2c4[36]]],as:_0xb3b9x18[_0xa2c4[37]],attributes:_0xb3b9x18[_0xa2c4[33]]}}):[]}}):[]}}):[]):[]})[_0xa2c4[27]](function(_0xb3b9x14){logger[_0xa2c4[20]](_0xa2c4[29],_0xb3b9x10);logger[_0xa2c4[23]](_0xa2c4[29],_0xb3b9x10,JSON[_0xa2c4[22]](_0xb3b9x14));_0xb3b9x11(_0xb3b9x14)})[_0xa2c4[18]](function(_0xb3b9x13){logger[_0xa2c4[17]](_0xa2c4[29],_0xb3b9x13[_0xa2c4[25]],_0xb3b9x10);_0xb3b9x12(_0xb3b9x15[_0xa2c4[17]](500,_0xb3b9x13[_0xa2c4[25]]))})})};exports[_0xa2c4[41]]= function(_0xb3b9x10){var _0xb3b9x15=this;return  new Promise(function(_0xb3b9x11,_0xb3b9x12){return db[_0xa2c4[40]][_0xa2c4[42]]({raw:_0xb3b9x10[_0xa2c4[30]]?(_0xb3b9x10[_0xa2c4[30]][_0xa2c4[31]]=== undefined)?true:false:true,where:_0xb3b9x10[_0xa2c4[30]]?_0xb3b9x10[_0xa2c4[30]][_0xa2c4[32]]|| null:null,attributes:_0xb3b9x10[_0xa2c4[30]]?_0xb3b9x10[_0xa2c4[30]][_0xa2c4[33]]|| null:null,include:_0xb3b9x10[_0xa2c4[30]]?(_0xb3b9x10[_0xa2c4[30]][_0xa2c4[35]]?_[_0xa2c4[38]](_0xb3b9x10[_0xa2c4[30]][_0xa2c4[35]],function(_0xb3b9x16){return {model:db[_0xb3b9x16[_0xa2c4[36]]],as:_0xb3b9x16[_0xa2c4[37]],attributes:_0xb3b9x16[_0xa2c4[33]],include:_0xb3b9x16[_0xa2c4[35]]?_[_0xa2c4[38]](_0xb3b9x16[_0xa2c4[35]],function(_0xb3b9x17){return {model:db[_0xb3b9x17[_0xa2c4[36]]],as:_0xb3b9x17[_0xa2c4[37]],attributes:_0xb3b9x17[_0xa2c4[33]],include:_0xb3b9x17[_0xa2c4[35]]?_[_0xa2c4[38]](_0xb3b9x17[_0xa2c4[35]],function(_0xb3b9x18){return {model:db[_0xb3b9x18[_0xa2c4[36]]],as:_0xb3b9x18[_0xa2c4[37]],attributes:_0xb3b9x18[_0xa2c4[33]]}}):[]}}):[]}}):[]):[]})[_0xa2c4[27]](function(_0xb3b9x14){logger[_0xa2c4[20]](_0xa2c4[41],_0xb3b9x10);logger[_0xa2c4[23]](_0xa2c4[41],_0xb3b9x10,JSON[_0xa2c4[22]](_0xb3b9x14));_0xb3b9x11(_0xb3b9x14)})[_0xa2c4[18]](function(_0xb3b9x13){logger[_0xa2c4[17]](_0xa2c4[41],_0xb3b9x13[_0xa2c4[25]],_0xb3b9x10);_0xb3b9x12(_0xb3b9x15[_0xa2c4[17]](500,_0xb3b9x13[_0xa2c4[25]]))})})}
\ No newline at end of file
index 4b2c0e6..c066f03 100644 (file)
@@ -1 +1 @@
-var _0x354e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6A\x69\x72\x61\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x73\x65\x6E\x64","\x70\x6F\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x354e[0];var express=require(_0x354e[1]);var router=express.Router();var auth=require(_0x354e[2]);var controller=require(_0x354e[3]);router[_0x354e[7]](_0x354e[4],auth[_0x354e[5]](),controller[_0x354e[6]]);module[_0x354e[8]]= router
\ No newline at end of file
+var _0x2cc7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6A\x69\x72\x61\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x73\x65\x6E\x64","\x70\x6F\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x2cc7[0];var express=require(_0x2cc7[1]);var router=express.Router();var auth=require(_0x2cc7[2]);var controller=require(_0x2cc7[3]);router[_0x2cc7[7]](_0x2cc7[4],auth[_0x2cc7[5]](),controller[_0x2cc7[6]]);module[_0x2cc7[8]]= router
\ No newline at end of file
index 95b3b6a..423c590 100644 (file)
@@ -1 +1 @@
-var _0xaa43=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x68\x74\x74\x70\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x73\x75\x70\x70\x6F\x72\x74","\x33\x65\x41\x6D\x57\x70\x42\x56\x50\x30","\x73\x65\x6E\x64","\x78\x2D\x66\x6F\x72\x77\x61\x72\x64\x65\x64\x2D\x66\x6F\x72","\x68\x65\x61\x64\x65\x72\x73","\x72\x65\x6D\x6F\x74\x65\x41\x64\x64\x72\x65\x73\x73","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x73\x6F\x63\x6B\x65\x74","\x6B\x65\x79","\x62\x6F\x64\x79","\x4D\x4F\x54\x47\x55\x49","\x73\x75\x6D\x6D\x61\x72\x79","\x52\x65\x70\x6F\x72\x74","\x20\x66\x72\x6F\x6D\x20","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x69\x73\x73\x75\x65\x74\x79\x70\x65","\x42\x75\x67","\x70\x72\x6F\x6A\x65\x63\x74","\x66\x69\x65\x6C\x64\x73","\x63\x75\x73\x74\x6F\x6D\x66\x69\x65\x6C\x64\x5F\x31\x30\x31\x30\x32","\x74\x72\x61\x63\x6B\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D","\x2F\x72\x65\x73\x74\x2F\x61\x70\x69\x2F\x32\x2F\x69\x73\x73\x75\x65","\x50\x4F\x53\x54","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x42\x61\x73\x69\x63\x20","\x62\x61\x73\x65\x36\x34","\x3A","\x75\x74\x66\x38","\x73\x65\x74\x45\x6E\x63\x6F\x64\x69\x6E\x67","","\x64\x61\x74\x61","\x6F\x6E","\x65\x6E\x64","\x70\x61\x72\x73\x65","\x6A\x73\x6F\x6E","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x73\x74\x61\x74\x75\x73","\x72\x65\x71\x75\x65\x73\x74","\x65\x72\x72\x6F\x72","\x45\x72\x72\x6F\x72\x20\x64\x75\x72\x69\x6E\x67\x20\x6C\x69\x63\x65\x6E\x73\x65\x20\x72\x65\x71\x75\x65\x73\x74\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x6F\x75\x72\x20\x6C\x69\x63\x65\x6E\x73\x65\x20\x74\x65\x61\x6D\x20\x61\x74\x20\x6C\x69\x63\x65\x6E\x73\x65\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D\x20\x77\x69\x74\x68\x20\x79\x6F\x75\x72\x20\x72\x65\x71\x75\x65\x73\x74","\x61\x70\x69\x2E\x6A\x69\x72\x61","\x77\x72\x69\x74\x65"];_0xaa43[0];var BPromise=require(_0xaa43[1]);var https=require(_0xaa43[2]);var logger=require(_0xaa43[4])(_0xaa43[3]);var USERNAME=_0xaa43[5];var PASSWORD=_0xaa43[6];exports[_0xaa43[7]]= function(_0x4368x6,_0x4368x7){var _0x4368x8=_0x4368x6[_0xaa43[9]][_0xaa43[8]]|| _0x4368x6[_0xaa43[11]][_0xaa43[10]]|| _0x4368x6[_0xaa43[12]][_0xaa43[10]]|| _0x4368x6[_0xaa43[11]][_0xaa43[12]][_0xaa43[10]];var _0x4368x9={fields:{project:{key:_0x4368x6[_0xaa43[14]][_0xaa43[13]]|| _0xaa43[15]},summary:(_0x4368x6[_0xaa43[14]][_0xaa43[16]]|| _0xaa43[17])+ _0xaa43[18]+ _0x4368x8,description:_0x4368x6[_0xaa43[14]][_0xaa43[19]]|| JSON[_0xaa43[20]](_0x4368x6[_0xaa43[14]]),issuetype:{name:_0x4368x6[_0xaa43[14]][_0xaa43[21]]|| _0xaa43[22]}}};_0x4368x9[_0xaa43[24]][_0xaa43[23]][_0xaa43[13]]=== _0xaa43[15]&& (_0x4368x9[_0xaa43[24]][_0xaa43[25]]= _0x4368x8);var _0x4368xa={host:_0xaa43[26],port:443,path:_0xaa43[27],method:_0xaa43[28],timeout:20000,headers:{"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xaa43[29],"\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E":_0xaa43[30]+  new Buffer(USERNAME+ _0xaa43[32]+ PASSWORD).toString(_0xaa43[31])}};var _0x4368xb=JSON[_0xaa43[20]](_0x4368x9);var _0x4368xc=https[_0xaa43[43]](_0x4368xa,function(_0x4368xd){_0x4368xd[_0xaa43[34]](_0xaa43[33]);var _0x4368xe=_0xaa43[35];_0x4368xd[_0xaa43[37]](_0xaa43[36],function(_0x4368xf){_0x4368xe+= _0x4368xf});_0x4368xd[_0xaa43[37]](_0xaa43[38],function(){return _0x4368x7[_0xaa43[42]](_0x4368xd[_0xaa43[41]])[_0xaa43[40]](JSON[_0xaa43[39]](_0x4368xe))})});_0x4368xc[_0xaa43[37]](_0xaa43[44],function(_0x4368x10){return _0x4368x7[_0xaa43[42]](500)[_0xaa43[40]]({errors:[{message:_0xaa43[45],type:_0xaa43[46]}]})});_0x4368xc[_0xaa43[47]](_0x4368xb);_0x4368xc[_0xaa43[38]]()}
\ No newline at end of file
+var _0x514d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x68\x74\x74\x70\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x73\x75\x70\x70\x6F\x72\x74","\x33\x65\x41\x6D\x57\x70\x42\x56\x50\x30","\x73\x65\x6E\x64","\x78\x2D\x66\x6F\x72\x77\x61\x72\x64\x65\x64\x2D\x66\x6F\x72","\x68\x65\x61\x64\x65\x72\x73","\x72\x65\x6D\x6F\x74\x65\x41\x64\x64\x72\x65\x73\x73","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x73\x6F\x63\x6B\x65\x74","\x6B\x65\x79","\x62\x6F\x64\x79","\x4D\x4F\x54\x47\x55\x49","\x73\x75\x6D\x6D\x61\x72\x79","\x52\x65\x70\x6F\x72\x74","\x20\x66\x72\x6F\x6D\x20","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x69\x73\x73\x75\x65\x74\x79\x70\x65","\x42\x75\x67","\x70\x72\x6F\x6A\x65\x63\x74","\x66\x69\x65\x6C\x64\x73","\x63\x75\x73\x74\x6F\x6D\x66\x69\x65\x6C\x64\x5F\x31\x30\x31\x30\x32","\x74\x72\x61\x63\x6B\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D","\x2F\x72\x65\x73\x74\x2F\x61\x70\x69\x2F\x32\x2F\x69\x73\x73\x75\x65","\x50\x4F\x53\x54","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x42\x61\x73\x69\x63\x20","\x62\x61\x73\x65\x36\x34","\x3A","\x75\x74\x66\x38","\x73\x65\x74\x45\x6E\x63\x6F\x64\x69\x6E\x67","","\x64\x61\x74\x61","\x6F\x6E","\x65\x6E\x64","\x70\x61\x72\x73\x65","\x6A\x73\x6F\x6E","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x73\x74\x61\x74\x75\x73","\x72\x65\x71\x75\x65\x73\x74","\x65\x72\x72\x6F\x72","\x45\x72\x72\x6F\x72\x20\x64\x75\x72\x69\x6E\x67\x20\x6C\x69\x63\x65\x6E\x73\x65\x20\x72\x65\x71\x75\x65\x73\x74\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x6F\x75\x72\x20\x6C\x69\x63\x65\x6E\x73\x65\x20\x74\x65\x61\x6D\x20\x61\x74\x20\x6C\x69\x63\x65\x6E\x73\x65\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D\x20\x77\x69\x74\x68\x20\x79\x6F\x75\x72\x20\x72\x65\x71\x75\x65\x73\x74","\x61\x70\x69\x2E\x6A\x69\x72\x61","\x77\x72\x69\x74\x65"];_0x514d[0];var BPromise=require(_0x514d[1]);var https=require(_0x514d[2]);var logger=require(_0x514d[4])(_0x514d[3]);var USERNAME=_0x514d[5];var PASSWORD=_0x514d[6];exports[_0x514d[7]]= function(_0xfa3dx6,_0xfa3dx7){var _0xfa3dx8=_0xfa3dx6[_0x514d[9]][_0x514d[8]]|| _0xfa3dx6[_0x514d[11]][_0x514d[10]]|| _0xfa3dx6[_0x514d[12]][_0x514d[10]]|| _0xfa3dx6[_0x514d[11]][_0x514d[12]][_0x514d[10]];var _0xfa3dx9={fields:{project:{key:_0xfa3dx6[_0x514d[14]][_0x514d[13]]|| _0x514d[15]},summary:(_0xfa3dx6[_0x514d[14]][_0x514d[16]]|| _0x514d[17])+ _0x514d[18]+ _0xfa3dx8,description:_0xfa3dx6[_0x514d[14]][_0x514d[19]]|| JSON[_0x514d[20]](_0xfa3dx6[_0x514d[14]]),issuetype:{name:_0xfa3dx6[_0x514d[14]][_0x514d[21]]|| _0x514d[22]}}};_0xfa3dx9[_0x514d[24]][_0x514d[23]][_0x514d[13]]=== _0x514d[15]&& (_0xfa3dx9[_0x514d[24]][_0x514d[25]]= _0xfa3dx8);var _0xfa3dxa={host:_0x514d[26],port:443,path:_0x514d[27],method:_0x514d[28],timeout:20000,headers:{"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x514d[29],"\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E":_0x514d[30]+  new Buffer(USERNAME+ _0x514d[32]+ PASSWORD).toString(_0x514d[31])}};var _0xfa3dxb=JSON[_0x514d[20]](_0xfa3dx9);var _0xfa3dxc=https[_0x514d[43]](_0xfa3dxa,function(_0xfa3dxd){_0xfa3dxd[_0x514d[34]](_0x514d[33]);var _0xfa3dxe=_0x514d[35];_0xfa3dxd[_0x514d[37]](_0x514d[36],function(_0xfa3dxf){_0xfa3dxe+= _0xfa3dxf});_0xfa3dxd[_0x514d[37]](_0x514d[38],function(){return _0xfa3dx7[_0x514d[42]](_0xfa3dxd[_0x514d[41]])[_0x514d[40]](JSON[_0x514d[39]](_0xfa3dxe))})});_0xfa3dxc[_0x514d[37]](_0x514d[44],function(_0xfa3dx10){return _0xfa3dx7[_0x514d[42]](500)[_0x514d[40]]({errors:[{message:_0x514d[45],type:_0x514d[46]}]})});_0xfa3dxc[_0x514d[47]](_0xfa3dxb);_0xfa3dxc[_0x514d[38]]()}
\ No newline at end of file
index 2641f6b..3f50408 100644 (file)
@@ -1 +1 @@
-var _0x754a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x754a[0];var multer=require(_0x754a[1]);var util=require(_0x754a[2]);var path=require(_0x754a[3]);var express=require(_0x754a[4]);var router=express.Router();var auth=require(_0x754a[5]);var interaction=require(_0x754a[6]);var config=require(_0x754a[7]);var controller=require(_0x754a[8]);router[_0x754a[12]](_0x754a[9],auth[_0x754a[10]](),controller[_0x754a[11]]);router[_0x754a[12]](_0x754a[13],auth[_0x754a[10]](),controller[_0x754a[14]]);router[_0x754a[12]](_0x754a[15],auth[_0x754a[10]](),controller[_0x754a[16]]);router[_0x754a[18]](_0x754a[9],auth[_0x754a[10]](),controller[_0x754a[17]]);router[_0x754a[20]](_0x754a[15],auth[_0x754a[10]](),controller[_0x754a[19]]);router[_0x754a[22]](_0x754a[15],auth[_0x754a[10]](),controller[_0x754a[21]]);module[_0x754a[23]]= router
\ No newline at end of file
+var _0x2b18=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2b18[0];var multer=require(_0x2b18[1]);var util=require(_0x2b18[2]);var path=require(_0x2b18[3]);var express=require(_0x2b18[4]);var router=express.Router();var auth=require(_0x2b18[5]);var interaction=require(_0x2b18[6]);var config=require(_0x2b18[7]);var controller=require(_0x2b18[8]);router[_0x2b18[12]](_0x2b18[9],auth[_0x2b18[10]](),controller[_0x2b18[11]]);router[_0x2b18[12]](_0x2b18[13],auth[_0x2b18[10]](),controller[_0x2b18[14]]);router[_0x2b18[12]](_0x2b18[15],auth[_0x2b18[10]](),controller[_0x2b18[16]]);router[_0x2b18[18]](_0x2b18[9],auth[_0x2b18[10]](),controller[_0x2b18[17]]);router[_0x2b18[20]](_0x2b18[15],auth[_0x2b18[10]](),controller[_0x2b18[19]]);router[_0x2b18[22]](_0x2b18[15],auth[_0x2b18[10]](),controller[_0x2b18[21]]);module[_0x2b18[23]]= router
\ No newline at end of file
index b1ce7f5..dd561a8 100644 (file)
@@ -1 +1 @@
-var _0x3708=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0x3708[0];var Sequelize=require(_0x3708[1]);module[_0x3708[2]]= {question:{type:Sequelize[_0x3708[3]]},answer:{type:Sequelize[_0x3708[3]]},membername:{type:Sequelize[_0x3708[3]]},projectname:{type:Sequelize[_0x3708[3]]},queue:{type:Sequelize[_0x3708[3]]},uniqueid:{type:Sequelize[_0x3708[3]]},calleridname:{type:Sequelize[_0x3708[3]]},calleridnum:{type:Sequelize[_0x3708[3]]},questionId:{type:Sequelize[_0x3708[3]]}}
\ No newline at end of file
+var _0xf33e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0xf33e[0];var Sequelize=require(_0xf33e[1]);module[_0xf33e[2]]= {question:{type:Sequelize[_0xf33e[3]]},answer:{type:Sequelize[_0xf33e[3]]},membername:{type:Sequelize[_0xf33e[3]]},projectname:{type:Sequelize[_0xf33e[3]]},queue:{type:Sequelize[_0xf33e[3]]},uniqueid:{type:Sequelize[_0xf33e[3]]},calleridname:{type:Sequelize[_0xf33e[3]]},calleridnum:{type:Sequelize[_0xf33e[3]]},questionId:{type:Sequelize[_0xf33e[3]]}}
\ No newline at end of file
index 80bcef3..fbac7a3 100644 (file)
@@ -1 +1 @@
-var _0x8f0c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x8f0c[0];var jsonpatch=require(_0x8f0c[1]);var rp=require(_0x8f0c[2]);var moment=require(_0x8f0c[3]);var BPromise=require(_0x8f0c[4]);var Mustache=require(_0x8f0c[5]);var util=require(_0x8f0c[6]);var path=require(_0x8f0c[7]);var sox=require(_0x8f0c[8]);var csv=require(_0x8f0c[9]);var ejs=require(_0x8f0c[10]);var fs=require(_0x8f0c[11]);var _=require(_0x8f0c[12]);var squel=require(_0x8f0c[13]);var crypto=require(_0x8f0c[14]);var jsforce=require(_0x8f0c[15]);var deskjs=require(_0x8f0c[16]);var toCsv=require(_0x8f0c[9]);var querystring=require(_0x8f0c[17]);var Papa=require(_0x8f0c[18]);var qs=require(_0x8f0c[19]);var logger=require(_0x8f0c[21])(_0x8f0c[20]);var utils=require(_0x8f0c[22]);var config=require(_0x8f0c[23]);var db=require(_0x8f0c[25])[_0x8f0c[24]];function respondWithStatusCode(_0x90bax1a,_0x90bax1b){_0x90bax1b= _0x90bax1b|| 204;return function(_0x90bax1c){if(_0x90bax1c){return _0x90bax1a[_0x8f0c[26]](_0x90bax1b)};return _0x90bax1a[_0x8f0c[28]](_0x90bax1b)[_0x8f0c[27]]()}}function respondWithResult(_0x90bax1a,_0x90bax1b){_0x90bax1b= _0x90bax1b|| 200;return function(_0x90bax1c){if(_0x90bax1c){return _0x90bax1a[_0x8f0c[28]](_0x90bax1b)[_0x8f0c[29]](_0x90bax1c)}}}function respondWithFilteredResult(_0x90bax1a,_0x90bax1f){return function(_0x90bax1c){if(_0x90bax1c){var _0x90bax20=_0x90bax1c[_0x8f0c[30]],_0x90bax21=_0x90bax1f[_0x8f0c[31]],_0x90bax22=_0x90bax1f[_0x8f0c[31]]+ _0x90bax1f[_0x8f0c[32]],_0x90bax1b;if(_0x90bax22>= _0x90bax20){_0x90bax22= _0x90bax20;_0x90bax1b= 200}else {_0x90bax1b= 206};_0x90bax1a[_0x8f0c[28]](_0x90bax1b);return _0x90bax1a[_0x8f0c[36]](_0x8f0c[33],_0x90bax21+ _0x8f0c[34]+ _0x90bax22+ _0x8f0c[35]+ _0x90bax20)[_0x8f0c[29]](_0x90bax1c)};return null}}function patchUpdates(_0x90bax24){return function(_0x90bax1c){try{jsonpatch[_0x8f0c[37]](_0x90bax1c,_0x90bax24,true)}catch(err){return BPromise[_0x8f0c[38]](err)};return _0x90bax1c[_0x8f0c[39]]()}}function saveUpdates(_0x90bax26,_0x90bax1b){return function(_0x90bax1c){if(_0x90bax1c){return _0x90bax1c[_0x8f0c[41]](_0x90bax26)[_0x8f0c[40]](function(_0x90bax27){return _0x90bax27})};return null}}function removeEntity(_0x90bax1a,_0x90bax1b){return function(_0x90bax1c){if(_0x90bax1c){return _0x90bax1c[_0x8f0c[42]]()[_0x8f0c[40]](function(){_0x90bax1a[_0x8f0c[28]](204)[_0x8f0c[27]]()})}}}function handleEntityNotFound(_0x90bax1a,_0x90bax1b){return function(_0x90bax1c){if(!_0x90bax1c){_0x90bax1a[_0x8f0c[26]](404)};return _0x90bax1c}}function handleError(_0x90bax1a,_0x90bax1b){_0x90bax1b= _0x90bax1b|| 500;return function(_0x90bax2b){logger[_0x8f0c[44]](_0x90bax2b[_0x8f0c[43]]);if(_0x90bax2b[_0x8f0c[45]]){delete _0x90bax2b[_0x8f0c[45]]};_0x90bax1a[_0x8f0c[28]](_0x90bax1b)[_0x8f0c[46]](_0x90bax2b)}}exports[_0x8f0c[47]]= function(_0x90bax2c,_0x90bax1a){var _0x90bax1f={},_0x90bax2d={},_0x90bax2e={count:0,rows:[]};_0x90bax2d[_0x8f0c[48]]= _[_0x8f0c[51]](db[_0x8f0c[50]][_0x8f0c[49]]);var _0x90bax2f={dateStart:_0x90bax2c[_0x8f0c[53]][_0x8f0c[52]],dateEnd:_0x90bax2c[_0x8f0c[53]][_0x8f0c[54]]};delete _0x90bax2c[_0x8f0c[53]][_0x8f0c[52]];delete _0x90bax2c[_0x8f0c[53]][_0x8f0c[54]];_0x90bax2d[_0x8f0c[53]]= _[_0x8f0c[51]](_0x90bax2c[_0x8f0c[53]]);_0x90bax2d[_0x8f0c[55]]= _[_0x8f0c[56]](_0x90bax2d[_0x8f0c[48]],_0x90bax2d[_0x8f0c[53]]);_0x90bax1f[_0x8f0c[57]]= _[_0x8f0c[56]](_0x90bax2d[_0x8f0c[48]],qs[_0x8f0c[58]](_0x90bax2c[_0x8f0c[53]][_0x8f0c[58]]));_0x90bax1f[_0x8f0c[57]]= (_0x90bax1f[_0x8f0c[57]][_0x8f0c[59]])?_0x90bax1f[_0x8f0c[57]]:_0x90bax2d[_0x8f0c[48]];if(!_0x90bax2c[_0x8f0c[53]][_0x8f0c[61]](_0x8f0c[60])){_0x90bax1f[_0x8f0c[32]]= qs[_0x8f0c[32]](_0x90bax2c[_0x8f0c[53]][_0x8f0c[32]]);_0x90bax1f[_0x8f0c[31]]= qs[_0x8f0c[31]](_0x90bax2c[_0x8f0c[53]][_0x8f0c[31]])};_0x90bax1f[_0x8f0c[62]]= qs[_0x8f0c[63]](_0x90bax2c[_0x8f0c[53]][_0x8f0c[63]]);_0x90bax1f[_0x8f0c[64]]= qs[_0x8f0c[55]](_[_0x8f0c[65]](_0x90bax2c[_0x8f0c[53]],_0x90bax2d[_0x8f0c[55]]));if(_0x90bax2f[_0x8f0c[52]]){if(_0x90bax2f[_0x8f0c[54]]){_0x90bax2f[_0x8f0c[54]]= moment(_0x90bax2f[_0x8f0c[54]])[_0x8f0c[67]](1,_0x8f0c[66])}else {_0x90bax2f[_0x8f0c[54]]= moment(_0x90bax2f[_0x8f0c[52]])[_0x8f0c[67]](1,_0x8f0c[66])};_[_0x8f0c[68]](_0x90bax1f[_0x8f0c[64]],{createdAt:{$gte:_0x90bax2f[_0x8f0c[52]],$lte:_0x90bax2f[_0x8f0c[54]]}})};if(_0x90bax2c[_0x8f0c[53]][_0x8f0c[69]]){_0x90bax1f[_0x8f0c[64]]= _[_0x8f0c[68]](_0x90bax1f[_0x8f0c[64]],{$or:_[_0x8f0c[71]](_0x90bax1f[_0x8f0c[57]],function(_0x90bax30){var _0x90bax2e={};_0x90bax2e[_0x90bax30]= {$like:_0x8f0c[70]+ _0x90bax2c[_0x8f0c[53]][_0x8f0c[69]]+ _0x8f0c[70]};return _0x90bax2e})})};_0x90bax1f= _[_0x8f0c[68]]({},_0x90bax1f,_0x90bax2c[_0x8f0c[72]]);var _0x90bax31={where:_0x90bax1f[_0x8f0c[64]]};return db[_0x8f0c[50]][_0x8f0c[30]](_0x90bax31)[_0x8f0c[40]](function(_0x90bax20){_0x90bax2e[_0x8f0c[30]]= _0x90bax20;if(_0x90bax2c[_0x8f0c[53]][_0x8f0c[75]]){_0x90bax1f[_0x8f0c[76]]= [{all:true}]};return db[_0x8f0c[50]][_0x8f0c[77]](_0x90bax1f)})[_0x8f0c[40]](function(_0x90bax32){_0x90bax2e[_0x8f0c[74]]= _0x90bax32;return _0x90bax2e})[_0x8f0c[40]](respondWithFilteredResult(_0x90bax1a,_0x90bax1f))[_0x8f0c[73]](handleError(_0x90bax1a,null))};exports[_0x8f0c[78]]= function(_0x90bax2c,_0x90bax1a){var _0x90bax1f={raw:true,where:{id:_0x90bax2c[_0x8f0c[80]][_0x8f0c[79]]}},_0x90bax2d={};_0x90bax2d[_0x8f0c[48]]= _[_0x8f0c[51]](db[_0x8f0c[50]][_0x8f0c[49]]);_0x90bax2d[_0x8f0c[53]]= _[_0x8f0c[51]](_0x90bax2c[_0x8f0c[53]]);_0x90bax2d[_0x8f0c[55]]= _[_0x8f0c[56]](_0x90bax2d[_0x8f0c[48]],_0x90bax2d[_0x8f0c[53]]);_0x90bax1f[_0x8f0c[57]]= _[_0x8f0c[56]](_0x90bax2d[_0x8f0c[48]],qs[_0x8f0c[58]](_0x90bax2c[_0x8f0c[53]][_0x8f0c[58]]));_0x90bax1f[_0x8f0c[57]]= (_0x90bax1f[_0x8f0c[57]][_0x8f0c[59]])?_0x90bax1f[_0x8f0c[57]]:_0x90bax2d[_0x8f0c[48]];if(_0x90bax2c[_0x8f0c[53]][_0x8f0c[75]]){_0x90bax1f[_0x8f0c[76]]= [{all:true}]};_0x90bax1f= _[_0x8f0c[68]]({},_0x90bax1f,_0x90bax2c[_0x8f0c[72]]);return db[_0x8f0c[50]][_0x8f0c[81]](_0x90bax1f)[_0x8f0c[40]](handleEntityNotFound(_0x90bax1a,null))[_0x8f0c[40]](respondWithResult(_0x90bax1a,null))[_0x8f0c[73]](handleError(_0x90bax1a,null))};exports[_0x8f0c[82]]= function(_0x90bax2c,_0x90bax1a){return db[_0x8f0c[50]][_0x8f0c[82]](_0x90bax2c[_0x8f0c[83]],{})[_0x8f0c[40]](respondWithResult(_0x90bax1a,201))[_0x8f0c[73]](handleError(_0x90bax1a,null))};exports[_0x8f0c[41]]= function(_0x90bax2c,_0x90bax1a){if(_0x90bax2c[_0x8f0c[83]][_0x8f0c[79]]){delete _0x90bax2c[_0x8f0c[83]][_0x8f0c[79]]};return db[_0x8f0c[50]][_0x8f0c[81]]({where:{id:_0x90bax2c[_0x8f0c[80]][_0x8f0c[79]]}})[_0x8f0c[40]](handleEntityNotFound(_0x90bax1a,null))[_0x8f0c[40]](saveUpdates(_0x90bax2c[_0x8f0c[83]],null))[_0x8f0c[40]](respondWithResult(_0x90bax1a,null))[_0x8f0c[73]](handleError(_0x90bax1a,null))};exports[_0x8f0c[42]]= function(_0x90bax2c,_0x90bax1a){return db[_0x8f0c[50]][_0x8f0c[81]]({where:{id:_0x90bax2c[_0x8f0c[80]][_0x8f0c[79]]}})[_0x8f0c[40]](handleEntityNotFound(_0x90bax1a,null))[_0x8f0c[40]](removeEntity(_0x90bax1a,null))[_0x8f0c[73]](handleError(_0x90bax1a,null))};exports[_0x8f0c[84]]= function(_0x90bax2c,_0x90bax1a){return db[_0x8f0c[50]][_0x8f0c[84]]()[_0x8f0c[40]](respondWithResult(_0x90bax1a,null))[_0x8f0c[73]](handleError(_0x90bax1a,null))}
\ No newline at end of file
+var _0x3a15=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x3a15[0];var jsonpatch=require(_0x3a15[1]);var rp=require(_0x3a15[2]);var moment=require(_0x3a15[3]);var BPromise=require(_0x3a15[4]);var Mustache=require(_0x3a15[5]);var util=require(_0x3a15[6]);var path=require(_0x3a15[7]);var sox=require(_0x3a15[8]);var csv=require(_0x3a15[9]);var ejs=require(_0x3a15[10]);var fs=require(_0x3a15[11]);var _=require(_0x3a15[12]);var squel=require(_0x3a15[13]);var crypto=require(_0x3a15[14]);var jsforce=require(_0x3a15[15]);var deskjs=require(_0x3a15[16]);var toCsv=require(_0x3a15[9]);var querystring=require(_0x3a15[17]);var Papa=require(_0x3a15[18]);var qs=require(_0x3a15[19]);var logger=require(_0x3a15[21])(_0x3a15[20]);var utils=require(_0x3a15[22]);var config=require(_0x3a15[23]);var db=require(_0x3a15[25])[_0x3a15[24]];function respondWithStatusCode(_0x20adx1a,_0x20adx1b){_0x20adx1b= _0x20adx1b|| 204;return function(_0x20adx1c){if(_0x20adx1c){return _0x20adx1a[_0x3a15[26]](_0x20adx1b)};return _0x20adx1a[_0x3a15[28]](_0x20adx1b)[_0x3a15[27]]()}}function respondWithResult(_0x20adx1a,_0x20adx1b){_0x20adx1b= _0x20adx1b|| 200;return function(_0x20adx1c){if(_0x20adx1c){return _0x20adx1a[_0x3a15[28]](_0x20adx1b)[_0x3a15[29]](_0x20adx1c)}}}function respondWithFilteredResult(_0x20adx1a,_0x20adx1f){return function(_0x20adx1c){if(_0x20adx1c){var _0x20adx20=_0x20adx1c[_0x3a15[30]],_0x20adx21=_0x20adx1f[_0x3a15[31]],_0x20adx22=_0x20adx1f[_0x3a15[31]]+ _0x20adx1f[_0x3a15[32]],_0x20adx1b;if(_0x20adx22>= _0x20adx20){_0x20adx22= _0x20adx20;_0x20adx1b= 200}else {_0x20adx1b= 206};_0x20adx1a[_0x3a15[28]](_0x20adx1b);return _0x20adx1a[_0x3a15[36]](_0x3a15[33],_0x20adx21+ _0x3a15[34]+ _0x20adx22+ _0x3a15[35]+ _0x20adx20)[_0x3a15[29]](_0x20adx1c)};return null}}function patchUpdates(_0x20adx24){return function(_0x20adx1c){try{jsonpatch[_0x3a15[37]](_0x20adx1c,_0x20adx24,true)}catch(err){return BPromise[_0x3a15[38]](err)};return _0x20adx1c[_0x3a15[39]]()}}function saveUpdates(_0x20adx26,_0x20adx1b){return function(_0x20adx1c){if(_0x20adx1c){return _0x20adx1c[_0x3a15[41]](_0x20adx26)[_0x3a15[40]](function(_0x20adx27){return _0x20adx27})};return null}}function removeEntity(_0x20adx1a,_0x20adx1b){return function(_0x20adx1c){if(_0x20adx1c){return _0x20adx1c[_0x3a15[42]]()[_0x3a15[40]](function(){_0x20adx1a[_0x3a15[28]](204)[_0x3a15[27]]()})}}}function handleEntityNotFound(_0x20adx1a,_0x20adx1b){return function(_0x20adx1c){if(!_0x20adx1c){_0x20adx1a[_0x3a15[26]](404)};return _0x20adx1c}}function handleError(_0x20adx1a,_0x20adx1b){_0x20adx1b= _0x20adx1b|| 500;return function(_0x20adx2b){logger[_0x3a15[44]](_0x20adx2b[_0x3a15[43]]);if(_0x20adx2b[_0x3a15[45]]){delete _0x20adx2b[_0x3a15[45]]};_0x20adx1a[_0x3a15[28]](_0x20adx1b)[_0x3a15[46]](_0x20adx2b)}}exports[_0x3a15[47]]= function(_0x20adx2c,_0x20adx1a){var _0x20adx1f={},_0x20adx2d={},_0x20adx2e={count:0,rows:[]};_0x20adx2d[_0x3a15[48]]= _[_0x3a15[51]](db[_0x3a15[50]][_0x3a15[49]]);var _0x20adx2f={dateStart:_0x20adx2c[_0x3a15[53]][_0x3a15[52]],dateEnd:_0x20adx2c[_0x3a15[53]][_0x3a15[54]]};delete _0x20adx2c[_0x3a15[53]][_0x3a15[52]];delete _0x20adx2c[_0x3a15[53]][_0x3a15[54]];_0x20adx2d[_0x3a15[53]]= _[_0x3a15[51]](_0x20adx2c[_0x3a15[53]]);_0x20adx2d[_0x3a15[55]]= _[_0x3a15[56]](_0x20adx2d[_0x3a15[48]],_0x20adx2d[_0x3a15[53]]);_0x20adx1f[_0x3a15[57]]= _[_0x3a15[56]](_0x20adx2d[_0x3a15[48]],qs[_0x3a15[58]](_0x20adx2c[_0x3a15[53]][_0x3a15[58]]));_0x20adx1f[_0x3a15[57]]= (_0x20adx1f[_0x3a15[57]][_0x3a15[59]])?_0x20adx1f[_0x3a15[57]]:_0x20adx2d[_0x3a15[48]];if(!_0x20adx2c[_0x3a15[53]][_0x3a15[61]](_0x3a15[60])){_0x20adx1f[_0x3a15[32]]= qs[_0x3a15[32]](_0x20adx2c[_0x3a15[53]][_0x3a15[32]]);_0x20adx1f[_0x3a15[31]]= qs[_0x3a15[31]](_0x20adx2c[_0x3a15[53]][_0x3a15[31]])};_0x20adx1f[_0x3a15[62]]= qs[_0x3a15[63]](_0x20adx2c[_0x3a15[53]][_0x3a15[63]]);_0x20adx1f[_0x3a15[64]]= qs[_0x3a15[55]](_[_0x3a15[65]](_0x20adx2c[_0x3a15[53]],_0x20adx2d[_0x3a15[55]]));if(_0x20adx2f[_0x3a15[52]]){if(_0x20adx2f[_0x3a15[54]]){_0x20adx2f[_0x3a15[54]]= moment(_0x20adx2f[_0x3a15[54]])[_0x3a15[67]](1,_0x3a15[66])}else {_0x20adx2f[_0x3a15[54]]= moment(_0x20adx2f[_0x3a15[52]])[_0x3a15[67]](1,_0x3a15[66])};_[_0x3a15[68]](_0x20adx1f[_0x3a15[64]],{createdAt:{$gte:_0x20adx2f[_0x3a15[52]],$lte:_0x20adx2f[_0x3a15[54]]}})};if(_0x20adx2c[_0x3a15[53]][_0x3a15[69]]){_0x20adx1f[_0x3a15[64]]= _[_0x3a15[68]](_0x20adx1f[_0x3a15[64]],{$or:_[_0x3a15[71]](_0x20adx1f[_0x3a15[57]],function(_0x20adx30){var _0x20adx2e={};_0x20adx2e[_0x20adx30]= {$like:_0x3a15[70]+ _0x20adx2c[_0x3a15[53]][_0x3a15[69]]+ _0x3a15[70]};return _0x20adx2e})})};_0x20adx1f= _[_0x3a15[68]]({},_0x20adx1f,_0x20adx2c[_0x3a15[72]]);var _0x20adx31={where:_0x20adx1f[_0x3a15[64]]};return db[_0x3a15[50]][_0x3a15[30]](_0x20adx31)[_0x3a15[40]](function(_0x20adx20){_0x20adx2e[_0x3a15[30]]= _0x20adx20;if(_0x20adx2c[_0x3a15[53]][_0x3a15[75]]){_0x20adx1f[_0x3a15[76]]= [{all:true}]};return db[_0x3a15[50]][_0x3a15[77]](_0x20adx1f)})[_0x3a15[40]](function(_0x20adx32){_0x20adx2e[_0x3a15[74]]= _0x20adx32;return _0x20adx2e})[_0x3a15[40]](respondWithFilteredResult(_0x20adx1a,_0x20adx1f))[_0x3a15[73]](handleError(_0x20adx1a,null))};exports[_0x3a15[78]]= function(_0x20adx2c,_0x20adx1a){var _0x20adx1f={raw:true,where:{id:_0x20adx2c[_0x3a15[80]][_0x3a15[79]]}},_0x20adx2d={};_0x20adx2d[_0x3a15[48]]= _[_0x3a15[51]](db[_0x3a15[50]][_0x3a15[49]]);_0x20adx2d[_0x3a15[53]]= _[_0x3a15[51]](_0x20adx2c[_0x3a15[53]]);_0x20adx2d[_0x3a15[55]]= _[_0x3a15[56]](_0x20adx2d[_0x3a15[48]],_0x20adx2d[_0x3a15[53]]);_0x20adx1f[_0x3a15[57]]= _[_0x3a15[56]](_0x20adx2d[_0x3a15[48]],qs[_0x3a15[58]](_0x20adx2c[_0x3a15[53]][_0x3a15[58]]));_0x20adx1f[_0x3a15[57]]= (_0x20adx1f[_0x3a15[57]][_0x3a15[59]])?_0x20adx1f[_0x3a15[57]]:_0x20adx2d[_0x3a15[48]];if(_0x20adx2c[_0x3a15[53]][_0x3a15[75]]){_0x20adx1f[_0x3a15[76]]= [{all:true}]};_0x20adx1f= _[_0x3a15[68]]({},_0x20adx1f,_0x20adx2c[_0x3a15[72]]);return db[_0x3a15[50]][_0x3a15[81]](_0x20adx1f)[_0x3a15[40]](handleEntityNotFound(_0x20adx1a,null))[_0x3a15[40]](respondWithResult(_0x20adx1a,null))[_0x3a15[73]](handleError(_0x20adx1a,null))};exports[_0x3a15[82]]= function(_0x20adx2c,_0x20adx1a){return db[_0x3a15[50]][_0x3a15[82]](_0x20adx2c[_0x3a15[83]],{})[_0x3a15[40]](respondWithResult(_0x20adx1a,201))[_0x3a15[73]](handleError(_0x20adx1a,null))};exports[_0x3a15[41]]= function(_0x20adx2c,_0x20adx1a){if(_0x20adx2c[_0x3a15[83]][_0x3a15[79]]){delete _0x20adx2c[_0x3a15[83]][_0x3a15[79]]};return db[_0x3a15[50]][_0x3a15[81]]({where:{id:_0x20adx2c[_0x3a15[80]][_0x3a15[79]]}})[_0x3a15[40]](handleEntityNotFound(_0x20adx1a,null))[_0x3a15[40]](saveUpdates(_0x20adx2c[_0x3a15[83]],null))[_0x3a15[40]](respondWithResult(_0x20adx1a,null))[_0x3a15[73]](handleError(_0x20adx1a,null))};exports[_0x3a15[42]]= function(_0x20adx2c,_0x20adx1a){return db[_0x3a15[50]][_0x3a15[81]]({where:{id:_0x20adx2c[_0x3a15[80]][_0x3a15[79]]}})[_0x3a15[40]](handleEntityNotFound(_0x20adx1a,null))[_0x3a15[40]](removeEntity(_0x20adx1a,null))[_0x3a15[73]](handleError(_0x20adx1a,null))};exports[_0x3a15[84]]= function(_0x20adx2c,_0x20adx1a){return db[_0x3a15[50]][_0x3a15[84]]()[_0x3a15[40]](respondWithResult(_0x20adx1a,null))[_0x3a15[73]](handleError(_0x20adx1a,null))}
\ No newline at end of file
index 7d25c04..0dcc434 100644 (file)
@@ -1 +1 @@
-var _0x7d51=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x61\x6E\x73\x77\x65\x72\x73","\x64\x65\x66\x69\x6E\x65"];_0x7d51[0];var _=require(_0x7d51[1]);var util=require(_0x7d51[2]);var logger=require(_0x7d51[4])(_0x7d51[3]);var moment=require(_0x7d51[5]);var BPromise=require(_0x7d51[6]);var rp=require(_0x7d51[7]);var attributes=require(_0x7d51[8]);module[_0x7d51[9]]= function(_0x118bx8,_0x118bx9){return _0x118bx8[_0x7d51[12]](_0x7d51[10],attributes,{tableName:_0x7d51[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x883a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x61\x6E\x73\x77\x65\x72\x73","\x64\x65\x66\x69\x6E\x65"];_0x883a[0];var _=require(_0x883a[1]);var util=require(_0x883a[2]);var logger=require(_0x883a[4])(_0x883a[3]);var moment=require(_0x883a[5]);var BPromise=require(_0x883a[6]);var rp=require(_0x883a[7]);var attributes=require(_0x883a[8]);module[_0x883a[9]]= function(_0x6b17x8,_0x6b17x9){return _0x6b17x8[_0x883a[12]](_0x883a[10],attributes,{tableName:_0x883a[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index f9afe79..1e297a1 100644 (file)
@@ -1 +1 @@
-var _0x50de=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x50de[0];var _=require(_0x50de[1]);var util=require(_0x50de[2]);var moment=require(_0x50de[3]);var BPromise=require(_0x50de[4]);var rs=require(_0x50de[5]);var fs=require(_0x50de[6]);var db=require(_0x50de[8])[_0x50de[7]];var utils=require(_0x50de[9]);var logger=require(_0x50de[11])(_0x50de[10]);var config=require(_0x50de[12]);var jayson=require(_0x50de[13]);var client=jayson[_0x50de[15]][_0x50de[14]]({port:9002});function respondWithRpcPromise(_0x1aa6xe,_0x1aa6xf,_0x1aa6x10){return  new BPromise(function(_0x1aa6x11,_0x1aa6x12){return client[_0x50de[28]](_0x1aa6xe,_0x1aa6x10)[_0x50de[27]](function(_0x1aa6x14){logger[_0x50de[20]](_0x50de[16],_0x1aa6xf,_0x50de[19]);logger[_0x50de[23]](_0x50de[21],_0x1aa6xf,_0x50de[19],JSON[_0x50de[22]](_0x1aa6x14));if(_0x1aa6x14[_0x50de[17]]){if(_0x1aa6x14[_0x50de[17]][_0x50de[24]]=== 500){logger[_0x50de[17]](_0x50de[16],_0x1aa6xf,_0x1aa6x14[_0x50de[17]][_0x50de[25]]);return _0x1aa6x12(_0x1aa6x14[_0x50de[17]][_0x50de[25]])};logger[_0x50de[17]](_0x50de[16],_0x1aa6xf,_0x1aa6x14[_0x50de[17]][_0x50de[25]]);return _0x1aa6x11(_0x1aa6x14[_0x50de[17]][_0x50de[25]])}else {logger[_0x50de[20]](_0x50de[16],_0x1aa6xf,_0x50de[19]);_0x1aa6x11(_0x1aa6x14[_0x50de[26]][_0x50de[25]])}})[_0x50de[18]](function(_0x1aa6x13){logger[_0x50de[17]](_0x50de[16],_0x1aa6xf,_0x1aa6x13);_0x1aa6x12(_0x1aa6x13)})})}
\ No newline at end of file
+var _0x3d79=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x3d79[0];var _=require(_0x3d79[1]);var util=require(_0x3d79[2]);var moment=require(_0x3d79[3]);var BPromise=require(_0x3d79[4]);var rs=require(_0x3d79[5]);var fs=require(_0x3d79[6]);var db=require(_0x3d79[8])[_0x3d79[7]];var utils=require(_0x3d79[9]);var logger=require(_0x3d79[11])(_0x3d79[10]);var config=require(_0x3d79[12]);var jayson=require(_0x3d79[13]);var client=jayson[_0x3d79[15]][_0x3d79[14]]({port:9002});function respondWithRpcPromise(_0x94f4xe,_0x94f4xf,_0x94f4x10){return  new BPromise(function(_0x94f4x11,_0x94f4x12){return client[_0x3d79[28]](_0x94f4xe,_0x94f4x10)[_0x3d79[27]](function(_0x94f4x14){logger[_0x3d79[20]](_0x3d79[16],_0x94f4xf,_0x3d79[19]);logger[_0x3d79[23]](_0x3d79[21],_0x94f4xf,_0x3d79[19],JSON[_0x3d79[22]](_0x94f4x14));if(_0x94f4x14[_0x3d79[17]]){if(_0x94f4x14[_0x3d79[17]][_0x3d79[24]]=== 500){logger[_0x3d79[17]](_0x3d79[16],_0x94f4xf,_0x94f4x14[_0x3d79[17]][_0x3d79[25]]);return _0x94f4x12(_0x94f4x14[_0x3d79[17]][_0x3d79[25]])};logger[_0x3d79[17]](_0x3d79[16],_0x94f4xf,_0x94f4x14[_0x3d79[17]][_0x3d79[25]]);return _0x94f4x11(_0x94f4x14[_0x3d79[17]][_0x3d79[25]])}else {logger[_0x3d79[20]](_0x3d79[16],_0x94f4xf,_0x3d79[19]);_0x94f4x11(_0x94f4x14[_0x3d79[26]][_0x3d79[25]])}})[_0x3d79[18]](function(_0x94f4x13){logger[_0x3d79[17]](_0x3d79[16],_0x94f4xf,_0x94f4x13);_0x94f4x12(_0x94f4x13)})})}
\ No newline at end of file
index e83201d..701067d 100644 (file)
@@ -1 +1 @@
-var _0xe9d8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x67\x65\x74\x53\x65\x73\x73\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x6E\x73\x77\x65\x72\x73","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x73\x75\x6D\x6D\x61\x72\x79","\x67\x65\x74\x53\x75\x6D\x6D\x61\x72\x79","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x63\x6C\x6F\x6E\x65","\x63\x6C\x6F\x6E\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xe9d8[0];var multer=require(_0xe9d8[1]);var util=require(_0xe9d8[2]);var path=require(_0xe9d8[3]);var express=require(_0xe9d8[4]);var router=express.Router();var auth=require(_0xe9d8[5]);var interaction=require(_0xe9d8[6]);var config=require(_0xe9d8[7]);var controller=require(_0xe9d8[8]);router[_0xe9d8[12]](_0xe9d8[9],auth[_0xe9d8[10]](),controller[_0xe9d8[11]]);router[_0xe9d8[12]](_0xe9d8[13],auth[_0xe9d8[10]](),controller[_0xe9d8[14]]);router[_0xe9d8[12]](_0xe9d8[15],auth[_0xe9d8[10]](),controller[_0xe9d8[16]]);router[_0xe9d8[12]](_0xe9d8[17],auth[_0xe9d8[10]](),controller[_0xe9d8[18]]);router[_0xe9d8[12]](_0xe9d8[19],controller[_0xe9d8[20]]);router[_0xe9d8[22]](_0xe9d8[9],auth[_0xe9d8[10]](),controller[_0xe9d8[21]]);router[_0xe9d8[22]](_0xe9d8[23],auth[_0xe9d8[10]](),controller[_0xe9d8[24]]);router[_0xe9d8[26]](_0xe9d8[13],auth[_0xe9d8[10]](),controller[_0xe9d8[25]]);router[_0xe9d8[28]](_0xe9d8[13],auth[_0xe9d8[10]](),controller[_0xe9d8[27]]);module[_0xe9d8[29]]= router
\ No newline at end of file
+var _0x7be3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x67\x65\x74\x53\x65\x73\x73\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x6E\x73\x77\x65\x72\x73","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x73\x75\x6D\x6D\x61\x72\x79","\x67\x65\x74\x53\x75\x6D\x6D\x61\x72\x79","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x63\x6C\x6F\x6E\x65","\x63\x6C\x6F\x6E\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x7be3[0];var multer=require(_0x7be3[1]);var util=require(_0x7be3[2]);var path=require(_0x7be3[3]);var express=require(_0x7be3[4]);var router=express.Router();var auth=require(_0x7be3[5]);var interaction=require(_0x7be3[6]);var config=require(_0x7be3[7]);var controller=require(_0x7be3[8]);router[_0x7be3[12]](_0x7be3[9],auth[_0x7be3[10]](),controller[_0x7be3[11]]);router[_0x7be3[12]](_0x7be3[13],auth[_0x7be3[10]](),controller[_0x7be3[14]]);router[_0x7be3[12]](_0x7be3[15],auth[_0x7be3[10]](),controller[_0x7be3[16]]);router[_0x7be3[12]](_0x7be3[17],auth[_0x7be3[10]](),controller[_0x7be3[18]]);router[_0x7be3[12]](_0x7be3[19],controller[_0x7be3[20]]);router[_0x7be3[22]](_0x7be3[9],auth[_0x7be3[10]](),controller[_0x7be3[21]]);router[_0x7be3[22]](_0x7be3[23],auth[_0x7be3[10]](),controller[_0x7be3[24]]);router[_0x7be3[26]](_0x7be3[13],auth[_0x7be3[10]](),controller[_0x7be3[25]]);router[_0x7be3[28]](_0x7be3[13],auth[_0x7be3[10]](),controller[_0x7be3[27]]);module[_0x7be3[29]]= router
\ No newline at end of file
index cd7863e..d8979ea 100644 (file)
@@ -1 +1 @@
-var _0x8912=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x6C\x6F\x6E\x67","\x69\x73\x4F\x62\x6A\x65\x63\x74\x4C\x69\x6B\x65","\x66\x6F\x72\x6D\x44\x61\x74\x61","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x69\x73\x53\x74\x72\x69\x6E\x67","\x7B\x22\x6E\x61\x6D\x65\x22\x3A\x22\x25\x73\x22\x2C\x22\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x22\x3A\x22\x25\x73\x22\x2C\x22\x70\x61\x67\x65\x73\x22\x3A\x5B\x5D\x7D","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x66\x6F\x72\x6D\x61\x74","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x8912[0];var Sequelize=require(_0x8912[1]);var _=require(_0x8912[2]);var util=require(_0x8912[3]);module[_0x8912[4]]= {name:{type:Sequelize[_0x8912[5]],unique:_0x8912[6]},description:{type:Sequelize[_0x8912[5]]},formData:{type:Sequelize.TEXT(_0x8912[7]),set:function(_0xedbcx4){if(_[_0x8912[8]](_0xedbcx4)){this[_0x8912[11]](_0x8912[9],JSON[_0x8912[10]](_0xedbcx4))}else {if(_[_0x8912[12]](_0xedbcx4)){this[_0x8912[11]](_0x8912[9],_0xedbcx4)}else {this[_0x8912[11]](_0x8912[9],util[_0x8912[17]](_0x8912[13],this[_0x8912[14]](_0x8912[6])|| _0x8912[15],this[_0x8912[14]](_0x8912[16])|| _0x8912[15]))}}}},enableUncompleteSave:{type:Sequelize[_0x8912[18]],defaultValue:true}}
\ No newline at end of file
+var _0x2ff7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x6C\x6F\x6E\x67","\x69\x73\x4F\x62\x6A\x65\x63\x74\x4C\x69\x6B\x65","\x66\x6F\x72\x6D\x44\x61\x74\x61","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x69\x73\x53\x74\x72\x69\x6E\x67","\x7B\x22\x6E\x61\x6D\x65\x22\x3A\x22\x25\x73\x22\x2C\x22\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x22\x3A\x22\x25\x73\x22\x2C\x22\x70\x61\x67\x65\x73\x22\x3A\x5B\x5D\x7D","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x66\x6F\x72\x6D\x61\x74","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x2ff7[0];var Sequelize=require(_0x2ff7[1]);var _=require(_0x2ff7[2]);var util=require(_0x2ff7[3]);module[_0x2ff7[4]]= {name:{type:Sequelize[_0x2ff7[5]],unique:_0x2ff7[6]},description:{type:Sequelize[_0x2ff7[5]]},formData:{type:Sequelize.TEXT(_0x2ff7[7]),set:function(_0x5c9bx4){if(_[_0x2ff7[8]](_0x5c9bx4)){this[_0x2ff7[11]](_0x2ff7[9],JSON[_0x2ff7[10]](_0x5c9bx4))}else {if(_[_0x2ff7[12]](_0x5c9bx4)){this[_0x2ff7[11]](_0x2ff7[9],_0x5c9bx4)}else {this[_0x2ff7[11]](_0x2ff7[9],util[_0x2ff7[17]](_0x2ff7[13],this[_0x2ff7[14]](_0x2ff7[6])|| _0x2ff7[15],this[_0x2ff7[14]](_0x2ff7[16])|| _0x2ff7[15]))}}}},enableUncompleteSave:{type:Sequelize[_0x2ff7[18]],defaultValue:true}}
\ No newline at end of file
index 9ee1b2f..2001ccc 100644 (file)
@@ -1 +1 @@
-var _0x6bb5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x6C\x6F\x6E\x65","\x67\x65\x74","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x6F\x6D\x69\x74","\x67\x65\x74\x53\x65\x73\x73\x69\x6F\x6E\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x50\x72\x6F\x6A\x65\x63\x74\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74","\x6E\x75\x6D\x62\x65\x72","\x66\x72\x6F\x6D\x43\x68\x61\x72\x43\x6F\x64\x65","\x69\x6E\x64\x65\x78\x4F\x66","\x5C","\x67","\x72\x65\x70\x6C\x61\x63\x65","\x67\x65\x74\x53\x75\x6D\x6D\x61\x72\x79","\x71\x75\x65\x73\x74\x69\x6F\x6E\x49\x64","\x71\x75\x65\x73\x74\x69\x6F\x6E","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x53\x65\x73\x73\x69\x6F\x6E\x49\x64","\x61\x6E\x73\x77\x65\x72","\x70\x75\x73\x68","\x6E\x6F\x77","\x2F\x74\x6D\x70\x2F\x4A\x73\x63\x72\x69\x70\x74\x79\x5F\x50\x72\x6F\x6A\x65\x63\x74\x5F\x25\x64\x5F\x53\x75\x6D\x6D\x61\x72\x79\x5F\x25\x73\x2E\x63\x73\x76","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3B\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3D","\x4A\x73\x63\x72\x69\x70\x74\x79\x5F\x50\x72\x6F\x6A\x65\x63\x74\x5F\x25\x64\x5F\x53\x75\x6D\x6D\x61\x72\x79\x5F\x25\x73\x2E\x63\x73\x76","\x73\x65\x74\x48\x65\x61\x64\x65\x72","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65","\x74\x65\x78\x74\x2F\x63\x73\x76","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x2D\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x4A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74"];_0x6bb5[0];var jsonpatch=require(_0x6bb5[1]);var rp=require(_0x6bb5[2]);var moment=require(_0x6bb5[3]);var BPromise=require(_0x6bb5[4]);var Mustache=require(_0x6bb5[5]);var util=require(_0x6bb5[6]);var path=require(_0x6bb5[7]);var sox=require(_0x6bb5[8]);var csv=require(_0x6bb5[9]);var ejs=require(_0x6bb5[10]);var fs=require(_0x6bb5[11]);var _=require(_0x6bb5[12]);var squel=require(_0x6bb5[13]);var crypto=require(_0x6bb5[14]);var jsforce=require(_0x6bb5[15]);var deskjs=require(_0x6bb5[16]);var toCsv=require(_0x6bb5[9]);var querystring=require(_0x6bb5[17]);var Papa=require(_0x6bb5[18]);var qs=require(_0x6bb5[19]);var logger=require(_0x6bb5[21])(_0x6bb5[20]);var utils=require(_0x6bb5[22]);var config=require(_0x6bb5[23]);var db=require(_0x6bb5[25])[_0x6bb5[24]];function respondWithStatusCode(_0xb80cx1a,_0xb80cx1b){_0xb80cx1b= _0xb80cx1b|| 204;return function(_0xb80cx1c){if(_0xb80cx1c){return _0xb80cx1a[_0x6bb5[26]](_0xb80cx1b)};return _0xb80cx1a[_0x6bb5[28]](_0xb80cx1b)[_0x6bb5[27]]()}}function respondWithResult(_0xb80cx1a,_0xb80cx1b){_0xb80cx1b= _0xb80cx1b|| 200;return function(_0xb80cx1c){if(_0xb80cx1c){return _0xb80cx1a[_0x6bb5[28]](_0xb80cx1b)[_0x6bb5[29]](_0xb80cx1c)}}}function respondWithFilteredResult(_0xb80cx1a,_0xb80cx1f){return function(_0xb80cx1c){if(_0xb80cx1c){var _0xb80cx20=_0xb80cx1c[_0x6bb5[30]],_0xb80cx21=_0xb80cx1f[_0x6bb5[31]],_0xb80cx22=_0xb80cx1f[_0x6bb5[31]]+ _0xb80cx1f[_0x6bb5[32]],_0xb80cx1b;if(_0xb80cx22>= _0xb80cx20){_0xb80cx22= _0xb80cx20;_0xb80cx1b= 200}else {_0xb80cx1b= 206};_0xb80cx1a[_0x6bb5[28]](_0xb80cx1b);return _0xb80cx1a[_0x6bb5[36]](_0x6bb5[33],_0xb80cx21+ _0x6bb5[34]+ _0xb80cx22+ _0x6bb5[35]+ _0xb80cx20)[_0x6bb5[29]](_0xb80cx1c)};return null}}function patchUpdates(_0xb80cx24){return function(_0xb80cx1c){try{jsonpatch[_0x6bb5[37]](_0xb80cx1c,_0xb80cx24,true)}catch(err){return BPromise[_0x6bb5[38]](err)};return _0xb80cx1c[_0x6bb5[39]]()}}function saveUpdates(_0xb80cx26,_0xb80cx1b){return function(_0xb80cx1c){if(_0xb80cx1c){return _0xb80cx1c[_0x6bb5[41]](_0xb80cx26)[_0x6bb5[40]](function(_0xb80cx27){return _0xb80cx27})};return null}}function removeEntity(_0xb80cx1a,_0xb80cx1b){return function(_0xb80cx1c){if(_0xb80cx1c){return _0xb80cx1c[_0x6bb5[42]]()[_0x6bb5[40]](function(){_0xb80cx1a[_0x6bb5[28]](204)[_0x6bb5[27]]()})}}}function handleEntityNotFound(_0xb80cx1a,_0xb80cx1b){return function(_0xb80cx1c){if(!_0xb80cx1c){_0xb80cx1a[_0x6bb5[26]](404)};return _0xb80cx1c}}function handleError(_0xb80cx1a,_0xb80cx1b){_0xb80cx1b= _0xb80cx1b|| 500;return function(_0xb80cx2b){logger[_0x6bb5[44]](_0xb80cx2b[_0x6bb5[43]]);if(_0xb80cx2b[_0x6bb5[45]]){delete _0xb80cx2b[_0x6bb5[45]]};_0xb80cx1a[_0x6bb5[28]](_0xb80cx1b)[_0x6bb5[46]](_0xb80cx2b)}}exports[_0x6bb5[47]]= function(_0xb80cx2c,_0xb80cx1a){var _0xb80cx1f={},_0xb80cx2d={},_0xb80cx2e={count:0,rows:[]};_0xb80cx2d[_0x6bb5[48]]= _[_0x6bb5[51]](db[_0x6bb5[50]][_0x6bb5[49]]);var _0xb80cx2f={dateStart:_0xb80cx2c[_0x6bb5[53]][_0x6bb5[52]],dateEnd:_0xb80cx2c[_0x6bb5[53]][_0x6bb5[54]]};delete _0xb80cx2c[_0x6bb5[53]][_0x6bb5[52]];delete _0xb80cx2c[_0x6bb5[53]][_0x6bb5[54]];_0xb80cx2d[_0x6bb5[53]]= _[_0x6bb5[51]](_0xb80cx2c[_0x6bb5[53]]);_0xb80cx2d[_0x6bb5[55]]= _[_0x6bb5[56]](_0xb80cx2d[_0x6bb5[48]],_0xb80cx2d[_0x6bb5[53]]);_0xb80cx1f[_0x6bb5[57]]= _[_0x6bb5[56]](_0xb80cx2d[_0x6bb5[48]],qs[_0x6bb5[58]](_0xb80cx2c[_0x6bb5[53]][_0x6bb5[58]]));_0xb80cx1f[_0x6bb5[57]]= (_0xb80cx1f[_0x6bb5[57]][_0x6bb5[59]])?_0xb80cx1f[_0x6bb5[57]]:_0xb80cx2d[_0x6bb5[48]];if(!_0xb80cx2c[_0x6bb5[53]][_0x6bb5[61]](_0x6bb5[60])){_0xb80cx1f[_0x6bb5[32]]= qs[_0x6bb5[32]](_0xb80cx2c[_0x6bb5[53]][_0x6bb5[32]]);_0xb80cx1f[_0x6bb5[31]]= qs[_0x6bb5[31]](_0xb80cx2c[_0x6bb5[53]][_0x6bb5[31]])};_0xb80cx1f[_0x6bb5[62]]= qs[_0x6bb5[63]](_0xb80cx2c[_0x6bb5[53]][_0x6bb5[63]]);_0xb80cx1f[_0x6bb5[64]]= qs[_0x6bb5[55]](_[_0x6bb5[65]](_0xb80cx2c[_0x6bb5[53]],_0xb80cx2d[_0x6bb5[55]]));if(_0xb80cx2f[_0x6bb5[52]]){if(_0xb80cx2f[_0x6bb5[54]]){_0xb80cx2f[_0x6bb5[54]]= moment(_0xb80cx2f[_0x6bb5[54]])[_0x6bb5[67]](1,_0x6bb5[66])}else {_0xb80cx2f[_0x6bb5[54]]= moment(_0xb80cx2f[_0x6bb5[52]])[_0x6bb5[67]](1,_0x6bb5[66])};_[_0x6bb5[68]](_0xb80cx1f[_0x6bb5[64]],{createdAt:{$gte:_0xb80cx2f[_0x6bb5[52]],$lte:_0xb80cx2f[_0x6bb5[54]]}})};if(_0xb80cx2c[_0x6bb5[53]][_0x6bb5[69]]){_0xb80cx1f[_0x6bb5[64]]= _[_0x6bb5[68]](_0xb80cx1f[_0x6bb5[64]],{$or:_[_0x6bb5[71]](_0xb80cx1f[_0x6bb5[57]],function(_0xb80cx30){var _0xb80cx2e={};_0xb80cx2e[_0xb80cx30]= {$like:_0x6bb5[70]+ _0xb80cx2c[_0x6bb5[53]][_0x6bb5[69]]+ _0x6bb5[70]};return _0xb80cx2e})})};_0xb80cx1f= _[_0x6bb5[68]]({},_0xb80cx1f,_0xb80cx2c[_0x6bb5[72]]);var _0xb80cx31={where:_0xb80cx1f[_0x6bb5[64]]};return db[_0x6bb5[50]][_0x6bb5[30]](_0xb80cx31)[_0x6bb5[40]](function(_0xb80cx20){_0xb80cx2e[_0x6bb5[30]]= _0xb80cx20;if(_0xb80cx2c[_0x6bb5[53]][_0x6bb5[75]]){_0xb80cx1f[_0x6bb5[76]]= [{all:true}]};return db[_0x6bb5[50]][_0x6bb5[77]](_0xb80cx1f)})[_0x6bb5[40]](function(_0xb80cx32){_0xb80cx2e[_0x6bb5[74]]= _0xb80cx32;return _0xb80cx2e})[_0x6bb5[40]](respondWithFilteredResult(_0xb80cx1a,_0xb80cx1f))[_0x6bb5[73]](handleError(_0xb80cx1a,null))};exports[_0x6bb5[78]]= function(_0xb80cx2c,_0xb80cx1a){var _0xb80cx1f={raw:false,where:{id:_0xb80cx2c[_0x6bb5[80]][_0x6bb5[79]]}},_0xb80cx2d={};_0xb80cx2d[_0x6bb5[48]]= _[_0x6bb5[51]](db[_0x6bb5[50]][_0x6bb5[49]]);_0xb80cx2d[_0x6bb5[53]]= _[_0x6bb5[51]](_0xb80cx2c[_0x6bb5[53]]);_0xb80cx2d[_0x6bb5[55]]= _[_0x6bb5[56]](_0xb80cx2d[_0x6bb5[48]],_0xb80cx2d[_0x6bb5[53]]);_0xb80cx1f[_0x6bb5[57]]= _[_0x6bb5[56]](_0xb80cx2d[_0x6bb5[48]],qs[_0x6bb5[58]](_0xb80cx2c[_0x6bb5[53]][_0x6bb5[58]]));_0xb80cx1f[_0x6bb5[57]]= (_0xb80cx1f[_0x6bb5[57]][_0x6bb5[59]])?_0xb80cx1f[_0x6bb5[57]]:_0xb80cx2d[_0x6bb5[48]];if(_0xb80cx2c[_0x6bb5[53]][_0x6bb5[75]]){_0xb80cx1f[_0x6bb5[76]]= [{all:true}]};_0xb80cx1f= _[_0x6bb5[68]]({},_0xb80cx1f,_0xb80cx2c[_0x6bb5[72]]);return db[_0x6bb5[50]][_0x6bb5[81]](_0xb80cx1f)[_0x6bb5[40]](handleEntityNotFound(_0xb80cx1a,null))[_0x6bb5[40]](respondWithResult(_0xb80cx1a,null))[_0x6bb5[73]](handleError(_0xb80cx1a,null))};exports[_0x6bb5[82]]= function(_0xb80cx2c,_0xb80cx1a){return db[_0x6bb5[50]][_0x6bb5[82]](_0xb80cx2c[_0x6bb5[83]],{})[_0x6bb5[40]](respondWithResult(_0xb80cx1a,201))[_0x6bb5[73]](handleError(_0xb80cx1a,null))};exports[_0x6bb5[84]]= function(_0xb80cx2c,_0xb80cx1a){var _0xb80cx1f={raw:false,where:{id:_0xb80cx2c[_0x6bb5[80]][_0x6bb5[79]]}},_0xb80cx2d={};_0xb80cx2d[_0x6bb5[48]]= _[_0x6bb5[51]](db[_0x6bb5[50]][_0x6bb5[49]]);_0xb80cx1f[_0x6bb5[57]]= _[_0x6bb5[56]](_0xb80cx2d[_0x6bb5[48]],qs[_0x6bb5[58]](_0xb80cx2c[_0x6bb5[53]][_0x6bb5[58]]));_0xb80cx1f[_0x6bb5[57]]= (_0xb80cx1f[_0x6bb5[57]][_0x6bb5[59]])?_0xb80cx1f[_0x6bb5[57]]:_0xb80cx2d[_0x6bb5[48]];if(_0xb80cx2c[_0x6bb5[53]][_0x6bb5[75]]){_0xb80cx1f[_0x6bb5[76]]= [{all:true}]};_0xb80cx1f= _[_0x6bb5[68]]({},_0xb80cx1f,_0xb80cx2c[_0x6bb5[72]]);return db[_0x6bb5[50]][_0x6bb5[81]](_0xb80cx1f)[_0x6bb5[40]](handleEntityNotFound(_0xb80cx1a,null))[_0x6bb5[40]](function(_0xb80cx1c){if(_0xb80cx1c){var _0xb80cx33=_0xb80cx1c[_0x6bb5[85]]({plain:true});_0xb80cx33= qs[_0x6bb5[88]](_0xb80cx33,[_0x6bb5[79],_0x6bb5[86],_0x6bb5[87]]);_0xb80cx2c[_0x6bb5[83]]= _[_0x6bb5[88]](_0xb80cx2c[_0x6bb5[83]],[_0x6bb5[79],_0x6bb5[86],_0x6bb5[87]]);return db[_0x6bb5[50]][_0x6bb5[82]](_[_0x6bb5[68]](_0xb80cx33,_0xb80cx2c[_0x6bb5[83]]),{include:_0xb80cx2c[_0x6bb5[53]][_0x6bb5[75]]?[{all:true}]:undefined})}})[_0x6bb5[40]](respondWithResult(_0xb80cx1a,201))[_0x6bb5[73]](handleError(_0xb80cx1a,null))};exports[_0x6bb5[41]]= function(_0xb80cx2c,_0xb80cx1a){if(_0xb80cx2c[_0x6bb5[83]][_0x6bb5[79]]){delete _0xb80cx2c[_0x6bb5[83]][_0x6bb5[79]]};return db[_0x6bb5[50]][_0x6bb5[81]]({where:{id:_0xb80cx2c[_0x6bb5[80]][_0x6bb5[79]]}})[_0x6bb5[40]](handleEntityNotFound(_0xb80cx1a,null))[_0x6bb5[40]](saveUpdates(_0xb80cx2c[_0x6bb5[83]],null))[_0x6bb5[40]](respondWithResult(_0xb80cx1a,null))[_0x6bb5[73]](handleError(_0xb80cx1a,null))};exports[_0x6bb5[42]]= function(_0xb80cx2c,_0xb80cx1a){return db[_0x6bb5[50]][_0x6bb5[81]]({where:{id:_0xb80cx2c[_0x6bb5[80]][_0x6bb5[79]]}})[_0x6bb5[40]](handleEntityNotFound(_0xb80cx1a,null))[_0x6bb5[40]](removeEntity(_0xb80cx1a,null))[_0x6bb5[73]](handleError(_0xb80cx1a,null))};exports[_0x6bb5[89]]= function(_0xb80cx2c,_0xb80cx1a,_0xb80cx34){var _0xb80cx1f={raw:true,where:{}};var _0xb80cx2d={};var _0xb80cx35={count:0,rows:[]};return db[_0x6bb5[50]][_0x6bb5[92]]({where:{id:_0xb80cx2c[_0x6bb5[80]][_0x6bb5[79]]}})[_0x6bb5[40]](handleEntityNotFound(_0xb80cx1a,null))[_0x6bb5[40]](function(_0xb80cx1c){if(_0xb80cx1c){_0xb80cx2d[_0x6bb5[48]]= _[_0x6bb5[51]](db[_0x6bb5[90]][_0x6bb5[49]]);_0xb80cx2d[_0x6bb5[53]]= _[_0x6bb5[51]](_0xb80cx2c[_0x6bb5[53]]);_0xb80cx2d[_0x6bb5[55]]= _[_0x6bb5[56]](_0xb80cx2d[_0x6bb5[48]],_0xb80cx2d[_0x6bb5[53]]);_0xb80cx1f[_0x6bb5[57]]= _[_0x6bb5[56]](_0xb80cx2d[_0x6bb5[48]],qs[_0x6bb5[58]](_0xb80cx2c[_0x6bb5[53]][_0x6bb5[58]]));_0xb80cx1f[_0x6bb5[57]]= (_0xb80cx1f[_0x6bb5[57]][_0x6bb5[59]])?_0xb80cx1f[_0x6bb5[57]]:_0xb80cx2d[_0x6bb5[48]];if(!_0xb80cx2c[_0x6bb5[53]][_0x6bb5[61]](_0x6bb5[60])){_0xb80cx1f[_0x6bb5[32]]= qs[_0x6bb5[32]](_0xb80cx2c[_0x6bb5[53]][_0x6bb5[32]]);_0xb80cx1f[_0x6bb5[31]]= qs[_0x6bb5[31]](_0xb80cx2c[_0x6bb5[53]][_0x6bb5[31]])};_0xb80cx1f[_0x6bb5[62]]= qs[_0x6bb5[63]](_0xb80cx2c[_0x6bb5[53]][_0x6bb5[63]]);_0xb80cx1f[_0x6bb5[64]]= qs[_0x6bb5[55]](_[_0x6bb5[65]](_0xb80cx2c[_0x6bb5[53]],_0xb80cx2d[_0x6bb5[55]]));_0xb80cx1f[_0x6bb5[64]][_0x6bb5[91]]= _0xb80cx1c[_0x6bb5[79]];if(_0xb80cx2c[_0x6bb5[53]][_0x6bb5[69]]){_0xb80cx1f[_0x6bb5[64]]= _[_0x6bb5[68]](_0xb80cx1f[_0x6bb5[64]],{$or:_[_0x6bb5[71]](_0xb80cx1f[_0x6bb5[57]],function(_0xb80cx30){var _0xb80cx2e={};_0xb80cx2e[_0xb80cx30]= {$like:_0x6bb5[70]+ _0xb80cx2c[_0x6bb5[53]][_0x6bb5[69]]+ _0x6bb5[70]};return _0xb80cx2e})})};_0xb80cx1f= _[_0x6bb5[68]]({},_0xb80cx1f,_0xb80cx2c[_0x6bb5[72]]);return db[_0x6bb5[90]][_0x6bb5[30]]({where:_0xb80cx1f[_0x6bb5[64]]})[_0x6bb5[40]](function(_0xb80cx20){_0xb80cx35[_0x6bb5[30]]= _0xb80cx20;if(_0xb80cx2c[_0x6bb5[53]][_0x6bb5[75]]){_0xb80cx1f[_0x6bb5[76]]= [{all:true}]};return db[_0x6bb5[90]][_0x6bb5[77]](_0xb80cx1f)})[_0x6bb5[40]](function(_0xb80cx32){_0xb80cx35[_0x6bb5[74]]= _0xb80cx32;return _0xb80cx35})}})[_0x6bb5[40]](respondWithFilteredResult(_0xb80cx1a,_0xb80cx1f))[_0x6bb5[73]](handleError(_0xb80cx1a,null))};exports[_0x6bb5[93]]= function(_0xb80cx2c,_0xb80cx1a,_0xb80cx34){var _0xb80cx1f={raw:true,where:{}};var _0xb80cx2d={};var _0xb80cx35={count:0,rows:[]};var _0xb80cx2f={dateStart:_0xb80cx2c[_0x6bb5[53]][_0x6bb5[52]],dateEnd:_0xb80cx2c[_0x6bb5[53]][_0x6bb5[54]]};delete _0xb80cx2c[_0x6bb5[53]][_0x6bb5[52]];delete _0xb80cx2c[_0x6bb5[53]][_0x6bb5[54]];return db[_0x6bb5[50]][_0x6bb5[92]]({where:{id:_0xb80cx2c[_0x6bb5[80]][_0x6bb5[79]]}})[_0x6bb5[40]](handleEntityNotFound(_0xb80cx1a,null))[_0x6bb5[40]](function(_0xb80cx1c){if(_0xb80cx1c){_0xb80cx2d[_0x6bb5[48]]= _[_0x6bb5[51]](db[_0x6bb5[94]][_0x6bb5[49]]);_0xb80cx2d[_0x6bb5[53]]= _[_0x6bb5[51]](_0xb80cx2c[_0x6bb5[53]]);_0xb80cx2d[_0x6bb5[55]]= _[_0x6bb5[56]](_0xb80cx2d[_0x6bb5[48]],_0xb80cx2d[_0x6bb5[53]]);_0xb80cx1f[_0x6bb5[57]]= _[_0x6bb5[56]](_0xb80cx2d[_0x6bb5[48]],qs[_0x6bb5[58]](_0xb80cx2c[_0x6bb5[53]][_0x6bb5[58]]));_0xb80cx1f[_0x6bb5[57]]= (_0xb80cx1f[_0x6bb5[57]][_0x6bb5[59]])?_0xb80cx1f[_0x6bb5[57]]:_0xb80cx2d[_0x6bb5[48]];if(!_0xb80cx2c[_0x6bb5[53]][_0x6bb5[61]](_0x6bb5[60])){_0xb80cx1f[_0x6bb5[32]]= qs[_0x6bb5[32]](_0xb80cx2c[_0x6bb5[53]][_0x6bb5[32]]);_0xb80cx1f[_0x6bb5[31]]= qs[_0x6bb5[31]](_0xb80cx2c[_0x6bb5[53]][_0x6bb5[31]])};_0xb80cx1f[_0x6bb5[62]]= qs[_0x6bb5[63]](_0xb80cx2c[_0x6bb5[53]][_0x6bb5[63]]);_0xb80cx1f[_0x6bb5[64]]= qs[_0x6bb5[55]](_[_0x6bb5[65]](_0xb80cx2c[_0x6bb5[53]],_0xb80cx2d[_0x6bb5[55]]));_0xb80cx1f[_0x6bb5[64]][_0x6bb5[91]]= _0xb80cx1c[_0x6bb5[79]];if(_0xb80cx2f[_0x6bb5[52]]){if(_0xb80cx2f[_0x6bb5[54]]){_0xb80cx2f[_0x6bb5[54]]= moment(_0xb80cx2f[_0x6bb5[54]])[_0x6bb5[67]](1,_0x6bb5[66])}else {_0xb80cx2f[_0x6bb5[54]]= moment(_0xb80cx2f[_0x6bb5[52]])[_0x6bb5[67]](1,_0x6bb5[66])};_[_0x6bb5[68]](_0xb80cx1f[_0x6bb5[64]],{createdAt:{$gte:_0xb80cx2f[_0x6bb5[52]],$lte:_0xb80cx2f[_0x6bb5[54]]}})};if(_0xb80cx2c[_0x6bb5[53]][_0x6bb5[69]]){_0xb80cx1f[_0x6bb5[64]]= _[_0x6bb5[68]](_0xb80cx1f[_0x6bb5[64]],{$or:_[_0x6bb5[71]](_0xb80cx1f[_0x6bb5[57]],function(_0xb80cx30){var _0xb80cx2e={};_0xb80cx2e[_0xb80cx30]= {$like:_0x6bb5[70]+ _0xb80cx2c[_0x6bb5[53]][_0x6bb5[69]]+ _0x6bb5[70]};return _0xb80cx2e})})};_0xb80cx1f= _[_0x6bb5[68]]({},_0xb80cx1f,_0xb80cx2c[_0x6bb5[72]]);return db[_0x6bb5[94]][_0x6bb5[30]]({where:_0xb80cx1f[_0x6bb5[64]]})[_0x6bb5[40]](function(_0xb80cx20){_0xb80cx35[_0x6bb5[30]]= _0xb80cx20;if(_0xb80cx2c[_0x6bb5[53]][_0x6bb5[75]]){_0xb80cx1f[_0x6bb5[76]]= [{all:true}]};return db[_0x6bb5[94]][_0x6bb5[77]](_0xb80cx1f)})[_0x6bb5[40]](function(_0xb80cx32){_0xb80cx35[_0x6bb5[74]]= _0xb80cx32;return _0xb80cx35})}})[_0x6bb5[40]](respondWithFilteredResult(_0xb80cx1a,_0xb80cx1f))[_0x6bb5[73]](handleError(_0xb80cx1a,null))};function char(_0xb80cx37){return _0x6bb5[95]===  typeof _0xb80cx37?String[_0x6bb5[96]][_0x6bb5[37]](null,arguments):_0xb80cx37}function needsEncapsulation(_0xb80cx39){return !!_0xb80cx39&& (_0xb80cx39.toString()[_0x6bb5[97]](char(0xd))>= 0|| _0xb80cx39.toString()[_0x6bb5[97]](char(0xa))>= 0|| _0xb80cx39.toString()[_0x6bb5[97]](char(0x2c))>= 0|| _0xb80cx39.toString()[_0x6bb5[97]](char(0x22))>= 0)}function encapsulate(_0xb80cx39){var _0xb80cx3b=char(0x22),_0xb80cx3c=_0x6bb5[98]+ char(0x22),_0xb80cx3d=_0xb80cx39.toString()[_0x6bb5[100]]( new RegExp(_0xb80cx3b,_0x6bb5[99]),_0xb80cx3c);return _0xb80cx3b+ _0xb80cx3d+ _0xb80cx3b}exports[_0x6bb5[101]]= function(_0xb80cx2c,_0xb80cx1a,_0xb80cx34){var _0xb80cx3e,_0xb80cx3f;return db[_0x6bb5[90]][_0x6bb5[77]]({where:{ProjectId:_0xb80cx2c[_0x6bb5[80]][_0x6bb5[79]]}})[_0x6bb5[40]](handleEntityNotFound(_0xb80cx1a,null))[_0x6bb5[40]](function(_0xb80cx1c){if(_0xb80cx1c){_0xb80cx3e= _0xb80cx1c;return db[_0x6bb5[121]][_0x6bb5[77]]({where:{ProjectId:_0xb80cx2c[_0x6bb5[80]][_0x6bb5[79]]},order:_0x6bb5[120]})}})[_0x6bb5[40]](handleEntityNotFound(_0xb80cx1a,null))[_0x6bb5[40]](function(_0xb80cx1c){if(_0xb80cx1c){_0xb80cx3f= _0xb80cx1c;var _0xb80cx40={};for(var _0xb80cx41=0,_0xb80cx42=_0xb80cx3f[_0x6bb5[59]];_0xb80cx41< _0xb80cx42;_0xb80cx41++){if(!_0xb80cx40[_0x6bb5[61]](_0xb80cx3f[_0xb80cx41][_0x6bb5[102]])){_0xb80cx40[_0xb80cx3f[_0xb80cx41][_0x6bb5[102]]]= needsEncapsulation(_0xb80cx3f[_0xb80cx41][_0x6bb5[103]])?encapsulate(_0xb80cx3f[_0xb80cx41][_0x6bb5[103]]):_0xb80cx3f[_0xb80cx41][_0x6bb5[103]]}};var _0xb80cx43=[],_0xb80cx44={};for(var _0xb80cx45=0,_0xb80cx46=_0xb80cx3e[_0x6bb5[59]];_0xb80cx45< _0xb80cx46;_0xb80cx45++){_0xb80cx44= {ProjectId:_0xb80cx2c[_0x6bb5[80]][_0x6bb5[79]],SessionId:_0xb80cx3e[_0xb80cx45][_0x6bb5[79]],StartTime:moment(_0xb80cx3e[_0xb80cx45][_0x6bb5[106]])[_0x6bb5[105]](_0x6bb5[104])};for(var _0xb80cx47=0,_0xb80cx48=_0xb80cx3f[_0x6bb5[59]];_0xb80cx47< _0xb80cx48;_0xb80cx47++){if(_0xb80cx3f[_0xb80cx47][_0x6bb5[107]]== _0xb80cx3e[_0xb80cx45][_0x6bb5[79]]&& _0xb80cx40[_0x6bb5[61]](_0xb80cx3f[_0xb80cx47][_0x6bb5[102]])){_0xb80cx44[_0xb80cx40[_0xb80cx3f[_0xb80cx47][_0x6bb5[102]]]]= _0xb80cx3f[_0xb80cx47][_0x6bb5[108]]}};for(var _0xb80cx49 in _0xb80cx40){if(!_0xb80cx44[_0x6bb5[61]](_0xb80cx40[_0xb80cx49])){_0xb80cx44[_0xb80cx40[_0xb80cx49]]= null}};_0xb80cx43[_0x6bb5[109]](_0xb80cx44)};var _0xb80cx4a=toCsv(_0xb80cx43);var _0xb80cx4b=Date[_0x6bb5[110]]();fs[_0x6bb5[112]](util[_0x6bb5[105]](_0x6bb5[111],_0xb80cx2c[_0x6bb5[80]][_0x6bb5[79]],_0xb80cx4b),_0xb80cx4a);_0xb80cx1a[_0x6bb5[116]](_0x6bb5[113],_0x6bb5[114]+ util[_0x6bb5[105]](_0x6bb5[115],_0xb80cx2c[_0x6bb5[80]][_0x6bb5[79]],_0xb80cx4b));_0xb80cx1a[_0x6bb5[116]](_0x6bb5[117],_0x6bb5[118]);_0xb80cx1a[_0x6bb5[119]](util[_0x6bb5[105]](_0x6bb5[111],_0xb80cx2c[_0x6bb5[80]][_0x6bb5[79]],_0xb80cx4b))}})[_0x6bb5[73]](handleError(_0xb80cx1a,null))}
\ No newline at end of file
+var _0x3829=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x6C\x6F\x6E\x65","\x67\x65\x74","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x6F\x6D\x69\x74","\x67\x65\x74\x53\x65\x73\x73\x69\x6F\x6E\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x50\x72\x6F\x6A\x65\x63\x74\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74","\x6E\x75\x6D\x62\x65\x72","\x66\x72\x6F\x6D\x43\x68\x61\x72\x43\x6F\x64\x65","\x69\x6E\x64\x65\x78\x4F\x66","\x5C","\x67","\x72\x65\x70\x6C\x61\x63\x65","\x67\x65\x74\x53\x75\x6D\x6D\x61\x72\x79","\x71\x75\x65\x73\x74\x69\x6F\x6E\x49\x64","\x71\x75\x65\x73\x74\x69\x6F\x6E","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x53\x65\x73\x73\x69\x6F\x6E\x49\x64","\x61\x6E\x73\x77\x65\x72","\x70\x75\x73\x68","\x6E\x6F\x77","\x2F\x74\x6D\x70\x2F\x4A\x73\x63\x72\x69\x70\x74\x79\x5F\x50\x72\x6F\x6A\x65\x63\x74\x5F\x25\x64\x5F\x53\x75\x6D\x6D\x61\x72\x79\x5F\x25\x73\x2E\x63\x73\x76","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3B\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3D","\x4A\x73\x63\x72\x69\x70\x74\x79\x5F\x50\x72\x6F\x6A\x65\x63\x74\x5F\x25\x64\x5F\x53\x75\x6D\x6D\x61\x72\x79\x5F\x25\x73\x2E\x63\x73\x76","\x73\x65\x74\x48\x65\x61\x64\x65\x72","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65","\x74\x65\x78\x74\x2F\x63\x73\x76","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x2D\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x4A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74"];_0x3829[0];var jsonpatch=require(_0x3829[1]);var rp=require(_0x3829[2]);var moment=require(_0x3829[3]);var BPromise=require(_0x3829[4]);var Mustache=require(_0x3829[5]);var util=require(_0x3829[6]);var path=require(_0x3829[7]);var sox=require(_0x3829[8]);var csv=require(_0x3829[9]);var ejs=require(_0x3829[10]);var fs=require(_0x3829[11]);var _=require(_0x3829[12]);var squel=require(_0x3829[13]);var crypto=require(_0x3829[14]);var jsforce=require(_0x3829[15]);var deskjs=require(_0x3829[16]);var toCsv=require(_0x3829[9]);var querystring=require(_0x3829[17]);var Papa=require(_0x3829[18]);var qs=require(_0x3829[19]);var logger=require(_0x3829[21])(_0x3829[20]);var utils=require(_0x3829[22]);var config=require(_0x3829[23]);var db=require(_0x3829[25])[_0x3829[24]];function respondWithStatusCode(_0x97ccx1a,_0x97ccx1b){_0x97ccx1b= _0x97ccx1b|| 204;return function(_0x97ccx1c){if(_0x97ccx1c){return _0x97ccx1a[_0x3829[26]](_0x97ccx1b)};return _0x97ccx1a[_0x3829[28]](_0x97ccx1b)[_0x3829[27]]()}}function respondWithResult(_0x97ccx1a,_0x97ccx1b){_0x97ccx1b= _0x97ccx1b|| 200;return function(_0x97ccx1c){if(_0x97ccx1c){return _0x97ccx1a[_0x3829[28]](_0x97ccx1b)[_0x3829[29]](_0x97ccx1c)}}}function respondWithFilteredResult(_0x97ccx1a,_0x97ccx1f){return function(_0x97ccx1c){if(_0x97ccx1c){var _0x97ccx20=_0x97ccx1c[_0x3829[30]],_0x97ccx21=_0x97ccx1f[_0x3829[31]],_0x97ccx22=_0x97ccx1f[_0x3829[31]]+ _0x97ccx1f[_0x3829[32]],_0x97ccx1b;if(_0x97ccx22>= _0x97ccx20){_0x97ccx22= _0x97ccx20;_0x97ccx1b= 200}else {_0x97ccx1b= 206};_0x97ccx1a[_0x3829[28]](_0x97ccx1b);return _0x97ccx1a[_0x3829[36]](_0x3829[33],_0x97ccx21+ _0x3829[34]+ _0x97ccx22+ _0x3829[35]+ _0x97ccx20)[_0x3829[29]](_0x97ccx1c)};return null}}function patchUpdates(_0x97ccx24){return function(_0x97ccx1c){try{jsonpatch[_0x3829[37]](_0x97ccx1c,_0x97ccx24,true)}catch(err){return BPromise[_0x3829[38]](err)};return _0x97ccx1c[_0x3829[39]]()}}function saveUpdates(_0x97ccx26,_0x97ccx1b){return function(_0x97ccx1c){if(_0x97ccx1c){return _0x97ccx1c[_0x3829[41]](_0x97ccx26)[_0x3829[40]](function(_0x97ccx27){return _0x97ccx27})};return null}}function removeEntity(_0x97ccx1a,_0x97ccx1b){return function(_0x97ccx1c){if(_0x97ccx1c){return _0x97ccx1c[_0x3829[42]]()[_0x3829[40]](function(){_0x97ccx1a[_0x3829[28]](204)[_0x3829[27]]()})}}}function handleEntityNotFound(_0x97ccx1a,_0x97ccx1b){return function(_0x97ccx1c){if(!_0x97ccx1c){_0x97ccx1a[_0x3829[26]](404)};return _0x97ccx1c}}function handleError(_0x97ccx1a,_0x97ccx1b){_0x97ccx1b= _0x97ccx1b|| 500;return function(_0x97ccx2b){logger[_0x3829[44]](_0x97ccx2b[_0x3829[43]]);if(_0x97ccx2b[_0x3829[45]]){delete _0x97ccx2b[_0x3829[45]]};_0x97ccx1a[_0x3829[28]](_0x97ccx1b)[_0x3829[46]](_0x97ccx2b)}}exports[_0x3829[47]]= function(_0x97ccx2c,_0x97ccx1a){var _0x97ccx1f={},_0x97ccx2d={},_0x97ccx2e={count:0,rows:[]};_0x97ccx2d[_0x3829[48]]= _[_0x3829[51]](db[_0x3829[50]][_0x3829[49]]);var _0x97ccx2f={dateStart:_0x97ccx2c[_0x3829[53]][_0x3829[52]],dateEnd:_0x97ccx2c[_0x3829[53]][_0x3829[54]]};delete _0x97ccx2c[_0x3829[53]][_0x3829[52]];delete _0x97ccx2c[_0x3829[53]][_0x3829[54]];_0x97ccx2d[_0x3829[53]]= _[_0x3829[51]](_0x97ccx2c[_0x3829[53]]);_0x97ccx2d[_0x3829[55]]= _[_0x3829[56]](_0x97ccx2d[_0x3829[48]],_0x97ccx2d[_0x3829[53]]);_0x97ccx1f[_0x3829[57]]= _[_0x3829[56]](_0x97ccx2d[_0x3829[48]],qs[_0x3829[58]](_0x97ccx2c[_0x3829[53]][_0x3829[58]]));_0x97ccx1f[_0x3829[57]]= (_0x97ccx1f[_0x3829[57]][_0x3829[59]])?_0x97ccx1f[_0x3829[57]]:_0x97ccx2d[_0x3829[48]];if(!_0x97ccx2c[_0x3829[53]][_0x3829[61]](_0x3829[60])){_0x97ccx1f[_0x3829[32]]= qs[_0x3829[32]](_0x97ccx2c[_0x3829[53]][_0x3829[32]]);_0x97ccx1f[_0x3829[31]]= qs[_0x3829[31]](_0x97ccx2c[_0x3829[53]][_0x3829[31]])};_0x97ccx1f[_0x3829[62]]= qs[_0x3829[63]](_0x97ccx2c[_0x3829[53]][_0x3829[63]]);_0x97ccx1f[_0x3829[64]]= qs[_0x3829[55]](_[_0x3829[65]](_0x97ccx2c[_0x3829[53]],_0x97ccx2d[_0x3829[55]]));if(_0x97ccx2f[_0x3829[52]]){if(_0x97ccx2f[_0x3829[54]]){_0x97ccx2f[_0x3829[54]]= moment(_0x97ccx2f[_0x3829[54]])[_0x3829[67]](1,_0x3829[66])}else {_0x97ccx2f[_0x3829[54]]= moment(_0x97ccx2f[_0x3829[52]])[_0x3829[67]](1,_0x3829[66])};_[_0x3829[68]](_0x97ccx1f[_0x3829[64]],{createdAt:{$gte:_0x97ccx2f[_0x3829[52]],$lte:_0x97ccx2f[_0x3829[54]]}})};if(_0x97ccx2c[_0x3829[53]][_0x3829[69]]){_0x97ccx1f[_0x3829[64]]= _[_0x3829[68]](_0x97ccx1f[_0x3829[64]],{$or:_[_0x3829[71]](_0x97ccx1f[_0x3829[57]],function(_0x97ccx30){var _0x97ccx2e={};_0x97ccx2e[_0x97ccx30]= {$like:_0x3829[70]+ _0x97ccx2c[_0x3829[53]][_0x3829[69]]+ _0x3829[70]};return _0x97ccx2e})})};_0x97ccx1f= _[_0x3829[68]]({},_0x97ccx1f,_0x97ccx2c[_0x3829[72]]);var _0x97ccx31={where:_0x97ccx1f[_0x3829[64]]};return db[_0x3829[50]][_0x3829[30]](_0x97ccx31)[_0x3829[40]](function(_0x97ccx20){_0x97ccx2e[_0x3829[30]]= _0x97ccx20;if(_0x97ccx2c[_0x3829[53]][_0x3829[75]]){_0x97ccx1f[_0x3829[76]]= [{all:true}]};return db[_0x3829[50]][_0x3829[77]](_0x97ccx1f)})[_0x3829[40]](function(_0x97ccx32){_0x97ccx2e[_0x3829[74]]= _0x97ccx32;return _0x97ccx2e})[_0x3829[40]](respondWithFilteredResult(_0x97ccx1a,_0x97ccx1f))[_0x3829[73]](handleError(_0x97ccx1a,null))};exports[_0x3829[78]]= function(_0x97ccx2c,_0x97ccx1a){var _0x97ccx1f={raw:false,where:{id:_0x97ccx2c[_0x3829[80]][_0x3829[79]]}},_0x97ccx2d={};_0x97ccx2d[_0x3829[48]]= _[_0x3829[51]](db[_0x3829[50]][_0x3829[49]]);_0x97ccx2d[_0x3829[53]]= _[_0x3829[51]](_0x97ccx2c[_0x3829[53]]);_0x97ccx2d[_0x3829[55]]= _[_0x3829[56]](_0x97ccx2d[_0x3829[48]],_0x97ccx2d[_0x3829[53]]);_0x97ccx1f[_0x3829[57]]= _[_0x3829[56]](_0x97ccx2d[_0x3829[48]],qs[_0x3829[58]](_0x97ccx2c[_0x3829[53]][_0x3829[58]]));_0x97ccx1f[_0x3829[57]]= (_0x97ccx1f[_0x3829[57]][_0x3829[59]])?_0x97ccx1f[_0x3829[57]]:_0x97ccx2d[_0x3829[48]];if(_0x97ccx2c[_0x3829[53]][_0x3829[75]]){_0x97ccx1f[_0x3829[76]]= [{all:true}]};_0x97ccx1f= _[_0x3829[68]]({},_0x97ccx1f,_0x97ccx2c[_0x3829[72]]);return db[_0x3829[50]][_0x3829[81]](_0x97ccx1f)[_0x3829[40]](handleEntityNotFound(_0x97ccx1a,null))[_0x3829[40]](respondWithResult(_0x97ccx1a,null))[_0x3829[73]](handleError(_0x97ccx1a,null))};exports[_0x3829[82]]= function(_0x97ccx2c,_0x97ccx1a){return db[_0x3829[50]][_0x3829[82]](_0x97ccx2c[_0x3829[83]],{})[_0x3829[40]](respondWithResult(_0x97ccx1a,201))[_0x3829[73]](handleError(_0x97ccx1a,null))};exports[_0x3829[84]]= function(_0x97ccx2c,_0x97ccx1a){var _0x97ccx1f={raw:false,where:{id:_0x97ccx2c[_0x3829[80]][_0x3829[79]]}},_0x97ccx2d={};_0x97ccx2d[_0x3829[48]]= _[_0x3829[51]](db[_0x3829[50]][_0x3829[49]]);_0x97ccx1f[_0x3829[57]]= _[_0x3829[56]](_0x97ccx2d[_0x3829[48]],qs[_0x3829[58]](_0x97ccx2c[_0x3829[53]][_0x3829[58]]));_0x97ccx1f[_0x3829[57]]= (_0x97ccx1f[_0x3829[57]][_0x3829[59]])?_0x97ccx1f[_0x3829[57]]:_0x97ccx2d[_0x3829[48]];if(_0x97ccx2c[_0x3829[53]][_0x3829[75]]){_0x97ccx1f[_0x3829[76]]= [{all:true}]};_0x97ccx1f= _[_0x3829[68]]({},_0x97ccx1f,_0x97ccx2c[_0x3829[72]]);return db[_0x3829[50]][_0x3829[81]](_0x97ccx1f)[_0x3829[40]](handleEntityNotFound(_0x97ccx1a,null))[_0x3829[40]](function(_0x97ccx1c){if(_0x97ccx1c){var _0x97ccx33=_0x97ccx1c[_0x3829[85]]({plain:true});_0x97ccx33= qs[_0x3829[88]](_0x97ccx33,[_0x3829[79],_0x3829[86],_0x3829[87]]);_0x97ccx2c[_0x3829[83]]= _[_0x3829[88]](_0x97ccx2c[_0x3829[83]],[_0x3829[79],_0x3829[86],_0x3829[87]]);return db[_0x3829[50]][_0x3829[82]](_[_0x3829[68]](_0x97ccx33,_0x97ccx2c[_0x3829[83]]),{include:_0x97ccx2c[_0x3829[53]][_0x3829[75]]?[{all:true}]:undefined})}})[_0x3829[40]](respondWithResult(_0x97ccx1a,201))[_0x3829[73]](handleError(_0x97ccx1a,null))};exports[_0x3829[41]]= function(_0x97ccx2c,_0x97ccx1a){if(_0x97ccx2c[_0x3829[83]][_0x3829[79]]){delete _0x97ccx2c[_0x3829[83]][_0x3829[79]]};return db[_0x3829[50]][_0x3829[81]]({where:{id:_0x97ccx2c[_0x3829[80]][_0x3829[79]]}})[_0x3829[40]](handleEntityNotFound(_0x97ccx1a,null))[_0x3829[40]](saveUpdates(_0x97ccx2c[_0x3829[83]],null))[_0x3829[40]](respondWithResult(_0x97ccx1a,null))[_0x3829[73]](handleError(_0x97ccx1a,null))};exports[_0x3829[42]]= function(_0x97ccx2c,_0x97ccx1a){return db[_0x3829[50]][_0x3829[81]]({where:{id:_0x97ccx2c[_0x3829[80]][_0x3829[79]]}})[_0x3829[40]](handleEntityNotFound(_0x97ccx1a,null))[_0x3829[40]](removeEntity(_0x97ccx1a,null))[_0x3829[73]](handleError(_0x97ccx1a,null))};exports[_0x3829[89]]= function(_0x97ccx2c,_0x97ccx1a,_0x97ccx34){var _0x97ccx1f={raw:true,where:{}};var _0x97ccx2d={};var _0x97ccx35={count:0,rows:[]};return db[_0x3829[50]][_0x3829[92]]({where:{id:_0x97ccx2c[_0x3829[80]][_0x3829[79]]}})[_0x3829[40]](handleEntityNotFound(_0x97ccx1a,null))[_0x3829[40]](function(_0x97ccx1c){if(_0x97ccx1c){_0x97ccx2d[_0x3829[48]]= _[_0x3829[51]](db[_0x3829[90]][_0x3829[49]]);_0x97ccx2d[_0x3829[53]]= _[_0x3829[51]](_0x97ccx2c[_0x3829[53]]);_0x97ccx2d[_0x3829[55]]= _[_0x3829[56]](_0x97ccx2d[_0x3829[48]],_0x97ccx2d[_0x3829[53]]);_0x97ccx1f[_0x3829[57]]= _[_0x3829[56]](_0x97ccx2d[_0x3829[48]],qs[_0x3829[58]](_0x97ccx2c[_0x3829[53]][_0x3829[58]]));_0x97ccx1f[_0x3829[57]]= (_0x97ccx1f[_0x3829[57]][_0x3829[59]])?_0x97ccx1f[_0x3829[57]]:_0x97ccx2d[_0x3829[48]];if(!_0x97ccx2c[_0x3829[53]][_0x3829[61]](_0x3829[60])){_0x97ccx1f[_0x3829[32]]= qs[_0x3829[32]](_0x97ccx2c[_0x3829[53]][_0x3829[32]]);_0x97ccx1f[_0x3829[31]]= qs[_0x3829[31]](_0x97ccx2c[_0x3829[53]][_0x3829[31]])};_0x97ccx1f[_0x3829[62]]= qs[_0x3829[63]](_0x97ccx2c[_0x3829[53]][_0x3829[63]]);_0x97ccx1f[_0x3829[64]]= qs[_0x3829[55]](_[_0x3829[65]](_0x97ccx2c[_0x3829[53]],_0x97ccx2d[_0x3829[55]]));_0x97ccx1f[_0x3829[64]][_0x3829[91]]= _0x97ccx1c[_0x3829[79]];if(_0x97ccx2c[_0x3829[53]][_0x3829[69]]){_0x97ccx1f[_0x3829[64]]= _[_0x3829[68]](_0x97ccx1f[_0x3829[64]],{$or:_[_0x3829[71]](_0x97ccx1f[_0x3829[57]],function(_0x97ccx30){var _0x97ccx2e={};_0x97ccx2e[_0x97ccx30]= {$like:_0x3829[70]+ _0x97ccx2c[_0x3829[53]][_0x3829[69]]+ _0x3829[70]};return _0x97ccx2e})})};_0x97ccx1f= _[_0x3829[68]]({},_0x97ccx1f,_0x97ccx2c[_0x3829[72]]);return db[_0x3829[90]][_0x3829[30]]({where:_0x97ccx1f[_0x3829[64]]})[_0x3829[40]](function(_0x97ccx20){_0x97ccx35[_0x3829[30]]= _0x97ccx20;if(_0x97ccx2c[_0x3829[53]][_0x3829[75]]){_0x97ccx1f[_0x3829[76]]= [{all:true}]};return db[_0x3829[90]][_0x3829[77]](_0x97ccx1f)})[_0x3829[40]](function(_0x97ccx32){_0x97ccx35[_0x3829[74]]= _0x97ccx32;return _0x97ccx35})}})[_0x3829[40]](respondWithFilteredResult(_0x97ccx1a,_0x97ccx1f))[_0x3829[73]](handleError(_0x97ccx1a,null))};exports[_0x3829[93]]= function(_0x97ccx2c,_0x97ccx1a,_0x97ccx34){var _0x97ccx1f={raw:true,where:{}};var _0x97ccx2d={};var _0x97ccx35={count:0,rows:[]};var _0x97ccx2f={dateStart:_0x97ccx2c[_0x3829[53]][_0x3829[52]],dateEnd:_0x97ccx2c[_0x3829[53]][_0x3829[54]]};delete _0x97ccx2c[_0x3829[53]][_0x3829[52]];delete _0x97ccx2c[_0x3829[53]][_0x3829[54]];return db[_0x3829[50]][_0x3829[92]]({where:{id:_0x97ccx2c[_0x3829[80]][_0x3829[79]]}})[_0x3829[40]](handleEntityNotFound(_0x97ccx1a,null))[_0x3829[40]](function(_0x97ccx1c){if(_0x97ccx1c){_0x97ccx2d[_0x3829[48]]= _[_0x3829[51]](db[_0x3829[94]][_0x3829[49]]);_0x97ccx2d[_0x3829[53]]= _[_0x3829[51]](_0x97ccx2c[_0x3829[53]]);_0x97ccx2d[_0x3829[55]]= _[_0x3829[56]](_0x97ccx2d[_0x3829[48]],_0x97ccx2d[_0x3829[53]]);_0x97ccx1f[_0x3829[57]]= _[_0x3829[56]](_0x97ccx2d[_0x3829[48]],qs[_0x3829[58]](_0x97ccx2c[_0x3829[53]][_0x3829[58]]));_0x97ccx1f[_0x3829[57]]= (_0x97ccx1f[_0x3829[57]][_0x3829[59]])?_0x97ccx1f[_0x3829[57]]:_0x97ccx2d[_0x3829[48]];if(!_0x97ccx2c[_0x3829[53]][_0x3829[61]](_0x3829[60])){_0x97ccx1f[_0x3829[32]]= qs[_0x3829[32]](_0x97ccx2c[_0x3829[53]][_0x3829[32]]);_0x97ccx1f[_0x3829[31]]= qs[_0x3829[31]](_0x97ccx2c[_0x3829[53]][_0x3829[31]])};_0x97ccx1f[_0x3829[62]]= qs[_0x3829[63]](_0x97ccx2c[_0x3829[53]][_0x3829[63]]);_0x97ccx1f[_0x3829[64]]= qs[_0x3829[55]](_[_0x3829[65]](_0x97ccx2c[_0x3829[53]],_0x97ccx2d[_0x3829[55]]));_0x97ccx1f[_0x3829[64]][_0x3829[91]]= _0x97ccx1c[_0x3829[79]];if(_0x97ccx2f[_0x3829[52]]){if(_0x97ccx2f[_0x3829[54]]){_0x97ccx2f[_0x3829[54]]= moment(_0x97ccx2f[_0x3829[54]])[_0x3829[67]](1,_0x3829[66])}else {_0x97ccx2f[_0x3829[54]]= moment(_0x97ccx2f[_0x3829[52]])[_0x3829[67]](1,_0x3829[66])};_[_0x3829[68]](_0x97ccx1f[_0x3829[64]],{createdAt:{$gte:_0x97ccx2f[_0x3829[52]],$lte:_0x97ccx2f[_0x3829[54]]}})};if(_0x97ccx2c[_0x3829[53]][_0x3829[69]]){_0x97ccx1f[_0x3829[64]]= _[_0x3829[68]](_0x97ccx1f[_0x3829[64]],{$or:_[_0x3829[71]](_0x97ccx1f[_0x3829[57]],function(_0x97ccx30){var _0x97ccx2e={};_0x97ccx2e[_0x97ccx30]= {$like:_0x3829[70]+ _0x97ccx2c[_0x3829[53]][_0x3829[69]]+ _0x3829[70]};return _0x97ccx2e})})};_0x97ccx1f= _[_0x3829[68]]({},_0x97ccx1f,_0x97ccx2c[_0x3829[72]]);return db[_0x3829[94]][_0x3829[30]]({where:_0x97ccx1f[_0x3829[64]]})[_0x3829[40]](function(_0x97ccx20){_0x97ccx35[_0x3829[30]]= _0x97ccx20;if(_0x97ccx2c[_0x3829[53]][_0x3829[75]]){_0x97ccx1f[_0x3829[76]]= [{all:true}]};return db[_0x3829[94]][_0x3829[77]](_0x97ccx1f)})[_0x3829[40]](function(_0x97ccx32){_0x97ccx35[_0x3829[74]]= _0x97ccx32;return _0x97ccx35})}})[_0x3829[40]](respondWithFilteredResult(_0x97ccx1a,_0x97ccx1f))[_0x3829[73]](handleError(_0x97ccx1a,null))};function char(_0x97ccx37){return _0x3829[95]===  typeof _0x97ccx37?String[_0x3829[96]][_0x3829[37]](null,arguments):_0x97ccx37}function needsEncapsulation(_0x97ccx39){return !!_0x97ccx39&& (_0x97ccx39.toString()[_0x3829[97]](char(0xd))>= 0|| _0x97ccx39.toString()[_0x3829[97]](char(0xa))>= 0|| _0x97ccx39.toString()[_0x3829[97]](char(0x2c))>= 0|| _0x97ccx39.toString()[_0x3829[97]](char(0x22))>= 0)}function encapsulate(_0x97ccx39){var _0x97ccx3b=char(0x22),_0x97ccx3c=_0x3829[98]+ char(0x22),_0x97ccx3d=_0x97ccx39.toString()[_0x3829[100]]( new RegExp(_0x97ccx3b,_0x3829[99]),_0x97ccx3c);return _0x97ccx3b+ _0x97ccx3d+ _0x97ccx3b}exports[_0x3829[101]]= function(_0x97ccx2c,_0x97ccx1a,_0x97ccx34){var _0x97ccx3e,_0x97ccx3f;return db[_0x3829[90]][_0x3829[77]]({where:{ProjectId:_0x97ccx2c[_0x3829[80]][_0x3829[79]]}})[_0x3829[40]](handleEntityNotFound(_0x97ccx1a,null))[_0x3829[40]](function(_0x97ccx1c){if(_0x97ccx1c){_0x97ccx3e= _0x97ccx1c;return db[_0x3829[121]][_0x3829[77]]({where:{ProjectId:_0x97ccx2c[_0x3829[80]][_0x3829[79]]},order:_0x3829[120]})}})[_0x3829[40]](handleEntityNotFound(_0x97ccx1a,null))[_0x3829[40]](function(_0x97ccx1c){if(_0x97ccx1c){_0x97ccx3f= _0x97ccx1c;var _0x97ccx40={};for(var _0x97ccx41=0,_0x97ccx42=_0x97ccx3f[_0x3829[59]];_0x97ccx41< _0x97ccx42;_0x97ccx41++){if(!_0x97ccx40[_0x3829[61]](_0x97ccx3f[_0x97ccx41][_0x3829[102]])){_0x97ccx40[_0x97ccx3f[_0x97ccx41][_0x3829[102]]]= needsEncapsulation(_0x97ccx3f[_0x97ccx41][_0x3829[103]])?encapsulate(_0x97ccx3f[_0x97ccx41][_0x3829[103]]):_0x97ccx3f[_0x97ccx41][_0x3829[103]]}};var _0x97ccx43=[],_0x97ccx44={};for(var _0x97ccx45=0,_0x97ccx46=_0x97ccx3e[_0x3829[59]];_0x97ccx45< _0x97ccx46;_0x97ccx45++){_0x97ccx44= {ProjectId:_0x97ccx2c[_0x3829[80]][_0x3829[79]],SessionId:_0x97ccx3e[_0x97ccx45][_0x3829[79]],StartTime:moment(_0x97ccx3e[_0x97ccx45][_0x3829[106]])[_0x3829[105]](_0x3829[104])};for(var _0x97ccx47=0,_0x97ccx48=_0x97ccx3f[_0x3829[59]];_0x97ccx47< _0x97ccx48;_0x97ccx47++){if(_0x97ccx3f[_0x97ccx47][_0x3829[107]]== _0x97ccx3e[_0x97ccx45][_0x3829[79]]&& _0x97ccx40[_0x3829[61]](_0x97ccx3f[_0x97ccx47][_0x3829[102]])){_0x97ccx44[_0x97ccx40[_0x97ccx3f[_0x97ccx47][_0x3829[102]]]]= _0x97ccx3f[_0x97ccx47][_0x3829[108]]}};for(var _0x97ccx49 in _0x97ccx40){if(!_0x97ccx44[_0x3829[61]](_0x97ccx40[_0x97ccx49])){_0x97ccx44[_0x97ccx40[_0x97ccx49]]= null}};_0x97ccx43[_0x3829[109]](_0x97ccx44)};var _0x97ccx4a=toCsv(_0x97ccx43);var _0x97ccx4b=Date[_0x3829[110]]();fs[_0x3829[112]](util[_0x3829[105]](_0x3829[111],_0x97ccx2c[_0x3829[80]][_0x3829[79]],_0x97ccx4b),_0x97ccx4a);_0x97ccx1a[_0x3829[116]](_0x3829[113],_0x3829[114]+ util[_0x3829[105]](_0x3829[115],_0x97ccx2c[_0x3829[80]][_0x3829[79]],_0x97ccx4b));_0x97ccx1a[_0x3829[116]](_0x3829[117],_0x3829[118]);_0x97ccx1a[_0x3829[119]](util[_0x3829[105]](_0x3829[111],_0x97ccx2c[_0x3829[80]][_0x3829[79]],_0x97ccx4b))}})[_0x3829[73]](handleError(_0x97ccx1a,null))}
\ No newline at end of file
index 0ed7a50..aba8fd2 100644 (file)
@@ -1 +1 @@
-var _0x26d9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74","\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x26d9[0];var _=require(_0x26d9[1]);var util=require(_0x26d9[2]);var logger=require(_0x26d9[4])(_0x26d9[3]);var moment=require(_0x26d9[5]);var BPromise=require(_0x26d9[6]);var rp=require(_0x26d9[7]);var attributes=require(_0x26d9[8]);module[_0x26d9[9]]= function(_0x36aax8,_0x36aax9){return _0x36aax8[_0x26d9[12]](_0x26d9[10],attributes,{tableName:_0x26d9[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x6ee2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74","\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x6ee2[0];var _=require(_0x6ee2[1]);var util=require(_0x6ee2[2]);var logger=require(_0x6ee2[4])(_0x6ee2[3]);var moment=require(_0x6ee2[5]);var BPromise=require(_0x6ee2[6]);var rp=require(_0x6ee2[7]);var attributes=require(_0x6ee2[8]);module[_0x6ee2[9]]= function(_0x125dx8,_0x125dx9){return _0x125dx8[_0x6ee2[12]](_0x6ee2[10],attributes,{tableName:_0x6ee2[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 4bc449a..ae41694 100644 (file)
@@ -1 +1 @@
-var _0xddbe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xddbe[0];var _=require(_0xddbe[1]);var util=require(_0xddbe[2]);var moment=require(_0xddbe[3]);var BPromise=require(_0xddbe[4]);var rs=require(_0xddbe[5]);var fs=require(_0xddbe[6]);var db=require(_0xddbe[8])[_0xddbe[7]];var utils=require(_0xddbe[9]);var logger=require(_0xddbe[11])(_0xddbe[10]);var config=require(_0xddbe[12]);var jayson=require(_0xddbe[13]);var client=jayson[_0xddbe[15]][_0xddbe[14]]({port:9002});function respondWithRpcPromise(_0xecaaxe,_0xecaaxf,_0xecaax10){return  new BPromise(function(_0xecaax11,_0xecaax12){return client[_0xddbe[28]](_0xecaaxe,_0xecaax10)[_0xddbe[27]](function(_0xecaax14){logger[_0xddbe[20]](_0xddbe[16],_0xecaaxf,_0xddbe[19]);logger[_0xddbe[23]](_0xddbe[21],_0xecaaxf,_0xddbe[19],JSON[_0xddbe[22]](_0xecaax14));if(_0xecaax14[_0xddbe[17]]){if(_0xecaax14[_0xddbe[17]][_0xddbe[24]]=== 500){logger[_0xddbe[17]](_0xddbe[16],_0xecaaxf,_0xecaax14[_0xddbe[17]][_0xddbe[25]]);return _0xecaax12(_0xecaax14[_0xddbe[17]][_0xddbe[25]])};logger[_0xddbe[17]](_0xddbe[16],_0xecaaxf,_0xecaax14[_0xddbe[17]][_0xddbe[25]]);return _0xecaax11(_0xecaax14[_0xddbe[17]][_0xddbe[25]])}else {logger[_0xddbe[20]](_0xddbe[16],_0xecaaxf,_0xddbe[19]);_0xecaax11(_0xecaax14[_0xddbe[26]][_0xddbe[25]])}})[_0xddbe[18]](function(_0xecaax13){logger[_0xddbe[17]](_0xddbe[16],_0xecaaxf,_0xecaax13);_0xecaax12(_0xecaax13)})})}
\ No newline at end of file
+var _0xc276=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xc276[0];var _=require(_0xc276[1]);var util=require(_0xc276[2]);var moment=require(_0xc276[3]);var BPromise=require(_0xc276[4]);var rs=require(_0xc276[5]);var fs=require(_0xc276[6]);var db=require(_0xc276[8])[_0xc276[7]];var utils=require(_0xc276[9]);var logger=require(_0xc276[11])(_0xc276[10]);var config=require(_0xc276[12]);var jayson=require(_0xc276[13]);var client=jayson[_0xc276[15]][_0xc276[14]]({port:9002});function respondWithRpcPromise(_0xa705xe,_0xa705xf,_0xa705x10){return  new BPromise(function(_0xa705x11,_0xa705x12){return client[_0xc276[28]](_0xa705xe,_0xa705x10)[_0xc276[27]](function(_0xa705x14){logger[_0xc276[20]](_0xc276[16],_0xa705xf,_0xc276[19]);logger[_0xc276[23]](_0xc276[21],_0xa705xf,_0xc276[19],JSON[_0xc276[22]](_0xa705x14));if(_0xa705x14[_0xc276[17]]){if(_0xa705x14[_0xc276[17]][_0xc276[24]]=== 500){logger[_0xc276[17]](_0xc276[16],_0xa705xf,_0xa705x14[_0xc276[17]][_0xc276[25]]);return _0xa705x12(_0xa705x14[_0xc276[17]][_0xc276[25]])};logger[_0xc276[17]](_0xc276[16],_0xa705xf,_0xa705x14[_0xc276[17]][_0xc276[25]]);return _0xa705x11(_0xa705x14[_0xc276[17]][_0xc276[25]])}else {logger[_0xc276[20]](_0xc276[16],_0xa705xf,_0xc276[19]);_0xa705x11(_0xa705x14[_0xc276[26]][_0xc276[25]])}})[_0xc276[18]](function(_0xa705x13){logger[_0xc276[17]](_0xc276[16],_0xa705xf,_0xa705x13);_0xa705x12(_0xa705x13)})})}
\ No newline at end of file
index 211ff7e..05c76ff 100644 (file)
@@ -1 +1 @@
-var _0x9af7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9af7[0];var multer=require(_0x9af7[1]);var util=require(_0x9af7[2]);var path=require(_0x9af7[3]);var express=require(_0x9af7[4]);var router=express.Router();var auth=require(_0x9af7[5]);var interaction=require(_0x9af7[6]);var config=require(_0x9af7[7]);var controller=require(_0x9af7[8]);router[_0x9af7[12]](_0x9af7[9],auth[_0x9af7[10]](),controller[_0x9af7[11]]);router[_0x9af7[12]](_0x9af7[13],auth[_0x9af7[10]](),controller[_0x9af7[14]]);router[_0x9af7[12]](_0x9af7[15],auth[_0x9af7[10]](),controller[_0x9af7[16]]);router[_0x9af7[18]](_0x9af7[9],auth[_0x9af7[10]](),controller[_0x9af7[17]]);router[_0x9af7[20]](_0x9af7[15],auth[_0x9af7[10]](),controller[_0x9af7[19]]);router[_0x9af7[22]](_0x9af7[15],auth[_0x9af7[10]](),controller[_0x9af7[21]]);module[_0x9af7[23]]= router
\ No newline at end of file
+var _0x4e8a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4e8a[0];var multer=require(_0x4e8a[1]);var util=require(_0x4e8a[2]);var path=require(_0x4e8a[3]);var express=require(_0x4e8a[4]);var router=express.Router();var auth=require(_0x4e8a[5]);var interaction=require(_0x4e8a[6]);var config=require(_0x4e8a[7]);var controller=require(_0x4e8a[8]);router[_0x4e8a[12]](_0x4e8a[9],auth[_0x4e8a[10]](),controller[_0x4e8a[11]]);router[_0x4e8a[12]](_0x4e8a[13],auth[_0x4e8a[10]](),controller[_0x4e8a[14]]);router[_0x4e8a[12]](_0x4e8a[15],auth[_0x4e8a[10]](),controller[_0x4e8a[16]]);router[_0x4e8a[18]](_0x4e8a[9],auth[_0x4e8a[10]](),controller[_0x4e8a[17]]);router[_0x4e8a[20]](_0x4e8a[15],auth[_0x4e8a[10]](),controller[_0x4e8a[19]]);router[_0x4e8a[22]](_0x4e8a[15],auth[_0x4e8a[10]](),controller[_0x4e8a[21]]);module[_0x4e8a[23]]= router
\ No newline at end of file
index 7ba286a..be176ea 100644 (file)
@@ -1 +1 @@
-var _0xb98d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0xb98d[0];var Sequelize=require(_0xb98d[1]);module[_0xb98d[2]]= {question:{type:Sequelize[_0xb98d[3]]},answer:{type:Sequelize[_0xb98d[3]]},membername:{type:Sequelize[_0xb98d[3]]},projectname:{type:Sequelize[_0xb98d[3]]},queue:{type:Sequelize[_0xb98d[3]]},uniqueid:{type:Sequelize[_0xb98d[3]]},calleridname:{type:Sequelize[_0xb98d[3]]},calleridnum:{type:Sequelize[_0xb98d[3]]},questionId:{type:Sequelize[_0xb98d[3]]}}
\ No newline at end of file
+var _0x7147=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0x7147[0];var Sequelize=require(_0x7147[1]);module[_0x7147[2]]= {question:{type:Sequelize[_0x7147[3]]},answer:{type:Sequelize[_0x7147[3]]},membername:{type:Sequelize[_0x7147[3]]},projectname:{type:Sequelize[_0x7147[3]]},queue:{type:Sequelize[_0x7147[3]]},uniqueid:{type:Sequelize[_0x7147[3]]},calleridname:{type:Sequelize[_0x7147[3]]},calleridnum:{type:Sequelize[_0x7147[3]]},questionId:{type:Sequelize[_0x7147[3]]}}
\ No newline at end of file
index 1924692..5b00b4f 100644 (file)
@@ -1 +1 @@
-var _0xef8a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xef8a[0];var jsonpatch=require(_0xef8a[1]);var rp=require(_0xef8a[2]);var moment=require(_0xef8a[3]);var BPromise=require(_0xef8a[4]);var Mustache=require(_0xef8a[5]);var util=require(_0xef8a[6]);var path=require(_0xef8a[7]);var sox=require(_0xef8a[8]);var csv=require(_0xef8a[9]);var ejs=require(_0xef8a[10]);var fs=require(_0xef8a[11]);var _=require(_0xef8a[12]);var squel=require(_0xef8a[13]);var crypto=require(_0xef8a[14]);var jsforce=require(_0xef8a[15]);var deskjs=require(_0xef8a[16]);var toCsv=require(_0xef8a[9]);var querystring=require(_0xef8a[17]);var Papa=require(_0xef8a[18]);var qs=require(_0xef8a[19]);var logger=require(_0xef8a[21])(_0xef8a[20]);var utils=require(_0xef8a[22]);var config=require(_0xef8a[23]);var db=require(_0xef8a[25])[_0xef8a[24]];function respondWithStatusCode(_0x9683x1a,_0x9683x1b){_0x9683x1b= _0x9683x1b|| 204;return function(_0x9683x1c){if(_0x9683x1c){return _0x9683x1a[_0xef8a[26]](_0x9683x1b)};return _0x9683x1a[_0xef8a[28]](_0x9683x1b)[_0xef8a[27]]()}}function respondWithResult(_0x9683x1a,_0x9683x1b){_0x9683x1b= _0x9683x1b|| 200;return function(_0x9683x1c){if(_0x9683x1c){return _0x9683x1a[_0xef8a[28]](_0x9683x1b)[_0xef8a[29]](_0x9683x1c)}}}function respondWithFilteredResult(_0x9683x1a,_0x9683x1f){return function(_0x9683x1c){if(_0x9683x1c){var _0x9683x20=_0x9683x1c[_0xef8a[30]],_0x9683x21=_0x9683x1f[_0xef8a[31]],_0x9683x22=_0x9683x1f[_0xef8a[31]]+ _0x9683x1f[_0xef8a[32]],_0x9683x1b;if(_0x9683x22>= _0x9683x20){_0x9683x22= _0x9683x20;_0x9683x1b= 200}else {_0x9683x1b= 206};_0x9683x1a[_0xef8a[28]](_0x9683x1b);return _0x9683x1a[_0xef8a[36]](_0xef8a[33],_0x9683x21+ _0xef8a[34]+ _0x9683x22+ _0xef8a[35]+ _0x9683x20)[_0xef8a[29]](_0x9683x1c)};return null}}function patchUpdates(_0x9683x24){return function(_0x9683x1c){try{jsonpatch[_0xef8a[37]](_0x9683x1c,_0x9683x24,true)}catch(err){return BPromise[_0xef8a[38]](err)};return _0x9683x1c[_0xef8a[39]]()}}function saveUpdates(_0x9683x26,_0x9683x1b){return function(_0x9683x1c){if(_0x9683x1c){return _0x9683x1c[_0xef8a[41]](_0x9683x26)[_0xef8a[40]](function(_0x9683x27){return _0x9683x27})};return null}}function removeEntity(_0x9683x1a,_0x9683x1b){return function(_0x9683x1c){if(_0x9683x1c){return _0x9683x1c[_0xef8a[42]]()[_0xef8a[40]](function(){_0x9683x1a[_0xef8a[28]](204)[_0xef8a[27]]()})}}}function handleEntityNotFound(_0x9683x1a,_0x9683x1b){return function(_0x9683x1c){if(!_0x9683x1c){_0x9683x1a[_0xef8a[26]](404)};return _0x9683x1c}}function handleError(_0x9683x1a,_0x9683x1b){_0x9683x1b= _0x9683x1b|| 500;return function(_0x9683x2b){logger[_0xef8a[44]](_0x9683x2b[_0xef8a[43]]);if(_0x9683x2b[_0xef8a[45]]){delete _0x9683x2b[_0xef8a[45]]};_0x9683x1a[_0xef8a[28]](_0x9683x1b)[_0xef8a[46]](_0x9683x2b)}}exports[_0xef8a[47]]= function(_0x9683x2c,_0x9683x1a){var _0x9683x1f={},_0x9683x2d={},_0x9683x2e={count:0,rows:[]};_0x9683x2d[_0xef8a[48]]= _[_0xef8a[51]](db[_0xef8a[50]][_0xef8a[49]]);var _0x9683x2f={dateStart:_0x9683x2c[_0xef8a[53]][_0xef8a[52]],dateEnd:_0x9683x2c[_0xef8a[53]][_0xef8a[54]]};delete _0x9683x2c[_0xef8a[53]][_0xef8a[52]];delete _0x9683x2c[_0xef8a[53]][_0xef8a[54]];_0x9683x2d[_0xef8a[53]]= _[_0xef8a[51]](_0x9683x2c[_0xef8a[53]]);_0x9683x2d[_0xef8a[55]]= _[_0xef8a[56]](_0x9683x2d[_0xef8a[48]],_0x9683x2d[_0xef8a[53]]);_0x9683x1f[_0xef8a[57]]= _[_0xef8a[56]](_0x9683x2d[_0xef8a[48]],qs[_0xef8a[58]](_0x9683x2c[_0xef8a[53]][_0xef8a[58]]));_0x9683x1f[_0xef8a[57]]= (_0x9683x1f[_0xef8a[57]][_0xef8a[59]])?_0x9683x1f[_0xef8a[57]]:_0x9683x2d[_0xef8a[48]];if(!_0x9683x2c[_0xef8a[53]][_0xef8a[61]](_0xef8a[60])){_0x9683x1f[_0xef8a[32]]= qs[_0xef8a[32]](_0x9683x2c[_0xef8a[53]][_0xef8a[32]]);_0x9683x1f[_0xef8a[31]]= qs[_0xef8a[31]](_0x9683x2c[_0xef8a[53]][_0xef8a[31]])};_0x9683x1f[_0xef8a[62]]= qs[_0xef8a[63]](_0x9683x2c[_0xef8a[53]][_0xef8a[63]]);_0x9683x1f[_0xef8a[64]]= qs[_0xef8a[55]](_[_0xef8a[65]](_0x9683x2c[_0xef8a[53]],_0x9683x2d[_0xef8a[55]]));if(_0x9683x2f[_0xef8a[52]]){if(_0x9683x2f[_0xef8a[54]]){_0x9683x2f[_0xef8a[54]]= moment(_0x9683x2f[_0xef8a[54]])[_0xef8a[67]](1,_0xef8a[66])}else {_0x9683x2f[_0xef8a[54]]= moment(_0x9683x2f[_0xef8a[52]])[_0xef8a[67]](1,_0xef8a[66])};_[_0xef8a[68]](_0x9683x1f[_0xef8a[64]],{createdAt:{$gte:_0x9683x2f[_0xef8a[52]],$lte:_0x9683x2f[_0xef8a[54]]}})};if(_0x9683x2c[_0xef8a[53]][_0xef8a[69]]){_0x9683x1f[_0xef8a[64]]= _[_0xef8a[68]](_0x9683x1f[_0xef8a[64]],{$or:_[_0xef8a[71]](_0x9683x1f[_0xef8a[57]],function(_0x9683x30){var _0x9683x2e={};_0x9683x2e[_0x9683x30]= {$like:_0xef8a[70]+ _0x9683x2c[_0xef8a[53]][_0xef8a[69]]+ _0xef8a[70]};return _0x9683x2e})})};_0x9683x1f= _[_0xef8a[68]]({},_0x9683x1f,_0x9683x2c[_0xef8a[72]]);var _0x9683x31={where:_0x9683x1f[_0xef8a[64]]};return db[_0xef8a[50]][_0xef8a[30]](_0x9683x31)[_0xef8a[40]](function(_0x9683x20){_0x9683x2e[_0xef8a[30]]= _0x9683x20;if(_0x9683x2c[_0xef8a[53]][_0xef8a[75]]){_0x9683x1f[_0xef8a[76]]= [{all:true}]};return db[_0xef8a[50]][_0xef8a[77]](_0x9683x1f)})[_0xef8a[40]](function(_0x9683x32){_0x9683x2e[_0xef8a[74]]= _0x9683x32;return _0x9683x2e})[_0xef8a[40]](respondWithFilteredResult(_0x9683x1a,_0x9683x1f))[_0xef8a[73]](handleError(_0x9683x1a,null))};exports[_0xef8a[78]]= function(_0x9683x2c,_0x9683x1a){var _0x9683x1f={raw:true,where:{id:_0x9683x2c[_0xef8a[80]][_0xef8a[79]]}},_0x9683x2d={};_0x9683x2d[_0xef8a[48]]= _[_0xef8a[51]](db[_0xef8a[50]][_0xef8a[49]]);_0x9683x2d[_0xef8a[53]]= _[_0xef8a[51]](_0x9683x2c[_0xef8a[53]]);_0x9683x2d[_0xef8a[55]]= _[_0xef8a[56]](_0x9683x2d[_0xef8a[48]],_0x9683x2d[_0xef8a[53]]);_0x9683x1f[_0xef8a[57]]= _[_0xef8a[56]](_0x9683x2d[_0xef8a[48]],qs[_0xef8a[58]](_0x9683x2c[_0xef8a[53]][_0xef8a[58]]));_0x9683x1f[_0xef8a[57]]= (_0x9683x1f[_0xef8a[57]][_0xef8a[59]])?_0x9683x1f[_0xef8a[57]]:_0x9683x2d[_0xef8a[48]];if(_0x9683x2c[_0xef8a[53]][_0xef8a[75]]){_0x9683x1f[_0xef8a[76]]= [{all:true}]};_0x9683x1f= _[_0xef8a[68]]({},_0x9683x1f,_0x9683x2c[_0xef8a[72]]);return db[_0xef8a[50]][_0xef8a[81]](_0x9683x1f)[_0xef8a[40]](handleEntityNotFound(_0x9683x1a,null))[_0xef8a[40]](respondWithResult(_0x9683x1a,null))[_0xef8a[73]](handleError(_0x9683x1a,null))};exports[_0xef8a[82]]= function(_0x9683x2c,_0x9683x1a){return db[_0xef8a[50]][_0xef8a[82]](_0x9683x2c[_0xef8a[83]],{})[_0xef8a[40]](respondWithResult(_0x9683x1a,201))[_0xef8a[73]](handleError(_0x9683x1a,null))};exports[_0xef8a[41]]= function(_0x9683x2c,_0x9683x1a){if(_0x9683x2c[_0xef8a[83]][_0xef8a[79]]){delete _0x9683x2c[_0xef8a[83]][_0xef8a[79]]};return db[_0xef8a[50]][_0xef8a[81]]({where:{id:_0x9683x2c[_0xef8a[80]][_0xef8a[79]]}})[_0xef8a[40]](handleEntityNotFound(_0x9683x1a,null))[_0xef8a[40]](saveUpdates(_0x9683x2c[_0xef8a[83]],null))[_0xef8a[40]](respondWithResult(_0x9683x1a,null))[_0xef8a[73]](handleError(_0x9683x1a,null))};exports[_0xef8a[42]]= function(_0x9683x2c,_0x9683x1a){return db[_0xef8a[50]][_0xef8a[81]]({where:{id:_0x9683x2c[_0xef8a[80]][_0xef8a[79]]}})[_0xef8a[40]](handleEntityNotFound(_0x9683x1a,null))[_0xef8a[40]](removeEntity(_0x9683x1a,null))[_0xef8a[73]](handleError(_0x9683x1a,null))};exports[_0xef8a[84]]= function(_0x9683x2c,_0x9683x1a){return db[_0xef8a[50]][_0xef8a[84]]()[_0xef8a[40]](respondWithResult(_0x9683x1a,null))[_0xef8a[73]](handleError(_0x9683x1a,null))}
\ No newline at end of file
+var _0x3a30=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x3a30[0];var jsonpatch=require(_0x3a30[1]);var rp=require(_0x3a30[2]);var moment=require(_0x3a30[3]);var BPromise=require(_0x3a30[4]);var Mustache=require(_0x3a30[5]);var util=require(_0x3a30[6]);var path=require(_0x3a30[7]);var sox=require(_0x3a30[8]);var csv=require(_0x3a30[9]);var ejs=require(_0x3a30[10]);var fs=require(_0x3a30[11]);var _=require(_0x3a30[12]);var squel=require(_0x3a30[13]);var crypto=require(_0x3a30[14]);var jsforce=require(_0x3a30[15]);var deskjs=require(_0x3a30[16]);var toCsv=require(_0x3a30[9]);var querystring=require(_0x3a30[17]);var Papa=require(_0x3a30[18]);var qs=require(_0x3a30[19]);var logger=require(_0x3a30[21])(_0x3a30[20]);var utils=require(_0x3a30[22]);var config=require(_0x3a30[23]);var db=require(_0x3a30[25])[_0x3a30[24]];function respondWithStatusCode(_0x84afx1a,_0x84afx1b){_0x84afx1b= _0x84afx1b|| 204;return function(_0x84afx1c){if(_0x84afx1c){return _0x84afx1a[_0x3a30[26]](_0x84afx1b)};return _0x84afx1a[_0x3a30[28]](_0x84afx1b)[_0x3a30[27]]()}}function respondWithResult(_0x84afx1a,_0x84afx1b){_0x84afx1b= _0x84afx1b|| 200;return function(_0x84afx1c){if(_0x84afx1c){return _0x84afx1a[_0x3a30[28]](_0x84afx1b)[_0x3a30[29]](_0x84afx1c)}}}function respondWithFilteredResult(_0x84afx1a,_0x84afx1f){return function(_0x84afx1c){if(_0x84afx1c){var _0x84afx20=_0x84afx1c[_0x3a30[30]],_0x84afx21=_0x84afx1f[_0x3a30[31]],_0x84afx22=_0x84afx1f[_0x3a30[31]]+ _0x84afx1f[_0x3a30[32]],_0x84afx1b;if(_0x84afx22>= _0x84afx20){_0x84afx22= _0x84afx20;_0x84afx1b= 200}else {_0x84afx1b= 206};_0x84afx1a[_0x3a30[28]](_0x84afx1b);return _0x84afx1a[_0x3a30[36]](_0x3a30[33],_0x84afx21+ _0x3a30[34]+ _0x84afx22+ _0x3a30[35]+ _0x84afx20)[_0x3a30[29]](_0x84afx1c)};return null}}function patchUpdates(_0x84afx24){return function(_0x84afx1c){try{jsonpatch[_0x3a30[37]](_0x84afx1c,_0x84afx24,true)}catch(err){return BPromise[_0x3a30[38]](err)};return _0x84afx1c[_0x3a30[39]]()}}function saveUpdates(_0x84afx26,_0x84afx1b){return function(_0x84afx1c){if(_0x84afx1c){return _0x84afx1c[_0x3a30[41]](_0x84afx26)[_0x3a30[40]](function(_0x84afx27){return _0x84afx27})};return null}}function removeEntity(_0x84afx1a,_0x84afx1b){return function(_0x84afx1c){if(_0x84afx1c){return _0x84afx1c[_0x3a30[42]]()[_0x3a30[40]](function(){_0x84afx1a[_0x3a30[28]](204)[_0x3a30[27]]()})}}}function handleEntityNotFound(_0x84afx1a,_0x84afx1b){return function(_0x84afx1c){if(!_0x84afx1c){_0x84afx1a[_0x3a30[26]](404)};return _0x84afx1c}}function handleError(_0x84afx1a,_0x84afx1b){_0x84afx1b= _0x84afx1b|| 500;return function(_0x84afx2b){logger[_0x3a30[44]](_0x84afx2b[_0x3a30[43]]);if(_0x84afx2b[_0x3a30[45]]){delete _0x84afx2b[_0x3a30[45]]};_0x84afx1a[_0x3a30[28]](_0x84afx1b)[_0x3a30[46]](_0x84afx2b)}}exports[_0x3a30[47]]= function(_0x84afx2c,_0x84afx1a){var _0x84afx1f={},_0x84afx2d={},_0x84afx2e={count:0,rows:[]};_0x84afx2d[_0x3a30[48]]= _[_0x3a30[51]](db[_0x3a30[50]][_0x3a30[49]]);var _0x84afx2f={dateStart:_0x84afx2c[_0x3a30[53]][_0x3a30[52]],dateEnd:_0x84afx2c[_0x3a30[53]][_0x3a30[54]]};delete _0x84afx2c[_0x3a30[53]][_0x3a30[52]];delete _0x84afx2c[_0x3a30[53]][_0x3a30[54]];_0x84afx2d[_0x3a30[53]]= _[_0x3a30[51]](_0x84afx2c[_0x3a30[53]]);_0x84afx2d[_0x3a30[55]]= _[_0x3a30[56]](_0x84afx2d[_0x3a30[48]],_0x84afx2d[_0x3a30[53]]);_0x84afx1f[_0x3a30[57]]= _[_0x3a30[56]](_0x84afx2d[_0x3a30[48]],qs[_0x3a30[58]](_0x84afx2c[_0x3a30[53]][_0x3a30[58]]));_0x84afx1f[_0x3a30[57]]= (_0x84afx1f[_0x3a30[57]][_0x3a30[59]])?_0x84afx1f[_0x3a30[57]]:_0x84afx2d[_0x3a30[48]];if(!_0x84afx2c[_0x3a30[53]][_0x3a30[61]](_0x3a30[60])){_0x84afx1f[_0x3a30[32]]= qs[_0x3a30[32]](_0x84afx2c[_0x3a30[53]][_0x3a30[32]]);_0x84afx1f[_0x3a30[31]]= qs[_0x3a30[31]](_0x84afx2c[_0x3a30[53]][_0x3a30[31]])};_0x84afx1f[_0x3a30[62]]= qs[_0x3a30[63]](_0x84afx2c[_0x3a30[53]][_0x3a30[63]]);_0x84afx1f[_0x3a30[64]]= qs[_0x3a30[55]](_[_0x3a30[65]](_0x84afx2c[_0x3a30[53]],_0x84afx2d[_0x3a30[55]]));if(_0x84afx2f[_0x3a30[52]]){if(_0x84afx2f[_0x3a30[54]]){_0x84afx2f[_0x3a30[54]]= moment(_0x84afx2f[_0x3a30[54]])[_0x3a30[67]](1,_0x3a30[66])}else {_0x84afx2f[_0x3a30[54]]= moment(_0x84afx2f[_0x3a30[52]])[_0x3a30[67]](1,_0x3a30[66])};_[_0x3a30[68]](_0x84afx1f[_0x3a30[64]],{createdAt:{$gte:_0x84afx2f[_0x3a30[52]],$lte:_0x84afx2f[_0x3a30[54]]}})};if(_0x84afx2c[_0x3a30[53]][_0x3a30[69]]){_0x84afx1f[_0x3a30[64]]= _[_0x3a30[68]](_0x84afx1f[_0x3a30[64]],{$or:_[_0x3a30[71]](_0x84afx1f[_0x3a30[57]],function(_0x84afx30){var _0x84afx2e={};_0x84afx2e[_0x84afx30]= {$like:_0x3a30[70]+ _0x84afx2c[_0x3a30[53]][_0x3a30[69]]+ _0x3a30[70]};return _0x84afx2e})})};_0x84afx1f= _[_0x3a30[68]]({},_0x84afx1f,_0x84afx2c[_0x3a30[72]]);var _0x84afx31={where:_0x84afx1f[_0x3a30[64]]};return db[_0x3a30[50]][_0x3a30[30]](_0x84afx31)[_0x3a30[40]](function(_0x84afx20){_0x84afx2e[_0x3a30[30]]= _0x84afx20;if(_0x84afx2c[_0x3a30[53]][_0x3a30[75]]){_0x84afx1f[_0x3a30[76]]= [{all:true}]};return db[_0x3a30[50]][_0x3a30[77]](_0x84afx1f)})[_0x3a30[40]](function(_0x84afx32){_0x84afx2e[_0x3a30[74]]= _0x84afx32;return _0x84afx2e})[_0x3a30[40]](respondWithFilteredResult(_0x84afx1a,_0x84afx1f))[_0x3a30[73]](handleError(_0x84afx1a,null))};exports[_0x3a30[78]]= function(_0x84afx2c,_0x84afx1a){var _0x84afx1f={raw:true,where:{id:_0x84afx2c[_0x3a30[80]][_0x3a30[79]]}},_0x84afx2d={};_0x84afx2d[_0x3a30[48]]= _[_0x3a30[51]](db[_0x3a30[50]][_0x3a30[49]]);_0x84afx2d[_0x3a30[53]]= _[_0x3a30[51]](_0x84afx2c[_0x3a30[53]]);_0x84afx2d[_0x3a30[55]]= _[_0x3a30[56]](_0x84afx2d[_0x3a30[48]],_0x84afx2d[_0x3a30[53]]);_0x84afx1f[_0x3a30[57]]= _[_0x3a30[56]](_0x84afx2d[_0x3a30[48]],qs[_0x3a30[58]](_0x84afx2c[_0x3a30[53]][_0x3a30[58]]));_0x84afx1f[_0x3a30[57]]= (_0x84afx1f[_0x3a30[57]][_0x3a30[59]])?_0x84afx1f[_0x3a30[57]]:_0x84afx2d[_0x3a30[48]];if(_0x84afx2c[_0x3a30[53]][_0x3a30[75]]){_0x84afx1f[_0x3a30[76]]= [{all:true}]};_0x84afx1f= _[_0x3a30[68]]({},_0x84afx1f,_0x84afx2c[_0x3a30[72]]);return db[_0x3a30[50]][_0x3a30[81]](_0x84afx1f)[_0x3a30[40]](handleEntityNotFound(_0x84afx1a,null))[_0x3a30[40]](respondWithResult(_0x84afx1a,null))[_0x3a30[73]](handleError(_0x84afx1a,null))};exports[_0x3a30[82]]= function(_0x84afx2c,_0x84afx1a){return db[_0x3a30[50]][_0x3a30[82]](_0x84afx2c[_0x3a30[83]],{})[_0x3a30[40]](respondWithResult(_0x84afx1a,201))[_0x3a30[73]](handleError(_0x84afx1a,null))};exports[_0x3a30[41]]= function(_0x84afx2c,_0x84afx1a){if(_0x84afx2c[_0x3a30[83]][_0x3a30[79]]){delete _0x84afx2c[_0x3a30[83]][_0x3a30[79]]};return db[_0x3a30[50]][_0x3a30[81]]({where:{id:_0x84afx2c[_0x3a30[80]][_0x3a30[79]]}})[_0x3a30[40]](handleEntityNotFound(_0x84afx1a,null))[_0x3a30[40]](saveUpdates(_0x84afx2c[_0x3a30[83]],null))[_0x3a30[40]](respondWithResult(_0x84afx1a,null))[_0x3a30[73]](handleError(_0x84afx1a,null))};exports[_0x3a30[42]]= function(_0x84afx2c,_0x84afx1a){return db[_0x3a30[50]][_0x3a30[81]]({where:{id:_0x84afx2c[_0x3a30[80]][_0x3a30[79]]}})[_0x3a30[40]](handleEntityNotFound(_0x84afx1a,null))[_0x3a30[40]](removeEntity(_0x84afx1a,null))[_0x3a30[73]](handleError(_0x84afx1a,null))};exports[_0x3a30[84]]= function(_0x84afx2c,_0x84afx1a){return db[_0x3a30[50]][_0x3a30[84]]()[_0x3a30[40]](respondWithResult(_0x84afx1a,null))[_0x3a30[73]](handleError(_0x84afx1a,null))}
\ No newline at end of file
index cc2d3c1..6ea3a41 100644 (file)
@@ -1 +1 @@
-var _0x82fa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x82fa[0];var _=require(_0x82fa[1]);var util=require(_0x82fa[2]);var logger=require(_0x82fa[4])(_0x82fa[3]);var moment=require(_0x82fa[5]);var BPromise=require(_0x82fa[6]);var rp=require(_0x82fa[7]);var attributes=require(_0x82fa[8]);module[_0x82fa[9]]= function(_0x5d82x8,_0x5d82x9){return _0x5d82x8[_0x82fa[12]](_0x82fa[10],attributes,{tableName:_0x82fa[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x2707=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x2707[0];var _=require(_0x2707[1]);var util=require(_0x2707[2]);var logger=require(_0x2707[4])(_0x2707[3]);var moment=require(_0x2707[5]);var BPromise=require(_0x2707[6]);var rp=require(_0x2707[7]);var attributes=require(_0x2707[8]);module[_0x2707[9]]= function(_0xa70cx8,_0xa70cx9){return _0xa70cx8[_0x2707[12]](_0x2707[10],attributes,{tableName:_0x2707[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 3804848..f816302 100644 (file)
@@ -1 +1 @@
-var _0x497a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x497a[0];var _=require(_0x497a[1]);var util=require(_0x497a[2]);var moment=require(_0x497a[3]);var BPromise=require(_0x497a[4]);var rs=require(_0x497a[5]);var fs=require(_0x497a[6]);var db=require(_0x497a[8])[_0x497a[7]];var utils=require(_0x497a[9]);var logger=require(_0x497a[11])(_0x497a[10]);var config=require(_0x497a[12]);var jayson=require(_0x497a[13]);var client=jayson[_0x497a[15]][_0x497a[14]]({port:9002});function respondWithRpcPromise(_0x8312xe,_0x8312xf,_0x8312x10){return  new BPromise(function(_0x8312x11,_0x8312x12){return client[_0x497a[28]](_0x8312xe,_0x8312x10)[_0x497a[27]](function(_0x8312x14){logger[_0x497a[20]](_0x497a[16],_0x8312xf,_0x497a[19]);logger[_0x497a[23]](_0x497a[21],_0x8312xf,_0x497a[19],JSON[_0x497a[22]](_0x8312x14));if(_0x8312x14[_0x497a[17]]){if(_0x8312x14[_0x497a[17]][_0x497a[24]]=== 500){logger[_0x497a[17]](_0x497a[16],_0x8312xf,_0x8312x14[_0x497a[17]][_0x497a[25]]);return _0x8312x12(_0x8312x14[_0x497a[17]][_0x497a[25]])};logger[_0x497a[17]](_0x497a[16],_0x8312xf,_0x8312x14[_0x497a[17]][_0x497a[25]]);return _0x8312x11(_0x8312x14[_0x497a[17]][_0x497a[25]])}else {logger[_0x497a[20]](_0x497a[16],_0x8312xf,_0x497a[19]);_0x8312x11(_0x8312x14[_0x497a[26]][_0x497a[25]])}})[_0x497a[18]](function(_0x8312x13){logger[_0x497a[17]](_0x497a[16],_0x8312xf,_0x8312x13);_0x8312x12(_0x8312x13)})})}
\ No newline at end of file
+var _0x4e71=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x4e71[0];var _=require(_0x4e71[1]);var util=require(_0x4e71[2]);var moment=require(_0x4e71[3]);var BPromise=require(_0x4e71[4]);var rs=require(_0x4e71[5]);var fs=require(_0x4e71[6]);var db=require(_0x4e71[8])[_0x4e71[7]];var utils=require(_0x4e71[9]);var logger=require(_0x4e71[11])(_0x4e71[10]);var config=require(_0x4e71[12]);var jayson=require(_0x4e71[13]);var client=jayson[_0x4e71[15]][_0x4e71[14]]({port:9002});function respondWithRpcPromise(_0xeafbxe,_0xeafbxf,_0xeafbx10){return  new BPromise(function(_0xeafbx11,_0xeafbx12){return client[_0x4e71[28]](_0xeafbxe,_0xeafbx10)[_0x4e71[27]](function(_0xeafbx14){logger[_0x4e71[20]](_0x4e71[16],_0xeafbxf,_0x4e71[19]);logger[_0x4e71[23]](_0x4e71[21],_0xeafbxf,_0x4e71[19],JSON[_0x4e71[22]](_0xeafbx14));if(_0xeafbx14[_0x4e71[17]]){if(_0xeafbx14[_0x4e71[17]][_0x4e71[24]]=== 500){logger[_0x4e71[17]](_0x4e71[16],_0xeafbxf,_0xeafbx14[_0x4e71[17]][_0x4e71[25]]);return _0xeafbx12(_0xeafbx14[_0x4e71[17]][_0x4e71[25]])};logger[_0x4e71[17]](_0x4e71[16],_0xeafbxf,_0xeafbx14[_0x4e71[17]][_0x4e71[25]]);return _0xeafbx11(_0xeafbx14[_0x4e71[17]][_0x4e71[25]])}else {logger[_0x4e71[20]](_0x4e71[16],_0xeafbxf,_0x4e71[19]);_0xeafbx11(_0xeafbx14[_0x4e71[26]][_0x4e71[25]])}})[_0x4e71[18]](function(_0xeafbx13){logger[_0x4e71[17]](_0x4e71[16],_0xeafbxf,_0xeafbx13);_0xeafbx12(_0xeafbx13)})})}
\ No newline at end of file
index 37c0ca4..cd5c552 100644 (file)
@@ -1 +1 @@
-var _0xab43=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73","\x67\x65\x74\x51\x75\x65\x73\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xab43[0];var multer=require(_0xab43[1]);var util=require(_0xab43[2]);var path=require(_0xab43[3]);var express=require(_0xab43[4]);var router=express.Router();var auth=require(_0xab43[5]);var interaction=require(_0xab43[6]);var config=require(_0xab43[7]);var controller=require(_0xab43[8]);router[_0xab43[12]](_0xab43[9],auth[_0xab43[10]](),controller[_0xab43[11]]);router[_0xab43[12]](_0xab43[13],auth[_0xab43[10]](),controller[_0xab43[14]]);router[_0xab43[12]](_0xab43[15],auth[_0xab43[10]](),controller[_0xab43[16]]);router[_0xab43[12]](_0xab43[17],auth[_0xab43[10]](),controller[_0xab43[18]]);router[_0xab43[20]](_0xab43[9],auth[_0xab43[10]](),controller[_0xab43[19]]);router[_0xab43[22]](_0xab43[15],auth[_0xab43[10]](),controller[_0xab43[21]]);router[_0xab43[24]](_0xab43[15],auth[_0xab43[10]](),controller[_0xab43[23]]);module[_0xab43[25]]= router
\ No newline at end of file
+var _0xb33f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73","\x67\x65\x74\x51\x75\x65\x73\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xb33f[0];var multer=require(_0xb33f[1]);var util=require(_0xb33f[2]);var path=require(_0xb33f[3]);var express=require(_0xb33f[4]);var router=express.Router();var auth=require(_0xb33f[5]);var interaction=require(_0xb33f[6]);var config=require(_0xb33f[7]);var controller=require(_0xb33f[8]);router[_0xb33f[12]](_0xb33f[9],auth[_0xb33f[10]](),controller[_0xb33f[11]]);router[_0xb33f[12]](_0xb33f[13],auth[_0xb33f[10]](),controller[_0xb33f[14]]);router[_0xb33f[12]](_0xb33f[15],auth[_0xb33f[10]](),controller[_0xb33f[16]]);router[_0xb33f[12]](_0xb33f[17],auth[_0xb33f[10]](),controller[_0xb33f[18]]);router[_0xb33f[20]](_0xb33f[9],auth[_0xb33f[10]](),controller[_0xb33f[19]]);router[_0xb33f[22]](_0xb33f[15],auth[_0xb33f[10]](),controller[_0xb33f[21]]);router[_0xb33f[24]](_0xb33f[15],auth[_0xb33f[10]](),controller[_0xb33f[23]]);module[_0xb33f[25]]= router
\ No newline at end of file
index 2dbb222..b9cc5cd 100644 (file)
@@ -1 +1 @@
-var _0x389b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x44\x41\x54\x45","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x389b[0];var moment=require(_0x389b[1]);var Sequelize=require(_0x389b[2]);module[_0x389b[3]]= {starttime:{type:Sequelize[_0x389b[4]],set:function(_0xd3c0x3){this[_0x389b[6]](_0x389b[5],_0xd3c0x3);this[_0x389b[6]](_0x389b[7],moment()[_0x389b[9]](_0x389b[8]))}},endtime:{type:Sequelize[_0x389b[4]]},membername:{type:Sequelize[_0x389b[10]]},projectname:{type:Sequelize[_0x389b[10]]},queue:{type:Sequelize[_0x389b[10]]},uniqueid:{type:Sequelize[_0x389b[10]]},calleridname:{type:Sequelize[_0x389b[10]]},calleridnum:{type:Sequelize[_0x389b[10]]},completed:{type:Sequelize[_0x389b[11]],defaultValue:false}}
\ No newline at end of file
+var _0x6c2c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x44\x41\x54\x45","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x6c2c[0];var moment=require(_0x6c2c[1]);var Sequelize=require(_0x6c2c[2]);module[_0x6c2c[3]]= {starttime:{type:Sequelize[_0x6c2c[4]],set:function(_0x5860x3){this[_0x6c2c[6]](_0x6c2c[5],_0x5860x3);this[_0x6c2c[6]](_0x6c2c[7],moment()[_0x6c2c[9]](_0x6c2c[8]))}},endtime:{type:Sequelize[_0x6c2c[4]]},membername:{type:Sequelize[_0x6c2c[10]]},projectname:{type:Sequelize[_0x6c2c[10]]},queue:{type:Sequelize[_0x6c2c[10]]},uniqueid:{type:Sequelize[_0x6c2c[10]]},calleridname:{type:Sequelize[_0x6c2c[10]]},calleridnum:{type:Sequelize[_0x6c2c[10]]},completed:{type:Sequelize[_0x6c2c[11]],defaultValue:false}}
\ No newline at end of file
index 9194871..a89c988 100644 (file)
@@ -1 +1 @@
-var _0x2261=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x51\x75\x65\x73\x74\x69\x6F\x6E\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x53\x65\x73\x73\x69\x6F\x6E\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65"];_0x2261[0];var jsonpatch=require(_0x2261[1]);var rp=require(_0x2261[2]);var moment=require(_0x2261[3]);var BPromise=require(_0x2261[4]);var Mustache=require(_0x2261[5]);var util=require(_0x2261[6]);var path=require(_0x2261[7]);var sox=require(_0x2261[8]);var csv=require(_0x2261[9]);var ejs=require(_0x2261[10]);var fs=require(_0x2261[11]);var _=require(_0x2261[12]);var squel=require(_0x2261[13]);var crypto=require(_0x2261[14]);var jsforce=require(_0x2261[15]);var deskjs=require(_0x2261[16]);var toCsv=require(_0x2261[9]);var querystring=require(_0x2261[17]);var Papa=require(_0x2261[18]);var qs=require(_0x2261[19]);var logger=require(_0x2261[21])(_0x2261[20]);var utils=require(_0x2261[22]);var config=require(_0x2261[23]);var db=require(_0x2261[25])[_0x2261[24]];function respondWithStatusCode(_0xc7ddx1a,_0xc7ddx1b){_0xc7ddx1b= _0xc7ddx1b|| 204;return function(_0xc7ddx1c){if(_0xc7ddx1c){return _0xc7ddx1a[_0x2261[26]](_0xc7ddx1b)};return _0xc7ddx1a[_0x2261[28]](_0xc7ddx1b)[_0x2261[27]]()}}function respondWithResult(_0xc7ddx1a,_0xc7ddx1b){_0xc7ddx1b= _0xc7ddx1b|| 200;return function(_0xc7ddx1c){if(_0xc7ddx1c){return _0xc7ddx1a[_0x2261[28]](_0xc7ddx1b)[_0x2261[29]](_0xc7ddx1c)}}}function respondWithFilteredResult(_0xc7ddx1a,_0xc7ddx1f){return function(_0xc7ddx1c){if(_0xc7ddx1c){var _0xc7ddx20=_0xc7ddx1c[_0x2261[30]],_0xc7ddx21=_0xc7ddx1f[_0x2261[31]],_0xc7ddx22=_0xc7ddx1f[_0x2261[31]]+ _0xc7ddx1f[_0x2261[32]],_0xc7ddx1b;if(_0xc7ddx22>= _0xc7ddx20){_0xc7ddx22= _0xc7ddx20;_0xc7ddx1b= 200}else {_0xc7ddx1b= 206};_0xc7ddx1a[_0x2261[28]](_0xc7ddx1b);return _0xc7ddx1a[_0x2261[36]](_0x2261[33],_0xc7ddx21+ _0x2261[34]+ _0xc7ddx22+ _0x2261[35]+ _0xc7ddx20)[_0x2261[29]](_0xc7ddx1c)};return null}}function patchUpdates(_0xc7ddx24){return function(_0xc7ddx1c){try{jsonpatch[_0x2261[37]](_0xc7ddx1c,_0xc7ddx24,true)}catch(err){return BPromise[_0x2261[38]](err)};return _0xc7ddx1c[_0x2261[39]]()}}function saveUpdates(_0xc7ddx26,_0xc7ddx1b){return function(_0xc7ddx1c){if(_0xc7ddx1c){return _0xc7ddx1c[_0x2261[41]](_0xc7ddx26)[_0x2261[40]](function(_0xc7ddx27){return _0xc7ddx27})};return null}}function removeEntity(_0xc7ddx1a,_0xc7ddx1b){return function(_0xc7ddx1c){if(_0xc7ddx1c){return _0xc7ddx1c[_0x2261[42]]()[_0x2261[40]](function(){_0xc7ddx1a[_0x2261[28]](204)[_0x2261[27]]()})}}}function handleEntityNotFound(_0xc7ddx1a,_0xc7ddx1b){return function(_0xc7ddx1c){if(!_0xc7ddx1c){_0xc7ddx1a[_0x2261[26]](404)};return _0xc7ddx1c}}function handleError(_0xc7ddx1a,_0xc7ddx1b){_0xc7ddx1b= _0xc7ddx1b|| 500;return function(_0xc7ddx2b){logger[_0x2261[44]](_0xc7ddx2b[_0x2261[43]]);if(_0xc7ddx2b[_0x2261[45]]){delete _0xc7ddx2b[_0x2261[45]]};_0xc7ddx1a[_0x2261[28]](_0xc7ddx1b)[_0x2261[46]](_0xc7ddx2b)}}exports[_0x2261[47]]= function(_0xc7ddx2c,_0xc7ddx1a){var _0xc7ddx1f={},_0xc7ddx2d={},_0xc7ddx2e={count:0,rows:[]};_0xc7ddx2d[_0x2261[48]]= _[_0x2261[51]](db[_0x2261[50]][_0x2261[49]]);var _0xc7ddx2f={dateStart:_0xc7ddx2c[_0x2261[53]][_0x2261[52]],dateEnd:_0xc7ddx2c[_0x2261[53]][_0x2261[54]]};delete _0xc7ddx2c[_0x2261[53]][_0x2261[52]];delete _0xc7ddx2c[_0x2261[53]][_0x2261[54]];_0xc7ddx2d[_0x2261[53]]= _[_0x2261[51]](_0xc7ddx2c[_0x2261[53]]);_0xc7ddx2d[_0x2261[55]]= _[_0x2261[56]](_0xc7ddx2d[_0x2261[48]],_0xc7ddx2d[_0x2261[53]]);_0xc7ddx1f[_0x2261[57]]= _[_0x2261[56]](_0xc7ddx2d[_0x2261[48]],qs[_0x2261[58]](_0xc7ddx2c[_0x2261[53]][_0x2261[58]]));_0xc7ddx1f[_0x2261[57]]= (_0xc7ddx1f[_0x2261[57]][_0x2261[59]])?_0xc7ddx1f[_0x2261[57]]:_0xc7ddx2d[_0x2261[48]];if(!_0xc7ddx2c[_0x2261[53]][_0x2261[61]](_0x2261[60])){_0xc7ddx1f[_0x2261[32]]= qs[_0x2261[32]](_0xc7ddx2c[_0x2261[53]][_0x2261[32]]);_0xc7ddx1f[_0x2261[31]]= qs[_0x2261[31]](_0xc7ddx2c[_0x2261[53]][_0x2261[31]])};_0xc7ddx1f[_0x2261[62]]= qs[_0x2261[63]](_0xc7ddx2c[_0x2261[53]][_0x2261[63]]);_0xc7ddx1f[_0x2261[64]]= qs[_0x2261[55]](_[_0x2261[65]](_0xc7ddx2c[_0x2261[53]],_0xc7ddx2d[_0x2261[55]]));if(_0xc7ddx2f[_0x2261[52]]){if(_0xc7ddx2f[_0x2261[54]]){_0xc7ddx2f[_0x2261[54]]= moment(_0xc7ddx2f[_0x2261[54]])[_0x2261[67]](1,_0x2261[66])}else {_0xc7ddx2f[_0x2261[54]]= moment(_0xc7ddx2f[_0x2261[52]])[_0x2261[67]](1,_0x2261[66])};_[_0x2261[68]](_0xc7ddx1f[_0x2261[64]],{createdAt:{$gte:_0xc7ddx2f[_0x2261[52]],$lte:_0xc7ddx2f[_0x2261[54]]}})};if(_0xc7ddx2c[_0x2261[53]][_0x2261[69]]){_0xc7ddx1f[_0x2261[64]]= _[_0x2261[68]](_0xc7ddx1f[_0x2261[64]],{$or:_[_0x2261[71]](_0xc7ddx1f[_0x2261[57]],function(_0xc7ddx30){var _0xc7ddx2e={};_0xc7ddx2e[_0xc7ddx30]= {$like:_0x2261[70]+ _0xc7ddx2c[_0x2261[53]][_0x2261[69]]+ _0x2261[70]};return _0xc7ddx2e})})};_0xc7ddx1f= _[_0x2261[68]]({},_0xc7ddx1f,_0xc7ddx2c[_0x2261[72]]);var _0xc7ddx31={where:_0xc7ddx1f[_0x2261[64]]};return db[_0x2261[50]][_0x2261[30]](_0xc7ddx31)[_0x2261[40]](function(_0xc7ddx20){_0xc7ddx2e[_0x2261[30]]= _0xc7ddx20;if(_0xc7ddx2c[_0x2261[53]][_0x2261[75]]){_0xc7ddx1f[_0x2261[76]]= [{all:true}]};return db[_0x2261[50]][_0x2261[77]](_0xc7ddx1f)})[_0x2261[40]](function(_0xc7ddx32){_0xc7ddx2e[_0x2261[74]]= _0xc7ddx32;return _0xc7ddx2e})[_0x2261[40]](respondWithFilteredResult(_0xc7ddx1a,_0xc7ddx1f))[_0x2261[73]](handleError(_0xc7ddx1a,null))};exports[_0x2261[78]]= function(_0xc7ddx2c,_0xc7ddx1a){var _0xc7ddx1f={raw:true,where:{id:_0xc7ddx2c[_0x2261[80]][_0x2261[79]]}},_0xc7ddx2d={};_0xc7ddx2d[_0x2261[48]]= _[_0x2261[51]](db[_0x2261[50]][_0x2261[49]]);_0xc7ddx2d[_0x2261[53]]= _[_0x2261[51]](_0xc7ddx2c[_0x2261[53]]);_0xc7ddx2d[_0x2261[55]]= _[_0x2261[56]](_0xc7ddx2d[_0x2261[48]],_0xc7ddx2d[_0x2261[53]]);_0xc7ddx1f[_0x2261[57]]= _[_0x2261[56]](_0xc7ddx2d[_0x2261[48]],qs[_0x2261[58]](_0xc7ddx2c[_0x2261[53]][_0x2261[58]]));_0xc7ddx1f[_0x2261[57]]= (_0xc7ddx1f[_0x2261[57]][_0x2261[59]])?_0xc7ddx1f[_0x2261[57]]:_0xc7ddx2d[_0x2261[48]];if(_0xc7ddx2c[_0x2261[53]][_0x2261[75]]){_0xc7ddx1f[_0x2261[76]]= [{all:true}]};_0xc7ddx1f= _[_0x2261[68]]({},_0xc7ddx1f,_0xc7ddx2c[_0x2261[72]]);return db[_0x2261[50]][_0x2261[81]](_0xc7ddx1f)[_0x2261[40]](handleEntityNotFound(_0xc7ddx1a,null))[_0x2261[40]](respondWithResult(_0xc7ddx1a,null))[_0x2261[73]](handleError(_0xc7ddx1a,null))};exports[_0x2261[82]]= function(_0xc7ddx2c,_0xc7ddx1a){return db[_0x2261[50]][_0x2261[82]](_0xc7ddx2c[_0x2261[83]],{})[_0x2261[40]](respondWithResult(_0xc7ddx1a,201))[_0x2261[73]](handleError(_0xc7ddx1a,null))};exports[_0x2261[41]]= function(_0xc7ddx2c,_0xc7ddx1a){if(_0xc7ddx2c[_0x2261[83]][_0x2261[79]]){delete _0xc7ddx2c[_0x2261[83]][_0x2261[79]]};return db[_0x2261[50]][_0x2261[81]]({where:{id:_0xc7ddx2c[_0x2261[80]][_0x2261[79]]}})[_0x2261[40]](handleEntityNotFound(_0xc7ddx1a,null))[_0x2261[40]](saveUpdates(_0xc7ddx2c[_0x2261[83]],null))[_0x2261[40]](respondWithResult(_0xc7ddx1a,null))[_0x2261[73]](handleError(_0xc7ddx1a,null))};exports[_0x2261[42]]= function(_0xc7ddx2c,_0xc7ddx1a){return db[_0x2261[50]][_0x2261[81]]({where:{id:_0xc7ddx2c[_0x2261[80]][_0x2261[79]]}})[_0x2261[40]](handleEntityNotFound(_0xc7ddx1a,null))[_0x2261[40]](removeEntity(_0xc7ddx1a,null))[_0x2261[73]](handleError(_0xc7ddx1a,null))};exports[_0x2261[84]]= function(_0xc7ddx2c,_0xc7ddx1a){return db[_0x2261[50]][_0x2261[84]]()[_0x2261[40]](respondWithResult(_0xc7ddx1a,null))[_0x2261[73]](handleError(_0xc7ddx1a,null))};exports[_0x2261[85]]= function(_0xc7ddx2c,_0xc7ddx1a,_0xc7ddx33){var _0xc7ddx1f={raw:true,where:{}};var _0xc7ddx2d={};var _0xc7ddx34={count:0,rows:[]};return db[_0x2261[50]][_0x2261[88]]({where:{id:_0xc7ddx2c[_0x2261[80]][_0x2261[79]]}})[_0x2261[40]](handleEntityNotFound(_0xc7ddx1a,null))[_0x2261[40]](function(_0xc7ddx1c){if(_0xc7ddx1c){_0xc7ddx2d[_0x2261[48]]= _[_0x2261[51]](db[_0x2261[86]][_0x2261[49]]);_0xc7ddx2d[_0x2261[53]]= _[_0x2261[51]](_0xc7ddx2c[_0x2261[53]]);_0xc7ddx2d[_0x2261[55]]= _[_0x2261[56]](_0xc7ddx2d[_0x2261[48]],_0xc7ddx2d[_0x2261[53]]);_0xc7ddx1f[_0x2261[57]]= _[_0x2261[56]](_0xc7ddx2d[_0x2261[48]],qs[_0x2261[58]](_0xc7ddx2c[_0x2261[53]][_0x2261[58]]));_0xc7ddx1f[_0x2261[57]]= (_0xc7ddx1f[_0x2261[57]][_0x2261[59]])?_0xc7ddx1f[_0x2261[57]]:_0xc7ddx2d[_0x2261[48]];if(!_0xc7ddx2c[_0x2261[53]][_0x2261[61]](_0x2261[60])){_0xc7ddx1f[_0x2261[32]]= qs[_0x2261[32]](_0xc7ddx2c[_0x2261[53]][_0x2261[32]]);_0xc7ddx1f[_0x2261[31]]= qs[_0x2261[31]](_0xc7ddx2c[_0x2261[53]][_0x2261[31]])};_0xc7ddx1f[_0x2261[62]]= qs[_0x2261[63]](_0xc7ddx2c[_0x2261[53]][_0x2261[63]]);_0xc7ddx1f[_0x2261[64]]= qs[_0x2261[55]](_[_0x2261[65]](_0xc7ddx2c[_0x2261[53]],_0xc7ddx2d[_0x2261[55]]));_0xc7ddx1f[_0x2261[64]][_0x2261[87]]= _0xc7ddx1c[_0x2261[79]];if(_0xc7ddx2c[_0x2261[53]][_0x2261[69]]){_0xc7ddx1f[_0x2261[64]]= _[_0x2261[68]](_0xc7ddx1f[_0x2261[64]],{$or:_[_0x2261[71]](_0xc7ddx1f[_0x2261[57]],function(_0xc7ddx30){var _0xc7ddx2e={};_0xc7ddx2e[_0xc7ddx30]= {$like:_0x2261[70]+ _0xc7ddx2c[_0x2261[53]][_0x2261[69]]+ _0x2261[70]};return _0xc7ddx2e})})};_0xc7ddx1f= _[_0x2261[68]]({},_0xc7ddx1f,_0xc7ddx2c[_0x2261[72]]);return db[_0x2261[86]][_0x2261[30]]({where:_0xc7ddx1f[_0x2261[64]]})[_0x2261[40]](function(_0xc7ddx20){_0xc7ddx34[_0x2261[30]]= _0xc7ddx20;if(_0xc7ddx2c[_0x2261[53]][_0x2261[75]]){_0xc7ddx1f[_0x2261[76]]= [{all:true}]};return db[_0x2261[86]][_0x2261[77]](_0xc7ddx1f)})[_0x2261[40]](function(_0xc7ddx32){_0xc7ddx34[_0x2261[74]]= _0xc7ddx32;return _0xc7ddx34})}})[_0x2261[40]](respondWithFilteredResult(_0xc7ddx1a,_0xc7ddx1f))[_0x2261[73]](handleError(_0xc7ddx1a,null))}
\ No newline at end of file
+var _0x267f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x51\x75\x65\x73\x74\x69\x6F\x6E\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x53\x65\x73\x73\x69\x6F\x6E\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65"];_0x267f[0];var jsonpatch=require(_0x267f[1]);var rp=require(_0x267f[2]);var moment=require(_0x267f[3]);var BPromise=require(_0x267f[4]);var Mustache=require(_0x267f[5]);var util=require(_0x267f[6]);var path=require(_0x267f[7]);var sox=require(_0x267f[8]);var csv=require(_0x267f[9]);var ejs=require(_0x267f[10]);var fs=require(_0x267f[11]);var _=require(_0x267f[12]);var squel=require(_0x267f[13]);var crypto=require(_0x267f[14]);var jsforce=require(_0x267f[15]);var deskjs=require(_0x267f[16]);var toCsv=require(_0x267f[9]);var querystring=require(_0x267f[17]);var Papa=require(_0x267f[18]);var qs=require(_0x267f[19]);var logger=require(_0x267f[21])(_0x267f[20]);var utils=require(_0x267f[22]);var config=require(_0x267f[23]);var db=require(_0x267f[25])[_0x267f[24]];function respondWithStatusCode(_0x17f9x1a,_0x17f9x1b){_0x17f9x1b= _0x17f9x1b|| 204;return function(_0x17f9x1c){if(_0x17f9x1c){return _0x17f9x1a[_0x267f[26]](_0x17f9x1b)};return _0x17f9x1a[_0x267f[28]](_0x17f9x1b)[_0x267f[27]]()}}function respondWithResult(_0x17f9x1a,_0x17f9x1b){_0x17f9x1b= _0x17f9x1b|| 200;return function(_0x17f9x1c){if(_0x17f9x1c){return _0x17f9x1a[_0x267f[28]](_0x17f9x1b)[_0x267f[29]](_0x17f9x1c)}}}function respondWithFilteredResult(_0x17f9x1a,_0x17f9x1f){return function(_0x17f9x1c){if(_0x17f9x1c){var _0x17f9x20=_0x17f9x1c[_0x267f[30]],_0x17f9x21=_0x17f9x1f[_0x267f[31]],_0x17f9x22=_0x17f9x1f[_0x267f[31]]+ _0x17f9x1f[_0x267f[32]],_0x17f9x1b;if(_0x17f9x22>= _0x17f9x20){_0x17f9x22= _0x17f9x20;_0x17f9x1b= 200}else {_0x17f9x1b= 206};_0x17f9x1a[_0x267f[28]](_0x17f9x1b);return _0x17f9x1a[_0x267f[36]](_0x267f[33],_0x17f9x21+ _0x267f[34]+ _0x17f9x22+ _0x267f[35]+ _0x17f9x20)[_0x267f[29]](_0x17f9x1c)};return null}}function patchUpdates(_0x17f9x24){return function(_0x17f9x1c){try{jsonpatch[_0x267f[37]](_0x17f9x1c,_0x17f9x24,true)}catch(err){return BPromise[_0x267f[38]](err)};return _0x17f9x1c[_0x267f[39]]()}}function saveUpdates(_0x17f9x26,_0x17f9x1b){return function(_0x17f9x1c){if(_0x17f9x1c){return _0x17f9x1c[_0x267f[41]](_0x17f9x26)[_0x267f[40]](function(_0x17f9x27){return _0x17f9x27})};return null}}function removeEntity(_0x17f9x1a,_0x17f9x1b){return function(_0x17f9x1c){if(_0x17f9x1c){return _0x17f9x1c[_0x267f[42]]()[_0x267f[40]](function(){_0x17f9x1a[_0x267f[28]](204)[_0x267f[27]]()})}}}function handleEntityNotFound(_0x17f9x1a,_0x17f9x1b){return function(_0x17f9x1c){if(!_0x17f9x1c){_0x17f9x1a[_0x267f[26]](404)};return _0x17f9x1c}}function handleError(_0x17f9x1a,_0x17f9x1b){_0x17f9x1b= _0x17f9x1b|| 500;return function(_0x17f9x2b){logger[_0x267f[44]](_0x17f9x2b[_0x267f[43]]);if(_0x17f9x2b[_0x267f[45]]){delete _0x17f9x2b[_0x267f[45]]};_0x17f9x1a[_0x267f[28]](_0x17f9x1b)[_0x267f[46]](_0x17f9x2b)}}exports[_0x267f[47]]= function(_0x17f9x2c,_0x17f9x1a){var _0x17f9x1f={},_0x17f9x2d={},_0x17f9x2e={count:0,rows:[]};_0x17f9x2d[_0x267f[48]]= _[_0x267f[51]](db[_0x267f[50]][_0x267f[49]]);var _0x17f9x2f={dateStart:_0x17f9x2c[_0x267f[53]][_0x267f[52]],dateEnd:_0x17f9x2c[_0x267f[53]][_0x267f[54]]};delete _0x17f9x2c[_0x267f[53]][_0x267f[52]];delete _0x17f9x2c[_0x267f[53]][_0x267f[54]];_0x17f9x2d[_0x267f[53]]= _[_0x267f[51]](_0x17f9x2c[_0x267f[53]]);_0x17f9x2d[_0x267f[55]]= _[_0x267f[56]](_0x17f9x2d[_0x267f[48]],_0x17f9x2d[_0x267f[53]]);_0x17f9x1f[_0x267f[57]]= _[_0x267f[56]](_0x17f9x2d[_0x267f[48]],qs[_0x267f[58]](_0x17f9x2c[_0x267f[53]][_0x267f[58]]));_0x17f9x1f[_0x267f[57]]= (_0x17f9x1f[_0x267f[57]][_0x267f[59]])?_0x17f9x1f[_0x267f[57]]:_0x17f9x2d[_0x267f[48]];if(!_0x17f9x2c[_0x267f[53]][_0x267f[61]](_0x267f[60])){_0x17f9x1f[_0x267f[32]]= qs[_0x267f[32]](_0x17f9x2c[_0x267f[53]][_0x267f[32]]);_0x17f9x1f[_0x267f[31]]= qs[_0x267f[31]](_0x17f9x2c[_0x267f[53]][_0x267f[31]])};_0x17f9x1f[_0x267f[62]]= qs[_0x267f[63]](_0x17f9x2c[_0x267f[53]][_0x267f[63]]);_0x17f9x1f[_0x267f[64]]= qs[_0x267f[55]](_[_0x267f[65]](_0x17f9x2c[_0x267f[53]],_0x17f9x2d[_0x267f[55]]));if(_0x17f9x2f[_0x267f[52]]){if(_0x17f9x2f[_0x267f[54]]){_0x17f9x2f[_0x267f[54]]= moment(_0x17f9x2f[_0x267f[54]])[_0x267f[67]](1,_0x267f[66])}else {_0x17f9x2f[_0x267f[54]]= moment(_0x17f9x2f[_0x267f[52]])[_0x267f[67]](1,_0x267f[66])};_[_0x267f[68]](_0x17f9x1f[_0x267f[64]],{createdAt:{$gte:_0x17f9x2f[_0x267f[52]],$lte:_0x17f9x2f[_0x267f[54]]}})};if(_0x17f9x2c[_0x267f[53]][_0x267f[69]]){_0x17f9x1f[_0x267f[64]]= _[_0x267f[68]](_0x17f9x1f[_0x267f[64]],{$or:_[_0x267f[71]](_0x17f9x1f[_0x267f[57]],function(_0x17f9x30){var _0x17f9x2e={};_0x17f9x2e[_0x17f9x30]= {$like:_0x267f[70]+ _0x17f9x2c[_0x267f[53]][_0x267f[69]]+ _0x267f[70]};return _0x17f9x2e})})};_0x17f9x1f= _[_0x267f[68]]({},_0x17f9x1f,_0x17f9x2c[_0x267f[72]]);var _0x17f9x31={where:_0x17f9x1f[_0x267f[64]]};return db[_0x267f[50]][_0x267f[30]](_0x17f9x31)[_0x267f[40]](function(_0x17f9x20){_0x17f9x2e[_0x267f[30]]= _0x17f9x20;if(_0x17f9x2c[_0x267f[53]][_0x267f[75]]){_0x17f9x1f[_0x267f[76]]= [{all:true}]};return db[_0x267f[50]][_0x267f[77]](_0x17f9x1f)})[_0x267f[40]](function(_0x17f9x32){_0x17f9x2e[_0x267f[74]]= _0x17f9x32;return _0x17f9x2e})[_0x267f[40]](respondWithFilteredResult(_0x17f9x1a,_0x17f9x1f))[_0x267f[73]](handleError(_0x17f9x1a,null))};exports[_0x267f[78]]= function(_0x17f9x2c,_0x17f9x1a){var _0x17f9x1f={raw:true,where:{id:_0x17f9x2c[_0x267f[80]][_0x267f[79]]}},_0x17f9x2d={};_0x17f9x2d[_0x267f[48]]= _[_0x267f[51]](db[_0x267f[50]][_0x267f[49]]);_0x17f9x2d[_0x267f[53]]= _[_0x267f[51]](_0x17f9x2c[_0x267f[53]]);_0x17f9x2d[_0x267f[55]]= _[_0x267f[56]](_0x17f9x2d[_0x267f[48]],_0x17f9x2d[_0x267f[53]]);_0x17f9x1f[_0x267f[57]]= _[_0x267f[56]](_0x17f9x2d[_0x267f[48]],qs[_0x267f[58]](_0x17f9x2c[_0x267f[53]][_0x267f[58]]));_0x17f9x1f[_0x267f[57]]= (_0x17f9x1f[_0x267f[57]][_0x267f[59]])?_0x17f9x1f[_0x267f[57]]:_0x17f9x2d[_0x267f[48]];if(_0x17f9x2c[_0x267f[53]][_0x267f[75]]){_0x17f9x1f[_0x267f[76]]= [{all:true}]};_0x17f9x1f= _[_0x267f[68]]({},_0x17f9x1f,_0x17f9x2c[_0x267f[72]]);return db[_0x267f[50]][_0x267f[81]](_0x17f9x1f)[_0x267f[40]](handleEntityNotFound(_0x17f9x1a,null))[_0x267f[40]](respondWithResult(_0x17f9x1a,null))[_0x267f[73]](handleError(_0x17f9x1a,null))};exports[_0x267f[82]]= function(_0x17f9x2c,_0x17f9x1a){return db[_0x267f[50]][_0x267f[82]](_0x17f9x2c[_0x267f[83]],{})[_0x267f[40]](respondWithResult(_0x17f9x1a,201))[_0x267f[73]](handleError(_0x17f9x1a,null))};exports[_0x267f[41]]= function(_0x17f9x2c,_0x17f9x1a){if(_0x17f9x2c[_0x267f[83]][_0x267f[79]]){delete _0x17f9x2c[_0x267f[83]][_0x267f[79]]};return db[_0x267f[50]][_0x267f[81]]({where:{id:_0x17f9x2c[_0x267f[80]][_0x267f[79]]}})[_0x267f[40]](handleEntityNotFound(_0x17f9x1a,null))[_0x267f[40]](saveUpdates(_0x17f9x2c[_0x267f[83]],null))[_0x267f[40]](respondWithResult(_0x17f9x1a,null))[_0x267f[73]](handleError(_0x17f9x1a,null))};exports[_0x267f[42]]= function(_0x17f9x2c,_0x17f9x1a){return db[_0x267f[50]][_0x267f[81]]({where:{id:_0x17f9x2c[_0x267f[80]][_0x267f[79]]}})[_0x267f[40]](handleEntityNotFound(_0x17f9x1a,null))[_0x267f[40]](removeEntity(_0x17f9x1a,null))[_0x267f[73]](handleError(_0x17f9x1a,null))};exports[_0x267f[84]]= function(_0x17f9x2c,_0x17f9x1a){return db[_0x267f[50]][_0x267f[84]]()[_0x267f[40]](respondWithResult(_0x17f9x1a,null))[_0x267f[73]](handleError(_0x17f9x1a,null))};exports[_0x267f[85]]= function(_0x17f9x2c,_0x17f9x1a,_0x17f9x33){var _0x17f9x1f={raw:true,where:{}};var _0x17f9x2d={};var _0x17f9x34={count:0,rows:[]};return db[_0x267f[50]][_0x267f[88]]({where:{id:_0x17f9x2c[_0x267f[80]][_0x267f[79]]}})[_0x267f[40]](handleEntityNotFound(_0x17f9x1a,null))[_0x267f[40]](function(_0x17f9x1c){if(_0x17f9x1c){_0x17f9x2d[_0x267f[48]]= _[_0x267f[51]](db[_0x267f[86]][_0x267f[49]]);_0x17f9x2d[_0x267f[53]]= _[_0x267f[51]](_0x17f9x2c[_0x267f[53]]);_0x17f9x2d[_0x267f[55]]= _[_0x267f[56]](_0x17f9x2d[_0x267f[48]],_0x17f9x2d[_0x267f[53]]);_0x17f9x1f[_0x267f[57]]= _[_0x267f[56]](_0x17f9x2d[_0x267f[48]],qs[_0x267f[58]](_0x17f9x2c[_0x267f[53]][_0x267f[58]]));_0x17f9x1f[_0x267f[57]]= (_0x17f9x1f[_0x267f[57]][_0x267f[59]])?_0x17f9x1f[_0x267f[57]]:_0x17f9x2d[_0x267f[48]];if(!_0x17f9x2c[_0x267f[53]][_0x267f[61]](_0x267f[60])){_0x17f9x1f[_0x267f[32]]= qs[_0x267f[32]](_0x17f9x2c[_0x267f[53]][_0x267f[32]]);_0x17f9x1f[_0x267f[31]]= qs[_0x267f[31]](_0x17f9x2c[_0x267f[53]][_0x267f[31]])};_0x17f9x1f[_0x267f[62]]= qs[_0x267f[63]](_0x17f9x2c[_0x267f[53]][_0x267f[63]]);_0x17f9x1f[_0x267f[64]]= qs[_0x267f[55]](_[_0x267f[65]](_0x17f9x2c[_0x267f[53]],_0x17f9x2d[_0x267f[55]]));_0x17f9x1f[_0x267f[64]][_0x267f[87]]= _0x17f9x1c[_0x267f[79]];if(_0x17f9x2c[_0x267f[53]][_0x267f[69]]){_0x17f9x1f[_0x267f[64]]= _[_0x267f[68]](_0x17f9x1f[_0x267f[64]],{$or:_[_0x267f[71]](_0x17f9x1f[_0x267f[57]],function(_0x17f9x30){var _0x17f9x2e={};_0x17f9x2e[_0x17f9x30]= {$like:_0x267f[70]+ _0x17f9x2c[_0x267f[53]][_0x267f[69]]+ _0x267f[70]};return _0x17f9x2e})})};_0x17f9x1f= _[_0x267f[68]]({},_0x17f9x1f,_0x17f9x2c[_0x267f[72]]);return db[_0x267f[86]][_0x267f[30]]({where:_0x17f9x1f[_0x267f[64]]})[_0x267f[40]](function(_0x17f9x20){_0x17f9x34[_0x267f[30]]= _0x17f9x20;if(_0x17f9x2c[_0x267f[53]][_0x267f[75]]){_0x17f9x1f[_0x267f[76]]= [{all:true}]};return db[_0x267f[86]][_0x267f[77]](_0x17f9x1f)})[_0x267f[40]](function(_0x17f9x32){_0x17f9x34[_0x267f[74]]= _0x17f9x32;return _0x17f9x34})}})[_0x267f[40]](respondWithFilteredResult(_0x17f9x1a,_0x17f9x1f))[_0x267f[73]](handleError(_0x17f9x1a,null))}
\ No newline at end of file
index 2e5f655..e0aef36 100644 (file)
@@ -1 +1 @@
-var _0x4fb7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x4fb7[0];var _=require(_0x4fb7[1]);var util=require(_0x4fb7[2]);var logger=require(_0x4fb7[4])(_0x4fb7[3]);var moment=require(_0x4fb7[5]);var BPromise=require(_0x4fb7[6]);var rp=require(_0x4fb7[7]);var attributes=require(_0x4fb7[8]);module[_0x4fb7[9]]= function(_0xd2c2x8,_0xd2c2x9){return _0xd2c2x8[_0x4fb7[12]](_0x4fb7[10],attributes,{tableName:_0x4fb7[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x55b7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x55b7[0];var _=require(_0x55b7[1]);var util=require(_0x55b7[2]);var logger=require(_0x55b7[4])(_0x55b7[3]);var moment=require(_0x55b7[5]);var BPromise=require(_0x55b7[6]);var rp=require(_0x55b7[7]);var attributes=require(_0x55b7[8]);module[_0x55b7[9]]= function(_0x8cc5x8,_0x8cc5x9){return _0x8cc5x8[_0x55b7[12]](_0x55b7[10],attributes,{tableName:_0x55b7[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index ef5931d..23cde91 100644 (file)
@@ -1 +1 @@
-var _0x565d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x565d[0];var _=require(_0x565d[1]);var util=require(_0x565d[2]);var moment=require(_0x565d[3]);var BPromise=require(_0x565d[4]);var rs=require(_0x565d[5]);var fs=require(_0x565d[6]);var db=require(_0x565d[8])[_0x565d[7]];var utils=require(_0x565d[9]);var logger=require(_0x565d[11])(_0x565d[10]);var config=require(_0x565d[12]);var jayson=require(_0x565d[13]);var client=jayson[_0x565d[15]][_0x565d[14]]({port:9002});function respondWithRpcPromise(_0x58f9xe,_0x58f9xf,_0x58f9x10){return  new BPromise(function(_0x58f9x11,_0x58f9x12){return client[_0x565d[28]](_0x58f9xe,_0x58f9x10)[_0x565d[27]](function(_0x58f9x14){logger[_0x565d[20]](_0x565d[16],_0x58f9xf,_0x565d[19]);logger[_0x565d[23]](_0x565d[21],_0x58f9xf,_0x565d[19],JSON[_0x565d[22]](_0x58f9x14));if(_0x58f9x14[_0x565d[17]]){if(_0x58f9x14[_0x565d[17]][_0x565d[24]]=== 500){logger[_0x565d[17]](_0x565d[16],_0x58f9xf,_0x58f9x14[_0x565d[17]][_0x565d[25]]);return _0x58f9x12(_0x58f9x14[_0x565d[17]][_0x565d[25]])};logger[_0x565d[17]](_0x565d[16],_0x58f9xf,_0x58f9x14[_0x565d[17]][_0x565d[25]]);return _0x58f9x11(_0x58f9x14[_0x565d[17]][_0x565d[25]])}else {logger[_0x565d[20]](_0x565d[16],_0x58f9xf,_0x565d[19]);_0x58f9x11(_0x58f9x14[_0x565d[26]][_0x565d[25]])}})[_0x565d[18]](function(_0x58f9x13){logger[_0x565d[17]](_0x565d[16],_0x58f9xf,_0x58f9x13);_0x58f9x12(_0x58f9x13)})})}
\ No newline at end of file
+var _0x3ec8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x3ec8[0];var _=require(_0x3ec8[1]);var util=require(_0x3ec8[2]);var moment=require(_0x3ec8[3]);var BPromise=require(_0x3ec8[4]);var rs=require(_0x3ec8[5]);var fs=require(_0x3ec8[6]);var db=require(_0x3ec8[8])[_0x3ec8[7]];var utils=require(_0x3ec8[9]);var logger=require(_0x3ec8[11])(_0x3ec8[10]);var config=require(_0x3ec8[12]);var jayson=require(_0x3ec8[13]);var client=jayson[_0x3ec8[15]][_0x3ec8[14]]({port:9002});function respondWithRpcPromise(_0x74d6xe,_0x74d6xf,_0x74d6x10){return  new BPromise(function(_0x74d6x11,_0x74d6x12){return client[_0x3ec8[28]](_0x74d6xe,_0x74d6x10)[_0x3ec8[27]](function(_0x74d6x14){logger[_0x3ec8[20]](_0x3ec8[16],_0x74d6xf,_0x3ec8[19]);logger[_0x3ec8[23]](_0x3ec8[21],_0x74d6xf,_0x3ec8[19],JSON[_0x3ec8[22]](_0x74d6x14));if(_0x74d6x14[_0x3ec8[17]]){if(_0x74d6x14[_0x3ec8[17]][_0x3ec8[24]]=== 500){logger[_0x3ec8[17]](_0x3ec8[16],_0x74d6xf,_0x74d6x14[_0x3ec8[17]][_0x3ec8[25]]);return _0x74d6x12(_0x74d6x14[_0x3ec8[17]][_0x3ec8[25]])};logger[_0x3ec8[17]](_0x3ec8[16],_0x74d6xf,_0x74d6x14[_0x3ec8[17]][_0x3ec8[25]]);return _0x74d6x11(_0x74d6x14[_0x3ec8[17]][_0x3ec8[25]])}else {logger[_0x3ec8[20]](_0x3ec8[16],_0x74d6xf,_0x3ec8[19]);_0x74d6x11(_0x74d6x14[_0x3ec8[26]][_0x3ec8[25]])}})[_0x3ec8[18]](function(_0x74d6x13){logger[_0x3ec8[17]](_0x3ec8[16],_0x74d6xf,_0x74d6x13);_0x74d6x12(_0x74d6x13)})})}
\ No newline at end of file
index 1062352..ba84792 100644 (file)
@@ -1 +1 @@
-var _0x7ebd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7ebd[0];var multer=require(_0x7ebd[1]);var util=require(_0x7ebd[2]);var path=require(_0x7ebd[3]);var express=require(_0x7ebd[4]);var router=express.Router();var auth=require(_0x7ebd[5]);var interaction=require(_0x7ebd[6]);var config=require(_0x7ebd[7]);var controller=require(_0x7ebd[8]);router[_0x7ebd[11]](_0x7ebd[9],controller[_0x7ebd[10]]);router[_0x7ebd[15]](_0x7ebd[12],auth[_0x7ebd[13]](),controller[_0x7ebd[14]]);module[_0x7ebd[16]]= router
\ No newline at end of file
+var _0xe543=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xe543[0];var multer=require(_0xe543[1]);var util=require(_0xe543[2]);var path=require(_0xe543[3]);var express=require(_0xe543[4]);var router=express.Router();var auth=require(_0xe543[5]);var interaction=require(_0xe543[6]);var config=require(_0xe543[7]);var controller=require(_0xe543[8]);router[_0xe543[11]](_0xe543[9],controller[_0xe543[10]]);router[_0xe543[15]](_0xe543[12],auth[_0xe543[13]](),controller[_0xe543[14]]);module[_0xe543[16]]= router
\ No newline at end of file
index 720e072..2441bdf 100644 (file)
@@ -1 +1 @@
-var _0xb4fd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x54\x45\x58\x54","\x53\x54\x52\x49\x4E\x47"];_0xb4fd[0];var Sequelize=require(_0xb4fd[1]);module[_0xb4fd[2]]= {license:{type:Sequelize[_0xb4fd[3]]},data1:{type:Sequelize[_0xb4fd[4]]},data2:{type:Sequelize[_0xb4fd[4]]}}
\ No newline at end of file
+var _0xb4ba=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x54\x45\x58\x54","\x53\x54\x52\x49\x4E\x47"];_0xb4ba[0];var Sequelize=require(_0xb4ba[1]);module[_0xb4ba[2]]= {license:{type:Sequelize[_0xb4ba[3]]},data1:{type:Sequelize[_0xb4ba[4]]},data2:{type:Sequelize[_0xb4ba[4]]}}
\ No newline at end of file
index fb420a4..04c29bf 100644 (file)
@@ -1 +1 @@
-var _0x14cd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x64","\x62\x6F\x64\x79","\x63\x61\x74\x63\x68","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x4C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6F\x70\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x67\x65\x74\x4C\x69\x63\x65\x6E\x73\x65"];_0x14cd[0];var jsonpatch=require(_0x14cd[1]);var rp=require(_0x14cd[2]);var moment=require(_0x14cd[3]);var BPromise=require(_0x14cd[4]);var Mustache=require(_0x14cd[5]);var util=require(_0x14cd[6]);var path=require(_0x14cd[7]);var sox=require(_0x14cd[8]);var csv=require(_0x14cd[9]);var ejs=require(_0x14cd[10]);var fs=require(_0x14cd[11]);var _=require(_0x14cd[12]);var squel=require(_0x14cd[13]);var crypto=require(_0x14cd[14]);var jsforce=require(_0x14cd[15]);var deskjs=require(_0x14cd[16]);var toCsv=require(_0x14cd[9]);var querystring=require(_0x14cd[17]);var Papa=require(_0x14cd[18]);var qs=require(_0x14cd[19]);var logger=require(_0x14cd[21])(_0x14cd[20]);var utils=require(_0x14cd[22]);var config=require(_0x14cd[23]);var db=require(_0x14cd[25])[_0x14cd[24]];function respondWithStatusCode(_0x8e96x1a,_0x8e96x1b){_0x8e96x1b= _0x8e96x1b|| 204;return function(_0x8e96x1c){if(_0x8e96x1c){return _0x8e96x1a[_0x14cd[26]](_0x8e96x1b)};return _0x8e96x1a[_0x14cd[28]](_0x8e96x1b)[_0x14cd[27]]()}}function respondWithResult(_0x8e96x1a,_0x8e96x1b){_0x8e96x1b= _0x8e96x1b|| 200;return function(_0x8e96x1c){if(_0x8e96x1c){return _0x8e96x1a[_0x14cd[28]](_0x8e96x1b)[_0x14cd[29]](_0x8e96x1c)}}}function respondWithFilteredResult(_0x8e96x1a,_0x8e96x1f){return function(_0x8e96x1c){if(_0x8e96x1c){var _0x8e96x20=_0x8e96x1c[_0x14cd[30]],_0x8e96x21=_0x8e96x1f[_0x14cd[31]],_0x8e96x22=_0x8e96x1f[_0x14cd[31]]+ _0x8e96x1f[_0x14cd[32]],_0x8e96x1b;if(_0x8e96x22>= _0x8e96x20){_0x8e96x22= _0x8e96x20;_0x8e96x1b= 200}else {_0x8e96x1b= 206};_0x8e96x1a[_0x14cd[28]](_0x8e96x1b);return _0x8e96x1a[_0x14cd[36]](_0x14cd[33],_0x8e96x21+ _0x14cd[34]+ _0x8e96x22+ _0x14cd[35]+ _0x8e96x20)[_0x14cd[29]](_0x8e96x1c)};return null}}function patchUpdates(_0x8e96x24){return function(_0x8e96x1c){try{jsonpatch[_0x14cd[37]](_0x8e96x1c,_0x8e96x24,true)}catch(err){return BPromise[_0x14cd[38]](err)};return _0x8e96x1c[_0x14cd[39]]()}}function saveUpdates(_0x8e96x26,_0x8e96x1b){return function(_0x8e96x1c){if(_0x8e96x1c){return _0x8e96x1c[_0x14cd[41]](_0x8e96x26)[_0x14cd[40]](function(_0x8e96x27){return _0x8e96x27})};return null}}function removeEntity(_0x8e96x1a,_0x8e96x1b){return function(_0x8e96x1c){if(_0x8e96x1c){return _0x8e96x1c[_0x14cd[42]]()[_0x14cd[40]](function(){_0x8e96x1a[_0x14cd[28]](204)[_0x14cd[27]]()})}}}function handleEntityNotFound(_0x8e96x1a,_0x8e96x1b){return function(_0x8e96x1c){if(!_0x8e96x1c){_0x8e96x1a[_0x14cd[26]](404)};return _0x8e96x1c}}function handleError(_0x8e96x1a,_0x8e96x1b){_0x8e96x1b= _0x8e96x1b|| 500;return function(_0x8e96x2b){logger[_0x14cd[44]](_0x8e96x2b[_0x14cd[43]]);if(_0x8e96x2b[_0x14cd[45]]){delete _0x8e96x2b[_0x14cd[45]]};_0x8e96x1a[_0x14cd[28]](_0x8e96x1b)[_0x14cd[46]](_0x8e96x2b)}}exports[_0x14cd[41]]= function(_0x8e96x2c,_0x8e96x1a){if(_0x8e96x2c[_0x14cd[48]][_0x14cd[47]]){delete _0x8e96x2c[_0x14cd[48]][_0x14cd[47]]};return db[_0x14cd[52]][_0x14cd[51]]({where:{id:_0x8e96x2c[_0x14cd[50]][_0x14cd[47]]}})[_0x14cd[40]](handleEntityNotFound(_0x8e96x1a,null))[_0x14cd[40]](saveUpdates(_0x8e96x2c[_0x14cd[48]],null))[_0x14cd[40]](respondWithResult(_0x8e96x1a,null))[_0x14cd[49]](handleError(_0x8e96x1a,null))};var utilLicense=require(_0x14cd[53]);exports[_0x14cd[54]]= function(_0x8e96x2c,_0x8e96x1a){var _0x8e96x1f={raw:true,where:{id:1}},_0x8e96x2e={};_0x8e96x2e[_0x14cd[55]]= _[_0x14cd[57]](db[_0x14cd[52]][_0x14cd[56]]);_0x8e96x2e[_0x14cd[58]]= _[_0x14cd[57]](_0x8e96x2c[_0x14cd[58]]);_0x8e96x2e[_0x14cd[59]]= _[_0x14cd[60]](_0x8e96x2e[_0x14cd[55]],_0x8e96x2e[_0x14cd[58]]);_0x8e96x1f[_0x14cd[61]]= _[_0x14cd[60]](_0x8e96x2e[_0x14cd[55]],qs[_0x14cd[62]](_0x8e96x2c[_0x14cd[58]][_0x14cd[62]]));_0x8e96x1f[_0x14cd[61]]= (_0x8e96x1f[_0x14cd[61]][_0x14cd[63]])?_0x8e96x1f[_0x14cd[61]]:_0x8e96x2e[_0x14cd[55]];_0x8e96x1f= _[_0x14cd[65]]({},_0x8e96x1f,_0x8e96x2c[_0x14cd[64]]);return utilLicense[_0x14cd[66]](_0x8e96x1f)[_0x14cd[40]](respondWithResult(_0x8e96x1a,null))[_0x14cd[49]](handleError(_0x8e96x1a,null))}
\ No newline at end of file
+var _0x9b46=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x64","\x62\x6F\x64\x79","\x63\x61\x74\x63\x68","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x4C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6F\x70\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x67\x65\x74\x4C\x69\x63\x65\x6E\x73\x65"];_0x9b46[0];var jsonpatch=require(_0x9b46[1]);var rp=require(_0x9b46[2]);var moment=require(_0x9b46[3]);var BPromise=require(_0x9b46[4]);var Mustache=require(_0x9b46[5]);var util=require(_0x9b46[6]);var path=require(_0x9b46[7]);var sox=require(_0x9b46[8]);var csv=require(_0x9b46[9]);var ejs=require(_0x9b46[10]);var fs=require(_0x9b46[11]);var _=require(_0x9b46[12]);var squel=require(_0x9b46[13]);var crypto=require(_0x9b46[14]);var jsforce=require(_0x9b46[15]);var deskjs=require(_0x9b46[16]);var toCsv=require(_0x9b46[9]);var querystring=require(_0x9b46[17]);var Papa=require(_0x9b46[18]);var qs=require(_0x9b46[19]);var logger=require(_0x9b46[21])(_0x9b46[20]);var utils=require(_0x9b46[22]);var config=require(_0x9b46[23]);var db=require(_0x9b46[25])[_0x9b46[24]];function respondWithStatusCode(_0x6598x1a,_0x6598x1b){_0x6598x1b= _0x6598x1b|| 204;return function(_0x6598x1c){if(_0x6598x1c){return _0x6598x1a[_0x9b46[26]](_0x6598x1b)};return _0x6598x1a[_0x9b46[28]](_0x6598x1b)[_0x9b46[27]]()}}function respondWithResult(_0x6598x1a,_0x6598x1b){_0x6598x1b= _0x6598x1b|| 200;return function(_0x6598x1c){if(_0x6598x1c){return _0x6598x1a[_0x9b46[28]](_0x6598x1b)[_0x9b46[29]](_0x6598x1c)}}}function respondWithFilteredResult(_0x6598x1a,_0x6598x1f){return function(_0x6598x1c){if(_0x6598x1c){var _0x6598x20=_0x6598x1c[_0x9b46[30]],_0x6598x21=_0x6598x1f[_0x9b46[31]],_0x6598x22=_0x6598x1f[_0x9b46[31]]+ _0x6598x1f[_0x9b46[32]],_0x6598x1b;if(_0x6598x22>= _0x6598x20){_0x6598x22= _0x6598x20;_0x6598x1b= 200}else {_0x6598x1b= 206};_0x6598x1a[_0x9b46[28]](_0x6598x1b);return _0x6598x1a[_0x9b46[36]](_0x9b46[33],_0x6598x21+ _0x9b46[34]+ _0x6598x22+ _0x9b46[35]+ _0x6598x20)[_0x9b46[29]](_0x6598x1c)};return null}}function patchUpdates(_0x6598x24){return function(_0x6598x1c){try{jsonpatch[_0x9b46[37]](_0x6598x1c,_0x6598x24,true)}catch(err){return BPromise[_0x9b46[38]](err)};return _0x6598x1c[_0x9b46[39]]()}}function saveUpdates(_0x6598x26,_0x6598x1b){return function(_0x6598x1c){if(_0x6598x1c){return _0x6598x1c[_0x9b46[41]](_0x6598x26)[_0x9b46[40]](function(_0x6598x27){return _0x6598x27})};return null}}function removeEntity(_0x6598x1a,_0x6598x1b){return function(_0x6598x1c){if(_0x6598x1c){return _0x6598x1c[_0x9b46[42]]()[_0x9b46[40]](function(){_0x6598x1a[_0x9b46[28]](204)[_0x9b46[27]]()})}}}function handleEntityNotFound(_0x6598x1a,_0x6598x1b){return function(_0x6598x1c){if(!_0x6598x1c){_0x6598x1a[_0x9b46[26]](404)};return _0x6598x1c}}function handleError(_0x6598x1a,_0x6598x1b){_0x6598x1b= _0x6598x1b|| 500;return function(_0x6598x2b){logger[_0x9b46[44]](_0x6598x2b[_0x9b46[43]]);if(_0x6598x2b[_0x9b46[45]]){delete _0x6598x2b[_0x9b46[45]]};_0x6598x1a[_0x9b46[28]](_0x6598x1b)[_0x9b46[46]](_0x6598x2b)}}exports[_0x9b46[41]]= function(_0x6598x2c,_0x6598x1a){if(_0x6598x2c[_0x9b46[48]][_0x9b46[47]]){delete _0x6598x2c[_0x9b46[48]][_0x9b46[47]]};return db[_0x9b46[52]][_0x9b46[51]]({where:{id:_0x6598x2c[_0x9b46[50]][_0x9b46[47]]}})[_0x9b46[40]](handleEntityNotFound(_0x6598x1a,null))[_0x9b46[40]](saveUpdates(_0x6598x2c[_0x9b46[48]],null))[_0x9b46[40]](respondWithResult(_0x6598x1a,null))[_0x9b46[49]](handleError(_0x6598x1a,null))};var utilLicense=require(_0x9b46[53]);exports[_0x9b46[54]]= function(_0x6598x2c,_0x6598x1a){var _0x6598x1f={raw:true,where:{id:1}},_0x6598x2e={};_0x6598x2e[_0x9b46[55]]= _[_0x9b46[57]](db[_0x9b46[52]][_0x9b46[56]]);_0x6598x2e[_0x9b46[58]]= _[_0x9b46[57]](_0x6598x2c[_0x9b46[58]]);_0x6598x2e[_0x9b46[59]]= _[_0x9b46[60]](_0x6598x2e[_0x9b46[55]],_0x6598x2e[_0x9b46[58]]);_0x6598x1f[_0x9b46[61]]= _[_0x9b46[60]](_0x6598x2e[_0x9b46[55]],qs[_0x9b46[62]](_0x6598x2c[_0x9b46[58]][_0x9b46[62]]));_0x6598x1f[_0x9b46[61]]= (_0x6598x1f[_0x9b46[61]][_0x9b46[63]])?_0x6598x1f[_0x9b46[61]]:_0x6598x2e[_0x9b46[55]];_0x6598x1f= _[_0x9b46[65]]({},_0x6598x1f,_0x6598x2c[_0x9b46[64]]);return utilLicense[_0x9b46[66]](_0x6598x1f)[_0x9b46[40]](respondWithResult(_0x6598x1a,null))[_0x9b46[49]](handleError(_0x6598x1a,null))}
\ No newline at end of file
index 400eafe..4d6426d 100644 (file)
@@ -1 +1 @@
-var _0xa50b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4C\x69\x63\x65\x6E\x73\x65","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x65\x66\x69\x6E\x65"];_0xa50b[0];var _=require(_0xa50b[1]);var util=require(_0xa50b[2]);var logger=require(_0xa50b[4])(_0xa50b[3]);var moment=require(_0xa50b[5]);var BPromise=require(_0xa50b[6]);var rp=require(_0xa50b[7]);var attributes=require(_0xa50b[8]);module[_0xa50b[9]]= function(_0x4243x8,_0x4243x9){return _0x4243x8[_0xa50b[12]](_0xa50b[10],attributes,{tableName:_0xa50b[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xe9f9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4C\x69\x63\x65\x6E\x73\x65","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x65\x66\x69\x6E\x65"];_0xe9f9[0];var _=require(_0xe9f9[1]);var util=require(_0xe9f9[2]);var logger=require(_0xe9f9[4])(_0xe9f9[3]);var moment=require(_0xe9f9[5]);var BPromise=require(_0xe9f9[6]);var rp=require(_0xe9f9[7]);var attributes=require(_0xe9f9[8]);module[_0xe9f9[9]]= function(_0x49d8x8,_0x49d8x9){return _0x49d8x8[_0xe9f9[12]](_0xe9f9[10],attributes,{tableName:_0xe9f9[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index d3e72f2..b92d8de 100644 (file)
@@ -1 +1 @@
-var _0x4237=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4C\x69\x63\x65\x6E\x73\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4C\x69\x63\x65\x6E\x73\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x4237[0];var _=require(_0x4237[1]);var util=require(_0x4237[2]);var moment=require(_0x4237[3]);var BPromise=require(_0x4237[4]);var rs=require(_0x4237[5]);var fs=require(_0x4237[6]);var db=require(_0x4237[8])[_0x4237[7]];var utils=require(_0x4237[9]);var logger=require(_0x4237[11])(_0x4237[10]);var config=require(_0x4237[12]);var jayson=require(_0x4237[13]);var client=jayson[_0x4237[15]][_0x4237[14]]({port:9002});function respondWithRpcPromise(_0x75e1xe,_0x75e1xf,_0x75e1x10){return  new BPromise(function(_0x75e1x11,_0x75e1x12){return client[_0x4237[28]](_0x75e1xe,_0x75e1x10)[_0x4237[27]](function(_0x75e1x14){logger[_0x4237[20]](_0x4237[16],_0x75e1xf,_0x4237[19]);logger[_0x4237[23]](_0x4237[21],_0x75e1xf,_0x4237[19],JSON[_0x4237[22]](_0x75e1x14));if(_0x75e1x14[_0x4237[17]]){if(_0x75e1x14[_0x4237[17]][_0x4237[24]]=== 500){logger[_0x4237[17]](_0x4237[16],_0x75e1xf,_0x75e1x14[_0x4237[17]][_0x4237[25]]);return _0x75e1x12(_0x75e1x14[_0x4237[17]][_0x4237[25]])};logger[_0x4237[17]](_0x4237[16],_0x75e1xf,_0x75e1x14[_0x4237[17]][_0x4237[25]]);return _0x75e1x11(_0x75e1x14[_0x4237[17]][_0x4237[25]])}else {logger[_0x4237[20]](_0x4237[16],_0x75e1xf,_0x4237[19]);_0x75e1x11(_0x75e1x14[_0x4237[26]][_0x4237[25]])}})[_0x4237[18]](function(_0x75e1x13){logger[_0x4237[17]](_0x4237[16],_0x75e1xf,_0x75e1x13);_0x75e1x12(_0x75e1x13)})})}
\ No newline at end of file
+var _0x9861=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4C\x69\x63\x65\x6E\x73\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4C\x69\x63\x65\x6E\x73\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x9861[0];var _=require(_0x9861[1]);var util=require(_0x9861[2]);var moment=require(_0x9861[3]);var BPromise=require(_0x9861[4]);var rs=require(_0x9861[5]);var fs=require(_0x9861[6]);var db=require(_0x9861[8])[_0x9861[7]];var utils=require(_0x9861[9]);var logger=require(_0x9861[11])(_0x9861[10]);var config=require(_0x9861[12]);var jayson=require(_0x9861[13]);var client=jayson[_0x9861[15]][_0x9861[14]]({port:9002});function respondWithRpcPromise(_0xf450xe,_0xf450xf,_0xf450x10){return  new BPromise(function(_0xf450x11,_0xf450x12){return client[_0x9861[28]](_0xf450xe,_0xf450x10)[_0x9861[27]](function(_0xf450x14){logger[_0x9861[20]](_0x9861[16],_0xf450xf,_0x9861[19]);logger[_0x9861[23]](_0x9861[21],_0xf450xf,_0x9861[19],JSON[_0x9861[22]](_0xf450x14));if(_0xf450x14[_0x9861[17]]){if(_0xf450x14[_0x9861[17]][_0x9861[24]]=== 500){logger[_0x9861[17]](_0x9861[16],_0xf450xf,_0xf450x14[_0x9861[17]][_0x9861[25]]);return _0xf450x12(_0xf450x14[_0x9861[17]][_0x9861[25]])};logger[_0x9861[17]](_0x9861[16],_0xf450xf,_0xf450x14[_0x9861[17]][_0x9861[25]]);return _0xf450x11(_0xf450x14[_0x9861[17]][_0x9861[25]])}else {logger[_0x9861[20]](_0x9861[16],_0xf450xf,_0x9861[19]);_0xf450x11(_0xf450x14[_0x9861[26]][_0x9861[25]])}})[_0x9861[18]](function(_0xf450x13){logger[_0x9861[17]](_0x9861[16],_0xf450xf,_0xf450x13);_0xf450x12(_0xf450x13)})})}
\ No newline at end of file
index 504ca3c..62c9bdd 100644 (file)
@@ -1 +1 @@
-var _0x742d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x73","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x69\x6E\x5F\x73\x65\x72\x76\x65\x72\x73","\x67\x65\x74\x49\x6D\x61\x70","\x2F\x3A\x69\x64\x2F\x6F\x75\x74\x5F\x73\x65\x72\x76\x65\x72\x73","\x67\x65\x74\x53\x6D\x74\x70","\x2F\x3A\x69\x64\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x2F\x3A\x69\x64\x2F\x76\x65\x72\x69\x66\x79","\x76\x65\x72\x69\x66\x79\x53\x6D\x74\x70","\x61\x64\x64\x41\x6E\x73\x77\x65\x72","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65","\x61\x64\x64\x49\x6D\x61\x70","\x61\x64\x64\x53\x6D\x74\x70","\x61\x64\x64\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x73\x65\x6E\x64","\x73\x65\x6E\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x6E\x73\x77\x65\x72\x73","\x72\x65\x6D\x6F\x76\x65\x49\x6D\x61\x70","\x72\x65\x6D\x6F\x76\x65\x53\x6D\x74\x70","\x65\x78\x70\x6F\x72\x74\x73"];_0x742d[0];var multer=require(_0x742d[1]);var util=require(_0x742d[2]);var path=require(_0x742d[3]);var express=require(_0x742d[4]);var router=express.Router();var auth=require(_0x742d[5]);var interaction=require(_0x742d[6]);var config=require(_0x742d[7]);var controller=require(_0x742d[8]);router[_0x742d[12]](_0x742d[9],auth[_0x742d[10]](),controller[_0x742d[11]]);router[_0x742d[12]](_0x742d[13],auth[_0x742d[10]](),controller[_0x742d[14]]);router[_0x742d[12]](_0x742d[15],auth[_0x742d[10]](),controller[_0x742d[16]]);router[_0x742d[12]](_0x742d[17],auth[_0x742d[10]](),controller[_0x742d[18]]);router[_0x742d[12]](_0x742d[19],auth[_0x742d[10]](),controller[_0x742d[20]]);router[_0x742d[12]](_0x742d[21],auth[_0x742d[10]](),controller[_0x742d[22]]);router[_0x742d[12]](_0x742d[23],auth[_0x742d[10]](),controller[_0x742d[24]]);router[_0x742d[12]](_0x742d[25],auth[_0x742d[10]](),controller[_0x742d[26]]);router[_0x742d[12]](_0x742d[27],auth[_0x742d[10]](),controller[_0x742d[28]]);router[_0x742d[12]](_0x742d[29],auth[_0x742d[10]](),controller[_0x742d[30]]);router[_0x742d[12]](_0x742d[31],auth[_0x742d[10]](),controller[_0x742d[32]]);router[_0x742d[34]](_0x742d[17],auth[_0x742d[10]](),controller[_0x742d[33]]);router[_0x742d[34]](_0x742d[9],auth[_0x742d[10]](),controller[_0x742d[35]]);router[_0x742d[34]](_0x742d[19],auth[_0x742d[10]](),controller[_0x742d[36]]);router[_0x742d[34]](_0x742d[21],auth[_0x742d[10]](),controller[_0x742d[37]]);router[_0x742d[34]](_0x742d[23],auth[_0x742d[10]](),controller[_0x742d[38]]);router[_0x742d[34]](_0x742d[25],auth[_0x742d[10]](),controller[_0x742d[39]]);router[_0x742d[34]](_0x742d[27],auth[_0x742d[10]](),controller[_0x742d[40]]);router[_0x742d[34]](_0x742d[27],auth[_0x742d[10]](),controller[_0x742d[41]]);router[_0x742d[34]](_0x742d[42],auth[_0x742d[10]](),controller[_0x742d[43]]);router[_0x742d[45]](_0x742d[15],auth[_0x742d[10]](),controller[_0x742d[44]]);router[_0x742d[47]](_0x742d[15],auth[_0x742d[10]](),controller[_0x742d[46]]);router[_0x742d[47]](_0x742d[17],auth[_0x742d[10]](),controller[_0x742d[48]]);router[_0x742d[47]](_0x742d[19],auth[_0x742d[10]](),controller[_0x742d[49]]);router[_0x742d[47]](_0x742d[21],auth[_0x742d[10]](),controller[_0x742d[50]]);module[_0x742d[51]]= router
\ No newline at end of file
+var _0xe1b7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x73","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x69\x6E\x5F\x73\x65\x72\x76\x65\x72\x73","\x67\x65\x74\x49\x6D\x61\x70","\x2F\x3A\x69\x64\x2F\x6F\x75\x74\x5F\x73\x65\x72\x76\x65\x72\x73","\x67\x65\x74\x53\x6D\x74\x70","\x2F\x3A\x69\x64\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x2F\x3A\x69\x64\x2F\x76\x65\x72\x69\x66\x79","\x76\x65\x72\x69\x66\x79\x53\x6D\x74\x70","\x61\x64\x64\x41\x6E\x73\x77\x65\x72","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65","\x61\x64\x64\x49\x6D\x61\x70","\x61\x64\x64\x53\x6D\x74\x70","\x61\x64\x64\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x73\x65\x6E\x64","\x73\x65\x6E\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x6E\x73\x77\x65\x72\x73","\x72\x65\x6D\x6F\x76\x65\x49\x6D\x61\x70","\x72\x65\x6D\x6F\x76\x65\x53\x6D\x74\x70","\x65\x78\x70\x6F\x72\x74\x73"];_0xe1b7[0];var multer=require(_0xe1b7[1]);var util=require(_0xe1b7[2]);var path=require(_0xe1b7[3]);var express=require(_0xe1b7[4]);var router=express.Router();var auth=require(_0xe1b7[5]);var interaction=require(_0xe1b7[6]);var config=require(_0xe1b7[7]);var controller=require(_0xe1b7[8]);router[_0xe1b7[12]](_0xe1b7[9],auth[_0xe1b7[10]](),controller[_0xe1b7[11]]);router[_0xe1b7[12]](_0xe1b7[13],auth[_0xe1b7[10]](),controller[_0xe1b7[14]]);router[_0xe1b7[12]](_0xe1b7[15],auth[_0xe1b7[10]](),controller[_0xe1b7[16]]);router[_0xe1b7[12]](_0xe1b7[17],auth[_0xe1b7[10]](),controller[_0xe1b7[18]]);router[_0xe1b7[12]](_0xe1b7[19],auth[_0xe1b7[10]](),controller[_0xe1b7[20]]);router[_0xe1b7[12]](_0xe1b7[21],auth[_0xe1b7[10]](),controller[_0xe1b7[22]]);router[_0xe1b7[12]](_0xe1b7[23],auth[_0xe1b7[10]](),controller[_0xe1b7[24]]);router[_0xe1b7[12]](_0xe1b7[25],auth[_0xe1b7[10]](),controller[_0xe1b7[26]]);router[_0xe1b7[12]](_0xe1b7[27],auth[_0xe1b7[10]](),controller[_0xe1b7[28]]);router[_0xe1b7[12]](_0xe1b7[29],auth[_0xe1b7[10]](),controller[_0xe1b7[30]]);router[_0xe1b7[12]](_0xe1b7[31],auth[_0xe1b7[10]](),controller[_0xe1b7[32]]);router[_0xe1b7[34]](_0xe1b7[17],auth[_0xe1b7[10]](),controller[_0xe1b7[33]]);router[_0xe1b7[34]](_0xe1b7[9],auth[_0xe1b7[10]](),controller[_0xe1b7[35]]);router[_0xe1b7[34]](_0xe1b7[19],auth[_0xe1b7[10]](),controller[_0xe1b7[36]]);router[_0xe1b7[34]](_0xe1b7[21],auth[_0xe1b7[10]](),controller[_0xe1b7[37]]);router[_0xe1b7[34]](_0xe1b7[23],auth[_0xe1b7[10]](),controller[_0xe1b7[38]]);router[_0xe1b7[34]](_0xe1b7[25],auth[_0xe1b7[10]](),controller[_0xe1b7[39]]);router[_0xe1b7[34]](_0xe1b7[27],auth[_0xe1b7[10]](),controller[_0xe1b7[40]]);router[_0xe1b7[34]](_0xe1b7[27],auth[_0xe1b7[10]](),controller[_0xe1b7[41]]);router[_0xe1b7[34]](_0xe1b7[42],auth[_0xe1b7[10]](),controller[_0xe1b7[43]]);router[_0xe1b7[45]](_0xe1b7[15],auth[_0xe1b7[10]](),controller[_0xe1b7[44]]);router[_0xe1b7[47]](_0xe1b7[15],auth[_0xe1b7[10]](),controller[_0xe1b7[46]]);router[_0xe1b7[47]](_0xe1b7[17],auth[_0xe1b7[10]](),controller[_0xe1b7[48]]);router[_0xe1b7[47]](_0xe1b7[19],auth[_0xe1b7[10]](),controller[_0xe1b7[49]]);router[_0xe1b7[47]](_0xe1b7[21],auth[_0xe1b7[10]](),controller[_0xe1b7[50]]);module[_0xe1b7[51]]= router
\ No newline at end of file
index 1459004..be29dae 100644 (file)
@@ -1 +1 @@
-var _0xbc15=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x54\x45\x58\x54","\x41\x72\x69\x61\x6C\x2C\x48\x65\x6C\x76\x65\x74\x69\x63\x61\x2C\x73\x61\x6E\x73\x2D\x73\x65\x72\x69\x66","\x55\x4E\x53\x49\x47\x4E\x45\x44","\x41\x63\x63\x6F\x75\x6E\x74\x3A\x20\x7B\x7B\x61\x63\x63\x6F\x75\x6E\x74\x2E\x6E\x61\x6D\x65\x7D\x7D\x3C\x62\x72\x2F\x3E\x7B\x7B\x23\x71\x75\x65\x75\x65\x7D\x7D\x51\x75\x65\x75\x65\x3A\x20\x7B\x7B\x71\x75\x65\x75\x65\x2E\x6E\x61\x6D\x65\x7D\x7D\x3C\x62\x72\x2F\x3E\x7B\x7B\x2F\x71\x75\x65\x75\x65\x7D\x7D\x46\x72\x6F\x6D\x20\x3A\x20\x7B\x7B\x66\x72\x6F\x6D\x7D\x7D\x3C\x62\x72\x2F\x3E\x53\x75\x62\x6A\x65\x63\x74\x20\x3A\x20\x7B\x7B\x6D\x65\x73\x73\x61\x67\x65\x2E\x73\x75\x62\x6A\x65\x63\x74\x7D\x7D","\x49\x4E\x54\x45\x47\x45\x52"];_0xbc15[0];var Sequelize=require(_0xbc15[1]);module[_0xbc15[2]]= {description:{type:Sequelize[_0xbc15[3]]},name:{type:Sequelize[_0xbc15[3]],allowNull:false},service:{type:Sequelize[_0xbc15[4]],defaultValue:false},email:{type:Sequelize[_0xbc15[3]],validate:{isEmail:true}},active:{type:Sequelize[_0xbc15[4]],defaultValue:true},key:{type:Sequelize[_0xbc15[3]],allowNull:false},template:{type:Sequelize[_0xbc15[5]]},markAsUnread:{type:Sequelize[_0xbc15[4]],defaultValue:false},fontFamily:{type:Sequelize[_0xbc15[3]],allowNull:false,defaultValue:_0xbc15[6]},fontSize:{type:Sequelize.INTEGER(2)[_0xbc15[7]],defaultValue:13,validate:{min:8,max:72}},notificationTemplate:{type:Sequelize[_0xbc15[5]],defaultValue:function(){return _0xbc15[8]}},notificationSound:{type:Sequelize[_0xbc15[4]],defaultValue:true},notificationShake:{type:Sequelize[_0xbc15[4]],defaultValue:false},waitForTheAssignedAgent:{type:Sequelize[_0xbc15[9]],validate:{min:1,max:2147483},defaultValue:10}}
\ No newline at end of file
+var _0x2792=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x54\x45\x58\x54","\x41\x72\x69\x61\x6C\x2C\x48\x65\x6C\x76\x65\x74\x69\x63\x61\x2C\x73\x61\x6E\x73\x2D\x73\x65\x72\x69\x66","\x55\x4E\x53\x49\x47\x4E\x45\x44","\x41\x63\x63\x6F\x75\x6E\x74\x3A\x20\x7B\x7B\x61\x63\x63\x6F\x75\x6E\x74\x2E\x6E\x61\x6D\x65\x7D\x7D\x3C\x62\x72\x2F\x3E\x7B\x7B\x23\x71\x75\x65\x75\x65\x7D\x7D\x51\x75\x65\x75\x65\x3A\x20\x7B\x7B\x71\x75\x65\x75\x65\x2E\x6E\x61\x6D\x65\x7D\x7D\x3C\x62\x72\x2F\x3E\x7B\x7B\x2F\x71\x75\x65\x75\x65\x7D\x7D\x46\x72\x6F\x6D\x20\x3A\x20\x7B\x7B\x66\x72\x6F\x6D\x7D\x7D\x3C\x62\x72\x2F\x3E\x53\x75\x62\x6A\x65\x63\x74\x20\x3A\x20\x7B\x7B\x6D\x65\x73\x73\x61\x67\x65\x2E\x73\x75\x62\x6A\x65\x63\x74\x7D\x7D","\x49\x4E\x54\x45\x47\x45\x52"];_0x2792[0];var Sequelize=require(_0x2792[1]);module[_0x2792[2]]= {description:{type:Sequelize[_0x2792[3]]},name:{type:Sequelize[_0x2792[3]],allowNull:false},service:{type:Sequelize[_0x2792[4]],defaultValue:false},email:{type:Sequelize[_0x2792[3]],validate:{isEmail:true}},active:{type:Sequelize[_0x2792[4]],defaultValue:true},key:{type:Sequelize[_0x2792[3]],allowNull:false},template:{type:Sequelize[_0x2792[5]]},markAsUnread:{type:Sequelize[_0x2792[4]],defaultValue:false},fontFamily:{type:Sequelize[_0x2792[3]],allowNull:false,defaultValue:_0x2792[6]},fontSize:{type:Sequelize.INTEGER(2)[_0x2792[7]],defaultValue:13,validate:{min:8,max:72}},notificationTemplate:{type:Sequelize[_0x2792[5]],defaultValue:function(){return _0x2792[8]}},notificationSound:{type:Sequelize[_0x2792[4]],defaultValue:true},notificationShake:{type:Sequelize[_0x2792[4]],defaultValue:false},waitForTheAssignedAgent:{type:Sequelize[_0x2792[9]],validate:{min:1,max:2147483},defaultValue:10}}
\ No newline at end of file
index 9e7b7fa..d2a9b6f 100644 (file)
@@ -1 +1 @@
-var _0x51c0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x49\x6D\x61\x70","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x53\x6D\x74\x70","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x64\x64\x41\x6E\x73\x77\x65\x72","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x63\x72\x65\x61\x74\x65","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x72\x65\x6D\x6F\x76\x65\x41\x6E\x73\x77\x65\x72\x73","\x69\x64\x73","\x6B\x65\x79","\x65\x6D\x61\x69\x6C","\x4C\x69\x73\x74\x49\x64","\x61\x63\x74\x69\x76\x65","\x69\x73\x4E\x69\x6C","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x63\x73\x65\x72\x76\x69\x63\x65","\x63\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E","\x75\x73\x65\x72","\x63\x75\x73\x65\x72","\x70\x61\x73\x73\x77\x6F\x72\x64","\x70\x61\x73\x73","\x63\x70\x61\x73\x73\x77\x6F\x72\x64","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x65\x72\x76\x69\x63\x65","\x67\x65\x74\x49\x6D\x61\x70","\x61\x64\x64\x49\x6D\x61\x70","\x72\x65\x6D\x6F\x76\x65\x49\x6D\x61\x70","\x73\x65\x74\x49\x6D\x61\x70","\x67\x65\x74\x53\x6D\x74\x70","\x61\x64\x64\x53\x6D\x74\x70","\x72\x65\x6D\x6F\x76\x65\x53\x6D\x74\x70","\x73\x65\x74\x53\x6D\x74\x70","\x61\x64\x64\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6F\x6D\x69\x74","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x55\x73\x65\x72","\x4F\x77\x6E\x65\x72","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x54\x61\x67","\x54\x61\x67\x73","\x63\x6F\x6C\x6F\x72","\x74\x61\x67","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x67\x65\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x6D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x24\x67\x74\x65","\x2C","\x73\x70\x6C\x69\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x74\x6F","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x66\x72\x6F\x6D","\x63\x63","\x73\x75\x62\x6A\x65\x63\x74","\x61\x74\x74\x61\x63\x68","\x6F\x75\x74","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x4D\x65\x73\x73\x61\x67\x65\x73","\x4C\x69\x73\x74","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x64\x65\x66\x61\x75\x6C\x74\x73","\x4C\x69\x73\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x6A\x6F\x69\x6E","\x61\x75\x74\x68","\x73\x65\x63\x75\x72\x65","\x53\x65\x6E\x64\x4D\x61\x69\x6C","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x43\x6D\x4C\x69\x73\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x76\x65\x72\x69\x66\x79\x53\x6D\x74\x70","\x56\x65\x72\x69\x66\x79\x53\x6D\x74\x70"];_0x51c0[0];var jsonpatch=require(_0x51c0[1]);var rp=require(_0x51c0[2]);var moment=require(_0x51c0[3]);var BPromise=require(_0x51c0[4]);var Mustache=require(_0x51c0[5]);var util=require(_0x51c0[6]);var path=require(_0x51c0[7]);var sox=require(_0x51c0[8]);var csv=require(_0x51c0[9]);var ejs=require(_0x51c0[10]);var fs=require(_0x51c0[11]);var _=require(_0x51c0[12]);var squel=require(_0x51c0[13]);var crypto=require(_0x51c0[14]);var jsforce=require(_0x51c0[15]);var deskjs=require(_0x51c0[16]);var toCsv=require(_0x51c0[9]);var querystring=require(_0x51c0[17]);var Papa=require(_0x51c0[18]);var qs=require(_0x51c0[19]);var logger=require(_0x51c0[21])(_0x51c0[20]);var utils=require(_0x51c0[22]);var config=require(_0x51c0[23]);var db=require(_0x51c0[25])[_0x51c0[24]];var jayson=require(_0x51c0[26]);var client=jayson[_0x51c0[28]][_0x51c0[27]]({port:9003});function respondWithRpcPromise(_0x4e59x1c,_0x4e59x1d,_0x4e59x1e,_0x4e59x1f){return  new BPromise(function(_0x4e59x20,_0x4e59x21){var _0x4e59x22=(_0x4e59x1f|| client);return _0x4e59x22[_0x51c0[41]](_0x4e59x1c,_0x4e59x1e)[_0x51c0[40]](function(_0x4e59x24){logger[_0x51c0[33]](_0x51c0[29],_0x4e59x1d,_0x51c0[32]);logger[_0x51c0[36]](_0x51c0[34],_0x4e59x1d,_0x51c0[32],JSON[_0x51c0[35]](_0x4e59x24));if(_0x4e59x24[_0x51c0[30]]){if(_0x4e59x24[_0x51c0[30]][_0x51c0[37]]=== 500){logger[_0x51c0[30]](_0x51c0[29],_0x4e59x1d,_0x4e59x24[_0x51c0[30]][_0x51c0[38]]);return _0x4e59x21(_0x4e59x24[_0x51c0[30]][_0x51c0[38]])};logger[_0x51c0[30]](_0x51c0[29],_0x4e59x1d,_0x4e59x24[_0x51c0[30]][_0x51c0[38]]);return _0x4e59x20(_0x4e59x24[_0x51c0[30]][_0x51c0[38]])}else {logger[_0x51c0[33]](_0x51c0[29],_0x4e59x1d,_0x51c0[32]);_0x4e59x20(_0x4e59x24[_0x51c0[39]][_0x51c0[38]])}})[_0x51c0[31]](function(_0x4e59x23){logger[_0x51c0[30]](_0x51c0[29],_0x4e59x1d,_0x4e59x23);_0x4e59x21(_0x4e59x23)})})}function respondWithStatusCode(_0x4e59x24,_0x4e59x26){_0x4e59x26= _0x4e59x26|| 204;return function(_0x4e59x27){if(_0x4e59x27){return _0x4e59x24[_0x51c0[42]](_0x4e59x26)};return _0x4e59x24[_0x51c0[44]](_0x4e59x26)[_0x51c0[43]]()}}function respondWithResult(_0x4e59x24,_0x4e59x26){_0x4e59x26= _0x4e59x26|| 200;return function(_0x4e59x27){if(_0x4e59x27){return _0x4e59x24[_0x51c0[44]](_0x4e59x26)[_0x51c0[45]](_0x4e59x27)}}}function respondWithFilteredResult(_0x4e59x24,_0x4e59x2a){return function(_0x4e59x27){if(_0x4e59x27){var _0x4e59x2b=_0x4e59x27[_0x51c0[46]],_0x4e59x2c=_0x4e59x2a[_0x51c0[47]],_0x4e59x2d=_0x4e59x2a[_0x51c0[47]]+ _0x4e59x2a[_0x51c0[48]],_0x4e59x26;if(_0x4e59x2d>= _0x4e59x2b){_0x4e59x2d= _0x4e59x2b;_0x4e59x26= 200}else {_0x4e59x26= 206};_0x4e59x24[_0x51c0[44]](_0x4e59x26);return _0x4e59x24[_0x51c0[52]](_0x51c0[49],_0x4e59x2c+ _0x51c0[50]+ _0x4e59x2d+ _0x51c0[51]+ _0x4e59x2b)[_0x51c0[45]](_0x4e59x27)};return null}}function patchUpdates(_0x4e59x2f){return function(_0x4e59x27){try{jsonpatch[_0x51c0[53]](_0x4e59x27,_0x4e59x2f,true)}catch(err){return BPromise[_0x51c0[54]](err)};return _0x4e59x27[_0x51c0[55]]()}}function saveUpdates(_0x4e59x31,_0x4e59x26){return function(_0x4e59x27){if(_0x4e59x27){return _0x4e59x27[_0x51c0[56]](_0x4e59x31)[_0x51c0[40]](function(_0x4e59x32){return _0x4e59x32})};return null}}function removeEntity(_0x4e59x24,_0x4e59x26){return function(_0x4e59x27){if(_0x4e59x27){return _0x4e59x27[_0x51c0[57]]()[_0x51c0[40]](function(){_0x4e59x24[_0x51c0[44]](204)[_0x51c0[43]]()})}}}function handleEntityNotFound(_0x4e59x24,_0x4e59x26){return function(_0x4e59x27){if(!_0x4e59x27){_0x4e59x24[_0x51c0[42]](404)};return _0x4e59x27}}function handleError(_0x4e59x24,_0x4e59x26){_0x4e59x26= _0x4e59x26|| 500;return function(_0x4e59x23){logger[_0x51c0[30]](_0x4e59x23[_0x51c0[58]]);if(_0x4e59x23[_0x51c0[59]]){delete _0x4e59x23[_0x51c0[59]]};_0x4e59x24[_0x51c0[44]](_0x4e59x26)[_0x51c0[60]](_0x4e59x23)}}exports[_0x51c0[61]]= function(_0x4e59x1e,_0x4e59x24){var _0x4e59x2a={include:[{model:db[_0x51c0[62]],as:_0x51c0[63]},{model:db[_0x51c0[64]],as:_0x51c0[65]}]},_0x4e59x36={},_0x4e59x37={count:0,rows:[]};_0x4e59x36[_0x51c0[66]]= _[_0x51c0[69]](db[_0x51c0[68]][_0x51c0[67]]);var _0x4e59x38={dateStart:_0x4e59x1e[_0x51c0[71]][_0x51c0[70]],dateEnd:_0x4e59x1e[_0x51c0[71]][_0x51c0[72]]};delete _0x4e59x1e[_0x51c0[71]][_0x51c0[70]];delete _0x4e59x1e[_0x51c0[71]][_0x51c0[72]];_0x4e59x36[_0x51c0[71]]= _[_0x51c0[69]](_0x4e59x1e[_0x51c0[71]]);_0x4e59x36[_0x51c0[73]]= _[_0x51c0[74]](_0x4e59x36[_0x51c0[66]],_0x4e59x36[_0x51c0[71]]);_0x4e59x2a[_0x51c0[75]]= _[_0x51c0[74]](_0x4e59x36[_0x51c0[66]],qs[_0x51c0[76]](_0x4e59x1e[_0x51c0[71]][_0x51c0[76]]));_0x4e59x2a[_0x51c0[75]]= (_0x4e59x2a[_0x51c0[75]][_0x51c0[77]])?_0x4e59x2a[_0x51c0[75]]:_0x4e59x36[_0x51c0[66]];if(!_0x4e59x1e[_0x51c0[71]][_0x51c0[79]](_0x51c0[78])){_0x4e59x2a[_0x51c0[48]]= qs[_0x51c0[48]](_0x4e59x1e[_0x51c0[71]][_0x51c0[48]]);_0x4e59x2a[_0x51c0[47]]= qs[_0x51c0[47]](_0x4e59x1e[_0x51c0[71]][_0x51c0[47]])};_0x4e59x2a[_0x51c0[80]]= qs[_0x51c0[81]](_0x4e59x1e[_0x51c0[71]][_0x51c0[81]]);_0x4e59x2a[_0x51c0[82]]= qs[_0x51c0[73]](_[_0x51c0[83]](_0x4e59x1e[_0x51c0[71]],_0x4e59x36[_0x51c0[73]]));if(_0x4e59x38[_0x51c0[70]]){if(_0x4e59x38[_0x51c0[72]]){_0x4e59x38[_0x51c0[72]]= moment(_0x4e59x38[_0x51c0[72]])[_0x51c0[85]](1,_0x51c0[84])}else {_0x4e59x38[_0x51c0[72]]= moment(_0x4e59x38[_0x51c0[70]])[_0x51c0[85]](1,_0x51c0[84])};_[_0x51c0[86]](_0x4e59x2a[_0x51c0[82]],{createdAt:{$gte:_0x4e59x38[_0x51c0[70]],$lte:_0x4e59x38[_0x51c0[72]]}})};if(_0x4e59x1e[_0x51c0[71]][_0x51c0[87]]){_0x4e59x2a[_0x51c0[82]]= _[_0x51c0[86]](_0x4e59x2a[_0x51c0[82]],{$or:_[_0x51c0[89]](_0x4e59x2a[_0x51c0[75]],function(_0x4e59x39){var _0x4e59x37={};_0x4e59x37[_0x4e59x39]= {$like:_0x51c0[88]+ _0x4e59x1e[_0x51c0[71]][_0x51c0[87]]+ _0x51c0[88]};return _0x4e59x37})})};_0x4e59x2a= _[_0x51c0[86]]({},_0x4e59x2a,_0x4e59x1e[_0x51c0[90]]);var _0x4e59x3a={where:_0x4e59x2a[_0x51c0[82]]};return db[_0x51c0[68]][_0x51c0[46]](_0x4e59x3a)[_0x51c0[40]](function(_0x4e59x2b){_0x4e59x37[_0x51c0[46]]= _0x4e59x2b;if(_0x4e59x1e[_0x51c0[71]][_0x51c0[92]]){_0x4e59x2a[_0x51c0[93]]= [{all:true}]};return db[_0x51c0[68]][_0x51c0[94]](_0x4e59x2a)})[_0x51c0[40]](function(_0x4e59x3b){_0x4e59x37[_0x51c0[91]]= _0x4e59x3b;return _0x4e59x37})[_0x51c0[40]](respondWithFilteredResult(_0x4e59x24,_0x4e59x2a))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[95]]= function(_0x4e59x1e,_0x4e59x24){var _0x4e59x2a={raw:false,where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]},include:[{model:db[_0x51c0[62]],as:_0x51c0[63]},{model:db[_0x51c0[64]],as:_0x51c0[65]}]},_0x4e59x36={};_0x4e59x36[_0x51c0[66]]= _[_0x51c0[69]](db[_0x51c0[68]][_0x51c0[67]]);_0x4e59x36[_0x51c0[71]]= _[_0x51c0[69]](_0x4e59x1e[_0x51c0[71]]);_0x4e59x36[_0x51c0[73]]= _[_0x51c0[74]](_0x4e59x36[_0x51c0[66]],_0x4e59x36[_0x51c0[71]]);_0x4e59x2a[_0x51c0[75]]= _[_0x51c0[74]](_0x4e59x36[_0x51c0[66]],qs[_0x51c0[76]](_0x4e59x1e[_0x51c0[71]][_0x51c0[76]]));_0x4e59x2a[_0x51c0[75]]= (_0x4e59x2a[_0x51c0[75]][_0x51c0[77]])?_0x4e59x2a[_0x51c0[75]]:_0x4e59x36[_0x51c0[66]];if(_0x4e59x1e[_0x51c0[71]][_0x51c0[92]]){_0x4e59x2a[_0x51c0[93]]= [{all:true}]};_0x4e59x2a= _[_0x51c0[86]]({},_0x4e59x2a,_0x4e59x1e[_0x51c0[90]]);return db[_0x51c0[68]][_0x51c0[98]](_0x4e59x2a)[_0x51c0[40]](handleEntityNotFound(_0x4e59x24,null))[_0x51c0[40]](respondWithResult(_0x4e59x24,null))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[56]]= function(_0x4e59x1e,_0x4e59x24){if(_0x4e59x1e[_0x51c0[99]][_0x51c0[96]]){delete _0x4e59x1e[_0x51c0[99]][_0x51c0[96]]};return db[_0x51c0[68]][_0x51c0[98]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]},include:[{model:db[_0x51c0[62]],as:_0x51c0[63]},{model:db[_0x51c0[64]],as:_0x51c0[65]}]})[_0x51c0[40]](handleEntityNotFound(_0x4e59x24,null))[_0x51c0[40]](saveUpdates(_0x4e59x1e[_0x51c0[99]],null))[_0x51c0[40]](function(_0x4e59x27){if(_0x4e59x27&& _0x4e59x1e[_0x51c0[99]][_0x51c0[63]]){return db[_0x51c0[62]][_0x51c0[56]](_0x4e59x1e[_0x51c0[99]].Imap,{where:{MailAccountId:_0x4e59x27[_0x51c0[96]]}})[_0x51c0[40]](function(){return _0x4e59x27})};return _0x4e59x27})[_0x51c0[40]](function(_0x4e59x27){if(_0x4e59x27&& _0x4e59x1e[_0x51c0[99]][_0x51c0[65]]){return db[_0x51c0[64]][_0x51c0[56]](_0x4e59x1e[_0x51c0[99]].Smtp,{where:{MailAccountId:_0x4e59x27[_0x51c0[96]]}})[_0x51c0[40]](function(){return _0x4e59x27})};return _0x4e59x27})[_0x51c0[40]](respondWithResult(_0x4e59x24,null))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[57]]= function(_0x4e59x1e,_0x4e59x24){return db[_0x51c0[68]][_0x51c0[98]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]}})[_0x51c0[40]](handleEntityNotFound(_0x4e59x24,null))[_0x51c0[40]](removeEntity(_0x4e59x24,null))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[100]]= function(_0x4e59x1e,_0x4e59x24){return db[_0x51c0[68]][_0x51c0[100]]()[_0x51c0[40]](respondWithResult(_0x4e59x24,null))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[101]]= function(_0x4e59x1e,_0x4e59x24,_0x4e59x3c){if(_0x4e59x1e[_0x51c0[99]][_0x51c0[96]]){delete _0x4e59x1e[_0x51c0[99]][_0x51c0[96]]};return db[_0x51c0[68]][_0x51c0[98]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]}})[_0x51c0[40]](handleEntityNotFound(_0x4e59x24,null))[_0x51c0[40]](function(_0x4e59x27){if(_0x4e59x27){_0x4e59x1e[_0x51c0[99]][_0x51c0[102]]= _0x4e59x27[_0x51c0[96]];return db[_0x51c0[104]][_0x51c0[103]](_0x4e59x1e[_0x51c0[99]])}})[_0x51c0[40]](respondWithResult(_0x4e59x24,null))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[105]]= function(_0x4e59x1e,_0x4e59x24,_0x4e59x3c){var _0x4e59x2a={raw:false,where:{}};var _0x4e59x36={};var _0x4e59x3d={count:0,rows:[]};return db[_0x51c0[68]][_0x51c0[106]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]}})[_0x51c0[40]](handleEntityNotFound(_0x4e59x24,null))[_0x51c0[40]](function(_0x4e59x27){if(_0x4e59x27){_0x4e59x36[_0x51c0[66]]= _[_0x51c0[69]](db[_0x51c0[104]][_0x51c0[67]]);_0x4e59x36[_0x51c0[71]]= _[_0x51c0[69]](_0x4e59x1e[_0x51c0[71]]);_0x4e59x36[_0x51c0[73]]= _[_0x51c0[74]](_0x4e59x36[_0x51c0[66]],_0x4e59x36[_0x51c0[71]]);_0x4e59x2a[_0x51c0[75]]= _[_0x51c0[74]](_0x4e59x36[_0x51c0[66]],qs[_0x51c0[76]](_0x4e59x1e[_0x51c0[71]][_0x51c0[76]]));_0x4e59x2a[_0x51c0[75]]= (_0x4e59x2a[_0x51c0[75]][_0x51c0[77]])?_0x4e59x2a[_0x51c0[75]]:_0x4e59x36[_0x51c0[66]];if(!_0x4e59x1e[_0x51c0[71]][_0x51c0[79]](_0x51c0[78])){_0x4e59x2a[_0x51c0[48]]= qs[_0x51c0[48]](_0x4e59x1e[_0x51c0[71]][_0x51c0[48]]);_0x4e59x2a[_0x51c0[47]]= qs[_0x51c0[47]](_0x4e59x1e[_0x51c0[71]][_0x51c0[47]])};_0x4e59x2a[_0x51c0[80]]= qs[_0x51c0[81]](_0x4e59x1e[_0x51c0[71]][_0x51c0[81]]);_0x4e59x2a[_0x51c0[82]]= qs[_0x51c0[73]](_[_0x51c0[83]](_0x4e59x1e[_0x51c0[71]],_0x4e59x36[_0x51c0[73]]));_0x4e59x2a[_0x51c0[82]][_0x51c0[102]]= _0x4e59x27[_0x51c0[96]];if(_0x4e59x1e[_0x51c0[71]][_0x51c0[87]]){_0x4e59x2a[_0x51c0[82]]= _[_0x51c0[86]](_0x4e59x2a[_0x51c0[82]],{$or:_[_0x51c0[89]](_0x4e59x2a[_0x51c0[75]],function(_0x4e59x39){var _0x4e59x37={};_0x4e59x37[_0x4e59x39]= {$like:_0x51c0[88]+ _0x4e59x1e[_0x51c0[71]][_0x51c0[87]]+ _0x51c0[88]};return _0x4e59x37})})};_0x4e59x2a= _[_0x51c0[86]]({},_0x4e59x2a,_0x4e59x1e[_0x51c0[90]]);return db[_0x51c0[104]][_0x51c0[46]]({where:_0x4e59x2a[_0x51c0[82]]})[_0x51c0[40]](function(_0x4e59x2b){_0x4e59x3d[_0x51c0[46]]= _0x4e59x2b;if(_0x4e59x1e[_0x51c0[71]][_0x51c0[92]]){_0x4e59x2a[_0x51c0[93]]= [{all:true}]};return db[_0x51c0[104]][_0x51c0[94]](_0x4e59x2a)})[_0x51c0[40]](function(_0x4e59x3b){_0x4e59x3d[_0x51c0[91]]= _0x4e59x3b;return _0x4e59x3d})}})[_0x51c0[40]](respondWithFilteredResult(_0x4e59x24,_0x4e59x2a))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[107]]= function(_0x4e59x1e,_0x4e59x24,_0x4e59x3c){var _0x4e59x3e;return db[_0x51c0[68]][_0x51c0[98]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]}})[_0x51c0[40]](handleEntityNotFound(_0x4e59x24,null))[_0x51c0[40]](function(_0x4e59x27){if(_0x4e59x27){return _0x4e59x27[_0x51c0[107]](_0x4e59x1e[_0x51c0[71]][_0x51c0[108]])}})[_0x51c0[40]](respondWithStatusCode(_0x4e59x24,null))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[103]]= function(_0x4e59x1e,_0x4e59x24){var _0x4e59x3f={name:_0x4e59x1e[_0x51c0[99]][_0x51c0[59]],key:_0x4e59x1e[_0x51c0[99]][_0x51c0[109]],email:_0x4e59x1e[_0x51c0[99]][_0x51c0[110]],ListId:_0x4e59x1e[_0x51c0[99]][_0x51c0[111]],active:!_[_0x51c0[113]](_0x4e59x1e[_0x51c0[99]][_0x51c0[112]])?_0x4e59x1e[_0x51c0[99]][_0x51c0[112]]:true,description:_0x4e59x1e[_0x51c0[99]][_0x51c0[114]]|| null,Imap:{},Smtp:{}};if(_[_0x51c0[113]](_0x4e59x1e[_0x51c0[99]][_0x51c0[115]])){if(_0x4e59x1e[_0x51c0[99]][_0x51c0[116]]){_0x4e59x3f[_0x51c0[63]][_0x51c0[117]]= _0x4e59x3f[_0x51c0[65]][_0x51c0[117]]= _0x4e59x1e[_0x51c0[99]][_0x51c0[118]];_0x4e59x3f[_0x51c0[63]][_0x51c0[119]]= _0x4e59x3f[_0x51c0[65]][_0x51c0[120]]= _0x4e59x1e[_0x51c0[99]][_0x51c0[121]]}else {_0x4e59x3f[_0x51c0[63]][_0x51c0[122]]= _0x4e59x3f[_0x51c0[65]][_0x51c0[122]]= false};_0x4e59x3f[_0x51c0[63]][_0x51c0[123]]= _0x4e59x1e[_0x51c0[99]][_0x51c0[63]][_0x51c0[123]];_0x4e59x3f[_0x51c0[63]][_0x51c0[124]]= _0x4e59x1e[_0x51c0[99]][_0x51c0[63]][_0x51c0[124]];_0x4e59x3f[_0x51c0[65]][_0x51c0[123]]= _0x4e59x1e[_0x51c0[99]][_0x51c0[65]][_0x51c0[123]];_0x4e59x3f[_0x51c0[65]][_0x51c0[124]]= _0x4e59x1e[_0x51c0[99]][_0x51c0[65]][_0x51c0[124]]}else {_0x4e59x3f[_0x51c0[63]][_0x51c0[125]]= _0x4e59x3f[_0x51c0[65]][_0x51c0[125]]= _0x4e59x1e[_0x51c0[99]][_0x51c0[115]];_0x4e59x3f[_0x51c0[63]][_0x51c0[117]]= _0x4e59x3f[_0x51c0[65]][_0x51c0[117]]= _0x4e59x1e[_0x51c0[99]][_0x51c0[118]];_0x4e59x3f[_0x51c0[63]][_0x51c0[119]]= _0x4e59x3f[_0x51c0[65]][_0x51c0[120]]= _0x4e59x1e[_0x51c0[99]][_0x51c0[121]]};return db[_0x51c0[68]][_0x51c0[103]](_0x4e59x3f,{include:[{model:db[_0x51c0[64]],as:_0x51c0[65]},{model:db[_0x51c0[62]],as:_0x51c0[63]}]})[_0x51c0[40]](respondWithResult(_0x4e59x24,201))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[126]]= function(_0x4e59x1e,_0x4e59x24,_0x4e59x3c){return db[_0x51c0[68]][_0x51c0[106]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]}})[_0x51c0[40]](handleEntityNotFound(_0x4e59x24,null))[_0x51c0[40]](function(_0x4e59x27){if(_0x4e59x27){return _0x4e59x27[_0x51c0[126]]()};return null})[_0x51c0[40]](respondWithResult(_0x4e59x24,null))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[127]]= function(_0x4e59x1e,_0x4e59x24,_0x4e59x3c){if(_0x4e59x1e[_0x51c0[99]][_0x51c0[96]]){delete _0x4e59x1e[_0x51c0[99]][_0x51c0[96]]};return db[_0x51c0[68]][_0x51c0[98]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]}})[_0x51c0[40]](handleEntityNotFound(_0x4e59x24,null))[_0x51c0[40]](function(_0x4e59x27){if(_0x4e59x27){_0x4e59x1e[_0x51c0[99]][_0x51c0[102]]= _0x4e59x27[_0x51c0[96]];return db[_0x51c0[62]][_0x51c0[103]](_0x4e59x1e[_0x51c0[99]])}})[_0x51c0[40]](respondWithResult(_0x4e59x24,null))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[128]]= function(_0x4e59x1e,_0x4e59x24,_0x4e59x3c){return db[_0x51c0[68]][_0x51c0[106]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]}})[_0x51c0[40]](handleEntityNotFound(_0x4e59x24,null))[_0x51c0[40]](function(_0x4e59x27){if(_0x4e59x27){return _0x4e59x27[_0x51c0[129]](null)};return null})[_0x51c0[40]](respondWithStatusCode(_0x4e59x24,null))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[130]]= function(_0x4e59x1e,_0x4e59x24,_0x4e59x3c){return db[_0x51c0[68]][_0x51c0[106]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]}})[_0x51c0[40]](handleEntityNotFound(_0x4e59x24,null))[_0x51c0[40]](function(_0x4e59x27){if(_0x4e59x27){return _0x4e59x27[_0x51c0[130]]()};return null})[_0x51c0[40]](respondWithResult(_0x4e59x24,null))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[131]]= function(_0x4e59x1e,_0x4e59x24,_0x4e59x3c){if(_0x4e59x1e[_0x51c0[99]][_0x51c0[96]]){delete _0x4e59x1e[_0x51c0[99]][_0x51c0[96]]};return db[_0x51c0[68]][_0x51c0[98]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]}})[_0x51c0[40]](handleEntityNotFound(_0x4e59x24,null))[_0x51c0[40]](function(_0x4e59x27){if(_0x4e59x27){_0x4e59x1e[_0x51c0[99]][_0x51c0[102]]= _0x4e59x27[_0x51c0[96]];return db[_0x51c0[64]][_0x51c0[103]](_0x4e59x1e[_0x51c0[99]])}})[_0x51c0[40]](respondWithResult(_0x4e59x24,null))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[132]]= function(_0x4e59x1e,_0x4e59x24,_0x4e59x3c){return db[_0x51c0[68]][_0x51c0[106]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]}})[_0x51c0[40]](handleEntityNotFound(_0x4e59x24,null))[_0x51c0[40]](function(_0x4e59x27){if(_0x4e59x27){return _0x4e59x27[_0x51c0[133]](null)};return null})[_0x51c0[40]](respondWithStatusCode(_0x4e59x24,null))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[134]]= function(_0x4e59x1e,_0x4e59x24,_0x4e59x3c){return db[_0x51c0[136]][_0x51c0[98]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]}})[_0x51c0[40]](handleEntityNotFound(_0x4e59x24,null))[_0x51c0[40]](function(_0x4e59x27){if(_0x4e59x27){return _0x4e59x27[_0x51c0[134]](_0x4e59x1e[_0x51c0[99]][_0x51c0[108]],_[_0x51c0[135]](_0x4e59x1e[_0x51c0[99]],[_0x51c0[108],_0x51c0[96]])|| {})}})[_0x51c0[40]](respondWithResult(_0x4e59x24,null))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[137]]= function(_0x4e59x1e,_0x4e59x24,_0x4e59x3c){var _0x4e59x2a={raw:false,where:{}};var _0x4e59x36={};var _0x4e59x3d={count:0,rows:[]};return db[_0x51c0[68]][_0x51c0[106]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]}})[_0x51c0[40]](handleEntityNotFound(_0x4e59x24,null))[_0x51c0[40]](function(_0x4e59x27){if(_0x4e59x27){_0x4e59x36[_0x51c0[66]]= _[_0x51c0[69]](db[_0x51c0[136]][_0x51c0[67]]);_0x4e59x36[_0x51c0[71]]= _[_0x51c0[69]](_0x4e59x1e[_0x51c0[71]]);_0x4e59x36[_0x51c0[73]]= _[_0x51c0[74]](_0x4e59x36[_0x51c0[66]],_0x4e59x36[_0x51c0[71]]);_0x4e59x2a[_0x51c0[75]]= _[_0x51c0[74]](_0x4e59x36[_0x51c0[66]],qs[_0x51c0[76]](_0x4e59x1e[_0x51c0[71]][_0x51c0[76]]));_0x4e59x2a[_0x51c0[75]]= (_0x4e59x2a[_0x51c0[75]][_0x51c0[77]])?_0x4e59x2a[_0x51c0[75]]:_0x4e59x36[_0x51c0[66]];if(!_0x4e59x1e[_0x51c0[71]][_0x51c0[79]](_0x51c0[78])){_0x4e59x2a[_0x51c0[48]]= qs[_0x51c0[48]](_0x4e59x1e[_0x51c0[71]][_0x51c0[48]]);_0x4e59x2a[_0x51c0[47]]= qs[_0x51c0[47]](_0x4e59x1e[_0x51c0[71]][_0x51c0[47]])};_0x4e59x2a[_0x51c0[80]]= qs[_0x51c0[81]](_0x4e59x1e[_0x51c0[71]][_0x51c0[81]]);_0x4e59x2a[_0x51c0[82]]= qs[_0x51c0[73]](_[_0x51c0[83]](_0x4e59x1e[_0x51c0[71]],_0x4e59x36[_0x51c0[73]]));_0x4e59x2a[_0x51c0[82]][_0x51c0[102]]= _0x4e59x27[_0x51c0[96]];if(_0x4e59x1e[_0x51c0[71]][_0x51c0[87]]){_0x4e59x2a[_0x51c0[82]]= _[_0x51c0[86]](_0x4e59x2a[_0x51c0[82]],{$or:_[_0x51c0[89]](_0x4e59x2a[_0x51c0[75]],function(_0x4e59x39){var _0x4e59x37={};_0x4e59x37[_0x4e59x39]= {$like:_0x51c0[88]+ _0x4e59x1e[_0x51c0[71]][_0x51c0[87]]+ _0x51c0[88]};return _0x4e59x37})})};_0x4e59x2a= _[_0x51c0[86]]({},_0x4e59x2a,_0x4e59x1e[_0x51c0[90]]);return db[_0x51c0[136]][_0x51c0[46]]({where:_0x4e59x2a[_0x51c0[82]]})[_0x51c0[40]](function(_0x4e59x2b){_0x4e59x3d[_0x51c0[46]]= _0x4e59x2b;if(_0x4e59x1e[_0x51c0[71]][_0x51c0[92]]){_0x4e59x2a[_0x51c0[93]]= [{model:db[_0x51c0[138]],as:_0x51c0[139],required:false},{model:db[_0x51c0[140]],as:_0x51c0[141],attributes:[_0x51c0[59],_0x51c0[142],_0x51c0[143]],required:false},{model:db[_0x51c0[144]],as:_0x51c0[145],attributes:[_0x51c0[96],_0x51c0[59],_0x51c0[146]],where:_0x4e59x1e[_0x51c0[71]][_0x51c0[147]]?{id:_0x4e59x1e[_0x51c0[71]][_0x51c0[147]]}:undefined,required:_0x4e59x1e[_0x51c0[71]][_0x51c0[147]]?true:false}]};return db[_0x51c0[136]][_0x51c0[94]](_0x4e59x2a)})[_0x51c0[40]](function(_0x4e59x3b){_0x4e59x3d[_0x51c0[91]]= _0x4e59x3b;return _0x4e59x3d})}})[_0x51c0[40]](respondWithFilteredResult(_0x4e59x24,_0x4e59x2a))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[148]]= function(_0x4e59x1e,_0x4e59x24,_0x4e59x3c){return db[_0x51c0[68]][_0x51c0[106]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]}})[_0x51c0[40]](handleEntityNotFound(_0x4e59x24,null))[_0x51c0[40]](function(_0x4e59x27){if(_0x4e59x27){return db[_0x51c0[154]][_0x51c0[153]](function(_0x4e59x40){return db[_0x51c0[151]][_0x51c0[57]]({where:{MailAccountId:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]},transaction:_0x4e59x40})[_0x51c0[40]](function(_0x4e59x41){var _0x4e59x3f=_[_0x51c0[89]](_0x4e59x1e[_0x51c0[99]],function(_0x4e59x42){_0x4e59x42[_0x51c0[102]]= _0x4e59x1e[_0x51c0[97]][_0x51c0[96]];return _0x4e59x42});return db[_0x51c0[151]][_0x51c0[152]](_0x4e59x3f,{transaction:_0x4e59x40})})})[_0x51c0[40]](function(){return db[_0x51c0[151]][_0x51c0[150]]({where:{MailAccountId:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]},order:_0x51c0[149]})})}})[_0x51c0[40]](respondWithResult(_0x4e59x24,null))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[155]]= function(_0x4e59x1e,_0x4e59x27,_0x4e59x3c){var _0x4e59x2a={};var _0x4e59x36={};var _0x4e59x43;var _0x4e59x2b;return db[_0x51c0[68]][_0x51c0[106]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]}})[_0x51c0[40]](handleEntityNotFound(_0x4e59x27,null))[_0x51c0[40]](function(_0x4e59x27){if(_0x4e59x27){_0x4e59x43= _0x4e59x27;_0x4e59x36[_0x51c0[66]]= _[_0x51c0[69]](db[_0x51c0[151]][_0x51c0[67]]);_0x4e59x36[_0x51c0[71]]= _[_0x51c0[69]](_0x4e59x1e[_0x51c0[71]]);_0x4e59x36[_0x51c0[73]]= _[_0x51c0[74]](_0x4e59x36[_0x51c0[66]],_0x4e59x36[_0x51c0[71]]);_0x4e59x2a[_0x51c0[75]]= _[_0x51c0[74]](_0x4e59x36[_0x51c0[66]],qs[_0x51c0[76]](_0x4e59x1e[_0x51c0[71]][_0x51c0[76]]));_0x4e59x2a[_0x51c0[75]]= (_0x4e59x2a[_0x51c0[75]][_0x51c0[77]])?_0x4e59x2a[_0x51c0[75]]:_0x4e59x36[_0x51c0[66]];_0x4e59x2a[_0x51c0[80]]= qs[_0x51c0[81]](_0x4e59x1e[_0x51c0[71]][_0x51c0[81]]);_0x4e59x2a[_0x51c0[82]]= qs[_0x51c0[73]](_[_0x51c0[83]](_0x4e59x1e[_0x51c0[71]],_0x4e59x36[_0x51c0[73]]));if(_0x4e59x1e[_0x51c0[71]][_0x51c0[87]]){_0x4e59x2a[_0x51c0[82]]= _[_0x51c0[86]](_0x4e59x2a[_0x51c0[82]],{$or:_[_0x51c0[89]](_0x4e59x2a[_0x51c0[75]],function(_0x4e59x39){var _0x4e59x37={};_0x4e59x37[_0x4e59x39]= {$like:_0x51c0[88]+ _0x4e59x1e[_0x51c0[71]][_0x51c0[87]]+ _0x51c0[88]};return _0x4e59x37})})};_0x4e59x2a= _[_0x51c0[86]]({},_0x4e59x2a,_0x4e59x1e[_0x51c0[90]]);return _0x4e59x43[_0x51c0[155]](_0x4e59x2a)}})[_0x51c0[40]](function(_0x4e59x3e){if(_0x4e59x3e){_0x4e59x2b= _0x4e59x3e[_0x51c0[77]];if(!_0x4e59x1e[_0x51c0[71]][_0x51c0[79]](_0x51c0[78])){_0x4e59x2a[_0x51c0[48]]= qs[_0x51c0[48]](_0x4e59x1e[_0x51c0[71]][_0x51c0[48]]);_0x4e59x2a[_0x51c0[47]]= qs[_0x51c0[47]](_0x4e59x1e[_0x51c0[71]][_0x51c0[47]])};return _0x4e59x43[_0x51c0[155]](_0x4e59x2a)}})[_0x51c0[40]](function(_0x4e59x3b){if(_0x4e59x3b){return _0x4e59x3b?{count:_0x4e59x2b,rows:_0x4e59x3b}:null}})[_0x51c0[40]](respondWithResult(_0x4e59x27,null))[_0x51c0[31]](handleError(_0x4e59x27,null))};exports[_0x51c0[156]]= function(_0x4e59x1e,_0x4e59x24,_0x4e59x3c){if(_0x4e59x1e[_0x51c0[99]][_0x51c0[96]]){delete _0x4e59x1e[_0x51c0[99]][_0x51c0[96]]};return db[_0x51c0[68]][_0x51c0[98]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]}})[_0x51c0[40]](handleEntityNotFound(_0x4e59x24,null))[_0x51c0[40]](function(_0x4e59x27){if(_0x4e59x27){_0x4e59x1e[_0x51c0[99]][_0x51c0[102]]= _0x4e59x27[_0x51c0[96]];return db[_0x51c0[157]][_0x51c0[103]](_0x4e59x1e[_0x51c0[99]])}})[_0x51c0[40]](respondWithResult(_0x4e59x24,null))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[158]]= function(_0x4e59x1e,_0x4e59x24,_0x4e59x3c){return db[_0x51c0[159]][_0x51c0[98]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]}})[_0x51c0[40]](handleEntityNotFound(_0x4e59x24,null))[_0x51c0[40]](function(_0x4e59x27){if(_0x4e59x27){return _0x4e59x27[_0x51c0[158]](_0x4e59x1e[_0x51c0[99]][_0x51c0[108]],_[_0x51c0[135]](_0x4e59x1e[_0x51c0[99]],[_0x51c0[108],_0x51c0[96]])|| {})}})[_0x51c0[40]](respondWithResult(_0x4e59x24,null))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[160]]= function(_0x4e59x1e,_0x4e59x27,_0x4e59x3c){var _0x4e59x2a={};var _0x4e59x36={};var _0x4e59x43;var _0x4e59x2b;return db[_0x51c0[68]][_0x51c0[106]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]}})[_0x51c0[40]](handleEntityNotFound(_0x4e59x27,null))[_0x51c0[40]](function(_0x4e59x27){if(_0x4e59x27){_0x4e59x43= _0x4e59x27;_0x4e59x36[_0x51c0[66]]= _[_0x51c0[69]](db[_0x51c0[157]][_0x51c0[67]]);_0x4e59x36[_0x51c0[71]]= _[_0x51c0[69]](_0x4e59x1e[_0x51c0[71]]);_0x4e59x36[_0x51c0[73]]= _[_0x51c0[74]](_0x4e59x36[_0x51c0[66]],_0x4e59x36[_0x51c0[71]]);_0x4e59x2a[_0x51c0[75]]= _[_0x51c0[74]](_0x4e59x36[_0x51c0[66]],qs[_0x51c0[76]](_0x4e59x1e[_0x51c0[71]][_0x51c0[76]]));_0x4e59x2a[_0x51c0[75]]= (_0x4e59x2a[_0x51c0[75]][_0x51c0[77]])?_0x4e59x2a[_0x51c0[75]]:_0x4e59x36[_0x51c0[66]];_0x4e59x2a[_0x51c0[80]]= qs[_0x51c0[81]](_0x4e59x1e[_0x51c0[71]][_0x51c0[81]]);_0x4e59x2a[_0x51c0[82]]= qs[_0x51c0[73]](_[_0x51c0[83]](_0x4e59x1e[_0x51c0[71]],_0x4e59x36[_0x51c0[73]]));if(_0x4e59x1e[_0x51c0[71]][_0x51c0[87]]){_0x4e59x2a[_0x51c0[82]]= _[_0x51c0[86]](_0x4e59x2a[_0x51c0[82]],{$or:_[_0x51c0[89]](_0x4e59x2a[_0x51c0[75]],function(_0x4e59x39){var _0x4e59x37={};_0x4e59x37[_0x4e59x39]= {$like:_0x51c0[88]+ _0x4e59x1e[_0x51c0[71]][_0x51c0[87]]+ _0x51c0[88]};return _0x4e59x37})})};_0x4e59x2a= _[_0x51c0[86]]({},_0x4e59x2a,_0x4e59x1e[_0x51c0[90]]);return _0x4e59x43[_0x51c0[160]](_0x4e59x2a)}})[_0x51c0[40]](function(_0x4e59x3e){if(_0x4e59x3e){_0x4e59x2b= _0x4e59x3e[_0x51c0[77]];if(!_0x4e59x1e[_0x51c0[71]][_0x51c0[79]](_0x51c0[78])){_0x4e59x2a[_0x51c0[48]]= qs[_0x51c0[48]](_0x4e59x1e[_0x51c0[71]][_0x51c0[48]]);_0x4e59x2a[_0x51c0[47]]= qs[_0x51c0[47]](_0x4e59x1e[_0x51c0[71]][_0x51c0[47]])};return _0x4e59x43[_0x51c0[160]](_0x4e59x2a)}})[_0x51c0[40]](function(_0x4e59x3b){if(_0x4e59x3b){return _0x4e59x3b?{count:_0x4e59x2b,rows:_0x4e59x3b}:null}})[_0x51c0[40]](respondWithResult(_0x4e59x27,null))[_0x51c0[31]](handleError(_0x4e59x27,null))};exports[_0x51c0[161]]= function(_0x4e59x1e,_0x4e59x24,_0x4e59x3c){var _0x4e59x2a={raw:true,where:{}};var _0x4e59x36={};var _0x4e59x3d={count:0,rows:[]};return db[_0x51c0[68]][_0x51c0[106]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]}})[_0x51c0[40]](handleEntityNotFound(_0x4e59x24,null))[_0x51c0[40]](function(_0x4e59x27){if(_0x4e59x27){_0x4e59x36[_0x51c0[66]]= _[_0x51c0[69]](db[_0x51c0[162]][_0x51c0[67]]);_0x4e59x36[_0x51c0[71]]= _[_0x51c0[69]](_0x4e59x1e[_0x51c0[71]]);_0x4e59x36[_0x51c0[73]]= _[_0x51c0[74]](_0x4e59x36[_0x51c0[66]],_0x4e59x36[_0x51c0[71]]);_0x4e59x2a[_0x51c0[75]]= _[_0x51c0[74]](_0x4e59x36[_0x51c0[66]],qs[_0x51c0[76]](_0x4e59x1e[_0x51c0[71]][_0x51c0[76]]));_0x4e59x2a[_0x51c0[75]]= (_0x4e59x2a[_0x51c0[75]][_0x51c0[77]])?_0x4e59x2a[_0x51c0[75]]:_0x4e59x36[_0x51c0[66]];if(!_0x4e59x1e[_0x51c0[71]][_0x51c0[79]](_0x51c0[78])){_0x4e59x2a[_0x51c0[48]]= qs[_0x51c0[48]](_0x4e59x1e[_0x51c0[71]][_0x51c0[48]]);_0x4e59x2a[_0x51c0[47]]= qs[_0x51c0[47]](_0x4e59x1e[_0x51c0[71]][_0x51c0[47]])};_0x4e59x2a[_0x51c0[80]]= qs[_0x51c0[81]](_0x4e59x1e[_0x51c0[71]][_0x51c0[81]]);_0x4e59x2a[_0x51c0[82]]= qs[_0x51c0[73]](_[_0x51c0[83]](_0x4e59x1e[_0x51c0[71]],_0x4e59x36[_0x51c0[73]]));_0x4e59x2a[_0x51c0[82]][_0x51c0[102]]= _0x4e59x27[_0x51c0[96]];if(_0x4e59x1e[_0x51c0[71]][_0x51c0[87]]){_0x4e59x2a[_0x51c0[82]]= _[_0x51c0[86]](_0x4e59x2a[_0x51c0[82]],{$or:_[_0x51c0[89]](_0x4e59x2a[_0x51c0[75]],function(_0x4e59x39){var _0x4e59x37={};_0x4e59x37[_0x4e59x39]= {$like:_0x51c0[88]+ _0x4e59x1e[_0x51c0[71]][_0x51c0[87]]+ _0x51c0[88]};return _0x4e59x37})})};if(_0x4e59x1e[_0x51c0[71]][_0x51c0[163]]){var _0x4e59x44=_0x4e59x1e[_0x51c0[71]][_0x51c0[163]][_0x51c0[165]](_0x51c0[164]);var _0x4e59x37={};_0x4e59x37[_0x4e59x44[0]]= {$gte:moment(_0x4e59x44[1])[_0x51c0[167]](_0x51c0[166])};_0x4e59x2a[_0x51c0[82]]= _[_0x51c0[86]](_0x4e59x2a[_0x51c0[82]],_0x4e59x37)};_0x4e59x2a= _[_0x51c0[86]]({},_0x4e59x2a,_0x4e59x1e[_0x51c0[90]]);return db[_0x51c0[162]][_0x51c0[46]]({where:_0x4e59x2a[_0x51c0[82]]})[_0x51c0[40]](function(_0x4e59x2b){_0x4e59x3d[_0x51c0[46]]= _0x4e59x2b;if(_0x4e59x1e[_0x51c0[71]][_0x51c0[92]]){_0x4e59x2a[_0x51c0[93]]= [{all:true}]};return db[_0x51c0[162]][_0x51c0[94]](_0x4e59x2a)})[_0x51c0[40]](function(_0x4e59x3b){_0x4e59x3d[_0x51c0[91]]= _0x4e59x3b;return _0x4e59x3d})}})[_0x51c0[40]](respondWithFilteredResult(_0x4e59x24,_0x4e59x2a))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[60]]= function(_0x4e59x1e,_0x4e59x24,_0x4e59x3c){var _0x4e59x45,_0x4e59x46={},_0x4e59x47;if(_0x4e59x1e[_0x51c0[99]][_0x51c0[168]]){_0x4e59x47= _0x4e59x1e[_0x51c0[99]][_0x51c0[168]][_0x51c0[165]](_0x51c0[164])[0]};return db[_0x51c0[68]][_0x51c0[98]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]},include:[{model:db[_0x51c0[191]],as:_0x51c0[177],include:[{model:db[_0x51c0[138]],as:_0x51c0[178],where:{email:_0x4e59x47},limit:1,order:[[_0x51c0[192],_0x51c0[193]]]}]},{model:db[_0x51c0[64]],as:_0x51c0[65],raw:true}]})[_0x51c0[40]](handleEntityNotFound(_0x4e59x24,null))[_0x51c0[40]](function(_0x4e59x4a){if(_0x4e59x4a){_0x4e59x45= _0x4e59x4a;if(_0x4e59x4a[_0x51c0[65]]){if(_[_0x51c0[113]](_0x4e59x1e[_0x51c0[99]][_0x51c0[170]])){_0x4e59x1e[_0x51c0[99]][_0x51c0[170]]= util[_0x51c0[167]](_0x51c0[181],_0x4e59x4a[_0x51c0[59]],_0x4e59x4a[_0x51c0[110]]|| _0x4e59x4a[_0x51c0[65]][_0x51c0[117]])};if(_0x4e59x1e[_0x51c0[99]][_0x51c0[182]]&& _0x4e59x1e[_0x51c0[99]][_0x51c0[182]][_0x51c0[77]]){for(var _0x4e59x4b=0;_0x4e59x4b< _0x4e59x1e[_0x51c0[99]][_0x51c0[182]][_0x51c0[77]];_0x4e59x4b+= 1){_0x4e59x1e[_0x51c0[99]][_0x51c0[182]][_0x4e59x4b]= {filename:_0x4e59x1e[_0x51c0[99]][_0x51c0[182]][_0x4e59x4b][_0x51c0[59]],path:path[_0x51c0[186]](config[_0x51c0[183]],_0x51c0[184],_0x4e59x1e[_0x51c0[99]][_0x51c0[182]][_0x4e59x4b][_0x51c0[185]])}}};var _0x4e59x2a={tls:{rejectUnauthorized:false}};if(_[_0x51c0[113]](_0x4e59x4a[_0x51c0[65]][_0x51c0[125]])){if(_0x4e59x4a[_0x51c0[65]][_0x51c0[122]]){_0x4e59x2a[_0x51c0[187]]= {user:_0x4e59x4a[_0x51c0[65]][_0x51c0[117]],pass:_0x4e59x4a[_0x51c0[65]][_0x51c0[120]]}};_0x4e59x2a[_0x51c0[123]]= _0x4e59x4a[_0x51c0[65]][_0x51c0[123]];_0x4e59x2a[_0x51c0[124]]= _0x4e59x4a[_0x51c0[65]][_0x51c0[124]];_0x4e59x2a[_0x51c0[188]]= _0x4e59x4a[_0x51c0[65]][_0x51c0[188]]}else {_0x4e59x2a[_0x51c0[125]]= _0x4e59x4a[_0x51c0[65]][_0x51c0[125]];_0x4e59x2a[_0x51c0[187]]= {user:_0x4e59x4a[_0x51c0[65]][_0x51c0[117]],pass:_0x4e59x4a[_0x51c0[65]][_0x51c0[120]]}};return respondWithRpcPromise(_0x51c0[189],_0x51c0[190],{account:_0x4e59x2a,message:_0x4e59x1e[_0x51c0[99]]})}else {throw  new Error(_0x51c0[180])}}})[_0x51c0[40]](function(_0x4e59x49){if(_0x4e59x49){_0x4e59x46= _0x4e59x49;if(_0x4e59x45[_0x51c0[177]]){if(_0x4e59x45[_0x51c0[177]][_0x51c0[178]][_0x51c0[77]]){return _0x4e59x45[_0x51c0[177]][_0x51c0[178]][0]}else {return db[_0x51c0[138]][_0x51c0[103]](_[_0x51c0[179]](_0x4e59x1e[_0x51c0[99]],{firstName:_0x4e59x1e[_0x51c0[99]][_0x51c0[168]],email:_0x4e59x1e[_0x51c0[99]][_0x51c0[168]],phone:_0x4e59x1e[_0x51c0[99]][_0x51c0[168]],ListId:_0x4e59x45[_0x51c0[111]]}))}}else {throw  new Error(_0x51c0[180])}}})[_0x51c0[40]](function(_0x4e59x48){if(_0x4e59x48){var _0x4e59x3f={UserId:_0x4e59x1e[_0x51c0[117]][_0x51c0[96]],ContactId:_0x4e59x48[_0x51c0[96]],MailAccountId:_0x4e59x45[_0x51c0[96]],inReplyTo:_0x4e59x46[_0x51c0[169]],to:_0x4e59x1e[_0x51c0[99]][_0x51c0[170]],cc:_0x4e59x1e[_0x51c0[99]][_0x51c0[171]],subject:_0x4e59x1e[_0x51c0[99]][_0x51c0[172]],attach:_0x4e59x1e[_0x51c0[99]][_0x51c0[173]],firstMsgDirection:_0x51c0[174],lastMsgAt:moment()[_0x51c0[167]](_0x51c0[166]),lastMsgDirection:_0x51c0[174],lastMsgBody:_0x4e59x1e[_0x51c0[99]][_0x51c0[99]],Messages:[_[_0x51c0[86]](_0x4e59x1e[_0x51c0[99]],{messageId:_0x4e59x46[_0x51c0[169]],sentAt:moment()[_0x51c0[167]](_0x51c0[166]),read:true,MailAccountId:_0x4e59x45[_0x51c0[96]],UserId:_0x4e59x1e[_0x51c0[117]][_0x51c0[96]],ContactId:_0x4e59x48[_0x51c0[96]]})]};if(_0x4e59x1e[_0x51c0[99]][_0x51c0[175]]){_0x4e59x3f= _[_0x51c0[86]](_0x4e59x3f,_0x4e59x1e[_0x51c0[99]].Interaction)};return db[_0x51c0[136]][_0x51c0[103]](_0x4e59x3f,{include:[{model:db[_0x51c0[162]],as:_0x51c0[176]}]})}})[_0x51c0[40]](respondWithResult(_0x4e59x24,null))[_0x51c0[31]](handleError(_0x4e59x24,null))};exports[_0x51c0[194]]= function(_0x4e59x1e,_0x4e59x27,_0x4e59x3c){return db[_0x51c0[68]][_0x51c0[98]]({where:{id:_0x4e59x1e[_0x51c0[97]][_0x51c0[96]]},include:[{model:db[_0x51c0[64]],as:_0x51c0[65],raw:true}]})[_0x51c0[40]](handleEntityNotFound(_0x4e59x27,null))[_0x51c0[40]](function(_0x4e59x4a){if(_0x4e59x4a&& _0x4e59x4a[_0x51c0[65]]){var _0x4e59x2a={id:_0x4e59x4a[_0x51c0[96]],tls:{rejectUnauthorized:false}};if(_0x4e59x4a[_0x51c0[65]][_0x51c0[125]]){_0x4e59x2a[_0x51c0[125]]= _0x4e59x4a[_0x51c0[65]][_0x51c0[125]]}else {_0x4e59x2a[_0x51c0[123]]= _0x4e59x4a[_0x51c0[65]][_0x51c0[123]];_0x4e59x2a[_0x51c0[124]]= _0x4e59x4a[_0x51c0[65]][_0x51c0[124]];_0x4e59x2a[_0x51c0[188]]= _0x4e59x4a[_0x51c0[65]][_0x51c0[188]]};if(_0x4e59x4a[_0x51c0[65]][_0x51c0[122]]){_0x4e59x2a[_0x51c0[187]]= {user:_0x4e59x4a[_0x51c0[65]][_0x51c0[117]],pass:_0x4e59x4a[_0x51c0[65]][_0x51c0[120]]}};return respondWithRpcPromise(_0x51c0[195],_0x51c0[194],{account:_0x4e59x2a})}})[_0x51c0[40]](respondWithResult(_0x4e59x27,null))[_0x51c0[31]](handleError(_0x4e59x27,null))}
\ No newline at end of file
+var _0xf512=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x49\x6D\x61\x70","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x53\x6D\x74\x70","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x64\x64\x41\x6E\x73\x77\x65\x72","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x63\x72\x65\x61\x74\x65","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x72\x65\x6D\x6F\x76\x65\x41\x6E\x73\x77\x65\x72\x73","\x69\x64\x73","\x6B\x65\x79","\x65\x6D\x61\x69\x6C","\x4C\x69\x73\x74\x49\x64","\x61\x63\x74\x69\x76\x65","\x69\x73\x4E\x69\x6C","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x63\x73\x65\x72\x76\x69\x63\x65","\x63\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E","\x75\x73\x65\x72","\x63\x75\x73\x65\x72","\x70\x61\x73\x73\x77\x6F\x72\x64","\x70\x61\x73\x73","\x63\x70\x61\x73\x73\x77\x6F\x72\x64","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x65\x72\x76\x69\x63\x65","\x67\x65\x74\x49\x6D\x61\x70","\x61\x64\x64\x49\x6D\x61\x70","\x72\x65\x6D\x6F\x76\x65\x49\x6D\x61\x70","\x73\x65\x74\x49\x6D\x61\x70","\x67\x65\x74\x53\x6D\x74\x70","\x61\x64\x64\x53\x6D\x74\x70","\x72\x65\x6D\x6F\x76\x65\x53\x6D\x74\x70","\x73\x65\x74\x53\x6D\x74\x70","\x61\x64\x64\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6F\x6D\x69\x74","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x55\x73\x65\x72","\x4F\x77\x6E\x65\x72","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x54\x61\x67","\x54\x61\x67\x73","\x63\x6F\x6C\x6F\x72","\x74\x61\x67","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x67\x65\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x6D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x24\x67\x74\x65","\x2C","\x73\x70\x6C\x69\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x74\x6F","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x66\x72\x6F\x6D","\x63\x63","\x73\x75\x62\x6A\x65\x63\x74","\x61\x74\x74\x61\x63\x68","\x6F\x75\x74","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x4D\x65\x73\x73\x61\x67\x65\x73","\x4C\x69\x73\x74","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x64\x65\x66\x61\x75\x6C\x74\x73","\x4C\x69\x73\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x6A\x6F\x69\x6E","\x61\x75\x74\x68","\x73\x65\x63\x75\x72\x65","\x53\x65\x6E\x64\x4D\x61\x69\x6C","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x43\x6D\x4C\x69\x73\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x76\x65\x72\x69\x66\x79\x53\x6D\x74\x70","\x56\x65\x72\x69\x66\x79\x53\x6D\x74\x70"];_0xf512[0];var jsonpatch=require(_0xf512[1]);var rp=require(_0xf512[2]);var moment=require(_0xf512[3]);var BPromise=require(_0xf512[4]);var Mustache=require(_0xf512[5]);var util=require(_0xf512[6]);var path=require(_0xf512[7]);var sox=require(_0xf512[8]);var csv=require(_0xf512[9]);var ejs=require(_0xf512[10]);var fs=require(_0xf512[11]);var _=require(_0xf512[12]);var squel=require(_0xf512[13]);var crypto=require(_0xf512[14]);var jsforce=require(_0xf512[15]);var deskjs=require(_0xf512[16]);var toCsv=require(_0xf512[9]);var querystring=require(_0xf512[17]);var Papa=require(_0xf512[18]);var qs=require(_0xf512[19]);var logger=require(_0xf512[21])(_0xf512[20]);var utils=require(_0xf512[22]);var config=require(_0xf512[23]);var db=require(_0xf512[25])[_0xf512[24]];var jayson=require(_0xf512[26]);var client=jayson[_0xf512[28]][_0xf512[27]]({port:9003});function respondWithRpcPromise(_0x67efx1c,_0x67efx1d,_0x67efx1e,_0x67efx1f){return  new BPromise(function(_0x67efx20,_0x67efx21){var _0x67efx22=(_0x67efx1f|| client);return _0x67efx22[_0xf512[41]](_0x67efx1c,_0x67efx1e)[_0xf512[40]](function(_0x67efx24){logger[_0xf512[33]](_0xf512[29],_0x67efx1d,_0xf512[32]);logger[_0xf512[36]](_0xf512[34],_0x67efx1d,_0xf512[32],JSON[_0xf512[35]](_0x67efx24));if(_0x67efx24[_0xf512[30]]){if(_0x67efx24[_0xf512[30]][_0xf512[37]]=== 500){logger[_0xf512[30]](_0xf512[29],_0x67efx1d,_0x67efx24[_0xf512[30]][_0xf512[38]]);return _0x67efx21(_0x67efx24[_0xf512[30]][_0xf512[38]])};logger[_0xf512[30]](_0xf512[29],_0x67efx1d,_0x67efx24[_0xf512[30]][_0xf512[38]]);return _0x67efx20(_0x67efx24[_0xf512[30]][_0xf512[38]])}else {logger[_0xf512[33]](_0xf512[29],_0x67efx1d,_0xf512[32]);_0x67efx20(_0x67efx24[_0xf512[39]][_0xf512[38]])}})[_0xf512[31]](function(_0x67efx23){logger[_0xf512[30]](_0xf512[29],_0x67efx1d,_0x67efx23);_0x67efx21(_0x67efx23)})})}function respondWithStatusCode(_0x67efx24,_0x67efx26){_0x67efx26= _0x67efx26|| 204;return function(_0x67efx27){if(_0x67efx27){return _0x67efx24[_0xf512[42]](_0x67efx26)};return _0x67efx24[_0xf512[44]](_0x67efx26)[_0xf512[43]]()}}function respondWithResult(_0x67efx24,_0x67efx26){_0x67efx26= _0x67efx26|| 200;return function(_0x67efx27){if(_0x67efx27){return _0x67efx24[_0xf512[44]](_0x67efx26)[_0xf512[45]](_0x67efx27)}}}function respondWithFilteredResult(_0x67efx24,_0x67efx2a){return function(_0x67efx27){if(_0x67efx27){var _0x67efx2b=_0x67efx27[_0xf512[46]],_0x67efx2c=_0x67efx2a[_0xf512[47]],_0x67efx2d=_0x67efx2a[_0xf512[47]]+ _0x67efx2a[_0xf512[48]],_0x67efx26;if(_0x67efx2d>= _0x67efx2b){_0x67efx2d= _0x67efx2b;_0x67efx26= 200}else {_0x67efx26= 206};_0x67efx24[_0xf512[44]](_0x67efx26);return _0x67efx24[_0xf512[52]](_0xf512[49],_0x67efx2c+ _0xf512[50]+ _0x67efx2d+ _0xf512[51]+ _0x67efx2b)[_0xf512[45]](_0x67efx27)};return null}}function patchUpdates(_0x67efx2f){return function(_0x67efx27){try{jsonpatch[_0xf512[53]](_0x67efx27,_0x67efx2f,true)}catch(err){return BPromise[_0xf512[54]](err)};return _0x67efx27[_0xf512[55]]()}}function saveUpdates(_0x67efx31,_0x67efx26){return function(_0x67efx27){if(_0x67efx27){return _0x67efx27[_0xf512[56]](_0x67efx31)[_0xf512[40]](function(_0x67efx32){return _0x67efx32})};return null}}function removeEntity(_0x67efx24,_0x67efx26){return function(_0x67efx27){if(_0x67efx27){return _0x67efx27[_0xf512[57]]()[_0xf512[40]](function(){_0x67efx24[_0xf512[44]](204)[_0xf512[43]]()})}}}function handleEntityNotFound(_0x67efx24,_0x67efx26){return function(_0x67efx27){if(!_0x67efx27){_0x67efx24[_0xf512[42]](404)};return _0x67efx27}}function handleError(_0x67efx24,_0x67efx26){_0x67efx26= _0x67efx26|| 500;return function(_0x67efx23){logger[_0xf512[30]](_0x67efx23[_0xf512[58]]);if(_0x67efx23[_0xf512[59]]){delete _0x67efx23[_0xf512[59]]};_0x67efx24[_0xf512[44]](_0x67efx26)[_0xf512[60]](_0x67efx23)}}exports[_0xf512[61]]= function(_0x67efx1e,_0x67efx24){var _0x67efx2a={include:[{model:db[_0xf512[62]],as:_0xf512[63]},{model:db[_0xf512[64]],as:_0xf512[65]}]},_0x67efx36={},_0x67efx37={count:0,rows:[]};_0x67efx36[_0xf512[66]]= _[_0xf512[69]](db[_0xf512[68]][_0xf512[67]]);var _0x67efx38={dateStart:_0x67efx1e[_0xf512[71]][_0xf512[70]],dateEnd:_0x67efx1e[_0xf512[71]][_0xf512[72]]};delete _0x67efx1e[_0xf512[71]][_0xf512[70]];delete _0x67efx1e[_0xf512[71]][_0xf512[72]];_0x67efx36[_0xf512[71]]= _[_0xf512[69]](_0x67efx1e[_0xf512[71]]);_0x67efx36[_0xf512[73]]= _[_0xf512[74]](_0x67efx36[_0xf512[66]],_0x67efx36[_0xf512[71]]);_0x67efx2a[_0xf512[75]]= _[_0xf512[74]](_0x67efx36[_0xf512[66]],qs[_0xf512[76]](_0x67efx1e[_0xf512[71]][_0xf512[76]]));_0x67efx2a[_0xf512[75]]= (_0x67efx2a[_0xf512[75]][_0xf512[77]])?_0x67efx2a[_0xf512[75]]:_0x67efx36[_0xf512[66]];if(!_0x67efx1e[_0xf512[71]][_0xf512[79]](_0xf512[78])){_0x67efx2a[_0xf512[48]]= qs[_0xf512[48]](_0x67efx1e[_0xf512[71]][_0xf512[48]]);_0x67efx2a[_0xf512[47]]= qs[_0xf512[47]](_0x67efx1e[_0xf512[71]][_0xf512[47]])};_0x67efx2a[_0xf512[80]]= qs[_0xf512[81]](_0x67efx1e[_0xf512[71]][_0xf512[81]]);_0x67efx2a[_0xf512[82]]= qs[_0xf512[73]](_[_0xf512[83]](_0x67efx1e[_0xf512[71]],_0x67efx36[_0xf512[73]]));if(_0x67efx38[_0xf512[70]]){if(_0x67efx38[_0xf512[72]]){_0x67efx38[_0xf512[72]]= moment(_0x67efx38[_0xf512[72]])[_0xf512[85]](1,_0xf512[84])}else {_0x67efx38[_0xf512[72]]= moment(_0x67efx38[_0xf512[70]])[_0xf512[85]](1,_0xf512[84])};_[_0xf512[86]](_0x67efx2a[_0xf512[82]],{createdAt:{$gte:_0x67efx38[_0xf512[70]],$lte:_0x67efx38[_0xf512[72]]}})};if(_0x67efx1e[_0xf512[71]][_0xf512[87]]){_0x67efx2a[_0xf512[82]]= _[_0xf512[86]](_0x67efx2a[_0xf512[82]],{$or:_[_0xf512[89]](_0x67efx2a[_0xf512[75]],function(_0x67efx39){var _0x67efx37={};_0x67efx37[_0x67efx39]= {$like:_0xf512[88]+ _0x67efx1e[_0xf512[71]][_0xf512[87]]+ _0xf512[88]};return _0x67efx37})})};_0x67efx2a= _[_0xf512[86]]({},_0x67efx2a,_0x67efx1e[_0xf512[90]]);var _0x67efx3a={where:_0x67efx2a[_0xf512[82]]};return db[_0xf512[68]][_0xf512[46]](_0x67efx3a)[_0xf512[40]](function(_0x67efx2b){_0x67efx37[_0xf512[46]]= _0x67efx2b;if(_0x67efx1e[_0xf512[71]][_0xf512[92]]){_0x67efx2a[_0xf512[93]]= [{all:true}]};return db[_0xf512[68]][_0xf512[94]](_0x67efx2a)})[_0xf512[40]](function(_0x67efx3b){_0x67efx37[_0xf512[91]]= _0x67efx3b;return _0x67efx37})[_0xf512[40]](respondWithFilteredResult(_0x67efx24,_0x67efx2a))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[95]]= function(_0x67efx1e,_0x67efx24){var _0x67efx2a={raw:false,where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]},include:[{model:db[_0xf512[62]],as:_0xf512[63]},{model:db[_0xf512[64]],as:_0xf512[65]}]},_0x67efx36={};_0x67efx36[_0xf512[66]]= _[_0xf512[69]](db[_0xf512[68]][_0xf512[67]]);_0x67efx36[_0xf512[71]]= _[_0xf512[69]](_0x67efx1e[_0xf512[71]]);_0x67efx36[_0xf512[73]]= _[_0xf512[74]](_0x67efx36[_0xf512[66]],_0x67efx36[_0xf512[71]]);_0x67efx2a[_0xf512[75]]= _[_0xf512[74]](_0x67efx36[_0xf512[66]],qs[_0xf512[76]](_0x67efx1e[_0xf512[71]][_0xf512[76]]));_0x67efx2a[_0xf512[75]]= (_0x67efx2a[_0xf512[75]][_0xf512[77]])?_0x67efx2a[_0xf512[75]]:_0x67efx36[_0xf512[66]];if(_0x67efx1e[_0xf512[71]][_0xf512[92]]){_0x67efx2a[_0xf512[93]]= [{all:true}]};_0x67efx2a= _[_0xf512[86]]({},_0x67efx2a,_0x67efx1e[_0xf512[90]]);return db[_0xf512[68]][_0xf512[98]](_0x67efx2a)[_0xf512[40]](handleEntityNotFound(_0x67efx24,null))[_0xf512[40]](respondWithResult(_0x67efx24,null))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[56]]= function(_0x67efx1e,_0x67efx24){if(_0x67efx1e[_0xf512[99]][_0xf512[96]]){delete _0x67efx1e[_0xf512[99]][_0xf512[96]]};return db[_0xf512[68]][_0xf512[98]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]},include:[{model:db[_0xf512[62]],as:_0xf512[63]},{model:db[_0xf512[64]],as:_0xf512[65]}]})[_0xf512[40]](handleEntityNotFound(_0x67efx24,null))[_0xf512[40]](saveUpdates(_0x67efx1e[_0xf512[99]],null))[_0xf512[40]](function(_0x67efx27){if(_0x67efx27&& _0x67efx1e[_0xf512[99]][_0xf512[63]]){return db[_0xf512[62]][_0xf512[56]](_0x67efx1e[_0xf512[99]].Imap,{where:{MailAccountId:_0x67efx27[_0xf512[96]]}})[_0xf512[40]](function(){return _0x67efx27})};return _0x67efx27})[_0xf512[40]](function(_0x67efx27){if(_0x67efx27&& _0x67efx1e[_0xf512[99]][_0xf512[65]]){return db[_0xf512[64]][_0xf512[56]](_0x67efx1e[_0xf512[99]].Smtp,{where:{MailAccountId:_0x67efx27[_0xf512[96]]}})[_0xf512[40]](function(){return _0x67efx27})};return _0x67efx27})[_0xf512[40]](respondWithResult(_0x67efx24,null))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[57]]= function(_0x67efx1e,_0x67efx24){return db[_0xf512[68]][_0xf512[98]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]}})[_0xf512[40]](handleEntityNotFound(_0x67efx24,null))[_0xf512[40]](removeEntity(_0x67efx24,null))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[100]]= function(_0x67efx1e,_0x67efx24){return db[_0xf512[68]][_0xf512[100]]()[_0xf512[40]](respondWithResult(_0x67efx24,null))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[101]]= function(_0x67efx1e,_0x67efx24,_0x67efx3c){if(_0x67efx1e[_0xf512[99]][_0xf512[96]]){delete _0x67efx1e[_0xf512[99]][_0xf512[96]]};return db[_0xf512[68]][_0xf512[98]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]}})[_0xf512[40]](handleEntityNotFound(_0x67efx24,null))[_0xf512[40]](function(_0x67efx27){if(_0x67efx27){_0x67efx1e[_0xf512[99]][_0xf512[102]]= _0x67efx27[_0xf512[96]];return db[_0xf512[104]][_0xf512[103]](_0x67efx1e[_0xf512[99]])}})[_0xf512[40]](respondWithResult(_0x67efx24,null))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[105]]= function(_0x67efx1e,_0x67efx24,_0x67efx3c){var _0x67efx2a={raw:false,where:{}};var _0x67efx36={};var _0x67efx3d={count:0,rows:[]};return db[_0xf512[68]][_0xf512[106]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]}})[_0xf512[40]](handleEntityNotFound(_0x67efx24,null))[_0xf512[40]](function(_0x67efx27){if(_0x67efx27){_0x67efx36[_0xf512[66]]= _[_0xf512[69]](db[_0xf512[104]][_0xf512[67]]);_0x67efx36[_0xf512[71]]= _[_0xf512[69]](_0x67efx1e[_0xf512[71]]);_0x67efx36[_0xf512[73]]= _[_0xf512[74]](_0x67efx36[_0xf512[66]],_0x67efx36[_0xf512[71]]);_0x67efx2a[_0xf512[75]]= _[_0xf512[74]](_0x67efx36[_0xf512[66]],qs[_0xf512[76]](_0x67efx1e[_0xf512[71]][_0xf512[76]]));_0x67efx2a[_0xf512[75]]= (_0x67efx2a[_0xf512[75]][_0xf512[77]])?_0x67efx2a[_0xf512[75]]:_0x67efx36[_0xf512[66]];if(!_0x67efx1e[_0xf512[71]][_0xf512[79]](_0xf512[78])){_0x67efx2a[_0xf512[48]]= qs[_0xf512[48]](_0x67efx1e[_0xf512[71]][_0xf512[48]]);_0x67efx2a[_0xf512[47]]= qs[_0xf512[47]](_0x67efx1e[_0xf512[71]][_0xf512[47]])};_0x67efx2a[_0xf512[80]]= qs[_0xf512[81]](_0x67efx1e[_0xf512[71]][_0xf512[81]]);_0x67efx2a[_0xf512[82]]= qs[_0xf512[73]](_[_0xf512[83]](_0x67efx1e[_0xf512[71]],_0x67efx36[_0xf512[73]]));_0x67efx2a[_0xf512[82]][_0xf512[102]]= _0x67efx27[_0xf512[96]];if(_0x67efx1e[_0xf512[71]][_0xf512[87]]){_0x67efx2a[_0xf512[82]]= _[_0xf512[86]](_0x67efx2a[_0xf512[82]],{$or:_[_0xf512[89]](_0x67efx2a[_0xf512[75]],function(_0x67efx39){var _0x67efx37={};_0x67efx37[_0x67efx39]= {$like:_0xf512[88]+ _0x67efx1e[_0xf512[71]][_0xf512[87]]+ _0xf512[88]};return _0x67efx37})})};_0x67efx2a= _[_0xf512[86]]({},_0x67efx2a,_0x67efx1e[_0xf512[90]]);return db[_0xf512[104]][_0xf512[46]]({where:_0x67efx2a[_0xf512[82]]})[_0xf512[40]](function(_0x67efx2b){_0x67efx3d[_0xf512[46]]= _0x67efx2b;if(_0x67efx1e[_0xf512[71]][_0xf512[92]]){_0x67efx2a[_0xf512[93]]= [{all:true}]};return db[_0xf512[104]][_0xf512[94]](_0x67efx2a)})[_0xf512[40]](function(_0x67efx3b){_0x67efx3d[_0xf512[91]]= _0x67efx3b;return _0x67efx3d})}})[_0xf512[40]](respondWithFilteredResult(_0x67efx24,_0x67efx2a))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[107]]= function(_0x67efx1e,_0x67efx24,_0x67efx3c){var _0x67efx3e;return db[_0xf512[68]][_0xf512[98]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]}})[_0xf512[40]](handleEntityNotFound(_0x67efx24,null))[_0xf512[40]](function(_0x67efx27){if(_0x67efx27){return _0x67efx27[_0xf512[107]](_0x67efx1e[_0xf512[71]][_0xf512[108]])}})[_0xf512[40]](respondWithStatusCode(_0x67efx24,null))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[103]]= function(_0x67efx1e,_0x67efx24){var _0x67efx3f={name:_0x67efx1e[_0xf512[99]][_0xf512[59]],key:_0x67efx1e[_0xf512[99]][_0xf512[109]],email:_0x67efx1e[_0xf512[99]][_0xf512[110]],ListId:_0x67efx1e[_0xf512[99]][_0xf512[111]],active:!_[_0xf512[113]](_0x67efx1e[_0xf512[99]][_0xf512[112]])?_0x67efx1e[_0xf512[99]][_0xf512[112]]:true,description:_0x67efx1e[_0xf512[99]][_0xf512[114]]|| null,Imap:{},Smtp:{}};if(_[_0xf512[113]](_0x67efx1e[_0xf512[99]][_0xf512[115]])){if(_0x67efx1e[_0xf512[99]][_0xf512[116]]){_0x67efx3f[_0xf512[63]][_0xf512[117]]= _0x67efx3f[_0xf512[65]][_0xf512[117]]= _0x67efx1e[_0xf512[99]][_0xf512[118]];_0x67efx3f[_0xf512[63]][_0xf512[119]]= _0x67efx3f[_0xf512[65]][_0xf512[120]]= _0x67efx1e[_0xf512[99]][_0xf512[121]]}else {_0x67efx3f[_0xf512[63]][_0xf512[122]]= _0x67efx3f[_0xf512[65]][_0xf512[122]]= false};_0x67efx3f[_0xf512[63]][_0xf512[123]]= _0x67efx1e[_0xf512[99]][_0xf512[63]][_0xf512[123]];_0x67efx3f[_0xf512[63]][_0xf512[124]]= _0x67efx1e[_0xf512[99]][_0xf512[63]][_0xf512[124]];_0x67efx3f[_0xf512[65]][_0xf512[123]]= _0x67efx1e[_0xf512[99]][_0xf512[65]][_0xf512[123]];_0x67efx3f[_0xf512[65]][_0xf512[124]]= _0x67efx1e[_0xf512[99]][_0xf512[65]][_0xf512[124]]}else {_0x67efx3f[_0xf512[63]][_0xf512[125]]= _0x67efx3f[_0xf512[65]][_0xf512[125]]= _0x67efx1e[_0xf512[99]][_0xf512[115]];_0x67efx3f[_0xf512[63]][_0xf512[117]]= _0x67efx3f[_0xf512[65]][_0xf512[117]]= _0x67efx1e[_0xf512[99]][_0xf512[118]];_0x67efx3f[_0xf512[63]][_0xf512[119]]= _0x67efx3f[_0xf512[65]][_0xf512[120]]= _0x67efx1e[_0xf512[99]][_0xf512[121]]};return db[_0xf512[68]][_0xf512[103]](_0x67efx3f,{include:[{model:db[_0xf512[64]],as:_0xf512[65]},{model:db[_0xf512[62]],as:_0xf512[63]}]})[_0xf512[40]](respondWithResult(_0x67efx24,201))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[126]]= function(_0x67efx1e,_0x67efx24,_0x67efx3c){return db[_0xf512[68]][_0xf512[106]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]}})[_0xf512[40]](handleEntityNotFound(_0x67efx24,null))[_0xf512[40]](function(_0x67efx27){if(_0x67efx27){return _0x67efx27[_0xf512[126]]()};return null})[_0xf512[40]](respondWithResult(_0x67efx24,null))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[127]]= function(_0x67efx1e,_0x67efx24,_0x67efx3c){if(_0x67efx1e[_0xf512[99]][_0xf512[96]]){delete _0x67efx1e[_0xf512[99]][_0xf512[96]]};return db[_0xf512[68]][_0xf512[98]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]}})[_0xf512[40]](handleEntityNotFound(_0x67efx24,null))[_0xf512[40]](function(_0x67efx27){if(_0x67efx27){_0x67efx1e[_0xf512[99]][_0xf512[102]]= _0x67efx27[_0xf512[96]];return db[_0xf512[62]][_0xf512[103]](_0x67efx1e[_0xf512[99]])}})[_0xf512[40]](respondWithResult(_0x67efx24,null))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[128]]= function(_0x67efx1e,_0x67efx24,_0x67efx3c){return db[_0xf512[68]][_0xf512[106]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]}})[_0xf512[40]](handleEntityNotFound(_0x67efx24,null))[_0xf512[40]](function(_0x67efx27){if(_0x67efx27){return _0x67efx27[_0xf512[129]](null)};return null})[_0xf512[40]](respondWithStatusCode(_0x67efx24,null))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[130]]= function(_0x67efx1e,_0x67efx24,_0x67efx3c){return db[_0xf512[68]][_0xf512[106]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]}})[_0xf512[40]](handleEntityNotFound(_0x67efx24,null))[_0xf512[40]](function(_0x67efx27){if(_0x67efx27){return _0x67efx27[_0xf512[130]]()};return null})[_0xf512[40]](respondWithResult(_0x67efx24,null))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[131]]= function(_0x67efx1e,_0x67efx24,_0x67efx3c){if(_0x67efx1e[_0xf512[99]][_0xf512[96]]){delete _0x67efx1e[_0xf512[99]][_0xf512[96]]};return db[_0xf512[68]][_0xf512[98]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]}})[_0xf512[40]](handleEntityNotFound(_0x67efx24,null))[_0xf512[40]](function(_0x67efx27){if(_0x67efx27){_0x67efx1e[_0xf512[99]][_0xf512[102]]= _0x67efx27[_0xf512[96]];return db[_0xf512[64]][_0xf512[103]](_0x67efx1e[_0xf512[99]])}})[_0xf512[40]](respondWithResult(_0x67efx24,null))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[132]]= function(_0x67efx1e,_0x67efx24,_0x67efx3c){return db[_0xf512[68]][_0xf512[106]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]}})[_0xf512[40]](handleEntityNotFound(_0x67efx24,null))[_0xf512[40]](function(_0x67efx27){if(_0x67efx27){return _0x67efx27[_0xf512[133]](null)};return null})[_0xf512[40]](respondWithStatusCode(_0x67efx24,null))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[134]]= function(_0x67efx1e,_0x67efx24,_0x67efx3c){return db[_0xf512[136]][_0xf512[98]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]}})[_0xf512[40]](handleEntityNotFound(_0x67efx24,null))[_0xf512[40]](function(_0x67efx27){if(_0x67efx27){return _0x67efx27[_0xf512[134]](_0x67efx1e[_0xf512[99]][_0xf512[108]],_[_0xf512[135]](_0x67efx1e[_0xf512[99]],[_0xf512[108],_0xf512[96]])|| {})}})[_0xf512[40]](respondWithResult(_0x67efx24,null))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[137]]= function(_0x67efx1e,_0x67efx24,_0x67efx3c){var _0x67efx2a={raw:false,where:{}};var _0x67efx36={};var _0x67efx3d={count:0,rows:[]};return db[_0xf512[68]][_0xf512[106]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]}})[_0xf512[40]](handleEntityNotFound(_0x67efx24,null))[_0xf512[40]](function(_0x67efx27){if(_0x67efx27){_0x67efx36[_0xf512[66]]= _[_0xf512[69]](db[_0xf512[136]][_0xf512[67]]);_0x67efx36[_0xf512[71]]= _[_0xf512[69]](_0x67efx1e[_0xf512[71]]);_0x67efx36[_0xf512[73]]= _[_0xf512[74]](_0x67efx36[_0xf512[66]],_0x67efx36[_0xf512[71]]);_0x67efx2a[_0xf512[75]]= _[_0xf512[74]](_0x67efx36[_0xf512[66]],qs[_0xf512[76]](_0x67efx1e[_0xf512[71]][_0xf512[76]]));_0x67efx2a[_0xf512[75]]= (_0x67efx2a[_0xf512[75]][_0xf512[77]])?_0x67efx2a[_0xf512[75]]:_0x67efx36[_0xf512[66]];if(!_0x67efx1e[_0xf512[71]][_0xf512[79]](_0xf512[78])){_0x67efx2a[_0xf512[48]]= qs[_0xf512[48]](_0x67efx1e[_0xf512[71]][_0xf512[48]]);_0x67efx2a[_0xf512[47]]= qs[_0xf512[47]](_0x67efx1e[_0xf512[71]][_0xf512[47]])};_0x67efx2a[_0xf512[80]]= qs[_0xf512[81]](_0x67efx1e[_0xf512[71]][_0xf512[81]]);_0x67efx2a[_0xf512[82]]= qs[_0xf512[73]](_[_0xf512[83]](_0x67efx1e[_0xf512[71]],_0x67efx36[_0xf512[73]]));_0x67efx2a[_0xf512[82]][_0xf512[102]]= _0x67efx27[_0xf512[96]];if(_0x67efx1e[_0xf512[71]][_0xf512[87]]){_0x67efx2a[_0xf512[82]]= _[_0xf512[86]](_0x67efx2a[_0xf512[82]],{$or:_[_0xf512[89]](_0x67efx2a[_0xf512[75]],function(_0x67efx39){var _0x67efx37={};_0x67efx37[_0x67efx39]= {$like:_0xf512[88]+ _0x67efx1e[_0xf512[71]][_0xf512[87]]+ _0xf512[88]};return _0x67efx37})})};_0x67efx2a= _[_0xf512[86]]({},_0x67efx2a,_0x67efx1e[_0xf512[90]]);return db[_0xf512[136]][_0xf512[46]]({where:_0x67efx2a[_0xf512[82]]})[_0xf512[40]](function(_0x67efx2b){_0x67efx3d[_0xf512[46]]= _0x67efx2b;if(_0x67efx1e[_0xf512[71]][_0xf512[92]]){_0x67efx2a[_0xf512[93]]= [{model:db[_0xf512[138]],as:_0xf512[139],required:false},{model:db[_0xf512[140]],as:_0xf512[141],attributes:[_0xf512[59],_0xf512[142],_0xf512[143]],required:false},{model:db[_0xf512[144]],as:_0xf512[145],attributes:[_0xf512[96],_0xf512[59],_0xf512[146]],where:_0x67efx1e[_0xf512[71]][_0xf512[147]]?{id:_0x67efx1e[_0xf512[71]][_0xf512[147]]}:undefined,required:_0x67efx1e[_0xf512[71]][_0xf512[147]]?true:false}]};return db[_0xf512[136]][_0xf512[94]](_0x67efx2a)})[_0xf512[40]](function(_0x67efx3b){_0x67efx3d[_0xf512[91]]= _0x67efx3b;return _0x67efx3d})}})[_0xf512[40]](respondWithFilteredResult(_0x67efx24,_0x67efx2a))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[148]]= function(_0x67efx1e,_0x67efx24,_0x67efx3c){return db[_0xf512[68]][_0xf512[106]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]}})[_0xf512[40]](handleEntityNotFound(_0x67efx24,null))[_0xf512[40]](function(_0x67efx27){if(_0x67efx27){return db[_0xf512[154]][_0xf512[153]](function(_0x67efx40){return db[_0xf512[151]][_0xf512[57]]({where:{MailAccountId:_0x67efx1e[_0xf512[97]][_0xf512[96]]},transaction:_0x67efx40})[_0xf512[40]](function(_0x67efx41){var _0x67efx3f=_[_0xf512[89]](_0x67efx1e[_0xf512[99]],function(_0x67efx42){_0x67efx42[_0xf512[102]]= _0x67efx1e[_0xf512[97]][_0xf512[96]];return _0x67efx42});return db[_0xf512[151]][_0xf512[152]](_0x67efx3f,{transaction:_0x67efx40})})})[_0xf512[40]](function(){return db[_0xf512[151]][_0xf512[150]]({where:{MailAccountId:_0x67efx1e[_0xf512[97]][_0xf512[96]]},order:_0xf512[149]})})}})[_0xf512[40]](respondWithResult(_0x67efx24,null))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[155]]= function(_0x67efx1e,_0x67efx27,_0x67efx3c){var _0x67efx2a={};var _0x67efx36={};var _0x67efx43;var _0x67efx2b;return db[_0xf512[68]][_0xf512[106]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]}})[_0xf512[40]](handleEntityNotFound(_0x67efx27,null))[_0xf512[40]](function(_0x67efx27){if(_0x67efx27){_0x67efx43= _0x67efx27;_0x67efx36[_0xf512[66]]= _[_0xf512[69]](db[_0xf512[151]][_0xf512[67]]);_0x67efx36[_0xf512[71]]= _[_0xf512[69]](_0x67efx1e[_0xf512[71]]);_0x67efx36[_0xf512[73]]= _[_0xf512[74]](_0x67efx36[_0xf512[66]],_0x67efx36[_0xf512[71]]);_0x67efx2a[_0xf512[75]]= _[_0xf512[74]](_0x67efx36[_0xf512[66]],qs[_0xf512[76]](_0x67efx1e[_0xf512[71]][_0xf512[76]]));_0x67efx2a[_0xf512[75]]= (_0x67efx2a[_0xf512[75]][_0xf512[77]])?_0x67efx2a[_0xf512[75]]:_0x67efx36[_0xf512[66]];_0x67efx2a[_0xf512[80]]= qs[_0xf512[81]](_0x67efx1e[_0xf512[71]][_0xf512[81]]);_0x67efx2a[_0xf512[82]]= qs[_0xf512[73]](_[_0xf512[83]](_0x67efx1e[_0xf512[71]],_0x67efx36[_0xf512[73]]));if(_0x67efx1e[_0xf512[71]][_0xf512[87]]){_0x67efx2a[_0xf512[82]]= _[_0xf512[86]](_0x67efx2a[_0xf512[82]],{$or:_[_0xf512[89]](_0x67efx2a[_0xf512[75]],function(_0x67efx39){var _0x67efx37={};_0x67efx37[_0x67efx39]= {$like:_0xf512[88]+ _0x67efx1e[_0xf512[71]][_0xf512[87]]+ _0xf512[88]};return _0x67efx37})})};_0x67efx2a= _[_0xf512[86]]({},_0x67efx2a,_0x67efx1e[_0xf512[90]]);return _0x67efx43[_0xf512[155]](_0x67efx2a)}})[_0xf512[40]](function(_0x67efx3e){if(_0x67efx3e){_0x67efx2b= _0x67efx3e[_0xf512[77]];if(!_0x67efx1e[_0xf512[71]][_0xf512[79]](_0xf512[78])){_0x67efx2a[_0xf512[48]]= qs[_0xf512[48]](_0x67efx1e[_0xf512[71]][_0xf512[48]]);_0x67efx2a[_0xf512[47]]= qs[_0xf512[47]](_0x67efx1e[_0xf512[71]][_0xf512[47]])};return _0x67efx43[_0xf512[155]](_0x67efx2a)}})[_0xf512[40]](function(_0x67efx3b){if(_0x67efx3b){return _0x67efx3b?{count:_0x67efx2b,rows:_0x67efx3b}:null}})[_0xf512[40]](respondWithResult(_0x67efx27,null))[_0xf512[31]](handleError(_0x67efx27,null))};exports[_0xf512[156]]= function(_0x67efx1e,_0x67efx24,_0x67efx3c){if(_0x67efx1e[_0xf512[99]][_0xf512[96]]){delete _0x67efx1e[_0xf512[99]][_0xf512[96]]};return db[_0xf512[68]][_0xf512[98]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]}})[_0xf512[40]](handleEntityNotFound(_0x67efx24,null))[_0xf512[40]](function(_0x67efx27){if(_0x67efx27){_0x67efx1e[_0xf512[99]][_0xf512[102]]= _0x67efx27[_0xf512[96]];return db[_0xf512[157]][_0xf512[103]](_0x67efx1e[_0xf512[99]])}})[_0xf512[40]](respondWithResult(_0x67efx24,null))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[158]]= function(_0x67efx1e,_0x67efx24,_0x67efx3c){return db[_0xf512[159]][_0xf512[98]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]}})[_0xf512[40]](handleEntityNotFound(_0x67efx24,null))[_0xf512[40]](function(_0x67efx27){if(_0x67efx27){return _0x67efx27[_0xf512[158]](_0x67efx1e[_0xf512[99]][_0xf512[108]],_[_0xf512[135]](_0x67efx1e[_0xf512[99]],[_0xf512[108],_0xf512[96]])|| {})}})[_0xf512[40]](respondWithResult(_0x67efx24,null))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[160]]= function(_0x67efx1e,_0x67efx27,_0x67efx3c){var _0x67efx2a={};var _0x67efx36={};var _0x67efx43;var _0x67efx2b;return db[_0xf512[68]][_0xf512[106]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]}})[_0xf512[40]](handleEntityNotFound(_0x67efx27,null))[_0xf512[40]](function(_0x67efx27){if(_0x67efx27){_0x67efx43= _0x67efx27;_0x67efx36[_0xf512[66]]= _[_0xf512[69]](db[_0xf512[157]][_0xf512[67]]);_0x67efx36[_0xf512[71]]= _[_0xf512[69]](_0x67efx1e[_0xf512[71]]);_0x67efx36[_0xf512[73]]= _[_0xf512[74]](_0x67efx36[_0xf512[66]],_0x67efx36[_0xf512[71]]);_0x67efx2a[_0xf512[75]]= _[_0xf512[74]](_0x67efx36[_0xf512[66]],qs[_0xf512[76]](_0x67efx1e[_0xf512[71]][_0xf512[76]]));_0x67efx2a[_0xf512[75]]= (_0x67efx2a[_0xf512[75]][_0xf512[77]])?_0x67efx2a[_0xf512[75]]:_0x67efx36[_0xf512[66]];_0x67efx2a[_0xf512[80]]= qs[_0xf512[81]](_0x67efx1e[_0xf512[71]][_0xf512[81]]);_0x67efx2a[_0xf512[82]]= qs[_0xf512[73]](_[_0xf512[83]](_0x67efx1e[_0xf512[71]],_0x67efx36[_0xf512[73]]));if(_0x67efx1e[_0xf512[71]][_0xf512[87]]){_0x67efx2a[_0xf512[82]]= _[_0xf512[86]](_0x67efx2a[_0xf512[82]],{$or:_[_0xf512[89]](_0x67efx2a[_0xf512[75]],function(_0x67efx39){var _0x67efx37={};_0x67efx37[_0x67efx39]= {$like:_0xf512[88]+ _0x67efx1e[_0xf512[71]][_0xf512[87]]+ _0xf512[88]};return _0x67efx37})})};_0x67efx2a= _[_0xf512[86]]({},_0x67efx2a,_0x67efx1e[_0xf512[90]]);return _0x67efx43[_0xf512[160]](_0x67efx2a)}})[_0xf512[40]](function(_0x67efx3e){if(_0x67efx3e){_0x67efx2b= _0x67efx3e[_0xf512[77]];if(!_0x67efx1e[_0xf512[71]][_0xf512[79]](_0xf512[78])){_0x67efx2a[_0xf512[48]]= qs[_0xf512[48]](_0x67efx1e[_0xf512[71]][_0xf512[48]]);_0x67efx2a[_0xf512[47]]= qs[_0xf512[47]](_0x67efx1e[_0xf512[71]][_0xf512[47]])};return _0x67efx43[_0xf512[160]](_0x67efx2a)}})[_0xf512[40]](function(_0x67efx3b){if(_0x67efx3b){return _0x67efx3b?{count:_0x67efx2b,rows:_0x67efx3b}:null}})[_0xf512[40]](respondWithResult(_0x67efx27,null))[_0xf512[31]](handleError(_0x67efx27,null))};exports[_0xf512[161]]= function(_0x67efx1e,_0x67efx24,_0x67efx3c){var _0x67efx2a={raw:true,where:{}};var _0x67efx36={};var _0x67efx3d={count:0,rows:[]};return db[_0xf512[68]][_0xf512[106]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]}})[_0xf512[40]](handleEntityNotFound(_0x67efx24,null))[_0xf512[40]](function(_0x67efx27){if(_0x67efx27){_0x67efx36[_0xf512[66]]= _[_0xf512[69]](db[_0xf512[162]][_0xf512[67]]);_0x67efx36[_0xf512[71]]= _[_0xf512[69]](_0x67efx1e[_0xf512[71]]);_0x67efx36[_0xf512[73]]= _[_0xf512[74]](_0x67efx36[_0xf512[66]],_0x67efx36[_0xf512[71]]);_0x67efx2a[_0xf512[75]]= _[_0xf512[74]](_0x67efx36[_0xf512[66]],qs[_0xf512[76]](_0x67efx1e[_0xf512[71]][_0xf512[76]]));_0x67efx2a[_0xf512[75]]= (_0x67efx2a[_0xf512[75]][_0xf512[77]])?_0x67efx2a[_0xf512[75]]:_0x67efx36[_0xf512[66]];if(!_0x67efx1e[_0xf512[71]][_0xf512[79]](_0xf512[78])){_0x67efx2a[_0xf512[48]]= qs[_0xf512[48]](_0x67efx1e[_0xf512[71]][_0xf512[48]]);_0x67efx2a[_0xf512[47]]= qs[_0xf512[47]](_0x67efx1e[_0xf512[71]][_0xf512[47]])};_0x67efx2a[_0xf512[80]]= qs[_0xf512[81]](_0x67efx1e[_0xf512[71]][_0xf512[81]]);_0x67efx2a[_0xf512[82]]= qs[_0xf512[73]](_[_0xf512[83]](_0x67efx1e[_0xf512[71]],_0x67efx36[_0xf512[73]]));_0x67efx2a[_0xf512[82]][_0xf512[102]]= _0x67efx27[_0xf512[96]];if(_0x67efx1e[_0xf512[71]][_0xf512[87]]){_0x67efx2a[_0xf512[82]]= _[_0xf512[86]](_0x67efx2a[_0xf512[82]],{$or:_[_0xf512[89]](_0x67efx2a[_0xf512[75]],function(_0x67efx39){var _0x67efx37={};_0x67efx37[_0x67efx39]= {$like:_0xf512[88]+ _0x67efx1e[_0xf512[71]][_0xf512[87]]+ _0xf512[88]};return _0x67efx37})})};if(_0x67efx1e[_0xf512[71]][_0xf512[163]]){var _0x67efx44=_0x67efx1e[_0xf512[71]][_0xf512[163]][_0xf512[165]](_0xf512[164]);var _0x67efx37={};_0x67efx37[_0x67efx44[0]]= {$gte:moment(_0x67efx44[1])[_0xf512[167]](_0xf512[166])};_0x67efx2a[_0xf512[82]]= _[_0xf512[86]](_0x67efx2a[_0xf512[82]],_0x67efx37)};_0x67efx2a= _[_0xf512[86]]({},_0x67efx2a,_0x67efx1e[_0xf512[90]]);return db[_0xf512[162]][_0xf512[46]]({where:_0x67efx2a[_0xf512[82]]})[_0xf512[40]](function(_0x67efx2b){_0x67efx3d[_0xf512[46]]= _0x67efx2b;if(_0x67efx1e[_0xf512[71]][_0xf512[92]]){_0x67efx2a[_0xf512[93]]= [{all:true}]};return db[_0xf512[162]][_0xf512[94]](_0x67efx2a)})[_0xf512[40]](function(_0x67efx3b){_0x67efx3d[_0xf512[91]]= _0x67efx3b;return _0x67efx3d})}})[_0xf512[40]](respondWithFilteredResult(_0x67efx24,_0x67efx2a))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[60]]= function(_0x67efx1e,_0x67efx24,_0x67efx3c){var _0x67efx45,_0x67efx46={},_0x67efx47;if(_0x67efx1e[_0xf512[99]][_0xf512[168]]){_0x67efx47= _0x67efx1e[_0xf512[99]][_0xf512[168]][_0xf512[165]](_0xf512[164])[0]};return db[_0xf512[68]][_0xf512[98]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]},include:[{model:db[_0xf512[191]],as:_0xf512[177],include:[{model:db[_0xf512[138]],as:_0xf512[178],where:{email:_0x67efx47},limit:1,order:[[_0xf512[192],_0xf512[193]]]}]},{model:db[_0xf512[64]],as:_0xf512[65],raw:true}]})[_0xf512[40]](handleEntityNotFound(_0x67efx24,null))[_0xf512[40]](function(_0x67efx4a){if(_0x67efx4a){_0x67efx45= _0x67efx4a;if(_0x67efx4a[_0xf512[65]]){if(_[_0xf512[113]](_0x67efx1e[_0xf512[99]][_0xf512[170]])){_0x67efx1e[_0xf512[99]][_0xf512[170]]= util[_0xf512[167]](_0xf512[181],_0x67efx4a[_0xf512[59]],_0x67efx4a[_0xf512[110]]|| _0x67efx4a[_0xf512[65]][_0xf512[117]])};if(_0x67efx1e[_0xf512[99]][_0xf512[182]]&& _0x67efx1e[_0xf512[99]][_0xf512[182]][_0xf512[77]]){for(var _0x67efx4b=0;_0x67efx4b< _0x67efx1e[_0xf512[99]][_0xf512[182]][_0xf512[77]];_0x67efx4b+= 1){_0x67efx1e[_0xf512[99]][_0xf512[182]][_0x67efx4b]= {filename:_0x67efx1e[_0xf512[99]][_0xf512[182]][_0x67efx4b][_0xf512[59]],path:path[_0xf512[186]](config[_0xf512[183]],_0xf512[184],_0x67efx1e[_0xf512[99]][_0xf512[182]][_0x67efx4b][_0xf512[185]])}}};var _0x67efx2a={tls:{rejectUnauthorized:false}};if(_[_0xf512[113]](_0x67efx4a[_0xf512[65]][_0xf512[125]])){if(_0x67efx4a[_0xf512[65]][_0xf512[122]]){_0x67efx2a[_0xf512[187]]= {user:_0x67efx4a[_0xf512[65]][_0xf512[117]],pass:_0x67efx4a[_0xf512[65]][_0xf512[120]]}};_0x67efx2a[_0xf512[123]]= _0x67efx4a[_0xf512[65]][_0xf512[123]];_0x67efx2a[_0xf512[124]]= _0x67efx4a[_0xf512[65]][_0xf512[124]];_0x67efx2a[_0xf512[188]]= _0x67efx4a[_0xf512[65]][_0xf512[188]]}else {_0x67efx2a[_0xf512[125]]= _0x67efx4a[_0xf512[65]][_0xf512[125]];_0x67efx2a[_0xf512[187]]= {user:_0x67efx4a[_0xf512[65]][_0xf512[117]],pass:_0x67efx4a[_0xf512[65]][_0xf512[120]]}};return respondWithRpcPromise(_0xf512[189],_0xf512[190],{account:_0x67efx2a,message:_0x67efx1e[_0xf512[99]]})}else {throw  new Error(_0xf512[180])}}})[_0xf512[40]](function(_0x67efx49){if(_0x67efx49){_0x67efx46= _0x67efx49;if(_0x67efx45[_0xf512[177]]){if(_0x67efx45[_0xf512[177]][_0xf512[178]][_0xf512[77]]){return _0x67efx45[_0xf512[177]][_0xf512[178]][0]}else {return db[_0xf512[138]][_0xf512[103]](_[_0xf512[179]](_0x67efx1e[_0xf512[99]],{firstName:_0x67efx1e[_0xf512[99]][_0xf512[168]],email:_0x67efx1e[_0xf512[99]][_0xf512[168]],phone:_0x67efx1e[_0xf512[99]][_0xf512[168]],ListId:_0x67efx45[_0xf512[111]]}))}}else {throw  new Error(_0xf512[180])}}})[_0xf512[40]](function(_0x67efx48){if(_0x67efx48){var _0x67efx3f={UserId:_0x67efx1e[_0xf512[117]][_0xf512[96]],ContactId:_0x67efx48[_0xf512[96]],MailAccountId:_0x67efx45[_0xf512[96]],inReplyTo:_0x67efx46[_0xf512[169]],to:_0x67efx1e[_0xf512[99]][_0xf512[170]],cc:_0x67efx1e[_0xf512[99]][_0xf512[171]],subject:_0x67efx1e[_0xf512[99]][_0xf512[172]],attach:_0x67efx1e[_0xf512[99]][_0xf512[173]],firstMsgDirection:_0xf512[174],lastMsgAt:moment()[_0xf512[167]](_0xf512[166]),lastMsgDirection:_0xf512[174],lastMsgBody:_0x67efx1e[_0xf512[99]][_0xf512[99]],Messages:[_[_0xf512[86]](_0x67efx1e[_0xf512[99]],{messageId:_0x67efx46[_0xf512[169]],sentAt:moment()[_0xf512[167]](_0xf512[166]),read:true,MailAccountId:_0x67efx45[_0xf512[96]],UserId:_0x67efx1e[_0xf512[117]][_0xf512[96]],ContactId:_0x67efx48[_0xf512[96]]})]};if(_0x67efx1e[_0xf512[99]][_0xf512[175]]){_0x67efx3f= _[_0xf512[86]](_0x67efx3f,_0x67efx1e[_0xf512[99]].Interaction)};return db[_0xf512[136]][_0xf512[103]](_0x67efx3f,{include:[{model:db[_0xf512[162]],as:_0xf512[176]}]})}})[_0xf512[40]](respondWithResult(_0x67efx24,null))[_0xf512[31]](handleError(_0x67efx24,null))};exports[_0xf512[194]]= function(_0x67efx1e,_0x67efx27,_0x67efx3c){return db[_0xf512[68]][_0xf512[98]]({where:{id:_0x67efx1e[_0xf512[97]][_0xf512[96]]},include:[{model:db[_0xf512[64]],as:_0xf512[65],raw:true}]})[_0xf512[40]](handleEntityNotFound(_0x67efx27,null))[_0xf512[40]](function(_0x67efx4a){if(_0x67efx4a&& _0x67efx4a[_0xf512[65]]){var _0x67efx2a={id:_0x67efx4a[_0xf512[96]],tls:{rejectUnauthorized:false}};if(_0x67efx4a[_0xf512[65]][_0xf512[125]]){_0x67efx2a[_0xf512[125]]= _0x67efx4a[_0xf512[65]][_0xf512[125]]}else {_0x67efx2a[_0xf512[123]]= _0x67efx4a[_0xf512[65]][_0xf512[123]];_0x67efx2a[_0xf512[124]]= _0x67efx4a[_0xf512[65]][_0xf512[124]];_0x67efx2a[_0xf512[188]]= _0x67efx4a[_0xf512[65]][_0xf512[188]]};if(_0x67efx4a[_0xf512[65]][_0xf512[122]]){_0x67efx2a[_0xf512[187]]= {user:_0x67efx4a[_0xf512[65]][_0xf512[117]],pass:_0x67efx4a[_0xf512[65]][_0xf512[120]]}};return respondWithRpcPromise(_0xf512[195],_0xf512[194],{account:_0x67efx2a})}})[_0xf512[40]](respondWithResult(_0x67efx27,null))[_0xf512[31]](handleError(_0x67efx27,null))}
\ No newline at end of file
index 6ebad74..8208dfb 100644 (file)
@@ -1 +1 @@
-var _0x24d5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x24d5[0];var _=require(_0x24d5[1]);var util=require(_0x24d5[2]);var logger=require(_0x24d5[4])(_0x24d5[3]);var moment=require(_0x24d5[5]);var BPromise=require(_0x24d5[6]);var rp=require(_0x24d5[7]);var attributes=require(_0x24d5[8]);module[_0x24d5[9]]= function(_0x73f3x8,_0x73f3x9){return _0x73f3x8[_0x24d5[12]](_0x24d5[10],attributes,{tableName:_0x24d5[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x2d61=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x2d61[0];var _=require(_0x2d61[1]);var util=require(_0x2d61[2]);var logger=require(_0x2d61[4])(_0x2d61[3]);var moment=require(_0x2d61[5]);var BPromise=require(_0x2d61[6]);var rp=require(_0x2d61[7]);var attributes=require(_0x2d61[8]);module[_0x2d61[9]]= function(_0xa1acx8,_0xa1acx9){return _0xa1acx8[_0x2d61[12]](_0x2d61[10],attributes,{tableName:_0x2d61[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 8a3b40a..6781654 100644 (file)
@@ -1 +1 @@
-var _0xeea1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x53\x68\x6F\x77\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x66\x69\x6E\x64","\x4E\x6F\x74\x69\x66\x79\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x62\x6F\x64\x79","\x6D\x61\x69\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x6B\x65\x79\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x4C\x69\x73\x74\x49\x64","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65","\x69\x64","\x66\x72\x6F\x6D","\x69\x73\x4E\x69\x6C","\x66\x72\x6F\x6D\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","","\x62\x6F\x64\x79\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x20\x61\x6E\x64\x20\x6E\x6F\x74\x20\x65\x6D\x70\x74\x79","\x6D\x61\x70\x4B\x65\x79","\x6D\x61\x70\x4B\x65\x79\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x6D\x61\x70\x4B\x65\x79\x20\x69\x6E\x76\x61\x6C\x69\x64\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x55\x73\x65\x72\x49\x64","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x2C","\x77\x61\x69\x74\x46\x6F\x72\x54\x68\x65\x41\x73\x73\x69\x67\x6E\x65\x64\x41\x67\x65\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x75\x6E\x73\x68\x69\x66\x74","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x53\x74\x61\x72\x74","\x73\x74\x61\x72\x74\x52\x6F\x75\x74\x69\x6E\x67","\x55\x73\x65\x72","\x25\x73","\x69\x6E","\x63\x6F\x6E\x74\x61\x63\x74","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x74\x6F","\x63\x63","\x73\x75\x62\x6A\x65\x63\x74","\x61\x74\x74\x61\x63\x68","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x75\x70\x64\x61\x74\x65","\x67\x65\x74","\x63\x72\x65\x61\x74\x65\x64","\x73\x70\x72\x65\x61\x64","\x67\x65\x6E\x65\x72\x61\x74\x65","\x20","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x4D\x65\x73\x73\x61\x67\x65\x73","\x69\x6E\x52\x65\x70\x6C\x79\x54\x6F","\x43\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x4C\x69\x73\x74","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6F\x6D\x69\x74","\x6C\x69\x73\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x61\x73\x63","\x6F\x72\x64\x65\x72\x42\x79","\x61\x75\x74\x6F\x63\x6C\x6F\x73\x65","\x6C\x65\x6E\x67\x74\x68","\x63\x6C\x6F\x73\x65","\x70\x75\x73\x68","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x64\x65\x66\x61\x75\x6C\x74\x73","\x4C\x69\x73\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x43\x6D\x4C\x69\x73\x74","\x44\x45\x53\x43","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x53\x6D\x74\x70"];_0xeea1[0];var _=require(_0xeea1[1]);var util=require(_0xeea1[2]);var moment=require(_0xeea1[3]);var BPromise=require(_0xeea1[4]);var rs=require(_0xeea1[5]);var fs=require(_0xeea1[6]);var db=require(_0xeea1[8])[_0xeea1[7]];var utils=require(_0xeea1[9]);var logger=require(_0xeea1[11])(_0xeea1[10]);var config=require(_0xeea1[12]);var jayson=require(_0xeea1[13]);var client=jayson[_0xeea1[15]][_0xeea1[14]]({port:9004});function respondWithRpcPromise(_0x3769xe,_0x3769xf,_0x3769x10){return  new BPromise(function(_0x3769x11,_0x3769x12){return client[_0xeea1[28]](_0x3769xe,_0x3769x10)[_0xeea1[27]](function(_0x3769x14){logger[_0xeea1[20]](_0xeea1[16],_0x3769xf,_0xeea1[19]);logger[_0xeea1[23]](_0xeea1[21],_0x3769xf,_0xeea1[19],JSON[_0xeea1[22]](_0x3769x14));if(_0x3769x14[_0xeea1[17]]){if(_0x3769x14[_0xeea1[17]][_0xeea1[24]]=== 500){logger[_0xeea1[17]](_0xeea1[16],_0x3769xf,_0x3769x14[_0xeea1[17]][_0xeea1[25]]);return _0x3769x12(_0x3769x14[_0xeea1[17]][_0xeea1[25]])};logger[_0xeea1[17]](_0xeea1[16],_0x3769xf,_0x3769x14[_0xeea1[17]][_0xeea1[25]]);return _0x3769x11(_0x3769x14[_0xeea1[17]][_0xeea1[25]])}else {logger[_0xeea1[20]](_0xeea1[16],_0x3769xf,_0xeea1[19]);_0x3769x11(_0x3769x14[_0xeea1[26]][_0xeea1[25]])}})[_0xeea1[18]](function(_0x3769x13){logger[_0xeea1[17]](_0xeea1[16],_0x3769xf,_0x3769x13);_0x3769x12(_0x3769x13)})})}exports[_0xeea1[29]]= function(_0x3769x10){var _0x3769x15=this;return  new Promise(function(_0x3769x11,_0x3769x12){return db[_0xeea1[40]][_0xeea1[39]]({raw:_0x3769x10[_0xeea1[30]]?(_0x3769x10[_0xeea1[30]][_0xeea1[31]]=== undefined)?true:false:true,where:_0x3769x10[_0xeea1[30]]?_0x3769x10[_0xeea1[30]][_0xeea1[32]]|| null:null,attributes:_0x3769x10[_0xeea1[30]]?_0x3769x10[_0xeea1[30]][_0xeea1[33]]|| null:null,limit:_0x3769x10[_0xeea1[30]]?_0x3769x10[_0xeea1[30]][_0xeea1[34]]|| null:null,include:_0x3769x10[_0xeea1[30]]?(_0x3769x10[_0xeea1[30]][_0xeea1[35]]?_[_0xeea1[38]](_0x3769x10[_0xeea1[30]][_0xeea1[35]],function(_0x3769x16){return {model:db[_0x3769x16[_0xeea1[36]]],as:_0x3769x16[_0xeea1[37]],attributes:_0x3769x16[_0xeea1[33]],include:_0x3769x16[_0xeea1[35]]?_[_0xeea1[38]](_0x3769x16[_0xeea1[35]],function(_0x3769x17){return {model:db[_0x3769x17[_0xeea1[36]]],as:_0x3769x17[_0xeea1[37]],attributes:_0x3769x17[_0xeea1[33]],include:_0x3769x17[_0xeea1[35]]?_[_0xeea1[38]](_0x3769x17[_0xeea1[35]],function(_0x3769x18){return {model:db[_0x3769x18[_0xeea1[36]]],as:_0x3769x18[_0xeea1[37]],attributes:_0x3769x18[_0xeea1[33]]}}):[]}}):[]}}):[]):[]})[_0xeea1[27]](function(_0x3769x14){logger[_0xeea1[20]](_0xeea1[29],_0x3769x10);logger[_0xeea1[23]](_0xeea1[29],_0x3769x10,JSON[_0xeea1[22]](_0x3769x14));_0x3769x11(_0x3769x14)})[_0xeea1[18]](function(_0x3769x13){logger[_0xeea1[17]](_0xeea1[29],_0x3769x13[_0xeea1[25]],_0x3769x10);_0x3769x12(_0x3769x15[_0xeea1[17]](500,_0x3769x13[_0xeea1[25]]))})})};exports[_0xeea1[41]]= function(_0x3769x10){var _0x3769x15=this;return  new Promise(function(_0x3769x11,_0x3769x12){return db[_0xeea1[40]][_0xeea1[42]]({raw:_0x3769x10[_0xeea1[30]]?(_0x3769x10[_0xeea1[30]][_0xeea1[31]]=== undefined)?true:false:true,where:_0x3769x10[_0xeea1[30]]?_0x3769x10[_0xeea1[30]][_0xeea1[32]]|| null:null,attributes:_0x3769x10[_0xeea1[30]]?_0x3769x10[_0xeea1[30]][_0xeea1[33]]|| null:null,include:_0x3769x10[_0xeea1[30]]?(_0x3769x10[_0xeea1[30]][_0xeea1[35]]?_[_0xeea1[38]](_0x3769x10[_0xeea1[30]][_0xeea1[35]],function(_0x3769x16){return {model:db[_0x3769x16[_0xeea1[36]]],as:_0x3769x16[_0xeea1[37]],attributes:_0x3769x16[_0xeea1[33]],include:_0x3769x16[_0xeea1[35]]?_[_0xeea1[38]](_0x3769x16[_0xeea1[35]],function(_0x3769x17){return {model:db[_0x3769x17[_0xeea1[36]]],as:_0x3769x17[_0xeea1[37]],attributes:_0x3769x17[_0xeea1[33]],include:_0x3769x17[_0xeea1[35]]?_[_0xeea1[38]](_0x3769x17[_0xeea1[35]],function(_0x3769x18){return {model:db[_0x3769x18[_0xeea1[36]]],as:_0x3769x18[_0xeea1[37]],attributes:_0x3769x18[_0xeea1[33]]}}):[]}}):[]}}):[]):[]})[_0xeea1[27]](function(_0x3769x14){logger[_0xeea1[20]](_0xeea1[41],_0x3769x10);logger[_0xeea1[23]](_0xeea1[41],_0x3769x10,JSON[_0xeea1[22]](_0x3769x14));_0x3769x11(_0x3769x14)})[_0xeea1[18]](function(_0x3769x13){logger[_0xeea1[17]](_0xeea1[41],_0x3769x13[_0xeea1[25]],_0x3769x10);_0x3769x12(_0x3769x15[_0xeea1[17]](500,_0x3769x13[_0xeea1[25]]))})})};exports[_0xeea1[43]]= function(_0x3769x10){var _0x3769x15=this;return  new Promise(function(_0x3769x11,_0x3769x12){var _0x3769x19={body:_0x3769x10[_0xeea1[44]],channel:_0xeea1[45]};var _0x3769x1a=_[_0xeea1[53]](_[_0xeea1[48]](db[_0xeea1[47]][_0xeea1[46]]),[_0xeea1[49],_0xeea1[50],_0xeea1[51],_0xeea1[52]]);if(_0x3769x10[_0xeea1[44]][_0xeea1[54]]){delete _0x3769x10[_0xeea1[44]][_0xeea1[54]]};if(_[_0xeea1[56]](_0x3769x10[_0xeea1[44]][_0xeea1[55]])){return _0x3769x12(_0x3769x15[_0xeea1[17]](500,_0xeea1[57]))};if(_[_0xeea1[56]](_0x3769x10[_0xeea1[44]][_0xeea1[44]])|| _0x3769x10[_0xeea1[44]][_0xeea1[44]]=== _0xeea1[58]){return _0x3769x12(_0x3769x15[_0xeea1[17]](500,_0xeea1[59]))};if(_[_0xeea1[56]](_0x3769x10[_0xeea1[44]][_0xeea1[60]])){return _0x3769x12(_0x3769x15[_0xeea1[17]](500,_0xeea1[61]+ _0x3769x1a))};if(!_[_0xeea1[62]](_0x3769x1a,_0x3769x10[_0xeea1[44]][_0xeea1[60]])){return _0x3769x12(_0x3769x15[_0xeea1[17]](500,_0xeea1[63]+ _0x3769x1a))};var _0x3769x1b={};_0x3769x1b[_0x3769x10[_0xeea1[44]][_0xeea1[60]]]= _0x3769x10[_0xeea1[44]][_0xeea1[55]];return db[_0xeea1[40]][_0xeea1[42]]({where:{id:_0x3769x10[_0xeea1[70]][_0xeea1[54]]},include:[{model:db[_0xeea1[116]],as:_0xeea1[102],include:[{model:db[_0xeea1[47]],as:_0xeea1[113],where:_0x3769x1b,limit:1,order:[[_0xeea1[50],_0xeea1[117]]]}]},{model:db[_0xeea1[118]],as:_0xeea1[103]},{model:db[_0xeea1[119]],as:_0xeea1[120]}]})[_0xeea1[27]](function(_0x3769x1c){if(_0x3769x1c&& _0x3769x1c[_0xeea1[102]]){var _0x3769x21=_0x3769x1c[_0xeea1[93]]({plain:true});_0x3769x19[_0xeea1[70]]= _[_0xeea1[104]](_0x3769x21,[_0xeea1[103],_0xeea1[102]]);_0x3769x19[_0xeea1[73]]= _0x3769x21[_0xeea1[103]];_0x3769x19[_0xeea1[105]]= _0x3769x21[_0xeea1[102]];_0x3769x19[_0xeea1[73]]= _[_0xeea1[108]](_0x3769x19[_0xeea1[73]],[_0xeea1[106]],[_0xeea1[107]]);if(_0x3769x19[_0xeea1[70]]&& _0x3769x19[_0xeea1[70]][_0xeea1[109]]){_0x3769x19[_0xeea1[73]][_0xeea1[112]]({id:0,priority:_0x3769x19[_0xeea1[73]][_0xeea1[110]]+ 1,app:_0xeea1[111],appdata:_0xeea1[109],interval:_0xeea1[71]})};if(_0x3769x19[_0xeea1[70]][_0xeea1[103]]){delete _0x3769x19[_0xeea1[70]][_0xeea1[103]]};if(_0x3769x19[_0xeea1[70]][_0xeea1[102]]){delete _0x3769x19[_0xeea1[70]][_0xeea1[102]]};if(_0x3769x21[_0xeea1[102]][_0xeea1[113]][_0xeea1[110]]){return _0x3769x21[_0xeea1[102]][_0xeea1[113]][0]};var _0x3769x22=_[_0xeea1[114]](_0x3769x10[_0xeea1[44]],{firstName:_0x3769x10[_0xeea1[44]][_0xeea1[55]],phone:_0x3769x10[_0xeea1[44]][_0xeea1[55]],ListId:_0x3769x21[_0xeea1[52]]});_0x3769x22[_0x3769x10[_0xeea1[44]][_0xeea1[60]]]= _0x3769x10[_0xeea1[44]][_0xeea1[55]];return db[_0xeea1[47]][_0xeea1[88]](_0x3769x22)}else {throw  new Error(_0xeea1[115])}})[_0xeea1[27]](function(_0x3769x1c){_0x3769x19[_0xeea1[79]]= _0x3769x1c;if(_0x3769x1c){if(!_0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[80]]){_0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[80]]= rs[_0xeea1[96]]()+ _0xeea1[97]+ _0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[55]]};var _0x3769x20={ContactId:_0x3769x1c[_0xeea1[54]],MailAccountId:_0x3769x10[_0xeea1[70]][_0xeea1[54]],inReplyTo:_0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[80]],to:_0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[55]],cc:_0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[82]],subject:_0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[83]],attach:_0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[84]],lastMsgAt:moment()[_0xeea1[91]](_0xeea1[90]),lastMsgDirection:_0xeea1[78],lastMsgBody:_0x3769x10[_0xeea1[44]][_0xeea1[44]]};return db[_0xeea1[98]][_0xeea1[42]]({where:{closed:false,MailAccountId:_0x3769x10[_0xeea1[70]][_0xeea1[54]]},include:[{model:db[_0xeea1[89]],as:_0xeea1[99],attributes:[_0xeea1[80]],where:{messageId:_0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[100]]}}]})[_0xeea1[27]](function(_0x3769x1f){if(_0x3769x1f){return [_0x3769x1f,false]};return db[_0xeea1[98]][_0xeea1[88]](_0x3769x20)[_0xeea1[27]](function(_0x3769x1f){return [_0x3769x1f,true]})})}else {throw  new Error(_0xeea1[101])}})[_0xeea1[95]](function(_0x3769x1c,_0x3769x1e){if(_0x3769x1c){if(!_0x3769x1e){return _0x3769x1c[_0xeea1[92]]({inReplyTo:_0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[80]],to:_0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[55]],cc:_0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[82]],subject:_0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[83]],attach:_0x3769x1c[_0xeea1[84]]?_0x3769x1c[_0xeea1[84]]:_0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[84]],substatus:null,substatusAt:moment()[_0xeea1[91]](_0xeea1[90]),lastMsgAt:moment()[_0xeea1[91]](_0xeea1[90]),lastMsgDirection:_0xeea1[78],lastMsgBody:_0x3769x10[_0xeea1[44]][_0xeea1[44]]})};var _0x3769x1f=_0x3769x1c[_0xeea1[93]]({plain:true});_0x3769x1f[_0xeea1[94]]= true;return _0x3769x1f}})[_0xeea1[27]](function(_0x3769x1c){logger[_0xeea1[20]](_0xeea1[77],JSON[_0xeea1[22]](_0x3769x1c));_0x3769x19[_0xeea1[65]]= _0x3769x1c;return db[_0xeea1[89]][_0xeea1[88]]({body:_0x3769x10[_0xeea1[44]][_0xeea1[44]],MailAccountId:_0x3769x10[_0xeea1[70]][_0xeea1[54]],MailInteractionId:_0x3769x1c[_0xeea1[54]],direction:_0xeea1[78],ContactId:_0x3769x19[_0xeea1[79]][_0xeea1[54]],messageId:_0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[80]],from:_0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[55]],to:_0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[81]],cc:_0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[82]],subject:_0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[83]],attach:_0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[84]],Attachments:_0x3769x10[_0xeea1[44]][_0xeea1[25]][_0xeea1[85]]},{include:[{model:db[_0xeea1[86]],as:_0xeea1[87]}]})})[_0xeea1[27]](function(_0x3769x1c){_0x3769x19[_0xeea1[25]]= _0x3769x1c;if(_0x3769x19[_0xeea1[65]][_0xeea1[64]]){return db[_0xeea1[76]][_0xeea1[42]]({attributes:[_0xeea1[54],_0xeea1[67]],where:{id:_0x3769x19[_0xeea1[65]][_0xeea1[64]]}})[_0xeea1[27]](function(_0x3769x1d){if(_0x3769x1d){_0x3769x19[_0xeea1[73]][_0xeea1[72]]({id:0,priority:0,app:_0xeea1[66],appdata:_0x3769x1d[_0xeea1[67]]+ _0xeea1[68]+ (_0x3769x19[_0xeea1[70]][_0xeea1[69]]|| 10),interval:_0xeea1[71]})};return respondWithRpcPromise(_0xeea1[74],_0xeea1[75],_0x3769x19)})};return respondWithRpcPromise(_0xeea1[74],_0xeea1[75],_0x3769x19)})[_0xeea1[27]](function(_0x3769x1c){_0x3769x11(_0x3769x1c)})[_0xeea1[18]](function(_0x3769x13){_0x3769x12(_0x3769x15[_0xeea1[17]](500,_0x3769x13[_0xeea1[25]]))})})}
\ No newline at end of file
+var _0x9cf5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x53\x68\x6F\x77\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x66\x69\x6E\x64","\x4E\x6F\x74\x69\x66\x79\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x62\x6F\x64\x79","\x6D\x61\x69\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x6B\x65\x79\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x4C\x69\x73\x74\x49\x64","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65","\x69\x64","\x66\x72\x6F\x6D","\x69\x73\x4E\x69\x6C","\x66\x72\x6F\x6D\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","","\x62\x6F\x64\x79\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x20\x61\x6E\x64\x20\x6E\x6F\x74\x20\x65\x6D\x70\x74\x79","\x6D\x61\x70\x4B\x65\x79","\x6D\x61\x70\x4B\x65\x79\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x6D\x61\x70\x4B\x65\x79\x20\x69\x6E\x76\x61\x6C\x69\x64\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x55\x73\x65\x72\x49\x64","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x2C","\x77\x61\x69\x74\x46\x6F\x72\x54\x68\x65\x41\x73\x73\x69\x67\x6E\x65\x64\x41\x67\x65\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x75\x6E\x73\x68\x69\x66\x74","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x53\x74\x61\x72\x74","\x73\x74\x61\x72\x74\x52\x6F\x75\x74\x69\x6E\x67","\x55\x73\x65\x72","\x25\x73","\x69\x6E","\x63\x6F\x6E\x74\x61\x63\x74","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x74\x6F","\x63\x63","\x73\x75\x62\x6A\x65\x63\x74","\x61\x74\x74\x61\x63\x68","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x75\x70\x64\x61\x74\x65","\x67\x65\x74","\x63\x72\x65\x61\x74\x65\x64","\x73\x70\x72\x65\x61\x64","\x67\x65\x6E\x65\x72\x61\x74\x65","\x20","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x4D\x65\x73\x73\x61\x67\x65\x73","\x69\x6E\x52\x65\x70\x6C\x79\x54\x6F","\x43\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x4C\x69\x73\x74","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6F\x6D\x69\x74","\x6C\x69\x73\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x61\x73\x63","\x6F\x72\x64\x65\x72\x42\x79","\x61\x75\x74\x6F\x63\x6C\x6F\x73\x65","\x6C\x65\x6E\x67\x74\x68","\x63\x6C\x6F\x73\x65","\x70\x75\x73\x68","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x64\x65\x66\x61\x75\x6C\x74\x73","\x4C\x69\x73\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x43\x6D\x4C\x69\x73\x74","\x44\x45\x53\x43","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x53\x6D\x74\x70"];_0x9cf5[0];var _=require(_0x9cf5[1]);var util=require(_0x9cf5[2]);var moment=require(_0x9cf5[3]);var BPromise=require(_0x9cf5[4]);var rs=require(_0x9cf5[5]);var fs=require(_0x9cf5[6]);var db=require(_0x9cf5[8])[_0x9cf5[7]];var utils=require(_0x9cf5[9]);var logger=require(_0x9cf5[11])(_0x9cf5[10]);var config=require(_0x9cf5[12]);var jayson=require(_0x9cf5[13]);var client=jayson[_0x9cf5[15]][_0x9cf5[14]]({port:9004});function respondWithRpcPromise(_0xd738xe,_0xd738xf,_0xd738x10){return  new BPromise(function(_0xd738x11,_0xd738x12){return client[_0x9cf5[28]](_0xd738xe,_0xd738x10)[_0x9cf5[27]](function(_0xd738x14){logger[_0x9cf5[20]](_0x9cf5[16],_0xd738xf,_0x9cf5[19]);logger[_0x9cf5[23]](_0x9cf5[21],_0xd738xf,_0x9cf5[19],JSON[_0x9cf5[22]](_0xd738x14));if(_0xd738x14[_0x9cf5[17]]){if(_0xd738x14[_0x9cf5[17]][_0x9cf5[24]]=== 500){logger[_0x9cf5[17]](_0x9cf5[16],_0xd738xf,_0xd738x14[_0x9cf5[17]][_0x9cf5[25]]);return _0xd738x12(_0xd738x14[_0x9cf5[17]][_0x9cf5[25]])};logger[_0x9cf5[17]](_0x9cf5[16],_0xd738xf,_0xd738x14[_0x9cf5[17]][_0x9cf5[25]]);return _0xd738x11(_0xd738x14[_0x9cf5[17]][_0x9cf5[25]])}else {logger[_0x9cf5[20]](_0x9cf5[16],_0xd738xf,_0x9cf5[19]);_0xd738x11(_0xd738x14[_0x9cf5[26]][_0x9cf5[25]])}})[_0x9cf5[18]](function(_0xd738x13){logger[_0x9cf5[17]](_0x9cf5[16],_0xd738xf,_0xd738x13);_0xd738x12(_0xd738x13)})})}exports[_0x9cf5[29]]= function(_0xd738x10){var _0xd738x15=this;return  new Promise(function(_0xd738x11,_0xd738x12){return db[_0x9cf5[40]][_0x9cf5[39]]({raw:_0xd738x10[_0x9cf5[30]]?(_0xd738x10[_0x9cf5[30]][_0x9cf5[31]]=== undefined)?true:false:true,where:_0xd738x10[_0x9cf5[30]]?_0xd738x10[_0x9cf5[30]][_0x9cf5[32]]|| null:null,attributes:_0xd738x10[_0x9cf5[30]]?_0xd738x10[_0x9cf5[30]][_0x9cf5[33]]|| null:null,limit:_0xd738x10[_0x9cf5[30]]?_0xd738x10[_0x9cf5[30]][_0x9cf5[34]]|| null:null,include:_0xd738x10[_0x9cf5[30]]?(_0xd738x10[_0x9cf5[30]][_0x9cf5[35]]?_[_0x9cf5[38]](_0xd738x10[_0x9cf5[30]][_0x9cf5[35]],function(_0xd738x16){return {model:db[_0xd738x16[_0x9cf5[36]]],as:_0xd738x16[_0x9cf5[37]],attributes:_0xd738x16[_0x9cf5[33]],include:_0xd738x16[_0x9cf5[35]]?_[_0x9cf5[38]](_0xd738x16[_0x9cf5[35]],function(_0xd738x17){return {model:db[_0xd738x17[_0x9cf5[36]]],as:_0xd738x17[_0x9cf5[37]],attributes:_0xd738x17[_0x9cf5[33]],include:_0xd738x17[_0x9cf5[35]]?_[_0x9cf5[38]](_0xd738x17[_0x9cf5[35]],function(_0xd738x18){return {model:db[_0xd738x18[_0x9cf5[36]]],as:_0xd738x18[_0x9cf5[37]],attributes:_0xd738x18[_0x9cf5[33]]}}):[]}}):[]}}):[]):[]})[_0x9cf5[27]](function(_0xd738x14){logger[_0x9cf5[20]](_0x9cf5[29],_0xd738x10);logger[_0x9cf5[23]](_0x9cf5[29],_0xd738x10,JSON[_0x9cf5[22]](_0xd738x14));_0xd738x11(_0xd738x14)})[_0x9cf5[18]](function(_0xd738x13){logger[_0x9cf5[17]](_0x9cf5[29],_0xd738x13[_0x9cf5[25]],_0xd738x10);_0xd738x12(_0xd738x15[_0x9cf5[17]](500,_0xd738x13[_0x9cf5[25]]))})})};exports[_0x9cf5[41]]= function(_0xd738x10){var _0xd738x15=this;return  new Promise(function(_0xd738x11,_0xd738x12){return db[_0x9cf5[40]][_0x9cf5[42]]({raw:_0xd738x10[_0x9cf5[30]]?(_0xd738x10[_0x9cf5[30]][_0x9cf5[31]]=== undefined)?true:false:true,where:_0xd738x10[_0x9cf5[30]]?_0xd738x10[_0x9cf5[30]][_0x9cf5[32]]|| null:null,attributes:_0xd738x10[_0x9cf5[30]]?_0xd738x10[_0x9cf5[30]][_0x9cf5[33]]|| null:null,include:_0xd738x10[_0x9cf5[30]]?(_0xd738x10[_0x9cf5[30]][_0x9cf5[35]]?_[_0x9cf5[38]](_0xd738x10[_0x9cf5[30]][_0x9cf5[35]],function(_0xd738x16){return {model:db[_0xd738x16[_0x9cf5[36]]],as:_0xd738x16[_0x9cf5[37]],attributes:_0xd738x16[_0x9cf5[33]],include:_0xd738x16[_0x9cf5[35]]?_[_0x9cf5[38]](_0xd738x16[_0x9cf5[35]],function(_0xd738x17){return {model:db[_0xd738x17[_0x9cf5[36]]],as:_0xd738x17[_0x9cf5[37]],attributes:_0xd738x17[_0x9cf5[33]],include:_0xd738x17[_0x9cf5[35]]?_[_0x9cf5[38]](_0xd738x17[_0x9cf5[35]],function(_0xd738x18){return {model:db[_0xd738x18[_0x9cf5[36]]],as:_0xd738x18[_0x9cf5[37]],attributes:_0xd738x18[_0x9cf5[33]]}}):[]}}):[]}}):[]):[]})[_0x9cf5[27]](function(_0xd738x14){logger[_0x9cf5[20]](_0x9cf5[41],_0xd738x10);logger[_0x9cf5[23]](_0x9cf5[41],_0xd738x10,JSON[_0x9cf5[22]](_0xd738x14));_0xd738x11(_0xd738x14)})[_0x9cf5[18]](function(_0xd738x13){logger[_0x9cf5[17]](_0x9cf5[41],_0xd738x13[_0x9cf5[25]],_0xd738x10);_0xd738x12(_0xd738x15[_0x9cf5[17]](500,_0xd738x13[_0x9cf5[25]]))})})};exports[_0x9cf5[43]]= function(_0xd738x10){var _0xd738x15=this;return  new Promise(function(_0xd738x11,_0xd738x12){var _0xd738x19={body:_0xd738x10[_0x9cf5[44]],channel:_0x9cf5[45]};var _0xd738x1a=_[_0x9cf5[53]](_[_0x9cf5[48]](db[_0x9cf5[47]][_0x9cf5[46]]),[_0x9cf5[49],_0x9cf5[50],_0x9cf5[51],_0x9cf5[52]]);if(_0xd738x10[_0x9cf5[44]][_0x9cf5[54]]){delete _0xd738x10[_0x9cf5[44]][_0x9cf5[54]]};if(_[_0x9cf5[56]](_0xd738x10[_0x9cf5[44]][_0x9cf5[55]])){return _0xd738x12(_0xd738x15[_0x9cf5[17]](500,_0x9cf5[57]))};if(_[_0x9cf5[56]](_0xd738x10[_0x9cf5[44]][_0x9cf5[44]])|| _0xd738x10[_0x9cf5[44]][_0x9cf5[44]]=== _0x9cf5[58]){return _0xd738x12(_0xd738x15[_0x9cf5[17]](500,_0x9cf5[59]))};if(_[_0x9cf5[56]](_0xd738x10[_0x9cf5[44]][_0x9cf5[60]])){return _0xd738x12(_0xd738x15[_0x9cf5[17]](500,_0x9cf5[61]+ _0xd738x1a))};if(!_[_0x9cf5[62]](_0xd738x1a,_0xd738x10[_0x9cf5[44]][_0x9cf5[60]])){return _0xd738x12(_0xd738x15[_0x9cf5[17]](500,_0x9cf5[63]+ _0xd738x1a))};var _0xd738x1b={};_0xd738x1b[_0xd738x10[_0x9cf5[44]][_0x9cf5[60]]]= _0xd738x10[_0x9cf5[44]][_0x9cf5[55]];return db[_0x9cf5[40]][_0x9cf5[42]]({where:{id:_0xd738x10[_0x9cf5[70]][_0x9cf5[54]]},include:[{model:db[_0x9cf5[116]],as:_0x9cf5[102],include:[{model:db[_0x9cf5[47]],as:_0x9cf5[113],where:_0xd738x1b,limit:1,order:[[_0x9cf5[50],_0x9cf5[117]]]}]},{model:db[_0x9cf5[118]],as:_0x9cf5[103]},{model:db[_0x9cf5[119]],as:_0x9cf5[120]}]})[_0x9cf5[27]](function(_0xd738x1c){if(_0xd738x1c&& _0xd738x1c[_0x9cf5[102]]){var _0xd738x21=_0xd738x1c[_0x9cf5[93]]({plain:true});_0xd738x19[_0x9cf5[70]]= _[_0x9cf5[104]](_0xd738x21,[_0x9cf5[103],_0x9cf5[102]]);_0xd738x19[_0x9cf5[73]]= _0xd738x21[_0x9cf5[103]];_0xd738x19[_0x9cf5[105]]= _0xd738x21[_0x9cf5[102]];_0xd738x19[_0x9cf5[73]]= _[_0x9cf5[108]](_0xd738x19[_0x9cf5[73]],[_0x9cf5[106]],[_0x9cf5[107]]);if(_0xd738x19[_0x9cf5[70]]&& _0xd738x19[_0x9cf5[70]][_0x9cf5[109]]){_0xd738x19[_0x9cf5[73]][_0x9cf5[112]]({id:0,priority:_0xd738x19[_0x9cf5[73]][_0x9cf5[110]]+ 1,app:_0x9cf5[111],appdata:_0x9cf5[109],interval:_0x9cf5[71]})};if(_0xd738x19[_0x9cf5[70]][_0x9cf5[103]]){delete _0xd738x19[_0x9cf5[70]][_0x9cf5[103]]};if(_0xd738x19[_0x9cf5[70]][_0x9cf5[102]]){delete _0xd738x19[_0x9cf5[70]][_0x9cf5[102]]};if(_0xd738x21[_0x9cf5[102]][_0x9cf5[113]][_0x9cf5[110]]){return _0xd738x21[_0x9cf5[102]][_0x9cf5[113]][0]};var _0xd738x22=_[_0x9cf5[114]](_0xd738x10[_0x9cf5[44]],{firstName:_0xd738x10[_0x9cf5[44]][_0x9cf5[55]],phone:_0xd738x10[_0x9cf5[44]][_0x9cf5[55]],ListId:_0xd738x21[_0x9cf5[52]]});_0xd738x22[_0xd738x10[_0x9cf5[44]][_0x9cf5[60]]]= _0xd738x10[_0x9cf5[44]][_0x9cf5[55]];return db[_0x9cf5[47]][_0x9cf5[88]](_0xd738x22)}else {throw  new Error(_0x9cf5[115])}})[_0x9cf5[27]](function(_0xd738x1c){_0xd738x19[_0x9cf5[79]]= _0xd738x1c;if(_0xd738x1c){if(!_0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[80]]){_0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[80]]= rs[_0x9cf5[96]]()+ _0x9cf5[97]+ _0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[55]]};var _0xd738x20={ContactId:_0xd738x1c[_0x9cf5[54]],MailAccountId:_0xd738x10[_0x9cf5[70]][_0x9cf5[54]],inReplyTo:_0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[80]],to:_0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[55]],cc:_0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[82]],subject:_0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[83]],attach:_0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[84]],lastMsgAt:moment()[_0x9cf5[91]](_0x9cf5[90]),lastMsgDirection:_0x9cf5[78],lastMsgBody:_0xd738x10[_0x9cf5[44]][_0x9cf5[44]]};return db[_0x9cf5[98]][_0x9cf5[42]]({where:{closed:false,MailAccountId:_0xd738x10[_0x9cf5[70]][_0x9cf5[54]]},include:[{model:db[_0x9cf5[89]],as:_0x9cf5[99],attributes:[_0x9cf5[80]],where:{messageId:_0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[100]]}}]})[_0x9cf5[27]](function(_0xd738x1f){if(_0xd738x1f){return [_0xd738x1f,false]};return db[_0x9cf5[98]][_0x9cf5[88]](_0xd738x20)[_0x9cf5[27]](function(_0xd738x1f){return [_0xd738x1f,true]})})}else {throw  new Error(_0x9cf5[101])}})[_0x9cf5[95]](function(_0xd738x1c,_0xd738x1e){if(_0xd738x1c){if(!_0xd738x1e){return _0xd738x1c[_0x9cf5[92]]({inReplyTo:_0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[80]],to:_0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[55]],cc:_0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[82]],subject:_0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[83]],attach:_0xd738x1c[_0x9cf5[84]]?_0xd738x1c[_0x9cf5[84]]:_0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[84]],substatus:null,substatusAt:moment()[_0x9cf5[91]](_0x9cf5[90]),lastMsgAt:moment()[_0x9cf5[91]](_0x9cf5[90]),lastMsgDirection:_0x9cf5[78],lastMsgBody:_0xd738x10[_0x9cf5[44]][_0x9cf5[44]]})};var _0xd738x1f=_0xd738x1c[_0x9cf5[93]]({plain:true});_0xd738x1f[_0x9cf5[94]]= true;return _0xd738x1f}})[_0x9cf5[27]](function(_0xd738x1c){logger[_0x9cf5[20]](_0x9cf5[77],JSON[_0x9cf5[22]](_0xd738x1c));_0xd738x19[_0x9cf5[65]]= _0xd738x1c;return db[_0x9cf5[89]][_0x9cf5[88]]({body:_0xd738x10[_0x9cf5[44]][_0x9cf5[44]],MailAccountId:_0xd738x10[_0x9cf5[70]][_0x9cf5[54]],MailInteractionId:_0xd738x1c[_0x9cf5[54]],direction:_0x9cf5[78],ContactId:_0xd738x19[_0x9cf5[79]][_0x9cf5[54]],messageId:_0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[80]],from:_0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[55]],to:_0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[81]],cc:_0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[82]],subject:_0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[83]],attach:_0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[84]],Attachments:_0xd738x10[_0x9cf5[44]][_0x9cf5[25]][_0x9cf5[85]]},{include:[{model:db[_0x9cf5[86]],as:_0x9cf5[87]}]})})[_0x9cf5[27]](function(_0xd738x1c){_0xd738x19[_0x9cf5[25]]= _0xd738x1c;if(_0xd738x19[_0x9cf5[65]][_0x9cf5[64]]){return db[_0x9cf5[76]][_0x9cf5[42]]({attributes:[_0x9cf5[54],_0x9cf5[67]],where:{id:_0xd738x19[_0x9cf5[65]][_0x9cf5[64]]}})[_0x9cf5[27]](function(_0xd738x1d){if(_0xd738x1d){_0xd738x19[_0x9cf5[73]][_0x9cf5[72]]({id:0,priority:0,app:_0x9cf5[66],appdata:_0xd738x1d[_0x9cf5[67]]+ _0x9cf5[68]+ (_0xd738x19[_0x9cf5[70]][_0x9cf5[69]]|| 10),interval:_0x9cf5[71]})};return respondWithRpcPromise(_0x9cf5[74],_0x9cf5[75],_0xd738x19)})};return respondWithRpcPromise(_0x9cf5[74],_0x9cf5[75],_0xd738x19)})[_0x9cf5[27]](function(_0xd738x1c){_0xd738x11(_0xd738x1c)})[_0x9cf5[18]](function(_0xd738x13){_0xd738x12(_0xd738x15[_0x9cf5[17]](500,_0xd738x13[_0x9cf5[25]]))})})}
\ No newline at end of file
index d00bdd4..d5d8b53 100644 (file)
@@ -1 +1 @@
-var _0x4230=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x73\x68\x6F\x77","\x67\x65\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4230[0];var multer=require(_0x4230[1]);var util=require(_0x4230[2]);var path=require(_0x4230[3]);var express=require(_0x4230[4]);var router=express.Router();var auth=require(_0x4230[5]);var interaction=require(_0x4230[6]);var config=require(_0x4230[7]);var controller=require(_0x4230[8]);router[_0x4230[12]](_0x4230[9],auth[_0x4230[10]](),controller[_0x4230[11]]);router[_0x4230[14]](_0x4230[9],auth[_0x4230[10]](),controller[_0x4230[13]]);router[_0x4230[16]](_0x4230[9],auth[_0x4230[10]](),controller[_0x4230[15]]);module[_0x4230[17]]= router
\ No newline at end of file
+var _0x5891=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x73\x68\x6F\x77","\x67\x65\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x5891[0];var multer=require(_0x5891[1]);var util=require(_0x5891[2]);var path=require(_0x5891[3]);var express=require(_0x5891[4]);var router=express.Router();var auth=require(_0x5891[5]);var interaction=require(_0x5891[6]);var config=require(_0x5891[7]);var controller=require(_0x5891[8]);router[_0x5891[12]](_0x5891[9],auth[_0x5891[10]](),controller[_0x5891[11]]);router[_0x5891[14]](_0x5891[9],auth[_0x5891[10]](),controller[_0x5891[13]]);router[_0x5891[16]](_0x5891[9],auth[_0x5891[10]](),controller[_0x5891[15]]);module[_0x5891[17]]= router
\ No newline at end of file
index 33fabe1..bde7eb9 100644 (file)
@@ -1 +1 @@
-var _0x2d4b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x6E\x6F\x6F\x70","","\x2A\x2C\x2A\x2C\x2A\x2C\x2A"];_0x2d4b[0];var Sequelize=require(_0x2d4b[1]);module[_0x2d4b[2]]= {priority:{type:Sequelize[_0x2d4b[3]],allowNull:false},app:{type:Sequelize[_0x2d4b[4]],allowNull:false,defaultValue:_0x2d4b[5]},appdata:{type:Sequelize.STRING(4096),defaultValue:_0x2d4b[6]},description:{type:Sequelize[_0x2d4b[4]]},interval:{type:Sequelize[_0x2d4b[4]],defaultValue:_0x2d4b[7]}}
\ No newline at end of file
+var _0x8578=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x6E\x6F\x6F\x70","","\x2A\x2C\x2A\x2C\x2A\x2C\x2A"];_0x8578[0];var Sequelize=require(_0x8578[1]);module[_0x8578[2]]= {priority:{type:Sequelize[_0x8578[3]],allowNull:false},app:{type:Sequelize[_0x8578[4]],allowNull:false,defaultValue:_0x8578[5]},appdata:{type:Sequelize.STRING(4096),defaultValue:_0x8578[6]},description:{type:Sequelize[_0x8578[4]]},interval:{type:Sequelize[_0x8578[4]],defaultValue:_0x8578[7]}}
\ No newline at end of file
index 7b7e2f5..2a24edd 100644 (file)
@@ -1 +1 @@
-var _0x7588=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64","\x62\x6F\x64\x79"];_0x7588[0];var jsonpatch=require(_0x7588[1]);var rp=require(_0x7588[2]);var moment=require(_0x7588[3]);var BPromise=require(_0x7588[4]);var Mustache=require(_0x7588[5]);var util=require(_0x7588[6]);var path=require(_0x7588[7]);var sox=require(_0x7588[8]);var csv=require(_0x7588[9]);var ejs=require(_0x7588[10]);var fs=require(_0x7588[11]);var _=require(_0x7588[12]);var squel=require(_0x7588[13]);var crypto=require(_0x7588[14]);var jsforce=require(_0x7588[15]);var deskjs=require(_0x7588[16]);var toCsv=require(_0x7588[9]);var querystring=require(_0x7588[17]);var Papa=require(_0x7588[18]);var qs=require(_0x7588[19]);var logger=require(_0x7588[21])(_0x7588[20]);var utils=require(_0x7588[22]);var config=require(_0x7588[23]);var db=require(_0x7588[25])[_0x7588[24]];function respondWithStatusCode(_0xa031x1a,_0xa031x1b){_0xa031x1b= _0xa031x1b|| 204;return function(_0xa031x1c){if(_0xa031x1c){return _0xa031x1a[_0x7588[26]](_0xa031x1b)};return _0xa031x1a[_0x7588[28]](_0xa031x1b)[_0x7588[27]]()}}function respondWithResult(_0xa031x1a,_0xa031x1b){_0xa031x1b= _0xa031x1b|| 200;return function(_0xa031x1c){if(_0xa031x1c){return _0xa031x1a[_0x7588[28]](_0xa031x1b)[_0x7588[29]](_0xa031x1c)}}}function respondWithFilteredResult(_0xa031x1a,_0xa031x1f){return function(_0xa031x1c){if(_0xa031x1c){var _0xa031x20=_0xa031x1c[_0x7588[30]],_0xa031x21=_0xa031x1f[_0x7588[31]],_0xa031x22=_0xa031x1f[_0x7588[31]]+ _0xa031x1f[_0x7588[32]],_0xa031x1b;if(_0xa031x22>= _0xa031x20){_0xa031x22= _0xa031x20;_0xa031x1b= 200}else {_0xa031x1b= 206};_0xa031x1a[_0x7588[28]](_0xa031x1b);return _0xa031x1a[_0x7588[36]](_0x7588[33],_0xa031x21+ _0x7588[34]+ _0xa031x22+ _0x7588[35]+ _0xa031x20)[_0x7588[29]](_0xa031x1c)};return null}}function patchUpdates(_0xa031x24){return function(_0xa031x1c){try{jsonpatch[_0x7588[37]](_0xa031x1c,_0xa031x24,true)}catch(err){return BPromise[_0x7588[38]](err)};return _0xa031x1c[_0x7588[39]]()}}function saveUpdates(_0xa031x26,_0xa031x1b){return function(_0xa031x1c){if(_0xa031x1c){return _0xa031x1c[_0x7588[41]](_0xa031x26)[_0x7588[40]](function(_0xa031x27){return _0xa031x27})};return null}}function removeEntity(_0xa031x1a,_0xa031x1b){return function(_0xa031x1c){if(_0xa031x1c){return _0xa031x1c[_0x7588[42]]()[_0x7588[40]](function(){_0xa031x1a[_0x7588[28]](204)[_0x7588[27]]()})}}}function handleEntityNotFound(_0xa031x1a,_0xa031x1b){return function(_0xa031x1c){if(!_0xa031x1c){_0xa031x1a[_0x7588[26]](404)};return _0xa031x1c}}function handleError(_0xa031x1a,_0xa031x1b){_0xa031x1b= _0xa031x1b|| 500;return function(_0xa031x2b){logger[_0x7588[44]](_0xa031x2b[_0x7588[43]]);if(_0xa031x2b[_0x7588[45]]){delete _0xa031x2b[_0x7588[45]]};_0xa031x1a[_0x7588[28]](_0xa031x1b)[_0x7588[46]](_0xa031x2b)}}exports[_0x7588[47]]= function(_0xa031x2c,_0xa031x1a){var _0xa031x1f={raw:true,where:{id:_0xa031x2c[_0x7588[49]][_0x7588[48]]}},_0xa031x2d={};_0xa031x2d[_0x7588[50]]= _[_0x7588[53]](db[_0x7588[52]][_0x7588[51]]);_0xa031x2d[_0x7588[54]]= _[_0x7588[53]](_0xa031x2c[_0x7588[54]]);_0xa031x2d[_0x7588[55]]= _[_0x7588[56]](_0xa031x2d[_0x7588[50]],_0xa031x2d[_0x7588[54]]);_0xa031x1f[_0x7588[57]]= _[_0x7588[56]](_0xa031x2d[_0x7588[50]],qs[_0x7588[58]](_0xa031x2c[_0x7588[54]][_0x7588[58]]));_0xa031x1f[_0x7588[57]]= (_0xa031x1f[_0x7588[57]][_0x7588[59]])?_0xa031x1f[_0x7588[57]]:_0xa031x2d[_0x7588[50]];if(_0xa031x2c[_0x7588[54]][_0x7588[60]]){_0xa031x1f[_0x7588[61]]= [{all:true}]};_0xa031x1f= _[_0x7588[63]]({},_0xa031x1f,_0xa031x2c[_0x7588[62]]);return db[_0x7588[52]][_0x7588[65]](_0xa031x1f)[_0x7588[40]](handleEntityNotFound(_0xa031x1a,null))[_0x7588[40]](respondWithResult(_0xa031x1a,null))[_0x7588[64]](handleError(_0xa031x1a,null))};exports[_0x7588[41]]= function(_0xa031x2c,_0xa031x1a){if(_0xa031x2c[_0x7588[66]][_0x7588[48]]){delete _0xa031x2c[_0x7588[66]][_0x7588[48]]};return db[_0x7588[52]][_0x7588[65]]({where:{id:_0xa031x2c[_0x7588[49]][_0x7588[48]]}})[_0x7588[40]](handleEntityNotFound(_0xa031x1a,null))[_0x7588[40]](saveUpdates(_0xa031x2c[_0x7588[66]],null))[_0x7588[40]](respondWithResult(_0xa031x1a,null))[_0x7588[64]](handleError(_0xa031x1a,null))};exports[_0x7588[42]]= function(_0xa031x2c,_0xa031x1a){return db[_0x7588[52]][_0x7588[65]]({where:{id:_0xa031x2c[_0x7588[49]][_0x7588[48]]}})[_0x7588[40]](handleEntityNotFound(_0xa031x1a,null))[_0x7588[40]](removeEntity(_0xa031x1a,null))[_0x7588[64]](handleError(_0xa031x1a,null))}
\ No newline at end of file
+var _0x42f9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64","\x62\x6F\x64\x79"];_0x42f9[0];var jsonpatch=require(_0x42f9[1]);var rp=require(_0x42f9[2]);var moment=require(_0x42f9[3]);var BPromise=require(_0x42f9[4]);var Mustache=require(_0x42f9[5]);var util=require(_0x42f9[6]);var path=require(_0x42f9[7]);var sox=require(_0x42f9[8]);var csv=require(_0x42f9[9]);var ejs=require(_0x42f9[10]);var fs=require(_0x42f9[11]);var _=require(_0x42f9[12]);var squel=require(_0x42f9[13]);var crypto=require(_0x42f9[14]);var jsforce=require(_0x42f9[15]);var deskjs=require(_0x42f9[16]);var toCsv=require(_0x42f9[9]);var querystring=require(_0x42f9[17]);var Papa=require(_0x42f9[18]);var qs=require(_0x42f9[19]);var logger=require(_0x42f9[21])(_0x42f9[20]);var utils=require(_0x42f9[22]);var config=require(_0x42f9[23]);var db=require(_0x42f9[25])[_0x42f9[24]];function respondWithStatusCode(_0xafefx1a,_0xafefx1b){_0xafefx1b= _0xafefx1b|| 204;return function(_0xafefx1c){if(_0xafefx1c){return _0xafefx1a[_0x42f9[26]](_0xafefx1b)};return _0xafefx1a[_0x42f9[28]](_0xafefx1b)[_0x42f9[27]]()}}function respondWithResult(_0xafefx1a,_0xafefx1b){_0xafefx1b= _0xafefx1b|| 200;return function(_0xafefx1c){if(_0xafefx1c){return _0xafefx1a[_0x42f9[28]](_0xafefx1b)[_0x42f9[29]](_0xafefx1c)}}}function respondWithFilteredResult(_0xafefx1a,_0xafefx1f){return function(_0xafefx1c){if(_0xafefx1c){var _0xafefx20=_0xafefx1c[_0x42f9[30]],_0xafefx21=_0xafefx1f[_0x42f9[31]],_0xafefx22=_0xafefx1f[_0x42f9[31]]+ _0xafefx1f[_0x42f9[32]],_0xafefx1b;if(_0xafefx22>= _0xafefx20){_0xafefx22= _0xafefx20;_0xafefx1b= 200}else {_0xafefx1b= 206};_0xafefx1a[_0x42f9[28]](_0xafefx1b);return _0xafefx1a[_0x42f9[36]](_0x42f9[33],_0xafefx21+ _0x42f9[34]+ _0xafefx22+ _0x42f9[35]+ _0xafefx20)[_0x42f9[29]](_0xafefx1c)};return null}}function patchUpdates(_0xafefx24){return function(_0xafefx1c){try{jsonpatch[_0x42f9[37]](_0xafefx1c,_0xafefx24,true)}catch(err){return BPromise[_0x42f9[38]](err)};return _0xafefx1c[_0x42f9[39]]()}}function saveUpdates(_0xafefx26,_0xafefx1b){return function(_0xafefx1c){if(_0xafefx1c){return _0xafefx1c[_0x42f9[41]](_0xafefx26)[_0x42f9[40]](function(_0xafefx27){return _0xafefx27})};return null}}function removeEntity(_0xafefx1a,_0xafefx1b){return function(_0xafefx1c){if(_0xafefx1c){return _0xafefx1c[_0x42f9[42]]()[_0x42f9[40]](function(){_0xafefx1a[_0x42f9[28]](204)[_0x42f9[27]]()})}}}function handleEntityNotFound(_0xafefx1a,_0xafefx1b){return function(_0xafefx1c){if(!_0xafefx1c){_0xafefx1a[_0x42f9[26]](404)};return _0xafefx1c}}function handleError(_0xafefx1a,_0xafefx1b){_0xafefx1b= _0xafefx1b|| 500;return function(_0xafefx2b){logger[_0x42f9[44]](_0xafefx2b[_0x42f9[43]]);if(_0xafefx2b[_0x42f9[45]]){delete _0xafefx2b[_0x42f9[45]]};_0xafefx1a[_0x42f9[28]](_0xafefx1b)[_0x42f9[46]](_0xafefx2b)}}exports[_0x42f9[47]]= function(_0xafefx2c,_0xafefx1a){var _0xafefx1f={raw:true,where:{id:_0xafefx2c[_0x42f9[49]][_0x42f9[48]]}},_0xafefx2d={};_0xafefx2d[_0x42f9[50]]= _[_0x42f9[53]](db[_0x42f9[52]][_0x42f9[51]]);_0xafefx2d[_0x42f9[54]]= _[_0x42f9[53]](_0xafefx2c[_0x42f9[54]]);_0xafefx2d[_0x42f9[55]]= _[_0x42f9[56]](_0xafefx2d[_0x42f9[50]],_0xafefx2d[_0x42f9[54]]);_0xafefx1f[_0x42f9[57]]= _[_0x42f9[56]](_0xafefx2d[_0x42f9[50]],qs[_0x42f9[58]](_0xafefx2c[_0x42f9[54]][_0x42f9[58]]));_0xafefx1f[_0x42f9[57]]= (_0xafefx1f[_0x42f9[57]][_0x42f9[59]])?_0xafefx1f[_0x42f9[57]]:_0xafefx2d[_0x42f9[50]];if(_0xafefx2c[_0x42f9[54]][_0x42f9[60]]){_0xafefx1f[_0x42f9[61]]= [{all:true}]};_0xafefx1f= _[_0x42f9[63]]({},_0xafefx1f,_0xafefx2c[_0x42f9[62]]);return db[_0x42f9[52]][_0x42f9[65]](_0xafefx1f)[_0x42f9[40]](handleEntityNotFound(_0xafefx1a,null))[_0x42f9[40]](respondWithResult(_0xafefx1a,null))[_0x42f9[64]](handleError(_0xafefx1a,null))};exports[_0x42f9[41]]= function(_0xafefx2c,_0xafefx1a){if(_0xafefx2c[_0x42f9[66]][_0x42f9[48]]){delete _0xafefx2c[_0x42f9[66]][_0x42f9[48]]};return db[_0x42f9[52]][_0x42f9[65]]({where:{id:_0xafefx2c[_0x42f9[49]][_0x42f9[48]]}})[_0x42f9[40]](handleEntityNotFound(_0xafefx1a,null))[_0x42f9[40]](saveUpdates(_0xafefx2c[_0x42f9[66]],null))[_0x42f9[40]](respondWithResult(_0xafefx1a,null))[_0x42f9[64]](handleError(_0xafefx1a,null))};exports[_0x42f9[42]]= function(_0xafefx2c,_0xafefx1a){return db[_0x42f9[52]][_0x42f9[65]]({where:{id:_0xafefx2c[_0x42f9[49]][_0x42f9[48]]}})[_0x42f9[40]](handleEntityNotFound(_0xafefx1a,null))[_0x42f9[40]](removeEntity(_0xafefx1a,null))[_0x42f9[64]](handleError(_0xafefx1a,null))}
\ No newline at end of file
index a895f86..259a3d2 100644 (file)
@@ -1 +1 @@
-var _0xb8b3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xb8b3[0];var _=require(_0xb8b3[1]);var util=require(_0xb8b3[2]);var logger=require(_0xb8b3[4])(_0xb8b3[3]);var moment=require(_0xb8b3[5]);var BPromise=require(_0xb8b3[6]);var rp=require(_0xb8b3[7]);var attributes=require(_0xb8b3[8]);module[_0xb8b3[9]]= function(_0x5db9x8,_0x5db9x9){return _0x5db9x8[_0xb8b3[12]](_0xb8b3[10],attributes,{tableName:_0xb8b3[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xae52=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xae52[0];var _=require(_0xae52[1]);var util=require(_0xae52[2]);var logger=require(_0xae52[4])(_0xae52[3]);var moment=require(_0xae52[5]);var BPromise=require(_0xae52[6]);var rp=require(_0xae52[7]);var attributes=require(_0xae52[8]);module[_0xae52[9]]= function(_0x667bx8,_0x667bx9){return _0x667bx8[_0xae52[12]](_0xae52[10],attributes,{tableName:_0xae52[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index ae0b5d9..2355ba1 100644 (file)
@@ -1 +1 @@
-var _0x1261=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E"];_0x1261[0];var _=require(_0x1261[1]);var util=require(_0x1261[2]);var moment=require(_0x1261[3]);var BPromise=require(_0x1261[4]);var rs=require(_0x1261[5]);var fs=require(_0x1261[6]);var db=require(_0x1261[8])[_0x1261[7]];var utils=require(_0x1261[9]);var logger=require(_0x1261[11])(_0x1261[10]);var config=require(_0x1261[12]);var jayson=require(_0x1261[13]);var client=jayson[_0x1261[15]][_0x1261[14]]({port:9002});function respondWithRpcPromise(_0xc251xe,_0xc251xf,_0xc251x10){return  new BPromise(function(_0xc251x11,_0xc251x12){return client[_0x1261[28]](_0xc251xe,_0xc251x10)[_0x1261[27]](function(_0xc251x14){logger[_0x1261[20]](_0x1261[16],_0xc251xf,_0x1261[19]);logger[_0x1261[23]](_0x1261[21],_0xc251xf,_0x1261[19],JSON[_0x1261[22]](_0xc251x14));if(_0xc251x14[_0x1261[17]]){if(_0xc251x14[_0x1261[17]][_0x1261[24]]=== 500){logger[_0x1261[17]](_0x1261[16],_0xc251xf,_0xc251x14[_0x1261[17]][_0x1261[25]]);return _0xc251x12(_0xc251x14[_0x1261[17]][_0x1261[25]])};logger[_0x1261[17]](_0x1261[16],_0xc251xf,_0xc251x14[_0x1261[17]][_0x1261[25]]);return _0xc251x11(_0xc251x14[_0x1261[17]][_0x1261[25]])}else {logger[_0x1261[20]](_0x1261[16],_0xc251xf,_0x1261[19]);_0xc251x11(_0xc251x14[_0x1261[26]][_0x1261[25]])}})[_0x1261[18]](function(_0xc251x13){logger[_0x1261[17]](_0x1261[16],_0xc251xf,_0xc251x13);_0xc251x12(_0xc251x13)})})}exports[_0x1261[29]]= function(_0xc251x10){var _0xc251x15=this;return  new Promise(function(_0xc251x11,_0xc251x12){return db[_0x1261[37]][_0x1261[36]](_0xc251x10[_0x1261[30]],{raw:_0xc251x10[_0x1261[31]]?(_0xc251x10[_0x1261[31]][_0x1261[32]]=== undefined)?true:false:true,individualHooks:true,where:_0xc251x10[_0x1261[31]]?_0xc251x10[_0x1261[31]][_0x1261[33]]|| null:null,attributes:_0xc251x10[_0x1261[31]]?_0xc251x10[_0x1261[31]][_0x1261[34]]|| null:null,limit:_0xc251x10[_0x1261[31]]?_0xc251x10[_0x1261[31]][_0x1261[35]]|| null:null})[_0x1261[27]](function(_0xc251x14){logger[_0x1261[20]](_0x1261[29],_0xc251x10);logger[_0x1261[23]](_0x1261[29],_0xc251x10,JSON[_0x1261[22]](_0xc251x14));_0xc251x11(_0xc251x14)})[_0x1261[18]](function(_0xc251x13){logger[_0x1261[17]](_0x1261[29],_0xc251x13[_0x1261[25]],_0xc251x10);_0xc251x12(_0xc251x15[_0x1261[17]](500,_0xc251x13[_0x1261[25]]))})})}
\ No newline at end of file
+var _0x7217=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E"];_0x7217[0];var _=require(_0x7217[1]);var util=require(_0x7217[2]);var moment=require(_0x7217[3]);var BPromise=require(_0x7217[4]);var rs=require(_0x7217[5]);var fs=require(_0x7217[6]);var db=require(_0x7217[8])[_0x7217[7]];var utils=require(_0x7217[9]);var logger=require(_0x7217[11])(_0x7217[10]);var config=require(_0x7217[12]);var jayson=require(_0x7217[13]);var client=jayson[_0x7217[15]][_0x7217[14]]({port:9002});function respondWithRpcPromise(_0xc290xe,_0xc290xf,_0xc290x10){return  new BPromise(function(_0xc290x11,_0xc290x12){return client[_0x7217[28]](_0xc290xe,_0xc290x10)[_0x7217[27]](function(_0xc290x14){logger[_0x7217[20]](_0x7217[16],_0xc290xf,_0x7217[19]);logger[_0x7217[23]](_0x7217[21],_0xc290xf,_0x7217[19],JSON[_0x7217[22]](_0xc290x14));if(_0xc290x14[_0x7217[17]]){if(_0xc290x14[_0x7217[17]][_0x7217[24]]=== 500){logger[_0x7217[17]](_0x7217[16],_0xc290xf,_0xc290x14[_0x7217[17]][_0x7217[25]]);return _0xc290x12(_0xc290x14[_0x7217[17]][_0x7217[25]])};logger[_0x7217[17]](_0x7217[16],_0xc290xf,_0xc290x14[_0x7217[17]][_0x7217[25]]);return _0xc290x11(_0xc290x14[_0x7217[17]][_0x7217[25]])}else {logger[_0x7217[20]](_0x7217[16],_0xc290xf,_0x7217[19]);_0xc290x11(_0xc290x14[_0x7217[26]][_0x7217[25]])}})[_0x7217[18]](function(_0xc290x13){logger[_0x7217[17]](_0x7217[16],_0xc290xf,_0xc290x13);_0xc290x12(_0xc290x13)})})}exports[_0x7217[29]]= function(_0xc290x10){var _0xc290x15=this;return  new Promise(function(_0xc290x11,_0xc290x12){return db[_0x7217[37]][_0x7217[36]](_0xc290x10[_0x7217[30]],{raw:_0xc290x10[_0x7217[31]]?(_0xc290x10[_0x7217[31]][_0x7217[32]]=== undefined)?true:false:true,individualHooks:true,where:_0xc290x10[_0x7217[31]]?_0xc290x10[_0x7217[31]][_0x7217[33]]|| null:null,attributes:_0xc290x10[_0x7217[31]]?_0xc290x10[_0x7217[31]][_0x7217[34]]|| null:null,limit:_0xc290x10[_0x7217[31]]?_0xc290x10[_0x7217[31]][_0x7217[35]]|| null:null})[_0x7217[27]](function(_0xc290x14){logger[_0x7217[20]](_0x7217[29],_0xc290x10);logger[_0x7217[23]](_0x7217[29],_0xc290x10,JSON[_0x7217[22]](_0xc290x14));_0xc290x11(_0xc290x14)})[_0x7217[18]](function(_0xc290x13){logger[_0x7217[17]](_0x7217[29],_0xc290x13[_0x7217[25]],_0xc290x10);_0xc290x12(_0xc290x15[_0x7217[17]](500,_0xc290x13[_0x7217[25]]))})})}
\ No newline at end of file
index 2670ac5..b8d2a57 100644 (file)
@@ -1 +1 @@
-var _0xb356=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x73\x68\x6F\x77","\x67\x65\x74","\x2F","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xb356[0];var multer=require(_0xb356[1]);var util=require(_0xb356[2]);var path=require(_0xb356[3]);var express=require(_0xb356[4]);var router=express.Router();var auth=require(_0xb356[5]);var interaction=require(_0xb356[6]);var config=require(_0xb356[7]);var controller=require(_0xb356[8]);router[_0xb356[12]](_0xb356[9],auth[_0xb356[10]](),controller[_0xb356[11]]);router[_0xb356[15]](_0xb356[13],auth[_0xb356[10]](),controller[_0xb356[14]]);router[_0xb356[17]](_0xb356[9],auth[_0xb356[10]](),controller[_0xb356[16]]);router[_0xb356[19]](_0xb356[9],auth[_0xb356[10]](),controller[_0xb356[18]]);module[_0xb356[20]]= router
\ No newline at end of file
+var _0xf405=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x73\x68\x6F\x77","\x67\x65\x74","\x2F","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf405[0];var multer=require(_0xf405[1]);var util=require(_0xf405[2]);var path=require(_0xf405[3]);var express=require(_0xf405[4]);var router=express.Router();var auth=require(_0xf405[5]);var interaction=require(_0xf405[6]);var config=require(_0xf405[7]);var controller=require(_0xf405[8]);router[_0xf405[12]](_0xf405[9],auth[_0xf405[10]](),controller[_0xf405[11]]);router[_0xf405[15]](_0xf405[13],auth[_0xf405[10]](),controller[_0xf405[14]]);router[_0xf405[17]](_0xf405[9],auth[_0xf405[10]](),controller[_0xf405[16]]);router[_0xf405[19]](_0xf405[9],auth[_0xf405[10]](),controller[_0xf405[18]]);module[_0xf405[20]]= router
\ No newline at end of file
index 1a829a6..4ebefdb 100644 (file)
@@ -1 +1 @@
-var _0x8a03=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65\x41\x6E\x64\x41\x63\x63\x6F\x75\x6E\x74"];_0x8a03[0];var Sequelize=require(_0x8a03[1]);module[_0x8a03[2]]= {name:{type:Sequelize[_0x8a03[3]],unique:_0x8a03[4],allowNull:false}}
\ No newline at end of file
+var _0xdf49=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65\x41\x6E\x64\x41\x63\x63\x6F\x75\x6E\x74"];_0xdf49[0];var Sequelize=require(_0xdf49[1]);module[_0xdf49[2]]= {name:{type:Sequelize[_0xdf49[3]],unique:_0xdf49[4],allowNull:false}}
\ No newline at end of file
index 4667950..34bb2d3 100644 (file)
@@ -1 +1 @@
-var _0x9a5d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x9a5d[0];var jsonpatch=require(_0x9a5d[1]);var rp=require(_0x9a5d[2]);var moment=require(_0x9a5d[3]);var BPromise=require(_0x9a5d[4]);var Mustache=require(_0x9a5d[5]);var util=require(_0x9a5d[6]);var path=require(_0x9a5d[7]);var sox=require(_0x9a5d[8]);var csv=require(_0x9a5d[9]);var ejs=require(_0x9a5d[10]);var fs=require(_0x9a5d[11]);var _=require(_0x9a5d[12]);var squel=require(_0x9a5d[13]);var crypto=require(_0x9a5d[14]);var jsforce=require(_0x9a5d[15]);var deskjs=require(_0x9a5d[16]);var toCsv=require(_0x9a5d[9]);var querystring=require(_0x9a5d[17]);var Papa=require(_0x9a5d[18]);var qs=require(_0x9a5d[19]);var logger=require(_0x9a5d[21])(_0x9a5d[20]);var utils=require(_0x9a5d[22]);var config=require(_0x9a5d[23]);var db=require(_0x9a5d[25])[_0x9a5d[24]];function respondWithStatusCode(_0x5555x1a,_0x5555x1b){_0x5555x1b= _0x5555x1b|| 204;return function(_0x5555x1c){if(_0x5555x1c){return _0x5555x1a[_0x9a5d[26]](_0x5555x1b)};return _0x5555x1a[_0x9a5d[28]](_0x5555x1b)[_0x9a5d[27]]()}}function respondWithResult(_0x5555x1a,_0x5555x1b){_0x5555x1b= _0x5555x1b|| 200;return function(_0x5555x1c){if(_0x5555x1c){return _0x5555x1a[_0x9a5d[28]](_0x5555x1b)[_0x9a5d[29]](_0x5555x1c)}}}function respondWithFilteredResult(_0x5555x1a,_0x5555x1f){return function(_0x5555x1c){if(_0x5555x1c){var _0x5555x20=_0x5555x1c[_0x9a5d[30]],_0x5555x21=_0x5555x1f[_0x9a5d[31]],_0x5555x22=_0x5555x1f[_0x9a5d[31]]+ _0x5555x1f[_0x9a5d[32]],_0x5555x1b;if(_0x5555x22>= _0x5555x20){_0x5555x22= _0x5555x20;_0x5555x1b= 200}else {_0x5555x1b= 206};_0x5555x1a[_0x9a5d[28]](_0x5555x1b);return _0x5555x1a[_0x9a5d[36]](_0x9a5d[33],_0x5555x21+ _0x9a5d[34]+ _0x5555x22+ _0x9a5d[35]+ _0x5555x20)[_0x9a5d[29]](_0x5555x1c)};return null}}function patchUpdates(_0x5555x24){return function(_0x5555x1c){try{jsonpatch[_0x9a5d[37]](_0x5555x1c,_0x5555x24,true)}catch(err){return BPromise[_0x9a5d[38]](err)};return _0x5555x1c[_0x9a5d[39]]()}}function saveUpdates(_0x5555x26,_0x5555x1b){return function(_0x5555x1c){if(_0x5555x1c){return _0x5555x1c[_0x9a5d[41]](_0x5555x26)[_0x9a5d[40]](function(_0x5555x27){return _0x5555x27})};return null}}function removeEntity(_0x5555x1a,_0x5555x1b){return function(_0x5555x1c){if(_0x5555x1c){return _0x5555x1c[_0x9a5d[42]]()[_0x9a5d[40]](function(){_0x5555x1a[_0x9a5d[28]](204)[_0x9a5d[27]]()})}}}function handleEntityNotFound(_0x5555x1a,_0x5555x1b){return function(_0x5555x1c){if(!_0x5555x1c){_0x5555x1a[_0x9a5d[26]](404)};return _0x5555x1c}}function handleError(_0x5555x1a,_0x5555x1b){_0x5555x1b= _0x5555x1b|| 500;return function(_0x5555x2b){logger[_0x9a5d[44]](_0x5555x2b[_0x9a5d[43]]);if(_0x5555x2b[_0x9a5d[45]]){delete _0x5555x2b[_0x9a5d[45]]};_0x5555x1a[_0x9a5d[28]](_0x5555x1b)[_0x9a5d[46]](_0x5555x2b)}}exports[_0x9a5d[47]]= function(_0x5555x2c,_0x5555x1a){var _0x5555x1f={raw:true,where:{id:_0x5555x2c[_0x9a5d[49]][_0x9a5d[48]]}},_0x5555x2d={};_0x5555x2d[_0x9a5d[50]]= _[_0x9a5d[53]](db[_0x9a5d[52]][_0x9a5d[51]]);_0x5555x2d[_0x9a5d[54]]= _[_0x9a5d[53]](_0x5555x2c[_0x9a5d[54]]);_0x5555x2d[_0x9a5d[55]]= _[_0x9a5d[56]](_0x5555x2d[_0x9a5d[50]],_0x5555x2d[_0x9a5d[54]]);_0x5555x1f[_0x9a5d[57]]= _[_0x9a5d[56]](_0x5555x2d[_0x9a5d[50]],qs[_0x9a5d[58]](_0x5555x2c[_0x9a5d[54]][_0x9a5d[58]]));_0x5555x1f[_0x9a5d[57]]= (_0x5555x1f[_0x9a5d[57]][_0x9a5d[59]])?_0x5555x1f[_0x9a5d[57]]:_0x5555x2d[_0x9a5d[50]];if(_0x5555x2c[_0x9a5d[54]][_0x9a5d[60]]){_0x5555x1f[_0x9a5d[61]]= [{all:true}]};_0x5555x1f= _[_0x9a5d[63]]({},_0x5555x1f,_0x5555x2c[_0x9a5d[62]]);return db[_0x9a5d[52]][_0x9a5d[65]](_0x5555x1f)[_0x9a5d[40]](handleEntityNotFound(_0x5555x1a,null))[_0x9a5d[40]](respondWithResult(_0x5555x1a,null))[_0x9a5d[64]](handleError(_0x5555x1a,null))};exports[_0x9a5d[66]]= function(_0x5555x2c,_0x5555x1a){return db[_0x9a5d[52]][_0x9a5d[66]](_0x5555x2c[_0x9a5d[67]],{})[_0x9a5d[40]](respondWithResult(_0x5555x1a,201))[_0x9a5d[64]](handleError(_0x5555x1a,null))};exports[_0x9a5d[41]]= function(_0x5555x2c,_0x5555x1a){if(_0x5555x2c[_0x9a5d[67]][_0x9a5d[48]]){delete _0x5555x2c[_0x9a5d[67]][_0x9a5d[48]]};return db[_0x9a5d[52]][_0x9a5d[65]]({where:{id:_0x5555x2c[_0x9a5d[49]][_0x9a5d[48]]}})[_0x9a5d[40]](handleEntityNotFound(_0x5555x1a,null))[_0x9a5d[40]](saveUpdates(_0x5555x2c[_0x9a5d[67]],null))[_0x9a5d[40]](respondWithResult(_0x5555x1a,null))[_0x9a5d[64]](handleError(_0x5555x1a,null))};exports[_0x9a5d[42]]= function(_0x5555x2c,_0x5555x1a){return db[_0x9a5d[52]][_0x9a5d[65]]({where:{id:_0x5555x2c[_0x9a5d[49]][_0x9a5d[48]]}})[_0x9a5d[40]](handleEntityNotFound(_0x5555x1a,null))[_0x9a5d[40]](removeEntity(_0x5555x1a,null))[_0x9a5d[64]](handleError(_0x5555x1a,null))}
\ No newline at end of file
+var _0x85b3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x85b3[0];var jsonpatch=require(_0x85b3[1]);var rp=require(_0x85b3[2]);var moment=require(_0x85b3[3]);var BPromise=require(_0x85b3[4]);var Mustache=require(_0x85b3[5]);var util=require(_0x85b3[6]);var path=require(_0x85b3[7]);var sox=require(_0x85b3[8]);var csv=require(_0x85b3[9]);var ejs=require(_0x85b3[10]);var fs=require(_0x85b3[11]);var _=require(_0x85b3[12]);var squel=require(_0x85b3[13]);var crypto=require(_0x85b3[14]);var jsforce=require(_0x85b3[15]);var deskjs=require(_0x85b3[16]);var toCsv=require(_0x85b3[9]);var querystring=require(_0x85b3[17]);var Papa=require(_0x85b3[18]);var qs=require(_0x85b3[19]);var logger=require(_0x85b3[21])(_0x85b3[20]);var utils=require(_0x85b3[22]);var config=require(_0x85b3[23]);var db=require(_0x85b3[25])[_0x85b3[24]];function respondWithStatusCode(_0xe83ax1a,_0xe83ax1b){_0xe83ax1b= _0xe83ax1b|| 204;return function(_0xe83ax1c){if(_0xe83ax1c){return _0xe83ax1a[_0x85b3[26]](_0xe83ax1b)};return _0xe83ax1a[_0x85b3[28]](_0xe83ax1b)[_0x85b3[27]]()}}function respondWithResult(_0xe83ax1a,_0xe83ax1b){_0xe83ax1b= _0xe83ax1b|| 200;return function(_0xe83ax1c){if(_0xe83ax1c){return _0xe83ax1a[_0x85b3[28]](_0xe83ax1b)[_0x85b3[29]](_0xe83ax1c)}}}function respondWithFilteredResult(_0xe83ax1a,_0xe83ax1f){return function(_0xe83ax1c){if(_0xe83ax1c){var _0xe83ax20=_0xe83ax1c[_0x85b3[30]],_0xe83ax21=_0xe83ax1f[_0x85b3[31]],_0xe83ax22=_0xe83ax1f[_0x85b3[31]]+ _0xe83ax1f[_0x85b3[32]],_0xe83ax1b;if(_0xe83ax22>= _0xe83ax20){_0xe83ax22= _0xe83ax20;_0xe83ax1b= 200}else {_0xe83ax1b= 206};_0xe83ax1a[_0x85b3[28]](_0xe83ax1b);return _0xe83ax1a[_0x85b3[36]](_0x85b3[33],_0xe83ax21+ _0x85b3[34]+ _0xe83ax22+ _0x85b3[35]+ _0xe83ax20)[_0x85b3[29]](_0xe83ax1c)};return null}}function patchUpdates(_0xe83ax24){return function(_0xe83ax1c){try{jsonpatch[_0x85b3[37]](_0xe83ax1c,_0xe83ax24,true)}catch(err){return BPromise[_0x85b3[38]](err)};return _0xe83ax1c[_0x85b3[39]]()}}function saveUpdates(_0xe83ax26,_0xe83ax1b){return function(_0xe83ax1c){if(_0xe83ax1c){return _0xe83ax1c[_0x85b3[41]](_0xe83ax26)[_0x85b3[40]](function(_0xe83ax27){return _0xe83ax27})};return null}}function removeEntity(_0xe83ax1a,_0xe83ax1b){return function(_0xe83ax1c){if(_0xe83ax1c){return _0xe83ax1c[_0x85b3[42]]()[_0x85b3[40]](function(){_0xe83ax1a[_0x85b3[28]](204)[_0x85b3[27]]()})}}}function handleEntityNotFound(_0xe83ax1a,_0xe83ax1b){return function(_0xe83ax1c){if(!_0xe83ax1c){_0xe83ax1a[_0x85b3[26]](404)};return _0xe83ax1c}}function handleError(_0xe83ax1a,_0xe83ax1b){_0xe83ax1b= _0xe83ax1b|| 500;return function(_0xe83ax2b){logger[_0x85b3[44]](_0xe83ax2b[_0x85b3[43]]);if(_0xe83ax2b[_0x85b3[45]]){delete _0xe83ax2b[_0x85b3[45]]};_0xe83ax1a[_0x85b3[28]](_0xe83ax1b)[_0x85b3[46]](_0xe83ax2b)}}exports[_0x85b3[47]]= function(_0xe83ax2c,_0xe83ax1a){var _0xe83ax1f={raw:true,where:{id:_0xe83ax2c[_0x85b3[49]][_0x85b3[48]]}},_0xe83ax2d={};_0xe83ax2d[_0x85b3[50]]= _[_0x85b3[53]](db[_0x85b3[52]][_0x85b3[51]]);_0xe83ax2d[_0x85b3[54]]= _[_0x85b3[53]](_0xe83ax2c[_0x85b3[54]]);_0xe83ax2d[_0x85b3[55]]= _[_0x85b3[56]](_0xe83ax2d[_0x85b3[50]],_0xe83ax2d[_0x85b3[54]]);_0xe83ax1f[_0x85b3[57]]= _[_0x85b3[56]](_0xe83ax2d[_0x85b3[50]],qs[_0x85b3[58]](_0xe83ax2c[_0x85b3[54]][_0x85b3[58]]));_0xe83ax1f[_0x85b3[57]]= (_0xe83ax1f[_0x85b3[57]][_0x85b3[59]])?_0xe83ax1f[_0x85b3[57]]:_0xe83ax2d[_0x85b3[50]];if(_0xe83ax2c[_0x85b3[54]][_0x85b3[60]]){_0xe83ax1f[_0x85b3[61]]= [{all:true}]};_0xe83ax1f= _[_0x85b3[63]]({},_0xe83ax1f,_0xe83ax2c[_0x85b3[62]]);return db[_0x85b3[52]][_0x85b3[65]](_0xe83ax1f)[_0x85b3[40]](handleEntityNotFound(_0xe83ax1a,null))[_0x85b3[40]](respondWithResult(_0xe83ax1a,null))[_0x85b3[64]](handleError(_0xe83ax1a,null))};exports[_0x85b3[66]]= function(_0xe83ax2c,_0xe83ax1a){return db[_0x85b3[52]][_0x85b3[66]](_0xe83ax2c[_0x85b3[67]],{})[_0x85b3[40]](respondWithResult(_0xe83ax1a,201))[_0x85b3[64]](handleError(_0xe83ax1a,null))};exports[_0x85b3[41]]= function(_0xe83ax2c,_0xe83ax1a){if(_0xe83ax2c[_0x85b3[67]][_0x85b3[48]]){delete _0xe83ax2c[_0x85b3[67]][_0x85b3[48]]};return db[_0x85b3[52]][_0x85b3[65]]({where:{id:_0xe83ax2c[_0x85b3[49]][_0x85b3[48]]}})[_0x85b3[40]](handleEntityNotFound(_0xe83ax1a,null))[_0x85b3[40]](saveUpdates(_0xe83ax2c[_0x85b3[67]],null))[_0x85b3[40]](respondWithResult(_0xe83ax1a,null))[_0x85b3[64]](handleError(_0xe83ax1a,null))};exports[_0x85b3[42]]= function(_0xe83ax2c,_0xe83ax1a){return db[_0x85b3[52]][_0x85b3[65]]({where:{id:_0xe83ax2c[_0x85b3[49]][_0x85b3[48]]}})[_0x85b3[40]](handleEntityNotFound(_0xe83ax1a,null))[_0x85b3[40]](removeEntity(_0xe83ax1a,null))[_0x85b3[64]](handleError(_0xe83ax1a,null))}
\ No newline at end of file
index c7a8da9..a68b069 100644 (file)
@@ -1 +1 @@
-var _0x735d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6D\x61\x69\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x735d[0];var _=require(_0x735d[1]);var util=require(_0x735d[2]);var logger=require(_0x735d[4])(_0x735d[3]);var moment=require(_0x735d[5]);var BPromise=require(_0x735d[6]);var rp=require(_0x735d[7]);var attributes=require(_0x735d[8]);module[_0x735d[9]]= function(_0x3690x8,_0x3690x9){return _0x3690x8[_0x735d[12]](_0x735d[10],attributes,{tableName:_0x735d[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xd7d3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6D\x61\x69\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xd7d3[0];var _=require(_0xd7d3[1]);var util=require(_0xd7d3[2]);var logger=require(_0xd7d3[4])(_0xd7d3[3]);var moment=require(_0xd7d3[5]);var BPromise=require(_0xd7d3[6]);var rp=require(_0xd7d3[7]);var attributes=require(_0xd7d3[8]);module[_0xd7d3[9]]= function(_0xbb73x8,_0xbb73x9){return _0xbb73x8[_0xd7d3[12]](_0xd7d3[10],attributes,{tableName:_0xd7d3[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 9cfa0a5..eaddab2 100644 (file)
@@ -1 +1 @@
-var _0x80de=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E"];_0x80de[0];var _=require(_0x80de[1]);var util=require(_0x80de[2]);var moment=require(_0x80de[3]);var BPromise=require(_0x80de[4]);var rs=require(_0x80de[5]);var fs=require(_0x80de[6]);var db=require(_0x80de[8])[_0x80de[7]];var utils=require(_0x80de[9]);var logger=require(_0x80de[11])(_0x80de[10]);var config=require(_0x80de[12]);var jayson=require(_0x80de[13]);var client=jayson[_0x80de[15]][_0x80de[14]]({port:9002});function respondWithRpcPromise(_0x1fbexe,_0x1fbexf,_0x1fbex10){return  new BPromise(function(_0x1fbex11,_0x1fbex12){return client[_0x80de[28]](_0x1fbexe,_0x1fbex10)[_0x80de[27]](function(_0x1fbex14){logger[_0x80de[20]](_0x80de[16],_0x1fbexf,_0x80de[19]);logger[_0x80de[23]](_0x80de[21],_0x1fbexf,_0x80de[19],JSON[_0x80de[22]](_0x1fbex14));if(_0x1fbex14[_0x80de[17]]){if(_0x1fbex14[_0x80de[17]][_0x80de[24]]=== 500){logger[_0x80de[17]](_0x80de[16],_0x1fbexf,_0x1fbex14[_0x80de[17]][_0x80de[25]]);return _0x1fbex12(_0x1fbex14[_0x80de[17]][_0x80de[25]])};logger[_0x80de[17]](_0x80de[16],_0x1fbexf,_0x1fbex14[_0x80de[17]][_0x80de[25]]);return _0x1fbex11(_0x1fbex14[_0x80de[17]][_0x80de[25]])}else {logger[_0x80de[20]](_0x80de[16],_0x1fbexf,_0x80de[19]);_0x1fbex11(_0x1fbex14[_0x80de[26]][_0x80de[25]])}})[_0x80de[18]](function(_0x1fbex13){logger[_0x80de[17]](_0x80de[16],_0x1fbexf,_0x1fbex13);_0x1fbex12(_0x1fbex13)})})}exports[_0x80de[29]]= function(_0x1fbex10){var _0x1fbex15=this;return  new Promise(function(_0x1fbex11,_0x1fbex12){return db[_0x80de[37]][_0x80de[36]](_0x1fbex10[_0x80de[30]],{raw:_0x1fbex10[_0x80de[31]]?(_0x1fbex10[_0x80de[31]][_0x80de[32]]=== undefined)?true:false:true,individualHooks:true,where:_0x1fbex10[_0x80de[31]]?_0x1fbex10[_0x80de[31]][_0x80de[33]]|| null:null,attributes:_0x1fbex10[_0x80de[31]]?_0x1fbex10[_0x80de[31]][_0x80de[34]]|| null:null,limit:_0x1fbex10[_0x80de[31]]?_0x1fbex10[_0x80de[31]][_0x80de[35]]|| null:null})[_0x80de[27]](function(_0x1fbex14){logger[_0x80de[20]](_0x80de[29],_0x1fbex10);logger[_0x80de[23]](_0x80de[29],_0x1fbex10,JSON[_0x80de[22]](_0x1fbex14));_0x1fbex11(_0x1fbex14)})[_0x80de[18]](function(_0x1fbex13){logger[_0x80de[17]](_0x80de[29],_0x1fbex13[_0x80de[25]],_0x1fbex10);_0x1fbex12(_0x1fbex15[_0x80de[17]](500,_0x1fbex13[_0x80de[25]]))})})}
\ No newline at end of file
+var _0x23e4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E"];_0x23e4[0];var _=require(_0x23e4[1]);var util=require(_0x23e4[2]);var moment=require(_0x23e4[3]);var BPromise=require(_0x23e4[4]);var rs=require(_0x23e4[5]);var fs=require(_0x23e4[6]);var db=require(_0x23e4[8])[_0x23e4[7]];var utils=require(_0x23e4[9]);var logger=require(_0x23e4[11])(_0x23e4[10]);var config=require(_0x23e4[12]);var jayson=require(_0x23e4[13]);var client=jayson[_0x23e4[15]][_0x23e4[14]]({port:9002});function respondWithRpcPromise(_0xc9f8xe,_0xc9f8xf,_0xc9f8x10){return  new BPromise(function(_0xc9f8x11,_0xc9f8x12){return client[_0x23e4[28]](_0xc9f8xe,_0xc9f8x10)[_0x23e4[27]](function(_0xc9f8x14){logger[_0x23e4[20]](_0x23e4[16],_0xc9f8xf,_0x23e4[19]);logger[_0x23e4[23]](_0x23e4[21],_0xc9f8xf,_0x23e4[19],JSON[_0x23e4[22]](_0xc9f8x14));if(_0xc9f8x14[_0x23e4[17]]){if(_0xc9f8x14[_0x23e4[17]][_0x23e4[24]]=== 500){logger[_0x23e4[17]](_0x23e4[16],_0xc9f8xf,_0xc9f8x14[_0x23e4[17]][_0x23e4[25]]);return _0xc9f8x12(_0xc9f8x14[_0x23e4[17]][_0x23e4[25]])};logger[_0x23e4[17]](_0x23e4[16],_0xc9f8xf,_0xc9f8x14[_0x23e4[17]][_0x23e4[25]]);return _0xc9f8x11(_0xc9f8x14[_0x23e4[17]][_0x23e4[25]])}else {logger[_0x23e4[20]](_0x23e4[16],_0xc9f8xf,_0x23e4[19]);_0xc9f8x11(_0xc9f8x14[_0x23e4[26]][_0x23e4[25]])}})[_0x23e4[18]](function(_0xc9f8x13){logger[_0x23e4[17]](_0x23e4[16],_0xc9f8xf,_0xc9f8x13);_0xc9f8x12(_0xc9f8x13)})})}exports[_0x23e4[29]]= function(_0xc9f8x10){var _0xc9f8x15=this;return  new Promise(function(_0xc9f8x11,_0xc9f8x12){return db[_0x23e4[37]][_0x23e4[36]](_0xc9f8x10[_0x23e4[30]],{raw:_0xc9f8x10[_0x23e4[31]]?(_0xc9f8x10[_0x23e4[31]][_0x23e4[32]]=== undefined)?true:false:true,individualHooks:true,where:_0xc9f8x10[_0x23e4[31]]?_0xc9f8x10[_0x23e4[31]][_0x23e4[33]]|| null:null,attributes:_0xc9f8x10[_0x23e4[31]]?_0xc9f8x10[_0x23e4[31]][_0x23e4[34]]|| null:null,limit:_0xc9f8x10[_0x23e4[31]]?_0xc9f8x10[_0x23e4[31]][_0x23e4[35]]|| null:null})[_0x23e4[27]](function(_0xc9f8x14){logger[_0x23e4[20]](_0x23e4[29],_0xc9f8x10);logger[_0x23e4[23]](_0x23e4[29],_0xc9f8x10,JSON[_0x23e4[22]](_0xc9f8x14));_0xc9f8x11(_0xc9f8x14)})[_0x23e4[18]](function(_0xc9f8x13){logger[_0x23e4[17]](_0x23e4[29],_0xc9f8x13[_0x23e4[25]],_0xc9f8x10);_0xc9f8x12(_0xc9f8x15[_0x23e4[17]](500,_0xc9f8x13[_0x23e4[25]]))})})}
\ No newline at end of file
index defdde0..7dc5762 100644 (file)
@@ -1 +1 @@
-var _0x6455=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x74\x61\x67\x73","\x6D\x61\x69\x6C","\x6D\x61\x69\x6C\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x61\x64\x64\x74\x61\x67\x73","\x74\x72\x61\x63\x6B\x65\x64","\x61\x64\x64\x54\x61\x67\x73","\x6D\x61\x69\x6C\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x6D\x61\x69\x6C\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x61\x67\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x6455[0];var multer=require(_0x6455[1]);var util=require(_0x6455[2]);var path=require(_0x6455[3]);var express=require(_0x6455[4]);var router=express.Router();var auth=require(_0x6455[5]);var interaction=require(_0x6455[6]);var config=require(_0x6455[7]);var controller=require(_0x6455[8]);router[_0x6455[12]](_0x6455[9],auth[_0x6455[10]](),controller[_0x6455[11]]);router[_0x6455[12]](_0x6455[13],auth[_0x6455[10]](),controller[_0x6455[14]]);router[_0x6455[12]](_0x6455[15],auth[_0x6455[10]](),controller[_0x6455[16]]);router[_0x6455[12]](_0x6455[17],auth[_0x6455[10]](),controller[_0x6455[18]]);router[_0x6455[20]](_0x6455[9],auth[_0x6455[10]](),controller[_0x6455[19]]);router[_0x6455[20]](_0x6455[17],auth[_0x6455[10]](),controller[_0x6455[21]]);router[_0x6455[20]](_0x6455[22],auth[_0x6455[10]](),interaction[_0x6455[25]](_0x6455[23],_0x6455[24]),controller[_0x6455[26]]);router[_0x6455[29]](_0x6455[15],auth[_0x6455[10]](),interaction[_0x6455[25]](_0x6455[23],_0x6455[27]),controller[_0x6455[28]]);router[_0x6455[32]](_0x6455[15],auth[_0x6455[10]](),interaction[_0x6455[25]](_0x6455[23],_0x6455[30]),controller[_0x6455[31]]);router[_0x6455[32]](_0x6455[22],auth[_0x6455[10]](),controller[_0x6455[33]]);module[_0x6455[34]]= router
\ No newline at end of file
+var _0x3553=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x74\x61\x67\x73","\x6D\x61\x69\x6C","\x6D\x61\x69\x6C\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x61\x64\x64\x74\x61\x67\x73","\x74\x72\x61\x63\x6B\x65\x64","\x61\x64\x64\x54\x61\x67\x73","\x6D\x61\x69\x6C\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x6D\x61\x69\x6C\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x61\x67\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x3553[0];var multer=require(_0x3553[1]);var util=require(_0x3553[2]);var path=require(_0x3553[3]);var express=require(_0x3553[4]);var router=express.Router();var auth=require(_0x3553[5]);var interaction=require(_0x3553[6]);var config=require(_0x3553[7]);var controller=require(_0x3553[8]);router[_0x3553[12]](_0x3553[9],auth[_0x3553[10]](),controller[_0x3553[11]]);router[_0x3553[12]](_0x3553[13],auth[_0x3553[10]](),controller[_0x3553[14]]);router[_0x3553[12]](_0x3553[15],auth[_0x3553[10]](),controller[_0x3553[16]]);router[_0x3553[12]](_0x3553[17],auth[_0x3553[10]](),controller[_0x3553[18]]);router[_0x3553[20]](_0x3553[9],auth[_0x3553[10]](),controller[_0x3553[19]]);router[_0x3553[20]](_0x3553[17],auth[_0x3553[10]](),controller[_0x3553[21]]);router[_0x3553[20]](_0x3553[22],auth[_0x3553[10]](),interaction[_0x3553[25]](_0x3553[23],_0x3553[24]),controller[_0x3553[26]]);router[_0x3553[29]](_0x3553[15],auth[_0x3553[10]](),interaction[_0x3553[25]](_0x3553[23],_0x3553[27]),controller[_0x3553[28]]);router[_0x3553[32]](_0x3553[15],auth[_0x3553[10]](),interaction[_0x3553[25]](_0x3553[23],_0x3553[30]),controller[_0x3553[31]]);router[_0x3553[32]](_0x3553[22],auth[_0x3553[10]](),controller[_0x3553[33]]);module[_0x3553[34]]= router
\ No newline at end of file
index d72dc70..b2bf202 100644 (file)
@@ -1 +1 @@
-var _0xff8f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x42\x4F\x4F\x4C\x45\x41\x4E","\x44\x41\x54\x45","\x53\x54\x52\x49\x4E\x47","\x6C\x6F\x6E\x67","\x54\x45\x58\x54","\x69\x6E","\x6F\x75\x74"];_0xff8f[0];var Sequelize=require(_0xff8f[1]);var moment=require(_0xff8f[2]);module[_0xff8f[3]]= {closed:{type:Sequelize[_0xff8f[4]],defaultValue:false},closedAt:{type:Sequelize[_0xff8f[5]]},disposition:{type:Sequelize[_0xff8f[6]]},note:{type:Sequelize[_0xff8f[6]]},inReplyTo:{type:Sequelize.STRING(190)},to:{type:Sequelize[_0xff8f[6]]},cc:{type:Sequelize.TEXT(_0xff8f[7])},subject:{type:Sequelize[_0xff8f[8]]},attach:{type:Sequelize[_0xff8f[4]],defaultValue:false},read1stAt:{type:Sequelize[_0xff8f[5]]},substatus:{type:Sequelize.STRING(60)},substatusAt:{type:Sequelize[_0xff8f[5]]},firstMsgDirection:{type:Sequelize.ENUM(_0xff8f[9],_0xff8f[10]),defaultValue:_0xff8f[9],allowNull:false},lastMsgAt:{type:Sequelize[_0xff8f[5]]},lastMsgDirection:{type:Sequelize.ENUM(_0xff8f[9],_0xff8f[10]),defaultValue:_0xff8f[9],allowNull:false},lastMsgBody:{type:Sequelize.TEXT(_0xff8f[7])}}
\ No newline at end of file
+var _0xf958=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x42\x4F\x4F\x4C\x45\x41\x4E","\x44\x41\x54\x45","\x53\x54\x52\x49\x4E\x47","\x6C\x6F\x6E\x67","\x54\x45\x58\x54","\x69\x6E","\x6F\x75\x74"];_0xf958[0];var Sequelize=require(_0xf958[1]);var moment=require(_0xf958[2]);module[_0xf958[3]]= {closed:{type:Sequelize[_0xf958[4]],defaultValue:false},closedAt:{type:Sequelize[_0xf958[5]]},disposition:{type:Sequelize[_0xf958[6]]},note:{type:Sequelize[_0xf958[6]]},inReplyTo:{type:Sequelize.STRING(190)},to:{type:Sequelize[_0xf958[6]]},cc:{type:Sequelize.TEXT(_0xf958[7])},subject:{type:Sequelize[_0xf958[8]]},attach:{type:Sequelize[_0xf958[4]],defaultValue:false},read1stAt:{type:Sequelize[_0xf958[5]]},substatus:{type:Sequelize.STRING(60)},substatusAt:{type:Sequelize[_0xf958[5]]},firstMsgDirection:{type:Sequelize.ENUM(_0xf958[9],_0xf958[10]),defaultValue:_0xf958[9],allowNull:false},lastMsgAt:{type:Sequelize[_0xf958[5]]},lastMsgDirection:{type:Sequelize.ENUM(_0xf958[9],_0xf958[10]),defaultValue:_0xf958[9],allowNull:false},lastMsgBody:{type:Sequelize.TEXT(_0xf958[7])}}
\ No newline at end of file
index 2ffd923..6ae0339 100644 (file)
@@ -1 +1 @@
-var _0xd20b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x74\x61\x67","\x54\x61\x67","\x54\x61\x67\x73","\x69\x64","\x70\x75\x73\x68","\x64\x69\x73\x74\x69\x6E\x63\x74","\x72\x65\x61\x64","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x65\x73\x73\x61\x67\x65\x73","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x69\x6E","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x55\x73\x65\x72","\x55\x73\x65\x72\x73","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x4F\x77\x6E\x65\x72","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79","\x65\x6D\x61\x69\x6C","\x63\x6F\x6C\x6F\x72","\x54\x68\x72\x6F\x75\x67\x68\x54\x61\x67\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x69\x64\x73","\x6F\x6D\x69\x74","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x24\x67\x74\x65","\x2C","\x73\x70\x6C\x69\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x54\x61\x67\x73","\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x54\x61\x67\x73\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x73\x65\x74\x54\x61\x67\x73","\x72\x65\x6D\x6F\x76\x65\x54\x61\x67\x73"];_0xd20b[0];var jsonpatch=require(_0xd20b[1]);var rp=require(_0xd20b[2]);var moment=require(_0xd20b[3]);var BPromise=require(_0xd20b[4]);var Mustache=require(_0xd20b[5]);var util=require(_0xd20b[6]);var path=require(_0xd20b[7]);var sox=require(_0xd20b[8]);var csv=require(_0xd20b[9]);var ejs=require(_0xd20b[10]);var fs=require(_0xd20b[11]);var _=require(_0xd20b[12]);var squel=require(_0xd20b[13]);var crypto=require(_0xd20b[14]);var jsforce=require(_0xd20b[15]);var deskjs=require(_0xd20b[16]);var toCsv=require(_0xd20b[9]);var querystring=require(_0xd20b[17]);var Papa=require(_0xd20b[18]);var qs=require(_0xd20b[19]);var logger=require(_0xd20b[21])(_0xd20b[20]);var utils=require(_0xd20b[22]);var config=require(_0xd20b[23]);var db=require(_0xd20b[25])[_0xd20b[24]];var socket=require(_0xd20b[27])({host:_0xd20b[26],port:6379});require(_0xd20b[29])[_0xd20b[28]](socket);function respondWithStatusCode(_0xe59bx1b,_0xe59bx1c){_0xe59bx1c= _0xe59bx1c|| 204;return function(_0xe59bx1d){if(_0xe59bx1d){return _0xe59bx1b[_0xd20b[30]](_0xe59bx1c)};return _0xe59bx1b[_0xd20b[32]](_0xe59bx1c)[_0xd20b[31]]()}}function respondWithResult(_0xe59bx1b,_0xe59bx1c){_0xe59bx1c= _0xe59bx1c|| 200;return function(_0xe59bx1d){if(_0xe59bx1d){return _0xe59bx1b[_0xd20b[32]](_0xe59bx1c)[_0xd20b[33]](_0xe59bx1d)}}}function respondWithFilteredResult(_0xe59bx1b,_0xe59bx20){return function(_0xe59bx1d){if(_0xe59bx1d){var _0xe59bx21=_0xe59bx1d[_0xd20b[34]],_0xe59bx22=_0xe59bx20[_0xd20b[35]],_0xe59bx23=_0xe59bx20[_0xd20b[35]]+ _0xe59bx20[_0xd20b[36]],_0xe59bx1c;if(_0xe59bx23>= _0xe59bx21){_0xe59bx23= _0xe59bx21;_0xe59bx1c= 200}else {_0xe59bx1c= 206};_0xe59bx1b[_0xd20b[32]](_0xe59bx1c);return _0xe59bx1b[_0xd20b[40]](_0xd20b[37],_0xe59bx22+ _0xd20b[38]+ _0xe59bx23+ _0xd20b[39]+ _0xe59bx21)[_0xd20b[33]](_0xe59bx1d)};return null}}function patchUpdates(_0xe59bx25){return function(_0xe59bx1d){try{jsonpatch[_0xd20b[41]](_0xe59bx1d,_0xe59bx25,true)}catch(err){return BPromise[_0xd20b[42]](err)};return _0xe59bx1d[_0xd20b[43]]()}}function saveUpdates(_0xe59bx27,_0xe59bx1c){return function(_0xe59bx1d){if(_0xe59bx1d){return _0xe59bx1d[_0xd20b[45]](_0xe59bx27)[_0xd20b[44]](function(_0xe59bx28){return _0xe59bx28})};return null}}function removeEntity(_0xe59bx1b,_0xe59bx1c){return function(_0xe59bx1d){if(_0xe59bx1d){return _0xe59bx1d[_0xd20b[46]]()[_0xd20b[44]](function(){_0xe59bx1b[_0xd20b[32]](204)[_0xd20b[31]]()})}}}function handleEntityNotFound(_0xe59bx1b,_0xe59bx1c){return function(_0xe59bx1d){if(!_0xe59bx1d){_0xe59bx1b[_0xd20b[30]](404)};return _0xe59bx1d}}function handleError(_0xe59bx1b,_0xe59bx1c){_0xe59bx1c= _0xe59bx1c|| 500;return function(_0xe59bx2c){logger[_0xd20b[48]](_0xe59bx2c[_0xd20b[47]]);if(_0xe59bx2c[_0xd20b[49]]){delete _0xe59bx2c[_0xd20b[49]]};_0xe59bx1b[_0xd20b[32]](_0xe59bx1c)[_0xd20b[50]](_0xe59bx2c)}}exports[_0xd20b[51]]= function(_0xe59bx2d,_0xe59bx1b){var _0xe59bx20={},_0xe59bx2e={},_0xe59bx2f={count:0,rows:[]};_0xe59bx2e[_0xd20b[52]]= _[_0xd20b[55]](db[_0xd20b[54]][_0xd20b[53]]);var _0xe59bx30={dateStart:_0xe59bx2d[_0xd20b[57]][_0xd20b[56]],dateEnd:_0xe59bx2d[_0xd20b[57]][_0xd20b[58]]};delete _0xe59bx2d[_0xd20b[57]][_0xd20b[56]];delete _0xe59bx2d[_0xd20b[57]][_0xd20b[58]];_0xe59bx2e[_0xd20b[57]]= _[_0xd20b[55]](_0xe59bx2d[_0xd20b[57]]);_0xe59bx2e[_0xd20b[59]]= _[_0xd20b[60]](_0xe59bx2e[_0xd20b[52]],_0xe59bx2e[_0xd20b[57]]);_0xe59bx20[_0xd20b[61]]= _[_0xd20b[60]](_0xe59bx2e[_0xd20b[52]],qs[_0xd20b[62]](_0xe59bx2d[_0xd20b[57]][_0xd20b[62]]));_0xe59bx20[_0xd20b[61]]= (_0xe59bx20[_0xd20b[61]][_0xd20b[63]])?_0xe59bx20[_0xd20b[61]]:_0xe59bx2e[_0xd20b[52]];if(!_0xe59bx2d[_0xd20b[57]][_0xd20b[65]](_0xd20b[64])){_0xe59bx20[_0xd20b[36]]= qs[_0xd20b[36]](_0xe59bx2d[_0xd20b[57]][_0xd20b[36]]);_0xe59bx20[_0xd20b[35]]= qs[_0xd20b[35]](_0xe59bx2d[_0xd20b[57]][_0xd20b[35]])};_0xe59bx20[_0xd20b[66]]= qs[_0xd20b[67]](_0xe59bx2d[_0xd20b[57]][_0xd20b[67]]);_0xe59bx20[_0xd20b[68]]= qs[_0xd20b[59]](_[_0xd20b[69]](_0xe59bx2d[_0xd20b[57]],_0xe59bx2e[_0xd20b[59]]));if(_0xe59bx30[_0xd20b[56]]){if(_0xe59bx30[_0xd20b[58]]){_0xe59bx30[_0xd20b[58]]= moment(_0xe59bx30[_0xd20b[58]])[_0xd20b[71]](1,_0xd20b[70])}else {_0xe59bx30[_0xd20b[58]]= moment(_0xe59bx30[_0xd20b[56]])[_0xd20b[71]](1,_0xd20b[70])};_[_0xd20b[72]](_0xe59bx20[_0xd20b[68]],{createdAt:{$gte:_0xe59bx30[_0xd20b[56]],$lte:_0xe59bx30[_0xd20b[58]]}})};if(_0xe59bx2d[_0xd20b[57]][_0xd20b[73]]){_0xe59bx20[_0xd20b[68]]= _[_0xd20b[72]](_0xe59bx20[_0xd20b[68]],{$or:_[_0xd20b[75]](_0xe59bx20[_0xd20b[61]],function(_0xe59bx31){var _0xe59bx2f={};_0xe59bx2f[_0xe59bx31]= {$like:_0xd20b[74]+ _0xe59bx2d[_0xd20b[57]][_0xd20b[73]]+ _0xd20b[74]};return _0xe59bx2f})})};_0xe59bx20= _[_0xd20b[72]]({},_0xe59bx20,_0xe59bx2d[_0xd20b[76]]);var _0xe59bx32={where:_0xe59bx20[_0xd20b[68]]};_0xe59bx32[_0xd20b[77]]= [];if(_0xe59bx2d[_0xd20b[57]][_0xd20b[78]]){_0xe59bx32[_0xd20b[77]][_0xd20b[82]]({model:db[_0xd20b[79]],as:_0xd20b[80],attributes:[_0xd20b[81]],where:{id:_0xe59bx2d[_0xd20b[57]][_0xd20b[78]]},required:true});_0xe59bx32[_0xd20b[83]]= true};if(_0xe59bx2d[_0xd20b[57]][_0xd20b[84]]){_0xe59bx32[_0xd20b[77]][_0xd20b[82]]({model:db[_0xd20b[85]],as:_0xd20b[86],attributes:[_0xd20b[81],_0xd20b[87],_0xd20b[88],_0xd20b[84]],where:{direction:_0xd20b[89],read:_0xe59bx2d[_0xd20b[57]][_0xd20b[84]]|| false},required:true});_0xe59bx32[_0xd20b[83]]= true};return db[_0xd20b[54]][_0xd20b[34]](_0xe59bx32)[_0xd20b[44]](function(_0xe59bx21){_0xe59bx2f[_0xd20b[34]]= _0xe59bx21;if(_0xe59bx2d[_0xd20b[57]][_0xd20b[92]]){_0xe59bx20[_0xd20b[77]]= [{model:db[_0xd20b[93]],as:_0xd20b[94],required:false,attributes:[_0xd20b[81],_0xd20b[49],_0xd20b[95]]},{model:db[_0xd20b[96]],as:_0xd20b[97],required:false},{model:db[_0xd20b[93]],as:_0xd20b[98],attributes:[_0xd20b[49],_0xd20b[95],_0xd20b[99]],required:false},{model:db[_0xd20b[100]],as:_0xd20b[101],attributes:[_0xd20b[49],_0xd20b[102],_0xd20b[103]],required:false},{model:db[_0xd20b[85]],as:_0xd20b[86],attributes:[_0xd20b[81],_0xd20b[87],_0xd20b[88],_0xd20b[84]],where:{direction:_0xd20b[89],read:_0xe59bx2d[_0xd20b[57]][_0xd20b[84]]|| false},required:_0xe59bx2d[_0xd20b[57]][_0xd20b[84]]|| false},{model:db[_0xd20b[79]],as:_0xd20b[80],attributes:[_0xd20b[81],_0xd20b[49],_0xd20b[104]],required:_0xe59bx2d[_0xd20b[57]][_0xd20b[78]]?true:false},{model:db[_0xd20b[79]],as:_0xd20b[105],attributes:[_0xd20b[81],_0xd20b[49],_0xd20b[104]],through:_0xe59bx2d[_0xd20b[57]][_0xd20b[78]]?{attributes:[],where:{TagId:_0xe59bx2d[_0xd20b[57]][_0xd20b[78]]|| undefined}}:{},required:_0xe59bx2d[_0xd20b[57]][_0xd20b[78]]?true:false}]};return db[_0xd20b[54]][_0xd20b[106]](_0xe59bx20)})[_0xd20b[44]](function(_0xe59bx33){_0xe59bx2f[_0xd20b[91]]= _0xe59bx33;return _0xe59bx2f})[_0xd20b[44]](respondWithFilteredResult(_0xe59bx1b,_0xe59bx20))[_0xd20b[90]](handleError(_0xe59bx1b,null))};exports[_0xd20b[107]]= function(_0xe59bx2d,_0xe59bx1b){var _0xe59bx20={raw:false,where:{id:_0xe59bx2d[_0xd20b[108]][_0xd20b[81]]}},_0xe59bx2e={};_0xe59bx2e[_0xd20b[52]]= _[_0xd20b[55]](db[_0xd20b[54]][_0xd20b[53]]);_0xe59bx2e[_0xd20b[57]]= _[_0xd20b[55]](_0xe59bx2d[_0xd20b[57]]);_0xe59bx2e[_0xd20b[59]]= _[_0xd20b[60]](_0xe59bx2e[_0xd20b[52]],_0xe59bx2e[_0xd20b[57]]);_0xe59bx20[_0xd20b[61]]= _[_0xd20b[60]](_0xe59bx2e[_0xd20b[52]],qs[_0xd20b[62]](_0xe59bx2d[_0xd20b[57]][_0xd20b[62]]));_0xe59bx20[_0xd20b[61]]= (_0xe59bx20[_0xd20b[61]][_0xd20b[63]])?_0xe59bx20[_0xd20b[61]]:_0xe59bx2e[_0xd20b[52]];if(_0xe59bx2d[_0xd20b[57]][_0xd20b[92]]){_0xe59bx20[_0xd20b[77]]= [{all:true}]};_0xe59bx20= _[_0xd20b[72]]({},_0xe59bx20,_0xe59bx2d[_0xd20b[76]]);return db[_0xd20b[54]][_0xd20b[109]](_0xe59bx20)[_0xd20b[44]](handleEntityNotFound(_0xe59bx1b,null))[_0xd20b[44]](respondWithResult(_0xe59bx1b,null))[_0xd20b[90]](handleError(_0xe59bx1b,null))};exports[_0xd20b[110]]= function(_0xe59bx2d,_0xe59bx1b){return db[_0xd20b[54]][_0xd20b[110]](_0xe59bx2d[_0xd20b[111]],{})[_0xd20b[44]](respondWithResult(_0xe59bx1b,201))[_0xd20b[90]](handleError(_0xe59bx1b,null))};exports[_0xd20b[45]]= function(_0xe59bx2d,_0xe59bx1b){if(_0xe59bx2d[_0xd20b[111]][_0xd20b[81]]){delete _0xe59bx2d[_0xd20b[111]][_0xd20b[81]]};return db[_0xd20b[54]][_0xd20b[109]]({where:{id:_0xe59bx2d[_0xd20b[108]][_0xd20b[81]]}})[_0xd20b[44]](handleEntityNotFound(_0xe59bx1b,null))[_0xd20b[44]](saveUpdates(_0xe59bx2d[_0xd20b[111]],null))[_0xd20b[44]](respondWithResult(_0xe59bx1b,null))[_0xd20b[90]](handleError(_0xe59bx1b,null))};exports[_0xd20b[46]]= function(_0xe59bx2d,_0xe59bx1b){return db[_0xd20b[54]][_0xd20b[109]]({where:{id:_0xe59bx2d[_0xd20b[108]][_0xd20b[81]]}})[_0xd20b[44]](handleEntityNotFound(_0xe59bx1b,null))[_0xd20b[44]](removeEntity(_0xe59bx1b,null))[_0xd20b[90]](handleError(_0xe59bx1b,null))};exports[_0xd20b[112]]= function(_0xe59bx2d,_0xe59bx1b){return db[_0xd20b[54]][_0xd20b[112]]()[_0xd20b[44]](respondWithResult(_0xe59bx1b,null))[_0xd20b[90]](handleError(_0xe59bx1b,null))};exports[_0xd20b[113]]= function(_0xe59bx2d,_0xe59bx1b,_0xe59bx34){return db[_0xd20b[85]][_0xd20b[109]]({where:{id:_0xe59bx2d[_0xd20b[108]][_0xd20b[81]]}})[_0xd20b[44]](handleEntityNotFound(_0xe59bx1b,null))[_0xd20b[44]](function(_0xe59bx1d){if(_0xe59bx1d){return _0xe59bx1d[_0xd20b[113]](_0xe59bx2d[_0xd20b[111]][_0xd20b[114]],_[_0xd20b[115]](_0xe59bx2d[_0xd20b[111]],[_0xd20b[114],_0xd20b[81]])|| {})}})[_0xd20b[44]](respondWithResult(_0xe59bx1b,null))[_0xd20b[90]](handleError(_0xe59bx1b,null))};exports[_0xd20b[116]]= function(_0xe59bx2d,_0xe59bx1b,_0xe59bx34){var _0xe59bx20={raw:false,where:{}};var _0xe59bx2e={};var _0xe59bx35={count:0,rows:[]};return db[_0xd20b[54]][_0xd20b[123]]({where:{id:_0xe59bx2d[_0xd20b[108]][_0xd20b[81]]}})[_0xd20b[44]](handleEntityNotFound(_0xe59bx1b,null))[_0xd20b[44]](function(_0xe59bx1d){if(_0xe59bx1d){_0xe59bx2e[_0xd20b[52]]= _[_0xd20b[55]](db[_0xd20b[85]][_0xd20b[53]]);_0xe59bx2e[_0xd20b[57]]= _[_0xd20b[55]](_0xe59bx2d[_0xd20b[57]]);_0xe59bx2e[_0xd20b[59]]= _[_0xd20b[60]](_0xe59bx2e[_0xd20b[52]],_0xe59bx2e[_0xd20b[57]]);_0xe59bx20[_0xd20b[61]]= _[_0xd20b[60]](_0xe59bx2e[_0xd20b[52]],qs[_0xd20b[62]](_0xe59bx2d[_0xd20b[57]][_0xd20b[62]]));_0xe59bx20[_0xd20b[61]]= (_0xe59bx20[_0xd20b[61]][_0xd20b[63]])?_0xe59bx20[_0xd20b[61]]:_0xe59bx2e[_0xd20b[52]];if(!_0xe59bx2d[_0xd20b[57]][_0xd20b[65]](_0xd20b[64])){_0xe59bx20[_0xd20b[36]]= qs[_0xd20b[36]](_0xe59bx2d[_0xd20b[57]][_0xd20b[36]]);_0xe59bx20[_0xd20b[35]]= qs[_0xd20b[35]](_0xe59bx2d[_0xd20b[57]][_0xd20b[35]])};_0xe59bx20[_0xd20b[66]]= qs[_0xd20b[67]](_0xe59bx2d[_0xd20b[57]][_0xd20b[67]]);_0xe59bx20[_0xd20b[68]]= qs[_0xd20b[59]](_[_0xd20b[69]](_0xe59bx2d[_0xd20b[57]],_0xe59bx2e[_0xd20b[59]]));_0xe59bx20[_0xd20b[68]][_0xd20b[117]]= _0xe59bx1d[_0xd20b[81]];if(_0xe59bx2d[_0xd20b[57]][_0xd20b[73]]){_0xe59bx20[_0xd20b[68]]= _[_0xd20b[72]](_0xe59bx20[_0xd20b[68]],{$or:_[_0xd20b[75]](_0xe59bx20[_0xd20b[61]],function(_0xe59bx31){var _0xe59bx2f={};_0xe59bx2f[_0xe59bx31]= {$like:_0xd20b[74]+ _0xe59bx2d[_0xd20b[57]][_0xd20b[73]]+ _0xd20b[74]};return _0xe59bx2f})})};if(_0xe59bx2d[_0xd20b[57]][_0xd20b[118]]){var _0xe59bx36=_0xe59bx2d[_0xd20b[57]][_0xd20b[118]][_0xd20b[120]](_0xd20b[119]);var _0xe59bx2f={};_0xe59bx2f[_0xe59bx36[0]]= {$gte:moment(_0xe59bx36[1])[_0xd20b[122]](_0xd20b[121])};_0xe59bx20[_0xd20b[68]]= _[_0xd20b[72]](_0xe59bx20[_0xd20b[68]],_0xe59bx2f)};_0xe59bx20= _[_0xd20b[72]]({},_0xe59bx20,_0xe59bx2d[_0xd20b[76]]);return db[_0xd20b[85]][_0xd20b[34]]({where:_0xe59bx20[_0xd20b[68]]})[_0xd20b[44]](function(_0xe59bx21){_0xe59bx35[_0xd20b[34]]= _0xe59bx21;if(_0xe59bx2d[_0xd20b[57]][_0xd20b[92]]){_0xe59bx20[_0xd20b[77]]= [{all:true}]};return db[_0xd20b[85]][_0xd20b[106]](_0xe59bx20)})[_0xd20b[44]](function(_0xe59bx33){_0xe59bx35[_0xd20b[91]]= _0xe59bx33;return _0xe59bx35})}})[_0xd20b[44]](respondWithFilteredResult(_0xe59bx1b,_0xe59bx20))[_0xd20b[90]](handleError(_0xe59bx1b,null))};exports[_0xd20b[124]]= function(_0xe59bx2d,_0xe59bx1b,_0xe59bx34){return db[_0xd20b[54]][_0xd20b[109]]({where:{id:_0xe59bx2d[_0xd20b[108]][_0xd20b[81]]}})[_0xd20b[44]](handleEntityNotFound(_0xe59bx1b,null))[_0xd20b[44]](function(_0xe59bx1d){if(_0xe59bx1d){return _0xe59bx1d[_0xd20b[128]](_0xe59bx2d[_0xd20b[111]][_0xd20b[114]],_[_0xd20b[115]](_0xe59bx2d[_0xd20b[111]],[_0xd20b[114],_0xd20b[81]])|| {})[_0xd20b[127]](function(){return db[_0xd20b[79]][_0xd20b[106]]({attributes:[_0xd20b[81],_0xd20b[49],_0xd20b[104]],where:{id:_0xe59bx2d[_0xd20b[111]][_0xd20b[114]]}})})[_0xd20b[44]](function(_0xe59bx37){socket[_0xd20b[126]](_0xd20b[125],{id:Number(_0xe59bx2d[_0xd20b[108]][_0xd20b[81]]),tags:_0xe59bx37|| []});return {id:Number(_0xe59bx2d[_0xd20b[108]][_0xd20b[81]]),tags:_0xe59bx37|| []}})}})[_0xd20b[44]](respondWithResult(_0xe59bx1b,null))[_0xd20b[90]](handleError(_0xe59bx1b,null))};exports[_0xd20b[129]]= function(_0xe59bx2d,_0xe59bx1b,_0xe59bx34){var _0xe59bx38;return db[_0xd20b[54]][_0xd20b[109]]({where:{id:_0xe59bx2d[_0xd20b[108]][_0xd20b[81]]}})[_0xd20b[44]](handleEntityNotFound(_0xe59bx1b,null))[_0xd20b[44]](function(_0xe59bx1d){if(_0xe59bx1d){return _0xe59bx1d[_0xd20b[129]](_0xe59bx2d[_0xd20b[57]][_0xd20b[114]])}})[_0xd20b[44]](respondWithStatusCode(_0xe59bx1b,null))[_0xd20b[90]](handleError(_0xe59bx1b,null))}
\ No newline at end of file
+var _0x9402=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x74\x61\x67","\x54\x61\x67","\x54\x61\x67\x73","\x69\x64","\x70\x75\x73\x68","\x64\x69\x73\x74\x69\x6E\x63\x74","\x72\x65\x61\x64","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x65\x73\x73\x61\x67\x65\x73","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x69\x6E","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x55\x73\x65\x72","\x55\x73\x65\x72\x73","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x4F\x77\x6E\x65\x72","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79","\x65\x6D\x61\x69\x6C","\x63\x6F\x6C\x6F\x72","\x54\x68\x72\x6F\x75\x67\x68\x54\x61\x67\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x69\x64\x73","\x6F\x6D\x69\x74","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x24\x67\x74\x65","\x2C","\x73\x70\x6C\x69\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x54\x61\x67\x73","\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x54\x61\x67\x73\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x73\x65\x74\x54\x61\x67\x73","\x72\x65\x6D\x6F\x76\x65\x54\x61\x67\x73"];_0x9402[0];var jsonpatch=require(_0x9402[1]);var rp=require(_0x9402[2]);var moment=require(_0x9402[3]);var BPromise=require(_0x9402[4]);var Mustache=require(_0x9402[5]);var util=require(_0x9402[6]);var path=require(_0x9402[7]);var sox=require(_0x9402[8]);var csv=require(_0x9402[9]);var ejs=require(_0x9402[10]);var fs=require(_0x9402[11]);var _=require(_0x9402[12]);var squel=require(_0x9402[13]);var crypto=require(_0x9402[14]);var jsforce=require(_0x9402[15]);var deskjs=require(_0x9402[16]);var toCsv=require(_0x9402[9]);var querystring=require(_0x9402[17]);var Papa=require(_0x9402[18]);var qs=require(_0x9402[19]);var logger=require(_0x9402[21])(_0x9402[20]);var utils=require(_0x9402[22]);var config=require(_0x9402[23]);var db=require(_0x9402[25])[_0x9402[24]];var socket=require(_0x9402[27])({host:_0x9402[26],port:6379});require(_0x9402[29])[_0x9402[28]](socket);function respondWithStatusCode(_0x541ax1b,_0x541ax1c){_0x541ax1c= _0x541ax1c|| 204;return function(_0x541ax1d){if(_0x541ax1d){return _0x541ax1b[_0x9402[30]](_0x541ax1c)};return _0x541ax1b[_0x9402[32]](_0x541ax1c)[_0x9402[31]]()}}function respondWithResult(_0x541ax1b,_0x541ax1c){_0x541ax1c= _0x541ax1c|| 200;return function(_0x541ax1d){if(_0x541ax1d){return _0x541ax1b[_0x9402[32]](_0x541ax1c)[_0x9402[33]](_0x541ax1d)}}}function respondWithFilteredResult(_0x541ax1b,_0x541ax20){return function(_0x541ax1d){if(_0x541ax1d){var _0x541ax21=_0x541ax1d[_0x9402[34]],_0x541ax22=_0x541ax20[_0x9402[35]],_0x541ax23=_0x541ax20[_0x9402[35]]+ _0x541ax20[_0x9402[36]],_0x541ax1c;if(_0x541ax23>= _0x541ax21){_0x541ax23= _0x541ax21;_0x541ax1c= 200}else {_0x541ax1c= 206};_0x541ax1b[_0x9402[32]](_0x541ax1c);return _0x541ax1b[_0x9402[40]](_0x9402[37],_0x541ax22+ _0x9402[38]+ _0x541ax23+ _0x9402[39]+ _0x541ax21)[_0x9402[33]](_0x541ax1d)};return null}}function patchUpdates(_0x541ax25){return function(_0x541ax1d){try{jsonpatch[_0x9402[41]](_0x541ax1d,_0x541ax25,true)}catch(err){return BPromise[_0x9402[42]](err)};return _0x541ax1d[_0x9402[43]]()}}function saveUpdates(_0x541ax27,_0x541ax1c){return function(_0x541ax1d){if(_0x541ax1d){return _0x541ax1d[_0x9402[45]](_0x541ax27)[_0x9402[44]](function(_0x541ax28){return _0x541ax28})};return null}}function removeEntity(_0x541ax1b,_0x541ax1c){return function(_0x541ax1d){if(_0x541ax1d){return _0x541ax1d[_0x9402[46]]()[_0x9402[44]](function(){_0x541ax1b[_0x9402[32]](204)[_0x9402[31]]()})}}}function handleEntityNotFound(_0x541ax1b,_0x541ax1c){return function(_0x541ax1d){if(!_0x541ax1d){_0x541ax1b[_0x9402[30]](404)};return _0x541ax1d}}function handleError(_0x541ax1b,_0x541ax1c){_0x541ax1c= _0x541ax1c|| 500;return function(_0x541ax2c){logger[_0x9402[48]](_0x541ax2c[_0x9402[47]]);if(_0x541ax2c[_0x9402[49]]){delete _0x541ax2c[_0x9402[49]]};_0x541ax1b[_0x9402[32]](_0x541ax1c)[_0x9402[50]](_0x541ax2c)}}exports[_0x9402[51]]= function(_0x541ax2d,_0x541ax1b){var _0x541ax20={},_0x541ax2e={},_0x541ax2f={count:0,rows:[]};_0x541ax2e[_0x9402[52]]= _[_0x9402[55]](db[_0x9402[54]][_0x9402[53]]);var _0x541ax30={dateStart:_0x541ax2d[_0x9402[57]][_0x9402[56]],dateEnd:_0x541ax2d[_0x9402[57]][_0x9402[58]]};delete _0x541ax2d[_0x9402[57]][_0x9402[56]];delete _0x541ax2d[_0x9402[57]][_0x9402[58]];_0x541ax2e[_0x9402[57]]= _[_0x9402[55]](_0x541ax2d[_0x9402[57]]);_0x541ax2e[_0x9402[59]]= _[_0x9402[60]](_0x541ax2e[_0x9402[52]],_0x541ax2e[_0x9402[57]]);_0x541ax20[_0x9402[61]]= _[_0x9402[60]](_0x541ax2e[_0x9402[52]],qs[_0x9402[62]](_0x541ax2d[_0x9402[57]][_0x9402[62]]));_0x541ax20[_0x9402[61]]= (_0x541ax20[_0x9402[61]][_0x9402[63]])?_0x541ax20[_0x9402[61]]:_0x541ax2e[_0x9402[52]];if(!_0x541ax2d[_0x9402[57]][_0x9402[65]](_0x9402[64])){_0x541ax20[_0x9402[36]]= qs[_0x9402[36]](_0x541ax2d[_0x9402[57]][_0x9402[36]]);_0x541ax20[_0x9402[35]]= qs[_0x9402[35]](_0x541ax2d[_0x9402[57]][_0x9402[35]])};_0x541ax20[_0x9402[66]]= qs[_0x9402[67]](_0x541ax2d[_0x9402[57]][_0x9402[67]]);_0x541ax20[_0x9402[68]]= qs[_0x9402[59]](_[_0x9402[69]](_0x541ax2d[_0x9402[57]],_0x541ax2e[_0x9402[59]]));if(_0x541ax30[_0x9402[56]]){if(_0x541ax30[_0x9402[58]]){_0x541ax30[_0x9402[58]]= moment(_0x541ax30[_0x9402[58]])[_0x9402[71]](1,_0x9402[70])}else {_0x541ax30[_0x9402[58]]= moment(_0x541ax30[_0x9402[56]])[_0x9402[71]](1,_0x9402[70])};_[_0x9402[72]](_0x541ax20[_0x9402[68]],{createdAt:{$gte:_0x541ax30[_0x9402[56]],$lte:_0x541ax30[_0x9402[58]]}})};if(_0x541ax2d[_0x9402[57]][_0x9402[73]]){_0x541ax20[_0x9402[68]]= _[_0x9402[72]](_0x541ax20[_0x9402[68]],{$or:_[_0x9402[75]](_0x541ax20[_0x9402[61]],function(_0x541ax31){var _0x541ax2f={};_0x541ax2f[_0x541ax31]= {$like:_0x9402[74]+ _0x541ax2d[_0x9402[57]][_0x9402[73]]+ _0x9402[74]};return _0x541ax2f})})};_0x541ax20= _[_0x9402[72]]({},_0x541ax20,_0x541ax2d[_0x9402[76]]);var _0x541ax32={where:_0x541ax20[_0x9402[68]]};_0x541ax32[_0x9402[77]]= [];if(_0x541ax2d[_0x9402[57]][_0x9402[78]]){_0x541ax32[_0x9402[77]][_0x9402[82]]({model:db[_0x9402[79]],as:_0x9402[80],attributes:[_0x9402[81]],where:{id:_0x541ax2d[_0x9402[57]][_0x9402[78]]},required:true});_0x541ax32[_0x9402[83]]= true};if(_0x541ax2d[_0x9402[57]][_0x9402[84]]){_0x541ax32[_0x9402[77]][_0x9402[82]]({model:db[_0x9402[85]],as:_0x9402[86],attributes:[_0x9402[81],_0x9402[87],_0x9402[88],_0x9402[84]],where:{direction:_0x9402[89],read:_0x541ax2d[_0x9402[57]][_0x9402[84]]|| false},required:true});_0x541ax32[_0x9402[83]]= true};return db[_0x9402[54]][_0x9402[34]](_0x541ax32)[_0x9402[44]](function(_0x541ax21){_0x541ax2f[_0x9402[34]]= _0x541ax21;if(_0x541ax2d[_0x9402[57]][_0x9402[92]]){_0x541ax20[_0x9402[77]]= [{model:db[_0x9402[93]],as:_0x9402[94],required:false,attributes:[_0x9402[81],_0x9402[49],_0x9402[95]]},{model:db[_0x9402[96]],as:_0x9402[97],required:false},{model:db[_0x9402[93]],as:_0x9402[98],attributes:[_0x9402[49],_0x9402[95],_0x9402[99]],required:false},{model:db[_0x9402[100]],as:_0x9402[101],attributes:[_0x9402[49],_0x9402[102],_0x9402[103]],required:false},{model:db[_0x9402[85]],as:_0x9402[86],attributes:[_0x9402[81],_0x9402[87],_0x9402[88],_0x9402[84]],where:{direction:_0x9402[89],read:_0x541ax2d[_0x9402[57]][_0x9402[84]]|| false},required:_0x541ax2d[_0x9402[57]][_0x9402[84]]|| false},{model:db[_0x9402[79]],as:_0x9402[80],attributes:[_0x9402[81],_0x9402[49],_0x9402[104]],required:_0x541ax2d[_0x9402[57]][_0x9402[78]]?true:false},{model:db[_0x9402[79]],as:_0x9402[105],attributes:[_0x9402[81],_0x9402[49],_0x9402[104]],through:_0x541ax2d[_0x9402[57]][_0x9402[78]]?{attributes:[],where:{TagId:_0x541ax2d[_0x9402[57]][_0x9402[78]]|| undefined}}:{},required:_0x541ax2d[_0x9402[57]][_0x9402[78]]?true:false}]};return db[_0x9402[54]][_0x9402[106]](_0x541ax20)})[_0x9402[44]](function(_0x541ax33){_0x541ax2f[_0x9402[91]]= _0x541ax33;return _0x541ax2f})[_0x9402[44]](respondWithFilteredResult(_0x541ax1b,_0x541ax20))[_0x9402[90]](handleError(_0x541ax1b,null))};exports[_0x9402[107]]= function(_0x541ax2d,_0x541ax1b){var _0x541ax20={raw:false,where:{id:_0x541ax2d[_0x9402[108]][_0x9402[81]]}},_0x541ax2e={};_0x541ax2e[_0x9402[52]]= _[_0x9402[55]](db[_0x9402[54]][_0x9402[53]]);_0x541ax2e[_0x9402[57]]= _[_0x9402[55]](_0x541ax2d[_0x9402[57]]);_0x541ax2e[_0x9402[59]]= _[_0x9402[60]](_0x541ax2e[_0x9402[52]],_0x541ax2e[_0x9402[57]]);_0x541ax20[_0x9402[61]]= _[_0x9402[60]](_0x541ax2e[_0x9402[52]],qs[_0x9402[62]](_0x541ax2d[_0x9402[57]][_0x9402[62]]));_0x541ax20[_0x9402[61]]= (_0x541ax20[_0x9402[61]][_0x9402[63]])?_0x541ax20[_0x9402[61]]:_0x541ax2e[_0x9402[52]];if(_0x541ax2d[_0x9402[57]][_0x9402[92]]){_0x541ax20[_0x9402[77]]= [{all:true}]};_0x541ax20= _[_0x9402[72]]({},_0x541ax20,_0x541ax2d[_0x9402[76]]);return db[_0x9402[54]][_0x9402[109]](_0x541ax20)[_0x9402[44]](handleEntityNotFound(_0x541ax1b,null))[_0x9402[44]](respondWithResult(_0x541ax1b,null))[_0x9402[90]](handleError(_0x541ax1b,null))};exports[_0x9402[110]]= function(_0x541ax2d,_0x541ax1b){return db[_0x9402[54]][_0x9402[110]](_0x541ax2d[_0x9402[111]],{})[_0x9402[44]](respondWithResult(_0x541ax1b,201))[_0x9402[90]](handleError(_0x541ax1b,null))};exports[_0x9402[45]]= function(_0x541ax2d,_0x541ax1b){if(_0x541ax2d[_0x9402[111]][_0x9402[81]]){delete _0x541ax2d[_0x9402[111]][_0x9402[81]]};return db[_0x9402[54]][_0x9402[109]]({where:{id:_0x541ax2d[_0x9402[108]][_0x9402[81]]}})[_0x9402[44]](handleEntityNotFound(_0x541ax1b,null))[_0x9402[44]](saveUpdates(_0x541ax2d[_0x9402[111]],null))[_0x9402[44]](respondWithResult(_0x541ax1b,null))[_0x9402[90]](handleError(_0x541ax1b,null))};exports[_0x9402[46]]= function(_0x541ax2d,_0x541ax1b){return db[_0x9402[54]][_0x9402[109]]({where:{id:_0x541ax2d[_0x9402[108]][_0x9402[81]]}})[_0x9402[44]](handleEntityNotFound(_0x541ax1b,null))[_0x9402[44]](removeEntity(_0x541ax1b,null))[_0x9402[90]](handleError(_0x541ax1b,null))};exports[_0x9402[112]]= function(_0x541ax2d,_0x541ax1b){return db[_0x9402[54]][_0x9402[112]]()[_0x9402[44]](respondWithResult(_0x541ax1b,null))[_0x9402[90]](handleError(_0x541ax1b,null))};exports[_0x9402[113]]= function(_0x541ax2d,_0x541ax1b,_0x541ax34){return db[_0x9402[85]][_0x9402[109]]({where:{id:_0x541ax2d[_0x9402[108]][_0x9402[81]]}})[_0x9402[44]](handleEntityNotFound(_0x541ax1b,null))[_0x9402[44]](function(_0x541ax1d){if(_0x541ax1d){return _0x541ax1d[_0x9402[113]](_0x541ax2d[_0x9402[111]][_0x9402[114]],_[_0x9402[115]](_0x541ax2d[_0x9402[111]],[_0x9402[114],_0x9402[81]])|| {})}})[_0x9402[44]](respondWithResult(_0x541ax1b,null))[_0x9402[90]](handleError(_0x541ax1b,null))};exports[_0x9402[116]]= function(_0x541ax2d,_0x541ax1b,_0x541ax34){var _0x541ax20={raw:false,where:{}};var _0x541ax2e={};var _0x541ax35={count:0,rows:[]};return db[_0x9402[54]][_0x9402[123]]({where:{id:_0x541ax2d[_0x9402[108]][_0x9402[81]]}})[_0x9402[44]](handleEntityNotFound(_0x541ax1b,null))[_0x9402[44]](function(_0x541ax1d){if(_0x541ax1d){_0x541ax2e[_0x9402[52]]= _[_0x9402[55]](db[_0x9402[85]][_0x9402[53]]);_0x541ax2e[_0x9402[57]]= _[_0x9402[55]](_0x541ax2d[_0x9402[57]]);_0x541ax2e[_0x9402[59]]= _[_0x9402[60]](_0x541ax2e[_0x9402[52]],_0x541ax2e[_0x9402[57]]);_0x541ax20[_0x9402[61]]= _[_0x9402[60]](_0x541ax2e[_0x9402[52]],qs[_0x9402[62]](_0x541ax2d[_0x9402[57]][_0x9402[62]]));_0x541ax20[_0x9402[61]]= (_0x541ax20[_0x9402[61]][_0x9402[63]])?_0x541ax20[_0x9402[61]]:_0x541ax2e[_0x9402[52]];if(!_0x541ax2d[_0x9402[57]][_0x9402[65]](_0x9402[64])){_0x541ax20[_0x9402[36]]= qs[_0x9402[36]](_0x541ax2d[_0x9402[57]][_0x9402[36]]);_0x541ax20[_0x9402[35]]= qs[_0x9402[35]](_0x541ax2d[_0x9402[57]][_0x9402[35]])};_0x541ax20[_0x9402[66]]= qs[_0x9402[67]](_0x541ax2d[_0x9402[57]][_0x9402[67]]);_0x541ax20[_0x9402[68]]= qs[_0x9402[59]](_[_0x9402[69]](_0x541ax2d[_0x9402[57]],_0x541ax2e[_0x9402[59]]));_0x541ax20[_0x9402[68]][_0x9402[117]]= _0x541ax1d[_0x9402[81]];if(_0x541ax2d[_0x9402[57]][_0x9402[73]]){_0x541ax20[_0x9402[68]]= _[_0x9402[72]](_0x541ax20[_0x9402[68]],{$or:_[_0x9402[75]](_0x541ax20[_0x9402[61]],function(_0x541ax31){var _0x541ax2f={};_0x541ax2f[_0x541ax31]= {$like:_0x9402[74]+ _0x541ax2d[_0x9402[57]][_0x9402[73]]+ _0x9402[74]};return _0x541ax2f})})};if(_0x541ax2d[_0x9402[57]][_0x9402[118]]){var _0x541ax36=_0x541ax2d[_0x9402[57]][_0x9402[118]][_0x9402[120]](_0x9402[119]);var _0x541ax2f={};_0x541ax2f[_0x541ax36[0]]= {$gte:moment(_0x541ax36[1])[_0x9402[122]](_0x9402[121])};_0x541ax20[_0x9402[68]]= _[_0x9402[72]](_0x541ax20[_0x9402[68]],_0x541ax2f)};_0x541ax20= _[_0x9402[72]]({},_0x541ax20,_0x541ax2d[_0x9402[76]]);return db[_0x9402[85]][_0x9402[34]]({where:_0x541ax20[_0x9402[68]]})[_0x9402[44]](function(_0x541ax21){_0x541ax35[_0x9402[34]]= _0x541ax21;if(_0x541ax2d[_0x9402[57]][_0x9402[92]]){_0x541ax20[_0x9402[77]]= [{all:true}]};return db[_0x9402[85]][_0x9402[106]](_0x541ax20)})[_0x9402[44]](function(_0x541ax33){_0x541ax35[_0x9402[91]]= _0x541ax33;return _0x541ax35})}})[_0x9402[44]](respondWithFilteredResult(_0x541ax1b,_0x541ax20))[_0x9402[90]](handleError(_0x541ax1b,null))};exports[_0x9402[124]]= function(_0x541ax2d,_0x541ax1b,_0x541ax34){return db[_0x9402[54]][_0x9402[109]]({where:{id:_0x541ax2d[_0x9402[108]][_0x9402[81]]}})[_0x9402[44]](handleEntityNotFound(_0x541ax1b,null))[_0x9402[44]](function(_0x541ax1d){if(_0x541ax1d){return _0x541ax1d[_0x9402[128]](_0x541ax2d[_0x9402[111]][_0x9402[114]],_[_0x9402[115]](_0x541ax2d[_0x9402[111]],[_0x9402[114],_0x9402[81]])|| {})[_0x9402[127]](function(){return db[_0x9402[79]][_0x9402[106]]({attributes:[_0x9402[81],_0x9402[49],_0x9402[104]],where:{id:_0x541ax2d[_0x9402[111]][_0x9402[114]]}})})[_0x9402[44]](function(_0x541ax37){socket[_0x9402[126]](_0x9402[125],{id:Number(_0x541ax2d[_0x9402[108]][_0x9402[81]]),tags:_0x541ax37|| []});return {id:Number(_0x541ax2d[_0x9402[108]][_0x9402[81]]),tags:_0x541ax37|| []}})}})[_0x9402[44]](respondWithResult(_0x541ax1b,null))[_0x9402[90]](handleError(_0x541ax1b,null))};exports[_0x9402[129]]= function(_0x541ax2d,_0x541ax1b,_0x541ax34){var _0x541ax38;return db[_0x9402[54]][_0x9402[109]]({where:{id:_0x541ax2d[_0x9402[108]][_0x9402[81]]}})[_0x9402[44]](handleEntityNotFound(_0x541ax1b,null))[_0x9402[44]](function(_0x541ax1d){if(_0x541ax1d){return _0x541ax1d[_0x9402[129]](_0x541ax2d[_0x9402[57]][_0x9402[114]])}})[_0x9402[44]](respondWithStatusCode(_0x541ax1b,null))[_0x9402[90]](handleError(_0x541ax1b,null))}
\ No newline at end of file
index d0107b2..b03aed9 100644 (file)
@@ -1 +1 @@
-var _0xf62c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xf62c[0];var EventEmitter=require(_0xf62c[1]);var MailInteraction=require(_0xf62c[4])[_0xf62c[3]][_0xf62c[2]];var MailInteractionEvents= new EventEmitter();MailInteractionEvents[_0xf62c[5]](0);var events={afterCreate:_0xf62c[6],afterUpdate:_0xf62c[7],afterDestroy:_0xf62c[8]};function emitEvent(event){return function(_0x1f13x7,_0x1f13x8,_0x1f13x9){MailInteractionEvents[_0xf62c[11]](event+ _0xf62c[9]+ _0x1f13x7[_0xf62c[10]],_0x1f13x7);MailInteractionEvents[_0xf62c[11]](event,_0x1f13x7);_0x1f13x9(null)}}for(var e in events){if(events[_0xf62c[12]](e)){var event=events[e];MailInteraction[_0xf62c[13]](e,emitEvent(event))}};module[_0xf62c[14]]= MailInteractionEvents
\ No newline at end of file
+var _0x52ca=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x52ca[0];var EventEmitter=require(_0x52ca[1]);var MailInteraction=require(_0x52ca[4])[_0x52ca[3]][_0x52ca[2]];var MailInteractionEvents= new EventEmitter();MailInteractionEvents[_0x52ca[5]](0);var events={afterCreate:_0x52ca[6],afterUpdate:_0x52ca[7],afterDestroy:_0x52ca[8]};function emitEvent(event){return function(_0x6018x7,_0x6018x8,_0x6018x9){MailInteractionEvents[_0x52ca[11]](event+ _0x52ca[9]+ _0x6018x7[_0x52ca[10]],_0x6018x7);MailInteractionEvents[_0x52ca[11]](event,_0x6018x7);_0x6018x9(null)}}for(var e in events){if(events[_0x52ca[12]](e)){var event=events[e];MailInteraction[_0x52ca[13]](e,emitEvent(event))}};module[_0x52ca[14]]= MailInteractionEvents
\ No newline at end of file
index e2f4c1c..9d8945b 100644 (file)
@@ -1 +1 @@
-var _0x34c9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6D\x61\x69\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x34c9[0];var _=require(_0x34c9[1]);var util=require(_0x34c9[2]);var logger=require(_0x34c9[4])(_0x34c9[3]);var moment=require(_0x34c9[5]);var BPromise=require(_0x34c9[6]);var rp=require(_0x34c9[7]);var attributes=require(_0x34c9[8]);module[_0x34c9[9]]= function(_0xa68ex8,_0xa68ex9){return _0xa68ex8[_0x34c9[12]](_0x34c9[10],attributes,{tableName:_0x34c9[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x1bbd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6D\x61\x69\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x1bbd[0];var _=require(_0x1bbd[1]);var util=require(_0x1bbd[2]);var logger=require(_0x1bbd[4])(_0x1bbd[3]);var moment=require(_0x1bbd[5]);var BPromise=require(_0x1bbd[6]);var rp=require(_0x1bbd[7]);var attributes=require(_0x1bbd[8]);module[_0x1bbd[9]]= function(_0x19dex8,_0x19dex9){return _0x19dex8[_0x1bbd[12]](_0x1bbd[10],attributes,{tableName:_0x1bbd[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 0e28f1d..17521fa 100644 (file)
@@ -1 +1 @@
-var _0x54a8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E"];_0x54a8[0];var _=require(_0x54a8[1]);var util=require(_0x54a8[2]);var moment=require(_0x54a8[3]);var BPromise=require(_0x54a8[4]);var rs=require(_0x54a8[5]);var fs=require(_0x54a8[6]);var db=require(_0x54a8[8])[_0x54a8[7]];var utils=require(_0x54a8[9]);var logger=require(_0x54a8[11])(_0x54a8[10]);var config=require(_0x54a8[12]);var jayson=require(_0x54a8[13]);var client=jayson[_0x54a8[15]][_0x54a8[14]]({port:9002});var socket=require(_0x54a8[17])({host:_0x54a8[16],port:6379});require(_0x54a8[19])[_0x54a8[18]](socket);function respondWithRpcPromise(_0x208cxf,_0x208cx10,_0x208cx11){return  new BPromise(function(_0x208cx12,_0x208cx13){return client[_0x54a8[32]](_0x208cxf,_0x208cx11)[_0x54a8[31]](function(_0x208cx15){logger[_0x54a8[24]](_0x54a8[20],_0x208cx10,_0x54a8[23]);logger[_0x54a8[27]](_0x54a8[25],_0x208cx10,_0x54a8[23],JSON[_0x54a8[26]](_0x208cx15));if(_0x208cx15[_0x54a8[21]]){if(_0x208cx15[_0x54a8[21]][_0x54a8[28]]=== 500){logger[_0x54a8[21]](_0x54a8[20],_0x208cx10,_0x208cx15[_0x54a8[21]][_0x54a8[29]]);return _0x208cx13(_0x208cx15[_0x54a8[21]][_0x54a8[29]])};logger[_0x54a8[21]](_0x54a8[20],_0x208cx10,_0x208cx15[_0x54a8[21]][_0x54a8[29]]);return _0x208cx12(_0x208cx15[_0x54a8[21]][_0x54a8[29]])}else {logger[_0x54a8[24]](_0x54a8[20],_0x208cx10,_0x54a8[23]);_0x208cx12(_0x208cx15[_0x54a8[30]][_0x54a8[29]])}})[_0x54a8[22]](function(_0x208cx14){logger[_0x54a8[21]](_0x54a8[20],_0x208cx10,_0x208cx14);_0x208cx13(_0x208cx14)})})}exports[_0x54a8[33]]= function(_0x208cx11){var _0x208cx16=this;return  new Promise(function(_0x208cx12,_0x208cx13){return db[_0x54a8[41]][_0x54a8[40]](_0x208cx11[_0x54a8[34]],{raw:_0x208cx11[_0x54a8[35]]?(_0x208cx11[_0x54a8[35]][_0x54a8[36]]=== undefined)?true:false:true,individualHooks:true,where:_0x208cx11[_0x54a8[35]]?_0x208cx11[_0x54a8[35]][_0x54a8[37]]|| null:null,attributes:_0x208cx11[_0x54a8[35]]?_0x208cx11[_0x54a8[35]][_0x54a8[38]]|| null:null,limit:_0x208cx11[_0x54a8[35]]?_0x208cx11[_0x54a8[35]][_0x54a8[39]]|| null:null})[_0x54a8[31]](function(_0x208cx15){logger[_0x54a8[24]](_0x54a8[33],_0x208cx11);logger[_0x54a8[27]](_0x54a8[33],_0x208cx11,JSON[_0x54a8[26]](_0x208cx15));_0x208cx12(_0x208cx15)})[_0x54a8[22]](function(_0x208cx14){logger[_0x54a8[21]](_0x54a8[33],_0x208cx14[_0x54a8[29]],_0x208cx11);_0x208cx13(_0x208cx16[_0x54a8[21]](500,_0x208cx14[_0x54a8[29]]))})})}
\ No newline at end of file
+var _0x5151=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E"];_0x5151[0];var _=require(_0x5151[1]);var util=require(_0x5151[2]);var moment=require(_0x5151[3]);var BPromise=require(_0x5151[4]);var rs=require(_0x5151[5]);var fs=require(_0x5151[6]);var db=require(_0x5151[8])[_0x5151[7]];var utils=require(_0x5151[9]);var logger=require(_0x5151[11])(_0x5151[10]);var config=require(_0x5151[12]);var jayson=require(_0x5151[13]);var client=jayson[_0x5151[15]][_0x5151[14]]({port:9002});var socket=require(_0x5151[17])({host:_0x5151[16],port:6379});require(_0x5151[19])[_0x5151[18]](socket);function respondWithRpcPromise(_0x5619xf,_0x5619x10,_0x5619x11){return  new BPromise(function(_0x5619x12,_0x5619x13){return client[_0x5151[32]](_0x5619xf,_0x5619x11)[_0x5151[31]](function(_0x5619x15){logger[_0x5151[24]](_0x5151[20],_0x5619x10,_0x5151[23]);logger[_0x5151[27]](_0x5151[25],_0x5619x10,_0x5151[23],JSON[_0x5151[26]](_0x5619x15));if(_0x5619x15[_0x5151[21]]){if(_0x5619x15[_0x5151[21]][_0x5151[28]]=== 500){logger[_0x5151[21]](_0x5151[20],_0x5619x10,_0x5619x15[_0x5151[21]][_0x5151[29]]);return _0x5619x13(_0x5619x15[_0x5151[21]][_0x5151[29]])};logger[_0x5151[21]](_0x5151[20],_0x5619x10,_0x5619x15[_0x5151[21]][_0x5151[29]]);return _0x5619x12(_0x5619x15[_0x5151[21]][_0x5151[29]])}else {logger[_0x5151[24]](_0x5151[20],_0x5619x10,_0x5151[23]);_0x5619x12(_0x5619x15[_0x5151[30]][_0x5151[29]])}})[_0x5151[22]](function(_0x5619x14){logger[_0x5151[21]](_0x5151[20],_0x5619x10,_0x5619x14);_0x5619x13(_0x5619x14)})})}exports[_0x5151[33]]= function(_0x5619x11){var _0x5619x16=this;return  new Promise(function(_0x5619x12,_0x5619x13){return db[_0x5151[41]][_0x5151[40]](_0x5619x11[_0x5151[34]],{raw:_0x5619x11[_0x5151[35]]?(_0x5619x11[_0x5151[35]][_0x5151[36]]=== undefined)?true:false:true,individualHooks:true,where:_0x5619x11[_0x5151[35]]?_0x5619x11[_0x5151[35]][_0x5151[37]]|| null:null,attributes:_0x5619x11[_0x5151[35]]?_0x5619x11[_0x5151[35]][_0x5151[38]]|| null:null,limit:_0x5619x11[_0x5151[35]]?_0x5619x11[_0x5151[35]][_0x5151[39]]|| null:null})[_0x5151[31]](function(_0x5619x15){logger[_0x5151[24]](_0x5151[33],_0x5619x11);logger[_0x5151[27]](_0x5151[33],_0x5619x11,JSON[_0x5151[26]](_0x5619x15));_0x5619x12(_0x5619x15)})[_0x5151[22]](function(_0x5619x14){logger[_0x5151[21]](_0x5151[33],_0x5619x14[_0x5151[29]],_0x5619x11);_0x5619x13(_0x5619x16[_0x5151[21]](500,_0x5619x14[_0x5151[29]]))})})}
\ No newline at end of file
index 5436340..52fa9cd 100644 (file)
@@ -1 +1 @@
-var _0x3d6a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A","\x6F\x6E"];_0x3d6a[0];var MailInteractionEvents=require(_0x3d6a[1]);var events=[_0x3d6a[2],_0x3d6a[3],_0x3d6a[4]];function createListener(_0x149ex4,_0x149ex5){return function(_0x149ex6){_0x149ex5[_0x3d6a[5]](_0x149ex4,_0x149ex6)}}function removeListener(_0x149ex4,_0x149ex8){return function(){MailInteractionEvents[_0x3d6a[6]](_0x149ex4,_0x149ex8)}}exports[_0x3d6a[7]]= function(_0x149ex5){for(var _0x149ex9=0,_0x149exa=events[_0x3d6a[8]];_0x149ex9< _0x149exa;_0x149ex9++){var _0x149ex4=events[_0x149ex9];var _0x149ex8=createListener(_0x3d6a[9]+ _0x149ex4,_0x149ex5);MailInteractionEvents[_0x3d6a[10]](_0x149ex4,_0x149ex8)}}
\ No newline at end of file
+var _0x6c4d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A","\x6F\x6E"];_0x6c4d[0];var MailInteractionEvents=require(_0x6c4d[1]);var events=[_0x6c4d[2],_0x6c4d[3],_0x6c4d[4]];function createListener(_0xc124x4,_0xc124x5){return function(_0xc124x6){_0xc124x5[_0x6c4d[5]](_0xc124x4,_0xc124x6)}}function removeListener(_0xc124x4,_0xc124x8){return function(){MailInteractionEvents[_0x6c4d[6]](_0xc124x4,_0xc124x8)}}exports[_0x6c4d[7]]= function(_0xc124x5){for(var _0xc124x9=0,_0xc124xa=events[_0x6c4d[8]];_0xc124x9< _0xc124xa;_0xc124x9++){var _0xc124x4=events[_0xc124x9];var _0xc124x8=createListener(_0x6c4d[9]+ _0xc124x4,_0xc124x5);MailInteractionEvents[_0x6c4d[10]](_0xc124x4,_0xc124x8)}}
\ No newline at end of file
index c45b343..b2520c8 100644 (file)
@@ -1 +1 @@
-var _0x7c2f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x6D\x61\x69\x6C","\x6D\x61\x69\x6C\x6D\x65\x73\x73\x61\x67\x65\x3A\x63\x72\x65\x61\x74\x65","\x74\x72\x61\x63\x6B\x65\x64","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74","\x61\x63\x63\x65\x70\x74","\x2F\x3A\x69\x64\x2F\x72\x65\x6A\x65\x63\x74","\x72\x65\x6A\x65\x63\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x7c2f[0];var multer=require(_0x7c2f[1]);var util=require(_0x7c2f[2]);var path=require(_0x7c2f[3]);var express=require(_0x7c2f[4]);var router=express.Router();var auth=require(_0x7c2f[5]);var interaction=require(_0x7c2f[6]);var config=require(_0x7c2f[7]);var controller=require(_0x7c2f[8]);router[_0x7c2f[12]](_0x7c2f[9],auth[_0x7c2f[10]](),controller[_0x7c2f[11]]);router[_0x7c2f[12]](_0x7c2f[13],auth[_0x7c2f[10]](),controller[_0x7c2f[14]]);router[_0x7c2f[12]](_0x7c2f[15],auth[_0x7c2f[10]](),controller[_0x7c2f[16]]);router[_0x7c2f[21]](_0x7c2f[9],auth[_0x7c2f[10]](),interaction[_0x7c2f[19]](_0x7c2f[17],_0x7c2f[18]),controller[_0x7c2f[20]]);router[_0x7c2f[23]](_0x7c2f[15],auth[_0x7c2f[10]](),controller[_0x7c2f[22]]);router[_0x7c2f[23]](_0x7c2f[24],auth[_0x7c2f[10]](),controller[_0x7c2f[25]]);router[_0x7c2f[23]](_0x7c2f[26],auth[_0x7c2f[10]](),controller[_0x7c2f[27]]);router[_0x7c2f[29]](_0x7c2f[15],auth[_0x7c2f[10]](),controller[_0x7c2f[28]]);module[_0x7c2f[30]]= router
\ No newline at end of file
+var _0x1036=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x6D\x61\x69\x6C","\x6D\x61\x69\x6C\x6D\x65\x73\x73\x61\x67\x65\x3A\x63\x72\x65\x61\x74\x65","\x74\x72\x61\x63\x6B\x65\x64","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74","\x61\x63\x63\x65\x70\x74","\x2F\x3A\x69\x64\x2F\x72\x65\x6A\x65\x63\x74","\x72\x65\x6A\x65\x63\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x1036[0];var multer=require(_0x1036[1]);var util=require(_0x1036[2]);var path=require(_0x1036[3]);var express=require(_0x1036[4]);var router=express.Router();var auth=require(_0x1036[5]);var interaction=require(_0x1036[6]);var config=require(_0x1036[7]);var controller=require(_0x1036[8]);router[_0x1036[12]](_0x1036[9],auth[_0x1036[10]](),controller[_0x1036[11]]);router[_0x1036[12]](_0x1036[13],auth[_0x1036[10]](),controller[_0x1036[14]]);router[_0x1036[12]](_0x1036[15],auth[_0x1036[10]](),controller[_0x1036[16]]);router[_0x1036[21]](_0x1036[9],auth[_0x1036[10]](),interaction[_0x1036[19]](_0x1036[17],_0x1036[18]),controller[_0x1036[20]]);router[_0x1036[23]](_0x1036[15],auth[_0x1036[10]](),controller[_0x1036[22]]);router[_0x1036[23]](_0x1036[24],auth[_0x1036[10]](),controller[_0x1036[25]]);router[_0x1036[23]](_0x1036[26],auth[_0x1036[10]](),controller[_0x1036[27]]);router[_0x1036[29]](_0x1036[15],auth[_0x1036[10]](),controller[_0x1036[28]]);module[_0x1036[30]]= router
\ No newline at end of file
index 6a8304c..fd93bdc 100644 (file)
@@ -1 +1 @@
-var _0xf3b6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6C\x6F\x64\x61\x73\x68","\x65\x78\x70\x6F\x72\x74\x73","\x6C\x6F\x6E\x67","\x42\x4F\x4F\x4C\x45\x41\x4E","\x69\x6E","\x6F\x75\x74","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54","\x44\x41\x54\x45","\x49\x4E\x54\x45\x47\x45\x52"];_0xf3b6[0];var Sequelize=require(_0xf3b6[1]);var _=require(_0xf3b6[2]);module[_0xf3b6[3]]= {body:{type:Sequelize.TEXT(_0xf3b6[4]),allowNull:false},read:{type:Sequelize[_0xf3b6[5]],defaultValue:false},direction:{type:Sequelize.ENUM(_0xf3b6[6],_0xf3b6[7]),defaultValue:_0xf3b6[7],allowNull:false},messageId:{type:Sequelize.STRING(190)},from:{type:Sequelize[_0xf3b6[8]]},to:{type:Sequelize.TEXT(_0xf3b6[4])},cc:{type:Sequelize.TEXT(_0xf3b6[4])},bcc:{type:Sequelize.TEXT(_0xf3b6[4])},subject:{type:Sequelize[_0xf3b6[9]]},sentAt:{type:Sequelize[_0xf3b6[10]]},attach:{type:Sequelize[_0xf3b6[11]],defaultValue:0},secret:{type:Sequelize[_0xf3b6[5]],defaultValue:false},readAt:{type:Sequelize[_0xf3b6[10]]}}
\ No newline at end of file
+var _0xa550=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6C\x6F\x64\x61\x73\x68","\x65\x78\x70\x6F\x72\x74\x73","\x6C\x6F\x6E\x67","\x42\x4F\x4F\x4C\x45\x41\x4E","\x69\x6E","\x6F\x75\x74","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54","\x44\x41\x54\x45","\x49\x4E\x54\x45\x47\x45\x52"];_0xa550[0];var Sequelize=require(_0xa550[1]);var _=require(_0xa550[2]);module[_0xa550[3]]= {body:{type:Sequelize.TEXT(_0xa550[4]),allowNull:false},read:{type:Sequelize[_0xa550[5]],defaultValue:false},direction:{type:Sequelize.ENUM(_0xa550[6],_0xa550[7]),defaultValue:_0xa550[7],allowNull:false},messageId:{type:Sequelize.STRING(190)},from:{type:Sequelize[_0xa550[8]]},to:{type:Sequelize.TEXT(_0xa550[4])},cc:{type:Sequelize.TEXT(_0xa550[4])},bcc:{type:Sequelize.TEXT(_0xa550[4])},subject:{type:Sequelize[_0xa550[9]]},sentAt:{type:Sequelize[_0xa550[10]]},attach:{type:Sequelize[_0xa550[11]],defaultValue:0},secret:{type:Sequelize[_0xa550[5]],defaultValue:false},readAt:{type:Sequelize[_0xa550[10]]}}
\ No newline at end of file
index f7337af..3a0d927 100644 (file)
@@ -1 +1 @@
-var _0xf18d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x63\x72\x65\x61\x74\x65","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x6F\x75\x74","\x73\x65\x63\x72\x65\x74","\x25\x73","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x53\x65\x6E\x64\x4D\x61\x69\x6C","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x53\x6D\x74\x70","\x73\x65\x72\x76\x69\x63\x65","\x69\x73\x4E\x69\x6C","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x65\x63\x75\x72\x65","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E","\x61\x75\x74\x68","\x75\x73\x65\x72","\x70\x61\x73\x73","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x6A\x6F\x69\x6E","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x6D\x61\x69\x6C\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x61\x63\x63\x65\x70\x74","\x6D\x61\x69\x6C","\x72\x65\x61\x64","\x72\x65\x61\x64\x41\x74","\x55\x73\x65\x72\x49\x64","\x6D\x61\x6E\x75\x61\x6C","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x53\x49\x50\x2F\x25\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x65\x76\x65\x6E\x74","\x45\x76\x65\x6E\x74\x4D\x61\x6E\x61\x67\x65\x72","\x61\x63\x63\x65\x70\x74\x6D\x65\x73\x73\x61\x67\x65","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74","\x5B\x4D\x41\x49\x4C\x4D\x45\x53\x53\x41\x47\x45\x3A\x41\x43\x43\x45\x50\x54\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x72\x6F\x6C\x65","\x6E\x75\x6C\x6C","\x41\x63\x63\x65\x70\x74\x4D\x65\x73\x73\x61\x67\x65","\x61\x63\x63\x65\x70\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x61\x64\x31\x73\x74\x41\x74","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x61\x67\x65\x6E\x74","\x72\x65\x6A\x65\x63\x74\x6D\x65\x73\x73\x61\x67\x65","\x5B\x4D\x41\x49\x4C\x4D\x45\x53\x53\x41\x47\x45\x3A\x52\x45\x4A\x45\x43\x54\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x52\x65\x6A\x65\x63\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x6A\x65\x63\x74\x4D\x65\x73\x73\x61\x67\x65"];_0xf18d[0];var jsonpatch=require(_0xf18d[1]);var rp=require(_0xf18d[2]);var moment=require(_0xf18d[3]);var BPromise=require(_0xf18d[4]);var Mustache=require(_0xf18d[5]);var util=require(_0xf18d[6]);var path=require(_0xf18d[7]);var sox=require(_0xf18d[8]);var csv=require(_0xf18d[9]);var ejs=require(_0xf18d[10]);var fs=require(_0xf18d[11]);var _=require(_0xf18d[12]);var squel=require(_0xf18d[13]);var crypto=require(_0xf18d[14]);var jsforce=require(_0xf18d[15]);var deskjs=require(_0xf18d[16]);var toCsv=require(_0xf18d[9]);var querystring=require(_0xf18d[17]);var Papa=require(_0xf18d[18]);var qs=require(_0xf18d[19]);var logger=require(_0xf18d[21])(_0xf18d[20]);var utils=require(_0xf18d[22]);var config=require(_0xf18d[23]);var db=require(_0xf18d[25])[_0xf18d[24]];var socket=require(_0xf18d[27])({host:_0xf18d[26],port:6379});require(_0xf18d[29])[_0xf18d[28]](socket);var jayson=require(_0xf18d[30]);var client=jayson[_0xf18d[32]][_0xf18d[31]]({port:9004});var client9003=jayson[_0xf18d[32]][_0xf18d[31]]({port:9003});var client9002=jayson[_0xf18d[32]][_0xf18d[31]]({port:9002});function respondWithRpcPromise(_0x35d6x1f,_0x35d6x20,_0x35d6x21,_0x35d6x22){return  new BPromise(function(_0x35d6x23,_0x35d6x24){var _0x35d6x25=(_0x35d6x22|| client);return _0x35d6x25[_0xf18d[45]](_0x35d6x1f,_0x35d6x21)[_0xf18d[44]](function(_0x35d6x27){logger[_0xf18d[37]](_0xf18d[33],_0x35d6x20,_0xf18d[36]);logger[_0xf18d[40]](_0xf18d[38],_0x35d6x20,_0xf18d[36],JSON[_0xf18d[39]](_0x35d6x27));if(_0x35d6x27[_0xf18d[34]]){if(_0x35d6x27[_0xf18d[34]][_0xf18d[41]]=== 500){logger[_0xf18d[34]](_0xf18d[33],_0x35d6x20,_0x35d6x27[_0xf18d[34]][_0xf18d[42]]);return _0x35d6x24(_0x35d6x27[_0xf18d[34]][_0xf18d[42]])};logger[_0xf18d[34]](_0xf18d[33],_0x35d6x20,_0x35d6x27[_0xf18d[34]][_0xf18d[42]]);return _0x35d6x23(_0x35d6x27[_0xf18d[34]][_0xf18d[42]])}else {logger[_0xf18d[37]](_0xf18d[33],_0x35d6x20,_0xf18d[36]);_0x35d6x23(_0x35d6x27[_0xf18d[43]][_0xf18d[42]])}})[_0xf18d[35]](function(_0x35d6x26){logger[_0xf18d[34]](_0xf18d[33],_0x35d6x20,_0x35d6x26);_0x35d6x24(_0x35d6x26)})})}function respondWithStatusCode(_0x35d6x27,_0x35d6x29){_0x35d6x29= _0x35d6x29|| 204;return function(_0x35d6x2a){if(_0x35d6x2a){return _0x35d6x27[_0xf18d[46]](_0x35d6x29)};return _0x35d6x27[_0xf18d[48]](_0x35d6x29)[_0xf18d[47]]()}}function respondWithResult(_0x35d6x27,_0x35d6x29){_0x35d6x29= _0x35d6x29|| 200;return function(_0x35d6x2a){if(_0x35d6x2a){return _0x35d6x27[_0xf18d[48]](_0x35d6x29)[_0xf18d[49]](_0x35d6x2a)}}}function respondWithFilteredResult(_0x35d6x27,_0x35d6x2d){return function(_0x35d6x2a){if(_0x35d6x2a){var _0x35d6x2e=_0x35d6x2a[_0xf18d[50]],_0x35d6x2f=_0x35d6x2d[_0xf18d[51]],_0x35d6x30=_0x35d6x2d[_0xf18d[51]]+ _0x35d6x2d[_0xf18d[52]],_0x35d6x29;if(_0x35d6x30>= _0x35d6x2e){_0x35d6x30= _0x35d6x2e;_0x35d6x29= 200}else {_0x35d6x29= 206};_0x35d6x27[_0xf18d[48]](_0x35d6x29);return _0x35d6x27[_0xf18d[56]](_0xf18d[53],_0x35d6x2f+ _0xf18d[54]+ _0x35d6x30+ _0xf18d[55]+ _0x35d6x2e)[_0xf18d[49]](_0x35d6x2a)};return null}}function patchUpdates(_0x35d6x32){return function(_0x35d6x2a){try{jsonpatch[_0xf18d[57]](_0x35d6x2a,_0x35d6x32,true)}catch(err){return BPromise[_0xf18d[58]](err)};return _0x35d6x2a[_0xf18d[59]]()}}function saveUpdates(_0x35d6x34,_0x35d6x29){return function(_0x35d6x2a){if(_0x35d6x2a){return _0x35d6x2a[_0xf18d[60]](_0x35d6x34)[_0xf18d[44]](function(_0x35d6x35){return _0x35d6x35})};return null}}function removeEntity(_0x35d6x27,_0x35d6x29){return function(_0x35d6x2a){if(_0x35d6x2a){return _0x35d6x2a[_0xf18d[61]]()[_0xf18d[44]](function(){_0x35d6x27[_0xf18d[48]](204)[_0xf18d[47]]()})}}}function handleEntityNotFound(_0x35d6x27,_0x35d6x29){return function(_0x35d6x2a){if(!_0x35d6x2a){_0x35d6x27[_0xf18d[46]](404)};return _0x35d6x2a}}function handleError(_0x35d6x27,_0x35d6x29){_0x35d6x29= _0x35d6x29|| 500;return function(_0x35d6x26){logger[_0xf18d[34]](_0x35d6x26[_0xf18d[62]]);if(_0x35d6x26[_0xf18d[63]]){delete _0x35d6x26[_0xf18d[63]]};_0x35d6x27[_0xf18d[48]](_0x35d6x29)[_0xf18d[64]](_0x35d6x26)}}exports[_0xf18d[65]]= function(_0x35d6x21,_0x35d6x27){var _0x35d6x2d={},_0x35d6x39={},_0x35d6x3a={count:0,rows:[]};_0x35d6x39[_0xf18d[66]]= _[_0xf18d[69]](db[_0xf18d[68]][_0xf18d[67]]);var _0x35d6x3b={dateStart:_0x35d6x21[_0xf18d[71]][_0xf18d[70]],dateEnd:_0x35d6x21[_0xf18d[71]][_0xf18d[72]]};delete _0x35d6x21[_0xf18d[71]][_0xf18d[70]];delete _0x35d6x21[_0xf18d[71]][_0xf18d[72]];_0x35d6x39[_0xf18d[71]]= _[_0xf18d[69]](_0x35d6x21[_0xf18d[71]]);_0x35d6x39[_0xf18d[73]]= _[_0xf18d[74]](_0x35d6x39[_0xf18d[66]],_0x35d6x39[_0xf18d[71]]);_0x35d6x2d[_0xf18d[75]]= _[_0xf18d[74]](_0x35d6x39[_0xf18d[66]],qs[_0xf18d[76]](_0x35d6x21[_0xf18d[71]][_0xf18d[76]]));_0x35d6x2d[_0xf18d[75]]= (_0x35d6x2d[_0xf18d[75]][_0xf18d[77]])?_0x35d6x2d[_0xf18d[75]]:_0x35d6x39[_0xf18d[66]];if(!_0x35d6x21[_0xf18d[71]][_0xf18d[79]](_0xf18d[78])){_0x35d6x2d[_0xf18d[52]]= qs[_0xf18d[52]](_0x35d6x21[_0xf18d[71]][_0xf18d[52]]);_0x35d6x2d[_0xf18d[51]]= qs[_0xf18d[51]](_0x35d6x21[_0xf18d[71]][_0xf18d[51]])};_0x35d6x2d[_0xf18d[80]]= qs[_0xf18d[81]](_0x35d6x21[_0xf18d[71]][_0xf18d[81]]);_0x35d6x2d[_0xf18d[82]]= qs[_0xf18d[73]](_[_0xf18d[83]](_0x35d6x21[_0xf18d[71]],_0x35d6x39[_0xf18d[73]]));if(_0x35d6x3b[_0xf18d[70]]){if(_0x35d6x3b[_0xf18d[72]]){_0x35d6x3b[_0xf18d[72]]= moment(_0x35d6x3b[_0xf18d[72]])[_0xf18d[85]](1,_0xf18d[84])}else {_0x35d6x3b[_0xf18d[72]]= moment(_0x35d6x3b[_0xf18d[70]])[_0xf18d[85]](1,_0xf18d[84])};_[_0xf18d[86]](_0x35d6x2d[_0xf18d[82]],{createdAt:{$gte:_0x35d6x3b[_0xf18d[70]],$lte:_0x35d6x3b[_0xf18d[72]]}})};if(_0x35d6x21[_0xf18d[71]][_0xf18d[87]]){_0x35d6x2d[_0xf18d[82]]= _[_0xf18d[86]](_0x35d6x2d[_0xf18d[82]],{$or:_[_0xf18d[89]](_0x35d6x2d[_0xf18d[75]],function(_0x35d6x3c){var _0x35d6x3a={};_0x35d6x3a[_0x35d6x3c]= {$like:_0xf18d[88]+ _0x35d6x21[_0xf18d[71]][_0xf18d[87]]+ _0xf18d[88]};return _0x35d6x3a})})};_0x35d6x2d= _[_0xf18d[86]]({},_0x35d6x2d,_0x35d6x21[_0xf18d[90]]);var _0x35d6x3d={where:_0x35d6x2d[_0xf18d[82]]};return db[_0xf18d[68]][_0xf18d[50]](_0x35d6x3d)[_0xf18d[44]](function(_0x35d6x2e){_0x35d6x3a[_0xf18d[50]]= _0x35d6x2e;if(_0x35d6x21[_0xf18d[71]][_0xf18d[92]]){_0x35d6x2d[_0xf18d[93]]= [{all:true}]};return db[_0xf18d[68]][_0xf18d[94]](_0x35d6x2d)})[_0xf18d[44]](function(_0x35d6x3e){_0x35d6x3a[_0xf18d[91]]= _0x35d6x3e;return _0x35d6x3a})[_0xf18d[44]](respondWithFilteredResult(_0x35d6x27,_0x35d6x2d))[_0xf18d[35]](handleError(_0x35d6x27,null))};exports[_0xf18d[95]]= function(_0x35d6x21,_0x35d6x27){var _0x35d6x2d={raw:true,where:{id:_0x35d6x21[_0xf18d[97]][_0xf18d[96]]}},_0x35d6x39={};_0x35d6x39[_0xf18d[66]]= _[_0xf18d[69]](db[_0xf18d[68]][_0xf18d[67]]);_0x35d6x39[_0xf18d[71]]= _[_0xf18d[69]](_0x35d6x21[_0xf18d[71]]);_0x35d6x39[_0xf18d[73]]= _[_0xf18d[74]](_0x35d6x39[_0xf18d[66]],_0x35d6x39[_0xf18d[71]]);_0x35d6x2d[_0xf18d[75]]= _[_0xf18d[74]](_0x35d6x39[_0xf18d[66]],qs[_0xf18d[76]](_0x35d6x21[_0xf18d[71]][_0xf18d[76]]));_0x35d6x2d[_0xf18d[75]]= (_0x35d6x2d[_0xf18d[75]][_0xf18d[77]])?_0x35d6x2d[_0xf18d[75]]:_0x35d6x39[_0xf18d[66]];if(_0x35d6x21[_0xf18d[71]][_0xf18d[92]]){_0x35d6x2d[_0xf18d[93]]= [{all:true}]};_0x35d6x2d= _[_0xf18d[86]]({},_0x35d6x2d,_0x35d6x21[_0xf18d[90]]);return db[_0xf18d[68]][_0xf18d[98]](_0x35d6x2d)[_0xf18d[44]](handleEntityNotFound(_0x35d6x27,null))[_0xf18d[44]](respondWithResult(_0x35d6x27,null))[_0xf18d[35]](handleError(_0x35d6x27,null))};exports[_0xf18d[60]]= function(_0x35d6x21,_0x35d6x27){if(_0x35d6x21[_0xf18d[99]][_0xf18d[96]]){delete _0x35d6x21[_0xf18d[99]][_0xf18d[96]]};return db[_0xf18d[68]][_0xf18d[98]]({where:{id:_0x35d6x21[_0xf18d[97]][_0xf18d[96]]}})[_0xf18d[44]](handleEntityNotFound(_0x35d6x27,null))[_0xf18d[44]](saveUpdates(_0x35d6x21[_0xf18d[99]],null))[_0xf18d[44]](respondWithResult(_0x35d6x27,null))[_0xf18d[35]](handleError(_0x35d6x27,null))};exports[_0xf18d[61]]= function(_0x35d6x21,_0x35d6x27){return db[_0xf18d[68]][_0xf18d[98]]({where:{id:_0x35d6x21[_0xf18d[97]][_0xf18d[96]]}})[_0xf18d[44]](handleEntityNotFound(_0x35d6x27,null))[_0xf18d[44]](removeEntity(_0x35d6x27,null))[_0xf18d[35]](handleError(_0x35d6x27,null))};exports[_0xf18d[100]]= function(_0x35d6x21,_0x35d6x27){return db[_0xf18d[68]][_0xf18d[100]]()[_0xf18d[44]](respondWithResult(_0x35d6x27,null))[_0xf18d[35]](handleError(_0x35d6x27,null))};exports[_0xf18d[101]]= function(_0x35d6x21,_0x35d6x27){return db[_0xf18d[68]][_0xf18d[101]](_0x35d6x21[_0xf18d[99]])[_0xf18d[44]](function(_0x35d6x3f){if(_0x35d6x3f){if(_0x35d6x3f[_0xf18d[102]]=== _0xf18d[103]&&  !_0x35d6x3f[_0xf18d[104]]){return db[_0xf18d[129]][_0xf18d[128]]({where:{id:_0x35d6x3f[_0xf18d[126]]},include:[{model:db[_0xf18d[127]],as:_0xf18d[111],raw:true}]})[_0xf18d[44]](function(_0x35d6x41){if(_0x35d6x41&& _0x35d6x41[_0xf18d[111]]){var _0x35d6x2d={tls:{rejectUnauthorized:false}};if(_[_0xf18d[113]](_0x35d6x41[_0xf18d[111]][_0xf18d[112]])){_0x35d6x2d[_0xf18d[114]]= _0x35d6x41[_0xf18d[111]][_0xf18d[114]];_0x35d6x2d[_0xf18d[115]]= _0x35d6x41[_0xf18d[111]][_0xf18d[115]];_0x35d6x2d[_0xf18d[116]]= _0x35d6x41[_0xf18d[111]][_0xf18d[116]];if(_0x35d6x41[_0xf18d[111]][_0xf18d[117]]){_0x35d6x2d[_0xf18d[118]]= {user:_0x35d6x41[_0xf18d[111]][_0xf18d[119]],pass:_0x35d6x41[_0xf18d[111]][_0xf18d[120]]}}}else {_0x35d6x2d[_0xf18d[112]]= _0x35d6x41[_0xf18d[111]][_0xf18d[112]];_0x35d6x2d[_0xf18d[118]]= {user:_0x35d6x41[_0xf18d[111]][_0xf18d[119]],pass:_0x35d6x41[_0xf18d[111]][_0xf18d[120]]};_0x35d6x2d[_0xf18d[116]]= _0x35d6x41[_0xf18d[111]][_0xf18d[116]]};if(_0x35d6x21[_0xf18d[99]][_0xf18d[121]]&& _0x35d6x21[_0xf18d[99]][_0xf18d[121]][_0xf18d[77]]){for(var _0x35d6x42=0;_0x35d6x42< _0x35d6x21[_0xf18d[99]][_0xf18d[121]][_0xf18d[77]];_0x35d6x42+= 1){_0x35d6x21[_0xf18d[99]][_0xf18d[121]][_0x35d6x42]= {filename:_0x35d6x21[_0xf18d[99]][_0xf18d[121]][_0x35d6x42][_0xf18d[63]],path:path[_0xf18d[125]](config[_0xf18d[122]],_0xf18d[123],_0x35d6x21[_0xf18d[99]][_0xf18d[121]][_0x35d6x42][_0xf18d[124]])}}};return {account:_0x35d6x2d,message:_0x35d6x21[_0xf18d[99]]}}})[_0xf18d[44]](function(_0x35d6x40){if(_0x35d6x40){return respondWithRpcPromise(_0xf18d[109],_0xf18d[110],_0x35d6x40,client9003)[_0xf18d[44]](function(_0x35d6x27){return _0x35d6x3f[_0xf18d[60]]({read:true,messageId:_0x35d6x27[_0xf18d[106]],sentAt:moment()[_0xf18d[108]](_0xf18d[107])})})[_0xf18d[35]](function(_0x35d6x26){logger[_0xf18d[34]](_0xf18d[105],JSON[_0xf18d[39]](_0x35d6x26));return _0x35d6x3f})};return _0x35d6x3f})};return _0x35d6x3f}})[_0xf18d[44]](respondWithResult(_0x35d6x27,201))[_0xf18d[35]](handleError(_0x35d6x27,null))};var interaction_log=require(_0xf18d[21])(_0xf18d[130]);exports[_0xf18d[131]]= function(_0x35d6x21,_0x35d6x27,_0x35d6x44){var _0x35d6x45={channel:_0xf18d[132]};if(_0x35d6x21[_0xf18d[99]][_0xf18d[96]]){delete _0x35d6x21[_0xf18d[99]][_0xf18d[96]]};_0x35d6x21[_0xf18d[99]][_0xf18d[133]]= true;_0x35d6x21[_0xf18d[99]][_0xf18d[134]]= moment()[_0xf18d[108]](_0xf18d[107]);_0x35d6x21[_0xf18d[99]][_0xf18d[135]]= _0x35d6x21[_0xf18d[99]][_0xf18d[135]]|| _0x35d6x21[_0xf18d[119]][_0xf18d[96]];return db[_0xf18d[68]][_0xf18d[98]]({where:{id:_0x35d6x21[_0xf18d[97]][_0xf18d[96]],UserId:null},include:[{model:db[_0xf18d[153]],as:_0xf18d[154]}]})[_0xf18d[44]](handleEntityNotFound(_0x35d6x27,null))[_0xf18d[44]](saveUpdates(_0x35d6x21[_0xf18d[99]],null))[_0xf18d[44]](function(_0x35d6x2a){if(_0x35d6x2a){_0x35d6x45[_0xf18d[42]]= _0x35d6x2a[_0xf18d[144]]({plain:true});return db[_0xf18d[152]][_0xf18d[98]]({where:{id:_0x35d6x2a[_0xf18d[151]]}})};return null})[_0xf18d[44]](handleEntityNotFound(_0x35d6x27,null))[_0xf18d[44]](function(_0x35d6x2a){if(_0x35d6x2a){return _0x35d6x2a[_0xf18d[60]]({UserId:_0x35d6x21[_0xf18d[99]][_0xf18d[135]],read1stAt:_[_0xf18d[113]](_0x35d6x2a[_0xf18d[150]])?moment()[_0xf18d[108]](_0xf18d[107]):undefined})};return null})[_0xf18d[44]](function(_0x35d6x2a){if(_0x35d6x2a){_0x35d6x45[_0xf18d[143]]= _0x35d6x2a[_0xf18d[144]]({plain:true});interaction_log[_0xf18d[37]](_0xf18d[145],_0x35d6x21[_0xf18d[119]][_0xf18d[96]],_0x35d6x21[_0xf18d[119]][_0xf18d[63]],_0x35d6x21[_0xf18d[119]][_0xf18d[146]],_0x35d6x45[_0xf18d[143]][_0xf18d[96]],_0x35d6x21[_0xf18d[99]]?JSON[_0xf18d[39]](_0x35d6x21[_0xf18d[99]]):_0xf18d[147]);return respondWithRpcPromise(_0xf18d[148],_0xf18d[149],_0x35d6x45)};return null})[_0xf18d[44]](function(_0x35d6x2a){if(_0x35d6x2a){if(_0x35d6x21[_0xf18d[99]][_0xf18d[136]]){_0x35d6x45[_0xf18d[42]][_0xf18d[137]]= util[_0xf18d[108]](_0xf18d[138],_0x35d6x21[_0xf18d[119]][_0xf18d[63]]);_0x35d6x45[_0xf18d[42]][_0xf18d[139]]= _0x35d6x45[_0xf18d[139]];_0x35d6x45[_0xf18d[42]][_0xf18d[140]]= _0xf18d[131];return respondWithRpcPromise(_0xf18d[141],_0xf18d[141],{event:_0xf18d[142],message:_0x35d6x45[_0xf18d[42]]},client9002)[_0xf18d[44]](function(){return _0x35d6x45})};return _0x35d6x45};return null})[_0xf18d[44]](respondWithResult(_0x35d6x27,null))[_0xf18d[35]](handleError(_0x35d6x27,null))};var interaction_log=require(_0xf18d[21])(_0xf18d[130]);exports[_0xf18d[58]]= function(_0x35d6x21,_0x35d6x27,_0x35d6x44){var _0x35d6x45={agent:{},channel:_0xf18d[132]};if(_0x35d6x21[_0xf18d[99]][_0xf18d[96]]){delete _0x35d6x21[_0xf18d[99]][_0xf18d[96]]};_0x35d6x21[_0xf18d[99]][_0xf18d[135]]= _0x35d6x21[_0xf18d[99]][_0xf18d[135]]|| _0x35d6x21[_0xf18d[119]][_0xf18d[96]];_0x35d6x45[_0xf18d[155]][_0xf18d[96]]= _0x35d6x21[_0xf18d[99]][_0xf18d[135]];return db[_0xf18d[68]][_0xf18d[98]]({where:{id:_0x35d6x21[_0xf18d[97]][_0xf18d[96]],UserId:null}})[_0xf18d[44]](handleEntityNotFound(_0x35d6x27,null))[_0xf18d[44]](function(_0x35d6x2a){if(_0x35d6x2a){_0x35d6x45[_0xf18d[42]]= _0x35d6x2a[_0xf18d[144]]({plain:true});return db[_0xf18d[152]][_0xf18d[98]]({where:{id:_0x35d6x2a[_0xf18d[151]]}})};return null})[_0xf18d[44]](handleEntityNotFound(_0x35d6x27,null))[_0xf18d[44]](function(_0x35d6x2a){if(_0x35d6x2a){_0x35d6x45[_0xf18d[143]]= _0x35d6x2a[_0xf18d[144]]({plain:true});interaction_log[_0xf18d[37]](_0xf18d[157],_0x35d6x21[_0xf18d[119]][_0xf18d[96]],_0x35d6x21[_0xf18d[119]][_0xf18d[63]],_0x35d6x21[_0xf18d[119]][_0xf18d[146]],_0x35d6x45[_0xf18d[143]][_0xf18d[96]],_0x35d6x21[_0xf18d[99]]?JSON[_0xf18d[39]](_0x35d6x21[_0xf18d[99]]):_0xf18d[147]);return respondWithRpcPromise(_0xf18d[158],_0xf18d[159],_0x35d6x45)};return null})[_0xf18d[44]](function(_0x35d6x2a){if(_0x35d6x2a){_0x35d6x2a[_0xf18d[42]][_0xf18d[137]]= util[_0xf18d[108]](_0xf18d[138],_0x35d6x21[_0xf18d[119]][_0xf18d[63]]);_0x35d6x2a[_0xf18d[42]][_0xf18d[139]]= _0x35d6x45[_0xf18d[139]];_0x35d6x2a[_0xf18d[42]][_0xf18d[140]]= _0xf18d[58];respondWithRpcPromise(_0xf18d[141],_0xf18d[141],{event:_0xf18d[156],message:_0x35d6x2a[_0xf18d[42]]},client9002);return _0x35d6x45};return null})[_0xf18d[44]](respondWithResult(_0x35d6x27,null))[_0xf18d[35]](handleError(_0x35d6x27,null))}
\ No newline at end of file
+var _0x58da=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x63\x72\x65\x61\x74\x65","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x6F\x75\x74","\x73\x65\x63\x72\x65\x74","\x25\x73","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x53\x65\x6E\x64\x4D\x61\x69\x6C","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x53\x6D\x74\x70","\x73\x65\x72\x76\x69\x63\x65","\x69\x73\x4E\x69\x6C","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x65\x63\x75\x72\x65","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E","\x61\x75\x74\x68","\x75\x73\x65\x72","\x70\x61\x73\x73","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x6A\x6F\x69\x6E","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x6D\x61\x69\x6C\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x61\x63\x63\x65\x70\x74","\x6D\x61\x69\x6C","\x72\x65\x61\x64","\x72\x65\x61\x64\x41\x74","\x55\x73\x65\x72\x49\x64","\x6D\x61\x6E\x75\x61\x6C","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x53\x49\x50\x2F\x25\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x65\x76\x65\x6E\x74","\x45\x76\x65\x6E\x74\x4D\x61\x6E\x61\x67\x65\x72","\x61\x63\x63\x65\x70\x74\x6D\x65\x73\x73\x61\x67\x65","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74","\x5B\x4D\x41\x49\x4C\x4D\x45\x53\x53\x41\x47\x45\x3A\x41\x43\x43\x45\x50\x54\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x72\x6F\x6C\x65","\x6E\x75\x6C\x6C","\x41\x63\x63\x65\x70\x74\x4D\x65\x73\x73\x61\x67\x65","\x61\x63\x63\x65\x70\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x61\x64\x31\x73\x74\x41\x74","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x61\x67\x65\x6E\x74","\x72\x65\x6A\x65\x63\x74\x6D\x65\x73\x73\x61\x67\x65","\x5B\x4D\x41\x49\x4C\x4D\x45\x53\x53\x41\x47\x45\x3A\x52\x45\x4A\x45\x43\x54\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x52\x65\x6A\x65\x63\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x6A\x65\x63\x74\x4D\x65\x73\x73\x61\x67\x65"];_0x58da[0];var jsonpatch=require(_0x58da[1]);var rp=require(_0x58da[2]);var moment=require(_0x58da[3]);var BPromise=require(_0x58da[4]);var Mustache=require(_0x58da[5]);var util=require(_0x58da[6]);var path=require(_0x58da[7]);var sox=require(_0x58da[8]);var csv=require(_0x58da[9]);var ejs=require(_0x58da[10]);var fs=require(_0x58da[11]);var _=require(_0x58da[12]);var squel=require(_0x58da[13]);var crypto=require(_0x58da[14]);var jsforce=require(_0x58da[15]);var deskjs=require(_0x58da[16]);var toCsv=require(_0x58da[9]);var querystring=require(_0x58da[17]);var Papa=require(_0x58da[18]);var qs=require(_0x58da[19]);var logger=require(_0x58da[21])(_0x58da[20]);var utils=require(_0x58da[22]);var config=require(_0x58da[23]);var db=require(_0x58da[25])[_0x58da[24]];var socket=require(_0x58da[27])({host:_0x58da[26],port:6379});require(_0x58da[29])[_0x58da[28]](socket);var jayson=require(_0x58da[30]);var client=jayson[_0x58da[32]][_0x58da[31]]({port:9004});var client9003=jayson[_0x58da[32]][_0x58da[31]]({port:9003});var client9002=jayson[_0x58da[32]][_0x58da[31]]({port:9002});function respondWithRpcPromise(_0xd6c5x1f,_0xd6c5x20,_0xd6c5x21,_0xd6c5x22){return  new BPromise(function(_0xd6c5x23,_0xd6c5x24){var _0xd6c5x25=(_0xd6c5x22|| client);return _0xd6c5x25[_0x58da[45]](_0xd6c5x1f,_0xd6c5x21)[_0x58da[44]](function(_0xd6c5x27){logger[_0x58da[37]](_0x58da[33],_0xd6c5x20,_0x58da[36]);logger[_0x58da[40]](_0x58da[38],_0xd6c5x20,_0x58da[36],JSON[_0x58da[39]](_0xd6c5x27));if(_0xd6c5x27[_0x58da[34]]){if(_0xd6c5x27[_0x58da[34]][_0x58da[41]]=== 500){logger[_0x58da[34]](_0x58da[33],_0xd6c5x20,_0xd6c5x27[_0x58da[34]][_0x58da[42]]);return _0xd6c5x24(_0xd6c5x27[_0x58da[34]][_0x58da[42]])};logger[_0x58da[34]](_0x58da[33],_0xd6c5x20,_0xd6c5x27[_0x58da[34]][_0x58da[42]]);return _0xd6c5x23(_0xd6c5x27[_0x58da[34]][_0x58da[42]])}else {logger[_0x58da[37]](_0x58da[33],_0xd6c5x20,_0x58da[36]);_0xd6c5x23(_0xd6c5x27[_0x58da[43]][_0x58da[42]])}})[_0x58da[35]](function(_0xd6c5x26){logger[_0x58da[34]](_0x58da[33],_0xd6c5x20,_0xd6c5x26);_0xd6c5x24(_0xd6c5x26)})})}function respondWithStatusCode(_0xd6c5x27,_0xd6c5x29){_0xd6c5x29= _0xd6c5x29|| 204;return function(_0xd6c5x2a){if(_0xd6c5x2a){return _0xd6c5x27[_0x58da[46]](_0xd6c5x29)};return _0xd6c5x27[_0x58da[48]](_0xd6c5x29)[_0x58da[47]]()}}function respondWithResult(_0xd6c5x27,_0xd6c5x29){_0xd6c5x29= _0xd6c5x29|| 200;return function(_0xd6c5x2a){if(_0xd6c5x2a){return _0xd6c5x27[_0x58da[48]](_0xd6c5x29)[_0x58da[49]](_0xd6c5x2a)}}}function respondWithFilteredResult(_0xd6c5x27,_0xd6c5x2d){return function(_0xd6c5x2a){if(_0xd6c5x2a){var _0xd6c5x2e=_0xd6c5x2a[_0x58da[50]],_0xd6c5x2f=_0xd6c5x2d[_0x58da[51]],_0xd6c5x30=_0xd6c5x2d[_0x58da[51]]+ _0xd6c5x2d[_0x58da[52]],_0xd6c5x29;if(_0xd6c5x30>= _0xd6c5x2e){_0xd6c5x30= _0xd6c5x2e;_0xd6c5x29= 200}else {_0xd6c5x29= 206};_0xd6c5x27[_0x58da[48]](_0xd6c5x29);return _0xd6c5x27[_0x58da[56]](_0x58da[53],_0xd6c5x2f+ _0x58da[54]+ _0xd6c5x30+ _0x58da[55]+ _0xd6c5x2e)[_0x58da[49]](_0xd6c5x2a)};return null}}function patchUpdates(_0xd6c5x32){return function(_0xd6c5x2a){try{jsonpatch[_0x58da[57]](_0xd6c5x2a,_0xd6c5x32,true)}catch(err){return BPromise[_0x58da[58]](err)};return _0xd6c5x2a[_0x58da[59]]()}}function saveUpdates(_0xd6c5x34,_0xd6c5x29){return function(_0xd6c5x2a){if(_0xd6c5x2a){return _0xd6c5x2a[_0x58da[60]](_0xd6c5x34)[_0x58da[44]](function(_0xd6c5x35){return _0xd6c5x35})};return null}}function removeEntity(_0xd6c5x27,_0xd6c5x29){return function(_0xd6c5x2a){if(_0xd6c5x2a){return _0xd6c5x2a[_0x58da[61]]()[_0x58da[44]](function(){_0xd6c5x27[_0x58da[48]](204)[_0x58da[47]]()})}}}function handleEntityNotFound(_0xd6c5x27,_0xd6c5x29){return function(_0xd6c5x2a){if(!_0xd6c5x2a){_0xd6c5x27[_0x58da[46]](404)};return _0xd6c5x2a}}function handleError(_0xd6c5x27,_0xd6c5x29){_0xd6c5x29= _0xd6c5x29|| 500;return function(_0xd6c5x26){logger[_0x58da[34]](_0xd6c5x26[_0x58da[62]]);if(_0xd6c5x26[_0x58da[63]]){delete _0xd6c5x26[_0x58da[63]]};_0xd6c5x27[_0x58da[48]](_0xd6c5x29)[_0x58da[64]](_0xd6c5x26)}}exports[_0x58da[65]]= function(_0xd6c5x21,_0xd6c5x27){var _0xd6c5x2d={},_0xd6c5x39={},_0xd6c5x3a={count:0,rows:[]};_0xd6c5x39[_0x58da[66]]= _[_0x58da[69]](db[_0x58da[68]][_0x58da[67]]);var _0xd6c5x3b={dateStart:_0xd6c5x21[_0x58da[71]][_0x58da[70]],dateEnd:_0xd6c5x21[_0x58da[71]][_0x58da[72]]};delete _0xd6c5x21[_0x58da[71]][_0x58da[70]];delete _0xd6c5x21[_0x58da[71]][_0x58da[72]];_0xd6c5x39[_0x58da[71]]= _[_0x58da[69]](_0xd6c5x21[_0x58da[71]]);_0xd6c5x39[_0x58da[73]]= _[_0x58da[74]](_0xd6c5x39[_0x58da[66]],_0xd6c5x39[_0x58da[71]]);_0xd6c5x2d[_0x58da[75]]= _[_0x58da[74]](_0xd6c5x39[_0x58da[66]],qs[_0x58da[76]](_0xd6c5x21[_0x58da[71]][_0x58da[76]]));_0xd6c5x2d[_0x58da[75]]= (_0xd6c5x2d[_0x58da[75]][_0x58da[77]])?_0xd6c5x2d[_0x58da[75]]:_0xd6c5x39[_0x58da[66]];if(!_0xd6c5x21[_0x58da[71]][_0x58da[79]](_0x58da[78])){_0xd6c5x2d[_0x58da[52]]= qs[_0x58da[52]](_0xd6c5x21[_0x58da[71]][_0x58da[52]]);_0xd6c5x2d[_0x58da[51]]= qs[_0x58da[51]](_0xd6c5x21[_0x58da[71]][_0x58da[51]])};_0xd6c5x2d[_0x58da[80]]= qs[_0x58da[81]](_0xd6c5x21[_0x58da[71]][_0x58da[81]]);_0xd6c5x2d[_0x58da[82]]= qs[_0x58da[73]](_[_0x58da[83]](_0xd6c5x21[_0x58da[71]],_0xd6c5x39[_0x58da[73]]));if(_0xd6c5x3b[_0x58da[70]]){if(_0xd6c5x3b[_0x58da[72]]){_0xd6c5x3b[_0x58da[72]]= moment(_0xd6c5x3b[_0x58da[72]])[_0x58da[85]](1,_0x58da[84])}else {_0xd6c5x3b[_0x58da[72]]= moment(_0xd6c5x3b[_0x58da[70]])[_0x58da[85]](1,_0x58da[84])};_[_0x58da[86]](_0xd6c5x2d[_0x58da[82]],{createdAt:{$gte:_0xd6c5x3b[_0x58da[70]],$lte:_0xd6c5x3b[_0x58da[72]]}})};if(_0xd6c5x21[_0x58da[71]][_0x58da[87]]){_0xd6c5x2d[_0x58da[82]]= _[_0x58da[86]](_0xd6c5x2d[_0x58da[82]],{$or:_[_0x58da[89]](_0xd6c5x2d[_0x58da[75]],function(_0xd6c5x3c){var _0xd6c5x3a={};_0xd6c5x3a[_0xd6c5x3c]= {$like:_0x58da[88]+ _0xd6c5x21[_0x58da[71]][_0x58da[87]]+ _0x58da[88]};return _0xd6c5x3a})})};_0xd6c5x2d= _[_0x58da[86]]({},_0xd6c5x2d,_0xd6c5x21[_0x58da[90]]);var _0xd6c5x3d={where:_0xd6c5x2d[_0x58da[82]]};return db[_0x58da[68]][_0x58da[50]](_0xd6c5x3d)[_0x58da[44]](function(_0xd6c5x2e){_0xd6c5x3a[_0x58da[50]]= _0xd6c5x2e;if(_0xd6c5x21[_0x58da[71]][_0x58da[92]]){_0xd6c5x2d[_0x58da[93]]= [{all:true}]};return db[_0x58da[68]][_0x58da[94]](_0xd6c5x2d)})[_0x58da[44]](function(_0xd6c5x3e){_0xd6c5x3a[_0x58da[91]]= _0xd6c5x3e;return _0xd6c5x3a})[_0x58da[44]](respondWithFilteredResult(_0xd6c5x27,_0xd6c5x2d))[_0x58da[35]](handleError(_0xd6c5x27,null))};exports[_0x58da[95]]= function(_0xd6c5x21,_0xd6c5x27){var _0xd6c5x2d={raw:true,where:{id:_0xd6c5x21[_0x58da[97]][_0x58da[96]]}},_0xd6c5x39={};_0xd6c5x39[_0x58da[66]]= _[_0x58da[69]](db[_0x58da[68]][_0x58da[67]]);_0xd6c5x39[_0x58da[71]]= _[_0x58da[69]](_0xd6c5x21[_0x58da[71]]);_0xd6c5x39[_0x58da[73]]= _[_0x58da[74]](_0xd6c5x39[_0x58da[66]],_0xd6c5x39[_0x58da[71]]);_0xd6c5x2d[_0x58da[75]]= _[_0x58da[74]](_0xd6c5x39[_0x58da[66]],qs[_0x58da[76]](_0xd6c5x21[_0x58da[71]][_0x58da[76]]));_0xd6c5x2d[_0x58da[75]]= (_0xd6c5x2d[_0x58da[75]][_0x58da[77]])?_0xd6c5x2d[_0x58da[75]]:_0xd6c5x39[_0x58da[66]];if(_0xd6c5x21[_0x58da[71]][_0x58da[92]]){_0xd6c5x2d[_0x58da[93]]= [{all:true}]};_0xd6c5x2d= _[_0x58da[86]]({},_0xd6c5x2d,_0xd6c5x21[_0x58da[90]]);return db[_0x58da[68]][_0x58da[98]](_0xd6c5x2d)[_0x58da[44]](handleEntityNotFound(_0xd6c5x27,null))[_0x58da[44]](respondWithResult(_0xd6c5x27,null))[_0x58da[35]](handleError(_0xd6c5x27,null))};exports[_0x58da[60]]= function(_0xd6c5x21,_0xd6c5x27){if(_0xd6c5x21[_0x58da[99]][_0x58da[96]]){delete _0xd6c5x21[_0x58da[99]][_0x58da[96]]};return db[_0x58da[68]][_0x58da[98]]({where:{id:_0xd6c5x21[_0x58da[97]][_0x58da[96]]}})[_0x58da[44]](handleEntityNotFound(_0xd6c5x27,null))[_0x58da[44]](saveUpdates(_0xd6c5x21[_0x58da[99]],null))[_0x58da[44]](respondWithResult(_0xd6c5x27,null))[_0x58da[35]](handleError(_0xd6c5x27,null))};exports[_0x58da[61]]= function(_0xd6c5x21,_0xd6c5x27){return db[_0x58da[68]][_0x58da[98]]({where:{id:_0xd6c5x21[_0x58da[97]][_0x58da[96]]}})[_0x58da[44]](handleEntityNotFound(_0xd6c5x27,null))[_0x58da[44]](removeEntity(_0xd6c5x27,null))[_0x58da[35]](handleError(_0xd6c5x27,null))};exports[_0x58da[100]]= function(_0xd6c5x21,_0xd6c5x27){return db[_0x58da[68]][_0x58da[100]]()[_0x58da[44]](respondWithResult(_0xd6c5x27,null))[_0x58da[35]](handleError(_0xd6c5x27,null))};exports[_0x58da[101]]= function(_0xd6c5x21,_0xd6c5x27){return db[_0x58da[68]][_0x58da[101]](_0xd6c5x21[_0x58da[99]])[_0x58da[44]](function(_0xd6c5x3f){if(_0xd6c5x3f){if(_0xd6c5x3f[_0x58da[102]]=== _0x58da[103]&&  !_0xd6c5x3f[_0x58da[104]]){return db[_0x58da[129]][_0x58da[128]]({where:{id:_0xd6c5x3f[_0x58da[126]]},include:[{model:db[_0x58da[127]],as:_0x58da[111],raw:true}]})[_0x58da[44]](function(_0xd6c5x41){if(_0xd6c5x41&& _0xd6c5x41[_0x58da[111]]){var _0xd6c5x2d={tls:{rejectUnauthorized:false}};if(_[_0x58da[113]](_0xd6c5x41[_0x58da[111]][_0x58da[112]])){_0xd6c5x2d[_0x58da[114]]= _0xd6c5x41[_0x58da[111]][_0x58da[114]];_0xd6c5x2d[_0x58da[115]]= _0xd6c5x41[_0x58da[111]][_0x58da[115]];_0xd6c5x2d[_0x58da[116]]= _0xd6c5x41[_0x58da[111]][_0x58da[116]];if(_0xd6c5x41[_0x58da[111]][_0x58da[117]]){_0xd6c5x2d[_0x58da[118]]= {user:_0xd6c5x41[_0x58da[111]][_0x58da[119]],pass:_0xd6c5x41[_0x58da[111]][_0x58da[120]]}}}else {_0xd6c5x2d[_0x58da[112]]= _0xd6c5x41[_0x58da[111]][_0x58da[112]];_0xd6c5x2d[_0x58da[118]]= {user:_0xd6c5x41[_0x58da[111]][_0x58da[119]],pass:_0xd6c5x41[_0x58da[111]][_0x58da[120]]};_0xd6c5x2d[_0x58da[116]]= _0xd6c5x41[_0x58da[111]][_0x58da[116]]};if(_0xd6c5x21[_0x58da[99]][_0x58da[121]]&& _0xd6c5x21[_0x58da[99]][_0x58da[121]][_0x58da[77]]){for(var _0xd6c5x42=0;_0xd6c5x42< _0xd6c5x21[_0x58da[99]][_0x58da[121]][_0x58da[77]];_0xd6c5x42+= 1){_0xd6c5x21[_0x58da[99]][_0x58da[121]][_0xd6c5x42]= {filename:_0xd6c5x21[_0x58da[99]][_0x58da[121]][_0xd6c5x42][_0x58da[63]],path:path[_0x58da[125]](config[_0x58da[122]],_0x58da[123],_0xd6c5x21[_0x58da[99]][_0x58da[121]][_0xd6c5x42][_0x58da[124]])}}};return {account:_0xd6c5x2d,message:_0xd6c5x21[_0x58da[99]]}}})[_0x58da[44]](function(_0xd6c5x40){if(_0xd6c5x40){return respondWithRpcPromise(_0x58da[109],_0x58da[110],_0xd6c5x40,client9003)[_0x58da[44]](function(_0xd6c5x27){return _0xd6c5x3f[_0x58da[60]]({read:true,messageId:_0xd6c5x27[_0x58da[106]],sentAt:moment()[_0x58da[108]](_0x58da[107])})})[_0x58da[35]](function(_0xd6c5x26){logger[_0x58da[34]](_0x58da[105],JSON[_0x58da[39]](_0xd6c5x26));return _0xd6c5x3f})};return _0xd6c5x3f})};return _0xd6c5x3f}})[_0x58da[44]](respondWithResult(_0xd6c5x27,201))[_0x58da[35]](handleError(_0xd6c5x27,null))};var interaction_log=require(_0x58da[21])(_0x58da[130]);exports[_0x58da[131]]= function(_0xd6c5x21,_0xd6c5x27,_0xd6c5x44){var _0xd6c5x45={channel:_0x58da[132]};if(_0xd6c5x21[_0x58da[99]][_0x58da[96]]){delete _0xd6c5x21[_0x58da[99]][_0x58da[96]]};_0xd6c5x21[_0x58da[99]][_0x58da[133]]= true;_0xd6c5x21[_0x58da[99]][_0x58da[134]]= moment()[_0x58da[108]](_0x58da[107]);_0xd6c5x21[_0x58da[99]][_0x58da[135]]= _0xd6c5x21[_0x58da[99]][_0x58da[135]]|| _0xd6c5x21[_0x58da[119]][_0x58da[96]];return db[_0x58da[68]][_0x58da[98]]({where:{id:_0xd6c5x21[_0x58da[97]][_0x58da[96]],UserId:null},include:[{model:db[_0x58da[153]],as:_0x58da[154]}]})[_0x58da[44]](handleEntityNotFound(_0xd6c5x27,null))[_0x58da[44]](saveUpdates(_0xd6c5x21[_0x58da[99]],null))[_0x58da[44]](function(_0xd6c5x2a){if(_0xd6c5x2a){_0xd6c5x45[_0x58da[42]]= _0xd6c5x2a[_0x58da[144]]({plain:true});return db[_0x58da[152]][_0x58da[98]]({where:{id:_0xd6c5x2a[_0x58da[151]]}})};return null})[_0x58da[44]](handleEntityNotFound(_0xd6c5x27,null))[_0x58da[44]](function(_0xd6c5x2a){if(_0xd6c5x2a){return _0xd6c5x2a[_0x58da[60]]({UserId:_0xd6c5x21[_0x58da[99]][_0x58da[135]],read1stAt:_[_0x58da[113]](_0xd6c5x2a[_0x58da[150]])?moment()[_0x58da[108]](_0x58da[107]):undefined})};return null})[_0x58da[44]](function(_0xd6c5x2a){if(_0xd6c5x2a){_0xd6c5x45[_0x58da[143]]= _0xd6c5x2a[_0x58da[144]]({plain:true});interaction_log[_0x58da[37]](_0x58da[145],_0xd6c5x21[_0x58da[119]][_0x58da[96]],_0xd6c5x21[_0x58da[119]][_0x58da[63]],_0xd6c5x21[_0x58da[119]][_0x58da[146]],_0xd6c5x45[_0x58da[143]][_0x58da[96]],_0xd6c5x21[_0x58da[99]]?JSON[_0x58da[39]](_0xd6c5x21[_0x58da[99]]):_0x58da[147]);return respondWithRpcPromise(_0x58da[148],_0x58da[149],_0xd6c5x45)};return null})[_0x58da[44]](function(_0xd6c5x2a){if(_0xd6c5x2a){if(_0xd6c5x21[_0x58da[99]][_0x58da[136]]){_0xd6c5x45[_0x58da[42]][_0x58da[137]]= util[_0x58da[108]](_0x58da[138],_0xd6c5x21[_0x58da[119]][_0x58da[63]]);_0xd6c5x45[_0x58da[42]][_0x58da[139]]= _0xd6c5x45[_0x58da[139]];_0xd6c5x45[_0x58da[42]][_0x58da[140]]= _0x58da[131];return respondWithRpcPromise(_0x58da[141],_0x58da[141],{event:_0x58da[142],message:_0xd6c5x45[_0x58da[42]]},client9002)[_0x58da[44]](function(){return _0xd6c5x45})};return _0xd6c5x45};return null})[_0x58da[44]](respondWithResult(_0xd6c5x27,null))[_0x58da[35]](handleError(_0xd6c5x27,null))};var interaction_log=require(_0x58da[21])(_0x58da[130]);exports[_0x58da[58]]= function(_0xd6c5x21,_0xd6c5x27,_0xd6c5x44){var _0xd6c5x45={agent:{},channel:_0x58da[132]};if(_0xd6c5x21[_0x58da[99]][_0x58da[96]]){delete _0xd6c5x21[_0x58da[99]][_0x58da[96]]};_0xd6c5x21[_0x58da[99]][_0x58da[135]]= _0xd6c5x21[_0x58da[99]][_0x58da[135]]|| _0xd6c5x21[_0x58da[119]][_0x58da[96]];_0xd6c5x45[_0x58da[155]][_0x58da[96]]= _0xd6c5x21[_0x58da[99]][_0x58da[135]];return db[_0x58da[68]][_0x58da[98]]({where:{id:_0xd6c5x21[_0x58da[97]][_0x58da[96]],UserId:null}})[_0x58da[44]](handleEntityNotFound(_0xd6c5x27,null))[_0x58da[44]](function(_0xd6c5x2a){if(_0xd6c5x2a){_0xd6c5x45[_0x58da[42]]= _0xd6c5x2a[_0x58da[144]]({plain:true});return db[_0x58da[152]][_0x58da[98]]({where:{id:_0xd6c5x2a[_0x58da[151]]}})};return null})[_0x58da[44]](handleEntityNotFound(_0xd6c5x27,null))[_0x58da[44]](function(_0xd6c5x2a){if(_0xd6c5x2a){_0xd6c5x45[_0x58da[143]]= _0xd6c5x2a[_0x58da[144]]({plain:true});interaction_log[_0x58da[37]](_0x58da[157],_0xd6c5x21[_0x58da[119]][_0x58da[96]],_0xd6c5x21[_0x58da[119]][_0x58da[63]],_0xd6c5x21[_0x58da[119]][_0x58da[146]],_0xd6c5x45[_0x58da[143]][_0x58da[96]],_0xd6c5x21[_0x58da[99]]?JSON[_0x58da[39]](_0xd6c5x21[_0x58da[99]]):_0x58da[147]);return respondWithRpcPromise(_0x58da[158],_0x58da[159],_0xd6c5x45)};return null})[_0x58da[44]](function(_0xd6c5x2a){if(_0xd6c5x2a){_0xd6c5x2a[_0x58da[42]][_0x58da[137]]= util[_0x58da[108]](_0x58da[138],_0xd6c5x21[_0x58da[119]][_0x58da[63]]);_0xd6c5x2a[_0x58da[42]][_0x58da[139]]= _0xd6c5x45[_0x58da[139]];_0xd6c5x2a[_0x58da[42]][_0x58da[140]]= _0x58da[58];respondWithRpcPromise(_0x58da[141],_0x58da[141],{event:_0x58da[156],message:_0xd6c5x2a[_0x58da[42]]},client9002);return _0xd6c5x45};return null})[_0x58da[44]](respondWithResult(_0xd6c5x27,null))[_0x58da[35]](handleError(_0xd6c5x27,null))}
\ No newline at end of file
index efea21d..15076a8 100644 (file)
@@ -1 +1 @@
-var _0xe589=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xe589[0];var EventEmitter=require(_0xe589[1]);var MailMessage=require(_0xe589[4])[_0xe589[3]][_0xe589[2]];var MailMessageEvents= new EventEmitter();MailMessageEvents[_0xe589[5]](0);var events={afterCreate:_0xe589[6],afterUpdate:_0xe589[7],afterDestroy:_0xe589[8]};function emitEvent(event){return function(_0x723ax7,_0x723ax8,_0x723ax9){MailMessageEvents[_0xe589[11]](event+ _0xe589[9]+ _0x723ax7[_0xe589[10]],_0x723ax7);MailMessageEvents[_0xe589[11]](event,_0x723ax7);_0x723ax9(null)}}for(var e in events){if(events[_0xe589[12]](e)){var event=events[e];MailMessage[_0xe589[13]](e,emitEvent(event))}};module[_0xe589[14]]= MailMessageEvents
\ No newline at end of file
+var _0x841c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x841c[0];var EventEmitter=require(_0x841c[1]);var MailMessage=require(_0x841c[4])[_0x841c[3]][_0x841c[2]];var MailMessageEvents= new EventEmitter();MailMessageEvents[_0x841c[5]](0);var events={afterCreate:_0x841c[6],afterUpdate:_0x841c[7],afterDestroy:_0x841c[8]};function emitEvent(event){return function(_0x2fecx7,_0x2fecx8,_0x2fecx9){MailMessageEvents[_0x841c[11]](event+ _0x841c[9]+ _0x2fecx7[_0x841c[10]],_0x2fecx7);MailMessageEvents[_0x841c[11]](event,_0x2fecx7);_0x2fecx9(null)}}for(var e in events){if(events[_0x841c[12]](e)){var event=events[e];MailMessage[_0x841c[13]](e,emitEvent(event))}};module[_0x841c[14]]= MailMessageEvents
\ No newline at end of file
index baf3f4c..cb3c82a 100644 (file)
@@ -1 +1 @@
-var _0x3685=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x75\x74\x66\x38\x6D\x62\x34","\x75\x74\x66\x38\x6D\x62\x34\x5F\x75\x6E\x69\x63\x6F\x64\x65\x5F\x63\x69","\x64\x65\x66\x69\x6E\x65"];_0x3685[0];var _=require(_0x3685[1]);var util=require(_0x3685[2]);var logger=require(_0x3685[4])(_0x3685[3]);var moment=require(_0x3685[5]);var BPromise=require(_0x3685[6]);var rp=require(_0x3685[7]);var attributes=require(_0x3685[8]);module[_0x3685[9]]= function(_0xa423x8,_0xa423x9){return _0xa423x8[_0x3685[15]](_0x3685[10],attributes,{tableName:_0x3685[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x3685[12],"\x66\x69\x65\x6C\x64\x73":[_0x3685[12]]}],timestamps:true,charset:_0x3685[13],collate:_0x3685[14]})}
\ No newline at end of file
+var _0xd3b0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x75\x74\x66\x38\x6D\x62\x34","\x75\x74\x66\x38\x6D\x62\x34\x5F\x75\x6E\x69\x63\x6F\x64\x65\x5F\x63\x69","\x64\x65\x66\x69\x6E\x65"];_0xd3b0[0];var _=require(_0xd3b0[1]);var util=require(_0xd3b0[2]);var logger=require(_0xd3b0[4])(_0xd3b0[3]);var moment=require(_0xd3b0[5]);var BPromise=require(_0xd3b0[6]);var rp=require(_0xd3b0[7]);var attributes=require(_0xd3b0[8]);module[_0xd3b0[9]]= function(_0xb42fx8,_0xb42fx9){return _0xb42fx8[_0xd3b0[15]](_0xd3b0[10],attributes,{tableName:_0xd3b0[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0xd3b0[12],"\x66\x69\x65\x6C\x64\x73":[_0xd3b0[12]]}],timestamps:true,charset:_0xd3b0[13],collate:_0xd3b0[14]})}
\ No newline at end of file
index 6ca6867..15d5973 100644 (file)
@@ -1 +1 @@
-var _0x4eea=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65"];_0x4eea[0];var _=require(_0x4eea[1]);var util=require(_0x4eea[2]);var moment=require(_0x4eea[3]);var BPromise=require(_0x4eea[4]);var rs=require(_0x4eea[5]);var fs=require(_0x4eea[6]);var db=require(_0x4eea[8])[_0x4eea[7]];var utils=require(_0x4eea[9]);var logger=require(_0x4eea[11])(_0x4eea[10]);var config=require(_0x4eea[12]);var jayson=require(_0x4eea[13]);var client=jayson[_0x4eea[15]][_0x4eea[14]]({port:9002});var socket=require(_0x4eea[17])({host:_0x4eea[16],port:6379});require(_0x4eea[19])[_0x4eea[18]](socket);function respondWithRpcPromise(_0x6761xf,_0x6761x10,_0x6761x11){return  new BPromise(function(_0x6761x12,_0x6761x13){return client[_0x4eea[32]](_0x6761xf,_0x6761x11)[_0x4eea[31]](function(_0x6761x15){logger[_0x4eea[24]](_0x4eea[20],_0x6761x10,_0x4eea[23]);logger[_0x4eea[27]](_0x4eea[25],_0x6761x10,_0x4eea[23],JSON[_0x4eea[26]](_0x6761x15));if(_0x6761x15[_0x4eea[21]]){if(_0x6761x15[_0x4eea[21]][_0x4eea[28]]=== 500){logger[_0x4eea[21]](_0x4eea[20],_0x6761x10,_0x6761x15[_0x4eea[21]][_0x4eea[29]]);return _0x6761x13(_0x6761x15[_0x4eea[21]][_0x4eea[29]])};logger[_0x4eea[21]](_0x4eea[20],_0x6761x10,_0x6761x15[_0x4eea[21]][_0x4eea[29]]);return _0x6761x12(_0x6761x15[_0x4eea[21]][_0x4eea[29]])}else {logger[_0x4eea[24]](_0x4eea[20],_0x6761x10,_0x4eea[23]);_0x6761x12(_0x6761x15[_0x4eea[30]][_0x4eea[29]])}})[_0x4eea[22]](function(_0x6761x14){logger[_0x4eea[21]](_0x4eea[20],_0x6761x10,_0x6761x14);_0x6761x13(_0x6761x14)})})}exports[_0x4eea[33]]= function(_0x6761x11){var _0x6761x16=this;return  new Promise(function(_0x6761x12,_0x6761x13){return db[_0x4eea[38]][_0x4eea[37]](_0x6761x11[_0x4eea[34]],{raw:_0x6761x11[_0x4eea[35]]?(_0x6761x11[_0x4eea[35]][_0x4eea[36]]=== undefined)?true:false:true})[_0x4eea[31]](function(_0x6761x15){logger[_0x4eea[24]](_0x4eea[33],_0x6761x11);logger[_0x4eea[27]](_0x4eea[33],_0x6761x11,JSON[_0x4eea[26]](_0x6761x15));_0x6761x12(_0x6761x15)})[_0x4eea[22]](function(_0x6761x14){logger[_0x4eea[21]](_0x4eea[33],_0x6761x14[_0x4eea[29]],_0x6761x11);_0x6761x13(_0x6761x16[_0x4eea[21]](500,_0x6761x14[_0x4eea[29]]))})})}
\ No newline at end of file
+var _0xed17=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65"];_0xed17[0];var _=require(_0xed17[1]);var util=require(_0xed17[2]);var moment=require(_0xed17[3]);var BPromise=require(_0xed17[4]);var rs=require(_0xed17[5]);var fs=require(_0xed17[6]);var db=require(_0xed17[8])[_0xed17[7]];var utils=require(_0xed17[9]);var logger=require(_0xed17[11])(_0xed17[10]);var config=require(_0xed17[12]);var jayson=require(_0xed17[13]);var client=jayson[_0xed17[15]][_0xed17[14]]({port:9002});var socket=require(_0xed17[17])({host:_0xed17[16],port:6379});require(_0xed17[19])[_0xed17[18]](socket);function respondWithRpcPromise(_0x4e14xf,_0x4e14x10,_0x4e14x11){return  new BPromise(function(_0x4e14x12,_0x4e14x13){return client[_0xed17[32]](_0x4e14xf,_0x4e14x11)[_0xed17[31]](function(_0x4e14x15){logger[_0xed17[24]](_0xed17[20],_0x4e14x10,_0xed17[23]);logger[_0xed17[27]](_0xed17[25],_0x4e14x10,_0xed17[23],JSON[_0xed17[26]](_0x4e14x15));if(_0x4e14x15[_0xed17[21]]){if(_0x4e14x15[_0xed17[21]][_0xed17[28]]=== 500){logger[_0xed17[21]](_0xed17[20],_0x4e14x10,_0x4e14x15[_0xed17[21]][_0xed17[29]]);return _0x4e14x13(_0x4e14x15[_0xed17[21]][_0xed17[29]])};logger[_0xed17[21]](_0xed17[20],_0x4e14x10,_0x4e14x15[_0xed17[21]][_0xed17[29]]);return _0x4e14x12(_0x4e14x15[_0xed17[21]][_0xed17[29]])}else {logger[_0xed17[24]](_0xed17[20],_0x4e14x10,_0xed17[23]);_0x4e14x12(_0x4e14x15[_0xed17[30]][_0xed17[29]])}})[_0xed17[22]](function(_0x4e14x14){logger[_0xed17[21]](_0xed17[20],_0x4e14x10,_0x4e14x14);_0x4e14x13(_0x4e14x14)})})}exports[_0xed17[33]]= function(_0x4e14x11){var _0x4e14x16=this;return  new Promise(function(_0x4e14x12,_0x4e14x13){return db[_0xed17[38]][_0xed17[37]](_0x4e14x11[_0xed17[34]],{raw:_0x4e14x11[_0xed17[35]]?(_0x4e14x11[_0xed17[35]][_0xed17[36]]=== undefined)?true:false:true})[_0xed17[31]](function(_0x4e14x15){logger[_0xed17[24]](_0xed17[33],_0x4e14x11);logger[_0xed17[27]](_0xed17[33],_0x4e14x11,JSON[_0xed17[26]](_0x4e14x15));_0x4e14x12(_0x4e14x15)})[_0xed17[22]](function(_0x4e14x14){logger[_0xed17[21]](_0xed17[33],_0x4e14x14[_0xed17[29]],_0x4e14x11);_0x4e14x13(_0x4e14x16[_0xed17[21]](500,_0x4e14x14[_0xed17[29]]))})})}
\ No newline at end of file
index 8f024fe..74b4dd8 100644 (file)
@@ -1 +1 @@
-var _0x3f6a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E"];_0x3f6a[0];var MailMessageEvents=require(_0x3f6a[1]);var events=[_0x3f6a[2],_0x3f6a[3],_0x3f6a[4]];function createListener(_0x7657x4,_0x7657x5){return function(_0x7657x6){_0x7657x5[_0x3f6a[5]](_0x7657x4,_0x7657x6)}}function removeListener(_0x7657x4,_0x7657x8){return function(){MailMessageEvents[_0x3f6a[6]](_0x7657x4,_0x7657x8)}}exports[_0x3f6a[7]]= function(_0x7657x5){for(var _0x7657x9=0,_0x7657xa=events[_0x3f6a[8]];_0x7657x9< _0x7657xa;_0x7657x9++){var _0x7657x4=events[_0x7657x9];var _0x7657x8=createListener(_0x3f6a[9]+ _0x7657x4,_0x7657x5);MailMessageEvents[_0x3f6a[10]](_0x7657x4,_0x7657x8)}}
\ No newline at end of file
+var _0xd205=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E"];_0xd205[0];var MailMessageEvents=require(_0xd205[1]);var events=[_0xd205[2],_0xd205[3],_0xd205[4]];function createListener(_0xe524x4,_0xe524x5){return function(_0xe524x6){_0xe524x5[_0xd205[5]](_0xe524x4,_0xe524x6)}}function removeListener(_0xe524x4,_0xe524x8){return function(){MailMessageEvents[_0xd205[6]](_0xe524x4,_0xe524x8)}}exports[_0xd205[7]]= function(_0xe524x5){for(var _0xe524x9=0,_0xe524xa=events[_0xd205[8]];_0xe524x9< _0xe524xa;_0xe524x9++){var _0xe524x4=events[_0xe524x9];var _0xe524x8=createListener(_0xd205[9]+ _0xe524x4,_0xe524x5);MailMessageEvents[_0xd205[10]](_0xe524x4,_0xe524x8)}}
\ No newline at end of file
index 180e509..8e2354a 100644 (file)
@@ -1 +1 @@
-var _0xf197=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6D\x65\x6D\x62\x65\x72\x73","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x74\x65\x61\x6D\x73","\x67\x65\x74\x54\x65\x61\x6D\x73","\x2F\x3A\x69\x64\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x54\x65\x61\x6D\x73","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xf197[0];var multer=require(_0xf197[1]);var util=require(_0xf197[2]);var path=require(_0xf197[3]);var express=require(_0xf197[4]);var router=express.Router();var auth=require(_0xf197[5]);var interaction=require(_0xf197[6]);var config=require(_0xf197[7]);var controller=require(_0xf197[8]);router[_0xf197[12]](_0xf197[9],auth[_0xf197[10]](),controller[_0xf197[11]]);router[_0xf197[12]](_0xf197[13],auth[_0xf197[10]](),controller[_0xf197[14]]);router[_0xf197[12]](_0xf197[15],auth[_0xf197[10]](),controller[_0xf197[16]]);router[_0xf197[12]](_0xf197[17],auth[_0xf197[10]](),controller[_0xf197[18]]);router[_0xf197[12]](_0xf197[19],auth[_0xf197[10]](),controller[_0xf197[20]]);router[_0xf197[12]](_0xf197[21],auth[_0xf197[10]](),controller[_0xf197[22]]);router[_0xf197[24]](_0xf197[9],auth[_0xf197[10]](),controller[_0xf197[23]]);router[_0xf197[24]](_0xf197[19],auth[_0xf197[10]](),controller[_0xf197[25]]);router[_0xf197[24]](_0xf197[21],auth[_0xf197[10]](),controller[_0xf197[26]]);router[_0xf197[28]](_0xf197[15],auth[_0xf197[10]](),controller[_0xf197[27]]);router[_0xf197[30]](_0xf197[15],auth[_0xf197[10]](),controller[_0xf197[29]]);router[_0xf197[30]](_0xf197[19],auth[_0xf197[10]](),controller[_0xf197[31]]);router[_0xf197[30]](_0xf197[21],auth[_0xf197[10]](),controller[_0xf197[32]]);module[_0xf197[33]]= router
\ No newline at end of file
+var _0x478d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6D\x65\x6D\x62\x65\x72\x73","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x74\x65\x61\x6D\x73","\x67\x65\x74\x54\x65\x61\x6D\x73","\x2F\x3A\x69\x64\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x54\x65\x61\x6D\x73","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x478d[0];var multer=require(_0x478d[1]);var util=require(_0x478d[2]);var path=require(_0x478d[3]);var express=require(_0x478d[4]);var router=express.Router();var auth=require(_0x478d[5]);var interaction=require(_0x478d[6]);var config=require(_0x478d[7]);var controller=require(_0x478d[8]);router[_0x478d[12]](_0x478d[9],auth[_0x478d[10]](),controller[_0x478d[11]]);router[_0x478d[12]](_0x478d[13],auth[_0x478d[10]](),controller[_0x478d[14]]);router[_0x478d[12]](_0x478d[15],auth[_0x478d[10]](),controller[_0x478d[16]]);router[_0x478d[12]](_0x478d[17],auth[_0x478d[10]](),controller[_0x478d[18]]);router[_0x478d[12]](_0x478d[19],auth[_0x478d[10]](),controller[_0x478d[20]]);router[_0x478d[12]](_0x478d[21],auth[_0x478d[10]](),controller[_0x478d[22]]);router[_0x478d[24]](_0x478d[9],auth[_0x478d[10]](),controller[_0x478d[23]]);router[_0x478d[24]](_0x478d[19],auth[_0x478d[10]](),controller[_0x478d[25]]);router[_0x478d[24]](_0x478d[21],auth[_0x478d[10]](),controller[_0x478d[26]]);router[_0x478d[28]](_0x478d[15],auth[_0x478d[10]](),controller[_0x478d[27]]);router[_0x478d[30]](_0x478d[15],auth[_0x478d[10]](),controller[_0x478d[29]]);router[_0x478d[30]](_0x478d[19],auth[_0x478d[10]](),controller[_0x478d[31]]);router[_0x478d[30]](_0x478d[21],auth[_0x478d[10]](),controller[_0x478d[32]]);module[_0x478d[33]]= router
\ No newline at end of file
index c664ed2..a184bf1 100644 (file)
@@ -1 +1 @@
-var _0x7854=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x49\x4E\x54\x45\x47\x45\x52","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E"];_0x7854[0];var Sequelize=require(_0x7854[1]);module[_0x7854[2]]= {name:{type:Sequelize[_0x7854[3]],unique:_0x7854[4],validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i}},description:{type:Sequelize[_0x7854[3]]},timeout:{type:Sequelize[_0x7854[5]],validate:{min:1,max:2147483}},strategy:{type:Sequelize.ENUM(_0x7854[6],_0x7854[7],_0x7854[8])}}
\ No newline at end of file
+var _0xbefd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x49\x4E\x54\x45\x47\x45\x52","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E"];_0xbefd[0];var Sequelize=require(_0xbefd[1]);module[_0xbefd[2]]= {name:{type:Sequelize[_0xbefd[3]],unique:_0xbefd[4],validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i}},description:{type:Sequelize[_0xbefd[3]]},timeout:{type:Sequelize[_0xbefd[5]],validate:{min:1,max:2147483}},strategy:{type:Sequelize.ENUM(_0xbefd[6],_0xbefd[7],_0xbefd[8])}}
\ No newline at end of file
index bf52048..74a63c5 100644 (file)
@@ -1 +1 @@
-var _0x1558=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x66\x6F\x72\x6D\x61\x74","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x55\x73\x65\x72\x49\x64","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x55\x73\x65\x72","\x67\x65\x74","\x55\x73\x65\x72\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x54\x65\x61\x6D\x73","\x54\x65\x61\x6D","\x61\x64\x64\x54\x65\x61\x6D\x73","\x69\x64\x73","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x41\x67\x65\x6E\x74\x73","\x75\x6E\x69\x6F\x6E","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x75\x73\x65\x72\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x6F\x6D\x69\x74","\x69\x73\x41\x72\x72\x61\x79","\x75\x73\x65\x72\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x67\x65\x74\x41\x67\x65\x6E\x74\x73"];_0x1558[0];var jsonpatch=require(_0x1558[1]);var rp=require(_0x1558[2]);var moment=require(_0x1558[3]);var BPromise=require(_0x1558[4]);var Mustache=require(_0x1558[5]);var util=require(_0x1558[6]);var path=require(_0x1558[7]);var sox=require(_0x1558[8]);var csv=require(_0x1558[9]);var ejs=require(_0x1558[10]);var fs=require(_0x1558[11]);var _=require(_0x1558[12]);var squel=require(_0x1558[13]);var crypto=require(_0x1558[14]);var jsforce=require(_0x1558[15]);var deskjs=require(_0x1558[16]);var toCsv=require(_0x1558[9]);var querystring=require(_0x1558[17]);var Papa=require(_0x1558[18]);var qs=require(_0x1558[19]);var logger=require(_0x1558[21])(_0x1558[20]);var utils=require(_0x1558[22]);var config=require(_0x1558[23]);var db=require(_0x1558[25])[_0x1558[24]];var socket=require(_0x1558[27])({host:_0x1558[26],port:6379});require(_0x1558[29])[_0x1558[28]](socket);function respondWithStatusCode(_0x4eadx1b,_0x4eadx1c){_0x4eadx1c= _0x4eadx1c|| 204;return function(_0x4eadx1d){if(_0x4eadx1d){return _0x4eadx1b[_0x1558[30]](_0x4eadx1c)};return _0x4eadx1b[_0x1558[32]](_0x4eadx1c)[_0x1558[31]]()}}function respondWithResult(_0x4eadx1b,_0x4eadx1c){_0x4eadx1c= _0x4eadx1c|| 200;return function(_0x4eadx1d){if(_0x4eadx1d){return _0x4eadx1b[_0x1558[32]](_0x4eadx1c)[_0x1558[33]](_0x4eadx1d)}}}function respondWithFilteredResult(_0x4eadx1b,_0x4eadx20){return function(_0x4eadx1d){if(_0x4eadx1d){var _0x4eadx21=_0x4eadx1d[_0x1558[34]],_0x4eadx22=_0x4eadx20[_0x1558[35]],_0x4eadx23=_0x4eadx20[_0x1558[35]]+ _0x4eadx20[_0x1558[36]],_0x4eadx1c;if(_0x4eadx23>= _0x4eadx21){_0x4eadx23= _0x4eadx21;_0x4eadx1c= 200}else {_0x4eadx1c= 206};_0x4eadx1b[_0x1558[32]](_0x4eadx1c);return _0x4eadx1b[_0x1558[40]](_0x1558[37],_0x4eadx22+ _0x1558[38]+ _0x4eadx23+ _0x1558[39]+ _0x4eadx21)[_0x1558[33]](_0x4eadx1d)};return null}}function patchUpdates(_0x4eadx25){return function(_0x4eadx1d){try{jsonpatch[_0x1558[41]](_0x4eadx1d,_0x4eadx25,true)}catch(err){return BPromise[_0x1558[42]](err)};return _0x4eadx1d[_0x1558[43]]()}}function saveUpdates(_0x4eadx27,_0x4eadx1c){return function(_0x4eadx1d){if(_0x4eadx1d){return _0x4eadx1d[_0x1558[45]](_0x4eadx27)[_0x1558[44]](function(_0x4eadx28){return _0x4eadx28})};return null}}function removeEntity(_0x4eadx1b,_0x4eadx1c){return function(_0x4eadx1d){if(_0x4eadx1d){return _0x4eadx1d[_0x1558[46]]()[_0x1558[44]](function(){_0x4eadx1b[_0x1558[32]](204)[_0x1558[31]]()})}}}function handleEntityNotFound(_0x4eadx1b,_0x4eadx1c){return function(_0x4eadx1d){if(!_0x4eadx1d){_0x4eadx1b[_0x1558[30]](404)};return _0x4eadx1d}}function handleError(_0x4eadx1b,_0x4eadx1c){_0x4eadx1c= _0x4eadx1c|| 500;return function(_0x4eadx2c){logger[_0x1558[48]](_0x4eadx2c[_0x1558[47]]);if(_0x4eadx2c[_0x1558[49]]){delete _0x4eadx2c[_0x1558[49]]};_0x4eadx1b[_0x1558[32]](_0x4eadx1c)[_0x1558[50]](_0x4eadx2c)}}exports[_0x1558[51]]= function(_0x4eadx2d,_0x4eadx1b){var _0x4eadx20={},_0x4eadx2e={},_0x4eadx2f={count:0,rows:[]};_0x4eadx2e[_0x1558[52]]= _[_0x1558[55]](db[_0x1558[54]][_0x1558[53]]);var _0x4eadx30={dateStart:_0x4eadx2d[_0x1558[57]][_0x1558[56]],dateEnd:_0x4eadx2d[_0x1558[57]][_0x1558[58]]};delete _0x4eadx2d[_0x1558[57]][_0x1558[56]];delete _0x4eadx2d[_0x1558[57]][_0x1558[58]];_0x4eadx2e[_0x1558[57]]= _[_0x1558[55]](_0x4eadx2d[_0x1558[57]]);_0x4eadx2e[_0x1558[59]]= _[_0x1558[60]](_0x4eadx2e[_0x1558[52]],_0x4eadx2e[_0x1558[57]]);_0x4eadx20[_0x1558[61]]= _[_0x1558[60]](_0x4eadx2e[_0x1558[52]],qs[_0x1558[62]](_0x4eadx2d[_0x1558[57]][_0x1558[62]]));_0x4eadx20[_0x1558[61]]= (_0x4eadx20[_0x1558[61]][_0x1558[63]])?_0x4eadx20[_0x1558[61]]:_0x4eadx2e[_0x1558[52]];if(!_0x4eadx2d[_0x1558[57]][_0x1558[65]](_0x1558[64])){_0x4eadx20[_0x1558[36]]= qs[_0x1558[36]](_0x4eadx2d[_0x1558[57]][_0x1558[36]]);_0x4eadx20[_0x1558[35]]= qs[_0x1558[35]](_0x4eadx2d[_0x1558[57]][_0x1558[35]])};_0x4eadx20[_0x1558[66]]= qs[_0x1558[67]](_0x4eadx2d[_0x1558[57]][_0x1558[67]]);_0x4eadx20[_0x1558[68]]= qs[_0x1558[59]](_[_0x1558[69]](_0x4eadx2d[_0x1558[57]],_0x4eadx2e[_0x1558[59]]));if(_0x4eadx30[_0x1558[56]]){if(_0x4eadx30[_0x1558[58]]){_0x4eadx30[_0x1558[58]]= moment(_0x4eadx30[_0x1558[58]])[_0x1558[71]](1,_0x1558[70])}else {_0x4eadx30[_0x1558[58]]= moment(_0x4eadx30[_0x1558[56]])[_0x1558[71]](1,_0x1558[70])};_[_0x1558[72]](_0x4eadx20[_0x1558[68]],{createdAt:{$gte:_0x4eadx30[_0x1558[56]],$lte:_0x4eadx30[_0x1558[58]]}})};if(_0x4eadx2d[_0x1558[57]][_0x1558[73]]){_0x4eadx20[_0x1558[68]]= _[_0x1558[72]](_0x4eadx20[_0x1558[68]],{$or:_[_0x1558[75]](_0x4eadx20[_0x1558[61]],function(_0x4eadx31){var _0x4eadx2f={};_0x4eadx2f[_0x4eadx31]= {$like:_0x1558[74]+ _0x4eadx2d[_0x1558[57]][_0x1558[73]]+ _0x1558[74]};return _0x4eadx2f})})};_0x4eadx20= _[_0x1558[72]]({},_0x4eadx20,_0x4eadx2d[_0x1558[76]]);var _0x4eadx32={where:_0x4eadx20[_0x1558[68]]};return db[_0x1558[54]][_0x1558[34]](_0x4eadx32)[_0x1558[44]](function(_0x4eadx21){_0x4eadx2f[_0x1558[34]]= _0x4eadx21;if(_0x4eadx2d[_0x1558[57]][_0x1558[79]]){_0x4eadx20[_0x1558[80]]= [{all:true}]};return db[_0x1558[54]][_0x1558[81]](_0x4eadx20)})[_0x1558[44]](function(_0x4eadx33){_0x4eadx2f[_0x1558[78]]= _0x4eadx33;return _0x4eadx2f})[_0x1558[44]](respondWithFilteredResult(_0x4eadx1b,_0x4eadx20))[_0x1558[77]](handleError(_0x4eadx1b,null))};exports[_0x1558[82]]= function(_0x4eadx2d,_0x4eadx1b){var _0x4eadx20={raw:true,where:{id:_0x4eadx2d[_0x1558[84]][_0x1558[83]]}},_0x4eadx2e={};_0x4eadx2e[_0x1558[52]]= _[_0x1558[55]](db[_0x1558[54]][_0x1558[53]]);_0x4eadx2e[_0x1558[57]]= _[_0x1558[55]](_0x4eadx2d[_0x1558[57]]);_0x4eadx2e[_0x1558[59]]= _[_0x1558[60]](_0x4eadx2e[_0x1558[52]],_0x4eadx2e[_0x1558[57]]);_0x4eadx20[_0x1558[61]]= _[_0x1558[60]](_0x4eadx2e[_0x1558[52]],qs[_0x1558[62]](_0x4eadx2d[_0x1558[57]][_0x1558[62]]));_0x4eadx20[_0x1558[61]]= (_0x4eadx20[_0x1558[61]][_0x1558[63]])?_0x4eadx20[_0x1558[61]]:_0x4eadx2e[_0x1558[52]];if(_0x4eadx2d[_0x1558[57]][_0x1558[79]]){_0x4eadx20[_0x1558[80]]= [{all:true}]};_0x4eadx20= _[_0x1558[72]]({},_0x4eadx20,_0x4eadx2d[_0x1558[76]]);return db[_0x1558[54]][_0x1558[85]](_0x4eadx20)[_0x1558[44]](handleEntityNotFound(_0x4eadx1b,null))[_0x1558[44]](respondWithResult(_0x4eadx1b,null))[_0x1558[77]](handleError(_0x4eadx1b,null))};exports[_0x1558[86]]= function(_0x4eadx2d,_0x4eadx1b){return db[_0x1558[54]][_0x1558[86]](_0x4eadx2d[_0x1558[87]],{})[_0x1558[44]](respondWithResult(_0x4eadx1b,201))[_0x1558[77]](handleError(_0x4eadx1b,null))};exports[_0x1558[45]]= function(_0x4eadx2d,_0x4eadx1b){if(_0x4eadx2d[_0x1558[87]][_0x1558[83]]){delete _0x4eadx2d[_0x1558[87]][_0x1558[83]]};return db[_0x1558[54]][_0x1558[85]]({where:{id:_0x4eadx2d[_0x1558[84]][_0x1558[83]]}})[_0x1558[44]](handleEntityNotFound(_0x4eadx1b,null))[_0x1558[44]](saveUpdates(_0x4eadx2d[_0x1558[87]],null))[_0x1558[44]](respondWithResult(_0x4eadx1b,null))[_0x1558[77]](handleError(_0x4eadx1b,null))};exports[_0x1558[46]]= function(_0x4eadx2d,_0x4eadx1b){return db[_0x1558[54]][_0x1558[85]]({where:{id:_0x4eadx2d[_0x1558[84]][_0x1558[83]]}})[_0x1558[44]](handleEntityNotFound(_0x4eadx1b,null))[_0x1558[44]](removeEntity(_0x4eadx1b,null))[_0x1558[77]](handleError(_0x4eadx1b,null))};exports[_0x1558[88]]= function(_0x4eadx2d,_0x4eadx1b){return db[_0x1558[54]][_0x1558[88]]()[_0x1558[44]](respondWithResult(_0x4eadx1b,null))[_0x1558[77]](handleError(_0x4eadx1b,null))};exports[_0x1558[89]]= function(_0x4eadx2d,_0x4eadx1b,_0x4eadx34){var _0x4eadx20={raw:true,where:{}},_0x4eadx2e={},_0x4eadx35;return db[_0x1558[54]][_0x1558[103]]({where:{id:_0x4eadx2d[_0x1558[84]][_0x1558[83]]}})[_0x1558[44]](handleEntityNotFound(_0x4eadx1b,null))[_0x1558[44]](function(_0x4eadx1d){if(_0x4eadx1d){_0x4eadx35= _0x4eadx1d[_0x1558[100]]({plain:true});_0x4eadx2e[_0x1558[52]]= _[_0x1558[55]](db[_0x1558[101]][_0x1558[53]]);_0x4eadx2e[_0x1558[57]]= _[_0x1558[55]](_0x4eadx2d[_0x1558[57]]);_0x4eadx2e[_0x1558[59]]= _[_0x1558[60]](_0x4eadx2e[_0x1558[52]],_0x4eadx2e[_0x1558[57]]);_0x4eadx20[_0x1558[61]]= _[_0x1558[60]](_0x4eadx2e[_0x1558[52]],qs[_0x1558[62]](_0x4eadx2d[_0x1558[57]][_0x1558[62]]));_0x4eadx20[_0x1558[61]]= (_0x4eadx20[_0x1558[61]][_0x1558[63]])?_0x4eadx20[_0x1558[61]]:_0x4eadx2e[_0x1558[52]];if(!_0x4eadx2d[_0x1558[57]][_0x1558[65]](_0x1558[64])){_0x4eadx20[_0x1558[36]]= qs[_0x1558[36]](_0x4eadx2d[_0x1558[57]][_0x1558[36]]);_0x4eadx20[_0x1558[35]]= qs[_0x1558[35]](_0x4eadx2d[_0x1558[57]][_0x1558[35]])};_0x4eadx20[_0x1558[66]]= qs[_0x1558[67]](_0x4eadx2d[_0x1558[57]][_0x1558[67]]);_0x4eadx20[_0x1558[68]]= qs[_0x1558[59]](_[_0x1558[69]](_0x4eadx2d[_0x1558[57]],_0x4eadx2e[_0x1558[59]]));_0x4eadx20[_0x1558[68]][_0x1558[102]]= _0x4eadx1d[_0x1558[83]];if(_0x4eadx2d[_0x1558[57]][_0x1558[73]]){_0x4eadx20[_0x1558[68]]= _[_0x1558[72]](_0x4eadx20[_0x1558[68]],{$or:_[_0x1558[75]](_0x4eadx20[_0x1558[61]],function(_0x4eadx31){var _0x4eadx2f={};_0x4eadx2f[_0x4eadx31]= {$like:_0x1558[74]+ _0x4eadx2d[_0x1558[57]][_0x1558[73]]+ _0x1558[74]};return _0x4eadx2f})})};_0x4eadx20= _[_0x1558[72]]({},_0x4eadx20,_0x4eadx2d[_0x1558[76]]);return db[_0x1558[101]][_0x1558[81]](_0x4eadx20)}})[_0x1558[44]](function(_0x4eadx1b){if(_0x4eadx1b){return db[_0x1558[99]][_0x1558[98]]({where:{id:_[_0x1558[75]](_0x4eadx1b,_0x1558[96]),role:_0x1558[97]},attributes:[_0x1558[83],_0x1558[49],_0x1558[93],_0x1558[95],_0x1558[94]]})}})[_0x1558[44]](function(_0x4eadx1b){if(_0x4eadx1b){return {count:_0x4eadx1b[_0x1558[34]],rows:_[_0x1558[75]](_0x4eadx1b[_0x1558[78]],function(_0x4eadx36){return {membername:_0x4eadx36[_0x1558[49]],UserId:_0x4eadx36[_0x1558[83]],queue_name:_0x4eadx35[_0x1558[49]],MailQueueId:_0x4eadx35[_0x1558[83]],interface:util[_0x1558[92]](_0x1558[90],_0x1558[91],_0x4eadx36[_0x1558[49]]),penalty:0,paused:_0x4eadx36[_0x1558[93]],createdAt:_0x4eadx36[_0x1558[94]],updatedAt:_0x4eadx36[_0x1558[95]]}})}}else {return {count:0,rows:[]}}})[_0x1558[44]](respondWithFilteredResult(_0x4eadx1b,_0x4eadx20))[_0x1558[77]](handleError(_0x4eadx1b,null))};exports[_0x1558[104]]= function(_0x4eadx2d,_0x4eadx1d,_0x4eadx34){var _0x4eadx20={};var _0x4eadx2e={};var _0x4eadx37;var _0x4eadx21;return db[_0x1558[54]][_0x1558[103]]({where:{id:_0x4eadx2d[_0x1558[84]][_0x1558[83]]}})[_0x1558[44]](handleEntityNotFound(_0x4eadx1d,null))[_0x1558[44]](function(_0x4eadx1d){if(_0x4eadx1d){_0x4eadx37= _0x4eadx1d;_0x4eadx2e[_0x1558[52]]= _[_0x1558[55]](db[_0x1558[105]][_0x1558[53]]);_0x4eadx2e[_0x1558[57]]= _[_0x1558[55]](_0x4eadx2d[_0x1558[57]]);_0x4eadx2e[_0x1558[59]]= _[_0x1558[60]](_0x4eadx2e[_0x1558[52]],_0x4eadx2e[_0x1558[57]]);_0x4eadx20[_0x1558[61]]= _[_0x1558[60]](_0x4eadx2e[_0x1558[52]],qs[_0x1558[62]](_0x4eadx2d[_0x1558[57]][_0x1558[62]]));_0x4eadx20[_0x1558[61]]= (_0x4eadx20[_0x1558[61]][_0x1558[63]])?_0x4eadx20[_0x1558[61]]:_0x4eadx2e[_0x1558[52]];_0x4eadx20[_0x1558[66]]= qs[_0x1558[67]](_0x4eadx2d[_0x1558[57]][_0x1558[67]]);_0x4eadx20[_0x1558[68]]= qs[_0x1558[59]](_[_0x1558[69]](_0x4eadx2d[_0x1558[57]],_0x4eadx2e[_0x1558[59]]));if(_0x4eadx2d[_0x1558[57]][_0x1558[73]]){_0x4eadx20[_0x1558[68]]= _[_0x1558[72]](_0x4eadx20[_0x1558[68]],{$or:_[_0x1558[75]](_0x4eadx20[_0x1558[61]],function(_0x4eadx31){var _0x4eadx2f={};_0x4eadx2f[_0x4eadx31]= {$like:_0x1558[74]+ _0x4eadx2d[_0x1558[57]][_0x1558[73]]+ _0x1558[74]};return _0x4eadx2f})})};_0x4eadx20= _[_0x1558[72]]({},_0x4eadx20,_0x4eadx2d[_0x1558[76]]);return _0x4eadx37[_0x1558[104]](_0x4eadx20)}})[_0x1558[44]](function(_0x4eadx38){if(_0x4eadx38){_0x4eadx21= _0x4eadx38[_0x1558[63]];if(!_0x4eadx2d[_0x1558[57]][_0x1558[65]](_0x1558[64])){_0x4eadx20[_0x1558[36]]= qs[_0x1558[36]](_0x4eadx2d[_0x1558[57]][_0x1558[36]]);_0x4eadx20[_0x1558[35]]= qs[_0x1558[35]](_0x4eadx2d[_0x1558[57]][_0x1558[35]])};return _0x4eadx37[_0x1558[104]](_0x4eadx20)}})[_0x1558[44]](function(_0x4eadx33){if(_0x4eadx33){return _0x4eadx33?{count:_0x4eadx21,rows:_0x4eadx33}:null}})[_0x1558[44]](respondWithResult(_0x4eadx1d,null))[_0x1558[77]](handleError(_0x4eadx1d,null))};exports[_0x1558[106]]= function(_0x4eadx2d,_0x4eadx1b,_0x4eadx34){var _0x4eadx39=[];var _0x4eadx35;return db[_0x1558[105]][_0x1558[81]]({where:{id:_0x4eadx2d[_0x1558[87]][_0x1558[107]]},attributes:[_0x1558[83]],include:[{model:db[_0x1558[99]],as:_0x1558[110],attributes:[_0x1558[83]],raw:true}]})[_0x1558[44]](function(_0x4eadx3c){if(_0x4eadx3c){for(var _0x4eadx3d=0;_0x4eadx3d< _0x4eadx3c[_0x1558[63]];_0x4eadx3d+= 1){for(var _0x4eadx3e=0;_0x4eadx3e< _0x4eadx3c[_0x4eadx3d][_0x1558[110]][_0x1558[63]];_0x4eadx3e+= 1){_0x4eadx39= _[_0x1558[111]](_0x4eadx39,[_0x4eadx3c[_0x4eadx3d][_0x1558[110]][_0x4eadx3e][_0x1558[83]]])}};return _0x4eadx39}})[_0x1558[44]](function(_0x4eadx3b){if(_0x4eadx3b){return db[_0x1558[54]][_0x1558[85]]({where:{id:_0x4eadx2d[_0x1558[84]][_0x1558[83]]}})}})[_0x1558[44]](function(_0x4eadx3a){if(_0x4eadx3a){_0x4eadx35= _0x4eadx3a;return _0x4eadx35[_0x1558[109]](_0x4eadx39,{penalty:_0x4eadx2d[_0x1558[87]][_0x1558[108]]})}})[_0x1558[44]](function(_0x4eadx1d){if(_0x4eadx1d){return _0x4eadx35[_0x1558[106]](_0x4eadx2d[_0x1558[87]][_0x1558[107]])}})[_0x1558[44]](handleEntityNotFound(_0x4eadx1b,null))[_0x1558[44]](respondWithStatusCode(_0x4eadx1b,null))[_0x1558[77]](handleError(_0x4eadx1b,null))};exports[_0x1558[112]]= function(_0x4eadx2d,_0x4eadx1b,_0x4eadx34){var _0x4eadx39=[];var _0x4eadx35;return db[_0x1558[105]][_0x1558[81]]({where:{id:_0x4eadx2d[_0x1558[57]][_0x1558[107]]},attributes:[_0x1558[83]],include:[{model:db[_0x1558[99]],as:_0x1558[110],attributes:[_0x1558[83]],raw:true}]})[_0x1558[44]](function(_0x4eadx3c){if(_0x4eadx3c){for(var _0x4eadx3d=0;_0x4eadx3d< _0x4eadx3c[_0x1558[63]];_0x4eadx3d+= 1){for(var _0x4eadx3e=0;_0x4eadx3e< _0x4eadx3c[_0x4eadx3d][_0x1558[110]][_0x1558[63]];_0x4eadx3e+= 1){_0x4eadx39= _[_0x1558[111]](_0x4eadx39,[_0x4eadx3c[_0x4eadx3d][_0x1558[110]][_0x4eadx3e][_0x1558[83]]])}};return _0x4eadx39}})[_0x1558[44]](function(_0x4eadx3b){if(_0x4eadx3b){return db[_0x1558[54]][_0x1558[85]]({where:{id:_0x4eadx2d[_0x1558[84]][_0x1558[83]]}})}})[_0x1558[44]](function(_0x4eadx3a){if(_0x4eadx3a){_0x4eadx35= _0x4eadx3a;return _0x4eadx35[_0x1558[113]](_0x4eadx39)}})[_0x1558[44]](function(_0x4eadx1d){if(_0x4eadx35){return _0x4eadx35[_0x1558[112]](_0x4eadx2d[_0x1558[57]][_0x1558[107]])}})[_0x1558[44]](handleEntityNotFound(_0x4eadx1b,null))[_0x1558[44]](respondWithStatusCode(_0x4eadx1b,null))[_0x1558[77]](handleError(_0x4eadx1b,null))};exports[_0x1558[109]]= function(_0x4eadx2d,_0x4eadx1b,_0x4eadx34){return db[_0x1558[54]][_0x1558[85]]({where:{id:_0x4eadx2d[_0x1558[84]][_0x1558[83]]}})[_0x1558[44]](handleEntityNotFound(_0x4eadx1b,null))[_0x1558[44]](function(_0x4eadx1d){if(_0x4eadx1d){return _0x4eadx1d[_0x1558[109]](_0x4eadx2d[_0x1558[87]][_0x1558[107]],_[_0x1558[117]](_0x4eadx2d[_0x1558[87]],[_0x1558[107],_0x1558[83]])|| {})[_0x1558[116]](function(_0x4eadx38){for(var _0x4eadx3d=0;_0x4eadx3d< _0x4eadx2d[_0x1558[87]][_0x1558[107]][_0x1558[63]];_0x4eadx3d+= 1){socket[_0x1558[115]](_0x1558[114],{UserId:_0x4eadx2d[_0x1558[87]][_0x1558[107]][_0x4eadx3d],MailQueueId:_0x4eadx2d[_0x1558[84]][_0x1558[83]]})};return _0x4eadx38})}})[_0x1558[44]](respondWithResult(_0x4eadx1b,null))[_0x1558[77]](handleError(_0x4eadx1b,null))};exports[_0x1558[113]]= function(_0x4eadx2d,_0x4eadx1b,_0x4eadx34){var _0x4eadx38;return db[_0x1558[54]][_0x1558[85]]({where:{id:_0x4eadx2d[_0x1558[84]][_0x1558[83]]}})[_0x1558[44]](handleEntityNotFound(_0x4eadx1b,null))[_0x1558[44]](function(_0x4eadx1d){if(_0x4eadx1d){return _0x4eadx1d[_0x1558[113]](_0x4eadx2d[_0x1558[57]][_0x1558[107]])[_0x1558[44]](function(_0x4eadx38){if(_[_0x1558[118]](_0x4eadx2d[_0x1558[57]][_0x1558[107]])){for(var _0x4eadx3d=0;_0x4eadx3d< _0x4eadx2d[_0x1558[57]][_0x1558[107]][_0x1558[63]];_0x4eadx3d+= 1){socket[_0x1558[115]](_0x1558[119],{UserId:_0x4eadx2d[_0x1558[57]][_0x1558[107]][_0x4eadx3d],MailQueueId:_0x4eadx2d[_0x1558[84]][_0x1558[83]]})}}else {socket[_0x1558[115]](_0x1558[119],{UserId:_0x4eadx2d[_0x1558[57]][_0x1558[107]],MailQueueId:_0x4eadx2d[_0x1558[84]][_0x1558[83]]})}})}})[_0x1558[44]](respondWithStatusCode(_0x4eadx1b,null))[_0x1558[77]](handleError(_0x4eadx1b,null))};exports[_0x1558[120]]= function(_0x4eadx2d,_0x4eadx1d,_0x4eadx34){var _0x4eadx20={};var _0x4eadx2e={};var _0x4eadx37;var _0x4eadx21;return db[_0x1558[54]][_0x1558[103]]({where:{id:_0x4eadx2d[_0x1558[84]][_0x1558[83]]}})[_0x1558[44]](handleEntityNotFound(_0x4eadx1d,null))[_0x1558[44]](function(_0x4eadx1d){if(_0x4eadx1d){_0x4eadx37= _0x4eadx1d;_0x4eadx2e[_0x1558[52]]= _[_0x1558[55]](db[_0x1558[99]][_0x1558[53]]);_0x4eadx2e[_0x1558[57]]= _[_0x1558[55]](_0x4eadx2d[_0x1558[57]]);_0x4eadx2e[_0x1558[59]]= _[_0x1558[60]](_0x4eadx2e[_0x1558[52]],_0x4eadx2e[_0x1558[57]]);_0x4eadx20[_0x1558[61]]= _[_0x1558[60]](_0x4eadx2e[_0x1558[52]],qs[_0x1558[62]](_0x4eadx2d[_0x1558[57]][_0x1558[62]]));_0x4eadx20[_0x1558[61]]= (_0x4eadx20[_0x1558[61]][_0x1558[63]])?_0x4eadx20[_0x1558[61]]:_0x4eadx2e[_0x1558[52]];_0x4eadx20[_0x1558[66]]= qs[_0x1558[67]](_0x4eadx2d[_0x1558[57]][_0x1558[67]]);_0x4eadx20[_0x1558[68]]= qs[_0x1558[59]](_[_0x1558[69]](_0x4eadx2d[_0x1558[57]],_0x4eadx2e[_0x1558[59]]));if(_0x4eadx2d[_0x1558[57]][_0x1558[73]]){_0x4eadx20[_0x1558[68]]= _[_0x1558[72]](_0x4eadx20[_0x1558[68]],{$or:_[_0x1558[75]](_0x4eadx20[_0x1558[61]],function(_0x4eadx31){var _0x4eadx2f={};_0x4eadx2f[_0x4eadx31]= {$like:_0x1558[74]+ _0x4eadx2d[_0x1558[57]][_0x1558[73]]+ _0x1558[74]};return _0x4eadx2f})})};_0x4eadx20= _[_0x1558[72]]({},_0x4eadx20,_0x4eadx2d[_0x1558[76]]);return _0x4eadx37[_0x1558[120]](_0x4eadx20)}})[_0x1558[44]](function(_0x4eadx38){if(_0x4eadx38){_0x4eadx21= _0x4eadx38[_0x1558[63]];if(!_0x4eadx2d[_0x1558[57]][_0x1558[65]](_0x1558[64])){_0x4eadx20[_0x1558[36]]= qs[_0x1558[36]](_0x4eadx2d[_0x1558[57]][_0x1558[36]]);_0x4eadx20[_0x1558[35]]= qs[_0x1558[35]](_0x4eadx2d[_0x1558[57]][_0x1558[35]])};return _0x4eadx37[_0x1558[120]](_0x4eadx20)}})[_0x1558[44]](function(_0x4eadx33){if(_0x4eadx33){return _0x4eadx33?{count:_0x4eadx21,rows:_0x4eadx33}:null}})[_0x1558[44]](respondWithResult(_0x4eadx1d,null))[_0x1558[77]](handleError(_0x4eadx1d,null))}
\ No newline at end of file
+var _0x31b3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x66\x6F\x72\x6D\x61\x74","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x55\x73\x65\x72\x49\x64","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x55\x73\x65\x72","\x67\x65\x74","\x55\x73\x65\x72\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x54\x65\x61\x6D\x73","\x54\x65\x61\x6D","\x61\x64\x64\x54\x65\x61\x6D\x73","\x69\x64\x73","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x41\x67\x65\x6E\x74\x73","\x75\x6E\x69\x6F\x6E","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x75\x73\x65\x72\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x6F\x6D\x69\x74","\x69\x73\x41\x72\x72\x61\x79","\x75\x73\x65\x72\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x67\x65\x74\x41\x67\x65\x6E\x74\x73"];_0x31b3[0];var jsonpatch=require(_0x31b3[1]);var rp=require(_0x31b3[2]);var moment=require(_0x31b3[3]);var BPromise=require(_0x31b3[4]);var Mustache=require(_0x31b3[5]);var util=require(_0x31b3[6]);var path=require(_0x31b3[7]);var sox=require(_0x31b3[8]);var csv=require(_0x31b3[9]);var ejs=require(_0x31b3[10]);var fs=require(_0x31b3[11]);var _=require(_0x31b3[12]);var squel=require(_0x31b3[13]);var crypto=require(_0x31b3[14]);var jsforce=require(_0x31b3[15]);var deskjs=require(_0x31b3[16]);var toCsv=require(_0x31b3[9]);var querystring=require(_0x31b3[17]);var Papa=require(_0x31b3[18]);var qs=require(_0x31b3[19]);var logger=require(_0x31b3[21])(_0x31b3[20]);var utils=require(_0x31b3[22]);var config=require(_0x31b3[23]);var db=require(_0x31b3[25])[_0x31b3[24]];var socket=require(_0x31b3[27])({host:_0x31b3[26],port:6379});require(_0x31b3[29])[_0x31b3[28]](socket);function respondWithStatusCode(_0x38fdx1b,_0x38fdx1c){_0x38fdx1c= _0x38fdx1c|| 204;return function(_0x38fdx1d){if(_0x38fdx1d){return _0x38fdx1b[_0x31b3[30]](_0x38fdx1c)};return _0x38fdx1b[_0x31b3[32]](_0x38fdx1c)[_0x31b3[31]]()}}function respondWithResult(_0x38fdx1b,_0x38fdx1c){_0x38fdx1c= _0x38fdx1c|| 200;return function(_0x38fdx1d){if(_0x38fdx1d){return _0x38fdx1b[_0x31b3[32]](_0x38fdx1c)[_0x31b3[33]](_0x38fdx1d)}}}function respondWithFilteredResult(_0x38fdx1b,_0x38fdx20){return function(_0x38fdx1d){if(_0x38fdx1d){var _0x38fdx21=_0x38fdx1d[_0x31b3[34]],_0x38fdx22=_0x38fdx20[_0x31b3[35]],_0x38fdx23=_0x38fdx20[_0x31b3[35]]+ _0x38fdx20[_0x31b3[36]],_0x38fdx1c;if(_0x38fdx23>= _0x38fdx21){_0x38fdx23= _0x38fdx21;_0x38fdx1c= 200}else {_0x38fdx1c= 206};_0x38fdx1b[_0x31b3[32]](_0x38fdx1c);return _0x38fdx1b[_0x31b3[40]](_0x31b3[37],_0x38fdx22+ _0x31b3[38]+ _0x38fdx23+ _0x31b3[39]+ _0x38fdx21)[_0x31b3[33]](_0x38fdx1d)};return null}}function patchUpdates(_0x38fdx25){return function(_0x38fdx1d){try{jsonpatch[_0x31b3[41]](_0x38fdx1d,_0x38fdx25,true)}catch(err){return BPromise[_0x31b3[42]](err)};return _0x38fdx1d[_0x31b3[43]]()}}function saveUpdates(_0x38fdx27,_0x38fdx1c){return function(_0x38fdx1d){if(_0x38fdx1d){return _0x38fdx1d[_0x31b3[45]](_0x38fdx27)[_0x31b3[44]](function(_0x38fdx28){return _0x38fdx28})};return null}}function removeEntity(_0x38fdx1b,_0x38fdx1c){return function(_0x38fdx1d){if(_0x38fdx1d){return _0x38fdx1d[_0x31b3[46]]()[_0x31b3[44]](function(){_0x38fdx1b[_0x31b3[32]](204)[_0x31b3[31]]()})}}}function handleEntityNotFound(_0x38fdx1b,_0x38fdx1c){return function(_0x38fdx1d){if(!_0x38fdx1d){_0x38fdx1b[_0x31b3[30]](404)};return _0x38fdx1d}}function handleError(_0x38fdx1b,_0x38fdx1c){_0x38fdx1c= _0x38fdx1c|| 500;return function(_0x38fdx2c){logger[_0x31b3[48]](_0x38fdx2c[_0x31b3[47]]);if(_0x38fdx2c[_0x31b3[49]]){delete _0x38fdx2c[_0x31b3[49]]};_0x38fdx1b[_0x31b3[32]](_0x38fdx1c)[_0x31b3[50]](_0x38fdx2c)}}exports[_0x31b3[51]]= function(_0x38fdx2d,_0x38fdx1b){var _0x38fdx20={},_0x38fdx2e={},_0x38fdx2f={count:0,rows:[]};_0x38fdx2e[_0x31b3[52]]= _[_0x31b3[55]](db[_0x31b3[54]][_0x31b3[53]]);var _0x38fdx30={dateStart:_0x38fdx2d[_0x31b3[57]][_0x31b3[56]],dateEnd:_0x38fdx2d[_0x31b3[57]][_0x31b3[58]]};delete _0x38fdx2d[_0x31b3[57]][_0x31b3[56]];delete _0x38fdx2d[_0x31b3[57]][_0x31b3[58]];_0x38fdx2e[_0x31b3[57]]= _[_0x31b3[55]](_0x38fdx2d[_0x31b3[57]]);_0x38fdx2e[_0x31b3[59]]= _[_0x31b3[60]](_0x38fdx2e[_0x31b3[52]],_0x38fdx2e[_0x31b3[57]]);_0x38fdx20[_0x31b3[61]]= _[_0x31b3[60]](_0x38fdx2e[_0x31b3[52]],qs[_0x31b3[62]](_0x38fdx2d[_0x31b3[57]][_0x31b3[62]]));_0x38fdx20[_0x31b3[61]]= (_0x38fdx20[_0x31b3[61]][_0x31b3[63]])?_0x38fdx20[_0x31b3[61]]:_0x38fdx2e[_0x31b3[52]];if(!_0x38fdx2d[_0x31b3[57]][_0x31b3[65]](_0x31b3[64])){_0x38fdx20[_0x31b3[36]]= qs[_0x31b3[36]](_0x38fdx2d[_0x31b3[57]][_0x31b3[36]]);_0x38fdx20[_0x31b3[35]]= qs[_0x31b3[35]](_0x38fdx2d[_0x31b3[57]][_0x31b3[35]])};_0x38fdx20[_0x31b3[66]]= qs[_0x31b3[67]](_0x38fdx2d[_0x31b3[57]][_0x31b3[67]]);_0x38fdx20[_0x31b3[68]]= qs[_0x31b3[59]](_[_0x31b3[69]](_0x38fdx2d[_0x31b3[57]],_0x38fdx2e[_0x31b3[59]]));if(_0x38fdx30[_0x31b3[56]]){if(_0x38fdx30[_0x31b3[58]]){_0x38fdx30[_0x31b3[58]]= moment(_0x38fdx30[_0x31b3[58]])[_0x31b3[71]](1,_0x31b3[70])}else {_0x38fdx30[_0x31b3[58]]= moment(_0x38fdx30[_0x31b3[56]])[_0x31b3[71]](1,_0x31b3[70])};_[_0x31b3[72]](_0x38fdx20[_0x31b3[68]],{createdAt:{$gte:_0x38fdx30[_0x31b3[56]],$lte:_0x38fdx30[_0x31b3[58]]}})};if(_0x38fdx2d[_0x31b3[57]][_0x31b3[73]]){_0x38fdx20[_0x31b3[68]]= _[_0x31b3[72]](_0x38fdx20[_0x31b3[68]],{$or:_[_0x31b3[75]](_0x38fdx20[_0x31b3[61]],function(_0x38fdx31){var _0x38fdx2f={};_0x38fdx2f[_0x38fdx31]= {$like:_0x31b3[74]+ _0x38fdx2d[_0x31b3[57]][_0x31b3[73]]+ _0x31b3[74]};return _0x38fdx2f})})};_0x38fdx20= _[_0x31b3[72]]({},_0x38fdx20,_0x38fdx2d[_0x31b3[76]]);var _0x38fdx32={where:_0x38fdx20[_0x31b3[68]]};return db[_0x31b3[54]][_0x31b3[34]](_0x38fdx32)[_0x31b3[44]](function(_0x38fdx21){_0x38fdx2f[_0x31b3[34]]= _0x38fdx21;if(_0x38fdx2d[_0x31b3[57]][_0x31b3[79]]){_0x38fdx20[_0x31b3[80]]= [{all:true}]};return db[_0x31b3[54]][_0x31b3[81]](_0x38fdx20)})[_0x31b3[44]](function(_0x38fdx33){_0x38fdx2f[_0x31b3[78]]= _0x38fdx33;return _0x38fdx2f})[_0x31b3[44]](respondWithFilteredResult(_0x38fdx1b,_0x38fdx20))[_0x31b3[77]](handleError(_0x38fdx1b,null))};exports[_0x31b3[82]]= function(_0x38fdx2d,_0x38fdx1b){var _0x38fdx20={raw:true,where:{id:_0x38fdx2d[_0x31b3[84]][_0x31b3[83]]}},_0x38fdx2e={};_0x38fdx2e[_0x31b3[52]]= _[_0x31b3[55]](db[_0x31b3[54]][_0x31b3[53]]);_0x38fdx2e[_0x31b3[57]]= _[_0x31b3[55]](_0x38fdx2d[_0x31b3[57]]);_0x38fdx2e[_0x31b3[59]]= _[_0x31b3[60]](_0x38fdx2e[_0x31b3[52]],_0x38fdx2e[_0x31b3[57]]);_0x38fdx20[_0x31b3[61]]= _[_0x31b3[60]](_0x38fdx2e[_0x31b3[52]],qs[_0x31b3[62]](_0x38fdx2d[_0x31b3[57]][_0x31b3[62]]));_0x38fdx20[_0x31b3[61]]= (_0x38fdx20[_0x31b3[61]][_0x31b3[63]])?_0x38fdx20[_0x31b3[61]]:_0x38fdx2e[_0x31b3[52]];if(_0x38fdx2d[_0x31b3[57]][_0x31b3[79]]){_0x38fdx20[_0x31b3[80]]= [{all:true}]};_0x38fdx20= _[_0x31b3[72]]({},_0x38fdx20,_0x38fdx2d[_0x31b3[76]]);return db[_0x31b3[54]][_0x31b3[85]](_0x38fdx20)[_0x31b3[44]](handleEntityNotFound(_0x38fdx1b,null))[_0x31b3[44]](respondWithResult(_0x38fdx1b,null))[_0x31b3[77]](handleError(_0x38fdx1b,null))};exports[_0x31b3[86]]= function(_0x38fdx2d,_0x38fdx1b){return db[_0x31b3[54]][_0x31b3[86]](_0x38fdx2d[_0x31b3[87]],{})[_0x31b3[44]](respondWithResult(_0x38fdx1b,201))[_0x31b3[77]](handleError(_0x38fdx1b,null))};exports[_0x31b3[45]]= function(_0x38fdx2d,_0x38fdx1b){if(_0x38fdx2d[_0x31b3[87]][_0x31b3[83]]){delete _0x38fdx2d[_0x31b3[87]][_0x31b3[83]]};return db[_0x31b3[54]][_0x31b3[85]]({where:{id:_0x38fdx2d[_0x31b3[84]][_0x31b3[83]]}})[_0x31b3[44]](handleEntityNotFound(_0x38fdx1b,null))[_0x31b3[44]](saveUpdates(_0x38fdx2d[_0x31b3[87]],null))[_0x31b3[44]](respondWithResult(_0x38fdx1b,null))[_0x31b3[77]](handleError(_0x38fdx1b,null))};exports[_0x31b3[46]]= function(_0x38fdx2d,_0x38fdx1b){return db[_0x31b3[54]][_0x31b3[85]]({where:{id:_0x38fdx2d[_0x31b3[84]][_0x31b3[83]]}})[_0x31b3[44]](handleEntityNotFound(_0x38fdx1b,null))[_0x31b3[44]](removeEntity(_0x38fdx1b,null))[_0x31b3[77]](handleError(_0x38fdx1b,null))};exports[_0x31b3[88]]= function(_0x38fdx2d,_0x38fdx1b){return db[_0x31b3[54]][_0x31b3[88]]()[_0x31b3[44]](respondWithResult(_0x38fdx1b,null))[_0x31b3[77]](handleError(_0x38fdx1b,null))};exports[_0x31b3[89]]= function(_0x38fdx2d,_0x38fdx1b,_0x38fdx34){var _0x38fdx20={raw:true,where:{}},_0x38fdx2e={},_0x38fdx35;return db[_0x31b3[54]][_0x31b3[103]]({where:{id:_0x38fdx2d[_0x31b3[84]][_0x31b3[83]]}})[_0x31b3[44]](handleEntityNotFound(_0x38fdx1b,null))[_0x31b3[44]](function(_0x38fdx1d){if(_0x38fdx1d){_0x38fdx35= _0x38fdx1d[_0x31b3[100]]({plain:true});_0x38fdx2e[_0x31b3[52]]= _[_0x31b3[55]](db[_0x31b3[101]][_0x31b3[53]]);_0x38fdx2e[_0x31b3[57]]= _[_0x31b3[55]](_0x38fdx2d[_0x31b3[57]]);_0x38fdx2e[_0x31b3[59]]= _[_0x31b3[60]](_0x38fdx2e[_0x31b3[52]],_0x38fdx2e[_0x31b3[57]]);_0x38fdx20[_0x31b3[61]]= _[_0x31b3[60]](_0x38fdx2e[_0x31b3[52]],qs[_0x31b3[62]](_0x38fdx2d[_0x31b3[57]][_0x31b3[62]]));_0x38fdx20[_0x31b3[61]]= (_0x38fdx20[_0x31b3[61]][_0x31b3[63]])?_0x38fdx20[_0x31b3[61]]:_0x38fdx2e[_0x31b3[52]];if(!_0x38fdx2d[_0x31b3[57]][_0x31b3[65]](_0x31b3[64])){_0x38fdx20[_0x31b3[36]]= qs[_0x31b3[36]](_0x38fdx2d[_0x31b3[57]][_0x31b3[36]]);_0x38fdx20[_0x31b3[35]]= qs[_0x31b3[35]](_0x38fdx2d[_0x31b3[57]][_0x31b3[35]])};_0x38fdx20[_0x31b3[66]]= qs[_0x31b3[67]](_0x38fdx2d[_0x31b3[57]][_0x31b3[67]]);_0x38fdx20[_0x31b3[68]]= qs[_0x31b3[59]](_[_0x31b3[69]](_0x38fdx2d[_0x31b3[57]],_0x38fdx2e[_0x31b3[59]]));_0x38fdx20[_0x31b3[68]][_0x31b3[102]]= _0x38fdx1d[_0x31b3[83]];if(_0x38fdx2d[_0x31b3[57]][_0x31b3[73]]){_0x38fdx20[_0x31b3[68]]= _[_0x31b3[72]](_0x38fdx20[_0x31b3[68]],{$or:_[_0x31b3[75]](_0x38fdx20[_0x31b3[61]],function(_0x38fdx31){var _0x38fdx2f={};_0x38fdx2f[_0x38fdx31]= {$like:_0x31b3[74]+ _0x38fdx2d[_0x31b3[57]][_0x31b3[73]]+ _0x31b3[74]};return _0x38fdx2f})})};_0x38fdx20= _[_0x31b3[72]]({},_0x38fdx20,_0x38fdx2d[_0x31b3[76]]);return db[_0x31b3[101]][_0x31b3[81]](_0x38fdx20)}})[_0x31b3[44]](function(_0x38fdx1b){if(_0x38fdx1b){return db[_0x31b3[99]][_0x31b3[98]]({where:{id:_[_0x31b3[75]](_0x38fdx1b,_0x31b3[96]),role:_0x31b3[97]},attributes:[_0x31b3[83],_0x31b3[49],_0x31b3[93],_0x31b3[95],_0x31b3[94]]})}})[_0x31b3[44]](function(_0x38fdx1b){if(_0x38fdx1b){return {count:_0x38fdx1b[_0x31b3[34]],rows:_[_0x31b3[75]](_0x38fdx1b[_0x31b3[78]],function(_0x38fdx36){return {membername:_0x38fdx36[_0x31b3[49]],UserId:_0x38fdx36[_0x31b3[83]],queue_name:_0x38fdx35[_0x31b3[49]],MailQueueId:_0x38fdx35[_0x31b3[83]],interface:util[_0x31b3[92]](_0x31b3[90],_0x31b3[91],_0x38fdx36[_0x31b3[49]]),penalty:0,paused:_0x38fdx36[_0x31b3[93]],createdAt:_0x38fdx36[_0x31b3[94]],updatedAt:_0x38fdx36[_0x31b3[95]]}})}}else {return {count:0,rows:[]}}})[_0x31b3[44]](respondWithFilteredResult(_0x38fdx1b,_0x38fdx20))[_0x31b3[77]](handleError(_0x38fdx1b,null))};exports[_0x31b3[104]]= function(_0x38fdx2d,_0x38fdx1d,_0x38fdx34){var _0x38fdx20={};var _0x38fdx2e={};var _0x38fdx37;var _0x38fdx21;return db[_0x31b3[54]][_0x31b3[103]]({where:{id:_0x38fdx2d[_0x31b3[84]][_0x31b3[83]]}})[_0x31b3[44]](handleEntityNotFound(_0x38fdx1d,null))[_0x31b3[44]](function(_0x38fdx1d){if(_0x38fdx1d){_0x38fdx37= _0x38fdx1d;_0x38fdx2e[_0x31b3[52]]= _[_0x31b3[55]](db[_0x31b3[105]][_0x31b3[53]]);_0x38fdx2e[_0x31b3[57]]= _[_0x31b3[55]](_0x38fdx2d[_0x31b3[57]]);_0x38fdx2e[_0x31b3[59]]= _[_0x31b3[60]](_0x38fdx2e[_0x31b3[52]],_0x38fdx2e[_0x31b3[57]]);_0x38fdx20[_0x31b3[61]]= _[_0x31b3[60]](_0x38fdx2e[_0x31b3[52]],qs[_0x31b3[62]](_0x38fdx2d[_0x31b3[57]][_0x31b3[62]]));_0x38fdx20[_0x31b3[61]]= (_0x38fdx20[_0x31b3[61]][_0x31b3[63]])?_0x38fdx20[_0x31b3[61]]:_0x38fdx2e[_0x31b3[52]];_0x38fdx20[_0x31b3[66]]= qs[_0x31b3[67]](_0x38fdx2d[_0x31b3[57]][_0x31b3[67]]);_0x38fdx20[_0x31b3[68]]= qs[_0x31b3[59]](_[_0x31b3[69]](_0x38fdx2d[_0x31b3[57]],_0x38fdx2e[_0x31b3[59]]));if(_0x38fdx2d[_0x31b3[57]][_0x31b3[73]]){_0x38fdx20[_0x31b3[68]]= _[_0x31b3[72]](_0x38fdx20[_0x31b3[68]],{$or:_[_0x31b3[75]](_0x38fdx20[_0x31b3[61]],function(_0x38fdx31){var _0x38fdx2f={};_0x38fdx2f[_0x38fdx31]= {$like:_0x31b3[74]+ _0x38fdx2d[_0x31b3[57]][_0x31b3[73]]+ _0x31b3[74]};return _0x38fdx2f})})};_0x38fdx20= _[_0x31b3[72]]({},_0x38fdx20,_0x38fdx2d[_0x31b3[76]]);return _0x38fdx37[_0x31b3[104]](_0x38fdx20)}})[_0x31b3[44]](function(_0x38fdx38){if(_0x38fdx38){_0x38fdx21= _0x38fdx38[_0x31b3[63]];if(!_0x38fdx2d[_0x31b3[57]][_0x31b3[65]](_0x31b3[64])){_0x38fdx20[_0x31b3[36]]= qs[_0x31b3[36]](_0x38fdx2d[_0x31b3[57]][_0x31b3[36]]);_0x38fdx20[_0x31b3[35]]= qs[_0x31b3[35]](_0x38fdx2d[_0x31b3[57]][_0x31b3[35]])};return _0x38fdx37[_0x31b3[104]](_0x38fdx20)}})[_0x31b3[44]](function(_0x38fdx33){if(_0x38fdx33){return _0x38fdx33?{count:_0x38fdx21,rows:_0x38fdx33}:null}})[_0x31b3[44]](respondWithResult(_0x38fdx1d,null))[_0x31b3[77]](handleError(_0x38fdx1d,null))};exports[_0x31b3[106]]= function(_0x38fdx2d,_0x38fdx1b,_0x38fdx34){var _0x38fdx39=[];var _0x38fdx35;return db[_0x31b3[105]][_0x31b3[81]]({where:{id:_0x38fdx2d[_0x31b3[87]][_0x31b3[107]]},attributes:[_0x31b3[83]],include:[{model:db[_0x31b3[99]],as:_0x31b3[110],attributes:[_0x31b3[83]],raw:true}]})[_0x31b3[44]](function(_0x38fdx3c){if(_0x38fdx3c){for(var _0x38fdx3d=0;_0x38fdx3d< _0x38fdx3c[_0x31b3[63]];_0x38fdx3d+= 1){for(var _0x38fdx3e=0;_0x38fdx3e< _0x38fdx3c[_0x38fdx3d][_0x31b3[110]][_0x31b3[63]];_0x38fdx3e+= 1){_0x38fdx39= _[_0x31b3[111]](_0x38fdx39,[_0x38fdx3c[_0x38fdx3d][_0x31b3[110]][_0x38fdx3e][_0x31b3[83]]])}};return _0x38fdx39}})[_0x31b3[44]](function(_0x38fdx3b){if(_0x38fdx3b){return db[_0x31b3[54]][_0x31b3[85]]({where:{id:_0x38fdx2d[_0x31b3[84]][_0x31b3[83]]}})}})[_0x31b3[44]](function(_0x38fdx3a){if(_0x38fdx3a){_0x38fdx35= _0x38fdx3a;return _0x38fdx35[_0x31b3[109]](_0x38fdx39,{penalty:_0x38fdx2d[_0x31b3[87]][_0x31b3[108]]})}})[_0x31b3[44]](function(_0x38fdx1d){if(_0x38fdx1d){return _0x38fdx35[_0x31b3[106]](_0x38fdx2d[_0x31b3[87]][_0x31b3[107]])}})[_0x31b3[44]](handleEntityNotFound(_0x38fdx1b,null))[_0x31b3[44]](respondWithStatusCode(_0x38fdx1b,null))[_0x31b3[77]](handleError(_0x38fdx1b,null))};exports[_0x31b3[112]]= function(_0x38fdx2d,_0x38fdx1b,_0x38fdx34){var _0x38fdx39=[];var _0x38fdx35;return db[_0x31b3[105]][_0x31b3[81]]({where:{id:_0x38fdx2d[_0x31b3[57]][_0x31b3[107]]},attributes:[_0x31b3[83]],include:[{model:db[_0x31b3[99]],as:_0x31b3[110],attributes:[_0x31b3[83]],raw:true}]})[_0x31b3[44]](function(_0x38fdx3c){if(_0x38fdx3c){for(var _0x38fdx3d=0;_0x38fdx3d< _0x38fdx3c[_0x31b3[63]];_0x38fdx3d+= 1){for(var _0x38fdx3e=0;_0x38fdx3e< _0x38fdx3c[_0x38fdx3d][_0x31b3[110]][_0x31b3[63]];_0x38fdx3e+= 1){_0x38fdx39= _[_0x31b3[111]](_0x38fdx39,[_0x38fdx3c[_0x38fdx3d][_0x31b3[110]][_0x38fdx3e][_0x31b3[83]]])}};return _0x38fdx39}})[_0x31b3[44]](function(_0x38fdx3b){if(_0x38fdx3b){return db[_0x31b3[54]][_0x31b3[85]]({where:{id:_0x38fdx2d[_0x31b3[84]][_0x31b3[83]]}})}})[_0x31b3[44]](function(_0x38fdx3a){if(_0x38fdx3a){_0x38fdx35= _0x38fdx3a;return _0x38fdx35[_0x31b3[113]](_0x38fdx39)}})[_0x31b3[44]](function(_0x38fdx1d){if(_0x38fdx35){return _0x38fdx35[_0x31b3[112]](_0x38fdx2d[_0x31b3[57]][_0x31b3[107]])}})[_0x31b3[44]](handleEntityNotFound(_0x38fdx1b,null))[_0x31b3[44]](respondWithStatusCode(_0x38fdx1b,null))[_0x31b3[77]](handleError(_0x38fdx1b,null))};exports[_0x31b3[109]]= function(_0x38fdx2d,_0x38fdx1b,_0x38fdx34){return db[_0x31b3[54]][_0x31b3[85]]({where:{id:_0x38fdx2d[_0x31b3[84]][_0x31b3[83]]}})[_0x31b3[44]](handleEntityNotFound(_0x38fdx1b,null))[_0x31b3[44]](function(_0x38fdx1d){if(_0x38fdx1d){return _0x38fdx1d[_0x31b3[109]](_0x38fdx2d[_0x31b3[87]][_0x31b3[107]],_[_0x31b3[117]](_0x38fdx2d[_0x31b3[87]],[_0x31b3[107],_0x31b3[83]])|| {})[_0x31b3[116]](function(_0x38fdx38){for(var _0x38fdx3d=0;_0x38fdx3d< _0x38fdx2d[_0x31b3[87]][_0x31b3[107]][_0x31b3[63]];_0x38fdx3d+= 1){socket[_0x31b3[115]](_0x31b3[114],{UserId:_0x38fdx2d[_0x31b3[87]][_0x31b3[107]][_0x38fdx3d],MailQueueId:_0x38fdx2d[_0x31b3[84]][_0x31b3[83]]})};return _0x38fdx38})}})[_0x31b3[44]](respondWithResult(_0x38fdx1b,null))[_0x31b3[77]](handleError(_0x38fdx1b,null))};exports[_0x31b3[113]]= function(_0x38fdx2d,_0x38fdx1b,_0x38fdx34){var _0x38fdx38;return db[_0x31b3[54]][_0x31b3[85]]({where:{id:_0x38fdx2d[_0x31b3[84]][_0x31b3[83]]}})[_0x31b3[44]](handleEntityNotFound(_0x38fdx1b,null))[_0x31b3[44]](function(_0x38fdx1d){if(_0x38fdx1d){return _0x38fdx1d[_0x31b3[113]](_0x38fdx2d[_0x31b3[57]][_0x31b3[107]])[_0x31b3[44]](function(_0x38fdx38){if(_[_0x31b3[118]](_0x38fdx2d[_0x31b3[57]][_0x31b3[107]])){for(var _0x38fdx3d=0;_0x38fdx3d< _0x38fdx2d[_0x31b3[57]][_0x31b3[107]][_0x31b3[63]];_0x38fdx3d+= 1){socket[_0x31b3[115]](_0x31b3[119],{UserId:_0x38fdx2d[_0x31b3[57]][_0x31b3[107]][_0x38fdx3d],MailQueueId:_0x38fdx2d[_0x31b3[84]][_0x31b3[83]]})}}else {socket[_0x31b3[115]](_0x31b3[119],{UserId:_0x38fdx2d[_0x31b3[57]][_0x31b3[107]],MailQueueId:_0x38fdx2d[_0x31b3[84]][_0x31b3[83]]})}})}})[_0x31b3[44]](respondWithStatusCode(_0x38fdx1b,null))[_0x31b3[77]](handleError(_0x38fdx1b,null))};exports[_0x31b3[120]]= function(_0x38fdx2d,_0x38fdx1d,_0x38fdx34){var _0x38fdx20={};var _0x38fdx2e={};var _0x38fdx37;var _0x38fdx21;return db[_0x31b3[54]][_0x31b3[103]]({where:{id:_0x38fdx2d[_0x31b3[84]][_0x31b3[83]]}})[_0x31b3[44]](handleEntityNotFound(_0x38fdx1d,null))[_0x31b3[44]](function(_0x38fdx1d){if(_0x38fdx1d){_0x38fdx37= _0x38fdx1d;_0x38fdx2e[_0x31b3[52]]= _[_0x31b3[55]](db[_0x31b3[99]][_0x31b3[53]]);_0x38fdx2e[_0x31b3[57]]= _[_0x31b3[55]](_0x38fdx2d[_0x31b3[57]]);_0x38fdx2e[_0x31b3[59]]= _[_0x31b3[60]](_0x38fdx2e[_0x31b3[52]],_0x38fdx2e[_0x31b3[57]]);_0x38fdx20[_0x31b3[61]]= _[_0x31b3[60]](_0x38fdx2e[_0x31b3[52]],qs[_0x31b3[62]](_0x38fdx2d[_0x31b3[57]][_0x31b3[62]]));_0x38fdx20[_0x31b3[61]]= (_0x38fdx20[_0x31b3[61]][_0x31b3[63]])?_0x38fdx20[_0x31b3[61]]:_0x38fdx2e[_0x31b3[52]];_0x38fdx20[_0x31b3[66]]= qs[_0x31b3[67]](_0x38fdx2d[_0x31b3[57]][_0x31b3[67]]);_0x38fdx20[_0x31b3[68]]= qs[_0x31b3[59]](_[_0x31b3[69]](_0x38fdx2d[_0x31b3[57]],_0x38fdx2e[_0x31b3[59]]));if(_0x38fdx2d[_0x31b3[57]][_0x31b3[73]]){_0x38fdx20[_0x31b3[68]]= _[_0x31b3[72]](_0x38fdx20[_0x31b3[68]],{$or:_[_0x31b3[75]](_0x38fdx20[_0x31b3[61]],function(_0x38fdx31){var _0x38fdx2f={};_0x38fdx2f[_0x38fdx31]= {$like:_0x31b3[74]+ _0x38fdx2d[_0x31b3[57]][_0x31b3[73]]+ _0x31b3[74]};return _0x38fdx2f})})};_0x38fdx20= _[_0x31b3[72]]({},_0x38fdx20,_0x38fdx2d[_0x31b3[76]]);return _0x38fdx37[_0x31b3[120]](_0x38fdx20)}})[_0x31b3[44]](function(_0x38fdx38){if(_0x38fdx38){_0x38fdx21= _0x38fdx38[_0x31b3[63]];if(!_0x38fdx2d[_0x31b3[57]][_0x31b3[65]](_0x31b3[64])){_0x38fdx20[_0x31b3[36]]= qs[_0x31b3[36]](_0x38fdx2d[_0x31b3[57]][_0x31b3[36]]);_0x38fdx20[_0x31b3[35]]= qs[_0x31b3[35]](_0x38fdx2d[_0x31b3[57]][_0x31b3[35]])};return _0x38fdx37[_0x31b3[120]](_0x38fdx20)}})[_0x31b3[44]](function(_0x38fdx33){if(_0x38fdx33){return _0x38fdx33?{count:_0x38fdx21,rows:_0x38fdx33}:null}})[_0x31b3[44]](respondWithResult(_0x38fdx1d,null))[_0x31b3[77]](handleError(_0x38fdx1d,null))}
\ No newline at end of file
index 874ba2d..e3beeac 100644 (file)
@@ -1 +1 @@
-var _0x5ceb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x5ceb[0];var EventEmitter=require(_0x5ceb[1]);var MailQueue=require(_0x5ceb[4])[_0x5ceb[3]][_0x5ceb[2]];var MailQueueEvents= new EventEmitter();MailQueueEvents[_0x5ceb[5]](0);var events={afterCreate:_0x5ceb[6],afterUpdate:_0x5ceb[7],afterDestroy:_0x5ceb[8]};function emitEvent(event){return function(_0xf75ax7,_0xf75ax8,_0xf75ax9){MailQueueEvents[_0x5ceb[11]](event+ _0x5ceb[9]+ _0xf75ax7[_0x5ceb[10]],_0xf75ax7);MailQueueEvents[_0x5ceb[11]](event,_0xf75ax7);_0xf75ax9(null)}}for(var e in events){if(events[_0x5ceb[12]](e)){var event=events[e];MailQueue[_0x5ceb[13]](e,emitEvent(event))}};module[_0x5ceb[14]]= MailQueueEvents
\ No newline at end of file
+var _0x7ec6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x7ec6[0];var EventEmitter=require(_0x7ec6[1]);var MailQueue=require(_0x7ec6[4])[_0x7ec6[3]][_0x7ec6[2]];var MailQueueEvents= new EventEmitter();MailQueueEvents[_0x7ec6[5]](0);var events={afterCreate:_0x7ec6[6],afterUpdate:_0x7ec6[7],afterDestroy:_0x7ec6[8]};function emitEvent(event){return function(_0x1c1ex7,_0x1c1ex8,_0x1c1ex9){MailQueueEvents[_0x7ec6[11]](event+ _0x7ec6[9]+ _0x1c1ex7[_0x7ec6[10]],_0x1c1ex7);MailQueueEvents[_0x7ec6[11]](event,_0x1c1ex7);_0x1c1ex9(null)}}for(var e in events){if(events[_0x7ec6[12]](e)){var event=events[e];MailQueue[_0x7ec6[13]](e,emitEvent(event))}};module[_0x7ec6[14]]= MailQueueEvents
\ No newline at end of file
index 5effb70..acbaad0 100644 (file)
@@ -1 +1 @@
-var _0xa8e8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0xa8e8[0];var _=require(_0xa8e8[1]);var util=require(_0xa8e8[2]);var logger=require(_0xa8e8[4])(_0xa8e8[3]);var moment=require(_0xa8e8[5]);var BPromise=require(_0xa8e8[6]);var rp=require(_0xa8e8[7]);var attributes=require(_0xa8e8[8]);module[_0xa8e8[9]]= function(_0x5405x8,_0x5405x9){return _0x5405x8[_0xa8e8[12]](_0xa8e8[10],attributes,{tableName:_0xa8e8[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x911f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x911f[0];var _=require(_0x911f[1]);var util=require(_0x911f[2]);var logger=require(_0x911f[4])(_0x911f[3]);var moment=require(_0x911f[5]);var BPromise=require(_0x911f[6]);var rp=require(_0x911f[7]);var attributes=require(_0x911f[8]);module[_0x911f[9]]= function(_0x3d16x8,_0x3d16x9){return _0x3d16x8[_0x911f[12]](_0x911f[10],attributes,{tableName:_0x911f[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index c9ac837..b6f5798 100644 (file)
@@ -1 +1 @@
-var _0x8c78=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x53\x68\x6F\x77\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x66\x69\x6E\x64"];_0x8c78[0];var _=require(_0x8c78[1]);var util=require(_0x8c78[2]);var moment=require(_0x8c78[3]);var BPromise=require(_0x8c78[4]);var rs=require(_0x8c78[5]);var fs=require(_0x8c78[6]);var db=require(_0x8c78[8])[_0x8c78[7]];var utils=require(_0x8c78[9]);var logger=require(_0x8c78[11])(_0x8c78[10]);var config=require(_0x8c78[12]);var jayson=require(_0x8c78[13]);var client=jayson[_0x8c78[15]][_0x8c78[14]]({port:9002});var socket=require(_0x8c78[17])({host:_0x8c78[16],port:6379});require(_0x8c78[19])[_0x8c78[18]](socket);function respondWithRpcPromise(_0x5a12xf,_0x5a12x10,_0x5a12x11){return  new BPromise(function(_0x5a12x12,_0x5a12x13){return client[_0x8c78[32]](_0x5a12xf,_0x5a12x11)[_0x8c78[31]](function(_0x5a12x15){logger[_0x8c78[24]](_0x8c78[20],_0x5a12x10,_0x8c78[23]);logger[_0x8c78[27]](_0x8c78[25],_0x5a12x10,_0x8c78[23],JSON[_0x8c78[26]](_0x5a12x15));if(_0x5a12x15[_0x8c78[21]]){if(_0x5a12x15[_0x8c78[21]][_0x8c78[28]]=== 500){logger[_0x8c78[21]](_0x8c78[20],_0x5a12x10,_0x5a12x15[_0x8c78[21]][_0x8c78[29]]);return _0x5a12x13(_0x5a12x15[_0x8c78[21]][_0x8c78[29]])};logger[_0x8c78[21]](_0x8c78[20],_0x5a12x10,_0x5a12x15[_0x8c78[21]][_0x8c78[29]]);return _0x5a12x12(_0x5a12x15[_0x8c78[21]][_0x8c78[29]])}else {logger[_0x8c78[24]](_0x8c78[20],_0x5a12x10,_0x8c78[23]);_0x5a12x12(_0x5a12x15[_0x8c78[30]][_0x8c78[29]])}})[_0x8c78[22]](function(_0x5a12x14){logger[_0x8c78[21]](_0x8c78[20],_0x5a12x10,_0x5a12x14);_0x5a12x13(_0x5a12x14)})})}exports[_0x8c78[33]]= function(_0x5a12x11){var _0x5a12x16=this;return  new Promise(function(_0x5a12x12,_0x5a12x13){return db[_0x8c78[44]][_0x8c78[43]]({raw:_0x5a12x11[_0x8c78[34]]?(_0x5a12x11[_0x8c78[34]][_0x8c78[35]]=== undefined)?true:false:true,where:_0x5a12x11[_0x8c78[34]]?_0x5a12x11[_0x8c78[34]][_0x8c78[36]]|| null:null,attributes:_0x5a12x11[_0x8c78[34]]?_0x5a12x11[_0x8c78[34]][_0x8c78[37]]|| null:null,limit:_0x5a12x11[_0x8c78[34]]?_0x5a12x11[_0x8c78[34]][_0x8c78[38]]|| null:null,include:_0x5a12x11[_0x8c78[34]]?(_0x5a12x11[_0x8c78[34]][_0x8c78[39]]?_[_0x8c78[42]](_0x5a12x11[_0x8c78[34]][_0x8c78[39]],function(_0x5a12x17){return {model:db[_0x5a12x17[_0x8c78[40]]],as:_0x5a12x17[_0x8c78[41]],attributes:_0x5a12x17[_0x8c78[37]],include:_0x5a12x17[_0x8c78[39]]?_[_0x8c78[42]](_0x5a12x17[_0x8c78[39]],function(_0x5a12x18){return {model:db[_0x5a12x18[_0x8c78[40]]],as:_0x5a12x18[_0x8c78[41]],attributes:_0x5a12x18[_0x8c78[37]],include:_0x5a12x18[_0x8c78[39]]?_[_0x8c78[42]](_0x5a12x18[_0x8c78[39]],function(_0x5a12x19){return {model:db[_0x5a12x19[_0x8c78[40]]],as:_0x5a12x19[_0x8c78[41]],attributes:_0x5a12x19[_0x8c78[37]]}}):[]}}):[]}}):[]):[]})[_0x8c78[31]](function(_0x5a12x15){logger[_0x8c78[24]](_0x8c78[33],_0x5a12x11);logger[_0x8c78[27]](_0x8c78[33],_0x5a12x11,JSON[_0x8c78[26]](_0x5a12x15));_0x5a12x12(_0x5a12x15)})[_0x8c78[22]](function(_0x5a12x14){logger[_0x8c78[21]](_0x8c78[33],_0x5a12x14[_0x8c78[29]],_0x5a12x11);_0x5a12x13(_0x5a12x16[_0x8c78[21]](500,_0x5a12x14[_0x8c78[29]]))})})};exports[_0x8c78[45]]= function(_0x5a12x11){var _0x5a12x16=this;return  new Promise(function(_0x5a12x12,_0x5a12x13){return db[_0x8c78[44]][_0x8c78[46]]({raw:_0x5a12x11[_0x8c78[34]]?(_0x5a12x11[_0x8c78[34]][_0x8c78[35]]=== undefined)?true:false:true,where:_0x5a12x11[_0x8c78[34]]?_0x5a12x11[_0x8c78[34]][_0x8c78[36]]|| null:null,attributes:_0x5a12x11[_0x8c78[34]]?_0x5a12x11[_0x8c78[34]][_0x8c78[37]]|| null:null,include:_0x5a12x11[_0x8c78[34]]?(_0x5a12x11[_0x8c78[34]][_0x8c78[39]]?_[_0x8c78[42]](_0x5a12x11[_0x8c78[34]][_0x8c78[39]],function(_0x5a12x17){return {model:db[_0x5a12x17[_0x8c78[40]]],as:_0x5a12x17[_0x8c78[41]],attributes:_0x5a12x17[_0x8c78[37]],include:_0x5a12x17[_0x8c78[39]]?_[_0x8c78[42]](_0x5a12x17[_0x8c78[39]],function(_0x5a12x18){return {model:db[_0x5a12x18[_0x8c78[40]]],as:_0x5a12x18[_0x8c78[41]],attributes:_0x5a12x18[_0x8c78[37]],include:_0x5a12x18[_0x8c78[39]]?_[_0x8c78[42]](_0x5a12x18[_0x8c78[39]],function(_0x5a12x19){return {model:db[_0x5a12x19[_0x8c78[40]]],as:_0x5a12x19[_0x8c78[41]],attributes:_0x5a12x19[_0x8c78[37]]}}):[]}}):[]}}):[]):[]})[_0x8c78[31]](function(_0x5a12x15){logger[_0x8c78[24]](_0x8c78[45],_0x5a12x11);logger[_0x8c78[27]](_0x8c78[45],_0x5a12x11,JSON[_0x8c78[26]](_0x5a12x15));_0x5a12x12(_0x5a12x15)})[_0x8c78[22]](function(_0x5a12x14){logger[_0x8c78[21]](_0x8c78[45],_0x5a12x14[_0x8c78[29]],_0x5a12x11);_0x5a12x13(_0x5a12x16[_0x8c78[21]](500,_0x5a12x14[_0x8c78[29]]))})})}
\ No newline at end of file
+var _0x8b76=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x53\x68\x6F\x77\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x66\x69\x6E\x64"];_0x8b76[0];var _=require(_0x8b76[1]);var util=require(_0x8b76[2]);var moment=require(_0x8b76[3]);var BPromise=require(_0x8b76[4]);var rs=require(_0x8b76[5]);var fs=require(_0x8b76[6]);var db=require(_0x8b76[8])[_0x8b76[7]];var utils=require(_0x8b76[9]);var logger=require(_0x8b76[11])(_0x8b76[10]);var config=require(_0x8b76[12]);var jayson=require(_0x8b76[13]);var client=jayson[_0x8b76[15]][_0x8b76[14]]({port:9002});var socket=require(_0x8b76[17])({host:_0x8b76[16],port:6379});require(_0x8b76[19])[_0x8b76[18]](socket);function respondWithRpcPromise(_0x2625xf,_0x2625x10,_0x2625x11){return  new BPromise(function(_0x2625x12,_0x2625x13){return client[_0x8b76[32]](_0x2625xf,_0x2625x11)[_0x8b76[31]](function(_0x2625x15){logger[_0x8b76[24]](_0x8b76[20],_0x2625x10,_0x8b76[23]);logger[_0x8b76[27]](_0x8b76[25],_0x2625x10,_0x8b76[23],JSON[_0x8b76[26]](_0x2625x15));if(_0x2625x15[_0x8b76[21]]){if(_0x2625x15[_0x8b76[21]][_0x8b76[28]]=== 500){logger[_0x8b76[21]](_0x8b76[20],_0x2625x10,_0x2625x15[_0x8b76[21]][_0x8b76[29]]);return _0x2625x13(_0x2625x15[_0x8b76[21]][_0x8b76[29]])};logger[_0x8b76[21]](_0x8b76[20],_0x2625x10,_0x2625x15[_0x8b76[21]][_0x8b76[29]]);return _0x2625x12(_0x2625x15[_0x8b76[21]][_0x8b76[29]])}else {logger[_0x8b76[24]](_0x8b76[20],_0x2625x10,_0x8b76[23]);_0x2625x12(_0x2625x15[_0x8b76[30]][_0x8b76[29]])}})[_0x8b76[22]](function(_0x2625x14){logger[_0x8b76[21]](_0x8b76[20],_0x2625x10,_0x2625x14);_0x2625x13(_0x2625x14)})})}exports[_0x8b76[33]]= function(_0x2625x11){var _0x2625x16=this;return  new Promise(function(_0x2625x12,_0x2625x13){return db[_0x8b76[44]][_0x8b76[43]]({raw:_0x2625x11[_0x8b76[34]]?(_0x2625x11[_0x8b76[34]][_0x8b76[35]]=== undefined)?true:false:true,where:_0x2625x11[_0x8b76[34]]?_0x2625x11[_0x8b76[34]][_0x8b76[36]]|| null:null,attributes:_0x2625x11[_0x8b76[34]]?_0x2625x11[_0x8b76[34]][_0x8b76[37]]|| null:null,limit:_0x2625x11[_0x8b76[34]]?_0x2625x11[_0x8b76[34]][_0x8b76[38]]|| null:null,include:_0x2625x11[_0x8b76[34]]?(_0x2625x11[_0x8b76[34]][_0x8b76[39]]?_[_0x8b76[42]](_0x2625x11[_0x8b76[34]][_0x8b76[39]],function(_0x2625x17){return {model:db[_0x2625x17[_0x8b76[40]]],as:_0x2625x17[_0x8b76[41]],attributes:_0x2625x17[_0x8b76[37]],include:_0x2625x17[_0x8b76[39]]?_[_0x8b76[42]](_0x2625x17[_0x8b76[39]],function(_0x2625x18){return {model:db[_0x2625x18[_0x8b76[40]]],as:_0x2625x18[_0x8b76[41]],attributes:_0x2625x18[_0x8b76[37]],include:_0x2625x18[_0x8b76[39]]?_[_0x8b76[42]](_0x2625x18[_0x8b76[39]],function(_0x2625x19){return {model:db[_0x2625x19[_0x8b76[40]]],as:_0x2625x19[_0x8b76[41]],attributes:_0x2625x19[_0x8b76[37]]}}):[]}}):[]}}):[]):[]})[_0x8b76[31]](function(_0x2625x15){logger[_0x8b76[24]](_0x8b76[33],_0x2625x11);logger[_0x8b76[27]](_0x8b76[33],_0x2625x11,JSON[_0x8b76[26]](_0x2625x15));_0x2625x12(_0x2625x15)})[_0x8b76[22]](function(_0x2625x14){logger[_0x8b76[21]](_0x8b76[33],_0x2625x14[_0x8b76[29]],_0x2625x11);_0x2625x13(_0x2625x16[_0x8b76[21]](500,_0x2625x14[_0x8b76[29]]))})})};exports[_0x8b76[45]]= function(_0x2625x11){var _0x2625x16=this;return  new Promise(function(_0x2625x12,_0x2625x13){return db[_0x8b76[44]][_0x8b76[46]]({raw:_0x2625x11[_0x8b76[34]]?(_0x2625x11[_0x8b76[34]][_0x8b76[35]]=== undefined)?true:false:true,where:_0x2625x11[_0x8b76[34]]?_0x2625x11[_0x8b76[34]][_0x8b76[36]]|| null:null,attributes:_0x2625x11[_0x8b76[34]]?_0x2625x11[_0x8b76[34]][_0x8b76[37]]|| null:null,include:_0x2625x11[_0x8b76[34]]?(_0x2625x11[_0x8b76[34]][_0x8b76[39]]?_[_0x8b76[42]](_0x2625x11[_0x8b76[34]][_0x8b76[39]],function(_0x2625x17){return {model:db[_0x2625x17[_0x8b76[40]]],as:_0x2625x17[_0x8b76[41]],attributes:_0x2625x17[_0x8b76[37]],include:_0x2625x17[_0x8b76[39]]?_[_0x8b76[42]](_0x2625x17[_0x8b76[39]],function(_0x2625x18){return {model:db[_0x2625x18[_0x8b76[40]]],as:_0x2625x18[_0x8b76[41]],attributes:_0x2625x18[_0x8b76[37]],include:_0x2625x18[_0x8b76[39]]?_[_0x8b76[42]](_0x2625x18[_0x8b76[39]],function(_0x2625x19){return {model:db[_0x2625x19[_0x8b76[40]]],as:_0x2625x19[_0x8b76[41]],attributes:_0x2625x19[_0x8b76[37]]}}):[]}}):[]}}):[]):[]})[_0x8b76[31]](function(_0x2625x15){logger[_0x8b76[24]](_0x8b76[45],_0x2625x11);logger[_0x8b76[27]](_0x8b76[45],_0x2625x11,JSON[_0x8b76[26]](_0x2625x15));_0x2625x12(_0x2625x15)})[_0x8b76[22]](function(_0x2625x14){logger[_0x8b76[21]](_0x8b76[45],_0x2625x14[_0x8b76[29]],_0x2625x11);_0x2625x13(_0x2625x16[_0x8b76[21]](500,_0x2625x14[_0x8b76[29]]))})})}
\ No newline at end of file
index 2bd0e7d..0f5eb98 100644 (file)
@@ -1 +1 @@
-var _0xd52d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x3A","\x6F\x6E"];_0xd52d[0];var MailQueueEvents=require(_0xd52d[1]);var events=[_0xd52d[2],_0xd52d[3],_0xd52d[4]];function createListener(_0xf6cbx4,_0xf6cbx5){return function(_0xf6cbx6){_0xf6cbx5[_0xd52d[5]](_0xf6cbx4,_0xf6cbx6)}}function removeListener(_0xf6cbx4,_0xf6cbx8){return function(){MailQueueEvents[_0xd52d[6]](_0xf6cbx4,_0xf6cbx8)}}exports[_0xd52d[7]]= function(_0xf6cbx5){for(var _0xf6cbx9=0,_0xf6cbxa=events[_0xd52d[8]];_0xf6cbx9< _0xf6cbxa;_0xf6cbx9++){var _0xf6cbx4=events[_0xf6cbx9];var _0xf6cbx8=createListener(_0xd52d[9]+ _0xf6cbx4,_0xf6cbx5);MailQueueEvents[_0xd52d[10]](_0xf6cbx4,_0xf6cbx8)}}
\ No newline at end of file
+var _0xb3d0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x3A","\x6F\x6E"];_0xb3d0[0];var MailQueueEvents=require(_0xb3d0[1]);var events=[_0xb3d0[2],_0xb3d0[3],_0xb3d0[4]];function createListener(_0xbdf1x4,_0xbdf1x5){return function(_0xbdf1x6){_0xbdf1x5[_0xb3d0[5]](_0xbdf1x4,_0xbdf1x6)}}function removeListener(_0xbdf1x4,_0xbdf1x8){return function(){MailQueueEvents[_0xb3d0[6]](_0xbdf1x4,_0xbdf1x8)}}exports[_0xb3d0[7]]= function(_0xbdf1x5){for(var _0xbdf1x9=0,_0xbdf1xa=events[_0xb3d0[8]];_0xbdf1x9< _0xbdf1xa;_0xbdf1x9++){var _0xbdf1x4=events[_0xbdf1x9];var _0xbdf1x8=createListener(_0xb3d0[9]+ _0xbdf1x4,_0xbdf1x5);MailQueueEvents[_0xb3d0[10]](_0xbdf1x4,_0xbdf1x8)}}
\ No newline at end of file
index 3318c89..5f303bd 100644 (file)
@@ -1 +1 @@
-var _0x3e06=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x3e06[0];var multer=require(_0x3e06[1]);var util=require(_0x3e06[2]);var path=require(_0x3e06[3]);var express=require(_0x3e06[4]);var router=express.Router();var auth=require(_0x3e06[5]);var interaction=require(_0x3e06[6]);var config=require(_0x3e06[7]);var controller=require(_0x3e06[8]);router[_0x3e06[12]](_0x3e06[9],auth[_0x3e06[10]](),controller[_0x3e06[11]]);router[_0x3e06[12]](_0x3e06[13],auth[_0x3e06[10]](),controller[_0x3e06[14]]);router[_0x3e06[12]](_0x3e06[15],auth[_0x3e06[10]](),controller[_0x3e06[16]]);router[_0x3e06[18]](_0x3e06[9],auth[_0x3e06[10]](),controller[_0x3e06[17]]);router[_0x3e06[20]](_0x3e06[15],auth[_0x3e06[10]](),controller[_0x3e06[19]]);router[_0x3e06[22]](_0x3e06[15],auth[_0x3e06[10]](),controller[_0x3e06[21]]);module[_0x3e06[23]]= router
\ No newline at end of file
+var _0x27df=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x27df[0];var multer=require(_0x27df[1]);var util=require(_0x27df[2]);var path=require(_0x27df[3]);var express=require(_0x27df[4]);var router=express.Router();var auth=require(_0x27df[5]);var interaction=require(_0x27df[6]);var config=require(_0x27df[7]);var controller=require(_0x27df[8]);router[_0x27df[12]](_0x27df[9],auth[_0x27df[10]](),controller[_0x27df[11]]);router[_0x27df[12]](_0x27df[13],auth[_0x27df[10]](),controller[_0x27df[14]]);router[_0x27df[12]](_0x27df[15],auth[_0x27df[10]](),controller[_0x27df[16]]);router[_0x27df[18]](_0x27df[9],auth[_0x27df[10]](),controller[_0x27df[17]]);router[_0x27df[20]](_0x27df[15],auth[_0x27df[10]](),controller[_0x27df[19]]);router[_0x27df[22]](_0x27df[15],auth[_0x27df[10]](),controller[_0x27df[21]]);module[_0x27df[23]]= router
\ No newline at end of file
index ed5ddad..4e81155 100644 (file)
@@ -1 +1 @@
-var _0x45e4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45"];_0x45e4[0];var moment=require(_0x45e4[1]);var Sequelize=require(_0x45e4[2]);module[_0x45e4[3]]= {uniqueid:{type:Sequelize[_0x45e4[4]],allowNull:false},from:{type:Sequelize[_0x45e4[4]]},joinAt:{type:Sequelize[_0x45e4[5]]},leaveAt:{type:Sequelize[_0x45e4[5]]},acceptAt:{type:Sequelize[_0x45e4[5]]},exitAt:{type:Sequelize[_0x45e4[5]]},reason:{type:Sequelize[_0x45e4[4]]}}
\ No newline at end of file
+var _0x5980=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45"];_0x5980[0];var moment=require(_0x5980[1]);var Sequelize=require(_0x5980[2]);module[_0x5980[3]]= {uniqueid:{type:Sequelize[_0x5980[4]],allowNull:false},from:{type:Sequelize[_0x5980[4]]},joinAt:{type:Sequelize[_0x5980[5]]},leaveAt:{type:Sequelize[_0x5980[5]]},acceptAt:{type:Sequelize[_0x5980[5]]},exitAt:{type:Sequelize[_0x5980[5]]},reason:{type:Sequelize[_0x5980[4]]}}
\ No newline at end of file
index dac471d..4ea88f1 100644 (file)
@@ -1 +1 @@
-var _0x1089=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x1089[0];var jsonpatch=require(_0x1089[1]);var rp=require(_0x1089[2]);var moment=require(_0x1089[3]);var BPromise=require(_0x1089[4]);var Mustache=require(_0x1089[5]);var util=require(_0x1089[6]);var path=require(_0x1089[7]);var sox=require(_0x1089[8]);var csv=require(_0x1089[9]);var ejs=require(_0x1089[10]);var fs=require(_0x1089[11]);var _=require(_0x1089[12]);var squel=require(_0x1089[13]);var crypto=require(_0x1089[14]);var jsforce=require(_0x1089[15]);var deskjs=require(_0x1089[16]);var toCsv=require(_0x1089[9]);var querystring=require(_0x1089[17]);var Papa=require(_0x1089[18]);var qs=require(_0x1089[19]);var logger=require(_0x1089[21])(_0x1089[20]);var utils=require(_0x1089[22]);var config=require(_0x1089[23]);var db=require(_0x1089[25])[_0x1089[24]];function respondWithStatusCode(_0x2e83x1a,_0x2e83x1b){_0x2e83x1b= _0x2e83x1b|| 204;return function(_0x2e83x1c){if(_0x2e83x1c){return _0x2e83x1a[_0x1089[26]](_0x2e83x1b)};return _0x2e83x1a[_0x1089[28]](_0x2e83x1b)[_0x1089[27]]()}}function respondWithResult(_0x2e83x1a,_0x2e83x1b){_0x2e83x1b= _0x2e83x1b|| 200;return function(_0x2e83x1c){if(_0x2e83x1c){return _0x2e83x1a[_0x1089[28]](_0x2e83x1b)[_0x1089[29]](_0x2e83x1c)}}}function respondWithFilteredResult(_0x2e83x1a,_0x2e83x1f){return function(_0x2e83x1c){if(_0x2e83x1c){var _0x2e83x20=_0x2e83x1c[_0x1089[30]],_0x2e83x21=_0x2e83x1f[_0x1089[31]],_0x2e83x22=_0x2e83x1f[_0x1089[31]]+ _0x2e83x1f[_0x1089[32]],_0x2e83x1b;if(_0x2e83x22>= _0x2e83x20){_0x2e83x22= _0x2e83x20;_0x2e83x1b= 200}else {_0x2e83x1b= 206};_0x2e83x1a[_0x1089[28]](_0x2e83x1b);return _0x2e83x1a[_0x1089[36]](_0x1089[33],_0x2e83x21+ _0x1089[34]+ _0x2e83x22+ _0x1089[35]+ _0x2e83x20)[_0x1089[29]](_0x2e83x1c)};return null}}function patchUpdates(_0x2e83x24){return function(_0x2e83x1c){try{jsonpatch[_0x1089[37]](_0x2e83x1c,_0x2e83x24,true)}catch(err){return BPromise[_0x1089[38]](err)};return _0x2e83x1c[_0x1089[39]]()}}function saveUpdates(_0x2e83x26,_0x2e83x1b){return function(_0x2e83x1c){if(_0x2e83x1c){return _0x2e83x1c[_0x1089[41]](_0x2e83x26)[_0x1089[40]](function(_0x2e83x27){return _0x2e83x27})};return null}}function removeEntity(_0x2e83x1a,_0x2e83x1b){return function(_0x2e83x1c){if(_0x2e83x1c){return _0x2e83x1c[_0x1089[42]]()[_0x1089[40]](function(){_0x2e83x1a[_0x1089[28]](204)[_0x1089[27]]()})}}}function handleEntityNotFound(_0x2e83x1a,_0x2e83x1b){return function(_0x2e83x1c){if(!_0x2e83x1c){_0x2e83x1a[_0x1089[26]](404)};return _0x2e83x1c}}function handleError(_0x2e83x1a,_0x2e83x1b){_0x2e83x1b= _0x2e83x1b|| 500;return function(_0x2e83x2b){logger[_0x1089[44]](_0x2e83x2b[_0x1089[43]]);if(_0x2e83x2b[_0x1089[45]]){delete _0x2e83x2b[_0x1089[45]]};_0x2e83x1a[_0x1089[28]](_0x2e83x1b)[_0x1089[46]](_0x2e83x2b)}}exports[_0x1089[47]]= function(_0x2e83x2c,_0x2e83x1a){var _0x2e83x1f={},_0x2e83x2d={},_0x2e83x2e={count:0,rows:[]};_0x2e83x2d[_0x1089[48]]= _[_0x1089[51]](db[_0x1089[50]][_0x1089[49]]);var _0x2e83x2f={dateStart:_0x2e83x2c[_0x1089[53]][_0x1089[52]],dateEnd:_0x2e83x2c[_0x1089[53]][_0x1089[54]]};delete _0x2e83x2c[_0x1089[53]][_0x1089[52]];delete _0x2e83x2c[_0x1089[53]][_0x1089[54]];_0x2e83x2d[_0x1089[53]]= _[_0x1089[51]](_0x2e83x2c[_0x1089[53]]);_0x2e83x2d[_0x1089[55]]= _[_0x1089[56]](_0x2e83x2d[_0x1089[48]],_0x2e83x2d[_0x1089[53]]);_0x2e83x1f[_0x1089[57]]= _[_0x1089[56]](_0x2e83x2d[_0x1089[48]],qs[_0x1089[58]](_0x2e83x2c[_0x1089[53]][_0x1089[58]]));_0x2e83x1f[_0x1089[57]]= (_0x2e83x1f[_0x1089[57]][_0x1089[59]])?_0x2e83x1f[_0x1089[57]]:_0x2e83x2d[_0x1089[48]];if(!_0x2e83x2c[_0x1089[53]][_0x1089[61]](_0x1089[60])){_0x2e83x1f[_0x1089[32]]= qs[_0x1089[32]](_0x2e83x2c[_0x1089[53]][_0x1089[32]]);_0x2e83x1f[_0x1089[31]]= qs[_0x1089[31]](_0x2e83x2c[_0x1089[53]][_0x1089[31]])};_0x2e83x1f[_0x1089[62]]= qs[_0x1089[63]](_0x2e83x2c[_0x1089[53]][_0x1089[63]]);_0x2e83x1f[_0x1089[64]]= qs[_0x1089[55]](_[_0x1089[65]](_0x2e83x2c[_0x1089[53]],_0x2e83x2d[_0x1089[55]]));if(_0x2e83x2f[_0x1089[52]]){if(_0x2e83x2f[_0x1089[54]]){_0x2e83x2f[_0x1089[54]]= moment(_0x2e83x2f[_0x1089[54]])[_0x1089[67]](1,_0x1089[66])}else {_0x2e83x2f[_0x1089[54]]= moment(_0x2e83x2f[_0x1089[52]])[_0x1089[67]](1,_0x1089[66])};_[_0x1089[68]](_0x2e83x1f[_0x1089[64]],{createdAt:{$gte:_0x2e83x2f[_0x1089[52]],$lte:_0x2e83x2f[_0x1089[54]]}})};if(_0x2e83x2c[_0x1089[53]][_0x1089[69]]){_0x2e83x1f[_0x1089[64]]= _[_0x1089[68]](_0x2e83x1f[_0x1089[64]],{$or:_[_0x1089[71]](_0x2e83x1f[_0x1089[57]],function(_0x2e83x30){var _0x2e83x2e={};_0x2e83x2e[_0x2e83x30]= {$like:_0x1089[70]+ _0x2e83x2c[_0x1089[53]][_0x1089[69]]+ _0x1089[70]};return _0x2e83x2e})})};_0x2e83x1f= _[_0x1089[68]]({},_0x2e83x1f,_0x2e83x2c[_0x1089[72]]);var _0x2e83x31={where:_0x2e83x1f[_0x1089[64]]};return db[_0x1089[50]][_0x1089[30]](_0x2e83x31)[_0x1089[40]](function(_0x2e83x20){_0x2e83x2e[_0x1089[30]]= _0x2e83x20;if(_0x2e83x2c[_0x1089[53]][_0x1089[75]]){_0x2e83x1f[_0x1089[76]]= [{all:true}]};return db[_0x1089[50]][_0x1089[77]](_0x2e83x1f)})[_0x1089[40]](function(_0x2e83x32){_0x2e83x2e[_0x1089[74]]= _0x2e83x32;return _0x2e83x2e})[_0x1089[40]](respondWithFilteredResult(_0x2e83x1a,_0x2e83x1f))[_0x1089[73]](handleError(_0x2e83x1a,null))};exports[_0x1089[78]]= function(_0x2e83x2c,_0x2e83x1a){var _0x2e83x1f={raw:true,where:{id:_0x2e83x2c[_0x1089[80]][_0x1089[79]]}},_0x2e83x2d={};_0x2e83x2d[_0x1089[48]]= _[_0x1089[51]](db[_0x1089[50]][_0x1089[49]]);_0x2e83x2d[_0x1089[53]]= _[_0x1089[51]](_0x2e83x2c[_0x1089[53]]);_0x2e83x2d[_0x1089[55]]= _[_0x1089[56]](_0x2e83x2d[_0x1089[48]],_0x2e83x2d[_0x1089[53]]);_0x2e83x1f[_0x1089[57]]= _[_0x1089[56]](_0x2e83x2d[_0x1089[48]],qs[_0x1089[58]](_0x2e83x2c[_0x1089[53]][_0x1089[58]]));_0x2e83x1f[_0x1089[57]]= (_0x2e83x1f[_0x1089[57]][_0x1089[59]])?_0x2e83x1f[_0x1089[57]]:_0x2e83x2d[_0x1089[48]];if(_0x2e83x2c[_0x1089[53]][_0x1089[75]]){_0x2e83x1f[_0x1089[76]]= [{all:true}]};_0x2e83x1f= _[_0x1089[68]]({},_0x2e83x1f,_0x2e83x2c[_0x1089[72]]);return db[_0x1089[50]][_0x1089[81]](_0x2e83x1f)[_0x1089[40]](handleEntityNotFound(_0x2e83x1a,null))[_0x1089[40]](respondWithResult(_0x2e83x1a,null))[_0x1089[73]](handleError(_0x2e83x1a,null))};exports[_0x1089[82]]= function(_0x2e83x2c,_0x2e83x1a){return db[_0x1089[50]][_0x1089[82]](_0x2e83x2c[_0x1089[83]],{})[_0x1089[40]](respondWithResult(_0x2e83x1a,201))[_0x1089[73]](handleError(_0x2e83x1a,null))};exports[_0x1089[41]]= function(_0x2e83x2c,_0x2e83x1a){if(_0x2e83x2c[_0x1089[83]][_0x1089[79]]){delete _0x2e83x2c[_0x1089[83]][_0x1089[79]]};return db[_0x1089[50]][_0x1089[81]]({where:{id:_0x2e83x2c[_0x1089[80]][_0x1089[79]]}})[_0x1089[40]](handleEntityNotFound(_0x2e83x1a,null))[_0x1089[40]](saveUpdates(_0x2e83x2c[_0x1089[83]],null))[_0x1089[40]](respondWithResult(_0x2e83x1a,null))[_0x1089[73]](handleError(_0x2e83x1a,null))};exports[_0x1089[42]]= function(_0x2e83x2c,_0x2e83x1a){return db[_0x1089[50]][_0x1089[81]]({where:{id:_0x2e83x2c[_0x1089[80]][_0x1089[79]]}})[_0x1089[40]](handleEntityNotFound(_0x2e83x1a,null))[_0x1089[40]](removeEntity(_0x2e83x1a,null))[_0x1089[73]](handleError(_0x2e83x1a,null))};exports[_0x1089[84]]= function(_0x2e83x2c,_0x2e83x1a){return db[_0x1089[50]][_0x1089[84]]()[_0x1089[40]](respondWithResult(_0x2e83x1a,null))[_0x1089[73]](handleError(_0x2e83x1a,null))}
\ No newline at end of file
+var _0xe4da=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xe4da[0];var jsonpatch=require(_0xe4da[1]);var rp=require(_0xe4da[2]);var moment=require(_0xe4da[3]);var BPromise=require(_0xe4da[4]);var Mustache=require(_0xe4da[5]);var util=require(_0xe4da[6]);var path=require(_0xe4da[7]);var sox=require(_0xe4da[8]);var csv=require(_0xe4da[9]);var ejs=require(_0xe4da[10]);var fs=require(_0xe4da[11]);var _=require(_0xe4da[12]);var squel=require(_0xe4da[13]);var crypto=require(_0xe4da[14]);var jsforce=require(_0xe4da[15]);var deskjs=require(_0xe4da[16]);var toCsv=require(_0xe4da[9]);var querystring=require(_0xe4da[17]);var Papa=require(_0xe4da[18]);var qs=require(_0xe4da[19]);var logger=require(_0xe4da[21])(_0xe4da[20]);var utils=require(_0xe4da[22]);var config=require(_0xe4da[23]);var db=require(_0xe4da[25])[_0xe4da[24]];function respondWithStatusCode(_0x7c8bx1a,_0x7c8bx1b){_0x7c8bx1b= _0x7c8bx1b|| 204;return function(_0x7c8bx1c){if(_0x7c8bx1c){return _0x7c8bx1a[_0xe4da[26]](_0x7c8bx1b)};return _0x7c8bx1a[_0xe4da[28]](_0x7c8bx1b)[_0xe4da[27]]()}}function respondWithResult(_0x7c8bx1a,_0x7c8bx1b){_0x7c8bx1b= _0x7c8bx1b|| 200;return function(_0x7c8bx1c){if(_0x7c8bx1c){return _0x7c8bx1a[_0xe4da[28]](_0x7c8bx1b)[_0xe4da[29]](_0x7c8bx1c)}}}function respondWithFilteredResult(_0x7c8bx1a,_0x7c8bx1f){return function(_0x7c8bx1c){if(_0x7c8bx1c){var _0x7c8bx20=_0x7c8bx1c[_0xe4da[30]],_0x7c8bx21=_0x7c8bx1f[_0xe4da[31]],_0x7c8bx22=_0x7c8bx1f[_0xe4da[31]]+ _0x7c8bx1f[_0xe4da[32]],_0x7c8bx1b;if(_0x7c8bx22>= _0x7c8bx20){_0x7c8bx22= _0x7c8bx20;_0x7c8bx1b= 200}else {_0x7c8bx1b= 206};_0x7c8bx1a[_0xe4da[28]](_0x7c8bx1b);return _0x7c8bx1a[_0xe4da[36]](_0xe4da[33],_0x7c8bx21+ _0xe4da[34]+ _0x7c8bx22+ _0xe4da[35]+ _0x7c8bx20)[_0xe4da[29]](_0x7c8bx1c)};return null}}function patchUpdates(_0x7c8bx24){return function(_0x7c8bx1c){try{jsonpatch[_0xe4da[37]](_0x7c8bx1c,_0x7c8bx24,true)}catch(err){return BPromise[_0xe4da[38]](err)};return _0x7c8bx1c[_0xe4da[39]]()}}function saveUpdates(_0x7c8bx26,_0x7c8bx1b){return function(_0x7c8bx1c){if(_0x7c8bx1c){return _0x7c8bx1c[_0xe4da[41]](_0x7c8bx26)[_0xe4da[40]](function(_0x7c8bx27){return _0x7c8bx27})};return null}}function removeEntity(_0x7c8bx1a,_0x7c8bx1b){return function(_0x7c8bx1c){if(_0x7c8bx1c){return _0x7c8bx1c[_0xe4da[42]]()[_0xe4da[40]](function(){_0x7c8bx1a[_0xe4da[28]](204)[_0xe4da[27]]()})}}}function handleEntityNotFound(_0x7c8bx1a,_0x7c8bx1b){return function(_0x7c8bx1c){if(!_0x7c8bx1c){_0x7c8bx1a[_0xe4da[26]](404)};return _0x7c8bx1c}}function handleError(_0x7c8bx1a,_0x7c8bx1b){_0x7c8bx1b= _0x7c8bx1b|| 500;return function(_0x7c8bx2b){logger[_0xe4da[44]](_0x7c8bx2b[_0xe4da[43]]);if(_0x7c8bx2b[_0xe4da[45]]){delete _0x7c8bx2b[_0xe4da[45]]};_0x7c8bx1a[_0xe4da[28]](_0x7c8bx1b)[_0xe4da[46]](_0x7c8bx2b)}}exports[_0xe4da[47]]= function(_0x7c8bx2c,_0x7c8bx1a){var _0x7c8bx1f={},_0x7c8bx2d={},_0x7c8bx2e={count:0,rows:[]};_0x7c8bx2d[_0xe4da[48]]= _[_0xe4da[51]](db[_0xe4da[50]][_0xe4da[49]]);var _0x7c8bx2f={dateStart:_0x7c8bx2c[_0xe4da[53]][_0xe4da[52]],dateEnd:_0x7c8bx2c[_0xe4da[53]][_0xe4da[54]]};delete _0x7c8bx2c[_0xe4da[53]][_0xe4da[52]];delete _0x7c8bx2c[_0xe4da[53]][_0xe4da[54]];_0x7c8bx2d[_0xe4da[53]]= _[_0xe4da[51]](_0x7c8bx2c[_0xe4da[53]]);_0x7c8bx2d[_0xe4da[55]]= _[_0xe4da[56]](_0x7c8bx2d[_0xe4da[48]],_0x7c8bx2d[_0xe4da[53]]);_0x7c8bx1f[_0xe4da[57]]= _[_0xe4da[56]](_0x7c8bx2d[_0xe4da[48]],qs[_0xe4da[58]](_0x7c8bx2c[_0xe4da[53]][_0xe4da[58]]));_0x7c8bx1f[_0xe4da[57]]= (_0x7c8bx1f[_0xe4da[57]][_0xe4da[59]])?_0x7c8bx1f[_0xe4da[57]]:_0x7c8bx2d[_0xe4da[48]];if(!_0x7c8bx2c[_0xe4da[53]][_0xe4da[61]](_0xe4da[60])){_0x7c8bx1f[_0xe4da[32]]= qs[_0xe4da[32]](_0x7c8bx2c[_0xe4da[53]][_0xe4da[32]]);_0x7c8bx1f[_0xe4da[31]]= qs[_0xe4da[31]](_0x7c8bx2c[_0xe4da[53]][_0xe4da[31]])};_0x7c8bx1f[_0xe4da[62]]= qs[_0xe4da[63]](_0x7c8bx2c[_0xe4da[53]][_0xe4da[63]]);_0x7c8bx1f[_0xe4da[64]]= qs[_0xe4da[55]](_[_0xe4da[65]](_0x7c8bx2c[_0xe4da[53]],_0x7c8bx2d[_0xe4da[55]]));if(_0x7c8bx2f[_0xe4da[52]]){if(_0x7c8bx2f[_0xe4da[54]]){_0x7c8bx2f[_0xe4da[54]]= moment(_0x7c8bx2f[_0xe4da[54]])[_0xe4da[67]](1,_0xe4da[66])}else {_0x7c8bx2f[_0xe4da[54]]= moment(_0x7c8bx2f[_0xe4da[52]])[_0xe4da[67]](1,_0xe4da[66])};_[_0xe4da[68]](_0x7c8bx1f[_0xe4da[64]],{createdAt:{$gte:_0x7c8bx2f[_0xe4da[52]],$lte:_0x7c8bx2f[_0xe4da[54]]}})};if(_0x7c8bx2c[_0xe4da[53]][_0xe4da[69]]){_0x7c8bx1f[_0xe4da[64]]= _[_0xe4da[68]](_0x7c8bx1f[_0xe4da[64]],{$or:_[_0xe4da[71]](_0x7c8bx1f[_0xe4da[57]],function(_0x7c8bx30){var _0x7c8bx2e={};_0x7c8bx2e[_0x7c8bx30]= {$like:_0xe4da[70]+ _0x7c8bx2c[_0xe4da[53]][_0xe4da[69]]+ _0xe4da[70]};return _0x7c8bx2e})})};_0x7c8bx1f= _[_0xe4da[68]]({},_0x7c8bx1f,_0x7c8bx2c[_0xe4da[72]]);var _0x7c8bx31={where:_0x7c8bx1f[_0xe4da[64]]};return db[_0xe4da[50]][_0xe4da[30]](_0x7c8bx31)[_0xe4da[40]](function(_0x7c8bx20){_0x7c8bx2e[_0xe4da[30]]= _0x7c8bx20;if(_0x7c8bx2c[_0xe4da[53]][_0xe4da[75]]){_0x7c8bx1f[_0xe4da[76]]= [{all:true}]};return db[_0xe4da[50]][_0xe4da[77]](_0x7c8bx1f)})[_0xe4da[40]](function(_0x7c8bx32){_0x7c8bx2e[_0xe4da[74]]= _0x7c8bx32;return _0x7c8bx2e})[_0xe4da[40]](respondWithFilteredResult(_0x7c8bx1a,_0x7c8bx1f))[_0xe4da[73]](handleError(_0x7c8bx1a,null))};exports[_0xe4da[78]]= function(_0x7c8bx2c,_0x7c8bx1a){var _0x7c8bx1f={raw:true,where:{id:_0x7c8bx2c[_0xe4da[80]][_0xe4da[79]]}},_0x7c8bx2d={};_0x7c8bx2d[_0xe4da[48]]= _[_0xe4da[51]](db[_0xe4da[50]][_0xe4da[49]]);_0x7c8bx2d[_0xe4da[53]]= _[_0xe4da[51]](_0x7c8bx2c[_0xe4da[53]]);_0x7c8bx2d[_0xe4da[55]]= _[_0xe4da[56]](_0x7c8bx2d[_0xe4da[48]],_0x7c8bx2d[_0xe4da[53]]);_0x7c8bx1f[_0xe4da[57]]= _[_0xe4da[56]](_0x7c8bx2d[_0xe4da[48]],qs[_0xe4da[58]](_0x7c8bx2c[_0xe4da[53]][_0xe4da[58]]));_0x7c8bx1f[_0xe4da[57]]= (_0x7c8bx1f[_0xe4da[57]][_0xe4da[59]])?_0x7c8bx1f[_0xe4da[57]]:_0x7c8bx2d[_0xe4da[48]];if(_0x7c8bx2c[_0xe4da[53]][_0xe4da[75]]){_0x7c8bx1f[_0xe4da[76]]= [{all:true}]};_0x7c8bx1f= _[_0xe4da[68]]({},_0x7c8bx1f,_0x7c8bx2c[_0xe4da[72]]);return db[_0xe4da[50]][_0xe4da[81]](_0x7c8bx1f)[_0xe4da[40]](handleEntityNotFound(_0x7c8bx1a,null))[_0xe4da[40]](respondWithResult(_0x7c8bx1a,null))[_0xe4da[73]](handleError(_0x7c8bx1a,null))};exports[_0xe4da[82]]= function(_0x7c8bx2c,_0x7c8bx1a){return db[_0xe4da[50]][_0xe4da[82]](_0x7c8bx2c[_0xe4da[83]],{})[_0xe4da[40]](respondWithResult(_0x7c8bx1a,201))[_0xe4da[73]](handleError(_0x7c8bx1a,null))};exports[_0xe4da[41]]= function(_0x7c8bx2c,_0x7c8bx1a){if(_0x7c8bx2c[_0xe4da[83]][_0xe4da[79]]){delete _0x7c8bx2c[_0xe4da[83]][_0xe4da[79]]};return db[_0xe4da[50]][_0xe4da[81]]({where:{id:_0x7c8bx2c[_0xe4da[80]][_0xe4da[79]]}})[_0xe4da[40]](handleEntityNotFound(_0x7c8bx1a,null))[_0xe4da[40]](saveUpdates(_0x7c8bx2c[_0xe4da[83]],null))[_0xe4da[40]](respondWithResult(_0x7c8bx1a,null))[_0xe4da[73]](handleError(_0x7c8bx1a,null))};exports[_0xe4da[42]]= function(_0x7c8bx2c,_0x7c8bx1a){return db[_0xe4da[50]][_0xe4da[81]]({where:{id:_0x7c8bx2c[_0xe4da[80]][_0xe4da[79]]}})[_0xe4da[40]](handleEntityNotFound(_0x7c8bx1a,null))[_0xe4da[40]](removeEntity(_0x7c8bx1a,null))[_0xe4da[73]](handleError(_0x7c8bx1a,null))};exports[_0xe4da[84]]= function(_0x7c8bx2c,_0x7c8bx1a){return db[_0xe4da[50]][_0xe4da[84]]()[_0xe4da[40]](respondWithResult(_0x7c8bx1a,null))[_0xe4da[73]](handleError(_0x7c8bx1a,null))}
\ No newline at end of file
index 50e48d6..797ee97 100644 (file)
@@ -1 +1 @@
-var _0x628d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0x628d[0];var _=require(_0x628d[1]);var util=require(_0x628d[2]);var logger=require(_0x628d[4])(_0x628d[3]);var moment=require(_0x628d[5]);var BPromise=require(_0x628d[6]);var rp=require(_0x628d[7]);var attributes=require(_0x628d[8]);module[_0x628d[9]]= function(_0x7209x8,_0x7209x9){return _0x7209x8[_0x628d[13]](_0x628d[10],attributes,{tableName:_0x628d[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x628d[12],"\x66\x69\x65\x6C\x64\x73":[_0x628d[12]]}],timestamps:true})}
\ No newline at end of file
+var _0x2399=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0x2399[0];var _=require(_0x2399[1]);var util=require(_0x2399[2]);var logger=require(_0x2399[4])(_0x2399[3]);var moment=require(_0x2399[5]);var BPromise=require(_0x2399[6]);var rp=require(_0x2399[7]);var attributes=require(_0x2399[8]);module[_0x2399[9]]= function(_0x5672x8,_0x5672x9){return _0x5672x8[_0x2399[13]](_0x2399[10],attributes,{tableName:_0x2399[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x2399[12],"\x66\x69\x65\x6C\x64\x73":[_0x2399[12]]}],timestamps:true})}
\ No newline at end of file
index 9dd0b1a..f0bf7f7 100644 (file)
@@ -1 +1 @@
-var _0xa8e0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x55\x70\x64\x61\x74\x65\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65"];_0xa8e0[0];var _=require(_0xa8e0[1]);var util=require(_0xa8e0[2]);var moment=require(_0xa8e0[3]);var BPromise=require(_0xa8e0[4]);var rs=require(_0xa8e0[5]);var fs=require(_0xa8e0[6]);var db=require(_0xa8e0[8])[_0xa8e0[7]];var utils=require(_0xa8e0[9]);var logger=require(_0xa8e0[11])(_0xa8e0[10]);var config=require(_0xa8e0[12]);var jayson=require(_0xa8e0[13]);var client=jayson[_0xa8e0[15]][_0xa8e0[14]]({port:9002});function respondWithRpcPromise(_0x4beaxe,_0x4beaxf,_0x4beax10){return  new BPromise(function(_0x4beax11,_0x4beax12){return client[_0xa8e0[28]](_0x4beaxe,_0x4beax10)[_0xa8e0[27]](function(_0x4beax14){logger[_0xa8e0[20]](_0xa8e0[16],_0x4beaxf,_0xa8e0[19]);logger[_0xa8e0[23]](_0xa8e0[21],_0x4beaxf,_0xa8e0[19],JSON[_0xa8e0[22]](_0x4beax14));if(_0x4beax14[_0xa8e0[17]]){if(_0x4beax14[_0xa8e0[17]][_0xa8e0[24]]=== 500){logger[_0xa8e0[17]](_0xa8e0[16],_0x4beaxf,_0x4beax14[_0xa8e0[17]][_0xa8e0[25]]);return _0x4beax12(_0x4beax14[_0xa8e0[17]][_0xa8e0[25]])};logger[_0xa8e0[17]](_0xa8e0[16],_0x4beaxf,_0x4beax14[_0xa8e0[17]][_0xa8e0[25]]);return _0x4beax11(_0x4beax14[_0xa8e0[17]][_0xa8e0[25]])}else {logger[_0xa8e0[20]](_0xa8e0[16],_0x4beaxf,_0xa8e0[19]);_0x4beax11(_0x4beax14[_0xa8e0[26]][_0xa8e0[25]])}})[_0xa8e0[18]](function(_0x4beax13){logger[_0xa8e0[17]](_0xa8e0[16],_0x4beaxf,_0x4beax13);_0x4beax12(_0x4beax13)})})}exports[_0xa8e0[29]]= function(_0x4beax10){var _0x4beax15=this;return  new Promise(function(_0x4beax11,_0x4beax12){return db[_0xa8e0[34]][_0xa8e0[33]](_0x4beax10[_0xa8e0[30]],{raw:_0x4beax10[_0xa8e0[31]]?(_0x4beax10[_0xa8e0[31]][_0xa8e0[32]]=== undefined)?true:false:true})[_0xa8e0[27]](function(_0x4beax14){logger[_0xa8e0[20]](_0xa8e0[29],_0x4beax10);logger[_0xa8e0[23]](_0xa8e0[29],_0x4beax10,JSON[_0xa8e0[22]](_0x4beax14));_0x4beax11(_0x4beax14)})[_0xa8e0[18]](function(_0x4beax13){logger[_0xa8e0[17]](_0xa8e0[29],_0x4beax13[_0xa8e0[25]],_0x4beax10);_0x4beax12(_0x4beax15[_0xa8e0[17]](500,_0x4beax13[_0xa8e0[25]]))})})};exports[_0xa8e0[35]]= function(_0x4beax10){var _0x4beax15=this;return  new Promise(function(_0x4beax11,_0x4beax12){return db[_0xa8e0[34]][_0xa8e0[39]](_0x4beax10[_0xa8e0[30]],{raw:_0x4beax10[_0xa8e0[31]]?(_0x4beax10[_0xa8e0[31]][_0xa8e0[32]]=== undefined)?true:false:true,individualHooks:true,where:_0x4beax10[_0xa8e0[31]]?_0x4beax10[_0xa8e0[31]][_0xa8e0[36]]|| null:null,attributes:_0x4beax10[_0xa8e0[31]]?_0x4beax10[_0xa8e0[31]][_0xa8e0[37]]|| null:null,limit:_0x4beax10[_0xa8e0[31]]?_0x4beax10[_0xa8e0[31]][_0xa8e0[38]]|| null:null})[_0xa8e0[27]](function(_0x4beax14){logger[_0xa8e0[20]](_0xa8e0[35],_0x4beax10);logger[_0xa8e0[23]](_0xa8e0[35],_0x4beax10,JSON[_0xa8e0[22]](_0x4beax14));_0x4beax11(_0x4beax14)})[_0xa8e0[18]](function(_0x4beax13){logger[_0xa8e0[17]](_0xa8e0[35],_0x4beax13[_0xa8e0[25]],_0x4beax10);_0x4beax12(_0x4beax15[_0xa8e0[17]](500,_0x4beax13[_0xa8e0[25]]))})})}
\ No newline at end of file
+var _0x94a9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x55\x70\x64\x61\x74\x65\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65"];_0x94a9[0];var _=require(_0x94a9[1]);var util=require(_0x94a9[2]);var moment=require(_0x94a9[3]);var BPromise=require(_0x94a9[4]);var rs=require(_0x94a9[5]);var fs=require(_0x94a9[6]);var db=require(_0x94a9[8])[_0x94a9[7]];var utils=require(_0x94a9[9]);var logger=require(_0x94a9[11])(_0x94a9[10]);var config=require(_0x94a9[12]);var jayson=require(_0x94a9[13]);var client=jayson[_0x94a9[15]][_0x94a9[14]]({port:9002});function respondWithRpcPromise(_0xeed2xe,_0xeed2xf,_0xeed2x10){return  new BPromise(function(_0xeed2x11,_0xeed2x12){return client[_0x94a9[28]](_0xeed2xe,_0xeed2x10)[_0x94a9[27]](function(_0xeed2x14){logger[_0x94a9[20]](_0x94a9[16],_0xeed2xf,_0x94a9[19]);logger[_0x94a9[23]](_0x94a9[21],_0xeed2xf,_0x94a9[19],JSON[_0x94a9[22]](_0xeed2x14));if(_0xeed2x14[_0x94a9[17]]){if(_0xeed2x14[_0x94a9[17]][_0x94a9[24]]=== 500){logger[_0x94a9[17]](_0x94a9[16],_0xeed2xf,_0xeed2x14[_0x94a9[17]][_0x94a9[25]]);return _0xeed2x12(_0xeed2x14[_0x94a9[17]][_0x94a9[25]])};logger[_0x94a9[17]](_0x94a9[16],_0xeed2xf,_0xeed2x14[_0x94a9[17]][_0x94a9[25]]);return _0xeed2x11(_0xeed2x14[_0x94a9[17]][_0x94a9[25]])}else {logger[_0x94a9[20]](_0x94a9[16],_0xeed2xf,_0x94a9[19]);_0xeed2x11(_0xeed2x14[_0x94a9[26]][_0x94a9[25]])}})[_0x94a9[18]](function(_0xeed2x13){logger[_0x94a9[17]](_0x94a9[16],_0xeed2xf,_0xeed2x13);_0xeed2x12(_0xeed2x13)})})}exports[_0x94a9[29]]= function(_0xeed2x10){var _0xeed2x15=this;return  new Promise(function(_0xeed2x11,_0xeed2x12){return db[_0x94a9[34]][_0x94a9[33]](_0xeed2x10[_0x94a9[30]],{raw:_0xeed2x10[_0x94a9[31]]?(_0xeed2x10[_0x94a9[31]][_0x94a9[32]]=== undefined)?true:false:true})[_0x94a9[27]](function(_0xeed2x14){logger[_0x94a9[20]](_0x94a9[29],_0xeed2x10);logger[_0x94a9[23]](_0x94a9[29],_0xeed2x10,JSON[_0x94a9[22]](_0xeed2x14));_0xeed2x11(_0xeed2x14)})[_0x94a9[18]](function(_0xeed2x13){logger[_0x94a9[17]](_0x94a9[29],_0xeed2x13[_0x94a9[25]],_0xeed2x10);_0xeed2x12(_0xeed2x15[_0x94a9[17]](500,_0xeed2x13[_0x94a9[25]]))})})};exports[_0x94a9[35]]= function(_0xeed2x10){var _0xeed2x15=this;return  new Promise(function(_0xeed2x11,_0xeed2x12){return db[_0x94a9[34]][_0x94a9[39]](_0xeed2x10[_0x94a9[30]],{raw:_0xeed2x10[_0x94a9[31]]?(_0xeed2x10[_0x94a9[31]][_0x94a9[32]]=== undefined)?true:false:true,individualHooks:true,where:_0xeed2x10[_0x94a9[31]]?_0xeed2x10[_0x94a9[31]][_0x94a9[36]]|| null:null,attributes:_0xeed2x10[_0x94a9[31]]?_0xeed2x10[_0x94a9[31]][_0x94a9[37]]|| null:null,limit:_0xeed2x10[_0x94a9[31]]?_0xeed2x10[_0x94a9[31]][_0x94a9[38]]|| null:null})[_0x94a9[27]](function(_0xeed2x14){logger[_0x94a9[20]](_0x94a9[35],_0xeed2x10);logger[_0x94a9[23]](_0x94a9[35],_0xeed2x10,JSON[_0x94a9[22]](_0xeed2x14));_0xeed2x11(_0xeed2x14)})[_0x94a9[18]](function(_0xeed2x13){logger[_0x94a9[17]](_0x94a9[35],_0xeed2x13[_0x94a9[25]],_0xeed2x10);_0xeed2x12(_0xeed2x15[_0x94a9[17]](500,_0xeed2x13[_0x94a9[25]]))})})}
\ No newline at end of file
index 70ded50..e3be816 100644 (file)
@@ -1 +1 @@
-var _0x6c0d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x6c0d[0];var multer=require(_0x6c0d[1]);var util=require(_0x6c0d[2]);var path=require(_0x6c0d[3]);var express=require(_0x6c0d[4]);var router=express.Router();var auth=require(_0x6c0d[5]);var interaction=require(_0x6c0d[6]);var config=require(_0x6c0d[7]);module[_0x6c0d[8]]= router
\ No newline at end of file
+var _0x2b47=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x2b47[0];var multer=require(_0x2b47[1]);var util=require(_0x2b47[2]);var path=require(_0x2b47[3]);var express=require(_0x2b47[4]);var router=express.Router();var auth=require(_0x2b47[5]);var interaction=require(_0x2b47[6]);var config=require(_0x2b47[7]);module[_0x2b47[8]]= router
\ No newline at end of file
index 1910afb..6d0992c 100644 (file)
@@ -1 +1 @@
-var _0x367e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x49\x4E\x54\x45\x47\x45\x52","\x49\x4E\x42\x4F\x58"];_0x367e[0];var Sequelize=require(_0x367e[1]);module[_0x367e[2]]= {description:{type:Sequelize[_0x367e[3]]},host:{type:Sequelize[_0x367e[3]]},authentication:{type:Sequelize[_0x367e[4]],defaultValue:true},user:{type:Sequelize[_0x367e[3]],unique:_0x367e[5]},password:{type:Sequelize[_0x367e[3]]},port:{type:Sequelize[_0x367e[6]]},tls:{type:Sequelize[_0x367e[4]],defaultValue:true},mailbox:{type:Sequelize[_0x367e[3]],defaultValue:_0x367e[7]},connTimeout:{type:Sequelize[_0x367e[6]],defaultValue:10},authTimeout:{type:Sequelize[_0x367e[6]],defaultValue:5},service:{type:Sequelize[_0x367e[3]]}}
\ No newline at end of file
+var _0x6ddd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x49\x4E\x54\x45\x47\x45\x52","\x49\x4E\x42\x4F\x58"];_0x6ddd[0];var Sequelize=require(_0x6ddd[1]);module[_0x6ddd[2]]= {description:{type:Sequelize[_0x6ddd[3]]},host:{type:Sequelize[_0x6ddd[3]]},authentication:{type:Sequelize[_0x6ddd[4]],defaultValue:true},user:{type:Sequelize[_0x6ddd[3]],unique:_0x6ddd[5]},password:{type:Sequelize[_0x6ddd[3]]},port:{type:Sequelize[_0x6ddd[6]]},tls:{type:Sequelize[_0x6ddd[4]],defaultValue:true},mailbox:{type:Sequelize[_0x6ddd[3]],defaultValue:_0x6ddd[7]},connTimeout:{type:Sequelize[_0x6ddd[6]],defaultValue:10},authTimeout:{type:Sequelize[_0x6ddd[6]],defaultValue:5},service:{type:Sequelize[_0x6ddd[3]]}}
\ No newline at end of file
index e939443..63f3c4d 100644 (file)
@@ -1 +1 @@
-var _0x4ebf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x73\x5F\x69\x6E","\x64\x65\x66\x69\x6E\x65"];_0x4ebf[0];var _=require(_0x4ebf[1]);var util=require(_0x4ebf[2]);var logger=require(_0x4ebf[4])(_0x4ebf[3]);var moment=require(_0x4ebf[5]);var BPromise=require(_0x4ebf[6]);var rp=require(_0x4ebf[7]);var attributes=require(_0x4ebf[8]);module[_0x4ebf[9]]= function(_0x9588x8,_0x9588x9){return _0x9588x8[_0x4ebf[12]](_0x4ebf[10],attributes,{tableName:_0x4ebf[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x287c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x73\x5F\x69\x6E","\x64\x65\x66\x69\x6E\x65"];_0x287c[0];var _=require(_0x287c[1]);var util=require(_0x287c[2]);var logger=require(_0x287c[4])(_0x287c[3]);var moment=require(_0x287c[5]);var BPromise=require(_0x287c[6]);var rp=require(_0x287c[7]);var attributes=require(_0x287c[8]);module[_0x287c[9]]= function(_0x37c0x8,_0x37c0x9){return _0x37c0x8[_0x287c[12]](_0x287c[10],attributes,{tableName:_0x287c[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 674760d..a66d589 100644 (file)
@@ -1 +1 @@
-var _0xad44=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E"];_0xad44[0];var _=require(_0xad44[1]);var util=require(_0xad44[2]);var moment=require(_0xad44[3]);var BPromise=require(_0xad44[4]);var rs=require(_0xad44[5]);var fs=require(_0xad44[6]);var db=require(_0xad44[8])[_0xad44[7]];var utils=require(_0xad44[9]);var logger=require(_0xad44[11])(_0xad44[10]);var config=require(_0xad44[12]);var jayson=require(_0xad44[13]);var client=jayson[_0xad44[15]][_0xad44[14]]({port:9002});function respondWithRpcPromise(_0xe752xe,_0xe752xf,_0xe752x10){return  new BPromise(function(_0xe752x11,_0xe752x12){return client[_0xad44[28]](_0xe752xe,_0xe752x10)[_0xad44[27]](function(_0xe752x14){logger[_0xad44[20]](_0xad44[16],_0xe752xf,_0xad44[19]);logger[_0xad44[23]](_0xad44[21],_0xe752xf,_0xad44[19],JSON[_0xad44[22]](_0xe752x14));if(_0xe752x14[_0xad44[17]]){if(_0xe752x14[_0xad44[17]][_0xad44[24]]=== 500){logger[_0xad44[17]](_0xad44[16],_0xe752xf,_0xe752x14[_0xad44[17]][_0xad44[25]]);return _0xe752x12(_0xe752x14[_0xad44[17]][_0xad44[25]])};logger[_0xad44[17]](_0xad44[16],_0xe752xf,_0xe752x14[_0xad44[17]][_0xad44[25]]);return _0xe752x11(_0xe752x14[_0xad44[17]][_0xad44[25]])}else {logger[_0xad44[20]](_0xad44[16],_0xe752xf,_0xad44[19]);_0xe752x11(_0xe752x14[_0xad44[26]][_0xad44[25]])}})[_0xad44[18]](function(_0xe752x13){logger[_0xad44[17]](_0xad44[16],_0xe752xf,_0xe752x13);_0xe752x12(_0xe752x13)})})}exports[_0xad44[29]]= function(_0xe752x10){var _0xe752x15=this;return  new Promise(function(_0xe752x11,_0xe752x12){return db[_0xad44[40]][_0xad44[39]]({raw:_0xe752x10[_0xad44[30]]?(_0xe752x10[_0xad44[30]][_0xad44[31]]=== undefined)?true:false:true,where:_0xe752x10[_0xad44[30]]?_0xe752x10[_0xad44[30]][_0xad44[32]]|| null:null,attributes:_0xe752x10[_0xad44[30]]?_0xe752x10[_0xad44[30]][_0xad44[33]]|| null:null,limit:_0xe752x10[_0xad44[30]]?_0xe752x10[_0xad44[30]][_0xad44[34]]|| null:null,include:_0xe752x10[_0xad44[30]]?(_0xe752x10[_0xad44[30]][_0xad44[35]]?_[_0xad44[38]](_0xe752x10[_0xad44[30]][_0xad44[35]],function(_0xe752x16){return {model:db[_0xe752x16[_0xad44[36]]],as:_0xe752x16[_0xad44[37]],attributes:_0xe752x16[_0xad44[33]],include:_0xe752x16[_0xad44[35]]?_[_0xad44[38]](_0xe752x16[_0xad44[35]],function(_0xe752x17){return {model:db[_0xe752x17[_0xad44[36]]],as:_0xe752x17[_0xad44[37]],attributes:_0xe752x17[_0xad44[33]],include:_0xe752x17[_0xad44[35]]?_[_0xad44[38]](_0xe752x17[_0xad44[35]],function(_0xe752x18){return {model:db[_0xe752x18[_0xad44[36]]],as:_0xe752x18[_0xad44[37]],attributes:_0xe752x18[_0xad44[33]]}}):[]}}):[]}}):[]):[]})[_0xad44[27]](function(_0xe752x14){logger[_0xad44[20]](_0xad44[29],_0xe752x10);logger[_0xad44[23]](_0xad44[29],_0xe752x10,JSON[_0xad44[22]](_0xe752x14));_0xe752x11(_0xe752x14)})[_0xad44[18]](function(_0xe752x13){logger[_0xad44[17]](_0xad44[29],_0xe752x13[_0xad44[25]],_0xe752x10);_0xe752x12(_0xe752x15[_0xad44[17]](500,_0xe752x13[_0xad44[25]]))})})}
\ No newline at end of file
+var _0x4cd7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E"];_0x4cd7[0];var _=require(_0x4cd7[1]);var util=require(_0x4cd7[2]);var moment=require(_0x4cd7[3]);var BPromise=require(_0x4cd7[4]);var rs=require(_0x4cd7[5]);var fs=require(_0x4cd7[6]);var db=require(_0x4cd7[8])[_0x4cd7[7]];var utils=require(_0x4cd7[9]);var logger=require(_0x4cd7[11])(_0x4cd7[10]);var config=require(_0x4cd7[12]);var jayson=require(_0x4cd7[13]);var client=jayson[_0x4cd7[15]][_0x4cd7[14]]({port:9002});function respondWithRpcPromise(_0xee46xe,_0xee46xf,_0xee46x10){return  new BPromise(function(_0xee46x11,_0xee46x12){return client[_0x4cd7[28]](_0xee46xe,_0xee46x10)[_0x4cd7[27]](function(_0xee46x14){logger[_0x4cd7[20]](_0x4cd7[16],_0xee46xf,_0x4cd7[19]);logger[_0x4cd7[23]](_0x4cd7[21],_0xee46xf,_0x4cd7[19],JSON[_0x4cd7[22]](_0xee46x14));if(_0xee46x14[_0x4cd7[17]]){if(_0xee46x14[_0x4cd7[17]][_0x4cd7[24]]=== 500){logger[_0x4cd7[17]](_0x4cd7[16],_0xee46xf,_0xee46x14[_0x4cd7[17]][_0x4cd7[25]]);return _0xee46x12(_0xee46x14[_0x4cd7[17]][_0x4cd7[25]])};logger[_0x4cd7[17]](_0x4cd7[16],_0xee46xf,_0xee46x14[_0x4cd7[17]][_0x4cd7[25]]);return _0xee46x11(_0xee46x14[_0x4cd7[17]][_0x4cd7[25]])}else {logger[_0x4cd7[20]](_0x4cd7[16],_0xee46xf,_0x4cd7[19]);_0xee46x11(_0xee46x14[_0x4cd7[26]][_0x4cd7[25]])}})[_0x4cd7[18]](function(_0xee46x13){logger[_0x4cd7[17]](_0x4cd7[16],_0xee46xf,_0xee46x13);_0xee46x12(_0xee46x13)})})}exports[_0x4cd7[29]]= function(_0xee46x10){var _0xee46x15=this;return  new Promise(function(_0xee46x11,_0xee46x12){return db[_0x4cd7[40]][_0x4cd7[39]]({raw:_0xee46x10[_0x4cd7[30]]?(_0xee46x10[_0x4cd7[30]][_0x4cd7[31]]=== undefined)?true:false:true,where:_0xee46x10[_0x4cd7[30]]?_0xee46x10[_0x4cd7[30]][_0x4cd7[32]]|| null:null,attributes:_0xee46x10[_0x4cd7[30]]?_0xee46x10[_0x4cd7[30]][_0x4cd7[33]]|| null:null,limit:_0xee46x10[_0x4cd7[30]]?_0xee46x10[_0x4cd7[30]][_0x4cd7[34]]|| null:null,include:_0xee46x10[_0x4cd7[30]]?(_0xee46x10[_0x4cd7[30]][_0x4cd7[35]]?_[_0x4cd7[38]](_0xee46x10[_0x4cd7[30]][_0x4cd7[35]],function(_0xee46x16){return {model:db[_0xee46x16[_0x4cd7[36]]],as:_0xee46x16[_0x4cd7[37]],attributes:_0xee46x16[_0x4cd7[33]],include:_0xee46x16[_0x4cd7[35]]?_[_0x4cd7[38]](_0xee46x16[_0x4cd7[35]],function(_0xee46x17){return {model:db[_0xee46x17[_0x4cd7[36]]],as:_0xee46x17[_0x4cd7[37]],attributes:_0xee46x17[_0x4cd7[33]],include:_0xee46x17[_0x4cd7[35]]?_[_0x4cd7[38]](_0xee46x17[_0x4cd7[35]],function(_0xee46x18){return {model:db[_0xee46x18[_0x4cd7[36]]],as:_0xee46x18[_0x4cd7[37]],attributes:_0xee46x18[_0x4cd7[33]]}}):[]}}):[]}}):[]):[]})[_0x4cd7[27]](function(_0xee46x14){logger[_0x4cd7[20]](_0x4cd7[29],_0xee46x10);logger[_0x4cd7[23]](_0x4cd7[29],_0xee46x10,JSON[_0x4cd7[22]](_0xee46x14));_0xee46x11(_0xee46x14)})[_0x4cd7[18]](function(_0xee46x13){logger[_0x4cd7[17]](_0x4cd7[29],_0xee46x13[_0x4cd7[25]],_0xee46x10);_0xee46x12(_0xee46x15[_0x4cd7[17]](500,_0xee46x13[_0x4cd7[25]]))})})}
\ No newline at end of file
index c87936a..c4936a9 100644 (file)
@@ -1 +1 @@
-var _0x11a3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x11a3[0];var multer=require(_0x11a3[1]);var util=require(_0x11a3[2]);var path=require(_0x11a3[3]);var express=require(_0x11a3[4]);var router=express.Router();var auth=require(_0x11a3[5]);var interaction=require(_0x11a3[6]);var config=require(_0x11a3[7]);var controller=require(_0x11a3[8]);router[_0x11a3[12]](_0x11a3[9],auth[_0x11a3[10]](),controller[_0x11a3[11]]);router[_0x11a3[12]](_0x11a3[13],auth[_0x11a3[10]](),controller[_0x11a3[14]]);router[_0x11a3[16]](_0x11a3[9],auth[_0x11a3[10]](),controller[_0x11a3[15]]);router[_0x11a3[18]](_0x11a3[13],auth[_0x11a3[10]](),controller[_0x11a3[17]]);router[_0x11a3[20]](_0x11a3[13],auth[_0x11a3[10]](),controller[_0x11a3[19]]);module[_0x11a3[21]]= router
\ No newline at end of file
+var _0x18f8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x18f8[0];var multer=require(_0x18f8[1]);var util=require(_0x18f8[2]);var path=require(_0x18f8[3]);var express=require(_0x18f8[4]);var router=express.Router();var auth=require(_0x18f8[5]);var interaction=require(_0x18f8[6]);var config=require(_0x18f8[7]);var controller=require(_0x18f8[8]);router[_0x18f8[12]](_0x18f8[9],auth[_0x18f8[10]](),controller[_0x18f8[11]]);router[_0x18f8[12]](_0x18f8[13],auth[_0x18f8[10]](),controller[_0x18f8[14]]);router[_0x18f8[16]](_0x18f8[9],auth[_0x18f8[10]](),controller[_0x18f8[15]]);router[_0x18f8[18]](_0x18f8[13],auth[_0x18f8[10]](),controller[_0x18f8[17]]);router[_0x18f8[20]](_0x18f8[13],auth[_0x18f8[10]](),controller[_0x18f8[19]]);module[_0x18f8[21]]= router
\ No newline at end of file
index 6d6042e..b13edab 100644 (file)
@@ -1 +1 @@
-var _0xaafd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0xaafd[0];var Sequelize=require(_0xaafd[1]);module[_0xaafd[2]]= {description:{type:Sequelize[_0xaafd[3]]},host:{type:Sequelize[_0xaafd[3]]},user:{type:Sequelize[_0xaafd[3]]},pass:{type:Sequelize[_0xaafd[3]]},port:{type:Sequelize[_0xaafd[4]]},secure:{type:Sequelize[_0xaafd[5]],defaultValue:false},service:{type:Sequelize[_0xaafd[3]]},authentication:{type:Sequelize[_0xaafd[5]],defaultValue:true}}
\ No newline at end of file
+var _0xfec8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0xfec8[0];var Sequelize=require(_0xfec8[1]);module[_0xfec8[2]]= {description:{type:Sequelize[_0xfec8[3]]},host:{type:Sequelize[_0xfec8[3]]},user:{type:Sequelize[_0xfec8[3]]},pass:{type:Sequelize[_0xfec8[3]]},port:{type:Sequelize[_0xfec8[4]]},secure:{type:Sequelize[_0xfec8[5]],defaultValue:false},service:{type:Sequelize[_0xfec8[3]]},authentication:{type:Sequelize[_0xfec8[5]],defaultValue:true}}
\ No newline at end of file
index fba4d78..3bba899 100644 (file)
@@ -1 +1 @@
-var _0x6907=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x6907[0];var jsonpatch=require(_0x6907[1]);var rp=require(_0x6907[2]);var moment=require(_0x6907[3]);var BPromise=require(_0x6907[4]);var Mustache=require(_0x6907[5]);var util=require(_0x6907[6]);var path=require(_0x6907[7]);var sox=require(_0x6907[8]);var csv=require(_0x6907[9]);var ejs=require(_0x6907[10]);var fs=require(_0x6907[11]);var _=require(_0x6907[12]);var squel=require(_0x6907[13]);var crypto=require(_0x6907[14]);var jsforce=require(_0x6907[15]);var deskjs=require(_0x6907[16]);var toCsv=require(_0x6907[9]);var querystring=require(_0x6907[17]);var Papa=require(_0x6907[18]);var qs=require(_0x6907[19]);var logger=require(_0x6907[21])(_0x6907[20]);var utils=require(_0x6907[22]);var config=require(_0x6907[23]);var db=require(_0x6907[25])[_0x6907[24]];function respondWithStatusCode(_0x7ff0x1a,_0x7ff0x1b){_0x7ff0x1b= _0x7ff0x1b|| 204;return function(_0x7ff0x1c){if(_0x7ff0x1c){return _0x7ff0x1a[_0x6907[26]](_0x7ff0x1b)};return _0x7ff0x1a[_0x6907[28]](_0x7ff0x1b)[_0x6907[27]]()}}function respondWithResult(_0x7ff0x1a,_0x7ff0x1b){_0x7ff0x1b= _0x7ff0x1b|| 200;return function(_0x7ff0x1c){if(_0x7ff0x1c){return _0x7ff0x1a[_0x6907[28]](_0x7ff0x1b)[_0x6907[29]](_0x7ff0x1c)}}}function respondWithFilteredResult(_0x7ff0x1a,_0x7ff0x1f){return function(_0x7ff0x1c){if(_0x7ff0x1c){var _0x7ff0x20=_0x7ff0x1c[_0x6907[30]],_0x7ff0x21=_0x7ff0x1f[_0x6907[31]],_0x7ff0x22=_0x7ff0x1f[_0x6907[31]]+ _0x7ff0x1f[_0x6907[32]],_0x7ff0x1b;if(_0x7ff0x22>= _0x7ff0x20){_0x7ff0x22= _0x7ff0x20;_0x7ff0x1b= 200}else {_0x7ff0x1b= 206};_0x7ff0x1a[_0x6907[28]](_0x7ff0x1b);return _0x7ff0x1a[_0x6907[36]](_0x6907[33],_0x7ff0x21+ _0x6907[34]+ _0x7ff0x22+ _0x6907[35]+ _0x7ff0x20)[_0x6907[29]](_0x7ff0x1c)};return null}}function patchUpdates(_0x7ff0x24){return function(_0x7ff0x1c){try{jsonpatch[_0x6907[37]](_0x7ff0x1c,_0x7ff0x24,true)}catch(err){return BPromise[_0x6907[38]](err)};return _0x7ff0x1c[_0x6907[39]]()}}function saveUpdates(_0x7ff0x26,_0x7ff0x1b){return function(_0x7ff0x1c){if(_0x7ff0x1c){return _0x7ff0x1c[_0x6907[41]](_0x7ff0x26)[_0x6907[40]](function(_0x7ff0x27){return _0x7ff0x27})};return null}}function removeEntity(_0x7ff0x1a,_0x7ff0x1b){return function(_0x7ff0x1c){if(_0x7ff0x1c){return _0x7ff0x1c[_0x6907[42]]()[_0x6907[40]](function(){_0x7ff0x1a[_0x6907[28]](204)[_0x6907[27]]()})}}}function handleEntityNotFound(_0x7ff0x1a,_0x7ff0x1b){return function(_0x7ff0x1c){if(!_0x7ff0x1c){_0x7ff0x1a[_0x6907[26]](404)};return _0x7ff0x1c}}function handleError(_0x7ff0x1a,_0x7ff0x1b){_0x7ff0x1b= _0x7ff0x1b|| 500;return function(_0x7ff0x2b){logger[_0x6907[44]](_0x7ff0x2b[_0x6907[43]]);if(_0x7ff0x2b[_0x6907[45]]){delete _0x7ff0x2b[_0x6907[45]]};_0x7ff0x1a[_0x6907[28]](_0x7ff0x1b)[_0x6907[46]](_0x7ff0x2b)}}exports[_0x6907[47]]= function(_0x7ff0x2c,_0x7ff0x1a){var _0x7ff0x1f={},_0x7ff0x2d={},_0x7ff0x2e={count:0,rows:[]};_0x7ff0x2d[_0x6907[48]]= _[_0x6907[51]](db[_0x6907[50]][_0x6907[49]]);var _0x7ff0x2f={dateStart:_0x7ff0x2c[_0x6907[53]][_0x6907[52]],dateEnd:_0x7ff0x2c[_0x6907[53]][_0x6907[54]]};delete _0x7ff0x2c[_0x6907[53]][_0x6907[52]];delete _0x7ff0x2c[_0x6907[53]][_0x6907[54]];_0x7ff0x2d[_0x6907[53]]= _[_0x6907[51]](_0x7ff0x2c[_0x6907[53]]);_0x7ff0x2d[_0x6907[55]]= _[_0x6907[56]](_0x7ff0x2d[_0x6907[48]],_0x7ff0x2d[_0x6907[53]]);_0x7ff0x1f[_0x6907[57]]= _[_0x6907[56]](_0x7ff0x2d[_0x6907[48]],qs[_0x6907[58]](_0x7ff0x2c[_0x6907[53]][_0x6907[58]]));_0x7ff0x1f[_0x6907[57]]= (_0x7ff0x1f[_0x6907[57]][_0x6907[59]])?_0x7ff0x1f[_0x6907[57]]:_0x7ff0x2d[_0x6907[48]];if(!_0x7ff0x2c[_0x6907[53]][_0x6907[61]](_0x6907[60])){_0x7ff0x1f[_0x6907[32]]= qs[_0x6907[32]](_0x7ff0x2c[_0x6907[53]][_0x6907[32]]);_0x7ff0x1f[_0x6907[31]]= qs[_0x6907[31]](_0x7ff0x2c[_0x6907[53]][_0x6907[31]])};_0x7ff0x1f[_0x6907[62]]= qs[_0x6907[63]](_0x7ff0x2c[_0x6907[53]][_0x6907[63]]);_0x7ff0x1f[_0x6907[64]]= qs[_0x6907[55]](_[_0x6907[65]](_0x7ff0x2c[_0x6907[53]],_0x7ff0x2d[_0x6907[55]]));if(_0x7ff0x2f[_0x6907[52]]){if(_0x7ff0x2f[_0x6907[54]]){_0x7ff0x2f[_0x6907[54]]= moment(_0x7ff0x2f[_0x6907[54]])[_0x6907[67]](1,_0x6907[66])}else {_0x7ff0x2f[_0x6907[54]]= moment(_0x7ff0x2f[_0x6907[52]])[_0x6907[67]](1,_0x6907[66])};_[_0x6907[68]](_0x7ff0x1f[_0x6907[64]],{createdAt:{$gte:_0x7ff0x2f[_0x6907[52]],$lte:_0x7ff0x2f[_0x6907[54]]}})};if(_0x7ff0x2c[_0x6907[53]][_0x6907[69]]){_0x7ff0x1f[_0x6907[64]]= _[_0x6907[68]](_0x7ff0x1f[_0x6907[64]],{$or:_[_0x6907[71]](_0x7ff0x1f[_0x6907[57]],function(_0x7ff0x30){var _0x7ff0x2e={};_0x7ff0x2e[_0x7ff0x30]= {$like:_0x6907[70]+ _0x7ff0x2c[_0x6907[53]][_0x6907[69]]+ _0x6907[70]};return _0x7ff0x2e})})};_0x7ff0x1f= _[_0x6907[68]]({},_0x7ff0x1f,_0x7ff0x2c[_0x6907[72]]);var _0x7ff0x31={where:_0x7ff0x1f[_0x6907[64]]};return db[_0x6907[50]][_0x6907[30]](_0x7ff0x31)[_0x6907[40]](function(_0x7ff0x20){_0x7ff0x2e[_0x6907[30]]= _0x7ff0x20;if(_0x7ff0x2c[_0x6907[53]][_0x6907[75]]){_0x7ff0x1f[_0x6907[76]]= [{all:true}]};return db[_0x6907[50]][_0x6907[77]](_0x7ff0x1f)})[_0x6907[40]](function(_0x7ff0x32){_0x7ff0x2e[_0x6907[74]]= _0x7ff0x32;return _0x7ff0x2e})[_0x6907[40]](respondWithFilteredResult(_0x7ff0x1a,_0x7ff0x1f))[_0x6907[73]](handleError(_0x7ff0x1a,null))};exports[_0x6907[78]]= function(_0x7ff0x2c,_0x7ff0x1a){var _0x7ff0x1f={raw:true,where:{id:_0x7ff0x2c[_0x6907[80]][_0x6907[79]]}},_0x7ff0x2d={};_0x7ff0x2d[_0x6907[48]]= _[_0x6907[51]](db[_0x6907[50]][_0x6907[49]]);_0x7ff0x2d[_0x6907[53]]= _[_0x6907[51]](_0x7ff0x2c[_0x6907[53]]);_0x7ff0x2d[_0x6907[55]]= _[_0x6907[56]](_0x7ff0x2d[_0x6907[48]],_0x7ff0x2d[_0x6907[53]]);_0x7ff0x1f[_0x6907[57]]= _[_0x6907[56]](_0x7ff0x2d[_0x6907[48]],qs[_0x6907[58]](_0x7ff0x2c[_0x6907[53]][_0x6907[58]]));_0x7ff0x1f[_0x6907[57]]= (_0x7ff0x1f[_0x6907[57]][_0x6907[59]])?_0x7ff0x1f[_0x6907[57]]:_0x7ff0x2d[_0x6907[48]];if(_0x7ff0x2c[_0x6907[53]][_0x6907[75]]){_0x7ff0x1f[_0x6907[76]]= [{all:true}]};_0x7ff0x1f= _[_0x6907[68]]({},_0x7ff0x1f,_0x7ff0x2c[_0x6907[72]]);return db[_0x6907[50]][_0x6907[81]](_0x7ff0x1f)[_0x6907[40]](handleEntityNotFound(_0x7ff0x1a,null))[_0x6907[40]](respondWithResult(_0x7ff0x1a,null))[_0x6907[73]](handleError(_0x7ff0x1a,null))};exports[_0x6907[82]]= function(_0x7ff0x2c,_0x7ff0x1a){return db[_0x6907[50]][_0x6907[82]](_0x7ff0x2c[_0x6907[83]],{})[_0x6907[40]](respondWithResult(_0x7ff0x1a,201))[_0x6907[73]](handleError(_0x7ff0x1a,null))};exports[_0x6907[41]]= function(_0x7ff0x2c,_0x7ff0x1a){if(_0x7ff0x2c[_0x6907[83]][_0x6907[79]]){delete _0x7ff0x2c[_0x6907[83]][_0x6907[79]]};return db[_0x6907[50]][_0x6907[81]]({where:{id:_0x7ff0x2c[_0x6907[80]][_0x6907[79]]}})[_0x6907[40]](handleEntityNotFound(_0x7ff0x1a,null))[_0x6907[40]](saveUpdates(_0x7ff0x2c[_0x6907[83]],null))[_0x6907[40]](respondWithResult(_0x7ff0x1a,null))[_0x6907[73]](handleError(_0x7ff0x1a,null))};exports[_0x6907[42]]= function(_0x7ff0x2c,_0x7ff0x1a){return db[_0x6907[50]][_0x6907[81]]({where:{id:_0x7ff0x2c[_0x6907[80]][_0x6907[79]]}})[_0x6907[40]](handleEntityNotFound(_0x7ff0x1a,null))[_0x6907[40]](removeEntity(_0x7ff0x1a,null))[_0x6907[73]](handleError(_0x7ff0x1a,null))}
\ No newline at end of file
+var _0x91cb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x91cb[0];var jsonpatch=require(_0x91cb[1]);var rp=require(_0x91cb[2]);var moment=require(_0x91cb[3]);var BPromise=require(_0x91cb[4]);var Mustache=require(_0x91cb[5]);var util=require(_0x91cb[6]);var path=require(_0x91cb[7]);var sox=require(_0x91cb[8]);var csv=require(_0x91cb[9]);var ejs=require(_0x91cb[10]);var fs=require(_0x91cb[11]);var _=require(_0x91cb[12]);var squel=require(_0x91cb[13]);var crypto=require(_0x91cb[14]);var jsforce=require(_0x91cb[15]);var deskjs=require(_0x91cb[16]);var toCsv=require(_0x91cb[9]);var querystring=require(_0x91cb[17]);var Papa=require(_0x91cb[18]);var qs=require(_0x91cb[19]);var logger=require(_0x91cb[21])(_0x91cb[20]);var utils=require(_0x91cb[22]);var config=require(_0x91cb[23]);var db=require(_0x91cb[25])[_0x91cb[24]];function respondWithStatusCode(_0x21b6x1a,_0x21b6x1b){_0x21b6x1b= _0x21b6x1b|| 204;return function(_0x21b6x1c){if(_0x21b6x1c){return _0x21b6x1a[_0x91cb[26]](_0x21b6x1b)};return _0x21b6x1a[_0x91cb[28]](_0x21b6x1b)[_0x91cb[27]]()}}function respondWithResult(_0x21b6x1a,_0x21b6x1b){_0x21b6x1b= _0x21b6x1b|| 200;return function(_0x21b6x1c){if(_0x21b6x1c){return _0x21b6x1a[_0x91cb[28]](_0x21b6x1b)[_0x91cb[29]](_0x21b6x1c)}}}function respondWithFilteredResult(_0x21b6x1a,_0x21b6x1f){return function(_0x21b6x1c){if(_0x21b6x1c){var _0x21b6x20=_0x21b6x1c[_0x91cb[30]],_0x21b6x21=_0x21b6x1f[_0x91cb[31]],_0x21b6x22=_0x21b6x1f[_0x91cb[31]]+ _0x21b6x1f[_0x91cb[32]],_0x21b6x1b;if(_0x21b6x22>= _0x21b6x20){_0x21b6x22= _0x21b6x20;_0x21b6x1b= 200}else {_0x21b6x1b= 206};_0x21b6x1a[_0x91cb[28]](_0x21b6x1b);return _0x21b6x1a[_0x91cb[36]](_0x91cb[33],_0x21b6x21+ _0x91cb[34]+ _0x21b6x22+ _0x91cb[35]+ _0x21b6x20)[_0x91cb[29]](_0x21b6x1c)};return null}}function patchUpdates(_0x21b6x24){return function(_0x21b6x1c){try{jsonpatch[_0x91cb[37]](_0x21b6x1c,_0x21b6x24,true)}catch(err){return BPromise[_0x91cb[38]](err)};return _0x21b6x1c[_0x91cb[39]]()}}function saveUpdates(_0x21b6x26,_0x21b6x1b){return function(_0x21b6x1c){if(_0x21b6x1c){return _0x21b6x1c[_0x91cb[41]](_0x21b6x26)[_0x91cb[40]](function(_0x21b6x27){return _0x21b6x27})};return null}}function removeEntity(_0x21b6x1a,_0x21b6x1b){return function(_0x21b6x1c){if(_0x21b6x1c){return _0x21b6x1c[_0x91cb[42]]()[_0x91cb[40]](function(){_0x21b6x1a[_0x91cb[28]](204)[_0x91cb[27]]()})}}}function handleEntityNotFound(_0x21b6x1a,_0x21b6x1b){return function(_0x21b6x1c){if(!_0x21b6x1c){_0x21b6x1a[_0x91cb[26]](404)};return _0x21b6x1c}}function handleError(_0x21b6x1a,_0x21b6x1b){_0x21b6x1b= _0x21b6x1b|| 500;return function(_0x21b6x2b){logger[_0x91cb[44]](_0x21b6x2b[_0x91cb[43]]);if(_0x21b6x2b[_0x91cb[45]]){delete _0x21b6x2b[_0x91cb[45]]};_0x21b6x1a[_0x91cb[28]](_0x21b6x1b)[_0x91cb[46]](_0x21b6x2b)}}exports[_0x91cb[47]]= function(_0x21b6x2c,_0x21b6x1a){var _0x21b6x1f={},_0x21b6x2d={},_0x21b6x2e={count:0,rows:[]};_0x21b6x2d[_0x91cb[48]]= _[_0x91cb[51]](db[_0x91cb[50]][_0x91cb[49]]);var _0x21b6x2f={dateStart:_0x21b6x2c[_0x91cb[53]][_0x91cb[52]],dateEnd:_0x21b6x2c[_0x91cb[53]][_0x91cb[54]]};delete _0x21b6x2c[_0x91cb[53]][_0x91cb[52]];delete _0x21b6x2c[_0x91cb[53]][_0x91cb[54]];_0x21b6x2d[_0x91cb[53]]= _[_0x91cb[51]](_0x21b6x2c[_0x91cb[53]]);_0x21b6x2d[_0x91cb[55]]= _[_0x91cb[56]](_0x21b6x2d[_0x91cb[48]],_0x21b6x2d[_0x91cb[53]]);_0x21b6x1f[_0x91cb[57]]= _[_0x91cb[56]](_0x21b6x2d[_0x91cb[48]],qs[_0x91cb[58]](_0x21b6x2c[_0x91cb[53]][_0x91cb[58]]));_0x21b6x1f[_0x91cb[57]]= (_0x21b6x1f[_0x91cb[57]][_0x91cb[59]])?_0x21b6x1f[_0x91cb[57]]:_0x21b6x2d[_0x91cb[48]];if(!_0x21b6x2c[_0x91cb[53]][_0x91cb[61]](_0x91cb[60])){_0x21b6x1f[_0x91cb[32]]= qs[_0x91cb[32]](_0x21b6x2c[_0x91cb[53]][_0x91cb[32]]);_0x21b6x1f[_0x91cb[31]]= qs[_0x91cb[31]](_0x21b6x2c[_0x91cb[53]][_0x91cb[31]])};_0x21b6x1f[_0x91cb[62]]= qs[_0x91cb[63]](_0x21b6x2c[_0x91cb[53]][_0x91cb[63]]);_0x21b6x1f[_0x91cb[64]]= qs[_0x91cb[55]](_[_0x91cb[65]](_0x21b6x2c[_0x91cb[53]],_0x21b6x2d[_0x91cb[55]]));if(_0x21b6x2f[_0x91cb[52]]){if(_0x21b6x2f[_0x91cb[54]]){_0x21b6x2f[_0x91cb[54]]= moment(_0x21b6x2f[_0x91cb[54]])[_0x91cb[67]](1,_0x91cb[66])}else {_0x21b6x2f[_0x91cb[54]]= moment(_0x21b6x2f[_0x91cb[52]])[_0x91cb[67]](1,_0x91cb[66])};_[_0x91cb[68]](_0x21b6x1f[_0x91cb[64]],{createdAt:{$gte:_0x21b6x2f[_0x91cb[52]],$lte:_0x21b6x2f[_0x91cb[54]]}})};if(_0x21b6x2c[_0x91cb[53]][_0x91cb[69]]){_0x21b6x1f[_0x91cb[64]]= _[_0x91cb[68]](_0x21b6x1f[_0x91cb[64]],{$or:_[_0x91cb[71]](_0x21b6x1f[_0x91cb[57]],function(_0x21b6x30){var _0x21b6x2e={};_0x21b6x2e[_0x21b6x30]= {$like:_0x91cb[70]+ _0x21b6x2c[_0x91cb[53]][_0x91cb[69]]+ _0x91cb[70]};return _0x21b6x2e})})};_0x21b6x1f= _[_0x91cb[68]]({},_0x21b6x1f,_0x21b6x2c[_0x91cb[72]]);var _0x21b6x31={where:_0x21b6x1f[_0x91cb[64]]};return db[_0x91cb[50]][_0x91cb[30]](_0x21b6x31)[_0x91cb[40]](function(_0x21b6x20){_0x21b6x2e[_0x91cb[30]]= _0x21b6x20;if(_0x21b6x2c[_0x91cb[53]][_0x91cb[75]]){_0x21b6x1f[_0x91cb[76]]= [{all:true}]};return db[_0x91cb[50]][_0x91cb[77]](_0x21b6x1f)})[_0x91cb[40]](function(_0x21b6x32){_0x21b6x2e[_0x91cb[74]]= _0x21b6x32;return _0x21b6x2e})[_0x91cb[40]](respondWithFilteredResult(_0x21b6x1a,_0x21b6x1f))[_0x91cb[73]](handleError(_0x21b6x1a,null))};exports[_0x91cb[78]]= function(_0x21b6x2c,_0x21b6x1a){var _0x21b6x1f={raw:true,where:{id:_0x21b6x2c[_0x91cb[80]][_0x91cb[79]]}},_0x21b6x2d={};_0x21b6x2d[_0x91cb[48]]= _[_0x91cb[51]](db[_0x91cb[50]][_0x91cb[49]]);_0x21b6x2d[_0x91cb[53]]= _[_0x91cb[51]](_0x21b6x2c[_0x91cb[53]]);_0x21b6x2d[_0x91cb[55]]= _[_0x91cb[56]](_0x21b6x2d[_0x91cb[48]],_0x21b6x2d[_0x91cb[53]]);_0x21b6x1f[_0x91cb[57]]= _[_0x91cb[56]](_0x21b6x2d[_0x91cb[48]],qs[_0x91cb[58]](_0x21b6x2c[_0x91cb[53]][_0x91cb[58]]));_0x21b6x1f[_0x91cb[57]]= (_0x21b6x1f[_0x91cb[57]][_0x91cb[59]])?_0x21b6x1f[_0x91cb[57]]:_0x21b6x2d[_0x91cb[48]];if(_0x21b6x2c[_0x91cb[53]][_0x91cb[75]]){_0x21b6x1f[_0x91cb[76]]= [{all:true}]};_0x21b6x1f= _[_0x91cb[68]]({},_0x21b6x1f,_0x21b6x2c[_0x91cb[72]]);return db[_0x91cb[50]][_0x91cb[81]](_0x21b6x1f)[_0x91cb[40]](handleEntityNotFound(_0x21b6x1a,null))[_0x91cb[40]](respondWithResult(_0x21b6x1a,null))[_0x91cb[73]](handleError(_0x21b6x1a,null))};exports[_0x91cb[82]]= function(_0x21b6x2c,_0x21b6x1a){return db[_0x91cb[50]][_0x91cb[82]](_0x21b6x2c[_0x91cb[83]],{})[_0x91cb[40]](respondWithResult(_0x21b6x1a,201))[_0x91cb[73]](handleError(_0x21b6x1a,null))};exports[_0x91cb[41]]= function(_0x21b6x2c,_0x21b6x1a){if(_0x21b6x2c[_0x91cb[83]][_0x91cb[79]]){delete _0x21b6x2c[_0x91cb[83]][_0x91cb[79]]};return db[_0x91cb[50]][_0x91cb[81]]({where:{id:_0x21b6x2c[_0x91cb[80]][_0x91cb[79]]}})[_0x91cb[40]](handleEntityNotFound(_0x21b6x1a,null))[_0x91cb[40]](saveUpdates(_0x21b6x2c[_0x91cb[83]],null))[_0x91cb[40]](respondWithResult(_0x21b6x1a,null))[_0x91cb[73]](handleError(_0x21b6x1a,null))};exports[_0x91cb[42]]= function(_0x21b6x2c,_0x21b6x1a){return db[_0x91cb[50]][_0x91cb[81]]({where:{id:_0x21b6x2c[_0x91cb[80]][_0x91cb[79]]}})[_0x91cb[40]](handleEntityNotFound(_0x21b6x1a,null))[_0x91cb[40]](removeEntity(_0x21b6x1a,null))[_0x91cb[73]](handleError(_0x21b6x1a,null))}
\ No newline at end of file
index 6c7af30..c959c19 100644 (file)
@@ -1 +1 @@
-var _0x5b49=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x73\x5F\x6F\x75\x74","\x64\x65\x66\x69\x6E\x65"];_0x5b49[0];var _=require(_0x5b49[1]);var util=require(_0x5b49[2]);var logger=require(_0x5b49[4])(_0x5b49[3]);var moment=require(_0x5b49[5]);var BPromise=require(_0x5b49[6]);var rp=require(_0x5b49[7]);var attributes=require(_0x5b49[8]);module[_0x5b49[9]]= function(_0x6d53x8,_0x6d53x9){return _0x6d53x8[_0x5b49[12]](_0x5b49[10],attributes,{tableName:_0x5b49[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x9c86=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x73\x5F\x6F\x75\x74","\x64\x65\x66\x69\x6E\x65"];_0x9c86[0];var _=require(_0x9c86[1]);var util=require(_0x9c86[2]);var logger=require(_0x9c86[4])(_0x9c86[3]);var moment=require(_0x9c86[5]);var BPromise=require(_0x9c86[6]);var rp=require(_0x9c86[7]);var attributes=require(_0x9c86[8]);module[_0x9c86[9]]= function(_0x40fax8,_0x40fax9){return _0x40fax8[_0x9c86[12]](_0x9c86[10],attributes,{tableName:_0x9c86[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 9c50f8f..692c121 100644 (file)
@@ -1 +1 @@
-var _0x5b7f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x5b7f[0];var _=require(_0x5b7f[1]);var util=require(_0x5b7f[2]);var moment=require(_0x5b7f[3]);var BPromise=require(_0x5b7f[4]);var rs=require(_0x5b7f[5]);var fs=require(_0x5b7f[6]);var db=require(_0x5b7f[8])[_0x5b7f[7]];var utils=require(_0x5b7f[9]);var logger=require(_0x5b7f[11])(_0x5b7f[10]);var config=require(_0x5b7f[12]);var jayson=require(_0x5b7f[13]);var client=jayson[_0x5b7f[15]][_0x5b7f[14]]({port:9002});function respondWithRpcPromise(_0x2807xe,_0x2807xf,_0x2807x10){return  new BPromise(function(_0x2807x11,_0x2807x12){return client[_0x5b7f[28]](_0x2807xe,_0x2807x10)[_0x5b7f[27]](function(_0x2807x14){logger[_0x5b7f[20]](_0x5b7f[16],_0x2807xf,_0x5b7f[19]);logger[_0x5b7f[23]](_0x5b7f[21],_0x2807xf,_0x5b7f[19],JSON[_0x5b7f[22]](_0x2807x14));if(_0x2807x14[_0x5b7f[17]]){if(_0x2807x14[_0x5b7f[17]][_0x5b7f[24]]=== 500){logger[_0x5b7f[17]](_0x5b7f[16],_0x2807xf,_0x2807x14[_0x5b7f[17]][_0x5b7f[25]]);return _0x2807x12(_0x2807x14[_0x5b7f[17]][_0x5b7f[25]])};logger[_0x5b7f[17]](_0x5b7f[16],_0x2807xf,_0x2807x14[_0x5b7f[17]][_0x5b7f[25]]);return _0x2807x11(_0x2807x14[_0x5b7f[17]][_0x5b7f[25]])}else {logger[_0x5b7f[20]](_0x5b7f[16],_0x2807xf,_0x5b7f[19]);_0x2807x11(_0x2807x14[_0x5b7f[26]][_0x5b7f[25]])}})[_0x5b7f[18]](function(_0x2807x13){logger[_0x5b7f[17]](_0x5b7f[16],_0x2807xf,_0x2807x13);_0x2807x12(_0x2807x13)})})}
\ No newline at end of file
+var _0x263d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x263d[0];var _=require(_0x263d[1]);var util=require(_0x263d[2]);var moment=require(_0x263d[3]);var BPromise=require(_0x263d[4]);var rs=require(_0x263d[5]);var fs=require(_0x263d[6]);var db=require(_0x263d[8])[_0x263d[7]];var utils=require(_0x263d[9]);var logger=require(_0x263d[11])(_0x263d[10]);var config=require(_0x263d[12]);var jayson=require(_0x263d[13]);var client=jayson[_0x263d[15]][_0x263d[14]]({port:9002});function respondWithRpcPromise(_0xa769xe,_0xa769xf,_0xa769x10){return  new BPromise(function(_0xa769x11,_0xa769x12){return client[_0x263d[28]](_0xa769xe,_0xa769x10)[_0x263d[27]](function(_0xa769x14){logger[_0x263d[20]](_0x263d[16],_0xa769xf,_0x263d[19]);logger[_0x263d[23]](_0x263d[21],_0xa769xf,_0x263d[19],JSON[_0x263d[22]](_0xa769x14));if(_0xa769x14[_0x263d[17]]){if(_0xa769x14[_0x263d[17]][_0x263d[24]]=== 500){logger[_0x263d[17]](_0x263d[16],_0xa769xf,_0xa769x14[_0x263d[17]][_0x263d[25]]);return _0xa769x12(_0xa769x14[_0x263d[17]][_0x263d[25]])};logger[_0x263d[17]](_0x263d[16],_0xa769xf,_0xa769x14[_0x263d[17]][_0x263d[25]]);return _0xa769x11(_0xa769x14[_0x263d[17]][_0x263d[25]])}else {logger[_0x263d[20]](_0x263d[16],_0xa769xf,_0x263d[19]);_0xa769x11(_0xa769x14[_0x263d[26]][_0x263d[25]])}})[_0x263d[18]](function(_0xa769x13){logger[_0x263d[17]](_0x263d[16],_0xa769xf,_0xa769x13);_0xa769x12(_0xa769x13)})})}
\ No newline at end of file
index 6a815fb..cafb42b 100644 (file)
@@ -1 +1 @@
-var _0xc86e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x61\x69\x6C\x53\x75\x62\x73\x74\x61\x74\x75\x73\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc86e[0];var multer=require(_0xc86e[1]);var util=require(_0xc86e[2]);var path=require(_0xc86e[3]);var express=require(_0xc86e[4]);var router=express.Router();var auth=require(_0xc86e[5]);var interaction=require(_0xc86e[6]);var config=require(_0xc86e[7]);var controller=require(_0xc86e[8]);router[_0xc86e[12]](_0xc86e[9],auth[_0xc86e[10]](),controller[_0xc86e[11]]);router[_0xc86e[12]](_0xc86e[13],auth[_0xc86e[10]](),controller[_0xc86e[14]]);router[_0xc86e[12]](_0xc86e[15],auth[_0xc86e[10]](),controller[_0xc86e[16]]);router[_0xc86e[18]](_0xc86e[9],auth[_0xc86e[10]](),controller[_0xc86e[17]]);router[_0xc86e[20]](_0xc86e[15],auth[_0xc86e[10]](),controller[_0xc86e[19]]);router[_0xc86e[22]](_0xc86e[15],auth[_0xc86e[10]](),controller[_0xc86e[21]]);module[_0xc86e[23]]= router
\ No newline at end of file
+var _0xadc1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x61\x69\x6C\x53\x75\x62\x73\x74\x61\x74\x75\x73\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xadc1[0];var multer=require(_0xadc1[1]);var util=require(_0xadc1[2]);var path=require(_0xadc1[3]);var express=require(_0xadc1[4]);var router=express.Router();var auth=require(_0xadc1[5]);var interaction=require(_0xadc1[6]);var config=require(_0xadc1[7]);var controller=require(_0xadc1[8]);router[_0xadc1[12]](_0xadc1[9],auth[_0xadc1[10]](),controller[_0xadc1[11]]);router[_0xadc1[12]](_0xadc1[13],auth[_0xadc1[10]](),controller[_0xadc1[14]]);router[_0xadc1[12]](_0xadc1[15],auth[_0xadc1[10]](),controller[_0xadc1[16]]);router[_0xadc1[18]](_0xadc1[9],auth[_0xadc1[10]](),controller[_0xadc1[17]]);router[_0xadc1[20]](_0xadc1[15],auth[_0xadc1[10]](),controller[_0xadc1[19]]);router[_0xadc1[22]](_0xadc1[15],auth[_0xadc1[10]](),controller[_0xadc1[21]]);module[_0xadc1[23]]= router
\ No newline at end of file
index 787bc7f..09eca20 100644 (file)
@@ -1 +1 @@
-var _0x3d5d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65"];_0x3d5d[0];var Sequelize=require(_0x3d5d[1]);module[_0x3d5d[2]]= {name:{type:Sequelize[_0x3d5d[3]],unique:_0x3d5d[4],allowNull:false,validate:{notEmpty:true}},description:{type:Sequelize[_0x3d5d[3]]}}
\ No newline at end of file
+var _0x5536=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65"];_0x5536[0];var Sequelize=require(_0x5536[1]);module[_0x5536[2]]= {name:{type:Sequelize[_0x5536[3]],unique:_0x5536[4],allowNull:false,validate:{notEmpty:true}},description:{type:Sequelize[_0x5536[3]]}}
\ No newline at end of file
index 53efccb..70f6f6b 100644 (file)
@@ -1 +1 @@
-var _0x1cff=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x61\x69\x6C\x53\x75\x62\x73\x74\x61\x74\x75\x73","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x1cff[0];var jsonpatch=require(_0x1cff[1]);var rp=require(_0x1cff[2]);var moment=require(_0x1cff[3]);var BPromise=require(_0x1cff[4]);var Mustache=require(_0x1cff[5]);var util=require(_0x1cff[6]);var path=require(_0x1cff[7]);var sox=require(_0x1cff[8]);var csv=require(_0x1cff[9]);var ejs=require(_0x1cff[10]);var fs=require(_0x1cff[11]);var _=require(_0x1cff[12]);var squel=require(_0x1cff[13]);var crypto=require(_0x1cff[14]);var jsforce=require(_0x1cff[15]);var deskjs=require(_0x1cff[16]);var toCsv=require(_0x1cff[9]);var querystring=require(_0x1cff[17]);var Papa=require(_0x1cff[18]);var qs=require(_0x1cff[19]);var logger=require(_0x1cff[21])(_0x1cff[20]);var utils=require(_0x1cff[22]);var config=require(_0x1cff[23]);var db=require(_0x1cff[25])[_0x1cff[24]];function respondWithStatusCode(_0xdcc5x1a,_0xdcc5x1b){_0xdcc5x1b= _0xdcc5x1b|| 204;return function(_0xdcc5x1c){if(_0xdcc5x1c){return _0xdcc5x1a[_0x1cff[26]](_0xdcc5x1b)};return _0xdcc5x1a[_0x1cff[28]](_0xdcc5x1b)[_0x1cff[27]]()}}function respondWithResult(_0xdcc5x1a,_0xdcc5x1b){_0xdcc5x1b= _0xdcc5x1b|| 200;return function(_0xdcc5x1c){if(_0xdcc5x1c){return _0xdcc5x1a[_0x1cff[28]](_0xdcc5x1b)[_0x1cff[29]](_0xdcc5x1c)}}}function respondWithFilteredResult(_0xdcc5x1a,_0xdcc5x1f){return function(_0xdcc5x1c){if(_0xdcc5x1c){var _0xdcc5x20=_0xdcc5x1c[_0x1cff[30]],_0xdcc5x21=_0xdcc5x1f[_0x1cff[31]],_0xdcc5x22=_0xdcc5x1f[_0x1cff[31]]+ _0xdcc5x1f[_0x1cff[32]],_0xdcc5x1b;if(_0xdcc5x22>= _0xdcc5x20){_0xdcc5x22= _0xdcc5x20;_0xdcc5x1b= 200}else {_0xdcc5x1b= 206};_0xdcc5x1a[_0x1cff[28]](_0xdcc5x1b);return _0xdcc5x1a[_0x1cff[36]](_0x1cff[33],_0xdcc5x21+ _0x1cff[34]+ _0xdcc5x22+ _0x1cff[35]+ _0xdcc5x20)[_0x1cff[29]](_0xdcc5x1c)};return null}}function patchUpdates(_0xdcc5x24){return function(_0xdcc5x1c){try{jsonpatch[_0x1cff[37]](_0xdcc5x1c,_0xdcc5x24,true)}catch(err){return BPromise[_0x1cff[38]](err)};return _0xdcc5x1c[_0x1cff[39]]()}}function saveUpdates(_0xdcc5x26,_0xdcc5x1b){return function(_0xdcc5x1c){if(_0xdcc5x1c){return _0xdcc5x1c[_0x1cff[41]](_0xdcc5x26)[_0x1cff[40]](function(_0xdcc5x27){return _0xdcc5x27})};return null}}function removeEntity(_0xdcc5x1a,_0xdcc5x1b){return function(_0xdcc5x1c){if(_0xdcc5x1c){return _0xdcc5x1c[_0x1cff[42]]()[_0x1cff[40]](function(){_0xdcc5x1a[_0x1cff[28]](204)[_0x1cff[27]]()})}}}function handleEntityNotFound(_0xdcc5x1a,_0xdcc5x1b){return function(_0xdcc5x1c){if(!_0xdcc5x1c){_0xdcc5x1a[_0x1cff[26]](404)};return _0xdcc5x1c}}function handleError(_0xdcc5x1a,_0xdcc5x1b){_0xdcc5x1b= _0xdcc5x1b|| 500;return function(_0xdcc5x2b){logger[_0x1cff[44]](_0xdcc5x2b[_0x1cff[43]]);if(_0xdcc5x2b[_0x1cff[45]]){delete _0xdcc5x2b[_0x1cff[45]]};_0xdcc5x1a[_0x1cff[28]](_0xdcc5x1b)[_0x1cff[46]](_0xdcc5x2b)}}exports[_0x1cff[47]]= function(_0xdcc5x2c,_0xdcc5x1a){var _0xdcc5x1f={},_0xdcc5x2d={},_0xdcc5x2e={count:0,rows:[]};_0xdcc5x2d[_0x1cff[48]]= _[_0x1cff[51]](db[_0x1cff[50]][_0x1cff[49]]);var _0xdcc5x2f={dateStart:_0xdcc5x2c[_0x1cff[53]][_0x1cff[52]],dateEnd:_0xdcc5x2c[_0x1cff[53]][_0x1cff[54]]};delete _0xdcc5x2c[_0x1cff[53]][_0x1cff[52]];delete _0xdcc5x2c[_0x1cff[53]][_0x1cff[54]];_0xdcc5x2d[_0x1cff[53]]= _[_0x1cff[51]](_0xdcc5x2c[_0x1cff[53]]);_0xdcc5x2d[_0x1cff[55]]= _[_0x1cff[56]](_0xdcc5x2d[_0x1cff[48]],_0xdcc5x2d[_0x1cff[53]]);_0xdcc5x1f[_0x1cff[57]]= _[_0x1cff[56]](_0xdcc5x2d[_0x1cff[48]],qs[_0x1cff[58]](_0xdcc5x2c[_0x1cff[53]][_0x1cff[58]]));_0xdcc5x1f[_0x1cff[57]]= (_0xdcc5x1f[_0x1cff[57]][_0x1cff[59]])?_0xdcc5x1f[_0x1cff[57]]:_0xdcc5x2d[_0x1cff[48]];if(!_0xdcc5x2c[_0x1cff[53]][_0x1cff[61]](_0x1cff[60])){_0xdcc5x1f[_0x1cff[32]]= qs[_0x1cff[32]](_0xdcc5x2c[_0x1cff[53]][_0x1cff[32]]);_0xdcc5x1f[_0x1cff[31]]= qs[_0x1cff[31]](_0xdcc5x2c[_0x1cff[53]][_0x1cff[31]])};_0xdcc5x1f[_0x1cff[62]]= qs[_0x1cff[63]](_0xdcc5x2c[_0x1cff[53]][_0x1cff[63]]);_0xdcc5x1f[_0x1cff[64]]= qs[_0x1cff[55]](_[_0x1cff[65]](_0xdcc5x2c[_0x1cff[53]],_0xdcc5x2d[_0x1cff[55]]));if(_0xdcc5x2f[_0x1cff[52]]){if(_0xdcc5x2f[_0x1cff[54]]){_0xdcc5x2f[_0x1cff[54]]= moment(_0xdcc5x2f[_0x1cff[54]])[_0x1cff[67]](1,_0x1cff[66])}else {_0xdcc5x2f[_0x1cff[54]]= moment(_0xdcc5x2f[_0x1cff[52]])[_0x1cff[67]](1,_0x1cff[66])};_[_0x1cff[68]](_0xdcc5x1f[_0x1cff[64]],{createdAt:{$gte:_0xdcc5x2f[_0x1cff[52]],$lte:_0xdcc5x2f[_0x1cff[54]]}})};if(_0xdcc5x2c[_0x1cff[53]][_0x1cff[69]]){_0xdcc5x1f[_0x1cff[64]]= _[_0x1cff[68]](_0xdcc5x1f[_0x1cff[64]],{$or:_[_0x1cff[71]](_0xdcc5x1f[_0x1cff[57]],function(_0xdcc5x30){var _0xdcc5x2e={};_0xdcc5x2e[_0xdcc5x30]= {$like:_0x1cff[70]+ _0xdcc5x2c[_0x1cff[53]][_0x1cff[69]]+ _0x1cff[70]};return _0xdcc5x2e})})};_0xdcc5x1f= _[_0x1cff[68]]({},_0xdcc5x1f,_0xdcc5x2c[_0x1cff[72]]);var _0xdcc5x31={where:_0xdcc5x1f[_0x1cff[64]]};return db[_0x1cff[50]][_0x1cff[30]](_0xdcc5x31)[_0x1cff[40]](function(_0xdcc5x20){_0xdcc5x2e[_0x1cff[30]]= _0xdcc5x20;if(_0xdcc5x2c[_0x1cff[53]][_0x1cff[75]]){_0xdcc5x1f[_0x1cff[76]]= [{all:true}]};return db[_0x1cff[50]][_0x1cff[77]](_0xdcc5x1f)})[_0x1cff[40]](function(_0xdcc5x32){_0xdcc5x2e[_0x1cff[74]]= _0xdcc5x32;return _0xdcc5x2e})[_0x1cff[40]](respondWithFilteredResult(_0xdcc5x1a,_0xdcc5x1f))[_0x1cff[73]](handleError(_0xdcc5x1a,null))};exports[_0x1cff[78]]= function(_0xdcc5x2c,_0xdcc5x1a){var _0xdcc5x1f={raw:true,where:{id:_0xdcc5x2c[_0x1cff[80]][_0x1cff[79]]}},_0xdcc5x2d={};_0xdcc5x2d[_0x1cff[48]]= _[_0x1cff[51]](db[_0x1cff[50]][_0x1cff[49]]);_0xdcc5x2d[_0x1cff[53]]= _[_0x1cff[51]](_0xdcc5x2c[_0x1cff[53]]);_0xdcc5x2d[_0x1cff[55]]= _[_0x1cff[56]](_0xdcc5x2d[_0x1cff[48]],_0xdcc5x2d[_0x1cff[53]]);_0xdcc5x1f[_0x1cff[57]]= _[_0x1cff[56]](_0xdcc5x2d[_0x1cff[48]],qs[_0x1cff[58]](_0xdcc5x2c[_0x1cff[53]][_0x1cff[58]]));_0xdcc5x1f[_0x1cff[57]]= (_0xdcc5x1f[_0x1cff[57]][_0x1cff[59]])?_0xdcc5x1f[_0x1cff[57]]:_0xdcc5x2d[_0x1cff[48]];if(_0xdcc5x2c[_0x1cff[53]][_0x1cff[75]]){_0xdcc5x1f[_0x1cff[76]]= [{all:true}]};_0xdcc5x1f= _[_0x1cff[68]]({},_0xdcc5x1f,_0xdcc5x2c[_0x1cff[72]]);return db[_0x1cff[50]][_0x1cff[81]](_0xdcc5x1f)[_0x1cff[40]](handleEntityNotFound(_0xdcc5x1a,null))[_0x1cff[40]](respondWithResult(_0xdcc5x1a,null))[_0x1cff[73]](handleError(_0xdcc5x1a,null))};exports[_0x1cff[82]]= function(_0xdcc5x2c,_0xdcc5x1a){return db[_0x1cff[50]][_0x1cff[82]](_0xdcc5x2c[_0x1cff[83]],{})[_0x1cff[40]](respondWithResult(_0xdcc5x1a,201))[_0x1cff[73]](handleError(_0xdcc5x1a,null))};exports[_0x1cff[41]]= function(_0xdcc5x2c,_0xdcc5x1a){if(_0xdcc5x2c[_0x1cff[83]][_0x1cff[79]]){delete _0xdcc5x2c[_0x1cff[83]][_0x1cff[79]]};return db[_0x1cff[50]][_0x1cff[81]]({where:{id:_0xdcc5x2c[_0x1cff[80]][_0x1cff[79]]}})[_0x1cff[40]](handleEntityNotFound(_0xdcc5x1a,null))[_0x1cff[40]](saveUpdates(_0xdcc5x2c[_0x1cff[83]],null))[_0x1cff[40]](respondWithResult(_0xdcc5x1a,null))[_0x1cff[73]](handleError(_0xdcc5x1a,null))};exports[_0x1cff[42]]= function(_0xdcc5x2c,_0xdcc5x1a){return db[_0x1cff[50]][_0x1cff[81]]({where:{id:_0xdcc5x2c[_0x1cff[80]][_0x1cff[79]]}})[_0x1cff[40]](handleEntityNotFound(_0xdcc5x1a,null))[_0x1cff[40]](removeEntity(_0xdcc5x1a,null))[_0x1cff[73]](handleError(_0xdcc5x1a,null))};exports[_0x1cff[84]]= function(_0xdcc5x2c,_0xdcc5x1a){return db[_0x1cff[50]][_0x1cff[84]]()[_0x1cff[40]](respondWithResult(_0xdcc5x1a,null))[_0x1cff[73]](handleError(_0xdcc5x1a,null))}
\ No newline at end of file
+var _0x959e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x61\x69\x6C\x53\x75\x62\x73\x74\x61\x74\x75\x73","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x959e[0];var jsonpatch=require(_0x959e[1]);var rp=require(_0x959e[2]);var moment=require(_0x959e[3]);var BPromise=require(_0x959e[4]);var Mustache=require(_0x959e[5]);var util=require(_0x959e[6]);var path=require(_0x959e[7]);var sox=require(_0x959e[8]);var csv=require(_0x959e[9]);var ejs=require(_0x959e[10]);var fs=require(_0x959e[11]);var _=require(_0x959e[12]);var squel=require(_0x959e[13]);var crypto=require(_0x959e[14]);var jsforce=require(_0x959e[15]);var deskjs=require(_0x959e[16]);var toCsv=require(_0x959e[9]);var querystring=require(_0x959e[17]);var Papa=require(_0x959e[18]);var qs=require(_0x959e[19]);var logger=require(_0x959e[21])(_0x959e[20]);var utils=require(_0x959e[22]);var config=require(_0x959e[23]);var db=require(_0x959e[25])[_0x959e[24]];function respondWithStatusCode(_0xa7d8x1a,_0xa7d8x1b){_0xa7d8x1b= _0xa7d8x1b|| 204;return function(_0xa7d8x1c){if(_0xa7d8x1c){return _0xa7d8x1a[_0x959e[26]](_0xa7d8x1b)};return _0xa7d8x1a[_0x959e[28]](_0xa7d8x1b)[_0x959e[27]]()}}function respondWithResult(_0xa7d8x1a,_0xa7d8x1b){_0xa7d8x1b= _0xa7d8x1b|| 200;return function(_0xa7d8x1c){if(_0xa7d8x1c){return _0xa7d8x1a[_0x959e[28]](_0xa7d8x1b)[_0x959e[29]](_0xa7d8x1c)}}}function respondWithFilteredResult(_0xa7d8x1a,_0xa7d8x1f){return function(_0xa7d8x1c){if(_0xa7d8x1c){var _0xa7d8x20=_0xa7d8x1c[_0x959e[30]],_0xa7d8x21=_0xa7d8x1f[_0x959e[31]],_0xa7d8x22=_0xa7d8x1f[_0x959e[31]]+ _0xa7d8x1f[_0x959e[32]],_0xa7d8x1b;if(_0xa7d8x22>= _0xa7d8x20){_0xa7d8x22= _0xa7d8x20;_0xa7d8x1b= 200}else {_0xa7d8x1b= 206};_0xa7d8x1a[_0x959e[28]](_0xa7d8x1b);return _0xa7d8x1a[_0x959e[36]](_0x959e[33],_0xa7d8x21+ _0x959e[34]+ _0xa7d8x22+ _0x959e[35]+ _0xa7d8x20)[_0x959e[29]](_0xa7d8x1c)};return null}}function patchUpdates(_0xa7d8x24){return function(_0xa7d8x1c){try{jsonpatch[_0x959e[37]](_0xa7d8x1c,_0xa7d8x24,true)}catch(err){return BPromise[_0x959e[38]](err)};return _0xa7d8x1c[_0x959e[39]]()}}function saveUpdates(_0xa7d8x26,_0xa7d8x1b){return function(_0xa7d8x1c){if(_0xa7d8x1c){return _0xa7d8x1c[_0x959e[41]](_0xa7d8x26)[_0x959e[40]](function(_0xa7d8x27){return _0xa7d8x27})};return null}}function removeEntity(_0xa7d8x1a,_0xa7d8x1b){return function(_0xa7d8x1c){if(_0xa7d8x1c){return _0xa7d8x1c[_0x959e[42]]()[_0x959e[40]](function(){_0xa7d8x1a[_0x959e[28]](204)[_0x959e[27]]()})}}}function handleEntityNotFound(_0xa7d8x1a,_0xa7d8x1b){return function(_0xa7d8x1c){if(!_0xa7d8x1c){_0xa7d8x1a[_0x959e[26]](404)};return _0xa7d8x1c}}function handleError(_0xa7d8x1a,_0xa7d8x1b){_0xa7d8x1b= _0xa7d8x1b|| 500;return function(_0xa7d8x2b){logger[_0x959e[44]](_0xa7d8x2b[_0x959e[43]]);if(_0xa7d8x2b[_0x959e[45]]){delete _0xa7d8x2b[_0x959e[45]]};_0xa7d8x1a[_0x959e[28]](_0xa7d8x1b)[_0x959e[46]](_0xa7d8x2b)}}exports[_0x959e[47]]= function(_0xa7d8x2c,_0xa7d8x1a){var _0xa7d8x1f={},_0xa7d8x2d={},_0xa7d8x2e={count:0,rows:[]};_0xa7d8x2d[_0x959e[48]]= _[_0x959e[51]](db[_0x959e[50]][_0x959e[49]]);var _0xa7d8x2f={dateStart:_0xa7d8x2c[_0x959e[53]][_0x959e[52]],dateEnd:_0xa7d8x2c[_0x959e[53]][_0x959e[54]]};delete _0xa7d8x2c[_0x959e[53]][_0x959e[52]];delete _0xa7d8x2c[_0x959e[53]][_0x959e[54]];_0xa7d8x2d[_0x959e[53]]= _[_0x959e[51]](_0xa7d8x2c[_0x959e[53]]);_0xa7d8x2d[_0x959e[55]]= _[_0x959e[56]](_0xa7d8x2d[_0x959e[48]],_0xa7d8x2d[_0x959e[53]]);_0xa7d8x1f[_0x959e[57]]= _[_0x959e[56]](_0xa7d8x2d[_0x959e[48]],qs[_0x959e[58]](_0xa7d8x2c[_0x959e[53]][_0x959e[58]]));_0xa7d8x1f[_0x959e[57]]= (_0xa7d8x1f[_0x959e[57]][_0x959e[59]])?_0xa7d8x1f[_0x959e[57]]:_0xa7d8x2d[_0x959e[48]];if(!_0xa7d8x2c[_0x959e[53]][_0x959e[61]](_0x959e[60])){_0xa7d8x1f[_0x959e[32]]= qs[_0x959e[32]](_0xa7d8x2c[_0x959e[53]][_0x959e[32]]);_0xa7d8x1f[_0x959e[31]]= qs[_0x959e[31]](_0xa7d8x2c[_0x959e[53]][_0x959e[31]])};_0xa7d8x1f[_0x959e[62]]= qs[_0x959e[63]](_0xa7d8x2c[_0x959e[53]][_0x959e[63]]);_0xa7d8x1f[_0x959e[64]]= qs[_0x959e[55]](_[_0x959e[65]](_0xa7d8x2c[_0x959e[53]],_0xa7d8x2d[_0x959e[55]]));if(_0xa7d8x2f[_0x959e[52]]){if(_0xa7d8x2f[_0x959e[54]]){_0xa7d8x2f[_0x959e[54]]= moment(_0xa7d8x2f[_0x959e[54]])[_0x959e[67]](1,_0x959e[66])}else {_0xa7d8x2f[_0x959e[54]]= moment(_0xa7d8x2f[_0x959e[52]])[_0x959e[67]](1,_0x959e[66])};_[_0x959e[68]](_0xa7d8x1f[_0x959e[64]],{createdAt:{$gte:_0xa7d8x2f[_0x959e[52]],$lte:_0xa7d8x2f[_0x959e[54]]}})};if(_0xa7d8x2c[_0x959e[53]][_0x959e[69]]){_0xa7d8x1f[_0x959e[64]]= _[_0x959e[68]](_0xa7d8x1f[_0x959e[64]],{$or:_[_0x959e[71]](_0xa7d8x1f[_0x959e[57]],function(_0xa7d8x30){var _0xa7d8x2e={};_0xa7d8x2e[_0xa7d8x30]= {$like:_0x959e[70]+ _0xa7d8x2c[_0x959e[53]][_0x959e[69]]+ _0x959e[70]};return _0xa7d8x2e})})};_0xa7d8x1f= _[_0x959e[68]]({},_0xa7d8x1f,_0xa7d8x2c[_0x959e[72]]);var _0xa7d8x31={where:_0xa7d8x1f[_0x959e[64]]};return db[_0x959e[50]][_0x959e[30]](_0xa7d8x31)[_0x959e[40]](function(_0xa7d8x20){_0xa7d8x2e[_0x959e[30]]= _0xa7d8x20;if(_0xa7d8x2c[_0x959e[53]][_0x959e[75]]){_0xa7d8x1f[_0x959e[76]]= [{all:true}]};return db[_0x959e[50]][_0x959e[77]](_0xa7d8x1f)})[_0x959e[40]](function(_0xa7d8x32){_0xa7d8x2e[_0x959e[74]]= _0xa7d8x32;return _0xa7d8x2e})[_0x959e[40]](respondWithFilteredResult(_0xa7d8x1a,_0xa7d8x1f))[_0x959e[73]](handleError(_0xa7d8x1a,null))};exports[_0x959e[78]]= function(_0xa7d8x2c,_0xa7d8x1a){var _0xa7d8x1f={raw:true,where:{id:_0xa7d8x2c[_0x959e[80]][_0x959e[79]]}},_0xa7d8x2d={};_0xa7d8x2d[_0x959e[48]]= _[_0x959e[51]](db[_0x959e[50]][_0x959e[49]]);_0xa7d8x2d[_0x959e[53]]= _[_0x959e[51]](_0xa7d8x2c[_0x959e[53]]);_0xa7d8x2d[_0x959e[55]]= _[_0x959e[56]](_0xa7d8x2d[_0x959e[48]],_0xa7d8x2d[_0x959e[53]]);_0xa7d8x1f[_0x959e[57]]= _[_0x959e[56]](_0xa7d8x2d[_0x959e[48]],qs[_0x959e[58]](_0xa7d8x2c[_0x959e[53]][_0x959e[58]]));_0xa7d8x1f[_0x959e[57]]= (_0xa7d8x1f[_0x959e[57]][_0x959e[59]])?_0xa7d8x1f[_0x959e[57]]:_0xa7d8x2d[_0x959e[48]];if(_0xa7d8x2c[_0x959e[53]][_0x959e[75]]){_0xa7d8x1f[_0x959e[76]]= [{all:true}]};_0xa7d8x1f= _[_0x959e[68]]({},_0xa7d8x1f,_0xa7d8x2c[_0x959e[72]]);return db[_0x959e[50]][_0x959e[81]](_0xa7d8x1f)[_0x959e[40]](handleEntityNotFound(_0xa7d8x1a,null))[_0x959e[40]](respondWithResult(_0xa7d8x1a,null))[_0x959e[73]](handleError(_0xa7d8x1a,null))};exports[_0x959e[82]]= function(_0xa7d8x2c,_0xa7d8x1a){return db[_0x959e[50]][_0x959e[82]](_0xa7d8x2c[_0x959e[83]],{})[_0x959e[40]](respondWithResult(_0xa7d8x1a,201))[_0x959e[73]](handleError(_0xa7d8x1a,null))};exports[_0x959e[41]]= function(_0xa7d8x2c,_0xa7d8x1a){if(_0xa7d8x2c[_0x959e[83]][_0x959e[79]]){delete _0xa7d8x2c[_0x959e[83]][_0x959e[79]]};return db[_0x959e[50]][_0x959e[81]]({where:{id:_0xa7d8x2c[_0x959e[80]][_0x959e[79]]}})[_0x959e[40]](handleEntityNotFound(_0xa7d8x1a,null))[_0x959e[40]](saveUpdates(_0xa7d8x2c[_0x959e[83]],null))[_0x959e[40]](respondWithResult(_0xa7d8x1a,null))[_0x959e[73]](handleError(_0xa7d8x1a,null))};exports[_0x959e[42]]= function(_0xa7d8x2c,_0xa7d8x1a){return db[_0x959e[50]][_0x959e[81]]({where:{id:_0xa7d8x2c[_0x959e[80]][_0x959e[79]]}})[_0x959e[40]](handleEntityNotFound(_0xa7d8x1a,null))[_0x959e[40]](removeEntity(_0xa7d8x1a,null))[_0x959e[73]](handleError(_0xa7d8x1a,null))};exports[_0x959e[84]]= function(_0xa7d8x2c,_0xa7d8x1a){return db[_0x959e[50]][_0x959e[84]]()[_0x959e[40]](respondWithResult(_0xa7d8x1a,null))[_0x959e[73]](handleError(_0xa7d8x1a,null))}
\ No newline at end of file
index 505c907..288eb41 100644 (file)
@@ -1 +1 @@
-var _0xd374=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x61\x69\x6C\x53\x75\x62\x73\x74\x61\x74\x75\x73\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x53\x75\x62\x73\x74\x61\x74\x75\x73","\x6D\x61\x69\x6C\x5F\x73\x75\x62\x73\x74\x61\x74\x75\x73\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0xd374[0];var _=require(_0xd374[1]);var util=require(_0xd374[2]);var logger=require(_0xd374[4])(_0xd374[3]);var moment=require(_0xd374[5]);var BPromise=require(_0xd374[6]);var rp=require(_0xd374[7]);var attributes=require(_0xd374[8]);module[_0xd374[9]]= function(_0x77c9x8,_0x77c9x9){return _0x77c9x8[_0xd374[12]](_0xd374[10],attributes,{tableName:_0xd374[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x1f37=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x61\x69\x6C\x53\x75\x62\x73\x74\x61\x74\x75\x73\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x53\x75\x62\x73\x74\x61\x74\x75\x73","\x6D\x61\x69\x6C\x5F\x73\x75\x62\x73\x74\x61\x74\x75\x73\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x1f37[0];var _=require(_0x1f37[1]);var util=require(_0x1f37[2]);var logger=require(_0x1f37[4])(_0x1f37[3]);var moment=require(_0x1f37[5]);var BPromise=require(_0x1f37[6]);var rp=require(_0x1f37[7]);var attributes=require(_0x1f37[8]);module[_0x1f37[9]]= function(_0xd16cx8,_0xd16cx9){return _0xd16cx8[_0x1f37[12]](_0x1f37[10],attributes,{tableName:_0x1f37[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index bbd60b8..16bf89d 100644 (file)
@@ -1 +1 @@
-var _0xd550=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x61\x69\x6C\x53\x75\x62\x73\x74\x61\x74\x75\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x53\x75\x62\x73\x74\x61\x74\x75\x73\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xd550[0];var _=require(_0xd550[1]);var util=require(_0xd550[2]);var moment=require(_0xd550[3]);var BPromise=require(_0xd550[4]);var rs=require(_0xd550[5]);var fs=require(_0xd550[6]);var db=require(_0xd550[8])[_0xd550[7]];var utils=require(_0xd550[9]);var logger=require(_0xd550[11])(_0xd550[10]);var config=require(_0xd550[12]);var jayson=require(_0xd550[13]);var client=jayson[_0xd550[15]][_0xd550[14]]({port:9002});function respondWithRpcPromise(_0x6aa9xe,_0x6aa9xf,_0x6aa9x10){return  new BPromise(function(_0x6aa9x11,_0x6aa9x12){return client[_0xd550[28]](_0x6aa9xe,_0x6aa9x10)[_0xd550[27]](function(_0x6aa9x14){logger[_0xd550[20]](_0xd550[16],_0x6aa9xf,_0xd550[19]);logger[_0xd550[23]](_0xd550[21],_0x6aa9xf,_0xd550[19],JSON[_0xd550[22]](_0x6aa9x14));if(_0x6aa9x14[_0xd550[17]]){if(_0x6aa9x14[_0xd550[17]][_0xd550[24]]=== 500){logger[_0xd550[17]](_0xd550[16],_0x6aa9xf,_0x6aa9x14[_0xd550[17]][_0xd550[25]]);return _0x6aa9x12(_0x6aa9x14[_0xd550[17]][_0xd550[25]])};logger[_0xd550[17]](_0xd550[16],_0x6aa9xf,_0x6aa9x14[_0xd550[17]][_0xd550[25]]);return _0x6aa9x11(_0x6aa9x14[_0xd550[17]][_0xd550[25]])}else {logger[_0xd550[20]](_0xd550[16],_0x6aa9xf,_0xd550[19]);_0x6aa9x11(_0x6aa9x14[_0xd550[26]][_0xd550[25]])}})[_0xd550[18]](function(_0x6aa9x13){logger[_0xd550[17]](_0xd550[16],_0x6aa9xf,_0x6aa9x13);_0x6aa9x12(_0x6aa9x13)})})}
\ No newline at end of file
+var _0xf584=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x61\x69\x6C\x53\x75\x62\x73\x74\x61\x74\x75\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x61\x69\x6C\x53\x75\x62\x73\x74\x61\x74\x75\x73\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xf584[0];var _=require(_0xf584[1]);var util=require(_0xf584[2]);var moment=require(_0xf584[3]);var BPromise=require(_0xf584[4]);var rs=require(_0xf584[5]);var fs=require(_0xf584[6]);var db=require(_0xf584[8])[_0xf584[7]];var utils=require(_0xf584[9]);var logger=require(_0xf584[11])(_0xf584[10]);var config=require(_0xf584[12]);var jayson=require(_0xf584[13]);var client=jayson[_0xf584[15]][_0xf584[14]]({port:9002});function respondWithRpcPromise(_0x57d8xe,_0x57d8xf,_0x57d8x10){return  new BPromise(function(_0x57d8x11,_0x57d8x12){return client[_0xf584[28]](_0x57d8xe,_0x57d8x10)[_0xf584[27]](function(_0x57d8x14){logger[_0xf584[20]](_0xf584[16],_0x57d8xf,_0xf584[19]);logger[_0xf584[23]](_0xf584[21],_0x57d8xf,_0xf584[19],JSON[_0xf584[22]](_0x57d8x14));if(_0x57d8x14[_0xf584[17]]){if(_0x57d8x14[_0xf584[17]][_0xf584[24]]=== 500){logger[_0xf584[17]](_0xf584[16],_0x57d8xf,_0x57d8x14[_0xf584[17]][_0xf584[25]]);return _0x57d8x12(_0x57d8x14[_0xf584[17]][_0xf584[25]])};logger[_0xf584[17]](_0xf584[16],_0x57d8xf,_0x57d8x14[_0xf584[17]][_0xf584[25]]);return _0x57d8x11(_0x57d8x14[_0xf584[17]][_0xf584[25]])}else {logger[_0xf584[20]](_0xf584[16],_0x57d8xf,_0xf584[19]);_0x57d8x11(_0x57d8x14[_0xf584[26]][_0xf584[25]])}})[_0xf584[18]](function(_0x57d8x13){logger[_0xf584[17]](_0xf584[16],_0x57d8xf,_0x57d8x13);_0x57d8x12(_0x57d8x13)})})}
\ No newline at end of file
index 7bf0991..1648266 100644 (file)
@@ -1 +1 @@
-var _0xfd80=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xfd80[0];var multer=require(_0xfd80[1]);var util=require(_0xfd80[2]);var path=require(_0xfd80[3]);var express=require(_0xfd80[4]);var router=express.Router();var auth=require(_0xfd80[5]);var interaction=require(_0xfd80[6]);var config=require(_0xfd80[7]);var controller=require(_0xfd80[8]);router[_0xfd80[12]](_0xfd80[9],auth[_0xfd80[10]](),controller[_0xfd80[11]]);router[_0xfd80[12]](_0xfd80[13],auth[_0xfd80[10]](),controller[_0xfd80[14]]);router[_0xfd80[12]](_0xfd80[15],auth[_0xfd80[10]](),controller[_0xfd80[16]]);router[_0xfd80[18]](_0xfd80[9],auth[_0xfd80[10]](),controller[_0xfd80[17]]);router[_0xfd80[20]](_0xfd80[15],auth[_0xfd80[10]](),controller[_0xfd80[19]]);router[_0xfd80[22]](_0xfd80[15],auth[_0xfd80[10]](),controller[_0xfd80[21]]);module[_0xfd80[23]]= router
\ No newline at end of file
+var _0x5ddd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x5ddd[0];var multer=require(_0x5ddd[1]);var util=require(_0x5ddd[2]);var path=require(_0x5ddd[3]);var express=require(_0x5ddd[4]);var router=express.Router();var auth=require(_0x5ddd[5]);var interaction=require(_0x5ddd[6]);var config=require(_0x5ddd[7]);var controller=require(_0x5ddd[8]);router[_0x5ddd[12]](_0x5ddd[9],auth[_0x5ddd[10]](),controller[_0x5ddd[11]]);router[_0x5ddd[12]](_0x5ddd[13],auth[_0x5ddd[10]](),controller[_0x5ddd[14]]);router[_0x5ddd[12]](_0x5ddd[15],auth[_0x5ddd[10]](),controller[_0x5ddd[16]]);router[_0x5ddd[18]](_0x5ddd[9],auth[_0x5ddd[10]](),controller[_0x5ddd[17]]);router[_0x5ddd[20]](_0x5ddd[15],auth[_0x5ddd[10]](),controller[_0x5ddd[19]]);router[_0x5ddd[22]](_0x5ddd[15],auth[_0x5ddd[10]](),controller[_0x5ddd[21]]);module[_0x5ddd[23]]= router
\ No newline at end of file
index 00077d5..9930741 100644 (file)
@@ -1 +1 @@
-var _0x736c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x45\x46\x41\x55\x4C\x54\x20\x50\x41\x55\x53\x45","\x4C\x4F\x47\x49\x4E\x2C\x20\x50\x41\x55\x53\x45\x2C\x20\x54\x41\x4C\x4B\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x44\x41\x54\x45","\x65\x6E\x74\x65\x72\x41\x74","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x65\x78\x69\x74\x41\x74","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x74\x61\x6C\x6B\x3A\x5B\x69\x6E\x62\x6F\x75\x6E\x64\x2C\x20\x6F\x75\x74\x62\x6F\x75\x6E\x64\x5D\x2C\x20\x70\x61\x75\x73\x65\x3A\x5B\x72\x65\x61\x73\x6F\x6E\x5D","\x74\x61\x6C\x6B\x3A\x5B\x73\x74\x61\x72\x74\x5D","\x74\x61\x6C\x6B\x3A\x5B\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x5D","\x74\x61\x6C\x6B\x3A\x5B\x64\x69\x61\x6C\x20\x73\x74\x72\x69\x6E\x67\x5D","\x74\x61\x6C\x6B\x3A\x5B\x71\x75\x65\x75\x65\x5D"];_0x736c[0];var Sequelize=require(_0x736c[1]);var moment=require(_0x736c[2]);module[_0x736c[3]]= {channel:{type:Sequelize[_0x736c[4]]},membername:{type:Sequelize[_0x736c[4]]},interface:{type:Sequelize[_0x736c[4]]},type:{type:Sequelize[_0x736c[4]],defaultValue:_0x736c[5],comment:_0x736c[6]},duration:{type:Sequelize[_0x736c[7]]},enterAt:{type:Sequelize[_0x736c[8]]},exitAt:{type:Sequelize[_0x736c[8]],set:function(_0x131fx3){var _0x131fx4=moment(_0x131fx3);var _0x131fx5=moment(this[_0x736c[10]](_0x736c[9]));var _0x131fx6=_0x131fx4[_0x736c[12]](_0x131fx5,_0x736c[11]);this[_0x736c[14]](_0x736c[13],_0x131fx3);this[_0x736c[14]](_0x736c[15],_0x131fx6|| null)}},data1:{type:Sequelize[_0x736c[4]],comment:_0x736c[16]},data2:{type:Sequelize[_0x736c[4]],comment:_0x736c[17]},data3:{type:Sequelize[_0x736c[4]],comment:_0x736c[18]},data4:{type:Sequelize[_0x736c[4]],comment:_0x736c[19]},data5:{type:Sequelize[_0x736c[4]],comment:_0x736c[20]},role:{type:Sequelize[_0x736c[4]]},internal:{type:Sequelize[_0x736c[7]]},uniqueid:{type:Sequelize[_0x736c[4]]}}
\ No newline at end of file
+var _0x6ad3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x45\x46\x41\x55\x4C\x54\x20\x50\x41\x55\x53\x45","\x4C\x4F\x47\x49\x4E\x2C\x20\x50\x41\x55\x53\x45\x2C\x20\x54\x41\x4C\x4B\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x44\x41\x54\x45","\x65\x6E\x74\x65\x72\x41\x74","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x65\x78\x69\x74\x41\x74","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x74\x61\x6C\x6B\x3A\x5B\x69\x6E\x62\x6F\x75\x6E\x64\x2C\x20\x6F\x75\x74\x62\x6F\x75\x6E\x64\x5D\x2C\x20\x70\x61\x75\x73\x65\x3A\x5B\x72\x65\x61\x73\x6F\x6E\x5D","\x74\x61\x6C\x6B\x3A\x5B\x73\x74\x61\x72\x74\x5D","\x74\x61\x6C\x6B\x3A\x5B\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x5D","\x74\x61\x6C\x6B\x3A\x5B\x64\x69\x61\x6C\x20\x73\x74\x72\x69\x6E\x67\x5D","\x74\x61\x6C\x6B\x3A\x5B\x71\x75\x65\x75\x65\x5D"];_0x6ad3[0];var Sequelize=require(_0x6ad3[1]);var moment=require(_0x6ad3[2]);module[_0x6ad3[3]]= {channel:{type:Sequelize[_0x6ad3[4]]},membername:{type:Sequelize[_0x6ad3[4]]},interface:{type:Sequelize[_0x6ad3[4]]},type:{type:Sequelize[_0x6ad3[4]],defaultValue:_0x6ad3[5],comment:_0x6ad3[6]},duration:{type:Sequelize[_0x6ad3[7]]},enterAt:{type:Sequelize[_0x6ad3[8]]},exitAt:{type:Sequelize[_0x6ad3[8]],set:function(_0x7037x3){var _0x7037x4=moment(_0x7037x3);var _0x7037x5=moment(this[_0x6ad3[10]](_0x6ad3[9]));var _0x7037x6=_0x7037x4[_0x6ad3[12]](_0x7037x5,_0x6ad3[11]);this[_0x6ad3[14]](_0x6ad3[13],_0x7037x3);this[_0x6ad3[14]](_0x6ad3[15],_0x7037x6|| null)}},data1:{type:Sequelize[_0x6ad3[4]],comment:_0x6ad3[16]},data2:{type:Sequelize[_0x6ad3[4]],comment:_0x6ad3[17]},data3:{type:Sequelize[_0x6ad3[4]],comment:_0x6ad3[18]},data4:{type:Sequelize[_0x6ad3[4]],comment:_0x6ad3[19]},data5:{type:Sequelize[_0x6ad3[4]],comment:_0x6ad3[20]},role:{type:Sequelize[_0x6ad3[4]]},internal:{type:Sequelize[_0x6ad3[7]]},uniqueid:{type:Sequelize[_0x6ad3[4]]}}
\ No newline at end of file
index 76d3df4..b3f2d68 100644 (file)
@@ -1 +1 @@
-var _0x1107=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x1107[0];var jsonpatch=require(_0x1107[1]);var rp=require(_0x1107[2]);var moment=require(_0x1107[3]);var BPromise=require(_0x1107[4]);var Mustache=require(_0x1107[5]);var util=require(_0x1107[6]);var path=require(_0x1107[7]);var sox=require(_0x1107[8]);var csv=require(_0x1107[9]);var ejs=require(_0x1107[10]);var fs=require(_0x1107[11]);var _=require(_0x1107[12]);var squel=require(_0x1107[13]);var crypto=require(_0x1107[14]);var jsforce=require(_0x1107[15]);var deskjs=require(_0x1107[16]);var toCsv=require(_0x1107[9]);var querystring=require(_0x1107[17]);var Papa=require(_0x1107[18]);var qs=require(_0x1107[19]);var logger=require(_0x1107[21])(_0x1107[20]);var utils=require(_0x1107[22]);var config=require(_0x1107[23]);var db=require(_0x1107[25])[_0x1107[24]];function respondWithStatusCode(_0x9333x1a,_0x9333x1b){_0x9333x1b= _0x9333x1b|| 204;return function(_0x9333x1c){if(_0x9333x1c){return _0x9333x1a[_0x1107[26]](_0x9333x1b)};return _0x9333x1a[_0x1107[28]](_0x9333x1b)[_0x1107[27]]()}}function respondWithResult(_0x9333x1a,_0x9333x1b){_0x9333x1b= _0x9333x1b|| 200;return function(_0x9333x1c){if(_0x9333x1c){return _0x9333x1a[_0x1107[28]](_0x9333x1b)[_0x1107[29]](_0x9333x1c)}}}function respondWithFilteredResult(_0x9333x1a,_0x9333x1f){return function(_0x9333x1c){if(_0x9333x1c){var _0x9333x20=_0x9333x1c[_0x1107[30]],_0x9333x21=_0x9333x1f[_0x1107[31]],_0x9333x22=_0x9333x1f[_0x1107[31]]+ _0x9333x1f[_0x1107[32]],_0x9333x1b;if(_0x9333x22>= _0x9333x20){_0x9333x22= _0x9333x20;_0x9333x1b= 200}else {_0x9333x1b= 206};_0x9333x1a[_0x1107[28]](_0x9333x1b);return _0x9333x1a[_0x1107[36]](_0x1107[33],_0x9333x21+ _0x1107[34]+ _0x9333x22+ _0x1107[35]+ _0x9333x20)[_0x1107[29]](_0x9333x1c)};return null}}function patchUpdates(_0x9333x24){return function(_0x9333x1c){try{jsonpatch[_0x1107[37]](_0x9333x1c,_0x9333x24,true)}catch(err){return BPromise[_0x1107[38]](err)};return _0x9333x1c[_0x1107[39]]()}}function saveUpdates(_0x9333x26,_0x9333x1b){return function(_0x9333x1c){if(_0x9333x1c){return _0x9333x1c[_0x1107[41]](_0x9333x26)[_0x1107[40]](function(_0x9333x27){return _0x9333x27})};return null}}function removeEntity(_0x9333x1a,_0x9333x1b){return function(_0x9333x1c){if(_0x9333x1c){return _0x9333x1c[_0x1107[42]]()[_0x1107[40]](function(){_0x9333x1a[_0x1107[28]](204)[_0x1107[27]]()})}}}function handleEntityNotFound(_0x9333x1a,_0x9333x1b){return function(_0x9333x1c){if(!_0x9333x1c){_0x9333x1a[_0x1107[26]](404)};return _0x9333x1c}}function handleError(_0x9333x1a,_0x9333x1b){_0x9333x1b= _0x9333x1b|| 500;return function(_0x9333x2b){logger[_0x1107[44]](_0x9333x2b[_0x1107[43]]);if(_0x9333x2b[_0x1107[45]]){delete _0x9333x2b[_0x1107[45]]};_0x9333x1a[_0x1107[28]](_0x9333x1b)[_0x1107[46]](_0x9333x2b)}}exports[_0x1107[47]]= function(_0x9333x2c,_0x9333x1a){var _0x9333x1f={},_0x9333x2d={},_0x9333x2e={count:0,rows:[]};_0x9333x2d[_0x1107[48]]= _[_0x1107[51]](db[_0x1107[50]][_0x1107[49]]);var _0x9333x2f={dateStart:_0x9333x2c[_0x1107[53]][_0x1107[52]],dateEnd:_0x9333x2c[_0x1107[53]][_0x1107[54]]};delete _0x9333x2c[_0x1107[53]][_0x1107[52]];delete _0x9333x2c[_0x1107[53]][_0x1107[54]];_0x9333x2d[_0x1107[53]]= _[_0x1107[51]](_0x9333x2c[_0x1107[53]]);_0x9333x2d[_0x1107[55]]= _[_0x1107[56]](_0x9333x2d[_0x1107[48]],_0x9333x2d[_0x1107[53]]);_0x9333x1f[_0x1107[57]]= _[_0x1107[56]](_0x9333x2d[_0x1107[48]],qs[_0x1107[58]](_0x9333x2c[_0x1107[53]][_0x1107[58]]));_0x9333x1f[_0x1107[57]]= (_0x9333x1f[_0x1107[57]][_0x1107[59]])?_0x9333x1f[_0x1107[57]]:_0x9333x2d[_0x1107[48]];if(!_0x9333x2c[_0x1107[53]][_0x1107[61]](_0x1107[60])){_0x9333x1f[_0x1107[32]]= qs[_0x1107[32]](_0x9333x2c[_0x1107[53]][_0x1107[32]]);_0x9333x1f[_0x1107[31]]= qs[_0x1107[31]](_0x9333x2c[_0x1107[53]][_0x1107[31]])};_0x9333x1f[_0x1107[62]]= qs[_0x1107[63]](_0x9333x2c[_0x1107[53]][_0x1107[63]]);_0x9333x1f[_0x1107[64]]= qs[_0x1107[55]](_[_0x1107[65]](_0x9333x2c[_0x1107[53]],_0x9333x2d[_0x1107[55]]));if(_0x9333x2f[_0x1107[52]]){if(_0x9333x2f[_0x1107[54]]){_0x9333x2f[_0x1107[54]]= moment(_0x9333x2f[_0x1107[54]])[_0x1107[67]](1,_0x1107[66])}else {_0x9333x2f[_0x1107[54]]= moment(_0x9333x2f[_0x1107[52]])[_0x1107[67]](1,_0x1107[66])};_[_0x1107[68]](_0x9333x1f[_0x1107[64]],{createdAt:{$gte:_0x9333x2f[_0x1107[52]],$lte:_0x9333x2f[_0x1107[54]]}})};if(_0x9333x2c[_0x1107[53]][_0x1107[69]]){_0x9333x1f[_0x1107[64]]= _[_0x1107[68]](_0x9333x1f[_0x1107[64]],{$or:_[_0x1107[71]](_0x9333x1f[_0x1107[57]],function(_0x9333x30){var _0x9333x2e={};_0x9333x2e[_0x9333x30]= {$like:_0x1107[70]+ _0x9333x2c[_0x1107[53]][_0x1107[69]]+ _0x1107[70]};return _0x9333x2e})})};_0x9333x1f= _[_0x1107[68]]({},_0x9333x1f,_0x9333x2c[_0x1107[72]]);var _0x9333x31={where:_0x9333x1f[_0x1107[64]]};return db[_0x1107[50]][_0x1107[30]](_0x9333x31)[_0x1107[40]](function(_0x9333x20){_0x9333x2e[_0x1107[30]]= _0x9333x20;if(_0x9333x2c[_0x1107[53]][_0x1107[75]]){_0x9333x1f[_0x1107[76]]= [{all:true}]};return db[_0x1107[50]][_0x1107[77]](_0x9333x1f)})[_0x1107[40]](function(_0x9333x32){_0x9333x2e[_0x1107[74]]= _0x9333x32;return _0x9333x2e})[_0x1107[40]](respondWithFilteredResult(_0x9333x1a,_0x9333x1f))[_0x1107[73]](handleError(_0x9333x1a,null))};exports[_0x1107[78]]= function(_0x9333x2c,_0x9333x1a){var _0x9333x1f={raw:true,where:{id:_0x9333x2c[_0x1107[80]][_0x1107[79]]}},_0x9333x2d={};_0x9333x2d[_0x1107[48]]= _[_0x1107[51]](db[_0x1107[50]][_0x1107[49]]);_0x9333x2d[_0x1107[53]]= _[_0x1107[51]](_0x9333x2c[_0x1107[53]]);_0x9333x2d[_0x1107[55]]= _[_0x1107[56]](_0x9333x2d[_0x1107[48]],_0x9333x2d[_0x1107[53]]);_0x9333x1f[_0x1107[57]]= _[_0x1107[56]](_0x9333x2d[_0x1107[48]],qs[_0x1107[58]](_0x9333x2c[_0x1107[53]][_0x1107[58]]));_0x9333x1f[_0x1107[57]]= (_0x9333x1f[_0x1107[57]][_0x1107[59]])?_0x9333x1f[_0x1107[57]]:_0x9333x2d[_0x1107[48]];if(_0x9333x2c[_0x1107[53]][_0x1107[75]]){_0x9333x1f[_0x1107[76]]= [{all:true}]};_0x9333x1f= _[_0x1107[68]]({},_0x9333x1f,_0x9333x2c[_0x1107[72]]);return db[_0x1107[50]][_0x1107[81]](_0x9333x1f)[_0x1107[40]](handleEntityNotFound(_0x9333x1a,null))[_0x1107[40]](respondWithResult(_0x9333x1a,null))[_0x1107[73]](handleError(_0x9333x1a,null))};exports[_0x1107[82]]= function(_0x9333x2c,_0x9333x1a){return db[_0x1107[50]][_0x1107[82]](_0x9333x2c[_0x1107[83]],{})[_0x1107[40]](respondWithResult(_0x9333x1a,201))[_0x1107[73]](handleError(_0x9333x1a,null))};exports[_0x1107[41]]= function(_0x9333x2c,_0x9333x1a){if(_0x9333x2c[_0x1107[83]][_0x1107[79]]){delete _0x9333x2c[_0x1107[83]][_0x1107[79]]};return db[_0x1107[50]][_0x1107[81]]({where:{id:_0x9333x2c[_0x1107[80]][_0x1107[79]]}})[_0x1107[40]](handleEntityNotFound(_0x9333x1a,null))[_0x1107[40]](saveUpdates(_0x9333x2c[_0x1107[83]],null))[_0x1107[40]](respondWithResult(_0x9333x1a,null))[_0x1107[73]](handleError(_0x9333x1a,null))};exports[_0x1107[42]]= function(_0x9333x2c,_0x9333x1a){return db[_0x1107[50]][_0x1107[81]]({where:{id:_0x9333x2c[_0x1107[80]][_0x1107[79]]}})[_0x1107[40]](handleEntityNotFound(_0x9333x1a,null))[_0x1107[40]](removeEntity(_0x9333x1a,null))[_0x1107[73]](handleError(_0x9333x1a,null))};exports[_0x1107[84]]= function(_0x9333x2c,_0x9333x1a){return db[_0x1107[50]][_0x1107[84]]()[_0x1107[40]](respondWithResult(_0x9333x1a,null))[_0x1107[73]](handleError(_0x9333x1a,null))}
\ No newline at end of file
+var _0x4b13=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x4b13[0];var jsonpatch=require(_0x4b13[1]);var rp=require(_0x4b13[2]);var moment=require(_0x4b13[3]);var BPromise=require(_0x4b13[4]);var Mustache=require(_0x4b13[5]);var util=require(_0x4b13[6]);var path=require(_0x4b13[7]);var sox=require(_0x4b13[8]);var csv=require(_0x4b13[9]);var ejs=require(_0x4b13[10]);var fs=require(_0x4b13[11]);var _=require(_0x4b13[12]);var squel=require(_0x4b13[13]);var crypto=require(_0x4b13[14]);var jsforce=require(_0x4b13[15]);var deskjs=require(_0x4b13[16]);var toCsv=require(_0x4b13[9]);var querystring=require(_0x4b13[17]);var Papa=require(_0x4b13[18]);var qs=require(_0x4b13[19]);var logger=require(_0x4b13[21])(_0x4b13[20]);var utils=require(_0x4b13[22]);var config=require(_0x4b13[23]);var db=require(_0x4b13[25])[_0x4b13[24]];function respondWithStatusCode(_0x4151x1a,_0x4151x1b){_0x4151x1b= _0x4151x1b|| 204;return function(_0x4151x1c){if(_0x4151x1c){return _0x4151x1a[_0x4b13[26]](_0x4151x1b)};return _0x4151x1a[_0x4b13[28]](_0x4151x1b)[_0x4b13[27]]()}}function respondWithResult(_0x4151x1a,_0x4151x1b){_0x4151x1b= _0x4151x1b|| 200;return function(_0x4151x1c){if(_0x4151x1c){return _0x4151x1a[_0x4b13[28]](_0x4151x1b)[_0x4b13[29]](_0x4151x1c)}}}function respondWithFilteredResult(_0x4151x1a,_0x4151x1f){return function(_0x4151x1c){if(_0x4151x1c){var _0x4151x20=_0x4151x1c[_0x4b13[30]],_0x4151x21=_0x4151x1f[_0x4b13[31]],_0x4151x22=_0x4151x1f[_0x4b13[31]]+ _0x4151x1f[_0x4b13[32]],_0x4151x1b;if(_0x4151x22>= _0x4151x20){_0x4151x22= _0x4151x20;_0x4151x1b= 200}else {_0x4151x1b= 206};_0x4151x1a[_0x4b13[28]](_0x4151x1b);return _0x4151x1a[_0x4b13[36]](_0x4b13[33],_0x4151x21+ _0x4b13[34]+ _0x4151x22+ _0x4b13[35]+ _0x4151x20)[_0x4b13[29]](_0x4151x1c)};return null}}function patchUpdates(_0x4151x24){return function(_0x4151x1c){try{jsonpatch[_0x4b13[37]](_0x4151x1c,_0x4151x24,true)}catch(err){return BPromise[_0x4b13[38]](err)};return _0x4151x1c[_0x4b13[39]]()}}function saveUpdates(_0x4151x26,_0x4151x1b){return function(_0x4151x1c){if(_0x4151x1c){return _0x4151x1c[_0x4b13[41]](_0x4151x26)[_0x4b13[40]](function(_0x4151x27){return _0x4151x27})};return null}}function removeEntity(_0x4151x1a,_0x4151x1b){return function(_0x4151x1c){if(_0x4151x1c){return _0x4151x1c[_0x4b13[42]]()[_0x4b13[40]](function(){_0x4151x1a[_0x4b13[28]](204)[_0x4b13[27]]()})}}}function handleEntityNotFound(_0x4151x1a,_0x4151x1b){return function(_0x4151x1c){if(!_0x4151x1c){_0x4151x1a[_0x4b13[26]](404)};return _0x4151x1c}}function handleError(_0x4151x1a,_0x4151x1b){_0x4151x1b= _0x4151x1b|| 500;return function(_0x4151x2b){logger[_0x4b13[44]](_0x4151x2b[_0x4b13[43]]);if(_0x4151x2b[_0x4b13[45]]){delete _0x4151x2b[_0x4b13[45]]};_0x4151x1a[_0x4b13[28]](_0x4151x1b)[_0x4b13[46]](_0x4151x2b)}}exports[_0x4b13[47]]= function(_0x4151x2c,_0x4151x1a){var _0x4151x1f={},_0x4151x2d={},_0x4151x2e={count:0,rows:[]};_0x4151x2d[_0x4b13[48]]= _[_0x4b13[51]](db[_0x4b13[50]][_0x4b13[49]]);var _0x4151x2f={dateStart:_0x4151x2c[_0x4b13[53]][_0x4b13[52]],dateEnd:_0x4151x2c[_0x4b13[53]][_0x4b13[54]]};delete _0x4151x2c[_0x4b13[53]][_0x4b13[52]];delete _0x4151x2c[_0x4b13[53]][_0x4b13[54]];_0x4151x2d[_0x4b13[53]]= _[_0x4b13[51]](_0x4151x2c[_0x4b13[53]]);_0x4151x2d[_0x4b13[55]]= _[_0x4b13[56]](_0x4151x2d[_0x4b13[48]],_0x4151x2d[_0x4b13[53]]);_0x4151x1f[_0x4b13[57]]= _[_0x4b13[56]](_0x4151x2d[_0x4b13[48]],qs[_0x4b13[58]](_0x4151x2c[_0x4b13[53]][_0x4b13[58]]));_0x4151x1f[_0x4b13[57]]= (_0x4151x1f[_0x4b13[57]][_0x4b13[59]])?_0x4151x1f[_0x4b13[57]]:_0x4151x2d[_0x4b13[48]];if(!_0x4151x2c[_0x4b13[53]][_0x4b13[61]](_0x4b13[60])){_0x4151x1f[_0x4b13[32]]= qs[_0x4b13[32]](_0x4151x2c[_0x4b13[53]][_0x4b13[32]]);_0x4151x1f[_0x4b13[31]]= qs[_0x4b13[31]](_0x4151x2c[_0x4b13[53]][_0x4b13[31]])};_0x4151x1f[_0x4b13[62]]= qs[_0x4b13[63]](_0x4151x2c[_0x4b13[53]][_0x4b13[63]]);_0x4151x1f[_0x4b13[64]]= qs[_0x4b13[55]](_[_0x4b13[65]](_0x4151x2c[_0x4b13[53]],_0x4151x2d[_0x4b13[55]]));if(_0x4151x2f[_0x4b13[52]]){if(_0x4151x2f[_0x4b13[54]]){_0x4151x2f[_0x4b13[54]]= moment(_0x4151x2f[_0x4b13[54]])[_0x4b13[67]](1,_0x4b13[66])}else {_0x4151x2f[_0x4b13[54]]= moment(_0x4151x2f[_0x4b13[52]])[_0x4b13[67]](1,_0x4b13[66])};_[_0x4b13[68]](_0x4151x1f[_0x4b13[64]],{createdAt:{$gte:_0x4151x2f[_0x4b13[52]],$lte:_0x4151x2f[_0x4b13[54]]}})};if(_0x4151x2c[_0x4b13[53]][_0x4b13[69]]){_0x4151x1f[_0x4b13[64]]= _[_0x4b13[68]](_0x4151x1f[_0x4b13[64]],{$or:_[_0x4b13[71]](_0x4151x1f[_0x4b13[57]],function(_0x4151x30){var _0x4151x2e={};_0x4151x2e[_0x4151x30]= {$like:_0x4b13[70]+ _0x4151x2c[_0x4b13[53]][_0x4b13[69]]+ _0x4b13[70]};return _0x4151x2e})})};_0x4151x1f= _[_0x4b13[68]]({},_0x4151x1f,_0x4151x2c[_0x4b13[72]]);var _0x4151x31={where:_0x4151x1f[_0x4b13[64]]};return db[_0x4b13[50]][_0x4b13[30]](_0x4151x31)[_0x4b13[40]](function(_0x4151x20){_0x4151x2e[_0x4b13[30]]= _0x4151x20;if(_0x4151x2c[_0x4b13[53]][_0x4b13[75]]){_0x4151x1f[_0x4b13[76]]= [{all:true}]};return db[_0x4b13[50]][_0x4b13[77]](_0x4151x1f)})[_0x4b13[40]](function(_0x4151x32){_0x4151x2e[_0x4b13[74]]= _0x4151x32;return _0x4151x2e})[_0x4b13[40]](respondWithFilteredResult(_0x4151x1a,_0x4151x1f))[_0x4b13[73]](handleError(_0x4151x1a,null))};exports[_0x4b13[78]]= function(_0x4151x2c,_0x4151x1a){var _0x4151x1f={raw:true,where:{id:_0x4151x2c[_0x4b13[80]][_0x4b13[79]]}},_0x4151x2d={};_0x4151x2d[_0x4b13[48]]= _[_0x4b13[51]](db[_0x4b13[50]][_0x4b13[49]]);_0x4151x2d[_0x4b13[53]]= _[_0x4b13[51]](_0x4151x2c[_0x4b13[53]]);_0x4151x2d[_0x4b13[55]]= _[_0x4b13[56]](_0x4151x2d[_0x4b13[48]],_0x4151x2d[_0x4b13[53]]);_0x4151x1f[_0x4b13[57]]= _[_0x4b13[56]](_0x4151x2d[_0x4b13[48]],qs[_0x4b13[58]](_0x4151x2c[_0x4b13[53]][_0x4b13[58]]));_0x4151x1f[_0x4b13[57]]= (_0x4151x1f[_0x4b13[57]][_0x4b13[59]])?_0x4151x1f[_0x4b13[57]]:_0x4151x2d[_0x4b13[48]];if(_0x4151x2c[_0x4b13[53]][_0x4b13[75]]){_0x4151x1f[_0x4b13[76]]= [{all:true}]};_0x4151x1f= _[_0x4b13[68]]({},_0x4151x1f,_0x4151x2c[_0x4b13[72]]);return db[_0x4b13[50]][_0x4b13[81]](_0x4151x1f)[_0x4b13[40]](handleEntityNotFound(_0x4151x1a,null))[_0x4b13[40]](respondWithResult(_0x4151x1a,null))[_0x4b13[73]](handleError(_0x4151x1a,null))};exports[_0x4b13[82]]= function(_0x4151x2c,_0x4151x1a){return db[_0x4b13[50]][_0x4b13[82]](_0x4151x2c[_0x4b13[83]],{})[_0x4b13[40]](respondWithResult(_0x4151x1a,201))[_0x4b13[73]](handleError(_0x4151x1a,null))};exports[_0x4b13[41]]= function(_0x4151x2c,_0x4151x1a){if(_0x4151x2c[_0x4b13[83]][_0x4b13[79]]){delete _0x4151x2c[_0x4b13[83]][_0x4b13[79]]};return db[_0x4b13[50]][_0x4b13[81]]({where:{id:_0x4151x2c[_0x4b13[80]][_0x4b13[79]]}})[_0x4b13[40]](handleEntityNotFound(_0x4151x1a,null))[_0x4b13[40]](saveUpdates(_0x4151x2c[_0x4b13[83]],null))[_0x4b13[40]](respondWithResult(_0x4151x1a,null))[_0x4b13[73]](handleError(_0x4151x1a,null))};exports[_0x4b13[42]]= function(_0x4151x2c,_0x4151x1a){return db[_0x4b13[50]][_0x4b13[81]]({where:{id:_0x4151x2c[_0x4b13[80]][_0x4b13[79]]}})[_0x4b13[40]](handleEntityNotFound(_0x4151x1a,null))[_0x4b13[40]](removeEntity(_0x4151x1a,null))[_0x4b13[73]](handleError(_0x4151x1a,null))};exports[_0x4b13[84]]= function(_0x4151x2c,_0x4151x1a){return db[_0x4b13[50]][_0x4b13[84]]()[_0x4b13[40]](respondWithResult(_0x4151x1a,null))[_0x4b13[73]](handleError(_0x4151x1a,null))}
\ No newline at end of file
index 7ba4b20..231388f 100644 (file)
@@ -1 +1 @@
-var _0x8199=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65\x5F\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x64\x65\x66\x69\x6E\x65"];_0x8199[0];var _=require(_0x8199[1]);var util=require(_0x8199[2]);var logger=require(_0x8199[4])(_0x8199[3]);var moment=require(_0x8199[5]);var BPromise=require(_0x8199[6]);var rp=require(_0x8199[7]);var attributes=require(_0x8199[8]);module[_0x8199[9]]= function(_0x66efx8,_0x66efx9){return _0x66efx8[_0x8199[15]](_0x8199[10],attributes,{tableName:_0x8199[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x8199[12],"\x66\x69\x65\x6C\x64\x73":[_0x8199[13],_0x8199[14]]}],timestamps:true})}
\ No newline at end of file
+var _0x4b6d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65\x5F\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x64\x65\x66\x69\x6E\x65"];_0x4b6d[0];var _=require(_0x4b6d[1]);var util=require(_0x4b6d[2]);var logger=require(_0x4b6d[4])(_0x4b6d[3]);var moment=require(_0x4b6d[5]);var BPromise=require(_0x4b6d[6]);var rp=require(_0x4b6d[7]);var attributes=require(_0x4b6d[8]);module[_0x4b6d[9]]= function(_0xb362x8,_0xb362x9){return _0xb362x8[_0x4b6d[15]](_0x4b6d[10],attributes,{tableName:_0x4b6d[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x4b6d[12],"\x66\x69\x65\x6C\x64\x73":[_0x4b6d[13],_0x4b6d[14]]}],timestamps:true})}
\ No newline at end of file
index d86a12c..14e6ecb 100644 (file)
@@ -1 +1 @@
-var _0x1b4b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x43\x72\x65\x61\x74\x65\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65"];_0x1b4b[0];var _=require(_0x1b4b[1]);var util=require(_0x1b4b[2]);var moment=require(_0x1b4b[3]);var BPromise=require(_0x1b4b[4]);var rs=require(_0x1b4b[5]);var fs=require(_0x1b4b[6]);var db=require(_0x1b4b[8])[_0x1b4b[7]];var utils=require(_0x1b4b[9]);var logger=require(_0x1b4b[11])(_0x1b4b[10]);var config=require(_0x1b4b[12]);var jayson=require(_0x1b4b[13]);var client=jayson[_0x1b4b[15]][_0x1b4b[14]]({port:9002});function respondWithRpcPromise(_0xa955xe,_0xa955xf,_0xa955x10){return  new BPromise(function(_0xa955x11,_0xa955x12){return client[_0x1b4b[28]](_0xa955xe,_0xa955x10)[_0x1b4b[27]](function(_0xa955x14){logger[_0x1b4b[20]](_0x1b4b[16],_0xa955xf,_0x1b4b[19]);logger[_0x1b4b[23]](_0x1b4b[21],_0xa955xf,_0x1b4b[19],JSON[_0x1b4b[22]](_0xa955x14));if(_0xa955x14[_0x1b4b[17]]){if(_0xa955x14[_0x1b4b[17]][_0x1b4b[24]]=== 500){logger[_0x1b4b[17]](_0x1b4b[16],_0xa955xf,_0xa955x14[_0x1b4b[17]][_0x1b4b[25]]);return _0xa955x12(_0xa955x14[_0x1b4b[17]][_0x1b4b[25]])};logger[_0x1b4b[17]](_0x1b4b[16],_0xa955xf,_0xa955x14[_0x1b4b[17]][_0x1b4b[25]]);return _0xa955x11(_0xa955x14[_0x1b4b[17]][_0x1b4b[25]])}else {logger[_0x1b4b[20]](_0x1b4b[16],_0xa955xf,_0x1b4b[19]);_0xa955x11(_0xa955x14[_0x1b4b[26]][_0x1b4b[25]])}})[_0x1b4b[18]](function(_0xa955x13){logger[_0x1b4b[17]](_0x1b4b[16],_0xa955xf,_0xa955x13);_0xa955x12(_0xa955x13)})})}exports[_0x1b4b[29]]= function(_0xa955x10){var _0xa955x15=this;return  new Promise(function(_0xa955x11,_0xa955x12){return db[_0x1b4b[40]][_0x1b4b[39]]({raw:_0xa955x10[_0x1b4b[30]]?(_0xa955x10[_0x1b4b[30]][_0x1b4b[31]]=== undefined)?true:false:true,where:_0xa955x10[_0x1b4b[30]]?_0xa955x10[_0x1b4b[30]][_0x1b4b[32]]|| null:null,attributes:_0xa955x10[_0x1b4b[30]]?_0xa955x10[_0x1b4b[30]][_0x1b4b[33]]|| null:null,limit:_0xa955x10[_0x1b4b[30]]?_0xa955x10[_0x1b4b[30]][_0x1b4b[34]]|| null:null,include:_0xa955x10[_0x1b4b[30]]?(_0xa955x10[_0x1b4b[30]][_0x1b4b[35]]?_[_0x1b4b[38]](_0xa955x10[_0x1b4b[30]][_0x1b4b[35]],function(_0xa955x16){return {model:db[_0xa955x16[_0x1b4b[36]]],as:_0xa955x16[_0x1b4b[37]],attributes:_0xa955x16[_0x1b4b[33]],include:_0xa955x16[_0x1b4b[35]]?_[_0x1b4b[38]](_0xa955x16[_0x1b4b[35]],function(_0xa955x17){return {model:db[_0xa955x17[_0x1b4b[36]]],as:_0xa955x17[_0x1b4b[37]],attributes:_0xa955x17[_0x1b4b[33]],include:_0xa955x17[_0x1b4b[35]]?_[_0x1b4b[38]](_0xa955x17[_0x1b4b[35]],function(_0xa955x18){return {model:db[_0xa955x18[_0x1b4b[36]]],as:_0xa955x18[_0x1b4b[37]],attributes:_0xa955x18[_0x1b4b[33]]}}):[]}}):[]}}):[]):[]})[_0x1b4b[27]](function(_0xa955x14){logger[_0x1b4b[20]](_0x1b4b[29],_0xa955x10);logger[_0x1b4b[23]](_0x1b4b[29],_0xa955x10,JSON[_0x1b4b[22]](_0xa955x14));_0xa955x11(_0xa955x14)})[_0x1b4b[18]](function(_0xa955x13){logger[_0x1b4b[17]](_0x1b4b[29],_0xa955x13[_0x1b4b[25]],_0xa955x10);_0xa955x12(_0xa955x15[_0x1b4b[17]](500,_0xa955x13[_0x1b4b[25]]))})})};exports[_0x1b4b[41]]= function(_0xa955x10){var _0xa955x15=this;return  new Promise(function(_0xa955x11,_0xa955x12){return db[_0x1b4b[40]][_0x1b4b[43]](_0xa955x10[_0x1b4b[42]],{raw:_0xa955x10[_0x1b4b[30]]?(_0xa955x10[_0x1b4b[30]][_0x1b4b[31]]=== undefined)?true:false:true})[_0x1b4b[27]](function(_0xa955x14){logger[_0x1b4b[20]](_0x1b4b[41],_0xa955x10);logger[_0x1b4b[23]](_0x1b4b[41],_0xa955x10,JSON[_0x1b4b[22]](_0xa955x14));_0xa955x11(_0xa955x14)})[_0x1b4b[18]](function(_0xa955x13){logger[_0x1b4b[17]](_0x1b4b[41],_0xa955x13[_0x1b4b[25]],_0xa955x10);_0xa955x12(_0xa955x15[_0x1b4b[17]](500,_0xa955x13[_0x1b4b[25]]))})})};exports[_0x1b4b[44]]= function(_0xa955x10){var _0xa955x15=this;return  new Promise(function(_0xa955x11,_0xa955x12){return db[_0x1b4b[40]][_0x1b4b[45]](_0xa955x10[_0x1b4b[42]],{raw:_0xa955x10[_0x1b4b[30]]?(_0xa955x10[_0x1b4b[30]][_0x1b4b[31]]=== undefined)?true:false:true,individualHooks:true,where:_0xa955x10[_0x1b4b[30]]?_0xa955x10[_0x1b4b[30]][_0x1b4b[32]]|| null:null,attributes:_0xa955x10[_0x1b4b[30]]?_0xa955x10[_0x1b4b[30]][_0x1b4b[33]]|| null:null,limit:_0xa955x10[_0x1b4b[30]]?_0xa955x10[_0x1b4b[30]][_0x1b4b[34]]|| null:null})[_0x1b4b[27]](function(_0xa955x14){logger[_0x1b4b[20]](_0x1b4b[44],_0xa955x10);logger[_0x1b4b[23]](_0x1b4b[44],_0xa955x10,JSON[_0x1b4b[22]](_0xa955x14));_0xa955x11(_0xa955x14)})[_0x1b4b[18]](function(_0xa955x13){logger[_0x1b4b[17]](_0x1b4b[44],_0xa955x13[_0x1b4b[25]],_0xa955x10);_0xa955x12(_0xa955x15[_0x1b4b[17]](500,_0xa955x13[_0x1b4b[25]]))})})}
\ No newline at end of file
+var _0x4e4d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x43\x72\x65\x61\x74\x65\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65"];_0x4e4d[0];var _=require(_0x4e4d[1]);var util=require(_0x4e4d[2]);var moment=require(_0x4e4d[3]);var BPromise=require(_0x4e4d[4]);var rs=require(_0x4e4d[5]);var fs=require(_0x4e4d[6]);var db=require(_0x4e4d[8])[_0x4e4d[7]];var utils=require(_0x4e4d[9]);var logger=require(_0x4e4d[11])(_0x4e4d[10]);var config=require(_0x4e4d[12]);var jayson=require(_0x4e4d[13]);var client=jayson[_0x4e4d[15]][_0x4e4d[14]]({port:9002});function respondWithRpcPromise(_0x3a0axe,_0x3a0axf,_0x3a0ax10){return  new BPromise(function(_0x3a0ax11,_0x3a0ax12){return client[_0x4e4d[28]](_0x3a0axe,_0x3a0ax10)[_0x4e4d[27]](function(_0x3a0ax14){logger[_0x4e4d[20]](_0x4e4d[16],_0x3a0axf,_0x4e4d[19]);logger[_0x4e4d[23]](_0x4e4d[21],_0x3a0axf,_0x4e4d[19],JSON[_0x4e4d[22]](_0x3a0ax14));if(_0x3a0ax14[_0x4e4d[17]]){if(_0x3a0ax14[_0x4e4d[17]][_0x4e4d[24]]=== 500){logger[_0x4e4d[17]](_0x4e4d[16],_0x3a0axf,_0x3a0ax14[_0x4e4d[17]][_0x4e4d[25]]);return _0x3a0ax12(_0x3a0ax14[_0x4e4d[17]][_0x4e4d[25]])};logger[_0x4e4d[17]](_0x4e4d[16],_0x3a0axf,_0x3a0ax14[_0x4e4d[17]][_0x4e4d[25]]);return _0x3a0ax11(_0x3a0ax14[_0x4e4d[17]][_0x4e4d[25]])}else {logger[_0x4e4d[20]](_0x4e4d[16],_0x3a0axf,_0x4e4d[19]);_0x3a0ax11(_0x3a0ax14[_0x4e4d[26]][_0x4e4d[25]])}})[_0x4e4d[18]](function(_0x3a0ax13){logger[_0x4e4d[17]](_0x4e4d[16],_0x3a0axf,_0x3a0ax13);_0x3a0ax12(_0x3a0ax13)})})}exports[_0x4e4d[29]]= function(_0x3a0ax10){var _0x3a0ax15=this;return  new Promise(function(_0x3a0ax11,_0x3a0ax12){return db[_0x4e4d[40]][_0x4e4d[39]]({raw:_0x3a0ax10[_0x4e4d[30]]?(_0x3a0ax10[_0x4e4d[30]][_0x4e4d[31]]=== undefined)?true:false:true,where:_0x3a0ax10[_0x4e4d[30]]?_0x3a0ax10[_0x4e4d[30]][_0x4e4d[32]]|| null:null,attributes:_0x3a0ax10[_0x4e4d[30]]?_0x3a0ax10[_0x4e4d[30]][_0x4e4d[33]]|| null:null,limit:_0x3a0ax10[_0x4e4d[30]]?_0x3a0ax10[_0x4e4d[30]][_0x4e4d[34]]|| null:null,include:_0x3a0ax10[_0x4e4d[30]]?(_0x3a0ax10[_0x4e4d[30]][_0x4e4d[35]]?_[_0x4e4d[38]](_0x3a0ax10[_0x4e4d[30]][_0x4e4d[35]],function(_0x3a0ax16){return {model:db[_0x3a0ax16[_0x4e4d[36]]],as:_0x3a0ax16[_0x4e4d[37]],attributes:_0x3a0ax16[_0x4e4d[33]],include:_0x3a0ax16[_0x4e4d[35]]?_[_0x4e4d[38]](_0x3a0ax16[_0x4e4d[35]],function(_0x3a0ax17){return {model:db[_0x3a0ax17[_0x4e4d[36]]],as:_0x3a0ax17[_0x4e4d[37]],attributes:_0x3a0ax17[_0x4e4d[33]],include:_0x3a0ax17[_0x4e4d[35]]?_[_0x4e4d[38]](_0x3a0ax17[_0x4e4d[35]],function(_0x3a0ax18){return {model:db[_0x3a0ax18[_0x4e4d[36]]],as:_0x3a0ax18[_0x4e4d[37]],attributes:_0x3a0ax18[_0x4e4d[33]]}}):[]}}):[]}}):[]):[]})[_0x4e4d[27]](function(_0x3a0ax14){logger[_0x4e4d[20]](_0x4e4d[29],_0x3a0ax10);logger[_0x4e4d[23]](_0x4e4d[29],_0x3a0ax10,JSON[_0x4e4d[22]](_0x3a0ax14));_0x3a0ax11(_0x3a0ax14)})[_0x4e4d[18]](function(_0x3a0ax13){logger[_0x4e4d[17]](_0x4e4d[29],_0x3a0ax13[_0x4e4d[25]],_0x3a0ax10);_0x3a0ax12(_0x3a0ax15[_0x4e4d[17]](500,_0x3a0ax13[_0x4e4d[25]]))})})};exports[_0x4e4d[41]]= function(_0x3a0ax10){var _0x3a0ax15=this;return  new Promise(function(_0x3a0ax11,_0x3a0ax12){return db[_0x4e4d[40]][_0x4e4d[43]](_0x3a0ax10[_0x4e4d[42]],{raw:_0x3a0ax10[_0x4e4d[30]]?(_0x3a0ax10[_0x4e4d[30]][_0x4e4d[31]]=== undefined)?true:false:true})[_0x4e4d[27]](function(_0x3a0ax14){logger[_0x4e4d[20]](_0x4e4d[41],_0x3a0ax10);logger[_0x4e4d[23]](_0x4e4d[41],_0x3a0ax10,JSON[_0x4e4d[22]](_0x3a0ax14));_0x3a0ax11(_0x3a0ax14)})[_0x4e4d[18]](function(_0x3a0ax13){logger[_0x4e4d[17]](_0x4e4d[41],_0x3a0ax13[_0x4e4d[25]],_0x3a0ax10);_0x3a0ax12(_0x3a0ax15[_0x4e4d[17]](500,_0x3a0ax13[_0x4e4d[25]]))})})};exports[_0x4e4d[44]]= function(_0x3a0ax10){var _0x3a0ax15=this;return  new Promise(function(_0x3a0ax11,_0x3a0ax12){return db[_0x4e4d[40]][_0x4e4d[45]](_0x3a0ax10[_0x4e4d[42]],{raw:_0x3a0ax10[_0x4e4d[30]]?(_0x3a0ax10[_0x4e4d[30]][_0x4e4d[31]]=== undefined)?true:false:true,individualHooks:true,where:_0x3a0ax10[_0x4e4d[30]]?_0x3a0ax10[_0x4e4d[30]][_0x4e4d[32]]|| null:null,attributes:_0x3a0ax10[_0x4e4d[30]]?_0x3a0ax10[_0x4e4d[30]][_0x4e4d[33]]|| null:null,limit:_0x3a0ax10[_0x4e4d[30]]?_0x3a0ax10[_0x4e4d[30]][_0x4e4d[34]]|| null:null})[_0x4e4d[27]](function(_0x3a0ax14){logger[_0x4e4d[20]](_0x4e4d[44],_0x3a0ax10);logger[_0x4e4d[23]](_0x4e4d[44],_0x3a0ax10,JSON[_0x4e4d[22]](_0x3a0ax14));_0x3a0ax11(_0x3a0ax14)})[_0x4e4d[18]](function(_0x3a0ax13){logger[_0x4e4d[17]](_0x4e4d[44],_0x3a0ax13[_0x4e4d[25]],_0x3a0ax10);_0x3a0ax12(_0x3a0ax15[_0x4e4d[17]](500,_0x3a0ax13[_0x4e4d[25]]))})})}
\ No newline at end of file
index c8ddc65..57abba9 100644 (file)
@@ -1 +1 @@
-var _0x3e14=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x69\x67\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x3e14[0];var multer=require(_0x3e14[1]);var util=require(_0x3e14[2]);var path=require(_0x3e14[3]);var express=require(_0x3e14[4]);var router=express.Router();var auth=require(_0x3e14[5]);var interaction=require(_0x3e14[6]);var config=require(_0x3e14[7]);var controller=require(_0x3e14[8]);router[_0x3e14[11]](_0x3e14[9],controller[_0x3e14[10]]);module[_0x3e14[12]]= router
\ No newline at end of file
+var _0x5aeb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x69\x67\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x5aeb[0];var multer=require(_0x5aeb[1]);var util=require(_0x5aeb[2]);var path=require(_0x5aeb[3]);var express=require(_0x5aeb[4]);var router=express.Router();var auth=require(_0x5aeb[5]);var interaction=require(_0x5aeb[6]);var config=require(_0x5aeb[7]);var controller=require(_0x5aeb[8]);router[_0x5aeb[11]](_0x5aeb[9],controller[_0x5aeb[10]]);module[_0x5aeb[12]]= router
\ No newline at end of file
index 2097556..900aa08 100644 (file)
@@ -1 +1 @@
-var _0x2bcc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0x2bcc[0];var Sequelize=require(_0x2bcc[1]);module[_0x2bcc[2]]= {version:{type:Sequelize[_0x2bcc[3]],primaryKey:true,autoIncrement:false}}
\ No newline at end of file
+var _0x2559=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0x2559[0];var Sequelize=require(_0x2559[1]);module[_0x2559[2]]= {version:{type:Sequelize[_0x2559[3]],primaryKey:true,autoIncrement:false}}
\ No newline at end of file
index a132ac3..27365b9 100644 (file)
@@ -1 +1 @@
-var _0xd28b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x69\x67\x72\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C"];_0xd28b[0];var jsonpatch=require(_0xd28b[1]);var rp=require(_0xd28b[2]);var moment=require(_0xd28b[3]);var BPromise=require(_0xd28b[4]);var Mustache=require(_0xd28b[5]);var util=require(_0xd28b[6]);var path=require(_0xd28b[7]);var sox=require(_0xd28b[8]);var csv=require(_0xd28b[9]);var ejs=require(_0xd28b[10]);var fs=require(_0xd28b[11]);var _=require(_0xd28b[12]);var squel=require(_0xd28b[13]);var crypto=require(_0xd28b[14]);var jsforce=require(_0xd28b[15]);var deskjs=require(_0xd28b[16]);var toCsv=require(_0xd28b[9]);var querystring=require(_0xd28b[17]);var Papa=require(_0xd28b[18]);var qs=require(_0xd28b[19]);var logger=require(_0xd28b[21])(_0xd28b[20]);var utils=require(_0xd28b[22]);var config=require(_0xd28b[23]);var db=require(_0xd28b[25])[_0xd28b[24]];function respondWithStatusCode(_0xd366x1a,_0xd366x1b){_0xd366x1b= _0xd366x1b|| 204;return function(_0xd366x1c){if(_0xd366x1c){return _0xd366x1a[_0xd28b[26]](_0xd366x1b)};return _0xd366x1a[_0xd28b[28]](_0xd366x1b)[_0xd28b[27]]()}}function respondWithResult(_0xd366x1a,_0xd366x1b){_0xd366x1b= _0xd366x1b|| 200;return function(_0xd366x1c){if(_0xd366x1c){return _0xd366x1a[_0xd28b[28]](_0xd366x1b)[_0xd28b[29]](_0xd366x1c)}}}function respondWithFilteredResult(_0xd366x1a,_0xd366x1f){return function(_0xd366x1c){if(_0xd366x1c){var _0xd366x20=_0xd366x1c[_0xd28b[30]],_0xd366x21=_0xd366x1f[_0xd28b[31]],_0xd366x22=_0xd366x1f[_0xd28b[31]]+ _0xd366x1f[_0xd28b[32]],_0xd366x1b;if(_0xd366x22>= _0xd366x20){_0xd366x22= _0xd366x20;_0xd366x1b= 200}else {_0xd366x1b= 206};_0xd366x1a[_0xd28b[28]](_0xd366x1b);return _0xd366x1a[_0xd28b[36]](_0xd28b[33],_0xd366x21+ _0xd28b[34]+ _0xd366x22+ _0xd28b[35]+ _0xd366x20)[_0xd28b[29]](_0xd366x1c)};return null}}function patchUpdates(_0xd366x24){return function(_0xd366x1c){try{jsonpatch[_0xd28b[37]](_0xd366x1c,_0xd366x24,true)}catch(err){return BPromise[_0xd28b[38]](err)};return _0xd366x1c[_0xd28b[39]]()}}function saveUpdates(_0xd366x26,_0xd366x1b){return function(_0xd366x1c){if(_0xd366x1c){return _0xd366x1c[_0xd28b[41]](_0xd366x26)[_0xd28b[40]](function(_0xd366x27){return _0xd366x27})};return null}}function removeEntity(_0xd366x1a,_0xd366x1b){return function(_0xd366x1c){if(_0xd366x1c){return _0xd366x1c[_0xd28b[42]]()[_0xd28b[40]](function(){_0xd366x1a[_0xd28b[28]](204)[_0xd28b[27]]()})}}}function handleEntityNotFound(_0xd366x1a,_0xd366x1b){return function(_0xd366x1c){if(!_0xd366x1c){_0xd366x1a[_0xd28b[26]](404)};return _0xd366x1c}}function handleError(_0xd366x1a,_0xd366x1b){_0xd366x1b= _0xd366x1b|| 500;return function(_0xd366x2b){logger[_0xd28b[44]](_0xd366x2b[_0xd28b[43]]);if(_0xd366x2b[_0xd28b[45]]){delete _0xd366x2b[_0xd28b[45]]};_0xd366x1a[_0xd28b[28]](_0xd366x1b)[_0xd28b[46]](_0xd366x2b)}}exports[_0xd28b[47]]= function(_0xd366x2c,_0xd366x1a){var _0xd366x1f={},_0xd366x2d={},_0xd366x2e={count:0,rows:[]};_0xd366x2d[_0xd28b[48]]= _[_0xd28b[51]](db[_0xd28b[50]][_0xd28b[49]]);var _0xd366x2f={dateStart:_0xd366x2c[_0xd28b[53]][_0xd28b[52]],dateEnd:_0xd366x2c[_0xd28b[53]][_0xd28b[54]]};delete _0xd366x2c[_0xd28b[53]][_0xd28b[52]];delete _0xd366x2c[_0xd28b[53]][_0xd28b[54]];_0xd366x2d[_0xd28b[53]]= _[_0xd28b[51]](_0xd366x2c[_0xd28b[53]]);_0xd366x2d[_0xd28b[55]]= _[_0xd28b[56]](_0xd366x2d[_0xd28b[48]],_0xd366x2d[_0xd28b[53]]);_0xd366x1f[_0xd28b[57]]= _[_0xd28b[56]](_0xd366x2d[_0xd28b[48]],qs[_0xd28b[58]](_0xd366x2c[_0xd28b[53]][_0xd28b[58]]));_0xd366x1f[_0xd28b[57]]= (_0xd366x1f[_0xd28b[57]][_0xd28b[59]])?_0xd366x1f[_0xd28b[57]]:_0xd366x2d[_0xd28b[48]];if(!_0xd366x2c[_0xd28b[53]][_0xd28b[61]](_0xd28b[60])){_0xd366x1f[_0xd28b[32]]= qs[_0xd28b[32]](_0xd366x2c[_0xd28b[53]][_0xd28b[32]]);_0xd366x1f[_0xd28b[31]]= qs[_0xd28b[31]](_0xd366x2c[_0xd28b[53]][_0xd28b[31]])};_0xd366x1f[_0xd28b[62]]= qs[_0xd28b[63]](_0xd366x2c[_0xd28b[53]][_0xd28b[63]]);_0xd366x1f[_0xd28b[64]]= qs[_0xd28b[55]](_[_0xd28b[65]](_0xd366x2c[_0xd28b[53]],_0xd366x2d[_0xd28b[55]]));if(_0xd366x2f[_0xd28b[52]]){if(_0xd366x2f[_0xd28b[54]]){_0xd366x2f[_0xd28b[54]]= moment(_0xd366x2f[_0xd28b[54]])[_0xd28b[67]](1,_0xd28b[66])}else {_0xd366x2f[_0xd28b[54]]= moment(_0xd366x2f[_0xd28b[52]])[_0xd28b[67]](1,_0xd28b[66])};_[_0xd28b[68]](_0xd366x1f[_0xd28b[64]],{createdAt:{$gte:_0xd366x2f[_0xd28b[52]],$lte:_0xd366x2f[_0xd28b[54]]}})};if(_0xd366x2c[_0xd28b[53]][_0xd28b[69]]){_0xd366x1f[_0xd28b[64]]= _[_0xd28b[68]](_0xd366x1f[_0xd28b[64]],{$or:_[_0xd28b[71]](_0xd366x1f[_0xd28b[57]],function(_0xd366x30){var _0xd366x2e={};_0xd366x2e[_0xd366x30]= {$like:_0xd28b[70]+ _0xd366x2c[_0xd28b[53]][_0xd28b[69]]+ _0xd28b[70]};return _0xd366x2e})})};_0xd366x1f= _[_0xd28b[68]]({},_0xd366x1f,_0xd366x2c[_0xd28b[72]]);var _0xd366x31={where:_0xd366x1f[_0xd28b[64]]};return db[_0xd28b[50]][_0xd28b[30]](_0xd366x31)[_0xd28b[40]](function(_0xd366x20){_0xd366x2e[_0xd28b[30]]= _0xd366x20;if(_0xd366x2c[_0xd28b[53]][_0xd28b[75]]){_0xd366x1f[_0xd28b[76]]= [{all:true}]};return db[_0xd28b[50]][_0xd28b[77]](_0xd366x1f)})[_0xd28b[40]](function(_0xd366x32){_0xd366x2e[_0xd28b[74]]= _0xd366x32;return _0xd366x2e})[_0xd28b[40]](respondWithFilteredResult(_0xd366x1a,_0xd366x1f))[_0xd28b[73]](handleError(_0xd366x1a,null))}
\ No newline at end of file
+var _0x59cf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4D\x69\x67\x72\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x59cf[0];var jsonpatch=require(_0x59cf[1]);var rp=require(_0x59cf[2]);var moment=require(_0x59cf[3]);var BPromise=require(_0x59cf[4]);var Mustache=require(_0x59cf[5]);var util=require(_0x59cf[6]);var path=require(_0x59cf[7]);var sox=require(_0x59cf[8]);var csv=require(_0x59cf[9]);var ejs=require(_0x59cf[10]);var fs=require(_0x59cf[11]);var _=require(_0x59cf[12]);var squel=require(_0x59cf[13]);var crypto=require(_0x59cf[14]);var jsforce=require(_0x59cf[15]);var deskjs=require(_0x59cf[16]);var toCsv=require(_0x59cf[9]);var querystring=require(_0x59cf[17]);var Papa=require(_0x59cf[18]);var qs=require(_0x59cf[19]);var logger=require(_0x59cf[21])(_0x59cf[20]);var utils=require(_0x59cf[22]);var config=require(_0x59cf[23]);var db=require(_0x59cf[25])[_0x59cf[24]];function respondWithStatusCode(_0x4fcex1a,_0x4fcex1b){_0x4fcex1b= _0x4fcex1b|| 204;return function(_0x4fcex1c){if(_0x4fcex1c){return _0x4fcex1a[_0x59cf[26]](_0x4fcex1b)};return _0x4fcex1a[_0x59cf[28]](_0x4fcex1b)[_0x59cf[27]]()}}function respondWithResult(_0x4fcex1a,_0x4fcex1b){_0x4fcex1b= _0x4fcex1b|| 200;return function(_0x4fcex1c){if(_0x4fcex1c){return _0x4fcex1a[_0x59cf[28]](_0x4fcex1b)[_0x59cf[29]](_0x4fcex1c)}}}function respondWithFilteredResult(_0x4fcex1a,_0x4fcex1f){return function(_0x4fcex1c){if(_0x4fcex1c){var _0x4fcex20=_0x4fcex1c[_0x59cf[30]],_0x4fcex21=_0x4fcex1f[_0x59cf[31]],_0x4fcex22=_0x4fcex1f[_0x59cf[31]]+ _0x4fcex1f[_0x59cf[32]],_0x4fcex1b;if(_0x4fcex22>= _0x4fcex20){_0x4fcex22= _0x4fcex20;_0x4fcex1b= 200}else {_0x4fcex1b= 206};_0x4fcex1a[_0x59cf[28]](_0x4fcex1b);return _0x4fcex1a[_0x59cf[36]](_0x59cf[33],_0x4fcex21+ _0x59cf[34]+ _0x4fcex22+ _0x59cf[35]+ _0x4fcex20)[_0x59cf[29]](_0x4fcex1c)};return null}}function patchUpdates(_0x4fcex24){return function(_0x4fcex1c){try{jsonpatch[_0x59cf[37]](_0x4fcex1c,_0x4fcex24,true)}catch(err){return BPromise[_0x59cf[38]](err)};return _0x4fcex1c[_0x59cf[39]]()}}function saveUpdates(_0x4fcex26,_0x4fcex1b){return function(_0x4fcex1c){if(_0x4fcex1c){return _0x4fcex1c[_0x59cf[41]](_0x4fcex26)[_0x59cf[40]](function(_0x4fcex27){return _0x4fcex27})};return null}}function removeEntity(_0x4fcex1a,_0x4fcex1b){return function(_0x4fcex1c){if(_0x4fcex1c){return _0x4fcex1c[_0x59cf[42]]()[_0x59cf[40]](function(){_0x4fcex1a[_0x59cf[28]](204)[_0x59cf[27]]()})}}}function handleEntityNotFound(_0x4fcex1a,_0x4fcex1b){return function(_0x4fcex1c){if(!_0x4fcex1c){_0x4fcex1a[_0x59cf[26]](404)};return _0x4fcex1c}}function handleError(_0x4fcex1a,_0x4fcex1b){_0x4fcex1b= _0x4fcex1b|| 500;return function(_0x4fcex2b){logger[_0x59cf[44]](_0x4fcex2b[_0x59cf[43]]);if(_0x4fcex2b[_0x59cf[45]]){delete _0x4fcex2b[_0x59cf[45]]};_0x4fcex1a[_0x59cf[28]](_0x4fcex1b)[_0x59cf[46]](_0x4fcex2b)}}exports[_0x59cf[47]]= function(_0x4fcex2c,_0x4fcex1a){var _0x4fcex1f={},_0x4fcex2d={},_0x4fcex2e={count:0,rows:[]};_0x4fcex2d[_0x59cf[48]]= _[_0x59cf[51]](db[_0x59cf[50]][_0x59cf[49]]);var _0x4fcex2f={dateStart:_0x4fcex2c[_0x59cf[53]][_0x59cf[52]],dateEnd:_0x4fcex2c[_0x59cf[53]][_0x59cf[54]]};delete _0x4fcex2c[_0x59cf[53]][_0x59cf[52]];delete _0x4fcex2c[_0x59cf[53]][_0x59cf[54]];_0x4fcex2d[_0x59cf[53]]= _[_0x59cf[51]](_0x4fcex2c[_0x59cf[53]]);_0x4fcex2d[_0x59cf[55]]= _[_0x59cf[56]](_0x4fcex2d[_0x59cf[48]],_0x4fcex2d[_0x59cf[53]]);_0x4fcex1f[_0x59cf[57]]= _[_0x59cf[56]](_0x4fcex2d[_0x59cf[48]],qs[_0x59cf[58]](_0x4fcex2c[_0x59cf[53]][_0x59cf[58]]));_0x4fcex1f[_0x59cf[57]]= (_0x4fcex1f[_0x59cf[57]][_0x59cf[59]])?_0x4fcex1f[_0x59cf[57]]:_0x4fcex2d[_0x59cf[48]];if(!_0x4fcex2c[_0x59cf[53]][_0x59cf[61]](_0x59cf[60])){_0x4fcex1f[_0x59cf[32]]= qs[_0x59cf[32]](_0x4fcex2c[_0x59cf[53]][_0x59cf[32]]);_0x4fcex1f[_0x59cf[31]]= qs[_0x59cf[31]](_0x4fcex2c[_0x59cf[53]][_0x59cf[31]])};_0x4fcex1f[_0x59cf[62]]= qs[_0x59cf[63]](_0x4fcex2c[_0x59cf[53]][_0x59cf[63]]);_0x4fcex1f[_0x59cf[64]]= qs[_0x59cf[55]](_[_0x59cf[65]](_0x4fcex2c[_0x59cf[53]],_0x4fcex2d[_0x59cf[55]]));if(_0x4fcex2f[_0x59cf[52]]){if(_0x4fcex2f[_0x59cf[54]]){_0x4fcex2f[_0x59cf[54]]= moment(_0x4fcex2f[_0x59cf[54]])[_0x59cf[67]](1,_0x59cf[66])}else {_0x4fcex2f[_0x59cf[54]]= moment(_0x4fcex2f[_0x59cf[52]])[_0x59cf[67]](1,_0x59cf[66])};_[_0x59cf[68]](_0x4fcex1f[_0x59cf[64]],{createdAt:{$gte:_0x4fcex2f[_0x59cf[52]],$lte:_0x4fcex2f[_0x59cf[54]]}})};if(_0x4fcex2c[_0x59cf[53]][_0x59cf[69]]){_0x4fcex1f[_0x59cf[64]]= _[_0x59cf[68]](_0x4fcex1f[_0x59cf[64]],{$or:_[_0x59cf[71]](_0x4fcex1f[_0x59cf[57]],function(_0x4fcex30){var _0x4fcex2e={};_0x4fcex2e[_0x4fcex30]= {$like:_0x59cf[70]+ _0x4fcex2c[_0x59cf[53]][_0x59cf[69]]+ _0x59cf[70]};return _0x4fcex2e})})};_0x4fcex1f= _[_0x59cf[68]]({},_0x4fcex1f,_0x4fcex2c[_0x59cf[72]]);var _0x4fcex31={where:_0x4fcex1f[_0x59cf[64]]};return db[_0x59cf[50]][_0x59cf[30]](_0x4fcex31)[_0x59cf[40]](function(_0x4fcex20){_0x4fcex2e[_0x59cf[30]]= _0x4fcex20;if(_0x4fcex2c[_0x59cf[53]][_0x59cf[75]]){_0x4fcex1f[_0x59cf[76]]= [{all:true}]};return db[_0x59cf[50]][_0x59cf[77]](_0x4fcex1f)})[_0x59cf[40]](function(_0x4fcex32){_0x4fcex2e[_0x59cf[74]]= _0x4fcex32;return _0x4fcex2e})[_0x59cf[40]](respondWithFilteredResult(_0x4fcex1a,_0x4fcex1f))[_0x59cf[73]](handleError(_0x4fcex1a,null))}
\ No newline at end of file
index 467e118..ba7373f 100644 (file)
@@ -1 +1 @@
-var _0xf469=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x69\x67\x72\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x69\x67\x72\x61\x74\x69\x6F\x6E","\x6D\x69\x67\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xf469[0];var _=require(_0xf469[1]);var util=require(_0xf469[2]);var logger=require(_0xf469[4])(_0xf469[3]);var moment=require(_0xf469[5]);var BPromise=require(_0xf469[6]);var rp=require(_0xf469[7]);var attributes=require(_0xf469[8]);module[_0xf469[9]]= function(_0xefe0x8,_0xefe0x9){return _0xefe0x8[_0xf469[12]](_0xf469[10],attributes,{tableName:_0xf469[11],paranoid:false,indexes:[],timestamps:false})}
\ No newline at end of file
+var _0xa44a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6D\x69\x67\x72\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x69\x67\x72\x61\x74\x69\x6F\x6E","\x6D\x69\x67\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xa44a[0];var _=require(_0xa44a[1]);var util=require(_0xa44a[2]);var logger=require(_0xa44a[4])(_0xa44a[3]);var moment=require(_0xa44a[5]);var BPromise=require(_0xa44a[6]);var rp=require(_0xa44a[7]);var attributes=require(_0xa44a[8]);module[_0xa44a[9]]= function(_0x9e5ax8,_0x9e5ax9){return _0x9e5ax8[_0xa44a[12]](_0xa44a[10],attributes,{tableName:_0xa44a[11],paranoid:false,indexes:[],timestamps:false})}
\ No newline at end of file
index 4638169..b018ce4 100644 (file)
@@ -1 +1 @@
-var _0x477e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x69\x67\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x69\x67\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x477e[0];var _=require(_0x477e[1]);var util=require(_0x477e[2]);var moment=require(_0x477e[3]);var BPromise=require(_0x477e[4]);var rs=require(_0x477e[5]);var fs=require(_0x477e[6]);var db=require(_0x477e[8])[_0x477e[7]];var utils=require(_0x477e[9]);var logger=require(_0x477e[11])(_0x477e[10]);var config=require(_0x477e[12]);var jayson=require(_0x477e[13]);var client=jayson[_0x477e[15]][_0x477e[14]]({port:9002});function respondWithRpcPromise(_0x324exe,_0x324exf,_0x324ex10){return  new BPromise(function(_0x324ex11,_0x324ex12){return client[_0x477e[28]](_0x324exe,_0x324ex10)[_0x477e[27]](function(_0x324ex14){logger[_0x477e[20]](_0x477e[16],_0x324exf,_0x477e[19]);logger[_0x477e[23]](_0x477e[21],_0x324exf,_0x477e[19],JSON[_0x477e[22]](_0x324ex14));if(_0x324ex14[_0x477e[17]]){if(_0x324ex14[_0x477e[17]][_0x477e[24]]=== 500){logger[_0x477e[17]](_0x477e[16],_0x324exf,_0x324ex14[_0x477e[17]][_0x477e[25]]);return _0x324ex12(_0x324ex14[_0x477e[17]][_0x477e[25]])};logger[_0x477e[17]](_0x477e[16],_0x324exf,_0x324ex14[_0x477e[17]][_0x477e[25]]);return _0x324ex11(_0x324ex14[_0x477e[17]][_0x477e[25]])}else {logger[_0x477e[20]](_0x477e[16],_0x324exf,_0x477e[19]);_0x324ex11(_0x324ex14[_0x477e[26]][_0x477e[25]])}})[_0x477e[18]](function(_0x324ex13){logger[_0x477e[17]](_0x477e[16],_0x324exf,_0x324ex13);_0x324ex12(_0x324ex13)})})}
\ No newline at end of file
+var _0x5766=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4D\x69\x67\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4D\x69\x67\x72\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x5766[0];var _=require(_0x5766[1]);var util=require(_0x5766[2]);var moment=require(_0x5766[3]);var BPromise=require(_0x5766[4]);var rs=require(_0x5766[5]);var fs=require(_0x5766[6]);var db=require(_0x5766[8])[_0x5766[7]];var utils=require(_0x5766[9]);var logger=require(_0x5766[11])(_0x5766[10]);var config=require(_0x5766[12]);var jayson=require(_0x5766[13]);var client=jayson[_0x5766[15]][_0x5766[14]]({port:9002});function respondWithRpcPromise(_0x44f7xe,_0x44f7xf,_0x44f7x10){return  new BPromise(function(_0x44f7x11,_0x44f7x12){return client[_0x5766[28]](_0x44f7xe,_0x44f7x10)[_0x5766[27]](function(_0x44f7x14){logger[_0x5766[20]](_0x5766[16],_0x44f7xf,_0x5766[19]);logger[_0x5766[23]](_0x5766[21],_0x44f7xf,_0x5766[19],JSON[_0x5766[22]](_0x44f7x14));if(_0x44f7x14[_0x5766[17]]){if(_0x44f7x14[_0x5766[17]][_0x5766[24]]=== 500){logger[_0x5766[17]](_0x5766[16],_0x44f7xf,_0x44f7x14[_0x5766[17]][_0x5766[25]]);return _0x44f7x12(_0x44f7x14[_0x5766[17]][_0x5766[25]])};logger[_0x5766[17]](_0x5766[16],_0x44f7xf,_0x44f7x14[_0x5766[17]][_0x5766[25]]);return _0x44f7x11(_0x44f7x14[_0x5766[17]][_0x5766[25]])}else {logger[_0x5766[20]](_0x5766[16],_0x44f7xf,_0x5766[19]);_0x44f7x11(_0x44f7x14[_0x5766[26]][_0x5766[25]])}})[_0x5766[18]](function(_0x44f7x13){logger[_0x5766[17]](_0x5766[16],_0x44f7xf,_0x44f7x13);_0x44f7x12(_0x44f7x13)})})}
\ No newline at end of file
index afa5db9..671a693 100644 (file)
@@ -1 +1 @@
-var _0xe16f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xe16f[0];var multer=require(_0xe16f[1]);var util=require(_0xe16f[2]);var path=require(_0xe16f[3]);var express=require(_0xe16f[4]);var router=express.Router();var auth=require(_0xe16f[5]);var interaction=require(_0xe16f[6]);var config=require(_0xe16f[7]);var controller=require(_0xe16f[8]);router[_0xe16f[12]](_0xe16f[9],auth[_0xe16f[10]](),controller[_0xe16f[11]]);router[_0xe16f[12]](_0xe16f[13],auth[_0xe16f[10]](),controller[_0xe16f[14]]);router[_0xe16f[16]](_0xe16f[9],auth[_0xe16f[10]](),controller[_0xe16f[15]]);router[_0xe16f[18]](_0xe16f[13],auth[_0xe16f[10]](),controller[_0xe16f[17]]);router[_0xe16f[20]](_0xe16f[13],auth[_0xe16f[10]](),controller[_0xe16f[19]]);module[_0xe16f[21]]= router
\ No newline at end of file
+var _0x451c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x451c[0];var multer=require(_0x451c[1]);var util=require(_0x451c[2]);var path=require(_0x451c[3]);var express=require(_0x451c[4]);var router=express.Router();var auth=require(_0x451c[5]);var interaction=require(_0x451c[6]);var config=require(_0x451c[7]);var controller=require(_0x451c[8]);router[_0x451c[12]](_0x451c[9],auth[_0x451c[10]](),controller[_0x451c[11]]);router[_0x451c[12]](_0x451c[13],auth[_0x451c[10]](),controller[_0x451c[14]]);router[_0x451c[16]](_0x451c[9],auth[_0x451c[10]](),controller[_0x451c[15]]);router[_0x451c[18]](_0x451c[13],auth[_0x451c[10]](),controller[_0x451c[17]]);router[_0x451c[20]](_0x451c[13],auth[_0x451c[10]](),controller[_0x451c[19]]);module[_0x451c[21]]= router
\ No newline at end of file
index 69913dd..114c701 100644 (file)
@@ -1 +1 @@
-var _0x4215=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x6C\x6F\x63\x61\x6C\x6E\x65\x74","\x65\x78\x74\x65\x72\x6E\x69\x70","\x53\x54\x52\x49\x4E\x47"];_0x4215[0];var Sequelize=require(_0x4215[1]);module[_0x4215[2]]= {type:{type:Sequelize.ENUM(_0x4215[3],_0x4215[4])},value:{type:Sequelize[_0x4215[5]]}}
\ No newline at end of file
+var _0x83d8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x6C\x6F\x63\x61\x6C\x6E\x65\x74","\x65\x78\x74\x65\x72\x6E\x69\x70","\x53\x54\x52\x49\x4E\x47"];_0x83d8[0];var Sequelize=require(_0x83d8[1]);module[_0x83d8[2]]= {type:{type:Sequelize.ENUM(_0x83d8[3],_0x83d8[4])},value:{type:Sequelize[_0x83d8[5]]}}
\ No newline at end of file
index 85a7e84..8c31a0e 100644 (file)
@@ -1 +1 @@
-var _0xc331=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4E\x65\x74\x77\x6F\x72\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4E\x65\x74\x77\x6F\x72\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4E\x65\x74\x77\x6F\x72\x6B","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x52\x65\x6C\x6F\x61\x64","\x63\x68\x61\x6E\x5F\x73\x69\x70\x2E\x73\x6F","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x2E\x65\x6A\x73","\x6A\x6F\x69\x6E","\x75\x74\x66\x38","\x72\x65\x61\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x72\x65\x6E\x64\x65\x72","\x2F\x65\x74\x63\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x25\x73\x2E\x63\x6F\x6E\x66","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x74\x79\x70\x65","\x62\x6F\x64\x79","\x66\x6F\x72\x6D\x61\x74","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65"];_0xc331[0];var jsonpatch=require(_0xc331[1]);var rp=require(_0xc331[2]);var moment=require(_0xc331[3]);var BPromise=require(_0xc331[4]);var Mustache=require(_0xc331[5]);var util=require(_0xc331[6]);var path=require(_0xc331[7]);var sox=require(_0xc331[8]);var csv=require(_0xc331[9]);var ejs=require(_0xc331[10]);var fs=require(_0xc331[11]);var _=require(_0xc331[12]);var squel=require(_0xc331[13]);var crypto=require(_0xc331[14]);var jsforce=require(_0xc331[15]);var deskjs=require(_0xc331[16]);var toCsv=require(_0xc331[9]);var querystring=require(_0xc331[17]);var Papa=require(_0xc331[18]);var qs=require(_0xc331[19]);var logger=require(_0xc331[21])(_0xc331[20]);var utils=require(_0xc331[22]);var config=require(_0xc331[23]);var db=require(_0xc331[25])[_0xc331[24]];var jayson=require(_0xc331[26]);var client=jayson[_0xc331[28]][_0xc331[27]]({port:9002});function respondWithRpcPromise(_0x6096x1c,_0x6096x1d,_0x6096x1e,_0x6096x1f){return  new BPromise(function(_0x6096x20,_0x6096x21){var _0x6096x22=(_0x6096x1f|| client);return _0x6096x22[_0xc331[41]](_0x6096x1c,_0x6096x1e)[_0xc331[40]](function(_0x6096x24){logger[_0xc331[33]](_0xc331[29],_0x6096x1d,_0xc331[32]);logger[_0xc331[36]](_0xc331[34],_0x6096x1d,_0xc331[32],JSON[_0xc331[35]](_0x6096x24));if(_0x6096x24[_0xc331[30]]){if(_0x6096x24[_0xc331[30]][_0xc331[37]]=== 500){logger[_0xc331[30]](_0xc331[29],_0x6096x1d,_0x6096x24[_0xc331[30]][_0xc331[38]]);return _0x6096x21(_0x6096x24[_0xc331[30]][_0xc331[38]])};logger[_0xc331[30]](_0xc331[29],_0x6096x1d,_0x6096x24[_0xc331[30]][_0xc331[38]]);return _0x6096x20(_0x6096x24[_0xc331[30]][_0xc331[38]])}else {logger[_0xc331[33]](_0xc331[29],_0x6096x1d,_0xc331[32]);_0x6096x20(_0x6096x24[_0xc331[39]][_0xc331[38]])}})[_0xc331[31]](function(_0x6096x23){logger[_0xc331[30]](_0xc331[29],_0x6096x1d,_0x6096x23);_0x6096x21(_0x6096x23)})})}function respondWithStatusCode(_0x6096x24,_0x6096x26){_0x6096x26= _0x6096x26|| 204;return function(_0x6096x27){if(_0x6096x27){return _0x6096x24[_0xc331[42]](_0x6096x26)};return _0x6096x24[_0xc331[44]](_0x6096x26)[_0xc331[43]]()}}function respondWithResult(_0x6096x24,_0x6096x26){_0x6096x26= _0x6096x26|| 200;return function(_0x6096x27){if(_0x6096x27){return _0x6096x24[_0xc331[44]](_0x6096x26)[_0xc331[45]](_0x6096x27)}}}function respondWithFilteredResult(_0x6096x24,_0x6096x2a){return function(_0x6096x27){if(_0x6096x27){var _0x6096x2b=_0x6096x27[_0xc331[46]],_0x6096x2c=_0x6096x2a[_0xc331[47]],_0x6096x2d=_0x6096x2a[_0xc331[47]]+ _0x6096x2a[_0xc331[48]],_0x6096x26;if(_0x6096x2d>= _0x6096x2b){_0x6096x2d= _0x6096x2b;_0x6096x26= 200}else {_0x6096x26= 206};_0x6096x24[_0xc331[44]](_0x6096x26);return _0x6096x24[_0xc331[52]](_0xc331[49],_0x6096x2c+ _0xc331[50]+ _0x6096x2d+ _0xc331[51]+ _0x6096x2b)[_0xc331[45]](_0x6096x27)};return null}}function patchUpdates(_0x6096x2f){return function(_0x6096x27){try{jsonpatch[_0xc331[53]](_0x6096x27,_0x6096x2f,true)}catch(err){return BPromise[_0xc331[54]](err)};return _0x6096x27[_0xc331[55]]()}}function saveUpdates(_0x6096x31,_0x6096x26){return function(_0x6096x27){if(_0x6096x27){return _0x6096x27[_0xc331[56]](_0x6096x31)[_0xc331[40]](function(_0x6096x32){return _0x6096x32})};return null}}function removeEntity(_0x6096x24,_0x6096x26){return function(_0x6096x27){if(_0x6096x27){return _0x6096x27[_0xc331[57]]()[_0xc331[40]](function(){_0x6096x24[_0xc331[44]](204)[_0xc331[43]]()})}}}function handleEntityNotFound(_0x6096x24,_0x6096x26){return function(_0x6096x27){if(!_0x6096x27){_0x6096x24[_0xc331[42]](404)};return _0x6096x27}}function handleError(_0x6096x24,_0x6096x26){_0x6096x26= _0x6096x26|| 500;return function(_0x6096x23){logger[_0xc331[30]](_0x6096x23[_0xc331[58]]);if(_0x6096x23[_0xc331[59]]){delete _0x6096x23[_0xc331[59]]};_0x6096x24[_0xc331[44]](_0x6096x26)[_0xc331[60]](_0x6096x23)}}exports[_0xc331[61]]= function(_0x6096x1e,_0x6096x24){var _0x6096x2a={},_0x6096x36={},_0x6096x37={count:0,rows:[]};_0x6096x36[_0xc331[62]]= _[_0xc331[65]](db[_0xc331[64]][_0xc331[63]]);var _0x6096x38={dateStart:_0x6096x1e[_0xc331[67]][_0xc331[66]],dateEnd:_0x6096x1e[_0xc331[67]][_0xc331[68]]};delete _0x6096x1e[_0xc331[67]][_0xc331[66]];delete _0x6096x1e[_0xc331[67]][_0xc331[68]];_0x6096x36[_0xc331[67]]= _[_0xc331[65]](_0x6096x1e[_0xc331[67]]);_0x6096x36[_0xc331[69]]= _[_0xc331[70]](_0x6096x36[_0xc331[62]],_0x6096x36[_0xc331[67]]);_0x6096x2a[_0xc331[71]]= _[_0xc331[70]](_0x6096x36[_0xc331[62]],qs[_0xc331[72]](_0x6096x1e[_0xc331[67]][_0xc331[72]]));_0x6096x2a[_0xc331[71]]= (_0x6096x2a[_0xc331[71]][_0xc331[73]])?_0x6096x2a[_0xc331[71]]:_0x6096x36[_0xc331[62]];if(!_0x6096x1e[_0xc331[67]][_0xc331[75]](_0xc331[74])){_0x6096x2a[_0xc331[48]]= qs[_0xc331[48]](_0x6096x1e[_0xc331[67]][_0xc331[48]]);_0x6096x2a[_0xc331[47]]= qs[_0xc331[47]](_0x6096x1e[_0xc331[67]][_0xc331[47]])};_0x6096x2a[_0xc331[76]]= qs[_0xc331[77]](_0x6096x1e[_0xc331[67]][_0xc331[77]]);_0x6096x2a[_0xc331[78]]= qs[_0xc331[69]](_[_0xc331[79]](_0x6096x1e[_0xc331[67]],_0x6096x36[_0xc331[69]]));if(_0x6096x38[_0xc331[66]]){if(_0x6096x38[_0xc331[68]]){_0x6096x38[_0xc331[68]]= moment(_0x6096x38[_0xc331[68]])[_0xc331[81]](1,_0xc331[80])}else {_0x6096x38[_0xc331[68]]= moment(_0x6096x38[_0xc331[66]])[_0xc331[81]](1,_0xc331[80])};_[_0xc331[82]](_0x6096x2a[_0xc331[78]],{createdAt:{$gte:_0x6096x38[_0xc331[66]],$lte:_0x6096x38[_0xc331[68]]}})};if(_0x6096x1e[_0xc331[67]][_0xc331[83]]){_0x6096x2a[_0xc331[78]]= _[_0xc331[82]](_0x6096x2a[_0xc331[78]],{$or:_[_0xc331[85]](_0x6096x2a[_0xc331[71]],function(_0x6096x39){var _0x6096x37={};_0x6096x37[_0x6096x39]= {$like:_0xc331[84]+ _0x6096x1e[_0xc331[67]][_0xc331[83]]+ _0xc331[84]};return _0x6096x37})})};_0x6096x2a= _[_0xc331[82]]({},_0x6096x2a,_0x6096x1e[_0xc331[86]]);var _0x6096x3a={where:_0x6096x2a[_0xc331[78]]};return db[_0xc331[64]][_0xc331[46]](_0x6096x3a)[_0xc331[40]](function(_0x6096x2b){_0x6096x37[_0xc331[46]]= _0x6096x2b;if(_0x6096x1e[_0xc331[67]][_0xc331[88]]){_0x6096x2a[_0xc331[89]]= [{all:true}]};return db[_0xc331[64]][_0xc331[90]](_0x6096x2a)})[_0xc331[40]](function(_0x6096x3b){_0x6096x37[_0xc331[87]]= _0x6096x3b;return _0x6096x37})[_0xc331[40]](respondWithFilteredResult(_0x6096x24,_0x6096x2a))[_0xc331[31]](handleError(_0x6096x24,null))};exports[_0xc331[91]]= function(_0x6096x1e,_0x6096x24){var _0x6096x2a={raw:true,where:{id:_0x6096x1e[_0xc331[93]][_0xc331[92]]}},_0x6096x36={};_0x6096x36[_0xc331[62]]= _[_0xc331[65]](db[_0xc331[64]][_0xc331[63]]);_0x6096x36[_0xc331[67]]= _[_0xc331[65]](_0x6096x1e[_0xc331[67]]);_0x6096x36[_0xc331[69]]= _[_0xc331[70]](_0x6096x36[_0xc331[62]],_0x6096x36[_0xc331[67]]);_0x6096x2a[_0xc331[71]]= _[_0xc331[70]](_0x6096x36[_0xc331[62]],qs[_0xc331[72]](_0x6096x1e[_0xc331[67]][_0xc331[72]]));_0x6096x2a[_0xc331[71]]= (_0x6096x2a[_0xc331[71]][_0xc331[73]])?_0x6096x2a[_0xc331[71]]:_0x6096x36[_0xc331[62]];if(_0x6096x1e[_0xc331[67]][_0xc331[88]]){_0x6096x2a[_0xc331[89]]= [{all:true}]};_0x6096x2a= _[_0xc331[82]]({},_0x6096x2a,_0x6096x1e[_0xc331[86]]);return db[_0xc331[64]][_0xc331[94]](_0x6096x2a)[_0xc331[40]](handleEntityNotFound(_0x6096x24,null))[_0xc331[40]](respondWithResult(_0x6096x24,null))[_0xc331[31]](handleError(_0x6096x24,null))};exports[_0xc331[95]]= function(_0x6096x1e,_0x6096x24,_0x6096x3c){var _0x6096x3d;return db[_0xc331[111]][_0xc331[110]](function(_0x6096x3e){return db[_0xc331[64]][_0xc331[95]](_0x6096x1e[_0xc331[107]],{raw:true})[_0xc331[40]](function(_0x6096x27){_0x6096x3d= _0x6096x27;return db[_0xc331[64]][_0xc331[90]]({where:{type:_0x6096x1e[_0xc331[107]][_0xc331[106]]},raw:true})})[_0xc331[40]](function(_0x6096x3f){var _0x6096x40=fs[_0xc331[102]](path[_0xc331[100]](config[_0xc331[98]],_0xc331[99]),_0xc331[101]);var _0x6096x41=ejs[_0xc331[103]](_0x6096x40,{networks:_0x6096x3f|| []});fs[_0xc331[109]](util[_0xc331[108]](_0xc331[104],_0x6096x1e[_0xc331[107]][_0xc331[106]][_0xc331[105]]()),_0x6096x41)})[_0xc331[40]](function(){return respondWithRpcPromise(_0xc331[96],_0xc331[95],{module:_0xc331[97]})})[_0xc331[40]](function(){return _0x6096x3d})})[_0xc331[40]](respondWithResult(_0x6096x24,201))[_0xc331[31]](handleError(_0x6096x24,null))};exports[_0xc331[56]]= function(_0x6096x1e,_0x6096x24,_0x6096x3c){var _0x6096x3d;return db[_0xc331[111]][_0xc331[110]](function(_0x6096x3e){return db[_0xc331[64]][_0xc331[94]]({where:{id:_0x6096x1e[_0xc331[93]][_0xc331[92]]}})[_0xc331[40]](handleEntityNotFound(_0x6096x24,null))[_0xc331[40]](saveUpdates(_0x6096x1e[_0xc331[107]],null))[_0xc331[40]](function(_0x6096x27){if(_0x6096x27){_0x6096x3d= _0x6096x27;return db[_0xc331[64]][_0xc331[90]]({where:{type:_0x6096x3d[_0xc331[106]]},raw:true})};return null})[_0xc331[40]](function(_0x6096x3f){if(_0x6096x3f){var _0x6096x40=fs[_0xc331[102]](path[_0xc331[100]](config[_0xc331[98]],_0xc331[99]),_0xc331[101]);var _0x6096x41=ejs[_0xc331[103]](_0x6096x40,{networks:_0x6096x3f|| []});fs[_0xc331[109]](util[_0xc331[108]](_0xc331[104],_0x6096x3d[_0xc331[106]][_0xc331[105]]()),_0x6096x41);return respondWithRpcPromise(_0xc331[96],_0xc331[56],{module:_0xc331[97]})};return null})[_0xc331[40]](function(_0x6096x27){if(_0x6096x27){return _0x6096x3d};return null})})[_0xc331[40]](respondWithResult(_0x6096x24,null))[_0xc331[31]](handleError(_0x6096x24,null))};exports[_0xc331[57]]= function(_0x6096x1e,_0x6096x24,_0x6096x3c){var _0x6096x3d;return db[_0xc331[64]][_0xc331[94]]({where:{id:_0x6096x1e[_0xc331[93]][_0xc331[92]]}})[_0xc331[40]](function(_0x6096x27){_0x6096x3d= _0x6096x27;return _0x6096x27})[_0xc331[40]](handleEntityNotFound(_0x6096x24,null))[_0xc331[40]](removeEntity(_0x6096x24,null))[_0xc331[40]](function(){if(_0x6096x3d){return db[_0xc331[64]][_0xc331[90]]({where:{type:_0x6096x3d[_0xc331[106]]},raw:true})}})[_0xc331[40]](function(_0x6096x3f){if(_0x6096x3f){var _0x6096x40=fs[_0xc331[102]](path[_0xc331[100]](config[_0xc331[98]],_0xc331[99]),_0xc331[101]);var _0x6096x41=ejs[_0xc331[103]](_0x6096x40,{networks:_0x6096x3f|| []});fs[_0xc331[109]](util[_0xc331[108]](_0xc331[104],_0x6096x3d[_0xc331[106]][_0xc331[105]]()),_0x6096x41);return respondWithRpcPromise(_0xc331[96],_0xc331[57],{module:_0xc331[97]})}})[_0xc331[31]](handleError(_0x6096x24,null))}
\ No newline at end of file
+var _0xa415=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4E\x65\x74\x77\x6F\x72\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4E\x65\x74\x77\x6F\x72\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4E\x65\x74\x77\x6F\x72\x6B","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x52\x65\x6C\x6F\x61\x64","\x63\x68\x61\x6E\x5F\x73\x69\x70\x2E\x73\x6F","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x2E\x65\x6A\x73","\x6A\x6F\x69\x6E","\x75\x74\x66\x38","\x72\x65\x61\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x72\x65\x6E\x64\x65\x72","\x2F\x65\x74\x63\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x25\x73\x2E\x63\x6F\x6E\x66","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x74\x79\x70\x65","\x62\x6F\x64\x79","\x66\x6F\x72\x6D\x61\x74","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65"];_0xa415[0];var jsonpatch=require(_0xa415[1]);var rp=require(_0xa415[2]);var moment=require(_0xa415[3]);var BPromise=require(_0xa415[4]);var Mustache=require(_0xa415[5]);var util=require(_0xa415[6]);var path=require(_0xa415[7]);var sox=require(_0xa415[8]);var csv=require(_0xa415[9]);var ejs=require(_0xa415[10]);var fs=require(_0xa415[11]);var _=require(_0xa415[12]);var squel=require(_0xa415[13]);var crypto=require(_0xa415[14]);var jsforce=require(_0xa415[15]);var deskjs=require(_0xa415[16]);var toCsv=require(_0xa415[9]);var querystring=require(_0xa415[17]);var Papa=require(_0xa415[18]);var qs=require(_0xa415[19]);var logger=require(_0xa415[21])(_0xa415[20]);var utils=require(_0xa415[22]);var config=require(_0xa415[23]);var db=require(_0xa415[25])[_0xa415[24]];var jayson=require(_0xa415[26]);var client=jayson[_0xa415[28]][_0xa415[27]]({port:9002});function respondWithRpcPromise(_0x4747x1c,_0x4747x1d,_0x4747x1e,_0x4747x1f){return  new BPromise(function(_0x4747x20,_0x4747x21){var _0x4747x22=(_0x4747x1f|| client);return _0x4747x22[_0xa415[41]](_0x4747x1c,_0x4747x1e)[_0xa415[40]](function(_0x4747x24){logger[_0xa415[33]](_0xa415[29],_0x4747x1d,_0xa415[32]);logger[_0xa415[36]](_0xa415[34],_0x4747x1d,_0xa415[32],JSON[_0xa415[35]](_0x4747x24));if(_0x4747x24[_0xa415[30]]){if(_0x4747x24[_0xa415[30]][_0xa415[37]]=== 500){logger[_0xa415[30]](_0xa415[29],_0x4747x1d,_0x4747x24[_0xa415[30]][_0xa415[38]]);return _0x4747x21(_0x4747x24[_0xa415[30]][_0xa415[38]])};logger[_0xa415[30]](_0xa415[29],_0x4747x1d,_0x4747x24[_0xa415[30]][_0xa415[38]]);return _0x4747x20(_0x4747x24[_0xa415[30]][_0xa415[38]])}else {logger[_0xa415[33]](_0xa415[29],_0x4747x1d,_0xa415[32]);_0x4747x20(_0x4747x24[_0xa415[39]][_0xa415[38]])}})[_0xa415[31]](function(_0x4747x23){logger[_0xa415[30]](_0xa415[29],_0x4747x1d,_0x4747x23);_0x4747x21(_0x4747x23)})})}function respondWithStatusCode(_0x4747x24,_0x4747x26){_0x4747x26= _0x4747x26|| 204;return function(_0x4747x27){if(_0x4747x27){return _0x4747x24[_0xa415[42]](_0x4747x26)};return _0x4747x24[_0xa415[44]](_0x4747x26)[_0xa415[43]]()}}function respondWithResult(_0x4747x24,_0x4747x26){_0x4747x26= _0x4747x26|| 200;return function(_0x4747x27){if(_0x4747x27){return _0x4747x24[_0xa415[44]](_0x4747x26)[_0xa415[45]](_0x4747x27)}}}function respondWithFilteredResult(_0x4747x24,_0x4747x2a){return function(_0x4747x27){if(_0x4747x27){var _0x4747x2b=_0x4747x27[_0xa415[46]],_0x4747x2c=_0x4747x2a[_0xa415[47]],_0x4747x2d=_0x4747x2a[_0xa415[47]]+ _0x4747x2a[_0xa415[48]],_0x4747x26;if(_0x4747x2d>= _0x4747x2b){_0x4747x2d= _0x4747x2b;_0x4747x26= 200}else {_0x4747x26= 206};_0x4747x24[_0xa415[44]](_0x4747x26);return _0x4747x24[_0xa415[52]](_0xa415[49],_0x4747x2c+ _0xa415[50]+ _0x4747x2d+ _0xa415[51]+ _0x4747x2b)[_0xa415[45]](_0x4747x27)};return null}}function patchUpdates(_0x4747x2f){return function(_0x4747x27){try{jsonpatch[_0xa415[53]](_0x4747x27,_0x4747x2f,true)}catch(err){return BPromise[_0xa415[54]](err)};return _0x4747x27[_0xa415[55]]()}}function saveUpdates(_0x4747x31,_0x4747x26){return function(_0x4747x27){if(_0x4747x27){return _0x4747x27[_0xa415[56]](_0x4747x31)[_0xa415[40]](function(_0x4747x32){return _0x4747x32})};return null}}function removeEntity(_0x4747x24,_0x4747x26){return function(_0x4747x27){if(_0x4747x27){return _0x4747x27[_0xa415[57]]()[_0xa415[40]](function(){_0x4747x24[_0xa415[44]](204)[_0xa415[43]]()})}}}function handleEntityNotFound(_0x4747x24,_0x4747x26){return function(_0x4747x27){if(!_0x4747x27){_0x4747x24[_0xa415[42]](404)};return _0x4747x27}}function handleError(_0x4747x24,_0x4747x26){_0x4747x26= _0x4747x26|| 500;return function(_0x4747x23){logger[_0xa415[30]](_0x4747x23[_0xa415[58]]);if(_0x4747x23[_0xa415[59]]){delete _0x4747x23[_0xa415[59]]};_0x4747x24[_0xa415[44]](_0x4747x26)[_0xa415[60]](_0x4747x23)}}exports[_0xa415[61]]= function(_0x4747x1e,_0x4747x24){var _0x4747x2a={},_0x4747x36={},_0x4747x37={count:0,rows:[]};_0x4747x36[_0xa415[62]]= _[_0xa415[65]](db[_0xa415[64]][_0xa415[63]]);var _0x4747x38={dateStart:_0x4747x1e[_0xa415[67]][_0xa415[66]],dateEnd:_0x4747x1e[_0xa415[67]][_0xa415[68]]};delete _0x4747x1e[_0xa415[67]][_0xa415[66]];delete _0x4747x1e[_0xa415[67]][_0xa415[68]];_0x4747x36[_0xa415[67]]= _[_0xa415[65]](_0x4747x1e[_0xa415[67]]);_0x4747x36[_0xa415[69]]= _[_0xa415[70]](_0x4747x36[_0xa415[62]],_0x4747x36[_0xa415[67]]);_0x4747x2a[_0xa415[71]]= _[_0xa415[70]](_0x4747x36[_0xa415[62]],qs[_0xa415[72]](_0x4747x1e[_0xa415[67]][_0xa415[72]]));_0x4747x2a[_0xa415[71]]= (_0x4747x2a[_0xa415[71]][_0xa415[73]])?_0x4747x2a[_0xa415[71]]:_0x4747x36[_0xa415[62]];if(!_0x4747x1e[_0xa415[67]][_0xa415[75]](_0xa415[74])){_0x4747x2a[_0xa415[48]]= qs[_0xa415[48]](_0x4747x1e[_0xa415[67]][_0xa415[48]]);_0x4747x2a[_0xa415[47]]= qs[_0xa415[47]](_0x4747x1e[_0xa415[67]][_0xa415[47]])};_0x4747x2a[_0xa415[76]]= qs[_0xa415[77]](_0x4747x1e[_0xa415[67]][_0xa415[77]]);_0x4747x2a[_0xa415[78]]= qs[_0xa415[69]](_[_0xa415[79]](_0x4747x1e[_0xa415[67]],_0x4747x36[_0xa415[69]]));if(_0x4747x38[_0xa415[66]]){if(_0x4747x38[_0xa415[68]]){_0x4747x38[_0xa415[68]]= moment(_0x4747x38[_0xa415[68]])[_0xa415[81]](1,_0xa415[80])}else {_0x4747x38[_0xa415[68]]= moment(_0x4747x38[_0xa415[66]])[_0xa415[81]](1,_0xa415[80])};_[_0xa415[82]](_0x4747x2a[_0xa415[78]],{createdAt:{$gte:_0x4747x38[_0xa415[66]],$lte:_0x4747x38[_0xa415[68]]}})};if(_0x4747x1e[_0xa415[67]][_0xa415[83]]){_0x4747x2a[_0xa415[78]]= _[_0xa415[82]](_0x4747x2a[_0xa415[78]],{$or:_[_0xa415[85]](_0x4747x2a[_0xa415[71]],function(_0x4747x39){var _0x4747x37={};_0x4747x37[_0x4747x39]= {$like:_0xa415[84]+ _0x4747x1e[_0xa415[67]][_0xa415[83]]+ _0xa415[84]};return _0x4747x37})})};_0x4747x2a= _[_0xa415[82]]({},_0x4747x2a,_0x4747x1e[_0xa415[86]]);var _0x4747x3a={where:_0x4747x2a[_0xa415[78]]};return db[_0xa415[64]][_0xa415[46]](_0x4747x3a)[_0xa415[40]](function(_0x4747x2b){_0x4747x37[_0xa415[46]]= _0x4747x2b;if(_0x4747x1e[_0xa415[67]][_0xa415[88]]){_0x4747x2a[_0xa415[89]]= [{all:true}]};return db[_0xa415[64]][_0xa415[90]](_0x4747x2a)})[_0xa415[40]](function(_0x4747x3b){_0x4747x37[_0xa415[87]]= _0x4747x3b;return _0x4747x37})[_0xa415[40]](respondWithFilteredResult(_0x4747x24,_0x4747x2a))[_0xa415[31]](handleError(_0x4747x24,null))};exports[_0xa415[91]]= function(_0x4747x1e,_0x4747x24){var _0x4747x2a={raw:true,where:{id:_0x4747x1e[_0xa415[93]][_0xa415[92]]}},_0x4747x36={};_0x4747x36[_0xa415[62]]= _[_0xa415[65]](db[_0xa415[64]][_0xa415[63]]);_0x4747x36[_0xa415[67]]= _[_0xa415[65]](_0x4747x1e[_0xa415[67]]);_0x4747x36[_0xa415[69]]= _[_0xa415[70]](_0x4747x36[_0xa415[62]],_0x4747x36[_0xa415[67]]);_0x4747x2a[_0xa415[71]]= _[_0xa415[70]](_0x4747x36[_0xa415[62]],qs[_0xa415[72]](_0x4747x1e[_0xa415[67]][_0xa415[72]]));_0x4747x2a[_0xa415[71]]= (_0x4747x2a[_0xa415[71]][_0xa415[73]])?_0x4747x2a[_0xa415[71]]:_0x4747x36[_0xa415[62]];if(_0x4747x1e[_0xa415[67]][_0xa415[88]]){_0x4747x2a[_0xa415[89]]= [{all:true}]};_0x4747x2a= _[_0xa415[82]]({},_0x4747x2a,_0x4747x1e[_0xa415[86]]);return db[_0xa415[64]][_0xa415[94]](_0x4747x2a)[_0xa415[40]](handleEntityNotFound(_0x4747x24,null))[_0xa415[40]](respondWithResult(_0x4747x24,null))[_0xa415[31]](handleError(_0x4747x24,null))};exports[_0xa415[95]]= function(_0x4747x1e,_0x4747x24,_0x4747x3c){var _0x4747x3d;return db[_0xa415[111]][_0xa415[110]](function(_0x4747x3e){return db[_0xa415[64]][_0xa415[95]](_0x4747x1e[_0xa415[107]],{raw:true})[_0xa415[40]](function(_0x4747x27){_0x4747x3d= _0x4747x27;return db[_0xa415[64]][_0xa415[90]]({where:{type:_0x4747x1e[_0xa415[107]][_0xa415[106]]},raw:true})})[_0xa415[40]](function(_0x4747x3f){var _0x4747x40=fs[_0xa415[102]](path[_0xa415[100]](config[_0xa415[98]],_0xa415[99]),_0xa415[101]);var _0x4747x41=ejs[_0xa415[103]](_0x4747x40,{networks:_0x4747x3f|| []});fs[_0xa415[109]](util[_0xa415[108]](_0xa415[104],_0x4747x1e[_0xa415[107]][_0xa415[106]][_0xa415[105]]()),_0x4747x41)})[_0xa415[40]](function(){return respondWithRpcPromise(_0xa415[96],_0xa415[95],{module:_0xa415[97]})})[_0xa415[40]](function(){return _0x4747x3d})})[_0xa415[40]](respondWithResult(_0x4747x24,201))[_0xa415[31]](handleError(_0x4747x24,null))};exports[_0xa415[56]]= function(_0x4747x1e,_0x4747x24,_0x4747x3c){var _0x4747x3d;return db[_0xa415[111]][_0xa415[110]](function(_0x4747x3e){return db[_0xa415[64]][_0xa415[94]]({where:{id:_0x4747x1e[_0xa415[93]][_0xa415[92]]}})[_0xa415[40]](handleEntityNotFound(_0x4747x24,null))[_0xa415[40]](saveUpdates(_0x4747x1e[_0xa415[107]],null))[_0xa415[40]](function(_0x4747x27){if(_0x4747x27){_0x4747x3d= _0x4747x27;return db[_0xa415[64]][_0xa415[90]]({where:{type:_0x4747x3d[_0xa415[106]]},raw:true})};return null})[_0xa415[40]](function(_0x4747x3f){if(_0x4747x3f){var _0x4747x40=fs[_0xa415[102]](path[_0xa415[100]](config[_0xa415[98]],_0xa415[99]),_0xa415[101]);var _0x4747x41=ejs[_0xa415[103]](_0x4747x40,{networks:_0x4747x3f|| []});fs[_0xa415[109]](util[_0xa415[108]](_0xa415[104],_0x4747x3d[_0xa415[106]][_0xa415[105]]()),_0x4747x41);return respondWithRpcPromise(_0xa415[96],_0xa415[56],{module:_0xa415[97]})};return null})[_0xa415[40]](function(_0x4747x27){if(_0x4747x27){return _0x4747x3d};return null})})[_0xa415[40]](respondWithResult(_0x4747x24,null))[_0xa415[31]](handleError(_0x4747x24,null))};exports[_0xa415[57]]= function(_0x4747x1e,_0x4747x24,_0x4747x3c){var _0x4747x3d;return db[_0xa415[64]][_0xa415[94]]({where:{id:_0x4747x1e[_0xa415[93]][_0xa415[92]]}})[_0xa415[40]](function(_0x4747x27){_0x4747x3d= _0x4747x27;return _0x4747x27})[_0xa415[40]](handleEntityNotFound(_0x4747x24,null))[_0xa415[40]](removeEntity(_0x4747x24,null))[_0xa415[40]](function(){if(_0x4747x3d){return db[_0xa415[64]][_0xa415[90]]({where:{type:_0x4747x3d[_0xa415[106]]},raw:true})}})[_0xa415[40]](function(_0x4747x3f){if(_0x4747x3f){var _0x4747x40=fs[_0xa415[102]](path[_0xa415[100]](config[_0xa415[98]],_0xa415[99]),_0xa415[101]);var _0x4747x41=ejs[_0xa415[103]](_0x4747x40,{networks:_0x4747x3f|| []});fs[_0xa415[109]](util[_0xa415[108]](_0xa415[104],_0x4747x3d[_0xa415[106]][_0xa415[105]]()),_0x4747x41);return respondWithRpcPromise(_0xa415[96],_0xa415[57],{module:_0xa415[97]})}})[_0xa415[31]](handleError(_0x4747x24,null))}
\ No newline at end of file
index 9afec5c..ce562b9 100644 (file)
@@ -1 +1 @@
-var _0x2363=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4E\x65\x74\x77\x6F\x72\x6B","\x6E\x65\x74\x77\x6F\x72\x6B","\x64\x65\x66\x69\x6E\x65"];_0x2363[0];var _=require(_0x2363[1]);var util=require(_0x2363[2]);var logger=require(_0x2363[4])(_0x2363[3]);var moment=require(_0x2363[5]);var BPromise=require(_0x2363[6]);var rp=require(_0x2363[7]);var attributes=require(_0x2363[8]);module[_0x2363[9]]= function(_0xb6ebx8,_0xb6ebx9){return _0xb6ebx8[_0x2363[12]](_0x2363[10],attributes,{tableName:_0x2363[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xb9d0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4E\x65\x74\x77\x6F\x72\x6B","\x6E\x65\x74\x77\x6F\x72\x6B","\x64\x65\x66\x69\x6E\x65"];_0xb9d0[0];var _=require(_0xb9d0[1]);var util=require(_0xb9d0[2]);var logger=require(_0xb9d0[4])(_0xb9d0[3]);var moment=require(_0xb9d0[5]);var BPromise=require(_0xb9d0[6]);var rp=require(_0xb9d0[7]);var attributes=require(_0xb9d0[8]);module[_0xb9d0[9]]= function(_0x8d34x8,_0x8d34x9){return _0x8d34x8[_0xb9d0[12]](_0xb9d0[10],attributes,{tableName:_0xb9d0[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index e154852..0720d62 100644 (file)
@@ -1 +1 @@
-var _0xee6f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4E\x65\x74\x77\x6F\x72\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4E\x65\x74\x77\x6F\x72\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xee6f[0];var _=require(_0xee6f[1]);var util=require(_0xee6f[2]);var moment=require(_0xee6f[3]);var BPromise=require(_0xee6f[4]);var rs=require(_0xee6f[5]);var fs=require(_0xee6f[6]);var db=require(_0xee6f[8])[_0xee6f[7]];var utils=require(_0xee6f[9]);var logger=require(_0xee6f[11])(_0xee6f[10]);var config=require(_0xee6f[12]);var jayson=require(_0xee6f[13]);var client=jayson[_0xee6f[15]][_0xee6f[14]]({port:9002});function respondWithRpcPromise(_0x2371xe,_0x2371xf,_0x2371x10){return  new BPromise(function(_0x2371x11,_0x2371x12){return client[_0xee6f[28]](_0x2371xe,_0x2371x10)[_0xee6f[27]](function(_0x2371x14){logger[_0xee6f[20]](_0xee6f[16],_0x2371xf,_0xee6f[19]);logger[_0xee6f[23]](_0xee6f[21],_0x2371xf,_0xee6f[19],JSON[_0xee6f[22]](_0x2371x14));if(_0x2371x14[_0xee6f[17]]){if(_0x2371x14[_0xee6f[17]][_0xee6f[24]]=== 500){logger[_0xee6f[17]](_0xee6f[16],_0x2371xf,_0x2371x14[_0xee6f[17]][_0xee6f[25]]);return _0x2371x12(_0x2371x14[_0xee6f[17]][_0xee6f[25]])};logger[_0xee6f[17]](_0xee6f[16],_0x2371xf,_0x2371x14[_0xee6f[17]][_0xee6f[25]]);return _0x2371x11(_0x2371x14[_0xee6f[17]][_0xee6f[25]])}else {logger[_0xee6f[20]](_0xee6f[16],_0x2371xf,_0xee6f[19]);_0x2371x11(_0x2371x14[_0xee6f[26]][_0xee6f[25]])}})[_0xee6f[18]](function(_0x2371x13){logger[_0xee6f[17]](_0xee6f[16],_0x2371xf,_0x2371x13);_0x2371x12(_0x2371x13)})})}
\ No newline at end of file
+var _0xb779=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4E\x65\x74\x77\x6F\x72\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4E\x65\x74\x77\x6F\x72\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xb779[0];var _=require(_0xb779[1]);var util=require(_0xb779[2]);var moment=require(_0xb779[3]);var BPromise=require(_0xb779[4]);var rs=require(_0xb779[5]);var fs=require(_0xb779[6]);var db=require(_0xb779[8])[_0xb779[7]];var utils=require(_0xb779[9]);var logger=require(_0xb779[11])(_0xb779[10]);var config=require(_0xb779[12]);var jayson=require(_0xb779[13]);var client=jayson[_0xb779[15]][_0xb779[14]]({port:9002});function respondWithRpcPromise(_0xcaecxe,_0xcaecxf,_0xcaecx10){return  new BPromise(function(_0xcaecx11,_0xcaecx12){return client[_0xb779[28]](_0xcaecxe,_0xcaecx10)[_0xb779[27]](function(_0xcaecx14){logger[_0xb779[20]](_0xb779[16],_0xcaecxf,_0xb779[19]);logger[_0xb779[23]](_0xb779[21],_0xcaecxf,_0xb779[19],JSON[_0xb779[22]](_0xcaecx14));if(_0xcaecx14[_0xb779[17]]){if(_0xcaecx14[_0xb779[17]][_0xb779[24]]=== 500){logger[_0xb779[17]](_0xb779[16],_0xcaecxf,_0xcaecx14[_0xb779[17]][_0xb779[25]]);return _0xcaecx12(_0xcaecx14[_0xb779[17]][_0xb779[25]])};logger[_0xb779[17]](_0xb779[16],_0xcaecxf,_0xcaecx14[_0xb779[17]][_0xb779[25]]);return _0xcaecx11(_0xcaecx14[_0xb779[17]][_0xb779[25]])}else {logger[_0xb779[20]](_0xb779[16],_0xcaecxf,_0xb779[19]);_0xcaecx11(_0xcaecx14[_0xb779[26]][_0xb779[25]])}})[_0xb779[18]](function(_0xcaecx13){logger[_0xb779[17]](_0xb779[16],_0xcaecxf,_0xcaecx13);_0xcaecx12(_0xcaecx13)})})}
\ No newline at end of file
index 79f1e50..279a61a 100644 (file)
@@ -1 +1 @@
-var _0x8baf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x73","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x6E\x73\x77\x65\x72","\x2F\x3A\x69\x64\x2F\x6E\x6F\x74\x69\x66\x79","\x6E\x6F\x74\x69\x66\x79","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x6E\x73\x77\x65\x72\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x8baf[0];var multer=require(_0x8baf[1]);var util=require(_0x8baf[2]);var path=require(_0x8baf[3]);var express=require(_0x8baf[4]);var router=express.Router();var auth=require(_0x8baf[5]);var interaction=require(_0x8baf[6]);var config=require(_0x8baf[7]);var controller=require(_0x8baf[8]);router[_0x8baf[12]](_0x8baf[9],auth[_0x8baf[10]](),controller[_0x8baf[11]]);router[_0x8baf[12]](_0x8baf[13],auth[_0x8baf[10]](),controller[_0x8baf[14]]);router[_0x8baf[12]](_0x8baf[15],auth[_0x8baf[10]](),controller[_0x8baf[16]]);router[_0x8baf[12]](_0x8baf[17],auth[_0x8baf[10]](),controller[_0x8baf[18]]);router[_0x8baf[12]](_0x8baf[19],auth[_0x8baf[10]](),controller[_0x8baf[20]]);router[_0x8baf[12]](_0x8baf[21],auth[_0x8baf[10]](),controller[_0x8baf[22]]);router[_0x8baf[12]](_0x8baf[23],auth[_0x8baf[10]](),controller[_0x8baf[24]]);router[_0x8baf[26]](_0x8baf[9],auth[_0x8baf[10]](),controller[_0x8baf[25]]);router[_0x8baf[26]](_0x8baf[17],auth[_0x8baf[10]](),controller[_0x8baf[27]]);router[_0x8baf[26]](_0x8baf[28],controller[_0x8baf[29]]);router[_0x8baf[26]](_0x8baf[19],auth[_0x8baf[10]](),controller[_0x8baf[30]]);router[_0x8baf[26]](_0x8baf[21],auth[_0x8baf[10]](),controller[_0x8baf[31]]);router[_0x8baf[26]](_0x8baf[21],auth[_0x8baf[10]](),controller[_0x8baf[32]]);router[_0x8baf[34]](_0x8baf[15],auth[_0x8baf[10]](),controller[_0x8baf[33]]);router[_0x8baf[36]](_0x8baf[15],auth[_0x8baf[10]](),controller[_0x8baf[35]]);router[_0x8baf[36]](_0x8baf[17],auth[_0x8baf[10]](),controller[_0x8baf[37]]);module[_0x8baf[38]]= router
\ No newline at end of file
+var _0x8c1e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x73","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x6E\x73\x77\x65\x72","\x2F\x3A\x69\x64\x2F\x6E\x6F\x74\x69\x66\x79","\x6E\x6F\x74\x69\x66\x79","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x6E\x73\x77\x65\x72\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x8c1e[0];var multer=require(_0x8c1e[1]);var util=require(_0x8c1e[2]);var path=require(_0x8c1e[3]);var express=require(_0x8c1e[4]);var router=express.Router();var auth=require(_0x8c1e[5]);var interaction=require(_0x8c1e[6]);var config=require(_0x8c1e[7]);var controller=require(_0x8c1e[8]);router[_0x8c1e[12]](_0x8c1e[9],auth[_0x8c1e[10]](),controller[_0x8c1e[11]]);router[_0x8c1e[12]](_0x8c1e[13],auth[_0x8c1e[10]](),controller[_0x8c1e[14]]);router[_0x8c1e[12]](_0x8c1e[15],auth[_0x8c1e[10]](),controller[_0x8c1e[16]]);router[_0x8c1e[12]](_0x8c1e[17],auth[_0x8c1e[10]](),controller[_0x8c1e[18]]);router[_0x8c1e[12]](_0x8c1e[19],auth[_0x8c1e[10]](),controller[_0x8c1e[20]]);router[_0x8c1e[12]](_0x8c1e[21],auth[_0x8c1e[10]](),controller[_0x8c1e[22]]);router[_0x8c1e[12]](_0x8c1e[23],auth[_0x8c1e[10]](),controller[_0x8c1e[24]]);router[_0x8c1e[26]](_0x8c1e[9],auth[_0x8c1e[10]](),controller[_0x8c1e[25]]);router[_0x8c1e[26]](_0x8c1e[17],auth[_0x8c1e[10]](),controller[_0x8c1e[27]]);router[_0x8c1e[26]](_0x8c1e[28],controller[_0x8c1e[29]]);router[_0x8c1e[26]](_0x8c1e[19],auth[_0x8c1e[10]](),controller[_0x8c1e[30]]);router[_0x8c1e[26]](_0x8c1e[21],auth[_0x8c1e[10]](),controller[_0x8c1e[31]]);router[_0x8c1e[26]](_0x8c1e[21],auth[_0x8c1e[10]](),controller[_0x8c1e[32]]);router[_0x8c1e[34]](_0x8c1e[15],auth[_0x8c1e[10]](),controller[_0x8c1e[33]]);router[_0x8c1e[36]](_0x8c1e[15],auth[_0x8c1e[10]](),controller[_0x8c1e[35]]);router[_0x8c1e[36]](_0x8c1e[17],auth[_0x8c1e[10]](),controller[_0x8c1e[37]]);module[_0x8c1e[38]]= router
\ No newline at end of file
index 6e83d77..9e5d45d 100644 (file)
@@ -1 +1 @@
-var _0x98a3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x54\x45\x58\x54","\x41\x63\x63\x6F\x75\x6E\x74\x3A\x20\x7B\x7B\x61\x63\x63\x6F\x75\x6E\x74\x2E\x6E\x61\x6D\x65\x7D\x7D\x3C\x62\x72\x2F\x3E\x7B\x7B\x23\x71\x75\x65\x75\x65\x7D\x7D\x51\x75\x65\x75\x65\x3A\x20\x7B\x7B\x71\x75\x65\x75\x65\x2E\x6E\x61\x6D\x65\x7D\x7D\x3C\x62\x72\x2F\x3E\x7B\x7B\x2F\x71\x75\x65\x75\x65\x7D\x7D\x46\x72\x6F\x6D\x20\x3A\x20\x7B\x7B\x66\x72\x6F\x6D\x7D\x7D","\x42\x4F\x4F\x4C\x45\x41\x4E","\x49\x4E\x54\x45\x47\x45\x52"];_0x98a3[0];var Sequelize=require(_0x98a3[1]);module[_0x98a3[2]]= {name:{type:Sequelize[_0x98a3[3]],unique:_0x98a3[4],allowNull:false},description:{type:Sequelize[_0x98a3[3]]},replyUri:{type:Sequelize[_0x98a3[3]],validate:{isUrl:true}},key:{type:Sequelize[_0x98a3[3]],allowNull:false},notificationTemplate:{type:Sequelize[_0x98a3[5]],defaultValue:function(){return _0x98a3[6]}},notificationSound:{type:Sequelize[_0x98a3[7]],defaultValue:true},notificationShake:{type:Sequelize[_0x98a3[7]],defaultValue:false},waitForTheAssignedAgent:{type:Sequelize[_0x98a3[8]],validate:{min:1,max:2147483},defaultValue:10}}
\ No newline at end of file
+var _0xdd81=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x54\x45\x58\x54","\x41\x63\x63\x6F\x75\x6E\x74\x3A\x20\x7B\x7B\x61\x63\x63\x6F\x75\x6E\x74\x2E\x6E\x61\x6D\x65\x7D\x7D\x3C\x62\x72\x2F\x3E\x7B\x7B\x23\x71\x75\x65\x75\x65\x7D\x7D\x51\x75\x65\x75\x65\x3A\x20\x7B\x7B\x71\x75\x65\x75\x65\x2E\x6E\x61\x6D\x65\x7D\x7D\x3C\x62\x72\x2F\x3E\x7B\x7B\x2F\x71\x75\x65\x75\x65\x7D\x7D\x46\x72\x6F\x6D\x20\x3A\x20\x7B\x7B\x66\x72\x6F\x6D\x7D\x7D","\x42\x4F\x4F\x4C\x45\x41\x4E","\x49\x4E\x54\x45\x47\x45\x52"];_0xdd81[0];var Sequelize=require(_0xdd81[1]);module[_0xdd81[2]]= {name:{type:Sequelize[_0xdd81[3]],unique:_0xdd81[4],allowNull:false},description:{type:Sequelize[_0xdd81[3]]},replyUri:{type:Sequelize[_0xdd81[3]],validate:{isUrl:true}},key:{type:Sequelize[_0xdd81[3]],allowNull:false},notificationTemplate:{type:Sequelize[_0xdd81[5]],defaultValue:function(){return _0xdd81[6]}},notificationSound:{type:Sequelize[_0xdd81[7]],defaultValue:true},notificationShake:{type:Sequelize[_0xdd81[7]],defaultValue:false},waitForTheAssignedAgent:{type:Sequelize[_0xdd81[8]],validate:{min:1,max:2147483},defaultValue:10}}
\ No newline at end of file
index 669ed75..2429a0f 100644 (file)
@@ -1 +1 @@
-var _0x48b7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x64\x64\x41\x6E\x73\x77\x65\x72","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x72\x65\x6D\x6F\x76\x65\x41\x6E\x73\x77\x65\x72\x73","\x69\x64\x73","\x6E\x6F\x74\x69\x66\x79","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x45\x76\x65\x6E\x74\x4D\x61\x6E\x61\x67\x65\x72","\x55\x73\x65\x72\x49\x64","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x67\x65\x6E\x74","\x2C","\x77\x61\x69\x74\x46\x6F\x72\x54\x68\x65\x41\x73\x73\x69\x67\x6E\x65\x64\x41\x67\x65\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x75\x6E\x73\x68\x69\x66\x74","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x6F\x72\x63\x65\x64\x4F\x77\x6E\x65\x72\x73\x68\x69\x70","\x53\x74\x61\x72\x74","\x73\x74\x61\x72\x74\x52\x6F\x75\x74\x69\x6E\x67","\x55\x73\x65\x72","\x69\x6E","\x63\x6F\x6E\x74\x61\x63\x74","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x49\x64","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","","\x20","\x6C\x61\x73\x74\x4E\x61\x6D\x65","\x61\x75\x74\x6F\x63\x6C\x6F\x73\x65","\x63\x6C\x6F\x73\x65","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x70\x75\x73\x68","\x67\x65\x74","\x63\x72\x65\x61\x74\x65\x64","\x73\x70\x72\x65\x61\x64","\x74\x68\x72\x65\x61\x64\x49\x64","\x65\x78\x74\x65\x72\x6E\x61\x6C\x55\x72\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6C\x69\x73\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x61\x73\x63","\x6F\x72\x64\x65\x72\x42\x79","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x66\x72\x6F\x6D","\x4C\x69\x73\x74\x49\x64","\x64\x65\x66\x61\x75\x6C\x74\x73","\x6D\x61\x70\x4B\x65\x79","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6D\x4C\x69\x73\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6E\x6F\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x20\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x69\x73\x4E\x69\x6C","\x66\x72\x6F\x6D\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","\x62\x6F\x64\x79\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x20\x61\x6E\x64\x20\x6E\x6F\x74\x20\x65\x6D\x70\x74\x79","\x6D\x61\x70\x4B\x65\x79\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x6D\x61\x70\x4B\x65\x79\x20\x69\x6E\x76\x61\x6C\x69\x64\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x67\x65\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x6F\x6D\x69\x74","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x43\x6F\x6E\x74\x61\x63\x74","\x4F\x77\x6E\x65\x72","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x54\x61\x67","\x54\x61\x67\x73","\x63\x6F\x6C\x6F\x72","\x74\x61\x67"];_0x48b7[0];var jsonpatch=require(_0x48b7[1]);var rp=require(_0x48b7[2]);var moment=require(_0x48b7[3]);var BPromise=require(_0x48b7[4]);var Mustache=require(_0x48b7[5]);var util=require(_0x48b7[6]);var path=require(_0x48b7[7]);var sox=require(_0x48b7[8]);var csv=require(_0x48b7[9]);var ejs=require(_0x48b7[10]);var fs=require(_0x48b7[11]);var _=require(_0x48b7[12]);var squel=require(_0x48b7[13]);var crypto=require(_0x48b7[14]);var jsforce=require(_0x48b7[15]);var deskjs=require(_0x48b7[16]);var toCsv=require(_0x48b7[9]);var querystring=require(_0x48b7[17]);var Papa=require(_0x48b7[18]);var qs=require(_0x48b7[19]);var logger=require(_0x48b7[21])(_0x48b7[20]);var utils=require(_0x48b7[22]);var config=require(_0x48b7[23]);var db=require(_0x48b7[25])[_0x48b7[24]];var jayson=require(_0x48b7[26]);var client=jayson[_0x48b7[28]][_0x48b7[27]]({port:9004});var client9002=jayson[_0x48b7[28]][_0x48b7[27]]({port:9002});function respondWithRpcPromise(_0xcd70x1d,_0xcd70x1e,_0xcd70x1f,_0xcd70x20){return  new BPromise(function(_0xcd70x21,_0xcd70x22){var _0xcd70x23=(_0xcd70x20|| client);return _0xcd70x23[_0x48b7[41]](_0xcd70x1d,_0xcd70x1f)[_0x48b7[40]](function(_0xcd70x25){logger[_0x48b7[33]](_0x48b7[29],_0xcd70x1e,_0x48b7[32]);logger[_0x48b7[36]](_0x48b7[34],_0xcd70x1e,_0x48b7[32],JSON[_0x48b7[35]](_0xcd70x25));if(_0xcd70x25[_0x48b7[30]]){if(_0xcd70x25[_0x48b7[30]][_0x48b7[37]]=== 500){logger[_0x48b7[30]](_0x48b7[29],_0xcd70x1e,_0xcd70x25[_0x48b7[30]][_0x48b7[38]]);return _0xcd70x22(_0xcd70x25[_0x48b7[30]][_0x48b7[38]])};logger[_0x48b7[30]](_0x48b7[29],_0xcd70x1e,_0xcd70x25[_0x48b7[30]][_0x48b7[38]]);return _0xcd70x21(_0xcd70x25[_0x48b7[30]][_0x48b7[38]])}else {logger[_0x48b7[33]](_0x48b7[29],_0xcd70x1e,_0x48b7[32]);_0xcd70x21(_0xcd70x25[_0x48b7[39]][_0x48b7[38]])}})[_0x48b7[31]](function(_0xcd70x24){logger[_0x48b7[30]](_0x48b7[29],_0xcd70x1e,_0xcd70x24);_0xcd70x22(_0xcd70x24)})})}function respondWithStatusCode(_0xcd70x25,_0xcd70x27){_0xcd70x27= _0xcd70x27|| 204;return function(_0xcd70x28){if(_0xcd70x28){return _0xcd70x25[_0x48b7[42]](_0xcd70x27)};return _0xcd70x25[_0x48b7[44]](_0xcd70x27)[_0x48b7[43]]()}}function respondWithResult(_0xcd70x25,_0xcd70x27){_0xcd70x27= _0xcd70x27|| 200;return function(_0xcd70x28){if(_0xcd70x28){return _0xcd70x25[_0x48b7[44]](_0xcd70x27)[_0x48b7[45]](_0xcd70x28)}}}function respondWithFilteredResult(_0xcd70x25,_0xcd70x2b){return function(_0xcd70x28){if(_0xcd70x28){var _0xcd70x2c=_0xcd70x28[_0x48b7[46]],_0xcd70x2d=_0xcd70x2b[_0x48b7[47]],_0xcd70x2e=_0xcd70x2b[_0x48b7[47]]+ _0xcd70x2b[_0x48b7[48]],_0xcd70x27;if(_0xcd70x2e>= _0xcd70x2c){_0xcd70x2e= _0xcd70x2c;_0xcd70x27= 200}else {_0xcd70x27= 206};_0xcd70x25[_0x48b7[44]](_0xcd70x27);return _0xcd70x25[_0x48b7[52]](_0x48b7[49],_0xcd70x2d+ _0x48b7[50]+ _0xcd70x2e+ _0x48b7[51]+ _0xcd70x2c)[_0x48b7[45]](_0xcd70x28)};return null}}function patchUpdates(_0xcd70x30){return function(_0xcd70x28){try{jsonpatch[_0x48b7[53]](_0xcd70x28,_0xcd70x30,true)}catch(err){return BPromise[_0x48b7[54]](err)};return _0xcd70x28[_0x48b7[55]]()}}function saveUpdates(_0xcd70x32,_0xcd70x27){return function(_0xcd70x28){if(_0xcd70x28){return _0xcd70x28[_0x48b7[56]](_0xcd70x32)[_0x48b7[40]](function(_0xcd70x33){return _0xcd70x33})};return null}}function removeEntity(_0xcd70x25,_0xcd70x27){return function(_0xcd70x28){if(_0xcd70x28){return _0xcd70x28[_0x48b7[57]]()[_0x48b7[40]](function(){_0xcd70x25[_0x48b7[44]](204)[_0x48b7[43]]()})}}}function handleEntityNotFound(_0xcd70x25,_0xcd70x27){return function(_0xcd70x28){if(!_0xcd70x28){_0xcd70x25[_0x48b7[42]](404)};return _0xcd70x28}}function handleError(_0xcd70x25,_0xcd70x27){_0xcd70x27= _0xcd70x27|| 500;return function(_0xcd70x24){logger[_0x48b7[30]](_0xcd70x24[_0x48b7[58]]);if(_0xcd70x24[_0x48b7[59]]){delete _0xcd70x24[_0x48b7[59]]};_0xcd70x25[_0x48b7[44]](_0xcd70x27)[_0x48b7[60]](_0xcd70x24)}}exports[_0x48b7[61]]= function(_0xcd70x1f,_0xcd70x25){var _0xcd70x2b={},_0xcd70x37={},_0xcd70x38={count:0,rows:[]};_0xcd70x37[_0x48b7[62]]= _[_0x48b7[65]](db[_0x48b7[64]][_0x48b7[63]]);var _0xcd70x39={dateStart:_0xcd70x1f[_0x48b7[67]][_0x48b7[66]],dateEnd:_0xcd70x1f[_0x48b7[67]][_0x48b7[68]]};delete _0xcd70x1f[_0x48b7[67]][_0x48b7[66]];delete _0xcd70x1f[_0x48b7[67]][_0x48b7[68]];_0xcd70x37[_0x48b7[67]]= _[_0x48b7[65]](_0xcd70x1f[_0x48b7[67]]);_0xcd70x37[_0x48b7[69]]= _[_0x48b7[70]](_0xcd70x37[_0x48b7[62]],_0xcd70x37[_0x48b7[67]]);_0xcd70x2b[_0x48b7[71]]= _[_0x48b7[70]](_0xcd70x37[_0x48b7[62]],qs[_0x48b7[72]](_0xcd70x1f[_0x48b7[67]][_0x48b7[72]]));_0xcd70x2b[_0x48b7[71]]= (_0xcd70x2b[_0x48b7[71]][_0x48b7[73]])?_0xcd70x2b[_0x48b7[71]]:_0xcd70x37[_0x48b7[62]];if(!_0xcd70x1f[_0x48b7[67]][_0x48b7[75]](_0x48b7[74])){_0xcd70x2b[_0x48b7[48]]= qs[_0x48b7[48]](_0xcd70x1f[_0x48b7[67]][_0x48b7[48]]);_0xcd70x2b[_0x48b7[47]]= qs[_0x48b7[47]](_0xcd70x1f[_0x48b7[67]][_0x48b7[47]])};_0xcd70x2b[_0x48b7[76]]= qs[_0x48b7[77]](_0xcd70x1f[_0x48b7[67]][_0x48b7[77]]);_0xcd70x2b[_0x48b7[78]]= qs[_0x48b7[69]](_[_0x48b7[79]](_0xcd70x1f[_0x48b7[67]],_0xcd70x37[_0x48b7[69]]));if(_0xcd70x39[_0x48b7[66]]){if(_0xcd70x39[_0x48b7[68]]){_0xcd70x39[_0x48b7[68]]= moment(_0xcd70x39[_0x48b7[68]])[_0x48b7[81]](1,_0x48b7[80])}else {_0xcd70x39[_0x48b7[68]]= moment(_0xcd70x39[_0x48b7[66]])[_0x48b7[81]](1,_0x48b7[80])};_[_0x48b7[82]](_0xcd70x2b[_0x48b7[78]],{createdAt:{$gte:_0xcd70x39[_0x48b7[66]],$lte:_0xcd70x39[_0x48b7[68]]}})};if(_0xcd70x1f[_0x48b7[67]][_0x48b7[83]]){_0xcd70x2b[_0x48b7[78]]= _[_0x48b7[82]](_0xcd70x2b[_0x48b7[78]],{$or:_[_0x48b7[85]](_0xcd70x2b[_0x48b7[71]],function(_0xcd70x3a){var _0xcd70x38={};_0xcd70x38[_0xcd70x3a]= {$like:_0x48b7[84]+ _0xcd70x1f[_0x48b7[67]][_0x48b7[83]]+ _0x48b7[84]};return _0xcd70x38})})};_0xcd70x2b= _[_0x48b7[82]]({},_0xcd70x2b,_0xcd70x1f[_0x48b7[86]]);var _0xcd70x3b={where:_0xcd70x2b[_0x48b7[78]]};return db[_0x48b7[64]][_0x48b7[46]](_0xcd70x3b)[_0x48b7[40]](function(_0xcd70x2c){_0xcd70x38[_0x48b7[46]]= _0xcd70x2c;if(_0xcd70x1f[_0x48b7[67]][_0x48b7[88]]){_0xcd70x2b[_0x48b7[89]]= [{all:true}]};return db[_0x48b7[64]][_0x48b7[90]](_0xcd70x2b)})[_0x48b7[40]](function(_0xcd70x3c){_0xcd70x38[_0x48b7[87]]= _0xcd70x3c;return _0xcd70x38})[_0x48b7[40]](respondWithFilteredResult(_0xcd70x25,_0xcd70x2b))[_0x48b7[31]](handleError(_0xcd70x25,null))};exports[_0x48b7[91]]= function(_0xcd70x1f,_0xcd70x25){var _0xcd70x2b={raw:false,where:{id:_0xcd70x1f[_0x48b7[93]][_0x48b7[92]]}},_0xcd70x37={};_0xcd70x37[_0x48b7[62]]= _[_0x48b7[65]](db[_0x48b7[64]][_0x48b7[63]]);_0xcd70x37[_0x48b7[67]]= _[_0x48b7[65]](_0xcd70x1f[_0x48b7[67]]);_0xcd70x37[_0x48b7[69]]= _[_0x48b7[70]](_0xcd70x37[_0x48b7[62]],_0xcd70x37[_0x48b7[67]]);_0xcd70x2b[_0x48b7[71]]= _[_0x48b7[70]](_0xcd70x37[_0x48b7[62]],qs[_0x48b7[72]](_0xcd70x1f[_0x48b7[67]][_0x48b7[72]]));_0xcd70x2b[_0x48b7[71]]= (_0xcd70x2b[_0x48b7[71]][_0x48b7[73]])?_0xcd70x2b[_0x48b7[71]]:_0xcd70x37[_0x48b7[62]];if(_0xcd70x1f[_0x48b7[67]][_0x48b7[88]]){_0xcd70x2b[_0x48b7[89]]= [{all:true}]};_0xcd70x2b= _[_0x48b7[82]]({},_0xcd70x2b,_0xcd70x1f[_0x48b7[86]]);return db[_0x48b7[64]][_0x48b7[94]](_0xcd70x2b)[_0x48b7[40]](handleEntityNotFound(_0xcd70x25,null))[_0x48b7[40]](respondWithResult(_0xcd70x25,null))[_0x48b7[31]](handleError(_0xcd70x25,null))};exports[_0x48b7[95]]= function(_0xcd70x1f,_0xcd70x25){return db[_0x48b7[64]][_0x48b7[95]](_0xcd70x1f[_0x48b7[96]],{})[_0x48b7[40]](respondWithResult(_0xcd70x25,201))[_0x48b7[31]](handleError(_0xcd70x25,null))};exports[_0x48b7[56]]= function(_0xcd70x1f,_0xcd70x25){if(_0xcd70x1f[_0x48b7[96]][_0x48b7[92]]){delete _0xcd70x1f[_0x48b7[96]][_0x48b7[92]]};return db[_0x48b7[64]][_0x48b7[94]]({where:{id:_0xcd70x1f[_0x48b7[93]][_0x48b7[92]]}})[_0x48b7[40]](handleEntityNotFound(_0xcd70x25,null))[_0x48b7[40]](saveUpdates(_0xcd70x1f[_0x48b7[96]],null))[_0x48b7[40]](respondWithResult(_0xcd70x25,null))[_0x48b7[31]](handleError(_0xcd70x25,null))};exports[_0x48b7[57]]= function(_0xcd70x1f,_0xcd70x25){return db[_0x48b7[64]][_0x48b7[94]]({where:{id:_0xcd70x1f[_0x48b7[93]][_0x48b7[92]]}})[_0x48b7[40]](handleEntityNotFound(_0xcd70x25,null))[_0x48b7[40]](removeEntity(_0xcd70x25,null))[_0x48b7[31]](handleError(_0xcd70x25,null))};exports[_0x48b7[97]]= function(_0xcd70x1f,_0xcd70x25){return db[_0x48b7[64]][_0x48b7[97]]()[_0x48b7[40]](respondWithResult(_0xcd70x25,null))[_0x48b7[31]](handleError(_0xcd70x25,null))};exports[_0x48b7[98]]= function(_0xcd70x1f,_0xcd70x25,_0xcd70x3d){if(_0xcd70x1f[_0x48b7[96]][_0x48b7[92]]){delete _0xcd70x1f[_0x48b7[96]][_0x48b7[92]]};return db[_0x48b7[64]][_0x48b7[94]]({where:{id:_0xcd70x1f[_0x48b7[93]][_0x48b7[92]]}})[_0x48b7[40]](handleEntityNotFound(_0xcd70x25,null))[_0x48b7[40]](function(_0xcd70x28){if(_0xcd70x28){_0xcd70x1f[_0x48b7[96]][_0x48b7[99]]= _0xcd70x28[_0x48b7[92]];return db[_0x48b7[100]][_0x48b7[95]](_0xcd70x1f[_0x48b7[96]])}})[_0x48b7[40]](respondWithResult(_0xcd70x25,null))[_0x48b7[31]](handleError(_0xcd70x25,null))};exports[_0x48b7[101]]= function(_0xcd70x1f,_0xcd70x25,_0xcd70x3d){var _0xcd70x2b={raw:false,where:{}};var _0xcd70x37={};var _0xcd70x3e={count:0,rows:[]};return db[_0x48b7[64]][_0x48b7[102]]({where:{id:_0xcd70x1f[_0x48b7[93]][_0x48b7[92]]}})[_0x48b7[40]](handleEntityNotFound(_0xcd70x25,null))[_0x48b7[40]](function(_0xcd70x28){if(_0xcd70x28){_0xcd70x37[_0x48b7[62]]= _[_0x48b7[65]](db[_0x48b7[100]][_0x48b7[63]]);_0xcd70x37[_0x48b7[67]]= _[_0x48b7[65]](_0xcd70x1f[_0x48b7[67]]);_0xcd70x37[_0x48b7[69]]= _[_0x48b7[70]](_0xcd70x37[_0x48b7[62]],_0xcd70x37[_0x48b7[67]]);_0xcd70x2b[_0x48b7[71]]= _[_0x48b7[70]](_0xcd70x37[_0x48b7[62]],qs[_0x48b7[72]](_0xcd70x1f[_0x48b7[67]][_0x48b7[72]]));_0xcd70x2b[_0x48b7[71]]= (_0xcd70x2b[_0x48b7[71]][_0x48b7[73]])?_0xcd70x2b[_0x48b7[71]]:_0xcd70x37[_0x48b7[62]];if(!_0xcd70x1f[_0x48b7[67]][_0x48b7[75]](_0x48b7[74])){_0xcd70x2b[_0x48b7[48]]= qs[_0x48b7[48]](_0xcd70x1f[_0x48b7[67]][_0x48b7[48]]);_0xcd70x2b[_0x48b7[47]]= qs[_0x48b7[47]](_0xcd70x1f[_0x48b7[67]][_0x48b7[47]])};_0xcd70x2b[_0x48b7[76]]= qs[_0x48b7[77]](_0xcd70x1f[_0x48b7[67]][_0x48b7[77]]);_0xcd70x2b[_0x48b7[78]]= qs[_0x48b7[69]](_[_0x48b7[79]](_0xcd70x1f[_0x48b7[67]],_0xcd70x37[_0x48b7[69]]));_0xcd70x2b[_0x48b7[78]][_0x48b7[99]]= _0xcd70x28[_0x48b7[92]];if(_0xcd70x1f[_0x48b7[67]][_0x48b7[83]]){_0xcd70x2b[_0x48b7[78]]= _[_0x48b7[82]](_0xcd70x2b[_0x48b7[78]],{$or:_[_0x48b7[85]](_0xcd70x2b[_0x48b7[71]],function(_0xcd70x3a){var _0xcd70x38={};_0xcd70x38[_0xcd70x3a]= {$like:_0x48b7[84]+ _0xcd70x1f[_0x48b7[67]][_0x48b7[83]]+ _0x48b7[84]};return _0xcd70x38})})};_0xcd70x2b= _[_0x48b7[82]]({},_0xcd70x2b,_0xcd70x1f[_0x48b7[86]]);return db[_0x48b7[100]][_0x48b7[46]]({where:_0xcd70x2b[_0x48b7[78]]})[_0x48b7[40]](function(_0xcd70x2c){_0xcd70x3e[_0x48b7[46]]= _0xcd70x2c;if(_0xcd70x1f[_0x48b7[67]][_0x48b7[88]]){_0xcd70x2b[_0x48b7[89]]= [{all:true}]};return db[_0x48b7[100]][_0x48b7[90]](_0xcd70x2b)})[_0x48b7[40]](function(_0xcd70x3c){_0xcd70x3e[_0x48b7[87]]= _0xcd70x3c;return _0xcd70x3e})}})[_0x48b7[40]](respondWithFilteredResult(_0xcd70x25,_0xcd70x2b))[_0x48b7[31]](handleError(_0xcd70x25,null))};exports[_0x48b7[103]]= function(_0xcd70x1f,_0xcd70x25,_0xcd70x3d){var _0xcd70x3f;return db[_0x48b7[64]][_0x48b7[94]]({where:{id:_0xcd70x1f[_0x48b7[93]][_0x48b7[92]]}})[_0x48b7[40]](handleEntityNotFound(_0xcd70x25,null))[_0x48b7[40]](function(_0xcd70x28){if(_0xcd70x28){return _0xcd70x28[_0x48b7[103]](_0xcd70x1f[_0x48b7[67]][_0x48b7[104]])}})[_0x48b7[40]](respondWithStatusCode(_0xcd70x25,null))[_0x48b7[31]](handleError(_0xcd70x25,null))};exports[_0x48b7[105]]= function(_0xcd70x1f,_0xcd70x25,_0xcd70x3d){var _0xcd70x40={body:_0xcd70x1f[_0x48b7[96]],channel:_0x48b7[106]};var _0xcd70x41=[];var _0xcd70x42=[];var _0xcd70x43={};return db[_0x48b7[151]][_0x48b7[97]]()[_0x48b7[40]](function(_0xcd70x4a){if(!_0xcd70x4a){throw  new db[_0x48b7[157]].ValidationError(_0x48b7[156])};_0xcd70x41= _[_0x48b7[159]](_[_0x48b7[65]](_0xcd70x4a),[_0x48b7[158],_0x48b7[153]]);_0xcd70x42= _[_0x48b7[159]](_[_0x48b7[65]](_0xcd70x4a),[_0x48b7[158],_0x48b7[153],_0x48b7[160],_0x48b7[148]]);if(_0xcd70x1f[_0x48b7[96]][_0x48b7[92]]){delete _0xcd70x1f[_0x48b7[96]][_0x48b7[92]]};if(_[_0x48b7[161]](_0xcd70x1f[_0x48b7[96]][_0x48b7[147]])){throw  new db[_0x48b7[157]].ValidationError(_0x48b7[162])};if(_[_0x48b7[161]](_0xcd70x1f[_0x48b7[96]][_0x48b7[96]])|| _0xcd70x1f[_0x48b7[96]][_0x48b7[96]]=== _0x48b7[126]){throw  new db[_0x48b7[157]].ValidationError(_0x48b7[163])};if(_[_0x48b7[161]](_0xcd70x1f[_0x48b7[96]][_0x48b7[150]])){throw  new db[_0x48b7[157]].ValidationError(_0x48b7[164]+ _0xcd70x42)};if(!_[_0x48b7[165]](_0xcd70x42,_0xcd70x1f[_0x48b7[96]][_0x48b7[150]])){throw  new db[_0x48b7[157]].ValidationError(_0x48b7[166]+ _0xcd70x42)};_0xcd70x43[_0xcd70x1f[_0x48b7[96]][_0x48b7[150]]]= _0xcd70x1f[_0x48b7[96]][_0x48b7[147]]})[_0x48b7[40]](function(){return db[_0x48b7[64]][_0x48b7[94]]({where:{id:_0xcd70x1f[_0x48b7[93]][_0x48b7[92]]},include:[{model:db[_0x48b7[152]],as:_0x48b7[140],include:[{model:db[_0x48b7[151]],as:_0x48b7[146],where:_0xcd70x43,limit:1,order:[[_0x48b7[153],_0x48b7[154]]]}]},{model:db[_0x48b7[155]],as:_0x48b7[141]}]})})[_0x48b7[40]](handleEntityNotFound(_0xcd70x25,null))[_0x48b7[40]](function(_0xcd70x28){if(_0xcd70x28&& _0xcd70x28[_0x48b7[140]]){_0xcd70x40[_0x48b7[113]]= _0xcd70x28;_0xcd70x40[_0x48b7[116]]= _0xcd70x28[_0x48b7[141]];_0xcd70x40[_0x48b7[142]]= _0xcd70x28[_0x48b7[140]];_0xcd70x40[_0x48b7[116]]= _[_0x48b7[145]](_0xcd70x40[_0x48b7[116]],[_0x48b7[143]],[_0x48b7[144]]);if(_0xcd70x40[_0x48b7[113]][_0x48b7[141]]){delete _0xcd70x40[_0x48b7[113]][_0x48b7[141]]};if(_0xcd70x40[_0x48b7[113]][_0x48b7[140]]&& _0xcd70x40[_0x48b7[113]][_0x48b7[140]][_0x48b7[146]][_0x48b7[73]]){return _0xcd70x40[_0x48b7[113]][_0x48b7[140]][_0x48b7[146]][0]};var _0xcd70x49=_[_0x48b7[149]](_0xcd70x1f[_0x48b7[96]],{firstName:_0xcd70x1f[_0x48b7[96]][_0x48b7[147]],phone:_0xcd70x1f[_0x48b7[96]][_0x48b7[147]],ListId:_0xcd70x28[_0x48b7[148]]});_0xcd70x49[_0xcd70x1f[_0x48b7[96]][_0x48b7[150]]]= _0xcd70x1f[_0x48b7[96]][_0x48b7[147]];return db[_0x48b7[151]][_0x48b7[95]](_0xcd70x49,{fields:_0xcd70x41,raw:true})}})[_0x48b7[40]](handleEntityNotFound(_0xcd70x25,null))[_0x48b7[40]](function(_0xcd70x28){_0xcd70x40[_0x48b7[122]]= _0xcd70x28;if(_0xcd70x28){var _0xcd70x47={ContactId:_0xcd70x28[_0x48b7[92]],OpenchannelAccountId:_0xcd70x1f[_0x48b7[93]][_0x48b7[92]],from:(_0xcd70x28[_0x48b7[125]]|| _0x48b7[126])+ _0x48b7[127]+ (_0xcd70x28[_0x48b7[128]]|| _0x48b7[126])};var _0xcd70x48={OpenchannelAccountId:_0xcd70x1f[_0x48b7[93]][_0x48b7[92]],closed:false};if(_0xcd70x1f[_0x48b7[96]][_0x48b7[136]]){_0xcd70x48[_0x48b7[136]]= _0xcd70x1f[_0x48b7[96]][_0x48b7[136]];return db[_0x48b7[138]][_0x48b7[94]]({where:_0xcd70x48})[_0x48b7[40]](function(_0xcd70x46){if(_0xcd70x46){return [_0xcd70x46,false]};_0xcd70x47[_0x48b7[136]]= _0xcd70x1f[_0x48b7[96]][_0x48b7[136]];_0xcd70x47[_0x48b7[137]]= _0xcd70x1f[_0x48b7[96]][_0x48b7[137]];return db[_0x48b7[138]][_0x48b7[95]](_0xcd70x47)[_0x48b7[40]](function(_0xcd70x46){return [_0xcd70x46,true]})})}else {_0xcd70x48[_0x48b7[136]]= null};_0xcd70x48[_0x48b7[139]]= _0xcd70x28[_0x48b7[92]];return db[_0x48b7[138]][_0x48b7[94]]({where:_0xcd70x48})[_0x48b7[40]](function(_0xcd70x46){if(_0xcd70x46){return [_0xcd70x46,false]};return db[_0x48b7[138]][_0x48b7[95]](_0xcd70x47)[_0x48b7[40]](function(_0xcd70x46){return [_0xcd70x46,true]})})}})[_0x48b7[135]](function(_0xcd70x28,_0xcd70x45){if(_0xcd70x28){if(!_0xcd70x45){return _0xcd70x28[_0x48b7[56]]({from:(_0xcd70x40[_0x48b7[122]][_0x48b7[125]]|| _0x48b7[126])+ _0x48b7[127]+ (_0xcd70x40[_0x48b7[122]][_0x48b7[128]]|| _0x48b7[126])})};if(_0xcd70x40[_0x48b7[113]][_0x48b7[129]]){_0xcd70x40[_0x48b7[116]][_0x48b7[132]]({id:0,priority:_0xcd70x40[_0x48b7[116]][_0x48b7[73]]+ 1,app:_0x48b7[130],appdata:_0x48b7[131],interval:_0x48b7[114]})};var _0xcd70x46=_0xcd70x28[_0x48b7[133]]({plain:true});_0xcd70x46[_0x48b7[134]]= true;return _0xcd70x46}})[_0x48b7[40]](function(_0xcd70x28){_0xcd70x40[_0x48b7[109]]= _0xcd70x28;return db[_0x48b7[124]][_0x48b7[95]]({body:_0xcd70x1f[_0x48b7[96]][_0x48b7[96]],OpenchannelAccountId:_0xcd70x1f[_0x48b7[93]][_0x48b7[92]],OpenchannelInteractionId:_0xcd70x28[_0x48b7[92]],direction:_0x48b7[121],ContactId:_0xcd70x40[_0x48b7[122]][_0x48b7[92]],AttachmentId:_0xcd70x1f[_0x48b7[96]][_0x48b7[123]]})})[_0x48b7[40]](function(_0xcd70x28){_0xcd70x40[_0x48b7[38]]= _0xcd70x28;if(_0xcd70x40[_0x48b7[109]][_0x48b7[108]]){return db[_0x48b7[120]][_0x48b7[94]]({attributes:[_0x48b7[92],_0x48b7[59]],where:{id:_0xcd70x40[_0x48b7[109]][_0x48b7[108]]}})[_0x48b7[40]](function(_0xcd70x44){if(_0xcd70x44){_0xcd70x40[_0x48b7[116]][_0x48b7[115]]({id:0,priority:0,app:_0x48b7[110],appdata:_0xcd70x44[_0x48b7[59]]+ _0x48b7[111]+ (_0xcd70x40[_0x48b7[113]][_0x48b7[112]]|| 10),interval:_0x48b7[114]});_0xcd70x40[_0x48b7[117]]= false};return respondWithRpcPromise(_0x48b7[118],_0x48b7[119],_0xcd70x40)})};return respondWithRpcPromise(_0x48b7[118],_0x48b7[119],_0xcd70x40)})[_0x48b7[40]](function(_0xcd70x40){respondWithRpcPromise(_0x48b7[107],_0x48b7[107],{event:_0x48b7[105],message:_0xcd70x40},client9002);return _0xcd70x40})[_0x48b7[40]](respondWithResult(_0xcd70x25,null))[_0x48b7[31]](handleError(_0xcd70x25,null))};exports[_0x48b7[167]]= function(_0xcd70x1f,_0xcd70x25,_0xcd70x3d){return db[_0x48b7[64]][_0x48b7[102]]({where:{id:_0xcd70x1f[_0x48b7[93]][_0x48b7[92]]}})[_0x48b7[40]](handleEntityNotFound(_0xcd70x25,null))[_0x48b7[40]](function(_0xcd70x28){if(_0xcd70x28){return db[_0x48b7[171]][_0x48b7[170]](function(_0xcd70x4b){return db[_0x48b7[155]][_0x48b7[57]]({where:{OpenchannelAccountId:_0xcd70x1f[_0x48b7[93]][_0x48b7[92]]},transaction:_0xcd70x4b})[_0x48b7[40]](function(_0xcd70x4c){var _0xcd70x4d=_[_0x48b7[85]](_0xcd70x1f[_0x48b7[96]],function(_0xcd70x4e){_0xcd70x4e[_0x48b7[99]]= _0xcd70x1f[_0x48b7[93]][_0x48b7[92]];return _0xcd70x4e});return db[_0x48b7[155]][_0x48b7[169]](_0xcd70x4d,{transaction:_0xcd70x4b})})})[_0x48b7[40]](function(){return db[_0x48b7[155]][_0x48b7[168]]({where:{OpenchannelAccountId:_0xcd70x1f[_0x48b7[93]][_0x48b7[92]]},order:_0x48b7[143]})})}})[_0x48b7[40]](respondWithResult(_0xcd70x25,null))[_0x48b7[31]](handleError(_0xcd70x25,null))};exports[_0x48b7[172]]= function(_0xcd70x1f,_0xcd70x28,_0xcd70x3d){var _0xcd70x2b={};var _0xcd70x37={};var _0xcd70x4f;var _0xcd70x2c;return db[_0x48b7[64]][_0x48b7[102]]({where:{id:_0xcd70x1f[_0x48b7[93]][_0x48b7[92]]}})[_0x48b7[40]](handleEntityNotFound(_0xcd70x28,null))[_0x48b7[40]](function(_0xcd70x28){if(_0xcd70x28){_0xcd70x4f= _0xcd70x28;_0xcd70x37[_0x48b7[62]]= _[_0x48b7[65]](db[_0x48b7[155]][_0x48b7[63]]);_0xcd70x37[_0x48b7[67]]= _[_0x48b7[65]](_0xcd70x1f[_0x48b7[67]]);_0xcd70x37[_0x48b7[69]]= _[_0x48b7[70]](_0xcd70x37[_0x48b7[62]],_0xcd70x37[_0x48b7[67]]);_0xcd70x2b[_0x48b7[71]]= _[_0x48b7[70]](_0xcd70x37[_0x48b7[62]],qs[_0x48b7[72]](_0xcd70x1f[_0x48b7[67]][_0x48b7[72]]));_0xcd70x2b[_0x48b7[71]]= (_0xcd70x2b[_0x48b7[71]][_0x48b7[73]])?_0xcd70x2b[_0x48b7[71]]:_0xcd70x37[_0x48b7[62]];_0xcd70x2b[_0x48b7[76]]= qs[_0x48b7[77]](_0xcd70x1f[_0x48b7[67]][_0x48b7[77]]);_0xcd70x2b[_0x48b7[78]]= qs[_0x48b7[69]](_[_0x48b7[79]](_0xcd70x1f[_0x48b7[67]],_0xcd70x37[_0x48b7[69]]));if(_0xcd70x1f[_0x48b7[67]][_0x48b7[83]]){_0xcd70x2b[_0x48b7[78]]= _[_0x48b7[82]](_0xcd70x2b[_0x48b7[78]],{$or:_[_0x48b7[85]](_0xcd70x2b[_0x48b7[71]],function(_0xcd70x3a){var _0xcd70x38={};_0xcd70x38[_0xcd70x3a]= {$like:_0x48b7[84]+ _0xcd70x1f[_0x48b7[67]][_0x48b7[83]]+ _0x48b7[84]};return _0xcd70x38})})};_0xcd70x2b= _[_0x48b7[82]]({},_0xcd70x2b,_0xcd70x1f[_0x48b7[86]]);return _0xcd70x4f[_0x48b7[172]](_0xcd70x2b)}})[_0x48b7[40]](function(_0xcd70x3f){if(_0xcd70x3f){_0xcd70x2c= _0xcd70x3f[_0x48b7[73]];if(!_0xcd70x1f[_0x48b7[67]][_0x48b7[75]](_0x48b7[74])){_0xcd70x2b[_0x48b7[48]]= qs[_0x48b7[48]](_0xcd70x1f[_0x48b7[67]][_0x48b7[48]]);_0xcd70x2b[_0x48b7[47]]= qs[_0x48b7[47]](_0xcd70x1f[_0x48b7[67]][_0x48b7[47]])};return _0xcd70x4f[_0x48b7[172]](_0xcd70x2b)}})[_0x48b7[40]](function(_0xcd70x3c){if(_0xcd70x3c){return _0xcd70x3c?{count:_0xcd70x2c,rows:_0xcd70x3c}:null}})[_0x48b7[40]](respondWithResult(_0xcd70x28,null))[_0x48b7[31]](handleError(_0xcd70x28,null))};exports[_0x48b7[173]]= function(_0xcd70x1f,_0xcd70x25,_0xcd70x3d){if(_0xcd70x1f[_0x48b7[96]][_0x48b7[92]]){delete _0xcd70x1f[_0x48b7[96]][_0x48b7[92]]};return db[_0x48b7[64]][_0x48b7[94]]({where:{id:_0xcd70x1f[_0x48b7[93]][_0x48b7[92]]}})[_0x48b7[40]](handleEntityNotFound(_0xcd70x25,null))[_0x48b7[40]](function(_0xcd70x28){if(_0xcd70x28){_0xcd70x1f[_0x48b7[96]][_0x48b7[99]]= _0xcd70x28[_0x48b7[92]];return db[_0x48b7[174]][_0x48b7[95]](_0xcd70x1f[_0x48b7[96]])}})[_0x48b7[40]](respondWithResult(_0xcd70x25,null))[_0x48b7[31]](handleError(_0xcd70x25,null))};exports[_0x48b7[175]]= function(_0xcd70x1f,_0xcd70x25,_0xcd70x3d){return db[_0x48b7[177]][_0x48b7[94]]({where:{id:_0xcd70x1f[_0x48b7[93]][_0x48b7[92]]}})[_0x48b7[40]](handleEntityNotFound(_0xcd70x25,null))[_0x48b7[40]](function(_0xcd70x28){if(_0xcd70x28){return _0xcd70x28[_0x48b7[175]](_0xcd70x1f[_0x48b7[96]][_0x48b7[104]],_[_0x48b7[176]](_0xcd70x1f[_0x48b7[96]],[_0x48b7[104],_0x48b7[92]])|| {})}})[_0x48b7[40]](respondWithResult(_0xcd70x25,null))[_0x48b7[31]](handleError(_0xcd70x25,null))};exports[_0x48b7[178]]= function(_0xcd70x1f,_0xcd70x28,_0xcd70x3d){var _0xcd70x2b={};var _0xcd70x37={};var _0xcd70x4f;var _0xcd70x2c;return db[_0x48b7[64]][_0x48b7[102]]({where:{id:_0xcd70x1f[_0x48b7[93]][_0x48b7[92]]}})[_0x48b7[40]](handleEntityNotFound(_0xcd70x28,null))[_0x48b7[40]](function(_0xcd70x28){if(_0xcd70x28){_0xcd70x4f= _0xcd70x28;_0xcd70x37[_0x48b7[62]]= _[_0x48b7[65]](db[_0x48b7[174]][_0x48b7[63]]);_0xcd70x37[_0x48b7[67]]= _[_0x48b7[65]](_0xcd70x1f[_0x48b7[67]]);_0xcd70x37[_0x48b7[69]]= _[_0x48b7[70]](_0xcd70x37[_0x48b7[62]],_0xcd70x37[_0x48b7[67]]);_0xcd70x2b[_0x48b7[71]]= _[_0x48b7[70]](_0xcd70x37[_0x48b7[62]],qs[_0x48b7[72]](_0xcd70x1f[_0x48b7[67]][_0x48b7[72]]));_0xcd70x2b[_0x48b7[71]]= (_0xcd70x2b[_0x48b7[71]][_0x48b7[73]])?_0xcd70x2b[_0x48b7[71]]:_0xcd70x37[_0x48b7[62]];_0xcd70x2b[_0x48b7[76]]= qs[_0x48b7[77]](_0xcd70x1f[_0x48b7[67]][_0x48b7[77]]);_0xcd70x2b[_0x48b7[78]]= qs[_0x48b7[69]](_[_0x48b7[79]](_0xcd70x1f[_0x48b7[67]],_0xcd70x37[_0x48b7[69]]));if(_0xcd70x1f[_0x48b7[67]][_0x48b7[83]]){_0xcd70x2b[_0x48b7[78]]= _[_0x48b7[82]](_0xcd70x2b[_0x48b7[78]],{$or:_[_0x48b7[85]](_0xcd70x2b[_0x48b7[71]],function(_0xcd70x3a){var _0xcd70x38={};_0xcd70x38[_0xcd70x3a]= {$like:_0x48b7[84]+ _0xcd70x1f[_0x48b7[67]][_0x48b7[83]]+ _0x48b7[84]};return _0xcd70x38})})};_0xcd70x2b= _[_0x48b7[82]]({},_0xcd70x2b,_0xcd70x1f[_0x48b7[86]]);return _0xcd70x4f[_0x48b7[178]](_0xcd70x2b)}})[_0x48b7[40]](function(_0xcd70x3f){if(_0xcd70x3f){_0xcd70x2c= _0xcd70x3f[_0x48b7[73]];if(!_0xcd70x1f[_0x48b7[67]][_0x48b7[75]](_0x48b7[74])){_0xcd70x2b[_0x48b7[48]]= qs[_0x48b7[48]](_0xcd70x1f[_0x48b7[67]][_0x48b7[48]]);_0xcd70x2b[_0x48b7[47]]= qs[_0x48b7[47]](_0xcd70x1f[_0x48b7[67]][_0x48b7[47]])};return _0xcd70x4f[_0x48b7[178]](_0xcd70x2b)}})[_0x48b7[40]](function(_0xcd70x3c){if(_0xcd70x3c){return _0xcd70x3c?{count:_0xcd70x2c,rows:_0xcd70x3c}:null}})[_0x48b7[40]](respondWithResult(_0xcd70x28,null))[_0x48b7[31]](handleError(_0xcd70x28,null))};exports[_0x48b7[179]]= function(_0xcd70x1f,_0xcd70x25,_0xcd70x3d){var _0xcd70x2b={raw:false,where:{}};var _0xcd70x37={};var _0xcd70x3e={count:0,rows:[]};return db[_0x48b7[64]][_0x48b7[102]]({where:{id:_0xcd70x1f[_0x48b7[93]][_0x48b7[92]]}})[_0x48b7[40]](handleEntityNotFound(_0xcd70x25,null))[_0x48b7[40]](function(_0xcd70x28){if(_0xcd70x28){_0xcd70x37[_0x48b7[62]]= _[_0x48b7[65]](db[_0x48b7[138]][_0x48b7[63]]);_0xcd70x37[_0x48b7[67]]= _[_0x48b7[65]](_0xcd70x1f[_0x48b7[67]]);_0xcd70x37[_0x48b7[69]]= _[_0x48b7[70]](_0xcd70x37[_0x48b7[62]],_0xcd70x37[_0x48b7[67]]);_0xcd70x2b[_0x48b7[71]]= _[_0x48b7[70]](_0xcd70x37[_0x48b7[62]],qs[_0x48b7[72]](_0xcd70x1f[_0x48b7[67]][_0x48b7[72]]));_0xcd70x2b[_0x48b7[71]]= (_0xcd70x2b[_0x48b7[71]][_0x48b7[73]])?_0xcd70x2b[_0x48b7[71]]:_0xcd70x37[_0x48b7[62]];if(!_0xcd70x1f[_0x48b7[67]][_0x48b7[75]](_0x48b7[74])){_0xcd70x2b[_0x48b7[48]]= qs[_0x48b7[48]](_0xcd70x1f[_0x48b7[67]][_0x48b7[48]]);_0xcd70x2b[_0x48b7[47]]= qs[_0x48b7[47]](_0xcd70x1f[_0x48b7[67]][_0x48b7[47]])};_0xcd70x2b[_0x48b7[76]]= qs[_0x48b7[77]](_0xcd70x1f[_0x48b7[67]][_0x48b7[77]]);_0xcd70x2b[_0x48b7[78]]= qs[_0x48b7[69]](_[_0x48b7[79]](_0xcd70x1f[_0x48b7[67]],_0xcd70x37[_0x48b7[69]]));_0xcd70x2b[_0x48b7[78]][_0x48b7[99]]= _0xcd70x28[_0x48b7[92]];if(_0xcd70x1f[_0x48b7[67]][_0x48b7[83]]){_0xcd70x2b[_0x48b7[78]]= _[_0x48b7[82]](_0xcd70x2b[_0x48b7[78]],{$or:_[_0x48b7[85]](_0xcd70x2b[_0x48b7[71]],function(_0xcd70x3a){var _0xcd70x38={};_0xcd70x38[_0xcd70x3a]= {$like:_0x48b7[84]+ _0xcd70x1f[_0x48b7[67]][_0x48b7[83]]+ _0x48b7[84]};return _0xcd70x38})})};_0xcd70x2b= _[_0x48b7[82]]({},_0xcd70x2b,_0xcd70x1f[_0x48b7[86]]);return db[_0x48b7[138]][_0x48b7[46]]({where:_0xcd70x2b[_0x48b7[78]]})[_0x48b7[40]](function(_0xcd70x2c){_0xcd70x3e[_0x48b7[46]]= _0xcd70x2c;if(_0xcd70x1f[_0x48b7[67]][_0x48b7[88]]){_0xcd70x2b[_0x48b7[89]]= [{model:db[_0x48b7[151]],as:_0x48b7[180],required:false},{model:db[_0x48b7[120]],as:_0x48b7[181],attributes:[_0x48b7[59],_0x48b7[182],_0x48b7[183]],required:false},{model:db[_0x48b7[184]],as:_0x48b7[185],attributes:[_0x48b7[92],_0x48b7[59],_0x48b7[186]],where:_0xcd70x1f[_0x48b7[67]][_0x48b7[187]]?{id:_0xcd70x1f[_0x48b7[67]][_0x48b7[187]]}:undefined,required:_0xcd70x1f[_0x48b7[67]][_0x48b7[187]]?true:false}]};return db[_0x48b7[138]][_0x48b7[90]](_0xcd70x2b)})[_0x48b7[40]](function(_0xcd70x3c){_0xcd70x3e[_0x48b7[87]]= _0xcd70x3c;return _0xcd70x3e})}})[_0x48b7[40]](respondWithFilteredResult(_0xcd70x25,_0xcd70x2b))[_0x48b7[31]](handleError(_0xcd70x25,null))}
\ No newline at end of file
+var _0x244f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x64\x64\x41\x6E\x73\x77\x65\x72","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x72\x65\x6D\x6F\x76\x65\x41\x6E\x73\x77\x65\x72\x73","\x69\x64\x73","\x6E\x6F\x74\x69\x66\x79","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x45\x76\x65\x6E\x74\x4D\x61\x6E\x61\x67\x65\x72","\x55\x73\x65\x72\x49\x64","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x67\x65\x6E\x74","\x2C","\x77\x61\x69\x74\x46\x6F\x72\x54\x68\x65\x41\x73\x73\x69\x67\x6E\x65\x64\x41\x67\x65\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x75\x6E\x73\x68\x69\x66\x74","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x6F\x72\x63\x65\x64\x4F\x77\x6E\x65\x72\x73\x68\x69\x70","\x53\x74\x61\x72\x74","\x73\x74\x61\x72\x74\x52\x6F\x75\x74\x69\x6E\x67","\x55\x73\x65\x72","\x69\x6E","\x63\x6F\x6E\x74\x61\x63\x74","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x49\x64","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","","\x20","\x6C\x61\x73\x74\x4E\x61\x6D\x65","\x61\x75\x74\x6F\x63\x6C\x6F\x73\x65","\x63\x6C\x6F\x73\x65","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x70\x75\x73\x68","\x67\x65\x74","\x63\x72\x65\x61\x74\x65\x64","\x73\x70\x72\x65\x61\x64","\x74\x68\x72\x65\x61\x64\x49\x64","\x65\x78\x74\x65\x72\x6E\x61\x6C\x55\x72\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6C\x69\x73\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x61\x73\x63","\x6F\x72\x64\x65\x72\x42\x79","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x66\x72\x6F\x6D","\x4C\x69\x73\x74\x49\x64","\x64\x65\x66\x61\x75\x6C\x74\x73","\x6D\x61\x70\x4B\x65\x79","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6D\x4C\x69\x73\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6E\x6F\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x20\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x69\x73\x4E\x69\x6C","\x66\x72\x6F\x6D\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","\x62\x6F\x64\x79\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x20\x61\x6E\x64\x20\x6E\x6F\x74\x20\x65\x6D\x70\x74\x79","\x6D\x61\x70\x4B\x65\x79\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x6D\x61\x70\x4B\x65\x79\x20\x69\x6E\x76\x61\x6C\x69\x64\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x67\x65\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x6F\x6D\x69\x74","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x43\x6F\x6E\x74\x61\x63\x74","\x4F\x77\x6E\x65\x72","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x54\x61\x67","\x54\x61\x67\x73","\x63\x6F\x6C\x6F\x72","\x74\x61\x67"];_0x244f[0];var jsonpatch=require(_0x244f[1]);var rp=require(_0x244f[2]);var moment=require(_0x244f[3]);var BPromise=require(_0x244f[4]);var Mustache=require(_0x244f[5]);var util=require(_0x244f[6]);var path=require(_0x244f[7]);var sox=require(_0x244f[8]);var csv=require(_0x244f[9]);var ejs=require(_0x244f[10]);var fs=require(_0x244f[11]);var _=require(_0x244f[12]);var squel=require(_0x244f[13]);var crypto=require(_0x244f[14]);var jsforce=require(_0x244f[15]);var deskjs=require(_0x244f[16]);var toCsv=require(_0x244f[9]);var querystring=require(_0x244f[17]);var Papa=require(_0x244f[18]);var qs=require(_0x244f[19]);var logger=require(_0x244f[21])(_0x244f[20]);var utils=require(_0x244f[22]);var config=require(_0x244f[23]);var db=require(_0x244f[25])[_0x244f[24]];var jayson=require(_0x244f[26]);var client=jayson[_0x244f[28]][_0x244f[27]]({port:9004});var client9002=jayson[_0x244f[28]][_0x244f[27]]({port:9002});function respondWithRpcPromise(_0x6119x1d,_0x6119x1e,_0x6119x1f,_0x6119x20){return  new BPromise(function(_0x6119x21,_0x6119x22){var _0x6119x23=(_0x6119x20|| client);return _0x6119x23[_0x244f[41]](_0x6119x1d,_0x6119x1f)[_0x244f[40]](function(_0x6119x25){logger[_0x244f[33]](_0x244f[29],_0x6119x1e,_0x244f[32]);logger[_0x244f[36]](_0x244f[34],_0x6119x1e,_0x244f[32],JSON[_0x244f[35]](_0x6119x25));if(_0x6119x25[_0x244f[30]]){if(_0x6119x25[_0x244f[30]][_0x244f[37]]=== 500){logger[_0x244f[30]](_0x244f[29],_0x6119x1e,_0x6119x25[_0x244f[30]][_0x244f[38]]);return _0x6119x22(_0x6119x25[_0x244f[30]][_0x244f[38]])};logger[_0x244f[30]](_0x244f[29],_0x6119x1e,_0x6119x25[_0x244f[30]][_0x244f[38]]);return _0x6119x21(_0x6119x25[_0x244f[30]][_0x244f[38]])}else {logger[_0x244f[33]](_0x244f[29],_0x6119x1e,_0x244f[32]);_0x6119x21(_0x6119x25[_0x244f[39]][_0x244f[38]])}})[_0x244f[31]](function(_0x6119x24){logger[_0x244f[30]](_0x244f[29],_0x6119x1e,_0x6119x24);_0x6119x22(_0x6119x24)})})}function respondWithStatusCode(_0x6119x25,_0x6119x27){_0x6119x27= _0x6119x27|| 204;return function(_0x6119x28){if(_0x6119x28){return _0x6119x25[_0x244f[42]](_0x6119x27)};return _0x6119x25[_0x244f[44]](_0x6119x27)[_0x244f[43]]()}}function respondWithResult(_0x6119x25,_0x6119x27){_0x6119x27= _0x6119x27|| 200;return function(_0x6119x28){if(_0x6119x28){return _0x6119x25[_0x244f[44]](_0x6119x27)[_0x244f[45]](_0x6119x28)}}}function respondWithFilteredResult(_0x6119x25,_0x6119x2b){return function(_0x6119x28){if(_0x6119x28){var _0x6119x2c=_0x6119x28[_0x244f[46]],_0x6119x2d=_0x6119x2b[_0x244f[47]],_0x6119x2e=_0x6119x2b[_0x244f[47]]+ _0x6119x2b[_0x244f[48]],_0x6119x27;if(_0x6119x2e>= _0x6119x2c){_0x6119x2e= _0x6119x2c;_0x6119x27= 200}else {_0x6119x27= 206};_0x6119x25[_0x244f[44]](_0x6119x27);return _0x6119x25[_0x244f[52]](_0x244f[49],_0x6119x2d+ _0x244f[50]+ _0x6119x2e+ _0x244f[51]+ _0x6119x2c)[_0x244f[45]](_0x6119x28)};return null}}function patchUpdates(_0x6119x30){return function(_0x6119x28){try{jsonpatch[_0x244f[53]](_0x6119x28,_0x6119x30,true)}catch(err){return BPromise[_0x244f[54]](err)};return _0x6119x28[_0x244f[55]]()}}function saveUpdates(_0x6119x32,_0x6119x27){return function(_0x6119x28){if(_0x6119x28){return _0x6119x28[_0x244f[56]](_0x6119x32)[_0x244f[40]](function(_0x6119x33){return _0x6119x33})};return null}}function removeEntity(_0x6119x25,_0x6119x27){return function(_0x6119x28){if(_0x6119x28){return _0x6119x28[_0x244f[57]]()[_0x244f[40]](function(){_0x6119x25[_0x244f[44]](204)[_0x244f[43]]()})}}}function handleEntityNotFound(_0x6119x25,_0x6119x27){return function(_0x6119x28){if(!_0x6119x28){_0x6119x25[_0x244f[42]](404)};return _0x6119x28}}function handleError(_0x6119x25,_0x6119x27){_0x6119x27= _0x6119x27|| 500;return function(_0x6119x24){logger[_0x244f[30]](_0x6119x24[_0x244f[58]]);if(_0x6119x24[_0x244f[59]]){delete _0x6119x24[_0x244f[59]]};_0x6119x25[_0x244f[44]](_0x6119x27)[_0x244f[60]](_0x6119x24)}}exports[_0x244f[61]]= function(_0x6119x1f,_0x6119x25){var _0x6119x2b={},_0x6119x37={},_0x6119x38={count:0,rows:[]};_0x6119x37[_0x244f[62]]= _[_0x244f[65]](db[_0x244f[64]][_0x244f[63]]);var _0x6119x39={dateStart:_0x6119x1f[_0x244f[67]][_0x244f[66]],dateEnd:_0x6119x1f[_0x244f[67]][_0x244f[68]]};delete _0x6119x1f[_0x244f[67]][_0x244f[66]];delete _0x6119x1f[_0x244f[67]][_0x244f[68]];_0x6119x37[_0x244f[67]]= _[_0x244f[65]](_0x6119x1f[_0x244f[67]]);_0x6119x37[_0x244f[69]]= _[_0x244f[70]](_0x6119x37[_0x244f[62]],_0x6119x37[_0x244f[67]]);_0x6119x2b[_0x244f[71]]= _[_0x244f[70]](_0x6119x37[_0x244f[62]],qs[_0x244f[72]](_0x6119x1f[_0x244f[67]][_0x244f[72]]));_0x6119x2b[_0x244f[71]]= (_0x6119x2b[_0x244f[71]][_0x244f[73]])?_0x6119x2b[_0x244f[71]]:_0x6119x37[_0x244f[62]];if(!_0x6119x1f[_0x244f[67]][_0x244f[75]](_0x244f[74])){_0x6119x2b[_0x244f[48]]= qs[_0x244f[48]](_0x6119x1f[_0x244f[67]][_0x244f[48]]);_0x6119x2b[_0x244f[47]]= qs[_0x244f[47]](_0x6119x1f[_0x244f[67]][_0x244f[47]])};_0x6119x2b[_0x244f[76]]= qs[_0x244f[77]](_0x6119x1f[_0x244f[67]][_0x244f[77]]);_0x6119x2b[_0x244f[78]]= qs[_0x244f[69]](_[_0x244f[79]](_0x6119x1f[_0x244f[67]],_0x6119x37[_0x244f[69]]));if(_0x6119x39[_0x244f[66]]){if(_0x6119x39[_0x244f[68]]){_0x6119x39[_0x244f[68]]= moment(_0x6119x39[_0x244f[68]])[_0x244f[81]](1,_0x244f[80])}else {_0x6119x39[_0x244f[68]]= moment(_0x6119x39[_0x244f[66]])[_0x244f[81]](1,_0x244f[80])};_[_0x244f[82]](_0x6119x2b[_0x244f[78]],{createdAt:{$gte:_0x6119x39[_0x244f[66]],$lte:_0x6119x39[_0x244f[68]]}})};if(_0x6119x1f[_0x244f[67]][_0x244f[83]]){_0x6119x2b[_0x244f[78]]= _[_0x244f[82]](_0x6119x2b[_0x244f[78]],{$or:_[_0x244f[85]](_0x6119x2b[_0x244f[71]],function(_0x6119x3a){var _0x6119x38={};_0x6119x38[_0x6119x3a]= {$like:_0x244f[84]+ _0x6119x1f[_0x244f[67]][_0x244f[83]]+ _0x244f[84]};return _0x6119x38})})};_0x6119x2b= _[_0x244f[82]]({},_0x6119x2b,_0x6119x1f[_0x244f[86]]);var _0x6119x3b={where:_0x6119x2b[_0x244f[78]]};return db[_0x244f[64]][_0x244f[46]](_0x6119x3b)[_0x244f[40]](function(_0x6119x2c){_0x6119x38[_0x244f[46]]= _0x6119x2c;if(_0x6119x1f[_0x244f[67]][_0x244f[88]]){_0x6119x2b[_0x244f[89]]= [{all:true}]};return db[_0x244f[64]][_0x244f[90]](_0x6119x2b)})[_0x244f[40]](function(_0x6119x3c){_0x6119x38[_0x244f[87]]= _0x6119x3c;return _0x6119x38})[_0x244f[40]](respondWithFilteredResult(_0x6119x25,_0x6119x2b))[_0x244f[31]](handleError(_0x6119x25,null))};exports[_0x244f[91]]= function(_0x6119x1f,_0x6119x25){var _0x6119x2b={raw:false,where:{id:_0x6119x1f[_0x244f[93]][_0x244f[92]]}},_0x6119x37={};_0x6119x37[_0x244f[62]]= _[_0x244f[65]](db[_0x244f[64]][_0x244f[63]]);_0x6119x37[_0x244f[67]]= _[_0x244f[65]](_0x6119x1f[_0x244f[67]]);_0x6119x37[_0x244f[69]]= _[_0x244f[70]](_0x6119x37[_0x244f[62]],_0x6119x37[_0x244f[67]]);_0x6119x2b[_0x244f[71]]= _[_0x244f[70]](_0x6119x37[_0x244f[62]],qs[_0x244f[72]](_0x6119x1f[_0x244f[67]][_0x244f[72]]));_0x6119x2b[_0x244f[71]]= (_0x6119x2b[_0x244f[71]][_0x244f[73]])?_0x6119x2b[_0x244f[71]]:_0x6119x37[_0x244f[62]];if(_0x6119x1f[_0x244f[67]][_0x244f[88]]){_0x6119x2b[_0x244f[89]]= [{all:true}]};_0x6119x2b= _[_0x244f[82]]({},_0x6119x2b,_0x6119x1f[_0x244f[86]]);return db[_0x244f[64]][_0x244f[94]](_0x6119x2b)[_0x244f[40]](handleEntityNotFound(_0x6119x25,null))[_0x244f[40]](respondWithResult(_0x6119x25,null))[_0x244f[31]](handleError(_0x6119x25,null))};exports[_0x244f[95]]= function(_0x6119x1f,_0x6119x25){return db[_0x244f[64]][_0x244f[95]](_0x6119x1f[_0x244f[96]],{})[_0x244f[40]](respondWithResult(_0x6119x25,201))[_0x244f[31]](handleError(_0x6119x25,null))};exports[_0x244f[56]]= function(_0x6119x1f,_0x6119x25){if(_0x6119x1f[_0x244f[96]][_0x244f[92]]){delete _0x6119x1f[_0x244f[96]][_0x244f[92]]};return db[_0x244f[64]][_0x244f[94]]({where:{id:_0x6119x1f[_0x244f[93]][_0x244f[92]]}})[_0x244f[40]](handleEntityNotFound(_0x6119x25,null))[_0x244f[40]](saveUpdates(_0x6119x1f[_0x244f[96]],null))[_0x244f[40]](respondWithResult(_0x6119x25,null))[_0x244f[31]](handleError(_0x6119x25,null))};exports[_0x244f[57]]= function(_0x6119x1f,_0x6119x25){return db[_0x244f[64]][_0x244f[94]]({where:{id:_0x6119x1f[_0x244f[93]][_0x244f[92]]}})[_0x244f[40]](handleEntityNotFound(_0x6119x25,null))[_0x244f[40]](removeEntity(_0x6119x25,null))[_0x244f[31]](handleError(_0x6119x25,null))};exports[_0x244f[97]]= function(_0x6119x1f,_0x6119x25){return db[_0x244f[64]][_0x244f[97]]()[_0x244f[40]](respondWithResult(_0x6119x25,null))[_0x244f[31]](handleError(_0x6119x25,null))};exports[_0x244f[98]]= function(_0x6119x1f,_0x6119x25,_0x6119x3d){if(_0x6119x1f[_0x244f[96]][_0x244f[92]]){delete _0x6119x1f[_0x244f[96]][_0x244f[92]]};return db[_0x244f[64]][_0x244f[94]]({where:{id:_0x6119x1f[_0x244f[93]][_0x244f[92]]}})[_0x244f[40]](handleEntityNotFound(_0x6119x25,null))[_0x244f[40]](function(_0x6119x28){if(_0x6119x28){_0x6119x1f[_0x244f[96]][_0x244f[99]]= _0x6119x28[_0x244f[92]];return db[_0x244f[100]][_0x244f[95]](_0x6119x1f[_0x244f[96]])}})[_0x244f[40]](respondWithResult(_0x6119x25,null))[_0x244f[31]](handleError(_0x6119x25,null))};exports[_0x244f[101]]= function(_0x6119x1f,_0x6119x25,_0x6119x3d){var _0x6119x2b={raw:false,where:{}};var _0x6119x37={};var _0x6119x3e={count:0,rows:[]};return db[_0x244f[64]][_0x244f[102]]({where:{id:_0x6119x1f[_0x244f[93]][_0x244f[92]]}})[_0x244f[40]](handleEntityNotFound(_0x6119x25,null))[_0x244f[40]](function(_0x6119x28){if(_0x6119x28){_0x6119x37[_0x244f[62]]= _[_0x244f[65]](db[_0x244f[100]][_0x244f[63]]);_0x6119x37[_0x244f[67]]= _[_0x244f[65]](_0x6119x1f[_0x244f[67]]);_0x6119x37[_0x244f[69]]= _[_0x244f[70]](_0x6119x37[_0x244f[62]],_0x6119x37[_0x244f[67]]);_0x6119x2b[_0x244f[71]]= _[_0x244f[70]](_0x6119x37[_0x244f[62]],qs[_0x244f[72]](_0x6119x1f[_0x244f[67]][_0x244f[72]]));_0x6119x2b[_0x244f[71]]= (_0x6119x2b[_0x244f[71]][_0x244f[73]])?_0x6119x2b[_0x244f[71]]:_0x6119x37[_0x244f[62]];if(!_0x6119x1f[_0x244f[67]][_0x244f[75]](_0x244f[74])){_0x6119x2b[_0x244f[48]]= qs[_0x244f[48]](_0x6119x1f[_0x244f[67]][_0x244f[48]]);_0x6119x2b[_0x244f[47]]= qs[_0x244f[47]](_0x6119x1f[_0x244f[67]][_0x244f[47]])};_0x6119x2b[_0x244f[76]]= qs[_0x244f[77]](_0x6119x1f[_0x244f[67]][_0x244f[77]]);_0x6119x2b[_0x244f[78]]= qs[_0x244f[69]](_[_0x244f[79]](_0x6119x1f[_0x244f[67]],_0x6119x37[_0x244f[69]]));_0x6119x2b[_0x244f[78]][_0x244f[99]]= _0x6119x28[_0x244f[92]];if(_0x6119x1f[_0x244f[67]][_0x244f[83]]){_0x6119x2b[_0x244f[78]]= _[_0x244f[82]](_0x6119x2b[_0x244f[78]],{$or:_[_0x244f[85]](_0x6119x2b[_0x244f[71]],function(_0x6119x3a){var _0x6119x38={};_0x6119x38[_0x6119x3a]= {$like:_0x244f[84]+ _0x6119x1f[_0x244f[67]][_0x244f[83]]+ _0x244f[84]};return _0x6119x38})})};_0x6119x2b= _[_0x244f[82]]({},_0x6119x2b,_0x6119x1f[_0x244f[86]]);return db[_0x244f[100]][_0x244f[46]]({where:_0x6119x2b[_0x244f[78]]})[_0x244f[40]](function(_0x6119x2c){_0x6119x3e[_0x244f[46]]= _0x6119x2c;if(_0x6119x1f[_0x244f[67]][_0x244f[88]]){_0x6119x2b[_0x244f[89]]= [{all:true}]};return db[_0x244f[100]][_0x244f[90]](_0x6119x2b)})[_0x244f[40]](function(_0x6119x3c){_0x6119x3e[_0x244f[87]]= _0x6119x3c;return _0x6119x3e})}})[_0x244f[40]](respondWithFilteredResult(_0x6119x25,_0x6119x2b))[_0x244f[31]](handleError(_0x6119x25,null))};exports[_0x244f[103]]= function(_0x6119x1f,_0x6119x25,_0x6119x3d){var _0x6119x3f;return db[_0x244f[64]][_0x244f[94]]({where:{id:_0x6119x1f[_0x244f[93]][_0x244f[92]]}})[_0x244f[40]](handleEntityNotFound(_0x6119x25,null))[_0x244f[40]](function(_0x6119x28){if(_0x6119x28){return _0x6119x28[_0x244f[103]](_0x6119x1f[_0x244f[67]][_0x244f[104]])}})[_0x244f[40]](respondWithStatusCode(_0x6119x25,null))[_0x244f[31]](handleError(_0x6119x25,null))};exports[_0x244f[105]]= function(_0x6119x1f,_0x6119x25,_0x6119x3d){var _0x6119x40={body:_0x6119x1f[_0x244f[96]],channel:_0x244f[106]};var _0x6119x41=[];var _0x6119x42=[];var _0x6119x43={};return db[_0x244f[151]][_0x244f[97]]()[_0x244f[40]](function(_0x6119x4a){if(!_0x6119x4a){throw  new db[_0x244f[157]].ValidationError(_0x244f[156])};_0x6119x41= _[_0x244f[159]](_[_0x244f[65]](_0x6119x4a),[_0x244f[158],_0x244f[153]]);_0x6119x42= _[_0x244f[159]](_[_0x244f[65]](_0x6119x4a),[_0x244f[158],_0x244f[153],_0x244f[160],_0x244f[148]]);if(_0x6119x1f[_0x244f[96]][_0x244f[92]]){delete _0x6119x1f[_0x244f[96]][_0x244f[92]]};if(_[_0x244f[161]](_0x6119x1f[_0x244f[96]][_0x244f[147]])){throw  new db[_0x244f[157]].ValidationError(_0x244f[162])};if(_[_0x244f[161]](_0x6119x1f[_0x244f[96]][_0x244f[96]])|| _0x6119x1f[_0x244f[96]][_0x244f[96]]=== _0x244f[126]){throw  new db[_0x244f[157]].ValidationError(_0x244f[163])};if(_[_0x244f[161]](_0x6119x1f[_0x244f[96]][_0x244f[150]])){throw  new db[_0x244f[157]].ValidationError(_0x244f[164]+ _0x6119x42)};if(!_[_0x244f[165]](_0x6119x42,_0x6119x1f[_0x244f[96]][_0x244f[150]])){throw  new db[_0x244f[157]].ValidationError(_0x244f[166]+ _0x6119x42)};_0x6119x43[_0x6119x1f[_0x244f[96]][_0x244f[150]]]= _0x6119x1f[_0x244f[96]][_0x244f[147]]})[_0x244f[40]](function(){return db[_0x244f[64]][_0x244f[94]]({where:{id:_0x6119x1f[_0x244f[93]][_0x244f[92]]},include:[{model:db[_0x244f[152]],as:_0x244f[140],include:[{model:db[_0x244f[151]],as:_0x244f[146],where:_0x6119x43,limit:1,order:[[_0x244f[153],_0x244f[154]]]}]},{model:db[_0x244f[155]],as:_0x244f[141]}]})})[_0x244f[40]](handleEntityNotFound(_0x6119x25,null))[_0x244f[40]](function(_0x6119x28){if(_0x6119x28&& _0x6119x28[_0x244f[140]]){_0x6119x40[_0x244f[113]]= _0x6119x28;_0x6119x40[_0x244f[116]]= _0x6119x28[_0x244f[141]];_0x6119x40[_0x244f[142]]= _0x6119x28[_0x244f[140]];_0x6119x40[_0x244f[116]]= _[_0x244f[145]](_0x6119x40[_0x244f[116]],[_0x244f[143]],[_0x244f[144]]);if(_0x6119x40[_0x244f[113]][_0x244f[141]]){delete _0x6119x40[_0x244f[113]][_0x244f[141]]};if(_0x6119x40[_0x244f[113]][_0x244f[140]]&& _0x6119x40[_0x244f[113]][_0x244f[140]][_0x244f[146]][_0x244f[73]]){return _0x6119x40[_0x244f[113]][_0x244f[140]][_0x244f[146]][0]};var _0x6119x49=_[_0x244f[149]](_0x6119x1f[_0x244f[96]],{firstName:_0x6119x1f[_0x244f[96]][_0x244f[147]],phone:_0x6119x1f[_0x244f[96]][_0x244f[147]],ListId:_0x6119x28[_0x244f[148]]});_0x6119x49[_0x6119x1f[_0x244f[96]][_0x244f[150]]]= _0x6119x1f[_0x244f[96]][_0x244f[147]];return db[_0x244f[151]][_0x244f[95]](_0x6119x49,{fields:_0x6119x41,raw:true})}})[_0x244f[40]](handleEntityNotFound(_0x6119x25,null))[_0x244f[40]](function(_0x6119x28){_0x6119x40[_0x244f[122]]= _0x6119x28;if(_0x6119x28){var _0x6119x47={ContactId:_0x6119x28[_0x244f[92]],OpenchannelAccountId:_0x6119x1f[_0x244f[93]][_0x244f[92]],from:(_0x6119x28[_0x244f[125]]|| _0x244f[126])+ _0x244f[127]+ (_0x6119x28[_0x244f[128]]|| _0x244f[126])};var _0x6119x48={OpenchannelAccountId:_0x6119x1f[_0x244f[93]][_0x244f[92]],closed:false};if(_0x6119x1f[_0x244f[96]][_0x244f[136]]){_0x6119x48[_0x244f[136]]= _0x6119x1f[_0x244f[96]][_0x244f[136]];return db[_0x244f[138]][_0x244f[94]]({where:_0x6119x48})[_0x244f[40]](function(_0x6119x46){if(_0x6119x46){return [_0x6119x46,false]};_0x6119x47[_0x244f[136]]= _0x6119x1f[_0x244f[96]][_0x244f[136]];_0x6119x47[_0x244f[137]]= _0x6119x1f[_0x244f[96]][_0x244f[137]];return db[_0x244f[138]][_0x244f[95]](_0x6119x47)[_0x244f[40]](function(_0x6119x46){return [_0x6119x46,true]})})}else {_0x6119x48[_0x244f[136]]= null};_0x6119x48[_0x244f[139]]= _0x6119x28[_0x244f[92]];return db[_0x244f[138]][_0x244f[94]]({where:_0x6119x48})[_0x244f[40]](function(_0x6119x46){if(_0x6119x46){return [_0x6119x46,false]};return db[_0x244f[138]][_0x244f[95]](_0x6119x47)[_0x244f[40]](function(_0x6119x46){return [_0x6119x46,true]})})}})[_0x244f[135]](function(_0x6119x28,_0x6119x45){if(_0x6119x28){if(!_0x6119x45){return _0x6119x28[_0x244f[56]]({from:(_0x6119x40[_0x244f[122]][_0x244f[125]]|| _0x244f[126])+ _0x244f[127]+ (_0x6119x40[_0x244f[122]][_0x244f[128]]|| _0x244f[126])})};if(_0x6119x40[_0x244f[113]][_0x244f[129]]){_0x6119x40[_0x244f[116]][_0x244f[132]]({id:0,priority:_0x6119x40[_0x244f[116]][_0x244f[73]]+ 1,app:_0x244f[130],appdata:_0x244f[131],interval:_0x244f[114]})};var _0x6119x46=_0x6119x28[_0x244f[133]]({plain:true});_0x6119x46[_0x244f[134]]= true;return _0x6119x46}})[_0x244f[40]](function(_0x6119x28){_0x6119x40[_0x244f[109]]= _0x6119x28;return db[_0x244f[124]][_0x244f[95]]({body:_0x6119x1f[_0x244f[96]][_0x244f[96]],OpenchannelAccountId:_0x6119x1f[_0x244f[93]][_0x244f[92]],OpenchannelInteractionId:_0x6119x28[_0x244f[92]],direction:_0x244f[121],ContactId:_0x6119x40[_0x244f[122]][_0x244f[92]],AttachmentId:_0x6119x1f[_0x244f[96]][_0x244f[123]]})})[_0x244f[40]](function(_0x6119x28){_0x6119x40[_0x244f[38]]= _0x6119x28;if(_0x6119x40[_0x244f[109]][_0x244f[108]]){return db[_0x244f[120]][_0x244f[94]]({attributes:[_0x244f[92],_0x244f[59]],where:{id:_0x6119x40[_0x244f[109]][_0x244f[108]]}})[_0x244f[40]](function(_0x6119x44){if(_0x6119x44){_0x6119x40[_0x244f[116]][_0x244f[115]]({id:0,priority:0,app:_0x244f[110],appdata:_0x6119x44[_0x244f[59]]+ _0x244f[111]+ (_0x6119x40[_0x244f[113]][_0x244f[112]]|| 10),interval:_0x244f[114]});_0x6119x40[_0x244f[117]]= false};return respondWithRpcPromise(_0x244f[118],_0x244f[119],_0x6119x40)})};return respondWithRpcPromise(_0x244f[118],_0x244f[119],_0x6119x40)})[_0x244f[40]](function(_0x6119x40){respondWithRpcPromise(_0x244f[107],_0x244f[107],{event:_0x244f[105],message:_0x6119x40},client9002);return _0x6119x40})[_0x244f[40]](respondWithResult(_0x6119x25,null))[_0x244f[31]](handleError(_0x6119x25,null))};exports[_0x244f[167]]= function(_0x6119x1f,_0x6119x25,_0x6119x3d){return db[_0x244f[64]][_0x244f[102]]({where:{id:_0x6119x1f[_0x244f[93]][_0x244f[92]]}})[_0x244f[40]](handleEntityNotFound(_0x6119x25,null))[_0x244f[40]](function(_0x6119x28){if(_0x6119x28){return db[_0x244f[171]][_0x244f[170]](function(_0x6119x4b){return db[_0x244f[155]][_0x244f[57]]({where:{OpenchannelAccountId:_0x6119x1f[_0x244f[93]][_0x244f[92]]},transaction:_0x6119x4b})[_0x244f[40]](function(_0x6119x4c){var _0x6119x4d=_[_0x244f[85]](_0x6119x1f[_0x244f[96]],function(_0x6119x4e){_0x6119x4e[_0x244f[99]]= _0x6119x1f[_0x244f[93]][_0x244f[92]];return _0x6119x4e});return db[_0x244f[155]][_0x244f[169]](_0x6119x4d,{transaction:_0x6119x4b})})})[_0x244f[40]](function(){return db[_0x244f[155]][_0x244f[168]]({where:{OpenchannelAccountId:_0x6119x1f[_0x244f[93]][_0x244f[92]]},order:_0x244f[143]})})}})[_0x244f[40]](respondWithResult(_0x6119x25,null))[_0x244f[31]](handleError(_0x6119x25,null))};exports[_0x244f[172]]= function(_0x6119x1f,_0x6119x28,_0x6119x3d){var _0x6119x2b={};var _0x6119x37={};var _0x6119x4f;var _0x6119x2c;return db[_0x244f[64]][_0x244f[102]]({where:{id:_0x6119x1f[_0x244f[93]][_0x244f[92]]}})[_0x244f[40]](handleEntityNotFound(_0x6119x28,null))[_0x244f[40]](function(_0x6119x28){if(_0x6119x28){_0x6119x4f= _0x6119x28;_0x6119x37[_0x244f[62]]= _[_0x244f[65]](db[_0x244f[155]][_0x244f[63]]);_0x6119x37[_0x244f[67]]= _[_0x244f[65]](_0x6119x1f[_0x244f[67]]);_0x6119x37[_0x244f[69]]= _[_0x244f[70]](_0x6119x37[_0x244f[62]],_0x6119x37[_0x244f[67]]);_0x6119x2b[_0x244f[71]]= _[_0x244f[70]](_0x6119x37[_0x244f[62]],qs[_0x244f[72]](_0x6119x1f[_0x244f[67]][_0x244f[72]]));_0x6119x2b[_0x244f[71]]= (_0x6119x2b[_0x244f[71]][_0x244f[73]])?_0x6119x2b[_0x244f[71]]:_0x6119x37[_0x244f[62]];_0x6119x2b[_0x244f[76]]= qs[_0x244f[77]](_0x6119x1f[_0x244f[67]][_0x244f[77]]);_0x6119x2b[_0x244f[78]]= qs[_0x244f[69]](_[_0x244f[79]](_0x6119x1f[_0x244f[67]],_0x6119x37[_0x244f[69]]));if(_0x6119x1f[_0x244f[67]][_0x244f[83]]){_0x6119x2b[_0x244f[78]]= _[_0x244f[82]](_0x6119x2b[_0x244f[78]],{$or:_[_0x244f[85]](_0x6119x2b[_0x244f[71]],function(_0x6119x3a){var _0x6119x38={};_0x6119x38[_0x6119x3a]= {$like:_0x244f[84]+ _0x6119x1f[_0x244f[67]][_0x244f[83]]+ _0x244f[84]};return _0x6119x38})})};_0x6119x2b= _[_0x244f[82]]({},_0x6119x2b,_0x6119x1f[_0x244f[86]]);return _0x6119x4f[_0x244f[172]](_0x6119x2b)}})[_0x244f[40]](function(_0x6119x3f){if(_0x6119x3f){_0x6119x2c= _0x6119x3f[_0x244f[73]];if(!_0x6119x1f[_0x244f[67]][_0x244f[75]](_0x244f[74])){_0x6119x2b[_0x244f[48]]= qs[_0x244f[48]](_0x6119x1f[_0x244f[67]][_0x244f[48]]);_0x6119x2b[_0x244f[47]]= qs[_0x244f[47]](_0x6119x1f[_0x244f[67]][_0x244f[47]])};return _0x6119x4f[_0x244f[172]](_0x6119x2b)}})[_0x244f[40]](function(_0x6119x3c){if(_0x6119x3c){return _0x6119x3c?{count:_0x6119x2c,rows:_0x6119x3c}:null}})[_0x244f[40]](respondWithResult(_0x6119x28,null))[_0x244f[31]](handleError(_0x6119x28,null))};exports[_0x244f[173]]= function(_0x6119x1f,_0x6119x25,_0x6119x3d){if(_0x6119x1f[_0x244f[96]][_0x244f[92]]){delete _0x6119x1f[_0x244f[96]][_0x244f[92]]};return db[_0x244f[64]][_0x244f[94]]({where:{id:_0x6119x1f[_0x244f[93]][_0x244f[92]]}})[_0x244f[40]](handleEntityNotFound(_0x6119x25,null))[_0x244f[40]](function(_0x6119x28){if(_0x6119x28){_0x6119x1f[_0x244f[96]][_0x244f[99]]= _0x6119x28[_0x244f[92]];return db[_0x244f[174]][_0x244f[95]](_0x6119x1f[_0x244f[96]])}})[_0x244f[40]](respondWithResult(_0x6119x25,null))[_0x244f[31]](handleError(_0x6119x25,null))};exports[_0x244f[175]]= function(_0x6119x1f,_0x6119x25,_0x6119x3d){return db[_0x244f[177]][_0x244f[94]]({where:{id:_0x6119x1f[_0x244f[93]][_0x244f[92]]}})[_0x244f[40]](handleEntityNotFound(_0x6119x25,null))[_0x244f[40]](function(_0x6119x28){if(_0x6119x28){return _0x6119x28[_0x244f[175]](_0x6119x1f[_0x244f[96]][_0x244f[104]],_[_0x244f[176]](_0x6119x1f[_0x244f[96]],[_0x244f[104],_0x244f[92]])|| {})}})[_0x244f[40]](respondWithResult(_0x6119x25,null))[_0x244f[31]](handleError(_0x6119x25,null))};exports[_0x244f[178]]= function(_0x6119x1f,_0x6119x28,_0x6119x3d){var _0x6119x2b={};var _0x6119x37={};var _0x6119x4f;var _0x6119x2c;return db[_0x244f[64]][_0x244f[102]]({where:{id:_0x6119x1f[_0x244f[93]][_0x244f[92]]}})[_0x244f[40]](handleEntityNotFound(_0x6119x28,null))[_0x244f[40]](function(_0x6119x28){if(_0x6119x28){_0x6119x4f= _0x6119x28;_0x6119x37[_0x244f[62]]= _[_0x244f[65]](db[_0x244f[174]][_0x244f[63]]);_0x6119x37[_0x244f[67]]= _[_0x244f[65]](_0x6119x1f[_0x244f[67]]);_0x6119x37[_0x244f[69]]= _[_0x244f[70]](_0x6119x37[_0x244f[62]],_0x6119x37[_0x244f[67]]);_0x6119x2b[_0x244f[71]]= _[_0x244f[70]](_0x6119x37[_0x244f[62]],qs[_0x244f[72]](_0x6119x1f[_0x244f[67]][_0x244f[72]]));_0x6119x2b[_0x244f[71]]= (_0x6119x2b[_0x244f[71]][_0x244f[73]])?_0x6119x2b[_0x244f[71]]:_0x6119x37[_0x244f[62]];_0x6119x2b[_0x244f[76]]= qs[_0x244f[77]](_0x6119x1f[_0x244f[67]][_0x244f[77]]);_0x6119x2b[_0x244f[78]]= qs[_0x244f[69]](_[_0x244f[79]](_0x6119x1f[_0x244f[67]],_0x6119x37[_0x244f[69]]));if(_0x6119x1f[_0x244f[67]][_0x244f[83]]){_0x6119x2b[_0x244f[78]]= _[_0x244f[82]](_0x6119x2b[_0x244f[78]],{$or:_[_0x244f[85]](_0x6119x2b[_0x244f[71]],function(_0x6119x3a){var _0x6119x38={};_0x6119x38[_0x6119x3a]= {$like:_0x244f[84]+ _0x6119x1f[_0x244f[67]][_0x244f[83]]+ _0x244f[84]};return _0x6119x38})})};_0x6119x2b= _[_0x244f[82]]({},_0x6119x2b,_0x6119x1f[_0x244f[86]]);return _0x6119x4f[_0x244f[178]](_0x6119x2b)}})[_0x244f[40]](function(_0x6119x3f){if(_0x6119x3f){_0x6119x2c= _0x6119x3f[_0x244f[73]];if(!_0x6119x1f[_0x244f[67]][_0x244f[75]](_0x244f[74])){_0x6119x2b[_0x244f[48]]= qs[_0x244f[48]](_0x6119x1f[_0x244f[67]][_0x244f[48]]);_0x6119x2b[_0x244f[47]]= qs[_0x244f[47]](_0x6119x1f[_0x244f[67]][_0x244f[47]])};return _0x6119x4f[_0x244f[178]](_0x6119x2b)}})[_0x244f[40]](function(_0x6119x3c){if(_0x6119x3c){return _0x6119x3c?{count:_0x6119x2c,rows:_0x6119x3c}:null}})[_0x244f[40]](respondWithResult(_0x6119x28,null))[_0x244f[31]](handleError(_0x6119x28,null))};exports[_0x244f[179]]= function(_0x6119x1f,_0x6119x25,_0x6119x3d){var _0x6119x2b={raw:false,where:{}};var _0x6119x37={};var _0x6119x3e={count:0,rows:[]};return db[_0x244f[64]][_0x244f[102]]({where:{id:_0x6119x1f[_0x244f[93]][_0x244f[92]]}})[_0x244f[40]](handleEntityNotFound(_0x6119x25,null))[_0x244f[40]](function(_0x6119x28){if(_0x6119x28){_0x6119x37[_0x244f[62]]= _[_0x244f[65]](db[_0x244f[138]][_0x244f[63]]);_0x6119x37[_0x244f[67]]= _[_0x244f[65]](_0x6119x1f[_0x244f[67]]);_0x6119x37[_0x244f[69]]= _[_0x244f[70]](_0x6119x37[_0x244f[62]],_0x6119x37[_0x244f[67]]);_0x6119x2b[_0x244f[71]]= _[_0x244f[70]](_0x6119x37[_0x244f[62]],qs[_0x244f[72]](_0x6119x1f[_0x244f[67]][_0x244f[72]]));_0x6119x2b[_0x244f[71]]= (_0x6119x2b[_0x244f[71]][_0x244f[73]])?_0x6119x2b[_0x244f[71]]:_0x6119x37[_0x244f[62]];if(!_0x6119x1f[_0x244f[67]][_0x244f[75]](_0x244f[74])){_0x6119x2b[_0x244f[48]]= qs[_0x244f[48]](_0x6119x1f[_0x244f[67]][_0x244f[48]]);_0x6119x2b[_0x244f[47]]= qs[_0x244f[47]](_0x6119x1f[_0x244f[67]][_0x244f[47]])};_0x6119x2b[_0x244f[76]]= qs[_0x244f[77]](_0x6119x1f[_0x244f[67]][_0x244f[77]]);_0x6119x2b[_0x244f[78]]= qs[_0x244f[69]](_[_0x244f[79]](_0x6119x1f[_0x244f[67]],_0x6119x37[_0x244f[69]]));_0x6119x2b[_0x244f[78]][_0x244f[99]]= _0x6119x28[_0x244f[92]];if(_0x6119x1f[_0x244f[67]][_0x244f[83]]){_0x6119x2b[_0x244f[78]]= _[_0x244f[82]](_0x6119x2b[_0x244f[78]],{$or:_[_0x244f[85]](_0x6119x2b[_0x244f[71]],function(_0x6119x3a){var _0x6119x38={};_0x6119x38[_0x6119x3a]= {$like:_0x244f[84]+ _0x6119x1f[_0x244f[67]][_0x244f[83]]+ _0x244f[84]};return _0x6119x38})})};_0x6119x2b= _[_0x244f[82]]({},_0x6119x2b,_0x6119x1f[_0x244f[86]]);return db[_0x244f[138]][_0x244f[46]]({where:_0x6119x2b[_0x244f[78]]})[_0x244f[40]](function(_0x6119x2c){_0x6119x3e[_0x244f[46]]= _0x6119x2c;if(_0x6119x1f[_0x244f[67]][_0x244f[88]]){_0x6119x2b[_0x244f[89]]= [{model:db[_0x244f[151]],as:_0x244f[180],required:false},{model:db[_0x244f[120]],as:_0x244f[181],attributes:[_0x244f[59],_0x244f[182],_0x244f[183]],required:false},{model:db[_0x244f[184]],as:_0x244f[185],attributes:[_0x244f[92],_0x244f[59],_0x244f[186]],where:_0x6119x1f[_0x244f[67]][_0x244f[187]]?{id:_0x6119x1f[_0x244f[67]][_0x244f[187]]}:undefined,required:_0x6119x1f[_0x244f[67]][_0x244f[187]]?true:false}]};return db[_0x244f[138]][_0x244f[90]](_0x6119x2b)})[_0x244f[40]](function(_0x6119x3c){_0x6119x3e[_0x244f[87]]= _0x6119x3c;return _0x6119x3e})}})[_0x244f[40]](respondWithFilteredResult(_0x6119x25,_0x6119x2b))[_0x244f[31]](handleError(_0x6119x25,null))}
\ No newline at end of file
index a5f8eb4..9251566 100644 (file)
@@ -1 +1 @@
-var _0x349d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x349d[0];var _=require(_0x349d[1]);var util=require(_0x349d[2]);var logger=require(_0x349d[4])(_0x349d[3]);var moment=require(_0x349d[5]);var BPromise=require(_0x349d[6]);var rp=require(_0x349d[7]);var attributes=require(_0x349d[8]);module[_0x349d[9]]= function(_0x2255x8,_0x2255x9){return _0x2255x8[_0x349d[12]](_0x349d[10],attributes,{tableName:_0x349d[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x89da=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x89da[0];var _=require(_0x89da[1]);var util=require(_0x89da[2]);var logger=require(_0x89da[4])(_0x89da[3]);var moment=require(_0x89da[5]);var BPromise=require(_0x89da[6]);var rp=require(_0x89da[7]);var attributes=require(_0x89da[8]);module[_0x89da[9]]= function(_0x3249x8,_0x3249x9){return _0x3249x8[_0x89da[12]](_0x89da[10],attributes,{tableName:_0x89da[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 6c83fcb..b0b0c76 100644 (file)
@@ -1 +1 @@
-var _0x6eb6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x6eb6[0];var _=require(_0x6eb6[1]);var util=require(_0x6eb6[2]);var moment=require(_0x6eb6[3]);var BPromise=require(_0x6eb6[4]);var rs=require(_0x6eb6[5]);var fs=require(_0x6eb6[6]);var db=require(_0x6eb6[8])[_0x6eb6[7]];var utils=require(_0x6eb6[9]);var logger=require(_0x6eb6[11])(_0x6eb6[10]);var config=require(_0x6eb6[12]);var jayson=require(_0x6eb6[13]);var client=jayson[_0x6eb6[15]][_0x6eb6[14]]({port:9002});function respondWithRpcPromise(_0xa4a3xe,_0xa4a3xf,_0xa4a3x10){return  new BPromise(function(_0xa4a3x11,_0xa4a3x12){return client[_0x6eb6[28]](_0xa4a3xe,_0xa4a3x10)[_0x6eb6[27]](function(_0xa4a3x14){logger[_0x6eb6[20]](_0x6eb6[16],_0xa4a3xf,_0x6eb6[19]);logger[_0x6eb6[23]](_0x6eb6[21],_0xa4a3xf,_0x6eb6[19],JSON[_0x6eb6[22]](_0xa4a3x14));if(_0xa4a3x14[_0x6eb6[17]]){if(_0xa4a3x14[_0x6eb6[17]][_0x6eb6[24]]=== 500){logger[_0x6eb6[17]](_0x6eb6[16],_0xa4a3xf,_0xa4a3x14[_0x6eb6[17]][_0x6eb6[25]]);return _0xa4a3x12(_0xa4a3x14[_0x6eb6[17]][_0x6eb6[25]])};logger[_0x6eb6[17]](_0x6eb6[16],_0xa4a3xf,_0xa4a3x14[_0x6eb6[17]][_0x6eb6[25]]);return _0xa4a3x11(_0xa4a3x14[_0x6eb6[17]][_0x6eb6[25]])}else {logger[_0x6eb6[20]](_0x6eb6[16],_0xa4a3xf,_0x6eb6[19]);_0xa4a3x11(_0xa4a3x14[_0x6eb6[26]][_0x6eb6[25]])}})[_0x6eb6[18]](function(_0xa4a3x13){logger[_0x6eb6[17]](_0x6eb6[16],_0xa4a3xf,_0xa4a3x13);_0xa4a3x12(_0xa4a3x13)})})}
\ No newline at end of file
+var _0xa3b0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xa3b0[0];var _=require(_0xa3b0[1]);var util=require(_0xa3b0[2]);var moment=require(_0xa3b0[3]);var BPromise=require(_0xa3b0[4]);var rs=require(_0xa3b0[5]);var fs=require(_0xa3b0[6]);var db=require(_0xa3b0[8])[_0xa3b0[7]];var utils=require(_0xa3b0[9]);var logger=require(_0xa3b0[11])(_0xa3b0[10]);var config=require(_0xa3b0[12]);var jayson=require(_0xa3b0[13]);var client=jayson[_0xa3b0[15]][_0xa3b0[14]]({port:9002});function respondWithRpcPromise(_0x7dfbxe,_0x7dfbxf,_0x7dfbx10){return  new BPromise(function(_0x7dfbx11,_0x7dfbx12){return client[_0xa3b0[28]](_0x7dfbxe,_0x7dfbx10)[_0xa3b0[27]](function(_0x7dfbx14){logger[_0xa3b0[20]](_0xa3b0[16],_0x7dfbxf,_0xa3b0[19]);logger[_0xa3b0[23]](_0xa3b0[21],_0x7dfbxf,_0xa3b0[19],JSON[_0xa3b0[22]](_0x7dfbx14));if(_0x7dfbx14[_0xa3b0[17]]){if(_0x7dfbx14[_0xa3b0[17]][_0xa3b0[24]]=== 500){logger[_0xa3b0[17]](_0xa3b0[16],_0x7dfbxf,_0x7dfbx14[_0xa3b0[17]][_0xa3b0[25]]);return _0x7dfbx12(_0x7dfbx14[_0xa3b0[17]][_0xa3b0[25]])};logger[_0xa3b0[17]](_0xa3b0[16],_0x7dfbxf,_0x7dfbx14[_0xa3b0[17]][_0xa3b0[25]]);return _0x7dfbx11(_0x7dfbx14[_0xa3b0[17]][_0xa3b0[25]])}else {logger[_0xa3b0[20]](_0xa3b0[16],_0x7dfbxf,_0xa3b0[19]);_0x7dfbx11(_0x7dfbx14[_0xa3b0[26]][_0xa3b0[25]])}})[_0xa3b0[18]](function(_0x7dfbx13){logger[_0xa3b0[17]](_0xa3b0[16],_0x7dfbxf,_0x7dfbx13);_0x7dfbx12(_0x7dfbx13)})})}
\ No newline at end of file
index 27366ee..c498d2b 100644 (file)
@@ -1 +1 @@
-var _0xbe49=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xbe49[0];var multer=require(_0xbe49[1]);var util=require(_0xbe49[2]);var path=require(_0xbe49[3]);var express=require(_0xbe49[4]);var router=express.Router();var auth=require(_0xbe49[5]);var interaction=require(_0xbe49[6]);var config=require(_0xbe49[7]);var controller=require(_0xbe49[8]);router[_0xbe49[12]](_0xbe49[9],auth[_0xbe49[10]](),controller[_0xbe49[11]]);router[_0xbe49[12]](_0xbe49[13],auth[_0xbe49[10]](),controller[_0xbe49[14]]);router[_0xbe49[16]](_0xbe49[9],auth[_0xbe49[10]](),controller[_0xbe49[15]]);router[_0xbe49[18]](_0xbe49[13],auth[_0xbe49[10]](),controller[_0xbe49[17]]);router[_0xbe49[20]](_0xbe49[13],auth[_0xbe49[10]](),controller[_0xbe49[19]]);module[_0xbe49[21]]= router
\ No newline at end of file
+var _0x91ee=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x91ee[0];var multer=require(_0x91ee[1]);var util=require(_0x91ee[2]);var path=require(_0x91ee[3]);var express=require(_0x91ee[4]);var router=express.Router();var auth=require(_0x91ee[5]);var interaction=require(_0x91ee[6]);var config=require(_0x91ee[7]);var controller=require(_0x91ee[8]);router[_0x91ee[12]](_0x91ee[9],auth[_0x91ee[10]](),controller[_0x91ee[11]]);router[_0x91ee[12]](_0x91ee[13],auth[_0x91ee[10]](),controller[_0x91ee[14]]);router[_0x91ee[16]](_0x91ee[9],auth[_0x91ee[10]](),controller[_0x91ee[15]]);router[_0x91ee[18]](_0x91ee[13],auth[_0x91ee[10]](),controller[_0x91ee[17]]);router[_0x91ee[20]](_0x91ee[13],auth[_0x91ee[10]](),controller[_0x91ee[19]]);module[_0x91ee[21]]= router
\ No newline at end of file
index 5da2f17..0dcca66 100644 (file)
@@ -1 +1 @@
-var _0xb747=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x6E\x6F\x6F\x70","","\x2A\x2C\x2A\x2C\x2A\x2C\x2A"];_0xb747[0];var Sequelize=require(_0xb747[1]);module[_0xb747[2]]= {priority:{type:Sequelize[_0xb747[3]],allowNull:false},app:{type:Sequelize[_0xb747[4]],allowNull:false,defaultValue:_0xb747[5]},appdata:{type:Sequelize.STRING(4096),defaultValue:_0xb747[6]},description:{type:Sequelize[_0xb747[4]]},interval:{type:Sequelize[_0xb747[4]],defaultValue:_0xb747[7]}}
\ No newline at end of file
+var _0x69a8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x6E\x6F\x6F\x70","","\x2A\x2C\x2A\x2C\x2A\x2C\x2A"];_0x69a8[0];var Sequelize=require(_0x69a8[1]);module[_0x69a8[2]]= {priority:{type:Sequelize[_0x69a8[3]],allowNull:false},app:{type:Sequelize[_0x69a8[4]],allowNull:false,defaultValue:_0x69a8[5]},appdata:{type:Sequelize.STRING(4096),defaultValue:_0x69a8[6]},description:{type:Sequelize[_0x69a8[4]]},interval:{type:Sequelize[_0x69a8[4]],defaultValue:_0x69a8[7]}}
\ No newline at end of file
index b988396..09a64ea 100644 (file)
@@ -1 +1 @@
-var _0xc611=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xc611[0];var jsonpatch=require(_0xc611[1]);var rp=require(_0xc611[2]);var moment=require(_0xc611[3]);var BPromise=require(_0xc611[4]);var Mustache=require(_0xc611[5]);var util=require(_0xc611[6]);var path=require(_0xc611[7]);var sox=require(_0xc611[8]);var csv=require(_0xc611[9]);var ejs=require(_0xc611[10]);var fs=require(_0xc611[11]);var _=require(_0xc611[12]);var squel=require(_0xc611[13]);var crypto=require(_0xc611[14]);var jsforce=require(_0xc611[15]);var deskjs=require(_0xc611[16]);var toCsv=require(_0xc611[9]);var querystring=require(_0xc611[17]);var Papa=require(_0xc611[18]);var qs=require(_0xc611[19]);var logger=require(_0xc611[21])(_0xc611[20]);var utils=require(_0xc611[22]);var config=require(_0xc611[23]);var db=require(_0xc611[25])[_0xc611[24]];function respondWithStatusCode(_0xa4fdx1a,_0xa4fdx1b){_0xa4fdx1b= _0xa4fdx1b|| 204;return function(_0xa4fdx1c){if(_0xa4fdx1c){return _0xa4fdx1a[_0xc611[26]](_0xa4fdx1b)};return _0xa4fdx1a[_0xc611[28]](_0xa4fdx1b)[_0xc611[27]]()}}function respondWithResult(_0xa4fdx1a,_0xa4fdx1b){_0xa4fdx1b= _0xa4fdx1b|| 200;return function(_0xa4fdx1c){if(_0xa4fdx1c){return _0xa4fdx1a[_0xc611[28]](_0xa4fdx1b)[_0xc611[29]](_0xa4fdx1c)}}}function respondWithFilteredResult(_0xa4fdx1a,_0xa4fdx1f){return function(_0xa4fdx1c){if(_0xa4fdx1c){var _0xa4fdx20=_0xa4fdx1c[_0xc611[30]],_0xa4fdx21=_0xa4fdx1f[_0xc611[31]],_0xa4fdx22=_0xa4fdx1f[_0xc611[31]]+ _0xa4fdx1f[_0xc611[32]],_0xa4fdx1b;if(_0xa4fdx22>= _0xa4fdx20){_0xa4fdx22= _0xa4fdx20;_0xa4fdx1b= 200}else {_0xa4fdx1b= 206};_0xa4fdx1a[_0xc611[28]](_0xa4fdx1b);return _0xa4fdx1a[_0xc611[36]](_0xc611[33],_0xa4fdx21+ _0xc611[34]+ _0xa4fdx22+ _0xc611[35]+ _0xa4fdx20)[_0xc611[29]](_0xa4fdx1c)};return null}}function patchUpdates(_0xa4fdx24){return function(_0xa4fdx1c){try{jsonpatch[_0xc611[37]](_0xa4fdx1c,_0xa4fdx24,true)}catch(err){return BPromise[_0xc611[38]](err)};return _0xa4fdx1c[_0xc611[39]]()}}function saveUpdates(_0xa4fdx26,_0xa4fdx1b){return function(_0xa4fdx1c){if(_0xa4fdx1c){return _0xa4fdx1c[_0xc611[41]](_0xa4fdx26)[_0xc611[40]](function(_0xa4fdx27){return _0xa4fdx27})};return null}}function removeEntity(_0xa4fdx1a,_0xa4fdx1b){return function(_0xa4fdx1c){if(_0xa4fdx1c){return _0xa4fdx1c[_0xc611[42]]()[_0xc611[40]](function(){_0xa4fdx1a[_0xc611[28]](204)[_0xc611[27]]()})}}}function handleEntityNotFound(_0xa4fdx1a,_0xa4fdx1b){return function(_0xa4fdx1c){if(!_0xa4fdx1c){_0xa4fdx1a[_0xc611[26]](404)};return _0xa4fdx1c}}function handleError(_0xa4fdx1a,_0xa4fdx1b){_0xa4fdx1b= _0xa4fdx1b|| 500;return function(_0xa4fdx2b){logger[_0xc611[44]](_0xa4fdx2b[_0xc611[43]]);if(_0xa4fdx2b[_0xc611[45]]){delete _0xa4fdx2b[_0xc611[45]]};_0xa4fdx1a[_0xc611[28]](_0xa4fdx1b)[_0xc611[46]](_0xa4fdx2b)}}exports[_0xc611[47]]= function(_0xa4fdx2c,_0xa4fdx1a){var _0xa4fdx1f={},_0xa4fdx2d={},_0xa4fdx2e={count:0,rows:[]};_0xa4fdx2d[_0xc611[48]]= _[_0xc611[51]](db[_0xc611[50]][_0xc611[49]]);var _0xa4fdx2f={dateStart:_0xa4fdx2c[_0xc611[53]][_0xc611[52]],dateEnd:_0xa4fdx2c[_0xc611[53]][_0xc611[54]]};delete _0xa4fdx2c[_0xc611[53]][_0xc611[52]];delete _0xa4fdx2c[_0xc611[53]][_0xc611[54]];_0xa4fdx2d[_0xc611[53]]= _[_0xc611[51]](_0xa4fdx2c[_0xc611[53]]);_0xa4fdx2d[_0xc611[55]]= _[_0xc611[56]](_0xa4fdx2d[_0xc611[48]],_0xa4fdx2d[_0xc611[53]]);_0xa4fdx1f[_0xc611[57]]= _[_0xc611[56]](_0xa4fdx2d[_0xc611[48]],qs[_0xc611[58]](_0xa4fdx2c[_0xc611[53]][_0xc611[58]]));_0xa4fdx1f[_0xc611[57]]= (_0xa4fdx1f[_0xc611[57]][_0xc611[59]])?_0xa4fdx1f[_0xc611[57]]:_0xa4fdx2d[_0xc611[48]];if(!_0xa4fdx2c[_0xc611[53]][_0xc611[61]](_0xc611[60])){_0xa4fdx1f[_0xc611[32]]= qs[_0xc611[32]](_0xa4fdx2c[_0xc611[53]][_0xc611[32]]);_0xa4fdx1f[_0xc611[31]]= qs[_0xc611[31]](_0xa4fdx2c[_0xc611[53]][_0xc611[31]])};_0xa4fdx1f[_0xc611[62]]= qs[_0xc611[63]](_0xa4fdx2c[_0xc611[53]][_0xc611[63]]);_0xa4fdx1f[_0xc611[64]]= qs[_0xc611[55]](_[_0xc611[65]](_0xa4fdx2c[_0xc611[53]],_0xa4fdx2d[_0xc611[55]]));if(_0xa4fdx2f[_0xc611[52]]){if(_0xa4fdx2f[_0xc611[54]]){_0xa4fdx2f[_0xc611[54]]= moment(_0xa4fdx2f[_0xc611[54]])[_0xc611[67]](1,_0xc611[66])}else {_0xa4fdx2f[_0xc611[54]]= moment(_0xa4fdx2f[_0xc611[52]])[_0xc611[67]](1,_0xc611[66])};_[_0xc611[68]](_0xa4fdx1f[_0xc611[64]],{createdAt:{$gte:_0xa4fdx2f[_0xc611[52]],$lte:_0xa4fdx2f[_0xc611[54]]}})};if(_0xa4fdx2c[_0xc611[53]][_0xc611[69]]){_0xa4fdx1f[_0xc611[64]]= _[_0xc611[68]](_0xa4fdx1f[_0xc611[64]],{$or:_[_0xc611[71]](_0xa4fdx1f[_0xc611[57]],function(_0xa4fdx30){var _0xa4fdx2e={};_0xa4fdx2e[_0xa4fdx30]= {$like:_0xc611[70]+ _0xa4fdx2c[_0xc611[53]][_0xc611[69]]+ _0xc611[70]};return _0xa4fdx2e})})};_0xa4fdx1f= _[_0xc611[68]]({},_0xa4fdx1f,_0xa4fdx2c[_0xc611[72]]);var _0xa4fdx31={where:_0xa4fdx1f[_0xc611[64]]};return db[_0xc611[50]][_0xc611[30]](_0xa4fdx31)[_0xc611[40]](function(_0xa4fdx20){_0xa4fdx2e[_0xc611[30]]= _0xa4fdx20;if(_0xa4fdx2c[_0xc611[53]][_0xc611[75]]){_0xa4fdx1f[_0xc611[76]]= [{all:true}]};return db[_0xc611[50]][_0xc611[77]](_0xa4fdx1f)})[_0xc611[40]](function(_0xa4fdx32){_0xa4fdx2e[_0xc611[74]]= _0xa4fdx32;return _0xa4fdx2e})[_0xc611[40]](respondWithFilteredResult(_0xa4fdx1a,_0xa4fdx1f))[_0xc611[73]](handleError(_0xa4fdx1a,null))};exports[_0xc611[78]]= function(_0xa4fdx2c,_0xa4fdx1a){var _0xa4fdx1f={raw:true,where:{id:_0xa4fdx2c[_0xc611[80]][_0xc611[79]]}},_0xa4fdx2d={};_0xa4fdx2d[_0xc611[48]]= _[_0xc611[51]](db[_0xc611[50]][_0xc611[49]]);_0xa4fdx2d[_0xc611[53]]= _[_0xc611[51]](_0xa4fdx2c[_0xc611[53]]);_0xa4fdx2d[_0xc611[55]]= _[_0xc611[56]](_0xa4fdx2d[_0xc611[48]],_0xa4fdx2d[_0xc611[53]]);_0xa4fdx1f[_0xc611[57]]= _[_0xc611[56]](_0xa4fdx2d[_0xc611[48]],qs[_0xc611[58]](_0xa4fdx2c[_0xc611[53]][_0xc611[58]]));_0xa4fdx1f[_0xc611[57]]= (_0xa4fdx1f[_0xc611[57]][_0xc611[59]])?_0xa4fdx1f[_0xc611[57]]:_0xa4fdx2d[_0xc611[48]];if(_0xa4fdx2c[_0xc611[53]][_0xc611[75]]){_0xa4fdx1f[_0xc611[76]]= [{all:true}]};_0xa4fdx1f= _[_0xc611[68]]({},_0xa4fdx1f,_0xa4fdx2c[_0xc611[72]]);return db[_0xc611[50]][_0xc611[81]](_0xa4fdx1f)[_0xc611[40]](handleEntityNotFound(_0xa4fdx1a,null))[_0xc611[40]](respondWithResult(_0xa4fdx1a,null))[_0xc611[73]](handleError(_0xa4fdx1a,null))};exports[_0xc611[82]]= function(_0xa4fdx2c,_0xa4fdx1a){return db[_0xc611[50]][_0xc611[82]](_0xa4fdx2c[_0xc611[83]],{})[_0xc611[40]](respondWithResult(_0xa4fdx1a,201))[_0xc611[73]](handleError(_0xa4fdx1a,null))};exports[_0xc611[41]]= function(_0xa4fdx2c,_0xa4fdx1a){if(_0xa4fdx2c[_0xc611[83]][_0xc611[79]]){delete _0xa4fdx2c[_0xc611[83]][_0xc611[79]]};return db[_0xc611[50]][_0xc611[81]]({where:{id:_0xa4fdx2c[_0xc611[80]][_0xc611[79]]}})[_0xc611[40]](handleEntityNotFound(_0xa4fdx1a,null))[_0xc611[40]](saveUpdates(_0xa4fdx2c[_0xc611[83]],null))[_0xc611[40]](respondWithResult(_0xa4fdx1a,null))[_0xc611[73]](handleError(_0xa4fdx1a,null))};exports[_0xc611[42]]= function(_0xa4fdx2c,_0xa4fdx1a){return db[_0xc611[50]][_0xc611[81]]({where:{id:_0xa4fdx2c[_0xc611[80]][_0xc611[79]]}})[_0xc611[40]](handleEntityNotFound(_0xa4fdx1a,null))[_0xc611[40]](removeEntity(_0xa4fdx1a,null))[_0xc611[73]](handleError(_0xa4fdx1a,null))}
\ No newline at end of file
+var _0x7f07=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x7f07[0];var jsonpatch=require(_0x7f07[1]);var rp=require(_0x7f07[2]);var moment=require(_0x7f07[3]);var BPromise=require(_0x7f07[4]);var Mustache=require(_0x7f07[5]);var util=require(_0x7f07[6]);var path=require(_0x7f07[7]);var sox=require(_0x7f07[8]);var csv=require(_0x7f07[9]);var ejs=require(_0x7f07[10]);var fs=require(_0x7f07[11]);var _=require(_0x7f07[12]);var squel=require(_0x7f07[13]);var crypto=require(_0x7f07[14]);var jsforce=require(_0x7f07[15]);var deskjs=require(_0x7f07[16]);var toCsv=require(_0x7f07[9]);var querystring=require(_0x7f07[17]);var Papa=require(_0x7f07[18]);var qs=require(_0x7f07[19]);var logger=require(_0x7f07[21])(_0x7f07[20]);var utils=require(_0x7f07[22]);var config=require(_0x7f07[23]);var db=require(_0x7f07[25])[_0x7f07[24]];function respondWithStatusCode(_0x5c20x1a,_0x5c20x1b){_0x5c20x1b= _0x5c20x1b|| 204;return function(_0x5c20x1c){if(_0x5c20x1c){return _0x5c20x1a[_0x7f07[26]](_0x5c20x1b)};return _0x5c20x1a[_0x7f07[28]](_0x5c20x1b)[_0x7f07[27]]()}}function respondWithResult(_0x5c20x1a,_0x5c20x1b){_0x5c20x1b= _0x5c20x1b|| 200;return function(_0x5c20x1c){if(_0x5c20x1c){return _0x5c20x1a[_0x7f07[28]](_0x5c20x1b)[_0x7f07[29]](_0x5c20x1c)}}}function respondWithFilteredResult(_0x5c20x1a,_0x5c20x1f){return function(_0x5c20x1c){if(_0x5c20x1c){var _0x5c20x20=_0x5c20x1c[_0x7f07[30]],_0x5c20x21=_0x5c20x1f[_0x7f07[31]],_0x5c20x22=_0x5c20x1f[_0x7f07[31]]+ _0x5c20x1f[_0x7f07[32]],_0x5c20x1b;if(_0x5c20x22>= _0x5c20x20){_0x5c20x22= _0x5c20x20;_0x5c20x1b= 200}else {_0x5c20x1b= 206};_0x5c20x1a[_0x7f07[28]](_0x5c20x1b);return _0x5c20x1a[_0x7f07[36]](_0x7f07[33],_0x5c20x21+ _0x7f07[34]+ _0x5c20x22+ _0x7f07[35]+ _0x5c20x20)[_0x7f07[29]](_0x5c20x1c)};return null}}function patchUpdates(_0x5c20x24){return function(_0x5c20x1c){try{jsonpatch[_0x7f07[37]](_0x5c20x1c,_0x5c20x24,true)}catch(err){return BPromise[_0x7f07[38]](err)};return _0x5c20x1c[_0x7f07[39]]()}}function saveUpdates(_0x5c20x26,_0x5c20x1b){return function(_0x5c20x1c){if(_0x5c20x1c){return _0x5c20x1c[_0x7f07[41]](_0x5c20x26)[_0x7f07[40]](function(_0x5c20x27){return _0x5c20x27})};return null}}function removeEntity(_0x5c20x1a,_0x5c20x1b){return function(_0x5c20x1c){if(_0x5c20x1c){return _0x5c20x1c[_0x7f07[42]]()[_0x7f07[40]](function(){_0x5c20x1a[_0x7f07[28]](204)[_0x7f07[27]]()})}}}function handleEntityNotFound(_0x5c20x1a,_0x5c20x1b){return function(_0x5c20x1c){if(!_0x5c20x1c){_0x5c20x1a[_0x7f07[26]](404)};return _0x5c20x1c}}function handleError(_0x5c20x1a,_0x5c20x1b){_0x5c20x1b= _0x5c20x1b|| 500;return function(_0x5c20x2b){logger[_0x7f07[44]](_0x5c20x2b[_0x7f07[43]]);if(_0x5c20x2b[_0x7f07[45]]){delete _0x5c20x2b[_0x7f07[45]]};_0x5c20x1a[_0x7f07[28]](_0x5c20x1b)[_0x7f07[46]](_0x5c20x2b)}}exports[_0x7f07[47]]= function(_0x5c20x2c,_0x5c20x1a){var _0x5c20x1f={},_0x5c20x2d={},_0x5c20x2e={count:0,rows:[]};_0x5c20x2d[_0x7f07[48]]= _[_0x7f07[51]](db[_0x7f07[50]][_0x7f07[49]]);var _0x5c20x2f={dateStart:_0x5c20x2c[_0x7f07[53]][_0x7f07[52]],dateEnd:_0x5c20x2c[_0x7f07[53]][_0x7f07[54]]};delete _0x5c20x2c[_0x7f07[53]][_0x7f07[52]];delete _0x5c20x2c[_0x7f07[53]][_0x7f07[54]];_0x5c20x2d[_0x7f07[53]]= _[_0x7f07[51]](_0x5c20x2c[_0x7f07[53]]);_0x5c20x2d[_0x7f07[55]]= _[_0x7f07[56]](_0x5c20x2d[_0x7f07[48]],_0x5c20x2d[_0x7f07[53]]);_0x5c20x1f[_0x7f07[57]]= _[_0x7f07[56]](_0x5c20x2d[_0x7f07[48]],qs[_0x7f07[58]](_0x5c20x2c[_0x7f07[53]][_0x7f07[58]]));_0x5c20x1f[_0x7f07[57]]= (_0x5c20x1f[_0x7f07[57]][_0x7f07[59]])?_0x5c20x1f[_0x7f07[57]]:_0x5c20x2d[_0x7f07[48]];if(!_0x5c20x2c[_0x7f07[53]][_0x7f07[61]](_0x7f07[60])){_0x5c20x1f[_0x7f07[32]]= qs[_0x7f07[32]](_0x5c20x2c[_0x7f07[53]][_0x7f07[32]]);_0x5c20x1f[_0x7f07[31]]= qs[_0x7f07[31]](_0x5c20x2c[_0x7f07[53]][_0x7f07[31]])};_0x5c20x1f[_0x7f07[62]]= qs[_0x7f07[63]](_0x5c20x2c[_0x7f07[53]][_0x7f07[63]]);_0x5c20x1f[_0x7f07[64]]= qs[_0x7f07[55]](_[_0x7f07[65]](_0x5c20x2c[_0x7f07[53]],_0x5c20x2d[_0x7f07[55]]));if(_0x5c20x2f[_0x7f07[52]]){if(_0x5c20x2f[_0x7f07[54]]){_0x5c20x2f[_0x7f07[54]]= moment(_0x5c20x2f[_0x7f07[54]])[_0x7f07[67]](1,_0x7f07[66])}else {_0x5c20x2f[_0x7f07[54]]= moment(_0x5c20x2f[_0x7f07[52]])[_0x7f07[67]](1,_0x7f07[66])};_[_0x7f07[68]](_0x5c20x1f[_0x7f07[64]],{createdAt:{$gte:_0x5c20x2f[_0x7f07[52]],$lte:_0x5c20x2f[_0x7f07[54]]}})};if(_0x5c20x2c[_0x7f07[53]][_0x7f07[69]]){_0x5c20x1f[_0x7f07[64]]= _[_0x7f07[68]](_0x5c20x1f[_0x7f07[64]],{$or:_[_0x7f07[71]](_0x5c20x1f[_0x7f07[57]],function(_0x5c20x30){var _0x5c20x2e={};_0x5c20x2e[_0x5c20x30]= {$like:_0x7f07[70]+ _0x5c20x2c[_0x7f07[53]][_0x7f07[69]]+ _0x7f07[70]};return _0x5c20x2e})})};_0x5c20x1f= _[_0x7f07[68]]({},_0x5c20x1f,_0x5c20x2c[_0x7f07[72]]);var _0x5c20x31={where:_0x5c20x1f[_0x7f07[64]]};return db[_0x7f07[50]][_0x7f07[30]](_0x5c20x31)[_0x7f07[40]](function(_0x5c20x20){_0x5c20x2e[_0x7f07[30]]= _0x5c20x20;if(_0x5c20x2c[_0x7f07[53]][_0x7f07[75]]){_0x5c20x1f[_0x7f07[76]]= [{all:true}]};return db[_0x7f07[50]][_0x7f07[77]](_0x5c20x1f)})[_0x7f07[40]](function(_0x5c20x32){_0x5c20x2e[_0x7f07[74]]= _0x5c20x32;return _0x5c20x2e})[_0x7f07[40]](respondWithFilteredResult(_0x5c20x1a,_0x5c20x1f))[_0x7f07[73]](handleError(_0x5c20x1a,null))};exports[_0x7f07[78]]= function(_0x5c20x2c,_0x5c20x1a){var _0x5c20x1f={raw:true,where:{id:_0x5c20x2c[_0x7f07[80]][_0x7f07[79]]}},_0x5c20x2d={};_0x5c20x2d[_0x7f07[48]]= _[_0x7f07[51]](db[_0x7f07[50]][_0x7f07[49]]);_0x5c20x2d[_0x7f07[53]]= _[_0x7f07[51]](_0x5c20x2c[_0x7f07[53]]);_0x5c20x2d[_0x7f07[55]]= _[_0x7f07[56]](_0x5c20x2d[_0x7f07[48]],_0x5c20x2d[_0x7f07[53]]);_0x5c20x1f[_0x7f07[57]]= _[_0x7f07[56]](_0x5c20x2d[_0x7f07[48]],qs[_0x7f07[58]](_0x5c20x2c[_0x7f07[53]][_0x7f07[58]]));_0x5c20x1f[_0x7f07[57]]= (_0x5c20x1f[_0x7f07[57]][_0x7f07[59]])?_0x5c20x1f[_0x7f07[57]]:_0x5c20x2d[_0x7f07[48]];if(_0x5c20x2c[_0x7f07[53]][_0x7f07[75]]){_0x5c20x1f[_0x7f07[76]]= [{all:true}]};_0x5c20x1f= _[_0x7f07[68]]({},_0x5c20x1f,_0x5c20x2c[_0x7f07[72]]);return db[_0x7f07[50]][_0x7f07[81]](_0x5c20x1f)[_0x7f07[40]](handleEntityNotFound(_0x5c20x1a,null))[_0x7f07[40]](respondWithResult(_0x5c20x1a,null))[_0x7f07[73]](handleError(_0x5c20x1a,null))};exports[_0x7f07[82]]= function(_0x5c20x2c,_0x5c20x1a){return db[_0x7f07[50]][_0x7f07[82]](_0x5c20x2c[_0x7f07[83]],{})[_0x7f07[40]](respondWithResult(_0x5c20x1a,201))[_0x7f07[73]](handleError(_0x5c20x1a,null))};exports[_0x7f07[41]]= function(_0x5c20x2c,_0x5c20x1a){if(_0x5c20x2c[_0x7f07[83]][_0x7f07[79]]){delete _0x5c20x2c[_0x7f07[83]][_0x7f07[79]]};return db[_0x7f07[50]][_0x7f07[81]]({where:{id:_0x5c20x2c[_0x7f07[80]][_0x7f07[79]]}})[_0x7f07[40]](handleEntityNotFound(_0x5c20x1a,null))[_0x7f07[40]](saveUpdates(_0x5c20x2c[_0x7f07[83]],null))[_0x7f07[40]](respondWithResult(_0x5c20x1a,null))[_0x7f07[73]](handleError(_0x5c20x1a,null))};exports[_0x7f07[42]]= function(_0x5c20x2c,_0x5c20x1a){return db[_0x7f07[50]][_0x7f07[81]]({where:{id:_0x5c20x2c[_0x7f07[80]][_0x7f07[79]]}})[_0x7f07[40]](handleEntityNotFound(_0x5c20x1a,null))[_0x7f07[40]](removeEntity(_0x5c20x1a,null))[_0x7f07[73]](handleError(_0x5c20x1a,null))}
\ No newline at end of file
index dc3f32a..ba42e85 100644 (file)
@@ -1 +1 @@
-var _0xf911=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xf911[0];var _=require(_0xf911[1]);var util=require(_0xf911[2]);var logger=require(_0xf911[4])(_0xf911[3]);var moment=require(_0xf911[5]);var BPromise=require(_0xf911[6]);var rp=require(_0xf911[7]);var attributes=require(_0xf911[8]);module[_0xf911[9]]= function(_0x8ae7x8,_0x8ae7x9){return _0x8ae7x8[_0xf911[12]](_0xf911[10],attributes,{tableName:_0xf911[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x42e8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x42e8[0];var _=require(_0x42e8[1]);var util=require(_0x42e8[2]);var logger=require(_0x42e8[4])(_0x42e8[3]);var moment=require(_0x42e8[5]);var BPromise=require(_0x42e8[6]);var rp=require(_0x42e8[7]);var attributes=require(_0x42e8[8]);module[_0x42e8[9]]= function(_0xdc04x8,_0xdc04x9){return _0xdc04x8[_0x42e8[12]](_0x42e8[10],attributes,{tableName:_0x42e8[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index b4ee45d..dc056f3 100644 (file)
@@ -1 +1 @@
-var _0xc13c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E"];_0xc13c[0];var _=require(_0xc13c[1]);var util=require(_0xc13c[2]);var moment=require(_0xc13c[3]);var BPromise=require(_0xc13c[4]);var rs=require(_0xc13c[5]);var fs=require(_0xc13c[6]);var db=require(_0xc13c[8])[_0xc13c[7]];var utils=require(_0xc13c[9]);var logger=require(_0xc13c[11])(_0xc13c[10]);var config=require(_0xc13c[12]);var jayson=require(_0xc13c[13]);var client=jayson[_0xc13c[15]][_0xc13c[14]]({port:9002});function respondWithRpcPromise(_0xaed3xe,_0xaed3xf,_0xaed3x10){return  new BPromise(function(_0xaed3x11,_0xaed3x12){return client[_0xc13c[28]](_0xaed3xe,_0xaed3x10)[_0xc13c[27]](function(_0xaed3x14){logger[_0xc13c[20]](_0xc13c[16],_0xaed3xf,_0xc13c[19]);logger[_0xc13c[23]](_0xc13c[21],_0xaed3xf,_0xc13c[19],JSON[_0xc13c[22]](_0xaed3x14));if(_0xaed3x14[_0xc13c[17]]){if(_0xaed3x14[_0xc13c[17]][_0xc13c[24]]=== 500){logger[_0xc13c[17]](_0xc13c[16],_0xaed3xf,_0xaed3x14[_0xc13c[17]][_0xc13c[25]]);return _0xaed3x12(_0xaed3x14[_0xc13c[17]][_0xc13c[25]])};logger[_0xc13c[17]](_0xc13c[16],_0xaed3xf,_0xaed3x14[_0xc13c[17]][_0xc13c[25]]);return _0xaed3x11(_0xaed3x14[_0xc13c[17]][_0xc13c[25]])}else {logger[_0xc13c[20]](_0xc13c[16],_0xaed3xf,_0xc13c[19]);_0xaed3x11(_0xaed3x14[_0xc13c[26]][_0xc13c[25]])}})[_0xc13c[18]](function(_0xaed3x13){logger[_0xc13c[17]](_0xc13c[16],_0xaed3xf,_0xaed3x13);_0xaed3x12(_0xaed3x13)})})}exports[_0xc13c[29]]= function(_0xaed3x10){var _0xaed3x15=this;return  new Promise(function(_0xaed3x11,_0xaed3x12){return db[_0xc13c[37]][_0xc13c[36]](_0xaed3x10[_0xc13c[30]],{raw:_0xaed3x10[_0xc13c[31]]?(_0xaed3x10[_0xc13c[31]][_0xc13c[32]]=== undefined)?true:false:true,individualHooks:true,where:_0xaed3x10[_0xc13c[31]]?_0xaed3x10[_0xc13c[31]][_0xc13c[33]]|| null:null,attributes:_0xaed3x10[_0xc13c[31]]?_0xaed3x10[_0xc13c[31]][_0xc13c[34]]|| null:null,limit:_0xaed3x10[_0xc13c[31]]?_0xaed3x10[_0xc13c[31]][_0xc13c[35]]|| null:null})[_0xc13c[27]](function(_0xaed3x14){logger[_0xc13c[20]](_0xc13c[29],_0xaed3x10);logger[_0xc13c[23]](_0xc13c[29],_0xaed3x10,JSON[_0xc13c[22]](_0xaed3x14));_0xaed3x11(_0xaed3x14)})[_0xc13c[18]](function(_0xaed3x13){logger[_0xc13c[17]](_0xc13c[29],_0xaed3x13[_0xc13c[25]],_0xaed3x10);_0xaed3x12(_0xaed3x15[_0xc13c[17]](500,_0xaed3x13[_0xc13c[25]]))})})}
\ No newline at end of file
+var _0x56e8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E"];_0x56e8[0];var _=require(_0x56e8[1]);var util=require(_0x56e8[2]);var moment=require(_0x56e8[3]);var BPromise=require(_0x56e8[4]);var rs=require(_0x56e8[5]);var fs=require(_0x56e8[6]);var db=require(_0x56e8[8])[_0x56e8[7]];var utils=require(_0x56e8[9]);var logger=require(_0x56e8[11])(_0x56e8[10]);var config=require(_0x56e8[12]);var jayson=require(_0x56e8[13]);var client=jayson[_0x56e8[15]][_0x56e8[14]]({port:9002});function respondWithRpcPromise(_0x1c8cxe,_0x1c8cxf,_0x1c8cx10){return  new BPromise(function(_0x1c8cx11,_0x1c8cx12){return client[_0x56e8[28]](_0x1c8cxe,_0x1c8cx10)[_0x56e8[27]](function(_0x1c8cx14){logger[_0x56e8[20]](_0x56e8[16],_0x1c8cxf,_0x56e8[19]);logger[_0x56e8[23]](_0x56e8[21],_0x1c8cxf,_0x56e8[19],JSON[_0x56e8[22]](_0x1c8cx14));if(_0x1c8cx14[_0x56e8[17]]){if(_0x1c8cx14[_0x56e8[17]][_0x56e8[24]]=== 500){logger[_0x56e8[17]](_0x56e8[16],_0x1c8cxf,_0x1c8cx14[_0x56e8[17]][_0x56e8[25]]);return _0x1c8cx12(_0x1c8cx14[_0x56e8[17]][_0x56e8[25]])};logger[_0x56e8[17]](_0x56e8[16],_0x1c8cxf,_0x1c8cx14[_0x56e8[17]][_0x56e8[25]]);return _0x1c8cx11(_0x1c8cx14[_0x56e8[17]][_0x56e8[25]])}else {logger[_0x56e8[20]](_0x56e8[16],_0x1c8cxf,_0x56e8[19]);_0x1c8cx11(_0x1c8cx14[_0x56e8[26]][_0x56e8[25]])}})[_0x56e8[18]](function(_0x1c8cx13){logger[_0x56e8[17]](_0x56e8[16],_0x1c8cxf,_0x1c8cx13);_0x1c8cx12(_0x1c8cx13)})})}exports[_0x56e8[29]]= function(_0x1c8cx10){var _0x1c8cx15=this;return  new Promise(function(_0x1c8cx11,_0x1c8cx12){return db[_0x56e8[37]][_0x56e8[36]](_0x1c8cx10[_0x56e8[30]],{raw:_0x1c8cx10[_0x56e8[31]]?(_0x1c8cx10[_0x56e8[31]][_0x56e8[32]]=== undefined)?true:false:true,individualHooks:true,where:_0x1c8cx10[_0x56e8[31]]?_0x1c8cx10[_0x56e8[31]][_0x56e8[33]]|| null:null,attributes:_0x1c8cx10[_0x56e8[31]]?_0x1c8cx10[_0x56e8[31]][_0x56e8[34]]|| null:null,limit:_0x1c8cx10[_0x56e8[31]]?_0x1c8cx10[_0x56e8[31]][_0x56e8[35]]|| null:null})[_0x56e8[27]](function(_0x1c8cx14){logger[_0x56e8[20]](_0x56e8[29],_0x1c8cx10);logger[_0x56e8[23]](_0x56e8[29],_0x1c8cx10,JSON[_0x56e8[22]](_0x1c8cx14));_0x1c8cx11(_0x1c8cx14)})[_0x56e8[18]](function(_0x1c8cx13){logger[_0x56e8[17]](_0x56e8[29],_0x1c8cx13[_0x56e8[25]],_0x1c8cx10);_0x1c8cx12(_0x1c8cx15[_0x56e8[17]](500,_0x1c8cx13[_0x56e8[25]]))})})}
\ No newline at end of file
index 9353c03..5fb42cd 100644 (file)
@@ -1 +1 @@
-var _0x43e6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x73\x68\x6F\x77","\x67\x65\x74","\x2F","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x43e6[0];var multer=require(_0x43e6[1]);var util=require(_0x43e6[2]);var path=require(_0x43e6[3]);var express=require(_0x43e6[4]);var router=express.Router();var auth=require(_0x43e6[5]);var interaction=require(_0x43e6[6]);var config=require(_0x43e6[7]);var controller=require(_0x43e6[8]);router[_0x43e6[12]](_0x43e6[9],auth[_0x43e6[10]](),controller[_0x43e6[11]]);router[_0x43e6[15]](_0x43e6[13],auth[_0x43e6[10]](),controller[_0x43e6[14]]);router[_0x43e6[17]](_0x43e6[9],auth[_0x43e6[10]](),controller[_0x43e6[16]]);router[_0x43e6[19]](_0x43e6[9],auth[_0x43e6[10]](),controller[_0x43e6[18]]);module[_0x43e6[20]]= router
\ No newline at end of file
+var _0x18fe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x73\x68\x6F\x77","\x67\x65\x74","\x2F","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x18fe[0];var multer=require(_0x18fe[1]);var util=require(_0x18fe[2]);var path=require(_0x18fe[3]);var express=require(_0x18fe[4]);var router=express.Router();var auth=require(_0x18fe[5]);var interaction=require(_0x18fe[6]);var config=require(_0x18fe[7]);var controller=require(_0x18fe[8]);router[_0x18fe[12]](_0x18fe[9],auth[_0x18fe[10]](),controller[_0x18fe[11]]);router[_0x18fe[15]](_0x18fe[13],auth[_0x18fe[10]](),controller[_0x18fe[14]]);router[_0x18fe[17]](_0x18fe[9],auth[_0x18fe[10]](),controller[_0x18fe[16]]);router[_0x18fe[19]](_0x18fe[9],auth[_0x18fe[10]](),controller[_0x18fe[18]]);module[_0x18fe[20]]= router
\ No newline at end of file
index 4247c34..0689586 100644 (file)
@@ -1 +1 @@
-var _0xd312=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65\x41\x6E\x64\x41\x63\x63\x6F\x75\x6E\x74"];_0xd312[0];var Sequelize=require(_0xd312[1]);module[_0xd312[2]]= {name:{type:Sequelize[_0xd312[3]],unique:_0xd312[4],allowNull:false}}
\ No newline at end of file
+var _0xa4a6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65\x41\x6E\x64\x41\x63\x63\x6F\x75\x6E\x74"];_0xa4a6[0];var Sequelize=require(_0xa4a6[1]);module[_0xa4a6[2]]= {name:{type:Sequelize[_0xa4a6[3]],unique:_0xa4a6[4],allowNull:false}}
\ No newline at end of file
index f052d6c..f15cb79 100644 (file)
@@ -1 +1 @@
-var _0x304f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x304f[0];var jsonpatch=require(_0x304f[1]);var rp=require(_0x304f[2]);var moment=require(_0x304f[3]);var BPromise=require(_0x304f[4]);var Mustache=require(_0x304f[5]);var util=require(_0x304f[6]);var path=require(_0x304f[7]);var sox=require(_0x304f[8]);var csv=require(_0x304f[9]);var ejs=require(_0x304f[10]);var fs=require(_0x304f[11]);var _=require(_0x304f[12]);var squel=require(_0x304f[13]);var crypto=require(_0x304f[14]);var jsforce=require(_0x304f[15]);var deskjs=require(_0x304f[16]);var toCsv=require(_0x304f[9]);var querystring=require(_0x304f[17]);var Papa=require(_0x304f[18]);var qs=require(_0x304f[19]);var logger=require(_0x304f[21])(_0x304f[20]);var utils=require(_0x304f[22]);var config=require(_0x304f[23]);var db=require(_0x304f[25])[_0x304f[24]];function respondWithStatusCode(_0xbbbex1a,_0xbbbex1b){_0xbbbex1b= _0xbbbex1b|| 204;return function(_0xbbbex1c){if(_0xbbbex1c){return _0xbbbex1a[_0x304f[26]](_0xbbbex1b)};return _0xbbbex1a[_0x304f[28]](_0xbbbex1b)[_0x304f[27]]()}}function respondWithResult(_0xbbbex1a,_0xbbbex1b){_0xbbbex1b= _0xbbbex1b|| 200;return function(_0xbbbex1c){if(_0xbbbex1c){return _0xbbbex1a[_0x304f[28]](_0xbbbex1b)[_0x304f[29]](_0xbbbex1c)}}}function respondWithFilteredResult(_0xbbbex1a,_0xbbbex1f){return function(_0xbbbex1c){if(_0xbbbex1c){var _0xbbbex20=_0xbbbex1c[_0x304f[30]],_0xbbbex21=_0xbbbex1f[_0x304f[31]],_0xbbbex22=_0xbbbex1f[_0x304f[31]]+ _0xbbbex1f[_0x304f[32]],_0xbbbex1b;if(_0xbbbex22>= _0xbbbex20){_0xbbbex22= _0xbbbex20;_0xbbbex1b= 200}else {_0xbbbex1b= 206};_0xbbbex1a[_0x304f[28]](_0xbbbex1b);return _0xbbbex1a[_0x304f[36]](_0x304f[33],_0xbbbex21+ _0x304f[34]+ _0xbbbex22+ _0x304f[35]+ _0xbbbex20)[_0x304f[29]](_0xbbbex1c)};return null}}function patchUpdates(_0xbbbex24){return function(_0xbbbex1c){try{jsonpatch[_0x304f[37]](_0xbbbex1c,_0xbbbex24,true)}catch(err){return BPromise[_0x304f[38]](err)};return _0xbbbex1c[_0x304f[39]]()}}function saveUpdates(_0xbbbex26,_0xbbbex1b){return function(_0xbbbex1c){if(_0xbbbex1c){return _0xbbbex1c[_0x304f[41]](_0xbbbex26)[_0x304f[40]](function(_0xbbbex27){return _0xbbbex27})};return null}}function removeEntity(_0xbbbex1a,_0xbbbex1b){return function(_0xbbbex1c){if(_0xbbbex1c){return _0xbbbex1c[_0x304f[42]]()[_0x304f[40]](function(){_0xbbbex1a[_0x304f[28]](204)[_0x304f[27]]()})}}}function handleEntityNotFound(_0xbbbex1a,_0xbbbex1b){return function(_0xbbbex1c){if(!_0xbbbex1c){_0xbbbex1a[_0x304f[26]](404)};return _0xbbbex1c}}function handleError(_0xbbbex1a,_0xbbbex1b){_0xbbbex1b= _0xbbbex1b|| 500;return function(_0xbbbex2b){logger[_0x304f[44]](_0xbbbex2b[_0x304f[43]]);if(_0xbbbex2b[_0x304f[45]]){delete _0xbbbex2b[_0x304f[45]]};_0xbbbex1a[_0x304f[28]](_0xbbbex1b)[_0x304f[46]](_0xbbbex2b)}}exports[_0x304f[47]]= function(_0xbbbex2c,_0xbbbex1a){var _0xbbbex1f={raw:true,where:{id:_0xbbbex2c[_0x304f[49]][_0x304f[48]]}},_0xbbbex2d={};_0xbbbex2d[_0x304f[50]]= _[_0x304f[53]](db[_0x304f[52]][_0x304f[51]]);_0xbbbex2d[_0x304f[54]]= _[_0x304f[53]](_0xbbbex2c[_0x304f[54]]);_0xbbbex2d[_0x304f[55]]= _[_0x304f[56]](_0xbbbex2d[_0x304f[50]],_0xbbbex2d[_0x304f[54]]);_0xbbbex1f[_0x304f[57]]= _[_0x304f[56]](_0xbbbex2d[_0x304f[50]],qs[_0x304f[58]](_0xbbbex2c[_0x304f[54]][_0x304f[58]]));_0xbbbex1f[_0x304f[57]]= (_0xbbbex1f[_0x304f[57]][_0x304f[59]])?_0xbbbex1f[_0x304f[57]]:_0xbbbex2d[_0x304f[50]];if(_0xbbbex2c[_0x304f[54]][_0x304f[60]]){_0xbbbex1f[_0x304f[61]]= [{all:true}]};_0xbbbex1f= _[_0x304f[63]]({},_0xbbbex1f,_0xbbbex2c[_0x304f[62]]);return db[_0x304f[52]][_0x304f[65]](_0xbbbex1f)[_0x304f[40]](handleEntityNotFound(_0xbbbex1a,null))[_0x304f[40]](respondWithResult(_0xbbbex1a,null))[_0x304f[64]](handleError(_0xbbbex1a,null))};exports[_0x304f[66]]= function(_0xbbbex2c,_0xbbbex1a){return db[_0x304f[52]][_0x304f[66]](_0xbbbex2c[_0x304f[67]],{})[_0x304f[40]](respondWithResult(_0xbbbex1a,201))[_0x304f[64]](handleError(_0xbbbex1a,null))};exports[_0x304f[41]]= function(_0xbbbex2c,_0xbbbex1a){if(_0xbbbex2c[_0x304f[67]][_0x304f[48]]){delete _0xbbbex2c[_0x304f[67]][_0x304f[48]]};return db[_0x304f[52]][_0x304f[65]]({where:{id:_0xbbbex2c[_0x304f[49]][_0x304f[48]]}})[_0x304f[40]](handleEntityNotFound(_0xbbbex1a,null))[_0x304f[40]](saveUpdates(_0xbbbex2c[_0x304f[67]],null))[_0x304f[40]](respondWithResult(_0xbbbex1a,null))[_0x304f[64]](handleError(_0xbbbex1a,null))};exports[_0x304f[42]]= function(_0xbbbex2c,_0xbbbex1a){return db[_0x304f[52]][_0x304f[65]]({where:{id:_0xbbbex2c[_0x304f[49]][_0x304f[48]]}})[_0x304f[40]](handleEntityNotFound(_0xbbbex1a,null))[_0x304f[40]](removeEntity(_0xbbbex1a,null))[_0x304f[64]](handleError(_0xbbbex1a,null))}
\ No newline at end of file
+var _0xc2b8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xc2b8[0];var jsonpatch=require(_0xc2b8[1]);var rp=require(_0xc2b8[2]);var moment=require(_0xc2b8[3]);var BPromise=require(_0xc2b8[4]);var Mustache=require(_0xc2b8[5]);var util=require(_0xc2b8[6]);var path=require(_0xc2b8[7]);var sox=require(_0xc2b8[8]);var csv=require(_0xc2b8[9]);var ejs=require(_0xc2b8[10]);var fs=require(_0xc2b8[11]);var _=require(_0xc2b8[12]);var squel=require(_0xc2b8[13]);var crypto=require(_0xc2b8[14]);var jsforce=require(_0xc2b8[15]);var deskjs=require(_0xc2b8[16]);var toCsv=require(_0xc2b8[9]);var querystring=require(_0xc2b8[17]);var Papa=require(_0xc2b8[18]);var qs=require(_0xc2b8[19]);var logger=require(_0xc2b8[21])(_0xc2b8[20]);var utils=require(_0xc2b8[22]);var config=require(_0xc2b8[23]);var db=require(_0xc2b8[25])[_0xc2b8[24]];function respondWithStatusCode(_0x1a23x1a,_0x1a23x1b){_0x1a23x1b= _0x1a23x1b|| 204;return function(_0x1a23x1c){if(_0x1a23x1c){return _0x1a23x1a[_0xc2b8[26]](_0x1a23x1b)};return _0x1a23x1a[_0xc2b8[28]](_0x1a23x1b)[_0xc2b8[27]]()}}function respondWithResult(_0x1a23x1a,_0x1a23x1b){_0x1a23x1b= _0x1a23x1b|| 200;return function(_0x1a23x1c){if(_0x1a23x1c){return _0x1a23x1a[_0xc2b8[28]](_0x1a23x1b)[_0xc2b8[29]](_0x1a23x1c)}}}function respondWithFilteredResult(_0x1a23x1a,_0x1a23x1f){return function(_0x1a23x1c){if(_0x1a23x1c){var _0x1a23x20=_0x1a23x1c[_0xc2b8[30]],_0x1a23x21=_0x1a23x1f[_0xc2b8[31]],_0x1a23x22=_0x1a23x1f[_0xc2b8[31]]+ _0x1a23x1f[_0xc2b8[32]],_0x1a23x1b;if(_0x1a23x22>= _0x1a23x20){_0x1a23x22= _0x1a23x20;_0x1a23x1b= 200}else {_0x1a23x1b= 206};_0x1a23x1a[_0xc2b8[28]](_0x1a23x1b);return _0x1a23x1a[_0xc2b8[36]](_0xc2b8[33],_0x1a23x21+ _0xc2b8[34]+ _0x1a23x22+ _0xc2b8[35]+ _0x1a23x20)[_0xc2b8[29]](_0x1a23x1c)};return null}}function patchUpdates(_0x1a23x24){return function(_0x1a23x1c){try{jsonpatch[_0xc2b8[37]](_0x1a23x1c,_0x1a23x24,true)}catch(err){return BPromise[_0xc2b8[38]](err)};return _0x1a23x1c[_0xc2b8[39]]()}}function saveUpdates(_0x1a23x26,_0x1a23x1b){return function(_0x1a23x1c){if(_0x1a23x1c){return _0x1a23x1c[_0xc2b8[41]](_0x1a23x26)[_0xc2b8[40]](function(_0x1a23x27){return _0x1a23x27})};return null}}function removeEntity(_0x1a23x1a,_0x1a23x1b){return function(_0x1a23x1c){if(_0x1a23x1c){return _0x1a23x1c[_0xc2b8[42]]()[_0xc2b8[40]](function(){_0x1a23x1a[_0xc2b8[28]](204)[_0xc2b8[27]]()})}}}function handleEntityNotFound(_0x1a23x1a,_0x1a23x1b){return function(_0x1a23x1c){if(!_0x1a23x1c){_0x1a23x1a[_0xc2b8[26]](404)};return _0x1a23x1c}}function handleError(_0x1a23x1a,_0x1a23x1b){_0x1a23x1b= _0x1a23x1b|| 500;return function(_0x1a23x2b){logger[_0xc2b8[44]](_0x1a23x2b[_0xc2b8[43]]);if(_0x1a23x2b[_0xc2b8[45]]){delete _0x1a23x2b[_0xc2b8[45]]};_0x1a23x1a[_0xc2b8[28]](_0x1a23x1b)[_0xc2b8[46]](_0x1a23x2b)}}exports[_0xc2b8[47]]= function(_0x1a23x2c,_0x1a23x1a){var _0x1a23x1f={raw:true,where:{id:_0x1a23x2c[_0xc2b8[49]][_0xc2b8[48]]}},_0x1a23x2d={};_0x1a23x2d[_0xc2b8[50]]= _[_0xc2b8[53]](db[_0xc2b8[52]][_0xc2b8[51]]);_0x1a23x2d[_0xc2b8[54]]= _[_0xc2b8[53]](_0x1a23x2c[_0xc2b8[54]]);_0x1a23x2d[_0xc2b8[55]]= _[_0xc2b8[56]](_0x1a23x2d[_0xc2b8[50]],_0x1a23x2d[_0xc2b8[54]]);_0x1a23x1f[_0xc2b8[57]]= _[_0xc2b8[56]](_0x1a23x2d[_0xc2b8[50]],qs[_0xc2b8[58]](_0x1a23x2c[_0xc2b8[54]][_0xc2b8[58]]));_0x1a23x1f[_0xc2b8[57]]= (_0x1a23x1f[_0xc2b8[57]][_0xc2b8[59]])?_0x1a23x1f[_0xc2b8[57]]:_0x1a23x2d[_0xc2b8[50]];if(_0x1a23x2c[_0xc2b8[54]][_0xc2b8[60]]){_0x1a23x1f[_0xc2b8[61]]= [{all:true}]};_0x1a23x1f= _[_0xc2b8[63]]({},_0x1a23x1f,_0x1a23x2c[_0xc2b8[62]]);return db[_0xc2b8[52]][_0xc2b8[65]](_0x1a23x1f)[_0xc2b8[40]](handleEntityNotFound(_0x1a23x1a,null))[_0xc2b8[40]](respondWithResult(_0x1a23x1a,null))[_0xc2b8[64]](handleError(_0x1a23x1a,null))};exports[_0xc2b8[66]]= function(_0x1a23x2c,_0x1a23x1a){return db[_0xc2b8[52]][_0xc2b8[66]](_0x1a23x2c[_0xc2b8[67]],{})[_0xc2b8[40]](respondWithResult(_0x1a23x1a,201))[_0xc2b8[64]](handleError(_0x1a23x1a,null))};exports[_0xc2b8[41]]= function(_0x1a23x2c,_0x1a23x1a){if(_0x1a23x2c[_0xc2b8[67]][_0xc2b8[48]]){delete _0x1a23x2c[_0xc2b8[67]][_0xc2b8[48]]};return db[_0xc2b8[52]][_0xc2b8[65]]({where:{id:_0x1a23x2c[_0xc2b8[49]][_0xc2b8[48]]}})[_0xc2b8[40]](handleEntityNotFound(_0x1a23x1a,null))[_0xc2b8[40]](saveUpdates(_0x1a23x2c[_0xc2b8[67]],null))[_0xc2b8[40]](respondWithResult(_0x1a23x1a,null))[_0xc2b8[64]](handleError(_0x1a23x1a,null))};exports[_0xc2b8[42]]= function(_0x1a23x2c,_0x1a23x1a){return db[_0xc2b8[52]][_0xc2b8[65]]({where:{id:_0x1a23x2c[_0xc2b8[49]][_0xc2b8[48]]}})[_0xc2b8[40]](handleEntityNotFound(_0x1a23x1a,null))[_0xc2b8[40]](removeEntity(_0x1a23x1a,null))[_0xc2b8[64]](handleError(_0x1a23x1a,null))}
\ No newline at end of file
index bf9051e..3aa822c 100644 (file)
@@ -1 +1 @@
-var _0xe1c0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xe1c0[0];var _=require(_0xe1c0[1]);var util=require(_0xe1c0[2]);var logger=require(_0xe1c0[4])(_0xe1c0[3]);var moment=require(_0xe1c0[5]);var BPromise=require(_0xe1c0[6]);var rp=require(_0xe1c0[7]);var attributes=require(_0xe1c0[8]);module[_0xe1c0[9]]= function(_0x1984x8,_0x1984x9){return _0x1984x8[_0xe1c0[12]](_0xe1c0[10],attributes,{tableName:_0xe1c0[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x96ef=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x96ef[0];var _=require(_0x96ef[1]);var util=require(_0x96ef[2]);var logger=require(_0x96ef[4])(_0x96ef[3]);var moment=require(_0x96ef[5]);var BPromise=require(_0x96ef[6]);var rp=require(_0x96ef[7]);var attributes=require(_0x96ef[8]);module[_0x96ef[9]]= function(_0xaeebx8,_0xaeebx9){return _0xaeebx8[_0x96ef[12]](_0x96ef[10],attributes,{tableName:_0x96ef[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 7d679b3..399916c 100644 (file)
@@ -1 +1 @@
-var _0x15cf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E"];_0x15cf[0];var _=require(_0x15cf[1]);var util=require(_0x15cf[2]);var moment=require(_0x15cf[3]);var BPromise=require(_0x15cf[4]);var rs=require(_0x15cf[5]);var fs=require(_0x15cf[6]);var db=require(_0x15cf[8])[_0x15cf[7]];var utils=require(_0x15cf[9]);var logger=require(_0x15cf[11])(_0x15cf[10]);var config=require(_0x15cf[12]);var jayson=require(_0x15cf[13]);var client=jayson[_0x15cf[15]][_0x15cf[14]]({port:9002});function respondWithRpcPromise(_0x963axe,_0x963axf,_0x963ax10){return  new BPromise(function(_0x963ax11,_0x963ax12){return client[_0x15cf[28]](_0x963axe,_0x963ax10)[_0x15cf[27]](function(_0x963ax14){logger[_0x15cf[20]](_0x15cf[16],_0x963axf,_0x15cf[19]);logger[_0x15cf[23]](_0x15cf[21],_0x963axf,_0x15cf[19],JSON[_0x15cf[22]](_0x963ax14));if(_0x963ax14[_0x15cf[17]]){if(_0x963ax14[_0x15cf[17]][_0x15cf[24]]=== 500){logger[_0x15cf[17]](_0x15cf[16],_0x963axf,_0x963ax14[_0x15cf[17]][_0x15cf[25]]);return _0x963ax12(_0x963ax14[_0x15cf[17]][_0x15cf[25]])};logger[_0x15cf[17]](_0x15cf[16],_0x963axf,_0x963ax14[_0x15cf[17]][_0x15cf[25]]);return _0x963ax11(_0x963ax14[_0x15cf[17]][_0x15cf[25]])}else {logger[_0x15cf[20]](_0x15cf[16],_0x963axf,_0x15cf[19]);_0x963ax11(_0x963ax14[_0x15cf[26]][_0x15cf[25]])}})[_0x15cf[18]](function(_0x963ax13){logger[_0x15cf[17]](_0x15cf[16],_0x963axf,_0x963ax13);_0x963ax12(_0x963ax13)})})}exports[_0x15cf[29]]= function(_0x963ax10){var _0x963ax15=this;return  new Promise(function(_0x963ax11,_0x963ax12){return db[_0x15cf[37]][_0x15cf[36]](_0x963ax10[_0x15cf[30]],{raw:_0x963ax10[_0x15cf[31]]?(_0x963ax10[_0x15cf[31]][_0x15cf[32]]=== undefined)?true:false:true,individualHooks:true,where:_0x963ax10[_0x15cf[31]]?_0x963ax10[_0x15cf[31]][_0x15cf[33]]|| null:null,attributes:_0x963ax10[_0x15cf[31]]?_0x963ax10[_0x15cf[31]][_0x15cf[34]]|| null:null,limit:_0x963ax10[_0x15cf[31]]?_0x963ax10[_0x15cf[31]][_0x15cf[35]]|| null:null})[_0x15cf[27]](function(_0x963ax14){logger[_0x15cf[20]](_0x15cf[29],_0x963ax10);logger[_0x15cf[23]](_0x15cf[29],_0x963ax10,JSON[_0x15cf[22]](_0x963ax14));_0x963ax11(_0x963ax14)})[_0x15cf[18]](function(_0x963ax13){logger[_0x15cf[17]](_0x15cf[29],_0x963ax13[_0x15cf[25]],_0x963ax10);_0x963ax12(_0x963ax15[_0x15cf[17]](500,_0x963ax13[_0x15cf[25]]))})})}
\ No newline at end of file
+var _0x33dc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E"];_0x33dc[0];var _=require(_0x33dc[1]);var util=require(_0x33dc[2]);var moment=require(_0x33dc[3]);var BPromise=require(_0x33dc[4]);var rs=require(_0x33dc[5]);var fs=require(_0x33dc[6]);var db=require(_0x33dc[8])[_0x33dc[7]];var utils=require(_0x33dc[9]);var logger=require(_0x33dc[11])(_0x33dc[10]);var config=require(_0x33dc[12]);var jayson=require(_0x33dc[13]);var client=jayson[_0x33dc[15]][_0x33dc[14]]({port:9002});function respondWithRpcPromise(_0xb781xe,_0xb781xf,_0xb781x10){return  new BPromise(function(_0xb781x11,_0xb781x12){return client[_0x33dc[28]](_0xb781xe,_0xb781x10)[_0x33dc[27]](function(_0xb781x14){logger[_0x33dc[20]](_0x33dc[16],_0xb781xf,_0x33dc[19]);logger[_0x33dc[23]](_0x33dc[21],_0xb781xf,_0x33dc[19],JSON[_0x33dc[22]](_0xb781x14));if(_0xb781x14[_0x33dc[17]]){if(_0xb781x14[_0x33dc[17]][_0x33dc[24]]=== 500){logger[_0x33dc[17]](_0x33dc[16],_0xb781xf,_0xb781x14[_0x33dc[17]][_0x33dc[25]]);return _0xb781x12(_0xb781x14[_0x33dc[17]][_0x33dc[25]])};logger[_0x33dc[17]](_0x33dc[16],_0xb781xf,_0xb781x14[_0x33dc[17]][_0x33dc[25]]);return _0xb781x11(_0xb781x14[_0x33dc[17]][_0x33dc[25]])}else {logger[_0x33dc[20]](_0x33dc[16],_0xb781xf,_0x33dc[19]);_0xb781x11(_0xb781x14[_0x33dc[26]][_0x33dc[25]])}})[_0x33dc[18]](function(_0xb781x13){logger[_0x33dc[17]](_0x33dc[16],_0xb781xf,_0xb781x13);_0xb781x12(_0xb781x13)})})}exports[_0x33dc[29]]= function(_0xb781x10){var _0xb781x15=this;return  new Promise(function(_0xb781x11,_0xb781x12){return db[_0x33dc[37]][_0x33dc[36]](_0xb781x10[_0x33dc[30]],{raw:_0xb781x10[_0x33dc[31]]?(_0xb781x10[_0x33dc[31]][_0x33dc[32]]=== undefined)?true:false:true,individualHooks:true,where:_0xb781x10[_0x33dc[31]]?_0xb781x10[_0x33dc[31]][_0x33dc[33]]|| null:null,attributes:_0xb781x10[_0x33dc[31]]?_0xb781x10[_0x33dc[31]][_0x33dc[34]]|| null:null,limit:_0xb781x10[_0x33dc[31]]?_0xb781x10[_0x33dc[31]][_0x33dc[35]]|| null:null})[_0x33dc[27]](function(_0xb781x14){logger[_0x33dc[20]](_0x33dc[29],_0xb781x10);logger[_0x33dc[23]](_0x33dc[29],_0xb781x10,JSON[_0x33dc[22]](_0xb781x14));_0xb781x11(_0xb781x14)})[_0x33dc[18]](function(_0xb781x13){logger[_0x33dc[17]](_0x33dc[29],_0xb781x13[_0x33dc[25]],_0xb781x10);_0xb781x12(_0xb781x15[_0x33dc[17]](500,_0xb781x13[_0x33dc[25]]))})})}
\ No newline at end of file
index 0184c8b..5de5a50 100644 (file)
@@ -1 +1 @@
-var _0xa3e8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x74\x61\x67\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x61\x64\x64\x74\x61\x67\x73","\x74\x72\x61\x63\x6B\x65\x64","\x61\x64\x64\x54\x61\x67\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x61\x67\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xa3e8[0];var multer=require(_0xa3e8[1]);var util=require(_0xa3e8[2]);var path=require(_0xa3e8[3]);var express=require(_0xa3e8[4]);var router=express.Router();var auth=require(_0xa3e8[5]);var interaction=require(_0xa3e8[6]);var config=require(_0xa3e8[7]);var controller=require(_0xa3e8[8]);router[_0xa3e8[12]](_0xa3e8[9],auth[_0xa3e8[10]](),controller[_0xa3e8[11]]);router[_0xa3e8[12]](_0xa3e8[13],auth[_0xa3e8[10]](),controller[_0xa3e8[14]]);router[_0xa3e8[12]](_0xa3e8[15],auth[_0xa3e8[10]](),controller[_0xa3e8[16]]);router[_0xa3e8[12]](_0xa3e8[17],auth[_0xa3e8[10]](),controller[_0xa3e8[18]]);router[_0xa3e8[20]](_0xa3e8[9],auth[_0xa3e8[10]](),controller[_0xa3e8[19]]);router[_0xa3e8[20]](_0xa3e8[17],auth[_0xa3e8[10]](),controller[_0xa3e8[21]]);router[_0xa3e8[20]](_0xa3e8[22],auth[_0xa3e8[10]](),interaction[_0xa3e8[25]](_0xa3e8[23],_0xa3e8[24]),controller[_0xa3e8[26]]);router[_0xa3e8[29]](_0xa3e8[15],auth[_0xa3e8[10]](),interaction[_0xa3e8[25]](_0xa3e8[23],_0xa3e8[27]),controller[_0xa3e8[28]]);router[_0xa3e8[32]](_0xa3e8[15],auth[_0xa3e8[10]](),interaction[_0xa3e8[25]](_0xa3e8[23],_0xa3e8[30]),controller[_0xa3e8[31]]);router[_0xa3e8[32]](_0xa3e8[22],auth[_0xa3e8[10]](),controller[_0xa3e8[33]]);module[_0xa3e8[34]]= router
\ No newline at end of file
+var _0xaad9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x74\x61\x67\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x61\x64\x64\x74\x61\x67\x73","\x74\x72\x61\x63\x6B\x65\x64","\x61\x64\x64\x54\x61\x67\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x61\x67\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xaad9[0];var multer=require(_0xaad9[1]);var util=require(_0xaad9[2]);var path=require(_0xaad9[3]);var express=require(_0xaad9[4]);var router=express.Router();var auth=require(_0xaad9[5]);var interaction=require(_0xaad9[6]);var config=require(_0xaad9[7]);var controller=require(_0xaad9[8]);router[_0xaad9[12]](_0xaad9[9],auth[_0xaad9[10]](),controller[_0xaad9[11]]);router[_0xaad9[12]](_0xaad9[13],auth[_0xaad9[10]](),controller[_0xaad9[14]]);router[_0xaad9[12]](_0xaad9[15],auth[_0xaad9[10]](),controller[_0xaad9[16]]);router[_0xaad9[12]](_0xaad9[17],auth[_0xaad9[10]](),controller[_0xaad9[18]]);router[_0xaad9[20]](_0xaad9[9],auth[_0xaad9[10]](),controller[_0xaad9[19]]);router[_0xaad9[20]](_0xaad9[17],auth[_0xaad9[10]](),controller[_0xaad9[21]]);router[_0xaad9[20]](_0xaad9[22],auth[_0xaad9[10]](),interaction[_0xaad9[25]](_0xaad9[23],_0xaad9[24]),controller[_0xaad9[26]]);router[_0xaad9[29]](_0xaad9[15],auth[_0xaad9[10]](),interaction[_0xaad9[25]](_0xaad9[23],_0xaad9[27]),controller[_0xaad9[28]]);router[_0xaad9[32]](_0xaad9[15],auth[_0xaad9[10]](),interaction[_0xaad9[25]](_0xaad9[23],_0xaad9[30]),controller[_0xaad9[31]]);router[_0xaad9[32]](_0xaad9[22],auth[_0xaad9[10]](),controller[_0xaad9[33]]);module[_0xaad9[34]]= router
\ No newline at end of file
index 3b9b427..928c9f2 100644 (file)
@@ -1 +1 @@
-var _0x6ad0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x42\x4F\x4F\x4C\x45\x41\x4E","\x44\x41\x54\x45","\x53\x54\x52\x49\x4E\x47","\x69\x6E","\x6F\x75\x74"];_0x6ad0[0];var Sequelize=require(_0x6ad0[1]);module[_0x6ad0[2]]= {closed:{type:Sequelize[_0x6ad0[3]],defaultValue:false},closedAt:{type:Sequelize[_0x6ad0[4]]},disposition:{type:Sequelize[_0x6ad0[5]]},note:{type:Sequelize[_0x6ad0[5]]},read1stAt:{type:Sequelize[_0x6ad0[4]]},threadId:{type:Sequelize[_0x6ad0[5]]},externalUrl:{type:Sequelize[_0x6ad0[5]]},lastMsgAt:{type:Sequelize[_0x6ad0[4]]},lastMsgDirection:{type:Sequelize.ENUM(_0x6ad0[6],_0x6ad0[7]),defaultValue:_0x6ad0[6],allowNull:false},from:{type:Sequelize[_0x6ad0[5]]}}
\ No newline at end of file
+var _0x3178=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x42\x4F\x4F\x4C\x45\x41\x4E","\x44\x41\x54\x45","\x53\x54\x52\x49\x4E\x47","\x69\x6E","\x6F\x75\x74"];_0x3178[0];var Sequelize=require(_0x3178[1]);module[_0x3178[2]]= {closed:{type:Sequelize[_0x3178[3]],defaultValue:false},closedAt:{type:Sequelize[_0x3178[4]]},disposition:{type:Sequelize[_0x3178[5]]},note:{type:Sequelize[_0x3178[5]]},read1stAt:{type:Sequelize[_0x3178[4]]},threadId:{type:Sequelize[_0x3178[5]]},externalUrl:{type:Sequelize[_0x3178[5]]},lastMsgAt:{type:Sequelize[_0x3178[4]]},lastMsgDirection:{type:Sequelize.ENUM(_0x3178[6],_0x3178[7]),defaultValue:_0x3178[6],allowNull:false},from:{type:Sequelize[_0x3178[5]]}}
\ No newline at end of file
index beefae5..ca9cd4f 100644 (file)
@@ -1 +1 @@
-var _0x28d6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x74\x61\x67","\x54\x61\x67","\x54\x61\x67\x73","\x69\x64","\x70\x75\x73\x68","\x64\x69\x73\x74\x69\x6E\x63\x74","\x72\x65\x61\x64","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x65\x73\x73\x61\x67\x65\x73","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x69\x6E","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x55\x73\x65\x72","\x55\x73\x65\x72\x73","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x4F\x77\x6E\x65\x72","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79","\x63\x6F\x6C\x6F\x72","\x54\x68\x72\x6F\x75\x67\x68\x54\x61\x67\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x69\x64\x73","\x6F\x6D\x69\x74","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x24\x67\x74\x65","\x2C","\x73\x70\x6C\x69\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x54\x61\x67\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x54\x61\x67\x73\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x73\x65\x74\x54\x61\x67\x73","\x72\x65\x6D\x6F\x76\x65\x54\x61\x67\x73"];_0x28d6[0];var jsonpatch=require(_0x28d6[1]);var rp=require(_0x28d6[2]);var moment=require(_0x28d6[3]);var BPromise=require(_0x28d6[4]);var Mustache=require(_0x28d6[5]);var util=require(_0x28d6[6]);var path=require(_0x28d6[7]);var sox=require(_0x28d6[8]);var csv=require(_0x28d6[9]);var ejs=require(_0x28d6[10]);var fs=require(_0x28d6[11]);var _=require(_0x28d6[12]);var squel=require(_0x28d6[13]);var crypto=require(_0x28d6[14]);var jsforce=require(_0x28d6[15]);var deskjs=require(_0x28d6[16]);var toCsv=require(_0x28d6[9]);var querystring=require(_0x28d6[17]);var Papa=require(_0x28d6[18]);var qs=require(_0x28d6[19]);var logger=require(_0x28d6[21])(_0x28d6[20]);var utils=require(_0x28d6[22]);var config=require(_0x28d6[23]);var db=require(_0x28d6[25])[_0x28d6[24]];var socket=require(_0x28d6[27])({host:_0x28d6[26],port:6379});require(_0x28d6[29])[_0x28d6[28]](socket);function respondWithStatusCode(_0xb192x1b,_0xb192x1c){_0xb192x1c= _0xb192x1c|| 204;return function(_0xb192x1d){if(_0xb192x1d){return _0xb192x1b[_0x28d6[30]](_0xb192x1c)};return _0xb192x1b[_0x28d6[32]](_0xb192x1c)[_0x28d6[31]]()}}function respondWithResult(_0xb192x1b,_0xb192x1c){_0xb192x1c= _0xb192x1c|| 200;return function(_0xb192x1d){if(_0xb192x1d){return _0xb192x1b[_0x28d6[32]](_0xb192x1c)[_0x28d6[33]](_0xb192x1d)}}}function respondWithFilteredResult(_0xb192x1b,_0xb192x20){return function(_0xb192x1d){if(_0xb192x1d){var _0xb192x21=_0xb192x1d[_0x28d6[34]],_0xb192x22=_0xb192x20[_0x28d6[35]],_0xb192x23=_0xb192x20[_0x28d6[35]]+ _0xb192x20[_0x28d6[36]],_0xb192x1c;if(_0xb192x23>= _0xb192x21){_0xb192x23= _0xb192x21;_0xb192x1c= 200}else {_0xb192x1c= 206};_0xb192x1b[_0x28d6[32]](_0xb192x1c);return _0xb192x1b[_0x28d6[40]](_0x28d6[37],_0xb192x22+ _0x28d6[38]+ _0xb192x23+ _0x28d6[39]+ _0xb192x21)[_0x28d6[33]](_0xb192x1d)};return null}}function patchUpdates(_0xb192x25){return function(_0xb192x1d){try{jsonpatch[_0x28d6[41]](_0xb192x1d,_0xb192x25,true)}catch(err){return BPromise[_0x28d6[42]](err)};return _0xb192x1d[_0x28d6[43]]()}}function saveUpdates(_0xb192x27,_0xb192x1c){return function(_0xb192x1d){if(_0xb192x1d){return _0xb192x1d[_0x28d6[45]](_0xb192x27)[_0x28d6[44]](function(_0xb192x28){return _0xb192x28})};return null}}function removeEntity(_0xb192x1b,_0xb192x1c){return function(_0xb192x1d){if(_0xb192x1d){return _0xb192x1d[_0x28d6[46]]()[_0x28d6[44]](function(){_0xb192x1b[_0x28d6[32]](204)[_0x28d6[31]]()})}}}function handleEntityNotFound(_0xb192x1b,_0xb192x1c){return function(_0xb192x1d){if(!_0xb192x1d){_0xb192x1b[_0x28d6[30]](404)};return _0xb192x1d}}function handleError(_0xb192x1b,_0xb192x1c){_0xb192x1c= _0xb192x1c|| 500;return function(_0xb192x2c){logger[_0x28d6[48]](_0xb192x2c[_0x28d6[47]]);if(_0xb192x2c[_0x28d6[49]]){delete _0xb192x2c[_0x28d6[49]]};_0xb192x1b[_0x28d6[32]](_0xb192x1c)[_0x28d6[50]](_0xb192x2c)}}exports[_0x28d6[51]]= function(_0xb192x2d,_0xb192x1b){var _0xb192x20={},_0xb192x2e={},_0xb192x2f={count:0,rows:[]};_0xb192x2e[_0x28d6[52]]= _[_0x28d6[55]](db[_0x28d6[54]][_0x28d6[53]]);var _0xb192x30={dateStart:_0xb192x2d[_0x28d6[57]][_0x28d6[56]],dateEnd:_0xb192x2d[_0x28d6[57]][_0x28d6[58]]};delete _0xb192x2d[_0x28d6[57]][_0x28d6[56]];delete _0xb192x2d[_0x28d6[57]][_0x28d6[58]];_0xb192x2e[_0x28d6[57]]= _[_0x28d6[55]](_0xb192x2d[_0x28d6[57]]);_0xb192x2e[_0x28d6[59]]= _[_0x28d6[60]](_0xb192x2e[_0x28d6[52]],_0xb192x2e[_0x28d6[57]]);_0xb192x20[_0x28d6[61]]= _[_0x28d6[60]](_0xb192x2e[_0x28d6[52]],qs[_0x28d6[62]](_0xb192x2d[_0x28d6[57]][_0x28d6[62]]));_0xb192x20[_0x28d6[61]]= (_0xb192x20[_0x28d6[61]][_0x28d6[63]])?_0xb192x20[_0x28d6[61]]:_0xb192x2e[_0x28d6[52]];if(!_0xb192x2d[_0x28d6[57]][_0x28d6[65]](_0x28d6[64])){_0xb192x20[_0x28d6[36]]= qs[_0x28d6[36]](_0xb192x2d[_0x28d6[57]][_0x28d6[36]]);_0xb192x20[_0x28d6[35]]= qs[_0x28d6[35]](_0xb192x2d[_0x28d6[57]][_0x28d6[35]])};_0xb192x20[_0x28d6[66]]= qs[_0x28d6[67]](_0xb192x2d[_0x28d6[57]][_0x28d6[67]]);_0xb192x20[_0x28d6[68]]= qs[_0x28d6[59]](_[_0x28d6[69]](_0xb192x2d[_0x28d6[57]],_0xb192x2e[_0x28d6[59]]));if(_0xb192x30[_0x28d6[56]]){if(_0xb192x30[_0x28d6[58]]){_0xb192x30[_0x28d6[58]]= moment(_0xb192x30[_0x28d6[58]])[_0x28d6[71]](1,_0x28d6[70])}else {_0xb192x30[_0x28d6[58]]= moment(_0xb192x30[_0x28d6[56]])[_0x28d6[71]](1,_0x28d6[70])};_[_0x28d6[72]](_0xb192x20[_0x28d6[68]],{createdAt:{$gte:_0xb192x30[_0x28d6[56]],$lte:_0xb192x30[_0x28d6[58]]}})};if(_0xb192x2d[_0x28d6[57]][_0x28d6[73]]){_0xb192x20[_0x28d6[68]]= _[_0x28d6[72]](_0xb192x20[_0x28d6[68]],{$or:_[_0x28d6[75]](_0xb192x20[_0x28d6[61]],function(_0xb192x31){var _0xb192x2f={};_0xb192x2f[_0xb192x31]= {$like:_0x28d6[74]+ _0xb192x2d[_0x28d6[57]][_0x28d6[73]]+ _0x28d6[74]};return _0xb192x2f})})};_0xb192x20= _[_0x28d6[72]]({},_0xb192x20,_0xb192x2d[_0x28d6[76]]);var _0xb192x32={where:_0xb192x20[_0x28d6[68]]};_0xb192x32[_0x28d6[77]]= [];if(_0xb192x2d[_0x28d6[57]][_0x28d6[78]]){_0xb192x32[_0x28d6[77]][_0x28d6[82]]({model:db[_0x28d6[79]],as:_0x28d6[80],attributes:[_0x28d6[81]],where:{id:_0xb192x2d[_0x28d6[57]][_0x28d6[78]]},required:true});_0xb192x32[_0x28d6[83]]= true};if(_0xb192x2d[_0x28d6[57]][_0x28d6[84]]){_0xb192x32[_0x28d6[77]][_0x28d6[82]]({model:db[_0x28d6[85]],as:_0x28d6[86],attributes:[_0x28d6[81],_0x28d6[87],_0x28d6[88],_0x28d6[84]],where:{direction:_0x28d6[89],read:_0xb192x2d[_0x28d6[57]][_0x28d6[84]]|| false},required:true});_0xb192x32[_0x28d6[83]]= true};return db[_0x28d6[54]][_0x28d6[34]](_0xb192x32)[_0x28d6[44]](function(_0xb192x21){_0xb192x2f[_0x28d6[34]]= _0xb192x21;if(_0xb192x2d[_0x28d6[57]][_0x28d6[92]]){_0xb192x20[_0x28d6[77]]= [{model:db[_0x28d6[93]],as:_0x28d6[94],required:false,attributes:[_0x28d6[81],_0x28d6[49],_0x28d6[95]]},{model:db[_0x28d6[96]],as:_0x28d6[97],required:false},{model:db[_0x28d6[93]],as:_0x28d6[98],attributes:[_0x28d6[49],_0x28d6[95],_0x28d6[99]],required:false},{model:db[_0x28d6[100]],as:_0x28d6[101],attributes:[_0x28d6[49],_0x28d6[102]],required:false},{model:db[_0x28d6[85]],as:_0x28d6[86],attributes:[_0x28d6[81],_0x28d6[87],_0x28d6[88],_0x28d6[84]],where:{direction:_0x28d6[89],read:_0xb192x2d[_0x28d6[57]][_0x28d6[84]]|| false},required:_0xb192x2d[_0x28d6[57]][_0x28d6[84]]|| false},{model:db[_0x28d6[79]],as:_0x28d6[80],attributes:[_0x28d6[81],_0x28d6[49],_0x28d6[103]],required:_0xb192x2d[_0x28d6[57]][_0x28d6[78]]?true:false},{model:db[_0x28d6[79]],as:_0x28d6[104],attributes:[_0x28d6[81],_0x28d6[49],_0x28d6[103]],through:_0xb192x2d[_0x28d6[57]][_0x28d6[78]]?{attributes:[],where:{TagId:_0xb192x2d[_0x28d6[57]][_0x28d6[78]]|| undefined}}:{},required:_0xb192x2d[_0x28d6[57]][_0x28d6[78]]?true:false}]};return db[_0x28d6[54]][_0x28d6[105]](_0xb192x20)})[_0x28d6[44]](function(_0xb192x33){_0xb192x2f[_0x28d6[91]]= _0xb192x33;return _0xb192x2f})[_0x28d6[44]](respondWithFilteredResult(_0xb192x1b,_0xb192x20))[_0x28d6[90]](handleError(_0xb192x1b,null))};exports[_0x28d6[106]]= function(_0xb192x2d,_0xb192x1b){var _0xb192x20={raw:false,where:{id:_0xb192x2d[_0x28d6[107]][_0x28d6[81]]}},_0xb192x2e={};_0xb192x2e[_0x28d6[52]]= _[_0x28d6[55]](db[_0x28d6[54]][_0x28d6[53]]);_0xb192x2e[_0x28d6[57]]= _[_0x28d6[55]](_0xb192x2d[_0x28d6[57]]);_0xb192x2e[_0x28d6[59]]= _[_0x28d6[60]](_0xb192x2e[_0x28d6[52]],_0xb192x2e[_0x28d6[57]]);_0xb192x20[_0x28d6[61]]= _[_0x28d6[60]](_0xb192x2e[_0x28d6[52]],qs[_0x28d6[62]](_0xb192x2d[_0x28d6[57]][_0x28d6[62]]));_0xb192x20[_0x28d6[61]]= (_0xb192x20[_0x28d6[61]][_0x28d6[63]])?_0xb192x20[_0x28d6[61]]:_0xb192x2e[_0x28d6[52]];if(_0xb192x2d[_0x28d6[57]][_0x28d6[92]]){_0xb192x20[_0x28d6[77]]= [{all:true}]};_0xb192x20= _[_0x28d6[72]]({},_0xb192x20,_0xb192x2d[_0x28d6[76]]);return db[_0x28d6[54]][_0x28d6[108]](_0xb192x20)[_0x28d6[44]](handleEntityNotFound(_0xb192x1b,null))[_0x28d6[44]](respondWithResult(_0xb192x1b,null))[_0x28d6[90]](handleError(_0xb192x1b,null))};exports[_0x28d6[109]]= function(_0xb192x2d,_0xb192x1b){return db[_0x28d6[54]][_0x28d6[109]](_0xb192x2d[_0x28d6[110]],{})[_0x28d6[44]](respondWithResult(_0xb192x1b,201))[_0x28d6[90]](handleError(_0xb192x1b,null))};exports[_0x28d6[45]]= function(_0xb192x2d,_0xb192x1b){if(_0xb192x2d[_0x28d6[110]][_0x28d6[81]]){delete _0xb192x2d[_0x28d6[110]][_0x28d6[81]]};return db[_0x28d6[54]][_0x28d6[108]]({where:{id:_0xb192x2d[_0x28d6[107]][_0x28d6[81]]}})[_0x28d6[44]](handleEntityNotFound(_0xb192x1b,null))[_0x28d6[44]](saveUpdates(_0xb192x2d[_0x28d6[110]],null))[_0x28d6[44]](respondWithResult(_0xb192x1b,null))[_0x28d6[90]](handleError(_0xb192x1b,null))};exports[_0x28d6[46]]= function(_0xb192x2d,_0xb192x1b){return db[_0x28d6[54]][_0x28d6[108]]({where:{id:_0xb192x2d[_0x28d6[107]][_0x28d6[81]]}})[_0x28d6[44]](handleEntityNotFound(_0xb192x1b,null))[_0x28d6[44]](removeEntity(_0xb192x1b,null))[_0x28d6[90]](handleError(_0xb192x1b,null))};exports[_0x28d6[111]]= function(_0xb192x2d,_0xb192x1b){return db[_0x28d6[54]][_0x28d6[111]]()[_0x28d6[44]](respondWithResult(_0xb192x1b,null))[_0x28d6[90]](handleError(_0xb192x1b,null))};exports[_0x28d6[112]]= function(_0xb192x2d,_0xb192x1b,_0xb192x34){return db[_0x28d6[85]][_0x28d6[108]]({where:{id:_0xb192x2d[_0x28d6[107]][_0x28d6[81]]}})[_0x28d6[44]](handleEntityNotFound(_0xb192x1b,null))[_0x28d6[44]](function(_0xb192x1d){if(_0xb192x1d){return _0xb192x1d[_0x28d6[112]](_0xb192x2d[_0x28d6[110]][_0x28d6[113]],_[_0x28d6[114]](_0xb192x2d[_0x28d6[110]],[_0x28d6[113],_0x28d6[81]])|| {})}})[_0x28d6[44]](respondWithResult(_0xb192x1b,null))[_0x28d6[90]](handleError(_0xb192x1b,null))};exports[_0x28d6[115]]= function(_0xb192x2d,_0xb192x1b,_0xb192x34){var _0xb192x20={raw:false,where:{}};var _0xb192x2e={};var _0xb192x35={count:0,rows:[]};return db[_0x28d6[54]][_0x28d6[122]]({where:{id:_0xb192x2d[_0x28d6[107]][_0x28d6[81]]}})[_0x28d6[44]](handleEntityNotFound(_0xb192x1b,null))[_0x28d6[44]](function(_0xb192x1d){if(_0xb192x1d){_0xb192x2e[_0x28d6[52]]= _[_0x28d6[55]](db[_0x28d6[85]][_0x28d6[53]]);_0xb192x2e[_0x28d6[57]]= _[_0x28d6[55]](_0xb192x2d[_0x28d6[57]]);_0xb192x2e[_0x28d6[59]]= _[_0x28d6[60]](_0xb192x2e[_0x28d6[52]],_0xb192x2e[_0x28d6[57]]);_0xb192x20[_0x28d6[61]]= _[_0x28d6[60]](_0xb192x2e[_0x28d6[52]],qs[_0x28d6[62]](_0xb192x2d[_0x28d6[57]][_0x28d6[62]]));_0xb192x20[_0x28d6[61]]= (_0xb192x20[_0x28d6[61]][_0x28d6[63]])?_0xb192x20[_0x28d6[61]]:_0xb192x2e[_0x28d6[52]];if(!_0xb192x2d[_0x28d6[57]][_0x28d6[65]](_0x28d6[64])){_0xb192x20[_0x28d6[36]]= qs[_0x28d6[36]](_0xb192x2d[_0x28d6[57]][_0x28d6[36]]);_0xb192x20[_0x28d6[35]]= qs[_0x28d6[35]](_0xb192x2d[_0x28d6[57]][_0x28d6[35]])};_0xb192x20[_0x28d6[66]]= qs[_0x28d6[67]](_0xb192x2d[_0x28d6[57]][_0x28d6[67]]);_0xb192x20[_0x28d6[68]]= qs[_0x28d6[59]](_[_0x28d6[69]](_0xb192x2d[_0x28d6[57]],_0xb192x2e[_0x28d6[59]]));_0xb192x20[_0x28d6[68]][_0x28d6[116]]= _0xb192x1d[_0x28d6[81]];if(_0xb192x2d[_0x28d6[57]][_0x28d6[73]]){_0xb192x20[_0x28d6[68]]= _[_0x28d6[72]](_0xb192x20[_0x28d6[68]],{$or:_[_0x28d6[75]](_0xb192x20[_0x28d6[61]],function(_0xb192x31){var _0xb192x2f={};_0xb192x2f[_0xb192x31]= {$like:_0x28d6[74]+ _0xb192x2d[_0x28d6[57]][_0x28d6[73]]+ _0x28d6[74]};return _0xb192x2f})})};if(_0xb192x2d[_0x28d6[57]][_0x28d6[117]]){var _0xb192x36=_0xb192x2d[_0x28d6[57]][_0x28d6[117]][_0x28d6[119]](_0x28d6[118]);var _0xb192x2f={};_0xb192x2f[_0xb192x36[0]]= {$gte:moment(_0xb192x36[1])[_0x28d6[121]](_0x28d6[120])};_0xb192x20[_0x28d6[68]]= _[_0x28d6[72]](_0xb192x20[_0x28d6[68]],_0xb192x2f)};_0xb192x20= _[_0x28d6[72]]({},_0xb192x20,_0xb192x2d[_0x28d6[76]]);return db[_0x28d6[85]][_0x28d6[34]]({where:_0xb192x20[_0x28d6[68]]})[_0x28d6[44]](function(_0xb192x21){_0xb192x35[_0x28d6[34]]= _0xb192x21;if(_0xb192x2d[_0x28d6[57]][_0x28d6[92]]){_0xb192x20[_0x28d6[77]]= [{all:true}]};return db[_0x28d6[85]][_0x28d6[105]](_0xb192x20)})[_0x28d6[44]](function(_0xb192x33){_0xb192x35[_0x28d6[91]]= _0xb192x33;return _0xb192x35})}})[_0x28d6[44]](respondWithFilteredResult(_0xb192x1b,_0xb192x20))[_0x28d6[90]](handleError(_0xb192x1b,null))};exports[_0x28d6[123]]= function(_0xb192x2d,_0xb192x1b,_0xb192x34){return db[_0x28d6[54]][_0x28d6[108]]({where:{id:_0xb192x2d[_0x28d6[107]][_0x28d6[81]]}})[_0x28d6[44]](handleEntityNotFound(_0xb192x1b,null))[_0x28d6[44]](function(_0xb192x1d){if(_0xb192x1d){return _0xb192x1d[_0x28d6[127]](_0xb192x2d[_0x28d6[110]][_0x28d6[113]],_[_0x28d6[114]](_0xb192x2d[_0x28d6[110]],[_0x28d6[113],_0x28d6[81]])|| {})[_0x28d6[126]](function(){return db[_0x28d6[79]][_0x28d6[105]]({attributes:[_0x28d6[81],_0x28d6[49],_0x28d6[103]],where:{id:_0xb192x2d[_0x28d6[110]][_0x28d6[113]]}})})[_0x28d6[44]](function(_0xb192x37){socket[_0x28d6[125]](_0x28d6[124],{id:Number(_0xb192x2d[_0x28d6[107]][_0x28d6[81]]),tags:_0xb192x37|| []});return {id:Number(_0xb192x2d[_0x28d6[107]][_0x28d6[81]]),tags:_0xb192x37|| []}})}})[_0x28d6[44]](respondWithResult(_0xb192x1b,null))[_0x28d6[90]](handleError(_0xb192x1b,null))};exports[_0x28d6[128]]= function(_0xb192x2d,_0xb192x1b,_0xb192x34){var _0xb192x38;return db[_0x28d6[54]][_0x28d6[108]]({where:{id:_0xb192x2d[_0x28d6[107]][_0x28d6[81]]}})[_0x28d6[44]](handleEntityNotFound(_0xb192x1b,null))[_0x28d6[44]](function(_0xb192x1d){if(_0xb192x1d){return _0xb192x1d[_0x28d6[128]](_0xb192x2d[_0x28d6[57]][_0x28d6[113]])}})[_0x28d6[44]](respondWithStatusCode(_0xb192x1b,null))[_0x28d6[90]](handleError(_0xb192x1b,null))}
\ No newline at end of file
+var _0x9390=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x74\x61\x67","\x54\x61\x67","\x54\x61\x67\x73","\x69\x64","\x70\x75\x73\x68","\x64\x69\x73\x74\x69\x6E\x63\x74","\x72\x65\x61\x64","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x65\x73\x73\x61\x67\x65\x73","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x69\x6E","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x55\x73\x65\x72","\x55\x73\x65\x72\x73","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x4F\x77\x6E\x65\x72","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79","\x63\x6F\x6C\x6F\x72","\x54\x68\x72\x6F\x75\x67\x68\x54\x61\x67\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x69\x64\x73","\x6F\x6D\x69\x74","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x24\x67\x74\x65","\x2C","\x73\x70\x6C\x69\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x54\x61\x67\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x54\x61\x67\x73\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x73\x65\x74\x54\x61\x67\x73","\x72\x65\x6D\x6F\x76\x65\x54\x61\x67\x73"];_0x9390[0];var jsonpatch=require(_0x9390[1]);var rp=require(_0x9390[2]);var moment=require(_0x9390[3]);var BPromise=require(_0x9390[4]);var Mustache=require(_0x9390[5]);var util=require(_0x9390[6]);var path=require(_0x9390[7]);var sox=require(_0x9390[8]);var csv=require(_0x9390[9]);var ejs=require(_0x9390[10]);var fs=require(_0x9390[11]);var _=require(_0x9390[12]);var squel=require(_0x9390[13]);var crypto=require(_0x9390[14]);var jsforce=require(_0x9390[15]);var deskjs=require(_0x9390[16]);var toCsv=require(_0x9390[9]);var querystring=require(_0x9390[17]);var Papa=require(_0x9390[18]);var qs=require(_0x9390[19]);var logger=require(_0x9390[21])(_0x9390[20]);var utils=require(_0x9390[22]);var config=require(_0x9390[23]);var db=require(_0x9390[25])[_0x9390[24]];var socket=require(_0x9390[27])({host:_0x9390[26],port:6379});require(_0x9390[29])[_0x9390[28]](socket);function respondWithStatusCode(_0x9890x1b,_0x9890x1c){_0x9890x1c= _0x9890x1c|| 204;return function(_0x9890x1d){if(_0x9890x1d){return _0x9890x1b[_0x9390[30]](_0x9890x1c)};return _0x9890x1b[_0x9390[32]](_0x9890x1c)[_0x9390[31]]()}}function respondWithResult(_0x9890x1b,_0x9890x1c){_0x9890x1c= _0x9890x1c|| 200;return function(_0x9890x1d){if(_0x9890x1d){return _0x9890x1b[_0x9390[32]](_0x9890x1c)[_0x9390[33]](_0x9890x1d)}}}function respondWithFilteredResult(_0x9890x1b,_0x9890x20){return function(_0x9890x1d){if(_0x9890x1d){var _0x9890x21=_0x9890x1d[_0x9390[34]],_0x9890x22=_0x9890x20[_0x9390[35]],_0x9890x23=_0x9890x20[_0x9390[35]]+ _0x9890x20[_0x9390[36]],_0x9890x1c;if(_0x9890x23>= _0x9890x21){_0x9890x23= _0x9890x21;_0x9890x1c= 200}else {_0x9890x1c= 206};_0x9890x1b[_0x9390[32]](_0x9890x1c);return _0x9890x1b[_0x9390[40]](_0x9390[37],_0x9890x22+ _0x9390[38]+ _0x9890x23+ _0x9390[39]+ _0x9890x21)[_0x9390[33]](_0x9890x1d)};return null}}function patchUpdates(_0x9890x25){return function(_0x9890x1d){try{jsonpatch[_0x9390[41]](_0x9890x1d,_0x9890x25,true)}catch(err){return BPromise[_0x9390[42]](err)};return _0x9890x1d[_0x9390[43]]()}}function saveUpdates(_0x9890x27,_0x9890x1c){return function(_0x9890x1d){if(_0x9890x1d){return _0x9890x1d[_0x9390[45]](_0x9890x27)[_0x9390[44]](function(_0x9890x28){return _0x9890x28})};return null}}function removeEntity(_0x9890x1b,_0x9890x1c){return function(_0x9890x1d){if(_0x9890x1d){return _0x9890x1d[_0x9390[46]]()[_0x9390[44]](function(){_0x9890x1b[_0x9390[32]](204)[_0x9390[31]]()})}}}function handleEntityNotFound(_0x9890x1b,_0x9890x1c){return function(_0x9890x1d){if(!_0x9890x1d){_0x9890x1b[_0x9390[30]](404)};return _0x9890x1d}}function handleError(_0x9890x1b,_0x9890x1c){_0x9890x1c= _0x9890x1c|| 500;return function(_0x9890x2c){logger[_0x9390[48]](_0x9890x2c[_0x9390[47]]);if(_0x9890x2c[_0x9390[49]]){delete _0x9890x2c[_0x9390[49]]};_0x9890x1b[_0x9390[32]](_0x9890x1c)[_0x9390[50]](_0x9890x2c)}}exports[_0x9390[51]]= function(_0x9890x2d,_0x9890x1b){var _0x9890x20={},_0x9890x2e={},_0x9890x2f={count:0,rows:[]};_0x9890x2e[_0x9390[52]]= _[_0x9390[55]](db[_0x9390[54]][_0x9390[53]]);var _0x9890x30={dateStart:_0x9890x2d[_0x9390[57]][_0x9390[56]],dateEnd:_0x9890x2d[_0x9390[57]][_0x9390[58]]};delete _0x9890x2d[_0x9390[57]][_0x9390[56]];delete _0x9890x2d[_0x9390[57]][_0x9390[58]];_0x9890x2e[_0x9390[57]]= _[_0x9390[55]](_0x9890x2d[_0x9390[57]]);_0x9890x2e[_0x9390[59]]= _[_0x9390[60]](_0x9890x2e[_0x9390[52]],_0x9890x2e[_0x9390[57]]);_0x9890x20[_0x9390[61]]= _[_0x9390[60]](_0x9890x2e[_0x9390[52]],qs[_0x9390[62]](_0x9890x2d[_0x9390[57]][_0x9390[62]]));_0x9890x20[_0x9390[61]]= (_0x9890x20[_0x9390[61]][_0x9390[63]])?_0x9890x20[_0x9390[61]]:_0x9890x2e[_0x9390[52]];if(!_0x9890x2d[_0x9390[57]][_0x9390[65]](_0x9390[64])){_0x9890x20[_0x9390[36]]= qs[_0x9390[36]](_0x9890x2d[_0x9390[57]][_0x9390[36]]);_0x9890x20[_0x9390[35]]= qs[_0x9390[35]](_0x9890x2d[_0x9390[57]][_0x9390[35]])};_0x9890x20[_0x9390[66]]= qs[_0x9390[67]](_0x9890x2d[_0x9390[57]][_0x9390[67]]);_0x9890x20[_0x9390[68]]= qs[_0x9390[59]](_[_0x9390[69]](_0x9890x2d[_0x9390[57]],_0x9890x2e[_0x9390[59]]));if(_0x9890x30[_0x9390[56]]){if(_0x9890x30[_0x9390[58]]){_0x9890x30[_0x9390[58]]= moment(_0x9890x30[_0x9390[58]])[_0x9390[71]](1,_0x9390[70])}else {_0x9890x30[_0x9390[58]]= moment(_0x9890x30[_0x9390[56]])[_0x9390[71]](1,_0x9390[70])};_[_0x9390[72]](_0x9890x20[_0x9390[68]],{createdAt:{$gte:_0x9890x30[_0x9390[56]],$lte:_0x9890x30[_0x9390[58]]}})};if(_0x9890x2d[_0x9390[57]][_0x9390[73]]){_0x9890x20[_0x9390[68]]= _[_0x9390[72]](_0x9890x20[_0x9390[68]],{$or:_[_0x9390[75]](_0x9890x20[_0x9390[61]],function(_0x9890x31){var _0x9890x2f={};_0x9890x2f[_0x9890x31]= {$like:_0x9390[74]+ _0x9890x2d[_0x9390[57]][_0x9390[73]]+ _0x9390[74]};return _0x9890x2f})})};_0x9890x20= _[_0x9390[72]]({},_0x9890x20,_0x9890x2d[_0x9390[76]]);var _0x9890x32={where:_0x9890x20[_0x9390[68]]};_0x9890x32[_0x9390[77]]= [];if(_0x9890x2d[_0x9390[57]][_0x9390[78]]){_0x9890x32[_0x9390[77]][_0x9390[82]]({model:db[_0x9390[79]],as:_0x9390[80],attributes:[_0x9390[81]],where:{id:_0x9890x2d[_0x9390[57]][_0x9390[78]]},required:true});_0x9890x32[_0x9390[83]]= true};if(_0x9890x2d[_0x9390[57]][_0x9390[84]]){_0x9890x32[_0x9390[77]][_0x9390[82]]({model:db[_0x9390[85]],as:_0x9390[86],attributes:[_0x9390[81],_0x9390[87],_0x9390[88],_0x9390[84]],where:{direction:_0x9390[89],read:_0x9890x2d[_0x9390[57]][_0x9390[84]]|| false},required:true});_0x9890x32[_0x9390[83]]= true};return db[_0x9390[54]][_0x9390[34]](_0x9890x32)[_0x9390[44]](function(_0x9890x21){_0x9890x2f[_0x9390[34]]= _0x9890x21;if(_0x9890x2d[_0x9390[57]][_0x9390[92]]){_0x9890x20[_0x9390[77]]= [{model:db[_0x9390[93]],as:_0x9390[94],required:false,attributes:[_0x9390[81],_0x9390[49],_0x9390[95]]},{model:db[_0x9390[96]],as:_0x9390[97],required:false},{model:db[_0x9390[93]],as:_0x9390[98],attributes:[_0x9390[49],_0x9390[95],_0x9390[99]],required:false},{model:db[_0x9390[100]],as:_0x9390[101],attributes:[_0x9390[49],_0x9390[102]],required:false},{model:db[_0x9390[85]],as:_0x9390[86],attributes:[_0x9390[81],_0x9390[87],_0x9390[88],_0x9390[84]],where:{direction:_0x9390[89],read:_0x9890x2d[_0x9390[57]][_0x9390[84]]|| false},required:_0x9890x2d[_0x9390[57]][_0x9390[84]]|| false},{model:db[_0x9390[79]],as:_0x9390[80],attributes:[_0x9390[81],_0x9390[49],_0x9390[103]],required:_0x9890x2d[_0x9390[57]][_0x9390[78]]?true:false},{model:db[_0x9390[79]],as:_0x9390[104],attributes:[_0x9390[81],_0x9390[49],_0x9390[103]],through:_0x9890x2d[_0x9390[57]][_0x9390[78]]?{attributes:[],where:{TagId:_0x9890x2d[_0x9390[57]][_0x9390[78]]|| undefined}}:{},required:_0x9890x2d[_0x9390[57]][_0x9390[78]]?true:false}]};return db[_0x9390[54]][_0x9390[105]](_0x9890x20)})[_0x9390[44]](function(_0x9890x33){_0x9890x2f[_0x9390[91]]= _0x9890x33;return _0x9890x2f})[_0x9390[44]](respondWithFilteredResult(_0x9890x1b,_0x9890x20))[_0x9390[90]](handleError(_0x9890x1b,null))};exports[_0x9390[106]]= function(_0x9890x2d,_0x9890x1b){var _0x9890x20={raw:false,where:{id:_0x9890x2d[_0x9390[107]][_0x9390[81]]}},_0x9890x2e={};_0x9890x2e[_0x9390[52]]= _[_0x9390[55]](db[_0x9390[54]][_0x9390[53]]);_0x9890x2e[_0x9390[57]]= _[_0x9390[55]](_0x9890x2d[_0x9390[57]]);_0x9890x2e[_0x9390[59]]= _[_0x9390[60]](_0x9890x2e[_0x9390[52]],_0x9890x2e[_0x9390[57]]);_0x9890x20[_0x9390[61]]= _[_0x9390[60]](_0x9890x2e[_0x9390[52]],qs[_0x9390[62]](_0x9890x2d[_0x9390[57]][_0x9390[62]]));_0x9890x20[_0x9390[61]]= (_0x9890x20[_0x9390[61]][_0x9390[63]])?_0x9890x20[_0x9390[61]]:_0x9890x2e[_0x9390[52]];if(_0x9890x2d[_0x9390[57]][_0x9390[92]]){_0x9890x20[_0x9390[77]]= [{all:true}]};_0x9890x20= _[_0x9390[72]]({},_0x9890x20,_0x9890x2d[_0x9390[76]]);return db[_0x9390[54]][_0x9390[108]](_0x9890x20)[_0x9390[44]](handleEntityNotFound(_0x9890x1b,null))[_0x9390[44]](respondWithResult(_0x9890x1b,null))[_0x9390[90]](handleError(_0x9890x1b,null))};exports[_0x9390[109]]= function(_0x9890x2d,_0x9890x1b){return db[_0x9390[54]][_0x9390[109]](_0x9890x2d[_0x9390[110]],{})[_0x9390[44]](respondWithResult(_0x9890x1b,201))[_0x9390[90]](handleError(_0x9890x1b,null))};exports[_0x9390[45]]= function(_0x9890x2d,_0x9890x1b){if(_0x9890x2d[_0x9390[110]][_0x9390[81]]){delete _0x9890x2d[_0x9390[110]][_0x9390[81]]};return db[_0x9390[54]][_0x9390[108]]({where:{id:_0x9890x2d[_0x9390[107]][_0x9390[81]]}})[_0x9390[44]](handleEntityNotFound(_0x9890x1b,null))[_0x9390[44]](saveUpdates(_0x9890x2d[_0x9390[110]],null))[_0x9390[44]](respondWithResult(_0x9890x1b,null))[_0x9390[90]](handleError(_0x9890x1b,null))};exports[_0x9390[46]]= function(_0x9890x2d,_0x9890x1b){return db[_0x9390[54]][_0x9390[108]]({where:{id:_0x9890x2d[_0x9390[107]][_0x9390[81]]}})[_0x9390[44]](handleEntityNotFound(_0x9890x1b,null))[_0x9390[44]](removeEntity(_0x9890x1b,null))[_0x9390[90]](handleError(_0x9890x1b,null))};exports[_0x9390[111]]= function(_0x9890x2d,_0x9890x1b){return db[_0x9390[54]][_0x9390[111]]()[_0x9390[44]](respondWithResult(_0x9890x1b,null))[_0x9390[90]](handleError(_0x9890x1b,null))};exports[_0x9390[112]]= function(_0x9890x2d,_0x9890x1b,_0x9890x34){return db[_0x9390[85]][_0x9390[108]]({where:{id:_0x9890x2d[_0x9390[107]][_0x9390[81]]}})[_0x9390[44]](handleEntityNotFound(_0x9890x1b,null))[_0x9390[44]](function(_0x9890x1d){if(_0x9890x1d){return _0x9890x1d[_0x9390[112]](_0x9890x2d[_0x9390[110]][_0x9390[113]],_[_0x9390[114]](_0x9890x2d[_0x9390[110]],[_0x9390[113],_0x9390[81]])|| {})}})[_0x9390[44]](respondWithResult(_0x9890x1b,null))[_0x9390[90]](handleError(_0x9890x1b,null))};exports[_0x9390[115]]= function(_0x9890x2d,_0x9890x1b,_0x9890x34){var _0x9890x20={raw:false,where:{}};var _0x9890x2e={};var _0x9890x35={count:0,rows:[]};return db[_0x9390[54]][_0x9390[122]]({where:{id:_0x9890x2d[_0x9390[107]][_0x9390[81]]}})[_0x9390[44]](handleEntityNotFound(_0x9890x1b,null))[_0x9390[44]](function(_0x9890x1d){if(_0x9890x1d){_0x9890x2e[_0x9390[52]]= _[_0x9390[55]](db[_0x9390[85]][_0x9390[53]]);_0x9890x2e[_0x9390[57]]= _[_0x9390[55]](_0x9890x2d[_0x9390[57]]);_0x9890x2e[_0x9390[59]]= _[_0x9390[60]](_0x9890x2e[_0x9390[52]],_0x9890x2e[_0x9390[57]]);_0x9890x20[_0x9390[61]]= _[_0x9390[60]](_0x9890x2e[_0x9390[52]],qs[_0x9390[62]](_0x9890x2d[_0x9390[57]][_0x9390[62]]));_0x9890x20[_0x9390[61]]= (_0x9890x20[_0x9390[61]][_0x9390[63]])?_0x9890x20[_0x9390[61]]:_0x9890x2e[_0x9390[52]];if(!_0x9890x2d[_0x9390[57]][_0x9390[65]](_0x9390[64])){_0x9890x20[_0x9390[36]]= qs[_0x9390[36]](_0x9890x2d[_0x9390[57]][_0x9390[36]]);_0x9890x20[_0x9390[35]]= qs[_0x9390[35]](_0x9890x2d[_0x9390[57]][_0x9390[35]])};_0x9890x20[_0x9390[66]]= qs[_0x9390[67]](_0x9890x2d[_0x9390[57]][_0x9390[67]]);_0x9890x20[_0x9390[68]]= qs[_0x9390[59]](_[_0x9390[69]](_0x9890x2d[_0x9390[57]],_0x9890x2e[_0x9390[59]]));_0x9890x20[_0x9390[68]][_0x9390[116]]= _0x9890x1d[_0x9390[81]];if(_0x9890x2d[_0x9390[57]][_0x9390[73]]){_0x9890x20[_0x9390[68]]= _[_0x9390[72]](_0x9890x20[_0x9390[68]],{$or:_[_0x9390[75]](_0x9890x20[_0x9390[61]],function(_0x9890x31){var _0x9890x2f={};_0x9890x2f[_0x9890x31]= {$like:_0x9390[74]+ _0x9890x2d[_0x9390[57]][_0x9390[73]]+ _0x9390[74]};return _0x9890x2f})})};if(_0x9890x2d[_0x9390[57]][_0x9390[117]]){var _0x9890x36=_0x9890x2d[_0x9390[57]][_0x9390[117]][_0x9390[119]](_0x9390[118]);var _0x9890x2f={};_0x9890x2f[_0x9890x36[0]]= {$gte:moment(_0x9890x36[1])[_0x9390[121]](_0x9390[120])};_0x9890x20[_0x9390[68]]= _[_0x9390[72]](_0x9890x20[_0x9390[68]],_0x9890x2f)};_0x9890x20= _[_0x9390[72]]({},_0x9890x20,_0x9890x2d[_0x9390[76]]);return db[_0x9390[85]][_0x9390[34]]({where:_0x9890x20[_0x9390[68]]})[_0x9390[44]](function(_0x9890x21){_0x9890x35[_0x9390[34]]= _0x9890x21;if(_0x9890x2d[_0x9390[57]][_0x9390[92]]){_0x9890x20[_0x9390[77]]= [{all:true}]};return db[_0x9390[85]][_0x9390[105]](_0x9890x20)})[_0x9390[44]](function(_0x9890x33){_0x9890x35[_0x9390[91]]= _0x9890x33;return _0x9890x35})}})[_0x9390[44]](respondWithFilteredResult(_0x9890x1b,_0x9890x20))[_0x9390[90]](handleError(_0x9890x1b,null))};exports[_0x9390[123]]= function(_0x9890x2d,_0x9890x1b,_0x9890x34){return db[_0x9390[54]][_0x9390[108]]({where:{id:_0x9890x2d[_0x9390[107]][_0x9390[81]]}})[_0x9390[44]](handleEntityNotFound(_0x9890x1b,null))[_0x9390[44]](function(_0x9890x1d){if(_0x9890x1d){return _0x9890x1d[_0x9390[127]](_0x9890x2d[_0x9390[110]][_0x9390[113]],_[_0x9390[114]](_0x9890x2d[_0x9390[110]],[_0x9390[113],_0x9390[81]])|| {})[_0x9390[126]](function(){return db[_0x9390[79]][_0x9390[105]]({attributes:[_0x9390[81],_0x9390[49],_0x9390[103]],where:{id:_0x9890x2d[_0x9390[110]][_0x9390[113]]}})})[_0x9390[44]](function(_0x9890x37){socket[_0x9390[125]](_0x9390[124],{id:Number(_0x9890x2d[_0x9390[107]][_0x9390[81]]),tags:_0x9890x37|| []});return {id:Number(_0x9890x2d[_0x9390[107]][_0x9390[81]]),tags:_0x9890x37|| []}})}})[_0x9390[44]](respondWithResult(_0x9890x1b,null))[_0x9390[90]](handleError(_0x9890x1b,null))};exports[_0x9390[128]]= function(_0x9890x2d,_0x9890x1b,_0x9890x34){var _0x9890x38;return db[_0x9390[54]][_0x9390[108]]({where:{id:_0x9890x2d[_0x9390[107]][_0x9390[81]]}})[_0x9390[44]](handleEntityNotFound(_0x9890x1b,null))[_0x9390[44]](function(_0x9890x1d){if(_0x9890x1d){return _0x9890x1d[_0x9390[128]](_0x9890x2d[_0x9390[57]][_0x9390[113]])}})[_0x9390[44]](respondWithStatusCode(_0x9890x1b,null))[_0x9390[90]](handleError(_0x9890x1b,null))}
\ No newline at end of file
index 1578adb..80f107d 100644 (file)
@@ -1 +1 @@
-var _0xc32c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xc32c[0];var EventEmitter=require(_0xc32c[1]);var OpenchannelInteraction=require(_0xc32c[4])[_0xc32c[3]][_0xc32c[2]];var OpenchannelInteractionEvents= new EventEmitter();OpenchannelInteractionEvents[_0xc32c[5]](0);var events={afterCreate:_0xc32c[6],afterUpdate:_0xc32c[7],afterDestroy:_0xc32c[8]};function emitEvent(event){return function(_0xc290x7,_0xc290x8,_0xc290x9){OpenchannelInteractionEvents[_0xc32c[11]](event+ _0xc32c[9]+ _0xc290x7[_0xc32c[10]],_0xc290x7);OpenchannelInteractionEvents[_0xc32c[11]](event,_0xc290x7);_0xc290x9(null)}}for(var e in events){if(events[_0xc32c[12]](e)){var event=events[e];OpenchannelInteraction[_0xc32c[13]](e,emitEvent(event))}};module[_0xc32c[14]]= OpenchannelInteractionEvents
\ No newline at end of file
+var _0xe20a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xe20a[0];var EventEmitter=require(_0xe20a[1]);var OpenchannelInteraction=require(_0xe20a[4])[_0xe20a[3]][_0xe20a[2]];var OpenchannelInteractionEvents= new EventEmitter();OpenchannelInteractionEvents[_0xe20a[5]](0);var events={afterCreate:_0xe20a[6],afterUpdate:_0xe20a[7],afterDestroy:_0xe20a[8]};function emitEvent(event){return function(_0x2180x7,_0x2180x8,_0x2180x9){OpenchannelInteractionEvents[_0xe20a[11]](event+ _0xe20a[9]+ _0x2180x7[_0xe20a[10]],_0x2180x7);OpenchannelInteractionEvents[_0xe20a[11]](event,_0x2180x7);_0x2180x9(null)}}for(var e in events){if(events[_0xe20a[12]](e)){var event=events[e];OpenchannelInteraction[_0xe20a[13]](e,emitEvent(event))}};module[_0xe20a[14]]= OpenchannelInteractionEvents
\ No newline at end of file
index 8ee2f42..5ac6828 100644 (file)
@@ -1 +1 @@
-var _0x667a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x667a[0];var _=require(_0x667a[1]);var util=require(_0x667a[2]);var logger=require(_0x667a[4])(_0x667a[3]);var moment=require(_0x667a[5]);var BPromise=require(_0x667a[6]);var rp=require(_0x667a[7]);var attributes=require(_0x667a[8]);module[_0x667a[9]]= function(_0x6718x8,_0x6718x9){return _0x6718x8[_0x667a[12]](_0x667a[10],attributes,{tableName:_0x667a[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x490b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x490b[0];var _=require(_0x490b[1]);var util=require(_0x490b[2]);var logger=require(_0x490b[4])(_0x490b[3]);var moment=require(_0x490b[5]);var BPromise=require(_0x490b[6]);var rp=require(_0x490b[7]);var attributes=require(_0x490b[8]);module[_0x490b[9]]= function(_0x4fb9x8,_0x4fb9x9){return _0x4fb9x8[_0x490b[12]](_0x490b[10],attributes,{tableName:_0x490b[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 57121c1..ba96ba9 100644 (file)
@@ -1 +1 @@
-var _0x3c0c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E"];_0x3c0c[0];var _=require(_0x3c0c[1]);var util=require(_0x3c0c[2]);var moment=require(_0x3c0c[3]);var BPromise=require(_0x3c0c[4]);var rs=require(_0x3c0c[5]);var fs=require(_0x3c0c[6]);var db=require(_0x3c0c[8])[_0x3c0c[7]];var utils=require(_0x3c0c[9]);var logger=require(_0x3c0c[11])(_0x3c0c[10]);var config=require(_0x3c0c[12]);var jayson=require(_0x3c0c[13]);var client=jayson[_0x3c0c[15]][_0x3c0c[14]]({port:9002});var socket=require(_0x3c0c[17])({host:_0x3c0c[16],port:6379});require(_0x3c0c[19])[_0x3c0c[18]](socket);function respondWithRpcPromise(_0xa748xf,_0xa748x10,_0xa748x11){return  new BPromise(function(_0xa748x12,_0xa748x13){return client[_0x3c0c[32]](_0xa748xf,_0xa748x11)[_0x3c0c[31]](function(_0xa748x15){logger[_0x3c0c[24]](_0x3c0c[20],_0xa748x10,_0x3c0c[23]);logger[_0x3c0c[27]](_0x3c0c[25],_0xa748x10,_0x3c0c[23],JSON[_0x3c0c[26]](_0xa748x15));if(_0xa748x15[_0x3c0c[21]]){if(_0xa748x15[_0x3c0c[21]][_0x3c0c[28]]=== 500){logger[_0x3c0c[21]](_0x3c0c[20],_0xa748x10,_0xa748x15[_0x3c0c[21]][_0x3c0c[29]]);return _0xa748x13(_0xa748x15[_0x3c0c[21]][_0x3c0c[29]])};logger[_0x3c0c[21]](_0x3c0c[20],_0xa748x10,_0xa748x15[_0x3c0c[21]][_0x3c0c[29]]);return _0xa748x12(_0xa748x15[_0x3c0c[21]][_0x3c0c[29]])}else {logger[_0x3c0c[24]](_0x3c0c[20],_0xa748x10,_0x3c0c[23]);_0xa748x12(_0xa748x15[_0x3c0c[30]][_0x3c0c[29]])}})[_0x3c0c[22]](function(_0xa748x14){logger[_0x3c0c[21]](_0x3c0c[20],_0xa748x10,_0xa748x14);_0xa748x13(_0xa748x14)})})}exports[_0x3c0c[33]]= function(_0xa748x11){var _0xa748x16=this;return  new Promise(function(_0xa748x12,_0xa748x13){return db[_0x3c0c[41]][_0x3c0c[40]](_0xa748x11[_0x3c0c[34]],{raw:_0xa748x11[_0x3c0c[35]]?(_0xa748x11[_0x3c0c[35]][_0x3c0c[36]]=== undefined)?true:false:true,individualHooks:true,where:_0xa748x11[_0x3c0c[35]]?_0xa748x11[_0x3c0c[35]][_0x3c0c[37]]|| null:null,attributes:_0xa748x11[_0x3c0c[35]]?_0xa748x11[_0x3c0c[35]][_0x3c0c[38]]|| null:null,limit:_0xa748x11[_0x3c0c[35]]?_0xa748x11[_0x3c0c[35]][_0x3c0c[39]]|| null:null})[_0x3c0c[31]](function(_0xa748x15){logger[_0x3c0c[24]](_0x3c0c[33],_0xa748x11);logger[_0x3c0c[27]](_0x3c0c[33],_0xa748x11,JSON[_0x3c0c[26]](_0xa748x15));_0xa748x12(_0xa748x15)})[_0x3c0c[22]](function(_0xa748x14){logger[_0x3c0c[21]](_0x3c0c[33],_0xa748x14[_0x3c0c[29]],_0xa748x11);_0xa748x13(_0xa748x16[_0x3c0c[21]](500,_0xa748x14[_0x3c0c[29]]))})})}
\ No newline at end of file
+var _0x5758=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E"];_0x5758[0];var _=require(_0x5758[1]);var util=require(_0x5758[2]);var moment=require(_0x5758[3]);var BPromise=require(_0x5758[4]);var rs=require(_0x5758[5]);var fs=require(_0x5758[6]);var db=require(_0x5758[8])[_0x5758[7]];var utils=require(_0x5758[9]);var logger=require(_0x5758[11])(_0x5758[10]);var config=require(_0x5758[12]);var jayson=require(_0x5758[13]);var client=jayson[_0x5758[15]][_0x5758[14]]({port:9002});var socket=require(_0x5758[17])({host:_0x5758[16],port:6379});require(_0x5758[19])[_0x5758[18]](socket);function respondWithRpcPromise(_0xbbf7xf,_0xbbf7x10,_0xbbf7x11){return  new BPromise(function(_0xbbf7x12,_0xbbf7x13){return client[_0x5758[32]](_0xbbf7xf,_0xbbf7x11)[_0x5758[31]](function(_0xbbf7x15){logger[_0x5758[24]](_0x5758[20],_0xbbf7x10,_0x5758[23]);logger[_0x5758[27]](_0x5758[25],_0xbbf7x10,_0x5758[23],JSON[_0x5758[26]](_0xbbf7x15));if(_0xbbf7x15[_0x5758[21]]){if(_0xbbf7x15[_0x5758[21]][_0x5758[28]]=== 500){logger[_0x5758[21]](_0x5758[20],_0xbbf7x10,_0xbbf7x15[_0x5758[21]][_0x5758[29]]);return _0xbbf7x13(_0xbbf7x15[_0x5758[21]][_0x5758[29]])};logger[_0x5758[21]](_0x5758[20],_0xbbf7x10,_0xbbf7x15[_0x5758[21]][_0x5758[29]]);return _0xbbf7x12(_0xbbf7x15[_0x5758[21]][_0x5758[29]])}else {logger[_0x5758[24]](_0x5758[20],_0xbbf7x10,_0x5758[23]);_0xbbf7x12(_0xbbf7x15[_0x5758[30]][_0x5758[29]])}})[_0x5758[22]](function(_0xbbf7x14){logger[_0x5758[21]](_0x5758[20],_0xbbf7x10,_0xbbf7x14);_0xbbf7x13(_0xbbf7x14)})})}exports[_0x5758[33]]= function(_0xbbf7x11){var _0xbbf7x16=this;return  new Promise(function(_0xbbf7x12,_0xbbf7x13){return db[_0x5758[41]][_0x5758[40]](_0xbbf7x11[_0x5758[34]],{raw:_0xbbf7x11[_0x5758[35]]?(_0xbbf7x11[_0x5758[35]][_0x5758[36]]=== undefined)?true:false:true,individualHooks:true,where:_0xbbf7x11[_0x5758[35]]?_0xbbf7x11[_0x5758[35]][_0x5758[37]]|| null:null,attributes:_0xbbf7x11[_0x5758[35]]?_0xbbf7x11[_0x5758[35]][_0x5758[38]]|| null:null,limit:_0xbbf7x11[_0x5758[35]]?_0xbbf7x11[_0x5758[35]][_0x5758[39]]|| null:null})[_0x5758[31]](function(_0xbbf7x15){logger[_0x5758[24]](_0x5758[33],_0xbbf7x11);logger[_0x5758[27]](_0x5758[33],_0xbbf7x11,JSON[_0x5758[26]](_0xbbf7x15));_0xbbf7x12(_0xbbf7x15)})[_0x5758[22]](function(_0xbbf7x14){logger[_0x5758[21]](_0x5758[33],_0xbbf7x14[_0x5758[29]],_0xbbf7x11);_0xbbf7x13(_0xbbf7x16[_0x5758[21]](500,_0xbbf7x14[_0x5758[29]]))})})}
\ No newline at end of file
index cb1311d..79aa1ac 100644 (file)
@@ -1 +1 @@
-var _0x18f3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A","\x6F\x6E"];_0x18f3[0];var OpenchannelInteractionEvents=require(_0x18f3[1]);var events=[_0x18f3[2],_0x18f3[3],_0x18f3[4]];function createListener(_0x5ba9x4,_0x5ba9x5){return function(_0x5ba9x6){_0x5ba9x5[_0x18f3[5]](_0x5ba9x4,_0x5ba9x6)}}function removeListener(_0x5ba9x4,_0x5ba9x8){return function(){OpenchannelInteractionEvents[_0x18f3[6]](_0x5ba9x4,_0x5ba9x8)}}exports[_0x18f3[7]]= function(_0x5ba9x5){for(var _0x5ba9x9=0,_0x5ba9xa=events[_0x18f3[8]];_0x5ba9x9< _0x5ba9xa;_0x5ba9x9++){var _0x5ba9x4=events[_0x5ba9x9];var _0x5ba9x8=createListener(_0x18f3[9]+ _0x5ba9x4,_0x5ba9x5);OpenchannelInteractionEvents[_0x18f3[10]](_0x5ba9x4,_0x5ba9x8)}}
\ No newline at end of file
+var _0x13c5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A","\x6F\x6E"];_0x13c5[0];var OpenchannelInteractionEvents=require(_0x13c5[1]);var events=[_0x13c5[2],_0x13c5[3],_0x13c5[4]];function createListener(_0xdb3fx4,_0xdb3fx5){return function(_0xdb3fx6){_0xdb3fx5[_0x13c5[5]](_0xdb3fx4,_0xdb3fx6)}}function removeListener(_0xdb3fx4,_0xdb3fx8){return function(){OpenchannelInteractionEvents[_0x13c5[6]](_0xdb3fx4,_0xdb3fx8)}}exports[_0x13c5[7]]= function(_0xdb3fx5){for(var _0xdb3fx9=0,_0xdb3fxa=events[_0x13c5[8]];_0xdb3fx9< _0xdb3fxa;_0xdb3fx9++){var _0xdb3fx4=events[_0xdb3fx9];var _0xdb3fx8=createListener(_0x13c5[9]+ _0xdb3fx4,_0xdb3fx5);OpenchannelInteractionEvents[_0x13c5[10]](_0xdb3fx4,_0xdb3fx8)}}
\ No newline at end of file
index 18a6efa..d2c09b8 100644 (file)
@@ -1 +1 @@
-var _0x5227=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x6D\x65\x73\x73\x61\x67\x65\x3A\x63\x72\x65\x61\x74\x65","\x74\x72\x61\x63\x6B\x65\x64","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74","\x61\x63\x63\x65\x70\x74","\x2F\x3A\x69\x64\x2F\x72\x65\x6A\x65\x63\x74","\x72\x65\x6A\x65\x63\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x5227[0];var multer=require(_0x5227[1]);var util=require(_0x5227[2]);var path=require(_0x5227[3]);var express=require(_0x5227[4]);var router=express.Router();var auth=require(_0x5227[5]);var interaction=require(_0x5227[6]);var config=require(_0x5227[7]);var controller=require(_0x5227[8]);router[_0x5227[12]](_0x5227[9],auth[_0x5227[10]](),controller[_0x5227[11]]);router[_0x5227[12]](_0x5227[13],auth[_0x5227[10]](),controller[_0x5227[14]]);router[_0x5227[12]](_0x5227[15],auth[_0x5227[10]](),controller[_0x5227[16]]);router[_0x5227[21]](_0x5227[9],auth[_0x5227[10]](),interaction[_0x5227[19]](_0x5227[17],_0x5227[18]),controller[_0x5227[20]]);router[_0x5227[23]](_0x5227[15],auth[_0x5227[10]](),controller[_0x5227[22]]);router[_0x5227[23]](_0x5227[24],auth[_0x5227[10]](),controller[_0x5227[25]]);router[_0x5227[23]](_0x5227[26],auth[_0x5227[10]](),controller[_0x5227[27]]);router[_0x5227[29]](_0x5227[15],auth[_0x5227[10]](),controller[_0x5227[28]]);module[_0x5227[30]]= router
\ No newline at end of file
+var _0x6e3b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x6D\x65\x73\x73\x61\x67\x65\x3A\x63\x72\x65\x61\x74\x65","\x74\x72\x61\x63\x6B\x65\x64","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74","\x61\x63\x63\x65\x70\x74","\x2F\x3A\x69\x64\x2F\x72\x65\x6A\x65\x63\x74","\x72\x65\x6A\x65\x63\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6e3b[0];var multer=require(_0x6e3b[1]);var util=require(_0x6e3b[2]);var path=require(_0x6e3b[3]);var express=require(_0x6e3b[4]);var router=express.Router();var auth=require(_0x6e3b[5]);var interaction=require(_0x6e3b[6]);var config=require(_0x6e3b[7]);var controller=require(_0x6e3b[8]);router[_0x6e3b[12]](_0x6e3b[9],auth[_0x6e3b[10]](),controller[_0x6e3b[11]]);router[_0x6e3b[12]](_0x6e3b[13],auth[_0x6e3b[10]](),controller[_0x6e3b[14]]);router[_0x6e3b[12]](_0x6e3b[15],auth[_0x6e3b[10]](),controller[_0x6e3b[16]]);router[_0x6e3b[21]](_0x6e3b[9],auth[_0x6e3b[10]](),interaction[_0x6e3b[19]](_0x6e3b[17],_0x6e3b[18]),controller[_0x6e3b[20]]);router[_0x6e3b[23]](_0x6e3b[15],auth[_0x6e3b[10]](),controller[_0x6e3b[22]]);router[_0x6e3b[23]](_0x6e3b[24],auth[_0x6e3b[10]](),controller[_0x6e3b[25]]);router[_0x6e3b[23]](_0x6e3b[26],auth[_0x6e3b[10]](),controller[_0x6e3b[27]]);router[_0x6e3b[29]](_0x6e3b[15],auth[_0x6e3b[10]](),controller[_0x6e3b[28]]);module[_0x6e3b[30]]= router
\ No newline at end of file
index 830145d..bfb6181 100644 (file)
@@ -1 +1 @@
-var _0xc089=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x65\x64\x69\x75\x6D","\x42\x4F\x4F\x4C\x45\x41\x4E","\x69\x6E","\x6F\x75\x74","\x44\x41\x54\x45"];_0xc089[0];var Sequelize=require(_0xc089[1]);module[_0xc089[2]]= {body:{type:Sequelize.TEXT(_0xc089[3]),allowNull:false},read:{type:Sequelize[_0xc089[4]],defaultValue:false},secret:{type:Sequelize[_0xc089[4]],defaultValue:false},direction:{type:Sequelize.ENUM(_0xc089[5],_0xc089[6]),defaultValue:_0xc089[6],allowNull:false},readAt:{type:Sequelize[_0xc089[7]]}}
\ No newline at end of file
+var _0x1a27=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x65\x64\x69\x75\x6D","\x42\x4F\x4F\x4C\x45\x41\x4E","\x69\x6E","\x6F\x75\x74","\x44\x41\x54\x45"];_0x1a27[0];var Sequelize=require(_0x1a27[1]);module[_0x1a27[2]]= {body:{type:Sequelize.TEXT(_0x1a27[3]),allowNull:false},read:{type:Sequelize[_0x1a27[4]],defaultValue:false},secret:{type:Sequelize[_0x1a27[4]],defaultValue:false},direction:{type:Sequelize.ENUM(_0x1a27[5],_0x1a27[6]),defaultValue:_0x1a27[6],allowNull:false},readAt:{type:Sequelize[_0x1a27[7]]}}
\ No newline at end of file
index e4c8c49..b6aa2be 100644 (file)
@@ -1 +1 @@
-var _0xebd7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x61\x63\x63\x65\x70\x74","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x72\x65\x61\x64","\x72\x65\x61\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x55\x73\x65\x72\x49\x64","\x75\x73\x65\x72","\x6D\x61\x6E\x75\x61\x6C","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x53\x49\x50\x2F\x25\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x65\x76\x65\x6E\x74","\x45\x76\x65\x6E\x74\x4D\x61\x6E\x61\x67\x65\x72","\x61\x63\x63\x65\x70\x74\x6D\x65\x73\x73\x61\x67\x65","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74","\x5B\x4F\x50\x45\x4E\x43\x48\x41\x4E\x4E\x45\x4C\x4D\x45\x53\x53\x41\x47\x45\x3A\x41\x43\x43\x45\x50\x54\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x72\x6F\x6C\x65","\x6E\x75\x6C\x6C","\x41\x63\x63\x65\x70\x74\x4D\x65\x73\x73\x61\x67\x65","\x61\x63\x63\x65\x70\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x61\x64\x31\x73\x74\x41\x74","\x69\x73\x4E\x69\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x61\x67\x65\x6E\x74","\x72\x65\x6A\x65\x63\x74\x6D\x65\x73\x73\x61\x67\x65","\x5B\x4F\x50\x45\x4E\x43\x48\x41\x4E\x4E\x45\x4C\x4D\x45\x53\x53\x41\x47\x45\x3A\x52\x45\x4A\x45\x43\x54\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x52\x65\x6A\x65\x63\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x6A\x65\x63\x74\x4D\x65\x73\x73\x61\x67\x65"];_0xebd7[0];var jsonpatch=require(_0xebd7[1]);var rp=require(_0xebd7[2]);var moment=require(_0xebd7[3]);var BPromise=require(_0xebd7[4]);var Mustache=require(_0xebd7[5]);var util=require(_0xebd7[6]);var path=require(_0xebd7[7]);var sox=require(_0xebd7[8]);var csv=require(_0xebd7[9]);var ejs=require(_0xebd7[10]);var fs=require(_0xebd7[11]);var _=require(_0xebd7[12]);var squel=require(_0xebd7[13]);var crypto=require(_0xebd7[14]);var jsforce=require(_0xebd7[15]);var deskjs=require(_0xebd7[16]);var toCsv=require(_0xebd7[9]);var querystring=require(_0xebd7[17]);var Papa=require(_0xebd7[18]);var qs=require(_0xebd7[19]);var logger=require(_0xebd7[21])(_0xebd7[20]);var utils=require(_0xebd7[22]);var config=require(_0xebd7[23]);var db=require(_0xebd7[25])[_0xebd7[24]];var socket=require(_0xebd7[27])({host:_0xebd7[26],port:6379});require(_0xebd7[29])[_0xebd7[28]](socket);var jayson=require(_0xebd7[30]);var client=jayson[_0xebd7[32]][_0xebd7[31]]({port:9004});var client9002=jayson[_0xebd7[32]][_0xebd7[31]]({port:9002});function respondWithRpcPromise(_0x36d9x1e,_0x36d9x1f,_0x36d9x20,_0x36d9x21){return  new BPromise(function(_0x36d9x22,_0x36d9x23){var _0x36d9x24=(_0x36d9x21|| client);return _0x36d9x24[_0xebd7[45]](_0x36d9x1e,_0x36d9x20)[_0xebd7[44]](function(_0x36d9x26){logger[_0xebd7[37]](_0xebd7[33],_0x36d9x1f,_0xebd7[36]);logger[_0xebd7[40]](_0xebd7[38],_0x36d9x1f,_0xebd7[36],JSON[_0xebd7[39]](_0x36d9x26));if(_0x36d9x26[_0xebd7[34]]){if(_0x36d9x26[_0xebd7[34]][_0xebd7[41]]=== 500){logger[_0xebd7[34]](_0xebd7[33],_0x36d9x1f,_0x36d9x26[_0xebd7[34]][_0xebd7[42]]);return _0x36d9x23(_0x36d9x26[_0xebd7[34]][_0xebd7[42]])};logger[_0xebd7[34]](_0xebd7[33],_0x36d9x1f,_0x36d9x26[_0xebd7[34]][_0xebd7[42]]);return _0x36d9x22(_0x36d9x26[_0xebd7[34]][_0xebd7[42]])}else {logger[_0xebd7[37]](_0xebd7[33],_0x36d9x1f,_0xebd7[36]);_0x36d9x22(_0x36d9x26[_0xebd7[43]][_0xebd7[42]])}})[_0xebd7[35]](function(_0x36d9x25){logger[_0xebd7[34]](_0xebd7[33],_0x36d9x1f,_0x36d9x25);_0x36d9x23(_0x36d9x25)})})}function respondWithStatusCode(_0x36d9x26,_0x36d9x28){_0x36d9x28= _0x36d9x28|| 204;return function(_0x36d9x29){if(_0x36d9x29){return _0x36d9x26[_0xebd7[46]](_0x36d9x28)};return _0x36d9x26[_0xebd7[48]](_0x36d9x28)[_0xebd7[47]]()}}function respondWithResult(_0x36d9x26,_0x36d9x28){_0x36d9x28= _0x36d9x28|| 200;return function(_0x36d9x29){if(_0x36d9x29){return _0x36d9x26[_0xebd7[48]](_0x36d9x28)[_0xebd7[49]](_0x36d9x29)}}}function respondWithFilteredResult(_0x36d9x26,_0x36d9x2c){return function(_0x36d9x29){if(_0x36d9x29){var _0x36d9x2d=_0x36d9x29[_0xebd7[50]],_0x36d9x2e=_0x36d9x2c[_0xebd7[51]],_0x36d9x2f=_0x36d9x2c[_0xebd7[51]]+ _0x36d9x2c[_0xebd7[52]],_0x36d9x28;if(_0x36d9x2f>= _0x36d9x2d){_0x36d9x2f= _0x36d9x2d;_0x36d9x28= 200}else {_0x36d9x28= 206};_0x36d9x26[_0xebd7[48]](_0x36d9x28);return _0x36d9x26[_0xebd7[56]](_0xebd7[53],_0x36d9x2e+ _0xebd7[54]+ _0x36d9x2f+ _0xebd7[55]+ _0x36d9x2d)[_0xebd7[49]](_0x36d9x29)};return null}}function patchUpdates(_0x36d9x31){return function(_0x36d9x29){try{jsonpatch[_0xebd7[57]](_0x36d9x29,_0x36d9x31,true)}catch(err){return BPromise[_0xebd7[58]](err)};return _0x36d9x29[_0xebd7[59]]()}}function saveUpdates(_0x36d9x33,_0x36d9x28){return function(_0x36d9x29){if(_0x36d9x29){return _0x36d9x29[_0xebd7[60]](_0x36d9x33)[_0xebd7[44]](function(_0x36d9x34){return _0x36d9x34})};return null}}function removeEntity(_0x36d9x26,_0x36d9x28){return function(_0x36d9x29){if(_0x36d9x29){return _0x36d9x29[_0xebd7[61]]()[_0xebd7[44]](function(){_0x36d9x26[_0xebd7[48]](204)[_0xebd7[47]]()})}}}function handleEntityNotFound(_0x36d9x26,_0x36d9x28){return function(_0x36d9x29){if(!_0x36d9x29){_0x36d9x26[_0xebd7[46]](404)};return _0x36d9x29}}function handleError(_0x36d9x26,_0x36d9x28){_0x36d9x28= _0x36d9x28|| 500;return function(_0x36d9x25){logger[_0xebd7[34]](_0x36d9x25[_0xebd7[62]]);if(_0x36d9x25[_0xebd7[63]]){delete _0x36d9x25[_0xebd7[63]]};_0x36d9x26[_0xebd7[48]](_0x36d9x28)[_0xebd7[64]](_0x36d9x25)}}exports[_0xebd7[65]]= function(_0x36d9x20,_0x36d9x26){var _0x36d9x2c={},_0x36d9x38={},_0x36d9x39={count:0,rows:[]};_0x36d9x38[_0xebd7[66]]= _[_0xebd7[69]](db[_0xebd7[68]][_0xebd7[67]]);var _0x36d9x3a={dateStart:_0x36d9x20[_0xebd7[71]][_0xebd7[70]],dateEnd:_0x36d9x20[_0xebd7[71]][_0xebd7[72]]};delete _0x36d9x20[_0xebd7[71]][_0xebd7[70]];delete _0x36d9x20[_0xebd7[71]][_0xebd7[72]];_0x36d9x38[_0xebd7[71]]= _[_0xebd7[69]](_0x36d9x20[_0xebd7[71]]);_0x36d9x38[_0xebd7[73]]= _[_0xebd7[74]](_0x36d9x38[_0xebd7[66]],_0x36d9x38[_0xebd7[71]]);_0x36d9x2c[_0xebd7[75]]= _[_0xebd7[74]](_0x36d9x38[_0xebd7[66]],qs[_0xebd7[76]](_0x36d9x20[_0xebd7[71]][_0xebd7[76]]));_0x36d9x2c[_0xebd7[75]]= (_0x36d9x2c[_0xebd7[75]][_0xebd7[77]])?_0x36d9x2c[_0xebd7[75]]:_0x36d9x38[_0xebd7[66]];if(!_0x36d9x20[_0xebd7[71]][_0xebd7[79]](_0xebd7[78])){_0x36d9x2c[_0xebd7[52]]= qs[_0xebd7[52]](_0x36d9x20[_0xebd7[71]][_0xebd7[52]]);_0x36d9x2c[_0xebd7[51]]= qs[_0xebd7[51]](_0x36d9x20[_0xebd7[71]][_0xebd7[51]])};_0x36d9x2c[_0xebd7[80]]= qs[_0xebd7[81]](_0x36d9x20[_0xebd7[71]][_0xebd7[81]]);_0x36d9x2c[_0xebd7[82]]= qs[_0xebd7[73]](_[_0xebd7[83]](_0x36d9x20[_0xebd7[71]],_0x36d9x38[_0xebd7[73]]));if(_0x36d9x3a[_0xebd7[70]]){if(_0x36d9x3a[_0xebd7[72]]){_0x36d9x3a[_0xebd7[72]]= moment(_0x36d9x3a[_0xebd7[72]])[_0xebd7[85]](1,_0xebd7[84])}else {_0x36d9x3a[_0xebd7[72]]= moment(_0x36d9x3a[_0xebd7[70]])[_0xebd7[85]](1,_0xebd7[84])};_[_0xebd7[86]](_0x36d9x2c[_0xebd7[82]],{createdAt:{$gte:_0x36d9x3a[_0xebd7[70]],$lte:_0x36d9x3a[_0xebd7[72]]}})};if(_0x36d9x20[_0xebd7[71]][_0xebd7[87]]){_0x36d9x2c[_0xebd7[82]]= _[_0xebd7[86]](_0x36d9x2c[_0xebd7[82]],{$or:_[_0xebd7[89]](_0x36d9x2c[_0xebd7[75]],function(_0x36d9x3b){var _0x36d9x39={};_0x36d9x39[_0x36d9x3b]= {$like:_0xebd7[88]+ _0x36d9x20[_0xebd7[71]][_0xebd7[87]]+ _0xebd7[88]};return _0x36d9x39})})};_0x36d9x2c= _[_0xebd7[86]]({},_0x36d9x2c,_0x36d9x20[_0xebd7[90]]);var _0x36d9x3c={where:_0x36d9x2c[_0xebd7[82]]};return db[_0xebd7[68]][_0xebd7[50]](_0x36d9x3c)[_0xebd7[44]](function(_0x36d9x2d){_0x36d9x39[_0xebd7[50]]= _0x36d9x2d;if(_0x36d9x20[_0xebd7[71]][_0xebd7[92]]){_0x36d9x2c[_0xebd7[93]]= [{all:true}]};return db[_0xebd7[68]][_0xebd7[94]](_0x36d9x2c)})[_0xebd7[44]](function(_0x36d9x3d){_0x36d9x39[_0xebd7[91]]= _0x36d9x3d;return _0x36d9x39})[_0xebd7[44]](respondWithFilteredResult(_0x36d9x26,_0x36d9x2c))[_0xebd7[35]](handleError(_0x36d9x26,null))};exports[_0xebd7[95]]= function(_0x36d9x20,_0x36d9x26){var _0x36d9x2c={raw:true,where:{id:_0x36d9x20[_0xebd7[97]][_0xebd7[96]]}},_0x36d9x38={};_0x36d9x38[_0xebd7[66]]= _[_0xebd7[69]](db[_0xebd7[68]][_0xebd7[67]]);_0x36d9x38[_0xebd7[71]]= _[_0xebd7[69]](_0x36d9x20[_0xebd7[71]]);_0x36d9x38[_0xebd7[73]]= _[_0xebd7[74]](_0x36d9x38[_0xebd7[66]],_0x36d9x38[_0xebd7[71]]);_0x36d9x2c[_0xebd7[75]]= _[_0xebd7[74]](_0x36d9x38[_0xebd7[66]],qs[_0xebd7[76]](_0x36d9x20[_0xebd7[71]][_0xebd7[76]]));_0x36d9x2c[_0xebd7[75]]= (_0x36d9x2c[_0xebd7[75]][_0xebd7[77]])?_0x36d9x2c[_0xebd7[75]]:_0x36d9x38[_0xebd7[66]];if(_0x36d9x20[_0xebd7[71]][_0xebd7[92]]){_0x36d9x2c[_0xebd7[93]]= [{all:true}]};_0x36d9x2c= _[_0xebd7[86]]({},_0x36d9x2c,_0x36d9x20[_0xebd7[90]]);return db[_0xebd7[68]][_0xebd7[98]](_0x36d9x2c)[_0xebd7[44]](handleEntityNotFound(_0x36d9x26,null))[_0xebd7[44]](respondWithResult(_0x36d9x26,null))[_0xebd7[35]](handleError(_0x36d9x26,null))};exports[_0xebd7[99]]= function(_0x36d9x20,_0x36d9x26){return db[_0xebd7[68]][_0xebd7[99]](_0x36d9x20[_0xebd7[100]],{})[_0xebd7[44]](respondWithResult(_0x36d9x26,201))[_0xebd7[35]](handleError(_0x36d9x26,null))};exports[_0xebd7[60]]= function(_0x36d9x20,_0x36d9x26){if(_0x36d9x20[_0xebd7[100]][_0xebd7[96]]){delete _0x36d9x20[_0xebd7[100]][_0xebd7[96]]};return db[_0xebd7[68]][_0xebd7[98]]({where:{id:_0x36d9x20[_0xebd7[97]][_0xebd7[96]]}})[_0xebd7[44]](handleEntityNotFound(_0x36d9x26,null))[_0xebd7[44]](saveUpdates(_0x36d9x20[_0xebd7[100]],null))[_0xebd7[44]](respondWithResult(_0x36d9x26,null))[_0xebd7[35]](handleError(_0x36d9x26,null))};exports[_0xebd7[61]]= function(_0x36d9x20,_0x36d9x26){return db[_0xebd7[68]][_0xebd7[98]]({where:{id:_0x36d9x20[_0xebd7[97]][_0xebd7[96]]}})[_0xebd7[44]](handleEntityNotFound(_0x36d9x26,null))[_0xebd7[44]](removeEntity(_0x36d9x26,null))[_0xebd7[35]](handleError(_0x36d9x26,null))};exports[_0xebd7[101]]= function(_0x36d9x20,_0x36d9x26){return db[_0xebd7[68]][_0xebd7[101]]()[_0xebd7[44]](respondWithResult(_0x36d9x26,null))[_0xebd7[35]](handleError(_0x36d9x26,null))};var interaction_log=require(_0xebd7[21])(_0xebd7[102]);exports[_0xebd7[103]]= function(_0x36d9x20,_0x36d9x26,_0x36d9x3f){var _0x36d9x40={channel:_0xebd7[104]};if(_0x36d9x20[_0xebd7[100]][_0xebd7[96]]){delete _0x36d9x20[_0xebd7[100]][_0xebd7[96]]};_0x36d9x20[_0xebd7[100]][_0xebd7[105]]= true;_0x36d9x20[_0xebd7[100]][_0xebd7[106]]= moment()[_0xebd7[108]](_0xebd7[107]);_0x36d9x20[_0xebd7[100]][_0xebd7[109]]= _0x36d9x20[_0xebd7[100]][_0xebd7[109]]|| _0x36d9x20[_0xebd7[110]][_0xebd7[96]];return db[_0xebd7[68]][_0xebd7[98]]({where:{id:_0x36d9x20[_0xebd7[97]][_0xebd7[96]],UserId:null},include:[{model:db[_0xebd7[129]],as:_0xebd7[130]}]})[_0xebd7[44]](handleEntityNotFound(_0x36d9x26,null))[_0xebd7[44]](saveUpdates(_0x36d9x20[_0xebd7[100]],null))[_0xebd7[44]](function(_0x36d9x29){if(_0x36d9x29){_0x36d9x40[_0xebd7[42]]= _0x36d9x29[_0xebd7[119]]({plain:true});return db[_0xebd7[128]][_0xebd7[98]]({where:{id:_0x36d9x29[_0xebd7[127]]}})};return null})[_0xebd7[44]](handleEntityNotFound(_0x36d9x26,null))[_0xebd7[44]](function(_0x36d9x29){if(_0x36d9x29){return _0x36d9x29[_0xebd7[60]]({UserId:_0x36d9x20[_0xebd7[100]][_0xebd7[109]],read1stAt:_[_0xebd7[126]](_0x36d9x29[_0xebd7[125]])?moment()[_0xebd7[108]](_0xebd7[107]):undefined})};return null})[_0xebd7[44]](function(_0x36d9x29){if(_0x36d9x29){_0x36d9x40[_0xebd7[118]]= _0x36d9x29[_0xebd7[119]]({plain:true});interaction_log[_0xebd7[37]](_0xebd7[120],_0x36d9x20[_0xebd7[110]][_0xebd7[96]],_0x36d9x20[_0xebd7[110]][_0xebd7[63]],_0x36d9x20[_0xebd7[110]][_0xebd7[121]],_0x36d9x40[_0xebd7[118]][_0xebd7[96]],_0x36d9x20[_0xebd7[100]]?JSON[_0xebd7[39]](_0x36d9x20[_0xebd7[100]]):_0xebd7[122]);return respondWithRpcPromise(_0xebd7[123],_0xebd7[124],_0x36d9x40)};return null})[_0xebd7[44]](function(_0x36d9x29){if(_0x36d9x29){if(_0x36d9x20[_0xebd7[100]][_0xebd7[111]]){_0x36d9x40[_0xebd7[42]][_0xebd7[112]]= util[_0xebd7[108]](_0xebd7[113],_0x36d9x20[_0xebd7[110]][_0xebd7[63]]);_0x36d9x40[_0xebd7[42]][_0xebd7[114]]= _0x36d9x40[_0xebd7[114]];_0x36d9x40[_0xebd7[42]][_0xebd7[115]]= _0xebd7[103];return respondWithRpcPromise(_0xebd7[116],_0xebd7[116],{event:_0xebd7[117],message:_0x36d9x40[_0xebd7[42]]},client9002)[_0xebd7[44]](function(){return _0x36d9x40})};return _0x36d9x40};return null})[_0xebd7[44]](respondWithResult(_0x36d9x26,null))[_0xebd7[35]](handleError(_0x36d9x26,null))};var interaction_log=require(_0xebd7[21])(_0xebd7[102]);exports[_0xebd7[58]]= function(_0x36d9x20,_0x36d9x26,_0x36d9x3f){var _0x36d9x40={agent:{},channel:_0xebd7[104]};if(_0x36d9x20[_0xebd7[100]][_0xebd7[96]]){delete _0x36d9x20[_0xebd7[100]][_0xebd7[96]]};_0x36d9x20[_0xebd7[100]][_0xebd7[109]]= _0x36d9x20[_0xebd7[100]][_0xebd7[109]]|| _0x36d9x20[_0xebd7[110]][_0xebd7[96]];_0x36d9x40[_0xebd7[131]][_0xebd7[96]]= _0x36d9x20[_0xebd7[100]][_0xebd7[109]];return db[_0xebd7[68]][_0xebd7[98]]({where:{id:_0x36d9x20[_0xebd7[97]][_0xebd7[96]],UserId:null}})[_0xebd7[44]](handleEntityNotFound(_0x36d9x26,null))[_0xebd7[44]](function(_0x36d9x29){if(_0x36d9x29){_0x36d9x40[_0xebd7[42]]= _0x36d9x29[_0xebd7[119]]({plain:true});return db[_0xebd7[128]][_0xebd7[98]]({where:{id:_0x36d9x29[_0xebd7[127]]}})};return null})[_0xebd7[44]](handleEntityNotFound(_0x36d9x26,null))[_0xebd7[44]](function(_0x36d9x29){if(_0x36d9x29){_0x36d9x40[_0xebd7[118]]= _0x36d9x29[_0xebd7[119]]({plain:true});interaction_log[_0xebd7[37]](_0xebd7[133],_0x36d9x20[_0xebd7[110]][_0xebd7[96]],_0x36d9x20[_0xebd7[110]][_0xebd7[63]],_0x36d9x20[_0xebd7[110]][_0xebd7[121]],_0x36d9x40[_0xebd7[118]][_0xebd7[96]],_0x36d9x20[_0xebd7[100]]?JSON[_0xebd7[39]](_0x36d9x20[_0xebd7[100]]):_0xebd7[122]);return respondWithRpcPromise(_0xebd7[134],_0xebd7[135],_0x36d9x40)};return null})[_0xebd7[44]](function(_0x36d9x29){if(_0x36d9x29){_0x36d9x29[_0xebd7[42]][_0xebd7[112]]= util[_0xebd7[108]](_0xebd7[113],_0x36d9x20[_0xebd7[110]][_0xebd7[63]]);_0x36d9x29[_0xebd7[42]][_0xebd7[114]]= _0x36d9x40[_0xebd7[114]];_0x36d9x29[_0xebd7[42]][_0xebd7[115]]= _0xebd7[58];respondWithRpcPromise(_0xebd7[116],_0xebd7[116],{event:_0xebd7[132],message:_0x36d9x29[_0xebd7[42]]},client9002);return _0x36d9x40};return null})[_0xebd7[44]](respondWithResult(_0x36d9x26,null))[_0xebd7[35]](handleError(_0x36d9x26,null))}
\ No newline at end of file
+var _0xd3c3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x61\x63\x63\x65\x70\x74","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x72\x65\x61\x64","\x72\x65\x61\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x55\x73\x65\x72\x49\x64","\x75\x73\x65\x72","\x6D\x61\x6E\x75\x61\x6C","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x53\x49\x50\x2F\x25\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x65\x76\x65\x6E\x74","\x45\x76\x65\x6E\x74\x4D\x61\x6E\x61\x67\x65\x72","\x61\x63\x63\x65\x70\x74\x6D\x65\x73\x73\x61\x67\x65","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74","\x5B\x4F\x50\x45\x4E\x43\x48\x41\x4E\x4E\x45\x4C\x4D\x45\x53\x53\x41\x47\x45\x3A\x41\x43\x43\x45\x50\x54\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x72\x6F\x6C\x65","\x6E\x75\x6C\x6C","\x41\x63\x63\x65\x70\x74\x4D\x65\x73\x73\x61\x67\x65","\x61\x63\x63\x65\x70\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x61\x64\x31\x73\x74\x41\x74","\x69\x73\x4E\x69\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x61\x67\x65\x6E\x74","\x72\x65\x6A\x65\x63\x74\x6D\x65\x73\x73\x61\x67\x65","\x5B\x4F\x50\x45\x4E\x43\x48\x41\x4E\x4E\x45\x4C\x4D\x45\x53\x53\x41\x47\x45\x3A\x52\x45\x4A\x45\x43\x54\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x52\x65\x6A\x65\x63\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x6A\x65\x63\x74\x4D\x65\x73\x73\x61\x67\x65"];_0xd3c3[0];var jsonpatch=require(_0xd3c3[1]);var rp=require(_0xd3c3[2]);var moment=require(_0xd3c3[3]);var BPromise=require(_0xd3c3[4]);var Mustache=require(_0xd3c3[5]);var util=require(_0xd3c3[6]);var path=require(_0xd3c3[7]);var sox=require(_0xd3c3[8]);var csv=require(_0xd3c3[9]);var ejs=require(_0xd3c3[10]);var fs=require(_0xd3c3[11]);var _=require(_0xd3c3[12]);var squel=require(_0xd3c3[13]);var crypto=require(_0xd3c3[14]);var jsforce=require(_0xd3c3[15]);var deskjs=require(_0xd3c3[16]);var toCsv=require(_0xd3c3[9]);var querystring=require(_0xd3c3[17]);var Papa=require(_0xd3c3[18]);var qs=require(_0xd3c3[19]);var logger=require(_0xd3c3[21])(_0xd3c3[20]);var utils=require(_0xd3c3[22]);var config=require(_0xd3c3[23]);var db=require(_0xd3c3[25])[_0xd3c3[24]];var socket=require(_0xd3c3[27])({host:_0xd3c3[26],port:6379});require(_0xd3c3[29])[_0xd3c3[28]](socket);var jayson=require(_0xd3c3[30]);var client=jayson[_0xd3c3[32]][_0xd3c3[31]]({port:9004});var client9002=jayson[_0xd3c3[32]][_0xd3c3[31]]({port:9002});function respondWithRpcPromise(_0x1141x1e,_0x1141x1f,_0x1141x20,_0x1141x21){return  new BPromise(function(_0x1141x22,_0x1141x23){var _0x1141x24=(_0x1141x21|| client);return _0x1141x24[_0xd3c3[45]](_0x1141x1e,_0x1141x20)[_0xd3c3[44]](function(_0x1141x26){logger[_0xd3c3[37]](_0xd3c3[33],_0x1141x1f,_0xd3c3[36]);logger[_0xd3c3[40]](_0xd3c3[38],_0x1141x1f,_0xd3c3[36],JSON[_0xd3c3[39]](_0x1141x26));if(_0x1141x26[_0xd3c3[34]]){if(_0x1141x26[_0xd3c3[34]][_0xd3c3[41]]=== 500){logger[_0xd3c3[34]](_0xd3c3[33],_0x1141x1f,_0x1141x26[_0xd3c3[34]][_0xd3c3[42]]);return _0x1141x23(_0x1141x26[_0xd3c3[34]][_0xd3c3[42]])};logger[_0xd3c3[34]](_0xd3c3[33],_0x1141x1f,_0x1141x26[_0xd3c3[34]][_0xd3c3[42]]);return _0x1141x22(_0x1141x26[_0xd3c3[34]][_0xd3c3[42]])}else {logger[_0xd3c3[37]](_0xd3c3[33],_0x1141x1f,_0xd3c3[36]);_0x1141x22(_0x1141x26[_0xd3c3[43]][_0xd3c3[42]])}})[_0xd3c3[35]](function(_0x1141x25){logger[_0xd3c3[34]](_0xd3c3[33],_0x1141x1f,_0x1141x25);_0x1141x23(_0x1141x25)})})}function respondWithStatusCode(_0x1141x26,_0x1141x28){_0x1141x28= _0x1141x28|| 204;return function(_0x1141x29){if(_0x1141x29){return _0x1141x26[_0xd3c3[46]](_0x1141x28)};return _0x1141x26[_0xd3c3[48]](_0x1141x28)[_0xd3c3[47]]()}}function respondWithResult(_0x1141x26,_0x1141x28){_0x1141x28= _0x1141x28|| 200;return function(_0x1141x29){if(_0x1141x29){return _0x1141x26[_0xd3c3[48]](_0x1141x28)[_0xd3c3[49]](_0x1141x29)}}}function respondWithFilteredResult(_0x1141x26,_0x1141x2c){return function(_0x1141x29){if(_0x1141x29){var _0x1141x2d=_0x1141x29[_0xd3c3[50]],_0x1141x2e=_0x1141x2c[_0xd3c3[51]],_0x1141x2f=_0x1141x2c[_0xd3c3[51]]+ _0x1141x2c[_0xd3c3[52]],_0x1141x28;if(_0x1141x2f>= _0x1141x2d){_0x1141x2f= _0x1141x2d;_0x1141x28= 200}else {_0x1141x28= 206};_0x1141x26[_0xd3c3[48]](_0x1141x28);return _0x1141x26[_0xd3c3[56]](_0xd3c3[53],_0x1141x2e+ _0xd3c3[54]+ _0x1141x2f+ _0xd3c3[55]+ _0x1141x2d)[_0xd3c3[49]](_0x1141x29)};return null}}function patchUpdates(_0x1141x31){return function(_0x1141x29){try{jsonpatch[_0xd3c3[57]](_0x1141x29,_0x1141x31,true)}catch(err){return BPromise[_0xd3c3[58]](err)};return _0x1141x29[_0xd3c3[59]]()}}function saveUpdates(_0x1141x33,_0x1141x28){return function(_0x1141x29){if(_0x1141x29){return _0x1141x29[_0xd3c3[60]](_0x1141x33)[_0xd3c3[44]](function(_0x1141x34){return _0x1141x34})};return null}}function removeEntity(_0x1141x26,_0x1141x28){return function(_0x1141x29){if(_0x1141x29){return _0x1141x29[_0xd3c3[61]]()[_0xd3c3[44]](function(){_0x1141x26[_0xd3c3[48]](204)[_0xd3c3[47]]()})}}}function handleEntityNotFound(_0x1141x26,_0x1141x28){return function(_0x1141x29){if(!_0x1141x29){_0x1141x26[_0xd3c3[46]](404)};return _0x1141x29}}function handleError(_0x1141x26,_0x1141x28){_0x1141x28= _0x1141x28|| 500;return function(_0x1141x25){logger[_0xd3c3[34]](_0x1141x25[_0xd3c3[62]]);if(_0x1141x25[_0xd3c3[63]]){delete _0x1141x25[_0xd3c3[63]]};_0x1141x26[_0xd3c3[48]](_0x1141x28)[_0xd3c3[64]](_0x1141x25)}}exports[_0xd3c3[65]]= function(_0x1141x20,_0x1141x26){var _0x1141x2c={},_0x1141x38={},_0x1141x39={count:0,rows:[]};_0x1141x38[_0xd3c3[66]]= _[_0xd3c3[69]](db[_0xd3c3[68]][_0xd3c3[67]]);var _0x1141x3a={dateStart:_0x1141x20[_0xd3c3[71]][_0xd3c3[70]],dateEnd:_0x1141x20[_0xd3c3[71]][_0xd3c3[72]]};delete _0x1141x20[_0xd3c3[71]][_0xd3c3[70]];delete _0x1141x20[_0xd3c3[71]][_0xd3c3[72]];_0x1141x38[_0xd3c3[71]]= _[_0xd3c3[69]](_0x1141x20[_0xd3c3[71]]);_0x1141x38[_0xd3c3[73]]= _[_0xd3c3[74]](_0x1141x38[_0xd3c3[66]],_0x1141x38[_0xd3c3[71]]);_0x1141x2c[_0xd3c3[75]]= _[_0xd3c3[74]](_0x1141x38[_0xd3c3[66]],qs[_0xd3c3[76]](_0x1141x20[_0xd3c3[71]][_0xd3c3[76]]));_0x1141x2c[_0xd3c3[75]]= (_0x1141x2c[_0xd3c3[75]][_0xd3c3[77]])?_0x1141x2c[_0xd3c3[75]]:_0x1141x38[_0xd3c3[66]];if(!_0x1141x20[_0xd3c3[71]][_0xd3c3[79]](_0xd3c3[78])){_0x1141x2c[_0xd3c3[52]]= qs[_0xd3c3[52]](_0x1141x20[_0xd3c3[71]][_0xd3c3[52]]);_0x1141x2c[_0xd3c3[51]]= qs[_0xd3c3[51]](_0x1141x20[_0xd3c3[71]][_0xd3c3[51]])};_0x1141x2c[_0xd3c3[80]]= qs[_0xd3c3[81]](_0x1141x20[_0xd3c3[71]][_0xd3c3[81]]);_0x1141x2c[_0xd3c3[82]]= qs[_0xd3c3[73]](_[_0xd3c3[83]](_0x1141x20[_0xd3c3[71]],_0x1141x38[_0xd3c3[73]]));if(_0x1141x3a[_0xd3c3[70]]){if(_0x1141x3a[_0xd3c3[72]]){_0x1141x3a[_0xd3c3[72]]= moment(_0x1141x3a[_0xd3c3[72]])[_0xd3c3[85]](1,_0xd3c3[84])}else {_0x1141x3a[_0xd3c3[72]]= moment(_0x1141x3a[_0xd3c3[70]])[_0xd3c3[85]](1,_0xd3c3[84])};_[_0xd3c3[86]](_0x1141x2c[_0xd3c3[82]],{createdAt:{$gte:_0x1141x3a[_0xd3c3[70]],$lte:_0x1141x3a[_0xd3c3[72]]}})};if(_0x1141x20[_0xd3c3[71]][_0xd3c3[87]]){_0x1141x2c[_0xd3c3[82]]= _[_0xd3c3[86]](_0x1141x2c[_0xd3c3[82]],{$or:_[_0xd3c3[89]](_0x1141x2c[_0xd3c3[75]],function(_0x1141x3b){var _0x1141x39={};_0x1141x39[_0x1141x3b]= {$like:_0xd3c3[88]+ _0x1141x20[_0xd3c3[71]][_0xd3c3[87]]+ _0xd3c3[88]};return _0x1141x39})})};_0x1141x2c= _[_0xd3c3[86]]({},_0x1141x2c,_0x1141x20[_0xd3c3[90]]);var _0x1141x3c={where:_0x1141x2c[_0xd3c3[82]]};return db[_0xd3c3[68]][_0xd3c3[50]](_0x1141x3c)[_0xd3c3[44]](function(_0x1141x2d){_0x1141x39[_0xd3c3[50]]= _0x1141x2d;if(_0x1141x20[_0xd3c3[71]][_0xd3c3[92]]){_0x1141x2c[_0xd3c3[93]]= [{all:true}]};return db[_0xd3c3[68]][_0xd3c3[94]](_0x1141x2c)})[_0xd3c3[44]](function(_0x1141x3d){_0x1141x39[_0xd3c3[91]]= _0x1141x3d;return _0x1141x39})[_0xd3c3[44]](respondWithFilteredResult(_0x1141x26,_0x1141x2c))[_0xd3c3[35]](handleError(_0x1141x26,null))};exports[_0xd3c3[95]]= function(_0x1141x20,_0x1141x26){var _0x1141x2c={raw:true,where:{id:_0x1141x20[_0xd3c3[97]][_0xd3c3[96]]}},_0x1141x38={};_0x1141x38[_0xd3c3[66]]= _[_0xd3c3[69]](db[_0xd3c3[68]][_0xd3c3[67]]);_0x1141x38[_0xd3c3[71]]= _[_0xd3c3[69]](_0x1141x20[_0xd3c3[71]]);_0x1141x38[_0xd3c3[73]]= _[_0xd3c3[74]](_0x1141x38[_0xd3c3[66]],_0x1141x38[_0xd3c3[71]]);_0x1141x2c[_0xd3c3[75]]= _[_0xd3c3[74]](_0x1141x38[_0xd3c3[66]],qs[_0xd3c3[76]](_0x1141x20[_0xd3c3[71]][_0xd3c3[76]]));_0x1141x2c[_0xd3c3[75]]= (_0x1141x2c[_0xd3c3[75]][_0xd3c3[77]])?_0x1141x2c[_0xd3c3[75]]:_0x1141x38[_0xd3c3[66]];if(_0x1141x20[_0xd3c3[71]][_0xd3c3[92]]){_0x1141x2c[_0xd3c3[93]]= [{all:true}]};_0x1141x2c= _[_0xd3c3[86]]({},_0x1141x2c,_0x1141x20[_0xd3c3[90]]);return db[_0xd3c3[68]][_0xd3c3[98]](_0x1141x2c)[_0xd3c3[44]](handleEntityNotFound(_0x1141x26,null))[_0xd3c3[44]](respondWithResult(_0x1141x26,null))[_0xd3c3[35]](handleError(_0x1141x26,null))};exports[_0xd3c3[99]]= function(_0x1141x20,_0x1141x26){return db[_0xd3c3[68]][_0xd3c3[99]](_0x1141x20[_0xd3c3[100]],{})[_0xd3c3[44]](respondWithResult(_0x1141x26,201))[_0xd3c3[35]](handleError(_0x1141x26,null))};exports[_0xd3c3[60]]= function(_0x1141x20,_0x1141x26){if(_0x1141x20[_0xd3c3[100]][_0xd3c3[96]]){delete _0x1141x20[_0xd3c3[100]][_0xd3c3[96]]};return db[_0xd3c3[68]][_0xd3c3[98]]({where:{id:_0x1141x20[_0xd3c3[97]][_0xd3c3[96]]}})[_0xd3c3[44]](handleEntityNotFound(_0x1141x26,null))[_0xd3c3[44]](saveUpdates(_0x1141x20[_0xd3c3[100]],null))[_0xd3c3[44]](respondWithResult(_0x1141x26,null))[_0xd3c3[35]](handleError(_0x1141x26,null))};exports[_0xd3c3[61]]= function(_0x1141x20,_0x1141x26){return db[_0xd3c3[68]][_0xd3c3[98]]({where:{id:_0x1141x20[_0xd3c3[97]][_0xd3c3[96]]}})[_0xd3c3[44]](handleEntityNotFound(_0x1141x26,null))[_0xd3c3[44]](removeEntity(_0x1141x26,null))[_0xd3c3[35]](handleError(_0x1141x26,null))};exports[_0xd3c3[101]]= function(_0x1141x20,_0x1141x26){return db[_0xd3c3[68]][_0xd3c3[101]]()[_0xd3c3[44]](respondWithResult(_0x1141x26,null))[_0xd3c3[35]](handleError(_0x1141x26,null))};var interaction_log=require(_0xd3c3[21])(_0xd3c3[102]);exports[_0xd3c3[103]]= function(_0x1141x20,_0x1141x26,_0x1141x3f){var _0x1141x40={channel:_0xd3c3[104]};if(_0x1141x20[_0xd3c3[100]][_0xd3c3[96]]){delete _0x1141x20[_0xd3c3[100]][_0xd3c3[96]]};_0x1141x20[_0xd3c3[100]][_0xd3c3[105]]= true;_0x1141x20[_0xd3c3[100]][_0xd3c3[106]]= moment()[_0xd3c3[108]](_0xd3c3[107]);_0x1141x20[_0xd3c3[100]][_0xd3c3[109]]= _0x1141x20[_0xd3c3[100]][_0xd3c3[109]]|| _0x1141x20[_0xd3c3[110]][_0xd3c3[96]];return db[_0xd3c3[68]][_0xd3c3[98]]({where:{id:_0x1141x20[_0xd3c3[97]][_0xd3c3[96]],UserId:null},include:[{model:db[_0xd3c3[129]],as:_0xd3c3[130]}]})[_0xd3c3[44]](handleEntityNotFound(_0x1141x26,null))[_0xd3c3[44]](saveUpdates(_0x1141x20[_0xd3c3[100]],null))[_0xd3c3[44]](function(_0x1141x29){if(_0x1141x29){_0x1141x40[_0xd3c3[42]]= _0x1141x29[_0xd3c3[119]]({plain:true});return db[_0xd3c3[128]][_0xd3c3[98]]({where:{id:_0x1141x29[_0xd3c3[127]]}})};return null})[_0xd3c3[44]](handleEntityNotFound(_0x1141x26,null))[_0xd3c3[44]](function(_0x1141x29){if(_0x1141x29){return _0x1141x29[_0xd3c3[60]]({UserId:_0x1141x20[_0xd3c3[100]][_0xd3c3[109]],read1stAt:_[_0xd3c3[126]](_0x1141x29[_0xd3c3[125]])?moment()[_0xd3c3[108]](_0xd3c3[107]):undefined})};return null})[_0xd3c3[44]](function(_0x1141x29){if(_0x1141x29){_0x1141x40[_0xd3c3[118]]= _0x1141x29[_0xd3c3[119]]({plain:true});interaction_log[_0xd3c3[37]](_0xd3c3[120],_0x1141x20[_0xd3c3[110]][_0xd3c3[96]],_0x1141x20[_0xd3c3[110]][_0xd3c3[63]],_0x1141x20[_0xd3c3[110]][_0xd3c3[121]],_0x1141x40[_0xd3c3[118]][_0xd3c3[96]],_0x1141x20[_0xd3c3[100]]?JSON[_0xd3c3[39]](_0x1141x20[_0xd3c3[100]]):_0xd3c3[122]);return respondWithRpcPromise(_0xd3c3[123],_0xd3c3[124],_0x1141x40)};return null})[_0xd3c3[44]](function(_0x1141x29){if(_0x1141x29){if(_0x1141x20[_0xd3c3[100]][_0xd3c3[111]]){_0x1141x40[_0xd3c3[42]][_0xd3c3[112]]= util[_0xd3c3[108]](_0xd3c3[113],_0x1141x20[_0xd3c3[110]][_0xd3c3[63]]);_0x1141x40[_0xd3c3[42]][_0xd3c3[114]]= _0x1141x40[_0xd3c3[114]];_0x1141x40[_0xd3c3[42]][_0xd3c3[115]]= _0xd3c3[103];return respondWithRpcPromise(_0xd3c3[116],_0xd3c3[116],{event:_0xd3c3[117],message:_0x1141x40[_0xd3c3[42]]},client9002)[_0xd3c3[44]](function(){return _0x1141x40})};return _0x1141x40};return null})[_0xd3c3[44]](respondWithResult(_0x1141x26,null))[_0xd3c3[35]](handleError(_0x1141x26,null))};var interaction_log=require(_0xd3c3[21])(_0xd3c3[102]);exports[_0xd3c3[58]]= function(_0x1141x20,_0x1141x26,_0x1141x3f){var _0x1141x40={agent:{},channel:_0xd3c3[104]};if(_0x1141x20[_0xd3c3[100]][_0xd3c3[96]]){delete _0x1141x20[_0xd3c3[100]][_0xd3c3[96]]};_0x1141x20[_0xd3c3[100]][_0xd3c3[109]]= _0x1141x20[_0xd3c3[100]][_0xd3c3[109]]|| _0x1141x20[_0xd3c3[110]][_0xd3c3[96]];_0x1141x40[_0xd3c3[131]][_0xd3c3[96]]= _0x1141x20[_0xd3c3[100]][_0xd3c3[109]];return db[_0xd3c3[68]][_0xd3c3[98]]({where:{id:_0x1141x20[_0xd3c3[97]][_0xd3c3[96]],UserId:null}})[_0xd3c3[44]](handleEntityNotFound(_0x1141x26,null))[_0xd3c3[44]](function(_0x1141x29){if(_0x1141x29){_0x1141x40[_0xd3c3[42]]= _0x1141x29[_0xd3c3[119]]({plain:true});return db[_0xd3c3[128]][_0xd3c3[98]]({where:{id:_0x1141x29[_0xd3c3[127]]}})};return null})[_0xd3c3[44]](handleEntityNotFound(_0x1141x26,null))[_0xd3c3[44]](function(_0x1141x29){if(_0x1141x29){_0x1141x40[_0xd3c3[118]]= _0x1141x29[_0xd3c3[119]]({plain:true});interaction_log[_0xd3c3[37]](_0xd3c3[133],_0x1141x20[_0xd3c3[110]][_0xd3c3[96]],_0x1141x20[_0xd3c3[110]][_0xd3c3[63]],_0x1141x20[_0xd3c3[110]][_0xd3c3[121]],_0x1141x40[_0xd3c3[118]][_0xd3c3[96]],_0x1141x20[_0xd3c3[100]]?JSON[_0xd3c3[39]](_0x1141x20[_0xd3c3[100]]):_0xd3c3[122]);return respondWithRpcPromise(_0xd3c3[134],_0xd3c3[135],_0x1141x40)};return null})[_0xd3c3[44]](function(_0x1141x29){if(_0x1141x29){_0x1141x29[_0xd3c3[42]][_0xd3c3[112]]= util[_0xd3c3[108]](_0xd3c3[113],_0x1141x20[_0xd3c3[110]][_0xd3c3[63]]);_0x1141x29[_0xd3c3[42]][_0xd3c3[114]]= _0x1141x40[_0xd3c3[114]];_0x1141x29[_0xd3c3[42]][_0xd3c3[115]]= _0xd3c3[58];respondWithRpcPromise(_0xd3c3[116],_0xd3c3[116],{event:_0xd3c3[132],message:_0x1141x29[_0xd3c3[42]]},client9002);return _0x1141x40};return null})[_0xd3c3[44]](respondWithResult(_0x1141x26,null))[_0xd3c3[35]](handleError(_0x1141x26,null))}
\ No newline at end of file
index d2e8c54..63fbac3 100644 (file)
@@ -1 +1 @@
-var _0xbc9b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xbc9b[0];var EventEmitter=require(_0xbc9b[1]);var OpenchannelMessage=require(_0xbc9b[4])[_0xbc9b[3]][_0xbc9b[2]];var OpenchannelMessageEvents= new EventEmitter();OpenchannelMessageEvents[_0xbc9b[5]](0);var events={afterCreate:_0xbc9b[6],afterUpdate:_0xbc9b[7],afterDestroy:_0xbc9b[8]};function emitEvent(event){return function(_0x14e9x7,_0x14e9x8,_0x14e9x9){OpenchannelMessageEvents[_0xbc9b[11]](event+ _0xbc9b[9]+ _0x14e9x7[_0xbc9b[10]],_0x14e9x7);OpenchannelMessageEvents[_0xbc9b[11]](event,_0x14e9x7);_0x14e9x9(null)}}for(var e in events){if(events[_0xbc9b[12]](e)){var event=events[e];OpenchannelMessage[_0xbc9b[13]](e,emitEvent(event))}};module[_0xbc9b[14]]= OpenchannelMessageEvents
\ No newline at end of file
+var _0x289a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x289a[0];var EventEmitter=require(_0x289a[1]);var OpenchannelMessage=require(_0x289a[4])[_0x289a[3]][_0x289a[2]];var OpenchannelMessageEvents= new EventEmitter();OpenchannelMessageEvents[_0x289a[5]](0);var events={afterCreate:_0x289a[6],afterUpdate:_0x289a[7],afterDestroy:_0x289a[8]};function emitEvent(event){return function(_0x8619x7,_0x8619x8,_0x8619x9){OpenchannelMessageEvents[_0x289a[11]](event+ _0x289a[9]+ _0x8619x7[_0x289a[10]],_0x8619x7);OpenchannelMessageEvents[_0x289a[11]](event,_0x8619x7);_0x8619x9(null)}}for(var e in events){if(events[_0x289a[12]](e)){var event=events[e];OpenchannelMessage[_0x289a[13]](e,emitEvent(event))}};module[_0x289a[14]]= OpenchannelMessageEvents
\ No newline at end of file
index 8e58f76..d505715 100644 (file)
@@ -1 +1 @@
-var _0xdbc5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x6D\x6F\x64\x65\x6C\x73","\x67\x65\x74","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x69\x6E","\x6F\x75\x74","\x73\x65\x63\x72\x65\x74","\x69\x73\x4E\x69\x6C","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x66\x69\x6E\x61\x6C\x6C\x79","\x72\x65\x70\x6C\x79\x55\x72\x69","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6C\x65\x6E\x67\x74\x68","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x6F\x6E\x74\x61\x63\x74","\x6F\x6D\x69\x74","\x50\x4F\x53\x54","\x71\x73","\x47\x45\x54","\x6D\x65\x74\x68\x6F\x64","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x6B\x65\x79\x73","\x66\x69\x6E\x64","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x64\x65\x73\x63\x72\x69\x62\x65","\x75\x74\x66\x38\x6D\x62\x34","\x75\x74\x66\x38\x6D\x62\x34\x5F\x75\x6E\x69\x63\x6F\x64\x65\x5F\x63\x69","\x64\x65\x66\x69\x6E\x65"];_0xdbc5[0];var _=require(_0xdbc5[1]);var util=require(_0xdbc5[2]);var logger=require(_0xdbc5[4])(_0xdbc5[3]);var moment=require(_0xdbc5[5]);var BPromise=require(_0xdbc5[6]);var rp=require(_0xdbc5[7]);var attributes=require(_0xdbc5[8]);module[_0xdbc5[9]]= function(_0x2ea9x8,_0x2ea9x9){return _0x2ea9x8[_0xdbc5[48]](_0xdbc5[10],attributes,{tableName:_0xdbc5[11],paranoid:false,indexes:[],timestamps:true,hooks:{afterCreate:function(_0x2ea9xa,_0x2ea9xb,_0x2ea9xc){var _0x2ea9xd=_0x2ea9x8[_0xdbc5[12]];var _0x2ea9xe=_0x2ea9xa[_0xdbc5[13]]({plain:true});if((_0x2ea9xe[_0xdbc5[15]][_0xdbc5[14]]()=== _0xdbc5[16])|| (_0x2ea9xe[_0xdbc5[15]][_0xdbc5[14]]()=== _0xdbc5[17]&&  !_0x2ea9xe[_0xdbc5[18]]&&  !_[_0xdbc5[19]](_0x2ea9xe.UserId))){_0x2ea9xd[_0xdbc5[28]][_0xdbc5[27]]({where:{id:_0x2ea9xe[_0xdbc5[26]]}})[_0xdbc5[25]](function(_0x2ea9x10){if(_0x2ea9x10){_0x2ea9x10[_0xdbc5[24]]({lastMsgAt:_0x2ea9xe[_0xdbc5[22]],lastMsgDirection:_0x2ea9xe[_0xdbc5[15]][_0xdbc5[14]](),lastMsgBody:_0x2ea9xe[_0xdbc5[23]]})}})[_0xdbc5[21]](function(_0x2ea9xf){console[_0xdbc5[20]](_0x2ea9xf)})};if(_0x2ea9xe[_0xdbc5[15]]=== _0xdbc5[17]&&  !_0x2ea9xe[_0xdbc5[18]]){var _0x2ea9x11;_0x2ea9xd[_0xdbc5[41]][_0xdbc5[45]]()[_0xdbc5[25]](function(_0x2ea9x14){return _0x2ea9xd[_0xdbc5[44]][_0xdbc5[43]]({where:{id:_0x2ea9xe[_0xdbc5[40]]},include:[{model:_0x2ea9xd[_0xdbc5[28]],as:_0xdbc5[31],where:{id:_0x2ea9xe[_0xdbc5[26]]},limit:1,include:[{model:_0x2ea9xd[_0xdbc5[41]],as:_0xdbc5[34],attributes:_[_0xdbc5[42]](_0x2ea9x14)}]}]})})[_0xdbc5[25]](function(_0x2ea9x12){_0x2ea9x11= _0x2ea9x12[_0xdbc5[13]]({plain:true});if(_0x2ea9x11&& _0x2ea9x11[_0xdbc5[30]]){if(_0x2ea9x11[_0xdbc5[31]]&& _0x2ea9x11[_0xdbc5[31]][_0xdbc5[32]]){_0x2ea9xe[_0xdbc5[33]]= _[_0xdbc5[35]](_0x2ea9x11[_0xdbc5[31]][0],_0xdbc5[34]);_0x2ea9xe[_0xdbc5[34]]= _0x2ea9x11[_0xdbc5[31]][0][_0xdbc5[34]]};var _0x2ea9xb={method:_0xdbc5[36],uri:encodeURI(_0x2ea9x11[_0xdbc5[30]]),json:true,resolveWithFullResponse:true};switch(_0x2ea9xb[_0xdbc5[39]]){case _0xdbc5[38]:_0x2ea9xb[_0xdbc5[37]]= _0x2ea9xe;break;case _0xdbc5[36]:_0x2ea9xb[_0xdbc5[23]]= _0x2ea9xe;break};return rp(_0x2ea9xb)[_0xdbc5[25]](function(_0x2ea9x13){return _0x2ea9xa[_0xdbc5[24]]({read:true})})[_0xdbc5[21]](function(_0x2ea9xf){_0x2ea9xc()})}else {_0x2ea9xc()}})[_0xdbc5[29]](function(){_0x2ea9xc()})}else {_0x2ea9xc()}}},charset:_0xdbc5[46],collate:_0xdbc5[47]})}
\ No newline at end of file
+var _0xa4f5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x6D\x6F\x64\x65\x6C\x73","\x67\x65\x74","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x69\x6E","\x6F\x75\x74","\x73\x65\x63\x72\x65\x74","\x69\x73\x4E\x69\x6C","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x66\x69\x6E\x61\x6C\x6C\x79","\x72\x65\x70\x6C\x79\x55\x72\x69","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6C\x65\x6E\x67\x74\x68","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x6F\x6E\x74\x61\x63\x74","\x6F\x6D\x69\x74","\x50\x4F\x53\x54","\x71\x73","\x47\x45\x54","\x6D\x65\x74\x68\x6F\x64","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x6B\x65\x79\x73","\x66\x69\x6E\x64","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x64\x65\x73\x63\x72\x69\x62\x65","\x75\x74\x66\x38\x6D\x62\x34","\x75\x74\x66\x38\x6D\x62\x34\x5F\x75\x6E\x69\x63\x6F\x64\x65\x5F\x63\x69","\x64\x65\x66\x69\x6E\x65"];_0xa4f5[0];var _=require(_0xa4f5[1]);var util=require(_0xa4f5[2]);var logger=require(_0xa4f5[4])(_0xa4f5[3]);var moment=require(_0xa4f5[5]);var BPromise=require(_0xa4f5[6]);var rp=require(_0xa4f5[7]);var attributes=require(_0xa4f5[8]);module[_0xa4f5[9]]= function(_0xab1dx8,_0xab1dx9){return _0xab1dx8[_0xa4f5[48]](_0xa4f5[10],attributes,{tableName:_0xa4f5[11],paranoid:false,indexes:[],timestamps:true,hooks:{afterCreate:function(_0xab1dxa,_0xab1dxb,_0xab1dxc){var _0xab1dxd=_0xab1dx8[_0xa4f5[12]];var _0xab1dxe=_0xab1dxa[_0xa4f5[13]]({plain:true});if((_0xab1dxe[_0xa4f5[15]][_0xa4f5[14]]()=== _0xa4f5[16])|| (_0xab1dxe[_0xa4f5[15]][_0xa4f5[14]]()=== _0xa4f5[17]&&  !_0xab1dxe[_0xa4f5[18]]&&  !_[_0xa4f5[19]](_0xab1dxe.UserId))){_0xab1dxd[_0xa4f5[28]][_0xa4f5[27]]({where:{id:_0xab1dxe[_0xa4f5[26]]}})[_0xa4f5[25]](function(_0xab1dx10){if(_0xab1dx10){_0xab1dx10[_0xa4f5[24]]({lastMsgAt:_0xab1dxe[_0xa4f5[22]],lastMsgDirection:_0xab1dxe[_0xa4f5[15]][_0xa4f5[14]](),lastMsgBody:_0xab1dxe[_0xa4f5[23]]})}})[_0xa4f5[21]](function(_0xab1dxf){console[_0xa4f5[20]](_0xab1dxf)})};if(_0xab1dxe[_0xa4f5[15]]=== _0xa4f5[17]&&  !_0xab1dxe[_0xa4f5[18]]){var _0xab1dx11;_0xab1dxd[_0xa4f5[41]][_0xa4f5[45]]()[_0xa4f5[25]](function(_0xab1dx14){return _0xab1dxd[_0xa4f5[44]][_0xa4f5[43]]({where:{id:_0xab1dxe[_0xa4f5[40]]},include:[{model:_0xab1dxd[_0xa4f5[28]],as:_0xa4f5[31],where:{id:_0xab1dxe[_0xa4f5[26]]},limit:1,include:[{model:_0xab1dxd[_0xa4f5[41]],as:_0xa4f5[34],attributes:_[_0xa4f5[42]](_0xab1dx14)}]}]})})[_0xa4f5[25]](function(_0xab1dx12){_0xab1dx11= _0xab1dx12[_0xa4f5[13]]({plain:true});if(_0xab1dx11&& _0xab1dx11[_0xa4f5[30]]){if(_0xab1dx11[_0xa4f5[31]]&& _0xab1dx11[_0xa4f5[31]][_0xa4f5[32]]){_0xab1dxe[_0xa4f5[33]]= _[_0xa4f5[35]](_0xab1dx11[_0xa4f5[31]][0],_0xa4f5[34]);_0xab1dxe[_0xa4f5[34]]= _0xab1dx11[_0xa4f5[31]][0][_0xa4f5[34]]};var _0xab1dxb={method:_0xa4f5[36],uri:encodeURI(_0xab1dx11[_0xa4f5[30]]),json:true,resolveWithFullResponse:true};switch(_0xab1dxb[_0xa4f5[39]]){case _0xa4f5[38]:_0xab1dxb[_0xa4f5[37]]= _0xab1dxe;break;case _0xa4f5[36]:_0xab1dxb[_0xa4f5[23]]= _0xab1dxe;break};return rp(_0xab1dxb)[_0xa4f5[25]](function(_0xab1dx13){return _0xab1dxa[_0xa4f5[24]]({read:true})})[_0xa4f5[21]](function(_0xab1dxf){_0xab1dxc()})}else {_0xab1dxc()}})[_0xa4f5[29]](function(){_0xab1dxc()})}else {_0xab1dxc()}}},charset:_0xa4f5[46],collate:_0xa4f5[47]})}
\ No newline at end of file
index 3773842..97054fd 100644 (file)
@@ -1 +1 @@
-var _0xe575=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65"];_0xe575[0];var _=require(_0xe575[1]);var util=require(_0xe575[2]);var moment=require(_0xe575[3]);var BPromise=require(_0xe575[4]);var rs=require(_0xe575[5]);var fs=require(_0xe575[6]);var db=require(_0xe575[8])[_0xe575[7]];var utils=require(_0xe575[9]);var logger=require(_0xe575[11])(_0xe575[10]);var config=require(_0xe575[12]);var jayson=require(_0xe575[13]);var client=jayson[_0xe575[15]][_0xe575[14]]({port:9002});var socket=require(_0xe575[17])({host:_0xe575[16],port:6379});require(_0xe575[19])[_0xe575[18]](socket);function respondWithRpcPromise(_0x442exf,_0x442ex10,_0x442ex11){return  new BPromise(function(_0x442ex12,_0x442ex13){return client[_0xe575[32]](_0x442exf,_0x442ex11)[_0xe575[31]](function(_0x442ex15){logger[_0xe575[24]](_0xe575[20],_0x442ex10,_0xe575[23]);logger[_0xe575[27]](_0xe575[25],_0x442ex10,_0xe575[23],JSON[_0xe575[26]](_0x442ex15));if(_0x442ex15[_0xe575[21]]){if(_0x442ex15[_0xe575[21]][_0xe575[28]]=== 500){logger[_0xe575[21]](_0xe575[20],_0x442ex10,_0x442ex15[_0xe575[21]][_0xe575[29]]);return _0x442ex13(_0x442ex15[_0xe575[21]][_0xe575[29]])};logger[_0xe575[21]](_0xe575[20],_0x442ex10,_0x442ex15[_0xe575[21]][_0xe575[29]]);return _0x442ex12(_0x442ex15[_0xe575[21]][_0xe575[29]])}else {logger[_0xe575[24]](_0xe575[20],_0x442ex10,_0xe575[23]);_0x442ex12(_0x442ex15[_0xe575[30]][_0xe575[29]])}})[_0xe575[22]](function(_0x442ex14){logger[_0xe575[21]](_0xe575[20],_0x442ex10,_0x442ex14);_0x442ex13(_0x442ex14)})})}exports[_0xe575[33]]= function(_0x442ex11){var _0x442ex16=this;return  new Promise(function(_0x442ex12,_0x442ex13){return db[_0xe575[38]][_0xe575[37]](_0x442ex11[_0xe575[34]],{raw:_0x442ex11[_0xe575[35]]?(_0x442ex11[_0xe575[35]][_0xe575[36]]=== undefined)?true:false:true})[_0xe575[31]](function(_0x442ex15){logger[_0xe575[24]](_0xe575[33],_0x442ex11);logger[_0xe575[27]](_0xe575[33],_0x442ex11,JSON[_0xe575[26]](_0x442ex15));_0x442ex12(_0x442ex15)})[_0xe575[22]](function(_0x442ex14){logger[_0xe575[21]](_0xe575[33],_0x442ex14[_0xe575[29]],_0x442ex11);_0x442ex13(_0x442ex16[_0xe575[21]](500,_0x442ex14[_0xe575[29]]))})})}
\ No newline at end of file
+var _0x9603=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65"];_0x9603[0];var _=require(_0x9603[1]);var util=require(_0x9603[2]);var moment=require(_0x9603[3]);var BPromise=require(_0x9603[4]);var rs=require(_0x9603[5]);var fs=require(_0x9603[6]);var db=require(_0x9603[8])[_0x9603[7]];var utils=require(_0x9603[9]);var logger=require(_0x9603[11])(_0x9603[10]);var config=require(_0x9603[12]);var jayson=require(_0x9603[13]);var client=jayson[_0x9603[15]][_0x9603[14]]({port:9002});var socket=require(_0x9603[17])({host:_0x9603[16],port:6379});require(_0x9603[19])[_0x9603[18]](socket);function respondWithRpcPromise(_0x639axf,_0x639ax10,_0x639ax11){return  new BPromise(function(_0x639ax12,_0x639ax13){return client[_0x9603[32]](_0x639axf,_0x639ax11)[_0x9603[31]](function(_0x639ax15){logger[_0x9603[24]](_0x9603[20],_0x639ax10,_0x9603[23]);logger[_0x9603[27]](_0x9603[25],_0x639ax10,_0x9603[23],JSON[_0x9603[26]](_0x639ax15));if(_0x639ax15[_0x9603[21]]){if(_0x639ax15[_0x9603[21]][_0x9603[28]]=== 500){logger[_0x9603[21]](_0x9603[20],_0x639ax10,_0x639ax15[_0x9603[21]][_0x9603[29]]);return _0x639ax13(_0x639ax15[_0x9603[21]][_0x9603[29]])};logger[_0x9603[21]](_0x9603[20],_0x639ax10,_0x639ax15[_0x9603[21]][_0x9603[29]]);return _0x639ax12(_0x639ax15[_0x9603[21]][_0x9603[29]])}else {logger[_0x9603[24]](_0x9603[20],_0x639ax10,_0x9603[23]);_0x639ax12(_0x639ax15[_0x9603[30]][_0x9603[29]])}})[_0x9603[22]](function(_0x639ax14){logger[_0x9603[21]](_0x9603[20],_0x639ax10,_0x639ax14);_0x639ax13(_0x639ax14)})})}exports[_0x9603[33]]= function(_0x639ax11){var _0x639ax16=this;return  new Promise(function(_0x639ax12,_0x639ax13){return db[_0x9603[38]][_0x9603[37]](_0x639ax11[_0x9603[34]],{raw:_0x639ax11[_0x9603[35]]?(_0x639ax11[_0x9603[35]][_0x9603[36]]=== undefined)?true:false:true})[_0x9603[31]](function(_0x639ax15){logger[_0x9603[24]](_0x9603[33],_0x639ax11);logger[_0x9603[27]](_0x9603[33],_0x639ax11,JSON[_0x9603[26]](_0x639ax15));_0x639ax12(_0x639ax15)})[_0x9603[22]](function(_0x639ax14){logger[_0x9603[21]](_0x9603[33],_0x639ax14[_0x9603[29]],_0x639ax11);_0x639ax13(_0x639ax16[_0x9603[21]](500,_0x639ax14[_0x9603[29]]))})})}
\ No newline at end of file
index 44ccb18..3172578 100644 (file)
@@ -1 +1 @@
-var _0xc2f0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E"];_0xc2f0[0];var OpenchannelMessageEvents=require(_0xc2f0[1]);var events=[_0xc2f0[2],_0xc2f0[3],_0xc2f0[4]];function createListener(_0x9dd5x4,_0x9dd5x5){return function(_0x9dd5x6){_0x9dd5x5[_0xc2f0[5]](_0x9dd5x4,_0x9dd5x6)}}function removeListener(_0x9dd5x4,_0x9dd5x8){return function(){OpenchannelMessageEvents[_0xc2f0[6]](_0x9dd5x4,_0x9dd5x8)}}exports[_0xc2f0[7]]= function(_0x9dd5x5){for(var _0x9dd5x9=0,_0x9dd5xa=events[_0xc2f0[8]];_0x9dd5x9< _0x9dd5xa;_0x9dd5x9++){var _0x9dd5x4=events[_0x9dd5x9];var _0x9dd5x8=createListener(_0xc2f0[9]+ _0x9dd5x4,_0x9dd5x5);OpenchannelMessageEvents[_0xc2f0[10]](_0x9dd5x4,_0x9dd5x8)}}
\ No newline at end of file
+var _0x8313=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E"];_0x8313[0];var OpenchannelMessageEvents=require(_0x8313[1]);var events=[_0x8313[2],_0x8313[3],_0x8313[4]];function createListener(_0xe2a6x4,_0xe2a6x5){return function(_0xe2a6x6){_0xe2a6x5[_0x8313[5]](_0xe2a6x4,_0xe2a6x6)}}function removeListener(_0xe2a6x4,_0xe2a6x8){return function(){OpenchannelMessageEvents[_0x8313[6]](_0xe2a6x4,_0xe2a6x8)}}exports[_0x8313[7]]= function(_0xe2a6x5){for(var _0xe2a6x9=0,_0xe2a6xa=events[_0x8313[8]];_0xe2a6x9< _0xe2a6xa;_0xe2a6x9++){var _0xe2a6x4=events[_0xe2a6x9];var _0xe2a6x8=createListener(_0x8313[9]+ _0xe2a6x4,_0xe2a6x5);OpenchannelMessageEvents[_0x8313[10]](_0xe2a6x4,_0xe2a6x8)}}
\ No newline at end of file
index d37b4fe..b9f2217 100644 (file)
@@ -1 +1 @@
-var _0x5858=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6D\x65\x6D\x62\x65\x72\x73","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x74\x65\x61\x6D\x73","\x67\x65\x74\x54\x65\x61\x6D\x73","\x2F\x3A\x69\x64\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x54\x65\x61\x6D\x73","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x5858[0];var multer=require(_0x5858[1]);var util=require(_0x5858[2]);var path=require(_0x5858[3]);var express=require(_0x5858[4]);var router=express.Router();var auth=require(_0x5858[5]);var interaction=require(_0x5858[6]);var config=require(_0x5858[7]);var controller=require(_0x5858[8]);router[_0x5858[12]](_0x5858[9],auth[_0x5858[10]](),controller[_0x5858[11]]);router[_0x5858[12]](_0x5858[13],auth[_0x5858[10]](),controller[_0x5858[14]]);router[_0x5858[12]](_0x5858[15],auth[_0x5858[10]](),controller[_0x5858[16]]);router[_0x5858[12]](_0x5858[17],auth[_0x5858[10]](),controller[_0x5858[18]]);router[_0x5858[12]](_0x5858[19],auth[_0x5858[10]](),controller[_0x5858[20]]);router[_0x5858[12]](_0x5858[21],auth[_0x5858[10]](),controller[_0x5858[22]]);router[_0x5858[24]](_0x5858[9],auth[_0x5858[10]](),controller[_0x5858[23]]);router[_0x5858[24]](_0x5858[19],auth[_0x5858[10]](),controller[_0x5858[25]]);router[_0x5858[24]](_0x5858[21],auth[_0x5858[10]](),controller[_0x5858[26]]);router[_0x5858[28]](_0x5858[15],auth[_0x5858[10]](),controller[_0x5858[27]]);router[_0x5858[30]](_0x5858[15],auth[_0x5858[10]](),controller[_0x5858[29]]);router[_0x5858[30]](_0x5858[19],auth[_0x5858[10]](),controller[_0x5858[31]]);router[_0x5858[30]](_0x5858[21],auth[_0x5858[10]](),controller[_0x5858[32]]);module[_0x5858[33]]= router
\ No newline at end of file
+var _0x3d0a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6D\x65\x6D\x62\x65\x72\x73","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x74\x65\x61\x6D\x73","\x67\x65\x74\x54\x65\x61\x6D\x73","\x2F\x3A\x69\x64\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x54\x65\x61\x6D\x73","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x3d0a[0];var multer=require(_0x3d0a[1]);var util=require(_0x3d0a[2]);var path=require(_0x3d0a[3]);var express=require(_0x3d0a[4]);var router=express.Router();var auth=require(_0x3d0a[5]);var interaction=require(_0x3d0a[6]);var config=require(_0x3d0a[7]);var controller=require(_0x3d0a[8]);router[_0x3d0a[12]](_0x3d0a[9],auth[_0x3d0a[10]](),controller[_0x3d0a[11]]);router[_0x3d0a[12]](_0x3d0a[13],auth[_0x3d0a[10]](),controller[_0x3d0a[14]]);router[_0x3d0a[12]](_0x3d0a[15],auth[_0x3d0a[10]](),controller[_0x3d0a[16]]);router[_0x3d0a[12]](_0x3d0a[17],auth[_0x3d0a[10]](),controller[_0x3d0a[18]]);router[_0x3d0a[12]](_0x3d0a[19],auth[_0x3d0a[10]](),controller[_0x3d0a[20]]);router[_0x3d0a[12]](_0x3d0a[21],auth[_0x3d0a[10]](),controller[_0x3d0a[22]]);router[_0x3d0a[24]](_0x3d0a[9],auth[_0x3d0a[10]](),controller[_0x3d0a[23]]);router[_0x3d0a[24]](_0x3d0a[19],auth[_0x3d0a[10]](),controller[_0x3d0a[25]]);router[_0x3d0a[24]](_0x3d0a[21],auth[_0x3d0a[10]](),controller[_0x3d0a[26]]);router[_0x3d0a[28]](_0x3d0a[15],auth[_0x3d0a[10]](),controller[_0x3d0a[27]]);router[_0x3d0a[30]](_0x3d0a[15],auth[_0x3d0a[10]](),controller[_0x3d0a[29]]);router[_0x3d0a[30]](_0x3d0a[19],auth[_0x3d0a[10]](),controller[_0x3d0a[31]]);router[_0x3d0a[30]](_0x3d0a[21],auth[_0x3d0a[10]](),controller[_0x3d0a[32]]);module[_0x3d0a[33]]= router
\ No newline at end of file
index e0b1a1e..bad4606 100644 (file)
@@ -1 +1 @@
-var _0x9935=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x49\x4E\x54\x45\x47\x45\x52","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E"];_0x9935[0];var Sequelize=require(_0x9935[1]);module[_0x9935[2]]= {name:{type:Sequelize[_0x9935[3]],unique:_0x9935[4],validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i}},description:{type:Sequelize[_0x9935[3]]},timeout:{type:Sequelize[_0x9935[5]],validate:{min:1,max:2147483}},strategy:{type:Sequelize.ENUM(_0x9935[6],_0x9935[7],_0x9935[8])}}
\ No newline at end of file
+var _0x67b6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x49\x4E\x54\x45\x47\x45\x52","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E"];_0x67b6[0];var Sequelize=require(_0x67b6[1]);module[_0x67b6[2]]= {name:{type:Sequelize[_0x67b6[3]],unique:_0x67b6[4],validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i}},description:{type:Sequelize[_0x67b6[3]]},timeout:{type:Sequelize[_0x67b6[5]],validate:{min:1,max:2147483}},strategy:{type:Sequelize.ENUM(_0x67b6[6],_0x67b6[7],_0x67b6[8])}}
\ No newline at end of file
index 96abfd4..73a50a3 100644 (file)
@@ -1 +1 @@
-var _0x7ef9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x66\x6F\x72\x6D\x61\x74","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x50\x61\x75\x73\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x55\x73\x65\x72\x49\x64","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x55\x73\x65\x72","\x67\x65\x74","\x55\x73\x65\x72\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x54\x65\x61\x6D\x73","\x54\x65\x61\x6D","\x61\x64\x64\x54\x65\x61\x6D\x73","\x69\x64\x73","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x41\x67\x65\x6E\x74\x73","\x75\x6E\x69\x6F\x6E","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x75\x73\x65\x72\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x6F\x6D\x69\x74","\x69\x73\x41\x72\x72\x61\x79","\x75\x73\x65\x72\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x67\x65\x74\x41\x67\x65\x6E\x74\x73"];_0x7ef9[0];var jsonpatch=require(_0x7ef9[1]);var rp=require(_0x7ef9[2]);var moment=require(_0x7ef9[3]);var BPromise=require(_0x7ef9[4]);var Mustache=require(_0x7ef9[5]);var util=require(_0x7ef9[6]);var path=require(_0x7ef9[7]);var sox=require(_0x7ef9[8]);var csv=require(_0x7ef9[9]);var ejs=require(_0x7ef9[10]);var fs=require(_0x7ef9[11]);var _=require(_0x7ef9[12]);var squel=require(_0x7ef9[13]);var crypto=require(_0x7ef9[14]);var jsforce=require(_0x7ef9[15]);var deskjs=require(_0x7ef9[16]);var toCsv=require(_0x7ef9[9]);var querystring=require(_0x7ef9[17]);var Papa=require(_0x7ef9[18]);var qs=require(_0x7ef9[19]);var logger=require(_0x7ef9[21])(_0x7ef9[20]);var utils=require(_0x7ef9[22]);var config=require(_0x7ef9[23]);var db=require(_0x7ef9[25])[_0x7ef9[24]];var socket=require(_0x7ef9[27])({host:_0x7ef9[26],port:6379});require(_0x7ef9[29])[_0x7ef9[28]](socket);function respondWithStatusCode(_0x4ebbx1b,_0x4ebbx1c){_0x4ebbx1c= _0x4ebbx1c|| 204;return function(_0x4ebbx1d){if(_0x4ebbx1d){return _0x4ebbx1b[_0x7ef9[30]](_0x4ebbx1c)};return _0x4ebbx1b[_0x7ef9[32]](_0x4ebbx1c)[_0x7ef9[31]]()}}function respondWithResult(_0x4ebbx1b,_0x4ebbx1c){_0x4ebbx1c= _0x4ebbx1c|| 200;return function(_0x4ebbx1d){if(_0x4ebbx1d){return _0x4ebbx1b[_0x7ef9[32]](_0x4ebbx1c)[_0x7ef9[33]](_0x4ebbx1d)}}}function respondWithFilteredResult(_0x4ebbx1b,_0x4ebbx20){return function(_0x4ebbx1d){if(_0x4ebbx1d){var _0x4ebbx21=_0x4ebbx1d[_0x7ef9[34]],_0x4ebbx22=_0x4ebbx20[_0x7ef9[35]],_0x4ebbx23=_0x4ebbx20[_0x7ef9[35]]+ _0x4ebbx20[_0x7ef9[36]],_0x4ebbx1c;if(_0x4ebbx23>= _0x4ebbx21){_0x4ebbx23= _0x4ebbx21;_0x4ebbx1c= 200}else {_0x4ebbx1c= 206};_0x4ebbx1b[_0x7ef9[32]](_0x4ebbx1c);return _0x4ebbx1b[_0x7ef9[40]](_0x7ef9[37],_0x4ebbx22+ _0x7ef9[38]+ _0x4ebbx23+ _0x7ef9[39]+ _0x4ebbx21)[_0x7ef9[33]](_0x4ebbx1d)};return null}}function patchUpdates(_0x4ebbx25){return function(_0x4ebbx1d){try{jsonpatch[_0x7ef9[41]](_0x4ebbx1d,_0x4ebbx25,true)}catch(err){return BPromise[_0x7ef9[42]](err)};return _0x4ebbx1d[_0x7ef9[43]]()}}function saveUpdates(_0x4ebbx27,_0x4ebbx1c){return function(_0x4ebbx1d){if(_0x4ebbx1d){return _0x4ebbx1d[_0x7ef9[45]](_0x4ebbx27)[_0x7ef9[44]](function(_0x4ebbx28){return _0x4ebbx28})};return null}}function removeEntity(_0x4ebbx1b,_0x4ebbx1c){return function(_0x4ebbx1d){if(_0x4ebbx1d){return _0x4ebbx1d[_0x7ef9[46]]()[_0x7ef9[44]](function(){_0x4ebbx1b[_0x7ef9[32]](204)[_0x7ef9[31]]()})}}}function handleEntityNotFound(_0x4ebbx1b,_0x4ebbx1c){return function(_0x4ebbx1d){if(!_0x4ebbx1d){_0x4ebbx1b[_0x7ef9[30]](404)};return _0x4ebbx1d}}function handleError(_0x4ebbx1b,_0x4ebbx1c){_0x4ebbx1c= _0x4ebbx1c|| 500;return function(_0x4ebbx2c){logger[_0x7ef9[48]](_0x4ebbx2c[_0x7ef9[47]]);if(_0x4ebbx2c[_0x7ef9[49]]){delete _0x4ebbx2c[_0x7ef9[49]]};_0x4ebbx1b[_0x7ef9[32]](_0x4ebbx1c)[_0x7ef9[50]](_0x4ebbx2c)}}exports[_0x7ef9[51]]= function(_0x4ebbx2d,_0x4ebbx1b){var _0x4ebbx20={},_0x4ebbx2e={},_0x4ebbx2f={count:0,rows:[]};_0x4ebbx2e[_0x7ef9[52]]= _[_0x7ef9[55]](db[_0x7ef9[54]][_0x7ef9[53]]);var _0x4ebbx30={dateStart:_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[56]],dateEnd:_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[58]]};delete _0x4ebbx2d[_0x7ef9[57]][_0x7ef9[56]];delete _0x4ebbx2d[_0x7ef9[57]][_0x7ef9[58]];_0x4ebbx2e[_0x7ef9[57]]= _[_0x7ef9[55]](_0x4ebbx2d[_0x7ef9[57]]);_0x4ebbx2e[_0x7ef9[59]]= _[_0x7ef9[60]](_0x4ebbx2e[_0x7ef9[52]],_0x4ebbx2e[_0x7ef9[57]]);_0x4ebbx20[_0x7ef9[61]]= _[_0x7ef9[60]](_0x4ebbx2e[_0x7ef9[52]],qs[_0x7ef9[62]](_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[62]]));_0x4ebbx20[_0x7ef9[61]]= (_0x4ebbx20[_0x7ef9[61]][_0x7ef9[63]])?_0x4ebbx20[_0x7ef9[61]]:_0x4ebbx2e[_0x7ef9[52]];if(!_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[65]](_0x7ef9[64])){_0x4ebbx20[_0x7ef9[36]]= qs[_0x7ef9[36]](_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[36]]);_0x4ebbx20[_0x7ef9[35]]= qs[_0x7ef9[35]](_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[35]])};_0x4ebbx20[_0x7ef9[66]]= qs[_0x7ef9[67]](_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[67]]);_0x4ebbx20[_0x7ef9[68]]= qs[_0x7ef9[59]](_[_0x7ef9[69]](_0x4ebbx2d[_0x7ef9[57]],_0x4ebbx2e[_0x7ef9[59]]));if(_0x4ebbx30[_0x7ef9[56]]){if(_0x4ebbx30[_0x7ef9[58]]){_0x4ebbx30[_0x7ef9[58]]= moment(_0x4ebbx30[_0x7ef9[58]])[_0x7ef9[71]](1,_0x7ef9[70])}else {_0x4ebbx30[_0x7ef9[58]]= moment(_0x4ebbx30[_0x7ef9[56]])[_0x7ef9[71]](1,_0x7ef9[70])};_[_0x7ef9[72]](_0x4ebbx20[_0x7ef9[68]],{createdAt:{$gte:_0x4ebbx30[_0x7ef9[56]],$lte:_0x4ebbx30[_0x7ef9[58]]}})};if(_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[73]]){_0x4ebbx20[_0x7ef9[68]]= _[_0x7ef9[72]](_0x4ebbx20[_0x7ef9[68]],{$or:_[_0x7ef9[75]](_0x4ebbx20[_0x7ef9[61]],function(_0x4ebbx31){var _0x4ebbx2f={};_0x4ebbx2f[_0x4ebbx31]= {$like:_0x7ef9[74]+ _0x4ebbx2d[_0x7ef9[57]][_0x7ef9[73]]+ _0x7ef9[74]};return _0x4ebbx2f})})};_0x4ebbx20= _[_0x7ef9[72]]({},_0x4ebbx20,_0x4ebbx2d[_0x7ef9[76]]);var _0x4ebbx32={where:_0x4ebbx20[_0x7ef9[68]]};return db[_0x7ef9[54]][_0x7ef9[34]](_0x4ebbx32)[_0x7ef9[44]](function(_0x4ebbx21){_0x4ebbx2f[_0x7ef9[34]]= _0x4ebbx21;if(_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[79]]){_0x4ebbx20[_0x7ef9[80]]= [{all:true}]};return db[_0x7ef9[54]][_0x7ef9[81]](_0x4ebbx20)})[_0x7ef9[44]](function(_0x4ebbx33){_0x4ebbx2f[_0x7ef9[78]]= _0x4ebbx33;return _0x4ebbx2f})[_0x7ef9[44]](respondWithFilteredResult(_0x4ebbx1b,_0x4ebbx20))[_0x7ef9[77]](handleError(_0x4ebbx1b,null))};exports[_0x7ef9[82]]= function(_0x4ebbx2d,_0x4ebbx1b){var _0x4ebbx20={raw:true,where:{id:_0x4ebbx2d[_0x7ef9[84]][_0x7ef9[83]]}},_0x4ebbx2e={};_0x4ebbx2e[_0x7ef9[52]]= _[_0x7ef9[55]](db[_0x7ef9[54]][_0x7ef9[53]]);_0x4ebbx2e[_0x7ef9[57]]= _[_0x7ef9[55]](_0x4ebbx2d[_0x7ef9[57]]);_0x4ebbx2e[_0x7ef9[59]]= _[_0x7ef9[60]](_0x4ebbx2e[_0x7ef9[52]],_0x4ebbx2e[_0x7ef9[57]]);_0x4ebbx20[_0x7ef9[61]]= _[_0x7ef9[60]](_0x4ebbx2e[_0x7ef9[52]],qs[_0x7ef9[62]](_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[62]]));_0x4ebbx20[_0x7ef9[61]]= (_0x4ebbx20[_0x7ef9[61]][_0x7ef9[63]])?_0x4ebbx20[_0x7ef9[61]]:_0x4ebbx2e[_0x7ef9[52]];if(_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[79]]){_0x4ebbx20[_0x7ef9[80]]= [{all:true}]};_0x4ebbx20= _[_0x7ef9[72]]({},_0x4ebbx20,_0x4ebbx2d[_0x7ef9[76]]);return db[_0x7ef9[54]][_0x7ef9[85]](_0x4ebbx20)[_0x7ef9[44]](handleEntityNotFound(_0x4ebbx1b,null))[_0x7ef9[44]](respondWithResult(_0x4ebbx1b,null))[_0x7ef9[77]](handleError(_0x4ebbx1b,null))};exports[_0x7ef9[86]]= function(_0x4ebbx2d,_0x4ebbx1b){return db[_0x7ef9[54]][_0x7ef9[86]](_0x4ebbx2d[_0x7ef9[87]],{})[_0x7ef9[44]](respondWithResult(_0x4ebbx1b,201))[_0x7ef9[77]](handleError(_0x4ebbx1b,null))};exports[_0x7ef9[45]]= function(_0x4ebbx2d,_0x4ebbx1b){if(_0x4ebbx2d[_0x7ef9[87]][_0x7ef9[83]]){delete _0x4ebbx2d[_0x7ef9[87]][_0x7ef9[83]]};return db[_0x7ef9[54]][_0x7ef9[85]]({where:{id:_0x4ebbx2d[_0x7ef9[84]][_0x7ef9[83]]}})[_0x7ef9[44]](handleEntityNotFound(_0x4ebbx1b,null))[_0x7ef9[44]](saveUpdates(_0x4ebbx2d[_0x7ef9[87]],null))[_0x7ef9[44]](respondWithResult(_0x4ebbx1b,null))[_0x7ef9[77]](handleError(_0x4ebbx1b,null))};exports[_0x7ef9[46]]= function(_0x4ebbx2d,_0x4ebbx1b){return db[_0x7ef9[54]][_0x7ef9[85]]({where:{id:_0x4ebbx2d[_0x7ef9[84]][_0x7ef9[83]]}})[_0x7ef9[44]](handleEntityNotFound(_0x4ebbx1b,null))[_0x7ef9[44]](removeEntity(_0x4ebbx1b,null))[_0x7ef9[77]](handleError(_0x4ebbx1b,null))};exports[_0x7ef9[88]]= function(_0x4ebbx2d,_0x4ebbx1b){return db[_0x7ef9[54]][_0x7ef9[88]]()[_0x7ef9[44]](respondWithResult(_0x4ebbx1b,null))[_0x7ef9[77]](handleError(_0x4ebbx1b,null))};exports[_0x7ef9[89]]= function(_0x4ebbx2d,_0x4ebbx1b,_0x4ebbx34){var _0x4ebbx20={raw:true,where:{}},_0x4ebbx2e={},_0x4ebbx35;return db[_0x7ef9[54]][_0x7ef9[103]]({where:{id:_0x4ebbx2d[_0x7ef9[84]][_0x7ef9[83]]}})[_0x7ef9[44]](handleEntityNotFound(_0x4ebbx1b,null))[_0x7ef9[44]](function(_0x4ebbx1d){if(_0x4ebbx1d){_0x4ebbx35= _0x4ebbx1d[_0x7ef9[100]]({plain:true});_0x4ebbx2e[_0x7ef9[52]]= _[_0x7ef9[55]](db[_0x7ef9[101]][_0x7ef9[53]]);_0x4ebbx2e[_0x7ef9[57]]= _[_0x7ef9[55]](_0x4ebbx2d[_0x7ef9[57]]);_0x4ebbx2e[_0x7ef9[59]]= _[_0x7ef9[60]](_0x4ebbx2e[_0x7ef9[52]],_0x4ebbx2e[_0x7ef9[57]]);_0x4ebbx20[_0x7ef9[61]]= _[_0x7ef9[60]](_0x4ebbx2e[_0x7ef9[52]],qs[_0x7ef9[62]](_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[62]]));_0x4ebbx20[_0x7ef9[61]]= (_0x4ebbx20[_0x7ef9[61]][_0x7ef9[63]])?_0x4ebbx20[_0x7ef9[61]]:_0x4ebbx2e[_0x7ef9[52]];if(!_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[65]](_0x7ef9[64])){_0x4ebbx20[_0x7ef9[36]]= qs[_0x7ef9[36]](_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[36]]);_0x4ebbx20[_0x7ef9[35]]= qs[_0x7ef9[35]](_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[35]])};_0x4ebbx20[_0x7ef9[66]]= qs[_0x7ef9[67]](_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[67]]);_0x4ebbx20[_0x7ef9[68]]= qs[_0x7ef9[59]](_[_0x7ef9[69]](_0x4ebbx2d[_0x7ef9[57]],_0x4ebbx2e[_0x7ef9[59]]));_0x4ebbx20[_0x7ef9[68]][_0x7ef9[102]]= _0x4ebbx1d[_0x7ef9[83]];if(_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[73]]){_0x4ebbx20[_0x7ef9[68]]= _[_0x7ef9[72]](_0x4ebbx20[_0x7ef9[68]],{$or:_[_0x7ef9[75]](_0x4ebbx20[_0x7ef9[61]],function(_0x4ebbx31){var _0x4ebbx2f={};_0x4ebbx2f[_0x4ebbx31]= {$like:_0x7ef9[74]+ _0x4ebbx2d[_0x7ef9[57]][_0x7ef9[73]]+ _0x7ef9[74]};return _0x4ebbx2f})})};_0x4ebbx20= _[_0x7ef9[72]]({},_0x4ebbx20,_0x4ebbx2d[_0x7ef9[76]]);return db[_0x7ef9[101]][_0x7ef9[81]](_0x4ebbx20)}})[_0x7ef9[44]](function(_0x4ebbx1b){if(_0x4ebbx1b){return db[_0x7ef9[99]][_0x7ef9[98]]({where:{id:_[_0x7ef9[75]](_0x4ebbx1b,_0x7ef9[96]),role:_0x7ef9[97]},attributes:[_0x7ef9[83],_0x7ef9[49],_0x7ef9[93],_0x7ef9[95],_0x7ef9[94]]})}})[_0x7ef9[44]](function(_0x4ebbx1b){if(_0x4ebbx1b){return {count:_0x4ebbx1b[_0x7ef9[34]],rows:_[_0x7ef9[75]](_0x4ebbx1b[_0x7ef9[78]],function(_0x4ebbx36){return {membername:_0x4ebbx36[_0x7ef9[49]],UserId:_0x4ebbx36[_0x7ef9[83]],queue_name:_0x4ebbx35[_0x7ef9[49]],OpenchannelQueueId:_0x4ebbx35[_0x7ef9[83]],interface:util[_0x7ef9[92]](_0x7ef9[90],_0x7ef9[91],_0x4ebbx36[_0x7ef9[49]]),penalty:0,paused:_0x4ebbx36[_0x7ef9[93]],createdAt:_0x4ebbx36[_0x7ef9[94]],updatedAt:_0x4ebbx36[_0x7ef9[95]]}})}}else {return {count:0,rows:[]}}})[_0x7ef9[44]](respondWithFilteredResult(_0x4ebbx1b,_0x4ebbx20))[_0x7ef9[77]](handleError(_0x4ebbx1b,null))};exports[_0x7ef9[104]]= function(_0x4ebbx2d,_0x4ebbx1d,_0x4ebbx34){var _0x4ebbx20={};var _0x4ebbx2e={};var _0x4ebbx37;var _0x4ebbx21;return db[_0x7ef9[54]][_0x7ef9[103]]({where:{id:_0x4ebbx2d[_0x7ef9[84]][_0x7ef9[83]]}})[_0x7ef9[44]](handleEntityNotFound(_0x4ebbx1d,null))[_0x7ef9[44]](function(_0x4ebbx1d){if(_0x4ebbx1d){_0x4ebbx37= _0x4ebbx1d;_0x4ebbx2e[_0x7ef9[52]]= _[_0x7ef9[55]](db[_0x7ef9[105]][_0x7ef9[53]]);_0x4ebbx2e[_0x7ef9[57]]= _[_0x7ef9[55]](_0x4ebbx2d[_0x7ef9[57]]);_0x4ebbx2e[_0x7ef9[59]]= _[_0x7ef9[60]](_0x4ebbx2e[_0x7ef9[52]],_0x4ebbx2e[_0x7ef9[57]]);_0x4ebbx20[_0x7ef9[61]]= _[_0x7ef9[60]](_0x4ebbx2e[_0x7ef9[52]],qs[_0x7ef9[62]](_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[62]]));_0x4ebbx20[_0x7ef9[61]]= (_0x4ebbx20[_0x7ef9[61]][_0x7ef9[63]])?_0x4ebbx20[_0x7ef9[61]]:_0x4ebbx2e[_0x7ef9[52]];_0x4ebbx20[_0x7ef9[66]]= qs[_0x7ef9[67]](_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[67]]);_0x4ebbx20[_0x7ef9[68]]= qs[_0x7ef9[59]](_[_0x7ef9[69]](_0x4ebbx2d[_0x7ef9[57]],_0x4ebbx2e[_0x7ef9[59]]));if(_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[73]]){_0x4ebbx20[_0x7ef9[68]]= _[_0x7ef9[72]](_0x4ebbx20[_0x7ef9[68]],{$or:_[_0x7ef9[75]](_0x4ebbx20[_0x7ef9[61]],function(_0x4ebbx31){var _0x4ebbx2f={};_0x4ebbx2f[_0x4ebbx31]= {$like:_0x7ef9[74]+ _0x4ebbx2d[_0x7ef9[57]][_0x7ef9[73]]+ _0x7ef9[74]};return _0x4ebbx2f})})};_0x4ebbx20= _[_0x7ef9[72]]({},_0x4ebbx20,_0x4ebbx2d[_0x7ef9[76]]);return _0x4ebbx37[_0x7ef9[104]](_0x4ebbx20)}})[_0x7ef9[44]](function(_0x4ebbx38){if(_0x4ebbx38){_0x4ebbx21= _0x4ebbx38[_0x7ef9[63]];if(!_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[65]](_0x7ef9[64])){_0x4ebbx20[_0x7ef9[36]]= qs[_0x7ef9[36]](_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[36]]);_0x4ebbx20[_0x7ef9[35]]= qs[_0x7ef9[35]](_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[35]])};return _0x4ebbx37[_0x7ef9[104]](_0x4ebbx20)}})[_0x7ef9[44]](function(_0x4ebbx33){if(_0x4ebbx33){return _0x4ebbx33?{count:_0x4ebbx21,rows:_0x4ebbx33}:null}})[_0x7ef9[44]](respondWithResult(_0x4ebbx1d,null))[_0x7ef9[77]](handleError(_0x4ebbx1d,null))};exports[_0x7ef9[106]]= function(_0x4ebbx2d,_0x4ebbx1b,_0x4ebbx34){var _0x4ebbx39=[];var _0x4ebbx35;return db[_0x7ef9[105]][_0x7ef9[81]]({where:{id:_0x4ebbx2d[_0x7ef9[87]][_0x7ef9[107]]},attributes:[_0x7ef9[83]],include:[{model:db[_0x7ef9[99]],as:_0x7ef9[110],attributes:[_0x7ef9[83]],raw:true}]})[_0x7ef9[44]](function(_0x4ebbx3c){if(_0x4ebbx3c){for(var _0x4ebbx3d=0;_0x4ebbx3d< _0x4ebbx3c[_0x7ef9[63]];_0x4ebbx3d+= 1){for(var _0x4ebbx3e=0;_0x4ebbx3e< _0x4ebbx3c[_0x4ebbx3d][_0x7ef9[110]][_0x7ef9[63]];_0x4ebbx3e+= 1){_0x4ebbx39= _[_0x7ef9[111]](_0x4ebbx39,[_0x4ebbx3c[_0x4ebbx3d][_0x7ef9[110]][_0x4ebbx3e][_0x7ef9[83]]])}};return _0x4ebbx39}})[_0x7ef9[44]](function(_0x4ebbx3b){if(_0x4ebbx3b){return db[_0x7ef9[54]][_0x7ef9[85]]({where:{id:_0x4ebbx2d[_0x7ef9[84]][_0x7ef9[83]]}})}})[_0x7ef9[44]](function(_0x4ebbx3a){if(_0x4ebbx3a){_0x4ebbx35= _0x4ebbx3a;return _0x4ebbx35[_0x7ef9[109]](_0x4ebbx39,{penalty:_0x4ebbx2d[_0x7ef9[87]][_0x7ef9[108]]})}})[_0x7ef9[44]](function(_0x4ebbx1d){if(_0x4ebbx1d){return _0x4ebbx35[_0x7ef9[106]](_0x4ebbx2d[_0x7ef9[87]][_0x7ef9[107]])}})[_0x7ef9[44]](handleEntityNotFound(_0x4ebbx1b,null))[_0x7ef9[44]](respondWithStatusCode(_0x4ebbx1b,null))[_0x7ef9[77]](handleError(_0x4ebbx1b,null))};exports[_0x7ef9[112]]= function(_0x4ebbx2d,_0x4ebbx1b,_0x4ebbx34){var _0x4ebbx39=[];var _0x4ebbx35;return db[_0x7ef9[105]][_0x7ef9[81]]({where:{id:_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[107]]},attributes:[_0x7ef9[83]],include:[{model:db[_0x7ef9[99]],as:_0x7ef9[110],attributes:[_0x7ef9[83]],raw:true}]})[_0x7ef9[44]](function(_0x4ebbx3c){if(_0x4ebbx3c){for(var _0x4ebbx3d=0;_0x4ebbx3d< _0x4ebbx3c[_0x7ef9[63]];_0x4ebbx3d+= 1){for(var _0x4ebbx3e=0;_0x4ebbx3e< _0x4ebbx3c[_0x4ebbx3d][_0x7ef9[110]][_0x7ef9[63]];_0x4ebbx3e+= 1){_0x4ebbx39= _[_0x7ef9[111]](_0x4ebbx39,[_0x4ebbx3c[_0x4ebbx3d][_0x7ef9[110]][_0x4ebbx3e][_0x7ef9[83]]])}};return _0x4ebbx39}})[_0x7ef9[44]](function(_0x4ebbx3b){if(_0x4ebbx3b){return db[_0x7ef9[54]][_0x7ef9[85]]({where:{id:_0x4ebbx2d[_0x7ef9[84]][_0x7ef9[83]]}})}})[_0x7ef9[44]](function(_0x4ebbx3a){if(_0x4ebbx3a){_0x4ebbx35= _0x4ebbx3a;return _0x4ebbx35[_0x7ef9[113]](_0x4ebbx39)}})[_0x7ef9[44]](function(_0x4ebbx1d){if(_0x4ebbx35){return _0x4ebbx35[_0x7ef9[112]](_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[107]])}})[_0x7ef9[44]](handleEntityNotFound(_0x4ebbx1b,null))[_0x7ef9[44]](respondWithStatusCode(_0x4ebbx1b,null))[_0x7ef9[77]](handleError(_0x4ebbx1b,null))};exports[_0x7ef9[109]]= function(_0x4ebbx2d,_0x4ebbx1b,_0x4ebbx34){return db[_0x7ef9[54]][_0x7ef9[85]]({where:{id:_0x4ebbx2d[_0x7ef9[84]][_0x7ef9[83]]}})[_0x7ef9[44]](handleEntityNotFound(_0x4ebbx1b,null))[_0x7ef9[44]](function(_0x4ebbx1d){if(_0x4ebbx1d){return _0x4ebbx1d[_0x7ef9[109]](_0x4ebbx2d[_0x7ef9[87]][_0x7ef9[107]],_[_0x7ef9[117]](_0x4ebbx2d[_0x7ef9[87]],[_0x7ef9[107],_0x7ef9[83]])|| {})[_0x7ef9[116]](function(_0x4ebbx38){for(var _0x4ebbx3d=0;_0x4ebbx3d< _0x4ebbx2d[_0x7ef9[87]][_0x7ef9[107]][_0x7ef9[63]];_0x4ebbx3d+= 1){socket[_0x7ef9[115]](_0x7ef9[114],{UserId:_0x4ebbx2d[_0x7ef9[87]][_0x7ef9[107]][_0x4ebbx3d],OpenchannelQueueId:_0x4ebbx2d[_0x7ef9[84]][_0x7ef9[83]]})};return _0x4ebbx38})}})[_0x7ef9[44]](respondWithResult(_0x4ebbx1b,null))[_0x7ef9[77]](handleError(_0x4ebbx1b,null))};exports[_0x7ef9[113]]= function(_0x4ebbx2d,_0x4ebbx1b,_0x4ebbx34){var _0x4ebbx38;return db[_0x7ef9[54]][_0x7ef9[85]]({where:{id:_0x4ebbx2d[_0x7ef9[84]][_0x7ef9[83]]}})[_0x7ef9[44]](handleEntityNotFound(_0x4ebbx1b,null))[_0x7ef9[44]](function(_0x4ebbx1d){if(_0x4ebbx1d){return _0x4ebbx1d[_0x7ef9[113]](_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[107]])[_0x7ef9[44]](function(_0x4ebbx38){if(_[_0x7ef9[118]](_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[107]])){for(var _0x4ebbx3d=0;_0x4ebbx3d< _0x4ebbx2d[_0x7ef9[57]][_0x7ef9[107]][_0x7ef9[63]];_0x4ebbx3d+= 1){socket[_0x7ef9[115]](_0x7ef9[119],{UserId:_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[107]][_0x4ebbx3d],OpenchannelQueueId:_0x4ebbx2d[_0x7ef9[84]][_0x7ef9[83]]})}}else {socket[_0x7ef9[115]](_0x7ef9[119],{UserId:_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[107]],OpenchannelQueueId:_0x4ebbx2d[_0x7ef9[84]][_0x7ef9[83]]})}})}})[_0x7ef9[44]](respondWithStatusCode(_0x4ebbx1b,null))[_0x7ef9[77]](handleError(_0x4ebbx1b,null))};exports[_0x7ef9[120]]= function(_0x4ebbx2d,_0x4ebbx1d,_0x4ebbx34){var _0x4ebbx20={};var _0x4ebbx2e={};var _0x4ebbx37;var _0x4ebbx21;return db[_0x7ef9[54]][_0x7ef9[103]]({where:{id:_0x4ebbx2d[_0x7ef9[84]][_0x7ef9[83]]}})[_0x7ef9[44]](handleEntityNotFound(_0x4ebbx1d,null))[_0x7ef9[44]](function(_0x4ebbx1d){if(_0x4ebbx1d){_0x4ebbx37= _0x4ebbx1d;_0x4ebbx2e[_0x7ef9[52]]= _[_0x7ef9[55]](db[_0x7ef9[99]][_0x7ef9[53]]);_0x4ebbx2e[_0x7ef9[57]]= _[_0x7ef9[55]](_0x4ebbx2d[_0x7ef9[57]]);_0x4ebbx2e[_0x7ef9[59]]= _[_0x7ef9[60]](_0x4ebbx2e[_0x7ef9[52]],_0x4ebbx2e[_0x7ef9[57]]);_0x4ebbx20[_0x7ef9[61]]= _[_0x7ef9[60]](_0x4ebbx2e[_0x7ef9[52]],qs[_0x7ef9[62]](_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[62]]));_0x4ebbx20[_0x7ef9[61]]= (_0x4ebbx20[_0x7ef9[61]][_0x7ef9[63]])?_0x4ebbx20[_0x7ef9[61]]:_0x4ebbx2e[_0x7ef9[52]];_0x4ebbx20[_0x7ef9[66]]= qs[_0x7ef9[67]](_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[67]]);_0x4ebbx20[_0x7ef9[68]]= qs[_0x7ef9[59]](_[_0x7ef9[69]](_0x4ebbx2d[_0x7ef9[57]],_0x4ebbx2e[_0x7ef9[59]]));if(_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[73]]){_0x4ebbx20[_0x7ef9[68]]= _[_0x7ef9[72]](_0x4ebbx20[_0x7ef9[68]],{$or:_[_0x7ef9[75]](_0x4ebbx20[_0x7ef9[61]],function(_0x4ebbx31){var _0x4ebbx2f={};_0x4ebbx2f[_0x4ebbx31]= {$like:_0x7ef9[74]+ _0x4ebbx2d[_0x7ef9[57]][_0x7ef9[73]]+ _0x7ef9[74]};return _0x4ebbx2f})})};_0x4ebbx20= _[_0x7ef9[72]]({},_0x4ebbx20,_0x4ebbx2d[_0x7ef9[76]]);return _0x4ebbx37[_0x7ef9[120]](_0x4ebbx20)}})[_0x7ef9[44]](function(_0x4ebbx38){if(_0x4ebbx38){_0x4ebbx21= _0x4ebbx38[_0x7ef9[63]];if(!_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[65]](_0x7ef9[64])){_0x4ebbx20[_0x7ef9[36]]= qs[_0x7ef9[36]](_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[36]]);_0x4ebbx20[_0x7ef9[35]]= qs[_0x7ef9[35]](_0x4ebbx2d[_0x7ef9[57]][_0x7ef9[35]])};return _0x4ebbx37[_0x7ef9[120]](_0x4ebbx20)}})[_0x7ef9[44]](function(_0x4ebbx33){if(_0x4ebbx33){return _0x4ebbx33?{count:_0x4ebbx21,rows:_0x4ebbx33}:null}})[_0x7ef9[44]](respondWithResult(_0x4ebbx1d,null))[_0x7ef9[77]](handleError(_0x4ebbx1d,null))}
\ No newline at end of file
+var _0x79b0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x66\x6F\x72\x6D\x61\x74","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x50\x61\x75\x73\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x55\x73\x65\x72\x49\x64","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x55\x73\x65\x72","\x67\x65\x74","\x55\x73\x65\x72\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x54\x65\x61\x6D\x73","\x54\x65\x61\x6D","\x61\x64\x64\x54\x65\x61\x6D\x73","\x69\x64\x73","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x41\x67\x65\x6E\x74\x73","\x75\x6E\x69\x6F\x6E","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x75\x73\x65\x72\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x6F\x6D\x69\x74","\x69\x73\x41\x72\x72\x61\x79","\x75\x73\x65\x72\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x67\x65\x74\x41\x67\x65\x6E\x74\x73"];_0x79b0[0];var jsonpatch=require(_0x79b0[1]);var rp=require(_0x79b0[2]);var moment=require(_0x79b0[3]);var BPromise=require(_0x79b0[4]);var Mustache=require(_0x79b0[5]);var util=require(_0x79b0[6]);var path=require(_0x79b0[7]);var sox=require(_0x79b0[8]);var csv=require(_0x79b0[9]);var ejs=require(_0x79b0[10]);var fs=require(_0x79b0[11]);var _=require(_0x79b0[12]);var squel=require(_0x79b0[13]);var crypto=require(_0x79b0[14]);var jsforce=require(_0x79b0[15]);var deskjs=require(_0x79b0[16]);var toCsv=require(_0x79b0[9]);var querystring=require(_0x79b0[17]);var Papa=require(_0x79b0[18]);var qs=require(_0x79b0[19]);var logger=require(_0x79b0[21])(_0x79b0[20]);var utils=require(_0x79b0[22]);var config=require(_0x79b0[23]);var db=require(_0x79b0[25])[_0x79b0[24]];var socket=require(_0x79b0[27])({host:_0x79b0[26],port:6379});require(_0x79b0[29])[_0x79b0[28]](socket);function respondWithStatusCode(_0x1ef6x1b,_0x1ef6x1c){_0x1ef6x1c= _0x1ef6x1c|| 204;return function(_0x1ef6x1d){if(_0x1ef6x1d){return _0x1ef6x1b[_0x79b0[30]](_0x1ef6x1c)};return _0x1ef6x1b[_0x79b0[32]](_0x1ef6x1c)[_0x79b0[31]]()}}function respondWithResult(_0x1ef6x1b,_0x1ef6x1c){_0x1ef6x1c= _0x1ef6x1c|| 200;return function(_0x1ef6x1d){if(_0x1ef6x1d){return _0x1ef6x1b[_0x79b0[32]](_0x1ef6x1c)[_0x79b0[33]](_0x1ef6x1d)}}}function respondWithFilteredResult(_0x1ef6x1b,_0x1ef6x20){return function(_0x1ef6x1d){if(_0x1ef6x1d){var _0x1ef6x21=_0x1ef6x1d[_0x79b0[34]],_0x1ef6x22=_0x1ef6x20[_0x79b0[35]],_0x1ef6x23=_0x1ef6x20[_0x79b0[35]]+ _0x1ef6x20[_0x79b0[36]],_0x1ef6x1c;if(_0x1ef6x23>= _0x1ef6x21){_0x1ef6x23= _0x1ef6x21;_0x1ef6x1c= 200}else {_0x1ef6x1c= 206};_0x1ef6x1b[_0x79b0[32]](_0x1ef6x1c);return _0x1ef6x1b[_0x79b0[40]](_0x79b0[37],_0x1ef6x22+ _0x79b0[38]+ _0x1ef6x23+ _0x79b0[39]+ _0x1ef6x21)[_0x79b0[33]](_0x1ef6x1d)};return null}}function patchUpdates(_0x1ef6x25){return function(_0x1ef6x1d){try{jsonpatch[_0x79b0[41]](_0x1ef6x1d,_0x1ef6x25,true)}catch(err){return BPromise[_0x79b0[42]](err)};return _0x1ef6x1d[_0x79b0[43]]()}}function saveUpdates(_0x1ef6x27,_0x1ef6x1c){return function(_0x1ef6x1d){if(_0x1ef6x1d){return _0x1ef6x1d[_0x79b0[45]](_0x1ef6x27)[_0x79b0[44]](function(_0x1ef6x28){return _0x1ef6x28})};return null}}function removeEntity(_0x1ef6x1b,_0x1ef6x1c){return function(_0x1ef6x1d){if(_0x1ef6x1d){return _0x1ef6x1d[_0x79b0[46]]()[_0x79b0[44]](function(){_0x1ef6x1b[_0x79b0[32]](204)[_0x79b0[31]]()})}}}function handleEntityNotFound(_0x1ef6x1b,_0x1ef6x1c){return function(_0x1ef6x1d){if(!_0x1ef6x1d){_0x1ef6x1b[_0x79b0[30]](404)};return _0x1ef6x1d}}function handleError(_0x1ef6x1b,_0x1ef6x1c){_0x1ef6x1c= _0x1ef6x1c|| 500;return function(_0x1ef6x2c){logger[_0x79b0[48]](_0x1ef6x2c[_0x79b0[47]]);if(_0x1ef6x2c[_0x79b0[49]]){delete _0x1ef6x2c[_0x79b0[49]]};_0x1ef6x1b[_0x79b0[32]](_0x1ef6x1c)[_0x79b0[50]](_0x1ef6x2c)}}exports[_0x79b0[51]]= function(_0x1ef6x2d,_0x1ef6x1b){var _0x1ef6x20={},_0x1ef6x2e={},_0x1ef6x2f={count:0,rows:[]};_0x1ef6x2e[_0x79b0[52]]= _[_0x79b0[55]](db[_0x79b0[54]][_0x79b0[53]]);var _0x1ef6x30={dateStart:_0x1ef6x2d[_0x79b0[57]][_0x79b0[56]],dateEnd:_0x1ef6x2d[_0x79b0[57]][_0x79b0[58]]};delete _0x1ef6x2d[_0x79b0[57]][_0x79b0[56]];delete _0x1ef6x2d[_0x79b0[57]][_0x79b0[58]];_0x1ef6x2e[_0x79b0[57]]= _[_0x79b0[55]](_0x1ef6x2d[_0x79b0[57]]);_0x1ef6x2e[_0x79b0[59]]= _[_0x79b0[60]](_0x1ef6x2e[_0x79b0[52]],_0x1ef6x2e[_0x79b0[57]]);_0x1ef6x20[_0x79b0[61]]= _[_0x79b0[60]](_0x1ef6x2e[_0x79b0[52]],qs[_0x79b0[62]](_0x1ef6x2d[_0x79b0[57]][_0x79b0[62]]));_0x1ef6x20[_0x79b0[61]]= (_0x1ef6x20[_0x79b0[61]][_0x79b0[63]])?_0x1ef6x20[_0x79b0[61]]:_0x1ef6x2e[_0x79b0[52]];if(!_0x1ef6x2d[_0x79b0[57]][_0x79b0[65]](_0x79b0[64])){_0x1ef6x20[_0x79b0[36]]= qs[_0x79b0[36]](_0x1ef6x2d[_0x79b0[57]][_0x79b0[36]]);_0x1ef6x20[_0x79b0[35]]= qs[_0x79b0[35]](_0x1ef6x2d[_0x79b0[57]][_0x79b0[35]])};_0x1ef6x20[_0x79b0[66]]= qs[_0x79b0[67]](_0x1ef6x2d[_0x79b0[57]][_0x79b0[67]]);_0x1ef6x20[_0x79b0[68]]= qs[_0x79b0[59]](_[_0x79b0[69]](_0x1ef6x2d[_0x79b0[57]],_0x1ef6x2e[_0x79b0[59]]));if(_0x1ef6x30[_0x79b0[56]]){if(_0x1ef6x30[_0x79b0[58]]){_0x1ef6x30[_0x79b0[58]]= moment(_0x1ef6x30[_0x79b0[58]])[_0x79b0[71]](1,_0x79b0[70])}else {_0x1ef6x30[_0x79b0[58]]= moment(_0x1ef6x30[_0x79b0[56]])[_0x79b0[71]](1,_0x79b0[70])};_[_0x79b0[72]](_0x1ef6x20[_0x79b0[68]],{createdAt:{$gte:_0x1ef6x30[_0x79b0[56]],$lte:_0x1ef6x30[_0x79b0[58]]}})};if(_0x1ef6x2d[_0x79b0[57]][_0x79b0[73]]){_0x1ef6x20[_0x79b0[68]]= _[_0x79b0[72]](_0x1ef6x20[_0x79b0[68]],{$or:_[_0x79b0[75]](_0x1ef6x20[_0x79b0[61]],function(_0x1ef6x31){var _0x1ef6x2f={};_0x1ef6x2f[_0x1ef6x31]= {$like:_0x79b0[74]+ _0x1ef6x2d[_0x79b0[57]][_0x79b0[73]]+ _0x79b0[74]};return _0x1ef6x2f})})};_0x1ef6x20= _[_0x79b0[72]]({},_0x1ef6x20,_0x1ef6x2d[_0x79b0[76]]);var _0x1ef6x32={where:_0x1ef6x20[_0x79b0[68]]};return db[_0x79b0[54]][_0x79b0[34]](_0x1ef6x32)[_0x79b0[44]](function(_0x1ef6x21){_0x1ef6x2f[_0x79b0[34]]= _0x1ef6x21;if(_0x1ef6x2d[_0x79b0[57]][_0x79b0[79]]){_0x1ef6x20[_0x79b0[80]]= [{all:true}]};return db[_0x79b0[54]][_0x79b0[81]](_0x1ef6x20)})[_0x79b0[44]](function(_0x1ef6x33){_0x1ef6x2f[_0x79b0[78]]= _0x1ef6x33;return _0x1ef6x2f})[_0x79b0[44]](respondWithFilteredResult(_0x1ef6x1b,_0x1ef6x20))[_0x79b0[77]](handleError(_0x1ef6x1b,null))};exports[_0x79b0[82]]= function(_0x1ef6x2d,_0x1ef6x1b){var _0x1ef6x20={raw:true,where:{id:_0x1ef6x2d[_0x79b0[84]][_0x79b0[83]]}},_0x1ef6x2e={};_0x1ef6x2e[_0x79b0[52]]= _[_0x79b0[55]](db[_0x79b0[54]][_0x79b0[53]]);_0x1ef6x2e[_0x79b0[57]]= _[_0x79b0[55]](_0x1ef6x2d[_0x79b0[57]]);_0x1ef6x2e[_0x79b0[59]]= _[_0x79b0[60]](_0x1ef6x2e[_0x79b0[52]],_0x1ef6x2e[_0x79b0[57]]);_0x1ef6x20[_0x79b0[61]]= _[_0x79b0[60]](_0x1ef6x2e[_0x79b0[52]],qs[_0x79b0[62]](_0x1ef6x2d[_0x79b0[57]][_0x79b0[62]]));_0x1ef6x20[_0x79b0[61]]= (_0x1ef6x20[_0x79b0[61]][_0x79b0[63]])?_0x1ef6x20[_0x79b0[61]]:_0x1ef6x2e[_0x79b0[52]];if(_0x1ef6x2d[_0x79b0[57]][_0x79b0[79]]){_0x1ef6x20[_0x79b0[80]]= [{all:true}]};_0x1ef6x20= _[_0x79b0[72]]({},_0x1ef6x20,_0x1ef6x2d[_0x79b0[76]]);return db[_0x79b0[54]][_0x79b0[85]](_0x1ef6x20)[_0x79b0[44]](handleEntityNotFound(_0x1ef6x1b,null))[_0x79b0[44]](respondWithResult(_0x1ef6x1b,null))[_0x79b0[77]](handleError(_0x1ef6x1b,null))};exports[_0x79b0[86]]= function(_0x1ef6x2d,_0x1ef6x1b){return db[_0x79b0[54]][_0x79b0[86]](_0x1ef6x2d[_0x79b0[87]],{})[_0x79b0[44]](respondWithResult(_0x1ef6x1b,201))[_0x79b0[77]](handleError(_0x1ef6x1b,null))};exports[_0x79b0[45]]= function(_0x1ef6x2d,_0x1ef6x1b){if(_0x1ef6x2d[_0x79b0[87]][_0x79b0[83]]){delete _0x1ef6x2d[_0x79b0[87]][_0x79b0[83]]};return db[_0x79b0[54]][_0x79b0[85]]({where:{id:_0x1ef6x2d[_0x79b0[84]][_0x79b0[83]]}})[_0x79b0[44]](handleEntityNotFound(_0x1ef6x1b,null))[_0x79b0[44]](saveUpdates(_0x1ef6x2d[_0x79b0[87]],null))[_0x79b0[44]](respondWithResult(_0x1ef6x1b,null))[_0x79b0[77]](handleError(_0x1ef6x1b,null))};exports[_0x79b0[46]]= function(_0x1ef6x2d,_0x1ef6x1b){return db[_0x79b0[54]][_0x79b0[85]]({where:{id:_0x1ef6x2d[_0x79b0[84]][_0x79b0[83]]}})[_0x79b0[44]](handleEntityNotFound(_0x1ef6x1b,null))[_0x79b0[44]](removeEntity(_0x1ef6x1b,null))[_0x79b0[77]](handleError(_0x1ef6x1b,null))};exports[_0x79b0[88]]= function(_0x1ef6x2d,_0x1ef6x1b){return db[_0x79b0[54]][_0x79b0[88]]()[_0x79b0[44]](respondWithResult(_0x1ef6x1b,null))[_0x79b0[77]](handleError(_0x1ef6x1b,null))};exports[_0x79b0[89]]= function(_0x1ef6x2d,_0x1ef6x1b,_0x1ef6x34){var _0x1ef6x20={raw:true,where:{}},_0x1ef6x2e={},_0x1ef6x35;return db[_0x79b0[54]][_0x79b0[103]]({where:{id:_0x1ef6x2d[_0x79b0[84]][_0x79b0[83]]}})[_0x79b0[44]](handleEntityNotFound(_0x1ef6x1b,null))[_0x79b0[44]](function(_0x1ef6x1d){if(_0x1ef6x1d){_0x1ef6x35= _0x1ef6x1d[_0x79b0[100]]({plain:true});_0x1ef6x2e[_0x79b0[52]]= _[_0x79b0[55]](db[_0x79b0[101]][_0x79b0[53]]);_0x1ef6x2e[_0x79b0[57]]= _[_0x79b0[55]](_0x1ef6x2d[_0x79b0[57]]);_0x1ef6x2e[_0x79b0[59]]= _[_0x79b0[60]](_0x1ef6x2e[_0x79b0[52]],_0x1ef6x2e[_0x79b0[57]]);_0x1ef6x20[_0x79b0[61]]= _[_0x79b0[60]](_0x1ef6x2e[_0x79b0[52]],qs[_0x79b0[62]](_0x1ef6x2d[_0x79b0[57]][_0x79b0[62]]));_0x1ef6x20[_0x79b0[61]]= (_0x1ef6x20[_0x79b0[61]][_0x79b0[63]])?_0x1ef6x20[_0x79b0[61]]:_0x1ef6x2e[_0x79b0[52]];if(!_0x1ef6x2d[_0x79b0[57]][_0x79b0[65]](_0x79b0[64])){_0x1ef6x20[_0x79b0[36]]= qs[_0x79b0[36]](_0x1ef6x2d[_0x79b0[57]][_0x79b0[36]]);_0x1ef6x20[_0x79b0[35]]= qs[_0x79b0[35]](_0x1ef6x2d[_0x79b0[57]][_0x79b0[35]])};_0x1ef6x20[_0x79b0[66]]= qs[_0x79b0[67]](_0x1ef6x2d[_0x79b0[57]][_0x79b0[67]]);_0x1ef6x20[_0x79b0[68]]= qs[_0x79b0[59]](_[_0x79b0[69]](_0x1ef6x2d[_0x79b0[57]],_0x1ef6x2e[_0x79b0[59]]));_0x1ef6x20[_0x79b0[68]][_0x79b0[102]]= _0x1ef6x1d[_0x79b0[83]];if(_0x1ef6x2d[_0x79b0[57]][_0x79b0[73]]){_0x1ef6x20[_0x79b0[68]]= _[_0x79b0[72]](_0x1ef6x20[_0x79b0[68]],{$or:_[_0x79b0[75]](_0x1ef6x20[_0x79b0[61]],function(_0x1ef6x31){var _0x1ef6x2f={};_0x1ef6x2f[_0x1ef6x31]= {$like:_0x79b0[74]+ _0x1ef6x2d[_0x79b0[57]][_0x79b0[73]]+ _0x79b0[74]};return _0x1ef6x2f})})};_0x1ef6x20= _[_0x79b0[72]]({},_0x1ef6x20,_0x1ef6x2d[_0x79b0[76]]);return db[_0x79b0[101]][_0x79b0[81]](_0x1ef6x20)}})[_0x79b0[44]](function(_0x1ef6x1b){if(_0x1ef6x1b){return db[_0x79b0[99]][_0x79b0[98]]({where:{id:_[_0x79b0[75]](_0x1ef6x1b,_0x79b0[96]),role:_0x79b0[97]},attributes:[_0x79b0[83],_0x79b0[49],_0x79b0[93],_0x79b0[95],_0x79b0[94]]})}})[_0x79b0[44]](function(_0x1ef6x1b){if(_0x1ef6x1b){return {count:_0x1ef6x1b[_0x79b0[34]],rows:_[_0x79b0[75]](_0x1ef6x1b[_0x79b0[78]],function(_0x1ef6x36){return {membername:_0x1ef6x36[_0x79b0[49]],UserId:_0x1ef6x36[_0x79b0[83]],queue_name:_0x1ef6x35[_0x79b0[49]],OpenchannelQueueId:_0x1ef6x35[_0x79b0[83]],interface:util[_0x79b0[92]](_0x79b0[90],_0x79b0[91],_0x1ef6x36[_0x79b0[49]]),penalty:0,paused:_0x1ef6x36[_0x79b0[93]],createdAt:_0x1ef6x36[_0x79b0[94]],updatedAt:_0x1ef6x36[_0x79b0[95]]}})}}else {return {count:0,rows:[]}}})[_0x79b0[44]](respondWithFilteredResult(_0x1ef6x1b,_0x1ef6x20))[_0x79b0[77]](handleError(_0x1ef6x1b,null))};exports[_0x79b0[104]]= function(_0x1ef6x2d,_0x1ef6x1d,_0x1ef6x34){var _0x1ef6x20={};var _0x1ef6x2e={};var _0x1ef6x37;var _0x1ef6x21;return db[_0x79b0[54]][_0x79b0[103]]({where:{id:_0x1ef6x2d[_0x79b0[84]][_0x79b0[83]]}})[_0x79b0[44]](handleEntityNotFound(_0x1ef6x1d,null))[_0x79b0[44]](function(_0x1ef6x1d){if(_0x1ef6x1d){_0x1ef6x37= _0x1ef6x1d;_0x1ef6x2e[_0x79b0[52]]= _[_0x79b0[55]](db[_0x79b0[105]][_0x79b0[53]]);_0x1ef6x2e[_0x79b0[57]]= _[_0x79b0[55]](_0x1ef6x2d[_0x79b0[57]]);_0x1ef6x2e[_0x79b0[59]]= _[_0x79b0[60]](_0x1ef6x2e[_0x79b0[52]],_0x1ef6x2e[_0x79b0[57]]);_0x1ef6x20[_0x79b0[61]]= _[_0x79b0[60]](_0x1ef6x2e[_0x79b0[52]],qs[_0x79b0[62]](_0x1ef6x2d[_0x79b0[57]][_0x79b0[62]]));_0x1ef6x20[_0x79b0[61]]= (_0x1ef6x20[_0x79b0[61]][_0x79b0[63]])?_0x1ef6x20[_0x79b0[61]]:_0x1ef6x2e[_0x79b0[52]];_0x1ef6x20[_0x79b0[66]]= qs[_0x79b0[67]](_0x1ef6x2d[_0x79b0[57]][_0x79b0[67]]);_0x1ef6x20[_0x79b0[68]]= qs[_0x79b0[59]](_[_0x79b0[69]](_0x1ef6x2d[_0x79b0[57]],_0x1ef6x2e[_0x79b0[59]]));if(_0x1ef6x2d[_0x79b0[57]][_0x79b0[73]]){_0x1ef6x20[_0x79b0[68]]= _[_0x79b0[72]](_0x1ef6x20[_0x79b0[68]],{$or:_[_0x79b0[75]](_0x1ef6x20[_0x79b0[61]],function(_0x1ef6x31){var _0x1ef6x2f={};_0x1ef6x2f[_0x1ef6x31]= {$like:_0x79b0[74]+ _0x1ef6x2d[_0x79b0[57]][_0x79b0[73]]+ _0x79b0[74]};return _0x1ef6x2f})})};_0x1ef6x20= _[_0x79b0[72]]({},_0x1ef6x20,_0x1ef6x2d[_0x79b0[76]]);return _0x1ef6x37[_0x79b0[104]](_0x1ef6x20)}})[_0x79b0[44]](function(_0x1ef6x38){if(_0x1ef6x38){_0x1ef6x21= _0x1ef6x38[_0x79b0[63]];if(!_0x1ef6x2d[_0x79b0[57]][_0x79b0[65]](_0x79b0[64])){_0x1ef6x20[_0x79b0[36]]= qs[_0x79b0[36]](_0x1ef6x2d[_0x79b0[57]][_0x79b0[36]]);_0x1ef6x20[_0x79b0[35]]= qs[_0x79b0[35]](_0x1ef6x2d[_0x79b0[57]][_0x79b0[35]])};return _0x1ef6x37[_0x79b0[104]](_0x1ef6x20)}})[_0x79b0[44]](function(_0x1ef6x33){if(_0x1ef6x33){return _0x1ef6x33?{count:_0x1ef6x21,rows:_0x1ef6x33}:null}})[_0x79b0[44]](respondWithResult(_0x1ef6x1d,null))[_0x79b0[77]](handleError(_0x1ef6x1d,null))};exports[_0x79b0[106]]= function(_0x1ef6x2d,_0x1ef6x1b,_0x1ef6x34){var _0x1ef6x39=[];var _0x1ef6x35;return db[_0x79b0[105]][_0x79b0[81]]({where:{id:_0x1ef6x2d[_0x79b0[87]][_0x79b0[107]]},attributes:[_0x79b0[83]],include:[{model:db[_0x79b0[99]],as:_0x79b0[110],attributes:[_0x79b0[83]],raw:true}]})[_0x79b0[44]](function(_0x1ef6x3c){if(_0x1ef6x3c){for(var _0x1ef6x3d=0;_0x1ef6x3d< _0x1ef6x3c[_0x79b0[63]];_0x1ef6x3d+= 1){for(var _0x1ef6x3e=0;_0x1ef6x3e< _0x1ef6x3c[_0x1ef6x3d][_0x79b0[110]][_0x79b0[63]];_0x1ef6x3e+= 1){_0x1ef6x39= _[_0x79b0[111]](_0x1ef6x39,[_0x1ef6x3c[_0x1ef6x3d][_0x79b0[110]][_0x1ef6x3e][_0x79b0[83]]])}};return _0x1ef6x39}})[_0x79b0[44]](function(_0x1ef6x3b){if(_0x1ef6x3b){return db[_0x79b0[54]][_0x79b0[85]]({where:{id:_0x1ef6x2d[_0x79b0[84]][_0x79b0[83]]}})}})[_0x79b0[44]](function(_0x1ef6x3a){if(_0x1ef6x3a){_0x1ef6x35= _0x1ef6x3a;return _0x1ef6x35[_0x79b0[109]](_0x1ef6x39,{penalty:_0x1ef6x2d[_0x79b0[87]][_0x79b0[108]]})}})[_0x79b0[44]](function(_0x1ef6x1d){if(_0x1ef6x1d){return _0x1ef6x35[_0x79b0[106]](_0x1ef6x2d[_0x79b0[87]][_0x79b0[107]])}})[_0x79b0[44]](handleEntityNotFound(_0x1ef6x1b,null))[_0x79b0[44]](respondWithStatusCode(_0x1ef6x1b,null))[_0x79b0[77]](handleError(_0x1ef6x1b,null))};exports[_0x79b0[112]]= function(_0x1ef6x2d,_0x1ef6x1b,_0x1ef6x34){var _0x1ef6x39=[];var _0x1ef6x35;return db[_0x79b0[105]][_0x79b0[81]]({where:{id:_0x1ef6x2d[_0x79b0[57]][_0x79b0[107]]},attributes:[_0x79b0[83]],include:[{model:db[_0x79b0[99]],as:_0x79b0[110],attributes:[_0x79b0[83]],raw:true}]})[_0x79b0[44]](function(_0x1ef6x3c){if(_0x1ef6x3c){for(var _0x1ef6x3d=0;_0x1ef6x3d< _0x1ef6x3c[_0x79b0[63]];_0x1ef6x3d+= 1){for(var _0x1ef6x3e=0;_0x1ef6x3e< _0x1ef6x3c[_0x1ef6x3d][_0x79b0[110]][_0x79b0[63]];_0x1ef6x3e+= 1){_0x1ef6x39= _[_0x79b0[111]](_0x1ef6x39,[_0x1ef6x3c[_0x1ef6x3d][_0x79b0[110]][_0x1ef6x3e][_0x79b0[83]]])}};return _0x1ef6x39}})[_0x79b0[44]](function(_0x1ef6x3b){if(_0x1ef6x3b){return db[_0x79b0[54]][_0x79b0[85]]({where:{id:_0x1ef6x2d[_0x79b0[84]][_0x79b0[83]]}})}})[_0x79b0[44]](function(_0x1ef6x3a){if(_0x1ef6x3a){_0x1ef6x35= _0x1ef6x3a;return _0x1ef6x35[_0x79b0[113]](_0x1ef6x39)}})[_0x79b0[44]](function(_0x1ef6x1d){if(_0x1ef6x35){return _0x1ef6x35[_0x79b0[112]](_0x1ef6x2d[_0x79b0[57]][_0x79b0[107]])}})[_0x79b0[44]](handleEntityNotFound(_0x1ef6x1b,null))[_0x79b0[44]](respondWithStatusCode(_0x1ef6x1b,null))[_0x79b0[77]](handleError(_0x1ef6x1b,null))};exports[_0x79b0[109]]= function(_0x1ef6x2d,_0x1ef6x1b,_0x1ef6x34){return db[_0x79b0[54]][_0x79b0[85]]({where:{id:_0x1ef6x2d[_0x79b0[84]][_0x79b0[83]]}})[_0x79b0[44]](handleEntityNotFound(_0x1ef6x1b,null))[_0x79b0[44]](function(_0x1ef6x1d){if(_0x1ef6x1d){return _0x1ef6x1d[_0x79b0[109]](_0x1ef6x2d[_0x79b0[87]][_0x79b0[107]],_[_0x79b0[117]](_0x1ef6x2d[_0x79b0[87]],[_0x79b0[107],_0x79b0[83]])|| {})[_0x79b0[116]](function(_0x1ef6x38){for(var _0x1ef6x3d=0;_0x1ef6x3d< _0x1ef6x2d[_0x79b0[87]][_0x79b0[107]][_0x79b0[63]];_0x1ef6x3d+= 1){socket[_0x79b0[115]](_0x79b0[114],{UserId:_0x1ef6x2d[_0x79b0[87]][_0x79b0[107]][_0x1ef6x3d],OpenchannelQueueId:_0x1ef6x2d[_0x79b0[84]][_0x79b0[83]]})};return _0x1ef6x38})}})[_0x79b0[44]](respondWithResult(_0x1ef6x1b,null))[_0x79b0[77]](handleError(_0x1ef6x1b,null))};exports[_0x79b0[113]]= function(_0x1ef6x2d,_0x1ef6x1b,_0x1ef6x34){var _0x1ef6x38;return db[_0x79b0[54]][_0x79b0[85]]({where:{id:_0x1ef6x2d[_0x79b0[84]][_0x79b0[83]]}})[_0x79b0[44]](handleEntityNotFound(_0x1ef6x1b,null))[_0x79b0[44]](function(_0x1ef6x1d){if(_0x1ef6x1d){return _0x1ef6x1d[_0x79b0[113]](_0x1ef6x2d[_0x79b0[57]][_0x79b0[107]])[_0x79b0[44]](function(_0x1ef6x38){if(_[_0x79b0[118]](_0x1ef6x2d[_0x79b0[57]][_0x79b0[107]])){for(var _0x1ef6x3d=0;_0x1ef6x3d< _0x1ef6x2d[_0x79b0[57]][_0x79b0[107]][_0x79b0[63]];_0x1ef6x3d+= 1){socket[_0x79b0[115]](_0x79b0[119],{UserId:_0x1ef6x2d[_0x79b0[57]][_0x79b0[107]][_0x1ef6x3d],OpenchannelQueueId:_0x1ef6x2d[_0x79b0[84]][_0x79b0[83]]})}}else {socket[_0x79b0[115]](_0x79b0[119],{UserId:_0x1ef6x2d[_0x79b0[57]][_0x79b0[107]],OpenchannelQueueId:_0x1ef6x2d[_0x79b0[84]][_0x79b0[83]]})}})}})[_0x79b0[44]](respondWithStatusCode(_0x1ef6x1b,null))[_0x79b0[77]](handleError(_0x1ef6x1b,null))};exports[_0x79b0[120]]= function(_0x1ef6x2d,_0x1ef6x1d,_0x1ef6x34){var _0x1ef6x20={};var _0x1ef6x2e={};var _0x1ef6x37;var _0x1ef6x21;return db[_0x79b0[54]][_0x79b0[103]]({where:{id:_0x1ef6x2d[_0x79b0[84]][_0x79b0[83]]}})[_0x79b0[44]](handleEntityNotFound(_0x1ef6x1d,null))[_0x79b0[44]](function(_0x1ef6x1d){if(_0x1ef6x1d){_0x1ef6x37= _0x1ef6x1d;_0x1ef6x2e[_0x79b0[52]]= _[_0x79b0[55]](db[_0x79b0[99]][_0x79b0[53]]);_0x1ef6x2e[_0x79b0[57]]= _[_0x79b0[55]](_0x1ef6x2d[_0x79b0[57]]);_0x1ef6x2e[_0x79b0[59]]= _[_0x79b0[60]](_0x1ef6x2e[_0x79b0[52]],_0x1ef6x2e[_0x79b0[57]]);_0x1ef6x20[_0x79b0[61]]= _[_0x79b0[60]](_0x1ef6x2e[_0x79b0[52]],qs[_0x79b0[62]](_0x1ef6x2d[_0x79b0[57]][_0x79b0[62]]));_0x1ef6x20[_0x79b0[61]]= (_0x1ef6x20[_0x79b0[61]][_0x79b0[63]])?_0x1ef6x20[_0x79b0[61]]:_0x1ef6x2e[_0x79b0[52]];_0x1ef6x20[_0x79b0[66]]= qs[_0x79b0[67]](_0x1ef6x2d[_0x79b0[57]][_0x79b0[67]]);_0x1ef6x20[_0x79b0[68]]= qs[_0x79b0[59]](_[_0x79b0[69]](_0x1ef6x2d[_0x79b0[57]],_0x1ef6x2e[_0x79b0[59]]));if(_0x1ef6x2d[_0x79b0[57]][_0x79b0[73]]){_0x1ef6x20[_0x79b0[68]]= _[_0x79b0[72]](_0x1ef6x20[_0x79b0[68]],{$or:_[_0x79b0[75]](_0x1ef6x20[_0x79b0[61]],function(_0x1ef6x31){var _0x1ef6x2f={};_0x1ef6x2f[_0x1ef6x31]= {$like:_0x79b0[74]+ _0x1ef6x2d[_0x79b0[57]][_0x79b0[73]]+ _0x79b0[74]};return _0x1ef6x2f})})};_0x1ef6x20= _[_0x79b0[72]]({},_0x1ef6x20,_0x1ef6x2d[_0x79b0[76]]);return _0x1ef6x37[_0x79b0[120]](_0x1ef6x20)}})[_0x79b0[44]](function(_0x1ef6x38){if(_0x1ef6x38){_0x1ef6x21= _0x1ef6x38[_0x79b0[63]];if(!_0x1ef6x2d[_0x79b0[57]][_0x79b0[65]](_0x79b0[64])){_0x1ef6x20[_0x79b0[36]]= qs[_0x79b0[36]](_0x1ef6x2d[_0x79b0[57]][_0x79b0[36]]);_0x1ef6x20[_0x79b0[35]]= qs[_0x79b0[35]](_0x1ef6x2d[_0x79b0[57]][_0x79b0[35]])};return _0x1ef6x37[_0x79b0[120]](_0x1ef6x20)}})[_0x79b0[44]](function(_0x1ef6x33){if(_0x1ef6x33){return _0x1ef6x33?{count:_0x1ef6x21,rows:_0x1ef6x33}:null}})[_0x79b0[44]](respondWithResult(_0x1ef6x1d,null))[_0x79b0[77]](handleError(_0x1ef6x1d,null))}
\ No newline at end of file
index b5ab8a9..8c9ce9d 100644 (file)
@@ -1 +1 @@
-var _0x2729=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x2729[0];var EventEmitter=require(_0x2729[1]);var OpenchannelQueue=require(_0x2729[4])[_0x2729[3]][_0x2729[2]];var OpenchannelQueueEvents= new EventEmitter();OpenchannelQueueEvents[_0x2729[5]](0);var events={afterCreate:_0x2729[6],afterUpdate:_0x2729[7],afterDestroy:_0x2729[8]};function emitEvent(event){return function(_0x620ax7,_0x620ax8,_0x620ax9){OpenchannelQueueEvents[_0x2729[11]](event+ _0x2729[9]+ _0x620ax7[_0x2729[10]],_0x620ax7);OpenchannelQueueEvents[_0x2729[11]](event,_0x620ax7);_0x620ax9(null)}}for(var e in events){if(events[_0x2729[12]](e)){var event=events[e];OpenchannelQueue[_0x2729[13]](e,emitEvent(event))}};module[_0x2729[14]]= OpenchannelQueueEvents
\ No newline at end of file
+var _0x3af2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x3af2[0];var EventEmitter=require(_0x3af2[1]);var OpenchannelQueue=require(_0x3af2[4])[_0x3af2[3]][_0x3af2[2]];var OpenchannelQueueEvents= new EventEmitter();OpenchannelQueueEvents[_0x3af2[5]](0);var events={afterCreate:_0x3af2[6],afterUpdate:_0x3af2[7],afterDestroy:_0x3af2[8]};function emitEvent(event){return function(_0xec0ex7,_0xec0ex8,_0xec0ex9){OpenchannelQueueEvents[_0x3af2[11]](event+ _0x3af2[9]+ _0xec0ex7[_0x3af2[10]],_0xec0ex7);OpenchannelQueueEvents[_0x3af2[11]](event,_0xec0ex7);_0xec0ex9(null)}}for(var e in events){if(events[_0x3af2[12]](e)){var event=events[e];OpenchannelQueue[_0x3af2[13]](e,emitEvent(event))}};module[_0x3af2[14]]= OpenchannelQueueEvents
\ No newline at end of file
index 0c850ac..583fd1a 100644 (file)
@@ -1 +1 @@
-var _0x17d3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x17d3[0];var _=require(_0x17d3[1]);var util=require(_0x17d3[2]);var logger=require(_0x17d3[4])(_0x17d3[3]);var moment=require(_0x17d3[5]);var BPromise=require(_0x17d3[6]);var rp=require(_0x17d3[7]);var attributes=require(_0x17d3[8]);module[_0x17d3[9]]= function(_0x975cx8,_0x975cx9){return _0x975cx8[_0x17d3[12]](_0x17d3[10],attributes,{tableName:_0x17d3[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x2685=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x2685[0];var _=require(_0x2685[1]);var util=require(_0x2685[2]);var logger=require(_0x2685[4])(_0x2685[3]);var moment=require(_0x2685[5]);var BPromise=require(_0x2685[6]);var rp=require(_0x2685[7]);var attributes=require(_0x2685[8]);module[_0x2685[9]]= function(_0x3f1fx8,_0x3f1fx9){return _0x3f1fx8[_0x2685[12]](_0x2685[10],attributes,{tableName:_0x2685[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 75811f3..a0c19d3 100644 (file)
@@ -1 +1 @@
-var _0x2139=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x53\x68\x6F\x77\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x66\x69\x6E\x64"];_0x2139[0];var _=require(_0x2139[1]);var util=require(_0x2139[2]);var moment=require(_0x2139[3]);var BPromise=require(_0x2139[4]);var rs=require(_0x2139[5]);var fs=require(_0x2139[6]);var db=require(_0x2139[8])[_0x2139[7]];var utils=require(_0x2139[9]);var logger=require(_0x2139[11])(_0x2139[10]);var config=require(_0x2139[12]);var jayson=require(_0x2139[13]);var client=jayson[_0x2139[15]][_0x2139[14]]({port:9002});var socket=require(_0x2139[17])({host:_0x2139[16],port:6379});require(_0x2139[19])[_0x2139[18]](socket);function respondWithRpcPromise(_0x901dxf,_0x901dx10,_0x901dx11){return  new BPromise(function(_0x901dx12,_0x901dx13){return client[_0x2139[32]](_0x901dxf,_0x901dx11)[_0x2139[31]](function(_0x901dx15){logger[_0x2139[24]](_0x2139[20],_0x901dx10,_0x2139[23]);logger[_0x2139[27]](_0x2139[25],_0x901dx10,_0x2139[23],JSON[_0x2139[26]](_0x901dx15));if(_0x901dx15[_0x2139[21]]){if(_0x901dx15[_0x2139[21]][_0x2139[28]]=== 500){logger[_0x2139[21]](_0x2139[20],_0x901dx10,_0x901dx15[_0x2139[21]][_0x2139[29]]);return _0x901dx13(_0x901dx15[_0x2139[21]][_0x2139[29]])};logger[_0x2139[21]](_0x2139[20],_0x901dx10,_0x901dx15[_0x2139[21]][_0x2139[29]]);return _0x901dx12(_0x901dx15[_0x2139[21]][_0x2139[29]])}else {logger[_0x2139[24]](_0x2139[20],_0x901dx10,_0x2139[23]);_0x901dx12(_0x901dx15[_0x2139[30]][_0x2139[29]])}})[_0x2139[22]](function(_0x901dx14){logger[_0x2139[21]](_0x2139[20],_0x901dx10,_0x901dx14);_0x901dx13(_0x901dx14)})})}exports[_0x2139[33]]= function(_0x901dx11){var _0x901dx16=this;return  new Promise(function(_0x901dx12,_0x901dx13){return db[_0x2139[44]][_0x2139[43]]({raw:_0x901dx11[_0x2139[34]]?(_0x901dx11[_0x2139[34]][_0x2139[35]]=== undefined)?true:false:true,where:_0x901dx11[_0x2139[34]]?_0x901dx11[_0x2139[34]][_0x2139[36]]|| null:null,attributes:_0x901dx11[_0x2139[34]]?_0x901dx11[_0x2139[34]][_0x2139[37]]|| null:null,limit:_0x901dx11[_0x2139[34]]?_0x901dx11[_0x2139[34]][_0x2139[38]]|| null:null,include:_0x901dx11[_0x2139[34]]?(_0x901dx11[_0x2139[34]][_0x2139[39]]?_[_0x2139[42]](_0x901dx11[_0x2139[34]][_0x2139[39]],function(_0x901dx17){return {model:db[_0x901dx17[_0x2139[40]]],as:_0x901dx17[_0x2139[41]],attributes:_0x901dx17[_0x2139[37]],include:_0x901dx17[_0x2139[39]]?_[_0x2139[42]](_0x901dx17[_0x2139[39]],function(_0x901dx18){return {model:db[_0x901dx18[_0x2139[40]]],as:_0x901dx18[_0x2139[41]],attributes:_0x901dx18[_0x2139[37]],include:_0x901dx18[_0x2139[39]]?_[_0x2139[42]](_0x901dx18[_0x2139[39]],function(_0x901dx19){return {model:db[_0x901dx19[_0x2139[40]]],as:_0x901dx19[_0x2139[41]],attributes:_0x901dx19[_0x2139[37]]}}):[]}}):[]}}):[]):[]})[_0x2139[31]](function(_0x901dx15){logger[_0x2139[24]](_0x2139[33],_0x901dx11);logger[_0x2139[27]](_0x2139[33],_0x901dx11,JSON[_0x2139[26]](_0x901dx15));_0x901dx12(_0x901dx15)})[_0x2139[22]](function(_0x901dx14){logger[_0x2139[21]](_0x2139[33],_0x901dx14[_0x2139[29]],_0x901dx11);_0x901dx13(_0x901dx16[_0x2139[21]](500,_0x901dx14[_0x2139[29]]))})})};exports[_0x2139[45]]= function(_0x901dx11){var _0x901dx16=this;return  new Promise(function(_0x901dx12,_0x901dx13){return db[_0x2139[44]][_0x2139[46]]({raw:_0x901dx11[_0x2139[34]]?(_0x901dx11[_0x2139[34]][_0x2139[35]]=== undefined)?true:false:true,where:_0x901dx11[_0x2139[34]]?_0x901dx11[_0x2139[34]][_0x2139[36]]|| null:null,attributes:_0x901dx11[_0x2139[34]]?_0x901dx11[_0x2139[34]][_0x2139[37]]|| null:null,include:_0x901dx11[_0x2139[34]]?(_0x901dx11[_0x2139[34]][_0x2139[39]]?_[_0x2139[42]](_0x901dx11[_0x2139[34]][_0x2139[39]],function(_0x901dx17){return {model:db[_0x901dx17[_0x2139[40]]],as:_0x901dx17[_0x2139[41]],attributes:_0x901dx17[_0x2139[37]],include:_0x901dx17[_0x2139[39]]?_[_0x2139[42]](_0x901dx17[_0x2139[39]],function(_0x901dx18){return {model:db[_0x901dx18[_0x2139[40]]],as:_0x901dx18[_0x2139[41]],attributes:_0x901dx18[_0x2139[37]],include:_0x901dx18[_0x2139[39]]?_[_0x2139[42]](_0x901dx18[_0x2139[39]],function(_0x901dx19){return {model:db[_0x901dx19[_0x2139[40]]],as:_0x901dx19[_0x2139[41]],attributes:_0x901dx19[_0x2139[37]]}}):[]}}):[]}}):[]):[]})[_0x2139[31]](function(_0x901dx15){logger[_0x2139[24]](_0x2139[45],_0x901dx11);logger[_0x2139[27]](_0x2139[45],_0x901dx11,JSON[_0x2139[26]](_0x901dx15));_0x901dx12(_0x901dx15)})[_0x2139[22]](function(_0x901dx14){logger[_0x2139[21]](_0x2139[45],_0x901dx14[_0x2139[29]],_0x901dx11);_0x901dx13(_0x901dx16[_0x2139[21]](500,_0x901dx14[_0x2139[29]]))})})}
\ No newline at end of file
+var _0x8f07=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x53\x68\x6F\x77\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x66\x69\x6E\x64"];_0x8f07[0];var _=require(_0x8f07[1]);var util=require(_0x8f07[2]);var moment=require(_0x8f07[3]);var BPromise=require(_0x8f07[4]);var rs=require(_0x8f07[5]);var fs=require(_0x8f07[6]);var db=require(_0x8f07[8])[_0x8f07[7]];var utils=require(_0x8f07[9]);var logger=require(_0x8f07[11])(_0x8f07[10]);var config=require(_0x8f07[12]);var jayson=require(_0x8f07[13]);var client=jayson[_0x8f07[15]][_0x8f07[14]]({port:9002});var socket=require(_0x8f07[17])({host:_0x8f07[16],port:6379});require(_0x8f07[19])[_0x8f07[18]](socket);function respondWithRpcPromise(_0x5477xf,_0x5477x10,_0x5477x11){return  new BPromise(function(_0x5477x12,_0x5477x13){return client[_0x8f07[32]](_0x5477xf,_0x5477x11)[_0x8f07[31]](function(_0x5477x15){logger[_0x8f07[24]](_0x8f07[20],_0x5477x10,_0x8f07[23]);logger[_0x8f07[27]](_0x8f07[25],_0x5477x10,_0x8f07[23],JSON[_0x8f07[26]](_0x5477x15));if(_0x5477x15[_0x8f07[21]]){if(_0x5477x15[_0x8f07[21]][_0x8f07[28]]=== 500){logger[_0x8f07[21]](_0x8f07[20],_0x5477x10,_0x5477x15[_0x8f07[21]][_0x8f07[29]]);return _0x5477x13(_0x5477x15[_0x8f07[21]][_0x8f07[29]])};logger[_0x8f07[21]](_0x8f07[20],_0x5477x10,_0x5477x15[_0x8f07[21]][_0x8f07[29]]);return _0x5477x12(_0x5477x15[_0x8f07[21]][_0x8f07[29]])}else {logger[_0x8f07[24]](_0x8f07[20],_0x5477x10,_0x8f07[23]);_0x5477x12(_0x5477x15[_0x8f07[30]][_0x8f07[29]])}})[_0x8f07[22]](function(_0x5477x14){logger[_0x8f07[21]](_0x8f07[20],_0x5477x10,_0x5477x14);_0x5477x13(_0x5477x14)})})}exports[_0x8f07[33]]= function(_0x5477x11){var _0x5477x16=this;return  new Promise(function(_0x5477x12,_0x5477x13){return db[_0x8f07[44]][_0x8f07[43]]({raw:_0x5477x11[_0x8f07[34]]?(_0x5477x11[_0x8f07[34]][_0x8f07[35]]=== undefined)?true:false:true,where:_0x5477x11[_0x8f07[34]]?_0x5477x11[_0x8f07[34]][_0x8f07[36]]|| null:null,attributes:_0x5477x11[_0x8f07[34]]?_0x5477x11[_0x8f07[34]][_0x8f07[37]]|| null:null,limit:_0x5477x11[_0x8f07[34]]?_0x5477x11[_0x8f07[34]][_0x8f07[38]]|| null:null,include:_0x5477x11[_0x8f07[34]]?(_0x5477x11[_0x8f07[34]][_0x8f07[39]]?_[_0x8f07[42]](_0x5477x11[_0x8f07[34]][_0x8f07[39]],function(_0x5477x17){return {model:db[_0x5477x17[_0x8f07[40]]],as:_0x5477x17[_0x8f07[41]],attributes:_0x5477x17[_0x8f07[37]],include:_0x5477x17[_0x8f07[39]]?_[_0x8f07[42]](_0x5477x17[_0x8f07[39]],function(_0x5477x18){return {model:db[_0x5477x18[_0x8f07[40]]],as:_0x5477x18[_0x8f07[41]],attributes:_0x5477x18[_0x8f07[37]],include:_0x5477x18[_0x8f07[39]]?_[_0x8f07[42]](_0x5477x18[_0x8f07[39]],function(_0x5477x19){return {model:db[_0x5477x19[_0x8f07[40]]],as:_0x5477x19[_0x8f07[41]],attributes:_0x5477x19[_0x8f07[37]]}}):[]}}):[]}}):[]):[]})[_0x8f07[31]](function(_0x5477x15){logger[_0x8f07[24]](_0x8f07[33],_0x5477x11);logger[_0x8f07[27]](_0x8f07[33],_0x5477x11,JSON[_0x8f07[26]](_0x5477x15));_0x5477x12(_0x5477x15)})[_0x8f07[22]](function(_0x5477x14){logger[_0x8f07[21]](_0x8f07[33],_0x5477x14[_0x8f07[29]],_0x5477x11);_0x5477x13(_0x5477x16[_0x8f07[21]](500,_0x5477x14[_0x8f07[29]]))})})};exports[_0x8f07[45]]= function(_0x5477x11){var _0x5477x16=this;return  new Promise(function(_0x5477x12,_0x5477x13){return db[_0x8f07[44]][_0x8f07[46]]({raw:_0x5477x11[_0x8f07[34]]?(_0x5477x11[_0x8f07[34]][_0x8f07[35]]=== undefined)?true:false:true,where:_0x5477x11[_0x8f07[34]]?_0x5477x11[_0x8f07[34]][_0x8f07[36]]|| null:null,attributes:_0x5477x11[_0x8f07[34]]?_0x5477x11[_0x8f07[34]][_0x8f07[37]]|| null:null,include:_0x5477x11[_0x8f07[34]]?(_0x5477x11[_0x8f07[34]][_0x8f07[39]]?_[_0x8f07[42]](_0x5477x11[_0x8f07[34]][_0x8f07[39]],function(_0x5477x17){return {model:db[_0x5477x17[_0x8f07[40]]],as:_0x5477x17[_0x8f07[41]],attributes:_0x5477x17[_0x8f07[37]],include:_0x5477x17[_0x8f07[39]]?_[_0x8f07[42]](_0x5477x17[_0x8f07[39]],function(_0x5477x18){return {model:db[_0x5477x18[_0x8f07[40]]],as:_0x5477x18[_0x8f07[41]],attributes:_0x5477x18[_0x8f07[37]],include:_0x5477x18[_0x8f07[39]]?_[_0x8f07[42]](_0x5477x18[_0x8f07[39]],function(_0x5477x19){return {model:db[_0x5477x19[_0x8f07[40]]],as:_0x5477x19[_0x8f07[41]],attributes:_0x5477x19[_0x8f07[37]]}}):[]}}):[]}}):[]):[]})[_0x8f07[31]](function(_0x5477x15){logger[_0x8f07[24]](_0x8f07[45],_0x5477x11);logger[_0x8f07[27]](_0x8f07[45],_0x5477x11,JSON[_0x8f07[26]](_0x5477x15));_0x5477x12(_0x5477x15)})[_0x8f07[22]](function(_0x5477x14){logger[_0x8f07[21]](_0x8f07[45],_0x5477x14[_0x8f07[29]],_0x5477x11);_0x5477x13(_0x5477x16[_0x8f07[21]](500,_0x5477x14[_0x8f07[29]]))})})}
\ No newline at end of file
index a8aeb86..2004917 100644 (file)
@@ -1 +1 @@
-var _0x3a6f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x3A","\x6F\x6E"];_0x3a6f[0];var OpenchannelQueueEvents=require(_0x3a6f[1]);var events=[_0x3a6f[2],_0x3a6f[3],_0x3a6f[4]];function createListener(_0xb920x4,_0xb920x5){return function(_0xb920x6){_0xb920x5[_0x3a6f[5]](_0xb920x4,_0xb920x6)}}function removeListener(_0xb920x4,_0xb920x8){return function(){OpenchannelQueueEvents[_0x3a6f[6]](_0xb920x4,_0xb920x8)}}exports[_0x3a6f[7]]= function(_0xb920x5){for(var _0xb920x9=0,_0xb920xa=events[_0x3a6f[8]];_0xb920x9< _0xb920xa;_0xb920x9++){var _0xb920x4=events[_0xb920x9];var _0xb920x8=createListener(_0x3a6f[9]+ _0xb920x4,_0xb920x5);OpenchannelQueueEvents[_0x3a6f[10]](_0xb920x4,_0xb920x8)}}
\ No newline at end of file
+var _0xb546=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x3A","\x6F\x6E"];_0xb546[0];var OpenchannelQueueEvents=require(_0xb546[1]);var events=[_0xb546[2],_0xb546[3],_0xb546[4]];function createListener(_0xb5efx4,_0xb5efx5){return function(_0xb5efx6){_0xb5efx5[_0xb546[5]](_0xb5efx4,_0xb5efx6)}}function removeListener(_0xb5efx4,_0xb5efx8){return function(){OpenchannelQueueEvents[_0xb546[6]](_0xb5efx4,_0xb5efx8)}}exports[_0xb546[7]]= function(_0xb5efx5){for(var _0xb5efx9=0,_0xb5efxa=events[_0xb546[8]];_0xb5efx9< _0xb5efxa;_0xb5efx9++){var _0xb5efx4=events[_0xb5efx9];var _0xb5efx8=createListener(_0xb546[9]+ _0xb5efx4,_0xb5efx5);OpenchannelQueueEvents[_0xb546[10]](_0xb5efx4,_0xb5efx8)}}
\ No newline at end of file
index 74a6cbc..d96bf19 100644 (file)
@@ -1 +1 @@
-var _0x2432=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2432[0];var multer=require(_0x2432[1]);var util=require(_0x2432[2]);var path=require(_0x2432[3]);var express=require(_0x2432[4]);var router=express.Router();var auth=require(_0x2432[5]);var interaction=require(_0x2432[6]);var config=require(_0x2432[7]);var controller=require(_0x2432[8]);router[_0x2432[12]](_0x2432[9],auth[_0x2432[10]](),controller[_0x2432[11]]);router[_0x2432[12]](_0x2432[13],auth[_0x2432[10]](),controller[_0x2432[14]]);router[_0x2432[12]](_0x2432[15],auth[_0x2432[10]](),controller[_0x2432[16]]);router[_0x2432[18]](_0x2432[9],auth[_0x2432[10]](),controller[_0x2432[17]]);router[_0x2432[20]](_0x2432[15],auth[_0x2432[10]](),controller[_0x2432[19]]);router[_0x2432[22]](_0x2432[15],auth[_0x2432[10]](),controller[_0x2432[21]]);module[_0x2432[23]]= router
\ No newline at end of file
+var _0x4c7f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4c7f[0];var multer=require(_0x4c7f[1]);var util=require(_0x4c7f[2]);var path=require(_0x4c7f[3]);var express=require(_0x4c7f[4]);var router=express.Router();var auth=require(_0x4c7f[5]);var interaction=require(_0x4c7f[6]);var config=require(_0x4c7f[7]);var controller=require(_0x4c7f[8]);router[_0x4c7f[12]](_0x4c7f[9],auth[_0x4c7f[10]](),controller[_0x4c7f[11]]);router[_0x4c7f[12]](_0x4c7f[13],auth[_0x4c7f[10]](),controller[_0x4c7f[14]]);router[_0x4c7f[12]](_0x4c7f[15],auth[_0x4c7f[10]](),controller[_0x4c7f[16]]);router[_0x4c7f[18]](_0x4c7f[9],auth[_0x4c7f[10]](),controller[_0x4c7f[17]]);router[_0x4c7f[20]](_0x4c7f[15],auth[_0x4c7f[10]](),controller[_0x4c7f[19]]);router[_0x4c7f[22]](_0x4c7f[15],auth[_0x4c7f[10]](),controller[_0x4c7f[21]]);module[_0x4c7f[23]]= router
\ No newline at end of file
index d6663ca..800f574 100644 (file)
@@ -1 +1 @@
-var _0xb3e6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45"];_0xb3e6[0];var moment=require(_0xb3e6[1]);var Sequelize=require(_0xb3e6[2]);module[_0xb3e6[3]]= {uniqueid:{type:Sequelize[_0xb3e6[4]],allowNull:false},from:{type:Sequelize[_0xb3e6[4]]},joinAt:{type:Sequelize[_0xb3e6[5]]},leaveAt:{type:Sequelize[_0xb3e6[5]]},acceptAt:{type:Sequelize[_0xb3e6[5]]},exitAt:{type:Sequelize[_0xb3e6[5]]},reason:{type:Sequelize[_0xb3e6[4]]}}
\ No newline at end of file
+var _0xac34=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45"];_0xac34[0];var moment=require(_0xac34[1]);var Sequelize=require(_0xac34[2]);module[_0xac34[3]]= {uniqueid:{type:Sequelize[_0xac34[4]],allowNull:false},from:{type:Sequelize[_0xac34[4]]},joinAt:{type:Sequelize[_0xac34[5]]},leaveAt:{type:Sequelize[_0xac34[5]]},acceptAt:{type:Sequelize[_0xac34[5]]},exitAt:{type:Sequelize[_0xac34[5]]},reason:{type:Sequelize[_0xac34[4]]}}
\ No newline at end of file
index 445efbd..dc94d35 100644 (file)
@@ -1 +1 @@
-var _0x1249=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x1249[0];var jsonpatch=require(_0x1249[1]);var rp=require(_0x1249[2]);var moment=require(_0x1249[3]);var BPromise=require(_0x1249[4]);var Mustache=require(_0x1249[5]);var util=require(_0x1249[6]);var path=require(_0x1249[7]);var sox=require(_0x1249[8]);var csv=require(_0x1249[9]);var ejs=require(_0x1249[10]);var fs=require(_0x1249[11]);var _=require(_0x1249[12]);var squel=require(_0x1249[13]);var crypto=require(_0x1249[14]);var jsforce=require(_0x1249[15]);var deskjs=require(_0x1249[16]);var toCsv=require(_0x1249[9]);var querystring=require(_0x1249[17]);var Papa=require(_0x1249[18]);var qs=require(_0x1249[19]);var logger=require(_0x1249[21])(_0x1249[20]);var utils=require(_0x1249[22]);var config=require(_0x1249[23]);var db=require(_0x1249[25])[_0x1249[24]];function respondWithStatusCode(_0x6618x1a,_0x6618x1b){_0x6618x1b= _0x6618x1b|| 204;return function(_0x6618x1c){if(_0x6618x1c){return _0x6618x1a[_0x1249[26]](_0x6618x1b)};return _0x6618x1a[_0x1249[28]](_0x6618x1b)[_0x1249[27]]()}}function respondWithResult(_0x6618x1a,_0x6618x1b){_0x6618x1b= _0x6618x1b|| 200;return function(_0x6618x1c){if(_0x6618x1c){return _0x6618x1a[_0x1249[28]](_0x6618x1b)[_0x1249[29]](_0x6618x1c)}}}function respondWithFilteredResult(_0x6618x1a,_0x6618x1f){return function(_0x6618x1c){if(_0x6618x1c){var _0x6618x20=_0x6618x1c[_0x1249[30]],_0x6618x21=_0x6618x1f[_0x1249[31]],_0x6618x22=_0x6618x1f[_0x1249[31]]+ _0x6618x1f[_0x1249[32]],_0x6618x1b;if(_0x6618x22>= _0x6618x20){_0x6618x22= _0x6618x20;_0x6618x1b= 200}else {_0x6618x1b= 206};_0x6618x1a[_0x1249[28]](_0x6618x1b);return _0x6618x1a[_0x1249[36]](_0x1249[33],_0x6618x21+ _0x1249[34]+ _0x6618x22+ _0x1249[35]+ _0x6618x20)[_0x1249[29]](_0x6618x1c)};return null}}function patchUpdates(_0x6618x24){return function(_0x6618x1c){try{jsonpatch[_0x1249[37]](_0x6618x1c,_0x6618x24,true)}catch(err){return BPromise[_0x1249[38]](err)};return _0x6618x1c[_0x1249[39]]()}}function saveUpdates(_0x6618x26,_0x6618x1b){return function(_0x6618x1c){if(_0x6618x1c){return _0x6618x1c[_0x1249[41]](_0x6618x26)[_0x1249[40]](function(_0x6618x27){return _0x6618x27})};return null}}function removeEntity(_0x6618x1a,_0x6618x1b){return function(_0x6618x1c){if(_0x6618x1c){return _0x6618x1c[_0x1249[42]]()[_0x1249[40]](function(){_0x6618x1a[_0x1249[28]](204)[_0x1249[27]]()})}}}function handleEntityNotFound(_0x6618x1a,_0x6618x1b){return function(_0x6618x1c){if(!_0x6618x1c){_0x6618x1a[_0x1249[26]](404)};return _0x6618x1c}}function handleError(_0x6618x1a,_0x6618x1b){_0x6618x1b= _0x6618x1b|| 500;return function(_0x6618x2b){logger[_0x1249[44]](_0x6618x2b[_0x1249[43]]);if(_0x6618x2b[_0x1249[45]]){delete _0x6618x2b[_0x1249[45]]};_0x6618x1a[_0x1249[28]](_0x6618x1b)[_0x1249[46]](_0x6618x2b)}}exports[_0x1249[47]]= function(_0x6618x2c,_0x6618x1a){var _0x6618x1f={},_0x6618x2d={},_0x6618x2e={count:0,rows:[]};_0x6618x2d[_0x1249[48]]= _[_0x1249[51]](db[_0x1249[50]][_0x1249[49]]);var _0x6618x2f={dateStart:_0x6618x2c[_0x1249[53]][_0x1249[52]],dateEnd:_0x6618x2c[_0x1249[53]][_0x1249[54]]};delete _0x6618x2c[_0x1249[53]][_0x1249[52]];delete _0x6618x2c[_0x1249[53]][_0x1249[54]];_0x6618x2d[_0x1249[53]]= _[_0x1249[51]](_0x6618x2c[_0x1249[53]]);_0x6618x2d[_0x1249[55]]= _[_0x1249[56]](_0x6618x2d[_0x1249[48]],_0x6618x2d[_0x1249[53]]);_0x6618x1f[_0x1249[57]]= _[_0x1249[56]](_0x6618x2d[_0x1249[48]],qs[_0x1249[58]](_0x6618x2c[_0x1249[53]][_0x1249[58]]));_0x6618x1f[_0x1249[57]]= (_0x6618x1f[_0x1249[57]][_0x1249[59]])?_0x6618x1f[_0x1249[57]]:_0x6618x2d[_0x1249[48]];if(!_0x6618x2c[_0x1249[53]][_0x1249[61]](_0x1249[60])){_0x6618x1f[_0x1249[32]]= qs[_0x1249[32]](_0x6618x2c[_0x1249[53]][_0x1249[32]]);_0x6618x1f[_0x1249[31]]= qs[_0x1249[31]](_0x6618x2c[_0x1249[53]][_0x1249[31]])};_0x6618x1f[_0x1249[62]]= qs[_0x1249[63]](_0x6618x2c[_0x1249[53]][_0x1249[63]]);_0x6618x1f[_0x1249[64]]= qs[_0x1249[55]](_[_0x1249[65]](_0x6618x2c[_0x1249[53]],_0x6618x2d[_0x1249[55]]));if(_0x6618x2f[_0x1249[52]]){if(_0x6618x2f[_0x1249[54]]){_0x6618x2f[_0x1249[54]]= moment(_0x6618x2f[_0x1249[54]])[_0x1249[67]](1,_0x1249[66])}else {_0x6618x2f[_0x1249[54]]= moment(_0x6618x2f[_0x1249[52]])[_0x1249[67]](1,_0x1249[66])};_[_0x1249[68]](_0x6618x1f[_0x1249[64]],{createdAt:{$gte:_0x6618x2f[_0x1249[52]],$lte:_0x6618x2f[_0x1249[54]]}})};if(_0x6618x2c[_0x1249[53]][_0x1249[69]]){_0x6618x1f[_0x1249[64]]= _[_0x1249[68]](_0x6618x1f[_0x1249[64]],{$or:_[_0x1249[71]](_0x6618x1f[_0x1249[57]],function(_0x6618x30){var _0x6618x2e={};_0x6618x2e[_0x6618x30]= {$like:_0x1249[70]+ _0x6618x2c[_0x1249[53]][_0x1249[69]]+ _0x1249[70]};return _0x6618x2e})})};_0x6618x1f= _[_0x1249[68]]({},_0x6618x1f,_0x6618x2c[_0x1249[72]]);var _0x6618x31={where:_0x6618x1f[_0x1249[64]]};return db[_0x1249[50]][_0x1249[30]](_0x6618x31)[_0x1249[40]](function(_0x6618x20){_0x6618x2e[_0x1249[30]]= _0x6618x20;if(_0x6618x2c[_0x1249[53]][_0x1249[75]]){_0x6618x1f[_0x1249[76]]= [{all:true}]};return db[_0x1249[50]][_0x1249[77]](_0x6618x1f)})[_0x1249[40]](function(_0x6618x32){_0x6618x2e[_0x1249[74]]= _0x6618x32;return _0x6618x2e})[_0x1249[40]](respondWithFilteredResult(_0x6618x1a,_0x6618x1f))[_0x1249[73]](handleError(_0x6618x1a,null))};exports[_0x1249[78]]= function(_0x6618x2c,_0x6618x1a){var _0x6618x1f={raw:true,where:{id:_0x6618x2c[_0x1249[80]][_0x1249[79]]}},_0x6618x2d={};_0x6618x2d[_0x1249[48]]= _[_0x1249[51]](db[_0x1249[50]][_0x1249[49]]);_0x6618x2d[_0x1249[53]]= _[_0x1249[51]](_0x6618x2c[_0x1249[53]]);_0x6618x2d[_0x1249[55]]= _[_0x1249[56]](_0x6618x2d[_0x1249[48]],_0x6618x2d[_0x1249[53]]);_0x6618x1f[_0x1249[57]]= _[_0x1249[56]](_0x6618x2d[_0x1249[48]],qs[_0x1249[58]](_0x6618x2c[_0x1249[53]][_0x1249[58]]));_0x6618x1f[_0x1249[57]]= (_0x6618x1f[_0x1249[57]][_0x1249[59]])?_0x6618x1f[_0x1249[57]]:_0x6618x2d[_0x1249[48]];if(_0x6618x2c[_0x1249[53]][_0x1249[75]]){_0x6618x1f[_0x1249[76]]= [{all:true}]};_0x6618x1f= _[_0x1249[68]]({},_0x6618x1f,_0x6618x2c[_0x1249[72]]);return db[_0x1249[50]][_0x1249[81]](_0x6618x1f)[_0x1249[40]](handleEntityNotFound(_0x6618x1a,null))[_0x1249[40]](respondWithResult(_0x6618x1a,null))[_0x1249[73]](handleError(_0x6618x1a,null))};exports[_0x1249[82]]= function(_0x6618x2c,_0x6618x1a){return db[_0x1249[50]][_0x1249[82]](_0x6618x2c[_0x1249[83]],{})[_0x1249[40]](respondWithResult(_0x6618x1a,201))[_0x1249[73]](handleError(_0x6618x1a,null))};exports[_0x1249[41]]= function(_0x6618x2c,_0x6618x1a){if(_0x6618x2c[_0x1249[83]][_0x1249[79]]){delete _0x6618x2c[_0x1249[83]][_0x1249[79]]};return db[_0x1249[50]][_0x1249[81]]({where:{id:_0x6618x2c[_0x1249[80]][_0x1249[79]]}})[_0x1249[40]](handleEntityNotFound(_0x6618x1a,null))[_0x1249[40]](saveUpdates(_0x6618x2c[_0x1249[83]],null))[_0x1249[40]](respondWithResult(_0x6618x1a,null))[_0x1249[73]](handleError(_0x6618x1a,null))};exports[_0x1249[42]]= function(_0x6618x2c,_0x6618x1a){return db[_0x1249[50]][_0x1249[81]]({where:{id:_0x6618x2c[_0x1249[80]][_0x1249[79]]}})[_0x1249[40]](handleEntityNotFound(_0x6618x1a,null))[_0x1249[40]](removeEntity(_0x6618x1a,null))[_0x1249[73]](handleError(_0x6618x1a,null))};exports[_0x1249[84]]= function(_0x6618x2c,_0x6618x1a){return db[_0x1249[50]][_0x1249[84]]()[_0x1249[40]](respondWithResult(_0x6618x1a,null))[_0x1249[73]](handleError(_0x6618x1a,null))}
\ No newline at end of file
+var _0xbcd6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xbcd6[0];var jsonpatch=require(_0xbcd6[1]);var rp=require(_0xbcd6[2]);var moment=require(_0xbcd6[3]);var BPromise=require(_0xbcd6[4]);var Mustache=require(_0xbcd6[5]);var util=require(_0xbcd6[6]);var path=require(_0xbcd6[7]);var sox=require(_0xbcd6[8]);var csv=require(_0xbcd6[9]);var ejs=require(_0xbcd6[10]);var fs=require(_0xbcd6[11]);var _=require(_0xbcd6[12]);var squel=require(_0xbcd6[13]);var crypto=require(_0xbcd6[14]);var jsforce=require(_0xbcd6[15]);var deskjs=require(_0xbcd6[16]);var toCsv=require(_0xbcd6[9]);var querystring=require(_0xbcd6[17]);var Papa=require(_0xbcd6[18]);var qs=require(_0xbcd6[19]);var logger=require(_0xbcd6[21])(_0xbcd6[20]);var utils=require(_0xbcd6[22]);var config=require(_0xbcd6[23]);var db=require(_0xbcd6[25])[_0xbcd6[24]];function respondWithStatusCode(_0xb9e4x1a,_0xb9e4x1b){_0xb9e4x1b= _0xb9e4x1b|| 204;return function(_0xb9e4x1c){if(_0xb9e4x1c){return _0xb9e4x1a[_0xbcd6[26]](_0xb9e4x1b)};return _0xb9e4x1a[_0xbcd6[28]](_0xb9e4x1b)[_0xbcd6[27]]()}}function respondWithResult(_0xb9e4x1a,_0xb9e4x1b){_0xb9e4x1b= _0xb9e4x1b|| 200;return function(_0xb9e4x1c){if(_0xb9e4x1c){return _0xb9e4x1a[_0xbcd6[28]](_0xb9e4x1b)[_0xbcd6[29]](_0xb9e4x1c)}}}function respondWithFilteredResult(_0xb9e4x1a,_0xb9e4x1f){return function(_0xb9e4x1c){if(_0xb9e4x1c){var _0xb9e4x20=_0xb9e4x1c[_0xbcd6[30]],_0xb9e4x21=_0xb9e4x1f[_0xbcd6[31]],_0xb9e4x22=_0xb9e4x1f[_0xbcd6[31]]+ _0xb9e4x1f[_0xbcd6[32]],_0xb9e4x1b;if(_0xb9e4x22>= _0xb9e4x20){_0xb9e4x22= _0xb9e4x20;_0xb9e4x1b= 200}else {_0xb9e4x1b= 206};_0xb9e4x1a[_0xbcd6[28]](_0xb9e4x1b);return _0xb9e4x1a[_0xbcd6[36]](_0xbcd6[33],_0xb9e4x21+ _0xbcd6[34]+ _0xb9e4x22+ _0xbcd6[35]+ _0xb9e4x20)[_0xbcd6[29]](_0xb9e4x1c)};return null}}function patchUpdates(_0xb9e4x24){return function(_0xb9e4x1c){try{jsonpatch[_0xbcd6[37]](_0xb9e4x1c,_0xb9e4x24,true)}catch(err){return BPromise[_0xbcd6[38]](err)};return _0xb9e4x1c[_0xbcd6[39]]()}}function saveUpdates(_0xb9e4x26,_0xb9e4x1b){return function(_0xb9e4x1c){if(_0xb9e4x1c){return _0xb9e4x1c[_0xbcd6[41]](_0xb9e4x26)[_0xbcd6[40]](function(_0xb9e4x27){return _0xb9e4x27})};return null}}function removeEntity(_0xb9e4x1a,_0xb9e4x1b){return function(_0xb9e4x1c){if(_0xb9e4x1c){return _0xb9e4x1c[_0xbcd6[42]]()[_0xbcd6[40]](function(){_0xb9e4x1a[_0xbcd6[28]](204)[_0xbcd6[27]]()})}}}function handleEntityNotFound(_0xb9e4x1a,_0xb9e4x1b){return function(_0xb9e4x1c){if(!_0xb9e4x1c){_0xb9e4x1a[_0xbcd6[26]](404)};return _0xb9e4x1c}}function handleError(_0xb9e4x1a,_0xb9e4x1b){_0xb9e4x1b= _0xb9e4x1b|| 500;return function(_0xb9e4x2b){logger[_0xbcd6[44]](_0xb9e4x2b[_0xbcd6[43]]);if(_0xb9e4x2b[_0xbcd6[45]]){delete _0xb9e4x2b[_0xbcd6[45]]};_0xb9e4x1a[_0xbcd6[28]](_0xb9e4x1b)[_0xbcd6[46]](_0xb9e4x2b)}}exports[_0xbcd6[47]]= function(_0xb9e4x2c,_0xb9e4x1a){var _0xb9e4x1f={},_0xb9e4x2d={},_0xb9e4x2e={count:0,rows:[]};_0xb9e4x2d[_0xbcd6[48]]= _[_0xbcd6[51]](db[_0xbcd6[50]][_0xbcd6[49]]);var _0xb9e4x2f={dateStart:_0xb9e4x2c[_0xbcd6[53]][_0xbcd6[52]],dateEnd:_0xb9e4x2c[_0xbcd6[53]][_0xbcd6[54]]};delete _0xb9e4x2c[_0xbcd6[53]][_0xbcd6[52]];delete _0xb9e4x2c[_0xbcd6[53]][_0xbcd6[54]];_0xb9e4x2d[_0xbcd6[53]]= _[_0xbcd6[51]](_0xb9e4x2c[_0xbcd6[53]]);_0xb9e4x2d[_0xbcd6[55]]= _[_0xbcd6[56]](_0xb9e4x2d[_0xbcd6[48]],_0xb9e4x2d[_0xbcd6[53]]);_0xb9e4x1f[_0xbcd6[57]]= _[_0xbcd6[56]](_0xb9e4x2d[_0xbcd6[48]],qs[_0xbcd6[58]](_0xb9e4x2c[_0xbcd6[53]][_0xbcd6[58]]));_0xb9e4x1f[_0xbcd6[57]]= (_0xb9e4x1f[_0xbcd6[57]][_0xbcd6[59]])?_0xb9e4x1f[_0xbcd6[57]]:_0xb9e4x2d[_0xbcd6[48]];if(!_0xb9e4x2c[_0xbcd6[53]][_0xbcd6[61]](_0xbcd6[60])){_0xb9e4x1f[_0xbcd6[32]]= qs[_0xbcd6[32]](_0xb9e4x2c[_0xbcd6[53]][_0xbcd6[32]]);_0xb9e4x1f[_0xbcd6[31]]= qs[_0xbcd6[31]](_0xb9e4x2c[_0xbcd6[53]][_0xbcd6[31]])};_0xb9e4x1f[_0xbcd6[62]]= qs[_0xbcd6[63]](_0xb9e4x2c[_0xbcd6[53]][_0xbcd6[63]]);_0xb9e4x1f[_0xbcd6[64]]= qs[_0xbcd6[55]](_[_0xbcd6[65]](_0xb9e4x2c[_0xbcd6[53]],_0xb9e4x2d[_0xbcd6[55]]));if(_0xb9e4x2f[_0xbcd6[52]]){if(_0xb9e4x2f[_0xbcd6[54]]){_0xb9e4x2f[_0xbcd6[54]]= moment(_0xb9e4x2f[_0xbcd6[54]])[_0xbcd6[67]](1,_0xbcd6[66])}else {_0xb9e4x2f[_0xbcd6[54]]= moment(_0xb9e4x2f[_0xbcd6[52]])[_0xbcd6[67]](1,_0xbcd6[66])};_[_0xbcd6[68]](_0xb9e4x1f[_0xbcd6[64]],{createdAt:{$gte:_0xb9e4x2f[_0xbcd6[52]],$lte:_0xb9e4x2f[_0xbcd6[54]]}})};if(_0xb9e4x2c[_0xbcd6[53]][_0xbcd6[69]]){_0xb9e4x1f[_0xbcd6[64]]= _[_0xbcd6[68]](_0xb9e4x1f[_0xbcd6[64]],{$or:_[_0xbcd6[71]](_0xb9e4x1f[_0xbcd6[57]],function(_0xb9e4x30){var _0xb9e4x2e={};_0xb9e4x2e[_0xb9e4x30]= {$like:_0xbcd6[70]+ _0xb9e4x2c[_0xbcd6[53]][_0xbcd6[69]]+ _0xbcd6[70]};return _0xb9e4x2e})})};_0xb9e4x1f= _[_0xbcd6[68]]({},_0xb9e4x1f,_0xb9e4x2c[_0xbcd6[72]]);var _0xb9e4x31={where:_0xb9e4x1f[_0xbcd6[64]]};return db[_0xbcd6[50]][_0xbcd6[30]](_0xb9e4x31)[_0xbcd6[40]](function(_0xb9e4x20){_0xb9e4x2e[_0xbcd6[30]]= _0xb9e4x20;if(_0xb9e4x2c[_0xbcd6[53]][_0xbcd6[75]]){_0xb9e4x1f[_0xbcd6[76]]= [{all:true}]};return db[_0xbcd6[50]][_0xbcd6[77]](_0xb9e4x1f)})[_0xbcd6[40]](function(_0xb9e4x32){_0xb9e4x2e[_0xbcd6[74]]= _0xb9e4x32;return _0xb9e4x2e})[_0xbcd6[40]](respondWithFilteredResult(_0xb9e4x1a,_0xb9e4x1f))[_0xbcd6[73]](handleError(_0xb9e4x1a,null))};exports[_0xbcd6[78]]= function(_0xb9e4x2c,_0xb9e4x1a){var _0xb9e4x1f={raw:true,where:{id:_0xb9e4x2c[_0xbcd6[80]][_0xbcd6[79]]}},_0xb9e4x2d={};_0xb9e4x2d[_0xbcd6[48]]= _[_0xbcd6[51]](db[_0xbcd6[50]][_0xbcd6[49]]);_0xb9e4x2d[_0xbcd6[53]]= _[_0xbcd6[51]](_0xb9e4x2c[_0xbcd6[53]]);_0xb9e4x2d[_0xbcd6[55]]= _[_0xbcd6[56]](_0xb9e4x2d[_0xbcd6[48]],_0xb9e4x2d[_0xbcd6[53]]);_0xb9e4x1f[_0xbcd6[57]]= _[_0xbcd6[56]](_0xb9e4x2d[_0xbcd6[48]],qs[_0xbcd6[58]](_0xb9e4x2c[_0xbcd6[53]][_0xbcd6[58]]));_0xb9e4x1f[_0xbcd6[57]]= (_0xb9e4x1f[_0xbcd6[57]][_0xbcd6[59]])?_0xb9e4x1f[_0xbcd6[57]]:_0xb9e4x2d[_0xbcd6[48]];if(_0xb9e4x2c[_0xbcd6[53]][_0xbcd6[75]]){_0xb9e4x1f[_0xbcd6[76]]= [{all:true}]};_0xb9e4x1f= _[_0xbcd6[68]]({},_0xb9e4x1f,_0xb9e4x2c[_0xbcd6[72]]);return db[_0xbcd6[50]][_0xbcd6[81]](_0xb9e4x1f)[_0xbcd6[40]](handleEntityNotFound(_0xb9e4x1a,null))[_0xbcd6[40]](respondWithResult(_0xb9e4x1a,null))[_0xbcd6[73]](handleError(_0xb9e4x1a,null))};exports[_0xbcd6[82]]= function(_0xb9e4x2c,_0xb9e4x1a){return db[_0xbcd6[50]][_0xbcd6[82]](_0xb9e4x2c[_0xbcd6[83]],{})[_0xbcd6[40]](respondWithResult(_0xb9e4x1a,201))[_0xbcd6[73]](handleError(_0xb9e4x1a,null))};exports[_0xbcd6[41]]= function(_0xb9e4x2c,_0xb9e4x1a){if(_0xb9e4x2c[_0xbcd6[83]][_0xbcd6[79]]){delete _0xb9e4x2c[_0xbcd6[83]][_0xbcd6[79]]};return db[_0xbcd6[50]][_0xbcd6[81]]({where:{id:_0xb9e4x2c[_0xbcd6[80]][_0xbcd6[79]]}})[_0xbcd6[40]](handleEntityNotFound(_0xb9e4x1a,null))[_0xbcd6[40]](saveUpdates(_0xb9e4x2c[_0xbcd6[83]],null))[_0xbcd6[40]](respondWithResult(_0xb9e4x1a,null))[_0xbcd6[73]](handleError(_0xb9e4x1a,null))};exports[_0xbcd6[42]]= function(_0xb9e4x2c,_0xb9e4x1a){return db[_0xbcd6[50]][_0xbcd6[81]]({where:{id:_0xb9e4x2c[_0xbcd6[80]][_0xbcd6[79]]}})[_0xbcd6[40]](handleEntityNotFound(_0xb9e4x1a,null))[_0xbcd6[40]](removeEntity(_0xb9e4x1a,null))[_0xbcd6[73]](handleError(_0xb9e4x1a,null))};exports[_0xbcd6[84]]= function(_0xb9e4x2c,_0xb9e4x1a){return db[_0xbcd6[50]][_0xbcd6[84]]()[_0xbcd6[40]](respondWithResult(_0xb9e4x1a,null))[_0xbcd6[73]](handleError(_0xb9e4x1a,null))}
\ No newline at end of file
index b0cec8f..2c10288 100644 (file)
@@ -1 +1 @@
-var _0x4bac=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0x4bac[0];var _=require(_0x4bac[1]);var util=require(_0x4bac[2]);var logger=require(_0x4bac[4])(_0x4bac[3]);var moment=require(_0x4bac[5]);var BPromise=require(_0x4bac[6]);var rp=require(_0x4bac[7]);var attributes=require(_0x4bac[8]);module[_0x4bac[9]]= function(_0xc027x8,_0xc027x9){return _0xc027x8[_0x4bac[13]](_0x4bac[10],attributes,{tableName:_0x4bac[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x4bac[12],"\x66\x69\x65\x6C\x64\x73":[_0x4bac[12]]}],timestamps:true})}
\ No newline at end of file
+var _0x3a23=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0x3a23[0];var _=require(_0x3a23[1]);var util=require(_0x3a23[2]);var logger=require(_0x3a23[4])(_0x3a23[3]);var moment=require(_0x3a23[5]);var BPromise=require(_0x3a23[6]);var rp=require(_0x3a23[7]);var attributes=require(_0x3a23[8]);module[_0x3a23[9]]= function(_0x3966x8,_0x3966x9){return _0x3966x8[_0x3a23[13]](_0x3a23[10],attributes,{tableName:_0x3a23[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x3a23[12],"\x66\x69\x65\x6C\x64\x73":[_0x3a23[12]]}],timestamps:true})}
\ No newline at end of file
index 4547a46..6ca8634 100644 (file)
@@ -1 +1 @@
-var _0xeaac=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x55\x70\x64\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65"];_0xeaac[0];var _=require(_0xeaac[1]);var util=require(_0xeaac[2]);var moment=require(_0xeaac[3]);var BPromise=require(_0xeaac[4]);var rs=require(_0xeaac[5]);var fs=require(_0xeaac[6]);var db=require(_0xeaac[8])[_0xeaac[7]];var utils=require(_0xeaac[9]);var logger=require(_0xeaac[11])(_0xeaac[10]);var config=require(_0xeaac[12]);var jayson=require(_0xeaac[13]);var client=jayson[_0xeaac[15]][_0xeaac[14]]({port:9002});function respondWithRpcPromise(_0x74d3xe,_0x74d3xf,_0x74d3x10){return  new BPromise(function(_0x74d3x11,_0x74d3x12){return client[_0xeaac[28]](_0x74d3xe,_0x74d3x10)[_0xeaac[27]](function(_0x74d3x14){logger[_0xeaac[20]](_0xeaac[16],_0x74d3xf,_0xeaac[19]);logger[_0xeaac[23]](_0xeaac[21],_0x74d3xf,_0xeaac[19],JSON[_0xeaac[22]](_0x74d3x14));if(_0x74d3x14[_0xeaac[17]]){if(_0x74d3x14[_0xeaac[17]][_0xeaac[24]]=== 500){logger[_0xeaac[17]](_0xeaac[16],_0x74d3xf,_0x74d3x14[_0xeaac[17]][_0xeaac[25]]);return _0x74d3x12(_0x74d3x14[_0xeaac[17]][_0xeaac[25]])};logger[_0xeaac[17]](_0xeaac[16],_0x74d3xf,_0x74d3x14[_0xeaac[17]][_0xeaac[25]]);return _0x74d3x11(_0x74d3x14[_0xeaac[17]][_0xeaac[25]])}else {logger[_0xeaac[20]](_0xeaac[16],_0x74d3xf,_0xeaac[19]);_0x74d3x11(_0x74d3x14[_0xeaac[26]][_0xeaac[25]])}})[_0xeaac[18]](function(_0x74d3x13){logger[_0xeaac[17]](_0xeaac[16],_0x74d3xf,_0x74d3x13);_0x74d3x12(_0x74d3x13)})})}exports[_0xeaac[29]]= function(_0x74d3x10){var _0x74d3x15=this;return  new Promise(function(_0x74d3x11,_0x74d3x12){return db[_0xeaac[34]][_0xeaac[33]](_0x74d3x10[_0xeaac[30]],{raw:_0x74d3x10[_0xeaac[31]]?(_0x74d3x10[_0xeaac[31]][_0xeaac[32]]=== undefined)?true:false:true})[_0xeaac[27]](function(_0x74d3x14){logger[_0xeaac[20]](_0xeaac[29],_0x74d3x10);logger[_0xeaac[23]](_0xeaac[29],_0x74d3x10,JSON[_0xeaac[22]](_0x74d3x14));_0x74d3x11(_0x74d3x14)})[_0xeaac[18]](function(_0x74d3x13){logger[_0xeaac[17]](_0xeaac[29],_0x74d3x13[_0xeaac[25]],_0x74d3x10);_0x74d3x12(_0x74d3x15[_0xeaac[17]](500,_0x74d3x13[_0xeaac[25]]))})})};exports[_0xeaac[35]]= function(_0x74d3x10){var _0x74d3x15=this;return  new Promise(function(_0x74d3x11,_0x74d3x12){return db[_0xeaac[34]][_0xeaac[39]](_0x74d3x10[_0xeaac[30]],{raw:_0x74d3x10[_0xeaac[31]]?(_0x74d3x10[_0xeaac[31]][_0xeaac[32]]=== undefined)?true:false:true,individualHooks:true,where:_0x74d3x10[_0xeaac[31]]?_0x74d3x10[_0xeaac[31]][_0xeaac[36]]|| null:null,attributes:_0x74d3x10[_0xeaac[31]]?_0x74d3x10[_0xeaac[31]][_0xeaac[37]]|| null:null,limit:_0x74d3x10[_0xeaac[31]]?_0x74d3x10[_0xeaac[31]][_0xeaac[38]]|| null:null})[_0xeaac[27]](function(_0x74d3x14){logger[_0xeaac[20]](_0xeaac[35],_0x74d3x10);logger[_0xeaac[23]](_0xeaac[35],_0x74d3x10,JSON[_0xeaac[22]](_0x74d3x14));_0x74d3x11(_0x74d3x14)})[_0xeaac[18]](function(_0x74d3x13){logger[_0xeaac[17]](_0xeaac[35],_0x74d3x13[_0xeaac[25]],_0x74d3x10);_0x74d3x12(_0x74d3x15[_0xeaac[17]](500,_0x74d3x13[_0xeaac[25]]))})})}
\ No newline at end of file
+var _0xb5d5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x55\x70\x64\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65"];_0xb5d5[0];var _=require(_0xb5d5[1]);var util=require(_0xb5d5[2]);var moment=require(_0xb5d5[3]);var BPromise=require(_0xb5d5[4]);var rs=require(_0xb5d5[5]);var fs=require(_0xb5d5[6]);var db=require(_0xb5d5[8])[_0xb5d5[7]];var utils=require(_0xb5d5[9]);var logger=require(_0xb5d5[11])(_0xb5d5[10]);var config=require(_0xb5d5[12]);var jayson=require(_0xb5d5[13]);var client=jayson[_0xb5d5[15]][_0xb5d5[14]]({port:9002});function respondWithRpcPromise(_0xf9fexe,_0xf9fexf,_0xf9fex10){return  new BPromise(function(_0xf9fex11,_0xf9fex12){return client[_0xb5d5[28]](_0xf9fexe,_0xf9fex10)[_0xb5d5[27]](function(_0xf9fex14){logger[_0xb5d5[20]](_0xb5d5[16],_0xf9fexf,_0xb5d5[19]);logger[_0xb5d5[23]](_0xb5d5[21],_0xf9fexf,_0xb5d5[19],JSON[_0xb5d5[22]](_0xf9fex14));if(_0xf9fex14[_0xb5d5[17]]){if(_0xf9fex14[_0xb5d5[17]][_0xb5d5[24]]=== 500){logger[_0xb5d5[17]](_0xb5d5[16],_0xf9fexf,_0xf9fex14[_0xb5d5[17]][_0xb5d5[25]]);return _0xf9fex12(_0xf9fex14[_0xb5d5[17]][_0xb5d5[25]])};logger[_0xb5d5[17]](_0xb5d5[16],_0xf9fexf,_0xf9fex14[_0xb5d5[17]][_0xb5d5[25]]);return _0xf9fex11(_0xf9fex14[_0xb5d5[17]][_0xb5d5[25]])}else {logger[_0xb5d5[20]](_0xb5d5[16],_0xf9fexf,_0xb5d5[19]);_0xf9fex11(_0xf9fex14[_0xb5d5[26]][_0xb5d5[25]])}})[_0xb5d5[18]](function(_0xf9fex13){logger[_0xb5d5[17]](_0xb5d5[16],_0xf9fexf,_0xf9fex13);_0xf9fex12(_0xf9fex13)})})}exports[_0xb5d5[29]]= function(_0xf9fex10){var _0xf9fex15=this;return  new Promise(function(_0xf9fex11,_0xf9fex12){return db[_0xb5d5[34]][_0xb5d5[33]](_0xf9fex10[_0xb5d5[30]],{raw:_0xf9fex10[_0xb5d5[31]]?(_0xf9fex10[_0xb5d5[31]][_0xb5d5[32]]=== undefined)?true:false:true})[_0xb5d5[27]](function(_0xf9fex14){logger[_0xb5d5[20]](_0xb5d5[29],_0xf9fex10);logger[_0xb5d5[23]](_0xb5d5[29],_0xf9fex10,JSON[_0xb5d5[22]](_0xf9fex14));_0xf9fex11(_0xf9fex14)})[_0xb5d5[18]](function(_0xf9fex13){logger[_0xb5d5[17]](_0xb5d5[29],_0xf9fex13[_0xb5d5[25]],_0xf9fex10);_0xf9fex12(_0xf9fex15[_0xb5d5[17]](500,_0xf9fex13[_0xb5d5[25]]))})})};exports[_0xb5d5[35]]= function(_0xf9fex10){var _0xf9fex15=this;return  new Promise(function(_0xf9fex11,_0xf9fex12){return db[_0xb5d5[34]][_0xb5d5[39]](_0xf9fex10[_0xb5d5[30]],{raw:_0xf9fex10[_0xb5d5[31]]?(_0xf9fex10[_0xb5d5[31]][_0xb5d5[32]]=== undefined)?true:false:true,individualHooks:true,where:_0xf9fex10[_0xb5d5[31]]?_0xf9fex10[_0xb5d5[31]][_0xb5d5[36]]|| null:null,attributes:_0xf9fex10[_0xb5d5[31]]?_0xf9fex10[_0xb5d5[31]][_0xb5d5[37]]|| null:null,limit:_0xf9fex10[_0xb5d5[31]]?_0xf9fex10[_0xb5d5[31]][_0xb5d5[38]]|| null:null})[_0xb5d5[27]](function(_0xf9fex14){logger[_0xb5d5[20]](_0xb5d5[35],_0xf9fex10);logger[_0xb5d5[23]](_0xb5d5[35],_0xf9fex10,JSON[_0xb5d5[22]](_0xf9fex14));_0xf9fex11(_0xf9fex14)})[_0xb5d5[18]](function(_0xf9fex13){logger[_0xb5d5[17]](_0xb5d5[35],_0xf9fex13[_0xb5d5[25]],_0xf9fex10);_0xf9fex12(_0xf9fex15[_0xb5d5[17]](500,_0xf9fex13[_0xb5d5[25]]))})})}
\ No newline at end of file
index 0e0bf41..e56153f 100644 (file)
@@ -1 +1 @@
-var _0x4e82=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x70\x61\x75\x73\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4e82[0];var multer=require(_0x4e82[1]);var util=require(_0x4e82[2]);var path=require(_0x4e82[3]);var express=require(_0x4e82[4]);var router=express.Router();var auth=require(_0x4e82[5]);var interaction=require(_0x4e82[6]);var config=require(_0x4e82[7]);var controller=require(_0x4e82[8]);router[_0x4e82[12]](_0x4e82[9],auth[_0x4e82[10]](),controller[_0x4e82[11]]);router[_0x4e82[12]](_0x4e82[13],auth[_0x4e82[10]](),controller[_0x4e82[14]]);router[_0x4e82[16]](_0x4e82[9],auth[_0x4e82[10]](),controller[_0x4e82[15]]);router[_0x4e82[18]](_0x4e82[13],auth[_0x4e82[10]](),controller[_0x4e82[17]]);router[_0x4e82[20]](_0x4e82[13],auth[_0x4e82[10]](),controller[_0x4e82[19]]);module[_0x4e82[21]]= router
\ No newline at end of file
+var _0x1b1c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x70\x61\x75\x73\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x1b1c[0];var multer=require(_0x1b1c[1]);var util=require(_0x1b1c[2]);var path=require(_0x1b1c[3]);var express=require(_0x1b1c[4]);var router=express.Router();var auth=require(_0x1b1c[5]);var interaction=require(_0x1b1c[6]);var config=require(_0x1b1c[7]);var controller=require(_0x1b1c[8]);router[_0x1b1c[12]](_0x1b1c[9],auth[_0x1b1c[10]](),controller[_0x1b1c[11]]);router[_0x1b1c[12]](_0x1b1c[13],auth[_0x1b1c[10]](),controller[_0x1b1c[14]]);router[_0x1b1c[16]](_0x1b1c[9],auth[_0x1b1c[10]](),controller[_0x1b1c[15]]);router[_0x1b1c[18]](_0x1b1c[13],auth[_0x1b1c[10]](),controller[_0x1b1c[17]]);router[_0x1b1c[20]](_0x1b1c[13],auth[_0x1b1c[10]](),controller[_0x1b1c[19]]);module[_0x1b1c[21]]= router
\ No newline at end of file
index 60f8389..0168419 100644 (file)
@@ -1 +1 @@
-var _0x1222=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65"];_0x1222[0];var Sequelize=require(_0x1222[1]);module[_0x1222[2]]= {name:{type:Sequelize[_0x1222[3]],unique:_0x1222[4],allowNull:false},description:{type:Sequelize[_0x1222[3]]}}
\ No newline at end of file
+var _0x97de=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65"];_0x97de[0];var Sequelize=require(_0x97de[1]);module[_0x97de[2]]= {name:{type:Sequelize[_0x97de[3]],unique:_0x97de[4],allowNull:false},description:{type:Sequelize[_0x97de[3]]}}
\ No newline at end of file
index 2b2b3e9..a63d484 100644 (file)
@@ -1 +1 @@
-var _0x18e6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x50\x61\x75\x73\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x18e6[0];var jsonpatch=require(_0x18e6[1]);var rp=require(_0x18e6[2]);var moment=require(_0x18e6[3]);var BPromise=require(_0x18e6[4]);var Mustache=require(_0x18e6[5]);var util=require(_0x18e6[6]);var path=require(_0x18e6[7]);var sox=require(_0x18e6[8]);var csv=require(_0x18e6[9]);var ejs=require(_0x18e6[10]);var fs=require(_0x18e6[11]);var _=require(_0x18e6[12]);var squel=require(_0x18e6[13]);var crypto=require(_0x18e6[14]);var jsforce=require(_0x18e6[15]);var deskjs=require(_0x18e6[16]);var toCsv=require(_0x18e6[9]);var querystring=require(_0x18e6[17]);var Papa=require(_0x18e6[18]);var qs=require(_0x18e6[19]);var logger=require(_0x18e6[21])(_0x18e6[20]);var utils=require(_0x18e6[22]);var config=require(_0x18e6[23]);var db=require(_0x18e6[25])[_0x18e6[24]];function respondWithStatusCode(_0xa7cex1a,_0xa7cex1b){_0xa7cex1b= _0xa7cex1b|| 204;return function(_0xa7cex1c){if(_0xa7cex1c){return _0xa7cex1a[_0x18e6[26]](_0xa7cex1b)};return _0xa7cex1a[_0x18e6[28]](_0xa7cex1b)[_0x18e6[27]]()}}function respondWithResult(_0xa7cex1a,_0xa7cex1b){_0xa7cex1b= _0xa7cex1b|| 200;return function(_0xa7cex1c){if(_0xa7cex1c){return _0xa7cex1a[_0x18e6[28]](_0xa7cex1b)[_0x18e6[29]](_0xa7cex1c)}}}function respondWithFilteredResult(_0xa7cex1a,_0xa7cex1f){return function(_0xa7cex1c){if(_0xa7cex1c){var _0xa7cex20=_0xa7cex1c[_0x18e6[30]],_0xa7cex21=_0xa7cex1f[_0x18e6[31]],_0xa7cex22=_0xa7cex1f[_0x18e6[31]]+ _0xa7cex1f[_0x18e6[32]],_0xa7cex1b;if(_0xa7cex22>= _0xa7cex20){_0xa7cex22= _0xa7cex20;_0xa7cex1b= 200}else {_0xa7cex1b= 206};_0xa7cex1a[_0x18e6[28]](_0xa7cex1b);return _0xa7cex1a[_0x18e6[36]](_0x18e6[33],_0xa7cex21+ _0x18e6[34]+ _0xa7cex22+ _0x18e6[35]+ _0xa7cex20)[_0x18e6[29]](_0xa7cex1c)};return null}}function patchUpdates(_0xa7cex24){return function(_0xa7cex1c){try{jsonpatch[_0x18e6[37]](_0xa7cex1c,_0xa7cex24,true)}catch(err){return BPromise[_0x18e6[38]](err)};return _0xa7cex1c[_0x18e6[39]]()}}function saveUpdates(_0xa7cex26,_0xa7cex1b){return function(_0xa7cex1c){if(_0xa7cex1c){return _0xa7cex1c[_0x18e6[41]](_0xa7cex26)[_0x18e6[40]](function(_0xa7cex27){return _0xa7cex27})};return null}}function removeEntity(_0xa7cex1a,_0xa7cex1b){return function(_0xa7cex1c){if(_0xa7cex1c){return _0xa7cex1c[_0x18e6[42]]()[_0x18e6[40]](function(){_0xa7cex1a[_0x18e6[28]](204)[_0x18e6[27]]()})}}}function handleEntityNotFound(_0xa7cex1a,_0xa7cex1b){return function(_0xa7cex1c){if(!_0xa7cex1c){_0xa7cex1a[_0x18e6[26]](404)};return _0xa7cex1c}}function handleError(_0xa7cex1a,_0xa7cex1b){_0xa7cex1b= _0xa7cex1b|| 500;return function(_0xa7cex2b){logger[_0x18e6[44]](_0xa7cex2b[_0x18e6[43]]);if(_0xa7cex2b[_0x18e6[45]]){delete _0xa7cex2b[_0x18e6[45]]};_0xa7cex1a[_0x18e6[28]](_0xa7cex1b)[_0x18e6[46]](_0xa7cex2b)}}exports[_0x18e6[47]]= function(_0xa7cex2c,_0xa7cex1a){var _0xa7cex1f={},_0xa7cex2d={},_0xa7cex2e={count:0,rows:[]};_0xa7cex2d[_0x18e6[48]]= _[_0x18e6[51]](db[_0x18e6[50]][_0x18e6[49]]);var _0xa7cex2f={dateStart:_0xa7cex2c[_0x18e6[53]][_0x18e6[52]],dateEnd:_0xa7cex2c[_0x18e6[53]][_0x18e6[54]]};delete _0xa7cex2c[_0x18e6[53]][_0x18e6[52]];delete _0xa7cex2c[_0x18e6[53]][_0x18e6[54]];_0xa7cex2d[_0x18e6[53]]= _[_0x18e6[51]](_0xa7cex2c[_0x18e6[53]]);_0xa7cex2d[_0x18e6[55]]= _[_0x18e6[56]](_0xa7cex2d[_0x18e6[48]],_0xa7cex2d[_0x18e6[53]]);_0xa7cex1f[_0x18e6[57]]= _[_0x18e6[56]](_0xa7cex2d[_0x18e6[48]],qs[_0x18e6[58]](_0xa7cex2c[_0x18e6[53]][_0x18e6[58]]));_0xa7cex1f[_0x18e6[57]]= (_0xa7cex1f[_0x18e6[57]][_0x18e6[59]])?_0xa7cex1f[_0x18e6[57]]:_0xa7cex2d[_0x18e6[48]];if(!_0xa7cex2c[_0x18e6[53]][_0x18e6[61]](_0x18e6[60])){_0xa7cex1f[_0x18e6[32]]= qs[_0x18e6[32]](_0xa7cex2c[_0x18e6[53]][_0x18e6[32]]);_0xa7cex1f[_0x18e6[31]]= qs[_0x18e6[31]](_0xa7cex2c[_0x18e6[53]][_0x18e6[31]])};_0xa7cex1f[_0x18e6[62]]= qs[_0x18e6[63]](_0xa7cex2c[_0x18e6[53]][_0x18e6[63]]);_0xa7cex1f[_0x18e6[64]]= qs[_0x18e6[55]](_[_0x18e6[65]](_0xa7cex2c[_0x18e6[53]],_0xa7cex2d[_0x18e6[55]]));if(_0xa7cex2f[_0x18e6[52]]){if(_0xa7cex2f[_0x18e6[54]]){_0xa7cex2f[_0x18e6[54]]= moment(_0xa7cex2f[_0x18e6[54]])[_0x18e6[67]](1,_0x18e6[66])}else {_0xa7cex2f[_0x18e6[54]]= moment(_0xa7cex2f[_0x18e6[52]])[_0x18e6[67]](1,_0x18e6[66])};_[_0x18e6[68]](_0xa7cex1f[_0x18e6[64]],{createdAt:{$gte:_0xa7cex2f[_0x18e6[52]],$lte:_0xa7cex2f[_0x18e6[54]]}})};if(_0xa7cex2c[_0x18e6[53]][_0x18e6[69]]){_0xa7cex1f[_0x18e6[64]]= _[_0x18e6[68]](_0xa7cex1f[_0x18e6[64]],{$or:_[_0x18e6[71]](_0xa7cex1f[_0x18e6[57]],function(_0xa7cex30){var _0xa7cex2e={};_0xa7cex2e[_0xa7cex30]= {$like:_0x18e6[70]+ _0xa7cex2c[_0x18e6[53]][_0x18e6[69]]+ _0x18e6[70]};return _0xa7cex2e})})};_0xa7cex1f= _[_0x18e6[68]]({},_0xa7cex1f,_0xa7cex2c[_0x18e6[72]]);var _0xa7cex31={where:_0xa7cex1f[_0x18e6[64]]};return db[_0x18e6[50]][_0x18e6[30]](_0xa7cex31)[_0x18e6[40]](function(_0xa7cex20){_0xa7cex2e[_0x18e6[30]]= _0xa7cex20;if(_0xa7cex2c[_0x18e6[53]][_0x18e6[75]]){_0xa7cex1f[_0x18e6[76]]= [{all:true}]};return db[_0x18e6[50]][_0x18e6[77]](_0xa7cex1f)})[_0x18e6[40]](function(_0xa7cex32){_0xa7cex2e[_0x18e6[74]]= _0xa7cex32;return _0xa7cex2e})[_0x18e6[40]](respondWithFilteredResult(_0xa7cex1a,_0xa7cex1f))[_0x18e6[73]](handleError(_0xa7cex1a,null))};exports[_0x18e6[78]]= function(_0xa7cex2c,_0xa7cex1a){var _0xa7cex1f={raw:true,where:{id:_0xa7cex2c[_0x18e6[80]][_0x18e6[79]]}},_0xa7cex2d={};_0xa7cex2d[_0x18e6[48]]= _[_0x18e6[51]](db[_0x18e6[50]][_0x18e6[49]]);_0xa7cex2d[_0x18e6[53]]= _[_0x18e6[51]](_0xa7cex2c[_0x18e6[53]]);_0xa7cex2d[_0x18e6[55]]= _[_0x18e6[56]](_0xa7cex2d[_0x18e6[48]],_0xa7cex2d[_0x18e6[53]]);_0xa7cex1f[_0x18e6[57]]= _[_0x18e6[56]](_0xa7cex2d[_0x18e6[48]],qs[_0x18e6[58]](_0xa7cex2c[_0x18e6[53]][_0x18e6[58]]));_0xa7cex1f[_0x18e6[57]]= (_0xa7cex1f[_0x18e6[57]][_0x18e6[59]])?_0xa7cex1f[_0x18e6[57]]:_0xa7cex2d[_0x18e6[48]];if(_0xa7cex2c[_0x18e6[53]][_0x18e6[75]]){_0xa7cex1f[_0x18e6[76]]= [{all:true}]};_0xa7cex1f= _[_0x18e6[68]]({},_0xa7cex1f,_0xa7cex2c[_0x18e6[72]]);return db[_0x18e6[50]][_0x18e6[81]](_0xa7cex1f)[_0x18e6[40]](handleEntityNotFound(_0xa7cex1a,null))[_0x18e6[40]](respondWithResult(_0xa7cex1a,null))[_0x18e6[73]](handleError(_0xa7cex1a,null))};exports[_0x18e6[82]]= function(_0xa7cex2c,_0xa7cex1a){return db[_0x18e6[50]][_0x18e6[82]](_0xa7cex2c[_0x18e6[83]],{})[_0x18e6[40]](respondWithResult(_0xa7cex1a,201))[_0x18e6[73]](handleError(_0xa7cex1a,null))};exports[_0x18e6[41]]= function(_0xa7cex2c,_0xa7cex1a){if(_0xa7cex2c[_0x18e6[83]][_0x18e6[79]]){delete _0xa7cex2c[_0x18e6[83]][_0x18e6[79]]};return db[_0x18e6[50]][_0x18e6[81]]({where:{id:_0xa7cex2c[_0x18e6[80]][_0x18e6[79]]}})[_0x18e6[40]](handleEntityNotFound(_0xa7cex1a,null))[_0x18e6[40]](saveUpdates(_0xa7cex2c[_0x18e6[83]],null))[_0x18e6[40]](respondWithResult(_0xa7cex1a,null))[_0x18e6[73]](handleError(_0xa7cex1a,null))};exports[_0x18e6[42]]= function(_0xa7cex2c,_0xa7cex1a){return db[_0x18e6[50]][_0x18e6[81]]({where:{id:_0xa7cex2c[_0x18e6[80]][_0x18e6[79]]}})[_0x18e6[40]](handleEntityNotFound(_0xa7cex1a,null))[_0x18e6[40]](removeEntity(_0xa7cex1a,null))[_0x18e6[73]](handleError(_0xa7cex1a,null))}
\ No newline at end of file
+var _0xf028=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x50\x61\x75\x73\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xf028[0];var jsonpatch=require(_0xf028[1]);var rp=require(_0xf028[2]);var moment=require(_0xf028[3]);var BPromise=require(_0xf028[4]);var Mustache=require(_0xf028[5]);var util=require(_0xf028[6]);var path=require(_0xf028[7]);var sox=require(_0xf028[8]);var csv=require(_0xf028[9]);var ejs=require(_0xf028[10]);var fs=require(_0xf028[11]);var _=require(_0xf028[12]);var squel=require(_0xf028[13]);var crypto=require(_0xf028[14]);var jsforce=require(_0xf028[15]);var deskjs=require(_0xf028[16]);var toCsv=require(_0xf028[9]);var querystring=require(_0xf028[17]);var Papa=require(_0xf028[18]);var qs=require(_0xf028[19]);var logger=require(_0xf028[21])(_0xf028[20]);var utils=require(_0xf028[22]);var config=require(_0xf028[23]);var db=require(_0xf028[25])[_0xf028[24]];function respondWithStatusCode(_0x6564x1a,_0x6564x1b){_0x6564x1b= _0x6564x1b|| 204;return function(_0x6564x1c){if(_0x6564x1c){return _0x6564x1a[_0xf028[26]](_0x6564x1b)};return _0x6564x1a[_0xf028[28]](_0x6564x1b)[_0xf028[27]]()}}function respondWithResult(_0x6564x1a,_0x6564x1b){_0x6564x1b= _0x6564x1b|| 200;return function(_0x6564x1c){if(_0x6564x1c){return _0x6564x1a[_0xf028[28]](_0x6564x1b)[_0xf028[29]](_0x6564x1c)}}}function respondWithFilteredResult(_0x6564x1a,_0x6564x1f){return function(_0x6564x1c){if(_0x6564x1c){var _0x6564x20=_0x6564x1c[_0xf028[30]],_0x6564x21=_0x6564x1f[_0xf028[31]],_0x6564x22=_0x6564x1f[_0xf028[31]]+ _0x6564x1f[_0xf028[32]],_0x6564x1b;if(_0x6564x22>= _0x6564x20){_0x6564x22= _0x6564x20;_0x6564x1b= 200}else {_0x6564x1b= 206};_0x6564x1a[_0xf028[28]](_0x6564x1b);return _0x6564x1a[_0xf028[36]](_0xf028[33],_0x6564x21+ _0xf028[34]+ _0x6564x22+ _0xf028[35]+ _0x6564x20)[_0xf028[29]](_0x6564x1c)};return null}}function patchUpdates(_0x6564x24){return function(_0x6564x1c){try{jsonpatch[_0xf028[37]](_0x6564x1c,_0x6564x24,true)}catch(err){return BPromise[_0xf028[38]](err)};return _0x6564x1c[_0xf028[39]]()}}function saveUpdates(_0x6564x26,_0x6564x1b){return function(_0x6564x1c){if(_0x6564x1c){return _0x6564x1c[_0xf028[41]](_0x6564x26)[_0xf028[40]](function(_0x6564x27){return _0x6564x27})};return null}}function removeEntity(_0x6564x1a,_0x6564x1b){return function(_0x6564x1c){if(_0x6564x1c){return _0x6564x1c[_0xf028[42]]()[_0xf028[40]](function(){_0x6564x1a[_0xf028[28]](204)[_0xf028[27]]()})}}}function handleEntityNotFound(_0x6564x1a,_0x6564x1b){return function(_0x6564x1c){if(!_0x6564x1c){_0x6564x1a[_0xf028[26]](404)};return _0x6564x1c}}function handleError(_0x6564x1a,_0x6564x1b){_0x6564x1b= _0x6564x1b|| 500;return function(_0x6564x2b){logger[_0xf028[44]](_0x6564x2b[_0xf028[43]]);if(_0x6564x2b[_0xf028[45]]){delete _0x6564x2b[_0xf028[45]]};_0x6564x1a[_0xf028[28]](_0x6564x1b)[_0xf028[46]](_0x6564x2b)}}exports[_0xf028[47]]= function(_0x6564x2c,_0x6564x1a){var _0x6564x1f={},_0x6564x2d={},_0x6564x2e={count:0,rows:[]};_0x6564x2d[_0xf028[48]]= _[_0xf028[51]](db[_0xf028[50]][_0xf028[49]]);var _0x6564x2f={dateStart:_0x6564x2c[_0xf028[53]][_0xf028[52]],dateEnd:_0x6564x2c[_0xf028[53]][_0xf028[54]]};delete _0x6564x2c[_0xf028[53]][_0xf028[52]];delete _0x6564x2c[_0xf028[53]][_0xf028[54]];_0x6564x2d[_0xf028[53]]= _[_0xf028[51]](_0x6564x2c[_0xf028[53]]);_0x6564x2d[_0xf028[55]]= _[_0xf028[56]](_0x6564x2d[_0xf028[48]],_0x6564x2d[_0xf028[53]]);_0x6564x1f[_0xf028[57]]= _[_0xf028[56]](_0x6564x2d[_0xf028[48]],qs[_0xf028[58]](_0x6564x2c[_0xf028[53]][_0xf028[58]]));_0x6564x1f[_0xf028[57]]= (_0x6564x1f[_0xf028[57]][_0xf028[59]])?_0x6564x1f[_0xf028[57]]:_0x6564x2d[_0xf028[48]];if(!_0x6564x2c[_0xf028[53]][_0xf028[61]](_0xf028[60])){_0x6564x1f[_0xf028[32]]= qs[_0xf028[32]](_0x6564x2c[_0xf028[53]][_0xf028[32]]);_0x6564x1f[_0xf028[31]]= qs[_0xf028[31]](_0x6564x2c[_0xf028[53]][_0xf028[31]])};_0x6564x1f[_0xf028[62]]= qs[_0xf028[63]](_0x6564x2c[_0xf028[53]][_0xf028[63]]);_0x6564x1f[_0xf028[64]]= qs[_0xf028[55]](_[_0xf028[65]](_0x6564x2c[_0xf028[53]],_0x6564x2d[_0xf028[55]]));if(_0x6564x2f[_0xf028[52]]){if(_0x6564x2f[_0xf028[54]]){_0x6564x2f[_0xf028[54]]= moment(_0x6564x2f[_0xf028[54]])[_0xf028[67]](1,_0xf028[66])}else {_0x6564x2f[_0xf028[54]]= moment(_0x6564x2f[_0xf028[52]])[_0xf028[67]](1,_0xf028[66])};_[_0xf028[68]](_0x6564x1f[_0xf028[64]],{createdAt:{$gte:_0x6564x2f[_0xf028[52]],$lte:_0x6564x2f[_0xf028[54]]}})};if(_0x6564x2c[_0xf028[53]][_0xf028[69]]){_0x6564x1f[_0xf028[64]]= _[_0xf028[68]](_0x6564x1f[_0xf028[64]],{$or:_[_0xf028[71]](_0x6564x1f[_0xf028[57]],function(_0x6564x30){var _0x6564x2e={};_0x6564x2e[_0x6564x30]= {$like:_0xf028[70]+ _0x6564x2c[_0xf028[53]][_0xf028[69]]+ _0xf028[70]};return _0x6564x2e})})};_0x6564x1f= _[_0xf028[68]]({},_0x6564x1f,_0x6564x2c[_0xf028[72]]);var _0x6564x31={where:_0x6564x1f[_0xf028[64]]};return db[_0xf028[50]][_0xf028[30]](_0x6564x31)[_0xf028[40]](function(_0x6564x20){_0x6564x2e[_0xf028[30]]= _0x6564x20;if(_0x6564x2c[_0xf028[53]][_0xf028[75]]){_0x6564x1f[_0xf028[76]]= [{all:true}]};return db[_0xf028[50]][_0xf028[77]](_0x6564x1f)})[_0xf028[40]](function(_0x6564x32){_0x6564x2e[_0xf028[74]]= _0x6564x32;return _0x6564x2e})[_0xf028[40]](respondWithFilteredResult(_0x6564x1a,_0x6564x1f))[_0xf028[73]](handleError(_0x6564x1a,null))};exports[_0xf028[78]]= function(_0x6564x2c,_0x6564x1a){var _0x6564x1f={raw:true,where:{id:_0x6564x2c[_0xf028[80]][_0xf028[79]]}},_0x6564x2d={};_0x6564x2d[_0xf028[48]]= _[_0xf028[51]](db[_0xf028[50]][_0xf028[49]]);_0x6564x2d[_0xf028[53]]= _[_0xf028[51]](_0x6564x2c[_0xf028[53]]);_0x6564x2d[_0xf028[55]]= _[_0xf028[56]](_0x6564x2d[_0xf028[48]],_0x6564x2d[_0xf028[53]]);_0x6564x1f[_0xf028[57]]= _[_0xf028[56]](_0x6564x2d[_0xf028[48]],qs[_0xf028[58]](_0x6564x2c[_0xf028[53]][_0xf028[58]]));_0x6564x1f[_0xf028[57]]= (_0x6564x1f[_0xf028[57]][_0xf028[59]])?_0x6564x1f[_0xf028[57]]:_0x6564x2d[_0xf028[48]];if(_0x6564x2c[_0xf028[53]][_0xf028[75]]){_0x6564x1f[_0xf028[76]]= [{all:true}]};_0x6564x1f= _[_0xf028[68]]({},_0x6564x1f,_0x6564x2c[_0xf028[72]]);return db[_0xf028[50]][_0xf028[81]](_0x6564x1f)[_0xf028[40]](handleEntityNotFound(_0x6564x1a,null))[_0xf028[40]](respondWithResult(_0x6564x1a,null))[_0xf028[73]](handleError(_0x6564x1a,null))};exports[_0xf028[82]]= function(_0x6564x2c,_0x6564x1a){return db[_0xf028[50]][_0xf028[82]](_0x6564x2c[_0xf028[83]],{})[_0xf028[40]](respondWithResult(_0x6564x1a,201))[_0xf028[73]](handleError(_0x6564x1a,null))};exports[_0xf028[41]]= function(_0x6564x2c,_0x6564x1a){if(_0x6564x2c[_0xf028[83]][_0xf028[79]]){delete _0x6564x2c[_0xf028[83]][_0xf028[79]]};return db[_0xf028[50]][_0xf028[81]]({where:{id:_0x6564x2c[_0xf028[80]][_0xf028[79]]}})[_0xf028[40]](handleEntityNotFound(_0x6564x1a,null))[_0xf028[40]](saveUpdates(_0x6564x2c[_0xf028[83]],null))[_0xf028[40]](respondWithResult(_0x6564x1a,null))[_0xf028[73]](handleError(_0x6564x1a,null))};exports[_0xf028[42]]= function(_0x6564x2c,_0x6564x1a){return db[_0xf028[50]][_0xf028[81]]({where:{id:_0x6564x2c[_0xf028[80]][_0xf028[79]]}})[_0xf028[40]](handleEntityNotFound(_0x6564x1a,null))[_0xf028[40]](removeEntity(_0x6564x1a,null))[_0xf028[73]](handleError(_0x6564x1a,null))}
\ No newline at end of file
index 455e651..31e4922 100644 (file)
@@ -1 +1 @@
-var _0xcec5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x70\x61\x75\x73\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x50\x61\x75\x73\x65","\x74\x6F\x6F\x6C\x73\x5F\x70\x61\x75\x73\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0xcec5[0];var _=require(_0xcec5[1]);var util=require(_0xcec5[2]);var logger=require(_0xcec5[4])(_0xcec5[3]);var moment=require(_0xcec5[5]);var BPromise=require(_0xcec5[6]);var rp=require(_0xcec5[7]);var attributes=require(_0xcec5[8]);module[_0xcec5[9]]= function(_0x9d3cx8,_0x9d3cx9){return _0x9d3cx8[_0xcec5[12]](_0xcec5[10],attributes,{tableName:_0xcec5[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xfee6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x70\x61\x75\x73\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x50\x61\x75\x73\x65","\x74\x6F\x6F\x6C\x73\x5F\x70\x61\x75\x73\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0xfee6[0];var _=require(_0xfee6[1]);var util=require(_0xfee6[2]);var logger=require(_0xfee6[4])(_0xfee6[3]);var moment=require(_0xfee6[5]);var BPromise=require(_0xfee6[6]);var rp=require(_0xfee6[7]);var attributes=require(_0xfee6[8]);module[_0xfee6[9]]= function(_0xb1b1x8,_0xb1b1x9){return _0xb1b1x8[_0xfee6[12]](_0xfee6[10],attributes,{tableName:_0xfee6[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 01613e4..26bb6f2 100644 (file)
@@ -1 +1 @@
-var _0x260b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x50\x61\x75\x73\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x50\x61\x75\x73\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x53\x68\x6F\x77\x50\x61\x75\x73\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64","\x50\x61\x75\x73\x65"];_0x260b[0];var _=require(_0x260b[1]);var util=require(_0x260b[2]);var moment=require(_0x260b[3]);var BPromise=require(_0x260b[4]);var rs=require(_0x260b[5]);var fs=require(_0x260b[6]);var db=require(_0x260b[8])[_0x260b[7]];var utils=require(_0x260b[9]);var logger=require(_0x260b[11])(_0x260b[10]);var config=require(_0x260b[12]);var jayson=require(_0x260b[13]);var client=jayson[_0x260b[15]][_0x260b[14]]({port:9002});function respondWithRpcPromise(_0xd730xe,_0xd730xf,_0xd730x10){return  new BPromise(function(_0xd730x11,_0xd730x12){return client[_0x260b[28]](_0xd730xe,_0xd730x10)[_0x260b[27]](function(_0xd730x14){logger[_0x260b[20]](_0x260b[16],_0xd730xf,_0x260b[19]);logger[_0x260b[23]](_0x260b[21],_0xd730xf,_0x260b[19],JSON[_0x260b[22]](_0xd730x14));if(_0xd730x14[_0x260b[17]]){if(_0xd730x14[_0x260b[17]][_0x260b[24]]=== 500){logger[_0x260b[17]](_0x260b[16],_0xd730xf,_0xd730x14[_0x260b[17]][_0x260b[25]]);return _0xd730x12(_0xd730x14[_0x260b[17]][_0x260b[25]])};logger[_0x260b[17]](_0x260b[16],_0xd730xf,_0xd730x14[_0x260b[17]][_0x260b[25]]);return _0xd730x11(_0xd730x14[_0x260b[17]][_0x260b[25]])}else {logger[_0x260b[20]](_0x260b[16],_0xd730xf,_0x260b[19]);_0xd730x11(_0xd730x14[_0x260b[26]][_0x260b[25]])}})[_0x260b[18]](function(_0xd730x13){logger[_0x260b[17]](_0x260b[16],_0xd730xf,_0xd730x13);_0xd730x12(_0xd730x13)})})}exports[_0x260b[29]]= function(_0xd730x10){var _0xd730x15=this;return  new Promise(function(_0xd730x11,_0xd730x12){return db[_0x260b[39]][_0x260b[38]]({raw:_0xd730x10[_0x260b[30]]?(_0xd730x10[_0x260b[30]][_0x260b[31]]=== undefined)?true:false:true,where:_0xd730x10[_0x260b[30]]?_0xd730x10[_0x260b[30]][_0x260b[32]]|| null:null,attributes:_0xd730x10[_0x260b[30]]?_0xd730x10[_0x260b[30]][_0x260b[33]]|| null:null,include:_0xd730x10[_0x260b[30]]?(_0xd730x10[_0x260b[30]][_0x260b[34]]?_[_0x260b[37]](_0xd730x10[_0x260b[30]][_0x260b[34]],function(_0xd730x16){return {model:db[_0xd730x16[_0x260b[35]]],as:_0xd730x16[_0x260b[36]],attributes:_0xd730x16[_0x260b[33]],include:_0xd730x16[_0x260b[34]]?_[_0x260b[37]](_0xd730x16[_0x260b[34]],function(_0xd730x17){return {model:db[_0xd730x17[_0x260b[35]]],as:_0xd730x17[_0x260b[36]],attributes:_0xd730x17[_0x260b[33]],include:_0xd730x17[_0x260b[34]]?_[_0x260b[37]](_0xd730x17[_0x260b[34]],function(_0xd730x18){return {model:db[_0xd730x18[_0x260b[35]]],as:_0xd730x18[_0x260b[36]],attributes:_0xd730x18[_0x260b[33]]}}):[]}}):[]}}):[]):[]})[_0x260b[27]](function(_0xd730x14){logger[_0x260b[20]](_0x260b[29],_0xd730x10);logger[_0x260b[23]](_0x260b[29],_0xd730x10,JSON[_0x260b[22]](_0xd730x14));_0xd730x11(_0xd730x14)})[_0x260b[18]](function(_0xd730x13){logger[_0x260b[17]](_0x260b[29],_0xd730x13[_0x260b[25]],_0xd730x10);_0xd730x12(_0xd730x15[_0x260b[17]](500,_0xd730x13[_0x260b[25]]))})})}
\ No newline at end of file
+var _0x7249=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x50\x61\x75\x73\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x50\x61\x75\x73\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x53\x68\x6F\x77\x50\x61\x75\x73\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64","\x50\x61\x75\x73\x65"];_0x7249[0];var _=require(_0x7249[1]);var util=require(_0x7249[2]);var moment=require(_0x7249[3]);var BPromise=require(_0x7249[4]);var rs=require(_0x7249[5]);var fs=require(_0x7249[6]);var db=require(_0x7249[8])[_0x7249[7]];var utils=require(_0x7249[9]);var logger=require(_0x7249[11])(_0x7249[10]);var config=require(_0x7249[12]);var jayson=require(_0x7249[13]);var client=jayson[_0x7249[15]][_0x7249[14]]({port:9002});function respondWithRpcPromise(_0xea23xe,_0xea23xf,_0xea23x10){return  new BPromise(function(_0xea23x11,_0xea23x12){return client[_0x7249[28]](_0xea23xe,_0xea23x10)[_0x7249[27]](function(_0xea23x14){logger[_0x7249[20]](_0x7249[16],_0xea23xf,_0x7249[19]);logger[_0x7249[23]](_0x7249[21],_0xea23xf,_0x7249[19],JSON[_0x7249[22]](_0xea23x14));if(_0xea23x14[_0x7249[17]]){if(_0xea23x14[_0x7249[17]][_0x7249[24]]=== 500){logger[_0x7249[17]](_0x7249[16],_0xea23xf,_0xea23x14[_0x7249[17]][_0x7249[25]]);return _0xea23x12(_0xea23x14[_0x7249[17]][_0x7249[25]])};logger[_0x7249[17]](_0x7249[16],_0xea23xf,_0xea23x14[_0x7249[17]][_0x7249[25]]);return _0xea23x11(_0xea23x14[_0x7249[17]][_0x7249[25]])}else {logger[_0x7249[20]](_0x7249[16],_0xea23xf,_0x7249[19]);_0xea23x11(_0xea23x14[_0x7249[26]][_0x7249[25]])}})[_0x7249[18]](function(_0xea23x13){logger[_0x7249[17]](_0x7249[16],_0xea23xf,_0xea23x13);_0xea23x12(_0xea23x13)})})}exports[_0x7249[29]]= function(_0xea23x10){var _0xea23x15=this;return  new Promise(function(_0xea23x11,_0xea23x12){return db[_0x7249[39]][_0x7249[38]]({raw:_0xea23x10[_0x7249[30]]?(_0xea23x10[_0x7249[30]][_0x7249[31]]=== undefined)?true:false:true,where:_0xea23x10[_0x7249[30]]?_0xea23x10[_0x7249[30]][_0x7249[32]]|| null:null,attributes:_0xea23x10[_0x7249[30]]?_0xea23x10[_0x7249[30]][_0x7249[33]]|| null:null,include:_0xea23x10[_0x7249[30]]?(_0xea23x10[_0x7249[30]][_0x7249[34]]?_[_0x7249[37]](_0xea23x10[_0x7249[30]][_0x7249[34]],function(_0xea23x16){return {model:db[_0xea23x16[_0x7249[35]]],as:_0xea23x16[_0x7249[36]],attributes:_0xea23x16[_0x7249[33]],include:_0xea23x16[_0x7249[34]]?_[_0x7249[37]](_0xea23x16[_0x7249[34]],function(_0xea23x17){return {model:db[_0xea23x17[_0x7249[35]]],as:_0xea23x17[_0x7249[36]],attributes:_0xea23x17[_0x7249[33]],include:_0xea23x17[_0x7249[34]]?_[_0x7249[37]](_0xea23x17[_0x7249[34]],function(_0xea23x18){return {model:db[_0xea23x18[_0x7249[35]]],as:_0xea23x18[_0x7249[36]],attributes:_0xea23x18[_0x7249[33]]}}):[]}}):[]}}):[]):[]})[_0x7249[27]](function(_0xea23x14){logger[_0x7249[20]](_0x7249[29],_0xea23x10);logger[_0x7249[23]](_0x7249[29],_0xea23x10,JSON[_0x7249[22]](_0xea23x14));_0xea23x11(_0xea23x14)})[_0x7249[18]](function(_0xea23x13){logger[_0x7249[17]](_0x7249[29],_0xea23x13[_0x7249[25]],_0xea23x10);_0xea23x12(_0xea23x15[_0x7249[17]](500,_0xea23x13[_0x7249[25]]))})})}
\ No newline at end of file
index 3c287fb..634a4a6 100644 (file)
@@ -1 +1 @@
-var _0x2cc7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x70\x6D\x32\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x2cc7[0];var express=require(_0x2cc7[1]);var router=express.Router();var auth=require(_0x2cc7[2]);var controller=require(_0x2cc7[3]);router[_0x2cc7[7]](_0x2cc7[4],auth[_0x2cc7[5]](),controller[_0x2cc7[6]]);router[_0x2cc7[7]](_0x2cc7[8],auth[_0x2cc7[5]](),controller[_0x2cc7[9]]);router[_0x2cc7[11]](_0x2cc7[8],auth[_0x2cc7[5]](),controller[_0x2cc7[10]]);module[_0x2cc7[12]]= router
\ No newline at end of file
+var _0xad3c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x70\x6D\x32\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xad3c[0];var express=require(_0xad3c[1]);var router=express.Router();var auth=require(_0xad3c[2]);var controller=require(_0xad3c[3]);router[_0xad3c[7]](_0xad3c[4],auth[_0xad3c[5]](),controller[_0xad3c[6]]);router[_0xad3c[7]](_0xad3c[8],auth[_0xad3c[5]](),controller[_0xad3c[9]]);router[_0xad3c[11]](_0xad3c[8],auth[_0xad3c[5]](),controller[_0xad3c[10]]);module[_0xad3c[12]]= router
\ No newline at end of file
index 33c9152..41a96ce 100644 (file)
@@ -1 +1 @@
-var _0x4dcf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x70\x6D\x32","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x74\x61\x74\x75\x73","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x65\x78\x70\x72\x65\x73\x73","\x6D\x6F\x74\x69\x6F\x6E\x32","\x72\x65\x6A\x65\x63\x74","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x73\x74","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x64\x65\x73\x63\x72\x69\x62\x65","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x72\x65\x73\x74\x61\x72\x74","\x73\x74\x6F\x70","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x73\x74\x61\x74\x75\x73"];_0x4dcf[0];var _=require(_0x4dcf[1]);var pm2=require(_0x4dcf[2]);var logger=require(_0x4dcf[4])(_0x4dcf[3]);function handleEntityNotFound(_0xdff6x5,_0xdff6x6){return function(_0xdff6x7){if(!_0xdff6x7){_0xdff6x5[_0x4dcf[5]](404);;};return _0xdff6x7}}function respondWithResult(_0xdff6x5,_0xdff6x6){_0xdff6x6= _0xdff6x6|| 200;return function(_0xdff6x7){if(_0xdff6x7){return _0xdff6x5[_0x4dcf[7]](_0xdff6x6)[_0x4dcf[6]](_0xdff6x7)};return null}}function handleError(_0xdff6x5,_0xdff6x6){_0xdff6x6= _0xdff6x6|| 500;return function(_0xdff6xa){logger[_0x4dcf[9]](_0xdff6xa[_0x4dcf[8]]);if(_0xdff6xa[_0x4dcf[10]]){delete _0xdff6xa[_0x4dcf[10]]};_0xdff6x5[_0x4dcf[7]](_0xdff6x6)[_0x4dcf[11]](_0xdff6xa)}}exports[_0x4dcf[12]]= function(_0xdff6xb,_0xdff6x5){return pm2[_0x4dcf[19]]()[_0x4dcf[14]](function(_0xdff6xc){if(_0xdff6xc){var _0xdff6xd=_[_0x4dcf[17]](_0xdff6xc,function(_0xdff6xe){return _0xdff6xe[_0x4dcf[10]]=== _0x4dcf[15]|| _0xdff6xe[_0x4dcf[10]]=== _0x4dcf[16]});return {rows:_0xdff6xd,count:_0xdff6xd[_0x4dcf[18]]}};return null})[_0x4dcf[14]](respondWithResult(_0xdff6x5,null))[_0x4dcf[13]](handleError(_0xdff6x5,null))};exports[_0x4dcf[20]]= function(_0xdff6xb,_0xdff6x5){return pm2[_0x4dcf[23]](_0xdff6xb[_0x4dcf[22]][_0x4dcf[21]])[_0x4dcf[14]](respondWithResult(_0xdff6x5,null))[_0x4dcf[14]](handleEntityNotFound(_0xdff6x5,null))[_0x4dcf[13]](handleError(_0xdff6x5,null))};exports[_0x4dcf[24]]= function(_0xdff6xb,_0xdff6x5){if(_0xdff6xb[_0x4dcf[25]][_0x4dcf[21]]){delete _0xdff6xb[_0x4dcf[25]][_0x4dcf[21]]};var _0xdff6xf={online:_0x4dcf[26],stopped:_0x4dcf[27]};if(_0xdff6xf[_0x4dcf[28]](_0xdff6xb[_0x4dcf[25]][_0x4dcf[7]])){return pm2[_0xdff6xf[_0xdff6xb[_0x4dcf[25]][_0x4dcf[7]]]](_0xdff6xb[_0x4dcf[22]][_0x4dcf[21]])[_0x4dcf[14]](respondWithResult(_0xdff6x5,200))[_0x4dcf[13]](handleError(_0xdff6x5,null))}else {return _0xdff6x5[_0x4dcf[7]](500)[_0x4dcf[11]]({message:_0x4dcf[29]})}}
\ No newline at end of file
+var _0xf452=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x70\x6D\x32","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x74\x61\x74\x75\x73","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x65\x78\x70\x72\x65\x73\x73","\x6D\x6F\x74\x69\x6F\x6E\x32","\x72\x65\x6A\x65\x63\x74","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x73\x74","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x64\x65\x73\x63\x72\x69\x62\x65","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x72\x65\x73\x74\x61\x72\x74","\x73\x74\x6F\x70","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x73\x74\x61\x74\x75\x73"];_0xf452[0];var _=require(_0xf452[1]);var pm2=require(_0xf452[2]);var logger=require(_0xf452[4])(_0xf452[3]);function handleEntityNotFound(_0xcc0cx5,_0xcc0cx6){return function(_0xcc0cx7){if(!_0xcc0cx7){_0xcc0cx5[_0xf452[5]](404);;};return _0xcc0cx7}}function respondWithResult(_0xcc0cx5,_0xcc0cx6){_0xcc0cx6= _0xcc0cx6|| 200;return function(_0xcc0cx7){if(_0xcc0cx7){return _0xcc0cx5[_0xf452[7]](_0xcc0cx6)[_0xf452[6]](_0xcc0cx7)};return null}}function handleError(_0xcc0cx5,_0xcc0cx6){_0xcc0cx6= _0xcc0cx6|| 500;return function(_0xcc0cxa){logger[_0xf452[9]](_0xcc0cxa[_0xf452[8]]);if(_0xcc0cxa[_0xf452[10]]){delete _0xcc0cxa[_0xf452[10]]};_0xcc0cx5[_0xf452[7]](_0xcc0cx6)[_0xf452[11]](_0xcc0cxa)}}exports[_0xf452[12]]= function(_0xcc0cxb,_0xcc0cx5){return pm2[_0xf452[19]]()[_0xf452[14]](function(_0xcc0cxc){if(_0xcc0cxc){var _0xcc0cxd=_[_0xf452[17]](_0xcc0cxc,function(_0xcc0cxe){return _0xcc0cxe[_0xf452[10]]=== _0xf452[15]|| _0xcc0cxe[_0xf452[10]]=== _0xf452[16]});return {rows:_0xcc0cxd,count:_0xcc0cxd[_0xf452[18]]}};return null})[_0xf452[14]](respondWithResult(_0xcc0cx5,null))[_0xf452[13]](handleError(_0xcc0cx5,null))};exports[_0xf452[20]]= function(_0xcc0cxb,_0xcc0cx5){return pm2[_0xf452[23]](_0xcc0cxb[_0xf452[22]][_0xf452[21]])[_0xf452[14]](respondWithResult(_0xcc0cx5,null))[_0xf452[14]](handleEntityNotFound(_0xcc0cx5,null))[_0xf452[13]](handleError(_0xcc0cx5,null))};exports[_0xf452[24]]= function(_0xcc0cxb,_0xcc0cx5){if(_0xcc0cxb[_0xf452[25]][_0xf452[21]]){delete _0xcc0cxb[_0xf452[25]][_0xf452[21]]};var _0xcc0cxf={online:_0xf452[26],stopped:_0xf452[27]};if(_0xcc0cxf[_0xf452[28]](_0xcc0cxb[_0xf452[25]][_0xf452[7]])){return pm2[_0xcc0cxf[_0xcc0cxb[_0xf452[25]][_0xf452[7]]]](_0xcc0cxb[_0xf452[22]][_0xf452[21]])[_0xf452[14]](respondWithResult(_0xcc0cx5,200))[_0xf452[13]](handleError(_0xcc0cx5,null))}else {return _0xcc0cx5[_0xf452[7]](500)[_0xf452[11]]({message:_0xf452[29]})}}
\ No newline at end of file
index c0c53e4..816afcb 100644 (file)
@@ -1 +1 @@
-var _0x69d1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x69d1[0];var multer=require(_0x69d1[1]);var util=require(_0x69d1[2]);var path=require(_0x69d1[3]);var express=require(_0x69d1[4]);var router=express.Router();var auth=require(_0x69d1[5]);var interaction=require(_0x69d1[6]);var config=require(_0x69d1[7]);module[_0x69d1[8]]= router
\ No newline at end of file
+var _0x2d5b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x2d5b[0];var multer=require(_0x2d5b[1]);var util=require(_0x2d5b[2]);var path=require(_0x2d5b[3]);var express=require(_0x2d5b[4]);var router=express.Router();var auth=require(_0x2d5b[5]);var interaction=require(_0x2d5b[6]);var config=require(_0x2d5b[7]);module[_0x2d5b[8]]= router
\ No newline at end of file
index 35320b3..1bbe581 100644 (file)
@@ -1 +1 @@
-var _0x7314=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45","\x49\x4E\x54\x45\x47\x45\x52"];_0x7314[0];var Sequelize=require(_0x7314[1]);module[_0x7314[2]]= {state:{type:Sequelize.INTEGER(2)},statedesc:{type:Sequelize[_0x7314[3]]},scheduledat:{type:Sequelize[_0x7314[4]]},uniqueid:{type:Sequelize[_0x7314[3]]},starttime:{type:Sequelize[_0x7314[4]]},responsetime:{type:Sequelize[_0x7314[4]]},ringtime:{type:Sequelize[_0x7314[5]],defaultValue:0},campaign:{type:Sequelize[_0x7314[3]]},campaigntype:{type:Sequelize[_0x7314[3]]},membername:{type:Sequelize[_0x7314[3]]}}
\ No newline at end of file
+var _0xe58e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45","\x49\x4E\x54\x45\x47\x45\x52"];_0xe58e[0];var Sequelize=require(_0xe58e[1]);module[_0xe58e[2]]= {state:{type:Sequelize.INTEGER(2)},statedesc:{type:Sequelize[_0xe58e[3]]},scheduledat:{type:Sequelize[_0xe58e[4]]},uniqueid:{type:Sequelize[_0xe58e[3]]},starttime:{type:Sequelize[_0xe58e[4]]},responsetime:{type:Sequelize[_0xe58e[4]]},ringtime:{type:Sequelize[_0xe58e[5]],defaultValue:0},campaign:{type:Sequelize[_0xe58e[3]]},campaigntype:{type:Sequelize[_0xe58e[3]]},membername:{type:Sequelize[_0xe58e[3]]}}
\ No newline at end of file
index 86fc519..d3fd79f 100644 (file)
@@ -1 +1 @@
-var _0xc992=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x5F\x70\x72\x65\x76\x69\x65\x77","\x64\x65\x66\x69\x6E\x65"];_0xc992[0];var _=require(_0xc992[1]);var util=require(_0xc992[2]);var logger=require(_0xc992[4])(_0xc992[3]);var moment=require(_0xc992[5]);var BPromise=require(_0xc992[6]);var rp=require(_0xc992[7]);var attributes=require(_0xc992[8]);module[_0xc992[9]]= function(_0x284ax8,_0x284ax9){return _0x284ax8[_0xc992[12]](_0xc992[10],attributes,{tableName:_0xc992[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xe62f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x5F\x70\x72\x65\x76\x69\x65\x77","\x64\x65\x66\x69\x6E\x65"];_0xe62f[0];var _=require(_0xe62f[1]);var util=require(_0xe62f[2]);var logger=require(_0xe62f[4])(_0xe62f[3]);var moment=require(_0xe62f[5]);var BPromise=require(_0xe62f[6]);var rp=require(_0xe62f[7]);var attributes=require(_0xe62f[8]);module[_0xe62f[9]]= function(_0x159ax8,_0x159ax9){return _0x159ax8[_0xe62f[12]](_0xe62f[10],attributes,{tableName:_0xe62f[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 6f89072..9e7c4bd 100644 (file)
@@ -1 +1 @@
-var _0x19c0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77"];_0x19c0[0];var _=require(_0x19c0[1]);var util=require(_0x19c0[2]);var moment=require(_0x19c0[3]);var BPromise=require(_0x19c0[4]);var rs=require(_0x19c0[5]);var fs=require(_0x19c0[6]);var db=require(_0x19c0[8])[_0x19c0[7]];var utils=require(_0x19c0[9]);var logger=require(_0x19c0[11])(_0x19c0[10]);var config=require(_0x19c0[12]);var jayson=require(_0x19c0[13]);var client=jayson[_0x19c0[15]][_0x19c0[14]]({port:9002});function respondWithRpcPromise(_0x1a52xe,_0x1a52xf,_0x1a52x10){return  new BPromise(function(_0x1a52x11,_0x1a52x12){return client[_0x19c0[28]](_0x1a52xe,_0x1a52x10)[_0x19c0[27]](function(_0x1a52x14){logger[_0x19c0[20]](_0x19c0[16],_0x1a52xf,_0x19c0[19]);logger[_0x19c0[23]](_0x19c0[21],_0x1a52xf,_0x19c0[19],JSON[_0x19c0[22]](_0x1a52x14));if(_0x1a52x14[_0x19c0[17]]){if(_0x1a52x14[_0x19c0[17]][_0x19c0[24]]=== 500){logger[_0x19c0[17]](_0x19c0[16],_0x1a52xf,_0x1a52x14[_0x19c0[17]][_0x19c0[25]]);return _0x1a52x12(_0x1a52x14[_0x19c0[17]][_0x19c0[25]])};logger[_0x19c0[17]](_0x19c0[16],_0x1a52xf,_0x1a52x14[_0x19c0[17]][_0x19c0[25]]);return _0x1a52x11(_0x1a52x14[_0x19c0[17]][_0x19c0[25]])}else {logger[_0x19c0[20]](_0x19c0[16],_0x1a52xf,_0x19c0[19]);_0x1a52x11(_0x1a52x14[_0x19c0[26]][_0x19c0[25]])}})[_0x19c0[18]](function(_0x1a52x13){logger[_0x19c0[17]](_0x19c0[16],_0x1a52xf,_0x1a52x13);_0x1a52x12(_0x1a52x13)})})}exports[_0x19c0[29]]= function(_0x1a52x10){var _0x1a52x15=this;return  new Promise(function(_0x1a52x11,_0x1a52x12){return db[_0x19c0[34]][_0x19c0[33]](_0x1a52x10[_0x19c0[30]],{raw:_0x1a52x10[_0x19c0[31]]?(_0x1a52x10[_0x19c0[31]][_0x19c0[32]]=== undefined)?true:false:true})[_0x19c0[27]](function(_0x1a52x14){logger[_0x19c0[20]](_0x19c0[29],_0x1a52x10);logger[_0x19c0[23]](_0x19c0[29],_0x1a52x10,JSON[_0x19c0[22]](_0x1a52x14));_0x1a52x11(_0x1a52x14)})[_0x19c0[18]](function(_0x1a52x13){logger[_0x19c0[17]](_0x19c0[29],_0x1a52x13[_0x19c0[25]],_0x1a52x10);_0x1a52x12(_0x1a52x15[_0x19c0[17]](500,_0x1a52x13[_0x19c0[25]]))})})}
\ No newline at end of file
+var _0x5c46=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77"];_0x5c46[0];var _=require(_0x5c46[1]);var util=require(_0x5c46[2]);var moment=require(_0x5c46[3]);var BPromise=require(_0x5c46[4]);var rs=require(_0x5c46[5]);var fs=require(_0x5c46[6]);var db=require(_0x5c46[8])[_0x5c46[7]];var utils=require(_0x5c46[9]);var logger=require(_0x5c46[11])(_0x5c46[10]);var config=require(_0x5c46[12]);var jayson=require(_0x5c46[13]);var client=jayson[_0x5c46[15]][_0x5c46[14]]({port:9002});function respondWithRpcPromise(_0x45ccxe,_0x45ccxf,_0x45ccx10){return  new BPromise(function(_0x45ccx11,_0x45ccx12){return client[_0x5c46[28]](_0x45ccxe,_0x45ccx10)[_0x5c46[27]](function(_0x45ccx14){logger[_0x5c46[20]](_0x5c46[16],_0x45ccxf,_0x5c46[19]);logger[_0x5c46[23]](_0x5c46[21],_0x45ccxf,_0x5c46[19],JSON[_0x5c46[22]](_0x45ccx14));if(_0x45ccx14[_0x5c46[17]]){if(_0x45ccx14[_0x5c46[17]][_0x5c46[24]]=== 500){logger[_0x5c46[17]](_0x5c46[16],_0x45ccxf,_0x45ccx14[_0x5c46[17]][_0x5c46[25]]);return _0x45ccx12(_0x45ccx14[_0x5c46[17]][_0x5c46[25]])};logger[_0x5c46[17]](_0x5c46[16],_0x45ccxf,_0x45ccx14[_0x5c46[17]][_0x5c46[25]]);return _0x45ccx11(_0x45ccx14[_0x5c46[17]][_0x5c46[25]])}else {logger[_0x5c46[20]](_0x5c46[16],_0x45ccxf,_0x5c46[19]);_0x45ccx11(_0x45ccx14[_0x5c46[26]][_0x5c46[25]])}})[_0x5c46[18]](function(_0x45ccx13){logger[_0x5c46[17]](_0x5c46[16],_0x45ccxf,_0x45ccx13);_0x45ccx12(_0x45ccx13)})})}exports[_0x5c46[29]]= function(_0x45ccx10){var _0x45ccx15=this;return  new Promise(function(_0x45ccx11,_0x45ccx12){return db[_0x5c46[34]][_0x5c46[33]](_0x45ccx10[_0x5c46[30]],{raw:_0x45ccx10[_0x5c46[31]]?(_0x45ccx10[_0x5c46[31]][_0x5c46[32]]=== undefined)?true:false:true})[_0x5c46[27]](function(_0x45ccx14){logger[_0x5c46[20]](_0x5c46[29],_0x45ccx10);logger[_0x5c46[23]](_0x5c46[29],_0x45ccx10,JSON[_0x5c46[22]](_0x45ccx14));_0x45ccx11(_0x45ccx14)})[_0x5c46[18]](function(_0x45ccx13){logger[_0x5c46[17]](_0x5c46[29],_0x45ccx13[_0x5c46[25]],_0x45ccx10);_0x45ccx12(_0x45ccx15[_0x5c46[17]](500,_0x45ccx13[_0x5c46[25]]))})})}
\ No newline at end of file
index 54df39a..15ffb56 100644 (file)
@@ -1 +1 @@
-var _0x640e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x72\x70\x63\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x76\x6F\x69\x63\x65\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x67\x65\x74","\x2F\x76\x6F\x69\x63\x65\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64\x2F\x6D\x69\x78\x6D\x6F\x6E\x69\x74\x6F\x72","\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x6E\x65\x6C\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x2F\x76\x6F\x69\x63\x65\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64\x2F\x73\x74\x6F\x70\x6D\x69\x78\x6D\x6F\x6E\x69\x74\x6F\x72","\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x6E\x65\x6C\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x2F\x63\x68\x61\x74\x2F\x71\x75\x65\x75\x65\x73","\x63\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x2F\x6D\x61\x69\x6C\x2F\x71\x75\x65\x75\x65\x73","\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x2F\x6D\x61\x69\x6C\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x71\x75\x65\x75\x65\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x2F\x73\x6D\x73\x2F\x71\x75\x65\x75\x65\x73","\x73\x6D\x73\x51\x75\x65\x75\x65\x73","\x2F\x66\x61\x78\x2F\x71\x75\x65\x75\x65\x73","\x66\x61\x78\x51\x75\x65\x75\x65\x73","\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73\x2F\x70\x72\x65\x76\x69\x65\x77\x2F\x3A\x69\x64","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x50\x72\x65\x76\x69\x65\x77","\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C","\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64\x2F\x68\x61\x6E\x67\x75\x70","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C\x48\x61\x6E\x67\x75\x70","\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64\x2F\x72\x65\x64\x69\x72\x65\x63\x74\x2F\x3A\x65\x78\x74\x65\x6E","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C\x52\x65\x64\x69\x72\x65\x63\x74","\x2F\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x2F\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x2F\x61\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x2F\x61\x67\x65\x6E\x74\x73\x2F\x3A\x69\x64\x2F\x63\x61\x70\x61\x63\x69\x74\x79","\x61\x67\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x70\x75\x74","\x2F\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x2F\x74\x72\x75\x6E\x6B\x73","\x74\x72\x75\x6E\x6B\x73","\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x2F\x66\x61\x78\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x2F\x63\x68\x61\x74\x2F\x71\x75\x65\x75\x65\x73\x2F\x77\x61\x69\x74\x69\x6E\x67\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x63\x68\x61\x74\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x6D\x61\x69\x6C\x2F\x71\x75\x65\x75\x65\x73\x2F\x77\x61\x69\x74\x69\x6E\x67\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x71\x75\x65\x75\x65\x73\x2F\x77\x61\x69\x74\x69\x6E\x67\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x73\x6D\x73\x2F\x71\x75\x65\x75\x65\x73\x2F\x77\x61\x69\x74\x69\x6E\x67\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x73\x6D\x73\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x66\x61\x78\x2F\x71\x75\x65\x75\x65\x73\x2F\x77\x61\x69\x74\x69\x6E\x67\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x66\x61\x78\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x640e[0];var multer=require(_0x640e[1]);var util=require(_0x640e[2]);var path=require(_0x640e[3]);var express=require(_0x640e[4]);var router=express.Router();var auth=require(_0x640e[5]);var controller=require(_0x640e[6]);router[_0x640e[10]](_0x640e[7],auth[_0x640e[8]](),controller[_0x640e[9]]);router[_0x640e[10]](_0x640e[11],auth[_0x640e[8]](),controller[_0x640e[12]]);router[_0x640e[10]](_0x640e[13],auth[_0x640e[8]](),controller[_0x640e[14]]);router[_0x640e[10]](_0x640e[15],auth[_0x640e[8]](),controller[_0x640e[16]]);router[_0x640e[10]](_0x640e[17],auth[_0x640e[8]](),controller[_0x640e[18]]);router[_0x640e[10]](_0x640e[19],auth[_0x640e[8]](),controller[_0x640e[20]]);router[_0x640e[10]](_0x640e[21],auth[_0x640e[8]](),controller[_0x640e[22]]);router[_0x640e[10]](_0x640e[23],auth[_0x640e[8]](),controller[_0x640e[24]]);router[_0x640e[10]](_0x640e[25],auth[_0x640e[8]](),controller[_0x640e[26]]);router[_0x640e[10]](_0x640e[27],auth[_0x640e[8]](),controller[_0x640e[28]]);router[_0x640e[10]](_0x640e[29],auth[_0x640e[8]](),controller[_0x640e[30]]);router[_0x640e[10]](_0x640e[31],auth[_0x640e[8]](),controller[_0x640e[32]]);router[_0x640e[10]](_0x640e[33],auth[_0x640e[8]](),controller[_0x640e[34]]);router[_0x640e[10]](_0x640e[35],auth[_0x640e[8]](),controller[_0x640e[36]]);router[_0x640e[10]](_0x640e[37],auth[_0x640e[8]](),controller[_0x640e[38]]);router[_0x640e[10]](_0x640e[39],auth[_0x640e[8]](),controller[_0x640e[40]]);router[_0x640e[10]](_0x640e[41],auth[_0x640e[8]](),controller[_0x640e[42]]);router[_0x640e[10]](_0x640e[43],auth[_0x640e[8]](),controller[_0x640e[44]]);router[_0x640e[47]](_0x640e[45],auth[_0x640e[8]](),controller[_0x640e[46]]);router[_0x640e[10]](_0x640e[48],auth[_0x640e[8]](),controller[_0x640e[49]]);router[_0x640e[10]](_0x640e[50],auth[_0x640e[8]](),controller[_0x640e[51]]);router[_0x640e[10]](_0x640e[52],auth[_0x640e[8]](),controller[_0x640e[53]]);router[_0x640e[10]](_0x640e[54],auth[_0x640e[8]](),controller[_0x640e[55]]);router[_0x640e[10]](_0x640e[56],auth[_0x640e[8]](),controller[_0x640e[57]]);router[_0x640e[10]](_0x640e[58],auth[_0x640e[8]](),controller[_0x640e[59]]);router[_0x640e[10]](_0x640e[60],auth[_0x640e[8]](),controller[_0x640e[61]]);router[_0x640e[10]](_0x640e[62],auth[_0x640e[8]](),controller[_0x640e[63]]);router[_0x640e[10]](_0x640e[64],auth[_0x640e[8]](),controller[_0x640e[65]]);module[_0x640e[66]]= router
\ No newline at end of file
+var _0x3212=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x72\x70\x63\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x76\x6F\x69\x63\x65\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x67\x65\x74","\x2F\x76\x6F\x69\x63\x65\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64\x2F\x6D\x69\x78\x6D\x6F\x6E\x69\x74\x6F\x72","\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x6E\x65\x6C\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x2F\x76\x6F\x69\x63\x65\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64\x2F\x73\x74\x6F\x70\x6D\x69\x78\x6D\x6F\x6E\x69\x74\x6F\x72","\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x6E\x65\x6C\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x2F\x63\x68\x61\x74\x2F\x71\x75\x65\x75\x65\x73","\x63\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x2F\x6D\x61\x69\x6C\x2F\x71\x75\x65\x75\x65\x73","\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x2F\x6D\x61\x69\x6C\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x71\x75\x65\x75\x65\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x2F\x73\x6D\x73\x2F\x71\x75\x65\x75\x65\x73","\x73\x6D\x73\x51\x75\x65\x75\x65\x73","\x2F\x66\x61\x78\x2F\x71\x75\x65\x75\x65\x73","\x66\x61\x78\x51\x75\x65\x75\x65\x73","\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73\x2F\x70\x72\x65\x76\x69\x65\x77\x2F\x3A\x69\x64","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x50\x72\x65\x76\x69\x65\x77","\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C","\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64\x2F\x68\x61\x6E\x67\x75\x70","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C\x48\x61\x6E\x67\x75\x70","\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64\x2F\x72\x65\x64\x69\x72\x65\x63\x74\x2F\x3A\x65\x78\x74\x65\x6E","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C\x52\x65\x64\x69\x72\x65\x63\x74","\x2F\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x2F\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x2F\x61\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x2F\x61\x67\x65\x6E\x74\x73\x2F\x3A\x69\x64\x2F\x63\x61\x70\x61\x63\x69\x74\x79","\x61\x67\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x70\x75\x74","\x2F\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x2F\x74\x72\x75\x6E\x6B\x73","\x74\x72\x75\x6E\x6B\x73","\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x2F\x66\x61\x78\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x2F\x63\x68\x61\x74\x2F\x71\x75\x65\x75\x65\x73\x2F\x77\x61\x69\x74\x69\x6E\x67\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x63\x68\x61\x74\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x6D\x61\x69\x6C\x2F\x71\x75\x65\x75\x65\x73\x2F\x77\x61\x69\x74\x69\x6E\x67\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x71\x75\x65\x75\x65\x73\x2F\x77\x61\x69\x74\x69\x6E\x67\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x73\x6D\x73\x2F\x71\x75\x65\x75\x65\x73\x2F\x77\x61\x69\x74\x69\x6E\x67\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x73\x6D\x73\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x66\x61\x78\x2F\x71\x75\x65\x75\x65\x73\x2F\x77\x61\x69\x74\x69\x6E\x67\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x66\x61\x78\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x3212[0];var multer=require(_0x3212[1]);var util=require(_0x3212[2]);var path=require(_0x3212[3]);var express=require(_0x3212[4]);var router=express.Router();var auth=require(_0x3212[5]);var controller=require(_0x3212[6]);router[_0x3212[10]](_0x3212[7],auth[_0x3212[8]](),controller[_0x3212[9]]);router[_0x3212[10]](_0x3212[11],auth[_0x3212[8]](),controller[_0x3212[12]]);router[_0x3212[10]](_0x3212[13],auth[_0x3212[8]](),controller[_0x3212[14]]);router[_0x3212[10]](_0x3212[15],auth[_0x3212[8]](),controller[_0x3212[16]]);router[_0x3212[10]](_0x3212[17],auth[_0x3212[8]](),controller[_0x3212[18]]);router[_0x3212[10]](_0x3212[19],auth[_0x3212[8]](),controller[_0x3212[20]]);router[_0x3212[10]](_0x3212[21],auth[_0x3212[8]](),controller[_0x3212[22]]);router[_0x3212[10]](_0x3212[23],auth[_0x3212[8]](),controller[_0x3212[24]]);router[_0x3212[10]](_0x3212[25],auth[_0x3212[8]](),controller[_0x3212[26]]);router[_0x3212[10]](_0x3212[27],auth[_0x3212[8]](),controller[_0x3212[28]]);router[_0x3212[10]](_0x3212[29],auth[_0x3212[8]](),controller[_0x3212[30]]);router[_0x3212[10]](_0x3212[31],auth[_0x3212[8]](),controller[_0x3212[32]]);router[_0x3212[10]](_0x3212[33],auth[_0x3212[8]](),controller[_0x3212[34]]);router[_0x3212[10]](_0x3212[35],auth[_0x3212[8]](),controller[_0x3212[36]]);router[_0x3212[10]](_0x3212[37],auth[_0x3212[8]](),controller[_0x3212[38]]);router[_0x3212[10]](_0x3212[39],auth[_0x3212[8]](),controller[_0x3212[40]]);router[_0x3212[10]](_0x3212[41],auth[_0x3212[8]](),controller[_0x3212[42]]);router[_0x3212[10]](_0x3212[43],auth[_0x3212[8]](),controller[_0x3212[44]]);router[_0x3212[47]](_0x3212[45],auth[_0x3212[8]](),controller[_0x3212[46]]);router[_0x3212[10]](_0x3212[48],auth[_0x3212[8]](),controller[_0x3212[49]]);router[_0x3212[10]](_0x3212[50],auth[_0x3212[8]](),controller[_0x3212[51]]);router[_0x3212[10]](_0x3212[52],auth[_0x3212[8]](),controller[_0x3212[53]]);router[_0x3212[10]](_0x3212[54],auth[_0x3212[8]](),controller[_0x3212[55]]);router[_0x3212[10]](_0x3212[56],auth[_0x3212[8]](),controller[_0x3212[57]]);router[_0x3212[10]](_0x3212[58],auth[_0x3212[8]](),controller[_0x3212[59]]);router[_0x3212[10]](_0x3212[60],auth[_0x3212[8]](),controller[_0x3212[61]]);router[_0x3212[10]](_0x3212[62],auth[_0x3212[8]](),controller[_0x3212[63]]);router[_0x3212[10]](_0x3212[64],auth[_0x3212[8]](),controller[_0x3212[65]]);module[_0x3212[66]]= router
\ No newline at end of file
index f596a4a..6f990c2 100644 (file)
@@ -1 +1 @@
-var _0x978f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x63\x61\x74\x63\x68","\x65\x72\x72\x6F\x72","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x6A\x73\x6F\x6E","\x73\x74\x61\x74\x75\x73","\x73\x65\x6E\x64","\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x56\x6F\x69\x63\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x71\x75\x65\x72\x79","\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x6E\x65\x6C\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x56\x6F\x69\x63\x65\x43\x68\x61\x6E\x6E\x65\x6C\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x70\x61\x72\x61\x6D\x73","\x6D\x65\x72\x67\x65","\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x6E\x65\x6C\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x56\x6F\x69\x63\x65\x43\x68\x61\x6E\x6E\x65\x6C\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x50\x72\x65\x76\x69\x65\x77","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x50\x72\x65\x76\x69\x65\x77","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C\x48\x61\x6E\x67\x75\x70","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C\x48\x61\x6E\x67\x75\x70","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C\x52\x65\x64\x69\x72\x65\x63\x74","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C\x52\x65\x64\x69\x72\x65\x63\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x61\x67\x65\x6E\x74\x73","\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6C\x65\x6E\x67\x74\x68","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6E\x61\x6D\x65","\x75\x73\x65\x72","\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E","\x66\x69\x6E\x64\x41\x6C\x6C","\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x53\x49\x50\x2F","\x61\x67\x65\x6E\x74","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x41\x67\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x69\x64","\x63\x61\x70\x61\x63\x69\x74\x79","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x74\x72\x75\x6E\x6B\x73","\x54\x72\x75\x6E\x6B\x73","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x43\x61\x6D\x70\x61\x69\x67\x6E\x73","\x63\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x73\x6D\x73\x51\x75\x65\x75\x65\x73","\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x66\x61\x78\x51\x75\x65\x75\x65\x73","\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x63\x68\x61\x74\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x73\x6D\x73\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x66\x61\x78\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x46\x61\x78\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73"];_0x978f[0];var BPromise=require(_0x978f[1]);var moment=require(_0x978f[2]);var _=require(_0x978f[3]);var db=require(_0x978f[5])[_0x978f[4]];var logger=require(_0x978f[7])(_0x978f[6]);var jayson=require(_0x978f[8]);var amiClient=jayson[_0x978f[10]][_0x978f[9]]({port:9002});var mailClient=jayson[_0x978f[10]][_0x978f[9]]({port:9003});var routingClient=jayson[_0x978f[10]][_0x978f[9]]({port:9004});function respondWithRpcPromise(_0xd8c8xb,_0xd8c8xc,_0xd8c8xd){return  new BPromise(function(_0xd8c8xe,_0xd8c8xf){var _0xd8c8x10=_0xd8c8xd?_0xd8c8xd:amiClient;return _0xd8c8x10[_0x978f[17]](_0xd8c8xb,_0xd8c8xc)[_0x978f[16]](function(_0xd8c8x12){if(_0xd8c8x12[_0x978f[12]]){if(_0xd8c8x12[_0x978f[12]][_0x978f[13]]=== 500){return _0xd8c8xf(_0xd8c8x12[_0x978f[12]][_0x978f[14]])};return _0xd8c8xe(_0xd8c8x12[_0x978f[12]][_0x978f[14]])}else {_0xd8c8xe(_0xd8c8x12[_0x978f[15]])}})[_0x978f[11]](function(_0xd8c8x11){_0xd8c8xf(_0xd8c8x11)})})}function respondWithResult(_0xd8c8x12,_0xd8c8x14){_0xd8c8x14= _0xd8c8x14|| 200;return function(_0xd8c8x15){if(_0xd8c8x15){return _0xd8c8x12[_0x978f[19]](_0xd8c8x14)[_0x978f[18]](_0xd8c8x15)};return null}}function handleError(_0xd8c8x12,_0xd8c8x14){_0xd8c8x14= _0xd8c8x14|| 500;return function(_0xd8c8x11){_0xd8c8x12[_0x978f[19]](_0xd8c8x14)[_0x978f[20]](_0xd8c8x11)}}exports[_0x978f[21]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[22],_0xd8c8xc[_0x978f[23]])[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[24]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[25],_[_0x978f[27]](_0xd8c8xc[_0x978f[23]],_0xd8c8xc[_0x978f[26]]))[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[28]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[29],_[_0x978f[27]](_0xd8c8xc[_0x978f[23]],_0xd8c8xc[_0x978f[26]]))[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[30]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[31],_0xd8c8xc[_0x978f[23]])[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[32]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[33],_[_0x978f[27]](_0xd8c8xc[_0x978f[23]],_0xd8c8xc[_0x978f[26]]))[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[34]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[35],_0xd8c8xc[_0x978f[23]])[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[36]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[37],_[_0x978f[27]](_0xd8c8xc[_0x978f[23]],_0xd8c8xc[_0x978f[26]]))[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[38]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[39],_[_0x978f[27]](_0xd8c8xc[_0x978f[23]],_0xd8c8xc[_0x978f[26]]))[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[40]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[41],_[_0x978f[27]](_0xd8c8xc[_0x978f[23]],_0xd8c8xc[_0x978f[26]]))[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[42]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[43],_0xd8c8xc[_0x978f[23]])[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[44]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[45],_0xd8c8xc[_0x978f[23]])[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[46]]= function(_0xd8c8xc,_0xd8c8x12){var _0xd8c8x17;return respondWithRpcPromise(_0x978f[47],_0xd8c8xc[_0x978f[23]])[_0x978f[16]](function(_0xd8c8x18){_0xd8c8x17= _0xd8c8x18;return respondWithRpcPromise(_0x978f[47],_0xd8c8xc[_0x978f[23]],routingClient)})[_0x978f[16]](function(_0xd8c8x18){return _[_0x978f[27]]({},_0xd8c8x18,_0xd8c8x17)})[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[48]]= function(_0xd8c8xc,_0xd8c8x12){if(_0xd8c8xc[_0x978f[50]][_0x978f[49]]){for(var _0xd8c8x19 in _0xd8c8xc[_0x978f[50]][_0x978f[49]]){if(_0xd8c8xc[_0x978f[50]][_0x978f[49]][_0x978f[51]](_0xd8c8x19)){db[_0x978f[60]][_0x978f[59]]({where:{channel:_0xd8c8x19,membername:_0xd8c8xc[_0x978f[57]][_0x978f[56]],type:_0x978f[58],exitAt:null,uniqueid:_0xd8c8xc[_0x978f[50]][_0x978f[49]][_0xd8c8x19]&& _0xd8c8xc[_0x978f[50]][_0x978f[49]][_0xd8c8x19][_0x978f[54]]?{$notIn:_0xd8c8xc[_0x978f[50]][_0x978f[49]][_0xd8c8x19]}:{$ne:null}}})[_0x978f[16]](function(_0xd8c8x1a){var _0xd8c8x1b=moment()[_0x978f[53]](_0x978f[52]);for(var _0xd8c8x1c=0,_0xd8c8x1d=_0xd8c8x1a[_0x978f[54]];_0xd8c8x1c< _0xd8c8x1d;_0xd8c8x1c+= 1){_0xd8c8x1a[_0xd8c8x1c][_0x978f[55]]({exitAt:_0xd8c8x1b})}});for(var _0xd8c8x1c=0;_0xd8c8x1c< _0xd8c8xc[_0x978f[50]][_0x978f[49]][_0xd8c8x19][_0x978f[54]];_0xd8c8x1c+= 1){db[_0x978f[60]][_0x978f[64]]({where:{channel:_0xd8c8x19,membername:_0xd8c8xc[_0x978f[57]][_0x978f[56]],type:_0x978f[58],uniqueid:_0xd8c8xc[_0x978f[50]][_0x978f[49]][_0xd8c8x19][_0xd8c8x1c],exitAt:null},defaults:{channel:_0xd8c8x19,membername:_0xd8c8xc[_0x978f[57]][_0x978f[56]],interface:_0x978f[61]+ _0xd8c8xc[_0x978f[57]][_0x978f[56]],type:_0x978f[58],enterAt:moment()[_0x978f[53]](_0x978f[52]),role:_0x978f[62],internal:_0xd8c8xc[_0x978f[57]][_0x978f[63]],uniqueid:_0xd8c8xc[_0x978f[50]][_0x978f[49]][_0xd8c8x19][_0xd8c8x1c]}})}}}};return respondWithRpcPromise(_0x978f[65],{id:_0xd8c8xc[_0x978f[26]][_0x978f[66]],capacity:_0xd8c8xc[_0x978f[50]][_0x978f[67]]},routingClient)[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[68]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[69],_0xd8c8xc[_0x978f[23]])[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[70]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[71],_0xd8c8xc[_0x978f[23]])[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[72]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[73],_0xd8c8xc[_0x978f[23]])[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[74]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[75],_0xd8c8xc[_0x978f[23]],routingClient)[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[76]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[77],_0xd8c8xc[_0x978f[23]],routingClient)[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[78]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[79],_0xd8c8xc[_0x978f[23]],mailClient)[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[80]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[81],_0xd8c8xc[_0x978f[23]],routingClient)[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[82]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[83],_0xd8c8xc[_0x978f[23]],routingClient)[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[84]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[85],_0xd8c8xc[_0x978f[23]],routingClient)[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[86]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[87],_0xd8c8xc[_0x978f[23]])[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[88]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[89],_0xd8c8xc[_0x978f[23]],routingClient)[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[90]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[91],_0xd8c8xc[_0x978f[23]],routingClient)[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[92]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[93],_0xd8c8xc[_0x978f[23]],routingClient)[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[94]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[95],_0xd8c8xc[_0x978f[23]],routingClient)[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))};exports[_0x978f[96]]= function(_0xd8c8xc,_0xd8c8x12){return respondWithRpcPromise(_0x978f[97],_0xd8c8xc[_0x978f[23]],routingClient)[_0x978f[16]](respondWithResult(_0xd8c8x12,null))[_0x978f[11]](handleError(_0xd8c8x12,null))}
\ No newline at end of file
+var _0x1ab0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x63\x61\x74\x63\x68","\x65\x72\x72\x6F\x72","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x6A\x73\x6F\x6E","\x73\x74\x61\x74\x75\x73","\x73\x65\x6E\x64","\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x56\x6F\x69\x63\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x71\x75\x65\x72\x79","\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x6E\x65\x6C\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x56\x6F\x69\x63\x65\x43\x68\x61\x6E\x6E\x65\x6C\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x70\x61\x72\x61\x6D\x73","\x6D\x65\x72\x67\x65","\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x6E\x65\x6C\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x56\x6F\x69\x63\x65\x43\x68\x61\x6E\x6E\x65\x6C\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x50\x72\x65\x76\x69\x65\x77","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x50\x72\x65\x76\x69\x65\x77","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C\x48\x61\x6E\x67\x75\x70","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C\x48\x61\x6E\x67\x75\x70","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C\x52\x65\x64\x69\x72\x65\x63\x74","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x43\x68\x61\x6E\x6E\x65\x6C\x52\x65\x64\x69\x72\x65\x63\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x61\x67\x65\x6E\x74\x73","\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x62\x6F\x64\x79","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x75\x73\x65\x72","\x6E\x61\x6D\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6C\x65\x6E\x67\x74\x68","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E","\x66\x69\x6E\x64\x41\x6C\x6C","\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x53\x49\x50\x2F","\x61\x67\x65\x6E\x74","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x41\x67\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x69\x64","\x63\x61\x70\x61\x63\x69\x74\x79","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x74\x72\x75\x6E\x6B\x73","\x54\x72\x75\x6E\x6B\x73","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x43\x61\x6D\x70\x61\x69\x67\x6E\x73","\x63\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x73\x6D\x73\x51\x75\x65\x75\x65\x73","\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x66\x61\x78\x51\x75\x65\x75\x65\x73","\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x63\x68\x61\x74\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x73\x6D\x73\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x66\x61\x78\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x46\x61\x78\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73"];_0x1ab0[0];var BPromise=require(_0x1ab0[1]);var moment=require(_0x1ab0[2]);var _=require(_0x1ab0[3]);var db=require(_0x1ab0[5])[_0x1ab0[4]];var logger=require(_0x1ab0[7])(_0x1ab0[6]);var jayson=require(_0x1ab0[8]);var amiClient=jayson[_0x1ab0[10]][_0x1ab0[9]]({port:9002});var mailClient=jayson[_0x1ab0[10]][_0x1ab0[9]]({port:9003});var routingClient=jayson[_0x1ab0[10]][_0x1ab0[9]]({port:9004});function respondWithRpcPromise(_0xee3dxb,_0xee3dxc,_0xee3dxd){return  new BPromise(function(_0xee3dxe,_0xee3dxf){var _0xee3dx10=_0xee3dxd?_0xee3dxd:amiClient;return _0xee3dx10[_0x1ab0[17]](_0xee3dxb,_0xee3dxc)[_0x1ab0[16]](function(_0xee3dx12){if(_0xee3dx12[_0x1ab0[12]]){if(_0xee3dx12[_0x1ab0[12]][_0x1ab0[13]]=== 500){return _0xee3dxf(_0xee3dx12[_0x1ab0[12]][_0x1ab0[14]])};return _0xee3dxe(_0xee3dx12[_0x1ab0[12]][_0x1ab0[14]])}else {_0xee3dxe(_0xee3dx12[_0x1ab0[15]])}})[_0x1ab0[11]](function(_0xee3dx11){_0xee3dxf(_0xee3dx11)})})}function respondWithResult(_0xee3dx12,_0xee3dx14){_0xee3dx14= _0xee3dx14|| 200;return function(_0xee3dx15){if(_0xee3dx15){return _0xee3dx12[_0x1ab0[19]](_0xee3dx14)[_0x1ab0[18]](_0xee3dx15)};return null}}function handleError(_0xee3dx12,_0xee3dx14){_0xee3dx14= _0xee3dx14|| 500;return function(_0xee3dx11){_0xee3dx12[_0x1ab0[19]](_0xee3dx14)[_0x1ab0[20]](_0xee3dx11)}}exports[_0x1ab0[21]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[22],_0xee3dxc[_0x1ab0[23]])[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[24]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[25],_[_0x1ab0[27]](_0xee3dxc[_0x1ab0[23]],_0xee3dxc[_0x1ab0[26]]))[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[28]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[29],_[_0x1ab0[27]](_0xee3dxc[_0x1ab0[23]],_0xee3dxc[_0x1ab0[26]]))[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[30]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[31],_0xee3dxc[_0x1ab0[23]])[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[32]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[33],_[_0x1ab0[27]](_0xee3dxc[_0x1ab0[23]],_0xee3dxc[_0x1ab0[26]]))[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[34]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[35],_0xee3dxc[_0x1ab0[23]])[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[36]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[37],_[_0x1ab0[27]](_0xee3dxc[_0x1ab0[23]],_0xee3dxc[_0x1ab0[26]]))[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[38]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[39],_[_0x1ab0[27]](_0xee3dxc[_0x1ab0[23]],_0xee3dxc[_0x1ab0[26]]))[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[40]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[41],_[_0x1ab0[27]](_0xee3dxc[_0x1ab0[23]],_0xee3dxc[_0x1ab0[26]]))[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[42]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[43],_0xee3dxc[_0x1ab0[23]])[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[44]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[45],_0xee3dxc[_0x1ab0[23]])[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[46]]= function(_0xee3dxc,_0xee3dx12){var _0xee3dx17;return respondWithRpcPromise(_0x1ab0[47],_0xee3dxc[_0x1ab0[23]])[_0x1ab0[16]](function(_0xee3dx18){_0xee3dx17= _0xee3dx18;return respondWithRpcPromise(_0x1ab0[47],_0xee3dxc[_0x1ab0[23]],routingClient)})[_0x1ab0[16]](function(_0xee3dx18){return _[_0x1ab0[27]]({},_0xee3dx18,_0xee3dx17)})[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[48]]= function(_0xee3dxc,_0xee3dx12){if(_0xee3dxc[_0x1ab0[49]]&& _0xee3dxc[_0x1ab0[49]][_0x1ab0[50]]&& _0xee3dxc[_0x1ab0[51]]&& _0xee3dxc[_0x1ab0[51]][_0x1ab0[52]]){for(var _0xee3dx19 in _0xee3dxc[_0x1ab0[49]][_0x1ab0[50]]){if(_0xee3dxc[_0x1ab0[49]][_0x1ab0[50]][_0x1ab0[53]](_0xee3dx19)){db[_0x1ab0[60]][_0x1ab0[59]]({where:{channel:_0xee3dx19,membername:_0xee3dxc[_0x1ab0[51]][_0x1ab0[52]],type:_0x1ab0[58],exitAt:null,uniqueid:_0xee3dxc[_0x1ab0[49]][_0x1ab0[50]][_0xee3dx19]&& _0xee3dxc[_0x1ab0[49]][_0x1ab0[50]][_0xee3dx19][_0x1ab0[56]]?{$notIn:_0xee3dxc[_0x1ab0[49]][_0x1ab0[50]][_0xee3dx19]}:{$ne:null}}})[_0x1ab0[16]](function(_0xee3dx1a){var _0xee3dx1b=moment()[_0x1ab0[55]](_0x1ab0[54]);for(var _0xee3dx1c=0,_0xee3dx1d=_0xee3dx1a[_0x1ab0[56]];_0xee3dx1c< _0xee3dx1d;_0xee3dx1c+= 1){_0xee3dx1a[_0xee3dx1c][_0x1ab0[57]]({exitAt:_0xee3dx1b})}});for(var _0xee3dx1c=0;_0xee3dx1c< _0xee3dxc[_0x1ab0[49]][_0x1ab0[50]][_0xee3dx19][_0x1ab0[56]];_0xee3dx1c+= 1){db[_0x1ab0[60]][_0x1ab0[64]]({where:{channel:_0xee3dx19,membername:_0xee3dxc[_0x1ab0[51]][_0x1ab0[52]],type:_0x1ab0[58],uniqueid:_0xee3dxc[_0x1ab0[49]][_0x1ab0[50]][_0xee3dx19][_0xee3dx1c],exitAt:null},defaults:{channel:_0xee3dx19,membername:_0xee3dxc[_0x1ab0[51]][_0x1ab0[52]],interface:_0x1ab0[61]+ _0xee3dxc[_0x1ab0[51]][_0x1ab0[52]],type:_0x1ab0[58],enterAt:moment()[_0x1ab0[55]](_0x1ab0[54]),role:_0x1ab0[62],internal:_0xee3dxc[_0x1ab0[51]][_0x1ab0[63]],uniqueid:_0xee3dxc[_0x1ab0[49]][_0x1ab0[50]][_0xee3dx19][_0xee3dx1c]}})}}}};return respondWithRpcPromise(_0x1ab0[65],{id:_0xee3dxc[_0x1ab0[26]][_0x1ab0[66]],capacity:_0xee3dxc[_0x1ab0[49]][_0x1ab0[67]]},routingClient)[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[68]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[69],_0xee3dxc[_0x1ab0[23]])[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[70]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[71],_0xee3dxc[_0x1ab0[23]])[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[72]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[73],_0xee3dxc[_0x1ab0[23]])[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[74]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[75],_0xee3dxc[_0x1ab0[23]],routingClient)[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[76]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[77],_0xee3dxc[_0x1ab0[23]],routingClient)[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[78]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[79],_0xee3dxc[_0x1ab0[23]],mailClient)[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[80]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[81],_0xee3dxc[_0x1ab0[23]],routingClient)[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[82]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[83],_0xee3dxc[_0x1ab0[23]],routingClient)[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[84]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[85],_0xee3dxc[_0x1ab0[23]],routingClient)[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[86]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[87],_0xee3dxc[_0x1ab0[23]])[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[88]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[89],_0xee3dxc[_0x1ab0[23]],routingClient)[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[90]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[91],_0xee3dxc[_0x1ab0[23]],routingClient)[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[92]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[93],_0xee3dxc[_0x1ab0[23]],routingClient)[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[94]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[95],_0xee3dxc[_0x1ab0[23]],routingClient)[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))};exports[_0x1ab0[96]]= function(_0xee3dxc,_0xee3dx12){return respondWithRpcPromise(_0x1ab0[97],_0xee3dxc[_0x1ab0[23]],routingClient)[_0x1ab0[16]](respondWithResult(_0xee3dx12,null))[_0x1ab0[11]](handleError(_0xee3dx12,null))}
\ No newline at end of file
index 5b82df8..f4fa60f 100644 (file)
@@ -1 +1 @@
-var _0xbcdb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xbcdb[0];var multer=require(_0xbcdb[1]);var util=require(_0xbcdb[2]);var path=require(_0xbcdb[3]);var express=require(_0xbcdb[4]);var router=express.Router();var auth=require(_0xbcdb[5]);var interaction=require(_0xbcdb[6]);var config=require(_0xbcdb[7]);var controller=require(_0xbcdb[8]);router[_0xbcdb[12]](_0xbcdb[9],auth[_0xbcdb[10]](),controller[_0xbcdb[11]]);router[_0xbcdb[12]](_0xbcdb[13],auth[_0xbcdb[10]](),controller[_0xbcdb[14]]);router[_0xbcdb[16]](_0xbcdb[9],auth[_0xbcdb[10]](),controller[_0xbcdb[15]]);router[_0xbcdb[18]](_0xbcdb[13],auth[_0xbcdb[10]](),controller[_0xbcdb[17]]);router[_0xbcdb[20]](_0xbcdb[13],auth[_0xbcdb[10]](),controller[_0xbcdb[19]]);module[_0xbcdb[21]]= router
\ No newline at end of file
+var _0x5264=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x5264[0];var multer=require(_0x5264[1]);var util=require(_0x5264[2]);var path=require(_0x5264[3]);var express=require(_0x5264[4]);var router=express.Router();var auth=require(_0x5264[5]);var interaction=require(_0x5264[6]);var config=require(_0x5264[7]);var controller=require(_0x5264[8]);router[_0x5264[12]](_0x5264[9],auth[_0x5264[10]](),controller[_0x5264[11]]);router[_0x5264[12]](_0x5264[13],auth[_0x5264[10]](),controller[_0x5264[14]]);router[_0x5264[16]](_0x5264[9],auth[_0x5264[10]](),controller[_0x5264[15]]);router[_0x5264[18]](_0x5264[13],auth[_0x5264[10]](),controller[_0x5264[17]]);router[_0x5264[20]](_0x5264[13],auth[_0x5264[10]](),controller[_0x5264[19]]);module[_0x5264[21]]= router
\ No newline at end of file
index c153469..91d4c76 100644 (file)
@@ -1 +1 @@
-var _0x3ec8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x30\x20\x30\x20\x2A\x20\x2A\x20\x2A","\x44\x41\x54\x45","\x49\x4E\x54\x45\x47\x45\x52","\x79\x65\x61\x72\x73","\x71\x75\x61\x72\x74\x65\x72\x73","\x6D\x6F\x6E\x74\x68\x73","\x77\x65\x65\x6B\x73","\x64\x61\x79\x73","\x68\x6F\x75\x72\x73","\x6D\x69\x6E\x75\x74\x65\x73","\x63\x73\x76","\x70\x64\x66","\x78\x6C\x73\x78","\x63\x75\x73\x74\x6F\x6D","\x64\x65\x66\x61\x75\x6C\x74"];_0x3ec8[0];var Sequelize=require(_0x3ec8[1]);module[_0x3ec8[2]]= {name:{type:Sequelize[_0x3ec8[3]],allowNull:false},description:{type:Sequelize[_0x3ec8[3]]},active:{type:Sequelize[_0x3ec8[4]],allowNull:false,defaultValue:false},cron:{type:Sequelize[_0x3ec8[3]],allowNull:false,defaultValue:_0x3ec8[5]},startAt:{type:Sequelize[_0x3ec8[6]],allowNull:false},endAt:{type:Sequelize[_0x3ec8[6]],allowNull:false},subtractNumber:{type:Sequelize[_0x3ec8[7]],allowNull:false,defaultValue:1,validate:{min:1}},subtractUnit:{type:Sequelize.ENUM(_0x3ec8[8],_0x3ec8[9],_0x3ec8[10],_0x3ec8[11],_0x3ec8[12],_0x3ec8[13],_0x3ec8[14]),allowNull:false,defaultValue:_0x3ec8[12]},output:{type:Sequelize.ENUM(_0x3ec8[15],_0x3ec8[16],_0x3ec8[17]),allowNull:false,defaultValue:_0x3ec8[15]},type:{type:Sequelize.ENUM(_0x3ec8[18],_0x3ec8[19]),allowNull:false,defaultValue:_0x3ec8[18]},sendMail:{type:Sequelize[_0x3ec8[4]],defaultValue:false},email:{type:Sequelize[_0x3ec8[3]]}}
\ No newline at end of file
+var _0x63f5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E","\x30\x20\x30\x20\x2A\x20\x2A\x20\x2A","\x44\x41\x54\x45","\x49\x4E\x54\x45\x47\x45\x52","\x79\x65\x61\x72\x73","\x71\x75\x61\x72\x74\x65\x72\x73","\x6D\x6F\x6E\x74\x68\x73","\x77\x65\x65\x6B\x73","\x64\x61\x79\x73","\x68\x6F\x75\x72\x73","\x6D\x69\x6E\x75\x74\x65\x73","\x63\x73\x76","\x70\x64\x66","\x78\x6C\x73\x78","\x63\x75\x73\x74\x6F\x6D","\x64\x65\x66\x61\x75\x6C\x74"];_0x63f5[0];var Sequelize=require(_0x63f5[1]);module[_0x63f5[2]]= {name:{type:Sequelize[_0x63f5[3]],allowNull:false},description:{type:Sequelize[_0x63f5[3]]},active:{type:Sequelize[_0x63f5[4]],allowNull:false,defaultValue:false},cron:{type:Sequelize[_0x63f5[3]],allowNull:false,defaultValue:_0x63f5[5]},startAt:{type:Sequelize[_0x63f5[6]],allowNull:false},endAt:{type:Sequelize[_0x63f5[6]],allowNull:false},subtractNumber:{type:Sequelize[_0x63f5[7]],allowNull:false,defaultValue:1,validate:{min:1}},subtractUnit:{type:Sequelize.ENUM(_0x63f5[8],_0x63f5[9],_0x63f5[10],_0x63f5[11],_0x63f5[12],_0x63f5[13],_0x63f5[14]),allowNull:false,defaultValue:_0x63f5[12]},output:{type:Sequelize.ENUM(_0x63f5[15],_0x63f5[16],_0x63f5[17]),allowNull:false,defaultValue:_0x63f5[15]},type:{type:Sequelize.ENUM(_0x63f5[18],_0x63f5[19]),allowNull:false,defaultValue:_0x63f5[18]},sendMail:{type:Sequelize[_0x63f5[4]],defaultValue:false},email:{type:Sequelize[_0x63f5[3]]}}
\ No newline at end of file
index 0b81749..78300b9 100644 (file)
@@ -1 +1 @@
-var _0x63ac=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x63\x68\x65\x64\x75\x6C\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x63ac[0];var jsonpatch=require(_0x63ac[1]);var rp=require(_0x63ac[2]);var moment=require(_0x63ac[3]);var BPromise=require(_0x63ac[4]);var Mustache=require(_0x63ac[5]);var util=require(_0x63ac[6]);var path=require(_0x63ac[7]);var sox=require(_0x63ac[8]);var csv=require(_0x63ac[9]);var ejs=require(_0x63ac[10]);var fs=require(_0x63ac[11]);var _=require(_0x63ac[12]);var squel=require(_0x63ac[13]);var crypto=require(_0x63ac[14]);var jsforce=require(_0x63ac[15]);var deskjs=require(_0x63ac[16]);var toCsv=require(_0x63ac[9]);var querystring=require(_0x63ac[17]);var Papa=require(_0x63ac[18]);var qs=require(_0x63ac[19]);var logger=require(_0x63ac[21])(_0x63ac[20]);var utils=require(_0x63ac[22]);var config=require(_0x63ac[23]);var db=require(_0x63ac[25])[_0x63ac[24]];function respondWithStatusCode(_0x4e74x1a,_0x4e74x1b){_0x4e74x1b= _0x4e74x1b|| 204;return function(_0x4e74x1c){if(_0x4e74x1c){return _0x4e74x1a[_0x63ac[26]](_0x4e74x1b)};return _0x4e74x1a[_0x63ac[28]](_0x4e74x1b)[_0x63ac[27]]()}}function respondWithResult(_0x4e74x1a,_0x4e74x1b){_0x4e74x1b= _0x4e74x1b|| 200;return function(_0x4e74x1c){if(_0x4e74x1c){return _0x4e74x1a[_0x63ac[28]](_0x4e74x1b)[_0x63ac[29]](_0x4e74x1c)}}}function respondWithFilteredResult(_0x4e74x1a,_0x4e74x1f){return function(_0x4e74x1c){if(_0x4e74x1c){var _0x4e74x20=_0x4e74x1c[_0x63ac[30]],_0x4e74x21=_0x4e74x1f[_0x63ac[31]],_0x4e74x22=_0x4e74x1f[_0x63ac[31]]+ _0x4e74x1f[_0x63ac[32]],_0x4e74x1b;if(_0x4e74x22>= _0x4e74x20){_0x4e74x22= _0x4e74x20;_0x4e74x1b= 200}else {_0x4e74x1b= 206};_0x4e74x1a[_0x63ac[28]](_0x4e74x1b);return _0x4e74x1a[_0x63ac[36]](_0x63ac[33],_0x4e74x21+ _0x63ac[34]+ _0x4e74x22+ _0x63ac[35]+ _0x4e74x20)[_0x63ac[29]](_0x4e74x1c)};return null}}function patchUpdates(_0x4e74x24){return function(_0x4e74x1c){try{jsonpatch[_0x63ac[37]](_0x4e74x1c,_0x4e74x24,true)}catch(err){return BPromise[_0x63ac[38]](err)};return _0x4e74x1c[_0x63ac[39]]()}}function saveUpdates(_0x4e74x26,_0x4e74x1b){return function(_0x4e74x1c){if(_0x4e74x1c){return _0x4e74x1c[_0x63ac[41]](_0x4e74x26)[_0x63ac[40]](function(_0x4e74x27){return _0x4e74x27})};return null}}function removeEntity(_0x4e74x1a,_0x4e74x1b){return function(_0x4e74x1c){if(_0x4e74x1c){return _0x4e74x1c[_0x63ac[42]]()[_0x63ac[40]](function(){_0x4e74x1a[_0x63ac[28]](204)[_0x63ac[27]]()})}}}function handleEntityNotFound(_0x4e74x1a,_0x4e74x1b){return function(_0x4e74x1c){if(!_0x4e74x1c){_0x4e74x1a[_0x63ac[26]](404)};return _0x4e74x1c}}function handleError(_0x4e74x1a,_0x4e74x1b){_0x4e74x1b= _0x4e74x1b|| 500;return function(_0x4e74x2b){logger[_0x63ac[44]](_0x4e74x2b[_0x63ac[43]]);if(_0x4e74x2b[_0x63ac[45]]){delete _0x4e74x2b[_0x63ac[45]]};_0x4e74x1a[_0x63ac[28]](_0x4e74x1b)[_0x63ac[46]](_0x4e74x2b)}}exports[_0x63ac[47]]= function(_0x4e74x2c,_0x4e74x1a){var _0x4e74x1f={},_0x4e74x2d={},_0x4e74x2e={count:0,rows:[]};_0x4e74x2d[_0x63ac[48]]= _[_0x63ac[51]](db[_0x63ac[50]][_0x63ac[49]]);var _0x4e74x2f={dateStart:_0x4e74x2c[_0x63ac[53]][_0x63ac[52]],dateEnd:_0x4e74x2c[_0x63ac[53]][_0x63ac[54]]};delete _0x4e74x2c[_0x63ac[53]][_0x63ac[52]];delete _0x4e74x2c[_0x63ac[53]][_0x63ac[54]];_0x4e74x2d[_0x63ac[53]]= _[_0x63ac[51]](_0x4e74x2c[_0x63ac[53]]);_0x4e74x2d[_0x63ac[55]]= _[_0x63ac[56]](_0x4e74x2d[_0x63ac[48]],_0x4e74x2d[_0x63ac[53]]);_0x4e74x1f[_0x63ac[57]]= _[_0x63ac[56]](_0x4e74x2d[_0x63ac[48]],qs[_0x63ac[58]](_0x4e74x2c[_0x63ac[53]][_0x63ac[58]]));_0x4e74x1f[_0x63ac[57]]= (_0x4e74x1f[_0x63ac[57]][_0x63ac[59]])?_0x4e74x1f[_0x63ac[57]]:_0x4e74x2d[_0x63ac[48]];if(!_0x4e74x2c[_0x63ac[53]][_0x63ac[61]](_0x63ac[60])){_0x4e74x1f[_0x63ac[32]]= qs[_0x63ac[32]](_0x4e74x2c[_0x63ac[53]][_0x63ac[32]]);_0x4e74x1f[_0x63ac[31]]= qs[_0x63ac[31]](_0x4e74x2c[_0x63ac[53]][_0x63ac[31]])};_0x4e74x1f[_0x63ac[62]]= qs[_0x63ac[63]](_0x4e74x2c[_0x63ac[53]][_0x63ac[63]]);_0x4e74x1f[_0x63ac[64]]= qs[_0x63ac[55]](_[_0x63ac[65]](_0x4e74x2c[_0x63ac[53]],_0x4e74x2d[_0x63ac[55]]));if(_0x4e74x2f[_0x63ac[52]]){if(_0x4e74x2f[_0x63ac[54]]){_0x4e74x2f[_0x63ac[54]]= moment(_0x4e74x2f[_0x63ac[54]])[_0x63ac[67]](1,_0x63ac[66])}else {_0x4e74x2f[_0x63ac[54]]= moment(_0x4e74x2f[_0x63ac[52]])[_0x63ac[67]](1,_0x63ac[66])};_[_0x63ac[68]](_0x4e74x1f[_0x63ac[64]],{createdAt:{$gte:_0x4e74x2f[_0x63ac[52]],$lte:_0x4e74x2f[_0x63ac[54]]}})};if(_0x4e74x2c[_0x63ac[53]][_0x63ac[69]]){_0x4e74x1f[_0x63ac[64]]= _[_0x63ac[68]](_0x4e74x1f[_0x63ac[64]],{$or:_[_0x63ac[71]](_0x4e74x1f[_0x63ac[57]],function(_0x4e74x30){var _0x4e74x2e={};_0x4e74x2e[_0x4e74x30]= {$like:_0x63ac[70]+ _0x4e74x2c[_0x63ac[53]][_0x63ac[69]]+ _0x63ac[70]};return _0x4e74x2e})})};_0x4e74x1f= _[_0x63ac[68]]({},_0x4e74x1f,_0x4e74x2c[_0x63ac[72]]);var _0x4e74x31={where:_0x4e74x1f[_0x63ac[64]]};return db[_0x63ac[50]][_0x63ac[30]](_0x4e74x31)[_0x63ac[40]](function(_0x4e74x20){_0x4e74x2e[_0x63ac[30]]= _0x4e74x20;if(_0x4e74x2c[_0x63ac[53]][_0x63ac[75]]){_0x4e74x1f[_0x63ac[76]]= [{all:true}]};return db[_0x63ac[50]][_0x63ac[77]](_0x4e74x1f)})[_0x63ac[40]](function(_0x4e74x32){_0x4e74x2e[_0x63ac[74]]= _0x4e74x32;return _0x4e74x2e})[_0x63ac[40]](respondWithFilteredResult(_0x4e74x1a,_0x4e74x1f))[_0x63ac[73]](handleError(_0x4e74x1a,null))};exports[_0x63ac[78]]= function(_0x4e74x2c,_0x4e74x1a){var _0x4e74x1f={raw:false,where:{id:_0x4e74x2c[_0x63ac[80]][_0x63ac[79]]}},_0x4e74x2d={};_0x4e74x2d[_0x63ac[48]]= _[_0x63ac[51]](db[_0x63ac[50]][_0x63ac[49]]);_0x4e74x2d[_0x63ac[53]]= _[_0x63ac[51]](_0x4e74x2c[_0x63ac[53]]);_0x4e74x2d[_0x63ac[55]]= _[_0x63ac[56]](_0x4e74x2d[_0x63ac[48]],_0x4e74x2d[_0x63ac[53]]);_0x4e74x1f[_0x63ac[57]]= _[_0x63ac[56]](_0x4e74x2d[_0x63ac[48]],qs[_0x63ac[58]](_0x4e74x2c[_0x63ac[53]][_0x63ac[58]]));_0x4e74x1f[_0x63ac[57]]= (_0x4e74x1f[_0x63ac[57]][_0x63ac[59]])?_0x4e74x1f[_0x63ac[57]]:_0x4e74x2d[_0x63ac[48]];if(_0x4e74x2c[_0x63ac[53]][_0x63ac[75]]){_0x4e74x1f[_0x63ac[76]]= [{all:true}]};_0x4e74x1f= _[_0x63ac[68]]({},_0x4e74x1f,_0x4e74x2c[_0x63ac[72]]);return db[_0x63ac[50]][_0x63ac[81]](_0x4e74x1f)[_0x63ac[40]](handleEntityNotFound(_0x4e74x1a,null))[_0x63ac[40]](respondWithResult(_0x4e74x1a,null))[_0x63ac[73]](handleError(_0x4e74x1a,null))};exports[_0x63ac[82]]= function(_0x4e74x2c,_0x4e74x1a){return db[_0x63ac[50]][_0x63ac[82]](_0x4e74x2c[_0x63ac[83]],{})[_0x63ac[40]](respondWithResult(_0x4e74x1a,201))[_0x63ac[73]](handleError(_0x4e74x1a,null))};exports[_0x63ac[41]]= function(_0x4e74x2c,_0x4e74x1a){if(_0x4e74x2c[_0x63ac[83]][_0x63ac[79]]){delete _0x4e74x2c[_0x63ac[83]][_0x63ac[79]]};return db[_0x63ac[50]][_0x63ac[81]]({where:{id:_0x4e74x2c[_0x63ac[80]][_0x63ac[79]]}})[_0x63ac[40]](handleEntityNotFound(_0x4e74x1a,null))[_0x63ac[40]](saveUpdates(_0x4e74x2c[_0x63ac[83]],null))[_0x63ac[40]](respondWithResult(_0x4e74x1a,null))[_0x63ac[73]](handleError(_0x4e74x1a,null))};exports[_0x63ac[42]]= function(_0x4e74x2c,_0x4e74x1a){return db[_0x63ac[50]][_0x63ac[81]]({where:{id:_0x4e74x2c[_0x63ac[80]][_0x63ac[79]]}})[_0x63ac[40]](handleEntityNotFound(_0x4e74x1a,null))[_0x63ac[40]](removeEntity(_0x4e74x1a,null))[_0x63ac[73]](handleError(_0x4e74x1a,null))}
\ No newline at end of file
+var _0xc0e7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x63\x68\x65\x64\x75\x6C\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xc0e7[0];var jsonpatch=require(_0xc0e7[1]);var rp=require(_0xc0e7[2]);var moment=require(_0xc0e7[3]);var BPromise=require(_0xc0e7[4]);var Mustache=require(_0xc0e7[5]);var util=require(_0xc0e7[6]);var path=require(_0xc0e7[7]);var sox=require(_0xc0e7[8]);var csv=require(_0xc0e7[9]);var ejs=require(_0xc0e7[10]);var fs=require(_0xc0e7[11]);var _=require(_0xc0e7[12]);var squel=require(_0xc0e7[13]);var crypto=require(_0xc0e7[14]);var jsforce=require(_0xc0e7[15]);var deskjs=require(_0xc0e7[16]);var toCsv=require(_0xc0e7[9]);var querystring=require(_0xc0e7[17]);var Papa=require(_0xc0e7[18]);var qs=require(_0xc0e7[19]);var logger=require(_0xc0e7[21])(_0xc0e7[20]);var utils=require(_0xc0e7[22]);var config=require(_0xc0e7[23]);var db=require(_0xc0e7[25])[_0xc0e7[24]];function respondWithStatusCode(_0xe138x1a,_0xe138x1b){_0xe138x1b= _0xe138x1b|| 204;return function(_0xe138x1c){if(_0xe138x1c){return _0xe138x1a[_0xc0e7[26]](_0xe138x1b)};return _0xe138x1a[_0xc0e7[28]](_0xe138x1b)[_0xc0e7[27]]()}}function respondWithResult(_0xe138x1a,_0xe138x1b){_0xe138x1b= _0xe138x1b|| 200;return function(_0xe138x1c){if(_0xe138x1c){return _0xe138x1a[_0xc0e7[28]](_0xe138x1b)[_0xc0e7[29]](_0xe138x1c)}}}function respondWithFilteredResult(_0xe138x1a,_0xe138x1f){return function(_0xe138x1c){if(_0xe138x1c){var _0xe138x20=_0xe138x1c[_0xc0e7[30]],_0xe138x21=_0xe138x1f[_0xc0e7[31]],_0xe138x22=_0xe138x1f[_0xc0e7[31]]+ _0xe138x1f[_0xc0e7[32]],_0xe138x1b;if(_0xe138x22>= _0xe138x20){_0xe138x22= _0xe138x20;_0xe138x1b= 200}else {_0xe138x1b= 206};_0xe138x1a[_0xc0e7[28]](_0xe138x1b);return _0xe138x1a[_0xc0e7[36]](_0xc0e7[33],_0xe138x21+ _0xc0e7[34]+ _0xe138x22+ _0xc0e7[35]+ _0xe138x20)[_0xc0e7[29]](_0xe138x1c)};return null}}function patchUpdates(_0xe138x24){return function(_0xe138x1c){try{jsonpatch[_0xc0e7[37]](_0xe138x1c,_0xe138x24,true)}catch(err){return BPromise[_0xc0e7[38]](err)};return _0xe138x1c[_0xc0e7[39]]()}}function saveUpdates(_0xe138x26,_0xe138x1b){return function(_0xe138x1c){if(_0xe138x1c){return _0xe138x1c[_0xc0e7[41]](_0xe138x26)[_0xc0e7[40]](function(_0xe138x27){return _0xe138x27})};return null}}function removeEntity(_0xe138x1a,_0xe138x1b){return function(_0xe138x1c){if(_0xe138x1c){return _0xe138x1c[_0xc0e7[42]]()[_0xc0e7[40]](function(){_0xe138x1a[_0xc0e7[28]](204)[_0xc0e7[27]]()})}}}function handleEntityNotFound(_0xe138x1a,_0xe138x1b){return function(_0xe138x1c){if(!_0xe138x1c){_0xe138x1a[_0xc0e7[26]](404)};return _0xe138x1c}}function handleError(_0xe138x1a,_0xe138x1b){_0xe138x1b= _0xe138x1b|| 500;return function(_0xe138x2b){logger[_0xc0e7[44]](_0xe138x2b[_0xc0e7[43]]);if(_0xe138x2b[_0xc0e7[45]]){delete _0xe138x2b[_0xc0e7[45]]};_0xe138x1a[_0xc0e7[28]](_0xe138x1b)[_0xc0e7[46]](_0xe138x2b)}}exports[_0xc0e7[47]]= function(_0xe138x2c,_0xe138x1a){var _0xe138x1f={},_0xe138x2d={},_0xe138x2e={count:0,rows:[]};_0xe138x2d[_0xc0e7[48]]= _[_0xc0e7[51]](db[_0xc0e7[50]][_0xc0e7[49]]);var _0xe138x2f={dateStart:_0xe138x2c[_0xc0e7[53]][_0xc0e7[52]],dateEnd:_0xe138x2c[_0xc0e7[53]][_0xc0e7[54]]};delete _0xe138x2c[_0xc0e7[53]][_0xc0e7[52]];delete _0xe138x2c[_0xc0e7[53]][_0xc0e7[54]];_0xe138x2d[_0xc0e7[53]]= _[_0xc0e7[51]](_0xe138x2c[_0xc0e7[53]]);_0xe138x2d[_0xc0e7[55]]= _[_0xc0e7[56]](_0xe138x2d[_0xc0e7[48]],_0xe138x2d[_0xc0e7[53]]);_0xe138x1f[_0xc0e7[57]]= _[_0xc0e7[56]](_0xe138x2d[_0xc0e7[48]],qs[_0xc0e7[58]](_0xe138x2c[_0xc0e7[53]][_0xc0e7[58]]));_0xe138x1f[_0xc0e7[57]]= (_0xe138x1f[_0xc0e7[57]][_0xc0e7[59]])?_0xe138x1f[_0xc0e7[57]]:_0xe138x2d[_0xc0e7[48]];if(!_0xe138x2c[_0xc0e7[53]][_0xc0e7[61]](_0xc0e7[60])){_0xe138x1f[_0xc0e7[32]]= qs[_0xc0e7[32]](_0xe138x2c[_0xc0e7[53]][_0xc0e7[32]]);_0xe138x1f[_0xc0e7[31]]= qs[_0xc0e7[31]](_0xe138x2c[_0xc0e7[53]][_0xc0e7[31]])};_0xe138x1f[_0xc0e7[62]]= qs[_0xc0e7[63]](_0xe138x2c[_0xc0e7[53]][_0xc0e7[63]]);_0xe138x1f[_0xc0e7[64]]= qs[_0xc0e7[55]](_[_0xc0e7[65]](_0xe138x2c[_0xc0e7[53]],_0xe138x2d[_0xc0e7[55]]));if(_0xe138x2f[_0xc0e7[52]]){if(_0xe138x2f[_0xc0e7[54]]){_0xe138x2f[_0xc0e7[54]]= moment(_0xe138x2f[_0xc0e7[54]])[_0xc0e7[67]](1,_0xc0e7[66])}else {_0xe138x2f[_0xc0e7[54]]= moment(_0xe138x2f[_0xc0e7[52]])[_0xc0e7[67]](1,_0xc0e7[66])};_[_0xc0e7[68]](_0xe138x1f[_0xc0e7[64]],{createdAt:{$gte:_0xe138x2f[_0xc0e7[52]],$lte:_0xe138x2f[_0xc0e7[54]]}})};if(_0xe138x2c[_0xc0e7[53]][_0xc0e7[69]]){_0xe138x1f[_0xc0e7[64]]= _[_0xc0e7[68]](_0xe138x1f[_0xc0e7[64]],{$or:_[_0xc0e7[71]](_0xe138x1f[_0xc0e7[57]],function(_0xe138x30){var _0xe138x2e={};_0xe138x2e[_0xe138x30]= {$like:_0xc0e7[70]+ _0xe138x2c[_0xc0e7[53]][_0xc0e7[69]]+ _0xc0e7[70]};return _0xe138x2e})})};_0xe138x1f= _[_0xc0e7[68]]({},_0xe138x1f,_0xe138x2c[_0xc0e7[72]]);var _0xe138x31={where:_0xe138x1f[_0xc0e7[64]]};return db[_0xc0e7[50]][_0xc0e7[30]](_0xe138x31)[_0xc0e7[40]](function(_0xe138x20){_0xe138x2e[_0xc0e7[30]]= _0xe138x20;if(_0xe138x2c[_0xc0e7[53]][_0xc0e7[75]]){_0xe138x1f[_0xc0e7[76]]= [{all:true}]};return db[_0xc0e7[50]][_0xc0e7[77]](_0xe138x1f)})[_0xc0e7[40]](function(_0xe138x32){_0xe138x2e[_0xc0e7[74]]= _0xe138x32;return _0xe138x2e})[_0xc0e7[40]](respondWithFilteredResult(_0xe138x1a,_0xe138x1f))[_0xc0e7[73]](handleError(_0xe138x1a,null))};exports[_0xc0e7[78]]= function(_0xe138x2c,_0xe138x1a){var _0xe138x1f={raw:false,where:{id:_0xe138x2c[_0xc0e7[80]][_0xc0e7[79]]}},_0xe138x2d={};_0xe138x2d[_0xc0e7[48]]= _[_0xc0e7[51]](db[_0xc0e7[50]][_0xc0e7[49]]);_0xe138x2d[_0xc0e7[53]]= _[_0xc0e7[51]](_0xe138x2c[_0xc0e7[53]]);_0xe138x2d[_0xc0e7[55]]= _[_0xc0e7[56]](_0xe138x2d[_0xc0e7[48]],_0xe138x2d[_0xc0e7[53]]);_0xe138x1f[_0xc0e7[57]]= _[_0xc0e7[56]](_0xe138x2d[_0xc0e7[48]],qs[_0xc0e7[58]](_0xe138x2c[_0xc0e7[53]][_0xc0e7[58]]));_0xe138x1f[_0xc0e7[57]]= (_0xe138x1f[_0xc0e7[57]][_0xc0e7[59]])?_0xe138x1f[_0xc0e7[57]]:_0xe138x2d[_0xc0e7[48]];if(_0xe138x2c[_0xc0e7[53]][_0xc0e7[75]]){_0xe138x1f[_0xc0e7[76]]= [{all:true}]};_0xe138x1f= _[_0xc0e7[68]]({},_0xe138x1f,_0xe138x2c[_0xc0e7[72]]);return db[_0xc0e7[50]][_0xc0e7[81]](_0xe138x1f)[_0xc0e7[40]](handleEntityNotFound(_0xe138x1a,null))[_0xc0e7[40]](respondWithResult(_0xe138x1a,null))[_0xc0e7[73]](handleError(_0xe138x1a,null))};exports[_0xc0e7[82]]= function(_0xe138x2c,_0xe138x1a){return db[_0xc0e7[50]][_0xc0e7[82]](_0xe138x2c[_0xc0e7[83]],{})[_0xc0e7[40]](respondWithResult(_0xe138x1a,201))[_0xc0e7[73]](handleError(_0xe138x1a,null))};exports[_0xc0e7[41]]= function(_0xe138x2c,_0xe138x1a){if(_0xe138x2c[_0xc0e7[83]][_0xc0e7[79]]){delete _0xe138x2c[_0xc0e7[83]][_0xc0e7[79]]};return db[_0xc0e7[50]][_0xc0e7[81]]({where:{id:_0xe138x2c[_0xc0e7[80]][_0xc0e7[79]]}})[_0xc0e7[40]](handleEntityNotFound(_0xe138x1a,null))[_0xc0e7[40]](saveUpdates(_0xe138x2c[_0xc0e7[83]],null))[_0xc0e7[40]](respondWithResult(_0xe138x1a,null))[_0xc0e7[73]](handleError(_0xe138x1a,null))};exports[_0xc0e7[42]]= function(_0xe138x2c,_0xe138x1a){return db[_0xc0e7[50]][_0xc0e7[81]]({where:{id:_0xe138x2c[_0xc0e7[80]][_0xc0e7[79]]}})[_0xc0e7[40]](handleEntityNotFound(_0xe138x1a,null))[_0xc0e7[40]](removeEntity(_0xe138x1a,null))[_0xc0e7[73]](handleError(_0xe138x1a,null))}
\ No newline at end of file
index dd008a1..9d7c5f5 100644 (file)
@@ -1 +1 @@
-var _0xdf9a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x63\x68\x65\x64\x75\x6C\x65","\x74\x6F\x6F\x6C\x73\x5F\x73\x63\x68\x65\x64\x75\x6C\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0xdf9a[0];var _=require(_0xdf9a[1]);var util=require(_0xdf9a[2]);var logger=require(_0xdf9a[4])(_0xdf9a[3]);var moment=require(_0xdf9a[5]);var BPromise=require(_0xdf9a[6]);var rp=require(_0xdf9a[7]);var attributes=require(_0xdf9a[8]);module[_0xdf9a[9]]= function(_0xcaacx8,_0xcaacx9){return _0xcaacx8[_0xdf9a[12]](_0xdf9a[10],attributes,{tableName:_0xdf9a[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xc601=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x63\x68\x65\x64\x75\x6C\x65","\x74\x6F\x6F\x6C\x73\x5F\x73\x63\x68\x65\x64\x75\x6C\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0xc601[0];var _=require(_0xc601[1]);var util=require(_0xc601[2]);var logger=require(_0xc601[4])(_0xc601[3]);var moment=require(_0xc601[5]);var BPromise=require(_0xc601[6]);var rp=require(_0xc601[7]);var attributes=require(_0xc601[8]);module[_0xc601[9]]= function(_0xac53x8,_0xac53x9){return _0xac53x8[_0xc601[12]](_0xc601[10],attributes,{tableName:_0xc601[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index eff7313..e8ad016 100644 (file)
@@ -1 +1 @@
-var _0x8ffd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x63\x68\x65\x64\x75\x6C\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x63\x68\x65\x64\x75\x6C\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x8ffd[0];var _=require(_0x8ffd[1]);var util=require(_0x8ffd[2]);var moment=require(_0x8ffd[3]);var BPromise=require(_0x8ffd[4]);var rs=require(_0x8ffd[5]);var fs=require(_0x8ffd[6]);var db=require(_0x8ffd[8])[_0x8ffd[7]];var utils=require(_0x8ffd[9]);var logger=require(_0x8ffd[11])(_0x8ffd[10]);var config=require(_0x8ffd[12]);var jayson=require(_0x8ffd[13]);var client=jayson[_0x8ffd[15]][_0x8ffd[14]]({port:9002});function respondWithRpcPromise(_0x5e69xe,_0x5e69xf,_0x5e69x10){return  new BPromise(function(_0x5e69x11,_0x5e69x12){return client[_0x8ffd[28]](_0x5e69xe,_0x5e69x10)[_0x8ffd[27]](function(_0x5e69x14){logger[_0x8ffd[20]](_0x8ffd[16],_0x5e69xf,_0x8ffd[19]);logger[_0x8ffd[23]](_0x8ffd[21],_0x5e69xf,_0x8ffd[19],JSON[_0x8ffd[22]](_0x5e69x14));if(_0x5e69x14[_0x8ffd[17]]){if(_0x5e69x14[_0x8ffd[17]][_0x8ffd[24]]=== 500){logger[_0x8ffd[17]](_0x8ffd[16],_0x5e69xf,_0x5e69x14[_0x8ffd[17]][_0x8ffd[25]]);return _0x5e69x12(_0x5e69x14[_0x8ffd[17]][_0x8ffd[25]])};logger[_0x8ffd[17]](_0x8ffd[16],_0x5e69xf,_0x5e69x14[_0x8ffd[17]][_0x8ffd[25]]);return _0x5e69x11(_0x5e69x14[_0x8ffd[17]][_0x8ffd[25]])}else {logger[_0x8ffd[20]](_0x8ffd[16],_0x5e69xf,_0x8ffd[19]);_0x5e69x11(_0x5e69x14[_0x8ffd[26]][_0x8ffd[25]])}})[_0x8ffd[18]](function(_0x5e69x13){logger[_0x8ffd[17]](_0x8ffd[16],_0x5e69xf,_0x5e69x13);_0x5e69x12(_0x5e69x13)})})}
\ No newline at end of file
+var _0x1e9c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x63\x68\x65\x64\x75\x6C\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x63\x68\x65\x64\x75\x6C\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x1e9c[0];var _=require(_0x1e9c[1]);var util=require(_0x1e9c[2]);var moment=require(_0x1e9c[3]);var BPromise=require(_0x1e9c[4]);var rs=require(_0x1e9c[5]);var fs=require(_0x1e9c[6]);var db=require(_0x1e9c[8])[_0x1e9c[7]];var utils=require(_0x1e9c[9]);var logger=require(_0x1e9c[11])(_0x1e9c[10]);var config=require(_0x1e9c[12]);var jayson=require(_0x1e9c[13]);var client=jayson[_0x1e9c[15]][_0x1e9c[14]]({port:9002});function respondWithRpcPromise(_0xf42axe,_0xf42axf,_0xf42ax10){return  new BPromise(function(_0xf42ax11,_0xf42ax12){return client[_0x1e9c[28]](_0xf42axe,_0xf42ax10)[_0x1e9c[27]](function(_0xf42ax14){logger[_0x1e9c[20]](_0x1e9c[16],_0xf42axf,_0x1e9c[19]);logger[_0x1e9c[23]](_0x1e9c[21],_0xf42axf,_0x1e9c[19],JSON[_0x1e9c[22]](_0xf42ax14));if(_0xf42ax14[_0x1e9c[17]]){if(_0xf42ax14[_0x1e9c[17]][_0x1e9c[24]]=== 500){logger[_0x1e9c[17]](_0x1e9c[16],_0xf42axf,_0xf42ax14[_0x1e9c[17]][_0x1e9c[25]]);return _0xf42ax12(_0xf42ax14[_0x1e9c[17]][_0x1e9c[25]])};logger[_0x1e9c[17]](_0x1e9c[16],_0xf42axf,_0xf42ax14[_0x1e9c[17]][_0x1e9c[25]]);return _0xf42ax11(_0xf42ax14[_0x1e9c[17]][_0x1e9c[25]])}else {logger[_0x1e9c[20]](_0x1e9c[16],_0xf42axf,_0x1e9c[19]);_0xf42ax11(_0xf42ax14[_0x1e9c[26]][_0x1e9c[25]])}})[_0x1e9c[18]](function(_0xf42ax13){logger[_0x1e9c[17]](_0x1e9c[16],_0xf42axf,_0xf42ax13);_0xf42ax12(_0xf42ax13)})})}
\ No newline at end of file
index 5bf4dec..8b5430a 100644 (file)
@@ -1 +1 @@
-var _0x2fb0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x65\x74\x74\x69\x6E\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6C\x6F\x67\x6F","\x67\x65\x74\x4C\x6F\x67\x6F","\x2F\x3A\x69\x64\x2F\x6C\x6F\x67\x6F\x5F\x6C\x6F\x67\x69\x6E","\x67\x65\x74\x4C\x6F\x67\x6F\x4C\x6F\x67\x69\x6E","\x2F\x3A\x69\x64\x2F\x67\x64\x70\x72","\x67\x64\x70\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6C\x6F\x67\x6F\x73\x2F","\x6A\x6F\x69\x6E","\x25\x73\x25\x73","\x6C\x6F\x67\x6F","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x64\x69\x73\x6B\x53\x74\x6F\x72\x61\x67\x65","\x66\x69\x6C\x65","\x73\x69\x6E\x67\x6C\x65","\x61\x64\x64\x4C\x6F\x67\x6F","\x70\x6F\x73\x74","\x6C\x6F\x67\x6F\x6C\x6F\x67\x69\x6E","\x61\x64\x64\x4C\x6F\x67\x6F\x4C\x6F\x67\x69\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x2fb0[0];var multer=require(_0x2fb0[1]);var util=require(_0x2fb0[2]);var path=require(_0x2fb0[3]);var express=require(_0x2fb0[4]);var router=express.Router();var auth=require(_0x2fb0[5]);var interaction=require(_0x2fb0[6]);var config=require(_0x2fb0[7]);var controller=require(_0x2fb0[8]);router[_0x2fb0[12]](_0x2fb0[9],auth[_0x2fb0[10]](),controller[_0x2fb0[11]]);router[_0x2fb0[12]](_0x2fb0[13],controller[_0x2fb0[14]]);router[_0x2fb0[12]](_0x2fb0[15],controller[_0x2fb0[16]]);router[_0x2fb0[12]](_0x2fb0[17],controller[_0x2fb0[18]]);router[_0x2fb0[12]](_0x2fb0[19],controller[_0x2fb0[20]]);var upload=multer({storage:multer[_0x2fb0[29]]({destination:function(_0xab13xb,_0xab13xc,_0xab13xd){_0xab13xd(null,path[_0x2fb0[23]](config[_0x2fb0[21]],_0x2fb0[22]))},filename:function(_0xab13xb,_0xab13xc,_0xab13xd){_0xab13xd(null,util[_0x2fb0[28]](_0x2fb0[24],_0x2fb0[25],path[_0x2fb0[27]](_0xab13xc[_0x2fb0[26]])))}})});router[_0x2fb0[33]](_0x2fb0[15],upload[_0x2fb0[31]](_0x2fb0[30]),controller[_0x2fb0[32]]);var upload=multer({storage:multer[_0x2fb0[29]]({destination:function(_0xab13xb,_0xab13xc,_0xab13xd){_0xab13xd(null,path[_0x2fb0[23]](config[_0x2fb0[21]],_0x2fb0[22]))},filename:function(_0xab13xb,_0xab13xc,_0xab13xd){_0xab13xd(null,util[_0x2fb0[28]](_0x2fb0[24],_0x2fb0[34],path[_0x2fb0[27]](_0xab13xc[_0x2fb0[26]])))}})});router[_0x2fb0[33]](_0x2fb0[17],upload[_0x2fb0[31]](_0x2fb0[30]),controller[_0x2fb0[35]]);router[_0x2fb0[37]](_0x2fb0[13],auth[_0x2fb0[10]](),controller[_0x2fb0[36]]);module[_0x2fb0[38]]= router
\ No newline at end of file
+var _0xf473=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x65\x74\x74\x69\x6E\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6C\x6F\x67\x6F","\x67\x65\x74\x4C\x6F\x67\x6F","\x2F\x3A\x69\x64\x2F\x6C\x6F\x67\x6F\x5F\x6C\x6F\x67\x69\x6E","\x67\x65\x74\x4C\x6F\x67\x6F\x4C\x6F\x67\x69\x6E","\x2F\x3A\x69\x64\x2F\x67\x64\x70\x72","\x67\x64\x70\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6C\x6F\x67\x6F\x73\x2F","\x6A\x6F\x69\x6E","\x25\x73\x25\x73","\x6C\x6F\x67\x6F","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x64\x69\x73\x6B\x53\x74\x6F\x72\x61\x67\x65","\x66\x69\x6C\x65","\x73\x69\x6E\x67\x6C\x65","\x61\x64\x64\x4C\x6F\x67\x6F","\x70\x6F\x73\x74","\x6C\x6F\x67\x6F\x6C\x6F\x67\x69\x6E","\x61\x64\x64\x4C\x6F\x67\x6F\x4C\x6F\x67\x69\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xf473[0];var multer=require(_0xf473[1]);var util=require(_0xf473[2]);var path=require(_0xf473[3]);var express=require(_0xf473[4]);var router=express.Router();var auth=require(_0xf473[5]);var interaction=require(_0xf473[6]);var config=require(_0xf473[7]);var controller=require(_0xf473[8]);router[_0xf473[12]](_0xf473[9],auth[_0xf473[10]](),controller[_0xf473[11]]);router[_0xf473[12]](_0xf473[13],controller[_0xf473[14]]);router[_0xf473[12]](_0xf473[15],controller[_0xf473[16]]);router[_0xf473[12]](_0xf473[17],controller[_0xf473[18]]);router[_0xf473[12]](_0xf473[19],controller[_0xf473[20]]);var upload=multer({storage:multer[_0xf473[29]]({destination:function(_0xc9cfxb,_0xc9cfxc,_0xc9cfxd){_0xc9cfxd(null,path[_0xf473[23]](config[_0xf473[21]],_0xf473[22]))},filename:function(_0xc9cfxb,_0xc9cfxc,_0xc9cfxd){_0xc9cfxd(null,util[_0xf473[28]](_0xf473[24],_0xf473[25],path[_0xf473[27]](_0xc9cfxc[_0xf473[26]])))}})});router[_0xf473[33]](_0xf473[15],upload[_0xf473[31]](_0xf473[30]),controller[_0xf473[32]]);var upload=multer({storage:multer[_0xf473[29]]({destination:function(_0xc9cfxb,_0xc9cfxc,_0xc9cfxd){_0xc9cfxd(null,path[_0xf473[23]](config[_0xf473[21]],_0xf473[22]))},filename:function(_0xc9cfxb,_0xc9cfxc,_0xc9cfxd){_0xc9cfxd(null,util[_0xf473[28]](_0xf473[24],_0xf473[34],path[_0xf473[27]](_0xc9cfxc[_0xf473[26]])))}})});router[_0xf473[33]](_0xf473[17],upload[_0xf473[31]](_0xf473[30]),controller[_0xf473[35]]);router[_0xf473[37]](_0xf473[13],auth[_0xf473[10]](),controller[_0xf473[36]]);module[_0xf473[38]]= router
\ No newline at end of file
index b49690a..69754ae 100644 (file)
@@ -1 +1 @@
-var _0x3a82=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x69\x6E\x5F\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x6D\x69\x6E\x5F\x6D\x61\x69\x6C\x62\x6F\x78","\x53\x54\x52\x49\x4E\x47","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x32\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x42\x4F\x4F\x4C\x45\x41\x4E","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D\x2F\x62\x61\x72\x2F\x70\x68\x6F\x6E\x65\x62\x61\x72\x2F\x61\x75\x74\x6F\x75\x70\x64\x61\x74\x65\x72\x2E\x78\x6D\x6C"];_0x3a82[0];var Sequelize=require(_0x3a82[1]);module[_0x3a82[2]]= {min_internal:{type:Sequelize.INTEGER(11),unique:_0x3a82[3],defaultValue:1000},min_mailbox:{type:Sequelize.INTEGER(11),unique:_0x3a82[4],defaultValue:1000},agi_port:{type:Sequelize.INTEGER(11),defaultValue:4573},soundPath:{type:Sequelize[_0x3a82[5]],defaultValue:_0x3a82[6]},logo:{type:Sequelize[_0x3a82[5]]},defaultLogo:{type:Sequelize[_0x3a82[7]],defaultValue:true},loginLogo:{type:Sequelize[_0x3a82[5]]},defaultLoginLogo:{type:Sequelize[_0x3a82[7]],defaultValue:true},headerWhiteLabel:{type:Sequelize[_0x3a82[5]]},defaultHeaderWhiteLabel:{type:Sequelize[_0x3a82[7]],defaultValue:true},securePassword:{type:Sequelize[_0x3a82[7]],defaultValue:true},firstSetup:{type:Sequelize[_0x3a82[7]],defaultValue:true},stunaddr:{type:Sequelize[_0x3a82[5]]},turnaddr:{type:Sequelize[_0x3a82[5]]},turnusername:{type:Sequelize[_0x3a82[5]]},turnpassword:{type:Sequelize[_0x3a82[5]]},pageTitle:{type:Sequelize[_0x3a82[5]]},defaultPageTitle:{type:Sequelize[_0x3a82[7]],defaultValue:true},callRecordingEncryption:{type:Sequelize[_0x3a82[7]],defaultValue:false},passwordExpiresDays:{type:Sequelize.INTEGER(11),defaultValue:90},phoneBarAutoUpdater:{type:Sequelize[_0x3a82[7]],defaultValue:true},phoneBarAutoUpdaterUrl:{type:Sequelize[_0x3a82[5]],defaultValue:_0x3a82[8]}}
\ No newline at end of file
+var _0x3aa7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x69\x6E\x5F\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x6D\x69\x6E\x5F\x6D\x61\x69\x6C\x62\x6F\x78","\x53\x54\x52\x49\x4E\x47","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x32\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x42\x4F\x4F\x4C\x45\x41\x4E","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D\x2F\x62\x61\x72\x2F\x70\x68\x6F\x6E\x65\x62\x61\x72\x2F\x61\x75\x74\x6F\x75\x70\x64\x61\x74\x65\x72\x2E\x78\x6D\x6C"];_0x3aa7[0];var Sequelize=require(_0x3aa7[1]);module[_0x3aa7[2]]= {min_internal:{type:Sequelize.INTEGER(11),unique:_0x3aa7[3],defaultValue:1000},min_mailbox:{type:Sequelize.INTEGER(11),unique:_0x3aa7[4],defaultValue:1000},agi_port:{type:Sequelize.INTEGER(11),defaultValue:4573},soundPath:{type:Sequelize[_0x3aa7[5]],defaultValue:_0x3aa7[6]},logo:{type:Sequelize[_0x3aa7[5]]},defaultLogo:{type:Sequelize[_0x3aa7[7]],defaultValue:true},loginLogo:{type:Sequelize[_0x3aa7[5]]},defaultLoginLogo:{type:Sequelize[_0x3aa7[7]],defaultValue:true},headerWhiteLabel:{type:Sequelize[_0x3aa7[5]]},defaultHeaderWhiteLabel:{type:Sequelize[_0x3aa7[7]],defaultValue:true},securePassword:{type:Sequelize[_0x3aa7[7]],defaultValue:true},firstSetup:{type:Sequelize[_0x3aa7[7]],defaultValue:true},stunaddr:{type:Sequelize[_0x3aa7[5]]},turnaddr:{type:Sequelize[_0x3aa7[5]]},turnusername:{type:Sequelize[_0x3aa7[5]]},turnpassword:{type:Sequelize[_0x3aa7[5]]},pageTitle:{type:Sequelize[_0x3aa7[5]]},defaultPageTitle:{type:Sequelize[_0x3aa7[7]],defaultValue:true},callRecordingEncryption:{type:Sequelize[_0x3aa7[7]],defaultValue:false},passwordExpiresDays:{type:Sequelize.INTEGER(11),defaultValue:90},phoneBarAutoUpdater:{type:Sequelize[_0x3aa7[7]],defaultValue:true},phoneBarAutoUpdaterUrl:{type:Sequelize[_0x3aa7[5]],defaultValue:_0x3aa7[8]}}
\ No newline at end of file
index c1b1a18..156c7d7 100644 (file)
@@ -1 +1 @@
-var _0x5488=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x65\x74\x74\x69\x6E\x67\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x65\x74\x74\x69\x6E\x67\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x65\x74\x74\x69\x6E\x67","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x52\x65\x6C\x6F\x61\x64","\x72\x65\x73\x5F\x72\x74\x70\x5F\x61\x73\x74\x65\x72\x69\x73\x6B\x2E\x73\x6F","\x67\x65\x74","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73\x2F\x73\x74\x75\x6E\x2E\x65\x6A\x73","\x6A\x6F\x69\x6E","\x75\x74\x66\x38","\x72\x65\x61\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x72\x65\x6E\x64\x65\x72","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73\x2F\x74\x75\x72\x6E\x2E\x65\x6A\x73","\x2F\x65\x74\x63\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x73\x74\x75\x6E\x5F\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6E\x66","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x2F\x65\x74\x63\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x74\x75\x72\x6E\x5F\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6E\x66","\x72\x65\x73\x5F\x73\x74\x75\x6E\x5F\x6D\x6F\x6E\x69\x74\x6F\x72\x2E\x73\x6F","\x62\x6F\x64\x79","\x61\x64\x64\x4C\x6F\x67\x6F","\x66\x69\x6C\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x6C\x6F\x67\x6F","\x61\x64\x64\x4C\x6F\x67\x6F\x4C\x6F\x67\x69\x6E","\x6C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x75\x74\x69\x6C","\x67\x65\x74\x4C\x6F\x67\x6F","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6C\x6F\x67\x6F\x73","\x74\x6F\x4C\x6F\x77\x65\x72","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x64\x65\x66\x61\x75\x6C\x74\x5F\x6C\x6F\x67\x6F\x2E\x70\x6E\x67","\x64\x65\x66\x61\x75\x6C\x74","\x75\x70\x70\x65\x72\x46\x69\x72\x73\x74","\x63\x75\x73\x74\x6F\x6D","\x4C\x6F\x67\x6F\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x65\x66\x61\x75\x6C\x74\x4C\x6F\x67\x6F","\x64\x65\x66\x61\x75\x6C\x74\x4C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x67\x65\x74\x4C\x69\x63\x65\x6E\x73\x65","\x67\x65\x74\x4C\x6F\x67\x6F\x4C\x6F\x67\x69\x6E","\x64\x65\x66\x61\x75\x6C\x74\x5F\x6C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F\x2E\x70\x6E\x67","\x67\x64\x70\x72","\x73\x65\x63\x75\x72\x65\x50\x61\x73\x73\x77\x6F\x72\x64"];_0x5488[0];var jsonpatch=require(_0x5488[1]);var rp=require(_0x5488[2]);var moment=require(_0x5488[3]);var BPromise=require(_0x5488[4]);var Mustache=require(_0x5488[5]);var util=require(_0x5488[6]);var path=require(_0x5488[7]);var sox=require(_0x5488[8]);var csv=require(_0x5488[9]);var ejs=require(_0x5488[10]);var fs=require(_0x5488[11]);var _=require(_0x5488[12]);var squel=require(_0x5488[13]);var crypto=require(_0x5488[14]);var jsforce=require(_0x5488[15]);var deskjs=require(_0x5488[16]);var toCsv=require(_0x5488[9]);var querystring=require(_0x5488[17]);var Papa=require(_0x5488[18]);var qs=require(_0x5488[19]);var logger=require(_0x5488[21])(_0x5488[20]);var utils=require(_0x5488[22]);var config=require(_0x5488[23]);var db=require(_0x5488[25])[_0x5488[24]];var jayson=require(_0x5488[26]);var client=jayson[_0x5488[28]][_0x5488[27]]({port:9002});function respondWithRpcPromise(_0x3781x1c,_0x3781x1d,_0x3781x1e,_0x3781x1f){return  new BPromise(function(_0x3781x20,_0x3781x21){var _0x3781x22=(_0x3781x1f|| client);return _0x3781x22[_0x5488[41]](_0x3781x1c,_0x3781x1e)[_0x5488[40]](function(_0x3781x24){logger[_0x5488[33]](_0x5488[29],_0x3781x1d,_0x5488[32]);logger[_0x5488[36]](_0x5488[34],_0x3781x1d,_0x5488[32],JSON[_0x5488[35]](_0x3781x24));if(_0x3781x24[_0x5488[30]]){if(_0x3781x24[_0x5488[30]][_0x5488[37]]=== 500){logger[_0x5488[30]](_0x5488[29],_0x3781x1d,_0x3781x24[_0x5488[30]][_0x5488[38]]);return _0x3781x21(_0x3781x24[_0x5488[30]][_0x5488[38]])};logger[_0x5488[30]](_0x5488[29],_0x3781x1d,_0x3781x24[_0x5488[30]][_0x5488[38]]);return _0x3781x20(_0x3781x24[_0x5488[30]][_0x5488[38]])}else {logger[_0x5488[33]](_0x5488[29],_0x3781x1d,_0x5488[32]);_0x3781x20(_0x3781x24[_0x5488[39]][_0x5488[38]])}})[_0x5488[31]](function(_0x3781x23){logger[_0x5488[30]](_0x5488[29],_0x3781x1d,_0x3781x23);_0x3781x21(_0x3781x23)})})}function respondWithStatusCode(_0x3781x24,_0x3781x26){_0x3781x26= _0x3781x26|| 204;return function(_0x3781x27){if(_0x3781x27){return _0x3781x24[_0x5488[42]](_0x3781x26)};return _0x3781x24[_0x5488[44]](_0x3781x26)[_0x5488[43]]()}}function respondWithResult(_0x3781x24,_0x3781x26){_0x3781x26= _0x3781x26|| 200;return function(_0x3781x27){if(_0x3781x27){return _0x3781x24[_0x5488[44]](_0x3781x26)[_0x5488[45]](_0x3781x27)}}}function respondWithFilteredResult(_0x3781x24,_0x3781x2a){return function(_0x3781x27){if(_0x3781x27){var _0x3781x2b=_0x3781x27[_0x5488[46]],_0x3781x2c=_0x3781x2a[_0x5488[47]],_0x3781x2d=_0x3781x2a[_0x5488[47]]+ _0x3781x2a[_0x5488[48]],_0x3781x26;if(_0x3781x2d>= _0x3781x2b){_0x3781x2d= _0x3781x2b;_0x3781x26= 200}else {_0x3781x26= 206};_0x3781x24[_0x5488[44]](_0x3781x26);return _0x3781x24[_0x5488[52]](_0x5488[49],_0x3781x2c+ _0x5488[50]+ _0x3781x2d+ _0x5488[51]+ _0x3781x2b)[_0x5488[45]](_0x3781x27)};return null}}function patchUpdates(_0x3781x2f){return function(_0x3781x27){try{jsonpatch[_0x5488[53]](_0x3781x27,_0x3781x2f,true)}catch(err){return BPromise[_0x5488[54]](err)};return _0x3781x27[_0x5488[55]]()}}function saveUpdates(_0x3781x31,_0x3781x26){return function(_0x3781x27){if(_0x3781x27){return _0x3781x27[_0x5488[56]](_0x3781x31)[_0x5488[40]](function(_0x3781x32){return _0x3781x32})};return null}}function removeEntity(_0x3781x24,_0x3781x26){return function(_0x3781x27){if(_0x3781x27){return _0x3781x27[_0x5488[57]]()[_0x5488[40]](function(){_0x3781x24[_0x5488[44]](204)[_0x5488[43]]()})}}}function handleEntityNotFound(_0x3781x24,_0x3781x26){return function(_0x3781x27){if(!_0x3781x27){_0x3781x24[_0x5488[42]](404)};return _0x3781x27}}function handleError(_0x3781x24,_0x3781x26){_0x3781x26= _0x3781x26|| 500;return function(_0x3781x23){logger[_0x5488[30]](_0x3781x23[_0x5488[58]]);if(_0x3781x23[_0x5488[59]]){delete _0x3781x23[_0x5488[59]]};_0x3781x24[_0x5488[44]](_0x3781x26)[_0x5488[60]](_0x3781x23)}}exports[_0x5488[61]]= function(_0x3781x1e,_0x3781x24){var _0x3781x2a={},_0x3781x36={},_0x3781x37={count:0,rows:[]};_0x3781x36[_0x5488[62]]= _[_0x5488[65]](db[_0x5488[64]][_0x5488[63]]);var _0x3781x38={dateStart:_0x3781x1e[_0x5488[67]][_0x5488[66]],dateEnd:_0x3781x1e[_0x5488[67]][_0x5488[68]]};delete _0x3781x1e[_0x5488[67]][_0x5488[66]];delete _0x3781x1e[_0x5488[67]][_0x5488[68]];_0x3781x36[_0x5488[67]]= _[_0x5488[65]](_0x3781x1e[_0x5488[67]]);_0x3781x36[_0x5488[69]]= _[_0x5488[70]](_0x3781x36[_0x5488[62]],_0x3781x36[_0x5488[67]]);_0x3781x2a[_0x5488[71]]= _[_0x5488[70]](_0x3781x36[_0x5488[62]],qs[_0x5488[72]](_0x3781x1e[_0x5488[67]][_0x5488[72]]));_0x3781x2a[_0x5488[71]]= (_0x3781x2a[_0x5488[71]][_0x5488[73]])?_0x3781x2a[_0x5488[71]]:_0x3781x36[_0x5488[62]];if(!_0x3781x1e[_0x5488[67]][_0x5488[75]](_0x5488[74])){_0x3781x2a[_0x5488[48]]= qs[_0x5488[48]](_0x3781x1e[_0x5488[67]][_0x5488[48]]);_0x3781x2a[_0x5488[47]]= qs[_0x5488[47]](_0x3781x1e[_0x5488[67]][_0x5488[47]])};_0x3781x2a[_0x5488[76]]= qs[_0x5488[77]](_0x3781x1e[_0x5488[67]][_0x5488[77]]);_0x3781x2a[_0x5488[78]]= qs[_0x5488[69]](_[_0x5488[79]](_0x3781x1e[_0x5488[67]],_0x3781x36[_0x5488[69]]));if(_0x3781x38[_0x5488[66]]){if(_0x3781x38[_0x5488[68]]){_0x3781x38[_0x5488[68]]= moment(_0x3781x38[_0x5488[68]])[_0x5488[81]](1,_0x5488[80])}else {_0x3781x38[_0x5488[68]]= moment(_0x3781x38[_0x5488[66]])[_0x5488[81]](1,_0x5488[80])};_[_0x5488[82]](_0x3781x2a[_0x5488[78]],{createdAt:{$gte:_0x3781x38[_0x5488[66]],$lte:_0x3781x38[_0x5488[68]]}})};if(_0x3781x1e[_0x5488[67]][_0x5488[83]]){_0x3781x2a[_0x5488[78]]= _[_0x5488[82]](_0x3781x2a[_0x5488[78]],{$or:_[_0x5488[85]](_0x3781x2a[_0x5488[71]],function(_0x3781x39){var _0x3781x37={};_0x3781x37[_0x3781x39]= {$like:_0x5488[84]+ _0x3781x1e[_0x5488[67]][_0x5488[83]]+ _0x5488[84]};return _0x3781x37})})};_0x3781x2a= _[_0x5488[82]]({},_0x3781x2a,_0x3781x1e[_0x5488[86]]);var _0x3781x3a={where:_0x3781x2a[_0x5488[78]]};return db[_0x5488[64]][_0x5488[46]](_0x3781x3a)[_0x5488[40]](function(_0x3781x2b){_0x3781x37[_0x5488[46]]= _0x3781x2b;if(_0x3781x1e[_0x5488[67]][_0x5488[88]]){_0x3781x2a[_0x5488[89]]= [{all:true}]};return db[_0x5488[64]][_0x5488[90]](_0x3781x2a)})[_0x5488[40]](function(_0x3781x3b){_0x3781x37[_0x5488[87]]= _0x3781x3b;return _0x3781x37})[_0x5488[40]](respondWithFilteredResult(_0x3781x24,_0x3781x2a))[_0x5488[31]](handleError(_0x3781x24,null))};exports[_0x5488[91]]= function(_0x3781x1e,_0x3781x24){var _0x3781x2a={raw:false,where:{id:_0x3781x1e[_0x5488[93]][_0x5488[92]]}},_0x3781x36={};_0x3781x36[_0x5488[62]]= _[_0x5488[65]](db[_0x5488[64]][_0x5488[63]]);_0x3781x36[_0x5488[67]]= _[_0x5488[65]](_0x3781x1e[_0x5488[67]]);_0x3781x36[_0x5488[69]]= _[_0x5488[70]](_0x3781x36[_0x5488[62]],_0x3781x36[_0x5488[67]]);_0x3781x2a[_0x5488[71]]= _[_0x5488[70]](_0x3781x36[_0x5488[62]],qs[_0x5488[72]](_0x3781x1e[_0x5488[67]][_0x5488[72]]));_0x3781x2a[_0x5488[71]]= (_0x3781x2a[_0x5488[71]][_0x5488[73]])?_0x3781x2a[_0x5488[71]]:_0x3781x36[_0x5488[62]];if(_0x3781x1e[_0x5488[67]][_0x5488[88]]){_0x3781x2a[_0x5488[89]]= [{all:true}]};_0x3781x2a= _[_0x5488[82]]({},_0x3781x2a,_0x3781x1e[_0x5488[86]]);return db[_0x5488[64]][_0x5488[94]](_0x3781x2a)[_0x5488[40]](handleEntityNotFound(_0x3781x24,null))[_0x5488[40]](respondWithResult(_0x3781x24,null))[_0x5488[31]](handleError(_0x3781x24,null))};exports[_0x5488[56]]= function(_0x3781x1e,_0x3781x24,_0x3781x3c){var _0x3781x3d;return db[_0x5488[64]][_0x5488[94]]({where:{id:_0x3781x1e[_0x5488[93]][_0x5488[92]]}})[_0x5488[40]](handleEntityNotFound(_0x3781x24,null))[_0x5488[40]](saveUpdates(_0x3781x1e[_0x5488[109]],null))[_0x5488[40]](function(_0x3781x27){if(_0x3781x27){_0x3781x3d= _0x3781x27[_0x5488[97]]({plain:true});var _0x3781x3e=fs[_0x5488[102]](path[_0x5488[100]](config[_0x5488[98]],_0x5488[99]),_0x5488[101]);var _0x3781x3f=ejs[_0x5488[103]](_0x3781x3e,_0x3781x3d);var _0x3781x40=fs[_0x5488[102]](path[_0x5488[100]](config[_0x5488[98]],_0x5488[104]),_0x5488[101]);var _0x3781x41=ejs[_0x5488[103]](_0x3781x40,_0x3781x3d);fs[_0x5488[106]](_0x5488[105],_0x3781x3f);fs[_0x5488[106]](_0x5488[107],_0x3781x41);return respondWithRpcPromise(_0x5488[95],_0x5488[56],{module:_0x5488[108]})}})[_0x5488[40]](function(){return respondWithRpcPromise(_0x5488[95],_0x5488[56],{module:_0x5488[96]})})[_0x5488[40]](function(){return _0x3781x3d|| null})[_0x5488[40]](respondWithResult(_0x3781x24,null))[_0x5488[31]](handleError(_0x3781x24,null))};exports[_0x5488[110]]= function(_0x3781x1e,_0x3781x24,_0x3781x3c){if(_0x3781x1e[_0x5488[111]]&& _0x3781x1e[_0x5488[111]][_0x5488[112]]){_0x3781x1e[_0x5488[109]][_0x5488[113]]= _0x3781x1e[_0x5488[111]][_0x5488[112]]};return db[_0x5488[64]][_0x5488[94]]({where:{id:_0x3781x1e[_0x5488[93]][_0x5488[92]]}})[_0x5488[40]](handleEntityNotFound(_0x3781x24,null))[_0x5488[40]](saveUpdates(_0x3781x1e[_0x5488[109]],null))[_0x5488[40]](respondWithResult(_0x3781x24,null))[_0x5488[31]](handleError(_0x3781x24,null))};exports[_0x5488[114]]= function(_0x3781x1e,_0x3781x24,_0x3781x3c){if(_0x3781x1e[_0x5488[111]]&& _0x3781x1e[_0x5488[111]][_0x5488[112]]){_0x3781x1e[_0x5488[109]][_0x5488[115]]= _0x3781x1e[_0x5488[111]][_0x5488[112]]};return db[_0x5488[64]][_0x5488[94]]({where:{id:_0x3781x1e[_0x5488[93]][_0x5488[92]]}})[_0x5488[40]](handleEntityNotFound(_0x3781x24,null))[_0x5488[40]](saveUpdates(_0x3781x1e[_0x5488[109]],null))[_0x5488[40]](respondWithResult(_0x3781x24,null))[_0x5488[31]](handleError(_0x3781x24,null))};var utilLicense=require(_0x5488[116]);exports[_0x5488[117]]= function(_0x3781x1e,_0x3781x24,_0x3781x3c){var _0x3781x43=_0x5488[118];var _0x3781x44={custom:false};return utilLicense[_0x5488[130]]()[_0x5488[40]](function(_0x3781x47){if(_0x3781x47){_0x3781x44= _0x3781x47};return db[_0x5488[64]][_0x5488[94]]({where:{id:_0x3781x1e[_0x5488[93]][_0x5488[92]]},attributes:[_0x5488[113],_0x5488[115],_0x5488[128],_0x5488[129]],raw:true})})[_0x5488[40]](handleEntityNotFound(_0x3781x24,null))[_0x5488[40]](function(_0x3781x27){if(_0x3781x27){var _0x3781x45=(_0x3781x27[_0x5488[113]]&& fs[_0x5488[120]](path[_0x5488[100]](config[_0x5488[98]],_0x3781x43,_[_0x5488[119]](_0x3781x27[_0x5488[113]]))))?path[_0x5488[100]](config[_0x5488[98]],_0x3781x43,_[_0x5488[119]](_0x3781x27[_0x5488[113]])):path[_0x5488[100]](config[_0x5488[98]],_0x3781x43,_[_0x5488[119]](_0x5488[121]));var _0x3781x46=_0x5488[122]+ _[_0x5488[123]](_0x5488[113]);if(_0x3781x27[_0x3781x46]||  !_0x3781x44[_0x5488[124]]){_0x3781x45= path[_0x5488[100]](config[_0x5488[98]],_0x3781x43,_[_0x5488[119]](_0x5488[121]))};if(!fs[_0x5488[120]](_0x3781x45)){throw  new db[_0x5488[126]].ValidationError(_0x5488[125])};return _0x3781x24[_0x5488[127]](_0x3781x45)}})[_0x5488[31]](handleError(_0x3781x24,null))};var utilLicense=require(_0x5488[116]);exports[_0x5488[131]]= function(_0x3781x1e,_0x3781x24,_0x3781x3c){var _0x3781x43=_0x5488[118];var _0x3781x44={custom:false};return utilLicense[_0x5488[130]]()[_0x5488[40]](function(_0x3781x47){if(_0x3781x47){_0x3781x44= _0x3781x47};return db[_0x5488[64]][_0x5488[94]]({where:{id:_0x3781x1e[_0x5488[93]][_0x5488[92]]},attributes:[_0x5488[113],_0x5488[115],_0x5488[128],_0x5488[129]],raw:true})})[_0x5488[40]](handleEntityNotFound(_0x3781x24,null))[_0x5488[40]](function(_0x3781x27){if(_0x3781x27){var _0x3781x45=(_0x3781x27[_0x5488[115]]&& fs[_0x5488[120]](path[_0x5488[100]](config[_0x5488[98]],_0x3781x43,_[_0x5488[119]](_0x3781x27[_0x5488[115]]))))?path[_0x5488[100]](config[_0x5488[98]],_0x3781x43,_[_0x5488[119]](_0x3781x27[_0x5488[115]])):path[_0x5488[100]](config[_0x5488[98]],_0x3781x43,_[_0x5488[119]](_0x5488[132]));var _0x3781x46=_0x5488[122]+ _[_0x5488[123]](_0x5488[115]);if(_0x3781x27[_0x3781x46]||  !_0x3781x44[_0x5488[124]]){_0x3781x45= path[_0x5488[100]](config[_0x5488[98]],_0x3781x43,_[_0x5488[119]](_0x5488[132]))};if(!fs[_0x5488[120]](_0x3781x45)){throw  new db[_0x5488[126]].ValidationError(_0x5488[125])};return _0x3781x24[_0x5488[127]](_0x3781x45)}})[_0x5488[31]](handleError(_0x3781x24,null))};exports[_0x5488[133]]= function(_0x3781x1e,_0x3781x24){return db[_0x5488[64]][_0x5488[94]]({where:{id:_0x3781x1e[_0x5488[93]][_0x5488[92]]},attributes:[_0x5488[134]]})[_0x5488[40]](respondWithResult(_0x3781x24,null))[_0x5488[31]](handleError(_0x3781x24,null))}
\ No newline at end of file
+var _0x9de6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x65\x74\x74\x69\x6E\x67\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x65\x74\x74\x69\x6E\x67\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x65\x74\x74\x69\x6E\x67","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x52\x65\x6C\x6F\x61\x64","\x72\x65\x73\x5F\x72\x74\x70\x5F\x61\x73\x74\x65\x72\x69\x73\x6B\x2E\x73\x6F","\x67\x65\x74","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73\x2F\x73\x74\x75\x6E\x2E\x65\x6A\x73","\x6A\x6F\x69\x6E","\x75\x74\x66\x38","\x72\x65\x61\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x72\x65\x6E\x64\x65\x72","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73\x2F\x74\x75\x72\x6E\x2E\x65\x6A\x73","\x2F\x65\x74\x63\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x73\x74\x75\x6E\x5F\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6E\x66","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x2F\x65\x74\x63\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x74\x75\x72\x6E\x5F\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6E\x66","\x72\x65\x73\x5F\x73\x74\x75\x6E\x5F\x6D\x6F\x6E\x69\x74\x6F\x72\x2E\x73\x6F","\x62\x6F\x64\x79","\x61\x64\x64\x4C\x6F\x67\x6F","\x66\x69\x6C\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x6C\x6F\x67\x6F","\x61\x64\x64\x4C\x6F\x67\x6F\x4C\x6F\x67\x69\x6E","\x6C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x75\x74\x69\x6C","\x67\x65\x74\x4C\x6F\x67\x6F","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6C\x6F\x67\x6F\x73","\x74\x6F\x4C\x6F\x77\x65\x72","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x64\x65\x66\x61\x75\x6C\x74\x5F\x6C\x6F\x67\x6F\x2E\x70\x6E\x67","\x64\x65\x66\x61\x75\x6C\x74","\x75\x70\x70\x65\x72\x46\x69\x72\x73\x74","\x63\x75\x73\x74\x6F\x6D","\x4C\x6F\x67\x6F\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x65\x66\x61\x75\x6C\x74\x4C\x6F\x67\x6F","\x64\x65\x66\x61\x75\x6C\x74\x4C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x67\x65\x74\x4C\x69\x63\x65\x6E\x73\x65","\x67\x65\x74\x4C\x6F\x67\x6F\x4C\x6F\x67\x69\x6E","\x64\x65\x66\x61\x75\x6C\x74\x5F\x6C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F\x2E\x70\x6E\x67","\x67\x64\x70\x72","\x73\x65\x63\x75\x72\x65\x50\x61\x73\x73\x77\x6F\x72\x64"];_0x9de6[0];var jsonpatch=require(_0x9de6[1]);var rp=require(_0x9de6[2]);var moment=require(_0x9de6[3]);var BPromise=require(_0x9de6[4]);var Mustache=require(_0x9de6[5]);var util=require(_0x9de6[6]);var path=require(_0x9de6[7]);var sox=require(_0x9de6[8]);var csv=require(_0x9de6[9]);var ejs=require(_0x9de6[10]);var fs=require(_0x9de6[11]);var _=require(_0x9de6[12]);var squel=require(_0x9de6[13]);var crypto=require(_0x9de6[14]);var jsforce=require(_0x9de6[15]);var deskjs=require(_0x9de6[16]);var toCsv=require(_0x9de6[9]);var querystring=require(_0x9de6[17]);var Papa=require(_0x9de6[18]);var qs=require(_0x9de6[19]);var logger=require(_0x9de6[21])(_0x9de6[20]);var utils=require(_0x9de6[22]);var config=require(_0x9de6[23]);var db=require(_0x9de6[25])[_0x9de6[24]];var jayson=require(_0x9de6[26]);var client=jayson[_0x9de6[28]][_0x9de6[27]]({port:9002});function respondWithRpcPromise(_0xd7e4x1c,_0xd7e4x1d,_0xd7e4x1e,_0xd7e4x1f){return  new BPromise(function(_0xd7e4x20,_0xd7e4x21){var _0xd7e4x22=(_0xd7e4x1f|| client);return _0xd7e4x22[_0x9de6[41]](_0xd7e4x1c,_0xd7e4x1e)[_0x9de6[40]](function(_0xd7e4x24){logger[_0x9de6[33]](_0x9de6[29],_0xd7e4x1d,_0x9de6[32]);logger[_0x9de6[36]](_0x9de6[34],_0xd7e4x1d,_0x9de6[32],JSON[_0x9de6[35]](_0xd7e4x24));if(_0xd7e4x24[_0x9de6[30]]){if(_0xd7e4x24[_0x9de6[30]][_0x9de6[37]]=== 500){logger[_0x9de6[30]](_0x9de6[29],_0xd7e4x1d,_0xd7e4x24[_0x9de6[30]][_0x9de6[38]]);return _0xd7e4x21(_0xd7e4x24[_0x9de6[30]][_0x9de6[38]])};logger[_0x9de6[30]](_0x9de6[29],_0xd7e4x1d,_0xd7e4x24[_0x9de6[30]][_0x9de6[38]]);return _0xd7e4x20(_0xd7e4x24[_0x9de6[30]][_0x9de6[38]])}else {logger[_0x9de6[33]](_0x9de6[29],_0xd7e4x1d,_0x9de6[32]);_0xd7e4x20(_0xd7e4x24[_0x9de6[39]][_0x9de6[38]])}})[_0x9de6[31]](function(_0xd7e4x23){logger[_0x9de6[30]](_0x9de6[29],_0xd7e4x1d,_0xd7e4x23);_0xd7e4x21(_0xd7e4x23)})})}function respondWithStatusCode(_0xd7e4x24,_0xd7e4x26){_0xd7e4x26= _0xd7e4x26|| 204;return function(_0xd7e4x27){if(_0xd7e4x27){return _0xd7e4x24[_0x9de6[42]](_0xd7e4x26)};return _0xd7e4x24[_0x9de6[44]](_0xd7e4x26)[_0x9de6[43]]()}}function respondWithResult(_0xd7e4x24,_0xd7e4x26){_0xd7e4x26= _0xd7e4x26|| 200;return function(_0xd7e4x27){if(_0xd7e4x27){return _0xd7e4x24[_0x9de6[44]](_0xd7e4x26)[_0x9de6[45]](_0xd7e4x27)}}}function respondWithFilteredResult(_0xd7e4x24,_0xd7e4x2a){return function(_0xd7e4x27){if(_0xd7e4x27){var _0xd7e4x2b=_0xd7e4x27[_0x9de6[46]],_0xd7e4x2c=_0xd7e4x2a[_0x9de6[47]],_0xd7e4x2d=_0xd7e4x2a[_0x9de6[47]]+ _0xd7e4x2a[_0x9de6[48]],_0xd7e4x26;if(_0xd7e4x2d>= _0xd7e4x2b){_0xd7e4x2d= _0xd7e4x2b;_0xd7e4x26= 200}else {_0xd7e4x26= 206};_0xd7e4x24[_0x9de6[44]](_0xd7e4x26);return _0xd7e4x24[_0x9de6[52]](_0x9de6[49],_0xd7e4x2c+ _0x9de6[50]+ _0xd7e4x2d+ _0x9de6[51]+ _0xd7e4x2b)[_0x9de6[45]](_0xd7e4x27)};return null}}function patchUpdates(_0xd7e4x2f){return function(_0xd7e4x27){try{jsonpatch[_0x9de6[53]](_0xd7e4x27,_0xd7e4x2f,true)}catch(err){return BPromise[_0x9de6[54]](err)};return _0xd7e4x27[_0x9de6[55]]()}}function saveUpdates(_0xd7e4x31,_0xd7e4x26){return function(_0xd7e4x27){if(_0xd7e4x27){return _0xd7e4x27[_0x9de6[56]](_0xd7e4x31)[_0x9de6[40]](function(_0xd7e4x32){return _0xd7e4x32})};return null}}function removeEntity(_0xd7e4x24,_0xd7e4x26){return function(_0xd7e4x27){if(_0xd7e4x27){return _0xd7e4x27[_0x9de6[57]]()[_0x9de6[40]](function(){_0xd7e4x24[_0x9de6[44]](204)[_0x9de6[43]]()})}}}function handleEntityNotFound(_0xd7e4x24,_0xd7e4x26){return function(_0xd7e4x27){if(!_0xd7e4x27){_0xd7e4x24[_0x9de6[42]](404)};return _0xd7e4x27}}function handleError(_0xd7e4x24,_0xd7e4x26){_0xd7e4x26= _0xd7e4x26|| 500;return function(_0xd7e4x23){logger[_0x9de6[30]](_0xd7e4x23[_0x9de6[58]]);if(_0xd7e4x23[_0x9de6[59]]){delete _0xd7e4x23[_0x9de6[59]]};_0xd7e4x24[_0x9de6[44]](_0xd7e4x26)[_0x9de6[60]](_0xd7e4x23)}}exports[_0x9de6[61]]= function(_0xd7e4x1e,_0xd7e4x24){var _0xd7e4x2a={},_0xd7e4x36={},_0xd7e4x37={count:0,rows:[]};_0xd7e4x36[_0x9de6[62]]= _[_0x9de6[65]](db[_0x9de6[64]][_0x9de6[63]]);var _0xd7e4x38={dateStart:_0xd7e4x1e[_0x9de6[67]][_0x9de6[66]],dateEnd:_0xd7e4x1e[_0x9de6[67]][_0x9de6[68]]};delete _0xd7e4x1e[_0x9de6[67]][_0x9de6[66]];delete _0xd7e4x1e[_0x9de6[67]][_0x9de6[68]];_0xd7e4x36[_0x9de6[67]]= _[_0x9de6[65]](_0xd7e4x1e[_0x9de6[67]]);_0xd7e4x36[_0x9de6[69]]= _[_0x9de6[70]](_0xd7e4x36[_0x9de6[62]],_0xd7e4x36[_0x9de6[67]]);_0xd7e4x2a[_0x9de6[71]]= _[_0x9de6[70]](_0xd7e4x36[_0x9de6[62]],qs[_0x9de6[72]](_0xd7e4x1e[_0x9de6[67]][_0x9de6[72]]));_0xd7e4x2a[_0x9de6[71]]= (_0xd7e4x2a[_0x9de6[71]][_0x9de6[73]])?_0xd7e4x2a[_0x9de6[71]]:_0xd7e4x36[_0x9de6[62]];if(!_0xd7e4x1e[_0x9de6[67]][_0x9de6[75]](_0x9de6[74])){_0xd7e4x2a[_0x9de6[48]]= qs[_0x9de6[48]](_0xd7e4x1e[_0x9de6[67]][_0x9de6[48]]);_0xd7e4x2a[_0x9de6[47]]= qs[_0x9de6[47]](_0xd7e4x1e[_0x9de6[67]][_0x9de6[47]])};_0xd7e4x2a[_0x9de6[76]]= qs[_0x9de6[77]](_0xd7e4x1e[_0x9de6[67]][_0x9de6[77]]);_0xd7e4x2a[_0x9de6[78]]= qs[_0x9de6[69]](_[_0x9de6[79]](_0xd7e4x1e[_0x9de6[67]],_0xd7e4x36[_0x9de6[69]]));if(_0xd7e4x38[_0x9de6[66]]){if(_0xd7e4x38[_0x9de6[68]]){_0xd7e4x38[_0x9de6[68]]= moment(_0xd7e4x38[_0x9de6[68]])[_0x9de6[81]](1,_0x9de6[80])}else {_0xd7e4x38[_0x9de6[68]]= moment(_0xd7e4x38[_0x9de6[66]])[_0x9de6[81]](1,_0x9de6[80])};_[_0x9de6[82]](_0xd7e4x2a[_0x9de6[78]],{createdAt:{$gte:_0xd7e4x38[_0x9de6[66]],$lte:_0xd7e4x38[_0x9de6[68]]}})};if(_0xd7e4x1e[_0x9de6[67]][_0x9de6[83]]){_0xd7e4x2a[_0x9de6[78]]= _[_0x9de6[82]](_0xd7e4x2a[_0x9de6[78]],{$or:_[_0x9de6[85]](_0xd7e4x2a[_0x9de6[71]],function(_0xd7e4x39){var _0xd7e4x37={};_0xd7e4x37[_0xd7e4x39]= {$like:_0x9de6[84]+ _0xd7e4x1e[_0x9de6[67]][_0x9de6[83]]+ _0x9de6[84]};return _0xd7e4x37})})};_0xd7e4x2a= _[_0x9de6[82]]({},_0xd7e4x2a,_0xd7e4x1e[_0x9de6[86]]);var _0xd7e4x3a={where:_0xd7e4x2a[_0x9de6[78]]};return db[_0x9de6[64]][_0x9de6[46]](_0xd7e4x3a)[_0x9de6[40]](function(_0xd7e4x2b){_0xd7e4x37[_0x9de6[46]]= _0xd7e4x2b;if(_0xd7e4x1e[_0x9de6[67]][_0x9de6[88]]){_0xd7e4x2a[_0x9de6[89]]= [{all:true}]};return db[_0x9de6[64]][_0x9de6[90]](_0xd7e4x2a)})[_0x9de6[40]](function(_0xd7e4x3b){_0xd7e4x37[_0x9de6[87]]= _0xd7e4x3b;return _0xd7e4x37})[_0x9de6[40]](respondWithFilteredResult(_0xd7e4x24,_0xd7e4x2a))[_0x9de6[31]](handleError(_0xd7e4x24,null))};exports[_0x9de6[91]]= function(_0xd7e4x1e,_0xd7e4x24){var _0xd7e4x2a={raw:false,where:{id:_0xd7e4x1e[_0x9de6[93]][_0x9de6[92]]}},_0xd7e4x36={};_0xd7e4x36[_0x9de6[62]]= _[_0x9de6[65]](db[_0x9de6[64]][_0x9de6[63]]);_0xd7e4x36[_0x9de6[67]]= _[_0x9de6[65]](_0xd7e4x1e[_0x9de6[67]]);_0xd7e4x36[_0x9de6[69]]= _[_0x9de6[70]](_0xd7e4x36[_0x9de6[62]],_0xd7e4x36[_0x9de6[67]]);_0xd7e4x2a[_0x9de6[71]]= _[_0x9de6[70]](_0xd7e4x36[_0x9de6[62]],qs[_0x9de6[72]](_0xd7e4x1e[_0x9de6[67]][_0x9de6[72]]));_0xd7e4x2a[_0x9de6[71]]= (_0xd7e4x2a[_0x9de6[71]][_0x9de6[73]])?_0xd7e4x2a[_0x9de6[71]]:_0xd7e4x36[_0x9de6[62]];if(_0xd7e4x1e[_0x9de6[67]][_0x9de6[88]]){_0xd7e4x2a[_0x9de6[89]]= [{all:true}]};_0xd7e4x2a= _[_0x9de6[82]]({},_0xd7e4x2a,_0xd7e4x1e[_0x9de6[86]]);return db[_0x9de6[64]][_0x9de6[94]](_0xd7e4x2a)[_0x9de6[40]](handleEntityNotFound(_0xd7e4x24,null))[_0x9de6[40]](respondWithResult(_0xd7e4x24,null))[_0x9de6[31]](handleError(_0xd7e4x24,null))};exports[_0x9de6[56]]= function(_0xd7e4x1e,_0xd7e4x24,_0xd7e4x3c){var _0xd7e4x3d;return db[_0x9de6[64]][_0x9de6[94]]({where:{id:_0xd7e4x1e[_0x9de6[93]][_0x9de6[92]]}})[_0x9de6[40]](handleEntityNotFound(_0xd7e4x24,null))[_0x9de6[40]](saveUpdates(_0xd7e4x1e[_0x9de6[109]],null))[_0x9de6[40]](function(_0xd7e4x27){if(_0xd7e4x27){_0xd7e4x3d= _0xd7e4x27[_0x9de6[97]]({plain:true});var _0xd7e4x3e=fs[_0x9de6[102]](path[_0x9de6[100]](config[_0x9de6[98]],_0x9de6[99]),_0x9de6[101]);var _0xd7e4x3f=ejs[_0x9de6[103]](_0xd7e4x3e,_0xd7e4x3d);var _0xd7e4x40=fs[_0x9de6[102]](path[_0x9de6[100]](config[_0x9de6[98]],_0x9de6[104]),_0x9de6[101]);var _0xd7e4x41=ejs[_0x9de6[103]](_0xd7e4x40,_0xd7e4x3d);fs[_0x9de6[106]](_0x9de6[105],_0xd7e4x3f);fs[_0x9de6[106]](_0x9de6[107],_0xd7e4x41);return respondWithRpcPromise(_0x9de6[95],_0x9de6[56],{module:_0x9de6[108]})}})[_0x9de6[40]](function(){return respondWithRpcPromise(_0x9de6[95],_0x9de6[56],{module:_0x9de6[96]})})[_0x9de6[40]](function(){return _0xd7e4x3d|| null})[_0x9de6[40]](respondWithResult(_0xd7e4x24,null))[_0x9de6[31]](handleError(_0xd7e4x24,null))};exports[_0x9de6[110]]= function(_0xd7e4x1e,_0xd7e4x24,_0xd7e4x3c){if(_0xd7e4x1e[_0x9de6[111]]&& _0xd7e4x1e[_0x9de6[111]][_0x9de6[112]]){_0xd7e4x1e[_0x9de6[109]][_0x9de6[113]]= _0xd7e4x1e[_0x9de6[111]][_0x9de6[112]]};return db[_0x9de6[64]][_0x9de6[94]]({where:{id:_0xd7e4x1e[_0x9de6[93]][_0x9de6[92]]}})[_0x9de6[40]](handleEntityNotFound(_0xd7e4x24,null))[_0x9de6[40]](saveUpdates(_0xd7e4x1e[_0x9de6[109]],null))[_0x9de6[40]](respondWithResult(_0xd7e4x24,null))[_0x9de6[31]](handleError(_0xd7e4x24,null))};exports[_0x9de6[114]]= function(_0xd7e4x1e,_0xd7e4x24,_0xd7e4x3c){if(_0xd7e4x1e[_0x9de6[111]]&& _0xd7e4x1e[_0x9de6[111]][_0x9de6[112]]){_0xd7e4x1e[_0x9de6[109]][_0x9de6[115]]= _0xd7e4x1e[_0x9de6[111]][_0x9de6[112]]};return db[_0x9de6[64]][_0x9de6[94]]({where:{id:_0xd7e4x1e[_0x9de6[93]][_0x9de6[92]]}})[_0x9de6[40]](handleEntityNotFound(_0xd7e4x24,null))[_0x9de6[40]](saveUpdates(_0xd7e4x1e[_0x9de6[109]],null))[_0x9de6[40]](respondWithResult(_0xd7e4x24,null))[_0x9de6[31]](handleError(_0xd7e4x24,null))};var utilLicense=require(_0x9de6[116]);exports[_0x9de6[117]]= function(_0xd7e4x1e,_0xd7e4x24,_0xd7e4x3c){var _0xd7e4x43=_0x9de6[118];var _0xd7e4x44={custom:false};return utilLicense[_0x9de6[130]]()[_0x9de6[40]](function(_0xd7e4x47){if(_0xd7e4x47){_0xd7e4x44= _0xd7e4x47};return db[_0x9de6[64]][_0x9de6[94]]({where:{id:_0xd7e4x1e[_0x9de6[93]][_0x9de6[92]]},attributes:[_0x9de6[113],_0x9de6[115],_0x9de6[128],_0x9de6[129]],raw:true})})[_0x9de6[40]](handleEntityNotFound(_0xd7e4x24,null))[_0x9de6[40]](function(_0xd7e4x27){if(_0xd7e4x27){var _0xd7e4x45=(_0xd7e4x27[_0x9de6[113]]&& fs[_0x9de6[120]](path[_0x9de6[100]](config[_0x9de6[98]],_0xd7e4x43,_[_0x9de6[119]](_0xd7e4x27[_0x9de6[113]]))))?path[_0x9de6[100]](config[_0x9de6[98]],_0xd7e4x43,_[_0x9de6[119]](_0xd7e4x27[_0x9de6[113]])):path[_0x9de6[100]](config[_0x9de6[98]],_0xd7e4x43,_[_0x9de6[119]](_0x9de6[121]));var _0xd7e4x46=_0x9de6[122]+ _[_0x9de6[123]](_0x9de6[113]);if(_0xd7e4x27[_0xd7e4x46]||  !_0xd7e4x44[_0x9de6[124]]){_0xd7e4x45= path[_0x9de6[100]](config[_0x9de6[98]],_0xd7e4x43,_[_0x9de6[119]](_0x9de6[121]))};if(!fs[_0x9de6[120]](_0xd7e4x45)){throw  new db[_0x9de6[126]].ValidationError(_0x9de6[125])};return _0xd7e4x24[_0x9de6[127]](_0xd7e4x45)}})[_0x9de6[31]](handleError(_0xd7e4x24,null))};var utilLicense=require(_0x9de6[116]);exports[_0x9de6[131]]= function(_0xd7e4x1e,_0xd7e4x24,_0xd7e4x3c){var _0xd7e4x43=_0x9de6[118];var _0xd7e4x44={custom:false};return utilLicense[_0x9de6[130]]()[_0x9de6[40]](function(_0xd7e4x47){if(_0xd7e4x47){_0xd7e4x44= _0xd7e4x47};return db[_0x9de6[64]][_0x9de6[94]]({where:{id:_0xd7e4x1e[_0x9de6[93]][_0x9de6[92]]},attributes:[_0x9de6[113],_0x9de6[115],_0x9de6[128],_0x9de6[129]],raw:true})})[_0x9de6[40]](handleEntityNotFound(_0xd7e4x24,null))[_0x9de6[40]](function(_0xd7e4x27){if(_0xd7e4x27){var _0xd7e4x45=(_0xd7e4x27[_0x9de6[115]]&& fs[_0x9de6[120]](path[_0x9de6[100]](config[_0x9de6[98]],_0xd7e4x43,_[_0x9de6[119]](_0xd7e4x27[_0x9de6[115]]))))?path[_0x9de6[100]](config[_0x9de6[98]],_0xd7e4x43,_[_0x9de6[119]](_0xd7e4x27[_0x9de6[115]])):path[_0x9de6[100]](config[_0x9de6[98]],_0xd7e4x43,_[_0x9de6[119]](_0x9de6[132]));var _0xd7e4x46=_0x9de6[122]+ _[_0x9de6[123]](_0x9de6[115]);if(_0xd7e4x27[_0xd7e4x46]||  !_0xd7e4x44[_0x9de6[124]]){_0xd7e4x45= path[_0x9de6[100]](config[_0x9de6[98]],_0xd7e4x43,_[_0x9de6[119]](_0x9de6[132]))};if(!fs[_0x9de6[120]](_0xd7e4x45)){throw  new db[_0x9de6[126]].ValidationError(_0x9de6[125])};return _0xd7e4x24[_0x9de6[127]](_0xd7e4x45)}})[_0x9de6[31]](handleError(_0xd7e4x24,null))};exports[_0x9de6[133]]= function(_0xd7e4x1e,_0xd7e4x24){return db[_0x9de6[64]][_0x9de6[94]]({where:{id:_0xd7e4x1e[_0x9de6[93]][_0x9de6[92]]},attributes:[_0x9de6[134]]})[_0x9de6[40]](respondWithResult(_0xd7e4x24,null))[_0x9de6[31]](handleError(_0xd7e4x24,null))}
\ No newline at end of file
index a830822..6f831d7 100644 (file)
@@ -1 +1 @@
-var _0xe65a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x65\x74\x74\x69\x6E\x67\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x65\x74\x74\x69\x6E\x67","\x73\x65\x74\x74\x69\x6E\x67\x73","\x64\x65\x66\x69\x6E\x65"];_0xe65a[0];var _=require(_0xe65a[1]);var util=require(_0xe65a[2]);var logger=require(_0xe65a[4])(_0xe65a[3]);var moment=require(_0xe65a[5]);var BPromise=require(_0xe65a[6]);var rp=require(_0xe65a[7]);var attributes=require(_0xe65a[8]);module[_0xe65a[9]]= function(_0x6451x8,_0x6451x9){return _0x6451x8[_0xe65a[12]](_0xe65a[10],attributes,{tableName:_0xe65a[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xa4d3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x65\x74\x74\x69\x6E\x67\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x65\x74\x74\x69\x6E\x67","\x73\x65\x74\x74\x69\x6E\x67\x73","\x64\x65\x66\x69\x6E\x65"];_0xa4d3[0];var _=require(_0xa4d3[1]);var util=require(_0xa4d3[2]);var logger=require(_0xa4d3[4])(_0xa4d3[3]);var moment=require(_0xa4d3[5]);var BPromise=require(_0xa4d3[6]);var rp=require(_0xa4d3[7]);var attributes=require(_0xa4d3[8]);module[_0xa4d3[9]]= function(_0xd4a0x8,_0xd4a0x9){return _0xd4a0x8[_0xa4d3[12]](_0xa4d3[10],attributes,{tableName:_0xa4d3[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index d9bc9a1..2130b27 100644 (file)
@@ -1 +1 @@
-var _0xb90d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x65\x74\x74\x69\x6E\x67\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x65\x74\x74\x69\x6E\x67\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xb90d[0];var _=require(_0xb90d[1]);var util=require(_0xb90d[2]);var moment=require(_0xb90d[3]);var BPromise=require(_0xb90d[4]);var rs=require(_0xb90d[5]);var fs=require(_0xb90d[6]);var db=require(_0xb90d[8])[_0xb90d[7]];var utils=require(_0xb90d[9]);var logger=require(_0xb90d[11])(_0xb90d[10]);var config=require(_0xb90d[12]);var jayson=require(_0xb90d[13]);var client=jayson[_0xb90d[15]][_0xb90d[14]]({port:9002});function respondWithRpcPromise(_0x37ffxe,_0x37ffxf,_0x37ffx10){return  new BPromise(function(_0x37ffx11,_0x37ffx12){return client[_0xb90d[28]](_0x37ffxe,_0x37ffx10)[_0xb90d[27]](function(_0x37ffx14){logger[_0xb90d[20]](_0xb90d[16],_0x37ffxf,_0xb90d[19]);logger[_0xb90d[23]](_0xb90d[21],_0x37ffxf,_0xb90d[19],JSON[_0xb90d[22]](_0x37ffx14));if(_0x37ffx14[_0xb90d[17]]){if(_0x37ffx14[_0xb90d[17]][_0xb90d[24]]=== 500){logger[_0xb90d[17]](_0xb90d[16],_0x37ffxf,_0x37ffx14[_0xb90d[17]][_0xb90d[25]]);return _0x37ffx12(_0x37ffx14[_0xb90d[17]][_0xb90d[25]])};logger[_0xb90d[17]](_0xb90d[16],_0x37ffxf,_0x37ffx14[_0xb90d[17]][_0xb90d[25]]);return _0x37ffx11(_0x37ffx14[_0xb90d[17]][_0xb90d[25]])}else {logger[_0xb90d[20]](_0xb90d[16],_0x37ffxf,_0xb90d[19]);_0x37ffx11(_0x37ffx14[_0xb90d[26]][_0xb90d[25]])}})[_0xb90d[18]](function(_0x37ffx13){logger[_0xb90d[17]](_0xb90d[16],_0x37ffxf,_0x37ffx13);_0x37ffx12(_0x37ffx13)})})}
\ No newline at end of file
+var _0xac96=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x65\x74\x74\x69\x6E\x67\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x65\x74\x74\x69\x6E\x67\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xac96[0];var _=require(_0xac96[1]);var util=require(_0xac96[2]);var moment=require(_0xac96[3]);var BPromise=require(_0xac96[4]);var rs=require(_0xac96[5]);var fs=require(_0xac96[6]);var db=require(_0xac96[8])[_0xac96[7]];var utils=require(_0xac96[9]);var logger=require(_0xac96[11])(_0xac96[10]);var config=require(_0xac96[12]);var jayson=require(_0xac96[13]);var client=jayson[_0xac96[15]][_0xac96[14]]({port:9002});function respondWithRpcPromise(_0x5a37xe,_0x5a37xf,_0x5a37x10){return  new BPromise(function(_0x5a37x11,_0x5a37x12){return client[_0xac96[28]](_0x5a37xe,_0x5a37x10)[_0xac96[27]](function(_0x5a37x14){logger[_0xac96[20]](_0xac96[16],_0x5a37xf,_0xac96[19]);logger[_0xac96[23]](_0xac96[21],_0x5a37xf,_0xac96[19],JSON[_0xac96[22]](_0x5a37x14));if(_0x5a37x14[_0xac96[17]]){if(_0x5a37x14[_0xac96[17]][_0xac96[24]]=== 500){logger[_0xac96[17]](_0xac96[16],_0x5a37xf,_0x5a37x14[_0xac96[17]][_0xac96[25]]);return _0x5a37x12(_0x5a37x14[_0xac96[17]][_0xac96[25]])};logger[_0xac96[17]](_0xac96[16],_0x5a37xf,_0x5a37x14[_0xac96[17]][_0xac96[25]]);return _0x5a37x11(_0x5a37x14[_0xac96[17]][_0xac96[25]])}else {logger[_0xac96[20]](_0xac96[16],_0x5a37xf,_0xac96[19]);_0x5a37x11(_0x5a37x14[_0xac96[26]][_0xac96[25]])}})[_0xac96[18]](function(_0x5a37x13){logger[_0xac96[17]](_0xac96[16],_0x5a37xf,_0x5a37x13);_0x5a37x12(_0x5a37x13)})})}
\ No newline at end of file
index 1040e44..2a4612d 100644 (file)
@@ -1 +1 @@
-var _0xa511=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x73","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x6E\x73\x77\x65\x72","\x2F\x3A\x69\x64\x2F\x6E\x6F\x74\x69\x66\x79","\x6E\x6F\x74\x69\x66\x79","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x73\x65\x6E\x64","\x73\x65\x6E\x64","\x2F\x3A\x69\x64\x2F\x73\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x6E\x73\x77\x65\x72\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xa511[0];var multer=require(_0xa511[1]);var util=require(_0xa511[2]);var path=require(_0xa511[3]);var express=require(_0xa511[4]);var router=express.Router();var auth=require(_0xa511[5]);var interaction=require(_0xa511[6]);var config=require(_0xa511[7]);var controller=require(_0xa511[8]);router[_0xa511[12]](_0xa511[9],auth[_0xa511[10]](),controller[_0xa511[11]]);router[_0xa511[12]](_0xa511[13],auth[_0xa511[10]](),controller[_0xa511[14]]);router[_0xa511[12]](_0xa511[15],auth[_0xa511[10]](),controller[_0xa511[16]]);router[_0xa511[12]](_0xa511[17],auth[_0xa511[10]](),controller[_0xa511[18]]);router[_0xa511[12]](_0xa511[19],auth[_0xa511[10]](),controller[_0xa511[20]]);router[_0xa511[12]](_0xa511[21],auth[_0xa511[10]](),controller[_0xa511[22]]);router[_0xa511[12]](_0xa511[23],auth[_0xa511[10]](),controller[_0xa511[24]]);router[_0xa511[26]](_0xa511[9],auth[_0xa511[10]](),controller[_0xa511[25]]);router[_0xa511[26]](_0xa511[17],auth[_0xa511[10]](),controller[_0xa511[27]]);router[_0xa511[26]](_0xa511[28],controller[_0xa511[29]]);router[_0xa511[26]](_0xa511[19],auth[_0xa511[10]](),controller[_0xa511[30]]);router[_0xa511[26]](_0xa511[21],auth[_0xa511[10]](),controller[_0xa511[31]]);router[_0xa511[26]](_0xa511[21],auth[_0xa511[10]](),controller[_0xa511[32]]);router[_0xa511[26]](_0xa511[33],auth[_0xa511[10]](),controller[_0xa511[34]]);router[_0xa511[26]](_0xa511[35],controller[_0xa511[36]]);router[_0xa511[38]](_0xa511[15],auth[_0xa511[10]](),controller[_0xa511[37]]);router[_0xa511[40]](_0xa511[15],auth[_0xa511[10]](),controller[_0xa511[39]]);router[_0xa511[40]](_0xa511[17],auth[_0xa511[10]](),controller[_0xa511[41]]);module[_0xa511[42]]= router
\ No newline at end of file
+var _0x8650=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x73","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x6E\x73\x77\x65\x72","\x2F\x3A\x69\x64\x2F\x6E\x6F\x74\x69\x66\x79","\x6E\x6F\x74\x69\x66\x79","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x73\x65\x6E\x64","\x73\x65\x6E\x64","\x2F\x3A\x69\x64\x2F\x73\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x6E\x73\x77\x65\x72\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x8650[0];var multer=require(_0x8650[1]);var util=require(_0x8650[2]);var path=require(_0x8650[3]);var express=require(_0x8650[4]);var router=express.Router();var auth=require(_0x8650[5]);var interaction=require(_0x8650[6]);var config=require(_0x8650[7]);var controller=require(_0x8650[8]);router[_0x8650[12]](_0x8650[9],auth[_0x8650[10]](),controller[_0x8650[11]]);router[_0x8650[12]](_0x8650[13],auth[_0x8650[10]](),controller[_0x8650[14]]);router[_0x8650[12]](_0x8650[15],auth[_0x8650[10]](),controller[_0x8650[16]]);router[_0x8650[12]](_0x8650[17],auth[_0x8650[10]](),controller[_0x8650[18]]);router[_0x8650[12]](_0x8650[19],auth[_0x8650[10]](),controller[_0x8650[20]]);router[_0x8650[12]](_0x8650[21],auth[_0x8650[10]](),controller[_0x8650[22]]);router[_0x8650[12]](_0x8650[23],auth[_0x8650[10]](),controller[_0x8650[24]]);router[_0x8650[26]](_0x8650[9],auth[_0x8650[10]](),controller[_0x8650[25]]);router[_0x8650[26]](_0x8650[17],auth[_0x8650[10]](),controller[_0x8650[27]]);router[_0x8650[26]](_0x8650[28],controller[_0x8650[29]]);router[_0x8650[26]](_0x8650[19],auth[_0x8650[10]](),controller[_0x8650[30]]);router[_0x8650[26]](_0x8650[21],auth[_0x8650[10]](),controller[_0x8650[31]]);router[_0x8650[26]](_0x8650[21],auth[_0x8650[10]](),controller[_0x8650[32]]);router[_0x8650[26]](_0x8650[33],auth[_0x8650[10]](),controller[_0x8650[34]]);router[_0x8650[26]](_0x8650[35],controller[_0x8650[36]]);router[_0x8650[38]](_0x8650[15],auth[_0x8650[10]](),controller[_0x8650[37]]);router[_0x8650[40]](_0x8650[15],auth[_0x8650[10]](),controller[_0x8650[39]]);router[_0x8650[40]](_0x8650[17],auth[_0x8650[10]](),controller[_0x8650[41]]);module[_0x8650[42]]= router
\ No newline at end of file
index 6a422c2..efe26fa 100644 (file)
@@ -1 +1 @@
-var _0xc067=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x67\x65\x6E\x65\x72\x61\x74\x65","\x74\x77\x69\x6C\x69\x6F","\x73\x6B\x65\x62\x62\x79","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x6C","\x63\x6C\x69\x63\x6B\x73\x65\x6E\x64","\x70\x6C\x69\x76\x6F","\x62\x61\x73\x69\x63","\x63\x6C\x61\x73\x73\x69\x63","\x63\x6C\x61\x73\x73\x69\x63\x2B","\x42\x4F\x4F\x4C\x45\x41\x4E","\x54\x45\x58\x54","\x41\x63\x63\x6F\x75\x6E\x74\x3A\x20\x7B\x7B\x61\x63\x63\x6F\x75\x6E\x74\x2E\x6E\x61\x6D\x65\x7D\x7D\x3C\x62\x72\x2F\x3E\x7B\x7B\x23\x71\x75\x65\x75\x65\x7D\x7D\x51\x75\x65\x75\x65\x3A\x20\x7B\x7B\x71\x75\x65\x75\x65\x2E\x6E\x61\x6D\x65\x7D\x7D\x3C\x62\x72\x2F\x3E\x7B\x7B\x2F\x71\x75\x65\x75\x65\x7D\x7D\x46\x72\x6F\x6D\x20\x3A\x20\x7B\x7B\x66\x72\x6F\x6D\x7D\x7D","\x49\x4E\x54\x45\x47\x45\x52"];_0xc067[0];var Sequelize=require(_0xc067[1]);var rs=require(_0xc067[2]);module[_0xc067[3]]= {name:{type:Sequelize[_0xc067[4]],unique:_0xc067[5],allowNull:false},key:{type:Sequelize[_0xc067[4]],allowNull:false},remote:{type:Sequelize[_0xc067[4]],allowNull:false},token:{type:Sequelize[_0xc067[4]],defaultValue:function(){return rs[_0xc067[6]]()}},phone:{type:Sequelize[_0xc067[4]]},type:{type:Sequelize.ENUM(_0xc067[7],_0xc067[8],_0xc067[9],_0xc067[10],_0xc067[11])},accountSid:{type:Sequelize[_0xc067[4]]},authId:{type:Sequelize[_0xc067[4]]},authToken:{type:Sequelize[_0xc067[4]]},smsMethod:{type:Sequelize.ENUM(_0xc067[12],_0xc067[13],_0xc067[14])},username:{type:Sequelize[_0xc067[4]]},password:{type:Sequelize[_0xc067[4]]},senderString:{type:Sequelize[_0xc067[4]]},deliveryReport:{type:Sequelize[_0xc067[15]],defaultValue:false},description:{type:Sequelize[_0xc067[4]]},notificationTemplate:{type:Sequelize[_0xc067[16]],defaultValue:function(){return _0xc067[17]}},notificationSound:{type:Sequelize[_0xc067[15]],defaultValue:true},notificationShake:{type:Sequelize[_0xc067[15]],defaultValue:false},waitForTheAssignedAgent:{type:Sequelize[_0xc067[18]],validate:{min:1,max:2147483},defaultValue:10}}
\ No newline at end of file
+var _0x2657=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x67\x65\x6E\x65\x72\x61\x74\x65","\x74\x77\x69\x6C\x69\x6F","\x73\x6B\x65\x62\x62\x79","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x6C","\x63\x6C\x69\x63\x6B\x73\x65\x6E\x64","\x70\x6C\x69\x76\x6F","\x62\x61\x73\x69\x63","\x63\x6C\x61\x73\x73\x69\x63","\x63\x6C\x61\x73\x73\x69\x63\x2B","\x42\x4F\x4F\x4C\x45\x41\x4E","\x54\x45\x58\x54","\x41\x63\x63\x6F\x75\x6E\x74\x3A\x20\x7B\x7B\x61\x63\x63\x6F\x75\x6E\x74\x2E\x6E\x61\x6D\x65\x7D\x7D\x3C\x62\x72\x2F\x3E\x7B\x7B\x23\x71\x75\x65\x75\x65\x7D\x7D\x51\x75\x65\x75\x65\x3A\x20\x7B\x7B\x71\x75\x65\x75\x65\x2E\x6E\x61\x6D\x65\x7D\x7D\x3C\x62\x72\x2F\x3E\x7B\x7B\x2F\x71\x75\x65\x75\x65\x7D\x7D\x46\x72\x6F\x6D\x20\x3A\x20\x7B\x7B\x66\x72\x6F\x6D\x7D\x7D","\x49\x4E\x54\x45\x47\x45\x52"];_0x2657[0];var Sequelize=require(_0x2657[1]);var rs=require(_0x2657[2]);module[_0x2657[3]]= {name:{type:Sequelize[_0x2657[4]],unique:_0x2657[5],allowNull:false},key:{type:Sequelize[_0x2657[4]],allowNull:false},remote:{type:Sequelize[_0x2657[4]],allowNull:false},token:{type:Sequelize[_0x2657[4]],defaultValue:function(){return rs[_0x2657[6]]()}},phone:{type:Sequelize[_0x2657[4]]},type:{type:Sequelize.ENUM(_0x2657[7],_0x2657[8],_0x2657[9],_0x2657[10],_0x2657[11])},accountSid:{type:Sequelize[_0x2657[4]]},authId:{type:Sequelize[_0x2657[4]]},authToken:{type:Sequelize[_0x2657[4]]},smsMethod:{type:Sequelize.ENUM(_0x2657[12],_0x2657[13],_0x2657[14])},username:{type:Sequelize[_0x2657[4]]},password:{type:Sequelize[_0x2657[4]]},senderString:{type:Sequelize[_0x2657[4]]},deliveryReport:{type:Sequelize[_0x2657[15]],defaultValue:false},description:{type:Sequelize[_0x2657[4]]},notificationTemplate:{type:Sequelize[_0x2657[16]],defaultValue:function(){return _0x2657[17]}},notificationSound:{type:Sequelize[_0x2657[15]],defaultValue:true},notificationShake:{type:Sequelize[_0x2657[15]],defaultValue:false},waitForTheAssignedAgent:{type:Sequelize[_0x2657[18]],validate:{min:1,max:2147483},defaultValue:10}}
\ No newline at end of file
index 4757851..3b9df27 100644 (file)
@@ -1 +1 @@
-var _0x1174=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x64\x64\x41\x6E\x73\x77\x65\x72","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x72\x65\x6D\x6F\x76\x65\x41\x6E\x73\x77\x65\x72\x73","\x69\x64\x73","\x6E\x6F\x74\x69\x66\x79","\x73\x6D\x73","\x72\x65\x63\x65\x69\x76\x65\x4D\x65\x73\x73\x61\x67\x65","\x65\x6E\x74\x69\x74\x79\x20\x66\x6F\x75\x6E\x64","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x74\x79\x70\x65","\x61\x63\x63\x6F\x75\x6E\x74","\x74\x77\x69\x6C\x69\x6F","\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\x22\x31\x2E\x30\x22\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\x22\x55\x54\x46\x2D\x38\x22\x3F\x3E\x0A\x3C\x52\x65\x73\x70\x6F\x6E\x73\x65\x3E\x3C\x2F\x52\x65\x73\x70\x6F\x6E\x73\x65\x3E","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x74\x65\x78\x74\x2F\x78\x6D\x6C","\x55\x73\x65\x72\x49\x64","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x67\x65\x6E\x74","\x2C","\x77\x61\x69\x74\x46\x6F\x72\x54\x68\x65\x41\x73\x73\x69\x67\x6E\x65\x64\x41\x67\x65\x6E\x74","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x75\x6E\x73\x68\x69\x66\x74","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x53\x74\x61\x72\x74","\x73\x74\x61\x72\x74\x52\x6F\x75\x74\x69\x6E\x67","\x55\x73\x65\x72","\x67\x65\x74","\x61\x75\x74\x6F\x63\x6C\x6F\x73\x65","\x63\x6C\x6F\x73\x65","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x70\x75\x73\x68","\x63\x72\x65\x61\x74\x65\x64","\x66\x72\x6F\x6D","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x69\x6E","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x49\x64","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x73\x70\x72\x65\x61\x64","\x63\x6F\x6E\x74\x61\x63\x74","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6C\x69\x73\x74","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x6F\x6D\x69\x74","\x64\x65\x66\x61\x75\x6C\x74\x73","\x6D\x61\x70\x4B\x65\x79","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x6E\x6F\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x20\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x4C\x69\x73\x74\x49\x64","\x6D\x6F\x62\x69\x6C\x65","\x46\x72\x6F\x6D","\x42\x6F\x64\x79","\x4D\x65\x73\x73\x61\x67\x65\x53\x69\x64","\x73\x65\x6E\x64\x65\x72","\x74\x65\x78\x74","\x73\x6B\x65\x62\x62\x79","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x6C","\x6D\x65\x73\x73\x61\x67\x65\x5F\x69\x64","\x63\x6C\x69\x63\x6B\x73\x65\x6E\x64","\x54\x65\x78\x74","\x4D\x65\x73\x73\x61\x67\x65\x55\x55\x49\x44","\x70\x6C\x69\x76\x6F","\x69\x73\x4E\x69\x6C","\x66\x72\x6F\x6D\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","","\x62\x6F\x64\x79\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x20\x61\x6E\x64\x20\x6E\x6F\x74\x20\x65\x6D\x70\x74\x79","\x6D\x61\x70\x4B\x65\x79\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x6D\x61\x70\x4B\x65\x79\x20\x69\x6E\x76\x61\x6C\x69\x64\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x44\x45\x53\x43","\x43\x6D\x4C\x69\x73\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x61\x73\x63","\x6F\x72\x64\x65\x72\x42\x79","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x67\x65\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x53\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x73\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x43\x6F\x6E\x74\x61\x63\x74","\x4F\x77\x6E\x65\x72","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x54\x61\x67","\x54\x61\x67\x73","\x63\x6F\x6C\x6F\x72","\x74\x61\x67","\x74\x6F","\x74\x6F\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","\x4D\x65\x73\x73\x61\x67\x65\x73","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x75\x73\x65\x72","\x6F\x75\x74","\x4C\x69\x73\x74","\x44\x45\x4C\x49\x56\x45\x52\x45\x44","\x69\x6E\x73\x70\x65\x63\x74","\x31","\x65\x72\x72\x6F\x72\x5F\x63\x6F\x64\x65","\x72\x65\x63\x65\x69\x76\x65\x64\x20\x64\x65\x6C\x69\x76\x65\x72\x79\x20\x72\x65\x70\x6F\x72\x74\x20\x66\x72\x6F\x6D","\x73\x6B\x65\x62\x62\x79\x5F\x64\x69\x73\x70\x61\x74\x63\x68\x5F\x69\x64","\x72\x65\x71\x75\x65\x73\x74\x69\x64","\x73\x74\x61\x74\x75\x73\x49\x6E\x74","\x73\x74\x61\x74\x75\x73\x5F\x63\x6F\x64\x65"];_0x1174[0];var jsonpatch=require(_0x1174[1]);var rp=require(_0x1174[2]);var moment=require(_0x1174[3]);var BPromise=require(_0x1174[4]);var Mustache=require(_0x1174[5]);var util=require(_0x1174[6]);var path=require(_0x1174[7]);var sox=require(_0x1174[8]);var csv=require(_0x1174[9]);var ejs=require(_0x1174[10]);var fs=require(_0x1174[11]);var _=require(_0x1174[12]);var squel=require(_0x1174[13]);var crypto=require(_0x1174[14]);var jsforce=require(_0x1174[15]);var deskjs=require(_0x1174[16]);var toCsv=require(_0x1174[9]);var querystring=require(_0x1174[17]);var Papa=require(_0x1174[18]);var qs=require(_0x1174[19]);var logger=require(_0x1174[21])(_0x1174[20]);var utils=require(_0x1174[22]);var config=require(_0x1174[23]);var db=require(_0x1174[25])[_0x1174[24]];var jayson=require(_0x1174[26]);var client=jayson[_0x1174[28]][_0x1174[27]]({port:9004});function respondWithRpcPromise(_0xb67fx1c,_0xb67fx1d,_0xb67fx1e,_0xb67fx1f){return  new BPromise(function(_0xb67fx20,_0xb67fx21){var _0xb67fx22=(_0xb67fx1f|| client);return _0xb67fx22[_0x1174[41]](_0xb67fx1c,_0xb67fx1e)[_0x1174[40]](function(_0xb67fx24){logger[_0x1174[33]](_0x1174[29],_0xb67fx1d,_0x1174[32]);logger[_0x1174[36]](_0x1174[34],_0xb67fx1d,_0x1174[32],JSON[_0x1174[35]](_0xb67fx24));if(_0xb67fx24[_0x1174[30]]){if(_0xb67fx24[_0x1174[30]][_0x1174[37]]=== 500){logger[_0x1174[30]](_0x1174[29],_0xb67fx1d,_0xb67fx24[_0x1174[30]][_0x1174[38]]);return _0xb67fx21(_0xb67fx24[_0x1174[30]][_0x1174[38]])};logger[_0x1174[30]](_0x1174[29],_0xb67fx1d,_0xb67fx24[_0x1174[30]][_0x1174[38]]);return _0xb67fx20(_0xb67fx24[_0x1174[30]][_0x1174[38]])}else {logger[_0x1174[33]](_0x1174[29],_0xb67fx1d,_0x1174[32]);_0xb67fx20(_0xb67fx24[_0x1174[39]][_0x1174[38]])}})[_0x1174[31]](function(_0xb67fx23){logger[_0x1174[30]](_0x1174[29],_0xb67fx1d,_0xb67fx23);_0xb67fx21(_0xb67fx23)})})}function respondWithStatusCode(_0xb67fx24,_0xb67fx26){_0xb67fx26= _0xb67fx26|| 204;return function(_0xb67fx27){if(_0xb67fx27){return _0xb67fx24[_0x1174[42]](_0xb67fx26)};return _0xb67fx24[_0x1174[44]](_0xb67fx26)[_0x1174[43]]()}}function respondWithResult(_0xb67fx24,_0xb67fx26){_0xb67fx26= _0xb67fx26|| 200;return function(_0xb67fx27){if(_0xb67fx27){return _0xb67fx24[_0x1174[44]](_0xb67fx26)[_0x1174[45]](_0xb67fx27)}}}function respondWithFilteredResult(_0xb67fx24,_0xb67fx2a){return function(_0xb67fx27){if(_0xb67fx27){var _0xb67fx2b=_0xb67fx27[_0x1174[46]],_0xb67fx2c=_0xb67fx2a[_0x1174[47]],_0xb67fx2d=_0xb67fx2a[_0x1174[47]]+ _0xb67fx2a[_0x1174[48]],_0xb67fx26;if(_0xb67fx2d>= _0xb67fx2b){_0xb67fx2d= _0xb67fx2b;_0xb67fx26= 200}else {_0xb67fx26= 206};_0xb67fx24[_0x1174[44]](_0xb67fx26);return _0xb67fx24[_0x1174[52]](_0x1174[49],_0xb67fx2c+ _0x1174[50]+ _0xb67fx2d+ _0x1174[51]+ _0xb67fx2b)[_0x1174[45]](_0xb67fx27)};return null}}function patchUpdates(_0xb67fx2f){return function(_0xb67fx27){try{jsonpatch[_0x1174[53]](_0xb67fx27,_0xb67fx2f,true)}catch(err){return BPromise[_0x1174[54]](err)};return _0xb67fx27[_0x1174[55]]()}}function saveUpdates(_0xb67fx31,_0xb67fx26){return function(_0xb67fx27){if(_0xb67fx27){return _0xb67fx27[_0x1174[56]](_0xb67fx31)[_0x1174[40]](function(_0xb67fx32){return _0xb67fx32})};return null}}function removeEntity(_0xb67fx24,_0xb67fx26){return function(_0xb67fx27){if(_0xb67fx27){return _0xb67fx27[_0x1174[57]]()[_0x1174[40]](function(){_0xb67fx24[_0x1174[44]](204)[_0x1174[43]]()})}}}function handleEntityNotFound(_0xb67fx24,_0xb67fx26){return function(_0xb67fx27){if(!_0xb67fx27){_0xb67fx24[_0x1174[42]](404)};return _0xb67fx27}}function handleError(_0xb67fx24,_0xb67fx26){_0xb67fx26= _0xb67fx26|| 500;return function(_0xb67fx23){logger[_0x1174[30]](_0xb67fx23[_0x1174[58]]);if(_0xb67fx23[_0x1174[59]]){delete _0xb67fx23[_0x1174[59]]};_0xb67fx24[_0x1174[44]](_0xb67fx26)[_0x1174[60]](_0xb67fx23)}}exports[_0x1174[61]]= function(_0xb67fx1e,_0xb67fx24){var _0xb67fx2a={},_0xb67fx36={},_0xb67fx37={count:0,rows:[]};_0xb67fx36[_0x1174[62]]= _[_0x1174[65]](db[_0x1174[64]][_0x1174[63]]);var _0xb67fx38={dateStart:_0xb67fx1e[_0x1174[67]][_0x1174[66]],dateEnd:_0xb67fx1e[_0x1174[67]][_0x1174[68]]};delete _0xb67fx1e[_0x1174[67]][_0x1174[66]];delete _0xb67fx1e[_0x1174[67]][_0x1174[68]];_0xb67fx36[_0x1174[67]]= _[_0x1174[65]](_0xb67fx1e[_0x1174[67]]);_0xb67fx36[_0x1174[69]]= _[_0x1174[70]](_0xb67fx36[_0x1174[62]],_0xb67fx36[_0x1174[67]]);_0xb67fx2a[_0x1174[71]]= _[_0x1174[70]](_0xb67fx36[_0x1174[62]],qs[_0x1174[72]](_0xb67fx1e[_0x1174[67]][_0x1174[72]]));_0xb67fx2a[_0x1174[71]]= (_0xb67fx2a[_0x1174[71]][_0x1174[73]])?_0xb67fx2a[_0x1174[71]]:_0xb67fx36[_0x1174[62]];if(!_0xb67fx1e[_0x1174[67]][_0x1174[75]](_0x1174[74])){_0xb67fx2a[_0x1174[48]]= qs[_0x1174[48]](_0xb67fx1e[_0x1174[67]][_0x1174[48]]);_0xb67fx2a[_0x1174[47]]= qs[_0x1174[47]](_0xb67fx1e[_0x1174[67]][_0x1174[47]])};_0xb67fx2a[_0x1174[76]]= qs[_0x1174[77]](_0xb67fx1e[_0x1174[67]][_0x1174[77]]);_0xb67fx2a[_0x1174[78]]= qs[_0x1174[69]](_[_0x1174[79]](_0xb67fx1e[_0x1174[67]],_0xb67fx36[_0x1174[69]]));if(_0xb67fx38[_0x1174[66]]){if(_0xb67fx38[_0x1174[68]]){_0xb67fx38[_0x1174[68]]= moment(_0xb67fx38[_0x1174[68]])[_0x1174[81]](1,_0x1174[80])}else {_0xb67fx38[_0x1174[68]]= moment(_0xb67fx38[_0x1174[66]])[_0x1174[81]](1,_0x1174[80])};_[_0x1174[82]](_0xb67fx2a[_0x1174[78]],{createdAt:{$gte:_0xb67fx38[_0x1174[66]],$lte:_0xb67fx38[_0x1174[68]]}})};if(_0xb67fx1e[_0x1174[67]][_0x1174[83]]){_0xb67fx2a[_0x1174[78]]= _[_0x1174[82]](_0xb67fx2a[_0x1174[78]],{$or:_[_0x1174[85]](_0xb67fx2a[_0x1174[71]],function(_0xb67fx39){var _0xb67fx37={};_0xb67fx37[_0xb67fx39]= {$like:_0x1174[84]+ _0xb67fx1e[_0x1174[67]][_0x1174[83]]+ _0x1174[84]};return _0xb67fx37})})};_0xb67fx2a= _[_0x1174[82]]({},_0xb67fx2a,_0xb67fx1e[_0x1174[86]]);var _0xb67fx3a={where:_0xb67fx2a[_0x1174[78]]};return db[_0x1174[64]][_0x1174[46]](_0xb67fx3a)[_0x1174[40]](function(_0xb67fx2b){_0xb67fx37[_0x1174[46]]= _0xb67fx2b;if(_0xb67fx1e[_0x1174[67]][_0x1174[88]]){_0xb67fx2a[_0x1174[89]]= [{all:true}]};return db[_0x1174[64]][_0x1174[90]](_0xb67fx2a)})[_0x1174[40]](function(_0xb67fx3b){_0xb67fx37[_0x1174[87]]= _0xb67fx3b;return _0xb67fx37})[_0x1174[40]](respondWithFilteredResult(_0xb67fx24,_0xb67fx2a))[_0x1174[31]](handleError(_0xb67fx24,null))};exports[_0x1174[91]]= function(_0xb67fx1e,_0xb67fx24){var _0xb67fx2a={raw:false,where:{id:_0xb67fx1e[_0x1174[93]][_0x1174[92]]}},_0xb67fx36={};_0xb67fx36[_0x1174[62]]= _[_0x1174[65]](db[_0x1174[64]][_0x1174[63]]);_0xb67fx36[_0x1174[67]]= _[_0x1174[65]](_0xb67fx1e[_0x1174[67]]);_0xb67fx36[_0x1174[69]]= _[_0x1174[70]](_0xb67fx36[_0x1174[62]],_0xb67fx36[_0x1174[67]]);_0xb67fx2a[_0x1174[71]]= _[_0x1174[70]](_0xb67fx36[_0x1174[62]],qs[_0x1174[72]](_0xb67fx1e[_0x1174[67]][_0x1174[72]]));_0xb67fx2a[_0x1174[71]]= (_0xb67fx2a[_0x1174[71]][_0x1174[73]])?_0xb67fx2a[_0x1174[71]]:_0xb67fx36[_0x1174[62]];if(_0xb67fx1e[_0x1174[67]][_0x1174[88]]){_0xb67fx2a[_0x1174[89]]= [{all:true}]};_0xb67fx2a= _[_0x1174[82]]({},_0xb67fx2a,_0xb67fx1e[_0x1174[86]]);return db[_0x1174[64]][_0x1174[94]](_0xb67fx2a)[_0x1174[40]](handleEntityNotFound(_0xb67fx24,null))[_0x1174[40]](respondWithResult(_0xb67fx24,null))[_0x1174[31]](handleError(_0xb67fx24,null))};exports[_0x1174[95]]= function(_0xb67fx1e,_0xb67fx24){return db[_0x1174[64]][_0x1174[95]](_0xb67fx1e[_0x1174[96]],{})[_0x1174[40]](respondWithResult(_0xb67fx24,201))[_0x1174[31]](handleError(_0xb67fx24,null))};exports[_0x1174[56]]= function(_0xb67fx1e,_0xb67fx24){if(_0xb67fx1e[_0x1174[96]][_0x1174[92]]){delete _0xb67fx1e[_0x1174[96]][_0x1174[92]]};return db[_0x1174[64]][_0x1174[94]]({where:{id:_0xb67fx1e[_0x1174[93]][_0x1174[92]]}})[_0x1174[40]](handleEntityNotFound(_0xb67fx24,null))[_0x1174[40]](saveUpdates(_0xb67fx1e[_0x1174[96]],null))[_0x1174[40]](respondWithResult(_0xb67fx24,null))[_0x1174[31]](handleError(_0xb67fx24,null))};exports[_0x1174[57]]= function(_0xb67fx1e,_0xb67fx24){return db[_0x1174[64]][_0x1174[94]]({where:{id:_0xb67fx1e[_0x1174[93]][_0x1174[92]]}})[_0x1174[40]](handleEntityNotFound(_0xb67fx24,null))[_0x1174[40]](removeEntity(_0xb67fx24,null))[_0x1174[31]](handleError(_0xb67fx24,null))};exports[_0x1174[97]]= function(_0xb67fx1e,_0xb67fx24){return db[_0x1174[64]][_0x1174[97]]()[_0x1174[40]](respondWithResult(_0xb67fx24,null))[_0x1174[31]](handleError(_0xb67fx24,null))};exports[_0x1174[98]]= function(_0xb67fx1e,_0xb67fx24,_0xb67fx3c){if(_0xb67fx1e[_0x1174[96]][_0x1174[92]]){delete _0xb67fx1e[_0x1174[96]][_0x1174[92]]};return db[_0x1174[64]][_0x1174[94]]({where:{id:_0xb67fx1e[_0x1174[93]][_0x1174[92]]}})[_0x1174[40]](handleEntityNotFound(_0xb67fx24,null))[_0x1174[40]](function(_0xb67fx27){if(_0xb67fx27){_0xb67fx1e[_0x1174[96]][_0x1174[99]]= _0xb67fx27[_0x1174[92]];return db[_0x1174[100]][_0x1174[95]](_0xb67fx1e[_0x1174[96]])}})[_0x1174[40]](respondWithResult(_0xb67fx24,null))[_0x1174[31]](handleError(_0xb67fx24,null))};exports[_0x1174[101]]= function(_0xb67fx1e,_0xb67fx24,_0xb67fx3c){var _0xb67fx2a={raw:false,where:{}};var _0xb67fx36={};var _0xb67fx3d={count:0,rows:[]};return db[_0x1174[64]][_0x1174[102]]({where:{id:_0xb67fx1e[_0x1174[93]][_0x1174[92]]}})[_0x1174[40]](handleEntityNotFound(_0xb67fx24,null))[_0x1174[40]](function(_0xb67fx27){if(_0xb67fx27){_0xb67fx36[_0x1174[62]]= _[_0x1174[65]](db[_0x1174[100]][_0x1174[63]]);_0xb67fx36[_0x1174[67]]= _[_0x1174[65]](_0xb67fx1e[_0x1174[67]]);_0xb67fx36[_0x1174[69]]= _[_0x1174[70]](_0xb67fx36[_0x1174[62]],_0xb67fx36[_0x1174[67]]);_0xb67fx2a[_0x1174[71]]= _[_0x1174[70]](_0xb67fx36[_0x1174[62]],qs[_0x1174[72]](_0xb67fx1e[_0x1174[67]][_0x1174[72]]));_0xb67fx2a[_0x1174[71]]= (_0xb67fx2a[_0x1174[71]][_0x1174[73]])?_0xb67fx2a[_0x1174[71]]:_0xb67fx36[_0x1174[62]];if(!_0xb67fx1e[_0x1174[67]][_0x1174[75]](_0x1174[74])){_0xb67fx2a[_0x1174[48]]= qs[_0x1174[48]](_0xb67fx1e[_0x1174[67]][_0x1174[48]]);_0xb67fx2a[_0x1174[47]]= qs[_0x1174[47]](_0xb67fx1e[_0x1174[67]][_0x1174[47]])};_0xb67fx2a[_0x1174[76]]= qs[_0x1174[77]](_0xb67fx1e[_0x1174[67]][_0x1174[77]]);_0xb67fx2a[_0x1174[78]]= qs[_0x1174[69]](_[_0x1174[79]](_0xb67fx1e[_0x1174[67]],_0xb67fx36[_0x1174[69]]));_0xb67fx2a[_0x1174[78]][_0x1174[99]]= _0xb67fx27[_0x1174[92]];if(_0xb67fx1e[_0x1174[67]][_0x1174[83]]){_0xb67fx2a[_0x1174[78]]= _[_0x1174[82]](_0xb67fx2a[_0x1174[78]],{$or:_[_0x1174[85]](_0xb67fx2a[_0x1174[71]],function(_0xb67fx39){var _0xb67fx37={};_0xb67fx37[_0xb67fx39]= {$like:_0x1174[84]+ _0xb67fx1e[_0x1174[67]][_0x1174[83]]+ _0x1174[84]};return _0xb67fx37})})};_0xb67fx2a= _[_0x1174[82]]({},_0xb67fx2a,_0xb67fx1e[_0x1174[86]]);return db[_0x1174[100]][_0x1174[46]]({where:_0xb67fx2a[_0x1174[78]]})[_0x1174[40]](function(_0xb67fx2b){_0xb67fx3d[_0x1174[46]]= _0xb67fx2b;if(_0xb67fx1e[_0x1174[67]][_0x1174[88]]){_0xb67fx2a[_0x1174[89]]= [{all:true}]};return db[_0x1174[100]][_0x1174[90]](_0xb67fx2a)})[_0x1174[40]](function(_0xb67fx3b){_0xb67fx3d[_0x1174[87]]= _0xb67fx3b;return _0xb67fx3d})}})[_0x1174[40]](respondWithFilteredResult(_0xb67fx24,_0xb67fx2a))[_0x1174[31]](handleError(_0xb67fx24,null))};exports[_0x1174[103]]= function(_0xb67fx1e,_0xb67fx24,_0xb67fx3c){var _0xb67fx3e;return db[_0x1174[64]][_0x1174[94]]({where:{id:_0xb67fx1e[_0x1174[93]][_0x1174[92]]}})[_0x1174[40]](handleEntityNotFound(_0xb67fx24,null))[_0x1174[40]](function(_0xb67fx27){if(_0xb67fx27){return _0xb67fx27[_0x1174[103]](_0xb67fx1e[_0x1174[67]][_0x1174[104]])}})[_0x1174[40]](respondWithStatusCode(_0xb67fx24,null))[_0x1174[31]](handleError(_0xb67fx24,null))};exports[_0x1174[105]]= function(_0xb67fx1e,_0xb67fx24,_0xb67fx3c){var _0xb67fx3f={channel:_0x1174[106]};var _0xb67fx40=[];var _0xb67fx41=[];var _0xb67fx42={};return db[_0x1174[64]][_0x1174[94]]({where:{id:_0xb67fx1e[_0x1174[93]][_0x1174[92]]},include:[{model:db[_0x1174[181]],as:_0x1174[180]}]})[_0x1174[40]](handleEntityNotFound(_0xb67fx24,null))[_0x1174[40]](function(_0xb67fx27){_0xb67fx3f[_0x1174[111]]= _0xb67fx27;_0xb67fx3f[_0x1174[123]]= _[_0x1174[179]](_0xb67fx27.Applications,[_0x1174[177]],[_0x1174[178]]);if(_0xb67fx3f[_0x1174[111]][_0x1174[180]]){delete _0xb67fx3f[_0x1174[111]][_0x1174[180]]};return db[_0x1174[147]][_0x1174[97]]()})[_0x1174[40]](function(_0xb67fx49){if(!_0xb67fx49){throw  new db[_0x1174[149]].ValidationError(_0x1174[148])};_0xb67fx40= _[_0x1174[152]](_[_0x1174[65]](_0xb67fx49),[_0x1174[150],_0x1174[151]]);_0xb67fx41= _[_0x1174[152]](_[_0x1174[65]](_0xb67fx49),[_0x1174[150],_0x1174[151],_0x1174[153],_0x1174[154]]);_0xb67fx3f[_0x1174[96]]= {mapKey:_0x1174[155]};if(_0xb67fx3f[_0x1174[111]][_0x1174[110]]){switch(_0xb67fx3f[_0x1174[111]][_0x1174[110]]){case _0x1174[112]:_0xb67fx3f[_0x1174[96]][_0x1174[133]]= _0xb67fx1e[_0x1174[96]][_0x1174[156]];_0xb67fx3f[_0x1174[96]][_0x1174[96]]= _0xb67fx1e[_0x1174[96]][_0x1174[157]];_0xb67fx3f[_0x1174[96]][_0x1174[134]]= _0xb67fx1e[_0x1174[96]][_0x1174[158]];break;case _0x1174[161]:_0xb67fx3f[_0x1174[96]][_0x1174[133]]= _0xb67fx1e[_0x1174[96]][_0x1174[159]];_0xb67fx3f[_0x1174[96]][_0x1174[96]]= _0xb67fx1e[_0x1174[96]][_0x1174[160]];break;case _0x1174[162]:_0xb67fx3f[_0x1174[96]][_0x1174[133]]= _0xb67fx1e[_0x1174[96]][_0x1174[133]];_0xb67fx3f[_0x1174[96]][_0x1174[96]]= _0xb67fx1e[_0x1174[96]][_0x1174[38]];break;case _0x1174[164]:_0xb67fx3f[_0x1174[96]][_0x1174[133]]= _0xb67fx1e[_0x1174[96]][_0x1174[133]];_0xb67fx3f[_0x1174[96]][_0x1174[96]]= _0xb67fx1e[_0x1174[96]][_0x1174[96]];_0xb67fx3f[_0x1174[96]][_0x1174[134]]= _0xb67fx1e[_0x1174[96]][_0x1174[163]];break;case _0x1174[167]:_0xb67fx3f[_0x1174[96]][_0x1174[133]]= _0xb67fx1e[_0x1174[96]][_0x1174[156]];_0xb67fx3f[_0x1174[96]][_0x1174[96]]= _0xb67fx1e[_0x1174[96]][_0x1174[165]];_0xb67fx3f[_0x1174[96]][_0x1174[134]]= _0xb67fx1e[_0x1174[96]][_0x1174[166]];break}};if(_0xb67fx3f[_0x1174[96]][_0x1174[92]]){delete _0xb67fx3f[_0x1174[96]][_0x1174[92]]};if(_[_0x1174[168]](_0xb67fx3f[_0x1174[96]][_0x1174[133]])){throw  new db[_0x1174[149]].ValidationError(_0x1174[169])};if(_[_0x1174[168]](_0xb67fx3f[_0x1174[96]][_0x1174[96]])|| _0xb67fx3f[_0x1174[96]][_0x1174[96]]=== _0x1174[170]){throw  new db[_0x1174[149]].ValidationError(_0x1174[171])};if(_[_0x1174[168]](_0xb67fx3f[_0x1174[96]][_0x1174[146]])){throw  new db[_0x1174[149]].ValidationError(_0x1174[172]+ _0xb67fx41)};if(!_[_0x1174[173]](_0xb67fx41,_0xb67fx3f[_0x1174[96]][_0x1174[146]])){throw  new db[_0x1174[149]].ValidationError(_0x1174[174]+ _0xb67fx41)};_0xb67fx42[_0xb67fx3f[_0x1174[96]][_0x1174[146]]]= _0xb67fx3f[_0x1174[96]][_0x1174[133]];return db[_0x1174[176]][_0x1174[94]]({where:{id:_0xb67fx3f[_0x1174[111]][_0x1174[154]]},include:[{model:db[_0x1174[147]],as:_0x1174[143],where:_0xb67fx42,limit:1,order:[[_0x1174[151],_0x1174[175]]]}]})})[_0x1174[40]](handleEntityNotFound(_0xb67fx24,null))[_0x1174[40]](function(_0xb67fx27){if(_0xb67fx27){_0xb67fx3f[_0x1174[142]]= _[_0x1174[144]](_0xb67fx27,[_0x1174[143]]);if(_0xb67fx27[_0x1174[143]][_0x1174[73]]){return _0xb67fx27[_0x1174[143]][0]};var _0xb67fx48=_[_0x1174[145]](_0xb67fx3f[_0x1174[96]],{firstName:_0xb67fx3f[_0x1174[96]][_0x1174[133]],phone:_0xb67fx3f[_0x1174[96]][_0x1174[133]],ListId:_0xb67fx27[_0x1174[92]]});_0xb67fx48[_0xb67fx3f[_0x1174[96]][_0x1174[146]]]= _0xb67fx3f[_0x1174[96]][_0x1174[133]];return db[_0x1174[147]][_0x1174[95]](_0xb67fx48,{fields:_0xb67fx40,raw:true})}})[_0x1174[40]](handleEntityNotFound(_0xb67fx24,null))[_0x1174[40]](function(_0xb67fx27){if(_0xb67fx27){_0xb67fx3f[_0x1174[140]]= _0xb67fx27;var _0xb67fx45={ContactId:_0xb67fx27[_0x1174[92]],phone:_0xb67fx3f[_0x1174[96]][_0x1174[133]],SmsAccountId:_0xb67fx1e[_0x1174[93]][_0x1174[92]]};var _0xb67fx46={ContactId:_0xb67fx27[_0x1174[92]],SmsAccountId:_0xb67fx1e[_0x1174[93]][_0x1174[92]],closed:false};return db[_0x1174[141]][_0x1174[94]]({where:_0xb67fx46})[_0x1174[40]](function(_0xb67fx47){if(_0xb67fx47){return [_0xb67fx47,false]};return db[_0x1174[141]][_0x1174[95]](_0xb67fx45)[_0x1174[40]](function(_0xb67fx47){return [_0xb67fx47,true]})})}})[_0x1174[139]](function(_0xb67fx27,_0xb67fx44){_0xb67fx3f[_0x1174[117]]= _0xb67fx27[_0x1174[127]]({plain:true});if(_0xb67fx44){if(_0xb67fx3f[_0x1174[111]][_0x1174[128]]){_0xb67fx3f[_0x1174[123]][_0x1174[131]]({id:0,priority:_0xb67fx3f[_0x1174[123]][_0x1174[73]]+ 1,app:_0x1174[129],appdata:_0x1174[130],interval:_0x1174[121]})};_0xb67fx3f[_0x1174[117]][_0x1174[132]]= true};return db[_0x1174[138]][_0x1174[95]]({phone:_0xb67fx3f[_0x1174[96]][_0x1174[133]],messageId:_0xb67fx3f[_0x1174[96]][_0x1174[134]],body:_0xb67fx3f[_0x1174[96]][_0x1174[96]],SmsAccountId:_0xb67fx1e[_0x1174[93]][_0x1174[92]],SmsInteractionId:_0xb67fx27[_0x1174[92]],direction:_0x1174[135],ContactId:_0xb67fx27[_0x1174[136]],AttachmentId:_0xb67fx3f[_0x1174[96]][_0x1174[137]]})})[_0x1174[40]](function(_0xb67fx27){_0xb67fx3f[_0x1174[38]]= _0xb67fx27;if(_0xb67fx3f[_0x1174[117]][_0x1174[116]]){return db[_0x1174[126]][_0x1174[94]]({attributes:[_0x1174[92],_0x1174[59]],where:{id:_0xb67fx3f[_0x1174[117]][_0x1174[116]]}})[_0x1174[40]](function(_0xb67fx43){if(_0xb67fx43){_0xb67fx3f[_0x1174[123]][_0x1174[122]]({id:0,priority:0,app:_0x1174[118],appdata:_0xb67fx43[_0x1174[59]]+ _0x1174[119]+ (_0xb67fx3f[_0x1174[111]][_0x1174[120]]|| 10),interval:_0x1174[121]})};return respondWithRpcPromise(_0x1174[124],_0x1174[125],_0xb67fx3f)})};return respondWithRpcPromise(_0x1174[124],_0x1174[125],_0xb67fx3f)})[_0x1174[40]](function(_0xb67fx27){if(_0xb67fx27){var _0xb67fx26=200;var _0xb67fx1d=_0x1174[107];logger[_0x1174[33]](_0x1174[34],_0xb67fx1d,_0xb67fx26,_0x1174[108]);logger[_0x1174[36]](_0x1174[109],_0xb67fx1d,_0xb67fx26,_0x1174[108],JSON[_0x1174[35]](_0xb67fx27));if(_0xb67fx3f[_0x1174[111]][_0x1174[110]]=== _0x1174[112]){return _0xb67fx24[_0x1174[44]](_0xb67fx26)[_0x1174[52]](_0x1174[114],_0x1174[115])[_0x1174[60]](_0x1174[113])}else {return _0xb67fx24[_0x1174[44]](_0xb67fx26)[_0x1174[45]](_0xb67fx27)}}})[_0x1174[31]](handleError(_0xb67fx24,null))};exports[_0x1174[182]]= function(_0xb67fx1e,_0xb67fx24,_0xb67fx3c){return db[_0x1174[64]][_0x1174[102]]({where:{id:_0xb67fx1e[_0x1174[93]][_0x1174[92]]}})[_0x1174[40]](handleEntityNotFound(_0xb67fx24,null))[_0x1174[40]](function(_0xb67fx27){if(_0xb67fx27){return db[_0x1174[186]][_0x1174[185]](function(_0xb67fx4a){return db[_0x1174[181]][_0x1174[57]]({where:{SmsAccountId:_0xb67fx1e[_0x1174[93]][_0x1174[92]]},transaction:_0xb67fx4a})[_0x1174[40]](function(_0xb67fx4b){var _0xb67fx4c=_[_0x1174[85]](_0xb67fx1e[_0x1174[96]],function(_0xb67fx4d){_0xb67fx4d[_0x1174[99]]= _0xb67fx1e[_0x1174[93]][_0x1174[92]];return _0xb67fx4d});return db[_0x1174[181]][_0x1174[184]](_0xb67fx4c,{transaction:_0xb67fx4a})})})[_0x1174[40]](function(){return db[_0x1174[181]][_0x1174[183]]({where:{SmsAccountId:_0xb67fx1e[_0x1174[93]][_0x1174[92]]},order:_0x1174[177]})})}})[_0x1174[40]](respondWithResult(_0xb67fx24,null))[_0x1174[31]](handleError(_0xb67fx24,null))};exports[_0x1174[187]]= function(_0xb67fx1e,_0xb67fx27,_0xb67fx3c){var _0xb67fx2a={};var _0xb67fx36={};var _0xb67fx4e;var _0xb67fx2b;return db[_0x1174[64]][_0x1174[102]]({where:{id:_0xb67fx1e[_0x1174[93]][_0x1174[92]]}})[_0x1174[40]](handleEntityNotFound(_0xb67fx27,null))[_0x1174[40]](function(_0xb67fx27){if(_0xb67fx27){_0xb67fx4e= _0xb67fx27;_0xb67fx36[_0x1174[62]]= _[_0x1174[65]](db[_0x1174[181]][_0x1174[63]]);_0xb67fx36[_0x1174[67]]= _[_0x1174[65]](_0xb67fx1e[_0x1174[67]]);_0xb67fx36[_0x1174[69]]= _[_0x1174[70]](_0xb67fx36[_0x1174[62]],_0xb67fx36[_0x1174[67]]);_0xb67fx2a[_0x1174[71]]= _[_0x1174[70]](_0xb67fx36[_0x1174[62]],qs[_0x1174[72]](_0xb67fx1e[_0x1174[67]][_0x1174[72]]));_0xb67fx2a[_0x1174[71]]= (_0xb67fx2a[_0x1174[71]][_0x1174[73]])?_0xb67fx2a[_0x1174[71]]:_0xb67fx36[_0x1174[62]];_0xb67fx2a[_0x1174[76]]= qs[_0x1174[77]](_0xb67fx1e[_0x1174[67]][_0x1174[77]]);_0xb67fx2a[_0x1174[78]]= qs[_0x1174[69]](_[_0x1174[79]](_0xb67fx1e[_0x1174[67]],_0xb67fx36[_0x1174[69]]));if(_0xb67fx1e[_0x1174[67]][_0x1174[83]]){_0xb67fx2a[_0x1174[78]]= _[_0x1174[82]](_0xb67fx2a[_0x1174[78]],{$or:_[_0x1174[85]](_0xb67fx2a[_0x1174[71]],function(_0xb67fx39){var _0xb67fx37={};_0xb67fx37[_0xb67fx39]= {$like:_0x1174[84]+ _0xb67fx1e[_0x1174[67]][_0x1174[83]]+ _0x1174[84]};return _0xb67fx37})})};_0xb67fx2a= _[_0x1174[82]]({},_0xb67fx2a,_0xb67fx1e[_0x1174[86]]);return _0xb67fx4e[_0x1174[187]](_0xb67fx2a)}})[_0x1174[40]](function(_0xb67fx3e){if(_0xb67fx3e){_0xb67fx2b= _0xb67fx3e[_0x1174[73]];if(!_0xb67fx1e[_0x1174[67]][_0x1174[75]](_0x1174[74])){_0xb67fx2a[_0x1174[48]]= qs[_0x1174[48]](_0xb67fx1e[_0x1174[67]][_0x1174[48]]);_0xb67fx2a[_0x1174[47]]= qs[_0x1174[47]](_0xb67fx1e[_0x1174[67]][_0x1174[47]])};return _0xb67fx4e[_0x1174[187]](_0xb67fx2a)}})[_0x1174[40]](function(_0xb67fx3b){if(_0xb67fx3b){return _0xb67fx3b?{count:_0xb67fx2b,rows:_0xb67fx3b}:null}})[_0x1174[40]](respondWithResult(_0xb67fx27,null))[_0x1174[31]](handleError(_0xb67fx27,null))};exports[_0x1174[188]]= function(_0xb67fx1e,_0xb67fx24,_0xb67fx3c){if(_0xb67fx1e[_0x1174[96]][_0x1174[92]]){delete _0xb67fx1e[_0x1174[96]][_0x1174[92]]};return db[_0x1174[64]][_0x1174[94]]({where:{id:_0xb67fx1e[_0x1174[93]][_0x1174[92]]}})[_0x1174[40]](handleEntityNotFound(_0xb67fx24,null))[_0x1174[40]](function(_0xb67fx27){if(_0xb67fx27){_0xb67fx1e[_0x1174[96]][_0x1174[99]]= _0xb67fx27[_0x1174[92]];return db[_0x1174[189]][_0x1174[95]](_0xb67fx1e[_0x1174[96]])}})[_0x1174[40]](respondWithResult(_0xb67fx24,null))[_0x1174[31]](handleError(_0xb67fx24,null))};exports[_0x1174[190]]= function(_0xb67fx1e,_0xb67fx24,_0xb67fx3c){return db[_0x1174[191]][_0x1174[94]]({where:{id:_0xb67fx1e[_0x1174[93]][_0x1174[92]]}})[_0x1174[40]](handleEntityNotFound(_0xb67fx24,null))[_0x1174[40]](function(_0xb67fx27){if(_0xb67fx27){return _0xb67fx27[_0x1174[190]](_0xb67fx1e[_0x1174[96]][_0x1174[104]],_[_0x1174[144]](_0xb67fx1e[_0x1174[96]],[_0x1174[104],_0x1174[92]])|| {})}})[_0x1174[40]](respondWithResult(_0xb67fx24,null))[_0x1174[31]](handleError(_0xb67fx24,null))};exports[_0x1174[192]]= function(_0xb67fx1e,_0xb67fx27,_0xb67fx3c){var _0xb67fx2a={};var _0xb67fx36={};var _0xb67fx4e;var _0xb67fx2b;return db[_0x1174[64]][_0x1174[102]]({where:{id:_0xb67fx1e[_0x1174[93]][_0x1174[92]]}})[_0x1174[40]](handleEntityNotFound(_0xb67fx27,null))[_0x1174[40]](function(_0xb67fx27){if(_0xb67fx27){_0xb67fx4e= _0xb67fx27;_0xb67fx36[_0x1174[62]]= _[_0x1174[65]](db[_0x1174[189]][_0x1174[63]]);_0xb67fx36[_0x1174[67]]= _[_0x1174[65]](_0xb67fx1e[_0x1174[67]]);_0xb67fx36[_0x1174[69]]= _[_0x1174[70]](_0xb67fx36[_0x1174[62]],_0xb67fx36[_0x1174[67]]);_0xb67fx2a[_0x1174[71]]= _[_0x1174[70]](_0xb67fx36[_0x1174[62]],qs[_0x1174[72]](_0xb67fx1e[_0x1174[67]][_0x1174[72]]));_0xb67fx2a[_0x1174[71]]= (_0xb67fx2a[_0x1174[71]][_0x1174[73]])?_0xb67fx2a[_0x1174[71]]:_0xb67fx36[_0x1174[62]];_0xb67fx2a[_0x1174[76]]= qs[_0x1174[77]](_0xb67fx1e[_0x1174[67]][_0x1174[77]]);_0xb67fx2a[_0x1174[78]]= qs[_0x1174[69]](_[_0x1174[79]](_0xb67fx1e[_0x1174[67]],_0xb67fx36[_0x1174[69]]));if(_0xb67fx1e[_0x1174[67]][_0x1174[83]]){_0xb67fx2a[_0x1174[78]]= _[_0x1174[82]](_0xb67fx2a[_0x1174[78]],{$or:_[_0x1174[85]](_0xb67fx2a[_0x1174[71]],function(_0xb67fx39){var _0xb67fx37={};_0xb67fx37[_0xb67fx39]= {$like:_0x1174[84]+ _0xb67fx1e[_0x1174[67]][_0x1174[83]]+ _0x1174[84]};return _0xb67fx37})})};_0xb67fx2a= _[_0x1174[82]]({},_0xb67fx2a,_0xb67fx1e[_0x1174[86]]);return _0xb67fx4e[_0x1174[192]](_0xb67fx2a)}})[_0x1174[40]](function(_0xb67fx3e){if(_0xb67fx3e){_0xb67fx2b= _0xb67fx3e[_0x1174[73]];if(!_0xb67fx1e[_0x1174[67]][_0x1174[75]](_0x1174[74])){_0xb67fx2a[_0x1174[48]]= qs[_0x1174[48]](_0xb67fx1e[_0x1174[67]][_0x1174[48]]);_0xb67fx2a[_0x1174[47]]= qs[_0x1174[47]](_0xb67fx1e[_0x1174[67]][_0x1174[47]])};return _0xb67fx4e[_0x1174[192]](_0xb67fx2a)}})[_0x1174[40]](function(_0xb67fx3b){if(_0xb67fx3b){return _0xb67fx3b?{count:_0xb67fx2b,rows:_0xb67fx3b}:null}})[_0x1174[40]](respondWithResult(_0xb67fx27,null))[_0x1174[31]](handleError(_0xb67fx27,null))};exports[_0x1174[193]]= function(_0xb67fx1e,_0xb67fx24,_0xb67fx3c){var _0xb67fx2a={raw:false,where:{}};var _0xb67fx36={};var _0xb67fx3d={count:0,rows:[]};return db[_0x1174[64]][_0x1174[102]]({where:{id:_0xb67fx1e[_0x1174[93]][_0x1174[92]]}})[_0x1174[40]](handleEntityNotFound(_0xb67fx24,null))[_0x1174[40]](function(_0xb67fx27){if(_0xb67fx27){_0xb67fx36[_0x1174[62]]= _[_0x1174[65]](db[_0x1174[141]][_0x1174[63]]);_0xb67fx36[_0x1174[67]]= _[_0x1174[65]](_0xb67fx1e[_0x1174[67]]);_0xb67fx36[_0x1174[69]]= _[_0x1174[70]](_0xb67fx36[_0x1174[62]],_0xb67fx36[_0x1174[67]]);_0xb67fx2a[_0x1174[71]]= _[_0x1174[70]](_0xb67fx36[_0x1174[62]],qs[_0x1174[72]](_0xb67fx1e[_0x1174[67]][_0x1174[72]]));_0xb67fx2a[_0x1174[71]]= (_0xb67fx2a[_0x1174[71]][_0x1174[73]])?_0xb67fx2a[_0x1174[71]]:_0xb67fx36[_0x1174[62]];if(!_0xb67fx1e[_0x1174[67]][_0x1174[75]](_0x1174[74])){_0xb67fx2a[_0x1174[48]]= qs[_0x1174[48]](_0xb67fx1e[_0x1174[67]][_0x1174[48]]);_0xb67fx2a[_0x1174[47]]= qs[_0x1174[47]](_0xb67fx1e[_0x1174[67]][_0x1174[47]])};_0xb67fx2a[_0x1174[76]]= qs[_0x1174[77]](_0xb67fx1e[_0x1174[67]][_0x1174[77]]);_0xb67fx2a[_0x1174[78]]= qs[_0x1174[69]](_[_0x1174[79]](_0xb67fx1e[_0x1174[67]],_0xb67fx36[_0x1174[69]]));_0xb67fx2a[_0x1174[78]][_0x1174[99]]= _0xb67fx27[_0x1174[92]];if(_0xb67fx1e[_0x1174[67]][_0x1174[83]]){_0xb67fx2a[_0x1174[78]]= _[_0x1174[82]](_0xb67fx2a[_0x1174[78]],{$or:_[_0x1174[85]](_0xb67fx2a[_0x1174[71]],function(_0xb67fx39){var _0xb67fx37={};_0xb67fx37[_0xb67fx39]= {$like:_0x1174[84]+ _0xb67fx1e[_0x1174[67]][_0x1174[83]]+ _0x1174[84]};return _0xb67fx37})})};_0xb67fx2a= _[_0x1174[82]]({},_0xb67fx2a,_0xb67fx1e[_0x1174[86]]);return db[_0x1174[141]][_0x1174[46]]({where:_0xb67fx2a[_0x1174[78]]})[_0x1174[40]](function(_0xb67fx2b){_0xb67fx3d[_0x1174[46]]= _0xb67fx2b;if(_0xb67fx1e[_0x1174[67]][_0x1174[88]]){_0xb67fx2a[_0x1174[89]]= [{model:db[_0x1174[147]],as:_0x1174[194],required:false},{model:db[_0x1174[126]],as:_0x1174[195],attributes:[_0x1174[59],_0x1174[196],_0x1174[197]],required:false},{model:db[_0x1174[198]],as:_0x1174[199],attributes:[_0x1174[92],_0x1174[59],_0x1174[200]],where:_0xb67fx1e[_0x1174[67]][_0x1174[201]]?{id:_0xb67fx1e[_0x1174[67]][_0x1174[201]]}:undefined,required:_0xb67fx1e[_0x1174[67]][_0x1174[201]]?true:false}]};return db[_0x1174[141]][_0x1174[90]](_0xb67fx2a)})[_0x1174[40]](function(_0xb67fx3b){_0xb67fx3d[_0x1174[87]]= _0xb67fx3b;return _0xb67fx3d})}})[_0x1174[40]](respondWithFilteredResult(_0xb67fx24,_0xb67fx2a))[_0x1174[31]](handleError(_0xb67fx24,null))};exports[_0x1174[60]]= function(_0xb67fx1e,_0xb67fx24,_0xb67fx3c){var _0xb67fx4f,_0xb67fx50,_0xb67fx51;if(_[_0x1174[168]](_0xb67fx1e[_0x1174[96]][_0x1174[96]])|| _0xb67fx1e[_0x1174[96]][_0x1174[96]]=== _0x1174[170]){throw  new db[_0x1174[149]].ValidationError(_0x1174[171])};if(_[_0x1174[168]](_0xb67fx1e[_0x1174[96]][_0x1174[202]])){throw  new db[_0x1174[149]].ValidationError(_0x1174[203])};_0xb67fx4f= _0xb67fx1e[_0x1174[96]][_0x1174[202]];return db[_0x1174[64]][_0x1174[94]]({where:{id:_0xb67fx1e[_0x1174[93]][_0x1174[92]]},include:[{model:db[_0x1174[176]],as:_0x1174[208],include:[{model:db[_0x1174[147]],as:_0x1174[143],where:{mobile:_0xb67fx4f},limit:1,order:[[_0x1174[151],_0x1174[175]]]}]}]})[_0x1174[40]](handleEntityNotFound(_0xb67fx24,null))[_0x1174[40]](function(_0xb67fx27){if(_0xb67fx27&& _0xb67fx27[_0x1174[208]]){_0xb67fx50= _0xb67fx27[_0x1174[127]]({plain:true});if(_0xb67fx50[_0x1174[208]]&& _0xb67fx50[_0x1174[208]][_0x1174[143]][_0x1174[73]]){return _0xb67fx50[_0x1174[208]][_0x1174[143]][0]};return db[_0x1174[147]][_0x1174[95]](_[_0x1174[145]](_0xb67fx1e[_0x1174[96]],{firstName:_0xb67fx4f,mobile:_0xb67fx4f,phone:_0xb67fx4f,ListId:_0xb67fx50[_0x1174[154]]}))}})[_0x1174[40]](handleEntityNotFound(_0xb67fx24,null))[_0x1174[40]](function(_0xb67fx27){if(_0xb67fx27){_0xb67fx51= _0xb67fx27;return db[_0x1174[141]][_0x1174[94]]({where:{ContactId:_0xb67fx51[_0x1174[92]],closed:false,SmsAccountId:_0xb67fx50[_0x1174[92]]}})[_0x1174[40]](function(_0xb67fx27){if(_0xb67fx27){return [_0xb67fx27,false]};return db[_0x1174[141]][_0x1174[95]]({UserId:_0xb67fx1e[_0x1174[206]][_0x1174[92]],ContactId:_0xb67fx51[_0x1174[92]],SmsAccountId:_0xb67fx50[_0x1174[92]],phone:_0xb67fx4f,firstMsgDirection:_0x1174[207],Messages:[_[_0x1174[82]](_0xb67fx1e[_0x1174[96]],{read:false,body:_0xb67fx1e[_0x1174[96]][_0x1174[96]],phone:_0xb67fx4f,SmsAccountId:_0xb67fx50[_0x1174[92]],UserId:_0xb67fx1e[_0x1174[206]][_0x1174[92]],ContactId:_0xb67fx51[_0x1174[92]]})]},{include:[{model:db[_0x1174[138]],as:_0x1174[204]}]})[_0x1174[40]](function(_0xb67fx47){return [_0xb67fx47,true]})})}})[_0x1174[139]](function(_0xb67fx27,_0xb67fx44){if(_0xb67fx44){return _0xb67fx27};return db[_0x1174[138]][_0x1174[95]](_[_0x1174[82]](_0xb67fx1e[_0x1174[96]],{read:false,body:_0xb67fx1e[_0x1174[96]][_0x1174[96]],phone:_0xb67fx4f,SmsAccountId:_0xb67fx50[_0x1174[92]],SmsInteractionId:_0xb67fx27[_0x1174[92]],UserId:_0xb67fx1e[_0x1174[206]][_0x1174[92]],ContactId:_0xb67fx51[_0x1174[92]]}))[_0x1174[40]](function(_0xb67fx52){_0xb67fx27[_0x1174[205]][_0x1174[204]]= [];_0xb67fx27[_0x1174[205]][_0x1174[204]][_0x1174[131]](_0xb67fx52[_0x1174[205]]);return _0xb67fx27})})[_0x1174[40]](respondWithResult(_0xb67fx24,null))[_0x1174[31]](handleError(_0xb67fx24,null))};exports[_0x1174[44]]= function(_0xb67fx1e,_0xb67fx24,_0xb67fx3c){if(_0xb67fx1e[_0x1174[96]][_0x1174[92]]){delete _0xb67fx1e[_0x1174[96]][_0x1174[92]]};var _0xb67fx52,_0xb67fx53,_0xb67fx54;return db[_0x1174[64]][_0x1174[94]]({where:{id:_0xb67fx1e[_0x1174[93]][_0x1174[92]]}})[_0x1174[40]](handleEntityNotFound(_0xb67fx24,null))[_0x1174[40]](function(_0xb67fx27){if(_0xb67fx27){_0xb67fx54= _0xb67fx27;logger[_0x1174[36]](_0x1174[34],_0x1174[44],_0x1174[213],_0xb67fx27[_0x1174[110]],util[_0x1174[210]](_0xb67fx1e[_0x1174[96]],{showHidden:false,depth:null}));switch(_0xb67fx27[_0x1174[110]]){case _0x1174[161]:if(_0xb67fx1e[_0x1174[96]][_0x1174[214]]&& _0xb67fx1e[_0x1174[96]][_0x1174[44]]){_0xb67fx53= _0xb67fx1e[_0x1174[96]][_0x1174[44]];return db[_0x1174[138]][_0x1174[94]]({where:{messageId:_0xb67fx1e[_0x1174[96]][_0x1174[214]]}})};break;case _0x1174[162]:if(_0xb67fx1e[_0x1174[96]][_0x1174[215]]&& _0xb67fx1e[_0x1174[96]][_0x1174[216]]){_0xb67fx53= _0xb67fx1e[_0x1174[96]][_0x1174[216]];return db[_0x1174[138]][_0x1174[94]]({where:{messageId:_0xb67fx1e[_0x1174[96]][_0x1174[215]]}})};break;case _0x1174[164]:if(_0xb67fx1e[_0x1174[96]][_0x1174[163]]&& _0xb67fx1e[_0x1174[96]][_0x1174[217]]){_0xb67fx53= _0xb67fx1e[_0x1174[96]][_0x1174[217]];return db[_0x1174[138]][_0x1174[94]]({where:{messageId:_0xb67fx1e[_0x1174[96]][_0x1174[163]]}})};break}}})[_0x1174[40]](handleEntityNotFound(_0xb67fx24,null))[_0x1174[40]](function(_0xb67fx27){if(_0xb67fx27){_0xb67fx52= _0xb67fx27;switch(_0xb67fx54[_0x1174[110]]){case _0x1174[161]:if(_0xb67fx53=== _0x1174[209]){return _0xb67fx52[_0x1174[56]]({read:true})}else {logger[_0x1174[30]](_0x1174[34],_0x1174[44],_0x1174[161],util[_0x1174[210]](_0xb67fx1e[_0x1174[96]],{showHidden:false,depth:null}))};break;case _0x1174[162]:if(_0xb67fx53=== _0x1174[211]){return _0xb67fx52[_0x1174[56]]({read:true})}else {logger[_0x1174[30]](_0x1174[34],_0x1174[44],_0x1174[161],util[_0x1174[210]](_0xb67fx1e[_0x1174[96]],{showHidden:false,depth:null}))};break;case _0x1174[164]:if(!_0xb67fx1e[_0x1174[96]][_0x1174[212]]&& _0xb67fx53>= 200 && _0xb67fx53<= 206){return _0xb67fx52[_0x1174[56]]({read:true})}else {logger[_0x1174[30]](_0x1174[34],_0x1174[44],_0x1174[164],util[_0x1174[210]](_0xb67fx1e[_0x1174[96]],{showHidden:false,depth:null}))};break};return _0xb67fx52}})[_0x1174[40]](respondWithResult(_0xb67fx24,null))[_0x1174[31]](handleError(_0xb67fx24,null))}
\ No newline at end of file
+var _0x9966=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x64\x64\x41\x6E\x73\x77\x65\x72","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x67\x65\x74\x41\x6E\x73\x77\x65\x72\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x72\x65\x6D\x6F\x76\x65\x41\x6E\x73\x77\x65\x72\x73","\x69\x64\x73","\x6E\x6F\x74\x69\x66\x79","\x73\x6D\x73","\x72\x65\x63\x65\x69\x76\x65\x4D\x65\x73\x73\x61\x67\x65","\x65\x6E\x74\x69\x74\x79\x20\x66\x6F\x75\x6E\x64","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x74\x79\x70\x65","\x61\x63\x63\x6F\x75\x6E\x74","\x74\x77\x69\x6C\x69\x6F","\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\x22\x31\x2E\x30\x22\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\x22\x55\x54\x46\x2D\x38\x22\x3F\x3E\x0A\x3C\x52\x65\x73\x70\x6F\x6E\x73\x65\x3E\x3C\x2F\x52\x65\x73\x70\x6F\x6E\x73\x65\x3E","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x74\x65\x78\x74\x2F\x78\x6D\x6C","\x55\x73\x65\x72\x49\x64","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x67\x65\x6E\x74","\x2C","\x77\x61\x69\x74\x46\x6F\x72\x54\x68\x65\x41\x73\x73\x69\x67\x6E\x65\x64\x41\x67\x65\x6E\x74","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x75\x6E\x73\x68\x69\x66\x74","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x53\x74\x61\x72\x74","\x73\x74\x61\x72\x74\x52\x6F\x75\x74\x69\x6E\x67","\x55\x73\x65\x72","\x67\x65\x74","\x61\x75\x74\x6F\x63\x6C\x6F\x73\x65","\x63\x6C\x6F\x73\x65","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x70\x75\x73\x68","\x63\x72\x65\x61\x74\x65\x64","\x66\x72\x6F\x6D","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x69\x6E","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x49\x64","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x73\x70\x72\x65\x61\x64","\x63\x6F\x6E\x74\x61\x63\x74","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6C\x69\x73\x74","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x6F\x6D\x69\x74","\x64\x65\x66\x61\x75\x6C\x74\x73","\x6D\x61\x70\x4B\x65\x79","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x6E\x6F\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x20\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x4C\x69\x73\x74\x49\x64","\x6D\x6F\x62\x69\x6C\x65","\x46\x72\x6F\x6D","\x42\x6F\x64\x79","\x4D\x65\x73\x73\x61\x67\x65\x53\x69\x64","\x73\x65\x6E\x64\x65\x72","\x74\x65\x78\x74","\x73\x6B\x65\x62\x62\x79","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x6C","\x6D\x65\x73\x73\x61\x67\x65\x5F\x69\x64","\x63\x6C\x69\x63\x6B\x73\x65\x6E\x64","\x54\x65\x78\x74","\x4D\x65\x73\x73\x61\x67\x65\x55\x55\x49\x44","\x70\x6C\x69\x76\x6F","\x69\x73\x4E\x69\x6C","\x66\x72\x6F\x6D\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","","\x62\x6F\x64\x79\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x20\x61\x6E\x64\x20\x6E\x6F\x74\x20\x65\x6D\x70\x74\x79","\x6D\x61\x70\x4B\x65\x79\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x6D\x61\x70\x4B\x65\x79\x20\x69\x6E\x76\x61\x6C\x69\x64\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x73\x65\x3A\x20","\x44\x45\x53\x43","\x43\x6D\x4C\x69\x73\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x61\x73\x63","\x6F\x72\x64\x65\x72\x42\x79","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x67\x65\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x53\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x73\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x43\x6F\x6E\x74\x61\x63\x74","\x4F\x77\x6E\x65\x72","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x54\x61\x67","\x54\x61\x67\x73","\x63\x6F\x6C\x6F\x72","\x74\x61\x67","\x74\x6F","\x74\x6F\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","\x4D\x65\x73\x73\x61\x67\x65\x73","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x75\x73\x65\x72","\x6F\x75\x74","\x4C\x69\x73\x74","\x44\x45\x4C\x49\x56\x45\x52\x45\x44","\x69\x6E\x73\x70\x65\x63\x74","\x31","\x65\x72\x72\x6F\x72\x5F\x63\x6F\x64\x65","\x72\x65\x63\x65\x69\x76\x65\x64\x20\x64\x65\x6C\x69\x76\x65\x72\x79\x20\x72\x65\x70\x6F\x72\x74\x20\x66\x72\x6F\x6D","\x73\x6B\x65\x62\x62\x79\x5F\x64\x69\x73\x70\x61\x74\x63\x68\x5F\x69\x64","\x72\x65\x71\x75\x65\x73\x74\x69\x64","\x73\x74\x61\x74\x75\x73\x49\x6E\x74","\x73\x74\x61\x74\x75\x73\x5F\x63\x6F\x64\x65"];_0x9966[0];var jsonpatch=require(_0x9966[1]);var rp=require(_0x9966[2]);var moment=require(_0x9966[3]);var BPromise=require(_0x9966[4]);var Mustache=require(_0x9966[5]);var util=require(_0x9966[6]);var path=require(_0x9966[7]);var sox=require(_0x9966[8]);var csv=require(_0x9966[9]);var ejs=require(_0x9966[10]);var fs=require(_0x9966[11]);var _=require(_0x9966[12]);var squel=require(_0x9966[13]);var crypto=require(_0x9966[14]);var jsforce=require(_0x9966[15]);var deskjs=require(_0x9966[16]);var toCsv=require(_0x9966[9]);var querystring=require(_0x9966[17]);var Papa=require(_0x9966[18]);var qs=require(_0x9966[19]);var logger=require(_0x9966[21])(_0x9966[20]);var utils=require(_0x9966[22]);var config=require(_0x9966[23]);var db=require(_0x9966[25])[_0x9966[24]];var jayson=require(_0x9966[26]);var client=jayson[_0x9966[28]][_0x9966[27]]({port:9004});function respondWithRpcPromise(_0x668ex1c,_0x668ex1d,_0x668ex1e,_0x668ex1f){return  new BPromise(function(_0x668ex20,_0x668ex21){var _0x668ex22=(_0x668ex1f|| client);return _0x668ex22[_0x9966[41]](_0x668ex1c,_0x668ex1e)[_0x9966[40]](function(_0x668ex24){logger[_0x9966[33]](_0x9966[29],_0x668ex1d,_0x9966[32]);logger[_0x9966[36]](_0x9966[34],_0x668ex1d,_0x9966[32],JSON[_0x9966[35]](_0x668ex24));if(_0x668ex24[_0x9966[30]]){if(_0x668ex24[_0x9966[30]][_0x9966[37]]=== 500){logger[_0x9966[30]](_0x9966[29],_0x668ex1d,_0x668ex24[_0x9966[30]][_0x9966[38]]);return _0x668ex21(_0x668ex24[_0x9966[30]][_0x9966[38]])};logger[_0x9966[30]](_0x9966[29],_0x668ex1d,_0x668ex24[_0x9966[30]][_0x9966[38]]);return _0x668ex20(_0x668ex24[_0x9966[30]][_0x9966[38]])}else {logger[_0x9966[33]](_0x9966[29],_0x668ex1d,_0x9966[32]);_0x668ex20(_0x668ex24[_0x9966[39]][_0x9966[38]])}})[_0x9966[31]](function(_0x668ex23){logger[_0x9966[30]](_0x9966[29],_0x668ex1d,_0x668ex23);_0x668ex21(_0x668ex23)})})}function respondWithStatusCode(_0x668ex24,_0x668ex26){_0x668ex26= _0x668ex26|| 204;return function(_0x668ex27){if(_0x668ex27){return _0x668ex24[_0x9966[42]](_0x668ex26)};return _0x668ex24[_0x9966[44]](_0x668ex26)[_0x9966[43]]()}}function respondWithResult(_0x668ex24,_0x668ex26){_0x668ex26= _0x668ex26|| 200;return function(_0x668ex27){if(_0x668ex27){return _0x668ex24[_0x9966[44]](_0x668ex26)[_0x9966[45]](_0x668ex27)}}}function respondWithFilteredResult(_0x668ex24,_0x668ex2a){return function(_0x668ex27){if(_0x668ex27){var _0x668ex2b=_0x668ex27[_0x9966[46]],_0x668ex2c=_0x668ex2a[_0x9966[47]],_0x668ex2d=_0x668ex2a[_0x9966[47]]+ _0x668ex2a[_0x9966[48]],_0x668ex26;if(_0x668ex2d>= _0x668ex2b){_0x668ex2d= _0x668ex2b;_0x668ex26= 200}else {_0x668ex26= 206};_0x668ex24[_0x9966[44]](_0x668ex26);return _0x668ex24[_0x9966[52]](_0x9966[49],_0x668ex2c+ _0x9966[50]+ _0x668ex2d+ _0x9966[51]+ _0x668ex2b)[_0x9966[45]](_0x668ex27)};return null}}function patchUpdates(_0x668ex2f){return function(_0x668ex27){try{jsonpatch[_0x9966[53]](_0x668ex27,_0x668ex2f,true)}catch(err){return BPromise[_0x9966[54]](err)};return _0x668ex27[_0x9966[55]]()}}function saveUpdates(_0x668ex31,_0x668ex26){return function(_0x668ex27){if(_0x668ex27){return _0x668ex27[_0x9966[56]](_0x668ex31)[_0x9966[40]](function(_0x668ex32){return _0x668ex32})};return null}}function removeEntity(_0x668ex24,_0x668ex26){return function(_0x668ex27){if(_0x668ex27){return _0x668ex27[_0x9966[57]]()[_0x9966[40]](function(){_0x668ex24[_0x9966[44]](204)[_0x9966[43]]()})}}}function handleEntityNotFound(_0x668ex24,_0x668ex26){return function(_0x668ex27){if(!_0x668ex27){_0x668ex24[_0x9966[42]](404)};return _0x668ex27}}function handleError(_0x668ex24,_0x668ex26){_0x668ex26= _0x668ex26|| 500;return function(_0x668ex23){logger[_0x9966[30]](_0x668ex23[_0x9966[58]]);if(_0x668ex23[_0x9966[59]]){delete _0x668ex23[_0x9966[59]]};_0x668ex24[_0x9966[44]](_0x668ex26)[_0x9966[60]](_0x668ex23)}}exports[_0x9966[61]]= function(_0x668ex1e,_0x668ex24){var _0x668ex2a={},_0x668ex36={},_0x668ex37={count:0,rows:[]};_0x668ex36[_0x9966[62]]= _[_0x9966[65]](db[_0x9966[64]][_0x9966[63]]);var _0x668ex38={dateStart:_0x668ex1e[_0x9966[67]][_0x9966[66]],dateEnd:_0x668ex1e[_0x9966[67]][_0x9966[68]]};delete _0x668ex1e[_0x9966[67]][_0x9966[66]];delete _0x668ex1e[_0x9966[67]][_0x9966[68]];_0x668ex36[_0x9966[67]]= _[_0x9966[65]](_0x668ex1e[_0x9966[67]]);_0x668ex36[_0x9966[69]]= _[_0x9966[70]](_0x668ex36[_0x9966[62]],_0x668ex36[_0x9966[67]]);_0x668ex2a[_0x9966[71]]= _[_0x9966[70]](_0x668ex36[_0x9966[62]],qs[_0x9966[72]](_0x668ex1e[_0x9966[67]][_0x9966[72]]));_0x668ex2a[_0x9966[71]]= (_0x668ex2a[_0x9966[71]][_0x9966[73]])?_0x668ex2a[_0x9966[71]]:_0x668ex36[_0x9966[62]];if(!_0x668ex1e[_0x9966[67]][_0x9966[75]](_0x9966[74])){_0x668ex2a[_0x9966[48]]= qs[_0x9966[48]](_0x668ex1e[_0x9966[67]][_0x9966[48]]);_0x668ex2a[_0x9966[47]]= qs[_0x9966[47]](_0x668ex1e[_0x9966[67]][_0x9966[47]])};_0x668ex2a[_0x9966[76]]= qs[_0x9966[77]](_0x668ex1e[_0x9966[67]][_0x9966[77]]);_0x668ex2a[_0x9966[78]]= qs[_0x9966[69]](_[_0x9966[79]](_0x668ex1e[_0x9966[67]],_0x668ex36[_0x9966[69]]));if(_0x668ex38[_0x9966[66]]){if(_0x668ex38[_0x9966[68]]){_0x668ex38[_0x9966[68]]= moment(_0x668ex38[_0x9966[68]])[_0x9966[81]](1,_0x9966[80])}else {_0x668ex38[_0x9966[68]]= moment(_0x668ex38[_0x9966[66]])[_0x9966[81]](1,_0x9966[80])};_[_0x9966[82]](_0x668ex2a[_0x9966[78]],{createdAt:{$gte:_0x668ex38[_0x9966[66]],$lte:_0x668ex38[_0x9966[68]]}})};if(_0x668ex1e[_0x9966[67]][_0x9966[83]]){_0x668ex2a[_0x9966[78]]= _[_0x9966[82]](_0x668ex2a[_0x9966[78]],{$or:_[_0x9966[85]](_0x668ex2a[_0x9966[71]],function(_0x668ex39){var _0x668ex37={};_0x668ex37[_0x668ex39]= {$like:_0x9966[84]+ _0x668ex1e[_0x9966[67]][_0x9966[83]]+ _0x9966[84]};return _0x668ex37})})};_0x668ex2a= _[_0x9966[82]]({},_0x668ex2a,_0x668ex1e[_0x9966[86]]);var _0x668ex3a={where:_0x668ex2a[_0x9966[78]]};return db[_0x9966[64]][_0x9966[46]](_0x668ex3a)[_0x9966[40]](function(_0x668ex2b){_0x668ex37[_0x9966[46]]= _0x668ex2b;if(_0x668ex1e[_0x9966[67]][_0x9966[88]]){_0x668ex2a[_0x9966[89]]= [{all:true}]};return db[_0x9966[64]][_0x9966[90]](_0x668ex2a)})[_0x9966[40]](function(_0x668ex3b){_0x668ex37[_0x9966[87]]= _0x668ex3b;return _0x668ex37})[_0x9966[40]](respondWithFilteredResult(_0x668ex24,_0x668ex2a))[_0x9966[31]](handleError(_0x668ex24,null))};exports[_0x9966[91]]= function(_0x668ex1e,_0x668ex24){var _0x668ex2a={raw:false,where:{id:_0x668ex1e[_0x9966[93]][_0x9966[92]]}},_0x668ex36={};_0x668ex36[_0x9966[62]]= _[_0x9966[65]](db[_0x9966[64]][_0x9966[63]]);_0x668ex36[_0x9966[67]]= _[_0x9966[65]](_0x668ex1e[_0x9966[67]]);_0x668ex36[_0x9966[69]]= _[_0x9966[70]](_0x668ex36[_0x9966[62]],_0x668ex36[_0x9966[67]]);_0x668ex2a[_0x9966[71]]= _[_0x9966[70]](_0x668ex36[_0x9966[62]],qs[_0x9966[72]](_0x668ex1e[_0x9966[67]][_0x9966[72]]));_0x668ex2a[_0x9966[71]]= (_0x668ex2a[_0x9966[71]][_0x9966[73]])?_0x668ex2a[_0x9966[71]]:_0x668ex36[_0x9966[62]];if(_0x668ex1e[_0x9966[67]][_0x9966[88]]){_0x668ex2a[_0x9966[89]]= [{all:true}]};_0x668ex2a= _[_0x9966[82]]({},_0x668ex2a,_0x668ex1e[_0x9966[86]]);return db[_0x9966[64]][_0x9966[94]](_0x668ex2a)[_0x9966[40]](handleEntityNotFound(_0x668ex24,null))[_0x9966[40]](respondWithResult(_0x668ex24,null))[_0x9966[31]](handleError(_0x668ex24,null))};exports[_0x9966[95]]= function(_0x668ex1e,_0x668ex24){return db[_0x9966[64]][_0x9966[95]](_0x668ex1e[_0x9966[96]],{})[_0x9966[40]](respondWithResult(_0x668ex24,201))[_0x9966[31]](handleError(_0x668ex24,null))};exports[_0x9966[56]]= function(_0x668ex1e,_0x668ex24){if(_0x668ex1e[_0x9966[96]][_0x9966[92]]){delete _0x668ex1e[_0x9966[96]][_0x9966[92]]};return db[_0x9966[64]][_0x9966[94]]({where:{id:_0x668ex1e[_0x9966[93]][_0x9966[92]]}})[_0x9966[40]](handleEntityNotFound(_0x668ex24,null))[_0x9966[40]](saveUpdates(_0x668ex1e[_0x9966[96]],null))[_0x9966[40]](respondWithResult(_0x668ex24,null))[_0x9966[31]](handleError(_0x668ex24,null))};exports[_0x9966[57]]= function(_0x668ex1e,_0x668ex24){return db[_0x9966[64]][_0x9966[94]]({where:{id:_0x668ex1e[_0x9966[93]][_0x9966[92]]}})[_0x9966[40]](handleEntityNotFound(_0x668ex24,null))[_0x9966[40]](removeEntity(_0x668ex24,null))[_0x9966[31]](handleError(_0x668ex24,null))};exports[_0x9966[97]]= function(_0x668ex1e,_0x668ex24){return db[_0x9966[64]][_0x9966[97]]()[_0x9966[40]](respondWithResult(_0x668ex24,null))[_0x9966[31]](handleError(_0x668ex24,null))};exports[_0x9966[98]]= function(_0x668ex1e,_0x668ex24,_0x668ex3c){if(_0x668ex1e[_0x9966[96]][_0x9966[92]]){delete _0x668ex1e[_0x9966[96]][_0x9966[92]]};return db[_0x9966[64]][_0x9966[94]]({where:{id:_0x668ex1e[_0x9966[93]][_0x9966[92]]}})[_0x9966[40]](handleEntityNotFound(_0x668ex24,null))[_0x9966[40]](function(_0x668ex27){if(_0x668ex27){_0x668ex1e[_0x9966[96]][_0x9966[99]]= _0x668ex27[_0x9966[92]];return db[_0x9966[100]][_0x9966[95]](_0x668ex1e[_0x9966[96]])}})[_0x9966[40]](respondWithResult(_0x668ex24,null))[_0x9966[31]](handleError(_0x668ex24,null))};exports[_0x9966[101]]= function(_0x668ex1e,_0x668ex24,_0x668ex3c){var _0x668ex2a={raw:false,where:{}};var _0x668ex36={};var _0x668ex3d={count:0,rows:[]};return db[_0x9966[64]][_0x9966[102]]({where:{id:_0x668ex1e[_0x9966[93]][_0x9966[92]]}})[_0x9966[40]](handleEntityNotFound(_0x668ex24,null))[_0x9966[40]](function(_0x668ex27){if(_0x668ex27){_0x668ex36[_0x9966[62]]= _[_0x9966[65]](db[_0x9966[100]][_0x9966[63]]);_0x668ex36[_0x9966[67]]= _[_0x9966[65]](_0x668ex1e[_0x9966[67]]);_0x668ex36[_0x9966[69]]= _[_0x9966[70]](_0x668ex36[_0x9966[62]],_0x668ex36[_0x9966[67]]);_0x668ex2a[_0x9966[71]]= _[_0x9966[70]](_0x668ex36[_0x9966[62]],qs[_0x9966[72]](_0x668ex1e[_0x9966[67]][_0x9966[72]]));_0x668ex2a[_0x9966[71]]= (_0x668ex2a[_0x9966[71]][_0x9966[73]])?_0x668ex2a[_0x9966[71]]:_0x668ex36[_0x9966[62]];if(!_0x668ex1e[_0x9966[67]][_0x9966[75]](_0x9966[74])){_0x668ex2a[_0x9966[48]]= qs[_0x9966[48]](_0x668ex1e[_0x9966[67]][_0x9966[48]]);_0x668ex2a[_0x9966[47]]= qs[_0x9966[47]](_0x668ex1e[_0x9966[67]][_0x9966[47]])};_0x668ex2a[_0x9966[76]]= qs[_0x9966[77]](_0x668ex1e[_0x9966[67]][_0x9966[77]]);_0x668ex2a[_0x9966[78]]= qs[_0x9966[69]](_[_0x9966[79]](_0x668ex1e[_0x9966[67]],_0x668ex36[_0x9966[69]]));_0x668ex2a[_0x9966[78]][_0x9966[99]]= _0x668ex27[_0x9966[92]];if(_0x668ex1e[_0x9966[67]][_0x9966[83]]){_0x668ex2a[_0x9966[78]]= _[_0x9966[82]](_0x668ex2a[_0x9966[78]],{$or:_[_0x9966[85]](_0x668ex2a[_0x9966[71]],function(_0x668ex39){var _0x668ex37={};_0x668ex37[_0x668ex39]= {$like:_0x9966[84]+ _0x668ex1e[_0x9966[67]][_0x9966[83]]+ _0x9966[84]};return _0x668ex37})})};_0x668ex2a= _[_0x9966[82]]({},_0x668ex2a,_0x668ex1e[_0x9966[86]]);return db[_0x9966[100]][_0x9966[46]]({where:_0x668ex2a[_0x9966[78]]})[_0x9966[40]](function(_0x668ex2b){_0x668ex3d[_0x9966[46]]= _0x668ex2b;if(_0x668ex1e[_0x9966[67]][_0x9966[88]]){_0x668ex2a[_0x9966[89]]= [{all:true}]};return db[_0x9966[100]][_0x9966[90]](_0x668ex2a)})[_0x9966[40]](function(_0x668ex3b){_0x668ex3d[_0x9966[87]]= _0x668ex3b;return _0x668ex3d})}})[_0x9966[40]](respondWithFilteredResult(_0x668ex24,_0x668ex2a))[_0x9966[31]](handleError(_0x668ex24,null))};exports[_0x9966[103]]= function(_0x668ex1e,_0x668ex24,_0x668ex3c){var _0x668ex3e;return db[_0x9966[64]][_0x9966[94]]({where:{id:_0x668ex1e[_0x9966[93]][_0x9966[92]]}})[_0x9966[40]](handleEntityNotFound(_0x668ex24,null))[_0x9966[40]](function(_0x668ex27){if(_0x668ex27){return _0x668ex27[_0x9966[103]](_0x668ex1e[_0x9966[67]][_0x9966[104]])}})[_0x9966[40]](respondWithStatusCode(_0x668ex24,null))[_0x9966[31]](handleError(_0x668ex24,null))};exports[_0x9966[105]]= function(_0x668ex1e,_0x668ex24,_0x668ex3c){var _0x668ex3f={channel:_0x9966[106]};var _0x668ex40=[];var _0x668ex41=[];var _0x668ex42={};return db[_0x9966[64]][_0x9966[94]]({where:{id:_0x668ex1e[_0x9966[93]][_0x9966[92]]},include:[{model:db[_0x9966[181]],as:_0x9966[180]}]})[_0x9966[40]](handleEntityNotFound(_0x668ex24,null))[_0x9966[40]](function(_0x668ex27){_0x668ex3f[_0x9966[111]]= _0x668ex27;_0x668ex3f[_0x9966[123]]= _[_0x9966[179]](_0x668ex27.Applications,[_0x9966[177]],[_0x9966[178]]);if(_0x668ex3f[_0x9966[111]][_0x9966[180]]){delete _0x668ex3f[_0x9966[111]][_0x9966[180]]};return db[_0x9966[147]][_0x9966[97]]()})[_0x9966[40]](function(_0x668ex49){if(!_0x668ex49){throw  new db[_0x9966[149]].ValidationError(_0x9966[148])};_0x668ex40= _[_0x9966[152]](_[_0x9966[65]](_0x668ex49),[_0x9966[150],_0x9966[151]]);_0x668ex41= _[_0x9966[152]](_[_0x9966[65]](_0x668ex49),[_0x9966[150],_0x9966[151],_0x9966[153],_0x9966[154]]);_0x668ex3f[_0x9966[96]]= {mapKey:_0x9966[155]};if(_0x668ex3f[_0x9966[111]][_0x9966[110]]){switch(_0x668ex3f[_0x9966[111]][_0x9966[110]]){case _0x9966[112]:_0x668ex3f[_0x9966[96]][_0x9966[133]]= _0x668ex1e[_0x9966[96]][_0x9966[156]];_0x668ex3f[_0x9966[96]][_0x9966[96]]= _0x668ex1e[_0x9966[96]][_0x9966[157]];_0x668ex3f[_0x9966[96]][_0x9966[134]]= _0x668ex1e[_0x9966[96]][_0x9966[158]];break;case _0x9966[161]:_0x668ex3f[_0x9966[96]][_0x9966[133]]= _0x668ex1e[_0x9966[96]][_0x9966[159]];_0x668ex3f[_0x9966[96]][_0x9966[96]]= _0x668ex1e[_0x9966[96]][_0x9966[160]];break;case _0x9966[162]:_0x668ex3f[_0x9966[96]][_0x9966[133]]= _0x668ex1e[_0x9966[96]][_0x9966[133]];_0x668ex3f[_0x9966[96]][_0x9966[96]]= _0x668ex1e[_0x9966[96]][_0x9966[38]];break;case _0x9966[164]:_0x668ex3f[_0x9966[96]][_0x9966[133]]= _0x668ex1e[_0x9966[96]][_0x9966[133]];_0x668ex3f[_0x9966[96]][_0x9966[96]]= _0x668ex1e[_0x9966[96]][_0x9966[96]];_0x668ex3f[_0x9966[96]][_0x9966[134]]= _0x668ex1e[_0x9966[96]][_0x9966[163]];break;case _0x9966[167]:_0x668ex3f[_0x9966[96]][_0x9966[133]]= _0x668ex1e[_0x9966[96]][_0x9966[156]];_0x668ex3f[_0x9966[96]][_0x9966[96]]= _0x668ex1e[_0x9966[96]][_0x9966[165]];_0x668ex3f[_0x9966[96]][_0x9966[134]]= _0x668ex1e[_0x9966[96]][_0x9966[166]];break}};if(_0x668ex3f[_0x9966[96]][_0x9966[92]]){delete _0x668ex3f[_0x9966[96]][_0x9966[92]]};if(_[_0x9966[168]](_0x668ex3f[_0x9966[96]][_0x9966[133]])){throw  new db[_0x9966[149]].ValidationError(_0x9966[169])};if(_[_0x9966[168]](_0x668ex3f[_0x9966[96]][_0x9966[96]])|| _0x668ex3f[_0x9966[96]][_0x9966[96]]=== _0x9966[170]){throw  new db[_0x9966[149]].ValidationError(_0x9966[171])};if(_[_0x9966[168]](_0x668ex3f[_0x9966[96]][_0x9966[146]])){throw  new db[_0x9966[149]].ValidationError(_0x9966[172]+ _0x668ex41)};if(!_[_0x9966[173]](_0x668ex41,_0x668ex3f[_0x9966[96]][_0x9966[146]])){throw  new db[_0x9966[149]].ValidationError(_0x9966[174]+ _0x668ex41)};_0x668ex42[_0x668ex3f[_0x9966[96]][_0x9966[146]]]= _0x668ex3f[_0x9966[96]][_0x9966[133]];return db[_0x9966[176]][_0x9966[94]]({where:{id:_0x668ex3f[_0x9966[111]][_0x9966[154]]},include:[{model:db[_0x9966[147]],as:_0x9966[143],where:_0x668ex42,limit:1,order:[[_0x9966[151],_0x9966[175]]]}]})})[_0x9966[40]](handleEntityNotFound(_0x668ex24,null))[_0x9966[40]](function(_0x668ex27){if(_0x668ex27){_0x668ex3f[_0x9966[142]]= _[_0x9966[144]](_0x668ex27,[_0x9966[143]]);if(_0x668ex27[_0x9966[143]][_0x9966[73]]){return _0x668ex27[_0x9966[143]][0]};var _0x668ex48=_[_0x9966[145]](_0x668ex3f[_0x9966[96]],{firstName:_0x668ex3f[_0x9966[96]][_0x9966[133]],phone:_0x668ex3f[_0x9966[96]][_0x9966[133]],ListId:_0x668ex27[_0x9966[92]]});_0x668ex48[_0x668ex3f[_0x9966[96]][_0x9966[146]]]= _0x668ex3f[_0x9966[96]][_0x9966[133]];return db[_0x9966[147]][_0x9966[95]](_0x668ex48,{fields:_0x668ex40,raw:true})}})[_0x9966[40]](handleEntityNotFound(_0x668ex24,null))[_0x9966[40]](function(_0x668ex27){if(_0x668ex27){_0x668ex3f[_0x9966[140]]= _0x668ex27;var _0x668ex45={ContactId:_0x668ex27[_0x9966[92]],phone:_0x668ex3f[_0x9966[96]][_0x9966[133]],SmsAccountId:_0x668ex1e[_0x9966[93]][_0x9966[92]]};var _0x668ex46={ContactId:_0x668ex27[_0x9966[92]],SmsAccountId:_0x668ex1e[_0x9966[93]][_0x9966[92]],closed:false};return db[_0x9966[141]][_0x9966[94]]({where:_0x668ex46})[_0x9966[40]](function(_0x668ex47){if(_0x668ex47){return [_0x668ex47,false]};return db[_0x9966[141]][_0x9966[95]](_0x668ex45)[_0x9966[40]](function(_0x668ex47){return [_0x668ex47,true]})})}})[_0x9966[139]](function(_0x668ex27,_0x668ex44){_0x668ex3f[_0x9966[117]]= _0x668ex27[_0x9966[127]]({plain:true});if(_0x668ex44){if(_0x668ex3f[_0x9966[111]][_0x9966[128]]){_0x668ex3f[_0x9966[123]][_0x9966[131]]({id:0,priority:_0x668ex3f[_0x9966[123]][_0x9966[73]]+ 1,app:_0x9966[129],appdata:_0x9966[130],interval:_0x9966[121]})};_0x668ex3f[_0x9966[117]][_0x9966[132]]= true};return db[_0x9966[138]][_0x9966[95]]({phone:_0x668ex3f[_0x9966[96]][_0x9966[133]],messageId:_0x668ex3f[_0x9966[96]][_0x9966[134]],body:_0x668ex3f[_0x9966[96]][_0x9966[96]],SmsAccountId:_0x668ex1e[_0x9966[93]][_0x9966[92]],SmsInteractionId:_0x668ex27[_0x9966[92]],direction:_0x9966[135],ContactId:_0x668ex27[_0x9966[136]],AttachmentId:_0x668ex3f[_0x9966[96]][_0x9966[137]]})})[_0x9966[40]](function(_0x668ex27){_0x668ex3f[_0x9966[38]]= _0x668ex27;if(_0x668ex3f[_0x9966[117]][_0x9966[116]]){return db[_0x9966[126]][_0x9966[94]]({attributes:[_0x9966[92],_0x9966[59]],where:{id:_0x668ex3f[_0x9966[117]][_0x9966[116]]}})[_0x9966[40]](function(_0x668ex43){if(_0x668ex43){_0x668ex3f[_0x9966[123]][_0x9966[122]]({id:0,priority:0,app:_0x9966[118],appdata:_0x668ex43[_0x9966[59]]+ _0x9966[119]+ (_0x668ex3f[_0x9966[111]][_0x9966[120]]|| 10),interval:_0x9966[121]})};return respondWithRpcPromise(_0x9966[124],_0x9966[125],_0x668ex3f)})};return respondWithRpcPromise(_0x9966[124],_0x9966[125],_0x668ex3f)})[_0x9966[40]](function(_0x668ex27){if(_0x668ex27){var _0x668ex26=200;var _0x668ex1d=_0x9966[107];logger[_0x9966[33]](_0x9966[34],_0x668ex1d,_0x668ex26,_0x9966[108]);logger[_0x9966[36]](_0x9966[109],_0x668ex1d,_0x668ex26,_0x9966[108],JSON[_0x9966[35]](_0x668ex27));if(_0x668ex3f[_0x9966[111]][_0x9966[110]]=== _0x9966[112]){return _0x668ex24[_0x9966[44]](_0x668ex26)[_0x9966[52]](_0x9966[114],_0x9966[115])[_0x9966[60]](_0x9966[113])}else {return _0x668ex24[_0x9966[44]](_0x668ex26)[_0x9966[45]](_0x668ex27)}}})[_0x9966[31]](handleError(_0x668ex24,null))};exports[_0x9966[182]]= function(_0x668ex1e,_0x668ex24,_0x668ex3c){return db[_0x9966[64]][_0x9966[102]]({where:{id:_0x668ex1e[_0x9966[93]][_0x9966[92]]}})[_0x9966[40]](handleEntityNotFound(_0x668ex24,null))[_0x9966[40]](function(_0x668ex27){if(_0x668ex27){return db[_0x9966[186]][_0x9966[185]](function(_0x668ex4a){return db[_0x9966[181]][_0x9966[57]]({where:{SmsAccountId:_0x668ex1e[_0x9966[93]][_0x9966[92]]},transaction:_0x668ex4a})[_0x9966[40]](function(_0x668ex4b){var _0x668ex4c=_[_0x9966[85]](_0x668ex1e[_0x9966[96]],function(_0x668ex4d){_0x668ex4d[_0x9966[99]]= _0x668ex1e[_0x9966[93]][_0x9966[92]];return _0x668ex4d});return db[_0x9966[181]][_0x9966[184]](_0x668ex4c,{transaction:_0x668ex4a})})})[_0x9966[40]](function(){return db[_0x9966[181]][_0x9966[183]]({where:{SmsAccountId:_0x668ex1e[_0x9966[93]][_0x9966[92]]},order:_0x9966[177]})})}})[_0x9966[40]](respondWithResult(_0x668ex24,null))[_0x9966[31]](handleError(_0x668ex24,null))};exports[_0x9966[187]]= function(_0x668ex1e,_0x668ex27,_0x668ex3c){var _0x668ex2a={};var _0x668ex36={};var _0x668ex4e;var _0x668ex2b;return db[_0x9966[64]][_0x9966[102]]({where:{id:_0x668ex1e[_0x9966[93]][_0x9966[92]]}})[_0x9966[40]](handleEntityNotFound(_0x668ex27,null))[_0x9966[40]](function(_0x668ex27){if(_0x668ex27){_0x668ex4e= _0x668ex27;_0x668ex36[_0x9966[62]]= _[_0x9966[65]](db[_0x9966[181]][_0x9966[63]]);_0x668ex36[_0x9966[67]]= _[_0x9966[65]](_0x668ex1e[_0x9966[67]]);_0x668ex36[_0x9966[69]]= _[_0x9966[70]](_0x668ex36[_0x9966[62]],_0x668ex36[_0x9966[67]]);_0x668ex2a[_0x9966[71]]= _[_0x9966[70]](_0x668ex36[_0x9966[62]],qs[_0x9966[72]](_0x668ex1e[_0x9966[67]][_0x9966[72]]));_0x668ex2a[_0x9966[71]]= (_0x668ex2a[_0x9966[71]][_0x9966[73]])?_0x668ex2a[_0x9966[71]]:_0x668ex36[_0x9966[62]];_0x668ex2a[_0x9966[76]]= qs[_0x9966[77]](_0x668ex1e[_0x9966[67]][_0x9966[77]]);_0x668ex2a[_0x9966[78]]= qs[_0x9966[69]](_[_0x9966[79]](_0x668ex1e[_0x9966[67]],_0x668ex36[_0x9966[69]]));if(_0x668ex1e[_0x9966[67]][_0x9966[83]]){_0x668ex2a[_0x9966[78]]= _[_0x9966[82]](_0x668ex2a[_0x9966[78]],{$or:_[_0x9966[85]](_0x668ex2a[_0x9966[71]],function(_0x668ex39){var _0x668ex37={};_0x668ex37[_0x668ex39]= {$like:_0x9966[84]+ _0x668ex1e[_0x9966[67]][_0x9966[83]]+ _0x9966[84]};return _0x668ex37})})};_0x668ex2a= _[_0x9966[82]]({},_0x668ex2a,_0x668ex1e[_0x9966[86]]);return _0x668ex4e[_0x9966[187]](_0x668ex2a)}})[_0x9966[40]](function(_0x668ex3e){if(_0x668ex3e){_0x668ex2b= _0x668ex3e[_0x9966[73]];if(!_0x668ex1e[_0x9966[67]][_0x9966[75]](_0x9966[74])){_0x668ex2a[_0x9966[48]]= qs[_0x9966[48]](_0x668ex1e[_0x9966[67]][_0x9966[48]]);_0x668ex2a[_0x9966[47]]= qs[_0x9966[47]](_0x668ex1e[_0x9966[67]][_0x9966[47]])};return _0x668ex4e[_0x9966[187]](_0x668ex2a)}})[_0x9966[40]](function(_0x668ex3b){if(_0x668ex3b){return _0x668ex3b?{count:_0x668ex2b,rows:_0x668ex3b}:null}})[_0x9966[40]](respondWithResult(_0x668ex27,null))[_0x9966[31]](handleError(_0x668ex27,null))};exports[_0x9966[188]]= function(_0x668ex1e,_0x668ex24,_0x668ex3c){if(_0x668ex1e[_0x9966[96]][_0x9966[92]]){delete _0x668ex1e[_0x9966[96]][_0x9966[92]]};return db[_0x9966[64]][_0x9966[94]]({where:{id:_0x668ex1e[_0x9966[93]][_0x9966[92]]}})[_0x9966[40]](handleEntityNotFound(_0x668ex24,null))[_0x9966[40]](function(_0x668ex27){if(_0x668ex27){_0x668ex1e[_0x9966[96]][_0x9966[99]]= _0x668ex27[_0x9966[92]];return db[_0x9966[189]][_0x9966[95]](_0x668ex1e[_0x9966[96]])}})[_0x9966[40]](respondWithResult(_0x668ex24,null))[_0x9966[31]](handleError(_0x668ex24,null))};exports[_0x9966[190]]= function(_0x668ex1e,_0x668ex24,_0x668ex3c){return db[_0x9966[191]][_0x9966[94]]({where:{id:_0x668ex1e[_0x9966[93]][_0x9966[92]]}})[_0x9966[40]](handleEntityNotFound(_0x668ex24,null))[_0x9966[40]](function(_0x668ex27){if(_0x668ex27){return _0x668ex27[_0x9966[190]](_0x668ex1e[_0x9966[96]][_0x9966[104]],_[_0x9966[144]](_0x668ex1e[_0x9966[96]],[_0x9966[104],_0x9966[92]])|| {})}})[_0x9966[40]](respondWithResult(_0x668ex24,null))[_0x9966[31]](handleError(_0x668ex24,null))};exports[_0x9966[192]]= function(_0x668ex1e,_0x668ex27,_0x668ex3c){var _0x668ex2a={};var _0x668ex36={};var _0x668ex4e;var _0x668ex2b;return db[_0x9966[64]][_0x9966[102]]({where:{id:_0x668ex1e[_0x9966[93]][_0x9966[92]]}})[_0x9966[40]](handleEntityNotFound(_0x668ex27,null))[_0x9966[40]](function(_0x668ex27){if(_0x668ex27){_0x668ex4e= _0x668ex27;_0x668ex36[_0x9966[62]]= _[_0x9966[65]](db[_0x9966[189]][_0x9966[63]]);_0x668ex36[_0x9966[67]]= _[_0x9966[65]](_0x668ex1e[_0x9966[67]]);_0x668ex36[_0x9966[69]]= _[_0x9966[70]](_0x668ex36[_0x9966[62]],_0x668ex36[_0x9966[67]]);_0x668ex2a[_0x9966[71]]= _[_0x9966[70]](_0x668ex36[_0x9966[62]],qs[_0x9966[72]](_0x668ex1e[_0x9966[67]][_0x9966[72]]));_0x668ex2a[_0x9966[71]]= (_0x668ex2a[_0x9966[71]][_0x9966[73]])?_0x668ex2a[_0x9966[71]]:_0x668ex36[_0x9966[62]];_0x668ex2a[_0x9966[76]]= qs[_0x9966[77]](_0x668ex1e[_0x9966[67]][_0x9966[77]]);_0x668ex2a[_0x9966[78]]= qs[_0x9966[69]](_[_0x9966[79]](_0x668ex1e[_0x9966[67]],_0x668ex36[_0x9966[69]]));if(_0x668ex1e[_0x9966[67]][_0x9966[83]]){_0x668ex2a[_0x9966[78]]= _[_0x9966[82]](_0x668ex2a[_0x9966[78]],{$or:_[_0x9966[85]](_0x668ex2a[_0x9966[71]],function(_0x668ex39){var _0x668ex37={};_0x668ex37[_0x668ex39]= {$like:_0x9966[84]+ _0x668ex1e[_0x9966[67]][_0x9966[83]]+ _0x9966[84]};return _0x668ex37})})};_0x668ex2a= _[_0x9966[82]]({},_0x668ex2a,_0x668ex1e[_0x9966[86]]);return _0x668ex4e[_0x9966[192]](_0x668ex2a)}})[_0x9966[40]](function(_0x668ex3e){if(_0x668ex3e){_0x668ex2b= _0x668ex3e[_0x9966[73]];if(!_0x668ex1e[_0x9966[67]][_0x9966[75]](_0x9966[74])){_0x668ex2a[_0x9966[48]]= qs[_0x9966[48]](_0x668ex1e[_0x9966[67]][_0x9966[48]]);_0x668ex2a[_0x9966[47]]= qs[_0x9966[47]](_0x668ex1e[_0x9966[67]][_0x9966[47]])};return _0x668ex4e[_0x9966[192]](_0x668ex2a)}})[_0x9966[40]](function(_0x668ex3b){if(_0x668ex3b){return _0x668ex3b?{count:_0x668ex2b,rows:_0x668ex3b}:null}})[_0x9966[40]](respondWithResult(_0x668ex27,null))[_0x9966[31]](handleError(_0x668ex27,null))};exports[_0x9966[193]]= function(_0x668ex1e,_0x668ex24,_0x668ex3c){var _0x668ex2a={raw:false,where:{}};var _0x668ex36={};var _0x668ex3d={count:0,rows:[]};return db[_0x9966[64]][_0x9966[102]]({where:{id:_0x668ex1e[_0x9966[93]][_0x9966[92]]}})[_0x9966[40]](handleEntityNotFound(_0x668ex24,null))[_0x9966[40]](function(_0x668ex27){if(_0x668ex27){_0x668ex36[_0x9966[62]]= _[_0x9966[65]](db[_0x9966[141]][_0x9966[63]]);_0x668ex36[_0x9966[67]]= _[_0x9966[65]](_0x668ex1e[_0x9966[67]]);_0x668ex36[_0x9966[69]]= _[_0x9966[70]](_0x668ex36[_0x9966[62]],_0x668ex36[_0x9966[67]]);_0x668ex2a[_0x9966[71]]= _[_0x9966[70]](_0x668ex36[_0x9966[62]],qs[_0x9966[72]](_0x668ex1e[_0x9966[67]][_0x9966[72]]));_0x668ex2a[_0x9966[71]]= (_0x668ex2a[_0x9966[71]][_0x9966[73]])?_0x668ex2a[_0x9966[71]]:_0x668ex36[_0x9966[62]];if(!_0x668ex1e[_0x9966[67]][_0x9966[75]](_0x9966[74])){_0x668ex2a[_0x9966[48]]= qs[_0x9966[48]](_0x668ex1e[_0x9966[67]][_0x9966[48]]);_0x668ex2a[_0x9966[47]]= qs[_0x9966[47]](_0x668ex1e[_0x9966[67]][_0x9966[47]])};_0x668ex2a[_0x9966[76]]= qs[_0x9966[77]](_0x668ex1e[_0x9966[67]][_0x9966[77]]);_0x668ex2a[_0x9966[78]]= qs[_0x9966[69]](_[_0x9966[79]](_0x668ex1e[_0x9966[67]],_0x668ex36[_0x9966[69]]));_0x668ex2a[_0x9966[78]][_0x9966[99]]= _0x668ex27[_0x9966[92]];if(_0x668ex1e[_0x9966[67]][_0x9966[83]]){_0x668ex2a[_0x9966[78]]= _[_0x9966[82]](_0x668ex2a[_0x9966[78]],{$or:_[_0x9966[85]](_0x668ex2a[_0x9966[71]],function(_0x668ex39){var _0x668ex37={};_0x668ex37[_0x668ex39]= {$like:_0x9966[84]+ _0x668ex1e[_0x9966[67]][_0x9966[83]]+ _0x9966[84]};return _0x668ex37})})};_0x668ex2a= _[_0x9966[82]]({},_0x668ex2a,_0x668ex1e[_0x9966[86]]);return db[_0x9966[141]][_0x9966[46]]({where:_0x668ex2a[_0x9966[78]]})[_0x9966[40]](function(_0x668ex2b){_0x668ex3d[_0x9966[46]]= _0x668ex2b;if(_0x668ex1e[_0x9966[67]][_0x9966[88]]){_0x668ex2a[_0x9966[89]]= [{model:db[_0x9966[147]],as:_0x9966[194],required:false},{model:db[_0x9966[126]],as:_0x9966[195],attributes:[_0x9966[59],_0x9966[196],_0x9966[197]],required:false},{model:db[_0x9966[198]],as:_0x9966[199],attributes:[_0x9966[92],_0x9966[59],_0x9966[200]],where:_0x668ex1e[_0x9966[67]][_0x9966[201]]?{id:_0x668ex1e[_0x9966[67]][_0x9966[201]]}:undefined,required:_0x668ex1e[_0x9966[67]][_0x9966[201]]?true:false}]};return db[_0x9966[141]][_0x9966[90]](_0x668ex2a)})[_0x9966[40]](function(_0x668ex3b){_0x668ex3d[_0x9966[87]]= _0x668ex3b;return _0x668ex3d})}})[_0x9966[40]](respondWithFilteredResult(_0x668ex24,_0x668ex2a))[_0x9966[31]](handleError(_0x668ex24,null))};exports[_0x9966[60]]= function(_0x668ex1e,_0x668ex24,_0x668ex3c){var _0x668ex4f,_0x668ex50,_0x668ex51;if(_[_0x9966[168]](_0x668ex1e[_0x9966[96]][_0x9966[96]])|| _0x668ex1e[_0x9966[96]][_0x9966[96]]=== _0x9966[170]){throw  new db[_0x9966[149]].ValidationError(_0x9966[171])};if(_[_0x9966[168]](_0x668ex1e[_0x9966[96]][_0x9966[202]])){throw  new db[_0x9966[149]].ValidationError(_0x9966[203])};_0x668ex4f= _0x668ex1e[_0x9966[96]][_0x9966[202]];return db[_0x9966[64]][_0x9966[94]]({where:{id:_0x668ex1e[_0x9966[93]][_0x9966[92]]},include:[{model:db[_0x9966[176]],as:_0x9966[208],include:[{model:db[_0x9966[147]],as:_0x9966[143],where:{mobile:_0x668ex4f},limit:1,order:[[_0x9966[151],_0x9966[175]]]}]}]})[_0x9966[40]](handleEntityNotFound(_0x668ex24,null))[_0x9966[40]](function(_0x668ex27){if(_0x668ex27&& _0x668ex27[_0x9966[208]]){_0x668ex50= _0x668ex27[_0x9966[127]]({plain:true});if(_0x668ex50[_0x9966[208]]&& _0x668ex50[_0x9966[208]][_0x9966[143]][_0x9966[73]]){return _0x668ex50[_0x9966[208]][_0x9966[143]][0]};return db[_0x9966[147]][_0x9966[95]](_[_0x9966[145]](_0x668ex1e[_0x9966[96]],{firstName:_0x668ex4f,mobile:_0x668ex4f,phone:_0x668ex4f,ListId:_0x668ex50[_0x9966[154]]}))}})[_0x9966[40]](handleEntityNotFound(_0x668ex24,null))[_0x9966[40]](function(_0x668ex27){if(_0x668ex27){_0x668ex51= _0x668ex27;return db[_0x9966[141]][_0x9966[94]]({where:{ContactId:_0x668ex51[_0x9966[92]],closed:false,SmsAccountId:_0x668ex50[_0x9966[92]]}})[_0x9966[40]](function(_0x668ex27){if(_0x668ex27){return [_0x668ex27,false]};return db[_0x9966[141]][_0x9966[95]]({UserId:_0x668ex1e[_0x9966[206]][_0x9966[92]],ContactId:_0x668ex51[_0x9966[92]],SmsAccountId:_0x668ex50[_0x9966[92]],phone:_0x668ex4f,firstMsgDirection:_0x9966[207],Messages:[_[_0x9966[82]](_0x668ex1e[_0x9966[96]],{read:false,body:_0x668ex1e[_0x9966[96]][_0x9966[96]],phone:_0x668ex4f,SmsAccountId:_0x668ex50[_0x9966[92]],UserId:_0x668ex1e[_0x9966[206]][_0x9966[92]],ContactId:_0x668ex51[_0x9966[92]]})]},{include:[{model:db[_0x9966[138]],as:_0x9966[204]}]})[_0x9966[40]](function(_0x668ex47){return [_0x668ex47,true]})})}})[_0x9966[139]](function(_0x668ex27,_0x668ex44){if(_0x668ex44){return _0x668ex27};return db[_0x9966[138]][_0x9966[95]](_[_0x9966[82]](_0x668ex1e[_0x9966[96]],{read:false,body:_0x668ex1e[_0x9966[96]][_0x9966[96]],phone:_0x668ex4f,SmsAccountId:_0x668ex50[_0x9966[92]],SmsInteractionId:_0x668ex27[_0x9966[92]],UserId:_0x668ex1e[_0x9966[206]][_0x9966[92]],ContactId:_0x668ex51[_0x9966[92]]}))[_0x9966[40]](function(_0x668ex52){_0x668ex27[_0x9966[205]][_0x9966[204]]= [];_0x668ex27[_0x9966[205]][_0x9966[204]][_0x9966[131]](_0x668ex52[_0x9966[205]]);return _0x668ex27})})[_0x9966[40]](respondWithResult(_0x668ex24,null))[_0x9966[31]](handleError(_0x668ex24,null))};exports[_0x9966[44]]= function(_0x668ex1e,_0x668ex24,_0x668ex3c){if(_0x668ex1e[_0x9966[96]][_0x9966[92]]){delete _0x668ex1e[_0x9966[96]][_0x9966[92]]};var _0x668ex52,_0x668ex53,_0x668ex54;return db[_0x9966[64]][_0x9966[94]]({where:{id:_0x668ex1e[_0x9966[93]][_0x9966[92]]}})[_0x9966[40]](handleEntityNotFound(_0x668ex24,null))[_0x9966[40]](function(_0x668ex27){if(_0x668ex27){_0x668ex54= _0x668ex27;logger[_0x9966[36]](_0x9966[34],_0x9966[44],_0x9966[213],_0x668ex27[_0x9966[110]],util[_0x9966[210]](_0x668ex1e[_0x9966[96]],{showHidden:false,depth:null}));switch(_0x668ex27[_0x9966[110]]){case _0x9966[161]:if(_0x668ex1e[_0x9966[96]][_0x9966[214]]&& _0x668ex1e[_0x9966[96]][_0x9966[44]]){_0x668ex53= _0x668ex1e[_0x9966[96]][_0x9966[44]];return db[_0x9966[138]][_0x9966[94]]({where:{messageId:_0x668ex1e[_0x9966[96]][_0x9966[214]]}})};break;case _0x9966[162]:if(_0x668ex1e[_0x9966[96]][_0x9966[215]]&& _0x668ex1e[_0x9966[96]][_0x9966[216]]){_0x668ex53= _0x668ex1e[_0x9966[96]][_0x9966[216]];return db[_0x9966[138]][_0x9966[94]]({where:{messageId:_0x668ex1e[_0x9966[96]][_0x9966[215]]}})};break;case _0x9966[164]:if(_0x668ex1e[_0x9966[96]][_0x9966[163]]&& _0x668ex1e[_0x9966[96]][_0x9966[217]]){_0x668ex53= _0x668ex1e[_0x9966[96]][_0x9966[217]];return db[_0x9966[138]][_0x9966[94]]({where:{messageId:_0x668ex1e[_0x9966[96]][_0x9966[163]]}})};break}}})[_0x9966[40]](handleEntityNotFound(_0x668ex24,null))[_0x9966[40]](function(_0x668ex27){if(_0x668ex27){_0x668ex52= _0x668ex27;switch(_0x668ex54[_0x9966[110]]){case _0x9966[161]:if(_0x668ex53=== _0x9966[209]){return _0x668ex52[_0x9966[56]]({read:true})}else {logger[_0x9966[30]](_0x9966[34],_0x9966[44],_0x9966[161],util[_0x9966[210]](_0x668ex1e[_0x9966[96]],{showHidden:false,depth:null}))};break;case _0x9966[162]:if(_0x668ex53=== _0x9966[211]){return _0x668ex52[_0x9966[56]]({read:true})}else {logger[_0x9966[30]](_0x9966[34],_0x9966[44],_0x9966[161],util[_0x9966[210]](_0x668ex1e[_0x9966[96]],{showHidden:false,depth:null}))};break;case _0x9966[164]:if(!_0x668ex1e[_0x9966[96]][_0x9966[212]]&& _0x668ex53>= 200 && _0x668ex53<= 206){return _0x668ex52[_0x9966[56]]({read:true})}else {logger[_0x9966[30]](_0x9966[34],_0x9966[44],_0x9966[164],util[_0x9966[210]](_0x668ex1e[_0x9966[96]],{showHidden:false,depth:null}))};break};return _0x668ex52}})[_0x9966[40]](respondWithResult(_0x668ex24,null))[_0x9966[31]](handleError(_0x668ex24,null))}
\ No newline at end of file
index 6626930..ded5980 100644 (file)
@@ -1 +1 @@
-var _0x1b01=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x1b01[0];var _=require(_0x1b01[1]);var util=require(_0x1b01[2]);var logger=require(_0x1b01[4])(_0x1b01[3]);var moment=require(_0x1b01[5]);var BPromise=require(_0x1b01[6]);var rp=require(_0x1b01[7]);var attributes=require(_0x1b01[8]);module[_0x1b01[9]]= function(_0xcc1dx8,_0xcc1dx9){return _0xcc1dx8[_0x1b01[12]](_0x1b01[10],attributes,{tableName:_0x1b01[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x2cbf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x2cbf[0];var _=require(_0x2cbf[1]);var util=require(_0x2cbf[2]);var logger=require(_0x2cbf[4])(_0x2cbf[3]);var moment=require(_0x2cbf[5]);var BPromise=require(_0x2cbf[6]);var rp=require(_0x2cbf[7]);var attributes=require(_0x2cbf[8]);module[_0x2cbf[9]]= function(_0xcebcx8,_0xcebcx9){return _0xcebcx8[_0x2cbf[12]](_0x2cbf[10],attributes,{tableName:_0x2cbf[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 8690d73..61acefb 100644 (file)
@@ -1 +1 @@
-var _0xe582=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x53\x68\x6F\x77\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74"];_0xe582[0];var _=require(_0xe582[1]);var util=require(_0xe582[2]);var moment=require(_0xe582[3]);var BPromise=require(_0xe582[4]);var rs=require(_0xe582[5]);var fs=require(_0xe582[6]);var db=require(_0xe582[8])[_0xe582[7]];var utils=require(_0xe582[9]);var logger=require(_0xe582[11])(_0xe582[10]);var config=require(_0xe582[12]);var jayson=require(_0xe582[13]);var client=jayson[_0xe582[15]][_0xe582[14]]({port:9002});function respondWithRpcPromise(_0xcf00xe,_0xcf00xf,_0xcf00x10){return  new BPromise(function(_0xcf00x11,_0xcf00x12){return client[_0xe582[28]](_0xcf00xe,_0xcf00x10)[_0xe582[27]](function(_0xcf00x14){logger[_0xe582[20]](_0xe582[16],_0xcf00xf,_0xe582[19]);logger[_0xe582[23]](_0xe582[21],_0xcf00xf,_0xe582[19],JSON[_0xe582[22]](_0xcf00x14));if(_0xcf00x14[_0xe582[17]]){if(_0xcf00x14[_0xe582[17]][_0xe582[24]]=== 500){logger[_0xe582[17]](_0xe582[16],_0xcf00xf,_0xcf00x14[_0xe582[17]][_0xe582[25]]);return _0xcf00x12(_0xcf00x14[_0xe582[17]][_0xe582[25]])};logger[_0xe582[17]](_0xe582[16],_0xcf00xf,_0xcf00x14[_0xe582[17]][_0xe582[25]]);return _0xcf00x11(_0xcf00x14[_0xe582[17]][_0xe582[25]])}else {logger[_0xe582[20]](_0xe582[16],_0xcf00xf,_0xe582[19]);_0xcf00x11(_0xcf00x14[_0xe582[26]][_0xe582[25]])}})[_0xe582[18]](function(_0xcf00x13){logger[_0xe582[17]](_0xe582[16],_0xcf00xf,_0xcf00x13);_0xcf00x12(_0xcf00x13)})})}exports[_0xe582[29]]= function(_0xcf00x10){var _0xcf00x15=this;return  new Promise(function(_0xcf00x11,_0xcf00x12){return db[_0xe582[39]][_0xe582[38]]({raw:_0xcf00x10[_0xe582[30]]?(_0xcf00x10[_0xe582[30]][_0xe582[31]]=== undefined)?true:false:true,where:_0xcf00x10[_0xe582[30]]?_0xcf00x10[_0xe582[30]][_0xe582[32]]|| null:null,attributes:_0xcf00x10[_0xe582[30]]?_0xcf00x10[_0xe582[30]][_0xe582[33]]|| null:null,include:_0xcf00x10[_0xe582[30]]?(_0xcf00x10[_0xe582[30]][_0xe582[34]]?_[_0xe582[37]](_0xcf00x10[_0xe582[30]][_0xe582[34]],function(_0xcf00x16){return {model:db[_0xcf00x16[_0xe582[35]]],as:_0xcf00x16[_0xe582[36]],attributes:_0xcf00x16[_0xe582[33]],include:_0xcf00x16[_0xe582[34]]?_[_0xe582[37]](_0xcf00x16[_0xe582[34]],function(_0xcf00x17){return {model:db[_0xcf00x17[_0xe582[35]]],as:_0xcf00x17[_0xe582[36]],attributes:_0xcf00x17[_0xe582[33]],include:_0xcf00x17[_0xe582[34]]?_[_0xe582[37]](_0xcf00x17[_0xe582[34]],function(_0xcf00x18){return {model:db[_0xcf00x18[_0xe582[35]]],as:_0xcf00x18[_0xe582[36]],attributes:_0xcf00x18[_0xe582[33]]}}):[]}}):[]}}):[]):[]})[_0xe582[27]](function(_0xcf00x14){logger[_0xe582[20]](_0xe582[29],_0xcf00x10);logger[_0xe582[23]](_0xe582[29],_0xcf00x10,JSON[_0xe582[22]](_0xcf00x14));_0xcf00x11(_0xcf00x14)})[_0xe582[18]](function(_0xcf00x13){logger[_0xe582[17]](_0xe582[29],_0xcf00x13[_0xe582[25]],_0xcf00x10);_0xcf00x12(_0xcf00x15[_0xe582[17]](500,_0xcf00x13[_0xe582[25]]))})})}
\ No newline at end of file
+var _0xba82=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x53\x68\x6F\x77\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74"];_0xba82[0];var _=require(_0xba82[1]);var util=require(_0xba82[2]);var moment=require(_0xba82[3]);var BPromise=require(_0xba82[4]);var rs=require(_0xba82[5]);var fs=require(_0xba82[6]);var db=require(_0xba82[8])[_0xba82[7]];var utils=require(_0xba82[9]);var logger=require(_0xba82[11])(_0xba82[10]);var config=require(_0xba82[12]);var jayson=require(_0xba82[13]);var client=jayson[_0xba82[15]][_0xba82[14]]({port:9002});function respondWithRpcPromise(_0xde17xe,_0xde17xf,_0xde17x10){return  new BPromise(function(_0xde17x11,_0xde17x12){return client[_0xba82[28]](_0xde17xe,_0xde17x10)[_0xba82[27]](function(_0xde17x14){logger[_0xba82[20]](_0xba82[16],_0xde17xf,_0xba82[19]);logger[_0xba82[23]](_0xba82[21],_0xde17xf,_0xba82[19],JSON[_0xba82[22]](_0xde17x14));if(_0xde17x14[_0xba82[17]]){if(_0xde17x14[_0xba82[17]][_0xba82[24]]=== 500){logger[_0xba82[17]](_0xba82[16],_0xde17xf,_0xde17x14[_0xba82[17]][_0xba82[25]]);return _0xde17x12(_0xde17x14[_0xba82[17]][_0xba82[25]])};logger[_0xba82[17]](_0xba82[16],_0xde17xf,_0xde17x14[_0xba82[17]][_0xba82[25]]);return _0xde17x11(_0xde17x14[_0xba82[17]][_0xba82[25]])}else {logger[_0xba82[20]](_0xba82[16],_0xde17xf,_0xba82[19]);_0xde17x11(_0xde17x14[_0xba82[26]][_0xba82[25]])}})[_0xba82[18]](function(_0xde17x13){logger[_0xba82[17]](_0xba82[16],_0xde17xf,_0xde17x13);_0xde17x12(_0xde17x13)})})}exports[_0xba82[29]]= function(_0xde17x10){var _0xde17x15=this;return  new Promise(function(_0xde17x11,_0xde17x12){return db[_0xba82[39]][_0xba82[38]]({raw:_0xde17x10[_0xba82[30]]?(_0xde17x10[_0xba82[30]][_0xba82[31]]=== undefined)?true:false:true,where:_0xde17x10[_0xba82[30]]?_0xde17x10[_0xba82[30]][_0xba82[32]]|| null:null,attributes:_0xde17x10[_0xba82[30]]?_0xde17x10[_0xba82[30]][_0xba82[33]]|| null:null,include:_0xde17x10[_0xba82[30]]?(_0xde17x10[_0xba82[30]][_0xba82[34]]?_[_0xba82[37]](_0xde17x10[_0xba82[30]][_0xba82[34]],function(_0xde17x16){return {model:db[_0xde17x16[_0xba82[35]]],as:_0xde17x16[_0xba82[36]],attributes:_0xde17x16[_0xba82[33]],include:_0xde17x16[_0xba82[34]]?_[_0xba82[37]](_0xde17x16[_0xba82[34]],function(_0xde17x17){return {model:db[_0xde17x17[_0xba82[35]]],as:_0xde17x17[_0xba82[36]],attributes:_0xde17x17[_0xba82[33]],include:_0xde17x17[_0xba82[34]]?_[_0xba82[37]](_0xde17x17[_0xba82[34]],function(_0xde17x18){return {model:db[_0xde17x18[_0xba82[35]]],as:_0xde17x18[_0xba82[36]],attributes:_0xde17x18[_0xba82[33]]}}):[]}}):[]}}):[]):[]})[_0xba82[27]](function(_0xde17x14){logger[_0xba82[20]](_0xba82[29],_0xde17x10);logger[_0xba82[23]](_0xba82[29],_0xde17x10,JSON[_0xba82[22]](_0xde17x14));_0xde17x11(_0xde17x14)})[_0xba82[18]](function(_0xde17x13){logger[_0xba82[17]](_0xba82[29],_0xde17x13[_0xba82[25]],_0xde17x10);_0xde17x12(_0xde17x15[_0xba82[17]](500,_0xde17x13[_0xba82[25]]))})})}
\ No newline at end of file
index eace729..f3b6ff4 100644 (file)
@@ -1 +1 @@
-var _0x3c35=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x3c35[0];var multer=require(_0x3c35[1]);var util=require(_0x3c35[2]);var path=require(_0x3c35[3]);var express=require(_0x3c35[4]);var router=express.Router();var auth=require(_0x3c35[5]);var interaction=require(_0x3c35[6]);var config=require(_0x3c35[7]);var controller=require(_0x3c35[8]);router[_0x3c35[12]](_0x3c35[9],auth[_0x3c35[10]](),controller[_0x3c35[11]]);router[_0x3c35[12]](_0x3c35[13],auth[_0x3c35[10]](),controller[_0x3c35[14]]);router[_0x3c35[16]](_0x3c35[9],auth[_0x3c35[10]](),controller[_0x3c35[15]]);router[_0x3c35[18]](_0x3c35[13],auth[_0x3c35[10]](),controller[_0x3c35[17]]);router[_0x3c35[20]](_0x3c35[13],auth[_0x3c35[10]](),controller[_0x3c35[19]]);module[_0x3c35[21]]= router
\ No newline at end of file
+var _0x14ff=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x14ff[0];var multer=require(_0x14ff[1]);var util=require(_0x14ff[2]);var path=require(_0x14ff[3]);var express=require(_0x14ff[4]);var router=express.Router();var auth=require(_0x14ff[5]);var interaction=require(_0x14ff[6]);var config=require(_0x14ff[7]);var controller=require(_0x14ff[8]);router[_0x14ff[12]](_0x14ff[9],auth[_0x14ff[10]](),controller[_0x14ff[11]]);router[_0x14ff[12]](_0x14ff[13],auth[_0x14ff[10]](),controller[_0x14ff[14]]);router[_0x14ff[16]](_0x14ff[9],auth[_0x14ff[10]](),controller[_0x14ff[15]]);router[_0x14ff[18]](_0x14ff[13],auth[_0x14ff[10]](),controller[_0x14ff[17]]);router[_0x14ff[20]](_0x14ff[13],auth[_0x14ff[10]](),controller[_0x14ff[19]]);module[_0x14ff[21]]= router
\ No newline at end of file
index d838051..d339448 100644 (file)
@@ -1 +1 @@
-var _0x900b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x6E\x6F\x6F\x70","","\x2A\x2C\x2A\x2C\x2A\x2C\x2A"];_0x900b[0];var Sequelize=require(_0x900b[1]);module[_0x900b[2]]= {priority:{type:Sequelize[_0x900b[3]],allowNull:false},app:{type:Sequelize[_0x900b[4]],allowNull:false,defaultValue:_0x900b[5]},appdata:{type:Sequelize.STRING(4096),defaultValue:_0x900b[6]},description:{type:Sequelize[_0x900b[4]]},interval:{type:Sequelize[_0x900b[4]],defaultValue:_0x900b[7]}}
\ No newline at end of file
+var _0xfbeb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x6E\x6F\x6F\x70","","\x2A\x2C\x2A\x2C\x2A\x2C\x2A"];_0xfbeb[0];var Sequelize=require(_0xfbeb[1]);module[_0xfbeb[2]]= {priority:{type:Sequelize[_0xfbeb[3]],allowNull:false},app:{type:Sequelize[_0xfbeb[4]],allowNull:false,defaultValue:_0xfbeb[5]},appdata:{type:Sequelize.STRING(4096),defaultValue:_0xfbeb[6]},description:{type:Sequelize[_0xfbeb[4]]},interval:{type:Sequelize[_0xfbeb[4]],defaultValue:_0xfbeb[7]}}
\ No newline at end of file
index 7c33f7f..b87d3c6 100644 (file)
@@ -1 +1 @@
-var _0x93f9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x93f9[0];var jsonpatch=require(_0x93f9[1]);var rp=require(_0x93f9[2]);var moment=require(_0x93f9[3]);var BPromise=require(_0x93f9[4]);var Mustache=require(_0x93f9[5]);var util=require(_0x93f9[6]);var path=require(_0x93f9[7]);var sox=require(_0x93f9[8]);var csv=require(_0x93f9[9]);var ejs=require(_0x93f9[10]);var fs=require(_0x93f9[11]);var _=require(_0x93f9[12]);var squel=require(_0x93f9[13]);var crypto=require(_0x93f9[14]);var jsforce=require(_0x93f9[15]);var deskjs=require(_0x93f9[16]);var toCsv=require(_0x93f9[9]);var querystring=require(_0x93f9[17]);var Papa=require(_0x93f9[18]);var qs=require(_0x93f9[19]);var logger=require(_0x93f9[21])(_0x93f9[20]);var utils=require(_0x93f9[22]);var config=require(_0x93f9[23]);var db=require(_0x93f9[25])[_0x93f9[24]];function respondWithStatusCode(_0x5a38x1a,_0x5a38x1b){_0x5a38x1b= _0x5a38x1b|| 204;return function(_0x5a38x1c){if(_0x5a38x1c){return _0x5a38x1a[_0x93f9[26]](_0x5a38x1b)};return _0x5a38x1a[_0x93f9[28]](_0x5a38x1b)[_0x93f9[27]]()}}function respondWithResult(_0x5a38x1a,_0x5a38x1b){_0x5a38x1b= _0x5a38x1b|| 200;return function(_0x5a38x1c){if(_0x5a38x1c){return _0x5a38x1a[_0x93f9[28]](_0x5a38x1b)[_0x93f9[29]](_0x5a38x1c)}}}function respondWithFilteredResult(_0x5a38x1a,_0x5a38x1f){return function(_0x5a38x1c){if(_0x5a38x1c){var _0x5a38x20=_0x5a38x1c[_0x93f9[30]],_0x5a38x21=_0x5a38x1f[_0x93f9[31]],_0x5a38x22=_0x5a38x1f[_0x93f9[31]]+ _0x5a38x1f[_0x93f9[32]],_0x5a38x1b;if(_0x5a38x22>= _0x5a38x20){_0x5a38x22= _0x5a38x20;_0x5a38x1b= 200}else {_0x5a38x1b= 206};_0x5a38x1a[_0x93f9[28]](_0x5a38x1b);return _0x5a38x1a[_0x93f9[36]](_0x93f9[33],_0x5a38x21+ _0x93f9[34]+ _0x5a38x22+ _0x93f9[35]+ _0x5a38x20)[_0x93f9[29]](_0x5a38x1c)};return null}}function patchUpdates(_0x5a38x24){return function(_0x5a38x1c){try{jsonpatch[_0x93f9[37]](_0x5a38x1c,_0x5a38x24,true)}catch(err){return BPromise[_0x93f9[38]](err)};return _0x5a38x1c[_0x93f9[39]]()}}function saveUpdates(_0x5a38x26,_0x5a38x1b){return function(_0x5a38x1c){if(_0x5a38x1c){return _0x5a38x1c[_0x93f9[41]](_0x5a38x26)[_0x93f9[40]](function(_0x5a38x27){return _0x5a38x27})};return null}}function removeEntity(_0x5a38x1a,_0x5a38x1b){return function(_0x5a38x1c){if(_0x5a38x1c){return _0x5a38x1c[_0x93f9[42]]()[_0x93f9[40]](function(){_0x5a38x1a[_0x93f9[28]](204)[_0x93f9[27]]()})}}}function handleEntityNotFound(_0x5a38x1a,_0x5a38x1b){return function(_0x5a38x1c){if(!_0x5a38x1c){_0x5a38x1a[_0x93f9[26]](404)};return _0x5a38x1c}}function handleError(_0x5a38x1a,_0x5a38x1b){_0x5a38x1b= _0x5a38x1b|| 500;return function(_0x5a38x2b){logger[_0x93f9[44]](_0x5a38x2b[_0x93f9[43]]);if(_0x5a38x2b[_0x93f9[45]]){delete _0x5a38x2b[_0x93f9[45]]};_0x5a38x1a[_0x93f9[28]](_0x5a38x1b)[_0x93f9[46]](_0x5a38x2b)}}exports[_0x93f9[47]]= function(_0x5a38x2c,_0x5a38x1a){var _0x5a38x1f={},_0x5a38x2d={},_0x5a38x2e={count:0,rows:[]};_0x5a38x2d[_0x93f9[48]]= _[_0x93f9[51]](db[_0x93f9[50]][_0x93f9[49]]);var _0x5a38x2f={dateStart:_0x5a38x2c[_0x93f9[53]][_0x93f9[52]],dateEnd:_0x5a38x2c[_0x93f9[53]][_0x93f9[54]]};delete _0x5a38x2c[_0x93f9[53]][_0x93f9[52]];delete _0x5a38x2c[_0x93f9[53]][_0x93f9[54]];_0x5a38x2d[_0x93f9[53]]= _[_0x93f9[51]](_0x5a38x2c[_0x93f9[53]]);_0x5a38x2d[_0x93f9[55]]= _[_0x93f9[56]](_0x5a38x2d[_0x93f9[48]],_0x5a38x2d[_0x93f9[53]]);_0x5a38x1f[_0x93f9[57]]= _[_0x93f9[56]](_0x5a38x2d[_0x93f9[48]],qs[_0x93f9[58]](_0x5a38x2c[_0x93f9[53]][_0x93f9[58]]));_0x5a38x1f[_0x93f9[57]]= (_0x5a38x1f[_0x93f9[57]][_0x93f9[59]])?_0x5a38x1f[_0x93f9[57]]:_0x5a38x2d[_0x93f9[48]];if(!_0x5a38x2c[_0x93f9[53]][_0x93f9[61]](_0x93f9[60])){_0x5a38x1f[_0x93f9[32]]= qs[_0x93f9[32]](_0x5a38x2c[_0x93f9[53]][_0x93f9[32]]);_0x5a38x1f[_0x93f9[31]]= qs[_0x93f9[31]](_0x5a38x2c[_0x93f9[53]][_0x93f9[31]])};_0x5a38x1f[_0x93f9[62]]= qs[_0x93f9[63]](_0x5a38x2c[_0x93f9[53]][_0x93f9[63]]);_0x5a38x1f[_0x93f9[64]]= qs[_0x93f9[55]](_[_0x93f9[65]](_0x5a38x2c[_0x93f9[53]],_0x5a38x2d[_0x93f9[55]]));if(_0x5a38x2f[_0x93f9[52]]){if(_0x5a38x2f[_0x93f9[54]]){_0x5a38x2f[_0x93f9[54]]= moment(_0x5a38x2f[_0x93f9[54]])[_0x93f9[67]](1,_0x93f9[66])}else {_0x5a38x2f[_0x93f9[54]]= moment(_0x5a38x2f[_0x93f9[52]])[_0x93f9[67]](1,_0x93f9[66])};_[_0x93f9[68]](_0x5a38x1f[_0x93f9[64]],{createdAt:{$gte:_0x5a38x2f[_0x93f9[52]],$lte:_0x5a38x2f[_0x93f9[54]]}})};if(_0x5a38x2c[_0x93f9[53]][_0x93f9[69]]){_0x5a38x1f[_0x93f9[64]]= _[_0x93f9[68]](_0x5a38x1f[_0x93f9[64]],{$or:_[_0x93f9[71]](_0x5a38x1f[_0x93f9[57]],function(_0x5a38x30){var _0x5a38x2e={};_0x5a38x2e[_0x5a38x30]= {$like:_0x93f9[70]+ _0x5a38x2c[_0x93f9[53]][_0x93f9[69]]+ _0x93f9[70]};return _0x5a38x2e})})};_0x5a38x1f= _[_0x93f9[68]]({},_0x5a38x1f,_0x5a38x2c[_0x93f9[72]]);var _0x5a38x31={where:_0x5a38x1f[_0x93f9[64]]};return db[_0x93f9[50]][_0x93f9[30]](_0x5a38x31)[_0x93f9[40]](function(_0x5a38x20){_0x5a38x2e[_0x93f9[30]]= _0x5a38x20;if(_0x5a38x2c[_0x93f9[53]][_0x93f9[75]]){_0x5a38x1f[_0x93f9[76]]= [{all:true}]};return db[_0x93f9[50]][_0x93f9[77]](_0x5a38x1f)})[_0x93f9[40]](function(_0x5a38x32){_0x5a38x2e[_0x93f9[74]]= _0x5a38x32;return _0x5a38x2e})[_0x93f9[40]](respondWithFilteredResult(_0x5a38x1a,_0x5a38x1f))[_0x93f9[73]](handleError(_0x5a38x1a,null))};exports[_0x93f9[78]]= function(_0x5a38x2c,_0x5a38x1a){var _0x5a38x1f={raw:true,where:{id:_0x5a38x2c[_0x93f9[80]][_0x93f9[79]]}},_0x5a38x2d={};_0x5a38x2d[_0x93f9[48]]= _[_0x93f9[51]](db[_0x93f9[50]][_0x93f9[49]]);_0x5a38x2d[_0x93f9[53]]= _[_0x93f9[51]](_0x5a38x2c[_0x93f9[53]]);_0x5a38x2d[_0x93f9[55]]= _[_0x93f9[56]](_0x5a38x2d[_0x93f9[48]],_0x5a38x2d[_0x93f9[53]]);_0x5a38x1f[_0x93f9[57]]= _[_0x93f9[56]](_0x5a38x2d[_0x93f9[48]],qs[_0x93f9[58]](_0x5a38x2c[_0x93f9[53]][_0x93f9[58]]));_0x5a38x1f[_0x93f9[57]]= (_0x5a38x1f[_0x93f9[57]][_0x93f9[59]])?_0x5a38x1f[_0x93f9[57]]:_0x5a38x2d[_0x93f9[48]];if(_0x5a38x2c[_0x93f9[53]][_0x93f9[75]]){_0x5a38x1f[_0x93f9[76]]= [{all:true}]};_0x5a38x1f= _[_0x93f9[68]]({},_0x5a38x1f,_0x5a38x2c[_0x93f9[72]]);return db[_0x93f9[50]][_0x93f9[81]](_0x5a38x1f)[_0x93f9[40]](handleEntityNotFound(_0x5a38x1a,null))[_0x93f9[40]](respondWithResult(_0x5a38x1a,null))[_0x93f9[73]](handleError(_0x5a38x1a,null))};exports[_0x93f9[82]]= function(_0x5a38x2c,_0x5a38x1a){return db[_0x93f9[50]][_0x93f9[82]](_0x5a38x2c[_0x93f9[83]],{})[_0x93f9[40]](respondWithResult(_0x5a38x1a,201))[_0x93f9[73]](handleError(_0x5a38x1a,null))};exports[_0x93f9[41]]= function(_0x5a38x2c,_0x5a38x1a){if(_0x5a38x2c[_0x93f9[83]][_0x93f9[79]]){delete _0x5a38x2c[_0x93f9[83]][_0x93f9[79]]};return db[_0x93f9[50]][_0x93f9[81]]({where:{id:_0x5a38x2c[_0x93f9[80]][_0x93f9[79]]}})[_0x93f9[40]](handleEntityNotFound(_0x5a38x1a,null))[_0x93f9[40]](saveUpdates(_0x5a38x2c[_0x93f9[83]],null))[_0x93f9[40]](respondWithResult(_0x5a38x1a,null))[_0x93f9[73]](handleError(_0x5a38x1a,null))};exports[_0x93f9[42]]= function(_0x5a38x2c,_0x5a38x1a){return db[_0x93f9[50]][_0x93f9[81]]({where:{id:_0x5a38x2c[_0x93f9[80]][_0x93f9[79]]}})[_0x93f9[40]](handleEntityNotFound(_0x5a38x1a,null))[_0x93f9[40]](removeEntity(_0x5a38x1a,null))[_0x93f9[73]](handleError(_0x5a38x1a,null))}
\ No newline at end of file
+var _0xcec7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xcec7[0];var jsonpatch=require(_0xcec7[1]);var rp=require(_0xcec7[2]);var moment=require(_0xcec7[3]);var BPromise=require(_0xcec7[4]);var Mustache=require(_0xcec7[5]);var util=require(_0xcec7[6]);var path=require(_0xcec7[7]);var sox=require(_0xcec7[8]);var csv=require(_0xcec7[9]);var ejs=require(_0xcec7[10]);var fs=require(_0xcec7[11]);var _=require(_0xcec7[12]);var squel=require(_0xcec7[13]);var crypto=require(_0xcec7[14]);var jsforce=require(_0xcec7[15]);var deskjs=require(_0xcec7[16]);var toCsv=require(_0xcec7[9]);var querystring=require(_0xcec7[17]);var Papa=require(_0xcec7[18]);var qs=require(_0xcec7[19]);var logger=require(_0xcec7[21])(_0xcec7[20]);var utils=require(_0xcec7[22]);var config=require(_0xcec7[23]);var db=require(_0xcec7[25])[_0xcec7[24]];function respondWithStatusCode(_0xcb59x1a,_0xcb59x1b){_0xcb59x1b= _0xcb59x1b|| 204;return function(_0xcb59x1c){if(_0xcb59x1c){return _0xcb59x1a[_0xcec7[26]](_0xcb59x1b)};return _0xcb59x1a[_0xcec7[28]](_0xcb59x1b)[_0xcec7[27]]()}}function respondWithResult(_0xcb59x1a,_0xcb59x1b){_0xcb59x1b= _0xcb59x1b|| 200;return function(_0xcb59x1c){if(_0xcb59x1c){return _0xcb59x1a[_0xcec7[28]](_0xcb59x1b)[_0xcec7[29]](_0xcb59x1c)}}}function respondWithFilteredResult(_0xcb59x1a,_0xcb59x1f){return function(_0xcb59x1c){if(_0xcb59x1c){var _0xcb59x20=_0xcb59x1c[_0xcec7[30]],_0xcb59x21=_0xcb59x1f[_0xcec7[31]],_0xcb59x22=_0xcb59x1f[_0xcec7[31]]+ _0xcb59x1f[_0xcec7[32]],_0xcb59x1b;if(_0xcb59x22>= _0xcb59x20){_0xcb59x22= _0xcb59x20;_0xcb59x1b= 200}else {_0xcb59x1b= 206};_0xcb59x1a[_0xcec7[28]](_0xcb59x1b);return _0xcb59x1a[_0xcec7[36]](_0xcec7[33],_0xcb59x21+ _0xcec7[34]+ _0xcb59x22+ _0xcec7[35]+ _0xcb59x20)[_0xcec7[29]](_0xcb59x1c)};return null}}function patchUpdates(_0xcb59x24){return function(_0xcb59x1c){try{jsonpatch[_0xcec7[37]](_0xcb59x1c,_0xcb59x24,true)}catch(err){return BPromise[_0xcec7[38]](err)};return _0xcb59x1c[_0xcec7[39]]()}}function saveUpdates(_0xcb59x26,_0xcb59x1b){return function(_0xcb59x1c){if(_0xcb59x1c){return _0xcb59x1c[_0xcec7[41]](_0xcb59x26)[_0xcec7[40]](function(_0xcb59x27){return _0xcb59x27})};return null}}function removeEntity(_0xcb59x1a,_0xcb59x1b){return function(_0xcb59x1c){if(_0xcb59x1c){return _0xcb59x1c[_0xcec7[42]]()[_0xcec7[40]](function(){_0xcb59x1a[_0xcec7[28]](204)[_0xcec7[27]]()})}}}function handleEntityNotFound(_0xcb59x1a,_0xcb59x1b){return function(_0xcb59x1c){if(!_0xcb59x1c){_0xcb59x1a[_0xcec7[26]](404)};return _0xcb59x1c}}function handleError(_0xcb59x1a,_0xcb59x1b){_0xcb59x1b= _0xcb59x1b|| 500;return function(_0xcb59x2b){logger[_0xcec7[44]](_0xcb59x2b[_0xcec7[43]]);if(_0xcb59x2b[_0xcec7[45]]){delete _0xcb59x2b[_0xcec7[45]]};_0xcb59x1a[_0xcec7[28]](_0xcb59x1b)[_0xcec7[46]](_0xcb59x2b)}}exports[_0xcec7[47]]= function(_0xcb59x2c,_0xcb59x1a){var _0xcb59x1f={},_0xcb59x2d={},_0xcb59x2e={count:0,rows:[]};_0xcb59x2d[_0xcec7[48]]= _[_0xcec7[51]](db[_0xcec7[50]][_0xcec7[49]]);var _0xcb59x2f={dateStart:_0xcb59x2c[_0xcec7[53]][_0xcec7[52]],dateEnd:_0xcb59x2c[_0xcec7[53]][_0xcec7[54]]};delete _0xcb59x2c[_0xcec7[53]][_0xcec7[52]];delete _0xcb59x2c[_0xcec7[53]][_0xcec7[54]];_0xcb59x2d[_0xcec7[53]]= _[_0xcec7[51]](_0xcb59x2c[_0xcec7[53]]);_0xcb59x2d[_0xcec7[55]]= _[_0xcec7[56]](_0xcb59x2d[_0xcec7[48]],_0xcb59x2d[_0xcec7[53]]);_0xcb59x1f[_0xcec7[57]]= _[_0xcec7[56]](_0xcb59x2d[_0xcec7[48]],qs[_0xcec7[58]](_0xcb59x2c[_0xcec7[53]][_0xcec7[58]]));_0xcb59x1f[_0xcec7[57]]= (_0xcb59x1f[_0xcec7[57]][_0xcec7[59]])?_0xcb59x1f[_0xcec7[57]]:_0xcb59x2d[_0xcec7[48]];if(!_0xcb59x2c[_0xcec7[53]][_0xcec7[61]](_0xcec7[60])){_0xcb59x1f[_0xcec7[32]]= qs[_0xcec7[32]](_0xcb59x2c[_0xcec7[53]][_0xcec7[32]]);_0xcb59x1f[_0xcec7[31]]= qs[_0xcec7[31]](_0xcb59x2c[_0xcec7[53]][_0xcec7[31]])};_0xcb59x1f[_0xcec7[62]]= qs[_0xcec7[63]](_0xcb59x2c[_0xcec7[53]][_0xcec7[63]]);_0xcb59x1f[_0xcec7[64]]= qs[_0xcec7[55]](_[_0xcec7[65]](_0xcb59x2c[_0xcec7[53]],_0xcb59x2d[_0xcec7[55]]));if(_0xcb59x2f[_0xcec7[52]]){if(_0xcb59x2f[_0xcec7[54]]){_0xcb59x2f[_0xcec7[54]]= moment(_0xcb59x2f[_0xcec7[54]])[_0xcec7[67]](1,_0xcec7[66])}else {_0xcb59x2f[_0xcec7[54]]= moment(_0xcb59x2f[_0xcec7[52]])[_0xcec7[67]](1,_0xcec7[66])};_[_0xcec7[68]](_0xcb59x1f[_0xcec7[64]],{createdAt:{$gte:_0xcb59x2f[_0xcec7[52]],$lte:_0xcb59x2f[_0xcec7[54]]}})};if(_0xcb59x2c[_0xcec7[53]][_0xcec7[69]]){_0xcb59x1f[_0xcec7[64]]= _[_0xcec7[68]](_0xcb59x1f[_0xcec7[64]],{$or:_[_0xcec7[71]](_0xcb59x1f[_0xcec7[57]],function(_0xcb59x30){var _0xcb59x2e={};_0xcb59x2e[_0xcb59x30]= {$like:_0xcec7[70]+ _0xcb59x2c[_0xcec7[53]][_0xcec7[69]]+ _0xcec7[70]};return _0xcb59x2e})})};_0xcb59x1f= _[_0xcec7[68]]({},_0xcb59x1f,_0xcb59x2c[_0xcec7[72]]);var _0xcb59x31={where:_0xcb59x1f[_0xcec7[64]]};return db[_0xcec7[50]][_0xcec7[30]](_0xcb59x31)[_0xcec7[40]](function(_0xcb59x20){_0xcb59x2e[_0xcec7[30]]= _0xcb59x20;if(_0xcb59x2c[_0xcec7[53]][_0xcec7[75]]){_0xcb59x1f[_0xcec7[76]]= [{all:true}]};return db[_0xcec7[50]][_0xcec7[77]](_0xcb59x1f)})[_0xcec7[40]](function(_0xcb59x32){_0xcb59x2e[_0xcec7[74]]= _0xcb59x32;return _0xcb59x2e})[_0xcec7[40]](respondWithFilteredResult(_0xcb59x1a,_0xcb59x1f))[_0xcec7[73]](handleError(_0xcb59x1a,null))};exports[_0xcec7[78]]= function(_0xcb59x2c,_0xcb59x1a){var _0xcb59x1f={raw:true,where:{id:_0xcb59x2c[_0xcec7[80]][_0xcec7[79]]}},_0xcb59x2d={};_0xcb59x2d[_0xcec7[48]]= _[_0xcec7[51]](db[_0xcec7[50]][_0xcec7[49]]);_0xcb59x2d[_0xcec7[53]]= _[_0xcec7[51]](_0xcb59x2c[_0xcec7[53]]);_0xcb59x2d[_0xcec7[55]]= _[_0xcec7[56]](_0xcb59x2d[_0xcec7[48]],_0xcb59x2d[_0xcec7[53]]);_0xcb59x1f[_0xcec7[57]]= _[_0xcec7[56]](_0xcb59x2d[_0xcec7[48]],qs[_0xcec7[58]](_0xcb59x2c[_0xcec7[53]][_0xcec7[58]]));_0xcb59x1f[_0xcec7[57]]= (_0xcb59x1f[_0xcec7[57]][_0xcec7[59]])?_0xcb59x1f[_0xcec7[57]]:_0xcb59x2d[_0xcec7[48]];if(_0xcb59x2c[_0xcec7[53]][_0xcec7[75]]){_0xcb59x1f[_0xcec7[76]]= [{all:true}]};_0xcb59x1f= _[_0xcec7[68]]({},_0xcb59x1f,_0xcb59x2c[_0xcec7[72]]);return db[_0xcec7[50]][_0xcec7[81]](_0xcb59x1f)[_0xcec7[40]](handleEntityNotFound(_0xcb59x1a,null))[_0xcec7[40]](respondWithResult(_0xcb59x1a,null))[_0xcec7[73]](handleError(_0xcb59x1a,null))};exports[_0xcec7[82]]= function(_0xcb59x2c,_0xcb59x1a){return db[_0xcec7[50]][_0xcec7[82]](_0xcb59x2c[_0xcec7[83]],{})[_0xcec7[40]](respondWithResult(_0xcb59x1a,201))[_0xcec7[73]](handleError(_0xcb59x1a,null))};exports[_0xcec7[41]]= function(_0xcb59x2c,_0xcb59x1a){if(_0xcb59x2c[_0xcec7[83]][_0xcec7[79]]){delete _0xcb59x2c[_0xcec7[83]][_0xcec7[79]]};return db[_0xcec7[50]][_0xcec7[81]]({where:{id:_0xcb59x2c[_0xcec7[80]][_0xcec7[79]]}})[_0xcec7[40]](handleEntityNotFound(_0xcb59x1a,null))[_0xcec7[40]](saveUpdates(_0xcb59x2c[_0xcec7[83]],null))[_0xcec7[40]](respondWithResult(_0xcb59x1a,null))[_0xcec7[73]](handleError(_0xcb59x1a,null))};exports[_0xcec7[42]]= function(_0xcb59x2c,_0xcb59x1a){return db[_0xcec7[50]][_0xcec7[81]]({where:{id:_0xcb59x2c[_0xcec7[80]][_0xcec7[79]]}})[_0xcec7[40]](handleEntityNotFound(_0xcb59x1a,null))[_0xcec7[40]](removeEntity(_0xcb59x1a,null))[_0xcec7[73]](handleError(_0xcb59x1a,null))}
\ No newline at end of file
index e70935c..36255e4 100644 (file)
@@ -1 +1 @@
-var _0x81de=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x73\x6D\x73\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x81de[0];var _=require(_0x81de[1]);var util=require(_0x81de[2]);var logger=require(_0x81de[4])(_0x81de[3]);var moment=require(_0x81de[5]);var BPromise=require(_0x81de[6]);var rp=require(_0x81de[7]);var attributes=require(_0x81de[8]);module[_0x81de[9]]= function(_0x31b9x8,_0x31b9x9){return _0x31b9x8[_0x81de[12]](_0x81de[10],attributes,{tableName:_0x81de[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x1dbb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x73\x6D\x73\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x1dbb[0];var _=require(_0x1dbb[1]);var util=require(_0x1dbb[2]);var logger=require(_0x1dbb[4])(_0x1dbb[3]);var moment=require(_0x1dbb[5]);var BPromise=require(_0x1dbb[6]);var rp=require(_0x1dbb[7]);var attributes=require(_0x1dbb[8]);module[_0x1dbb[9]]= function(_0x6ab2x8,_0x6ab2x9){return _0x6ab2x8[_0x1dbb[12]](_0x1dbb[10],attributes,{tableName:_0x1dbb[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 9c1f741..c38145e 100644 (file)
@@ -1 +1 @@
-var _0xb3a6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xb3a6[0];var _=require(_0xb3a6[1]);var util=require(_0xb3a6[2]);var moment=require(_0xb3a6[3]);var BPromise=require(_0xb3a6[4]);var rs=require(_0xb3a6[5]);var fs=require(_0xb3a6[6]);var db=require(_0xb3a6[8])[_0xb3a6[7]];var utils=require(_0xb3a6[9]);var logger=require(_0xb3a6[11])(_0xb3a6[10]);var config=require(_0xb3a6[12]);var jayson=require(_0xb3a6[13]);var client=jayson[_0xb3a6[15]][_0xb3a6[14]]({port:9002});function respondWithRpcPromise(_0x4412xe,_0x4412xf,_0x4412x10){return  new BPromise(function(_0x4412x11,_0x4412x12){return client[_0xb3a6[28]](_0x4412xe,_0x4412x10)[_0xb3a6[27]](function(_0x4412x14){logger[_0xb3a6[20]](_0xb3a6[16],_0x4412xf,_0xb3a6[19]);logger[_0xb3a6[23]](_0xb3a6[21],_0x4412xf,_0xb3a6[19],JSON[_0xb3a6[22]](_0x4412x14));if(_0x4412x14[_0xb3a6[17]]){if(_0x4412x14[_0xb3a6[17]][_0xb3a6[24]]=== 500){logger[_0xb3a6[17]](_0xb3a6[16],_0x4412xf,_0x4412x14[_0xb3a6[17]][_0xb3a6[25]]);return _0x4412x12(_0x4412x14[_0xb3a6[17]][_0xb3a6[25]])};logger[_0xb3a6[17]](_0xb3a6[16],_0x4412xf,_0x4412x14[_0xb3a6[17]][_0xb3a6[25]]);return _0x4412x11(_0x4412x14[_0xb3a6[17]][_0xb3a6[25]])}else {logger[_0xb3a6[20]](_0xb3a6[16],_0x4412xf,_0xb3a6[19]);_0x4412x11(_0x4412x14[_0xb3a6[26]][_0xb3a6[25]])}})[_0xb3a6[18]](function(_0x4412x13){logger[_0xb3a6[17]](_0xb3a6[16],_0x4412xf,_0x4412x13);_0x4412x12(_0x4412x13)})})}
\ No newline at end of file
+var _0x7739=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x7739[0];var _=require(_0x7739[1]);var util=require(_0x7739[2]);var moment=require(_0x7739[3]);var BPromise=require(_0x7739[4]);var rs=require(_0x7739[5]);var fs=require(_0x7739[6]);var db=require(_0x7739[8])[_0x7739[7]];var utils=require(_0x7739[9]);var logger=require(_0x7739[11])(_0x7739[10]);var config=require(_0x7739[12]);var jayson=require(_0x7739[13]);var client=jayson[_0x7739[15]][_0x7739[14]]({port:9002});function respondWithRpcPromise(_0xe3e1xe,_0xe3e1xf,_0xe3e1x10){return  new BPromise(function(_0xe3e1x11,_0xe3e1x12){return client[_0x7739[28]](_0xe3e1xe,_0xe3e1x10)[_0x7739[27]](function(_0xe3e1x14){logger[_0x7739[20]](_0x7739[16],_0xe3e1xf,_0x7739[19]);logger[_0x7739[23]](_0x7739[21],_0xe3e1xf,_0x7739[19],JSON[_0x7739[22]](_0xe3e1x14));if(_0xe3e1x14[_0x7739[17]]){if(_0xe3e1x14[_0x7739[17]][_0x7739[24]]=== 500){logger[_0x7739[17]](_0x7739[16],_0xe3e1xf,_0xe3e1x14[_0x7739[17]][_0x7739[25]]);return _0xe3e1x12(_0xe3e1x14[_0x7739[17]][_0x7739[25]])};logger[_0x7739[17]](_0x7739[16],_0xe3e1xf,_0xe3e1x14[_0x7739[17]][_0x7739[25]]);return _0xe3e1x11(_0xe3e1x14[_0x7739[17]][_0x7739[25]])}else {logger[_0x7739[20]](_0x7739[16],_0xe3e1xf,_0x7739[19]);_0xe3e1x11(_0xe3e1x14[_0x7739[26]][_0x7739[25]])}})[_0x7739[18]](function(_0xe3e1x13){logger[_0x7739[17]](_0x7739[16],_0xe3e1xf,_0xe3e1x13);_0xe3e1x12(_0xe3e1x13)})})}
\ No newline at end of file
index 732e44d..d737ffd 100644 (file)
@@ -1 +1 @@
-var _0xbf54=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x73\x68\x6F\x77","\x67\x65\x74","\x2F","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xbf54[0];var multer=require(_0xbf54[1]);var util=require(_0xbf54[2]);var path=require(_0xbf54[3]);var express=require(_0xbf54[4]);var router=express.Router();var auth=require(_0xbf54[5]);var interaction=require(_0xbf54[6]);var config=require(_0xbf54[7]);var controller=require(_0xbf54[8]);router[_0xbf54[12]](_0xbf54[9],auth[_0xbf54[10]](),controller[_0xbf54[11]]);router[_0xbf54[15]](_0xbf54[13],auth[_0xbf54[10]](),controller[_0xbf54[14]]);router[_0xbf54[17]](_0xbf54[9],auth[_0xbf54[10]](),controller[_0xbf54[16]]);router[_0xbf54[19]](_0xbf54[9],auth[_0xbf54[10]](),controller[_0xbf54[18]]);module[_0xbf54[20]]= router
\ No newline at end of file
+var _0x1898=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F\x3A\x69\x64","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x73\x68\x6F\x77","\x67\x65\x74","\x2F","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x1898[0];var multer=require(_0x1898[1]);var util=require(_0x1898[2]);var path=require(_0x1898[3]);var express=require(_0x1898[4]);var router=express.Router();var auth=require(_0x1898[5]);var interaction=require(_0x1898[6]);var config=require(_0x1898[7]);var controller=require(_0x1898[8]);router[_0x1898[12]](_0x1898[9],auth[_0x1898[10]](),controller[_0x1898[11]]);router[_0x1898[15]](_0x1898[13],auth[_0x1898[10]](),controller[_0x1898[14]]);router[_0x1898[17]](_0x1898[9],auth[_0x1898[10]](),controller[_0x1898[16]]);router[_0x1898[19]](_0x1898[9],auth[_0x1898[10]](),controller[_0x1898[18]]);module[_0x1898[20]]= router
\ No newline at end of file
index 40c8292..98f0d16 100644 (file)
@@ -1 +1 @@
-var _0xd344=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65\x41\x6E\x64\x41\x63\x63\x6F\x75\x6E\x74"];_0xd344[0];var Sequelize=require(_0xd344[1]);module[_0xd344[2]]= {name:{type:Sequelize[_0xd344[3]],unique:_0xd344[4],allowNull:false}}
\ No newline at end of file
+var _0xe238=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65\x41\x6E\x64\x41\x63\x63\x6F\x75\x6E\x74"];_0xe238[0];var Sequelize=require(_0xe238[1]);module[_0xe238[2]]= {name:{type:Sequelize[_0xe238[3]],unique:_0xe238[4],allowNull:false}}
\ No newline at end of file
index aa2f3e4..67039a2 100644 (file)
@@ -1 +1 @@
-var _0x1b28=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x1b28[0];var jsonpatch=require(_0x1b28[1]);var rp=require(_0x1b28[2]);var moment=require(_0x1b28[3]);var BPromise=require(_0x1b28[4]);var Mustache=require(_0x1b28[5]);var util=require(_0x1b28[6]);var path=require(_0x1b28[7]);var sox=require(_0x1b28[8]);var csv=require(_0x1b28[9]);var ejs=require(_0x1b28[10]);var fs=require(_0x1b28[11]);var _=require(_0x1b28[12]);var squel=require(_0x1b28[13]);var crypto=require(_0x1b28[14]);var jsforce=require(_0x1b28[15]);var deskjs=require(_0x1b28[16]);var toCsv=require(_0x1b28[9]);var querystring=require(_0x1b28[17]);var Papa=require(_0x1b28[18]);var qs=require(_0x1b28[19]);var logger=require(_0x1b28[21])(_0x1b28[20]);var utils=require(_0x1b28[22]);var config=require(_0x1b28[23]);var db=require(_0x1b28[25])[_0x1b28[24]];function respondWithStatusCode(_0x595dx1a,_0x595dx1b){_0x595dx1b= _0x595dx1b|| 204;return function(_0x595dx1c){if(_0x595dx1c){return _0x595dx1a[_0x1b28[26]](_0x595dx1b)};return _0x595dx1a[_0x1b28[28]](_0x595dx1b)[_0x1b28[27]]()}}function respondWithResult(_0x595dx1a,_0x595dx1b){_0x595dx1b= _0x595dx1b|| 200;return function(_0x595dx1c){if(_0x595dx1c){return _0x595dx1a[_0x1b28[28]](_0x595dx1b)[_0x1b28[29]](_0x595dx1c)}}}function respondWithFilteredResult(_0x595dx1a,_0x595dx1f){return function(_0x595dx1c){if(_0x595dx1c){var _0x595dx20=_0x595dx1c[_0x1b28[30]],_0x595dx21=_0x595dx1f[_0x1b28[31]],_0x595dx22=_0x595dx1f[_0x1b28[31]]+ _0x595dx1f[_0x1b28[32]],_0x595dx1b;if(_0x595dx22>= _0x595dx20){_0x595dx22= _0x595dx20;_0x595dx1b= 200}else {_0x595dx1b= 206};_0x595dx1a[_0x1b28[28]](_0x595dx1b);return _0x595dx1a[_0x1b28[36]](_0x1b28[33],_0x595dx21+ _0x1b28[34]+ _0x595dx22+ _0x1b28[35]+ _0x595dx20)[_0x1b28[29]](_0x595dx1c)};return null}}function patchUpdates(_0x595dx24){return function(_0x595dx1c){try{jsonpatch[_0x1b28[37]](_0x595dx1c,_0x595dx24,true)}catch(err){return BPromise[_0x1b28[38]](err)};return _0x595dx1c[_0x1b28[39]]()}}function saveUpdates(_0x595dx26,_0x595dx1b){return function(_0x595dx1c){if(_0x595dx1c){return _0x595dx1c[_0x1b28[41]](_0x595dx26)[_0x1b28[40]](function(_0x595dx27){return _0x595dx27})};return null}}function removeEntity(_0x595dx1a,_0x595dx1b){return function(_0x595dx1c){if(_0x595dx1c){return _0x595dx1c[_0x1b28[42]]()[_0x1b28[40]](function(){_0x595dx1a[_0x1b28[28]](204)[_0x1b28[27]]()})}}}function handleEntityNotFound(_0x595dx1a,_0x595dx1b){return function(_0x595dx1c){if(!_0x595dx1c){_0x595dx1a[_0x1b28[26]](404)};return _0x595dx1c}}function handleError(_0x595dx1a,_0x595dx1b){_0x595dx1b= _0x595dx1b|| 500;return function(_0x595dx2b){logger[_0x1b28[44]](_0x595dx2b[_0x1b28[43]]);if(_0x595dx2b[_0x1b28[45]]){delete _0x595dx2b[_0x1b28[45]]};_0x595dx1a[_0x1b28[28]](_0x595dx1b)[_0x1b28[46]](_0x595dx2b)}}exports[_0x1b28[47]]= function(_0x595dx2c,_0x595dx1a){var _0x595dx1f={raw:true,where:{id:_0x595dx2c[_0x1b28[49]][_0x1b28[48]]}},_0x595dx2d={};_0x595dx2d[_0x1b28[50]]= _[_0x1b28[53]](db[_0x1b28[52]][_0x1b28[51]]);_0x595dx2d[_0x1b28[54]]= _[_0x1b28[53]](_0x595dx2c[_0x1b28[54]]);_0x595dx2d[_0x1b28[55]]= _[_0x1b28[56]](_0x595dx2d[_0x1b28[50]],_0x595dx2d[_0x1b28[54]]);_0x595dx1f[_0x1b28[57]]= _[_0x1b28[56]](_0x595dx2d[_0x1b28[50]],qs[_0x1b28[58]](_0x595dx2c[_0x1b28[54]][_0x1b28[58]]));_0x595dx1f[_0x1b28[57]]= (_0x595dx1f[_0x1b28[57]][_0x1b28[59]])?_0x595dx1f[_0x1b28[57]]:_0x595dx2d[_0x1b28[50]];if(_0x595dx2c[_0x1b28[54]][_0x1b28[60]]){_0x595dx1f[_0x1b28[61]]= [{all:true}]};_0x595dx1f= _[_0x1b28[63]]({},_0x595dx1f,_0x595dx2c[_0x1b28[62]]);return db[_0x1b28[52]][_0x1b28[65]](_0x595dx1f)[_0x1b28[40]](handleEntityNotFound(_0x595dx1a,null))[_0x1b28[40]](respondWithResult(_0x595dx1a,null))[_0x1b28[64]](handleError(_0x595dx1a,null))};exports[_0x1b28[66]]= function(_0x595dx2c,_0x595dx1a){return db[_0x1b28[52]][_0x1b28[66]](_0x595dx2c[_0x1b28[67]],{})[_0x1b28[40]](respondWithResult(_0x595dx1a,201))[_0x1b28[64]](handleError(_0x595dx1a,null))};exports[_0x1b28[41]]= function(_0x595dx2c,_0x595dx1a){if(_0x595dx2c[_0x1b28[67]][_0x1b28[48]]){delete _0x595dx2c[_0x1b28[67]][_0x1b28[48]]};return db[_0x1b28[52]][_0x1b28[65]]({where:{id:_0x595dx2c[_0x1b28[49]][_0x1b28[48]]}})[_0x1b28[40]](handleEntityNotFound(_0x595dx1a,null))[_0x1b28[40]](saveUpdates(_0x595dx2c[_0x1b28[67]],null))[_0x1b28[40]](respondWithResult(_0x595dx1a,null))[_0x1b28[64]](handleError(_0x595dx1a,null))};exports[_0x1b28[42]]= function(_0x595dx2c,_0x595dx1a){return db[_0x1b28[52]][_0x1b28[65]]({where:{id:_0x595dx2c[_0x1b28[49]][_0x1b28[48]]}})[_0x1b28[40]](handleEntityNotFound(_0x595dx1a,null))[_0x1b28[40]](removeEntity(_0x595dx1a,null))[_0x1b28[64]](handleError(_0x595dx1a,null))}
\ No newline at end of file
+var _0xe48e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xe48e[0];var jsonpatch=require(_0xe48e[1]);var rp=require(_0xe48e[2]);var moment=require(_0xe48e[3]);var BPromise=require(_0xe48e[4]);var Mustache=require(_0xe48e[5]);var util=require(_0xe48e[6]);var path=require(_0xe48e[7]);var sox=require(_0xe48e[8]);var csv=require(_0xe48e[9]);var ejs=require(_0xe48e[10]);var fs=require(_0xe48e[11]);var _=require(_0xe48e[12]);var squel=require(_0xe48e[13]);var crypto=require(_0xe48e[14]);var jsforce=require(_0xe48e[15]);var deskjs=require(_0xe48e[16]);var toCsv=require(_0xe48e[9]);var querystring=require(_0xe48e[17]);var Papa=require(_0xe48e[18]);var qs=require(_0xe48e[19]);var logger=require(_0xe48e[21])(_0xe48e[20]);var utils=require(_0xe48e[22]);var config=require(_0xe48e[23]);var db=require(_0xe48e[25])[_0xe48e[24]];function respondWithStatusCode(_0x2e68x1a,_0x2e68x1b){_0x2e68x1b= _0x2e68x1b|| 204;return function(_0x2e68x1c){if(_0x2e68x1c){return _0x2e68x1a[_0xe48e[26]](_0x2e68x1b)};return _0x2e68x1a[_0xe48e[28]](_0x2e68x1b)[_0xe48e[27]]()}}function respondWithResult(_0x2e68x1a,_0x2e68x1b){_0x2e68x1b= _0x2e68x1b|| 200;return function(_0x2e68x1c){if(_0x2e68x1c){return _0x2e68x1a[_0xe48e[28]](_0x2e68x1b)[_0xe48e[29]](_0x2e68x1c)}}}function respondWithFilteredResult(_0x2e68x1a,_0x2e68x1f){return function(_0x2e68x1c){if(_0x2e68x1c){var _0x2e68x20=_0x2e68x1c[_0xe48e[30]],_0x2e68x21=_0x2e68x1f[_0xe48e[31]],_0x2e68x22=_0x2e68x1f[_0xe48e[31]]+ _0x2e68x1f[_0xe48e[32]],_0x2e68x1b;if(_0x2e68x22>= _0x2e68x20){_0x2e68x22= _0x2e68x20;_0x2e68x1b= 200}else {_0x2e68x1b= 206};_0x2e68x1a[_0xe48e[28]](_0x2e68x1b);return _0x2e68x1a[_0xe48e[36]](_0xe48e[33],_0x2e68x21+ _0xe48e[34]+ _0x2e68x22+ _0xe48e[35]+ _0x2e68x20)[_0xe48e[29]](_0x2e68x1c)};return null}}function patchUpdates(_0x2e68x24){return function(_0x2e68x1c){try{jsonpatch[_0xe48e[37]](_0x2e68x1c,_0x2e68x24,true)}catch(err){return BPromise[_0xe48e[38]](err)};return _0x2e68x1c[_0xe48e[39]]()}}function saveUpdates(_0x2e68x26,_0x2e68x1b){return function(_0x2e68x1c){if(_0x2e68x1c){return _0x2e68x1c[_0xe48e[41]](_0x2e68x26)[_0xe48e[40]](function(_0x2e68x27){return _0x2e68x27})};return null}}function removeEntity(_0x2e68x1a,_0x2e68x1b){return function(_0x2e68x1c){if(_0x2e68x1c){return _0x2e68x1c[_0xe48e[42]]()[_0xe48e[40]](function(){_0x2e68x1a[_0xe48e[28]](204)[_0xe48e[27]]()})}}}function handleEntityNotFound(_0x2e68x1a,_0x2e68x1b){return function(_0x2e68x1c){if(!_0x2e68x1c){_0x2e68x1a[_0xe48e[26]](404)};return _0x2e68x1c}}function handleError(_0x2e68x1a,_0x2e68x1b){_0x2e68x1b= _0x2e68x1b|| 500;return function(_0x2e68x2b){logger[_0xe48e[44]](_0x2e68x2b[_0xe48e[43]]);if(_0x2e68x2b[_0xe48e[45]]){delete _0x2e68x2b[_0xe48e[45]]};_0x2e68x1a[_0xe48e[28]](_0x2e68x1b)[_0xe48e[46]](_0x2e68x2b)}}exports[_0xe48e[47]]= function(_0x2e68x2c,_0x2e68x1a){var _0x2e68x1f={raw:true,where:{id:_0x2e68x2c[_0xe48e[49]][_0xe48e[48]]}},_0x2e68x2d={};_0x2e68x2d[_0xe48e[50]]= _[_0xe48e[53]](db[_0xe48e[52]][_0xe48e[51]]);_0x2e68x2d[_0xe48e[54]]= _[_0xe48e[53]](_0x2e68x2c[_0xe48e[54]]);_0x2e68x2d[_0xe48e[55]]= _[_0xe48e[56]](_0x2e68x2d[_0xe48e[50]],_0x2e68x2d[_0xe48e[54]]);_0x2e68x1f[_0xe48e[57]]= _[_0xe48e[56]](_0x2e68x2d[_0xe48e[50]],qs[_0xe48e[58]](_0x2e68x2c[_0xe48e[54]][_0xe48e[58]]));_0x2e68x1f[_0xe48e[57]]= (_0x2e68x1f[_0xe48e[57]][_0xe48e[59]])?_0x2e68x1f[_0xe48e[57]]:_0x2e68x2d[_0xe48e[50]];if(_0x2e68x2c[_0xe48e[54]][_0xe48e[60]]){_0x2e68x1f[_0xe48e[61]]= [{all:true}]};_0x2e68x1f= _[_0xe48e[63]]({},_0x2e68x1f,_0x2e68x2c[_0xe48e[62]]);return db[_0xe48e[52]][_0xe48e[65]](_0x2e68x1f)[_0xe48e[40]](handleEntityNotFound(_0x2e68x1a,null))[_0xe48e[40]](respondWithResult(_0x2e68x1a,null))[_0xe48e[64]](handleError(_0x2e68x1a,null))};exports[_0xe48e[66]]= function(_0x2e68x2c,_0x2e68x1a){return db[_0xe48e[52]][_0xe48e[66]](_0x2e68x2c[_0xe48e[67]],{})[_0xe48e[40]](respondWithResult(_0x2e68x1a,201))[_0xe48e[64]](handleError(_0x2e68x1a,null))};exports[_0xe48e[41]]= function(_0x2e68x2c,_0x2e68x1a){if(_0x2e68x2c[_0xe48e[67]][_0xe48e[48]]){delete _0x2e68x2c[_0xe48e[67]][_0xe48e[48]]};return db[_0xe48e[52]][_0xe48e[65]]({where:{id:_0x2e68x2c[_0xe48e[49]][_0xe48e[48]]}})[_0xe48e[40]](handleEntityNotFound(_0x2e68x1a,null))[_0xe48e[40]](saveUpdates(_0x2e68x2c[_0xe48e[67]],null))[_0xe48e[40]](respondWithResult(_0x2e68x1a,null))[_0xe48e[64]](handleError(_0x2e68x1a,null))};exports[_0xe48e[42]]= function(_0x2e68x2c,_0x2e68x1a){return db[_0xe48e[52]][_0xe48e[65]]({where:{id:_0x2e68x2c[_0xe48e[49]][_0xe48e[48]]}})[_0xe48e[40]](handleEntityNotFound(_0x2e68x1a,null))[_0xe48e[40]](removeEntity(_0x2e68x1a,null))[_0xe48e[64]](handleError(_0x2e68x1a,null))}
\ No newline at end of file
index 3e43bb6..133d2a6 100644 (file)
@@ -1 +1 @@
-var _0xb1b6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x73\x6D\x73\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xb1b6[0];var _=require(_0xb1b6[1]);var util=require(_0xb1b6[2]);var logger=require(_0xb1b6[4])(_0xb1b6[3]);var moment=require(_0xb1b6[5]);var BPromise=require(_0xb1b6[6]);var rp=require(_0xb1b6[7]);var attributes=require(_0xb1b6[8]);module[_0xb1b6[9]]= function(_0x7f19x8,_0x7f19x9){return _0x7f19x8[_0xb1b6[12]](_0xb1b6[10],attributes,{tableName:_0xb1b6[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x81f5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x73\x6D\x73\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x81f5[0];var _=require(_0x81f5[1]);var util=require(_0x81f5[2]);var logger=require(_0x81f5[4])(_0x81f5[3]);var moment=require(_0x81f5[5]);var BPromise=require(_0x81f5[6]);var rp=require(_0x81f5[7]);var attributes=require(_0x81f5[8]);module[_0x81f5[9]]= function(_0x4fe2x8,_0x4fe2x9){return _0x4fe2x8[_0x81f5[12]](_0x81f5[10],attributes,{tableName:_0x81f5[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 0f30590..bb40959 100644 (file)
@@ -1 +1 @@
-var _0xd4bf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xd4bf[0];var _=require(_0xd4bf[1]);var util=require(_0xd4bf[2]);var moment=require(_0xd4bf[3]);var BPromise=require(_0xd4bf[4]);var rs=require(_0xd4bf[5]);var fs=require(_0xd4bf[6]);var db=require(_0xd4bf[8])[_0xd4bf[7]];var utils=require(_0xd4bf[9]);var logger=require(_0xd4bf[11])(_0xd4bf[10]);var config=require(_0xd4bf[12]);var jayson=require(_0xd4bf[13]);var client=jayson[_0xd4bf[15]][_0xd4bf[14]]({port:9002});function respondWithRpcPromise(_0xe1b5xe,_0xe1b5xf,_0xe1b5x10){return  new BPromise(function(_0xe1b5x11,_0xe1b5x12){return client[_0xd4bf[28]](_0xe1b5xe,_0xe1b5x10)[_0xd4bf[27]](function(_0xe1b5x14){logger[_0xd4bf[20]](_0xd4bf[16],_0xe1b5xf,_0xd4bf[19]);logger[_0xd4bf[23]](_0xd4bf[21],_0xe1b5xf,_0xd4bf[19],JSON[_0xd4bf[22]](_0xe1b5x14));if(_0xe1b5x14[_0xd4bf[17]]){if(_0xe1b5x14[_0xd4bf[17]][_0xd4bf[24]]=== 500){logger[_0xd4bf[17]](_0xd4bf[16],_0xe1b5xf,_0xe1b5x14[_0xd4bf[17]][_0xd4bf[25]]);return _0xe1b5x12(_0xe1b5x14[_0xd4bf[17]][_0xd4bf[25]])};logger[_0xd4bf[17]](_0xd4bf[16],_0xe1b5xf,_0xe1b5x14[_0xd4bf[17]][_0xd4bf[25]]);return _0xe1b5x11(_0xe1b5x14[_0xd4bf[17]][_0xd4bf[25]])}else {logger[_0xd4bf[20]](_0xd4bf[16],_0xe1b5xf,_0xd4bf[19]);_0xe1b5x11(_0xe1b5x14[_0xd4bf[26]][_0xd4bf[25]])}})[_0xd4bf[18]](function(_0xe1b5x13){logger[_0xd4bf[17]](_0xd4bf[16],_0xe1b5xf,_0xe1b5x13);_0xe1b5x12(_0xe1b5x13)})})}
\ No newline at end of file
+var _0x7726=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x7726[0];var _=require(_0x7726[1]);var util=require(_0x7726[2]);var moment=require(_0x7726[3]);var BPromise=require(_0x7726[4]);var rs=require(_0x7726[5]);var fs=require(_0x7726[6]);var db=require(_0x7726[8])[_0x7726[7]];var utils=require(_0x7726[9]);var logger=require(_0x7726[11])(_0x7726[10]);var config=require(_0x7726[12]);var jayson=require(_0x7726[13]);var client=jayson[_0x7726[15]][_0x7726[14]]({port:9002});function respondWithRpcPromise(_0xb479xe,_0xb479xf,_0xb479x10){return  new BPromise(function(_0xb479x11,_0xb479x12){return client[_0x7726[28]](_0xb479xe,_0xb479x10)[_0x7726[27]](function(_0xb479x14){logger[_0x7726[20]](_0x7726[16],_0xb479xf,_0x7726[19]);logger[_0x7726[23]](_0x7726[21],_0xb479xf,_0x7726[19],JSON[_0x7726[22]](_0xb479x14));if(_0xb479x14[_0x7726[17]]){if(_0xb479x14[_0x7726[17]][_0x7726[24]]=== 500){logger[_0x7726[17]](_0x7726[16],_0xb479xf,_0xb479x14[_0x7726[17]][_0x7726[25]]);return _0xb479x12(_0xb479x14[_0x7726[17]][_0x7726[25]])};logger[_0x7726[17]](_0x7726[16],_0xb479xf,_0xb479x14[_0x7726[17]][_0x7726[25]]);return _0xb479x11(_0xb479x14[_0x7726[17]][_0x7726[25]])}else {logger[_0x7726[20]](_0x7726[16],_0xb479xf,_0x7726[19]);_0xb479x11(_0xb479x14[_0x7726[26]][_0x7726[25]])}})[_0x7726[18]](function(_0xb479x13){logger[_0x7726[17]](_0x7726[16],_0xb479xf,_0xb479x13);_0xb479x12(_0xb479x13)})})}
\ No newline at end of file
index ca47cdc..b777beb 100644 (file)
@@ -1 +1 @@
-var _0x13bc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x74\x61\x67\x73","\x73\x6D\x73","\x73\x6D\x73\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x61\x64\x64\x74\x61\x67\x73","\x74\x72\x61\x63\x6B\x65\x64","\x61\x64\x64\x54\x61\x67\x73","\x73\x6D\x73\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x73\x6D\x73\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x61\x67\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x13bc[0];var multer=require(_0x13bc[1]);var util=require(_0x13bc[2]);var path=require(_0x13bc[3]);var express=require(_0x13bc[4]);var router=express.Router();var auth=require(_0x13bc[5]);var interaction=require(_0x13bc[6]);var config=require(_0x13bc[7]);var controller=require(_0x13bc[8]);router[_0x13bc[12]](_0x13bc[9],auth[_0x13bc[10]](),controller[_0x13bc[11]]);router[_0x13bc[12]](_0x13bc[13],auth[_0x13bc[10]](),controller[_0x13bc[14]]);router[_0x13bc[12]](_0x13bc[15],auth[_0x13bc[10]](),controller[_0x13bc[16]]);router[_0x13bc[12]](_0x13bc[17],auth[_0x13bc[10]](),controller[_0x13bc[18]]);router[_0x13bc[20]](_0x13bc[9],auth[_0x13bc[10]](),controller[_0x13bc[19]]);router[_0x13bc[20]](_0x13bc[17],auth[_0x13bc[10]](),controller[_0x13bc[21]]);router[_0x13bc[20]](_0x13bc[22],auth[_0x13bc[10]](),interaction[_0x13bc[25]](_0x13bc[23],_0x13bc[24]),controller[_0x13bc[26]]);router[_0x13bc[29]](_0x13bc[15],auth[_0x13bc[10]](),interaction[_0x13bc[25]](_0x13bc[23],_0x13bc[27]),controller[_0x13bc[28]]);router[_0x13bc[32]](_0x13bc[15],auth[_0x13bc[10]](),interaction[_0x13bc[25]](_0x13bc[23],_0x13bc[30]),controller[_0x13bc[31]]);router[_0x13bc[32]](_0x13bc[22],auth[_0x13bc[10]](),controller[_0x13bc[33]]);module[_0x13bc[34]]= router
\ No newline at end of file
+var _0x6f0d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x74\x61\x67\x73","\x73\x6D\x73","\x73\x6D\x73\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x61\x64\x64\x74\x61\x67\x73","\x74\x72\x61\x63\x6B\x65\x64","\x61\x64\x64\x54\x61\x67\x73","\x73\x6D\x73\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x73\x6D\x73\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x61\x67\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x6f0d[0];var multer=require(_0x6f0d[1]);var util=require(_0x6f0d[2]);var path=require(_0x6f0d[3]);var express=require(_0x6f0d[4]);var router=express.Router();var auth=require(_0x6f0d[5]);var interaction=require(_0x6f0d[6]);var config=require(_0x6f0d[7]);var controller=require(_0x6f0d[8]);router[_0x6f0d[12]](_0x6f0d[9],auth[_0x6f0d[10]](),controller[_0x6f0d[11]]);router[_0x6f0d[12]](_0x6f0d[13],auth[_0x6f0d[10]](),controller[_0x6f0d[14]]);router[_0x6f0d[12]](_0x6f0d[15],auth[_0x6f0d[10]](),controller[_0x6f0d[16]]);router[_0x6f0d[12]](_0x6f0d[17],auth[_0x6f0d[10]](),controller[_0x6f0d[18]]);router[_0x6f0d[20]](_0x6f0d[9],auth[_0x6f0d[10]](),controller[_0x6f0d[19]]);router[_0x6f0d[20]](_0x6f0d[17],auth[_0x6f0d[10]](),controller[_0x6f0d[21]]);router[_0x6f0d[20]](_0x6f0d[22],auth[_0x6f0d[10]](),interaction[_0x6f0d[25]](_0x6f0d[23],_0x6f0d[24]),controller[_0x6f0d[26]]);router[_0x6f0d[29]](_0x6f0d[15],auth[_0x6f0d[10]](),interaction[_0x6f0d[25]](_0x6f0d[23],_0x6f0d[27]),controller[_0x6f0d[28]]);router[_0x6f0d[32]](_0x6f0d[15],auth[_0x6f0d[10]](),interaction[_0x6f0d[25]](_0x6f0d[23],_0x6f0d[30]),controller[_0x6f0d[31]]);router[_0x6f0d[32]](_0x6f0d[22],auth[_0x6f0d[10]](),controller[_0x6f0d[33]]);module[_0x6f0d[34]]= router
\ No newline at end of file
index 18dcc56..42d4993 100644 (file)
@@ -1 +1 @@
-var _0x79ef=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x42\x4F\x4F\x4C\x45\x41\x4E","\x44\x41\x54\x45","\x53\x54\x52\x49\x4E\x47","\x69\x6E","\x6F\x75\x74"];_0x79ef[0];var Sequelize=require(_0x79ef[1]);var moment=require(_0x79ef[2]);module[_0x79ef[3]]= {closed:{type:Sequelize[_0x79ef[4]],defaultValue:false},closedAt:{type:Sequelize[_0x79ef[5]]},disposition:{type:Sequelize[_0x79ef[6]]},note:{type:Sequelize[_0x79ef[6]]},phone:{type:Sequelize[_0x79ef[6]]},read1stAt:{type:Sequelize[_0x79ef[5]]},firstMsgDirection:{type:Sequelize.ENUM(_0x79ef[7],_0x79ef[8]),defaultValue:_0x79ef[7],allowNull:false},lastMsgAt:{type:Sequelize[_0x79ef[5]]},lastMsgDirection:{type:Sequelize.ENUM(_0x79ef[7],_0x79ef[8]),defaultValue:_0x79ef[7],allowNull:false}}
\ No newline at end of file
+var _0x558a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x42\x4F\x4F\x4C\x45\x41\x4E","\x44\x41\x54\x45","\x53\x54\x52\x49\x4E\x47","\x69\x6E","\x6F\x75\x74"];_0x558a[0];var Sequelize=require(_0x558a[1]);var moment=require(_0x558a[2]);module[_0x558a[3]]= {closed:{type:Sequelize[_0x558a[4]],defaultValue:false},closedAt:{type:Sequelize[_0x558a[5]]},disposition:{type:Sequelize[_0x558a[6]]},note:{type:Sequelize[_0x558a[6]]},phone:{type:Sequelize[_0x558a[6]]},read1stAt:{type:Sequelize[_0x558a[5]]},firstMsgDirection:{type:Sequelize.ENUM(_0x558a[7],_0x558a[8]),defaultValue:_0x558a[7],allowNull:false},lastMsgAt:{type:Sequelize[_0x558a[5]]},lastMsgDirection:{type:Sequelize.ENUM(_0x558a[7],_0x558a[8]),defaultValue:_0x558a[7],allowNull:false}}
\ No newline at end of file
index d52fd09..5ad0e8d 100644 (file)
@@ -1 +1 @@
-var _0x457a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x74\x61\x67","\x54\x61\x67","\x54\x61\x67\x73","\x69\x64","\x70\x75\x73\x68","\x64\x69\x73\x74\x69\x6E\x63\x74","\x72\x65\x61\x64","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x4D\x65\x73\x73\x61\x67\x65\x73","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x69\x6E","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x55\x73\x65\x72","\x55\x73\x65\x72\x73","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x4F\x77\x6E\x65\x72","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79","\x63\x6F\x6C\x6F\x72","\x54\x68\x72\x6F\x75\x67\x68\x54\x61\x67\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x69\x64\x73","\x6F\x6D\x69\x74","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x24\x67\x74\x65","\x2C","\x73\x70\x6C\x69\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x54\x61\x67\x73","\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x54\x61\x67\x73\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x73\x65\x74\x54\x61\x67\x73","\x72\x65\x6D\x6F\x76\x65\x54\x61\x67\x73"];_0x457a[0];var jsonpatch=require(_0x457a[1]);var rp=require(_0x457a[2]);var moment=require(_0x457a[3]);var BPromise=require(_0x457a[4]);var Mustache=require(_0x457a[5]);var util=require(_0x457a[6]);var path=require(_0x457a[7]);var sox=require(_0x457a[8]);var csv=require(_0x457a[9]);var ejs=require(_0x457a[10]);var fs=require(_0x457a[11]);var _=require(_0x457a[12]);var squel=require(_0x457a[13]);var crypto=require(_0x457a[14]);var jsforce=require(_0x457a[15]);var deskjs=require(_0x457a[16]);var toCsv=require(_0x457a[9]);var querystring=require(_0x457a[17]);var Papa=require(_0x457a[18]);var qs=require(_0x457a[19]);var logger=require(_0x457a[21])(_0x457a[20]);var utils=require(_0x457a[22]);var config=require(_0x457a[23]);var db=require(_0x457a[25])[_0x457a[24]];var socket=require(_0x457a[27])({host:_0x457a[26],port:6379});require(_0x457a[29])[_0x457a[28]](socket);function respondWithStatusCode(_0x9fc3x1b,_0x9fc3x1c){_0x9fc3x1c= _0x9fc3x1c|| 204;return function(_0x9fc3x1d){if(_0x9fc3x1d){return _0x9fc3x1b[_0x457a[30]](_0x9fc3x1c)};return _0x9fc3x1b[_0x457a[32]](_0x9fc3x1c)[_0x457a[31]]()}}function respondWithResult(_0x9fc3x1b,_0x9fc3x1c){_0x9fc3x1c= _0x9fc3x1c|| 200;return function(_0x9fc3x1d){if(_0x9fc3x1d){return _0x9fc3x1b[_0x457a[32]](_0x9fc3x1c)[_0x457a[33]](_0x9fc3x1d)}}}function respondWithFilteredResult(_0x9fc3x1b,_0x9fc3x20){return function(_0x9fc3x1d){if(_0x9fc3x1d){var _0x9fc3x21=_0x9fc3x1d[_0x457a[34]],_0x9fc3x22=_0x9fc3x20[_0x457a[35]],_0x9fc3x23=_0x9fc3x20[_0x457a[35]]+ _0x9fc3x20[_0x457a[36]],_0x9fc3x1c;if(_0x9fc3x23>= _0x9fc3x21){_0x9fc3x23= _0x9fc3x21;_0x9fc3x1c= 200}else {_0x9fc3x1c= 206};_0x9fc3x1b[_0x457a[32]](_0x9fc3x1c);return _0x9fc3x1b[_0x457a[40]](_0x457a[37],_0x9fc3x22+ _0x457a[38]+ _0x9fc3x23+ _0x457a[39]+ _0x9fc3x21)[_0x457a[33]](_0x9fc3x1d)};return null}}function patchUpdates(_0x9fc3x25){return function(_0x9fc3x1d){try{jsonpatch[_0x457a[41]](_0x9fc3x1d,_0x9fc3x25,true)}catch(err){return BPromise[_0x457a[42]](err)};return _0x9fc3x1d[_0x457a[43]]()}}function saveUpdates(_0x9fc3x27,_0x9fc3x1c){return function(_0x9fc3x1d){if(_0x9fc3x1d){return _0x9fc3x1d[_0x457a[45]](_0x9fc3x27)[_0x457a[44]](function(_0x9fc3x28){return _0x9fc3x28})};return null}}function removeEntity(_0x9fc3x1b,_0x9fc3x1c){return function(_0x9fc3x1d){if(_0x9fc3x1d){return _0x9fc3x1d[_0x457a[46]]()[_0x457a[44]](function(){_0x9fc3x1b[_0x457a[32]](204)[_0x457a[31]]()})}}}function handleEntityNotFound(_0x9fc3x1b,_0x9fc3x1c){return function(_0x9fc3x1d){if(!_0x9fc3x1d){_0x9fc3x1b[_0x457a[30]](404)};return _0x9fc3x1d}}function handleError(_0x9fc3x1b,_0x9fc3x1c){_0x9fc3x1c= _0x9fc3x1c|| 500;return function(_0x9fc3x2c){logger[_0x457a[48]](_0x9fc3x2c[_0x457a[47]]);if(_0x9fc3x2c[_0x457a[49]]){delete _0x9fc3x2c[_0x457a[49]]};_0x9fc3x1b[_0x457a[32]](_0x9fc3x1c)[_0x457a[50]](_0x9fc3x2c)}}exports[_0x457a[51]]= function(_0x9fc3x2d,_0x9fc3x1b){var _0x9fc3x20={},_0x9fc3x2e={},_0x9fc3x2f={count:0,rows:[]};_0x9fc3x2e[_0x457a[52]]= _[_0x457a[55]](db[_0x457a[54]][_0x457a[53]]);var _0x9fc3x30={dateStart:_0x9fc3x2d[_0x457a[57]][_0x457a[56]],dateEnd:_0x9fc3x2d[_0x457a[57]][_0x457a[58]]};delete _0x9fc3x2d[_0x457a[57]][_0x457a[56]];delete _0x9fc3x2d[_0x457a[57]][_0x457a[58]];_0x9fc3x2e[_0x457a[57]]= _[_0x457a[55]](_0x9fc3x2d[_0x457a[57]]);_0x9fc3x2e[_0x457a[59]]= _[_0x457a[60]](_0x9fc3x2e[_0x457a[52]],_0x9fc3x2e[_0x457a[57]]);_0x9fc3x20[_0x457a[61]]= _[_0x457a[60]](_0x9fc3x2e[_0x457a[52]],qs[_0x457a[62]](_0x9fc3x2d[_0x457a[57]][_0x457a[62]]));_0x9fc3x20[_0x457a[61]]= (_0x9fc3x20[_0x457a[61]][_0x457a[63]])?_0x9fc3x20[_0x457a[61]]:_0x9fc3x2e[_0x457a[52]];if(!_0x9fc3x2d[_0x457a[57]][_0x457a[65]](_0x457a[64])){_0x9fc3x20[_0x457a[36]]= qs[_0x457a[36]](_0x9fc3x2d[_0x457a[57]][_0x457a[36]]);_0x9fc3x20[_0x457a[35]]= qs[_0x457a[35]](_0x9fc3x2d[_0x457a[57]][_0x457a[35]])};_0x9fc3x20[_0x457a[66]]= qs[_0x457a[67]](_0x9fc3x2d[_0x457a[57]][_0x457a[67]]);_0x9fc3x20[_0x457a[68]]= qs[_0x457a[59]](_[_0x457a[69]](_0x9fc3x2d[_0x457a[57]],_0x9fc3x2e[_0x457a[59]]));if(_0x9fc3x30[_0x457a[56]]){if(_0x9fc3x30[_0x457a[58]]){_0x9fc3x30[_0x457a[58]]= moment(_0x9fc3x30[_0x457a[58]])[_0x457a[71]](1,_0x457a[70])}else {_0x9fc3x30[_0x457a[58]]= moment(_0x9fc3x30[_0x457a[56]])[_0x457a[71]](1,_0x457a[70])};_[_0x457a[72]](_0x9fc3x20[_0x457a[68]],{createdAt:{$gte:_0x9fc3x30[_0x457a[56]],$lte:_0x9fc3x30[_0x457a[58]]}})};if(_0x9fc3x2d[_0x457a[57]][_0x457a[73]]){_0x9fc3x20[_0x457a[68]]= _[_0x457a[72]](_0x9fc3x20[_0x457a[68]],{$or:_[_0x457a[75]](_0x9fc3x20[_0x457a[61]],function(_0x9fc3x31){var _0x9fc3x2f={};_0x9fc3x2f[_0x9fc3x31]= {$like:_0x457a[74]+ _0x9fc3x2d[_0x457a[57]][_0x457a[73]]+ _0x457a[74]};return _0x9fc3x2f})})};_0x9fc3x20= _[_0x457a[72]]({},_0x9fc3x20,_0x9fc3x2d[_0x457a[76]]);var _0x9fc3x32={where:_0x9fc3x20[_0x457a[68]]};_0x9fc3x32[_0x457a[77]]= [];if(_0x9fc3x2d[_0x457a[57]][_0x457a[78]]){_0x9fc3x32[_0x457a[77]][_0x457a[82]]({model:db[_0x457a[79]],as:_0x457a[80],attributes:[_0x457a[81]],where:{id:_0x9fc3x2d[_0x457a[57]][_0x457a[78]]},required:true});_0x9fc3x32[_0x457a[83]]= true};if(_0x9fc3x2d[_0x457a[57]][_0x457a[84]]){_0x9fc3x32[_0x457a[77]][_0x457a[82]]({model:db[_0x457a[85]],as:_0x457a[86],attributes:[_0x457a[81],_0x457a[87],_0x457a[88],_0x457a[84]],where:{direction:_0x457a[89],read:_0x9fc3x2d[_0x457a[57]][_0x457a[84]]|| false},required:true});_0x9fc3x32[_0x457a[83]]= true};return db[_0x457a[54]][_0x457a[34]](_0x9fc3x32)[_0x457a[44]](function(_0x9fc3x21){_0x9fc3x2f[_0x457a[34]]= _0x9fc3x21;if(_0x9fc3x2d[_0x457a[57]][_0x457a[92]]){_0x9fc3x20[_0x457a[77]]= [{model:db[_0x457a[93]],as:_0x457a[94],required:false,attributes:[_0x457a[81],_0x457a[49],_0x457a[95]]},{model:db[_0x457a[96]],as:_0x457a[97],required:false},{model:db[_0x457a[93]],as:_0x457a[98],attributes:[_0x457a[49],_0x457a[95],_0x457a[99]],required:false},{model:db[_0x457a[100]],as:_0x457a[101],attributes:[_0x457a[49],_0x457a[102]],required:false},{model:db[_0x457a[85]],as:_0x457a[86],attributes:[_0x457a[81],_0x457a[87],_0x457a[88],_0x457a[84]],where:{direction:_0x457a[89],read:_0x9fc3x2d[_0x457a[57]][_0x457a[84]]|| false},required:_0x9fc3x2d[_0x457a[57]][_0x457a[84]]|| false},{model:db[_0x457a[79]],as:_0x457a[80],attributes:[_0x457a[81],_0x457a[49],_0x457a[103]],required:_0x9fc3x2d[_0x457a[57]][_0x457a[78]]?true:false},{model:db[_0x457a[79]],as:_0x457a[104],attributes:[_0x457a[81],_0x457a[49],_0x457a[103]],through:_0x9fc3x2d[_0x457a[57]][_0x457a[78]]?{attributes:[],where:{TagId:_0x9fc3x2d[_0x457a[57]][_0x457a[78]]|| undefined}}:{},required:_0x9fc3x2d[_0x457a[57]][_0x457a[78]]?true:false}]};return db[_0x457a[54]][_0x457a[105]](_0x9fc3x20)})[_0x457a[44]](function(_0x9fc3x33){_0x9fc3x2f[_0x457a[91]]= _0x9fc3x33;return _0x9fc3x2f})[_0x457a[44]](respondWithFilteredResult(_0x9fc3x1b,_0x9fc3x20))[_0x457a[90]](handleError(_0x9fc3x1b,null))};exports[_0x457a[106]]= function(_0x9fc3x2d,_0x9fc3x1b){var _0x9fc3x20={raw:false,where:{id:_0x9fc3x2d[_0x457a[107]][_0x457a[81]]}},_0x9fc3x2e={};_0x9fc3x2e[_0x457a[52]]= _[_0x457a[55]](db[_0x457a[54]][_0x457a[53]]);_0x9fc3x2e[_0x457a[57]]= _[_0x457a[55]](_0x9fc3x2d[_0x457a[57]]);_0x9fc3x2e[_0x457a[59]]= _[_0x457a[60]](_0x9fc3x2e[_0x457a[52]],_0x9fc3x2e[_0x457a[57]]);_0x9fc3x20[_0x457a[61]]= _[_0x457a[60]](_0x9fc3x2e[_0x457a[52]],qs[_0x457a[62]](_0x9fc3x2d[_0x457a[57]][_0x457a[62]]));_0x9fc3x20[_0x457a[61]]= (_0x9fc3x20[_0x457a[61]][_0x457a[63]])?_0x9fc3x20[_0x457a[61]]:_0x9fc3x2e[_0x457a[52]];if(_0x9fc3x2d[_0x457a[57]][_0x457a[92]]){_0x9fc3x20[_0x457a[77]]= [{all:true}]};_0x9fc3x20= _[_0x457a[72]]({},_0x9fc3x20,_0x9fc3x2d[_0x457a[76]]);return db[_0x457a[54]][_0x457a[108]](_0x9fc3x20)[_0x457a[44]](handleEntityNotFound(_0x9fc3x1b,null))[_0x457a[44]](respondWithResult(_0x9fc3x1b,null))[_0x457a[90]](handleError(_0x9fc3x1b,null))};exports[_0x457a[109]]= function(_0x9fc3x2d,_0x9fc3x1b){return db[_0x457a[54]][_0x457a[109]](_0x9fc3x2d[_0x457a[110]],{})[_0x457a[44]](respondWithResult(_0x9fc3x1b,201))[_0x457a[90]](handleError(_0x9fc3x1b,null))};exports[_0x457a[45]]= function(_0x9fc3x2d,_0x9fc3x1b){if(_0x9fc3x2d[_0x457a[110]][_0x457a[81]]){delete _0x9fc3x2d[_0x457a[110]][_0x457a[81]]};return db[_0x457a[54]][_0x457a[108]]({where:{id:_0x9fc3x2d[_0x457a[107]][_0x457a[81]]}})[_0x457a[44]](handleEntityNotFound(_0x9fc3x1b,null))[_0x457a[44]](saveUpdates(_0x9fc3x2d[_0x457a[110]],null))[_0x457a[44]](respondWithResult(_0x9fc3x1b,null))[_0x457a[90]](handleError(_0x9fc3x1b,null))};exports[_0x457a[46]]= function(_0x9fc3x2d,_0x9fc3x1b){return db[_0x457a[54]][_0x457a[108]]({where:{id:_0x9fc3x2d[_0x457a[107]][_0x457a[81]]}})[_0x457a[44]](handleEntityNotFound(_0x9fc3x1b,null))[_0x457a[44]](removeEntity(_0x9fc3x1b,null))[_0x457a[90]](handleError(_0x9fc3x1b,null))};exports[_0x457a[111]]= function(_0x9fc3x2d,_0x9fc3x1b){return db[_0x457a[54]][_0x457a[111]]()[_0x457a[44]](respondWithResult(_0x9fc3x1b,null))[_0x457a[90]](handleError(_0x9fc3x1b,null))};exports[_0x457a[112]]= function(_0x9fc3x2d,_0x9fc3x1b,_0x9fc3x34){return db[_0x457a[85]][_0x457a[108]]({where:{id:_0x9fc3x2d[_0x457a[107]][_0x457a[81]]}})[_0x457a[44]](handleEntityNotFound(_0x9fc3x1b,null))[_0x457a[44]](function(_0x9fc3x1d){if(_0x9fc3x1d){return _0x9fc3x1d[_0x457a[112]](_0x9fc3x2d[_0x457a[110]][_0x457a[113]],_[_0x457a[114]](_0x9fc3x2d[_0x457a[110]],[_0x457a[113],_0x457a[81]])|| {})}})[_0x457a[44]](respondWithResult(_0x9fc3x1b,null))[_0x457a[90]](handleError(_0x9fc3x1b,null))};exports[_0x457a[115]]= function(_0x9fc3x2d,_0x9fc3x1b,_0x9fc3x34){var _0x9fc3x20={raw:false,where:{}};var _0x9fc3x2e={};var _0x9fc3x35={count:0,rows:[]};return db[_0x457a[54]][_0x457a[122]]({where:{id:_0x9fc3x2d[_0x457a[107]][_0x457a[81]]}})[_0x457a[44]](handleEntityNotFound(_0x9fc3x1b,null))[_0x457a[44]](function(_0x9fc3x1d){if(_0x9fc3x1d){_0x9fc3x2e[_0x457a[52]]= _[_0x457a[55]](db[_0x457a[85]][_0x457a[53]]);_0x9fc3x2e[_0x457a[57]]= _[_0x457a[55]](_0x9fc3x2d[_0x457a[57]]);_0x9fc3x2e[_0x457a[59]]= _[_0x457a[60]](_0x9fc3x2e[_0x457a[52]],_0x9fc3x2e[_0x457a[57]]);_0x9fc3x20[_0x457a[61]]= _[_0x457a[60]](_0x9fc3x2e[_0x457a[52]],qs[_0x457a[62]](_0x9fc3x2d[_0x457a[57]][_0x457a[62]]));_0x9fc3x20[_0x457a[61]]= (_0x9fc3x20[_0x457a[61]][_0x457a[63]])?_0x9fc3x20[_0x457a[61]]:_0x9fc3x2e[_0x457a[52]];if(!_0x9fc3x2d[_0x457a[57]][_0x457a[65]](_0x457a[64])){_0x9fc3x20[_0x457a[36]]= qs[_0x457a[36]](_0x9fc3x2d[_0x457a[57]][_0x457a[36]]);_0x9fc3x20[_0x457a[35]]= qs[_0x457a[35]](_0x9fc3x2d[_0x457a[57]][_0x457a[35]])};_0x9fc3x20[_0x457a[66]]= qs[_0x457a[67]](_0x9fc3x2d[_0x457a[57]][_0x457a[67]]);_0x9fc3x20[_0x457a[68]]= qs[_0x457a[59]](_[_0x457a[69]](_0x9fc3x2d[_0x457a[57]],_0x9fc3x2e[_0x457a[59]]));_0x9fc3x20[_0x457a[68]][_0x457a[116]]= _0x9fc3x1d[_0x457a[81]];if(_0x9fc3x2d[_0x457a[57]][_0x457a[73]]){_0x9fc3x20[_0x457a[68]]= _[_0x457a[72]](_0x9fc3x20[_0x457a[68]],{$or:_[_0x457a[75]](_0x9fc3x20[_0x457a[61]],function(_0x9fc3x31){var _0x9fc3x2f={};_0x9fc3x2f[_0x9fc3x31]= {$like:_0x457a[74]+ _0x9fc3x2d[_0x457a[57]][_0x457a[73]]+ _0x457a[74]};return _0x9fc3x2f})})};if(_0x9fc3x2d[_0x457a[57]][_0x457a[117]]){var _0x9fc3x36=_0x9fc3x2d[_0x457a[57]][_0x457a[117]][_0x457a[119]](_0x457a[118]);var _0x9fc3x2f={};_0x9fc3x2f[_0x9fc3x36[0]]= {$gte:moment(_0x9fc3x36[1])[_0x457a[121]](_0x457a[120])};_0x9fc3x20[_0x457a[68]]= _[_0x457a[72]](_0x9fc3x20[_0x457a[68]],_0x9fc3x2f)};_0x9fc3x20= _[_0x457a[72]]({},_0x9fc3x20,_0x9fc3x2d[_0x457a[76]]);return db[_0x457a[85]][_0x457a[34]]({where:_0x9fc3x20[_0x457a[68]]})[_0x457a[44]](function(_0x9fc3x21){_0x9fc3x35[_0x457a[34]]= _0x9fc3x21;if(_0x9fc3x2d[_0x457a[57]][_0x457a[92]]){_0x9fc3x20[_0x457a[77]]= [{all:true}]};return db[_0x457a[85]][_0x457a[105]](_0x9fc3x20)})[_0x457a[44]](function(_0x9fc3x33){_0x9fc3x35[_0x457a[91]]= _0x9fc3x33;return _0x9fc3x35})}})[_0x457a[44]](respondWithFilteredResult(_0x9fc3x1b,_0x9fc3x20))[_0x457a[90]](handleError(_0x9fc3x1b,null))};exports[_0x457a[123]]= function(_0x9fc3x2d,_0x9fc3x1b,_0x9fc3x34){return db[_0x457a[54]][_0x457a[108]]({where:{id:_0x9fc3x2d[_0x457a[107]][_0x457a[81]]}})[_0x457a[44]](handleEntityNotFound(_0x9fc3x1b,null))[_0x457a[44]](function(_0x9fc3x1d){if(_0x9fc3x1d){return _0x9fc3x1d[_0x457a[127]](_0x9fc3x2d[_0x457a[110]][_0x457a[113]],_[_0x457a[114]](_0x9fc3x2d[_0x457a[110]],[_0x457a[113],_0x457a[81]])|| {})[_0x457a[126]](function(){return db[_0x457a[79]][_0x457a[105]]({attributes:[_0x457a[81],_0x457a[49],_0x457a[103]],where:{id:_0x9fc3x2d[_0x457a[110]][_0x457a[113]]}})})[_0x457a[44]](function(_0x9fc3x37){socket[_0x457a[125]](_0x457a[124],{id:Number(_0x9fc3x2d[_0x457a[107]][_0x457a[81]]),tags:_0x9fc3x37|| []});return {id:Number(_0x9fc3x2d[_0x457a[107]][_0x457a[81]]),tags:_0x9fc3x37|| []}})}})[_0x457a[44]](respondWithResult(_0x9fc3x1b,null))[_0x457a[90]](handleError(_0x9fc3x1b,null))};exports[_0x457a[128]]= function(_0x9fc3x2d,_0x9fc3x1b,_0x9fc3x34){var _0x9fc3x38;return db[_0x457a[54]][_0x457a[108]]({where:{id:_0x9fc3x2d[_0x457a[107]][_0x457a[81]]}})[_0x457a[44]](handleEntityNotFound(_0x9fc3x1b,null))[_0x457a[44]](function(_0x9fc3x1d){if(_0x9fc3x1d){return _0x9fc3x1d[_0x457a[128]](_0x9fc3x2d[_0x457a[57]][_0x457a[113]])}})[_0x457a[44]](respondWithStatusCode(_0x9fc3x1b,null))[_0x457a[90]](handleError(_0x9fc3x1b,null))}
\ No newline at end of file
+var _0x8145=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x74\x61\x67","\x54\x61\x67","\x54\x61\x67\x73","\x69\x64","\x70\x75\x73\x68","\x64\x69\x73\x74\x69\x6E\x63\x74","\x72\x65\x61\x64","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x4D\x65\x73\x73\x61\x67\x65\x73","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x69\x6E","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x55\x73\x65\x72","\x55\x73\x65\x72\x73","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x4F\x77\x6E\x65\x72","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x41\x63\x63\x6F\x75\x6E\x74","\x6B\x65\x79","\x63\x6F\x6C\x6F\x72","\x54\x68\x72\x6F\x75\x67\x68\x54\x61\x67\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x64\x64\x4D\x65\x73\x73\x61\x67\x65","\x69\x64\x73","\x6F\x6D\x69\x74","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x24\x67\x74\x65","\x2C","\x73\x70\x6C\x69\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x54\x61\x67\x73","\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x54\x61\x67\x73\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x73\x65\x74\x54\x61\x67\x73","\x72\x65\x6D\x6F\x76\x65\x54\x61\x67\x73"];_0x8145[0];var jsonpatch=require(_0x8145[1]);var rp=require(_0x8145[2]);var moment=require(_0x8145[3]);var BPromise=require(_0x8145[4]);var Mustache=require(_0x8145[5]);var util=require(_0x8145[6]);var path=require(_0x8145[7]);var sox=require(_0x8145[8]);var csv=require(_0x8145[9]);var ejs=require(_0x8145[10]);var fs=require(_0x8145[11]);var _=require(_0x8145[12]);var squel=require(_0x8145[13]);var crypto=require(_0x8145[14]);var jsforce=require(_0x8145[15]);var deskjs=require(_0x8145[16]);var toCsv=require(_0x8145[9]);var querystring=require(_0x8145[17]);var Papa=require(_0x8145[18]);var qs=require(_0x8145[19]);var logger=require(_0x8145[21])(_0x8145[20]);var utils=require(_0x8145[22]);var config=require(_0x8145[23]);var db=require(_0x8145[25])[_0x8145[24]];var socket=require(_0x8145[27])({host:_0x8145[26],port:6379});require(_0x8145[29])[_0x8145[28]](socket);function respondWithStatusCode(_0x8c20x1b,_0x8c20x1c){_0x8c20x1c= _0x8c20x1c|| 204;return function(_0x8c20x1d){if(_0x8c20x1d){return _0x8c20x1b[_0x8145[30]](_0x8c20x1c)};return _0x8c20x1b[_0x8145[32]](_0x8c20x1c)[_0x8145[31]]()}}function respondWithResult(_0x8c20x1b,_0x8c20x1c){_0x8c20x1c= _0x8c20x1c|| 200;return function(_0x8c20x1d){if(_0x8c20x1d){return _0x8c20x1b[_0x8145[32]](_0x8c20x1c)[_0x8145[33]](_0x8c20x1d)}}}function respondWithFilteredResult(_0x8c20x1b,_0x8c20x20){return function(_0x8c20x1d){if(_0x8c20x1d){var _0x8c20x21=_0x8c20x1d[_0x8145[34]],_0x8c20x22=_0x8c20x20[_0x8145[35]],_0x8c20x23=_0x8c20x20[_0x8145[35]]+ _0x8c20x20[_0x8145[36]],_0x8c20x1c;if(_0x8c20x23>= _0x8c20x21){_0x8c20x23= _0x8c20x21;_0x8c20x1c= 200}else {_0x8c20x1c= 206};_0x8c20x1b[_0x8145[32]](_0x8c20x1c);return _0x8c20x1b[_0x8145[40]](_0x8145[37],_0x8c20x22+ _0x8145[38]+ _0x8c20x23+ _0x8145[39]+ _0x8c20x21)[_0x8145[33]](_0x8c20x1d)};return null}}function patchUpdates(_0x8c20x25){return function(_0x8c20x1d){try{jsonpatch[_0x8145[41]](_0x8c20x1d,_0x8c20x25,true)}catch(err){return BPromise[_0x8145[42]](err)};return _0x8c20x1d[_0x8145[43]]()}}function saveUpdates(_0x8c20x27,_0x8c20x1c){return function(_0x8c20x1d){if(_0x8c20x1d){return _0x8c20x1d[_0x8145[45]](_0x8c20x27)[_0x8145[44]](function(_0x8c20x28){return _0x8c20x28})};return null}}function removeEntity(_0x8c20x1b,_0x8c20x1c){return function(_0x8c20x1d){if(_0x8c20x1d){return _0x8c20x1d[_0x8145[46]]()[_0x8145[44]](function(){_0x8c20x1b[_0x8145[32]](204)[_0x8145[31]]()})}}}function handleEntityNotFound(_0x8c20x1b,_0x8c20x1c){return function(_0x8c20x1d){if(!_0x8c20x1d){_0x8c20x1b[_0x8145[30]](404)};return _0x8c20x1d}}function handleError(_0x8c20x1b,_0x8c20x1c){_0x8c20x1c= _0x8c20x1c|| 500;return function(_0x8c20x2c){logger[_0x8145[48]](_0x8c20x2c[_0x8145[47]]);if(_0x8c20x2c[_0x8145[49]]){delete _0x8c20x2c[_0x8145[49]]};_0x8c20x1b[_0x8145[32]](_0x8c20x1c)[_0x8145[50]](_0x8c20x2c)}}exports[_0x8145[51]]= function(_0x8c20x2d,_0x8c20x1b){var _0x8c20x20={},_0x8c20x2e={},_0x8c20x2f={count:0,rows:[]};_0x8c20x2e[_0x8145[52]]= _[_0x8145[55]](db[_0x8145[54]][_0x8145[53]]);var _0x8c20x30={dateStart:_0x8c20x2d[_0x8145[57]][_0x8145[56]],dateEnd:_0x8c20x2d[_0x8145[57]][_0x8145[58]]};delete _0x8c20x2d[_0x8145[57]][_0x8145[56]];delete _0x8c20x2d[_0x8145[57]][_0x8145[58]];_0x8c20x2e[_0x8145[57]]= _[_0x8145[55]](_0x8c20x2d[_0x8145[57]]);_0x8c20x2e[_0x8145[59]]= _[_0x8145[60]](_0x8c20x2e[_0x8145[52]],_0x8c20x2e[_0x8145[57]]);_0x8c20x20[_0x8145[61]]= _[_0x8145[60]](_0x8c20x2e[_0x8145[52]],qs[_0x8145[62]](_0x8c20x2d[_0x8145[57]][_0x8145[62]]));_0x8c20x20[_0x8145[61]]= (_0x8c20x20[_0x8145[61]][_0x8145[63]])?_0x8c20x20[_0x8145[61]]:_0x8c20x2e[_0x8145[52]];if(!_0x8c20x2d[_0x8145[57]][_0x8145[65]](_0x8145[64])){_0x8c20x20[_0x8145[36]]= qs[_0x8145[36]](_0x8c20x2d[_0x8145[57]][_0x8145[36]]);_0x8c20x20[_0x8145[35]]= qs[_0x8145[35]](_0x8c20x2d[_0x8145[57]][_0x8145[35]])};_0x8c20x20[_0x8145[66]]= qs[_0x8145[67]](_0x8c20x2d[_0x8145[57]][_0x8145[67]]);_0x8c20x20[_0x8145[68]]= qs[_0x8145[59]](_[_0x8145[69]](_0x8c20x2d[_0x8145[57]],_0x8c20x2e[_0x8145[59]]));if(_0x8c20x30[_0x8145[56]]){if(_0x8c20x30[_0x8145[58]]){_0x8c20x30[_0x8145[58]]= moment(_0x8c20x30[_0x8145[58]])[_0x8145[71]](1,_0x8145[70])}else {_0x8c20x30[_0x8145[58]]= moment(_0x8c20x30[_0x8145[56]])[_0x8145[71]](1,_0x8145[70])};_[_0x8145[72]](_0x8c20x20[_0x8145[68]],{createdAt:{$gte:_0x8c20x30[_0x8145[56]],$lte:_0x8c20x30[_0x8145[58]]}})};if(_0x8c20x2d[_0x8145[57]][_0x8145[73]]){_0x8c20x20[_0x8145[68]]= _[_0x8145[72]](_0x8c20x20[_0x8145[68]],{$or:_[_0x8145[75]](_0x8c20x20[_0x8145[61]],function(_0x8c20x31){var _0x8c20x2f={};_0x8c20x2f[_0x8c20x31]= {$like:_0x8145[74]+ _0x8c20x2d[_0x8145[57]][_0x8145[73]]+ _0x8145[74]};return _0x8c20x2f})})};_0x8c20x20= _[_0x8145[72]]({},_0x8c20x20,_0x8c20x2d[_0x8145[76]]);var _0x8c20x32={where:_0x8c20x20[_0x8145[68]]};_0x8c20x32[_0x8145[77]]= [];if(_0x8c20x2d[_0x8145[57]][_0x8145[78]]){_0x8c20x32[_0x8145[77]][_0x8145[82]]({model:db[_0x8145[79]],as:_0x8145[80],attributes:[_0x8145[81]],where:{id:_0x8c20x2d[_0x8145[57]][_0x8145[78]]},required:true});_0x8c20x32[_0x8145[83]]= true};if(_0x8c20x2d[_0x8145[57]][_0x8145[84]]){_0x8c20x32[_0x8145[77]][_0x8145[82]]({model:db[_0x8145[85]],as:_0x8145[86],attributes:[_0x8145[81],_0x8145[87],_0x8145[88],_0x8145[84]],where:{direction:_0x8145[89],read:_0x8c20x2d[_0x8145[57]][_0x8145[84]]|| false},required:true});_0x8c20x32[_0x8145[83]]= true};return db[_0x8145[54]][_0x8145[34]](_0x8c20x32)[_0x8145[44]](function(_0x8c20x21){_0x8c20x2f[_0x8145[34]]= _0x8c20x21;if(_0x8c20x2d[_0x8145[57]][_0x8145[92]]){_0x8c20x20[_0x8145[77]]= [{model:db[_0x8145[93]],as:_0x8145[94],required:false,attributes:[_0x8145[81],_0x8145[49],_0x8145[95]]},{model:db[_0x8145[96]],as:_0x8145[97],required:false},{model:db[_0x8145[93]],as:_0x8145[98],attributes:[_0x8145[49],_0x8145[95],_0x8145[99]],required:false},{model:db[_0x8145[100]],as:_0x8145[101],attributes:[_0x8145[49],_0x8145[102]],required:false},{model:db[_0x8145[85]],as:_0x8145[86],attributes:[_0x8145[81],_0x8145[87],_0x8145[88],_0x8145[84]],where:{direction:_0x8145[89],read:_0x8c20x2d[_0x8145[57]][_0x8145[84]]|| false},required:_0x8c20x2d[_0x8145[57]][_0x8145[84]]|| false},{model:db[_0x8145[79]],as:_0x8145[80],attributes:[_0x8145[81],_0x8145[49],_0x8145[103]],required:_0x8c20x2d[_0x8145[57]][_0x8145[78]]?true:false},{model:db[_0x8145[79]],as:_0x8145[104],attributes:[_0x8145[81],_0x8145[49],_0x8145[103]],through:_0x8c20x2d[_0x8145[57]][_0x8145[78]]?{attributes:[],where:{TagId:_0x8c20x2d[_0x8145[57]][_0x8145[78]]|| undefined}}:{},required:_0x8c20x2d[_0x8145[57]][_0x8145[78]]?true:false}]};return db[_0x8145[54]][_0x8145[105]](_0x8c20x20)})[_0x8145[44]](function(_0x8c20x33){_0x8c20x2f[_0x8145[91]]= _0x8c20x33;return _0x8c20x2f})[_0x8145[44]](respondWithFilteredResult(_0x8c20x1b,_0x8c20x20))[_0x8145[90]](handleError(_0x8c20x1b,null))};exports[_0x8145[106]]= function(_0x8c20x2d,_0x8c20x1b){var _0x8c20x20={raw:false,where:{id:_0x8c20x2d[_0x8145[107]][_0x8145[81]]}},_0x8c20x2e={};_0x8c20x2e[_0x8145[52]]= _[_0x8145[55]](db[_0x8145[54]][_0x8145[53]]);_0x8c20x2e[_0x8145[57]]= _[_0x8145[55]](_0x8c20x2d[_0x8145[57]]);_0x8c20x2e[_0x8145[59]]= _[_0x8145[60]](_0x8c20x2e[_0x8145[52]],_0x8c20x2e[_0x8145[57]]);_0x8c20x20[_0x8145[61]]= _[_0x8145[60]](_0x8c20x2e[_0x8145[52]],qs[_0x8145[62]](_0x8c20x2d[_0x8145[57]][_0x8145[62]]));_0x8c20x20[_0x8145[61]]= (_0x8c20x20[_0x8145[61]][_0x8145[63]])?_0x8c20x20[_0x8145[61]]:_0x8c20x2e[_0x8145[52]];if(_0x8c20x2d[_0x8145[57]][_0x8145[92]]){_0x8c20x20[_0x8145[77]]= [{all:true}]};_0x8c20x20= _[_0x8145[72]]({},_0x8c20x20,_0x8c20x2d[_0x8145[76]]);return db[_0x8145[54]][_0x8145[108]](_0x8c20x20)[_0x8145[44]](handleEntityNotFound(_0x8c20x1b,null))[_0x8145[44]](respondWithResult(_0x8c20x1b,null))[_0x8145[90]](handleError(_0x8c20x1b,null))};exports[_0x8145[109]]= function(_0x8c20x2d,_0x8c20x1b){return db[_0x8145[54]][_0x8145[109]](_0x8c20x2d[_0x8145[110]],{})[_0x8145[44]](respondWithResult(_0x8c20x1b,201))[_0x8145[90]](handleError(_0x8c20x1b,null))};exports[_0x8145[45]]= function(_0x8c20x2d,_0x8c20x1b){if(_0x8c20x2d[_0x8145[110]][_0x8145[81]]){delete _0x8c20x2d[_0x8145[110]][_0x8145[81]]};return db[_0x8145[54]][_0x8145[108]]({where:{id:_0x8c20x2d[_0x8145[107]][_0x8145[81]]}})[_0x8145[44]](handleEntityNotFound(_0x8c20x1b,null))[_0x8145[44]](saveUpdates(_0x8c20x2d[_0x8145[110]],null))[_0x8145[44]](respondWithResult(_0x8c20x1b,null))[_0x8145[90]](handleError(_0x8c20x1b,null))};exports[_0x8145[46]]= function(_0x8c20x2d,_0x8c20x1b){return db[_0x8145[54]][_0x8145[108]]({where:{id:_0x8c20x2d[_0x8145[107]][_0x8145[81]]}})[_0x8145[44]](handleEntityNotFound(_0x8c20x1b,null))[_0x8145[44]](removeEntity(_0x8c20x1b,null))[_0x8145[90]](handleError(_0x8c20x1b,null))};exports[_0x8145[111]]= function(_0x8c20x2d,_0x8c20x1b){return db[_0x8145[54]][_0x8145[111]]()[_0x8145[44]](respondWithResult(_0x8c20x1b,null))[_0x8145[90]](handleError(_0x8c20x1b,null))};exports[_0x8145[112]]= function(_0x8c20x2d,_0x8c20x1b,_0x8c20x34){return db[_0x8145[85]][_0x8145[108]]({where:{id:_0x8c20x2d[_0x8145[107]][_0x8145[81]]}})[_0x8145[44]](handleEntityNotFound(_0x8c20x1b,null))[_0x8145[44]](function(_0x8c20x1d){if(_0x8c20x1d){return _0x8c20x1d[_0x8145[112]](_0x8c20x2d[_0x8145[110]][_0x8145[113]],_[_0x8145[114]](_0x8c20x2d[_0x8145[110]],[_0x8145[113],_0x8145[81]])|| {})}})[_0x8145[44]](respondWithResult(_0x8c20x1b,null))[_0x8145[90]](handleError(_0x8c20x1b,null))};exports[_0x8145[115]]= function(_0x8c20x2d,_0x8c20x1b,_0x8c20x34){var _0x8c20x20={raw:false,where:{}};var _0x8c20x2e={};var _0x8c20x35={count:0,rows:[]};return db[_0x8145[54]][_0x8145[122]]({where:{id:_0x8c20x2d[_0x8145[107]][_0x8145[81]]}})[_0x8145[44]](handleEntityNotFound(_0x8c20x1b,null))[_0x8145[44]](function(_0x8c20x1d){if(_0x8c20x1d){_0x8c20x2e[_0x8145[52]]= _[_0x8145[55]](db[_0x8145[85]][_0x8145[53]]);_0x8c20x2e[_0x8145[57]]= _[_0x8145[55]](_0x8c20x2d[_0x8145[57]]);_0x8c20x2e[_0x8145[59]]= _[_0x8145[60]](_0x8c20x2e[_0x8145[52]],_0x8c20x2e[_0x8145[57]]);_0x8c20x20[_0x8145[61]]= _[_0x8145[60]](_0x8c20x2e[_0x8145[52]],qs[_0x8145[62]](_0x8c20x2d[_0x8145[57]][_0x8145[62]]));_0x8c20x20[_0x8145[61]]= (_0x8c20x20[_0x8145[61]][_0x8145[63]])?_0x8c20x20[_0x8145[61]]:_0x8c20x2e[_0x8145[52]];if(!_0x8c20x2d[_0x8145[57]][_0x8145[65]](_0x8145[64])){_0x8c20x20[_0x8145[36]]= qs[_0x8145[36]](_0x8c20x2d[_0x8145[57]][_0x8145[36]]);_0x8c20x20[_0x8145[35]]= qs[_0x8145[35]](_0x8c20x2d[_0x8145[57]][_0x8145[35]])};_0x8c20x20[_0x8145[66]]= qs[_0x8145[67]](_0x8c20x2d[_0x8145[57]][_0x8145[67]]);_0x8c20x20[_0x8145[68]]= qs[_0x8145[59]](_[_0x8145[69]](_0x8c20x2d[_0x8145[57]],_0x8c20x2e[_0x8145[59]]));_0x8c20x20[_0x8145[68]][_0x8145[116]]= _0x8c20x1d[_0x8145[81]];if(_0x8c20x2d[_0x8145[57]][_0x8145[73]]){_0x8c20x20[_0x8145[68]]= _[_0x8145[72]](_0x8c20x20[_0x8145[68]],{$or:_[_0x8145[75]](_0x8c20x20[_0x8145[61]],function(_0x8c20x31){var _0x8c20x2f={};_0x8c20x2f[_0x8c20x31]= {$like:_0x8145[74]+ _0x8c20x2d[_0x8145[57]][_0x8145[73]]+ _0x8145[74]};return _0x8c20x2f})})};if(_0x8c20x2d[_0x8145[57]][_0x8145[117]]){var _0x8c20x36=_0x8c20x2d[_0x8145[57]][_0x8145[117]][_0x8145[119]](_0x8145[118]);var _0x8c20x2f={};_0x8c20x2f[_0x8c20x36[0]]= {$gte:moment(_0x8c20x36[1])[_0x8145[121]](_0x8145[120])};_0x8c20x20[_0x8145[68]]= _[_0x8145[72]](_0x8c20x20[_0x8145[68]],_0x8c20x2f)};_0x8c20x20= _[_0x8145[72]]({},_0x8c20x20,_0x8c20x2d[_0x8145[76]]);return db[_0x8145[85]][_0x8145[34]]({where:_0x8c20x20[_0x8145[68]]})[_0x8145[44]](function(_0x8c20x21){_0x8c20x35[_0x8145[34]]= _0x8c20x21;if(_0x8c20x2d[_0x8145[57]][_0x8145[92]]){_0x8c20x20[_0x8145[77]]= [{all:true}]};return db[_0x8145[85]][_0x8145[105]](_0x8c20x20)})[_0x8145[44]](function(_0x8c20x33){_0x8c20x35[_0x8145[91]]= _0x8c20x33;return _0x8c20x35})}})[_0x8145[44]](respondWithFilteredResult(_0x8c20x1b,_0x8c20x20))[_0x8145[90]](handleError(_0x8c20x1b,null))};exports[_0x8145[123]]= function(_0x8c20x2d,_0x8c20x1b,_0x8c20x34){return db[_0x8145[54]][_0x8145[108]]({where:{id:_0x8c20x2d[_0x8145[107]][_0x8145[81]]}})[_0x8145[44]](handleEntityNotFound(_0x8c20x1b,null))[_0x8145[44]](function(_0x8c20x1d){if(_0x8c20x1d){return _0x8c20x1d[_0x8145[127]](_0x8c20x2d[_0x8145[110]][_0x8145[113]],_[_0x8145[114]](_0x8c20x2d[_0x8145[110]],[_0x8145[113],_0x8145[81]])|| {})[_0x8145[126]](function(){return db[_0x8145[79]][_0x8145[105]]({attributes:[_0x8145[81],_0x8145[49],_0x8145[103]],where:{id:_0x8c20x2d[_0x8145[110]][_0x8145[113]]}})})[_0x8145[44]](function(_0x8c20x37){socket[_0x8145[125]](_0x8145[124],{id:Number(_0x8c20x2d[_0x8145[107]][_0x8145[81]]),tags:_0x8c20x37|| []});return {id:Number(_0x8c20x2d[_0x8145[107]][_0x8145[81]]),tags:_0x8c20x37|| []}})}})[_0x8145[44]](respondWithResult(_0x8c20x1b,null))[_0x8145[90]](handleError(_0x8c20x1b,null))};exports[_0x8145[128]]= function(_0x8c20x2d,_0x8c20x1b,_0x8c20x34){var _0x8c20x38;return db[_0x8145[54]][_0x8145[108]]({where:{id:_0x8c20x2d[_0x8145[107]][_0x8145[81]]}})[_0x8145[44]](handleEntityNotFound(_0x8c20x1b,null))[_0x8145[44]](function(_0x8c20x1d){if(_0x8c20x1d){return _0x8c20x1d[_0x8145[128]](_0x8c20x2d[_0x8145[57]][_0x8145[113]])}})[_0x8145[44]](respondWithStatusCode(_0x8c20x1b,null))[_0x8145[90]](handleError(_0x8c20x1b,null))}
\ No newline at end of file
index c2f3d92..86e894e 100644 (file)
@@ -1 +1 @@
-var _0x183f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x183f[0];var EventEmitter=require(_0x183f[1]);var SmsInteraction=require(_0x183f[4])[_0x183f[3]][_0x183f[2]];var SmsInteractionEvents= new EventEmitter();SmsInteractionEvents[_0x183f[5]](0);var events={afterCreate:_0x183f[6],afterUpdate:_0x183f[7],afterDestroy:_0x183f[8]};function emitEvent(event){return function(_0xe58ax7,_0xe58ax8,_0xe58ax9){SmsInteractionEvents[_0x183f[11]](event+ _0x183f[9]+ _0xe58ax7[_0x183f[10]],_0xe58ax7);SmsInteractionEvents[_0x183f[11]](event,_0xe58ax7);_0xe58ax9(null)}}for(var e in events){if(events[_0x183f[12]](e)){var event=events[e];SmsInteraction[_0x183f[13]](e,emitEvent(event))}};module[_0x183f[14]]= SmsInteractionEvents
\ No newline at end of file
+var _0xa110=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xa110[0];var EventEmitter=require(_0xa110[1]);var SmsInteraction=require(_0xa110[4])[_0xa110[3]][_0xa110[2]];var SmsInteractionEvents= new EventEmitter();SmsInteractionEvents[_0xa110[5]](0);var events={afterCreate:_0xa110[6],afterUpdate:_0xa110[7],afterDestroy:_0xa110[8]};function emitEvent(event){return function(_0xc87bx7,_0xc87bx8,_0xc87bx9){SmsInteractionEvents[_0xa110[11]](event+ _0xa110[9]+ _0xc87bx7[_0xa110[10]],_0xc87bx7);SmsInteractionEvents[_0xa110[11]](event,_0xc87bx7);_0xc87bx9(null)}}for(var e in events){if(events[_0xa110[12]](e)){var event=events[e];SmsInteraction[_0xa110[13]](e,emitEvent(event))}};module[_0xa110[14]]= SmsInteractionEvents
\ No newline at end of file
index 423f15b..bd77a83 100644 (file)
@@ -1 +1 @@
-var _0x7ea8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x73\x6D\x73\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x7ea8[0];var _=require(_0x7ea8[1]);var util=require(_0x7ea8[2]);var logger=require(_0x7ea8[4])(_0x7ea8[3]);var moment=require(_0x7ea8[5]);var BPromise=require(_0x7ea8[6]);var rp=require(_0x7ea8[7]);var attributes=require(_0x7ea8[8]);module[_0x7ea8[9]]= function(_0xfa69x8,_0xfa69x9){return _0xfa69x8[_0x7ea8[12]](_0x7ea8[10],attributes,{tableName:_0x7ea8[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x442f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x73\x6D\x73\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x442f[0];var _=require(_0x442f[1]);var util=require(_0x442f[2]);var logger=require(_0x442f[4])(_0x442f[3]);var moment=require(_0x442f[5]);var BPromise=require(_0x442f[6]);var rp=require(_0x442f[7]);var attributes=require(_0x442f[8]);module[_0x442f[9]]= function(_0xb1adx8,_0xb1adx9){return _0xb1adx8[_0x442f[12]](_0x442f[10],attributes,{tableName:_0x442f[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 71f5e07..f8a4e8b 100644 (file)
@@ -1 +1 @@
-var _0xc8e3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E"];_0xc8e3[0];var _=require(_0xc8e3[1]);var util=require(_0xc8e3[2]);var moment=require(_0xc8e3[3]);var BPromise=require(_0xc8e3[4]);var rs=require(_0xc8e3[5]);var fs=require(_0xc8e3[6]);var db=require(_0xc8e3[8])[_0xc8e3[7]];var utils=require(_0xc8e3[9]);var logger=require(_0xc8e3[11])(_0xc8e3[10]);var config=require(_0xc8e3[12]);var jayson=require(_0xc8e3[13]);var client=jayson[_0xc8e3[15]][_0xc8e3[14]]({port:9002});var socket=require(_0xc8e3[17])({host:_0xc8e3[16],port:6379});require(_0xc8e3[19])[_0xc8e3[18]](socket);function respondWithRpcPromise(_0x1782xf,_0x1782x10,_0x1782x11){return  new BPromise(function(_0x1782x12,_0x1782x13){return client[_0xc8e3[32]](_0x1782xf,_0x1782x11)[_0xc8e3[31]](function(_0x1782x15){logger[_0xc8e3[24]](_0xc8e3[20],_0x1782x10,_0xc8e3[23]);logger[_0xc8e3[27]](_0xc8e3[25],_0x1782x10,_0xc8e3[23],JSON[_0xc8e3[26]](_0x1782x15));if(_0x1782x15[_0xc8e3[21]]){if(_0x1782x15[_0xc8e3[21]][_0xc8e3[28]]=== 500){logger[_0xc8e3[21]](_0xc8e3[20],_0x1782x10,_0x1782x15[_0xc8e3[21]][_0xc8e3[29]]);return _0x1782x13(_0x1782x15[_0xc8e3[21]][_0xc8e3[29]])};logger[_0xc8e3[21]](_0xc8e3[20],_0x1782x10,_0x1782x15[_0xc8e3[21]][_0xc8e3[29]]);return _0x1782x12(_0x1782x15[_0xc8e3[21]][_0xc8e3[29]])}else {logger[_0xc8e3[24]](_0xc8e3[20],_0x1782x10,_0xc8e3[23]);_0x1782x12(_0x1782x15[_0xc8e3[30]][_0xc8e3[29]])}})[_0xc8e3[22]](function(_0x1782x14){logger[_0xc8e3[21]](_0xc8e3[20],_0x1782x10,_0x1782x14);_0x1782x13(_0x1782x14)})})}exports[_0xc8e3[33]]= function(_0x1782x11){var _0x1782x16=this;return  new Promise(function(_0x1782x12,_0x1782x13){return db[_0xc8e3[41]][_0xc8e3[40]](_0x1782x11[_0xc8e3[34]],{raw:_0x1782x11[_0xc8e3[35]]?(_0x1782x11[_0xc8e3[35]][_0xc8e3[36]]=== undefined)?true:false:true,individualHooks:true,where:_0x1782x11[_0xc8e3[35]]?_0x1782x11[_0xc8e3[35]][_0xc8e3[37]]|| null:null,attributes:_0x1782x11[_0xc8e3[35]]?_0x1782x11[_0xc8e3[35]][_0xc8e3[38]]|| null:null,limit:_0x1782x11[_0xc8e3[35]]?_0x1782x11[_0xc8e3[35]][_0xc8e3[39]]|| null:null})[_0xc8e3[31]](function(_0x1782x15){logger[_0xc8e3[24]](_0xc8e3[33],_0x1782x11);logger[_0xc8e3[27]](_0xc8e3[33],_0x1782x11,JSON[_0xc8e3[26]](_0x1782x15));_0x1782x12(_0x1782x15)})[_0xc8e3[22]](function(_0x1782x14){logger[_0xc8e3[21]](_0xc8e3[33],_0x1782x14[_0xc8e3[29]],_0x1782x11);_0x1782x13(_0x1782x16[_0xc8e3[21]](500,_0x1782x14[_0xc8e3[29]]))})})}
\ No newline at end of file
+var _0xb971=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E"];_0xb971[0];var _=require(_0xb971[1]);var util=require(_0xb971[2]);var moment=require(_0xb971[3]);var BPromise=require(_0xb971[4]);var rs=require(_0xb971[5]);var fs=require(_0xb971[6]);var db=require(_0xb971[8])[_0xb971[7]];var utils=require(_0xb971[9]);var logger=require(_0xb971[11])(_0xb971[10]);var config=require(_0xb971[12]);var jayson=require(_0xb971[13]);var client=jayson[_0xb971[15]][_0xb971[14]]({port:9002});var socket=require(_0xb971[17])({host:_0xb971[16],port:6379});require(_0xb971[19])[_0xb971[18]](socket);function respondWithRpcPromise(_0x1e78xf,_0x1e78x10,_0x1e78x11){return  new BPromise(function(_0x1e78x12,_0x1e78x13){return client[_0xb971[32]](_0x1e78xf,_0x1e78x11)[_0xb971[31]](function(_0x1e78x15){logger[_0xb971[24]](_0xb971[20],_0x1e78x10,_0xb971[23]);logger[_0xb971[27]](_0xb971[25],_0x1e78x10,_0xb971[23],JSON[_0xb971[26]](_0x1e78x15));if(_0x1e78x15[_0xb971[21]]){if(_0x1e78x15[_0xb971[21]][_0xb971[28]]=== 500){logger[_0xb971[21]](_0xb971[20],_0x1e78x10,_0x1e78x15[_0xb971[21]][_0xb971[29]]);return _0x1e78x13(_0x1e78x15[_0xb971[21]][_0xb971[29]])};logger[_0xb971[21]](_0xb971[20],_0x1e78x10,_0x1e78x15[_0xb971[21]][_0xb971[29]]);return _0x1e78x12(_0x1e78x15[_0xb971[21]][_0xb971[29]])}else {logger[_0xb971[24]](_0xb971[20],_0x1e78x10,_0xb971[23]);_0x1e78x12(_0x1e78x15[_0xb971[30]][_0xb971[29]])}})[_0xb971[22]](function(_0x1e78x14){logger[_0xb971[21]](_0xb971[20],_0x1e78x10,_0x1e78x14);_0x1e78x13(_0x1e78x14)})})}exports[_0xb971[33]]= function(_0x1e78x11){var _0x1e78x16=this;return  new Promise(function(_0x1e78x12,_0x1e78x13){return db[_0xb971[41]][_0xb971[40]](_0x1e78x11[_0xb971[34]],{raw:_0x1e78x11[_0xb971[35]]?(_0x1e78x11[_0xb971[35]][_0xb971[36]]=== undefined)?true:false:true,individualHooks:true,where:_0x1e78x11[_0xb971[35]]?_0x1e78x11[_0xb971[35]][_0xb971[37]]|| null:null,attributes:_0x1e78x11[_0xb971[35]]?_0x1e78x11[_0xb971[35]][_0xb971[38]]|| null:null,limit:_0x1e78x11[_0xb971[35]]?_0x1e78x11[_0xb971[35]][_0xb971[39]]|| null:null})[_0xb971[31]](function(_0x1e78x15){logger[_0xb971[24]](_0xb971[33],_0x1e78x11);logger[_0xb971[27]](_0xb971[33],_0x1e78x11,JSON[_0xb971[26]](_0x1e78x15));_0x1e78x12(_0x1e78x15)})[_0xb971[22]](function(_0x1e78x14){logger[_0xb971[21]](_0xb971[33],_0x1e78x14[_0xb971[29]],_0x1e78x11);_0x1e78x13(_0x1e78x16[_0xb971[21]](500,_0x1e78x14[_0xb971[29]]))})})}
\ No newline at end of file
index c64c54b..8d83d63 100644 (file)
@@ -1 +1 @@
-var _0x48c3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A","\x6F\x6E"];_0x48c3[0];var SmsInteractionEvents=require(_0x48c3[1]);var events=[_0x48c3[2],_0x48c3[3],_0x48c3[4]];function createListener(_0x4732x4,_0x4732x5){return function(_0x4732x6){_0x4732x5[_0x48c3[5]](_0x4732x4,_0x4732x6)}}function removeListener(_0x4732x4,_0x4732x8){return function(){SmsInteractionEvents[_0x48c3[6]](_0x4732x4,_0x4732x8)}}exports[_0x48c3[7]]= function(_0x4732x5){for(var _0x4732x9=0,_0x4732xa=events[_0x48c3[8]];_0x4732x9< _0x4732xa;_0x4732x9++){var _0x4732x4=events[_0x4732x9];var _0x4732x8=createListener(_0x48c3[9]+ _0x4732x4,_0x4732x5);SmsInteractionEvents[_0x48c3[10]](_0x4732x4,_0x4732x8)}}
\ No newline at end of file
+var _0x11e1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A","\x6F\x6E"];_0x11e1[0];var SmsInteractionEvents=require(_0x11e1[1]);var events=[_0x11e1[2],_0x11e1[3],_0x11e1[4]];function createListener(_0x4456x4,_0x4456x5){return function(_0x4456x6){_0x4456x5[_0x11e1[5]](_0x4456x4,_0x4456x6)}}function removeListener(_0x4456x4,_0x4456x8){return function(){SmsInteractionEvents[_0x11e1[6]](_0x4456x4,_0x4456x8)}}exports[_0x11e1[7]]= function(_0x4456x5){for(var _0x4456x9=0,_0x4456xa=events[_0x11e1[8]];_0x4456x9< _0x4456xa;_0x4456x9++){var _0x4456x4=events[_0x4456x9];var _0x4456x8=createListener(_0x11e1[9]+ _0x4456x4,_0x4456x5);SmsInteractionEvents[_0x11e1[10]](_0x4456x4,_0x4456x8)}}
\ No newline at end of file
index 72640a9..4807c39 100644 (file)
@@ -1 +1 @@
-var _0x5eb2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x73\x6D\x73","\x73\x6D\x73\x6D\x65\x73\x73\x61\x67\x65\x3A\x63\x72\x65\x61\x74\x65","\x74\x72\x61\x63\x6B\x65\x64","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x73\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74","\x61\x63\x63\x65\x70\x74","\x2F\x3A\x69\x64\x2F\x72\x65\x6A\x65\x63\x74","\x72\x65\x6A\x65\x63\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x5eb2[0];var multer=require(_0x5eb2[1]);var util=require(_0x5eb2[2]);var path=require(_0x5eb2[3]);var express=require(_0x5eb2[4]);var router=express.Router();var auth=require(_0x5eb2[5]);var interaction=require(_0x5eb2[6]);var config=require(_0x5eb2[7]);var controller=require(_0x5eb2[8]);router[_0x5eb2[12]](_0x5eb2[9],auth[_0x5eb2[10]](),controller[_0x5eb2[11]]);router[_0x5eb2[12]](_0x5eb2[13],auth[_0x5eb2[10]](),controller[_0x5eb2[14]]);router[_0x5eb2[12]](_0x5eb2[15],auth[_0x5eb2[10]](),controller[_0x5eb2[16]]);router[_0x5eb2[21]](_0x5eb2[9],auth[_0x5eb2[10]](),interaction[_0x5eb2[19]](_0x5eb2[17],_0x5eb2[18]),controller[_0x5eb2[20]]);router[_0x5eb2[21]](_0x5eb2[22],controller[_0x5eb2[23]]);router[_0x5eb2[25]](_0x5eb2[15],auth[_0x5eb2[10]](),controller[_0x5eb2[24]]);router[_0x5eb2[25]](_0x5eb2[26],auth[_0x5eb2[10]](),controller[_0x5eb2[27]]);router[_0x5eb2[25]](_0x5eb2[28],auth[_0x5eb2[10]](),controller[_0x5eb2[29]]);router[_0x5eb2[31]](_0x5eb2[15],auth[_0x5eb2[10]](),controller[_0x5eb2[30]]);module[_0x5eb2[32]]= router
\ No newline at end of file
+var _0x6df0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x73\x6D\x73","\x73\x6D\x73\x6D\x65\x73\x73\x61\x67\x65\x3A\x63\x72\x65\x61\x74\x65","\x74\x72\x61\x63\x6B\x65\x64","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x73\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74","\x61\x63\x63\x65\x70\x74","\x2F\x3A\x69\x64\x2F\x72\x65\x6A\x65\x63\x74","\x72\x65\x6A\x65\x63\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6df0[0];var multer=require(_0x6df0[1]);var util=require(_0x6df0[2]);var path=require(_0x6df0[3]);var express=require(_0x6df0[4]);var router=express.Router();var auth=require(_0x6df0[5]);var interaction=require(_0x6df0[6]);var config=require(_0x6df0[7]);var controller=require(_0x6df0[8]);router[_0x6df0[12]](_0x6df0[9],auth[_0x6df0[10]](),controller[_0x6df0[11]]);router[_0x6df0[12]](_0x6df0[13],auth[_0x6df0[10]](),controller[_0x6df0[14]]);router[_0x6df0[12]](_0x6df0[15],auth[_0x6df0[10]](),controller[_0x6df0[16]]);router[_0x6df0[21]](_0x6df0[9],auth[_0x6df0[10]](),interaction[_0x6df0[19]](_0x6df0[17],_0x6df0[18]),controller[_0x6df0[20]]);router[_0x6df0[21]](_0x6df0[22],controller[_0x6df0[23]]);router[_0x6df0[25]](_0x6df0[15],auth[_0x6df0[10]](),controller[_0x6df0[24]]);router[_0x6df0[25]](_0x6df0[26],auth[_0x6df0[10]](),controller[_0x6df0[27]]);router[_0x6df0[25]](_0x6df0[28],auth[_0x6df0[10]](),controller[_0x6df0[29]]);router[_0x6df0[31]](_0x6df0[15],auth[_0x6df0[10]](),controller[_0x6df0[30]]);module[_0x6df0[32]]= router
\ No newline at end of file
index 92c6ab7..fece772 100644 (file)
@@ -1 +1 @@
-var _0x16c6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x65\x64\x69\x75\x6D","\x42\x4F\x4F\x4C\x45\x41\x4E","\x69\x6E","\x6F\x75\x74","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45"];_0x16c6[0];var Sequelize=require(_0x16c6[1]);module[_0x16c6[2]]= {body:{type:Sequelize.TEXT(_0x16c6[3]),allowNull:false},read:{type:Sequelize[_0x16c6[4]],defaultValue:false},direction:{type:Sequelize.ENUM(_0x16c6[5],_0x16c6[6]),defaultValue:_0x16c6[6],allowNull:false},messageId:{type:Sequelize.STRING(190)},phone:{type:Sequelize[_0x16c6[7]]},readAt:{type:Sequelize[_0x16c6[8]]},secret:{type:Sequelize[_0x16c6[4]],defaultValue:false}}
\ No newline at end of file
+var _0x9690=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x65\x64\x69\x75\x6D","\x42\x4F\x4F\x4C\x45\x41\x4E","\x69\x6E","\x6F\x75\x74","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45"];_0x9690[0];var Sequelize=require(_0x9690[1]);module[_0x9690[2]]= {body:{type:Sequelize.TEXT(_0x9690[3]),allowNull:false},read:{type:Sequelize[_0x9690[4]],defaultValue:false},direction:{type:Sequelize.ENUM(_0x9690[5],_0x9690[6]),defaultValue:_0x9690[6],allowNull:false},messageId:{type:Sequelize.STRING(190)},phone:{type:Sequelize[_0x9690[7]]},readAt:{type:Sequelize[_0x9690[8]]},secret:{type:Sequelize[_0x9690[4]],defaultValue:false}}
\ No newline at end of file
index 818d842..3871fd4 100644 (file)
@@ -1 +1 @@
-var _0x1bf6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x6D\x73\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x61\x63\x63\x65\x70\x74","\x73\x6D\x73","\x72\x65\x61\x64","\x72\x65\x61\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x55\x73\x65\x72\x49\x64","\x75\x73\x65\x72","\x6D\x61\x6E\x75\x61\x6C","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x53\x49\x50\x2F\x25\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x65\x76\x65\x6E\x74","\x45\x76\x65\x6E\x74\x4D\x61\x6E\x61\x67\x65\x72","\x61\x63\x63\x65\x70\x74\x6D\x65\x73\x73\x61\x67\x65","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74","\x5B\x53\x4D\x53\x4D\x45\x53\x53\x41\x47\x45\x3A\x41\x43\x43\x45\x50\x54\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x72\x6F\x6C\x65","\x6E\x75\x6C\x6C","\x41\x63\x63\x65\x70\x74\x4D\x65\x73\x73\x61\x67\x65","\x61\x63\x63\x65\x70\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x61\x64\x31\x73\x74\x41\x74","\x69\x73\x4E\x69\x6C","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x61\x67\x65\x6E\x74","\x72\x65\x6A\x65\x63\x74\x6D\x65\x73\x73\x61\x67\x65","\x5B\x53\x4D\x53\x4D\x45\x53\x53\x41\x47\x45\x3A\x52\x45\x4A\x45\x43\x54\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x52\x65\x6A\x65\x63\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x6A\x65\x63\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x63\x65\x69\x76\x65\x64\x20\x64\x65\x6C\x69\x76\x65\x72\x79\x20\x72\x65\x70\x6F\x72\x74\x20\x66\x72\x6F\x6D","\x74\x79\x70\x65","\x69\x6E\x73\x70\x65\x63\x74","\x4D\x65\x73\x73\x61\x67\x65\x53\x69\x64","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x74\x77\x69\x6C\x69\x6F","\x4D\x65\x73\x73\x61\x67\x65\x55\x55\x49\x44","\x73\x65\x6E\x74","\x64\x65\x6C\x69\x76\x65\x72\x65\x64","\x69\x6E\x64\x65\x78\x4F\x66","\x70\x6C\x69\x76\x6F","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74"];_0x1bf6[0];var jsonpatch=require(_0x1bf6[1]);var rp=require(_0x1bf6[2]);var moment=require(_0x1bf6[3]);var BPromise=require(_0x1bf6[4]);var Mustache=require(_0x1bf6[5]);var util=require(_0x1bf6[6]);var path=require(_0x1bf6[7]);var sox=require(_0x1bf6[8]);var csv=require(_0x1bf6[9]);var ejs=require(_0x1bf6[10]);var fs=require(_0x1bf6[11]);var _=require(_0x1bf6[12]);var squel=require(_0x1bf6[13]);var crypto=require(_0x1bf6[14]);var jsforce=require(_0x1bf6[15]);var deskjs=require(_0x1bf6[16]);var toCsv=require(_0x1bf6[9]);var querystring=require(_0x1bf6[17]);var Papa=require(_0x1bf6[18]);var qs=require(_0x1bf6[19]);var logger=require(_0x1bf6[21])(_0x1bf6[20]);var utils=require(_0x1bf6[22]);var config=require(_0x1bf6[23]);var db=require(_0x1bf6[25])[_0x1bf6[24]];var socket=require(_0x1bf6[27])({host:_0x1bf6[26],port:6379});require(_0x1bf6[29])[_0x1bf6[28]](socket);var jayson=require(_0x1bf6[30]);var client=jayson[_0x1bf6[32]][_0x1bf6[31]]({port:9004});var client9002=jayson[_0x1bf6[32]][_0x1bf6[31]]({port:9002});function respondWithRpcPromise(_0x5e01x1e,_0x5e01x1f,_0x5e01x20,_0x5e01x21){return  new BPromise(function(_0x5e01x22,_0x5e01x23){var _0x5e01x24=(_0x5e01x21|| client);return _0x5e01x24[_0x1bf6[45]](_0x5e01x1e,_0x5e01x20)[_0x1bf6[44]](function(_0x5e01x26){logger[_0x1bf6[37]](_0x1bf6[33],_0x5e01x1f,_0x1bf6[36]);logger[_0x1bf6[40]](_0x1bf6[38],_0x5e01x1f,_0x1bf6[36],JSON[_0x1bf6[39]](_0x5e01x26));if(_0x5e01x26[_0x1bf6[34]]){if(_0x5e01x26[_0x1bf6[34]][_0x1bf6[41]]=== 500){logger[_0x1bf6[34]](_0x1bf6[33],_0x5e01x1f,_0x5e01x26[_0x1bf6[34]][_0x1bf6[42]]);return _0x5e01x23(_0x5e01x26[_0x1bf6[34]][_0x1bf6[42]])};logger[_0x1bf6[34]](_0x1bf6[33],_0x5e01x1f,_0x5e01x26[_0x1bf6[34]][_0x1bf6[42]]);return _0x5e01x22(_0x5e01x26[_0x1bf6[34]][_0x1bf6[42]])}else {logger[_0x1bf6[37]](_0x1bf6[33],_0x5e01x1f,_0x1bf6[36]);_0x5e01x22(_0x5e01x26[_0x1bf6[43]][_0x1bf6[42]])}})[_0x1bf6[35]](function(_0x5e01x25){logger[_0x1bf6[34]](_0x1bf6[33],_0x5e01x1f,_0x5e01x25);_0x5e01x23(_0x5e01x25)})})}function respondWithStatusCode(_0x5e01x26,_0x5e01x28){_0x5e01x28= _0x5e01x28|| 204;return function(_0x5e01x29){if(_0x5e01x29){return _0x5e01x26[_0x1bf6[46]](_0x5e01x28)};return _0x5e01x26[_0x1bf6[48]](_0x5e01x28)[_0x1bf6[47]]()}}function respondWithResult(_0x5e01x26,_0x5e01x28){_0x5e01x28= _0x5e01x28|| 200;return function(_0x5e01x29){if(_0x5e01x29){return _0x5e01x26[_0x1bf6[48]](_0x5e01x28)[_0x1bf6[49]](_0x5e01x29)}}}function respondWithFilteredResult(_0x5e01x26,_0x5e01x2c){return function(_0x5e01x29){if(_0x5e01x29){var _0x5e01x2d=_0x5e01x29[_0x1bf6[50]],_0x5e01x2e=_0x5e01x2c[_0x1bf6[51]],_0x5e01x2f=_0x5e01x2c[_0x1bf6[51]]+ _0x5e01x2c[_0x1bf6[52]],_0x5e01x28;if(_0x5e01x2f>= _0x5e01x2d){_0x5e01x2f= _0x5e01x2d;_0x5e01x28= 200}else {_0x5e01x28= 206};_0x5e01x26[_0x1bf6[48]](_0x5e01x28);return _0x5e01x26[_0x1bf6[56]](_0x1bf6[53],_0x5e01x2e+ _0x1bf6[54]+ _0x5e01x2f+ _0x1bf6[55]+ _0x5e01x2d)[_0x1bf6[49]](_0x5e01x29)};return null}}function patchUpdates(_0x5e01x31){return function(_0x5e01x29){try{jsonpatch[_0x1bf6[57]](_0x5e01x29,_0x5e01x31,true)}catch(err){return BPromise[_0x1bf6[58]](err)};return _0x5e01x29[_0x1bf6[59]]()}}function saveUpdates(_0x5e01x33,_0x5e01x28){return function(_0x5e01x29){if(_0x5e01x29){return _0x5e01x29[_0x1bf6[60]](_0x5e01x33)[_0x1bf6[44]](function(_0x5e01x34){return _0x5e01x34})};return null}}function removeEntity(_0x5e01x26,_0x5e01x28){return function(_0x5e01x29){if(_0x5e01x29){return _0x5e01x29[_0x1bf6[61]]()[_0x1bf6[44]](function(){_0x5e01x26[_0x1bf6[48]](204)[_0x1bf6[47]]()})}}}function handleEntityNotFound(_0x5e01x26,_0x5e01x28){return function(_0x5e01x29){if(!_0x5e01x29){_0x5e01x26[_0x1bf6[46]](404)};return _0x5e01x29}}function handleError(_0x5e01x26,_0x5e01x28){_0x5e01x28= _0x5e01x28|| 500;return function(_0x5e01x25){logger[_0x1bf6[34]](_0x5e01x25[_0x1bf6[62]]);if(_0x5e01x25[_0x1bf6[63]]){delete _0x5e01x25[_0x1bf6[63]]};_0x5e01x26[_0x1bf6[48]](_0x5e01x28)[_0x1bf6[64]](_0x5e01x25)}}exports[_0x1bf6[65]]= function(_0x5e01x20,_0x5e01x26){var _0x5e01x2c={},_0x5e01x38={},_0x5e01x39={count:0,rows:[]};_0x5e01x38[_0x1bf6[66]]= _[_0x1bf6[69]](db[_0x1bf6[68]][_0x1bf6[67]]);var _0x5e01x3a={dateStart:_0x5e01x20[_0x1bf6[71]][_0x1bf6[70]],dateEnd:_0x5e01x20[_0x1bf6[71]][_0x1bf6[72]]};delete _0x5e01x20[_0x1bf6[71]][_0x1bf6[70]];delete _0x5e01x20[_0x1bf6[71]][_0x1bf6[72]];_0x5e01x38[_0x1bf6[71]]= _[_0x1bf6[69]](_0x5e01x20[_0x1bf6[71]]);_0x5e01x38[_0x1bf6[73]]= _[_0x1bf6[74]](_0x5e01x38[_0x1bf6[66]],_0x5e01x38[_0x1bf6[71]]);_0x5e01x2c[_0x1bf6[75]]= _[_0x1bf6[74]](_0x5e01x38[_0x1bf6[66]],qs[_0x1bf6[76]](_0x5e01x20[_0x1bf6[71]][_0x1bf6[76]]));_0x5e01x2c[_0x1bf6[75]]= (_0x5e01x2c[_0x1bf6[75]][_0x1bf6[77]])?_0x5e01x2c[_0x1bf6[75]]:_0x5e01x38[_0x1bf6[66]];if(!_0x5e01x20[_0x1bf6[71]][_0x1bf6[79]](_0x1bf6[78])){_0x5e01x2c[_0x1bf6[52]]= qs[_0x1bf6[52]](_0x5e01x20[_0x1bf6[71]][_0x1bf6[52]]);_0x5e01x2c[_0x1bf6[51]]= qs[_0x1bf6[51]](_0x5e01x20[_0x1bf6[71]][_0x1bf6[51]])};_0x5e01x2c[_0x1bf6[80]]= qs[_0x1bf6[81]](_0x5e01x20[_0x1bf6[71]][_0x1bf6[81]]);_0x5e01x2c[_0x1bf6[82]]= qs[_0x1bf6[73]](_[_0x1bf6[83]](_0x5e01x20[_0x1bf6[71]],_0x5e01x38[_0x1bf6[73]]));if(_0x5e01x3a[_0x1bf6[70]]){if(_0x5e01x3a[_0x1bf6[72]]){_0x5e01x3a[_0x1bf6[72]]= moment(_0x5e01x3a[_0x1bf6[72]])[_0x1bf6[85]](1,_0x1bf6[84])}else {_0x5e01x3a[_0x1bf6[72]]= moment(_0x5e01x3a[_0x1bf6[70]])[_0x1bf6[85]](1,_0x1bf6[84])};_[_0x1bf6[86]](_0x5e01x2c[_0x1bf6[82]],{createdAt:{$gte:_0x5e01x3a[_0x1bf6[70]],$lte:_0x5e01x3a[_0x1bf6[72]]}})};if(_0x5e01x20[_0x1bf6[71]][_0x1bf6[87]]){_0x5e01x2c[_0x1bf6[82]]= _[_0x1bf6[86]](_0x5e01x2c[_0x1bf6[82]],{$or:_[_0x1bf6[89]](_0x5e01x2c[_0x1bf6[75]],function(_0x5e01x3b){var _0x5e01x39={};_0x5e01x39[_0x5e01x3b]= {$like:_0x1bf6[88]+ _0x5e01x20[_0x1bf6[71]][_0x1bf6[87]]+ _0x1bf6[88]};return _0x5e01x39})})};_0x5e01x2c= _[_0x1bf6[86]]({},_0x5e01x2c,_0x5e01x20[_0x1bf6[90]]);var _0x5e01x3c={where:_0x5e01x2c[_0x1bf6[82]]};return db[_0x1bf6[68]][_0x1bf6[50]](_0x5e01x3c)[_0x1bf6[44]](function(_0x5e01x2d){_0x5e01x39[_0x1bf6[50]]= _0x5e01x2d;if(_0x5e01x20[_0x1bf6[71]][_0x1bf6[92]]){_0x5e01x2c[_0x1bf6[93]]= [{all:true}]};return db[_0x1bf6[68]][_0x1bf6[94]](_0x5e01x2c)})[_0x1bf6[44]](function(_0x5e01x3d){_0x5e01x39[_0x1bf6[91]]= _0x5e01x3d;return _0x5e01x39})[_0x1bf6[44]](respondWithFilteredResult(_0x5e01x26,_0x5e01x2c))[_0x1bf6[35]](handleError(_0x5e01x26,null))};exports[_0x1bf6[95]]= function(_0x5e01x20,_0x5e01x26){var _0x5e01x2c={raw:true,where:{id:_0x5e01x20[_0x1bf6[97]][_0x1bf6[96]]}},_0x5e01x38={};_0x5e01x38[_0x1bf6[66]]= _[_0x1bf6[69]](db[_0x1bf6[68]][_0x1bf6[67]]);_0x5e01x38[_0x1bf6[71]]= _[_0x1bf6[69]](_0x5e01x20[_0x1bf6[71]]);_0x5e01x38[_0x1bf6[73]]= _[_0x1bf6[74]](_0x5e01x38[_0x1bf6[66]],_0x5e01x38[_0x1bf6[71]]);_0x5e01x2c[_0x1bf6[75]]= _[_0x1bf6[74]](_0x5e01x38[_0x1bf6[66]],qs[_0x1bf6[76]](_0x5e01x20[_0x1bf6[71]][_0x1bf6[76]]));_0x5e01x2c[_0x1bf6[75]]= (_0x5e01x2c[_0x1bf6[75]][_0x1bf6[77]])?_0x5e01x2c[_0x1bf6[75]]:_0x5e01x38[_0x1bf6[66]];if(_0x5e01x20[_0x1bf6[71]][_0x1bf6[92]]){_0x5e01x2c[_0x1bf6[93]]= [{all:true}]};_0x5e01x2c= _[_0x1bf6[86]]({},_0x5e01x2c,_0x5e01x20[_0x1bf6[90]]);return db[_0x1bf6[68]][_0x1bf6[98]](_0x5e01x2c)[_0x1bf6[44]](handleEntityNotFound(_0x5e01x26,null))[_0x1bf6[44]](respondWithResult(_0x5e01x26,null))[_0x1bf6[35]](handleError(_0x5e01x26,null))};exports[_0x1bf6[99]]= function(_0x5e01x20,_0x5e01x26){return db[_0x1bf6[68]][_0x1bf6[99]](_0x5e01x20[_0x1bf6[100]],{})[_0x1bf6[44]](respondWithResult(_0x5e01x26,201))[_0x1bf6[35]](handleError(_0x5e01x26,null))};exports[_0x1bf6[60]]= function(_0x5e01x20,_0x5e01x26){if(_0x5e01x20[_0x1bf6[100]][_0x1bf6[96]]){delete _0x5e01x20[_0x1bf6[100]][_0x1bf6[96]]};return db[_0x1bf6[68]][_0x1bf6[98]]({where:{id:_0x5e01x20[_0x1bf6[97]][_0x1bf6[96]]}})[_0x1bf6[44]](handleEntityNotFound(_0x5e01x26,null))[_0x1bf6[44]](saveUpdates(_0x5e01x20[_0x1bf6[100]],null))[_0x1bf6[44]](respondWithResult(_0x5e01x26,null))[_0x1bf6[35]](handleError(_0x5e01x26,null))};exports[_0x1bf6[61]]= function(_0x5e01x20,_0x5e01x26){return db[_0x1bf6[68]][_0x1bf6[98]]({where:{id:_0x5e01x20[_0x1bf6[97]][_0x1bf6[96]]}})[_0x1bf6[44]](handleEntityNotFound(_0x5e01x26,null))[_0x1bf6[44]](removeEntity(_0x5e01x26,null))[_0x1bf6[35]](handleError(_0x5e01x26,null))};exports[_0x1bf6[101]]= function(_0x5e01x20,_0x5e01x26){return db[_0x1bf6[68]][_0x1bf6[101]]()[_0x1bf6[44]](respondWithResult(_0x5e01x26,null))[_0x1bf6[35]](handleError(_0x5e01x26,null))};var interaction_log=require(_0x1bf6[21])(_0x1bf6[102]);exports[_0x1bf6[103]]= function(_0x5e01x20,_0x5e01x26,_0x5e01x3f){var _0x5e01x40={channel:_0x1bf6[104]};if(_0x5e01x20[_0x1bf6[100]][_0x1bf6[96]]){delete _0x5e01x20[_0x1bf6[100]][_0x1bf6[96]]};_0x5e01x20[_0x1bf6[100]][_0x1bf6[105]]= true;_0x5e01x20[_0x1bf6[100]][_0x1bf6[106]]= moment()[_0x1bf6[108]](_0x1bf6[107]);_0x5e01x20[_0x1bf6[100]][_0x1bf6[109]]= _0x5e01x20[_0x1bf6[100]][_0x1bf6[109]]|| _0x5e01x20[_0x1bf6[110]][_0x1bf6[96]];return db[_0x1bf6[68]][_0x1bf6[98]]({where:{id:_0x5e01x20[_0x1bf6[97]][_0x1bf6[96]],UserId:null},include:[{model:db[_0x1bf6[129]],as:_0x1bf6[130]}]})[_0x1bf6[44]](handleEntityNotFound(_0x5e01x26,null))[_0x1bf6[44]](saveUpdates(_0x5e01x20[_0x1bf6[100]],null))[_0x1bf6[44]](function(_0x5e01x29){if(_0x5e01x29){_0x5e01x40[_0x1bf6[42]]= _0x5e01x29[_0x1bf6[119]]({plain:true});return db[_0x1bf6[128]][_0x1bf6[98]]({where:{id:_0x5e01x29[_0x1bf6[127]]}})};return null})[_0x1bf6[44]](handleEntityNotFound(_0x5e01x26,null))[_0x1bf6[44]](function(_0x5e01x29){if(_0x5e01x29){return _0x5e01x29[_0x1bf6[60]]({UserId:_0x5e01x20[_0x1bf6[100]][_0x1bf6[109]],read1stAt:_[_0x1bf6[126]](_0x5e01x29[_0x1bf6[125]])?moment()[_0x1bf6[108]](_0x1bf6[107]):undefined})};return null})[_0x1bf6[44]](function(_0x5e01x29){if(_0x5e01x29){_0x5e01x40[_0x1bf6[118]]= _0x5e01x29[_0x1bf6[119]]({plain:true});interaction_log[_0x1bf6[37]](_0x1bf6[120],_0x5e01x20[_0x1bf6[110]][_0x1bf6[96]],_0x5e01x20[_0x1bf6[110]][_0x1bf6[63]],_0x5e01x20[_0x1bf6[110]][_0x1bf6[121]],_0x5e01x40[_0x1bf6[118]][_0x1bf6[96]],_0x5e01x20[_0x1bf6[100]]?JSON[_0x1bf6[39]](_0x5e01x20[_0x1bf6[100]]):_0x1bf6[122]);return respondWithRpcPromise(_0x1bf6[123],_0x1bf6[124],_0x5e01x40)};return null})[_0x1bf6[44]](function(_0x5e01x29){if(_0x5e01x29){if(_0x5e01x20[_0x1bf6[100]][_0x1bf6[111]]){_0x5e01x40[_0x1bf6[42]][_0x1bf6[112]]= util[_0x1bf6[108]](_0x1bf6[113],_0x5e01x20[_0x1bf6[110]][_0x1bf6[63]]);_0x5e01x40[_0x1bf6[42]][_0x1bf6[114]]= _0x5e01x40[_0x1bf6[114]];_0x5e01x40[_0x1bf6[42]][_0x1bf6[115]]= _0x1bf6[103];return respondWithRpcPromise(_0x1bf6[116],_0x1bf6[116],{event:_0x1bf6[117],message:_0x5e01x40[_0x1bf6[42]]},client9002)[_0x1bf6[44]](function(){return _0x5e01x40})};return _0x5e01x40};return null})[_0x1bf6[44]](respondWithResult(_0x5e01x26,null))[_0x1bf6[35]](handleError(_0x5e01x26,null))};var interaction_log=require(_0x1bf6[21])(_0x1bf6[102]);exports[_0x1bf6[58]]= function(_0x5e01x20,_0x5e01x26,_0x5e01x3f){var _0x5e01x40={agent:{},channel:_0x1bf6[104]};if(_0x5e01x20[_0x1bf6[100]][_0x1bf6[96]]){delete _0x5e01x20[_0x1bf6[100]][_0x1bf6[96]]};_0x5e01x20[_0x1bf6[100]][_0x1bf6[109]]= _0x5e01x20[_0x1bf6[100]][_0x1bf6[109]]|| _0x5e01x20[_0x1bf6[110]][_0x1bf6[96]];_0x5e01x40[_0x1bf6[131]][_0x1bf6[96]]= _0x5e01x20[_0x1bf6[100]][_0x1bf6[109]];return db[_0x1bf6[68]][_0x1bf6[98]]({where:{id:_0x5e01x20[_0x1bf6[97]][_0x1bf6[96]],UserId:null}})[_0x1bf6[44]](handleEntityNotFound(_0x5e01x26,null))[_0x1bf6[44]](function(_0x5e01x29){if(_0x5e01x29){_0x5e01x40[_0x1bf6[42]]= _0x5e01x29[_0x1bf6[119]]({plain:true});return db[_0x1bf6[128]][_0x1bf6[98]]({where:{id:_0x5e01x29[_0x1bf6[127]]}})};return null})[_0x1bf6[44]](handleEntityNotFound(_0x5e01x26,null))[_0x1bf6[44]](function(_0x5e01x29){if(_0x5e01x29){_0x5e01x40[_0x1bf6[118]]= _0x5e01x29[_0x1bf6[119]]({plain:true});interaction_log[_0x1bf6[37]](_0x1bf6[133],_0x5e01x20[_0x1bf6[110]][_0x1bf6[96]],_0x5e01x20[_0x1bf6[110]][_0x1bf6[63]],_0x5e01x20[_0x1bf6[110]][_0x1bf6[121]],_0x5e01x40[_0x1bf6[118]][_0x1bf6[96]],_0x5e01x20[_0x1bf6[100]]?JSON[_0x1bf6[39]](_0x5e01x20[_0x1bf6[100]]):_0x1bf6[122]);return respondWithRpcPromise(_0x1bf6[134],_0x1bf6[135],_0x5e01x40)};return null})[_0x1bf6[44]](function(_0x5e01x29){if(_0x5e01x29){_0x5e01x29[_0x1bf6[42]][_0x1bf6[112]]= util[_0x1bf6[108]](_0x1bf6[113],_0x5e01x20[_0x1bf6[110]][_0x1bf6[63]]);_0x5e01x29[_0x1bf6[42]][_0x1bf6[114]]= _0x5e01x40[_0x1bf6[114]];_0x5e01x29[_0x1bf6[42]][_0x1bf6[115]]= _0x1bf6[58];respondWithRpcPromise(_0x1bf6[116],_0x1bf6[116],{event:_0x1bf6[132],message:_0x5e01x29[_0x1bf6[42]]},client9002);return _0x5e01x40};return null})[_0x1bf6[44]](respondWithResult(_0x5e01x26,null))[_0x1bf6[35]](handleError(_0x5e01x26,null))};exports[_0x1bf6[48]]= function(_0x5e01x20,_0x5e01x26,_0x5e01x3f){if(_0x5e01x20[_0x1bf6[100]][_0x1bf6[96]]){delete _0x5e01x20[_0x1bf6[100]][_0x1bf6[96]]};var _0x5e01x41;return db[_0x1bf6[68]][_0x1bf6[98]]({where:{id:_0x5e01x20[_0x1bf6[97]][_0x1bf6[96]]}})[_0x1bf6[44]](handleEntityNotFound(_0x5e01x26,null))[_0x1bf6[44]](function(_0x5e01x29){if(_0x5e01x29){_0x5e01x41= _0x5e01x29;return db[_0x1bf6[148]][_0x1bf6[98]]({where:{id:_0x5e01x29[_0x1bf6[147]]}})}})[_0x1bf6[44]](handleEntityNotFound(_0x5e01x26,null))[_0x1bf6[44]](function(_0x5e01x29){if(_0x5e01x29){logger[_0x1bf6[40]](_0x1bf6[38],_0x1bf6[48],_0x1bf6[136],_0x5e01x29[_0x1bf6[137]],util[_0x1bf6[138]](_0x5e01x20[_0x1bf6[100]],{showHidden:false,depth:null}));switch(_0x5e01x29[_0x1bf6[137]]){case _0x1bf6[141]:if(_0x5e01x20[_0x1bf6[100]][_0x1bf6[139]]&& _0x5e01x20[_0x1bf6[100]][_0x1bf6[139]]=== _0x5e01x41[_0x1bf6[140]]){return _0x5e01x41[_0x1bf6[60]]({read:true})};break;case _0x1bf6[146]:if(_0x5e01x20[_0x1bf6[100]][_0x1bf6[142]]&& _0x5e01x20[_0x1bf6[100]][_0x1bf6[142]]=== _0x5e01x41[_0x1bf6[140]]&& _[_0x1bf6[145]]([_0x1bf6[143],_0x1bf6[144]],_0x5e01x20[_0x1bf6[100]].Status)>= 0){return _0x5e01x41[_0x1bf6[60]]({read:true})};break};return _0x5e01x41}})[_0x1bf6[44]](respondWithResult(_0x5e01x26,null))[_0x1bf6[35]](handleError(_0x5e01x26,null))}
\ No newline at end of file
+var _0x866a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x6D\x73\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x61\x63\x63\x65\x70\x74","\x73\x6D\x73","\x72\x65\x61\x64","\x72\x65\x61\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x55\x73\x65\x72\x49\x64","\x75\x73\x65\x72","\x6D\x61\x6E\x75\x61\x6C","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x53\x49\x50\x2F\x25\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x65\x76\x65\x6E\x74","\x45\x76\x65\x6E\x74\x4D\x61\x6E\x61\x67\x65\x72","\x61\x63\x63\x65\x70\x74\x6D\x65\x73\x73\x61\x67\x65","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74","\x5B\x53\x4D\x53\x4D\x45\x53\x53\x41\x47\x45\x3A\x41\x43\x43\x45\x50\x54\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x72\x6F\x6C\x65","\x6E\x75\x6C\x6C","\x41\x63\x63\x65\x70\x74\x4D\x65\x73\x73\x61\x67\x65","\x61\x63\x63\x65\x70\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x61\x64\x31\x73\x74\x41\x74","\x69\x73\x4E\x69\x6C","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x61\x67\x65\x6E\x74","\x72\x65\x6A\x65\x63\x74\x6D\x65\x73\x73\x61\x67\x65","\x5B\x53\x4D\x53\x4D\x45\x53\x53\x41\x47\x45\x3A\x52\x45\x4A\x45\x43\x54\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x52\x65\x6A\x65\x63\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x6A\x65\x63\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x63\x65\x69\x76\x65\x64\x20\x64\x65\x6C\x69\x76\x65\x72\x79\x20\x72\x65\x70\x6F\x72\x74\x20\x66\x72\x6F\x6D","\x74\x79\x70\x65","\x69\x6E\x73\x70\x65\x63\x74","\x4D\x65\x73\x73\x61\x67\x65\x53\x69\x64","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x74\x77\x69\x6C\x69\x6F","\x4D\x65\x73\x73\x61\x67\x65\x55\x55\x49\x44","\x73\x65\x6E\x74","\x64\x65\x6C\x69\x76\x65\x72\x65\x64","\x69\x6E\x64\x65\x78\x4F\x66","\x70\x6C\x69\x76\x6F","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74"];_0x866a[0];var jsonpatch=require(_0x866a[1]);var rp=require(_0x866a[2]);var moment=require(_0x866a[3]);var BPromise=require(_0x866a[4]);var Mustache=require(_0x866a[5]);var util=require(_0x866a[6]);var path=require(_0x866a[7]);var sox=require(_0x866a[8]);var csv=require(_0x866a[9]);var ejs=require(_0x866a[10]);var fs=require(_0x866a[11]);var _=require(_0x866a[12]);var squel=require(_0x866a[13]);var crypto=require(_0x866a[14]);var jsforce=require(_0x866a[15]);var deskjs=require(_0x866a[16]);var toCsv=require(_0x866a[9]);var querystring=require(_0x866a[17]);var Papa=require(_0x866a[18]);var qs=require(_0x866a[19]);var logger=require(_0x866a[21])(_0x866a[20]);var utils=require(_0x866a[22]);var config=require(_0x866a[23]);var db=require(_0x866a[25])[_0x866a[24]];var socket=require(_0x866a[27])({host:_0x866a[26],port:6379});require(_0x866a[29])[_0x866a[28]](socket);var jayson=require(_0x866a[30]);var client=jayson[_0x866a[32]][_0x866a[31]]({port:9004});var client9002=jayson[_0x866a[32]][_0x866a[31]]({port:9002});function respondWithRpcPromise(_0xa1b3x1e,_0xa1b3x1f,_0xa1b3x20,_0xa1b3x21){return  new BPromise(function(_0xa1b3x22,_0xa1b3x23){var _0xa1b3x24=(_0xa1b3x21|| client);return _0xa1b3x24[_0x866a[45]](_0xa1b3x1e,_0xa1b3x20)[_0x866a[44]](function(_0xa1b3x26){logger[_0x866a[37]](_0x866a[33],_0xa1b3x1f,_0x866a[36]);logger[_0x866a[40]](_0x866a[38],_0xa1b3x1f,_0x866a[36],JSON[_0x866a[39]](_0xa1b3x26));if(_0xa1b3x26[_0x866a[34]]){if(_0xa1b3x26[_0x866a[34]][_0x866a[41]]=== 500){logger[_0x866a[34]](_0x866a[33],_0xa1b3x1f,_0xa1b3x26[_0x866a[34]][_0x866a[42]]);return _0xa1b3x23(_0xa1b3x26[_0x866a[34]][_0x866a[42]])};logger[_0x866a[34]](_0x866a[33],_0xa1b3x1f,_0xa1b3x26[_0x866a[34]][_0x866a[42]]);return _0xa1b3x22(_0xa1b3x26[_0x866a[34]][_0x866a[42]])}else {logger[_0x866a[37]](_0x866a[33],_0xa1b3x1f,_0x866a[36]);_0xa1b3x22(_0xa1b3x26[_0x866a[43]][_0x866a[42]])}})[_0x866a[35]](function(_0xa1b3x25){logger[_0x866a[34]](_0x866a[33],_0xa1b3x1f,_0xa1b3x25);_0xa1b3x23(_0xa1b3x25)})})}function respondWithStatusCode(_0xa1b3x26,_0xa1b3x28){_0xa1b3x28= _0xa1b3x28|| 204;return function(_0xa1b3x29){if(_0xa1b3x29){return _0xa1b3x26[_0x866a[46]](_0xa1b3x28)};return _0xa1b3x26[_0x866a[48]](_0xa1b3x28)[_0x866a[47]]()}}function respondWithResult(_0xa1b3x26,_0xa1b3x28){_0xa1b3x28= _0xa1b3x28|| 200;return function(_0xa1b3x29){if(_0xa1b3x29){return _0xa1b3x26[_0x866a[48]](_0xa1b3x28)[_0x866a[49]](_0xa1b3x29)}}}function respondWithFilteredResult(_0xa1b3x26,_0xa1b3x2c){return function(_0xa1b3x29){if(_0xa1b3x29){var _0xa1b3x2d=_0xa1b3x29[_0x866a[50]],_0xa1b3x2e=_0xa1b3x2c[_0x866a[51]],_0xa1b3x2f=_0xa1b3x2c[_0x866a[51]]+ _0xa1b3x2c[_0x866a[52]],_0xa1b3x28;if(_0xa1b3x2f>= _0xa1b3x2d){_0xa1b3x2f= _0xa1b3x2d;_0xa1b3x28= 200}else {_0xa1b3x28= 206};_0xa1b3x26[_0x866a[48]](_0xa1b3x28);return _0xa1b3x26[_0x866a[56]](_0x866a[53],_0xa1b3x2e+ _0x866a[54]+ _0xa1b3x2f+ _0x866a[55]+ _0xa1b3x2d)[_0x866a[49]](_0xa1b3x29)};return null}}function patchUpdates(_0xa1b3x31){return function(_0xa1b3x29){try{jsonpatch[_0x866a[57]](_0xa1b3x29,_0xa1b3x31,true)}catch(err){return BPromise[_0x866a[58]](err)};return _0xa1b3x29[_0x866a[59]]()}}function saveUpdates(_0xa1b3x33,_0xa1b3x28){return function(_0xa1b3x29){if(_0xa1b3x29){return _0xa1b3x29[_0x866a[60]](_0xa1b3x33)[_0x866a[44]](function(_0xa1b3x34){return _0xa1b3x34})};return null}}function removeEntity(_0xa1b3x26,_0xa1b3x28){return function(_0xa1b3x29){if(_0xa1b3x29){return _0xa1b3x29[_0x866a[61]]()[_0x866a[44]](function(){_0xa1b3x26[_0x866a[48]](204)[_0x866a[47]]()})}}}function handleEntityNotFound(_0xa1b3x26,_0xa1b3x28){return function(_0xa1b3x29){if(!_0xa1b3x29){_0xa1b3x26[_0x866a[46]](404)};return _0xa1b3x29}}function handleError(_0xa1b3x26,_0xa1b3x28){_0xa1b3x28= _0xa1b3x28|| 500;return function(_0xa1b3x25){logger[_0x866a[34]](_0xa1b3x25[_0x866a[62]]);if(_0xa1b3x25[_0x866a[63]]){delete _0xa1b3x25[_0x866a[63]]};_0xa1b3x26[_0x866a[48]](_0xa1b3x28)[_0x866a[64]](_0xa1b3x25)}}exports[_0x866a[65]]= function(_0xa1b3x20,_0xa1b3x26){var _0xa1b3x2c={},_0xa1b3x38={},_0xa1b3x39={count:0,rows:[]};_0xa1b3x38[_0x866a[66]]= _[_0x866a[69]](db[_0x866a[68]][_0x866a[67]]);var _0xa1b3x3a={dateStart:_0xa1b3x20[_0x866a[71]][_0x866a[70]],dateEnd:_0xa1b3x20[_0x866a[71]][_0x866a[72]]};delete _0xa1b3x20[_0x866a[71]][_0x866a[70]];delete _0xa1b3x20[_0x866a[71]][_0x866a[72]];_0xa1b3x38[_0x866a[71]]= _[_0x866a[69]](_0xa1b3x20[_0x866a[71]]);_0xa1b3x38[_0x866a[73]]= _[_0x866a[74]](_0xa1b3x38[_0x866a[66]],_0xa1b3x38[_0x866a[71]]);_0xa1b3x2c[_0x866a[75]]= _[_0x866a[74]](_0xa1b3x38[_0x866a[66]],qs[_0x866a[76]](_0xa1b3x20[_0x866a[71]][_0x866a[76]]));_0xa1b3x2c[_0x866a[75]]= (_0xa1b3x2c[_0x866a[75]][_0x866a[77]])?_0xa1b3x2c[_0x866a[75]]:_0xa1b3x38[_0x866a[66]];if(!_0xa1b3x20[_0x866a[71]][_0x866a[79]](_0x866a[78])){_0xa1b3x2c[_0x866a[52]]= qs[_0x866a[52]](_0xa1b3x20[_0x866a[71]][_0x866a[52]]);_0xa1b3x2c[_0x866a[51]]= qs[_0x866a[51]](_0xa1b3x20[_0x866a[71]][_0x866a[51]])};_0xa1b3x2c[_0x866a[80]]= qs[_0x866a[81]](_0xa1b3x20[_0x866a[71]][_0x866a[81]]);_0xa1b3x2c[_0x866a[82]]= qs[_0x866a[73]](_[_0x866a[83]](_0xa1b3x20[_0x866a[71]],_0xa1b3x38[_0x866a[73]]));if(_0xa1b3x3a[_0x866a[70]]){if(_0xa1b3x3a[_0x866a[72]]){_0xa1b3x3a[_0x866a[72]]= moment(_0xa1b3x3a[_0x866a[72]])[_0x866a[85]](1,_0x866a[84])}else {_0xa1b3x3a[_0x866a[72]]= moment(_0xa1b3x3a[_0x866a[70]])[_0x866a[85]](1,_0x866a[84])};_[_0x866a[86]](_0xa1b3x2c[_0x866a[82]],{createdAt:{$gte:_0xa1b3x3a[_0x866a[70]],$lte:_0xa1b3x3a[_0x866a[72]]}})};if(_0xa1b3x20[_0x866a[71]][_0x866a[87]]){_0xa1b3x2c[_0x866a[82]]= _[_0x866a[86]](_0xa1b3x2c[_0x866a[82]],{$or:_[_0x866a[89]](_0xa1b3x2c[_0x866a[75]],function(_0xa1b3x3b){var _0xa1b3x39={};_0xa1b3x39[_0xa1b3x3b]= {$like:_0x866a[88]+ _0xa1b3x20[_0x866a[71]][_0x866a[87]]+ _0x866a[88]};return _0xa1b3x39})})};_0xa1b3x2c= _[_0x866a[86]]({},_0xa1b3x2c,_0xa1b3x20[_0x866a[90]]);var _0xa1b3x3c={where:_0xa1b3x2c[_0x866a[82]]};return db[_0x866a[68]][_0x866a[50]](_0xa1b3x3c)[_0x866a[44]](function(_0xa1b3x2d){_0xa1b3x39[_0x866a[50]]= _0xa1b3x2d;if(_0xa1b3x20[_0x866a[71]][_0x866a[92]]){_0xa1b3x2c[_0x866a[93]]= [{all:true}]};return db[_0x866a[68]][_0x866a[94]](_0xa1b3x2c)})[_0x866a[44]](function(_0xa1b3x3d){_0xa1b3x39[_0x866a[91]]= _0xa1b3x3d;return _0xa1b3x39})[_0x866a[44]](respondWithFilteredResult(_0xa1b3x26,_0xa1b3x2c))[_0x866a[35]](handleError(_0xa1b3x26,null))};exports[_0x866a[95]]= function(_0xa1b3x20,_0xa1b3x26){var _0xa1b3x2c={raw:true,where:{id:_0xa1b3x20[_0x866a[97]][_0x866a[96]]}},_0xa1b3x38={};_0xa1b3x38[_0x866a[66]]= _[_0x866a[69]](db[_0x866a[68]][_0x866a[67]]);_0xa1b3x38[_0x866a[71]]= _[_0x866a[69]](_0xa1b3x20[_0x866a[71]]);_0xa1b3x38[_0x866a[73]]= _[_0x866a[74]](_0xa1b3x38[_0x866a[66]],_0xa1b3x38[_0x866a[71]]);_0xa1b3x2c[_0x866a[75]]= _[_0x866a[74]](_0xa1b3x38[_0x866a[66]],qs[_0x866a[76]](_0xa1b3x20[_0x866a[71]][_0x866a[76]]));_0xa1b3x2c[_0x866a[75]]= (_0xa1b3x2c[_0x866a[75]][_0x866a[77]])?_0xa1b3x2c[_0x866a[75]]:_0xa1b3x38[_0x866a[66]];if(_0xa1b3x20[_0x866a[71]][_0x866a[92]]){_0xa1b3x2c[_0x866a[93]]= [{all:true}]};_0xa1b3x2c= _[_0x866a[86]]({},_0xa1b3x2c,_0xa1b3x20[_0x866a[90]]);return db[_0x866a[68]][_0x866a[98]](_0xa1b3x2c)[_0x866a[44]](handleEntityNotFound(_0xa1b3x26,null))[_0x866a[44]](respondWithResult(_0xa1b3x26,null))[_0x866a[35]](handleError(_0xa1b3x26,null))};exports[_0x866a[99]]= function(_0xa1b3x20,_0xa1b3x26){return db[_0x866a[68]][_0x866a[99]](_0xa1b3x20[_0x866a[100]],{})[_0x866a[44]](respondWithResult(_0xa1b3x26,201))[_0x866a[35]](handleError(_0xa1b3x26,null))};exports[_0x866a[60]]= function(_0xa1b3x20,_0xa1b3x26){if(_0xa1b3x20[_0x866a[100]][_0x866a[96]]){delete _0xa1b3x20[_0x866a[100]][_0x866a[96]]};return db[_0x866a[68]][_0x866a[98]]({where:{id:_0xa1b3x20[_0x866a[97]][_0x866a[96]]}})[_0x866a[44]](handleEntityNotFound(_0xa1b3x26,null))[_0x866a[44]](saveUpdates(_0xa1b3x20[_0x866a[100]],null))[_0x866a[44]](respondWithResult(_0xa1b3x26,null))[_0x866a[35]](handleError(_0xa1b3x26,null))};exports[_0x866a[61]]= function(_0xa1b3x20,_0xa1b3x26){return db[_0x866a[68]][_0x866a[98]]({where:{id:_0xa1b3x20[_0x866a[97]][_0x866a[96]]}})[_0x866a[44]](handleEntityNotFound(_0xa1b3x26,null))[_0x866a[44]](removeEntity(_0xa1b3x26,null))[_0x866a[35]](handleError(_0xa1b3x26,null))};exports[_0x866a[101]]= function(_0xa1b3x20,_0xa1b3x26){return db[_0x866a[68]][_0x866a[101]]()[_0x866a[44]](respondWithResult(_0xa1b3x26,null))[_0x866a[35]](handleError(_0xa1b3x26,null))};var interaction_log=require(_0x866a[21])(_0x866a[102]);exports[_0x866a[103]]= function(_0xa1b3x20,_0xa1b3x26,_0xa1b3x3f){var _0xa1b3x40={channel:_0x866a[104]};if(_0xa1b3x20[_0x866a[100]][_0x866a[96]]){delete _0xa1b3x20[_0x866a[100]][_0x866a[96]]};_0xa1b3x20[_0x866a[100]][_0x866a[105]]= true;_0xa1b3x20[_0x866a[100]][_0x866a[106]]= moment()[_0x866a[108]](_0x866a[107]);_0xa1b3x20[_0x866a[100]][_0x866a[109]]= _0xa1b3x20[_0x866a[100]][_0x866a[109]]|| _0xa1b3x20[_0x866a[110]][_0x866a[96]];return db[_0x866a[68]][_0x866a[98]]({where:{id:_0xa1b3x20[_0x866a[97]][_0x866a[96]],UserId:null},include:[{model:db[_0x866a[129]],as:_0x866a[130]}]})[_0x866a[44]](handleEntityNotFound(_0xa1b3x26,null))[_0x866a[44]](saveUpdates(_0xa1b3x20[_0x866a[100]],null))[_0x866a[44]](function(_0xa1b3x29){if(_0xa1b3x29){_0xa1b3x40[_0x866a[42]]= _0xa1b3x29[_0x866a[119]]({plain:true});return db[_0x866a[128]][_0x866a[98]]({where:{id:_0xa1b3x29[_0x866a[127]]}})};return null})[_0x866a[44]](handleEntityNotFound(_0xa1b3x26,null))[_0x866a[44]](function(_0xa1b3x29){if(_0xa1b3x29){return _0xa1b3x29[_0x866a[60]]({UserId:_0xa1b3x20[_0x866a[100]][_0x866a[109]],read1stAt:_[_0x866a[126]](_0xa1b3x29[_0x866a[125]])?moment()[_0x866a[108]](_0x866a[107]):undefined})};return null})[_0x866a[44]](function(_0xa1b3x29){if(_0xa1b3x29){_0xa1b3x40[_0x866a[118]]= _0xa1b3x29[_0x866a[119]]({plain:true});interaction_log[_0x866a[37]](_0x866a[120],_0xa1b3x20[_0x866a[110]][_0x866a[96]],_0xa1b3x20[_0x866a[110]][_0x866a[63]],_0xa1b3x20[_0x866a[110]][_0x866a[121]],_0xa1b3x40[_0x866a[118]][_0x866a[96]],_0xa1b3x20[_0x866a[100]]?JSON[_0x866a[39]](_0xa1b3x20[_0x866a[100]]):_0x866a[122]);return respondWithRpcPromise(_0x866a[123],_0x866a[124],_0xa1b3x40)};return null})[_0x866a[44]](function(_0xa1b3x29){if(_0xa1b3x29){if(_0xa1b3x20[_0x866a[100]][_0x866a[111]]){_0xa1b3x40[_0x866a[42]][_0x866a[112]]= util[_0x866a[108]](_0x866a[113],_0xa1b3x20[_0x866a[110]][_0x866a[63]]);_0xa1b3x40[_0x866a[42]][_0x866a[114]]= _0xa1b3x40[_0x866a[114]];_0xa1b3x40[_0x866a[42]][_0x866a[115]]= _0x866a[103];return respondWithRpcPromise(_0x866a[116],_0x866a[116],{event:_0x866a[117],message:_0xa1b3x40[_0x866a[42]]},client9002)[_0x866a[44]](function(){return _0xa1b3x40})};return _0xa1b3x40};return null})[_0x866a[44]](respondWithResult(_0xa1b3x26,null))[_0x866a[35]](handleError(_0xa1b3x26,null))};var interaction_log=require(_0x866a[21])(_0x866a[102]);exports[_0x866a[58]]= function(_0xa1b3x20,_0xa1b3x26,_0xa1b3x3f){var _0xa1b3x40={agent:{},channel:_0x866a[104]};if(_0xa1b3x20[_0x866a[100]][_0x866a[96]]){delete _0xa1b3x20[_0x866a[100]][_0x866a[96]]};_0xa1b3x20[_0x866a[100]][_0x866a[109]]= _0xa1b3x20[_0x866a[100]][_0x866a[109]]|| _0xa1b3x20[_0x866a[110]][_0x866a[96]];_0xa1b3x40[_0x866a[131]][_0x866a[96]]= _0xa1b3x20[_0x866a[100]][_0x866a[109]];return db[_0x866a[68]][_0x866a[98]]({where:{id:_0xa1b3x20[_0x866a[97]][_0x866a[96]],UserId:null}})[_0x866a[44]](handleEntityNotFound(_0xa1b3x26,null))[_0x866a[44]](function(_0xa1b3x29){if(_0xa1b3x29){_0xa1b3x40[_0x866a[42]]= _0xa1b3x29[_0x866a[119]]({plain:true});return db[_0x866a[128]][_0x866a[98]]({where:{id:_0xa1b3x29[_0x866a[127]]}})};return null})[_0x866a[44]](handleEntityNotFound(_0xa1b3x26,null))[_0x866a[44]](function(_0xa1b3x29){if(_0xa1b3x29){_0xa1b3x40[_0x866a[118]]= _0xa1b3x29[_0x866a[119]]({plain:true});interaction_log[_0x866a[37]](_0x866a[133],_0xa1b3x20[_0x866a[110]][_0x866a[96]],_0xa1b3x20[_0x866a[110]][_0x866a[63]],_0xa1b3x20[_0x866a[110]][_0x866a[121]],_0xa1b3x40[_0x866a[118]][_0x866a[96]],_0xa1b3x20[_0x866a[100]]?JSON[_0x866a[39]](_0xa1b3x20[_0x866a[100]]):_0x866a[122]);return respondWithRpcPromise(_0x866a[134],_0x866a[135],_0xa1b3x40)};return null})[_0x866a[44]](function(_0xa1b3x29){if(_0xa1b3x29){_0xa1b3x29[_0x866a[42]][_0x866a[112]]= util[_0x866a[108]](_0x866a[113],_0xa1b3x20[_0x866a[110]][_0x866a[63]]);_0xa1b3x29[_0x866a[42]][_0x866a[114]]= _0xa1b3x40[_0x866a[114]];_0xa1b3x29[_0x866a[42]][_0x866a[115]]= _0x866a[58];respondWithRpcPromise(_0x866a[116],_0x866a[116],{event:_0x866a[132],message:_0xa1b3x29[_0x866a[42]]},client9002);return _0xa1b3x40};return null})[_0x866a[44]](respondWithResult(_0xa1b3x26,null))[_0x866a[35]](handleError(_0xa1b3x26,null))};exports[_0x866a[48]]= function(_0xa1b3x20,_0xa1b3x26,_0xa1b3x3f){if(_0xa1b3x20[_0x866a[100]][_0x866a[96]]){delete _0xa1b3x20[_0x866a[100]][_0x866a[96]]};var _0xa1b3x41;return db[_0x866a[68]][_0x866a[98]]({where:{id:_0xa1b3x20[_0x866a[97]][_0x866a[96]]}})[_0x866a[44]](handleEntityNotFound(_0xa1b3x26,null))[_0x866a[44]](function(_0xa1b3x29){if(_0xa1b3x29){_0xa1b3x41= _0xa1b3x29;return db[_0x866a[148]][_0x866a[98]]({where:{id:_0xa1b3x29[_0x866a[147]]}})}})[_0x866a[44]](handleEntityNotFound(_0xa1b3x26,null))[_0x866a[44]](function(_0xa1b3x29){if(_0xa1b3x29){logger[_0x866a[40]](_0x866a[38],_0x866a[48],_0x866a[136],_0xa1b3x29[_0x866a[137]],util[_0x866a[138]](_0xa1b3x20[_0x866a[100]],{showHidden:false,depth:null}));switch(_0xa1b3x29[_0x866a[137]]){case _0x866a[141]:if(_0xa1b3x20[_0x866a[100]][_0x866a[139]]&& _0xa1b3x20[_0x866a[100]][_0x866a[139]]=== _0xa1b3x41[_0x866a[140]]){return _0xa1b3x41[_0x866a[60]]({read:true})};break;case _0x866a[146]:if(_0xa1b3x20[_0x866a[100]][_0x866a[142]]&& _0xa1b3x20[_0x866a[100]][_0x866a[142]]=== _0xa1b3x41[_0x866a[140]]&& _[_0x866a[145]]([_0x866a[143],_0x866a[144]],_0xa1b3x20[_0x866a[100]].Status)>= 0){return _0xa1b3x41[_0x866a[60]]({read:true})};break};return _0xa1b3x41}})[_0x866a[44]](respondWithResult(_0xa1b3x26,null))[_0x866a[35]](handleError(_0xa1b3x26,null))}
\ No newline at end of file
index aac04c4..3c90b9d 100644 (file)
@@ -1 +1 @@
-var _0x8b83=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x8b83[0];var EventEmitter=require(_0x8b83[1]);var SmsMessage=require(_0x8b83[4])[_0x8b83[3]][_0x8b83[2]];var SmsMessageEvents= new EventEmitter();SmsMessageEvents[_0x8b83[5]](0);var events={afterCreate:_0x8b83[6],afterUpdate:_0x8b83[7],afterDestroy:_0x8b83[8]};function emitEvent(event){return function(_0x3f59x7,_0x3f59x8,_0x3f59x9){SmsMessageEvents[_0x8b83[11]](event+ _0x8b83[9]+ _0x3f59x7[_0x8b83[10]],_0x3f59x7);SmsMessageEvents[_0x8b83[11]](event,_0x3f59x7);_0x3f59x9(null)}}for(var e in events){if(events[_0x8b83[12]](e)){var event=events[e];SmsMessage[_0x8b83[13]](e,emitEvent(event))}};module[_0x8b83[14]]= SmsMessageEvents
\ No newline at end of file
+var _0x2a0d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x2a0d[0];var EventEmitter=require(_0x2a0d[1]);var SmsMessage=require(_0x2a0d[4])[_0x2a0d[3]][_0x2a0d[2]];var SmsMessageEvents= new EventEmitter();SmsMessageEvents[_0x2a0d[5]](0);var events={afterCreate:_0x2a0d[6],afterUpdate:_0x2a0d[7],afterDestroy:_0x2a0d[8]};function emitEvent(event){return function(_0xd86fx7,_0xd86fx8,_0xd86fx9){SmsMessageEvents[_0x2a0d[11]](event+ _0x2a0d[9]+ _0xd86fx7[_0x2a0d[10]],_0xd86fx7);SmsMessageEvents[_0x2a0d[11]](event,_0xd86fx7);_0xd86fx9(null)}}for(var e in events){if(events[_0x2a0d[12]](e)){var event=events[e];SmsMessage[_0x2a0d[13]](e,emitEvent(event))}};module[_0x2a0d[14]]= SmsMessageEvents
\ No newline at end of file
index 9f46e27..aa0bdf7 100644 (file)
@@ -1 +1 @@
-var _0x49d4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x6D\x6F\x64\x65\x6C\x73","\x67\x65\x74","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x69\x6E","\x6F\x75\x74","\x73\x65\x63\x72\x65\x74","\x69\x73\x4E\x69\x6C","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x66\x69\x6E\x61\x6C\x6C\x79","\x74\x79\x70\x65","\x74\x77\x69\x6C\x69\x6F","\x61\x63\x63\x6F\x75\x6E\x74\x53\x69\x64","\x61\x75\x74\x68\x54\x6F\x6B\x65\x6E","\x70\x68\x6F\x6E\x65","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x69\x6E\x73\x70\x65\x63\x74","\x73\x69\x64","\x72\x65\x6D\x6F\x74\x65","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x6D\x65\x73\x73\x61\x67\x65\x73\x2F","\x69\x64","\x2F\x73\x74\x61\x74\x75\x73\x3F\x74\x6F\x6B\x65\x6E\x3D","\x74\x6F\x6B\x65\x6E","\x63\x72\x65\x61\x74\x65","\x6D\x65\x73\x73\x61\x67\x65\x73","\x4D\x69\x73\x73\x69\x6E\x67\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x3A\x20\x70\x68\x6F\x6E\x65\x2C\x20\x61\x63\x63\x6F\x75\x6E\x74\x53\x69\x64\x20\x6F\x72\x20\x61\x75\x74\x68\x54\x6F\x6B\x65\x6E","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x55\x54\x46\x2D\x38","\x6D\x65\x74\x68\x6F\x64","\x73\x65\x6E\x64\x5F\x73\x6D\x73\x5F\x62\x61\x73\x69\x63","\x62\x61\x73\x69\x63","\x73\x65\x6E\x64\x5F\x73\x6D\x73\x5F\x63\x6C\x61\x73\x73\x69\x63","\x73\x65\x6E\x64\x65\x72\x5F\x6E\x75\x6D\x62\x65\x72","\x73\x65\x6E\x64\x65\x72\x53\x74\x72\x69\x6E\x67","\x73\x65\x6E\x64\x65\x72\x5F\x73\x74\x72\x69\x6E\x67","\x63\x6C\x61\x73\x73\x69\x63","\x73\x65\x6E\x64\x5F\x73\x6D\x73\x5F\x63\x6C\x61\x73\x73\x69\x63\x5F\x72\x65\x70\x6F\x72\x74","\x63\x6C\x61\x73\x73\x69\x63\x2B","\x73\x6D\x73\x4D\x65\x74\x68\x6F\x64","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x50\x4F\x53\x54","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x61\x74\x65\x77\x61\x79\x2E\x73\x6B\x65\x62\x62\x79\x2E\x69\x74\x2F\x61\x70\x69\x2F\x73\x65\x6E\x64\x2F\x73\x6D\x73\x65\x61\x73\x79\x2F\x61\x64\x76\x61\x6E\x63\x65\x64\x2F\x68\x74\x74\x70\x2E\x70\x68\x70","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x6C\x65\x6E\x67\x74\x68","\x75\x74\x66\x38","\x73\x6B\x65\x62\x62\x79","\x70\x61\x72\x73\x65","\x73\x74\x61\x74\x75\x73","\x73\x75\x63\x63\x65\x73\x73","\x64\x65\x6C\x69\x76\x65\x72\x79\x52\x65\x70\x6F\x72\x74","\x72\x65\x61\x64","\x4D\x69\x73\x73\x69\x6E\x67\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x3A\x20\x75\x73\x65\x72\x6E\x61\x6D\x65\x2C\x20\x70\x61\x73\x73\x77\x6F\x72\x64","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x73\x6D\x73\x61\x70\x69\x2E\x63\x6F\x6E\x6E\x65\x63\x74\x65\x6C\x2E\x73\x65\x2F\x61\x70\x69\x2F\x73\x65\x6E\x64\x2F","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x6C","\x72\x65\x71\x75\x65\x73\x74\x69\x64","\x4D\x69\x73\x73\x69\x6E\x67\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x3A\x20\x61\x75\x74\x68\x54\x6F\x6B\x65\x6E","\x78\x43\x41\x4C\x4C\x59\x20\x4D\x6F\x74\x69\x6F\x6E","\x25\x73\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x72\x65\x73\x74\x2E\x63\x6C\x69\x63\x6B\x73\x65\x6E\x64\x2E\x63\x6F\x6D\x2F\x76\x33\x2F\x73\x6D\x73\x2F\x73\x65\x6E\x64","\x42\x61\x73\x69\x63\x20\x25\x73","\x62\x61\x73\x65\x36\x34","\x63\x6C\x69\x63\x6B\x53\x65\x6E\x64","\x68\x74\x74\x70\x5F\x63\x6F\x64\x65","\x64\x61\x74\x61","\x71\x75\x65\x75\x65\x64\x5F\x63\x6F\x75\x6E\x74","\x68\x65\x61\x64","\x6D\x65\x73\x73\x61\x67\x65\x5F\x69\x64","\x63\x6C\x69\x63\x6B\x73\x65\x6E\x64","\x61\x75\x74\x68\x49\x64","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x70\x69\x2E\x70\x6C\x69\x76\x6F\x2E\x63\x6F\x6D\x2F\x76\x31\x2F\x41\x63\x63\x6F\x75\x6E\x74\x2F\x25\x73\x2F\x4D\x65\x73\x73\x61\x67\x65\x2F","\x70\x6C\x69\x76\x6F","\x6D\x65\x73\x73\x61\x67\x65\x5F\x75\x75\x69\x64","\x4D\x69\x73\x73\x69\x6E\x67\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x3A\x20\x61\x75\x74\x68\x49\x64\x2C\x20\x61\x75\x74\x68\x54\x6F\x6B\x65\x6E","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x66\x69\x6E\x64","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x75\x74\x66\x38\x6D\x62\x34","\x75\x74\x66\x38\x6D\x62\x34\x5F\x75\x6E\x69\x63\x6F\x64\x65\x5F\x63\x69","\x64\x65\x66\x69\x6E\x65"];_0x49d4[0];var _=require(_0x49d4[1]);var util=require(_0x49d4[2]);var logger=require(_0x49d4[4])(_0x49d4[3]);var moment=require(_0x49d4[5]);var BPromise=require(_0x49d4[6]);var rp=require(_0x49d4[7]);var attributes=require(_0x49d4[8]);module[_0x49d4[9]]= function(_0x4851x8,_0x4851x9){return _0x4851x8[_0x49d4[103]](_0x49d4[10],attributes,{tableName:_0x49d4[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x49d4[12],"\x66\x69\x65\x6C\x64\x73":[_0x49d4[12]]}],timestamps:true,hooks:{afterCreate:function(_0x4851xa,_0x4851xb,_0x4851xc){var _0x4851xd=_0x4851x8[_0x49d4[13]];var _0x4851xe=_0x4851xa[_0x49d4[14]]({plain:true});if((_0x4851xe[_0x49d4[16]][_0x49d4[15]]()=== _0x49d4[17])|| (_0x4851xe[_0x49d4[16]][_0x49d4[15]]()=== _0x49d4[18]&&  !_0x4851xe[_0x49d4[19]]&&  !_[_0x49d4[20]](_0x4851xe.UserId))){_0x4851xd[_0x49d4[29]][_0x49d4[28]]({where:{id:_0x4851xe[_0x49d4[27]]}})[_0x49d4[26]](function(_0x4851x10){if(_0x4851x10){_0x4851x10[_0x49d4[25]]({lastMsgAt:_0x4851xe[_0x49d4[23]],lastMsgDirection:_0x4851xe[_0x49d4[16]][_0x49d4[15]](),lastMsgBody:_0x4851xe[_0x49d4[24]]})}})[_0x49d4[22]](function(_0x4851xf){console[_0x49d4[21]](_0x4851xf)})};if(_0x4851xe[_0x49d4[16]]=== _0x49d4[18]&&  !_0x4851xe[_0x49d4[19]]){var _0x4851x11;_0x4851xd[_0x49d4[100]][_0x49d4[99]]({where:{id:_0x4851xe[_0x49d4[98]]},raw:true})[_0x49d4[26]](function(_0x4851x12){_0x4851x11= _0x4851x12;if(_0x4851x11&& _0x4851x11[_0x49d4[31]]){switch(_0x4851x11[_0x49d4[31]]){case _0x49d4[32]:var _0x4851x13=require(_0x49d4[32]);if(_0x4851x11[_0x49d4[33]]&& _0x4851x11[_0x49d4[34]]&& _0x4851x11[_0x49d4[35]]){var _0x4851x14= new _0x4851x13(_0x4851x11[_0x49d4[33]],_0x4851x11[_0x49d4[34]]);_0x4851x14[_0x49d4[46]][_0x49d4[45]]({body:_0x4851xe[_0x49d4[24]],to:_0x4851xe[_0x49d4[35]],from:_0x4851x11[_0x49d4[35]],statusCallback:_0x4851x11[_0x49d4[40]]+ _0x49d4[41]+ _0x4851xe[_0x49d4[42]]+ _0x49d4[43]+ _0x4851x11[_0x49d4[44]]})[_0x49d4[26]](function(_0x4851x15){if(_0x4851x15[_0x49d4[39]]){return _0x4851xa[_0x49d4[25]]({messageId:_0x4851x15[_0x49d4[39]]})}})[_0x49d4[22]](function(_0x4851xf){logger[_0x49d4[21]](_0x49d4[36],_0x49d4[37],_0x49d4[32],util[_0x49d4[38]](_0x4851xf,{showHidden:false,depth:null}))})}else {logger[_0x49d4[21]](_0x49d4[36],_0x49d4[37],_0x49d4[32],_0x49d4[47])};break;case _0x49d4[69]:var _0x4851x16=require(_0x49d4[48]);if(_0x4851x11[_0x49d4[49]]&& _0x4851x11[_0x49d4[50]]){var _0x4851x17={username:_0x4851x11[_0x49d4[49]],password:_0x4851x11[_0x49d4[50]],"\x72\x65\x63\x69\x70\x69\x65\x6E\x74\x73\x5B\x5D":[_0x4851xe[_0x49d4[35]]],text:_0x4851xe[_0x49d4[24]],charset:_0x49d4[51]};switch(_0x4851x11[_0x49d4[62]]){case _0x49d4[54]:_0x4851x17[_0x49d4[52]]= _0x49d4[53];break;case _0x49d4[59]:_0x4851x17[_0x49d4[52]]= _0x49d4[55];_0x4851x17[_0x49d4[56]]= _0x4851x11[_0x49d4[35]];if(_0x4851x11[_0x49d4[57]]){_0x4851x17[_0x49d4[58]]= _0x4851x11[_0x49d4[57]]}else {if(_0x4851x11[_0x49d4[35]]){_0x4851x17[_0x49d4[56]]= _0x4851x11[_0x49d4[35]]}};break;case _0x49d4[61]:_0x4851x17[_0x49d4[52]]= _0x49d4[60];_0x4851x17[_0x49d4[56]]= _0x4851x11[_0x49d4[35]];if(_0x4851x11[_0x49d4[57]]){_0x4851x17[_0x49d4[58]]= _0x4851x11[_0x49d4[57]]}else {if(_0x4851x11[_0x49d4[35]]){_0x4851x17[_0x49d4[56]]= _0x4851x11[_0x49d4[35]]}};break};var _0x4851x18=_0x4851x16[_0x49d4[63]](_0x4851x17);var _0x4851xb={method:_0x49d4[64],uri:_0x49d4[65],body:_0x4851x18,headers:{"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x49d4[66],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68":_0x4851x18[_0x49d4[67]],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67":_0x49d4[68]}};rp(_0x4851xb)[_0x49d4[26]](function(_0x4851x15){var _0x4851x19=_0x4851x16[_0x49d4[70]](_0x4851x15);if(_0x4851x19[_0x49d4[71]]== _0x49d4[72]){var _0x4851x18={messageId:_0x4851x19[_0x49d4[42]]};if(_0x4851x11[_0x49d4[62]]!== _0x49d4[61]||  !_0x4851x11[_0x49d4[73]]){_0x4851x18[_0x49d4[74]]= true};return _0x4851xa[_0x49d4[25]](_0x4851x18)}else {logger[_0x49d4[21]](_0x49d4[36],_0x49d4[37],_0x49d4[69],util[_0x49d4[38]](_0x4851x19,{showHidden:false,depth:null}))}})[_0x49d4[22]](function(_0x4851xf){logger[_0x49d4[21]](_0x49d4[36],_0x49d4[37],_0x49d4[69],util[_0x49d4[38]](_0x4851xf,{showHidden:false,depth:null}))})}else {logger[_0x49d4[21]](_0x49d4[36],_0x49d4[37],_0x49d4[69],_0x49d4[75])};break;case _0x49d4[77]:if(_0x4851x11[_0x49d4[34]]){var _0x4851x17={recipient:_0x4851xe[_0x49d4[35]],message:_0x4851xe[_0x49d4[24]],sender:_0x4851x11[_0x49d4[57]]|| _0x4851x11[_0x49d4[35]],authorization:_0x4851x11[_0x49d4[34]]};var _0x4851xb={method:_0x49d4[64],uri:_0x49d4[76],body:_0x4851x17,json:true};rp(_0x4851xb)[_0x49d4[26]](function(_0x4851x15){var _0x4851x18={messageId:_0x4851x15[_0x49d4[78]]};if(!_0x4851x11[_0x49d4[73]]){_0x4851x18[_0x49d4[74]]= true};return _0x4851xa[_0x49d4[25]](_0x4851x18)})[_0x49d4[22]](function(_0x4851xf){logger[_0x49d4[21]](_0x49d4[36],_0x49d4[37],_0x49d4[77],util[_0x49d4[38]](_0x4851xf,{showHidden:false,depth:null}))})}else {logger[_0x49d4[21]](_0x49d4[36],_0x49d4[37],_0x49d4[77],_0x49d4[79])};break;case _0x49d4[92]:if(_0x4851x11[_0x49d4[49]]&& _0x4851x11[_0x49d4[50]]){var _0x4851x17={messages:[{source:_0x49d4[80],to:_0x4851xe[_0x49d4[35]],body:_0x4851xe[_0x49d4[24]],from:_0x4851x11[_0x49d4[57]]|| _0x4851x11[_0x49d4[35]]}]};var _0x4851x1a=util[_0x49d4[82]](_0x49d4[81],_0x4851x11[_0x49d4[49]],_0x4851x11[_0x49d4[50]]);var _0x4851xb={method:_0x49d4[64],uri:_0x49d4[83],body:_0x4851x17,headers:{Authorization:util[_0x49d4[82]](_0x49d4[84], new Buffer(_0x4851x1a).toString(_0x49d4[85]))},json:true};rp(_0x4851xb)[_0x49d4[26]](function(_0x4851x15){if(_0x4851x15[_0x49d4[87]]>= 200&& _0x4851x15[_0x49d4[87]]<= 206){if(_0x4851x15[_0x49d4[88]]&& _0x4851x15[_0x49d4[88]][_0x49d4[89]]> 0){var _0x4851x1b=_[_0x49d4[90]](_0x4851x15[_0x49d4[88]][_0x49d4[46]]);var _0x4851x18={messageId:_0x4851x1b[_0x49d4[91]]};if(!_0x4851x11[_0x49d4[73]]){_0x4851x18[_0x49d4[74]]= true};return _0x4851xa[_0x49d4[25]](_0x4851x18)}else {logger[_0x49d4[21]](_0x49d4[36],_0x49d4[37],_0x49d4[86],util[_0x49d4[38]](_0x4851x15,{showHidden:false,depth:null}))}}else {logger[_0x49d4[21]](_0x49d4[36],_0x49d4[37],_0x49d4[86],util[_0x49d4[38]](_0x4851x15,{showHidden:false,depth:null}))}})[_0x49d4[22]](function(_0x4851xf){logger[_0x49d4[21]](_0x49d4[36],_0x49d4[37],_0x49d4[86],util[_0x49d4[38]](_0x4851xf,{showHidden:false,depth:null}))})}else {logger[_0x49d4[21]](_0x49d4[36],_0x49d4[37],_0x49d4[86],_0x49d4[75])};break;case _0x49d4[95]:if(_0x4851x11[_0x49d4[93]]&& _0x4851x11[_0x49d4[34]]){var _0x4851x17={dst:_0x4851xe[_0x49d4[35]],text:_0x4851xe[_0x49d4[24]],src:_0x4851x11[_0x49d4[57]]|| _0x4851x11[_0x49d4[35]],url:_0x4851x11[_0x49d4[40]]+ _0x49d4[41]+ _0x4851xe[_0x49d4[42]]+ _0x49d4[43]+ _0x4851x11[_0x49d4[44]]};var _0x4851x1a=util[_0x49d4[82]](_0x49d4[81],_0x4851x11[_0x49d4[93]],_0x4851x11[_0x49d4[34]]);var _0x4851xb={method:_0x49d4[64],uri:util[_0x49d4[82]](_0x49d4[94],_0x4851x11[_0x49d4[93]]),body:_0x4851x17,headers:{Authorization:util[_0x49d4[82]](_0x49d4[84], new Buffer(_0x4851x1a).toString(_0x49d4[85]))},json:true};rp(_0x4851xb)[_0x49d4[26]](function(_0x4851x15){var _0x4851x18={messageId:_0x4851x15[_0x49d4[96]][0]};return _0x4851xa[_0x49d4[25]](_0x4851x18)})[_0x49d4[22]](function(_0x4851xf){logger[_0x49d4[21]](_0x49d4[36],_0x49d4[37],_0x49d4[95],util[_0x49d4[38]](_0x4851xf,{showHidden:false,depth:null}))})}else {logger[_0x49d4[21]](_0x49d4[36],_0x49d4[37],_0x49d4[95],_0x49d4[97])};break}}})[_0x49d4[30]](function(){_0x4851xc()})}else {_0x4851xc()}}},charset:_0x49d4[101],collate:_0x49d4[102]})}
\ No newline at end of file
+var _0x8015=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x6D\x6F\x64\x65\x6C\x73","\x67\x65\x74","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x69\x6E","\x6F\x75\x74","\x73\x65\x63\x72\x65\x74","\x69\x73\x4E\x69\x6C","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x66\x69\x6E\x61\x6C\x6C\x79","\x74\x79\x70\x65","\x74\x77\x69\x6C\x69\x6F","\x61\x63\x63\x6F\x75\x6E\x74\x53\x69\x64","\x61\x75\x74\x68\x54\x6F\x6B\x65\x6E","\x70\x68\x6F\x6E\x65","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x69\x6E\x73\x70\x65\x63\x74","\x73\x69\x64","\x72\x65\x6D\x6F\x74\x65","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x6D\x65\x73\x73\x61\x67\x65\x73\x2F","\x69\x64","\x2F\x73\x74\x61\x74\x75\x73\x3F\x74\x6F\x6B\x65\x6E\x3D","\x74\x6F\x6B\x65\x6E","\x63\x72\x65\x61\x74\x65","\x6D\x65\x73\x73\x61\x67\x65\x73","\x4D\x69\x73\x73\x69\x6E\x67\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x3A\x20\x70\x68\x6F\x6E\x65\x2C\x20\x61\x63\x63\x6F\x75\x6E\x74\x53\x69\x64\x20\x6F\x72\x20\x61\x75\x74\x68\x54\x6F\x6B\x65\x6E","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x55\x54\x46\x2D\x38","\x6D\x65\x74\x68\x6F\x64","\x73\x65\x6E\x64\x5F\x73\x6D\x73\x5F\x62\x61\x73\x69\x63","\x62\x61\x73\x69\x63","\x73\x65\x6E\x64\x5F\x73\x6D\x73\x5F\x63\x6C\x61\x73\x73\x69\x63","\x73\x65\x6E\x64\x65\x72\x5F\x6E\x75\x6D\x62\x65\x72","\x73\x65\x6E\x64\x65\x72\x53\x74\x72\x69\x6E\x67","\x73\x65\x6E\x64\x65\x72\x5F\x73\x74\x72\x69\x6E\x67","\x63\x6C\x61\x73\x73\x69\x63","\x73\x65\x6E\x64\x5F\x73\x6D\x73\x5F\x63\x6C\x61\x73\x73\x69\x63\x5F\x72\x65\x70\x6F\x72\x74","\x63\x6C\x61\x73\x73\x69\x63\x2B","\x73\x6D\x73\x4D\x65\x74\x68\x6F\x64","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x50\x4F\x53\x54","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x61\x74\x65\x77\x61\x79\x2E\x73\x6B\x65\x62\x62\x79\x2E\x69\x74\x2F\x61\x70\x69\x2F\x73\x65\x6E\x64\x2F\x73\x6D\x73\x65\x61\x73\x79\x2F\x61\x64\x76\x61\x6E\x63\x65\x64\x2F\x68\x74\x74\x70\x2E\x70\x68\x70","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x6C\x65\x6E\x67\x74\x68","\x75\x74\x66\x38","\x73\x6B\x65\x62\x62\x79","\x70\x61\x72\x73\x65","\x73\x74\x61\x74\x75\x73","\x73\x75\x63\x63\x65\x73\x73","\x64\x65\x6C\x69\x76\x65\x72\x79\x52\x65\x70\x6F\x72\x74","\x72\x65\x61\x64","\x4D\x69\x73\x73\x69\x6E\x67\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x3A\x20\x75\x73\x65\x72\x6E\x61\x6D\x65\x2C\x20\x70\x61\x73\x73\x77\x6F\x72\x64","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x73\x6D\x73\x61\x70\x69\x2E\x63\x6F\x6E\x6E\x65\x63\x74\x65\x6C\x2E\x73\x65\x2F\x61\x70\x69\x2F\x73\x65\x6E\x64\x2F","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x6C","\x72\x65\x71\x75\x65\x73\x74\x69\x64","\x4D\x69\x73\x73\x69\x6E\x67\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x3A\x20\x61\x75\x74\x68\x54\x6F\x6B\x65\x6E","\x78\x43\x41\x4C\x4C\x59\x20\x4D\x6F\x74\x69\x6F\x6E","\x25\x73\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x72\x65\x73\x74\x2E\x63\x6C\x69\x63\x6B\x73\x65\x6E\x64\x2E\x63\x6F\x6D\x2F\x76\x33\x2F\x73\x6D\x73\x2F\x73\x65\x6E\x64","\x42\x61\x73\x69\x63\x20\x25\x73","\x62\x61\x73\x65\x36\x34","\x63\x6C\x69\x63\x6B\x53\x65\x6E\x64","\x68\x74\x74\x70\x5F\x63\x6F\x64\x65","\x64\x61\x74\x61","\x71\x75\x65\x75\x65\x64\x5F\x63\x6F\x75\x6E\x74","\x68\x65\x61\x64","\x6D\x65\x73\x73\x61\x67\x65\x5F\x69\x64","\x63\x6C\x69\x63\x6B\x73\x65\x6E\x64","\x61\x75\x74\x68\x49\x64","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x70\x69\x2E\x70\x6C\x69\x76\x6F\x2E\x63\x6F\x6D\x2F\x76\x31\x2F\x41\x63\x63\x6F\x75\x6E\x74\x2F\x25\x73\x2F\x4D\x65\x73\x73\x61\x67\x65\x2F","\x70\x6C\x69\x76\x6F","\x6D\x65\x73\x73\x61\x67\x65\x5F\x75\x75\x69\x64","\x4D\x69\x73\x73\x69\x6E\x67\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x3A\x20\x61\x75\x74\x68\x49\x64\x2C\x20\x61\x75\x74\x68\x54\x6F\x6B\x65\x6E","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x66\x69\x6E\x64","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x75\x74\x66\x38\x6D\x62\x34","\x75\x74\x66\x38\x6D\x62\x34\x5F\x75\x6E\x69\x63\x6F\x64\x65\x5F\x63\x69","\x64\x65\x66\x69\x6E\x65"];_0x8015[0];var _=require(_0x8015[1]);var util=require(_0x8015[2]);var logger=require(_0x8015[4])(_0x8015[3]);var moment=require(_0x8015[5]);var BPromise=require(_0x8015[6]);var rp=require(_0x8015[7]);var attributes=require(_0x8015[8]);module[_0x8015[9]]= function(_0xb32bx8,_0xb32bx9){return _0xb32bx8[_0x8015[103]](_0x8015[10],attributes,{tableName:_0x8015[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x8015[12],"\x66\x69\x65\x6C\x64\x73":[_0x8015[12]]}],timestamps:true,hooks:{afterCreate:function(_0xb32bxa,_0xb32bxb,_0xb32bxc){var _0xb32bxd=_0xb32bx8[_0x8015[13]];var _0xb32bxe=_0xb32bxa[_0x8015[14]]({plain:true});if((_0xb32bxe[_0x8015[16]][_0x8015[15]]()=== _0x8015[17])|| (_0xb32bxe[_0x8015[16]][_0x8015[15]]()=== _0x8015[18]&&  !_0xb32bxe[_0x8015[19]]&&  !_[_0x8015[20]](_0xb32bxe.UserId))){_0xb32bxd[_0x8015[29]][_0x8015[28]]({where:{id:_0xb32bxe[_0x8015[27]]}})[_0x8015[26]](function(_0xb32bx10){if(_0xb32bx10){_0xb32bx10[_0x8015[25]]({lastMsgAt:_0xb32bxe[_0x8015[23]],lastMsgDirection:_0xb32bxe[_0x8015[16]][_0x8015[15]](),lastMsgBody:_0xb32bxe[_0x8015[24]]})}})[_0x8015[22]](function(_0xb32bxf){console[_0x8015[21]](_0xb32bxf)})};if(_0xb32bxe[_0x8015[16]]=== _0x8015[18]&&  !_0xb32bxe[_0x8015[19]]){var _0xb32bx11;_0xb32bxd[_0x8015[100]][_0x8015[99]]({where:{id:_0xb32bxe[_0x8015[98]]},raw:true})[_0x8015[26]](function(_0xb32bx12){_0xb32bx11= _0xb32bx12;if(_0xb32bx11&& _0xb32bx11[_0x8015[31]]){switch(_0xb32bx11[_0x8015[31]]){case _0x8015[32]:var _0xb32bx13=require(_0x8015[32]);if(_0xb32bx11[_0x8015[33]]&& _0xb32bx11[_0x8015[34]]&& _0xb32bx11[_0x8015[35]]){var _0xb32bx14= new _0xb32bx13(_0xb32bx11[_0x8015[33]],_0xb32bx11[_0x8015[34]]);_0xb32bx14[_0x8015[46]][_0x8015[45]]({body:_0xb32bxe[_0x8015[24]],to:_0xb32bxe[_0x8015[35]],from:_0xb32bx11[_0x8015[35]],statusCallback:_0xb32bx11[_0x8015[40]]+ _0x8015[41]+ _0xb32bxe[_0x8015[42]]+ _0x8015[43]+ _0xb32bx11[_0x8015[44]]})[_0x8015[26]](function(_0xb32bx15){if(_0xb32bx15[_0x8015[39]]){return _0xb32bxa[_0x8015[25]]({messageId:_0xb32bx15[_0x8015[39]]})}})[_0x8015[22]](function(_0xb32bxf){logger[_0x8015[21]](_0x8015[36],_0x8015[37],_0x8015[32],util[_0x8015[38]](_0xb32bxf,{showHidden:false,depth:null}))})}else {logger[_0x8015[21]](_0x8015[36],_0x8015[37],_0x8015[32],_0x8015[47])};break;case _0x8015[69]:var _0xb32bx16=require(_0x8015[48]);if(_0xb32bx11[_0x8015[49]]&& _0xb32bx11[_0x8015[50]]){var _0xb32bx17={username:_0xb32bx11[_0x8015[49]],password:_0xb32bx11[_0x8015[50]],"\x72\x65\x63\x69\x70\x69\x65\x6E\x74\x73\x5B\x5D":[_0xb32bxe[_0x8015[35]]],text:_0xb32bxe[_0x8015[24]],charset:_0x8015[51]};switch(_0xb32bx11[_0x8015[62]]){case _0x8015[54]:_0xb32bx17[_0x8015[52]]= _0x8015[53];break;case _0x8015[59]:_0xb32bx17[_0x8015[52]]= _0x8015[55];_0xb32bx17[_0x8015[56]]= _0xb32bx11[_0x8015[35]];if(_0xb32bx11[_0x8015[57]]){_0xb32bx17[_0x8015[58]]= _0xb32bx11[_0x8015[57]]}else {if(_0xb32bx11[_0x8015[35]]){_0xb32bx17[_0x8015[56]]= _0xb32bx11[_0x8015[35]]}};break;case _0x8015[61]:_0xb32bx17[_0x8015[52]]= _0x8015[60];_0xb32bx17[_0x8015[56]]= _0xb32bx11[_0x8015[35]];if(_0xb32bx11[_0x8015[57]]){_0xb32bx17[_0x8015[58]]= _0xb32bx11[_0x8015[57]]}else {if(_0xb32bx11[_0x8015[35]]){_0xb32bx17[_0x8015[56]]= _0xb32bx11[_0x8015[35]]}};break};var _0xb32bx18=_0xb32bx16[_0x8015[63]](_0xb32bx17);var _0xb32bxb={method:_0x8015[64],uri:_0x8015[65],body:_0xb32bx18,headers:{"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x8015[66],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68":_0xb32bx18[_0x8015[67]],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67":_0x8015[68]}};rp(_0xb32bxb)[_0x8015[26]](function(_0xb32bx15){var _0xb32bx19=_0xb32bx16[_0x8015[70]](_0xb32bx15);if(_0xb32bx19[_0x8015[71]]== _0x8015[72]){var _0xb32bx18={messageId:_0xb32bx19[_0x8015[42]]};if(_0xb32bx11[_0x8015[62]]!== _0x8015[61]||  !_0xb32bx11[_0x8015[73]]){_0xb32bx18[_0x8015[74]]= true};return _0xb32bxa[_0x8015[25]](_0xb32bx18)}else {logger[_0x8015[21]](_0x8015[36],_0x8015[37],_0x8015[69],util[_0x8015[38]](_0xb32bx19,{showHidden:false,depth:null}))}})[_0x8015[22]](function(_0xb32bxf){logger[_0x8015[21]](_0x8015[36],_0x8015[37],_0x8015[69],util[_0x8015[38]](_0xb32bxf,{showHidden:false,depth:null}))})}else {logger[_0x8015[21]](_0x8015[36],_0x8015[37],_0x8015[69],_0x8015[75])};break;case _0x8015[77]:if(_0xb32bx11[_0x8015[34]]){var _0xb32bx17={recipient:_0xb32bxe[_0x8015[35]],message:_0xb32bxe[_0x8015[24]],sender:_0xb32bx11[_0x8015[57]]|| _0xb32bx11[_0x8015[35]],authorization:_0xb32bx11[_0x8015[34]]};var _0xb32bxb={method:_0x8015[64],uri:_0x8015[76],body:_0xb32bx17,json:true};rp(_0xb32bxb)[_0x8015[26]](function(_0xb32bx15){var _0xb32bx18={messageId:_0xb32bx15[_0x8015[78]]};if(!_0xb32bx11[_0x8015[73]]){_0xb32bx18[_0x8015[74]]= true};return _0xb32bxa[_0x8015[25]](_0xb32bx18)})[_0x8015[22]](function(_0xb32bxf){logger[_0x8015[21]](_0x8015[36],_0x8015[37],_0x8015[77],util[_0x8015[38]](_0xb32bxf,{showHidden:false,depth:null}))})}else {logger[_0x8015[21]](_0x8015[36],_0x8015[37],_0x8015[77],_0x8015[79])};break;case _0x8015[92]:if(_0xb32bx11[_0x8015[49]]&& _0xb32bx11[_0x8015[50]]){var _0xb32bx17={messages:[{source:_0x8015[80],to:_0xb32bxe[_0x8015[35]],body:_0xb32bxe[_0x8015[24]],from:_0xb32bx11[_0x8015[57]]|| _0xb32bx11[_0x8015[35]]}]};var _0xb32bx1a=util[_0x8015[82]](_0x8015[81],_0xb32bx11[_0x8015[49]],_0xb32bx11[_0x8015[50]]);var _0xb32bxb={method:_0x8015[64],uri:_0x8015[83],body:_0xb32bx17,headers:{Authorization:util[_0x8015[82]](_0x8015[84], new Buffer(_0xb32bx1a).toString(_0x8015[85]))},json:true};rp(_0xb32bxb)[_0x8015[26]](function(_0xb32bx15){if(_0xb32bx15[_0x8015[87]]>= 200&& _0xb32bx15[_0x8015[87]]<= 206){if(_0xb32bx15[_0x8015[88]]&& _0xb32bx15[_0x8015[88]][_0x8015[89]]> 0){var _0xb32bx1b=_[_0x8015[90]](_0xb32bx15[_0x8015[88]][_0x8015[46]]);var _0xb32bx18={messageId:_0xb32bx1b[_0x8015[91]]};if(!_0xb32bx11[_0x8015[73]]){_0xb32bx18[_0x8015[74]]= true};return _0xb32bxa[_0x8015[25]](_0xb32bx18)}else {logger[_0x8015[21]](_0x8015[36],_0x8015[37],_0x8015[86],util[_0x8015[38]](_0xb32bx15,{showHidden:false,depth:null}))}}else {logger[_0x8015[21]](_0x8015[36],_0x8015[37],_0x8015[86],util[_0x8015[38]](_0xb32bx15,{showHidden:false,depth:null}))}})[_0x8015[22]](function(_0xb32bxf){logger[_0x8015[21]](_0x8015[36],_0x8015[37],_0x8015[86],util[_0x8015[38]](_0xb32bxf,{showHidden:false,depth:null}))})}else {logger[_0x8015[21]](_0x8015[36],_0x8015[37],_0x8015[86],_0x8015[75])};break;case _0x8015[95]:if(_0xb32bx11[_0x8015[93]]&& _0xb32bx11[_0x8015[34]]){var _0xb32bx17={dst:_0xb32bxe[_0x8015[35]],text:_0xb32bxe[_0x8015[24]],src:_0xb32bx11[_0x8015[57]]|| _0xb32bx11[_0x8015[35]],url:_0xb32bx11[_0x8015[40]]+ _0x8015[41]+ _0xb32bxe[_0x8015[42]]+ _0x8015[43]+ _0xb32bx11[_0x8015[44]]};var _0xb32bx1a=util[_0x8015[82]](_0x8015[81],_0xb32bx11[_0x8015[93]],_0xb32bx11[_0x8015[34]]);var _0xb32bxb={method:_0x8015[64],uri:util[_0x8015[82]](_0x8015[94],_0xb32bx11[_0x8015[93]]),body:_0xb32bx17,headers:{Authorization:util[_0x8015[82]](_0x8015[84], new Buffer(_0xb32bx1a).toString(_0x8015[85]))},json:true};rp(_0xb32bxb)[_0x8015[26]](function(_0xb32bx15){var _0xb32bx18={messageId:_0xb32bx15[_0x8015[96]][0]};return _0xb32bxa[_0x8015[25]](_0xb32bx18)})[_0x8015[22]](function(_0xb32bxf){logger[_0x8015[21]](_0x8015[36],_0x8015[37],_0x8015[95],util[_0x8015[38]](_0xb32bxf,{showHidden:false,depth:null}))})}else {logger[_0x8015[21]](_0x8015[36],_0x8015[37],_0x8015[95],_0x8015[97])};break}}})[_0x8015[30]](function(){_0xb32bxc()})}else {_0xb32bxc()}}},charset:_0x8015[101],collate:_0x8015[102]})}
\ No newline at end of file
index 008ebce..5408f21 100644 (file)
@@ -1 +1 @@
-var _0x5dac=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65"];_0x5dac[0];var _=require(_0x5dac[1]);var util=require(_0x5dac[2]);var moment=require(_0x5dac[3]);var BPromise=require(_0x5dac[4]);var rs=require(_0x5dac[5]);var fs=require(_0x5dac[6]);var db=require(_0x5dac[8])[_0x5dac[7]];var utils=require(_0x5dac[9]);var logger=require(_0x5dac[11])(_0x5dac[10]);var config=require(_0x5dac[12]);var jayson=require(_0x5dac[13]);var client=jayson[_0x5dac[15]][_0x5dac[14]]({port:9002});var socket=require(_0x5dac[17])({host:_0x5dac[16],port:6379});require(_0x5dac[19])[_0x5dac[18]](socket);function respondWithRpcPromise(_0x7d4bxf,_0x7d4bx10,_0x7d4bx11){return  new BPromise(function(_0x7d4bx12,_0x7d4bx13){return client[_0x5dac[32]](_0x7d4bxf,_0x7d4bx11)[_0x5dac[31]](function(_0x7d4bx15){logger[_0x5dac[24]](_0x5dac[20],_0x7d4bx10,_0x5dac[23]);logger[_0x5dac[27]](_0x5dac[25],_0x7d4bx10,_0x5dac[23],JSON[_0x5dac[26]](_0x7d4bx15));if(_0x7d4bx15[_0x5dac[21]]){if(_0x7d4bx15[_0x5dac[21]][_0x5dac[28]]=== 500){logger[_0x5dac[21]](_0x5dac[20],_0x7d4bx10,_0x7d4bx15[_0x5dac[21]][_0x5dac[29]]);return _0x7d4bx13(_0x7d4bx15[_0x5dac[21]][_0x5dac[29]])};logger[_0x5dac[21]](_0x5dac[20],_0x7d4bx10,_0x7d4bx15[_0x5dac[21]][_0x5dac[29]]);return _0x7d4bx12(_0x7d4bx15[_0x5dac[21]][_0x5dac[29]])}else {logger[_0x5dac[24]](_0x5dac[20],_0x7d4bx10,_0x5dac[23]);_0x7d4bx12(_0x7d4bx15[_0x5dac[30]][_0x5dac[29]])}})[_0x5dac[22]](function(_0x7d4bx14){logger[_0x5dac[21]](_0x5dac[20],_0x7d4bx10,_0x7d4bx14);_0x7d4bx13(_0x7d4bx14)})})}exports[_0x5dac[33]]= function(_0x7d4bx11){var _0x7d4bx16=this;return  new Promise(function(_0x7d4bx12,_0x7d4bx13){return db[_0x5dac[38]][_0x5dac[37]](_0x7d4bx11[_0x5dac[34]],{raw:_0x7d4bx11[_0x5dac[35]]?(_0x7d4bx11[_0x5dac[35]][_0x5dac[36]]=== undefined)?true:false:true})[_0x5dac[31]](function(_0x7d4bx15){logger[_0x5dac[24]](_0x5dac[33],_0x7d4bx11);logger[_0x5dac[27]](_0x5dac[33],_0x7d4bx11,JSON[_0x5dac[26]](_0x7d4bx15));_0x7d4bx12(_0x7d4bx15)})[_0x5dac[22]](function(_0x7d4bx14){logger[_0x5dac[21]](_0x5dac[33],_0x7d4bx14[_0x5dac[29]],_0x7d4bx11);_0x7d4bx13(_0x7d4bx16[_0x5dac[21]](500,_0x7d4bx14[_0x5dac[29]]))})})}
\ No newline at end of file
+var _0x798d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65"];_0x798d[0];var _=require(_0x798d[1]);var util=require(_0x798d[2]);var moment=require(_0x798d[3]);var BPromise=require(_0x798d[4]);var rs=require(_0x798d[5]);var fs=require(_0x798d[6]);var db=require(_0x798d[8])[_0x798d[7]];var utils=require(_0x798d[9]);var logger=require(_0x798d[11])(_0x798d[10]);var config=require(_0x798d[12]);var jayson=require(_0x798d[13]);var client=jayson[_0x798d[15]][_0x798d[14]]({port:9002});var socket=require(_0x798d[17])({host:_0x798d[16],port:6379});require(_0x798d[19])[_0x798d[18]](socket);function respondWithRpcPromise(_0xdc15xf,_0xdc15x10,_0xdc15x11){return  new BPromise(function(_0xdc15x12,_0xdc15x13){return client[_0x798d[32]](_0xdc15xf,_0xdc15x11)[_0x798d[31]](function(_0xdc15x15){logger[_0x798d[24]](_0x798d[20],_0xdc15x10,_0x798d[23]);logger[_0x798d[27]](_0x798d[25],_0xdc15x10,_0x798d[23],JSON[_0x798d[26]](_0xdc15x15));if(_0xdc15x15[_0x798d[21]]){if(_0xdc15x15[_0x798d[21]][_0x798d[28]]=== 500){logger[_0x798d[21]](_0x798d[20],_0xdc15x10,_0xdc15x15[_0x798d[21]][_0x798d[29]]);return _0xdc15x13(_0xdc15x15[_0x798d[21]][_0x798d[29]])};logger[_0x798d[21]](_0x798d[20],_0xdc15x10,_0xdc15x15[_0x798d[21]][_0x798d[29]]);return _0xdc15x12(_0xdc15x15[_0x798d[21]][_0x798d[29]])}else {logger[_0x798d[24]](_0x798d[20],_0xdc15x10,_0x798d[23]);_0xdc15x12(_0xdc15x15[_0x798d[30]][_0x798d[29]])}})[_0x798d[22]](function(_0xdc15x14){logger[_0x798d[21]](_0x798d[20],_0xdc15x10,_0xdc15x14);_0xdc15x13(_0xdc15x14)})})}exports[_0x798d[33]]= function(_0xdc15x11){var _0xdc15x16=this;return  new Promise(function(_0xdc15x12,_0xdc15x13){return db[_0x798d[38]][_0x798d[37]](_0xdc15x11[_0x798d[34]],{raw:_0xdc15x11[_0x798d[35]]?(_0xdc15x11[_0x798d[35]][_0x798d[36]]=== undefined)?true:false:true})[_0x798d[31]](function(_0xdc15x15){logger[_0x798d[24]](_0x798d[33],_0xdc15x11);logger[_0x798d[27]](_0x798d[33],_0xdc15x11,JSON[_0x798d[26]](_0xdc15x15));_0xdc15x12(_0xdc15x15)})[_0x798d[22]](function(_0xdc15x14){logger[_0x798d[21]](_0x798d[33],_0xdc15x14[_0x798d[29]],_0xdc15x11);_0xdc15x13(_0xdc15x16[_0x798d[21]](500,_0xdc15x14[_0x798d[29]]))})})}
\ No newline at end of file
index fc4b36a..d8879f8 100644 (file)
@@ -1 +1 @@
-var _0xfb7d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E"];_0xfb7d[0];var SmsMessageEvents=require(_0xfb7d[1]);var events=[_0xfb7d[2],_0xfb7d[3],_0xfb7d[4]];function createListener(_0xecbdx4,_0xecbdx5){return function(_0xecbdx6){_0xecbdx5[_0xfb7d[5]](_0xecbdx4,_0xecbdx6)}}function removeListener(_0xecbdx4,_0xecbdx8){return function(){SmsMessageEvents[_0xfb7d[6]](_0xecbdx4,_0xecbdx8)}}exports[_0xfb7d[7]]= function(_0xecbdx5){for(var _0xecbdx9=0,_0xecbdxa=events[_0xfb7d[8]];_0xecbdx9< _0xecbdxa;_0xecbdx9++){var _0xecbdx4=events[_0xecbdx9];var _0xecbdx8=createListener(_0xfb7d[9]+ _0xecbdx4,_0xecbdx5);SmsMessageEvents[_0xfb7d[10]](_0xecbdx4,_0xecbdx8)}}
\ No newline at end of file
+var _0x2a7d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E"];_0x2a7d[0];var SmsMessageEvents=require(_0x2a7d[1]);var events=[_0x2a7d[2],_0x2a7d[3],_0x2a7d[4]];function createListener(_0xcc5ax4,_0xcc5ax5){return function(_0xcc5ax6){_0xcc5ax5[_0x2a7d[5]](_0xcc5ax4,_0xcc5ax6)}}function removeListener(_0xcc5ax4,_0xcc5ax8){return function(){SmsMessageEvents[_0x2a7d[6]](_0xcc5ax4,_0xcc5ax8)}}exports[_0x2a7d[7]]= function(_0xcc5ax5){for(var _0xcc5ax9=0,_0xcc5axa=events[_0x2a7d[8]];_0xcc5ax9< _0xcc5axa;_0xcc5ax9++){var _0xcc5ax4=events[_0xcc5ax9];var _0xcc5ax8=createListener(_0x2a7d[9]+ _0xcc5ax4,_0xcc5ax5);SmsMessageEvents[_0x2a7d[10]](_0xcc5ax4,_0xcc5ax8)}}
\ No newline at end of file
index cc9d006..a2054b8 100644 (file)
@@ -1 +1 @@
-var _0x4ff6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6D\x65\x6D\x62\x65\x72\x73","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x74\x65\x61\x6D\x73","\x67\x65\x74\x54\x65\x61\x6D\x73","\x2F\x3A\x69\x64\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x54\x65\x61\x6D\x73","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x4ff6[0];var multer=require(_0x4ff6[1]);var util=require(_0x4ff6[2]);var path=require(_0x4ff6[3]);var express=require(_0x4ff6[4]);var router=express.Router();var auth=require(_0x4ff6[5]);var interaction=require(_0x4ff6[6]);var config=require(_0x4ff6[7]);var controller=require(_0x4ff6[8]);router[_0x4ff6[12]](_0x4ff6[9],auth[_0x4ff6[10]](),controller[_0x4ff6[11]]);router[_0x4ff6[12]](_0x4ff6[13],auth[_0x4ff6[10]](),controller[_0x4ff6[14]]);router[_0x4ff6[12]](_0x4ff6[15],auth[_0x4ff6[10]](),controller[_0x4ff6[16]]);router[_0x4ff6[12]](_0x4ff6[17],auth[_0x4ff6[10]](),controller[_0x4ff6[18]]);router[_0x4ff6[12]](_0x4ff6[19],auth[_0x4ff6[10]](),controller[_0x4ff6[20]]);router[_0x4ff6[12]](_0x4ff6[21],auth[_0x4ff6[10]](),controller[_0x4ff6[22]]);router[_0x4ff6[24]](_0x4ff6[9],auth[_0x4ff6[10]](),controller[_0x4ff6[23]]);router[_0x4ff6[24]](_0x4ff6[19],auth[_0x4ff6[10]](),controller[_0x4ff6[25]]);router[_0x4ff6[24]](_0x4ff6[21],auth[_0x4ff6[10]](),controller[_0x4ff6[26]]);router[_0x4ff6[28]](_0x4ff6[15],auth[_0x4ff6[10]](),controller[_0x4ff6[27]]);router[_0x4ff6[30]](_0x4ff6[15],auth[_0x4ff6[10]](),controller[_0x4ff6[29]]);router[_0x4ff6[30]](_0x4ff6[19],auth[_0x4ff6[10]](),controller[_0x4ff6[31]]);router[_0x4ff6[30]](_0x4ff6[21],auth[_0x4ff6[10]](),controller[_0x4ff6[32]]);module[_0x4ff6[33]]= router
\ No newline at end of file
+var _0x1663=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6D\x65\x6D\x62\x65\x72\x73","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x74\x65\x61\x6D\x73","\x67\x65\x74\x54\x65\x61\x6D\x73","\x2F\x3A\x69\x64\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x54\x65\x61\x6D\x73","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x1663[0];var multer=require(_0x1663[1]);var util=require(_0x1663[2]);var path=require(_0x1663[3]);var express=require(_0x1663[4]);var router=express.Router();var auth=require(_0x1663[5]);var interaction=require(_0x1663[6]);var config=require(_0x1663[7]);var controller=require(_0x1663[8]);router[_0x1663[12]](_0x1663[9],auth[_0x1663[10]](),controller[_0x1663[11]]);router[_0x1663[12]](_0x1663[13],auth[_0x1663[10]](),controller[_0x1663[14]]);router[_0x1663[12]](_0x1663[15],auth[_0x1663[10]](),controller[_0x1663[16]]);router[_0x1663[12]](_0x1663[17],auth[_0x1663[10]](),controller[_0x1663[18]]);router[_0x1663[12]](_0x1663[19],auth[_0x1663[10]](),controller[_0x1663[20]]);router[_0x1663[12]](_0x1663[21],auth[_0x1663[10]](),controller[_0x1663[22]]);router[_0x1663[24]](_0x1663[9],auth[_0x1663[10]](),controller[_0x1663[23]]);router[_0x1663[24]](_0x1663[19],auth[_0x1663[10]](),controller[_0x1663[25]]);router[_0x1663[24]](_0x1663[21],auth[_0x1663[10]](),controller[_0x1663[26]]);router[_0x1663[28]](_0x1663[15],auth[_0x1663[10]](),controller[_0x1663[27]]);router[_0x1663[30]](_0x1663[15],auth[_0x1663[10]](),controller[_0x1663[29]]);router[_0x1663[30]](_0x1663[19],auth[_0x1663[10]](),controller[_0x1663[31]]);router[_0x1663[30]](_0x1663[21],auth[_0x1663[10]](),controller[_0x1663[32]]);module[_0x1663[33]]= router
\ No newline at end of file
index cc98c18..c15b262 100644 (file)
@@ -1 +1 @@
-var _0x452f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x49\x4E\x54\x45\x47\x45\x52","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E"];_0x452f[0];var Sequelize=require(_0x452f[1]);module[_0x452f[2]]= {name:{type:Sequelize[_0x452f[3]],unique:_0x452f[4],validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i}},description:{type:Sequelize[_0x452f[3]]},timeout:{type:Sequelize[_0x452f[5]],validate:{min:1,max:2147483}},strategy:{type:Sequelize.ENUM(_0x452f[6],_0x452f[7],_0x452f[8])}}
\ No newline at end of file
+var _0x4ef8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x49\x4E\x54\x45\x47\x45\x52","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E"];_0x4ef8[0];var Sequelize=require(_0x4ef8[1]);module[_0x4ef8[2]]= {name:{type:Sequelize[_0x4ef8[3]],unique:_0x4ef8[4],validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i}},description:{type:Sequelize[_0x4ef8[3]]},timeout:{type:Sequelize[_0x4ef8[5]],validate:{min:1,max:2147483}},strategy:{type:Sequelize.ENUM(_0x4ef8[6],_0x4ef8[7],_0x4ef8[8])}}
\ No newline at end of file
index 61952db..88c8842 100644 (file)
@@ -1 +1 @@
-var _0xa4d9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x6D\x73\x51\x75\x65\x75\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x66\x6F\x72\x6D\x61\x74","\x73\x6D\x73\x50\x61\x75\x73\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x55\x73\x65\x72\x49\x64","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x55\x73\x65\x72","\x67\x65\x74","\x55\x73\x65\x72\x53\x6D\x73\x51\x75\x65\x75\x65","\x53\x6D\x73\x51\x75\x65\x75\x65\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x54\x65\x61\x6D\x73","\x54\x65\x61\x6D","\x61\x64\x64\x54\x65\x61\x6D\x73","\x69\x64\x73","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x41\x67\x65\x6E\x74\x73","\x75\x6E\x69\x6F\x6E","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x75\x73\x65\x72\x53\x6D\x73\x51\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x6F\x6D\x69\x74","\x69\x73\x41\x72\x72\x61\x79","\x75\x73\x65\x72\x53\x6D\x73\x51\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x67\x65\x74\x41\x67\x65\x6E\x74\x73"];_0xa4d9[0];var jsonpatch=require(_0xa4d9[1]);var rp=require(_0xa4d9[2]);var moment=require(_0xa4d9[3]);var BPromise=require(_0xa4d9[4]);var Mustache=require(_0xa4d9[5]);var util=require(_0xa4d9[6]);var path=require(_0xa4d9[7]);var sox=require(_0xa4d9[8]);var csv=require(_0xa4d9[9]);var ejs=require(_0xa4d9[10]);var fs=require(_0xa4d9[11]);var _=require(_0xa4d9[12]);var squel=require(_0xa4d9[13]);var crypto=require(_0xa4d9[14]);var jsforce=require(_0xa4d9[15]);var deskjs=require(_0xa4d9[16]);var toCsv=require(_0xa4d9[9]);var querystring=require(_0xa4d9[17]);var Papa=require(_0xa4d9[18]);var qs=require(_0xa4d9[19]);var logger=require(_0xa4d9[21])(_0xa4d9[20]);var utils=require(_0xa4d9[22]);var config=require(_0xa4d9[23]);var db=require(_0xa4d9[25])[_0xa4d9[24]];var socket=require(_0xa4d9[27])({host:_0xa4d9[26],port:6379});require(_0xa4d9[29])[_0xa4d9[28]](socket);function respondWithStatusCode(_0xe507x1b,_0xe507x1c){_0xe507x1c= _0xe507x1c|| 204;return function(_0xe507x1d){if(_0xe507x1d){return _0xe507x1b[_0xa4d9[30]](_0xe507x1c)};return _0xe507x1b[_0xa4d9[32]](_0xe507x1c)[_0xa4d9[31]]()}}function respondWithResult(_0xe507x1b,_0xe507x1c){_0xe507x1c= _0xe507x1c|| 200;return function(_0xe507x1d){if(_0xe507x1d){return _0xe507x1b[_0xa4d9[32]](_0xe507x1c)[_0xa4d9[33]](_0xe507x1d)}}}function respondWithFilteredResult(_0xe507x1b,_0xe507x20){return function(_0xe507x1d){if(_0xe507x1d){var _0xe507x21=_0xe507x1d[_0xa4d9[34]],_0xe507x22=_0xe507x20[_0xa4d9[35]],_0xe507x23=_0xe507x20[_0xa4d9[35]]+ _0xe507x20[_0xa4d9[36]],_0xe507x1c;if(_0xe507x23>= _0xe507x21){_0xe507x23= _0xe507x21;_0xe507x1c= 200}else {_0xe507x1c= 206};_0xe507x1b[_0xa4d9[32]](_0xe507x1c);return _0xe507x1b[_0xa4d9[40]](_0xa4d9[37],_0xe507x22+ _0xa4d9[38]+ _0xe507x23+ _0xa4d9[39]+ _0xe507x21)[_0xa4d9[33]](_0xe507x1d)};return null}}function patchUpdates(_0xe507x25){return function(_0xe507x1d){try{jsonpatch[_0xa4d9[41]](_0xe507x1d,_0xe507x25,true)}catch(err){return BPromise[_0xa4d9[42]](err)};return _0xe507x1d[_0xa4d9[43]]()}}function saveUpdates(_0xe507x27,_0xe507x1c){return function(_0xe507x1d){if(_0xe507x1d){return _0xe507x1d[_0xa4d9[45]](_0xe507x27)[_0xa4d9[44]](function(_0xe507x28){return _0xe507x28})};return null}}function removeEntity(_0xe507x1b,_0xe507x1c){return function(_0xe507x1d){if(_0xe507x1d){return _0xe507x1d[_0xa4d9[46]]()[_0xa4d9[44]](function(){_0xe507x1b[_0xa4d9[32]](204)[_0xa4d9[31]]()})}}}function handleEntityNotFound(_0xe507x1b,_0xe507x1c){return function(_0xe507x1d){if(!_0xe507x1d){_0xe507x1b[_0xa4d9[30]](404)};return _0xe507x1d}}function handleError(_0xe507x1b,_0xe507x1c){_0xe507x1c= _0xe507x1c|| 500;return function(_0xe507x2c){logger[_0xa4d9[48]](_0xe507x2c[_0xa4d9[47]]);if(_0xe507x2c[_0xa4d9[49]]){delete _0xe507x2c[_0xa4d9[49]]};_0xe507x1b[_0xa4d9[32]](_0xe507x1c)[_0xa4d9[50]](_0xe507x2c)}}exports[_0xa4d9[51]]= function(_0xe507x2d,_0xe507x1b){var _0xe507x20={},_0xe507x2e={},_0xe507x2f={count:0,rows:[]};_0xe507x2e[_0xa4d9[52]]= _[_0xa4d9[55]](db[_0xa4d9[54]][_0xa4d9[53]]);var _0xe507x30={dateStart:_0xe507x2d[_0xa4d9[57]][_0xa4d9[56]],dateEnd:_0xe507x2d[_0xa4d9[57]][_0xa4d9[58]]};delete _0xe507x2d[_0xa4d9[57]][_0xa4d9[56]];delete _0xe507x2d[_0xa4d9[57]][_0xa4d9[58]];_0xe507x2e[_0xa4d9[57]]= _[_0xa4d9[55]](_0xe507x2d[_0xa4d9[57]]);_0xe507x2e[_0xa4d9[59]]= _[_0xa4d9[60]](_0xe507x2e[_0xa4d9[52]],_0xe507x2e[_0xa4d9[57]]);_0xe507x20[_0xa4d9[61]]= _[_0xa4d9[60]](_0xe507x2e[_0xa4d9[52]],qs[_0xa4d9[62]](_0xe507x2d[_0xa4d9[57]][_0xa4d9[62]]));_0xe507x20[_0xa4d9[61]]= (_0xe507x20[_0xa4d9[61]][_0xa4d9[63]])?_0xe507x20[_0xa4d9[61]]:_0xe507x2e[_0xa4d9[52]];if(!_0xe507x2d[_0xa4d9[57]][_0xa4d9[65]](_0xa4d9[64])){_0xe507x20[_0xa4d9[36]]= qs[_0xa4d9[36]](_0xe507x2d[_0xa4d9[57]][_0xa4d9[36]]);_0xe507x20[_0xa4d9[35]]= qs[_0xa4d9[35]](_0xe507x2d[_0xa4d9[57]][_0xa4d9[35]])};_0xe507x20[_0xa4d9[66]]= qs[_0xa4d9[67]](_0xe507x2d[_0xa4d9[57]][_0xa4d9[67]]);_0xe507x20[_0xa4d9[68]]= qs[_0xa4d9[59]](_[_0xa4d9[69]](_0xe507x2d[_0xa4d9[57]],_0xe507x2e[_0xa4d9[59]]));if(_0xe507x30[_0xa4d9[56]]){if(_0xe507x30[_0xa4d9[58]]){_0xe507x30[_0xa4d9[58]]= moment(_0xe507x30[_0xa4d9[58]])[_0xa4d9[71]](1,_0xa4d9[70])}else {_0xe507x30[_0xa4d9[58]]= moment(_0xe507x30[_0xa4d9[56]])[_0xa4d9[71]](1,_0xa4d9[70])};_[_0xa4d9[72]](_0xe507x20[_0xa4d9[68]],{createdAt:{$gte:_0xe507x30[_0xa4d9[56]],$lte:_0xe507x30[_0xa4d9[58]]}})};if(_0xe507x2d[_0xa4d9[57]][_0xa4d9[73]]){_0xe507x20[_0xa4d9[68]]= _[_0xa4d9[72]](_0xe507x20[_0xa4d9[68]],{$or:_[_0xa4d9[75]](_0xe507x20[_0xa4d9[61]],function(_0xe507x31){var _0xe507x2f={};_0xe507x2f[_0xe507x31]= {$like:_0xa4d9[74]+ _0xe507x2d[_0xa4d9[57]][_0xa4d9[73]]+ _0xa4d9[74]};return _0xe507x2f})})};_0xe507x20= _[_0xa4d9[72]]({},_0xe507x20,_0xe507x2d[_0xa4d9[76]]);var _0xe507x32={where:_0xe507x20[_0xa4d9[68]]};return db[_0xa4d9[54]][_0xa4d9[34]](_0xe507x32)[_0xa4d9[44]](function(_0xe507x21){_0xe507x2f[_0xa4d9[34]]= _0xe507x21;if(_0xe507x2d[_0xa4d9[57]][_0xa4d9[79]]){_0xe507x20[_0xa4d9[80]]= [{all:true}]};return db[_0xa4d9[54]][_0xa4d9[81]](_0xe507x20)})[_0xa4d9[44]](function(_0xe507x33){_0xe507x2f[_0xa4d9[78]]= _0xe507x33;return _0xe507x2f})[_0xa4d9[44]](respondWithFilteredResult(_0xe507x1b,_0xe507x20))[_0xa4d9[77]](handleError(_0xe507x1b,null))};exports[_0xa4d9[82]]= function(_0xe507x2d,_0xe507x1b){var _0xe507x20={raw:true,where:{id:_0xe507x2d[_0xa4d9[84]][_0xa4d9[83]]}},_0xe507x2e={};_0xe507x2e[_0xa4d9[52]]= _[_0xa4d9[55]](db[_0xa4d9[54]][_0xa4d9[53]]);_0xe507x2e[_0xa4d9[57]]= _[_0xa4d9[55]](_0xe507x2d[_0xa4d9[57]]);_0xe507x2e[_0xa4d9[59]]= _[_0xa4d9[60]](_0xe507x2e[_0xa4d9[52]],_0xe507x2e[_0xa4d9[57]]);_0xe507x20[_0xa4d9[61]]= _[_0xa4d9[60]](_0xe507x2e[_0xa4d9[52]],qs[_0xa4d9[62]](_0xe507x2d[_0xa4d9[57]][_0xa4d9[62]]));_0xe507x20[_0xa4d9[61]]= (_0xe507x20[_0xa4d9[61]][_0xa4d9[63]])?_0xe507x20[_0xa4d9[61]]:_0xe507x2e[_0xa4d9[52]];if(_0xe507x2d[_0xa4d9[57]][_0xa4d9[79]]){_0xe507x20[_0xa4d9[80]]= [{all:true}]};_0xe507x20= _[_0xa4d9[72]]({},_0xe507x20,_0xe507x2d[_0xa4d9[76]]);return db[_0xa4d9[54]][_0xa4d9[85]](_0xe507x20)[_0xa4d9[44]](handleEntityNotFound(_0xe507x1b,null))[_0xa4d9[44]](respondWithResult(_0xe507x1b,null))[_0xa4d9[77]](handleError(_0xe507x1b,null))};exports[_0xa4d9[86]]= function(_0xe507x2d,_0xe507x1b){return db[_0xa4d9[54]][_0xa4d9[86]](_0xe507x2d[_0xa4d9[87]],{})[_0xa4d9[44]](respondWithResult(_0xe507x1b,201))[_0xa4d9[77]](handleError(_0xe507x1b,null))};exports[_0xa4d9[45]]= function(_0xe507x2d,_0xe507x1b){if(_0xe507x2d[_0xa4d9[87]][_0xa4d9[83]]){delete _0xe507x2d[_0xa4d9[87]][_0xa4d9[83]]};return db[_0xa4d9[54]][_0xa4d9[85]]({where:{id:_0xe507x2d[_0xa4d9[84]][_0xa4d9[83]]}})[_0xa4d9[44]](handleEntityNotFound(_0xe507x1b,null))[_0xa4d9[44]](saveUpdates(_0xe507x2d[_0xa4d9[87]],null))[_0xa4d9[44]](respondWithResult(_0xe507x1b,null))[_0xa4d9[77]](handleError(_0xe507x1b,null))};exports[_0xa4d9[46]]= function(_0xe507x2d,_0xe507x1b){return db[_0xa4d9[54]][_0xa4d9[85]]({where:{id:_0xe507x2d[_0xa4d9[84]][_0xa4d9[83]]}})[_0xa4d9[44]](handleEntityNotFound(_0xe507x1b,null))[_0xa4d9[44]](removeEntity(_0xe507x1b,null))[_0xa4d9[77]](handleError(_0xe507x1b,null))};exports[_0xa4d9[88]]= function(_0xe507x2d,_0xe507x1b){return db[_0xa4d9[54]][_0xa4d9[88]]()[_0xa4d9[44]](respondWithResult(_0xe507x1b,null))[_0xa4d9[77]](handleError(_0xe507x1b,null))};exports[_0xa4d9[89]]= function(_0xe507x2d,_0xe507x1b,_0xe507x34){var _0xe507x20={raw:true,where:{}},_0xe507x2e={},_0xe507x35;return db[_0xa4d9[54]][_0xa4d9[103]]({where:{id:_0xe507x2d[_0xa4d9[84]][_0xa4d9[83]]}})[_0xa4d9[44]](handleEntityNotFound(_0xe507x1b,null))[_0xa4d9[44]](function(_0xe507x1d){if(_0xe507x1d){_0xe507x35= _0xe507x1d[_0xa4d9[100]]({plain:true});_0xe507x2e[_0xa4d9[52]]= _[_0xa4d9[55]](db[_0xa4d9[101]][_0xa4d9[53]]);_0xe507x2e[_0xa4d9[57]]= _[_0xa4d9[55]](_0xe507x2d[_0xa4d9[57]]);_0xe507x2e[_0xa4d9[59]]= _[_0xa4d9[60]](_0xe507x2e[_0xa4d9[52]],_0xe507x2e[_0xa4d9[57]]);_0xe507x20[_0xa4d9[61]]= _[_0xa4d9[60]](_0xe507x2e[_0xa4d9[52]],qs[_0xa4d9[62]](_0xe507x2d[_0xa4d9[57]][_0xa4d9[62]]));_0xe507x20[_0xa4d9[61]]= (_0xe507x20[_0xa4d9[61]][_0xa4d9[63]])?_0xe507x20[_0xa4d9[61]]:_0xe507x2e[_0xa4d9[52]];if(!_0xe507x2d[_0xa4d9[57]][_0xa4d9[65]](_0xa4d9[64])){_0xe507x20[_0xa4d9[36]]= qs[_0xa4d9[36]](_0xe507x2d[_0xa4d9[57]][_0xa4d9[36]]);_0xe507x20[_0xa4d9[35]]= qs[_0xa4d9[35]](_0xe507x2d[_0xa4d9[57]][_0xa4d9[35]])};_0xe507x20[_0xa4d9[66]]= qs[_0xa4d9[67]](_0xe507x2d[_0xa4d9[57]][_0xa4d9[67]]);_0xe507x20[_0xa4d9[68]]= qs[_0xa4d9[59]](_[_0xa4d9[69]](_0xe507x2d[_0xa4d9[57]],_0xe507x2e[_0xa4d9[59]]));_0xe507x20[_0xa4d9[68]][_0xa4d9[102]]= _0xe507x1d[_0xa4d9[83]];if(_0xe507x2d[_0xa4d9[57]][_0xa4d9[73]]){_0xe507x20[_0xa4d9[68]]= _[_0xa4d9[72]](_0xe507x20[_0xa4d9[68]],{$or:_[_0xa4d9[75]](_0xe507x20[_0xa4d9[61]],function(_0xe507x31){var _0xe507x2f={};_0xe507x2f[_0xe507x31]= {$like:_0xa4d9[74]+ _0xe507x2d[_0xa4d9[57]][_0xa4d9[73]]+ _0xa4d9[74]};return _0xe507x2f})})};_0xe507x20= _[_0xa4d9[72]]({},_0xe507x20,_0xe507x2d[_0xa4d9[76]]);return db[_0xa4d9[101]][_0xa4d9[81]](_0xe507x20)}})[_0xa4d9[44]](function(_0xe507x1b){if(_0xe507x1b){return db[_0xa4d9[99]][_0xa4d9[98]]({where:{id:_[_0xa4d9[75]](_0xe507x1b,_0xa4d9[96]),role:_0xa4d9[97]},attributes:[_0xa4d9[83],_0xa4d9[49],_0xa4d9[93],_0xa4d9[95],_0xa4d9[94]]})}})[_0xa4d9[44]](function(_0xe507x1b){if(_0xe507x1b){return {count:_0xe507x1b[_0xa4d9[34]],rows:_[_0xa4d9[75]](_0xe507x1b[_0xa4d9[78]],function(_0xe507x36){return {membername:_0xe507x36[_0xa4d9[49]],UserId:_0xe507x36[_0xa4d9[83]],queue_name:_0xe507x35[_0xa4d9[49]],SmsQueueId:_0xe507x35[_0xa4d9[83]],interface:util[_0xa4d9[92]](_0xa4d9[90],_0xa4d9[91],_0xe507x36[_0xa4d9[49]]),penalty:0,paused:_0xe507x36[_0xa4d9[93]],createdAt:_0xe507x36[_0xa4d9[94]],updatedAt:_0xe507x36[_0xa4d9[95]]}})}}else {return {count:0,rows:[]}}})[_0xa4d9[44]](respondWithFilteredResult(_0xe507x1b,_0xe507x20))[_0xa4d9[77]](handleError(_0xe507x1b,null))};exports[_0xa4d9[104]]= function(_0xe507x2d,_0xe507x1d,_0xe507x34){var _0xe507x20={};var _0xe507x2e={};var _0xe507x37;var _0xe507x21;return db[_0xa4d9[54]][_0xa4d9[103]]({where:{id:_0xe507x2d[_0xa4d9[84]][_0xa4d9[83]]}})[_0xa4d9[44]](handleEntityNotFound(_0xe507x1d,null))[_0xa4d9[44]](function(_0xe507x1d){if(_0xe507x1d){_0xe507x37= _0xe507x1d;_0xe507x2e[_0xa4d9[52]]= _[_0xa4d9[55]](db[_0xa4d9[105]][_0xa4d9[53]]);_0xe507x2e[_0xa4d9[57]]= _[_0xa4d9[55]](_0xe507x2d[_0xa4d9[57]]);_0xe507x2e[_0xa4d9[59]]= _[_0xa4d9[60]](_0xe507x2e[_0xa4d9[52]],_0xe507x2e[_0xa4d9[57]]);_0xe507x20[_0xa4d9[61]]= _[_0xa4d9[60]](_0xe507x2e[_0xa4d9[52]],qs[_0xa4d9[62]](_0xe507x2d[_0xa4d9[57]][_0xa4d9[62]]));_0xe507x20[_0xa4d9[61]]= (_0xe507x20[_0xa4d9[61]][_0xa4d9[63]])?_0xe507x20[_0xa4d9[61]]:_0xe507x2e[_0xa4d9[52]];_0xe507x20[_0xa4d9[66]]= qs[_0xa4d9[67]](_0xe507x2d[_0xa4d9[57]][_0xa4d9[67]]);_0xe507x20[_0xa4d9[68]]= qs[_0xa4d9[59]](_[_0xa4d9[69]](_0xe507x2d[_0xa4d9[57]],_0xe507x2e[_0xa4d9[59]]));if(_0xe507x2d[_0xa4d9[57]][_0xa4d9[73]]){_0xe507x20[_0xa4d9[68]]= _[_0xa4d9[72]](_0xe507x20[_0xa4d9[68]],{$or:_[_0xa4d9[75]](_0xe507x20[_0xa4d9[61]],function(_0xe507x31){var _0xe507x2f={};_0xe507x2f[_0xe507x31]= {$like:_0xa4d9[74]+ _0xe507x2d[_0xa4d9[57]][_0xa4d9[73]]+ _0xa4d9[74]};return _0xe507x2f})})};_0xe507x20= _[_0xa4d9[72]]({},_0xe507x20,_0xe507x2d[_0xa4d9[76]]);return _0xe507x37[_0xa4d9[104]](_0xe507x20)}})[_0xa4d9[44]](function(_0xe507x38){if(_0xe507x38){_0xe507x21= _0xe507x38[_0xa4d9[63]];if(!_0xe507x2d[_0xa4d9[57]][_0xa4d9[65]](_0xa4d9[64])){_0xe507x20[_0xa4d9[36]]= qs[_0xa4d9[36]](_0xe507x2d[_0xa4d9[57]][_0xa4d9[36]]);_0xe507x20[_0xa4d9[35]]= qs[_0xa4d9[35]](_0xe507x2d[_0xa4d9[57]][_0xa4d9[35]])};return _0xe507x37[_0xa4d9[104]](_0xe507x20)}})[_0xa4d9[44]](function(_0xe507x33){if(_0xe507x33){return _0xe507x33?{count:_0xe507x21,rows:_0xe507x33}:null}})[_0xa4d9[44]](respondWithResult(_0xe507x1d,null))[_0xa4d9[77]](handleError(_0xe507x1d,null))};exports[_0xa4d9[106]]= function(_0xe507x2d,_0xe507x1b,_0xe507x34){var _0xe507x39=[];var _0xe507x35;return db[_0xa4d9[105]][_0xa4d9[81]]({where:{id:_0xe507x2d[_0xa4d9[87]][_0xa4d9[107]]},attributes:[_0xa4d9[83]],include:[{model:db[_0xa4d9[99]],as:_0xa4d9[110],attributes:[_0xa4d9[83]],raw:true}]})[_0xa4d9[44]](function(_0xe507x3c){if(_0xe507x3c){for(var _0xe507x3d=0;_0xe507x3d< _0xe507x3c[_0xa4d9[63]];_0xe507x3d+= 1){for(var _0xe507x3e=0;_0xe507x3e< _0xe507x3c[_0xe507x3d][_0xa4d9[110]][_0xa4d9[63]];_0xe507x3e+= 1){_0xe507x39= _[_0xa4d9[111]](_0xe507x39,[_0xe507x3c[_0xe507x3d][_0xa4d9[110]][_0xe507x3e][_0xa4d9[83]]])}};return _0xe507x39}})[_0xa4d9[44]](function(_0xe507x3b){if(_0xe507x3b){return db[_0xa4d9[54]][_0xa4d9[85]]({where:{id:_0xe507x2d[_0xa4d9[84]][_0xa4d9[83]]}})}})[_0xa4d9[44]](function(_0xe507x3a){if(_0xe507x3a){_0xe507x35= _0xe507x3a;return _0xe507x35[_0xa4d9[109]](_0xe507x39,{penalty:_0xe507x2d[_0xa4d9[87]][_0xa4d9[108]]})}})[_0xa4d9[44]](function(_0xe507x1d){if(_0xe507x1d){return _0xe507x35[_0xa4d9[106]](_0xe507x2d[_0xa4d9[87]][_0xa4d9[107]])}})[_0xa4d9[44]](handleEntityNotFound(_0xe507x1b,null))[_0xa4d9[44]](respondWithStatusCode(_0xe507x1b,null))[_0xa4d9[77]](handleError(_0xe507x1b,null))};exports[_0xa4d9[112]]= function(_0xe507x2d,_0xe507x1b,_0xe507x34){var _0xe507x39=[];var _0xe507x35;return db[_0xa4d9[105]][_0xa4d9[81]]({where:{id:_0xe507x2d[_0xa4d9[57]][_0xa4d9[107]]},attributes:[_0xa4d9[83]],include:[{model:db[_0xa4d9[99]],as:_0xa4d9[110],attributes:[_0xa4d9[83]],raw:true}]})[_0xa4d9[44]](function(_0xe507x3c){if(_0xe507x3c){for(var _0xe507x3d=0;_0xe507x3d< _0xe507x3c[_0xa4d9[63]];_0xe507x3d+= 1){for(var _0xe507x3e=0;_0xe507x3e< _0xe507x3c[_0xe507x3d][_0xa4d9[110]][_0xa4d9[63]];_0xe507x3e+= 1){_0xe507x39= _[_0xa4d9[111]](_0xe507x39,[_0xe507x3c[_0xe507x3d][_0xa4d9[110]][_0xe507x3e][_0xa4d9[83]]])}};return _0xe507x39}})[_0xa4d9[44]](function(_0xe507x3b){if(_0xe507x3b){return db[_0xa4d9[54]][_0xa4d9[85]]({where:{id:_0xe507x2d[_0xa4d9[84]][_0xa4d9[83]]}})}})[_0xa4d9[44]](function(_0xe507x3a){if(_0xe507x3a){_0xe507x35= _0xe507x3a;return _0xe507x35[_0xa4d9[113]](_0xe507x39)}})[_0xa4d9[44]](function(_0xe507x1d){if(_0xe507x35){return _0xe507x35[_0xa4d9[112]](_0xe507x2d[_0xa4d9[57]][_0xa4d9[107]])}})[_0xa4d9[44]](handleEntityNotFound(_0xe507x1b,null))[_0xa4d9[44]](respondWithStatusCode(_0xe507x1b,null))[_0xa4d9[77]](handleError(_0xe507x1b,null))};exports[_0xa4d9[109]]= function(_0xe507x2d,_0xe507x1b,_0xe507x34){return db[_0xa4d9[54]][_0xa4d9[85]]({where:{id:_0xe507x2d[_0xa4d9[84]][_0xa4d9[83]]}})[_0xa4d9[44]](handleEntityNotFound(_0xe507x1b,null))[_0xa4d9[44]](function(_0xe507x1d){if(_0xe507x1d){return _0xe507x1d[_0xa4d9[109]](_0xe507x2d[_0xa4d9[87]][_0xa4d9[107]],_[_0xa4d9[117]](_0xe507x2d[_0xa4d9[87]],[_0xa4d9[107],_0xa4d9[83]])|| {})[_0xa4d9[116]](function(_0xe507x38){for(var _0xe507x3d=0;_0xe507x3d< _0xe507x2d[_0xa4d9[87]][_0xa4d9[107]][_0xa4d9[63]];_0xe507x3d+= 1){socket[_0xa4d9[115]](_0xa4d9[114],{UserId:_0xe507x2d[_0xa4d9[87]][_0xa4d9[107]][_0xe507x3d],SmsQueueId:_0xe507x2d[_0xa4d9[84]][_0xa4d9[83]]})};return _0xe507x38})}})[_0xa4d9[44]](respondWithResult(_0xe507x1b,null))[_0xa4d9[77]](handleError(_0xe507x1b,null))};exports[_0xa4d9[113]]= function(_0xe507x2d,_0xe507x1b,_0xe507x34){var _0xe507x38;return db[_0xa4d9[54]][_0xa4d9[85]]({where:{id:_0xe507x2d[_0xa4d9[84]][_0xa4d9[83]]}})[_0xa4d9[44]](handleEntityNotFound(_0xe507x1b,null))[_0xa4d9[44]](function(_0xe507x1d){if(_0xe507x1d){return _0xe507x1d[_0xa4d9[113]](_0xe507x2d[_0xa4d9[57]][_0xa4d9[107]])[_0xa4d9[44]](function(_0xe507x38){if(_[_0xa4d9[118]](_0xe507x2d[_0xa4d9[57]][_0xa4d9[107]])){for(var _0xe507x3d=0;_0xe507x3d< _0xe507x2d[_0xa4d9[57]][_0xa4d9[107]][_0xa4d9[63]];_0xe507x3d+= 1){socket[_0xa4d9[115]](_0xa4d9[119],{UserId:_0xe507x2d[_0xa4d9[57]][_0xa4d9[107]][_0xe507x3d],SmsQueueId:_0xe507x2d[_0xa4d9[84]][_0xa4d9[83]]})}}else {socket[_0xa4d9[115]](_0xa4d9[119],{UserId:_0xe507x2d[_0xa4d9[57]][_0xa4d9[107]],SmsQueueId:_0xe507x2d[_0xa4d9[84]][_0xa4d9[83]]})}})}})[_0xa4d9[44]](respondWithStatusCode(_0xe507x1b,null))[_0xa4d9[77]](handleError(_0xe507x1b,null))};exports[_0xa4d9[120]]= function(_0xe507x2d,_0xe507x1d,_0xe507x34){var _0xe507x20={};var _0xe507x2e={};var _0xe507x37;var _0xe507x21;return db[_0xa4d9[54]][_0xa4d9[103]]({where:{id:_0xe507x2d[_0xa4d9[84]][_0xa4d9[83]]}})[_0xa4d9[44]](handleEntityNotFound(_0xe507x1d,null))[_0xa4d9[44]](function(_0xe507x1d){if(_0xe507x1d){_0xe507x37= _0xe507x1d;_0xe507x2e[_0xa4d9[52]]= _[_0xa4d9[55]](db[_0xa4d9[99]][_0xa4d9[53]]);_0xe507x2e[_0xa4d9[57]]= _[_0xa4d9[55]](_0xe507x2d[_0xa4d9[57]]);_0xe507x2e[_0xa4d9[59]]= _[_0xa4d9[60]](_0xe507x2e[_0xa4d9[52]],_0xe507x2e[_0xa4d9[57]]);_0xe507x20[_0xa4d9[61]]= _[_0xa4d9[60]](_0xe507x2e[_0xa4d9[52]],qs[_0xa4d9[62]](_0xe507x2d[_0xa4d9[57]][_0xa4d9[62]]));_0xe507x20[_0xa4d9[61]]= (_0xe507x20[_0xa4d9[61]][_0xa4d9[63]])?_0xe507x20[_0xa4d9[61]]:_0xe507x2e[_0xa4d9[52]];_0xe507x20[_0xa4d9[66]]= qs[_0xa4d9[67]](_0xe507x2d[_0xa4d9[57]][_0xa4d9[67]]);_0xe507x20[_0xa4d9[68]]= qs[_0xa4d9[59]](_[_0xa4d9[69]](_0xe507x2d[_0xa4d9[57]],_0xe507x2e[_0xa4d9[59]]));if(_0xe507x2d[_0xa4d9[57]][_0xa4d9[73]]){_0xe507x20[_0xa4d9[68]]= _[_0xa4d9[72]](_0xe507x20[_0xa4d9[68]],{$or:_[_0xa4d9[75]](_0xe507x20[_0xa4d9[61]],function(_0xe507x31){var _0xe507x2f={};_0xe507x2f[_0xe507x31]= {$like:_0xa4d9[74]+ _0xe507x2d[_0xa4d9[57]][_0xa4d9[73]]+ _0xa4d9[74]};return _0xe507x2f})})};_0xe507x20= _[_0xa4d9[72]]({},_0xe507x20,_0xe507x2d[_0xa4d9[76]]);return _0xe507x37[_0xa4d9[120]](_0xe507x20)}})[_0xa4d9[44]](function(_0xe507x38){if(_0xe507x38){_0xe507x21= _0xe507x38[_0xa4d9[63]];if(!_0xe507x2d[_0xa4d9[57]][_0xa4d9[65]](_0xa4d9[64])){_0xe507x20[_0xa4d9[36]]= qs[_0xa4d9[36]](_0xe507x2d[_0xa4d9[57]][_0xa4d9[36]]);_0xe507x20[_0xa4d9[35]]= qs[_0xa4d9[35]](_0xe507x2d[_0xa4d9[57]][_0xa4d9[35]])};return _0xe507x37[_0xa4d9[120]](_0xe507x20)}})[_0xa4d9[44]](function(_0xe507x33){if(_0xe507x33){return _0xe507x33?{count:_0xe507x21,rows:_0xe507x33}:null}})[_0xa4d9[44]](respondWithResult(_0xe507x1d,null))[_0xa4d9[77]](handleError(_0xe507x1d,null))}
\ No newline at end of file
+var _0x408a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x6D\x73\x51\x75\x65\x75\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x66\x6F\x72\x6D\x61\x74","\x73\x6D\x73\x50\x61\x75\x73\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x55\x73\x65\x72\x49\x64","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x55\x73\x65\x72","\x67\x65\x74","\x55\x73\x65\x72\x53\x6D\x73\x51\x75\x65\x75\x65","\x53\x6D\x73\x51\x75\x65\x75\x65\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x54\x65\x61\x6D\x73","\x54\x65\x61\x6D","\x61\x64\x64\x54\x65\x61\x6D\x73","\x69\x64\x73","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x41\x67\x65\x6E\x74\x73","\x75\x6E\x69\x6F\x6E","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x75\x73\x65\x72\x53\x6D\x73\x51\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x6F\x6D\x69\x74","\x69\x73\x41\x72\x72\x61\x79","\x75\x73\x65\x72\x53\x6D\x73\x51\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x67\x65\x74\x41\x67\x65\x6E\x74\x73"];_0x408a[0];var jsonpatch=require(_0x408a[1]);var rp=require(_0x408a[2]);var moment=require(_0x408a[3]);var BPromise=require(_0x408a[4]);var Mustache=require(_0x408a[5]);var util=require(_0x408a[6]);var path=require(_0x408a[7]);var sox=require(_0x408a[8]);var csv=require(_0x408a[9]);var ejs=require(_0x408a[10]);var fs=require(_0x408a[11]);var _=require(_0x408a[12]);var squel=require(_0x408a[13]);var crypto=require(_0x408a[14]);var jsforce=require(_0x408a[15]);var deskjs=require(_0x408a[16]);var toCsv=require(_0x408a[9]);var querystring=require(_0x408a[17]);var Papa=require(_0x408a[18]);var qs=require(_0x408a[19]);var logger=require(_0x408a[21])(_0x408a[20]);var utils=require(_0x408a[22]);var config=require(_0x408a[23]);var db=require(_0x408a[25])[_0x408a[24]];var socket=require(_0x408a[27])({host:_0x408a[26],port:6379});require(_0x408a[29])[_0x408a[28]](socket);function respondWithStatusCode(_0x267ax1b,_0x267ax1c){_0x267ax1c= _0x267ax1c|| 204;return function(_0x267ax1d){if(_0x267ax1d){return _0x267ax1b[_0x408a[30]](_0x267ax1c)};return _0x267ax1b[_0x408a[32]](_0x267ax1c)[_0x408a[31]]()}}function respondWithResult(_0x267ax1b,_0x267ax1c){_0x267ax1c= _0x267ax1c|| 200;return function(_0x267ax1d){if(_0x267ax1d){return _0x267ax1b[_0x408a[32]](_0x267ax1c)[_0x408a[33]](_0x267ax1d)}}}function respondWithFilteredResult(_0x267ax1b,_0x267ax20){return function(_0x267ax1d){if(_0x267ax1d){var _0x267ax21=_0x267ax1d[_0x408a[34]],_0x267ax22=_0x267ax20[_0x408a[35]],_0x267ax23=_0x267ax20[_0x408a[35]]+ _0x267ax20[_0x408a[36]],_0x267ax1c;if(_0x267ax23>= _0x267ax21){_0x267ax23= _0x267ax21;_0x267ax1c= 200}else {_0x267ax1c= 206};_0x267ax1b[_0x408a[32]](_0x267ax1c);return _0x267ax1b[_0x408a[40]](_0x408a[37],_0x267ax22+ _0x408a[38]+ _0x267ax23+ _0x408a[39]+ _0x267ax21)[_0x408a[33]](_0x267ax1d)};return null}}function patchUpdates(_0x267ax25){return function(_0x267ax1d){try{jsonpatch[_0x408a[41]](_0x267ax1d,_0x267ax25,true)}catch(err){return BPromise[_0x408a[42]](err)};return _0x267ax1d[_0x408a[43]]()}}function saveUpdates(_0x267ax27,_0x267ax1c){return function(_0x267ax1d){if(_0x267ax1d){return _0x267ax1d[_0x408a[45]](_0x267ax27)[_0x408a[44]](function(_0x267ax28){return _0x267ax28})};return null}}function removeEntity(_0x267ax1b,_0x267ax1c){return function(_0x267ax1d){if(_0x267ax1d){return _0x267ax1d[_0x408a[46]]()[_0x408a[44]](function(){_0x267ax1b[_0x408a[32]](204)[_0x408a[31]]()})}}}function handleEntityNotFound(_0x267ax1b,_0x267ax1c){return function(_0x267ax1d){if(!_0x267ax1d){_0x267ax1b[_0x408a[30]](404)};return _0x267ax1d}}function handleError(_0x267ax1b,_0x267ax1c){_0x267ax1c= _0x267ax1c|| 500;return function(_0x267ax2c){logger[_0x408a[48]](_0x267ax2c[_0x408a[47]]);if(_0x267ax2c[_0x408a[49]]){delete _0x267ax2c[_0x408a[49]]};_0x267ax1b[_0x408a[32]](_0x267ax1c)[_0x408a[50]](_0x267ax2c)}}exports[_0x408a[51]]= function(_0x267ax2d,_0x267ax1b){var _0x267ax20={},_0x267ax2e={},_0x267ax2f={count:0,rows:[]};_0x267ax2e[_0x408a[52]]= _[_0x408a[55]](db[_0x408a[54]][_0x408a[53]]);var _0x267ax30={dateStart:_0x267ax2d[_0x408a[57]][_0x408a[56]],dateEnd:_0x267ax2d[_0x408a[57]][_0x408a[58]]};delete _0x267ax2d[_0x408a[57]][_0x408a[56]];delete _0x267ax2d[_0x408a[57]][_0x408a[58]];_0x267ax2e[_0x408a[57]]= _[_0x408a[55]](_0x267ax2d[_0x408a[57]]);_0x267ax2e[_0x408a[59]]= _[_0x408a[60]](_0x267ax2e[_0x408a[52]],_0x267ax2e[_0x408a[57]]);_0x267ax20[_0x408a[61]]= _[_0x408a[60]](_0x267ax2e[_0x408a[52]],qs[_0x408a[62]](_0x267ax2d[_0x408a[57]][_0x408a[62]]));_0x267ax20[_0x408a[61]]= (_0x267ax20[_0x408a[61]][_0x408a[63]])?_0x267ax20[_0x408a[61]]:_0x267ax2e[_0x408a[52]];if(!_0x267ax2d[_0x408a[57]][_0x408a[65]](_0x408a[64])){_0x267ax20[_0x408a[36]]= qs[_0x408a[36]](_0x267ax2d[_0x408a[57]][_0x408a[36]]);_0x267ax20[_0x408a[35]]= qs[_0x408a[35]](_0x267ax2d[_0x408a[57]][_0x408a[35]])};_0x267ax20[_0x408a[66]]= qs[_0x408a[67]](_0x267ax2d[_0x408a[57]][_0x408a[67]]);_0x267ax20[_0x408a[68]]= qs[_0x408a[59]](_[_0x408a[69]](_0x267ax2d[_0x408a[57]],_0x267ax2e[_0x408a[59]]));if(_0x267ax30[_0x408a[56]]){if(_0x267ax30[_0x408a[58]]){_0x267ax30[_0x408a[58]]= moment(_0x267ax30[_0x408a[58]])[_0x408a[71]](1,_0x408a[70])}else {_0x267ax30[_0x408a[58]]= moment(_0x267ax30[_0x408a[56]])[_0x408a[71]](1,_0x408a[70])};_[_0x408a[72]](_0x267ax20[_0x408a[68]],{createdAt:{$gte:_0x267ax30[_0x408a[56]],$lte:_0x267ax30[_0x408a[58]]}})};if(_0x267ax2d[_0x408a[57]][_0x408a[73]]){_0x267ax20[_0x408a[68]]= _[_0x408a[72]](_0x267ax20[_0x408a[68]],{$or:_[_0x408a[75]](_0x267ax20[_0x408a[61]],function(_0x267ax31){var _0x267ax2f={};_0x267ax2f[_0x267ax31]= {$like:_0x408a[74]+ _0x267ax2d[_0x408a[57]][_0x408a[73]]+ _0x408a[74]};return _0x267ax2f})})};_0x267ax20= _[_0x408a[72]]({},_0x267ax20,_0x267ax2d[_0x408a[76]]);var _0x267ax32={where:_0x267ax20[_0x408a[68]]};return db[_0x408a[54]][_0x408a[34]](_0x267ax32)[_0x408a[44]](function(_0x267ax21){_0x267ax2f[_0x408a[34]]= _0x267ax21;if(_0x267ax2d[_0x408a[57]][_0x408a[79]]){_0x267ax20[_0x408a[80]]= [{all:true}]};return db[_0x408a[54]][_0x408a[81]](_0x267ax20)})[_0x408a[44]](function(_0x267ax33){_0x267ax2f[_0x408a[78]]= _0x267ax33;return _0x267ax2f})[_0x408a[44]](respondWithFilteredResult(_0x267ax1b,_0x267ax20))[_0x408a[77]](handleError(_0x267ax1b,null))};exports[_0x408a[82]]= function(_0x267ax2d,_0x267ax1b){var _0x267ax20={raw:true,where:{id:_0x267ax2d[_0x408a[84]][_0x408a[83]]}},_0x267ax2e={};_0x267ax2e[_0x408a[52]]= _[_0x408a[55]](db[_0x408a[54]][_0x408a[53]]);_0x267ax2e[_0x408a[57]]= _[_0x408a[55]](_0x267ax2d[_0x408a[57]]);_0x267ax2e[_0x408a[59]]= _[_0x408a[60]](_0x267ax2e[_0x408a[52]],_0x267ax2e[_0x408a[57]]);_0x267ax20[_0x408a[61]]= _[_0x408a[60]](_0x267ax2e[_0x408a[52]],qs[_0x408a[62]](_0x267ax2d[_0x408a[57]][_0x408a[62]]));_0x267ax20[_0x408a[61]]= (_0x267ax20[_0x408a[61]][_0x408a[63]])?_0x267ax20[_0x408a[61]]:_0x267ax2e[_0x408a[52]];if(_0x267ax2d[_0x408a[57]][_0x408a[79]]){_0x267ax20[_0x408a[80]]= [{all:true}]};_0x267ax20= _[_0x408a[72]]({},_0x267ax20,_0x267ax2d[_0x408a[76]]);return db[_0x408a[54]][_0x408a[85]](_0x267ax20)[_0x408a[44]](handleEntityNotFound(_0x267ax1b,null))[_0x408a[44]](respondWithResult(_0x267ax1b,null))[_0x408a[77]](handleError(_0x267ax1b,null))};exports[_0x408a[86]]= function(_0x267ax2d,_0x267ax1b){return db[_0x408a[54]][_0x408a[86]](_0x267ax2d[_0x408a[87]],{})[_0x408a[44]](respondWithResult(_0x267ax1b,201))[_0x408a[77]](handleError(_0x267ax1b,null))};exports[_0x408a[45]]= function(_0x267ax2d,_0x267ax1b){if(_0x267ax2d[_0x408a[87]][_0x408a[83]]){delete _0x267ax2d[_0x408a[87]][_0x408a[83]]};return db[_0x408a[54]][_0x408a[85]]({where:{id:_0x267ax2d[_0x408a[84]][_0x408a[83]]}})[_0x408a[44]](handleEntityNotFound(_0x267ax1b,null))[_0x408a[44]](saveUpdates(_0x267ax2d[_0x408a[87]],null))[_0x408a[44]](respondWithResult(_0x267ax1b,null))[_0x408a[77]](handleError(_0x267ax1b,null))};exports[_0x408a[46]]= function(_0x267ax2d,_0x267ax1b){return db[_0x408a[54]][_0x408a[85]]({where:{id:_0x267ax2d[_0x408a[84]][_0x408a[83]]}})[_0x408a[44]](handleEntityNotFound(_0x267ax1b,null))[_0x408a[44]](removeEntity(_0x267ax1b,null))[_0x408a[77]](handleError(_0x267ax1b,null))};exports[_0x408a[88]]= function(_0x267ax2d,_0x267ax1b){return db[_0x408a[54]][_0x408a[88]]()[_0x408a[44]](respondWithResult(_0x267ax1b,null))[_0x408a[77]](handleError(_0x267ax1b,null))};exports[_0x408a[89]]= function(_0x267ax2d,_0x267ax1b,_0x267ax34){var _0x267ax20={raw:true,where:{}},_0x267ax2e={},_0x267ax35;return db[_0x408a[54]][_0x408a[103]]({where:{id:_0x267ax2d[_0x408a[84]][_0x408a[83]]}})[_0x408a[44]](handleEntityNotFound(_0x267ax1b,null))[_0x408a[44]](function(_0x267ax1d){if(_0x267ax1d){_0x267ax35= _0x267ax1d[_0x408a[100]]({plain:true});_0x267ax2e[_0x408a[52]]= _[_0x408a[55]](db[_0x408a[101]][_0x408a[53]]);_0x267ax2e[_0x408a[57]]= _[_0x408a[55]](_0x267ax2d[_0x408a[57]]);_0x267ax2e[_0x408a[59]]= _[_0x408a[60]](_0x267ax2e[_0x408a[52]],_0x267ax2e[_0x408a[57]]);_0x267ax20[_0x408a[61]]= _[_0x408a[60]](_0x267ax2e[_0x408a[52]],qs[_0x408a[62]](_0x267ax2d[_0x408a[57]][_0x408a[62]]));_0x267ax20[_0x408a[61]]= (_0x267ax20[_0x408a[61]][_0x408a[63]])?_0x267ax20[_0x408a[61]]:_0x267ax2e[_0x408a[52]];if(!_0x267ax2d[_0x408a[57]][_0x408a[65]](_0x408a[64])){_0x267ax20[_0x408a[36]]= qs[_0x408a[36]](_0x267ax2d[_0x408a[57]][_0x408a[36]]);_0x267ax20[_0x408a[35]]= qs[_0x408a[35]](_0x267ax2d[_0x408a[57]][_0x408a[35]])};_0x267ax20[_0x408a[66]]= qs[_0x408a[67]](_0x267ax2d[_0x408a[57]][_0x408a[67]]);_0x267ax20[_0x408a[68]]= qs[_0x408a[59]](_[_0x408a[69]](_0x267ax2d[_0x408a[57]],_0x267ax2e[_0x408a[59]]));_0x267ax20[_0x408a[68]][_0x408a[102]]= _0x267ax1d[_0x408a[83]];if(_0x267ax2d[_0x408a[57]][_0x408a[73]]){_0x267ax20[_0x408a[68]]= _[_0x408a[72]](_0x267ax20[_0x408a[68]],{$or:_[_0x408a[75]](_0x267ax20[_0x408a[61]],function(_0x267ax31){var _0x267ax2f={};_0x267ax2f[_0x267ax31]= {$like:_0x408a[74]+ _0x267ax2d[_0x408a[57]][_0x408a[73]]+ _0x408a[74]};return _0x267ax2f})})};_0x267ax20= _[_0x408a[72]]({},_0x267ax20,_0x267ax2d[_0x408a[76]]);return db[_0x408a[101]][_0x408a[81]](_0x267ax20)}})[_0x408a[44]](function(_0x267ax1b){if(_0x267ax1b){return db[_0x408a[99]][_0x408a[98]]({where:{id:_[_0x408a[75]](_0x267ax1b,_0x408a[96]),role:_0x408a[97]},attributes:[_0x408a[83],_0x408a[49],_0x408a[93],_0x408a[95],_0x408a[94]]})}})[_0x408a[44]](function(_0x267ax1b){if(_0x267ax1b){return {count:_0x267ax1b[_0x408a[34]],rows:_[_0x408a[75]](_0x267ax1b[_0x408a[78]],function(_0x267ax36){return {membername:_0x267ax36[_0x408a[49]],UserId:_0x267ax36[_0x408a[83]],queue_name:_0x267ax35[_0x408a[49]],SmsQueueId:_0x267ax35[_0x408a[83]],interface:util[_0x408a[92]](_0x408a[90],_0x408a[91],_0x267ax36[_0x408a[49]]),penalty:0,paused:_0x267ax36[_0x408a[93]],createdAt:_0x267ax36[_0x408a[94]],updatedAt:_0x267ax36[_0x408a[95]]}})}}else {return {count:0,rows:[]}}})[_0x408a[44]](respondWithFilteredResult(_0x267ax1b,_0x267ax20))[_0x408a[77]](handleError(_0x267ax1b,null))};exports[_0x408a[104]]= function(_0x267ax2d,_0x267ax1d,_0x267ax34){var _0x267ax20={};var _0x267ax2e={};var _0x267ax37;var _0x267ax21;return db[_0x408a[54]][_0x408a[103]]({where:{id:_0x267ax2d[_0x408a[84]][_0x408a[83]]}})[_0x408a[44]](handleEntityNotFound(_0x267ax1d,null))[_0x408a[44]](function(_0x267ax1d){if(_0x267ax1d){_0x267ax37= _0x267ax1d;_0x267ax2e[_0x408a[52]]= _[_0x408a[55]](db[_0x408a[105]][_0x408a[53]]);_0x267ax2e[_0x408a[57]]= _[_0x408a[55]](_0x267ax2d[_0x408a[57]]);_0x267ax2e[_0x408a[59]]= _[_0x408a[60]](_0x267ax2e[_0x408a[52]],_0x267ax2e[_0x408a[57]]);_0x267ax20[_0x408a[61]]= _[_0x408a[60]](_0x267ax2e[_0x408a[52]],qs[_0x408a[62]](_0x267ax2d[_0x408a[57]][_0x408a[62]]));_0x267ax20[_0x408a[61]]= (_0x267ax20[_0x408a[61]][_0x408a[63]])?_0x267ax20[_0x408a[61]]:_0x267ax2e[_0x408a[52]];_0x267ax20[_0x408a[66]]= qs[_0x408a[67]](_0x267ax2d[_0x408a[57]][_0x408a[67]]);_0x267ax20[_0x408a[68]]= qs[_0x408a[59]](_[_0x408a[69]](_0x267ax2d[_0x408a[57]],_0x267ax2e[_0x408a[59]]));if(_0x267ax2d[_0x408a[57]][_0x408a[73]]){_0x267ax20[_0x408a[68]]= _[_0x408a[72]](_0x267ax20[_0x408a[68]],{$or:_[_0x408a[75]](_0x267ax20[_0x408a[61]],function(_0x267ax31){var _0x267ax2f={};_0x267ax2f[_0x267ax31]= {$like:_0x408a[74]+ _0x267ax2d[_0x408a[57]][_0x408a[73]]+ _0x408a[74]};return _0x267ax2f})})};_0x267ax20= _[_0x408a[72]]({},_0x267ax20,_0x267ax2d[_0x408a[76]]);return _0x267ax37[_0x408a[104]](_0x267ax20)}})[_0x408a[44]](function(_0x267ax38){if(_0x267ax38){_0x267ax21= _0x267ax38[_0x408a[63]];if(!_0x267ax2d[_0x408a[57]][_0x408a[65]](_0x408a[64])){_0x267ax20[_0x408a[36]]= qs[_0x408a[36]](_0x267ax2d[_0x408a[57]][_0x408a[36]]);_0x267ax20[_0x408a[35]]= qs[_0x408a[35]](_0x267ax2d[_0x408a[57]][_0x408a[35]])};return _0x267ax37[_0x408a[104]](_0x267ax20)}})[_0x408a[44]](function(_0x267ax33){if(_0x267ax33){return _0x267ax33?{count:_0x267ax21,rows:_0x267ax33}:null}})[_0x408a[44]](respondWithResult(_0x267ax1d,null))[_0x408a[77]](handleError(_0x267ax1d,null))};exports[_0x408a[106]]= function(_0x267ax2d,_0x267ax1b,_0x267ax34){var _0x267ax39=[];var _0x267ax35;return db[_0x408a[105]][_0x408a[81]]({where:{id:_0x267ax2d[_0x408a[87]][_0x408a[107]]},attributes:[_0x408a[83]],include:[{model:db[_0x408a[99]],as:_0x408a[110],attributes:[_0x408a[83]],raw:true}]})[_0x408a[44]](function(_0x267ax3c){if(_0x267ax3c){for(var _0x267ax3d=0;_0x267ax3d< _0x267ax3c[_0x408a[63]];_0x267ax3d+= 1){for(var _0x267ax3e=0;_0x267ax3e< _0x267ax3c[_0x267ax3d][_0x408a[110]][_0x408a[63]];_0x267ax3e+= 1){_0x267ax39= _[_0x408a[111]](_0x267ax39,[_0x267ax3c[_0x267ax3d][_0x408a[110]][_0x267ax3e][_0x408a[83]]])}};return _0x267ax39}})[_0x408a[44]](function(_0x267ax3b){if(_0x267ax3b){return db[_0x408a[54]][_0x408a[85]]({where:{id:_0x267ax2d[_0x408a[84]][_0x408a[83]]}})}})[_0x408a[44]](function(_0x267ax3a){if(_0x267ax3a){_0x267ax35= _0x267ax3a;return _0x267ax35[_0x408a[109]](_0x267ax39,{penalty:_0x267ax2d[_0x408a[87]][_0x408a[108]]})}})[_0x408a[44]](function(_0x267ax1d){if(_0x267ax1d){return _0x267ax35[_0x408a[106]](_0x267ax2d[_0x408a[87]][_0x408a[107]])}})[_0x408a[44]](handleEntityNotFound(_0x267ax1b,null))[_0x408a[44]](respondWithStatusCode(_0x267ax1b,null))[_0x408a[77]](handleError(_0x267ax1b,null))};exports[_0x408a[112]]= function(_0x267ax2d,_0x267ax1b,_0x267ax34){var _0x267ax39=[];var _0x267ax35;return db[_0x408a[105]][_0x408a[81]]({where:{id:_0x267ax2d[_0x408a[57]][_0x408a[107]]},attributes:[_0x408a[83]],include:[{model:db[_0x408a[99]],as:_0x408a[110],attributes:[_0x408a[83]],raw:true}]})[_0x408a[44]](function(_0x267ax3c){if(_0x267ax3c){for(var _0x267ax3d=0;_0x267ax3d< _0x267ax3c[_0x408a[63]];_0x267ax3d+= 1){for(var _0x267ax3e=0;_0x267ax3e< _0x267ax3c[_0x267ax3d][_0x408a[110]][_0x408a[63]];_0x267ax3e+= 1){_0x267ax39= _[_0x408a[111]](_0x267ax39,[_0x267ax3c[_0x267ax3d][_0x408a[110]][_0x267ax3e][_0x408a[83]]])}};return _0x267ax39}})[_0x408a[44]](function(_0x267ax3b){if(_0x267ax3b){return db[_0x408a[54]][_0x408a[85]]({where:{id:_0x267ax2d[_0x408a[84]][_0x408a[83]]}})}})[_0x408a[44]](function(_0x267ax3a){if(_0x267ax3a){_0x267ax35= _0x267ax3a;return _0x267ax35[_0x408a[113]](_0x267ax39)}})[_0x408a[44]](function(_0x267ax1d){if(_0x267ax35){return _0x267ax35[_0x408a[112]](_0x267ax2d[_0x408a[57]][_0x408a[107]])}})[_0x408a[44]](handleEntityNotFound(_0x267ax1b,null))[_0x408a[44]](respondWithStatusCode(_0x267ax1b,null))[_0x408a[77]](handleError(_0x267ax1b,null))};exports[_0x408a[109]]= function(_0x267ax2d,_0x267ax1b,_0x267ax34){return db[_0x408a[54]][_0x408a[85]]({where:{id:_0x267ax2d[_0x408a[84]][_0x408a[83]]}})[_0x408a[44]](handleEntityNotFound(_0x267ax1b,null))[_0x408a[44]](function(_0x267ax1d){if(_0x267ax1d){return _0x267ax1d[_0x408a[109]](_0x267ax2d[_0x408a[87]][_0x408a[107]],_[_0x408a[117]](_0x267ax2d[_0x408a[87]],[_0x408a[107],_0x408a[83]])|| {})[_0x408a[116]](function(_0x267ax38){for(var _0x267ax3d=0;_0x267ax3d< _0x267ax2d[_0x408a[87]][_0x408a[107]][_0x408a[63]];_0x267ax3d+= 1){socket[_0x408a[115]](_0x408a[114],{UserId:_0x267ax2d[_0x408a[87]][_0x408a[107]][_0x267ax3d],SmsQueueId:_0x267ax2d[_0x408a[84]][_0x408a[83]]})};return _0x267ax38})}})[_0x408a[44]](respondWithResult(_0x267ax1b,null))[_0x408a[77]](handleError(_0x267ax1b,null))};exports[_0x408a[113]]= function(_0x267ax2d,_0x267ax1b,_0x267ax34){var _0x267ax38;return db[_0x408a[54]][_0x408a[85]]({where:{id:_0x267ax2d[_0x408a[84]][_0x408a[83]]}})[_0x408a[44]](handleEntityNotFound(_0x267ax1b,null))[_0x408a[44]](function(_0x267ax1d){if(_0x267ax1d){return _0x267ax1d[_0x408a[113]](_0x267ax2d[_0x408a[57]][_0x408a[107]])[_0x408a[44]](function(_0x267ax38){if(_[_0x408a[118]](_0x267ax2d[_0x408a[57]][_0x408a[107]])){for(var _0x267ax3d=0;_0x267ax3d< _0x267ax2d[_0x408a[57]][_0x408a[107]][_0x408a[63]];_0x267ax3d+= 1){socket[_0x408a[115]](_0x408a[119],{UserId:_0x267ax2d[_0x408a[57]][_0x408a[107]][_0x267ax3d],SmsQueueId:_0x267ax2d[_0x408a[84]][_0x408a[83]]})}}else {socket[_0x408a[115]](_0x408a[119],{UserId:_0x267ax2d[_0x408a[57]][_0x408a[107]],SmsQueueId:_0x267ax2d[_0x408a[84]][_0x408a[83]]})}})}})[_0x408a[44]](respondWithStatusCode(_0x267ax1b,null))[_0x408a[77]](handleError(_0x267ax1b,null))};exports[_0x408a[120]]= function(_0x267ax2d,_0x267ax1d,_0x267ax34){var _0x267ax20={};var _0x267ax2e={};var _0x267ax37;var _0x267ax21;return db[_0x408a[54]][_0x408a[103]]({where:{id:_0x267ax2d[_0x408a[84]][_0x408a[83]]}})[_0x408a[44]](handleEntityNotFound(_0x267ax1d,null))[_0x408a[44]](function(_0x267ax1d){if(_0x267ax1d){_0x267ax37= _0x267ax1d;_0x267ax2e[_0x408a[52]]= _[_0x408a[55]](db[_0x408a[99]][_0x408a[53]]);_0x267ax2e[_0x408a[57]]= _[_0x408a[55]](_0x267ax2d[_0x408a[57]]);_0x267ax2e[_0x408a[59]]= _[_0x408a[60]](_0x267ax2e[_0x408a[52]],_0x267ax2e[_0x408a[57]]);_0x267ax20[_0x408a[61]]= _[_0x408a[60]](_0x267ax2e[_0x408a[52]],qs[_0x408a[62]](_0x267ax2d[_0x408a[57]][_0x408a[62]]));_0x267ax20[_0x408a[61]]= (_0x267ax20[_0x408a[61]][_0x408a[63]])?_0x267ax20[_0x408a[61]]:_0x267ax2e[_0x408a[52]];_0x267ax20[_0x408a[66]]= qs[_0x408a[67]](_0x267ax2d[_0x408a[57]][_0x408a[67]]);_0x267ax20[_0x408a[68]]= qs[_0x408a[59]](_[_0x408a[69]](_0x267ax2d[_0x408a[57]],_0x267ax2e[_0x408a[59]]));if(_0x267ax2d[_0x408a[57]][_0x408a[73]]){_0x267ax20[_0x408a[68]]= _[_0x408a[72]](_0x267ax20[_0x408a[68]],{$or:_[_0x408a[75]](_0x267ax20[_0x408a[61]],function(_0x267ax31){var _0x267ax2f={};_0x267ax2f[_0x267ax31]= {$like:_0x408a[74]+ _0x267ax2d[_0x408a[57]][_0x408a[73]]+ _0x408a[74]};return _0x267ax2f})})};_0x267ax20= _[_0x408a[72]]({},_0x267ax20,_0x267ax2d[_0x408a[76]]);return _0x267ax37[_0x408a[120]](_0x267ax20)}})[_0x408a[44]](function(_0x267ax38){if(_0x267ax38){_0x267ax21= _0x267ax38[_0x408a[63]];if(!_0x267ax2d[_0x408a[57]][_0x408a[65]](_0x408a[64])){_0x267ax20[_0x408a[36]]= qs[_0x408a[36]](_0x267ax2d[_0x408a[57]][_0x408a[36]]);_0x267ax20[_0x408a[35]]= qs[_0x408a[35]](_0x267ax2d[_0x408a[57]][_0x408a[35]])};return _0x267ax37[_0x408a[120]](_0x267ax20)}})[_0x408a[44]](function(_0x267ax33){if(_0x267ax33){return _0x267ax33?{count:_0x267ax21,rows:_0x267ax33}:null}})[_0x408a[44]](respondWithResult(_0x267ax1d,null))[_0x408a[77]](handleError(_0x267ax1d,null))}
\ No newline at end of file
index 12d25bb..3e376fd 100644 (file)
@@ -1 +1 @@
-var _0xd05c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x6D\x73\x51\x75\x65\x75\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xd05c[0];var EventEmitter=require(_0xd05c[1]);var SmsQueue=require(_0xd05c[4])[_0xd05c[3]][_0xd05c[2]];var SmsQueueEvents= new EventEmitter();SmsQueueEvents[_0xd05c[5]](0);var events={afterCreate:_0xd05c[6],afterUpdate:_0xd05c[7],afterDestroy:_0xd05c[8]};function emitEvent(event){return function(_0x2552x7,_0x2552x8,_0x2552x9){SmsQueueEvents[_0xd05c[11]](event+ _0xd05c[9]+ _0x2552x7[_0xd05c[10]],_0x2552x7);SmsQueueEvents[_0xd05c[11]](event,_0x2552x7);_0x2552x9(null)}}for(var e in events){if(events[_0xd05c[12]](e)){var event=events[e];SmsQueue[_0xd05c[13]](e,emitEvent(event))}};module[_0xd05c[14]]= SmsQueueEvents
\ No newline at end of file
+var _0x2619=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x6D\x73\x51\x75\x65\x75\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x2619[0];var EventEmitter=require(_0x2619[1]);var SmsQueue=require(_0x2619[4])[_0x2619[3]][_0x2619[2]];var SmsQueueEvents= new EventEmitter();SmsQueueEvents[_0x2619[5]](0);var events={afterCreate:_0x2619[6],afterUpdate:_0x2619[7],afterDestroy:_0x2619[8]};function emitEvent(event){return function(_0x1dd6x7,_0x1dd6x8,_0x1dd6x9){SmsQueueEvents[_0x2619[11]](event+ _0x2619[9]+ _0x1dd6x7[_0x2619[10]],_0x1dd6x7);SmsQueueEvents[_0x2619[11]](event,_0x1dd6x7);_0x1dd6x9(null)}}for(var e in events){if(events[_0x2619[12]](e)){var event=events[e];SmsQueue[_0x2619[13]](e,emitEvent(event))}};module[_0x2619[14]]= SmsQueueEvents
\ No newline at end of file
index 4b55bb5..2cb89c0 100644 (file)
@@ -1 +1 @@
-var _0x3fb8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6D\x73\x51\x75\x65\x75\x65","\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x3fb8[0];var _=require(_0x3fb8[1]);var util=require(_0x3fb8[2]);var logger=require(_0x3fb8[4])(_0x3fb8[3]);var moment=require(_0x3fb8[5]);var BPromise=require(_0x3fb8[6]);var rp=require(_0x3fb8[7]);var attributes=require(_0x3fb8[8]);module[_0x3fb8[9]]= function(_0xc409x8,_0xc409x9){return _0xc409x8[_0x3fb8[12]](_0x3fb8[10],attributes,{tableName:_0x3fb8[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x9215=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6D\x73\x51\x75\x65\x75\x65","\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x9215[0];var _=require(_0x9215[1]);var util=require(_0x9215[2]);var logger=require(_0x9215[4])(_0x9215[3]);var moment=require(_0x9215[5]);var BPromise=require(_0x9215[6]);var rp=require(_0x9215[7]);var attributes=require(_0x9215[8]);module[_0x9215[9]]= function(_0x299ex8,_0x299ex9){return _0x299ex8[_0x9215[12]](_0x9215[10],attributes,{tableName:_0x9215[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 1a01e18..133cb52 100644 (file)
@@ -1 +1 @@
-var _0xd764=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x53\x6D\x73\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x6D\x73\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x53\x6D\x73\x51\x75\x65\x75\x65","\x53\x68\x6F\x77\x53\x6D\x73\x51\x75\x65\x75\x65","\x66\x69\x6E\x64"];_0xd764[0];var _=require(_0xd764[1]);var util=require(_0xd764[2]);var moment=require(_0xd764[3]);var BPromise=require(_0xd764[4]);var rs=require(_0xd764[5]);var fs=require(_0xd764[6]);var db=require(_0xd764[8])[_0xd764[7]];var utils=require(_0xd764[9]);var logger=require(_0xd764[11])(_0xd764[10]);var config=require(_0xd764[12]);var jayson=require(_0xd764[13]);var client=jayson[_0xd764[15]][_0xd764[14]]({port:9002});var socket=require(_0xd764[17])({host:_0xd764[16],port:6379});require(_0xd764[19])[_0xd764[18]](socket);function respondWithRpcPromise(_0xc335xf,_0xc335x10,_0xc335x11){return  new BPromise(function(_0xc335x12,_0xc335x13){return client[_0xd764[32]](_0xc335xf,_0xc335x11)[_0xd764[31]](function(_0xc335x15){logger[_0xd764[24]](_0xd764[20],_0xc335x10,_0xd764[23]);logger[_0xd764[27]](_0xd764[25],_0xc335x10,_0xd764[23],JSON[_0xd764[26]](_0xc335x15));if(_0xc335x15[_0xd764[21]]){if(_0xc335x15[_0xd764[21]][_0xd764[28]]=== 500){logger[_0xd764[21]](_0xd764[20],_0xc335x10,_0xc335x15[_0xd764[21]][_0xd764[29]]);return _0xc335x13(_0xc335x15[_0xd764[21]][_0xd764[29]])};logger[_0xd764[21]](_0xd764[20],_0xc335x10,_0xc335x15[_0xd764[21]][_0xd764[29]]);return _0xc335x12(_0xc335x15[_0xd764[21]][_0xd764[29]])}else {logger[_0xd764[24]](_0xd764[20],_0xc335x10,_0xd764[23]);_0xc335x12(_0xc335x15[_0xd764[30]][_0xd764[29]])}})[_0xd764[22]](function(_0xc335x14){logger[_0xd764[21]](_0xd764[20],_0xc335x10,_0xc335x14);_0xc335x13(_0xc335x14)})})}exports[_0xd764[33]]= function(_0xc335x11){var _0xc335x16=this;return  new Promise(function(_0xc335x12,_0xc335x13){return db[_0xd764[44]][_0xd764[43]]({raw:_0xc335x11[_0xd764[34]]?(_0xc335x11[_0xd764[34]][_0xd764[35]]=== undefined)?true:false:true,where:_0xc335x11[_0xd764[34]]?_0xc335x11[_0xd764[34]][_0xd764[36]]|| null:null,attributes:_0xc335x11[_0xd764[34]]?_0xc335x11[_0xd764[34]][_0xd764[37]]|| null:null,limit:_0xc335x11[_0xd764[34]]?_0xc335x11[_0xd764[34]][_0xd764[38]]|| null:null,include:_0xc335x11[_0xd764[34]]?(_0xc335x11[_0xd764[34]][_0xd764[39]]?_[_0xd764[42]](_0xc335x11[_0xd764[34]][_0xd764[39]],function(_0xc335x17){return {model:db[_0xc335x17[_0xd764[40]]],as:_0xc335x17[_0xd764[41]],attributes:_0xc335x17[_0xd764[37]],include:_0xc335x17[_0xd764[39]]?_[_0xd764[42]](_0xc335x17[_0xd764[39]],function(_0xc335x18){return {model:db[_0xc335x18[_0xd764[40]]],as:_0xc335x18[_0xd764[41]],attributes:_0xc335x18[_0xd764[37]],include:_0xc335x18[_0xd764[39]]?_[_0xd764[42]](_0xc335x18[_0xd764[39]],function(_0xc335x19){return {model:db[_0xc335x19[_0xd764[40]]],as:_0xc335x19[_0xd764[41]],attributes:_0xc335x19[_0xd764[37]]}}):[]}}):[]}}):[]):[]})[_0xd764[31]](function(_0xc335x15){logger[_0xd764[24]](_0xd764[33],_0xc335x11);logger[_0xd764[27]](_0xd764[33],_0xc335x11,JSON[_0xd764[26]](_0xc335x15));_0xc335x12(_0xc335x15)})[_0xd764[22]](function(_0xc335x14){logger[_0xd764[21]](_0xd764[33],_0xc335x14[_0xd764[29]],_0xc335x11);_0xc335x13(_0xc335x16[_0xd764[21]](500,_0xc335x14[_0xd764[29]]))})})};exports[_0xd764[45]]= function(_0xc335x11){var _0xc335x16=this;return  new Promise(function(_0xc335x12,_0xc335x13){return db[_0xd764[44]][_0xd764[46]]({raw:_0xc335x11[_0xd764[34]]?(_0xc335x11[_0xd764[34]][_0xd764[35]]=== undefined)?true:false:true,where:_0xc335x11[_0xd764[34]]?_0xc335x11[_0xd764[34]][_0xd764[36]]|| null:null,attributes:_0xc335x11[_0xd764[34]]?_0xc335x11[_0xd764[34]][_0xd764[37]]|| null:null,include:_0xc335x11[_0xd764[34]]?(_0xc335x11[_0xd764[34]][_0xd764[39]]?_[_0xd764[42]](_0xc335x11[_0xd764[34]][_0xd764[39]],function(_0xc335x17){return {model:db[_0xc335x17[_0xd764[40]]],as:_0xc335x17[_0xd764[41]],attributes:_0xc335x17[_0xd764[37]],include:_0xc335x17[_0xd764[39]]?_[_0xd764[42]](_0xc335x17[_0xd764[39]],function(_0xc335x18){return {model:db[_0xc335x18[_0xd764[40]]],as:_0xc335x18[_0xd764[41]],attributes:_0xc335x18[_0xd764[37]],include:_0xc335x18[_0xd764[39]]?_[_0xd764[42]](_0xc335x18[_0xd764[39]],function(_0xc335x19){return {model:db[_0xc335x19[_0xd764[40]]],as:_0xc335x19[_0xd764[41]],attributes:_0xc335x19[_0xd764[37]]}}):[]}}):[]}}):[]):[]})[_0xd764[31]](function(_0xc335x15){logger[_0xd764[24]](_0xd764[45],_0xc335x11);logger[_0xd764[27]](_0xd764[45],_0xc335x11,JSON[_0xd764[26]](_0xc335x15));_0xc335x12(_0xc335x15)})[_0xd764[22]](function(_0xc335x14){logger[_0xd764[21]](_0xd764[45],_0xc335x14[_0xd764[29]],_0xc335x11);_0xc335x13(_0xc335x16[_0xd764[21]](500,_0xc335x14[_0xd764[29]]))})})}
\ No newline at end of file
+var _0xd078=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x53\x6D\x73\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x6D\x73\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x53\x6D\x73\x51\x75\x65\x75\x65","\x53\x68\x6F\x77\x53\x6D\x73\x51\x75\x65\x75\x65","\x66\x69\x6E\x64"];_0xd078[0];var _=require(_0xd078[1]);var util=require(_0xd078[2]);var moment=require(_0xd078[3]);var BPromise=require(_0xd078[4]);var rs=require(_0xd078[5]);var fs=require(_0xd078[6]);var db=require(_0xd078[8])[_0xd078[7]];var utils=require(_0xd078[9]);var logger=require(_0xd078[11])(_0xd078[10]);var config=require(_0xd078[12]);var jayson=require(_0xd078[13]);var client=jayson[_0xd078[15]][_0xd078[14]]({port:9002});var socket=require(_0xd078[17])({host:_0xd078[16],port:6379});require(_0xd078[19])[_0xd078[18]](socket);function respondWithRpcPromise(_0x3739xf,_0x3739x10,_0x3739x11){return  new BPromise(function(_0x3739x12,_0x3739x13){return client[_0xd078[32]](_0x3739xf,_0x3739x11)[_0xd078[31]](function(_0x3739x15){logger[_0xd078[24]](_0xd078[20],_0x3739x10,_0xd078[23]);logger[_0xd078[27]](_0xd078[25],_0x3739x10,_0xd078[23],JSON[_0xd078[26]](_0x3739x15));if(_0x3739x15[_0xd078[21]]){if(_0x3739x15[_0xd078[21]][_0xd078[28]]=== 500){logger[_0xd078[21]](_0xd078[20],_0x3739x10,_0x3739x15[_0xd078[21]][_0xd078[29]]);return _0x3739x13(_0x3739x15[_0xd078[21]][_0xd078[29]])};logger[_0xd078[21]](_0xd078[20],_0x3739x10,_0x3739x15[_0xd078[21]][_0xd078[29]]);return _0x3739x12(_0x3739x15[_0xd078[21]][_0xd078[29]])}else {logger[_0xd078[24]](_0xd078[20],_0x3739x10,_0xd078[23]);_0x3739x12(_0x3739x15[_0xd078[30]][_0xd078[29]])}})[_0xd078[22]](function(_0x3739x14){logger[_0xd078[21]](_0xd078[20],_0x3739x10,_0x3739x14);_0x3739x13(_0x3739x14)})})}exports[_0xd078[33]]= function(_0x3739x11){var _0x3739x16=this;return  new Promise(function(_0x3739x12,_0x3739x13){return db[_0xd078[44]][_0xd078[43]]({raw:_0x3739x11[_0xd078[34]]?(_0x3739x11[_0xd078[34]][_0xd078[35]]=== undefined)?true:false:true,where:_0x3739x11[_0xd078[34]]?_0x3739x11[_0xd078[34]][_0xd078[36]]|| null:null,attributes:_0x3739x11[_0xd078[34]]?_0x3739x11[_0xd078[34]][_0xd078[37]]|| null:null,limit:_0x3739x11[_0xd078[34]]?_0x3739x11[_0xd078[34]][_0xd078[38]]|| null:null,include:_0x3739x11[_0xd078[34]]?(_0x3739x11[_0xd078[34]][_0xd078[39]]?_[_0xd078[42]](_0x3739x11[_0xd078[34]][_0xd078[39]],function(_0x3739x17){return {model:db[_0x3739x17[_0xd078[40]]],as:_0x3739x17[_0xd078[41]],attributes:_0x3739x17[_0xd078[37]],include:_0x3739x17[_0xd078[39]]?_[_0xd078[42]](_0x3739x17[_0xd078[39]],function(_0x3739x18){return {model:db[_0x3739x18[_0xd078[40]]],as:_0x3739x18[_0xd078[41]],attributes:_0x3739x18[_0xd078[37]],include:_0x3739x18[_0xd078[39]]?_[_0xd078[42]](_0x3739x18[_0xd078[39]],function(_0x3739x19){return {model:db[_0x3739x19[_0xd078[40]]],as:_0x3739x19[_0xd078[41]],attributes:_0x3739x19[_0xd078[37]]}}):[]}}):[]}}):[]):[]})[_0xd078[31]](function(_0x3739x15){logger[_0xd078[24]](_0xd078[33],_0x3739x11);logger[_0xd078[27]](_0xd078[33],_0x3739x11,JSON[_0xd078[26]](_0x3739x15));_0x3739x12(_0x3739x15)})[_0xd078[22]](function(_0x3739x14){logger[_0xd078[21]](_0xd078[33],_0x3739x14[_0xd078[29]],_0x3739x11);_0x3739x13(_0x3739x16[_0xd078[21]](500,_0x3739x14[_0xd078[29]]))})})};exports[_0xd078[45]]= function(_0x3739x11){var _0x3739x16=this;return  new Promise(function(_0x3739x12,_0x3739x13){return db[_0xd078[44]][_0xd078[46]]({raw:_0x3739x11[_0xd078[34]]?(_0x3739x11[_0xd078[34]][_0xd078[35]]=== undefined)?true:false:true,where:_0x3739x11[_0xd078[34]]?_0x3739x11[_0xd078[34]][_0xd078[36]]|| null:null,attributes:_0x3739x11[_0xd078[34]]?_0x3739x11[_0xd078[34]][_0xd078[37]]|| null:null,include:_0x3739x11[_0xd078[34]]?(_0x3739x11[_0xd078[34]][_0xd078[39]]?_[_0xd078[42]](_0x3739x11[_0xd078[34]][_0xd078[39]],function(_0x3739x17){return {model:db[_0x3739x17[_0xd078[40]]],as:_0x3739x17[_0xd078[41]],attributes:_0x3739x17[_0xd078[37]],include:_0x3739x17[_0xd078[39]]?_[_0xd078[42]](_0x3739x17[_0xd078[39]],function(_0x3739x18){return {model:db[_0x3739x18[_0xd078[40]]],as:_0x3739x18[_0xd078[41]],attributes:_0x3739x18[_0xd078[37]],include:_0x3739x18[_0xd078[39]]?_[_0xd078[42]](_0x3739x18[_0xd078[39]],function(_0x3739x19){return {model:db[_0x3739x19[_0xd078[40]]],as:_0x3739x19[_0xd078[41]],attributes:_0x3739x19[_0xd078[37]]}}):[]}}):[]}}):[]):[]})[_0xd078[31]](function(_0x3739x15){logger[_0xd078[24]](_0xd078[45],_0x3739x11);logger[_0xd078[27]](_0xd078[45],_0x3739x11,JSON[_0xd078[26]](_0x3739x15));_0x3739x12(_0x3739x15)})[_0xd078[22]](function(_0x3739x14){logger[_0xd078[21]](_0xd078[45],_0x3739x14[_0xd078[29]],_0x3739x11);_0x3739x13(_0x3739x16[_0xd078[21]](500,_0x3739x14[_0xd078[29]]))})})}
\ No newline at end of file
index 4d52765..7eef1f4 100644 (file)
@@ -1 +1 @@
-var _0x4b11=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x6D\x73\x51\x75\x65\x75\x65\x3A","\x6F\x6E"];_0x4b11[0];var SmsQueueEvents=require(_0x4b11[1]);var events=[_0x4b11[2],_0x4b11[3],_0x4b11[4]];function createListener(_0x19a2x4,_0x19a2x5){return function(_0x19a2x6){_0x19a2x5[_0x4b11[5]](_0x19a2x4,_0x19a2x6)}}function removeListener(_0x19a2x4,_0x19a2x8){return function(){SmsQueueEvents[_0x4b11[6]](_0x19a2x4,_0x19a2x8)}}exports[_0x4b11[7]]= function(_0x19a2x5){for(var _0x19a2x9=0,_0x19a2xa=events[_0x4b11[8]];_0x19a2x9< _0x19a2xa;_0x19a2x9++){var _0x19a2x4=events[_0x19a2x9];var _0x19a2x8=createListener(_0x4b11[9]+ _0x19a2x4,_0x19a2x5);SmsQueueEvents[_0x4b11[10]](_0x19a2x4,_0x19a2x8)}}
\ No newline at end of file
+var _0x61c9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x6D\x73\x51\x75\x65\x75\x65\x3A","\x6F\x6E"];_0x61c9[0];var SmsQueueEvents=require(_0x61c9[1]);var events=[_0x61c9[2],_0x61c9[3],_0x61c9[4]];function createListener(_0x4581x4,_0x4581x5){return function(_0x4581x6){_0x4581x5[_0x61c9[5]](_0x4581x4,_0x4581x6)}}function removeListener(_0x4581x4,_0x4581x8){return function(){SmsQueueEvents[_0x61c9[6]](_0x4581x4,_0x4581x8)}}exports[_0x61c9[7]]= function(_0x4581x5){for(var _0x4581x9=0,_0x4581xa=events[_0x61c9[8]];_0x4581x9< _0x4581xa;_0x4581x9++){var _0x4581x4=events[_0x4581x9];var _0x4581x8=createListener(_0x61c9[9]+ _0x4581x4,_0x4581x5);SmsQueueEvents[_0x61c9[10]](_0x4581x4,_0x4581x8)}}
\ No newline at end of file
index 78b8655..0ad5ece 100644 (file)
@@ -1 +1 @@
-var _0x48ac=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x48ac[0];var multer=require(_0x48ac[1]);var util=require(_0x48ac[2]);var path=require(_0x48ac[3]);var express=require(_0x48ac[4]);var router=express.Router();var auth=require(_0x48ac[5]);var interaction=require(_0x48ac[6]);var config=require(_0x48ac[7]);var controller=require(_0x48ac[8]);router[_0x48ac[12]](_0x48ac[9],auth[_0x48ac[10]](),controller[_0x48ac[11]]);router[_0x48ac[12]](_0x48ac[13],auth[_0x48ac[10]](),controller[_0x48ac[14]]);router[_0x48ac[12]](_0x48ac[15],auth[_0x48ac[10]](),controller[_0x48ac[16]]);router[_0x48ac[18]](_0x48ac[9],auth[_0x48ac[10]](),controller[_0x48ac[17]]);router[_0x48ac[20]](_0x48ac[15],auth[_0x48ac[10]](),controller[_0x48ac[19]]);router[_0x48ac[22]](_0x48ac[15],auth[_0x48ac[10]](),controller[_0x48ac[21]]);module[_0x48ac[23]]= router
\ No newline at end of file
+var _0x5232=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x5232[0];var multer=require(_0x5232[1]);var util=require(_0x5232[2]);var path=require(_0x5232[3]);var express=require(_0x5232[4]);var router=express.Router();var auth=require(_0x5232[5]);var interaction=require(_0x5232[6]);var config=require(_0x5232[7]);var controller=require(_0x5232[8]);router[_0x5232[12]](_0x5232[9],auth[_0x5232[10]](),controller[_0x5232[11]]);router[_0x5232[12]](_0x5232[13],auth[_0x5232[10]](),controller[_0x5232[14]]);router[_0x5232[12]](_0x5232[15],auth[_0x5232[10]](),controller[_0x5232[16]]);router[_0x5232[18]](_0x5232[9],auth[_0x5232[10]](),controller[_0x5232[17]]);router[_0x5232[20]](_0x5232[15],auth[_0x5232[10]](),controller[_0x5232[19]]);router[_0x5232[22]](_0x5232[15],auth[_0x5232[10]](),controller[_0x5232[21]]);module[_0x5232[23]]= router
\ No newline at end of file
index fbae7a4..1df6781 100644 (file)
@@ -1 +1 @@
-var _0x324d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45"];_0x324d[0];var moment=require(_0x324d[1]);var Sequelize=require(_0x324d[2]);module[_0x324d[3]]= {uniqueid:{type:Sequelize[_0x324d[4]],allowNull:false},from:{type:Sequelize[_0x324d[4]]},joinAt:{type:Sequelize[_0x324d[5]]},leaveAt:{type:Sequelize[_0x324d[5]]},acceptAt:{type:Sequelize[_0x324d[5]]},exitAt:{type:Sequelize[_0x324d[5]]},reason:{type:Sequelize[_0x324d[4]]}}
\ No newline at end of file
+var _0xc5c4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45"];_0xc5c4[0];var moment=require(_0xc5c4[1]);var Sequelize=require(_0xc5c4[2]);module[_0xc5c4[3]]= {uniqueid:{type:Sequelize[_0xc5c4[4]],allowNull:false},from:{type:Sequelize[_0xc5c4[4]]},joinAt:{type:Sequelize[_0xc5c4[5]]},leaveAt:{type:Sequelize[_0xc5c4[5]]},acceptAt:{type:Sequelize[_0xc5c4[5]]},exitAt:{type:Sequelize[_0xc5c4[5]]},reason:{type:Sequelize[_0xc5c4[4]]}}
\ No newline at end of file
index c6029dd..42de0ce 100644 (file)
@@ -1 +1 @@
-var _0xb3a7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xb3a7[0];var jsonpatch=require(_0xb3a7[1]);var rp=require(_0xb3a7[2]);var moment=require(_0xb3a7[3]);var BPromise=require(_0xb3a7[4]);var Mustache=require(_0xb3a7[5]);var util=require(_0xb3a7[6]);var path=require(_0xb3a7[7]);var sox=require(_0xb3a7[8]);var csv=require(_0xb3a7[9]);var ejs=require(_0xb3a7[10]);var fs=require(_0xb3a7[11]);var _=require(_0xb3a7[12]);var squel=require(_0xb3a7[13]);var crypto=require(_0xb3a7[14]);var jsforce=require(_0xb3a7[15]);var deskjs=require(_0xb3a7[16]);var toCsv=require(_0xb3a7[9]);var querystring=require(_0xb3a7[17]);var Papa=require(_0xb3a7[18]);var qs=require(_0xb3a7[19]);var logger=require(_0xb3a7[21])(_0xb3a7[20]);var utils=require(_0xb3a7[22]);var config=require(_0xb3a7[23]);var db=require(_0xb3a7[25])[_0xb3a7[24]];function respondWithStatusCode(_0x5311x1a,_0x5311x1b){_0x5311x1b= _0x5311x1b|| 204;return function(_0x5311x1c){if(_0x5311x1c){return _0x5311x1a[_0xb3a7[26]](_0x5311x1b)};return _0x5311x1a[_0xb3a7[28]](_0x5311x1b)[_0xb3a7[27]]()}}function respondWithResult(_0x5311x1a,_0x5311x1b){_0x5311x1b= _0x5311x1b|| 200;return function(_0x5311x1c){if(_0x5311x1c){return _0x5311x1a[_0xb3a7[28]](_0x5311x1b)[_0xb3a7[29]](_0x5311x1c)}}}function respondWithFilteredResult(_0x5311x1a,_0x5311x1f){return function(_0x5311x1c){if(_0x5311x1c){var _0x5311x20=_0x5311x1c[_0xb3a7[30]],_0x5311x21=_0x5311x1f[_0xb3a7[31]],_0x5311x22=_0x5311x1f[_0xb3a7[31]]+ _0x5311x1f[_0xb3a7[32]],_0x5311x1b;if(_0x5311x22>= _0x5311x20){_0x5311x22= _0x5311x20;_0x5311x1b= 200}else {_0x5311x1b= 206};_0x5311x1a[_0xb3a7[28]](_0x5311x1b);return _0x5311x1a[_0xb3a7[36]](_0xb3a7[33],_0x5311x21+ _0xb3a7[34]+ _0x5311x22+ _0xb3a7[35]+ _0x5311x20)[_0xb3a7[29]](_0x5311x1c)};return null}}function patchUpdates(_0x5311x24){return function(_0x5311x1c){try{jsonpatch[_0xb3a7[37]](_0x5311x1c,_0x5311x24,true)}catch(err){return BPromise[_0xb3a7[38]](err)};return _0x5311x1c[_0xb3a7[39]]()}}function saveUpdates(_0x5311x26,_0x5311x1b){return function(_0x5311x1c){if(_0x5311x1c){return _0x5311x1c[_0xb3a7[41]](_0x5311x26)[_0xb3a7[40]](function(_0x5311x27){return _0x5311x27})};return null}}function removeEntity(_0x5311x1a,_0x5311x1b){return function(_0x5311x1c){if(_0x5311x1c){return _0x5311x1c[_0xb3a7[42]]()[_0xb3a7[40]](function(){_0x5311x1a[_0xb3a7[28]](204)[_0xb3a7[27]]()})}}}function handleEntityNotFound(_0x5311x1a,_0x5311x1b){return function(_0x5311x1c){if(!_0x5311x1c){_0x5311x1a[_0xb3a7[26]](404)};return _0x5311x1c}}function handleError(_0x5311x1a,_0x5311x1b){_0x5311x1b= _0x5311x1b|| 500;return function(_0x5311x2b){logger[_0xb3a7[44]](_0x5311x2b[_0xb3a7[43]]);if(_0x5311x2b[_0xb3a7[45]]){delete _0x5311x2b[_0xb3a7[45]]};_0x5311x1a[_0xb3a7[28]](_0x5311x1b)[_0xb3a7[46]](_0x5311x2b)}}exports[_0xb3a7[47]]= function(_0x5311x2c,_0x5311x1a){var _0x5311x1f={},_0x5311x2d={},_0x5311x2e={count:0,rows:[]};_0x5311x2d[_0xb3a7[48]]= _[_0xb3a7[51]](db[_0xb3a7[50]][_0xb3a7[49]]);var _0x5311x2f={dateStart:_0x5311x2c[_0xb3a7[53]][_0xb3a7[52]],dateEnd:_0x5311x2c[_0xb3a7[53]][_0xb3a7[54]]};delete _0x5311x2c[_0xb3a7[53]][_0xb3a7[52]];delete _0x5311x2c[_0xb3a7[53]][_0xb3a7[54]];_0x5311x2d[_0xb3a7[53]]= _[_0xb3a7[51]](_0x5311x2c[_0xb3a7[53]]);_0x5311x2d[_0xb3a7[55]]= _[_0xb3a7[56]](_0x5311x2d[_0xb3a7[48]],_0x5311x2d[_0xb3a7[53]]);_0x5311x1f[_0xb3a7[57]]= _[_0xb3a7[56]](_0x5311x2d[_0xb3a7[48]],qs[_0xb3a7[58]](_0x5311x2c[_0xb3a7[53]][_0xb3a7[58]]));_0x5311x1f[_0xb3a7[57]]= (_0x5311x1f[_0xb3a7[57]][_0xb3a7[59]])?_0x5311x1f[_0xb3a7[57]]:_0x5311x2d[_0xb3a7[48]];if(!_0x5311x2c[_0xb3a7[53]][_0xb3a7[61]](_0xb3a7[60])){_0x5311x1f[_0xb3a7[32]]= qs[_0xb3a7[32]](_0x5311x2c[_0xb3a7[53]][_0xb3a7[32]]);_0x5311x1f[_0xb3a7[31]]= qs[_0xb3a7[31]](_0x5311x2c[_0xb3a7[53]][_0xb3a7[31]])};_0x5311x1f[_0xb3a7[62]]= qs[_0xb3a7[63]](_0x5311x2c[_0xb3a7[53]][_0xb3a7[63]]);_0x5311x1f[_0xb3a7[64]]= qs[_0xb3a7[55]](_[_0xb3a7[65]](_0x5311x2c[_0xb3a7[53]],_0x5311x2d[_0xb3a7[55]]));if(_0x5311x2f[_0xb3a7[52]]){if(_0x5311x2f[_0xb3a7[54]]){_0x5311x2f[_0xb3a7[54]]= moment(_0x5311x2f[_0xb3a7[54]])[_0xb3a7[67]](1,_0xb3a7[66])}else {_0x5311x2f[_0xb3a7[54]]= moment(_0x5311x2f[_0xb3a7[52]])[_0xb3a7[67]](1,_0xb3a7[66])};_[_0xb3a7[68]](_0x5311x1f[_0xb3a7[64]],{createdAt:{$gte:_0x5311x2f[_0xb3a7[52]],$lte:_0x5311x2f[_0xb3a7[54]]}})};if(_0x5311x2c[_0xb3a7[53]][_0xb3a7[69]]){_0x5311x1f[_0xb3a7[64]]= _[_0xb3a7[68]](_0x5311x1f[_0xb3a7[64]],{$or:_[_0xb3a7[71]](_0x5311x1f[_0xb3a7[57]],function(_0x5311x30){var _0x5311x2e={};_0x5311x2e[_0x5311x30]= {$like:_0xb3a7[70]+ _0x5311x2c[_0xb3a7[53]][_0xb3a7[69]]+ _0xb3a7[70]};return _0x5311x2e})})};_0x5311x1f= _[_0xb3a7[68]]({},_0x5311x1f,_0x5311x2c[_0xb3a7[72]]);var _0x5311x31={where:_0x5311x1f[_0xb3a7[64]]};return db[_0xb3a7[50]][_0xb3a7[30]](_0x5311x31)[_0xb3a7[40]](function(_0x5311x20){_0x5311x2e[_0xb3a7[30]]= _0x5311x20;if(_0x5311x2c[_0xb3a7[53]][_0xb3a7[75]]){_0x5311x1f[_0xb3a7[76]]= [{all:true}]};return db[_0xb3a7[50]][_0xb3a7[77]](_0x5311x1f)})[_0xb3a7[40]](function(_0x5311x32){_0x5311x2e[_0xb3a7[74]]= _0x5311x32;return _0x5311x2e})[_0xb3a7[40]](respondWithFilteredResult(_0x5311x1a,_0x5311x1f))[_0xb3a7[73]](handleError(_0x5311x1a,null))};exports[_0xb3a7[78]]= function(_0x5311x2c,_0x5311x1a){var _0x5311x1f={raw:true,where:{id:_0x5311x2c[_0xb3a7[80]][_0xb3a7[79]]}},_0x5311x2d={};_0x5311x2d[_0xb3a7[48]]= _[_0xb3a7[51]](db[_0xb3a7[50]][_0xb3a7[49]]);_0x5311x2d[_0xb3a7[53]]= _[_0xb3a7[51]](_0x5311x2c[_0xb3a7[53]]);_0x5311x2d[_0xb3a7[55]]= _[_0xb3a7[56]](_0x5311x2d[_0xb3a7[48]],_0x5311x2d[_0xb3a7[53]]);_0x5311x1f[_0xb3a7[57]]= _[_0xb3a7[56]](_0x5311x2d[_0xb3a7[48]],qs[_0xb3a7[58]](_0x5311x2c[_0xb3a7[53]][_0xb3a7[58]]));_0x5311x1f[_0xb3a7[57]]= (_0x5311x1f[_0xb3a7[57]][_0xb3a7[59]])?_0x5311x1f[_0xb3a7[57]]:_0x5311x2d[_0xb3a7[48]];if(_0x5311x2c[_0xb3a7[53]][_0xb3a7[75]]){_0x5311x1f[_0xb3a7[76]]= [{all:true}]};_0x5311x1f= _[_0xb3a7[68]]({},_0x5311x1f,_0x5311x2c[_0xb3a7[72]]);return db[_0xb3a7[50]][_0xb3a7[81]](_0x5311x1f)[_0xb3a7[40]](handleEntityNotFound(_0x5311x1a,null))[_0xb3a7[40]](respondWithResult(_0x5311x1a,null))[_0xb3a7[73]](handleError(_0x5311x1a,null))};exports[_0xb3a7[82]]= function(_0x5311x2c,_0x5311x1a){return db[_0xb3a7[50]][_0xb3a7[82]](_0x5311x2c[_0xb3a7[83]],{})[_0xb3a7[40]](respondWithResult(_0x5311x1a,201))[_0xb3a7[73]](handleError(_0x5311x1a,null))};exports[_0xb3a7[41]]= function(_0x5311x2c,_0x5311x1a){if(_0x5311x2c[_0xb3a7[83]][_0xb3a7[79]]){delete _0x5311x2c[_0xb3a7[83]][_0xb3a7[79]]};return db[_0xb3a7[50]][_0xb3a7[81]]({where:{id:_0x5311x2c[_0xb3a7[80]][_0xb3a7[79]]}})[_0xb3a7[40]](handleEntityNotFound(_0x5311x1a,null))[_0xb3a7[40]](saveUpdates(_0x5311x2c[_0xb3a7[83]],null))[_0xb3a7[40]](respondWithResult(_0x5311x1a,null))[_0xb3a7[73]](handleError(_0x5311x1a,null))};exports[_0xb3a7[42]]= function(_0x5311x2c,_0x5311x1a){return db[_0xb3a7[50]][_0xb3a7[81]]({where:{id:_0x5311x2c[_0xb3a7[80]][_0xb3a7[79]]}})[_0xb3a7[40]](handleEntityNotFound(_0x5311x1a,null))[_0xb3a7[40]](removeEntity(_0x5311x1a,null))[_0xb3a7[73]](handleError(_0x5311x1a,null))};exports[_0xb3a7[84]]= function(_0x5311x2c,_0x5311x1a){return db[_0xb3a7[50]][_0xb3a7[84]]()[_0xb3a7[40]](respondWithResult(_0x5311x1a,null))[_0xb3a7[73]](handleError(_0x5311x1a,null))}
\ No newline at end of file
+var _0xb033=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xb033[0];var jsonpatch=require(_0xb033[1]);var rp=require(_0xb033[2]);var moment=require(_0xb033[3]);var BPromise=require(_0xb033[4]);var Mustache=require(_0xb033[5]);var util=require(_0xb033[6]);var path=require(_0xb033[7]);var sox=require(_0xb033[8]);var csv=require(_0xb033[9]);var ejs=require(_0xb033[10]);var fs=require(_0xb033[11]);var _=require(_0xb033[12]);var squel=require(_0xb033[13]);var crypto=require(_0xb033[14]);var jsforce=require(_0xb033[15]);var deskjs=require(_0xb033[16]);var toCsv=require(_0xb033[9]);var querystring=require(_0xb033[17]);var Papa=require(_0xb033[18]);var qs=require(_0xb033[19]);var logger=require(_0xb033[21])(_0xb033[20]);var utils=require(_0xb033[22]);var config=require(_0xb033[23]);var db=require(_0xb033[25])[_0xb033[24]];function respondWithStatusCode(_0x9b38x1a,_0x9b38x1b){_0x9b38x1b= _0x9b38x1b|| 204;return function(_0x9b38x1c){if(_0x9b38x1c){return _0x9b38x1a[_0xb033[26]](_0x9b38x1b)};return _0x9b38x1a[_0xb033[28]](_0x9b38x1b)[_0xb033[27]]()}}function respondWithResult(_0x9b38x1a,_0x9b38x1b){_0x9b38x1b= _0x9b38x1b|| 200;return function(_0x9b38x1c){if(_0x9b38x1c){return _0x9b38x1a[_0xb033[28]](_0x9b38x1b)[_0xb033[29]](_0x9b38x1c)}}}function respondWithFilteredResult(_0x9b38x1a,_0x9b38x1f){return function(_0x9b38x1c){if(_0x9b38x1c){var _0x9b38x20=_0x9b38x1c[_0xb033[30]],_0x9b38x21=_0x9b38x1f[_0xb033[31]],_0x9b38x22=_0x9b38x1f[_0xb033[31]]+ _0x9b38x1f[_0xb033[32]],_0x9b38x1b;if(_0x9b38x22>= _0x9b38x20){_0x9b38x22= _0x9b38x20;_0x9b38x1b= 200}else {_0x9b38x1b= 206};_0x9b38x1a[_0xb033[28]](_0x9b38x1b);return _0x9b38x1a[_0xb033[36]](_0xb033[33],_0x9b38x21+ _0xb033[34]+ _0x9b38x22+ _0xb033[35]+ _0x9b38x20)[_0xb033[29]](_0x9b38x1c)};return null}}function patchUpdates(_0x9b38x24){return function(_0x9b38x1c){try{jsonpatch[_0xb033[37]](_0x9b38x1c,_0x9b38x24,true)}catch(err){return BPromise[_0xb033[38]](err)};return _0x9b38x1c[_0xb033[39]]()}}function saveUpdates(_0x9b38x26,_0x9b38x1b){return function(_0x9b38x1c){if(_0x9b38x1c){return _0x9b38x1c[_0xb033[41]](_0x9b38x26)[_0xb033[40]](function(_0x9b38x27){return _0x9b38x27})};return null}}function removeEntity(_0x9b38x1a,_0x9b38x1b){return function(_0x9b38x1c){if(_0x9b38x1c){return _0x9b38x1c[_0xb033[42]]()[_0xb033[40]](function(){_0x9b38x1a[_0xb033[28]](204)[_0xb033[27]]()})}}}function handleEntityNotFound(_0x9b38x1a,_0x9b38x1b){return function(_0x9b38x1c){if(!_0x9b38x1c){_0x9b38x1a[_0xb033[26]](404)};return _0x9b38x1c}}function handleError(_0x9b38x1a,_0x9b38x1b){_0x9b38x1b= _0x9b38x1b|| 500;return function(_0x9b38x2b){logger[_0xb033[44]](_0x9b38x2b[_0xb033[43]]);if(_0x9b38x2b[_0xb033[45]]){delete _0x9b38x2b[_0xb033[45]]};_0x9b38x1a[_0xb033[28]](_0x9b38x1b)[_0xb033[46]](_0x9b38x2b)}}exports[_0xb033[47]]= function(_0x9b38x2c,_0x9b38x1a){var _0x9b38x1f={},_0x9b38x2d={},_0x9b38x2e={count:0,rows:[]};_0x9b38x2d[_0xb033[48]]= _[_0xb033[51]](db[_0xb033[50]][_0xb033[49]]);var _0x9b38x2f={dateStart:_0x9b38x2c[_0xb033[53]][_0xb033[52]],dateEnd:_0x9b38x2c[_0xb033[53]][_0xb033[54]]};delete _0x9b38x2c[_0xb033[53]][_0xb033[52]];delete _0x9b38x2c[_0xb033[53]][_0xb033[54]];_0x9b38x2d[_0xb033[53]]= _[_0xb033[51]](_0x9b38x2c[_0xb033[53]]);_0x9b38x2d[_0xb033[55]]= _[_0xb033[56]](_0x9b38x2d[_0xb033[48]],_0x9b38x2d[_0xb033[53]]);_0x9b38x1f[_0xb033[57]]= _[_0xb033[56]](_0x9b38x2d[_0xb033[48]],qs[_0xb033[58]](_0x9b38x2c[_0xb033[53]][_0xb033[58]]));_0x9b38x1f[_0xb033[57]]= (_0x9b38x1f[_0xb033[57]][_0xb033[59]])?_0x9b38x1f[_0xb033[57]]:_0x9b38x2d[_0xb033[48]];if(!_0x9b38x2c[_0xb033[53]][_0xb033[61]](_0xb033[60])){_0x9b38x1f[_0xb033[32]]= qs[_0xb033[32]](_0x9b38x2c[_0xb033[53]][_0xb033[32]]);_0x9b38x1f[_0xb033[31]]= qs[_0xb033[31]](_0x9b38x2c[_0xb033[53]][_0xb033[31]])};_0x9b38x1f[_0xb033[62]]= qs[_0xb033[63]](_0x9b38x2c[_0xb033[53]][_0xb033[63]]);_0x9b38x1f[_0xb033[64]]= qs[_0xb033[55]](_[_0xb033[65]](_0x9b38x2c[_0xb033[53]],_0x9b38x2d[_0xb033[55]]));if(_0x9b38x2f[_0xb033[52]]){if(_0x9b38x2f[_0xb033[54]]){_0x9b38x2f[_0xb033[54]]= moment(_0x9b38x2f[_0xb033[54]])[_0xb033[67]](1,_0xb033[66])}else {_0x9b38x2f[_0xb033[54]]= moment(_0x9b38x2f[_0xb033[52]])[_0xb033[67]](1,_0xb033[66])};_[_0xb033[68]](_0x9b38x1f[_0xb033[64]],{createdAt:{$gte:_0x9b38x2f[_0xb033[52]],$lte:_0x9b38x2f[_0xb033[54]]}})};if(_0x9b38x2c[_0xb033[53]][_0xb033[69]]){_0x9b38x1f[_0xb033[64]]= _[_0xb033[68]](_0x9b38x1f[_0xb033[64]],{$or:_[_0xb033[71]](_0x9b38x1f[_0xb033[57]],function(_0x9b38x30){var _0x9b38x2e={};_0x9b38x2e[_0x9b38x30]= {$like:_0xb033[70]+ _0x9b38x2c[_0xb033[53]][_0xb033[69]]+ _0xb033[70]};return _0x9b38x2e})})};_0x9b38x1f= _[_0xb033[68]]({},_0x9b38x1f,_0x9b38x2c[_0xb033[72]]);var _0x9b38x31={where:_0x9b38x1f[_0xb033[64]]};return db[_0xb033[50]][_0xb033[30]](_0x9b38x31)[_0xb033[40]](function(_0x9b38x20){_0x9b38x2e[_0xb033[30]]= _0x9b38x20;if(_0x9b38x2c[_0xb033[53]][_0xb033[75]]){_0x9b38x1f[_0xb033[76]]= [{all:true}]};return db[_0xb033[50]][_0xb033[77]](_0x9b38x1f)})[_0xb033[40]](function(_0x9b38x32){_0x9b38x2e[_0xb033[74]]= _0x9b38x32;return _0x9b38x2e})[_0xb033[40]](respondWithFilteredResult(_0x9b38x1a,_0x9b38x1f))[_0xb033[73]](handleError(_0x9b38x1a,null))};exports[_0xb033[78]]= function(_0x9b38x2c,_0x9b38x1a){var _0x9b38x1f={raw:true,where:{id:_0x9b38x2c[_0xb033[80]][_0xb033[79]]}},_0x9b38x2d={};_0x9b38x2d[_0xb033[48]]= _[_0xb033[51]](db[_0xb033[50]][_0xb033[49]]);_0x9b38x2d[_0xb033[53]]= _[_0xb033[51]](_0x9b38x2c[_0xb033[53]]);_0x9b38x2d[_0xb033[55]]= _[_0xb033[56]](_0x9b38x2d[_0xb033[48]],_0x9b38x2d[_0xb033[53]]);_0x9b38x1f[_0xb033[57]]= _[_0xb033[56]](_0x9b38x2d[_0xb033[48]],qs[_0xb033[58]](_0x9b38x2c[_0xb033[53]][_0xb033[58]]));_0x9b38x1f[_0xb033[57]]= (_0x9b38x1f[_0xb033[57]][_0xb033[59]])?_0x9b38x1f[_0xb033[57]]:_0x9b38x2d[_0xb033[48]];if(_0x9b38x2c[_0xb033[53]][_0xb033[75]]){_0x9b38x1f[_0xb033[76]]= [{all:true}]};_0x9b38x1f= _[_0xb033[68]]({},_0x9b38x1f,_0x9b38x2c[_0xb033[72]]);return db[_0xb033[50]][_0xb033[81]](_0x9b38x1f)[_0xb033[40]](handleEntityNotFound(_0x9b38x1a,null))[_0xb033[40]](respondWithResult(_0x9b38x1a,null))[_0xb033[73]](handleError(_0x9b38x1a,null))};exports[_0xb033[82]]= function(_0x9b38x2c,_0x9b38x1a){return db[_0xb033[50]][_0xb033[82]](_0x9b38x2c[_0xb033[83]],{})[_0xb033[40]](respondWithResult(_0x9b38x1a,201))[_0xb033[73]](handleError(_0x9b38x1a,null))};exports[_0xb033[41]]= function(_0x9b38x2c,_0x9b38x1a){if(_0x9b38x2c[_0xb033[83]][_0xb033[79]]){delete _0x9b38x2c[_0xb033[83]][_0xb033[79]]};return db[_0xb033[50]][_0xb033[81]]({where:{id:_0x9b38x2c[_0xb033[80]][_0xb033[79]]}})[_0xb033[40]](handleEntityNotFound(_0x9b38x1a,null))[_0xb033[40]](saveUpdates(_0x9b38x2c[_0xb033[83]],null))[_0xb033[40]](respondWithResult(_0x9b38x1a,null))[_0xb033[73]](handleError(_0x9b38x1a,null))};exports[_0xb033[42]]= function(_0x9b38x2c,_0x9b38x1a){return db[_0xb033[50]][_0xb033[81]]({where:{id:_0x9b38x2c[_0xb033[80]][_0xb033[79]]}})[_0xb033[40]](handleEntityNotFound(_0x9b38x1a,null))[_0xb033[40]](removeEntity(_0x9b38x1a,null))[_0xb033[73]](handleError(_0x9b38x1a,null))};exports[_0xb033[84]]= function(_0x9b38x2c,_0x9b38x1a){return db[_0xb033[50]][_0xb033[84]]()[_0xb033[40]](respondWithResult(_0x9b38x1a,null))[_0xb033[73]](handleError(_0x9b38x1a,null))}
\ No newline at end of file
index fe3beae..b072308 100644 (file)
@@ -1 +1 @@
-var _0xa025=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0xa025[0];var _=require(_0xa025[1]);var util=require(_0xa025[2]);var logger=require(_0xa025[4])(_0xa025[3]);var moment=require(_0xa025[5]);var BPromise=require(_0xa025[6]);var rp=require(_0xa025[7]);var attributes=require(_0xa025[8]);module[_0xa025[9]]= function(_0xe47ex8,_0xe47ex9){return _0xe47ex8[_0xa025[13]](_0xa025[10],attributes,{tableName:_0xa025[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0xa025[12],"\x66\x69\x65\x6C\x64\x73":[_0xa025[12]]}],timestamps:true})}
\ No newline at end of file
+var _0x7cbb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0x7cbb[0];var _=require(_0x7cbb[1]);var util=require(_0x7cbb[2]);var logger=require(_0x7cbb[4])(_0x7cbb[3]);var moment=require(_0x7cbb[5]);var BPromise=require(_0x7cbb[6]);var rp=require(_0x7cbb[7]);var attributes=require(_0x7cbb[8]);module[_0x7cbb[9]]= function(_0x2b5dx8,_0x2b5dx9){return _0x2b5dx8[_0x7cbb[13]](_0x7cbb[10],attributes,{tableName:_0x7cbb[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x7cbb[12],"\x66\x69\x65\x6C\x64\x73":[_0x7cbb[12]]}],timestamps:true})}
\ No newline at end of file
index a6fb456..ad17925 100644 (file)
@@ -1 +1 @@
-var _0x2abe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x55\x70\x64\x61\x74\x65\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65"];_0x2abe[0];var _=require(_0x2abe[1]);var util=require(_0x2abe[2]);var moment=require(_0x2abe[3]);var BPromise=require(_0x2abe[4]);var rs=require(_0x2abe[5]);var fs=require(_0x2abe[6]);var db=require(_0x2abe[8])[_0x2abe[7]];var utils=require(_0x2abe[9]);var logger=require(_0x2abe[11])(_0x2abe[10]);var config=require(_0x2abe[12]);var jayson=require(_0x2abe[13]);var client=jayson[_0x2abe[15]][_0x2abe[14]]({port:9002});function respondWithRpcPromise(_0xdac1xe,_0xdac1xf,_0xdac1x10){return  new BPromise(function(_0xdac1x11,_0xdac1x12){return client[_0x2abe[28]](_0xdac1xe,_0xdac1x10)[_0x2abe[27]](function(_0xdac1x14){logger[_0x2abe[20]](_0x2abe[16],_0xdac1xf,_0x2abe[19]);logger[_0x2abe[23]](_0x2abe[21],_0xdac1xf,_0x2abe[19],JSON[_0x2abe[22]](_0xdac1x14));if(_0xdac1x14[_0x2abe[17]]){if(_0xdac1x14[_0x2abe[17]][_0x2abe[24]]=== 500){logger[_0x2abe[17]](_0x2abe[16],_0xdac1xf,_0xdac1x14[_0x2abe[17]][_0x2abe[25]]);return _0xdac1x12(_0xdac1x14[_0x2abe[17]][_0x2abe[25]])};logger[_0x2abe[17]](_0x2abe[16],_0xdac1xf,_0xdac1x14[_0x2abe[17]][_0x2abe[25]]);return _0xdac1x11(_0xdac1x14[_0x2abe[17]][_0x2abe[25]])}else {logger[_0x2abe[20]](_0x2abe[16],_0xdac1xf,_0x2abe[19]);_0xdac1x11(_0xdac1x14[_0x2abe[26]][_0x2abe[25]])}})[_0x2abe[18]](function(_0xdac1x13){logger[_0x2abe[17]](_0x2abe[16],_0xdac1xf,_0xdac1x13);_0xdac1x12(_0xdac1x13)})})}exports[_0x2abe[29]]= function(_0xdac1x10){var _0xdac1x15=this;return  new Promise(function(_0xdac1x11,_0xdac1x12){return db[_0x2abe[34]][_0x2abe[33]](_0xdac1x10[_0x2abe[30]],{raw:_0xdac1x10[_0x2abe[31]]?(_0xdac1x10[_0x2abe[31]][_0x2abe[32]]=== undefined)?true:false:true})[_0x2abe[27]](function(_0xdac1x14){logger[_0x2abe[20]](_0x2abe[29],_0xdac1x10);logger[_0x2abe[23]](_0x2abe[29],_0xdac1x10,JSON[_0x2abe[22]](_0xdac1x14));_0xdac1x11(_0xdac1x14)})[_0x2abe[18]](function(_0xdac1x13){logger[_0x2abe[17]](_0x2abe[29],_0xdac1x13[_0x2abe[25]],_0xdac1x10);_0xdac1x12(_0xdac1x15[_0x2abe[17]](500,_0xdac1x13[_0x2abe[25]]))})})};exports[_0x2abe[35]]= function(_0xdac1x10){var _0xdac1x15=this;return  new Promise(function(_0xdac1x11,_0xdac1x12){return db[_0x2abe[34]][_0x2abe[39]](_0xdac1x10[_0x2abe[30]],{raw:_0xdac1x10[_0x2abe[31]]?(_0xdac1x10[_0x2abe[31]][_0x2abe[32]]=== undefined)?true:false:true,individualHooks:true,where:_0xdac1x10[_0x2abe[31]]?_0xdac1x10[_0x2abe[31]][_0x2abe[36]]|| null:null,attributes:_0xdac1x10[_0x2abe[31]]?_0xdac1x10[_0x2abe[31]][_0x2abe[37]]|| null:null,limit:_0xdac1x10[_0x2abe[31]]?_0xdac1x10[_0x2abe[31]][_0x2abe[38]]|| null:null})[_0x2abe[27]](function(_0xdac1x14){logger[_0x2abe[20]](_0x2abe[35],_0xdac1x10);logger[_0x2abe[23]](_0x2abe[35],_0xdac1x10,JSON[_0x2abe[22]](_0xdac1x14));_0xdac1x11(_0xdac1x14)})[_0x2abe[18]](function(_0xdac1x13){logger[_0x2abe[17]](_0x2abe[35],_0xdac1x13[_0x2abe[25]],_0xdac1x10);_0xdac1x12(_0xdac1x15[_0x2abe[17]](500,_0xdac1x13[_0x2abe[25]]))})})}
\ No newline at end of file
+var _0xd7a4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x55\x70\x64\x61\x74\x65\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65"];_0xd7a4[0];var _=require(_0xd7a4[1]);var util=require(_0xd7a4[2]);var moment=require(_0xd7a4[3]);var BPromise=require(_0xd7a4[4]);var rs=require(_0xd7a4[5]);var fs=require(_0xd7a4[6]);var db=require(_0xd7a4[8])[_0xd7a4[7]];var utils=require(_0xd7a4[9]);var logger=require(_0xd7a4[11])(_0xd7a4[10]);var config=require(_0xd7a4[12]);var jayson=require(_0xd7a4[13]);var client=jayson[_0xd7a4[15]][_0xd7a4[14]]({port:9002});function respondWithRpcPromise(_0x48a2xe,_0x48a2xf,_0x48a2x10){return  new BPromise(function(_0x48a2x11,_0x48a2x12){return client[_0xd7a4[28]](_0x48a2xe,_0x48a2x10)[_0xd7a4[27]](function(_0x48a2x14){logger[_0xd7a4[20]](_0xd7a4[16],_0x48a2xf,_0xd7a4[19]);logger[_0xd7a4[23]](_0xd7a4[21],_0x48a2xf,_0xd7a4[19],JSON[_0xd7a4[22]](_0x48a2x14));if(_0x48a2x14[_0xd7a4[17]]){if(_0x48a2x14[_0xd7a4[17]][_0xd7a4[24]]=== 500){logger[_0xd7a4[17]](_0xd7a4[16],_0x48a2xf,_0x48a2x14[_0xd7a4[17]][_0xd7a4[25]]);return _0x48a2x12(_0x48a2x14[_0xd7a4[17]][_0xd7a4[25]])};logger[_0xd7a4[17]](_0xd7a4[16],_0x48a2xf,_0x48a2x14[_0xd7a4[17]][_0xd7a4[25]]);return _0x48a2x11(_0x48a2x14[_0xd7a4[17]][_0xd7a4[25]])}else {logger[_0xd7a4[20]](_0xd7a4[16],_0x48a2xf,_0xd7a4[19]);_0x48a2x11(_0x48a2x14[_0xd7a4[26]][_0xd7a4[25]])}})[_0xd7a4[18]](function(_0x48a2x13){logger[_0xd7a4[17]](_0xd7a4[16],_0x48a2xf,_0x48a2x13);_0x48a2x12(_0x48a2x13)})})}exports[_0xd7a4[29]]= function(_0x48a2x10){var _0x48a2x15=this;return  new Promise(function(_0x48a2x11,_0x48a2x12){return db[_0xd7a4[34]][_0xd7a4[33]](_0x48a2x10[_0xd7a4[30]],{raw:_0x48a2x10[_0xd7a4[31]]?(_0x48a2x10[_0xd7a4[31]][_0xd7a4[32]]=== undefined)?true:false:true})[_0xd7a4[27]](function(_0x48a2x14){logger[_0xd7a4[20]](_0xd7a4[29],_0x48a2x10);logger[_0xd7a4[23]](_0xd7a4[29],_0x48a2x10,JSON[_0xd7a4[22]](_0x48a2x14));_0x48a2x11(_0x48a2x14)})[_0xd7a4[18]](function(_0x48a2x13){logger[_0xd7a4[17]](_0xd7a4[29],_0x48a2x13[_0xd7a4[25]],_0x48a2x10);_0x48a2x12(_0x48a2x15[_0xd7a4[17]](500,_0x48a2x13[_0xd7a4[25]]))})})};exports[_0xd7a4[35]]= function(_0x48a2x10){var _0x48a2x15=this;return  new Promise(function(_0x48a2x11,_0x48a2x12){return db[_0xd7a4[34]][_0xd7a4[39]](_0x48a2x10[_0xd7a4[30]],{raw:_0x48a2x10[_0xd7a4[31]]?(_0x48a2x10[_0xd7a4[31]][_0xd7a4[32]]=== undefined)?true:false:true,individualHooks:true,where:_0x48a2x10[_0xd7a4[31]]?_0x48a2x10[_0xd7a4[31]][_0xd7a4[36]]|| null:null,attributes:_0x48a2x10[_0xd7a4[31]]?_0x48a2x10[_0xd7a4[31]][_0xd7a4[37]]|| null:null,limit:_0x48a2x10[_0xd7a4[31]]?_0x48a2x10[_0xd7a4[31]][_0xd7a4[38]]|| null:null})[_0xd7a4[27]](function(_0x48a2x14){logger[_0xd7a4[20]](_0xd7a4[35],_0x48a2x10);logger[_0xd7a4[23]](_0xd7a4[35],_0x48a2x10,JSON[_0xd7a4[22]](_0x48a2x14));_0x48a2x11(_0x48a2x14)})[_0xd7a4[18]](function(_0x48a2x13){logger[_0xd7a4[17]](_0xd7a4[35],_0x48a2x13[_0xd7a4[25]],_0x48a2x10);_0x48a2x12(_0x48a2x15[_0xd7a4[17]](500,_0x48a2x13[_0xd7a4[25]]))})})}
\ No newline at end of file
index 29749ef..d0cb33a 100644 (file)
@@ -1 +1 @@
-var _0xf460=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x6F\x75\x6E\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2F","\x6A\x6F\x69\x6E","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x6E\x61\x6D\x65","\x2D","\x72\x65\x70\x6C\x61\x63\x65","\x25\x73\x2D\x25\x73\x25\x73","\x65\x78\x74\x6E\x61\x6D\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x6E\x6F\x77","\x66\x6F\x72\x6D\x61\x74","\x64\x69\x73\x6B\x53\x74\x6F\x72\x61\x67\x65","\x66\x69\x6C\x65","\x73\x69\x6E\x67\x6C\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf460[0];var multer=require(_0xf460[1]);var util=require(_0xf460[2]);var path=require(_0xf460[3]);var express=require(_0xf460[4]);var router=express.Router();var auth=require(_0xf460[5]);var interaction=require(_0xf460[6]);var config=require(_0xf460[7]);var controller=require(_0xf460[8]);router[_0xf460[12]](_0xf460[9],auth[_0xf460[10]](),controller[_0xf460[11]]);router[_0xf460[12]](_0xf460[13],auth[_0xf460[10]](),controller[_0xf460[14]]);router[_0xf460[12]](_0xf460[15],auth[_0xf460[10]](),controller[_0xf460[16]]);var upload=multer({storage:multer[_0xf460[28]]({destination:function(_0xaff0xb,_0xaff0xc,_0xaff0xd){_0xaff0xd(null,path[_0xf460[19]](config[_0xf460[17]],_0xf460[18]))},filename:function(_0xaff0xb,_0xaff0xc,_0xaff0xd){_0xaff0xc[_0xf460[20]]= _0xaff0xc[_0xf460[20]][_0xf460[22]](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,_0xf460[21]);_0xaff0xd(null,util[_0xf460[27]](_0xf460[23],path[_0xf460[25]](_0xaff0xc[_0xf460[20]],path[_0xf460[24]](_0xaff0xc[_0xf460[20]])),Date[_0xf460[26]](),path[_0xf460[24]](_0xaff0xc[_0xf460[20]])))}})});router[_0xf460[32]](_0xf460[9],upload[_0xf460[30]](_0xf460[29]),controller[_0xf460[31]]);router[_0xf460[34]](_0xf460[13],auth[_0xf460[10]](),controller[_0xf460[33]]);router[_0xf460[35]](_0xf460[13],auth[_0xf460[10]](),controller[_0xf460[35]]);module[_0xf460[36]]= router
\ No newline at end of file
+var _0xa577=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x6F\x75\x6E\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2F","\x6A\x6F\x69\x6E","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x6E\x61\x6D\x65","\x2D","\x72\x65\x70\x6C\x61\x63\x65","\x25\x73\x2D\x25\x73\x25\x73","\x65\x78\x74\x6E\x61\x6D\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x6E\x6F\x77","\x66\x6F\x72\x6D\x61\x74","\x64\x69\x73\x6B\x53\x74\x6F\x72\x61\x67\x65","\x66\x69\x6C\x65","\x73\x69\x6E\x67\x6C\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xa577[0];var multer=require(_0xa577[1]);var util=require(_0xa577[2]);var path=require(_0xa577[3]);var express=require(_0xa577[4]);var router=express.Router();var auth=require(_0xa577[5]);var interaction=require(_0xa577[6]);var config=require(_0xa577[7]);var controller=require(_0xa577[8]);router[_0xa577[12]](_0xa577[9],auth[_0xa577[10]](),controller[_0xa577[11]]);router[_0xa577[12]](_0xa577[13],auth[_0xa577[10]](),controller[_0xa577[14]]);router[_0xa577[12]](_0xa577[15],auth[_0xa577[10]](),controller[_0xa577[16]]);var upload=multer({storage:multer[_0xa577[28]]({destination:function(_0xdf7cxb,_0xdf7cxc,_0xdf7cxd){_0xdf7cxd(null,path[_0xa577[19]](config[_0xa577[17]],_0xa577[18]))},filename:function(_0xdf7cxb,_0xdf7cxc,_0xdf7cxd){_0xdf7cxc[_0xa577[20]]= _0xdf7cxc[_0xa577[20]][_0xa577[22]](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,_0xa577[21]);_0xdf7cxd(null,util[_0xa577[27]](_0xa577[23],path[_0xa577[25]](_0xdf7cxc[_0xa577[20]],path[_0xa577[24]](_0xdf7cxc[_0xa577[20]])),Date[_0xa577[26]](),path[_0xa577[24]](_0xdf7cxc[_0xa577[20]])))}})});router[_0xa577[32]](_0xa577[9],upload[_0xa577[30]](_0xa577[29]),controller[_0xa577[31]]);router[_0xa577[34]](_0xa577[13],auth[_0xa577[10]](),controller[_0xa577[33]]);router[_0xa577[35]](_0xa577[13],auth[_0xa577[10]](),controller[_0xa577[35]]);module[_0xa577[36]]= router
\ No newline at end of file
index a5ce428..5e0d16c 100644 (file)
@@ -1 +1 @@
-var _0x2d4d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","","\x46\x4C\x4F\x41\x54","\x42\x49\x47\x49\x4E\x54","\x49\x4E\x54\x45\x47\x45\x52"];_0x2d4d[0];var Sequelize=require(_0x2d4d[1]);module[_0x2d4d[2]]= {name:{type:Sequelize[_0x2d4d[3]]},save_name:{type:Sequelize[_0x2d4d[3]]},display_name:{type:Sequelize[_0x2d4d[3]],defaultValue:_0x2d4d[4]},description:{type:Sequelize[_0x2d4d[3]]},original_format:{type:Sequelize[_0x2d4d[3]]},original_duration:{type:Sequelize[_0x2d4d[5]]},original_sampleCount:{type:Sequelize[_0x2d4d[6]]},original_channelCount:{type:Sequelize[_0x2d4d[7]]},original_bitRate:{type:Sequelize[_0x2d4d[6]]},original_sampleRate:{type:Sequelize[_0x2d4d[7]]},converted_format:{type:Sequelize[_0x2d4d[3]]},converted_duration:{type:Sequelize[_0x2d4d[5]]},converted_sampleCount:{type:Sequelize[_0x2d4d[6]]},converted_channelCount:{type:Sequelize[_0x2d4d[7]]},converted_bitRate:{type:Sequelize[_0x2d4d[6]]},converted_sampleRate:{type:Sequelize[_0x2d4d[7]]}}
\ No newline at end of file
+var _0x2da2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","","\x46\x4C\x4F\x41\x54","\x42\x49\x47\x49\x4E\x54","\x49\x4E\x54\x45\x47\x45\x52"];_0x2da2[0];var Sequelize=require(_0x2da2[1]);module[_0x2da2[2]]= {name:{type:Sequelize[_0x2da2[3]]},save_name:{type:Sequelize[_0x2da2[3]]},display_name:{type:Sequelize[_0x2da2[3]],defaultValue:_0x2da2[4]},description:{type:Sequelize[_0x2da2[3]]},original_format:{type:Sequelize[_0x2da2[3]]},original_duration:{type:Sequelize[_0x2da2[5]]},original_sampleCount:{type:Sequelize[_0x2da2[6]]},original_channelCount:{type:Sequelize[_0x2da2[7]]},original_bitRate:{type:Sequelize[_0x2da2[6]]},original_sampleRate:{type:Sequelize[_0x2da2[7]]},converted_format:{type:Sequelize[_0x2da2[3]]},converted_duration:{type:Sequelize[_0x2da2[5]]},converted_sampleCount:{type:Sequelize[_0x2da2[6]]},converted_channelCount:{type:Sequelize[_0x2da2[7]]},converted_bitRate:{type:Sequelize[_0x2da2[6]]},converted_sampleRate:{type:Sequelize[_0x2da2[7]]}}
\ No newline at end of file
index f02514e..c6783b7 100644 (file)
@@ -1 +1 @@
-var _0x49bd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x6F\x75\x6E\x64","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x2E","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x66\x6F\x72\x6D\x61\x74","\x6A\x6F\x69\x6E","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x53\x6F\x75\x6E\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x25\x73\x2E\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x72\x65\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x6E\x61\x6D\x65","\x66\x69\x6C\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x77\x61\x76","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x6F\x72\x69\x67\x69\x6E\x61\x6C","\x53\x6F\x75\x6E\x64\x20\x75\x70\x6C\x6F\x61\x64\x20\x66\x69\x6C\x65\x70\x61\x74\x68\x3A\x20\x25\x73","\x69\x6E\x66\x6F","\x53\x6F\x75\x6E\x64\x20\x75\x70\x6C\x6F\x61\x64\x20\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x3A\x20\x25\x73","\x30\x37\x37\x37","\x63\x68\x6D\x6F\x64\x53\x79\x6E\x63","\x74\x72\x61\x6E\x73\x63\x6F\x64\x65","\x6F\x6E","\x73\x72\x63","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x64\x75\x72\x61\x74\x69\x6F\x6E","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x62\x69\x74\x52\x61\x74\x65","\x62\x69\x74\x52\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x64\x65\x73\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x64\x75\x72\x61\x74\x69\x6F\x6E","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x62\x69\x74\x52\x61\x74\x65","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x73\x74\x61\x72\x74","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x6C\x65\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x66\x6F\x72\x6D\x61\x74","\x75\x6E\x6C\x69\x6E\x6B\x53\x79\x6E\x63"];_0x49bd[0];var jsonpatch=require(_0x49bd[1]);var rp=require(_0x49bd[2]);var moment=require(_0x49bd[3]);var BPromise=require(_0x49bd[4]);var Mustache=require(_0x49bd[5]);var util=require(_0x49bd[6]);var path=require(_0x49bd[7]);var sox=require(_0x49bd[8]);var csv=require(_0x49bd[9]);var ejs=require(_0x49bd[10]);var fs=require(_0x49bd[11]);var _=require(_0x49bd[12]);var squel=require(_0x49bd[13]);var crypto=require(_0x49bd[14]);var jsforce=require(_0x49bd[15]);var deskjs=require(_0x49bd[16]);var toCsv=require(_0x49bd[9]);var querystring=require(_0x49bd[17]);var Papa=require(_0x49bd[18]);var qs=require(_0x49bd[19]);var logger=require(_0x49bd[21])(_0x49bd[20]);var utils=require(_0x49bd[22]);var config=require(_0x49bd[23]);var db=require(_0x49bd[25])[_0x49bd[24]];function respondWithStatusCode(_0x53bex1a,_0x53bex1b){_0x53bex1b= _0x53bex1b|| 204;return function(_0x53bex1c){if(_0x53bex1c){return _0x53bex1a[_0x49bd[26]](_0x53bex1b)};return _0x53bex1a[_0x49bd[28]](_0x53bex1b)[_0x49bd[27]]()}}function respondWithResult(_0x53bex1a,_0x53bex1b){_0x53bex1b= _0x53bex1b|| 200;return function(_0x53bex1c){if(_0x53bex1c){return _0x53bex1a[_0x49bd[28]](_0x53bex1b)[_0x49bd[29]](_0x53bex1c)}}}function respondWithFilteredResult(_0x53bex1a,_0x53bex1f){return function(_0x53bex1c){if(_0x53bex1c){var _0x53bex20=_0x53bex1c[_0x49bd[30]],_0x53bex21=_0x53bex1f[_0x49bd[31]],_0x53bex22=_0x53bex1f[_0x49bd[31]]+ _0x53bex1f[_0x49bd[32]],_0x53bex1b;if(_0x53bex22>= _0x53bex20){_0x53bex22= _0x53bex20;_0x53bex1b= 200}else {_0x53bex1b= 206};_0x53bex1a[_0x49bd[28]](_0x53bex1b);return _0x53bex1a[_0x49bd[36]](_0x49bd[33],_0x53bex21+ _0x49bd[34]+ _0x53bex22+ _0x49bd[35]+ _0x53bex20)[_0x49bd[29]](_0x53bex1c)};return null}}function patchUpdates(_0x53bex24){return function(_0x53bex1c){try{jsonpatch[_0x49bd[37]](_0x53bex1c,_0x53bex24,true)}catch(err){return BPromise[_0x49bd[38]](err)};return _0x53bex1c[_0x49bd[39]]()}}function saveUpdates(_0x53bex26,_0x53bex1b){return function(_0x53bex1c){if(_0x53bex1c){return _0x53bex1c[_0x49bd[41]](_0x53bex26)[_0x49bd[40]](function(_0x53bex27){return _0x53bex27})};return null}}function removeEntity(_0x53bex1a,_0x53bex1b){return function(_0x53bex1c){if(_0x53bex1c){return _0x53bex1c[_0x49bd[42]]()[_0x49bd[40]](function(){_0x53bex1a[_0x49bd[28]](204)[_0x49bd[27]]()})}}}function handleEntityNotFound(_0x53bex1a,_0x53bex1b){return function(_0x53bex1c){if(!_0x53bex1c){_0x53bex1a[_0x49bd[26]](404)};return _0x53bex1c}}function handleError(_0x53bex1a,_0x53bex1b){_0x53bex1b= _0x53bex1b|| 500;return function(_0x53bex2b){logger[_0x49bd[44]](_0x53bex2b[_0x49bd[43]]);if(_0x53bex2b[_0x49bd[45]]){delete _0x53bex2b[_0x49bd[45]]};_0x53bex1a[_0x49bd[28]](_0x53bex1b)[_0x49bd[46]](_0x53bex2b)}}exports[_0x49bd[47]]= function(_0x53bex2c,_0x53bex1a){var _0x53bex1f={},_0x53bex2d={},_0x53bex2e={count:0,rows:[]};_0x53bex2d[_0x49bd[48]]= _[_0x49bd[51]](db[_0x49bd[50]][_0x49bd[49]]);var _0x53bex2f={dateStart:_0x53bex2c[_0x49bd[53]][_0x49bd[52]],dateEnd:_0x53bex2c[_0x49bd[53]][_0x49bd[54]]};delete _0x53bex2c[_0x49bd[53]][_0x49bd[52]];delete _0x53bex2c[_0x49bd[53]][_0x49bd[54]];_0x53bex2d[_0x49bd[53]]= _[_0x49bd[51]](_0x53bex2c[_0x49bd[53]]);_0x53bex2d[_0x49bd[55]]= _[_0x49bd[56]](_0x53bex2d[_0x49bd[48]],_0x53bex2d[_0x49bd[53]]);_0x53bex1f[_0x49bd[57]]= _[_0x49bd[56]](_0x53bex2d[_0x49bd[48]],qs[_0x49bd[58]](_0x53bex2c[_0x49bd[53]][_0x49bd[58]]));_0x53bex1f[_0x49bd[57]]= (_0x53bex1f[_0x49bd[57]][_0x49bd[59]])?_0x53bex1f[_0x49bd[57]]:_0x53bex2d[_0x49bd[48]];if(!_0x53bex2c[_0x49bd[53]][_0x49bd[61]](_0x49bd[60])){_0x53bex1f[_0x49bd[32]]= qs[_0x49bd[32]](_0x53bex2c[_0x49bd[53]][_0x49bd[32]]);_0x53bex1f[_0x49bd[31]]= qs[_0x49bd[31]](_0x53bex2c[_0x49bd[53]][_0x49bd[31]])};_0x53bex1f[_0x49bd[62]]= qs[_0x49bd[63]](_0x53bex2c[_0x49bd[53]][_0x49bd[63]]);_0x53bex1f[_0x49bd[64]]= qs[_0x49bd[55]](_[_0x49bd[65]](_0x53bex2c[_0x49bd[53]],_0x53bex2d[_0x49bd[55]]));if(_0x53bex2f[_0x49bd[52]]){if(_0x53bex2f[_0x49bd[54]]){_0x53bex2f[_0x49bd[54]]= moment(_0x53bex2f[_0x49bd[54]])[_0x49bd[67]](1,_0x49bd[66])}else {_0x53bex2f[_0x49bd[54]]= moment(_0x53bex2f[_0x49bd[52]])[_0x49bd[67]](1,_0x49bd[66])};_[_0x49bd[68]](_0x53bex1f[_0x49bd[64]],{createdAt:{$gte:_0x53bex2f[_0x49bd[52]],$lte:_0x53bex2f[_0x49bd[54]]}})};if(_0x53bex2c[_0x49bd[53]][_0x49bd[69]]){_0x53bex1f[_0x49bd[64]]= _[_0x49bd[68]](_0x53bex1f[_0x49bd[64]],{$or:_[_0x49bd[71]](_0x53bex1f[_0x49bd[57]],function(_0x53bex30){var _0x53bex2e={};_0x53bex2e[_0x53bex30]= {$like:_0x49bd[70]+ _0x53bex2c[_0x49bd[53]][_0x49bd[69]]+ _0x49bd[70]};return _0x53bex2e})})};_0x53bex1f= _[_0x49bd[68]]({},_0x53bex1f,_0x53bex2c[_0x49bd[72]]);var _0x53bex31={where:_0x53bex1f[_0x49bd[64]]};return db[_0x49bd[50]][_0x49bd[30]](_0x53bex31)[_0x49bd[40]](function(_0x53bex20){_0x53bex2e[_0x49bd[30]]= _0x53bex20;if(_0x53bex2c[_0x49bd[53]][_0x49bd[75]]){_0x53bex1f[_0x49bd[76]]= [{all:true}]};return db[_0x49bd[50]][_0x49bd[77]](_0x53bex1f)})[_0x49bd[40]](function(_0x53bex32){_0x53bex2e[_0x49bd[74]]= _0x53bex32;return _0x53bex2e})[_0x49bd[40]](respondWithFilteredResult(_0x53bex1a,_0x53bex1f))[_0x49bd[73]](handleError(_0x53bex1a,null))};exports[_0x49bd[78]]= function(_0x53bex2c,_0x53bex1a){var _0x53bex1f={raw:true,where:{id:_0x53bex2c[_0x49bd[80]][_0x49bd[79]]}},_0x53bex2d={};_0x53bex2d[_0x49bd[48]]= _[_0x49bd[51]](db[_0x49bd[50]][_0x49bd[49]]);_0x53bex2d[_0x49bd[53]]= _[_0x49bd[51]](_0x53bex2c[_0x49bd[53]]);_0x53bex2d[_0x49bd[55]]= _[_0x49bd[56]](_0x53bex2d[_0x49bd[48]],_0x53bex2d[_0x49bd[53]]);_0x53bex1f[_0x49bd[57]]= _[_0x49bd[56]](_0x53bex2d[_0x49bd[48]],qs[_0x49bd[58]](_0x53bex2c[_0x49bd[53]][_0x49bd[58]]));_0x53bex1f[_0x49bd[57]]= (_0x53bex1f[_0x49bd[57]][_0x49bd[59]])?_0x53bex1f[_0x49bd[57]]:_0x53bex2d[_0x49bd[48]];if(_0x53bex2c[_0x49bd[53]][_0x49bd[75]]){_0x53bex1f[_0x49bd[76]]= [{all:true}]};_0x53bex1f= _[_0x49bd[68]]({},_0x53bex1f,_0x53bex2c[_0x49bd[72]]);return db[_0x49bd[50]][_0x49bd[81]](_0x53bex1f)[_0x49bd[40]](handleEntityNotFound(_0x53bex1a,null))[_0x49bd[40]](respondWithResult(_0x53bex1a,null))[_0x49bd[73]](handleError(_0x53bex1a,null))};exports[_0x49bd[82]]= function(_0x53bex2c,_0x53bex1a,_0x53bex33){return db[_0x49bd[50]][_0x49bd[81]]({where:{id:_0x53bex2c[_0x49bd[80]][_0x49bd[79]]},attributes:[_0x49bd[45],_0x49bd[85],_0x49bd[87]],raw:true})[_0x49bd[40]](handleEntityNotFound(_0x53bex1a,null))[_0x49bd[40]](function(_0x53bex1c){if(_0x53bex1c){if(!fs[_0x49bd[89]](path[_0x49bd[88]](config[_0x49bd[83]],_0x49bd[84],_0x53bex1c[_0x49bd[85]]+ _0x49bd[86]+ _0x53bex1c[_0x49bd[87]]))){throw  new db[_0x49bd[91]].ValidationError(_0x49bd[90])};return _0x53bex1a[_0x49bd[82]](path[_0x49bd[88]](config[_0x49bd[83]],_0x49bd[84],util[_0x49bd[93]](_0x49bd[92],_0x53bex1c[_0x49bd[85]],_0x53bex1c[_0x49bd[87]])),util[_0x49bd[93]](_0x49bd[92],_0x53bex1c[_0x49bd[45]],_0x53bex1c[_0x49bd[87]]))};return null})[_0x49bd[73]](handleError(_0x53bex1a,null))};exports[_0x49bd[94]]= function(_0x53bex2c,_0x53bex1a,_0x53bex33){var _0x53bex34={name:path[_0x49bd[98]](_0x53bex2c[_0x49bd[96]][_0x49bd[95]],path[_0x49bd[97]](_0x53bex2c[_0x49bd[96]][_0x49bd[95]])),save_name:path[_0x49bd[98]](_0x53bex2c[_0x49bd[96]][_0x49bd[99]],path[_0x49bd[97]](_0x53bex2c[_0x49bd[96]][_0x49bd[99]])),original_format:path[_0x49bd[97]](_0x53bex2c[_0x49bd[96]][_0x49bd[95]])[_0x49bd[100]](1),converted_format:_0x49bd[101]};var _0x53bex35=path[_0x49bd[88]](config[_0x49bd[83]],_0x49bd[102],_0x53bex2c[_0x49bd[96]][_0x49bd[99]]);var _0x53bex36=path[_0x49bd[88]](config[_0x49bd[83]],_0x49bd[84],util[_0x49bd[93]](_0x49bd[92],path[_0x49bd[98]](_0x53bex2c[_0x49bd[96]][_0x49bd[99]],path[_0x49bd[97]](_0x53bex2c[_0x49bd[96]][_0x49bd[99]])),_0x53bex34[_0x49bd[87]]));logger[_0x49bd[104]](_0x49bd[103],_0x53bex35);logger[_0x49bd[104]](_0x49bd[105],_0x53bex36);try{fs[_0x49bd[107]](_0x53bex35,parseInt(_0x49bd[106],8));var _0x53bex37=sox[_0x49bd[108]](_0x53bex35,_0x53bex36,{sampleRate:8000,format:_0x49bd[101],channelCount:1,bitRate:192* 1024,compressionQuality:5});_0x53bex37[_0x49bd[109]](_0x49bd[44],function(_0x53bex2b){_0x53bex1a[_0x49bd[28]](500)[_0x49bd[46]](_0x53bex2b)});_0x53bex37[_0x49bd[109]](_0x49bd[110],function(_0x53bex38){_0x53bex34[_0x49bd[111]]= isNaN(_0x53bex38[_0x49bd[112]])?null:_0x53bex38[_0x49bd[112]]* 1000;_0x53bex34[_0x49bd[113]]= isNaN(_0x53bex38[_0x49bd[114]])?null:_0x53bex38[_0x49bd[114]];_0x53bex34[_0x49bd[115]]= isNaN(_0x53bex38[_0x49bd[116]])?null:_0x53bex38[_0x49bd[116]];_0x53bex34[_0x49bd[117]]= isNaN(_0x53bex38[_0x49bd[118]])?null:_0x53bex38[_0x49bd[118]];_0x53bex34[_0x49bd[119]]= isNaN(_0x53bex38[_0x49bd[120]])?null:_0x53bex38[_0x49bd[120]]});_0x53bex37[_0x49bd[109]](_0x49bd[121],function(_0x53bex38){_0x53bex34[_0x49bd[122]]= isNaN(_0x53bex38[_0x49bd[112]])?null:_0x53bex38[_0x49bd[112]]* 1000;_0x53bex34[_0x49bd[123]]= isNaN(_0x53bex38[_0x49bd[114]])?null:_0x53bex38[_0x49bd[114]];_0x53bex34[_0x49bd[124]]= isNaN(_0x53bex38[_0x49bd[116]])?null:_0x53bex38[_0x49bd[116]];_0x53bex34[_0x49bd[125]]= isNaN(_0x53bex38[_0x49bd[118]])?null:_0x53bex38[_0x49bd[118]];_0x53bex34[_0x49bd[126]]= isNaN(_0x53bex38[_0x49bd[120]])?null:_0x53bex38[_0x49bd[120]]});_0x53bex37[_0x49bd[109]](_0x49bd[27],function(){fs[_0x49bd[107]](_0x53bex36,parseInt(_0x49bd[106],8));return db[_0x49bd[50]][_0x49bd[94]](_0x53bex34)[_0x49bd[40]](respondWithResult(_0x53bex1a,null))[_0x49bd[73]](handleError(_0x53bex1a,null))});_0x53bex37[_0x49bd[127]]()}catch(err){_0x53bex1a[_0x49bd[28]](500)[_0x49bd[46]](err)}};exports[_0x49bd[41]]= function(_0x53bex2c,_0x53bex1a,_0x53bex33){return db[_0x49bd[50]][_0x49bd[81]]({where:{id:_0x53bex2c[_0x49bd[80]][_0x49bd[79]]}})[_0x49bd[40]](handleEntityNotFound(_0x53bex1a,null))[_0x49bd[40]](saveUpdates(_[_0x49bd[65]](_0x53bex2c[_0x49bd[128]],[_0x49bd[45],_0x49bd[129]]),null))[_0x49bd[40]](respondWithResult(_0x53bex1a,null))[_0x49bd[73]](handleError(_0x53bex1a,null))};exports[_0x49bd[130]]= function(_0x53bex2c,_0x53bex1a,_0x53bex33){return db[_0x49bd[50]][_0x49bd[81]]({where:{id:_0x53bex2c[_0x49bd[80]][_0x49bd[79]]}})[_0x49bd[40]](function(_0x53bex1c){if(_0x53bex1c){return _0x53bex1c[_0x49bd[42]]()}})[_0x49bd[40]](function(_0x53bex1c){var _0x53bex39=path[_0x49bd[88]](config[_0x49bd[83]],_0x49bd[102],util[_0x49bd[93]](_0x49bd[92],_0x53bex1c[_0x49bd[85]],_0x53bex1c[_0x49bd[131]]));var _0x53bex3a=path[_0x49bd[88]](config[_0x49bd[83]],_0x49bd[84],util[_0x49bd[93]](_0x49bd[92],_0x53bex1c[_0x49bd[85]],_0x53bex1c[_0x49bd[87]]));fs[_0x49bd[132]](_0x53bex39);fs[_0x49bd[132]](_0x53bex3a);return _0x53bex1c})[_0x49bd[40]](function(_0x53bex1c){if(_0x53bex1c){return _0x53bex1a[_0x49bd[28]](204)[_0x49bd[27]]()}})[_0x49bd[40]](handleEntityNotFound(_0x53bex1a,null))[_0x49bd[73]](handleError(_0x53bex1a,null))}
\ No newline at end of file
+var _0xe696=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x6F\x75\x6E\x64","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x2E","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x66\x6F\x72\x6D\x61\x74","\x6A\x6F\x69\x6E","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x53\x6F\x75\x6E\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x25\x73\x2E\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x72\x65\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x6E\x61\x6D\x65","\x66\x69\x6C\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x77\x61\x76","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x6F\x72\x69\x67\x69\x6E\x61\x6C","\x53\x6F\x75\x6E\x64\x20\x75\x70\x6C\x6F\x61\x64\x20\x66\x69\x6C\x65\x70\x61\x74\x68\x3A\x20\x25\x73","\x69\x6E\x66\x6F","\x53\x6F\x75\x6E\x64\x20\x75\x70\x6C\x6F\x61\x64\x20\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x3A\x20\x25\x73","\x30\x37\x37\x37","\x63\x68\x6D\x6F\x64\x53\x79\x6E\x63","\x74\x72\x61\x6E\x73\x63\x6F\x64\x65","\x6F\x6E","\x73\x72\x63","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x64\x75\x72\x61\x74\x69\x6F\x6E","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x62\x69\x74\x52\x61\x74\x65","\x62\x69\x74\x52\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x64\x65\x73\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x64\x75\x72\x61\x74\x69\x6F\x6E","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x62\x69\x74\x52\x61\x74\x65","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x73\x74\x61\x72\x74","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x6C\x65\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x66\x6F\x72\x6D\x61\x74","\x75\x6E\x6C\x69\x6E\x6B\x53\x79\x6E\x63"];_0xe696[0];var jsonpatch=require(_0xe696[1]);var rp=require(_0xe696[2]);var moment=require(_0xe696[3]);var BPromise=require(_0xe696[4]);var Mustache=require(_0xe696[5]);var util=require(_0xe696[6]);var path=require(_0xe696[7]);var sox=require(_0xe696[8]);var csv=require(_0xe696[9]);var ejs=require(_0xe696[10]);var fs=require(_0xe696[11]);var _=require(_0xe696[12]);var squel=require(_0xe696[13]);var crypto=require(_0xe696[14]);var jsforce=require(_0xe696[15]);var deskjs=require(_0xe696[16]);var toCsv=require(_0xe696[9]);var querystring=require(_0xe696[17]);var Papa=require(_0xe696[18]);var qs=require(_0xe696[19]);var logger=require(_0xe696[21])(_0xe696[20]);var utils=require(_0xe696[22]);var config=require(_0xe696[23]);var db=require(_0xe696[25])[_0xe696[24]];function respondWithStatusCode(_0xdbf1x1a,_0xdbf1x1b){_0xdbf1x1b= _0xdbf1x1b|| 204;return function(_0xdbf1x1c){if(_0xdbf1x1c){return _0xdbf1x1a[_0xe696[26]](_0xdbf1x1b)};return _0xdbf1x1a[_0xe696[28]](_0xdbf1x1b)[_0xe696[27]]()}}function respondWithResult(_0xdbf1x1a,_0xdbf1x1b){_0xdbf1x1b= _0xdbf1x1b|| 200;return function(_0xdbf1x1c){if(_0xdbf1x1c){return _0xdbf1x1a[_0xe696[28]](_0xdbf1x1b)[_0xe696[29]](_0xdbf1x1c)}}}function respondWithFilteredResult(_0xdbf1x1a,_0xdbf1x1f){return function(_0xdbf1x1c){if(_0xdbf1x1c){var _0xdbf1x20=_0xdbf1x1c[_0xe696[30]],_0xdbf1x21=_0xdbf1x1f[_0xe696[31]],_0xdbf1x22=_0xdbf1x1f[_0xe696[31]]+ _0xdbf1x1f[_0xe696[32]],_0xdbf1x1b;if(_0xdbf1x22>= _0xdbf1x20){_0xdbf1x22= _0xdbf1x20;_0xdbf1x1b= 200}else {_0xdbf1x1b= 206};_0xdbf1x1a[_0xe696[28]](_0xdbf1x1b);return _0xdbf1x1a[_0xe696[36]](_0xe696[33],_0xdbf1x21+ _0xe696[34]+ _0xdbf1x22+ _0xe696[35]+ _0xdbf1x20)[_0xe696[29]](_0xdbf1x1c)};return null}}function patchUpdates(_0xdbf1x24){return function(_0xdbf1x1c){try{jsonpatch[_0xe696[37]](_0xdbf1x1c,_0xdbf1x24,true)}catch(err){return BPromise[_0xe696[38]](err)};return _0xdbf1x1c[_0xe696[39]]()}}function saveUpdates(_0xdbf1x26,_0xdbf1x1b){return function(_0xdbf1x1c){if(_0xdbf1x1c){return _0xdbf1x1c[_0xe696[41]](_0xdbf1x26)[_0xe696[40]](function(_0xdbf1x27){return _0xdbf1x27})};return null}}function removeEntity(_0xdbf1x1a,_0xdbf1x1b){return function(_0xdbf1x1c){if(_0xdbf1x1c){return _0xdbf1x1c[_0xe696[42]]()[_0xe696[40]](function(){_0xdbf1x1a[_0xe696[28]](204)[_0xe696[27]]()})}}}function handleEntityNotFound(_0xdbf1x1a,_0xdbf1x1b){return function(_0xdbf1x1c){if(!_0xdbf1x1c){_0xdbf1x1a[_0xe696[26]](404)};return _0xdbf1x1c}}function handleError(_0xdbf1x1a,_0xdbf1x1b){_0xdbf1x1b= _0xdbf1x1b|| 500;return function(_0xdbf1x2b){logger[_0xe696[44]](_0xdbf1x2b[_0xe696[43]]);if(_0xdbf1x2b[_0xe696[45]]){delete _0xdbf1x2b[_0xe696[45]]};_0xdbf1x1a[_0xe696[28]](_0xdbf1x1b)[_0xe696[46]](_0xdbf1x2b)}}exports[_0xe696[47]]= function(_0xdbf1x2c,_0xdbf1x1a){var _0xdbf1x1f={},_0xdbf1x2d={},_0xdbf1x2e={count:0,rows:[]};_0xdbf1x2d[_0xe696[48]]= _[_0xe696[51]](db[_0xe696[50]][_0xe696[49]]);var _0xdbf1x2f={dateStart:_0xdbf1x2c[_0xe696[53]][_0xe696[52]],dateEnd:_0xdbf1x2c[_0xe696[53]][_0xe696[54]]};delete _0xdbf1x2c[_0xe696[53]][_0xe696[52]];delete _0xdbf1x2c[_0xe696[53]][_0xe696[54]];_0xdbf1x2d[_0xe696[53]]= _[_0xe696[51]](_0xdbf1x2c[_0xe696[53]]);_0xdbf1x2d[_0xe696[55]]= _[_0xe696[56]](_0xdbf1x2d[_0xe696[48]],_0xdbf1x2d[_0xe696[53]]);_0xdbf1x1f[_0xe696[57]]= _[_0xe696[56]](_0xdbf1x2d[_0xe696[48]],qs[_0xe696[58]](_0xdbf1x2c[_0xe696[53]][_0xe696[58]]));_0xdbf1x1f[_0xe696[57]]= (_0xdbf1x1f[_0xe696[57]][_0xe696[59]])?_0xdbf1x1f[_0xe696[57]]:_0xdbf1x2d[_0xe696[48]];if(!_0xdbf1x2c[_0xe696[53]][_0xe696[61]](_0xe696[60])){_0xdbf1x1f[_0xe696[32]]= qs[_0xe696[32]](_0xdbf1x2c[_0xe696[53]][_0xe696[32]]);_0xdbf1x1f[_0xe696[31]]= qs[_0xe696[31]](_0xdbf1x2c[_0xe696[53]][_0xe696[31]])};_0xdbf1x1f[_0xe696[62]]= qs[_0xe696[63]](_0xdbf1x2c[_0xe696[53]][_0xe696[63]]);_0xdbf1x1f[_0xe696[64]]= qs[_0xe696[55]](_[_0xe696[65]](_0xdbf1x2c[_0xe696[53]],_0xdbf1x2d[_0xe696[55]]));if(_0xdbf1x2f[_0xe696[52]]){if(_0xdbf1x2f[_0xe696[54]]){_0xdbf1x2f[_0xe696[54]]= moment(_0xdbf1x2f[_0xe696[54]])[_0xe696[67]](1,_0xe696[66])}else {_0xdbf1x2f[_0xe696[54]]= moment(_0xdbf1x2f[_0xe696[52]])[_0xe696[67]](1,_0xe696[66])};_[_0xe696[68]](_0xdbf1x1f[_0xe696[64]],{createdAt:{$gte:_0xdbf1x2f[_0xe696[52]],$lte:_0xdbf1x2f[_0xe696[54]]}})};if(_0xdbf1x2c[_0xe696[53]][_0xe696[69]]){_0xdbf1x1f[_0xe696[64]]= _[_0xe696[68]](_0xdbf1x1f[_0xe696[64]],{$or:_[_0xe696[71]](_0xdbf1x1f[_0xe696[57]],function(_0xdbf1x30){var _0xdbf1x2e={};_0xdbf1x2e[_0xdbf1x30]= {$like:_0xe696[70]+ _0xdbf1x2c[_0xe696[53]][_0xe696[69]]+ _0xe696[70]};return _0xdbf1x2e})})};_0xdbf1x1f= _[_0xe696[68]]({},_0xdbf1x1f,_0xdbf1x2c[_0xe696[72]]);var _0xdbf1x31={where:_0xdbf1x1f[_0xe696[64]]};return db[_0xe696[50]][_0xe696[30]](_0xdbf1x31)[_0xe696[40]](function(_0xdbf1x20){_0xdbf1x2e[_0xe696[30]]= _0xdbf1x20;if(_0xdbf1x2c[_0xe696[53]][_0xe696[75]]){_0xdbf1x1f[_0xe696[76]]= [{all:true}]};return db[_0xe696[50]][_0xe696[77]](_0xdbf1x1f)})[_0xe696[40]](function(_0xdbf1x32){_0xdbf1x2e[_0xe696[74]]= _0xdbf1x32;return _0xdbf1x2e})[_0xe696[40]](respondWithFilteredResult(_0xdbf1x1a,_0xdbf1x1f))[_0xe696[73]](handleError(_0xdbf1x1a,null))};exports[_0xe696[78]]= function(_0xdbf1x2c,_0xdbf1x1a){var _0xdbf1x1f={raw:true,where:{id:_0xdbf1x2c[_0xe696[80]][_0xe696[79]]}},_0xdbf1x2d={};_0xdbf1x2d[_0xe696[48]]= _[_0xe696[51]](db[_0xe696[50]][_0xe696[49]]);_0xdbf1x2d[_0xe696[53]]= _[_0xe696[51]](_0xdbf1x2c[_0xe696[53]]);_0xdbf1x2d[_0xe696[55]]= _[_0xe696[56]](_0xdbf1x2d[_0xe696[48]],_0xdbf1x2d[_0xe696[53]]);_0xdbf1x1f[_0xe696[57]]= _[_0xe696[56]](_0xdbf1x2d[_0xe696[48]],qs[_0xe696[58]](_0xdbf1x2c[_0xe696[53]][_0xe696[58]]));_0xdbf1x1f[_0xe696[57]]= (_0xdbf1x1f[_0xe696[57]][_0xe696[59]])?_0xdbf1x1f[_0xe696[57]]:_0xdbf1x2d[_0xe696[48]];if(_0xdbf1x2c[_0xe696[53]][_0xe696[75]]){_0xdbf1x1f[_0xe696[76]]= [{all:true}]};_0xdbf1x1f= _[_0xe696[68]]({},_0xdbf1x1f,_0xdbf1x2c[_0xe696[72]]);return db[_0xe696[50]][_0xe696[81]](_0xdbf1x1f)[_0xe696[40]](handleEntityNotFound(_0xdbf1x1a,null))[_0xe696[40]](respondWithResult(_0xdbf1x1a,null))[_0xe696[73]](handleError(_0xdbf1x1a,null))};exports[_0xe696[82]]= function(_0xdbf1x2c,_0xdbf1x1a,_0xdbf1x33){return db[_0xe696[50]][_0xe696[81]]({where:{id:_0xdbf1x2c[_0xe696[80]][_0xe696[79]]},attributes:[_0xe696[45],_0xe696[85],_0xe696[87]],raw:true})[_0xe696[40]](handleEntityNotFound(_0xdbf1x1a,null))[_0xe696[40]](function(_0xdbf1x1c){if(_0xdbf1x1c){if(!fs[_0xe696[89]](path[_0xe696[88]](config[_0xe696[83]],_0xe696[84],_0xdbf1x1c[_0xe696[85]]+ _0xe696[86]+ _0xdbf1x1c[_0xe696[87]]))){throw  new db[_0xe696[91]].ValidationError(_0xe696[90])};return _0xdbf1x1a[_0xe696[82]](path[_0xe696[88]](config[_0xe696[83]],_0xe696[84],util[_0xe696[93]](_0xe696[92],_0xdbf1x1c[_0xe696[85]],_0xdbf1x1c[_0xe696[87]])),util[_0xe696[93]](_0xe696[92],_0xdbf1x1c[_0xe696[45]],_0xdbf1x1c[_0xe696[87]]))};return null})[_0xe696[73]](handleError(_0xdbf1x1a,null))};exports[_0xe696[94]]= function(_0xdbf1x2c,_0xdbf1x1a,_0xdbf1x33){var _0xdbf1x34={name:path[_0xe696[98]](_0xdbf1x2c[_0xe696[96]][_0xe696[95]],path[_0xe696[97]](_0xdbf1x2c[_0xe696[96]][_0xe696[95]])),save_name:path[_0xe696[98]](_0xdbf1x2c[_0xe696[96]][_0xe696[99]],path[_0xe696[97]](_0xdbf1x2c[_0xe696[96]][_0xe696[99]])),original_format:path[_0xe696[97]](_0xdbf1x2c[_0xe696[96]][_0xe696[95]])[_0xe696[100]](1),converted_format:_0xe696[101]};var _0xdbf1x35=path[_0xe696[88]](config[_0xe696[83]],_0xe696[102],_0xdbf1x2c[_0xe696[96]][_0xe696[99]]);var _0xdbf1x36=path[_0xe696[88]](config[_0xe696[83]],_0xe696[84],util[_0xe696[93]](_0xe696[92],path[_0xe696[98]](_0xdbf1x2c[_0xe696[96]][_0xe696[99]],path[_0xe696[97]](_0xdbf1x2c[_0xe696[96]][_0xe696[99]])),_0xdbf1x34[_0xe696[87]]));logger[_0xe696[104]](_0xe696[103],_0xdbf1x35);logger[_0xe696[104]](_0xe696[105],_0xdbf1x36);try{fs[_0xe696[107]](_0xdbf1x35,parseInt(_0xe696[106],8));var _0xdbf1x37=sox[_0xe696[108]](_0xdbf1x35,_0xdbf1x36,{sampleRate:8000,format:_0xe696[101],channelCount:1,bitRate:192* 1024,compressionQuality:5});_0xdbf1x37[_0xe696[109]](_0xe696[44],function(_0xdbf1x2b){_0xdbf1x1a[_0xe696[28]](500)[_0xe696[46]](_0xdbf1x2b)});_0xdbf1x37[_0xe696[109]](_0xe696[110],function(_0xdbf1x38){_0xdbf1x34[_0xe696[111]]= isNaN(_0xdbf1x38[_0xe696[112]])?null:_0xdbf1x38[_0xe696[112]]* 1000;_0xdbf1x34[_0xe696[113]]= isNaN(_0xdbf1x38[_0xe696[114]])?null:_0xdbf1x38[_0xe696[114]];_0xdbf1x34[_0xe696[115]]= isNaN(_0xdbf1x38[_0xe696[116]])?null:_0xdbf1x38[_0xe696[116]];_0xdbf1x34[_0xe696[117]]= isNaN(_0xdbf1x38[_0xe696[118]])?null:_0xdbf1x38[_0xe696[118]];_0xdbf1x34[_0xe696[119]]= isNaN(_0xdbf1x38[_0xe696[120]])?null:_0xdbf1x38[_0xe696[120]]});_0xdbf1x37[_0xe696[109]](_0xe696[121],function(_0xdbf1x38){_0xdbf1x34[_0xe696[122]]= isNaN(_0xdbf1x38[_0xe696[112]])?null:_0xdbf1x38[_0xe696[112]]* 1000;_0xdbf1x34[_0xe696[123]]= isNaN(_0xdbf1x38[_0xe696[114]])?null:_0xdbf1x38[_0xe696[114]];_0xdbf1x34[_0xe696[124]]= isNaN(_0xdbf1x38[_0xe696[116]])?null:_0xdbf1x38[_0xe696[116]];_0xdbf1x34[_0xe696[125]]= isNaN(_0xdbf1x38[_0xe696[118]])?null:_0xdbf1x38[_0xe696[118]];_0xdbf1x34[_0xe696[126]]= isNaN(_0xdbf1x38[_0xe696[120]])?null:_0xdbf1x38[_0xe696[120]]});_0xdbf1x37[_0xe696[109]](_0xe696[27],function(){fs[_0xe696[107]](_0xdbf1x36,parseInt(_0xe696[106],8));return db[_0xe696[50]][_0xe696[94]](_0xdbf1x34)[_0xe696[40]](respondWithResult(_0xdbf1x1a,null))[_0xe696[73]](handleError(_0xdbf1x1a,null))});_0xdbf1x37[_0xe696[127]]()}catch(err){_0xdbf1x1a[_0xe696[28]](500)[_0xe696[46]](err)}};exports[_0xe696[41]]= function(_0xdbf1x2c,_0xdbf1x1a,_0xdbf1x33){return db[_0xe696[50]][_0xe696[81]]({where:{id:_0xdbf1x2c[_0xe696[80]][_0xe696[79]]}})[_0xe696[40]](handleEntityNotFound(_0xdbf1x1a,null))[_0xe696[40]](saveUpdates(_[_0xe696[65]](_0xdbf1x2c[_0xe696[128]],[_0xe696[45],_0xe696[129]]),null))[_0xe696[40]](respondWithResult(_0xdbf1x1a,null))[_0xe696[73]](handleError(_0xdbf1x1a,null))};exports[_0xe696[130]]= function(_0xdbf1x2c,_0xdbf1x1a,_0xdbf1x33){return db[_0xe696[50]][_0xe696[81]]({where:{id:_0xdbf1x2c[_0xe696[80]][_0xe696[79]]}})[_0xe696[40]](function(_0xdbf1x1c){if(_0xdbf1x1c){return _0xdbf1x1c[_0xe696[42]]()}})[_0xe696[40]](function(_0xdbf1x1c){var _0xdbf1x39=path[_0xe696[88]](config[_0xe696[83]],_0xe696[102],util[_0xe696[93]](_0xe696[92],_0xdbf1x1c[_0xe696[85]],_0xdbf1x1c[_0xe696[131]]));var _0xdbf1x3a=path[_0xe696[88]](config[_0xe696[83]],_0xe696[84],util[_0xe696[93]](_0xe696[92],_0xdbf1x1c[_0xe696[85]],_0xdbf1x1c[_0xe696[87]]));fs[_0xe696[132]](_0xdbf1x39);fs[_0xe696[132]](_0xdbf1x3a);return _0xdbf1x1c})[_0xe696[40]](function(_0xdbf1x1c){if(_0xdbf1x1c){return _0xdbf1x1a[_0xe696[28]](204)[_0xe696[27]]()}})[_0xe696[40]](handleEntityNotFound(_0xdbf1x1a,null))[_0xe696[73]](handleError(_0xdbf1x1a,null))}
\ No newline at end of file
index dd58a5b..a1f3855 100644 (file)
@@ -1 +1 @@
-var _0x4df9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x6F\x75\x6E\x64\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6F\x75\x6E\x64","\x74\x6F\x6F\x6C\x73\x5F\x73\x6F\x75\x6E\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0x4df9[0];var _=require(_0x4df9[1]);var util=require(_0x4df9[2]);var logger=require(_0x4df9[4])(_0x4df9[3]);var moment=require(_0x4df9[5]);var BPromise=require(_0x4df9[6]);var rp=require(_0x4df9[7]);var attributes=require(_0x4df9[8]);module[_0x4df9[9]]= function(_0xbbacx8,_0xbbacx9){return _0xbbacx8[_0x4df9[12]](_0x4df9[10],attributes,{tableName:_0x4df9[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x33ed=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x6F\x75\x6E\x64\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x6F\x75\x6E\x64","\x74\x6F\x6F\x6C\x73\x5F\x73\x6F\x75\x6E\x64\x73","\x64\x65\x66\x69\x6E\x65"];_0x33ed[0];var _=require(_0x33ed[1]);var util=require(_0x33ed[2]);var logger=require(_0x33ed[4])(_0x33ed[3]);var moment=require(_0x33ed[5]);var BPromise=require(_0x33ed[6]);var rp=require(_0x33ed[7]);var attributes=require(_0x33ed[8]);module[_0x33ed[9]]= function(_0x22b4x8,_0x22b4x9){return _0x22b4x8[_0x33ed[12]](_0x33ed[10],attributes,{tableName:_0x33ed[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 7b61b9e..7665592 100644 (file)
@@ -1 +1 @@
-var _0xa11b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x6F\x75\x6E\x64\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x6F\x75\x6E\x64\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x53\x68\x6F\x77\x53\x6F\x75\x6E\x64","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64","\x53\x6F\x75\x6E\x64"];_0xa11b[0];var _=require(_0xa11b[1]);var util=require(_0xa11b[2]);var moment=require(_0xa11b[3]);var BPromise=require(_0xa11b[4]);var rs=require(_0xa11b[5]);var fs=require(_0xa11b[6]);var db=require(_0xa11b[8])[_0xa11b[7]];var utils=require(_0xa11b[9]);var logger=require(_0xa11b[11])(_0xa11b[10]);var config=require(_0xa11b[12]);var jayson=require(_0xa11b[13]);var client=jayson[_0xa11b[15]][_0xa11b[14]]({port:9002});function respondWithRpcPromise(_0xd033xe,_0xd033xf,_0xd033x10){return  new BPromise(function(_0xd033x11,_0xd033x12){return client[_0xa11b[28]](_0xd033xe,_0xd033x10)[_0xa11b[27]](function(_0xd033x14){logger[_0xa11b[20]](_0xa11b[16],_0xd033xf,_0xa11b[19]);logger[_0xa11b[23]](_0xa11b[21],_0xd033xf,_0xa11b[19],JSON[_0xa11b[22]](_0xd033x14));if(_0xd033x14[_0xa11b[17]]){if(_0xd033x14[_0xa11b[17]][_0xa11b[24]]=== 500){logger[_0xa11b[17]](_0xa11b[16],_0xd033xf,_0xd033x14[_0xa11b[17]][_0xa11b[25]]);return _0xd033x12(_0xd033x14[_0xa11b[17]][_0xa11b[25]])};logger[_0xa11b[17]](_0xa11b[16],_0xd033xf,_0xd033x14[_0xa11b[17]][_0xa11b[25]]);return _0xd033x11(_0xd033x14[_0xa11b[17]][_0xa11b[25]])}else {logger[_0xa11b[20]](_0xa11b[16],_0xd033xf,_0xa11b[19]);_0xd033x11(_0xd033x14[_0xa11b[26]][_0xa11b[25]])}})[_0xa11b[18]](function(_0xd033x13){logger[_0xa11b[17]](_0xa11b[16],_0xd033xf,_0xd033x13);_0xd033x12(_0xd033x13)})})}exports[_0xa11b[29]]= function(_0xd033x10){var _0xd033x15=this;return  new Promise(function(_0xd033x11,_0xd033x12){return db[_0xa11b[39]][_0xa11b[38]]({raw:_0xd033x10[_0xa11b[30]]?(_0xd033x10[_0xa11b[30]][_0xa11b[31]]=== undefined)?true:false:true,where:_0xd033x10[_0xa11b[30]]?_0xd033x10[_0xa11b[30]][_0xa11b[32]]|| null:null,attributes:_0xd033x10[_0xa11b[30]]?_0xd033x10[_0xa11b[30]][_0xa11b[33]]|| null:null,include:_0xd033x10[_0xa11b[30]]?(_0xd033x10[_0xa11b[30]][_0xa11b[34]]?_[_0xa11b[37]](_0xd033x10[_0xa11b[30]][_0xa11b[34]],function(_0xd033x16){return {model:db[_0xd033x16[_0xa11b[35]]],as:_0xd033x16[_0xa11b[36]],attributes:_0xd033x16[_0xa11b[33]],include:_0xd033x16[_0xa11b[34]]?_[_0xa11b[37]](_0xd033x16[_0xa11b[34]],function(_0xd033x17){return {model:db[_0xd033x17[_0xa11b[35]]],as:_0xd033x17[_0xa11b[36]],attributes:_0xd033x17[_0xa11b[33]],include:_0xd033x17[_0xa11b[34]]?_[_0xa11b[37]](_0xd033x17[_0xa11b[34]],function(_0xd033x18){return {model:db[_0xd033x18[_0xa11b[35]]],as:_0xd033x18[_0xa11b[36]],attributes:_0xd033x18[_0xa11b[33]]}}):[]}}):[]}}):[]):[]})[_0xa11b[27]](function(_0xd033x14){logger[_0xa11b[20]](_0xa11b[29],_0xd033x10);logger[_0xa11b[23]](_0xa11b[29],_0xd033x10,JSON[_0xa11b[22]](_0xd033x14));_0xd033x11(_0xd033x14)})[_0xa11b[18]](function(_0xd033x13){logger[_0xa11b[17]](_0xa11b[29],_0xd033x13[_0xa11b[25]],_0xd033x10);_0xd033x12(_0xd033x15[_0xa11b[17]](500,_0xd033x13[_0xa11b[25]]))})})}
\ No newline at end of file
+var _0xb49d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x6F\x75\x6E\x64\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x6F\x75\x6E\x64\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x53\x68\x6F\x77\x53\x6F\x75\x6E\x64","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64","\x53\x6F\x75\x6E\x64"];_0xb49d[0];var _=require(_0xb49d[1]);var util=require(_0xb49d[2]);var moment=require(_0xb49d[3]);var BPromise=require(_0xb49d[4]);var rs=require(_0xb49d[5]);var fs=require(_0xb49d[6]);var db=require(_0xb49d[8])[_0xb49d[7]];var utils=require(_0xb49d[9]);var logger=require(_0xb49d[11])(_0xb49d[10]);var config=require(_0xb49d[12]);var jayson=require(_0xb49d[13]);var client=jayson[_0xb49d[15]][_0xb49d[14]]({port:9002});function respondWithRpcPromise(_0xbef0xe,_0xbef0xf,_0xbef0x10){return  new BPromise(function(_0xbef0x11,_0xbef0x12){return client[_0xb49d[28]](_0xbef0xe,_0xbef0x10)[_0xb49d[27]](function(_0xbef0x14){logger[_0xb49d[20]](_0xb49d[16],_0xbef0xf,_0xb49d[19]);logger[_0xb49d[23]](_0xb49d[21],_0xbef0xf,_0xb49d[19],JSON[_0xb49d[22]](_0xbef0x14));if(_0xbef0x14[_0xb49d[17]]){if(_0xbef0x14[_0xb49d[17]][_0xb49d[24]]=== 500){logger[_0xb49d[17]](_0xb49d[16],_0xbef0xf,_0xbef0x14[_0xb49d[17]][_0xb49d[25]]);return _0xbef0x12(_0xbef0x14[_0xb49d[17]][_0xb49d[25]])};logger[_0xb49d[17]](_0xb49d[16],_0xbef0xf,_0xbef0x14[_0xb49d[17]][_0xb49d[25]]);return _0xbef0x11(_0xbef0x14[_0xb49d[17]][_0xb49d[25]])}else {logger[_0xb49d[20]](_0xb49d[16],_0xbef0xf,_0xb49d[19]);_0xbef0x11(_0xbef0x14[_0xb49d[26]][_0xb49d[25]])}})[_0xb49d[18]](function(_0xbef0x13){logger[_0xb49d[17]](_0xb49d[16],_0xbef0xf,_0xbef0x13);_0xbef0x12(_0xbef0x13)})})}exports[_0xb49d[29]]= function(_0xbef0x10){var _0xbef0x15=this;return  new Promise(function(_0xbef0x11,_0xbef0x12){return db[_0xb49d[39]][_0xb49d[38]]({raw:_0xbef0x10[_0xb49d[30]]?(_0xbef0x10[_0xb49d[30]][_0xb49d[31]]=== undefined)?true:false:true,where:_0xbef0x10[_0xb49d[30]]?_0xbef0x10[_0xb49d[30]][_0xb49d[32]]|| null:null,attributes:_0xbef0x10[_0xb49d[30]]?_0xbef0x10[_0xb49d[30]][_0xb49d[33]]|| null:null,include:_0xbef0x10[_0xb49d[30]]?(_0xbef0x10[_0xb49d[30]][_0xb49d[34]]?_[_0xb49d[37]](_0xbef0x10[_0xb49d[30]][_0xb49d[34]],function(_0xbef0x16){return {model:db[_0xbef0x16[_0xb49d[35]]],as:_0xbef0x16[_0xb49d[36]],attributes:_0xbef0x16[_0xb49d[33]],include:_0xbef0x16[_0xb49d[34]]?_[_0xb49d[37]](_0xbef0x16[_0xb49d[34]],function(_0xbef0x17){return {model:db[_0xbef0x17[_0xb49d[35]]],as:_0xbef0x17[_0xb49d[36]],attributes:_0xbef0x17[_0xb49d[33]],include:_0xbef0x17[_0xb49d[34]]?_[_0xb49d[37]](_0xbef0x17[_0xb49d[34]],function(_0xbef0x18){return {model:db[_0xbef0x18[_0xb49d[35]]],as:_0xbef0x18[_0xb49d[36]],attributes:_0xbef0x18[_0xb49d[33]]}}):[]}}):[]}}):[]):[]})[_0xb49d[27]](function(_0xbef0x14){logger[_0xb49d[20]](_0xb49d[29],_0xbef0x10);logger[_0xb49d[23]](_0xb49d[29],_0xbef0x10,JSON[_0xb49d[22]](_0xbef0x14));_0xbef0x11(_0xbef0x14)})[_0xb49d[18]](function(_0xbef0x13){logger[_0xb49d[17]](_0xb49d[29],_0xbef0x13[_0xb49d[25]],_0xbef0x10);_0xbef0x12(_0xbef0x15[_0xb49d[17]](500,_0xbef0x13[_0xb49d[25]]))})})}
\ No newline at end of file
index 6f81350..1bc3eea 100644 (file)
@@ -1 +1 @@
-var _0x153f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x71\x75\x61\x72\x65\x4F\x64\x62\x63\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x74\x65\x73\x74","\x74\x65\x73\x74","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x153f[0];var multer=require(_0x153f[1]);var util=require(_0x153f[2]);var path=require(_0x153f[3]);var express=require(_0x153f[4]);var router=express.Router();var auth=require(_0x153f[5]);var interaction=require(_0x153f[6]);var config=require(_0x153f[7]);var controller=require(_0x153f[8]);router[_0x153f[12]](_0x153f[9],auth[_0x153f[10]](),controller[_0x153f[11]]);router[_0x153f[12]](_0x153f[13],auth[_0x153f[10]](),controller[_0x153f[14]]);router[_0x153f[12]](_0x153f[15],auth[_0x153f[10]](),controller[_0x153f[16]]);router[_0x153f[18]](_0x153f[9],auth[_0x153f[10]](),controller[_0x153f[17]]);router[_0x153f[20]](_0x153f[13],auth[_0x153f[10]](),controller[_0x153f[19]]);router[_0x153f[22]](_0x153f[13],auth[_0x153f[10]](),controller[_0x153f[21]]);module[_0x153f[23]]= router
\ No newline at end of file
+var _0xa1f0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x71\x75\x61\x72\x65\x4F\x64\x62\x63\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x74\x65\x73\x74","\x74\x65\x73\x74","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xa1f0[0];var multer=require(_0xa1f0[1]);var util=require(_0xa1f0[2]);var path=require(_0xa1f0[3]);var express=require(_0xa1f0[4]);var router=express.Router();var auth=require(_0xa1f0[5]);var interaction=require(_0xa1f0[6]);var config=require(_0xa1f0[7]);var controller=require(_0xa1f0[8]);router[_0xa1f0[12]](_0xa1f0[9],auth[_0xa1f0[10]](),controller[_0xa1f0[11]]);router[_0xa1f0[12]](_0xa1f0[13],auth[_0xa1f0[10]](),controller[_0xa1f0[14]]);router[_0xa1f0[12]](_0xa1f0[15],auth[_0xa1f0[10]](),controller[_0xa1f0[16]]);router[_0xa1f0[18]](_0xa1f0[9],auth[_0xa1f0[10]](),controller[_0xa1f0[17]]);router[_0xa1f0[20]](_0xa1f0[13],auth[_0xa1f0[10]](),controller[_0xa1f0[19]]);router[_0xa1f0[22]](_0xa1f0[13],auth[_0xa1f0[10]](),controller[_0xa1f0[21]]);module[_0xa1f0[23]]= router
\ No newline at end of file
index bf2ec73..1f37d4e 100644 (file)
@@ -1 +1 @@
-var _0x5ad4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65"];_0x5ad4[0];var Sequelize=require(_0x5ad4[1]);module[_0x5ad4[2]]= {name:{type:Sequelize[_0x5ad4[3]],unique:_0x5ad4[4],allowNull:false},dsn:{type:Sequelize[_0x5ad4[3]]},description:{type:Sequelize[_0x5ad4[3]]}}
\ No newline at end of file
+var _0x8954=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65"];_0x8954[0];var Sequelize=require(_0x8954[1]);module[_0x8954[2]]= {name:{type:Sequelize[_0x8954[3]],unique:_0x8954[4],allowNull:false},dsn:{type:Sequelize[_0x8954[3]]},description:{type:Sequelize[_0x8954[3]]}}
\ No newline at end of file
index 65aa4de..90ab417 100644 (file)
@@ -1 +1 @@
-var _0xd343=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x74\x65\x73\x74","\x6F\x64\x62\x63","\x64\x73\x6E","\x6F\x70\x65\x6E\x53\x79\x6E\x63","\x63\x6C\x6F\x73\x65\x53\x79\x6E\x63"];_0xd343[0];var jsonpatch=require(_0xd343[1]);var rp=require(_0xd343[2]);var moment=require(_0xd343[3]);var BPromise=require(_0xd343[4]);var Mustache=require(_0xd343[5]);var util=require(_0xd343[6]);var path=require(_0xd343[7]);var sox=require(_0xd343[8]);var csv=require(_0xd343[9]);var ejs=require(_0xd343[10]);var fs=require(_0xd343[11]);var _=require(_0xd343[12]);var squel=require(_0xd343[13]);var crypto=require(_0xd343[14]);var jsforce=require(_0xd343[15]);var deskjs=require(_0xd343[16]);var toCsv=require(_0xd343[9]);var querystring=require(_0xd343[17]);var Papa=require(_0xd343[18]);var qs=require(_0xd343[19]);var logger=require(_0xd343[21])(_0xd343[20]);var utils=require(_0xd343[22]);var config=require(_0xd343[23]);var db=require(_0xd343[25])[_0xd343[24]];function respondWithStatusCode(_0x7972x1a,_0x7972x1b){_0x7972x1b= _0x7972x1b|| 204;return function(_0x7972x1c){if(_0x7972x1c){return _0x7972x1a[_0xd343[26]](_0x7972x1b)};return _0x7972x1a[_0xd343[28]](_0x7972x1b)[_0xd343[27]]()}}function respondWithResult(_0x7972x1a,_0x7972x1b){_0x7972x1b= _0x7972x1b|| 200;return function(_0x7972x1c){if(_0x7972x1c){return _0x7972x1a[_0xd343[28]](_0x7972x1b)[_0xd343[29]](_0x7972x1c)}}}function respondWithFilteredResult(_0x7972x1a,_0x7972x1f){return function(_0x7972x1c){if(_0x7972x1c){var _0x7972x20=_0x7972x1c[_0xd343[30]],_0x7972x21=_0x7972x1f[_0xd343[31]],_0x7972x22=_0x7972x1f[_0xd343[31]]+ _0x7972x1f[_0xd343[32]],_0x7972x1b;if(_0x7972x22>= _0x7972x20){_0x7972x22= _0x7972x20;_0x7972x1b= 200}else {_0x7972x1b= 206};_0x7972x1a[_0xd343[28]](_0x7972x1b);return _0x7972x1a[_0xd343[36]](_0xd343[33],_0x7972x21+ _0xd343[34]+ _0x7972x22+ _0xd343[35]+ _0x7972x20)[_0xd343[29]](_0x7972x1c)};return null}}function patchUpdates(_0x7972x24){return function(_0x7972x1c){try{jsonpatch[_0xd343[37]](_0x7972x1c,_0x7972x24,true)}catch(err){return BPromise[_0xd343[38]](err)};return _0x7972x1c[_0xd343[39]]()}}function saveUpdates(_0x7972x26,_0x7972x1b){return function(_0x7972x1c){if(_0x7972x1c){return _0x7972x1c[_0xd343[41]](_0x7972x26)[_0xd343[40]](function(_0x7972x27){return _0x7972x27})};return null}}function removeEntity(_0x7972x1a,_0x7972x1b){return function(_0x7972x1c){if(_0x7972x1c){return _0x7972x1c[_0xd343[42]]()[_0xd343[40]](function(){_0x7972x1a[_0xd343[28]](204)[_0xd343[27]]()})}}}function handleEntityNotFound(_0x7972x1a,_0x7972x1b){return function(_0x7972x1c){if(!_0x7972x1c){_0x7972x1a[_0xd343[26]](404)};return _0x7972x1c}}function handleError(_0x7972x1a,_0x7972x1b){_0x7972x1b= _0x7972x1b|| 500;return function(_0x7972x2b){logger[_0xd343[44]](_0x7972x2b[_0xd343[43]]);if(_0x7972x2b[_0xd343[45]]){delete _0x7972x2b[_0xd343[45]]};_0x7972x1a[_0xd343[28]](_0x7972x1b)[_0xd343[46]](_0x7972x2b)}}exports[_0xd343[47]]= function(_0x7972x2c,_0x7972x1a){var _0x7972x1f={},_0x7972x2d={},_0x7972x2e={count:0,rows:[]};_0x7972x2d[_0xd343[48]]= _[_0xd343[51]](db[_0xd343[50]][_0xd343[49]]);var _0x7972x2f={dateStart:_0x7972x2c[_0xd343[53]][_0xd343[52]],dateEnd:_0x7972x2c[_0xd343[53]][_0xd343[54]]};delete _0x7972x2c[_0xd343[53]][_0xd343[52]];delete _0x7972x2c[_0xd343[53]][_0xd343[54]];_0x7972x2d[_0xd343[53]]= _[_0xd343[51]](_0x7972x2c[_0xd343[53]]);_0x7972x2d[_0xd343[55]]= _[_0xd343[56]](_0x7972x2d[_0xd343[48]],_0x7972x2d[_0xd343[53]]);_0x7972x1f[_0xd343[57]]= _[_0xd343[56]](_0x7972x2d[_0xd343[48]],qs[_0xd343[58]](_0x7972x2c[_0xd343[53]][_0xd343[58]]));_0x7972x1f[_0xd343[57]]= (_0x7972x1f[_0xd343[57]][_0xd343[59]])?_0x7972x1f[_0xd343[57]]:_0x7972x2d[_0xd343[48]];if(!_0x7972x2c[_0xd343[53]][_0xd343[61]](_0xd343[60])){_0x7972x1f[_0xd343[32]]= qs[_0xd343[32]](_0x7972x2c[_0xd343[53]][_0xd343[32]]);_0x7972x1f[_0xd343[31]]= qs[_0xd343[31]](_0x7972x2c[_0xd343[53]][_0xd343[31]])};_0x7972x1f[_0xd343[62]]= qs[_0xd343[63]](_0x7972x2c[_0xd343[53]][_0xd343[63]]);_0x7972x1f[_0xd343[64]]= qs[_0xd343[55]](_[_0xd343[65]](_0x7972x2c[_0xd343[53]],_0x7972x2d[_0xd343[55]]));if(_0x7972x2f[_0xd343[52]]){if(_0x7972x2f[_0xd343[54]]){_0x7972x2f[_0xd343[54]]= moment(_0x7972x2f[_0xd343[54]])[_0xd343[67]](1,_0xd343[66])}else {_0x7972x2f[_0xd343[54]]= moment(_0x7972x2f[_0xd343[52]])[_0xd343[67]](1,_0xd343[66])};_[_0xd343[68]](_0x7972x1f[_0xd343[64]],{createdAt:{$gte:_0x7972x2f[_0xd343[52]],$lte:_0x7972x2f[_0xd343[54]]}})};if(_0x7972x2c[_0xd343[53]][_0xd343[69]]){_0x7972x1f[_0xd343[64]]= _[_0xd343[68]](_0x7972x1f[_0xd343[64]],{$or:_[_0xd343[71]](_0x7972x1f[_0xd343[57]],function(_0x7972x30){var _0x7972x2e={};_0x7972x2e[_0x7972x30]= {$like:_0xd343[70]+ _0x7972x2c[_0xd343[53]][_0xd343[69]]+ _0xd343[70]};return _0x7972x2e})})};_0x7972x1f= _[_0xd343[68]]({},_0x7972x1f,_0x7972x2c[_0xd343[72]]);var _0x7972x31={where:_0x7972x1f[_0xd343[64]]};return db[_0xd343[50]][_0xd343[30]](_0x7972x31)[_0xd343[40]](function(_0x7972x20){_0x7972x2e[_0xd343[30]]= _0x7972x20;if(_0x7972x2c[_0xd343[53]][_0xd343[75]]){_0x7972x1f[_0xd343[76]]= [{all:true}]};return db[_0xd343[50]][_0xd343[77]](_0x7972x1f)})[_0xd343[40]](function(_0x7972x32){_0x7972x2e[_0xd343[74]]= _0x7972x32;return _0x7972x2e})[_0xd343[40]](respondWithFilteredResult(_0x7972x1a,_0x7972x1f))[_0xd343[73]](handleError(_0x7972x1a,null))};exports[_0xd343[78]]= function(_0x7972x2c,_0x7972x1a){var _0x7972x1f={raw:true,where:{id:_0x7972x2c[_0xd343[80]][_0xd343[79]]}},_0x7972x2d={};_0x7972x2d[_0xd343[48]]= _[_0xd343[51]](db[_0xd343[50]][_0xd343[49]]);_0x7972x2d[_0xd343[53]]= _[_0xd343[51]](_0x7972x2c[_0xd343[53]]);_0x7972x2d[_0xd343[55]]= _[_0xd343[56]](_0x7972x2d[_0xd343[48]],_0x7972x2d[_0xd343[53]]);_0x7972x1f[_0xd343[57]]= _[_0xd343[56]](_0x7972x2d[_0xd343[48]],qs[_0xd343[58]](_0x7972x2c[_0xd343[53]][_0xd343[58]]));_0x7972x1f[_0xd343[57]]= (_0x7972x1f[_0xd343[57]][_0xd343[59]])?_0x7972x1f[_0xd343[57]]:_0x7972x2d[_0xd343[48]];if(_0x7972x2c[_0xd343[53]][_0xd343[75]]){_0x7972x1f[_0xd343[76]]= [{all:true}]};_0x7972x1f= _[_0xd343[68]]({},_0x7972x1f,_0x7972x2c[_0xd343[72]]);return db[_0xd343[50]][_0xd343[81]](_0x7972x1f)[_0xd343[40]](handleEntityNotFound(_0x7972x1a,null))[_0xd343[40]](respondWithResult(_0x7972x1a,null))[_0xd343[73]](handleError(_0x7972x1a,null))};exports[_0xd343[82]]= function(_0x7972x2c,_0x7972x1a){return db[_0xd343[50]][_0xd343[82]](_0x7972x2c[_0xd343[83]],{})[_0xd343[40]](respondWithResult(_0x7972x1a,201))[_0xd343[73]](handleError(_0x7972x1a,null))};exports[_0xd343[41]]= function(_0x7972x2c,_0x7972x1a){if(_0x7972x2c[_0xd343[83]][_0xd343[79]]){delete _0x7972x2c[_0xd343[83]][_0xd343[79]]};return db[_0xd343[50]][_0xd343[81]]({where:{id:_0x7972x2c[_0xd343[80]][_0xd343[79]]}})[_0xd343[40]](handleEntityNotFound(_0x7972x1a,null))[_0xd343[40]](saveUpdates(_0x7972x2c[_0xd343[83]],null))[_0xd343[40]](respondWithResult(_0x7972x1a,null))[_0xd343[73]](handleError(_0x7972x1a,null))};exports[_0xd343[42]]= function(_0x7972x2c,_0x7972x1a){return db[_0xd343[50]][_0xd343[81]]({where:{id:_0x7972x2c[_0xd343[80]][_0xd343[79]]}})[_0xd343[40]](handleEntityNotFound(_0x7972x1a,null))[_0xd343[40]](removeEntity(_0x7972x1a,null))[_0xd343[73]](handleError(_0x7972x1a,null))};exports[_0xd343[84]]= function(_0x7972x2c,_0x7972x1a,_0x7972x33){var _0x7972x34;return db[_0xd343[50]][_0xd343[81]]({where:{id:_0x7972x2c[_0xd343[80]][_0xd343[79]]},attributes:[_0xd343[79],_0xd343[86]]})[_0xd343[40]](handleEntityNotFound(_0x7972x1a,null))[_0xd343[40]](function(_0x7972x1c){if(_0x7972x1c){var db=require(_0xd343[85])();db[_0xd343[87]](_0x7972x1c[_0xd343[86]]);db[_0xd343[88]]();return _0x7972x1c}})[_0xd343[40]](respondWithResult(_0x7972x1a,null))[_0xd343[73]](handleError(_0x7972x1a,null))}
\ No newline at end of file
+var _0xcc9f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x74\x65\x73\x74","\x6F\x64\x62\x63","\x64\x73\x6E","\x6F\x70\x65\x6E\x53\x79\x6E\x63","\x63\x6C\x6F\x73\x65\x53\x79\x6E\x63"];_0xcc9f[0];var jsonpatch=require(_0xcc9f[1]);var rp=require(_0xcc9f[2]);var moment=require(_0xcc9f[3]);var BPromise=require(_0xcc9f[4]);var Mustache=require(_0xcc9f[5]);var util=require(_0xcc9f[6]);var path=require(_0xcc9f[7]);var sox=require(_0xcc9f[8]);var csv=require(_0xcc9f[9]);var ejs=require(_0xcc9f[10]);var fs=require(_0xcc9f[11]);var _=require(_0xcc9f[12]);var squel=require(_0xcc9f[13]);var crypto=require(_0xcc9f[14]);var jsforce=require(_0xcc9f[15]);var deskjs=require(_0xcc9f[16]);var toCsv=require(_0xcc9f[9]);var querystring=require(_0xcc9f[17]);var Papa=require(_0xcc9f[18]);var qs=require(_0xcc9f[19]);var logger=require(_0xcc9f[21])(_0xcc9f[20]);var utils=require(_0xcc9f[22]);var config=require(_0xcc9f[23]);var db=require(_0xcc9f[25])[_0xcc9f[24]];function respondWithStatusCode(_0xbb22x1a,_0xbb22x1b){_0xbb22x1b= _0xbb22x1b|| 204;return function(_0xbb22x1c){if(_0xbb22x1c){return _0xbb22x1a[_0xcc9f[26]](_0xbb22x1b)};return _0xbb22x1a[_0xcc9f[28]](_0xbb22x1b)[_0xcc9f[27]]()}}function respondWithResult(_0xbb22x1a,_0xbb22x1b){_0xbb22x1b= _0xbb22x1b|| 200;return function(_0xbb22x1c){if(_0xbb22x1c){return _0xbb22x1a[_0xcc9f[28]](_0xbb22x1b)[_0xcc9f[29]](_0xbb22x1c)}}}function respondWithFilteredResult(_0xbb22x1a,_0xbb22x1f){return function(_0xbb22x1c){if(_0xbb22x1c){var _0xbb22x20=_0xbb22x1c[_0xcc9f[30]],_0xbb22x21=_0xbb22x1f[_0xcc9f[31]],_0xbb22x22=_0xbb22x1f[_0xcc9f[31]]+ _0xbb22x1f[_0xcc9f[32]],_0xbb22x1b;if(_0xbb22x22>= _0xbb22x20){_0xbb22x22= _0xbb22x20;_0xbb22x1b= 200}else {_0xbb22x1b= 206};_0xbb22x1a[_0xcc9f[28]](_0xbb22x1b);return _0xbb22x1a[_0xcc9f[36]](_0xcc9f[33],_0xbb22x21+ _0xcc9f[34]+ _0xbb22x22+ _0xcc9f[35]+ _0xbb22x20)[_0xcc9f[29]](_0xbb22x1c)};return null}}function patchUpdates(_0xbb22x24){return function(_0xbb22x1c){try{jsonpatch[_0xcc9f[37]](_0xbb22x1c,_0xbb22x24,true)}catch(err){return BPromise[_0xcc9f[38]](err)};return _0xbb22x1c[_0xcc9f[39]]()}}function saveUpdates(_0xbb22x26,_0xbb22x1b){return function(_0xbb22x1c){if(_0xbb22x1c){return _0xbb22x1c[_0xcc9f[41]](_0xbb22x26)[_0xcc9f[40]](function(_0xbb22x27){return _0xbb22x27})};return null}}function removeEntity(_0xbb22x1a,_0xbb22x1b){return function(_0xbb22x1c){if(_0xbb22x1c){return _0xbb22x1c[_0xcc9f[42]]()[_0xcc9f[40]](function(){_0xbb22x1a[_0xcc9f[28]](204)[_0xcc9f[27]]()})}}}function handleEntityNotFound(_0xbb22x1a,_0xbb22x1b){return function(_0xbb22x1c){if(!_0xbb22x1c){_0xbb22x1a[_0xcc9f[26]](404)};return _0xbb22x1c}}function handleError(_0xbb22x1a,_0xbb22x1b){_0xbb22x1b= _0xbb22x1b|| 500;return function(_0xbb22x2b){logger[_0xcc9f[44]](_0xbb22x2b[_0xcc9f[43]]);if(_0xbb22x2b[_0xcc9f[45]]){delete _0xbb22x2b[_0xcc9f[45]]};_0xbb22x1a[_0xcc9f[28]](_0xbb22x1b)[_0xcc9f[46]](_0xbb22x2b)}}exports[_0xcc9f[47]]= function(_0xbb22x2c,_0xbb22x1a){var _0xbb22x1f={},_0xbb22x2d={},_0xbb22x2e={count:0,rows:[]};_0xbb22x2d[_0xcc9f[48]]= _[_0xcc9f[51]](db[_0xcc9f[50]][_0xcc9f[49]]);var _0xbb22x2f={dateStart:_0xbb22x2c[_0xcc9f[53]][_0xcc9f[52]],dateEnd:_0xbb22x2c[_0xcc9f[53]][_0xcc9f[54]]};delete _0xbb22x2c[_0xcc9f[53]][_0xcc9f[52]];delete _0xbb22x2c[_0xcc9f[53]][_0xcc9f[54]];_0xbb22x2d[_0xcc9f[53]]= _[_0xcc9f[51]](_0xbb22x2c[_0xcc9f[53]]);_0xbb22x2d[_0xcc9f[55]]= _[_0xcc9f[56]](_0xbb22x2d[_0xcc9f[48]],_0xbb22x2d[_0xcc9f[53]]);_0xbb22x1f[_0xcc9f[57]]= _[_0xcc9f[56]](_0xbb22x2d[_0xcc9f[48]],qs[_0xcc9f[58]](_0xbb22x2c[_0xcc9f[53]][_0xcc9f[58]]));_0xbb22x1f[_0xcc9f[57]]= (_0xbb22x1f[_0xcc9f[57]][_0xcc9f[59]])?_0xbb22x1f[_0xcc9f[57]]:_0xbb22x2d[_0xcc9f[48]];if(!_0xbb22x2c[_0xcc9f[53]][_0xcc9f[61]](_0xcc9f[60])){_0xbb22x1f[_0xcc9f[32]]= qs[_0xcc9f[32]](_0xbb22x2c[_0xcc9f[53]][_0xcc9f[32]]);_0xbb22x1f[_0xcc9f[31]]= qs[_0xcc9f[31]](_0xbb22x2c[_0xcc9f[53]][_0xcc9f[31]])};_0xbb22x1f[_0xcc9f[62]]= qs[_0xcc9f[63]](_0xbb22x2c[_0xcc9f[53]][_0xcc9f[63]]);_0xbb22x1f[_0xcc9f[64]]= qs[_0xcc9f[55]](_[_0xcc9f[65]](_0xbb22x2c[_0xcc9f[53]],_0xbb22x2d[_0xcc9f[55]]));if(_0xbb22x2f[_0xcc9f[52]]){if(_0xbb22x2f[_0xcc9f[54]]){_0xbb22x2f[_0xcc9f[54]]= moment(_0xbb22x2f[_0xcc9f[54]])[_0xcc9f[67]](1,_0xcc9f[66])}else {_0xbb22x2f[_0xcc9f[54]]= moment(_0xbb22x2f[_0xcc9f[52]])[_0xcc9f[67]](1,_0xcc9f[66])};_[_0xcc9f[68]](_0xbb22x1f[_0xcc9f[64]],{createdAt:{$gte:_0xbb22x2f[_0xcc9f[52]],$lte:_0xbb22x2f[_0xcc9f[54]]}})};if(_0xbb22x2c[_0xcc9f[53]][_0xcc9f[69]]){_0xbb22x1f[_0xcc9f[64]]= _[_0xcc9f[68]](_0xbb22x1f[_0xcc9f[64]],{$or:_[_0xcc9f[71]](_0xbb22x1f[_0xcc9f[57]],function(_0xbb22x30){var _0xbb22x2e={};_0xbb22x2e[_0xbb22x30]= {$like:_0xcc9f[70]+ _0xbb22x2c[_0xcc9f[53]][_0xcc9f[69]]+ _0xcc9f[70]};return _0xbb22x2e})})};_0xbb22x1f= _[_0xcc9f[68]]({},_0xbb22x1f,_0xbb22x2c[_0xcc9f[72]]);var _0xbb22x31={where:_0xbb22x1f[_0xcc9f[64]]};return db[_0xcc9f[50]][_0xcc9f[30]](_0xbb22x31)[_0xcc9f[40]](function(_0xbb22x20){_0xbb22x2e[_0xcc9f[30]]= _0xbb22x20;if(_0xbb22x2c[_0xcc9f[53]][_0xcc9f[75]]){_0xbb22x1f[_0xcc9f[76]]= [{all:true}]};return db[_0xcc9f[50]][_0xcc9f[77]](_0xbb22x1f)})[_0xcc9f[40]](function(_0xbb22x32){_0xbb22x2e[_0xcc9f[74]]= _0xbb22x32;return _0xbb22x2e})[_0xcc9f[40]](respondWithFilteredResult(_0xbb22x1a,_0xbb22x1f))[_0xcc9f[73]](handleError(_0xbb22x1a,null))};exports[_0xcc9f[78]]= function(_0xbb22x2c,_0xbb22x1a){var _0xbb22x1f={raw:true,where:{id:_0xbb22x2c[_0xcc9f[80]][_0xcc9f[79]]}},_0xbb22x2d={};_0xbb22x2d[_0xcc9f[48]]= _[_0xcc9f[51]](db[_0xcc9f[50]][_0xcc9f[49]]);_0xbb22x2d[_0xcc9f[53]]= _[_0xcc9f[51]](_0xbb22x2c[_0xcc9f[53]]);_0xbb22x2d[_0xcc9f[55]]= _[_0xcc9f[56]](_0xbb22x2d[_0xcc9f[48]],_0xbb22x2d[_0xcc9f[53]]);_0xbb22x1f[_0xcc9f[57]]= _[_0xcc9f[56]](_0xbb22x2d[_0xcc9f[48]],qs[_0xcc9f[58]](_0xbb22x2c[_0xcc9f[53]][_0xcc9f[58]]));_0xbb22x1f[_0xcc9f[57]]= (_0xbb22x1f[_0xcc9f[57]][_0xcc9f[59]])?_0xbb22x1f[_0xcc9f[57]]:_0xbb22x2d[_0xcc9f[48]];if(_0xbb22x2c[_0xcc9f[53]][_0xcc9f[75]]){_0xbb22x1f[_0xcc9f[76]]= [{all:true}]};_0xbb22x1f= _[_0xcc9f[68]]({},_0xbb22x1f,_0xbb22x2c[_0xcc9f[72]]);return db[_0xcc9f[50]][_0xcc9f[81]](_0xbb22x1f)[_0xcc9f[40]](handleEntityNotFound(_0xbb22x1a,null))[_0xcc9f[40]](respondWithResult(_0xbb22x1a,null))[_0xcc9f[73]](handleError(_0xbb22x1a,null))};exports[_0xcc9f[82]]= function(_0xbb22x2c,_0xbb22x1a){return db[_0xcc9f[50]][_0xcc9f[82]](_0xbb22x2c[_0xcc9f[83]],{})[_0xcc9f[40]](respondWithResult(_0xbb22x1a,201))[_0xcc9f[73]](handleError(_0xbb22x1a,null))};exports[_0xcc9f[41]]= function(_0xbb22x2c,_0xbb22x1a){if(_0xbb22x2c[_0xcc9f[83]][_0xcc9f[79]]){delete _0xbb22x2c[_0xcc9f[83]][_0xcc9f[79]]};return db[_0xcc9f[50]][_0xcc9f[81]]({where:{id:_0xbb22x2c[_0xcc9f[80]][_0xcc9f[79]]}})[_0xcc9f[40]](handleEntityNotFound(_0xbb22x1a,null))[_0xcc9f[40]](saveUpdates(_0xbb22x2c[_0xcc9f[83]],null))[_0xcc9f[40]](respondWithResult(_0xbb22x1a,null))[_0xcc9f[73]](handleError(_0xbb22x1a,null))};exports[_0xcc9f[42]]= function(_0xbb22x2c,_0xbb22x1a){return db[_0xcc9f[50]][_0xcc9f[81]]({where:{id:_0xbb22x2c[_0xcc9f[80]][_0xcc9f[79]]}})[_0xcc9f[40]](handleEntityNotFound(_0xbb22x1a,null))[_0xcc9f[40]](removeEntity(_0xbb22x1a,null))[_0xcc9f[73]](handleError(_0xbb22x1a,null))};exports[_0xcc9f[84]]= function(_0xbb22x2c,_0xbb22x1a,_0xbb22x33){var _0xbb22x34;return db[_0xcc9f[50]][_0xcc9f[81]]({where:{id:_0xbb22x2c[_0xcc9f[80]][_0xcc9f[79]]},attributes:[_0xcc9f[79],_0xcc9f[86]]})[_0xcc9f[40]](handleEntityNotFound(_0xbb22x1a,null))[_0xcc9f[40]](function(_0xbb22x1c){if(_0xbb22x1c){var db=require(_0xcc9f[85])();db[_0xcc9f[87]](_0xbb22x1c[_0xcc9f[86]]);db[_0xcc9f[88]]();return _0xbb22x1c}})[_0xcc9f[40]](respondWithResult(_0xbb22x1a,null))[_0xcc9f[73]](handleError(_0xbb22x1a,null))}
\ No newline at end of file
index f45e64a..8722102 100644 (file)
@@ -1 +1 @@
-var _0x4b1f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x71\x75\x61\x72\x65\x4F\x64\x62\x63\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63","\x64\x65\x66\x69\x6E\x65"];_0x4b1f[0];var _=require(_0x4b1f[1]);var util=require(_0x4b1f[2]);var logger=require(_0x4b1f[4])(_0x4b1f[3]);var moment=require(_0x4b1f[5]);var BPromise=require(_0x4b1f[6]);var rp=require(_0x4b1f[7]);var attributes=require(_0x4b1f[8]);module[_0x4b1f[9]]= function(_0x450fx8,_0x450fx9){return _0x450fx8[_0x4b1f[12]](_0x4b1f[10],attributes,{tableName:_0x4b1f[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x8a23=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x71\x75\x61\x72\x65\x4F\x64\x62\x63\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63","\x64\x65\x66\x69\x6E\x65"];_0x8a23[0];var _=require(_0x8a23[1]);var util=require(_0x8a23[2]);var logger=require(_0x8a23[4])(_0x8a23[3]);var moment=require(_0x8a23[5]);var BPromise=require(_0x8a23[6]);var rp=require(_0x8a23[7]);var attributes=require(_0x8a23[8]);module[_0x8a23[9]]= function(_0x3443x8,_0x3443x9){return _0x3443x8[_0x8a23[12]](_0x8a23[10],attributes,{tableName:_0x8a23[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 38b71fc..2963451 100644 (file)
@@ -1 +1 @@
-var _0x2f98=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x53\x68\x6F\x77\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63"];_0x2f98[0];var _=require(_0x2f98[1]);var util=require(_0x2f98[2]);var moment=require(_0x2f98[3]);var BPromise=require(_0x2f98[4]);var rs=require(_0x2f98[5]);var fs=require(_0x2f98[6]);var db=require(_0x2f98[8])[_0x2f98[7]];var utils=require(_0x2f98[9]);var logger=require(_0x2f98[11])(_0x2f98[10]);var config=require(_0x2f98[12]);var jayson=require(_0x2f98[13]);var client=jayson[_0x2f98[15]][_0x2f98[14]]({port:9002});function respondWithRpcPromise(_0x37cexe,_0x37cexf,_0x37cex10){return  new BPromise(function(_0x37cex11,_0x37cex12){return client[_0x2f98[28]](_0x37cexe,_0x37cex10)[_0x2f98[27]](function(_0x37cex14){logger[_0x2f98[20]](_0x2f98[16],_0x37cexf,_0x2f98[19]);logger[_0x2f98[23]](_0x2f98[21],_0x37cexf,_0x2f98[19],JSON[_0x2f98[22]](_0x37cex14));if(_0x37cex14[_0x2f98[17]]){if(_0x37cex14[_0x2f98[17]][_0x2f98[24]]=== 500){logger[_0x2f98[17]](_0x2f98[16],_0x37cexf,_0x37cex14[_0x2f98[17]][_0x2f98[25]]);return _0x37cex12(_0x37cex14[_0x2f98[17]][_0x2f98[25]])};logger[_0x2f98[17]](_0x2f98[16],_0x37cexf,_0x37cex14[_0x2f98[17]][_0x2f98[25]]);return _0x37cex11(_0x37cex14[_0x2f98[17]][_0x2f98[25]])}else {logger[_0x2f98[20]](_0x2f98[16],_0x37cexf,_0x2f98[19]);_0x37cex11(_0x37cex14[_0x2f98[26]][_0x2f98[25]])}})[_0x2f98[18]](function(_0x37cex13){logger[_0x2f98[17]](_0x2f98[16],_0x37cexf,_0x37cex13);_0x37cex12(_0x37cex13)})})}exports[_0x2f98[29]]= function(_0x37cex10){var _0x37cex15=this;return  new Promise(function(_0x37cex11,_0x37cex12){return db[_0x2f98[39]][_0x2f98[38]]({raw:_0x37cex10[_0x2f98[30]]?(_0x37cex10[_0x2f98[30]][_0x2f98[31]]=== undefined)?true:false:true,where:_0x37cex10[_0x2f98[30]]?_0x37cex10[_0x2f98[30]][_0x2f98[32]]|| null:null,attributes:_0x37cex10[_0x2f98[30]]?_0x37cex10[_0x2f98[30]][_0x2f98[33]]|| null:null,include:_0x37cex10[_0x2f98[30]]?(_0x37cex10[_0x2f98[30]][_0x2f98[34]]?_[_0x2f98[37]](_0x37cex10[_0x2f98[30]][_0x2f98[34]],function(_0x37cex16){return {model:db[_0x37cex16[_0x2f98[35]]],as:_0x37cex16[_0x2f98[36]],attributes:_0x37cex16[_0x2f98[33]],include:_0x37cex16[_0x2f98[34]]?_[_0x2f98[37]](_0x37cex16[_0x2f98[34]],function(_0x37cex17){return {model:db[_0x37cex17[_0x2f98[35]]],as:_0x37cex17[_0x2f98[36]],attributes:_0x37cex17[_0x2f98[33]],include:_0x37cex17[_0x2f98[34]]?_[_0x2f98[37]](_0x37cex17[_0x2f98[34]],function(_0x37cex18){return {model:db[_0x37cex18[_0x2f98[35]]],as:_0x37cex18[_0x2f98[36]],attributes:_0x37cex18[_0x2f98[33]]}}):[]}}):[]}}):[]):[]})[_0x2f98[27]](function(_0x37cex14){logger[_0x2f98[20]](_0x2f98[29],_0x37cex10);logger[_0x2f98[23]](_0x2f98[29],_0x37cex10,JSON[_0x2f98[22]](_0x37cex14));_0x37cex11(_0x37cex14)})[_0x2f98[18]](function(_0x37cex13){logger[_0x2f98[17]](_0x2f98[29],_0x37cex13[_0x2f98[25]],_0x37cex10);_0x37cex12(_0x37cex15[_0x2f98[17]](500,_0x37cex13[_0x2f98[25]]))})})}
\ No newline at end of file
+var _0x8059=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x53\x68\x6F\x77\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63"];_0x8059[0];var _=require(_0x8059[1]);var util=require(_0x8059[2]);var moment=require(_0x8059[3]);var BPromise=require(_0x8059[4]);var rs=require(_0x8059[5]);var fs=require(_0x8059[6]);var db=require(_0x8059[8])[_0x8059[7]];var utils=require(_0x8059[9]);var logger=require(_0x8059[11])(_0x8059[10]);var config=require(_0x8059[12]);var jayson=require(_0x8059[13]);var client=jayson[_0x8059[15]][_0x8059[14]]({port:9002});function respondWithRpcPromise(_0xeb69xe,_0xeb69xf,_0xeb69x10){return  new BPromise(function(_0xeb69x11,_0xeb69x12){return client[_0x8059[28]](_0xeb69xe,_0xeb69x10)[_0x8059[27]](function(_0xeb69x14){logger[_0x8059[20]](_0x8059[16],_0xeb69xf,_0x8059[19]);logger[_0x8059[23]](_0x8059[21],_0xeb69xf,_0x8059[19],JSON[_0x8059[22]](_0xeb69x14));if(_0xeb69x14[_0x8059[17]]){if(_0xeb69x14[_0x8059[17]][_0x8059[24]]=== 500){logger[_0x8059[17]](_0x8059[16],_0xeb69xf,_0xeb69x14[_0x8059[17]][_0x8059[25]]);return _0xeb69x12(_0xeb69x14[_0x8059[17]][_0x8059[25]])};logger[_0x8059[17]](_0x8059[16],_0xeb69xf,_0xeb69x14[_0x8059[17]][_0x8059[25]]);return _0xeb69x11(_0xeb69x14[_0x8059[17]][_0x8059[25]])}else {logger[_0x8059[20]](_0x8059[16],_0xeb69xf,_0x8059[19]);_0xeb69x11(_0xeb69x14[_0x8059[26]][_0x8059[25]])}})[_0x8059[18]](function(_0xeb69x13){logger[_0x8059[17]](_0x8059[16],_0xeb69xf,_0xeb69x13);_0xeb69x12(_0xeb69x13)})})}exports[_0x8059[29]]= function(_0xeb69x10){var _0xeb69x15=this;return  new Promise(function(_0xeb69x11,_0xeb69x12){return db[_0x8059[39]][_0x8059[38]]({raw:_0xeb69x10[_0x8059[30]]?(_0xeb69x10[_0x8059[30]][_0x8059[31]]=== undefined)?true:false:true,where:_0xeb69x10[_0x8059[30]]?_0xeb69x10[_0x8059[30]][_0x8059[32]]|| null:null,attributes:_0xeb69x10[_0x8059[30]]?_0xeb69x10[_0x8059[30]][_0x8059[33]]|| null:null,include:_0xeb69x10[_0x8059[30]]?(_0xeb69x10[_0x8059[30]][_0x8059[34]]?_[_0x8059[37]](_0xeb69x10[_0x8059[30]][_0x8059[34]],function(_0xeb69x16){return {model:db[_0xeb69x16[_0x8059[35]]],as:_0xeb69x16[_0x8059[36]],attributes:_0xeb69x16[_0x8059[33]],include:_0xeb69x16[_0x8059[34]]?_[_0x8059[37]](_0xeb69x16[_0x8059[34]],function(_0xeb69x17){return {model:db[_0xeb69x17[_0x8059[35]]],as:_0xeb69x17[_0x8059[36]],attributes:_0xeb69x17[_0x8059[33]],include:_0xeb69x17[_0x8059[34]]?_[_0x8059[37]](_0xeb69x17[_0x8059[34]],function(_0xeb69x18){return {model:db[_0xeb69x18[_0x8059[35]]],as:_0xeb69x18[_0x8059[36]],attributes:_0xeb69x18[_0x8059[33]]}}):[]}}):[]}}):[]):[]})[_0x8059[27]](function(_0xeb69x14){logger[_0x8059[20]](_0x8059[29],_0xeb69x10);logger[_0x8059[23]](_0x8059[29],_0xeb69x10,JSON[_0x8059[22]](_0xeb69x14));_0xeb69x11(_0xeb69x14)})[_0x8059[18]](function(_0xeb69x13){logger[_0x8059[17]](_0x8059[29],_0xeb69x13[_0x8059[25]],_0xeb69x10);_0xeb69x12(_0xeb69x15[_0x8059[17]](500,_0xeb69x13[_0x8059[25]]))})})}
\ No newline at end of file
index de6ef1e..d0ec457 100644 (file)
@@ -1 +1 @@
-var _0xe86c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xe86c[0];var multer=require(_0xe86c[1]);var util=require(_0xe86c[2]);var path=require(_0xe86c[3]);var express=require(_0xe86c[4]);var router=express.Router();var auth=require(_0xe86c[5]);var interaction=require(_0xe86c[6]);var config=require(_0xe86c[7]);var controller=require(_0xe86c[8]);router[_0xe86c[12]](_0xe86c[9],auth[_0xe86c[10]](),controller[_0xe86c[11]]);router[_0xe86c[12]](_0xe86c[13],auth[_0xe86c[10]](),controller[_0xe86c[14]]);router[_0xe86c[16]](_0xe86c[9],auth[_0xe86c[10]](),controller[_0xe86c[15]]);router[_0xe86c[18]](_0xe86c[13],auth[_0xe86c[10]](),controller[_0xe86c[17]]);router[_0xe86c[20]](_0xe86c[13],auth[_0xe86c[10]](),controller[_0xe86c[19]]);module[_0xe86c[21]]= router
\ No newline at end of file
+var _0x6314=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6314[0];var multer=require(_0x6314[1]);var util=require(_0x6314[2]);var path=require(_0x6314[3]);var express=require(_0x6314[4]);var router=express.Router();var auth=require(_0x6314[5]);var interaction=require(_0x6314[6]);var config=require(_0x6314[7]);var controller=require(_0x6314[8]);router[_0x6314[12]](_0x6314[9],auth[_0x6314[10]](),controller[_0x6314[11]]);router[_0x6314[12]](_0x6314[13],auth[_0x6314[10]](),controller[_0x6314[14]]);router[_0x6314[16]](_0x6314[9],auth[_0x6314[10]](),controller[_0x6314[15]]);router[_0x6314[18]](_0x6314[13],auth[_0x6314[10]](),controller[_0x6314[17]]);router[_0x6314[20]](_0x6314[13],auth[_0x6314[10]](),controller[_0x6314[19]]);module[_0x6314[21]]= router
\ No newline at end of file
index e7b9395..b8b7d87 100644 (file)
@@ -1 +1 @@
-var _0xcec6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x54\x45\x58\x54","\x6C\x6F\x6E\x67","\x70\x72\x65\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x75\x74\x66\x38","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E"];_0xcec6[0];var Sequelize=require(_0xcec6[1]);module[_0xcec6[2]]= {name:{type:Sequelize[_0xcec6[3]],unique:_0xcec6[4],allowNull:false},description:{type:Sequelize[_0xcec6[3]]},notes:{type:Sequelize[_0xcec6[5]]},preproduction:{type:Sequelize.BLOB(_0xcec6[6]),get:function(){if(this[_0xcec6[8]](_0xcec6[7])){return this[_0xcec6[8]](_0xcec6[7]).toString(_0xcec6[9])}}},production:{type:Sequelize.BLOB(_0xcec6[6]),get:function(){if(this[_0xcec6[8]](_0xcec6[10])){return this[_0xcec6[8]](_0xcec6[10]).toString(_0xcec6[9])}}}}
\ No newline at end of file
+var _0x3d3e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x54\x45\x58\x54","\x6C\x6F\x6E\x67","\x70\x72\x65\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x75\x74\x66\x38","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E"];_0x3d3e[0];var Sequelize=require(_0x3d3e[1]);module[_0x3d3e[2]]= {name:{type:Sequelize[_0x3d3e[3]],unique:_0x3d3e[4],allowNull:false},description:{type:Sequelize[_0x3d3e[3]]},notes:{type:Sequelize[_0x3d3e[5]]},preproduction:{type:Sequelize.BLOB(_0x3d3e[6]),get:function(){if(this[_0x3d3e[8]](_0x3d3e[7])){return this[_0x3d3e[8]](_0x3d3e[7]).toString(_0x3d3e[9])}}},production:{type:Sequelize.BLOB(_0x3d3e[6]),get:function(){if(this[_0x3d3e[8]](_0x3d3e[10])){return this[_0x3d3e[8]](_0x3d3e[10]).toString(_0x3d3e[9])}}}}
\ No newline at end of file
index af5ef0b..a01e5c0 100644 (file)
@@ -1 +1 @@
-var _0x5bcf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x5bcf[0];var jsonpatch=require(_0x5bcf[1]);var rp=require(_0x5bcf[2]);var moment=require(_0x5bcf[3]);var BPromise=require(_0x5bcf[4]);var Mustache=require(_0x5bcf[5]);var util=require(_0x5bcf[6]);var path=require(_0x5bcf[7]);var sox=require(_0x5bcf[8]);var csv=require(_0x5bcf[9]);var ejs=require(_0x5bcf[10]);var fs=require(_0x5bcf[11]);var _=require(_0x5bcf[12]);var squel=require(_0x5bcf[13]);var crypto=require(_0x5bcf[14]);var jsforce=require(_0x5bcf[15]);var deskjs=require(_0x5bcf[16]);var toCsv=require(_0x5bcf[9]);var querystring=require(_0x5bcf[17]);var Papa=require(_0x5bcf[18]);var qs=require(_0x5bcf[19]);var logger=require(_0x5bcf[21])(_0x5bcf[20]);var utils=require(_0x5bcf[22]);var config=require(_0x5bcf[23]);var db=require(_0x5bcf[25])[_0x5bcf[24]];function respondWithStatusCode(_0x9bf0x1a,_0x9bf0x1b){_0x9bf0x1b= _0x9bf0x1b|| 204;return function(_0x9bf0x1c){if(_0x9bf0x1c){return _0x9bf0x1a[_0x5bcf[26]](_0x9bf0x1b)};return _0x9bf0x1a[_0x5bcf[28]](_0x9bf0x1b)[_0x5bcf[27]]()}}function respondWithResult(_0x9bf0x1a,_0x9bf0x1b){_0x9bf0x1b= _0x9bf0x1b|| 200;return function(_0x9bf0x1c){if(_0x9bf0x1c){return _0x9bf0x1a[_0x5bcf[28]](_0x9bf0x1b)[_0x5bcf[29]](_0x9bf0x1c)}}}function respondWithFilteredResult(_0x9bf0x1a,_0x9bf0x1f){return function(_0x9bf0x1c){if(_0x9bf0x1c){var _0x9bf0x20=_0x9bf0x1c[_0x5bcf[30]],_0x9bf0x21=_0x9bf0x1f[_0x5bcf[31]],_0x9bf0x22=_0x9bf0x1f[_0x5bcf[31]]+ _0x9bf0x1f[_0x5bcf[32]],_0x9bf0x1b;if(_0x9bf0x22>= _0x9bf0x20){_0x9bf0x22= _0x9bf0x20;_0x9bf0x1b= 200}else {_0x9bf0x1b= 206};_0x9bf0x1a[_0x5bcf[28]](_0x9bf0x1b);return _0x9bf0x1a[_0x5bcf[36]](_0x5bcf[33],_0x9bf0x21+ _0x5bcf[34]+ _0x9bf0x22+ _0x5bcf[35]+ _0x9bf0x20)[_0x5bcf[29]](_0x9bf0x1c)};return null}}function patchUpdates(_0x9bf0x24){return function(_0x9bf0x1c){try{jsonpatch[_0x5bcf[37]](_0x9bf0x1c,_0x9bf0x24,true)}catch(err){return BPromise[_0x5bcf[38]](err)};return _0x9bf0x1c[_0x5bcf[39]]()}}function saveUpdates(_0x9bf0x26,_0x9bf0x1b){return function(_0x9bf0x1c){if(_0x9bf0x1c){return _0x9bf0x1c[_0x5bcf[41]](_0x9bf0x26)[_0x5bcf[40]](function(_0x9bf0x27){return _0x9bf0x27})};return null}}function removeEntity(_0x9bf0x1a,_0x9bf0x1b){return function(_0x9bf0x1c){if(_0x9bf0x1c){return _0x9bf0x1c[_0x5bcf[42]]()[_0x5bcf[40]](function(){_0x9bf0x1a[_0x5bcf[28]](204)[_0x5bcf[27]]()})}}}function handleEntityNotFound(_0x9bf0x1a,_0x9bf0x1b){return function(_0x9bf0x1c){if(!_0x9bf0x1c){_0x9bf0x1a[_0x5bcf[26]](404)};return _0x9bf0x1c}}function handleError(_0x9bf0x1a,_0x9bf0x1b){_0x9bf0x1b= _0x9bf0x1b|| 500;return function(_0x9bf0x2b){logger[_0x5bcf[44]](_0x9bf0x2b[_0x5bcf[43]]);if(_0x9bf0x2b[_0x5bcf[45]]){delete _0x9bf0x2b[_0x5bcf[45]]};_0x9bf0x1a[_0x5bcf[28]](_0x9bf0x1b)[_0x5bcf[46]](_0x9bf0x2b)}}exports[_0x5bcf[47]]= function(_0x9bf0x2c,_0x9bf0x1a){var _0x9bf0x1f={},_0x9bf0x2d={},_0x9bf0x2e={count:0,rows:[]};_0x9bf0x2d[_0x5bcf[48]]= _[_0x5bcf[51]](db[_0x5bcf[50]][_0x5bcf[49]]);var _0x9bf0x2f={dateStart:_0x9bf0x2c[_0x5bcf[53]][_0x5bcf[52]],dateEnd:_0x9bf0x2c[_0x5bcf[53]][_0x5bcf[54]]};delete _0x9bf0x2c[_0x5bcf[53]][_0x5bcf[52]];delete _0x9bf0x2c[_0x5bcf[53]][_0x5bcf[54]];_0x9bf0x2d[_0x5bcf[53]]= _[_0x5bcf[51]](_0x9bf0x2c[_0x5bcf[53]]);_0x9bf0x2d[_0x5bcf[55]]= _[_0x5bcf[56]](_0x9bf0x2d[_0x5bcf[48]],_0x9bf0x2d[_0x5bcf[53]]);_0x9bf0x1f[_0x5bcf[57]]= _[_0x5bcf[56]](_0x9bf0x2d[_0x5bcf[48]],qs[_0x5bcf[58]](_0x9bf0x2c[_0x5bcf[53]][_0x5bcf[58]]));_0x9bf0x1f[_0x5bcf[57]]= (_0x9bf0x1f[_0x5bcf[57]][_0x5bcf[59]])?_0x9bf0x1f[_0x5bcf[57]]:_0x9bf0x2d[_0x5bcf[48]];if(!_0x9bf0x2c[_0x5bcf[53]][_0x5bcf[61]](_0x5bcf[60])){_0x9bf0x1f[_0x5bcf[32]]= qs[_0x5bcf[32]](_0x9bf0x2c[_0x5bcf[53]][_0x5bcf[32]]);_0x9bf0x1f[_0x5bcf[31]]= qs[_0x5bcf[31]](_0x9bf0x2c[_0x5bcf[53]][_0x5bcf[31]])};_0x9bf0x1f[_0x5bcf[62]]= qs[_0x5bcf[63]](_0x9bf0x2c[_0x5bcf[53]][_0x5bcf[63]]);_0x9bf0x1f[_0x5bcf[64]]= qs[_0x5bcf[55]](_[_0x5bcf[65]](_0x9bf0x2c[_0x5bcf[53]],_0x9bf0x2d[_0x5bcf[55]]));if(_0x9bf0x2f[_0x5bcf[52]]){if(_0x9bf0x2f[_0x5bcf[54]]){_0x9bf0x2f[_0x5bcf[54]]= moment(_0x9bf0x2f[_0x5bcf[54]])[_0x5bcf[67]](1,_0x5bcf[66])}else {_0x9bf0x2f[_0x5bcf[54]]= moment(_0x9bf0x2f[_0x5bcf[52]])[_0x5bcf[67]](1,_0x5bcf[66])};_[_0x5bcf[68]](_0x9bf0x1f[_0x5bcf[64]],{createdAt:{$gte:_0x9bf0x2f[_0x5bcf[52]],$lte:_0x9bf0x2f[_0x5bcf[54]]}})};if(_0x9bf0x2c[_0x5bcf[53]][_0x5bcf[69]]){_0x9bf0x1f[_0x5bcf[64]]= _[_0x5bcf[68]](_0x9bf0x1f[_0x5bcf[64]],{$or:_[_0x5bcf[71]](_0x9bf0x1f[_0x5bcf[57]],function(_0x9bf0x30){var _0x9bf0x2e={};_0x9bf0x2e[_0x9bf0x30]= {$like:_0x5bcf[70]+ _0x9bf0x2c[_0x5bcf[53]][_0x5bcf[69]]+ _0x5bcf[70]};return _0x9bf0x2e})})};_0x9bf0x1f= _[_0x5bcf[68]]({},_0x9bf0x1f,_0x9bf0x2c[_0x5bcf[72]]);var _0x9bf0x31={where:_0x9bf0x1f[_0x5bcf[64]]};return db[_0x5bcf[50]][_0x5bcf[30]](_0x9bf0x31)[_0x5bcf[40]](function(_0x9bf0x20){_0x9bf0x2e[_0x5bcf[30]]= _0x9bf0x20;if(_0x9bf0x2c[_0x5bcf[53]][_0x5bcf[75]]){_0x9bf0x1f[_0x5bcf[76]]= [{all:true}]};return db[_0x5bcf[50]][_0x5bcf[77]](_0x9bf0x1f)})[_0x5bcf[40]](function(_0x9bf0x32){_0x9bf0x2e[_0x5bcf[74]]= _0x9bf0x32;return _0x9bf0x2e})[_0x5bcf[40]](respondWithFilteredResult(_0x9bf0x1a,_0x9bf0x1f))[_0x5bcf[73]](handleError(_0x9bf0x1a,null))};exports[_0x5bcf[78]]= function(_0x9bf0x2c,_0x9bf0x1a){var _0x9bf0x1f={raw:false,where:{id:_0x9bf0x2c[_0x5bcf[80]][_0x5bcf[79]]}},_0x9bf0x2d={};_0x9bf0x2d[_0x5bcf[48]]= _[_0x5bcf[51]](db[_0x5bcf[50]][_0x5bcf[49]]);_0x9bf0x2d[_0x5bcf[53]]= _[_0x5bcf[51]](_0x9bf0x2c[_0x5bcf[53]]);_0x9bf0x2d[_0x5bcf[55]]= _[_0x5bcf[56]](_0x9bf0x2d[_0x5bcf[48]],_0x9bf0x2d[_0x5bcf[53]]);_0x9bf0x1f[_0x5bcf[57]]= _[_0x5bcf[56]](_0x9bf0x2d[_0x5bcf[48]],qs[_0x5bcf[58]](_0x9bf0x2c[_0x5bcf[53]][_0x5bcf[58]]));_0x9bf0x1f[_0x5bcf[57]]= (_0x9bf0x1f[_0x5bcf[57]][_0x5bcf[59]])?_0x9bf0x1f[_0x5bcf[57]]:_0x9bf0x2d[_0x5bcf[48]];if(_0x9bf0x2c[_0x5bcf[53]][_0x5bcf[75]]){_0x9bf0x1f[_0x5bcf[76]]= [{all:true}]};_0x9bf0x1f= _[_0x5bcf[68]]({},_0x9bf0x1f,_0x9bf0x2c[_0x5bcf[72]]);return db[_0x5bcf[50]][_0x5bcf[81]](_0x9bf0x1f)[_0x5bcf[40]](handleEntityNotFound(_0x9bf0x1a,null))[_0x5bcf[40]](respondWithResult(_0x9bf0x1a,null))[_0x5bcf[73]](handleError(_0x9bf0x1a,null))};exports[_0x5bcf[82]]= function(_0x9bf0x2c,_0x9bf0x1a){return db[_0x5bcf[50]][_0x5bcf[82]](_0x9bf0x2c[_0x5bcf[83]],{})[_0x5bcf[40]](respondWithResult(_0x9bf0x1a,201))[_0x5bcf[73]](handleError(_0x9bf0x1a,null))};exports[_0x5bcf[41]]= function(_0x9bf0x2c,_0x9bf0x1a){if(_0x9bf0x2c[_0x5bcf[83]][_0x5bcf[79]]){delete _0x9bf0x2c[_0x5bcf[83]][_0x5bcf[79]]};return db[_0x5bcf[50]][_0x5bcf[81]]({where:{id:_0x9bf0x2c[_0x5bcf[80]][_0x5bcf[79]]}})[_0x5bcf[40]](handleEntityNotFound(_0x9bf0x1a,null))[_0x5bcf[40]](saveUpdates(_0x9bf0x2c[_0x5bcf[83]],null))[_0x5bcf[40]](respondWithResult(_0x9bf0x1a,null))[_0x5bcf[73]](handleError(_0x9bf0x1a,null))};exports[_0x5bcf[42]]= function(_0x9bf0x2c,_0x9bf0x1a){return db[_0x5bcf[50]][_0x5bcf[81]]({where:{id:_0x9bf0x2c[_0x5bcf[80]][_0x5bcf[79]]}})[_0x5bcf[40]](handleEntityNotFound(_0x9bf0x1a,null))[_0x5bcf[40]](removeEntity(_0x9bf0x1a,null))[_0x5bcf[73]](handleError(_0x9bf0x1a,null))}
\ No newline at end of file
+var _0x88ab=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x88ab[0];var jsonpatch=require(_0x88ab[1]);var rp=require(_0x88ab[2]);var moment=require(_0x88ab[3]);var BPromise=require(_0x88ab[4]);var Mustache=require(_0x88ab[5]);var util=require(_0x88ab[6]);var path=require(_0x88ab[7]);var sox=require(_0x88ab[8]);var csv=require(_0x88ab[9]);var ejs=require(_0x88ab[10]);var fs=require(_0x88ab[11]);var _=require(_0x88ab[12]);var squel=require(_0x88ab[13]);var crypto=require(_0x88ab[14]);var jsforce=require(_0x88ab[15]);var deskjs=require(_0x88ab[16]);var toCsv=require(_0x88ab[9]);var querystring=require(_0x88ab[17]);var Papa=require(_0x88ab[18]);var qs=require(_0x88ab[19]);var logger=require(_0x88ab[21])(_0x88ab[20]);var utils=require(_0x88ab[22]);var config=require(_0x88ab[23]);var db=require(_0x88ab[25])[_0x88ab[24]];function respondWithStatusCode(_0x4a72x1a,_0x4a72x1b){_0x4a72x1b= _0x4a72x1b|| 204;return function(_0x4a72x1c){if(_0x4a72x1c){return _0x4a72x1a[_0x88ab[26]](_0x4a72x1b)};return _0x4a72x1a[_0x88ab[28]](_0x4a72x1b)[_0x88ab[27]]()}}function respondWithResult(_0x4a72x1a,_0x4a72x1b){_0x4a72x1b= _0x4a72x1b|| 200;return function(_0x4a72x1c){if(_0x4a72x1c){return _0x4a72x1a[_0x88ab[28]](_0x4a72x1b)[_0x88ab[29]](_0x4a72x1c)}}}function respondWithFilteredResult(_0x4a72x1a,_0x4a72x1f){return function(_0x4a72x1c){if(_0x4a72x1c){var _0x4a72x20=_0x4a72x1c[_0x88ab[30]],_0x4a72x21=_0x4a72x1f[_0x88ab[31]],_0x4a72x22=_0x4a72x1f[_0x88ab[31]]+ _0x4a72x1f[_0x88ab[32]],_0x4a72x1b;if(_0x4a72x22>= _0x4a72x20){_0x4a72x22= _0x4a72x20;_0x4a72x1b= 200}else {_0x4a72x1b= 206};_0x4a72x1a[_0x88ab[28]](_0x4a72x1b);return _0x4a72x1a[_0x88ab[36]](_0x88ab[33],_0x4a72x21+ _0x88ab[34]+ _0x4a72x22+ _0x88ab[35]+ _0x4a72x20)[_0x88ab[29]](_0x4a72x1c)};return null}}function patchUpdates(_0x4a72x24){return function(_0x4a72x1c){try{jsonpatch[_0x88ab[37]](_0x4a72x1c,_0x4a72x24,true)}catch(err){return BPromise[_0x88ab[38]](err)};return _0x4a72x1c[_0x88ab[39]]()}}function saveUpdates(_0x4a72x26,_0x4a72x1b){return function(_0x4a72x1c){if(_0x4a72x1c){return _0x4a72x1c[_0x88ab[41]](_0x4a72x26)[_0x88ab[40]](function(_0x4a72x27){return _0x4a72x27})};return null}}function removeEntity(_0x4a72x1a,_0x4a72x1b){return function(_0x4a72x1c){if(_0x4a72x1c){return _0x4a72x1c[_0x88ab[42]]()[_0x88ab[40]](function(){_0x4a72x1a[_0x88ab[28]](204)[_0x88ab[27]]()})}}}function handleEntityNotFound(_0x4a72x1a,_0x4a72x1b){return function(_0x4a72x1c){if(!_0x4a72x1c){_0x4a72x1a[_0x88ab[26]](404)};return _0x4a72x1c}}function handleError(_0x4a72x1a,_0x4a72x1b){_0x4a72x1b= _0x4a72x1b|| 500;return function(_0x4a72x2b){logger[_0x88ab[44]](_0x4a72x2b[_0x88ab[43]]);if(_0x4a72x2b[_0x88ab[45]]){delete _0x4a72x2b[_0x88ab[45]]};_0x4a72x1a[_0x88ab[28]](_0x4a72x1b)[_0x88ab[46]](_0x4a72x2b)}}exports[_0x88ab[47]]= function(_0x4a72x2c,_0x4a72x1a){var _0x4a72x1f={},_0x4a72x2d={},_0x4a72x2e={count:0,rows:[]};_0x4a72x2d[_0x88ab[48]]= _[_0x88ab[51]](db[_0x88ab[50]][_0x88ab[49]]);var _0x4a72x2f={dateStart:_0x4a72x2c[_0x88ab[53]][_0x88ab[52]],dateEnd:_0x4a72x2c[_0x88ab[53]][_0x88ab[54]]};delete _0x4a72x2c[_0x88ab[53]][_0x88ab[52]];delete _0x4a72x2c[_0x88ab[53]][_0x88ab[54]];_0x4a72x2d[_0x88ab[53]]= _[_0x88ab[51]](_0x4a72x2c[_0x88ab[53]]);_0x4a72x2d[_0x88ab[55]]= _[_0x88ab[56]](_0x4a72x2d[_0x88ab[48]],_0x4a72x2d[_0x88ab[53]]);_0x4a72x1f[_0x88ab[57]]= _[_0x88ab[56]](_0x4a72x2d[_0x88ab[48]],qs[_0x88ab[58]](_0x4a72x2c[_0x88ab[53]][_0x88ab[58]]));_0x4a72x1f[_0x88ab[57]]= (_0x4a72x1f[_0x88ab[57]][_0x88ab[59]])?_0x4a72x1f[_0x88ab[57]]:_0x4a72x2d[_0x88ab[48]];if(!_0x4a72x2c[_0x88ab[53]][_0x88ab[61]](_0x88ab[60])){_0x4a72x1f[_0x88ab[32]]= qs[_0x88ab[32]](_0x4a72x2c[_0x88ab[53]][_0x88ab[32]]);_0x4a72x1f[_0x88ab[31]]= qs[_0x88ab[31]](_0x4a72x2c[_0x88ab[53]][_0x88ab[31]])};_0x4a72x1f[_0x88ab[62]]= qs[_0x88ab[63]](_0x4a72x2c[_0x88ab[53]][_0x88ab[63]]);_0x4a72x1f[_0x88ab[64]]= qs[_0x88ab[55]](_[_0x88ab[65]](_0x4a72x2c[_0x88ab[53]],_0x4a72x2d[_0x88ab[55]]));if(_0x4a72x2f[_0x88ab[52]]){if(_0x4a72x2f[_0x88ab[54]]){_0x4a72x2f[_0x88ab[54]]= moment(_0x4a72x2f[_0x88ab[54]])[_0x88ab[67]](1,_0x88ab[66])}else {_0x4a72x2f[_0x88ab[54]]= moment(_0x4a72x2f[_0x88ab[52]])[_0x88ab[67]](1,_0x88ab[66])};_[_0x88ab[68]](_0x4a72x1f[_0x88ab[64]],{createdAt:{$gte:_0x4a72x2f[_0x88ab[52]],$lte:_0x4a72x2f[_0x88ab[54]]}})};if(_0x4a72x2c[_0x88ab[53]][_0x88ab[69]]){_0x4a72x1f[_0x88ab[64]]= _[_0x88ab[68]](_0x4a72x1f[_0x88ab[64]],{$or:_[_0x88ab[71]](_0x4a72x1f[_0x88ab[57]],function(_0x4a72x30){var _0x4a72x2e={};_0x4a72x2e[_0x4a72x30]= {$like:_0x88ab[70]+ _0x4a72x2c[_0x88ab[53]][_0x88ab[69]]+ _0x88ab[70]};return _0x4a72x2e})})};_0x4a72x1f= _[_0x88ab[68]]({},_0x4a72x1f,_0x4a72x2c[_0x88ab[72]]);var _0x4a72x31={where:_0x4a72x1f[_0x88ab[64]]};return db[_0x88ab[50]][_0x88ab[30]](_0x4a72x31)[_0x88ab[40]](function(_0x4a72x20){_0x4a72x2e[_0x88ab[30]]= _0x4a72x20;if(_0x4a72x2c[_0x88ab[53]][_0x88ab[75]]){_0x4a72x1f[_0x88ab[76]]= [{all:true}]};return db[_0x88ab[50]][_0x88ab[77]](_0x4a72x1f)})[_0x88ab[40]](function(_0x4a72x32){_0x4a72x2e[_0x88ab[74]]= _0x4a72x32;return _0x4a72x2e})[_0x88ab[40]](respondWithFilteredResult(_0x4a72x1a,_0x4a72x1f))[_0x88ab[73]](handleError(_0x4a72x1a,null))};exports[_0x88ab[78]]= function(_0x4a72x2c,_0x4a72x1a){var _0x4a72x1f={raw:false,where:{id:_0x4a72x2c[_0x88ab[80]][_0x88ab[79]]}},_0x4a72x2d={};_0x4a72x2d[_0x88ab[48]]= _[_0x88ab[51]](db[_0x88ab[50]][_0x88ab[49]]);_0x4a72x2d[_0x88ab[53]]= _[_0x88ab[51]](_0x4a72x2c[_0x88ab[53]]);_0x4a72x2d[_0x88ab[55]]= _[_0x88ab[56]](_0x4a72x2d[_0x88ab[48]],_0x4a72x2d[_0x88ab[53]]);_0x4a72x1f[_0x88ab[57]]= _[_0x88ab[56]](_0x4a72x2d[_0x88ab[48]],qs[_0x88ab[58]](_0x4a72x2c[_0x88ab[53]][_0x88ab[58]]));_0x4a72x1f[_0x88ab[57]]= (_0x4a72x1f[_0x88ab[57]][_0x88ab[59]])?_0x4a72x1f[_0x88ab[57]]:_0x4a72x2d[_0x88ab[48]];if(_0x4a72x2c[_0x88ab[53]][_0x88ab[75]]){_0x4a72x1f[_0x88ab[76]]= [{all:true}]};_0x4a72x1f= _[_0x88ab[68]]({},_0x4a72x1f,_0x4a72x2c[_0x88ab[72]]);return db[_0x88ab[50]][_0x88ab[81]](_0x4a72x1f)[_0x88ab[40]](handleEntityNotFound(_0x4a72x1a,null))[_0x88ab[40]](respondWithResult(_0x4a72x1a,null))[_0x88ab[73]](handleError(_0x4a72x1a,null))};exports[_0x88ab[82]]= function(_0x4a72x2c,_0x4a72x1a){return db[_0x88ab[50]][_0x88ab[82]](_0x4a72x2c[_0x88ab[83]],{})[_0x88ab[40]](respondWithResult(_0x4a72x1a,201))[_0x88ab[73]](handleError(_0x4a72x1a,null))};exports[_0x88ab[41]]= function(_0x4a72x2c,_0x4a72x1a){if(_0x4a72x2c[_0x88ab[83]][_0x88ab[79]]){delete _0x4a72x2c[_0x88ab[83]][_0x88ab[79]]};return db[_0x88ab[50]][_0x88ab[81]]({where:{id:_0x4a72x2c[_0x88ab[80]][_0x88ab[79]]}})[_0x88ab[40]](handleEntityNotFound(_0x4a72x1a,null))[_0x88ab[40]](saveUpdates(_0x4a72x2c[_0x88ab[83]],null))[_0x88ab[40]](respondWithResult(_0x4a72x1a,null))[_0x88ab[73]](handleError(_0x4a72x1a,null))};exports[_0x88ab[42]]= function(_0x4a72x2c,_0x4a72x1a){return db[_0x88ab[50]][_0x88ab[81]]({where:{id:_0x4a72x2c[_0x88ab[80]][_0x88ab[79]]}})[_0x88ab[40]](handleEntityNotFound(_0x4a72x1a,null))[_0x88ab[40]](removeEntity(_0x4a72x1a,null))[_0x88ab[73]](handleError(_0x4a72x1a,null))}
\ No newline at end of file
index 30f6a1c..06cbf06 100644 (file)
@@ -1 +1 @@
-var _0xb2dd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0xb2dd[0];var _=require(_0xb2dd[1]);var util=require(_0xb2dd[2]);var logger=require(_0xb2dd[4])(_0xb2dd[3]);var moment=require(_0xb2dd[5]);var BPromise=require(_0xb2dd[6]);var rp=require(_0xb2dd[7]);var attributes=require(_0xb2dd[8]);module[_0xb2dd[9]]= function(_0x5453x8,_0x5453x9){return _0x5453x8[_0xb2dd[12]](_0xb2dd[10],attributes,{tableName:_0xb2dd[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xfcd9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0xfcd9[0];var _=require(_0xfcd9[1]);var util=require(_0xfcd9[2]);var logger=require(_0xfcd9[4])(_0xfcd9[3]);var moment=require(_0xfcd9[5]);var BPromise=require(_0xfcd9[6]);var rp=require(_0xfcd9[7]);var attributes=require(_0xfcd9[8]);module[_0xfcd9[9]]= function(_0x6600x8,_0x6600x9){return _0x6600x8[_0xfcd9[12]](_0xfcd9[10],attributes,{tableName:_0xfcd9[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 9a85082..c6e1d8d 100644 (file)
@@ -1 +1 @@
-var _0xb7b7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x53\x68\x6F\x77\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74"];_0xb7b7[0];var _=require(_0xb7b7[1]);var util=require(_0xb7b7[2]);var moment=require(_0xb7b7[3]);var BPromise=require(_0xb7b7[4]);var rs=require(_0xb7b7[5]);var fs=require(_0xb7b7[6]);var db=require(_0xb7b7[8])[_0xb7b7[7]];var utils=require(_0xb7b7[9]);var logger=require(_0xb7b7[11])(_0xb7b7[10]);var config=require(_0xb7b7[12]);var jayson=require(_0xb7b7[13]);var client=jayson[_0xb7b7[15]][_0xb7b7[14]]({port:9002});function respondWithRpcPromise(_0x1315xe,_0x1315xf,_0x1315x10){return  new BPromise(function(_0x1315x11,_0x1315x12){return client[_0xb7b7[28]](_0x1315xe,_0x1315x10)[_0xb7b7[27]](function(_0x1315x14){logger[_0xb7b7[20]](_0xb7b7[16],_0x1315xf,_0xb7b7[19]);logger[_0xb7b7[23]](_0xb7b7[21],_0x1315xf,_0xb7b7[19],JSON[_0xb7b7[22]](_0x1315x14));if(_0x1315x14[_0xb7b7[17]]){if(_0x1315x14[_0xb7b7[17]][_0xb7b7[24]]=== 500){logger[_0xb7b7[17]](_0xb7b7[16],_0x1315xf,_0x1315x14[_0xb7b7[17]][_0xb7b7[25]]);return _0x1315x12(_0x1315x14[_0xb7b7[17]][_0xb7b7[25]])};logger[_0xb7b7[17]](_0xb7b7[16],_0x1315xf,_0x1315x14[_0xb7b7[17]][_0xb7b7[25]]);return _0x1315x11(_0x1315x14[_0xb7b7[17]][_0xb7b7[25]])}else {logger[_0xb7b7[20]](_0xb7b7[16],_0x1315xf,_0xb7b7[19]);_0x1315x11(_0x1315x14[_0xb7b7[26]][_0xb7b7[25]])}})[_0xb7b7[18]](function(_0x1315x13){logger[_0xb7b7[17]](_0xb7b7[16],_0x1315xf,_0x1315x13);_0x1315x12(_0x1315x13)})})}exports[_0xb7b7[29]]= function(_0x1315x10){var _0x1315x15=this;return  new Promise(function(_0x1315x11,_0x1315x12){return db[_0xb7b7[39]][_0xb7b7[38]]({raw:_0x1315x10[_0xb7b7[30]]?(_0x1315x10[_0xb7b7[30]][_0xb7b7[31]]=== undefined)?true:false:true,where:_0x1315x10[_0xb7b7[30]]?_0x1315x10[_0xb7b7[30]][_0xb7b7[32]]|| null:null,attributes:_0x1315x10[_0xb7b7[30]]?_0x1315x10[_0xb7b7[30]][_0xb7b7[33]]|| null:null,include:_0x1315x10[_0xb7b7[30]]?(_0x1315x10[_0xb7b7[30]][_0xb7b7[34]]?_[_0xb7b7[37]](_0x1315x10[_0xb7b7[30]][_0xb7b7[34]],function(_0x1315x16){return {model:db[_0x1315x16[_0xb7b7[35]]],as:_0x1315x16[_0xb7b7[36]],attributes:_0x1315x16[_0xb7b7[33]],include:_0x1315x16[_0xb7b7[34]]?_[_0xb7b7[37]](_0x1315x16[_0xb7b7[34]],function(_0x1315x17){return {model:db[_0x1315x17[_0xb7b7[35]]],as:_0x1315x17[_0xb7b7[36]],attributes:_0x1315x17[_0xb7b7[33]],include:_0x1315x17[_0xb7b7[34]]?_[_0xb7b7[37]](_0x1315x17[_0xb7b7[34]],function(_0x1315x18){return {model:db[_0x1315x18[_0xb7b7[35]]],as:_0x1315x18[_0xb7b7[36]],attributes:_0x1315x18[_0xb7b7[33]]}}):[]}}):[]}}):[]):[]})[_0xb7b7[27]](function(_0x1315x14){logger[_0xb7b7[20]](_0xb7b7[29],_0x1315x10);logger[_0xb7b7[23]](_0xb7b7[29],_0x1315x10,JSON[_0xb7b7[22]](_0x1315x14));_0x1315x11(_0x1315x14)})[_0xb7b7[18]](function(_0x1315x13){logger[_0xb7b7[17]](_0xb7b7[29],_0x1315x13[_0xb7b7[25]],_0x1315x10);_0x1315x12(_0x1315x15[_0xb7b7[17]](500,_0x1315x13[_0xb7b7[25]]))})})}
\ No newline at end of file
+var _0x280c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x53\x68\x6F\x77\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74"];_0x280c[0];var _=require(_0x280c[1]);var util=require(_0x280c[2]);var moment=require(_0x280c[3]);var BPromise=require(_0x280c[4]);var rs=require(_0x280c[5]);var fs=require(_0x280c[6]);var db=require(_0x280c[8])[_0x280c[7]];var utils=require(_0x280c[9]);var logger=require(_0x280c[11])(_0x280c[10]);var config=require(_0x280c[12]);var jayson=require(_0x280c[13]);var client=jayson[_0x280c[15]][_0x280c[14]]({port:9002});function respondWithRpcPromise(_0x6b9bxe,_0x6b9bxf,_0x6b9bx10){return  new BPromise(function(_0x6b9bx11,_0x6b9bx12){return client[_0x280c[28]](_0x6b9bxe,_0x6b9bx10)[_0x280c[27]](function(_0x6b9bx14){logger[_0x280c[20]](_0x280c[16],_0x6b9bxf,_0x280c[19]);logger[_0x280c[23]](_0x280c[21],_0x6b9bxf,_0x280c[19],JSON[_0x280c[22]](_0x6b9bx14));if(_0x6b9bx14[_0x280c[17]]){if(_0x6b9bx14[_0x280c[17]][_0x280c[24]]=== 500){logger[_0x280c[17]](_0x280c[16],_0x6b9bxf,_0x6b9bx14[_0x280c[17]][_0x280c[25]]);return _0x6b9bx12(_0x6b9bx14[_0x280c[17]][_0x280c[25]])};logger[_0x280c[17]](_0x280c[16],_0x6b9bxf,_0x6b9bx14[_0x280c[17]][_0x280c[25]]);return _0x6b9bx11(_0x6b9bx14[_0x280c[17]][_0x280c[25]])}else {logger[_0x280c[20]](_0x280c[16],_0x6b9bxf,_0x280c[19]);_0x6b9bx11(_0x6b9bx14[_0x280c[26]][_0x280c[25]])}})[_0x280c[18]](function(_0x6b9bx13){logger[_0x280c[17]](_0x280c[16],_0x6b9bxf,_0x6b9bx13);_0x6b9bx12(_0x6b9bx13)})})}exports[_0x280c[29]]= function(_0x6b9bx10){var _0x6b9bx15=this;return  new Promise(function(_0x6b9bx11,_0x6b9bx12){return db[_0x280c[39]][_0x280c[38]]({raw:_0x6b9bx10[_0x280c[30]]?(_0x6b9bx10[_0x280c[30]][_0x280c[31]]=== undefined)?true:false:true,where:_0x6b9bx10[_0x280c[30]]?_0x6b9bx10[_0x280c[30]][_0x280c[32]]|| null:null,attributes:_0x6b9bx10[_0x280c[30]]?_0x6b9bx10[_0x280c[30]][_0x280c[33]]|| null:null,include:_0x6b9bx10[_0x280c[30]]?(_0x6b9bx10[_0x280c[30]][_0x280c[34]]?_[_0x280c[37]](_0x6b9bx10[_0x280c[30]][_0x280c[34]],function(_0x6b9bx16){return {model:db[_0x6b9bx16[_0x280c[35]]],as:_0x6b9bx16[_0x280c[36]],attributes:_0x6b9bx16[_0x280c[33]],include:_0x6b9bx16[_0x280c[34]]?_[_0x280c[37]](_0x6b9bx16[_0x280c[34]],function(_0x6b9bx17){return {model:db[_0x6b9bx17[_0x280c[35]]],as:_0x6b9bx17[_0x280c[36]],attributes:_0x6b9bx17[_0x280c[33]],include:_0x6b9bx17[_0x280c[34]]?_[_0x280c[37]](_0x6b9bx17[_0x280c[34]],function(_0x6b9bx18){return {model:db[_0x6b9bx18[_0x280c[35]]],as:_0x6b9bx18[_0x280c[36]],attributes:_0x6b9bx18[_0x280c[33]]}}):[]}}):[]}}):[]):[]})[_0x280c[27]](function(_0x6b9bx14){logger[_0x280c[20]](_0x280c[29],_0x6b9bx10);logger[_0x280c[23]](_0x280c[29],_0x6b9bx10,JSON[_0x280c[22]](_0x6b9bx14));_0x6b9bx11(_0x6b9bx14)})[_0x280c[18]](function(_0x6b9bx13){logger[_0x280c[17]](_0x280c[29],_0x6b9bx13[_0x280c[25]],_0x6b9bx10);_0x6b9bx12(_0x6b9bx15[_0x280c[17]](500,_0x6b9bx13[_0x280c[25]]))})})}
\ No newline at end of file
index ddc48c2..affa520 100644 (file)
@@ -1 +1 @@
-var _0x91c7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x91c7[0];var multer=require(_0x91c7[1]);var util=require(_0x91c7[2]);var path=require(_0x91c7[3]);var express=require(_0x91c7[4]);var router=express.Router();var auth=require(_0x91c7[5]);var interaction=require(_0x91c7[6]);var config=require(_0x91c7[7]);var controller=require(_0x91c7[8]);router[_0x91c7[12]](_0x91c7[9],auth[_0x91c7[10]](),controller[_0x91c7[11]]);router[_0x91c7[12]](_0x91c7[13],auth[_0x91c7[10]](),controller[_0x91c7[14]]);router[_0x91c7[12]](_0x91c7[15],auth[_0x91c7[10]](),controller[_0x91c7[16]]);router[_0x91c7[18]](_0x91c7[9],auth[_0x91c7[10]](),controller[_0x91c7[17]]);router[_0x91c7[20]](_0x91c7[13],auth[_0x91c7[10]](),controller[_0x91c7[19]]);router[_0x91c7[22]](_0x91c7[13],auth[_0x91c7[10]](),controller[_0x91c7[21]]);module[_0x91c7[23]]= router
\ No newline at end of file
+var _0x41c3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x41c3[0];var multer=require(_0x41c3[1]);var util=require(_0x41c3[2]);var path=require(_0x41c3[3]);var express=require(_0x41c3[4]);var router=express.Router();var auth=require(_0x41c3[5]);var interaction=require(_0x41c3[6]);var config=require(_0x41c3[7]);var controller=require(_0x41c3[8]);router[_0x41c3[12]](_0x41c3[9],auth[_0x41c3[10]](),controller[_0x41c3[11]]);router[_0x41c3[12]](_0x41c3[13],auth[_0x41c3[10]](),controller[_0x41c3[14]]);router[_0x41c3[12]](_0x41c3[15],auth[_0x41c3[10]](),controller[_0x41c3[16]]);router[_0x41c3[18]](_0x41c3[9],auth[_0x41c3[10]](),controller[_0x41c3[17]]);router[_0x41c3[20]](_0x41c3[13],auth[_0x41c3[10]](),controller[_0x41c3[19]]);router[_0x41c3[22]](_0x41c3[13],auth[_0x41c3[10]](),controller[_0x41c3[21]]);module[_0x41c3[23]]= router
\ No newline at end of file
index bb215d2..25ab662 100644 (file)
@@ -1 +1 @@
-var _0x45b7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0x45b7[0];var Sequelize=require(_0x45b7[1]);module[_0x45b7[2]]= {uniqueid:{type:Sequelize[_0x45b7[3]]},callerid:{type:Sequelize[_0x45b7[3]]},calleridname:{type:Sequelize[_0x45b7[3]]},context:{type:Sequelize[_0x45b7[3]]},extension:{type:Sequelize[_0x45b7[3]]},priority:{type:Sequelize[_0x45b7[3]]},accountcode:{type:Sequelize[_0x45b7[3]]},dnid:{type:Sequelize[_0x45b7[3]]},projectName:{type:Sequelize[_0x45b7[3]]},saveName:{type:Sequelize[_0x45b7[3]]},filename:{type:Sequelize[_0x45b7[3]]},savePath:{type:Sequelize[_0x45b7[3]]}}
\ No newline at end of file
+var _0xd00d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47"];_0xd00d[0];var Sequelize=require(_0xd00d[1]);module[_0xd00d[2]]= {uniqueid:{type:Sequelize[_0xd00d[3]]},callerid:{type:Sequelize[_0xd00d[3]]},calleridname:{type:Sequelize[_0xd00d[3]]},context:{type:Sequelize[_0xd00d[3]]},extension:{type:Sequelize[_0xd00d[3]]},priority:{type:Sequelize[_0xd00d[3]]},accountcode:{type:Sequelize[_0xd00d[3]]},dnid:{type:Sequelize[_0xd00d[3]]},projectName:{type:Sequelize[_0xd00d[3]]},saveName:{type:Sequelize[_0xd00d[3]]},filename:{type:Sequelize[_0xd00d[3]]},savePath:{type:Sequelize[_0xd00d[3]]}}
\ No newline at end of file
index 01096ca..b221ee4 100644 (file)
@@ -1 +1 @@
-var _0x24bc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x65\x6E\x63\x72\x79\x70\x74\x6F\x72","\x74\x79\x70\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x73\x61\x76\x65\x50\x61\x74\x68","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x75\x6E\x6C\x69\x6E\x6B","\x25\x73\x2E\x63\x79\x70\x68\x65\x72","\x76\x61\x6C\x75\x65","\x66\x6F\x72\x6D\x61\x74","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x73\x65\x63\x72\x65\x74\x73","\x64\x65\x63\x72\x79\x70\x74\x46\x69\x6C\x65"];_0x24bc[0];var jsonpatch=require(_0x24bc[1]);var rp=require(_0x24bc[2]);var moment=require(_0x24bc[3]);var BPromise=require(_0x24bc[4]);var Mustache=require(_0x24bc[5]);var util=require(_0x24bc[6]);var path=require(_0x24bc[7]);var sox=require(_0x24bc[8]);var csv=require(_0x24bc[9]);var ejs=require(_0x24bc[10]);var fs=require(_0x24bc[11]);var _=require(_0x24bc[12]);var squel=require(_0x24bc[13]);var crypto=require(_0x24bc[14]);var jsforce=require(_0x24bc[15]);var deskjs=require(_0x24bc[16]);var toCsv=require(_0x24bc[9]);var querystring=require(_0x24bc[17]);var Papa=require(_0x24bc[18]);var qs=require(_0x24bc[19]);var logger=require(_0x24bc[21])(_0x24bc[20]);var utils=require(_0x24bc[22]);var config=require(_0x24bc[23]);var db=require(_0x24bc[25])[_0x24bc[24]];function respondWithStatusCode(_0x26a5x1a,_0x26a5x1b){_0x26a5x1b= _0x26a5x1b|| 204;return function(_0x26a5x1c){if(_0x26a5x1c){return _0x26a5x1a[_0x24bc[26]](_0x26a5x1b)};return _0x26a5x1a[_0x24bc[28]](_0x26a5x1b)[_0x24bc[27]]()}}function respondWithResult(_0x26a5x1a,_0x26a5x1b){_0x26a5x1b= _0x26a5x1b|| 200;return function(_0x26a5x1c){if(_0x26a5x1c){return _0x26a5x1a[_0x24bc[28]](_0x26a5x1b)[_0x24bc[29]](_0x26a5x1c)}}}function respondWithFilteredResult(_0x26a5x1a,_0x26a5x1f){return function(_0x26a5x1c){if(_0x26a5x1c){var _0x26a5x20=_0x26a5x1c[_0x24bc[30]],_0x26a5x21=_0x26a5x1f[_0x24bc[31]],_0x26a5x22=_0x26a5x1f[_0x24bc[31]]+ _0x26a5x1f[_0x24bc[32]],_0x26a5x1b;if(_0x26a5x22>= _0x26a5x20){_0x26a5x22= _0x26a5x20;_0x26a5x1b= 200}else {_0x26a5x1b= 206};_0x26a5x1a[_0x24bc[28]](_0x26a5x1b);return _0x26a5x1a[_0x24bc[36]](_0x24bc[33],_0x26a5x21+ _0x24bc[34]+ _0x26a5x22+ _0x24bc[35]+ _0x26a5x20)[_0x24bc[29]](_0x26a5x1c)};return null}}function patchUpdates(_0x26a5x24){return function(_0x26a5x1c){try{jsonpatch[_0x24bc[37]](_0x26a5x1c,_0x26a5x24,true)}catch(err){return BPromise[_0x24bc[38]](err)};return _0x26a5x1c[_0x24bc[39]]()}}function saveUpdates(_0x26a5x26,_0x26a5x1b){return function(_0x26a5x1c){if(_0x26a5x1c){return _0x26a5x1c[_0x24bc[41]](_0x26a5x26)[_0x24bc[40]](function(_0x26a5x27){return _0x26a5x27})};return null}}function removeEntity(_0x26a5x1a,_0x26a5x1b){return function(_0x26a5x1c){if(_0x26a5x1c){return _0x26a5x1c[_0x24bc[42]]()[_0x24bc[40]](function(){_0x26a5x1a[_0x24bc[28]](204)[_0x24bc[27]]()})}}}function handleEntityNotFound(_0x26a5x1a,_0x26a5x1b){return function(_0x26a5x1c){if(!_0x26a5x1c){_0x26a5x1a[_0x24bc[26]](404)};return _0x26a5x1c}}function handleError(_0x26a5x1a,_0x26a5x1b){_0x26a5x1b= _0x26a5x1b|| 500;return function(_0x26a5x2b){logger[_0x24bc[44]](_0x26a5x2b[_0x24bc[43]]);if(_0x26a5x2b[_0x24bc[45]]){delete _0x26a5x2b[_0x24bc[45]]};_0x26a5x1a[_0x24bc[28]](_0x26a5x1b)[_0x24bc[46]](_0x26a5x2b)}}exports[_0x24bc[47]]= function(_0x26a5x2c,_0x26a5x1a){var _0x26a5x1f={},_0x26a5x2d={},_0x26a5x2e={count:0,rows:[]};_0x26a5x2d[_0x24bc[48]]= _[_0x24bc[51]](db[_0x24bc[50]][_0x24bc[49]]);var _0x26a5x2f={dateStart:_0x26a5x2c[_0x24bc[53]][_0x24bc[52]],dateEnd:_0x26a5x2c[_0x24bc[53]][_0x24bc[54]]};delete _0x26a5x2c[_0x24bc[53]][_0x24bc[52]];delete _0x26a5x2c[_0x24bc[53]][_0x24bc[54]];_0x26a5x2d[_0x24bc[53]]= _[_0x24bc[51]](_0x26a5x2c[_0x24bc[53]]);_0x26a5x2d[_0x24bc[55]]= _[_0x24bc[56]](_0x26a5x2d[_0x24bc[48]],_0x26a5x2d[_0x24bc[53]]);_0x26a5x1f[_0x24bc[57]]= _[_0x24bc[56]](_0x26a5x2d[_0x24bc[48]],qs[_0x24bc[58]](_0x26a5x2c[_0x24bc[53]][_0x24bc[58]]));_0x26a5x1f[_0x24bc[57]]= (_0x26a5x1f[_0x24bc[57]][_0x24bc[59]])?_0x26a5x1f[_0x24bc[57]]:_0x26a5x2d[_0x24bc[48]];if(!_0x26a5x2c[_0x24bc[53]][_0x24bc[61]](_0x24bc[60])){_0x26a5x1f[_0x24bc[32]]= qs[_0x24bc[32]](_0x26a5x2c[_0x24bc[53]][_0x24bc[32]]);_0x26a5x1f[_0x24bc[31]]= qs[_0x24bc[31]](_0x26a5x2c[_0x24bc[53]][_0x24bc[31]])};_0x26a5x1f[_0x24bc[62]]= qs[_0x24bc[63]](_0x26a5x2c[_0x24bc[53]][_0x24bc[63]]);_0x26a5x1f[_0x24bc[64]]= qs[_0x24bc[55]](_[_0x24bc[65]](_0x26a5x2c[_0x24bc[53]],_0x26a5x2d[_0x24bc[55]]));if(_0x26a5x2f[_0x24bc[52]]){if(_0x26a5x2f[_0x24bc[54]]){_0x26a5x2f[_0x24bc[54]]= moment(_0x26a5x2f[_0x24bc[54]])[_0x24bc[67]](1,_0x24bc[66])}else {_0x26a5x2f[_0x24bc[54]]= moment(_0x26a5x2f[_0x24bc[52]])[_0x24bc[67]](1,_0x24bc[66])};_[_0x24bc[68]](_0x26a5x1f[_0x24bc[64]],{createdAt:{$gte:_0x26a5x2f[_0x24bc[52]],$lte:_0x26a5x2f[_0x24bc[54]]}})};if(_0x26a5x2c[_0x24bc[53]][_0x24bc[69]]){_0x26a5x1f[_0x24bc[64]]= _[_0x24bc[68]](_0x26a5x1f[_0x24bc[64]],{$or:_[_0x24bc[71]](_0x26a5x1f[_0x24bc[57]],function(_0x26a5x30){var _0x26a5x2e={};_0x26a5x2e[_0x26a5x30]= {$like:_0x24bc[70]+ _0x26a5x2c[_0x24bc[53]][_0x24bc[69]]+ _0x24bc[70]};return _0x26a5x2e})})};_0x26a5x1f= _[_0x24bc[68]]({},_0x26a5x1f,_0x26a5x2c[_0x24bc[72]]);var _0x26a5x31={where:_0x26a5x1f[_0x24bc[64]]};return db[_0x24bc[50]][_0x24bc[30]](_0x26a5x31)[_0x24bc[40]](function(_0x26a5x20){_0x26a5x2e[_0x24bc[30]]= _0x26a5x20;if(_0x26a5x2c[_0x24bc[53]][_0x24bc[75]]){_0x26a5x1f[_0x24bc[76]]= [{all:true}]};return db[_0x24bc[50]][_0x24bc[77]](_0x26a5x1f)})[_0x24bc[40]](function(_0x26a5x32){_0x26a5x2e[_0x24bc[74]]= _0x26a5x32;return _0x26a5x2e})[_0x24bc[40]](respondWithFilteredResult(_0x26a5x1a,_0x26a5x1f))[_0x24bc[73]](handleError(_0x26a5x1a,null))};exports[_0x24bc[78]]= function(_0x26a5x2c,_0x26a5x1a){var _0x26a5x1f={raw:true,where:{id:_0x26a5x2c[_0x24bc[80]][_0x24bc[79]]}},_0x26a5x2d={};_0x26a5x2d[_0x24bc[48]]= _[_0x24bc[51]](db[_0x24bc[50]][_0x24bc[49]]);_0x26a5x2d[_0x24bc[53]]= _[_0x24bc[51]](_0x26a5x2c[_0x24bc[53]]);_0x26a5x2d[_0x24bc[55]]= _[_0x24bc[56]](_0x26a5x2d[_0x24bc[48]],_0x26a5x2d[_0x24bc[53]]);_0x26a5x1f[_0x24bc[57]]= _[_0x24bc[56]](_0x26a5x2d[_0x24bc[48]],qs[_0x24bc[58]](_0x26a5x2c[_0x24bc[53]][_0x24bc[58]]));_0x26a5x1f[_0x24bc[57]]= (_0x26a5x1f[_0x24bc[57]][_0x24bc[59]])?_0x26a5x1f[_0x24bc[57]]:_0x26a5x2d[_0x24bc[48]];if(_0x26a5x2c[_0x24bc[53]][_0x24bc[75]]){_0x26a5x1f[_0x24bc[76]]= [{all:true}]};_0x26a5x1f= _[_0x24bc[68]]({},_0x26a5x1f,_0x26a5x2c[_0x24bc[72]]);return db[_0x24bc[50]][_0x24bc[81]](_0x26a5x1f)[_0x24bc[40]](handleEntityNotFound(_0x26a5x1a,null))[_0x24bc[40]](respondWithResult(_0x26a5x1a,null))[_0x24bc[73]](handleError(_0x26a5x1a,null))};exports[_0x24bc[82]]= function(_0x26a5x2c,_0x26a5x1a){return db[_0x24bc[50]][_0x24bc[82]](_0x26a5x2c[_0x24bc[83]],{})[_0x24bc[40]](respondWithResult(_0x26a5x1a,201))[_0x24bc[73]](handleError(_0x26a5x1a,null))};exports[_0x24bc[41]]= function(_0x26a5x2c,_0x26a5x1a){if(_0x26a5x2c[_0x24bc[83]][_0x24bc[79]]){delete _0x26a5x2c[_0x24bc[83]][_0x24bc[79]]};return db[_0x24bc[50]][_0x24bc[81]]({where:{id:_0x26a5x2c[_0x24bc[80]][_0x24bc[79]]}})[_0x24bc[40]](handleEntityNotFound(_0x26a5x1a,null))[_0x24bc[40]](saveUpdates(_0x26a5x2c[_0x24bc[83]],null))[_0x24bc[40]](respondWithResult(_0x26a5x1a,null))[_0x24bc[73]](handleError(_0x26a5x1a,null))};exports[_0x24bc[42]]= function(_0x26a5x2c,_0x26a5x1a){return db[_0x24bc[50]][_0x24bc[81]]({where:{id:_0x26a5x2c[_0x24bc[80]][_0x24bc[79]]}})[_0x24bc[40]](handleEntityNotFound(_0x26a5x1a,null))[_0x24bc[40]](removeEntity(_0x26a5x1a,null))[_0x24bc[73]](handleError(_0x26a5x1a,null))};exports[_0x24bc[84]]= function(_0x26a5x2c,_0x26a5x1a,_0x26a5x33){var _0x26a5x34=require(_0x24bc[85]);var _0x26a5x35=false;var _0x26a5x36={};if(_0x26a5x2c[_0x24bc[53]][_0x24bc[86]]&& _0x26a5x2c[_0x24bc[53]][_0x24bc[86]]=== _0x24bc[87]){_0x26a5x36[_0x24bc[87]]= _0x26a5x2c[_0x24bc[80]][_0x24bc[79]]}else {_0x26a5x36[_0x24bc[79]]= _0x26a5x2c[_0x24bc[80]][_0x24bc[79]]};return db[_0x24bc[50]][_0x24bc[81]]({where:_0x26a5x36,attributes:[_0x24bc[79],_0x24bc[88],_0x24bc[92]],raw:true})[_0x24bc[40]](handleEntityNotFound(_0x26a5x1a,null))[_0x24bc[40]](function(_0x26a5x1c){if(_0x26a5x1c){var _0x26a5x37=util[_0x24bc[97]](_0x24bc[95],_0x26a5x1c[_0x24bc[96]]);if(fs[_0x24bc[89]](_0x26a5x37)){_0x26a5x35= true;return _0x26a5x34[_0x24bc[100]](_0x26a5x37,_0x26a5x1c[_0x24bc[88]],config[_0x24bc[99]][_0x24bc[98]])[_0x24bc[40]](function(){return _0x26a5x1c})};return _0x26a5x1c}})[_0x24bc[40]](function(_0x26a5x1c){if(_0x26a5x1c){if(!fs[_0x24bc[89]](_0x26a5x1c[_0x24bc[88]])){throw  new db[_0x24bc[91]].ValidationError(_0x24bc[90])};if(_0x26a5x1c[_0x24bc[92]]){return _0x26a5x1a[_0x24bc[84]](_0x26a5x1c[_0x24bc[88]],_0x26a5x1c[_0x24bc[92]]+ path[_0x24bc[93]](_0x26a5x1c[_0x24bc[88]]),function(){if(_0x26a5x35){fs[_0x24bc[94]](_0x26a5x1c[_0x24bc[88]])}})}else {return _0x26a5x1a[_0x24bc[84]](_0x26a5x1c[_0x24bc[88]],function(_0x26a5x1a){if(_0x26a5x35){fs[_0x24bc[94]](_0x26a5x1c[_0x24bc[88]])}})}}})[_0x24bc[73]](handleError(_0x26a5x1a,null))}
\ No newline at end of file
+var _0xd434=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x65\x6E\x63\x72\x79\x70\x74\x6F\x72","\x74\x79\x70\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x73\x61\x76\x65\x50\x61\x74\x68","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x75\x6E\x6C\x69\x6E\x6B","\x25\x73\x2E\x63\x79\x70\x68\x65\x72","\x76\x61\x6C\x75\x65","\x66\x6F\x72\x6D\x61\x74","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x73\x65\x63\x72\x65\x74\x73","\x64\x65\x63\x72\x79\x70\x74\x46\x69\x6C\x65"];_0xd434[0];var jsonpatch=require(_0xd434[1]);var rp=require(_0xd434[2]);var moment=require(_0xd434[3]);var BPromise=require(_0xd434[4]);var Mustache=require(_0xd434[5]);var util=require(_0xd434[6]);var path=require(_0xd434[7]);var sox=require(_0xd434[8]);var csv=require(_0xd434[9]);var ejs=require(_0xd434[10]);var fs=require(_0xd434[11]);var _=require(_0xd434[12]);var squel=require(_0xd434[13]);var crypto=require(_0xd434[14]);var jsforce=require(_0xd434[15]);var deskjs=require(_0xd434[16]);var toCsv=require(_0xd434[9]);var querystring=require(_0xd434[17]);var Papa=require(_0xd434[18]);var qs=require(_0xd434[19]);var logger=require(_0xd434[21])(_0xd434[20]);var utils=require(_0xd434[22]);var config=require(_0xd434[23]);var db=require(_0xd434[25])[_0xd434[24]];function respondWithStatusCode(_0x5a11x1a,_0x5a11x1b){_0x5a11x1b= _0x5a11x1b|| 204;return function(_0x5a11x1c){if(_0x5a11x1c){return _0x5a11x1a[_0xd434[26]](_0x5a11x1b)};return _0x5a11x1a[_0xd434[28]](_0x5a11x1b)[_0xd434[27]]()}}function respondWithResult(_0x5a11x1a,_0x5a11x1b){_0x5a11x1b= _0x5a11x1b|| 200;return function(_0x5a11x1c){if(_0x5a11x1c){return _0x5a11x1a[_0xd434[28]](_0x5a11x1b)[_0xd434[29]](_0x5a11x1c)}}}function respondWithFilteredResult(_0x5a11x1a,_0x5a11x1f){return function(_0x5a11x1c){if(_0x5a11x1c){var _0x5a11x20=_0x5a11x1c[_0xd434[30]],_0x5a11x21=_0x5a11x1f[_0xd434[31]],_0x5a11x22=_0x5a11x1f[_0xd434[31]]+ _0x5a11x1f[_0xd434[32]],_0x5a11x1b;if(_0x5a11x22>= _0x5a11x20){_0x5a11x22= _0x5a11x20;_0x5a11x1b= 200}else {_0x5a11x1b= 206};_0x5a11x1a[_0xd434[28]](_0x5a11x1b);return _0x5a11x1a[_0xd434[36]](_0xd434[33],_0x5a11x21+ _0xd434[34]+ _0x5a11x22+ _0xd434[35]+ _0x5a11x20)[_0xd434[29]](_0x5a11x1c)};return null}}function patchUpdates(_0x5a11x24){return function(_0x5a11x1c){try{jsonpatch[_0xd434[37]](_0x5a11x1c,_0x5a11x24,true)}catch(err){return BPromise[_0xd434[38]](err)};return _0x5a11x1c[_0xd434[39]]()}}function saveUpdates(_0x5a11x26,_0x5a11x1b){return function(_0x5a11x1c){if(_0x5a11x1c){return _0x5a11x1c[_0xd434[41]](_0x5a11x26)[_0xd434[40]](function(_0x5a11x27){return _0x5a11x27})};return null}}function removeEntity(_0x5a11x1a,_0x5a11x1b){return function(_0x5a11x1c){if(_0x5a11x1c){return _0x5a11x1c[_0xd434[42]]()[_0xd434[40]](function(){_0x5a11x1a[_0xd434[28]](204)[_0xd434[27]]()})}}}function handleEntityNotFound(_0x5a11x1a,_0x5a11x1b){return function(_0x5a11x1c){if(!_0x5a11x1c){_0x5a11x1a[_0xd434[26]](404)};return _0x5a11x1c}}function handleError(_0x5a11x1a,_0x5a11x1b){_0x5a11x1b= _0x5a11x1b|| 500;return function(_0x5a11x2b){logger[_0xd434[44]](_0x5a11x2b[_0xd434[43]]);if(_0x5a11x2b[_0xd434[45]]){delete _0x5a11x2b[_0xd434[45]]};_0x5a11x1a[_0xd434[28]](_0x5a11x1b)[_0xd434[46]](_0x5a11x2b)}}exports[_0xd434[47]]= function(_0x5a11x2c,_0x5a11x1a){var _0x5a11x1f={},_0x5a11x2d={},_0x5a11x2e={count:0,rows:[]};_0x5a11x2d[_0xd434[48]]= _[_0xd434[51]](db[_0xd434[50]][_0xd434[49]]);var _0x5a11x2f={dateStart:_0x5a11x2c[_0xd434[53]][_0xd434[52]],dateEnd:_0x5a11x2c[_0xd434[53]][_0xd434[54]]};delete _0x5a11x2c[_0xd434[53]][_0xd434[52]];delete _0x5a11x2c[_0xd434[53]][_0xd434[54]];_0x5a11x2d[_0xd434[53]]= _[_0xd434[51]](_0x5a11x2c[_0xd434[53]]);_0x5a11x2d[_0xd434[55]]= _[_0xd434[56]](_0x5a11x2d[_0xd434[48]],_0x5a11x2d[_0xd434[53]]);_0x5a11x1f[_0xd434[57]]= _[_0xd434[56]](_0x5a11x2d[_0xd434[48]],qs[_0xd434[58]](_0x5a11x2c[_0xd434[53]][_0xd434[58]]));_0x5a11x1f[_0xd434[57]]= (_0x5a11x1f[_0xd434[57]][_0xd434[59]])?_0x5a11x1f[_0xd434[57]]:_0x5a11x2d[_0xd434[48]];if(!_0x5a11x2c[_0xd434[53]][_0xd434[61]](_0xd434[60])){_0x5a11x1f[_0xd434[32]]= qs[_0xd434[32]](_0x5a11x2c[_0xd434[53]][_0xd434[32]]);_0x5a11x1f[_0xd434[31]]= qs[_0xd434[31]](_0x5a11x2c[_0xd434[53]][_0xd434[31]])};_0x5a11x1f[_0xd434[62]]= qs[_0xd434[63]](_0x5a11x2c[_0xd434[53]][_0xd434[63]]);_0x5a11x1f[_0xd434[64]]= qs[_0xd434[55]](_[_0xd434[65]](_0x5a11x2c[_0xd434[53]],_0x5a11x2d[_0xd434[55]]));if(_0x5a11x2f[_0xd434[52]]){if(_0x5a11x2f[_0xd434[54]]){_0x5a11x2f[_0xd434[54]]= moment(_0x5a11x2f[_0xd434[54]])[_0xd434[67]](1,_0xd434[66])}else {_0x5a11x2f[_0xd434[54]]= moment(_0x5a11x2f[_0xd434[52]])[_0xd434[67]](1,_0xd434[66])};_[_0xd434[68]](_0x5a11x1f[_0xd434[64]],{createdAt:{$gte:_0x5a11x2f[_0xd434[52]],$lte:_0x5a11x2f[_0xd434[54]]}})};if(_0x5a11x2c[_0xd434[53]][_0xd434[69]]){_0x5a11x1f[_0xd434[64]]= _[_0xd434[68]](_0x5a11x1f[_0xd434[64]],{$or:_[_0xd434[71]](_0x5a11x1f[_0xd434[57]],function(_0x5a11x30){var _0x5a11x2e={};_0x5a11x2e[_0x5a11x30]= {$like:_0xd434[70]+ _0x5a11x2c[_0xd434[53]][_0xd434[69]]+ _0xd434[70]};return _0x5a11x2e})})};_0x5a11x1f= _[_0xd434[68]]({},_0x5a11x1f,_0x5a11x2c[_0xd434[72]]);var _0x5a11x31={where:_0x5a11x1f[_0xd434[64]]};return db[_0xd434[50]][_0xd434[30]](_0x5a11x31)[_0xd434[40]](function(_0x5a11x20){_0x5a11x2e[_0xd434[30]]= _0x5a11x20;if(_0x5a11x2c[_0xd434[53]][_0xd434[75]]){_0x5a11x1f[_0xd434[76]]= [{all:true}]};return db[_0xd434[50]][_0xd434[77]](_0x5a11x1f)})[_0xd434[40]](function(_0x5a11x32){_0x5a11x2e[_0xd434[74]]= _0x5a11x32;return _0x5a11x2e})[_0xd434[40]](respondWithFilteredResult(_0x5a11x1a,_0x5a11x1f))[_0xd434[73]](handleError(_0x5a11x1a,null))};exports[_0xd434[78]]= function(_0x5a11x2c,_0x5a11x1a){var _0x5a11x1f={raw:true,where:{id:_0x5a11x2c[_0xd434[80]][_0xd434[79]]}},_0x5a11x2d={};_0x5a11x2d[_0xd434[48]]= _[_0xd434[51]](db[_0xd434[50]][_0xd434[49]]);_0x5a11x2d[_0xd434[53]]= _[_0xd434[51]](_0x5a11x2c[_0xd434[53]]);_0x5a11x2d[_0xd434[55]]= _[_0xd434[56]](_0x5a11x2d[_0xd434[48]],_0x5a11x2d[_0xd434[53]]);_0x5a11x1f[_0xd434[57]]= _[_0xd434[56]](_0x5a11x2d[_0xd434[48]],qs[_0xd434[58]](_0x5a11x2c[_0xd434[53]][_0xd434[58]]));_0x5a11x1f[_0xd434[57]]= (_0x5a11x1f[_0xd434[57]][_0xd434[59]])?_0x5a11x1f[_0xd434[57]]:_0x5a11x2d[_0xd434[48]];if(_0x5a11x2c[_0xd434[53]][_0xd434[75]]){_0x5a11x1f[_0xd434[76]]= [{all:true}]};_0x5a11x1f= _[_0xd434[68]]({},_0x5a11x1f,_0x5a11x2c[_0xd434[72]]);return db[_0xd434[50]][_0xd434[81]](_0x5a11x1f)[_0xd434[40]](handleEntityNotFound(_0x5a11x1a,null))[_0xd434[40]](respondWithResult(_0x5a11x1a,null))[_0xd434[73]](handleError(_0x5a11x1a,null))};exports[_0xd434[82]]= function(_0x5a11x2c,_0x5a11x1a){return db[_0xd434[50]][_0xd434[82]](_0x5a11x2c[_0xd434[83]],{})[_0xd434[40]](respondWithResult(_0x5a11x1a,201))[_0xd434[73]](handleError(_0x5a11x1a,null))};exports[_0xd434[41]]= function(_0x5a11x2c,_0x5a11x1a){if(_0x5a11x2c[_0xd434[83]][_0xd434[79]]){delete _0x5a11x2c[_0xd434[83]][_0xd434[79]]};return db[_0xd434[50]][_0xd434[81]]({where:{id:_0x5a11x2c[_0xd434[80]][_0xd434[79]]}})[_0xd434[40]](handleEntityNotFound(_0x5a11x1a,null))[_0xd434[40]](saveUpdates(_0x5a11x2c[_0xd434[83]],null))[_0xd434[40]](respondWithResult(_0x5a11x1a,null))[_0xd434[73]](handleError(_0x5a11x1a,null))};exports[_0xd434[42]]= function(_0x5a11x2c,_0x5a11x1a){return db[_0xd434[50]][_0xd434[81]]({where:{id:_0x5a11x2c[_0xd434[80]][_0xd434[79]]}})[_0xd434[40]](handleEntityNotFound(_0x5a11x1a,null))[_0xd434[40]](removeEntity(_0x5a11x1a,null))[_0xd434[73]](handleError(_0x5a11x1a,null))};exports[_0xd434[84]]= function(_0x5a11x2c,_0x5a11x1a,_0x5a11x33){var _0x5a11x34=require(_0xd434[85]);var _0x5a11x35=false;var _0x5a11x36={};if(_0x5a11x2c[_0xd434[53]][_0xd434[86]]&& _0x5a11x2c[_0xd434[53]][_0xd434[86]]=== _0xd434[87]){_0x5a11x36[_0xd434[87]]= _0x5a11x2c[_0xd434[80]][_0xd434[79]]}else {_0x5a11x36[_0xd434[79]]= _0x5a11x2c[_0xd434[80]][_0xd434[79]]};return db[_0xd434[50]][_0xd434[81]]({where:_0x5a11x36,attributes:[_0xd434[79],_0xd434[88],_0xd434[92]],raw:true})[_0xd434[40]](handleEntityNotFound(_0x5a11x1a,null))[_0xd434[40]](function(_0x5a11x1c){if(_0x5a11x1c){var _0x5a11x37=util[_0xd434[97]](_0xd434[95],_0x5a11x1c[_0xd434[96]]);if(fs[_0xd434[89]](_0x5a11x37)){_0x5a11x35= true;return _0x5a11x34[_0xd434[100]](_0x5a11x37,_0x5a11x1c[_0xd434[88]],config[_0xd434[99]][_0xd434[98]])[_0xd434[40]](function(){return _0x5a11x1c})};return _0x5a11x1c}})[_0xd434[40]](function(_0x5a11x1c){if(_0x5a11x1c){if(!fs[_0xd434[89]](_0x5a11x1c[_0xd434[88]])){throw  new db[_0xd434[91]].ValidationError(_0xd434[90])};if(_0x5a11x1c[_0xd434[92]]){return _0x5a11x1a[_0xd434[84]](_0x5a11x1c[_0xd434[88]],_0x5a11x1c[_0xd434[92]]+ path[_0xd434[93]](_0x5a11x1c[_0xd434[88]]),function(){if(_0x5a11x35){fs[_0xd434[94]](_0x5a11x1c[_0xd434[88]])}})}else {return _0x5a11x1a[_0xd434[84]](_0x5a11x1c[_0xd434[88]],function(_0x5a11x1a){if(_0x5a11x35){fs[_0xd434[94]](_0x5a11x1c[_0xd434[88]])}})}}})[_0xd434[73]](handleError(_0x5a11x1a,null))}
\ No newline at end of file
index 7fb617e..cd4616c 100644 (file)
@@ -1 +1 @@
-var _0x3c17=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x73\x71\x75\x61\x72\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x64\x65\x66\x69\x6E\x65"];_0x3c17[0];var _=require(_0x3c17[1]);var util=require(_0x3c17[2]);var logger=require(_0x3c17[4])(_0x3c17[3]);var moment=require(_0x3c17[5]);var BPromise=require(_0x3c17[6]);var rp=require(_0x3c17[7]);var attributes=require(_0x3c17[8]);module[_0x3c17[9]]= function(_0x3268x8,_0x3268x9){return _0x3268x8[_0x3c17[12]](_0x3c17[10],attributes,{tableName:_0x3c17[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x677d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x73\x71\x75\x61\x72\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x64\x65\x66\x69\x6E\x65"];_0x677d[0];var _=require(_0x677d[1]);var util=require(_0x677d[2]);var logger=require(_0x677d[4])(_0x677d[3]);var moment=require(_0x677d[5]);var BPromise=require(_0x677d[6]);var rp=require(_0x677d[7]);var attributes=require(_0x677d[8]);module[_0x677d[9]]= function(_0x4f68x8,_0x4f68x9){return _0x4f68x8[_0x677d[12]](_0x677d[10],attributes,{tableName:_0x677d[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 767bffb..7409fd1 100644 (file)
@@ -1 +1 @@
-var _0x7088=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67"];_0x7088[0];var _=require(_0x7088[1]);var util=require(_0x7088[2]);var moment=require(_0x7088[3]);var BPromise=require(_0x7088[4]);var rs=require(_0x7088[5]);var fs=require(_0x7088[6]);var db=require(_0x7088[8])[_0x7088[7]];var utils=require(_0x7088[9]);var logger=require(_0x7088[11])(_0x7088[10]);var config=require(_0x7088[12]);var jayson=require(_0x7088[13]);var client=jayson[_0x7088[15]][_0x7088[14]]({port:9002});function respondWithRpcPromise(_0x76adxe,_0x76adxf,_0x76adx10){return  new BPromise(function(_0x76adx11,_0x76adx12){return client[_0x7088[28]](_0x76adxe,_0x76adx10)[_0x7088[27]](function(_0x76adx14){logger[_0x7088[20]](_0x7088[16],_0x76adxf,_0x7088[19]);logger[_0x7088[23]](_0x7088[21],_0x76adxf,_0x7088[19],JSON[_0x7088[22]](_0x76adx14));if(_0x76adx14[_0x7088[17]]){if(_0x76adx14[_0x7088[17]][_0x7088[24]]=== 500){logger[_0x7088[17]](_0x7088[16],_0x76adxf,_0x76adx14[_0x7088[17]][_0x7088[25]]);return _0x76adx12(_0x76adx14[_0x7088[17]][_0x7088[25]])};logger[_0x7088[17]](_0x7088[16],_0x76adxf,_0x76adx14[_0x7088[17]][_0x7088[25]]);return _0x76adx11(_0x76adx14[_0x7088[17]][_0x7088[25]])}else {logger[_0x7088[20]](_0x7088[16],_0x76adxf,_0x7088[19]);_0x76adx11(_0x76adx14[_0x7088[26]][_0x7088[25]])}})[_0x7088[18]](function(_0x76adx13){logger[_0x7088[17]](_0x7088[16],_0x76adxf,_0x76adx13);_0x76adx12(_0x76adx13)})})}exports[_0x7088[29]]= function(_0x76adx10){var _0x76adx15=this;return  new Promise(function(_0x76adx11,_0x76adx12){return db[_0x7088[34]][_0x7088[33]](_0x76adx10[_0x7088[30]],{raw:_0x76adx10[_0x7088[31]]?(_0x76adx10[_0x7088[31]][_0x7088[32]]=== undefined)?true:false:true})[_0x7088[27]](function(_0x76adx14){logger[_0x7088[20]](_0x7088[29],_0x76adx10);logger[_0x7088[23]](_0x7088[29],_0x76adx10,JSON[_0x7088[22]](_0x76adx14));_0x76adx11(_0x76adx14)})[_0x7088[18]](function(_0x76adx13){logger[_0x7088[17]](_0x7088[29],_0x76adx13[_0x7088[25]],_0x76adx10);_0x76adx12(_0x76adx15[_0x7088[17]](500,_0x76adx13[_0x7088[25]]))})})}
\ No newline at end of file
+var _0xdbdd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67"];_0xdbdd[0];var _=require(_0xdbdd[1]);var util=require(_0xdbdd[2]);var moment=require(_0xdbdd[3]);var BPromise=require(_0xdbdd[4]);var rs=require(_0xdbdd[5]);var fs=require(_0xdbdd[6]);var db=require(_0xdbdd[8])[_0xdbdd[7]];var utils=require(_0xdbdd[9]);var logger=require(_0xdbdd[11])(_0xdbdd[10]);var config=require(_0xdbdd[12]);var jayson=require(_0xdbdd[13]);var client=jayson[_0xdbdd[15]][_0xdbdd[14]]({port:9002});function respondWithRpcPromise(_0x4084xe,_0x4084xf,_0x4084x10){return  new BPromise(function(_0x4084x11,_0x4084x12){return client[_0xdbdd[28]](_0x4084xe,_0x4084x10)[_0xdbdd[27]](function(_0x4084x14){logger[_0xdbdd[20]](_0xdbdd[16],_0x4084xf,_0xdbdd[19]);logger[_0xdbdd[23]](_0xdbdd[21],_0x4084xf,_0xdbdd[19],JSON[_0xdbdd[22]](_0x4084x14));if(_0x4084x14[_0xdbdd[17]]){if(_0x4084x14[_0xdbdd[17]][_0xdbdd[24]]=== 500){logger[_0xdbdd[17]](_0xdbdd[16],_0x4084xf,_0x4084x14[_0xdbdd[17]][_0xdbdd[25]]);return _0x4084x12(_0x4084x14[_0xdbdd[17]][_0xdbdd[25]])};logger[_0xdbdd[17]](_0xdbdd[16],_0x4084xf,_0x4084x14[_0xdbdd[17]][_0xdbdd[25]]);return _0x4084x11(_0x4084x14[_0xdbdd[17]][_0xdbdd[25]])}else {logger[_0xdbdd[20]](_0xdbdd[16],_0x4084xf,_0xdbdd[19]);_0x4084x11(_0x4084x14[_0xdbdd[26]][_0xdbdd[25]])}})[_0xdbdd[18]](function(_0x4084x13){logger[_0xdbdd[17]](_0xdbdd[16],_0x4084xf,_0x4084x13);_0x4084x12(_0x4084x13)})})}exports[_0xdbdd[29]]= function(_0x4084x10){var _0x4084x15=this;return  new Promise(function(_0x4084x11,_0x4084x12){return db[_0xdbdd[34]][_0xdbdd[33]](_0x4084x10[_0xdbdd[30]],{raw:_0x4084x10[_0xdbdd[31]]?(_0x4084x10[_0xdbdd[31]][_0xdbdd[32]]=== undefined)?true:false:true})[_0xdbdd[27]](function(_0x4084x14){logger[_0xdbdd[20]](_0xdbdd[29],_0x4084x10);logger[_0xdbdd[23]](_0xdbdd[29],_0x4084x10,JSON[_0xdbdd[22]](_0x4084x14));_0x4084x11(_0x4084x14)})[_0xdbdd[18]](function(_0x4084x13){logger[_0xdbdd[17]](_0xdbdd[29],_0x4084x13[_0xdbdd[25]],_0x4084x10);_0x4084x12(_0x4084x15[_0xdbdd[17]](500,_0x4084x13[_0xdbdd[25]]))})})}
\ No newline at end of file
index cd558b4..fcb86d5 100644 (file)
@@ -1 +1 @@
-var _0xc4f1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc4f1[0];var multer=require(_0xc4f1[1]);var util=require(_0xc4f1[2]);var path=require(_0xc4f1[3]);var express=require(_0xc4f1[4]);var router=express.Router();var auth=require(_0xc4f1[5]);var interaction=require(_0xc4f1[6]);var config=require(_0xc4f1[7]);var controller=require(_0xc4f1[8]);router[_0xc4f1[12]](_0xc4f1[9],auth[_0xc4f1[10]](),controller[_0xc4f1[11]]);router[_0xc4f1[12]](_0xc4f1[13],auth[_0xc4f1[10]](),controller[_0xc4f1[14]]);router[_0xc4f1[12]](_0xc4f1[15],auth[_0xc4f1[10]](),controller[_0xc4f1[16]]);router[_0xc4f1[18]](_0xc4f1[9],auth[_0xc4f1[10]](),controller[_0xc4f1[17]]);router[_0xc4f1[20]](_0xc4f1[15],auth[_0xc4f1[10]](),controller[_0xc4f1[19]]);router[_0xc4f1[22]](_0xc4f1[15],auth[_0xc4f1[10]](),controller[_0xc4f1[21]]);module[_0xc4f1[23]]= router
\ No newline at end of file
+var _0x1d0e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x1d0e[0];var multer=require(_0x1d0e[1]);var util=require(_0x1d0e[2]);var path=require(_0x1d0e[3]);var express=require(_0x1d0e[4]);var router=express.Router();var auth=require(_0x1d0e[5]);var interaction=require(_0x1d0e[6]);var config=require(_0x1d0e[7]);var controller=require(_0x1d0e[8]);router[_0x1d0e[12]](_0x1d0e[9],auth[_0x1d0e[10]](),controller[_0x1d0e[11]]);router[_0x1d0e[12]](_0x1d0e[13],auth[_0x1d0e[10]](),controller[_0x1d0e[14]]);router[_0x1d0e[12]](_0x1d0e[15],auth[_0x1d0e[10]](),controller[_0x1d0e[16]]);router[_0x1d0e[18]](_0x1d0e[9],auth[_0x1d0e[10]](),controller[_0x1d0e[17]]);router[_0x1d0e[20]](_0x1d0e[15],auth[_0x1d0e[10]](),controller[_0x1d0e[19]]);router[_0x1d0e[22]](_0x1d0e[15],auth[_0x1d0e[10]](),controller[_0x1d0e[21]]);module[_0x1d0e[23]]= router
\ No newline at end of file
index ec71072..6c303be 100644 (file)
@@ -1 +1 @@
-var _0x318e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45"];_0x318e[0];var Sequelize=require(_0x318e[1]);module[_0x318e[2]]= {network:{type:Sequelize[_0x318e[3]]},network_script:{type:Sequelize[_0x318e[3]]},request:{type:Sequelize[_0x318e[3]]},channel:{type:Sequelize[_0x318e[3]]},language:{type:Sequelize[_0x318e[3]]},type:{type:Sequelize[_0x318e[3]]},uniqueid:{type:Sequelize[_0x318e[3]]},version:{type:Sequelize[_0x318e[3]]},callerid:{type:Sequelize[_0x318e[3]]},calleridname:{type:Sequelize[_0x318e[3]]},callingpres:{type:Sequelize[_0x318e[3]]},callingani2:{type:Sequelize[_0x318e[3]]},callington:{type:Sequelize[_0x318e[3]]},callingtns:{type:Sequelize[_0x318e[3]]},dnid:{type:Sequelize[_0x318e[3]]},rdnis:{type:Sequelize[_0x318e[3]]},context:{type:Sequelize[_0x318e[3]]},extension:{type:Sequelize[_0x318e[3]]},priority:{type:Sequelize[_0x318e[3]]},enhanced:{type:Sequelize[_0x318e[3]]},accountcode:{type:Sequelize[_0x318e[3]]},threadid:{type:Sequelize[_0x318e[3]]},project_name:{type:Sequelize[_0x318e[3]]},joinAt:{type:Sequelize[_0x318e[4]]},leaveAt:{type:Sequelize[_0x318e[4]]}}
\ No newline at end of file
+var _0x1a4a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45"];_0x1a4a[0];var Sequelize=require(_0x1a4a[1]);module[_0x1a4a[2]]= {network:{type:Sequelize[_0x1a4a[3]]},network_script:{type:Sequelize[_0x1a4a[3]]},request:{type:Sequelize[_0x1a4a[3]]},channel:{type:Sequelize[_0x1a4a[3]]},language:{type:Sequelize[_0x1a4a[3]]},type:{type:Sequelize[_0x1a4a[3]]},uniqueid:{type:Sequelize[_0x1a4a[3]]},version:{type:Sequelize[_0x1a4a[3]]},callerid:{type:Sequelize[_0x1a4a[3]]},calleridname:{type:Sequelize[_0x1a4a[3]]},callingpres:{type:Sequelize[_0x1a4a[3]]},callingani2:{type:Sequelize[_0x1a4a[3]]},callington:{type:Sequelize[_0x1a4a[3]]},callingtns:{type:Sequelize[_0x1a4a[3]]},dnid:{type:Sequelize[_0x1a4a[3]]},rdnis:{type:Sequelize[_0x1a4a[3]]},context:{type:Sequelize[_0x1a4a[3]]},extension:{type:Sequelize[_0x1a4a[3]]},priority:{type:Sequelize[_0x1a4a[3]]},enhanced:{type:Sequelize[_0x1a4a[3]]},accountcode:{type:Sequelize[_0x1a4a[3]]},threadid:{type:Sequelize[_0x1a4a[3]]},project_name:{type:Sequelize[_0x1a4a[3]]},joinAt:{type:Sequelize[_0x1a4a[4]]},leaveAt:{type:Sequelize[_0x1a4a[4]]}}
\ No newline at end of file
index a809652..130554d 100644 (file)
@@ -1 +1 @@
-var _0x3bb4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x3bb4[0];var jsonpatch=require(_0x3bb4[1]);var rp=require(_0x3bb4[2]);var moment=require(_0x3bb4[3]);var BPromise=require(_0x3bb4[4]);var Mustache=require(_0x3bb4[5]);var util=require(_0x3bb4[6]);var path=require(_0x3bb4[7]);var sox=require(_0x3bb4[8]);var csv=require(_0x3bb4[9]);var ejs=require(_0x3bb4[10]);var fs=require(_0x3bb4[11]);var _=require(_0x3bb4[12]);var squel=require(_0x3bb4[13]);var crypto=require(_0x3bb4[14]);var jsforce=require(_0x3bb4[15]);var deskjs=require(_0x3bb4[16]);var toCsv=require(_0x3bb4[9]);var querystring=require(_0x3bb4[17]);var Papa=require(_0x3bb4[18]);var qs=require(_0x3bb4[19]);var logger=require(_0x3bb4[21])(_0x3bb4[20]);var utils=require(_0x3bb4[22]);var config=require(_0x3bb4[23]);var db=require(_0x3bb4[25])[_0x3bb4[24]];function respondWithStatusCode(_0xe176x1a,_0xe176x1b){_0xe176x1b= _0xe176x1b|| 204;return function(_0xe176x1c){if(_0xe176x1c){return _0xe176x1a[_0x3bb4[26]](_0xe176x1b)};return _0xe176x1a[_0x3bb4[28]](_0xe176x1b)[_0x3bb4[27]]()}}function respondWithResult(_0xe176x1a,_0xe176x1b){_0xe176x1b= _0xe176x1b|| 200;return function(_0xe176x1c){if(_0xe176x1c){return _0xe176x1a[_0x3bb4[28]](_0xe176x1b)[_0x3bb4[29]](_0xe176x1c)}}}function respondWithFilteredResult(_0xe176x1a,_0xe176x1f){return function(_0xe176x1c){if(_0xe176x1c){var _0xe176x20=_0xe176x1c[_0x3bb4[30]],_0xe176x21=_0xe176x1f[_0x3bb4[31]],_0xe176x22=_0xe176x1f[_0x3bb4[31]]+ _0xe176x1f[_0x3bb4[32]],_0xe176x1b;if(_0xe176x22>= _0xe176x20){_0xe176x22= _0xe176x20;_0xe176x1b= 200}else {_0xe176x1b= 206};_0xe176x1a[_0x3bb4[28]](_0xe176x1b);return _0xe176x1a[_0x3bb4[36]](_0x3bb4[33],_0xe176x21+ _0x3bb4[34]+ _0xe176x22+ _0x3bb4[35]+ _0xe176x20)[_0x3bb4[29]](_0xe176x1c)};return null}}function patchUpdates(_0xe176x24){return function(_0xe176x1c){try{jsonpatch[_0x3bb4[37]](_0xe176x1c,_0xe176x24,true)}catch(err){return BPromise[_0x3bb4[38]](err)};return _0xe176x1c[_0x3bb4[39]]()}}function saveUpdates(_0xe176x26,_0xe176x1b){return function(_0xe176x1c){if(_0xe176x1c){return _0xe176x1c[_0x3bb4[41]](_0xe176x26)[_0x3bb4[40]](function(_0xe176x27){return _0xe176x27})};return null}}function removeEntity(_0xe176x1a,_0xe176x1b){return function(_0xe176x1c){if(_0xe176x1c){return _0xe176x1c[_0x3bb4[42]]()[_0x3bb4[40]](function(){_0xe176x1a[_0x3bb4[28]](204)[_0x3bb4[27]]()})}}}function handleEntityNotFound(_0xe176x1a,_0xe176x1b){return function(_0xe176x1c){if(!_0xe176x1c){_0xe176x1a[_0x3bb4[26]](404)};return _0xe176x1c}}function handleError(_0xe176x1a,_0xe176x1b){_0xe176x1b= _0xe176x1b|| 500;return function(_0xe176x2b){logger[_0x3bb4[44]](_0xe176x2b[_0x3bb4[43]]);if(_0xe176x2b[_0x3bb4[45]]){delete _0xe176x2b[_0x3bb4[45]]};_0xe176x1a[_0x3bb4[28]](_0xe176x1b)[_0x3bb4[46]](_0xe176x2b)}}exports[_0x3bb4[47]]= function(_0xe176x2c,_0xe176x1a){var _0xe176x1f={},_0xe176x2d={},_0xe176x2e={count:0,rows:[]};_0xe176x2d[_0x3bb4[48]]= _[_0x3bb4[51]](db[_0x3bb4[50]][_0x3bb4[49]]);var _0xe176x2f={dateStart:_0xe176x2c[_0x3bb4[53]][_0x3bb4[52]],dateEnd:_0xe176x2c[_0x3bb4[53]][_0x3bb4[54]]};delete _0xe176x2c[_0x3bb4[53]][_0x3bb4[52]];delete _0xe176x2c[_0x3bb4[53]][_0x3bb4[54]];_0xe176x2d[_0x3bb4[53]]= _[_0x3bb4[51]](_0xe176x2c[_0x3bb4[53]]);_0xe176x2d[_0x3bb4[55]]= _[_0x3bb4[56]](_0xe176x2d[_0x3bb4[48]],_0xe176x2d[_0x3bb4[53]]);_0xe176x1f[_0x3bb4[57]]= _[_0x3bb4[56]](_0xe176x2d[_0x3bb4[48]],qs[_0x3bb4[58]](_0xe176x2c[_0x3bb4[53]][_0x3bb4[58]]));_0xe176x1f[_0x3bb4[57]]= (_0xe176x1f[_0x3bb4[57]][_0x3bb4[59]])?_0xe176x1f[_0x3bb4[57]]:_0xe176x2d[_0x3bb4[48]];if(!_0xe176x2c[_0x3bb4[53]][_0x3bb4[61]](_0x3bb4[60])){_0xe176x1f[_0x3bb4[32]]= qs[_0x3bb4[32]](_0xe176x2c[_0x3bb4[53]][_0x3bb4[32]]);_0xe176x1f[_0x3bb4[31]]= qs[_0x3bb4[31]](_0xe176x2c[_0x3bb4[53]][_0x3bb4[31]])};_0xe176x1f[_0x3bb4[62]]= qs[_0x3bb4[63]](_0xe176x2c[_0x3bb4[53]][_0x3bb4[63]]);_0xe176x1f[_0x3bb4[64]]= qs[_0x3bb4[55]](_[_0x3bb4[65]](_0xe176x2c[_0x3bb4[53]],_0xe176x2d[_0x3bb4[55]]));if(_0xe176x2f[_0x3bb4[52]]){if(_0xe176x2f[_0x3bb4[54]]){_0xe176x2f[_0x3bb4[54]]= moment(_0xe176x2f[_0x3bb4[54]])[_0x3bb4[67]](1,_0x3bb4[66])}else {_0xe176x2f[_0x3bb4[54]]= moment(_0xe176x2f[_0x3bb4[52]])[_0x3bb4[67]](1,_0x3bb4[66])};_[_0x3bb4[68]](_0xe176x1f[_0x3bb4[64]],{createdAt:{$gte:_0xe176x2f[_0x3bb4[52]],$lte:_0xe176x2f[_0x3bb4[54]]}})};if(_0xe176x2c[_0x3bb4[53]][_0x3bb4[69]]){_0xe176x1f[_0x3bb4[64]]= _[_0x3bb4[68]](_0xe176x1f[_0x3bb4[64]],{$or:_[_0x3bb4[71]](_0xe176x1f[_0x3bb4[57]],function(_0xe176x30){var _0xe176x2e={};_0xe176x2e[_0xe176x30]= {$like:_0x3bb4[70]+ _0xe176x2c[_0x3bb4[53]][_0x3bb4[69]]+ _0x3bb4[70]};return _0xe176x2e})})};_0xe176x1f= _[_0x3bb4[68]]({},_0xe176x1f,_0xe176x2c[_0x3bb4[72]]);var _0xe176x31={where:_0xe176x1f[_0x3bb4[64]]};return db[_0x3bb4[50]][_0x3bb4[30]](_0xe176x31)[_0x3bb4[40]](function(_0xe176x20){_0xe176x2e[_0x3bb4[30]]= _0xe176x20;if(_0xe176x2c[_0x3bb4[53]][_0x3bb4[75]]){_0xe176x1f[_0x3bb4[76]]= [{all:true}]};return db[_0x3bb4[50]][_0x3bb4[77]](_0xe176x1f)})[_0x3bb4[40]](function(_0xe176x32){_0xe176x2e[_0x3bb4[74]]= _0xe176x32;return _0xe176x2e})[_0x3bb4[40]](respondWithFilteredResult(_0xe176x1a,_0xe176x1f))[_0x3bb4[73]](handleError(_0xe176x1a,null))};exports[_0x3bb4[78]]= function(_0xe176x2c,_0xe176x1a){var _0xe176x1f={raw:true,where:{id:_0xe176x2c[_0x3bb4[80]][_0x3bb4[79]]}},_0xe176x2d={};_0xe176x2d[_0x3bb4[48]]= _[_0x3bb4[51]](db[_0x3bb4[50]][_0x3bb4[49]]);_0xe176x2d[_0x3bb4[53]]= _[_0x3bb4[51]](_0xe176x2c[_0x3bb4[53]]);_0xe176x2d[_0x3bb4[55]]= _[_0x3bb4[56]](_0xe176x2d[_0x3bb4[48]],_0xe176x2d[_0x3bb4[53]]);_0xe176x1f[_0x3bb4[57]]= _[_0x3bb4[56]](_0xe176x2d[_0x3bb4[48]],qs[_0x3bb4[58]](_0xe176x2c[_0x3bb4[53]][_0x3bb4[58]]));_0xe176x1f[_0x3bb4[57]]= (_0xe176x1f[_0x3bb4[57]][_0x3bb4[59]])?_0xe176x1f[_0x3bb4[57]]:_0xe176x2d[_0x3bb4[48]];if(_0xe176x2c[_0x3bb4[53]][_0x3bb4[75]]){_0xe176x1f[_0x3bb4[76]]= [{all:true}]};_0xe176x1f= _[_0x3bb4[68]]({},_0xe176x1f,_0xe176x2c[_0x3bb4[72]]);return db[_0x3bb4[50]][_0x3bb4[81]](_0xe176x1f)[_0x3bb4[40]](handleEntityNotFound(_0xe176x1a,null))[_0x3bb4[40]](respondWithResult(_0xe176x1a,null))[_0x3bb4[73]](handleError(_0xe176x1a,null))};exports[_0x3bb4[82]]= function(_0xe176x2c,_0xe176x1a){return db[_0x3bb4[50]][_0x3bb4[82]](_0xe176x2c[_0x3bb4[83]],{})[_0x3bb4[40]](respondWithResult(_0xe176x1a,201))[_0x3bb4[73]](handleError(_0xe176x1a,null))};exports[_0x3bb4[41]]= function(_0xe176x2c,_0xe176x1a){if(_0xe176x2c[_0x3bb4[83]][_0x3bb4[79]]){delete _0xe176x2c[_0x3bb4[83]][_0x3bb4[79]]};return db[_0x3bb4[50]][_0x3bb4[81]]({where:{id:_0xe176x2c[_0x3bb4[80]][_0x3bb4[79]]}})[_0x3bb4[40]](handleEntityNotFound(_0xe176x1a,null))[_0x3bb4[40]](saveUpdates(_0xe176x2c[_0x3bb4[83]],null))[_0x3bb4[40]](respondWithResult(_0xe176x1a,null))[_0x3bb4[73]](handleError(_0xe176x1a,null))};exports[_0x3bb4[42]]= function(_0xe176x2c,_0xe176x1a){return db[_0x3bb4[50]][_0x3bb4[81]]({where:{id:_0xe176x2c[_0x3bb4[80]][_0x3bb4[79]]}})[_0x3bb4[40]](handleEntityNotFound(_0xe176x1a,null))[_0x3bb4[40]](removeEntity(_0xe176x1a,null))[_0x3bb4[73]](handleError(_0xe176x1a,null))};exports[_0x3bb4[84]]= function(_0xe176x2c,_0xe176x1a){return db[_0x3bb4[50]][_0x3bb4[84]]()[_0x3bb4[40]](respondWithResult(_0xe176x1a,null))[_0x3bb4[73]](handleError(_0xe176x1a,null))}
\ No newline at end of file
+var _0x33ba=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x33ba[0];var jsonpatch=require(_0x33ba[1]);var rp=require(_0x33ba[2]);var moment=require(_0x33ba[3]);var BPromise=require(_0x33ba[4]);var Mustache=require(_0x33ba[5]);var util=require(_0x33ba[6]);var path=require(_0x33ba[7]);var sox=require(_0x33ba[8]);var csv=require(_0x33ba[9]);var ejs=require(_0x33ba[10]);var fs=require(_0x33ba[11]);var _=require(_0x33ba[12]);var squel=require(_0x33ba[13]);var crypto=require(_0x33ba[14]);var jsforce=require(_0x33ba[15]);var deskjs=require(_0x33ba[16]);var toCsv=require(_0x33ba[9]);var querystring=require(_0x33ba[17]);var Papa=require(_0x33ba[18]);var qs=require(_0x33ba[19]);var logger=require(_0x33ba[21])(_0x33ba[20]);var utils=require(_0x33ba[22]);var config=require(_0x33ba[23]);var db=require(_0x33ba[25])[_0x33ba[24]];function respondWithStatusCode(_0x6d99x1a,_0x6d99x1b){_0x6d99x1b= _0x6d99x1b|| 204;return function(_0x6d99x1c){if(_0x6d99x1c){return _0x6d99x1a[_0x33ba[26]](_0x6d99x1b)};return _0x6d99x1a[_0x33ba[28]](_0x6d99x1b)[_0x33ba[27]]()}}function respondWithResult(_0x6d99x1a,_0x6d99x1b){_0x6d99x1b= _0x6d99x1b|| 200;return function(_0x6d99x1c){if(_0x6d99x1c){return _0x6d99x1a[_0x33ba[28]](_0x6d99x1b)[_0x33ba[29]](_0x6d99x1c)}}}function respondWithFilteredResult(_0x6d99x1a,_0x6d99x1f){return function(_0x6d99x1c){if(_0x6d99x1c){var _0x6d99x20=_0x6d99x1c[_0x33ba[30]],_0x6d99x21=_0x6d99x1f[_0x33ba[31]],_0x6d99x22=_0x6d99x1f[_0x33ba[31]]+ _0x6d99x1f[_0x33ba[32]],_0x6d99x1b;if(_0x6d99x22>= _0x6d99x20){_0x6d99x22= _0x6d99x20;_0x6d99x1b= 200}else {_0x6d99x1b= 206};_0x6d99x1a[_0x33ba[28]](_0x6d99x1b);return _0x6d99x1a[_0x33ba[36]](_0x33ba[33],_0x6d99x21+ _0x33ba[34]+ _0x6d99x22+ _0x33ba[35]+ _0x6d99x20)[_0x33ba[29]](_0x6d99x1c)};return null}}function patchUpdates(_0x6d99x24){return function(_0x6d99x1c){try{jsonpatch[_0x33ba[37]](_0x6d99x1c,_0x6d99x24,true)}catch(err){return BPromise[_0x33ba[38]](err)};return _0x6d99x1c[_0x33ba[39]]()}}function saveUpdates(_0x6d99x26,_0x6d99x1b){return function(_0x6d99x1c){if(_0x6d99x1c){return _0x6d99x1c[_0x33ba[41]](_0x6d99x26)[_0x33ba[40]](function(_0x6d99x27){return _0x6d99x27})};return null}}function removeEntity(_0x6d99x1a,_0x6d99x1b){return function(_0x6d99x1c){if(_0x6d99x1c){return _0x6d99x1c[_0x33ba[42]]()[_0x33ba[40]](function(){_0x6d99x1a[_0x33ba[28]](204)[_0x33ba[27]]()})}}}function handleEntityNotFound(_0x6d99x1a,_0x6d99x1b){return function(_0x6d99x1c){if(!_0x6d99x1c){_0x6d99x1a[_0x33ba[26]](404)};return _0x6d99x1c}}function handleError(_0x6d99x1a,_0x6d99x1b){_0x6d99x1b= _0x6d99x1b|| 500;return function(_0x6d99x2b){logger[_0x33ba[44]](_0x6d99x2b[_0x33ba[43]]);if(_0x6d99x2b[_0x33ba[45]]){delete _0x6d99x2b[_0x33ba[45]]};_0x6d99x1a[_0x33ba[28]](_0x6d99x1b)[_0x33ba[46]](_0x6d99x2b)}}exports[_0x33ba[47]]= function(_0x6d99x2c,_0x6d99x1a){var _0x6d99x1f={},_0x6d99x2d={},_0x6d99x2e={count:0,rows:[]};_0x6d99x2d[_0x33ba[48]]= _[_0x33ba[51]](db[_0x33ba[50]][_0x33ba[49]]);var _0x6d99x2f={dateStart:_0x6d99x2c[_0x33ba[53]][_0x33ba[52]],dateEnd:_0x6d99x2c[_0x33ba[53]][_0x33ba[54]]};delete _0x6d99x2c[_0x33ba[53]][_0x33ba[52]];delete _0x6d99x2c[_0x33ba[53]][_0x33ba[54]];_0x6d99x2d[_0x33ba[53]]= _[_0x33ba[51]](_0x6d99x2c[_0x33ba[53]]);_0x6d99x2d[_0x33ba[55]]= _[_0x33ba[56]](_0x6d99x2d[_0x33ba[48]],_0x6d99x2d[_0x33ba[53]]);_0x6d99x1f[_0x33ba[57]]= _[_0x33ba[56]](_0x6d99x2d[_0x33ba[48]],qs[_0x33ba[58]](_0x6d99x2c[_0x33ba[53]][_0x33ba[58]]));_0x6d99x1f[_0x33ba[57]]= (_0x6d99x1f[_0x33ba[57]][_0x33ba[59]])?_0x6d99x1f[_0x33ba[57]]:_0x6d99x2d[_0x33ba[48]];if(!_0x6d99x2c[_0x33ba[53]][_0x33ba[61]](_0x33ba[60])){_0x6d99x1f[_0x33ba[32]]= qs[_0x33ba[32]](_0x6d99x2c[_0x33ba[53]][_0x33ba[32]]);_0x6d99x1f[_0x33ba[31]]= qs[_0x33ba[31]](_0x6d99x2c[_0x33ba[53]][_0x33ba[31]])};_0x6d99x1f[_0x33ba[62]]= qs[_0x33ba[63]](_0x6d99x2c[_0x33ba[53]][_0x33ba[63]]);_0x6d99x1f[_0x33ba[64]]= qs[_0x33ba[55]](_[_0x33ba[65]](_0x6d99x2c[_0x33ba[53]],_0x6d99x2d[_0x33ba[55]]));if(_0x6d99x2f[_0x33ba[52]]){if(_0x6d99x2f[_0x33ba[54]]){_0x6d99x2f[_0x33ba[54]]= moment(_0x6d99x2f[_0x33ba[54]])[_0x33ba[67]](1,_0x33ba[66])}else {_0x6d99x2f[_0x33ba[54]]= moment(_0x6d99x2f[_0x33ba[52]])[_0x33ba[67]](1,_0x33ba[66])};_[_0x33ba[68]](_0x6d99x1f[_0x33ba[64]],{createdAt:{$gte:_0x6d99x2f[_0x33ba[52]],$lte:_0x6d99x2f[_0x33ba[54]]}})};if(_0x6d99x2c[_0x33ba[53]][_0x33ba[69]]){_0x6d99x1f[_0x33ba[64]]= _[_0x33ba[68]](_0x6d99x1f[_0x33ba[64]],{$or:_[_0x33ba[71]](_0x6d99x1f[_0x33ba[57]],function(_0x6d99x30){var _0x6d99x2e={};_0x6d99x2e[_0x6d99x30]= {$like:_0x33ba[70]+ _0x6d99x2c[_0x33ba[53]][_0x33ba[69]]+ _0x33ba[70]};return _0x6d99x2e})})};_0x6d99x1f= _[_0x33ba[68]]({},_0x6d99x1f,_0x6d99x2c[_0x33ba[72]]);var _0x6d99x31={where:_0x6d99x1f[_0x33ba[64]]};return db[_0x33ba[50]][_0x33ba[30]](_0x6d99x31)[_0x33ba[40]](function(_0x6d99x20){_0x6d99x2e[_0x33ba[30]]= _0x6d99x20;if(_0x6d99x2c[_0x33ba[53]][_0x33ba[75]]){_0x6d99x1f[_0x33ba[76]]= [{all:true}]};return db[_0x33ba[50]][_0x33ba[77]](_0x6d99x1f)})[_0x33ba[40]](function(_0x6d99x32){_0x6d99x2e[_0x33ba[74]]= _0x6d99x32;return _0x6d99x2e})[_0x33ba[40]](respondWithFilteredResult(_0x6d99x1a,_0x6d99x1f))[_0x33ba[73]](handleError(_0x6d99x1a,null))};exports[_0x33ba[78]]= function(_0x6d99x2c,_0x6d99x1a){var _0x6d99x1f={raw:true,where:{id:_0x6d99x2c[_0x33ba[80]][_0x33ba[79]]}},_0x6d99x2d={};_0x6d99x2d[_0x33ba[48]]= _[_0x33ba[51]](db[_0x33ba[50]][_0x33ba[49]]);_0x6d99x2d[_0x33ba[53]]= _[_0x33ba[51]](_0x6d99x2c[_0x33ba[53]]);_0x6d99x2d[_0x33ba[55]]= _[_0x33ba[56]](_0x6d99x2d[_0x33ba[48]],_0x6d99x2d[_0x33ba[53]]);_0x6d99x1f[_0x33ba[57]]= _[_0x33ba[56]](_0x6d99x2d[_0x33ba[48]],qs[_0x33ba[58]](_0x6d99x2c[_0x33ba[53]][_0x33ba[58]]));_0x6d99x1f[_0x33ba[57]]= (_0x6d99x1f[_0x33ba[57]][_0x33ba[59]])?_0x6d99x1f[_0x33ba[57]]:_0x6d99x2d[_0x33ba[48]];if(_0x6d99x2c[_0x33ba[53]][_0x33ba[75]]){_0x6d99x1f[_0x33ba[76]]= [{all:true}]};_0x6d99x1f= _[_0x33ba[68]]({},_0x6d99x1f,_0x6d99x2c[_0x33ba[72]]);return db[_0x33ba[50]][_0x33ba[81]](_0x6d99x1f)[_0x33ba[40]](handleEntityNotFound(_0x6d99x1a,null))[_0x33ba[40]](respondWithResult(_0x6d99x1a,null))[_0x33ba[73]](handleError(_0x6d99x1a,null))};exports[_0x33ba[82]]= function(_0x6d99x2c,_0x6d99x1a){return db[_0x33ba[50]][_0x33ba[82]](_0x6d99x2c[_0x33ba[83]],{})[_0x33ba[40]](respondWithResult(_0x6d99x1a,201))[_0x33ba[73]](handleError(_0x6d99x1a,null))};exports[_0x33ba[41]]= function(_0x6d99x2c,_0x6d99x1a){if(_0x6d99x2c[_0x33ba[83]][_0x33ba[79]]){delete _0x6d99x2c[_0x33ba[83]][_0x33ba[79]]};return db[_0x33ba[50]][_0x33ba[81]]({where:{id:_0x6d99x2c[_0x33ba[80]][_0x33ba[79]]}})[_0x33ba[40]](handleEntityNotFound(_0x6d99x1a,null))[_0x33ba[40]](saveUpdates(_0x6d99x2c[_0x33ba[83]],null))[_0x33ba[40]](respondWithResult(_0x6d99x1a,null))[_0x33ba[73]](handleError(_0x6d99x1a,null))};exports[_0x33ba[42]]= function(_0x6d99x2c,_0x6d99x1a){return db[_0x33ba[50]][_0x33ba[81]]({where:{id:_0x6d99x2c[_0x33ba[80]][_0x33ba[79]]}})[_0x33ba[40]](handleEntityNotFound(_0x6d99x1a,null))[_0x33ba[40]](removeEntity(_0x6d99x1a,null))[_0x33ba[73]](handleError(_0x6d99x1a,null))};exports[_0x33ba[84]]= function(_0x6d99x2c,_0x6d99x1a){return db[_0x33ba[50]][_0x33ba[84]]()[_0x33ba[40]](respondWithResult(_0x6d99x1a,null))[_0x33ba[73]](handleError(_0x6d99x1a,null))}
\ No newline at end of file
index ccda486..eb16cf9 100644 (file)
@@ -1 +1 @@
-var _0xea19=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65","\x64\x65\x66\x69\x6E\x65"];_0xea19[0];var _=require(_0xea19[1]);var util=require(_0xea19[2]);var logger=require(_0xea19[4])(_0xea19[3]);var moment=require(_0xea19[5]);var BPromise=require(_0xea19[6]);var rp=require(_0xea19[7]);var attributes=require(_0xea19[8]);module[_0xea19[9]]= function(_0x20fcx8,_0x20fcx9){return _0x20fcx8[_0xea19[12]](_0xea19[10],attributes,{tableName:_0xea19[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x22e2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65","\x64\x65\x66\x69\x6E\x65"];_0x22e2[0];var _=require(_0x22e2[1]);var util=require(_0x22e2[2]);var logger=require(_0x22e2[4])(_0x22e2[3]);var moment=require(_0x22e2[5]);var BPromise=require(_0x22e2[6]);var rp=require(_0x22e2[7]);var attributes=require(_0x22e2[8]);module[_0x22e2[9]]= function(_0xa370x8,_0xa370x9){return _0xa370x8[_0x22e2[12]](_0x22e2[10],attributes,{tableName:_0x22e2[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index cdf4f52..c65ea78 100644 (file)
@@ -1 +1 @@
-var _0x6a21=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x55\x70\x64\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65"];_0x6a21[0];var _=require(_0x6a21[1]);var util=require(_0x6a21[2]);var moment=require(_0x6a21[3]);var BPromise=require(_0x6a21[4]);var rs=require(_0x6a21[5]);var fs=require(_0x6a21[6]);var db=require(_0x6a21[8])[_0x6a21[7]];var utils=require(_0x6a21[9]);var logger=require(_0x6a21[11])(_0x6a21[10]);var config=require(_0x6a21[12]);var jayson=require(_0x6a21[13]);var client=jayson[_0x6a21[15]][_0x6a21[14]]({port:9002});function respondWithRpcPromise(_0x8424xe,_0x8424xf,_0x8424x10){return  new BPromise(function(_0x8424x11,_0x8424x12){return client[_0x6a21[28]](_0x8424xe,_0x8424x10)[_0x6a21[27]](function(_0x8424x14){logger[_0x6a21[20]](_0x6a21[16],_0x8424xf,_0x6a21[19]);logger[_0x6a21[23]](_0x6a21[21],_0x8424xf,_0x6a21[19],JSON[_0x6a21[22]](_0x8424x14));if(_0x8424x14[_0x6a21[17]]){if(_0x8424x14[_0x6a21[17]][_0x6a21[24]]=== 500){logger[_0x6a21[17]](_0x6a21[16],_0x8424xf,_0x8424x14[_0x6a21[17]][_0x6a21[25]]);return _0x8424x12(_0x8424x14[_0x6a21[17]][_0x6a21[25]])};logger[_0x6a21[17]](_0x6a21[16],_0x8424xf,_0x8424x14[_0x6a21[17]][_0x6a21[25]]);return _0x8424x11(_0x8424x14[_0x6a21[17]][_0x6a21[25]])}else {logger[_0x6a21[20]](_0x6a21[16],_0x8424xf,_0x6a21[19]);_0x8424x11(_0x8424x14[_0x6a21[26]][_0x6a21[25]])}})[_0x6a21[18]](function(_0x8424x13){logger[_0x6a21[17]](_0x6a21[16],_0x8424xf,_0x8424x13);_0x8424x12(_0x8424x13)})})}exports[_0x6a21[29]]= function(_0x8424x10){var _0x8424x15=this;return  new Promise(function(_0x8424x11,_0x8424x12){return db[_0x6a21[34]][_0x6a21[33]](_0x8424x10[_0x6a21[30]],{raw:_0x8424x10[_0x6a21[31]]?(_0x8424x10[_0x6a21[31]][_0x6a21[32]]=== undefined)?true:false:true})[_0x6a21[27]](function(_0x8424x14){logger[_0x6a21[20]](_0x6a21[29],_0x8424x10);logger[_0x6a21[23]](_0x6a21[29],_0x8424x10,JSON[_0x6a21[22]](_0x8424x14));_0x8424x11(_0x8424x14)})[_0x6a21[18]](function(_0x8424x13){logger[_0x6a21[17]](_0x6a21[29],_0x8424x13[_0x6a21[25]],_0x8424x10);_0x8424x12(_0x8424x15[_0x6a21[17]](500,_0x8424x13[_0x6a21[25]]))})})};exports[_0x6a21[35]]= function(_0x8424x10){var _0x8424x15=this;return  new Promise(function(_0x8424x11,_0x8424x12){return db[_0x6a21[34]][_0x6a21[39]](_0x8424x10[_0x6a21[30]],{raw:_0x8424x10[_0x6a21[31]]?(_0x8424x10[_0x6a21[31]][_0x6a21[32]]=== undefined)?true:false:true,individualHooks:true,where:_0x8424x10[_0x6a21[31]]?_0x8424x10[_0x6a21[31]][_0x6a21[36]]|| null:null,attributes:_0x8424x10[_0x6a21[31]]?_0x8424x10[_0x6a21[31]][_0x6a21[37]]|| null:null,limit:_0x8424x10[_0x6a21[31]]?_0x8424x10[_0x6a21[31]][_0x6a21[38]]|| null:null})[_0x6a21[27]](function(_0x8424x14){logger[_0x6a21[20]](_0x6a21[35],_0x8424x10);logger[_0x6a21[23]](_0x6a21[35],_0x8424x10,JSON[_0x6a21[22]](_0x8424x14));_0x8424x11(_0x8424x14)})[_0x6a21[18]](function(_0x8424x13){logger[_0x6a21[17]](_0x6a21[35],_0x8424x13[_0x6a21[25]],_0x8424x10);_0x8424x12(_0x8424x15[_0x6a21[17]](500,_0x8424x13[_0x6a21[25]]))})})}
\ No newline at end of file
+var _0x9ad5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x55\x70\x64\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65"];_0x9ad5[0];var _=require(_0x9ad5[1]);var util=require(_0x9ad5[2]);var moment=require(_0x9ad5[3]);var BPromise=require(_0x9ad5[4]);var rs=require(_0x9ad5[5]);var fs=require(_0x9ad5[6]);var db=require(_0x9ad5[8])[_0x9ad5[7]];var utils=require(_0x9ad5[9]);var logger=require(_0x9ad5[11])(_0x9ad5[10]);var config=require(_0x9ad5[12]);var jayson=require(_0x9ad5[13]);var client=jayson[_0x9ad5[15]][_0x9ad5[14]]({port:9002});function respondWithRpcPromise(_0xe712xe,_0xe712xf,_0xe712x10){return  new BPromise(function(_0xe712x11,_0xe712x12){return client[_0x9ad5[28]](_0xe712xe,_0xe712x10)[_0x9ad5[27]](function(_0xe712x14){logger[_0x9ad5[20]](_0x9ad5[16],_0xe712xf,_0x9ad5[19]);logger[_0x9ad5[23]](_0x9ad5[21],_0xe712xf,_0x9ad5[19],JSON[_0x9ad5[22]](_0xe712x14));if(_0xe712x14[_0x9ad5[17]]){if(_0xe712x14[_0x9ad5[17]][_0x9ad5[24]]=== 500){logger[_0x9ad5[17]](_0x9ad5[16],_0xe712xf,_0xe712x14[_0x9ad5[17]][_0x9ad5[25]]);return _0xe712x12(_0xe712x14[_0x9ad5[17]][_0x9ad5[25]])};logger[_0x9ad5[17]](_0x9ad5[16],_0xe712xf,_0xe712x14[_0x9ad5[17]][_0x9ad5[25]]);return _0xe712x11(_0xe712x14[_0x9ad5[17]][_0x9ad5[25]])}else {logger[_0x9ad5[20]](_0x9ad5[16],_0xe712xf,_0x9ad5[19]);_0xe712x11(_0xe712x14[_0x9ad5[26]][_0x9ad5[25]])}})[_0x9ad5[18]](function(_0xe712x13){logger[_0x9ad5[17]](_0x9ad5[16],_0xe712xf,_0xe712x13);_0xe712x12(_0xe712x13)})})}exports[_0x9ad5[29]]= function(_0xe712x10){var _0xe712x15=this;return  new Promise(function(_0xe712x11,_0xe712x12){return db[_0x9ad5[34]][_0x9ad5[33]](_0xe712x10[_0x9ad5[30]],{raw:_0xe712x10[_0x9ad5[31]]?(_0xe712x10[_0x9ad5[31]][_0x9ad5[32]]=== undefined)?true:false:true})[_0x9ad5[27]](function(_0xe712x14){logger[_0x9ad5[20]](_0x9ad5[29],_0xe712x10);logger[_0x9ad5[23]](_0x9ad5[29],_0xe712x10,JSON[_0x9ad5[22]](_0xe712x14));_0xe712x11(_0xe712x14)})[_0x9ad5[18]](function(_0xe712x13){logger[_0x9ad5[17]](_0x9ad5[29],_0xe712x13[_0x9ad5[25]],_0xe712x10);_0xe712x12(_0xe712x15[_0x9ad5[17]](500,_0xe712x13[_0x9ad5[25]]))})})};exports[_0x9ad5[35]]= function(_0xe712x10){var _0xe712x15=this;return  new Promise(function(_0xe712x11,_0xe712x12){return db[_0x9ad5[34]][_0x9ad5[39]](_0xe712x10[_0x9ad5[30]],{raw:_0xe712x10[_0x9ad5[31]]?(_0xe712x10[_0x9ad5[31]][_0x9ad5[32]]=== undefined)?true:false:true,individualHooks:true,where:_0xe712x10[_0x9ad5[31]]?_0xe712x10[_0x9ad5[31]][_0x9ad5[36]]|| null:null,attributes:_0xe712x10[_0x9ad5[31]]?_0xe712x10[_0x9ad5[31]][_0x9ad5[37]]|| null:null,limit:_0xe712x10[_0x9ad5[31]]?_0xe712x10[_0x9ad5[31]][_0x9ad5[38]]|| null:null})[_0x9ad5[27]](function(_0xe712x14){logger[_0x9ad5[20]](_0x9ad5[35],_0xe712x10);logger[_0x9ad5[23]](_0x9ad5[35],_0xe712x10,JSON[_0x9ad5[22]](_0xe712x14));_0xe712x11(_0xe712x14)})[_0x9ad5[18]](function(_0xe712x13){logger[_0x9ad5[17]](_0x9ad5[35],_0xe712x13[_0x9ad5[25]],_0xe712x10);_0xe712x12(_0xe712x15[_0x9ad5[17]](500,_0xe712x13[_0x9ad5[25]]))})})}
\ No newline at end of file
index 4c5157f..23279af 100644 (file)
@@ -1 +1 @@
-var _0x9298=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x44\x65\x74\x61\x69\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9298[0];var multer=require(_0x9298[1]);var util=require(_0x9298[2]);var path=require(_0x9298[3]);var express=require(_0x9298[4]);var router=express.Router();var auth=require(_0x9298[5]);var interaction=require(_0x9298[6]);var config=require(_0x9298[7]);var controller=require(_0x9298[8]);router[_0x9298[12]](_0x9298[9],auth[_0x9298[10]](),controller[_0x9298[11]]);router[_0x9298[12]](_0x9298[13],auth[_0x9298[10]](),controller[_0x9298[14]]);router[_0x9298[12]](_0x9298[15],auth[_0x9298[10]](),controller[_0x9298[16]]);router[_0x9298[18]](_0x9298[9],auth[_0x9298[10]](),controller[_0x9298[17]]);router[_0x9298[20]](_0x9298[15],auth[_0x9298[10]](),controller[_0x9298[19]]);router[_0x9298[22]](_0x9298[15],auth[_0x9298[10]](),controller[_0x9298[21]]);module[_0x9298[23]]= router
\ No newline at end of file
+var _0xc177=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x44\x65\x74\x61\x69\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc177[0];var multer=require(_0xc177[1]);var util=require(_0xc177[2]);var path=require(_0xc177[3]);var express=require(_0xc177[4]);var router=express.Router();var auth=require(_0xc177[5]);var interaction=require(_0xc177[6]);var config=require(_0xc177[7]);var controller=require(_0xc177[8]);router[_0xc177[12]](_0xc177[9],auth[_0xc177[10]](),controller[_0xc177[11]]);router[_0xc177[12]](_0xc177[13],auth[_0xc177[10]](),controller[_0xc177[14]]);router[_0xc177[12]](_0xc177[15],auth[_0xc177[10]](),controller[_0xc177[16]]);router[_0xc177[18]](_0xc177[9],auth[_0xc177[10]](),controller[_0xc177[17]]);router[_0xc177[20]](_0xc177[15],auth[_0xc177[10]](),controller[_0xc177[19]]);router[_0xc177[22]](_0xc177[15],auth[_0xc177[10]](),controller[_0xc177[21]]);module[_0xc177[23]]= router
\ No newline at end of file
index df6f3e1..340b73b 100644 (file)
@@ -1 +1 @@
-var _0x201e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54"];_0x201e[0];var Sequelize=require(_0x201e[1]);module[_0x201e[2]]= {uniqueid:{type:Sequelize[_0x201e[3]]},node:{type:Sequelize[_0x201e[3]]},application:{type:Sequelize[_0x201e[3]]},data:{type:Sequelize[_0x201e[4]]},project_name:{type:Sequelize[_0x201e[3]]},callerid:{type:Sequelize[_0x201e[3]]}}
\ No newline at end of file
+var _0xb08b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54"];_0xb08b[0];var Sequelize=require(_0xb08b[1]);module[_0xb08b[2]]= {uniqueid:{type:Sequelize[_0xb08b[3]]},node:{type:Sequelize[_0xb08b[3]]},application:{type:Sequelize[_0xb08b[3]]},data:{type:Sequelize[_0xb08b[4]]},project_name:{type:Sequelize[_0xb08b[3]]},callerid:{type:Sequelize[_0xb08b[3]]}}
\ No newline at end of file
index df9121f..10d8bb4 100644 (file)
@@ -1 +1 @@
-var _0x8501=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x73\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x8501[0];var jsonpatch=require(_0x8501[1]);var rp=require(_0x8501[2]);var moment=require(_0x8501[3]);var BPromise=require(_0x8501[4]);var Mustache=require(_0x8501[5]);var util=require(_0x8501[6]);var path=require(_0x8501[7]);var sox=require(_0x8501[8]);var csv=require(_0x8501[9]);var ejs=require(_0x8501[10]);var fs=require(_0x8501[11]);var _=require(_0x8501[12]);var squel=require(_0x8501[13]);var crypto=require(_0x8501[14]);var jsforce=require(_0x8501[15]);var deskjs=require(_0x8501[16]);var toCsv=require(_0x8501[9]);var querystring=require(_0x8501[17]);var Papa=require(_0x8501[18]);var qs=require(_0x8501[19]);var logger=require(_0x8501[21])(_0x8501[20]);var utils=require(_0x8501[22]);var config=require(_0x8501[23]);var db=require(_0x8501[25])[_0x8501[24]];function respondWithStatusCode(_0x7badx1a,_0x7badx1b){_0x7badx1b= _0x7badx1b|| 204;return function(_0x7badx1c){if(_0x7badx1c){return _0x7badx1a[_0x8501[26]](_0x7badx1b)};return _0x7badx1a[_0x8501[28]](_0x7badx1b)[_0x8501[27]]()}}function respondWithResult(_0x7badx1a,_0x7badx1b){_0x7badx1b= _0x7badx1b|| 200;return function(_0x7badx1c){if(_0x7badx1c){return _0x7badx1a[_0x8501[28]](_0x7badx1b)[_0x8501[29]](_0x7badx1c)}}}function respondWithFilteredResult(_0x7badx1a,_0x7badx1f){return function(_0x7badx1c){if(_0x7badx1c){var _0x7badx20=_0x7badx1c[_0x8501[30]],_0x7badx21=_0x7badx1f[_0x8501[31]],_0x7badx22=_0x7badx1f[_0x8501[31]]+ _0x7badx1f[_0x8501[32]],_0x7badx1b;if(_0x7badx22>= _0x7badx20){_0x7badx22= _0x7badx20;_0x7badx1b= 200}else {_0x7badx1b= 206};_0x7badx1a[_0x8501[28]](_0x7badx1b);return _0x7badx1a[_0x8501[36]](_0x8501[33],_0x7badx21+ _0x8501[34]+ _0x7badx22+ _0x8501[35]+ _0x7badx20)[_0x8501[29]](_0x7badx1c)};return null}}function patchUpdates(_0x7badx24){return function(_0x7badx1c){try{jsonpatch[_0x8501[37]](_0x7badx1c,_0x7badx24,true)}catch(err){return BPromise[_0x8501[38]](err)};return _0x7badx1c[_0x8501[39]]()}}function saveUpdates(_0x7badx26,_0x7badx1b){return function(_0x7badx1c){if(_0x7badx1c){return _0x7badx1c[_0x8501[41]](_0x7badx26)[_0x8501[40]](function(_0x7badx27){return _0x7badx27})};return null}}function removeEntity(_0x7badx1a,_0x7badx1b){return function(_0x7badx1c){if(_0x7badx1c){return _0x7badx1c[_0x8501[42]]()[_0x8501[40]](function(){_0x7badx1a[_0x8501[28]](204)[_0x8501[27]]()})}}}function handleEntityNotFound(_0x7badx1a,_0x7badx1b){return function(_0x7badx1c){if(!_0x7badx1c){_0x7badx1a[_0x8501[26]](404)};return _0x7badx1c}}function handleError(_0x7badx1a,_0x7badx1b){_0x7badx1b= _0x7badx1b|| 500;return function(_0x7badx2b){logger[_0x8501[44]](_0x7badx2b[_0x8501[43]]);if(_0x7badx2b[_0x8501[45]]){delete _0x7badx2b[_0x8501[45]]};_0x7badx1a[_0x8501[28]](_0x7badx1b)[_0x8501[46]](_0x7badx2b)}}exports[_0x8501[47]]= function(_0x7badx2c,_0x7badx1a){var _0x7badx1f={},_0x7badx2d={},_0x7badx2e={count:0,rows:[]};_0x7badx2d[_0x8501[48]]= _[_0x8501[51]](db[_0x8501[50]][_0x8501[49]]);var _0x7badx2f={dateStart:_0x7badx2c[_0x8501[53]][_0x8501[52]],dateEnd:_0x7badx2c[_0x8501[53]][_0x8501[54]]};delete _0x7badx2c[_0x8501[53]][_0x8501[52]];delete _0x7badx2c[_0x8501[53]][_0x8501[54]];_0x7badx2d[_0x8501[53]]= _[_0x8501[51]](_0x7badx2c[_0x8501[53]]);_0x7badx2d[_0x8501[55]]= _[_0x8501[56]](_0x7badx2d[_0x8501[48]],_0x7badx2d[_0x8501[53]]);_0x7badx1f[_0x8501[57]]= _[_0x8501[56]](_0x7badx2d[_0x8501[48]],qs[_0x8501[58]](_0x7badx2c[_0x8501[53]][_0x8501[58]]));_0x7badx1f[_0x8501[57]]= (_0x7badx1f[_0x8501[57]][_0x8501[59]])?_0x7badx1f[_0x8501[57]]:_0x7badx2d[_0x8501[48]];if(!_0x7badx2c[_0x8501[53]][_0x8501[61]](_0x8501[60])){_0x7badx1f[_0x8501[32]]= qs[_0x8501[32]](_0x7badx2c[_0x8501[53]][_0x8501[32]]);_0x7badx1f[_0x8501[31]]= qs[_0x8501[31]](_0x7badx2c[_0x8501[53]][_0x8501[31]])};_0x7badx1f[_0x8501[62]]= qs[_0x8501[63]](_0x7badx2c[_0x8501[53]][_0x8501[63]]);_0x7badx1f[_0x8501[64]]= qs[_0x8501[55]](_[_0x8501[65]](_0x7badx2c[_0x8501[53]],_0x7badx2d[_0x8501[55]]));if(_0x7badx2f[_0x8501[52]]){if(_0x7badx2f[_0x8501[54]]){_0x7badx2f[_0x8501[54]]= moment(_0x7badx2f[_0x8501[54]])[_0x8501[67]](1,_0x8501[66])}else {_0x7badx2f[_0x8501[54]]= moment(_0x7badx2f[_0x8501[52]])[_0x8501[67]](1,_0x8501[66])};_[_0x8501[68]](_0x7badx1f[_0x8501[64]],{createdAt:{$gte:_0x7badx2f[_0x8501[52]],$lte:_0x7badx2f[_0x8501[54]]}})};if(_0x7badx2c[_0x8501[53]][_0x8501[69]]){_0x7badx1f[_0x8501[64]]= _[_0x8501[68]](_0x7badx1f[_0x8501[64]],{$or:_[_0x8501[71]](_0x7badx1f[_0x8501[57]],function(_0x7badx30){var _0x7badx2e={};_0x7badx2e[_0x7badx30]= {$like:_0x8501[70]+ _0x7badx2c[_0x8501[53]][_0x8501[69]]+ _0x8501[70]};return _0x7badx2e})})};_0x7badx1f= _[_0x8501[68]]({},_0x7badx1f,_0x7badx2c[_0x8501[72]]);var _0x7badx31={where:_0x7badx1f[_0x8501[64]]};return db[_0x8501[50]][_0x8501[30]](_0x7badx31)[_0x8501[40]](function(_0x7badx20){_0x7badx2e[_0x8501[30]]= _0x7badx20;if(_0x7badx2c[_0x8501[53]][_0x8501[75]]){_0x7badx1f[_0x8501[76]]= [{all:true}]};return db[_0x8501[50]][_0x8501[77]](_0x7badx1f)})[_0x8501[40]](function(_0x7badx32){_0x7badx2e[_0x8501[74]]= _0x7badx32;return _0x7badx2e})[_0x8501[40]](respondWithFilteredResult(_0x7badx1a,_0x7badx1f))[_0x8501[73]](handleError(_0x7badx1a,null))};exports[_0x8501[78]]= function(_0x7badx2c,_0x7badx1a){var _0x7badx1f={raw:true,where:{id:_0x7badx2c[_0x8501[80]][_0x8501[79]]}},_0x7badx2d={};_0x7badx2d[_0x8501[48]]= _[_0x8501[51]](db[_0x8501[50]][_0x8501[49]]);_0x7badx2d[_0x8501[53]]= _[_0x8501[51]](_0x7badx2c[_0x8501[53]]);_0x7badx2d[_0x8501[55]]= _[_0x8501[56]](_0x7badx2d[_0x8501[48]],_0x7badx2d[_0x8501[53]]);_0x7badx1f[_0x8501[57]]= _[_0x8501[56]](_0x7badx2d[_0x8501[48]],qs[_0x8501[58]](_0x7badx2c[_0x8501[53]][_0x8501[58]]));_0x7badx1f[_0x8501[57]]= (_0x7badx1f[_0x8501[57]][_0x8501[59]])?_0x7badx1f[_0x8501[57]]:_0x7badx2d[_0x8501[48]];if(_0x7badx2c[_0x8501[53]][_0x8501[75]]){_0x7badx1f[_0x8501[76]]= [{all:true}]};_0x7badx1f= _[_0x8501[68]]({},_0x7badx1f,_0x7badx2c[_0x8501[72]]);return db[_0x8501[50]][_0x8501[81]](_0x7badx1f)[_0x8501[40]](handleEntityNotFound(_0x7badx1a,null))[_0x8501[40]](respondWithResult(_0x7badx1a,null))[_0x8501[73]](handleError(_0x7badx1a,null))};exports[_0x8501[82]]= function(_0x7badx2c,_0x7badx1a){return db[_0x8501[50]][_0x8501[82]](_0x7badx2c[_0x8501[83]],{})[_0x8501[40]](respondWithResult(_0x7badx1a,201))[_0x8501[73]](handleError(_0x7badx1a,null))};exports[_0x8501[41]]= function(_0x7badx2c,_0x7badx1a){if(_0x7badx2c[_0x8501[83]][_0x8501[79]]){delete _0x7badx2c[_0x8501[83]][_0x8501[79]]};return db[_0x8501[50]][_0x8501[81]]({where:{id:_0x7badx2c[_0x8501[80]][_0x8501[79]]}})[_0x8501[40]](handleEntityNotFound(_0x7badx1a,null))[_0x8501[40]](saveUpdates(_0x7badx2c[_0x8501[83]],null))[_0x8501[40]](respondWithResult(_0x7badx1a,null))[_0x8501[73]](handleError(_0x7badx1a,null))};exports[_0x8501[42]]= function(_0x7badx2c,_0x7badx1a){return db[_0x8501[50]][_0x8501[81]]({where:{id:_0x7badx2c[_0x8501[80]][_0x8501[79]]}})[_0x8501[40]](handleEntityNotFound(_0x7badx1a,null))[_0x8501[40]](removeEntity(_0x7badx1a,null))[_0x8501[73]](handleError(_0x7badx1a,null))};exports[_0x8501[84]]= function(_0x7badx2c,_0x7badx1a){return db[_0x8501[50]][_0x8501[84]]()[_0x8501[40]](respondWithResult(_0x7badx1a,null))[_0x8501[73]](handleError(_0x7badx1a,null))}
\ No newline at end of file
+var _0xf0b9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x73\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xf0b9[0];var jsonpatch=require(_0xf0b9[1]);var rp=require(_0xf0b9[2]);var moment=require(_0xf0b9[3]);var BPromise=require(_0xf0b9[4]);var Mustache=require(_0xf0b9[5]);var util=require(_0xf0b9[6]);var path=require(_0xf0b9[7]);var sox=require(_0xf0b9[8]);var csv=require(_0xf0b9[9]);var ejs=require(_0xf0b9[10]);var fs=require(_0xf0b9[11]);var _=require(_0xf0b9[12]);var squel=require(_0xf0b9[13]);var crypto=require(_0xf0b9[14]);var jsforce=require(_0xf0b9[15]);var deskjs=require(_0xf0b9[16]);var toCsv=require(_0xf0b9[9]);var querystring=require(_0xf0b9[17]);var Papa=require(_0xf0b9[18]);var qs=require(_0xf0b9[19]);var logger=require(_0xf0b9[21])(_0xf0b9[20]);var utils=require(_0xf0b9[22]);var config=require(_0xf0b9[23]);var db=require(_0xf0b9[25])[_0xf0b9[24]];function respondWithStatusCode(_0xd00fx1a,_0xd00fx1b){_0xd00fx1b= _0xd00fx1b|| 204;return function(_0xd00fx1c){if(_0xd00fx1c){return _0xd00fx1a[_0xf0b9[26]](_0xd00fx1b)};return _0xd00fx1a[_0xf0b9[28]](_0xd00fx1b)[_0xf0b9[27]]()}}function respondWithResult(_0xd00fx1a,_0xd00fx1b){_0xd00fx1b= _0xd00fx1b|| 200;return function(_0xd00fx1c){if(_0xd00fx1c){return _0xd00fx1a[_0xf0b9[28]](_0xd00fx1b)[_0xf0b9[29]](_0xd00fx1c)}}}function respondWithFilteredResult(_0xd00fx1a,_0xd00fx1f){return function(_0xd00fx1c){if(_0xd00fx1c){var _0xd00fx20=_0xd00fx1c[_0xf0b9[30]],_0xd00fx21=_0xd00fx1f[_0xf0b9[31]],_0xd00fx22=_0xd00fx1f[_0xf0b9[31]]+ _0xd00fx1f[_0xf0b9[32]],_0xd00fx1b;if(_0xd00fx22>= _0xd00fx20){_0xd00fx22= _0xd00fx20;_0xd00fx1b= 200}else {_0xd00fx1b= 206};_0xd00fx1a[_0xf0b9[28]](_0xd00fx1b);return _0xd00fx1a[_0xf0b9[36]](_0xf0b9[33],_0xd00fx21+ _0xf0b9[34]+ _0xd00fx22+ _0xf0b9[35]+ _0xd00fx20)[_0xf0b9[29]](_0xd00fx1c)};return null}}function patchUpdates(_0xd00fx24){return function(_0xd00fx1c){try{jsonpatch[_0xf0b9[37]](_0xd00fx1c,_0xd00fx24,true)}catch(err){return BPromise[_0xf0b9[38]](err)};return _0xd00fx1c[_0xf0b9[39]]()}}function saveUpdates(_0xd00fx26,_0xd00fx1b){return function(_0xd00fx1c){if(_0xd00fx1c){return _0xd00fx1c[_0xf0b9[41]](_0xd00fx26)[_0xf0b9[40]](function(_0xd00fx27){return _0xd00fx27})};return null}}function removeEntity(_0xd00fx1a,_0xd00fx1b){return function(_0xd00fx1c){if(_0xd00fx1c){return _0xd00fx1c[_0xf0b9[42]]()[_0xf0b9[40]](function(){_0xd00fx1a[_0xf0b9[28]](204)[_0xf0b9[27]]()})}}}function handleEntityNotFound(_0xd00fx1a,_0xd00fx1b){return function(_0xd00fx1c){if(!_0xd00fx1c){_0xd00fx1a[_0xf0b9[26]](404)};return _0xd00fx1c}}function handleError(_0xd00fx1a,_0xd00fx1b){_0xd00fx1b= _0xd00fx1b|| 500;return function(_0xd00fx2b){logger[_0xf0b9[44]](_0xd00fx2b[_0xf0b9[43]]);if(_0xd00fx2b[_0xf0b9[45]]){delete _0xd00fx2b[_0xf0b9[45]]};_0xd00fx1a[_0xf0b9[28]](_0xd00fx1b)[_0xf0b9[46]](_0xd00fx2b)}}exports[_0xf0b9[47]]= function(_0xd00fx2c,_0xd00fx1a){var _0xd00fx1f={},_0xd00fx2d={},_0xd00fx2e={count:0,rows:[]};_0xd00fx2d[_0xf0b9[48]]= _[_0xf0b9[51]](db[_0xf0b9[50]][_0xf0b9[49]]);var _0xd00fx2f={dateStart:_0xd00fx2c[_0xf0b9[53]][_0xf0b9[52]],dateEnd:_0xd00fx2c[_0xf0b9[53]][_0xf0b9[54]]};delete _0xd00fx2c[_0xf0b9[53]][_0xf0b9[52]];delete _0xd00fx2c[_0xf0b9[53]][_0xf0b9[54]];_0xd00fx2d[_0xf0b9[53]]= _[_0xf0b9[51]](_0xd00fx2c[_0xf0b9[53]]);_0xd00fx2d[_0xf0b9[55]]= _[_0xf0b9[56]](_0xd00fx2d[_0xf0b9[48]],_0xd00fx2d[_0xf0b9[53]]);_0xd00fx1f[_0xf0b9[57]]= _[_0xf0b9[56]](_0xd00fx2d[_0xf0b9[48]],qs[_0xf0b9[58]](_0xd00fx2c[_0xf0b9[53]][_0xf0b9[58]]));_0xd00fx1f[_0xf0b9[57]]= (_0xd00fx1f[_0xf0b9[57]][_0xf0b9[59]])?_0xd00fx1f[_0xf0b9[57]]:_0xd00fx2d[_0xf0b9[48]];if(!_0xd00fx2c[_0xf0b9[53]][_0xf0b9[61]](_0xf0b9[60])){_0xd00fx1f[_0xf0b9[32]]= qs[_0xf0b9[32]](_0xd00fx2c[_0xf0b9[53]][_0xf0b9[32]]);_0xd00fx1f[_0xf0b9[31]]= qs[_0xf0b9[31]](_0xd00fx2c[_0xf0b9[53]][_0xf0b9[31]])};_0xd00fx1f[_0xf0b9[62]]= qs[_0xf0b9[63]](_0xd00fx2c[_0xf0b9[53]][_0xf0b9[63]]);_0xd00fx1f[_0xf0b9[64]]= qs[_0xf0b9[55]](_[_0xf0b9[65]](_0xd00fx2c[_0xf0b9[53]],_0xd00fx2d[_0xf0b9[55]]));if(_0xd00fx2f[_0xf0b9[52]]){if(_0xd00fx2f[_0xf0b9[54]]){_0xd00fx2f[_0xf0b9[54]]= moment(_0xd00fx2f[_0xf0b9[54]])[_0xf0b9[67]](1,_0xf0b9[66])}else {_0xd00fx2f[_0xf0b9[54]]= moment(_0xd00fx2f[_0xf0b9[52]])[_0xf0b9[67]](1,_0xf0b9[66])};_[_0xf0b9[68]](_0xd00fx1f[_0xf0b9[64]],{createdAt:{$gte:_0xd00fx2f[_0xf0b9[52]],$lte:_0xd00fx2f[_0xf0b9[54]]}})};if(_0xd00fx2c[_0xf0b9[53]][_0xf0b9[69]]){_0xd00fx1f[_0xf0b9[64]]= _[_0xf0b9[68]](_0xd00fx1f[_0xf0b9[64]],{$or:_[_0xf0b9[71]](_0xd00fx1f[_0xf0b9[57]],function(_0xd00fx30){var _0xd00fx2e={};_0xd00fx2e[_0xd00fx30]= {$like:_0xf0b9[70]+ _0xd00fx2c[_0xf0b9[53]][_0xf0b9[69]]+ _0xf0b9[70]};return _0xd00fx2e})})};_0xd00fx1f= _[_0xf0b9[68]]({},_0xd00fx1f,_0xd00fx2c[_0xf0b9[72]]);var _0xd00fx31={where:_0xd00fx1f[_0xf0b9[64]]};return db[_0xf0b9[50]][_0xf0b9[30]](_0xd00fx31)[_0xf0b9[40]](function(_0xd00fx20){_0xd00fx2e[_0xf0b9[30]]= _0xd00fx20;if(_0xd00fx2c[_0xf0b9[53]][_0xf0b9[75]]){_0xd00fx1f[_0xf0b9[76]]= [{all:true}]};return db[_0xf0b9[50]][_0xf0b9[77]](_0xd00fx1f)})[_0xf0b9[40]](function(_0xd00fx32){_0xd00fx2e[_0xf0b9[74]]= _0xd00fx32;return _0xd00fx2e})[_0xf0b9[40]](respondWithFilteredResult(_0xd00fx1a,_0xd00fx1f))[_0xf0b9[73]](handleError(_0xd00fx1a,null))};exports[_0xf0b9[78]]= function(_0xd00fx2c,_0xd00fx1a){var _0xd00fx1f={raw:true,where:{id:_0xd00fx2c[_0xf0b9[80]][_0xf0b9[79]]}},_0xd00fx2d={};_0xd00fx2d[_0xf0b9[48]]= _[_0xf0b9[51]](db[_0xf0b9[50]][_0xf0b9[49]]);_0xd00fx2d[_0xf0b9[53]]= _[_0xf0b9[51]](_0xd00fx2c[_0xf0b9[53]]);_0xd00fx2d[_0xf0b9[55]]= _[_0xf0b9[56]](_0xd00fx2d[_0xf0b9[48]],_0xd00fx2d[_0xf0b9[53]]);_0xd00fx1f[_0xf0b9[57]]= _[_0xf0b9[56]](_0xd00fx2d[_0xf0b9[48]],qs[_0xf0b9[58]](_0xd00fx2c[_0xf0b9[53]][_0xf0b9[58]]));_0xd00fx1f[_0xf0b9[57]]= (_0xd00fx1f[_0xf0b9[57]][_0xf0b9[59]])?_0xd00fx1f[_0xf0b9[57]]:_0xd00fx2d[_0xf0b9[48]];if(_0xd00fx2c[_0xf0b9[53]][_0xf0b9[75]]){_0xd00fx1f[_0xf0b9[76]]= [{all:true}]};_0xd00fx1f= _[_0xf0b9[68]]({},_0xd00fx1f,_0xd00fx2c[_0xf0b9[72]]);return db[_0xf0b9[50]][_0xf0b9[81]](_0xd00fx1f)[_0xf0b9[40]](handleEntityNotFound(_0xd00fx1a,null))[_0xf0b9[40]](respondWithResult(_0xd00fx1a,null))[_0xf0b9[73]](handleError(_0xd00fx1a,null))};exports[_0xf0b9[82]]= function(_0xd00fx2c,_0xd00fx1a){return db[_0xf0b9[50]][_0xf0b9[82]](_0xd00fx2c[_0xf0b9[83]],{})[_0xf0b9[40]](respondWithResult(_0xd00fx1a,201))[_0xf0b9[73]](handleError(_0xd00fx1a,null))};exports[_0xf0b9[41]]= function(_0xd00fx2c,_0xd00fx1a){if(_0xd00fx2c[_0xf0b9[83]][_0xf0b9[79]]){delete _0xd00fx2c[_0xf0b9[83]][_0xf0b9[79]]};return db[_0xf0b9[50]][_0xf0b9[81]]({where:{id:_0xd00fx2c[_0xf0b9[80]][_0xf0b9[79]]}})[_0xf0b9[40]](handleEntityNotFound(_0xd00fx1a,null))[_0xf0b9[40]](saveUpdates(_0xd00fx2c[_0xf0b9[83]],null))[_0xf0b9[40]](respondWithResult(_0xd00fx1a,null))[_0xf0b9[73]](handleError(_0xd00fx1a,null))};exports[_0xf0b9[42]]= function(_0xd00fx2c,_0xd00fx1a){return db[_0xf0b9[50]][_0xf0b9[81]]({where:{id:_0xd00fx2c[_0xf0b9[80]][_0xf0b9[79]]}})[_0xf0b9[40]](handleEntityNotFound(_0xd00fx1a,null))[_0xf0b9[40]](removeEntity(_0xd00fx1a,null))[_0xf0b9[73]](handleError(_0xd00fx1a,null))};exports[_0xf0b9[84]]= function(_0xd00fx2c,_0xd00fx1a){return db[_0xf0b9[50]][_0xf0b9[84]]()[_0xf0b9[40]](respondWithResult(_0xd00fx1a,null))[_0xf0b9[73]](handleError(_0xd00fx1a,null))}
\ No newline at end of file
index 2c5a1da..fe21215 100644 (file)
@@ -1 +1 @@
-var _0x1b9d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x44\x65\x74\x61\x69\x6C\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x73\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x73","\x64\x65\x66\x69\x6E\x65"];_0x1b9d[0];var _=require(_0x1b9d[1]);var util=require(_0x1b9d[2]);var logger=require(_0x1b9d[4])(_0x1b9d[3]);var moment=require(_0x1b9d[5]);var BPromise=require(_0x1b9d[6]);var rp=require(_0x1b9d[7]);var attributes=require(_0x1b9d[8]);module[_0x1b9d[9]]= function(_0x4b43x8,_0x4b43x9){return _0x4b43x8[_0x1b9d[12]](_0x1b9d[10],attributes,{tableName:_0x1b9d[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xddb3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x44\x65\x74\x61\x69\x6C\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x73\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x73","\x64\x65\x66\x69\x6E\x65"];_0xddb3[0];var _=require(_0xddb3[1]);var util=require(_0xddb3[2]);var logger=require(_0xddb3[4])(_0xddb3[3]);var moment=require(_0xddb3[5]);var BPromise=require(_0xddb3[6]);var rp=require(_0xddb3[7]);var attributes=require(_0xddb3[8]);module[_0xddb3[9]]= function(_0x2412x8,_0x2412x9){return _0x2412x8[_0xddb3[12]](_0xddb3[10],attributes,{tableName:_0xddb3[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 9ff7782..8a86ffb 100644 (file)
@@ -1 +1 @@
-var _0x4b5c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x73\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x73\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x73\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x73\x52\x65\x70\x6F\x72\x74"];_0x4b5c[0];var _=require(_0x4b5c[1]);var util=require(_0x4b5c[2]);var moment=require(_0x4b5c[3]);var BPromise=require(_0x4b5c[4]);var rs=require(_0x4b5c[5]);var fs=require(_0x4b5c[6]);var db=require(_0x4b5c[8])[_0x4b5c[7]];var utils=require(_0x4b5c[9]);var logger=require(_0x4b5c[11])(_0x4b5c[10]);var config=require(_0x4b5c[12]);var jayson=require(_0x4b5c[13]);var client=jayson[_0x4b5c[15]][_0x4b5c[14]]({port:9002});function respondWithRpcPromise(_0x8edbxe,_0x8edbxf,_0x8edbx10){return  new BPromise(function(_0x8edbx11,_0x8edbx12){return client[_0x4b5c[28]](_0x8edbxe,_0x8edbx10)[_0x4b5c[27]](function(_0x8edbx14){logger[_0x4b5c[20]](_0x4b5c[16],_0x8edbxf,_0x4b5c[19]);logger[_0x4b5c[23]](_0x4b5c[21],_0x8edbxf,_0x4b5c[19],JSON[_0x4b5c[22]](_0x8edbx14));if(_0x8edbx14[_0x4b5c[17]]){if(_0x8edbx14[_0x4b5c[17]][_0x4b5c[24]]=== 500){logger[_0x4b5c[17]](_0x4b5c[16],_0x8edbxf,_0x8edbx14[_0x4b5c[17]][_0x4b5c[25]]);return _0x8edbx12(_0x8edbx14[_0x4b5c[17]][_0x4b5c[25]])};logger[_0x4b5c[17]](_0x4b5c[16],_0x8edbxf,_0x8edbx14[_0x4b5c[17]][_0x4b5c[25]]);return _0x8edbx11(_0x8edbx14[_0x4b5c[17]][_0x4b5c[25]])}else {logger[_0x4b5c[20]](_0x4b5c[16],_0x8edbxf,_0x4b5c[19]);_0x8edbx11(_0x8edbx14[_0x4b5c[26]][_0x4b5c[25]])}})[_0x4b5c[18]](function(_0x8edbx13){logger[_0x4b5c[17]](_0x4b5c[16],_0x8edbxf,_0x8edbx13);_0x8edbx12(_0x8edbx13)})})}exports[_0x4b5c[29]]= function(_0x8edbx10){var _0x8edbx15=this;return  new Promise(function(_0x8edbx11,_0x8edbx12){return db[_0x4b5c[34]][_0x4b5c[33]](_0x8edbx10[_0x4b5c[30]],{raw:_0x8edbx10[_0x4b5c[31]]?(_0x8edbx10[_0x4b5c[31]][_0x4b5c[32]]=== undefined)?true:false:true})[_0x4b5c[27]](function(_0x8edbx14){logger[_0x4b5c[20]](_0x4b5c[29],_0x8edbx10);logger[_0x4b5c[23]](_0x4b5c[29],_0x8edbx10,JSON[_0x4b5c[22]](_0x8edbx14));_0x8edbx11(_0x8edbx14)})[_0x4b5c[18]](function(_0x8edbx13){logger[_0x4b5c[17]](_0x4b5c[29],_0x8edbx13[_0x4b5c[25]],_0x8edbx10);_0x8edbx12(_0x8edbx15[_0x4b5c[17]](500,_0x8edbx13[_0x4b5c[25]]))})})}
\ No newline at end of file
+var _0x8672=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x73\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x73\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x73\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x73\x52\x65\x70\x6F\x72\x74"];_0x8672[0];var _=require(_0x8672[1]);var util=require(_0x8672[2]);var moment=require(_0x8672[3]);var BPromise=require(_0x8672[4]);var rs=require(_0x8672[5]);var fs=require(_0x8672[6]);var db=require(_0x8672[8])[_0x8672[7]];var utils=require(_0x8672[9]);var logger=require(_0x8672[11])(_0x8672[10]);var config=require(_0x8672[12]);var jayson=require(_0x8672[13]);var client=jayson[_0x8672[15]][_0x8672[14]]({port:9002});function respondWithRpcPromise(_0x1908xe,_0x1908xf,_0x1908x10){return  new BPromise(function(_0x1908x11,_0x1908x12){return client[_0x8672[28]](_0x1908xe,_0x1908x10)[_0x8672[27]](function(_0x1908x14){logger[_0x8672[20]](_0x8672[16],_0x1908xf,_0x8672[19]);logger[_0x8672[23]](_0x8672[21],_0x1908xf,_0x8672[19],JSON[_0x8672[22]](_0x1908x14));if(_0x1908x14[_0x8672[17]]){if(_0x1908x14[_0x8672[17]][_0x8672[24]]=== 500){logger[_0x8672[17]](_0x8672[16],_0x1908xf,_0x1908x14[_0x8672[17]][_0x8672[25]]);return _0x1908x12(_0x1908x14[_0x8672[17]][_0x8672[25]])};logger[_0x8672[17]](_0x8672[16],_0x1908xf,_0x1908x14[_0x8672[17]][_0x8672[25]]);return _0x1908x11(_0x1908x14[_0x8672[17]][_0x8672[25]])}else {logger[_0x8672[20]](_0x8672[16],_0x1908xf,_0x8672[19]);_0x1908x11(_0x1908x14[_0x8672[26]][_0x8672[25]])}})[_0x8672[18]](function(_0x1908x13){logger[_0x8672[17]](_0x8672[16],_0x1908xf,_0x1908x13);_0x1908x12(_0x1908x13)})})}exports[_0x8672[29]]= function(_0x1908x10){var _0x1908x15=this;return  new Promise(function(_0x1908x11,_0x1908x12){return db[_0x8672[34]][_0x8672[33]](_0x1908x10[_0x8672[30]],{raw:_0x1908x10[_0x8672[31]]?(_0x1908x10[_0x8672[31]][_0x8672[32]]=== undefined)?true:false:true})[_0x8672[27]](function(_0x1908x14){logger[_0x8672[20]](_0x8672[29],_0x1908x10);logger[_0x8672[23]](_0x8672[29],_0x1908x10,JSON[_0x8672[22]](_0x1908x14));_0x1908x11(_0x1908x14)})[_0x8672[18]](function(_0x1908x13){logger[_0x8672[17]](_0x8672[29],_0x1908x13[_0x8672[25]],_0x1908x10);_0x1908x12(_0x1908x15[_0x8672[17]](500,_0x1908x13[_0x8672[25]]))})})}
\ No newline at end of file
index ba1a6e7..52be01e 100644 (file)
@@ -1 +1 @@
-var _0x3d21=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x79\x73\x74\x65\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x70\x72\x6F\x63\x65\x73\x73\x2F\x3A\x70\x69\x64\x2F\x6B\x69\x6C\x6C","\x6B\x69\x6C\x6C\x50\x72\x6F\x63\x65\x73\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x3d21[0];var express=require(_0x3d21[1]);var router=express.Router();var auth=require(_0x3d21[2]);var controller=require(_0x3d21[3]);router[_0x3d21[7]](_0x3d21[4],auth[_0x3d21[5]](),controller[_0x3d21[6]]);router[_0x3d21[7]](_0x3d21[8],auth[_0x3d21[5]](),controller[_0x3d21[9]]);module[_0x3d21[10]]= router
\ No newline at end of file
+var _0xa4b4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x79\x73\x74\x65\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x70\x72\x6F\x63\x65\x73\x73\x2F\x3A\x70\x69\x64\x2F\x6B\x69\x6C\x6C","\x6B\x69\x6C\x6C\x50\x72\x6F\x63\x65\x73\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xa4b4[0];var express=require(_0xa4b4[1]);var router=express.Router();var auth=require(_0xa4b4[2]);var controller=require(_0xa4b4[3]);router[_0xa4b4[7]](_0xa4b4[4],auth[_0xa4b4[5]](),controller[_0xa4b4[6]]);router[_0xa4b4[7]](_0xa4b4[8],auth[_0xa4b4[5]](),controller[_0xa4b4[9]]);module[_0xa4b4[10]]= router
\ No newline at end of file
index 6afc426..4caef4a 100644 (file)
@@ -1 +1 @@
-var _0xb84f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x79\x73\x74\x65\x6D\x69\x6E\x66\x6F\x72\x6D\x61\x74\x69\x6F\x6E","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x6A\x73\x6F\x6E","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x67\x65\x74\x41\x6C\x6C\x44\x61\x74\x61","\x6B\x69\x6C\x6C\x50\x72\x6F\x63\x65\x73\x73","\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6D\x70\x6F\x72\x74\x2F\x63\x6D","\x73\x70\x6C\x69\x74","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x64\x65\x78\x4F\x66","\x50\x72\x6F\x63\x65\x73\x73\x20\x77\x69\x74\x68\x20\x70\x69\x64\x20\x25\x73\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x21","\x70\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x6F\x72\x6D\x61\x74","\x53\x49\x47\x49\x4E\x54","\x6B\x69\x6C\x6C","\x50\x72\x6F\x63\x65\x73\x73\x20\x77\x69\x74\x68\x20\x70\x69\x64\x20\x25\x73\x20\x6B\x69\x6C\x6C\x65\x64\x20\x63\x6F\x72\x72\x65\x63\x74\x6C\x79","\x70\x73\x20\x2D\x70\x20\x25\x73\x20\x2D\x77\x77\x20\x2D\x6F\x20\x61\x72\x67\x73"];_0xb84f[0];var info=require(_0xb84f[1]);var exec=require(_0xb84f[3])[_0xb84f[2]];var logger=require(_0xb84f[5])(_0xb84f[4]);var util=require(_0xb84f[6]);var BPromise=require(_0xb84f[7]);var _=require(_0xb84f[8]);function handleError(_0x8845x8,_0x8845x9,_0x8845xa){_0x8845x9= _0x8845x9|| 500;return function(_0x8845xb){logger[_0xb84f[10]]('<%- name %>, %s, %s, %s',_0x8845xa,_0x8845x9,util[_0xb84f[9]](_0x8845xb,{showHidden:false,depth:null}));delete _0x8845xb[_0xb84f[11]];_0x8845x8[_0xb84f[13]](_0x8845x9)[_0xb84f[12]](_0x8845xb)}}exports[_0xb84f[14]]= function(_0x8845xc,_0x8845x8){return info[_0xb84f[18]]()[_0xb84f[17]](function(_0x8845xd){return _0x8845x8[_0xb84f[13]](200)[_0xb84f[15]](_0x8845xd)})[_0xb84f[16]](function(_0x8845xb){return _0x8845x8[_0xb84f[13]](500)[_0xb84f[15]](_0x8845xb)})};exports[_0xb84f[19]]= function(_0x8845xc,_0x8845x8){var _0x8845xe=[_0xb84f[20]];return  new BPromise(function(_0x8845x14,_0x8845x15){return exec(util[_0xb84f[27]](_0xb84f[31],_0x8845xc[_0xb84f[26]][_0xb84f[25]]),function(_0x8845xb,_0x8845x16,_0x8845x17){if(_0x8845xb){return _0x8845x15(_0x8845xb)};return _0x8845x14(_0x8845x16)})})[_0xb84f[17]](function(_0x8845xf){var _0x8845x10=false;var _0x8845x11=_0x8845xf[_0xb84f[21]](/\n/);for(var _0x8845x12=0,_0x8845x13=_0x8845xe[_0xb84f[22]];_0x8845x12< _0x8845x13,_0x8845x10=== false;_0x8845x12+= 1){if(_0x8845xf[_0xb84f[23]](_0x8845xe[_0x8845x12])>= 0){_0x8845x10= true}};if(!_0x8845x10){throw  new Error(util[_0xb84f[27]](_0xb84f[24],_0x8845xc[_0xb84f[26]][_0xb84f[25]]))};process[_0xb84f[29]](_0x8845xc[_0xb84f[26]][_0xb84f[25]],_0xb84f[28]);return _0x8845x8[_0xb84f[13]](200)[_0xb84f[15]]({message:util[_0xb84f[27]](_0xb84f[30],_0x8845xc[_0xb84f[26]][_0xb84f[25]])})})[_0xb84f[16]](handleError(_0x8845x8,null,_0xb84f[19]))}
\ No newline at end of file
+var _0x15cf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x79\x73\x74\x65\x6D\x69\x6E\x66\x6F\x72\x6D\x61\x74\x69\x6F\x6E","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x6A\x73\x6F\x6E","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x67\x65\x74\x41\x6C\x6C\x44\x61\x74\x61","\x6B\x69\x6C\x6C\x50\x72\x6F\x63\x65\x73\x73","\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6D\x70\x6F\x72\x74\x2F\x63\x6D","\x73\x70\x6C\x69\x74","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x64\x65\x78\x4F\x66","\x50\x72\x6F\x63\x65\x73\x73\x20\x77\x69\x74\x68\x20\x70\x69\x64\x20\x25\x73\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x21","\x70\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x6F\x72\x6D\x61\x74","\x53\x49\x47\x49\x4E\x54","\x6B\x69\x6C\x6C","\x50\x72\x6F\x63\x65\x73\x73\x20\x77\x69\x74\x68\x20\x70\x69\x64\x20\x25\x73\x20\x6B\x69\x6C\x6C\x65\x64\x20\x63\x6F\x72\x72\x65\x63\x74\x6C\x79","\x70\x73\x20\x2D\x70\x20\x25\x73\x20\x2D\x77\x77\x20\x2D\x6F\x20\x61\x72\x67\x73"];_0x15cf[0];var info=require(_0x15cf[1]);var exec=require(_0x15cf[3])[_0x15cf[2]];var logger=require(_0x15cf[5])(_0x15cf[4]);var util=require(_0x15cf[6]);var BPromise=require(_0x15cf[7]);var _=require(_0x15cf[8]);function handleError(_0x481fx8,_0x481fx9,_0x481fxa){_0x481fx9= _0x481fx9|| 500;return function(_0x481fxb){logger[_0x15cf[10]]('<%- name %>, %s, %s, %s',_0x481fxa,_0x481fx9,util[_0x15cf[9]](_0x481fxb,{showHidden:false,depth:null}));delete _0x481fxb[_0x15cf[11]];_0x481fx8[_0x15cf[13]](_0x481fx9)[_0x15cf[12]](_0x481fxb)}}exports[_0x15cf[14]]= function(_0x481fxc,_0x481fx8){return info[_0x15cf[18]]()[_0x15cf[17]](function(_0x481fxd){return _0x481fx8[_0x15cf[13]](200)[_0x15cf[15]](_0x481fxd)})[_0x15cf[16]](function(_0x481fxb){return _0x481fx8[_0x15cf[13]](500)[_0x15cf[15]](_0x481fxb)})};exports[_0x15cf[19]]= function(_0x481fxc,_0x481fx8){var _0x481fxe=[_0x15cf[20]];return  new BPromise(function(_0x481fx14,_0x481fx15){return exec(util[_0x15cf[27]](_0x15cf[31],_0x481fxc[_0x15cf[26]][_0x15cf[25]]),function(_0x481fxb,_0x481fx16,_0x481fx17){if(_0x481fxb){return _0x481fx15(_0x481fxb)};return _0x481fx14(_0x481fx16)})})[_0x15cf[17]](function(_0x481fxf){var _0x481fx10=false;var _0x481fx11=_0x481fxf[_0x15cf[21]](/\n/);for(var _0x481fx12=0,_0x481fx13=_0x481fxe[_0x15cf[22]];_0x481fx12< _0x481fx13,_0x481fx10=== false;_0x481fx12+= 1){if(_0x481fxf[_0x15cf[23]](_0x481fxe[_0x481fx12])>= 0){_0x481fx10= true}};if(!_0x481fx10){throw  new Error(util[_0x15cf[27]](_0x15cf[24],_0x481fxc[_0x15cf[26]][_0x15cf[25]]))};process[_0x15cf[29]](_0x481fxc[_0x15cf[26]][_0x15cf[25]],_0x15cf[28]);return _0x481fx8[_0x15cf[13]](200)[_0x15cf[15]]({message:util[_0x15cf[27]](_0x15cf[30],_0x481fxc[_0x15cf[26]][_0x15cf[25]])})})[_0x15cf[16]](handleError(_0x481fx8,null,_0x15cf[19]))}
\ No newline at end of file
index d054f25..45a8576 100644 (file)
@@ -1 +1 @@
-var _0xa4f1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x74\x61\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xa4f1[0];var multer=require(_0xa4f1[1]);var util=require(_0xa4f1[2]);var path=require(_0xa4f1[3]);var express=require(_0xa4f1[4]);var router=express.Router();var auth=require(_0xa4f1[5]);var interaction=require(_0xa4f1[6]);var config=require(_0xa4f1[7]);var controller=require(_0xa4f1[8]);router[_0xa4f1[12]](_0xa4f1[9],auth[_0xa4f1[10]](),controller[_0xa4f1[11]]);router[_0xa4f1[12]](_0xa4f1[13],auth[_0xa4f1[10]](),controller[_0xa4f1[14]]);router[_0xa4f1[16]](_0xa4f1[9],auth[_0xa4f1[10]](),controller[_0xa4f1[15]]);router[_0xa4f1[18]](_0xa4f1[13],auth[_0xa4f1[10]](),controller[_0xa4f1[17]]);router[_0xa4f1[20]](_0xa4f1[13],auth[_0xa4f1[10]](),controller[_0xa4f1[19]]);module[_0xa4f1[21]]= router
\ No newline at end of file
+var _0x2f42=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x74\x61\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2f42[0];var multer=require(_0x2f42[1]);var util=require(_0x2f42[2]);var path=require(_0x2f42[3]);var express=require(_0x2f42[4]);var router=express.Router();var auth=require(_0x2f42[5]);var interaction=require(_0x2f42[6]);var config=require(_0x2f42[7]);var controller=require(_0x2f42[8]);router[_0x2f42[12]](_0x2f42[9],auth[_0x2f42[10]](),controller[_0x2f42[11]]);router[_0x2f42[12]](_0x2f42[13],auth[_0x2f42[10]](),controller[_0x2f42[14]]);router[_0x2f42[16]](_0x2f42[9],auth[_0x2f42[10]](),controller[_0x2f42[15]]);router[_0x2f42[18]](_0x2f42[13],auth[_0x2f42[10]](),controller[_0x2f42[17]]);router[_0x2f42[20]](_0x2f42[13],auth[_0x2f42[10]](),controller[_0x2f42[19]]);module[_0x2f42[21]]= router
\ No newline at end of file
index e55c9ce..b5e62ab 100644 (file)
@@ -1 +1 @@
-var _0xf3d4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x23\x30\x30\x39\x31\x45\x41"];_0xf3d4[0];var Sequelize=require(_0xf3d4[1]);module[_0xf3d4[2]]= {name:{type:Sequelize[_0xf3d4[3]],unique:_0xf3d4[4],allowNull:false,validate:{is:/[A-Za-z0-9._\\+*!-]+/,notEmpty:true}},color:{type:Sequelize[_0xf3d4[3]],defaultValue:_0xf3d4[5]},description:{type:Sequelize[_0xf3d4[3]]}}
\ No newline at end of file
+var _0x5a97=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x23\x30\x30\x39\x31\x45\x41"];_0x5a97[0];var Sequelize=require(_0x5a97[1]);module[_0x5a97[2]]= {name:{type:Sequelize[_0x5a97[3]],unique:_0x5a97[4],allowNull:false,validate:{is:/[A-Za-z0-9._\\+*!-]+/,notEmpty:true}},color:{type:Sequelize[_0x5a97[3]],defaultValue:_0x5a97[5]},description:{type:Sequelize[_0x5a97[3]]}}
\ No newline at end of file
index 6447ce0..bb7ca2a 100644 (file)
@@ -1 +1 @@
-var _0x394a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x54\x61\x67","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x394a[0];var jsonpatch=require(_0x394a[1]);var rp=require(_0x394a[2]);var moment=require(_0x394a[3]);var BPromise=require(_0x394a[4]);var Mustache=require(_0x394a[5]);var util=require(_0x394a[6]);var path=require(_0x394a[7]);var sox=require(_0x394a[8]);var csv=require(_0x394a[9]);var ejs=require(_0x394a[10]);var fs=require(_0x394a[11]);var _=require(_0x394a[12]);var squel=require(_0x394a[13]);var crypto=require(_0x394a[14]);var jsforce=require(_0x394a[15]);var deskjs=require(_0x394a[16]);var toCsv=require(_0x394a[9]);var querystring=require(_0x394a[17]);var Papa=require(_0x394a[18]);var qs=require(_0x394a[19]);var logger=require(_0x394a[21])(_0x394a[20]);var utils=require(_0x394a[22]);var config=require(_0x394a[23]);var db=require(_0x394a[25])[_0x394a[24]];function respondWithStatusCode(_0x53f8x1a,_0x53f8x1b){_0x53f8x1b= _0x53f8x1b|| 204;return function(_0x53f8x1c){if(_0x53f8x1c){return _0x53f8x1a[_0x394a[26]](_0x53f8x1b)};return _0x53f8x1a[_0x394a[28]](_0x53f8x1b)[_0x394a[27]]()}}function respondWithResult(_0x53f8x1a,_0x53f8x1b){_0x53f8x1b= _0x53f8x1b|| 200;return function(_0x53f8x1c){if(_0x53f8x1c){return _0x53f8x1a[_0x394a[28]](_0x53f8x1b)[_0x394a[29]](_0x53f8x1c)}}}function respondWithFilteredResult(_0x53f8x1a,_0x53f8x1f){return function(_0x53f8x1c){if(_0x53f8x1c){var _0x53f8x20=_0x53f8x1c[_0x394a[30]],_0x53f8x21=_0x53f8x1f[_0x394a[31]],_0x53f8x22=_0x53f8x1f[_0x394a[31]]+ _0x53f8x1f[_0x394a[32]],_0x53f8x1b;if(_0x53f8x22>= _0x53f8x20){_0x53f8x22= _0x53f8x20;_0x53f8x1b= 200}else {_0x53f8x1b= 206};_0x53f8x1a[_0x394a[28]](_0x53f8x1b);return _0x53f8x1a[_0x394a[36]](_0x394a[33],_0x53f8x21+ _0x394a[34]+ _0x53f8x22+ _0x394a[35]+ _0x53f8x20)[_0x394a[29]](_0x53f8x1c)};return null}}function patchUpdates(_0x53f8x24){return function(_0x53f8x1c){try{jsonpatch[_0x394a[37]](_0x53f8x1c,_0x53f8x24,true)}catch(err){return BPromise[_0x394a[38]](err)};return _0x53f8x1c[_0x394a[39]]()}}function saveUpdates(_0x53f8x26,_0x53f8x1b){return function(_0x53f8x1c){if(_0x53f8x1c){return _0x53f8x1c[_0x394a[41]](_0x53f8x26)[_0x394a[40]](function(_0x53f8x27){return _0x53f8x27})};return null}}function removeEntity(_0x53f8x1a,_0x53f8x1b){return function(_0x53f8x1c){if(_0x53f8x1c){return _0x53f8x1c[_0x394a[42]]()[_0x394a[40]](function(){_0x53f8x1a[_0x394a[28]](204)[_0x394a[27]]()})}}}function handleEntityNotFound(_0x53f8x1a,_0x53f8x1b){return function(_0x53f8x1c){if(!_0x53f8x1c){_0x53f8x1a[_0x394a[26]](404)};return _0x53f8x1c}}function handleError(_0x53f8x1a,_0x53f8x1b){_0x53f8x1b= _0x53f8x1b|| 500;return function(_0x53f8x2b){logger[_0x394a[44]](_0x53f8x2b[_0x394a[43]]);if(_0x53f8x2b[_0x394a[45]]){delete _0x53f8x2b[_0x394a[45]]};_0x53f8x1a[_0x394a[28]](_0x53f8x1b)[_0x394a[46]](_0x53f8x2b)}}exports[_0x394a[47]]= function(_0x53f8x2c,_0x53f8x1a){var _0x53f8x1f={},_0x53f8x2d={},_0x53f8x2e={count:0,rows:[]};_0x53f8x2d[_0x394a[48]]= _[_0x394a[51]](db[_0x394a[50]][_0x394a[49]]);var _0x53f8x2f={dateStart:_0x53f8x2c[_0x394a[53]][_0x394a[52]],dateEnd:_0x53f8x2c[_0x394a[53]][_0x394a[54]]};delete _0x53f8x2c[_0x394a[53]][_0x394a[52]];delete _0x53f8x2c[_0x394a[53]][_0x394a[54]];_0x53f8x2d[_0x394a[53]]= _[_0x394a[51]](_0x53f8x2c[_0x394a[53]]);_0x53f8x2d[_0x394a[55]]= _[_0x394a[56]](_0x53f8x2d[_0x394a[48]],_0x53f8x2d[_0x394a[53]]);_0x53f8x1f[_0x394a[57]]= _[_0x394a[56]](_0x53f8x2d[_0x394a[48]],qs[_0x394a[58]](_0x53f8x2c[_0x394a[53]][_0x394a[58]]));_0x53f8x1f[_0x394a[57]]= (_0x53f8x1f[_0x394a[57]][_0x394a[59]])?_0x53f8x1f[_0x394a[57]]:_0x53f8x2d[_0x394a[48]];if(!_0x53f8x2c[_0x394a[53]][_0x394a[61]](_0x394a[60])){_0x53f8x1f[_0x394a[32]]= qs[_0x394a[32]](_0x53f8x2c[_0x394a[53]][_0x394a[32]]);_0x53f8x1f[_0x394a[31]]= qs[_0x394a[31]](_0x53f8x2c[_0x394a[53]][_0x394a[31]])};_0x53f8x1f[_0x394a[62]]= qs[_0x394a[63]](_0x53f8x2c[_0x394a[53]][_0x394a[63]]);_0x53f8x1f[_0x394a[64]]= qs[_0x394a[55]](_[_0x394a[65]](_0x53f8x2c[_0x394a[53]],_0x53f8x2d[_0x394a[55]]));if(_0x53f8x2f[_0x394a[52]]){if(_0x53f8x2f[_0x394a[54]]){_0x53f8x2f[_0x394a[54]]= moment(_0x53f8x2f[_0x394a[54]])[_0x394a[67]](1,_0x394a[66])}else {_0x53f8x2f[_0x394a[54]]= moment(_0x53f8x2f[_0x394a[52]])[_0x394a[67]](1,_0x394a[66])};_[_0x394a[68]](_0x53f8x1f[_0x394a[64]],{createdAt:{$gte:_0x53f8x2f[_0x394a[52]],$lte:_0x53f8x2f[_0x394a[54]]}})};if(_0x53f8x2c[_0x394a[53]][_0x394a[69]]){_0x53f8x1f[_0x394a[64]]= _[_0x394a[68]](_0x53f8x1f[_0x394a[64]],{$or:_[_0x394a[71]](_0x53f8x1f[_0x394a[57]],function(_0x53f8x30){var _0x53f8x2e={};_0x53f8x2e[_0x53f8x30]= {$like:_0x394a[70]+ _0x53f8x2c[_0x394a[53]][_0x394a[69]]+ _0x394a[70]};return _0x53f8x2e})})};_0x53f8x1f= _[_0x394a[68]]({},_0x53f8x1f,_0x53f8x2c[_0x394a[72]]);var _0x53f8x31={where:_0x53f8x1f[_0x394a[64]]};return db[_0x394a[50]][_0x394a[30]](_0x53f8x31)[_0x394a[40]](function(_0x53f8x20){_0x53f8x2e[_0x394a[30]]= _0x53f8x20;if(_0x53f8x2c[_0x394a[53]][_0x394a[75]]){_0x53f8x1f[_0x394a[76]]= [{all:true}]};return db[_0x394a[50]][_0x394a[77]](_0x53f8x1f)})[_0x394a[40]](function(_0x53f8x32){_0x53f8x2e[_0x394a[74]]= _0x53f8x32;return _0x53f8x2e})[_0x394a[40]](respondWithFilteredResult(_0x53f8x1a,_0x53f8x1f))[_0x394a[73]](handleError(_0x53f8x1a,null))};exports[_0x394a[78]]= function(_0x53f8x2c,_0x53f8x1a){var _0x53f8x1f={raw:true,where:{id:_0x53f8x2c[_0x394a[80]][_0x394a[79]]}},_0x53f8x2d={};_0x53f8x2d[_0x394a[48]]= _[_0x394a[51]](db[_0x394a[50]][_0x394a[49]]);_0x53f8x2d[_0x394a[53]]= _[_0x394a[51]](_0x53f8x2c[_0x394a[53]]);_0x53f8x2d[_0x394a[55]]= _[_0x394a[56]](_0x53f8x2d[_0x394a[48]],_0x53f8x2d[_0x394a[53]]);_0x53f8x1f[_0x394a[57]]= _[_0x394a[56]](_0x53f8x2d[_0x394a[48]],qs[_0x394a[58]](_0x53f8x2c[_0x394a[53]][_0x394a[58]]));_0x53f8x1f[_0x394a[57]]= (_0x53f8x1f[_0x394a[57]][_0x394a[59]])?_0x53f8x1f[_0x394a[57]]:_0x53f8x2d[_0x394a[48]];if(_0x53f8x2c[_0x394a[53]][_0x394a[75]]){_0x53f8x1f[_0x394a[76]]= [{all:true}]};_0x53f8x1f= _[_0x394a[68]]({},_0x53f8x1f,_0x53f8x2c[_0x394a[72]]);return db[_0x394a[50]][_0x394a[81]](_0x53f8x1f)[_0x394a[40]](handleEntityNotFound(_0x53f8x1a,null))[_0x394a[40]](respondWithResult(_0x53f8x1a,null))[_0x394a[73]](handleError(_0x53f8x1a,null))};exports[_0x394a[82]]= function(_0x53f8x2c,_0x53f8x1a){return db[_0x394a[50]][_0x394a[82]](_0x53f8x2c[_0x394a[83]],{})[_0x394a[40]](respondWithResult(_0x53f8x1a,201))[_0x394a[73]](handleError(_0x53f8x1a,null))};exports[_0x394a[41]]= function(_0x53f8x2c,_0x53f8x1a){if(_0x53f8x2c[_0x394a[83]][_0x394a[79]]){delete _0x53f8x2c[_0x394a[83]][_0x394a[79]]};return db[_0x394a[50]][_0x394a[81]]({where:{id:_0x53f8x2c[_0x394a[80]][_0x394a[79]]}})[_0x394a[40]](handleEntityNotFound(_0x53f8x1a,null))[_0x394a[40]](saveUpdates(_0x53f8x2c[_0x394a[83]],null))[_0x394a[40]](respondWithResult(_0x53f8x1a,null))[_0x394a[73]](handleError(_0x53f8x1a,null))};exports[_0x394a[42]]= function(_0x53f8x2c,_0x53f8x1a){return db[_0x394a[50]][_0x394a[81]]({where:{id:_0x53f8x2c[_0x394a[80]][_0x394a[79]]}})[_0x394a[40]](handleEntityNotFound(_0x53f8x1a,null))[_0x394a[40]](removeEntity(_0x53f8x1a,null))[_0x394a[73]](handleError(_0x53f8x1a,null))}
\ No newline at end of file
+var _0x7065=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x54\x61\x67","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x7065[0];var jsonpatch=require(_0x7065[1]);var rp=require(_0x7065[2]);var moment=require(_0x7065[3]);var BPromise=require(_0x7065[4]);var Mustache=require(_0x7065[5]);var util=require(_0x7065[6]);var path=require(_0x7065[7]);var sox=require(_0x7065[8]);var csv=require(_0x7065[9]);var ejs=require(_0x7065[10]);var fs=require(_0x7065[11]);var _=require(_0x7065[12]);var squel=require(_0x7065[13]);var crypto=require(_0x7065[14]);var jsforce=require(_0x7065[15]);var deskjs=require(_0x7065[16]);var toCsv=require(_0x7065[9]);var querystring=require(_0x7065[17]);var Papa=require(_0x7065[18]);var qs=require(_0x7065[19]);var logger=require(_0x7065[21])(_0x7065[20]);var utils=require(_0x7065[22]);var config=require(_0x7065[23]);var db=require(_0x7065[25])[_0x7065[24]];function respondWithStatusCode(_0x7ae5x1a,_0x7ae5x1b){_0x7ae5x1b= _0x7ae5x1b|| 204;return function(_0x7ae5x1c){if(_0x7ae5x1c){return _0x7ae5x1a[_0x7065[26]](_0x7ae5x1b)};return _0x7ae5x1a[_0x7065[28]](_0x7ae5x1b)[_0x7065[27]]()}}function respondWithResult(_0x7ae5x1a,_0x7ae5x1b){_0x7ae5x1b= _0x7ae5x1b|| 200;return function(_0x7ae5x1c){if(_0x7ae5x1c){return _0x7ae5x1a[_0x7065[28]](_0x7ae5x1b)[_0x7065[29]](_0x7ae5x1c)}}}function respondWithFilteredResult(_0x7ae5x1a,_0x7ae5x1f){return function(_0x7ae5x1c){if(_0x7ae5x1c){var _0x7ae5x20=_0x7ae5x1c[_0x7065[30]],_0x7ae5x21=_0x7ae5x1f[_0x7065[31]],_0x7ae5x22=_0x7ae5x1f[_0x7065[31]]+ _0x7ae5x1f[_0x7065[32]],_0x7ae5x1b;if(_0x7ae5x22>= _0x7ae5x20){_0x7ae5x22= _0x7ae5x20;_0x7ae5x1b= 200}else {_0x7ae5x1b= 206};_0x7ae5x1a[_0x7065[28]](_0x7ae5x1b);return _0x7ae5x1a[_0x7065[36]](_0x7065[33],_0x7ae5x21+ _0x7065[34]+ _0x7ae5x22+ _0x7065[35]+ _0x7ae5x20)[_0x7065[29]](_0x7ae5x1c)};return null}}function patchUpdates(_0x7ae5x24){return function(_0x7ae5x1c){try{jsonpatch[_0x7065[37]](_0x7ae5x1c,_0x7ae5x24,true)}catch(err){return BPromise[_0x7065[38]](err)};return _0x7ae5x1c[_0x7065[39]]()}}function saveUpdates(_0x7ae5x26,_0x7ae5x1b){return function(_0x7ae5x1c){if(_0x7ae5x1c){return _0x7ae5x1c[_0x7065[41]](_0x7ae5x26)[_0x7065[40]](function(_0x7ae5x27){return _0x7ae5x27})};return null}}function removeEntity(_0x7ae5x1a,_0x7ae5x1b){return function(_0x7ae5x1c){if(_0x7ae5x1c){return _0x7ae5x1c[_0x7065[42]]()[_0x7065[40]](function(){_0x7ae5x1a[_0x7065[28]](204)[_0x7065[27]]()})}}}function handleEntityNotFound(_0x7ae5x1a,_0x7ae5x1b){return function(_0x7ae5x1c){if(!_0x7ae5x1c){_0x7ae5x1a[_0x7065[26]](404)};return _0x7ae5x1c}}function handleError(_0x7ae5x1a,_0x7ae5x1b){_0x7ae5x1b= _0x7ae5x1b|| 500;return function(_0x7ae5x2b){logger[_0x7065[44]](_0x7ae5x2b[_0x7065[43]]);if(_0x7ae5x2b[_0x7065[45]]){delete _0x7ae5x2b[_0x7065[45]]};_0x7ae5x1a[_0x7065[28]](_0x7ae5x1b)[_0x7065[46]](_0x7ae5x2b)}}exports[_0x7065[47]]= function(_0x7ae5x2c,_0x7ae5x1a){var _0x7ae5x1f={},_0x7ae5x2d={},_0x7ae5x2e={count:0,rows:[]};_0x7ae5x2d[_0x7065[48]]= _[_0x7065[51]](db[_0x7065[50]][_0x7065[49]]);var _0x7ae5x2f={dateStart:_0x7ae5x2c[_0x7065[53]][_0x7065[52]],dateEnd:_0x7ae5x2c[_0x7065[53]][_0x7065[54]]};delete _0x7ae5x2c[_0x7065[53]][_0x7065[52]];delete _0x7ae5x2c[_0x7065[53]][_0x7065[54]];_0x7ae5x2d[_0x7065[53]]= _[_0x7065[51]](_0x7ae5x2c[_0x7065[53]]);_0x7ae5x2d[_0x7065[55]]= _[_0x7065[56]](_0x7ae5x2d[_0x7065[48]],_0x7ae5x2d[_0x7065[53]]);_0x7ae5x1f[_0x7065[57]]= _[_0x7065[56]](_0x7ae5x2d[_0x7065[48]],qs[_0x7065[58]](_0x7ae5x2c[_0x7065[53]][_0x7065[58]]));_0x7ae5x1f[_0x7065[57]]= (_0x7ae5x1f[_0x7065[57]][_0x7065[59]])?_0x7ae5x1f[_0x7065[57]]:_0x7ae5x2d[_0x7065[48]];if(!_0x7ae5x2c[_0x7065[53]][_0x7065[61]](_0x7065[60])){_0x7ae5x1f[_0x7065[32]]= qs[_0x7065[32]](_0x7ae5x2c[_0x7065[53]][_0x7065[32]]);_0x7ae5x1f[_0x7065[31]]= qs[_0x7065[31]](_0x7ae5x2c[_0x7065[53]][_0x7065[31]])};_0x7ae5x1f[_0x7065[62]]= qs[_0x7065[63]](_0x7ae5x2c[_0x7065[53]][_0x7065[63]]);_0x7ae5x1f[_0x7065[64]]= qs[_0x7065[55]](_[_0x7065[65]](_0x7ae5x2c[_0x7065[53]],_0x7ae5x2d[_0x7065[55]]));if(_0x7ae5x2f[_0x7065[52]]){if(_0x7ae5x2f[_0x7065[54]]){_0x7ae5x2f[_0x7065[54]]= moment(_0x7ae5x2f[_0x7065[54]])[_0x7065[67]](1,_0x7065[66])}else {_0x7ae5x2f[_0x7065[54]]= moment(_0x7ae5x2f[_0x7065[52]])[_0x7065[67]](1,_0x7065[66])};_[_0x7065[68]](_0x7ae5x1f[_0x7065[64]],{createdAt:{$gte:_0x7ae5x2f[_0x7065[52]],$lte:_0x7ae5x2f[_0x7065[54]]}})};if(_0x7ae5x2c[_0x7065[53]][_0x7065[69]]){_0x7ae5x1f[_0x7065[64]]= _[_0x7065[68]](_0x7ae5x1f[_0x7065[64]],{$or:_[_0x7065[71]](_0x7ae5x1f[_0x7065[57]],function(_0x7ae5x30){var _0x7ae5x2e={};_0x7ae5x2e[_0x7ae5x30]= {$like:_0x7065[70]+ _0x7ae5x2c[_0x7065[53]][_0x7065[69]]+ _0x7065[70]};return _0x7ae5x2e})})};_0x7ae5x1f= _[_0x7065[68]]({},_0x7ae5x1f,_0x7ae5x2c[_0x7065[72]]);var _0x7ae5x31={where:_0x7ae5x1f[_0x7065[64]]};return db[_0x7065[50]][_0x7065[30]](_0x7ae5x31)[_0x7065[40]](function(_0x7ae5x20){_0x7ae5x2e[_0x7065[30]]= _0x7ae5x20;if(_0x7ae5x2c[_0x7065[53]][_0x7065[75]]){_0x7ae5x1f[_0x7065[76]]= [{all:true}]};return db[_0x7065[50]][_0x7065[77]](_0x7ae5x1f)})[_0x7065[40]](function(_0x7ae5x32){_0x7ae5x2e[_0x7065[74]]= _0x7ae5x32;return _0x7ae5x2e})[_0x7065[40]](respondWithFilteredResult(_0x7ae5x1a,_0x7ae5x1f))[_0x7065[73]](handleError(_0x7ae5x1a,null))};exports[_0x7065[78]]= function(_0x7ae5x2c,_0x7ae5x1a){var _0x7ae5x1f={raw:true,where:{id:_0x7ae5x2c[_0x7065[80]][_0x7065[79]]}},_0x7ae5x2d={};_0x7ae5x2d[_0x7065[48]]= _[_0x7065[51]](db[_0x7065[50]][_0x7065[49]]);_0x7ae5x2d[_0x7065[53]]= _[_0x7065[51]](_0x7ae5x2c[_0x7065[53]]);_0x7ae5x2d[_0x7065[55]]= _[_0x7065[56]](_0x7ae5x2d[_0x7065[48]],_0x7ae5x2d[_0x7065[53]]);_0x7ae5x1f[_0x7065[57]]= _[_0x7065[56]](_0x7ae5x2d[_0x7065[48]],qs[_0x7065[58]](_0x7ae5x2c[_0x7065[53]][_0x7065[58]]));_0x7ae5x1f[_0x7065[57]]= (_0x7ae5x1f[_0x7065[57]][_0x7065[59]])?_0x7ae5x1f[_0x7065[57]]:_0x7ae5x2d[_0x7065[48]];if(_0x7ae5x2c[_0x7065[53]][_0x7065[75]]){_0x7ae5x1f[_0x7065[76]]= [{all:true}]};_0x7ae5x1f= _[_0x7065[68]]({},_0x7ae5x1f,_0x7ae5x2c[_0x7065[72]]);return db[_0x7065[50]][_0x7065[81]](_0x7ae5x1f)[_0x7065[40]](handleEntityNotFound(_0x7ae5x1a,null))[_0x7065[40]](respondWithResult(_0x7ae5x1a,null))[_0x7065[73]](handleError(_0x7ae5x1a,null))};exports[_0x7065[82]]= function(_0x7ae5x2c,_0x7ae5x1a){return db[_0x7065[50]][_0x7065[82]](_0x7ae5x2c[_0x7065[83]],{})[_0x7065[40]](respondWithResult(_0x7ae5x1a,201))[_0x7065[73]](handleError(_0x7ae5x1a,null))};exports[_0x7065[41]]= function(_0x7ae5x2c,_0x7ae5x1a){if(_0x7ae5x2c[_0x7065[83]][_0x7065[79]]){delete _0x7ae5x2c[_0x7065[83]][_0x7065[79]]};return db[_0x7065[50]][_0x7065[81]]({where:{id:_0x7ae5x2c[_0x7065[80]][_0x7065[79]]}})[_0x7065[40]](handleEntityNotFound(_0x7ae5x1a,null))[_0x7065[40]](saveUpdates(_0x7ae5x2c[_0x7065[83]],null))[_0x7065[40]](respondWithResult(_0x7ae5x1a,null))[_0x7065[73]](handleError(_0x7ae5x1a,null))};exports[_0x7065[42]]= function(_0x7ae5x2c,_0x7ae5x1a){return db[_0x7065[50]][_0x7065[81]]({where:{id:_0x7ae5x2c[_0x7065[80]][_0x7065[79]]}})[_0x7065[40]](handleEntityNotFound(_0x7ae5x1a,null))[_0x7065[40]](removeEntity(_0x7ae5x1a,null))[_0x7065[73]](handleError(_0x7ae5x1a,null))}
\ No newline at end of file
index ff3f7c8..64f2b2f 100644 (file)
@@ -1 +1 @@
-var _0xf58c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x74\x61\x67\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x54\x61\x67","\x74\x6F\x6F\x6C\x73\x5F\x74\x61\x67\x73","\x64\x65\x66\x69\x6E\x65"];_0xf58c[0];var _=require(_0xf58c[1]);var util=require(_0xf58c[2]);var logger=require(_0xf58c[4])(_0xf58c[3]);var moment=require(_0xf58c[5]);var BPromise=require(_0xf58c[6]);var rp=require(_0xf58c[7]);var attributes=require(_0xf58c[8]);module[_0xf58c[9]]= function(_0xebadx8,_0xebadx9){return _0xebadx8[_0xf58c[12]](_0xf58c[10],attributes,{tableName:_0xf58c[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xfbbf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x74\x61\x67\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x54\x61\x67","\x74\x6F\x6F\x6C\x73\x5F\x74\x61\x67\x73","\x64\x65\x66\x69\x6E\x65"];_0xfbbf[0];var _=require(_0xfbbf[1]);var util=require(_0xfbbf[2]);var logger=require(_0xfbbf[4])(_0xfbbf[3]);var moment=require(_0xfbbf[5]);var BPromise=require(_0xfbbf[6]);var rp=require(_0xfbbf[7]);var attributes=require(_0xfbbf[8]);module[_0xfbbf[9]]= function(_0xa53ax8,_0xa53ax9){return _0xa53ax8[_0xfbbf[12]](_0xfbbf[10],attributes,{tableName:_0xfbbf[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 4123f61..9d4672a 100644 (file)
@@ -1 +1 @@
-var _0xddfb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x54\x61\x67\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x54\x61\x67\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xddfb[0];var _=require(_0xddfb[1]);var util=require(_0xddfb[2]);var moment=require(_0xddfb[3]);var BPromise=require(_0xddfb[4]);var rs=require(_0xddfb[5]);var fs=require(_0xddfb[6]);var db=require(_0xddfb[8])[_0xddfb[7]];var utils=require(_0xddfb[9]);var logger=require(_0xddfb[11])(_0xddfb[10]);var config=require(_0xddfb[12]);var jayson=require(_0xddfb[13]);var client=jayson[_0xddfb[15]][_0xddfb[14]]({port:9002});function respondWithRpcPromise(_0x3b6fxe,_0x3b6fxf,_0x3b6fx10){return  new BPromise(function(_0x3b6fx11,_0x3b6fx12){return client[_0xddfb[28]](_0x3b6fxe,_0x3b6fx10)[_0xddfb[27]](function(_0x3b6fx14){logger[_0xddfb[20]](_0xddfb[16],_0x3b6fxf,_0xddfb[19]);logger[_0xddfb[23]](_0xddfb[21],_0x3b6fxf,_0xddfb[19],JSON[_0xddfb[22]](_0x3b6fx14));if(_0x3b6fx14[_0xddfb[17]]){if(_0x3b6fx14[_0xddfb[17]][_0xddfb[24]]=== 500){logger[_0xddfb[17]](_0xddfb[16],_0x3b6fxf,_0x3b6fx14[_0xddfb[17]][_0xddfb[25]]);return _0x3b6fx12(_0x3b6fx14[_0xddfb[17]][_0xddfb[25]])};logger[_0xddfb[17]](_0xddfb[16],_0x3b6fxf,_0x3b6fx14[_0xddfb[17]][_0xddfb[25]]);return _0x3b6fx11(_0x3b6fx14[_0xddfb[17]][_0xddfb[25]])}else {logger[_0xddfb[20]](_0xddfb[16],_0x3b6fxf,_0xddfb[19]);_0x3b6fx11(_0x3b6fx14[_0xddfb[26]][_0xddfb[25]])}})[_0xddfb[18]](function(_0x3b6fx13){logger[_0xddfb[17]](_0xddfb[16],_0x3b6fxf,_0x3b6fx13);_0x3b6fx12(_0x3b6fx13)})})}
\ No newline at end of file
+var _0xbbf7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x54\x61\x67\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x54\x61\x67\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xbbf7[0];var _=require(_0xbbf7[1]);var util=require(_0xbbf7[2]);var moment=require(_0xbbf7[3]);var BPromise=require(_0xbbf7[4]);var rs=require(_0xbbf7[5]);var fs=require(_0xbbf7[6]);var db=require(_0xbbf7[8])[_0xbbf7[7]];var utils=require(_0xbbf7[9]);var logger=require(_0xbbf7[11])(_0xbbf7[10]);var config=require(_0xbbf7[12]);var jayson=require(_0xbbf7[13]);var client=jayson[_0xbbf7[15]][_0xbbf7[14]]({port:9002});function respondWithRpcPromise(_0x5ab9xe,_0x5ab9xf,_0x5ab9x10){return  new BPromise(function(_0x5ab9x11,_0x5ab9x12){return client[_0xbbf7[28]](_0x5ab9xe,_0x5ab9x10)[_0xbbf7[27]](function(_0x5ab9x14){logger[_0xbbf7[20]](_0xbbf7[16],_0x5ab9xf,_0xbbf7[19]);logger[_0xbbf7[23]](_0xbbf7[21],_0x5ab9xf,_0xbbf7[19],JSON[_0xbbf7[22]](_0x5ab9x14));if(_0x5ab9x14[_0xbbf7[17]]){if(_0x5ab9x14[_0xbbf7[17]][_0xbbf7[24]]=== 500){logger[_0xbbf7[17]](_0xbbf7[16],_0x5ab9xf,_0x5ab9x14[_0xbbf7[17]][_0xbbf7[25]]);return _0x5ab9x12(_0x5ab9x14[_0xbbf7[17]][_0xbbf7[25]])};logger[_0xbbf7[17]](_0xbbf7[16],_0x5ab9xf,_0x5ab9x14[_0xbbf7[17]][_0xbbf7[25]]);return _0x5ab9x11(_0x5ab9x14[_0xbbf7[17]][_0xbbf7[25]])}else {logger[_0xbbf7[20]](_0xbbf7[16],_0x5ab9xf,_0xbbf7[19]);_0x5ab9x11(_0x5ab9x14[_0xbbf7[26]][_0xbbf7[25]])}})[_0xbbf7[18]](function(_0x5ab9x13){logger[_0xbbf7[17]](_0xbbf7[16],_0x5ab9xf,_0x5ab9x13);_0x5ab9x12(_0x5ab9x13)})})}
\ No newline at end of file
index 6643754..a519a8b 100644 (file)
@@ -1 +1 @@
-var _0x9935=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x74\x65\x61\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x75\x65\x73","\x67\x65\x74\x51\x75\x65\x75\x65\x73","\x2F\x3A\x69\x64\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x9935[0];var multer=require(_0x9935[1]);var util=require(_0x9935[2]);var path=require(_0x9935[3]);var express=require(_0x9935[4]);var router=express.Router();var auth=require(_0x9935[5]);var interaction=require(_0x9935[6]);var config=require(_0x9935[7]);var controller=require(_0x9935[8]);router[_0x9935[12]](_0x9935[9],auth[_0x9935[10]](),controller[_0x9935[11]]);router[_0x9935[12]](_0x9935[13],auth[_0x9935[10]](),controller[_0x9935[14]]);router[_0x9935[12]](_0x9935[15],auth[_0x9935[10]](),controller[_0x9935[16]]);router[_0x9935[12]](_0x9935[17],auth[_0x9935[10]](),controller[_0x9935[18]]);router[_0x9935[20]](_0x9935[9],auth[_0x9935[10]](),controller[_0x9935[19]]);router[_0x9935[20]](_0x9935[15],auth[_0x9935[10]](),controller[_0x9935[21]]);router[_0x9935[20]](_0x9935[17],auth[_0x9935[10]](),controller[_0x9935[22]]);router[_0x9935[24]](_0x9935[13],auth[_0x9935[10]](),controller[_0x9935[23]]);router[_0x9935[26]](_0x9935[13],auth[_0x9935[10]](),controller[_0x9935[25]]);router[_0x9935[26]](_0x9935[15],auth[_0x9935[10]](),controller[_0x9935[27]]);router[_0x9935[26]](_0x9935[17],auth[_0x9935[10]](),controller[_0x9935[28]]);module[_0x9935[29]]= router
\ No newline at end of file
+var _0xc136=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x74\x65\x61\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x75\x65\x73","\x67\x65\x74\x51\x75\x65\x75\x65\x73","\x2F\x3A\x69\x64\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xc136[0];var multer=require(_0xc136[1]);var util=require(_0xc136[2]);var path=require(_0xc136[3]);var express=require(_0xc136[4]);var router=express.Router();var auth=require(_0xc136[5]);var interaction=require(_0xc136[6]);var config=require(_0xc136[7]);var controller=require(_0xc136[8]);router[_0xc136[12]](_0xc136[9],auth[_0xc136[10]](),controller[_0xc136[11]]);router[_0xc136[12]](_0xc136[13],auth[_0xc136[10]](),controller[_0xc136[14]]);router[_0xc136[12]](_0xc136[15],auth[_0xc136[10]](),controller[_0xc136[16]]);router[_0xc136[12]](_0xc136[17],auth[_0xc136[10]](),controller[_0xc136[18]]);router[_0xc136[20]](_0xc136[9],auth[_0xc136[10]](),controller[_0xc136[19]]);router[_0xc136[20]](_0xc136[15],auth[_0xc136[10]](),controller[_0xc136[21]]);router[_0xc136[20]](_0xc136[17],auth[_0xc136[10]](),controller[_0xc136[22]]);router[_0xc136[24]](_0xc136[13],auth[_0xc136[10]](),controller[_0xc136[23]]);router[_0xc136[26]](_0xc136[13],auth[_0xc136[10]](),controller[_0xc136[25]]);router[_0xc136[26]](_0xc136[15],auth[_0xc136[10]](),controller[_0xc136[27]]);router[_0xc136[26]](_0xc136[17],auth[_0xc136[10]](),controller[_0xc136[28]]);module[_0xc136[29]]= router
\ No newline at end of file
index 16b6f89..c4d008b 100644 (file)
@@ -1 +1 @@
-var _0x22b2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65"];_0x22b2[0];var Sequelize=require(_0x22b2[1]);module[_0x22b2[2]]= {name:{type:Sequelize[_0x22b2[3]],allowNull:false,unique:_0x22b2[4]},description:{type:Sequelize[_0x22b2[3]]}}
\ No newline at end of file
+var _0x1d6b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65"];_0x1d6b[0];var Sequelize=require(_0x1d6b[1]);module[_0x1d6b[2]]= {name:{type:Sequelize[_0x1d6b[3]],allowNull:false,unique:_0x1d6b[4]},description:{type:Sequelize[_0x1d6b[3]]}}
\ No newline at end of file
index 71648b7..3491d17 100644 (file)
@@ -1 +1 @@
-var _0xa4d9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x74\x65\x61\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x54\x65\x61\x6D","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x51\x75\x65\x75\x65\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x69\x73\x56\x61\x6C\x69\x64\x43\x68\x61\x6E\x6E\x65\x6C","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x63\x68\x61\x6E\x6E\x65\x6C","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65","\x51\x75\x65\x75\x65","\x67\x65\x74","\x51\x75\x65\x75\x65\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x51\x75\x65\x75\x65\x73","\x69\x64\x73","\x72\x65\x6D\x6F\x76\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x73\x65\x72\x54\x65\x61\x6D\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x6F\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x69\x73\x41\x72\x72\x61\x79","\x75\x73\x65\x72\x54\x65\x61\x6D\x3A\x72\x65\x6D\x6F\x76\x65","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x55\x73\x65\x72"];_0xa4d9[0];var jsonpatch=require(_0xa4d9[1]);var rp=require(_0xa4d9[2]);var moment=require(_0xa4d9[3]);var BPromise=require(_0xa4d9[4]);var Mustache=require(_0xa4d9[5]);var util=require(_0xa4d9[6]);var path=require(_0xa4d9[7]);var sox=require(_0xa4d9[8]);var csv=require(_0xa4d9[9]);var ejs=require(_0xa4d9[10]);var fs=require(_0xa4d9[11]);var _=require(_0xa4d9[12]);var squel=require(_0xa4d9[13]);var crypto=require(_0xa4d9[14]);var jsforce=require(_0xa4d9[15]);var deskjs=require(_0xa4d9[16]);var toCsv=require(_0xa4d9[9]);var querystring=require(_0xa4d9[17]);var Papa=require(_0xa4d9[18]);var qs=require(_0xa4d9[19]);var logger=require(_0xa4d9[21])(_0xa4d9[20]);var utils=require(_0xa4d9[22]);var config=require(_0xa4d9[23]);var db=require(_0xa4d9[25])[_0xa4d9[24]];var socket=require(_0xa4d9[27])({host:_0xa4d9[26],port:6379});require(_0xa4d9[29])[_0xa4d9[28]](socket);function respondWithStatusCode(_0xb853x1b,_0xb853x1c){_0xb853x1c= _0xb853x1c|| 204;return function(_0xb853x1d){if(_0xb853x1d){return _0xb853x1b[_0xa4d9[30]](_0xb853x1c)};return _0xb853x1b[_0xa4d9[32]](_0xb853x1c)[_0xa4d9[31]]()}}function respondWithResult(_0xb853x1b,_0xb853x1c){_0xb853x1c= _0xb853x1c|| 200;return function(_0xb853x1d){if(_0xb853x1d){return _0xb853x1b[_0xa4d9[32]](_0xb853x1c)[_0xa4d9[33]](_0xb853x1d)}}}function respondWithFilteredResult(_0xb853x1b,_0xb853x20){return function(_0xb853x1d){if(_0xb853x1d){var _0xb853x21=_0xb853x1d[_0xa4d9[34]],_0xb853x22=_0xb853x20[_0xa4d9[35]],_0xb853x23=_0xb853x20[_0xa4d9[35]]+ _0xb853x20[_0xa4d9[36]],_0xb853x1c;if(_0xb853x23>= _0xb853x21){_0xb853x23= _0xb853x21;_0xb853x1c= 200}else {_0xb853x1c= 206};_0xb853x1b[_0xa4d9[32]](_0xb853x1c);return _0xb853x1b[_0xa4d9[40]](_0xa4d9[37],_0xb853x22+ _0xa4d9[38]+ _0xb853x23+ _0xa4d9[39]+ _0xb853x21)[_0xa4d9[33]](_0xb853x1d)};return null}}function patchUpdates(_0xb853x25){return function(_0xb853x1d){try{jsonpatch[_0xa4d9[41]](_0xb853x1d,_0xb853x25,true)}catch(err){return BPromise[_0xa4d9[42]](err)};return _0xb853x1d[_0xa4d9[43]]()}}function saveUpdates(_0xb853x27,_0xb853x1c){return function(_0xb853x1d){if(_0xb853x1d){return _0xb853x1d[_0xa4d9[45]](_0xb853x27)[_0xa4d9[44]](function(_0xb853x28){return _0xb853x28})};return null}}function removeEntity(_0xb853x1b,_0xb853x1c){return function(_0xb853x1d){if(_0xb853x1d){return _0xb853x1d[_0xa4d9[46]]()[_0xa4d9[44]](function(){_0xb853x1b[_0xa4d9[32]](204)[_0xa4d9[31]]()})}}}function handleEntityNotFound(_0xb853x1b,_0xb853x1c){return function(_0xb853x1d){if(!_0xb853x1d){_0xb853x1b[_0xa4d9[30]](404)};return _0xb853x1d}}function handleError(_0xb853x1b,_0xb853x1c){_0xb853x1c= _0xb853x1c|| 500;return function(_0xb853x2c){logger[_0xa4d9[48]](_0xb853x2c[_0xa4d9[47]]);if(_0xb853x2c[_0xa4d9[49]]){delete _0xb853x2c[_0xa4d9[49]]};_0xb853x1b[_0xa4d9[32]](_0xb853x1c)[_0xa4d9[50]](_0xb853x2c)}}exports[_0xa4d9[51]]= function(_0xb853x2d,_0xb853x1b){var _0xb853x20={},_0xb853x2e={},_0xb853x2f={count:0,rows:[]};_0xb853x2e[_0xa4d9[52]]= _[_0xa4d9[55]](db[_0xa4d9[54]][_0xa4d9[53]]);var _0xb853x30={dateStart:_0xb853x2d[_0xa4d9[57]][_0xa4d9[56]],dateEnd:_0xb853x2d[_0xa4d9[57]][_0xa4d9[58]]};delete _0xb853x2d[_0xa4d9[57]][_0xa4d9[56]];delete _0xb853x2d[_0xa4d9[57]][_0xa4d9[58]];_0xb853x2e[_0xa4d9[57]]= _[_0xa4d9[55]](_0xb853x2d[_0xa4d9[57]]);_0xb853x2e[_0xa4d9[59]]= _[_0xa4d9[60]](_0xb853x2e[_0xa4d9[52]],_0xb853x2e[_0xa4d9[57]]);_0xb853x20[_0xa4d9[61]]= _[_0xa4d9[60]](_0xb853x2e[_0xa4d9[52]],qs[_0xa4d9[62]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[62]]));_0xb853x20[_0xa4d9[61]]= (_0xb853x20[_0xa4d9[61]][_0xa4d9[63]])?_0xb853x20[_0xa4d9[61]]:_0xb853x2e[_0xa4d9[52]];if(!_0xb853x2d[_0xa4d9[57]][_0xa4d9[65]](_0xa4d9[64])){_0xb853x20[_0xa4d9[36]]= qs[_0xa4d9[36]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[36]]);_0xb853x20[_0xa4d9[35]]= qs[_0xa4d9[35]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[35]])};_0xb853x20[_0xa4d9[66]]= qs[_0xa4d9[67]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[67]]);_0xb853x20[_0xa4d9[68]]= qs[_0xa4d9[59]](_[_0xa4d9[69]](_0xb853x2d[_0xa4d9[57]],_0xb853x2e[_0xa4d9[59]]));if(_0xb853x30[_0xa4d9[56]]){if(_0xb853x30[_0xa4d9[58]]){_0xb853x30[_0xa4d9[58]]= moment(_0xb853x30[_0xa4d9[58]])[_0xa4d9[71]](1,_0xa4d9[70])}else {_0xb853x30[_0xa4d9[58]]= moment(_0xb853x30[_0xa4d9[56]])[_0xa4d9[71]](1,_0xa4d9[70])};_[_0xa4d9[72]](_0xb853x20[_0xa4d9[68]],{createdAt:{$gte:_0xb853x30[_0xa4d9[56]],$lte:_0xb853x30[_0xa4d9[58]]}})};if(_0xb853x2d[_0xa4d9[57]][_0xa4d9[73]]){_0xb853x20[_0xa4d9[68]]= _[_0xa4d9[72]](_0xb853x20[_0xa4d9[68]],{$or:_[_0xa4d9[75]](_0xb853x20[_0xa4d9[61]],function(_0xb853x31){var _0xb853x2f={};_0xb853x2f[_0xb853x31]= {$like:_0xa4d9[74]+ _0xb853x2d[_0xa4d9[57]][_0xa4d9[73]]+ _0xa4d9[74]};return _0xb853x2f})})};_0xb853x20= _[_0xa4d9[72]]({},_0xb853x20,_0xb853x2d[_0xa4d9[76]]);var _0xb853x32={where:_0xb853x20[_0xa4d9[68]]};return db[_0xa4d9[54]][_0xa4d9[34]](_0xb853x32)[_0xa4d9[44]](function(_0xb853x21){_0xb853x2f[_0xa4d9[34]]= _0xb853x21;if(_0xb853x2d[_0xa4d9[57]][_0xa4d9[79]]){_0xb853x20[_0xa4d9[80]]= [{all:true}]};return db[_0xa4d9[54]][_0xa4d9[81]](_0xb853x20)})[_0xa4d9[44]](function(_0xb853x33){_0xb853x2f[_0xa4d9[78]]= _0xb853x33;return _0xb853x2f})[_0xa4d9[44]](respondWithFilteredResult(_0xb853x1b,_0xb853x20))[_0xa4d9[77]](handleError(_0xb853x1b,null))};exports[_0xa4d9[82]]= function(_0xb853x2d,_0xb853x1b){var _0xb853x20={raw:false,where:{id:_0xb853x2d[_0xa4d9[84]][_0xa4d9[83]]}},_0xb853x2e={};_0xb853x2e[_0xa4d9[52]]= _[_0xa4d9[55]](db[_0xa4d9[54]][_0xa4d9[53]]);_0xb853x2e[_0xa4d9[57]]= _[_0xa4d9[55]](_0xb853x2d[_0xa4d9[57]]);_0xb853x2e[_0xa4d9[59]]= _[_0xa4d9[60]](_0xb853x2e[_0xa4d9[52]],_0xb853x2e[_0xa4d9[57]]);_0xb853x20[_0xa4d9[61]]= _[_0xa4d9[60]](_0xb853x2e[_0xa4d9[52]],qs[_0xa4d9[62]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[62]]));_0xb853x20[_0xa4d9[61]]= (_0xb853x20[_0xa4d9[61]][_0xa4d9[63]])?_0xb853x20[_0xa4d9[61]]:_0xb853x2e[_0xa4d9[52]];if(_0xb853x2d[_0xa4d9[57]][_0xa4d9[79]]){_0xb853x20[_0xa4d9[80]]= [{all:true}]};_0xb853x20= _[_0xa4d9[72]]({},_0xb853x20,_0xb853x2d[_0xa4d9[76]]);return db[_0xa4d9[54]][_0xa4d9[85]](_0xb853x20)[_0xa4d9[44]](handleEntityNotFound(_0xb853x1b,null))[_0xa4d9[44]](respondWithResult(_0xb853x1b,null))[_0xa4d9[77]](handleError(_0xb853x1b,null))};exports[_0xa4d9[86]]= function(_0xb853x2d,_0xb853x1b){return db[_0xa4d9[54]][_0xa4d9[86]](_0xb853x2d[_0xa4d9[87]],{})[_0xa4d9[44]](respondWithResult(_0xb853x1b,201))[_0xa4d9[77]](handleError(_0xb853x1b,null))};exports[_0xa4d9[45]]= function(_0xb853x2d,_0xb853x1b){if(_0xb853x2d[_0xa4d9[87]][_0xa4d9[83]]){delete _0xb853x2d[_0xa4d9[87]][_0xa4d9[83]]};return db[_0xa4d9[54]][_0xa4d9[85]]({where:{id:_0xb853x2d[_0xa4d9[84]][_0xa4d9[83]]}})[_0xa4d9[44]](handleEntityNotFound(_0xb853x1b,null))[_0xa4d9[44]](saveUpdates(_0xb853x2d[_0xa4d9[87]],null))[_0xa4d9[44]](respondWithResult(_0xb853x1b,null))[_0xa4d9[77]](handleError(_0xb853x1b,null))};exports[_0xa4d9[46]]= function(_0xb853x2d,_0xb853x1b){return db[_0xa4d9[54]][_0xa4d9[85]]({where:{id:_0xb853x2d[_0xa4d9[84]][_0xa4d9[83]]}})[_0xa4d9[44]](handleEntityNotFound(_0xb853x1b,null))[_0xa4d9[44]](removeEntity(_0xb853x1b,null))[_0xa4d9[77]](handleError(_0xb853x1b,null))};exports[_0xa4d9[88]]= function(_0xb853x2d,_0xb853x1b,_0xb853x34){return db[_0xa4d9[54]][_0xa4d9[98]]({where:{id:_0xb853x2d[_0xa4d9[84]][_0xa4d9[83]]}})[_0xa4d9[44]](handleEntityNotFound(_0xb853x1b,null))[_0xa4d9[44]](function(_0xb853x1d){if(!_0xb853x2d[_0xa4d9[57]][_0xa4d9[89]]||  !utils[_0xa4d9[90]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[89]])){throw  new db[_0xa4d9[92]].ValidationError(_0xa4d9[91])};var _0xb853x20={};var _0xb853x2e={};_0xb853x2e[_0xa4d9[52]]= _[_0xa4d9[55]](db[_[_0xa4d9[94]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[89]][_0xa4d9[93]]())+ _0xa4d9[95]][_0xa4d9[53]]);_0xb853x2e[_0xa4d9[57]]= _[_0xa4d9[55]](_0xb853x2d[_0xa4d9[57]]);_0xb853x2e[_0xa4d9[59]]= _[_0xa4d9[60]](_0xb853x2e[_0xa4d9[52]],_0xb853x2e[_0xa4d9[57]]);_0xb853x20[_0xa4d9[61]]= _[_0xa4d9[60]](_0xb853x2e[_0xa4d9[52]],qs[_0xa4d9[62]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[62]]));_0xb853x20[_0xa4d9[61]]= (_0xb853x20[_0xa4d9[61]][_0xa4d9[63]])?_0xb853x20[_0xa4d9[61]]:_0xb853x2e[_0xa4d9[52]];_0xb853x20[_0xa4d9[36]]= qs[_0xa4d9[36]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[36]]);_0xb853x20[_0xa4d9[35]]= qs[_0xa4d9[35]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[35]]);_0xb853x20[_0xa4d9[66]]= qs[_0xa4d9[67]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[67]]);_0xb853x20[_0xa4d9[68]]= qs[_0xa4d9[59]](_[_0xa4d9[69]](_0xb853x2d[_0xa4d9[57]],_0xb853x2e[_0xa4d9[59]]));_0xb853x20= _[_0xa4d9[72]]({},_0xb853x20,_0xb853x2d[_0xa4d9[76]]);return _0xb853x1d[_0xa4d9[96]+ _[_0xa4d9[94]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[89]][_0xa4d9[93]]())+ _0xa4d9[97]](_0xb853x20)})[_0xa4d9[44]](respondWithResult(_0xb853x1b,null))[_0xa4d9[77]](handleError(_0xb853x1b,null))};exports[_0xa4d9[99]]= function(_0xb853x2d,_0xb853x1b,_0xb853x34){return db[_0xa4d9[54]][_0xa4d9[98]]({where:{id:_0xb853x2d[_0xa4d9[84]][_0xa4d9[83]]}})[_0xa4d9[44]](function(_0xb853x1d){if(_0xb853x1d){if(!_0xb853x2d[_0xa4d9[87]][_0xa4d9[89]]||  !utils[_0xa4d9[90]](_0xb853x2d[_0xa4d9[87]][_0xa4d9[89]])){throw  new db[_0xa4d9[92]].ValidationError(_0xa4d9[91])};return _0xb853x1d[_0xa4d9[71]+ _[_0xa4d9[94]](_0xb853x2d[_0xa4d9[87]][_0xa4d9[89]][_0xa4d9[93]]())+ _0xa4d9[97]](_0xb853x2d[_0xa4d9[87]][_0xa4d9[100]])};return null})[_0xa4d9[44]](handleEntityNotFound(_0xb853x1b,null))[_0xa4d9[44]](respondWithStatusCode(_0xb853x1b,null))[_0xa4d9[77]](handleError(_0xb853x1b,null))};exports[_0xa4d9[101]]= function(_0xb853x2d,_0xb853x1b,_0xb853x34){return db[_0xa4d9[54]][_0xa4d9[98]]({where:{id:_0xb853x2d[_0xa4d9[84]][_0xa4d9[83]]}})[_0xa4d9[44]](function(_0xb853x1d){if(_0xb853x1d){if(!_0xb853x2d[_0xa4d9[57]][_0xa4d9[89]]||  !utils[_0xa4d9[90]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[89]])){throw  new db[_0xa4d9[92]].ValidationError(_0xa4d9[91])};return _0xb853x1d[_0xa4d9[102]+ _[_0xa4d9[94]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[89]][_0xa4d9[93]]())+ _0xa4d9[97]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[100]])};return null})[_0xa4d9[44]](handleEntityNotFound(_0xb853x1b,null))[_0xa4d9[44]](respondWithStatusCode(_0xb853x1b,null))[_0xa4d9[77]](handleError(_0xb853x1b,null))};exports[_0xa4d9[103]]= function(_0xb853x2d,_0xb853x1b,_0xb853x34){return db[_0xa4d9[54]][_0xa4d9[85]]({where:{id:_0xb853x2d[_0xa4d9[84]][_0xa4d9[83]]}})[_0xa4d9[44]](handleEntityNotFound(_0xb853x1b,null))[_0xa4d9[44]](function(_0xb853x1d){if(_0xb853x1d){return _0xb853x1d[_0xa4d9[103]](_0xb853x2d[_0xa4d9[87]][_0xa4d9[100]],_[_0xa4d9[107]](_0xb853x2d[_0xa4d9[87]],[_0xa4d9[100],_0xa4d9[83]])|| {})[_0xa4d9[106]](function(_0xb853x35){for(var _0xb853x36=0;_0xb853x36< _0xb853x2d[_0xa4d9[87]][_0xa4d9[100]][_0xa4d9[63]];_0xb853x36+= 1){socket[_0xa4d9[105]](_0xa4d9[104],{UserId:_0xb853x2d[_0xa4d9[87]][_0xa4d9[100]][_0xb853x36],TeamId:_0xb853x2d[_0xa4d9[84]][_0xa4d9[83]]})};return _0xb853x35})}})[_0xa4d9[44]](respondWithResult(_0xb853x1b,null))[_0xa4d9[77]](handleError(_0xb853x1b,null))};exports[_0xa4d9[108]]= function(_0xb853x2d,_0xb853x1b,_0xb853x34){var _0xb853x35;return db[_0xa4d9[54]][_0xa4d9[85]]({where:{id:_0xb853x2d[_0xa4d9[84]][_0xa4d9[83]]}})[_0xa4d9[44]](handleEntityNotFound(_0xb853x1b,null))[_0xa4d9[44]](function(_0xb853x1d){if(_0xb853x1d){return _0xb853x1d[_0xa4d9[108]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[100]])[_0xa4d9[44]](function(_0xb853x35){if(_[_0xa4d9[109]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[100]])){for(var _0xb853x36=0;_0xb853x36< _0xb853x2d[_0xa4d9[57]][_0xa4d9[100]][_0xa4d9[63]];_0xb853x36+= 1){socket[_0xa4d9[105]](_0xa4d9[110],{UserId:_0xb853x2d[_0xa4d9[57]][_0xa4d9[100]][_0xb853x36],TeamId:_0xb853x2d[_0xa4d9[84]][_0xa4d9[83]]})}}else {socket[_0xa4d9[105]](_0xa4d9[110],{UserId:_0xb853x2d[_0xa4d9[57]][_0xa4d9[100]],TeamId:_0xb853x2d[_0xa4d9[84]][_0xa4d9[83]]})}})}})[_0xa4d9[44]](respondWithStatusCode(_0xb853x1b,null))[_0xa4d9[77]](handleError(_0xb853x1b,null))};exports[_0xa4d9[111]]= function(_0xb853x2d,_0xb853x1d,_0xb853x34){var _0xb853x20={};var _0xb853x2e={};var _0xb853x37;var _0xb853x21;return db[_0xa4d9[54]][_0xa4d9[98]]({where:{id:_0xb853x2d[_0xa4d9[84]][_0xa4d9[83]]}})[_0xa4d9[44]](handleEntityNotFound(_0xb853x1d,null))[_0xa4d9[44]](function(_0xb853x1d){if(_0xb853x1d){_0xb853x37= _0xb853x1d;_0xb853x2e[_0xa4d9[52]]= _[_0xa4d9[55]](db[_0xa4d9[112]][_0xa4d9[53]]);_0xb853x2e[_0xa4d9[57]]= _[_0xa4d9[55]](_0xb853x2d[_0xa4d9[57]]);_0xb853x2e[_0xa4d9[59]]= _[_0xa4d9[60]](_0xb853x2e[_0xa4d9[52]],_0xb853x2e[_0xa4d9[57]]);_0xb853x20[_0xa4d9[61]]= _[_0xa4d9[60]](_0xb853x2e[_0xa4d9[52]],qs[_0xa4d9[62]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[62]]));_0xb853x20[_0xa4d9[61]]= (_0xb853x20[_0xa4d9[61]][_0xa4d9[63]])?_0xb853x20[_0xa4d9[61]]:_0xb853x2e[_0xa4d9[52]];_0xb853x20[_0xa4d9[66]]= qs[_0xa4d9[67]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[67]]);_0xb853x20[_0xa4d9[68]]= qs[_0xa4d9[59]](_[_0xa4d9[69]](_0xb853x2d[_0xa4d9[57]],_0xb853x2e[_0xa4d9[59]]));if(_0xb853x2d[_0xa4d9[57]][_0xa4d9[73]]){_0xb853x20[_0xa4d9[68]]= _[_0xa4d9[72]](_0xb853x20[_0xa4d9[68]],{$or:_[_0xa4d9[75]](_0xb853x20[_0xa4d9[61]],function(_0xb853x31){var _0xb853x2f={};_0xb853x2f[_0xb853x31]= {$like:_0xa4d9[74]+ _0xb853x2d[_0xa4d9[57]][_0xa4d9[73]]+ _0xa4d9[74]};return _0xb853x2f})})};_0xb853x20= _[_0xa4d9[72]]({},_0xb853x20,_0xb853x2d[_0xa4d9[76]]);return _0xb853x37[_0xa4d9[111]](_0xb853x20)}})[_0xa4d9[44]](function(_0xb853x35){if(_0xb853x35){_0xb853x21= _0xb853x35[_0xa4d9[63]];if(!_0xb853x2d[_0xa4d9[57]][_0xa4d9[65]](_0xa4d9[64])){_0xb853x20[_0xa4d9[36]]= qs[_0xa4d9[36]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[36]]);_0xb853x20[_0xa4d9[35]]= qs[_0xa4d9[35]](_0xb853x2d[_0xa4d9[57]][_0xa4d9[35]])};return _0xb853x37[_0xa4d9[111]](_0xb853x20)}})[_0xa4d9[44]](function(_0xb853x33){if(_0xb853x33){return _0xb853x33?{count:_0xb853x21,rows:_0xb853x33}:null}})[_0xa4d9[44]](respondWithResult(_0xb853x1d,null))[_0xa4d9[77]](handleError(_0xb853x1d,null))}
\ No newline at end of file
+var _0xdace=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x74\x65\x61\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x54\x65\x61\x6D","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x51\x75\x65\x75\x65\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x69\x73\x56\x61\x6C\x69\x64\x43\x68\x61\x6E\x6E\x65\x6C","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x63\x68\x61\x6E\x6E\x65\x6C","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65","\x51\x75\x65\x75\x65","\x67\x65\x74","\x51\x75\x65\x75\x65\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x64\x64\x51\x75\x65\x75\x65\x73","\x69\x64\x73","\x72\x65\x6D\x6F\x76\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x73\x65\x72\x54\x65\x61\x6D\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x6F\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x69\x73\x41\x72\x72\x61\x79","\x75\x73\x65\x72\x54\x65\x61\x6D\x3A\x72\x65\x6D\x6F\x76\x65","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x55\x73\x65\x72"];_0xdace[0];var jsonpatch=require(_0xdace[1]);var rp=require(_0xdace[2]);var moment=require(_0xdace[3]);var BPromise=require(_0xdace[4]);var Mustache=require(_0xdace[5]);var util=require(_0xdace[6]);var path=require(_0xdace[7]);var sox=require(_0xdace[8]);var csv=require(_0xdace[9]);var ejs=require(_0xdace[10]);var fs=require(_0xdace[11]);var _=require(_0xdace[12]);var squel=require(_0xdace[13]);var crypto=require(_0xdace[14]);var jsforce=require(_0xdace[15]);var deskjs=require(_0xdace[16]);var toCsv=require(_0xdace[9]);var querystring=require(_0xdace[17]);var Papa=require(_0xdace[18]);var qs=require(_0xdace[19]);var logger=require(_0xdace[21])(_0xdace[20]);var utils=require(_0xdace[22]);var config=require(_0xdace[23]);var db=require(_0xdace[25])[_0xdace[24]];var socket=require(_0xdace[27])({host:_0xdace[26],port:6379});require(_0xdace[29])[_0xdace[28]](socket);function respondWithStatusCode(_0x3f06x1b,_0x3f06x1c){_0x3f06x1c= _0x3f06x1c|| 204;return function(_0x3f06x1d){if(_0x3f06x1d){return _0x3f06x1b[_0xdace[30]](_0x3f06x1c)};return _0x3f06x1b[_0xdace[32]](_0x3f06x1c)[_0xdace[31]]()}}function respondWithResult(_0x3f06x1b,_0x3f06x1c){_0x3f06x1c= _0x3f06x1c|| 200;return function(_0x3f06x1d){if(_0x3f06x1d){return _0x3f06x1b[_0xdace[32]](_0x3f06x1c)[_0xdace[33]](_0x3f06x1d)}}}function respondWithFilteredResult(_0x3f06x1b,_0x3f06x20){return function(_0x3f06x1d){if(_0x3f06x1d){var _0x3f06x21=_0x3f06x1d[_0xdace[34]],_0x3f06x22=_0x3f06x20[_0xdace[35]],_0x3f06x23=_0x3f06x20[_0xdace[35]]+ _0x3f06x20[_0xdace[36]],_0x3f06x1c;if(_0x3f06x23>= _0x3f06x21){_0x3f06x23= _0x3f06x21;_0x3f06x1c= 200}else {_0x3f06x1c= 206};_0x3f06x1b[_0xdace[32]](_0x3f06x1c);return _0x3f06x1b[_0xdace[40]](_0xdace[37],_0x3f06x22+ _0xdace[38]+ _0x3f06x23+ _0xdace[39]+ _0x3f06x21)[_0xdace[33]](_0x3f06x1d)};return null}}function patchUpdates(_0x3f06x25){return function(_0x3f06x1d){try{jsonpatch[_0xdace[41]](_0x3f06x1d,_0x3f06x25,true)}catch(err){return BPromise[_0xdace[42]](err)};return _0x3f06x1d[_0xdace[43]]()}}function saveUpdates(_0x3f06x27,_0x3f06x1c){return function(_0x3f06x1d){if(_0x3f06x1d){return _0x3f06x1d[_0xdace[45]](_0x3f06x27)[_0xdace[44]](function(_0x3f06x28){return _0x3f06x28})};return null}}function removeEntity(_0x3f06x1b,_0x3f06x1c){return function(_0x3f06x1d){if(_0x3f06x1d){return _0x3f06x1d[_0xdace[46]]()[_0xdace[44]](function(){_0x3f06x1b[_0xdace[32]](204)[_0xdace[31]]()})}}}function handleEntityNotFound(_0x3f06x1b,_0x3f06x1c){return function(_0x3f06x1d){if(!_0x3f06x1d){_0x3f06x1b[_0xdace[30]](404)};return _0x3f06x1d}}function handleError(_0x3f06x1b,_0x3f06x1c){_0x3f06x1c= _0x3f06x1c|| 500;return function(_0x3f06x2c){logger[_0xdace[48]](_0x3f06x2c[_0xdace[47]]);if(_0x3f06x2c[_0xdace[49]]){delete _0x3f06x2c[_0xdace[49]]};_0x3f06x1b[_0xdace[32]](_0x3f06x1c)[_0xdace[50]](_0x3f06x2c)}}exports[_0xdace[51]]= function(_0x3f06x2d,_0x3f06x1b){var _0x3f06x20={},_0x3f06x2e={},_0x3f06x2f={count:0,rows:[]};_0x3f06x2e[_0xdace[52]]= _[_0xdace[55]](db[_0xdace[54]][_0xdace[53]]);var _0x3f06x30={dateStart:_0x3f06x2d[_0xdace[57]][_0xdace[56]],dateEnd:_0x3f06x2d[_0xdace[57]][_0xdace[58]]};delete _0x3f06x2d[_0xdace[57]][_0xdace[56]];delete _0x3f06x2d[_0xdace[57]][_0xdace[58]];_0x3f06x2e[_0xdace[57]]= _[_0xdace[55]](_0x3f06x2d[_0xdace[57]]);_0x3f06x2e[_0xdace[59]]= _[_0xdace[60]](_0x3f06x2e[_0xdace[52]],_0x3f06x2e[_0xdace[57]]);_0x3f06x20[_0xdace[61]]= _[_0xdace[60]](_0x3f06x2e[_0xdace[52]],qs[_0xdace[62]](_0x3f06x2d[_0xdace[57]][_0xdace[62]]));_0x3f06x20[_0xdace[61]]= (_0x3f06x20[_0xdace[61]][_0xdace[63]])?_0x3f06x20[_0xdace[61]]:_0x3f06x2e[_0xdace[52]];if(!_0x3f06x2d[_0xdace[57]][_0xdace[65]](_0xdace[64])){_0x3f06x20[_0xdace[36]]= qs[_0xdace[36]](_0x3f06x2d[_0xdace[57]][_0xdace[36]]);_0x3f06x20[_0xdace[35]]= qs[_0xdace[35]](_0x3f06x2d[_0xdace[57]][_0xdace[35]])};_0x3f06x20[_0xdace[66]]= qs[_0xdace[67]](_0x3f06x2d[_0xdace[57]][_0xdace[67]]);_0x3f06x20[_0xdace[68]]= qs[_0xdace[59]](_[_0xdace[69]](_0x3f06x2d[_0xdace[57]],_0x3f06x2e[_0xdace[59]]));if(_0x3f06x30[_0xdace[56]]){if(_0x3f06x30[_0xdace[58]]){_0x3f06x30[_0xdace[58]]= moment(_0x3f06x30[_0xdace[58]])[_0xdace[71]](1,_0xdace[70])}else {_0x3f06x30[_0xdace[58]]= moment(_0x3f06x30[_0xdace[56]])[_0xdace[71]](1,_0xdace[70])};_[_0xdace[72]](_0x3f06x20[_0xdace[68]],{createdAt:{$gte:_0x3f06x30[_0xdace[56]],$lte:_0x3f06x30[_0xdace[58]]}})};if(_0x3f06x2d[_0xdace[57]][_0xdace[73]]){_0x3f06x20[_0xdace[68]]= _[_0xdace[72]](_0x3f06x20[_0xdace[68]],{$or:_[_0xdace[75]](_0x3f06x20[_0xdace[61]],function(_0x3f06x31){var _0x3f06x2f={};_0x3f06x2f[_0x3f06x31]= {$like:_0xdace[74]+ _0x3f06x2d[_0xdace[57]][_0xdace[73]]+ _0xdace[74]};return _0x3f06x2f})})};_0x3f06x20= _[_0xdace[72]]({},_0x3f06x20,_0x3f06x2d[_0xdace[76]]);var _0x3f06x32={where:_0x3f06x20[_0xdace[68]]};return db[_0xdace[54]][_0xdace[34]](_0x3f06x32)[_0xdace[44]](function(_0x3f06x21){_0x3f06x2f[_0xdace[34]]= _0x3f06x21;if(_0x3f06x2d[_0xdace[57]][_0xdace[79]]){_0x3f06x20[_0xdace[80]]= [{all:true}]};return db[_0xdace[54]][_0xdace[81]](_0x3f06x20)})[_0xdace[44]](function(_0x3f06x33){_0x3f06x2f[_0xdace[78]]= _0x3f06x33;return _0x3f06x2f})[_0xdace[44]](respondWithFilteredResult(_0x3f06x1b,_0x3f06x20))[_0xdace[77]](handleError(_0x3f06x1b,null))};exports[_0xdace[82]]= function(_0x3f06x2d,_0x3f06x1b){var _0x3f06x20={raw:false,where:{id:_0x3f06x2d[_0xdace[84]][_0xdace[83]]}},_0x3f06x2e={};_0x3f06x2e[_0xdace[52]]= _[_0xdace[55]](db[_0xdace[54]][_0xdace[53]]);_0x3f06x2e[_0xdace[57]]= _[_0xdace[55]](_0x3f06x2d[_0xdace[57]]);_0x3f06x2e[_0xdace[59]]= _[_0xdace[60]](_0x3f06x2e[_0xdace[52]],_0x3f06x2e[_0xdace[57]]);_0x3f06x20[_0xdace[61]]= _[_0xdace[60]](_0x3f06x2e[_0xdace[52]],qs[_0xdace[62]](_0x3f06x2d[_0xdace[57]][_0xdace[62]]));_0x3f06x20[_0xdace[61]]= (_0x3f06x20[_0xdace[61]][_0xdace[63]])?_0x3f06x20[_0xdace[61]]:_0x3f06x2e[_0xdace[52]];if(_0x3f06x2d[_0xdace[57]][_0xdace[79]]){_0x3f06x20[_0xdace[80]]= [{all:true}]};_0x3f06x20= _[_0xdace[72]]({},_0x3f06x20,_0x3f06x2d[_0xdace[76]]);return db[_0xdace[54]][_0xdace[85]](_0x3f06x20)[_0xdace[44]](handleEntityNotFound(_0x3f06x1b,null))[_0xdace[44]](respondWithResult(_0x3f06x1b,null))[_0xdace[77]](handleError(_0x3f06x1b,null))};exports[_0xdace[86]]= function(_0x3f06x2d,_0x3f06x1b){return db[_0xdace[54]][_0xdace[86]](_0x3f06x2d[_0xdace[87]],{})[_0xdace[44]](respondWithResult(_0x3f06x1b,201))[_0xdace[77]](handleError(_0x3f06x1b,null))};exports[_0xdace[45]]= function(_0x3f06x2d,_0x3f06x1b){if(_0x3f06x2d[_0xdace[87]][_0xdace[83]]){delete _0x3f06x2d[_0xdace[87]][_0xdace[83]]};return db[_0xdace[54]][_0xdace[85]]({where:{id:_0x3f06x2d[_0xdace[84]][_0xdace[83]]}})[_0xdace[44]](handleEntityNotFound(_0x3f06x1b,null))[_0xdace[44]](saveUpdates(_0x3f06x2d[_0xdace[87]],null))[_0xdace[44]](respondWithResult(_0x3f06x1b,null))[_0xdace[77]](handleError(_0x3f06x1b,null))};exports[_0xdace[46]]= function(_0x3f06x2d,_0x3f06x1b){return db[_0xdace[54]][_0xdace[85]]({where:{id:_0x3f06x2d[_0xdace[84]][_0xdace[83]]}})[_0xdace[44]](handleEntityNotFound(_0x3f06x1b,null))[_0xdace[44]](removeEntity(_0x3f06x1b,null))[_0xdace[77]](handleError(_0x3f06x1b,null))};exports[_0xdace[88]]= function(_0x3f06x2d,_0x3f06x1b,_0x3f06x34){return db[_0xdace[54]][_0xdace[98]]({where:{id:_0x3f06x2d[_0xdace[84]][_0xdace[83]]}})[_0xdace[44]](handleEntityNotFound(_0x3f06x1b,null))[_0xdace[44]](function(_0x3f06x1d){if(!_0x3f06x2d[_0xdace[57]][_0xdace[89]]||  !utils[_0xdace[90]](_0x3f06x2d[_0xdace[57]][_0xdace[89]])){throw  new db[_0xdace[92]].ValidationError(_0xdace[91])};var _0x3f06x20={};var _0x3f06x2e={};_0x3f06x2e[_0xdace[52]]= _[_0xdace[55]](db[_[_0xdace[94]](_0x3f06x2d[_0xdace[57]][_0xdace[89]][_0xdace[93]]())+ _0xdace[95]][_0xdace[53]]);_0x3f06x2e[_0xdace[57]]= _[_0xdace[55]](_0x3f06x2d[_0xdace[57]]);_0x3f06x2e[_0xdace[59]]= _[_0xdace[60]](_0x3f06x2e[_0xdace[52]],_0x3f06x2e[_0xdace[57]]);_0x3f06x20[_0xdace[61]]= _[_0xdace[60]](_0x3f06x2e[_0xdace[52]],qs[_0xdace[62]](_0x3f06x2d[_0xdace[57]][_0xdace[62]]));_0x3f06x20[_0xdace[61]]= (_0x3f06x20[_0xdace[61]][_0xdace[63]])?_0x3f06x20[_0xdace[61]]:_0x3f06x2e[_0xdace[52]];_0x3f06x20[_0xdace[36]]= qs[_0xdace[36]](_0x3f06x2d[_0xdace[57]][_0xdace[36]]);_0x3f06x20[_0xdace[35]]= qs[_0xdace[35]](_0x3f06x2d[_0xdace[57]][_0xdace[35]]);_0x3f06x20[_0xdace[66]]= qs[_0xdace[67]](_0x3f06x2d[_0xdace[57]][_0xdace[67]]);_0x3f06x20[_0xdace[68]]= qs[_0xdace[59]](_[_0xdace[69]](_0x3f06x2d[_0xdace[57]],_0x3f06x2e[_0xdace[59]]));_0x3f06x20= _[_0xdace[72]]({},_0x3f06x20,_0x3f06x2d[_0xdace[76]]);return _0x3f06x1d[_0xdace[96]+ _[_0xdace[94]](_0x3f06x2d[_0xdace[57]][_0xdace[89]][_0xdace[93]]())+ _0xdace[97]](_0x3f06x20)})[_0xdace[44]](respondWithResult(_0x3f06x1b,null))[_0xdace[77]](handleError(_0x3f06x1b,null))};exports[_0xdace[99]]= function(_0x3f06x2d,_0x3f06x1b,_0x3f06x34){return db[_0xdace[54]][_0xdace[98]]({where:{id:_0x3f06x2d[_0xdace[84]][_0xdace[83]]}})[_0xdace[44]](function(_0x3f06x1d){if(_0x3f06x1d){if(!_0x3f06x2d[_0xdace[87]][_0xdace[89]]||  !utils[_0xdace[90]](_0x3f06x2d[_0xdace[87]][_0xdace[89]])){throw  new db[_0xdace[92]].ValidationError(_0xdace[91])};return _0x3f06x1d[_0xdace[71]+ _[_0xdace[94]](_0x3f06x2d[_0xdace[87]][_0xdace[89]][_0xdace[93]]())+ _0xdace[97]](_0x3f06x2d[_0xdace[87]][_0xdace[100]])};return null})[_0xdace[44]](handleEntityNotFound(_0x3f06x1b,null))[_0xdace[44]](respondWithStatusCode(_0x3f06x1b,null))[_0xdace[77]](handleError(_0x3f06x1b,null))};exports[_0xdace[101]]= function(_0x3f06x2d,_0x3f06x1b,_0x3f06x34){return db[_0xdace[54]][_0xdace[98]]({where:{id:_0x3f06x2d[_0xdace[84]][_0xdace[83]]}})[_0xdace[44]](function(_0x3f06x1d){if(_0x3f06x1d){if(!_0x3f06x2d[_0xdace[57]][_0xdace[89]]||  !utils[_0xdace[90]](_0x3f06x2d[_0xdace[57]][_0xdace[89]])){throw  new db[_0xdace[92]].ValidationError(_0xdace[91])};return _0x3f06x1d[_0xdace[102]+ _[_0xdace[94]](_0x3f06x2d[_0xdace[57]][_0xdace[89]][_0xdace[93]]())+ _0xdace[97]](_0x3f06x2d[_0xdace[57]][_0xdace[100]])};return null})[_0xdace[44]](handleEntityNotFound(_0x3f06x1b,null))[_0xdace[44]](respondWithStatusCode(_0x3f06x1b,null))[_0xdace[77]](handleError(_0x3f06x1b,null))};exports[_0xdace[103]]= function(_0x3f06x2d,_0x3f06x1b,_0x3f06x34){return db[_0xdace[54]][_0xdace[85]]({where:{id:_0x3f06x2d[_0xdace[84]][_0xdace[83]]}})[_0xdace[44]](handleEntityNotFound(_0x3f06x1b,null))[_0xdace[44]](function(_0x3f06x1d){if(_0x3f06x1d){return _0x3f06x1d[_0xdace[103]](_0x3f06x2d[_0xdace[87]][_0xdace[100]],_[_0xdace[107]](_0x3f06x2d[_0xdace[87]],[_0xdace[100],_0xdace[83]])|| {})[_0xdace[106]](function(_0x3f06x35){for(var _0x3f06x36=0;_0x3f06x36< _0x3f06x2d[_0xdace[87]][_0xdace[100]][_0xdace[63]];_0x3f06x36+= 1){socket[_0xdace[105]](_0xdace[104],{UserId:_0x3f06x2d[_0xdace[87]][_0xdace[100]][_0x3f06x36],TeamId:_0x3f06x2d[_0xdace[84]][_0xdace[83]]})};return _0x3f06x35})}})[_0xdace[44]](respondWithResult(_0x3f06x1b,null))[_0xdace[77]](handleError(_0x3f06x1b,null))};exports[_0xdace[108]]= function(_0x3f06x2d,_0x3f06x1b,_0x3f06x34){var _0x3f06x35;return db[_0xdace[54]][_0xdace[85]]({where:{id:_0x3f06x2d[_0xdace[84]][_0xdace[83]]}})[_0xdace[44]](handleEntityNotFound(_0x3f06x1b,null))[_0xdace[44]](function(_0x3f06x1d){if(_0x3f06x1d){return _0x3f06x1d[_0xdace[108]](_0x3f06x2d[_0xdace[57]][_0xdace[100]])[_0xdace[44]](function(_0x3f06x35){if(_[_0xdace[109]](_0x3f06x2d[_0xdace[57]][_0xdace[100]])){for(var _0x3f06x36=0;_0x3f06x36< _0x3f06x2d[_0xdace[57]][_0xdace[100]][_0xdace[63]];_0x3f06x36+= 1){socket[_0xdace[105]](_0xdace[110],{UserId:_0x3f06x2d[_0xdace[57]][_0xdace[100]][_0x3f06x36],TeamId:_0x3f06x2d[_0xdace[84]][_0xdace[83]]})}}else {socket[_0xdace[105]](_0xdace[110],{UserId:_0x3f06x2d[_0xdace[57]][_0xdace[100]],TeamId:_0x3f06x2d[_0xdace[84]][_0xdace[83]]})}})}})[_0xdace[44]](respondWithStatusCode(_0x3f06x1b,null))[_0xdace[77]](handleError(_0x3f06x1b,null))};exports[_0xdace[111]]= function(_0x3f06x2d,_0x3f06x1d,_0x3f06x34){var _0x3f06x20={};var _0x3f06x2e={};var _0x3f06x37;var _0x3f06x21;return db[_0xdace[54]][_0xdace[98]]({where:{id:_0x3f06x2d[_0xdace[84]][_0xdace[83]]}})[_0xdace[44]](handleEntityNotFound(_0x3f06x1d,null))[_0xdace[44]](function(_0x3f06x1d){if(_0x3f06x1d){_0x3f06x37= _0x3f06x1d;_0x3f06x2e[_0xdace[52]]= _[_0xdace[55]](db[_0xdace[112]][_0xdace[53]]);_0x3f06x2e[_0xdace[57]]= _[_0xdace[55]](_0x3f06x2d[_0xdace[57]]);_0x3f06x2e[_0xdace[59]]= _[_0xdace[60]](_0x3f06x2e[_0xdace[52]],_0x3f06x2e[_0xdace[57]]);_0x3f06x20[_0xdace[61]]= _[_0xdace[60]](_0x3f06x2e[_0xdace[52]],qs[_0xdace[62]](_0x3f06x2d[_0xdace[57]][_0xdace[62]]));_0x3f06x20[_0xdace[61]]= (_0x3f06x20[_0xdace[61]][_0xdace[63]])?_0x3f06x20[_0xdace[61]]:_0x3f06x2e[_0xdace[52]];_0x3f06x20[_0xdace[66]]= qs[_0xdace[67]](_0x3f06x2d[_0xdace[57]][_0xdace[67]]);_0x3f06x20[_0xdace[68]]= qs[_0xdace[59]](_[_0xdace[69]](_0x3f06x2d[_0xdace[57]],_0x3f06x2e[_0xdace[59]]));if(_0x3f06x2d[_0xdace[57]][_0xdace[73]]){_0x3f06x20[_0xdace[68]]= _[_0xdace[72]](_0x3f06x20[_0xdace[68]],{$or:_[_0xdace[75]](_0x3f06x20[_0xdace[61]],function(_0x3f06x31){var _0x3f06x2f={};_0x3f06x2f[_0x3f06x31]= {$like:_0xdace[74]+ _0x3f06x2d[_0xdace[57]][_0xdace[73]]+ _0xdace[74]};return _0x3f06x2f})})};_0x3f06x20= _[_0xdace[72]]({},_0x3f06x20,_0x3f06x2d[_0xdace[76]]);return _0x3f06x37[_0xdace[111]](_0x3f06x20)}})[_0xdace[44]](function(_0x3f06x35){if(_0x3f06x35){_0x3f06x21= _0x3f06x35[_0xdace[63]];if(!_0x3f06x2d[_0xdace[57]][_0xdace[65]](_0xdace[64])){_0x3f06x20[_0xdace[36]]= qs[_0xdace[36]](_0x3f06x2d[_0xdace[57]][_0xdace[36]]);_0x3f06x20[_0xdace[35]]= qs[_0xdace[35]](_0x3f06x2d[_0xdace[57]][_0xdace[35]])};return _0x3f06x37[_0xdace[111]](_0x3f06x20)}})[_0xdace[44]](function(_0x3f06x33){if(_0x3f06x33){return _0x3f06x33?{count:_0x3f06x21,rows:_0x3f06x33}:null}})[_0xdace[44]](respondWithResult(_0x3f06x1d,null))[_0xdace[77]](handleError(_0x3f06x1d,null))}
\ No newline at end of file
index 6039de7..f046987 100644 (file)
@@ -1 +1 @@
-var _0xd56f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x54\x65\x61\x6D","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xd56f[0];var EventEmitter=require(_0xd56f[1]);var Team=require(_0xd56f[4])[_0xd56f[3]][_0xd56f[2]];var TeamEvents= new EventEmitter();TeamEvents[_0xd56f[5]](0);var events={afterCreate:_0xd56f[6],afterUpdate:_0xd56f[7],afterDestroy:_0xd56f[8]};function emitEvent(event){return function(_0xa5d8x7,_0xa5d8x8,_0xa5d8x9){TeamEvents[_0xd56f[11]](event+ _0xd56f[9]+ _0xa5d8x7[_0xd56f[10]],_0xa5d8x7);TeamEvents[_0xd56f[11]](event,_0xa5d8x7);_0xa5d8x9(null)}}for(var e in events){if(events[_0xd56f[12]](e)){var event=events[e];Team[_0xd56f[13]](e,emitEvent(event))}};module[_0xd56f[14]]= TeamEvents
\ No newline at end of file
+var _0xd759=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x54\x65\x61\x6D","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xd759[0];var EventEmitter=require(_0xd759[1]);var Team=require(_0xd759[4])[_0xd759[3]][_0xd759[2]];var TeamEvents= new EventEmitter();TeamEvents[_0xd759[5]](0);var events={afterCreate:_0xd759[6],afterUpdate:_0xd759[7],afterDestroy:_0xd759[8]};function emitEvent(event){return function(_0x7911x7,_0x7911x8,_0x7911x9){TeamEvents[_0xd759[11]](event+ _0xd759[9]+ _0x7911x7[_0xd759[10]],_0x7911x7);TeamEvents[_0xd759[11]](event,_0x7911x7);_0x7911x9(null)}}for(var e in events){if(events[_0xd759[12]](e)){var event=events[e];Team[_0xd759[13]](e,emitEvent(event))}};module[_0xd759[14]]= TeamEvents
\ No newline at end of file
index 704f2ec..ac42d64 100644 (file)
@@ -1 +1 @@
-var _0xa7b0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x74\x65\x61\x6D\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x54\x65\x61\x6D","\x74\x65\x61\x6D\x73","\x64\x65\x66\x69\x6E\x65"];_0xa7b0[0];var _=require(_0xa7b0[1]);var util=require(_0xa7b0[2]);var logger=require(_0xa7b0[4])(_0xa7b0[3]);var moment=require(_0xa7b0[5]);var BPromise=require(_0xa7b0[6]);var rp=require(_0xa7b0[7]);var attributes=require(_0xa7b0[8]);module[_0xa7b0[9]]= function(_0x6c3ax8,_0x6c3ax9){return _0x6c3ax8[_0xa7b0[12]](_0xa7b0[10],attributes,{tableName:_0xa7b0[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x328b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x74\x65\x61\x6D\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x54\x65\x61\x6D","\x74\x65\x61\x6D\x73","\x64\x65\x66\x69\x6E\x65"];_0x328b[0];var _=require(_0x328b[1]);var util=require(_0x328b[2]);var logger=require(_0x328b[4])(_0x328b[3]);var moment=require(_0x328b[5]);var BPromise=require(_0x328b[6]);var rp=require(_0x328b[7]);var attributes=require(_0x328b[8]);module[_0x328b[9]]= function(_0xdf97x8,_0xdf97x9){return _0xdf97x8[_0x328b[12]](_0x328b[10],attributes,{tableName:_0x328b[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index bedacb5..4275922 100644 (file)
@@ -1 +1 @@
-var _0x8e7f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x74\x65\x61\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x54\x65\x61\x6D\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x54\x65\x61\x6D\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x8e7f[0];var _=require(_0x8e7f[1]);var util=require(_0x8e7f[2]);var moment=require(_0x8e7f[3]);var BPromise=require(_0x8e7f[4]);var rs=require(_0x8e7f[5]);var fs=require(_0x8e7f[6]);var db=require(_0x8e7f[8])[_0x8e7f[7]];var utils=require(_0x8e7f[9]);var logger=require(_0x8e7f[11])(_0x8e7f[10]);var config=require(_0x8e7f[12]);var jayson=require(_0x8e7f[13]);var client=jayson[_0x8e7f[15]][_0x8e7f[14]]({port:9002});var socket=require(_0x8e7f[17])({host:_0x8e7f[16],port:6379});require(_0x8e7f[19])[_0x8e7f[18]](socket);function respondWithRpcPromise(_0x94c0xf,_0x94c0x10,_0x94c0x11){return  new BPromise(function(_0x94c0x12,_0x94c0x13){return client[_0x8e7f[32]](_0x94c0xf,_0x94c0x11)[_0x8e7f[31]](function(_0x94c0x15){logger[_0x8e7f[24]](_0x8e7f[20],_0x94c0x10,_0x8e7f[23]);logger[_0x8e7f[27]](_0x8e7f[25],_0x94c0x10,_0x8e7f[23],JSON[_0x8e7f[26]](_0x94c0x15));if(_0x94c0x15[_0x8e7f[21]]){if(_0x94c0x15[_0x8e7f[21]][_0x8e7f[28]]=== 500){logger[_0x8e7f[21]](_0x8e7f[20],_0x94c0x10,_0x94c0x15[_0x8e7f[21]][_0x8e7f[29]]);return _0x94c0x13(_0x94c0x15[_0x8e7f[21]][_0x8e7f[29]])};logger[_0x8e7f[21]](_0x8e7f[20],_0x94c0x10,_0x94c0x15[_0x8e7f[21]][_0x8e7f[29]]);return _0x94c0x12(_0x94c0x15[_0x8e7f[21]][_0x8e7f[29]])}else {logger[_0x8e7f[24]](_0x8e7f[20],_0x94c0x10,_0x8e7f[23]);_0x94c0x12(_0x94c0x15[_0x8e7f[30]][_0x8e7f[29]])}})[_0x8e7f[22]](function(_0x94c0x14){logger[_0x8e7f[21]](_0x8e7f[20],_0x94c0x10,_0x94c0x14);_0x94c0x13(_0x94c0x14)})})}
\ No newline at end of file
+var _0x3f33=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x74\x65\x61\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x54\x65\x61\x6D\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x54\x65\x61\x6D\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x3f33[0];var _=require(_0x3f33[1]);var util=require(_0x3f33[2]);var moment=require(_0x3f33[3]);var BPromise=require(_0x3f33[4]);var rs=require(_0x3f33[5]);var fs=require(_0x3f33[6]);var db=require(_0x3f33[8])[_0x3f33[7]];var utils=require(_0x3f33[9]);var logger=require(_0x3f33[11])(_0x3f33[10]);var config=require(_0x3f33[12]);var jayson=require(_0x3f33[13]);var client=jayson[_0x3f33[15]][_0x3f33[14]]({port:9002});var socket=require(_0x3f33[17])({host:_0x3f33[16],port:6379});require(_0x3f33[19])[_0x3f33[18]](socket);function respondWithRpcPromise(_0x1449xf,_0x1449x10,_0x1449x11){return  new BPromise(function(_0x1449x12,_0x1449x13){return client[_0x3f33[32]](_0x1449xf,_0x1449x11)[_0x3f33[31]](function(_0x1449x15){logger[_0x3f33[24]](_0x3f33[20],_0x1449x10,_0x3f33[23]);logger[_0x3f33[27]](_0x3f33[25],_0x1449x10,_0x3f33[23],JSON[_0x3f33[26]](_0x1449x15));if(_0x1449x15[_0x3f33[21]]){if(_0x1449x15[_0x3f33[21]][_0x3f33[28]]=== 500){logger[_0x3f33[21]](_0x3f33[20],_0x1449x10,_0x1449x15[_0x3f33[21]][_0x3f33[29]]);return _0x1449x13(_0x1449x15[_0x3f33[21]][_0x3f33[29]])};logger[_0x3f33[21]](_0x3f33[20],_0x1449x10,_0x1449x15[_0x3f33[21]][_0x3f33[29]]);return _0x1449x12(_0x1449x15[_0x3f33[21]][_0x3f33[29]])}else {logger[_0x3f33[24]](_0x3f33[20],_0x1449x10,_0x3f33[23]);_0x1449x12(_0x1449x15[_0x3f33[30]][_0x3f33[29]])}})[_0x3f33[22]](function(_0x1449x14){logger[_0x3f33[21]](_0x3f33[20],_0x1449x10,_0x1449x14);_0x1449x13(_0x1449x14)})})}
\ No newline at end of file
index 844e1bf..9bdf67a 100644 (file)
@@ -1 +1 @@
-var _0x9c63=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x74\x65\x61\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x74\x65\x61\x6D\x3A","\x6F\x6E"];_0x9c63[0];var TeamEvents=require(_0x9c63[1]);var events=[_0x9c63[2],_0x9c63[3],_0x9c63[4]];function createListener(_0xfebex4,_0xfebex5){return function(_0xfebex6){_0xfebex5[_0x9c63[5]](_0xfebex4,_0xfebex6)}}function removeListener(_0xfebex4,_0xfebex8){return function(){TeamEvents[_0x9c63[6]](_0xfebex4,_0xfebex8)}}exports[_0x9c63[7]]= function(_0xfebex5){for(var _0xfebex9=0,_0xfebexa=events[_0x9c63[8]];_0xfebex9< _0xfebexa;_0xfebex9++){var _0xfebex4=events[_0xfebex9];var _0xfebex8=createListener(_0x9c63[9]+ _0xfebex4,_0xfebex5);TeamEvents[_0x9c63[10]](_0xfebex4,_0xfebex8)}}
\ No newline at end of file
+var _0x710f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x74\x65\x61\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x74\x65\x61\x6D\x3A","\x6F\x6E"];_0x710f[0];var TeamEvents=require(_0x710f[1]);var events=[_0x710f[2],_0x710f[3],_0x710f[4]];function createListener(_0xda22x4,_0xda22x5){return function(_0xda22x6){_0xda22x5[_0x710f[5]](_0xda22x4,_0xda22x6)}}function removeListener(_0xda22x4,_0xda22x8){return function(){TeamEvents[_0x710f[6]](_0xda22x4,_0xda22x8)}}exports[_0x710f[7]]= function(_0xda22x5){for(var _0xda22x9=0,_0xda22xa=events[_0x710f[8]];_0xda22x9< _0xda22xa;_0xda22x9++){var _0xda22x4=events[_0xda22x9];var _0xda22x8=createListener(_0x710f[9]+ _0xda22x4,_0xda22x5);TeamEvents[_0x710f[10]](_0xda22x4,_0xda22x8)}}
\ No newline at end of file
index c205277..b654832 100644 (file)
@@ -1 +1 @@
-var _0x8ffa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x8ffa[0];var multer=require(_0x8ffa[1]);var util=require(_0x8ffa[2]);var path=require(_0x8ffa[3]);var express=require(_0x8ffa[4]);var router=express.Router();var auth=require(_0x8ffa[5]);var interaction=require(_0x8ffa[6]);var config=require(_0x8ffa[7]);var controller=require(_0x8ffa[8]);router[_0x8ffa[12]](_0x8ffa[9],auth[_0x8ffa[10]](),controller[_0x8ffa[11]]);router[_0x8ffa[12]](_0x8ffa[13],auth[_0x8ffa[10]](),controller[_0x8ffa[14]]);router[_0x8ffa[16]](_0x8ffa[9],auth[_0x8ffa[10]](),controller[_0x8ffa[15]]);router[_0x8ffa[18]](_0x8ffa[13],auth[_0x8ffa[10]](),controller[_0x8ffa[17]]);router[_0x8ffa[20]](_0x8ffa[13],auth[_0x8ffa[10]](),controller[_0x8ffa[19]]);module[_0x8ffa[21]]= router
\ No newline at end of file
+var _0x6a38=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6a38[0];var multer=require(_0x6a38[1]);var util=require(_0x6a38[2]);var path=require(_0x6a38[3]);var express=require(_0x6a38[4]);var router=express.Router();var auth=require(_0x6a38[5]);var interaction=require(_0x6a38[6]);var config=require(_0x6a38[7]);var controller=require(_0x6a38[8]);router[_0x6a38[12]](_0x6a38[9],auth[_0x6a38[10]](),controller[_0x6a38[11]]);router[_0x6a38[12]](_0x6a38[13],auth[_0x6a38[10]](),controller[_0x6a38[14]]);router[_0x6a38[16]](_0x6a38[9],auth[_0x6a38[10]](),controller[_0x6a38[15]]);router[_0x6a38[18]](_0x6a38[13],auth[_0x6a38[10]](),controller[_0x6a38[17]]);router[_0x6a38[20]](_0x6a38[13],auth[_0x6a38[10]](),controller[_0x6a38[19]]);module[_0x6a38[21]]= router
\ No newline at end of file
index 1f76ab3..8e83e2d 100644 (file)
@@ -1 +1 @@
-var _0x164f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54"];_0x164f[0];var Sequelize=require(_0x164f[1]);module[_0x164f[2]]= {name:{type:Sequelize[_0x164f[3]]},description:{type:Sequelize[_0x164f[3]]},html:{type:Sequelize[_0x164f[4]]}}
\ No newline at end of file
+var _0x83b6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x54\x45\x58\x54"];_0x83b6[0];var Sequelize=require(_0x83b6[1]);module[_0x83b6[2]]= {name:{type:Sequelize[_0x83b6[3]]},description:{type:Sequelize[_0x83b6[3]]},html:{type:Sequelize[_0x83b6[4]]}}
\ No newline at end of file
index e362a04..2f3560d 100644 (file)
@@ -1 +1 @@
-var _0x9d1a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x9d1a[0];var jsonpatch=require(_0x9d1a[1]);var rp=require(_0x9d1a[2]);var moment=require(_0x9d1a[3]);var BPromise=require(_0x9d1a[4]);var Mustache=require(_0x9d1a[5]);var util=require(_0x9d1a[6]);var path=require(_0x9d1a[7]);var sox=require(_0x9d1a[8]);var csv=require(_0x9d1a[9]);var ejs=require(_0x9d1a[10]);var fs=require(_0x9d1a[11]);var _=require(_0x9d1a[12]);var squel=require(_0x9d1a[13]);var crypto=require(_0x9d1a[14]);var jsforce=require(_0x9d1a[15]);var deskjs=require(_0x9d1a[16]);var toCsv=require(_0x9d1a[9]);var querystring=require(_0x9d1a[17]);var Papa=require(_0x9d1a[18]);var qs=require(_0x9d1a[19]);var logger=require(_0x9d1a[21])(_0x9d1a[20]);var utils=require(_0x9d1a[22]);var config=require(_0x9d1a[23]);var db=require(_0x9d1a[25])[_0x9d1a[24]];function respondWithStatusCode(_0x894bx1a,_0x894bx1b){_0x894bx1b= _0x894bx1b|| 204;return function(_0x894bx1c){if(_0x894bx1c){return _0x894bx1a[_0x9d1a[26]](_0x894bx1b)};return _0x894bx1a[_0x9d1a[28]](_0x894bx1b)[_0x9d1a[27]]()}}function respondWithResult(_0x894bx1a,_0x894bx1b){_0x894bx1b= _0x894bx1b|| 200;return function(_0x894bx1c){if(_0x894bx1c){return _0x894bx1a[_0x9d1a[28]](_0x894bx1b)[_0x9d1a[29]](_0x894bx1c)}}}function respondWithFilteredResult(_0x894bx1a,_0x894bx1f){return function(_0x894bx1c){if(_0x894bx1c){var _0x894bx20=_0x894bx1c[_0x9d1a[30]],_0x894bx21=_0x894bx1f[_0x9d1a[31]],_0x894bx22=_0x894bx1f[_0x9d1a[31]]+ _0x894bx1f[_0x9d1a[32]],_0x894bx1b;if(_0x894bx22>= _0x894bx20){_0x894bx22= _0x894bx20;_0x894bx1b= 200}else {_0x894bx1b= 206};_0x894bx1a[_0x9d1a[28]](_0x894bx1b);return _0x894bx1a[_0x9d1a[36]](_0x9d1a[33],_0x894bx21+ _0x9d1a[34]+ _0x894bx22+ _0x9d1a[35]+ _0x894bx20)[_0x9d1a[29]](_0x894bx1c)};return null}}function patchUpdates(_0x894bx24){return function(_0x894bx1c){try{jsonpatch[_0x9d1a[37]](_0x894bx1c,_0x894bx24,true)}catch(err){return BPromise[_0x9d1a[38]](err)};return _0x894bx1c[_0x9d1a[39]]()}}function saveUpdates(_0x894bx26,_0x894bx1b){return function(_0x894bx1c){if(_0x894bx1c){return _0x894bx1c[_0x9d1a[41]](_0x894bx26)[_0x9d1a[40]](function(_0x894bx27){return _0x894bx27})};return null}}function removeEntity(_0x894bx1a,_0x894bx1b){return function(_0x894bx1c){if(_0x894bx1c){return _0x894bx1c[_0x9d1a[42]]()[_0x9d1a[40]](function(){_0x894bx1a[_0x9d1a[28]](204)[_0x9d1a[27]]()})}}}function handleEntityNotFound(_0x894bx1a,_0x894bx1b){return function(_0x894bx1c){if(!_0x894bx1c){_0x894bx1a[_0x9d1a[26]](404)};return _0x894bx1c}}function handleError(_0x894bx1a,_0x894bx1b){_0x894bx1b= _0x894bx1b|| 500;return function(_0x894bx2b){logger[_0x9d1a[44]](_0x894bx2b[_0x9d1a[43]]);if(_0x894bx2b[_0x9d1a[45]]){delete _0x894bx2b[_0x9d1a[45]]};_0x894bx1a[_0x9d1a[28]](_0x894bx1b)[_0x9d1a[46]](_0x894bx2b)}}exports[_0x9d1a[47]]= function(_0x894bx2c,_0x894bx1a){var _0x894bx1f={},_0x894bx2d={},_0x894bx2e={count:0,rows:[]};_0x894bx2d[_0x9d1a[48]]= _[_0x9d1a[51]](db[_0x9d1a[50]][_0x9d1a[49]]);var _0x894bx2f={dateStart:_0x894bx2c[_0x9d1a[53]][_0x9d1a[52]],dateEnd:_0x894bx2c[_0x9d1a[53]][_0x9d1a[54]]};delete _0x894bx2c[_0x9d1a[53]][_0x9d1a[52]];delete _0x894bx2c[_0x9d1a[53]][_0x9d1a[54]];_0x894bx2d[_0x9d1a[53]]= _[_0x9d1a[51]](_0x894bx2c[_0x9d1a[53]]);_0x894bx2d[_0x9d1a[55]]= _[_0x9d1a[56]](_0x894bx2d[_0x9d1a[48]],_0x894bx2d[_0x9d1a[53]]);_0x894bx1f[_0x9d1a[57]]= _[_0x9d1a[56]](_0x894bx2d[_0x9d1a[48]],qs[_0x9d1a[58]](_0x894bx2c[_0x9d1a[53]][_0x9d1a[58]]));_0x894bx1f[_0x9d1a[57]]= (_0x894bx1f[_0x9d1a[57]][_0x9d1a[59]])?_0x894bx1f[_0x9d1a[57]]:_0x894bx2d[_0x9d1a[48]];if(!_0x894bx2c[_0x9d1a[53]][_0x9d1a[61]](_0x9d1a[60])){_0x894bx1f[_0x9d1a[32]]= qs[_0x9d1a[32]](_0x894bx2c[_0x9d1a[53]][_0x9d1a[32]]);_0x894bx1f[_0x9d1a[31]]= qs[_0x9d1a[31]](_0x894bx2c[_0x9d1a[53]][_0x9d1a[31]])};_0x894bx1f[_0x9d1a[62]]= qs[_0x9d1a[63]](_0x894bx2c[_0x9d1a[53]][_0x9d1a[63]]);_0x894bx1f[_0x9d1a[64]]= qs[_0x9d1a[55]](_[_0x9d1a[65]](_0x894bx2c[_0x9d1a[53]],_0x894bx2d[_0x9d1a[55]]));if(_0x894bx2f[_0x9d1a[52]]){if(_0x894bx2f[_0x9d1a[54]]){_0x894bx2f[_0x9d1a[54]]= moment(_0x894bx2f[_0x9d1a[54]])[_0x9d1a[67]](1,_0x9d1a[66])}else {_0x894bx2f[_0x9d1a[54]]= moment(_0x894bx2f[_0x9d1a[52]])[_0x9d1a[67]](1,_0x9d1a[66])};_[_0x9d1a[68]](_0x894bx1f[_0x9d1a[64]],{createdAt:{$gte:_0x894bx2f[_0x9d1a[52]],$lte:_0x894bx2f[_0x9d1a[54]]}})};if(_0x894bx2c[_0x9d1a[53]][_0x9d1a[69]]){_0x894bx1f[_0x9d1a[64]]= _[_0x9d1a[68]](_0x894bx1f[_0x9d1a[64]],{$or:_[_0x9d1a[71]](_0x894bx1f[_0x9d1a[57]],function(_0x894bx30){var _0x894bx2e={};_0x894bx2e[_0x894bx30]= {$like:_0x9d1a[70]+ _0x894bx2c[_0x9d1a[53]][_0x9d1a[69]]+ _0x9d1a[70]};return _0x894bx2e})})};_0x894bx1f= _[_0x9d1a[68]]({},_0x894bx1f,_0x894bx2c[_0x9d1a[72]]);var _0x894bx31={where:_0x894bx1f[_0x9d1a[64]]};return db[_0x9d1a[50]][_0x9d1a[30]](_0x894bx31)[_0x9d1a[40]](function(_0x894bx20){_0x894bx2e[_0x9d1a[30]]= _0x894bx20;if(_0x894bx2c[_0x9d1a[53]][_0x9d1a[75]]){_0x894bx1f[_0x9d1a[76]]= [{all:true}]};return db[_0x9d1a[50]][_0x9d1a[77]](_0x894bx1f)})[_0x9d1a[40]](function(_0x894bx32){_0x894bx2e[_0x9d1a[74]]= _0x894bx32;return _0x894bx2e})[_0x9d1a[40]](respondWithFilteredResult(_0x894bx1a,_0x894bx1f))[_0x9d1a[73]](handleError(_0x894bx1a,null))};exports[_0x9d1a[78]]= function(_0x894bx2c,_0x894bx1a){var _0x894bx1f={raw:true,where:{id:_0x894bx2c[_0x9d1a[80]][_0x9d1a[79]]}},_0x894bx2d={};_0x894bx2d[_0x9d1a[48]]= _[_0x9d1a[51]](db[_0x9d1a[50]][_0x9d1a[49]]);_0x894bx2d[_0x9d1a[53]]= _[_0x9d1a[51]](_0x894bx2c[_0x9d1a[53]]);_0x894bx2d[_0x9d1a[55]]= _[_0x9d1a[56]](_0x894bx2d[_0x9d1a[48]],_0x894bx2d[_0x9d1a[53]]);_0x894bx1f[_0x9d1a[57]]= _[_0x9d1a[56]](_0x894bx2d[_0x9d1a[48]],qs[_0x9d1a[58]](_0x894bx2c[_0x9d1a[53]][_0x9d1a[58]]));_0x894bx1f[_0x9d1a[57]]= (_0x894bx1f[_0x9d1a[57]][_0x9d1a[59]])?_0x894bx1f[_0x9d1a[57]]:_0x894bx2d[_0x9d1a[48]];if(_0x894bx2c[_0x9d1a[53]][_0x9d1a[75]]){_0x894bx1f[_0x9d1a[76]]= [{all:true}]};_0x894bx1f= _[_0x9d1a[68]]({},_0x894bx1f,_0x894bx2c[_0x9d1a[72]]);return db[_0x9d1a[50]][_0x9d1a[81]](_0x894bx1f)[_0x9d1a[40]](handleEntityNotFound(_0x894bx1a,null))[_0x9d1a[40]](respondWithResult(_0x894bx1a,null))[_0x9d1a[73]](handleError(_0x894bx1a,null))};exports[_0x9d1a[82]]= function(_0x894bx2c,_0x894bx1a){return db[_0x9d1a[50]][_0x9d1a[82]](_0x894bx2c[_0x9d1a[83]],{})[_0x9d1a[40]](respondWithResult(_0x894bx1a,201))[_0x9d1a[73]](handleError(_0x894bx1a,null))};exports[_0x9d1a[41]]= function(_0x894bx2c,_0x894bx1a){if(_0x894bx2c[_0x9d1a[83]][_0x9d1a[79]]){delete _0x894bx2c[_0x9d1a[83]][_0x9d1a[79]]};return db[_0x9d1a[50]][_0x9d1a[81]]({where:{id:_0x894bx2c[_0x9d1a[80]][_0x9d1a[79]]}})[_0x9d1a[40]](handleEntityNotFound(_0x894bx1a,null))[_0x9d1a[40]](saveUpdates(_0x894bx2c[_0x9d1a[83]],null))[_0x9d1a[40]](respondWithResult(_0x894bx1a,null))[_0x9d1a[73]](handleError(_0x894bx1a,null))};exports[_0x9d1a[42]]= function(_0x894bx2c,_0x894bx1a){return db[_0x9d1a[50]][_0x9d1a[81]]({where:{id:_0x894bx2c[_0x9d1a[80]][_0x9d1a[79]]}})[_0x9d1a[40]](handleEntityNotFound(_0x894bx1a,null))[_0x9d1a[40]](removeEntity(_0x894bx1a,null))[_0x9d1a[73]](handleError(_0x894bx1a,null))}
\ No newline at end of file
+var _0x4165=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x4165[0];var jsonpatch=require(_0x4165[1]);var rp=require(_0x4165[2]);var moment=require(_0x4165[3]);var BPromise=require(_0x4165[4]);var Mustache=require(_0x4165[5]);var util=require(_0x4165[6]);var path=require(_0x4165[7]);var sox=require(_0x4165[8]);var csv=require(_0x4165[9]);var ejs=require(_0x4165[10]);var fs=require(_0x4165[11]);var _=require(_0x4165[12]);var squel=require(_0x4165[13]);var crypto=require(_0x4165[14]);var jsforce=require(_0x4165[15]);var deskjs=require(_0x4165[16]);var toCsv=require(_0x4165[9]);var querystring=require(_0x4165[17]);var Papa=require(_0x4165[18]);var qs=require(_0x4165[19]);var logger=require(_0x4165[21])(_0x4165[20]);var utils=require(_0x4165[22]);var config=require(_0x4165[23]);var db=require(_0x4165[25])[_0x4165[24]];function respondWithStatusCode(_0x3e7dx1a,_0x3e7dx1b){_0x3e7dx1b= _0x3e7dx1b|| 204;return function(_0x3e7dx1c){if(_0x3e7dx1c){return _0x3e7dx1a[_0x4165[26]](_0x3e7dx1b)};return _0x3e7dx1a[_0x4165[28]](_0x3e7dx1b)[_0x4165[27]]()}}function respondWithResult(_0x3e7dx1a,_0x3e7dx1b){_0x3e7dx1b= _0x3e7dx1b|| 200;return function(_0x3e7dx1c){if(_0x3e7dx1c){return _0x3e7dx1a[_0x4165[28]](_0x3e7dx1b)[_0x4165[29]](_0x3e7dx1c)}}}function respondWithFilteredResult(_0x3e7dx1a,_0x3e7dx1f){return function(_0x3e7dx1c){if(_0x3e7dx1c){var _0x3e7dx20=_0x3e7dx1c[_0x4165[30]],_0x3e7dx21=_0x3e7dx1f[_0x4165[31]],_0x3e7dx22=_0x3e7dx1f[_0x4165[31]]+ _0x3e7dx1f[_0x4165[32]],_0x3e7dx1b;if(_0x3e7dx22>= _0x3e7dx20){_0x3e7dx22= _0x3e7dx20;_0x3e7dx1b= 200}else {_0x3e7dx1b= 206};_0x3e7dx1a[_0x4165[28]](_0x3e7dx1b);return _0x3e7dx1a[_0x4165[36]](_0x4165[33],_0x3e7dx21+ _0x4165[34]+ _0x3e7dx22+ _0x4165[35]+ _0x3e7dx20)[_0x4165[29]](_0x3e7dx1c)};return null}}function patchUpdates(_0x3e7dx24){return function(_0x3e7dx1c){try{jsonpatch[_0x4165[37]](_0x3e7dx1c,_0x3e7dx24,true)}catch(err){return BPromise[_0x4165[38]](err)};return _0x3e7dx1c[_0x4165[39]]()}}function saveUpdates(_0x3e7dx26,_0x3e7dx1b){return function(_0x3e7dx1c){if(_0x3e7dx1c){return _0x3e7dx1c[_0x4165[41]](_0x3e7dx26)[_0x4165[40]](function(_0x3e7dx27){return _0x3e7dx27})};return null}}function removeEntity(_0x3e7dx1a,_0x3e7dx1b){return function(_0x3e7dx1c){if(_0x3e7dx1c){return _0x3e7dx1c[_0x4165[42]]()[_0x4165[40]](function(){_0x3e7dx1a[_0x4165[28]](204)[_0x4165[27]]()})}}}function handleEntityNotFound(_0x3e7dx1a,_0x3e7dx1b){return function(_0x3e7dx1c){if(!_0x3e7dx1c){_0x3e7dx1a[_0x4165[26]](404)};return _0x3e7dx1c}}function handleError(_0x3e7dx1a,_0x3e7dx1b){_0x3e7dx1b= _0x3e7dx1b|| 500;return function(_0x3e7dx2b){logger[_0x4165[44]](_0x3e7dx2b[_0x4165[43]]);if(_0x3e7dx2b[_0x4165[45]]){delete _0x3e7dx2b[_0x4165[45]]};_0x3e7dx1a[_0x4165[28]](_0x3e7dx1b)[_0x4165[46]](_0x3e7dx2b)}}exports[_0x4165[47]]= function(_0x3e7dx2c,_0x3e7dx1a){var _0x3e7dx1f={},_0x3e7dx2d={},_0x3e7dx2e={count:0,rows:[]};_0x3e7dx2d[_0x4165[48]]= _[_0x4165[51]](db[_0x4165[50]][_0x4165[49]]);var _0x3e7dx2f={dateStart:_0x3e7dx2c[_0x4165[53]][_0x4165[52]],dateEnd:_0x3e7dx2c[_0x4165[53]][_0x4165[54]]};delete _0x3e7dx2c[_0x4165[53]][_0x4165[52]];delete _0x3e7dx2c[_0x4165[53]][_0x4165[54]];_0x3e7dx2d[_0x4165[53]]= _[_0x4165[51]](_0x3e7dx2c[_0x4165[53]]);_0x3e7dx2d[_0x4165[55]]= _[_0x4165[56]](_0x3e7dx2d[_0x4165[48]],_0x3e7dx2d[_0x4165[53]]);_0x3e7dx1f[_0x4165[57]]= _[_0x4165[56]](_0x3e7dx2d[_0x4165[48]],qs[_0x4165[58]](_0x3e7dx2c[_0x4165[53]][_0x4165[58]]));_0x3e7dx1f[_0x4165[57]]= (_0x3e7dx1f[_0x4165[57]][_0x4165[59]])?_0x3e7dx1f[_0x4165[57]]:_0x3e7dx2d[_0x4165[48]];if(!_0x3e7dx2c[_0x4165[53]][_0x4165[61]](_0x4165[60])){_0x3e7dx1f[_0x4165[32]]= qs[_0x4165[32]](_0x3e7dx2c[_0x4165[53]][_0x4165[32]]);_0x3e7dx1f[_0x4165[31]]= qs[_0x4165[31]](_0x3e7dx2c[_0x4165[53]][_0x4165[31]])};_0x3e7dx1f[_0x4165[62]]= qs[_0x4165[63]](_0x3e7dx2c[_0x4165[53]][_0x4165[63]]);_0x3e7dx1f[_0x4165[64]]= qs[_0x4165[55]](_[_0x4165[65]](_0x3e7dx2c[_0x4165[53]],_0x3e7dx2d[_0x4165[55]]));if(_0x3e7dx2f[_0x4165[52]]){if(_0x3e7dx2f[_0x4165[54]]){_0x3e7dx2f[_0x4165[54]]= moment(_0x3e7dx2f[_0x4165[54]])[_0x4165[67]](1,_0x4165[66])}else {_0x3e7dx2f[_0x4165[54]]= moment(_0x3e7dx2f[_0x4165[52]])[_0x4165[67]](1,_0x4165[66])};_[_0x4165[68]](_0x3e7dx1f[_0x4165[64]],{createdAt:{$gte:_0x3e7dx2f[_0x4165[52]],$lte:_0x3e7dx2f[_0x4165[54]]}})};if(_0x3e7dx2c[_0x4165[53]][_0x4165[69]]){_0x3e7dx1f[_0x4165[64]]= _[_0x4165[68]](_0x3e7dx1f[_0x4165[64]],{$or:_[_0x4165[71]](_0x3e7dx1f[_0x4165[57]],function(_0x3e7dx30){var _0x3e7dx2e={};_0x3e7dx2e[_0x3e7dx30]= {$like:_0x4165[70]+ _0x3e7dx2c[_0x4165[53]][_0x4165[69]]+ _0x4165[70]};return _0x3e7dx2e})})};_0x3e7dx1f= _[_0x4165[68]]({},_0x3e7dx1f,_0x3e7dx2c[_0x4165[72]]);var _0x3e7dx31={where:_0x3e7dx1f[_0x4165[64]]};return db[_0x4165[50]][_0x4165[30]](_0x3e7dx31)[_0x4165[40]](function(_0x3e7dx20){_0x3e7dx2e[_0x4165[30]]= _0x3e7dx20;if(_0x3e7dx2c[_0x4165[53]][_0x4165[75]]){_0x3e7dx1f[_0x4165[76]]= [{all:true}]};return db[_0x4165[50]][_0x4165[77]](_0x3e7dx1f)})[_0x4165[40]](function(_0x3e7dx32){_0x3e7dx2e[_0x4165[74]]= _0x3e7dx32;return _0x3e7dx2e})[_0x4165[40]](respondWithFilteredResult(_0x3e7dx1a,_0x3e7dx1f))[_0x4165[73]](handleError(_0x3e7dx1a,null))};exports[_0x4165[78]]= function(_0x3e7dx2c,_0x3e7dx1a){var _0x3e7dx1f={raw:true,where:{id:_0x3e7dx2c[_0x4165[80]][_0x4165[79]]}},_0x3e7dx2d={};_0x3e7dx2d[_0x4165[48]]= _[_0x4165[51]](db[_0x4165[50]][_0x4165[49]]);_0x3e7dx2d[_0x4165[53]]= _[_0x4165[51]](_0x3e7dx2c[_0x4165[53]]);_0x3e7dx2d[_0x4165[55]]= _[_0x4165[56]](_0x3e7dx2d[_0x4165[48]],_0x3e7dx2d[_0x4165[53]]);_0x3e7dx1f[_0x4165[57]]= _[_0x4165[56]](_0x3e7dx2d[_0x4165[48]],qs[_0x4165[58]](_0x3e7dx2c[_0x4165[53]][_0x4165[58]]));_0x3e7dx1f[_0x4165[57]]= (_0x3e7dx1f[_0x4165[57]][_0x4165[59]])?_0x3e7dx1f[_0x4165[57]]:_0x3e7dx2d[_0x4165[48]];if(_0x3e7dx2c[_0x4165[53]][_0x4165[75]]){_0x3e7dx1f[_0x4165[76]]= [{all:true}]};_0x3e7dx1f= _[_0x4165[68]]({},_0x3e7dx1f,_0x3e7dx2c[_0x4165[72]]);return db[_0x4165[50]][_0x4165[81]](_0x3e7dx1f)[_0x4165[40]](handleEntityNotFound(_0x3e7dx1a,null))[_0x4165[40]](respondWithResult(_0x3e7dx1a,null))[_0x4165[73]](handleError(_0x3e7dx1a,null))};exports[_0x4165[82]]= function(_0x3e7dx2c,_0x3e7dx1a){return db[_0x4165[50]][_0x4165[82]](_0x3e7dx2c[_0x4165[83]],{})[_0x4165[40]](respondWithResult(_0x3e7dx1a,201))[_0x4165[73]](handleError(_0x3e7dx1a,null))};exports[_0x4165[41]]= function(_0x3e7dx2c,_0x3e7dx1a){if(_0x3e7dx2c[_0x4165[83]][_0x4165[79]]){delete _0x3e7dx2c[_0x4165[83]][_0x4165[79]]};return db[_0x4165[50]][_0x4165[81]]({where:{id:_0x3e7dx2c[_0x4165[80]][_0x4165[79]]}})[_0x4165[40]](handleEntityNotFound(_0x3e7dx1a,null))[_0x4165[40]](saveUpdates(_0x3e7dx2c[_0x4165[83]],null))[_0x4165[40]](respondWithResult(_0x3e7dx1a,null))[_0x4165[73]](handleError(_0x3e7dx1a,null))};exports[_0x4165[42]]= function(_0x3e7dx2c,_0x3e7dx1a){return db[_0x4165[50]][_0x4165[81]]({where:{id:_0x3e7dx2c[_0x4165[80]][_0x4165[79]]}})[_0x4165[40]](handleEntityNotFound(_0x3e7dx1a,null))[_0x4165[40]](removeEntity(_0x3e7dx1a,null))[_0x4165[73]](handleError(_0x3e7dx1a,null))}
\ No newline at end of file
index 4508285..5a15150 100644 (file)
@@ -1 +1 @@
-var _0xf120=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x74\x6F\x6F\x6C\x73\x5F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0xf120[0];var _=require(_0xf120[1]);var util=require(_0xf120[2]);var logger=require(_0xf120[4])(_0xf120[3]);var moment=require(_0xf120[5]);var BPromise=require(_0xf120[6]);var rp=require(_0xf120[7]);var attributes=require(_0xf120[8]);module[_0xf120[9]]= function(_0xa9dcx8,_0xa9dcx9){return _0xa9dcx8[_0xf120[12]](_0xf120[10],attributes,{tableName:_0xf120[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x71e3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x74\x6F\x6F\x6C\x73\x5F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x71e3[0];var _=require(_0x71e3[1]);var util=require(_0x71e3[2]);var logger=require(_0x71e3[4])(_0x71e3[3]);var moment=require(_0x71e3[5]);var BPromise=require(_0x71e3[6]);var rp=require(_0x71e3[7]);var attributes=require(_0x71e3[8]);module[_0x71e3[9]]= function(_0xb7b3x8,_0xb7b3x9){return _0xb7b3x8[_0x71e3[12]](_0x71e3[10],attributes,{tableName:_0x71e3[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index ea4f402..4ac1432 100644 (file)
@@ -1 +1 @@
-var _0x5002=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x54\x65\x6D\x70\x6C\x61\x74\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x54\x65\x6D\x70\x6C\x61\x74\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x54\x65\x6D\x70\x6C\x61\x74\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x54\x65\x6D\x70\x6C\x61\x74\x65"];_0x5002[0];var _=require(_0x5002[1]);var util=require(_0x5002[2]);var moment=require(_0x5002[3]);var BPromise=require(_0x5002[4]);var rs=require(_0x5002[5]);var fs=require(_0x5002[6]);var db=require(_0x5002[8])[_0x5002[7]];var utils=require(_0x5002[9]);var logger=require(_0x5002[11])(_0x5002[10]);var config=require(_0x5002[12]);var jayson=require(_0x5002[13]);var client=jayson[_0x5002[15]][_0x5002[14]]({port:9002});function respondWithRpcPromise(_0xf921xe,_0xf921xf,_0xf921x10){return  new BPromise(function(_0xf921x11,_0xf921x12){return client[_0x5002[28]](_0xf921xe,_0xf921x10)[_0x5002[27]](function(_0xf921x14){logger[_0x5002[20]](_0x5002[16],_0xf921xf,_0x5002[19]);logger[_0x5002[23]](_0x5002[21],_0xf921xf,_0x5002[19],JSON[_0x5002[22]](_0xf921x14));if(_0xf921x14[_0x5002[17]]){if(_0xf921x14[_0x5002[17]][_0x5002[24]]=== 500){logger[_0x5002[17]](_0x5002[16],_0xf921xf,_0xf921x14[_0x5002[17]][_0x5002[25]]);return _0xf921x12(_0xf921x14[_0x5002[17]][_0x5002[25]])};logger[_0x5002[17]](_0x5002[16],_0xf921xf,_0xf921x14[_0x5002[17]][_0x5002[25]]);return _0xf921x11(_0xf921x14[_0x5002[17]][_0x5002[25]])}else {logger[_0x5002[20]](_0x5002[16],_0xf921xf,_0x5002[19]);_0xf921x11(_0xf921x14[_0x5002[26]][_0x5002[25]])}})[_0x5002[18]](function(_0xf921x13){logger[_0x5002[17]](_0x5002[16],_0xf921xf,_0xf921x13);_0xf921x12(_0xf921x13)})})}exports[_0x5002[29]]= function(_0xf921x10){var _0xf921x15=this;return  new Promise(function(_0xf921x11,_0xf921x12){return db[_0x5002[40]][_0x5002[39]]({raw:_0xf921x10[_0x5002[30]]?(_0xf921x10[_0x5002[30]][_0x5002[31]]=== undefined)?true:false:true,where:_0xf921x10[_0x5002[30]]?_0xf921x10[_0x5002[30]][_0x5002[32]]|| null:null,attributes:_0xf921x10[_0x5002[30]]?_0xf921x10[_0x5002[30]][_0x5002[33]]|| null:null,limit:_0xf921x10[_0x5002[30]]?_0xf921x10[_0x5002[30]][_0x5002[34]]|| null:null,include:_0xf921x10[_0x5002[30]]?(_0xf921x10[_0x5002[30]][_0x5002[35]]?_[_0x5002[38]](_0xf921x10[_0x5002[30]][_0x5002[35]],function(_0xf921x16){return {model:db[_0xf921x16[_0x5002[36]]],as:_0xf921x16[_0x5002[37]],attributes:_0xf921x16[_0x5002[33]],include:_0xf921x16[_0x5002[35]]?_[_0x5002[38]](_0xf921x16[_0x5002[35]],function(_0xf921x17){return {model:db[_0xf921x17[_0x5002[36]]],as:_0xf921x17[_0x5002[37]],attributes:_0xf921x17[_0x5002[33]],include:_0xf921x17[_0x5002[35]]?_[_0x5002[38]](_0xf921x17[_0x5002[35]],function(_0xf921x18){return {model:db[_0xf921x18[_0x5002[36]]],as:_0xf921x18[_0x5002[37]],attributes:_0xf921x18[_0x5002[33]]}}):[]}}):[]}}):[]):[]})[_0x5002[27]](function(_0xf921x14){logger[_0x5002[20]](_0x5002[29],_0xf921x10);logger[_0x5002[23]](_0x5002[29],_0xf921x10,JSON[_0x5002[22]](_0xf921x14));_0xf921x11(_0xf921x14)})[_0x5002[18]](function(_0xf921x13){logger[_0x5002[17]](_0x5002[29],_0xf921x13[_0x5002[25]],_0xf921x10);_0xf921x12(_0xf921x15[_0x5002[17]](500,_0xf921x13[_0x5002[25]]))})})}
\ No newline at end of file
+var _0xacc7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x54\x65\x6D\x70\x6C\x61\x74\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x54\x65\x6D\x70\x6C\x61\x74\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x54\x65\x6D\x70\x6C\x61\x74\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x54\x65\x6D\x70\x6C\x61\x74\x65"];_0xacc7[0];var _=require(_0xacc7[1]);var util=require(_0xacc7[2]);var moment=require(_0xacc7[3]);var BPromise=require(_0xacc7[4]);var rs=require(_0xacc7[5]);var fs=require(_0xacc7[6]);var db=require(_0xacc7[8])[_0xacc7[7]];var utils=require(_0xacc7[9]);var logger=require(_0xacc7[11])(_0xacc7[10]);var config=require(_0xacc7[12]);var jayson=require(_0xacc7[13]);var client=jayson[_0xacc7[15]][_0xacc7[14]]({port:9002});function respondWithRpcPromise(_0x969dxe,_0x969dxf,_0x969dx10){return  new BPromise(function(_0x969dx11,_0x969dx12){return client[_0xacc7[28]](_0x969dxe,_0x969dx10)[_0xacc7[27]](function(_0x969dx14){logger[_0xacc7[20]](_0xacc7[16],_0x969dxf,_0xacc7[19]);logger[_0xacc7[23]](_0xacc7[21],_0x969dxf,_0xacc7[19],JSON[_0xacc7[22]](_0x969dx14));if(_0x969dx14[_0xacc7[17]]){if(_0x969dx14[_0xacc7[17]][_0xacc7[24]]=== 500){logger[_0xacc7[17]](_0xacc7[16],_0x969dxf,_0x969dx14[_0xacc7[17]][_0xacc7[25]]);return _0x969dx12(_0x969dx14[_0xacc7[17]][_0xacc7[25]])};logger[_0xacc7[17]](_0xacc7[16],_0x969dxf,_0x969dx14[_0xacc7[17]][_0xacc7[25]]);return _0x969dx11(_0x969dx14[_0xacc7[17]][_0xacc7[25]])}else {logger[_0xacc7[20]](_0xacc7[16],_0x969dxf,_0xacc7[19]);_0x969dx11(_0x969dx14[_0xacc7[26]][_0xacc7[25]])}})[_0xacc7[18]](function(_0x969dx13){logger[_0xacc7[17]](_0xacc7[16],_0x969dxf,_0x969dx13);_0x969dx12(_0x969dx13)})})}exports[_0xacc7[29]]= function(_0x969dx10){var _0x969dx15=this;return  new Promise(function(_0x969dx11,_0x969dx12){return db[_0xacc7[40]][_0xacc7[39]]({raw:_0x969dx10[_0xacc7[30]]?(_0x969dx10[_0xacc7[30]][_0xacc7[31]]=== undefined)?true:false:true,where:_0x969dx10[_0xacc7[30]]?_0x969dx10[_0xacc7[30]][_0xacc7[32]]|| null:null,attributes:_0x969dx10[_0xacc7[30]]?_0x969dx10[_0xacc7[30]][_0xacc7[33]]|| null:null,limit:_0x969dx10[_0xacc7[30]]?_0x969dx10[_0xacc7[30]][_0xacc7[34]]|| null:null,include:_0x969dx10[_0xacc7[30]]?(_0x969dx10[_0xacc7[30]][_0xacc7[35]]?_[_0xacc7[38]](_0x969dx10[_0xacc7[30]][_0xacc7[35]],function(_0x969dx16){return {model:db[_0x969dx16[_0xacc7[36]]],as:_0x969dx16[_0xacc7[37]],attributes:_0x969dx16[_0xacc7[33]],include:_0x969dx16[_0xacc7[35]]?_[_0xacc7[38]](_0x969dx16[_0xacc7[35]],function(_0x969dx17){return {model:db[_0x969dx17[_0xacc7[36]]],as:_0x969dx17[_0xacc7[37]],attributes:_0x969dx17[_0xacc7[33]],include:_0x969dx17[_0xacc7[35]]?_[_0xacc7[38]](_0x969dx17[_0xacc7[35]],function(_0x969dx18){return {model:db[_0x969dx18[_0xacc7[36]]],as:_0x969dx18[_0xacc7[37]],attributes:_0x969dx18[_0xacc7[33]]}}):[]}}):[]}}):[]):[]})[_0xacc7[27]](function(_0x969dx14){logger[_0xacc7[20]](_0xacc7[29],_0x969dx10);logger[_0xacc7[23]](_0xacc7[29],_0x969dx10,JSON[_0xacc7[22]](_0x969dx14));_0x969dx11(_0x969dx14)})[_0xacc7[18]](function(_0x969dx13){logger[_0xacc7[17]](_0xacc7[29],_0x969dx13[_0xacc7[25]],_0x969dx10);_0x969dx12(_0x969dx15[_0xacc7[17]](500,_0x969dx13[_0xacc7[25]]))})})}
\ No newline at end of file
index 105d13e..1bbbf88 100644 (file)
@@ -1 +1 @@
-var _0x372f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x74\x72\x69\x67\x67\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x6C\x6C\x5F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x6C\x6C\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x6E\x79\x5F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x6E\x79\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x63\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x6C\x6C\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x61\x64\x64\x41\x6E\x79\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x372f[0];var multer=require(_0x372f[1]);var util=require(_0x372f[2]);var path=require(_0x372f[3]);var express=require(_0x372f[4]);var router=express.Router();var auth=require(_0x372f[5]);var interaction=require(_0x372f[6]);var config=require(_0x372f[7]);var controller=require(_0x372f[8]);router[_0x372f[12]](_0x372f[9],auth[_0x372f[10]](),controller[_0x372f[11]]);router[_0x372f[12]](_0x372f[13],auth[_0x372f[10]](),controller[_0x372f[14]]);router[_0x372f[12]](_0x372f[15],auth[_0x372f[10]](),controller[_0x372f[16]]);router[_0x372f[12]](_0x372f[17],auth[_0x372f[10]](),controller[_0x372f[18]]);router[_0x372f[12]](_0x372f[19],auth[_0x372f[10]](),controller[_0x372f[20]]);router[_0x372f[22]](_0x372f[9],auth[_0x372f[10]](),controller[_0x372f[21]]);router[_0x372f[22]](_0x372f[15],auth[_0x372f[10]](),controller[_0x372f[23]]);router[_0x372f[22]](_0x372f[17],auth[_0x372f[10]](),controller[_0x372f[24]]);router[_0x372f[22]](_0x372f[19],auth[_0x372f[10]](),controller[_0x372f[25]]);router[_0x372f[27]](_0x372f[13],auth[_0x372f[10]](),controller[_0x372f[26]]);router[_0x372f[29]](_0x372f[13],auth[_0x372f[10]](),controller[_0x372f[28]]);module[_0x372f[30]]= router
\ No newline at end of file
+var _0x6d4d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x74\x72\x69\x67\x67\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x6C\x6C\x5F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x6C\x6C\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x6E\x79\x5F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x6E\x79\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x63\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x6C\x6C\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x61\x64\x64\x41\x6E\x79\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6d4d[0];var multer=require(_0x6d4d[1]);var util=require(_0x6d4d[2]);var path=require(_0x6d4d[3]);var express=require(_0x6d4d[4]);var router=express.Router();var auth=require(_0x6d4d[5]);var interaction=require(_0x6d4d[6]);var config=require(_0x6d4d[7]);var controller=require(_0x6d4d[8]);router[_0x6d4d[12]](_0x6d4d[9],auth[_0x6d4d[10]](),controller[_0x6d4d[11]]);router[_0x6d4d[12]](_0x6d4d[13],auth[_0x6d4d[10]](),controller[_0x6d4d[14]]);router[_0x6d4d[12]](_0x6d4d[15],auth[_0x6d4d[10]](),controller[_0x6d4d[16]]);router[_0x6d4d[12]](_0x6d4d[17],auth[_0x6d4d[10]](),controller[_0x6d4d[18]]);router[_0x6d4d[12]](_0x6d4d[19],auth[_0x6d4d[10]](),controller[_0x6d4d[20]]);router[_0x6d4d[22]](_0x6d4d[9],auth[_0x6d4d[10]](),controller[_0x6d4d[21]]);router[_0x6d4d[22]](_0x6d4d[15],auth[_0x6d4d[10]](),controller[_0x6d4d[23]]);router[_0x6d4d[22]](_0x6d4d[17],auth[_0x6d4d[10]](),controller[_0x6d4d[24]]);router[_0x6d4d[22]](_0x6d4d[19],auth[_0x6d4d[10]](),controller[_0x6d4d[25]]);router[_0x6d4d[27]](_0x6d4d[13],auth[_0x6d4d[10]](),controller[_0x6d4d[26]]);router[_0x6d4d[29]](_0x6d4d[13],auth[_0x6d4d[10]](),controller[_0x6d4d[28]]);module[_0x6d4d[30]]= router
\ No newline at end of file
index 2854eb8..1e11e2c 100644 (file)
@@ -1 +1 @@
-var _0x46d6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x46d6[0];var Sequelize=require(_0x46d6[1]);module[_0x46d6[2]]= {name:{type:Sequelize[_0x46d6[3]]},channel:{type:Sequelize[_0x46d6[3]]},description:{type:Sequelize[_0x46d6[3]]},status:{type:Sequelize[_0x46d6[4]],defaultValue:false}}
\ No newline at end of file
+var _0xa0e5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0xa0e5[0];var Sequelize=require(_0xa0e5[1]);module[_0xa0e5[2]]= {name:{type:Sequelize[_0xa0e5[3]]},channel:{type:Sequelize[_0xa0e5[3]]},description:{type:Sequelize[_0xa0e5[3]]},status:{type:Sequelize[_0xa0e5[4]],defaultValue:false}}
\ No newline at end of file
index acd1d2a..44e3d76 100644 (file)
@@ -1 +1 @@
-var _0x453f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x54\x72\x69\x67\x67\x65\x72","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x61\x64\x64\x41\x6C\x6C\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x54\x72\x69\x67\x67\x65\x72\x41\x6C\x6C\x49\x64","\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x61\x64\x64\x41\x6E\x79\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x54\x72\x69\x67\x67\x65\x72\x41\x6E\x79\x49\x64","\x67\x65\x74\x41\x6C\x6C\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x41\x6E\x79\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E","\x54\x72\x69\x67\x67\x65\x72\x49\x64","\x41\x63\x74\x69\x6F\x6E","\x67\x65\x74\x41\x63\x74\x69\x6F\x6E\x73"];_0x453f[0];var jsonpatch=require(_0x453f[1]);var rp=require(_0x453f[2]);var moment=require(_0x453f[3]);var BPromise=require(_0x453f[4]);var Mustache=require(_0x453f[5]);var util=require(_0x453f[6]);var path=require(_0x453f[7]);var sox=require(_0x453f[8]);var csv=require(_0x453f[9]);var ejs=require(_0x453f[10]);var fs=require(_0x453f[11]);var _=require(_0x453f[12]);var squel=require(_0x453f[13]);var crypto=require(_0x453f[14]);var jsforce=require(_0x453f[15]);var deskjs=require(_0x453f[16]);var toCsv=require(_0x453f[9]);var querystring=require(_0x453f[17]);var Papa=require(_0x453f[18]);var qs=require(_0x453f[19]);var logger=require(_0x453f[21])(_0x453f[20]);var utils=require(_0x453f[22]);var config=require(_0x453f[23]);var db=require(_0x453f[25])[_0x453f[24]];function respondWithStatusCode(_0x7b3ax1a,_0x7b3ax1b){_0x7b3ax1b= _0x7b3ax1b|| 204;return function(_0x7b3ax1c){if(_0x7b3ax1c){return _0x7b3ax1a[_0x453f[26]](_0x7b3ax1b)};return _0x7b3ax1a[_0x453f[28]](_0x7b3ax1b)[_0x453f[27]]()}}function respondWithResult(_0x7b3ax1a,_0x7b3ax1b){_0x7b3ax1b= _0x7b3ax1b|| 200;return function(_0x7b3ax1c){if(_0x7b3ax1c){return _0x7b3ax1a[_0x453f[28]](_0x7b3ax1b)[_0x453f[29]](_0x7b3ax1c)}}}function respondWithFilteredResult(_0x7b3ax1a,_0x7b3ax1f){return function(_0x7b3ax1c){if(_0x7b3ax1c){var _0x7b3ax20=_0x7b3ax1c[_0x453f[30]],_0x7b3ax21=_0x7b3ax1f[_0x453f[31]],_0x7b3ax22=_0x7b3ax1f[_0x453f[31]]+ _0x7b3ax1f[_0x453f[32]],_0x7b3ax1b;if(_0x7b3ax22>= _0x7b3ax20){_0x7b3ax22= _0x7b3ax20;_0x7b3ax1b= 200}else {_0x7b3ax1b= 206};_0x7b3ax1a[_0x453f[28]](_0x7b3ax1b);return _0x7b3ax1a[_0x453f[36]](_0x453f[33],_0x7b3ax21+ _0x453f[34]+ _0x7b3ax22+ _0x453f[35]+ _0x7b3ax20)[_0x453f[29]](_0x7b3ax1c)};return null}}function patchUpdates(_0x7b3ax24){return function(_0x7b3ax1c){try{jsonpatch[_0x453f[37]](_0x7b3ax1c,_0x7b3ax24,true)}catch(err){return BPromise[_0x453f[38]](err)};return _0x7b3ax1c[_0x453f[39]]()}}function saveUpdates(_0x7b3ax26,_0x7b3ax1b){return function(_0x7b3ax1c){if(_0x7b3ax1c){return _0x7b3ax1c[_0x453f[41]](_0x7b3ax26)[_0x453f[40]](function(_0x7b3ax27){return _0x7b3ax27})};return null}}function removeEntity(_0x7b3ax1a,_0x7b3ax1b){return function(_0x7b3ax1c){if(_0x7b3ax1c){return _0x7b3ax1c[_0x453f[42]]()[_0x453f[40]](function(){_0x7b3ax1a[_0x453f[28]](204)[_0x453f[27]]()})}}}function handleEntityNotFound(_0x7b3ax1a,_0x7b3ax1b){return function(_0x7b3ax1c){if(!_0x7b3ax1c){_0x7b3ax1a[_0x453f[26]](404)};return _0x7b3ax1c}}function handleError(_0x7b3ax1a,_0x7b3ax1b){_0x7b3ax1b= _0x7b3ax1b|| 500;return function(_0x7b3ax2b){logger[_0x453f[44]](_0x7b3ax2b[_0x453f[43]]);if(_0x7b3ax2b[_0x453f[45]]){delete _0x7b3ax2b[_0x453f[45]]};_0x7b3ax1a[_0x453f[28]](_0x7b3ax1b)[_0x453f[46]](_0x7b3ax2b)}}exports[_0x453f[47]]= function(_0x7b3ax2c,_0x7b3ax1a){var _0x7b3ax1f={},_0x7b3ax2d={},_0x7b3ax2e={count:0,rows:[]};_0x7b3ax2d[_0x453f[48]]= _[_0x453f[51]](db[_0x453f[50]][_0x453f[49]]);var _0x7b3ax2f={dateStart:_0x7b3ax2c[_0x453f[53]][_0x453f[52]],dateEnd:_0x7b3ax2c[_0x453f[53]][_0x453f[54]]};delete _0x7b3ax2c[_0x453f[53]][_0x453f[52]];delete _0x7b3ax2c[_0x453f[53]][_0x453f[54]];_0x7b3ax2d[_0x453f[53]]= _[_0x453f[51]](_0x7b3ax2c[_0x453f[53]]);_0x7b3ax2d[_0x453f[55]]= _[_0x453f[56]](_0x7b3ax2d[_0x453f[48]],_0x7b3ax2d[_0x453f[53]]);_0x7b3ax1f[_0x453f[57]]= _[_0x453f[56]](_0x7b3ax2d[_0x453f[48]],qs[_0x453f[58]](_0x7b3ax2c[_0x453f[53]][_0x453f[58]]));_0x7b3ax1f[_0x453f[57]]= (_0x7b3ax1f[_0x453f[57]][_0x453f[59]])?_0x7b3ax1f[_0x453f[57]]:_0x7b3ax2d[_0x453f[48]];if(!_0x7b3ax2c[_0x453f[53]][_0x453f[61]](_0x453f[60])){_0x7b3ax1f[_0x453f[32]]= qs[_0x453f[32]](_0x7b3ax2c[_0x453f[53]][_0x453f[32]]);_0x7b3ax1f[_0x453f[31]]= qs[_0x453f[31]](_0x7b3ax2c[_0x453f[53]][_0x453f[31]])};_0x7b3ax1f[_0x453f[62]]= qs[_0x453f[63]](_0x7b3ax2c[_0x453f[53]][_0x453f[63]]);_0x7b3ax1f[_0x453f[64]]= qs[_0x453f[55]](_[_0x453f[65]](_0x7b3ax2c[_0x453f[53]],_0x7b3ax2d[_0x453f[55]]));if(_0x7b3ax2f[_0x453f[52]]){if(_0x7b3ax2f[_0x453f[54]]){_0x7b3ax2f[_0x453f[54]]= moment(_0x7b3ax2f[_0x453f[54]])[_0x453f[67]](1,_0x453f[66])}else {_0x7b3ax2f[_0x453f[54]]= moment(_0x7b3ax2f[_0x453f[52]])[_0x453f[67]](1,_0x453f[66])};_[_0x453f[68]](_0x7b3ax1f[_0x453f[64]],{createdAt:{$gte:_0x7b3ax2f[_0x453f[52]],$lte:_0x7b3ax2f[_0x453f[54]]}})};if(_0x7b3ax2c[_0x453f[53]][_0x453f[69]]){_0x7b3ax1f[_0x453f[64]]= _[_0x453f[68]](_0x7b3ax1f[_0x453f[64]],{$or:_[_0x453f[71]](_0x7b3ax1f[_0x453f[57]],function(_0x7b3ax30){var _0x7b3ax2e={};_0x7b3ax2e[_0x7b3ax30]= {$like:_0x453f[70]+ _0x7b3ax2c[_0x453f[53]][_0x453f[69]]+ _0x453f[70]};return _0x7b3ax2e})})};_0x7b3ax1f= _[_0x453f[68]]({},_0x7b3ax1f,_0x7b3ax2c[_0x453f[72]]);var _0x7b3ax31={where:_0x7b3ax1f[_0x453f[64]]};return db[_0x453f[50]][_0x453f[30]](_0x7b3ax31)[_0x453f[40]](function(_0x7b3ax20){_0x7b3ax2e[_0x453f[30]]= _0x7b3ax20;if(_0x7b3ax2c[_0x453f[53]][_0x453f[75]]){_0x7b3ax1f[_0x453f[76]]= [{all:true}]};return db[_0x453f[50]][_0x453f[77]](_0x7b3ax1f)})[_0x453f[40]](function(_0x7b3ax32){_0x7b3ax2e[_0x453f[74]]= _0x7b3ax32;return _0x7b3ax2e})[_0x453f[40]](respondWithFilteredResult(_0x7b3ax1a,_0x7b3ax1f))[_0x453f[73]](handleError(_0x7b3ax1a,null))};exports[_0x453f[78]]= function(_0x7b3ax2c,_0x7b3ax1a){var _0x7b3ax1f={raw:false,where:{id:_0x7b3ax2c[_0x453f[80]][_0x453f[79]]}},_0x7b3ax2d={};_0x7b3ax2d[_0x453f[48]]= _[_0x453f[51]](db[_0x453f[50]][_0x453f[49]]);_0x7b3ax2d[_0x453f[53]]= _[_0x453f[51]](_0x7b3ax2c[_0x453f[53]]);_0x7b3ax2d[_0x453f[55]]= _[_0x453f[56]](_0x7b3ax2d[_0x453f[48]],_0x7b3ax2d[_0x453f[53]]);_0x7b3ax1f[_0x453f[57]]= _[_0x453f[56]](_0x7b3ax2d[_0x453f[48]],qs[_0x453f[58]](_0x7b3ax2c[_0x453f[53]][_0x453f[58]]));_0x7b3ax1f[_0x453f[57]]= (_0x7b3ax1f[_0x453f[57]][_0x453f[59]])?_0x7b3ax1f[_0x453f[57]]:_0x7b3ax2d[_0x453f[48]];if(_0x7b3ax2c[_0x453f[53]][_0x453f[75]]){_0x7b3ax1f[_0x453f[76]]= [{all:true}]};_0x7b3ax1f= _[_0x453f[68]]({},_0x7b3ax1f,_0x7b3ax2c[_0x453f[72]]);return db[_0x453f[50]][_0x453f[81]](_0x7b3ax1f)[_0x453f[40]](handleEntityNotFound(_0x7b3ax1a,null))[_0x453f[40]](respondWithResult(_0x7b3ax1a,null))[_0x453f[73]](handleError(_0x7b3ax1a,null))};exports[_0x453f[82]]= function(_0x7b3ax2c,_0x7b3ax1a){return db[_0x453f[50]][_0x453f[82]](_0x7b3ax2c[_0x453f[83]],{})[_0x453f[40]](respondWithResult(_0x7b3ax1a,201))[_0x453f[73]](handleError(_0x7b3ax1a,null))};exports[_0x453f[41]]= function(_0x7b3ax2c,_0x7b3ax1a){if(_0x7b3ax2c[_0x453f[83]][_0x453f[79]]){delete _0x7b3ax2c[_0x453f[83]][_0x453f[79]]};return db[_0x453f[50]][_0x453f[81]]({where:{id:_0x7b3ax2c[_0x453f[80]][_0x453f[79]]}})[_0x453f[40]](handleEntityNotFound(_0x7b3ax1a,null))[_0x453f[40]](saveUpdates(_0x7b3ax2c[_0x453f[83]],null))[_0x453f[40]](respondWithResult(_0x7b3ax1a,null))[_0x453f[73]](handleError(_0x7b3ax1a,null))};exports[_0x453f[42]]= function(_0x7b3ax2c,_0x7b3ax1a){return db[_0x453f[50]][_0x453f[81]]({where:{id:_0x7b3ax2c[_0x453f[80]][_0x453f[79]]}})[_0x453f[40]](handleEntityNotFound(_0x7b3ax1a,null))[_0x453f[40]](removeEntity(_0x7b3ax1a,null))[_0x453f[73]](handleError(_0x7b3ax1a,null))};exports[_0x453f[84]]= function(_0x7b3ax2c,_0x7b3ax1a,_0x7b3ax33){if(_0x7b3ax2c[_0x453f[83]][_0x453f[79]]){delete _0x7b3ax2c[_0x453f[83]][_0x453f[79]]};return db[_0x453f[50]][_0x453f[81]]({where:{id:_0x7b3ax2c[_0x453f[80]][_0x453f[79]]}})[_0x453f[40]](handleEntityNotFound(_0x7b3ax1a,null))[_0x453f[40]](function(_0x7b3ax1c){if(_0x7b3ax1c){_0x7b3ax2c[_0x453f[83]][_0x453f[85]]= _0x7b3ax1c[_0x453f[79]];return db[_0x453f[86]][_0x453f[82]](_0x7b3ax2c[_0x453f[83]])}})[_0x453f[40]](respondWithResult(_0x7b3ax1a,null))[_0x453f[73]](handleError(_0x7b3ax1a,null))};exports[_0x453f[87]]= function(_0x7b3ax2c,_0x7b3ax1a,_0x7b3ax33){if(_0x7b3ax2c[_0x453f[83]][_0x453f[79]]){delete _0x7b3ax2c[_0x453f[83]][_0x453f[79]]};return db[_0x453f[50]][_0x453f[81]]({where:{id:_0x7b3ax2c[_0x453f[80]][_0x453f[79]]}})[_0x453f[40]](handleEntityNotFound(_0x7b3ax1a,null))[_0x453f[40]](function(_0x7b3ax1c){if(_0x7b3ax1c){_0x7b3ax2c[_0x453f[83]][_0x453f[88]]= _0x7b3ax1c[_0x453f[79]];return db[_0x453f[86]][_0x453f[82]](_0x7b3ax2c[_0x453f[83]])}})[_0x453f[40]](respondWithResult(_0x7b3ax1a,null))[_0x453f[73]](handleError(_0x7b3ax1a,null))};exports[_0x453f[89]]= function(_0x7b3ax2c,_0x7b3ax1c,_0x7b3ax33){var _0x7b3ax1f={};var _0x7b3ax2d={};var _0x7b3ax34;var _0x7b3ax20;return db[_0x453f[50]][_0x453f[90]]({where:{id:_0x7b3ax2c[_0x453f[80]][_0x453f[79]]}})[_0x453f[40]](handleEntityNotFound(_0x7b3ax1c,null))[_0x453f[40]](function(_0x7b3ax1c){if(_0x7b3ax1c){_0x7b3ax34= _0x7b3ax1c;_0x7b3ax2d[_0x453f[48]]= _[_0x453f[51]](db[_0x453f[86]][_0x453f[49]]);_0x7b3ax2d[_0x453f[53]]= _[_0x453f[51]](_0x7b3ax2c[_0x453f[53]]);_0x7b3ax2d[_0x453f[55]]= _[_0x453f[56]](_0x7b3ax2d[_0x453f[48]],_0x7b3ax2d[_0x453f[53]]);_0x7b3ax1f[_0x453f[57]]= _[_0x453f[56]](_0x7b3ax2d[_0x453f[48]],qs[_0x453f[58]](_0x7b3ax2c[_0x453f[53]][_0x453f[58]]));_0x7b3ax1f[_0x453f[57]]= (_0x7b3ax1f[_0x453f[57]][_0x453f[59]])?_0x7b3ax1f[_0x453f[57]]:_0x7b3ax2d[_0x453f[48]];_0x7b3ax1f[_0x453f[62]]= qs[_0x453f[63]](_0x7b3ax2c[_0x453f[53]][_0x453f[63]]);_0x7b3ax1f[_0x453f[64]]= qs[_0x453f[55]](_[_0x453f[65]](_0x7b3ax2c[_0x453f[53]],_0x7b3ax2d[_0x453f[55]]));if(_0x7b3ax2c[_0x453f[53]][_0x453f[69]]){_0x7b3ax1f[_0x453f[64]]= _[_0x453f[68]](_0x7b3ax1f[_0x453f[64]],{$or:_[_0x453f[71]](_0x7b3ax1f[_0x453f[57]],function(_0x7b3ax30){var _0x7b3ax2e={};_0x7b3ax2e[_0x7b3ax30]= {$like:_0x453f[70]+ _0x7b3ax2c[_0x453f[53]][_0x453f[69]]+ _0x453f[70]};return _0x7b3ax2e})})};_0x7b3ax1f= _[_0x453f[68]]({},_0x7b3ax1f,_0x7b3ax2c[_0x453f[72]]);return _0x7b3ax34[_0x453f[89]](_0x7b3ax1f)}})[_0x453f[40]](function(_0x7b3ax35){if(_0x7b3ax35){_0x7b3ax20= _0x7b3ax35[_0x453f[59]];if(!_0x7b3ax2c[_0x453f[53]][_0x453f[61]](_0x453f[60])){_0x7b3ax1f[_0x453f[32]]= qs[_0x453f[32]](_0x7b3ax2c[_0x453f[53]][_0x453f[32]]);_0x7b3ax1f[_0x453f[31]]= qs[_0x453f[31]](_0x7b3ax2c[_0x453f[53]][_0x453f[31]])};return _0x7b3ax34[_0x453f[89]](_0x7b3ax1f)}})[_0x453f[40]](function(_0x7b3ax32){if(_0x7b3ax32){return _0x7b3ax32?{count:_0x7b3ax20,rows:_0x7b3ax32}:null}})[_0x453f[40]](respondWithResult(_0x7b3ax1c,null))[_0x453f[73]](handleError(_0x7b3ax1c,null))};exports[_0x453f[91]]= function(_0x7b3ax2c,_0x7b3ax1c,_0x7b3ax33){var _0x7b3ax1f={};var _0x7b3ax2d={};var _0x7b3ax34;var _0x7b3ax20;return db[_0x453f[50]][_0x453f[90]]({where:{id:_0x7b3ax2c[_0x453f[80]][_0x453f[79]]}})[_0x453f[40]](handleEntityNotFound(_0x7b3ax1c,null))[_0x453f[40]](function(_0x7b3ax1c){if(_0x7b3ax1c){_0x7b3ax34= _0x7b3ax1c;_0x7b3ax2d[_0x453f[48]]= _[_0x453f[51]](db[_0x453f[86]][_0x453f[49]]);_0x7b3ax2d[_0x453f[53]]= _[_0x453f[51]](_0x7b3ax2c[_0x453f[53]]);_0x7b3ax2d[_0x453f[55]]= _[_0x453f[56]](_0x7b3ax2d[_0x453f[48]],_0x7b3ax2d[_0x453f[53]]);_0x7b3ax1f[_0x453f[57]]= _[_0x453f[56]](_0x7b3ax2d[_0x453f[48]],qs[_0x453f[58]](_0x7b3ax2c[_0x453f[53]][_0x453f[58]]));_0x7b3ax1f[_0x453f[57]]= (_0x7b3ax1f[_0x453f[57]][_0x453f[59]])?_0x7b3ax1f[_0x453f[57]]:_0x7b3ax2d[_0x453f[48]];_0x7b3ax1f[_0x453f[62]]= qs[_0x453f[63]](_0x7b3ax2c[_0x453f[53]][_0x453f[63]]);_0x7b3ax1f[_0x453f[64]]= qs[_0x453f[55]](_[_0x453f[65]](_0x7b3ax2c[_0x453f[53]],_0x7b3ax2d[_0x453f[55]]));if(_0x7b3ax2c[_0x453f[53]][_0x453f[69]]){_0x7b3ax1f[_0x453f[64]]= _[_0x453f[68]](_0x7b3ax1f[_0x453f[64]],{$or:_[_0x453f[71]](_0x7b3ax1f[_0x453f[57]],function(_0x7b3ax30){var _0x7b3ax2e={};_0x7b3ax2e[_0x7b3ax30]= {$like:_0x453f[70]+ _0x7b3ax2c[_0x453f[53]][_0x453f[69]]+ _0x453f[70]};return _0x7b3ax2e})})};_0x7b3ax1f= _[_0x453f[68]]({},_0x7b3ax1f,_0x7b3ax2c[_0x453f[72]]);return _0x7b3ax34[_0x453f[91]](_0x7b3ax1f)}})[_0x453f[40]](function(_0x7b3ax35){if(_0x7b3ax35){_0x7b3ax20= _0x7b3ax35[_0x453f[59]];if(!_0x7b3ax2c[_0x453f[53]][_0x453f[61]](_0x453f[60])){_0x7b3ax1f[_0x453f[32]]= qs[_0x453f[32]](_0x7b3ax2c[_0x453f[53]][_0x453f[32]]);_0x7b3ax1f[_0x453f[31]]= qs[_0x453f[31]](_0x7b3ax2c[_0x453f[53]][_0x453f[31]])};return _0x7b3ax34[_0x453f[91]](_0x7b3ax1f)}})[_0x453f[40]](function(_0x7b3ax32){if(_0x7b3ax32){return _0x7b3ax32?{count:_0x7b3ax20,rows:_0x7b3ax32}:null}})[_0x453f[40]](respondWithResult(_0x7b3ax1c,null))[_0x453f[73]](handleError(_0x7b3ax1c,null))};exports[_0x453f[92]]= function(_0x7b3ax2c,_0x7b3ax1a,_0x7b3ax33){if(_0x7b3ax2c[_0x453f[83]][_0x453f[79]]){delete _0x7b3ax2c[_0x453f[83]][_0x453f[79]]};return db[_0x453f[50]][_0x453f[81]]({where:{id:_0x7b3ax2c[_0x453f[80]][_0x453f[79]]}})[_0x453f[40]](handleEntityNotFound(_0x7b3ax1a,null))[_0x453f[40]](function(_0x7b3ax1c){if(_0x7b3ax1c){_0x7b3ax2c[_0x453f[83]][_0x453f[93]]= _0x7b3ax1c[_0x453f[79]];return db[_0x453f[94]][_0x453f[82]](_0x7b3ax2c[_0x453f[83]])}})[_0x453f[40]](respondWithResult(_0x7b3ax1a,null))[_0x453f[73]](handleError(_0x7b3ax1a,null))};exports[_0x453f[95]]= function(_0x7b3ax2c,_0x7b3ax1c,_0x7b3ax33){var _0x7b3ax1f={};var _0x7b3ax2d={};var _0x7b3ax34;var _0x7b3ax20;return db[_0x453f[50]][_0x453f[90]]({where:{id:_0x7b3ax2c[_0x453f[80]][_0x453f[79]]}})[_0x453f[40]](handleEntityNotFound(_0x7b3ax1c,null))[_0x453f[40]](function(_0x7b3ax1c){if(_0x7b3ax1c){_0x7b3ax34= _0x7b3ax1c;_0x7b3ax2d[_0x453f[48]]= _[_0x453f[51]](db[_0x453f[94]][_0x453f[49]]);_0x7b3ax2d[_0x453f[53]]= _[_0x453f[51]](_0x7b3ax2c[_0x453f[53]]);_0x7b3ax2d[_0x453f[55]]= _[_0x453f[56]](_0x7b3ax2d[_0x453f[48]],_0x7b3ax2d[_0x453f[53]]);_0x7b3ax1f[_0x453f[57]]= _[_0x453f[56]](_0x7b3ax2d[_0x453f[48]],qs[_0x453f[58]](_0x7b3ax2c[_0x453f[53]][_0x453f[58]]));_0x7b3ax1f[_0x453f[57]]= (_0x7b3ax1f[_0x453f[57]][_0x453f[59]])?_0x7b3ax1f[_0x453f[57]]:_0x7b3ax2d[_0x453f[48]];_0x7b3ax1f[_0x453f[62]]= qs[_0x453f[63]](_0x7b3ax2c[_0x453f[53]][_0x453f[63]]);_0x7b3ax1f[_0x453f[64]]= qs[_0x453f[55]](_[_0x453f[65]](_0x7b3ax2c[_0x453f[53]],_0x7b3ax2d[_0x453f[55]]));if(_0x7b3ax2c[_0x453f[53]][_0x453f[69]]){_0x7b3ax1f[_0x453f[64]]= _[_0x453f[68]](_0x7b3ax1f[_0x453f[64]],{$or:_[_0x453f[71]](_0x7b3ax1f[_0x453f[57]],function(_0x7b3ax30){var _0x7b3ax2e={};_0x7b3ax2e[_0x7b3ax30]= {$like:_0x453f[70]+ _0x7b3ax2c[_0x453f[53]][_0x453f[69]]+ _0x453f[70]};return _0x7b3ax2e})})};_0x7b3ax1f= _[_0x453f[68]]({},_0x7b3ax1f,_0x7b3ax2c[_0x453f[72]]);return _0x7b3ax34[_0x453f[95]](_0x7b3ax1f)}})[_0x453f[40]](function(_0x7b3ax35){if(_0x7b3ax35){_0x7b3ax20= _0x7b3ax35[_0x453f[59]];if(!_0x7b3ax2c[_0x453f[53]][_0x453f[61]](_0x453f[60])){_0x7b3ax1f[_0x453f[32]]= qs[_0x453f[32]](_0x7b3ax2c[_0x453f[53]][_0x453f[32]]);_0x7b3ax1f[_0x453f[31]]= qs[_0x453f[31]](_0x7b3ax2c[_0x453f[53]][_0x453f[31]])};return _0x7b3ax34[_0x453f[95]](_0x7b3ax1f)}})[_0x453f[40]](function(_0x7b3ax32){if(_0x7b3ax32){return _0x7b3ax32?{count:_0x7b3ax20,rows:_0x7b3ax32}:null}})[_0x453f[40]](respondWithResult(_0x7b3ax1c,null))[_0x453f[73]](handleError(_0x7b3ax1c,null))}
\ No newline at end of file
+var _0xbc2e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x54\x72\x69\x67\x67\x65\x72","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x61\x64\x64\x41\x6C\x6C\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x54\x72\x69\x67\x67\x65\x72\x41\x6C\x6C\x49\x64","\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x61\x64\x64\x41\x6E\x79\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x54\x72\x69\x67\x67\x65\x72\x41\x6E\x79\x49\x64","\x67\x65\x74\x41\x6C\x6C\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x41\x6E\x79\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E","\x54\x72\x69\x67\x67\x65\x72\x49\x64","\x41\x63\x74\x69\x6F\x6E","\x67\x65\x74\x41\x63\x74\x69\x6F\x6E\x73"];_0xbc2e[0];var jsonpatch=require(_0xbc2e[1]);var rp=require(_0xbc2e[2]);var moment=require(_0xbc2e[3]);var BPromise=require(_0xbc2e[4]);var Mustache=require(_0xbc2e[5]);var util=require(_0xbc2e[6]);var path=require(_0xbc2e[7]);var sox=require(_0xbc2e[8]);var csv=require(_0xbc2e[9]);var ejs=require(_0xbc2e[10]);var fs=require(_0xbc2e[11]);var _=require(_0xbc2e[12]);var squel=require(_0xbc2e[13]);var crypto=require(_0xbc2e[14]);var jsforce=require(_0xbc2e[15]);var deskjs=require(_0xbc2e[16]);var toCsv=require(_0xbc2e[9]);var querystring=require(_0xbc2e[17]);var Papa=require(_0xbc2e[18]);var qs=require(_0xbc2e[19]);var logger=require(_0xbc2e[21])(_0xbc2e[20]);var utils=require(_0xbc2e[22]);var config=require(_0xbc2e[23]);var db=require(_0xbc2e[25])[_0xbc2e[24]];function respondWithStatusCode(_0x1fefx1a,_0x1fefx1b){_0x1fefx1b= _0x1fefx1b|| 204;return function(_0x1fefx1c){if(_0x1fefx1c){return _0x1fefx1a[_0xbc2e[26]](_0x1fefx1b)};return _0x1fefx1a[_0xbc2e[28]](_0x1fefx1b)[_0xbc2e[27]]()}}function respondWithResult(_0x1fefx1a,_0x1fefx1b){_0x1fefx1b= _0x1fefx1b|| 200;return function(_0x1fefx1c){if(_0x1fefx1c){return _0x1fefx1a[_0xbc2e[28]](_0x1fefx1b)[_0xbc2e[29]](_0x1fefx1c)}}}function respondWithFilteredResult(_0x1fefx1a,_0x1fefx1f){return function(_0x1fefx1c){if(_0x1fefx1c){var _0x1fefx20=_0x1fefx1c[_0xbc2e[30]],_0x1fefx21=_0x1fefx1f[_0xbc2e[31]],_0x1fefx22=_0x1fefx1f[_0xbc2e[31]]+ _0x1fefx1f[_0xbc2e[32]],_0x1fefx1b;if(_0x1fefx22>= _0x1fefx20){_0x1fefx22= _0x1fefx20;_0x1fefx1b= 200}else {_0x1fefx1b= 206};_0x1fefx1a[_0xbc2e[28]](_0x1fefx1b);return _0x1fefx1a[_0xbc2e[36]](_0xbc2e[33],_0x1fefx21+ _0xbc2e[34]+ _0x1fefx22+ _0xbc2e[35]+ _0x1fefx20)[_0xbc2e[29]](_0x1fefx1c)};return null}}function patchUpdates(_0x1fefx24){return function(_0x1fefx1c){try{jsonpatch[_0xbc2e[37]](_0x1fefx1c,_0x1fefx24,true)}catch(err){return BPromise[_0xbc2e[38]](err)};return _0x1fefx1c[_0xbc2e[39]]()}}function saveUpdates(_0x1fefx26,_0x1fefx1b){return function(_0x1fefx1c){if(_0x1fefx1c){return _0x1fefx1c[_0xbc2e[41]](_0x1fefx26)[_0xbc2e[40]](function(_0x1fefx27){return _0x1fefx27})};return null}}function removeEntity(_0x1fefx1a,_0x1fefx1b){return function(_0x1fefx1c){if(_0x1fefx1c){return _0x1fefx1c[_0xbc2e[42]]()[_0xbc2e[40]](function(){_0x1fefx1a[_0xbc2e[28]](204)[_0xbc2e[27]]()})}}}function handleEntityNotFound(_0x1fefx1a,_0x1fefx1b){return function(_0x1fefx1c){if(!_0x1fefx1c){_0x1fefx1a[_0xbc2e[26]](404)};return _0x1fefx1c}}function handleError(_0x1fefx1a,_0x1fefx1b){_0x1fefx1b= _0x1fefx1b|| 500;return function(_0x1fefx2b){logger[_0xbc2e[44]](_0x1fefx2b[_0xbc2e[43]]);if(_0x1fefx2b[_0xbc2e[45]]){delete _0x1fefx2b[_0xbc2e[45]]};_0x1fefx1a[_0xbc2e[28]](_0x1fefx1b)[_0xbc2e[46]](_0x1fefx2b)}}exports[_0xbc2e[47]]= function(_0x1fefx2c,_0x1fefx1a){var _0x1fefx1f={},_0x1fefx2d={},_0x1fefx2e={count:0,rows:[]};_0x1fefx2d[_0xbc2e[48]]= _[_0xbc2e[51]](db[_0xbc2e[50]][_0xbc2e[49]]);var _0x1fefx2f={dateStart:_0x1fefx2c[_0xbc2e[53]][_0xbc2e[52]],dateEnd:_0x1fefx2c[_0xbc2e[53]][_0xbc2e[54]]};delete _0x1fefx2c[_0xbc2e[53]][_0xbc2e[52]];delete _0x1fefx2c[_0xbc2e[53]][_0xbc2e[54]];_0x1fefx2d[_0xbc2e[53]]= _[_0xbc2e[51]](_0x1fefx2c[_0xbc2e[53]]);_0x1fefx2d[_0xbc2e[55]]= _[_0xbc2e[56]](_0x1fefx2d[_0xbc2e[48]],_0x1fefx2d[_0xbc2e[53]]);_0x1fefx1f[_0xbc2e[57]]= _[_0xbc2e[56]](_0x1fefx2d[_0xbc2e[48]],qs[_0xbc2e[58]](_0x1fefx2c[_0xbc2e[53]][_0xbc2e[58]]));_0x1fefx1f[_0xbc2e[57]]= (_0x1fefx1f[_0xbc2e[57]][_0xbc2e[59]])?_0x1fefx1f[_0xbc2e[57]]:_0x1fefx2d[_0xbc2e[48]];if(!_0x1fefx2c[_0xbc2e[53]][_0xbc2e[61]](_0xbc2e[60])){_0x1fefx1f[_0xbc2e[32]]= qs[_0xbc2e[32]](_0x1fefx2c[_0xbc2e[53]][_0xbc2e[32]]);_0x1fefx1f[_0xbc2e[31]]= qs[_0xbc2e[31]](_0x1fefx2c[_0xbc2e[53]][_0xbc2e[31]])};_0x1fefx1f[_0xbc2e[62]]= qs[_0xbc2e[63]](_0x1fefx2c[_0xbc2e[53]][_0xbc2e[63]]);_0x1fefx1f[_0xbc2e[64]]= qs[_0xbc2e[55]](_[_0xbc2e[65]](_0x1fefx2c[_0xbc2e[53]],_0x1fefx2d[_0xbc2e[55]]));if(_0x1fefx2f[_0xbc2e[52]]){if(_0x1fefx2f[_0xbc2e[54]]){_0x1fefx2f[_0xbc2e[54]]= moment(_0x1fefx2f[_0xbc2e[54]])[_0xbc2e[67]](1,_0xbc2e[66])}else {_0x1fefx2f[_0xbc2e[54]]= moment(_0x1fefx2f[_0xbc2e[52]])[_0xbc2e[67]](1,_0xbc2e[66])};_[_0xbc2e[68]](_0x1fefx1f[_0xbc2e[64]],{createdAt:{$gte:_0x1fefx2f[_0xbc2e[52]],$lte:_0x1fefx2f[_0xbc2e[54]]}})};if(_0x1fefx2c[_0xbc2e[53]][_0xbc2e[69]]){_0x1fefx1f[_0xbc2e[64]]= _[_0xbc2e[68]](_0x1fefx1f[_0xbc2e[64]],{$or:_[_0xbc2e[71]](_0x1fefx1f[_0xbc2e[57]],function(_0x1fefx30){var _0x1fefx2e={};_0x1fefx2e[_0x1fefx30]= {$like:_0xbc2e[70]+ _0x1fefx2c[_0xbc2e[53]][_0xbc2e[69]]+ _0xbc2e[70]};return _0x1fefx2e})})};_0x1fefx1f= _[_0xbc2e[68]]({},_0x1fefx1f,_0x1fefx2c[_0xbc2e[72]]);var _0x1fefx31={where:_0x1fefx1f[_0xbc2e[64]]};return db[_0xbc2e[50]][_0xbc2e[30]](_0x1fefx31)[_0xbc2e[40]](function(_0x1fefx20){_0x1fefx2e[_0xbc2e[30]]= _0x1fefx20;if(_0x1fefx2c[_0xbc2e[53]][_0xbc2e[75]]){_0x1fefx1f[_0xbc2e[76]]= [{all:true}]};return db[_0xbc2e[50]][_0xbc2e[77]](_0x1fefx1f)})[_0xbc2e[40]](function(_0x1fefx32){_0x1fefx2e[_0xbc2e[74]]= _0x1fefx32;return _0x1fefx2e})[_0xbc2e[40]](respondWithFilteredResult(_0x1fefx1a,_0x1fefx1f))[_0xbc2e[73]](handleError(_0x1fefx1a,null))};exports[_0xbc2e[78]]= function(_0x1fefx2c,_0x1fefx1a){var _0x1fefx1f={raw:false,where:{id:_0x1fefx2c[_0xbc2e[80]][_0xbc2e[79]]}},_0x1fefx2d={};_0x1fefx2d[_0xbc2e[48]]= _[_0xbc2e[51]](db[_0xbc2e[50]][_0xbc2e[49]]);_0x1fefx2d[_0xbc2e[53]]= _[_0xbc2e[51]](_0x1fefx2c[_0xbc2e[53]]);_0x1fefx2d[_0xbc2e[55]]= _[_0xbc2e[56]](_0x1fefx2d[_0xbc2e[48]],_0x1fefx2d[_0xbc2e[53]]);_0x1fefx1f[_0xbc2e[57]]= _[_0xbc2e[56]](_0x1fefx2d[_0xbc2e[48]],qs[_0xbc2e[58]](_0x1fefx2c[_0xbc2e[53]][_0xbc2e[58]]));_0x1fefx1f[_0xbc2e[57]]= (_0x1fefx1f[_0xbc2e[57]][_0xbc2e[59]])?_0x1fefx1f[_0xbc2e[57]]:_0x1fefx2d[_0xbc2e[48]];if(_0x1fefx2c[_0xbc2e[53]][_0xbc2e[75]]){_0x1fefx1f[_0xbc2e[76]]= [{all:true}]};_0x1fefx1f= _[_0xbc2e[68]]({},_0x1fefx1f,_0x1fefx2c[_0xbc2e[72]]);return db[_0xbc2e[50]][_0xbc2e[81]](_0x1fefx1f)[_0xbc2e[40]](handleEntityNotFound(_0x1fefx1a,null))[_0xbc2e[40]](respondWithResult(_0x1fefx1a,null))[_0xbc2e[73]](handleError(_0x1fefx1a,null))};exports[_0xbc2e[82]]= function(_0x1fefx2c,_0x1fefx1a){return db[_0xbc2e[50]][_0xbc2e[82]](_0x1fefx2c[_0xbc2e[83]],{})[_0xbc2e[40]](respondWithResult(_0x1fefx1a,201))[_0xbc2e[73]](handleError(_0x1fefx1a,null))};exports[_0xbc2e[41]]= function(_0x1fefx2c,_0x1fefx1a){if(_0x1fefx2c[_0xbc2e[83]][_0xbc2e[79]]){delete _0x1fefx2c[_0xbc2e[83]][_0xbc2e[79]]};return db[_0xbc2e[50]][_0xbc2e[81]]({where:{id:_0x1fefx2c[_0xbc2e[80]][_0xbc2e[79]]}})[_0xbc2e[40]](handleEntityNotFound(_0x1fefx1a,null))[_0xbc2e[40]](saveUpdates(_0x1fefx2c[_0xbc2e[83]],null))[_0xbc2e[40]](respondWithResult(_0x1fefx1a,null))[_0xbc2e[73]](handleError(_0x1fefx1a,null))};exports[_0xbc2e[42]]= function(_0x1fefx2c,_0x1fefx1a){return db[_0xbc2e[50]][_0xbc2e[81]]({where:{id:_0x1fefx2c[_0xbc2e[80]][_0xbc2e[79]]}})[_0xbc2e[40]](handleEntityNotFound(_0x1fefx1a,null))[_0xbc2e[40]](removeEntity(_0x1fefx1a,null))[_0xbc2e[73]](handleError(_0x1fefx1a,null))};exports[_0xbc2e[84]]= function(_0x1fefx2c,_0x1fefx1a,_0x1fefx33){if(_0x1fefx2c[_0xbc2e[83]][_0xbc2e[79]]){delete _0x1fefx2c[_0xbc2e[83]][_0xbc2e[79]]};return db[_0xbc2e[50]][_0xbc2e[81]]({where:{id:_0x1fefx2c[_0xbc2e[80]][_0xbc2e[79]]}})[_0xbc2e[40]](handleEntityNotFound(_0x1fefx1a,null))[_0xbc2e[40]](function(_0x1fefx1c){if(_0x1fefx1c){_0x1fefx2c[_0xbc2e[83]][_0xbc2e[85]]= _0x1fefx1c[_0xbc2e[79]];return db[_0xbc2e[86]][_0xbc2e[82]](_0x1fefx2c[_0xbc2e[83]])}})[_0xbc2e[40]](respondWithResult(_0x1fefx1a,null))[_0xbc2e[73]](handleError(_0x1fefx1a,null))};exports[_0xbc2e[87]]= function(_0x1fefx2c,_0x1fefx1a,_0x1fefx33){if(_0x1fefx2c[_0xbc2e[83]][_0xbc2e[79]]){delete _0x1fefx2c[_0xbc2e[83]][_0xbc2e[79]]};return db[_0xbc2e[50]][_0xbc2e[81]]({where:{id:_0x1fefx2c[_0xbc2e[80]][_0xbc2e[79]]}})[_0xbc2e[40]](handleEntityNotFound(_0x1fefx1a,null))[_0xbc2e[40]](function(_0x1fefx1c){if(_0x1fefx1c){_0x1fefx2c[_0xbc2e[83]][_0xbc2e[88]]= _0x1fefx1c[_0xbc2e[79]];return db[_0xbc2e[86]][_0xbc2e[82]](_0x1fefx2c[_0xbc2e[83]])}})[_0xbc2e[40]](respondWithResult(_0x1fefx1a,null))[_0xbc2e[73]](handleError(_0x1fefx1a,null))};exports[_0xbc2e[89]]= function(_0x1fefx2c,_0x1fefx1c,_0x1fefx33){var _0x1fefx1f={};var _0x1fefx2d={};var _0x1fefx34;var _0x1fefx20;return db[_0xbc2e[50]][_0xbc2e[90]]({where:{id:_0x1fefx2c[_0xbc2e[80]][_0xbc2e[79]]}})[_0xbc2e[40]](handleEntityNotFound(_0x1fefx1c,null))[_0xbc2e[40]](function(_0x1fefx1c){if(_0x1fefx1c){_0x1fefx34= _0x1fefx1c;_0x1fefx2d[_0xbc2e[48]]= _[_0xbc2e[51]](db[_0xbc2e[86]][_0xbc2e[49]]);_0x1fefx2d[_0xbc2e[53]]= _[_0xbc2e[51]](_0x1fefx2c[_0xbc2e[53]]);_0x1fefx2d[_0xbc2e[55]]= _[_0xbc2e[56]](_0x1fefx2d[_0xbc2e[48]],_0x1fefx2d[_0xbc2e[53]]);_0x1fefx1f[_0xbc2e[57]]= _[_0xbc2e[56]](_0x1fefx2d[_0xbc2e[48]],qs[_0xbc2e[58]](_0x1fefx2c[_0xbc2e[53]][_0xbc2e[58]]));_0x1fefx1f[_0xbc2e[57]]= (_0x1fefx1f[_0xbc2e[57]][_0xbc2e[59]])?_0x1fefx1f[_0xbc2e[57]]:_0x1fefx2d[_0xbc2e[48]];_0x1fefx1f[_0xbc2e[62]]= qs[_0xbc2e[63]](_0x1fefx2c[_0xbc2e[53]][_0xbc2e[63]]);_0x1fefx1f[_0xbc2e[64]]= qs[_0xbc2e[55]](_[_0xbc2e[65]](_0x1fefx2c[_0xbc2e[53]],_0x1fefx2d[_0xbc2e[55]]));if(_0x1fefx2c[_0xbc2e[53]][_0xbc2e[69]]){_0x1fefx1f[_0xbc2e[64]]= _[_0xbc2e[68]](_0x1fefx1f[_0xbc2e[64]],{$or:_[_0xbc2e[71]](_0x1fefx1f[_0xbc2e[57]],function(_0x1fefx30){var _0x1fefx2e={};_0x1fefx2e[_0x1fefx30]= {$like:_0xbc2e[70]+ _0x1fefx2c[_0xbc2e[53]][_0xbc2e[69]]+ _0xbc2e[70]};return _0x1fefx2e})})};_0x1fefx1f= _[_0xbc2e[68]]({},_0x1fefx1f,_0x1fefx2c[_0xbc2e[72]]);return _0x1fefx34[_0xbc2e[89]](_0x1fefx1f)}})[_0xbc2e[40]](function(_0x1fefx35){if(_0x1fefx35){_0x1fefx20= _0x1fefx35[_0xbc2e[59]];if(!_0x1fefx2c[_0xbc2e[53]][_0xbc2e[61]](_0xbc2e[60])){_0x1fefx1f[_0xbc2e[32]]= qs[_0xbc2e[32]](_0x1fefx2c[_0xbc2e[53]][_0xbc2e[32]]);_0x1fefx1f[_0xbc2e[31]]= qs[_0xbc2e[31]](_0x1fefx2c[_0xbc2e[53]][_0xbc2e[31]])};return _0x1fefx34[_0xbc2e[89]](_0x1fefx1f)}})[_0xbc2e[40]](function(_0x1fefx32){if(_0x1fefx32){return _0x1fefx32?{count:_0x1fefx20,rows:_0x1fefx32}:null}})[_0xbc2e[40]](respondWithResult(_0x1fefx1c,null))[_0xbc2e[73]](handleError(_0x1fefx1c,null))};exports[_0xbc2e[91]]= function(_0x1fefx2c,_0x1fefx1c,_0x1fefx33){var _0x1fefx1f={};var _0x1fefx2d={};var _0x1fefx34;var _0x1fefx20;return db[_0xbc2e[50]][_0xbc2e[90]]({where:{id:_0x1fefx2c[_0xbc2e[80]][_0xbc2e[79]]}})[_0xbc2e[40]](handleEntityNotFound(_0x1fefx1c,null))[_0xbc2e[40]](function(_0x1fefx1c){if(_0x1fefx1c){_0x1fefx34= _0x1fefx1c;_0x1fefx2d[_0xbc2e[48]]= _[_0xbc2e[51]](db[_0xbc2e[86]][_0xbc2e[49]]);_0x1fefx2d[_0xbc2e[53]]= _[_0xbc2e[51]](_0x1fefx2c[_0xbc2e[53]]);_0x1fefx2d[_0xbc2e[55]]= _[_0xbc2e[56]](_0x1fefx2d[_0xbc2e[48]],_0x1fefx2d[_0xbc2e[53]]);_0x1fefx1f[_0xbc2e[57]]= _[_0xbc2e[56]](_0x1fefx2d[_0xbc2e[48]],qs[_0xbc2e[58]](_0x1fefx2c[_0xbc2e[53]][_0xbc2e[58]]));_0x1fefx1f[_0xbc2e[57]]= (_0x1fefx1f[_0xbc2e[57]][_0xbc2e[59]])?_0x1fefx1f[_0xbc2e[57]]:_0x1fefx2d[_0xbc2e[48]];_0x1fefx1f[_0xbc2e[62]]= qs[_0xbc2e[63]](_0x1fefx2c[_0xbc2e[53]][_0xbc2e[63]]);_0x1fefx1f[_0xbc2e[64]]= qs[_0xbc2e[55]](_[_0xbc2e[65]](_0x1fefx2c[_0xbc2e[53]],_0x1fefx2d[_0xbc2e[55]]));if(_0x1fefx2c[_0xbc2e[53]][_0xbc2e[69]]){_0x1fefx1f[_0xbc2e[64]]= _[_0xbc2e[68]](_0x1fefx1f[_0xbc2e[64]],{$or:_[_0xbc2e[71]](_0x1fefx1f[_0xbc2e[57]],function(_0x1fefx30){var _0x1fefx2e={};_0x1fefx2e[_0x1fefx30]= {$like:_0xbc2e[70]+ _0x1fefx2c[_0xbc2e[53]][_0xbc2e[69]]+ _0xbc2e[70]};return _0x1fefx2e})})};_0x1fefx1f= _[_0xbc2e[68]]({},_0x1fefx1f,_0x1fefx2c[_0xbc2e[72]]);return _0x1fefx34[_0xbc2e[91]](_0x1fefx1f)}})[_0xbc2e[40]](function(_0x1fefx35){if(_0x1fefx35){_0x1fefx20= _0x1fefx35[_0xbc2e[59]];if(!_0x1fefx2c[_0xbc2e[53]][_0xbc2e[61]](_0xbc2e[60])){_0x1fefx1f[_0xbc2e[32]]= qs[_0xbc2e[32]](_0x1fefx2c[_0xbc2e[53]][_0xbc2e[32]]);_0x1fefx1f[_0xbc2e[31]]= qs[_0xbc2e[31]](_0x1fefx2c[_0xbc2e[53]][_0xbc2e[31]])};return _0x1fefx34[_0xbc2e[91]](_0x1fefx1f)}})[_0xbc2e[40]](function(_0x1fefx32){if(_0x1fefx32){return _0x1fefx32?{count:_0x1fefx20,rows:_0x1fefx32}:null}})[_0xbc2e[40]](respondWithResult(_0x1fefx1c,null))[_0xbc2e[73]](handleError(_0x1fefx1c,null))};exports[_0xbc2e[92]]= function(_0x1fefx2c,_0x1fefx1a,_0x1fefx33){if(_0x1fefx2c[_0xbc2e[83]][_0xbc2e[79]]){delete _0x1fefx2c[_0xbc2e[83]][_0xbc2e[79]]};return db[_0xbc2e[50]][_0xbc2e[81]]({where:{id:_0x1fefx2c[_0xbc2e[80]][_0xbc2e[79]]}})[_0xbc2e[40]](handleEntityNotFound(_0x1fefx1a,null))[_0xbc2e[40]](function(_0x1fefx1c){if(_0x1fefx1c){_0x1fefx2c[_0xbc2e[83]][_0xbc2e[93]]= _0x1fefx1c[_0xbc2e[79]];return db[_0xbc2e[94]][_0xbc2e[82]](_0x1fefx2c[_0xbc2e[83]])}})[_0xbc2e[40]](respondWithResult(_0x1fefx1a,null))[_0xbc2e[73]](handleError(_0x1fefx1a,null))};exports[_0xbc2e[95]]= function(_0x1fefx2c,_0x1fefx1c,_0x1fefx33){var _0x1fefx1f={};var _0x1fefx2d={};var _0x1fefx34;var _0x1fefx20;return db[_0xbc2e[50]][_0xbc2e[90]]({where:{id:_0x1fefx2c[_0xbc2e[80]][_0xbc2e[79]]}})[_0xbc2e[40]](handleEntityNotFound(_0x1fefx1c,null))[_0xbc2e[40]](function(_0x1fefx1c){if(_0x1fefx1c){_0x1fefx34= _0x1fefx1c;_0x1fefx2d[_0xbc2e[48]]= _[_0xbc2e[51]](db[_0xbc2e[94]][_0xbc2e[49]]);_0x1fefx2d[_0xbc2e[53]]= _[_0xbc2e[51]](_0x1fefx2c[_0xbc2e[53]]);_0x1fefx2d[_0xbc2e[55]]= _[_0xbc2e[56]](_0x1fefx2d[_0xbc2e[48]],_0x1fefx2d[_0xbc2e[53]]);_0x1fefx1f[_0xbc2e[57]]= _[_0xbc2e[56]](_0x1fefx2d[_0xbc2e[48]],qs[_0xbc2e[58]](_0x1fefx2c[_0xbc2e[53]][_0xbc2e[58]]));_0x1fefx1f[_0xbc2e[57]]= (_0x1fefx1f[_0xbc2e[57]][_0xbc2e[59]])?_0x1fefx1f[_0xbc2e[57]]:_0x1fefx2d[_0xbc2e[48]];_0x1fefx1f[_0xbc2e[62]]= qs[_0xbc2e[63]](_0x1fefx2c[_0xbc2e[53]][_0xbc2e[63]]);_0x1fefx1f[_0xbc2e[64]]= qs[_0xbc2e[55]](_[_0xbc2e[65]](_0x1fefx2c[_0xbc2e[53]],_0x1fefx2d[_0xbc2e[55]]));if(_0x1fefx2c[_0xbc2e[53]][_0xbc2e[69]]){_0x1fefx1f[_0xbc2e[64]]= _[_0xbc2e[68]](_0x1fefx1f[_0xbc2e[64]],{$or:_[_0xbc2e[71]](_0x1fefx1f[_0xbc2e[57]],function(_0x1fefx30){var _0x1fefx2e={};_0x1fefx2e[_0x1fefx30]= {$like:_0xbc2e[70]+ _0x1fefx2c[_0xbc2e[53]][_0xbc2e[69]]+ _0xbc2e[70]};return _0x1fefx2e})})};_0x1fefx1f= _[_0xbc2e[68]]({},_0x1fefx1f,_0x1fefx2c[_0xbc2e[72]]);return _0x1fefx34[_0xbc2e[95]](_0x1fefx1f)}})[_0xbc2e[40]](function(_0x1fefx35){if(_0x1fefx35){_0x1fefx20= _0x1fefx35[_0xbc2e[59]];if(!_0x1fefx2c[_0xbc2e[53]][_0xbc2e[61]](_0xbc2e[60])){_0x1fefx1f[_0xbc2e[32]]= qs[_0xbc2e[32]](_0x1fefx2c[_0xbc2e[53]][_0xbc2e[32]]);_0x1fefx1f[_0xbc2e[31]]= qs[_0xbc2e[31]](_0x1fefx2c[_0xbc2e[53]][_0xbc2e[31]])};return _0x1fefx34[_0xbc2e[95]](_0x1fefx1f)}})[_0xbc2e[40]](function(_0x1fefx32){if(_0x1fefx32){return _0x1fefx32?{count:_0x1fefx20,rows:_0x1fefx32}:null}})[_0xbc2e[40]](respondWithResult(_0x1fefx1c,null))[_0xbc2e[73]](handleError(_0x1fefx1c,null))}
\ No newline at end of file
index 68893ba..779e380 100644 (file)
@@ -1 +1 @@
-var _0xf373=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x74\x72\x69\x67\x67\x65\x72\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x54\x72\x69\x67\x67\x65\x72","\x74\x6F\x6F\x6C\x73\x5F\x74\x72\x69\x67\x67\x65\x72\x73","\x64\x65\x66\x69\x6E\x65"];_0xf373[0];var _=require(_0xf373[1]);var util=require(_0xf373[2]);var logger=require(_0xf373[4])(_0xf373[3]);var moment=require(_0xf373[5]);var BPromise=require(_0xf373[6]);var rp=require(_0xf373[7]);var attributes=require(_0xf373[8]);module[_0xf373[9]]= function(_0x6d03x8,_0x6d03x9){return _0x6d03x8[_0xf373[12]](_0xf373[10],attributes,{tableName:_0xf373[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x45e8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x74\x72\x69\x67\x67\x65\x72\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x54\x72\x69\x67\x67\x65\x72","\x74\x6F\x6F\x6C\x73\x5F\x74\x72\x69\x67\x67\x65\x72\x73","\x64\x65\x66\x69\x6E\x65"];_0x45e8[0];var _=require(_0x45e8[1]);var util=require(_0x45e8[2]);var logger=require(_0x45e8[4])(_0x45e8[3]);var moment=require(_0x45e8[5]);var BPromise=require(_0x45e8[6]);var rp=require(_0x45e8[7]);var attributes=require(_0x45e8[8]);module[_0x45e8[9]]= function(_0x22b8x8,_0x22b8x9){return _0x22b8x8[_0x45e8[12]](_0x45e8[10],attributes,{tableName:_0x45e8[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 2847d86..fe8e5bf 100644 (file)
@@ -1 +1 @@
-var _0x48a5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x54\x72\x69\x67\x67\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x54\x72\x69\x67\x67\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x54\x72\x69\x67\x67\x65\x72","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x54\x72\x69\x67\x67\x65\x72","\x53\x68\x6F\x77\x54\x72\x69\x67\x67\x65\x72","\x66\x69\x6E\x64"];_0x48a5[0];var _=require(_0x48a5[1]);var util=require(_0x48a5[2]);var moment=require(_0x48a5[3]);var BPromise=require(_0x48a5[4]);var rs=require(_0x48a5[5]);var fs=require(_0x48a5[6]);var db=require(_0x48a5[8])[_0x48a5[7]];var utils=require(_0x48a5[9]);var logger=require(_0x48a5[11])(_0x48a5[10]);var config=require(_0x48a5[12]);var jayson=require(_0x48a5[13]);var client=jayson[_0x48a5[15]][_0x48a5[14]]({port:9002});function respondWithRpcPromise(_0xc8eaxe,_0xc8eaxf,_0xc8eax10){return  new BPromise(function(_0xc8eax11,_0xc8eax12){return client[_0x48a5[28]](_0xc8eaxe,_0xc8eax10)[_0x48a5[27]](function(_0xc8eax14){logger[_0x48a5[20]](_0x48a5[16],_0xc8eaxf,_0x48a5[19]);logger[_0x48a5[23]](_0x48a5[21],_0xc8eaxf,_0x48a5[19],JSON[_0x48a5[22]](_0xc8eax14));if(_0xc8eax14[_0x48a5[17]]){if(_0xc8eax14[_0x48a5[17]][_0x48a5[24]]=== 500){logger[_0x48a5[17]](_0x48a5[16],_0xc8eaxf,_0xc8eax14[_0x48a5[17]][_0x48a5[25]]);return _0xc8eax12(_0xc8eax14[_0x48a5[17]][_0x48a5[25]])};logger[_0x48a5[17]](_0x48a5[16],_0xc8eaxf,_0xc8eax14[_0x48a5[17]][_0x48a5[25]]);return _0xc8eax11(_0xc8eax14[_0x48a5[17]][_0x48a5[25]])}else {logger[_0x48a5[20]](_0x48a5[16],_0xc8eaxf,_0x48a5[19]);_0xc8eax11(_0xc8eax14[_0x48a5[26]][_0x48a5[25]])}})[_0x48a5[18]](function(_0xc8eax13){logger[_0x48a5[17]](_0x48a5[16],_0xc8eaxf,_0xc8eax13);_0xc8eax12(_0xc8eax13)})})}exports[_0x48a5[29]]= function(_0xc8eax10){var _0xc8eax15=this;return  new Promise(function(_0xc8eax11,_0xc8eax12){return db[_0x48a5[40]][_0x48a5[39]]({raw:_0xc8eax10[_0x48a5[30]]?(_0xc8eax10[_0x48a5[30]][_0x48a5[31]]=== undefined)?true:false:true,where:_0xc8eax10[_0x48a5[30]]?_0xc8eax10[_0x48a5[30]][_0x48a5[32]]|| null:null,attributes:_0xc8eax10[_0x48a5[30]]?_0xc8eax10[_0x48a5[30]][_0x48a5[33]]|| null:null,limit:_0xc8eax10[_0x48a5[30]]?_0xc8eax10[_0x48a5[30]][_0x48a5[34]]|| null:null,include:_0xc8eax10[_0x48a5[30]]?(_0xc8eax10[_0x48a5[30]][_0x48a5[35]]?_[_0x48a5[38]](_0xc8eax10[_0x48a5[30]][_0x48a5[35]],function(_0xc8eax16){return {model:db[_0xc8eax16[_0x48a5[36]]],as:_0xc8eax16[_0x48a5[37]],attributes:_0xc8eax16[_0x48a5[33]],include:_0xc8eax16[_0x48a5[35]]?_[_0x48a5[38]](_0xc8eax16[_0x48a5[35]],function(_0xc8eax17){return {model:db[_0xc8eax17[_0x48a5[36]]],as:_0xc8eax17[_0x48a5[37]],attributes:_0xc8eax17[_0x48a5[33]],include:_0xc8eax17[_0x48a5[35]]?_[_0x48a5[38]](_0xc8eax17[_0x48a5[35]],function(_0xc8eax18){return {model:db[_0xc8eax18[_0x48a5[36]]],as:_0xc8eax18[_0x48a5[37]],attributes:_0xc8eax18[_0x48a5[33]]}}):[]}}):[]}}):[]):[]})[_0x48a5[27]](function(_0xc8eax14){logger[_0x48a5[20]](_0x48a5[29],_0xc8eax10);logger[_0x48a5[23]](_0x48a5[29],_0xc8eax10,JSON[_0x48a5[22]](_0xc8eax14));_0xc8eax11(_0xc8eax14)})[_0x48a5[18]](function(_0xc8eax13){logger[_0x48a5[17]](_0x48a5[29],_0xc8eax13[_0x48a5[25]],_0xc8eax10);_0xc8eax12(_0xc8eax15[_0x48a5[17]](500,_0xc8eax13[_0x48a5[25]]))})})};exports[_0x48a5[41]]= function(_0xc8eax10){var _0xc8eax15=this;return  new Promise(function(_0xc8eax11,_0xc8eax12){return db[_0x48a5[40]][_0x48a5[42]]({raw:_0xc8eax10[_0x48a5[30]]?(_0xc8eax10[_0x48a5[30]][_0x48a5[31]]=== undefined)?true:false:true,where:_0xc8eax10[_0x48a5[30]]?_0xc8eax10[_0x48a5[30]][_0x48a5[32]]|| null:null,attributes:_0xc8eax10[_0x48a5[30]]?_0xc8eax10[_0x48a5[30]][_0x48a5[33]]|| null:null,include:_0xc8eax10[_0x48a5[30]]?(_0xc8eax10[_0x48a5[30]][_0x48a5[35]]?_[_0x48a5[38]](_0xc8eax10[_0x48a5[30]][_0x48a5[35]],function(_0xc8eax16){return {model:db[_0xc8eax16[_0x48a5[36]]],as:_0xc8eax16[_0x48a5[37]],attributes:_0xc8eax16[_0x48a5[33]],include:_0xc8eax16[_0x48a5[35]]?_[_0x48a5[38]](_0xc8eax16[_0x48a5[35]],function(_0xc8eax17){return {model:db[_0xc8eax17[_0x48a5[36]]],as:_0xc8eax17[_0x48a5[37]],attributes:_0xc8eax17[_0x48a5[33]],include:_0xc8eax17[_0x48a5[35]]?_[_0x48a5[38]](_0xc8eax17[_0x48a5[35]],function(_0xc8eax18){return {model:db[_0xc8eax18[_0x48a5[36]]],as:_0xc8eax18[_0x48a5[37]],attributes:_0xc8eax18[_0x48a5[33]]}}):[]}}):[]}}):[]):[]})[_0x48a5[27]](function(_0xc8eax14){logger[_0x48a5[20]](_0x48a5[41],_0xc8eax10);logger[_0x48a5[23]](_0x48a5[41],_0xc8eax10,JSON[_0x48a5[22]](_0xc8eax14));_0xc8eax11(_0xc8eax14)})[_0x48a5[18]](function(_0xc8eax13){logger[_0x48a5[17]](_0x48a5[41],_0xc8eax13[_0x48a5[25]],_0xc8eax10);_0xc8eax12(_0xc8eax15[_0x48a5[17]](500,_0xc8eax13[_0x48a5[25]]))})})}
\ No newline at end of file
+var _0xca52=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x54\x72\x69\x67\x67\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x54\x72\x69\x67\x67\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x54\x72\x69\x67\x67\x65\x72","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x54\x72\x69\x67\x67\x65\x72","\x53\x68\x6F\x77\x54\x72\x69\x67\x67\x65\x72","\x66\x69\x6E\x64"];_0xca52[0];var _=require(_0xca52[1]);var util=require(_0xca52[2]);var moment=require(_0xca52[3]);var BPromise=require(_0xca52[4]);var rs=require(_0xca52[5]);var fs=require(_0xca52[6]);var db=require(_0xca52[8])[_0xca52[7]];var utils=require(_0xca52[9]);var logger=require(_0xca52[11])(_0xca52[10]);var config=require(_0xca52[12]);var jayson=require(_0xca52[13]);var client=jayson[_0xca52[15]][_0xca52[14]]({port:9002});function respondWithRpcPromise(_0xf038xe,_0xf038xf,_0xf038x10){return  new BPromise(function(_0xf038x11,_0xf038x12){return client[_0xca52[28]](_0xf038xe,_0xf038x10)[_0xca52[27]](function(_0xf038x14){logger[_0xca52[20]](_0xca52[16],_0xf038xf,_0xca52[19]);logger[_0xca52[23]](_0xca52[21],_0xf038xf,_0xca52[19],JSON[_0xca52[22]](_0xf038x14));if(_0xf038x14[_0xca52[17]]){if(_0xf038x14[_0xca52[17]][_0xca52[24]]=== 500){logger[_0xca52[17]](_0xca52[16],_0xf038xf,_0xf038x14[_0xca52[17]][_0xca52[25]]);return _0xf038x12(_0xf038x14[_0xca52[17]][_0xca52[25]])};logger[_0xca52[17]](_0xca52[16],_0xf038xf,_0xf038x14[_0xca52[17]][_0xca52[25]]);return _0xf038x11(_0xf038x14[_0xca52[17]][_0xca52[25]])}else {logger[_0xca52[20]](_0xca52[16],_0xf038xf,_0xca52[19]);_0xf038x11(_0xf038x14[_0xca52[26]][_0xca52[25]])}})[_0xca52[18]](function(_0xf038x13){logger[_0xca52[17]](_0xca52[16],_0xf038xf,_0xf038x13);_0xf038x12(_0xf038x13)})})}exports[_0xca52[29]]= function(_0xf038x10){var _0xf038x15=this;return  new Promise(function(_0xf038x11,_0xf038x12){return db[_0xca52[40]][_0xca52[39]]({raw:_0xf038x10[_0xca52[30]]?(_0xf038x10[_0xca52[30]][_0xca52[31]]=== undefined)?true:false:true,where:_0xf038x10[_0xca52[30]]?_0xf038x10[_0xca52[30]][_0xca52[32]]|| null:null,attributes:_0xf038x10[_0xca52[30]]?_0xf038x10[_0xca52[30]][_0xca52[33]]|| null:null,limit:_0xf038x10[_0xca52[30]]?_0xf038x10[_0xca52[30]][_0xca52[34]]|| null:null,include:_0xf038x10[_0xca52[30]]?(_0xf038x10[_0xca52[30]][_0xca52[35]]?_[_0xca52[38]](_0xf038x10[_0xca52[30]][_0xca52[35]],function(_0xf038x16){return {model:db[_0xf038x16[_0xca52[36]]],as:_0xf038x16[_0xca52[37]],attributes:_0xf038x16[_0xca52[33]],include:_0xf038x16[_0xca52[35]]?_[_0xca52[38]](_0xf038x16[_0xca52[35]],function(_0xf038x17){return {model:db[_0xf038x17[_0xca52[36]]],as:_0xf038x17[_0xca52[37]],attributes:_0xf038x17[_0xca52[33]],include:_0xf038x17[_0xca52[35]]?_[_0xca52[38]](_0xf038x17[_0xca52[35]],function(_0xf038x18){return {model:db[_0xf038x18[_0xca52[36]]],as:_0xf038x18[_0xca52[37]],attributes:_0xf038x18[_0xca52[33]]}}):[]}}):[]}}):[]):[]})[_0xca52[27]](function(_0xf038x14){logger[_0xca52[20]](_0xca52[29],_0xf038x10);logger[_0xca52[23]](_0xca52[29],_0xf038x10,JSON[_0xca52[22]](_0xf038x14));_0xf038x11(_0xf038x14)})[_0xca52[18]](function(_0xf038x13){logger[_0xca52[17]](_0xca52[29],_0xf038x13[_0xca52[25]],_0xf038x10);_0xf038x12(_0xf038x15[_0xca52[17]](500,_0xf038x13[_0xca52[25]]))})})};exports[_0xca52[41]]= function(_0xf038x10){var _0xf038x15=this;return  new Promise(function(_0xf038x11,_0xf038x12){return db[_0xca52[40]][_0xca52[42]]({raw:_0xf038x10[_0xca52[30]]?(_0xf038x10[_0xca52[30]][_0xca52[31]]=== undefined)?true:false:true,where:_0xf038x10[_0xca52[30]]?_0xf038x10[_0xca52[30]][_0xca52[32]]|| null:null,attributes:_0xf038x10[_0xca52[30]]?_0xf038x10[_0xca52[30]][_0xca52[33]]|| null:null,include:_0xf038x10[_0xca52[30]]?(_0xf038x10[_0xca52[30]][_0xca52[35]]?_[_0xca52[38]](_0xf038x10[_0xca52[30]][_0xca52[35]],function(_0xf038x16){return {model:db[_0xf038x16[_0xca52[36]]],as:_0xf038x16[_0xca52[37]],attributes:_0xf038x16[_0xca52[33]],include:_0xf038x16[_0xca52[35]]?_[_0xca52[38]](_0xf038x16[_0xca52[35]],function(_0xf038x17){return {model:db[_0xf038x17[_0xca52[36]]],as:_0xf038x17[_0xca52[37]],attributes:_0xf038x17[_0xca52[33]],include:_0xf038x17[_0xca52[35]]?_[_0xca52[38]](_0xf038x17[_0xca52[35]],function(_0xf038x18){return {model:db[_0xf038x18[_0xca52[36]]],as:_0xf038x18[_0xca52[37]],attributes:_0xf038x18[_0xca52[33]]}}):[]}}):[]}}):[]):[]})[_0xca52[27]](function(_0xf038x14){logger[_0xca52[20]](_0xca52[41],_0xf038x10);logger[_0xca52[23]](_0xca52[41],_0xf038x10,JSON[_0xca52[22]](_0xf038x14));_0xf038x11(_0xf038x14)})[_0xca52[18]](function(_0xf038x13){logger[_0xca52[17]](_0xca52[41],_0xf038x13[_0xca52[25]],_0xf038x10);_0xf038x12(_0xf038x15[_0xca52[17]](500,_0xf038x13[_0xca52[25]]))})})}
\ No newline at end of file
index 1c0ecab..9f88934 100644 (file)
@@ -1 +1 @@
-var _0x98c4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x74\x72\x75\x6E\x6B\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x98c4[0];var multer=require(_0x98c4[1]);var util=require(_0x98c4[2]);var path=require(_0x98c4[3]);var express=require(_0x98c4[4]);var router=express.Router();var auth=require(_0x98c4[5]);var interaction=require(_0x98c4[6]);var config=require(_0x98c4[7]);var controller=require(_0x98c4[8]);router[_0x98c4[12]](_0x98c4[9],auth[_0x98c4[10]](),controller[_0x98c4[11]]);router[_0x98c4[12]](_0x98c4[13],auth[_0x98c4[10]](),controller[_0x98c4[14]]);router[_0x98c4[16]](_0x98c4[9],auth[_0x98c4[10]](),controller[_0x98c4[15]]);router[_0x98c4[18]](_0x98c4[13],auth[_0x98c4[10]](),controller[_0x98c4[17]]);router[_0x98c4[20]](_0x98c4[13],auth[_0x98c4[10]](),controller[_0x98c4[19]]);module[_0x98c4[21]]= router
\ No newline at end of file
+var _0x2c86=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x74\x72\x75\x6E\x6B\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2c86[0];var multer=require(_0x2c86[1]);var util=require(_0x2c86[2]);var path=require(_0x2c86[3]);var express=require(_0x2c86[4]);var router=express.Router();var auth=require(_0x2c86[5]);var interaction=require(_0x2c86[6]);var config=require(_0x2c86[7]);var controller=require(_0x2c86[8]);router[_0x2c86[12]](_0x2c86[9],auth[_0x2c86[10]](),controller[_0x2c86[11]]);router[_0x2c86[12]](_0x2c86[13],auth[_0x2c86[10]](),controller[_0x2c86[14]]);router[_0x2c86[16]](_0x2c86[9],auth[_0x2c86[10]](),controller[_0x2c86[15]]);router[_0x2c86[18]](_0x2c86[13],auth[_0x2c86[10]](),controller[_0x2c86[17]]);router[_0x2c86[20]](_0x2c86[13],auth[_0x2c86[10]](),controller[_0x2c86[19]]);module[_0x2c86[21]]= router
\ No newline at end of file
index 0a53009..350df1b 100644 (file)
@@ -1 +1 @@
-var _0x12ea=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x66\x72\x69\x65\x6E\x64","\x75\x73\x65\x72","\x70\x65\x65\x72","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x70\x2D\x70\x72\x6F\x76\x69\x64\x65\x72","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x4E\x4F\x54\x5F\x53\x43\x52\x45\x45\x4E\x45\x44","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x50\x41\x53\x53\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x46\x41\x49\x4C\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x41\x4C\x4C\x4F\x57\x45\x44","\x50\x52\x4F\x48\x49\x42\x5F\x4E\x4F\x54\x5F\x53\x43\x52\x45\x45\x4E\x45\x44","\x50\x52\x4F\x48\x49\x42\x5F\x50\x41\x53\x53\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x50\x52\x4F\x48\x49\x42\x5F\x46\x41\x49\x4C\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x50\x52\x4F\x48\x49\x42","\x75\x64\x70","\x74\x72\x61\x6E\x73\x70\x6F\x72\x74","\x2C","\x6A\x6F\x69\x6E","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x73\x70\x6C\x69\x74","\x53\x74\x72\x69\x6E\x67\x20\x69\x73\x20\x64\x65\x70\x72\x65\x63\x61\x74\x65\x64\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x61\x6E\x20\x41\x72\x72\x61\x79\x20\x61\x73\x20\x5B\x22\x75\x64\x70\x22\x2C\x20\x22\x74\x63\x70\x22\x5D","\x72\x66\x63\x32\x38\x33\x33","\x69\x6E\x66\x6F","\x73\x68\x6F\x72\x74\x69\x6E\x66\x6F","\x69\x6E\x62\x61\x6E\x64","\x61\x75\x74\x6F","\x79\x65\x73","\x6E\x6F","\x6E\x6F\x6E\x61\x74","\x75\x70\x64\x61\x74\x65","\x6F\x75\x74\x67\x6F\x69\x6E\x67","\x66\x6F\x72\x63\x65\x5F\x72\x70\x6F\x72\x74\x2C\x63\x6F\x6D\x65\x64\x69\x61","\x6E\x61\x74","\x53\x74\x72\x69\x6E\x67\x20\x69\x73\x20\x64\x65\x70\x72\x65\x63\x61\x74\x65\x64\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x61\x6E\x20\x41\x72\x72\x61\x79\x20\x61\x73\x20\x5B\x22\x66\x6F\x72\x63\x65\x5F\x72\x70\x6F\x72\x74\x22\x2C\x20\x22\x63\x6F\x6D\x65\x64\x69\x61\x22\x5D","\x65\x6E","\x61\x6C\x6C","\x75\x6C\x61\x77\x3B\x61\x6C\x61\x77\x3B\x67\x73\x6D","\x61\x6C\x6C\x6F\x77","\x3B","\x53\x74\x72\x69\x6E\x67\x20\x69\x73\x20\x64\x65\x70\x72\x65\x63\x61\x74\x65\x64\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x61\x6E\x20\x41\x72\x72\x61\x79\x20\x61\x73\x20\x5B\x22\x75\x6C\x61\x77\x22\x2C\x20\x22\x61\x6C\x61\x77\x22\x2C\x20\x22\x61\x6C\x61\x77\x22\x5D","\x70\x6F\x72\x74\x2C\x69\x6E\x76\x69\x74\x65","\x69\x6E\x73\x65\x63\x75\x72\x65","\x53\x74\x72\x69\x6E\x67\x20\x69\x73\x20\x64\x65\x70\x72\x65\x63\x61\x74\x65\x64\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x61\x6E\x20\x41\x72\x72\x61\x79\x20\x61\x73\x20\x5B\x22\x70\x6F\x72\x74\x22\x2C\x20\x22\x69\x6E\x76\x69\x74\x65\x22\x5D","\x6E\x65\x76\x65\x72","\x22\x22\x20\x3C\x3E","\x61\x6C\x77\x61\x79\x73","\x61\x63\x63\x65\x70\x74","\x72\x65\x66\x75\x73\x65","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x75\x61\x63","\x75\x61\x73","\x70\x61\x69","\x66\x69\x6E\x67\x65\x72\x70\x72\x69\x6E\x74","\x63\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65","\x61\x63\x74\x69\x76\x65","\x70\x61\x73\x73\x69\x76\x65","\x61\x63\x74\x70\x61\x73\x73","\x64\x79\x6E\x61\x6D\x69\x63","\x75\x70\x64\x61\x74\x65\x2C\x6E\x6F\x6E\x61\x74","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x12ea[0];var Sequelize=require(_0x12ea[1]);module[_0x12ea[2]]= {name:{type:Sequelize[_0x12ea[3]],allowNull:false,unique:_0x12ea[4],validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i}},type:{type:Sequelize.ENUM(_0x12ea[5],_0x12ea[6],_0x12ea[7]),allowNull:false,defaultValue:_0x12ea[5]},context:{type:Sequelize[_0x12ea[3]],allowNull:false,defaultValue:_0x12ea[8]},callingpres:{type:Sequelize.ENUM(_0x12ea[9],_0x12ea[10],_0x12ea[11],_0x12ea[12],_0x12ea[13],_0x12ea[14],_0x12ea[15],_0x12ea[16])},deny:{type:Sequelize[_0x12ea[3]]},permit:{type:Sequelize[_0x12ea[3]]},secret:{type:Sequelize[_0x12ea[3]]},md5secret:{type:Sequelize[_0x12ea[3]]},remotesecret:{type:Sequelize[_0x12ea[3]]},transport:{type:Sequelize[_0x12ea[3]],defaultValue:_0x12ea[17],set:function(_0xe902x2){this[_0x12ea[21]](_0x12ea[18],_0xe902x2?_0xe902x2[_0x12ea[20]](_0x12ea[19]):null)},get:function(){return this[_0x12ea[22]](_0x12ea[18])?this[_0x12ea[22]](_0x12ea[18])[_0x12ea[23]](_0x12ea[19]):null},comment:_0x12ea[24]},dtmfmode:{type:Sequelize.ENUM(_0x12ea[25],_0x12ea[26],_0x12ea[27],_0x12ea[28],_0x12ea[29]),defaultValue:_0x12ea[25]},directmedia:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31],_0x12ea[32],_0x12ea[33],_0x12ea[34]),defaultValue:_0x12ea[31]},directrtpsetup:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31]),defaultValue:_0x12ea[31]},directmediapermit:{type:Sequelize[_0x12ea[3]]},directmediadeny:{type:Sequelize[_0x12ea[3]]},nat:{type:Sequelize[_0x12ea[3]],defaultValue:_0x12ea[35],set:function(_0xe902x2){this[_0x12ea[21]](_0x12ea[36],_0xe902x2?_0xe902x2[_0x12ea[20]](_0x12ea[19]):null)},get:function(){return this[_0x12ea[22]](_0x12ea[36])?this[_0x12ea[22]](_0x12ea[36])[_0x12ea[23]](_0x12ea[19]):null},comment:_0x12ea[37]},callgroup:{type:Sequelize[_0x12ea[3]]},namedcallgroup:{type:Sequelize[_0x12ea[3]]},pickupgroup:{type:Sequelize[_0x12ea[3]]},namedpickupgroup:{type:Sequelize[_0x12ea[3]]},language:{type:Sequelize[_0x12ea[3]],defaultValue:_0x12ea[38]},tonezone:{type:Sequelize[_0x12ea[3]],allowNull:true},disallow:{type:Sequelize[_0x12ea[3]],defaultValue:_0x12ea[39]},allow:{type:Sequelize[_0x12ea[3]],allowNull:false,defaultValue:_0x12ea[40],set:function(_0xe902x2){this[_0x12ea[21]](_0x12ea[41],_0xe902x2?_0xe902x2[_0x12ea[20]](_0x12ea[42]):_0x12ea[40])},get:function(){return this[_0x12ea[22]](_0x12ea[41])?this[_0x12ea[22]](_0x12ea[41])[_0x12ea[23]](_0x12ea[42]):null},comment:_0x12ea[43]},autoframing:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31])},insecure:{type:Sequelize[_0x12ea[3]],defaultValue:_0x12ea[44],set:function(_0xe902x2){this[_0x12ea[21]](_0x12ea[45],_0xe902x2?_0xe902x2[_0x12ea[20]](_0x12ea[19]):null)},get:function(){return this[_0x12ea[22]](_0x12ea[45])?this[_0x12ea[22]](_0x12ea[45])[_0x12ea[23]](_0x12ea[19]):null},comment:_0x12ea[46]},trustrpid:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31]),defaultValue:_0x12ea[31]},trust_id_outbound:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31]),defaultValue:_0x12ea[31]},progressinband:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31],_0x12ea[47])},promiscredir:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31])},useclientcode:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31])},accountcode:{type:Sequelize.INTEGER(11)},setvar:{type:Sequelize[_0x12ea[3]]},callerid:{type:Sequelize[_0x12ea[3]],defaultValue:_0x12ea[48]},amaflags:{type:Sequelize[_0x12ea[3]]},callcounter:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31]),defaultValue:_0x12ea[30]},busylevel:{type:Sequelize.INTEGER(11)},allowoverlap:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31])},allowsubscribe:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31])},allowtransfer:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31])},ignoresdpversion:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31])},subscribecontext:{type:Sequelize[_0x12ea[3]]},template:{type:Sequelize[_0x12ea[3]]},videosupport:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31],_0x12ea[49]),defaultValue:_0x12ea[31]},maxcallbitrate:{type:Sequelize.INTEGER(11)},rfc2833compensate:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31])},mailbox:{type:Sequelize[_0x12ea[3]]},session_timers:{type:Sequelize.ENUM(_0x12ea[50],_0x12ea[51],_0x12ea[52])},session_expires:{type:Sequelize.INTEGER(11)},session_minse:{type:Sequelize.INTEGER(11)},session_refresher:{type:Sequelize.ENUM(_0x12ea[53],_0x12ea[54]),defaultValue:_0x12ea[54]},t38pt_usertpsource:{type:Sequelize[_0x12ea[3]]},regexten:{type:Sequelize[_0x12ea[3]]},fromdomain:{type:Sequelize[_0x12ea[3]]},fromuser:{type:Sequelize[_0x12ea[3]]},port:{type:Sequelize.INTEGER(5)},qualify:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31]),defaultValue:_0x12ea[30]},keepalive:{type:Sequelize.INTEGER(11)},defaultip:{type:Sequelize[_0x12ea[3]]},defaultuser:{type:Sequelize[_0x12ea[3]]},rtptimeout:{type:Sequelize.INTEGER(11)},rtpholdtimeout:{type:Sequelize.INTEGER(11)},rtpkeepalive:{type:Sequelize.INTEGER(11)},sendrpid:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31],_0x12ea[55]),defaultValue:_0x12ea[31]},outboundproxy:{type:Sequelize[_0x12ea[3]]},callbackextension:{type:Sequelize[_0x12ea[3]]},timert1:{type:Sequelize.INTEGER(11)},timerb:{type:Sequelize.INTEGER(11)},qualifyfreq:{type:Sequelize.INTEGER(11)},contactpermit:{type:Sequelize[_0x12ea[3]]},contactdeny:{type:Sequelize[_0x12ea[3]]},contactacl:{type:Sequelize[_0x12ea[3]]},unsolicited_mailbox:{type:Sequelize[_0x12ea[3]]},use_q850_reason:{type:Sequelize[_0x12ea[3]]},maxforwards:{type:Sequelize.INTEGER(11)},encryption:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31]),defaultValue:_0x12ea[31]},avpf:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31])},force_avp:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31])},icesupport:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31])},dtlsenable:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31])},dtlsverify:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31],_0x12ea[56],_0x12ea[57])},dtlsrekey:{type:Sequelize.INTEGER(11)},dtlscertfile:{type:Sequelize[_0x12ea[3]]},dtlsprivatekey:{type:Sequelize[_0x12ea[3]]},dtlscipher:{type:Sequelize[_0x12ea[3]]},dtlscafile:{type:Sequelize[_0x12ea[3]]},dtlscapath:{type:Sequelize[_0x12ea[3]]},dtlssetup:{type:Sequelize.ENUM(_0x12ea[58],_0x12ea[59],_0x12ea[60]),allowNull:true},dtlsfingerprint:{type:Sequelize[_0x12ea[3]]},usereqphone:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31]),defaultValue:_0x12ea[31]},recordonfeature:{type:Sequelize[_0x12ea[3]]},recordofffeature:{type:Sequelize[_0x12ea[3]]},call_limit:{type:Sequelize.INTEGER(11),defaultValue:1000},registertrying:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31])},subscribemwi:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31])},vmexten:{type:Sequelize[_0x12ea[3]]},mohinterpret:{type:Sequelize[_0x12ea[3]]},mohsuggest:{type:Sequelize[_0x12ea[3]]},parkinglot:{type:Sequelize[_0x12ea[3]]},description:{type:Sequelize[_0x12ea[3]]},host:{type:Sequelize[_0x12ea[3]],defaultValue:_0x12ea[61]},canreinvite:{type:Sequelize.ENUM(_0x12ea[30],_0x12ea[31],_0x12ea[32],_0x12ea[33],_0x12ea[62]),defaultValue:_0x12ea[31]},registry:{type:Sequelize[_0x12ea[3]]},otherFields:{type:Sequelize[_0x12ea[3]]},active:{type:Sequelize[_0x12ea[63]],allowNull:false,defaultValue:true},t38pt_udptl:{type:Sequelize[_0x12ea[3]],defaultValue:_0x12ea[31]}}
\ No newline at end of file
+var _0xf008=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x66\x72\x69\x65\x6E\x64","\x75\x73\x65\x72","\x70\x65\x65\x72","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x70\x2D\x70\x72\x6F\x76\x69\x64\x65\x72","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x4E\x4F\x54\x5F\x53\x43\x52\x45\x45\x4E\x45\x44","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x50\x41\x53\x53\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x46\x41\x49\x4C\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x41\x4C\x4C\x4F\x57\x45\x44","\x50\x52\x4F\x48\x49\x42\x5F\x4E\x4F\x54\x5F\x53\x43\x52\x45\x45\x4E\x45\x44","\x50\x52\x4F\x48\x49\x42\x5F\x50\x41\x53\x53\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x50\x52\x4F\x48\x49\x42\x5F\x46\x41\x49\x4C\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x50\x52\x4F\x48\x49\x42","\x75\x64\x70","\x74\x72\x61\x6E\x73\x70\x6F\x72\x74","\x2C","\x6A\x6F\x69\x6E","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x73\x70\x6C\x69\x74","\x53\x74\x72\x69\x6E\x67\x20\x69\x73\x20\x64\x65\x70\x72\x65\x63\x61\x74\x65\x64\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x61\x6E\x20\x41\x72\x72\x61\x79\x20\x61\x73\x20\x5B\x22\x75\x64\x70\x22\x2C\x20\x22\x74\x63\x70\x22\x5D","\x72\x66\x63\x32\x38\x33\x33","\x69\x6E\x66\x6F","\x73\x68\x6F\x72\x74\x69\x6E\x66\x6F","\x69\x6E\x62\x61\x6E\x64","\x61\x75\x74\x6F","\x79\x65\x73","\x6E\x6F","\x6E\x6F\x6E\x61\x74","\x75\x70\x64\x61\x74\x65","\x6F\x75\x74\x67\x6F\x69\x6E\x67","\x66\x6F\x72\x63\x65\x5F\x72\x70\x6F\x72\x74\x2C\x63\x6F\x6D\x65\x64\x69\x61","\x6E\x61\x74","\x53\x74\x72\x69\x6E\x67\x20\x69\x73\x20\x64\x65\x70\x72\x65\x63\x61\x74\x65\x64\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x61\x6E\x20\x41\x72\x72\x61\x79\x20\x61\x73\x20\x5B\x22\x66\x6F\x72\x63\x65\x5F\x72\x70\x6F\x72\x74\x22\x2C\x20\x22\x63\x6F\x6D\x65\x64\x69\x61\x22\x5D","\x65\x6E","\x61\x6C\x6C","\x75\x6C\x61\x77\x3B\x61\x6C\x61\x77\x3B\x67\x73\x6D","\x61\x6C\x6C\x6F\x77","\x3B","\x53\x74\x72\x69\x6E\x67\x20\x69\x73\x20\x64\x65\x70\x72\x65\x63\x61\x74\x65\x64\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x61\x6E\x20\x41\x72\x72\x61\x79\x20\x61\x73\x20\x5B\x22\x75\x6C\x61\x77\x22\x2C\x20\x22\x61\x6C\x61\x77\x22\x2C\x20\x22\x61\x6C\x61\x77\x22\x5D","\x70\x6F\x72\x74\x2C\x69\x6E\x76\x69\x74\x65","\x69\x6E\x73\x65\x63\x75\x72\x65","\x53\x74\x72\x69\x6E\x67\x20\x69\x73\x20\x64\x65\x70\x72\x65\x63\x61\x74\x65\x64\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x61\x6E\x20\x41\x72\x72\x61\x79\x20\x61\x73\x20\x5B\x22\x70\x6F\x72\x74\x22\x2C\x20\x22\x69\x6E\x76\x69\x74\x65\x22\x5D","\x6E\x65\x76\x65\x72","\x22\x22\x20\x3C\x3E","\x61\x6C\x77\x61\x79\x73","\x61\x63\x63\x65\x70\x74","\x72\x65\x66\x75\x73\x65","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x75\x61\x63","\x75\x61\x73","\x70\x61\x69","\x66\x69\x6E\x67\x65\x72\x70\x72\x69\x6E\x74","\x63\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65","\x61\x63\x74\x69\x76\x65","\x70\x61\x73\x73\x69\x76\x65","\x61\x63\x74\x70\x61\x73\x73","\x64\x79\x6E\x61\x6D\x69\x63","\x75\x70\x64\x61\x74\x65\x2C\x6E\x6F\x6E\x61\x74","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0xf008[0];var Sequelize=require(_0xf008[1]);module[_0xf008[2]]= {name:{type:Sequelize[_0xf008[3]],allowNull:false,unique:_0xf008[4],validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i}},type:{type:Sequelize.ENUM(_0xf008[5],_0xf008[6],_0xf008[7]),allowNull:false,defaultValue:_0xf008[5]},context:{type:Sequelize[_0xf008[3]],allowNull:false,defaultValue:_0xf008[8]},callingpres:{type:Sequelize.ENUM(_0xf008[9],_0xf008[10],_0xf008[11],_0xf008[12],_0xf008[13],_0xf008[14],_0xf008[15],_0xf008[16])},deny:{type:Sequelize[_0xf008[3]]},permit:{type:Sequelize[_0xf008[3]]},secret:{type:Sequelize[_0xf008[3]]},md5secret:{type:Sequelize[_0xf008[3]]},remotesecret:{type:Sequelize[_0xf008[3]]},transport:{type:Sequelize[_0xf008[3]],defaultValue:_0xf008[17],set:function(_0xb442x2){this[_0xf008[21]](_0xf008[18],_0xb442x2?_0xb442x2[_0xf008[20]](_0xf008[19]):null)},get:function(){return this[_0xf008[22]](_0xf008[18])?this[_0xf008[22]](_0xf008[18])[_0xf008[23]](_0xf008[19]):null},comment:_0xf008[24]},dtmfmode:{type:Sequelize.ENUM(_0xf008[25],_0xf008[26],_0xf008[27],_0xf008[28],_0xf008[29]),defaultValue:_0xf008[25]},directmedia:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31],_0xf008[32],_0xf008[33],_0xf008[34]),defaultValue:_0xf008[31]},directrtpsetup:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31]),defaultValue:_0xf008[31]},directmediapermit:{type:Sequelize[_0xf008[3]]},directmediadeny:{type:Sequelize[_0xf008[3]]},nat:{type:Sequelize[_0xf008[3]],defaultValue:_0xf008[35],set:function(_0xb442x2){this[_0xf008[21]](_0xf008[36],_0xb442x2?_0xb442x2[_0xf008[20]](_0xf008[19]):null)},get:function(){return this[_0xf008[22]](_0xf008[36])?this[_0xf008[22]](_0xf008[36])[_0xf008[23]](_0xf008[19]):null},comment:_0xf008[37]},callgroup:{type:Sequelize[_0xf008[3]]},namedcallgroup:{type:Sequelize[_0xf008[3]]},pickupgroup:{type:Sequelize[_0xf008[3]]},namedpickupgroup:{type:Sequelize[_0xf008[3]]},language:{type:Sequelize[_0xf008[3]],defaultValue:_0xf008[38]},tonezone:{type:Sequelize[_0xf008[3]],allowNull:true},disallow:{type:Sequelize[_0xf008[3]],defaultValue:_0xf008[39]},allow:{type:Sequelize[_0xf008[3]],allowNull:false,defaultValue:_0xf008[40],set:function(_0xb442x2){this[_0xf008[21]](_0xf008[41],_0xb442x2?_0xb442x2[_0xf008[20]](_0xf008[42]):_0xf008[40])},get:function(){return this[_0xf008[22]](_0xf008[41])?this[_0xf008[22]](_0xf008[41])[_0xf008[23]](_0xf008[42]):null},comment:_0xf008[43]},autoframing:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31])},insecure:{type:Sequelize[_0xf008[3]],defaultValue:_0xf008[44],set:function(_0xb442x2){this[_0xf008[21]](_0xf008[45],_0xb442x2?_0xb442x2[_0xf008[20]](_0xf008[19]):null)},get:function(){return this[_0xf008[22]](_0xf008[45])?this[_0xf008[22]](_0xf008[45])[_0xf008[23]](_0xf008[19]):null},comment:_0xf008[46]},trustrpid:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31]),defaultValue:_0xf008[31]},trust_id_outbound:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31]),defaultValue:_0xf008[31]},progressinband:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31],_0xf008[47])},promiscredir:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31])},useclientcode:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31])},accountcode:{type:Sequelize.INTEGER(11)},setvar:{type:Sequelize[_0xf008[3]]},callerid:{type:Sequelize[_0xf008[3]],defaultValue:_0xf008[48]},amaflags:{type:Sequelize[_0xf008[3]]},callcounter:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31]),defaultValue:_0xf008[30]},busylevel:{type:Sequelize.INTEGER(11)},allowoverlap:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31])},allowsubscribe:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31])},allowtransfer:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31])},ignoresdpversion:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31])},subscribecontext:{type:Sequelize[_0xf008[3]]},template:{type:Sequelize[_0xf008[3]]},videosupport:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31],_0xf008[49]),defaultValue:_0xf008[31]},maxcallbitrate:{type:Sequelize.INTEGER(11)},rfc2833compensate:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31])},mailbox:{type:Sequelize[_0xf008[3]]},session_timers:{type:Sequelize.ENUM(_0xf008[50],_0xf008[51],_0xf008[52])},session_expires:{type:Sequelize.INTEGER(11)},session_minse:{type:Sequelize.INTEGER(11)},session_refresher:{type:Sequelize.ENUM(_0xf008[53],_0xf008[54]),defaultValue:_0xf008[54]},t38pt_usertpsource:{type:Sequelize[_0xf008[3]]},regexten:{type:Sequelize[_0xf008[3]]},fromdomain:{type:Sequelize[_0xf008[3]]},fromuser:{type:Sequelize[_0xf008[3]]},port:{type:Sequelize.INTEGER(5)},qualify:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31]),defaultValue:_0xf008[30]},keepalive:{type:Sequelize.INTEGER(11)},defaultip:{type:Sequelize[_0xf008[3]]},defaultuser:{type:Sequelize[_0xf008[3]]},rtptimeout:{type:Sequelize.INTEGER(11)},rtpholdtimeout:{type:Sequelize.INTEGER(11)},rtpkeepalive:{type:Sequelize.INTEGER(11)},sendrpid:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31],_0xf008[55]),defaultValue:_0xf008[31]},outboundproxy:{type:Sequelize[_0xf008[3]]},callbackextension:{type:Sequelize[_0xf008[3]]},timert1:{type:Sequelize.INTEGER(11)},timerb:{type:Sequelize.INTEGER(11)},qualifyfreq:{type:Sequelize.INTEGER(11)},contactpermit:{type:Sequelize[_0xf008[3]]},contactdeny:{type:Sequelize[_0xf008[3]]},contactacl:{type:Sequelize[_0xf008[3]]},unsolicited_mailbox:{type:Sequelize[_0xf008[3]]},use_q850_reason:{type:Sequelize[_0xf008[3]]},maxforwards:{type:Sequelize.INTEGER(11)},encryption:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31]),defaultValue:_0xf008[31]},avpf:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31])},force_avp:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31])},icesupport:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31])},dtlsenable:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31])},dtlsverify:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31],_0xf008[56],_0xf008[57])},dtlsrekey:{type:Sequelize.INTEGER(11)},dtlscertfile:{type:Sequelize[_0xf008[3]]},dtlsprivatekey:{type:Sequelize[_0xf008[3]]},dtlscipher:{type:Sequelize[_0xf008[3]]},dtlscafile:{type:Sequelize[_0xf008[3]]},dtlscapath:{type:Sequelize[_0xf008[3]]},dtlssetup:{type:Sequelize.ENUM(_0xf008[58],_0xf008[59],_0xf008[60]),allowNull:true},dtlsfingerprint:{type:Sequelize[_0xf008[3]]},usereqphone:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31]),defaultValue:_0xf008[31]},recordonfeature:{type:Sequelize[_0xf008[3]]},recordofffeature:{type:Sequelize[_0xf008[3]]},call_limit:{type:Sequelize.INTEGER(11),defaultValue:1000},registertrying:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31])},subscribemwi:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31])},vmexten:{type:Sequelize[_0xf008[3]]},mohinterpret:{type:Sequelize[_0xf008[3]]},mohsuggest:{type:Sequelize[_0xf008[3]]},parkinglot:{type:Sequelize[_0xf008[3]]},description:{type:Sequelize[_0xf008[3]]},host:{type:Sequelize[_0xf008[3]],defaultValue:_0xf008[61]},canreinvite:{type:Sequelize.ENUM(_0xf008[30],_0xf008[31],_0xf008[32],_0xf008[33],_0xf008[62]),defaultValue:_0xf008[31]},registry:{type:Sequelize[_0xf008[3]]},otherFields:{type:Sequelize[_0xf008[3]]},active:{type:Sequelize[_0xf008[63]],allowNull:false,defaultValue:true},t38pt_udptl:{type:Sequelize[_0xf008[3]],defaultValue:_0xf008[31]}}
\ No newline at end of file
index dd353d0..652267d 100644 (file)
@@ -1 +1 @@
-var _0xe8b0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x54\x72\x75\x6E\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x54\x72\x75\x6E\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x54\x72\x75\x6E\x6B","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x52\x65\x6C\x6F\x61\x64","\x63\x68\x61\x6E\x5F\x73\x69\x70\x2E\x73\x6F","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73\x2F\x74\x72\x75\x6E\x6B\x2E\x65\x6A\x73","\x6A\x6F\x69\x6E","\x75\x74\x66\x38","\x72\x65\x61\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73\x2F\x72\x65\x67\x69\x73\x74\x72\x79\x2E\x65\x6A\x73","\x72\x65\x6E\x64\x65\x72","\x2F\x65\x74\x63\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x74\x72\x75\x6E\x6B\x73\x2E\x63\x6F\x6E\x66","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x72\x65\x67\x69\x73\x74\x72\x79","\x2F\x65\x74\x63\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x72\x65\x67\x69\x73\x74\x65\x72\x73\x2E\x63\x6F\x6E\x66","\x62\x6F\x64\x79"];_0xe8b0[0];var jsonpatch=require(_0xe8b0[1]);var rp=require(_0xe8b0[2]);var moment=require(_0xe8b0[3]);var BPromise=require(_0xe8b0[4]);var Mustache=require(_0xe8b0[5]);var util=require(_0xe8b0[6]);var path=require(_0xe8b0[7]);var sox=require(_0xe8b0[8]);var csv=require(_0xe8b0[9]);var ejs=require(_0xe8b0[10]);var fs=require(_0xe8b0[11]);var _=require(_0xe8b0[12]);var squel=require(_0xe8b0[13]);var crypto=require(_0xe8b0[14]);var jsforce=require(_0xe8b0[15]);var deskjs=require(_0xe8b0[16]);var toCsv=require(_0xe8b0[9]);var querystring=require(_0xe8b0[17]);var Papa=require(_0xe8b0[18]);var qs=require(_0xe8b0[19]);var logger=require(_0xe8b0[21])(_0xe8b0[20]);var utils=require(_0xe8b0[22]);var config=require(_0xe8b0[23]);var db=require(_0xe8b0[25])[_0xe8b0[24]];var jayson=require(_0xe8b0[26]);var client=jayson[_0xe8b0[28]][_0xe8b0[27]]({port:9002});function respondWithRpcPromise(_0xad45x1c,_0xad45x1d,_0xad45x1e,_0xad45x1f){return  new BPromise(function(_0xad45x20,_0xad45x21){var _0xad45x22=(_0xad45x1f|| client);return _0xad45x22[_0xe8b0[41]](_0xad45x1c,_0xad45x1e)[_0xe8b0[40]](function(_0xad45x24){logger[_0xe8b0[33]](_0xe8b0[29],_0xad45x1d,_0xe8b0[32]);logger[_0xe8b0[36]](_0xe8b0[34],_0xad45x1d,_0xe8b0[32],JSON[_0xe8b0[35]](_0xad45x24));if(_0xad45x24[_0xe8b0[30]]){if(_0xad45x24[_0xe8b0[30]][_0xe8b0[37]]=== 500){logger[_0xe8b0[30]](_0xe8b0[29],_0xad45x1d,_0xad45x24[_0xe8b0[30]][_0xe8b0[38]]);return _0xad45x21(_0xad45x24[_0xe8b0[30]][_0xe8b0[38]])};logger[_0xe8b0[30]](_0xe8b0[29],_0xad45x1d,_0xad45x24[_0xe8b0[30]][_0xe8b0[38]]);return _0xad45x20(_0xad45x24[_0xe8b0[30]][_0xe8b0[38]])}else {logger[_0xe8b0[33]](_0xe8b0[29],_0xad45x1d,_0xe8b0[32]);_0xad45x20(_0xad45x24[_0xe8b0[39]][_0xe8b0[38]])}})[_0xe8b0[31]](function(_0xad45x23){logger[_0xe8b0[30]](_0xe8b0[29],_0xad45x1d,_0xad45x23);_0xad45x21(_0xad45x23)})})}function respondWithStatusCode(_0xad45x24,_0xad45x26){_0xad45x26= _0xad45x26|| 204;return function(_0xad45x27){if(_0xad45x27){return _0xad45x24[_0xe8b0[42]](_0xad45x26)};return _0xad45x24[_0xe8b0[44]](_0xad45x26)[_0xe8b0[43]]()}}function respondWithResult(_0xad45x24,_0xad45x26){_0xad45x26= _0xad45x26|| 200;return function(_0xad45x27){if(_0xad45x27){return _0xad45x24[_0xe8b0[44]](_0xad45x26)[_0xe8b0[45]](_0xad45x27)}}}function respondWithFilteredResult(_0xad45x24,_0xad45x2a){return function(_0xad45x27){if(_0xad45x27){var _0xad45x2b=_0xad45x27[_0xe8b0[46]],_0xad45x2c=_0xad45x2a[_0xe8b0[47]],_0xad45x2d=_0xad45x2a[_0xe8b0[47]]+ _0xad45x2a[_0xe8b0[48]],_0xad45x26;if(_0xad45x2d>= _0xad45x2b){_0xad45x2d= _0xad45x2b;_0xad45x26= 200}else {_0xad45x26= 206};_0xad45x24[_0xe8b0[44]](_0xad45x26);return _0xad45x24[_0xe8b0[52]](_0xe8b0[49],_0xad45x2c+ _0xe8b0[50]+ _0xad45x2d+ _0xe8b0[51]+ _0xad45x2b)[_0xe8b0[45]](_0xad45x27)};return null}}function patchUpdates(_0xad45x2f){return function(_0xad45x27){try{jsonpatch[_0xe8b0[53]](_0xad45x27,_0xad45x2f,true)}catch(err){return BPromise[_0xe8b0[54]](err)};return _0xad45x27[_0xe8b0[55]]()}}function saveUpdates(_0xad45x31,_0xad45x26){return function(_0xad45x27){if(_0xad45x27){return _0xad45x27[_0xe8b0[56]](_0xad45x31)[_0xe8b0[40]](function(_0xad45x32){return _0xad45x32})};return null}}function removeEntity(_0xad45x24,_0xad45x26){return function(_0xad45x27){if(_0xad45x27){return _0xad45x27[_0xe8b0[57]]()[_0xe8b0[40]](function(){_0xad45x24[_0xe8b0[44]](204)[_0xe8b0[43]]()})}}}function handleEntityNotFound(_0xad45x24,_0xad45x26){return function(_0xad45x27){if(!_0xad45x27){_0xad45x24[_0xe8b0[42]](404)};return _0xad45x27}}function handleError(_0xad45x24,_0xad45x26){_0xad45x26= _0xad45x26|| 500;return function(_0xad45x23){logger[_0xe8b0[30]](_0xad45x23[_0xe8b0[58]]);if(_0xad45x23[_0xe8b0[59]]){delete _0xad45x23[_0xe8b0[59]]};_0xad45x24[_0xe8b0[44]](_0xad45x26)[_0xe8b0[60]](_0xad45x23)}}exports[_0xe8b0[61]]= function(_0xad45x1e,_0xad45x24){var _0xad45x2a={},_0xad45x36={},_0xad45x37={count:0,rows:[]};_0xad45x36[_0xe8b0[62]]= _[_0xe8b0[65]](db[_0xe8b0[64]][_0xe8b0[63]]);var _0xad45x38={dateStart:_0xad45x1e[_0xe8b0[67]][_0xe8b0[66]],dateEnd:_0xad45x1e[_0xe8b0[67]][_0xe8b0[68]]};delete _0xad45x1e[_0xe8b0[67]][_0xe8b0[66]];delete _0xad45x1e[_0xe8b0[67]][_0xe8b0[68]];_0xad45x36[_0xe8b0[67]]= _[_0xe8b0[65]](_0xad45x1e[_0xe8b0[67]]);_0xad45x36[_0xe8b0[69]]= _[_0xe8b0[70]](_0xad45x36[_0xe8b0[62]],_0xad45x36[_0xe8b0[67]]);_0xad45x2a[_0xe8b0[71]]= _[_0xe8b0[70]](_0xad45x36[_0xe8b0[62]],qs[_0xe8b0[72]](_0xad45x1e[_0xe8b0[67]][_0xe8b0[72]]));_0xad45x2a[_0xe8b0[71]]= (_0xad45x2a[_0xe8b0[71]][_0xe8b0[73]])?_0xad45x2a[_0xe8b0[71]]:_0xad45x36[_0xe8b0[62]];if(!_0xad45x1e[_0xe8b0[67]][_0xe8b0[75]](_0xe8b0[74])){_0xad45x2a[_0xe8b0[48]]= qs[_0xe8b0[48]](_0xad45x1e[_0xe8b0[67]][_0xe8b0[48]]);_0xad45x2a[_0xe8b0[47]]= qs[_0xe8b0[47]](_0xad45x1e[_0xe8b0[67]][_0xe8b0[47]])};_0xad45x2a[_0xe8b0[76]]= qs[_0xe8b0[77]](_0xad45x1e[_0xe8b0[67]][_0xe8b0[77]]);_0xad45x2a[_0xe8b0[78]]= qs[_0xe8b0[69]](_[_0xe8b0[79]](_0xad45x1e[_0xe8b0[67]],_0xad45x36[_0xe8b0[69]]));if(_0xad45x38[_0xe8b0[66]]){if(_0xad45x38[_0xe8b0[68]]){_0xad45x38[_0xe8b0[68]]= moment(_0xad45x38[_0xe8b0[68]])[_0xe8b0[81]](1,_0xe8b0[80])}else {_0xad45x38[_0xe8b0[68]]= moment(_0xad45x38[_0xe8b0[66]])[_0xe8b0[81]](1,_0xe8b0[80])};_[_0xe8b0[82]](_0xad45x2a[_0xe8b0[78]],{createdAt:{$gte:_0xad45x38[_0xe8b0[66]],$lte:_0xad45x38[_0xe8b0[68]]}})};if(_0xad45x1e[_0xe8b0[67]][_0xe8b0[83]]){_0xad45x2a[_0xe8b0[78]]= _[_0xe8b0[82]](_0xad45x2a[_0xe8b0[78]],{$or:_[_0xe8b0[85]](_0xad45x2a[_0xe8b0[71]],function(_0xad45x39){var _0xad45x37={};_0xad45x37[_0xad45x39]= {$like:_0xe8b0[84]+ _0xad45x1e[_0xe8b0[67]][_0xe8b0[83]]+ _0xe8b0[84]};return _0xad45x37})})};_0xad45x2a= _[_0xe8b0[82]]({},_0xad45x2a,_0xad45x1e[_0xe8b0[86]]);var _0xad45x3a={where:_0xad45x2a[_0xe8b0[78]]};return db[_0xe8b0[64]][_0xe8b0[46]](_0xad45x3a)[_0xe8b0[40]](function(_0xad45x2b){_0xad45x37[_0xe8b0[46]]= _0xad45x2b;if(_0xad45x1e[_0xe8b0[67]][_0xe8b0[88]]){_0xad45x2a[_0xe8b0[89]]= [{all:true}]};return db[_0xe8b0[64]][_0xe8b0[90]](_0xad45x2a)})[_0xe8b0[40]](function(_0xad45x3b){_0xad45x37[_0xe8b0[87]]= _0xad45x3b;return _0xad45x37})[_0xe8b0[40]](respondWithFilteredResult(_0xad45x24,_0xad45x2a))[_0xe8b0[31]](handleError(_0xad45x24,null))};exports[_0xe8b0[91]]= function(_0xad45x1e,_0xad45x24){var _0xad45x2a={raw:false,where:{id:_0xad45x1e[_0xe8b0[93]][_0xe8b0[92]]}},_0xad45x36={};_0xad45x36[_0xe8b0[62]]= _[_0xe8b0[65]](db[_0xe8b0[64]][_0xe8b0[63]]);_0xad45x36[_0xe8b0[67]]= _[_0xe8b0[65]](_0xad45x1e[_0xe8b0[67]]);_0xad45x36[_0xe8b0[69]]= _[_0xe8b0[70]](_0xad45x36[_0xe8b0[62]],_0xad45x36[_0xe8b0[67]]);_0xad45x2a[_0xe8b0[71]]= _[_0xe8b0[70]](_0xad45x36[_0xe8b0[62]],qs[_0xe8b0[72]](_0xad45x1e[_0xe8b0[67]][_0xe8b0[72]]));_0xad45x2a[_0xe8b0[71]]= (_0xad45x2a[_0xe8b0[71]][_0xe8b0[73]])?_0xad45x2a[_0xe8b0[71]]:_0xad45x36[_0xe8b0[62]];if(_0xad45x1e[_0xe8b0[67]][_0xe8b0[88]]){_0xad45x2a[_0xe8b0[89]]= [{all:true}]};_0xad45x2a= _[_0xe8b0[82]]({},_0xad45x2a,_0xad45x1e[_0xe8b0[86]]);return db[_0xe8b0[64]][_0xe8b0[94]](_0xad45x2a)[_0xe8b0[40]](handleEntityNotFound(_0xad45x24,null))[_0xe8b0[40]](respondWithResult(_0xad45x24,null))[_0xe8b0[31]](handleError(_0xad45x24,null))};exports[_0xe8b0[95]]= function(_0xad45x1e,_0xad45x24,_0xad45x3c){var _0xad45x3d;return db[_0xe8b0[64]][_0xe8b0[95]](_0xad45x1e[_0xe8b0[109]],{raw:true})[_0xe8b0[40]](function(_0xad45x27){_0xad45x3d= _0xad45x27;return db[_0xe8b0[64]][_0xe8b0[90]]({raw:true})})[_0xe8b0[40]](function(_0xad45x3e){var _0xad45x3f=fs[_0xe8b0[102]](path[_0xe8b0[100]](config[_0xe8b0[98]],_0xe8b0[99]),_0xe8b0[101]);var _0xad45x40=fs[_0xe8b0[102]](path[_0xe8b0[100]](config[_0xe8b0[98]],_0xe8b0[103]),_0xe8b0[101]);var _0xad45x41=ejs[_0xe8b0[104]](_0xad45x3f,{trunks:_0xad45x3e|| []});fs[_0xe8b0[106]](_0xe8b0[105],_0xad45x41);if(_0xad45x3d[_0xe8b0[107]]){var _0xad45x42=ejs[_0xe8b0[104]](_0xad45x40,{trunks:_0xad45x3e|| []});fs[_0xe8b0[106]](_0xe8b0[108],_0xad45x42)}})[_0xe8b0[40]](function(){return respondWithRpcPromise(_0xe8b0[96],_0xe8b0[95],{module:_0xe8b0[97]})})[_0xe8b0[40]](function(){return _0xad45x3d})[_0xe8b0[40]](respondWithResult(_0xad45x24,201))[_0xe8b0[31]](handleError(_0xad45x24,null))};exports[_0xe8b0[56]]= function(_0xad45x1e,_0xad45x24,_0xad45x3c){var _0xad45x3d;return db[_0xe8b0[64]][_0xe8b0[94]]({where:{id:_0xad45x1e[_0xe8b0[93]][_0xe8b0[92]]}})[_0xe8b0[40]](handleEntityNotFound(_0xad45x24,null))[_0xe8b0[40]](saveUpdates(_0xad45x1e[_0xe8b0[109]],null))[_0xe8b0[40]](function(_0xad45x27){if(_0xad45x27){_0xad45x3d= _0xad45x27;return db[_0xe8b0[64]][_0xe8b0[90]]({raw:true})}})[_0xe8b0[40]](function(_0xad45x3e){if(_0xad45x3e){var _0xad45x3f=fs[_0xe8b0[102]](path[_0xe8b0[100]](config[_0xe8b0[98]],_0xe8b0[99]),_0xe8b0[101]);var _0xad45x40=fs[_0xe8b0[102]](path[_0xe8b0[100]](config[_0xe8b0[98]],_0xe8b0[103]),_0xe8b0[101]);var _0xad45x41=ejs[_0xe8b0[104]](_0xad45x3f,{trunks:_0xad45x3e|| []});fs[_0xe8b0[106]](_0xe8b0[105],_0xad45x41);var _0xad45x42=ejs[_0xe8b0[104]](_0xad45x40,{trunks:_0xad45x3e|| []});fs[_0xe8b0[106]](_0xe8b0[108],_0xad45x42);return respondWithRpcPromise(_0xe8b0[96],_0xe8b0[56],{module:_0xe8b0[97]})};return null})[_0xe8b0[40]](function(_0xad45x27){if(_0xad45x27){return _0xad45x3d}})[_0xe8b0[40]](respondWithResult(_0xad45x24,null))[_0xe8b0[31]](handleError(_0xad45x24,null))};exports[_0xe8b0[57]]= function(_0xad45x1e,_0xad45x24,_0xad45x3c){var _0xad45x3d;return db[_0xe8b0[64]][_0xe8b0[94]]({where:{id:_0xad45x1e[_0xe8b0[93]][_0xe8b0[92]]}})[_0xe8b0[40]](handleEntityNotFound(_0xad45x24,null))[_0xe8b0[40]](removeEntity(_0xad45x24,null))[_0xe8b0[40]](function(){return db[_0xe8b0[64]][_0xe8b0[90]]({raw:true})})[_0xe8b0[40]](function(_0xad45x3e){var _0xad45x3f=fs[_0xe8b0[102]](path[_0xe8b0[100]](config[_0xe8b0[98]],_0xe8b0[99]),_0xe8b0[101]);var _0xad45x40=fs[_0xe8b0[102]](path[_0xe8b0[100]](config[_0xe8b0[98]],_0xe8b0[103]),_0xe8b0[101]);var _0xad45x41=ejs[_0xe8b0[104]](_0xad45x3f,{trunks:_0xad45x3e});var _0xad45x42=ejs[_0xe8b0[104]](_0xad45x40,{trunks:_0xad45x3e});fs[_0xe8b0[106]](_0xe8b0[105],_0xad45x41);fs[_0xe8b0[106]](_0xe8b0[108],_0xad45x42);return respondWithRpcPromise(_0xe8b0[96],_0xe8b0[57],{module:_0xe8b0[97]})})[_0xe8b0[31]](handleError(_0xad45x24,null))}
\ No newline at end of file
+var _0xe7f2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x54\x72\x75\x6E\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x54\x72\x75\x6E\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x54\x72\x75\x6E\x6B","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x52\x65\x6C\x6F\x61\x64","\x63\x68\x61\x6E\x5F\x73\x69\x70\x2E\x73\x6F","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73\x2F\x74\x72\x75\x6E\x6B\x2E\x65\x6A\x73","\x6A\x6F\x69\x6E","\x75\x74\x66\x38","\x72\x65\x61\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73\x2F\x72\x65\x67\x69\x73\x74\x72\x79\x2E\x65\x6A\x73","\x72\x65\x6E\x64\x65\x72","\x2F\x65\x74\x63\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x74\x72\x75\x6E\x6B\x73\x2E\x63\x6F\x6E\x66","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x72\x65\x67\x69\x73\x74\x72\x79","\x2F\x65\x74\x63\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x72\x65\x67\x69\x73\x74\x65\x72\x73\x2E\x63\x6F\x6E\x66","\x62\x6F\x64\x79"];_0xe7f2[0];var jsonpatch=require(_0xe7f2[1]);var rp=require(_0xe7f2[2]);var moment=require(_0xe7f2[3]);var BPromise=require(_0xe7f2[4]);var Mustache=require(_0xe7f2[5]);var util=require(_0xe7f2[6]);var path=require(_0xe7f2[7]);var sox=require(_0xe7f2[8]);var csv=require(_0xe7f2[9]);var ejs=require(_0xe7f2[10]);var fs=require(_0xe7f2[11]);var _=require(_0xe7f2[12]);var squel=require(_0xe7f2[13]);var crypto=require(_0xe7f2[14]);var jsforce=require(_0xe7f2[15]);var deskjs=require(_0xe7f2[16]);var toCsv=require(_0xe7f2[9]);var querystring=require(_0xe7f2[17]);var Papa=require(_0xe7f2[18]);var qs=require(_0xe7f2[19]);var logger=require(_0xe7f2[21])(_0xe7f2[20]);var utils=require(_0xe7f2[22]);var config=require(_0xe7f2[23]);var db=require(_0xe7f2[25])[_0xe7f2[24]];var jayson=require(_0xe7f2[26]);var client=jayson[_0xe7f2[28]][_0xe7f2[27]]({port:9002});function respondWithRpcPromise(_0x1c00x1c,_0x1c00x1d,_0x1c00x1e,_0x1c00x1f){return  new BPromise(function(_0x1c00x20,_0x1c00x21){var _0x1c00x22=(_0x1c00x1f|| client);return _0x1c00x22[_0xe7f2[41]](_0x1c00x1c,_0x1c00x1e)[_0xe7f2[40]](function(_0x1c00x24){logger[_0xe7f2[33]](_0xe7f2[29],_0x1c00x1d,_0xe7f2[32]);logger[_0xe7f2[36]](_0xe7f2[34],_0x1c00x1d,_0xe7f2[32],JSON[_0xe7f2[35]](_0x1c00x24));if(_0x1c00x24[_0xe7f2[30]]){if(_0x1c00x24[_0xe7f2[30]][_0xe7f2[37]]=== 500){logger[_0xe7f2[30]](_0xe7f2[29],_0x1c00x1d,_0x1c00x24[_0xe7f2[30]][_0xe7f2[38]]);return _0x1c00x21(_0x1c00x24[_0xe7f2[30]][_0xe7f2[38]])};logger[_0xe7f2[30]](_0xe7f2[29],_0x1c00x1d,_0x1c00x24[_0xe7f2[30]][_0xe7f2[38]]);return _0x1c00x20(_0x1c00x24[_0xe7f2[30]][_0xe7f2[38]])}else {logger[_0xe7f2[33]](_0xe7f2[29],_0x1c00x1d,_0xe7f2[32]);_0x1c00x20(_0x1c00x24[_0xe7f2[39]][_0xe7f2[38]])}})[_0xe7f2[31]](function(_0x1c00x23){logger[_0xe7f2[30]](_0xe7f2[29],_0x1c00x1d,_0x1c00x23);_0x1c00x21(_0x1c00x23)})})}function respondWithStatusCode(_0x1c00x24,_0x1c00x26){_0x1c00x26= _0x1c00x26|| 204;return function(_0x1c00x27){if(_0x1c00x27){return _0x1c00x24[_0xe7f2[42]](_0x1c00x26)};return _0x1c00x24[_0xe7f2[44]](_0x1c00x26)[_0xe7f2[43]]()}}function respondWithResult(_0x1c00x24,_0x1c00x26){_0x1c00x26= _0x1c00x26|| 200;return function(_0x1c00x27){if(_0x1c00x27){return _0x1c00x24[_0xe7f2[44]](_0x1c00x26)[_0xe7f2[45]](_0x1c00x27)}}}function respondWithFilteredResult(_0x1c00x24,_0x1c00x2a){return function(_0x1c00x27){if(_0x1c00x27){var _0x1c00x2b=_0x1c00x27[_0xe7f2[46]],_0x1c00x2c=_0x1c00x2a[_0xe7f2[47]],_0x1c00x2d=_0x1c00x2a[_0xe7f2[47]]+ _0x1c00x2a[_0xe7f2[48]],_0x1c00x26;if(_0x1c00x2d>= _0x1c00x2b){_0x1c00x2d= _0x1c00x2b;_0x1c00x26= 200}else {_0x1c00x26= 206};_0x1c00x24[_0xe7f2[44]](_0x1c00x26);return _0x1c00x24[_0xe7f2[52]](_0xe7f2[49],_0x1c00x2c+ _0xe7f2[50]+ _0x1c00x2d+ _0xe7f2[51]+ _0x1c00x2b)[_0xe7f2[45]](_0x1c00x27)};return null}}function patchUpdates(_0x1c00x2f){return function(_0x1c00x27){try{jsonpatch[_0xe7f2[53]](_0x1c00x27,_0x1c00x2f,true)}catch(err){return BPromise[_0xe7f2[54]](err)};return _0x1c00x27[_0xe7f2[55]]()}}function saveUpdates(_0x1c00x31,_0x1c00x26){return function(_0x1c00x27){if(_0x1c00x27){return _0x1c00x27[_0xe7f2[56]](_0x1c00x31)[_0xe7f2[40]](function(_0x1c00x32){return _0x1c00x32})};return null}}function removeEntity(_0x1c00x24,_0x1c00x26){return function(_0x1c00x27){if(_0x1c00x27){return _0x1c00x27[_0xe7f2[57]]()[_0xe7f2[40]](function(){_0x1c00x24[_0xe7f2[44]](204)[_0xe7f2[43]]()})}}}function handleEntityNotFound(_0x1c00x24,_0x1c00x26){return function(_0x1c00x27){if(!_0x1c00x27){_0x1c00x24[_0xe7f2[42]](404)};return _0x1c00x27}}function handleError(_0x1c00x24,_0x1c00x26){_0x1c00x26= _0x1c00x26|| 500;return function(_0x1c00x23){logger[_0xe7f2[30]](_0x1c00x23[_0xe7f2[58]]);if(_0x1c00x23[_0xe7f2[59]]){delete _0x1c00x23[_0xe7f2[59]]};_0x1c00x24[_0xe7f2[44]](_0x1c00x26)[_0xe7f2[60]](_0x1c00x23)}}exports[_0xe7f2[61]]= function(_0x1c00x1e,_0x1c00x24){var _0x1c00x2a={},_0x1c00x36={},_0x1c00x37={count:0,rows:[]};_0x1c00x36[_0xe7f2[62]]= _[_0xe7f2[65]](db[_0xe7f2[64]][_0xe7f2[63]]);var _0x1c00x38={dateStart:_0x1c00x1e[_0xe7f2[67]][_0xe7f2[66]],dateEnd:_0x1c00x1e[_0xe7f2[67]][_0xe7f2[68]]};delete _0x1c00x1e[_0xe7f2[67]][_0xe7f2[66]];delete _0x1c00x1e[_0xe7f2[67]][_0xe7f2[68]];_0x1c00x36[_0xe7f2[67]]= _[_0xe7f2[65]](_0x1c00x1e[_0xe7f2[67]]);_0x1c00x36[_0xe7f2[69]]= _[_0xe7f2[70]](_0x1c00x36[_0xe7f2[62]],_0x1c00x36[_0xe7f2[67]]);_0x1c00x2a[_0xe7f2[71]]= _[_0xe7f2[70]](_0x1c00x36[_0xe7f2[62]],qs[_0xe7f2[72]](_0x1c00x1e[_0xe7f2[67]][_0xe7f2[72]]));_0x1c00x2a[_0xe7f2[71]]= (_0x1c00x2a[_0xe7f2[71]][_0xe7f2[73]])?_0x1c00x2a[_0xe7f2[71]]:_0x1c00x36[_0xe7f2[62]];if(!_0x1c00x1e[_0xe7f2[67]][_0xe7f2[75]](_0xe7f2[74])){_0x1c00x2a[_0xe7f2[48]]= qs[_0xe7f2[48]](_0x1c00x1e[_0xe7f2[67]][_0xe7f2[48]]);_0x1c00x2a[_0xe7f2[47]]= qs[_0xe7f2[47]](_0x1c00x1e[_0xe7f2[67]][_0xe7f2[47]])};_0x1c00x2a[_0xe7f2[76]]= qs[_0xe7f2[77]](_0x1c00x1e[_0xe7f2[67]][_0xe7f2[77]]);_0x1c00x2a[_0xe7f2[78]]= qs[_0xe7f2[69]](_[_0xe7f2[79]](_0x1c00x1e[_0xe7f2[67]],_0x1c00x36[_0xe7f2[69]]));if(_0x1c00x38[_0xe7f2[66]]){if(_0x1c00x38[_0xe7f2[68]]){_0x1c00x38[_0xe7f2[68]]= moment(_0x1c00x38[_0xe7f2[68]])[_0xe7f2[81]](1,_0xe7f2[80])}else {_0x1c00x38[_0xe7f2[68]]= moment(_0x1c00x38[_0xe7f2[66]])[_0xe7f2[81]](1,_0xe7f2[80])};_[_0xe7f2[82]](_0x1c00x2a[_0xe7f2[78]],{createdAt:{$gte:_0x1c00x38[_0xe7f2[66]],$lte:_0x1c00x38[_0xe7f2[68]]}})};if(_0x1c00x1e[_0xe7f2[67]][_0xe7f2[83]]){_0x1c00x2a[_0xe7f2[78]]= _[_0xe7f2[82]](_0x1c00x2a[_0xe7f2[78]],{$or:_[_0xe7f2[85]](_0x1c00x2a[_0xe7f2[71]],function(_0x1c00x39){var _0x1c00x37={};_0x1c00x37[_0x1c00x39]= {$like:_0xe7f2[84]+ _0x1c00x1e[_0xe7f2[67]][_0xe7f2[83]]+ _0xe7f2[84]};return _0x1c00x37})})};_0x1c00x2a= _[_0xe7f2[82]]({},_0x1c00x2a,_0x1c00x1e[_0xe7f2[86]]);var _0x1c00x3a={where:_0x1c00x2a[_0xe7f2[78]]};return db[_0xe7f2[64]][_0xe7f2[46]](_0x1c00x3a)[_0xe7f2[40]](function(_0x1c00x2b){_0x1c00x37[_0xe7f2[46]]= _0x1c00x2b;if(_0x1c00x1e[_0xe7f2[67]][_0xe7f2[88]]){_0x1c00x2a[_0xe7f2[89]]= [{all:true}]};return db[_0xe7f2[64]][_0xe7f2[90]](_0x1c00x2a)})[_0xe7f2[40]](function(_0x1c00x3b){_0x1c00x37[_0xe7f2[87]]= _0x1c00x3b;return _0x1c00x37})[_0xe7f2[40]](respondWithFilteredResult(_0x1c00x24,_0x1c00x2a))[_0xe7f2[31]](handleError(_0x1c00x24,null))};exports[_0xe7f2[91]]= function(_0x1c00x1e,_0x1c00x24){var _0x1c00x2a={raw:false,where:{id:_0x1c00x1e[_0xe7f2[93]][_0xe7f2[92]]}},_0x1c00x36={};_0x1c00x36[_0xe7f2[62]]= _[_0xe7f2[65]](db[_0xe7f2[64]][_0xe7f2[63]]);_0x1c00x36[_0xe7f2[67]]= _[_0xe7f2[65]](_0x1c00x1e[_0xe7f2[67]]);_0x1c00x36[_0xe7f2[69]]= _[_0xe7f2[70]](_0x1c00x36[_0xe7f2[62]],_0x1c00x36[_0xe7f2[67]]);_0x1c00x2a[_0xe7f2[71]]= _[_0xe7f2[70]](_0x1c00x36[_0xe7f2[62]],qs[_0xe7f2[72]](_0x1c00x1e[_0xe7f2[67]][_0xe7f2[72]]));_0x1c00x2a[_0xe7f2[71]]= (_0x1c00x2a[_0xe7f2[71]][_0xe7f2[73]])?_0x1c00x2a[_0xe7f2[71]]:_0x1c00x36[_0xe7f2[62]];if(_0x1c00x1e[_0xe7f2[67]][_0xe7f2[88]]){_0x1c00x2a[_0xe7f2[89]]= [{all:true}]};_0x1c00x2a= _[_0xe7f2[82]]({},_0x1c00x2a,_0x1c00x1e[_0xe7f2[86]]);return db[_0xe7f2[64]][_0xe7f2[94]](_0x1c00x2a)[_0xe7f2[40]](handleEntityNotFound(_0x1c00x24,null))[_0xe7f2[40]](respondWithResult(_0x1c00x24,null))[_0xe7f2[31]](handleError(_0x1c00x24,null))};exports[_0xe7f2[95]]= function(_0x1c00x1e,_0x1c00x24,_0x1c00x3c){var _0x1c00x3d;return db[_0xe7f2[64]][_0xe7f2[95]](_0x1c00x1e[_0xe7f2[109]],{raw:true})[_0xe7f2[40]](function(_0x1c00x27){_0x1c00x3d= _0x1c00x27;return db[_0xe7f2[64]][_0xe7f2[90]]({raw:true})})[_0xe7f2[40]](function(_0x1c00x3e){var _0x1c00x3f=fs[_0xe7f2[102]](path[_0xe7f2[100]](config[_0xe7f2[98]],_0xe7f2[99]),_0xe7f2[101]);var _0x1c00x40=fs[_0xe7f2[102]](path[_0xe7f2[100]](config[_0xe7f2[98]],_0xe7f2[103]),_0xe7f2[101]);var _0x1c00x41=ejs[_0xe7f2[104]](_0x1c00x3f,{trunks:_0x1c00x3e|| []});fs[_0xe7f2[106]](_0xe7f2[105],_0x1c00x41);if(_0x1c00x3d[_0xe7f2[107]]){var _0x1c00x42=ejs[_0xe7f2[104]](_0x1c00x40,{trunks:_0x1c00x3e|| []});fs[_0xe7f2[106]](_0xe7f2[108],_0x1c00x42)}})[_0xe7f2[40]](function(){return respondWithRpcPromise(_0xe7f2[96],_0xe7f2[95],{module:_0xe7f2[97]})})[_0xe7f2[40]](function(){return _0x1c00x3d})[_0xe7f2[40]](respondWithResult(_0x1c00x24,201))[_0xe7f2[31]](handleError(_0x1c00x24,null))};exports[_0xe7f2[56]]= function(_0x1c00x1e,_0x1c00x24,_0x1c00x3c){var _0x1c00x3d;return db[_0xe7f2[64]][_0xe7f2[94]]({where:{id:_0x1c00x1e[_0xe7f2[93]][_0xe7f2[92]]}})[_0xe7f2[40]](handleEntityNotFound(_0x1c00x24,null))[_0xe7f2[40]](saveUpdates(_0x1c00x1e[_0xe7f2[109]],null))[_0xe7f2[40]](function(_0x1c00x27){if(_0x1c00x27){_0x1c00x3d= _0x1c00x27;return db[_0xe7f2[64]][_0xe7f2[90]]({raw:true})}})[_0xe7f2[40]](function(_0x1c00x3e){if(_0x1c00x3e){var _0x1c00x3f=fs[_0xe7f2[102]](path[_0xe7f2[100]](config[_0xe7f2[98]],_0xe7f2[99]),_0xe7f2[101]);var _0x1c00x40=fs[_0xe7f2[102]](path[_0xe7f2[100]](config[_0xe7f2[98]],_0xe7f2[103]),_0xe7f2[101]);var _0x1c00x41=ejs[_0xe7f2[104]](_0x1c00x3f,{trunks:_0x1c00x3e|| []});fs[_0xe7f2[106]](_0xe7f2[105],_0x1c00x41);var _0x1c00x42=ejs[_0xe7f2[104]](_0x1c00x40,{trunks:_0x1c00x3e|| []});fs[_0xe7f2[106]](_0xe7f2[108],_0x1c00x42);return respondWithRpcPromise(_0xe7f2[96],_0xe7f2[56],{module:_0xe7f2[97]})};return null})[_0xe7f2[40]](function(_0x1c00x27){if(_0x1c00x27){return _0x1c00x3d}})[_0xe7f2[40]](respondWithResult(_0x1c00x24,null))[_0xe7f2[31]](handleError(_0x1c00x24,null))};exports[_0xe7f2[57]]= function(_0x1c00x1e,_0x1c00x24,_0x1c00x3c){var _0x1c00x3d;return db[_0xe7f2[64]][_0xe7f2[94]]({where:{id:_0x1c00x1e[_0xe7f2[93]][_0xe7f2[92]]}})[_0xe7f2[40]](handleEntityNotFound(_0x1c00x24,null))[_0xe7f2[40]](removeEntity(_0x1c00x24,null))[_0xe7f2[40]](function(){return db[_0xe7f2[64]][_0xe7f2[90]]({raw:true})})[_0xe7f2[40]](function(_0x1c00x3e){var _0x1c00x3f=fs[_0xe7f2[102]](path[_0xe7f2[100]](config[_0xe7f2[98]],_0xe7f2[99]),_0xe7f2[101]);var _0x1c00x40=fs[_0xe7f2[102]](path[_0xe7f2[100]](config[_0xe7f2[98]],_0xe7f2[103]),_0xe7f2[101]);var _0x1c00x41=ejs[_0xe7f2[104]](_0x1c00x3f,{trunks:_0x1c00x3e});var _0x1c00x42=ejs[_0xe7f2[104]](_0x1c00x40,{trunks:_0x1c00x3e});fs[_0xe7f2[106]](_0xe7f2[105],_0x1c00x41);fs[_0xe7f2[106]](_0xe7f2[108],_0x1c00x42);return respondWithRpcPromise(_0xe7f2[96],_0xe7f2[57],{module:_0xe7f2[97]})})[_0xe7f2[31]](handleError(_0x1c00x24,null))}
\ No newline at end of file
index ddc2786..85401da 100644 (file)
@@ -1 +1 @@
-var _0x5b9a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x74\x72\x75\x6E\x6B\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x54\x72\x75\x6E\x6B","\x74\x6F\x6F\x6C\x73\x5F\x74\x72\x75\x6E\x6B\x73","\x64\x65\x66\x69\x6E\x65"];_0x5b9a[0];var _=require(_0x5b9a[1]);var util=require(_0x5b9a[2]);var logger=require(_0x5b9a[4])(_0x5b9a[3]);var moment=require(_0x5b9a[5]);var BPromise=require(_0x5b9a[6]);var rp=require(_0x5b9a[7]);var attributes=require(_0x5b9a[8]);module[_0x5b9a[9]]= function(_0x7b04x8,_0x7b04x9){return _0x7b04x8[_0x5b9a[12]](_0x5b9a[10],attributes,{tableName:_0x5b9a[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x5b18=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x74\x72\x75\x6E\x6B\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x54\x72\x75\x6E\x6B","\x74\x6F\x6F\x6C\x73\x5F\x74\x72\x75\x6E\x6B\x73","\x64\x65\x66\x69\x6E\x65"];_0x5b18[0];var _=require(_0x5b18[1]);var util=require(_0x5b18[2]);var logger=require(_0x5b18[4])(_0x5b18[3]);var moment=require(_0x5b18[5]);var BPromise=require(_0x5b18[6]);var rp=require(_0x5b18[7]);var attributes=require(_0x5b18[8]);module[_0x5b18[9]]= function(_0xc52cx8,_0xc52cx9){return _0xc52cx8[_0x5b18[12]](_0x5b18[10],attributes,{tableName:_0x5b18[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 60a22a9..6d25f1a 100644 (file)
@@ -1 +1 @@
-var _0x7553=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x54\x72\x75\x6E\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x54\x72\x75\x6E\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x54\x72\x75\x6E\x6B","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x54\x72\x75\x6E\x6B","\x53\x68\x6F\x77\x54\x72\x75\x6E\x6B","\x66\x69\x6E\x64"];_0x7553[0];var _=require(_0x7553[1]);var util=require(_0x7553[2]);var moment=require(_0x7553[3]);var BPromise=require(_0x7553[4]);var rs=require(_0x7553[5]);var fs=require(_0x7553[6]);var db=require(_0x7553[8])[_0x7553[7]];var utils=require(_0x7553[9]);var logger=require(_0x7553[11])(_0x7553[10]);var config=require(_0x7553[12]);var jayson=require(_0x7553[13]);var client=jayson[_0x7553[15]][_0x7553[14]]({port:9002});function respondWithRpcPromise(_0x60e1xe,_0x60e1xf,_0x60e1x10){return  new BPromise(function(_0x60e1x11,_0x60e1x12){return client[_0x7553[28]](_0x60e1xe,_0x60e1x10)[_0x7553[27]](function(_0x60e1x14){logger[_0x7553[20]](_0x7553[16],_0x60e1xf,_0x7553[19]);logger[_0x7553[23]](_0x7553[21],_0x60e1xf,_0x7553[19],JSON[_0x7553[22]](_0x60e1x14));if(_0x60e1x14[_0x7553[17]]){if(_0x60e1x14[_0x7553[17]][_0x7553[24]]=== 500){logger[_0x7553[17]](_0x7553[16],_0x60e1xf,_0x60e1x14[_0x7553[17]][_0x7553[25]]);return _0x60e1x12(_0x60e1x14[_0x7553[17]][_0x7553[25]])};logger[_0x7553[17]](_0x7553[16],_0x60e1xf,_0x60e1x14[_0x7553[17]][_0x7553[25]]);return _0x60e1x11(_0x60e1x14[_0x7553[17]][_0x7553[25]])}else {logger[_0x7553[20]](_0x7553[16],_0x60e1xf,_0x7553[19]);_0x60e1x11(_0x60e1x14[_0x7553[26]][_0x7553[25]])}})[_0x7553[18]](function(_0x60e1x13){logger[_0x7553[17]](_0x7553[16],_0x60e1xf,_0x60e1x13);_0x60e1x12(_0x60e1x13)})})}exports[_0x7553[29]]= function(_0x60e1x10){var _0x60e1x15=this;return  new Promise(function(_0x60e1x11,_0x60e1x12){return db[_0x7553[40]][_0x7553[39]]({raw:_0x60e1x10[_0x7553[30]]?(_0x60e1x10[_0x7553[30]][_0x7553[31]]=== undefined)?true:false:true,where:_0x60e1x10[_0x7553[30]]?_0x60e1x10[_0x7553[30]][_0x7553[32]]|| null:null,attributes:_0x60e1x10[_0x7553[30]]?_0x60e1x10[_0x7553[30]][_0x7553[33]]|| null:null,limit:_0x60e1x10[_0x7553[30]]?_0x60e1x10[_0x7553[30]][_0x7553[34]]|| null:null,include:_0x60e1x10[_0x7553[30]]?(_0x60e1x10[_0x7553[30]][_0x7553[35]]?_[_0x7553[38]](_0x60e1x10[_0x7553[30]][_0x7553[35]],function(_0x60e1x16){return {model:db[_0x60e1x16[_0x7553[36]]],as:_0x60e1x16[_0x7553[37]],attributes:_0x60e1x16[_0x7553[33]],include:_0x60e1x16[_0x7553[35]]?_[_0x7553[38]](_0x60e1x16[_0x7553[35]],function(_0x60e1x17){return {model:db[_0x60e1x17[_0x7553[36]]],as:_0x60e1x17[_0x7553[37]],attributes:_0x60e1x17[_0x7553[33]],include:_0x60e1x17[_0x7553[35]]?_[_0x7553[38]](_0x60e1x17[_0x7553[35]],function(_0x60e1x18){return {model:db[_0x60e1x18[_0x7553[36]]],as:_0x60e1x18[_0x7553[37]],attributes:_0x60e1x18[_0x7553[33]]}}):[]}}):[]}}):[]):[]})[_0x7553[27]](function(_0x60e1x14){logger[_0x7553[20]](_0x7553[29],_0x60e1x10);logger[_0x7553[23]](_0x7553[29],_0x60e1x10,JSON[_0x7553[22]](_0x60e1x14));_0x60e1x11(_0x60e1x14)})[_0x7553[18]](function(_0x60e1x13){logger[_0x7553[17]](_0x7553[29],_0x60e1x13[_0x7553[25]],_0x60e1x10);_0x60e1x12(_0x60e1x15[_0x7553[17]](500,_0x60e1x13[_0x7553[25]]))})})};exports[_0x7553[41]]= function(_0x60e1x10){var _0x60e1x15=this;return  new Promise(function(_0x60e1x11,_0x60e1x12){return db[_0x7553[40]][_0x7553[42]]({raw:_0x60e1x10[_0x7553[30]]?(_0x60e1x10[_0x7553[30]][_0x7553[31]]=== undefined)?true:false:true,where:_0x60e1x10[_0x7553[30]]?_0x60e1x10[_0x7553[30]][_0x7553[32]]|| null:null,attributes:_0x60e1x10[_0x7553[30]]?_0x60e1x10[_0x7553[30]][_0x7553[33]]|| null:null,include:_0x60e1x10[_0x7553[30]]?(_0x60e1x10[_0x7553[30]][_0x7553[35]]?_[_0x7553[38]](_0x60e1x10[_0x7553[30]][_0x7553[35]],function(_0x60e1x16){return {model:db[_0x60e1x16[_0x7553[36]]],as:_0x60e1x16[_0x7553[37]],attributes:_0x60e1x16[_0x7553[33]],include:_0x60e1x16[_0x7553[35]]?_[_0x7553[38]](_0x60e1x16[_0x7553[35]],function(_0x60e1x17){return {model:db[_0x60e1x17[_0x7553[36]]],as:_0x60e1x17[_0x7553[37]],attributes:_0x60e1x17[_0x7553[33]],include:_0x60e1x17[_0x7553[35]]?_[_0x7553[38]](_0x60e1x17[_0x7553[35]],function(_0x60e1x18){return {model:db[_0x60e1x18[_0x7553[36]]],as:_0x60e1x18[_0x7553[37]],attributes:_0x60e1x18[_0x7553[33]]}}):[]}}):[]}}):[]):[]})[_0x7553[27]](function(_0x60e1x14){logger[_0x7553[20]](_0x7553[41],_0x60e1x10);logger[_0x7553[23]](_0x7553[41],_0x60e1x10,JSON[_0x7553[22]](_0x60e1x14));_0x60e1x11(_0x60e1x14)})[_0x7553[18]](function(_0x60e1x13){logger[_0x7553[17]](_0x7553[41],_0x60e1x13[_0x7553[25]],_0x60e1x10);_0x60e1x12(_0x60e1x15[_0x7553[17]](500,_0x60e1x13[_0x7553[25]]))})})}
\ No newline at end of file
+var _0xc73c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x54\x72\x75\x6E\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x54\x72\x75\x6E\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x54\x72\x75\x6E\x6B","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x54\x72\x75\x6E\x6B","\x53\x68\x6F\x77\x54\x72\x75\x6E\x6B","\x66\x69\x6E\x64"];_0xc73c[0];var _=require(_0xc73c[1]);var util=require(_0xc73c[2]);var moment=require(_0xc73c[3]);var BPromise=require(_0xc73c[4]);var rs=require(_0xc73c[5]);var fs=require(_0xc73c[6]);var db=require(_0xc73c[8])[_0xc73c[7]];var utils=require(_0xc73c[9]);var logger=require(_0xc73c[11])(_0xc73c[10]);var config=require(_0xc73c[12]);var jayson=require(_0xc73c[13]);var client=jayson[_0xc73c[15]][_0xc73c[14]]({port:9002});function respondWithRpcPromise(_0x34f5xe,_0x34f5xf,_0x34f5x10){return  new BPromise(function(_0x34f5x11,_0x34f5x12){return client[_0xc73c[28]](_0x34f5xe,_0x34f5x10)[_0xc73c[27]](function(_0x34f5x14){logger[_0xc73c[20]](_0xc73c[16],_0x34f5xf,_0xc73c[19]);logger[_0xc73c[23]](_0xc73c[21],_0x34f5xf,_0xc73c[19],JSON[_0xc73c[22]](_0x34f5x14));if(_0x34f5x14[_0xc73c[17]]){if(_0x34f5x14[_0xc73c[17]][_0xc73c[24]]=== 500){logger[_0xc73c[17]](_0xc73c[16],_0x34f5xf,_0x34f5x14[_0xc73c[17]][_0xc73c[25]]);return _0x34f5x12(_0x34f5x14[_0xc73c[17]][_0xc73c[25]])};logger[_0xc73c[17]](_0xc73c[16],_0x34f5xf,_0x34f5x14[_0xc73c[17]][_0xc73c[25]]);return _0x34f5x11(_0x34f5x14[_0xc73c[17]][_0xc73c[25]])}else {logger[_0xc73c[20]](_0xc73c[16],_0x34f5xf,_0xc73c[19]);_0x34f5x11(_0x34f5x14[_0xc73c[26]][_0xc73c[25]])}})[_0xc73c[18]](function(_0x34f5x13){logger[_0xc73c[17]](_0xc73c[16],_0x34f5xf,_0x34f5x13);_0x34f5x12(_0x34f5x13)})})}exports[_0xc73c[29]]= function(_0x34f5x10){var _0x34f5x15=this;return  new Promise(function(_0x34f5x11,_0x34f5x12){return db[_0xc73c[40]][_0xc73c[39]]({raw:_0x34f5x10[_0xc73c[30]]?(_0x34f5x10[_0xc73c[30]][_0xc73c[31]]=== undefined)?true:false:true,where:_0x34f5x10[_0xc73c[30]]?_0x34f5x10[_0xc73c[30]][_0xc73c[32]]|| null:null,attributes:_0x34f5x10[_0xc73c[30]]?_0x34f5x10[_0xc73c[30]][_0xc73c[33]]|| null:null,limit:_0x34f5x10[_0xc73c[30]]?_0x34f5x10[_0xc73c[30]][_0xc73c[34]]|| null:null,include:_0x34f5x10[_0xc73c[30]]?(_0x34f5x10[_0xc73c[30]][_0xc73c[35]]?_[_0xc73c[38]](_0x34f5x10[_0xc73c[30]][_0xc73c[35]],function(_0x34f5x16){return {model:db[_0x34f5x16[_0xc73c[36]]],as:_0x34f5x16[_0xc73c[37]],attributes:_0x34f5x16[_0xc73c[33]],include:_0x34f5x16[_0xc73c[35]]?_[_0xc73c[38]](_0x34f5x16[_0xc73c[35]],function(_0x34f5x17){return {model:db[_0x34f5x17[_0xc73c[36]]],as:_0x34f5x17[_0xc73c[37]],attributes:_0x34f5x17[_0xc73c[33]],include:_0x34f5x17[_0xc73c[35]]?_[_0xc73c[38]](_0x34f5x17[_0xc73c[35]],function(_0x34f5x18){return {model:db[_0x34f5x18[_0xc73c[36]]],as:_0x34f5x18[_0xc73c[37]],attributes:_0x34f5x18[_0xc73c[33]]}}):[]}}):[]}}):[]):[]})[_0xc73c[27]](function(_0x34f5x14){logger[_0xc73c[20]](_0xc73c[29],_0x34f5x10);logger[_0xc73c[23]](_0xc73c[29],_0x34f5x10,JSON[_0xc73c[22]](_0x34f5x14));_0x34f5x11(_0x34f5x14)})[_0xc73c[18]](function(_0x34f5x13){logger[_0xc73c[17]](_0xc73c[29],_0x34f5x13[_0xc73c[25]],_0x34f5x10);_0x34f5x12(_0x34f5x15[_0xc73c[17]](500,_0x34f5x13[_0xc73c[25]]))})})};exports[_0xc73c[41]]= function(_0x34f5x10){var _0x34f5x15=this;return  new Promise(function(_0x34f5x11,_0x34f5x12){return db[_0xc73c[40]][_0xc73c[42]]({raw:_0x34f5x10[_0xc73c[30]]?(_0x34f5x10[_0xc73c[30]][_0xc73c[31]]=== undefined)?true:false:true,where:_0x34f5x10[_0xc73c[30]]?_0x34f5x10[_0xc73c[30]][_0xc73c[32]]|| null:null,attributes:_0x34f5x10[_0xc73c[30]]?_0x34f5x10[_0xc73c[30]][_0xc73c[33]]|| null:null,include:_0x34f5x10[_0xc73c[30]]?(_0x34f5x10[_0xc73c[30]][_0xc73c[35]]?_[_0xc73c[38]](_0x34f5x10[_0xc73c[30]][_0xc73c[35]],function(_0x34f5x16){return {model:db[_0x34f5x16[_0xc73c[36]]],as:_0x34f5x16[_0xc73c[37]],attributes:_0x34f5x16[_0xc73c[33]],include:_0x34f5x16[_0xc73c[35]]?_[_0xc73c[38]](_0x34f5x16[_0xc73c[35]],function(_0x34f5x17){return {model:db[_0x34f5x17[_0xc73c[36]]],as:_0x34f5x17[_0xc73c[37]],attributes:_0x34f5x17[_0xc73c[33]],include:_0x34f5x17[_0xc73c[35]]?_[_0xc73c[38]](_0x34f5x17[_0xc73c[35]],function(_0x34f5x18){return {model:db[_0x34f5x18[_0xc73c[36]]],as:_0x34f5x18[_0xc73c[37]],attributes:_0x34f5x18[_0xc73c[33]]}}):[]}}):[]}}):[]):[]})[_0xc73c[27]](function(_0x34f5x14){logger[_0xc73c[20]](_0xc73c[41],_0x34f5x10);logger[_0xc73c[23]](_0xc73c[41],_0x34f5x10,JSON[_0xc73c[22]](_0x34f5x14));_0x34f5x11(_0x34f5x14)})[_0xc73c[18]](function(_0x34f5x13){logger[_0xc73c[17]](_0xc73c[41],_0x34f5x13[_0xc73c[25]],_0x34f5x10);_0x34f5x12(_0x34f5x15[_0xc73c[17]](500,_0x34f5x13[_0xc73c[25]]))})})}
\ No newline at end of file
index 6e451af..30c17f9 100644 (file)
@@ -1 +1 @@
-var _0x2f2a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x75\x73\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x76\x61\x74\x61\x72","\x67\x65\x74\x41\x76\x61\x74\x61\x72","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x75\x65\x73","\x67\x65\x74\x51\x75\x65\x75\x65\x73","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x75\x65\x73\x5F\x72\x74","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x52\x74","\x2F\x3A\x69\x64\x2F\x67\x72\x6F\x75\x70\x73","\x67\x65\x74\x47\x72\x6F\x75\x70\x73","\x2F\x3A\x69\x64\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x67\x65\x74\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x2F\x3A\x69\x64\x2F\x63\x68\x61\x74\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x6D\x61\x69\x6C\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x73\x6D\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x61\x78\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x74\x65\x61\x6D\x73","\x67\x65\x74\x54\x65\x61\x6D\x73","\x2F\x3A\x69\x64\x2F\x6C\x69\x73\x74\x73","\x67\x65\x74\x4C\x69\x73\x74\x73","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x2F\x63\x72\x65\x61\x74\x65\x5F\x6D\x61\x6E\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x43\x6F\x6E\x74\x61\x63\x74\x73","\x63\x72\x65\x61\x74\x65","\x61\x64\x64\x51\x75\x65\x75\x65\x73","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F","\x6A\x6F\x69\x6E","\x25\x73\x2D\x25\x73","\x6E\x6F\x77","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x64\x69\x73\x6B\x53\x74\x6F\x72\x61\x67\x65","\x66\x69\x6C\x65","\x73\x69\x6E\x67\x6C\x65","\x61\x64\x64\x41\x76\x61\x74\x61\x72","\x2F\x3A\x69\x64\x2F\x6C\x6F\x67\x69\x6E","\x6C\x6F\x67\x69\x6E","\x2F\x3A\x69\x64\x2F\x6C\x6F\x67\x6F\x75\x74","\x6C\x6F\x67\x6F\x75\x74","\x2F\x3A\x69\x64\x2F\x70\x61\x75\x73\x65","\x70\x61\x75\x73\x65","\x2F\x3A\x69\x64\x2F\x75\x6E\x70\x61\x75\x73\x65","\x75\x6E\x70\x61\x75\x73\x65","\x61\x64\x64\x54\x65\x61\x6D\x73","\x2F\x3A\x69\x64\x2F\x63\x68\x61\x74\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x61\x64\x64\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x6D\x61\x69\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x61\x64\x64\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x61\x78\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x61\x64\x64\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x73\x6D\x73\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x61\x64\x64\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x61\x64\x64\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x68\x61\x6E\x67\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x6D\x6F\x76\x65\x51\x75\x65\x75\x65\x73","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x72\x65\x6D\x6F\x76\x65\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x72\x65\x6D\x6F\x76\x65\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x72\x65\x6D\x6F\x76\x65\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x72\x65\x6D\x6F\x76\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x2f2a[0];var multer=require(_0x2f2a[1]);var util=require(_0x2f2a[2]);var path=require(_0x2f2a[3]);var express=require(_0x2f2a[4]);var router=express.Router();var auth=require(_0x2f2a[5]);var interaction=require(_0x2f2a[6]);var config=require(_0x2f2a[7]);var controller=require(_0x2f2a[8]);router[_0x2f2a[12]](_0x2f2a[9],auth[_0x2f2a[10]](),controller[_0x2f2a[11]]);router[_0x2f2a[12]](_0x2f2a[13],auth[_0x2f2a[10]](),controller[_0x2f2a[14]]);router[_0x2f2a[12]](_0x2f2a[15],auth[_0x2f2a[10]](),controller[_0x2f2a[16]]);router[_0x2f2a[12]](_0x2f2a[17],controller[_0x2f2a[18]]);router[_0x2f2a[12]](_0x2f2a[19],auth[_0x2f2a[10]](),controller[_0x2f2a[20]]);router[_0x2f2a[12]](_0x2f2a[21],auth[_0x2f2a[10]](),controller[_0x2f2a[22]]);router[_0x2f2a[12]](_0x2f2a[23],auth[_0x2f2a[10]](),controller[_0x2f2a[24]]);router[_0x2f2a[12]](_0x2f2a[25],auth[_0x2f2a[10]](),controller[_0x2f2a[26]]);router[_0x2f2a[12]](_0x2f2a[27],auth[_0x2f2a[10]](),controller[_0x2f2a[28]]);router[_0x2f2a[12]](_0x2f2a[29],auth[_0x2f2a[10]](),controller[_0x2f2a[30]]);router[_0x2f2a[12]](_0x2f2a[31],auth[_0x2f2a[10]](),controller[_0x2f2a[32]]);router[_0x2f2a[12]](_0x2f2a[33],auth[_0x2f2a[10]](),controller[_0x2f2a[34]]);router[_0x2f2a[12]](_0x2f2a[35],auth[_0x2f2a[10]](),controller[_0x2f2a[36]]);router[_0x2f2a[12]](_0x2f2a[37],auth[_0x2f2a[10]](),controller[_0x2f2a[38]]);router[_0x2f2a[12]](_0x2f2a[39],auth[_0x2f2a[10]](),controller[_0x2f2a[40]]);router[_0x2f2a[12]](_0x2f2a[41],auth[_0x2f2a[10]](),controller[_0x2f2a[42]]);router[_0x2f2a[12]](_0x2f2a[43],auth[_0x2f2a[10]](),controller[_0x2f2a[44]]);router[_0x2f2a[47]](_0x2f2a[45],auth[_0x2f2a[10]](),controller[_0x2f2a[46]]);router[_0x2f2a[47]](_0x2f2a[19],auth[_0x2f2a[10]](),controller[_0x2f2a[48]]);router[_0x2f2a[47]](_0x2f2a[9],auth[_0x2f2a[10]](),controller[_0x2f2a[49]]);router[_0x2f2a[47]](_0x2f2a[21],auth[_0x2f2a[10]](),controller[_0x2f2a[50]]);var upload=multer({storage:multer[_0x2f2a[58]]({destination:function(_0xf5dbxb,_0xf5dbxc,_0xf5dbxd){_0xf5dbxd(null,path[_0x2f2a[53]](config[_0x2f2a[51]],_0x2f2a[52]))},filename:function(_0xf5dbxb,_0xf5dbxc,_0xf5dbxd){_0xf5dbxd(null,util[_0x2f2a[57]](_0x2f2a[54],Date[_0x2f2a[55]](),_0xf5dbxc[_0x2f2a[56]]))}})});router[_0x2f2a[47]](_0x2f2a[17],upload[_0x2f2a[60]](_0x2f2a[59]),controller[_0x2f2a[61]]);router[_0x2f2a[47]](_0x2f2a[62],auth[_0x2f2a[10]](),controller[_0x2f2a[63]]);router[_0x2f2a[47]](_0x2f2a[64],auth[_0x2f2a[10]](),controller[_0x2f2a[65]]);router[_0x2f2a[47]](_0x2f2a[66],auth[_0x2f2a[10]](),controller[_0x2f2a[67]]);router[_0x2f2a[47]](_0x2f2a[68],auth[_0x2f2a[10]](),controller[_0x2f2a[69]]);router[_0x2f2a[47]](_0x2f2a[39],auth[_0x2f2a[10]](),controller[_0x2f2a[70]]);router[_0x2f2a[47]](_0x2f2a[71],auth[_0x2f2a[10]](),controller[_0x2f2a[72]]);router[_0x2f2a[47]](_0x2f2a[73],auth[_0x2f2a[10]](),controller[_0x2f2a[74]]);router[_0x2f2a[47]](_0x2f2a[75],auth[_0x2f2a[10]](),controller[_0x2f2a[76]]);router[_0x2f2a[47]](_0x2f2a[77],auth[_0x2f2a[10]](),controller[_0x2f2a[78]]);router[_0x2f2a[47]](_0x2f2a[79],auth[_0x2f2a[10]](),controller[_0x2f2a[80]]);router[_0x2f2a[82]](_0x2f2a[15],auth[_0x2f2a[10]](),controller[_0x2f2a[81]]);router[_0x2f2a[82]](_0x2f2a[83],auth[_0x2f2a[10]](),controller[_0x2f2a[84]]);router[_0x2f2a[86]](_0x2f2a[21],auth[_0x2f2a[10]](),controller[_0x2f2a[85]]);router[_0x2f2a[86]](_0x2f2a[39],auth[_0x2f2a[10]](),controller[_0x2f2a[87]]);router[_0x2f2a[86]](_0x2f2a[15],auth[_0x2f2a[10]](),controller[_0x2f2a[88]]);router[_0x2f2a[86]](_0x2f2a[71],auth[_0x2f2a[10]](),controller[_0x2f2a[89]]);router[_0x2f2a[86]](_0x2f2a[73],auth[_0x2f2a[10]](),controller[_0x2f2a[90]]);router[_0x2f2a[86]](_0x2f2a[75],auth[_0x2f2a[10]](),controller[_0x2f2a[91]]);router[_0x2f2a[86]](_0x2f2a[77],auth[_0x2f2a[10]](),controller[_0x2f2a[92]]);router[_0x2f2a[86]](_0x2f2a[79],auth[_0x2f2a[10]](),controller[_0x2f2a[93]]);module[_0x2f2a[94]]= router
\ No newline at end of file
+var _0x37e8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x75\x73\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x76\x61\x74\x61\x72","\x67\x65\x74\x41\x76\x61\x74\x61\x72","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x75\x65\x73","\x67\x65\x74\x51\x75\x65\x75\x65\x73","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x75\x65\x73\x5F\x72\x74","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x52\x74","\x2F\x3A\x69\x64\x2F\x67\x72\x6F\x75\x70\x73","\x67\x65\x74\x47\x72\x6F\x75\x70\x73","\x2F\x3A\x69\x64\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x67\x65\x74\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x2F\x3A\x69\x64\x2F\x63\x68\x61\x74\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x6D\x61\x69\x6C\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x73\x6D\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x61\x78\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x74\x65\x61\x6D\x73","\x67\x65\x74\x54\x65\x61\x6D\x73","\x2F\x3A\x69\x64\x2F\x6C\x69\x73\x74\x73","\x67\x65\x74\x4C\x69\x73\x74\x73","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x2F\x63\x72\x65\x61\x74\x65\x5F\x6D\x61\x6E\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x43\x6F\x6E\x74\x61\x63\x74\x73","\x63\x72\x65\x61\x74\x65","\x61\x64\x64\x51\x75\x65\x75\x65\x73","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F","\x6A\x6F\x69\x6E","\x25\x73\x2D\x25\x73","\x6E\x6F\x77","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x64\x69\x73\x6B\x53\x74\x6F\x72\x61\x67\x65","\x66\x69\x6C\x65","\x73\x69\x6E\x67\x6C\x65","\x61\x64\x64\x41\x76\x61\x74\x61\x72","\x2F\x3A\x69\x64\x2F\x6C\x6F\x67\x69\x6E","\x6C\x6F\x67\x69\x6E","\x2F\x3A\x69\x64\x2F\x6C\x6F\x67\x6F\x75\x74","\x6C\x6F\x67\x6F\x75\x74","\x2F\x3A\x69\x64\x2F\x70\x61\x75\x73\x65","\x70\x61\x75\x73\x65","\x2F\x3A\x69\x64\x2F\x75\x6E\x70\x61\x75\x73\x65","\x75\x6E\x70\x61\x75\x73\x65","\x61\x64\x64\x54\x65\x61\x6D\x73","\x2F\x3A\x69\x64\x2F\x63\x68\x61\x74\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x61\x64\x64\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x6D\x61\x69\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x61\x64\x64\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x61\x78\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x61\x64\x64\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x73\x6D\x73\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x61\x64\x64\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x61\x64\x64\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x68\x61\x6E\x67\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x6D\x6F\x76\x65\x51\x75\x65\x75\x65\x73","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x72\x65\x6D\x6F\x76\x65\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x72\x65\x6D\x6F\x76\x65\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x72\x65\x6D\x6F\x76\x65\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x72\x65\x6D\x6F\x76\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x37e8[0];var multer=require(_0x37e8[1]);var util=require(_0x37e8[2]);var path=require(_0x37e8[3]);var express=require(_0x37e8[4]);var router=express.Router();var auth=require(_0x37e8[5]);var interaction=require(_0x37e8[6]);var config=require(_0x37e8[7]);var controller=require(_0x37e8[8]);router[_0x37e8[12]](_0x37e8[9],auth[_0x37e8[10]](),controller[_0x37e8[11]]);router[_0x37e8[12]](_0x37e8[13],auth[_0x37e8[10]](),controller[_0x37e8[14]]);router[_0x37e8[12]](_0x37e8[15],auth[_0x37e8[10]](),controller[_0x37e8[16]]);router[_0x37e8[12]](_0x37e8[17],controller[_0x37e8[18]]);router[_0x37e8[12]](_0x37e8[19],auth[_0x37e8[10]](),controller[_0x37e8[20]]);router[_0x37e8[12]](_0x37e8[21],auth[_0x37e8[10]](),controller[_0x37e8[22]]);router[_0x37e8[12]](_0x37e8[23],auth[_0x37e8[10]](),controller[_0x37e8[24]]);router[_0x37e8[12]](_0x37e8[25],auth[_0x37e8[10]](),controller[_0x37e8[26]]);router[_0x37e8[12]](_0x37e8[27],auth[_0x37e8[10]](),controller[_0x37e8[28]]);router[_0x37e8[12]](_0x37e8[29],auth[_0x37e8[10]](),controller[_0x37e8[30]]);router[_0x37e8[12]](_0x37e8[31],auth[_0x37e8[10]](),controller[_0x37e8[32]]);router[_0x37e8[12]](_0x37e8[33],auth[_0x37e8[10]](),controller[_0x37e8[34]]);router[_0x37e8[12]](_0x37e8[35],auth[_0x37e8[10]](),controller[_0x37e8[36]]);router[_0x37e8[12]](_0x37e8[37],auth[_0x37e8[10]](),controller[_0x37e8[38]]);router[_0x37e8[12]](_0x37e8[39],auth[_0x37e8[10]](),controller[_0x37e8[40]]);router[_0x37e8[12]](_0x37e8[41],auth[_0x37e8[10]](),controller[_0x37e8[42]]);router[_0x37e8[12]](_0x37e8[43],auth[_0x37e8[10]](),controller[_0x37e8[44]]);router[_0x37e8[47]](_0x37e8[45],auth[_0x37e8[10]](),controller[_0x37e8[46]]);router[_0x37e8[47]](_0x37e8[19],auth[_0x37e8[10]](),controller[_0x37e8[48]]);router[_0x37e8[47]](_0x37e8[9],auth[_0x37e8[10]](),controller[_0x37e8[49]]);router[_0x37e8[47]](_0x37e8[21],auth[_0x37e8[10]](),controller[_0x37e8[50]]);var upload=multer({storage:multer[_0x37e8[58]]({destination:function(_0xd2bexb,_0xd2bexc,_0xd2bexd){_0xd2bexd(null,path[_0x37e8[53]](config[_0x37e8[51]],_0x37e8[52]))},filename:function(_0xd2bexb,_0xd2bexc,_0xd2bexd){_0xd2bexd(null,util[_0x37e8[57]](_0x37e8[54],Date[_0x37e8[55]](),_0xd2bexc[_0x37e8[56]]))}})});router[_0x37e8[47]](_0x37e8[17],upload[_0x37e8[60]](_0x37e8[59]),controller[_0x37e8[61]]);router[_0x37e8[47]](_0x37e8[62],auth[_0x37e8[10]](),controller[_0x37e8[63]]);router[_0x37e8[47]](_0x37e8[64],auth[_0x37e8[10]](),controller[_0x37e8[65]]);router[_0x37e8[47]](_0x37e8[66],auth[_0x37e8[10]](),controller[_0x37e8[67]]);router[_0x37e8[47]](_0x37e8[68],auth[_0x37e8[10]](),controller[_0x37e8[69]]);router[_0x37e8[47]](_0x37e8[39],auth[_0x37e8[10]](),controller[_0x37e8[70]]);router[_0x37e8[47]](_0x37e8[71],auth[_0x37e8[10]](),controller[_0x37e8[72]]);router[_0x37e8[47]](_0x37e8[73],auth[_0x37e8[10]](),controller[_0x37e8[74]]);router[_0x37e8[47]](_0x37e8[75],auth[_0x37e8[10]](),controller[_0x37e8[76]]);router[_0x37e8[47]](_0x37e8[77],auth[_0x37e8[10]](),controller[_0x37e8[78]]);router[_0x37e8[47]](_0x37e8[79],auth[_0x37e8[10]](),controller[_0x37e8[80]]);router[_0x37e8[82]](_0x37e8[15],auth[_0x37e8[10]](),controller[_0x37e8[81]]);router[_0x37e8[82]](_0x37e8[83],auth[_0x37e8[10]](),controller[_0x37e8[84]]);router[_0x37e8[86]](_0x37e8[21],auth[_0x37e8[10]](),controller[_0x37e8[85]]);router[_0x37e8[86]](_0x37e8[39],auth[_0x37e8[10]](),controller[_0x37e8[87]]);router[_0x37e8[86]](_0x37e8[15],auth[_0x37e8[10]](),controller[_0x37e8[88]]);router[_0x37e8[86]](_0x37e8[71],auth[_0x37e8[10]](),controller[_0x37e8[89]]);router[_0x37e8[86]](_0x37e8[73],auth[_0x37e8[10]](),controller[_0x37e8[90]]);router[_0x37e8[86]](_0x37e8[75],auth[_0x37e8[10]](),controller[_0x37e8[91]]);router[_0x37e8[86]](_0x37e8[77],auth[_0x37e8[10]](),controller[_0x37e8[92]]);router[_0x37e8[86]](_0x37e8[79],auth[_0x37e8[10]](),controller[_0x37e8[93]]);module[_0x37e8[94]]= router
\ No newline at end of file
index ebefeaf..cd90cfd 100644 (file)
@@ -1 +1 @@
-var _0xf2fe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x64\x65\x66\x61\x75\x6C\x74\x75\x73\x65\x72","\x54\x68\x65\x20\x6E\x61\x6D\x65\x20\x6F\x66\x20\x74\x68\x65\x20\x75\x73\x65\x72","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x66\x6F\x72\x6D\x61\x74","\x65\x6D\x61\x69\x6C","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x6C\x6F\x63\x61\x6C","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x42\x4F\x4F\x4C\x45\x41\x4E","\x44\x41\x54\x45","\x44\x45\x46\x41\x55\x4C\x54\x20\x50\x41\x55\x53\x45","\x49\x4E\x54\x45\x47\x45\x52","\x64\x79\x6E\x61\x6D\x69\x63","\x66\x72\x69\x65\x6E\x64","\x70\x65\x65\x72","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x4E\x4F\x54\x5F\x53\x43\x52\x45\x45\x4E\x45\x44","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x50\x41\x53\x53\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x46\x41\x49\x4C\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x41\x4C\x4C\x4F\x57\x45\x44","\x50\x52\x4F\x48\x49\x42\x5F\x4E\x4F\x54\x5F\x53\x43\x52\x45\x45\x4E\x45\x44","\x50\x52\x4F\x48\x49\x42\x5F\x50\x41\x53\x53\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x50\x52\x4F\x48\x49\x42\x5F\x46\x41\x49\x4C\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x50\x52\x4F\x48\x49\x42","\x75\x64\x70","\x74\x72\x61\x6E\x73\x70\x6F\x72\x74","\x2C","\x6A\x6F\x69\x6E","\x73\x70\x6C\x69\x74","\x53\x74\x72\x69\x6E\x67\x20\x69\x73\x20\x64\x65\x70\x72\x65\x63\x61\x74\x65\x64\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x61\x6E\x20\x41\x72\x72\x61\x79\x20\x61\x73\x20\x5B\x22\x75\x64\x70\x22\x2C\x20\x22\x74\x63\x70\x22\x5D","\x72\x66\x63\x32\x38\x33\x33","\x69\x6E\x66\x6F","\x73\x68\x6F\x72\x74\x69\x6E\x66\x6F","\x69\x6E\x62\x61\x6E\x64","\x61\x75\x74\x6F","\x79\x65\x73","\x6E\x6F","\x6E\x6F\x6E\x61\x74","\x75\x70\x64\x61\x74\x65","\x6F\x75\x74\x67\x6F\x69\x6E\x67","\x66\x6F\x72\x63\x65\x5F\x72\x70\x6F\x72\x74\x2C\x63\x6F\x6D\x65\x64\x69\x61","\x6E\x61\x74","\x53\x74\x72\x69\x6E\x67\x20\x69\x73\x20\x64\x65\x70\x72\x65\x63\x61\x74\x65\x64\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x61\x6E\x20\x41\x72\x72\x61\x79\x20\x61\x73\x20\x5B\x22\x66\x6F\x72\x63\x65\x5F\x72\x70\x6F\x72\x74\x22\x2C\x20\x22\x63\x6F\x6D\x65\x64\x69\x61\x22\x5D","\x65\x6E","\x61\x6C\x6C","\x75\x6C\x61\x77\x3B\x61\x6C\x61\x77\x3B\x67\x73\x6D","\x61\x6C\x6C\x6F\x77","\x3B","\x53\x74\x72\x69\x6E\x67\x20\x69\x73\x20\x64\x65\x70\x72\x65\x63\x61\x74\x65\x64\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x61\x6E\x20\x41\x72\x72\x61\x79\x20\x61\x73\x20\x5B\x22\x75\x6C\x61\x77\x22\x2C\x20\x22\x61\x6C\x61\x77\x22\x2C\x20\x22\x67\x73\x6D\x22\x5D","\x69\x6E\x73\x65\x63\x75\x72\x65","\x53\x74\x72\x69\x6E\x67\x20\x69\x73\x20\x64\x65\x70\x72\x65\x63\x61\x74\x65\x64\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x61\x6E\x20\x41\x72\x72\x61\x79\x20\x61\x73\x20\x5B\x22\x70\x6F\x72\x74\x22\x2C\x20\x22\x69\x6E\x76\x69\x74\x65\x22\x5D","\x6E\x65\x76\x65\x72","\x22\x22\x20\x3C\x3E","\x61\x6C\x77\x61\x79\x73","\x61\x63\x63\x65\x70\x74","\x72\x65\x66\x75\x73\x65","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x75\x61\x63","\x75\x61\x73","\x66\x69\x6E\x67\x65\x72\x70\x72\x69\x6E\x74","\x63\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65","\x61\x63\x74\x69\x76\x65","\x70\x61\x73\x73\x69\x76\x65","\x61\x63\x74\x70\x61\x73\x73","\x75\x70\x64\x61\x74\x65\x2C\x6E\x6F\x6E\x61\x74","\x73\x68\x6F\x77\x57\x65\x62\x42\x61\x72","\x67\x65\x74","\x69\x73\x41\x72\x72\x61\x79","\x77\x73\x73","\x65\x6E\x63\x72\x79\x70\x74\x69\x6F\x6E","\x61\x76\x70\x66","\x66\x6F\x72\x63\x65\x5F\x61\x76\x70","\x69\x63\x65\x73\x75\x70\x70\x6F\x72\x74","\x64\x74\x6C\x73\x65\x6E\x61\x62\x6C\x65","\x64\x74\x6C\x73\x76\x65\x72\x69\x66\x79","\x64\x74\x6C\x73\x73\x65\x74\x75\x70","\x64\x74\x6C\x73\x63\x65\x72\x74\x66\x69\x6C\x65","\x64\x74\x6C\x73\x70\x72\x69\x76\x61\x74\x65\x6B\x65\x79","\x72\x74\x63\x70\x5F\x6D\x75\x78","\x2F\x65\x74\x63\x2F\x70\x6B\x69\x2F\x74\x6C\x73\x2F\x63\x65\x72\x74\x73\x2F\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x72\x74","\x2F\x65\x74\x63\x2F\x70\x6B\x69\x2F\x74\x6C\x73\x2F\x70\x72\x69\x76\x61\x74\x65\x2F\x6D\x6F\x74\x69\x6F\x6E\x2E\x6B\x65\x79","\x54\x45\x58\x54","\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73","\x6D\x61\x70",""];_0xf2fe[0];var Sequelize=require(_0xf2fe[1]);var moment=require(_0xf2fe[2]);var util=require(_0xf2fe[3]);var _=require(_0xf2fe[4]);module[_0xf2fe[5]]= {name:{type:Sequelize[_0xf2fe[6]],allowNull:false,unique:_0xf2fe[7],validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i},set:function(_0x57c2x5){this[_0xf2fe[8]](_0xf2fe[7],_0x57c2x5);this[_0xf2fe[8]](_0xf2fe[9],_0x57c2x5)},comment:_0xf2fe[10]},fullname:{type:Sequelize[_0xf2fe[6]],allowNull:false,set:function(_0x57c2x6){this[_0xf2fe[8]](_0xf2fe[11],_0x57c2x6);this[_0xf2fe[8]](_0xf2fe[12],util[_0xf2fe[16]](_0xf2fe[13],_0x57c2x6,this[_0xf2fe[15]](_0xf2fe[14])))}},alias:{type:Sequelize[_0xf2fe[6]]},email:{type:Sequelize[_0xf2fe[6]],allowNull:false,unique:_0xf2fe[17],validate:{isEmail:true},set:function(_0x57c2x7){if(_0x57c2x7){this[_0xf2fe[8]](_0xf2fe[17],_0x57c2x7[_0xf2fe[18]]())}}},role:{type:Sequelize.ENUM(_0xf2fe[19],_0xf2fe[20],_0xf2fe[21],_0xf2fe[22]),allowNull:false},password:{type:Sequelize[_0xf2fe[6]],allowNull:false,validate:{notEmpty:true}},provider:{type:Sequelize[_0xf2fe[6]],defaultValue:_0xf2fe[23]},internal:{type:Sequelize.INTEGER(11),allowNull:false,unique:_0xf2fe[14],set:function(_0x57c2x8){this[_0xf2fe[8]](_0xf2fe[14],_0x57c2x8);this[_0xf2fe[8]](_0xf2fe[24],_0x57c2x8);this[_0xf2fe[8]](_0xf2fe[12],util[_0xf2fe[16]](_0xf2fe[13],this[_0xf2fe[15]](_0xf2fe[11]),_0x57c2x8))}},salt:{type:Sequelize[_0xf2fe[6]]},phone:{type:Sequelize[_0xf2fe[6]]},mobile:{type:Sequelize[_0xf2fe[6]]},address:{type:Sequelize[_0xf2fe[6]]},zipcode:{type:Sequelize[_0xf2fe[6]]},userpic:{type:Sequelize[_0xf2fe[6]]},city:{type:Sequelize[_0xf2fe[6]]},country:{type:Sequelize[_0xf2fe[6]]},online:{type:Sequelize[_0xf2fe[25]],defaultValue:false},lastLoginAt:{type:Sequelize[_0xf2fe[26]]},voicePause:{type:Sequelize[_0xf2fe[25]],defaultValue:false},chatPause:{type:Sequelize[_0xf2fe[25]],defaultValue:false},mailPause:{type:Sequelize[_0xf2fe[25]],defaultValue:false},faxPause:{type:Sequelize[_0xf2fe[25]],defaultValue:false},smsPause:{type:Sequelize[_0xf2fe[25]],defaultValue:false},openchannelPause:{type:Sequelize[_0xf2fe[25]],defaultValue:false},pauseType:{type:Sequelize[_0xf2fe[6]],defaultValue:_0xf2fe[27]},lastPauseAt:{type:Sequelize[_0xf2fe[26]]},chatCapacity:{type:Sequelize[_0xf2fe[28]],defaultValue:0},mailCapacity:{type:Sequelize[_0xf2fe[28]],defaultValue:0},faxCapacity:{type:Sequelize[_0xf2fe[28]],defaultValue:0},smsCapacity:{type:Sequelize[_0xf2fe[28]],defaultValue:0},openchannelCapacity:{type:Sequelize[_0xf2fe[28]],defaultValue:0},phoneBarAutoAnswer:{type:Sequelize[_0xf2fe[25]],defaultValue:false},phoneBarEnableSettings:{type:Sequelize[_0xf2fe[25]],defaultValue:true},phoneBarListenPort:{type:Sequelize.INTEGER(5),defaultValue:5060},phoneBarExpires:{type:Sequelize.INTEGER(5),defaultValue:120},phoneBarRemoteControl:{type:Sequelize[_0xf2fe[25]],defaultValue:false},phoneBarRemoteControlPort:{type:Sequelize[_0xf2fe[28]],defaultValue:9888},phoneBarEnableRecording:{type:Sequelize[_0xf2fe[25]],defaultValue:false},phoneBarRingInUse:{type:Sequelize[_0xf2fe[25]],defaultValue:false},chanspy:{type:Sequelize[_0xf2fe[25]],defaultValue:false},description:{type:Sequelize[_0xf2fe[6]],allowNull:true},host:{type:Sequelize[_0xf2fe[6]],allowNull:true,defaultValue:_0xf2fe[29]},ipaddr:{type:Sequelize[_0xf2fe[6]],allowNull:true},port:{type:Sequelize.INTEGER(5),allowNull:true},regseconds:{type:Sequelize.INTEGER(11),allowNull:true},fullcontact:{type:Sequelize[_0xf2fe[6]],allowNull:true},regserver:{type:Sequelize[_0xf2fe[6]],allowNull:true},useragent:{type:Sequelize[_0xf2fe[6]],allowNull:true},lastms:{type:Sequelize.INTEGER(11),allowNull:true},type:{type:Sequelize.ENUM(_0xf2fe[30],_0xf2fe[20],_0xf2fe[31]),allowNull:true,defaultValue:_0xf2fe[30]},context:{type:Sequelize[_0xf2fe[6]],allowNull:true,defaultValue:_0xf2fe[32]},callingpres:{type:Sequelize.ENUM(_0xf2fe[33],_0xf2fe[34],_0xf2fe[35],_0xf2fe[36],_0xf2fe[37],_0xf2fe[38],_0xf2fe[39],_0xf2fe[40]),allowNull:true},deny:{type:Sequelize[_0xf2fe[6]],allowNull:true},permit:{type:Sequelize[_0xf2fe[6]],allowNull:true},secret:{type:Sequelize[_0xf2fe[6]],allowNull:true},md5secret:{type:Sequelize[_0xf2fe[6]],allowNull:true},remotesecret:{type:Sequelize[_0xf2fe[6]],allowNull:true},transport:{type:Sequelize[_0xf2fe[6]],allowNull:true,defaultValue:_0xf2fe[41],set:function(_0x57c2x9){this[_0xf2fe[8]](_0xf2fe[42],_0x57c2x9?_0x57c2x9[_0xf2fe[44]](_0xf2fe[43]):null)},get:function(){return this[_0xf2fe[15]](_0xf2fe[42])?this[_0xf2fe[15]](_0xf2fe[42])[_0xf2fe[45]](_0xf2fe[43]):null},comment:_0xf2fe[46]},dtmfmode:{type:Sequelize.ENUM(_0xf2fe[47],_0xf2fe[48],_0xf2fe[49],_0xf2fe[50],_0xf2fe[51]),allowNull:true,defaultValue:_0xf2fe[47]},directmedia:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53],_0xf2fe[54],_0xf2fe[55],_0xf2fe[56]),allowNull:true,defaultValue:_0xf2fe[53]},directrtpsetup:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true,defaultValue:_0xf2fe[53]},directmediapermit:{type:Sequelize[_0xf2fe[6]],allowNull:true},directmediadeny:{type:Sequelize[_0xf2fe[6]],allowNull:true},nat:{type:Sequelize[_0xf2fe[6]],allowNull:true,defaultValue:_0xf2fe[57],set:function(_0x57c2x9){this[_0xf2fe[8]](_0xf2fe[58],_0x57c2x9?_0x57c2x9[_0xf2fe[44]](_0xf2fe[43]):null)},get:function(){return this[_0xf2fe[15]](_0xf2fe[58])?this[_0xf2fe[15]](_0xf2fe[58])[_0xf2fe[45]](_0xf2fe[43]):null},comment:_0xf2fe[59]},callgroup:{type:Sequelize[_0xf2fe[6]]},namedcallgroup:{type:Sequelize[_0xf2fe[6]]},pickupgroup:{type:Sequelize[_0xf2fe[6]]},namedpickupgroup:{type:Sequelize[_0xf2fe[6]]},language:{type:Sequelize[_0xf2fe[6]],defaultValue:_0xf2fe[60]},tonezone:{type:Sequelize[_0xf2fe[6]]},disallow:{type:Sequelize[_0xf2fe[6]],allowNull:false,defaultValue:_0xf2fe[61]},allow:{type:Sequelize[_0xf2fe[6]],allowNull:false,defaultValue:_0xf2fe[62],set:function(_0x57c2x9){this[_0xf2fe[8]](_0xf2fe[63],_0x57c2x9?_0x57c2x9[_0xf2fe[44]](_0xf2fe[64]):_0xf2fe[62])},get:function(){return this[_0xf2fe[15]](_0xf2fe[63])?this[_0xf2fe[15]](_0xf2fe[63])[_0xf2fe[45]](_0xf2fe[64]):null},comment:_0xf2fe[65]},autoframing:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true},insecure:{type:Sequelize[_0xf2fe[6]],allowNull:true,set:function(_0x57c2x9){this[_0xf2fe[8]](_0xf2fe[66],_0x57c2x9?_0x57c2x9[_0xf2fe[44]](_0xf2fe[43]):null)},get:function(){return this[_0xf2fe[15]](_0xf2fe[66])?this[_0xf2fe[15]](_0xf2fe[66])[_0xf2fe[45]](_0xf2fe[43]):null},comment:_0xf2fe[67]},trustrpid:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true,defaultValue:_0xf2fe[53]},trust_id_outbound:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true,defaultValue:_0xf2fe[53]},progressinband:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53],_0xf2fe[68]),allowNull:true},promiscredir:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true},useclientcode:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true},accountcode:{type:Sequelize.INTEGER(11),allowNull:true},setvar:{type:Sequelize[_0xf2fe[6]],allowNull:true},callerid:{type:Sequelize[_0xf2fe[6]],allowNull:true,defaultValue:_0xf2fe[69]},amaflags:{type:Sequelize[_0xf2fe[6]],allowNull:true},callcounter:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true,defaultValue:_0xf2fe[52]},busylevel:{type:Sequelize.INTEGER(11),allowNull:true},allowoverlap:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true},allowsubscribe:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true},allowtransfer:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true},ignoresdpversion:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true},subscribecontext:{type:Sequelize[_0xf2fe[6]],allowNull:true},template:{type:Sequelize[_0xf2fe[6]],allowNull:true},videosupport:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53],_0xf2fe[70]),allowNull:true,defaultValue:_0xf2fe[53]},maxcallbitrate:{type:Sequelize.INTEGER(11),allowNull:true},rfc2833compensate:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true},mailbox:{type:Sequelize[_0xf2fe[6]],allowNull:true},session_timers:{type:Sequelize.ENUM(_0xf2fe[71],_0xf2fe[72],_0xf2fe[73]),allowNull:true},session_expires:{type:Sequelize.INTEGER(11),allowNull:true},session_minse:{type:Sequelize.INTEGER(11),allowNull:true},session_refresher:{type:Sequelize.ENUM(_0xf2fe[74],_0xf2fe[75]),allowNull:true,defaultValue:_0xf2fe[75]},t38pt_usertpsource:{type:Sequelize[_0xf2fe[6]],allowNull:true},regexten:{type:Sequelize[_0xf2fe[6]],allowNull:true},fromdomain:{type:Sequelize[_0xf2fe[6]],allowNull:true},fromuser:{type:Sequelize[_0xf2fe[6]],allowNull:true},qualify:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true,defaultValue:_0xf2fe[52]},keepalive:{type:Sequelize.INTEGER(11),allowNull:true},defaultip:{type:Sequelize[_0xf2fe[6]],allowNull:true},defaultuser:{type:Sequelize[_0xf2fe[6]],allowNull:true},rtptimeout:{type:Sequelize.INTEGER(11),allowNull:true},rtpholdtimeout:{type:Sequelize.INTEGER(11),allowNull:true},rtpkeepalive:{type:Sequelize.INTEGER(11),allowNull:true},sendrpid:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true,defaultValue:_0xf2fe[53]},outboundproxy:{type:Sequelize[_0xf2fe[6]],allowNull:true},callbackextension:{type:Sequelize[_0xf2fe[6]],allowNull:true},timert1:{type:Sequelize.INTEGER(11),allowNull:true},timerb:{type:Sequelize.INTEGER(11),allowNull:true},qualifyfreq:{type:Sequelize.INTEGER(11),allowNull:true},contactpermit:{type:Sequelize[_0xf2fe[6]],allowNull:true},contactdeny:{type:Sequelize[_0xf2fe[6]],allowNull:true},contactacl:{type:Sequelize[_0xf2fe[6]],allowNull:true},unsolicited_mailbox:{type:Sequelize[_0xf2fe[6]],allowNull:true},use_q850_reason:{type:Sequelize[_0xf2fe[6]],allowNull:true},maxforwards:{type:Sequelize.INTEGER(11),allowNull:true},encryption:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true,defaultValue:_0xf2fe[53]},avpf:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true},force_avp:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true},icesupport:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true},dtlsenable:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true},dtlsverify:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53],_0xf2fe[76],_0xf2fe[77]),allowNull:true},dtlsrekey:{type:Sequelize.INTEGER(11),allowNull:true},dtlscertfile:{type:Sequelize[_0xf2fe[6]],allowNull:true},dtlsprivatekey:{type:Sequelize[_0xf2fe[6]],allowNull:true},dtlscipher:{type:Sequelize[_0xf2fe[6]],allowNull:true},dtlscafile:{type:Sequelize[_0xf2fe[6]],allowNull:true},dtlscapath:{type:Sequelize[_0xf2fe[6]],allowNull:true},dtlssetup:{type:Sequelize.ENUM(_0xf2fe[78],_0xf2fe[79],_0xf2fe[80]),allowNull:true},dtlsfingerprint:{type:Sequelize[_0xf2fe[6]],allowNull:true},usereqphone:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true,defaultValue:_0xf2fe[53]},recordonfeature:{type:Sequelize[_0xf2fe[6]],allowNull:true},recordofffeature:{type:Sequelize[_0xf2fe[6]],allowNull:true},call_limit:{type:Sequelize.INTEGER(11),allowNull:true,defaultValue:10},registertrying:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true},subscribemwi:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),allowNull:true},vmexten:{type:Sequelize[_0xf2fe[6]],allowNull:true},mohinterpret:{type:Sequelize[_0xf2fe[6]],allowNull:true},mohsuggest:{type:Sequelize[_0xf2fe[6]],allowNull:true},parkinglot:{type:Sequelize[_0xf2fe[6]],allowNull:true},canreinvite:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53],_0xf2fe[54],_0xf2fe[55],_0xf2fe[81]),allowNull:true,defaultValue:_0xf2fe[53]},loginInPause:{type:Sequelize[_0xf2fe[25]],defaultValue:false},resetPasswordToken:{type:Sequelize[_0xf2fe[6]]},resetPasswordExpires:{type:Sequelize[_0xf2fe[26]]},showWebBar:{type:Sequelize[_0xf2fe[28]],defaultValue:0,set:function(_0x57c2x9){this[_0xf2fe[8]](_0xf2fe[82],_0x57c2x9);var _0x57c2xa=this[_0xf2fe[83]]({plain:true});switch(_0x57c2x9){case 0:;case 1:var _0x57c2xb=_0x57c2xa[_0xf2fe[42]]?(_[_0xf2fe[84]](_0x57c2xa[_0xf2fe[42]])?_0x57c2xa[_0xf2fe[42]][_0xf2fe[44]]():_0x57c2xa[_0xf2fe[42]]):_0xf2fe[41];if(_0x57c2xb=== _0xf2fe[85]){_0x57c2xb= _0xf2fe[41]};this[_0xf2fe[8]](_0xf2fe[42],_0x57c2xb);this[_0xf2fe[8]](_0xf2fe[86],_0xf2fe[53]);this[_0xf2fe[8]](_0xf2fe[87],null);this[_0xf2fe[8]](_0xf2fe[88],null);this[_0xf2fe[8]](_0xf2fe[89],null);this[_0xf2fe[8]](_0xf2fe[90],null);this[_0xf2fe[8]](_0xf2fe[91],null);this[_0xf2fe[8]](_0xf2fe[92],null);this[_0xf2fe[8]](_0xf2fe[93],null);this[_0xf2fe[8]](_0xf2fe[94],null);this[_0xf2fe[8]](_0xf2fe[95],_0xf2fe[53]);break;case 2:this[_0xf2fe[8]](_0xf2fe[42],_0xf2fe[85]);this[_0xf2fe[8]](_0xf2fe[86],_0xf2fe[52]);this[_0xf2fe[8]](_0xf2fe[87],_0xf2fe[52]);this[_0xf2fe[8]](_0xf2fe[88],_0xf2fe[52]);this[_0xf2fe[8]](_0xf2fe[89],_0xf2fe[52]);this[_0xf2fe[8]](_0xf2fe[90],_0xf2fe[52]);this[_0xf2fe[8]](_0xf2fe[91],_0xf2fe[53]);this[_0xf2fe[8]](_0xf2fe[92],_0xf2fe[80]);this[_0xf2fe[8]](_0xf2fe[93],_0x57c2xa[_0xf2fe[93]]|| _0xf2fe[96]);this[_0xf2fe[8]](_0xf2fe[94],_0x57c2xa[_0xf2fe[94]]|| _0xf2fe[97]);this[_0xf2fe[8]](_0xf2fe[95],_0xf2fe[52]);break;default:}}},permissions:{type:Sequelize[_0xf2fe[98]],set:function(_0x57c2x9){this[_0xf2fe[8]](_0xf2fe[99],_0x57c2x9?_0x57c2x9[_0xf2fe[44]](_0xf2fe[43]):[])},get:function(){return this[_0xf2fe[15]](_0xf2fe[99])?_[_0xf2fe[100]](this[_0xf2fe[15]](_0xf2fe[99])[_0xf2fe[45]](_0xf2fe[43]),function(_0x57c2xc){return parseInt(_0x57c2xc,10)}):[]}},phoneBarUnconditionalNumber:{type:Sequelize[_0xf2fe[6]]},phoneBarNoReplyNumber:{type:Sequelize[_0xf2fe[6]]},phoneBarBusyNumber:{type:Sequelize[_0xf2fe[6]]},phoneBarUnconditional:{type:Sequelize[_0xf2fe[25]],defaultValue:false},phoneBarNoReply:{type:Sequelize[_0xf2fe[25]],defaultValue:false},phoneBarBusy:{type:Sequelize[_0xf2fe[25]],defaultValue:false},phoneBarDnd:{type:Sequelize[_0xf2fe[25]],defaultValue:true},phoneBarUnansweredCallBadge:{type:Sequelize[_0xf2fe[25]],defaultValue:true},phoneBarEnableDtmfTone:{type:Sequelize[_0xf2fe[25]],defaultValue:false},phoneBarAutoAnswerDelay:{type:Sequelize[_0xf2fe[28]],defaultValue:0},extensionMonitor:{type:Sequelize[_0xf2fe[6]],defaultValue:_0xf2fe[101]},crudPermissions:{type:Sequelize[_0xf2fe[28]],defaultValue:0},rtcp_mux:{type:Sequelize.ENUM(_0xf2fe[52],_0xf2fe[53]),defaultValue:_0xf2fe[53]},allowmessenger:{type:Sequelize[_0xf2fe[25]],defaultValue:true},phoneBarOutboundProxy:{type:Sequelize[_0xf2fe[6]]},passwordResetAt:{type:Sequelize[_0xf2fe[26]],defaultValue:null},phoneBarEnableJaws:{type:Sequelize[_0xf2fe[25]],defaultValue:false}}
\ No newline at end of file
+var _0x3ae6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x64\x65\x66\x61\x75\x6C\x74\x75\x73\x65\x72","\x54\x68\x65\x20\x6E\x61\x6D\x65\x20\x6F\x66\x20\x74\x68\x65\x20\x75\x73\x65\x72","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x66\x6F\x72\x6D\x61\x74","\x65\x6D\x61\x69\x6C","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x6C\x6F\x63\x61\x6C","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x42\x4F\x4F\x4C\x45\x41\x4E","\x44\x41\x54\x45","\x44\x45\x46\x41\x55\x4C\x54\x20\x50\x41\x55\x53\x45","\x49\x4E\x54\x45\x47\x45\x52","\x64\x79\x6E\x61\x6D\x69\x63","\x66\x72\x69\x65\x6E\x64","\x70\x65\x65\x72","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x4E\x4F\x54\x5F\x53\x43\x52\x45\x45\x4E\x45\x44","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x50\x41\x53\x53\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x46\x41\x49\x4C\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x41\x4C\x4C\x4F\x57\x45\x44","\x50\x52\x4F\x48\x49\x42\x5F\x4E\x4F\x54\x5F\x53\x43\x52\x45\x45\x4E\x45\x44","\x50\x52\x4F\x48\x49\x42\x5F\x50\x41\x53\x53\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x50\x52\x4F\x48\x49\x42\x5F\x46\x41\x49\x4C\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x50\x52\x4F\x48\x49\x42","\x75\x64\x70","\x74\x72\x61\x6E\x73\x70\x6F\x72\x74","\x2C","\x6A\x6F\x69\x6E","\x73\x70\x6C\x69\x74","\x53\x74\x72\x69\x6E\x67\x20\x69\x73\x20\x64\x65\x70\x72\x65\x63\x61\x74\x65\x64\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x61\x6E\x20\x41\x72\x72\x61\x79\x20\x61\x73\x20\x5B\x22\x75\x64\x70\x22\x2C\x20\x22\x74\x63\x70\x22\x5D","\x72\x66\x63\x32\x38\x33\x33","\x69\x6E\x66\x6F","\x73\x68\x6F\x72\x74\x69\x6E\x66\x6F","\x69\x6E\x62\x61\x6E\x64","\x61\x75\x74\x6F","\x79\x65\x73","\x6E\x6F","\x6E\x6F\x6E\x61\x74","\x75\x70\x64\x61\x74\x65","\x6F\x75\x74\x67\x6F\x69\x6E\x67","\x66\x6F\x72\x63\x65\x5F\x72\x70\x6F\x72\x74\x2C\x63\x6F\x6D\x65\x64\x69\x61","\x6E\x61\x74","\x53\x74\x72\x69\x6E\x67\x20\x69\x73\x20\x64\x65\x70\x72\x65\x63\x61\x74\x65\x64\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x61\x6E\x20\x41\x72\x72\x61\x79\x20\x61\x73\x20\x5B\x22\x66\x6F\x72\x63\x65\x5F\x72\x70\x6F\x72\x74\x22\x2C\x20\x22\x63\x6F\x6D\x65\x64\x69\x61\x22\x5D","\x65\x6E","\x61\x6C\x6C","\x75\x6C\x61\x77\x3B\x61\x6C\x61\x77\x3B\x67\x73\x6D","\x61\x6C\x6C\x6F\x77","\x3B","\x53\x74\x72\x69\x6E\x67\x20\x69\x73\x20\x64\x65\x70\x72\x65\x63\x61\x74\x65\x64\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x61\x6E\x20\x41\x72\x72\x61\x79\x20\x61\x73\x20\x5B\x22\x75\x6C\x61\x77\x22\x2C\x20\x22\x61\x6C\x61\x77\x22\x2C\x20\x22\x67\x73\x6D\x22\x5D","\x69\x6E\x73\x65\x63\x75\x72\x65","\x53\x74\x72\x69\x6E\x67\x20\x69\x73\x20\x64\x65\x70\x72\x65\x63\x61\x74\x65\x64\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x61\x6E\x20\x41\x72\x72\x61\x79\x20\x61\x73\x20\x5B\x22\x70\x6F\x72\x74\x22\x2C\x20\x22\x69\x6E\x76\x69\x74\x65\x22\x5D","\x6E\x65\x76\x65\x72","\x22\x22\x20\x3C\x3E","\x61\x6C\x77\x61\x79\x73","\x61\x63\x63\x65\x70\x74","\x72\x65\x66\x75\x73\x65","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x75\x61\x63","\x75\x61\x73","\x66\x69\x6E\x67\x65\x72\x70\x72\x69\x6E\x74","\x63\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65","\x61\x63\x74\x69\x76\x65","\x70\x61\x73\x73\x69\x76\x65","\x61\x63\x74\x70\x61\x73\x73","\x75\x70\x64\x61\x74\x65\x2C\x6E\x6F\x6E\x61\x74","\x73\x68\x6F\x77\x57\x65\x62\x42\x61\x72","\x67\x65\x74","\x69\x73\x41\x72\x72\x61\x79","\x77\x73\x73","\x65\x6E\x63\x72\x79\x70\x74\x69\x6F\x6E","\x61\x76\x70\x66","\x66\x6F\x72\x63\x65\x5F\x61\x76\x70","\x69\x63\x65\x73\x75\x70\x70\x6F\x72\x74","\x64\x74\x6C\x73\x65\x6E\x61\x62\x6C\x65","\x64\x74\x6C\x73\x76\x65\x72\x69\x66\x79","\x64\x74\x6C\x73\x73\x65\x74\x75\x70","\x64\x74\x6C\x73\x63\x65\x72\x74\x66\x69\x6C\x65","\x64\x74\x6C\x73\x70\x72\x69\x76\x61\x74\x65\x6B\x65\x79","\x72\x74\x63\x70\x5F\x6D\x75\x78","\x2F\x65\x74\x63\x2F\x70\x6B\x69\x2F\x74\x6C\x73\x2F\x63\x65\x72\x74\x73\x2F\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x72\x74","\x2F\x65\x74\x63\x2F\x70\x6B\x69\x2F\x74\x6C\x73\x2F\x70\x72\x69\x76\x61\x74\x65\x2F\x6D\x6F\x74\x69\x6F\x6E\x2E\x6B\x65\x79","\x54\x45\x58\x54","\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73","\x6D\x61\x70",""];_0x3ae6[0];var Sequelize=require(_0x3ae6[1]);var moment=require(_0x3ae6[2]);var util=require(_0x3ae6[3]);var _=require(_0x3ae6[4]);module[_0x3ae6[5]]= {name:{type:Sequelize[_0x3ae6[6]],allowNull:false,unique:_0x3ae6[7],validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i},set:function(_0x5be9x5){this[_0x3ae6[8]](_0x3ae6[7],_0x5be9x5);this[_0x3ae6[8]](_0x3ae6[9],_0x5be9x5)},comment:_0x3ae6[10]},fullname:{type:Sequelize[_0x3ae6[6]],allowNull:false,set:function(_0x5be9x6){this[_0x3ae6[8]](_0x3ae6[11],_0x5be9x6);this[_0x3ae6[8]](_0x3ae6[12],util[_0x3ae6[16]](_0x3ae6[13],_0x5be9x6,this[_0x3ae6[15]](_0x3ae6[14])))}},alias:{type:Sequelize[_0x3ae6[6]]},email:{type:Sequelize[_0x3ae6[6]],allowNull:false,unique:_0x3ae6[17],validate:{isEmail:true},set:function(_0x5be9x7){if(_0x5be9x7){this[_0x3ae6[8]](_0x3ae6[17],_0x5be9x7[_0x3ae6[18]]())}}},role:{type:Sequelize.ENUM(_0x3ae6[19],_0x3ae6[20],_0x3ae6[21],_0x3ae6[22]),allowNull:false},password:{type:Sequelize[_0x3ae6[6]],allowNull:false,validate:{notEmpty:true}},provider:{type:Sequelize[_0x3ae6[6]],defaultValue:_0x3ae6[23]},internal:{type:Sequelize.INTEGER(11),allowNull:false,unique:_0x3ae6[14],set:function(_0x5be9x8){this[_0x3ae6[8]](_0x3ae6[14],_0x5be9x8);this[_0x3ae6[8]](_0x3ae6[24],_0x5be9x8);this[_0x3ae6[8]](_0x3ae6[12],util[_0x3ae6[16]](_0x3ae6[13],this[_0x3ae6[15]](_0x3ae6[11]),_0x5be9x8))}},salt:{type:Sequelize[_0x3ae6[6]]},phone:{type:Sequelize[_0x3ae6[6]]},mobile:{type:Sequelize[_0x3ae6[6]]},address:{type:Sequelize[_0x3ae6[6]]},zipcode:{type:Sequelize[_0x3ae6[6]]},userpic:{type:Sequelize[_0x3ae6[6]]},city:{type:Sequelize[_0x3ae6[6]]},country:{type:Sequelize[_0x3ae6[6]]},online:{type:Sequelize[_0x3ae6[25]],defaultValue:false},lastLoginAt:{type:Sequelize[_0x3ae6[26]]},voicePause:{type:Sequelize[_0x3ae6[25]],defaultValue:false},chatPause:{type:Sequelize[_0x3ae6[25]],defaultValue:false},mailPause:{type:Sequelize[_0x3ae6[25]],defaultValue:false},faxPause:{type:Sequelize[_0x3ae6[25]],defaultValue:false},smsPause:{type:Sequelize[_0x3ae6[25]],defaultValue:false},openchannelPause:{type:Sequelize[_0x3ae6[25]],defaultValue:false},pauseType:{type:Sequelize[_0x3ae6[6]],defaultValue:_0x3ae6[27]},lastPauseAt:{type:Sequelize[_0x3ae6[26]]},chatCapacity:{type:Sequelize[_0x3ae6[28]],defaultValue:0},mailCapacity:{type:Sequelize[_0x3ae6[28]],defaultValue:0},faxCapacity:{type:Sequelize[_0x3ae6[28]],defaultValue:0},smsCapacity:{type:Sequelize[_0x3ae6[28]],defaultValue:0},openchannelCapacity:{type:Sequelize[_0x3ae6[28]],defaultValue:0},phoneBarAutoAnswer:{type:Sequelize[_0x3ae6[25]],defaultValue:false},phoneBarEnableSettings:{type:Sequelize[_0x3ae6[25]],defaultValue:true},phoneBarListenPort:{type:Sequelize.INTEGER(5),defaultValue:5060},phoneBarExpires:{type:Sequelize.INTEGER(5),defaultValue:120},phoneBarRemoteControl:{type:Sequelize[_0x3ae6[25]],defaultValue:false},phoneBarRemoteControlPort:{type:Sequelize[_0x3ae6[28]],defaultValue:9888},phoneBarEnableRecording:{type:Sequelize[_0x3ae6[25]],defaultValue:false},phoneBarRingInUse:{type:Sequelize[_0x3ae6[25]],defaultValue:false},chanspy:{type:Sequelize[_0x3ae6[25]],defaultValue:false},description:{type:Sequelize[_0x3ae6[6]],allowNull:true},host:{type:Sequelize[_0x3ae6[6]],allowNull:true,defaultValue:_0x3ae6[29]},ipaddr:{type:Sequelize[_0x3ae6[6]],allowNull:true},port:{type:Sequelize.INTEGER(5),allowNull:true},regseconds:{type:Sequelize.INTEGER(11),allowNull:true},fullcontact:{type:Sequelize[_0x3ae6[6]],allowNull:true},regserver:{type:Sequelize[_0x3ae6[6]],allowNull:true},useragent:{type:Sequelize[_0x3ae6[6]],allowNull:true},lastms:{type:Sequelize.INTEGER(11),allowNull:true},type:{type:Sequelize.ENUM(_0x3ae6[30],_0x3ae6[20],_0x3ae6[31]),allowNull:true,defaultValue:_0x3ae6[30]},context:{type:Sequelize[_0x3ae6[6]],allowNull:true,defaultValue:_0x3ae6[32]},callingpres:{type:Sequelize.ENUM(_0x3ae6[33],_0x3ae6[34],_0x3ae6[35],_0x3ae6[36],_0x3ae6[37],_0x3ae6[38],_0x3ae6[39],_0x3ae6[40]),allowNull:true},deny:{type:Sequelize[_0x3ae6[6]],allowNull:true},permit:{type:Sequelize[_0x3ae6[6]],allowNull:true},secret:{type:Sequelize[_0x3ae6[6]],allowNull:true},md5secret:{type:Sequelize[_0x3ae6[6]],allowNull:true},remotesecret:{type:Sequelize[_0x3ae6[6]],allowNull:true},transport:{type:Sequelize[_0x3ae6[6]],allowNull:true,defaultValue:_0x3ae6[41],set:function(_0x5be9x9){this[_0x3ae6[8]](_0x3ae6[42],_0x5be9x9?_0x5be9x9[_0x3ae6[44]](_0x3ae6[43]):null)},get:function(){return this[_0x3ae6[15]](_0x3ae6[42])?this[_0x3ae6[15]](_0x3ae6[42])[_0x3ae6[45]](_0x3ae6[43]):null},comment:_0x3ae6[46]},dtmfmode:{type:Sequelize.ENUM(_0x3ae6[47],_0x3ae6[48],_0x3ae6[49],_0x3ae6[50],_0x3ae6[51]),allowNull:true,defaultValue:_0x3ae6[47]},directmedia:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53],_0x3ae6[54],_0x3ae6[55],_0x3ae6[56]),allowNull:true,defaultValue:_0x3ae6[53]},directrtpsetup:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true,defaultValue:_0x3ae6[53]},directmediapermit:{type:Sequelize[_0x3ae6[6]],allowNull:true},directmediadeny:{type:Sequelize[_0x3ae6[6]],allowNull:true},nat:{type:Sequelize[_0x3ae6[6]],allowNull:true,defaultValue:_0x3ae6[57],set:function(_0x5be9x9){this[_0x3ae6[8]](_0x3ae6[58],_0x5be9x9?_0x5be9x9[_0x3ae6[44]](_0x3ae6[43]):null)},get:function(){return this[_0x3ae6[15]](_0x3ae6[58])?this[_0x3ae6[15]](_0x3ae6[58])[_0x3ae6[45]](_0x3ae6[43]):null},comment:_0x3ae6[59]},callgroup:{type:Sequelize[_0x3ae6[6]]},namedcallgroup:{type:Sequelize[_0x3ae6[6]]},pickupgroup:{type:Sequelize[_0x3ae6[6]]},namedpickupgroup:{type:Sequelize[_0x3ae6[6]]},language:{type:Sequelize[_0x3ae6[6]],defaultValue:_0x3ae6[60]},tonezone:{type:Sequelize[_0x3ae6[6]]},disallow:{type:Sequelize[_0x3ae6[6]],allowNull:false,defaultValue:_0x3ae6[61]},allow:{type:Sequelize[_0x3ae6[6]],allowNull:false,defaultValue:_0x3ae6[62],set:function(_0x5be9x9){this[_0x3ae6[8]](_0x3ae6[63],_0x5be9x9?_0x5be9x9[_0x3ae6[44]](_0x3ae6[64]):_0x3ae6[62])},get:function(){return this[_0x3ae6[15]](_0x3ae6[63])?this[_0x3ae6[15]](_0x3ae6[63])[_0x3ae6[45]](_0x3ae6[64]):null},comment:_0x3ae6[65]},autoframing:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true},insecure:{type:Sequelize[_0x3ae6[6]],allowNull:true,set:function(_0x5be9x9){this[_0x3ae6[8]](_0x3ae6[66],_0x5be9x9?_0x5be9x9[_0x3ae6[44]](_0x3ae6[43]):null)},get:function(){return this[_0x3ae6[15]](_0x3ae6[66])?this[_0x3ae6[15]](_0x3ae6[66])[_0x3ae6[45]](_0x3ae6[43]):null},comment:_0x3ae6[67]},trustrpid:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true,defaultValue:_0x3ae6[53]},trust_id_outbound:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true,defaultValue:_0x3ae6[53]},progressinband:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53],_0x3ae6[68]),allowNull:true},promiscredir:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true},useclientcode:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true},accountcode:{type:Sequelize.INTEGER(11),allowNull:true},setvar:{type:Sequelize[_0x3ae6[6]],allowNull:true},callerid:{type:Sequelize[_0x3ae6[6]],allowNull:true,defaultValue:_0x3ae6[69]},amaflags:{type:Sequelize[_0x3ae6[6]],allowNull:true},callcounter:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true,defaultValue:_0x3ae6[52]},busylevel:{type:Sequelize.INTEGER(11),allowNull:true},allowoverlap:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true},allowsubscribe:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true},allowtransfer:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true},ignoresdpversion:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true},subscribecontext:{type:Sequelize[_0x3ae6[6]],allowNull:true},template:{type:Sequelize[_0x3ae6[6]],allowNull:true},videosupport:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53],_0x3ae6[70]),allowNull:true,defaultValue:_0x3ae6[53]},maxcallbitrate:{type:Sequelize.INTEGER(11),allowNull:true},rfc2833compensate:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true},mailbox:{type:Sequelize[_0x3ae6[6]],allowNull:true},session_timers:{type:Sequelize.ENUM(_0x3ae6[71],_0x3ae6[72],_0x3ae6[73]),allowNull:true},session_expires:{type:Sequelize.INTEGER(11),allowNull:true},session_minse:{type:Sequelize.INTEGER(11),allowNull:true},session_refresher:{type:Sequelize.ENUM(_0x3ae6[74],_0x3ae6[75]),allowNull:true,defaultValue:_0x3ae6[75]},t38pt_usertpsource:{type:Sequelize[_0x3ae6[6]],allowNull:true},regexten:{type:Sequelize[_0x3ae6[6]],allowNull:true},fromdomain:{type:Sequelize[_0x3ae6[6]],allowNull:true},fromuser:{type:Sequelize[_0x3ae6[6]],allowNull:true},qualify:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true,defaultValue:_0x3ae6[52]},keepalive:{type:Sequelize.INTEGER(11),allowNull:true},defaultip:{type:Sequelize[_0x3ae6[6]],allowNull:true},defaultuser:{type:Sequelize[_0x3ae6[6]],allowNull:true},rtptimeout:{type:Sequelize.INTEGER(11),allowNull:true},rtpholdtimeout:{type:Sequelize.INTEGER(11),allowNull:true},rtpkeepalive:{type:Sequelize.INTEGER(11),allowNull:true},sendrpid:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true,defaultValue:_0x3ae6[53]},outboundproxy:{type:Sequelize[_0x3ae6[6]],allowNull:true},callbackextension:{type:Sequelize[_0x3ae6[6]],allowNull:true},timert1:{type:Sequelize.INTEGER(11),allowNull:true},timerb:{type:Sequelize.INTEGER(11),allowNull:true},qualifyfreq:{type:Sequelize.INTEGER(11),allowNull:true},contactpermit:{type:Sequelize[_0x3ae6[6]],allowNull:true},contactdeny:{type:Sequelize[_0x3ae6[6]],allowNull:true},contactacl:{type:Sequelize[_0x3ae6[6]],allowNull:true},unsolicited_mailbox:{type:Sequelize[_0x3ae6[6]],allowNull:true},use_q850_reason:{type:Sequelize[_0x3ae6[6]],allowNull:true},maxforwards:{type:Sequelize.INTEGER(11),allowNull:true},encryption:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true,defaultValue:_0x3ae6[53]},avpf:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true},force_avp:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true},icesupport:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true},dtlsenable:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true},dtlsverify:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53],_0x3ae6[76],_0x3ae6[77]),allowNull:true},dtlsrekey:{type:Sequelize.INTEGER(11),allowNull:true},dtlscertfile:{type:Sequelize[_0x3ae6[6]],allowNull:true},dtlsprivatekey:{type:Sequelize[_0x3ae6[6]],allowNull:true},dtlscipher:{type:Sequelize[_0x3ae6[6]],allowNull:true},dtlscafile:{type:Sequelize[_0x3ae6[6]],allowNull:true},dtlscapath:{type:Sequelize[_0x3ae6[6]],allowNull:true},dtlssetup:{type:Sequelize.ENUM(_0x3ae6[78],_0x3ae6[79],_0x3ae6[80]),allowNull:true},dtlsfingerprint:{type:Sequelize[_0x3ae6[6]],allowNull:true},usereqphone:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true,defaultValue:_0x3ae6[53]},recordonfeature:{type:Sequelize[_0x3ae6[6]],allowNull:true},recordofffeature:{type:Sequelize[_0x3ae6[6]],allowNull:true},call_limit:{type:Sequelize.INTEGER(11),allowNull:true,defaultValue:10},registertrying:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true},subscribemwi:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),allowNull:true},vmexten:{type:Sequelize[_0x3ae6[6]],allowNull:true},mohinterpret:{type:Sequelize[_0x3ae6[6]],allowNull:true},mohsuggest:{type:Sequelize[_0x3ae6[6]],allowNull:true},parkinglot:{type:Sequelize[_0x3ae6[6]],allowNull:true},canreinvite:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53],_0x3ae6[54],_0x3ae6[55],_0x3ae6[81]),allowNull:true,defaultValue:_0x3ae6[53]},loginInPause:{type:Sequelize[_0x3ae6[25]],defaultValue:false},resetPasswordToken:{type:Sequelize[_0x3ae6[6]]},resetPasswordExpires:{type:Sequelize[_0x3ae6[26]]},showWebBar:{type:Sequelize[_0x3ae6[28]],defaultValue:0,set:function(_0x5be9x9){this[_0x3ae6[8]](_0x3ae6[82],_0x5be9x9);var _0x5be9xa=this[_0x3ae6[83]]({plain:true});switch(_0x5be9x9){case 0:;case 1:var _0x5be9xb=_0x5be9xa[_0x3ae6[42]]?(_[_0x3ae6[84]](_0x5be9xa[_0x3ae6[42]])?_0x5be9xa[_0x3ae6[42]][_0x3ae6[44]]():_0x5be9xa[_0x3ae6[42]]):_0x3ae6[41];if(_0x5be9xb=== _0x3ae6[85]){_0x5be9xb= _0x3ae6[41]};this[_0x3ae6[8]](_0x3ae6[42],_0x5be9xb);this[_0x3ae6[8]](_0x3ae6[86],_0x3ae6[53]);this[_0x3ae6[8]](_0x3ae6[87],null);this[_0x3ae6[8]](_0x3ae6[88],null);this[_0x3ae6[8]](_0x3ae6[89],null);this[_0x3ae6[8]](_0x3ae6[90],null);this[_0x3ae6[8]](_0x3ae6[91],null);this[_0x3ae6[8]](_0x3ae6[92],null);this[_0x3ae6[8]](_0x3ae6[93],null);this[_0x3ae6[8]](_0x3ae6[94],null);this[_0x3ae6[8]](_0x3ae6[95],_0x3ae6[53]);break;case 2:this[_0x3ae6[8]](_0x3ae6[42],_0x3ae6[85]);this[_0x3ae6[8]](_0x3ae6[86],_0x3ae6[52]);this[_0x3ae6[8]](_0x3ae6[87],_0x3ae6[52]);this[_0x3ae6[8]](_0x3ae6[88],_0x3ae6[52]);this[_0x3ae6[8]](_0x3ae6[89],_0x3ae6[52]);this[_0x3ae6[8]](_0x3ae6[90],_0x3ae6[52]);this[_0x3ae6[8]](_0x3ae6[91],_0x3ae6[53]);this[_0x3ae6[8]](_0x3ae6[92],_0x3ae6[80]);this[_0x3ae6[8]](_0x3ae6[93],_0x5be9xa[_0x3ae6[93]]|| _0x3ae6[96]);this[_0x3ae6[8]](_0x3ae6[94],_0x5be9xa[_0x3ae6[94]]|| _0x3ae6[97]);this[_0x3ae6[8]](_0x3ae6[95],_0x3ae6[52]);break;default:}}},permissions:{type:Sequelize[_0x3ae6[98]],set:function(_0x5be9x9){this[_0x3ae6[8]](_0x3ae6[99],_0x5be9x9?_0x5be9x9[_0x3ae6[44]](_0x3ae6[43]):[])},get:function(){return this[_0x3ae6[15]](_0x3ae6[99])?_[_0x3ae6[100]](this[_0x3ae6[15]](_0x3ae6[99])[_0x3ae6[45]](_0x3ae6[43]),function(_0x5be9xc){return parseInt(_0x5be9xc,10)}):[]}},phoneBarUnconditionalNumber:{type:Sequelize[_0x3ae6[6]]},phoneBarNoReplyNumber:{type:Sequelize[_0x3ae6[6]]},phoneBarBusyNumber:{type:Sequelize[_0x3ae6[6]]},phoneBarUnconditional:{type:Sequelize[_0x3ae6[25]],defaultValue:false},phoneBarNoReply:{type:Sequelize[_0x3ae6[25]],defaultValue:false},phoneBarBusy:{type:Sequelize[_0x3ae6[25]],defaultValue:false},phoneBarDnd:{type:Sequelize[_0x3ae6[25]],defaultValue:true},phoneBarUnansweredCallBadge:{type:Sequelize[_0x3ae6[25]],defaultValue:true},phoneBarEnableDtmfTone:{type:Sequelize[_0x3ae6[25]],defaultValue:false},phoneBarAutoAnswerDelay:{type:Sequelize[_0x3ae6[28]],defaultValue:0},extensionMonitor:{type:Sequelize[_0x3ae6[6]],defaultValue:_0x3ae6[101]},crudPermissions:{type:Sequelize[_0x3ae6[28]],defaultValue:0},rtcp_mux:{type:Sequelize.ENUM(_0x3ae6[52],_0x3ae6[53]),defaultValue:_0x3ae6[53]},allowmessenger:{type:Sequelize[_0x3ae6[25]],defaultValue:true},phoneBarOutboundProxy:{type:Sequelize[_0x3ae6[6]]},passwordResetAt:{type:Sequelize[_0x3ae6[26]],defaultValue:null},phoneBarEnableJaws:{type:Sequelize[_0x3ae6[25]],defaultValue:false}}
\ No newline at end of file
index 74efc66..db2df58 100644 (file)
@@ -1 +1 @@
-var _0x3ed6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x75\x73\x65\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x55\x73\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x55\x73\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x55\x73\x65\x72","\x6B\x65\x79\x73","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x61\x6C\x74","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65\x42\x79","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x6C\x6F\x77\x65\x72","\x63\x6F\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x6E","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x64\x64\x43\x6F\x6E\x74\x61\x63\x74\x73","\x69\x64\x73","\x6F\x6D\x69\x74","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x61\x67\x65\x6E\x74\x20\x72\x6F\x6C\x65","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x75\x73\x65\x72\x73","\x69\x73\x4E\x69\x6C","\x4C\x69\x63\x65\x6E\x73\x65\x20\x6C\x69\x6D\x69\x74\x20\x72\x65\x61\x63\x68\x65\x64","\x63\x6F\x75\x6E\x74\x20\x25\x73\x3A\x20\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x67\x65\x74\x4C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x75\x74\x69\x6C","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x63\x72\x65\x61\x74\x65","\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x6D\x61\x69\x6C\x62\x6F\x78","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73","\x31\x30\x31","\x31\x30\x32","\x31\x30\x33","\x31\x31\x30","\x31\x30\x34","\x31\x30\x35","\x31\x30\x36","\x31\x30\x37","\x31\x30\x38","\x31\x30\x39","\x31\x30\x30","\x31\x31\x31","\x66\x72\x6F\x6D","\x74\x6F","\x73\x65\x6C\x65\x63\x74\x20\x28\x73\x65\x6C\x65\x63\x74\x20\x49\x46\x4E\x55\x4C\x4C\x28\x6D\x61\x78\x28\x69\x6E\x74\x65\x72\x6E\x61\x6C\x29\x2B\x31\x2C\x31\x29\x20\x66\x72\x6F\x6D\x20\x75\x73\x65\x72\x73\x20\x77\x68\x65\x72\x65\x20\x69\x6E\x74\x65\x72\x6E\x61\x6C\x20\x3C\x20\x6D\x64\x2E\x69\x6E\x74\x65\x72\x6E\x61\x6C\x29\x20\x61\x73\x20\x27\x66\x72\x6F\x6D\x27\x2C\x20\x6D\x64\x2E\x69\x6E\x74\x65\x72\x6E\x61\x6C\x20\x2D\x20\x31\x20\x61\x73\x20\x27\x74\x6F\x27\x20\x66\x72\x6F\x6D\x20\x75\x73\x65\x72\x73\x20\x6D\x64\x20\x77\x68\x65\x72\x65\x20\x6D\x64\x2E\x69\x6E\x74\x65\x72\x6E\x61\x6C\x20\x21\x3D\x20\x31\x20\x61\x6E\x64\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74\x73\x20\x28\x73\x65\x6C\x65\x63\x74\x20\x31\x20\x66\x72\x6F\x6D\x20\x75\x73\x65\x72\x73\x20\x6D\x64\x32\x20\x77\x68\x65\x72\x65\x20\x6D\x64\x32\x2E\x69\x6E\x74\x65\x72\x6E\x61\x6C\x20\x3D\x20\x6D\x64\x2E\x69\x6E\x74\x65\x72\x6E\x61\x6C\x20\x2D\x20\x31\x29","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x6D\x69\x6E\x5F\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x6D\x61\x78","\x66\x69\x6E\x64\x42\x79\x49\x64","\x53\x65\x74\x74\x69\x6E\x67","\x63\x68\x61\x6E\x67\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x6E\x65\x77\x50\x61\x73\x73\x77\x6F\x72\x64","\x6F\x6C\x64\x50\x61\x73\x73\x77\x6F\x72\x64","\x49\x6E\x76\x61\x6C\x69\x64\x20\x62\x6F\x64\x79\x20\x66\x6F\x72\x6D\x61\x74\x2E\x20\x55\x73\x65\x20\x6F\x6C\x64\x50\x61\x73\x73\x6F\x72\x64\x20\x61\x6E\x64\x20\x6E\x65\x77\x50\x61\x73\x73\x77\x6F\x72\x64","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73","\x4E\x65\x77\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x66\x72\x6F\x6D\x20\x6F\x6C\x64\x20\x70\x61\x73\x73\x77\x6F\x72\x64","\x49\x6E\x76\x61\x6C\x69\x64\x20\x62\x6F\x64\x79\x20\x66\x6F\x72\x6D\x61\x74\x2E\x20\x55\x73\x65\x20\x6E\x65\x77\x50\x61\x73\x73\x77\x6F\x72\x64","\x55\x6E\x61\x75\x74\x68\x6F\x72\x69\x7A\x65\x64","\x61\x64\x64\x51\x75\x65\x75\x65\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x76\x6F\x69\x63\x65","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x70\x65\x6E\x61\x6C\x74\x79","\x75\x70\x73\x65\x72\x74","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74","\x70\x75\x73\x68","\x61\x6C\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x69\x73\x56\x61\x6C\x69\x64\x43\x68\x61\x6E\x6E\x65\x6C","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65","\x51\x75\x65\x75\x65\x73","\x6C\x6F\x67\x69\x6E\x49\x6E\x50\x61\x75\x73\x65","\x72\x65\x6D\x6F\x76\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65","\x61\x64\x64\x41\x76\x61\x74\x61\x72","\x75\x73\x65\x72\x70\x69\x63","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65","\x67\x65\x74\x41\x76\x61\x74\x61\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6C\x6F\x67\x6F\x73\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x70\x72\x6F\x66\x69\x6C\x65\x2E\x70\x6E\x67","\x6A\x6F\x69\x6E","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x55\x73\x65\x72\x49\x64","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x51\x75\x65\x75\x65\x73","\x51\x75\x65\x75\x65","\x67\x65\x74","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x72\x6F\x6C\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x52\x74","\x67\x65\x74\x47\x72\x6F\x75\x70\x73","\x43\x68\x61\x74\x47\x72\x6F\x75\x70","\x67\x65\x74\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x67\x65\x74\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6C\x6F\x67\x69\x6E","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x4C\x4F\x47\x49\x4E\x49\x4E\x50\x41\x55\x53\x45","\x67\x65\x74\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x4C\x4F\x47\x49\x4E","\x50\x41\x55\x53\x45","\x66\x6F\x72\x45\x61\x63\x68","\x63\x6F\x6E\x63\x61\x74","\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x65\x61\x63\x68","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x6C\x6F\x67\x6F\x75\x74","\x70\x61\x75\x73\x65","\x74\x79\x70\x65","\x44\x45\x46\x41\x55\x4C\x54\x20\x50\x41\x55\x53\x45","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x51\x75\x65\x75\x65\x50\x61\x75\x73\x65","\x75\x6E\x70\x61\x75\x73\x65","\x6D\x61\x6E\x75\x61\x6C","\x6D\x61\x69\x6C","\x63\x68\x61\x74","\x66\x61\x78","\x73\x6D\x73","\x25\x73\x25\x73","\x50\x61\x75\x73\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x67\x65\x74\x54\x65\x61\x6D\x73","\x54\x65\x61\x6D","\x61\x64\x64\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x67\x65\x74\x4C\x69\x73\x74\x73","\x43\x6D\x4C\x69\x73\x74","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x41\x67\x65\x6E\x74\x73","\x76\x61\x6C\x75\x65\x73","\x61\x73","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x64\x65\x6C\x65\x74\x65\x20\x79\x6F\x75\x72\x73\x65\x6C\x66","\x61\x64\x64\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x72\x65\x6D\x6F\x76\x65\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x69\x73\x41\x72\x72\x61\x79","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x72\x65\x6D\x6F\x76\x65","\x61\x64\x64\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x72\x65\x6D\x6F\x76\x65","\x61\x64\x64\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x72\x65\x6D\x6F\x76\x65","\x61\x64\x64\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x72\x65\x6D\x6F\x76\x65","\x61\x64\x64\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x72\x65\x6D\x6F\x76\x65"];_0x3ed6[0];var jsonpatch=require(_0x3ed6[1]);var rp=require(_0x3ed6[2]);var moment=require(_0x3ed6[3]);var BPromise=require(_0x3ed6[4]);var Mustache=require(_0x3ed6[5]);var util=require(_0x3ed6[6]);var path=require(_0x3ed6[7]);var sox=require(_0x3ed6[8]);var csv=require(_0x3ed6[9]);var ejs=require(_0x3ed6[10]);var fs=require(_0x3ed6[11]);var _=require(_0x3ed6[12]);var squel=require(_0x3ed6[13]);var crypto=require(_0x3ed6[14]);var jsforce=require(_0x3ed6[15]);var deskjs=require(_0x3ed6[16]);var toCsv=require(_0x3ed6[9]);var querystring=require(_0x3ed6[17]);var Papa=require(_0x3ed6[18]);var qs=require(_0x3ed6[19]);var logger=require(_0x3ed6[21])(_0x3ed6[20]);var utils=require(_0x3ed6[22]);var config=require(_0x3ed6[23]);var db=require(_0x3ed6[25])[_0x3ed6[24]];var socket=require(_0x3ed6[27])({host:_0x3ed6[26],port:6379});require(_0x3ed6[29])[_0x3ed6[28]](socket);var jayson=require(_0x3ed6[30]);var client=jayson[_0x3ed6[32]][_0x3ed6[31]]({port:9002});function respondWithRpcPromise(_0xeb52x1d,_0xeb52x1e,_0xeb52x1f,_0xeb52x20){return  new BPromise(function(_0xeb52x21,_0xeb52x22){var _0xeb52x23=(_0xeb52x20|| client);return _0xeb52x23[_0x3ed6[45]](_0xeb52x1d,_0xeb52x1f)[_0x3ed6[44]](function(_0xeb52x25){logger[_0x3ed6[37]](_0x3ed6[33],_0xeb52x1e,_0x3ed6[36]);logger[_0x3ed6[40]](_0x3ed6[38],_0xeb52x1e,_0x3ed6[36],JSON[_0x3ed6[39]](_0xeb52x25));if(_0xeb52x25[_0x3ed6[34]]){if(_0xeb52x25[_0x3ed6[34]][_0x3ed6[41]]=== 500){logger[_0x3ed6[34]](_0x3ed6[33],_0xeb52x1e,_0xeb52x25[_0x3ed6[34]][_0x3ed6[42]]);return _0xeb52x22(_0xeb52x25[_0x3ed6[34]][_0x3ed6[42]])};logger[_0x3ed6[34]](_0x3ed6[33],_0xeb52x1e,_0xeb52x25[_0x3ed6[34]][_0x3ed6[42]]);return _0xeb52x21(_0xeb52x25[_0x3ed6[34]][_0x3ed6[42]])}else {logger[_0x3ed6[37]](_0x3ed6[33],_0xeb52x1e,_0x3ed6[36]);_0xeb52x21(_0xeb52x25[_0x3ed6[43]][_0x3ed6[42]])}})[_0x3ed6[35]](function(_0xeb52x24){logger[_0x3ed6[34]](_0x3ed6[33],_0xeb52x1e,_0xeb52x24);_0xeb52x22(_0xeb52x24)})})}function respondWithStatusCode(_0xeb52x25,_0xeb52x27){_0xeb52x27= _0xeb52x27|| 204;return function(_0xeb52x28){if(_0xeb52x28){return _0xeb52x25[_0x3ed6[46]](_0xeb52x27)};return _0xeb52x25[_0x3ed6[48]](_0xeb52x27)[_0x3ed6[47]]()}}function respondWithResult(_0xeb52x25,_0xeb52x27){_0xeb52x27= _0xeb52x27|| 200;return function(_0xeb52x28){if(_0xeb52x28){return _0xeb52x25[_0x3ed6[48]](_0xeb52x27)[_0x3ed6[49]](_0xeb52x28)}}}function respondWithFilteredResult(_0xeb52x25,_0xeb52x2b){return function(_0xeb52x28){if(_0xeb52x28){var _0xeb52x2c=_0xeb52x28[_0x3ed6[50]],_0xeb52x2d=_0xeb52x2b[_0x3ed6[51]],_0xeb52x2e=_0xeb52x2b[_0x3ed6[51]]+ _0xeb52x2b[_0x3ed6[52]],_0xeb52x27;if(_0xeb52x2e>= _0xeb52x2c){_0xeb52x2e= _0xeb52x2c;_0xeb52x27= 200}else {_0xeb52x27= 206};_0xeb52x25[_0x3ed6[48]](_0xeb52x27);return _0xeb52x25[_0x3ed6[56]](_0x3ed6[53],_0xeb52x2d+ _0x3ed6[54]+ _0xeb52x2e+ _0x3ed6[55]+ _0xeb52x2c)[_0x3ed6[49]](_0xeb52x28)};return null}}function patchUpdates(_0xeb52x30){return function(_0xeb52x28){try{jsonpatch[_0x3ed6[57]](_0xeb52x28,_0xeb52x30,true)}catch(err){return BPromise[_0x3ed6[58]](err)};return _0xeb52x28[_0x3ed6[59]]()}}function saveUpdates(_0xeb52x32,_0xeb52x27){return function(_0xeb52x28){if(_0xeb52x28){return _0xeb52x28[_0x3ed6[60]](_0xeb52x32)[_0x3ed6[44]](function(_0xeb52x33){return _0xeb52x33})};return null}}function removeEntity(_0xeb52x25,_0xeb52x27){return function(_0xeb52x28){if(_0xeb52x28){return _0xeb52x28[_0x3ed6[61]]()[_0x3ed6[44]](function(){_0xeb52x25[_0x3ed6[48]](204)[_0x3ed6[47]]()})}}}function handleEntityNotFound(_0xeb52x25,_0xeb52x27){return function(_0xeb52x28){if(!_0xeb52x28){_0xeb52x25[_0x3ed6[46]](404)};return _0xeb52x28}}function handleError(_0xeb52x25,_0xeb52x27){_0xeb52x27= _0xeb52x27|| 500;return function(_0xeb52x24){logger[_0x3ed6[34]](_0xeb52x24[_0x3ed6[62]]);if(_0xeb52x24[_0x3ed6[63]]){delete _0xeb52x24[_0x3ed6[63]]};_0xeb52x25[_0x3ed6[48]](_0xeb52x27)[_0x3ed6[64]](_0xeb52x24)}}exports[_0x3ed6[65]]= function(_0xeb52x1f,_0xeb52x25){var _0xeb52x2b={},_0xeb52x37={},_0xeb52x38={count:0,rows:[]};_0xeb52x37[_0x3ed6[66]]= _[_0x3ed6[72]](_[_0x3ed6[69]](db[_0x3ed6[68]][_0x3ed6[67]]),[_0x3ed6[70],_0x3ed6[71]]);var _0xeb52x39={dateStart:_0xeb52x1f[_0x3ed6[74]][_0x3ed6[73]],dateEnd:_0xeb52x1f[_0x3ed6[74]][_0x3ed6[75]]};delete _0xeb52x1f[_0x3ed6[74]][_0x3ed6[73]];delete _0xeb52x1f[_0x3ed6[74]][_0x3ed6[75]];_0xeb52x37[_0x3ed6[74]]= _[_0x3ed6[69]](_0xeb52x1f[_0x3ed6[74]]);_0xeb52x37[_0x3ed6[76]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],_0xeb52x37[_0x3ed6[74]]);_0xeb52x2b[_0x3ed6[78]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],qs[_0x3ed6[79]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[79]]));_0xeb52x2b[_0x3ed6[78]]= (_0xeb52x2b[_0x3ed6[78]][_0x3ed6[80]])?_0xeb52x2b[_0x3ed6[78]]:_0xeb52x37[_0x3ed6[66]];if(!_0xeb52x1f[_0x3ed6[74]][_0x3ed6[82]](_0x3ed6[81])){_0xeb52x2b[_0x3ed6[52]]= qs[_0x3ed6[52]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[52]]);_0xeb52x2b[_0x3ed6[51]]= qs[_0x3ed6[51]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[51]])};_0xeb52x2b[_0x3ed6[83]]= qs[_0x3ed6[84]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[84]]);_0xeb52x2b[_0x3ed6[85]]= qs[_0x3ed6[76]](_[_0x3ed6[86]](_0xeb52x1f[_0x3ed6[74]],_0xeb52x37[_0x3ed6[76]]));if(_0xeb52x39[_0x3ed6[73]]){if(_0xeb52x39[_0x3ed6[75]]){_0xeb52x39[_0x3ed6[75]]= moment(_0xeb52x39[_0x3ed6[75]])[_0x3ed6[88]](1,_0x3ed6[87])}else {_0xeb52x39[_0x3ed6[75]]= moment(_0xeb52x39[_0x3ed6[73]])[_0x3ed6[88]](1,_0x3ed6[87])};_[_0x3ed6[89]](_0xeb52x2b[_0x3ed6[85]],{createdAt:{$gte:_0xeb52x39[_0x3ed6[73]],$lte:_0xeb52x39[_0x3ed6[75]]}})};if(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]){_0xeb52x2b[_0x3ed6[85]]= _[_0x3ed6[89]](_0xeb52x2b[_0x3ed6[85]],{$or:_[_0x3ed6[96]](_0xeb52x2b[_0x3ed6[78]],function(_0xeb52x3a){return db[_0x3ed6[93]][_0x3ed6[85]](db[_0x3ed6[93]][_0x3ed6[94]](_0x3ed6[91],db[_0x3ed6[93]][_0x3ed6[92]](_0xeb52x3a)),{$like:db[_0x3ed6[93]][_0x3ed6[94]](_0x3ed6[91],_0x3ed6[95]+ _0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]+ _0x3ed6[95])})})})};_0xeb52x2b= _[_0x3ed6[89]]({},_0xeb52x2b,_0xeb52x1f[_0x3ed6[97]]);var _0xeb52x3b={where:_0xeb52x2b[_0x3ed6[85]]};return db[_0x3ed6[68]][_0x3ed6[50]](_0xeb52x3b)[_0x3ed6[44]](function(_0xeb52x2c){_0xeb52x38[_0x3ed6[50]]= _0xeb52x2c;if(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[99]]){_0xeb52x2b[_0x3ed6[100]]= [{all:true}]};return db[_0x3ed6[68]][_0x3ed6[101]](_0xeb52x2b)})[_0x3ed6[44]](function(_0xeb52x3c){_0xeb52x38[_0x3ed6[98]]= _0xeb52x3c;return _0xeb52x38})[_0x3ed6[44]](respondWithFilteredResult(_0xeb52x25,_0xeb52x2b))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[102]]= function(_0xeb52x1f,_0xeb52x25){var _0xeb52x2b={raw:false,where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}},_0xeb52x37={};_0xeb52x37[_0x3ed6[66]]= _[_0x3ed6[72]](_[_0x3ed6[69]](db[_0x3ed6[68]][_0x3ed6[67]]),[_0x3ed6[70],_0x3ed6[71]]);_0xeb52x37[_0x3ed6[74]]= _[_0x3ed6[69]](_0xeb52x1f[_0x3ed6[74]]);_0xeb52x37[_0x3ed6[76]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],_0xeb52x37[_0x3ed6[74]]);_0xeb52x2b[_0x3ed6[78]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],qs[_0x3ed6[79]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[79]]));_0xeb52x2b[_0x3ed6[78]]= (_0xeb52x2b[_0x3ed6[78]][_0x3ed6[80]])?_0xeb52x2b[_0x3ed6[78]]:_0xeb52x37[_0x3ed6[66]];if(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[99]]){_0xeb52x2b[_0x3ed6[100]]= [{all:true}]};_0xeb52x2b= _[_0x3ed6[89]]({},_0xeb52x2b,_0xeb52x1f[_0x3ed6[97]]);return db[_0x3ed6[68]][_0x3ed6[105]](_0xeb52x2b)[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](respondWithResult(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[106]]= function(_0xeb52x1f,_0xeb52x25){return db[_0x3ed6[68]][_0x3ed6[106]](_0xeb52x1f[_0x3ed6[107]],{raw:false,individualHooks:true})[_0x3ed6[44]](respondWithResult(_0xeb52x25,201))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[60]]= function(_0xeb52x1f,_0xeb52x25){if(_0xeb52x1f[_0x3ed6[107]][_0x3ed6[103]]){delete _0xeb52x1f[_0x3ed6[107]][_0x3ed6[103]]};return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](saveUpdates(_0xeb52x1f[_0x3ed6[107]],null))[_0x3ed6[44]](respondWithResult(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[108]]= function(_0xeb52x1f,_0xeb52x25){return db[_0x3ed6[68]][_0x3ed6[108]]()[_0x3ed6[44]](respondWithResult(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[109]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){return _0xeb52x28[_0x3ed6[109]](_0xeb52x1f[_0x3ed6[107]][_0x3ed6[110]],_[_0x3ed6[111]](_0xeb52x1f[_0x3ed6[107]],[_0x3ed6[110],_0x3ed6[103]])|| {})}})[_0x3ed6[44]](respondWithResult(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};var getLicense=function(_0xeb52x1f){return  new BPromise(function(_0xeb52x21,_0xeb52x22){var _0xeb52x3f=0;_0xeb52x1f[_0x3ed6[107]][_0x3ed6[112]]=== _0x3ed6[113]&& _0xeb52x21(_0x3ed6[114]);return db[_0x3ed6[68]][_0x3ed6[50]]({where:{$or:[{role:_0xeb52x1f[_0x3ed6[107]][_0x3ed6[112]]=== _0x3ed6[115]?_0x3ed6[115]:[_0x3ed6[124],_0x3ed6[125]]}]}})[_0x3ed6[44]](function(_0xeb52x2c){_0xeb52x3f= _0xeb52x2c;return require(_0x3ed6[123])[_0x3ed6[122]]()})[_0x3ed6[44]](function(_0xeb52x40){var _0xeb52x41=_0xeb52x1f[_0x3ed6[107]][_0x3ed6[112]]=== _0x3ed6[115]?_0x3ed6[116]:_0x3ed6[117];if(!_[_0x3ed6[118]](_0xeb52x40[_0xeb52x41])&& _0xeb52x3f>= _0xeb52x40[_0xeb52x41]){return _0xeb52x22({message:_0x3ed6[119]})};return _0xeb52x21(util[_0x3ed6[121]](_0x3ed6[120],_0xeb52x41,_0xeb52x3f))})[_0x3ed6[35]](function(_0xeb52x24){return _0xeb52x22(_0xeb52x24)})})};exports[_0x3ed6[126]]= function(_0xeb52x1f,_0xeb52x25){return getLicense(_0xeb52x1f)[_0x3ed6[44]](function(_0xeb52x42){if(!_0xeb52x1f[_0x3ed6[107]][_0x3ed6[129]]){var _0xeb52x43;return db[_0x3ed6[154]][_0x3ed6[153]](1)[_0x3ed6[44]](function(_0xeb52x48){_0xeb52x43= _0xeb52x48[_0x3ed6[151]];return db[_0x3ed6[68]][_0x3ed6[152]](_0x3ed6[129])})[_0x3ed6[44]](function(_0xeb52x44){if(_[_0x3ed6[118]](_0xeb52x44)){if(_0xeb52x43){_0xeb52x1f[_0x3ed6[107]][_0x3ed6[129]]= _0xeb52x43}else {_0xeb52x1f[_0x3ed6[107]][_0x3ed6[129]]= 1}}else {if(_[_0x3ed6[118]](_0xeb52x43)|| _0xeb52x43== _0xeb52x44){_0xeb52x1f[_0x3ed6[107]][_0x3ed6[129]]= _0xeb52x44+ 1}else {if(_0xeb52x43> _0xeb52x44){_0xeb52x1f[_0x3ed6[107]][_0x3ed6[129]]= _0xeb52x43}else {return db[_0x3ed6[93]][_0x3ed6[74]](_0x3ed6[148],{type:db[_0x3ed6[93]][_0x3ed6[150]][_0x3ed6[149]]})[_0x3ed6[44]](function(_0xeb52x45){if(_0xeb52x45&& _0xeb52x45[_0x3ed6[80]]){for(var _0xeb52x46=0,_0xeb52x47=_0xeb52x45[_0x3ed6[80]];_0xeb52x46< _0xeb52x47&& _[_0x3ed6[118]](_0xeb52x1f[_0x3ed6[107]][_0x3ed6[129]]);_0xeb52x46++){if(_0xeb52x43<= _0xeb52x45[_0xeb52x46][_0x3ed6[146]]){_0xeb52x1f[_0x3ed6[107]][_0x3ed6[129]]= _0xeb52x45[_0xeb52x46][_0x3ed6[146]]}else {if(_0xeb52x43> _0xeb52x45[_0xeb52x46][_0x3ed6[146]]&& _0xeb52x43<= _0xeb52x45[_0xeb52x46][_0x3ed6[147]]){_0xeb52x1f[_0x3ed6[107]][_0x3ed6[129]]= _0xeb52x43}}}};if(_[_0x3ed6[118]](_0xeb52x1f[_0x3ed6[107]][_0x3ed6[129]])){_0xeb52x1f[_0x3ed6[107]][_0x3ed6[129]]= _0xeb52x44+ 1}})}}}})}})[_0x3ed6[44]](function(){if(_0xeb52x1f[_0x3ed6[107]][_0x3ed6[127]]){_0xeb52x1f[_0x3ed6[107]][_0x3ed6[128]]= _0xeb52x1f[_0x3ed6[107]][_0x3ed6[129]];_0xeb52x1f[_0x3ed6[107]][_0x3ed6[130]]= {mailbox:_0xeb52x1f[_0x3ed6[107]][_0x3ed6[129]],password:_0xeb52x1f[_0x3ed6[107]][_0x3ed6[70]],fullname:_0xeb52x1f[_0x3ed6[107]][_0x3ed6[131]],email:_0xeb52x1f[_0x3ed6[107]][_0x3ed6[132]]}};if(_0xeb52x1f[_0x3ed6[107]]&& _0xeb52x1f[_0x3ed6[107]][_0x3ed6[112]]=== _0x3ed6[113]){_0xeb52x1f[_0x3ed6[107]][_0x3ed6[133]]= [_0x3ed6[134],_0x3ed6[135],_0x3ed6[136],_0x3ed6[137],_0x3ed6[138],_0x3ed6[139],_0x3ed6[140],_0x3ed6[141],_0x3ed6[142],_0x3ed6[143],_0x3ed6[144],_0x3ed6[145]]};return db[_0x3ed6[68]][_0x3ed6[126]](_0xeb52x1f[_0x3ed6[107]],{include:[{model:db[_0x3ed6[130]],as:_0x3ed6[130]}]})})[_0x3ed6[44]](respondWithResult(_0xeb52x25,201))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[155]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){if(_0xeb52x1f[_0x3ed6[107]][_0x3ed6[103]]){delete _0xeb52x1f[_0x3ed6[107]][_0x3ed6[103]]};return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){if(_0xeb52x28[_0x3ed6[103]]== _0xeb52x1f[_0x3ed6[125]][_0x3ed6[103]]){if(!_0xeb52x1f[_0x3ed6[107]][_0x3ed6[157]]||  !_0xeb52x1f[_0x3ed6[107]][_0x3ed6[156]]){throw  new db[_0x3ed6[159]].ValidationError(_0x3ed6[158])};if(!_0xeb52x28[_0x3ed6[160]](_0xeb52x1f[_0x3ed6[107]][_0x3ed6[157]])){throw  new db[_0x3ed6[159]].ValidationError(_0x3ed6[161])};if(_0xeb52x1f[_0x3ed6[107]][_0x3ed6[157]]== _0xeb52x1f[_0x3ed6[107]][_0x3ed6[156]]){throw  new db[_0x3ed6[159]].ValidationError(_0x3ed6[162])};return _0xeb52x28}else {if(_0xeb52x1f[_0x3ed6[125]][_0x3ed6[112]]== _0x3ed6[124]){if(!_0xeb52x1f[_0x3ed6[107]][_0x3ed6[156]]){throw  new db[_0x3ed6[159]].ValidationError(_0x3ed6[163])};return _0xeb52x28}else {if(_0xeb52x1f[_0x3ed6[125]][_0x3ed6[112]]== _0x3ed6[125]){if(!_0xeb52x1f[_0x3ed6[107]][_0x3ed6[156]]){throw  new db[_0x3ed6[159]].ValidationError(_0x3ed6[163])};if(_0xeb52x28[_0x3ed6[112]]!= _0x3ed6[113]){throw  new db[_0x3ed6[159]].ValidationError(_0x3ed6[164])};return _0xeb52x28}else {throw  new db[_0x3ed6[159]].ValidationError(_0x3ed6[164])}}}};return null})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](saveUpdates({password:_0xeb52x1f[_0x3ed6[107]][_0x3ed6[156]],passwordResetAt:moment()},null))[_0x3ed6[44]](respondWithResult(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[165]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){var _0xeb52x49;return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]},attributes:[_0x3ed6[103],_0x3ed6[63],_0x3ed6[112],_0x3ed6[182],_0x3ed6[170]]})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){_0xeb52x49= _0xeb52x28;if(!utils[_0x3ed6[177]](_0xeb52x1f[_0x3ed6[107]][_0x3ed6[166]])){throw  new db[_0x3ed6[159]].ValidationError(_0x3ed6[178])};return _0xeb52x28[_0x3ed6[88]+ _[_0x3ed6[180]](_0xeb52x1f[_0x3ed6[107]][_0x3ed6[166]][_0x3ed6[179]]())+ _0x3ed6[181]](_0xeb52x1f[_0x3ed6[107]][_0x3ed6[110]],{penalty:_0xeb52x1f[_0x3ed6[107]][_0x3ed6[171]]|| 0})}})[_0x3ed6[44]](function(){if(_0xeb52x1f[_0x3ed6[107]][_0x3ed6[166]]=== _0x3ed6[167]){return db[_0x3ed6[176]][_0x3ed6[101]]({where:{id:_0xeb52x1f[_0x3ed6[107]][_0x3ed6[110]]|| []},raw:true,attributes:[_0x3ed6[103],_0x3ed6[63]]})}})[_0x3ed6[44]](function(_0xeb52x4a){var _0xeb52x4b=[];if(_0xeb52x1f[_0x3ed6[107]][_0x3ed6[166]]=== _0x3ed6[167]){for(var _0xeb52x46=0;_0xeb52x46< _0xeb52x4a[_0x3ed6[80]];_0xeb52x46+= 1){_0xeb52x4b[_0x3ed6[174]](db[_0x3ed6[173]][_0x3ed6[172]]({membername:_0xeb52x49[_0x3ed6[63]],UserId:_0xeb52x49[_0x3ed6[103]],queue_name:_0xeb52x4a[_0xeb52x46][_0x3ed6[63]],VoiceQueueId:_0xeb52x4a[_0xeb52x46][_0x3ed6[103]],interface:util[_0x3ed6[121]](_0x3ed6[168],_0x3ed6[169],_0xeb52x49[_0x3ed6[63]]),paused:_0xeb52x49[_0x3ed6[170]]|| false,penalty:_0xeb52x1f[_0x3ed6[107]][_0x3ed6[171]]|| 0}))};return BPromise[_0x3ed6[175]](_0xeb52x4b)};return _0xeb52x49})[_0x3ed6[44]](respondWithStatusCode(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[183]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){var _0xeb52x49;return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]},attributes:[_0x3ed6[103],_0x3ed6[63],_0x3ed6[112]]})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){_0xeb52x49= _0xeb52x28;if(!_0xeb52x1f[_0x3ed6[74]][_0x3ed6[166]]||  !utils[_0x3ed6[177]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[166]])){throw  new db[_0x3ed6[159]].ValidationError(_0x3ed6[178])};return _0xeb52x28[_0x3ed6[184]+ _[_0x3ed6[180]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[166]][_0x3ed6[179]]())+ _0x3ed6[181]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]])}})[_0x3ed6[44]](function(_0xeb52x4a){if(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[166]]=== _0x3ed6[167]){return db[_0x3ed6[173]][_0x3ed6[61]]({where:{UserId:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]],VoiceQueueId:_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]]},individualHooks:true})[_0x3ed6[44]](function(){return _0xeb52x49})};return _0xeb52x49})[_0x3ed6[44]](respondWithStatusCode(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[185]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){_0xeb52x1f[_0x3ed6[107]][_0x3ed6[186]]= _0xeb52x1f[_0x3ed6[188]][_0x3ed6[187]];return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](saveUpdates(_0xeb52x1f[_0x3ed6[107]],null))[_0x3ed6[44]](respondWithResult(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[189]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){var _0xeb52x4c=path[_0x3ed6[192]](config[_0x3ed6[190]],_0x3ed6[191]);return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]},attributes:[_0x3ed6[103],_0x3ed6[186]],raw:true})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){if(_[_0x3ed6[118]](_0xeb52x28[_0x3ed6[186]])){return _0xeb52x25[_0x3ed6[193]](_0xeb52x4c)}else {if(!fs[_0x3ed6[195]](path[_0x3ed6[192]](config[_0x3ed6[190]],_0x3ed6[194],_0xeb52x28[_0x3ed6[186]]))){return _0xeb52x25[_0x3ed6[193]](_0xeb52x4c)};return _0xeb52x25[_0x3ed6[193]](path[_0x3ed6[192]](config[_0x3ed6[190]],_0x3ed6[194],_0xeb52x28[_0x3ed6[186]]))}}})[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[196]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){var _0xeb52x49;var _0xeb52x2b={where:{}},_0xeb52x37={},_0xeb52x4d={count:0,rows:[]};return db[_0x3ed6[68]][_0x3ed6[199]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){_0xeb52x49= _0xeb52x28;_0xeb52x2b[_0x3ed6[85]][_0x3ed6[197]]= _0xeb52x28[_0x3ed6[103]];return db[_0x3ed6[198]][_0x3ed6[108]]()}})[_0x3ed6[44]](function(_0xeb52x4e){if(_0xeb52x4e){_0xeb52x37[_0x3ed6[66]]= _[_0x3ed6[69]](_0xeb52x4e);_0xeb52x37[_0x3ed6[74]]= _[_0x3ed6[69]](_0xeb52x1f[_0x3ed6[74]]);_0xeb52x37[_0x3ed6[76]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],_0xeb52x37[_0x3ed6[74]]);_0xeb52x2b[_0x3ed6[78]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],qs[_0x3ed6[79]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[79]]));_0xeb52x2b[_0x3ed6[78]]= (_0xeb52x2b[_0x3ed6[78]][_0x3ed6[80]])?_0xeb52x2b[_0x3ed6[78]]:_0xeb52x37[_0x3ed6[66]];if(!_0xeb52x1f[_0x3ed6[74]][_0x3ed6[82]](_0x3ed6[81])){_0xeb52x2b[_0x3ed6[52]]= qs[_0x3ed6[52]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[52]]);_0xeb52x2b[_0x3ed6[51]]= qs[_0x3ed6[51]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[51]])};_0xeb52x2b[_0x3ed6[83]]= qs[_0x3ed6[84]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[84]]);_0xeb52x2b[_0x3ed6[85]]= qs[_0x3ed6[76]](_[_0x3ed6[86]](_0xeb52x1f[_0x3ed6[74]],_0xeb52x37[_0x3ed6[76]]));if(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]){_0xeb52x2b[_0x3ed6[85]]= _[_0x3ed6[89]](_0xeb52x2b[_0x3ed6[85]],{$or:_[_0x3ed6[96]](_0xeb52x2b[_0x3ed6[78]],function(_0xeb52x3a){var _0xeb52x38={};_0xeb52x38[_0xeb52x3a]= {$like:_0x3ed6[95]+ _0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]+ _0x3ed6[95]};return _0xeb52x38})})};_0xeb52x2b= _[_0x3ed6[89]]({},_0xeb52x2b,_0xeb52x1f[_0x3ed6[97]]);return _0xeb52x49[_0x3ed6[196]](_[_0x3ed6[86]](_0xeb52x2b,[_0x3ed6[85]]))[_0x3ed6[44]](function(_0xeb52x2c){_0xeb52x4d[_0x3ed6[50]]= _0xeb52x2c[_0x3ed6[80]]|| 0;if(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[99]]){_0xeb52x2b[_0x3ed6[100]]= [{all:true}]};return _0xeb52x49[_0x3ed6[196]](_0xeb52x2b)})[_0x3ed6[44]](function(_0xeb52x3c){_0xeb52x4d[_0x3ed6[98]]= _0xeb52x3c;return _0xeb52x4d})}})[_0x3ed6[44]](respondWithFilteredResult(_0xeb52x25,_0xeb52x2b))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[200]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){var _0xeb52x49;var _0xeb52x4a;var _0xeb52x2b={};var _0xeb52x2c;return db[_0x3ed6[68]][_0x3ed6[199]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]},attributes:[_0x3ed6[103],_0x3ed6[63],_0x3ed6[112]]})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x50){if(!utils[_0x3ed6[177]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[166]])){throw  new db[_0x3ed6[159]].ValidationError(_0x3ed6[178])};_0xeb52x49= _0xeb52x50;var _0xeb52x37={};_0xeb52x37[_0x3ed6[66]]= _[_0x3ed6[69]](db[_[_0x3ed6[180]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[166]])+ _0x3ed6[201]][_0x3ed6[67]]);_0xeb52x37[_0x3ed6[74]]= _[_0x3ed6[69]](_0xeb52x1f[_0x3ed6[74]]);_0xeb52x37[_0x3ed6[76]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],_0xeb52x37[_0x3ed6[74]]);_0xeb52x2b[_0x3ed6[78]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],qs[_0x3ed6[79]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[79]]));_0xeb52x2b[_0x3ed6[78]]= (_0xeb52x2b[_0x3ed6[78]][_0x3ed6[80]])?_0xeb52x2b[_0x3ed6[78]]:_0xeb52x37[_0x3ed6[66]];_0xeb52x2b[_0x3ed6[83]]= qs[_0x3ed6[84]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[84]]);_0xeb52x2b[_0x3ed6[85]]= qs[_0x3ed6[76]](_[_0x3ed6[86]](_0xeb52x1f[_0x3ed6[74]],_0xeb52x37[_0x3ed6[76]]));if(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]){_0xeb52x2b[_0x3ed6[85]]= _[_0x3ed6[89]](_0xeb52x2b[_0x3ed6[85]],{$or:_[_0x3ed6[96]](_0xeb52x2b[_0x3ed6[78]],function(_0xeb52x3a){var _0xeb52x38={};_0xeb52x38[_0xeb52x3a]= {$like:_0x3ed6[95]+ _0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]+ _0x3ed6[95]};return _0xeb52x38})})};_0xeb52x2b= _[_0x3ed6[89]]({},_0xeb52x2b,_0xeb52x1f[_0x3ed6[97]]);switch(_0xeb52x49[_0x3ed6[112]]){case _0x3ed6[124]:return db[_[_0x3ed6[180]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[166]])+ _0x3ed6[201]][_0x3ed6[101]](_0xeb52x2b);case _0x3ed6[125]:;case _0x3ed6[113]:return _0xeb52x49[_0x3ed6[202]+ _[_0x3ed6[180]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[166]])+ _0x3ed6[181]](_0xeb52x2b);default:throw  new db[_0x3ed6[159]].ValidationError(_0x3ed6[203])}})[_0x3ed6[44]](function(_0xeb52x4f){_0xeb52x2c= _0xeb52x4f[_0x3ed6[80]];if(!_0xeb52x1f[_0x3ed6[74]][_0x3ed6[82]](_0x3ed6[81])){_0xeb52x2b[_0x3ed6[52]]= qs[_0x3ed6[52]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[52]]);_0xeb52x2b[_0x3ed6[51]]= qs[_0x3ed6[51]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[51]])};switch(_0xeb52x49[_0x3ed6[112]]){case _0x3ed6[124]:return db[_[_0x3ed6[180]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[166]])+ _0x3ed6[201]][_0x3ed6[101]](_0xeb52x2b);case _0x3ed6[125]:;case _0x3ed6[113]:return _0xeb52x49[_0x3ed6[202]+ _[_0x3ed6[180]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[166]])+ _0x3ed6[181]](_0xeb52x2b)}})[_0x3ed6[44]](function(_0xeb52x3c){return {count:_0xeb52x2c,rows:_0xeb52x3c}})[_0x3ed6[44]](respondWithResult(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[204]]= function(_0xeb52x1f,_0xeb52x28,_0xeb52x3d){var _0xeb52x2b={};var _0xeb52x37={};var _0xeb52x51;var _0xeb52x2c;return db[_0x3ed6[68]][_0x3ed6[199]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x28,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){_0xeb52x51= _0xeb52x28;_0xeb52x37[_0x3ed6[66]]= _[_0x3ed6[69]](db[_0x3ed6[173]][_0x3ed6[67]]);_0xeb52x37[_0x3ed6[74]]= _[_0x3ed6[69]](_0xeb52x1f[_0x3ed6[74]]);_0xeb52x37[_0x3ed6[76]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],_0xeb52x37[_0x3ed6[74]]);_0xeb52x2b[_0x3ed6[78]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],qs[_0x3ed6[79]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[79]]));_0xeb52x2b[_0x3ed6[78]]= (_0xeb52x2b[_0x3ed6[78]][_0x3ed6[80]])?_0xeb52x2b[_0x3ed6[78]]:_0xeb52x37[_0x3ed6[66]];_0xeb52x2b[_0x3ed6[83]]= qs[_0x3ed6[84]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[84]]);_0xeb52x2b[_0x3ed6[85]]= qs[_0x3ed6[76]](_[_0x3ed6[86]](_0xeb52x1f[_0x3ed6[74]],_0xeb52x37[_0x3ed6[76]]));if(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]){_0xeb52x2b[_0x3ed6[85]]= _[_0x3ed6[89]](_0xeb52x2b[_0x3ed6[85]],{$or:_[_0x3ed6[96]](_0xeb52x2b[_0x3ed6[78]],function(_0xeb52x3a){var _0xeb52x38={};_0xeb52x38[_0xeb52x3a]= {$like:_0x3ed6[95]+ _0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]+ _0x3ed6[95]};return _0xeb52x38})})};_0xeb52x2b= _[_0x3ed6[89]]({},_0xeb52x2b,_0xeb52x1f[_0x3ed6[97]]);return _0xeb52x51[_0x3ed6[204]](_0xeb52x2b)}})[_0x3ed6[44]](function(_0xeb52x4f){if(_0xeb52x4f){_0xeb52x2c= _0xeb52x4f[_0x3ed6[80]];if(!_0xeb52x1f[_0x3ed6[74]][_0x3ed6[82]](_0x3ed6[81])){_0xeb52x2b[_0x3ed6[52]]= qs[_0x3ed6[52]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[52]]);_0xeb52x2b[_0x3ed6[51]]= qs[_0x3ed6[51]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[51]])};return _0xeb52x51[_0x3ed6[204]](_0xeb52x2b)}})[_0x3ed6[44]](function(_0xeb52x3c){if(_0xeb52x3c){return _0xeb52x3c?{count:_0xeb52x2c,rows:_0xeb52x3c}:null}})[_0x3ed6[44]](respondWithResult(_0xeb52x28,null))[_0x3ed6[35]](handleError(_0xeb52x28,null))};exports[_0x3ed6[205]]= function(_0xeb52x1f,_0xeb52x28,_0xeb52x3d){var _0xeb52x2b={};var _0xeb52x37={};var _0xeb52x51;var _0xeb52x2c;return db[_0x3ed6[68]][_0x3ed6[199]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x28,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){_0xeb52x51= _0xeb52x28;_0xeb52x37[_0x3ed6[66]]= _[_0x3ed6[69]](db[_0x3ed6[206]][_0x3ed6[67]]);_0xeb52x37[_0x3ed6[74]]= _[_0x3ed6[69]](_0xeb52x1f[_0x3ed6[74]]);_0xeb52x37[_0x3ed6[76]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],_0xeb52x37[_0x3ed6[74]]);_0xeb52x2b[_0x3ed6[78]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],qs[_0x3ed6[79]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[79]]));_0xeb52x2b[_0x3ed6[78]]= (_0xeb52x2b[_0x3ed6[78]][_0x3ed6[80]])?_0xeb52x2b[_0x3ed6[78]]:_0xeb52x37[_0x3ed6[66]];_0xeb52x2b[_0x3ed6[83]]= qs[_0x3ed6[84]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[84]]);_0xeb52x2b[_0x3ed6[85]]= qs[_0x3ed6[76]](_[_0x3ed6[86]](_0xeb52x1f[_0x3ed6[74]],_0xeb52x37[_0x3ed6[76]]));if(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]){_0xeb52x2b[_0x3ed6[85]]= _[_0x3ed6[89]](_0xeb52x2b[_0x3ed6[85]],{$or:_[_0x3ed6[96]](_0xeb52x2b[_0x3ed6[78]],function(_0xeb52x3a){var _0xeb52x38={};_0xeb52x38[_0xeb52x3a]= {$like:_0x3ed6[95]+ _0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]+ _0x3ed6[95]};return _0xeb52x38})})};_0xeb52x2b= _[_0x3ed6[89]]({},_0xeb52x2b,_0xeb52x1f[_0x3ed6[97]]);return _0xeb52x51[_0x3ed6[205]](_0xeb52x2b)}})[_0x3ed6[44]](function(_0xeb52x4f){if(_0xeb52x4f){_0xeb52x2c= _0xeb52x4f[_0x3ed6[80]];if(!_0xeb52x1f[_0x3ed6[74]][_0x3ed6[82]](_0x3ed6[81])){_0xeb52x2b[_0x3ed6[52]]= qs[_0x3ed6[52]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[52]]);_0xeb52x2b[_0x3ed6[51]]= qs[_0x3ed6[51]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[51]])};return _0xeb52x51[_0x3ed6[205]](_0xeb52x2b)}})[_0x3ed6[44]](function(_0xeb52x3c){if(_0xeb52x3c){return _0xeb52x3c?{count:_0xeb52x2c,rows:_0xeb52x3c}:null}})[_0x3ed6[44]](respondWithResult(_0xeb52x28,null))[_0x3ed6[35]](handleError(_0xeb52x28,null))};exports[_0x3ed6[207]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){var _0xeb52x2b={raw:true,where:{}};var _0xeb52x37={};var _0xeb52x4d={count:0,rows:[]};return db[_0x3ed6[68]][_0x3ed6[199]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){_0xeb52x37[_0x3ed6[66]]= _[_0x3ed6[69]](db[_0x3ed6[208]][_0x3ed6[67]]);_0xeb52x37[_0x3ed6[74]]= _[_0x3ed6[69]](_0xeb52x1f[_0x3ed6[74]]);_0xeb52x37[_0x3ed6[76]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],_0xeb52x37[_0x3ed6[74]]);_0xeb52x2b[_0x3ed6[78]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],qs[_0x3ed6[79]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[79]]));_0xeb52x2b[_0x3ed6[78]]= (_0xeb52x2b[_0x3ed6[78]][_0x3ed6[80]])?_0xeb52x2b[_0x3ed6[78]]:_0xeb52x37[_0x3ed6[66]];if(!_0xeb52x1f[_0x3ed6[74]][_0x3ed6[82]](_0x3ed6[81])){_0xeb52x2b[_0x3ed6[52]]= qs[_0x3ed6[52]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[52]]);_0xeb52x2b[_0x3ed6[51]]= qs[_0x3ed6[51]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[51]])};_0xeb52x2b[_0x3ed6[83]]= qs[_0x3ed6[84]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[84]]);_0xeb52x2b[_0x3ed6[85]]= qs[_0x3ed6[76]](_[_0x3ed6[86]](_0xeb52x1f[_0x3ed6[74]],_0xeb52x37[_0x3ed6[76]]));_0xeb52x2b[_0x3ed6[85]][_0x3ed6[197]]= _0xeb52x28[_0x3ed6[103]];if(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]){_0xeb52x2b[_0x3ed6[85]]= _[_0x3ed6[89]](_0xeb52x2b[_0x3ed6[85]],{$or:_[_0x3ed6[96]](_0xeb52x2b[_0x3ed6[78]],function(_0xeb52x3a){var _0xeb52x38={};_0xeb52x38[_0xeb52x3a]= {$like:_0x3ed6[95]+ _0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]+ _0x3ed6[95]};return _0xeb52x38})})};_0xeb52x2b= _[_0x3ed6[89]]({},_0xeb52x2b,_0xeb52x1f[_0x3ed6[97]]);return db[_0x3ed6[208]][_0x3ed6[50]]({where:_0xeb52x2b[_0x3ed6[85]]})[_0x3ed6[44]](function(_0xeb52x2c){_0xeb52x4d[_0x3ed6[50]]= _0xeb52x2c;if(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[99]]){_0xeb52x2b[_0x3ed6[100]]= [{all:true}]};return db[_0x3ed6[208]][_0x3ed6[101]](_0xeb52x2b)})[_0x3ed6[44]](function(_0xeb52x3c){_0xeb52x4d[_0x3ed6[98]]= _0xeb52x3c;return _0xeb52x4d})}})[_0x3ed6[44]](respondWithFilteredResult(_0xeb52x25,_0xeb52x2b))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[209]]= function(_0xeb52x1f,_0xeb52x28,_0xeb52x3d){var _0xeb52x2b={};var _0xeb52x37={};var _0xeb52x51;var _0xeb52x2c;return db[_0x3ed6[68]][_0x3ed6[199]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x28,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){_0xeb52x51= _0xeb52x28;_0xeb52x37[_0x3ed6[66]]= _[_0x3ed6[69]](db[_0x3ed6[210]][_0x3ed6[67]]);_0xeb52x37[_0x3ed6[74]]= _[_0x3ed6[69]](_0xeb52x1f[_0x3ed6[74]]);_0xeb52x37[_0x3ed6[76]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],_0xeb52x37[_0x3ed6[74]]);_0xeb52x2b[_0x3ed6[78]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],qs[_0x3ed6[79]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[79]]));_0xeb52x2b[_0x3ed6[78]]= (_0xeb52x2b[_0x3ed6[78]][_0x3ed6[80]])?_0xeb52x2b[_0x3ed6[78]]:_0xeb52x37[_0x3ed6[66]];_0xeb52x2b[_0x3ed6[83]]= qs[_0x3ed6[84]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[84]]);_0xeb52x2b[_0x3ed6[85]]= qs[_0x3ed6[76]](_[_0x3ed6[86]](_0xeb52x1f[_0x3ed6[74]],_0xeb52x37[_0x3ed6[76]]));if(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]){_0xeb52x2b[_0x3ed6[85]]= _[_0x3ed6[89]](_0xeb52x2b[_0x3ed6[85]],{$or:_[_0x3ed6[96]](_0xeb52x2b[_0x3ed6[78]],function(_0xeb52x3a){var _0xeb52x38={};_0xeb52x38[_0xeb52x3a]= {$like:_0x3ed6[95]+ _0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]+ _0x3ed6[95]};return _0xeb52x38})})};_0xeb52x2b= _[_0x3ed6[89]]({},_0xeb52x2b,_0xeb52x1f[_0x3ed6[97]]);return _0xeb52x51[_0x3ed6[209]](_0xeb52x2b)}})[_0x3ed6[44]](function(_0xeb52x4f){if(_0xeb52x4f){_0xeb52x2c= _0xeb52x4f[_0x3ed6[80]];if(!_0xeb52x1f[_0x3ed6[74]][_0x3ed6[82]](_0x3ed6[81])){_0xeb52x2b[_0x3ed6[52]]= qs[_0x3ed6[52]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[52]]);_0xeb52x2b[_0x3ed6[51]]= qs[_0x3ed6[51]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[51]])};return _0xeb52x51[_0x3ed6[209]](_0xeb52x2b)}})[_0x3ed6[44]](function(_0xeb52x3c){if(_0xeb52x3c){return _0xeb52x3c?{count:_0xeb52x2c,rows:_0xeb52x3c}:null}})[_0x3ed6[44]](respondWithResult(_0xeb52x28,null))[_0x3ed6[35]](handleError(_0xeb52x28,null))};exports[_0x3ed6[211]]= function(_0xeb52x1f,_0xeb52x28,_0xeb52x3d){var _0xeb52x2b={};var _0xeb52x37={};var _0xeb52x51;var _0xeb52x2c;return db[_0x3ed6[68]][_0x3ed6[199]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x28,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){_0xeb52x51= _0xeb52x28;_0xeb52x37[_0x3ed6[66]]= _[_0x3ed6[69]](db[_0x3ed6[212]][_0x3ed6[67]]);_0xeb52x37[_0x3ed6[74]]= _[_0x3ed6[69]](_0xeb52x1f[_0x3ed6[74]]);_0xeb52x37[_0x3ed6[76]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],_0xeb52x37[_0x3ed6[74]]);_0xeb52x2b[_0x3ed6[78]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],qs[_0x3ed6[79]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[79]]));_0xeb52x2b[_0x3ed6[78]]= (_0xeb52x2b[_0x3ed6[78]][_0x3ed6[80]])?_0xeb52x2b[_0x3ed6[78]]:_0xeb52x37[_0x3ed6[66]];_0xeb52x2b[_0x3ed6[83]]= qs[_0x3ed6[84]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[84]]);_0xeb52x2b[_0x3ed6[85]]= qs[_0x3ed6[76]](_[_0x3ed6[86]](_0xeb52x1f[_0x3ed6[74]],_0xeb52x37[_0x3ed6[76]]));if(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]){_0xeb52x2b[_0x3ed6[85]]= _[_0x3ed6[89]](_0xeb52x2b[_0x3ed6[85]],{$or:_[_0x3ed6[96]](_0xeb52x2b[_0x3ed6[78]],function(_0xeb52x3a){var _0xeb52x38={};_0xeb52x38[_0xeb52x3a]= {$like:_0x3ed6[95]+ _0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]+ _0x3ed6[95]};return _0xeb52x38})})};_0xeb52x2b= _[_0x3ed6[89]]({},_0xeb52x2b,_0xeb52x1f[_0x3ed6[97]]);return _0xeb52x51[_0x3ed6[211]](_0xeb52x2b)}})[_0x3ed6[44]](function(_0xeb52x4f){if(_0xeb52x4f){_0xeb52x2c= _0xeb52x4f[_0x3ed6[80]];if(!_0xeb52x1f[_0x3ed6[74]][_0x3ed6[82]](_0x3ed6[81])){_0xeb52x2b[_0x3ed6[52]]= qs[_0x3ed6[52]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[52]]);_0xeb52x2b[_0x3ed6[51]]= qs[_0x3ed6[51]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[51]])};return _0xeb52x51[_0x3ed6[211]](_0xeb52x2b)}})[_0x3ed6[44]](function(_0xeb52x3c){if(_0xeb52x3c){return _0xeb52x3c?{count:_0xeb52x2c,rows:_0xeb52x3c}:null}})[_0x3ed6[44]](respondWithResult(_0xeb52x28,null))[_0x3ed6[35]](handleError(_0xeb52x28,null))};exports[_0x3ed6[213]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){var _0xeb52x2b={raw:true,where:{}};var _0xeb52x37={};var _0xeb52x4d={count:0,rows:[]};return db[_0x3ed6[68]][_0x3ed6[199]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){_0xeb52x37[_0x3ed6[66]]= _[_0x3ed6[69]](db[_0x3ed6[214]][_0x3ed6[67]]);_0xeb52x37[_0x3ed6[74]]= _[_0x3ed6[69]](_0xeb52x1f[_0x3ed6[74]]);_0xeb52x37[_0x3ed6[76]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],_0xeb52x37[_0x3ed6[74]]);_0xeb52x2b[_0x3ed6[78]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],qs[_0x3ed6[79]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[79]]));_0xeb52x2b[_0x3ed6[78]]= (_0xeb52x2b[_0x3ed6[78]][_0x3ed6[80]])?_0xeb52x2b[_0x3ed6[78]]:_0xeb52x37[_0x3ed6[66]];if(!_0xeb52x1f[_0x3ed6[74]][_0x3ed6[82]](_0x3ed6[81])){_0xeb52x2b[_0x3ed6[52]]= qs[_0x3ed6[52]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[52]]);_0xeb52x2b[_0x3ed6[51]]= qs[_0x3ed6[51]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[51]])};_0xeb52x2b[_0x3ed6[83]]= qs[_0x3ed6[84]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[84]]);_0xeb52x2b[_0x3ed6[85]]= qs[_0x3ed6[76]](_[_0x3ed6[86]](_0xeb52x1f[_0x3ed6[74]],_0xeb52x37[_0x3ed6[76]]));_0xeb52x2b[_0x3ed6[85]][_0x3ed6[197]]= _0xeb52x28[_0x3ed6[103]];if(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]){_0xeb52x2b[_0x3ed6[85]]= _[_0x3ed6[89]](_0xeb52x2b[_0x3ed6[85]],{$or:_[_0x3ed6[96]](_0xeb52x2b[_0x3ed6[78]],function(_0xeb52x3a){var _0xeb52x38={};_0xeb52x38[_0xeb52x3a]= {$like:_0x3ed6[95]+ _0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]+ _0x3ed6[95]};return _0xeb52x38})})};_0xeb52x2b= _[_0x3ed6[89]]({},_0xeb52x2b,_0xeb52x1f[_0x3ed6[97]]);return db[_0x3ed6[214]][_0x3ed6[50]]({where:_0xeb52x2b[_0x3ed6[85]]})[_0x3ed6[44]](function(_0xeb52x2c){_0xeb52x4d[_0x3ed6[50]]= _0xeb52x2c;if(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[99]]){_0xeb52x2b[_0x3ed6[100]]= [{all:true}]};return db[_0x3ed6[214]][_0x3ed6[101]](_0xeb52x2b)})[_0x3ed6[44]](function(_0xeb52x3c){_0xeb52x4d[_0x3ed6[98]]= _0xeb52x3c;return _0xeb52x4d})}})[_0x3ed6[44]](respondWithFilteredResult(_0xeb52x25,_0xeb52x2b))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[215]]= function(_0xeb52x1f,_0xeb52x28,_0xeb52x3d){var _0xeb52x2b={};var _0xeb52x37={};var _0xeb52x51;var _0xeb52x2c;return db[_0x3ed6[68]][_0x3ed6[199]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x28,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){_0xeb52x51= _0xeb52x28;_0xeb52x37[_0x3ed6[66]]= _[_0x3ed6[69]](db[_0x3ed6[216]][_0x3ed6[67]]);_0xeb52x37[_0x3ed6[74]]= _[_0x3ed6[69]](_0xeb52x1f[_0x3ed6[74]]);_0xeb52x37[_0x3ed6[76]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],_0xeb52x37[_0x3ed6[74]]);_0xeb52x2b[_0x3ed6[78]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],qs[_0x3ed6[79]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[79]]));_0xeb52x2b[_0x3ed6[78]]= (_0xeb52x2b[_0x3ed6[78]][_0x3ed6[80]])?_0xeb52x2b[_0x3ed6[78]]:_0xeb52x37[_0x3ed6[66]];_0xeb52x2b[_0x3ed6[83]]= qs[_0x3ed6[84]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[84]]);_0xeb52x2b[_0x3ed6[85]]= qs[_0x3ed6[76]](_[_0x3ed6[86]](_0xeb52x1f[_0x3ed6[74]],_0xeb52x37[_0x3ed6[76]]));if(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]){_0xeb52x2b[_0x3ed6[85]]= _[_0x3ed6[89]](_0xeb52x2b[_0x3ed6[85]],{$or:_[_0x3ed6[96]](_0xeb52x2b[_0x3ed6[78]],function(_0xeb52x3a){var _0xeb52x38={};_0xeb52x38[_0xeb52x3a]= {$like:_0x3ed6[95]+ _0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]+ _0x3ed6[95]};return _0xeb52x38})})};_0xeb52x2b= _[_0x3ed6[89]]({},_0xeb52x2b,_0xeb52x1f[_0x3ed6[97]]);return _0xeb52x51[_0x3ed6[215]](_0xeb52x2b)}})[_0x3ed6[44]](function(_0xeb52x4f){if(_0xeb52x4f){_0xeb52x2c= _0xeb52x4f[_0x3ed6[80]];if(!_0xeb52x1f[_0x3ed6[74]][_0x3ed6[82]](_0x3ed6[81])){_0xeb52x2b[_0x3ed6[52]]= qs[_0x3ed6[52]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[52]]);_0xeb52x2b[_0x3ed6[51]]= qs[_0x3ed6[51]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[51]])};return _0xeb52x51[_0x3ed6[215]](_0xeb52x2b)}})[_0x3ed6[44]](function(_0xeb52x3c){if(_0xeb52x3c){return _0xeb52x3c?{count:_0xeb52x2c,rows:_0xeb52x3c}:null}})[_0x3ed6[44]](respondWithResult(_0xeb52x28,null))[_0x3ed6[35]](handleError(_0xeb52x28,null))};exports[_0x3ed6[217]]= function(_0xeb52x1f,_0xeb52x28,_0xeb52x3d){var _0xeb52x2b={};var _0xeb52x37={};var _0xeb52x51;var _0xeb52x2c;return db[_0x3ed6[68]][_0x3ed6[199]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x28,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){_0xeb52x51= _0xeb52x28;_0xeb52x37[_0x3ed6[66]]= _[_0x3ed6[69]](db[_0x3ed6[218]][_0x3ed6[67]]);_0xeb52x37[_0x3ed6[74]]= _[_0x3ed6[69]](_0xeb52x1f[_0x3ed6[74]]);_0xeb52x37[_0x3ed6[76]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],_0xeb52x37[_0x3ed6[74]]);_0xeb52x2b[_0x3ed6[78]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],qs[_0x3ed6[79]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[79]]));_0xeb52x2b[_0x3ed6[78]]= (_0xeb52x2b[_0x3ed6[78]][_0x3ed6[80]])?_0xeb52x2b[_0x3ed6[78]]:_0xeb52x37[_0x3ed6[66]];_0xeb52x2b[_0x3ed6[83]]= qs[_0x3ed6[84]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[84]]);_0xeb52x2b[_0x3ed6[85]]= qs[_0x3ed6[76]](_[_0x3ed6[86]](_0xeb52x1f[_0x3ed6[74]],_0xeb52x37[_0x3ed6[76]]));if(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]){_0xeb52x2b[_0x3ed6[85]]= _[_0x3ed6[89]](_0xeb52x2b[_0x3ed6[85]],{$or:_[_0x3ed6[96]](_0xeb52x2b[_0x3ed6[78]],function(_0xeb52x3a){var _0xeb52x38={};_0xeb52x38[_0xeb52x3a]= {$like:_0x3ed6[95]+ _0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]+ _0x3ed6[95]};return _0xeb52x38})})};_0xeb52x2b= _[_0x3ed6[89]]({},_0xeb52x2b,_0xeb52x1f[_0x3ed6[97]]);return _0xeb52x51[_0x3ed6[217]](_0xeb52x2b)}})[_0x3ed6[44]](function(_0xeb52x4f){if(_0xeb52x4f){_0xeb52x2c= _0xeb52x4f[_0x3ed6[80]];if(!_0xeb52x1f[_0x3ed6[74]][_0x3ed6[82]](_0x3ed6[81])){_0xeb52x2b[_0x3ed6[52]]= qs[_0x3ed6[52]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[52]]);_0xeb52x2b[_0x3ed6[51]]= qs[_0x3ed6[51]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[51]])};return _0xeb52x51[_0x3ed6[217]](_0xeb52x2b)}})[_0x3ed6[44]](function(_0xeb52x3c){if(_0xeb52x3c){return _0xeb52x3c?{count:_0xeb52x2c,rows:_0xeb52x3c}:null}})[_0x3ed6[44]](respondWithResult(_0xeb52x28,null))[_0x3ed6[35]](handleError(_0xeb52x28,null))};exports[_0x3ed6[219]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){var _0xeb52x49;var _0xeb52x4a;return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]],role:_0x3ed6[113]},attributes:[_0x3ed6[103],_0x3ed6[63],_0x3ed6[112],_0x3ed6[129],_0x3ed6[182]]})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){_0xeb52x49= _0xeb52x28;return db[_0x3ed6[173]][_0x3ed6[61]]({where:{membername:_0xeb52x49[_0x3ed6[63]]},individualHooks:true})}})[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x49){return _0xeb52x49[_0x3ed6[230]]({raw:true})}})[_0x3ed6[44]](function(_0xeb52x4f){var _0xeb52x4b=[];if(_0xeb52x4f){_0xeb52x4a= _0xeb52x4f;if(_0xeb52x4a[_0x3ed6[80]]){for(var _0xeb52x46=0;_0xeb52x46< _0xeb52x4a[_0x3ed6[80]];_0xeb52x46++){_0xeb52x4b[_0x3ed6[174]]({membername:_0xeb52x49[_0x3ed6[63]],UserId:_0xeb52x49[_0x3ed6[103]],queue_name:_0xeb52x4a[_0xeb52x46][_0x3ed6[63]],VoiceQueueId:_0xeb52x4a[_0xeb52x46][_0x3ed6[103]],interface:util[_0x3ed6[121]](_0x3ed6[168],_0x3ed6[169],_0xeb52x49[_0x3ed6[63]]),paused:_0xeb52x49[_0x3ed6[182]]|| false,penalty:_0xeb52x4a[_0xeb52x46][_0x3ed6[228]]|| 0})};return BPromise[_0x3ed6[229]](_0xeb52x4b,function(_0xeb52x38){return db[_0x3ed6[173]][_0x3ed6[172]](_0xeb52x38)})}}})[_0x3ed6[44]](function(){return db[_0x3ed6[227]][_0x3ed6[101]]({where:{membername:_0xeb52x49[_0x3ed6[63]],interface:util[_0x3ed6[121]](_0x3ed6[168],_0x3ed6[169],_0xeb52x49[_0x3ed6[63]]),exitAt:null}})})[_0x3ed6[44]](function(_0xeb52x4b){var _0xeb52x57=[];_0xeb52x4b[_0x3ed6[225]](function(_0xeb52x58){_0xeb52x57[_0x3ed6[174]](_0xeb52x58[_0x3ed6[60]]({exitAt:moment()[_0x3ed6[121]](_0x3ed6[220])}))});return BPromise[_0x3ed6[175]](_0xeb52x57)})[_0x3ed6[44]](function(){var _0xeb52x52=[];var _0xeb52x53=[];var _0xeb52x54=utils[_0x3ed6[222]]();var _0xeb52x55={membername:_0xeb52x49[_0x3ed6[63]],interface:util[_0x3ed6[121]](_0x3ed6[168],_0x3ed6[169],_0xeb52x49[_0x3ed6[63]]),enterAt:moment()[_0x3ed6[121]](_0x3ed6[220]),role:_0xeb52x49[_0x3ed6[112]],internal:_0xeb52x49[_0x3ed6[129]]};_0xeb52x54[_0x3ed6[225]](function(_0xeb52x56){_0xeb52x52[_0x3ed6[174]](_[_0x3ed6[89]]({channel:_0xeb52x56,type:_0x3ed6[223]},_0xeb52x55));if(_0xeb52x49[_0x3ed6[182]]){_0xeb52x53[_0x3ed6[174]](_[_0x3ed6[89]]({channel:_0xeb52x56,type:_0x3ed6[224],data1:_0x3ed6[221]},_0xeb52x55))}});return db[_0x3ed6[227]][_0x3ed6[106]](_0xeb52x52[_0x3ed6[226]](_0xeb52x53),{individualHooks:true})})[_0x3ed6[44]](function(){return _0xeb52x49[_0x3ed6[60]]({online:true,lastLoginAt:moment()[_0x3ed6[121]](_0x3ed6[220]),voicePause:_0xeb52x49[_0x3ed6[182]]|| false,mailPause:_0xeb52x49[_0x3ed6[182]]|| false,chatPause:_0xeb52x49[_0x3ed6[182]]|| false,faxPause:_0xeb52x49[_0x3ed6[182]]|| false,smsPause:_0xeb52x49[_0x3ed6[182]]|| false,openchannelPause:_0xeb52x49[_0x3ed6[182]]|| false,pauseType:_0xeb52x49[_0x3ed6[182]]?_0x3ed6[221]:null,lastPauseAt:moment()[_0x3ed6[121]](_0x3ed6[220])})})[_0x3ed6[44]](respondWithResult(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[231]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){var _0xeb52x49;return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]],role:_0x3ed6[113]},attributes:[_0x3ed6[103],_0x3ed6[63],_0x3ed6[112]]})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){_0xeb52x49= _0xeb52x28;return db[_0x3ed6[173]][_0x3ed6[61]]({where:{membername:_0xeb52x49[_0x3ed6[63]]},individualHooks:true})}})[_0x3ed6[44]](function(){return db[_0x3ed6[227]][_0x3ed6[101]]({where:{membername:_0xeb52x49[_0x3ed6[63]],interface:util[_0x3ed6[121]](_0x3ed6[168],_0x3ed6[169],_0xeb52x49[_0x3ed6[63]]),exitAt:null}})})[_0x3ed6[44]](function(_0xeb52x4b){var _0xeb52x57=[];_0xeb52x4b[_0x3ed6[225]](function(_0xeb52x58){_0xeb52x57[_0x3ed6[174]](_0xeb52x58[_0x3ed6[60]]({exitAt:moment()[_0x3ed6[121]](_0x3ed6[220])}))});return BPromise[_0x3ed6[175]](_0xeb52x57)})[_0x3ed6[44]](function(){return _0xeb52x49[_0x3ed6[60]]({online:false,lastLoginAt:null,voicePause:false,mailPause:false,chatPause:false,faxPause:false,smsPause:false,openchannelPause:false})})[_0x3ed6[44]](respondWithResult(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[232]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){var _0xeb52x49;return db[_0x3ed6[173]][_0x3ed6[60]]({paused:1},{where:{UserId:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]},individualHooks:true})[_0x3ed6[44]](function(){return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]],role:_0x3ed6[113]},attributes:[_0x3ed6[103],_0x3ed6[63],_0x3ed6[112],_0x3ed6[129]]})})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){_0xeb52x49= _0xeb52x28;return respondWithRpcPromise(_0x3ed6[236],_0x3ed6[232],{id:_0xeb52x49[_0x3ed6[103]],name:_0xeb52x49[_0x3ed6[63]],pause:true})}})[_0x3ed6[44]](function(){if(_0xeb52x49){return db[_0x3ed6[227]][_0x3ed6[101]]({where:{membername:_0xeb52x49[_0x3ed6[63]],interface:util[_0x3ed6[121]](_0x3ed6[168],_0x3ed6[169],_0xeb52x49[_0x3ed6[63]]),type:_0x3ed6[224],exitAt:null}})}})[_0x3ed6[44]](function(_0xeb52x4b){if(_0xeb52x4b[_0x3ed6[80]]){var _0xeb52x59=moment()[_0x3ed6[121]](_0x3ed6[220]);for(var _0xeb52x46=0,_0xeb52x47=_0xeb52x4b[_0x3ed6[80]];_0xeb52x46< _0xeb52x47;_0xeb52x46++){_0xeb52x4b[_0xeb52x46][_0x3ed6[235]]({exitAt:_0xeb52x59})}}})[_0x3ed6[44]](function(){var _0xeb52x4b=[];var _0xeb52x54=utils[_0x3ed6[222]]();_0xeb52x54[_0x3ed6[225]](function(_0xeb52x56){_0xeb52x4b[_0x3ed6[174]]({channel:_0xeb52x56,membername:_0xeb52x49[_0x3ed6[63]],interface:util[_0x3ed6[121]](_0x3ed6[168],_0x3ed6[169],_0xeb52x49[_0x3ed6[63]]),type:_0x3ed6[224],enterAt:moment()[_0x3ed6[121]](_0x3ed6[220]),data1:_0xeb52x1f[_0x3ed6[107]][_0x3ed6[233]]|| _0x3ed6[234],role:_0xeb52x49[_0x3ed6[112]],internal:_0xeb52x49[_0x3ed6[129]]})});return db[_0x3ed6[227]][_0x3ed6[106]](_0xeb52x4b,{individualHooks:true})})[_0x3ed6[44]](function(){return _0xeb52x49[_0x3ed6[60]]({voicePause:true,mailPause:true,chatPause:true,faxPause:true,smsPause:true,openchannelPause:true,pauseType:_0xeb52x1f[_0x3ed6[107]][_0x3ed6[233]]|| _0x3ed6[234],lastPauseAt:moment()[_0x3ed6[121]](_0x3ed6[220])})})[_0x3ed6[44]](respondWithResult(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[237]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){var _0xeb52x49;return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]},attributes:[_0x3ed6[103],_0x3ed6[63],_0x3ed6[112]]})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){_0xeb52x49= _0xeb52x28;if(_0xeb52x1f[_0x3ed6[107]][_0x3ed6[166]]&&  !utils[_0x3ed6[177]](_0xeb52x1f[_0x3ed6[107]][_0x3ed6[166]])){throw  new db[_0x3ed6[159]].ValidationError(_0x3ed6[178])};switch(_0xeb52x1f[_0x3ed6[107]][_0x3ed6[166]]){case _0x3ed6[167]:return respondWithRpcPromise(_0x3ed6[236],_0x3ed6[237],{id:_0xeb52x49[_0x3ed6[103]],name:_0xeb52x49[_0x3ed6[63]],pause:false})[_0x3ed6[44]](function(){return db[_0x3ed6[173]][_0x3ed6[60]]({paused:0},{where:{UserId:_0xeb52x49[_0x3ed6[103]]},individualHooks:true})})[_0x3ed6[44]](function(){return db[_0x3ed6[227]][_0x3ed6[105]]({where:{channel:_0xeb52x1f[_0x3ed6[107]][_0x3ed6[166]],membername:_0xeb52x49[_0x3ed6[63]],interface:util[_0x3ed6[121]](_0x3ed6[168],_0x3ed6[169],_0xeb52x49[_0x3ed6[63]]),type:_0x3ed6[224],exitAt:null}})})[_0x3ed6[44]](function(_0xeb52x58){if(_0xeb52x58){return _0xeb52x58[_0x3ed6[60]]({exitAt:moment()[_0x3ed6[121]](_0x3ed6[220]),data2:_0x3ed6[238]},{individualHooks:true})};return null})[_0x3ed6[44]](function(){return _0xeb52x49[_0x3ed6[60]]({voicePause:false})});case _0x3ed6[239]:;case _0x3ed6[240]:;case _0x3ed6[241]:;case _0x3ed6[242]:;case _0x3ed6[245]:return db[_0x3ed6[227]][_0x3ed6[105]]({where:{channel:_0xeb52x1f[_0x3ed6[107]][_0x3ed6[166]],membername:_0xeb52x49[_0x3ed6[63]],interface:util[_0x3ed6[121]](_0x3ed6[168],_0x3ed6[169],_0xeb52x49[_0x3ed6[63]]),type:_0x3ed6[224],exitAt:null}})[_0x3ed6[44]](function(_0xeb52x58){return _0xeb52x58[_0x3ed6[60]]({exitAt:moment()[_0x3ed6[121]](_0x3ed6[220]),data2:_0x3ed6[238]},{individualHooks:true})})[_0x3ed6[44]](function(){var _0xeb52x5a={};_[_0x3ed6[56]](_0xeb52x5a,util[_0x3ed6[121]](_0x3ed6[243],_0xeb52x1f[_0x3ed6[107]][_0x3ed6[166]],_0x3ed6[244]),false);return _0xeb52x49[_0x3ed6[60]](_0xeb52x5a)});default:return respondWithRpcPromise(_0x3ed6[236],_0x3ed6[237],{id:_0xeb52x49[_0x3ed6[103]],name:_0xeb52x49[_0x3ed6[63]],pause:false})[_0x3ed6[44]](function(){return db[_0x3ed6[173]][_0x3ed6[60]]({paused:0},{where:{UserId:_0xeb52x49[_0x3ed6[103]]}})})[_0x3ed6[44]](function(){return db[_0x3ed6[227]][_0x3ed6[101]]({where:{membername:_0xeb52x49[_0x3ed6[63]],interface:util[_0x3ed6[121]](_0x3ed6[168],_0x3ed6[169],_0xeb52x49[_0x3ed6[63]]),type:_0x3ed6[224],exitAt:null}})})[_0x3ed6[44]](function(_0xeb52x4b){var _0xeb52x57=[];_0xeb52x4b[_0x3ed6[225]](function(_0xeb52x58){_0xeb52x57[_0x3ed6[174]](_0xeb52x58[_0x3ed6[60]]({exitAt:moment()[_0x3ed6[121]](_0x3ed6[220]),data2:_0x3ed6[238]}))});return BPromise[_0x3ed6[175]](_0xeb52x57)})[_0x3ed6[44]](function(){return _0xeb52x49[_0x3ed6[60]]({voicePause:false,mailPause:false,chatPause:false,faxPause:false,smsPause:false,openchannelPause:false})})}}})[_0x3ed6[44]](respondWithResult(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[246]]= function(_0xeb52x1f,_0xeb52x28,_0xeb52x3d){var _0xeb52x2b={};var _0xeb52x37={};var _0xeb52x51;var _0xeb52x2c;return db[_0x3ed6[68]][_0x3ed6[199]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x28,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){_0xeb52x51= _0xeb52x28;_0xeb52x37[_0x3ed6[66]]= _[_0x3ed6[69]](db[_0x3ed6[247]][_0x3ed6[67]]);_0xeb52x37[_0x3ed6[74]]= _[_0x3ed6[69]](_0xeb52x1f[_0x3ed6[74]]);_0xeb52x37[_0x3ed6[76]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],_0xeb52x37[_0x3ed6[74]]);_0xeb52x2b[_0x3ed6[78]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],qs[_0x3ed6[79]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[79]]));_0xeb52x2b[_0x3ed6[78]]= (_0xeb52x2b[_0x3ed6[78]][_0x3ed6[80]])?_0xeb52x2b[_0x3ed6[78]]:_0xeb52x37[_0x3ed6[66]];_0xeb52x2b[_0x3ed6[83]]= qs[_0x3ed6[84]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[84]]);_0xeb52x2b[_0x3ed6[85]]= qs[_0x3ed6[76]](_[_0x3ed6[86]](_0xeb52x1f[_0x3ed6[74]],_0xeb52x37[_0x3ed6[76]]));if(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]){_0xeb52x2b[_0x3ed6[85]]= _[_0x3ed6[89]](_0xeb52x2b[_0x3ed6[85]],{$or:_[_0x3ed6[96]](_0xeb52x2b[_0x3ed6[78]],function(_0xeb52x3a){var _0xeb52x38={};_0xeb52x38[_0xeb52x3a]= {$like:_0x3ed6[95]+ _0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]+ _0x3ed6[95]};return _0xeb52x38})})};_0xeb52x2b= _[_0x3ed6[89]]({},_0xeb52x2b,_0xeb52x1f[_0x3ed6[97]]);return _0xeb52x51[_0x3ed6[246]](_0xeb52x2b)}})[_0x3ed6[44]](function(_0xeb52x4f){if(_0xeb52x4f){_0xeb52x2c= _0xeb52x4f[_0x3ed6[80]];if(!_0xeb52x1f[_0x3ed6[74]][_0x3ed6[82]](_0x3ed6[81])){_0xeb52x2b[_0x3ed6[52]]= qs[_0x3ed6[52]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[52]]);_0xeb52x2b[_0x3ed6[51]]= qs[_0x3ed6[51]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[51]])};return _0xeb52x51[_0x3ed6[246]](_0xeb52x2b)}})[_0x3ed6[44]](function(_0xeb52x3c){if(_0xeb52x3c){return _0xeb52x3c?{count:_0xeb52x2c,rows:_0xeb52x3c}:null}})[_0x3ed6[44]](respondWithResult(_0xeb52x28,null))[_0x3ed6[35]](handleError(_0xeb52x28,null))};exports[_0x3ed6[248]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){return _0xeb52x28[_0x3ed6[248]](_0xeb52x1f[_0x3ed6[107]][_0x3ed6[110]],_[_0x3ed6[111]](_0xeb52x1f[_0x3ed6[107]],[_0x3ed6[110],_0x3ed6[103]])|| {})}})[_0x3ed6[44]](respondWithResult(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[249]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){var _0xeb52x4f;return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){return _0xeb52x28[_0x3ed6[249]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]])}})[_0x3ed6[44]](respondWithStatusCode(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[250]]= function(_0xeb52x1f,_0xeb52x28,_0xeb52x3d){var _0xeb52x2b={};var _0xeb52x37={};var _0xeb52x51;var _0xeb52x2c;return db[_0x3ed6[68]][_0x3ed6[199]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x28,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){_0xeb52x51= _0xeb52x28;_0xeb52x37[_0x3ed6[66]]= _[_0x3ed6[69]](db[_0x3ed6[251]][_0x3ed6[67]]);_0xeb52x37[_0x3ed6[74]]= _[_0x3ed6[69]](_0xeb52x1f[_0x3ed6[74]]);_0xeb52x37[_0x3ed6[76]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],_0xeb52x37[_0x3ed6[74]]);_0xeb52x2b[_0x3ed6[78]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],qs[_0x3ed6[79]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[79]]));_0xeb52x2b[_0x3ed6[78]]= (_0xeb52x2b[_0x3ed6[78]][_0x3ed6[80]])?_0xeb52x2b[_0x3ed6[78]]:_0xeb52x37[_0x3ed6[66]];_0xeb52x2b[_0x3ed6[83]]= qs[_0x3ed6[84]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[84]]);_0xeb52x2b[_0x3ed6[85]]= qs[_0x3ed6[76]](_[_0x3ed6[86]](_0xeb52x1f[_0x3ed6[74]],_0xeb52x37[_0x3ed6[76]]));if(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]){_0xeb52x2b[_0x3ed6[85]]= _[_0x3ed6[89]](_0xeb52x2b[_0x3ed6[85]],{$or:_[_0x3ed6[96]](_0xeb52x2b[_0x3ed6[78]],function(_0xeb52x3a){var _0xeb52x38={};_0xeb52x38[_0xeb52x3a]= {$like:_0x3ed6[95]+ _0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]+ _0x3ed6[95]};return _0xeb52x38})})};_0xeb52x2b= _[_0x3ed6[89]]({},_0xeb52x2b,_0xeb52x1f[_0x3ed6[97]]);return _0xeb52x51[_0x3ed6[250]](_0xeb52x2b)}})[_0x3ed6[44]](function(_0xeb52x4f){if(_0xeb52x4f){_0xeb52x2c= _0xeb52x4f[_0x3ed6[80]];if(!_0xeb52x1f[_0x3ed6[74]][_0x3ed6[82]](_0x3ed6[81])){_0xeb52x2b[_0x3ed6[52]]= qs[_0x3ed6[52]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[52]]);_0xeb52x2b[_0x3ed6[51]]= qs[_0x3ed6[51]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[51]])};return _0xeb52x51[_0x3ed6[250]](_0xeb52x2b)}})[_0x3ed6[44]](function(_0xeb52x3c){if(_0xeb52x3c){return _0xeb52x3c?{count:_0xeb52x2c,rows:_0xeb52x3c}:null}})[_0x3ed6[44]](respondWithResult(_0xeb52x28,null))[_0x3ed6[35]](handleError(_0xeb52x28,null))};exports[_0x3ed6[252]]= function(_0xeb52x1f,_0xeb52x28,_0xeb52x3d){var _0xeb52x2b={};var _0xeb52x37={};var _0xeb52x51;var _0xeb52x2c;return db[_0x3ed6[68]][_0x3ed6[199]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x28,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){_0xeb52x51= _0xeb52x28;_0xeb52x37[_0x3ed6[66]]= _[_0x3ed6[69]](db[_0x3ed6[68]][_0x3ed6[67]]);_0xeb52x37[_0x3ed6[74]]= _[_0x3ed6[69]](_0xeb52x1f[_0x3ed6[74]]);_0xeb52x37[_0x3ed6[76]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],_0xeb52x37[_0x3ed6[74]]);_0xeb52x2b[_0x3ed6[78]]= _[_0x3ed6[77]](_0xeb52x37[_0x3ed6[66]],qs[_0x3ed6[79]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[79]]));_0xeb52x2b[_0x3ed6[78]]= (_0xeb52x2b[_0x3ed6[78]][_0x3ed6[80]])?_0xeb52x2b[_0x3ed6[78]]:_0xeb52x37[_0x3ed6[66]];_0xeb52x2b[_0x3ed6[83]]= qs[_0x3ed6[84]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[84]]);_0xeb52x2b[_0x3ed6[85]]= qs[_0x3ed6[76]](_[_0x3ed6[86]](_0xeb52x1f[_0x3ed6[74]],_0xeb52x37[_0x3ed6[76]]));if(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]){_0xeb52x2b[_0x3ed6[85]]= _[_0x3ed6[89]](_0xeb52x2b[_0x3ed6[85]],{$or:_[_0x3ed6[96]](_0xeb52x2b[_0x3ed6[78]],function(_0xeb52x3a){var _0xeb52x38={};_0xeb52x38[_0xeb52x3a]= {$like:_0x3ed6[95]+ _0xeb52x1f[_0x3ed6[74]][_0x3ed6[90]]+ _0x3ed6[95]};return _0xeb52x38})})};_0xeb52x2b[_0x3ed6[66]]= db[_0x3ed6[68]];_0xeb52x2b[_0x3ed6[255]]= _0x3ed6[253];_0xeb52x2b= _[_0x3ed6[89]]({},_0xeb52x2b,_0xeb52x1f[_0x3ed6[97]]);return _0xeb52x51[_0x3ed6[230]]({include:[_0xeb52x2b]})}})[_0x3ed6[44]](function(_0xeb52x4f){if(_0xeb52x4f){var _0xeb52x5b={},_0xeb52x3c=[],_0xeb52x2c=0;for(var _0xeb52x46=0;_0xeb52x46< _0xeb52x4f[_0x3ed6[80]];_0xeb52x46+= 1){for(var _0xeb52x5c=0,_0xeb52x5d;_0xeb52x5c< _0xeb52x4f[_0xeb52x46][_0x3ed6[253]][_0x3ed6[80]];_0xeb52x5c+= 1){_0xeb52x5d= _0xeb52x4f[_0xeb52x46][_0x3ed6[253]][_0xeb52x5c][_0x3ed6[202]]({plain:true});_0xeb52x5b[_0xeb52x5d[_0x3ed6[103]]]= _0xeb52x5d}};_0xeb52x5b= _[_0x3ed6[254]](_0xeb52x5b);for(var _0xeb52x5e=qs[_0x3ed6[51]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[51]]);_0xeb52x5e< _0xeb52x5b[_0x3ed6[80]]&& _0xeb52x3c[_0x3ed6[80]]< qs[_0x3ed6[52]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[52]]);_0xeb52x5e+= 1){if(_0xeb52x5b[_0xeb52x5e]){_0xeb52x3c[_0x3ed6[174]](_0xeb52x5b[_0xeb52x5e])}};return {count:_0xeb52x5b[_0x3ed6[80]],rows:_0xeb52x3c}}})[_0x3ed6[44]](respondWithResult(_0xeb52x28,null))[_0x3ed6[35]](handleError(_0xeb52x28,null))};exports[_0x3ed6[61]]= function(_0xeb52x1f,_0xeb52x25){if(_0xeb52x1f[_0x3ed6[125]][_0x3ed6[103]]== _0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]){return _0xeb52x25[_0x3ed6[48]](500)[_0x3ed6[64]]({message:_0x3ed6[256]})};return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](removeEntity(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[257]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){return _0xeb52x28[_0x3ed6[257]](_0xeb52x1f[_0x3ed6[107]][_0x3ed6[110]],_[_0x3ed6[111]](_0xeb52x1f[_0x3ed6[107]],[_0x3ed6[110],_0x3ed6[103]])|| {})[_0x3ed6[260]](function(_0xeb52x4f){for(var _0xeb52x46=0;_0xeb52x46< _0xeb52x1f[_0x3ed6[107]][_0x3ed6[110]][_0x3ed6[80]];_0xeb52x46+= 1){socket[_0x3ed6[259]](_0x3ed6[258],{ChatInteractionId:Number(_0xeb52x1f[_0x3ed6[107]][_0x3ed6[110]][_0xeb52x46]),UserId:Number(_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]])})};return _0xeb52x4f})}})[_0x3ed6[44]](respondWithResult(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[261]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){var _0xeb52x4f;return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){return _0xeb52x28[_0x3ed6[261]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]])[_0x3ed6[44]](function(_0xeb52x4f){if(_[_0x3ed6[262]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]])){for(var _0xeb52x46=0;_0xeb52x46< _0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]][_0x3ed6[80]];_0xeb52x46+= 1){socket[_0x3ed6[259]](_0x3ed6[263],{ChatInteractionId:Number(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]][_0xeb52x46]),UserId:Number(_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]])})}}else {socket[_0x3ed6[259]](_0x3ed6[263],{ChatInteractionId:Number(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]]),UserId:Number(_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]])})}})}})[_0x3ed6[44]](respondWithStatusCode(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[264]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){return _0xeb52x28[_0x3ed6[264]](_0xeb52x1f[_0x3ed6[107]][_0x3ed6[110]],_[_0x3ed6[111]](_0xeb52x1f[_0x3ed6[107]],[_0x3ed6[110],_0x3ed6[103]])|| {})[_0x3ed6[260]](function(_0xeb52x4f){for(var _0xeb52x46=0;_0xeb52x46< _0xeb52x1f[_0x3ed6[107]][_0x3ed6[110]][_0x3ed6[80]];_0xeb52x46+= 1){socket[_0x3ed6[259]](_0x3ed6[265],{MailInteractionId:Number(_0xeb52x1f[_0x3ed6[107]][_0x3ed6[110]][_0xeb52x46]),UserId:Number(_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]])})};return _0xeb52x4f})}})[_0x3ed6[44]](respondWithResult(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[266]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){var _0xeb52x4f;return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){return _0xeb52x28[_0x3ed6[266]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]])[_0x3ed6[44]](function(_0xeb52x4f){if(_[_0x3ed6[262]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]])){for(var _0xeb52x46=0;_0xeb52x46< _0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]][_0x3ed6[80]];_0xeb52x46+= 1){socket[_0x3ed6[259]](_0x3ed6[267],{MailInteractionId:Number(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]][_0xeb52x46]),UserId:Number(_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]])})}}else {socket[_0x3ed6[259]](_0x3ed6[267],{MailInteractionId:Number(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]]),UserId:Number(_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]])})}})}})[_0x3ed6[44]](respondWithStatusCode(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[268]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){return _0xeb52x28[_0x3ed6[268]](_0xeb52x1f[_0x3ed6[107]][_0x3ed6[110]],_[_0x3ed6[111]](_0xeb52x1f[_0x3ed6[107]],[_0x3ed6[110],_0x3ed6[103]])|| {})[_0x3ed6[260]](function(_0xeb52x4f){for(var _0xeb52x46=0;_0xeb52x46< _0xeb52x1f[_0x3ed6[107]][_0x3ed6[110]][_0x3ed6[80]];_0xeb52x46+= 1){socket[_0x3ed6[259]](_0x3ed6[269],{FaxInteractionId:Number(_0xeb52x1f[_0x3ed6[107]][_0x3ed6[110]][_0xeb52x46]),UserId:Number(_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]])})};return _0xeb52x4f})}})[_0x3ed6[44]](respondWithResult(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[270]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){var _0xeb52x4f;return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){return _0xeb52x28[_0x3ed6[270]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]])[_0x3ed6[44]](function(_0xeb52x4f){if(_[_0x3ed6[262]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]])){for(var _0xeb52x46=0;_0xeb52x46< _0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]][_0x3ed6[80]];_0xeb52x46+= 1){socket[_0x3ed6[259]](_0x3ed6[271],{FaxInteractionId:Number(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]][_0xeb52x46]),UserId:Number(_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]])})}}else {socket[_0x3ed6[259]](_0x3ed6[271],{FaxInteractionId:Number(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]]),UserId:Number(_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]])})}})}})[_0x3ed6[44]](respondWithStatusCode(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[272]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){return _0xeb52x28[_0x3ed6[272]](_0xeb52x1f[_0x3ed6[107]][_0x3ed6[110]],_[_0x3ed6[111]](_0xeb52x1f[_0x3ed6[107]],[_0x3ed6[110],_0x3ed6[103]])|| {})[_0x3ed6[260]](function(_0xeb52x4f){for(var _0xeb52x46=0;_0xeb52x46< _0xeb52x1f[_0x3ed6[107]][_0x3ed6[110]][_0x3ed6[80]];_0xeb52x46+= 1){socket[_0x3ed6[259]](_0x3ed6[273],{SmsInteractionId:Number(_0xeb52x1f[_0x3ed6[107]][_0x3ed6[110]][_0xeb52x46]),UserId:Number(_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]])})};return _0xeb52x4f})}})[_0x3ed6[44]](respondWithResult(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[274]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){var _0xeb52x4f;return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){return _0xeb52x28[_0x3ed6[274]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]])[_0x3ed6[44]](function(_0xeb52x4f){if(_[_0x3ed6[262]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]])){for(var _0xeb52x46=0;_0xeb52x46< _0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]][_0x3ed6[80]];_0xeb52x46+= 1){socket[_0x3ed6[259]](_0x3ed6[275],{SmsInteractionId:Number(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]][_0xeb52x46]),UserId:Number(_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]])})}}else {socket[_0x3ed6[259]](_0x3ed6[275],{SmsInteractionId:Number(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]]),UserId:Number(_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]])})}})}})[_0x3ed6[44]](respondWithStatusCode(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[276]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){return _0xeb52x28[_0x3ed6[276]](_0xeb52x1f[_0x3ed6[107]][_0x3ed6[110]],_[_0x3ed6[111]](_0xeb52x1f[_0x3ed6[107]],[_0x3ed6[110],_0x3ed6[103]])|| {})[_0x3ed6[260]](function(_0xeb52x4f){for(var _0xeb52x46=0;_0xeb52x46< _0xeb52x1f[_0x3ed6[107]][_0x3ed6[110]][_0x3ed6[80]];_0xeb52x46+= 1){socket[_0x3ed6[259]](_0x3ed6[277],{OpenchannelInteractionId:Number(_0xeb52x1f[_0x3ed6[107]][_0x3ed6[110]][_0xeb52x46]),UserId:Number(_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]])})};return _0xeb52x4f})}})[_0x3ed6[44]](respondWithResult(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))};exports[_0x3ed6[278]]= function(_0xeb52x1f,_0xeb52x25,_0xeb52x3d){var _0xeb52x4f;return db[_0x3ed6[68]][_0x3ed6[105]]({where:{id:_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]]}})[_0x3ed6[44]](handleEntityNotFound(_0xeb52x25,null))[_0x3ed6[44]](function(_0xeb52x28){if(_0xeb52x28){return _0xeb52x28[_0x3ed6[278]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]])[_0x3ed6[44]](function(_0xeb52x4f){if(_[_0x3ed6[262]](_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]])){for(var _0xeb52x46=0;_0xeb52x46< _0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]][_0x3ed6[80]];_0xeb52x46+= 1){socket[_0x3ed6[259]](_0x3ed6[279],{OpenchannelInteractionId:Number(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]][_0xeb52x46]),UserId:Number(_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]])})}}else {socket[_0x3ed6[259]](_0x3ed6[279],{OpenchannelInteractionId:Number(_0xeb52x1f[_0x3ed6[74]][_0x3ed6[110]]),UserId:Number(_0xeb52x1f[_0x3ed6[104]][_0x3ed6[103]])})}})}})[_0x3ed6[44]](respondWithStatusCode(_0xeb52x25,null))[_0x3ed6[35]](handleError(_0xeb52x25,null))}
\ No newline at end of file
+var _0x6425=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x75\x73\x65\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x55\x73\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x55\x73\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x55\x73\x65\x72","\x6B\x65\x79\x73","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x61\x6C\x74","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65\x42\x79","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x6C\x6F\x77\x65\x72","\x63\x6F\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x6E","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x61\x64\x64\x43\x6F\x6E\x74\x61\x63\x74\x73","\x69\x64\x73","\x6F\x6D\x69\x74","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x61\x67\x65\x6E\x74\x20\x72\x6F\x6C\x65","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x75\x73\x65\x72\x73","\x69\x73\x4E\x69\x6C","\x4C\x69\x63\x65\x6E\x73\x65\x20\x6C\x69\x6D\x69\x74\x20\x72\x65\x61\x63\x68\x65\x64","\x63\x6F\x75\x6E\x74\x20\x25\x73\x3A\x20\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x67\x65\x74\x4C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x75\x74\x69\x6C","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x63\x72\x65\x61\x74\x65","\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x6D\x61\x69\x6C\x62\x6F\x78","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73","\x31\x30\x31","\x31\x30\x32","\x31\x30\x33","\x31\x31\x30","\x31\x30\x34","\x31\x30\x35","\x31\x30\x36","\x31\x30\x37","\x31\x30\x38","\x31\x30\x39","\x31\x30\x30","\x31\x31\x31","\x66\x72\x6F\x6D","\x74\x6F","\x73\x65\x6C\x65\x63\x74\x20\x28\x73\x65\x6C\x65\x63\x74\x20\x49\x46\x4E\x55\x4C\x4C\x28\x6D\x61\x78\x28\x69\x6E\x74\x65\x72\x6E\x61\x6C\x29\x2B\x31\x2C\x31\x29\x20\x66\x72\x6F\x6D\x20\x75\x73\x65\x72\x73\x20\x77\x68\x65\x72\x65\x20\x69\x6E\x74\x65\x72\x6E\x61\x6C\x20\x3C\x20\x6D\x64\x2E\x69\x6E\x74\x65\x72\x6E\x61\x6C\x29\x20\x61\x73\x20\x27\x66\x72\x6F\x6D\x27\x2C\x20\x6D\x64\x2E\x69\x6E\x74\x65\x72\x6E\x61\x6C\x20\x2D\x20\x31\x20\x61\x73\x20\x27\x74\x6F\x27\x20\x66\x72\x6F\x6D\x20\x75\x73\x65\x72\x73\x20\x6D\x64\x20\x77\x68\x65\x72\x65\x20\x6D\x64\x2E\x69\x6E\x74\x65\x72\x6E\x61\x6C\x20\x21\x3D\x20\x31\x20\x61\x6E\x64\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74\x73\x20\x28\x73\x65\x6C\x65\x63\x74\x20\x31\x20\x66\x72\x6F\x6D\x20\x75\x73\x65\x72\x73\x20\x6D\x64\x32\x20\x77\x68\x65\x72\x65\x20\x6D\x64\x32\x2E\x69\x6E\x74\x65\x72\x6E\x61\x6C\x20\x3D\x20\x6D\x64\x2E\x69\x6E\x74\x65\x72\x6E\x61\x6C\x20\x2D\x20\x31\x29","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x6D\x69\x6E\x5F\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x6D\x61\x78","\x66\x69\x6E\x64\x42\x79\x49\x64","\x53\x65\x74\x74\x69\x6E\x67","\x63\x68\x61\x6E\x67\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x6E\x65\x77\x50\x61\x73\x73\x77\x6F\x72\x64","\x6F\x6C\x64\x50\x61\x73\x73\x77\x6F\x72\x64","\x49\x6E\x76\x61\x6C\x69\x64\x20\x62\x6F\x64\x79\x20\x66\x6F\x72\x6D\x61\x74\x2E\x20\x55\x73\x65\x20\x6F\x6C\x64\x50\x61\x73\x73\x6F\x72\x64\x20\x61\x6E\x64\x20\x6E\x65\x77\x50\x61\x73\x73\x77\x6F\x72\x64","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73","\x4E\x65\x77\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x66\x72\x6F\x6D\x20\x6F\x6C\x64\x20\x70\x61\x73\x73\x77\x6F\x72\x64","\x49\x6E\x76\x61\x6C\x69\x64\x20\x62\x6F\x64\x79\x20\x66\x6F\x72\x6D\x61\x74\x2E\x20\x55\x73\x65\x20\x6E\x65\x77\x50\x61\x73\x73\x77\x6F\x72\x64","\x55\x6E\x61\x75\x74\x68\x6F\x72\x69\x7A\x65\x64","\x61\x64\x64\x51\x75\x65\x75\x65\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x76\x6F\x69\x63\x65","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x70\x65\x6E\x61\x6C\x74\x79","\x75\x70\x73\x65\x72\x74","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74","\x70\x75\x73\x68","\x61\x6C\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x69\x73\x56\x61\x6C\x69\x64\x43\x68\x61\x6E\x6E\x65\x6C","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65","\x51\x75\x65\x75\x65\x73","\x6C\x6F\x67\x69\x6E\x49\x6E\x50\x61\x75\x73\x65","\x72\x65\x6D\x6F\x76\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65","\x61\x64\x64\x41\x76\x61\x74\x61\x72","\x75\x73\x65\x72\x70\x69\x63","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65","\x67\x65\x74\x41\x76\x61\x74\x61\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6C\x6F\x67\x6F\x73\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x70\x72\x6F\x66\x69\x6C\x65\x2E\x70\x6E\x67","\x6A\x6F\x69\x6E","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x55\x73\x65\x72\x49\x64","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x51\x75\x65\x75\x65\x73","\x51\x75\x65\x75\x65","\x67\x65\x74","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x72\x6F\x6C\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x52\x74","\x67\x65\x74\x47\x72\x6F\x75\x70\x73","\x43\x68\x61\x74\x47\x72\x6F\x75\x70","\x67\x65\x74\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x67\x65\x74\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6C\x6F\x67\x69\x6E","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x4C\x4F\x47\x49\x4E\x49\x4E\x50\x41\x55\x53\x45","\x67\x65\x74\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x4C\x4F\x47\x49\x4E","\x50\x41\x55\x53\x45","\x66\x6F\x72\x45\x61\x63\x68","\x63\x6F\x6E\x63\x61\x74","\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x65\x61\x63\x68","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x6C\x6F\x67\x6F\x75\x74","\x70\x61\x75\x73\x65","\x74\x79\x70\x65","\x44\x45\x46\x41\x55\x4C\x54\x20\x50\x41\x55\x53\x45","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x51\x75\x65\x75\x65\x50\x61\x75\x73\x65","\x75\x6E\x70\x61\x75\x73\x65","\x6D\x61\x6E\x75\x61\x6C","\x6D\x61\x69\x6C","\x63\x68\x61\x74","\x66\x61\x78","\x73\x6D\x73","\x25\x73\x25\x73","\x50\x61\x75\x73\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x67\x65\x74\x54\x65\x61\x6D\x73","\x54\x65\x61\x6D","\x61\x64\x64\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x67\x65\x74\x4C\x69\x73\x74\x73","\x43\x6D\x4C\x69\x73\x74","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x41\x67\x65\x6E\x74\x73","\x76\x61\x6C\x75\x65\x73","\x61\x73","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x64\x65\x6C\x65\x74\x65\x20\x79\x6F\x75\x72\x73\x65\x6C\x66","\x61\x64\x64\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x72\x65\x6D\x6F\x76\x65\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x69\x73\x41\x72\x72\x61\x79","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x72\x65\x6D\x6F\x76\x65","\x61\x64\x64\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x72\x65\x6D\x6F\x76\x65","\x61\x64\x64\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x72\x65\x6D\x6F\x76\x65","\x61\x64\x64\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x72\x65\x6D\x6F\x76\x65","\x61\x64\x64\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x72\x65\x6D\x6F\x76\x65"];_0x6425[0];var jsonpatch=require(_0x6425[1]);var rp=require(_0x6425[2]);var moment=require(_0x6425[3]);var BPromise=require(_0x6425[4]);var Mustache=require(_0x6425[5]);var util=require(_0x6425[6]);var path=require(_0x6425[7]);var sox=require(_0x6425[8]);var csv=require(_0x6425[9]);var ejs=require(_0x6425[10]);var fs=require(_0x6425[11]);var _=require(_0x6425[12]);var squel=require(_0x6425[13]);var crypto=require(_0x6425[14]);var jsforce=require(_0x6425[15]);var deskjs=require(_0x6425[16]);var toCsv=require(_0x6425[9]);var querystring=require(_0x6425[17]);var Papa=require(_0x6425[18]);var qs=require(_0x6425[19]);var logger=require(_0x6425[21])(_0x6425[20]);var utils=require(_0x6425[22]);var config=require(_0x6425[23]);var db=require(_0x6425[25])[_0x6425[24]];var socket=require(_0x6425[27])({host:_0x6425[26],port:6379});require(_0x6425[29])[_0x6425[28]](socket);var jayson=require(_0x6425[30]);var client=jayson[_0x6425[32]][_0x6425[31]]({port:9002});function respondWithRpcPromise(_0xbaa1x1d,_0xbaa1x1e,_0xbaa1x1f,_0xbaa1x20){return  new BPromise(function(_0xbaa1x21,_0xbaa1x22){var _0xbaa1x23=(_0xbaa1x20|| client);return _0xbaa1x23[_0x6425[45]](_0xbaa1x1d,_0xbaa1x1f)[_0x6425[44]](function(_0xbaa1x25){logger[_0x6425[37]](_0x6425[33],_0xbaa1x1e,_0x6425[36]);logger[_0x6425[40]](_0x6425[38],_0xbaa1x1e,_0x6425[36],JSON[_0x6425[39]](_0xbaa1x25));if(_0xbaa1x25[_0x6425[34]]){if(_0xbaa1x25[_0x6425[34]][_0x6425[41]]=== 500){logger[_0x6425[34]](_0x6425[33],_0xbaa1x1e,_0xbaa1x25[_0x6425[34]][_0x6425[42]]);return _0xbaa1x22(_0xbaa1x25[_0x6425[34]][_0x6425[42]])};logger[_0x6425[34]](_0x6425[33],_0xbaa1x1e,_0xbaa1x25[_0x6425[34]][_0x6425[42]]);return _0xbaa1x21(_0xbaa1x25[_0x6425[34]][_0x6425[42]])}else {logger[_0x6425[37]](_0x6425[33],_0xbaa1x1e,_0x6425[36]);_0xbaa1x21(_0xbaa1x25[_0x6425[43]][_0x6425[42]])}})[_0x6425[35]](function(_0xbaa1x24){logger[_0x6425[34]](_0x6425[33],_0xbaa1x1e,_0xbaa1x24);_0xbaa1x22(_0xbaa1x24)})})}function respondWithStatusCode(_0xbaa1x25,_0xbaa1x27){_0xbaa1x27= _0xbaa1x27|| 204;return function(_0xbaa1x28){if(_0xbaa1x28){return _0xbaa1x25[_0x6425[46]](_0xbaa1x27)};return _0xbaa1x25[_0x6425[48]](_0xbaa1x27)[_0x6425[47]]()}}function respondWithResult(_0xbaa1x25,_0xbaa1x27){_0xbaa1x27= _0xbaa1x27|| 200;return function(_0xbaa1x28){if(_0xbaa1x28){return _0xbaa1x25[_0x6425[48]](_0xbaa1x27)[_0x6425[49]](_0xbaa1x28)}}}function respondWithFilteredResult(_0xbaa1x25,_0xbaa1x2b){return function(_0xbaa1x28){if(_0xbaa1x28){var _0xbaa1x2c=_0xbaa1x28[_0x6425[50]],_0xbaa1x2d=_0xbaa1x2b[_0x6425[51]],_0xbaa1x2e=_0xbaa1x2b[_0x6425[51]]+ _0xbaa1x2b[_0x6425[52]],_0xbaa1x27;if(_0xbaa1x2e>= _0xbaa1x2c){_0xbaa1x2e= _0xbaa1x2c;_0xbaa1x27= 200}else {_0xbaa1x27= 206};_0xbaa1x25[_0x6425[48]](_0xbaa1x27);return _0xbaa1x25[_0x6425[56]](_0x6425[53],_0xbaa1x2d+ _0x6425[54]+ _0xbaa1x2e+ _0x6425[55]+ _0xbaa1x2c)[_0x6425[49]](_0xbaa1x28)};return null}}function patchUpdates(_0xbaa1x30){return function(_0xbaa1x28){try{jsonpatch[_0x6425[57]](_0xbaa1x28,_0xbaa1x30,true)}catch(err){return BPromise[_0x6425[58]](err)};return _0xbaa1x28[_0x6425[59]]()}}function saveUpdates(_0xbaa1x32,_0xbaa1x27){return function(_0xbaa1x28){if(_0xbaa1x28){return _0xbaa1x28[_0x6425[60]](_0xbaa1x32)[_0x6425[44]](function(_0xbaa1x33){return _0xbaa1x33})};return null}}function removeEntity(_0xbaa1x25,_0xbaa1x27){return function(_0xbaa1x28){if(_0xbaa1x28){return _0xbaa1x28[_0x6425[61]]()[_0x6425[44]](function(){_0xbaa1x25[_0x6425[48]](204)[_0x6425[47]]()})}}}function handleEntityNotFound(_0xbaa1x25,_0xbaa1x27){return function(_0xbaa1x28){if(!_0xbaa1x28){_0xbaa1x25[_0x6425[46]](404)};return _0xbaa1x28}}function handleError(_0xbaa1x25,_0xbaa1x27){_0xbaa1x27= _0xbaa1x27|| 500;return function(_0xbaa1x24){logger[_0x6425[34]](_0xbaa1x24[_0x6425[62]]);if(_0xbaa1x24[_0x6425[63]]){delete _0xbaa1x24[_0x6425[63]]};_0xbaa1x25[_0x6425[48]](_0xbaa1x27)[_0x6425[64]](_0xbaa1x24)}}exports[_0x6425[65]]= function(_0xbaa1x1f,_0xbaa1x25){var _0xbaa1x2b={},_0xbaa1x37={},_0xbaa1x38={count:0,rows:[]};_0xbaa1x37[_0x6425[66]]= _[_0x6425[72]](_[_0x6425[69]](db[_0x6425[68]][_0x6425[67]]),[_0x6425[70],_0x6425[71]]);var _0xbaa1x39={dateStart:_0xbaa1x1f[_0x6425[74]][_0x6425[73]],dateEnd:_0xbaa1x1f[_0x6425[74]][_0x6425[75]]};delete _0xbaa1x1f[_0x6425[74]][_0x6425[73]];delete _0xbaa1x1f[_0x6425[74]][_0x6425[75]];_0xbaa1x37[_0x6425[74]]= _[_0x6425[69]](_0xbaa1x1f[_0x6425[74]]);_0xbaa1x37[_0x6425[76]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],_0xbaa1x37[_0x6425[74]]);_0xbaa1x2b[_0x6425[78]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],qs[_0x6425[79]](_0xbaa1x1f[_0x6425[74]][_0x6425[79]]));_0xbaa1x2b[_0x6425[78]]= (_0xbaa1x2b[_0x6425[78]][_0x6425[80]])?_0xbaa1x2b[_0x6425[78]]:_0xbaa1x37[_0x6425[66]];if(!_0xbaa1x1f[_0x6425[74]][_0x6425[82]](_0x6425[81])){_0xbaa1x2b[_0x6425[52]]= qs[_0x6425[52]](_0xbaa1x1f[_0x6425[74]][_0x6425[52]]);_0xbaa1x2b[_0x6425[51]]= qs[_0x6425[51]](_0xbaa1x1f[_0x6425[74]][_0x6425[51]])};_0xbaa1x2b[_0x6425[83]]= qs[_0x6425[84]](_0xbaa1x1f[_0x6425[74]][_0x6425[84]]);_0xbaa1x2b[_0x6425[85]]= qs[_0x6425[76]](_[_0x6425[86]](_0xbaa1x1f[_0x6425[74]],_0xbaa1x37[_0x6425[76]]));if(_0xbaa1x39[_0x6425[73]]){if(_0xbaa1x39[_0x6425[75]]){_0xbaa1x39[_0x6425[75]]= moment(_0xbaa1x39[_0x6425[75]])[_0x6425[88]](1,_0x6425[87])}else {_0xbaa1x39[_0x6425[75]]= moment(_0xbaa1x39[_0x6425[73]])[_0x6425[88]](1,_0x6425[87])};_[_0x6425[89]](_0xbaa1x2b[_0x6425[85]],{createdAt:{$gte:_0xbaa1x39[_0x6425[73]],$lte:_0xbaa1x39[_0x6425[75]]}})};if(_0xbaa1x1f[_0x6425[74]][_0x6425[90]]){_0xbaa1x2b[_0x6425[85]]= _[_0x6425[89]](_0xbaa1x2b[_0x6425[85]],{$or:_[_0x6425[96]](_0xbaa1x2b[_0x6425[78]],function(_0xbaa1x3a){return db[_0x6425[93]][_0x6425[85]](db[_0x6425[93]][_0x6425[94]](_0x6425[91],db[_0x6425[93]][_0x6425[92]](_0xbaa1x3a)),{$like:db[_0x6425[93]][_0x6425[94]](_0x6425[91],_0x6425[95]+ _0xbaa1x1f[_0x6425[74]][_0x6425[90]]+ _0x6425[95])})})})};_0xbaa1x2b= _[_0x6425[89]]({},_0xbaa1x2b,_0xbaa1x1f[_0x6425[97]]);var _0xbaa1x3b={where:_0xbaa1x2b[_0x6425[85]]};return db[_0x6425[68]][_0x6425[50]](_0xbaa1x3b)[_0x6425[44]](function(_0xbaa1x2c){_0xbaa1x38[_0x6425[50]]= _0xbaa1x2c;if(_0xbaa1x1f[_0x6425[74]][_0x6425[99]]){_0xbaa1x2b[_0x6425[100]]= [{all:true}]};return db[_0x6425[68]][_0x6425[101]](_0xbaa1x2b)})[_0x6425[44]](function(_0xbaa1x3c){_0xbaa1x38[_0x6425[98]]= _0xbaa1x3c;return _0xbaa1x38})[_0x6425[44]](respondWithFilteredResult(_0xbaa1x25,_0xbaa1x2b))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[102]]= function(_0xbaa1x1f,_0xbaa1x25){var _0xbaa1x2b={raw:false,where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}},_0xbaa1x37={};_0xbaa1x37[_0x6425[66]]= _[_0x6425[72]](_[_0x6425[69]](db[_0x6425[68]][_0x6425[67]]),[_0x6425[70],_0x6425[71]]);_0xbaa1x37[_0x6425[74]]= _[_0x6425[69]](_0xbaa1x1f[_0x6425[74]]);_0xbaa1x37[_0x6425[76]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],_0xbaa1x37[_0x6425[74]]);_0xbaa1x2b[_0x6425[78]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],qs[_0x6425[79]](_0xbaa1x1f[_0x6425[74]][_0x6425[79]]));_0xbaa1x2b[_0x6425[78]]= (_0xbaa1x2b[_0x6425[78]][_0x6425[80]])?_0xbaa1x2b[_0x6425[78]]:_0xbaa1x37[_0x6425[66]];if(_0xbaa1x1f[_0x6425[74]][_0x6425[99]]){_0xbaa1x2b[_0x6425[100]]= [{all:true}]};_0xbaa1x2b= _[_0x6425[89]]({},_0xbaa1x2b,_0xbaa1x1f[_0x6425[97]]);return db[_0x6425[68]][_0x6425[105]](_0xbaa1x2b)[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](respondWithResult(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[106]]= function(_0xbaa1x1f,_0xbaa1x25){return db[_0x6425[68]][_0x6425[106]](_0xbaa1x1f[_0x6425[107]],{raw:false,individualHooks:true})[_0x6425[44]](respondWithResult(_0xbaa1x25,201))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[60]]= function(_0xbaa1x1f,_0xbaa1x25){if(_0xbaa1x1f[_0x6425[107]][_0x6425[103]]){delete _0xbaa1x1f[_0x6425[107]][_0x6425[103]]};return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](saveUpdates(_0xbaa1x1f[_0x6425[107]],null))[_0x6425[44]](respondWithResult(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[108]]= function(_0xbaa1x1f,_0xbaa1x25){return db[_0x6425[68]][_0x6425[108]]()[_0x6425[44]](respondWithResult(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[109]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){return _0xbaa1x28[_0x6425[109]](_0xbaa1x1f[_0x6425[107]][_0x6425[110]],_[_0x6425[111]](_0xbaa1x1f[_0x6425[107]],[_0x6425[110],_0x6425[103]])|| {})}})[_0x6425[44]](respondWithResult(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};var getLicense=function(_0xbaa1x1f){return  new BPromise(function(_0xbaa1x21,_0xbaa1x22){var _0xbaa1x3f=0;_0xbaa1x1f[_0x6425[107]][_0x6425[112]]=== _0x6425[113]&& _0xbaa1x21(_0x6425[114]);return db[_0x6425[68]][_0x6425[50]]({where:{$or:[{role:_0xbaa1x1f[_0x6425[107]][_0x6425[112]]=== _0x6425[115]?_0x6425[115]:[_0x6425[124],_0x6425[125]]}]}})[_0x6425[44]](function(_0xbaa1x2c){_0xbaa1x3f= _0xbaa1x2c;return require(_0x6425[123])[_0x6425[122]]()})[_0x6425[44]](function(_0xbaa1x40){var _0xbaa1x41=_0xbaa1x1f[_0x6425[107]][_0x6425[112]]=== _0x6425[115]?_0x6425[116]:_0x6425[117];if(!_[_0x6425[118]](_0xbaa1x40[_0xbaa1x41])&& _0xbaa1x3f>= _0xbaa1x40[_0xbaa1x41]){return _0xbaa1x22({message:_0x6425[119]})};return _0xbaa1x21(util[_0x6425[121]](_0x6425[120],_0xbaa1x41,_0xbaa1x3f))})[_0x6425[35]](function(_0xbaa1x24){return _0xbaa1x22(_0xbaa1x24)})})};exports[_0x6425[126]]= function(_0xbaa1x1f,_0xbaa1x25){return getLicense(_0xbaa1x1f)[_0x6425[44]](function(_0xbaa1x42){if(!_0xbaa1x1f[_0x6425[107]][_0x6425[129]]){var _0xbaa1x43;return db[_0x6425[154]][_0x6425[153]](1)[_0x6425[44]](function(_0xbaa1x48){_0xbaa1x43= _0xbaa1x48[_0x6425[151]];return db[_0x6425[68]][_0x6425[152]](_0x6425[129])})[_0x6425[44]](function(_0xbaa1x44){if(_[_0x6425[118]](_0xbaa1x44)){if(_0xbaa1x43){_0xbaa1x1f[_0x6425[107]][_0x6425[129]]= _0xbaa1x43}else {_0xbaa1x1f[_0x6425[107]][_0x6425[129]]= 1}}else {if(_[_0x6425[118]](_0xbaa1x43)|| _0xbaa1x43== _0xbaa1x44){_0xbaa1x1f[_0x6425[107]][_0x6425[129]]= _0xbaa1x44+ 1}else {if(_0xbaa1x43> _0xbaa1x44){_0xbaa1x1f[_0x6425[107]][_0x6425[129]]= _0xbaa1x43}else {return db[_0x6425[93]][_0x6425[74]](_0x6425[148],{type:db[_0x6425[93]][_0x6425[150]][_0x6425[149]]})[_0x6425[44]](function(_0xbaa1x45){if(_0xbaa1x45&& _0xbaa1x45[_0x6425[80]]){for(var _0xbaa1x46=0,_0xbaa1x47=_0xbaa1x45[_0x6425[80]];_0xbaa1x46< _0xbaa1x47&& _[_0x6425[118]](_0xbaa1x1f[_0x6425[107]][_0x6425[129]]);_0xbaa1x46++){if(_0xbaa1x43<= _0xbaa1x45[_0xbaa1x46][_0x6425[146]]){_0xbaa1x1f[_0x6425[107]][_0x6425[129]]= _0xbaa1x45[_0xbaa1x46][_0x6425[146]]}else {if(_0xbaa1x43> _0xbaa1x45[_0xbaa1x46][_0x6425[146]]&& _0xbaa1x43<= _0xbaa1x45[_0xbaa1x46][_0x6425[147]]){_0xbaa1x1f[_0x6425[107]][_0x6425[129]]= _0xbaa1x43}}}};if(_[_0x6425[118]](_0xbaa1x1f[_0x6425[107]][_0x6425[129]])){_0xbaa1x1f[_0x6425[107]][_0x6425[129]]= _0xbaa1x44+ 1}})}}}})}})[_0x6425[44]](function(){if(_0xbaa1x1f[_0x6425[107]][_0x6425[127]]){_0xbaa1x1f[_0x6425[107]][_0x6425[128]]= _0xbaa1x1f[_0x6425[107]][_0x6425[129]];_0xbaa1x1f[_0x6425[107]][_0x6425[130]]= {mailbox:_0xbaa1x1f[_0x6425[107]][_0x6425[129]],password:_0xbaa1x1f[_0x6425[107]][_0x6425[70]],fullname:_0xbaa1x1f[_0x6425[107]][_0x6425[131]],email:_0xbaa1x1f[_0x6425[107]][_0x6425[132]]}};if(_0xbaa1x1f[_0x6425[107]]&& _0xbaa1x1f[_0x6425[107]][_0x6425[112]]=== _0x6425[113]){_0xbaa1x1f[_0x6425[107]][_0x6425[133]]= [_0x6425[134],_0x6425[135],_0x6425[136],_0x6425[137],_0x6425[138],_0x6425[139],_0x6425[140],_0x6425[141],_0x6425[142],_0x6425[143],_0x6425[144],_0x6425[145]]};return db[_0x6425[68]][_0x6425[126]](_0xbaa1x1f[_0x6425[107]],{include:[{model:db[_0x6425[130]],as:_0x6425[130]}]})})[_0x6425[44]](respondWithResult(_0xbaa1x25,201))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[155]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){if(_0xbaa1x1f[_0x6425[107]][_0x6425[103]]){delete _0xbaa1x1f[_0x6425[107]][_0x6425[103]]};return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){if(_0xbaa1x28[_0x6425[103]]== _0xbaa1x1f[_0x6425[125]][_0x6425[103]]){if(!_0xbaa1x1f[_0x6425[107]][_0x6425[157]]||  !_0xbaa1x1f[_0x6425[107]][_0x6425[156]]){throw  new db[_0x6425[159]].ValidationError(_0x6425[158])};if(!_0xbaa1x28[_0x6425[160]](_0xbaa1x1f[_0x6425[107]][_0x6425[157]])){throw  new db[_0x6425[159]].ValidationError(_0x6425[161])};if(_0xbaa1x1f[_0x6425[107]][_0x6425[157]]== _0xbaa1x1f[_0x6425[107]][_0x6425[156]]){throw  new db[_0x6425[159]].ValidationError(_0x6425[162])};return _0xbaa1x28}else {if(_0xbaa1x1f[_0x6425[125]][_0x6425[112]]== _0x6425[124]){if(!_0xbaa1x1f[_0x6425[107]][_0x6425[156]]){throw  new db[_0x6425[159]].ValidationError(_0x6425[163])};return _0xbaa1x28}else {if(_0xbaa1x1f[_0x6425[125]][_0x6425[112]]== _0x6425[125]){if(!_0xbaa1x1f[_0x6425[107]][_0x6425[156]]){throw  new db[_0x6425[159]].ValidationError(_0x6425[163])};if(_0xbaa1x28[_0x6425[112]]!= _0x6425[113]){throw  new db[_0x6425[159]].ValidationError(_0x6425[164])};return _0xbaa1x28}else {throw  new db[_0x6425[159]].ValidationError(_0x6425[164])}}}};return null})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](saveUpdates({password:_0xbaa1x1f[_0x6425[107]][_0x6425[156]],passwordResetAt:_0xbaa1x1f[_0x6425[125]][_0x6425[103]]== _0xbaa1x1f[_0x6425[104]][_0x6425[103]]?moment():null},null))[_0x6425[44]](respondWithResult(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[165]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){var _0xbaa1x49;return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]},attributes:[_0x6425[103],_0x6425[63],_0x6425[112],_0x6425[182],_0x6425[170]]})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){_0xbaa1x49= _0xbaa1x28;if(!utils[_0x6425[177]](_0xbaa1x1f[_0x6425[107]][_0x6425[166]])){throw  new db[_0x6425[159]].ValidationError(_0x6425[178])};return _0xbaa1x28[_0x6425[88]+ _[_0x6425[180]](_0xbaa1x1f[_0x6425[107]][_0x6425[166]][_0x6425[179]]())+ _0x6425[181]](_0xbaa1x1f[_0x6425[107]][_0x6425[110]],{penalty:_0xbaa1x1f[_0x6425[107]][_0x6425[171]]|| 0})}})[_0x6425[44]](function(){if(_0xbaa1x1f[_0x6425[107]][_0x6425[166]]=== _0x6425[167]){return db[_0x6425[176]][_0x6425[101]]({where:{id:_0xbaa1x1f[_0x6425[107]][_0x6425[110]]|| []},raw:true,attributes:[_0x6425[103],_0x6425[63]]})}})[_0x6425[44]](function(_0xbaa1x4a){var _0xbaa1x4b=[];if(_0xbaa1x1f[_0x6425[107]][_0x6425[166]]=== _0x6425[167]){for(var _0xbaa1x46=0;_0xbaa1x46< _0xbaa1x4a[_0x6425[80]];_0xbaa1x46+= 1){_0xbaa1x4b[_0x6425[174]](db[_0x6425[173]][_0x6425[172]]({membername:_0xbaa1x49[_0x6425[63]],UserId:_0xbaa1x49[_0x6425[103]],queue_name:_0xbaa1x4a[_0xbaa1x46][_0x6425[63]],VoiceQueueId:_0xbaa1x4a[_0xbaa1x46][_0x6425[103]],interface:util[_0x6425[121]](_0x6425[168],_0x6425[169],_0xbaa1x49[_0x6425[63]]),paused:_0xbaa1x49[_0x6425[170]]|| false,penalty:_0xbaa1x1f[_0x6425[107]][_0x6425[171]]|| 0}))};return BPromise[_0x6425[175]](_0xbaa1x4b)};return _0xbaa1x49})[_0x6425[44]](respondWithStatusCode(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[183]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){var _0xbaa1x49;return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]},attributes:[_0x6425[103],_0x6425[63],_0x6425[112]]})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){_0xbaa1x49= _0xbaa1x28;if(!_0xbaa1x1f[_0x6425[74]][_0x6425[166]]||  !utils[_0x6425[177]](_0xbaa1x1f[_0x6425[74]][_0x6425[166]])){throw  new db[_0x6425[159]].ValidationError(_0x6425[178])};return _0xbaa1x28[_0x6425[184]+ _[_0x6425[180]](_0xbaa1x1f[_0x6425[74]][_0x6425[166]][_0x6425[179]]())+ _0x6425[181]](_0xbaa1x1f[_0x6425[74]][_0x6425[110]])}})[_0x6425[44]](function(_0xbaa1x4a){if(_0xbaa1x1f[_0x6425[74]][_0x6425[166]]=== _0x6425[167]){return db[_0x6425[173]][_0x6425[61]]({where:{UserId:_0xbaa1x1f[_0x6425[104]][_0x6425[103]],VoiceQueueId:_0xbaa1x1f[_0x6425[74]][_0x6425[110]]},individualHooks:true})[_0x6425[44]](function(){return _0xbaa1x49})};return _0xbaa1x49})[_0x6425[44]](respondWithStatusCode(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[185]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){_0xbaa1x1f[_0x6425[107]][_0x6425[186]]= _0xbaa1x1f[_0x6425[188]][_0x6425[187]];return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](saveUpdates(_0xbaa1x1f[_0x6425[107]],null))[_0x6425[44]](respondWithResult(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[189]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){var _0xbaa1x4c=path[_0x6425[192]](config[_0x6425[190]],_0x6425[191]);return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]},attributes:[_0x6425[103],_0x6425[186]],raw:true})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){if(_[_0x6425[118]](_0xbaa1x28[_0x6425[186]])){return _0xbaa1x25[_0x6425[193]](_0xbaa1x4c)}else {if(!fs[_0x6425[195]](path[_0x6425[192]](config[_0x6425[190]],_0x6425[194],_0xbaa1x28[_0x6425[186]]))){return _0xbaa1x25[_0x6425[193]](_0xbaa1x4c)};return _0xbaa1x25[_0x6425[193]](path[_0x6425[192]](config[_0x6425[190]],_0x6425[194],_0xbaa1x28[_0x6425[186]]))}}})[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[196]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){var _0xbaa1x49;var _0xbaa1x2b={where:{}},_0xbaa1x37={},_0xbaa1x4d={count:0,rows:[]};return db[_0x6425[68]][_0x6425[199]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){_0xbaa1x49= _0xbaa1x28;_0xbaa1x2b[_0x6425[85]][_0x6425[197]]= _0xbaa1x28[_0x6425[103]];return db[_0x6425[198]][_0x6425[108]]()}})[_0x6425[44]](function(_0xbaa1x4e){if(_0xbaa1x4e){_0xbaa1x37[_0x6425[66]]= _[_0x6425[69]](_0xbaa1x4e);_0xbaa1x37[_0x6425[74]]= _[_0x6425[69]](_0xbaa1x1f[_0x6425[74]]);_0xbaa1x37[_0x6425[76]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],_0xbaa1x37[_0x6425[74]]);_0xbaa1x2b[_0x6425[78]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],qs[_0x6425[79]](_0xbaa1x1f[_0x6425[74]][_0x6425[79]]));_0xbaa1x2b[_0x6425[78]]= (_0xbaa1x2b[_0x6425[78]][_0x6425[80]])?_0xbaa1x2b[_0x6425[78]]:_0xbaa1x37[_0x6425[66]];if(!_0xbaa1x1f[_0x6425[74]][_0x6425[82]](_0x6425[81])){_0xbaa1x2b[_0x6425[52]]= qs[_0x6425[52]](_0xbaa1x1f[_0x6425[74]][_0x6425[52]]);_0xbaa1x2b[_0x6425[51]]= qs[_0x6425[51]](_0xbaa1x1f[_0x6425[74]][_0x6425[51]])};_0xbaa1x2b[_0x6425[83]]= qs[_0x6425[84]](_0xbaa1x1f[_0x6425[74]][_0x6425[84]]);_0xbaa1x2b[_0x6425[85]]= qs[_0x6425[76]](_[_0x6425[86]](_0xbaa1x1f[_0x6425[74]],_0xbaa1x37[_0x6425[76]]));if(_0xbaa1x1f[_0x6425[74]][_0x6425[90]]){_0xbaa1x2b[_0x6425[85]]= _[_0x6425[89]](_0xbaa1x2b[_0x6425[85]],{$or:_[_0x6425[96]](_0xbaa1x2b[_0x6425[78]],function(_0xbaa1x3a){var _0xbaa1x38={};_0xbaa1x38[_0xbaa1x3a]= {$like:_0x6425[95]+ _0xbaa1x1f[_0x6425[74]][_0x6425[90]]+ _0x6425[95]};return _0xbaa1x38})})};_0xbaa1x2b= _[_0x6425[89]]({},_0xbaa1x2b,_0xbaa1x1f[_0x6425[97]]);return _0xbaa1x49[_0x6425[196]](_[_0x6425[86]](_0xbaa1x2b,[_0x6425[85]]))[_0x6425[44]](function(_0xbaa1x2c){_0xbaa1x4d[_0x6425[50]]= _0xbaa1x2c[_0x6425[80]]|| 0;if(_0xbaa1x1f[_0x6425[74]][_0x6425[99]]){_0xbaa1x2b[_0x6425[100]]= [{all:true}]};return _0xbaa1x49[_0x6425[196]](_0xbaa1x2b)})[_0x6425[44]](function(_0xbaa1x3c){_0xbaa1x4d[_0x6425[98]]= _0xbaa1x3c;return _0xbaa1x4d})}})[_0x6425[44]](respondWithFilteredResult(_0xbaa1x25,_0xbaa1x2b))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[200]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){var _0xbaa1x49;var _0xbaa1x4a;var _0xbaa1x2b={};var _0xbaa1x2c;return db[_0x6425[68]][_0x6425[199]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]},attributes:[_0x6425[103],_0x6425[63],_0x6425[112]]})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x50){if(!utils[_0x6425[177]](_0xbaa1x1f[_0x6425[74]][_0x6425[166]])){throw  new db[_0x6425[159]].ValidationError(_0x6425[178])};_0xbaa1x49= _0xbaa1x50;var _0xbaa1x37={};_0xbaa1x37[_0x6425[66]]= _[_0x6425[69]](db[_[_0x6425[180]](_0xbaa1x1f[_0x6425[74]][_0x6425[166]])+ _0x6425[201]][_0x6425[67]]);_0xbaa1x37[_0x6425[74]]= _[_0x6425[69]](_0xbaa1x1f[_0x6425[74]]);_0xbaa1x37[_0x6425[76]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],_0xbaa1x37[_0x6425[74]]);_0xbaa1x2b[_0x6425[78]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],qs[_0x6425[79]](_0xbaa1x1f[_0x6425[74]][_0x6425[79]]));_0xbaa1x2b[_0x6425[78]]= (_0xbaa1x2b[_0x6425[78]][_0x6425[80]])?_0xbaa1x2b[_0x6425[78]]:_0xbaa1x37[_0x6425[66]];_0xbaa1x2b[_0x6425[83]]= qs[_0x6425[84]](_0xbaa1x1f[_0x6425[74]][_0x6425[84]]);_0xbaa1x2b[_0x6425[85]]= qs[_0x6425[76]](_[_0x6425[86]](_0xbaa1x1f[_0x6425[74]],_0xbaa1x37[_0x6425[76]]));if(_0xbaa1x1f[_0x6425[74]][_0x6425[90]]){_0xbaa1x2b[_0x6425[85]]= _[_0x6425[89]](_0xbaa1x2b[_0x6425[85]],{$or:_[_0x6425[96]](_0xbaa1x2b[_0x6425[78]],function(_0xbaa1x3a){var _0xbaa1x38={};_0xbaa1x38[_0xbaa1x3a]= {$like:_0x6425[95]+ _0xbaa1x1f[_0x6425[74]][_0x6425[90]]+ _0x6425[95]};return _0xbaa1x38})})};_0xbaa1x2b= _[_0x6425[89]]({},_0xbaa1x2b,_0xbaa1x1f[_0x6425[97]]);switch(_0xbaa1x49[_0x6425[112]]){case _0x6425[124]:return db[_[_0x6425[180]](_0xbaa1x1f[_0x6425[74]][_0x6425[166]])+ _0x6425[201]][_0x6425[101]](_0xbaa1x2b);case _0x6425[125]:;case _0x6425[113]:return _0xbaa1x49[_0x6425[202]+ _[_0x6425[180]](_0xbaa1x1f[_0x6425[74]][_0x6425[166]])+ _0x6425[181]](_0xbaa1x2b);default:throw  new db[_0x6425[159]].ValidationError(_0x6425[203])}})[_0x6425[44]](function(_0xbaa1x4f){_0xbaa1x2c= _0xbaa1x4f[_0x6425[80]];if(!_0xbaa1x1f[_0x6425[74]][_0x6425[82]](_0x6425[81])){_0xbaa1x2b[_0x6425[52]]= qs[_0x6425[52]](_0xbaa1x1f[_0x6425[74]][_0x6425[52]]);_0xbaa1x2b[_0x6425[51]]= qs[_0x6425[51]](_0xbaa1x1f[_0x6425[74]][_0x6425[51]])};switch(_0xbaa1x49[_0x6425[112]]){case _0x6425[124]:return db[_[_0x6425[180]](_0xbaa1x1f[_0x6425[74]][_0x6425[166]])+ _0x6425[201]][_0x6425[101]](_0xbaa1x2b);case _0x6425[125]:;case _0x6425[113]:return _0xbaa1x49[_0x6425[202]+ _[_0x6425[180]](_0xbaa1x1f[_0x6425[74]][_0x6425[166]])+ _0x6425[181]](_0xbaa1x2b)}})[_0x6425[44]](function(_0xbaa1x3c){return {count:_0xbaa1x2c,rows:_0xbaa1x3c}})[_0x6425[44]](respondWithResult(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[204]]= function(_0xbaa1x1f,_0xbaa1x28,_0xbaa1x3d){var _0xbaa1x2b={};var _0xbaa1x37={};var _0xbaa1x51;var _0xbaa1x2c;return db[_0x6425[68]][_0x6425[199]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x28,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){_0xbaa1x51= _0xbaa1x28;_0xbaa1x37[_0x6425[66]]= _[_0x6425[69]](db[_0x6425[173]][_0x6425[67]]);_0xbaa1x37[_0x6425[74]]= _[_0x6425[69]](_0xbaa1x1f[_0x6425[74]]);_0xbaa1x37[_0x6425[76]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],_0xbaa1x37[_0x6425[74]]);_0xbaa1x2b[_0x6425[78]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],qs[_0x6425[79]](_0xbaa1x1f[_0x6425[74]][_0x6425[79]]));_0xbaa1x2b[_0x6425[78]]= (_0xbaa1x2b[_0x6425[78]][_0x6425[80]])?_0xbaa1x2b[_0x6425[78]]:_0xbaa1x37[_0x6425[66]];_0xbaa1x2b[_0x6425[83]]= qs[_0x6425[84]](_0xbaa1x1f[_0x6425[74]][_0x6425[84]]);_0xbaa1x2b[_0x6425[85]]= qs[_0x6425[76]](_[_0x6425[86]](_0xbaa1x1f[_0x6425[74]],_0xbaa1x37[_0x6425[76]]));if(_0xbaa1x1f[_0x6425[74]][_0x6425[90]]){_0xbaa1x2b[_0x6425[85]]= _[_0x6425[89]](_0xbaa1x2b[_0x6425[85]],{$or:_[_0x6425[96]](_0xbaa1x2b[_0x6425[78]],function(_0xbaa1x3a){var _0xbaa1x38={};_0xbaa1x38[_0xbaa1x3a]= {$like:_0x6425[95]+ _0xbaa1x1f[_0x6425[74]][_0x6425[90]]+ _0x6425[95]};return _0xbaa1x38})})};_0xbaa1x2b= _[_0x6425[89]]({},_0xbaa1x2b,_0xbaa1x1f[_0x6425[97]]);return _0xbaa1x51[_0x6425[204]](_0xbaa1x2b)}})[_0x6425[44]](function(_0xbaa1x4f){if(_0xbaa1x4f){_0xbaa1x2c= _0xbaa1x4f[_0x6425[80]];if(!_0xbaa1x1f[_0x6425[74]][_0x6425[82]](_0x6425[81])){_0xbaa1x2b[_0x6425[52]]= qs[_0x6425[52]](_0xbaa1x1f[_0x6425[74]][_0x6425[52]]);_0xbaa1x2b[_0x6425[51]]= qs[_0x6425[51]](_0xbaa1x1f[_0x6425[74]][_0x6425[51]])};return _0xbaa1x51[_0x6425[204]](_0xbaa1x2b)}})[_0x6425[44]](function(_0xbaa1x3c){if(_0xbaa1x3c){return _0xbaa1x3c?{count:_0xbaa1x2c,rows:_0xbaa1x3c}:null}})[_0x6425[44]](respondWithResult(_0xbaa1x28,null))[_0x6425[35]](handleError(_0xbaa1x28,null))};exports[_0x6425[205]]= function(_0xbaa1x1f,_0xbaa1x28,_0xbaa1x3d){var _0xbaa1x2b={};var _0xbaa1x37={};var _0xbaa1x51;var _0xbaa1x2c;return db[_0x6425[68]][_0x6425[199]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x28,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){_0xbaa1x51= _0xbaa1x28;_0xbaa1x37[_0x6425[66]]= _[_0x6425[69]](db[_0x6425[206]][_0x6425[67]]);_0xbaa1x37[_0x6425[74]]= _[_0x6425[69]](_0xbaa1x1f[_0x6425[74]]);_0xbaa1x37[_0x6425[76]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],_0xbaa1x37[_0x6425[74]]);_0xbaa1x2b[_0x6425[78]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],qs[_0x6425[79]](_0xbaa1x1f[_0x6425[74]][_0x6425[79]]));_0xbaa1x2b[_0x6425[78]]= (_0xbaa1x2b[_0x6425[78]][_0x6425[80]])?_0xbaa1x2b[_0x6425[78]]:_0xbaa1x37[_0x6425[66]];_0xbaa1x2b[_0x6425[83]]= qs[_0x6425[84]](_0xbaa1x1f[_0x6425[74]][_0x6425[84]]);_0xbaa1x2b[_0x6425[85]]= qs[_0x6425[76]](_[_0x6425[86]](_0xbaa1x1f[_0x6425[74]],_0xbaa1x37[_0x6425[76]]));if(_0xbaa1x1f[_0x6425[74]][_0x6425[90]]){_0xbaa1x2b[_0x6425[85]]= _[_0x6425[89]](_0xbaa1x2b[_0x6425[85]],{$or:_[_0x6425[96]](_0xbaa1x2b[_0x6425[78]],function(_0xbaa1x3a){var _0xbaa1x38={};_0xbaa1x38[_0xbaa1x3a]= {$like:_0x6425[95]+ _0xbaa1x1f[_0x6425[74]][_0x6425[90]]+ _0x6425[95]};return _0xbaa1x38})})};_0xbaa1x2b= _[_0x6425[89]]({},_0xbaa1x2b,_0xbaa1x1f[_0x6425[97]]);return _0xbaa1x51[_0x6425[205]](_0xbaa1x2b)}})[_0x6425[44]](function(_0xbaa1x4f){if(_0xbaa1x4f){_0xbaa1x2c= _0xbaa1x4f[_0x6425[80]];if(!_0xbaa1x1f[_0x6425[74]][_0x6425[82]](_0x6425[81])){_0xbaa1x2b[_0x6425[52]]= qs[_0x6425[52]](_0xbaa1x1f[_0x6425[74]][_0x6425[52]]);_0xbaa1x2b[_0x6425[51]]= qs[_0x6425[51]](_0xbaa1x1f[_0x6425[74]][_0x6425[51]])};return _0xbaa1x51[_0x6425[205]](_0xbaa1x2b)}})[_0x6425[44]](function(_0xbaa1x3c){if(_0xbaa1x3c){return _0xbaa1x3c?{count:_0xbaa1x2c,rows:_0xbaa1x3c}:null}})[_0x6425[44]](respondWithResult(_0xbaa1x28,null))[_0x6425[35]](handleError(_0xbaa1x28,null))};exports[_0x6425[207]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){var _0xbaa1x2b={raw:true,where:{}};var _0xbaa1x37={};var _0xbaa1x4d={count:0,rows:[]};return db[_0x6425[68]][_0x6425[199]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){_0xbaa1x37[_0x6425[66]]= _[_0x6425[69]](db[_0x6425[208]][_0x6425[67]]);_0xbaa1x37[_0x6425[74]]= _[_0x6425[69]](_0xbaa1x1f[_0x6425[74]]);_0xbaa1x37[_0x6425[76]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],_0xbaa1x37[_0x6425[74]]);_0xbaa1x2b[_0x6425[78]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],qs[_0x6425[79]](_0xbaa1x1f[_0x6425[74]][_0x6425[79]]));_0xbaa1x2b[_0x6425[78]]= (_0xbaa1x2b[_0x6425[78]][_0x6425[80]])?_0xbaa1x2b[_0x6425[78]]:_0xbaa1x37[_0x6425[66]];if(!_0xbaa1x1f[_0x6425[74]][_0x6425[82]](_0x6425[81])){_0xbaa1x2b[_0x6425[52]]= qs[_0x6425[52]](_0xbaa1x1f[_0x6425[74]][_0x6425[52]]);_0xbaa1x2b[_0x6425[51]]= qs[_0x6425[51]](_0xbaa1x1f[_0x6425[74]][_0x6425[51]])};_0xbaa1x2b[_0x6425[83]]= qs[_0x6425[84]](_0xbaa1x1f[_0x6425[74]][_0x6425[84]]);_0xbaa1x2b[_0x6425[85]]= qs[_0x6425[76]](_[_0x6425[86]](_0xbaa1x1f[_0x6425[74]],_0xbaa1x37[_0x6425[76]]));_0xbaa1x2b[_0x6425[85]][_0x6425[197]]= _0xbaa1x28[_0x6425[103]];if(_0xbaa1x1f[_0x6425[74]][_0x6425[90]]){_0xbaa1x2b[_0x6425[85]]= _[_0x6425[89]](_0xbaa1x2b[_0x6425[85]],{$or:_[_0x6425[96]](_0xbaa1x2b[_0x6425[78]],function(_0xbaa1x3a){var _0xbaa1x38={};_0xbaa1x38[_0xbaa1x3a]= {$like:_0x6425[95]+ _0xbaa1x1f[_0x6425[74]][_0x6425[90]]+ _0x6425[95]};return _0xbaa1x38})})};_0xbaa1x2b= _[_0x6425[89]]({},_0xbaa1x2b,_0xbaa1x1f[_0x6425[97]]);return db[_0x6425[208]][_0x6425[50]]({where:_0xbaa1x2b[_0x6425[85]]})[_0x6425[44]](function(_0xbaa1x2c){_0xbaa1x4d[_0x6425[50]]= _0xbaa1x2c;if(_0xbaa1x1f[_0x6425[74]][_0x6425[99]]){_0xbaa1x2b[_0x6425[100]]= [{all:true}]};return db[_0x6425[208]][_0x6425[101]](_0xbaa1x2b)})[_0x6425[44]](function(_0xbaa1x3c){_0xbaa1x4d[_0x6425[98]]= _0xbaa1x3c;return _0xbaa1x4d})}})[_0x6425[44]](respondWithFilteredResult(_0xbaa1x25,_0xbaa1x2b))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[209]]= function(_0xbaa1x1f,_0xbaa1x28,_0xbaa1x3d){var _0xbaa1x2b={};var _0xbaa1x37={};var _0xbaa1x51;var _0xbaa1x2c;return db[_0x6425[68]][_0x6425[199]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x28,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){_0xbaa1x51= _0xbaa1x28;_0xbaa1x37[_0x6425[66]]= _[_0x6425[69]](db[_0x6425[210]][_0x6425[67]]);_0xbaa1x37[_0x6425[74]]= _[_0x6425[69]](_0xbaa1x1f[_0x6425[74]]);_0xbaa1x37[_0x6425[76]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],_0xbaa1x37[_0x6425[74]]);_0xbaa1x2b[_0x6425[78]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],qs[_0x6425[79]](_0xbaa1x1f[_0x6425[74]][_0x6425[79]]));_0xbaa1x2b[_0x6425[78]]= (_0xbaa1x2b[_0x6425[78]][_0x6425[80]])?_0xbaa1x2b[_0x6425[78]]:_0xbaa1x37[_0x6425[66]];_0xbaa1x2b[_0x6425[83]]= qs[_0x6425[84]](_0xbaa1x1f[_0x6425[74]][_0x6425[84]]);_0xbaa1x2b[_0x6425[85]]= qs[_0x6425[76]](_[_0x6425[86]](_0xbaa1x1f[_0x6425[74]],_0xbaa1x37[_0x6425[76]]));if(_0xbaa1x1f[_0x6425[74]][_0x6425[90]]){_0xbaa1x2b[_0x6425[85]]= _[_0x6425[89]](_0xbaa1x2b[_0x6425[85]],{$or:_[_0x6425[96]](_0xbaa1x2b[_0x6425[78]],function(_0xbaa1x3a){var _0xbaa1x38={};_0xbaa1x38[_0xbaa1x3a]= {$like:_0x6425[95]+ _0xbaa1x1f[_0x6425[74]][_0x6425[90]]+ _0x6425[95]};return _0xbaa1x38})})};_0xbaa1x2b= _[_0x6425[89]]({},_0xbaa1x2b,_0xbaa1x1f[_0x6425[97]]);return _0xbaa1x51[_0x6425[209]](_0xbaa1x2b)}})[_0x6425[44]](function(_0xbaa1x4f){if(_0xbaa1x4f){_0xbaa1x2c= _0xbaa1x4f[_0x6425[80]];if(!_0xbaa1x1f[_0x6425[74]][_0x6425[82]](_0x6425[81])){_0xbaa1x2b[_0x6425[52]]= qs[_0x6425[52]](_0xbaa1x1f[_0x6425[74]][_0x6425[52]]);_0xbaa1x2b[_0x6425[51]]= qs[_0x6425[51]](_0xbaa1x1f[_0x6425[74]][_0x6425[51]])};return _0xbaa1x51[_0x6425[209]](_0xbaa1x2b)}})[_0x6425[44]](function(_0xbaa1x3c){if(_0xbaa1x3c){return _0xbaa1x3c?{count:_0xbaa1x2c,rows:_0xbaa1x3c}:null}})[_0x6425[44]](respondWithResult(_0xbaa1x28,null))[_0x6425[35]](handleError(_0xbaa1x28,null))};exports[_0x6425[211]]= function(_0xbaa1x1f,_0xbaa1x28,_0xbaa1x3d){var _0xbaa1x2b={};var _0xbaa1x37={};var _0xbaa1x51;var _0xbaa1x2c;return db[_0x6425[68]][_0x6425[199]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x28,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){_0xbaa1x51= _0xbaa1x28;_0xbaa1x37[_0x6425[66]]= _[_0x6425[69]](db[_0x6425[212]][_0x6425[67]]);_0xbaa1x37[_0x6425[74]]= _[_0x6425[69]](_0xbaa1x1f[_0x6425[74]]);_0xbaa1x37[_0x6425[76]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],_0xbaa1x37[_0x6425[74]]);_0xbaa1x2b[_0x6425[78]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],qs[_0x6425[79]](_0xbaa1x1f[_0x6425[74]][_0x6425[79]]));_0xbaa1x2b[_0x6425[78]]= (_0xbaa1x2b[_0x6425[78]][_0x6425[80]])?_0xbaa1x2b[_0x6425[78]]:_0xbaa1x37[_0x6425[66]];_0xbaa1x2b[_0x6425[83]]= qs[_0x6425[84]](_0xbaa1x1f[_0x6425[74]][_0x6425[84]]);_0xbaa1x2b[_0x6425[85]]= qs[_0x6425[76]](_[_0x6425[86]](_0xbaa1x1f[_0x6425[74]],_0xbaa1x37[_0x6425[76]]));if(_0xbaa1x1f[_0x6425[74]][_0x6425[90]]){_0xbaa1x2b[_0x6425[85]]= _[_0x6425[89]](_0xbaa1x2b[_0x6425[85]],{$or:_[_0x6425[96]](_0xbaa1x2b[_0x6425[78]],function(_0xbaa1x3a){var _0xbaa1x38={};_0xbaa1x38[_0xbaa1x3a]= {$like:_0x6425[95]+ _0xbaa1x1f[_0x6425[74]][_0x6425[90]]+ _0x6425[95]};return _0xbaa1x38})})};_0xbaa1x2b= _[_0x6425[89]]({},_0xbaa1x2b,_0xbaa1x1f[_0x6425[97]]);return _0xbaa1x51[_0x6425[211]](_0xbaa1x2b)}})[_0x6425[44]](function(_0xbaa1x4f){if(_0xbaa1x4f){_0xbaa1x2c= _0xbaa1x4f[_0x6425[80]];if(!_0xbaa1x1f[_0x6425[74]][_0x6425[82]](_0x6425[81])){_0xbaa1x2b[_0x6425[52]]= qs[_0x6425[52]](_0xbaa1x1f[_0x6425[74]][_0x6425[52]]);_0xbaa1x2b[_0x6425[51]]= qs[_0x6425[51]](_0xbaa1x1f[_0x6425[74]][_0x6425[51]])};return _0xbaa1x51[_0x6425[211]](_0xbaa1x2b)}})[_0x6425[44]](function(_0xbaa1x3c){if(_0xbaa1x3c){return _0xbaa1x3c?{count:_0xbaa1x2c,rows:_0xbaa1x3c}:null}})[_0x6425[44]](respondWithResult(_0xbaa1x28,null))[_0x6425[35]](handleError(_0xbaa1x28,null))};exports[_0x6425[213]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){var _0xbaa1x2b={raw:true,where:{}};var _0xbaa1x37={};var _0xbaa1x4d={count:0,rows:[]};return db[_0x6425[68]][_0x6425[199]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){_0xbaa1x37[_0x6425[66]]= _[_0x6425[69]](db[_0x6425[214]][_0x6425[67]]);_0xbaa1x37[_0x6425[74]]= _[_0x6425[69]](_0xbaa1x1f[_0x6425[74]]);_0xbaa1x37[_0x6425[76]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],_0xbaa1x37[_0x6425[74]]);_0xbaa1x2b[_0x6425[78]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],qs[_0x6425[79]](_0xbaa1x1f[_0x6425[74]][_0x6425[79]]));_0xbaa1x2b[_0x6425[78]]= (_0xbaa1x2b[_0x6425[78]][_0x6425[80]])?_0xbaa1x2b[_0x6425[78]]:_0xbaa1x37[_0x6425[66]];if(!_0xbaa1x1f[_0x6425[74]][_0x6425[82]](_0x6425[81])){_0xbaa1x2b[_0x6425[52]]= qs[_0x6425[52]](_0xbaa1x1f[_0x6425[74]][_0x6425[52]]);_0xbaa1x2b[_0x6425[51]]= qs[_0x6425[51]](_0xbaa1x1f[_0x6425[74]][_0x6425[51]])};_0xbaa1x2b[_0x6425[83]]= qs[_0x6425[84]](_0xbaa1x1f[_0x6425[74]][_0x6425[84]]);_0xbaa1x2b[_0x6425[85]]= qs[_0x6425[76]](_[_0x6425[86]](_0xbaa1x1f[_0x6425[74]],_0xbaa1x37[_0x6425[76]]));_0xbaa1x2b[_0x6425[85]][_0x6425[197]]= _0xbaa1x28[_0x6425[103]];if(_0xbaa1x1f[_0x6425[74]][_0x6425[90]]){_0xbaa1x2b[_0x6425[85]]= _[_0x6425[89]](_0xbaa1x2b[_0x6425[85]],{$or:_[_0x6425[96]](_0xbaa1x2b[_0x6425[78]],function(_0xbaa1x3a){var _0xbaa1x38={};_0xbaa1x38[_0xbaa1x3a]= {$like:_0x6425[95]+ _0xbaa1x1f[_0x6425[74]][_0x6425[90]]+ _0x6425[95]};return _0xbaa1x38})})};_0xbaa1x2b= _[_0x6425[89]]({},_0xbaa1x2b,_0xbaa1x1f[_0x6425[97]]);return db[_0x6425[214]][_0x6425[50]]({where:_0xbaa1x2b[_0x6425[85]]})[_0x6425[44]](function(_0xbaa1x2c){_0xbaa1x4d[_0x6425[50]]= _0xbaa1x2c;if(_0xbaa1x1f[_0x6425[74]][_0x6425[99]]){_0xbaa1x2b[_0x6425[100]]= [{all:true}]};return db[_0x6425[214]][_0x6425[101]](_0xbaa1x2b)})[_0x6425[44]](function(_0xbaa1x3c){_0xbaa1x4d[_0x6425[98]]= _0xbaa1x3c;return _0xbaa1x4d})}})[_0x6425[44]](respondWithFilteredResult(_0xbaa1x25,_0xbaa1x2b))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[215]]= function(_0xbaa1x1f,_0xbaa1x28,_0xbaa1x3d){var _0xbaa1x2b={};var _0xbaa1x37={};var _0xbaa1x51;var _0xbaa1x2c;return db[_0x6425[68]][_0x6425[199]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x28,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){_0xbaa1x51= _0xbaa1x28;_0xbaa1x37[_0x6425[66]]= _[_0x6425[69]](db[_0x6425[216]][_0x6425[67]]);_0xbaa1x37[_0x6425[74]]= _[_0x6425[69]](_0xbaa1x1f[_0x6425[74]]);_0xbaa1x37[_0x6425[76]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],_0xbaa1x37[_0x6425[74]]);_0xbaa1x2b[_0x6425[78]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],qs[_0x6425[79]](_0xbaa1x1f[_0x6425[74]][_0x6425[79]]));_0xbaa1x2b[_0x6425[78]]= (_0xbaa1x2b[_0x6425[78]][_0x6425[80]])?_0xbaa1x2b[_0x6425[78]]:_0xbaa1x37[_0x6425[66]];_0xbaa1x2b[_0x6425[83]]= qs[_0x6425[84]](_0xbaa1x1f[_0x6425[74]][_0x6425[84]]);_0xbaa1x2b[_0x6425[85]]= qs[_0x6425[76]](_[_0x6425[86]](_0xbaa1x1f[_0x6425[74]],_0xbaa1x37[_0x6425[76]]));if(_0xbaa1x1f[_0x6425[74]][_0x6425[90]]){_0xbaa1x2b[_0x6425[85]]= _[_0x6425[89]](_0xbaa1x2b[_0x6425[85]],{$or:_[_0x6425[96]](_0xbaa1x2b[_0x6425[78]],function(_0xbaa1x3a){var _0xbaa1x38={};_0xbaa1x38[_0xbaa1x3a]= {$like:_0x6425[95]+ _0xbaa1x1f[_0x6425[74]][_0x6425[90]]+ _0x6425[95]};return _0xbaa1x38})})};_0xbaa1x2b= _[_0x6425[89]]({},_0xbaa1x2b,_0xbaa1x1f[_0x6425[97]]);return _0xbaa1x51[_0x6425[215]](_0xbaa1x2b)}})[_0x6425[44]](function(_0xbaa1x4f){if(_0xbaa1x4f){_0xbaa1x2c= _0xbaa1x4f[_0x6425[80]];if(!_0xbaa1x1f[_0x6425[74]][_0x6425[82]](_0x6425[81])){_0xbaa1x2b[_0x6425[52]]= qs[_0x6425[52]](_0xbaa1x1f[_0x6425[74]][_0x6425[52]]);_0xbaa1x2b[_0x6425[51]]= qs[_0x6425[51]](_0xbaa1x1f[_0x6425[74]][_0x6425[51]])};return _0xbaa1x51[_0x6425[215]](_0xbaa1x2b)}})[_0x6425[44]](function(_0xbaa1x3c){if(_0xbaa1x3c){return _0xbaa1x3c?{count:_0xbaa1x2c,rows:_0xbaa1x3c}:null}})[_0x6425[44]](respondWithResult(_0xbaa1x28,null))[_0x6425[35]](handleError(_0xbaa1x28,null))};exports[_0x6425[217]]= function(_0xbaa1x1f,_0xbaa1x28,_0xbaa1x3d){var _0xbaa1x2b={};var _0xbaa1x37={};var _0xbaa1x51;var _0xbaa1x2c;return db[_0x6425[68]][_0x6425[199]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x28,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){_0xbaa1x51= _0xbaa1x28;_0xbaa1x37[_0x6425[66]]= _[_0x6425[69]](db[_0x6425[218]][_0x6425[67]]);_0xbaa1x37[_0x6425[74]]= _[_0x6425[69]](_0xbaa1x1f[_0x6425[74]]);_0xbaa1x37[_0x6425[76]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],_0xbaa1x37[_0x6425[74]]);_0xbaa1x2b[_0x6425[78]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],qs[_0x6425[79]](_0xbaa1x1f[_0x6425[74]][_0x6425[79]]));_0xbaa1x2b[_0x6425[78]]= (_0xbaa1x2b[_0x6425[78]][_0x6425[80]])?_0xbaa1x2b[_0x6425[78]]:_0xbaa1x37[_0x6425[66]];_0xbaa1x2b[_0x6425[83]]= qs[_0x6425[84]](_0xbaa1x1f[_0x6425[74]][_0x6425[84]]);_0xbaa1x2b[_0x6425[85]]= qs[_0x6425[76]](_[_0x6425[86]](_0xbaa1x1f[_0x6425[74]],_0xbaa1x37[_0x6425[76]]));if(_0xbaa1x1f[_0x6425[74]][_0x6425[90]]){_0xbaa1x2b[_0x6425[85]]= _[_0x6425[89]](_0xbaa1x2b[_0x6425[85]],{$or:_[_0x6425[96]](_0xbaa1x2b[_0x6425[78]],function(_0xbaa1x3a){var _0xbaa1x38={};_0xbaa1x38[_0xbaa1x3a]= {$like:_0x6425[95]+ _0xbaa1x1f[_0x6425[74]][_0x6425[90]]+ _0x6425[95]};return _0xbaa1x38})})};_0xbaa1x2b= _[_0x6425[89]]({},_0xbaa1x2b,_0xbaa1x1f[_0x6425[97]]);return _0xbaa1x51[_0x6425[217]](_0xbaa1x2b)}})[_0x6425[44]](function(_0xbaa1x4f){if(_0xbaa1x4f){_0xbaa1x2c= _0xbaa1x4f[_0x6425[80]];if(!_0xbaa1x1f[_0x6425[74]][_0x6425[82]](_0x6425[81])){_0xbaa1x2b[_0x6425[52]]= qs[_0x6425[52]](_0xbaa1x1f[_0x6425[74]][_0x6425[52]]);_0xbaa1x2b[_0x6425[51]]= qs[_0x6425[51]](_0xbaa1x1f[_0x6425[74]][_0x6425[51]])};return _0xbaa1x51[_0x6425[217]](_0xbaa1x2b)}})[_0x6425[44]](function(_0xbaa1x3c){if(_0xbaa1x3c){return _0xbaa1x3c?{count:_0xbaa1x2c,rows:_0xbaa1x3c}:null}})[_0x6425[44]](respondWithResult(_0xbaa1x28,null))[_0x6425[35]](handleError(_0xbaa1x28,null))};exports[_0x6425[219]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){var _0xbaa1x49;var _0xbaa1x4a;return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]],role:_0x6425[113]},attributes:[_0x6425[103],_0x6425[63],_0x6425[112],_0x6425[129],_0x6425[182]]})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){_0xbaa1x49= _0xbaa1x28;return db[_0x6425[173]][_0x6425[61]]({where:{membername:_0xbaa1x49[_0x6425[63]]},individualHooks:true})}})[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x49){return _0xbaa1x49[_0x6425[230]]({raw:true})}})[_0x6425[44]](function(_0xbaa1x4f){var _0xbaa1x4b=[];if(_0xbaa1x4f){_0xbaa1x4a= _0xbaa1x4f;if(_0xbaa1x4a[_0x6425[80]]){for(var _0xbaa1x46=0;_0xbaa1x46< _0xbaa1x4a[_0x6425[80]];_0xbaa1x46++){_0xbaa1x4b[_0x6425[174]]({membername:_0xbaa1x49[_0x6425[63]],UserId:_0xbaa1x49[_0x6425[103]],queue_name:_0xbaa1x4a[_0xbaa1x46][_0x6425[63]],VoiceQueueId:_0xbaa1x4a[_0xbaa1x46][_0x6425[103]],interface:util[_0x6425[121]](_0x6425[168],_0x6425[169],_0xbaa1x49[_0x6425[63]]),paused:_0xbaa1x49[_0x6425[182]]|| false,penalty:_0xbaa1x4a[_0xbaa1x46][_0x6425[228]]|| 0})};return BPromise[_0x6425[229]](_0xbaa1x4b,function(_0xbaa1x38){return db[_0x6425[173]][_0x6425[172]](_0xbaa1x38)})}}})[_0x6425[44]](function(){return db[_0x6425[227]][_0x6425[101]]({where:{membername:_0xbaa1x49[_0x6425[63]],interface:util[_0x6425[121]](_0x6425[168],_0x6425[169],_0xbaa1x49[_0x6425[63]]),exitAt:null}})})[_0x6425[44]](function(_0xbaa1x4b){var _0xbaa1x57=[];_0xbaa1x4b[_0x6425[225]](function(_0xbaa1x58){_0xbaa1x57[_0x6425[174]](_0xbaa1x58[_0x6425[60]]({exitAt:moment()[_0x6425[121]](_0x6425[220])}))});return BPromise[_0x6425[175]](_0xbaa1x57)})[_0x6425[44]](function(){var _0xbaa1x52=[];var _0xbaa1x53=[];var _0xbaa1x54=utils[_0x6425[222]]();var _0xbaa1x55={membername:_0xbaa1x49[_0x6425[63]],interface:util[_0x6425[121]](_0x6425[168],_0x6425[169],_0xbaa1x49[_0x6425[63]]),enterAt:moment()[_0x6425[121]](_0x6425[220]),role:_0xbaa1x49[_0x6425[112]],internal:_0xbaa1x49[_0x6425[129]]};_0xbaa1x54[_0x6425[225]](function(_0xbaa1x56){_0xbaa1x52[_0x6425[174]](_[_0x6425[89]]({channel:_0xbaa1x56,type:_0x6425[223]},_0xbaa1x55));if(_0xbaa1x49[_0x6425[182]]){_0xbaa1x53[_0x6425[174]](_[_0x6425[89]]({channel:_0xbaa1x56,type:_0x6425[224],data1:_0x6425[221]},_0xbaa1x55))}});return db[_0x6425[227]][_0x6425[106]](_0xbaa1x52[_0x6425[226]](_0xbaa1x53),{individualHooks:true})})[_0x6425[44]](function(){return _0xbaa1x49[_0x6425[60]]({online:true,lastLoginAt:moment()[_0x6425[121]](_0x6425[220]),voicePause:_0xbaa1x49[_0x6425[182]]|| false,mailPause:_0xbaa1x49[_0x6425[182]]|| false,chatPause:_0xbaa1x49[_0x6425[182]]|| false,faxPause:_0xbaa1x49[_0x6425[182]]|| false,smsPause:_0xbaa1x49[_0x6425[182]]|| false,openchannelPause:_0xbaa1x49[_0x6425[182]]|| false,pauseType:_0xbaa1x49[_0x6425[182]]?_0x6425[221]:null,lastPauseAt:moment()[_0x6425[121]](_0x6425[220])})})[_0x6425[44]](respondWithResult(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[231]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){var _0xbaa1x49;return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]],role:_0x6425[113]},attributes:[_0x6425[103],_0x6425[63],_0x6425[112]]})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){_0xbaa1x49= _0xbaa1x28;return db[_0x6425[173]][_0x6425[61]]({where:{membername:_0xbaa1x49[_0x6425[63]]},individualHooks:true})}})[_0x6425[44]](function(){return db[_0x6425[227]][_0x6425[101]]({where:{membername:_0xbaa1x49[_0x6425[63]],interface:util[_0x6425[121]](_0x6425[168],_0x6425[169],_0xbaa1x49[_0x6425[63]]),exitAt:null}})})[_0x6425[44]](function(_0xbaa1x4b){var _0xbaa1x57=[];_0xbaa1x4b[_0x6425[225]](function(_0xbaa1x58){_0xbaa1x57[_0x6425[174]](_0xbaa1x58[_0x6425[60]]({exitAt:moment()[_0x6425[121]](_0x6425[220])}))});return BPromise[_0x6425[175]](_0xbaa1x57)})[_0x6425[44]](function(){return _0xbaa1x49[_0x6425[60]]({online:false,lastLoginAt:null,voicePause:false,mailPause:false,chatPause:false,faxPause:false,smsPause:false,openchannelPause:false})})[_0x6425[44]](respondWithResult(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[232]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){var _0xbaa1x49;return db[_0x6425[173]][_0x6425[60]]({paused:1},{where:{UserId:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]},individualHooks:true})[_0x6425[44]](function(){return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]],role:_0x6425[113]},attributes:[_0x6425[103],_0x6425[63],_0x6425[112],_0x6425[129]]})})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){_0xbaa1x49= _0xbaa1x28;return respondWithRpcPromise(_0x6425[236],_0x6425[232],{id:_0xbaa1x49[_0x6425[103]],name:_0xbaa1x49[_0x6425[63]],pause:true})}})[_0x6425[44]](function(){if(_0xbaa1x49){return db[_0x6425[227]][_0x6425[101]]({where:{membername:_0xbaa1x49[_0x6425[63]],interface:util[_0x6425[121]](_0x6425[168],_0x6425[169],_0xbaa1x49[_0x6425[63]]),type:_0x6425[224],exitAt:null}})}})[_0x6425[44]](function(_0xbaa1x4b){if(_0xbaa1x4b[_0x6425[80]]){var _0xbaa1x59=moment()[_0x6425[121]](_0x6425[220]);for(var _0xbaa1x46=0,_0xbaa1x47=_0xbaa1x4b[_0x6425[80]];_0xbaa1x46< _0xbaa1x47;_0xbaa1x46++){_0xbaa1x4b[_0xbaa1x46][_0x6425[235]]({exitAt:_0xbaa1x59})}}})[_0x6425[44]](function(){var _0xbaa1x4b=[];var _0xbaa1x54=utils[_0x6425[222]]();_0xbaa1x54[_0x6425[225]](function(_0xbaa1x56){_0xbaa1x4b[_0x6425[174]]({channel:_0xbaa1x56,membername:_0xbaa1x49[_0x6425[63]],interface:util[_0x6425[121]](_0x6425[168],_0x6425[169],_0xbaa1x49[_0x6425[63]]),type:_0x6425[224],enterAt:moment()[_0x6425[121]](_0x6425[220]),data1:_0xbaa1x1f[_0x6425[107]][_0x6425[233]]|| _0x6425[234],role:_0xbaa1x49[_0x6425[112]],internal:_0xbaa1x49[_0x6425[129]]})});return db[_0x6425[227]][_0x6425[106]](_0xbaa1x4b,{individualHooks:true})})[_0x6425[44]](function(){return _0xbaa1x49[_0x6425[60]]({voicePause:true,mailPause:true,chatPause:true,faxPause:true,smsPause:true,openchannelPause:true,pauseType:_0xbaa1x1f[_0x6425[107]][_0x6425[233]]|| _0x6425[234],lastPauseAt:moment()[_0x6425[121]](_0x6425[220])})})[_0x6425[44]](respondWithResult(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[237]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){var _0xbaa1x49;return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]},attributes:[_0x6425[103],_0x6425[63],_0x6425[112]]})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){_0xbaa1x49= _0xbaa1x28;if(_0xbaa1x1f[_0x6425[107]][_0x6425[166]]&&  !utils[_0x6425[177]](_0xbaa1x1f[_0x6425[107]][_0x6425[166]])){throw  new db[_0x6425[159]].ValidationError(_0x6425[178])};switch(_0xbaa1x1f[_0x6425[107]][_0x6425[166]]){case _0x6425[167]:return respondWithRpcPromise(_0x6425[236],_0x6425[237],{id:_0xbaa1x49[_0x6425[103]],name:_0xbaa1x49[_0x6425[63]],pause:false})[_0x6425[44]](function(){return db[_0x6425[173]][_0x6425[60]]({paused:0},{where:{UserId:_0xbaa1x49[_0x6425[103]]},individualHooks:true})})[_0x6425[44]](function(){return db[_0x6425[227]][_0x6425[105]]({where:{channel:_0xbaa1x1f[_0x6425[107]][_0x6425[166]],membername:_0xbaa1x49[_0x6425[63]],interface:util[_0x6425[121]](_0x6425[168],_0x6425[169],_0xbaa1x49[_0x6425[63]]),type:_0x6425[224],exitAt:null}})})[_0x6425[44]](function(_0xbaa1x58){if(_0xbaa1x58){return _0xbaa1x58[_0x6425[60]]({exitAt:moment()[_0x6425[121]](_0x6425[220]),data2:_0x6425[238]},{individualHooks:true})};return null})[_0x6425[44]](function(){return _0xbaa1x49[_0x6425[60]]({voicePause:false})});case _0x6425[239]:;case _0x6425[240]:;case _0x6425[241]:;case _0x6425[242]:;case _0x6425[245]:return db[_0x6425[227]][_0x6425[105]]({where:{channel:_0xbaa1x1f[_0x6425[107]][_0x6425[166]],membername:_0xbaa1x49[_0x6425[63]],interface:util[_0x6425[121]](_0x6425[168],_0x6425[169],_0xbaa1x49[_0x6425[63]]),type:_0x6425[224],exitAt:null}})[_0x6425[44]](function(_0xbaa1x58){return _0xbaa1x58[_0x6425[60]]({exitAt:moment()[_0x6425[121]](_0x6425[220]),data2:_0x6425[238]},{individualHooks:true})})[_0x6425[44]](function(){var _0xbaa1x5a={};_[_0x6425[56]](_0xbaa1x5a,util[_0x6425[121]](_0x6425[243],_0xbaa1x1f[_0x6425[107]][_0x6425[166]],_0x6425[244]),false);return _0xbaa1x49[_0x6425[60]](_0xbaa1x5a)});default:return respondWithRpcPromise(_0x6425[236],_0x6425[237],{id:_0xbaa1x49[_0x6425[103]],name:_0xbaa1x49[_0x6425[63]],pause:false})[_0x6425[44]](function(){return db[_0x6425[173]][_0x6425[60]]({paused:0},{where:{UserId:_0xbaa1x49[_0x6425[103]]}})})[_0x6425[44]](function(){return db[_0x6425[227]][_0x6425[101]]({where:{membername:_0xbaa1x49[_0x6425[63]],interface:util[_0x6425[121]](_0x6425[168],_0x6425[169],_0xbaa1x49[_0x6425[63]]),type:_0x6425[224],exitAt:null}})})[_0x6425[44]](function(_0xbaa1x4b){var _0xbaa1x57=[];_0xbaa1x4b[_0x6425[225]](function(_0xbaa1x58){_0xbaa1x57[_0x6425[174]](_0xbaa1x58[_0x6425[60]]({exitAt:moment()[_0x6425[121]](_0x6425[220]),data2:_0x6425[238]}))});return BPromise[_0x6425[175]](_0xbaa1x57)})[_0x6425[44]](function(){return _0xbaa1x49[_0x6425[60]]({voicePause:false,mailPause:false,chatPause:false,faxPause:false,smsPause:false,openchannelPause:false})})}}})[_0x6425[44]](respondWithResult(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[246]]= function(_0xbaa1x1f,_0xbaa1x28,_0xbaa1x3d){var _0xbaa1x2b={};var _0xbaa1x37={};var _0xbaa1x51;var _0xbaa1x2c;return db[_0x6425[68]][_0x6425[199]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x28,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){_0xbaa1x51= _0xbaa1x28;_0xbaa1x37[_0x6425[66]]= _[_0x6425[69]](db[_0x6425[247]][_0x6425[67]]);_0xbaa1x37[_0x6425[74]]= _[_0x6425[69]](_0xbaa1x1f[_0x6425[74]]);_0xbaa1x37[_0x6425[76]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],_0xbaa1x37[_0x6425[74]]);_0xbaa1x2b[_0x6425[78]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],qs[_0x6425[79]](_0xbaa1x1f[_0x6425[74]][_0x6425[79]]));_0xbaa1x2b[_0x6425[78]]= (_0xbaa1x2b[_0x6425[78]][_0x6425[80]])?_0xbaa1x2b[_0x6425[78]]:_0xbaa1x37[_0x6425[66]];_0xbaa1x2b[_0x6425[83]]= qs[_0x6425[84]](_0xbaa1x1f[_0x6425[74]][_0x6425[84]]);_0xbaa1x2b[_0x6425[85]]= qs[_0x6425[76]](_[_0x6425[86]](_0xbaa1x1f[_0x6425[74]],_0xbaa1x37[_0x6425[76]]));if(_0xbaa1x1f[_0x6425[74]][_0x6425[90]]){_0xbaa1x2b[_0x6425[85]]= _[_0x6425[89]](_0xbaa1x2b[_0x6425[85]],{$or:_[_0x6425[96]](_0xbaa1x2b[_0x6425[78]],function(_0xbaa1x3a){var _0xbaa1x38={};_0xbaa1x38[_0xbaa1x3a]= {$like:_0x6425[95]+ _0xbaa1x1f[_0x6425[74]][_0x6425[90]]+ _0x6425[95]};return _0xbaa1x38})})};_0xbaa1x2b= _[_0x6425[89]]({},_0xbaa1x2b,_0xbaa1x1f[_0x6425[97]]);return _0xbaa1x51[_0x6425[246]](_0xbaa1x2b)}})[_0x6425[44]](function(_0xbaa1x4f){if(_0xbaa1x4f){_0xbaa1x2c= _0xbaa1x4f[_0x6425[80]];if(!_0xbaa1x1f[_0x6425[74]][_0x6425[82]](_0x6425[81])){_0xbaa1x2b[_0x6425[52]]= qs[_0x6425[52]](_0xbaa1x1f[_0x6425[74]][_0x6425[52]]);_0xbaa1x2b[_0x6425[51]]= qs[_0x6425[51]](_0xbaa1x1f[_0x6425[74]][_0x6425[51]])};return _0xbaa1x51[_0x6425[246]](_0xbaa1x2b)}})[_0x6425[44]](function(_0xbaa1x3c){if(_0xbaa1x3c){return _0xbaa1x3c?{count:_0xbaa1x2c,rows:_0xbaa1x3c}:null}})[_0x6425[44]](respondWithResult(_0xbaa1x28,null))[_0x6425[35]](handleError(_0xbaa1x28,null))};exports[_0x6425[248]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){return _0xbaa1x28[_0x6425[248]](_0xbaa1x1f[_0x6425[107]][_0x6425[110]],_[_0x6425[111]](_0xbaa1x1f[_0x6425[107]],[_0x6425[110],_0x6425[103]])|| {})}})[_0x6425[44]](respondWithResult(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[249]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){var _0xbaa1x4f;return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){return _0xbaa1x28[_0x6425[249]](_0xbaa1x1f[_0x6425[74]][_0x6425[110]])}})[_0x6425[44]](respondWithStatusCode(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[250]]= function(_0xbaa1x1f,_0xbaa1x28,_0xbaa1x3d){var _0xbaa1x2b={};var _0xbaa1x37={};var _0xbaa1x51;var _0xbaa1x2c;return db[_0x6425[68]][_0x6425[199]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x28,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){_0xbaa1x51= _0xbaa1x28;_0xbaa1x37[_0x6425[66]]= _[_0x6425[69]](db[_0x6425[251]][_0x6425[67]]);_0xbaa1x37[_0x6425[74]]= _[_0x6425[69]](_0xbaa1x1f[_0x6425[74]]);_0xbaa1x37[_0x6425[76]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],_0xbaa1x37[_0x6425[74]]);_0xbaa1x2b[_0x6425[78]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],qs[_0x6425[79]](_0xbaa1x1f[_0x6425[74]][_0x6425[79]]));_0xbaa1x2b[_0x6425[78]]= (_0xbaa1x2b[_0x6425[78]][_0x6425[80]])?_0xbaa1x2b[_0x6425[78]]:_0xbaa1x37[_0x6425[66]];_0xbaa1x2b[_0x6425[83]]= qs[_0x6425[84]](_0xbaa1x1f[_0x6425[74]][_0x6425[84]]);_0xbaa1x2b[_0x6425[85]]= qs[_0x6425[76]](_[_0x6425[86]](_0xbaa1x1f[_0x6425[74]],_0xbaa1x37[_0x6425[76]]));if(_0xbaa1x1f[_0x6425[74]][_0x6425[90]]){_0xbaa1x2b[_0x6425[85]]= _[_0x6425[89]](_0xbaa1x2b[_0x6425[85]],{$or:_[_0x6425[96]](_0xbaa1x2b[_0x6425[78]],function(_0xbaa1x3a){var _0xbaa1x38={};_0xbaa1x38[_0xbaa1x3a]= {$like:_0x6425[95]+ _0xbaa1x1f[_0x6425[74]][_0x6425[90]]+ _0x6425[95]};return _0xbaa1x38})})};_0xbaa1x2b= _[_0x6425[89]]({},_0xbaa1x2b,_0xbaa1x1f[_0x6425[97]]);return _0xbaa1x51[_0x6425[250]](_0xbaa1x2b)}})[_0x6425[44]](function(_0xbaa1x4f){if(_0xbaa1x4f){_0xbaa1x2c= _0xbaa1x4f[_0x6425[80]];if(!_0xbaa1x1f[_0x6425[74]][_0x6425[82]](_0x6425[81])){_0xbaa1x2b[_0x6425[52]]= qs[_0x6425[52]](_0xbaa1x1f[_0x6425[74]][_0x6425[52]]);_0xbaa1x2b[_0x6425[51]]= qs[_0x6425[51]](_0xbaa1x1f[_0x6425[74]][_0x6425[51]])};return _0xbaa1x51[_0x6425[250]](_0xbaa1x2b)}})[_0x6425[44]](function(_0xbaa1x3c){if(_0xbaa1x3c){return _0xbaa1x3c?{count:_0xbaa1x2c,rows:_0xbaa1x3c}:null}})[_0x6425[44]](respondWithResult(_0xbaa1x28,null))[_0x6425[35]](handleError(_0xbaa1x28,null))};exports[_0x6425[252]]= function(_0xbaa1x1f,_0xbaa1x28,_0xbaa1x3d){var _0xbaa1x2b={};var _0xbaa1x37={};var _0xbaa1x51;var _0xbaa1x2c;return db[_0x6425[68]][_0x6425[199]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x28,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){_0xbaa1x51= _0xbaa1x28;_0xbaa1x37[_0x6425[66]]= _[_0x6425[69]](db[_0x6425[68]][_0x6425[67]]);_0xbaa1x37[_0x6425[74]]= _[_0x6425[69]](_0xbaa1x1f[_0x6425[74]]);_0xbaa1x37[_0x6425[76]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],_0xbaa1x37[_0x6425[74]]);_0xbaa1x2b[_0x6425[78]]= _[_0x6425[77]](_0xbaa1x37[_0x6425[66]],qs[_0x6425[79]](_0xbaa1x1f[_0x6425[74]][_0x6425[79]]));_0xbaa1x2b[_0x6425[78]]= (_0xbaa1x2b[_0x6425[78]][_0x6425[80]])?_0xbaa1x2b[_0x6425[78]]:_0xbaa1x37[_0x6425[66]];_0xbaa1x2b[_0x6425[83]]= qs[_0x6425[84]](_0xbaa1x1f[_0x6425[74]][_0x6425[84]]);_0xbaa1x2b[_0x6425[85]]= qs[_0x6425[76]](_[_0x6425[86]](_0xbaa1x1f[_0x6425[74]],_0xbaa1x37[_0x6425[76]]));if(_0xbaa1x1f[_0x6425[74]][_0x6425[90]]){_0xbaa1x2b[_0x6425[85]]= _[_0x6425[89]](_0xbaa1x2b[_0x6425[85]],{$or:_[_0x6425[96]](_0xbaa1x2b[_0x6425[78]],function(_0xbaa1x3a){var _0xbaa1x38={};_0xbaa1x38[_0xbaa1x3a]= {$like:_0x6425[95]+ _0xbaa1x1f[_0x6425[74]][_0x6425[90]]+ _0x6425[95]};return _0xbaa1x38})})};_0xbaa1x2b[_0x6425[66]]= db[_0x6425[68]];_0xbaa1x2b[_0x6425[255]]= _0x6425[253];_0xbaa1x2b= _[_0x6425[89]]({},_0xbaa1x2b,_0xbaa1x1f[_0x6425[97]]);return _0xbaa1x51[_0x6425[230]]({include:[_0xbaa1x2b]})}})[_0x6425[44]](function(_0xbaa1x4f){if(_0xbaa1x4f){var _0xbaa1x5b={},_0xbaa1x3c=[],_0xbaa1x2c=0;for(var _0xbaa1x46=0;_0xbaa1x46< _0xbaa1x4f[_0x6425[80]];_0xbaa1x46+= 1){for(var _0xbaa1x5c=0,_0xbaa1x5d;_0xbaa1x5c< _0xbaa1x4f[_0xbaa1x46][_0x6425[253]][_0x6425[80]];_0xbaa1x5c+= 1){_0xbaa1x5d= _0xbaa1x4f[_0xbaa1x46][_0x6425[253]][_0xbaa1x5c][_0x6425[202]]({plain:true});_0xbaa1x5b[_0xbaa1x5d[_0x6425[103]]]= _0xbaa1x5d}};_0xbaa1x5b= _[_0x6425[254]](_0xbaa1x5b);for(var _0xbaa1x5e=qs[_0x6425[51]](_0xbaa1x1f[_0x6425[74]][_0x6425[51]]);_0xbaa1x5e< _0xbaa1x5b[_0x6425[80]]&& _0xbaa1x3c[_0x6425[80]]< qs[_0x6425[52]](_0xbaa1x1f[_0x6425[74]][_0x6425[52]]);_0xbaa1x5e+= 1){if(_0xbaa1x5b[_0xbaa1x5e]){_0xbaa1x3c[_0x6425[174]](_0xbaa1x5b[_0xbaa1x5e])}};return {count:_0xbaa1x5b[_0x6425[80]],rows:_0xbaa1x3c}}})[_0x6425[44]](respondWithResult(_0xbaa1x28,null))[_0x6425[35]](handleError(_0xbaa1x28,null))};exports[_0x6425[61]]= function(_0xbaa1x1f,_0xbaa1x25){if(_0xbaa1x1f[_0x6425[125]][_0x6425[103]]== _0xbaa1x1f[_0x6425[104]][_0x6425[103]]){return _0xbaa1x25[_0x6425[48]](500)[_0x6425[64]]({message:_0x6425[256]})};return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](removeEntity(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[257]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){return _0xbaa1x28[_0x6425[257]](_0xbaa1x1f[_0x6425[107]][_0x6425[110]],_[_0x6425[111]](_0xbaa1x1f[_0x6425[107]],[_0x6425[110],_0x6425[103]])|| {})[_0x6425[260]](function(){for(var _0xbaa1x46=0;_0xbaa1x46< _0xbaa1x1f[_0x6425[107]][_0x6425[110]][_0x6425[80]];_0xbaa1x46+= 1){socket[_0x6425[259]](_0x6425[258],{ChatInteractionId:Number(_0xbaa1x1f[_0x6425[107]][_0x6425[110]][_0xbaa1x46]),UserId:Number(_0xbaa1x1f[_0x6425[104]][_0x6425[103]])})};return _0xbaa1x1f[_0x6425[107]][_0x6425[110]]})}})[_0x6425[44]](respondWithResult(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[261]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){var _0xbaa1x4f;return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){return _0xbaa1x28[_0x6425[261]](_0xbaa1x1f[_0x6425[74]][_0x6425[110]])[_0x6425[44]](function(_0xbaa1x4f){if(_[_0x6425[262]](_0xbaa1x1f[_0x6425[74]][_0x6425[110]])){for(var _0xbaa1x46=0;_0xbaa1x46< _0xbaa1x1f[_0x6425[74]][_0x6425[110]][_0x6425[80]];_0xbaa1x46+= 1){socket[_0x6425[259]](_0x6425[263],{ChatInteractionId:Number(_0xbaa1x1f[_0x6425[74]][_0x6425[110]][_0xbaa1x46]),UserId:Number(_0xbaa1x1f[_0x6425[104]][_0x6425[103]])})}}else {socket[_0x6425[259]](_0x6425[263],{ChatInteractionId:Number(_0xbaa1x1f[_0x6425[74]][_0x6425[110]]),UserId:Number(_0xbaa1x1f[_0x6425[104]][_0x6425[103]])})}})}})[_0x6425[44]](respondWithStatusCode(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[264]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){return _0xbaa1x28[_0x6425[264]](_0xbaa1x1f[_0x6425[107]][_0x6425[110]],_[_0x6425[111]](_0xbaa1x1f[_0x6425[107]],[_0x6425[110],_0x6425[103]])|| {})[_0x6425[260]](function(){for(var _0xbaa1x46=0;_0xbaa1x46< _0xbaa1x1f[_0x6425[107]][_0x6425[110]][_0x6425[80]];_0xbaa1x46+= 1){socket[_0x6425[259]](_0x6425[265],{MailInteractionId:Number(_0xbaa1x1f[_0x6425[107]][_0x6425[110]][_0xbaa1x46]),UserId:Number(_0xbaa1x1f[_0x6425[104]][_0x6425[103]])})};return _0xbaa1x1f[_0x6425[107]][_0x6425[110]]})}})[_0x6425[44]](respondWithResult(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[266]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){var _0xbaa1x4f;return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){return _0xbaa1x28[_0x6425[266]](_0xbaa1x1f[_0x6425[74]][_0x6425[110]])[_0x6425[44]](function(_0xbaa1x4f){if(_[_0x6425[262]](_0xbaa1x1f[_0x6425[74]][_0x6425[110]])){for(var _0xbaa1x46=0;_0xbaa1x46< _0xbaa1x1f[_0x6425[74]][_0x6425[110]][_0x6425[80]];_0xbaa1x46+= 1){socket[_0x6425[259]](_0x6425[267],{MailInteractionId:Number(_0xbaa1x1f[_0x6425[74]][_0x6425[110]][_0xbaa1x46]),UserId:Number(_0xbaa1x1f[_0x6425[104]][_0x6425[103]])})}}else {socket[_0x6425[259]](_0x6425[267],{MailInteractionId:Number(_0xbaa1x1f[_0x6425[74]][_0x6425[110]]),UserId:Number(_0xbaa1x1f[_0x6425[104]][_0x6425[103]])})}})}})[_0x6425[44]](respondWithStatusCode(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[268]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){return _0xbaa1x28[_0x6425[268]](_0xbaa1x1f[_0x6425[107]][_0x6425[110]],_[_0x6425[111]](_0xbaa1x1f[_0x6425[107]],[_0x6425[110],_0x6425[103]])|| {})[_0x6425[260]](function(){for(var _0xbaa1x46=0;_0xbaa1x46< _0xbaa1x1f[_0x6425[107]][_0x6425[110]][_0x6425[80]];_0xbaa1x46+= 1){socket[_0x6425[259]](_0x6425[269],{FaxInteractionId:Number(_0xbaa1x1f[_0x6425[107]][_0x6425[110]][_0xbaa1x46]),UserId:Number(_0xbaa1x1f[_0x6425[104]][_0x6425[103]])})};return _0xbaa1x1f[_0x6425[107]][_0x6425[110]]})}})[_0x6425[44]](respondWithResult(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[270]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){var _0xbaa1x4f;return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){return _0xbaa1x28[_0x6425[270]](_0xbaa1x1f[_0x6425[74]][_0x6425[110]])[_0x6425[44]](function(_0xbaa1x4f){if(_[_0x6425[262]](_0xbaa1x1f[_0x6425[74]][_0x6425[110]])){for(var _0xbaa1x46=0;_0xbaa1x46< _0xbaa1x1f[_0x6425[74]][_0x6425[110]][_0x6425[80]];_0xbaa1x46+= 1){socket[_0x6425[259]](_0x6425[271],{FaxInteractionId:Number(_0xbaa1x1f[_0x6425[74]][_0x6425[110]][_0xbaa1x46]),UserId:Number(_0xbaa1x1f[_0x6425[104]][_0x6425[103]])})}}else {socket[_0x6425[259]](_0x6425[271],{FaxInteractionId:Number(_0xbaa1x1f[_0x6425[74]][_0x6425[110]]),UserId:Number(_0xbaa1x1f[_0x6425[104]][_0x6425[103]])})}})}})[_0x6425[44]](respondWithStatusCode(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[272]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){return _0xbaa1x28[_0x6425[272]](_0xbaa1x1f[_0x6425[107]][_0x6425[110]],_[_0x6425[111]](_0xbaa1x1f[_0x6425[107]],[_0x6425[110],_0x6425[103]])|| {})[_0x6425[260]](function(){for(var _0xbaa1x46=0;_0xbaa1x46< _0xbaa1x1f[_0x6425[107]][_0x6425[110]][_0x6425[80]];_0xbaa1x46+= 1){socket[_0x6425[259]](_0x6425[273],{SmsInteractionId:Number(_0xbaa1x1f[_0x6425[107]][_0x6425[110]][_0xbaa1x46]),UserId:Number(_0xbaa1x1f[_0x6425[104]][_0x6425[103]])})};return _0xbaa1x1f[_0x6425[107]][_0x6425[110]]})}})[_0x6425[44]](respondWithResult(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[274]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){var _0xbaa1x4f;return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){return _0xbaa1x28[_0x6425[274]](_0xbaa1x1f[_0x6425[74]][_0x6425[110]])[_0x6425[44]](function(_0xbaa1x4f){if(_[_0x6425[262]](_0xbaa1x1f[_0x6425[74]][_0x6425[110]])){for(var _0xbaa1x46=0;_0xbaa1x46< _0xbaa1x1f[_0x6425[74]][_0x6425[110]][_0x6425[80]];_0xbaa1x46+= 1){socket[_0x6425[259]](_0x6425[275],{SmsInteractionId:Number(_0xbaa1x1f[_0x6425[74]][_0x6425[110]][_0xbaa1x46]),UserId:Number(_0xbaa1x1f[_0x6425[104]][_0x6425[103]])})}}else {socket[_0x6425[259]](_0x6425[275],{SmsInteractionId:Number(_0xbaa1x1f[_0x6425[74]][_0x6425[110]]),UserId:Number(_0xbaa1x1f[_0x6425[104]][_0x6425[103]])})}})}})[_0x6425[44]](respondWithStatusCode(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[276]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){return _0xbaa1x28[_0x6425[276]](_0xbaa1x1f[_0x6425[107]][_0x6425[110]],_[_0x6425[111]](_0xbaa1x1f[_0x6425[107]],[_0x6425[110],_0x6425[103]])|| {})[_0x6425[260]](function(){for(var _0xbaa1x46=0;_0xbaa1x46< _0xbaa1x1f[_0x6425[107]][_0x6425[110]][_0x6425[80]];_0xbaa1x46+= 1){socket[_0x6425[259]](_0x6425[277],{OpenchannelInteractionId:Number(_0xbaa1x1f[_0x6425[107]][_0x6425[110]][_0xbaa1x46]),UserId:Number(_0xbaa1x1f[_0x6425[104]][_0x6425[103]])})};return _0xbaa1x1f[_0x6425[107]][_0x6425[110]]})}})[_0x6425[44]](respondWithResult(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))};exports[_0x6425[278]]= function(_0xbaa1x1f,_0xbaa1x25,_0xbaa1x3d){var _0xbaa1x4f;return db[_0x6425[68]][_0x6425[105]]({where:{id:_0xbaa1x1f[_0x6425[104]][_0x6425[103]]}})[_0x6425[44]](handleEntityNotFound(_0xbaa1x25,null))[_0x6425[44]](function(_0xbaa1x28){if(_0xbaa1x28){return _0xbaa1x28[_0x6425[278]](_0xbaa1x1f[_0x6425[74]][_0x6425[110]])[_0x6425[44]](function(_0xbaa1x4f){if(_[_0x6425[262]](_0xbaa1x1f[_0x6425[74]][_0x6425[110]])){for(var _0xbaa1x46=0;_0xbaa1x46< _0xbaa1x1f[_0x6425[74]][_0x6425[110]][_0x6425[80]];_0xbaa1x46+= 1){socket[_0x6425[259]](_0x6425[279],{OpenchannelInteractionId:Number(_0xbaa1x1f[_0x6425[74]][_0x6425[110]][_0xbaa1x46]),UserId:Number(_0xbaa1x1f[_0x6425[104]][_0x6425[103]])})}}else {socket[_0x6425[259]](_0x6425[279],{OpenchannelInteractionId:Number(_0xbaa1x1f[_0x6425[74]][_0x6425[110]]),UserId:Number(_0xbaa1x1f[_0x6425[104]][_0x6425[103]])})}})}})[_0x6425[44]](respondWithStatusCode(_0xbaa1x25,null))[_0x6425[35]](handleError(_0xbaa1x25,null))}
\ No newline at end of file
index 9a260ab..b6b1aee 100644 (file)
@@ -1 +1 @@
-var _0xbccb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xbccb[0];var EventEmitter=require(_0xbccb[1]);var User=require(_0xbccb[4])[_0xbccb[3]][_0xbccb[2]];var UserEvents= new EventEmitter();UserEvents[_0xbccb[5]](0);var events={afterCreate:_0xbccb[6],afterUpdate:_0xbccb[7],afterDestroy:_0xbccb[8]};function emitEvent(event){return function(_0x7070x7,_0x7070x8,_0x7070x9){UserEvents[_0xbccb[11]](event+ _0xbccb[9]+ _0x7070x7[_0xbccb[10]],_0x7070x7);UserEvents[_0xbccb[11]](event,_0x7070x7);_0x7070x9(null)}}for(var e in events){if(events[_0xbccb[12]](e)){var event=events[e];User[_0xbccb[13]](e,emitEvent(event))}};module[_0xbccb[14]]= UserEvents
\ No newline at end of file
+var _0x58ae=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x58ae[0];var EventEmitter=require(_0x58ae[1]);var User=require(_0x58ae[4])[_0x58ae[3]][_0x58ae[2]];var UserEvents= new EventEmitter();UserEvents[_0x58ae[5]](0);var events={afterCreate:_0x58ae[6],afterUpdate:_0x58ae[7],afterDestroy:_0x58ae[8]};function emitEvent(event){return function(_0x39fex7,_0x39fex8,_0x39fex9){UserEvents[_0x58ae[11]](event+ _0x58ae[9]+ _0x39fex7[_0x58ae[10]],_0x39fex7);UserEvents[_0x58ae[11]](event,_0x39fex7);_0x39fex9(null)}}for(var e in events){if(events[_0x58ae[12]](e)){var event=events[e];User[_0x58ae[13]](e,emitEvent(event))}};module[_0x58ae[14]]= UserEvents
\ No newline at end of file
index 268eb09..27f4ac2 100644 (file)
@@ -1 +1 @@
-var _0x2159=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x63\x72\x79\x70\x74\x6F","\x75\x74\x69\x6C","\x6D\x64\x35","\x6C\x6F\x64\x61\x73\x68","\x2E\x2F\x75\x73\x65\x72\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x67\x6F\x6F\x67\x6C\x65","\x6C\x65\x6E\x67\x74\x68","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x73\x79\x73\x74\x65\x6D","\x69\x64","\x25\x73\x25\x73","\x70\x72\x65\x66\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x72\x65\x63\x6F\x72\x64","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x24\x7B\x55\x4E\x49\x51\x55\x45\x49\x44\x7D\x2E\x25\x73\x2C\x61\x62","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x6D\x65\x72\x67\x65","\x70\x75\x73\x68","\x61\x75\x74\x68","\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x43\x68\x61\x6E\x53\x70\x79","\x53\x49\x50\x2F\x25\x73\x2C\x25\x73","\x6E\x61\x6D\x65","\x6F\x70\x74\x69\x6F\x6E\x73","","\x6A\x6F\x69\x6E","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x77\x61\x76","\x57\x41\x56","\x67\x73\x6D","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x4D\x6F\x6E\x69\x74\x6F\x72","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x5F\x58\x43\x41\x4C\x4C\x59\x5F\x4D\x49\x58\x4D\x4F\x4E\x49\x54\x4F\x52\x5F\x55\x4E\x49\x51\x55\x45\x49\x44\x3D\x24\x7B\x55\x4E\x49\x51\x55\x45\x49\x44\x7D","\x5F\x58\x43\x41\x4C\x4C\x59\x5F\x4D\x49\x58\x4D\x4F\x4E\x49\x54\x4F\x52\x5F\x46\x4F\x52\x4D\x41\x54\x3D\x25\x73","\x44\x69\x61\x6C","\x53\x49\x50\x2F\x25\x73\x2C\x2C\x74\x54\x78\x58\x55\x28\x78\x63\x61\x6C\x6C\x79\x2D\x6D\x69\x78\x6D\x6F\x6E\x69\x74\x6F\x72\x2D\x63\x6F\x6E\x74\x65\x78\x74\x29","\x53\x49\x50\x2F\x25\x73\x2C\x2C\x74\x54\x78\x58","\x48\x61\x6E\x67\x75\x70","\x70\x72\x69\x6F\x72\x69\x74\x79","\x64\x65\x66\x61\x75\x6C\x74\x73","\x63\x61\x74\x63\x68","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x63\x6F\x6E\x63\x61\x74","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x56\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x75\x73\x65\x72\x73","\x75\x74\x66\x38","\x75\x74\x66\x38\x5F\x62\x69\x6E","\x75\x70\x64\x61\x74\x65\x4D\x64\x35\x50\x61\x73\x73\x77\x6F\x72\x64","\x75\x70\x64\x61\x74\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x63\x68\x61\x6E\x67\x65\x64","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x63\x68\x61\x6E\x73\x70\x79","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x73\x6F\x6C\x76\x65","\x65\x6E\x63\x72\x79\x70\x74\x50\x61\x73\x73\x77\x6F\x72\x64","\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x4D\x69\x73\x73\x69\x6E\x67\x20\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x62\x61\x73\x65\x36\x34","\x72\x61\x6E\x64\x6F\x6D\x42\x79\x74\x65\x73","\x73\x61\x6C\x74","\x73\x68\x61\x31","\x70\x62\x6B\x64\x66\x32\x53\x79\x6E\x63","\x70\x62\x6B\x64\x66\x32","\x70\x72\x6F\x76\x69\x64\x65\x72","\x69\x6E\x64\x65\x78\x4F\x66","\x49\x6E\x76\x61\x6C\x69\x64\x20\x70\x61\x73\x73\x77\x6F\x72\x64","\x6D\x61\x6B\x65\x53\x61\x6C\x74","\x6D\x64\x35\x73\x65\x63\x72\x65\x74","\x3A\x61\x73\x74\x65\x72\x69\x73\x6B\x3A","\x64\x65\x66\x69\x6E\x65"];_0x2159[0];var BPromise=require(_0x2159[1]);var crypto=require(_0x2159[2]);var util=require(_0x2159[3]);var md5=require(_0x2159[4]);var _=require(_0x2159[5]);var attributes=require(_0x2159[6]);var authTypes=[_0x2159[7]];var validatePresenceOf=function(_0x9d1ax9){return _0x9d1ax9&& _0x9d1ax9[_0x2159[8]]};var getChanSpyApplications=function(_0x9d1axb,_0x9d1axc,_0x9d1axd){var _0x9d1axe={context:_0x2159[9],type:_0x2159[10],isApp:false,UserId:_0x9d1axb[_0x2159[11]]};var _0x9d1axf=[];for(var _0x9d1ax10=0,_0x9d1ax11=1;_0x9d1ax10< _0x9d1axd[_0x2159[8]];_0x9d1ax10++,_0x9d1ax11= 1){var _0x9d1ax12={exten:util[_0x2159[14]](_0x2159[12],_0x9d1axd[_0x9d1ax10][_0x2159[13]],_0x9d1axc),ChanSpyId:_0x9d1axd[_0x9d1ax10][_0x2159[11]]};if(_0x9d1axd[_0x9d1ax10][_0x2159[15]]){_0x9d1axf[_0x2159[20]](_[_0x2159[19]]({app:_0x2159[16],appdata:util[_0x2159[14]](_0x2159[17],_0x9d1axd[_0x9d1ax10][_0x2159[18]]),priority:_0x9d1ax11++},_0x9d1axe,_0x9d1ax12))};if(_0x9d1axd[_0x9d1ax10][_0x2159[21]]){_0x9d1axf[_0x2159[20]](_[_0x2159[19]]({app:_0x2159[22],appdata:_0x9d1axd[_0x9d1ax10][_0x2159[23]],priority:_0x9d1ax11++},_0x9d1axe,_0x9d1ax12))};_0x9d1axf[_0x2159[20]](_[_0x2159[19]]({app:_0x2159[24],appdata:util[_0x2159[14]](_0x2159[25],_0x9d1axb[_0x2159[26]],_0x9d1axd[_0x9d1ax10][_0x2159[27]]?_0x9d1axd[_0x9d1ax10][_0x2159[27]][_0x2159[29]](_0x2159[28]):_0x2159[28]),priority:_0x9d1ax11++},_0x9d1axe,_0x9d1ax12));if(_0x9d1axd[_0x9d1ax10][_0x2159[15]]){_0x9d1axf[_0x2159[20]](_[_0x2159[19]]({app:_0x2159[30],priority:_0x9d1ax11++},_0x9d1axe,_0x9d1ax12))}};return _0x9d1axf};var getUserApplications=function(_0x9d1axb,_0x9d1axc){var _0x9d1ax14=[_0x2159[31],_0x2159[32],_0x2159[33]];var _0x9d1axe={context:_0x2159[9],exten:_0x9d1axc,type:_0x2159[10],isApp:false,UserId:_0x9d1axb[_0x2159[11]]};var _0x9d1axf=[{app:_0x2159[34],appdata:_0x2159[35]}];if(_0x9d1axb[_0x2159[36]]&& _[_0x2159[37]](_0x9d1ax14,_0x9d1axb[_0x2159[36]])){_0x9d1axf[_0x2159[20]]({app:_0x2159[34],appdata:_0x2159[38]});_0x9d1axf[_0x2159[20]]({app:_0x2159[34],appdata:util[_0x2159[14]](_0x2159[39],_0x9d1axb[_0x2159[36]])});_0x9d1axf[_0x2159[20]]({app:_0x2159[40],appdata:util[_0x2159[14]](_0x2159[41],_0x9d1axb[_0x2159[26]])})}else {_0x9d1axf[_0x2159[20]]({app:_0x2159[40],appdata:util[_0x2159[14]](_0x2159[42],_0x9d1axb[_0x2159[26]])})};_0x9d1axf[_0x2159[20]]({app:_0x2159[43]});for(var _0x9d1ax10=0;_0x9d1ax10< _0x9d1axf[_0x2159[8]];_0x9d1ax10++){_0x9d1axf[_0x9d1ax10][_0x2159[44]]= _0x9d1ax10+ 1;_0x9d1axf[_0x9d1ax10]= _[_0x2159[45]](_0x9d1axf[_0x9d1ax10],_0x9d1axe)};return _0x9d1axf};var getChanSpyPromise=function(_0x9d1ax16,_0x9d1axb){return  new BPromise(function(_0x9d1ax17,_0x9d1ax18){return _0x9d1ax16[_0x2159[51]][_0x2159[50]]()[_0x2159[49]](function(_0x9d1ax1a){if(_0x9d1ax1a){var _0x9d1ax1b=getChanSpyApplications(_0x9d1axb,_0x9d1axb[_0x2159[47]],_0x9d1ax1a);if(_0x9d1axb[_0x2159[47]]!= _0x9d1axb[_0x2159[26]]){_0x9d1ax1b= _0x9d1ax1b[_0x2159[48]](getChanSpyApplications(_0x9d1axb,_0x9d1axb[_0x2159[26]],_0x9d1ax1a))};return _0x9d1ax17(_0x9d1ax1b)};return _0x9d1ax17([])})[_0x2159[46]](function(_0x9d1ax19){_0x9d1ax18(_0x9d1ax19)})})};module[_0x2159[52]]= function(_0x9d1ax1c,_0x9d1ax1d){var _0x9d1ax16=_0x9d1ax1c[_0x2159[53]];return _0x9d1ax1c[_0x2159[81]](_0x2159[54],attributes,{tableName:_0x2159[55],charset:_0x2159[56],collate:_0x2159[57],hooks:{beforeCreate:function(_0x9d1axb,_0x9d1ax1e,_0x9d1ax1f){_0x9d1axb[_0x2159[58]]();_0x9d1axb[_0x2159[59]](_0x9d1ax1f)},beforeUpdate:function(_0x9d1axb,_0x9d1ax1e,_0x9d1ax1f){if(_0x9d1axb[_0x2159[60]](_0x2159[23])){_0x9d1axb[_0x2159[58]]();return _0x9d1axb[_0x2159[59]](_0x9d1ax1f)};_0x9d1ax1f()},afterCreate:function(_0x9d1axb,_0x9d1ax1e,_0x9d1ax1f){var _0x9d1ax20=getUserApplications(_0x9d1axb,_0x9d1axb[_0x2159[47]]);if(_0x9d1axb[_0x2159[47]]!= _0x9d1axb[_0x2159[26]]){_0x9d1ax20= _0x9d1ax20[_0x2159[48]](getUserApplications(_0x9d1axb,_0x9d1axb[_0x2159[26]]))};return _0x9d1ax16[_0x2159[62]][_0x2159[61]](_0x9d1ax20)[_0x2159[49]](function(){if(_0x9d1axb[_0x2159[63]]){return getChanSpyPromise(_0x9d1ax16,_0x9d1axb)}})[_0x2159[49]](function(_0x9d1axf){if(_0x9d1axf&& _0x9d1axf[_0x2159[8]]){return _0x9d1ax16[_0x2159[62]][_0x2159[61]](_0x9d1axf)}})[_0x2159[49]](function(){_0x9d1ax1f()})[_0x2159[46]](function(_0x9d1ax19){_0x9d1ax1f(_0x9d1ax19)})},afterUpdate:function(_0x9d1axb,_0x9d1ax1e,_0x9d1ax1f){return BPromise[_0x2159[65]]()[_0x2159[49]](function(){if(_0x9d1axb[_0x2159[60]](_0x2159[63])){return _0x9d1ax16[_0x2159[62]][_0x2159[64]]({where:{UserId:_0x9d1axb[_0x2159[11]],type:_0x2159[10],ChanSpyId:{$ne:null}}})[_0x2159[49]](function(){if(_0x9d1axb[_0x2159[63]]){return getChanSpyPromise(_0x9d1ax16,_0x9d1axb)[_0x2159[49]](function(_0x9d1axf){if(_0x9d1axf&& _0x9d1axf[_0x2159[8]]){return _0x9d1ax16[_0x2159[62]][_0x2159[61]](_0x9d1axf)}})}})}})[_0x2159[49]](function(){if(_0x9d1axb[_0x2159[60]](_0x2159[36])){return _0x9d1ax16[_0x2159[62]][_0x2159[64]]({where:{UserId:_0x9d1axb[_0x2159[11]],type:_0x2159[10],ChanSpyId:null}})[_0x2159[49]](function(){var _0x9d1ax20=getUserApplications(_0x9d1axb,_0x9d1axb[_0x2159[47]]);if(_0x9d1axb[_0x2159[47]]!= _0x9d1axb[_0x2159[26]]){_0x9d1ax20= _0x9d1ax20[_0x2159[48]](getUserApplications(_0x9d1axb,_0x9d1axb[_0x2159[26]]))};return _0x9d1ax16[_0x2159[62]][_0x2159[61]](_0x9d1ax20)})}})[_0x2159[49]](function(){_0x9d1ax1f()})[_0x2159[46]](function(_0x9d1ax19){_0x9d1ax1f(_0x9d1ax19)})},afterDestroy:function(_0x9d1axb,_0x9d1ax1e){return _0x9d1ax16[_0x2159[62]][_0x2159[64]]({where:{UserId:_0x9d1axb[_0x2159[11]],type:_0x2159[10]}})}},instanceMethods:{authenticate:function(_0x9d1ax21,_0x9d1ax22){if(!_0x9d1ax22){return this[_0x2159[23]]=== this[_0x2159[66]](_0x9d1ax21)};var _0x9d1ax23=this;this[_0x2159[66]](_0x9d1ax21,function(_0x9d1ax19,_0x9d1ax24){if(_0x9d1ax19){_0x9d1ax22(_0x9d1ax19)};if(_0x9d1ax23[_0x2159[23]]=== _0x9d1ax24){_0x9d1ax22(null,true)}else {_0x9d1ax22(null,false)}})},makeSalt:function(_0x9d1ax25,_0x9d1ax22){var _0x9d1ax26=16;if( typeof arguments[0]=== _0x2159[67]){_0x9d1ax22= arguments[0];_0x9d1ax25= _0x9d1ax26}else {if( typeof arguments[1]=== _0x2159[67]){_0x9d1ax22= arguments[1]}else {throw  new Error(_0x2159[68])}};if(!_0x9d1ax25){_0x9d1ax25= _0x9d1ax26};return crypto[_0x2159[70]](_0x9d1ax25,function(_0x9d1ax19,_0x9d1ax27){if(_0x9d1ax19){_0x9d1ax22(_0x9d1ax19)};return _0x9d1ax22(null,_0x9d1ax27.toString(_0x2159[69]))})},encryptPassword:function(_0x9d1ax21,_0x9d1ax22){if(!_0x9d1ax21||  !this[_0x2159[71]]){return _0x9d1ax22?_0x9d1ax22(null):null};var _0x9d1ax28=10000;var _0x9d1ax29=64;var _0x9d1ax27= new Buffer(this[_0x2159[71]],_0x2159[69]);if(!_0x9d1ax22){return crypto[_0x2159[73]](_0x9d1ax21,_0x9d1ax27,_0x9d1ax28,_0x9d1ax29,_0x2159[72]).toString(_0x2159[69])};return crypto[_0x2159[74]](_0x9d1ax21,_0x9d1ax27,_0x9d1ax28,_0x9d1ax29,_0x2159[72],function(_0x9d1ax19,_0x9d1ax2a){if(_0x9d1ax19){_0x9d1ax22(_0x9d1ax19)};return _0x9d1ax22(null,_0x9d1ax2a.toString(_0x2159[69]))})},updatePassword:function(_0x9d1ax1f){if(!this[_0x2159[23]]){return _0x9d1ax1f(null)};if(!validatePresenceOf(this[_0x2159[23]])&& authTypes[_0x2159[76]](this[_0x2159[75]])===  -1){_0x9d1ax1f( new Error(_0x2159[77]))};var _0x9d1ax23=this;this[_0x2159[78]](function(_0x9d1ax2b,_0x9d1ax27){if(_0x9d1ax2b){return _0x9d1ax1f(_0x9d1ax2b)};_0x9d1ax23[_0x2159[71]]= _0x9d1ax27;_0x9d1ax23[_0x2159[66]](_0x9d1ax23[_0x2159[23]],function(_0x9d1ax2c,_0x9d1ax2d){if(_0x9d1ax2c){_0x9d1ax1f(_0x9d1ax2c)};_0x9d1ax23[_0x2159[23]]= _0x9d1ax2d;_0x9d1ax1f(null)})})},updateMd5Password:function(){this[_0x2159[79]]= md5(this[_0x2159[26]]+ _0x2159[80]+ this[_0x2159[23]]);return this[_0x2159[79]]}}})}
\ No newline at end of file
+var _0xfc4c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x63\x72\x79\x70\x74\x6F","\x75\x74\x69\x6C","\x6D\x64\x35","\x6C\x6F\x64\x61\x73\x68","\x2E\x2F\x75\x73\x65\x72\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x67\x6F\x6F\x67\x6C\x65","\x6C\x65\x6E\x67\x74\x68","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x73\x79\x73\x74\x65\x6D","\x69\x64","\x25\x73\x25\x73","\x70\x72\x65\x66\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x72\x65\x63\x6F\x72\x64","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x24\x7B\x55\x4E\x49\x51\x55\x45\x49\x44\x7D\x2E\x25\x73\x2C\x61\x62","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x6D\x65\x72\x67\x65","\x70\x75\x73\x68","\x61\x75\x74\x68","\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x43\x68\x61\x6E\x53\x70\x79","\x53\x49\x50\x2F\x25\x73\x2C\x25\x73","\x6E\x61\x6D\x65","\x6F\x70\x74\x69\x6F\x6E\x73","","\x6A\x6F\x69\x6E","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x77\x61\x76","\x57\x41\x56","\x67\x73\x6D","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x4D\x6F\x6E\x69\x74\x6F\x72","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x5F\x58\x43\x41\x4C\x4C\x59\x5F\x4D\x49\x58\x4D\x4F\x4E\x49\x54\x4F\x52\x5F\x55\x4E\x49\x51\x55\x45\x49\x44\x3D\x24\x7B\x55\x4E\x49\x51\x55\x45\x49\x44\x7D","\x5F\x58\x43\x41\x4C\x4C\x59\x5F\x4D\x49\x58\x4D\x4F\x4E\x49\x54\x4F\x52\x5F\x46\x4F\x52\x4D\x41\x54\x3D\x25\x73","\x44\x69\x61\x6C","\x53\x49\x50\x2F\x25\x73\x2C\x2C\x74\x54\x78\x58\x55\x28\x78\x63\x61\x6C\x6C\x79\x2D\x6D\x69\x78\x6D\x6F\x6E\x69\x74\x6F\x72\x2D\x63\x6F\x6E\x74\x65\x78\x74\x29","\x53\x49\x50\x2F\x25\x73\x2C\x2C\x74\x54\x78\x58","\x48\x61\x6E\x67\x75\x70","\x70\x72\x69\x6F\x72\x69\x74\x79","\x64\x65\x66\x61\x75\x6C\x74\x73","\x63\x61\x74\x63\x68","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x63\x6F\x6E\x63\x61\x74","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x56\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x75\x73\x65\x72\x73","\x75\x74\x66\x38","\x75\x74\x66\x38\x5F\x62\x69\x6E","\x75\x70\x64\x61\x74\x65\x4D\x64\x35\x50\x61\x73\x73\x77\x6F\x72\x64","\x75\x70\x64\x61\x74\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x63\x68\x61\x6E\x67\x65\x64","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x63\x68\x61\x6E\x73\x70\x79","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x73\x6F\x6C\x76\x65","\x65\x6E\x63\x72\x79\x70\x74\x50\x61\x73\x73\x77\x6F\x72\x64","\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x4D\x69\x73\x73\x69\x6E\x67\x20\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x62\x61\x73\x65\x36\x34","\x72\x61\x6E\x64\x6F\x6D\x42\x79\x74\x65\x73","\x73\x61\x6C\x74","\x73\x68\x61\x31","\x70\x62\x6B\x64\x66\x32\x53\x79\x6E\x63","\x70\x62\x6B\x64\x66\x32","\x70\x72\x6F\x76\x69\x64\x65\x72","\x69\x6E\x64\x65\x78\x4F\x66","\x49\x6E\x76\x61\x6C\x69\x64\x20\x70\x61\x73\x73\x77\x6F\x72\x64","\x6D\x61\x6B\x65\x53\x61\x6C\x74","\x6D\x64\x35\x73\x65\x63\x72\x65\x74","\x3A\x61\x73\x74\x65\x72\x69\x73\x6B\x3A","\x64\x65\x66\x69\x6E\x65"];_0xfc4c[0];var BPromise=require(_0xfc4c[1]);var crypto=require(_0xfc4c[2]);var util=require(_0xfc4c[3]);var md5=require(_0xfc4c[4]);var _=require(_0xfc4c[5]);var attributes=require(_0xfc4c[6]);var authTypes=[_0xfc4c[7]];var validatePresenceOf=function(_0x3e35x9){return _0x3e35x9&& _0x3e35x9[_0xfc4c[8]]};var getChanSpyApplications=function(_0x3e35xb,_0x3e35xc,_0x3e35xd){var _0x3e35xe={context:_0xfc4c[9],type:_0xfc4c[10],isApp:false,UserId:_0x3e35xb[_0xfc4c[11]]};var _0x3e35xf=[];for(var _0x3e35x10=0,_0x3e35x11=1;_0x3e35x10< _0x3e35xd[_0xfc4c[8]];_0x3e35x10++,_0x3e35x11= 1){var _0x3e35x12={exten:util[_0xfc4c[14]](_0xfc4c[12],_0x3e35xd[_0x3e35x10][_0xfc4c[13]],_0x3e35xc),ChanSpyId:_0x3e35xd[_0x3e35x10][_0xfc4c[11]]};if(_0x3e35xd[_0x3e35x10][_0xfc4c[15]]){_0x3e35xf[_0xfc4c[20]](_[_0xfc4c[19]]({app:_0xfc4c[16],appdata:util[_0xfc4c[14]](_0xfc4c[17],_0x3e35xd[_0x3e35x10][_0xfc4c[18]]),priority:_0x3e35x11++},_0x3e35xe,_0x3e35x12))};if(_0x3e35xd[_0x3e35x10][_0xfc4c[21]]){_0x3e35xf[_0xfc4c[20]](_[_0xfc4c[19]]({app:_0xfc4c[22],appdata:_0x3e35xd[_0x3e35x10][_0xfc4c[23]],priority:_0x3e35x11++},_0x3e35xe,_0x3e35x12))};_0x3e35xf[_0xfc4c[20]](_[_0xfc4c[19]]({app:_0xfc4c[24],appdata:util[_0xfc4c[14]](_0xfc4c[25],_0x3e35xb[_0xfc4c[26]],_0x3e35xd[_0x3e35x10][_0xfc4c[27]]?_0x3e35xd[_0x3e35x10][_0xfc4c[27]][_0xfc4c[29]](_0xfc4c[28]):_0xfc4c[28]),priority:_0x3e35x11++},_0x3e35xe,_0x3e35x12));if(_0x3e35xd[_0x3e35x10][_0xfc4c[15]]){_0x3e35xf[_0xfc4c[20]](_[_0xfc4c[19]]({app:_0xfc4c[30],priority:_0x3e35x11++},_0x3e35xe,_0x3e35x12))}};return _0x3e35xf};var getUserApplications=function(_0x3e35xb,_0x3e35xc){var _0x3e35x14=[_0xfc4c[31],_0xfc4c[32],_0xfc4c[33]];var _0x3e35xe={context:_0xfc4c[9],exten:_0x3e35xc,type:_0xfc4c[10],isApp:false,UserId:_0x3e35xb[_0xfc4c[11]]};var _0x3e35xf=[{app:_0xfc4c[34],appdata:_0xfc4c[35]}];if(_0x3e35xb[_0xfc4c[36]]&& _[_0xfc4c[37]](_0x3e35x14,_0x3e35xb[_0xfc4c[36]])){_0x3e35xf[_0xfc4c[20]]({app:_0xfc4c[34],appdata:_0xfc4c[38]});_0x3e35xf[_0xfc4c[20]]({app:_0xfc4c[34],appdata:util[_0xfc4c[14]](_0xfc4c[39],_0x3e35xb[_0xfc4c[36]])});_0x3e35xf[_0xfc4c[20]]({app:_0xfc4c[40],appdata:util[_0xfc4c[14]](_0xfc4c[41],_0x3e35xb[_0xfc4c[26]])})}else {_0x3e35xf[_0xfc4c[20]]({app:_0xfc4c[40],appdata:util[_0xfc4c[14]](_0xfc4c[42],_0x3e35xb[_0xfc4c[26]])})};_0x3e35xf[_0xfc4c[20]]({app:_0xfc4c[43]});for(var _0x3e35x10=0;_0x3e35x10< _0x3e35xf[_0xfc4c[8]];_0x3e35x10++){_0x3e35xf[_0x3e35x10][_0xfc4c[44]]= _0x3e35x10+ 1;_0x3e35xf[_0x3e35x10]= _[_0xfc4c[45]](_0x3e35xf[_0x3e35x10],_0x3e35xe)};return _0x3e35xf};var getChanSpyPromise=function(_0x3e35x16,_0x3e35xb){return  new BPromise(function(_0x3e35x17,_0x3e35x18){return _0x3e35x16[_0xfc4c[51]][_0xfc4c[50]]()[_0xfc4c[49]](function(_0x3e35x1a){if(_0x3e35x1a){var _0x3e35x1b=getChanSpyApplications(_0x3e35xb,_0x3e35xb[_0xfc4c[47]],_0x3e35x1a);if(_0x3e35xb[_0xfc4c[47]]!= _0x3e35xb[_0xfc4c[26]]){_0x3e35x1b= _0x3e35x1b[_0xfc4c[48]](getChanSpyApplications(_0x3e35xb,_0x3e35xb[_0xfc4c[26]],_0x3e35x1a))};return _0x3e35x17(_0x3e35x1b)};return _0x3e35x17([])})[_0xfc4c[46]](function(_0x3e35x19){_0x3e35x18(_0x3e35x19)})})};module[_0xfc4c[52]]= function(_0x3e35x1c,_0x3e35x1d){var _0x3e35x16=_0x3e35x1c[_0xfc4c[53]];return _0x3e35x1c[_0xfc4c[81]](_0xfc4c[54],attributes,{tableName:_0xfc4c[55],charset:_0xfc4c[56],collate:_0xfc4c[57],hooks:{beforeCreate:function(_0x3e35xb,_0x3e35x1e,_0x3e35x1f){_0x3e35xb[_0xfc4c[58]]();_0x3e35xb[_0xfc4c[59]](_0x3e35x1f)},beforeUpdate:function(_0x3e35xb,_0x3e35x1e,_0x3e35x1f){if(_0x3e35xb[_0xfc4c[60]](_0xfc4c[23])){_0x3e35xb[_0xfc4c[58]]();return _0x3e35xb[_0xfc4c[59]](_0x3e35x1f)};_0x3e35x1f()},afterCreate:function(_0x3e35xb,_0x3e35x1e,_0x3e35x1f){var _0x3e35x20=getUserApplications(_0x3e35xb,_0x3e35xb[_0xfc4c[47]]);if(_0x3e35xb[_0xfc4c[47]]!= _0x3e35xb[_0xfc4c[26]]){_0x3e35x20= _0x3e35x20[_0xfc4c[48]](getUserApplications(_0x3e35xb,_0x3e35xb[_0xfc4c[26]]))};return _0x3e35x16[_0xfc4c[62]][_0xfc4c[61]](_0x3e35x20)[_0xfc4c[49]](function(){if(_0x3e35xb[_0xfc4c[63]]){return getChanSpyPromise(_0x3e35x16,_0x3e35xb)}})[_0xfc4c[49]](function(_0x3e35xf){if(_0x3e35xf&& _0x3e35xf[_0xfc4c[8]]){return _0x3e35x16[_0xfc4c[62]][_0xfc4c[61]](_0x3e35xf)}})[_0xfc4c[49]](function(){_0x3e35x1f()})[_0xfc4c[46]](function(_0x3e35x19){_0x3e35x1f(_0x3e35x19)})},afterUpdate:function(_0x3e35xb,_0x3e35x1e,_0x3e35x1f){return BPromise[_0xfc4c[65]]()[_0xfc4c[49]](function(){if(_0x3e35xb[_0xfc4c[60]](_0xfc4c[63])){return _0x3e35x16[_0xfc4c[62]][_0xfc4c[64]]({where:{UserId:_0x3e35xb[_0xfc4c[11]],type:_0xfc4c[10],ChanSpyId:{$ne:null}}})[_0xfc4c[49]](function(){if(_0x3e35xb[_0xfc4c[63]]){return getChanSpyPromise(_0x3e35x16,_0x3e35xb)[_0xfc4c[49]](function(_0x3e35xf){if(_0x3e35xf&& _0x3e35xf[_0xfc4c[8]]){return _0x3e35x16[_0xfc4c[62]][_0xfc4c[61]](_0x3e35xf)}})}})}})[_0xfc4c[49]](function(){if(_0x3e35xb[_0xfc4c[60]](_0xfc4c[36])){return _0x3e35x16[_0xfc4c[62]][_0xfc4c[64]]({where:{UserId:_0x3e35xb[_0xfc4c[11]],type:_0xfc4c[10],ChanSpyId:null}})[_0xfc4c[49]](function(){var _0x3e35x20=getUserApplications(_0x3e35xb,_0x3e35xb[_0xfc4c[47]]);if(_0x3e35xb[_0xfc4c[47]]!= _0x3e35xb[_0xfc4c[26]]){_0x3e35x20= _0x3e35x20[_0xfc4c[48]](getUserApplications(_0x3e35xb,_0x3e35xb[_0xfc4c[26]]))};return _0x3e35x16[_0xfc4c[62]][_0xfc4c[61]](_0x3e35x20)})}})[_0xfc4c[49]](function(){_0x3e35x1f()})[_0xfc4c[46]](function(_0x3e35x19){_0x3e35x1f(_0x3e35x19)})},afterDestroy:function(_0x3e35xb,_0x3e35x1e){return _0x3e35x16[_0xfc4c[62]][_0xfc4c[64]]({where:{UserId:_0x3e35xb[_0xfc4c[11]],type:_0xfc4c[10]}})}},instanceMethods:{authenticate:function(_0x3e35x21,_0x3e35x22){if(!_0x3e35x22){return this[_0xfc4c[23]]=== this[_0xfc4c[66]](_0x3e35x21)};var _0x3e35x23=this;this[_0xfc4c[66]](_0x3e35x21,function(_0x3e35x19,_0x3e35x24){if(_0x3e35x19){_0x3e35x22(_0x3e35x19)};if(_0x3e35x23[_0xfc4c[23]]=== _0x3e35x24){_0x3e35x22(null,true)}else {_0x3e35x22(null,false)}})},makeSalt:function(_0x3e35x25,_0x3e35x22){var _0x3e35x26=16;if( typeof arguments[0]=== _0xfc4c[67]){_0x3e35x22= arguments[0];_0x3e35x25= _0x3e35x26}else {if( typeof arguments[1]=== _0xfc4c[67]){_0x3e35x22= arguments[1]}else {throw  new Error(_0xfc4c[68])}};if(!_0x3e35x25){_0x3e35x25= _0x3e35x26};return crypto[_0xfc4c[70]](_0x3e35x25,function(_0x3e35x19,_0x3e35x27){if(_0x3e35x19){_0x3e35x22(_0x3e35x19)};return _0x3e35x22(null,_0x3e35x27.toString(_0xfc4c[69]))})},encryptPassword:function(_0x3e35x21,_0x3e35x22){if(!_0x3e35x21||  !this[_0xfc4c[71]]){return _0x3e35x22?_0x3e35x22(null):null};var _0x3e35x28=10000;var _0x3e35x29=64;var _0x3e35x27= new Buffer(this[_0xfc4c[71]],_0xfc4c[69]);if(!_0x3e35x22){return crypto[_0xfc4c[73]](_0x3e35x21,_0x3e35x27,_0x3e35x28,_0x3e35x29,_0xfc4c[72]).toString(_0xfc4c[69])};return crypto[_0xfc4c[74]](_0x3e35x21,_0x3e35x27,_0x3e35x28,_0x3e35x29,_0xfc4c[72],function(_0x3e35x19,_0x3e35x2a){if(_0x3e35x19){_0x3e35x22(_0x3e35x19)};return _0x3e35x22(null,_0x3e35x2a.toString(_0xfc4c[69]))})},updatePassword:function(_0x3e35x1f){if(!this[_0xfc4c[23]]){return _0x3e35x1f(null)};if(!validatePresenceOf(this[_0xfc4c[23]])&& authTypes[_0xfc4c[76]](this[_0xfc4c[75]])===  -1){_0x3e35x1f( new Error(_0xfc4c[77]))};var _0x3e35x23=this;this[_0xfc4c[78]](function(_0x3e35x2b,_0x3e35x27){if(_0x3e35x2b){return _0x3e35x1f(_0x3e35x2b)};_0x3e35x23[_0xfc4c[71]]= _0x3e35x27;_0x3e35x23[_0xfc4c[66]](_0x3e35x23[_0xfc4c[23]],function(_0x3e35x2c,_0x3e35x2d){if(_0x3e35x2c){_0x3e35x1f(_0x3e35x2c)};_0x3e35x23[_0xfc4c[23]]= _0x3e35x2d;_0x3e35x1f(null)})})},updateMd5Password:function(){this[_0xfc4c[79]]= md5(this[_0xfc4c[26]]+ _0xfc4c[80]+ this[_0xfc4c[23]]);return this[_0xfc4c[79]]}}})}
\ No newline at end of file
index 0e6b832..e2eabe5 100644 (file)
@@ -1 +1 @@
-var _0xdb87=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x75\x73\x65\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x55\x73\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x55\x73\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x55\x73\x65\x72","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x55\x73\x65\x72","\x53\x68\x6F\x77\x55\x73\x65\x72","\x66\x69\x6E\x64","\x50\x61\x75\x73\x65\x55\x73\x65\x72","\x74\x79\x70\x65","\x62\x6F\x64\x79","\x44\x45\x46\x41\x55\x4C\x54\x20\x50\x41\x55\x53\x45","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x75\x70\x64\x61\x74\x65","\x67\x65\x74\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x6E\x61\x6D\x65","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x50\x41\x55\x53\x45","\x72\x6F\x6C\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x6C\x65\x6E\x67\x74\x68","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x69\x64","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74","\x55\x6E\x70\x61\x75\x73\x65\x55\x73\x65\x72","\x63\x68\x61\x6E\x6E\x65\x6C","\x69\x73\x56\x61\x6C\x69\x64\x43\x68\x61\x6E\x6E\x65\x6C","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x63\x68\x61\x6E\x6E\x65\x6C","\x73\x79\x73\x74\x65\x6D","\x76\x6F\x69\x63\x65","\x6D\x61\x69\x6C","\x63\x68\x61\x74","\x66\x61\x78","\x73\x6D\x73","\x25\x73\x25\x73","\x50\x61\x75\x73\x65","\x73\x65\x74","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x6C\x6C","\x66\x69\x6E\x64\x4F\x6E\x65","\x4C\x6F\x67\x6F\x75\x74\x55\x73\x65\x72","\x64\x65\x73\x74\x72\x6F\x79","\x4C\x6F\x67\x69\x6E\x55\x73\x65\x72","\x6C\x6F\x67\x69\x6E\x49\x6E\x50\x61\x75\x73\x65","\x4C\x4F\x47\x49\x4E\x49\x4E\x50\x41\x55\x53\x45","\x4C\x4F\x47\x49\x4E","\x6D\x65\x72\x67\x65","\x63\x6F\x6E\x63\x61\x74","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x75\x70\x73\x65\x72\x74","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74\x73","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x6C\x6F\x67\x69\x6E\x20\x68\x61\x73\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64","\x67\x65\x74\x4C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x75\x74\x69\x6C","\x61\x67\x65\x6E\x74","\x63\x6F\x75\x6E\x74"];_0xdb87[0];var _=require(_0xdb87[1]);var util=require(_0xdb87[2]);var moment=require(_0xdb87[3]);var BPromise=require(_0xdb87[4]);var rs=require(_0xdb87[5]);var fs=require(_0xdb87[6]);var db=require(_0xdb87[8])[_0xdb87[7]];var utils=require(_0xdb87[9]);var logger=require(_0xdb87[11])(_0xdb87[10]);var config=require(_0xdb87[12]);var jayson=require(_0xdb87[13]);var client=jayson[_0xdb87[15]][_0xdb87[14]]({port:9002});var socket=require(_0xdb87[17])({host:_0xdb87[16],port:6379});require(_0xdb87[19])[_0xdb87[18]](socket);function respondWithRpcPromise(_0xcc3bxf,_0xcc3bx10,_0xcc3bx11){return  new BPromise(function(_0xcc3bx12,_0xcc3bx13){return client[_0xdb87[32]](_0xcc3bxf,_0xcc3bx11)[_0xdb87[31]](function(_0xcc3bx15){logger[_0xdb87[24]](_0xdb87[20],_0xcc3bx10,_0xdb87[23]);logger[_0xdb87[27]](_0xdb87[25],_0xcc3bx10,_0xdb87[23],JSON[_0xdb87[26]](_0xcc3bx15));if(_0xcc3bx15[_0xdb87[21]]){if(_0xcc3bx15[_0xdb87[21]][_0xdb87[28]]=== 500){logger[_0xdb87[21]](_0xdb87[20],_0xcc3bx10,_0xcc3bx15[_0xdb87[21]][_0xdb87[29]]);return _0xcc3bx13(_0xcc3bx15[_0xdb87[21]][_0xdb87[29]])};logger[_0xdb87[21]](_0xdb87[20],_0xcc3bx10,_0xcc3bx15[_0xdb87[21]][_0xdb87[29]]);return _0xcc3bx12(_0xcc3bx15[_0xdb87[21]][_0xdb87[29]])}else {logger[_0xdb87[24]](_0xdb87[20],_0xcc3bx10,_0xdb87[23]);_0xcc3bx12(_0xcc3bx15[_0xdb87[30]][_0xdb87[29]])}})[_0xdb87[22]](function(_0xcc3bx14){logger[_0xdb87[21]](_0xdb87[20],_0xcc3bx10,_0xcc3bx14);_0xcc3bx13(_0xcc3bx14)})})}exports[_0xdb87[33]]= function(_0xcc3bx11){var _0xcc3bx16=this;return  new Promise(function(_0xcc3bx12,_0xcc3bx13){return db[_0xdb87[44]][_0xdb87[43]]({raw:_0xcc3bx11[_0xdb87[34]]?(_0xcc3bx11[_0xdb87[34]][_0xdb87[35]]=== undefined)?true:false:true,where:_0xcc3bx11[_0xdb87[34]]?_0xcc3bx11[_0xdb87[34]][_0xdb87[36]]|| null:null,attributes:_0xcc3bx11[_0xdb87[34]]?_0xcc3bx11[_0xdb87[34]][_0xdb87[37]]|| null:null,limit:_0xcc3bx11[_0xdb87[34]]?_0xcc3bx11[_0xdb87[34]][_0xdb87[38]]|| null:null,include:_0xcc3bx11[_0xdb87[34]]?(_0xcc3bx11[_0xdb87[34]][_0xdb87[39]]?_[_0xdb87[42]](_0xcc3bx11[_0xdb87[34]][_0xdb87[39]],function(_0xcc3bx17){return {model:db[_0xcc3bx17[_0xdb87[40]]],as:_0xcc3bx17[_0xdb87[41]],attributes:_0xcc3bx17[_0xdb87[37]],include:_0xcc3bx17[_0xdb87[39]]?_[_0xdb87[42]](_0xcc3bx17[_0xdb87[39]],function(_0xcc3bx18){return {model:db[_0xcc3bx18[_0xdb87[40]]],as:_0xcc3bx18[_0xdb87[41]],attributes:_0xcc3bx18[_0xdb87[37]],include:_0xcc3bx18[_0xdb87[39]]?_[_0xdb87[42]](_0xcc3bx18[_0xdb87[39]],function(_0xcc3bx19){return {model:db[_0xcc3bx19[_0xdb87[40]]],as:_0xcc3bx19[_0xdb87[41]],attributes:_0xcc3bx19[_0xdb87[37]]}}):[]}}):[]}}):[]):[]})[_0xdb87[31]](function(_0xcc3bx15){logger[_0xdb87[24]](_0xdb87[33],_0xcc3bx11);logger[_0xdb87[27]](_0xdb87[33],_0xcc3bx11,JSON[_0xdb87[26]](_0xcc3bx15));_0xcc3bx12(_0xcc3bx15)})[_0xdb87[22]](function(_0xcc3bx14){logger[_0xdb87[21]](_0xdb87[33],_0xcc3bx14[_0xdb87[29]],_0xcc3bx11);_0xcc3bx13(_0xcc3bx16[_0xdb87[21]](500,_0xcc3bx14[_0xdb87[29]]))})})};exports[_0xdb87[45]]= function(_0xcc3bx11){var _0xcc3bx16=this;return  new Promise(function(_0xcc3bx12,_0xcc3bx13){return db[_0xdb87[44]][_0xdb87[46]]({raw:_0xcc3bx11[_0xdb87[34]]?(_0xcc3bx11[_0xdb87[34]][_0xdb87[35]]=== undefined)?true:false:true,where:_0xcc3bx11[_0xdb87[34]]?_0xcc3bx11[_0xdb87[34]][_0xdb87[36]]|| null:null,attributes:_0xcc3bx11[_0xdb87[34]]?_0xcc3bx11[_0xdb87[34]][_0xdb87[37]]|| null:null,include:_0xcc3bx11[_0xdb87[34]]?(_0xcc3bx11[_0xdb87[34]][_0xdb87[39]]?_[_0xdb87[42]](_0xcc3bx11[_0xdb87[34]][_0xdb87[39]],function(_0xcc3bx17){return {model:db[_0xcc3bx17[_0xdb87[40]]],as:_0xcc3bx17[_0xdb87[41]],attributes:_0xcc3bx17[_0xdb87[37]],include:_0xcc3bx17[_0xdb87[39]]?_[_0xdb87[42]](_0xcc3bx17[_0xdb87[39]],function(_0xcc3bx18){return {model:db[_0xcc3bx18[_0xdb87[40]]],as:_0xcc3bx18[_0xdb87[41]],attributes:_0xcc3bx18[_0xdb87[37]],include:_0xcc3bx18[_0xdb87[39]]?_[_0xdb87[42]](_0xcc3bx18[_0xdb87[39]],function(_0xcc3bx19){return {model:db[_0xcc3bx19[_0xdb87[40]]],as:_0xcc3bx19[_0xdb87[41]],attributes:_0xcc3bx19[_0xdb87[37]]}}):[]}}):[]}}):[]):[]})[_0xdb87[31]](function(_0xcc3bx15){logger[_0xdb87[24]](_0xdb87[45],_0xcc3bx11);logger[_0xdb87[27]](_0xdb87[45],_0xcc3bx11,JSON[_0xdb87[26]](_0xcc3bx15));_0xcc3bx12(_0xcc3bx15)})[_0xdb87[22]](function(_0xcc3bx14){logger[_0xdb87[21]](_0xdb87[45],_0xcc3bx14[_0xdb87[29]],_0xcc3bx11);_0xcc3bx13(_0xcc3bx16[_0xdb87[21]](500,_0xcc3bx14[_0xdb87[29]]))})})};exports[_0xdb87[47]]= function(_0xcc3bx11){var _0xcc3bx16=this;return  new Promise(function(_0xcc3bx12,_0xcc3bx13){var _0xcc3bx1a;return db[_0xdb87[44]][_0xdb87[46]]({where:_0xcc3bx11[_0xdb87[34]][_0xdb87[36]]|| {},attributes:[_0xdb87[68],_0xdb87[55],_0xdb87[59],_0xdb87[60]]})[_0xdb87[31]](function(_0xcc3bx1b){if(_0xcc3bx1b){_0xcc3bx1a= _0xcc3bx1b;return db[_0xdb87[69]][_0xdb87[53]]({paused:1},{where:{UserId:_0xcc3bx1a[_0xdb87[68]]},individualHooks:true})}})[_0xdb87[31]](function(){if(_0xcc3bx1a){return db[_0xdb87[65]][_0xdb87[43]]({where:{membername:_0xcc3bx1a[_0xdb87[55]],interface:util[_0xdb87[52]](_0xdb87[56],_0xdb87[57],_0xcc3bx1a[_0xdb87[55]]),type:_0xdb87[58],exitAt:null}})}})[_0xdb87[31]](function(_0xcc3bx1c){if(_0xcc3bx1a){if(_0xcc3bx1c&& _0xcc3bx1c[_0xdb87[66]]){var _0xcc3bx1f=moment()[_0xdb87[52]](_0xdb87[51]);for(var _0xcc3bx17=0,_0xcc3bx20=_0xcc3bx1c[_0xdb87[66]];_0xcc3bx17< _0xcc3bx20;_0xcc3bx17++){_0xcc3bx1c[_0xcc3bx17][_0xdb87[67]]({exitAt:_0xcc3bx1f})}}}})[_0xdb87[31]](function(){if(_0xcc3bx1a){var _0xcc3bx1c=[];var _0xcc3bx1d=utils[_0xdb87[54]]();_0xcc3bx1d[_0xdb87[63]](function(_0xcc3bx1e){_0xcc3bx1c[_0xdb87[62]]({channel:_0xcc3bx1e,membername:_0xcc3bx1a[_0xdb87[55]],interface:util[_0xdb87[52]](_0xdb87[56],_0xdb87[57],_0xcc3bx1a[_0xdb87[55]]),type:_0xdb87[58],enterAt:moment()[_0xdb87[52]](_0xdb87[51]),data1:_0xcc3bx11[_0xdb87[49]][_0xdb87[48]]|| _0xdb87[50],role:_0xcc3bx1a[_0xdb87[59]],internal:_0xcc3bx1a[_0xdb87[60]],uniqueid:_0xcc3bx11[_0xdb87[49]][_0xdb87[61]]|| null})});return db[_0xdb87[65]][_0xdb87[64]](_0xcc3bx1c,{individualHooks:true})}})[_0xdb87[31]](function(){if(_0xcc3bx1a){return _0xcc3bx1a[_0xdb87[53]]({voicePause:true,mailPause:true,chatPause:true,faxPause:true,smsPause:true,openchannelPause:true,pauseType:_0xcc3bx11[_0xdb87[49]][_0xdb87[48]]|| _0xdb87[50],lastPauseAt:moment()[_0xdb87[52]](_0xdb87[51])})}})[_0xdb87[31]](function(_0xcc3bx1b){_0xcc3bx12(_0xcc3bx1b)})[_0xdb87[22]](function(_0xcc3bx14){_0xcc3bx13(_0xcc3bx16[_0xdb87[21]](500,_0xcc3bx14[_0xdb87[29]]))})})};exports[_0xdb87[70]]= function(_0xcc3bx11){var _0xcc3bx16=this;return  new Promise(function(_0xcc3bx12,_0xcc3bx13){var _0xcc3bx1a;return db[_0xdb87[44]][_0xdb87[85]]({where:_0xcc3bx11[_0xdb87[34]][_0xdb87[36]]|| {},attributes:[_0xdb87[68],_0xdb87[55]]})[_0xdb87[31]](function(_0xcc3bx1b){if(_0xcc3bx1b){_0xcc3bx1a= _0xcc3bx1b;if(_0xcc3bx11[_0xdb87[49]][_0xdb87[71]]&&  !utils[_0xdb87[72]](_0xcc3bx11[_0xdb87[49]][_0xdb87[71]])){throw  new Error(_0xdb87[73])};switch(_0xcc3bx11[_0xdb87[49]][_0xdb87[71]]){case _0xdb87[75]:return db[_0xdb87[69]][_0xdb87[53]]({paused:0},{where:{UserId:_0xcc3bx1a[_0xdb87[68]]}})[_0xdb87[31]](function(){return db[_0xdb87[65]][_0xdb87[46]]({where:{channel:_0xcc3bx11[_0xdb87[49]][_0xdb87[71]],membername:_0xcc3bx1a[_0xdb87[55]],interface:util[_0xdb87[52]](_0xdb87[56],_0xdb87[57],_0xcc3bx1a[_0xdb87[55]]),type:_0xdb87[58],exitAt:null}})})[_0xdb87[31]](function(_0xcc3bx21){if(_0xcc3bx21){return _0xcc3bx21[_0xdb87[53]]({exitAt:moment()[_0xdb87[52]](_0xdb87[51]),data2:_0xdb87[74]},{individualHooks:true})};return null})[_0xdb87[31]](function(){return _0xcc3bx1a[_0xdb87[53]]({voicePause:false})});case _0xdb87[76]:;case _0xdb87[77]:;case _0xdb87[78]:;case _0xdb87[79]:;case _0xdb87[83]:return db[_0xdb87[65]][_0xdb87[46]]({where:{channel:_0xcc3bx11[_0xdb87[49]][_0xdb87[71]],membername:_0xcc3bx1a[_0xdb87[55]],interface:util[_0xdb87[52]](_0xdb87[56],_0xdb87[57],_0xcc3bx1a[_0xdb87[55]]),type:_0xdb87[58],exitAt:null}})[_0xdb87[31]](function(_0xcc3bx21){return _0xcc3bx21[_0xdb87[53]]({exitAt:moment()[_0xdb87[52]](_0xdb87[51]),data2:_0xdb87[74]},{individualHooks:true})})[_0xdb87[31]](function(){var _0xcc3bx22={};_[_0xdb87[82]](_0xcc3bx22,util[_0xdb87[52]](_0xdb87[80],_0xcc3bx11[_0xdb87[49]][_0xdb87[71]],_0xdb87[81]),false);return _0xcc3bx1a[_0xdb87[53]](_0xcc3bx22)});default:return db[_0xdb87[69]][_0xdb87[53]]({paused:0},{where:{UserId:_0xcc3bx1a[_0xdb87[68]]}})[_0xdb87[31]](function(){return db[_0xdb87[65]][_0xdb87[43]]({where:{membername:_0xcc3bx1a[_0xdb87[55]],interface:util[_0xdb87[52]](_0xdb87[56],_0xdb87[57],_0xcc3bx1a[_0xdb87[55]]),type:_0xdb87[58],exitAt:null}})})[_0xdb87[31]](function(_0xcc3bx1c){var _0xcc3bx23=[];_0xcc3bx1c[_0xdb87[63]](function(_0xcc3bx21){_0xcc3bx23[_0xdb87[62]](_0xcc3bx21[_0xdb87[53]]({exitAt:moment()[_0xdb87[52]](_0xdb87[51]),data2:_0xdb87[74]}))});return BPromise[_0xdb87[84]](_0xcc3bx23)})[_0xdb87[31]](function(){return _0xcc3bx1a[_0xdb87[53]]({voicePause:false,mailPause:false,chatPause:false,faxPause:false,smsPause:false,openchannelPause:false})})}}})[_0xdb87[31]](function(_0xcc3bx1b){_0xcc3bx12(_0xcc3bx1b)})[_0xdb87[22]](function(_0xcc3bx14){_0xcc3bx13(_0xcc3bx16[_0xdb87[21]](500,_0xcc3bx14[_0xdb87[29]]))})})};exports[_0xdb87[86]]= function(_0xcc3bx11){var _0xcc3bx16=this;return  new Promise(function(_0xcc3bx12,_0xcc3bx13){var _0xcc3bx1a;return db[_0xdb87[44]][_0xdb87[85]]({where:_0xcc3bx11[_0xdb87[34]][_0xdb87[36]]|| {},attributes:[_0xdb87[68],_0xdb87[55]]})[_0xdb87[31]](function(_0xcc3bx1b){if(_0xcc3bx1b){_0xcc3bx1a= _0xcc3bx1b;return db[_0xdb87[69]][_0xdb87[87]]({where:{membername:_0xcc3bx1a[_0xdb87[55]]},individualHooks:true})}})[_0xdb87[31]](function(){if(_0xcc3bx1a){return db[_0xdb87[65]][_0xdb87[43]]({where:{membername:_0xcc3bx1a[_0xdb87[55]],interface:util[_0xdb87[52]](_0xdb87[56],_0xdb87[57],_0xcc3bx1a[_0xdb87[55]]),exitAt:null}})}})[_0xdb87[31]](function(_0xcc3bx1c){if(_0xcc3bx1a){if(_0xcc3bx1c&& _0xcc3bx1c[_0xdb87[66]]){var _0xcc3bx23=[];_0xcc3bx1c[_0xdb87[63]](function(_0xcc3bx21){_0xcc3bx23[_0xdb87[62]](_0xcc3bx21[_0xdb87[53]]({exitAt:moment()[_0xdb87[52]](_0xdb87[51])}))});return BPromise[_0xdb87[84]](_0xcc3bx23)}}})[_0xdb87[31]](function(){if(_0xcc3bx1a){return _0xcc3bx1a[_0xdb87[53]]({online:false,lastLoginAt:null,voicePause:false,mailPause:false,chatPause:false,faxPause:false,smsPause:false,openchannelPause:false})}})[_0xdb87[31]](function(_0xcc3bx1b){_0xcc3bx12(_0xcc3bx1b)})[_0xdb87[22]](function(_0xcc3bx14){_0xcc3bx13(_0xcc3bx16[_0xdb87[21]](500,_0xcc3bx14[_0xdb87[29]]))})})};exports[_0xdb87[88]]= function(_0xcc3bx11){var _0xcc3bx16=this;return  new Promise(function(_0xcc3bx12,_0xcc3bx13){var _0xcc3bx1a;var _0xcc3bx24;var _0xcc3bx25;return db[_0xdb87[44]][_0xdb87[85]]({where:_0xcc3bx11[_0xdb87[34]][_0xdb87[36]]|| {},attributes:[_0xdb87[68],_0xdb87[55],_0xdb87[59],_0xdb87[60],_0xdb87[89]]})[_0xdb87[31]](function(_0xcc3bx1b){if(_0xcc3bx1b){_0xcc3bx1a= _0xcc3bx1b;return db[_0xdb87[44]][_0xdb87[103]]({where:{role:_0xdb87[102],online:true,id:{$ne:_0xcc3bx1a[_0xdb87[68]]}}})}})[_0xdb87[31]](function(_0xcc3bx2b){if(_0xcc3bx2b){_0xcc3bx25= _0xcc3bx2b;return require(_0xdb87[101])[_0xdb87[100]]()}})[_0xdb87[31]](function(_0xcc3bx2a){if(_0xcc3bx2a&& _0xcc3bx2a[_0xdb87[98]]&& _0xcc3bx25>= _0xcc3bx2a[_0xdb87[98]]){throw  new Error(_0xdb87[99])}})[_0xdb87[31]](function(){if(_0xcc3bx1a){return db[_0xdb87[69]][_0xdb87[87]]({where:{membername:_0xcc3bx1a[_0xdb87[55]]},individualHooks:true})}})[_0xdb87[31]](function(){if(_0xcc3bx1a){return _0xcc3bx1a[_0xdb87[97]]({raw:true})}})[_0xdb87[31]](function(_0xcc3bx29){if(_0xcc3bx1a){if(_0xcc3bx29){var _0xcc3bx1c=[];_0xcc3bx24= _0xcc3bx29;if(_0xcc3bx24[_0xdb87[66]]){for(var _0xcc3bx17=0;_0xcc3bx17< _0xcc3bx24[_0xdb87[66]];_0xcc3bx17++){_0xcc3bx1c[_0xdb87[62]](db[_0xdb87[69]][_0xdb87[96]]({membername:_0xcc3bx1a[_0xdb87[55]],UserId:_0xcc3bx1a[_0xdb87[68]],queue_name:_0xcc3bx24[_0xcc3bx17][_0xdb87[55]],VoiceQueueId:_0xcc3bx24[_0xcc3bx17][_0xdb87[68]],interface:_0xcc3bx11[_0xdb87[49]][_0xdb87[94]]|| util[_0xdb87[52]](_0xdb87[56],_0xdb87[57],_0xcc3bx1a[_0xdb87[55]]),paused:_0xcc3bx1a[_0xdb87[89]]|| false,penalty:_0xcc3bx24[_0xcc3bx17][_0xdb87[95]]|| 0}))};return BPromise[_0xdb87[84]](_0xcc3bx1c)}}}})[_0xdb87[31]](function(){if(_0xcc3bx1a){return db[_0xdb87[65]][_0xdb87[43]]({where:{membername:_0xcc3bx1a[_0xdb87[55]],interface:util[_0xdb87[52]](_0xdb87[56],_0xdb87[57],_0xcc3bx1a[_0xdb87[55]]),exitAt:null}})}})[_0xdb87[31]](function(_0xcc3bx1c){if(_0xcc3bx1a){if(_0xcc3bx1c&& _0xcc3bx1c[_0xdb87[66]]){var _0xcc3bx23=[];_0xcc3bx1c[_0xdb87[63]](function(_0xcc3bx21){_0xcc3bx23[_0xdb87[62]](_0xcc3bx21[_0xdb87[53]]({exitAt:moment()[_0xdb87[52]](_0xdb87[51])}))});return BPromise[_0xdb87[84]](_0xcc3bx23)}}})[_0xdb87[31]](function(_0xcc3bx1c){if(_0xcc3bx1a){var _0xcc3bx26=[];var _0xcc3bx27=[];var _0xcc3bx1d=utils[_0xdb87[54]]();var _0xcc3bx28={membername:_0xcc3bx1a[_0xdb87[55]],interface:util[_0xdb87[52]](_0xdb87[56],_0xdb87[57],_0xcc3bx1a[_0xdb87[55]]),enterAt:moment()[_0xdb87[52]](_0xdb87[51]),role:_0xcc3bx1a[_0xdb87[59]],internal:_0xcc3bx1a[_0xdb87[60]]};_0xcc3bx1d[_0xdb87[63]](function(_0xcc3bx1e){_0xcc3bx26[_0xdb87[62]](_[_0xdb87[92]]({channel:_0xcc3bx1e,type:_0xdb87[91]},_0xcc3bx28));if(_0xcc3bx1a[_0xdb87[89]]){_0xcc3bx27[_0xdb87[62]](_[_0xdb87[92]]({channel:_0xcc3bx1e,type:_0xdb87[58],data1:_0xdb87[90]},_0xcc3bx28))}});return db[_0xdb87[65]][_0xdb87[64]](_0xcc3bx26[_0xdb87[93]](_0xcc3bx27),{individualHooks:true})}})[_0xdb87[31]](function(){if(_0xcc3bx1a){return _0xcc3bx1a[_0xdb87[53]]({online:true,lastLoginAt:moment()[_0xdb87[52]](_0xdb87[51]),voicePause:_0xcc3bx1a[_0xdb87[89]]|| false,mailPause:_0xcc3bx1a[_0xdb87[89]]|| false,chatPause:_0xcc3bx1a[_0xdb87[89]]|| false,faxPause:_0xcc3bx1a[_0xdb87[89]]|| false,smsPause:_0xcc3bx1a[_0xdb87[89]]|| false,openchannelPause:_0xcc3bx1a[_0xdb87[89]]|| false,pauseType:_0xcc3bx1a[_0xdb87[89]]?_0xdb87[90]:null,lastPauseAt:moment()[_0xdb87[52]](_0xdb87[51])})}})[_0xdb87[31]](function(_0xcc3bx1b){_0xcc3bx12(_0xcc3bx1b)})[_0xdb87[22]](function(_0xcc3bx14){_0xcc3bx13(_0xcc3bx16[_0xdb87[21]](500,_0xcc3bx14[_0xdb87[29]]))})})}
\ No newline at end of file
+var _0x887b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x75\x73\x65\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x55\x73\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x55\x73\x65\x72\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x55\x73\x65\x72","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x55\x73\x65\x72","\x53\x68\x6F\x77\x55\x73\x65\x72","\x66\x69\x6E\x64","\x50\x61\x75\x73\x65\x55\x73\x65\x72","\x74\x79\x70\x65","\x62\x6F\x64\x79","\x44\x45\x46\x41\x55\x4C\x54\x20\x50\x41\x55\x53\x45","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x75\x70\x64\x61\x74\x65","\x67\x65\x74\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x6E\x61\x6D\x65","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x50\x41\x55\x53\x45","\x72\x6F\x6C\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x6C\x65\x6E\x67\x74\x68","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x69\x64","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74","\x55\x6E\x70\x61\x75\x73\x65\x55\x73\x65\x72","\x63\x68\x61\x6E\x6E\x65\x6C","\x69\x73\x56\x61\x6C\x69\x64\x43\x68\x61\x6E\x6E\x65\x6C","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x63\x68\x61\x6E\x6E\x65\x6C","\x73\x79\x73\x74\x65\x6D","\x76\x6F\x69\x63\x65","\x6D\x61\x69\x6C","\x63\x68\x61\x74","\x66\x61\x78","\x73\x6D\x73","\x25\x73\x25\x73","\x50\x61\x75\x73\x65","\x73\x65\x74","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x6C\x6C","\x66\x69\x6E\x64\x4F\x6E\x65","\x4C\x6F\x67\x6F\x75\x74\x55\x73\x65\x72","\x64\x65\x73\x74\x72\x6F\x79","\x4C\x6F\x67\x69\x6E\x55\x73\x65\x72","\x6C\x6F\x67\x69\x6E\x49\x6E\x50\x61\x75\x73\x65","\x4C\x4F\x47\x49\x4E\x49\x4E\x50\x41\x55\x53\x45","\x4C\x4F\x47\x49\x4E","\x6D\x65\x72\x67\x65","\x63\x6F\x6E\x63\x61\x74","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x75\x70\x73\x65\x72\x74","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74\x73","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x6C\x6F\x67\x69\x6E\x20\x68\x61\x73\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64","\x67\x65\x74\x4C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x75\x74\x69\x6C","\x61\x67\x65\x6E\x74","\x63\x6F\x75\x6E\x74"];_0x887b[0];var _=require(_0x887b[1]);var util=require(_0x887b[2]);var moment=require(_0x887b[3]);var BPromise=require(_0x887b[4]);var rs=require(_0x887b[5]);var fs=require(_0x887b[6]);var db=require(_0x887b[8])[_0x887b[7]];var utils=require(_0x887b[9]);var logger=require(_0x887b[11])(_0x887b[10]);var config=require(_0x887b[12]);var jayson=require(_0x887b[13]);var client=jayson[_0x887b[15]][_0x887b[14]]({port:9002});var socket=require(_0x887b[17])({host:_0x887b[16],port:6379});require(_0x887b[19])[_0x887b[18]](socket);function respondWithRpcPromise(_0xf102xf,_0xf102x10,_0xf102x11){return  new BPromise(function(_0xf102x12,_0xf102x13){return client[_0x887b[32]](_0xf102xf,_0xf102x11)[_0x887b[31]](function(_0xf102x15){logger[_0x887b[24]](_0x887b[20],_0xf102x10,_0x887b[23]);logger[_0x887b[27]](_0x887b[25],_0xf102x10,_0x887b[23],JSON[_0x887b[26]](_0xf102x15));if(_0xf102x15[_0x887b[21]]){if(_0xf102x15[_0x887b[21]][_0x887b[28]]=== 500){logger[_0x887b[21]](_0x887b[20],_0xf102x10,_0xf102x15[_0x887b[21]][_0x887b[29]]);return _0xf102x13(_0xf102x15[_0x887b[21]][_0x887b[29]])};logger[_0x887b[21]](_0x887b[20],_0xf102x10,_0xf102x15[_0x887b[21]][_0x887b[29]]);return _0xf102x12(_0xf102x15[_0x887b[21]][_0x887b[29]])}else {logger[_0x887b[24]](_0x887b[20],_0xf102x10,_0x887b[23]);_0xf102x12(_0xf102x15[_0x887b[30]][_0x887b[29]])}})[_0x887b[22]](function(_0xf102x14){logger[_0x887b[21]](_0x887b[20],_0xf102x10,_0xf102x14);_0xf102x13(_0xf102x14)})})}exports[_0x887b[33]]= function(_0xf102x11){var _0xf102x16=this;return  new Promise(function(_0xf102x12,_0xf102x13){return db[_0x887b[44]][_0x887b[43]]({raw:_0xf102x11[_0x887b[34]]?(_0xf102x11[_0x887b[34]][_0x887b[35]]=== undefined)?true:false:true,where:_0xf102x11[_0x887b[34]]?_0xf102x11[_0x887b[34]][_0x887b[36]]|| null:null,attributes:_0xf102x11[_0x887b[34]]?_0xf102x11[_0x887b[34]][_0x887b[37]]|| null:null,limit:_0xf102x11[_0x887b[34]]?_0xf102x11[_0x887b[34]][_0x887b[38]]|| null:null,include:_0xf102x11[_0x887b[34]]?(_0xf102x11[_0x887b[34]][_0x887b[39]]?_[_0x887b[42]](_0xf102x11[_0x887b[34]][_0x887b[39]],function(_0xf102x17){return {model:db[_0xf102x17[_0x887b[40]]],as:_0xf102x17[_0x887b[41]],attributes:_0xf102x17[_0x887b[37]],include:_0xf102x17[_0x887b[39]]?_[_0x887b[42]](_0xf102x17[_0x887b[39]],function(_0xf102x18){return {model:db[_0xf102x18[_0x887b[40]]],as:_0xf102x18[_0x887b[41]],attributes:_0xf102x18[_0x887b[37]],include:_0xf102x18[_0x887b[39]]?_[_0x887b[42]](_0xf102x18[_0x887b[39]],function(_0xf102x19){return {model:db[_0xf102x19[_0x887b[40]]],as:_0xf102x19[_0x887b[41]],attributes:_0xf102x19[_0x887b[37]]}}):[]}}):[]}}):[]):[]})[_0x887b[31]](function(_0xf102x15){logger[_0x887b[24]](_0x887b[33],_0xf102x11);logger[_0x887b[27]](_0x887b[33],_0xf102x11,JSON[_0x887b[26]](_0xf102x15));_0xf102x12(_0xf102x15)})[_0x887b[22]](function(_0xf102x14){logger[_0x887b[21]](_0x887b[33],_0xf102x14[_0x887b[29]],_0xf102x11);_0xf102x13(_0xf102x16[_0x887b[21]](500,_0xf102x14[_0x887b[29]]))})})};exports[_0x887b[45]]= function(_0xf102x11){var _0xf102x16=this;return  new Promise(function(_0xf102x12,_0xf102x13){return db[_0x887b[44]][_0x887b[46]]({raw:_0xf102x11[_0x887b[34]]?(_0xf102x11[_0x887b[34]][_0x887b[35]]=== undefined)?true:false:true,where:_0xf102x11[_0x887b[34]]?_0xf102x11[_0x887b[34]][_0x887b[36]]|| null:null,attributes:_0xf102x11[_0x887b[34]]?_0xf102x11[_0x887b[34]][_0x887b[37]]|| null:null,include:_0xf102x11[_0x887b[34]]?(_0xf102x11[_0x887b[34]][_0x887b[39]]?_[_0x887b[42]](_0xf102x11[_0x887b[34]][_0x887b[39]],function(_0xf102x17){return {model:db[_0xf102x17[_0x887b[40]]],as:_0xf102x17[_0x887b[41]],attributes:_0xf102x17[_0x887b[37]],include:_0xf102x17[_0x887b[39]]?_[_0x887b[42]](_0xf102x17[_0x887b[39]],function(_0xf102x18){return {model:db[_0xf102x18[_0x887b[40]]],as:_0xf102x18[_0x887b[41]],attributes:_0xf102x18[_0x887b[37]],include:_0xf102x18[_0x887b[39]]?_[_0x887b[42]](_0xf102x18[_0x887b[39]],function(_0xf102x19){return {model:db[_0xf102x19[_0x887b[40]]],as:_0xf102x19[_0x887b[41]],attributes:_0xf102x19[_0x887b[37]]}}):[]}}):[]}}):[]):[]})[_0x887b[31]](function(_0xf102x15){logger[_0x887b[24]](_0x887b[45],_0xf102x11);logger[_0x887b[27]](_0x887b[45],_0xf102x11,JSON[_0x887b[26]](_0xf102x15));_0xf102x12(_0xf102x15)})[_0x887b[22]](function(_0xf102x14){logger[_0x887b[21]](_0x887b[45],_0xf102x14[_0x887b[29]],_0xf102x11);_0xf102x13(_0xf102x16[_0x887b[21]](500,_0xf102x14[_0x887b[29]]))})})};exports[_0x887b[47]]= function(_0xf102x11){var _0xf102x16=this;return  new Promise(function(_0xf102x12,_0xf102x13){var _0xf102x1a;return db[_0x887b[44]][_0x887b[46]]({where:_0xf102x11[_0x887b[34]][_0x887b[36]]|| {},attributes:[_0x887b[68],_0x887b[55],_0x887b[59],_0x887b[60]]})[_0x887b[31]](function(_0xf102x1b){if(_0xf102x1b){_0xf102x1a= _0xf102x1b;return db[_0x887b[69]][_0x887b[53]]({paused:1},{where:{UserId:_0xf102x1a[_0x887b[68]]},individualHooks:true})}})[_0x887b[31]](function(){if(_0xf102x1a){return db[_0x887b[65]][_0x887b[43]]({where:{membername:_0xf102x1a[_0x887b[55]],interface:util[_0x887b[52]](_0x887b[56],_0x887b[57],_0xf102x1a[_0x887b[55]]),type:_0x887b[58],exitAt:null}})}})[_0x887b[31]](function(_0xf102x1c){if(_0xf102x1a){if(_0xf102x1c&& _0xf102x1c[_0x887b[66]]){var _0xf102x1f=moment()[_0x887b[52]](_0x887b[51]);for(var _0xf102x17=0,_0xf102x20=_0xf102x1c[_0x887b[66]];_0xf102x17< _0xf102x20;_0xf102x17++){_0xf102x1c[_0xf102x17][_0x887b[67]]({exitAt:_0xf102x1f})}}}})[_0x887b[31]](function(){if(_0xf102x1a){var _0xf102x1c=[];var _0xf102x1d=utils[_0x887b[54]]();_0xf102x1d[_0x887b[63]](function(_0xf102x1e){_0xf102x1c[_0x887b[62]]({channel:_0xf102x1e,membername:_0xf102x1a[_0x887b[55]],interface:util[_0x887b[52]](_0x887b[56],_0x887b[57],_0xf102x1a[_0x887b[55]]),type:_0x887b[58],enterAt:moment()[_0x887b[52]](_0x887b[51]),data1:_0xf102x11[_0x887b[49]][_0x887b[48]]|| _0x887b[50],role:_0xf102x1a[_0x887b[59]],internal:_0xf102x1a[_0x887b[60]],uniqueid:_0xf102x11[_0x887b[49]][_0x887b[61]]|| null})});return db[_0x887b[65]][_0x887b[64]](_0xf102x1c,{individualHooks:true})}})[_0x887b[31]](function(){if(_0xf102x1a){return _0xf102x1a[_0x887b[53]]({voicePause:true,mailPause:true,chatPause:true,faxPause:true,smsPause:true,openchannelPause:true,pauseType:_0xf102x11[_0x887b[49]][_0x887b[48]]|| _0x887b[50],lastPauseAt:moment()[_0x887b[52]](_0x887b[51])})}})[_0x887b[31]](function(_0xf102x1b){_0xf102x12(_0xf102x1b)})[_0x887b[22]](function(_0xf102x14){_0xf102x13(_0xf102x16[_0x887b[21]](500,_0xf102x14[_0x887b[29]]))})})};exports[_0x887b[70]]= function(_0xf102x11){var _0xf102x16=this;return  new Promise(function(_0xf102x12,_0xf102x13){var _0xf102x1a;return db[_0x887b[44]][_0x887b[85]]({where:_0xf102x11[_0x887b[34]][_0x887b[36]]|| {},attributes:[_0x887b[68],_0x887b[55]]})[_0x887b[31]](function(_0xf102x1b){if(_0xf102x1b){_0xf102x1a= _0xf102x1b;if(_0xf102x11[_0x887b[49]][_0x887b[71]]&&  !utils[_0x887b[72]](_0xf102x11[_0x887b[49]][_0x887b[71]])){throw  new Error(_0x887b[73])};switch(_0xf102x11[_0x887b[49]][_0x887b[71]]){case _0x887b[75]:return db[_0x887b[69]][_0x887b[53]]({paused:0},{where:{UserId:_0xf102x1a[_0x887b[68]]}})[_0x887b[31]](function(){return db[_0x887b[65]][_0x887b[46]]({where:{channel:_0xf102x11[_0x887b[49]][_0x887b[71]],membername:_0xf102x1a[_0x887b[55]],interface:util[_0x887b[52]](_0x887b[56],_0x887b[57],_0xf102x1a[_0x887b[55]]),type:_0x887b[58],exitAt:null}})})[_0x887b[31]](function(_0xf102x21){if(_0xf102x21){return _0xf102x21[_0x887b[53]]({exitAt:moment()[_0x887b[52]](_0x887b[51]),data2:_0x887b[74]},{individualHooks:true})};return null})[_0x887b[31]](function(){return _0xf102x1a[_0x887b[53]]({voicePause:false})});case _0x887b[76]:;case _0x887b[77]:;case _0x887b[78]:;case _0x887b[79]:;case _0x887b[83]:return db[_0x887b[65]][_0x887b[46]]({where:{channel:_0xf102x11[_0x887b[49]][_0x887b[71]],membername:_0xf102x1a[_0x887b[55]],interface:util[_0x887b[52]](_0x887b[56],_0x887b[57],_0xf102x1a[_0x887b[55]]),type:_0x887b[58],exitAt:null}})[_0x887b[31]](function(_0xf102x21){return _0xf102x21[_0x887b[53]]({exitAt:moment()[_0x887b[52]](_0x887b[51]),data2:_0x887b[74]},{individualHooks:true})})[_0x887b[31]](function(){var _0xf102x22={};_[_0x887b[82]](_0xf102x22,util[_0x887b[52]](_0x887b[80],_0xf102x11[_0x887b[49]][_0x887b[71]],_0x887b[81]),false);return _0xf102x1a[_0x887b[53]](_0xf102x22)});default:return db[_0x887b[69]][_0x887b[53]]({paused:0},{where:{UserId:_0xf102x1a[_0x887b[68]]}})[_0x887b[31]](function(){return db[_0x887b[65]][_0x887b[43]]({where:{membername:_0xf102x1a[_0x887b[55]],interface:util[_0x887b[52]](_0x887b[56],_0x887b[57],_0xf102x1a[_0x887b[55]]),type:_0x887b[58],exitAt:null}})})[_0x887b[31]](function(_0xf102x1c){var _0xf102x23=[];_0xf102x1c[_0x887b[63]](function(_0xf102x21){_0xf102x23[_0x887b[62]](_0xf102x21[_0x887b[53]]({exitAt:moment()[_0x887b[52]](_0x887b[51]),data2:_0x887b[74]}))});return BPromise[_0x887b[84]](_0xf102x23)})[_0x887b[31]](function(){return _0xf102x1a[_0x887b[53]]({voicePause:false,mailPause:false,chatPause:false,faxPause:false,smsPause:false,openchannelPause:false})})}}})[_0x887b[31]](function(_0xf102x1b){_0xf102x12(_0xf102x1b)})[_0x887b[22]](function(_0xf102x14){_0xf102x13(_0xf102x16[_0x887b[21]](500,_0xf102x14[_0x887b[29]]))})})};exports[_0x887b[86]]= function(_0xf102x11){var _0xf102x16=this;return  new Promise(function(_0xf102x12,_0xf102x13){var _0xf102x1a;return db[_0x887b[44]][_0x887b[85]]({where:_0xf102x11[_0x887b[34]][_0x887b[36]]|| {},attributes:[_0x887b[68],_0x887b[55]]})[_0x887b[31]](function(_0xf102x1b){if(_0xf102x1b){_0xf102x1a= _0xf102x1b;return db[_0x887b[69]][_0x887b[87]]({where:{membername:_0xf102x1a[_0x887b[55]]},individualHooks:true})}})[_0x887b[31]](function(){if(_0xf102x1a){return db[_0x887b[65]][_0x887b[43]]({where:{membername:_0xf102x1a[_0x887b[55]],interface:util[_0x887b[52]](_0x887b[56],_0x887b[57],_0xf102x1a[_0x887b[55]]),exitAt:null}})}})[_0x887b[31]](function(_0xf102x1c){if(_0xf102x1a){if(_0xf102x1c&& _0xf102x1c[_0x887b[66]]){var _0xf102x23=[];_0xf102x1c[_0x887b[63]](function(_0xf102x21){_0xf102x23[_0x887b[62]](_0xf102x21[_0x887b[53]]({exitAt:moment()[_0x887b[52]](_0x887b[51])}))});return BPromise[_0x887b[84]](_0xf102x23)}}})[_0x887b[31]](function(){if(_0xf102x1a){return _0xf102x1a[_0x887b[53]]({online:false,lastLoginAt:null,voicePause:false,mailPause:false,chatPause:false,faxPause:false,smsPause:false,openchannelPause:false})}})[_0x887b[31]](function(_0xf102x1b){_0xf102x12(_0xf102x1b)})[_0x887b[22]](function(_0xf102x14){_0xf102x13(_0xf102x16[_0x887b[21]](500,_0xf102x14[_0x887b[29]]))})})};exports[_0x887b[88]]= function(_0xf102x11){var _0xf102x16=this;return  new Promise(function(_0xf102x12,_0xf102x13){var _0xf102x1a;var _0xf102x24;var _0xf102x25;return db[_0x887b[44]][_0x887b[85]]({where:_0xf102x11[_0x887b[34]][_0x887b[36]]|| {},attributes:[_0x887b[68],_0x887b[55],_0x887b[59],_0x887b[60],_0x887b[89]]})[_0x887b[31]](function(_0xf102x1b){if(_0xf102x1b){_0xf102x1a= _0xf102x1b;return db[_0x887b[44]][_0x887b[103]]({where:{role:_0x887b[102],online:true,id:{$ne:_0xf102x1a[_0x887b[68]]}}})}})[_0x887b[31]](function(_0xf102x2b){if(_0xf102x2b){_0xf102x25= _0xf102x2b;return require(_0x887b[101])[_0x887b[100]]()}})[_0x887b[31]](function(_0xf102x2a){if(_0xf102x2a&& _0xf102x2a[_0x887b[98]]&& _0xf102x25>= _0xf102x2a[_0x887b[98]]){throw  new Error(_0x887b[99])}})[_0x887b[31]](function(){if(_0xf102x1a){return db[_0x887b[69]][_0x887b[87]]({where:{membername:_0xf102x1a[_0x887b[55]]},individualHooks:true})}})[_0x887b[31]](function(){if(_0xf102x1a){return _0xf102x1a[_0x887b[97]]({raw:true})}})[_0x887b[31]](function(_0xf102x29){if(_0xf102x1a){if(_0xf102x29){var _0xf102x1c=[];_0xf102x24= _0xf102x29;if(_0xf102x24[_0x887b[66]]){for(var _0xf102x17=0;_0xf102x17< _0xf102x24[_0x887b[66]];_0xf102x17++){_0xf102x1c[_0x887b[62]](db[_0x887b[69]][_0x887b[96]]({membername:_0xf102x1a[_0x887b[55]],UserId:_0xf102x1a[_0x887b[68]],queue_name:_0xf102x24[_0xf102x17][_0x887b[55]],VoiceQueueId:_0xf102x24[_0xf102x17][_0x887b[68]],interface:_0xf102x11[_0x887b[49]][_0x887b[94]]|| util[_0x887b[52]](_0x887b[56],_0x887b[57],_0xf102x1a[_0x887b[55]]),paused:_0xf102x1a[_0x887b[89]]|| false,penalty:_0xf102x24[_0xf102x17][_0x887b[95]]|| 0}))};return BPromise[_0x887b[84]](_0xf102x1c)}}}})[_0x887b[31]](function(){if(_0xf102x1a){return db[_0x887b[65]][_0x887b[43]]({where:{membername:_0xf102x1a[_0x887b[55]],interface:util[_0x887b[52]](_0x887b[56],_0x887b[57],_0xf102x1a[_0x887b[55]]),exitAt:null}})}})[_0x887b[31]](function(_0xf102x1c){if(_0xf102x1a){if(_0xf102x1c&& _0xf102x1c[_0x887b[66]]){var _0xf102x23=[];_0xf102x1c[_0x887b[63]](function(_0xf102x21){_0xf102x23[_0x887b[62]](_0xf102x21[_0x887b[53]]({exitAt:moment()[_0x887b[52]](_0x887b[51])}))});return BPromise[_0x887b[84]](_0xf102x23)}}})[_0x887b[31]](function(_0xf102x1c){if(_0xf102x1a){var _0xf102x26=[];var _0xf102x27=[];var _0xf102x1d=utils[_0x887b[54]]();var _0xf102x28={membername:_0xf102x1a[_0x887b[55]],interface:util[_0x887b[52]](_0x887b[56],_0x887b[57],_0xf102x1a[_0x887b[55]]),enterAt:moment()[_0x887b[52]](_0x887b[51]),role:_0xf102x1a[_0x887b[59]],internal:_0xf102x1a[_0x887b[60]]};_0xf102x1d[_0x887b[63]](function(_0xf102x1e){_0xf102x26[_0x887b[62]](_[_0x887b[92]]({channel:_0xf102x1e,type:_0x887b[91]},_0xf102x28));if(_0xf102x1a[_0x887b[89]]){_0xf102x27[_0x887b[62]](_[_0x887b[92]]({channel:_0xf102x1e,type:_0x887b[58],data1:_0x887b[90]},_0xf102x28))}});return db[_0x887b[65]][_0x887b[64]](_0xf102x26[_0x887b[93]](_0xf102x27),{individualHooks:true})}})[_0x887b[31]](function(){if(_0xf102x1a){return _0xf102x1a[_0x887b[53]]({online:true,lastLoginAt:moment()[_0x887b[52]](_0x887b[51]),voicePause:_0xf102x1a[_0x887b[89]]|| false,mailPause:_0xf102x1a[_0x887b[89]]|| false,chatPause:_0xf102x1a[_0x887b[89]]|| false,faxPause:_0xf102x1a[_0x887b[89]]|| false,smsPause:_0xf102x1a[_0x887b[89]]|| false,openchannelPause:_0xf102x1a[_0x887b[89]]|| false,pauseType:_0xf102x1a[_0x887b[89]]?_0x887b[90]:null,lastPauseAt:moment()[_0x887b[52]](_0x887b[51])})}})[_0x887b[31]](function(_0xf102x1b){_0xf102x12(_0xf102x1b)})[_0x887b[22]](function(_0xf102x14){_0xf102x13(_0xf102x16[_0x887b[21]](500,_0xf102x14[_0x887b[29]]))})})}
\ No newline at end of file
index 3094639..8857ced 100644 (file)
@@ -1 +1 @@
-var _0x357f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x3A","\x6F\x6E"];_0x357f[0];var UserEvents=require(_0x357f[1]);var events=[_0x357f[2],_0x357f[3],_0x357f[4]];function createListener(_0xf0dex4,_0xf0dex5){return function(_0xf0dex6){_0xf0dex5[_0x357f[5]](_0xf0dex4,_0xf0dex6)}}function removeListener(_0xf0dex4,_0xf0dex8){return function(){UserEvents[_0x357f[6]](_0xf0dex4,_0xf0dex8)}}exports[_0x357f[7]]= function(_0xf0dex5){for(var _0xf0dex9=0,_0xf0dexa=events[_0x357f[8]];_0xf0dex9< _0xf0dexa;_0xf0dex9++){var _0xf0dex4=events[_0xf0dex9];var _0xf0dex8=createListener(_0x357f[9]+ _0xf0dex4,_0xf0dex5);UserEvents[_0x357f[10]](_0xf0dex4,_0xf0dex8)}}
\ No newline at end of file
+var _0x585f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x3A","\x6F\x6E"];_0x585f[0];var UserEvents=require(_0x585f[1]);var events=[_0x585f[2],_0x585f[3],_0x585f[4]];function createListener(_0xd490x4,_0xd490x5){return function(_0xd490x6){_0xd490x5[_0x585f[5]](_0xd490x4,_0xd490x6)}}function removeListener(_0xd490x4,_0xd490x8){return function(){UserEvents[_0x585f[6]](_0xd490x4,_0xd490x8)}}exports[_0x585f[7]]= function(_0xd490x5){for(var _0xd490x9=0,_0xd490xa=events[_0x585f[8]];_0xd490x9< _0xd490xa;_0xd490x9++){var _0xd490x4=events[_0xd490x9];var _0xd490x8=createListener(_0x585f[9]+ _0xd490x4,_0xd490x5);UserEvents[_0x585f[10]](_0xd490x4,_0xd490x8)}}
\ No newline at end of file
index 14935f0..711aa0c 100644 (file)
@@ -1 +1 @@
-var _0x6582=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x6582[0];var multer=require(_0x6582[1]);var util=require(_0x6582[2]);var path=require(_0x6582[3]);var express=require(_0x6582[4]);var router=express.Router();var auth=require(_0x6582[5]);var interaction=require(_0x6582[6]);var config=require(_0x6582[7]);module[_0x6582[8]]= router
\ No newline at end of file
+var _0x3590=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x3590[0];var multer=require(_0x3590[1]);var util=require(_0x3590[2]);var path=require(_0x3590[3]);var express=require(_0x3590[4]);var router=express.Router();var auth=require(_0x3590[5]);var interaction=require(_0x3590[6]);var config=require(_0x3590[7]);module[_0x3590[8]]= router
\ No newline at end of file
index 7a1f76d..af7a04b 100644 (file)
@@ -1 +1 @@
-var _0xfbb5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52"];_0xfbb5[0];var Sequelize=require(_0xfbb5[1]);module[_0xfbb5[2]]= {penalty:{type:Sequelize[_0xfbb5[3]],defaultValue:0}}
\ No newline at end of file
+var _0xa1bb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52"];_0xa1bb[0];var Sequelize=require(_0xa1bb[1]);module[_0xa1bb[2]]= {penalty:{type:Sequelize[_0xa1bb[3]],defaultValue:0}}
\ No newline at end of file
index 3bd75e5..c6f47ee 100644 (file)
@@ -1 +1 @@
-var _0xc243=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x75\x73\x65\x72\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0xc243[0];var _=require(_0xc243[1]);var util=require(_0xc243[2]);var logger=require(_0xc243[4])(_0xc243[3]);var moment=require(_0xc243[5]);var BPromise=require(_0xc243[6]);var rp=require(_0xc243[7]);var attributes=require(_0xc243[8]);module[_0xc243[9]]= function(_0xdd45x8,_0xdd45x9){return _0xdd45x8[_0xc243[12]](_0xc243[10],attributes,{tableName:_0xc243[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xff48=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x75\x73\x65\x72\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0xff48[0];var _=require(_0xff48[1]);var util=require(_0xff48[2]);var logger=require(_0xff48[4])(_0xff48[3]);var moment=require(_0xff48[5]);var BPromise=require(_0xff48[6]);var rp=require(_0xff48[7]);var attributes=require(_0xff48[8]);module[_0xff48[9]]= function(_0x9116x8,_0x9116x9){return _0x9116x8[_0xff48[12]](_0xff48[10],attributes,{tableName:_0xff48[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 9a86b45..4a1bb78 100644 (file)
@@ -1 +1 @@
-var _0x9875=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x55\x73\x65\x72\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x55\x73\x65\x72\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x9875[0];var _=require(_0x9875[1]);var util=require(_0x9875[2]);var moment=require(_0x9875[3]);var BPromise=require(_0x9875[4]);var rs=require(_0x9875[5]);var fs=require(_0x9875[6]);var db=require(_0x9875[8])[_0x9875[7]];var utils=require(_0x9875[9]);var logger=require(_0x9875[11])(_0x9875[10]);var config=require(_0x9875[12]);var jayson=require(_0x9875[13]);var client=jayson[_0x9875[15]][_0x9875[14]]({port:9002});function respondWithRpcPromise(_0xd76dxe,_0xd76dxf,_0xd76dx10){return  new BPromise(function(_0xd76dx11,_0xd76dx12){return client[_0x9875[28]](_0xd76dxe,_0xd76dx10)[_0x9875[27]](function(_0xd76dx14){logger[_0x9875[20]](_0x9875[16],_0xd76dxf,_0x9875[19]);logger[_0x9875[23]](_0x9875[21],_0xd76dxf,_0x9875[19],JSON[_0x9875[22]](_0xd76dx14));if(_0xd76dx14[_0x9875[17]]){if(_0xd76dx14[_0x9875[17]][_0x9875[24]]=== 500){logger[_0x9875[17]](_0x9875[16],_0xd76dxf,_0xd76dx14[_0x9875[17]][_0x9875[25]]);return _0xd76dx12(_0xd76dx14[_0x9875[17]][_0x9875[25]])};logger[_0x9875[17]](_0x9875[16],_0xd76dxf,_0xd76dx14[_0x9875[17]][_0x9875[25]]);return _0xd76dx11(_0xd76dx14[_0x9875[17]][_0x9875[25]])}else {logger[_0x9875[20]](_0x9875[16],_0xd76dxf,_0x9875[19]);_0xd76dx11(_0xd76dx14[_0x9875[26]][_0x9875[25]])}})[_0x9875[18]](function(_0xd76dx13){logger[_0x9875[17]](_0x9875[16],_0xd76dxf,_0xd76dx13);_0xd76dx12(_0xd76dx13)})})}
\ No newline at end of file
+var _0x3aef=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x55\x73\x65\x72\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x55\x73\x65\x72\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x3aef[0];var _=require(_0x3aef[1]);var util=require(_0x3aef[2]);var moment=require(_0x3aef[3]);var BPromise=require(_0x3aef[4]);var rs=require(_0x3aef[5]);var fs=require(_0x3aef[6]);var db=require(_0x3aef[8])[_0x3aef[7]];var utils=require(_0x3aef[9]);var logger=require(_0x3aef[11])(_0x3aef[10]);var config=require(_0x3aef[12]);var jayson=require(_0x3aef[13]);var client=jayson[_0x3aef[15]][_0x3aef[14]]({port:9002});function respondWithRpcPromise(_0xb0fdxe,_0xb0fdxf,_0xb0fdx10){return  new BPromise(function(_0xb0fdx11,_0xb0fdx12){return client[_0x3aef[28]](_0xb0fdxe,_0xb0fdx10)[_0x3aef[27]](function(_0xb0fdx14){logger[_0x3aef[20]](_0x3aef[16],_0xb0fdxf,_0x3aef[19]);logger[_0x3aef[23]](_0x3aef[21],_0xb0fdxf,_0x3aef[19],JSON[_0x3aef[22]](_0xb0fdx14));if(_0xb0fdx14[_0x3aef[17]]){if(_0xb0fdx14[_0x3aef[17]][_0x3aef[24]]=== 500){logger[_0x3aef[17]](_0x3aef[16],_0xb0fdxf,_0xb0fdx14[_0x3aef[17]][_0x3aef[25]]);return _0xb0fdx12(_0xb0fdx14[_0x3aef[17]][_0x3aef[25]])};logger[_0x3aef[17]](_0x3aef[16],_0xb0fdxf,_0xb0fdx14[_0x3aef[17]][_0x3aef[25]]);return _0xb0fdx11(_0xb0fdx14[_0x3aef[17]][_0x3aef[25]])}else {logger[_0x3aef[20]](_0x3aef[16],_0xb0fdxf,_0x3aef[19]);_0xb0fdx11(_0xb0fdx14[_0x3aef[26]][_0x3aef[25]])}})[_0x3aef[18]](function(_0xb0fdx13){logger[_0x3aef[17]](_0x3aef[16],_0xb0fdxf,_0xb0fdx13);_0xb0fdx12(_0xb0fdx13)})})}
\ No newline at end of file
index 545ce62..7952947 100644 (file)
@@ -1 +1 @@
-var _0xbb59=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xbb59[0];var multer=require(_0xbb59[1]);var util=require(_0xbb59[2]);var path=require(_0xbb59[3]);var express=require(_0xbb59[4]);var router=express.Router();var auth=require(_0xbb59[5]);var interaction=require(_0xbb59[6]);var config=require(_0xbb59[7]);module[_0xbb59[8]]= router
\ No newline at end of file
+var _0x82d8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x82d8[0];var multer=require(_0x82d8[1]);var util=require(_0x82d8[2]);var path=require(_0x82d8[3]);var express=require(_0x82d8[4]);var router=express.Router();var auth=require(_0x82d8[5]);var interaction=require(_0x82d8[6]);var config=require(_0x82d8[7]);module[_0x82d8[8]]= router
\ No newline at end of file
index ce4524b..ffee9fc 100644 (file)
@@ -1 +1 @@
-var _0x2a62=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47"];_0x2a62[0];var Sequelize=require(_0x2a62[1]);module[_0x2a62[2]]= {penalty:{type:Sequelize[_0x2a62[3]],defaultValue:0},assigned:{type:Sequelize[_0x2a62[3]],defaultValue:0},queue:{type:Sequelize[_0x2a62[4]]}}
\ No newline at end of file
+var _0x4ba0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47"];_0x4ba0[0];var Sequelize=require(_0x4ba0[1]);module[_0x4ba0[2]]= {penalty:{type:Sequelize[_0x4ba0[3]],defaultValue:0},assigned:{type:Sequelize[_0x4ba0[3]],defaultValue:0},queue:{type:Sequelize[_0x4ba0[4]]}}
\ No newline at end of file
index d403cca..3f050ba 100644 (file)
@@ -1 +1 @@
-var _0xdc0e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x75\x73\x65\x72\x46\x61\x78\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x46\x61\x78\x51\x75\x65\x75\x65","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0xdc0e[0];var _=require(_0xdc0e[1]);var util=require(_0xdc0e[2]);var logger=require(_0xdc0e[4])(_0xdc0e[3]);var moment=require(_0xdc0e[5]);var BPromise=require(_0xdc0e[6]);var rp=require(_0xdc0e[7]);var attributes=require(_0xdc0e[8]);module[_0xdc0e[9]]= function(_0x538dx8,_0x538dx9){return _0x538dx8[_0xdc0e[12]](_0xdc0e[10],attributes,{tableName:_0xdc0e[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xee00=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x75\x73\x65\x72\x46\x61\x78\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x46\x61\x78\x51\x75\x65\x75\x65","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0xee00[0];var _=require(_0xee00[1]);var util=require(_0xee00[2]);var logger=require(_0xee00[4])(_0xee00[3]);var moment=require(_0xee00[5]);var BPromise=require(_0xee00[6]);var rp=require(_0xee00[7]);var attributes=require(_0xee00[8]);module[_0xee00[9]]= function(_0x3da1x8,_0x3da1x9){return _0x3da1x8[_0xee00[12]](_0xee00[10],attributes,{tableName:_0xee00[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 30c2852..a1068d6 100644 (file)
@@ -1 +1 @@
-var _0xc92a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x55\x73\x65\x72\x46\x61\x78\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x55\x73\x65\x72\x46\x61\x78\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xc92a[0];var _=require(_0xc92a[1]);var util=require(_0xc92a[2]);var moment=require(_0xc92a[3]);var BPromise=require(_0xc92a[4]);var rs=require(_0xc92a[5]);var fs=require(_0xc92a[6]);var db=require(_0xc92a[8])[_0xc92a[7]];var utils=require(_0xc92a[9]);var logger=require(_0xc92a[11])(_0xc92a[10]);var config=require(_0xc92a[12]);var jayson=require(_0xc92a[13]);var client=jayson[_0xc92a[15]][_0xc92a[14]]({port:9002});function respondWithRpcPromise(_0x5ac7xe,_0x5ac7xf,_0x5ac7x10){return  new BPromise(function(_0x5ac7x11,_0x5ac7x12){return client[_0xc92a[28]](_0x5ac7xe,_0x5ac7x10)[_0xc92a[27]](function(_0x5ac7x14){logger[_0xc92a[20]](_0xc92a[16],_0x5ac7xf,_0xc92a[19]);logger[_0xc92a[23]](_0xc92a[21],_0x5ac7xf,_0xc92a[19],JSON[_0xc92a[22]](_0x5ac7x14));if(_0x5ac7x14[_0xc92a[17]]){if(_0x5ac7x14[_0xc92a[17]][_0xc92a[24]]=== 500){logger[_0xc92a[17]](_0xc92a[16],_0x5ac7xf,_0x5ac7x14[_0xc92a[17]][_0xc92a[25]]);return _0x5ac7x12(_0x5ac7x14[_0xc92a[17]][_0xc92a[25]])};logger[_0xc92a[17]](_0xc92a[16],_0x5ac7xf,_0x5ac7x14[_0xc92a[17]][_0xc92a[25]]);return _0x5ac7x11(_0x5ac7x14[_0xc92a[17]][_0xc92a[25]])}else {logger[_0xc92a[20]](_0xc92a[16],_0x5ac7xf,_0xc92a[19]);_0x5ac7x11(_0x5ac7x14[_0xc92a[26]][_0xc92a[25]])}})[_0xc92a[18]](function(_0x5ac7x13){logger[_0xc92a[17]](_0xc92a[16],_0x5ac7xf,_0x5ac7x13);_0x5ac7x12(_0x5ac7x13)})})}
\ No newline at end of file
+var _0x63a3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x55\x73\x65\x72\x46\x61\x78\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x55\x73\x65\x72\x46\x61\x78\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x63a3[0];var _=require(_0x63a3[1]);var util=require(_0x63a3[2]);var moment=require(_0x63a3[3]);var BPromise=require(_0x63a3[4]);var rs=require(_0x63a3[5]);var fs=require(_0x63a3[6]);var db=require(_0x63a3[8])[_0x63a3[7]];var utils=require(_0x63a3[9]);var logger=require(_0x63a3[11])(_0x63a3[10]);var config=require(_0x63a3[12]);var jayson=require(_0x63a3[13]);var client=jayson[_0x63a3[15]][_0x63a3[14]]({port:9002});function respondWithRpcPromise(_0x5f2fxe,_0x5f2fxf,_0x5f2fx10){return  new BPromise(function(_0x5f2fx11,_0x5f2fx12){return client[_0x63a3[28]](_0x5f2fxe,_0x5f2fx10)[_0x63a3[27]](function(_0x5f2fx14){logger[_0x63a3[20]](_0x63a3[16],_0x5f2fxf,_0x63a3[19]);logger[_0x63a3[23]](_0x63a3[21],_0x5f2fxf,_0x63a3[19],JSON[_0x63a3[22]](_0x5f2fx14));if(_0x5f2fx14[_0x63a3[17]]){if(_0x5f2fx14[_0x63a3[17]][_0x63a3[24]]=== 500){logger[_0x63a3[17]](_0x63a3[16],_0x5f2fxf,_0x5f2fx14[_0x63a3[17]][_0x63a3[25]]);return _0x5f2fx12(_0x5f2fx14[_0x63a3[17]][_0x63a3[25]])};logger[_0x63a3[17]](_0x63a3[16],_0x5f2fxf,_0x5f2fx14[_0x63a3[17]][_0x63a3[25]]);return _0x5f2fx11(_0x5f2fx14[_0x63a3[17]][_0x63a3[25]])}else {logger[_0x63a3[20]](_0x63a3[16],_0x5f2fxf,_0x63a3[19]);_0x5f2fx11(_0x5f2fx14[_0x63a3[26]][_0x63a3[25]])}})[_0x63a3[18]](function(_0x5f2fx13){logger[_0x63a3[17]](_0x63a3[16],_0x5f2fxf,_0x5f2fx13);_0x5f2fx12(_0x5f2fx13)})})}
\ No newline at end of file
index ec2d192..938e416 100644 (file)
@@ -1 +1 @@
-var _0x891a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x891a[0];var multer=require(_0x891a[1]);var util=require(_0x891a[2]);var path=require(_0x891a[3]);var express=require(_0x891a[4]);var router=express.Router();var auth=require(_0x891a[5]);var interaction=require(_0x891a[6]);var config=require(_0x891a[7]);module[_0x891a[8]]= router
\ No newline at end of file
+var _0xc4ba=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xc4ba[0];var multer=require(_0xc4ba[1]);var util=require(_0xc4ba[2]);var path=require(_0xc4ba[3]);var express=require(_0xc4ba[4]);var router=express.Router();var auth=require(_0xc4ba[5]);var interaction=require(_0xc4ba[6]);var config=require(_0xc4ba[7]);module[_0xc4ba[8]]= router
\ No newline at end of file
index 5b2cb63..a8879b9 100644 (file)
@@ -1 +1 @@
-var _0x7b44=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52"];_0x7b44[0];var Sequelize=require(_0x7b44[1]);module[_0x7b44[2]]= {penalty:{type:Sequelize[_0x7b44[3]],defaultValue:0}}
\ No newline at end of file
+var _0x6b05=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52"];_0x6b05[0];var Sequelize=require(_0x6b05[1]);module[_0x6b05[2]]= {penalty:{type:Sequelize[_0x6b05[3]],defaultValue:0}}
\ No newline at end of file
index 73db027..6556307 100644 (file)
@@ -1 +1 @@
-var _0x4479=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x75\x73\x65\x72\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x4479[0];var _=require(_0x4479[1]);var util=require(_0x4479[2]);var logger=require(_0x4479[4])(_0x4479[3]);var moment=require(_0x4479[5]);var BPromise=require(_0x4479[6]);var rp=require(_0x4479[7]);var attributes=require(_0x4479[8]);module[_0x4479[9]]= function(_0xd3c0x8,_0xd3c0x9){return _0xd3c0x8[_0x4479[12]](_0x4479[10],attributes,{tableName:_0x4479[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x2b7b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x75\x73\x65\x72\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x2b7b[0];var _=require(_0x2b7b[1]);var util=require(_0x2b7b[2]);var logger=require(_0x2b7b[4])(_0x2b7b[3]);var moment=require(_0x2b7b[5]);var BPromise=require(_0x2b7b[6]);var rp=require(_0x2b7b[7]);var attributes=require(_0x2b7b[8]);module[_0x2b7b[9]]= function(_0xa0aex8,_0xa0aex9){return _0xa0aex8[_0x2b7b[12]](_0x2b7b[10],attributes,{tableName:_0x2b7b[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 247fac9..ac066c8 100644 (file)
@@ -1 +1 @@
-var _0x68eb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x55\x73\x65\x72\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x55\x73\x65\x72\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x68eb[0];var _=require(_0x68eb[1]);var util=require(_0x68eb[2]);var moment=require(_0x68eb[3]);var BPromise=require(_0x68eb[4]);var rs=require(_0x68eb[5]);var fs=require(_0x68eb[6]);var db=require(_0x68eb[8])[_0x68eb[7]];var utils=require(_0x68eb[9]);var logger=require(_0x68eb[11])(_0x68eb[10]);var config=require(_0x68eb[12]);var jayson=require(_0x68eb[13]);var client=jayson[_0x68eb[15]][_0x68eb[14]]({port:9002});function respondWithRpcPromise(_0x4edaxe,_0x4edaxf,_0x4edax10){return  new BPromise(function(_0x4edax11,_0x4edax12){return client[_0x68eb[28]](_0x4edaxe,_0x4edax10)[_0x68eb[27]](function(_0x4edax14){logger[_0x68eb[20]](_0x68eb[16],_0x4edaxf,_0x68eb[19]);logger[_0x68eb[23]](_0x68eb[21],_0x4edaxf,_0x68eb[19],JSON[_0x68eb[22]](_0x4edax14));if(_0x4edax14[_0x68eb[17]]){if(_0x4edax14[_0x68eb[17]][_0x68eb[24]]=== 500){logger[_0x68eb[17]](_0x68eb[16],_0x4edaxf,_0x4edax14[_0x68eb[17]][_0x68eb[25]]);return _0x4edax12(_0x4edax14[_0x68eb[17]][_0x68eb[25]])};logger[_0x68eb[17]](_0x68eb[16],_0x4edaxf,_0x4edax14[_0x68eb[17]][_0x68eb[25]]);return _0x4edax11(_0x4edax14[_0x68eb[17]][_0x68eb[25]])}else {logger[_0x68eb[20]](_0x68eb[16],_0x4edaxf,_0x68eb[19]);_0x4edax11(_0x4edax14[_0x68eb[26]][_0x68eb[25]])}})[_0x68eb[18]](function(_0x4edax13){logger[_0x68eb[17]](_0x68eb[16],_0x4edaxf,_0x4edax13);_0x4edax12(_0x4edax13)})})}
\ No newline at end of file
+var _0x8ecd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x55\x73\x65\x72\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x55\x73\x65\x72\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x8ecd[0];var _=require(_0x8ecd[1]);var util=require(_0x8ecd[2]);var moment=require(_0x8ecd[3]);var BPromise=require(_0x8ecd[4]);var rs=require(_0x8ecd[5]);var fs=require(_0x8ecd[6]);var db=require(_0x8ecd[8])[_0x8ecd[7]];var utils=require(_0x8ecd[9]);var logger=require(_0x8ecd[11])(_0x8ecd[10]);var config=require(_0x8ecd[12]);var jayson=require(_0x8ecd[13]);var client=jayson[_0x8ecd[15]][_0x8ecd[14]]({port:9002});function respondWithRpcPromise(_0x30d6xe,_0x30d6xf,_0x30d6x10){return  new BPromise(function(_0x30d6x11,_0x30d6x12){return client[_0x8ecd[28]](_0x30d6xe,_0x30d6x10)[_0x8ecd[27]](function(_0x30d6x14){logger[_0x8ecd[20]](_0x8ecd[16],_0x30d6xf,_0x8ecd[19]);logger[_0x8ecd[23]](_0x8ecd[21],_0x30d6xf,_0x8ecd[19],JSON[_0x8ecd[22]](_0x30d6x14));if(_0x30d6x14[_0x8ecd[17]]){if(_0x30d6x14[_0x8ecd[17]][_0x8ecd[24]]=== 500){logger[_0x8ecd[17]](_0x8ecd[16],_0x30d6xf,_0x30d6x14[_0x8ecd[17]][_0x8ecd[25]]);return _0x30d6x12(_0x30d6x14[_0x8ecd[17]][_0x8ecd[25]])};logger[_0x8ecd[17]](_0x8ecd[16],_0x30d6xf,_0x30d6x14[_0x8ecd[17]][_0x8ecd[25]]);return _0x30d6x11(_0x30d6x14[_0x8ecd[17]][_0x8ecd[25]])}else {logger[_0x8ecd[20]](_0x8ecd[16],_0x30d6xf,_0x8ecd[19]);_0x30d6x11(_0x30d6x14[_0x8ecd[26]][_0x8ecd[25]])}})[_0x8ecd[18]](function(_0x30d6x13){logger[_0x8ecd[17]](_0x8ecd[16],_0x30d6xf,_0x30d6x13);_0x30d6x12(_0x30d6x13)})})}
\ No newline at end of file
index 6455d43..cebd587 100644 (file)
@@ -1 +1 @@
-var _0x8b22=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x8b22[0];var multer=require(_0x8b22[1]);var util=require(_0x8b22[2]);var path=require(_0x8b22[3]);var express=require(_0x8b22[4]);var router=express.Router();var auth=require(_0x8b22[5]);var interaction=require(_0x8b22[6]);var config=require(_0x8b22[7]);module[_0x8b22[8]]= router
\ No newline at end of file
+var _0x2815=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x2815[0];var multer=require(_0x2815[1]);var util=require(_0x2815[2]);var path=require(_0x2815[3]);var express=require(_0x2815[4]);var router=express.Router();var auth=require(_0x2815[5]);var interaction=require(_0x2815[6]);var config=require(_0x2815[7]);module[_0x2815[8]]= router
\ No newline at end of file
index 3ed658b..60a8225 100644 (file)
@@ -1 +1 @@
-var _0x3dba=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52"];_0x3dba[0];var Sequelize=require(_0x3dba[1]);module[_0x3dba[2]]= {penalty:{type:Sequelize[_0x3dba[3]],defaultValue:0}}
\ No newline at end of file
+var _0x1111=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52"];_0x1111[0];var Sequelize=require(_0x1111[1]);module[_0x1111[2]]= {penalty:{type:Sequelize[_0x1111[3]],defaultValue:0}}
\ No newline at end of file
index 641d1e4..71d5d83 100644 (file)
@@ -1 +1 @@
-var _0xe7fd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x75\x73\x65\x72\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0xe7fd[0];var _=require(_0xe7fd[1]);var util=require(_0xe7fd[2]);var logger=require(_0xe7fd[4])(_0xe7fd[3]);var moment=require(_0xe7fd[5]);var BPromise=require(_0xe7fd[6]);var rp=require(_0xe7fd[7]);var attributes=require(_0xe7fd[8]);module[_0xe7fd[9]]= function(_0x4b99x8,_0x4b99x9){return _0x4b99x8[_0xe7fd[12]](_0xe7fd[10],attributes,{tableName:_0xe7fd[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xbb5a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x75\x73\x65\x72\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0xbb5a[0];var _=require(_0xbb5a[1]);var util=require(_0xbb5a[2]);var logger=require(_0xbb5a[4])(_0xbb5a[3]);var moment=require(_0xbb5a[5]);var BPromise=require(_0xbb5a[6]);var rp=require(_0xbb5a[7]);var attributes=require(_0xbb5a[8]);module[_0xbb5a[9]]= function(_0x3818x8,_0x3818x9){return _0x3818x8[_0xbb5a[12]](_0xbb5a[10],attributes,{tableName:_0xbb5a[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index fc06cc6..7cdf438 100644 (file)
@@ -1 +1 @@
-var _0xd025=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x55\x73\x65\x72\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x55\x73\x65\x72\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xd025[0];var _=require(_0xd025[1]);var util=require(_0xd025[2]);var moment=require(_0xd025[3]);var BPromise=require(_0xd025[4]);var rs=require(_0xd025[5]);var fs=require(_0xd025[6]);var db=require(_0xd025[8])[_0xd025[7]];var utils=require(_0xd025[9]);var logger=require(_0xd025[11])(_0xd025[10]);var config=require(_0xd025[12]);var jayson=require(_0xd025[13]);var client=jayson[_0xd025[15]][_0xd025[14]]({port:9002});function respondWithRpcPromise(_0xcccdxe,_0xcccdxf,_0xcccdx10){return  new BPromise(function(_0xcccdx11,_0xcccdx12){return client[_0xd025[28]](_0xcccdxe,_0xcccdx10)[_0xd025[27]](function(_0xcccdx14){logger[_0xd025[20]](_0xd025[16],_0xcccdxf,_0xd025[19]);logger[_0xd025[23]](_0xd025[21],_0xcccdxf,_0xd025[19],JSON[_0xd025[22]](_0xcccdx14));if(_0xcccdx14[_0xd025[17]]){if(_0xcccdx14[_0xd025[17]][_0xd025[24]]=== 500){logger[_0xd025[17]](_0xd025[16],_0xcccdxf,_0xcccdx14[_0xd025[17]][_0xd025[25]]);return _0xcccdx12(_0xcccdx14[_0xd025[17]][_0xd025[25]])};logger[_0xd025[17]](_0xd025[16],_0xcccdxf,_0xcccdx14[_0xd025[17]][_0xd025[25]]);return _0xcccdx11(_0xcccdx14[_0xd025[17]][_0xd025[25]])}else {logger[_0xd025[20]](_0xd025[16],_0xcccdxf,_0xd025[19]);_0xcccdx11(_0xcccdx14[_0xd025[26]][_0xd025[25]])}})[_0xd025[18]](function(_0xcccdx13){logger[_0xd025[17]](_0xd025[16],_0xcccdxf,_0xcccdx13);_0xcccdx12(_0xcccdx13)})})}
\ No newline at end of file
+var _0xe4bf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x55\x73\x65\x72\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x55\x73\x65\x72\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xe4bf[0];var _=require(_0xe4bf[1]);var util=require(_0xe4bf[2]);var moment=require(_0xe4bf[3]);var BPromise=require(_0xe4bf[4]);var rs=require(_0xe4bf[5]);var fs=require(_0xe4bf[6]);var db=require(_0xe4bf[8])[_0xe4bf[7]];var utils=require(_0xe4bf[9]);var logger=require(_0xe4bf[11])(_0xe4bf[10]);var config=require(_0xe4bf[12]);var jayson=require(_0xe4bf[13]);var client=jayson[_0xe4bf[15]][_0xe4bf[14]]({port:9002});function respondWithRpcPromise(_0x41a6xe,_0x41a6xf,_0x41a6x10){return  new BPromise(function(_0x41a6x11,_0x41a6x12){return client[_0xe4bf[28]](_0x41a6xe,_0x41a6x10)[_0xe4bf[27]](function(_0x41a6x14){logger[_0xe4bf[20]](_0xe4bf[16],_0x41a6xf,_0xe4bf[19]);logger[_0xe4bf[23]](_0xe4bf[21],_0x41a6xf,_0xe4bf[19],JSON[_0xe4bf[22]](_0x41a6x14));if(_0x41a6x14[_0xe4bf[17]]){if(_0x41a6x14[_0xe4bf[17]][_0xe4bf[24]]=== 500){logger[_0xe4bf[17]](_0xe4bf[16],_0x41a6xf,_0x41a6x14[_0xe4bf[17]][_0xe4bf[25]]);return _0x41a6x12(_0x41a6x14[_0xe4bf[17]][_0xe4bf[25]])};logger[_0xe4bf[17]](_0xe4bf[16],_0x41a6xf,_0x41a6x14[_0xe4bf[17]][_0xe4bf[25]]);return _0x41a6x11(_0x41a6x14[_0xe4bf[17]][_0xe4bf[25]])}else {logger[_0xe4bf[20]](_0xe4bf[16],_0x41a6xf,_0xe4bf[19]);_0x41a6x11(_0x41a6x14[_0xe4bf[26]][_0xe4bf[25]])}})[_0xe4bf[18]](function(_0x41a6x13){logger[_0xe4bf[17]](_0xe4bf[16],_0x41a6xf,_0x41a6x13);_0x41a6x12(_0x41a6x13)})})}
\ No newline at end of file
index a0548de..6f99387 100644 (file)
@@ -1 +1 @@
-var _0xd5d7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xd5d7[0];var multer=require(_0xd5d7[1]);var util=require(_0xd5d7[2]);var path=require(_0xd5d7[3]);var express=require(_0xd5d7[4]);var router=express.Router();var auth=require(_0xd5d7[5]);var interaction=require(_0xd5d7[6]);var config=require(_0xd5d7[7]);module[_0xd5d7[8]]= router
\ No newline at end of file
+var _0x81a3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x81a3[0];var multer=require(_0x81a3[1]);var util=require(_0x81a3[2]);var path=require(_0x81a3[3]);var express=require(_0x81a3[4]);var router=express.Router();var auth=require(_0x81a3[5]);var interaction=require(_0x81a3[6]);var config=require(_0x81a3[7]);module[_0x81a3[8]]= router
\ No newline at end of file
index cc0270d..864acad 100644 (file)
@@ -1 +1 @@
-var _0x3676=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52"];_0x3676[0];var Sequelize=require(_0x3676[1]);module[_0x3676[2]]= {penalty:{type:Sequelize[_0x3676[3]],defaultValue:0}}
\ No newline at end of file
+var _0x9383=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52"];_0x9383[0];var Sequelize=require(_0x9383[1]);module[_0x9383[2]]= {penalty:{type:Sequelize[_0x9383[3]],defaultValue:0}}
\ No newline at end of file
index 0435e96..dcee2d4 100644 (file)
@@ -1 +1 @@
-var _0xf6b7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x75\x73\x65\x72\x53\x6D\x73\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x53\x6D\x73\x51\x75\x65\x75\x65","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0xf6b7[0];var _=require(_0xf6b7[1]);var util=require(_0xf6b7[2]);var logger=require(_0xf6b7[4])(_0xf6b7[3]);var moment=require(_0xf6b7[5]);var BPromise=require(_0xf6b7[6]);var rp=require(_0xf6b7[7]);var attributes=require(_0xf6b7[8]);module[_0xf6b7[9]]= function(_0xe949x8,_0xe949x9){return _0xe949x8[_0xf6b7[12]](_0xf6b7[10],attributes,{tableName:_0xf6b7[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xc3c9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x75\x73\x65\x72\x53\x6D\x73\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x53\x6D\x73\x51\x75\x65\x75\x65","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0xc3c9[0];var _=require(_0xc3c9[1]);var util=require(_0xc3c9[2]);var logger=require(_0xc3c9[4])(_0xc3c9[3]);var moment=require(_0xc3c9[5]);var BPromise=require(_0xc3c9[6]);var rp=require(_0xc3c9[7]);var attributes=require(_0xc3c9[8]);module[_0xc3c9[9]]= function(_0xa5f8x8,_0xa5f8x9){return _0xa5f8x8[_0xc3c9[12]](_0xc3c9[10],attributes,{tableName:_0xc3c9[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 915de0a..77d902c 100644 (file)
@@ -1 +1 @@
-var _0xb9df=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x55\x73\x65\x72\x53\x6D\x73\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x55\x73\x65\x72\x53\x6D\x73\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xb9df[0];var _=require(_0xb9df[1]);var util=require(_0xb9df[2]);var moment=require(_0xb9df[3]);var BPromise=require(_0xb9df[4]);var rs=require(_0xb9df[5]);var fs=require(_0xb9df[6]);var db=require(_0xb9df[8])[_0xb9df[7]];var utils=require(_0xb9df[9]);var logger=require(_0xb9df[11])(_0xb9df[10]);var config=require(_0xb9df[12]);var jayson=require(_0xb9df[13]);var client=jayson[_0xb9df[15]][_0xb9df[14]]({port:9002});function respondWithRpcPromise(_0x2771xe,_0x2771xf,_0x2771x10){return  new BPromise(function(_0x2771x11,_0x2771x12){return client[_0xb9df[28]](_0x2771xe,_0x2771x10)[_0xb9df[27]](function(_0x2771x14){logger[_0xb9df[20]](_0xb9df[16],_0x2771xf,_0xb9df[19]);logger[_0xb9df[23]](_0xb9df[21],_0x2771xf,_0xb9df[19],JSON[_0xb9df[22]](_0x2771x14));if(_0x2771x14[_0xb9df[17]]){if(_0x2771x14[_0xb9df[17]][_0xb9df[24]]=== 500){logger[_0xb9df[17]](_0xb9df[16],_0x2771xf,_0x2771x14[_0xb9df[17]][_0xb9df[25]]);return _0x2771x12(_0x2771x14[_0xb9df[17]][_0xb9df[25]])};logger[_0xb9df[17]](_0xb9df[16],_0x2771xf,_0x2771x14[_0xb9df[17]][_0xb9df[25]]);return _0x2771x11(_0x2771x14[_0xb9df[17]][_0xb9df[25]])}else {logger[_0xb9df[20]](_0xb9df[16],_0x2771xf,_0xb9df[19]);_0x2771x11(_0x2771x14[_0xb9df[26]][_0xb9df[25]])}})[_0xb9df[18]](function(_0x2771x13){logger[_0xb9df[17]](_0xb9df[16],_0x2771xf,_0x2771x13);_0x2771x12(_0x2771x13)})})}
\ No newline at end of file
+var _0xeafe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x55\x73\x65\x72\x53\x6D\x73\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x55\x73\x65\x72\x53\x6D\x73\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xeafe[0];var _=require(_0xeafe[1]);var util=require(_0xeafe[2]);var moment=require(_0xeafe[3]);var BPromise=require(_0xeafe[4]);var rs=require(_0xeafe[5]);var fs=require(_0xeafe[6]);var db=require(_0xeafe[8])[_0xeafe[7]];var utils=require(_0xeafe[9]);var logger=require(_0xeafe[11])(_0xeafe[10]);var config=require(_0xeafe[12]);var jayson=require(_0xeafe[13]);var client=jayson[_0xeafe[15]][_0xeafe[14]]({port:9002});function respondWithRpcPromise(_0x575cxe,_0x575cxf,_0x575cx10){return  new BPromise(function(_0x575cx11,_0x575cx12){return client[_0xeafe[28]](_0x575cxe,_0x575cx10)[_0xeafe[27]](function(_0x575cx14){logger[_0xeafe[20]](_0xeafe[16],_0x575cxf,_0xeafe[19]);logger[_0xeafe[23]](_0xeafe[21],_0x575cxf,_0xeafe[19],JSON[_0xeafe[22]](_0x575cx14));if(_0x575cx14[_0xeafe[17]]){if(_0x575cx14[_0xeafe[17]][_0xeafe[24]]=== 500){logger[_0xeafe[17]](_0xeafe[16],_0x575cxf,_0x575cx14[_0xeafe[17]][_0xeafe[25]]);return _0x575cx12(_0x575cx14[_0xeafe[17]][_0xeafe[25]])};logger[_0xeafe[17]](_0xeafe[16],_0x575cxf,_0x575cx14[_0xeafe[17]][_0xeafe[25]]);return _0x575cx11(_0x575cx14[_0xeafe[17]][_0xeafe[25]])}else {logger[_0xeafe[20]](_0xeafe[16],_0x575cxf,_0xeafe[19]);_0x575cx11(_0x575cx14[_0xeafe[26]][_0xeafe[25]])}})[_0xeafe[18]](function(_0x575cx13){logger[_0xeafe[17]](_0xeafe[16],_0x575cxf,_0x575cx13);_0x575cx12(_0x575cx13)})})}
\ No newline at end of file
index 5836f07..765e257 100644 (file)
@@ -1 +1 @@
-var _0x94a1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x94a1[0];var multer=require(_0x94a1[1]);var util=require(_0x94a1[2]);var path=require(_0x94a1[3]);var express=require(_0x94a1[4]);var router=express.Router();var auth=require(_0x94a1[5]);var interaction=require(_0x94a1[6]);var config=require(_0x94a1[7]);module[_0x94a1[8]]= router
\ No newline at end of file
+var _0x2fdc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x2fdc[0];var multer=require(_0x2fdc[1]);var util=require(_0x2fdc[2]);var path=require(_0x2fdc[3]);var express=require(_0x2fdc[4]);var router=express.Router();var auth=require(_0x2fdc[5]);var interaction=require(_0x2fdc[6]);var config=require(_0x2fdc[7]);module[_0x2fdc[8]]= router
\ No newline at end of file
index 6279785..30c57e8 100644 (file)
@@ -1 +1 @@
-var _0x3686=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52"];_0x3686[0];var Sequelize=require(_0x3686[1]);module[_0x3686[2]]= {penalty:{type:Sequelize[_0x3686[3]],defaultValue:0}}
\ No newline at end of file
+var _0x8bfe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52"];_0x8bfe[0];var Sequelize=require(_0x8bfe[1]);module[_0x8bfe[2]]= {penalty:{type:Sequelize[_0x8bfe[3]],defaultValue:0}}
\ No newline at end of file
index 195a39a..e21fe04 100644 (file)
@@ -1 +1 @@
-var _0x1e3f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x1e3f[0];var _=require(_0x1e3f[1]);var util=require(_0x1e3f[2]);var logger=require(_0x1e3f[4])(_0x1e3f[3]);var moment=require(_0x1e3f[5]);var BPromise=require(_0x1e3f[6]);var rp=require(_0x1e3f[7]);var attributes=require(_0x1e3f[8]);module[_0x1e3f[9]]= function(_0xceedx8,_0xceedx9){return _0xceedx8[_0x1e3f[12]](_0x1e3f[10],attributes,{tableName:_0x1e3f[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xada1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0xada1[0];var _=require(_0xada1[1]);var util=require(_0xada1[2]);var logger=require(_0xada1[4])(_0xada1[3]);var moment=require(_0xada1[5]);var BPromise=require(_0xada1[6]);var rp=require(_0xada1[7]);var attributes=require(_0xada1[8]);module[_0xada1[9]]= function(_0xe982x8,_0xe982x9){return _0xe982x8[_0xada1[12]](_0xada1[10],attributes,{tableName:_0xada1[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index d4bfba1..6eb360a 100644 (file)
@@ -1 +1 @@
-var _0xd77c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xd77c[0];var _=require(_0xd77c[1]);var util=require(_0xd77c[2]);var moment=require(_0xd77c[3]);var BPromise=require(_0xd77c[4]);var rs=require(_0xd77c[5]);var fs=require(_0xd77c[6]);var db=require(_0xd77c[8])[_0xd77c[7]];var utils=require(_0xd77c[9]);var logger=require(_0xd77c[11])(_0xd77c[10]);var config=require(_0xd77c[12]);var jayson=require(_0xd77c[13]);var client=jayson[_0xd77c[15]][_0xd77c[14]]({port:9002});function respondWithRpcPromise(_0x8121xe,_0x8121xf,_0x8121x10){return  new BPromise(function(_0x8121x11,_0x8121x12){return client[_0xd77c[28]](_0x8121xe,_0x8121x10)[_0xd77c[27]](function(_0x8121x14){logger[_0xd77c[20]](_0xd77c[16],_0x8121xf,_0xd77c[19]);logger[_0xd77c[23]](_0xd77c[21],_0x8121xf,_0xd77c[19],JSON[_0xd77c[22]](_0x8121x14));if(_0x8121x14[_0xd77c[17]]){if(_0x8121x14[_0xd77c[17]][_0xd77c[24]]=== 500){logger[_0xd77c[17]](_0xd77c[16],_0x8121xf,_0x8121x14[_0xd77c[17]][_0xd77c[25]]);return _0x8121x12(_0x8121x14[_0xd77c[17]][_0xd77c[25]])};logger[_0xd77c[17]](_0xd77c[16],_0x8121xf,_0x8121x14[_0xd77c[17]][_0xd77c[25]]);return _0x8121x11(_0x8121x14[_0xd77c[17]][_0xd77c[25]])}else {logger[_0xd77c[20]](_0xd77c[16],_0x8121xf,_0xd77c[19]);_0x8121x11(_0x8121x14[_0xd77c[26]][_0xd77c[25]])}})[_0xd77c[18]](function(_0x8121x13){logger[_0xd77c[17]](_0xd77c[16],_0x8121xf,_0x8121x13);_0x8121x12(_0x8121x13)})})}
\ No newline at end of file
+var _0xdc06=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xdc06[0];var _=require(_0xdc06[1]);var util=require(_0xdc06[2]);var moment=require(_0xdc06[3]);var BPromise=require(_0xdc06[4]);var rs=require(_0xdc06[5]);var fs=require(_0xdc06[6]);var db=require(_0xdc06[8])[_0xdc06[7]];var utils=require(_0xdc06[9]);var logger=require(_0xdc06[11])(_0xdc06[10]);var config=require(_0xdc06[12]);var jayson=require(_0xdc06[13]);var client=jayson[_0xdc06[15]][_0xdc06[14]]({port:9002});function respondWithRpcPromise(_0xc98axe,_0xc98axf,_0xc98ax10){return  new BPromise(function(_0xc98ax11,_0xc98ax12){return client[_0xdc06[28]](_0xc98axe,_0xc98ax10)[_0xdc06[27]](function(_0xc98ax14){logger[_0xdc06[20]](_0xdc06[16],_0xc98axf,_0xdc06[19]);logger[_0xdc06[23]](_0xdc06[21],_0xc98axf,_0xdc06[19],JSON[_0xdc06[22]](_0xc98ax14));if(_0xc98ax14[_0xdc06[17]]){if(_0xc98ax14[_0xdc06[17]][_0xdc06[24]]=== 500){logger[_0xdc06[17]](_0xdc06[16],_0xc98axf,_0xc98ax14[_0xdc06[17]][_0xdc06[25]]);return _0xc98ax12(_0xc98ax14[_0xdc06[17]][_0xdc06[25]])};logger[_0xdc06[17]](_0xdc06[16],_0xc98axf,_0xc98ax14[_0xdc06[17]][_0xdc06[25]]);return _0xc98ax11(_0xc98ax14[_0xdc06[17]][_0xdc06[25]])}else {logger[_0xdc06[20]](_0xdc06[16],_0xc98axf,_0xdc06[19]);_0xc98ax11(_0xc98ax14[_0xdc06[26]][_0xdc06[25]])}})[_0xdc06[18]](function(_0xc98ax13){logger[_0xdc06[17]](_0xdc06[16],_0xc98axf,_0xc98ax13);_0xc98ax12(_0xc98ax13)})})}
\ No newline at end of file
index 7ab5f92..43ac25c 100644 (file)
@@ -1 +1 @@
-var _0x4c7f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x4c7f[0];var multer=require(_0x4c7f[1]);var util=require(_0x4c7f[2]);var path=require(_0x4c7f[3]);var express=require(_0x4c7f[4]);var router=express.Router();var auth=require(_0x4c7f[5]);var interaction=require(_0x4c7f[6]);var config=require(_0x4c7f[7]);module[_0x4c7f[8]]= router
\ No newline at end of file
+var _0x810b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x810b[0];var multer=require(_0x810b[1]);var util=require(_0x810b[2]);var path=require(_0x810b[3]);var express=require(_0x810b[4]);var router=express.Router();var auth=require(_0x810b[5]);var interaction=require(_0x810b[6]);var config=require(_0x810b[7]);module[_0x810b[8]]= router
\ No newline at end of file
index 68cfd82..d5f6f1a 100644 (file)
@@ -1 +1 @@
-var _0xa4f1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52","\x52\x65\x71\x75\x69\x72\x65\x64\x20\x62\x79\x20\x41\x73\x74\x65\x72\x69\x73\x6B","\x53\x54\x52\x49\x4E\x47","\x71\x75\x65\x75\x65\x5F\x69\x6E\x74\x65\x72\x66\x61\x63\x65"];_0xa4f1[0];var Sequelize=require(_0xa4f1[1]);module[_0xa4f1[2]]= {uniqueid:{type:Sequelize[_0xa4f1[3]],primaryKey:true,autoIncrement:true,comment:_0xa4f1[4]},membername:{type:Sequelize[_0xa4f1[5]],allowNull:false,comment:_0xa4f1[4]},UserId:{type:Sequelize[_0xa4f1[3]],allowNull:false},queue_name:{type:Sequelize[_0xa4f1[5]],allowNull:false,unique:_0xa4f1[6],comment:_0xa4f1[4]},VoiceQueueId:{type:Sequelize[_0xa4f1[3]],allowNull:false},interface:{type:Sequelize[_0xa4f1[5]],allowNull:false,unique:_0xa4f1[6],comment:_0xa4f1[4]},penalty:{type:Sequelize.INTEGER(11),defaultValue:0,comment:_0xa4f1[4]},paused:{type:Sequelize.INTEGER(11),defaultValue:0,comment:_0xa4f1[4]}}
\ No newline at end of file
+var _0xc10f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x49\x4E\x54\x45\x47\x45\x52","\x52\x65\x71\x75\x69\x72\x65\x64\x20\x62\x79\x20\x41\x73\x74\x65\x72\x69\x73\x6B","\x53\x54\x52\x49\x4E\x47","\x71\x75\x65\x75\x65\x5F\x69\x6E\x74\x65\x72\x66\x61\x63\x65"];_0xc10f[0];var Sequelize=require(_0xc10f[1]);module[_0xc10f[2]]= {uniqueid:{type:Sequelize[_0xc10f[3]],primaryKey:true,autoIncrement:true,comment:_0xc10f[4]},membername:{type:Sequelize[_0xc10f[5]],allowNull:false,comment:_0xc10f[4]},UserId:{type:Sequelize[_0xc10f[3]],allowNull:false},queue_name:{type:Sequelize[_0xc10f[5]],allowNull:false,unique:_0xc10f[6],comment:_0xc10f[4]},VoiceQueueId:{type:Sequelize[_0xc10f[3]],allowNull:false},interface:{type:Sequelize[_0xc10f[5]],allowNull:false,unique:_0xc10f[6],comment:_0xc10f[4]},penalty:{type:Sequelize.INTEGER(11),defaultValue:0,comment:_0xc10f[4]},paused:{type:Sequelize.INTEGER(11),defaultValue:0,comment:_0xc10f[4]}}
\ No newline at end of file
index e378924..fe6814a 100644 (file)
@@ -1 +1 @@
-var _0xf26b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xf26b[0];var EventEmitter=require(_0xf26b[1]);var UserVoiceQueueRt=require(_0xf26b[4])[_0xf26b[3]][_0xf26b[2]];var UserVoiceQueueRtEvents= new EventEmitter();UserVoiceQueueRtEvents[_0xf26b[5]](0);var events={afterCreate:_0xf26b[6],afterUpdate:_0xf26b[7],afterDestroy:_0xf26b[8]};function emitEvent(event){return function(_0x5a37x7,_0x5a37x8,_0x5a37x9){UserVoiceQueueRtEvents[_0xf26b[11]](event+ _0xf26b[9]+ _0x5a37x7[_0xf26b[10]],_0x5a37x7);UserVoiceQueueRtEvents[_0xf26b[11]](event,_0x5a37x7);_0x5a37x9(null)}}for(var e in events){if(events[_0xf26b[12]](e)){var event=events[e];UserVoiceQueueRt[_0xf26b[13]](e,emitEvent(event))}};module[_0xf26b[14]]= UserVoiceQueueRtEvents
\ No newline at end of file
+var _0xee26=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xee26[0];var EventEmitter=require(_0xee26[1]);var UserVoiceQueueRt=require(_0xee26[4])[_0xee26[3]][_0xee26[2]];var UserVoiceQueueRtEvents= new EventEmitter();UserVoiceQueueRtEvents[_0xee26[5]](0);var events={afterCreate:_0xee26[6],afterUpdate:_0xee26[7],afterDestroy:_0xee26[8]};function emitEvent(event){return function(_0xf4aax7,_0xf4aax8,_0xf4aax9){UserVoiceQueueRtEvents[_0xee26[11]](event+ _0xee26[9]+ _0xf4aax7[_0xee26[10]],_0xf4aax7);UserVoiceQueueRtEvents[_0xee26[11]](event,_0xf4aax7);_0xf4aax9(null)}}for(var e in events){if(events[_0xee26[12]](e)){var event=events[e];UserVoiceQueueRt[_0xee26[13]](e,emitEvent(event))}};module[_0xee26[14]]= UserVoiceQueueRtEvents
\ No newline at end of file
index e08e512..781f888 100644 (file)
@@ -1 +1 @@
-var _0xe2d0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73\x5F\x72\x74","\x64\x65\x66\x69\x6E\x65"];_0xe2d0[0];var _=require(_0xe2d0[1]);var util=require(_0xe2d0[2]);var logger=require(_0xe2d0[4])(_0xe2d0[3]);var moment=require(_0xe2d0[5]);var BPromise=require(_0xe2d0[6]);var rp=require(_0xe2d0[7]);var attributes=require(_0xe2d0[8]);module[_0xe2d0[9]]= function(_0xc840x8,_0xc840x9){return _0xc840x8[_0xe2d0[12]](_0xe2d0[10],attributes,{tableName:_0xe2d0[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x4d6d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73\x5F\x72\x74","\x64\x65\x66\x69\x6E\x65"];_0x4d6d[0];var _=require(_0x4d6d[1]);var util=require(_0x4d6d[2]);var logger=require(_0x4d6d[4])(_0x4d6d[3]);var moment=require(_0x4d6d[5]);var BPromise=require(_0x4d6d[6]);var rp=require(_0x4d6d[7]);var attributes=require(_0x4d6d[8]);module[_0x4d6d[9]]= function(_0x1837x8,_0x1837x9){return _0x1837x8[_0x4d6d[12]](_0x4d6d[10],attributes,{tableName:_0x4d6d[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 141d50b..3c1fb4b 100644 (file)
@@ -1 +1 @@
-var _0x5951=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x50\x61\x75\x73\x65\x73","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x43\x4F\x55\x4E\x54","\x49\x46","\x60\x70\x61\x75\x73\x65\x64\x60\x20\x3D\x20\x31\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6C\x69\x74\x65\x72\x61\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x6E","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x51\x75\x65\x75\x65\x50\x61\x75\x73\x65\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74"];_0x5951[0];var _=require(_0x5951[1]);var util=require(_0x5951[2]);var moment=require(_0x5951[3]);var BPromise=require(_0x5951[4]);var rs=require(_0x5951[5]);var fs=require(_0x5951[6]);var db=require(_0x5951[8])[_0x5951[7]];var utils=require(_0x5951[9]);var logger=require(_0x5951[11])(_0x5951[10]);var config=require(_0x5951[12]);var jayson=require(_0x5951[13]);var client=jayson[_0x5951[15]][_0x5951[14]]({port:9002});var socket=require(_0x5951[17])({host:_0x5951[16],port:6379});require(_0x5951[19])[_0x5951[18]](socket);function respondWithRpcPromise(_0xa1c3xf,_0xa1c3x10,_0xa1c3x11){return  new BPromise(function(_0xa1c3x12,_0xa1c3x13){return client[_0x5951[32]](_0xa1c3xf,_0xa1c3x11)[_0x5951[31]](function(_0xa1c3x15){logger[_0x5951[24]](_0x5951[20],_0xa1c3x10,_0x5951[23]);logger[_0x5951[27]](_0x5951[25],_0xa1c3x10,_0x5951[23],JSON[_0x5951[26]](_0xa1c3x15));if(_0xa1c3x15[_0x5951[21]]){if(_0xa1c3x15[_0x5951[21]][_0x5951[28]]=== 500){logger[_0x5951[21]](_0x5951[20],_0xa1c3x10,_0xa1c3x15[_0x5951[21]][_0x5951[29]]);return _0xa1c3x13(_0xa1c3x15[_0x5951[21]][_0x5951[29]])};logger[_0x5951[21]](_0x5951[20],_0xa1c3x10,_0xa1c3x15[_0x5951[21]][_0x5951[29]]);return _0xa1c3x12(_0xa1c3x15[_0x5951[21]][_0x5951[29]])}else {logger[_0x5951[24]](_0x5951[20],_0xa1c3x10,_0x5951[23]);_0xa1c3x12(_0xa1c3x15[_0x5951[30]][_0x5951[29]])}})[_0x5951[22]](function(_0xa1c3x14){logger[_0x5951[21]](_0x5951[20],_0xa1c3x10,_0xa1c3x14);_0xa1c3x13(_0xa1c3x14)})})}exports[_0x5951[33]]= function(_0xa1c3x11){var _0xa1c3x16=this;return  new Promise(function(_0xa1c3x12,_0xa1c3x13){return db[_0x5951[45]][_0x5951[44]]({raw:_0xa1c3x11[_0x5951[34]]?(_0xa1c3x11[_0x5951[34]][_0x5951[35]]=== undefined)?true:false:true,where:_0xa1c3x11[_0x5951[34]]?_0xa1c3x11[_0x5951[34]][_0x5951[36]]|| null:null,attributes:[[db[_0x5951[41]][_0x5951[42]](_0x5951[37],db[_0x5951[41]][_0x5951[42]](_0x5951[38],db[_0x5951[41]][_0x5951[40]](_0x5951[39]))),_0x5951[43]]]})[_0x5951[31]](function(_0xa1c3x15){logger[_0x5951[24]](_0x5951[33],_0xa1c3x11);logger[_0x5951[27]](_0x5951[33],_0xa1c3x11,JSON[_0x5951[26]](_0xa1c3x15));_0xa1c3x12(_0xa1c3x15)})[_0x5951[22]](function(_0xa1c3x14){logger[_0x5951[21]](_0x5951[33],_0xa1c3x14[_0x5951[29]],_0xa1c3x11);_0xa1c3x13(_0xa1c3x16[_0x5951[21]](500,_0xa1c3x14[_0x5951[29]]))})})}
\ No newline at end of file
+var _0x4ad4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x50\x61\x75\x73\x65\x73","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x43\x4F\x55\x4E\x54","\x49\x46","\x60\x70\x61\x75\x73\x65\x64\x60\x20\x3D\x20\x31\x2C\x20\x31\x2C\x20\x6E\x75\x6C\x6C","\x6C\x69\x74\x65\x72\x61\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x6E","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x51\x75\x65\x75\x65\x50\x61\x75\x73\x65\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74"];_0x4ad4[0];var _=require(_0x4ad4[1]);var util=require(_0x4ad4[2]);var moment=require(_0x4ad4[3]);var BPromise=require(_0x4ad4[4]);var rs=require(_0x4ad4[5]);var fs=require(_0x4ad4[6]);var db=require(_0x4ad4[8])[_0x4ad4[7]];var utils=require(_0x4ad4[9]);var logger=require(_0x4ad4[11])(_0x4ad4[10]);var config=require(_0x4ad4[12]);var jayson=require(_0x4ad4[13]);var client=jayson[_0x4ad4[15]][_0x4ad4[14]]({port:9002});var socket=require(_0x4ad4[17])({host:_0x4ad4[16],port:6379});require(_0x4ad4[19])[_0x4ad4[18]](socket);function respondWithRpcPromise(_0x3c8exf,_0x3c8ex10,_0x3c8ex11){return  new BPromise(function(_0x3c8ex12,_0x3c8ex13){return client[_0x4ad4[32]](_0x3c8exf,_0x3c8ex11)[_0x4ad4[31]](function(_0x3c8ex15){logger[_0x4ad4[24]](_0x4ad4[20],_0x3c8ex10,_0x4ad4[23]);logger[_0x4ad4[27]](_0x4ad4[25],_0x3c8ex10,_0x4ad4[23],JSON[_0x4ad4[26]](_0x3c8ex15));if(_0x3c8ex15[_0x4ad4[21]]){if(_0x3c8ex15[_0x4ad4[21]][_0x4ad4[28]]=== 500){logger[_0x4ad4[21]](_0x4ad4[20],_0x3c8ex10,_0x3c8ex15[_0x4ad4[21]][_0x4ad4[29]]);return _0x3c8ex13(_0x3c8ex15[_0x4ad4[21]][_0x4ad4[29]])};logger[_0x4ad4[21]](_0x4ad4[20],_0x3c8ex10,_0x3c8ex15[_0x4ad4[21]][_0x4ad4[29]]);return _0x3c8ex12(_0x3c8ex15[_0x4ad4[21]][_0x4ad4[29]])}else {logger[_0x4ad4[24]](_0x4ad4[20],_0x3c8ex10,_0x4ad4[23]);_0x3c8ex12(_0x3c8ex15[_0x4ad4[30]][_0x4ad4[29]])}})[_0x4ad4[22]](function(_0x3c8ex14){logger[_0x4ad4[21]](_0x4ad4[20],_0x3c8ex10,_0x3c8ex14);_0x3c8ex13(_0x3c8ex14)})})}exports[_0x4ad4[33]]= function(_0x3c8ex11){var _0x3c8ex16=this;return  new Promise(function(_0x3c8ex12,_0x3c8ex13){return db[_0x4ad4[45]][_0x4ad4[44]]({raw:_0x3c8ex11[_0x4ad4[34]]?(_0x3c8ex11[_0x4ad4[34]][_0x4ad4[35]]=== undefined)?true:false:true,where:_0x3c8ex11[_0x4ad4[34]]?_0x3c8ex11[_0x4ad4[34]][_0x4ad4[36]]|| null:null,attributes:[[db[_0x4ad4[41]][_0x4ad4[42]](_0x4ad4[37],db[_0x4ad4[41]][_0x4ad4[42]](_0x4ad4[38],db[_0x4ad4[41]][_0x4ad4[40]](_0x4ad4[39]))),_0x4ad4[43]]]})[_0x4ad4[31]](function(_0x3c8ex15){logger[_0x4ad4[24]](_0x4ad4[33],_0x3c8ex11);logger[_0x4ad4[27]](_0x4ad4[33],_0x3c8ex11,JSON[_0x4ad4[26]](_0x3c8ex15));_0x3c8ex12(_0x3c8ex15)})[_0x4ad4[22]](function(_0x3c8ex14){logger[_0x4ad4[21]](_0x4ad4[33],_0x3c8ex14[_0x4ad4[29]],_0x3c8ex11);_0x3c8ex13(_0x3c8ex16[_0x4ad4[21]](500,_0x3c8ex14[_0x4ad4[29]]))})})}
\ No newline at end of file
index 528e52d..e9a22ed 100644 (file)
@@ -1 +1 @@
-var _0xbe2e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x3A","\x6F\x6E"];_0xbe2e[0];var UserVoiceQueueRtEvents=require(_0xbe2e[1]);var events=[_0xbe2e[2],_0xbe2e[3],_0xbe2e[4]];function createListener(_0xb121x4,_0xb121x5){return function(_0xb121x6){_0xb121x5[_0xbe2e[5]](_0xb121x4,_0xb121x6)}}function removeListener(_0xb121x4,_0xb121x8){return function(){UserVoiceQueueRtEvents[_0xbe2e[6]](_0xb121x4,_0xb121x8)}}exports[_0xbe2e[7]]= function(_0xb121x5){for(var _0xb121x9=0,_0xb121xa=events[_0xbe2e[8]];_0xb121x9< _0xb121xa;_0xb121x9++){var _0xb121x4=events[_0xb121x9];var _0xb121x8=createListener(_0xbe2e[9]+ _0xb121x4,_0xb121x5);UserVoiceQueueRtEvents[_0xbe2e[10]](_0xb121x4,_0xb121x8)}}
\ No newline at end of file
+var _0x4c49=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x3A","\x6F\x6E"];_0x4c49[0];var UserVoiceQueueRtEvents=require(_0x4c49[1]);var events=[_0x4c49[2],_0x4c49[3],_0x4c49[4]];function createListener(_0x1bdex4,_0x1bdex5){return function(_0x1bdex6){_0x1bdex5[_0x4c49[5]](_0x1bdex4,_0x1bdex6)}}function removeListener(_0x1bdex4,_0x1bdex8){return function(){UserVoiceQueueRtEvents[_0x4c49[6]](_0x1bdex4,_0x1bdex8)}}exports[_0x4c49[7]]= function(_0x1bdex5){for(var _0x1bdex9=0,_0x1bdexa=events[_0x4c49[8]];_0x1bdex9< _0x1bdexa;_0x1bdex9++){var _0x1bdex4=events[_0x1bdex9];var _0x1bdex8=createListener(_0x4c49[9]+ _0x1bdex4,_0x1bdex5);UserVoiceQueueRtEvents[_0x4c49[10]](_0x1bdex4,_0x1bdex8)}}
\ No newline at end of file
index 8cf1073..c3403e2 100644 (file)
@@ -1 +1 @@
-var _0x6ebd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6ebd[0];var multer=require(_0x6ebd[1]);var util=require(_0x6ebd[2]);var path=require(_0x6ebd[3]);var express=require(_0x6ebd[4]);var router=express.Router();var auth=require(_0x6ebd[5]);var interaction=require(_0x6ebd[6]);var config=require(_0x6ebd[7]);var controller=require(_0x6ebd[8]);router[_0x6ebd[12]](_0x6ebd[9],auth[_0x6ebd[10]](),controller[_0x6ebd[11]]);router[_0x6ebd[12]](_0x6ebd[13],auth[_0x6ebd[10]](),controller[_0x6ebd[14]]);router[_0x6ebd[16]](_0x6ebd[9],auth[_0x6ebd[10]](),controller[_0x6ebd[15]]);router[_0x6ebd[18]](_0x6ebd[13],auth[_0x6ebd[10]](),controller[_0x6ebd[17]]);router[_0x6ebd[20]](_0x6ebd[13],auth[_0x6ebd[10]](),controller[_0x6ebd[19]]);module[_0x6ebd[21]]= router
\ No newline at end of file
+var _0x72ae=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x72ae[0];var multer=require(_0x72ae[1]);var util=require(_0x72ae[2]);var path=require(_0x72ae[3]);var express=require(_0x72ae[4]);var router=express.Router();var auth=require(_0x72ae[5]);var interaction=require(_0x72ae[6]);var config=require(_0x72ae[7]);var controller=require(_0x72ae[8]);router[_0x72ae[12]](_0x72ae[9],auth[_0x72ae[10]](),controller[_0x72ae[11]]);router[_0x72ae[12]](_0x72ae[13],auth[_0x72ae[10]](),controller[_0x72ae[14]]);router[_0x72ae[16]](_0x72ae[9],auth[_0x72ae[10]](),controller[_0x72ae[15]]);router[_0x72ae[18]](_0x72ae[13],auth[_0x72ae[10]](),controller[_0x72ae[17]]);router[_0x72ae[20]](_0x72ae[13],auth[_0x72ae[10]](),controller[_0x72ae[19]]);module[_0x72ae[21]]= router
\ No newline at end of file
index 46c43dd..8d822f4 100644 (file)
@@ -1 +1 @@
-var _0xef62=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65"];_0xef62[0];var Sequelize=require(_0xef62[1]);module[_0xef62[2]]= {name:{type:Sequelize[_0xef62[3]],unique:_0xef62[4],allowNull:false,validate:{notEmpty:true}},description:{type:Sequelize[_0xef62[3]]}}
\ No newline at end of file
+var _0xf509=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65"];_0xf509[0];var Sequelize=require(_0xf509[1]);module[_0xf509[2]]= {name:{type:Sequelize[_0xf509[3]],unique:_0xf509[4],allowNull:false,validate:{notEmpty:true}},description:{type:Sequelize[_0xf509[3]]}}
\ No newline at end of file
index d3ff4a2..e90f0be 100644 (file)
@@ -1 +1 @@
-var _0x19ce=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x19ce[0];var jsonpatch=require(_0x19ce[1]);var rp=require(_0x19ce[2]);var moment=require(_0x19ce[3]);var BPromise=require(_0x19ce[4]);var Mustache=require(_0x19ce[5]);var util=require(_0x19ce[6]);var path=require(_0x19ce[7]);var sox=require(_0x19ce[8]);var csv=require(_0x19ce[9]);var ejs=require(_0x19ce[10]);var fs=require(_0x19ce[11]);var _=require(_0x19ce[12]);var squel=require(_0x19ce[13]);var crypto=require(_0x19ce[14]);var jsforce=require(_0x19ce[15]);var deskjs=require(_0x19ce[16]);var toCsv=require(_0x19ce[9]);var querystring=require(_0x19ce[17]);var Papa=require(_0x19ce[18]);var qs=require(_0x19ce[19]);var logger=require(_0x19ce[21])(_0x19ce[20]);var utils=require(_0x19ce[22]);var config=require(_0x19ce[23]);var db=require(_0x19ce[25])[_0x19ce[24]];function respondWithStatusCode(_0x6d72x1a,_0x6d72x1b){_0x6d72x1b= _0x6d72x1b|| 204;return function(_0x6d72x1c){if(_0x6d72x1c){return _0x6d72x1a[_0x19ce[26]](_0x6d72x1b)};return _0x6d72x1a[_0x19ce[28]](_0x6d72x1b)[_0x19ce[27]]()}}function respondWithResult(_0x6d72x1a,_0x6d72x1b){_0x6d72x1b= _0x6d72x1b|| 200;return function(_0x6d72x1c){if(_0x6d72x1c){return _0x6d72x1a[_0x19ce[28]](_0x6d72x1b)[_0x19ce[29]](_0x6d72x1c)}}}function respondWithFilteredResult(_0x6d72x1a,_0x6d72x1f){return function(_0x6d72x1c){if(_0x6d72x1c){var _0x6d72x20=_0x6d72x1c[_0x19ce[30]],_0x6d72x21=_0x6d72x1f[_0x19ce[31]],_0x6d72x22=_0x6d72x1f[_0x19ce[31]]+ _0x6d72x1f[_0x19ce[32]],_0x6d72x1b;if(_0x6d72x22>= _0x6d72x20){_0x6d72x22= _0x6d72x20;_0x6d72x1b= 200}else {_0x6d72x1b= 206};_0x6d72x1a[_0x19ce[28]](_0x6d72x1b);return _0x6d72x1a[_0x19ce[36]](_0x19ce[33],_0x6d72x21+ _0x19ce[34]+ _0x6d72x22+ _0x19ce[35]+ _0x6d72x20)[_0x19ce[29]](_0x6d72x1c)};return null}}function patchUpdates(_0x6d72x24){return function(_0x6d72x1c){try{jsonpatch[_0x19ce[37]](_0x6d72x1c,_0x6d72x24,true)}catch(err){return BPromise[_0x19ce[38]](err)};return _0x6d72x1c[_0x19ce[39]]()}}function saveUpdates(_0x6d72x26,_0x6d72x1b){return function(_0x6d72x1c){if(_0x6d72x1c){return _0x6d72x1c[_0x19ce[41]](_0x6d72x26)[_0x19ce[40]](function(_0x6d72x27){return _0x6d72x27})};return null}}function removeEntity(_0x6d72x1a,_0x6d72x1b){return function(_0x6d72x1c){if(_0x6d72x1c){return _0x6d72x1c[_0x19ce[42]]()[_0x19ce[40]](function(){_0x6d72x1a[_0x19ce[28]](204)[_0x19ce[27]]()})}}}function handleEntityNotFound(_0x6d72x1a,_0x6d72x1b){return function(_0x6d72x1c){if(!_0x6d72x1c){_0x6d72x1a[_0x19ce[26]](404)};return _0x6d72x1c}}function handleError(_0x6d72x1a,_0x6d72x1b){_0x6d72x1b= _0x6d72x1b|| 500;return function(_0x6d72x2b){logger[_0x19ce[44]](_0x6d72x2b[_0x19ce[43]]);if(_0x6d72x2b[_0x19ce[45]]){delete _0x6d72x2b[_0x19ce[45]]};_0x6d72x1a[_0x19ce[28]](_0x6d72x1b)[_0x19ce[46]](_0x6d72x2b)}}exports[_0x19ce[47]]= function(_0x6d72x2c,_0x6d72x1a){var _0x6d72x1f={},_0x6d72x2d={},_0x6d72x2e={count:0,rows:[]};_0x6d72x2d[_0x19ce[48]]= _[_0x19ce[51]](db[_0x19ce[50]][_0x19ce[49]]);var _0x6d72x2f={dateStart:_0x6d72x2c[_0x19ce[53]][_0x19ce[52]],dateEnd:_0x6d72x2c[_0x19ce[53]][_0x19ce[54]]};delete _0x6d72x2c[_0x19ce[53]][_0x19ce[52]];delete _0x6d72x2c[_0x19ce[53]][_0x19ce[54]];_0x6d72x2d[_0x19ce[53]]= _[_0x19ce[51]](_0x6d72x2c[_0x19ce[53]]);_0x6d72x2d[_0x19ce[55]]= _[_0x19ce[56]](_0x6d72x2d[_0x19ce[48]],_0x6d72x2d[_0x19ce[53]]);_0x6d72x1f[_0x19ce[57]]= _[_0x19ce[56]](_0x6d72x2d[_0x19ce[48]],qs[_0x19ce[58]](_0x6d72x2c[_0x19ce[53]][_0x19ce[58]]));_0x6d72x1f[_0x19ce[57]]= (_0x6d72x1f[_0x19ce[57]][_0x19ce[59]])?_0x6d72x1f[_0x19ce[57]]:_0x6d72x2d[_0x19ce[48]];if(!_0x6d72x2c[_0x19ce[53]][_0x19ce[61]](_0x19ce[60])){_0x6d72x1f[_0x19ce[32]]= qs[_0x19ce[32]](_0x6d72x2c[_0x19ce[53]][_0x19ce[32]]);_0x6d72x1f[_0x19ce[31]]= qs[_0x19ce[31]](_0x6d72x2c[_0x19ce[53]][_0x19ce[31]])};_0x6d72x1f[_0x19ce[62]]= qs[_0x19ce[63]](_0x6d72x2c[_0x19ce[53]][_0x19ce[63]]);_0x6d72x1f[_0x19ce[64]]= qs[_0x19ce[55]](_[_0x19ce[65]](_0x6d72x2c[_0x19ce[53]],_0x6d72x2d[_0x19ce[55]]));if(_0x6d72x2f[_0x19ce[52]]){if(_0x6d72x2f[_0x19ce[54]]){_0x6d72x2f[_0x19ce[54]]= moment(_0x6d72x2f[_0x19ce[54]])[_0x19ce[67]](1,_0x19ce[66])}else {_0x6d72x2f[_0x19ce[54]]= moment(_0x6d72x2f[_0x19ce[52]])[_0x19ce[67]](1,_0x19ce[66])};_[_0x19ce[68]](_0x6d72x1f[_0x19ce[64]],{createdAt:{$gte:_0x6d72x2f[_0x19ce[52]],$lte:_0x6d72x2f[_0x19ce[54]]}})};if(_0x6d72x2c[_0x19ce[53]][_0x19ce[69]]){_0x6d72x1f[_0x19ce[64]]= _[_0x19ce[68]](_0x6d72x1f[_0x19ce[64]],{$or:_[_0x19ce[71]](_0x6d72x1f[_0x19ce[57]],function(_0x6d72x30){var _0x6d72x2e={};_0x6d72x2e[_0x6d72x30]= {$like:_0x19ce[70]+ _0x6d72x2c[_0x19ce[53]][_0x19ce[69]]+ _0x19ce[70]};return _0x6d72x2e})})};_0x6d72x1f= _[_0x19ce[68]]({},_0x6d72x1f,_0x6d72x2c[_0x19ce[72]]);var _0x6d72x31={where:_0x6d72x1f[_0x19ce[64]]};return db[_0x19ce[50]][_0x19ce[30]](_0x6d72x31)[_0x19ce[40]](function(_0x6d72x20){_0x6d72x2e[_0x19ce[30]]= _0x6d72x20;if(_0x6d72x2c[_0x19ce[53]][_0x19ce[75]]){_0x6d72x1f[_0x19ce[76]]= [{all:true}]};return db[_0x19ce[50]][_0x19ce[77]](_0x6d72x1f)})[_0x19ce[40]](function(_0x6d72x32){_0x6d72x2e[_0x19ce[74]]= _0x6d72x32;return _0x6d72x2e})[_0x19ce[40]](respondWithFilteredResult(_0x6d72x1a,_0x6d72x1f))[_0x19ce[73]](handleError(_0x6d72x1a,null))};exports[_0x19ce[78]]= function(_0x6d72x2c,_0x6d72x1a){var _0x6d72x1f={raw:true,where:{id:_0x6d72x2c[_0x19ce[80]][_0x19ce[79]]}},_0x6d72x2d={};_0x6d72x2d[_0x19ce[48]]= _[_0x19ce[51]](db[_0x19ce[50]][_0x19ce[49]]);_0x6d72x2d[_0x19ce[53]]= _[_0x19ce[51]](_0x6d72x2c[_0x19ce[53]]);_0x6d72x2d[_0x19ce[55]]= _[_0x19ce[56]](_0x6d72x2d[_0x19ce[48]],_0x6d72x2d[_0x19ce[53]]);_0x6d72x1f[_0x19ce[57]]= _[_0x19ce[56]](_0x6d72x2d[_0x19ce[48]],qs[_0x19ce[58]](_0x6d72x2c[_0x19ce[53]][_0x19ce[58]]));_0x6d72x1f[_0x19ce[57]]= (_0x6d72x1f[_0x19ce[57]][_0x19ce[59]])?_0x6d72x1f[_0x19ce[57]]:_0x6d72x2d[_0x19ce[48]];if(_0x6d72x2c[_0x19ce[53]][_0x19ce[75]]){_0x6d72x1f[_0x19ce[76]]= [{all:true}]};_0x6d72x1f= _[_0x19ce[68]]({},_0x6d72x1f,_0x6d72x2c[_0x19ce[72]]);return db[_0x19ce[50]][_0x19ce[81]](_0x6d72x1f)[_0x19ce[40]](handleEntityNotFound(_0x6d72x1a,null))[_0x19ce[40]](respondWithResult(_0x6d72x1a,null))[_0x19ce[73]](handleError(_0x6d72x1a,null))};exports[_0x19ce[82]]= function(_0x6d72x2c,_0x6d72x1a){return db[_0x19ce[50]][_0x19ce[82]](_0x6d72x2c[_0x19ce[83]],{})[_0x19ce[40]](respondWithResult(_0x6d72x1a,201))[_0x19ce[73]](handleError(_0x6d72x1a,null))};exports[_0x19ce[41]]= function(_0x6d72x2c,_0x6d72x1a){if(_0x6d72x2c[_0x19ce[83]][_0x19ce[79]]){delete _0x6d72x2c[_0x19ce[83]][_0x19ce[79]]};return db[_0x19ce[50]][_0x19ce[81]]({where:{id:_0x6d72x2c[_0x19ce[80]][_0x19ce[79]]}})[_0x19ce[40]](handleEntityNotFound(_0x6d72x1a,null))[_0x19ce[40]](saveUpdates(_0x6d72x2c[_0x19ce[83]],null))[_0x19ce[40]](respondWithResult(_0x6d72x1a,null))[_0x19ce[73]](handleError(_0x6d72x1a,null))};exports[_0x19ce[42]]= function(_0x6d72x2c,_0x6d72x1a){return db[_0x19ce[50]][_0x19ce[81]]({where:{id:_0x6d72x2c[_0x19ce[80]][_0x19ce[79]]}})[_0x19ce[40]](handleEntityNotFound(_0x6d72x1a,null))[_0x19ce[40]](removeEntity(_0x6d72x1a,null))[_0x19ce[73]](handleError(_0x6d72x1a,null))}
\ No newline at end of file
+var _0xacb3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xacb3[0];var jsonpatch=require(_0xacb3[1]);var rp=require(_0xacb3[2]);var moment=require(_0xacb3[3]);var BPromise=require(_0xacb3[4]);var Mustache=require(_0xacb3[5]);var util=require(_0xacb3[6]);var path=require(_0xacb3[7]);var sox=require(_0xacb3[8]);var csv=require(_0xacb3[9]);var ejs=require(_0xacb3[10]);var fs=require(_0xacb3[11]);var _=require(_0xacb3[12]);var squel=require(_0xacb3[13]);var crypto=require(_0xacb3[14]);var jsforce=require(_0xacb3[15]);var deskjs=require(_0xacb3[16]);var toCsv=require(_0xacb3[9]);var querystring=require(_0xacb3[17]);var Papa=require(_0xacb3[18]);var qs=require(_0xacb3[19]);var logger=require(_0xacb3[21])(_0xacb3[20]);var utils=require(_0xacb3[22]);var config=require(_0xacb3[23]);var db=require(_0xacb3[25])[_0xacb3[24]];function respondWithStatusCode(_0x8b1ax1a,_0x8b1ax1b){_0x8b1ax1b= _0x8b1ax1b|| 204;return function(_0x8b1ax1c){if(_0x8b1ax1c){return _0x8b1ax1a[_0xacb3[26]](_0x8b1ax1b)};return _0x8b1ax1a[_0xacb3[28]](_0x8b1ax1b)[_0xacb3[27]]()}}function respondWithResult(_0x8b1ax1a,_0x8b1ax1b){_0x8b1ax1b= _0x8b1ax1b|| 200;return function(_0x8b1ax1c){if(_0x8b1ax1c){return _0x8b1ax1a[_0xacb3[28]](_0x8b1ax1b)[_0xacb3[29]](_0x8b1ax1c)}}}function respondWithFilteredResult(_0x8b1ax1a,_0x8b1ax1f){return function(_0x8b1ax1c){if(_0x8b1ax1c){var _0x8b1ax20=_0x8b1ax1c[_0xacb3[30]],_0x8b1ax21=_0x8b1ax1f[_0xacb3[31]],_0x8b1ax22=_0x8b1ax1f[_0xacb3[31]]+ _0x8b1ax1f[_0xacb3[32]],_0x8b1ax1b;if(_0x8b1ax22>= _0x8b1ax20){_0x8b1ax22= _0x8b1ax20;_0x8b1ax1b= 200}else {_0x8b1ax1b= 206};_0x8b1ax1a[_0xacb3[28]](_0x8b1ax1b);return _0x8b1ax1a[_0xacb3[36]](_0xacb3[33],_0x8b1ax21+ _0xacb3[34]+ _0x8b1ax22+ _0xacb3[35]+ _0x8b1ax20)[_0xacb3[29]](_0x8b1ax1c)};return null}}function patchUpdates(_0x8b1ax24){return function(_0x8b1ax1c){try{jsonpatch[_0xacb3[37]](_0x8b1ax1c,_0x8b1ax24,true)}catch(err){return BPromise[_0xacb3[38]](err)};return _0x8b1ax1c[_0xacb3[39]]()}}function saveUpdates(_0x8b1ax26,_0x8b1ax1b){return function(_0x8b1ax1c){if(_0x8b1ax1c){return _0x8b1ax1c[_0xacb3[41]](_0x8b1ax26)[_0xacb3[40]](function(_0x8b1ax27){return _0x8b1ax27})};return null}}function removeEntity(_0x8b1ax1a,_0x8b1ax1b){return function(_0x8b1ax1c){if(_0x8b1ax1c){return _0x8b1ax1c[_0xacb3[42]]()[_0xacb3[40]](function(){_0x8b1ax1a[_0xacb3[28]](204)[_0xacb3[27]]()})}}}function handleEntityNotFound(_0x8b1ax1a,_0x8b1ax1b){return function(_0x8b1ax1c){if(!_0x8b1ax1c){_0x8b1ax1a[_0xacb3[26]](404)};return _0x8b1ax1c}}function handleError(_0x8b1ax1a,_0x8b1ax1b){_0x8b1ax1b= _0x8b1ax1b|| 500;return function(_0x8b1ax2b){logger[_0xacb3[44]](_0x8b1ax2b[_0xacb3[43]]);if(_0x8b1ax2b[_0xacb3[45]]){delete _0x8b1ax2b[_0xacb3[45]]};_0x8b1ax1a[_0xacb3[28]](_0x8b1ax1b)[_0xacb3[46]](_0x8b1ax2b)}}exports[_0xacb3[47]]= function(_0x8b1ax2c,_0x8b1ax1a){var _0x8b1ax1f={},_0x8b1ax2d={},_0x8b1ax2e={count:0,rows:[]};_0x8b1ax2d[_0xacb3[48]]= _[_0xacb3[51]](db[_0xacb3[50]][_0xacb3[49]]);var _0x8b1ax2f={dateStart:_0x8b1ax2c[_0xacb3[53]][_0xacb3[52]],dateEnd:_0x8b1ax2c[_0xacb3[53]][_0xacb3[54]]};delete _0x8b1ax2c[_0xacb3[53]][_0xacb3[52]];delete _0x8b1ax2c[_0xacb3[53]][_0xacb3[54]];_0x8b1ax2d[_0xacb3[53]]= _[_0xacb3[51]](_0x8b1ax2c[_0xacb3[53]]);_0x8b1ax2d[_0xacb3[55]]= _[_0xacb3[56]](_0x8b1ax2d[_0xacb3[48]],_0x8b1ax2d[_0xacb3[53]]);_0x8b1ax1f[_0xacb3[57]]= _[_0xacb3[56]](_0x8b1ax2d[_0xacb3[48]],qs[_0xacb3[58]](_0x8b1ax2c[_0xacb3[53]][_0xacb3[58]]));_0x8b1ax1f[_0xacb3[57]]= (_0x8b1ax1f[_0xacb3[57]][_0xacb3[59]])?_0x8b1ax1f[_0xacb3[57]]:_0x8b1ax2d[_0xacb3[48]];if(!_0x8b1ax2c[_0xacb3[53]][_0xacb3[61]](_0xacb3[60])){_0x8b1ax1f[_0xacb3[32]]= qs[_0xacb3[32]](_0x8b1ax2c[_0xacb3[53]][_0xacb3[32]]);_0x8b1ax1f[_0xacb3[31]]= qs[_0xacb3[31]](_0x8b1ax2c[_0xacb3[53]][_0xacb3[31]])};_0x8b1ax1f[_0xacb3[62]]= qs[_0xacb3[63]](_0x8b1ax2c[_0xacb3[53]][_0xacb3[63]]);_0x8b1ax1f[_0xacb3[64]]= qs[_0xacb3[55]](_[_0xacb3[65]](_0x8b1ax2c[_0xacb3[53]],_0x8b1ax2d[_0xacb3[55]]));if(_0x8b1ax2f[_0xacb3[52]]){if(_0x8b1ax2f[_0xacb3[54]]){_0x8b1ax2f[_0xacb3[54]]= moment(_0x8b1ax2f[_0xacb3[54]])[_0xacb3[67]](1,_0xacb3[66])}else {_0x8b1ax2f[_0xacb3[54]]= moment(_0x8b1ax2f[_0xacb3[52]])[_0xacb3[67]](1,_0xacb3[66])};_[_0xacb3[68]](_0x8b1ax1f[_0xacb3[64]],{createdAt:{$gte:_0x8b1ax2f[_0xacb3[52]],$lte:_0x8b1ax2f[_0xacb3[54]]}})};if(_0x8b1ax2c[_0xacb3[53]][_0xacb3[69]]){_0x8b1ax1f[_0xacb3[64]]= _[_0xacb3[68]](_0x8b1ax1f[_0xacb3[64]],{$or:_[_0xacb3[71]](_0x8b1ax1f[_0xacb3[57]],function(_0x8b1ax30){var _0x8b1ax2e={};_0x8b1ax2e[_0x8b1ax30]= {$like:_0xacb3[70]+ _0x8b1ax2c[_0xacb3[53]][_0xacb3[69]]+ _0xacb3[70]};return _0x8b1ax2e})})};_0x8b1ax1f= _[_0xacb3[68]]({},_0x8b1ax1f,_0x8b1ax2c[_0xacb3[72]]);var _0x8b1ax31={where:_0x8b1ax1f[_0xacb3[64]]};return db[_0xacb3[50]][_0xacb3[30]](_0x8b1ax31)[_0xacb3[40]](function(_0x8b1ax20){_0x8b1ax2e[_0xacb3[30]]= _0x8b1ax20;if(_0x8b1ax2c[_0xacb3[53]][_0xacb3[75]]){_0x8b1ax1f[_0xacb3[76]]= [{all:true}]};return db[_0xacb3[50]][_0xacb3[77]](_0x8b1ax1f)})[_0xacb3[40]](function(_0x8b1ax32){_0x8b1ax2e[_0xacb3[74]]= _0x8b1ax32;return _0x8b1ax2e})[_0xacb3[40]](respondWithFilteredResult(_0x8b1ax1a,_0x8b1ax1f))[_0xacb3[73]](handleError(_0x8b1ax1a,null))};exports[_0xacb3[78]]= function(_0x8b1ax2c,_0x8b1ax1a){var _0x8b1ax1f={raw:true,where:{id:_0x8b1ax2c[_0xacb3[80]][_0xacb3[79]]}},_0x8b1ax2d={};_0x8b1ax2d[_0xacb3[48]]= _[_0xacb3[51]](db[_0xacb3[50]][_0xacb3[49]]);_0x8b1ax2d[_0xacb3[53]]= _[_0xacb3[51]](_0x8b1ax2c[_0xacb3[53]]);_0x8b1ax2d[_0xacb3[55]]= _[_0xacb3[56]](_0x8b1ax2d[_0xacb3[48]],_0x8b1ax2d[_0xacb3[53]]);_0x8b1ax1f[_0xacb3[57]]= _[_0xacb3[56]](_0x8b1ax2d[_0xacb3[48]],qs[_0xacb3[58]](_0x8b1ax2c[_0xacb3[53]][_0xacb3[58]]));_0x8b1ax1f[_0xacb3[57]]= (_0x8b1ax1f[_0xacb3[57]][_0xacb3[59]])?_0x8b1ax1f[_0xacb3[57]]:_0x8b1ax2d[_0xacb3[48]];if(_0x8b1ax2c[_0xacb3[53]][_0xacb3[75]]){_0x8b1ax1f[_0xacb3[76]]= [{all:true}]};_0x8b1ax1f= _[_0xacb3[68]]({},_0x8b1ax1f,_0x8b1ax2c[_0xacb3[72]]);return db[_0xacb3[50]][_0xacb3[81]](_0x8b1ax1f)[_0xacb3[40]](handleEntityNotFound(_0x8b1ax1a,null))[_0xacb3[40]](respondWithResult(_0x8b1ax1a,null))[_0xacb3[73]](handleError(_0x8b1ax1a,null))};exports[_0xacb3[82]]= function(_0x8b1ax2c,_0x8b1ax1a){return db[_0xacb3[50]][_0xacb3[82]](_0x8b1ax2c[_0xacb3[83]],{})[_0xacb3[40]](respondWithResult(_0x8b1ax1a,201))[_0xacb3[73]](handleError(_0x8b1ax1a,null))};exports[_0xacb3[41]]= function(_0x8b1ax2c,_0x8b1ax1a){if(_0x8b1ax2c[_0xacb3[83]][_0xacb3[79]]){delete _0x8b1ax2c[_0xacb3[83]][_0xacb3[79]]};return db[_0xacb3[50]][_0xacb3[81]]({where:{id:_0x8b1ax2c[_0xacb3[80]][_0xacb3[79]]}})[_0xacb3[40]](handleEntityNotFound(_0x8b1ax1a,null))[_0xacb3[40]](saveUpdates(_0x8b1ax2c[_0xacb3[83]],null))[_0xacb3[40]](respondWithResult(_0x8b1ax1a,null))[_0xacb3[73]](handleError(_0x8b1ax1a,null))};exports[_0xacb3[42]]= function(_0x8b1ax2c,_0x8b1ax1a){return db[_0xacb3[50]][_0xacb3[81]]({where:{id:_0x8b1ax2c[_0xacb3[80]][_0xacb3[79]]}})[_0xacb3[40]](handleEntityNotFound(_0x8b1ax1a,null))[_0xacb3[40]](removeEntity(_0x8b1ax1a,null))[_0xacb3[73]](handleError(_0x8b1ax1a,null))}
\ No newline at end of file
index 957b5b8..1127e4b 100644 (file)
@@ -1 +1 @@
-var _0x2741=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x61\x72\x69\x61\x62\x6C\x65","\x74\x6F\x6F\x6C\x73\x5F\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x2741[0];var _=require(_0x2741[1]);var util=require(_0x2741[2]);var logger=require(_0x2741[4])(_0x2741[3]);var moment=require(_0x2741[5]);var BPromise=require(_0x2741[6]);var rp=require(_0x2741[7]);var attributes=require(_0x2741[8]);module[_0x2741[9]]= function(_0x5f00x8,_0x5f00x9){return _0x5f00x8[_0x2741[12]](_0x2741[10],attributes,{tableName:_0x2741[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x1459=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x61\x72\x69\x61\x62\x6C\x65","\x74\x6F\x6F\x6C\x73\x5F\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x1459[0];var _=require(_0x1459[1]);var util=require(_0x1459[2]);var logger=require(_0x1459[4])(_0x1459[3]);var moment=require(_0x1459[5]);var BPromise=require(_0x1459[6]);var rp=require(_0x1459[7]);var attributes=require(_0x1459[8]);module[_0x1459[9]]= function(_0xc018x8,_0xc018x9){return _0xc018x8[_0x1459[12]](_0x1459[10],attributes,{tableName:_0x1459[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 5b87513..c4a894e 100644 (file)
@@ -1 +1 @@
-var _0xd562=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x61\x72\x69\x61\x62\x6C\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x61\x72\x69\x61\x62\x6C\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x53\x68\x6F\x77\x56\x61\x72\x69\x61\x62\x6C\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64","\x56\x61\x72\x69\x61\x62\x6C\x65"];_0xd562[0];var _=require(_0xd562[1]);var util=require(_0xd562[2]);var moment=require(_0xd562[3]);var BPromise=require(_0xd562[4]);var rs=require(_0xd562[5]);var fs=require(_0xd562[6]);var db=require(_0xd562[8])[_0xd562[7]];var utils=require(_0xd562[9]);var logger=require(_0xd562[11])(_0xd562[10]);var config=require(_0xd562[12]);var jayson=require(_0xd562[13]);var client=jayson[_0xd562[15]][_0xd562[14]]({port:9002});function respondWithRpcPromise(_0xb1d4xe,_0xb1d4xf,_0xb1d4x10){return  new BPromise(function(_0xb1d4x11,_0xb1d4x12){return client[_0xd562[28]](_0xb1d4xe,_0xb1d4x10)[_0xd562[27]](function(_0xb1d4x14){logger[_0xd562[20]](_0xd562[16],_0xb1d4xf,_0xd562[19]);logger[_0xd562[23]](_0xd562[21],_0xb1d4xf,_0xd562[19],JSON[_0xd562[22]](_0xb1d4x14));if(_0xb1d4x14[_0xd562[17]]){if(_0xb1d4x14[_0xd562[17]][_0xd562[24]]=== 500){logger[_0xd562[17]](_0xd562[16],_0xb1d4xf,_0xb1d4x14[_0xd562[17]][_0xd562[25]]);return _0xb1d4x12(_0xb1d4x14[_0xd562[17]][_0xd562[25]])};logger[_0xd562[17]](_0xd562[16],_0xb1d4xf,_0xb1d4x14[_0xd562[17]][_0xd562[25]]);return _0xb1d4x11(_0xb1d4x14[_0xd562[17]][_0xd562[25]])}else {logger[_0xd562[20]](_0xd562[16],_0xb1d4xf,_0xd562[19]);_0xb1d4x11(_0xb1d4x14[_0xd562[26]][_0xd562[25]])}})[_0xd562[18]](function(_0xb1d4x13){logger[_0xd562[17]](_0xd562[16],_0xb1d4xf,_0xb1d4x13);_0xb1d4x12(_0xb1d4x13)})})}exports[_0xd562[29]]= function(_0xb1d4x10){var _0xb1d4x15=this;return  new Promise(function(_0xb1d4x11,_0xb1d4x12){return db[_0xd562[39]][_0xd562[38]]({raw:_0xb1d4x10[_0xd562[30]]?(_0xb1d4x10[_0xd562[30]][_0xd562[31]]=== undefined)?true:false:true,where:_0xb1d4x10[_0xd562[30]]?_0xb1d4x10[_0xd562[30]][_0xd562[32]]|| null:null,attributes:_0xb1d4x10[_0xd562[30]]?_0xb1d4x10[_0xd562[30]][_0xd562[33]]|| null:null,include:_0xb1d4x10[_0xd562[30]]?(_0xb1d4x10[_0xd562[30]][_0xd562[34]]?_[_0xd562[37]](_0xb1d4x10[_0xd562[30]][_0xd562[34]],function(_0xb1d4x16){return {model:db[_0xb1d4x16[_0xd562[35]]],as:_0xb1d4x16[_0xd562[36]],attributes:_0xb1d4x16[_0xd562[33]],include:_0xb1d4x16[_0xd562[34]]?_[_0xd562[37]](_0xb1d4x16[_0xd562[34]],function(_0xb1d4x17){return {model:db[_0xb1d4x17[_0xd562[35]]],as:_0xb1d4x17[_0xd562[36]],attributes:_0xb1d4x17[_0xd562[33]],include:_0xb1d4x17[_0xd562[34]]?_[_0xd562[37]](_0xb1d4x17[_0xd562[34]],function(_0xb1d4x18){return {model:db[_0xb1d4x18[_0xd562[35]]],as:_0xb1d4x18[_0xd562[36]],attributes:_0xb1d4x18[_0xd562[33]]}}):[]}}):[]}}):[]):[]})[_0xd562[27]](function(_0xb1d4x14){logger[_0xd562[20]](_0xd562[29],_0xb1d4x10);logger[_0xd562[23]](_0xd562[29],_0xb1d4x10,JSON[_0xd562[22]](_0xb1d4x14));_0xb1d4x11(_0xb1d4x14)})[_0xd562[18]](function(_0xb1d4x13){logger[_0xd562[17]](_0xd562[29],_0xb1d4x13[_0xd562[25]],_0xb1d4x10);_0xb1d4x12(_0xb1d4x15[_0xd562[17]](500,_0xb1d4x13[_0xd562[25]]))})})}
\ No newline at end of file
+var _0x47fe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x61\x72\x69\x61\x62\x6C\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x61\x72\x69\x61\x62\x6C\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x53\x68\x6F\x77\x56\x61\x72\x69\x61\x62\x6C\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64","\x56\x61\x72\x69\x61\x62\x6C\x65"];_0x47fe[0];var _=require(_0x47fe[1]);var util=require(_0x47fe[2]);var moment=require(_0x47fe[3]);var BPromise=require(_0x47fe[4]);var rs=require(_0x47fe[5]);var fs=require(_0x47fe[6]);var db=require(_0x47fe[8])[_0x47fe[7]];var utils=require(_0x47fe[9]);var logger=require(_0x47fe[11])(_0x47fe[10]);var config=require(_0x47fe[12]);var jayson=require(_0x47fe[13]);var client=jayson[_0x47fe[15]][_0x47fe[14]]({port:9002});function respondWithRpcPromise(_0x8427xe,_0x8427xf,_0x8427x10){return  new BPromise(function(_0x8427x11,_0x8427x12){return client[_0x47fe[28]](_0x8427xe,_0x8427x10)[_0x47fe[27]](function(_0x8427x14){logger[_0x47fe[20]](_0x47fe[16],_0x8427xf,_0x47fe[19]);logger[_0x47fe[23]](_0x47fe[21],_0x8427xf,_0x47fe[19],JSON[_0x47fe[22]](_0x8427x14));if(_0x8427x14[_0x47fe[17]]){if(_0x8427x14[_0x47fe[17]][_0x47fe[24]]=== 500){logger[_0x47fe[17]](_0x47fe[16],_0x8427xf,_0x8427x14[_0x47fe[17]][_0x47fe[25]]);return _0x8427x12(_0x8427x14[_0x47fe[17]][_0x47fe[25]])};logger[_0x47fe[17]](_0x47fe[16],_0x8427xf,_0x8427x14[_0x47fe[17]][_0x47fe[25]]);return _0x8427x11(_0x8427x14[_0x47fe[17]][_0x47fe[25]])}else {logger[_0x47fe[20]](_0x47fe[16],_0x8427xf,_0x47fe[19]);_0x8427x11(_0x8427x14[_0x47fe[26]][_0x47fe[25]])}})[_0x47fe[18]](function(_0x8427x13){logger[_0x47fe[17]](_0x47fe[16],_0x8427xf,_0x8427x13);_0x8427x12(_0x8427x13)})})}exports[_0x47fe[29]]= function(_0x8427x10){var _0x8427x15=this;return  new Promise(function(_0x8427x11,_0x8427x12){return db[_0x47fe[39]][_0x47fe[38]]({raw:_0x8427x10[_0x47fe[30]]?(_0x8427x10[_0x47fe[30]][_0x47fe[31]]=== undefined)?true:false:true,where:_0x8427x10[_0x47fe[30]]?_0x8427x10[_0x47fe[30]][_0x47fe[32]]|| null:null,attributes:_0x8427x10[_0x47fe[30]]?_0x8427x10[_0x47fe[30]][_0x47fe[33]]|| null:null,include:_0x8427x10[_0x47fe[30]]?(_0x8427x10[_0x47fe[30]][_0x47fe[34]]?_[_0x47fe[37]](_0x8427x10[_0x47fe[30]][_0x47fe[34]],function(_0x8427x16){return {model:db[_0x8427x16[_0x47fe[35]]],as:_0x8427x16[_0x47fe[36]],attributes:_0x8427x16[_0x47fe[33]],include:_0x8427x16[_0x47fe[34]]?_[_0x47fe[37]](_0x8427x16[_0x47fe[34]],function(_0x8427x17){return {model:db[_0x8427x17[_0x47fe[35]]],as:_0x8427x17[_0x47fe[36]],attributes:_0x8427x17[_0x47fe[33]],include:_0x8427x17[_0x47fe[34]]?_[_0x47fe[37]](_0x8427x17[_0x47fe[34]],function(_0x8427x18){return {model:db[_0x8427x18[_0x47fe[35]]],as:_0x8427x18[_0x47fe[36]],attributes:_0x8427x18[_0x47fe[33]]}}):[]}}):[]}}):[]):[]})[_0x47fe[27]](function(_0x8427x14){logger[_0x47fe[20]](_0x47fe[29],_0x8427x10);logger[_0x47fe[23]](_0x47fe[29],_0x8427x10,JSON[_0x47fe[22]](_0x8427x14));_0x8427x11(_0x8427x14)})[_0x47fe[18]](function(_0x8427x13){logger[_0x47fe[17]](_0x47fe[29],_0x8427x13[_0x47fe[25]],_0x8427x10);_0x8427x12(_0x8427x15[_0x47fe[17]](500,_0x8427x13[_0x47fe[25]]))})})}
\ No newline at end of file
index 522abc2..fc7aa30 100644 (file)
@@ -1 +1 @@
-var _0xc4e5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x76\x65\x72\x73\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x66\x65\x74\x63\x68","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x63\x61\x6E\x55\x70\x64\x61\x74\x65","\x66\x65\x74\x63\x68","\x2F\x72\x65\x73\x65\x74","\x72\x65\x73\x65\x74","\x2F\x70\x75\x6C\x6C","\x70\x75\x6C\x6C","\x2F\x72\x65\x73\x74\x61\x72\x74","\x72\x65\x73\x74\x61\x72\x74","\x2F\x6D\x69\x67\x72\x61\x74\x69\x6F\x6E\x73","\x6D\x69\x67\x72\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xc4e5[0];var express=require(_0xc4e5[1]);var router=express.Router();var auth=require(_0xc4e5[2]);var controller=require(_0xc4e5[3]);router[_0xc4e5[6]](_0xc4e5[4],controller[_0xc4e5[5]]);router[_0xc4e5[6]](_0xc4e5[7],auth[_0xc4e5[8]](),auth[_0xc4e5[9]](),controller[_0xc4e5[10]]);router[_0xc4e5[6]](_0xc4e5[11],auth[_0xc4e5[8]](),auth[_0xc4e5[9]](),controller[_0xc4e5[12]]);router[_0xc4e5[6]](_0xc4e5[13],auth[_0xc4e5[8]](),auth[_0xc4e5[9]](),controller[_0xc4e5[14]]);router[_0xc4e5[6]](_0xc4e5[15],auth[_0xc4e5[8]](),controller[_0xc4e5[16]]);router[_0xc4e5[6]](_0xc4e5[17],controller[_0xc4e5[18]]);module[_0xc4e5[19]]= router
\ No newline at end of file
+var _0x1e72=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x76\x65\x72\x73\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x66\x65\x74\x63\x68","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x63\x61\x6E\x55\x70\x64\x61\x74\x65","\x66\x65\x74\x63\x68","\x2F\x72\x65\x73\x65\x74","\x72\x65\x73\x65\x74","\x2F\x70\x75\x6C\x6C","\x70\x75\x6C\x6C","\x2F\x72\x65\x73\x74\x61\x72\x74","\x72\x65\x73\x74\x61\x72\x74","\x2F\x6D\x69\x67\x72\x61\x74\x69\x6F\x6E\x73","\x6D\x69\x67\x72\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x1e72[0];var express=require(_0x1e72[1]);var router=express.Router();var auth=require(_0x1e72[2]);var controller=require(_0x1e72[3]);router[_0x1e72[6]](_0x1e72[4],controller[_0x1e72[5]]);router[_0x1e72[6]](_0x1e72[7],auth[_0x1e72[8]](),auth[_0x1e72[9]](),controller[_0x1e72[10]]);router[_0x1e72[6]](_0x1e72[11],auth[_0x1e72[8]](),auth[_0x1e72[9]](),controller[_0x1e72[12]]);router[_0x1e72[6]](_0x1e72[13],auth[_0x1e72[8]](),auth[_0x1e72[9]](),controller[_0x1e72[14]]);router[_0x1e72[6]](_0x1e72[15],auth[_0x1e72[8]](),controller[_0x1e72[16]]);router[_0x1e72[6]](_0x1e72[17],controller[_0x1e72[18]]);module[_0x1e72[19]]= router
\ No newline at end of file
index 83b7164..848fb93 100644 (file)
@@ -1 +1 @@
-var _0xfb0e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x6D\x7A\x75\x67","\x70\x61\x74\x68","\x76\x65\x72\x73\x69\x6F\x6E","\x70\x6B\x67\x69\x6E\x66\x6F","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x70\x6D\x32","\x75\x70\x64\x61\x74\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x72\x6F\x6F\x74","\x73\x69\x6D\x70\x6C\x65\x2D\x67\x69\x74","\x69\x6E\x64\x65\x78","\x65\x78\x70\x6F\x72\x74\x73","\x71\x75\x65\x72\x79","\x6C\x61\x74\x65\x73\x74","\x32\x2E\x30\x2E\x30","\x6A\x73\x6F\x6E","\x73\x74\x61\x74\x75\x73","\x74\x61\x67\x73","\x66\x65\x74\x63\x68","\x6F\x72\x69\x67\x69\x6E","\x6D\x61\x73\x74\x65\x72","\x65\x72\x72\x6F\x72","\x67\x69\x74\x20\x66\x65\x74\x63\x68","\x69\x6E\x66\x6F","\x67\x69\x74\x20\x66\x65\x74\x63\x68\x20\x6F\x72\x69\x67\x69\x6E\x20\x6D\x61\x73\x74\x65\x72","\x72\x65\x73\x65\x74","\x2D\x2D\x68\x61\x72\x64","\x46\x45\x54\x43\x48\x5F\x48\x45\x41\x44","\x67\x69\x74\x20\x72\x65\x73\x65\x74\x20\x2D\x2D\x68\x61\x72\x64\x20\x46\x45\x54\x43\x48\x5F\x48\x45\x41\x44","\x67\x69\x74\x20\x72\x65\x73\x65\x74\x20\x2D\x2D\x68\x61\x72\x64","\x70\x75\x6C\x6C","\x6E\x70\x6D\x20\x69\x6E\x73\x74\x61\x6C\x6C\x20\x2D\x2D\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x72\x65\x73\x74\x61\x72\x74","\x63\x61\x74\x63\x68","\x70\x6D\x32\x20\x72\x65\x73\x74\x61\x72\x74\x20\x6D\x6F\x74\x69\x6F\x6E\x20\x25\x73","\x59\x6F\x75\x72\x20\x73\x79\x73\x74\x65\x6D\x20\x68\x61\x73\x20\x62\x65\x65\x6E\x20\x72\x65\x73\x74\x61\x72\x74\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79","\x74\x68\x65\x6E","\x6D\x6F\x74\x69\x6F\x6E\x32","\x6D\x69\x67\x72\x61\x74\x69\x6F\x6E\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x4D\x69\x67\x72\x61\x74\x69\x6F\x6E","\x67\x65\x74\x51\x75\x65\x72\x79\x49\x6E\x74\x65\x72\x66\x61\x63\x65","\x63\x6F\x6E\x73\x74\x72\x75\x63\x74\x6F\x72","\x4D\x69\x67\x72\x61\x74\x69\x6F\x6E\x20\x74\x72\x69\x65\x64\x20\x74\x6F\x20\x75\x73\x65\x20\x6F\x6C\x64\x20\x73\x74\x79\x6C\x65\x20\x22\x64\x6F\x6E\x65\x22\x20\x63\x61\x6C\x6C\x62\x61\x63\x6B\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x75\x70\x67\x72\x61\x64\x65\x20\x74\x6F\x20\x22\x75\x6D\x7A\x75\x67\x22\x20\x61\x6E\x64\x20\x72\x65\x74\x75\x72\x6E\x20\x61\x20\x70\x72\x6F\x6D\x69\x73\x65\x20\x69\x6E\x73\x74\x65\x61\x64\x2E","\x73\x65\x72\x76\x65\x72","\x6A\x6F\x69\x6E","\x44\x61\x74\x61\x62\x61\x73\x65\x20\x4D\x69\x67\x72\x61\x74\x69\x6F\x6E\x20\x43\x6F\x6D\x70\x6C\x65\x74\x65\x64\x21","\x2E\x6A\x73","\x75\x70"];_0xfb0e[0];var Umzug=require(_0xfb0e[1]);var path=require(_0xfb0e[2]);var pkginfo=require(_0xfb0e[4])(module,_0xfb0e[3]);var exec=require(_0xfb0e[6])[_0xfb0e[5]];var db=require(_0xfb0e[8])[_0xfb0e[7]];var config=require(_0xfb0e[9]);var pm2=require(_0xfb0e[10]);var logger=require(_0xfb0e[12])(_0xfb0e[11]);var git=require(_0xfb0e[14])(config[_0xfb0e[13]]);exports[_0xfb0e[15]]= function(_0x4c3dxa,_0x4c3dxb){var _0x4c3dxc={current:module[_0xfb0e[16]][_0xfb0e[3]],phonebar:2};if(_0x4c3dxa[_0xfb0e[17]]&& _0x4c3dxa[_0xfb0e[17]][_0xfb0e[18]]){return git[_0xfb0e[23]]()[_0xfb0e[22]](function(_0x4c3dxd,_0x4c3dxe){_0x4c3dxc[_0xfb0e[18]]= (_0x4c3dxd?module[_0xfb0e[16]][_0xfb0e[3]]:_0x4c3dxe[_0xfb0e[18]])|| _0xfb0e[19];return _0x4c3dxb[_0xfb0e[21]](200)[_0xfb0e[20]](_0x4c3dxc)})}else {return _0x4c3dxb[_0xfb0e[21]](200)[_0xfb0e[20]](_0x4c3dxc)}};exports[_0xfb0e[23]]= function(_0x4c3dxa,_0x4c3dxb){return git[_0xfb0e[23]]([_0xfb0e[24],_0xfb0e[25]],function(_0x4c3dxd){if(_0x4c3dxd){logger[_0xfb0e[26]](_0x4c3dxd);return _0x4c3dxb[_0xfb0e[21]](500)[_0xfb0e[20]](_0x4c3dxd)};logger[_0xfb0e[28]](_0xfb0e[27]);return _0x4c3dxb[_0xfb0e[21]](200)[_0xfb0e[20]]({output:_0xfb0e[29]})})};exports[_0xfb0e[30]]= function(_0x4c3dxa,_0x4c3dxb){return git[_0xfb0e[30]]([_0xfb0e[31],_0xfb0e[32]],function(_0x4c3dxd){if(_0x4c3dxd){logger[_0xfb0e[26]](_0x4c3dxd);return _0x4c3dxb[_0xfb0e[21]](500)[_0xfb0e[20]](_0x4c3dxd)};logger[_0xfb0e[28]](_0xfb0e[33]);return _0x4c3dxb[_0xfb0e[21]](200)[_0xfb0e[20]]({output:_0xfb0e[34]})})};exports[_0xfb0e[35]]= function(_0x4c3dxa,_0x4c3dxb){exec(_0xfb0e[36],function(_0x4c3dxd,_0x4c3dxf,_0x4c3dx10){logger[_0xfb0e[28]](_0x4c3dxf);logger[_0xfb0e[28]](_0x4c3dx10);if(_0x4c3dxd){logger[_0xfb0e[26]](_0x4c3dxd);return _0x4c3dxb[_0xfb0e[21]](500)[_0xfb0e[20]](_0x4c3dxd)};return _0x4c3dxb[_0xfb0e[21]](200)[_0xfb0e[20]]({output:_0x4c3dxf})})};exports[_0xfb0e[37]]= function(_0x4c3dxa,_0x4c3dxb){return pm2[_0xfb0e[37]](_0xfb0e[42])[_0xfb0e[41]](function(_0x4c3dx11){logger[_0xfb0e[28]](_0xfb0e[39],_0x4c3dx11);return _0x4c3dxb[_0xfb0e[21]](200)[_0xfb0e[20]]({output:_0xfb0e[40]})})[_0xfb0e[38]](function(_0x4c3dxd){logger[_0xfb0e[26]](_0x4c3dxd);return _0x4c3dxb[_0xfb0e[21]](500)[_0xfb0e[20]](_0x4c3dxd)})};exports[_0xfb0e[43]]= function(_0x4c3dxa,_0x4c3dxb){var _0x4c3dx12= new Umzug({storage:_0xfb0e[44],storageOptions:{model:db[_0xfb0e[45]],modelName:_0xfb0e[45],columnName:_0xfb0e[3]},migrations:{params:[db[_0xfb0e[44]][_0xfb0e[46]](),db[_0xfb0e[44]][_0xfb0e[47]],function(){throw  new Error(_0xfb0e[48])}],path:path[_0xfb0e[50]](config[_0xfb0e[13]],_0xfb0e[49],_0xfb0e[43]),pattern:/\.js$/}});_0x4c3dx12[_0xfb0e[53]]({from:module[_0xfb0e[16]][_0xfb0e[3]]+ _0xfb0e[52]})[_0xfb0e[41]](function(){return _0x4c3dxb[_0xfb0e[21]](200)[_0xfb0e[20]]({output:_0xfb0e[51]})})[_0xfb0e[38]](function(_0x4c3dxd){return _0x4c3dxb[_0xfb0e[21]](500)[_0xfb0e[20]](_0x4c3dxd)})}
\ No newline at end of file
+var _0xe3ea=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x6D\x7A\x75\x67","\x70\x61\x74\x68","\x76\x65\x72\x73\x69\x6F\x6E","\x70\x6B\x67\x69\x6E\x66\x6F","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x70\x6D\x32","\x75\x70\x64\x61\x74\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x72\x6F\x6F\x74","\x73\x69\x6D\x70\x6C\x65\x2D\x67\x69\x74","\x69\x6E\x64\x65\x78","\x65\x78\x70\x6F\x72\x74\x73","\x71\x75\x65\x72\x79","\x6C\x61\x74\x65\x73\x74","\x32\x2E\x30\x2E\x30","\x6A\x73\x6F\x6E","\x73\x74\x61\x74\x75\x73","\x74\x61\x67\x73","\x66\x65\x74\x63\x68","\x6F\x72\x69\x67\x69\x6E","\x6D\x61\x73\x74\x65\x72","\x65\x72\x72\x6F\x72","\x67\x69\x74\x20\x66\x65\x74\x63\x68","\x69\x6E\x66\x6F","\x67\x69\x74\x20\x66\x65\x74\x63\x68\x20\x6F\x72\x69\x67\x69\x6E\x20\x6D\x61\x73\x74\x65\x72","\x72\x65\x73\x65\x74","\x2D\x2D\x68\x61\x72\x64","\x46\x45\x54\x43\x48\x5F\x48\x45\x41\x44","\x67\x69\x74\x20\x72\x65\x73\x65\x74\x20\x2D\x2D\x68\x61\x72\x64\x20\x46\x45\x54\x43\x48\x5F\x48\x45\x41\x44","\x67\x69\x74\x20\x72\x65\x73\x65\x74\x20\x2D\x2D\x68\x61\x72\x64","\x70\x75\x6C\x6C","\x6E\x70\x6D\x20\x69\x6E\x73\x74\x61\x6C\x6C\x20\x2D\x2D\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x72\x65\x73\x74\x61\x72\x74","\x63\x61\x74\x63\x68","\x70\x6D\x32\x20\x72\x65\x73\x74\x61\x72\x74\x20\x6D\x6F\x74\x69\x6F\x6E\x20\x25\x73","\x59\x6F\x75\x72\x20\x73\x79\x73\x74\x65\x6D\x20\x68\x61\x73\x20\x62\x65\x65\x6E\x20\x72\x65\x73\x74\x61\x72\x74\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79","\x74\x68\x65\x6E","\x6D\x6F\x74\x69\x6F\x6E\x32","\x6D\x69\x67\x72\x61\x74\x69\x6F\x6E\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x4D\x69\x67\x72\x61\x74\x69\x6F\x6E","\x67\x65\x74\x51\x75\x65\x72\x79\x49\x6E\x74\x65\x72\x66\x61\x63\x65","\x63\x6F\x6E\x73\x74\x72\x75\x63\x74\x6F\x72","\x4D\x69\x67\x72\x61\x74\x69\x6F\x6E\x20\x74\x72\x69\x65\x64\x20\x74\x6F\x20\x75\x73\x65\x20\x6F\x6C\x64\x20\x73\x74\x79\x6C\x65\x20\x22\x64\x6F\x6E\x65\x22\x20\x63\x61\x6C\x6C\x62\x61\x63\x6B\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x75\x70\x67\x72\x61\x64\x65\x20\x74\x6F\x20\x22\x75\x6D\x7A\x75\x67\x22\x20\x61\x6E\x64\x20\x72\x65\x74\x75\x72\x6E\x20\x61\x20\x70\x72\x6F\x6D\x69\x73\x65\x20\x69\x6E\x73\x74\x65\x61\x64\x2E","\x73\x65\x72\x76\x65\x72","\x6A\x6F\x69\x6E","\x44\x61\x74\x61\x62\x61\x73\x65\x20\x4D\x69\x67\x72\x61\x74\x69\x6F\x6E\x20\x43\x6F\x6D\x70\x6C\x65\x74\x65\x64\x21","\x2E\x6A\x73","\x75\x70"];_0xe3ea[0];var Umzug=require(_0xe3ea[1]);var path=require(_0xe3ea[2]);var pkginfo=require(_0xe3ea[4])(module,_0xe3ea[3]);var exec=require(_0xe3ea[6])[_0xe3ea[5]];var db=require(_0xe3ea[8])[_0xe3ea[7]];var config=require(_0xe3ea[9]);var pm2=require(_0xe3ea[10]);var logger=require(_0xe3ea[12])(_0xe3ea[11]);var git=require(_0xe3ea[14])(config[_0xe3ea[13]]);exports[_0xe3ea[15]]= function(_0x69e4xa,_0x69e4xb){var _0x69e4xc={current:module[_0xe3ea[16]][_0xe3ea[3]],phonebar:2};if(_0x69e4xa[_0xe3ea[17]]&& _0x69e4xa[_0xe3ea[17]][_0xe3ea[18]]){return git[_0xe3ea[23]]()[_0xe3ea[22]](function(_0x69e4xd,_0x69e4xe){_0x69e4xc[_0xe3ea[18]]= (_0x69e4xd?module[_0xe3ea[16]][_0xe3ea[3]]:_0x69e4xe[_0xe3ea[18]])|| _0xe3ea[19];return _0x69e4xb[_0xe3ea[21]](200)[_0xe3ea[20]](_0x69e4xc)})}else {return _0x69e4xb[_0xe3ea[21]](200)[_0xe3ea[20]](_0x69e4xc)}};exports[_0xe3ea[23]]= function(_0x69e4xa,_0x69e4xb){return git[_0xe3ea[23]]([_0xe3ea[24],_0xe3ea[25]],function(_0x69e4xd){if(_0x69e4xd){logger[_0xe3ea[26]](_0x69e4xd);return _0x69e4xb[_0xe3ea[21]](500)[_0xe3ea[20]](_0x69e4xd)};logger[_0xe3ea[28]](_0xe3ea[27]);return _0x69e4xb[_0xe3ea[21]](200)[_0xe3ea[20]]({output:_0xe3ea[29]})})};exports[_0xe3ea[30]]= function(_0x69e4xa,_0x69e4xb){return git[_0xe3ea[30]]([_0xe3ea[31],_0xe3ea[32]],function(_0x69e4xd){if(_0x69e4xd){logger[_0xe3ea[26]](_0x69e4xd);return _0x69e4xb[_0xe3ea[21]](500)[_0xe3ea[20]](_0x69e4xd)};logger[_0xe3ea[28]](_0xe3ea[33]);return _0x69e4xb[_0xe3ea[21]](200)[_0xe3ea[20]]({output:_0xe3ea[34]})})};exports[_0xe3ea[35]]= function(_0x69e4xa,_0x69e4xb){exec(_0xe3ea[36],function(_0x69e4xd,_0x69e4xf,_0x69e4x10){logger[_0xe3ea[28]](_0x69e4xf);logger[_0xe3ea[28]](_0x69e4x10);if(_0x69e4xd){logger[_0xe3ea[26]](_0x69e4xd);return _0x69e4xb[_0xe3ea[21]](500)[_0xe3ea[20]](_0x69e4xd)};return _0x69e4xb[_0xe3ea[21]](200)[_0xe3ea[20]]({output:_0x69e4xf})})};exports[_0xe3ea[37]]= function(_0x69e4xa,_0x69e4xb){return pm2[_0xe3ea[37]](_0xe3ea[42])[_0xe3ea[41]](function(_0x69e4x11){logger[_0xe3ea[28]](_0xe3ea[39],_0x69e4x11);return _0x69e4xb[_0xe3ea[21]](200)[_0xe3ea[20]]({output:_0xe3ea[40]})})[_0xe3ea[38]](function(_0x69e4xd){logger[_0xe3ea[26]](_0x69e4xd);return _0x69e4xb[_0xe3ea[21]](500)[_0xe3ea[20]](_0x69e4xd)})};exports[_0xe3ea[43]]= function(_0x69e4xa,_0x69e4xb){var _0x69e4x12= new Umzug({storage:_0xe3ea[44],storageOptions:{model:db[_0xe3ea[45]],modelName:_0xe3ea[45],columnName:_0xe3ea[3]},migrations:{params:[db[_0xe3ea[44]][_0xe3ea[46]](),db[_0xe3ea[44]][_0xe3ea[47]],function(){throw  new Error(_0xe3ea[48])}],path:path[_0xe3ea[50]](config[_0xe3ea[13]],_0xe3ea[49],_0xe3ea[43]),pattern:/\.js$/}});_0x69e4x12[_0xe3ea[53]]({from:module[_0xe3ea[16]][_0xe3ea[3]]+ _0xe3ea[52]})[_0xe3ea[41]](function(){return _0x69e4xb[_0xe3ea[21]](200)[_0xe3ea[20]]({output:_0xe3ea[51]})})[_0xe3ea[38]](function(_0x69e4xd){return _0x69e4xb[_0xe3ea[21]](500)[_0xe3ea[20]](_0x69e4xd)})}
\ No newline at end of file
index 95b9e2c..283c2b2 100644 (file)
@@ -1 +1 @@
-var _0x659d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x659d[0];var multer=require(_0x659d[1]);var util=require(_0x659d[2]);var path=require(_0x659d[3]);var express=require(_0x659d[4]);var router=express.Router();var auth=require(_0x659d[5]);var interaction=require(_0x659d[6]);var config=require(_0x659d[7]);var controller=require(_0x659d[8]);router[_0x659d[12]](_0x659d[9],auth[_0x659d[10]](),controller[_0x659d[11]]);router[_0x659d[12]](_0x659d[13],auth[_0x659d[10]](),controller[_0x659d[14]]);router[_0x659d[12]](_0x659d[15],auth[_0x659d[10]](),controller[_0x659d[16]]);router[_0x659d[18]](_0x659d[9],auth[_0x659d[10]](),controller[_0x659d[17]]);router[_0x659d[20]](_0x659d[15],auth[_0x659d[10]](),controller[_0x659d[19]]);router[_0x659d[22]](_0x659d[15],auth[_0x659d[10]](),controller[_0x659d[21]]);module[_0x659d[23]]= router
\ No newline at end of file
+var _0x3e1e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x3e1e[0];var multer=require(_0x3e1e[1]);var util=require(_0x3e1e[2]);var path=require(_0x3e1e[3]);var express=require(_0x3e1e[4]);var router=express.Router();var auth=require(_0x3e1e[5]);var interaction=require(_0x3e1e[6]);var config=require(_0x3e1e[7]);var controller=require(_0x3e1e[8]);router[_0x3e1e[12]](_0x3e1e[9],auth[_0x3e1e[10]](),controller[_0x3e1e[11]]);router[_0x3e1e[12]](_0x3e1e[13],auth[_0x3e1e[10]](),controller[_0x3e1e[14]]);router[_0x3e1e[12]](_0x3e1e[15],auth[_0x3e1e[10]](),controller[_0x3e1e[16]]);router[_0x3e1e[18]](_0x3e1e[9],auth[_0x3e1e[10]](),controller[_0x3e1e[17]]);router[_0x3e1e[20]](_0x3e1e[15],auth[_0x3e1e[10]](),controller[_0x3e1e[19]]);router[_0x3e1e[22]](_0x3e1e[15],auth[_0x3e1e[10]](),controller[_0x3e1e[21]]);module[_0x3e1e[23]]= router
\ No newline at end of file
index 2a8ed13..42087bf 100644 (file)
@@ -1 +1 @@
-var _0xc7e8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0xc7e8[0];var Sequelize=require(_0xc7e8[1]);module[_0xc7e8[2]]= {type:{type:Sequelize[_0xc7e8[3]]},uniqueid:{type:Sequelize[_0xc7e8[3]]},calleridnum:{type:Sequelize[_0xc7e8[3]]},calleridname:{type:Sequelize[_0xc7e8[3]]},queue:{type:Sequelize[_0xc7e8[3]]},interface:{type:Sequelize[_0xc7e8[3]]},membername:{type:Sequelize[_0xc7e8[3]]},agentcalledAt:{type:Sequelize[_0xc7e8[4]]},agentconnectAt:{type:Sequelize[_0xc7e8[4]]},agentcompleteAt:{type:Sequelize[_0xc7e8[4]]},agentringnoanswerAt:{type:Sequelize[_0xc7e8[4]]},agentdumpAt:{type:Sequelize[_0xc7e8[4]]},holdtime:{type:Sequelize[_0xc7e8[5]]},agentcomplete:{type:Sequelize[_0xc7e8[6]],defaultValue:false},agentringnoanswer:{type:Sequelize[_0xc7e8[6]],defaultValue:false},agentdump:{type:Sequelize[_0xc7e8[6]],defaultValue:false},talktime:{type:Sequelize[_0xc7e8[5]]},agentacw:{type:Sequelize[_0xc7e8[6]],defaultValue:false},acwtime:{type:Sequelize[_0xc7e8[5]]},reason:{type:Sequelize[_0xc7e8[3]]},lastevent:{type:Sequelize[_0xc7e8[3]]},channel:{type:Sequelize[_0xc7e8[3]]},channelstate:{type:Sequelize[_0xc7e8[5]]},channelstatedesc:{type:Sequelize[_0xc7e8[3]]},connectedlinenum:{type:Sequelize[_0xc7e8[3]]},connectedlinename:{type:Sequelize[_0xc7e8[3]]},language:{type:Sequelize[_0xc7e8[3]]},accountcode:{type:Sequelize[_0xc7e8[3]]},context:{type:Sequelize[_0xc7e8[3]]},exten:{type:Sequelize[_0xc7e8[3]]},priority:{type:Sequelize[_0xc7e8[3]]},destchannel:{type:Sequelize[_0xc7e8[3]]},destchannelstate:{type:Sequelize[_0xc7e8[5]]},destchannelstatedesc:{type:Sequelize[_0xc7e8[3]]},destcalleridnum:{type:Sequelize[_0xc7e8[3]]},destcalleridname:{type:Sequelize[_0xc7e8[3]]},destconnectedlinenum:{type:Sequelize[_0xc7e8[3]]},destconnectedlinename:{type:Sequelize[_0xc7e8[3]]},destlanguage:{type:Sequelize[_0xc7e8[3]]},destaccountcode:{type:Sequelize[_0xc7e8[3]]},destcontext:{type:Sequelize[_0xc7e8[3]]},destexten:{type:Sequelize[_0xc7e8[3]]},destpriority:{type:Sequelize[_0xc7e8[3]]},destuniqueid:{type:Sequelize[_0xc7e8[3]]},answeredelsewheredestinationuniqueid:{type:Sequelize[_0xc7e8[3]]},answeredelsewheremembername:{type:Sequelize[_0xc7e8[3]]}}
\ No newline at end of file
+var _0x70bc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x70bc[0];var Sequelize=require(_0x70bc[1]);module[_0x70bc[2]]= {type:{type:Sequelize[_0x70bc[3]]},uniqueid:{type:Sequelize[_0x70bc[3]]},calleridnum:{type:Sequelize[_0x70bc[3]]},calleridname:{type:Sequelize[_0x70bc[3]]},queue:{type:Sequelize[_0x70bc[3]]},interface:{type:Sequelize[_0x70bc[3]]},membername:{type:Sequelize[_0x70bc[3]]},agentcalledAt:{type:Sequelize[_0x70bc[4]]},agentconnectAt:{type:Sequelize[_0x70bc[4]]},agentcompleteAt:{type:Sequelize[_0x70bc[4]]},agentringnoanswerAt:{type:Sequelize[_0x70bc[4]]},agentdumpAt:{type:Sequelize[_0x70bc[4]]},holdtime:{type:Sequelize[_0x70bc[5]]},agentcomplete:{type:Sequelize[_0x70bc[6]],defaultValue:false},agentringnoanswer:{type:Sequelize[_0x70bc[6]],defaultValue:false},agentdump:{type:Sequelize[_0x70bc[6]],defaultValue:false},talktime:{type:Sequelize[_0x70bc[5]]},agentacw:{type:Sequelize[_0x70bc[6]],defaultValue:false},acwtime:{type:Sequelize[_0x70bc[5]]},reason:{type:Sequelize[_0x70bc[3]]},lastevent:{type:Sequelize[_0x70bc[3]]},channel:{type:Sequelize[_0x70bc[3]]},channelstate:{type:Sequelize[_0x70bc[5]]},channelstatedesc:{type:Sequelize[_0x70bc[3]]},connectedlinenum:{type:Sequelize[_0x70bc[3]]},connectedlinename:{type:Sequelize[_0x70bc[3]]},language:{type:Sequelize[_0x70bc[3]]},accountcode:{type:Sequelize[_0x70bc[3]]},context:{type:Sequelize[_0x70bc[3]]},exten:{type:Sequelize[_0x70bc[3]]},priority:{type:Sequelize[_0x70bc[3]]},destchannel:{type:Sequelize[_0x70bc[3]]},destchannelstate:{type:Sequelize[_0x70bc[5]]},destchannelstatedesc:{type:Sequelize[_0x70bc[3]]},destcalleridnum:{type:Sequelize[_0x70bc[3]]},destcalleridname:{type:Sequelize[_0x70bc[3]]},destconnectedlinenum:{type:Sequelize[_0x70bc[3]]},destconnectedlinename:{type:Sequelize[_0x70bc[3]]},destlanguage:{type:Sequelize[_0x70bc[3]]},destaccountcode:{type:Sequelize[_0x70bc[3]]},destcontext:{type:Sequelize[_0x70bc[3]]},destexten:{type:Sequelize[_0x70bc[3]]},destpriority:{type:Sequelize[_0x70bc[3]]},destuniqueid:{type:Sequelize[_0x70bc[3]]},answeredelsewheredestinationuniqueid:{type:Sequelize[_0x70bc[3]]},answeredelsewheremembername:{type:Sequelize[_0x70bc[3]]}}
\ No newline at end of file
index 628e126..fa18fc8 100644 (file)
@@ -1 +1 @@
-var _0x90d5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x90d5[0];var jsonpatch=require(_0x90d5[1]);var rp=require(_0x90d5[2]);var moment=require(_0x90d5[3]);var BPromise=require(_0x90d5[4]);var Mustache=require(_0x90d5[5]);var util=require(_0x90d5[6]);var path=require(_0x90d5[7]);var sox=require(_0x90d5[8]);var csv=require(_0x90d5[9]);var ejs=require(_0x90d5[10]);var fs=require(_0x90d5[11]);var _=require(_0x90d5[12]);var squel=require(_0x90d5[13]);var crypto=require(_0x90d5[14]);var jsforce=require(_0x90d5[15]);var deskjs=require(_0x90d5[16]);var toCsv=require(_0x90d5[9]);var querystring=require(_0x90d5[17]);var Papa=require(_0x90d5[18]);var qs=require(_0x90d5[19]);var logger=require(_0x90d5[21])(_0x90d5[20]);var utils=require(_0x90d5[22]);var config=require(_0x90d5[23]);var db=require(_0x90d5[25])[_0x90d5[24]];function respondWithStatusCode(_0x3835x1a,_0x3835x1b){_0x3835x1b= _0x3835x1b|| 204;return function(_0x3835x1c){if(_0x3835x1c){return _0x3835x1a[_0x90d5[26]](_0x3835x1b)};return _0x3835x1a[_0x90d5[28]](_0x3835x1b)[_0x90d5[27]]()}}function respondWithResult(_0x3835x1a,_0x3835x1b){_0x3835x1b= _0x3835x1b|| 200;return function(_0x3835x1c){if(_0x3835x1c){return _0x3835x1a[_0x90d5[28]](_0x3835x1b)[_0x90d5[29]](_0x3835x1c)}}}function respondWithFilteredResult(_0x3835x1a,_0x3835x1f){return function(_0x3835x1c){if(_0x3835x1c){var _0x3835x20=_0x3835x1c[_0x90d5[30]],_0x3835x21=_0x3835x1f[_0x90d5[31]],_0x3835x22=_0x3835x1f[_0x90d5[31]]+ _0x3835x1f[_0x90d5[32]],_0x3835x1b;if(_0x3835x22>= _0x3835x20){_0x3835x22= _0x3835x20;_0x3835x1b= 200}else {_0x3835x1b= 206};_0x3835x1a[_0x90d5[28]](_0x3835x1b);return _0x3835x1a[_0x90d5[36]](_0x90d5[33],_0x3835x21+ _0x90d5[34]+ _0x3835x22+ _0x90d5[35]+ _0x3835x20)[_0x90d5[29]](_0x3835x1c)};return null}}function patchUpdates(_0x3835x24){return function(_0x3835x1c){try{jsonpatch[_0x90d5[37]](_0x3835x1c,_0x3835x24,true)}catch(err){return BPromise[_0x90d5[38]](err)};return _0x3835x1c[_0x90d5[39]]()}}function saveUpdates(_0x3835x26,_0x3835x1b){return function(_0x3835x1c){if(_0x3835x1c){return _0x3835x1c[_0x90d5[41]](_0x3835x26)[_0x90d5[40]](function(_0x3835x27){return _0x3835x27})};return null}}function removeEntity(_0x3835x1a,_0x3835x1b){return function(_0x3835x1c){if(_0x3835x1c){return _0x3835x1c[_0x90d5[42]]()[_0x90d5[40]](function(){_0x3835x1a[_0x90d5[28]](204)[_0x90d5[27]]()})}}}function handleEntityNotFound(_0x3835x1a,_0x3835x1b){return function(_0x3835x1c){if(!_0x3835x1c){_0x3835x1a[_0x90d5[26]](404)};return _0x3835x1c}}function handleError(_0x3835x1a,_0x3835x1b){_0x3835x1b= _0x3835x1b|| 500;return function(_0x3835x2b){logger[_0x90d5[44]](_0x3835x2b[_0x90d5[43]]);if(_0x3835x2b[_0x90d5[45]]){delete _0x3835x2b[_0x90d5[45]]};_0x3835x1a[_0x90d5[28]](_0x3835x1b)[_0x90d5[46]](_0x3835x2b)}}exports[_0x90d5[47]]= function(_0x3835x2c,_0x3835x1a){var _0x3835x1f={},_0x3835x2d={},_0x3835x2e={count:0,rows:[]};_0x3835x2d[_0x90d5[48]]= _[_0x90d5[51]](db[_0x90d5[50]][_0x90d5[49]]);var _0x3835x2f={dateStart:_0x3835x2c[_0x90d5[53]][_0x90d5[52]],dateEnd:_0x3835x2c[_0x90d5[53]][_0x90d5[54]]};delete _0x3835x2c[_0x90d5[53]][_0x90d5[52]];delete _0x3835x2c[_0x90d5[53]][_0x90d5[54]];_0x3835x2d[_0x90d5[53]]= _[_0x90d5[51]](_0x3835x2c[_0x90d5[53]]);_0x3835x2d[_0x90d5[55]]= _[_0x90d5[56]](_0x3835x2d[_0x90d5[48]],_0x3835x2d[_0x90d5[53]]);_0x3835x1f[_0x90d5[57]]= _[_0x90d5[56]](_0x3835x2d[_0x90d5[48]],qs[_0x90d5[58]](_0x3835x2c[_0x90d5[53]][_0x90d5[58]]));_0x3835x1f[_0x90d5[57]]= (_0x3835x1f[_0x90d5[57]][_0x90d5[59]])?_0x3835x1f[_0x90d5[57]]:_0x3835x2d[_0x90d5[48]];if(!_0x3835x2c[_0x90d5[53]][_0x90d5[61]](_0x90d5[60])){_0x3835x1f[_0x90d5[32]]= qs[_0x90d5[32]](_0x3835x2c[_0x90d5[53]][_0x90d5[32]]);_0x3835x1f[_0x90d5[31]]= qs[_0x90d5[31]](_0x3835x2c[_0x90d5[53]][_0x90d5[31]])};_0x3835x1f[_0x90d5[62]]= qs[_0x90d5[63]](_0x3835x2c[_0x90d5[53]][_0x90d5[63]]);_0x3835x1f[_0x90d5[64]]= qs[_0x90d5[55]](_[_0x90d5[65]](_0x3835x2c[_0x90d5[53]],_0x3835x2d[_0x90d5[55]]));if(_0x3835x2f[_0x90d5[52]]){if(_0x3835x2f[_0x90d5[54]]){_0x3835x2f[_0x90d5[54]]= moment(_0x3835x2f[_0x90d5[54]])[_0x90d5[67]](1,_0x90d5[66])}else {_0x3835x2f[_0x90d5[54]]= moment(_0x3835x2f[_0x90d5[52]])[_0x90d5[67]](1,_0x90d5[66])};_[_0x90d5[68]](_0x3835x1f[_0x90d5[64]],{createdAt:{$gte:_0x3835x2f[_0x90d5[52]],$lte:_0x3835x2f[_0x90d5[54]]}})};if(_0x3835x2c[_0x90d5[53]][_0x90d5[69]]){_0x3835x1f[_0x90d5[64]]= _[_0x90d5[68]](_0x3835x1f[_0x90d5[64]],{$or:_[_0x90d5[71]](_0x3835x1f[_0x90d5[57]],function(_0x3835x30){var _0x3835x2e={};_0x3835x2e[_0x3835x30]= {$like:_0x90d5[70]+ _0x3835x2c[_0x90d5[53]][_0x90d5[69]]+ _0x90d5[70]};return _0x3835x2e})})};_0x3835x1f= _[_0x90d5[68]]({},_0x3835x1f,_0x3835x2c[_0x90d5[72]]);var _0x3835x31={where:_0x3835x1f[_0x90d5[64]]};return db[_0x90d5[50]][_0x90d5[30]](_0x3835x31)[_0x90d5[40]](function(_0x3835x20){_0x3835x2e[_0x90d5[30]]= _0x3835x20;if(_0x3835x2c[_0x90d5[53]][_0x90d5[75]]){_0x3835x1f[_0x90d5[76]]= [{all:true}]};return db[_0x90d5[50]][_0x90d5[77]](_0x3835x1f)})[_0x90d5[40]](function(_0x3835x32){_0x3835x2e[_0x90d5[74]]= _0x3835x32;return _0x3835x2e})[_0x90d5[40]](respondWithFilteredResult(_0x3835x1a,_0x3835x1f))[_0x90d5[73]](handleError(_0x3835x1a,null))};exports[_0x90d5[78]]= function(_0x3835x2c,_0x3835x1a){var _0x3835x1f={raw:false,where:{id:_0x3835x2c[_0x90d5[80]][_0x90d5[79]]}},_0x3835x2d={};_0x3835x2d[_0x90d5[48]]= _[_0x90d5[51]](db[_0x90d5[50]][_0x90d5[49]]);_0x3835x2d[_0x90d5[53]]= _[_0x90d5[51]](_0x3835x2c[_0x90d5[53]]);_0x3835x2d[_0x90d5[55]]= _[_0x90d5[56]](_0x3835x2d[_0x90d5[48]],_0x3835x2d[_0x90d5[53]]);_0x3835x1f[_0x90d5[57]]= _[_0x90d5[56]](_0x3835x2d[_0x90d5[48]],qs[_0x90d5[58]](_0x3835x2c[_0x90d5[53]][_0x90d5[58]]));_0x3835x1f[_0x90d5[57]]= (_0x3835x1f[_0x90d5[57]][_0x90d5[59]])?_0x3835x1f[_0x90d5[57]]:_0x3835x2d[_0x90d5[48]];if(_0x3835x2c[_0x90d5[53]][_0x90d5[75]]){_0x3835x1f[_0x90d5[76]]= [{all:true}]};_0x3835x1f= _[_0x90d5[68]]({},_0x3835x1f,_0x3835x2c[_0x90d5[72]]);return db[_0x90d5[50]][_0x90d5[81]](_0x3835x1f)[_0x90d5[40]](handleEntityNotFound(_0x3835x1a,null))[_0x90d5[40]](respondWithResult(_0x3835x1a,null))[_0x90d5[73]](handleError(_0x3835x1a,null))};exports[_0x90d5[82]]= function(_0x3835x2c,_0x3835x1a){return db[_0x90d5[50]][_0x90d5[82]](_0x3835x2c[_0x90d5[83]],{})[_0x90d5[40]](respondWithResult(_0x3835x1a,201))[_0x90d5[73]](handleError(_0x3835x1a,null))};exports[_0x90d5[41]]= function(_0x3835x2c,_0x3835x1a){if(_0x3835x2c[_0x90d5[83]][_0x90d5[79]]){delete _0x3835x2c[_0x90d5[83]][_0x90d5[79]]};return db[_0x90d5[50]][_0x90d5[81]]({where:{id:_0x3835x2c[_0x90d5[80]][_0x90d5[79]]}})[_0x90d5[40]](handleEntityNotFound(_0x3835x1a,null))[_0x90d5[40]](saveUpdates(_0x3835x2c[_0x90d5[83]],null))[_0x90d5[40]](respondWithResult(_0x3835x1a,null))[_0x90d5[73]](handleError(_0x3835x1a,null))};exports[_0x90d5[42]]= function(_0x3835x2c,_0x3835x1a){return db[_0x90d5[50]][_0x90d5[81]]({where:{id:_0x3835x2c[_0x90d5[80]][_0x90d5[79]]}})[_0x90d5[40]](handleEntityNotFound(_0x3835x1a,null))[_0x90d5[40]](removeEntity(_0x3835x1a,null))[_0x90d5[73]](handleError(_0x3835x1a,null))};exports[_0x90d5[84]]= function(_0x3835x2c,_0x3835x1a){return db[_0x90d5[50]][_0x90d5[84]]()[_0x90d5[40]](respondWithResult(_0x3835x1a,null))[_0x90d5[73]](handleError(_0x3835x1a,null))}
\ No newline at end of file
+var _0x4605=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x4605[0];var jsonpatch=require(_0x4605[1]);var rp=require(_0x4605[2]);var moment=require(_0x4605[3]);var BPromise=require(_0x4605[4]);var Mustache=require(_0x4605[5]);var util=require(_0x4605[6]);var path=require(_0x4605[7]);var sox=require(_0x4605[8]);var csv=require(_0x4605[9]);var ejs=require(_0x4605[10]);var fs=require(_0x4605[11]);var _=require(_0x4605[12]);var squel=require(_0x4605[13]);var crypto=require(_0x4605[14]);var jsforce=require(_0x4605[15]);var deskjs=require(_0x4605[16]);var toCsv=require(_0x4605[9]);var querystring=require(_0x4605[17]);var Papa=require(_0x4605[18]);var qs=require(_0x4605[19]);var logger=require(_0x4605[21])(_0x4605[20]);var utils=require(_0x4605[22]);var config=require(_0x4605[23]);var db=require(_0x4605[25])[_0x4605[24]];function respondWithStatusCode(_0x3ccbx1a,_0x3ccbx1b){_0x3ccbx1b= _0x3ccbx1b|| 204;return function(_0x3ccbx1c){if(_0x3ccbx1c){return _0x3ccbx1a[_0x4605[26]](_0x3ccbx1b)};return _0x3ccbx1a[_0x4605[28]](_0x3ccbx1b)[_0x4605[27]]()}}function respondWithResult(_0x3ccbx1a,_0x3ccbx1b){_0x3ccbx1b= _0x3ccbx1b|| 200;return function(_0x3ccbx1c){if(_0x3ccbx1c){return _0x3ccbx1a[_0x4605[28]](_0x3ccbx1b)[_0x4605[29]](_0x3ccbx1c)}}}function respondWithFilteredResult(_0x3ccbx1a,_0x3ccbx1f){return function(_0x3ccbx1c){if(_0x3ccbx1c){var _0x3ccbx20=_0x3ccbx1c[_0x4605[30]],_0x3ccbx21=_0x3ccbx1f[_0x4605[31]],_0x3ccbx22=_0x3ccbx1f[_0x4605[31]]+ _0x3ccbx1f[_0x4605[32]],_0x3ccbx1b;if(_0x3ccbx22>= _0x3ccbx20){_0x3ccbx22= _0x3ccbx20;_0x3ccbx1b= 200}else {_0x3ccbx1b= 206};_0x3ccbx1a[_0x4605[28]](_0x3ccbx1b);return _0x3ccbx1a[_0x4605[36]](_0x4605[33],_0x3ccbx21+ _0x4605[34]+ _0x3ccbx22+ _0x4605[35]+ _0x3ccbx20)[_0x4605[29]](_0x3ccbx1c)};return null}}function patchUpdates(_0x3ccbx24){return function(_0x3ccbx1c){try{jsonpatch[_0x4605[37]](_0x3ccbx1c,_0x3ccbx24,true)}catch(err){return BPromise[_0x4605[38]](err)};return _0x3ccbx1c[_0x4605[39]]()}}function saveUpdates(_0x3ccbx26,_0x3ccbx1b){return function(_0x3ccbx1c){if(_0x3ccbx1c){return _0x3ccbx1c[_0x4605[41]](_0x3ccbx26)[_0x4605[40]](function(_0x3ccbx27){return _0x3ccbx27})};return null}}function removeEntity(_0x3ccbx1a,_0x3ccbx1b){return function(_0x3ccbx1c){if(_0x3ccbx1c){return _0x3ccbx1c[_0x4605[42]]()[_0x4605[40]](function(){_0x3ccbx1a[_0x4605[28]](204)[_0x4605[27]]()})}}}function handleEntityNotFound(_0x3ccbx1a,_0x3ccbx1b){return function(_0x3ccbx1c){if(!_0x3ccbx1c){_0x3ccbx1a[_0x4605[26]](404)};return _0x3ccbx1c}}function handleError(_0x3ccbx1a,_0x3ccbx1b){_0x3ccbx1b= _0x3ccbx1b|| 500;return function(_0x3ccbx2b){logger[_0x4605[44]](_0x3ccbx2b[_0x4605[43]]);if(_0x3ccbx2b[_0x4605[45]]){delete _0x3ccbx2b[_0x4605[45]]};_0x3ccbx1a[_0x4605[28]](_0x3ccbx1b)[_0x4605[46]](_0x3ccbx2b)}}exports[_0x4605[47]]= function(_0x3ccbx2c,_0x3ccbx1a){var _0x3ccbx1f={},_0x3ccbx2d={},_0x3ccbx2e={count:0,rows:[]};_0x3ccbx2d[_0x4605[48]]= _[_0x4605[51]](db[_0x4605[50]][_0x4605[49]]);var _0x3ccbx2f={dateStart:_0x3ccbx2c[_0x4605[53]][_0x4605[52]],dateEnd:_0x3ccbx2c[_0x4605[53]][_0x4605[54]]};delete _0x3ccbx2c[_0x4605[53]][_0x4605[52]];delete _0x3ccbx2c[_0x4605[53]][_0x4605[54]];_0x3ccbx2d[_0x4605[53]]= _[_0x4605[51]](_0x3ccbx2c[_0x4605[53]]);_0x3ccbx2d[_0x4605[55]]= _[_0x4605[56]](_0x3ccbx2d[_0x4605[48]],_0x3ccbx2d[_0x4605[53]]);_0x3ccbx1f[_0x4605[57]]= _[_0x4605[56]](_0x3ccbx2d[_0x4605[48]],qs[_0x4605[58]](_0x3ccbx2c[_0x4605[53]][_0x4605[58]]));_0x3ccbx1f[_0x4605[57]]= (_0x3ccbx1f[_0x4605[57]][_0x4605[59]])?_0x3ccbx1f[_0x4605[57]]:_0x3ccbx2d[_0x4605[48]];if(!_0x3ccbx2c[_0x4605[53]][_0x4605[61]](_0x4605[60])){_0x3ccbx1f[_0x4605[32]]= qs[_0x4605[32]](_0x3ccbx2c[_0x4605[53]][_0x4605[32]]);_0x3ccbx1f[_0x4605[31]]= qs[_0x4605[31]](_0x3ccbx2c[_0x4605[53]][_0x4605[31]])};_0x3ccbx1f[_0x4605[62]]= qs[_0x4605[63]](_0x3ccbx2c[_0x4605[53]][_0x4605[63]]);_0x3ccbx1f[_0x4605[64]]= qs[_0x4605[55]](_[_0x4605[65]](_0x3ccbx2c[_0x4605[53]],_0x3ccbx2d[_0x4605[55]]));if(_0x3ccbx2f[_0x4605[52]]){if(_0x3ccbx2f[_0x4605[54]]){_0x3ccbx2f[_0x4605[54]]= moment(_0x3ccbx2f[_0x4605[54]])[_0x4605[67]](1,_0x4605[66])}else {_0x3ccbx2f[_0x4605[54]]= moment(_0x3ccbx2f[_0x4605[52]])[_0x4605[67]](1,_0x4605[66])};_[_0x4605[68]](_0x3ccbx1f[_0x4605[64]],{createdAt:{$gte:_0x3ccbx2f[_0x4605[52]],$lte:_0x3ccbx2f[_0x4605[54]]}})};if(_0x3ccbx2c[_0x4605[53]][_0x4605[69]]){_0x3ccbx1f[_0x4605[64]]= _[_0x4605[68]](_0x3ccbx1f[_0x4605[64]],{$or:_[_0x4605[71]](_0x3ccbx1f[_0x4605[57]],function(_0x3ccbx30){var _0x3ccbx2e={};_0x3ccbx2e[_0x3ccbx30]= {$like:_0x4605[70]+ _0x3ccbx2c[_0x4605[53]][_0x4605[69]]+ _0x4605[70]};return _0x3ccbx2e})})};_0x3ccbx1f= _[_0x4605[68]]({},_0x3ccbx1f,_0x3ccbx2c[_0x4605[72]]);var _0x3ccbx31={where:_0x3ccbx1f[_0x4605[64]]};return db[_0x4605[50]][_0x4605[30]](_0x3ccbx31)[_0x4605[40]](function(_0x3ccbx20){_0x3ccbx2e[_0x4605[30]]= _0x3ccbx20;if(_0x3ccbx2c[_0x4605[53]][_0x4605[75]]){_0x3ccbx1f[_0x4605[76]]= [{all:true}]};return db[_0x4605[50]][_0x4605[77]](_0x3ccbx1f)})[_0x4605[40]](function(_0x3ccbx32){_0x3ccbx2e[_0x4605[74]]= _0x3ccbx32;return _0x3ccbx2e})[_0x4605[40]](respondWithFilteredResult(_0x3ccbx1a,_0x3ccbx1f))[_0x4605[73]](handleError(_0x3ccbx1a,null))};exports[_0x4605[78]]= function(_0x3ccbx2c,_0x3ccbx1a){var _0x3ccbx1f={raw:false,where:{id:_0x3ccbx2c[_0x4605[80]][_0x4605[79]]}},_0x3ccbx2d={};_0x3ccbx2d[_0x4605[48]]= _[_0x4605[51]](db[_0x4605[50]][_0x4605[49]]);_0x3ccbx2d[_0x4605[53]]= _[_0x4605[51]](_0x3ccbx2c[_0x4605[53]]);_0x3ccbx2d[_0x4605[55]]= _[_0x4605[56]](_0x3ccbx2d[_0x4605[48]],_0x3ccbx2d[_0x4605[53]]);_0x3ccbx1f[_0x4605[57]]= _[_0x4605[56]](_0x3ccbx2d[_0x4605[48]],qs[_0x4605[58]](_0x3ccbx2c[_0x4605[53]][_0x4605[58]]));_0x3ccbx1f[_0x4605[57]]= (_0x3ccbx1f[_0x4605[57]][_0x4605[59]])?_0x3ccbx1f[_0x4605[57]]:_0x3ccbx2d[_0x4605[48]];if(_0x3ccbx2c[_0x4605[53]][_0x4605[75]]){_0x3ccbx1f[_0x4605[76]]= [{all:true}]};_0x3ccbx1f= _[_0x4605[68]]({},_0x3ccbx1f,_0x3ccbx2c[_0x4605[72]]);return db[_0x4605[50]][_0x4605[81]](_0x3ccbx1f)[_0x4605[40]](handleEntityNotFound(_0x3ccbx1a,null))[_0x4605[40]](respondWithResult(_0x3ccbx1a,null))[_0x4605[73]](handleError(_0x3ccbx1a,null))};exports[_0x4605[82]]= function(_0x3ccbx2c,_0x3ccbx1a){return db[_0x4605[50]][_0x4605[82]](_0x3ccbx2c[_0x4605[83]],{})[_0x4605[40]](respondWithResult(_0x3ccbx1a,201))[_0x4605[73]](handleError(_0x3ccbx1a,null))};exports[_0x4605[41]]= function(_0x3ccbx2c,_0x3ccbx1a){if(_0x3ccbx2c[_0x4605[83]][_0x4605[79]]){delete _0x3ccbx2c[_0x4605[83]][_0x4605[79]]};return db[_0x4605[50]][_0x4605[81]]({where:{id:_0x3ccbx2c[_0x4605[80]][_0x4605[79]]}})[_0x4605[40]](handleEntityNotFound(_0x3ccbx1a,null))[_0x4605[40]](saveUpdates(_0x3ccbx2c[_0x4605[83]],null))[_0x4605[40]](respondWithResult(_0x3ccbx1a,null))[_0x4605[73]](handleError(_0x3ccbx1a,null))};exports[_0x4605[42]]= function(_0x3ccbx2c,_0x3ccbx1a){return db[_0x4605[50]][_0x4605[81]]({where:{id:_0x3ccbx2c[_0x4605[80]][_0x4605[79]]}})[_0x4605[40]](handleEntityNotFound(_0x3ccbx1a,null))[_0x4605[40]](removeEntity(_0x3ccbx1a,null))[_0x4605[73]](handleError(_0x3ccbx1a,null))};exports[_0x4605[84]]= function(_0x3ccbx2c,_0x3ccbx1a){return db[_0x4605[50]][_0x4605[84]]()[_0x4605[40]](respondWithResult(_0x3ccbx1a,null))[_0x4605[73]](handleError(_0x3ccbx1a,null))}
\ No newline at end of file
index 8e552db..8a2bd63 100644 (file)
@@ -1 +1 @@
-var _0xd4d8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0xd4d8[0];var _=require(_0xd4d8[1]);var util=require(_0xd4d8[2]);var logger=require(_0xd4d8[4])(_0xd4d8[3]);var moment=require(_0xd4d8[5]);var BPromise=require(_0xd4d8[6]);var rp=require(_0xd4d8[7]);var attributes=require(_0xd4d8[8]);module[_0xd4d8[9]]= function(_0x8429x8,_0x8429x9){return _0x8429x8[_0xd4d8[14]](_0xd4d8[10],attributes,{tableName:_0xd4d8[11],paranoid:false,indexes:[{"\x66\x69\x65\x6C\x64\x73":[_0xd4d8[12],_0xd4d8[13]]}],timestamps:true})}
\ No newline at end of file
+var _0x57aa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0x57aa[0];var _=require(_0x57aa[1]);var util=require(_0x57aa[2]);var logger=require(_0x57aa[4])(_0x57aa[3]);var moment=require(_0x57aa[5]);var BPromise=require(_0x57aa[6]);var rp=require(_0x57aa[7]);var attributes=require(_0x57aa[8]);module[_0x57aa[9]]= function(_0x16fdx8,_0x16fdx9){return _0x16fdx8[_0x57aa[14]](_0x57aa[10],attributes,{tableName:_0x57aa[11],paranoid:false,indexes:[{"\x66\x69\x65\x6C\x64\x73":[_0x57aa[12],_0x57aa[13]]}],timestamps:true})}
\ No newline at end of file
index 820882e..3b693b4 100644 (file)
@@ -1 +1 @@
-var _0x32ed=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x55\x70\x64\x61\x74\x65\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65"];_0x32ed[0];var _=require(_0x32ed[1]);var util=require(_0x32ed[2]);var moment=require(_0x32ed[3]);var BPromise=require(_0x32ed[4]);var rs=require(_0x32ed[5]);var fs=require(_0x32ed[6]);var db=require(_0x32ed[8])[_0x32ed[7]];var utils=require(_0x32ed[9]);var logger=require(_0x32ed[11])(_0x32ed[10]);var config=require(_0x32ed[12]);var jayson=require(_0x32ed[13]);var client=jayson[_0x32ed[15]][_0x32ed[14]]({port:9002});function respondWithRpcPromise(_0x2b41xe,_0x2b41xf,_0x2b41x10){return  new BPromise(function(_0x2b41x11,_0x2b41x12){return client[_0x32ed[28]](_0x2b41xe,_0x2b41x10)[_0x32ed[27]](function(_0x2b41x14){logger[_0x32ed[20]](_0x32ed[16],_0x2b41xf,_0x32ed[19]);logger[_0x32ed[23]](_0x32ed[21],_0x2b41xf,_0x32ed[19],JSON[_0x32ed[22]](_0x2b41x14));if(_0x2b41x14[_0x32ed[17]]){if(_0x2b41x14[_0x32ed[17]][_0x32ed[24]]=== 500){logger[_0x32ed[17]](_0x32ed[16],_0x2b41xf,_0x2b41x14[_0x32ed[17]][_0x32ed[25]]);return _0x2b41x12(_0x2b41x14[_0x32ed[17]][_0x32ed[25]])};logger[_0x32ed[17]](_0x32ed[16],_0x2b41xf,_0x2b41x14[_0x32ed[17]][_0x32ed[25]]);return _0x2b41x11(_0x2b41x14[_0x32ed[17]][_0x32ed[25]])}else {logger[_0x32ed[20]](_0x32ed[16],_0x2b41xf,_0x32ed[19]);_0x2b41x11(_0x2b41x14[_0x32ed[26]][_0x32ed[25]])}})[_0x32ed[18]](function(_0x2b41x13){logger[_0x32ed[17]](_0x32ed[16],_0x2b41xf,_0x2b41x13);_0x2b41x12(_0x2b41x13)})})}exports[_0x32ed[29]]= function(_0x2b41x10){var _0x2b41x15=this;return  new Promise(function(_0x2b41x11,_0x2b41x12){return db[_0x32ed[34]][_0x32ed[33]](_0x2b41x10[_0x32ed[30]],{raw:_0x2b41x10[_0x32ed[31]]?(_0x2b41x10[_0x32ed[31]][_0x32ed[32]]=== undefined)?true:false:true})[_0x32ed[27]](function(_0x2b41x14){logger[_0x32ed[20]](_0x32ed[29],_0x2b41x10);logger[_0x32ed[23]](_0x32ed[29],_0x2b41x10,JSON[_0x32ed[22]](_0x2b41x14));_0x2b41x11(_0x2b41x14)})[_0x32ed[18]](function(_0x2b41x13){logger[_0x32ed[17]](_0x32ed[29],_0x2b41x13[_0x32ed[25]],_0x2b41x10);_0x2b41x12(_0x2b41x15[_0x32ed[17]](500,_0x2b41x13[_0x32ed[25]]))})})};exports[_0x32ed[35]]= function(_0x2b41x10){var _0x2b41x15=this;return  new Promise(function(_0x2b41x11,_0x2b41x12){return db[_0x32ed[34]][_0x32ed[39]](_0x2b41x10[_0x32ed[30]],{raw:_0x2b41x10[_0x32ed[31]]?(_0x2b41x10[_0x32ed[31]][_0x32ed[32]]=== undefined)?true:false:true,individualHooks:true,where:_0x2b41x10[_0x32ed[31]]?_0x2b41x10[_0x32ed[31]][_0x32ed[36]]|| null:null,attributes:_0x2b41x10[_0x32ed[31]]?_0x2b41x10[_0x32ed[31]][_0x32ed[37]]|| null:null,limit:_0x2b41x10[_0x32ed[31]]?_0x2b41x10[_0x32ed[31]][_0x32ed[38]]|| null:null})[_0x32ed[27]](function(_0x2b41x14){logger[_0x32ed[20]](_0x32ed[35],_0x2b41x10);logger[_0x32ed[23]](_0x32ed[35],_0x2b41x10,JSON[_0x32ed[22]](_0x2b41x14));_0x2b41x11(_0x2b41x14)})[_0x32ed[18]](function(_0x2b41x13){logger[_0x32ed[17]](_0x32ed[35],_0x2b41x13[_0x32ed[25]],_0x2b41x10);_0x2b41x12(_0x2b41x15[_0x32ed[17]](500,_0x2b41x13[_0x32ed[25]]))})})}
\ No newline at end of file
+var _0x6a51=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x55\x70\x64\x61\x74\x65\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65"];_0x6a51[0];var _=require(_0x6a51[1]);var util=require(_0x6a51[2]);var moment=require(_0x6a51[3]);var BPromise=require(_0x6a51[4]);var rs=require(_0x6a51[5]);var fs=require(_0x6a51[6]);var db=require(_0x6a51[8])[_0x6a51[7]];var utils=require(_0x6a51[9]);var logger=require(_0x6a51[11])(_0x6a51[10]);var config=require(_0x6a51[12]);var jayson=require(_0x6a51[13]);var client=jayson[_0x6a51[15]][_0x6a51[14]]({port:9002});function respondWithRpcPromise(_0xf504xe,_0xf504xf,_0xf504x10){return  new BPromise(function(_0xf504x11,_0xf504x12){return client[_0x6a51[28]](_0xf504xe,_0xf504x10)[_0x6a51[27]](function(_0xf504x14){logger[_0x6a51[20]](_0x6a51[16],_0xf504xf,_0x6a51[19]);logger[_0x6a51[23]](_0x6a51[21],_0xf504xf,_0x6a51[19],JSON[_0x6a51[22]](_0xf504x14));if(_0xf504x14[_0x6a51[17]]){if(_0xf504x14[_0x6a51[17]][_0x6a51[24]]=== 500){logger[_0x6a51[17]](_0x6a51[16],_0xf504xf,_0xf504x14[_0x6a51[17]][_0x6a51[25]]);return _0xf504x12(_0xf504x14[_0x6a51[17]][_0x6a51[25]])};logger[_0x6a51[17]](_0x6a51[16],_0xf504xf,_0xf504x14[_0x6a51[17]][_0x6a51[25]]);return _0xf504x11(_0xf504x14[_0x6a51[17]][_0x6a51[25]])}else {logger[_0x6a51[20]](_0x6a51[16],_0xf504xf,_0x6a51[19]);_0xf504x11(_0xf504x14[_0x6a51[26]][_0x6a51[25]])}})[_0x6a51[18]](function(_0xf504x13){logger[_0x6a51[17]](_0x6a51[16],_0xf504xf,_0xf504x13);_0xf504x12(_0xf504x13)})})}exports[_0x6a51[29]]= function(_0xf504x10){var _0xf504x15=this;return  new Promise(function(_0xf504x11,_0xf504x12){return db[_0x6a51[34]][_0x6a51[33]](_0xf504x10[_0x6a51[30]],{raw:_0xf504x10[_0x6a51[31]]?(_0xf504x10[_0x6a51[31]][_0x6a51[32]]=== undefined)?true:false:true})[_0x6a51[27]](function(_0xf504x14){logger[_0x6a51[20]](_0x6a51[29],_0xf504x10);logger[_0x6a51[23]](_0x6a51[29],_0xf504x10,JSON[_0x6a51[22]](_0xf504x14));_0xf504x11(_0xf504x14)})[_0x6a51[18]](function(_0xf504x13){logger[_0x6a51[17]](_0x6a51[29],_0xf504x13[_0x6a51[25]],_0xf504x10);_0xf504x12(_0xf504x15[_0x6a51[17]](500,_0xf504x13[_0x6a51[25]]))})})};exports[_0x6a51[35]]= function(_0xf504x10){var _0xf504x15=this;return  new Promise(function(_0xf504x11,_0xf504x12){return db[_0x6a51[34]][_0x6a51[39]](_0xf504x10[_0x6a51[30]],{raw:_0xf504x10[_0x6a51[31]]?(_0xf504x10[_0x6a51[31]][_0x6a51[32]]=== undefined)?true:false:true,individualHooks:true,where:_0xf504x10[_0x6a51[31]]?_0xf504x10[_0x6a51[31]][_0x6a51[36]]|| null:null,attributes:_0xf504x10[_0x6a51[31]]?_0xf504x10[_0x6a51[31]][_0x6a51[37]]|| null:null,limit:_0xf504x10[_0x6a51[31]]?_0xf504x10[_0x6a51[31]][_0x6a51[38]]|| null:null})[_0x6a51[27]](function(_0xf504x14){logger[_0x6a51[20]](_0x6a51[35],_0xf504x10);logger[_0x6a51[23]](_0x6a51[35],_0xf504x10,JSON[_0x6a51[22]](_0xf504x14));_0xf504x11(_0xf504x14)})[_0x6a51[18]](function(_0xf504x13){logger[_0x6a51[17]](_0x6a51[35],_0xf504x13[_0x6a51[25]],_0xf504x10);_0xf504x12(_0xf504x15[_0x6a51[17]](500,_0xf504x13[_0x6a51[25]]))})})}
\ No newline at end of file
index 75df2dd..c2e001f 100644 (file)
@@ -1 +1 @@
-var _0xcf6b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xcf6b[0];var multer=require(_0xcf6b[1]);var util=require(_0xcf6b[2]);var path=require(_0xcf6b[3]);var express=require(_0xcf6b[4]);var router=express.Router();var auth=require(_0xcf6b[5]);var interaction=require(_0xcf6b[6]);var config=require(_0xcf6b[7]);var controller=require(_0xcf6b[8]);router[_0xcf6b[12]](_0xcf6b[9],auth[_0xcf6b[10]](),controller[_0xcf6b[11]]);router[_0xcf6b[12]](_0xcf6b[13],auth[_0xcf6b[10]](),controller[_0xcf6b[14]]);router[_0xcf6b[12]](_0xcf6b[15],auth[_0xcf6b[10]](),controller[_0xcf6b[16]]);router[_0xcf6b[18]](_0xcf6b[9],auth[_0xcf6b[10]](),controller[_0xcf6b[17]]);router[_0xcf6b[20]](_0xcf6b[15],auth[_0xcf6b[10]](),controller[_0xcf6b[19]]);router[_0xcf6b[22]](_0xcf6b[15],auth[_0xcf6b[10]](),controller[_0xcf6b[21]]);module[_0xcf6b[23]]= router
\ No newline at end of file
+var _0x53f3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x53f3[0];var multer=require(_0x53f3[1]);var util=require(_0x53f3[2]);var path=require(_0x53f3[3]);var express=require(_0x53f3[4]);var router=express.Router();var auth=require(_0x53f3[5]);var interaction=require(_0x53f3[6]);var config=require(_0x53f3[7]);var controller=require(_0x53f3[8]);router[_0x53f3[12]](_0x53f3[9],auth[_0x53f3[10]](),controller[_0x53f3[11]]);router[_0x53f3[12]](_0x53f3[13],auth[_0x53f3[10]](),controller[_0x53f3[14]]);router[_0x53f3[12]](_0x53f3[15],auth[_0x53f3[10]](),controller[_0x53f3[16]]);router[_0x53f3[18]](_0x53f3[9],auth[_0x53f3[10]](),controller[_0x53f3[17]]);router[_0x53f3[20]](_0x53f3[15],auth[_0x53f3[10]](),controller[_0x53f3[19]]);router[_0x53f3[22]](_0x53f3[15],auth[_0x53f3[10]](),controller[_0x53f3[21]]);module[_0x53f3[23]]= router
\ No newline at end of file
index 29b0b49..69fb2c2 100644 (file)
@@ -1 +1 @@
-var _0x4d1c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x75\x6E\x69\x71\x75\x65\x69\x64","\x69\x6E\x62\x6F\x75\x6E\x64","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x64\x69\x61\x6C\x65\x72","\x44\x41\x54\x45","\x49\x4E\x54\x45\x47\x45\x52"];_0x4d1c[0];var Sequelize=require(_0x4d1c[1]);module[_0x4d1c[2]]= {uniqueid:{type:Sequelize[_0x4d1c[3]],unique:_0x4d1c[4]},type:{type:Sequelize.ENUM(_0x4d1c[5],_0x4d1c[6],_0x4d1c[7],_0x4d1c[8],_0x4d1c[9],_0x4d1c[10])},tag:{type:Sequelize[_0x4d1c[3]]},accountcode:{type:Sequelize[_0x4d1c[3]]},source:{type:Sequelize[_0x4d1c[3]]},destination:{type:Sequelize[_0x4d1c[3]]},destinationcontext:{type:Sequelize[_0x4d1c[3]]},callerid:{type:Sequelize[_0x4d1c[3]]},channel:{type:Sequelize[_0x4d1c[3]]},destinationchannel:{type:Sequelize[_0x4d1c[3]]},lastapplication:{type:Sequelize[_0x4d1c[3]]},lastdata:{type:Sequelize[_0x4d1c[3]]},starttime:{type:Sequelize[_0x4d1c[11]]},answertime:{type:Sequelize[_0x4d1c[11]]},endtime:{type:Sequelize[_0x4d1c[11]]},duration:{type:Sequelize[_0x4d1c[12]]},billableseconds:{type:Sequelize[_0x4d1c[12]]},disposition:{type:Sequelize[_0x4d1c[3]]},amaflags:{type:Sequelize[_0x4d1c[3]]},userfield:{type:Sequelize[_0x4d1c[3]]},userDisposition:{type:Sequelize[_0x4d1c[3]]},note:{type:Sequelize[_0x4d1c[3]]}}
\ No newline at end of file
+var _0x33f9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x75\x6E\x69\x71\x75\x65\x69\x64","\x69\x6E\x62\x6F\x75\x6E\x64","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x64\x69\x61\x6C\x65\x72","\x44\x41\x54\x45","\x49\x4E\x54\x45\x47\x45\x52"];_0x33f9[0];var Sequelize=require(_0x33f9[1]);module[_0x33f9[2]]= {uniqueid:{type:Sequelize[_0x33f9[3]],unique:_0x33f9[4]},type:{type:Sequelize.ENUM(_0x33f9[5],_0x33f9[6],_0x33f9[7],_0x33f9[8],_0x33f9[9],_0x33f9[10])},tag:{type:Sequelize[_0x33f9[3]]},accountcode:{type:Sequelize[_0x33f9[3]]},source:{type:Sequelize[_0x33f9[3]]},destination:{type:Sequelize[_0x33f9[3]]},destinationcontext:{type:Sequelize[_0x33f9[3]]},callerid:{type:Sequelize[_0x33f9[3]]},channel:{type:Sequelize[_0x33f9[3]]},destinationchannel:{type:Sequelize[_0x33f9[3]]},lastapplication:{type:Sequelize[_0x33f9[3]]},lastdata:{type:Sequelize[_0x33f9[3]]},starttime:{type:Sequelize[_0x33f9[11]]},answertime:{type:Sequelize[_0x33f9[11]]},endtime:{type:Sequelize[_0x33f9[11]]},duration:{type:Sequelize[_0x33f9[12]]},billableseconds:{type:Sequelize[_0x33f9[12]]},disposition:{type:Sequelize[_0x33f9[3]]},amaflags:{type:Sequelize[_0x33f9[3]]},userfield:{type:Sequelize[_0x33f9[3]]},userDisposition:{type:Sequelize[_0x33f9[3]]},note:{type:Sequelize[_0x33f9[3]]}}
\ No newline at end of file
index 372307b..11843c2 100644 (file)
@@ -1 +1 @@
-var _0x9d60=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x75\x6E\x69\x71\x75\x65\x69\x64"];_0x9d60[0];var jsonpatch=require(_0x9d60[1]);var rp=require(_0x9d60[2]);var moment=require(_0x9d60[3]);var BPromise=require(_0x9d60[4]);var Mustache=require(_0x9d60[5]);var util=require(_0x9d60[6]);var path=require(_0x9d60[7]);var sox=require(_0x9d60[8]);var csv=require(_0x9d60[9]);var ejs=require(_0x9d60[10]);var fs=require(_0x9d60[11]);var _=require(_0x9d60[12]);var squel=require(_0x9d60[13]);var crypto=require(_0x9d60[14]);var jsforce=require(_0x9d60[15]);var deskjs=require(_0x9d60[16]);var toCsv=require(_0x9d60[9]);var querystring=require(_0x9d60[17]);var Papa=require(_0x9d60[18]);var qs=require(_0x9d60[19]);var logger=require(_0x9d60[21])(_0x9d60[20]);var utils=require(_0x9d60[22]);var config=require(_0x9d60[23]);var db=require(_0x9d60[25])[_0x9d60[24]];function respondWithStatusCode(_0xb1b7x1a,_0xb1b7x1b){_0xb1b7x1b= _0xb1b7x1b|| 204;return function(_0xb1b7x1c){if(_0xb1b7x1c){return _0xb1b7x1a[_0x9d60[26]](_0xb1b7x1b)};return _0xb1b7x1a[_0x9d60[28]](_0xb1b7x1b)[_0x9d60[27]]()}}function respondWithResult(_0xb1b7x1a,_0xb1b7x1b){_0xb1b7x1b= _0xb1b7x1b|| 200;return function(_0xb1b7x1c){if(_0xb1b7x1c){return _0xb1b7x1a[_0x9d60[28]](_0xb1b7x1b)[_0x9d60[29]](_0xb1b7x1c)}}}function respondWithFilteredResult(_0xb1b7x1a,_0xb1b7x1f){return function(_0xb1b7x1c){if(_0xb1b7x1c){var _0xb1b7x20=_0xb1b7x1c[_0x9d60[30]],_0xb1b7x21=_0xb1b7x1f[_0x9d60[31]],_0xb1b7x22=_0xb1b7x1f[_0x9d60[31]]+ _0xb1b7x1f[_0x9d60[32]],_0xb1b7x1b;if(_0xb1b7x22>= _0xb1b7x20){_0xb1b7x22= _0xb1b7x20;_0xb1b7x1b= 200}else {_0xb1b7x1b= 206};_0xb1b7x1a[_0x9d60[28]](_0xb1b7x1b);return _0xb1b7x1a[_0x9d60[36]](_0x9d60[33],_0xb1b7x21+ _0x9d60[34]+ _0xb1b7x22+ _0x9d60[35]+ _0xb1b7x20)[_0x9d60[29]](_0xb1b7x1c)};return null}}function patchUpdates(_0xb1b7x24){return function(_0xb1b7x1c){try{jsonpatch[_0x9d60[37]](_0xb1b7x1c,_0xb1b7x24,true)}catch(err){return BPromise[_0x9d60[38]](err)};return _0xb1b7x1c[_0x9d60[39]]()}}function saveUpdates(_0xb1b7x26,_0xb1b7x1b){return function(_0xb1b7x1c){if(_0xb1b7x1c){return _0xb1b7x1c[_0x9d60[41]](_0xb1b7x26)[_0x9d60[40]](function(_0xb1b7x27){return _0xb1b7x27})};return null}}function removeEntity(_0xb1b7x1a,_0xb1b7x1b){return function(_0xb1b7x1c){if(_0xb1b7x1c){return _0xb1b7x1c[_0x9d60[42]]()[_0x9d60[40]](function(){_0xb1b7x1a[_0x9d60[28]](204)[_0x9d60[27]]()})}}}function handleEntityNotFound(_0xb1b7x1a,_0xb1b7x1b){return function(_0xb1b7x1c){if(!_0xb1b7x1c){_0xb1b7x1a[_0x9d60[26]](404)};return _0xb1b7x1c}}function handleError(_0xb1b7x1a,_0xb1b7x1b){_0xb1b7x1b= _0xb1b7x1b|| 500;return function(_0xb1b7x2b){logger[_0x9d60[44]](_0xb1b7x2b[_0x9d60[43]]);if(_0xb1b7x2b[_0x9d60[45]]){delete _0xb1b7x2b[_0x9d60[45]]};_0xb1b7x1a[_0x9d60[28]](_0xb1b7x1b)[_0x9d60[46]](_0xb1b7x2b)}}exports[_0x9d60[47]]= function(_0xb1b7x2c,_0xb1b7x1a){var _0xb1b7x1f={},_0xb1b7x2d={},_0xb1b7x2e={count:0,rows:[]};_0xb1b7x2d[_0x9d60[48]]= _[_0x9d60[51]](db[_0x9d60[50]][_0x9d60[49]]);var _0xb1b7x2f={dateStart:_0xb1b7x2c[_0x9d60[53]][_0x9d60[52]],dateEnd:_0xb1b7x2c[_0x9d60[53]][_0x9d60[54]]};delete _0xb1b7x2c[_0x9d60[53]][_0x9d60[52]];delete _0xb1b7x2c[_0x9d60[53]][_0x9d60[54]];_0xb1b7x2d[_0x9d60[53]]= _[_0x9d60[51]](_0xb1b7x2c[_0x9d60[53]]);_0xb1b7x2d[_0x9d60[55]]= _[_0x9d60[56]](_0xb1b7x2d[_0x9d60[48]],_0xb1b7x2d[_0x9d60[53]]);_0xb1b7x1f[_0x9d60[57]]= _[_0x9d60[56]](_0xb1b7x2d[_0x9d60[48]],qs[_0x9d60[58]](_0xb1b7x2c[_0x9d60[53]][_0x9d60[58]]));_0xb1b7x1f[_0x9d60[57]]= (_0xb1b7x1f[_0x9d60[57]][_0x9d60[59]])?_0xb1b7x1f[_0x9d60[57]]:_0xb1b7x2d[_0x9d60[48]];if(!_0xb1b7x2c[_0x9d60[53]][_0x9d60[61]](_0x9d60[60])){_0xb1b7x1f[_0x9d60[32]]= qs[_0x9d60[32]](_0xb1b7x2c[_0x9d60[53]][_0x9d60[32]]);_0xb1b7x1f[_0x9d60[31]]= qs[_0x9d60[31]](_0xb1b7x2c[_0x9d60[53]][_0x9d60[31]])};_0xb1b7x1f[_0x9d60[62]]= qs[_0x9d60[63]](_0xb1b7x2c[_0x9d60[53]][_0x9d60[63]]);_0xb1b7x1f[_0x9d60[64]]= qs[_0x9d60[55]](_[_0x9d60[65]](_0xb1b7x2c[_0x9d60[53]],_0xb1b7x2d[_0x9d60[55]]));if(_0xb1b7x2f[_0x9d60[52]]){if(_0xb1b7x2f[_0x9d60[54]]){_0xb1b7x2f[_0x9d60[54]]= moment(_0xb1b7x2f[_0x9d60[54]])[_0x9d60[67]](1,_0x9d60[66])}else {_0xb1b7x2f[_0x9d60[54]]= moment(_0xb1b7x2f[_0x9d60[52]])[_0x9d60[67]](1,_0x9d60[66])};_[_0x9d60[68]](_0xb1b7x1f[_0x9d60[64]],{createdAt:{$gte:_0xb1b7x2f[_0x9d60[52]],$lte:_0xb1b7x2f[_0x9d60[54]]}})};if(_0xb1b7x2c[_0x9d60[53]][_0x9d60[69]]){_0xb1b7x1f[_0x9d60[64]]= _[_0x9d60[68]](_0xb1b7x1f[_0x9d60[64]],{$or:_[_0x9d60[71]](_0xb1b7x1f[_0x9d60[57]],function(_0xb1b7x30){var _0xb1b7x2e={};_0xb1b7x2e[_0xb1b7x30]= {$like:_0x9d60[70]+ _0xb1b7x2c[_0x9d60[53]][_0x9d60[69]]+ _0x9d60[70]};return _0xb1b7x2e})})};_0xb1b7x1f= _[_0x9d60[68]]({},_0xb1b7x1f,_0xb1b7x2c[_0x9d60[72]]);var _0xb1b7x31={where:_0xb1b7x1f[_0x9d60[64]]};return db[_0x9d60[50]][_0x9d60[30]](_0xb1b7x31)[_0x9d60[40]](function(_0xb1b7x20){_0xb1b7x2e[_0x9d60[30]]= _0xb1b7x20;if(_0xb1b7x2c[_0x9d60[53]][_0x9d60[75]]){_0xb1b7x1f[_0x9d60[76]]= [{all:true}]};return db[_0x9d60[50]][_0x9d60[77]](_0xb1b7x1f)})[_0x9d60[40]](function(_0xb1b7x32){_0xb1b7x2e[_0x9d60[74]]= _0xb1b7x32;return _0xb1b7x2e})[_0x9d60[40]](respondWithFilteredResult(_0xb1b7x1a,_0xb1b7x1f))[_0x9d60[73]](handleError(_0xb1b7x1a,null))};exports[_0x9d60[78]]= function(_0xb1b7x2c,_0xb1b7x1a){var _0xb1b7x1f={raw:true,where:{id:_0xb1b7x2c[_0x9d60[80]][_0x9d60[79]]}},_0xb1b7x2d={};_0xb1b7x2d[_0x9d60[48]]= _[_0x9d60[51]](db[_0x9d60[50]][_0x9d60[49]]);_0xb1b7x2d[_0x9d60[53]]= _[_0x9d60[51]](_0xb1b7x2c[_0x9d60[53]]);_0xb1b7x2d[_0x9d60[55]]= _[_0x9d60[56]](_0xb1b7x2d[_0x9d60[48]],_0xb1b7x2d[_0x9d60[53]]);_0xb1b7x1f[_0x9d60[57]]= _[_0x9d60[56]](_0xb1b7x2d[_0x9d60[48]],qs[_0x9d60[58]](_0xb1b7x2c[_0x9d60[53]][_0x9d60[58]]));_0xb1b7x1f[_0x9d60[57]]= (_0xb1b7x1f[_0x9d60[57]][_0x9d60[59]])?_0xb1b7x1f[_0x9d60[57]]:_0xb1b7x2d[_0x9d60[48]];if(_0xb1b7x2c[_0x9d60[53]][_0x9d60[75]]){_0xb1b7x1f[_0x9d60[76]]= [{all:true}]};_0xb1b7x1f= _[_0x9d60[68]]({},_0xb1b7x1f,_0xb1b7x2c[_0x9d60[72]]);return db[_0x9d60[50]][_0x9d60[81]](_0xb1b7x1f)[_0x9d60[40]](handleEntityNotFound(_0xb1b7x1a,null))[_0x9d60[40]](respondWithResult(_0xb1b7x1a,null))[_0x9d60[73]](handleError(_0xb1b7x1a,null))};exports[_0x9d60[82]]= function(_0xb1b7x2c,_0xb1b7x1a){return db[_0x9d60[50]][_0x9d60[82]](_0xb1b7x2c[_0x9d60[83]],{})[_0x9d60[40]](respondWithResult(_0xb1b7x1a,201))[_0x9d60[73]](handleError(_0xb1b7x1a,null))};exports[_0x9d60[42]]= function(_0xb1b7x2c,_0xb1b7x1a){return db[_0x9d60[50]][_0x9d60[81]]({where:{id:_0xb1b7x2c[_0x9d60[80]][_0x9d60[79]]}})[_0x9d60[40]](handleEntityNotFound(_0xb1b7x1a,null))[_0x9d60[40]](removeEntity(_0xb1b7x1a,null))[_0x9d60[73]](handleError(_0xb1b7x1a,null))};exports[_0x9d60[84]]= function(_0xb1b7x2c,_0xb1b7x1a){return db[_0x9d60[50]][_0x9d60[84]]()[_0x9d60[40]](respondWithResult(_0xb1b7x1a,null))[_0x9d60[73]](handleError(_0xb1b7x1a,null))};exports[_0x9d60[41]]= function(_0xb1b7x2c,_0xb1b7x1a){if(_0xb1b7x2c[_0x9d60[83]][_0x9d60[85]]){delete _0xb1b7x2c[_0x9d60[83]][_0x9d60[85]]};return db[_0x9d60[50]][_0x9d60[81]]({where:{uniqueid:_0xb1b7x2c[_0x9d60[80]][_0x9d60[79]]}})[_0x9d60[40]](handleEntityNotFound(_0xb1b7x1a,null))[_0x9d60[40]](saveUpdates(_0xb1b7x2c[_0x9d60[83]],null))[_0x9d60[40]](respondWithResult(_0xb1b7x1a,null))[_0x9d60[73]](handleError(_0xb1b7x1a,null))}
\ No newline at end of file
+var _0xb0df=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x75\x6E\x69\x71\x75\x65\x69\x64"];_0xb0df[0];var jsonpatch=require(_0xb0df[1]);var rp=require(_0xb0df[2]);var moment=require(_0xb0df[3]);var BPromise=require(_0xb0df[4]);var Mustache=require(_0xb0df[5]);var util=require(_0xb0df[6]);var path=require(_0xb0df[7]);var sox=require(_0xb0df[8]);var csv=require(_0xb0df[9]);var ejs=require(_0xb0df[10]);var fs=require(_0xb0df[11]);var _=require(_0xb0df[12]);var squel=require(_0xb0df[13]);var crypto=require(_0xb0df[14]);var jsforce=require(_0xb0df[15]);var deskjs=require(_0xb0df[16]);var toCsv=require(_0xb0df[9]);var querystring=require(_0xb0df[17]);var Papa=require(_0xb0df[18]);var qs=require(_0xb0df[19]);var logger=require(_0xb0df[21])(_0xb0df[20]);var utils=require(_0xb0df[22]);var config=require(_0xb0df[23]);var db=require(_0xb0df[25])[_0xb0df[24]];function respondWithStatusCode(_0x3cf2x1a,_0x3cf2x1b){_0x3cf2x1b= _0x3cf2x1b|| 204;return function(_0x3cf2x1c){if(_0x3cf2x1c){return _0x3cf2x1a[_0xb0df[26]](_0x3cf2x1b)};return _0x3cf2x1a[_0xb0df[28]](_0x3cf2x1b)[_0xb0df[27]]()}}function respondWithResult(_0x3cf2x1a,_0x3cf2x1b){_0x3cf2x1b= _0x3cf2x1b|| 200;return function(_0x3cf2x1c){if(_0x3cf2x1c){return _0x3cf2x1a[_0xb0df[28]](_0x3cf2x1b)[_0xb0df[29]](_0x3cf2x1c)}}}function respondWithFilteredResult(_0x3cf2x1a,_0x3cf2x1f){return function(_0x3cf2x1c){if(_0x3cf2x1c){var _0x3cf2x20=_0x3cf2x1c[_0xb0df[30]],_0x3cf2x21=_0x3cf2x1f[_0xb0df[31]],_0x3cf2x22=_0x3cf2x1f[_0xb0df[31]]+ _0x3cf2x1f[_0xb0df[32]],_0x3cf2x1b;if(_0x3cf2x22>= _0x3cf2x20){_0x3cf2x22= _0x3cf2x20;_0x3cf2x1b= 200}else {_0x3cf2x1b= 206};_0x3cf2x1a[_0xb0df[28]](_0x3cf2x1b);return _0x3cf2x1a[_0xb0df[36]](_0xb0df[33],_0x3cf2x21+ _0xb0df[34]+ _0x3cf2x22+ _0xb0df[35]+ _0x3cf2x20)[_0xb0df[29]](_0x3cf2x1c)};return null}}function patchUpdates(_0x3cf2x24){return function(_0x3cf2x1c){try{jsonpatch[_0xb0df[37]](_0x3cf2x1c,_0x3cf2x24,true)}catch(err){return BPromise[_0xb0df[38]](err)};return _0x3cf2x1c[_0xb0df[39]]()}}function saveUpdates(_0x3cf2x26,_0x3cf2x1b){return function(_0x3cf2x1c){if(_0x3cf2x1c){return _0x3cf2x1c[_0xb0df[41]](_0x3cf2x26)[_0xb0df[40]](function(_0x3cf2x27){return _0x3cf2x27})};return null}}function removeEntity(_0x3cf2x1a,_0x3cf2x1b){return function(_0x3cf2x1c){if(_0x3cf2x1c){return _0x3cf2x1c[_0xb0df[42]]()[_0xb0df[40]](function(){_0x3cf2x1a[_0xb0df[28]](204)[_0xb0df[27]]()})}}}function handleEntityNotFound(_0x3cf2x1a,_0x3cf2x1b){return function(_0x3cf2x1c){if(!_0x3cf2x1c){_0x3cf2x1a[_0xb0df[26]](404)};return _0x3cf2x1c}}function handleError(_0x3cf2x1a,_0x3cf2x1b){_0x3cf2x1b= _0x3cf2x1b|| 500;return function(_0x3cf2x2b){logger[_0xb0df[44]](_0x3cf2x2b[_0xb0df[43]]);if(_0x3cf2x2b[_0xb0df[45]]){delete _0x3cf2x2b[_0xb0df[45]]};_0x3cf2x1a[_0xb0df[28]](_0x3cf2x1b)[_0xb0df[46]](_0x3cf2x2b)}}exports[_0xb0df[47]]= function(_0x3cf2x2c,_0x3cf2x1a){var _0x3cf2x1f={},_0x3cf2x2d={},_0x3cf2x2e={count:0,rows:[]};_0x3cf2x2d[_0xb0df[48]]= _[_0xb0df[51]](db[_0xb0df[50]][_0xb0df[49]]);var _0x3cf2x2f={dateStart:_0x3cf2x2c[_0xb0df[53]][_0xb0df[52]],dateEnd:_0x3cf2x2c[_0xb0df[53]][_0xb0df[54]]};delete _0x3cf2x2c[_0xb0df[53]][_0xb0df[52]];delete _0x3cf2x2c[_0xb0df[53]][_0xb0df[54]];_0x3cf2x2d[_0xb0df[53]]= _[_0xb0df[51]](_0x3cf2x2c[_0xb0df[53]]);_0x3cf2x2d[_0xb0df[55]]= _[_0xb0df[56]](_0x3cf2x2d[_0xb0df[48]],_0x3cf2x2d[_0xb0df[53]]);_0x3cf2x1f[_0xb0df[57]]= _[_0xb0df[56]](_0x3cf2x2d[_0xb0df[48]],qs[_0xb0df[58]](_0x3cf2x2c[_0xb0df[53]][_0xb0df[58]]));_0x3cf2x1f[_0xb0df[57]]= (_0x3cf2x1f[_0xb0df[57]][_0xb0df[59]])?_0x3cf2x1f[_0xb0df[57]]:_0x3cf2x2d[_0xb0df[48]];if(!_0x3cf2x2c[_0xb0df[53]][_0xb0df[61]](_0xb0df[60])){_0x3cf2x1f[_0xb0df[32]]= qs[_0xb0df[32]](_0x3cf2x2c[_0xb0df[53]][_0xb0df[32]]);_0x3cf2x1f[_0xb0df[31]]= qs[_0xb0df[31]](_0x3cf2x2c[_0xb0df[53]][_0xb0df[31]])};_0x3cf2x1f[_0xb0df[62]]= qs[_0xb0df[63]](_0x3cf2x2c[_0xb0df[53]][_0xb0df[63]]);_0x3cf2x1f[_0xb0df[64]]= qs[_0xb0df[55]](_[_0xb0df[65]](_0x3cf2x2c[_0xb0df[53]],_0x3cf2x2d[_0xb0df[55]]));if(_0x3cf2x2f[_0xb0df[52]]){if(_0x3cf2x2f[_0xb0df[54]]){_0x3cf2x2f[_0xb0df[54]]= moment(_0x3cf2x2f[_0xb0df[54]])[_0xb0df[67]](1,_0xb0df[66])}else {_0x3cf2x2f[_0xb0df[54]]= moment(_0x3cf2x2f[_0xb0df[52]])[_0xb0df[67]](1,_0xb0df[66])};_[_0xb0df[68]](_0x3cf2x1f[_0xb0df[64]],{createdAt:{$gte:_0x3cf2x2f[_0xb0df[52]],$lte:_0x3cf2x2f[_0xb0df[54]]}})};if(_0x3cf2x2c[_0xb0df[53]][_0xb0df[69]]){_0x3cf2x1f[_0xb0df[64]]= _[_0xb0df[68]](_0x3cf2x1f[_0xb0df[64]],{$or:_[_0xb0df[71]](_0x3cf2x1f[_0xb0df[57]],function(_0x3cf2x30){var _0x3cf2x2e={};_0x3cf2x2e[_0x3cf2x30]= {$like:_0xb0df[70]+ _0x3cf2x2c[_0xb0df[53]][_0xb0df[69]]+ _0xb0df[70]};return _0x3cf2x2e})})};_0x3cf2x1f= _[_0xb0df[68]]({},_0x3cf2x1f,_0x3cf2x2c[_0xb0df[72]]);var _0x3cf2x31={where:_0x3cf2x1f[_0xb0df[64]]};return db[_0xb0df[50]][_0xb0df[30]](_0x3cf2x31)[_0xb0df[40]](function(_0x3cf2x20){_0x3cf2x2e[_0xb0df[30]]= _0x3cf2x20;if(_0x3cf2x2c[_0xb0df[53]][_0xb0df[75]]){_0x3cf2x1f[_0xb0df[76]]= [{all:true}]};return db[_0xb0df[50]][_0xb0df[77]](_0x3cf2x1f)})[_0xb0df[40]](function(_0x3cf2x32){_0x3cf2x2e[_0xb0df[74]]= _0x3cf2x32;return _0x3cf2x2e})[_0xb0df[40]](respondWithFilteredResult(_0x3cf2x1a,_0x3cf2x1f))[_0xb0df[73]](handleError(_0x3cf2x1a,null))};exports[_0xb0df[78]]= function(_0x3cf2x2c,_0x3cf2x1a){var _0x3cf2x1f={raw:true,where:{id:_0x3cf2x2c[_0xb0df[80]][_0xb0df[79]]}},_0x3cf2x2d={};_0x3cf2x2d[_0xb0df[48]]= _[_0xb0df[51]](db[_0xb0df[50]][_0xb0df[49]]);_0x3cf2x2d[_0xb0df[53]]= _[_0xb0df[51]](_0x3cf2x2c[_0xb0df[53]]);_0x3cf2x2d[_0xb0df[55]]= _[_0xb0df[56]](_0x3cf2x2d[_0xb0df[48]],_0x3cf2x2d[_0xb0df[53]]);_0x3cf2x1f[_0xb0df[57]]= _[_0xb0df[56]](_0x3cf2x2d[_0xb0df[48]],qs[_0xb0df[58]](_0x3cf2x2c[_0xb0df[53]][_0xb0df[58]]));_0x3cf2x1f[_0xb0df[57]]= (_0x3cf2x1f[_0xb0df[57]][_0xb0df[59]])?_0x3cf2x1f[_0xb0df[57]]:_0x3cf2x2d[_0xb0df[48]];if(_0x3cf2x2c[_0xb0df[53]][_0xb0df[75]]){_0x3cf2x1f[_0xb0df[76]]= [{all:true}]};_0x3cf2x1f= _[_0xb0df[68]]({},_0x3cf2x1f,_0x3cf2x2c[_0xb0df[72]]);return db[_0xb0df[50]][_0xb0df[81]](_0x3cf2x1f)[_0xb0df[40]](handleEntityNotFound(_0x3cf2x1a,null))[_0xb0df[40]](respondWithResult(_0x3cf2x1a,null))[_0xb0df[73]](handleError(_0x3cf2x1a,null))};exports[_0xb0df[82]]= function(_0x3cf2x2c,_0x3cf2x1a){return db[_0xb0df[50]][_0xb0df[82]](_0x3cf2x2c[_0xb0df[83]],{})[_0xb0df[40]](respondWithResult(_0x3cf2x1a,201))[_0xb0df[73]](handleError(_0x3cf2x1a,null))};exports[_0xb0df[42]]= function(_0x3cf2x2c,_0x3cf2x1a){return db[_0xb0df[50]][_0xb0df[81]]({where:{id:_0x3cf2x2c[_0xb0df[80]][_0xb0df[79]]}})[_0xb0df[40]](handleEntityNotFound(_0x3cf2x1a,null))[_0xb0df[40]](removeEntity(_0x3cf2x1a,null))[_0xb0df[73]](handleError(_0x3cf2x1a,null))};exports[_0xb0df[84]]= function(_0x3cf2x2c,_0x3cf2x1a){return db[_0xb0df[50]][_0xb0df[84]]()[_0xb0df[40]](respondWithResult(_0x3cf2x1a,null))[_0xb0df[73]](handleError(_0x3cf2x1a,null))};exports[_0xb0df[41]]= function(_0x3cf2x2c,_0x3cf2x1a){if(_0x3cf2x2c[_0xb0df[83]][_0xb0df[85]]){delete _0x3cf2x2c[_0xb0df[83]][_0xb0df[85]]};return db[_0xb0df[50]][_0xb0df[81]]({where:{uniqueid:_0x3cf2x2c[_0xb0df[80]][_0xb0df[79]]}})[_0xb0df[40]](handleEntityNotFound(_0x3cf2x1a,null))[_0xb0df[40]](saveUpdates(_0x3cf2x2c[_0xb0df[83]],null))[_0xb0df[40]](respondWithResult(_0x3cf2x1a,null))[_0xb0df[73]](handleError(_0x3cf2x1a,null))}
\ No newline at end of file
index 868a2ba..526538a 100644 (file)
@@ -1 +1 @@
-var _0xf3e1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C","\x64\x65\x66\x69\x6E\x65"];_0xf3e1[0];var _=require(_0xf3e1[1]);var util=require(_0xf3e1[2]);var logger=require(_0xf3e1[4])(_0xf3e1[3]);var moment=require(_0xf3e1[5]);var BPromise=require(_0xf3e1[6]);var rp=require(_0xf3e1[7]);var attributes=require(_0xf3e1[8]);module[_0xf3e1[9]]= function(_0x5bcax8,_0x5bcax9){return _0x5bcax8[_0xf3e1[12]](_0xf3e1[10],attributes,{tableName:_0xf3e1[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x187a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C","\x64\x65\x66\x69\x6E\x65"];_0x187a[0];var _=require(_0x187a[1]);var util=require(_0x187a[2]);var logger=require(_0x187a[4])(_0x187a[3]);var moment=require(_0x187a[5]);var BPromise=require(_0x187a[6]);var rp=require(_0x187a[7]);var attributes=require(_0x187a[8]);module[_0x187a[9]]= function(_0xc387x8,_0xc387x9){return _0xc387x8[_0x187a[12]](_0x187a[10],attributes,{tableName:_0x187a[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index c785b03..a375650 100644 (file)
@@ -1 +1 @@
-var _0x8696=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65"];_0x8696[0];var _=require(_0x8696[1]);var util=require(_0x8696[2]);var moment=require(_0x8696[3]);var BPromise=require(_0x8696[4]);var rs=require(_0x8696[5]);var fs=require(_0x8696[6]);var db=require(_0x8696[8])[_0x8696[7]];var utils=require(_0x8696[9]);var logger=require(_0x8696[11])(_0x8696[10]);var config=require(_0x8696[12]);var jayson=require(_0x8696[13]);var client=jayson[_0x8696[15]][_0x8696[14]]({port:9002});function respondWithRpcPromise(_0xf878xe,_0xf878xf,_0xf878x10){return  new BPromise(function(_0xf878x11,_0xf878x12){return client[_0x8696[28]](_0xf878xe,_0xf878x10)[_0x8696[27]](function(_0xf878x14){logger[_0x8696[20]](_0x8696[16],_0xf878xf,_0x8696[19]);logger[_0x8696[23]](_0x8696[21],_0xf878xf,_0x8696[19],JSON[_0x8696[22]](_0xf878x14));if(_0xf878x14[_0x8696[17]]){if(_0xf878x14[_0x8696[17]][_0x8696[24]]=== 500){logger[_0x8696[17]](_0x8696[16],_0xf878xf,_0xf878x14[_0x8696[17]][_0x8696[25]]);return _0xf878x12(_0xf878x14[_0x8696[17]][_0x8696[25]])};logger[_0x8696[17]](_0x8696[16],_0xf878xf,_0xf878x14[_0x8696[17]][_0x8696[25]]);return _0xf878x11(_0xf878x14[_0x8696[17]][_0x8696[25]])}else {logger[_0x8696[20]](_0x8696[16],_0xf878xf,_0x8696[19]);_0xf878x11(_0xf878x14[_0x8696[26]][_0x8696[25]])}})[_0x8696[18]](function(_0xf878x13){logger[_0x8696[17]](_0x8696[16],_0xf878xf,_0xf878x13);_0xf878x12(_0xf878x13)})})}exports[_0x8696[29]]= function(_0xf878x10){var _0xf878x15=this;return  new Promise(function(_0xf878x11,_0xf878x12){return db[_0x8696[40]][_0x8696[39]]({raw:_0xf878x10[_0x8696[30]]?(_0xf878x10[_0x8696[30]][_0x8696[31]]=== undefined)?true:false:true,where:_0xf878x10[_0x8696[30]]?_0xf878x10[_0x8696[30]][_0x8696[32]]|| null:null,attributes:_0xf878x10[_0x8696[30]]?_0xf878x10[_0x8696[30]][_0x8696[33]]|| null:null,limit:_0xf878x10[_0x8696[30]]?_0xf878x10[_0x8696[30]][_0x8696[34]]|| null:null,include:_0xf878x10[_0x8696[30]]?(_0xf878x10[_0x8696[30]][_0x8696[35]]?_[_0x8696[38]](_0xf878x10[_0x8696[30]][_0x8696[35]],function(_0xf878x16){return {model:db[_0xf878x16[_0x8696[36]]],as:_0xf878x16[_0x8696[37]],attributes:_0xf878x16[_0x8696[33]],include:_0xf878x16[_0x8696[35]]?_[_0x8696[38]](_0xf878x16[_0x8696[35]],function(_0xf878x17){return {model:db[_0xf878x17[_0x8696[36]]],as:_0xf878x17[_0x8696[37]],attributes:_0xf878x17[_0x8696[33]],include:_0xf878x17[_0x8696[35]]?_[_0x8696[38]](_0xf878x17[_0x8696[35]],function(_0xf878x18){return {model:db[_0xf878x18[_0x8696[36]]],as:_0xf878x18[_0x8696[37]],attributes:_0xf878x18[_0x8696[33]]}}):[]}}):[]}}):[]):[]})[_0x8696[27]](function(_0xf878x14){logger[_0x8696[20]](_0x8696[29],_0xf878x10);logger[_0x8696[23]](_0x8696[29],_0xf878x10,JSON[_0x8696[22]](_0xf878x14));_0xf878x11(_0xf878x14)})[_0x8696[18]](function(_0xf878x13){logger[_0x8696[17]](_0x8696[29],_0xf878x13[_0x8696[25]],_0xf878x10);_0xf878x12(_0xf878x15[_0x8696[17]](500,_0xf878x13[_0x8696[25]]))})})};exports[_0x8696[41]]= function(_0xf878x10){var _0xf878x15=this;return  new Promise(function(_0xf878x11,_0xf878x12){return db[_0x8696[40]][_0x8696[43]](_0xf878x10[_0x8696[42]],{raw:_0xf878x10[_0x8696[30]]?(_0xf878x10[_0x8696[30]][_0x8696[31]]=== undefined)?true:false:true})[_0x8696[27]](function(_0xf878x14){logger[_0x8696[20]](_0x8696[41],_0xf878x10);logger[_0x8696[23]](_0x8696[41],_0xf878x10,JSON[_0x8696[22]](_0xf878x14));_0xf878x11(_0xf878x14)})[_0x8696[18]](function(_0xf878x13){logger[_0x8696[17]](_0x8696[41],_0xf878x13[_0x8696[25]],_0xf878x10);_0xf878x12(_0xf878x15[_0x8696[17]](500,_0xf878x13[_0x8696[25]]))})})};exports[_0x8696[44]]= function(_0xf878x10){var _0xf878x15=this;return  new Promise(function(_0xf878x11,_0xf878x12){return db[_0x8696[40]][_0x8696[45]](_0xf878x10[_0x8696[42]],{raw:_0xf878x10[_0x8696[30]]?(_0xf878x10[_0x8696[30]][_0x8696[31]]=== undefined)?true:false:true,individualHooks:true,where:_0xf878x10[_0x8696[30]]?_0xf878x10[_0x8696[30]][_0x8696[32]]|| null:null,attributes:_0xf878x10[_0x8696[30]]?_0xf878x10[_0x8696[30]][_0x8696[33]]|| null:null,limit:_0xf878x10[_0x8696[30]]?_0xf878x10[_0x8696[30]][_0x8696[34]]|| null:null})[_0x8696[27]](function(_0xf878x14){logger[_0x8696[20]](_0x8696[44],_0xf878x10);logger[_0x8696[23]](_0x8696[44],_0xf878x10,JSON[_0x8696[22]](_0xf878x14));_0xf878x11(_0xf878x14)})[_0x8696[18]](function(_0xf878x13){logger[_0x8696[17]](_0x8696[44],_0xf878x13[_0x8696[25]],_0xf878x10);_0xf878x12(_0xf878x15[_0x8696[17]](500,_0xf878x13[_0x8696[25]]))})})}
\ No newline at end of file
+var _0x6be7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65"];_0x6be7[0];var _=require(_0x6be7[1]);var util=require(_0x6be7[2]);var moment=require(_0x6be7[3]);var BPromise=require(_0x6be7[4]);var rs=require(_0x6be7[5]);var fs=require(_0x6be7[6]);var db=require(_0x6be7[8])[_0x6be7[7]];var utils=require(_0x6be7[9]);var logger=require(_0x6be7[11])(_0x6be7[10]);var config=require(_0x6be7[12]);var jayson=require(_0x6be7[13]);var client=jayson[_0x6be7[15]][_0x6be7[14]]({port:9002});function respondWithRpcPromise(_0x7c8cxe,_0x7c8cxf,_0x7c8cx10){return  new BPromise(function(_0x7c8cx11,_0x7c8cx12){return client[_0x6be7[28]](_0x7c8cxe,_0x7c8cx10)[_0x6be7[27]](function(_0x7c8cx14){logger[_0x6be7[20]](_0x6be7[16],_0x7c8cxf,_0x6be7[19]);logger[_0x6be7[23]](_0x6be7[21],_0x7c8cxf,_0x6be7[19],JSON[_0x6be7[22]](_0x7c8cx14));if(_0x7c8cx14[_0x6be7[17]]){if(_0x7c8cx14[_0x6be7[17]][_0x6be7[24]]=== 500){logger[_0x6be7[17]](_0x6be7[16],_0x7c8cxf,_0x7c8cx14[_0x6be7[17]][_0x6be7[25]]);return _0x7c8cx12(_0x7c8cx14[_0x6be7[17]][_0x6be7[25]])};logger[_0x6be7[17]](_0x6be7[16],_0x7c8cxf,_0x7c8cx14[_0x6be7[17]][_0x6be7[25]]);return _0x7c8cx11(_0x7c8cx14[_0x6be7[17]][_0x6be7[25]])}else {logger[_0x6be7[20]](_0x6be7[16],_0x7c8cxf,_0x6be7[19]);_0x7c8cx11(_0x7c8cx14[_0x6be7[26]][_0x6be7[25]])}})[_0x6be7[18]](function(_0x7c8cx13){logger[_0x6be7[17]](_0x6be7[16],_0x7c8cxf,_0x7c8cx13);_0x7c8cx12(_0x7c8cx13)})})}exports[_0x6be7[29]]= function(_0x7c8cx10){var _0x7c8cx15=this;return  new Promise(function(_0x7c8cx11,_0x7c8cx12){return db[_0x6be7[40]][_0x6be7[39]]({raw:_0x7c8cx10[_0x6be7[30]]?(_0x7c8cx10[_0x6be7[30]][_0x6be7[31]]=== undefined)?true:false:true,where:_0x7c8cx10[_0x6be7[30]]?_0x7c8cx10[_0x6be7[30]][_0x6be7[32]]|| null:null,attributes:_0x7c8cx10[_0x6be7[30]]?_0x7c8cx10[_0x6be7[30]][_0x6be7[33]]|| null:null,limit:_0x7c8cx10[_0x6be7[30]]?_0x7c8cx10[_0x6be7[30]][_0x6be7[34]]|| null:null,include:_0x7c8cx10[_0x6be7[30]]?(_0x7c8cx10[_0x6be7[30]][_0x6be7[35]]?_[_0x6be7[38]](_0x7c8cx10[_0x6be7[30]][_0x6be7[35]],function(_0x7c8cx16){return {model:db[_0x7c8cx16[_0x6be7[36]]],as:_0x7c8cx16[_0x6be7[37]],attributes:_0x7c8cx16[_0x6be7[33]],include:_0x7c8cx16[_0x6be7[35]]?_[_0x6be7[38]](_0x7c8cx16[_0x6be7[35]],function(_0x7c8cx17){return {model:db[_0x7c8cx17[_0x6be7[36]]],as:_0x7c8cx17[_0x6be7[37]],attributes:_0x7c8cx17[_0x6be7[33]],include:_0x7c8cx17[_0x6be7[35]]?_[_0x6be7[38]](_0x7c8cx17[_0x6be7[35]],function(_0x7c8cx18){return {model:db[_0x7c8cx18[_0x6be7[36]]],as:_0x7c8cx18[_0x6be7[37]],attributes:_0x7c8cx18[_0x6be7[33]]}}):[]}}):[]}}):[]):[]})[_0x6be7[27]](function(_0x7c8cx14){logger[_0x6be7[20]](_0x6be7[29],_0x7c8cx10);logger[_0x6be7[23]](_0x6be7[29],_0x7c8cx10,JSON[_0x6be7[22]](_0x7c8cx14));_0x7c8cx11(_0x7c8cx14)})[_0x6be7[18]](function(_0x7c8cx13){logger[_0x6be7[17]](_0x6be7[29],_0x7c8cx13[_0x6be7[25]],_0x7c8cx10);_0x7c8cx12(_0x7c8cx15[_0x6be7[17]](500,_0x7c8cx13[_0x6be7[25]]))})})};exports[_0x6be7[41]]= function(_0x7c8cx10){var _0x7c8cx15=this;return  new Promise(function(_0x7c8cx11,_0x7c8cx12){return db[_0x6be7[40]][_0x6be7[43]](_0x7c8cx10[_0x6be7[42]],{raw:_0x7c8cx10[_0x6be7[30]]?(_0x7c8cx10[_0x6be7[30]][_0x6be7[31]]=== undefined)?true:false:true})[_0x6be7[27]](function(_0x7c8cx14){logger[_0x6be7[20]](_0x6be7[41],_0x7c8cx10);logger[_0x6be7[23]](_0x6be7[41],_0x7c8cx10,JSON[_0x6be7[22]](_0x7c8cx14));_0x7c8cx11(_0x7c8cx14)})[_0x6be7[18]](function(_0x7c8cx13){logger[_0x6be7[17]](_0x6be7[41],_0x7c8cx13[_0x6be7[25]],_0x7c8cx10);_0x7c8cx12(_0x7c8cx15[_0x6be7[17]](500,_0x7c8cx13[_0x6be7[25]]))})})};exports[_0x6be7[44]]= function(_0x7c8cx10){var _0x7c8cx15=this;return  new Promise(function(_0x7c8cx11,_0x7c8cx12){return db[_0x6be7[40]][_0x6be7[45]](_0x7c8cx10[_0x6be7[42]],{raw:_0x7c8cx10[_0x6be7[30]]?(_0x7c8cx10[_0x6be7[30]][_0x6be7[31]]=== undefined)?true:false:true,individualHooks:true,where:_0x7c8cx10[_0x6be7[30]]?_0x7c8cx10[_0x6be7[30]][_0x6be7[32]]|| null:null,attributes:_0x7c8cx10[_0x6be7[30]]?_0x7c8cx10[_0x6be7[30]][_0x6be7[33]]|| null:null,limit:_0x7c8cx10[_0x6be7[30]]?_0x7c8cx10[_0x6be7[30]][_0x6be7[34]]|| null:null})[_0x6be7[27]](function(_0x7c8cx14){logger[_0x6be7[20]](_0x6be7[44],_0x7c8cx10);logger[_0x6be7[23]](_0x6be7[44],_0x7c8cx10,JSON[_0x6be7[22]](_0x7c8cx14));_0x7c8cx11(_0x7c8cx14)})[_0x6be7[18]](function(_0x7c8cx13){logger[_0x6be7[17]](_0x6be7[44],_0x7c8cx13[_0x6be7[25]],_0x7c8cx10);_0x7c8cx12(_0x7c8cx15[_0x6be7[17]](500,_0x7c8cx13[_0x6be7[25]]))})})}
\ No newline at end of file
index fcb0be8..d246a65 100644 (file)
@@ -1 +1 @@
-var _0x6687=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6687[0];var multer=require(_0x6687[1]);var util=require(_0x6687[2]);var path=require(_0x6687[3]);var express=require(_0x6687[4]);var router=express.Router();var auth=require(_0x6687[5]);var interaction=require(_0x6687[6]);var config=require(_0x6687[7]);var controller=require(_0x6687[8]);router[_0x6687[12]](_0x6687[9],auth[_0x6687[10]](),controller[_0x6687[11]]);router[_0x6687[12]](_0x6687[13],auth[_0x6687[10]](),controller[_0x6687[14]]);router[_0x6687[16]](_0x6687[9],auth[_0x6687[10]](),controller[_0x6687[15]]);router[_0x6687[18]](_0x6687[13],auth[_0x6687[10]](),controller[_0x6687[17]]);router[_0x6687[20]](_0x6687[13],auth[_0x6687[10]](),controller[_0x6687[19]]);module[_0x6687[21]]= router
\ No newline at end of file
+var _0x3f80=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x3f80[0];var multer=require(_0x3f80[1]);var util=require(_0x3f80[2]);var path=require(_0x3f80[3]);var express=require(_0x3f80[4]);var router=express.Router();var auth=require(_0x3f80[5]);var interaction=require(_0x3f80[6]);var config=require(_0x3f80[7]);var controller=require(_0x3f80[8]);router[_0x3f80[12]](_0x3f80[9],auth[_0x3f80[10]](),controller[_0x3f80[11]]);router[_0x3f80[12]](_0x3f80[13],auth[_0x3f80[10]](),controller[_0x3f80[14]]);router[_0x3f80[16]](_0x3f80[9],auth[_0x3f80[10]](),controller[_0x3f80[15]]);router[_0x3f80[18]](_0x3f80[13],auth[_0x3f80[10]](),controller[_0x3f80[17]]);router[_0x3f80[20]](_0x3f80[13],auth[_0x3f80[10]](),controller[_0x3f80[19]]);module[_0x3f80[21]]= router
\ No newline at end of file
index ad3cb4c..d304e10 100644 (file)
@@ -1 +1 @@
-var _0x657c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x6F\x70\x74\x69\x6F\x6E\x73","","\x6A\x6F\x69\x6E","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x73\x70\x6C\x69\x74","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x657c[0];var Sequelize=require(_0x657c[1]);module[_0x657c[2]]= {name:{type:Sequelize[_0x657c[3]]},prefix:{type:Sequelize[_0x657c[3]],unique:_0x657c[4],allowNull:false},options:{type:Sequelize[_0x657c[3]],set:function(_0x45d8x2){this[_0x657c[8]](_0x657c[5],_0x45d8x2?_0x45d8x2[_0x657c[7]](_0x657c[6]):[])},get:function(){return this[_0x657c[9]](_0x657c[5])?this[_0x657c[9]](_0x657c[5])[_0x657c[10]](_0x657c[6]):[]}},auth:{type:Sequelize[_0x657c[11]],defaultValue:false},password:{type:Sequelize[_0x657c[3]]},record:{type:Sequelize[_0x657c[11]],defaultValue:false},recordingFormat:{type:Sequelize[_0x657c[3]]},description:{type:Sequelize[_0x657c[3]]}}
\ No newline at end of file
+var _0x831c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x6F\x70\x74\x69\x6F\x6E\x73","","\x6A\x6F\x69\x6E","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x73\x70\x6C\x69\x74","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x831c[0];var Sequelize=require(_0x831c[1]);module[_0x831c[2]]= {name:{type:Sequelize[_0x831c[3]]},prefix:{type:Sequelize[_0x831c[3]],unique:_0x831c[4],allowNull:false},options:{type:Sequelize[_0x831c[3]],set:function(_0xaee5x2){this[_0x831c[8]](_0x831c[5],_0xaee5x2?_0xaee5x2[_0x831c[7]](_0x831c[6]):[])},get:function(){return this[_0x831c[9]](_0x831c[5])?this[_0x831c[9]](_0x831c[5])[_0x831c[10]](_0x831c[6]):[]}},auth:{type:Sequelize[_0x831c[11]],defaultValue:false},password:{type:Sequelize[_0x831c[3]]},record:{type:Sequelize[_0x831c[11]],defaultValue:false},recordingFormat:{type:Sequelize[_0x831c[3]]},description:{type:Sequelize[_0x831c[3]]}}
\ No newline at end of file
index aa42730..35a4576 100644 (file)
@@ -1 +1 @@
-var _0x8522=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x8522[0];var jsonpatch=require(_0x8522[1]);var rp=require(_0x8522[2]);var moment=require(_0x8522[3]);var BPromise=require(_0x8522[4]);var Mustache=require(_0x8522[5]);var util=require(_0x8522[6]);var path=require(_0x8522[7]);var sox=require(_0x8522[8]);var csv=require(_0x8522[9]);var ejs=require(_0x8522[10]);var fs=require(_0x8522[11]);var _=require(_0x8522[12]);var squel=require(_0x8522[13]);var crypto=require(_0x8522[14]);var jsforce=require(_0x8522[15]);var deskjs=require(_0x8522[16]);var toCsv=require(_0x8522[9]);var querystring=require(_0x8522[17]);var Papa=require(_0x8522[18]);var qs=require(_0x8522[19]);var logger=require(_0x8522[21])(_0x8522[20]);var utils=require(_0x8522[22]);var config=require(_0x8522[23]);var db=require(_0x8522[25])[_0x8522[24]];function respondWithStatusCode(_0x9521x1a,_0x9521x1b){_0x9521x1b= _0x9521x1b|| 204;return function(_0x9521x1c){if(_0x9521x1c){return _0x9521x1a[_0x8522[26]](_0x9521x1b)};return _0x9521x1a[_0x8522[28]](_0x9521x1b)[_0x8522[27]]()}}function respondWithResult(_0x9521x1a,_0x9521x1b){_0x9521x1b= _0x9521x1b|| 200;return function(_0x9521x1c){if(_0x9521x1c){return _0x9521x1a[_0x8522[28]](_0x9521x1b)[_0x8522[29]](_0x9521x1c)}}}function respondWithFilteredResult(_0x9521x1a,_0x9521x1f){return function(_0x9521x1c){if(_0x9521x1c){var _0x9521x20=_0x9521x1c[_0x8522[30]],_0x9521x21=_0x9521x1f[_0x8522[31]],_0x9521x22=_0x9521x1f[_0x8522[31]]+ _0x9521x1f[_0x8522[32]],_0x9521x1b;if(_0x9521x22>= _0x9521x20){_0x9521x22= _0x9521x20;_0x9521x1b= 200}else {_0x9521x1b= 206};_0x9521x1a[_0x8522[28]](_0x9521x1b);return _0x9521x1a[_0x8522[36]](_0x8522[33],_0x9521x21+ _0x8522[34]+ _0x9521x22+ _0x8522[35]+ _0x9521x20)[_0x8522[29]](_0x9521x1c)};return null}}function patchUpdates(_0x9521x24){return function(_0x9521x1c){try{jsonpatch[_0x8522[37]](_0x9521x1c,_0x9521x24,true)}catch(err){return BPromise[_0x8522[38]](err)};return _0x9521x1c[_0x8522[39]]()}}function saveUpdates(_0x9521x26,_0x9521x1b){return function(_0x9521x1c){if(_0x9521x1c){return _0x9521x1c[_0x8522[41]](_0x9521x26)[_0x8522[40]](function(_0x9521x27){return _0x9521x27})};return null}}function removeEntity(_0x9521x1a,_0x9521x1b){return function(_0x9521x1c){if(_0x9521x1c){return _0x9521x1c[_0x8522[42]]()[_0x8522[40]](function(){_0x9521x1a[_0x8522[28]](204)[_0x8522[27]]()})}}}function handleEntityNotFound(_0x9521x1a,_0x9521x1b){return function(_0x9521x1c){if(!_0x9521x1c){_0x9521x1a[_0x8522[26]](404)};return _0x9521x1c}}function handleError(_0x9521x1a,_0x9521x1b){_0x9521x1b= _0x9521x1b|| 500;return function(_0x9521x2b){logger[_0x8522[44]](_0x9521x2b[_0x8522[43]]);if(_0x9521x2b[_0x8522[45]]){delete _0x9521x2b[_0x8522[45]]};_0x9521x1a[_0x8522[28]](_0x9521x1b)[_0x8522[46]](_0x9521x2b)}}exports[_0x8522[47]]= function(_0x9521x2c,_0x9521x1a){var _0x9521x1f={},_0x9521x2d={},_0x9521x2e={count:0,rows:[]};_0x9521x2d[_0x8522[48]]= _[_0x8522[51]](db[_0x8522[50]][_0x8522[49]]);var _0x9521x2f={dateStart:_0x9521x2c[_0x8522[53]][_0x8522[52]],dateEnd:_0x9521x2c[_0x8522[53]][_0x8522[54]]};delete _0x9521x2c[_0x8522[53]][_0x8522[52]];delete _0x9521x2c[_0x8522[53]][_0x8522[54]];_0x9521x2d[_0x8522[53]]= _[_0x8522[51]](_0x9521x2c[_0x8522[53]]);_0x9521x2d[_0x8522[55]]= _[_0x8522[56]](_0x9521x2d[_0x8522[48]],_0x9521x2d[_0x8522[53]]);_0x9521x1f[_0x8522[57]]= _[_0x8522[56]](_0x9521x2d[_0x8522[48]],qs[_0x8522[58]](_0x9521x2c[_0x8522[53]][_0x8522[58]]));_0x9521x1f[_0x8522[57]]= (_0x9521x1f[_0x8522[57]][_0x8522[59]])?_0x9521x1f[_0x8522[57]]:_0x9521x2d[_0x8522[48]];if(!_0x9521x2c[_0x8522[53]][_0x8522[61]](_0x8522[60])){_0x9521x1f[_0x8522[32]]= qs[_0x8522[32]](_0x9521x2c[_0x8522[53]][_0x8522[32]]);_0x9521x1f[_0x8522[31]]= qs[_0x8522[31]](_0x9521x2c[_0x8522[53]][_0x8522[31]])};_0x9521x1f[_0x8522[62]]= qs[_0x8522[63]](_0x9521x2c[_0x8522[53]][_0x8522[63]]);_0x9521x1f[_0x8522[64]]= qs[_0x8522[55]](_[_0x8522[65]](_0x9521x2c[_0x8522[53]],_0x9521x2d[_0x8522[55]]));if(_0x9521x2f[_0x8522[52]]){if(_0x9521x2f[_0x8522[54]]){_0x9521x2f[_0x8522[54]]= moment(_0x9521x2f[_0x8522[54]])[_0x8522[67]](1,_0x8522[66])}else {_0x9521x2f[_0x8522[54]]= moment(_0x9521x2f[_0x8522[52]])[_0x8522[67]](1,_0x8522[66])};_[_0x8522[68]](_0x9521x1f[_0x8522[64]],{createdAt:{$gte:_0x9521x2f[_0x8522[52]],$lte:_0x9521x2f[_0x8522[54]]}})};if(_0x9521x2c[_0x8522[53]][_0x8522[69]]){_0x9521x1f[_0x8522[64]]= _[_0x8522[68]](_0x9521x1f[_0x8522[64]],{$or:_[_0x8522[71]](_0x9521x1f[_0x8522[57]],function(_0x9521x30){var _0x9521x2e={};_0x9521x2e[_0x9521x30]= {$like:_0x8522[70]+ _0x9521x2c[_0x8522[53]][_0x8522[69]]+ _0x8522[70]};return _0x9521x2e})})};_0x9521x1f= _[_0x8522[68]]({},_0x9521x1f,_0x9521x2c[_0x8522[72]]);var _0x9521x31={where:_0x9521x1f[_0x8522[64]]};return db[_0x8522[50]][_0x8522[30]](_0x9521x31)[_0x8522[40]](function(_0x9521x20){_0x9521x2e[_0x8522[30]]= _0x9521x20;if(_0x9521x2c[_0x8522[53]][_0x8522[75]]){_0x9521x1f[_0x8522[76]]= [{all:true}]};return db[_0x8522[50]][_0x8522[77]](_0x9521x1f)})[_0x8522[40]](function(_0x9521x32){_0x9521x2e[_0x8522[74]]= _0x9521x32;return _0x9521x2e})[_0x8522[40]](respondWithFilteredResult(_0x9521x1a,_0x9521x1f))[_0x8522[73]](handleError(_0x9521x1a,null))};exports[_0x8522[78]]= function(_0x9521x2c,_0x9521x1a){var _0x9521x1f={raw:false,where:{id:_0x9521x2c[_0x8522[80]][_0x8522[79]]}},_0x9521x2d={};_0x9521x2d[_0x8522[48]]= _[_0x8522[51]](db[_0x8522[50]][_0x8522[49]]);_0x9521x2d[_0x8522[53]]= _[_0x8522[51]](_0x9521x2c[_0x8522[53]]);_0x9521x2d[_0x8522[55]]= _[_0x8522[56]](_0x9521x2d[_0x8522[48]],_0x9521x2d[_0x8522[53]]);_0x9521x1f[_0x8522[57]]= _[_0x8522[56]](_0x9521x2d[_0x8522[48]],qs[_0x8522[58]](_0x9521x2c[_0x8522[53]][_0x8522[58]]));_0x9521x1f[_0x8522[57]]= (_0x9521x1f[_0x8522[57]][_0x8522[59]])?_0x9521x1f[_0x8522[57]]:_0x9521x2d[_0x8522[48]];if(_0x9521x2c[_0x8522[53]][_0x8522[75]]){_0x9521x1f[_0x8522[76]]= [{all:true}]};_0x9521x1f= _[_0x8522[68]]({},_0x9521x1f,_0x9521x2c[_0x8522[72]]);return db[_0x8522[50]][_0x8522[81]](_0x9521x1f)[_0x8522[40]](handleEntityNotFound(_0x9521x1a,null))[_0x8522[40]](respondWithResult(_0x9521x1a,null))[_0x8522[73]](handleError(_0x9521x1a,null))};exports[_0x8522[82]]= function(_0x9521x2c,_0x9521x1a){return db[_0x8522[50]][_0x8522[82]](_0x9521x2c[_0x8522[83]],{})[_0x8522[40]](respondWithResult(_0x9521x1a,201))[_0x8522[73]](handleError(_0x9521x1a,null))};exports[_0x8522[41]]= function(_0x9521x2c,_0x9521x1a){if(_0x9521x2c[_0x8522[83]][_0x8522[79]]){delete _0x9521x2c[_0x8522[83]][_0x8522[79]]};return db[_0x8522[50]][_0x8522[81]]({where:{id:_0x9521x2c[_0x8522[80]][_0x8522[79]]}})[_0x8522[40]](handleEntityNotFound(_0x9521x1a,null))[_0x8522[40]](saveUpdates(_0x9521x2c[_0x8522[83]],null))[_0x8522[40]](respondWithResult(_0x9521x1a,null))[_0x8522[73]](handleError(_0x9521x1a,null))};exports[_0x8522[42]]= function(_0x9521x2c,_0x9521x1a){return db[_0x8522[50]][_0x8522[81]]({where:{id:_0x9521x2c[_0x8522[80]][_0x8522[79]]}})[_0x8522[40]](handleEntityNotFound(_0x9521x1a,null))[_0x8522[40]](removeEntity(_0x9521x1a,null))[_0x8522[73]](handleError(_0x9521x1a,null))}
\ No newline at end of file
+var _0x8b46=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x8b46[0];var jsonpatch=require(_0x8b46[1]);var rp=require(_0x8b46[2]);var moment=require(_0x8b46[3]);var BPromise=require(_0x8b46[4]);var Mustache=require(_0x8b46[5]);var util=require(_0x8b46[6]);var path=require(_0x8b46[7]);var sox=require(_0x8b46[8]);var csv=require(_0x8b46[9]);var ejs=require(_0x8b46[10]);var fs=require(_0x8b46[11]);var _=require(_0x8b46[12]);var squel=require(_0x8b46[13]);var crypto=require(_0x8b46[14]);var jsforce=require(_0x8b46[15]);var deskjs=require(_0x8b46[16]);var toCsv=require(_0x8b46[9]);var querystring=require(_0x8b46[17]);var Papa=require(_0x8b46[18]);var qs=require(_0x8b46[19]);var logger=require(_0x8b46[21])(_0x8b46[20]);var utils=require(_0x8b46[22]);var config=require(_0x8b46[23]);var db=require(_0x8b46[25])[_0x8b46[24]];function respondWithStatusCode(_0x2fe6x1a,_0x2fe6x1b){_0x2fe6x1b= _0x2fe6x1b|| 204;return function(_0x2fe6x1c){if(_0x2fe6x1c){return _0x2fe6x1a[_0x8b46[26]](_0x2fe6x1b)};return _0x2fe6x1a[_0x8b46[28]](_0x2fe6x1b)[_0x8b46[27]]()}}function respondWithResult(_0x2fe6x1a,_0x2fe6x1b){_0x2fe6x1b= _0x2fe6x1b|| 200;return function(_0x2fe6x1c){if(_0x2fe6x1c){return _0x2fe6x1a[_0x8b46[28]](_0x2fe6x1b)[_0x8b46[29]](_0x2fe6x1c)}}}function respondWithFilteredResult(_0x2fe6x1a,_0x2fe6x1f){return function(_0x2fe6x1c){if(_0x2fe6x1c){var _0x2fe6x20=_0x2fe6x1c[_0x8b46[30]],_0x2fe6x21=_0x2fe6x1f[_0x8b46[31]],_0x2fe6x22=_0x2fe6x1f[_0x8b46[31]]+ _0x2fe6x1f[_0x8b46[32]],_0x2fe6x1b;if(_0x2fe6x22>= _0x2fe6x20){_0x2fe6x22= _0x2fe6x20;_0x2fe6x1b= 200}else {_0x2fe6x1b= 206};_0x2fe6x1a[_0x8b46[28]](_0x2fe6x1b);return _0x2fe6x1a[_0x8b46[36]](_0x8b46[33],_0x2fe6x21+ _0x8b46[34]+ _0x2fe6x22+ _0x8b46[35]+ _0x2fe6x20)[_0x8b46[29]](_0x2fe6x1c)};return null}}function patchUpdates(_0x2fe6x24){return function(_0x2fe6x1c){try{jsonpatch[_0x8b46[37]](_0x2fe6x1c,_0x2fe6x24,true)}catch(err){return BPromise[_0x8b46[38]](err)};return _0x2fe6x1c[_0x8b46[39]]()}}function saveUpdates(_0x2fe6x26,_0x2fe6x1b){return function(_0x2fe6x1c){if(_0x2fe6x1c){return _0x2fe6x1c[_0x8b46[41]](_0x2fe6x26)[_0x8b46[40]](function(_0x2fe6x27){return _0x2fe6x27})};return null}}function removeEntity(_0x2fe6x1a,_0x2fe6x1b){return function(_0x2fe6x1c){if(_0x2fe6x1c){return _0x2fe6x1c[_0x8b46[42]]()[_0x8b46[40]](function(){_0x2fe6x1a[_0x8b46[28]](204)[_0x8b46[27]]()})}}}function handleEntityNotFound(_0x2fe6x1a,_0x2fe6x1b){return function(_0x2fe6x1c){if(!_0x2fe6x1c){_0x2fe6x1a[_0x8b46[26]](404)};return _0x2fe6x1c}}function handleError(_0x2fe6x1a,_0x2fe6x1b){_0x2fe6x1b= _0x2fe6x1b|| 500;return function(_0x2fe6x2b){logger[_0x8b46[44]](_0x2fe6x2b[_0x8b46[43]]);if(_0x2fe6x2b[_0x8b46[45]]){delete _0x2fe6x2b[_0x8b46[45]]};_0x2fe6x1a[_0x8b46[28]](_0x2fe6x1b)[_0x8b46[46]](_0x2fe6x2b)}}exports[_0x8b46[47]]= function(_0x2fe6x2c,_0x2fe6x1a){var _0x2fe6x1f={},_0x2fe6x2d={},_0x2fe6x2e={count:0,rows:[]};_0x2fe6x2d[_0x8b46[48]]= _[_0x8b46[51]](db[_0x8b46[50]][_0x8b46[49]]);var _0x2fe6x2f={dateStart:_0x2fe6x2c[_0x8b46[53]][_0x8b46[52]],dateEnd:_0x2fe6x2c[_0x8b46[53]][_0x8b46[54]]};delete _0x2fe6x2c[_0x8b46[53]][_0x8b46[52]];delete _0x2fe6x2c[_0x8b46[53]][_0x8b46[54]];_0x2fe6x2d[_0x8b46[53]]= _[_0x8b46[51]](_0x2fe6x2c[_0x8b46[53]]);_0x2fe6x2d[_0x8b46[55]]= _[_0x8b46[56]](_0x2fe6x2d[_0x8b46[48]],_0x2fe6x2d[_0x8b46[53]]);_0x2fe6x1f[_0x8b46[57]]= _[_0x8b46[56]](_0x2fe6x2d[_0x8b46[48]],qs[_0x8b46[58]](_0x2fe6x2c[_0x8b46[53]][_0x8b46[58]]));_0x2fe6x1f[_0x8b46[57]]= (_0x2fe6x1f[_0x8b46[57]][_0x8b46[59]])?_0x2fe6x1f[_0x8b46[57]]:_0x2fe6x2d[_0x8b46[48]];if(!_0x2fe6x2c[_0x8b46[53]][_0x8b46[61]](_0x8b46[60])){_0x2fe6x1f[_0x8b46[32]]= qs[_0x8b46[32]](_0x2fe6x2c[_0x8b46[53]][_0x8b46[32]]);_0x2fe6x1f[_0x8b46[31]]= qs[_0x8b46[31]](_0x2fe6x2c[_0x8b46[53]][_0x8b46[31]])};_0x2fe6x1f[_0x8b46[62]]= qs[_0x8b46[63]](_0x2fe6x2c[_0x8b46[53]][_0x8b46[63]]);_0x2fe6x1f[_0x8b46[64]]= qs[_0x8b46[55]](_[_0x8b46[65]](_0x2fe6x2c[_0x8b46[53]],_0x2fe6x2d[_0x8b46[55]]));if(_0x2fe6x2f[_0x8b46[52]]){if(_0x2fe6x2f[_0x8b46[54]]){_0x2fe6x2f[_0x8b46[54]]= moment(_0x2fe6x2f[_0x8b46[54]])[_0x8b46[67]](1,_0x8b46[66])}else {_0x2fe6x2f[_0x8b46[54]]= moment(_0x2fe6x2f[_0x8b46[52]])[_0x8b46[67]](1,_0x8b46[66])};_[_0x8b46[68]](_0x2fe6x1f[_0x8b46[64]],{createdAt:{$gte:_0x2fe6x2f[_0x8b46[52]],$lte:_0x2fe6x2f[_0x8b46[54]]}})};if(_0x2fe6x2c[_0x8b46[53]][_0x8b46[69]]){_0x2fe6x1f[_0x8b46[64]]= _[_0x8b46[68]](_0x2fe6x1f[_0x8b46[64]],{$or:_[_0x8b46[71]](_0x2fe6x1f[_0x8b46[57]],function(_0x2fe6x30){var _0x2fe6x2e={};_0x2fe6x2e[_0x2fe6x30]= {$like:_0x8b46[70]+ _0x2fe6x2c[_0x8b46[53]][_0x8b46[69]]+ _0x8b46[70]};return _0x2fe6x2e})})};_0x2fe6x1f= _[_0x8b46[68]]({},_0x2fe6x1f,_0x2fe6x2c[_0x8b46[72]]);var _0x2fe6x31={where:_0x2fe6x1f[_0x8b46[64]]};return db[_0x8b46[50]][_0x8b46[30]](_0x2fe6x31)[_0x8b46[40]](function(_0x2fe6x20){_0x2fe6x2e[_0x8b46[30]]= _0x2fe6x20;if(_0x2fe6x2c[_0x8b46[53]][_0x8b46[75]]){_0x2fe6x1f[_0x8b46[76]]= [{all:true}]};return db[_0x8b46[50]][_0x8b46[77]](_0x2fe6x1f)})[_0x8b46[40]](function(_0x2fe6x32){_0x2fe6x2e[_0x8b46[74]]= _0x2fe6x32;return _0x2fe6x2e})[_0x8b46[40]](respondWithFilteredResult(_0x2fe6x1a,_0x2fe6x1f))[_0x8b46[73]](handleError(_0x2fe6x1a,null))};exports[_0x8b46[78]]= function(_0x2fe6x2c,_0x2fe6x1a){var _0x2fe6x1f={raw:false,where:{id:_0x2fe6x2c[_0x8b46[80]][_0x8b46[79]]}},_0x2fe6x2d={};_0x2fe6x2d[_0x8b46[48]]= _[_0x8b46[51]](db[_0x8b46[50]][_0x8b46[49]]);_0x2fe6x2d[_0x8b46[53]]= _[_0x8b46[51]](_0x2fe6x2c[_0x8b46[53]]);_0x2fe6x2d[_0x8b46[55]]= _[_0x8b46[56]](_0x2fe6x2d[_0x8b46[48]],_0x2fe6x2d[_0x8b46[53]]);_0x2fe6x1f[_0x8b46[57]]= _[_0x8b46[56]](_0x2fe6x2d[_0x8b46[48]],qs[_0x8b46[58]](_0x2fe6x2c[_0x8b46[53]][_0x8b46[58]]));_0x2fe6x1f[_0x8b46[57]]= (_0x2fe6x1f[_0x8b46[57]][_0x8b46[59]])?_0x2fe6x1f[_0x8b46[57]]:_0x2fe6x2d[_0x8b46[48]];if(_0x2fe6x2c[_0x8b46[53]][_0x8b46[75]]){_0x2fe6x1f[_0x8b46[76]]= [{all:true}]};_0x2fe6x1f= _[_0x8b46[68]]({},_0x2fe6x1f,_0x2fe6x2c[_0x8b46[72]]);return db[_0x8b46[50]][_0x8b46[81]](_0x2fe6x1f)[_0x8b46[40]](handleEntityNotFound(_0x2fe6x1a,null))[_0x8b46[40]](respondWithResult(_0x2fe6x1a,null))[_0x8b46[73]](handleError(_0x2fe6x1a,null))};exports[_0x8b46[82]]= function(_0x2fe6x2c,_0x2fe6x1a){return db[_0x8b46[50]][_0x8b46[82]](_0x2fe6x2c[_0x8b46[83]],{})[_0x8b46[40]](respondWithResult(_0x2fe6x1a,201))[_0x8b46[73]](handleError(_0x2fe6x1a,null))};exports[_0x8b46[41]]= function(_0x2fe6x2c,_0x2fe6x1a){if(_0x2fe6x2c[_0x8b46[83]][_0x8b46[79]]){delete _0x2fe6x2c[_0x8b46[83]][_0x8b46[79]]};return db[_0x8b46[50]][_0x8b46[81]]({where:{id:_0x2fe6x2c[_0x8b46[80]][_0x8b46[79]]}})[_0x8b46[40]](handleEntityNotFound(_0x2fe6x1a,null))[_0x8b46[40]](saveUpdates(_0x2fe6x2c[_0x8b46[83]],null))[_0x8b46[40]](respondWithResult(_0x2fe6x1a,null))[_0x8b46[73]](handleError(_0x2fe6x1a,null))};exports[_0x8b46[42]]= function(_0x2fe6x2c,_0x2fe6x1a){return db[_0x8b46[50]][_0x8b46[81]]({where:{id:_0x2fe6x2c[_0x8b46[80]][_0x8b46[79]]}})[_0x8b46[40]](handleEntityNotFound(_0x2fe6x1a,null))[_0x8b46[40]](removeEntity(_0x2fe6x1a,null))[_0x8b46[73]](handleError(_0x2fe6x1a,null))}
\ No newline at end of file
index 68e07d3..6473808 100644 (file)
@@ -1 +1 @@
-var _0xc2ec=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2F\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x73\x79\x73\x74\x65\x6D","\x25\x73\x25\x73","\x70\x72\x65\x66\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x69\x64","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x25\x73","\x63\x68\x61\x6E\x73\x70\x79","\x6D\x65\x72\x67\x65","\x70\x75\x73\x68","\x72\x65\x63\x6F\x72\x64","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x24\x7B\x55\x4E\x49\x51\x55\x45\x49\x44\x7D\x2E\x25\x73\x2C\x61\x62","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x61\x75\x74\x68","\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x43\x68\x61\x6E\x53\x70\x79","\x53\x49\x50\x2F\x25\x73\x2C\x25\x73","\x6E\x61\x6D\x65","\x6F\x70\x74\x69\x6F\x6E\x73","","\x6A\x6F\x69\x6E","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x63\x6F\x6E\x63\x61\x74","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64\x41\x6C\x6C","\x55\x73\x65\x72","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79","\x76\x6F\x69\x63\x65\x5F\x63\x68\x61\x6E\x73\x70\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x66\x69\x6E\x65"];_0xc2ec[0];var _=require(_0xc2ec[1]);var util=require(_0xc2ec[2]);var BPromise=require(_0xc2ec[3]);var logger=require(_0xc2ec[5])(_0xc2ec[4]);var attributes=require(_0xc2ec[6]);var getUserApplications=function(_0x8938x7,_0x8938x8,_0x8938x9){var _0x8938xa=1;var _0x8938xb=[];var _0x8938xc={context:_0xc2ec[7],type:_0xc2ec[8],isApp:false};var _0x8938xd={exten:util[_0xc2ec[11]](_0xc2ec[9],_0x8938x7[_0xc2ec[10]],_0x8938x9),ChanSpyId:_0x8938x7[_0xc2ec[12]],UserId:_0x8938x8[_0xc2ec[12]]};_0x8938xb[_0xc2ec[17]](_[_0xc2ec[16]]({app:_0xc2ec[13],appdata:util[_0xc2ec[11]](_0xc2ec[14],_0xc2ec[15]),priority:_0x8938xa++},_0x8938xc,_0x8938xd));if(_0x8938x7[_0xc2ec[18]]){_0x8938xb[_0xc2ec[17]](_[_0xc2ec[16]]({app:_0xc2ec[19],appdata:util[_0xc2ec[11]](_0xc2ec[20],_0x8938x7[_0xc2ec[21]]),priority:_0x8938xa++},_0x8938xc,_0x8938xd))};if(_0x8938x7[_0xc2ec[22]]){_0x8938xb[_0xc2ec[17]](_[_0xc2ec[16]]({app:_0xc2ec[23],appdata:_0x8938x7[_0xc2ec[24]],priority:_0x8938xa++},_0x8938xc,_0x8938xd))};_0x8938xb[_0xc2ec[17]](_[_0xc2ec[16]]({app:_0xc2ec[25],appdata:util[_0xc2ec[11]](_0xc2ec[26],_0x8938x8[_0xc2ec[27]],_0x8938x7[_0xc2ec[28]]?_0x8938x7[_0xc2ec[28]][_0xc2ec[30]](_0xc2ec[29]):_0xc2ec[29]),priority:_0x8938xa++},_0x8938xc,_0x8938xd));if(_0x8938x7[_0xc2ec[18]]){_0x8938xb[_0xc2ec[17]](_[_0xc2ec[16]]({app:_0xc2ec[31],priority:_0x8938xa++},_0x8938xc,_0x8938xd))};return _0x8938xb};var getChanSpyApplications=function(_0x8938x7,_0x8938xf){var _0x8938xb=[];for(var _0x8938x10=0,_0x8938xa=1;_0x8938x10< _0x8938xf[_0xc2ec[32]];_0x8938x10++,_0x8938xa= 1){var _0x8938x11=getUserApplications(_0x8938x7,_0x8938xf[_0x8938x10],_0x8938xf[_0x8938x10][_0xc2ec[33]]);var _0x8938x12=getUserApplications(_0x8938x7,_0x8938xf[_0x8938x10],_0x8938xf[_0x8938x10][_0xc2ec[27]]);_0x8938xb= _0x8938xb[_0xc2ec[34]](_0x8938x11,_0x8938x12)};return _0x8938xb};var getChanSpyPromise=function(_0x8938x14,_0x8938x7){return  new BPromise(function(_0x8938x15,_0x8938x16){return _0x8938x14[_0xc2ec[39]][_0xc2ec[38]]({attributes:[_0xc2ec[12],_0xc2ec[27],_0xc2ec[33]],where:{role:_0xc2ec[37],chanspy:true},raw:true})[_0xc2ec[36]](function(_0x8938x18){if(_0x8938x18){return _0x8938x15(getChanSpyApplications(_0x8938x7,_0x8938x18))};return _0x8938x15([])})[_0xc2ec[35]](function(_0x8938x17){_0x8938x16(_0x8938x17)})})};module[_0xc2ec[40]]= function(_0x8938x19,_0x8938x1a){var _0x8938x14=_0x8938x19[_0xc2ec[41]];return _0x8938x19[_0xc2ec[47]](_0xc2ec[42],attributes,{tableName:_0xc2ec[43],paranoid:false,indexes:[],timestamps:true,hooks:{afterCreate:function(_0x8938x1b,_0x8938x1c,_0x8938x1d){return getChanSpyPromise(_0x8938x14,_0x8938x1b)[_0xc2ec[36]](function(_0x8938xb){if(_0x8938xb&& _0x8938xb[_0xc2ec[32]]){return _0x8938x14[_0xc2ec[45]][_0xc2ec[44]](_0x8938xb)}})[_0xc2ec[36]](function(){_0x8938x1d()})[_0xc2ec[35]](function(_0x8938x17){_0x8938x1d(_0x8938x17)})},afterUpdate:function(_0x8938x1b,_0x8938x1c,_0x8938x1d){return _0x8938x14[_0xc2ec[45]][_0xc2ec[46]]({where:{ChanSpyId:_0x8938x1b[_0xc2ec[12]]}})[_0xc2ec[36]](function(){return getChanSpyPromise(_0x8938x14,_0x8938x1b)})[_0xc2ec[36]](function(_0x8938xb){if(_0x8938xb&& _0x8938xb[_0xc2ec[32]]){return _0x8938x14[_0xc2ec[45]][_0xc2ec[44]](_0x8938xb)}})[_0xc2ec[36]](function(){_0x8938x1d()})[_0xc2ec[35]](function(_0x8938x17){_0x8938x1d(_0x8938x17)})},afterDestroy:function(_0x8938x1b,_0x8938x1c,_0x8938x1d){return _0x8938x14[_0xc2ec[45]][_0xc2ec[46]]({where:{ChanSpyId:_0x8938x1b[_0xc2ec[12]]}})[_0xc2ec[36]](function(){_0x8938x1d()})[_0xc2ec[35]](function(_0x8938x17){_0x8938x1d(_0x8938x17)})}}})}
\ No newline at end of file
+var _0xa7f7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2F\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x73\x79\x73\x74\x65\x6D","\x25\x73\x25\x73","\x70\x72\x65\x66\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x69\x64","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x25\x73","\x63\x68\x61\x6E\x73\x70\x79","\x6D\x65\x72\x67\x65","\x70\x75\x73\x68","\x72\x65\x63\x6F\x72\x64","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x24\x7B\x55\x4E\x49\x51\x55\x45\x49\x44\x7D\x2E\x25\x73\x2C\x61\x62","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x61\x75\x74\x68","\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x43\x68\x61\x6E\x53\x70\x79","\x53\x49\x50\x2F\x25\x73\x2C\x25\x73","\x6E\x61\x6D\x65","\x6F\x70\x74\x69\x6F\x6E\x73","","\x6A\x6F\x69\x6E","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x63\x6F\x6E\x63\x61\x74","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64\x41\x6C\x6C","\x55\x73\x65\x72","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79","\x76\x6F\x69\x63\x65\x5F\x63\x68\x61\x6E\x73\x70\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x66\x69\x6E\x65"];_0xa7f7[0];var _=require(_0xa7f7[1]);var util=require(_0xa7f7[2]);var BPromise=require(_0xa7f7[3]);var logger=require(_0xa7f7[5])(_0xa7f7[4]);var attributes=require(_0xa7f7[6]);var getUserApplications=function(_0xda36x7,_0xda36x8,_0xda36x9){var _0xda36xa=1;var _0xda36xb=[];var _0xda36xc={context:_0xa7f7[7],type:_0xa7f7[8],isApp:false};var _0xda36xd={exten:util[_0xa7f7[11]](_0xa7f7[9],_0xda36x7[_0xa7f7[10]],_0xda36x9),ChanSpyId:_0xda36x7[_0xa7f7[12]],UserId:_0xda36x8[_0xa7f7[12]]};_0xda36xb[_0xa7f7[17]](_[_0xa7f7[16]]({app:_0xa7f7[13],appdata:util[_0xa7f7[11]](_0xa7f7[14],_0xa7f7[15]),priority:_0xda36xa++},_0xda36xc,_0xda36xd));if(_0xda36x7[_0xa7f7[18]]){_0xda36xb[_0xa7f7[17]](_[_0xa7f7[16]]({app:_0xa7f7[19],appdata:util[_0xa7f7[11]](_0xa7f7[20],_0xda36x7[_0xa7f7[21]]),priority:_0xda36xa++},_0xda36xc,_0xda36xd))};if(_0xda36x7[_0xa7f7[22]]){_0xda36xb[_0xa7f7[17]](_[_0xa7f7[16]]({app:_0xa7f7[23],appdata:_0xda36x7[_0xa7f7[24]],priority:_0xda36xa++},_0xda36xc,_0xda36xd))};_0xda36xb[_0xa7f7[17]](_[_0xa7f7[16]]({app:_0xa7f7[25],appdata:util[_0xa7f7[11]](_0xa7f7[26],_0xda36x8[_0xa7f7[27]],_0xda36x7[_0xa7f7[28]]?_0xda36x7[_0xa7f7[28]][_0xa7f7[30]](_0xa7f7[29]):_0xa7f7[29]),priority:_0xda36xa++},_0xda36xc,_0xda36xd));if(_0xda36x7[_0xa7f7[18]]){_0xda36xb[_0xa7f7[17]](_[_0xa7f7[16]]({app:_0xa7f7[31],priority:_0xda36xa++},_0xda36xc,_0xda36xd))};return _0xda36xb};var getChanSpyApplications=function(_0xda36x7,_0xda36xf){var _0xda36xb=[];for(var _0xda36x10=0,_0xda36xa=1;_0xda36x10< _0xda36xf[_0xa7f7[32]];_0xda36x10++,_0xda36xa= 1){var _0xda36x11=getUserApplications(_0xda36x7,_0xda36xf[_0xda36x10],_0xda36xf[_0xda36x10][_0xa7f7[33]]);var _0xda36x12=getUserApplications(_0xda36x7,_0xda36xf[_0xda36x10],_0xda36xf[_0xda36x10][_0xa7f7[27]]);_0xda36xb= _0xda36xb[_0xa7f7[34]](_0xda36x11,_0xda36x12)};return _0xda36xb};var getChanSpyPromise=function(_0xda36x14,_0xda36x7){return  new BPromise(function(_0xda36x15,_0xda36x16){return _0xda36x14[_0xa7f7[39]][_0xa7f7[38]]({attributes:[_0xa7f7[12],_0xa7f7[27],_0xa7f7[33]],where:{role:_0xa7f7[37],chanspy:true},raw:true})[_0xa7f7[36]](function(_0xda36x18){if(_0xda36x18){return _0xda36x15(getChanSpyApplications(_0xda36x7,_0xda36x18))};return _0xda36x15([])})[_0xa7f7[35]](function(_0xda36x17){_0xda36x16(_0xda36x17)})})};module[_0xa7f7[40]]= function(_0xda36x19,_0xda36x1a){var _0xda36x14=_0xda36x19[_0xa7f7[41]];return _0xda36x19[_0xa7f7[47]](_0xa7f7[42],attributes,{tableName:_0xa7f7[43],paranoid:false,indexes:[],timestamps:true,hooks:{afterCreate:function(_0xda36x1b,_0xda36x1c,_0xda36x1d){return getChanSpyPromise(_0xda36x14,_0xda36x1b)[_0xa7f7[36]](function(_0xda36xb){if(_0xda36xb&& _0xda36xb[_0xa7f7[32]]){return _0xda36x14[_0xa7f7[45]][_0xa7f7[44]](_0xda36xb)}})[_0xa7f7[36]](function(){_0xda36x1d()})[_0xa7f7[35]](function(_0xda36x17){_0xda36x1d(_0xda36x17)})},afterUpdate:function(_0xda36x1b,_0xda36x1c,_0xda36x1d){return _0xda36x14[_0xa7f7[45]][_0xa7f7[46]]({where:{ChanSpyId:_0xda36x1b[_0xa7f7[12]]}})[_0xa7f7[36]](function(){return getChanSpyPromise(_0xda36x14,_0xda36x1b)})[_0xa7f7[36]](function(_0xda36xb){if(_0xda36xb&& _0xda36xb[_0xa7f7[32]]){return _0xda36x14[_0xa7f7[45]][_0xa7f7[44]](_0xda36xb)}})[_0xa7f7[36]](function(){_0xda36x1d()})[_0xa7f7[35]](function(_0xda36x17){_0xda36x1d(_0xda36x17)})},afterDestroy:function(_0xda36x1b,_0xda36x1c,_0xda36x1d){return _0xda36x14[_0xa7f7[45]][_0xa7f7[46]]({where:{ChanSpyId:_0xda36x1b[_0xa7f7[12]]}})[_0xa7f7[36]](function(){_0xda36x1d()})[_0xa7f7[35]](function(_0xda36x17){_0xda36x1d(_0xda36x17)})}}})}
\ No newline at end of file
index e0a4d8d..79ef1cb 100644 (file)
@@ -1 +1 @@
-var _0x3edd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x3edd[0];var _=require(_0x3edd[1]);var util=require(_0x3edd[2]);var moment=require(_0x3edd[3]);var BPromise=require(_0x3edd[4]);var rs=require(_0x3edd[5]);var fs=require(_0x3edd[6]);var db=require(_0x3edd[8])[_0x3edd[7]];var utils=require(_0x3edd[9]);var logger=require(_0x3edd[11])(_0x3edd[10]);var config=require(_0x3edd[12]);var jayson=require(_0x3edd[13]);var client=jayson[_0x3edd[15]][_0x3edd[14]]({port:9002});function respondWithRpcPromise(_0xaf90xe,_0xaf90xf,_0xaf90x10){return  new BPromise(function(_0xaf90x11,_0xaf90x12){return client[_0x3edd[28]](_0xaf90xe,_0xaf90x10)[_0x3edd[27]](function(_0xaf90x14){logger[_0x3edd[20]](_0x3edd[16],_0xaf90xf,_0x3edd[19]);logger[_0x3edd[23]](_0x3edd[21],_0xaf90xf,_0x3edd[19],JSON[_0x3edd[22]](_0xaf90x14));if(_0xaf90x14[_0x3edd[17]]){if(_0xaf90x14[_0x3edd[17]][_0x3edd[24]]=== 500){logger[_0x3edd[17]](_0x3edd[16],_0xaf90xf,_0xaf90x14[_0x3edd[17]][_0x3edd[25]]);return _0xaf90x12(_0xaf90x14[_0x3edd[17]][_0x3edd[25]])};logger[_0x3edd[17]](_0x3edd[16],_0xaf90xf,_0xaf90x14[_0x3edd[17]][_0x3edd[25]]);return _0xaf90x11(_0xaf90x14[_0x3edd[17]][_0x3edd[25]])}else {logger[_0x3edd[20]](_0x3edd[16],_0xaf90xf,_0x3edd[19]);_0xaf90x11(_0xaf90x14[_0x3edd[26]][_0x3edd[25]])}})[_0x3edd[18]](function(_0xaf90x13){logger[_0x3edd[17]](_0x3edd[16],_0xaf90xf,_0xaf90x13);_0xaf90x12(_0xaf90x13)})})}
\ No newline at end of file
+var _0x4700=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x4700[0];var _=require(_0x4700[1]);var util=require(_0x4700[2]);var moment=require(_0x4700[3]);var BPromise=require(_0x4700[4]);var rs=require(_0x4700[5]);var fs=require(_0x4700[6]);var db=require(_0x4700[8])[_0x4700[7]];var utils=require(_0x4700[9]);var logger=require(_0x4700[11])(_0x4700[10]);var config=require(_0x4700[12]);var jayson=require(_0x4700[13]);var client=jayson[_0x4700[15]][_0x4700[14]]({port:9002});function respondWithRpcPromise(_0xece3xe,_0xece3xf,_0xece3x10){return  new BPromise(function(_0xece3x11,_0xece3x12){return client[_0x4700[28]](_0xece3xe,_0xece3x10)[_0x4700[27]](function(_0xece3x14){logger[_0x4700[20]](_0x4700[16],_0xece3xf,_0x4700[19]);logger[_0x4700[23]](_0x4700[21],_0xece3xf,_0x4700[19],JSON[_0x4700[22]](_0xece3x14));if(_0xece3x14[_0x4700[17]]){if(_0xece3x14[_0x4700[17]][_0x4700[24]]=== 500){logger[_0x4700[17]](_0x4700[16],_0xece3xf,_0xece3x14[_0x4700[17]][_0x4700[25]]);return _0xece3x12(_0xece3x14[_0x4700[17]][_0x4700[25]])};logger[_0x4700[17]](_0x4700[16],_0xece3xf,_0xece3x14[_0x4700[17]][_0x4700[25]]);return _0xece3x11(_0xece3x14[_0x4700[17]][_0x4700[25]])}else {logger[_0x4700[20]](_0x4700[16],_0xece3xf,_0x4700[19]);_0xece3x11(_0xece3x14[_0x4700[26]][_0x4700[25]])}})[_0x4700[18]](function(_0xece3x13){logger[_0x4700[17]](_0x4700[16],_0xece3xf,_0xece3x13);_0xece3x12(_0xece3x13)})})}
\ No newline at end of file
index 02bb798..3fa5cdb 100644 (file)
@@ -1 +1 @@
-var _0x969e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x969e[0];var multer=require(_0x969e[1]);var util=require(_0x969e[2]);var path=require(_0x969e[3]);var express=require(_0x969e[4]);var router=express.Router();var auth=require(_0x969e[5]);var interaction=require(_0x969e[6]);var config=require(_0x969e[7]);var controller=require(_0x969e[8]);router[_0x969e[12]](_0x969e[9],auth[_0x969e[10]](),controller[_0x969e[11]]);router[_0x969e[12]](_0x969e[13],auth[_0x969e[10]](),controller[_0x969e[14]]);router[_0x969e[16]](_0x969e[9],auth[_0x969e[10]](),controller[_0x969e[15]]);router[_0x969e[18]](_0x969e[13],auth[_0x969e[10]](),controller[_0x969e[17]]);router[_0x969e[20]](_0x969e[13],auth[_0x969e[10]](),controller[_0x969e[19]]);module[_0x969e[21]]= router
\ No newline at end of file
+var _0x4f16=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4f16[0];var multer=require(_0x4f16[1]);var util=require(_0x4f16[2]);var path=require(_0x4f16[3]);var express=require(_0x4f16[4]);var router=express.Router();var auth=require(_0x4f16[5]);var interaction=require(_0x4f16[6]);var config=require(_0x4f16[7]);var controller=require(_0x4f16[8]);router[_0x4f16[12]](_0x4f16[9],auth[_0x4f16[10]](),controller[_0x4f16[11]]);router[_0x4f16[12]](_0x4f16[13],auth[_0x4f16[10]](),controller[_0x4f16[14]]);router[_0x4f16[16]](_0x4f16[9],auth[_0x4f16[10]](),controller[_0x4f16[15]]);router[_0x4f16[18]](_0x4f16[13],auth[_0x4f16[10]](),controller[_0x4f16[17]]);router[_0x4f16[20]](_0x4f16[13],auth[_0x4f16[10]](),controller[_0x4f16[19]]);module[_0x4f16[21]]= router
\ No newline at end of file
index f0e9559..9c1d37c 100644 (file)
@@ -1 +1 @@
-var _0xd838=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0xd838[0];var Sequelize=require(_0xd838[1]);module[_0xd838[2]]= {name:{type:Sequelize[_0xd838[3]],unique:_0xd838[4]},description:{type:Sequelize[_0xd838[3]],allowNull:true},defaultEntry:{type:Sequelize[_0xd838[5]],defaultValue:0}}
\ No newline at end of file
+var _0x87b3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0x87b3[0];var Sequelize=require(_0x87b3[1]);module[_0x87b3[2]]= {name:{type:Sequelize[_0x87b3[3]],unique:_0x87b3[4]},description:{type:Sequelize[_0x87b3[3]],allowNull:true},defaultEntry:{type:Sequelize[_0x87b3[5]],defaultValue:0}}
\ No newline at end of file
index 1d2c464..3fe750f 100644 (file)
@@ -1 +1 @@
-var _0x45de=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x52\x65\x6C\x6F\x61\x64","\x63\x68\x61\x6E\x5F\x73\x69\x70\x2E\x73\x6F","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73\x2F\x63\x6F\x6E\x74\x65\x78\x74\x2E\x65\x6A\x73","\x6A\x6F\x69\x6E","\x75\x74\x66\x38","\x72\x65\x61\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x72\x65\x6E\x64\x65\x72","\x2F\x65\x74\x63\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x63\x6F\x6E\x74\x65\x78\x74\x73\x2E\x63\x6F\x6E\x66","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x62\x6F\x64\x79"];_0x45de[0];var jsonpatch=require(_0x45de[1]);var rp=require(_0x45de[2]);var moment=require(_0x45de[3]);var BPromise=require(_0x45de[4]);var Mustache=require(_0x45de[5]);var util=require(_0x45de[6]);var path=require(_0x45de[7]);var sox=require(_0x45de[8]);var csv=require(_0x45de[9]);var ejs=require(_0x45de[10]);var fs=require(_0x45de[11]);var _=require(_0x45de[12]);var squel=require(_0x45de[13]);var crypto=require(_0x45de[14]);var jsforce=require(_0x45de[15]);var deskjs=require(_0x45de[16]);var toCsv=require(_0x45de[9]);var querystring=require(_0x45de[17]);var Papa=require(_0x45de[18]);var qs=require(_0x45de[19]);var logger=require(_0x45de[21])(_0x45de[20]);var utils=require(_0x45de[22]);var config=require(_0x45de[23]);var db=require(_0x45de[25])[_0x45de[24]];var jayson=require(_0x45de[26]);var client=jayson[_0x45de[28]][_0x45de[27]]({port:9002});function respondWithRpcPromise(_0xd1f5x1c,_0xd1f5x1d,_0xd1f5x1e,_0xd1f5x1f){return  new BPromise(function(_0xd1f5x20,_0xd1f5x21){var _0xd1f5x22=(_0xd1f5x1f|| client);return _0xd1f5x22[_0x45de[41]](_0xd1f5x1c,_0xd1f5x1e)[_0x45de[40]](function(_0xd1f5x24){logger[_0x45de[33]](_0x45de[29],_0xd1f5x1d,_0x45de[32]);logger[_0x45de[36]](_0x45de[34],_0xd1f5x1d,_0x45de[32],JSON[_0x45de[35]](_0xd1f5x24));if(_0xd1f5x24[_0x45de[30]]){if(_0xd1f5x24[_0x45de[30]][_0x45de[37]]=== 500){logger[_0x45de[30]](_0x45de[29],_0xd1f5x1d,_0xd1f5x24[_0x45de[30]][_0x45de[38]]);return _0xd1f5x21(_0xd1f5x24[_0x45de[30]][_0x45de[38]])};logger[_0x45de[30]](_0x45de[29],_0xd1f5x1d,_0xd1f5x24[_0x45de[30]][_0x45de[38]]);return _0xd1f5x20(_0xd1f5x24[_0x45de[30]][_0x45de[38]])}else {logger[_0x45de[33]](_0x45de[29],_0xd1f5x1d,_0x45de[32]);_0xd1f5x20(_0xd1f5x24[_0x45de[39]][_0x45de[38]])}})[_0x45de[31]](function(_0xd1f5x23){logger[_0x45de[30]](_0x45de[29],_0xd1f5x1d,_0xd1f5x23);_0xd1f5x21(_0xd1f5x23)})})}function respondWithStatusCode(_0xd1f5x24,_0xd1f5x26){_0xd1f5x26= _0xd1f5x26|| 204;return function(_0xd1f5x27){if(_0xd1f5x27){return _0xd1f5x24[_0x45de[42]](_0xd1f5x26)};return _0xd1f5x24[_0x45de[44]](_0xd1f5x26)[_0x45de[43]]()}}function respondWithResult(_0xd1f5x24,_0xd1f5x26){_0xd1f5x26= _0xd1f5x26|| 200;return function(_0xd1f5x27){if(_0xd1f5x27){return _0xd1f5x24[_0x45de[44]](_0xd1f5x26)[_0x45de[45]](_0xd1f5x27)}}}function respondWithFilteredResult(_0xd1f5x24,_0xd1f5x2a){return function(_0xd1f5x27){if(_0xd1f5x27){var _0xd1f5x2b=_0xd1f5x27[_0x45de[46]],_0xd1f5x2c=_0xd1f5x2a[_0x45de[47]],_0xd1f5x2d=_0xd1f5x2a[_0x45de[47]]+ _0xd1f5x2a[_0x45de[48]],_0xd1f5x26;if(_0xd1f5x2d>= _0xd1f5x2b){_0xd1f5x2d= _0xd1f5x2b;_0xd1f5x26= 200}else {_0xd1f5x26= 206};_0xd1f5x24[_0x45de[44]](_0xd1f5x26);return _0xd1f5x24[_0x45de[52]](_0x45de[49],_0xd1f5x2c+ _0x45de[50]+ _0xd1f5x2d+ _0x45de[51]+ _0xd1f5x2b)[_0x45de[45]](_0xd1f5x27)};return null}}function patchUpdates(_0xd1f5x2f){return function(_0xd1f5x27){try{jsonpatch[_0x45de[53]](_0xd1f5x27,_0xd1f5x2f,true)}catch(err){return BPromise[_0x45de[54]](err)};return _0xd1f5x27[_0x45de[55]]()}}function saveUpdates(_0xd1f5x31,_0xd1f5x26){return function(_0xd1f5x27){if(_0xd1f5x27){return _0xd1f5x27[_0x45de[56]](_0xd1f5x31)[_0x45de[40]](function(_0xd1f5x32){return _0xd1f5x32})};return null}}function removeEntity(_0xd1f5x24,_0xd1f5x26){return function(_0xd1f5x27){if(_0xd1f5x27){return _0xd1f5x27[_0x45de[57]]()[_0x45de[40]](function(){_0xd1f5x24[_0x45de[44]](204)[_0x45de[43]]()})}}}function handleEntityNotFound(_0xd1f5x24,_0xd1f5x26){return function(_0xd1f5x27){if(!_0xd1f5x27){_0xd1f5x24[_0x45de[42]](404)};return _0xd1f5x27}}function handleError(_0xd1f5x24,_0xd1f5x26){_0xd1f5x26= _0xd1f5x26|| 500;return function(_0xd1f5x23){logger[_0x45de[30]](_0xd1f5x23[_0x45de[58]]);if(_0xd1f5x23[_0x45de[59]]){delete _0xd1f5x23[_0x45de[59]]};_0xd1f5x24[_0x45de[44]](_0xd1f5x26)[_0x45de[60]](_0xd1f5x23)}}exports[_0x45de[61]]= function(_0xd1f5x1e,_0xd1f5x24){var _0xd1f5x2a={},_0xd1f5x36={},_0xd1f5x37={count:0,rows:[]};_0xd1f5x36[_0x45de[62]]= _[_0x45de[65]](db[_0x45de[64]][_0x45de[63]]);var _0xd1f5x38={dateStart:_0xd1f5x1e[_0x45de[67]][_0x45de[66]],dateEnd:_0xd1f5x1e[_0x45de[67]][_0x45de[68]]};delete _0xd1f5x1e[_0x45de[67]][_0x45de[66]];delete _0xd1f5x1e[_0x45de[67]][_0x45de[68]];_0xd1f5x36[_0x45de[67]]= _[_0x45de[65]](_0xd1f5x1e[_0x45de[67]]);_0xd1f5x36[_0x45de[69]]= _[_0x45de[70]](_0xd1f5x36[_0x45de[62]],_0xd1f5x36[_0x45de[67]]);_0xd1f5x2a[_0x45de[71]]= _[_0x45de[70]](_0xd1f5x36[_0x45de[62]],qs[_0x45de[72]](_0xd1f5x1e[_0x45de[67]][_0x45de[72]]));_0xd1f5x2a[_0x45de[71]]= (_0xd1f5x2a[_0x45de[71]][_0x45de[73]])?_0xd1f5x2a[_0x45de[71]]:_0xd1f5x36[_0x45de[62]];if(!_0xd1f5x1e[_0x45de[67]][_0x45de[75]](_0x45de[74])){_0xd1f5x2a[_0x45de[48]]= qs[_0x45de[48]](_0xd1f5x1e[_0x45de[67]][_0x45de[48]]);_0xd1f5x2a[_0x45de[47]]= qs[_0x45de[47]](_0xd1f5x1e[_0x45de[67]][_0x45de[47]])};_0xd1f5x2a[_0x45de[76]]= qs[_0x45de[77]](_0xd1f5x1e[_0x45de[67]][_0x45de[77]]);_0xd1f5x2a[_0x45de[78]]= qs[_0x45de[69]](_[_0x45de[79]](_0xd1f5x1e[_0x45de[67]],_0xd1f5x36[_0x45de[69]]));if(_0xd1f5x38[_0x45de[66]]){if(_0xd1f5x38[_0x45de[68]]){_0xd1f5x38[_0x45de[68]]= moment(_0xd1f5x38[_0x45de[68]])[_0x45de[81]](1,_0x45de[80])}else {_0xd1f5x38[_0x45de[68]]= moment(_0xd1f5x38[_0x45de[66]])[_0x45de[81]](1,_0x45de[80])};_[_0x45de[82]](_0xd1f5x2a[_0x45de[78]],{createdAt:{$gte:_0xd1f5x38[_0x45de[66]],$lte:_0xd1f5x38[_0x45de[68]]}})};if(_0xd1f5x1e[_0x45de[67]][_0x45de[83]]){_0xd1f5x2a[_0x45de[78]]= _[_0x45de[82]](_0xd1f5x2a[_0x45de[78]],{$or:_[_0x45de[85]](_0xd1f5x2a[_0x45de[71]],function(_0xd1f5x39){var _0xd1f5x37={};_0xd1f5x37[_0xd1f5x39]= {$like:_0x45de[84]+ _0xd1f5x1e[_0x45de[67]][_0x45de[83]]+ _0x45de[84]};return _0xd1f5x37})})};_0xd1f5x2a= _[_0x45de[82]]({},_0xd1f5x2a,_0xd1f5x1e[_0x45de[86]]);var _0xd1f5x3a={where:_0xd1f5x2a[_0x45de[78]]};return db[_0x45de[64]][_0x45de[46]](_0xd1f5x3a)[_0x45de[40]](function(_0xd1f5x2b){_0xd1f5x37[_0x45de[46]]= _0xd1f5x2b;if(_0xd1f5x1e[_0x45de[67]][_0x45de[88]]){_0xd1f5x2a[_0x45de[89]]= [{all:true}]};return db[_0x45de[64]][_0x45de[90]](_0xd1f5x2a)})[_0x45de[40]](function(_0xd1f5x3b){_0xd1f5x37[_0x45de[87]]= _0xd1f5x3b;return _0xd1f5x37})[_0x45de[40]](respondWithFilteredResult(_0xd1f5x24,_0xd1f5x2a))[_0x45de[31]](handleError(_0xd1f5x24,null))};exports[_0x45de[91]]= function(_0xd1f5x1e,_0xd1f5x24){var _0xd1f5x2a={raw:false,where:{id:_0xd1f5x1e[_0x45de[93]][_0x45de[92]]}},_0xd1f5x36={};_0xd1f5x36[_0x45de[62]]= _[_0x45de[65]](db[_0x45de[64]][_0x45de[63]]);_0xd1f5x36[_0x45de[67]]= _[_0x45de[65]](_0xd1f5x1e[_0x45de[67]]);_0xd1f5x36[_0x45de[69]]= _[_0x45de[70]](_0xd1f5x36[_0x45de[62]],_0xd1f5x36[_0x45de[67]]);_0xd1f5x2a[_0x45de[71]]= _[_0x45de[70]](_0xd1f5x36[_0x45de[62]],qs[_0x45de[72]](_0xd1f5x1e[_0x45de[67]][_0x45de[72]]));_0xd1f5x2a[_0x45de[71]]= (_0xd1f5x2a[_0x45de[71]][_0x45de[73]])?_0xd1f5x2a[_0x45de[71]]:_0xd1f5x36[_0x45de[62]];if(_0xd1f5x1e[_0x45de[67]][_0x45de[88]]){_0xd1f5x2a[_0x45de[89]]= [{all:true}]};_0xd1f5x2a= _[_0x45de[82]]({},_0xd1f5x2a,_0xd1f5x1e[_0x45de[86]]);return db[_0x45de[64]][_0x45de[94]](_0xd1f5x2a)[_0x45de[40]](handleEntityNotFound(_0xd1f5x24,null))[_0x45de[40]](respondWithResult(_0xd1f5x24,null))[_0x45de[31]](handleError(_0xd1f5x24,null))};exports[_0x45de[95]]= function(_0xd1f5x1e,_0xd1f5x24,_0xd1f5x3c){var _0xd1f5x3d;return db[_0x45de[64]][_0x45de[95]](_0xd1f5x1e[_0x45de[106]],{raw:true})[_0x45de[40]](function(_0xd1f5x27){_0xd1f5x3d= _0xd1f5x27;return db[_0x45de[64]][_0x45de[90]]({raw:true})})[_0x45de[40]](function(_0xd1f5x3e){var _0xd1f5x3f=fs[_0x45de[102]](path[_0x45de[100]](config[_0x45de[98]],_0x45de[99]),_0x45de[101]);var _0xd1f5x40=ejs[_0x45de[103]](_0xd1f5x3f,{contexts:_0xd1f5x3e|| []});fs[_0x45de[105]](_0x45de[104],_0xd1f5x40)})[_0x45de[40]](function(){return respondWithRpcPromise(_0x45de[96],_0x45de[95],{module:_0x45de[97]})})[_0x45de[40]](function(){return _0xd1f5x3d})[_0x45de[40]](respondWithResult(_0xd1f5x24,201))[_0x45de[31]](handleError(_0xd1f5x24,null))};exports[_0x45de[56]]= function(_0xd1f5x1e,_0xd1f5x24,_0xd1f5x3c){var _0xd1f5x3d;return db[_0x45de[64]][_0x45de[94]]({where:{id:_0xd1f5x1e[_0x45de[93]][_0x45de[92]]}})[_0x45de[40]](handleEntityNotFound(_0xd1f5x24,null))[_0x45de[40]](saveUpdates(_0xd1f5x1e[_0x45de[106]],null))[_0x45de[40]](function(_0xd1f5x27){if(_0xd1f5x27){_0xd1f5x3d= _0xd1f5x27;return db[_0x45de[64]][_0x45de[90]]({raw:true})}})[_0x45de[40]](function(_0xd1f5x3e){var _0xd1f5x3f=fs[_0x45de[102]](path[_0x45de[100]](config[_0x45de[98]],_0x45de[99]),_0x45de[101]);var _0xd1f5x40=ejs[_0x45de[103]](_0xd1f5x3f,{contexts:_0xd1f5x3e|| []});fs[_0x45de[105]](_0x45de[104],_0xd1f5x40)})[_0x45de[40]](function(){return respondWithRpcPromise(_0x45de[96],_0x45de[56],{module:_0x45de[97]})})[_0x45de[40]](function(){return _0xd1f5x3d})[_0x45de[40]](respondWithResult(_0xd1f5x24,null))[_0x45de[31]](handleError(_0xd1f5x24,null))};exports[_0x45de[57]]= function(_0xd1f5x1e,_0xd1f5x24,_0xd1f5x3c){var _0xd1f5x3d;return db[_0x45de[64]][_0x45de[94]]({where:{id:_0xd1f5x1e[_0x45de[93]][_0x45de[92]]}})[_0x45de[40]](handleEntityNotFound(_0xd1f5x24,null))[_0x45de[40]](removeEntity(_0xd1f5x24,null))[_0x45de[40]](function(){return db[_0x45de[64]][_0x45de[90]]({raw:true})})[_0x45de[40]](function(_0xd1f5x3e){var _0xd1f5x3f=fs[_0x45de[102]](path[_0x45de[100]](config[_0x45de[98]],_0x45de[99]),_0x45de[101]);var _0xd1f5x40=ejs[_0x45de[103]](_0xd1f5x3f,{contexts:_0xd1f5x3e});fs[_0x45de[105]](_0x45de[104],_0xd1f5x40);return respondWithRpcPromise(_0x45de[96],_0x45de[57],{module:_0x45de[97]})})[_0x45de[31]](handleError(_0xd1f5x24,null))}
\ No newline at end of file
+var _0x90bc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x52\x65\x6C\x6F\x61\x64","\x63\x68\x61\x6E\x5F\x73\x69\x70\x2E\x73\x6F","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73\x2F\x63\x6F\x6E\x74\x65\x78\x74\x2E\x65\x6A\x73","\x6A\x6F\x69\x6E","\x75\x74\x66\x38","\x72\x65\x61\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x72\x65\x6E\x64\x65\x72","\x2F\x65\x74\x63\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x63\x6F\x6E\x74\x65\x78\x74\x73\x2E\x63\x6F\x6E\x66","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x62\x6F\x64\x79"];_0x90bc[0];var jsonpatch=require(_0x90bc[1]);var rp=require(_0x90bc[2]);var moment=require(_0x90bc[3]);var BPromise=require(_0x90bc[4]);var Mustache=require(_0x90bc[5]);var util=require(_0x90bc[6]);var path=require(_0x90bc[7]);var sox=require(_0x90bc[8]);var csv=require(_0x90bc[9]);var ejs=require(_0x90bc[10]);var fs=require(_0x90bc[11]);var _=require(_0x90bc[12]);var squel=require(_0x90bc[13]);var crypto=require(_0x90bc[14]);var jsforce=require(_0x90bc[15]);var deskjs=require(_0x90bc[16]);var toCsv=require(_0x90bc[9]);var querystring=require(_0x90bc[17]);var Papa=require(_0x90bc[18]);var qs=require(_0x90bc[19]);var logger=require(_0x90bc[21])(_0x90bc[20]);var utils=require(_0x90bc[22]);var config=require(_0x90bc[23]);var db=require(_0x90bc[25])[_0x90bc[24]];var jayson=require(_0x90bc[26]);var client=jayson[_0x90bc[28]][_0x90bc[27]]({port:9002});function respondWithRpcPromise(_0xd8d5x1c,_0xd8d5x1d,_0xd8d5x1e,_0xd8d5x1f){return  new BPromise(function(_0xd8d5x20,_0xd8d5x21){var _0xd8d5x22=(_0xd8d5x1f|| client);return _0xd8d5x22[_0x90bc[41]](_0xd8d5x1c,_0xd8d5x1e)[_0x90bc[40]](function(_0xd8d5x24){logger[_0x90bc[33]](_0x90bc[29],_0xd8d5x1d,_0x90bc[32]);logger[_0x90bc[36]](_0x90bc[34],_0xd8d5x1d,_0x90bc[32],JSON[_0x90bc[35]](_0xd8d5x24));if(_0xd8d5x24[_0x90bc[30]]){if(_0xd8d5x24[_0x90bc[30]][_0x90bc[37]]=== 500){logger[_0x90bc[30]](_0x90bc[29],_0xd8d5x1d,_0xd8d5x24[_0x90bc[30]][_0x90bc[38]]);return _0xd8d5x21(_0xd8d5x24[_0x90bc[30]][_0x90bc[38]])};logger[_0x90bc[30]](_0x90bc[29],_0xd8d5x1d,_0xd8d5x24[_0x90bc[30]][_0x90bc[38]]);return _0xd8d5x20(_0xd8d5x24[_0x90bc[30]][_0x90bc[38]])}else {logger[_0x90bc[33]](_0x90bc[29],_0xd8d5x1d,_0x90bc[32]);_0xd8d5x20(_0xd8d5x24[_0x90bc[39]][_0x90bc[38]])}})[_0x90bc[31]](function(_0xd8d5x23){logger[_0x90bc[30]](_0x90bc[29],_0xd8d5x1d,_0xd8d5x23);_0xd8d5x21(_0xd8d5x23)})})}function respondWithStatusCode(_0xd8d5x24,_0xd8d5x26){_0xd8d5x26= _0xd8d5x26|| 204;return function(_0xd8d5x27){if(_0xd8d5x27){return _0xd8d5x24[_0x90bc[42]](_0xd8d5x26)};return _0xd8d5x24[_0x90bc[44]](_0xd8d5x26)[_0x90bc[43]]()}}function respondWithResult(_0xd8d5x24,_0xd8d5x26){_0xd8d5x26= _0xd8d5x26|| 200;return function(_0xd8d5x27){if(_0xd8d5x27){return _0xd8d5x24[_0x90bc[44]](_0xd8d5x26)[_0x90bc[45]](_0xd8d5x27)}}}function respondWithFilteredResult(_0xd8d5x24,_0xd8d5x2a){return function(_0xd8d5x27){if(_0xd8d5x27){var _0xd8d5x2b=_0xd8d5x27[_0x90bc[46]],_0xd8d5x2c=_0xd8d5x2a[_0x90bc[47]],_0xd8d5x2d=_0xd8d5x2a[_0x90bc[47]]+ _0xd8d5x2a[_0x90bc[48]],_0xd8d5x26;if(_0xd8d5x2d>= _0xd8d5x2b){_0xd8d5x2d= _0xd8d5x2b;_0xd8d5x26= 200}else {_0xd8d5x26= 206};_0xd8d5x24[_0x90bc[44]](_0xd8d5x26);return _0xd8d5x24[_0x90bc[52]](_0x90bc[49],_0xd8d5x2c+ _0x90bc[50]+ _0xd8d5x2d+ _0x90bc[51]+ _0xd8d5x2b)[_0x90bc[45]](_0xd8d5x27)};return null}}function patchUpdates(_0xd8d5x2f){return function(_0xd8d5x27){try{jsonpatch[_0x90bc[53]](_0xd8d5x27,_0xd8d5x2f,true)}catch(err){return BPromise[_0x90bc[54]](err)};return _0xd8d5x27[_0x90bc[55]]()}}function saveUpdates(_0xd8d5x31,_0xd8d5x26){return function(_0xd8d5x27){if(_0xd8d5x27){return _0xd8d5x27[_0x90bc[56]](_0xd8d5x31)[_0x90bc[40]](function(_0xd8d5x32){return _0xd8d5x32})};return null}}function removeEntity(_0xd8d5x24,_0xd8d5x26){return function(_0xd8d5x27){if(_0xd8d5x27){return _0xd8d5x27[_0x90bc[57]]()[_0x90bc[40]](function(){_0xd8d5x24[_0x90bc[44]](204)[_0x90bc[43]]()})}}}function handleEntityNotFound(_0xd8d5x24,_0xd8d5x26){return function(_0xd8d5x27){if(!_0xd8d5x27){_0xd8d5x24[_0x90bc[42]](404)};return _0xd8d5x27}}function handleError(_0xd8d5x24,_0xd8d5x26){_0xd8d5x26= _0xd8d5x26|| 500;return function(_0xd8d5x23){logger[_0x90bc[30]](_0xd8d5x23[_0x90bc[58]]);if(_0xd8d5x23[_0x90bc[59]]){delete _0xd8d5x23[_0x90bc[59]]};_0xd8d5x24[_0x90bc[44]](_0xd8d5x26)[_0x90bc[60]](_0xd8d5x23)}}exports[_0x90bc[61]]= function(_0xd8d5x1e,_0xd8d5x24){var _0xd8d5x2a={},_0xd8d5x36={},_0xd8d5x37={count:0,rows:[]};_0xd8d5x36[_0x90bc[62]]= _[_0x90bc[65]](db[_0x90bc[64]][_0x90bc[63]]);var _0xd8d5x38={dateStart:_0xd8d5x1e[_0x90bc[67]][_0x90bc[66]],dateEnd:_0xd8d5x1e[_0x90bc[67]][_0x90bc[68]]};delete _0xd8d5x1e[_0x90bc[67]][_0x90bc[66]];delete _0xd8d5x1e[_0x90bc[67]][_0x90bc[68]];_0xd8d5x36[_0x90bc[67]]= _[_0x90bc[65]](_0xd8d5x1e[_0x90bc[67]]);_0xd8d5x36[_0x90bc[69]]= _[_0x90bc[70]](_0xd8d5x36[_0x90bc[62]],_0xd8d5x36[_0x90bc[67]]);_0xd8d5x2a[_0x90bc[71]]= _[_0x90bc[70]](_0xd8d5x36[_0x90bc[62]],qs[_0x90bc[72]](_0xd8d5x1e[_0x90bc[67]][_0x90bc[72]]));_0xd8d5x2a[_0x90bc[71]]= (_0xd8d5x2a[_0x90bc[71]][_0x90bc[73]])?_0xd8d5x2a[_0x90bc[71]]:_0xd8d5x36[_0x90bc[62]];if(!_0xd8d5x1e[_0x90bc[67]][_0x90bc[75]](_0x90bc[74])){_0xd8d5x2a[_0x90bc[48]]= qs[_0x90bc[48]](_0xd8d5x1e[_0x90bc[67]][_0x90bc[48]]);_0xd8d5x2a[_0x90bc[47]]= qs[_0x90bc[47]](_0xd8d5x1e[_0x90bc[67]][_0x90bc[47]])};_0xd8d5x2a[_0x90bc[76]]= qs[_0x90bc[77]](_0xd8d5x1e[_0x90bc[67]][_0x90bc[77]]);_0xd8d5x2a[_0x90bc[78]]= qs[_0x90bc[69]](_[_0x90bc[79]](_0xd8d5x1e[_0x90bc[67]],_0xd8d5x36[_0x90bc[69]]));if(_0xd8d5x38[_0x90bc[66]]){if(_0xd8d5x38[_0x90bc[68]]){_0xd8d5x38[_0x90bc[68]]= moment(_0xd8d5x38[_0x90bc[68]])[_0x90bc[81]](1,_0x90bc[80])}else {_0xd8d5x38[_0x90bc[68]]= moment(_0xd8d5x38[_0x90bc[66]])[_0x90bc[81]](1,_0x90bc[80])};_[_0x90bc[82]](_0xd8d5x2a[_0x90bc[78]],{createdAt:{$gte:_0xd8d5x38[_0x90bc[66]],$lte:_0xd8d5x38[_0x90bc[68]]}})};if(_0xd8d5x1e[_0x90bc[67]][_0x90bc[83]]){_0xd8d5x2a[_0x90bc[78]]= _[_0x90bc[82]](_0xd8d5x2a[_0x90bc[78]],{$or:_[_0x90bc[85]](_0xd8d5x2a[_0x90bc[71]],function(_0xd8d5x39){var _0xd8d5x37={};_0xd8d5x37[_0xd8d5x39]= {$like:_0x90bc[84]+ _0xd8d5x1e[_0x90bc[67]][_0x90bc[83]]+ _0x90bc[84]};return _0xd8d5x37})})};_0xd8d5x2a= _[_0x90bc[82]]({},_0xd8d5x2a,_0xd8d5x1e[_0x90bc[86]]);var _0xd8d5x3a={where:_0xd8d5x2a[_0x90bc[78]]};return db[_0x90bc[64]][_0x90bc[46]](_0xd8d5x3a)[_0x90bc[40]](function(_0xd8d5x2b){_0xd8d5x37[_0x90bc[46]]= _0xd8d5x2b;if(_0xd8d5x1e[_0x90bc[67]][_0x90bc[88]]){_0xd8d5x2a[_0x90bc[89]]= [{all:true}]};return db[_0x90bc[64]][_0x90bc[90]](_0xd8d5x2a)})[_0x90bc[40]](function(_0xd8d5x3b){_0xd8d5x37[_0x90bc[87]]= _0xd8d5x3b;return _0xd8d5x37})[_0x90bc[40]](respondWithFilteredResult(_0xd8d5x24,_0xd8d5x2a))[_0x90bc[31]](handleError(_0xd8d5x24,null))};exports[_0x90bc[91]]= function(_0xd8d5x1e,_0xd8d5x24){var _0xd8d5x2a={raw:false,where:{id:_0xd8d5x1e[_0x90bc[93]][_0x90bc[92]]}},_0xd8d5x36={};_0xd8d5x36[_0x90bc[62]]= _[_0x90bc[65]](db[_0x90bc[64]][_0x90bc[63]]);_0xd8d5x36[_0x90bc[67]]= _[_0x90bc[65]](_0xd8d5x1e[_0x90bc[67]]);_0xd8d5x36[_0x90bc[69]]= _[_0x90bc[70]](_0xd8d5x36[_0x90bc[62]],_0xd8d5x36[_0x90bc[67]]);_0xd8d5x2a[_0x90bc[71]]= _[_0x90bc[70]](_0xd8d5x36[_0x90bc[62]],qs[_0x90bc[72]](_0xd8d5x1e[_0x90bc[67]][_0x90bc[72]]));_0xd8d5x2a[_0x90bc[71]]= (_0xd8d5x2a[_0x90bc[71]][_0x90bc[73]])?_0xd8d5x2a[_0x90bc[71]]:_0xd8d5x36[_0x90bc[62]];if(_0xd8d5x1e[_0x90bc[67]][_0x90bc[88]]){_0xd8d5x2a[_0x90bc[89]]= [{all:true}]};_0xd8d5x2a= _[_0x90bc[82]]({},_0xd8d5x2a,_0xd8d5x1e[_0x90bc[86]]);return db[_0x90bc[64]][_0x90bc[94]](_0xd8d5x2a)[_0x90bc[40]](handleEntityNotFound(_0xd8d5x24,null))[_0x90bc[40]](respondWithResult(_0xd8d5x24,null))[_0x90bc[31]](handleError(_0xd8d5x24,null))};exports[_0x90bc[95]]= function(_0xd8d5x1e,_0xd8d5x24,_0xd8d5x3c){var _0xd8d5x3d;return db[_0x90bc[64]][_0x90bc[95]](_0xd8d5x1e[_0x90bc[106]],{raw:true})[_0x90bc[40]](function(_0xd8d5x27){_0xd8d5x3d= _0xd8d5x27;return db[_0x90bc[64]][_0x90bc[90]]({raw:true})})[_0x90bc[40]](function(_0xd8d5x3e){var _0xd8d5x3f=fs[_0x90bc[102]](path[_0x90bc[100]](config[_0x90bc[98]],_0x90bc[99]),_0x90bc[101]);var _0xd8d5x40=ejs[_0x90bc[103]](_0xd8d5x3f,{contexts:_0xd8d5x3e|| []});fs[_0x90bc[105]](_0x90bc[104],_0xd8d5x40)})[_0x90bc[40]](function(){return respondWithRpcPromise(_0x90bc[96],_0x90bc[95],{module:_0x90bc[97]})})[_0x90bc[40]](function(){return _0xd8d5x3d})[_0x90bc[40]](respondWithResult(_0xd8d5x24,201))[_0x90bc[31]](handleError(_0xd8d5x24,null))};exports[_0x90bc[56]]= function(_0xd8d5x1e,_0xd8d5x24,_0xd8d5x3c){var _0xd8d5x3d;return db[_0x90bc[64]][_0x90bc[94]]({where:{id:_0xd8d5x1e[_0x90bc[93]][_0x90bc[92]]}})[_0x90bc[40]](handleEntityNotFound(_0xd8d5x24,null))[_0x90bc[40]](saveUpdates(_0xd8d5x1e[_0x90bc[106]],null))[_0x90bc[40]](function(_0xd8d5x27){if(_0xd8d5x27){_0xd8d5x3d= _0xd8d5x27;return db[_0x90bc[64]][_0x90bc[90]]({raw:true})}})[_0x90bc[40]](function(_0xd8d5x3e){var _0xd8d5x3f=fs[_0x90bc[102]](path[_0x90bc[100]](config[_0x90bc[98]],_0x90bc[99]),_0x90bc[101]);var _0xd8d5x40=ejs[_0x90bc[103]](_0xd8d5x3f,{contexts:_0xd8d5x3e|| []});fs[_0x90bc[105]](_0x90bc[104],_0xd8d5x40)})[_0x90bc[40]](function(){return respondWithRpcPromise(_0x90bc[96],_0x90bc[56],{module:_0x90bc[97]})})[_0x90bc[40]](function(){return _0xd8d5x3d})[_0x90bc[40]](respondWithResult(_0xd8d5x24,null))[_0x90bc[31]](handleError(_0xd8d5x24,null))};exports[_0x90bc[57]]= function(_0xd8d5x1e,_0xd8d5x24,_0xd8d5x3c){var _0xd8d5x3d;return db[_0x90bc[64]][_0x90bc[94]]({where:{id:_0xd8d5x1e[_0x90bc[93]][_0x90bc[92]]}})[_0x90bc[40]](handleEntityNotFound(_0xd8d5x24,null))[_0x90bc[40]](removeEntity(_0xd8d5x24,null))[_0x90bc[40]](function(){return db[_0x90bc[64]][_0x90bc[90]]({raw:true})})[_0x90bc[40]](function(_0xd8d5x3e){var _0xd8d5x3f=fs[_0x90bc[102]](path[_0x90bc[100]](config[_0x90bc[98]],_0x90bc[99]),_0x90bc[101]);var _0xd8d5x40=ejs[_0x90bc[103]](_0xd8d5x3f,{contexts:_0xd8d5x3e});fs[_0x90bc[105]](_0x90bc[104],_0xd8d5x40);return respondWithRpcPromise(_0x90bc[96],_0x90bc[57],{module:_0x90bc[97]})})[_0x90bc[31]](handleError(_0xd8d5x24,null))}
\ No newline at end of file
index e999126..9f0d6f0 100644 (file)
@@ -1 +1 @@
-var _0x2a78=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0x2a78[0];var _=require(_0x2a78[1]);var util=require(_0x2a78[2]);var logger=require(_0x2a78[4])(_0x2a78[3]);var moment=require(_0x2a78[5]);var BPromise=require(_0x2a78[6]);var rp=require(_0x2a78[7]);var attributes=require(_0x2a78[8]);module[_0x2a78[9]]= function(_0xad9bx8,_0xad9bx9){return _0xad9bx8[_0x2a78[12]](_0x2a78[10],attributes,{tableName:_0x2a78[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xcb7f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74\x73","\x64\x65\x66\x69\x6E\x65"];_0xcb7f[0];var _=require(_0xcb7f[1]);var util=require(_0xcb7f[2]);var logger=require(_0xcb7f[4])(_0xcb7f[3]);var moment=require(_0xcb7f[5]);var BPromise=require(_0xcb7f[6]);var rp=require(_0xcb7f[7]);var attributes=require(_0xcb7f[8]);module[_0xcb7f[9]]= function(_0x4f63x8,_0x4f63x9){return _0x4f63x8[_0xcb7f[12]](_0xcb7f[10],attributes,{tableName:_0xcb7f[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index ecd62d8..635433e 100644 (file)
@@ -1 +1 @@
-var _0x5aa8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x5aa8[0];var _=require(_0x5aa8[1]);var util=require(_0x5aa8[2]);var moment=require(_0x5aa8[3]);var BPromise=require(_0x5aa8[4]);var rs=require(_0x5aa8[5]);var fs=require(_0x5aa8[6]);var db=require(_0x5aa8[8])[_0x5aa8[7]];var utils=require(_0x5aa8[9]);var logger=require(_0x5aa8[11])(_0x5aa8[10]);var config=require(_0x5aa8[12]);var jayson=require(_0x5aa8[13]);var client=jayson[_0x5aa8[15]][_0x5aa8[14]]({port:9002});function respondWithRpcPromise(_0x4572xe,_0x4572xf,_0x4572x10){return  new BPromise(function(_0x4572x11,_0x4572x12){return client[_0x5aa8[28]](_0x4572xe,_0x4572x10)[_0x5aa8[27]](function(_0x4572x14){logger[_0x5aa8[20]](_0x5aa8[16],_0x4572xf,_0x5aa8[19]);logger[_0x5aa8[23]](_0x5aa8[21],_0x4572xf,_0x5aa8[19],JSON[_0x5aa8[22]](_0x4572x14));if(_0x4572x14[_0x5aa8[17]]){if(_0x4572x14[_0x5aa8[17]][_0x5aa8[24]]=== 500){logger[_0x5aa8[17]](_0x5aa8[16],_0x4572xf,_0x4572x14[_0x5aa8[17]][_0x5aa8[25]]);return _0x4572x12(_0x4572x14[_0x5aa8[17]][_0x5aa8[25]])};logger[_0x5aa8[17]](_0x5aa8[16],_0x4572xf,_0x4572x14[_0x5aa8[17]][_0x5aa8[25]]);return _0x4572x11(_0x4572x14[_0x5aa8[17]][_0x5aa8[25]])}else {logger[_0x5aa8[20]](_0x5aa8[16],_0x4572xf,_0x5aa8[19]);_0x4572x11(_0x4572x14[_0x5aa8[26]][_0x5aa8[25]])}})[_0x5aa8[18]](function(_0x4572x13){logger[_0x5aa8[17]](_0x5aa8[16],_0x4572xf,_0x4572x13);_0x4572x12(_0x4572x13)})})}
\ No newline at end of file
+var _0xf8a6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xf8a6[0];var _=require(_0xf8a6[1]);var util=require(_0xf8a6[2]);var moment=require(_0xf8a6[3]);var BPromise=require(_0xf8a6[4]);var rs=require(_0xf8a6[5]);var fs=require(_0xf8a6[6]);var db=require(_0xf8a6[8])[_0xf8a6[7]];var utils=require(_0xf8a6[9]);var logger=require(_0xf8a6[11])(_0xf8a6[10]);var config=require(_0xf8a6[12]);var jayson=require(_0xf8a6[13]);var client=jayson[_0xf8a6[15]][_0xf8a6[14]]({port:9002});function respondWithRpcPromise(_0xc544xe,_0xc544xf,_0xc544x10){return  new BPromise(function(_0xc544x11,_0xc544x12){return client[_0xf8a6[28]](_0xc544xe,_0xc544x10)[_0xf8a6[27]](function(_0xc544x14){logger[_0xf8a6[20]](_0xf8a6[16],_0xc544xf,_0xf8a6[19]);logger[_0xf8a6[23]](_0xf8a6[21],_0xc544xf,_0xf8a6[19],JSON[_0xf8a6[22]](_0xc544x14));if(_0xc544x14[_0xf8a6[17]]){if(_0xc544x14[_0xf8a6[17]][_0xf8a6[24]]=== 500){logger[_0xf8a6[17]](_0xf8a6[16],_0xc544xf,_0xc544x14[_0xf8a6[17]][_0xf8a6[25]]);return _0xc544x12(_0xc544x14[_0xf8a6[17]][_0xf8a6[25]])};logger[_0xf8a6[17]](_0xf8a6[16],_0xc544xf,_0xc544x14[_0xf8a6[17]][_0xf8a6[25]]);return _0xc544x11(_0xc544x14[_0xf8a6[17]][_0xf8a6[25]])}else {logger[_0xf8a6[20]](_0xf8a6[16],_0xc544xf,_0xf8a6[19]);_0xc544x11(_0xc544x14[_0xf8a6[26]][_0xf8a6[25]])}})[_0xf8a6[18]](function(_0xc544x13){logger[_0xf8a6[17]](_0xf8a6[16],_0xc544xf,_0xc544x13);_0xc544x12(_0xc544x13)})})}
\ No newline at end of file
index 116356f..a6e34c3 100644 (file)
@@ -1 +1 @@
-var _0x5bc9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x5bc9[0];var multer=require(_0x5bc9[1]);var util=require(_0x5bc9[2]);var path=require(_0x5bc9[3]);var express=require(_0x5bc9[4]);var router=express.Router();var auth=require(_0x5bc9[5]);var interaction=require(_0x5bc9[6]);var config=require(_0x5bc9[7]);var controller=require(_0x5bc9[8]);router[_0x5bc9[12]](_0x5bc9[9],auth[_0x5bc9[10]](),controller[_0x5bc9[11]]);router[_0x5bc9[12]](_0x5bc9[13],auth[_0x5bc9[10]](),controller[_0x5bc9[14]]);router[_0x5bc9[12]](_0x5bc9[15],auth[_0x5bc9[10]](),controller[_0x5bc9[16]]);router[_0x5bc9[18]](_0x5bc9[9],auth[_0x5bc9[10]](),controller[_0x5bc9[17]]);router[_0x5bc9[20]](_0x5bc9[15],auth[_0x5bc9[10]](),controller[_0x5bc9[19]]);router[_0x5bc9[22]](_0x5bc9[15],auth[_0x5bc9[10]](),controller[_0x5bc9[21]]);module[_0x5bc9[23]]= router
\ No newline at end of file
+var _0x3db9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x3db9[0];var multer=require(_0x3db9[1]);var util=require(_0x3db9[2]);var path=require(_0x3db9[3]);var express=require(_0x3db9[4]);var router=express.Router();var auth=require(_0x3db9[5]);var interaction=require(_0x3db9[6]);var config=require(_0x3db9[7]);var controller=require(_0x3db9[8]);router[_0x3db9[12]](_0x3db9[9],auth[_0x3db9[10]](),controller[_0x3db9[11]]);router[_0x3db9[12]](_0x3db9[13],auth[_0x3db9[10]](),controller[_0x3db9[14]]);router[_0x3db9[12]](_0x3db9[15],auth[_0x3db9[10]](),controller[_0x3db9[16]]);router[_0x3db9[18]](_0x3db9[9],auth[_0x3db9[10]](),controller[_0x3db9[17]]);router[_0x3db9[20]](_0x3db9[15],auth[_0x3db9[10]](),controller[_0x3db9[19]]);router[_0x3db9[22]](_0x3db9[15],auth[_0x3db9[10]](),controller[_0x3db9[21]]);module[_0x3db9[23]]= router
\ No newline at end of file
index 5bb94e1..7b1df51 100644 (file)
@@ -1 +1 @@
-var _0xf91c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x44\x41\x54\x45","\x63\x61\x6C\x6C\x65\x64\x2C\x63\x6F\x6E\x6E\x65\x63\x74\x2C\x63\x6F\x6D\x70\x6C\x65\x74\x65"];_0xf91c[0];var Sequelize=require(_0xf91c[1]);module[_0xf91c[2]]= {privilege:{type:Sequelize[_0xf91c[3]]},channel:{type:Sequelize[_0xf91c[3]]},channelstate:{type:Sequelize[_0xf91c[4]]},channelstatedesc:{type:Sequelize[_0xf91c[3]]},calleridnum:{type:Sequelize[_0xf91c[3]]},calleridname:{type:Sequelize[_0xf91c[3]]},connectedlinenum:{type:Sequelize[_0xf91c[3]]},connectedlinename:{type:Sequelize[_0xf91c[3]]},language:{type:Sequelize[_0xf91c[3]]},accountcode:{type:Sequelize[_0xf91c[3]]},context:{type:Sequelize[_0xf91c[3]]},exten:{type:Sequelize[_0xf91c[3]]},priority:{type:Sequelize[_0xf91c[4]]},uniqueid:{type:Sequelize[_0xf91c[3]]},linkedid:{type:Sequelize[_0xf91c[3]]},destchannel:{type:Sequelize[_0xf91c[3]]},destchannelstate:{type:Sequelize[_0xf91c[4]]},destchannelstatedesc:{type:Sequelize[_0xf91c[3]]},destcalleridnum:{type:Sequelize[_0xf91c[3]]},destcalleridname:{type:Sequelize[_0xf91c[3]]},destconnectedlinenum:{type:Sequelize[_0xf91c[3]]},destconnectedlinename:{type:Sequelize[_0xf91c[3]]},destlanguage:{type:Sequelize[_0xf91c[3]]},destaccountcode:{type:Sequelize[_0xf91c[3]]},destcontext:{type:Sequelize[_0xf91c[3]]},destexten:{type:Sequelize[_0xf91c[3]]},destpriority:{type:Sequelize[_0xf91c[4]]},destuniqueid:{type:Sequelize[_0xf91c[3]]},destlinkedid:{type:Sequelize[_0xf91c[3]]},dialstring:{type:Sequelize[_0xf91c[3]]},dialstatus:{type:Sequelize[_0xf91c[3]]},starttime:{type:Sequelize[_0xf91c[5]]},answertime:{type:Sequelize[_0xf91c[5]]},endtime:{type:Sequelize[_0xf91c[5]]},lastevent:{type:Sequelize[_0xf91c[3]],comment:_0xf91c[6]},routeId:{type:Sequelize[_0xf91c[4]]},duration:{type:Sequelize[_0xf91c[4]]},hodltime:{type:Sequelize[_0xf91c[4]]},billableseconds:{type:Sequelize[_0xf91c[4]]}}
\ No newline at end of file
+var _0x7485=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x44\x41\x54\x45","\x63\x61\x6C\x6C\x65\x64\x2C\x63\x6F\x6E\x6E\x65\x63\x74\x2C\x63\x6F\x6D\x70\x6C\x65\x74\x65"];_0x7485[0];var Sequelize=require(_0x7485[1]);module[_0x7485[2]]= {privilege:{type:Sequelize[_0x7485[3]]},channel:{type:Sequelize[_0x7485[3]]},channelstate:{type:Sequelize[_0x7485[4]]},channelstatedesc:{type:Sequelize[_0x7485[3]]},calleridnum:{type:Sequelize[_0x7485[3]]},calleridname:{type:Sequelize[_0x7485[3]]},connectedlinenum:{type:Sequelize[_0x7485[3]]},connectedlinename:{type:Sequelize[_0x7485[3]]},language:{type:Sequelize[_0x7485[3]]},accountcode:{type:Sequelize[_0x7485[3]]},context:{type:Sequelize[_0x7485[3]]},exten:{type:Sequelize[_0x7485[3]]},priority:{type:Sequelize[_0x7485[4]]},uniqueid:{type:Sequelize[_0x7485[3]]},linkedid:{type:Sequelize[_0x7485[3]]},destchannel:{type:Sequelize[_0x7485[3]]},destchannelstate:{type:Sequelize[_0x7485[4]]},destchannelstatedesc:{type:Sequelize[_0x7485[3]]},destcalleridnum:{type:Sequelize[_0x7485[3]]},destcalleridname:{type:Sequelize[_0x7485[3]]},destconnectedlinenum:{type:Sequelize[_0x7485[3]]},destconnectedlinename:{type:Sequelize[_0x7485[3]]},destlanguage:{type:Sequelize[_0x7485[3]]},destaccountcode:{type:Sequelize[_0x7485[3]]},destcontext:{type:Sequelize[_0x7485[3]]},destexten:{type:Sequelize[_0x7485[3]]},destpriority:{type:Sequelize[_0x7485[4]]},destuniqueid:{type:Sequelize[_0x7485[3]]},destlinkedid:{type:Sequelize[_0x7485[3]]},dialstring:{type:Sequelize[_0x7485[3]]},dialstatus:{type:Sequelize[_0x7485[3]]},starttime:{type:Sequelize[_0x7485[5]]},answertime:{type:Sequelize[_0x7485[5]]},endtime:{type:Sequelize[_0x7485[5]]},lastevent:{type:Sequelize[_0x7485[3]],comment:_0x7485[6]},routeId:{type:Sequelize[_0x7485[4]]},duration:{type:Sequelize[_0x7485[4]]},hodltime:{type:Sequelize[_0x7485[4]]},billableseconds:{type:Sequelize[_0x7485[4]]}}
\ No newline at end of file
index 483a643..0f86105 100644 (file)
@@ -1 +1 @@
-var _0xf6ea=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xf6ea[0];var jsonpatch=require(_0xf6ea[1]);var rp=require(_0xf6ea[2]);var moment=require(_0xf6ea[3]);var BPromise=require(_0xf6ea[4]);var Mustache=require(_0xf6ea[5]);var util=require(_0xf6ea[6]);var path=require(_0xf6ea[7]);var sox=require(_0xf6ea[8]);var csv=require(_0xf6ea[9]);var ejs=require(_0xf6ea[10]);var fs=require(_0xf6ea[11]);var _=require(_0xf6ea[12]);var squel=require(_0xf6ea[13]);var crypto=require(_0xf6ea[14]);var jsforce=require(_0xf6ea[15]);var deskjs=require(_0xf6ea[16]);var toCsv=require(_0xf6ea[9]);var querystring=require(_0xf6ea[17]);var Papa=require(_0xf6ea[18]);var qs=require(_0xf6ea[19]);var logger=require(_0xf6ea[21])(_0xf6ea[20]);var utils=require(_0xf6ea[22]);var config=require(_0xf6ea[23]);var db=require(_0xf6ea[25])[_0xf6ea[24]];function respondWithStatusCode(_0xd42dx1a,_0xd42dx1b){_0xd42dx1b= _0xd42dx1b|| 204;return function(_0xd42dx1c){if(_0xd42dx1c){return _0xd42dx1a[_0xf6ea[26]](_0xd42dx1b)};return _0xd42dx1a[_0xf6ea[28]](_0xd42dx1b)[_0xf6ea[27]]()}}function respondWithResult(_0xd42dx1a,_0xd42dx1b){_0xd42dx1b= _0xd42dx1b|| 200;return function(_0xd42dx1c){if(_0xd42dx1c){return _0xd42dx1a[_0xf6ea[28]](_0xd42dx1b)[_0xf6ea[29]](_0xd42dx1c)}}}function respondWithFilteredResult(_0xd42dx1a,_0xd42dx1f){return function(_0xd42dx1c){if(_0xd42dx1c){var _0xd42dx20=_0xd42dx1c[_0xf6ea[30]],_0xd42dx21=_0xd42dx1f[_0xf6ea[31]],_0xd42dx22=_0xd42dx1f[_0xf6ea[31]]+ _0xd42dx1f[_0xf6ea[32]],_0xd42dx1b;if(_0xd42dx22>= _0xd42dx20){_0xd42dx22= _0xd42dx20;_0xd42dx1b= 200}else {_0xd42dx1b= 206};_0xd42dx1a[_0xf6ea[28]](_0xd42dx1b);return _0xd42dx1a[_0xf6ea[36]](_0xf6ea[33],_0xd42dx21+ _0xf6ea[34]+ _0xd42dx22+ _0xf6ea[35]+ _0xd42dx20)[_0xf6ea[29]](_0xd42dx1c)};return null}}function patchUpdates(_0xd42dx24){return function(_0xd42dx1c){try{jsonpatch[_0xf6ea[37]](_0xd42dx1c,_0xd42dx24,true)}catch(err){return BPromise[_0xf6ea[38]](err)};return _0xd42dx1c[_0xf6ea[39]]()}}function saveUpdates(_0xd42dx26,_0xd42dx1b){return function(_0xd42dx1c){if(_0xd42dx1c){return _0xd42dx1c[_0xf6ea[41]](_0xd42dx26)[_0xf6ea[40]](function(_0xd42dx27){return _0xd42dx27})};return null}}function removeEntity(_0xd42dx1a,_0xd42dx1b){return function(_0xd42dx1c){if(_0xd42dx1c){return _0xd42dx1c[_0xf6ea[42]]()[_0xf6ea[40]](function(){_0xd42dx1a[_0xf6ea[28]](204)[_0xf6ea[27]]()})}}}function handleEntityNotFound(_0xd42dx1a,_0xd42dx1b){return function(_0xd42dx1c){if(!_0xd42dx1c){_0xd42dx1a[_0xf6ea[26]](404)};return _0xd42dx1c}}function handleError(_0xd42dx1a,_0xd42dx1b){_0xd42dx1b= _0xd42dx1b|| 500;return function(_0xd42dx2b){logger[_0xf6ea[44]](_0xd42dx2b[_0xf6ea[43]]);if(_0xd42dx2b[_0xf6ea[45]]){delete _0xd42dx2b[_0xf6ea[45]]};_0xd42dx1a[_0xf6ea[28]](_0xd42dx1b)[_0xf6ea[46]](_0xd42dx2b)}}exports[_0xf6ea[47]]= function(_0xd42dx2c,_0xd42dx1a){var _0xd42dx1f={},_0xd42dx2d={},_0xd42dx2e={count:0,rows:[]};_0xd42dx2d[_0xf6ea[48]]= _[_0xf6ea[51]](db[_0xf6ea[50]][_0xf6ea[49]]);var _0xd42dx2f={dateStart:_0xd42dx2c[_0xf6ea[53]][_0xf6ea[52]],dateEnd:_0xd42dx2c[_0xf6ea[53]][_0xf6ea[54]]};delete _0xd42dx2c[_0xf6ea[53]][_0xf6ea[52]];delete _0xd42dx2c[_0xf6ea[53]][_0xf6ea[54]];_0xd42dx2d[_0xf6ea[53]]= _[_0xf6ea[51]](_0xd42dx2c[_0xf6ea[53]]);_0xd42dx2d[_0xf6ea[55]]= _[_0xf6ea[56]](_0xd42dx2d[_0xf6ea[48]],_0xd42dx2d[_0xf6ea[53]]);_0xd42dx1f[_0xf6ea[57]]= _[_0xf6ea[56]](_0xd42dx2d[_0xf6ea[48]],qs[_0xf6ea[58]](_0xd42dx2c[_0xf6ea[53]][_0xf6ea[58]]));_0xd42dx1f[_0xf6ea[57]]= (_0xd42dx1f[_0xf6ea[57]][_0xf6ea[59]])?_0xd42dx1f[_0xf6ea[57]]:_0xd42dx2d[_0xf6ea[48]];if(!_0xd42dx2c[_0xf6ea[53]][_0xf6ea[61]](_0xf6ea[60])){_0xd42dx1f[_0xf6ea[32]]= qs[_0xf6ea[32]](_0xd42dx2c[_0xf6ea[53]][_0xf6ea[32]]);_0xd42dx1f[_0xf6ea[31]]= qs[_0xf6ea[31]](_0xd42dx2c[_0xf6ea[53]][_0xf6ea[31]])};_0xd42dx1f[_0xf6ea[62]]= qs[_0xf6ea[63]](_0xd42dx2c[_0xf6ea[53]][_0xf6ea[63]]);_0xd42dx1f[_0xf6ea[64]]= qs[_0xf6ea[55]](_[_0xf6ea[65]](_0xd42dx2c[_0xf6ea[53]],_0xd42dx2d[_0xf6ea[55]]));if(_0xd42dx2f[_0xf6ea[52]]){if(_0xd42dx2f[_0xf6ea[54]]){_0xd42dx2f[_0xf6ea[54]]= moment(_0xd42dx2f[_0xf6ea[54]])[_0xf6ea[67]](1,_0xf6ea[66])}else {_0xd42dx2f[_0xf6ea[54]]= moment(_0xd42dx2f[_0xf6ea[52]])[_0xf6ea[67]](1,_0xf6ea[66])};_[_0xf6ea[68]](_0xd42dx1f[_0xf6ea[64]],{createdAt:{$gte:_0xd42dx2f[_0xf6ea[52]],$lte:_0xd42dx2f[_0xf6ea[54]]}})};if(_0xd42dx2c[_0xf6ea[53]][_0xf6ea[69]]){_0xd42dx1f[_0xf6ea[64]]= _[_0xf6ea[68]](_0xd42dx1f[_0xf6ea[64]],{$or:_[_0xf6ea[71]](_0xd42dx1f[_0xf6ea[57]],function(_0xd42dx30){var _0xd42dx2e={};_0xd42dx2e[_0xd42dx30]= {$like:_0xf6ea[70]+ _0xd42dx2c[_0xf6ea[53]][_0xf6ea[69]]+ _0xf6ea[70]};return _0xd42dx2e})})};_0xd42dx1f= _[_0xf6ea[68]]({},_0xd42dx1f,_0xd42dx2c[_0xf6ea[72]]);var _0xd42dx31={where:_0xd42dx1f[_0xf6ea[64]]};return db[_0xf6ea[50]][_0xf6ea[30]](_0xd42dx31)[_0xf6ea[40]](function(_0xd42dx20){_0xd42dx2e[_0xf6ea[30]]= _0xd42dx20;if(_0xd42dx2c[_0xf6ea[53]][_0xf6ea[75]]){_0xd42dx1f[_0xf6ea[76]]= [{all:true}]};return db[_0xf6ea[50]][_0xf6ea[77]](_0xd42dx1f)})[_0xf6ea[40]](function(_0xd42dx32){_0xd42dx2e[_0xf6ea[74]]= _0xd42dx32;return _0xd42dx2e})[_0xf6ea[40]](respondWithFilteredResult(_0xd42dx1a,_0xd42dx1f))[_0xf6ea[73]](handleError(_0xd42dx1a,null))};exports[_0xf6ea[78]]= function(_0xd42dx2c,_0xd42dx1a){var _0xd42dx1f={raw:true,where:{id:_0xd42dx2c[_0xf6ea[80]][_0xf6ea[79]]}},_0xd42dx2d={};_0xd42dx2d[_0xf6ea[48]]= _[_0xf6ea[51]](db[_0xf6ea[50]][_0xf6ea[49]]);_0xd42dx2d[_0xf6ea[53]]= _[_0xf6ea[51]](_0xd42dx2c[_0xf6ea[53]]);_0xd42dx2d[_0xf6ea[55]]= _[_0xf6ea[56]](_0xd42dx2d[_0xf6ea[48]],_0xd42dx2d[_0xf6ea[53]]);_0xd42dx1f[_0xf6ea[57]]= _[_0xf6ea[56]](_0xd42dx2d[_0xf6ea[48]],qs[_0xf6ea[58]](_0xd42dx2c[_0xf6ea[53]][_0xf6ea[58]]));_0xd42dx1f[_0xf6ea[57]]= (_0xd42dx1f[_0xf6ea[57]][_0xf6ea[59]])?_0xd42dx1f[_0xf6ea[57]]:_0xd42dx2d[_0xf6ea[48]];if(_0xd42dx2c[_0xf6ea[53]][_0xf6ea[75]]){_0xd42dx1f[_0xf6ea[76]]= [{all:true}]};_0xd42dx1f= _[_0xf6ea[68]]({},_0xd42dx1f,_0xd42dx2c[_0xf6ea[72]]);return db[_0xf6ea[50]][_0xf6ea[81]](_0xd42dx1f)[_0xf6ea[40]](handleEntityNotFound(_0xd42dx1a,null))[_0xf6ea[40]](respondWithResult(_0xd42dx1a,null))[_0xf6ea[73]](handleError(_0xd42dx1a,null))};exports[_0xf6ea[82]]= function(_0xd42dx2c,_0xd42dx1a){return db[_0xf6ea[50]][_0xf6ea[82]](_0xd42dx2c[_0xf6ea[83]],{})[_0xf6ea[40]](respondWithResult(_0xd42dx1a,201))[_0xf6ea[73]](handleError(_0xd42dx1a,null))};exports[_0xf6ea[41]]= function(_0xd42dx2c,_0xd42dx1a){if(_0xd42dx2c[_0xf6ea[83]][_0xf6ea[79]]){delete _0xd42dx2c[_0xf6ea[83]][_0xf6ea[79]]};return db[_0xf6ea[50]][_0xf6ea[81]]({where:{id:_0xd42dx2c[_0xf6ea[80]][_0xf6ea[79]]}})[_0xf6ea[40]](handleEntityNotFound(_0xd42dx1a,null))[_0xf6ea[40]](saveUpdates(_0xd42dx2c[_0xf6ea[83]],null))[_0xf6ea[40]](respondWithResult(_0xd42dx1a,null))[_0xf6ea[73]](handleError(_0xd42dx1a,null))};exports[_0xf6ea[42]]= function(_0xd42dx2c,_0xd42dx1a){return db[_0xf6ea[50]][_0xf6ea[81]]({where:{id:_0xd42dx2c[_0xf6ea[80]][_0xf6ea[79]]}})[_0xf6ea[40]](handleEntityNotFound(_0xd42dx1a,null))[_0xf6ea[40]](removeEntity(_0xd42dx1a,null))[_0xf6ea[73]](handleError(_0xd42dx1a,null))};exports[_0xf6ea[84]]= function(_0xd42dx2c,_0xd42dx1a){return db[_0xf6ea[50]][_0xf6ea[84]]()[_0xf6ea[40]](respondWithResult(_0xd42dx1a,null))[_0xf6ea[73]](handleError(_0xd42dx1a,null))}
\ No newline at end of file
+var _0xbbbf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xbbbf[0];var jsonpatch=require(_0xbbbf[1]);var rp=require(_0xbbbf[2]);var moment=require(_0xbbbf[3]);var BPromise=require(_0xbbbf[4]);var Mustache=require(_0xbbbf[5]);var util=require(_0xbbbf[6]);var path=require(_0xbbbf[7]);var sox=require(_0xbbbf[8]);var csv=require(_0xbbbf[9]);var ejs=require(_0xbbbf[10]);var fs=require(_0xbbbf[11]);var _=require(_0xbbbf[12]);var squel=require(_0xbbbf[13]);var crypto=require(_0xbbbf[14]);var jsforce=require(_0xbbbf[15]);var deskjs=require(_0xbbbf[16]);var toCsv=require(_0xbbbf[9]);var querystring=require(_0xbbbf[17]);var Papa=require(_0xbbbf[18]);var qs=require(_0xbbbf[19]);var logger=require(_0xbbbf[21])(_0xbbbf[20]);var utils=require(_0xbbbf[22]);var config=require(_0xbbbf[23]);var db=require(_0xbbbf[25])[_0xbbbf[24]];function respondWithStatusCode(_0xa299x1a,_0xa299x1b){_0xa299x1b= _0xa299x1b|| 204;return function(_0xa299x1c){if(_0xa299x1c){return _0xa299x1a[_0xbbbf[26]](_0xa299x1b)};return _0xa299x1a[_0xbbbf[28]](_0xa299x1b)[_0xbbbf[27]]()}}function respondWithResult(_0xa299x1a,_0xa299x1b){_0xa299x1b= _0xa299x1b|| 200;return function(_0xa299x1c){if(_0xa299x1c){return _0xa299x1a[_0xbbbf[28]](_0xa299x1b)[_0xbbbf[29]](_0xa299x1c)}}}function respondWithFilteredResult(_0xa299x1a,_0xa299x1f){return function(_0xa299x1c){if(_0xa299x1c){var _0xa299x20=_0xa299x1c[_0xbbbf[30]],_0xa299x21=_0xa299x1f[_0xbbbf[31]],_0xa299x22=_0xa299x1f[_0xbbbf[31]]+ _0xa299x1f[_0xbbbf[32]],_0xa299x1b;if(_0xa299x22>= _0xa299x20){_0xa299x22= _0xa299x20;_0xa299x1b= 200}else {_0xa299x1b= 206};_0xa299x1a[_0xbbbf[28]](_0xa299x1b);return _0xa299x1a[_0xbbbf[36]](_0xbbbf[33],_0xa299x21+ _0xbbbf[34]+ _0xa299x22+ _0xbbbf[35]+ _0xa299x20)[_0xbbbf[29]](_0xa299x1c)};return null}}function patchUpdates(_0xa299x24){return function(_0xa299x1c){try{jsonpatch[_0xbbbf[37]](_0xa299x1c,_0xa299x24,true)}catch(err){return BPromise[_0xbbbf[38]](err)};return _0xa299x1c[_0xbbbf[39]]()}}function saveUpdates(_0xa299x26,_0xa299x1b){return function(_0xa299x1c){if(_0xa299x1c){return _0xa299x1c[_0xbbbf[41]](_0xa299x26)[_0xbbbf[40]](function(_0xa299x27){return _0xa299x27})};return null}}function removeEntity(_0xa299x1a,_0xa299x1b){return function(_0xa299x1c){if(_0xa299x1c){return _0xa299x1c[_0xbbbf[42]]()[_0xbbbf[40]](function(){_0xa299x1a[_0xbbbf[28]](204)[_0xbbbf[27]]()})}}}function handleEntityNotFound(_0xa299x1a,_0xa299x1b){return function(_0xa299x1c){if(!_0xa299x1c){_0xa299x1a[_0xbbbf[26]](404)};return _0xa299x1c}}function handleError(_0xa299x1a,_0xa299x1b){_0xa299x1b= _0xa299x1b|| 500;return function(_0xa299x2b){logger[_0xbbbf[44]](_0xa299x2b[_0xbbbf[43]]);if(_0xa299x2b[_0xbbbf[45]]){delete _0xa299x2b[_0xbbbf[45]]};_0xa299x1a[_0xbbbf[28]](_0xa299x1b)[_0xbbbf[46]](_0xa299x2b)}}exports[_0xbbbf[47]]= function(_0xa299x2c,_0xa299x1a){var _0xa299x1f={},_0xa299x2d={},_0xa299x2e={count:0,rows:[]};_0xa299x2d[_0xbbbf[48]]= _[_0xbbbf[51]](db[_0xbbbf[50]][_0xbbbf[49]]);var _0xa299x2f={dateStart:_0xa299x2c[_0xbbbf[53]][_0xbbbf[52]],dateEnd:_0xa299x2c[_0xbbbf[53]][_0xbbbf[54]]};delete _0xa299x2c[_0xbbbf[53]][_0xbbbf[52]];delete _0xa299x2c[_0xbbbf[53]][_0xbbbf[54]];_0xa299x2d[_0xbbbf[53]]= _[_0xbbbf[51]](_0xa299x2c[_0xbbbf[53]]);_0xa299x2d[_0xbbbf[55]]= _[_0xbbbf[56]](_0xa299x2d[_0xbbbf[48]],_0xa299x2d[_0xbbbf[53]]);_0xa299x1f[_0xbbbf[57]]= _[_0xbbbf[56]](_0xa299x2d[_0xbbbf[48]],qs[_0xbbbf[58]](_0xa299x2c[_0xbbbf[53]][_0xbbbf[58]]));_0xa299x1f[_0xbbbf[57]]= (_0xa299x1f[_0xbbbf[57]][_0xbbbf[59]])?_0xa299x1f[_0xbbbf[57]]:_0xa299x2d[_0xbbbf[48]];if(!_0xa299x2c[_0xbbbf[53]][_0xbbbf[61]](_0xbbbf[60])){_0xa299x1f[_0xbbbf[32]]= qs[_0xbbbf[32]](_0xa299x2c[_0xbbbf[53]][_0xbbbf[32]]);_0xa299x1f[_0xbbbf[31]]= qs[_0xbbbf[31]](_0xa299x2c[_0xbbbf[53]][_0xbbbf[31]])};_0xa299x1f[_0xbbbf[62]]= qs[_0xbbbf[63]](_0xa299x2c[_0xbbbf[53]][_0xbbbf[63]]);_0xa299x1f[_0xbbbf[64]]= qs[_0xbbbf[55]](_[_0xbbbf[65]](_0xa299x2c[_0xbbbf[53]],_0xa299x2d[_0xbbbf[55]]));if(_0xa299x2f[_0xbbbf[52]]){if(_0xa299x2f[_0xbbbf[54]]){_0xa299x2f[_0xbbbf[54]]= moment(_0xa299x2f[_0xbbbf[54]])[_0xbbbf[67]](1,_0xbbbf[66])}else {_0xa299x2f[_0xbbbf[54]]= moment(_0xa299x2f[_0xbbbf[52]])[_0xbbbf[67]](1,_0xbbbf[66])};_[_0xbbbf[68]](_0xa299x1f[_0xbbbf[64]],{createdAt:{$gte:_0xa299x2f[_0xbbbf[52]],$lte:_0xa299x2f[_0xbbbf[54]]}})};if(_0xa299x2c[_0xbbbf[53]][_0xbbbf[69]]){_0xa299x1f[_0xbbbf[64]]= _[_0xbbbf[68]](_0xa299x1f[_0xbbbf[64]],{$or:_[_0xbbbf[71]](_0xa299x1f[_0xbbbf[57]],function(_0xa299x30){var _0xa299x2e={};_0xa299x2e[_0xa299x30]= {$like:_0xbbbf[70]+ _0xa299x2c[_0xbbbf[53]][_0xbbbf[69]]+ _0xbbbf[70]};return _0xa299x2e})})};_0xa299x1f= _[_0xbbbf[68]]({},_0xa299x1f,_0xa299x2c[_0xbbbf[72]]);var _0xa299x31={where:_0xa299x1f[_0xbbbf[64]]};return db[_0xbbbf[50]][_0xbbbf[30]](_0xa299x31)[_0xbbbf[40]](function(_0xa299x20){_0xa299x2e[_0xbbbf[30]]= _0xa299x20;if(_0xa299x2c[_0xbbbf[53]][_0xbbbf[75]]){_0xa299x1f[_0xbbbf[76]]= [{all:true}]};return db[_0xbbbf[50]][_0xbbbf[77]](_0xa299x1f)})[_0xbbbf[40]](function(_0xa299x32){_0xa299x2e[_0xbbbf[74]]= _0xa299x32;return _0xa299x2e})[_0xbbbf[40]](respondWithFilteredResult(_0xa299x1a,_0xa299x1f))[_0xbbbf[73]](handleError(_0xa299x1a,null))};exports[_0xbbbf[78]]= function(_0xa299x2c,_0xa299x1a){var _0xa299x1f={raw:true,where:{id:_0xa299x2c[_0xbbbf[80]][_0xbbbf[79]]}},_0xa299x2d={};_0xa299x2d[_0xbbbf[48]]= _[_0xbbbf[51]](db[_0xbbbf[50]][_0xbbbf[49]]);_0xa299x2d[_0xbbbf[53]]= _[_0xbbbf[51]](_0xa299x2c[_0xbbbf[53]]);_0xa299x2d[_0xbbbf[55]]= _[_0xbbbf[56]](_0xa299x2d[_0xbbbf[48]],_0xa299x2d[_0xbbbf[53]]);_0xa299x1f[_0xbbbf[57]]= _[_0xbbbf[56]](_0xa299x2d[_0xbbbf[48]],qs[_0xbbbf[58]](_0xa299x2c[_0xbbbf[53]][_0xbbbf[58]]));_0xa299x1f[_0xbbbf[57]]= (_0xa299x1f[_0xbbbf[57]][_0xbbbf[59]])?_0xa299x1f[_0xbbbf[57]]:_0xa299x2d[_0xbbbf[48]];if(_0xa299x2c[_0xbbbf[53]][_0xbbbf[75]]){_0xa299x1f[_0xbbbf[76]]= [{all:true}]};_0xa299x1f= _[_0xbbbf[68]]({},_0xa299x1f,_0xa299x2c[_0xbbbf[72]]);return db[_0xbbbf[50]][_0xbbbf[81]](_0xa299x1f)[_0xbbbf[40]](handleEntityNotFound(_0xa299x1a,null))[_0xbbbf[40]](respondWithResult(_0xa299x1a,null))[_0xbbbf[73]](handleError(_0xa299x1a,null))};exports[_0xbbbf[82]]= function(_0xa299x2c,_0xa299x1a){return db[_0xbbbf[50]][_0xbbbf[82]](_0xa299x2c[_0xbbbf[83]],{})[_0xbbbf[40]](respondWithResult(_0xa299x1a,201))[_0xbbbf[73]](handleError(_0xa299x1a,null))};exports[_0xbbbf[41]]= function(_0xa299x2c,_0xa299x1a){if(_0xa299x2c[_0xbbbf[83]][_0xbbbf[79]]){delete _0xa299x2c[_0xbbbf[83]][_0xbbbf[79]]};return db[_0xbbbf[50]][_0xbbbf[81]]({where:{id:_0xa299x2c[_0xbbbf[80]][_0xbbbf[79]]}})[_0xbbbf[40]](handleEntityNotFound(_0xa299x1a,null))[_0xbbbf[40]](saveUpdates(_0xa299x2c[_0xbbbf[83]],null))[_0xbbbf[40]](respondWithResult(_0xa299x1a,null))[_0xbbbf[73]](handleError(_0xa299x1a,null))};exports[_0xbbbf[42]]= function(_0xa299x2c,_0xa299x1a){return db[_0xbbbf[50]][_0xbbbf[81]]({where:{id:_0xa299x2c[_0xbbbf[80]][_0xbbbf[79]]}})[_0xbbbf[40]](handleEntityNotFound(_0xa299x1a,null))[_0xbbbf[40]](removeEntity(_0xa299x1a,null))[_0xbbbf[73]](handleError(_0xa299x1a,null))};exports[_0xbbbf[84]]= function(_0xa299x2c,_0xa299x1a){return db[_0xbbbf[50]][_0xbbbf[84]]()[_0xbbbf[40]](respondWithResult(_0xa299x1a,null))[_0xbbbf[73]](handleError(_0xa299x1a,null))}
\ No newline at end of file
index b7c1e0d..44b47c7 100644 (file)
@@ -1 +1 @@
-var _0x86a8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0x86a8[0];var _=require(_0x86a8[1]);var util=require(_0x86a8[2]);var logger=require(_0x86a8[4])(_0x86a8[3]);var moment=require(_0x86a8[5]);var BPromise=require(_0x86a8[6]);var rp=require(_0x86a8[7]);var attributes=require(_0x86a8[8]);module[_0x86a8[9]]= function(_0x181dx8,_0x181dx9){return _0x181dx8[_0x86a8[13]](_0x86a8[10],attributes,{tableName:_0x86a8[11],paranoid:false,indexes:[{"\x66\x69\x65\x6C\x64\x73":[_0x86a8[12]]}],timestamps:true})}
\ No newline at end of file
+var _0xf8d3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0xf8d3[0];var _=require(_0xf8d3[1]);var util=require(_0xf8d3[2]);var logger=require(_0xf8d3[4])(_0xf8d3[3]);var moment=require(_0xf8d3[5]);var BPromise=require(_0xf8d3[6]);var rp=require(_0xf8d3[7]);var attributes=require(_0xf8d3[8]);module[_0xf8d3[9]]= function(_0x6f0dx8,_0x6f0dx9){return _0x6f0dx8[_0xf8d3[13]](_0xf8d3[10],attributes,{tableName:_0xf8d3[11],paranoid:false,indexes:[{"\x66\x69\x65\x6C\x64\x73":[_0xf8d3[12]]}],timestamps:true})}
\ No newline at end of file
index 457bbb3..ea32802 100644 (file)
@@ -1 +1 @@
-var _0x7e88=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x55\x70\x64\x61\x74\x65\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65"];_0x7e88[0];var _=require(_0x7e88[1]);var util=require(_0x7e88[2]);var moment=require(_0x7e88[3]);var BPromise=require(_0x7e88[4]);var rs=require(_0x7e88[5]);var fs=require(_0x7e88[6]);var db=require(_0x7e88[8])[_0x7e88[7]];var utils=require(_0x7e88[9]);var logger=require(_0x7e88[11])(_0x7e88[10]);var config=require(_0x7e88[12]);var jayson=require(_0x7e88[13]);var client=jayson[_0x7e88[15]][_0x7e88[14]]({port:9002});function respondWithRpcPromise(_0xc848xe,_0xc848xf,_0xc848x10){return  new BPromise(function(_0xc848x11,_0xc848x12){return client[_0x7e88[28]](_0xc848xe,_0xc848x10)[_0x7e88[27]](function(_0xc848x14){logger[_0x7e88[20]](_0x7e88[16],_0xc848xf,_0x7e88[19]);logger[_0x7e88[23]](_0x7e88[21],_0xc848xf,_0x7e88[19],JSON[_0x7e88[22]](_0xc848x14));if(_0xc848x14[_0x7e88[17]]){if(_0xc848x14[_0x7e88[17]][_0x7e88[24]]=== 500){logger[_0x7e88[17]](_0x7e88[16],_0xc848xf,_0xc848x14[_0x7e88[17]][_0x7e88[25]]);return _0xc848x12(_0xc848x14[_0x7e88[17]][_0x7e88[25]])};logger[_0x7e88[17]](_0x7e88[16],_0xc848xf,_0xc848x14[_0x7e88[17]][_0x7e88[25]]);return _0xc848x11(_0xc848x14[_0x7e88[17]][_0x7e88[25]])}else {logger[_0x7e88[20]](_0x7e88[16],_0xc848xf,_0x7e88[19]);_0xc848x11(_0xc848x14[_0x7e88[26]][_0x7e88[25]])}})[_0x7e88[18]](function(_0xc848x13){logger[_0x7e88[17]](_0x7e88[16],_0xc848xf,_0xc848x13);_0xc848x12(_0xc848x13)})})}exports[_0x7e88[29]]= function(_0xc848x10){var _0xc848x15=this;return  new Promise(function(_0xc848x11,_0xc848x12){return db[_0x7e88[34]][_0x7e88[33]](_0xc848x10[_0x7e88[30]],{raw:_0xc848x10[_0x7e88[31]]?(_0xc848x10[_0x7e88[31]][_0x7e88[32]]=== undefined)?true:false:true})[_0x7e88[27]](function(_0xc848x14){logger[_0x7e88[20]](_0x7e88[29],_0xc848x10);logger[_0x7e88[23]](_0x7e88[29],_0xc848x10,JSON[_0x7e88[22]](_0xc848x14));_0xc848x11(_0xc848x14)})[_0x7e88[18]](function(_0xc848x13){logger[_0x7e88[17]](_0x7e88[29],_0xc848x13[_0x7e88[25]],_0xc848x10);_0xc848x12(_0xc848x15[_0x7e88[17]](500,_0xc848x13[_0x7e88[25]]))})})};exports[_0x7e88[35]]= function(_0xc848x10){var _0xc848x15=this;return  new Promise(function(_0xc848x11,_0xc848x12){return db[_0x7e88[34]][_0x7e88[39]](_0xc848x10[_0x7e88[30]],{raw:_0xc848x10[_0x7e88[31]]?(_0xc848x10[_0x7e88[31]][_0x7e88[32]]=== undefined)?true:false:true,individualHooks:true,where:_0xc848x10[_0x7e88[31]]?_0xc848x10[_0x7e88[31]][_0x7e88[36]]|| null:null,attributes:_0xc848x10[_0x7e88[31]]?_0xc848x10[_0x7e88[31]][_0x7e88[37]]|| null:null,limit:_0xc848x10[_0x7e88[31]]?_0xc848x10[_0x7e88[31]][_0x7e88[38]]|| null:null})[_0x7e88[27]](function(_0xc848x14){logger[_0x7e88[20]](_0x7e88[35],_0xc848x10);logger[_0x7e88[23]](_0x7e88[35],_0xc848x10,JSON[_0x7e88[22]](_0xc848x14));_0xc848x11(_0xc848x14)})[_0x7e88[18]](function(_0xc848x13){logger[_0x7e88[17]](_0x7e88[35],_0xc848x13[_0x7e88[25]],_0xc848x10);_0xc848x12(_0xc848x15[_0x7e88[17]](500,_0xc848x13[_0x7e88[25]]))})})}
\ No newline at end of file
+var _0xa028=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x55\x70\x64\x61\x74\x65\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65"];_0xa028[0];var _=require(_0xa028[1]);var util=require(_0xa028[2]);var moment=require(_0xa028[3]);var BPromise=require(_0xa028[4]);var rs=require(_0xa028[5]);var fs=require(_0xa028[6]);var db=require(_0xa028[8])[_0xa028[7]];var utils=require(_0xa028[9]);var logger=require(_0xa028[11])(_0xa028[10]);var config=require(_0xa028[12]);var jayson=require(_0xa028[13]);var client=jayson[_0xa028[15]][_0xa028[14]]({port:9002});function respondWithRpcPromise(_0xac85xe,_0xac85xf,_0xac85x10){return  new BPromise(function(_0xac85x11,_0xac85x12){return client[_0xa028[28]](_0xac85xe,_0xac85x10)[_0xa028[27]](function(_0xac85x14){logger[_0xa028[20]](_0xa028[16],_0xac85xf,_0xa028[19]);logger[_0xa028[23]](_0xa028[21],_0xac85xf,_0xa028[19],JSON[_0xa028[22]](_0xac85x14));if(_0xac85x14[_0xa028[17]]){if(_0xac85x14[_0xa028[17]][_0xa028[24]]=== 500){logger[_0xa028[17]](_0xa028[16],_0xac85xf,_0xac85x14[_0xa028[17]][_0xa028[25]]);return _0xac85x12(_0xac85x14[_0xa028[17]][_0xa028[25]])};logger[_0xa028[17]](_0xa028[16],_0xac85xf,_0xac85x14[_0xa028[17]][_0xa028[25]]);return _0xac85x11(_0xac85x14[_0xa028[17]][_0xa028[25]])}else {logger[_0xa028[20]](_0xa028[16],_0xac85xf,_0xa028[19]);_0xac85x11(_0xac85x14[_0xa028[26]][_0xa028[25]])}})[_0xa028[18]](function(_0xac85x13){logger[_0xa028[17]](_0xa028[16],_0xac85xf,_0xac85x13);_0xac85x12(_0xac85x13)})})}exports[_0xa028[29]]= function(_0xac85x10){var _0xac85x15=this;return  new Promise(function(_0xac85x11,_0xac85x12){return db[_0xa028[34]][_0xa028[33]](_0xac85x10[_0xa028[30]],{raw:_0xac85x10[_0xa028[31]]?(_0xac85x10[_0xa028[31]][_0xa028[32]]=== undefined)?true:false:true})[_0xa028[27]](function(_0xac85x14){logger[_0xa028[20]](_0xa028[29],_0xac85x10);logger[_0xa028[23]](_0xa028[29],_0xac85x10,JSON[_0xa028[22]](_0xac85x14));_0xac85x11(_0xac85x14)})[_0xa028[18]](function(_0xac85x13){logger[_0xa028[17]](_0xa028[29],_0xac85x13[_0xa028[25]],_0xac85x10);_0xac85x12(_0xac85x15[_0xa028[17]](500,_0xac85x13[_0xa028[25]]))})})};exports[_0xa028[35]]= function(_0xac85x10){var _0xac85x15=this;return  new Promise(function(_0xac85x11,_0xac85x12){return db[_0xa028[34]][_0xa028[39]](_0xac85x10[_0xa028[30]],{raw:_0xac85x10[_0xa028[31]]?(_0xac85x10[_0xa028[31]][_0xa028[32]]=== undefined)?true:false:true,individualHooks:true,where:_0xac85x10[_0xa028[31]]?_0xac85x10[_0xa028[31]][_0xa028[36]]|| null:null,attributes:_0xac85x10[_0xa028[31]]?_0xac85x10[_0xa028[31]][_0xa028[37]]|| null:null,limit:_0xac85x10[_0xa028[31]]?_0xac85x10[_0xa028[31]][_0xa028[38]]|| null:null})[_0xa028[27]](function(_0xac85x14){logger[_0xa028[20]](_0xa028[35],_0xac85x10);logger[_0xa028[23]](_0xa028[35],_0xac85x10,JSON[_0xa028[22]](_0xac85x14));_0xac85x11(_0xac85x14)})[_0xa028[18]](function(_0xac85x13){logger[_0xa028[17]](_0xa028[35],_0xac85x13[_0xa028[25]],_0xac85x10);_0xac85x12(_0xac85x15[_0xa028[17]](500,_0xac85x13[_0xa028[25]]))})})}
\ No newline at end of file
index 9bf0504..4cb6344 100644 (file)
@@ -1 +1 @@
-var _0xf9d9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf9d9[0];var multer=require(_0xf9d9[1]);var util=require(_0xf9d9[2]);var path=require(_0xf9d9[3]);var express=require(_0xf9d9[4]);var router=express.Router();var auth=require(_0xf9d9[5]);var interaction=require(_0xf9d9[6]);var config=require(_0xf9d9[7]);var controller=require(_0xf9d9[8]);router[_0xf9d9[12]](_0xf9d9[9],auth[_0xf9d9[10]](),controller[_0xf9d9[11]]);router[_0xf9d9[12]](_0xf9d9[13],auth[_0xf9d9[10]](),controller[_0xf9d9[14]]);router[_0xf9d9[16]](_0xf9d9[9],auth[_0xf9d9[10]](),controller[_0xf9d9[15]]);router[_0xf9d9[18]](_0xf9d9[13],auth[_0xf9d9[10]](),controller[_0xf9d9[17]]);router[_0xf9d9[20]](_0xf9d9[13],auth[_0xf9d9[10]](),controller[_0xf9d9[19]]);module[_0xf9d9[21]]= router
\ No newline at end of file
+var _0x89df=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x89df[0];var multer=require(_0x89df[1]);var util=require(_0x89df[2]);var path=require(_0x89df[3]);var express=require(_0x89df[4]);var router=express.Router();var auth=require(_0x89df[5]);var interaction=require(_0x89df[6]);var config=require(_0x89df[7]);var controller=require(_0x89df[8]);router[_0x89df[12]](_0x89df[9],auth[_0x89df[10]](),controller[_0x89df[11]]);router[_0x89df[12]](_0x89df[13],auth[_0x89df[10]](),controller[_0x89df[14]]);router[_0x89df[16]](_0x89df[9],auth[_0x89df[10]](),controller[_0x89df[15]]);router[_0x89df[18]](_0x89df[13],auth[_0x89df[10]](),controller[_0x89df[17]]);router[_0x89df[20]](_0x89df[13],auth[_0x89df[10]](),controller[_0x89df[19]]);module[_0x89df[21]]= router
\ No newline at end of file
index f1b61e7..ece35c8 100644 (file)
@@ -1 +1 @@
-var _0x8cda=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65\x41\x6E\x64\x41\x63\x63\x6F\x75\x6E\x74"];_0x8cda[0];var Sequelize=require(_0x8cda[1]);module[_0x8cda[2]]= {name:{type:Sequelize[_0x8cda[3]],unique:_0x8cda[4],allowNull:false}}
\ No newline at end of file
+var _0xcb1b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65\x41\x6E\x64\x41\x63\x63\x6F\x75\x6E\x74"];_0xcb1b[0];var Sequelize=require(_0xcb1b[1]);module[_0xcb1b[2]]= {name:{type:Sequelize[_0xcb1b[3]],unique:_0xcb1b[4],allowNull:false}}
\ No newline at end of file
index a2c60e1..73f5c9b 100644 (file)
@@ -1 +1 @@
-var _0x8dd3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x8dd3[0];var jsonpatch=require(_0x8dd3[1]);var rp=require(_0x8dd3[2]);var moment=require(_0x8dd3[3]);var BPromise=require(_0x8dd3[4]);var Mustache=require(_0x8dd3[5]);var util=require(_0x8dd3[6]);var path=require(_0x8dd3[7]);var sox=require(_0x8dd3[8]);var csv=require(_0x8dd3[9]);var ejs=require(_0x8dd3[10]);var fs=require(_0x8dd3[11]);var _=require(_0x8dd3[12]);var squel=require(_0x8dd3[13]);var crypto=require(_0x8dd3[14]);var jsforce=require(_0x8dd3[15]);var deskjs=require(_0x8dd3[16]);var toCsv=require(_0x8dd3[9]);var querystring=require(_0x8dd3[17]);var Papa=require(_0x8dd3[18]);var qs=require(_0x8dd3[19]);var logger=require(_0x8dd3[21])(_0x8dd3[20]);var utils=require(_0x8dd3[22]);var config=require(_0x8dd3[23]);var db=require(_0x8dd3[25])[_0x8dd3[24]];function respondWithStatusCode(_0x10fcx1a,_0x10fcx1b){_0x10fcx1b= _0x10fcx1b|| 204;return function(_0x10fcx1c){if(_0x10fcx1c){return _0x10fcx1a[_0x8dd3[26]](_0x10fcx1b)};return _0x10fcx1a[_0x8dd3[28]](_0x10fcx1b)[_0x8dd3[27]]()}}function respondWithResult(_0x10fcx1a,_0x10fcx1b){_0x10fcx1b= _0x10fcx1b|| 200;return function(_0x10fcx1c){if(_0x10fcx1c){return _0x10fcx1a[_0x8dd3[28]](_0x10fcx1b)[_0x8dd3[29]](_0x10fcx1c)}}}function respondWithFilteredResult(_0x10fcx1a,_0x10fcx1f){return function(_0x10fcx1c){if(_0x10fcx1c){var _0x10fcx20=_0x10fcx1c[_0x8dd3[30]],_0x10fcx21=_0x10fcx1f[_0x8dd3[31]],_0x10fcx22=_0x10fcx1f[_0x8dd3[31]]+ _0x10fcx1f[_0x8dd3[32]],_0x10fcx1b;if(_0x10fcx22>= _0x10fcx20){_0x10fcx22= _0x10fcx20;_0x10fcx1b= 200}else {_0x10fcx1b= 206};_0x10fcx1a[_0x8dd3[28]](_0x10fcx1b);return _0x10fcx1a[_0x8dd3[36]](_0x8dd3[33],_0x10fcx21+ _0x8dd3[34]+ _0x10fcx22+ _0x8dd3[35]+ _0x10fcx20)[_0x8dd3[29]](_0x10fcx1c)};return null}}function patchUpdates(_0x10fcx24){return function(_0x10fcx1c){try{jsonpatch[_0x8dd3[37]](_0x10fcx1c,_0x10fcx24,true)}catch(err){return BPromise[_0x8dd3[38]](err)};return _0x10fcx1c[_0x8dd3[39]]()}}function saveUpdates(_0x10fcx26,_0x10fcx1b){return function(_0x10fcx1c){if(_0x10fcx1c){return _0x10fcx1c[_0x8dd3[41]](_0x10fcx26)[_0x8dd3[40]](function(_0x10fcx27){return _0x10fcx27})};return null}}function removeEntity(_0x10fcx1a,_0x10fcx1b){return function(_0x10fcx1c){if(_0x10fcx1c){return _0x10fcx1c[_0x8dd3[42]]()[_0x8dd3[40]](function(){_0x10fcx1a[_0x8dd3[28]](204)[_0x8dd3[27]]()})}}}function handleEntityNotFound(_0x10fcx1a,_0x10fcx1b){return function(_0x10fcx1c){if(!_0x10fcx1c){_0x10fcx1a[_0x8dd3[26]](404)};return _0x10fcx1c}}function handleError(_0x10fcx1a,_0x10fcx1b){_0x10fcx1b= _0x10fcx1b|| 500;return function(_0x10fcx2b){logger[_0x8dd3[44]](_0x10fcx2b[_0x8dd3[43]]);if(_0x10fcx2b[_0x8dd3[45]]){delete _0x10fcx2b[_0x8dd3[45]]};_0x10fcx1a[_0x8dd3[28]](_0x10fcx1b)[_0x8dd3[46]](_0x10fcx2b)}}exports[_0x8dd3[47]]= function(_0x10fcx2c,_0x10fcx1a){var _0x10fcx1f={},_0x10fcx2d={},_0x10fcx2e={count:0,rows:[]};_0x10fcx2d[_0x8dd3[48]]= _[_0x8dd3[51]](db[_0x8dd3[50]][_0x8dd3[49]]);var _0x10fcx2f={dateStart:_0x10fcx2c[_0x8dd3[53]][_0x8dd3[52]],dateEnd:_0x10fcx2c[_0x8dd3[53]][_0x8dd3[54]]};delete _0x10fcx2c[_0x8dd3[53]][_0x8dd3[52]];delete _0x10fcx2c[_0x8dd3[53]][_0x8dd3[54]];_0x10fcx2d[_0x8dd3[53]]= _[_0x8dd3[51]](_0x10fcx2c[_0x8dd3[53]]);_0x10fcx2d[_0x8dd3[55]]= _[_0x8dd3[56]](_0x10fcx2d[_0x8dd3[48]],_0x10fcx2d[_0x8dd3[53]]);_0x10fcx1f[_0x8dd3[57]]= _[_0x8dd3[56]](_0x10fcx2d[_0x8dd3[48]],qs[_0x8dd3[58]](_0x10fcx2c[_0x8dd3[53]][_0x8dd3[58]]));_0x10fcx1f[_0x8dd3[57]]= (_0x10fcx1f[_0x8dd3[57]][_0x8dd3[59]])?_0x10fcx1f[_0x8dd3[57]]:_0x10fcx2d[_0x8dd3[48]];if(!_0x10fcx2c[_0x8dd3[53]][_0x8dd3[61]](_0x8dd3[60])){_0x10fcx1f[_0x8dd3[32]]= qs[_0x8dd3[32]](_0x10fcx2c[_0x8dd3[53]][_0x8dd3[32]]);_0x10fcx1f[_0x8dd3[31]]= qs[_0x8dd3[31]](_0x10fcx2c[_0x8dd3[53]][_0x8dd3[31]])};_0x10fcx1f[_0x8dd3[62]]= qs[_0x8dd3[63]](_0x10fcx2c[_0x8dd3[53]][_0x8dd3[63]]);_0x10fcx1f[_0x8dd3[64]]= qs[_0x8dd3[55]](_[_0x8dd3[65]](_0x10fcx2c[_0x8dd3[53]],_0x10fcx2d[_0x8dd3[55]]));if(_0x10fcx2f[_0x8dd3[52]]){if(_0x10fcx2f[_0x8dd3[54]]){_0x10fcx2f[_0x8dd3[54]]= moment(_0x10fcx2f[_0x8dd3[54]])[_0x8dd3[67]](1,_0x8dd3[66])}else {_0x10fcx2f[_0x8dd3[54]]= moment(_0x10fcx2f[_0x8dd3[52]])[_0x8dd3[67]](1,_0x8dd3[66])};_[_0x8dd3[68]](_0x10fcx1f[_0x8dd3[64]],{createdAt:{$gte:_0x10fcx2f[_0x8dd3[52]],$lte:_0x10fcx2f[_0x8dd3[54]]}})};if(_0x10fcx2c[_0x8dd3[53]][_0x8dd3[69]]){_0x10fcx1f[_0x8dd3[64]]= _[_0x8dd3[68]](_0x10fcx1f[_0x8dd3[64]],{$or:_[_0x8dd3[71]](_0x10fcx1f[_0x8dd3[57]],function(_0x10fcx30){var _0x10fcx2e={};_0x10fcx2e[_0x10fcx30]= {$like:_0x8dd3[70]+ _0x10fcx2c[_0x8dd3[53]][_0x8dd3[69]]+ _0x8dd3[70]};return _0x10fcx2e})})};_0x10fcx1f= _[_0x8dd3[68]]({},_0x10fcx1f,_0x10fcx2c[_0x8dd3[72]]);var _0x10fcx31={where:_0x10fcx1f[_0x8dd3[64]]};return db[_0x8dd3[50]][_0x8dd3[30]](_0x10fcx31)[_0x8dd3[40]](function(_0x10fcx20){_0x10fcx2e[_0x8dd3[30]]= _0x10fcx20;if(_0x10fcx2c[_0x8dd3[53]][_0x8dd3[75]]){_0x10fcx1f[_0x8dd3[76]]= [{all:true}]};return db[_0x8dd3[50]][_0x8dd3[77]](_0x10fcx1f)})[_0x8dd3[40]](function(_0x10fcx32){_0x10fcx2e[_0x8dd3[74]]= _0x10fcx32;return _0x10fcx2e})[_0x8dd3[40]](respondWithFilteredResult(_0x10fcx1a,_0x10fcx1f))[_0x8dd3[73]](handleError(_0x10fcx1a,null))};exports[_0x8dd3[78]]= function(_0x10fcx2c,_0x10fcx1a){var _0x10fcx1f={raw:true,where:{id:_0x10fcx2c[_0x8dd3[80]][_0x8dd3[79]]}},_0x10fcx2d={};_0x10fcx2d[_0x8dd3[48]]= _[_0x8dd3[51]](db[_0x8dd3[50]][_0x8dd3[49]]);_0x10fcx2d[_0x8dd3[53]]= _[_0x8dd3[51]](_0x10fcx2c[_0x8dd3[53]]);_0x10fcx2d[_0x8dd3[55]]= _[_0x8dd3[56]](_0x10fcx2d[_0x8dd3[48]],_0x10fcx2d[_0x8dd3[53]]);_0x10fcx1f[_0x8dd3[57]]= _[_0x8dd3[56]](_0x10fcx2d[_0x8dd3[48]],qs[_0x8dd3[58]](_0x10fcx2c[_0x8dd3[53]][_0x8dd3[58]]));_0x10fcx1f[_0x8dd3[57]]= (_0x10fcx1f[_0x8dd3[57]][_0x8dd3[59]])?_0x10fcx1f[_0x8dd3[57]]:_0x10fcx2d[_0x8dd3[48]];if(_0x10fcx2c[_0x8dd3[53]][_0x8dd3[75]]){_0x10fcx1f[_0x8dd3[76]]= [{all:true}]};_0x10fcx1f= _[_0x8dd3[68]]({},_0x10fcx1f,_0x10fcx2c[_0x8dd3[72]]);return db[_0x8dd3[50]][_0x8dd3[81]](_0x10fcx1f)[_0x8dd3[40]](handleEntityNotFound(_0x10fcx1a,null))[_0x8dd3[40]](respondWithResult(_0x10fcx1a,null))[_0x8dd3[73]](handleError(_0x10fcx1a,null))};exports[_0x8dd3[82]]= function(_0x10fcx2c,_0x10fcx1a){return db[_0x8dd3[50]][_0x8dd3[82]](_0x10fcx2c[_0x8dd3[83]],{})[_0x8dd3[40]](respondWithResult(_0x10fcx1a,201))[_0x8dd3[73]](handleError(_0x10fcx1a,null))};exports[_0x8dd3[41]]= function(_0x10fcx2c,_0x10fcx1a){if(_0x10fcx2c[_0x8dd3[83]][_0x8dd3[79]]){delete _0x10fcx2c[_0x8dd3[83]][_0x8dd3[79]]};return db[_0x8dd3[50]][_0x8dd3[81]]({where:{id:_0x10fcx2c[_0x8dd3[80]][_0x8dd3[79]]}})[_0x8dd3[40]](handleEntityNotFound(_0x10fcx1a,null))[_0x8dd3[40]](saveUpdates(_0x10fcx2c[_0x8dd3[83]],null))[_0x8dd3[40]](respondWithResult(_0x10fcx1a,null))[_0x8dd3[73]](handleError(_0x10fcx1a,null))};exports[_0x8dd3[42]]= function(_0x10fcx2c,_0x10fcx1a){return db[_0x8dd3[50]][_0x8dd3[81]]({where:{id:_0x10fcx2c[_0x8dd3[80]][_0x8dd3[79]]}})[_0x8dd3[40]](handleEntityNotFound(_0x10fcx1a,null))[_0x8dd3[40]](removeEntity(_0x10fcx1a,null))[_0x8dd3[73]](handleError(_0x10fcx1a,null))}
\ No newline at end of file
+var _0xfd0f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xfd0f[0];var jsonpatch=require(_0xfd0f[1]);var rp=require(_0xfd0f[2]);var moment=require(_0xfd0f[3]);var BPromise=require(_0xfd0f[4]);var Mustache=require(_0xfd0f[5]);var util=require(_0xfd0f[6]);var path=require(_0xfd0f[7]);var sox=require(_0xfd0f[8]);var csv=require(_0xfd0f[9]);var ejs=require(_0xfd0f[10]);var fs=require(_0xfd0f[11]);var _=require(_0xfd0f[12]);var squel=require(_0xfd0f[13]);var crypto=require(_0xfd0f[14]);var jsforce=require(_0xfd0f[15]);var deskjs=require(_0xfd0f[16]);var toCsv=require(_0xfd0f[9]);var querystring=require(_0xfd0f[17]);var Papa=require(_0xfd0f[18]);var qs=require(_0xfd0f[19]);var logger=require(_0xfd0f[21])(_0xfd0f[20]);var utils=require(_0xfd0f[22]);var config=require(_0xfd0f[23]);var db=require(_0xfd0f[25])[_0xfd0f[24]];function respondWithStatusCode(_0x17efx1a,_0x17efx1b){_0x17efx1b= _0x17efx1b|| 204;return function(_0x17efx1c){if(_0x17efx1c){return _0x17efx1a[_0xfd0f[26]](_0x17efx1b)};return _0x17efx1a[_0xfd0f[28]](_0x17efx1b)[_0xfd0f[27]]()}}function respondWithResult(_0x17efx1a,_0x17efx1b){_0x17efx1b= _0x17efx1b|| 200;return function(_0x17efx1c){if(_0x17efx1c){return _0x17efx1a[_0xfd0f[28]](_0x17efx1b)[_0xfd0f[29]](_0x17efx1c)}}}function respondWithFilteredResult(_0x17efx1a,_0x17efx1f){return function(_0x17efx1c){if(_0x17efx1c){var _0x17efx20=_0x17efx1c[_0xfd0f[30]],_0x17efx21=_0x17efx1f[_0xfd0f[31]],_0x17efx22=_0x17efx1f[_0xfd0f[31]]+ _0x17efx1f[_0xfd0f[32]],_0x17efx1b;if(_0x17efx22>= _0x17efx20){_0x17efx22= _0x17efx20;_0x17efx1b= 200}else {_0x17efx1b= 206};_0x17efx1a[_0xfd0f[28]](_0x17efx1b);return _0x17efx1a[_0xfd0f[36]](_0xfd0f[33],_0x17efx21+ _0xfd0f[34]+ _0x17efx22+ _0xfd0f[35]+ _0x17efx20)[_0xfd0f[29]](_0x17efx1c)};return null}}function patchUpdates(_0x17efx24){return function(_0x17efx1c){try{jsonpatch[_0xfd0f[37]](_0x17efx1c,_0x17efx24,true)}catch(err){return BPromise[_0xfd0f[38]](err)};return _0x17efx1c[_0xfd0f[39]]()}}function saveUpdates(_0x17efx26,_0x17efx1b){return function(_0x17efx1c){if(_0x17efx1c){return _0x17efx1c[_0xfd0f[41]](_0x17efx26)[_0xfd0f[40]](function(_0x17efx27){return _0x17efx27})};return null}}function removeEntity(_0x17efx1a,_0x17efx1b){return function(_0x17efx1c){if(_0x17efx1c){return _0x17efx1c[_0xfd0f[42]]()[_0xfd0f[40]](function(){_0x17efx1a[_0xfd0f[28]](204)[_0xfd0f[27]]()})}}}function handleEntityNotFound(_0x17efx1a,_0x17efx1b){return function(_0x17efx1c){if(!_0x17efx1c){_0x17efx1a[_0xfd0f[26]](404)};return _0x17efx1c}}function handleError(_0x17efx1a,_0x17efx1b){_0x17efx1b= _0x17efx1b|| 500;return function(_0x17efx2b){logger[_0xfd0f[44]](_0x17efx2b[_0xfd0f[43]]);if(_0x17efx2b[_0xfd0f[45]]){delete _0x17efx2b[_0xfd0f[45]]};_0x17efx1a[_0xfd0f[28]](_0x17efx1b)[_0xfd0f[46]](_0x17efx2b)}}exports[_0xfd0f[47]]= function(_0x17efx2c,_0x17efx1a){var _0x17efx1f={},_0x17efx2d={},_0x17efx2e={count:0,rows:[]};_0x17efx2d[_0xfd0f[48]]= _[_0xfd0f[51]](db[_0xfd0f[50]][_0xfd0f[49]]);var _0x17efx2f={dateStart:_0x17efx2c[_0xfd0f[53]][_0xfd0f[52]],dateEnd:_0x17efx2c[_0xfd0f[53]][_0xfd0f[54]]};delete _0x17efx2c[_0xfd0f[53]][_0xfd0f[52]];delete _0x17efx2c[_0xfd0f[53]][_0xfd0f[54]];_0x17efx2d[_0xfd0f[53]]= _[_0xfd0f[51]](_0x17efx2c[_0xfd0f[53]]);_0x17efx2d[_0xfd0f[55]]= _[_0xfd0f[56]](_0x17efx2d[_0xfd0f[48]],_0x17efx2d[_0xfd0f[53]]);_0x17efx1f[_0xfd0f[57]]= _[_0xfd0f[56]](_0x17efx2d[_0xfd0f[48]],qs[_0xfd0f[58]](_0x17efx2c[_0xfd0f[53]][_0xfd0f[58]]));_0x17efx1f[_0xfd0f[57]]= (_0x17efx1f[_0xfd0f[57]][_0xfd0f[59]])?_0x17efx1f[_0xfd0f[57]]:_0x17efx2d[_0xfd0f[48]];if(!_0x17efx2c[_0xfd0f[53]][_0xfd0f[61]](_0xfd0f[60])){_0x17efx1f[_0xfd0f[32]]= qs[_0xfd0f[32]](_0x17efx2c[_0xfd0f[53]][_0xfd0f[32]]);_0x17efx1f[_0xfd0f[31]]= qs[_0xfd0f[31]](_0x17efx2c[_0xfd0f[53]][_0xfd0f[31]])};_0x17efx1f[_0xfd0f[62]]= qs[_0xfd0f[63]](_0x17efx2c[_0xfd0f[53]][_0xfd0f[63]]);_0x17efx1f[_0xfd0f[64]]= qs[_0xfd0f[55]](_[_0xfd0f[65]](_0x17efx2c[_0xfd0f[53]],_0x17efx2d[_0xfd0f[55]]));if(_0x17efx2f[_0xfd0f[52]]){if(_0x17efx2f[_0xfd0f[54]]){_0x17efx2f[_0xfd0f[54]]= moment(_0x17efx2f[_0xfd0f[54]])[_0xfd0f[67]](1,_0xfd0f[66])}else {_0x17efx2f[_0xfd0f[54]]= moment(_0x17efx2f[_0xfd0f[52]])[_0xfd0f[67]](1,_0xfd0f[66])};_[_0xfd0f[68]](_0x17efx1f[_0xfd0f[64]],{createdAt:{$gte:_0x17efx2f[_0xfd0f[52]],$lte:_0x17efx2f[_0xfd0f[54]]}})};if(_0x17efx2c[_0xfd0f[53]][_0xfd0f[69]]){_0x17efx1f[_0xfd0f[64]]= _[_0xfd0f[68]](_0x17efx1f[_0xfd0f[64]],{$or:_[_0xfd0f[71]](_0x17efx1f[_0xfd0f[57]],function(_0x17efx30){var _0x17efx2e={};_0x17efx2e[_0x17efx30]= {$like:_0xfd0f[70]+ _0x17efx2c[_0xfd0f[53]][_0xfd0f[69]]+ _0xfd0f[70]};return _0x17efx2e})})};_0x17efx1f= _[_0xfd0f[68]]({},_0x17efx1f,_0x17efx2c[_0xfd0f[72]]);var _0x17efx31={where:_0x17efx1f[_0xfd0f[64]]};return db[_0xfd0f[50]][_0xfd0f[30]](_0x17efx31)[_0xfd0f[40]](function(_0x17efx20){_0x17efx2e[_0xfd0f[30]]= _0x17efx20;if(_0x17efx2c[_0xfd0f[53]][_0xfd0f[75]]){_0x17efx1f[_0xfd0f[76]]= [{all:true}]};return db[_0xfd0f[50]][_0xfd0f[77]](_0x17efx1f)})[_0xfd0f[40]](function(_0x17efx32){_0x17efx2e[_0xfd0f[74]]= _0x17efx32;return _0x17efx2e})[_0xfd0f[40]](respondWithFilteredResult(_0x17efx1a,_0x17efx1f))[_0xfd0f[73]](handleError(_0x17efx1a,null))};exports[_0xfd0f[78]]= function(_0x17efx2c,_0x17efx1a){var _0x17efx1f={raw:true,where:{id:_0x17efx2c[_0xfd0f[80]][_0xfd0f[79]]}},_0x17efx2d={};_0x17efx2d[_0xfd0f[48]]= _[_0xfd0f[51]](db[_0xfd0f[50]][_0xfd0f[49]]);_0x17efx2d[_0xfd0f[53]]= _[_0xfd0f[51]](_0x17efx2c[_0xfd0f[53]]);_0x17efx2d[_0xfd0f[55]]= _[_0xfd0f[56]](_0x17efx2d[_0xfd0f[48]],_0x17efx2d[_0xfd0f[53]]);_0x17efx1f[_0xfd0f[57]]= _[_0xfd0f[56]](_0x17efx2d[_0xfd0f[48]],qs[_0xfd0f[58]](_0x17efx2c[_0xfd0f[53]][_0xfd0f[58]]));_0x17efx1f[_0xfd0f[57]]= (_0x17efx1f[_0xfd0f[57]][_0xfd0f[59]])?_0x17efx1f[_0xfd0f[57]]:_0x17efx2d[_0xfd0f[48]];if(_0x17efx2c[_0xfd0f[53]][_0xfd0f[75]]){_0x17efx1f[_0xfd0f[76]]= [{all:true}]};_0x17efx1f= _[_0xfd0f[68]]({},_0x17efx1f,_0x17efx2c[_0xfd0f[72]]);return db[_0xfd0f[50]][_0xfd0f[81]](_0x17efx1f)[_0xfd0f[40]](handleEntityNotFound(_0x17efx1a,null))[_0xfd0f[40]](respondWithResult(_0x17efx1a,null))[_0xfd0f[73]](handleError(_0x17efx1a,null))};exports[_0xfd0f[82]]= function(_0x17efx2c,_0x17efx1a){return db[_0xfd0f[50]][_0xfd0f[82]](_0x17efx2c[_0xfd0f[83]],{})[_0xfd0f[40]](respondWithResult(_0x17efx1a,201))[_0xfd0f[73]](handleError(_0x17efx1a,null))};exports[_0xfd0f[41]]= function(_0x17efx2c,_0x17efx1a){if(_0x17efx2c[_0xfd0f[83]][_0xfd0f[79]]){delete _0x17efx2c[_0xfd0f[83]][_0xfd0f[79]]};return db[_0xfd0f[50]][_0xfd0f[81]]({where:{id:_0x17efx2c[_0xfd0f[80]][_0xfd0f[79]]}})[_0xfd0f[40]](handleEntityNotFound(_0x17efx1a,null))[_0xfd0f[40]](saveUpdates(_0x17efx2c[_0xfd0f[83]],null))[_0xfd0f[40]](respondWithResult(_0x17efx1a,null))[_0xfd0f[73]](handleError(_0x17efx1a,null))};exports[_0xfd0f[42]]= function(_0x17efx2c,_0x17efx1a){return db[_0xfd0f[50]][_0xfd0f[81]]({where:{id:_0x17efx2c[_0xfd0f[80]][_0xfd0f[79]]}})[_0xfd0f[40]](handleEntityNotFound(_0x17efx1a,null))[_0xfd0f[40]](removeEntity(_0x17efx1a,null))[_0xfd0f[73]](handleError(_0x17efx1a,null))}
\ No newline at end of file
index add09bc..19bed80 100644 (file)
@@ -1 +1 @@
-var _0xdeab=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x76\x6F\x69\x63\x65\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xdeab[0];var _=require(_0xdeab[1]);var util=require(_0xdeab[2]);var logger=require(_0xdeab[4])(_0xdeab[3]);var moment=require(_0xdeab[5]);var BPromise=require(_0xdeab[6]);var rp=require(_0xdeab[7]);var attributes=require(_0xdeab[8]);module[_0xdeab[9]]= function(_0x57aax8,_0x57aax9){return _0x57aax8[_0xdeab[12]](_0xdeab[10],attributes,{tableName:_0xdeab[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0xaa15=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x76\x6F\x69\x63\x65\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0xaa15[0];var _=require(_0xaa15[1]);var util=require(_0xaa15[2]);var logger=require(_0xaa15[4])(_0xaa15[3]);var moment=require(_0xaa15[5]);var BPromise=require(_0xaa15[6]);var rp=require(_0xaa15[7]);var attributes=require(_0xaa15[8]);module[_0xaa15[9]]= function(_0x1f4dx8,_0x1f4dx9){return _0x1f4dx8[_0xaa15[12]](_0xaa15[10],attributes,{tableName:_0xaa15[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 6e36215..0704611 100644 (file)
@@ -1 +1 @@
-var _0x4f69=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x4f69[0];var _=require(_0x4f69[1]);var util=require(_0x4f69[2]);var moment=require(_0x4f69[3]);var BPromise=require(_0x4f69[4]);var rs=require(_0x4f69[5]);var fs=require(_0x4f69[6]);var db=require(_0x4f69[8])[_0x4f69[7]];var utils=require(_0x4f69[9]);var logger=require(_0x4f69[11])(_0x4f69[10]);var config=require(_0x4f69[12]);var jayson=require(_0x4f69[13]);var client=jayson[_0x4f69[15]][_0x4f69[14]]({port:9002});function respondWithRpcPromise(_0x1c1dxe,_0x1c1dxf,_0x1c1dx10){return  new BPromise(function(_0x1c1dx11,_0x1c1dx12){return client[_0x4f69[28]](_0x1c1dxe,_0x1c1dx10)[_0x4f69[27]](function(_0x1c1dx14){logger[_0x4f69[20]](_0x4f69[16],_0x1c1dxf,_0x4f69[19]);logger[_0x4f69[23]](_0x4f69[21],_0x1c1dxf,_0x4f69[19],JSON[_0x4f69[22]](_0x1c1dx14));if(_0x1c1dx14[_0x4f69[17]]){if(_0x1c1dx14[_0x4f69[17]][_0x4f69[24]]=== 500){logger[_0x4f69[17]](_0x4f69[16],_0x1c1dxf,_0x1c1dx14[_0x4f69[17]][_0x4f69[25]]);return _0x1c1dx12(_0x1c1dx14[_0x4f69[17]][_0x4f69[25]])};logger[_0x4f69[17]](_0x4f69[16],_0x1c1dxf,_0x1c1dx14[_0x4f69[17]][_0x4f69[25]]);return _0x1c1dx11(_0x1c1dx14[_0x4f69[17]][_0x4f69[25]])}else {logger[_0x4f69[20]](_0x4f69[16],_0x1c1dxf,_0x4f69[19]);_0x1c1dx11(_0x1c1dx14[_0x4f69[26]][_0x4f69[25]])}})[_0x4f69[18]](function(_0x1c1dx13){logger[_0x4f69[17]](_0x4f69[16],_0x1c1dxf,_0x1c1dx13);_0x1c1dx12(_0x1c1dx13)})})}
\ No newline at end of file
+var _0xb581=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xb581[0];var _=require(_0xb581[1]);var util=require(_0xb581[2]);var moment=require(_0xb581[3]);var BPromise=require(_0xb581[4]);var rs=require(_0xb581[5]);var fs=require(_0xb581[6]);var db=require(_0xb581[8])[_0xb581[7]];var utils=require(_0xb581[9]);var logger=require(_0xb581[11])(_0xb581[10]);var config=require(_0xb581[12]);var jayson=require(_0xb581[13]);var client=jayson[_0xb581[15]][_0xb581[14]]({port:9002});function respondWithRpcPromise(_0xefc0xe,_0xefc0xf,_0xefc0x10){return  new BPromise(function(_0xefc0x11,_0xefc0x12){return client[_0xb581[28]](_0xefc0xe,_0xefc0x10)[_0xb581[27]](function(_0xefc0x14){logger[_0xb581[20]](_0xb581[16],_0xefc0xf,_0xb581[19]);logger[_0xb581[23]](_0xb581[21],_0xefc0xf,_0xb581[19],JSON[_0xb581[22]](_0xefc0x14));if(_0xefc0x14[_0xb581[17]]){if(_0xefc0x14[_0xb581[17]][_0xb581[24]]=== 500){logger[_0xb581[17]](_0xb581[16],_0xefc0xf,_0xefc0x14[_0xb581[17]][_0xb581[25]]);return _0xefc0x12(_0xefc0x14[_0xb581[17]][_0xb581[25]])};logger[_0xb581[17]](_0xb581[16],_0xefc0xf,_0xefc0x14[_0xb581[17]][_0xb581[25]]);return _0xefc0x11(_0xefc0x14[_0xb581[17]][_0xb581[25]])}else {logger[_0xb581[20]](_0xb581[16],_0xefc0xf,_0xb581[19]);_0xefc0x11(_0xefc0x14[_0xb581[26]][_0xb581[25]])}})[_0xb581[18]](function(_0xefc0x13){logger[_0xb581[17]](_0xb581[16],_0xefc0xf,_0xefc0x13);_0xefc0x12(_0xefc0x13)})})}
\ No newline at end of file
index 22e7857..d6b75fe 100644 (file)
@@ -1 +1 @@
-var _0x79d3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x79d3[0];var multer=require(_0x79d3[1]);var util=require(_0x79d3[2]);var path=require(_0x79d3[3]);var express=require(_0x79d3[4]);var router=express.Router();var auth=require(_0x79d3[5]);var interaction=require(_0x79d3[6]);var config=require(_0x79d3[7]);var controller=require(_0x79d3[8]);router[_0x79d3[12]](_0x79d3[9],auth[_0x79d3[10]](),controller[_0x79d3[11]]);router[_0x79d3[12]](_0x79d3[13],auth[_0x79d3[10]](),controller[_0x79d3[14]]);router[_0x79d3[16]](_0x79d3[9],auth[_0x79d3[10]](),controller[_0x79d3[15]]);router[_0x79d3[16]](_0x79d3[17],auth[_0x79d3[10]](),controller[_0x79d3[18]]);router[_0x79d3[20]](_0x79d3[13],auth[_0x79d3[10]](),controller[_0x79d3[19]]);router[_0x79d3[22]](_0x79d3[13],auth[_0x79d3[10]](),controller[_0x79d3[21]]);module[_0x79d3[23]]= router
\ No newline at end of file
+var _0x9fbc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9fbc[0];var multer=require(_0x9fbc[1]);var util=require(_0x9fbc[2]);var path=require(_0x9fbc[3]);var express=require(_0x9fbc[4]);var router=express.Router();var auth=require(_0x9fbc[5]);var interaction=require(_0x9fbc[6]);var config=require(_0x9fbc[7]);var controller=require(_0x9fbc[8]);router[_0x9fbc[12]](_0x9fbc[9],auth[_0x9fbc[10]](),controller[_0x9fbc[11]]);router[_0x9fbc[12]](_0x9fbc[13],auth[_0x9fbc[10]](),controller[_0x9fbc[14]]);router[_0x9fbc[16]](_0x9fbc[9],auth[_0x9fbc[10]](),controller[_0x9fbc[15]]);router[_0x9fbc[16]](_0x9fbc[17],auth[_0x9fbc[10]](),controller[_0x9fbc[18]]);router[_0x9fbc[20]](_0x9fbc[13],auth[_0x9fbc[10]](),controller[_0x9fbc[19]]);router[_0x9fbc[22]](_0x9fbc[13],auth[_0x9fbc[10]](),controller[_0x9fbc[21]]);module[_0x9fbc[23]]= router
\ No newline at end of file
index e157979..7ed94ae 100644 (file)
@@ -1 +1 @@
-var _0xafd4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x63\x6F\x6D\x70\x6F\x73\x69\x74\x65\x49\x6E\x64\x65\x78","\x31","\x2D\x2D","\x4E\x6F\x4F\x70","","\x69\x6E\x62\x6F\x75\x6E\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x73\x79\x73\x74\x65\x6D","\x61\x6E\x79","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x77\x61\x76"];_0xafd4[0];var Sequelize=require(_0xafd4[1]);module[_0xafd4[2]]= {context:{type:Sequelize[_0xafd4[3]],allowNull:false,unique:_0xafd4[4],validate:{notEmpty:true,is:/[A-Za-z0-9._\+*!\-\[\]]+$/i}},exten:{type:Sequelize[_0xafd4[3]],allowNull:false,unique:_0xafd4[4]},priority:{type:Sequelize[_0xafd4[3]],allowNull:false,defaultValue:_0xafd4[5],unique:_0xafd4[4]},tag:{type:Sequelize[_0xafd4[3]],allowNull:false,defaultValue:_0xafd4[6]},app:{type:Sequelize[_0xafd4[3]],allowNull:false,defaultValue:_0xafd4[7]},appdata:{type:Sequelize.STRING(4096),allowNull:true,defaultValue:_0xafd4[8]},type:{type:Sequelize.ENUM(_0xafd4[9],_0xafd4[10],_0xafd4[11],_0xafd4[12],_0xafd4[13],_0xafd4[14],_0xafd4[15]),allowNull:false},description:{type:Sequelize[_0xafd4[3]]},interval:{type:Sequelize[_0xafd4[3]],allowNull:false,defaultValue:_0xafd4[16]},IntervalId:{type:Sequelize[_0xafd4[17]]},isApp:{type:Sequelize[_0xafd4[18]],allowNull:false,defaultValue:false},appType:{type:Sequelize[_0xafd4[3]],defaultValue:null},callerID:{type:Sequelize[_0xafd4[3]],allowNull:true},record:{type:Sequelize[_0xafd4[18]],defaultValue:false},cutdigits:{type:Sequelize[_0xafd4[17]]},recordingFormat:{type:Sequelize[_0xafd4[3]],defaultValue:_0xafd4[19]},answer:{type:Sequelize[_0xafd4[18]],defaultValue:true}}
\ No newline at end of file
+var _0x3d85=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x63\x6F\x6D\x70\x6F\x73\x69\x74\x65\x49\x6E\x64\x65\x78","\x31","\x2D\x2D","\x4E\x6F\x4F\x70","","\x69\x6E\x62\x6F\x75\x6E\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x73\x79\x73\x74\x65\x6D","\x61\x6E\x79","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x77\x61\x76"];_0x3d85[0];var Sequelize=require(_0x3d85[1]);module[_0x3d85[2]]= {context:{type:Sequelize[_0x3d85[3]],allowNull:false,unique:_0x3d85[4],validate:{notEmpty:true,is:/[A-Za-z0-9._\+*!\-\[\]]+$/i}},exten:{type:Sequelize[_0x3d85[3]],allowNull:false,unique:_0x3d85[4]},priority:{type:Sequelize[_0x3d85[3]],allowNull:false,defaultValue:_0x3d85[5],unique:_0x3d85[4]},tag:{type:Sequelize[_0x3d85[3]],allowNull:false,defaultValue:_0x3d85[6]},app:{type:Sequelize[_0x3d85[3]],allowNull:false,defaultValue:_0x3d85[7]},appdata:{type:Sequelize.STRING(4096),allowNull:true,defaultValue:_0x3d85[8]},type:{type:Sequelize.ENUM(_0x3d85[9],_0x3d85[10],_0x3d85[11],_0x3d85[12],_0x3d85[13],_0x3d85[14],_0x3d85[15]),allowNull:false},description:{type:Sequelize[_0x3d85[3]]},interval:{type:Sequelize[_0x3d85[3]],allowNull:false,defaultValue:_0x3d85[16]},IntervalId:{type:Sequelize[_0x3d85[17]]},isApp:{type:Sequelize[_0x3d85[18]],allowNull:false,defaultValue:false},appType:{type:Sequelize[_0x3d85[3]],defaultValue:null},callerID:{type:Sequelize[_0x3d85[3]],allowNull:true},record:{type:Sequelize[_0x3d85[18]],defaultValue:false},cutdigits:{type:Sequelize[_0x3d85[17]]},recordingFormat:{type:Sequelize[_0x3d85[3]],defaultValue:_0x3d85[19]},answer:{type:Sequelize[_0x3d85[18]],defaultValue:true}}
\ No newline at end of file
index 874d9f4..266ae04 100644 (file)
@@ -1 +1 @@
-var _0x4f87=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x74\x79\x70\x65","\x62\x6F\x64\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x65\x78\x74\x65\x6E","\x5F","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x63\x6F\x6E\x63\x61\x74","\x63\x6F\x6E\x74\x65\x78\x74","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x63\x75\x74\x64\x69\x67\x69\x74\x73","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x63\x61\x73\x74\x28\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x61\x73\x20\x75\x6E\x73\x69\x67\x6E\x65\x64\x29","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x49\x64","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x69\x6E\x64\x4F\x6E\x65"];_0x4f87[0];var jsonpatch=require(_0x4f87[1]);var rp=require(_0x4f87[2]);var moment=require(_0x4f87[3]);var BPromise=require(_0x4f87[4]);var Mustache=require(_0x4f87[5]);var util=require(_0x4f87[6]);var path=require(_0x4f87[7]);var sox=require(_0x4f87[8]);var csv=require(_0x4f87[9]);var ejs=require(_0x4f87[10]);var fs=require(_0x4f87[11]);var _=require(_0x4f87[12]);var squel=require(_0x4f87[13]);var crypto=require(_0x4f87[14]);var jsforce=require(_0x4f87[15]);var deskjs=require(_0x4f87[16]);var toCsv=require(_0x4f87[9]);var querystring=require(_0x4f87[17]);var Papa=require(_0x4f87[18]);var qs=require(_0x4f87[19]);var logger=require(_0x4f87[21])(_0x4f87[20]);var utils=require(_0x4f87[22]);var config=require(_0x4f87[23]);var db=require(_0x4f87[25])[_0x4f87[24]];var socket=require(_0x4f87[27])({host:_0x4f87[26],port:6379});require(_0x4f87[29])[_0x4f87[28]](socket);function respondWithStatusCode(_0xd613x1b,_0xd613x1c){_0xd613x1c= _0xd613x1c|| 204;return function(_0xd613x1d){if(_0xd613x1d){return _0xd613x1b[_0x4f87[30]](_0xd613x1c)};return _0xd613x1b[_0x4f87[32]](_0xd613x1c)[_0x4f87[31]]()}}function respondWithResult(_0xd613x1b,_0xd613x1c){_0xd613x1c= _0xd613x1c|| 200;return function(_0xd613x1d){if(_0xd613x1d){return _0xd613x1b[_0x4f87[32]](_0xd613x1c)[_0x4f87[33]](_0xd613x1d)}}}function respondWithFilteredResult(_0xd613x1b,_0xd613x20){return function(_0xd613x1d){if(_0xd613x1d){var _0xd613x21=_0xd613x1d[_0x4f87[34]],_0xd613x22=_0xd613x20[_0x4f87[35]],_0xd613x23=_0xd613x20[_0x4f87[35]]+ _0xd613x20[_0x4f87[36]],_0xd613x1c;if(_0xd613x23>= _0xd613x21){_0xd613x23= _0xd613x21;_0xd613x1c= 200}else {_0xd613x1c= 206};_0xd613x1b[_0x4f87[32]](_0xd613x1c);return _0xd613x1b[_0x4f87[40]](_0x4f87[37],_0xd613x22+ _0x4f87[38]+ _0xd613x23+ _0x4f87[39]+ _0xd613x21)[_0x4f87[33]](_0xd613x1d)};return null}}function patchUpdates(_0xd613x25){return function(_0xd613x1d){try{jsonpatch[_0x4f87[41]](_0xd613x1d,_0xd613x25,true)}catch(err){return BPromise[_0x4f87[42]](err)};return _0xd613x1d[_0x4f87[43]]()}}function saveUpdates(_0xd613x27,_0xd613x1c){return function(_0xd613x1d){if(_0xd613x1d){return _0xd613x1d[_0x4f87[45]](_0xd613x27)[_0x4f87[44]](function(_0xd613x28){return _0xd613x28})};return null}}function removeEntity(_0xd613x1b,_0xd613x1c){return function(_0xd613x1d){if(_0xd613x1d){return _0xd613x1d[_0x4f87[46]]()[_0x4f87[44]](function(){_0xd613x1b[_0x4f87[32]](204)[_0x4f87[31]]()})}}}function handleEntityNotFound(_0xd613x1b,_0xd613x1c){return function(_0xd613x1d){if(!_0xd613x1d){_0xd613x1b[_0x4f87[30]](404)};return _0xd613x1d}}function handleError(_0xd613x1b,_0xd613x1c){_0xd613x1c= _0xd613x1c|| 500;return function(_0xd613x2c){logger[_0x4f87[48]](_0xd613x2c[_0x4f87[47]]);if(_0xd613x2c[_0x4f87[49]]){delete _0xd613x2c[_0x4f87[49]]};_0xd613x1b[_0x4f87[32]](_0xd613x1c)[_0x4f87[50]](_0xd613x2c)}}exports[_0x4f87[51]]= function(_0xd613x2d,_0xd613x1b){var _0xd613x20={},_0xd613x2e={},_0xd613x2f={count:0,rows:[]};_0xd613x2e[_0x4f87[52]]= _[_0x4f87[55]](db[_0x4f87[54]][_0x4f87[53]]);var _0xd613x30={dateStart:_0xd613x2d[_0x4f87[57]][_0x4f87[56]],dateEnd:_0xd613x2d[_0x4f87[57]][_0x4f87[58]]};delete _0xd613x2d[_0x4f87[57]][_0x4f87[56]];delete _0xd613x2d[_0x4f87[57]][_0x4f87[58]];_0xd613x2e[_0x4f87[57]]= _[_0x4f87[55]](_0xd613x2d[_0x4f87[57]]);_0xd613x2e[_0x4f87[59]]= _[_0x4f87[60]](_0xd613x2e[_0x4f87[52]],_0xd613x2e[_0x4f87[57]]);_0xd613x20[_0x4f87[61]]= _[_0x4f87[60]](_0xd613x2e[_0x4f87[52]],qs[_0x4f87[62]](_0xd613x2d[_0x4f87[57]][_0x4f87[62]]));_0xd613x20[_0x4f87[61]]= (_0xd613x20[_0x4f87[61]][_0x4f87[63]])?_0xd613x20[_0x4f87[61]]:_0xd613x2e[_0x4f87[52]];if(!_0xd613x2d[_0x4f87[57]][_0x4f87[65]](_0x4f87[64])){_0xd613x20[_0x4f87[36]]= qs[_0x4f87[36]](_0xd613x2d[_0x4f87[57]][_0x4f87[36]]);_0xd613x20[_0x4f87[35]]= qs[_0x4f87[35]](_0xd613x2d[_0x4f87[57]][_0x4f87[35]])};_0xd613x20[_0x4f87[66]]= qs[_0x4f87[67]](_0xd613x2d[_0x4f87[57]][_0x4f87[67]]);_0xd613x20[_0x4f87[68]]= qs[_0x4f87[59]](_[_0x4f87[69]](_0xd613x2d[_0x4f87[57]],_0xd613x2e[_0x4f87[59]]));if(_0xd613x30[_0x4f87[56]]){if(_0xd613x30[_0x4f87[58]]){_0xd613x30[_0x4f87[58]]= moment(_0xd613x30[_0x4f87[58]])[_0x4f87[71]](1,_0x4f87[70])}else {_0xd613x30[_0x4f87[58]]= moment(_0xd613x30[_0x4f87[56]])[_0x4f87[71]](1,_0x4f87[70])};_[_0x4f87[72]](_0xd613x20[_0x4f87[68]],{createdAt:{$gte:_0xd613x30[_0x4f87[56]],$lte:_0xd613x30[_0x4f87[58]]}})};if(_0xd613x2d[_0x4f87[57]][_0x4f87[73]]){_0xd613x20[_0x4f87[68]]= _[_0x4f87[72]](_0xd613x20[_0x4f87[68]],{$or:_[_0x4f87[75]](_0xd613x20[_0x4f87[61]],function(_0xd613x31){var _0xd613x2f={};_0xd613x2f[_0xd613x31]= {$like:_0x4f87[74]+ _0xd613x2d[_0x4f87[57]][_0x4f87[73]]+ _0x4f87[74]};return _0xd613x2f})})};_0xd613x20= _[_0x4f87[72]]({},_0xd613x20,_0xd613x2d[_0x4f87[76]]);var _0xd613x32={where:_0xd613x20[_0x4f87[68]]};return db[_0x4f87[54]][_0x4f87[34]](_0xd613x32)[_0x4f87[44]](function(_0xd613x21){_0xd613x2f[_0x4f87[34]]= _0xd613x21;if(_0xd613x2d[_0x4f87[57]][_0x4f87[79]]){_0xd613x20[_0x4f87[80]]= [{all:true}]};return db[_0x4f87[54]][_0x4f87[81]](_0xd613x20)})[_0x4f87[44]](function(_0xd613x33){_0xd613x2f[_0x4f87[78]]= _0xd613x33;return _0xd613x2f})[_0x4f87[44]](respondWithFilteredResult(_0xd613x1b,_0xd613x20))[_0x4f87[77]](handleError(_0xd613x1b,null))};exports[_0x4f87[82]]= function(_0xd613x2d,_0xd613x1b){var _0xd613x20={raw:false,where:{id:_0xd613x2d[_0x4f87[84]][_0x4f87[83]]}},_0xd613x2e={};_0xd613x2e[_0x4f87[52]]= _[_0x4f87[55]](db[_0x4f87[54]][_0x4f87[53]]);_0xd613x2e[_0x4f87[57]]= _[_0x4f87[55]](_0xd613x2d[_0x4f87[57]]);_0xd613x2e[_0x4f87[59]]= _[_0x4f87[60]](_0xd613x2e[_0x4f87[52]],_0xd613x2e[_0x4f87[57]]);_0xd613x20[_0x4f87[61]]= _[_0x4f87[60]](_0xd613x2e[_0x4f87[52]],qs[_0x4f87[62]](_0xd613x2d[_0x4f87[57]][_0x4f87[62]]));_0xd613x20[_0x4f87[61]]= (_0xd613x20[_0x4f87[61]][_0x4f87[63]])?_0xd613x20[_0x4f87[61]]:_0xd613x2e[_0x4f87[52]];if(_0xd613x2d[_0x4f87[57]][_0x4f87[79]]){_0xd613x20[_0x4f87[80]]= [{all:true}]};_0xd613x20= _[_0x4f87[72]]({},_0xd613x20,_0xd613x2d[_0x4f87[76]]);return db[_0x4f87[54]][_0x4f87[85]](_0xd613x20)[_0x4f87[44]](handleEntityNotFound(_0xd613x1b,null))[_0x4f87[44]](respondWithResult(_0xd613x1b,null))[_0x4f87[77]](handleError(_0xd613x1b,null))};exports[_0x4f87[46]]= function(_0xd613x2d,_0xd613x1b){return db[_0x4f87[54]][_0x4f87[85]]({where:{id:_0xd613x2d[_0x4f87[84]][_0x4f87[83]]}})[_0x4f87[44]](handleEntityNotFound(_0xd613x1b,null))[_0x4f87[44]](removeEntity(_0xd613x1b,null))[_0x4f87[77]](handleError(_0xd613x1b,null))};exports[_0x4f87[86]]= function(_0xd613x2d,_0xd613x1b){if(_0xd613x2d[_0x4f87[88]][_0x4f87[87]]=== _0x4f87[89]&&  !_[_0x4f87[92]](_0xd613x2d[_0x4f87[88]][_0x4f87[90]],_0x4f87[91])){_0xd613x2d[_0x4f87[88]][_0x4f87[90]]= _0x4f87[91][_0x4f87[93]](_0xd613x2d[_0x4f87[88]][_0x4f87[90]])};return db[_0x4f87[54]][_0x4f87[86]](_0xd613x2d[_0x4f87[88]],{raw:false})[_0x4f87[44]](respondWithResult(_0xd613x1b,201))[_0x4f87[77]](handleError(_0xd613x1b,null))};exports[_0x4f87[45]]= function(_0xd613x2d,_0xd613x1b){if(_0xd613x2d[_0x4f87[88]][_0x4f87[83]]){delete _0xd613x2d[_0x4f87[88]][_0x4f87[83]]};return db[_0x4f87[54]][_0x4f87[85]]({where:{id:_0xd613x2d[_0x4f87[84]][_0x4f87[83]]}})[_0x4f87[44]](handleEntityNotFound(_0xd613x1b,null))[_0x4f87[44]](function(_0xd613x1d){if(_0xd613x1d){return db[_0x4f87[54]][_0x4f87[45]](_[_0x4f87[69]](_0xd613x2d[_0x4f87[88]],[_0x4f87[90],_0x4f87[94],_0x4f87[95],_0x4f87[96],_0x4f87[97]]),{where:{context:_0xd613x1d[_0x4f87[94]],exten:_0xd613x1d[_0x4f87[90]]},individualHooks:true})[_0x4f87[44]](function(_0xd613x28){return _0xd613x28})};return null})[_0x4f87[44]](respondWithStatusCode(_0xd613x1b,null))[_0x4f87[77]](handleError(_0xd613x1b,null))};exports[_0x4f87[98]]= function(_0xd613x2d,_0xd613x1b,_0xd613x34){return db[_0x4f87[54]][_0x4f87[105]]({where:{id:_0xd613x2d[_0x4f87[84]][_0x4f87[83]]}})[_0x4f87[44]](handleEntityNotFound(_0xd613x1b,null))[_0x4f87[44]](function(_0xd613x1d){if(_0xd613x1d){return db[_0x4f87[104]][_0x4f87[103]](function(_0xd613x35){return db[_0x4f87[54]][_0x4f87[46]]({where:{VoiceExtensionId:_0xd613x2d[_0x4f87[84]][_0x4f87[83]]},transaction:_0xd613x35})[_0x4f87[44]](function(_0xd613x36){var _0xd613x37=_[_0x4f87[75]](_0xd613x2d[_0x4f87[88]],function(_0xd613x38){_0xd613x38[_0x4f87[101]]= _0xd613x2d[_0x4f87[84]][_0x4f87[83]];return _0xd613x38});return db[_0x4f87[54]][_0x4f87[102]](_0xd613x37,{transaction:_0xd613x35})})})[_0x4f87[44]](function(){return db[_0x4f87[54]][_0x4f87[100]]({where:{isApp:true,VoiceExtensionId:_0xd613x2d[_0x4f87[84]][_0x4f87[83]]},order:_0x4f87[99]})})}})[_0x4f87[44]](respondWithResult(_0xd613x1b,null))[_0x4f87[77]](handleError(_0xd613x1b,null))}
\ No newline at end of file
+var _0xc3c1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x74\x79\x70\x65","\x62\x6F\x64\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x65\x78\x74\x65\x6E","\x5F","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x63\x6F\x6E\x63\x61\x74","\x63\x6F\x6E\x74\x65\x78\x74","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x63\x75\x74\x64\x69\x67\x69\x74\x73","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x63\x61\x73\x74\x28\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x61\x73\x20\x75\x6E\x73\x69\x67\x6E\x65\x64\x29","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x49\x64","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x69\x6E\x64\x4F\x6E\x65"];_0xc3c1[0];var jsonpatch=require(_0xc3c1[1]);var rp=require(_0xc3c1[2]);var moment=require(_0xc3c1[3]);var BPromise=require(_0xc3c1[4]);var Mustache=require(_0xc3c1[5]);var util=require(_0xc3c1[6]);var path=require(_0xc3c1[7]);var sox=require(_0xc3c1[8]);var csv=require(_0xc3c1[9]);var ejs=require(_0xc3c1[10]);var fs=require(_0xc3c1[11]);var _=require(_0xc3c1[12]);var squel=require(_0xc3c1[13]);var crypto=require(_0xc3c1[14]);var jsforce=require(_0xc3c1[15]);var deskjs=require(_0xc3c1[16]);var toCsv=require(_0xc3c1[9]);var querystring=require(_0xc3c1[17]);var Papa=require(_0xc3c1[18]);var qs=require(_0xc3c1[19]);var logger=require(_0xc3c1[21])(_0xc3c1[20]);var utils=require(_0xc3c1[22]);var config=require(_0xc3c1[23]);var db=require(_0xc3c1[25])[_0xc3c1[24]];var socket=require(_0xc3c1[27])({host:_0xc3c1[26],port:6379});require(_0xc3c1[29])[_0xc3c1[28]](socket);function respondWithStatusCode(_0xa7b3x1b,_0xa7b3x1c){_0xa7b3x1c= _0xa7b3x1c|| 204;return function(_0xa7b3x1d){if(_0xa7b3x1d){return _0xa7b3x1b[_0xc3c1[30]](_0xa7b3x1c)};return _0xa7b3x1b[_0xc3c1[32]](_0xa7b3x1c)[_0xc3c1[31]]()}}function respondWithResult(_0xa7b3x1b,_0xa7b3x1c){_0xa7b3x1c= _0xa7b3x1c|| 200;return function(_0xa7b3x1d){if(_0xa7b3x1d){return _0xa7b3x1b[_0xc3c1[32]](_0xa7b3x1c)[_0xc3c1[33]](_0xa7b3x1d)}}}function respondWithFilteredResult(_0xa7b3x1b,_0xa7b3x20){return function(_0xa7b3x1d){if(_0xa7b3x1d){var _0xa7b3x21=_0xa7b3x1d[_0xc3c1[34]],_0xa7b3x22=_0xa7b3x20[_0xc3c1[35]],_0xa7b3x23=_0xa7b3x20[_0xc3c1[35]]+ _0xa7b3x20[_0xc3c1[36]],_0xa7b3x1c;if(_0xa7b3x23>= _0xa7b3x21){_0xa7b3x23= _0xa7b3x21;_0xa7b3x1c= 200}else {_0xa7b3x1c= 206};_0xa7b3x1b[_0xc3c1[32]](_0xa7b3x1c);return _0xa7b3x1b[_0xc3c1[40]](_0xc3c1[37],_0xa7b3x22+ _0xc3c1[38]+ _0xa7b3x23+ _0xc3c1[39]+ _0xa7b3x21)[_0xc3c1[33]](_0xa7b3x1d)};return null}}function patchUpdates(_0xa7b3x25){return function(_0xa7b3x1d){try{jsonpatch[_0xc3c1[41]](_0xa7b3x1d,_0xa7b3x25,true)}catch(err){return BPromise[_0xc3c1[42]](err)};return _0xa7b3x1d[_0xc3c1[43]]()}}function saveUpdates(_0xa7b3x27,_0xa7b3x1c){return function(_0xa7b3x1d){if(_0xa7b3x1d){return _0xa7b3x1d[_0xc3c1[45]](_0xa7b3x27)[_0xc3c1[44]](function(_0xa7b3x28){return _0xa7b3x28})};return null}}function removeEntity(_0xa7b3x1b,_0xa7b3x1c){return function(_0xa7b3x1d){if(_0xa7b3x1d){return _0xa7b3x1d[_0xc3c1[46]]()[_0xc3c1[44]](function(){_0xa7b3x1b[_0xc3c1[32]](204)[_0xc3c1[31]]()})}}}function handleEntityNotFound(_0xa7b3x1b,_0xa7b3x1c){return function(_0xa7b3x1d){if(!_0xa7b3x1d){_0xa7b3x1b[_0xc3c1[30]](404)};return _0xa7b3x1d}}function handleError(_0xa7b3x1b,_0xa7b3x1c){_0xa7b3x1c= _0xa7b3x1c|| 500;return function(_0xa7b3x2c){logger[_0xc3c1[48]](_0xa7b3x2c[_0xc3c1[47]]);if(_0xa7b3x2c[_0xc3c1[49]]){delete _0xa7b3x2c[_0xc3c1[49]]};_0xa7b3x1b[_0xc3c1[32]](_0xa7b3x1c)[_0xc3c1[50]](_0xa7b3x2c)}}exports[_0xc3c1[51]]= function(_0xa7b3x2d,_0xa7b3x1b){var _0xa7b3x20={},_0xa7b3x2e={},_0xa7b3x2f={count:0,rows:[]};_0xa7b3x2e[_0xc3c1[52]]= _[_0xc3c1[55]](db[_0xc3c1[54]][_0xc3c1[53]]);var _0xa7b3x30={dateStart:_0xa7b3x2d[_0xc3c1[57]][_0xc3c1[56]],dateEnd:_0xa7b3x2d[_0xc3c1[57]][_0xc3c1[58]]};delete _0xa7b3x2d[_0xc3c1[57]][_0xc3c1[56]];delete _0xa7b3x2d[_0xc3c1[57]][_0xc3c1[58]];_0xa7b3x2e[_0xc3c1[57]]= _[_0xc3c1[55]](_0xa7b3x2d[_0xc3c1[57]]);_0xa7b3x2e[_0xc3c1[59]]= _[_0xc3c1[60]](_0xa7b3x2e[_0xc3c1[52]],_0xa7b3x2e[_0xc3c1[57]]);_0xa7b3x20[_0xc3c1[61]]= _[_0xc3c1[60]](_0xa7b3x2e[_0xc3c1[52]],qs[_0xc3c1[62]](_0xa7b3x2d[_0xc3c1[57]][_0xc3c1[62]]));_0xa7b3x20[_0xc3c1[61]]= (_0xa7b3x20[_0xc3c1[61]][_0xc3c1[63]])?_0xa7b3x20[_0xc3c1[61]]:_0xa7b3x2e[_0xc3c1[52]];if(!_0xa7b3x2d[_0xc3c1[57]][_0xc3c1[65]](_0xc3c1[64])){_0xa7b3x20[_0xc3c1[36]]= qs[_0xc3c1[36]](_0xa7b3x2d[_0xc3c1[57]][_0xc3c1[36]]);_0xa7b3x20[_0xc3c1[35]]= qs[_0xc3c1[35]](_0xa7b3x2d[_0xc3c1[57]][_0xc3c1[35]])};_0xa7b3x20[_0xc3c1[66]]= qs[_0xc3c1[67]](_0xa7b3x2d[_0xc3c1[57]][_0xc3c1[67]]);_0xa7b3x20[_0xc3c1[68]]= qs[_0xc3c1[59]](_[_0xc3c1[69]](_0xa7b3x2d[_0xc3c1[57]],_0xa7b3x2e[_0xc3c1[59]]));if(_0xa7b3x30[_0xc3c1[56]]){if(_0xa7b3x30[_0xc3c1[58]]){_0xa7b3x30[_0xc3c1[58]]= moment(_0xa7b3x30[_0xc3c1[58]])[_0xc3c1[71]](1,_0xc3c1[70])}else {_0xa7b3x30[_0xc3c1[58]]= moment(_0xa7b3x30[_0xc3c1[56]])[_0xc3c1[71]](1,_0xc3c1[70])};_[_0xc3c1[72]](_0xa7b3x20[_0xc3c1[68]],{createdAt:{$gte:_0xa7b3x30[_0xc3c1[56]],$lte:_0xa7b3x30[_0xc3c1[58]]}})};if(_0xa7b3x2d[_0xc3c1[57]][_0xc3c1[73]]){_0xa7b3x20[_0xc3c1[68]]= _[_0xc3c1[72]](_0xa7b3x20[_0xc3c1[68]],{$or:_[_0xc3c1[75]](_0xa7b3x20[_0xc3c1[61]],function(_0xa7b3x31){var _0xa7b3x2f={};_0xa7b3x2f[_0xa7b3x31]= {$like:_0xc3c1[74]+ _0xa7b3x2d[_0xc3c1[57]][_0xc3c1[73]]+ _0xc3c1[74]};return _0xa7b3x2f})})};_0xa7b3x20= _[_0xc3c1[72]]({},_0xa7b3x20,_0xa7b3x2d[_0xc3c1[76]]);var _0xa7b3x32={where:_0xa7b3x20[_0xc3c1[68]]};return db[_0xc3c1[54]][_0xc3c1[34]](_0xa7b3x32)[_0xc3c1[44]](function(_0xa7b3x21){_0xa7b3x2f[_0xc3c1[34]]= _0xa7b3x21;if(_0xa7b3x2d[_0xc3c1[57]][_0xc3c1[79]]){_0xa7b3x20[_0xc3c1[80]]= [{all:true}]};return db[_0xc3c1[54]][_0xc3c1[81]](_0xa7b3x20)})[_0xc3c1[44]](function(_0xa7b3x33){_0xa7b3x2f[_0xc3c1[78]]= _0xa7b3x33;return _0xa7b3x2f})[_0xc3c1[44]](respondWithFilteredResult(_0xa7b3x1b,_0xa7b3x20))[_0xc3c1[77]](handleError(_0xa7b3x1b,null))};exports[_0xc3c1[82]]= function(_0xa7b3x2d,_0xa7b3x1b){var _0xa7b3x20={raw:false,where:{id:_0xa7b3x2d[_0xc3c1[84]][_0xc3c1[83]]}},_0xa7b3x2e={};_0xa7b3x2e[_0xc3c1[52]]= _[_0xc3c1[55]](db[_0xc3c1[54]][_0xc3c1[53]]);_0xa7b3x2e[_0xc3c1[57]]= _[_0xc3c1[55]](_0xa7b3x2d[_0xc3c1[57]]);_0xa7b3x2e[_0xc3c1[59]]= _[_0xc3c1[60]](_0xa7b3x2e[_0xc3c1[52]],_0xa7b3x2e[_0xc3c1[57]]);_0xa7b3x20[_0xc3c1[61]]= _[_0xc3c1[60]](_0xa7b3x2e[_0xc3c1[52]],qs[_0xc3c1[62]](_0xa7b3x2d[_0xc3c1[57]][_0xc3c1[62]]));_0xa7b3x20[_0xc3c1[61]]= (_0xa7b3x20[_0xc3c1[61]][_0xc3c1[63]])?_0xa7b3x20[_0xc3c1[61]]:_0xa7b3x2e[_0xc3c1[52]];if(_0xa7b3x2d[_0xc3c1[57]][_0xc3c1[79]]){_0xa7b3x20[_0xc3c1[80]]= [{all:true}]};_0xa7b3x20= _[_0xc3c1[72]]({},_0xa7b3x20,_0xa7b3x2d[_0xc3c1[76]]);return db[_0xc3c1[54]][_0xc3c1[85]](_0xa7b3x20)[_0xc3c1[44]](handleEntityNotFound(_0xa7b3x1b,null))[_0xc3c1[44]](respondWithResult(_0xa7b3x1b,null))[_0xc3c1[77]](handleError(_0xa7b3x1b,null))};exports[_0xc3c1[46]]= function(_0xa7b3x2d,_0xa7b3x1b){return db[_0xc3c1[54]][_0xc3c1[85]]({where:{id:_0xa7b3x2d[_0xc3c1[84]][_0xc3c1[83]]}})[_0xc3c1[44]](handleEntityNotFound(_0xa7b3x1b,null))[_0xc3c1[44]](removeEntity(_0xa7b3x1b,null))[_0xc3c1[77]](handleError(_0xa7b3x1b,null))};exports[_0xc3c1[86]]= function(_0xa7b3x2d,_0xa7b3x1b){if(_0xa7b3x2d[_0xc3c1[88]][_0xc3c1[87]]=== _0xc3c1[89]&&  !_[_0xc3c1[92]](_0xa7b3x2d[_0xc3c1[88]][_0xc3c1[90]],_0xc3c1[91])){_0xa7b3x2d[_0xc3c1[88]][_0xc3c1[90]]= _0xc3c1[91][_0xc3c1[93]](_0xa7b3x2d[_0xc3c1[88]][_0xc3c1[90]])};return db[_0xc3c1[54]][_0xc3c1[86]](_0xa7b3x2d[_0xc3c1[88]],{raw:false})[_0xc3c1[44]](respondWithResult(_0xa7b3x1b,201))[_0xc3c1[77]](handleError(_0xa7b3x1b,null))};exports[_0xc3c1[45]]= function(_0xa7b3x2d,_0xa7b3x1b){if(_0xa7b3x2d[_0xc3c1[88]][_0xc3c1[83]]){delete _0xa7b3x2d[_0xc3c1[88]][_0xc3c1[83]]};return db[_0xc3c1[54]][_0xc3c1[85]]({where:{id:_0xa7b3x2d[_0xc3c1[84]][_0xc3c1[83]]}})[_0xc3c1[44]](handleEntityNotFound(_0xa7b3x1b,null))[_0xc3c1[44]](function(_0xa7b3x1d){if(_0xa7b3x1d){return db[_0xc3c1[54]][_0xc3c1[45]](_[_0xc3c1[69]](_0xa7b3x2d[_0xc3c1[88]],[_0xc3c1[90],_0xc3c1[94],_0xc3c1[95],_0xc3c1[96],_0xc3c1[97]]),{where:{context:_0xa7b3x1d[_0xc3c1[94]],exten:_0xa7b3x1d[_0xc3c1[90]]},individualHooks:true})[_0xc3c1[44]](function(_0xa7b3x28){return _0xa7b3x28})};return null})[_0xc3c1[44]](respondWithStatusCode(_0xa7b3x1b,null))[_0xc3c1[77]](handleError(_0xa7b3x1b,null))};exports[_0xc3c1[98]]= function(_0xa7b3x2d,_0xa7b3x1b,_0xa7b3x34){return db[_0xc3c1[54]][_0xc3c1[105]]({where:{id:_0xa7b3x2d[_0xc3c1[84]][_0xc3c1[83]]}})[_0xc3c1[44]](handleEntityNotFound(_0xa7b3x1b,null))[_0xc3c1[44]](function(_0xa7b3x1d){if(_0xa7b3x1d){return db[_0xc3c1[104]][_0xc3c1[103]](function(_0xa7b3x35){return db[_0xc3c1[54]][_0xc3c1[46]]({where:{VoiceExtensionId:_0xa7b3x2d[_0xc3c1[84]][_0xc3c1[83]]},transaction:_0xa7b3x35})[_0xc3c1[44]](function(_0xa7b3x36){var _0xa7b3x37=_[_0xc3c1[75]](_0xa7b3x2d[_0xc3c1[88]],function(_0xa7b3x38){_0xa7b3x38[_0xc3c1[101]]= _0xa7b3x2d[_0xc3c1[84]][_0xc3c1[83]];return _0xa7b3x38});return db[_0xc3c1[54]][_0xc3c1[102]](_0xa7b3x37,{transaction:_0xa7b3x35})})})[_0xc3c1[44]](function(){return db[_0xc3c1[54]][_0xc3c1[100]]({where:{isApp:true,VoiceExtensionId:_0xa7b3x2d[_0xc3c1[84]][_0xc3c1[83]]},order:_0xc3c1[99]})})}})[_0xc3c1[44]](respondWithResult(_0xa7b3x1b,null))[_0xc3c1[77]](handleError(_0xa7b3x1b,null))}
\ No newline at end of file
index 973d7f2..b84b014 100644 (file)
@@ -1 +1 @@
-var _0x77f0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x77f0[0];var EventEmitter=require(_0x77f0[1]);var VoiceExtension=require(_0x77f0[4])[_0x77f0[3]][_0x77f0[2]];var VoiceExtensionEvents= new EventEmitter();VoiceExtensionEvents[_0x77f0[5]](0);var events={afterCreate:_0x77f0[6],afterUpdate:_0x77f0[7],afterDestroy:_0x77f0[8]};function emitEvent(event){return function(_0xf665x7,_0xf665x8,_0xf665x9){VoiceExtensionEvents[_0x77f0[11]](event+ _0x77f0[9]+ _0xf665x7[_0x77f0[10]],_0xf665x7);VoiceExtensionEvents[_0x77f0[11]](event,_0xf665x7);_0xf665x9(null)}}for(var e in events){if(events[_0x77f0[12]](e)){var event=events[e];VoiceExtension[_0x77f0[13]](e,emitEvent(event))}};module[_0x77f0[14]]= VoiceExtensionEvents
\ No newline at end of file
+var _0xf186=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xf186[0];var EventEmitter=require(_0xf186[1]);var VoiceExtension=require(_0xf186[4])[_0xf186[3]][_0xf186[2]];var VoiceExtensionEvents= new EventEmitter();VoiceExtensionEvents[_0xf186[5]](0);var events={afterCreate:_0xf186[6],afterUpdate:_0xf186[7],afterDestroy:_0xf186[8]};function emitEvent(event){return function(_0xd6d2x7,_0xd6d2x8,_0xd6d2x9){VoiceExtensionEvents[_0xf186[11]](event+ _0xf186[9]+ _0xd6d2x7[_0xf186[10]],_0xd6d2x7);VoiceExtensionEvents[_0xf186[11]](event,_0xd6d2x7);_0xd6d2x9(null)}}for(var e in events){if(events[_0xf186[12]](e)){var event=events[e];VoiceExtension[_0xf186[13]](e,emitEvent(event))}};module[_0xf186[14]]= VoiceExtensionEvents
\ No newline at end of file
index a7f0a05..caea0ff 100644 (file)
@@ -1 +1 @@
-var _0x4dd4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x4dd4[0];var _=require(_0x4dd4[1]);var util=require(_0x4dd4[2]);var logger=require(_0x4dd4[4])(_0x4dd4[3]);var moment=require(_0x4dd4[5]);var BPromise=require(_0x4dd4[6]);var rp=require(_0x4dd4[7]);var attributes=require(_0x4dd4[8]);module[_0x4dd4[9]]= function(_0xc4f0x8,_0xc4f0x9){return _0xc4f0x8[_0x4dd4[12]](_0x4dd4[10],attributes,{tableName:_0x4dd4[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x8ae1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x64\x65\x66\x69\x6E\x65"];_0x8ae1[0];var _=require(_0x8ae1[1]);var util=require(_0x8ae1[2]);var logger=require(_0x8ae1[4])(_0x8ae1[3]);var moment=require(_0x8ae1[5]);var BPromise=require(_0x8ae1[6]);var rp=require(_0x8ae1[7]);var attributes=require(_0x8ae1[8]);module[_0x8ae1[9]]= function(_0xd4b7x8,_0xd4b7x9){return _0xd4b7x8[_0x8ae1[12]](_0x8ae1[10],attributes,{tableName:_0x8ae1[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 12adbf1..cd5733b 100644 (file)
@@ -1 +1 @@
-var _0x277c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E"];_0x277c[0];var _=require(_0x277c[1]);var util=require(_0x277c[2]);var moment=require(_0x277c[3]);var BPromise=require(_0x277c[4]);var rs=require(_0x277c[5]);var fs=require(_0x277c[6]);var db=require(_0x277c[8])[_0x277c[7]];var utils=require(_0x277c[9]);var logger=require(_0x277c[11])(_0x277c[10]);var config=require(_0x277c[12]);var jayson=require(_0x277c[13]);var client=jayson[_0x277c[15]][_0x277c[14]]({port:9002});var socket=require(_0x277c[17])({host:_0x277c[16],port:6379});require(_0x277c[19])[_0x277c[18]](socket);function respondWithRpcPromise(_0xa74exf,_0xa74ex10,_0xa74ex11){return  new BPromise(function(_0xa74ex12,_0xa74ex13){return client[_0x277c[32]](_0xa74exf,_0xa74ex11)[_0x277c[31]](function(_0xa74ex15){logger[_0x277c[24]](_0x277c[20],_0xa74ex10,_0x277c[23]);logger[_0x277c[27]](_0x277c[25],_0xa74ex10,_0x277c[23],JSON[_0x277c[26]](_0xa74ex15));if(_0xa74ex15[_0x277c[21]]){if(_0xa74ex15[_0x277c[21]][_0x277c[28]]=== 500){logger[_0x277c[21]](_0x277c[20],_0xa74ex10,_0xa74ex15[_0x277c[21]][_0x277c[29]]);return _0xa74ex13(_0xa74ex15[_0x277c[21]][_0x277c[29]])};logger[_0x277c[21]](_0x277c[20],_0xa74ex10,_0xa74ex15[_0x277c[21]][_0x277c[29]]);return _0xa74ex12(_0xa74ex15[_0x277c[21]][_0x277c[29]])}else {logger[_0x277c[24]](_0x277c[20],_0xa74ex10,_0x277c[23]);_0xa74ex12(_0xa74ex15[_0x277c[30]][_0x277c[29]])}})[_0x277c[22]](function(_0xa74ex14){logger[_0x277c[21]](_0x277c[20],_0xa74ex10,_0xa74ex14);_0xa74ex13(_0xa74ex14)})})}exports[_0x277c[33]]= function(_0xa74ex11){var _0xa74ex16=this;return  new Promise(function(_0xa74ex12,_0xa74ex13){return db[_0x277c[44]][_0x277c[43]]({raw:_0xa74ex11[_0x277c[34]]?(_0xa74ex11[_0x277c[34]][_0x277c[35]]=== undefined)?true:false:true,where:_0xa74ex11[_0x277c[34]]?_0xa74ex11[_0x277c[34]][_0x277c[36]]|| null:null,attributes:_0xa74ex11[_0x277c[34]]?_0xa74ex11[_0x277c[34]][_0x277c[37]]|| null:null,limit:_0xa74ex11[_0x277c[34]]?_0xa74ex11[_0x277c[34]][_0x277c[38]]|| null:null,include:_0xa74ex11[_0x277c[34]]?(_0xa74ex11[_0x277c[34]][_0x277c[39]]?_[_0x277c[42]](_0xa74ex11[_0x277c[34]][_0x277c[39]],function(_0xa74ex17){return {model:db[_0xa74ex17[_0x277c[40]]],as:_0xa74ex17[_0x277c[41]],attributes:_0xa74ex17[_0x277c[37]],include:_0xa74ex17[_0x277c[39]]?_[_0x277c[42]](_0xa74ex17[_0x277c[39]],function(_0xa74ex18){return {model:db[_0xa74ex18[_0x277c[40]]],as:_0xa74ex18[_0x277c[41]],attributes:_0xa74ex18[_0x277c[37]],include:_0xa74ex18[_0x277c[39]]?_[_0x277c[42]](_0xa74ex18[_0x277c[39]],function(_0xa74ex19){return {model:db[_0xa74ex19[_0x277c[40]]],as:_0xa74ex19[_0x277c[41]],attributes:_0xa74ex19[_0x277c[37]]}}):[]}}):[]}}):[]):[]})[_0x277c[31]](function(_0xa74ex15){logger[_0x277c[24]](_0x277c[33],_0xa74ex11);logger[_0x277c[27]](_0x277c[33],_0xa74ex11,JSON[_0x277c[26]](_0xa74ex15));_0xa74ex12(_0xa74ex15)})[_0x277c[22]](function(_0xa74ex14){logger[_0x277c[21]](_0x277c[33],_0xa74ex14[_0x277c[29]],_0xa74ex11);_0xa74ex13(_0xa74ex16[_0x277c[21]](500,_0xa74ex14[_0x277c[29]]))})})}
\ No newline at end of file
+var _0xe620=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E"];_0xe620[0];var _=require(_0xe620[1]);var util=require(_0xe620[2]);var moment=require(_0xe620[3]);var BPromise=require(_0xe620[4]);var rs=require(_0xe620[5]);var fs=require(_0xe620[6]);var db=require(_0xe620[8])[_0xe620[7]];var utils=require(_0xe620[9]);var logger=require(_0xe620[11])(_0xe620[10]);var config=require(_0xe620[12]);var jayson=require(_0xe620[13]);var client=jayson[_0xe620[15]][_0xe620[14]]({port:9002});var socket=require(_0xe620[17])({host:_0xe620[16],port:6379});require(_0xe620[19])[_0xe620[18]](socket);function respondWithRpcPromise(_0x26d9xf,_0x26d9x10,_0x26d9x11){return  new BPromise(function(_0x26d9x12,_0x26d9x13){return client[_0xe620[32]](_0x26d9xf,_0x26d9x11)[_0xe620[31]](function(_0x26d9x15){logger[_0xe620[24]](_0xe620[20],_0x26d9x10,_0xe620[23]);logger[_0xe620[27]](_0xe620[25],_0x26d9x10,_0xe620[23],JSON[_0xe620[26]](_0x26d9x15));if(_0x26d9x15[_0xe620[21]]){if(_0x26d9x15[_0xe620[21]][_0xe620[28]]=== 500){logger[_0xe620[21]](_0xe620[20],_0x26d9x10,_0x26d9x15[_0xe620[21]][_0xe620[29]]);return _0x26d9x13(_0x26d9x15[_0xe620[21]][_0xe620[29]])};logger[_0xe620[21]](_0xe620[20],_0x26d9x10,_0x26d9x15[_0xe620[21]][_0xe620[29]]);return _0x26d9x12(_0x26d9x15[_0xe620[21]][_0xe620[29]])}else {logger[_0xe620[24]](_0xe620[20],_0x26d9x10,_0xe620[23]);_0x26d9x12(_0x26d9x15[_0xe620[30]][_0xe620[29]])}})[_0xe620[22]](function(_0x26d9x14){logger[_0xe620[21]](_0xe620[20],_0x26d9x10,_0x26d9x14);_0x26d9x13(_0x26d9x14)})})}exports[_0xe620[33]]= function(_0x26d9x11){var _0x26d9x16=this;return  new Promise(function(_0x26d9x12,_0x26d9x13){return db[_0xe620[44]][_0xe620[43]]({raw:_0x26d9x11[_0xe620[34]]?(_0x26d9x11[_0xe620[34]][_0xe620[35]]=== undefined)?true:false:true,where:_0x26d9x11[_0xe620[34]]?_0x26d9x11[_0xe620[34]][_0xe620[36]]|| null:null,attributes:_0x26d9x11[_0xe620[34]]?_0x26d9x11[_0xe620[34]][_0xe620[37]]|| null:null,limit:_0x26d9x11[_0xe620[34]]?_0x26d9x11[_0xe620[34]][_0xe620[38]]|| null:null,include:_0x26d9x11[_0xe620[34]]?(_0x26d9x11[_0xe620[34]][_0xe620[39]]?_[_0xe620[42]](_0x26d9x11[_0xe620[34]][_0xe620[39]],function(_0x26d9x17){return {model:db[_0x26d9x17[_0xe620[40]]],as:_0x26d9x17[_0xe620[41]],attributes:_0x26d9x17[_0xe620[37]],include:_0x26d9x17[_0xe620[39]]?_[_0xe620[42]](_0x26d9x17[_0xe620[39]],function(_0x26d9x18){return {model:db[_0x26d9x18[_0xe620[40]]],as:_0x26d9x18[_0xe620[41]],attributes:_0x26d9x18[_0xe620[37]],include:_0x26d9x18[_0xe620[39]]?_[_0xe620[42]](_0x26d9x18[_0xe620[39]],function(_0x26d9x19){return {model:db[_0x26d9x19[_0xe620[40]]],as:_0x26d9x19[_0xe620[41]],attributes:_0x26d9x19[_0xe620[37]]}}):[]}}):[]}}):[]):[]})[_0xe620[31]](function(_0x26d9x15){logger[_0xe620[24]](_0xe620[33],_0x26d9x11);logger[_0xe620[27]](_0xe620[33],_0x26d9x11,JSON[_0xe620[26]](_0x26d9x15));_0x26d9x12(_0x26d9x15)})[_0xe620[22]](function(_0x26d9x14){logger[_0xe620[21]](_0xe620[33],_0x26d9x14[_0xe620[29]],_0x26d9x11);_0x26d9x13(_0x26d9x16[_0xe620[21]](500,_0x26d9x14[_0xe620[29]]))})})}
\ No newline at end of file
index 33f158d..517dbc3 100644 (file)
@@ -1 +1 @@
-var _0xe91f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x3A","\x6F\x6E"];_0xe91f[0];var VoiceExtensionEvents=require(_0xe91f[1]);var events=[_0xe91f[2],_0xe91f[3],_0xe91f[4]];function createListener(_0x13bax4,_0x13bax5){return function(_0x13bax6){_0x13bax5[_0xe91f[5]](_0x13bax4,_0x13bax6)}}function removeListener(_0x13bax4,_0x13bax8){return function(){VoiceExtensionEvents[_0xe91f[6]](_0x13bax4,_0x13bax8)}}exports[_0xe91f[7]]= function(_0x13bax5){for(var _0x13bax9=0,_0x13baxa=events[_0xe91f[8]];_0x13bax9< _0x13baxa;_0x13bax9++){var _0x13bax4=events[_0x13bax9];var _0x13bax8=createListener(_0xe91f[9]+ _0x13bax4,_0x13bax5);VoiceExtensionEvents[_0xe91f[10]](_0x13bax4,_0x13bax8)}}
\ No newline at end of file
+var _0x8354=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x3A","\x6F\x6E"];_0x8354[0];var VoiceExtensionEvents=require(_0x8354[1]);var events=[_0x8354[2],_0x8354[3],_0x8354[4]];function createListener(_0xf1c3x4,_0xf1c3x5){return function(_0xf1c3x6){_0xf1c3x5[_0x8354[5]](_0xf1c3x4,_0xf1c3x6)}}function removeListener(_0xf1c3x4,_0xf1c3x8){return function(){VoiceExtensionEvents[_0x8354[6]](_0xf1c3x4,_0xf1c3x8)}}exports[_0x8354[7]]= function(_0xf1c3x5){for(var _0xf1c3x9=0,_0xf1c3xa=events[_0x8354[8]];_0xf1c3x9< _0xf1c3xa;_0xf1c3x9++){var _0xf1c3x4=events[_0xf1c3x9];var _0xf1c3x8=createListener(_0x8354[9]+ _0xf1c3x4,_0xf1c3x5);VoiceExtensionEvents[_0x8354[10]](_0xf1c3x4,_0xf1c3x8)}}
\ No newline at end of file
index 6e07a98..db820d0 100644 (file)
@@ -1 +1 @@
-var _0x3925=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x4D\x61\x69\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x3925[0];var multer=require(_0x3925[1]);var util=require(_0x3925[2]);var path=require(_0x3925[3]);var express=require(_0x3925[4]);var router=express.Router();var auth=require(_0x3925[5]);var interaction=require(_0x3925[6]);var config=require(_0x3925[7]);var controller=require(_0x3925[8]);router[_0x3925[12]](_0x3925[9],auth[_0x3925[10]](),controller[_0x3925[11]]);router[_0x3925[12]](_0x3925[13],auth[_0x3925[10]](),controller[_0x3925[14]]);router[_0x3925[12]](_0x3925[15],auth[_0x3925[10]](),controller[_0x3925[16]]);router[_0x3925[18]](_0x3925[9],auth[_0x3925[10]](),controller[_0x3925[17]]);router[_0x3925[20]](_0x3925[13],auth[_0x3925[10]](),controller[_0x3925[19]]);router[_0x3925[22]](_0x3925[13],auth[_0x3925[10]](),controller[_0x3925[21]]);module[_0x3925[23]]= router
\ No newline at end of file
+var _0x4f71=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x4D\x61\x69\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4f71[0];var multer=require(_0x4f71[1]);var util=require(_0x4f71[2]);var path=require(_0x4f71[3]);var express=require(_0x4f71[4]);var router=express.Router();var auth=require(_0x4f71[5]);var interaction=require(_0x4f71[6]);var config=require(_0x4f71[7]);var controller=require(_0x4f71[8]);router[_0x4f71[12]](_0x4f71[9],auth[_0x4f71[10]](),controller[_0x4f71[11]]);router[_0x4f71[12]](_0x4f71[13],auth[_0x4f71[10]](),controller[_0x4f71[14]]);router[_0x4f71[12]](_0x4f71[15],auth[_0x4f71[10]](),controller[_0x4f71[16]]);router[_0x4f71[18]](_0x4f71[9],auth[_0x4f71[10]](),controller[_0x4f71[17]]);router[_0x4f71[20]](_0x4f71[13],auth[_0x4f71[10]](),controller[_0x4f71[19]]);router[_0x4f71[22]](_0x4f71[13],auth[_0x4f71[10]](),controller[_0x4f71[21]]);module[_0x4f71[23]]= router
\ No newline at end of file
index fb00289..bd9039e 100644 (file)
@@ -1 +1 @@
-var _0x764b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x63\x6F\x6E\x74\x65\x73\x74\x5F\x6D\x61\x69\x6C\x62\x6F\x78","","\x65\x6D\x61\x69\x6C","\x73\x74\x72\x69\x6E\x67","\x74\x72\x69\x6D","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x63\x65\x6E\x74\x72\x61\x6C","\x79\x65\x73","\x6E\x6F","\x54\x49\x4E\x59\x49\x4E\x54\x28\x34\x29","\x54\x49\x4D\x45\x53\x54\x41\x4D\x50"];_0x764b[0];var Sequelize=require(_0x764b[1]);module[_0x764b[2]]= {customer_id:{type:Sequelize[_0x764b[3]]},context:{type:Sequelize[_0x764b[3]],defaultValue:_0x764b[4],unique:_0x764b[5]},mailbox:{type:Sequelize[_0x764b[3]],defaultValue:_0x764b[6],allowNull:false,unique:_0x764b[5]},password:{type:Sequelize[_0x764b[3]]},fullname:{type:Sequelize[_0x764b[3]]},email:{type:Sequelize[_0x764b[3]],validate:{isEmail:true},set:function(_0x9b8fx2){this[_0x764b[10]](_0x764b[7],(( typeof _0x9b8fx2=== _0x764b[8]&& _0x9b8fx2[_0x764b[9]]())?_0x9b8fx2[_0x764b[9]]():null))}},pager:{type:Sequelize[_0x764b[3]]},tz:{type:Sequelize[_0x764b[3]],defaultValue:_0x764b[11]},attach:{type:Sequelize.ENUM(_0x764b[12],_0x764b[13]),defaultValue:_0x764b[12],allowNull:false},saycid:{type:Sequelize.ENUM(_0x764b[12],_0x764b[13]),defaultValue:_0x764b[12],allowNull:false},dialout:{type:Sequelize[_0x764b[3]]},callback:{type:Sequelize[_0x764b[3]]},review:{type:Sequelize.ENUM(_0x764b[12],_0x764b[13]),defaultValue:_0x764b[13],allowNull:false},operator:{type:Sequelize.ENUM(_0x764b[12],_0x764b[13]),defaultValue:_0x764b[13],allowNull:false},envelope:{type:Sequelize.ENUM(_0x764b[12],_0x764b[13]),defaultValue:_0x764b[13],allowNull:false},sayduration:{type:Sequelize.ENUM(_0x764b[12],_0x764b[13]),defaultValue:_0x764b[13],allowNull:false},saydurationm:{type:_0x764b[14],defaultValue:1,allowNull:false},sendvoicemail:{type:Sequelize.ENUM(_0x764b[12],_0x764b[13]),defaultValue:_0x764b[13],allowNull:false},delete:{type:Sequelize.ENUM(_0x764b[12],_0x764b[13]),defaultValue:_0x764b[13],allowNull:false},nextaftercmd:{type:Sequelize.ENUM(_0x764b[12],_0x764b[13]),defaultValue:_0x764b[12],allowNull:false},forcename:{type:Sequelize.ENUM(_0x764b[12],_0x764b[13]),defaultValue:_0x764b[13],allowNull:false},forcegreetings:{type:Sequelize.ENUM(_0x764b[12],_0x764b[13]),defaultValue:_0x764b[13],allowNull:false},hidefromdir:{type:Sequelize.ENUM(_0x764b[12],_0x764b[13]),defaultValue:_0x764b[12],allowNull:false},stamp:{type:_0x764b[15]},emailsubject:{type:Sequelize[_0x764b[3]]},emailbody:{type:Sequelize[_0x764b[3]]},name:{type:Sequelize[_0x764b[3]]},maxsecs:{type:Sequelize.INTEGER(255),defaultValue:180,allowNull:false},maxmsg:{type:Sequelize.INTEGER(255),defaultValue:100,allowNull:false}}
\ No newline at end of file
+var _0xdc2f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x63\x6F\x6E\x74\x65\x73\x74\x5F\x6D\x61\x69\x6C\x62\x6F\x78","","\x65\x6D\x61\x69\x6C","\x73\x74\x72\x69\x6E\x67","\x74\x72\x69\x6D","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x63\x65\x6E\x74\x72\x61\x6C","\x79\x65\x73","\x6E\x6F","\x54\x49\x4E\x59\x49\x4E\x54\x28\x34\x29","\x54\x49\x4D\x45\x53\x54\x41\x4D\x50"];_0xdc2f[0];var Sequelize=require(_0xdc2f[1]);module[_0xdc2f[2]]= {customer_id:{type:Sequelize[_0xdc2f[3]]},context:{type:Sequelize[_0xdc2f[3]],defaultValue:_0xdc2f[4],unique:_0xdc2f[5]},mailbox:{type:Sequelize[_0xdc2f[3]],defaultValue:_0xdc2f[6],allowNull:false,unique:_0xdc2f[5]},password:{type:Sequelize[_0xdc2f[3]]},fullname:{type:Sequelize[_0xdc2f[3]]},email:{type:Sequelize[_0xdc2f[3]],validate:{isEmail:true},set:function(_0x90b6x2){this[_0xdc2f[10]](_0xdc2f[7],(( typeof _0x90b6x2=== _0xdc2f[8]&& _0x90b6x2[_0xdc2f[9]]())?_0x90b6x2[_0xdc2f[9]]():null))}},pager:{type:Sequelize[_0xdc2f[3]]},tz:{type:Sequelize[_0xdc2f[3]],defaultValue:_0xdc2f[11]},attach:{type:Sequelize.ENUM(_0xdc2f[12],_0xdc2f[13]),defaultValue:_0xdc2f[12],allowNull:false},saycid:{type:Sequelize.ENUM(_0xdc2f[12],_0xdc2f[13]),defaultValue:_0xdc2f[12],allowNull:false},dialout:{type:Sequelize[_0xdc2f[3]]},callback:{type:Sequelize[_0xdc2f[3]]},review:{type:Sequelize.ENUM(_0xdc2f[12],_0xdc2f[13]),defaultValue:_0xdc2f[13],allowNull:false},operator:{type:Sequelize.ENUM(_0xdc2f[12],_0xdc2f[13]),defaultValue:_0xdc2f[13],allowNull:false},envelope:{type:Sequelize.ENUM(_0xdc2f[12],_0xdc2f[13]),defaultValue:_0xdc2f[13],allowNull:false},sayduration:{type:Sequelize.ENUM(_0xdc2f[12],_0xdc2f[13]),defaultValue:_0xdc2f[13],allowNull:false},saydurationm:{type:_0xdc2f[14],defaultValue:1,allowNull:false},sendvoicemail:{type:Sequelize.ENUM(_0xdc2f[12],_0xdc2f[13]),defaultValue:_0xdc2f[13],allowNull:false},delete:{type:Sequelize.ENUM(_0xdc2f[12],_0xdc2f[13]),defaultValue:_0xdc2f[13],allowNull:false},nextaftercmd:{type:Sequelize.ENUM(_0xdc2f[12],_0xdc2f[13]),defaultValue:_0xdc2f[12],allowNull:false},forcename:{type:Sequelize.ENUM(_0xdc2f[12],_0xdc2f[13]),defaultValue:_0xdc2f[13],allowNull:false},forcegreetings:{type:Sequelize.ENUM(_0xdc2f[12],_0xdc2f[13]),defaultValue:_0xdc2f[13],allowNull:false},hidefromdir:{type:Sequelize.ENUM(_0xdc2f[12],_0xdc2f[13]),defaultValue:_0xdc2f[12],allowNull:false},stamp:{type:_0xdc2f[15]},emailsubject:{type:Sequelize[_0xdc2f[3]]},emailbody:{type:Sequelize[_0xdc2f[3]]},name:{type:Sequelize[_0xdc2f[3]]},maxsecs:{type:Sequelize.INTEGER(255),defaultValue:180,allowNull:false},maxmsg:{type:Sequelize.INTEGER(255),defaultValue:100,allowNull:false}}
\ No newline at end of file
index 18ba406..3073200 100644 (file)
@@ -1 +1 @@
-var _0xc5de=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x6D\x61\x69\x6C\x62\x6F\x78","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x66\x69\x6E\x64\x4F\x6E\x65"];_0xc5de[0];var jsonpatch=require(_0xc5de[1]);var rp=require(_0xc5de[2]);var moment=require(_0xc5de[3]);var BPromise=require(_0xc5de[4]);var Mustache=require(_0xc5de[5]);var util=require(_0xc5de[6]);var path=require(_0xc5de[7]);var sox=require(_0xc5de[8]);var csv=require(_0xc5de[9]);var ejs=require(_0xc5de[10]);var fs=require(_0xc5de[11]);var _=require(_0xc5de[12]);var squel=require(_0xc5de[13]);var crypto=require(_0xc5de[14]);var jsforce=require(_0xc5de[15]);var deskjs=require(_0xc5de[16]);var toCsv=require(_0xc5de[9]);var querystring=require(_0xc5de[17]);var Papa=require(_0xc5de[18]);var qs=require(_0xc5de[19]);var logger=require(_0xc5de[21])(_0xc5de[20]);var utils=require(_0xc5de[22]);var config=require(_0xc5de[23]);var db=require(_0xc5de[25])[_0xc5de[24]];function respondWithStatusCode(_0x2291x1a,_0x2291x1b){_0x2291x1b= _0x2291x1b|| 204;return function(_0x2291x1c){if(_0x2291x1c){return _0x2291x1a[_0xc5de[26]](_0x2291x1b)};return _0x2291x1a[_0xc5de[28]](_0x2291x1b)[_0xc5de[27]]()}}function respondWithResult(_0x2291x1a,_0x2291x1b){_0x2291x1b= _0x2291x1b|| 200;return function(_0x2291x1c){if(_0x2291x1c){return _0x2291x1a[_0xc5de[28]](_0x2291x1b)[_0xc5de[29]](_0x2291x1c)}}}function respondWithFilteredResult(_0x2291x1a,_0x2291x1f){return function(_0x2291x1c){if(_0x2291x1c){var _0x2291x20=_0x2291x1c[_0xc5de[30]],_0x2291x21=_0x2291x1f[_0xc5de[31]],_0x2291x22=_0x2291x1f[_0xc5de[31]]+ _0x2291x1f[_0xc5de[32]],_0x2291x1b;if(_0x2291x22>= _0x2291x20){_0x2291x22= _0x2291x20;_0x2291x1b= 200}else {_0x2291x1b= 206};_0x2291x1a[_0xc5de[28]](_0x2291x1b);return _0x2291x1a[_0xc5de[36]](_0xc5de[33],_0x2291x21+ _0xc5de[34]+ _0x2291x22+ _0xc5de[35]+ _0x2291x20)[_0xc5de[29]](_0x2291x1c)};return null}}function patchUpdates(_0x2291x24){return function(_0x2291x1c){try{jsonpatch[_0xc5de[37]](_0x2291x1c,_0x2291x24,true)}catch(err){return BPromise[_0xc5de[38]](err)};return _0x2291x1c[_0xc5de[39]]()}}function saveUpdates(_0x2291x26,_0x2291x1b){return function(_0x2291x1c){if(_0x2291x1c){return _0x2291x1c[_0xc5de[41]](_0x2291x26)[_0xc5de[40]](function(_0x2291x27){return _0x2291x27})};return null}}function removeEntity(_0x2291x1a,_0x2291x1b){return function(_0x2291x1c){if(_0x2291x1c){return _0x2291x1c[_0xc5de[42]]()[_0xc5de[40]](function(){_0x2291x1a[_0xc5de[28]](204)[_0xc5de[27]]()})}}}function handleEntityNotFound(_0x2291x1a,_0x2291x1b){return function(_0x2291x1c){if(!_0x2291x1c){_0x2291x1a[_0xc5de[26]](404)};return _0x2291x1c}}function handleError(_0x2291x1a,_0x2291x1b){_0x2291x1b= _0x2291x1b|| 500;return function(_0x2291x2b){logger[_0xc5de[44]](_0x2291x2b[_0xc5de[43]]);if(_0x2291x2b[_0xc5de[45]]){delete _0x2291x2b[_0xc5de[45]]};_0x2291x1a[_0xc5de[28]](_0x2291x1b)[_0xc5de[46]](_0x2291x2b)}}exports[_0xc5de[47]]= function(_0x2291x2c,_0x2291x1a){var _0x2291x1f={},_0x2291x2d={},_0x2291x2e={count:0,rows:[]};_0x2291x2d[_0xc5de[48]]= _[_0xc5de[51]](db[_0xc5de[50]][_0xc5de[49]]);var _0x2291x2f={dateStart:_0x2291x2c[_0xc5de[53]][_0xc5de[52]],dateEnd:_0x2291x2c[_0xc5de[53]][_0xc5de[54]]};delete _0x2291x2c[_0xc5de[53]][_0xc5de[52]];delete _0x2291x2c[_0xc5de[53]][_0xc5de[54]];_0x2291x2d[_0xc5de[53]]= _[_0xc5de[51]](_0x2291x2c[_0xc5de[53]]);_0x2291x2d[_0xc5de[55]]= _[_0xc5de[56]](_0x2291x2d[_0xc5de[48]],_0x2291x2d[_0xc5de[53]]);_0x2291x1f[_0xc5de[57]]= _[_0xc5de[56]](_0x2291x2d[_0xc5de[48]],qs[_0xc5de[58]](_0x2291x2c[_0xc5de[53]][_0xc5de[58]]));_0x2291x1f[_0xc5de[57]]= (_0x2291x1f[_0xc5de[57]][_0xc5de[59]])?_0x2291x1f[_0xc5de[57]]:_0x2291x2d[_0xc5de[48]];if(!_0x2291x2c[_0xc5de[53]][_0xc5de[61]](_0xc5de[60])){_0x2291x1f[_0xc5de[32]]= qs[_0xc5de[32]](_0x2291x2c[_0xc5de[53]][_0xc5de[32]]);_0x2291x1f[_0xc5de[31]]= qs[_0xc5de[31]](_0x2291x2c[_0xc5de[53]][_0xc5de[31]])};_0x2291x1f[_0xc5de[62]]= qs[_0xc5de[63]](_0x2291x2c[_0xc5de[53]][_0xc5de[63]]);_0x2291x1f[_0xc5de[64]]= qs[_0xc5de[55]](_[_0xc5de[65]](_0x2291x2c[_0xc5de[53]],_0x2291x2d[_0xc5de[55]]));if(_0x2291x2f[_0xc5de[52]]){if(_0x2291x2f[_0xc5de[54]]){_0x2291x2f[_0xc5de[54]]= moment(_0x2291x2f[_0xc5de[54]])[_0xc5de[67]](1,_0xc5de[66])}else {_0x2291x2f[_0xc5de[54]]= moment(_0x2291x2f[_0xc5de[52]])[_0xc5de[67]](1,_0xc5de[66])};_[_0xc5de[68]](_0x2291x1f[_0xc5de[64]],{createdAt:{$gte:_0x2291x2f[_0xc5de[52]],$lte:_0x2291x2f[_0xc5de[54]]}})};if(_0x2291x2c[_0xc5de[53]][_0xc5de[69]]){_0x2291x1f[_0xc5de[64]]= _[_0xc5de[68]](_0x2291x1f[_0xc5de[64]],{$or:_[_0xc5de[71]](_0x2291x1f[_0xc5de[57]],function(_0x2291x30){var _0x2291x2e={};_0x2291x2e[_0x2291x30]= {$like:_0xc5de[70]+ _0x2291x2c[_0xc5de[53]][_0xc5de[69]]+ _0xc5de[70]};return _0x2291x2e})})};_0x2291x1f= _[_0xc5de[68]]({},_0x2291x1f,_0x2291x2c[_0xc5de[72]]);var _0x2291x31={where:_0x2291x1f[_0xc5de[64]]};return db[_0xc5de[50]][_0xc5de[30]](_0x2291x31)[_0xc5de[40]](function(_0x2291x20){_0x2291x2e[_0xc5de[30]]= _0x2291x20;if(_0x2291x2c[_0xc5de[53]][_0xc5de[75]]){_0x2291x1f[_0xc5de[76]]= [{all:true}]};return db[_0xc5de[50]][_0xc5de[77]](_0x2291x1f)})[_0xc5de[40]](function(_0x2291x32){_0x2291x2e[_0xc5de[74]]= _0x2291x32;return _0x2291x2e})[_0xc5de[40]](respondWithFilteredResult(_0x2291x1a,_0x2291x1f))[_0xc5de[73]](handleError(_0x2291x1a,null))};exports[_0xc5de[78]]= function(_0x2291x2c,_0x2291x1a){var _0x2291x1f={raw:true,where:{id:_0x2291x2c[_0xc5de[80]][_0xc5de[79]]}},_0x2291x2d={};_0x2291x2d[_0xc5de[48]]= _[_0xc5de[51]](db[_0xc5de[50]][_0xc5de[49]]);_0x2291x2d[_0xc5de[53]]= _[_0xc5de[51]](_0x2291x2c[_0xc5de[53]]);_0x2291x2d[_0xc5de[55]]= _[_0xc5de[56]](_0x2291x2d[_0xc5de[48]],_0x2291x2d[_0xc5de[53]]);_0x2291x1f[_0xc5de[57]]= _[_0xc5de[56]](_0x2291x2d[_0xc5de[48]],qs[_0xc5de[58]](_0x2291x2c[_0xc5de[53]][_0xc5de[58]]));_0x2291x1f[_0xc5de[57]]= (_0x2291x1f[_0xc5de[57]][_0xc5de[59]])?_0x2291x1f[_0xc5de[57]]:_0x2291x2d[_0xc5de[48]];if(_0x2291x2c[_0xc5de[53]][_0xc5de[75]]){_0x2291x1f[_0xc5de[76]]= [{all:true}]};_0x2291x1f= _[_0xc5de[68]]({},_0x2291x1f,_0x2291x2c[_0xc5de[72]]);return db[_0xc5de[50]][_0xc5de[81]](_0x2291x1f)[_0xc5de[40]](handleEntityNotFound(_0x2291x1a,null))[_0xc5de[40]](respondWithResult(_0x2291x1a,null))[_0xc5de[73]](handleError(_0x2291x1a,null))};exports[_0xc5de[82]]= function(_0x2291x2c,_0x2291x1a){return db[_0xc5de[50]][_0xc5de[82]](_0x2291x2c[_0xc5de[83]],{})[_0xc5de[40]](respondWithResult(_0x2291x1a,201))[_0xc5de[73]](handleError(_0x2291x1a,null))};exports[_0xc5de[41]]= function(_0x2291x2c,_0x2291x1a){if(_0x2291x2c[_0xc5de[83]][_0xc5de[79]]){delete _0x2291x2c[_0xc5de[83]][_0xc5de[79]]};return db[_0xc5de[50]][_0xc5de[81]]({where:{id:_0x2291x2c[_0xc5de[80]][_0xc5de[79]]}})[_0xc5de[40]](handleEntityNotFound(_0x2291x1a,null))[_0xc5de[40]](saveUpdates(_0x2291x2c[_0xc5de[83]],null))[_0xc5de[40]](respondWithResult(_0x2291x1a,null))[_0xc5de[73]](handleError(_0x2291x1a,null))};exports[_0xc5de[42]]= function(_0x2291x2c,_0x2291x1a){return db[_0xc5de[50]][_0xc5de[81]]({where:{id:_0x2291x2c[_0xc5de[80]][_0xc5de[79]]}})[_0xc5de[40]](handleEntityNotFound(_0x2291x1a,null))[_0xc5de[40]](removeEntity(_0x2291x1a,null))[_0xc5de[73]](handleError(_0x2291x1a,null))};exports[_0xc5de[84]]= function(_0x2291x2c,_0x2291x1a,_0x2291x33){return db[_0xc5de[50]][_0xc5de[88]]({where:{id:_0x2291x2c[_0xc5de[80]][_0xc5de[79]]}})[_0xc5de[40]](handleEntityNotFound(_0x2291x1a,null))[_0xc5de[40]](function(_0x2291x34){var _0x2291x20;var _0x2291x1f={},_0x2291x2d={};_0x2291x2d[_0xc5de[48]]= _[_0xc5de[51]](db[_0xc5de[85]][_0xc5de[49]]);_0x2291x2d[_0xc5de[53]]= _[_0xc5de[51]](_0x2291x2c[_0xc5de[53]]);_0x2291x2d[_0xc5de[55]]= _[_0xc5de[56]](_0x2291x2d[_0xc5de[48]],_0x2291x2d[_0xc5de[53]]);_0x2291x1f[_0xc5de[57]]= _[_0xc5de[56]](_0x2291x2d[_0xc5de[48]],qs[_0xc5de[58]](_0x2291x2c[_0xc5de[53]][_0xc5de[58]]));_0x2291x1f[_0xc5de[57]]= (_0x2291x1f[_0xc5de[57]][_0xc5de[59]])?_0x2291x1f[_0xc5de[57]]:_0x2291x2d[_0xc5de[48]];if(!_0x2291x2c[_0xc5de[53]][_0xc5de[61]](_0xc5de[60])){_0x2291x1f[_0xc5de[32]]= qs[_0xc5de[32]](_0x2291x2c[_0xc5de[53]][_0xc5de[32]]);_0x2291x1f[_0xc5de[31]]= qs[_0xc5de[31]](_0x2291x2c[_0xc5de[53]][_0xc5de[31]])};_0x2291x1f[_0xc5de[62]]= qs[_0xc5de[63]](_0x2291x2c[_0xc5de[53]][_0xc5de[63]]);_0x2291x1f[_0xc5de[64]]= qs[_0xc5de[55]](_[_0xc5de[65]](_0x2291x2c[_0xc5de[53]],_0x2291x2d[_0xc5de[55]]));if(_0x2291x2c[_0xc5de[53]][_0xc5de[69]]){_0x2291x1f[_0xc5de[64]]= _[_0xc5de[68]](_0x2291x1f[_0xc5de[64]],{$or:_[_0xc5de[71]](_0x2291x1f[_0xc5de[57]],function(_0x2291x30){var _0x2291x2e={};_0x2291x2e[_0x2291x30]= {$like:_0xc5de[70]+ _0x2291x2c[_0xc5de[53]][_0xc5de[69]]+ _0xc5de[70]};return _0x2291x2e})})};_0x2291x1f[_0xc5de[64]]= _[_0xc5de[68]](_0x2291x1f[_0xc5de[64]],{mailboxuser:_0x2291x34[_0xc5de[86]]});_0x2291x1f= _[_0xc5de[68]]({},_0x2291x1f,_0x2291x2c[_0xc5de[72]]);return db[_0xc5de[85]][_0xc5de[87]](_0x2291x1f)[_0xc5de[40]](respondWithFilteredResult(_0x2291x1a,_0x2291x1f))})[_0xc5de[73]](handleError(_0x2291x1a,null))}
\ No newline at end of file
+var _0xf737=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x6D\x61\x69\x6C\x62\x6F\x78","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x66\x69\x6E\x64\x4F\x6E\x65"];_0xf737[0];var jsonpatch=require(_0xf737[1]);var rp=require(_0xf737[2]);var moment=require(_0xf737[3]);var BPromise=require(_0xf737[4]);var Mustache=require(_0xf737[5]);var util=require(_0xf737[6]);var path=require(_0xf737[7]);var sox=require(_0xf737[8]);var csv=require(_0xf737[9]);var ejs=require(_0xf737[10]);var fs=require(_0xf737[11]);var _=require(_0xf737[12]);var squel=require(_0xf737[13]);var crypto=require(_0xf737[14]);var jsforce=require(_0xf737[15]);var deskjs=require(_0xf737[16]);var toCsv=require(_0xf737[9]);var querystring=require(_0xf737[17]);var Papa=require(_0xf737[18]);var qs=require(_0xf737[19]);var logger=require(_0xf737[21])(_0xf737[20]);var utils=require(_0xf737[22]);var config=require(_0xf737[23]);var db=require(_0xf737[25])[_0xf737[24]];function respondWithStatusCode(_0x33bex1a,_0x33bex1b){_0x33bex1b= _0x33bex1b|| 204;return function(_0x33bex1c){if(_0x33bex1c){return _0x33bex1a[_0xf737[26]](_0x33bex1b)};return _0x33bex1a[_0xf737[28]](_0x33bex1b)[_0xf737[27]]()}}function respondWithResult(_0x33bex1a,_0x33bex1b){_0x33bex1b= _0x33bex1b|| 200;return function(_0x33bex1c){if(_0x33bex1c){return _0x33bex1a[_0xf737[28]](_0x33bex1b)[_0xf737[29]](_0x33bex1c)}}}function respondWithFilteredResult(_0x33bex1a,_0x33bex1f){return function(_0x33bex1c){if(_0x33bex1c){var _0x33bex20=_0x33bex1c[_0xf737[30]],_0x33bex21=_0x33bex1f[_0xf737[31]],_0x33bex22=_0x33bex1f[_0xf737[31]]+ _0x33bex1f[_0xf737[32]],_0x33bex1b;if(_0x33bex22>= _0x33bex20){_0x33bex22= _0x33bex20;_0x33bex1b= 200}else {_0x33bex1b= 206};_0x33bex1a[_0xf737[28]](_0x33bex1b);return _0x33bex1a[_0xf737[36]](_0xf737[33],_0x33bex21+ _0xf737[34]+ _0x33bex22+ _0xf737[35]+ _0x33bex20)[_0xf737[29]](_0x33bex1c)};return null}}function patchUpdates(_0x33bex24){return function(_0x33bex1c){try{jsonpatch[_0xf737[37]](_0x33bex1c,_0x33bex24,true)}catch(err){return BPromise[_0xf737[38]](err)};return _0x33bex1c[_0xf737[39]]()}}function saveUpdates(_0x33bex26,_0x33bex1b){return function(_0x33bex1c){if(_0x33bex1c){return _0x33bex1c[_0xf737[41]](_0x33bex26)[_0xf737[40]](function(_0x33bex27){return _0x33bex27})};return null}}function removeEntity(_0x33bex1a,_0x33bex1b){return function(_0x33bex1c){if(_0x33bex1c){return _0x33bex1c[_0xf737[42]]()[_0xf737[40]](function(){_0x33bex1a[_0xf737[28]](204)[_0xf737[27]]()})}}}function handleEntityNotFound(_0x33bex1a,_0x33bex1b){return function(_0x33bex1c){if(!_0x33bex1c){_0x33bex1a[_0xf737[26]](404)};return _0x33bex1c}}function handleError(_0x33bex1a,_0x33bex1b){_0x33bex1b= _0x33bex1b|| 500;return function(_0x33bex2b){logger[_0xf737[44]](_0x33bex2b[_0xf737[43]]);if(_0x33bex2b[_0xf737[45]]){delete _0x33bex2b[_0xf737[45]]};_0x33bex1a[_0xf737[28]](_0x33bex1b)[_0xf737[46]](_0x33bex2b)}}exports[_0xf737[47]]= function(_0x33bex2c,_0x33bex1a){var _0x33bex1f={},_0x33bex2d={},_0x33bex2e={count:0,rows:[]};_0x33bex2d[_0xf737[48]]= _[_0xf737[51]](db[_0xf737[50]][_0xf737[49]]);var _0x33bex2f={dateStart:_0x33bex2c[_0xf737[53]][_0xf737[52]],dateEnd:_0x33bex2c[_0xf737[53]][_0xf737[54]]};delete _0x33bex2c[_0xf737[53]][_0xf737[52]];delete _0x33bex2c[_0xf737[53]][_0xf737[54]];_0x33bex2d[_0xf737[53]]= _[_0xf737[51]](_0x33bex2c[_0xf737[53]]);_0x33bex2d[_0xf737[55]]= _[_0xf737[56]](_0x33bex2d[_0xf737[48]],_0x33bex2d[_0xf737[53]]);_0x33bex1f[_0xf737[57]]= _[_0xf737[56]](_0x33bex2d[_0xf737[48]],qs[_0xf737[58]](_0x33bex2c[_0xf737[53]][_0xf737[58]]));_0x33bex1f[_0xf737[57]]= (_0x33bex1f[_0xf737[57]][_0xf737[59]])?_0x33bex1f[_0xf737[57]]:_0x33bex2d[_0xf737[48]];if(!_0x33bex2c[_0xf737[53]][_0xf737[61]](_0xf737[60])){_0x33bex1f[_0xf737[32]]= qs[_0xf737[32]](_0x33bex2c[_0xf737[53]][_0xf737[32]]);_0x33bex1f[_0xf737[31]]= qs[_0xf737[31]](_0x33bex2c[_0xf737[53]][_0xf737[31]])};_0x33bex1f[_0xf737[62]]= qs[_0xf737[63]](_0x33bex2c[_0xf737[53]][_0xf737[63]]);_0x33bex1f[_0xf737[64]]= qs[_0xf737[55]](_[_0xf737[65]](_0x33bex2c[_0xf737[53]],_0x33bex2d[_0xf737[55]]));if(_0x33bex2f[_0xf737[52]]){if(_0x33bex2f[_0xf737[54]]){_0x33bex2f[_0xf737[54]]= moment(_0x33bex2f[_0xf737[54]])[_0xf737[67]](1,_0xf737[66])}else {_0x33bex2f[_0xf737[54]]= moment(_0x33bex2f[_0xf737[52]])[_0xf737[67]](1,_0xf737[66])};_[_0xf737[68]](_0x33bex1f[_0xf737[64]],{createdAt:{$gte:_0x33bex2f[_0xf737[52]],$lte:_0x33bex2f[_0xf737[54]]}})};if(_0x33bex2c[_0xf737[53]][_0xf737[69]]){_0x33bex1f[_0xf737[64]]= _[_0xf737[68]](_0x33bex1f[_0xf737[64]],{$or:_[_0xf737[71]](_0x33bex1f[_0xf737[57]],function(_0x33bex30){var _0x33bex2e={};_0x33bex2e[_0x33bex30]= {$like:_0xf737[70]+ _0x33bex2c[_0xf737[53]][_0xf737[69]]+ _0xf737[70]};return _0x33bex2e})})};_0x33bex1f= _[_0xf737[68]]({},_0x33bex1f,_0x33bex2c[_0xf737[72]]);var _0x33bex31={where:_0x33bex1f[_0xf737[64]]};return db[_0xf737[50]][_0xf737[30]](_0x33bex31)[_0xf737[40]](function(_0x33bex20){_0x33bex2e[_0xf737[30]]= _0x33bex20;if(_0x33bex2c[_0xf737[53]][_0xf737[75]]){_0x33bex1f[_0xf737[76]]= [{all:true}]};return db[_0xf737[50]][_0xf737[77]](_0x33bex1f)})[_0xf737[40]](function(_0x33bex32){_0x33bex2e[_0xf737[74]]= _0x33bex32;return _0x33bex2e})[_0xf737[40]](respondWithFilteredResult(_0x33bex1a,_0x33bex1f))[_0xf737[73]](handleError(_0x33bex1a,null))};exports[_0xf737[78]]= function(_0x33bex2c,_0x33bex1a){var _0x33bex1f={raw:true,where:{id:_0x33bex2c[_0xf737[80]][_0xf737[79]]}},_0x33bex2d={};_0x33bex2d[_0xf737[48]]= _[_0xf737[51]](db[_0xf737[50]][_0xf737[49]]);_0x33bex2d[_0xf737[53]]= _[_0xf737[51]](_0x33bex2c[_0xf737[53]]);_0x33bex2d[_0xf737[55]]= _[_0xf737[56]](_0x33bex2d[_0xf737[48]],_0x33bex2d[_0xf737[53]]);_0x33bex1f[_0xf737[57]]= _[_0xf737[56]](_0x33bex2d[_0xf737[48]],qs[_0xf737[58]](_0x33bex2c[_0xf737[53]][_0xf737[58]]));_0x33bex1f[_0xf737[57]]= (_0x33bex1f[_0xf737[57]][_0xf737[59]])?_0x33bex1f[_0xf737[57]]:_0x33bex2d[_0xf737[48]];if(_0x33bex2c[_0xf737[53]][_0xf737[75]]){_0x33bex1f[_0xf737[76]]= [{all:true}]};_0x33bex1f= _[_0xf737[68]]({},_0x33bex1f,_0x33bex2c[_0xf737[72]]);return db[_0xf737[50]][_0xf737[81]](_0x33bex1f)[_0xf737[40]](handleEntityNotFound(_0x33bex1a,null))[_0xf737[40]](respondWithResult(_0x33bex1a,null))[_0xf737[73]](handleError(_0x33bex1a,null))};exports[_0xf737[82]]= function(_0x33bex2c,_0x33bex1a){return db[_0xf737[50]][_0xf737[82]](_0x33bex2c[_0xf737[83]],{})[_0xf737[40]](respondWithResult(_0x33bex1a,201))[_0xf737[73]](handleError(_0x33bex1a,null))};exports[_0xf737[41]]= function(_0x33bex2c,_0x33bex1a){if(_0x33bex2c[_0xf737[83]][_0xf737[79]]){delete _0x33bex2c[_0xf737[83]][_0xf737[79]]};return db[_0xf737[50]][_0xf737[81]]({where:{id:_0x33bex2c[_0xf737[80]][_0xf737[79]]}})[_0xf737[40]](handleEntityNotFound(_0x33bex1a,null))[_0xf737[40]](saveUpdates(_0x33bex2c[_0xf737[83]],null))[_0xf737[40]](respondWithResult(_0x33bex1a,null))[_0xf737[73]](handleError(_0x33bex1a,null))};exports[_0xf737[42]]= function(_0x33bex2c,_0x33bex1a){return db[_0xf737[50]][_0xf737[81]]({where:{id:_0x33bex2c[_0xf737[80]][_0xf737[79]]}})[_0xf737[40]](handleEntityNotFound(_0x33bex1a,null))[_0xf737[40]](removeEntity(_0x33bex1a,null))[_0xf737[73]](handleError(_0x33bex1a,null))};exports[_0xf737[84]]= function(_0x33bex2c,_0x33bex1a,_0x33bex33){return db[_0xf737[50]][_0xf737[88]]({where:{id:_0x33bex2c[_0xf737[80]][_0xf737[79]]}})[_0xf737[40]](handleEntityNotFound(_0x33bex1a,null))[_0xf737[40]](function(_0x33bex34){var _0x33bex20;var _0x33bex1f={},_0x33bex2d={};_0x33bex2d[_0xf737[48]]= _[_0xf737[51]](db[_0xf737[85]][_0xf737[49]]);_0x33bex2d[_0xf737[53]]= _[_0xf737[51]](_0x33bex2c[_0xf737[53]]);_0x33bex2d[_0xf737[55]]= _[_0xf737[56]](_0x33bex2d[_0xf737[48]],_0x33bex2d[_0xf737[53]]);_0x33bex1f[_0xf737[57]]= _[_0xf737[56]](_0x33bex2d[_0xf737[48]],qs[_0xf737[58]](_0x33bex2c[_0xf737[53]][_0xf737[58]]));_0x33bex1f[_0xf737[57]]= (_0x33bex1f[_0xf737[57]][_0xf737[59]])?_0x33bex1f[_0xf737[57]]:_0x33bex2d[_0xf737[48]];if(!_0x33bex2c[_0xf737[53]][_0xf737[61]](_0xf737[60])){_0x33bex1f[_0xf737[32]]= qs[_0xf737[32]](_0x33bex2c[_0xf737[53]][_0xf737[32]]);_0x33bex1f[_0xf737[31]]= qs[_0xf737[31]](_0x33bex2c[_0xf737[53]][_0xf737[31]])};_0x33bex1f[_0xf737[62]]= qs[_0xf737[63]](_0x33bex2c[_0xf737[53]][_0xf737[63]]);_0x33bex1f[_0xf737[64]]= qs[_0xf737[55]](_[_0xf737[65]](_0x33bex2c[_0xf737[53]],_0x33bex2d[_0xf737[55]]));if(_0x33bex2c[_0xf737[53]][_0xf737[69]]){_0x33bex1f[_0xf737[64]]= _[_0xf737[68]](_0x33bex1f[_0xf737[64]],{$or:_[_0xf737[71]](_0x33bex1f[_0xf737[57]],function(_0x33bex30){var _0x33bex2e={};_0x33bex2e[_0x33bex30]= {$like:_0xf737[70]+ _0x33bex2c[_0xf737[53]][_0xf737[69]]+ _0xf737[70]};return _0x33bex2e})})};_0x33bex1f[_0xf737[64]]= _[_0xf737[68]](_0x33bex1f[_0xf737[64]],{mailboxuser:_0x33bex34[_0xf737[86]]});_0x33bex1f= _[_0xf737[68]]({},_0x33bex1f,_0x33bex2c[_0xf737[72]]);return db[_0xf737[85]][_0xf737[87]](_0x33bex1f)[_0xf737[40]](respondWithFilteredResult(_0x33bex1a,_0x33bex1f))})[_0xf737[73]](handleError(_0x33bex1a,null))}
\ No newline at end of file
index a41447a..3409e56 100644 (file)
@@ -1 +1 @@
-var _0xb5c2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x4D\x61\x69\x6C\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C","\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x6D\x61\x69\x6C\x62\x6F\x78\x5F\x63\x6F\x6E\x74\x65\x78\x74","\x6D\x61\x69\x6C\x62\x6F\x78","\x63\x6F\x6E\x74\x65\x78\x74","\x64\x65\x66\x69\x6E\x65"];_0xb5c2[0];var _=require(_0xb5c2[1]);var util=require(_0xb5c2[2]);var logger=require(_0xb5c2[4])(_0xb5c2[3]);var moment=require(_0xb5c2[5]);var BPromise=require(_0xb5c2[6]);var rp=require(_0xb5c2[7]);var attributes=require(_0xb5c2[8]);module[_0xb5c2[9]]= function(_0xa01dx8,_0xa01dx9){return _0xa01dx8[_0xb5c2[15]](_0xb5c2[10],attributes,{tableName:_0xb5c2[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0xb5c2[12],"\x66\x69\x65\x6C\x64\x73":[_0xb5c2[13],_0xb5c2[14]]}],timestamps:true})}
\ No newline at end of file
+var _0xb7d4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x4D\x61\x69\x6C\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C","\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x6D\x61\x69\x6C\x62\x6F\x78\x5F\x63\x6F\x6E\x74\x65\x78\x74","\x6D\x61\x69\x6C\x62\x6F\x78","\x63\x6F\x6E\x74\x65\x78\x74","\x64\x65\x66\x69\x6E\x65"];_0xb7d4[0];var _=require(_0xb7d4[1]);var util=require(_0xb7d4[2]);var logger=require(_0xb7d4[4])(_0xb7d4[3]);var moment=require(_0xb7d4[5]);var BPromise=require(_0xb7d4[6]);var rp=require(_0xb7d4[7]);var attributes=require(_0xb7d4[8]);module[_0xb7d4[9]]= function(_0x614cx8,_0x614cx9){return _0x614cx8[_0xb7d4[15]](_0xb7d4[10],attributes,{tableName:_0xb7d4[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0xb7d4[12],"\x66\x69\x65\x6C\x64\x73":[_0xb7d4[13],_0xb7d4[14]]}],timestamps:true})}
\ No newline at end of file
index f9b3935..c2e3422 100644 (file)
@@ -1 +1 @@
-var _0xd3d2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xd3d2[0];var _=require(_0xd3d2[1]);var util=require(_0xd3d2[2]);var moment=require(_0xd3d2[3]);var BPromise=require(_0xd3d2[4]);var rs=require(_0xd3d2[5]);var fs=require(_0xd3d2[6]);var db=require(_0xd3d2[8])[_0xd3d2[7]];var utils=require(_0xd3d2[9]);var logger=require(_0xd3d2[11])(_0xd3d2[10]);var config=require(_0xd3d2[12]);var jayson=require(_0xd3d2[13]);var client=jayson[_0xd3d2[15]][_0xd3d2[14]]({port:9002});function respondWithRpcPromise(_0x561cxe,_0x561cxf,_0x561cx10){return  new BPromise(function(_0x561cx11,_0x561cx12){return client[_0xd3d2[28]](_0x561cxe,_0x561cx10)[_0xd3d2[27]](function(_0x561cx14){logger[_0xd3d2[20]](_0xd3d2[16],_0x561cxf,_0xd3d2[19]);logger[_0xd3d2[23]](_0xd3d2[21],_0x561cxf,_0xd3d2[19],JSON[_0xd3d2[22]](_0x561cx14));if(_0x561cx14[_0xd3d2[17]]){if(_0x561cx14[_0xd3d2[17]][_0xd3d2[24]]=== 500){logger[_0xd3d2[17]](_0xd3d2[16],_0x561cxf,_0x561cx14[_0xd3d2[17]][_0xd3d2[25]]);return _0x561cx12(_0x561cx14[_0xd3d2[17]][_0xd3d2[25]])};logger[_0xd3d2[17]](_0xd3d2[16],_0x561cxf,_0x561cx14[_0xd3d2[17]][_0xd3d2[25]]);return _0x561cx11(_0x561cx14[_0xd3d2[17]][_0xd3d2[25]])}else {logger[_0xd3d2[20]](_0xd3d2[16],_0x561cxf,_0xd3d2[19]);_0x561cx11(_0x561cx14[_0xd3d2[26]][_0xd3d2[25]])}})[_0xd3d2[18]](function(_0x561cx13){logger[_0xd3d2[17]](_0xd3d2[16],_0x561cxf,_0x561cx13);_0x561cx12(_0x561cx13)})})}
\ No newline at end of file
+var _0xc727=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xc727[0];var _=require(_0xc727[1]);var util=require(_0xc727[2]);var moment=require(_0xc727[3]);var BPromise=require(_0xc727[4]);var rs=require(_0xc727[5]);var fs=require(_0xc727[6]);var db=require(_0xc727[8])[_0xc727[7]];var utils=require(_0xc727[9]);var logger=require(_0xc727[11])(_0xc727[10]);var config=require(_0xc727[12]);var jayson=require(_0xc727[13]);var client=jayson[_0xc727[15]][_0xc727[14]]({port:9002});function respondWithRpcPromise(_0xb160xe,_0xb160xf,_0xb160x10){return  new BPromise(function(_0xb160x11,_0xb160x12){return client[_0xc727[28]](_0xb160xe,_0xb160x10)[_0xc727[27]](function(_0xb160x14){logger[_0xc727[20]](_0xc727[16],_0xb160xf,_0xc727[19]);logger[_0xc727[23]](_0xc727[21],_0xb160xf,_0xc727[19],JSON[_0xc727[22]](_0xb160x14));if(_0xb160x14[_0xc727[17]]){if(_0xb160x14[_0xc727[17]][_0xc727[24]]=== 500){logger[_0xc727[17]](_0xc727[16],_0xb160xf,_0xb160x14[_0xc727[17]][_0xc727[25]]);return _0xb160x12(_0xb160x14[_0xc727[17]][_0xc727[25]])};logger[_0xc727[17]](_0xc727[16],_0xb160xf,_0xb160x14[_0xc727[17]][_0xc727[25]]);return _0xb160x11(_0xb160x14[_0xc727[17]][_0xc727[25]])}else {logger[_0xc727[20]](_0xc727[16],_0xb160xf,_0xc727[19]);_0xb160x11(_0xb160x14[_0xc727[26]][_0xc727[25]])}})[_0xc727[18]](function(_0xb160x13){logger[_0xc727[17]](_0xc727[16],_0xb160xf,_0xb160x13);_0xb160x12(_0xb160x13)})})}
\ No newline at end of file
index a017492..e81975e 100644 (file)
@@ -1 +1 @@
-var _0xdc14=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xdc14[0];var multer=require(_0xdc14[1]);var util=require(_0xdc14[2]);var path=require(_0xdc14[3]);var express=require(_0xdc14[4]);var router=express.Router();var auth=require(_0xdc14[5]);var interaction=require(_0xdc14[6]);var config=require(_0xdc14[7]);var controller=require(_0xdc14[8]);router[_0xdc14[12]](_0xdc14[9],auth[_0xdc14[10]](),controller[_0xdc14[11]]);router[_0xdc14[12]](_0xdc14[13],auth[_0xdc14[10]](),controller[_0xdc14[14]]);router[_0xdc14[12]](_0xdc14[15],auth[_0xdc14[10]](),controller[_0xdc14[16]]);router[_0xdc14[18]](_0xdc14[9],auth[_0xdc14[10]](),controller[_0xdc14[17]]);router[_0xdc14[20]](_0xdc14[13],auth[_0xdc14[10]](),controller[_0xdc14[19]]);router[_0xdc14[22]](_0xdc14[13],auth[_0xdc14[10]](),controller[_0xdc14[21]]);module[_0xdc14[23]]= router
\ No newline at end of file
+var _0x5f25=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x5f25[0];var multer=require(_0x5f25[1]);var util=require(_0x5f25[2]);var path=require(_0x5f25[3]);var express=require(_0x5f25[4]);var router=express.Router();var auth=require(_0x5f25[5]);var interaction=require(_0x5f25[6]);var config=require(_0x5f25[7]);var controller=require(_0x5f25[8]);router[_0x5f25[12]](_0x5f25[9],auth[_0x5f25[10]](),controller[_0x5f25[11]]);router[_0x5f25[12]](_0x5f25[13],auth[_0x5f25[10]](),controller[_0x5f25[14]]);router[_0x5f25[12]](_0x5f25[15],auth[_0x5f25[10]](),controller[_0x5f25[16]]);router[_0x5f25[18]](_0x5f25[9],auth[_0x5f25[10]](),controller[_0x5f25[17]]);router[_0x5f25[20]](_0x5f25[13],auth[_0x5f25[10]](),controller[_0x5f25[19]]);router[_0x5f25[22]](_0x5f25[13],auth[_0x5f25[10]](),controller[_0x5f25[21]]);module[_0x5f25[23]]= router
\ No newline at end of file
index aa2f1e6..532a591 100644 (file)
@@ -1 +1 @@
-var _0x13f4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x56\x49\x52\x54\x55\x41\x4C","\x69\x64","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","","\x6C\x6F\x6E\x67","\x54\x49\x4D\x45\x53\x54\x41\x4D\x50"];_0x13f4[0];var Sequelize=require(_0x13f4[1]);module[_0x13f4[2]]= {name:{type:Sequelize[_0x13f4[3]],get:function(_0x62f1x2){return this[_0x13f4[5]](_0x13f4[4])}},msgnum:{type:Sequelize.INTEGER(11),defaultValue:0,allowNull:false},dir:{type:Sequelize[_0x13f4[6]],defaultValue:_0x13f4[7]},context:{type:Sequelize[_0x13f4[6]],defaultValue:_0x13f4[7]},macrocontext:{type:Sequelize[_0x13f4[6]],defaultValue:_0x13f4[7]},callerid:{type:Sequelize[_0x13f4[6]],defaultValue:_0x13f4[7]},origtime:{type:Sequelize[_0x13f4[6]],defaultValue:_0x13f4[7]},duration:{type:Sequelize[_0x13f4[6]],defaultValue:_0x13f4[7]},mailboxuser:{type:Sequelize[_0x13f4[6]],defaultValue:_0x13f4[7]},mailboxcontext:{type:Sequelize[_0x13f4[6]],defaultValue:_0x13f4[7]},recording:{type:Sequelize.BLOB(_0x13f4[8]),defaultValue:null},flag:{type:Sequelize[_0x13f4[6]],defaultValue:_0x13f4[7]},msg_id:{type:Sequelize[_0x13f4[6]],defaultValue:_0x13f4[7]},stamp:{type:_0x13f4[9],allowNull:false}}
\ No newline at end of file
+var _0xd3e2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x56\x49\x52\x54\x55\x41\x4C","\x69\x64","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x53\x54\x52\x49\x4E\x47","","\x6C\x6F\x6E\x67","\x54\x49\x4D\x45\x53\x54\x41\x4D\x50"];_0xd3e2[0];var Sequelize=require(_0xd3e2[1]);module[_0xd3e2[2]]= {name:{type:Sequelize[_0xd3e2[3]],get:function(_0x3aebx2){return this[_0xd3e2[5]](_0xd3e2[4])}},msgnum:{type:Sequelize.INTEGER(11),defaultValue:0,allowNull:false},dir:{type:Sequelize[_0xd3e2[6]],defaultValue:_0xd3e2[7]},context:{type:Sequelize[_0xd3e2[6]],defaultValue:_0xd3e2[7]},macrocontext:{type:Sequelize[_0xd3e2[6]],defaultValue:_0xd3e2[7]},callerid:{type:Sequelize[_0xd3e2[6]],defaultValue:_0xd3e2[7]},origtime:{type:Sequelize[_0xd3e2[6]],defaultValue:_0xd3e2[7]},duration:{type:Sequelize[_0xd3e2[6]],defaultValue:_0xd3e2[7]},mailboxuser:{type:Sequelize[_0xd3e2[6]],defaultValue:_0xd3e2[7]},mailboxcontext:{type:Sequelize[_0xd3e2[6]],defaultValue:_0xd3e2[7]},recording:{type:Sequelize.BLOB(_0xd3e2[8]),defaultValue:null},flag:{type:Sequelize[_0xd3e2[6]],defaultValue:_0xd3e2[7]},msg_id:{type:Sequelize[_0xd3e2[6]],defaultValue:_0xd3e2[7]},stamp:{type:_0xd3e2[9],allowNull:false}}
\ No newline at end of file
index d41713e..3cd8259 100644 (file)
@@ -1 +1 @@
-var _0x8c99=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x6B\x65\x79\x73","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65\x42\x79","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x61\x75\x64\x69\x6F\x2F\x77\x61\x76","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x6D\x73\x67\x5F\x69\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3B\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3D\x22","\x2E\x77\x61\x76\x22"];_0x8c99[0];var jsonpatch=require(_0x8c99[1]);var rp=require(_0x8c99[2]);var moment=require(_0x8c99[3]);var BPromise=require(_0x8c99[4]);var Mustache=require(_0x8c99[5]);var util=require(_0x8c99[6]);var path=require(_0x8c99[7]);var sox=require(_0x8c99[8]);var csv=require(_0x8c99[9]);var ejs=require(_0x8c99[10]);var fs=require(_0x8c99[11]);var _=require(_0x8c99[12]);var squel=require(_0x8c99[13]);var crypto=require(_0x8c99[14]);var jsforce=require(_0x8c99[15]);var deskjs=require(_0x8c99[16]);var toCsv=require(_0x8c99[9]);var querystring=require(_0x8c99[17]);var Papa=require(_0x8c99[18]);var qs=require(_0x8c99[19]);var logger=require(_0x8c99[21])(_0x8c99[20]);var utils=require(_0x8c99[22]);var config=require(_0x8c99[23]);var db=require(_0x8c99[25])[_0x8c99[24]];function respondWithStatusCode(_0xa0a6x1a,_0xa0a6x1b){_0xa0a6x1b= _0xa0a6x1b|| 204;return function(_0xa0a6x1c){if(_0xa0a6x1c){return _0xa0a6x1a[_0x8c99[26]](_0xa0a6x1b)};return _0xa0a6x1a[_0x8c99[28]](_0xa0a6x1b)[_0x8c99[27]]()}}function respondWithResult(_0xa0a6x1a,_0xa0a6x1b){_0xa0a6x1b= _0xa0a6x1b|| 200;return function(_0xa0a6x1c){if(_0xa0a6x1c){return _0xa0a6x1a[_0x8c99[28]](_0xa0a6x1b)[_0x8c99[29]](_0xa0a6x1c)}}}function respondWithFilteredResult(_0xa0a6x1a,_0xa0a6x1f){return function(_0xa0a6x1c){if(_0xa0a6x1c){var _0xa0a6x20=_0xa0a6x1c[_0x8c99[30]],_0xa0a6x21=_0xa0a6x1f[_0x8c99[31]],_0xa0a6x22=_0xa0a6x1f[_0x8c99[31]]+ _0xa0a6x1f[_0x8c99[32]],_0xa0a6x1b;if(_0xa0a6x22>= _0xa0a6x20){_0xa0a6x22= _0xa0a6x20;_0xa0a6x1b= 200}else {_0xa0a6x1b= 206};_0xa0a6x1a[_0x8c99[28]](_0xa0a6x1b);return _0xa0a6x1a[_0x8c99[36]](_0x8c99[33],_0xa0a6x21+ _0x8c99[34]+ _0xa0a6x22+ _0x8c99[35]+ _0xa0a6x20)[_0x8c99[29]](_0xa0a6x1c)};return null}}function patchUpdates(_0xa0a6x24){return function(_0xa0a6x1c){try{jsonpatch[_0x8c99[37]](_0xa0a6x1c,_0xa0a6x24,true)}catch(err){return BPromise[_0x8c99[38]](err)};return _0xa0a6x1c[_0x8c99[39]]()}}function saveUpdates(_0xa0a6x26,_0xa0a6x1b){return function(_0xa0a6x1c){if(_0xa0a6x1c){return _0xa0a6x1c[_0x8c99[41]](_0xa0a6x26)[_0x8c99[40]](function(_0xa0a6x27){return _0xa0a6x27})};return null}}function removeEntity(_0xa0a6x1a,_0xa0a6x1b){return function(_0xa0a6x1c){if(_0xa0a6x1c){return _0xa0a6x1c[_0x8c99[42]]()[_0x8c99[40]](function(){_0xa0a6x1a[_0x8c99[28]](204)[_0x8c99[27]]()})}}}function handleEntityNotFound(_0xa0a6x1a,_0xa0a6x1b){return function(_0xa0a6x1c){if(!_0xa0a6x1c){_0xa0a6x1a[_0x8c99[26]](404)};return _0xa0a6x1c}}function handleError(_0xa0a6x1a,_0xa0a6x1b){_0xa0a6x1b= _0xa0a6x1b|| 500;return function(_0xa0a6x2b){logger[_0x8c99[44]](_0xa0a6x2b[_0x8c99[43]]);if(_0xa0a6x2b[_0x8c99[45]]){delete _0xa0a6x2b[_0x8c99[45]]};_0xa0a6x1a[_0x8c99[28]](_0xa0a6x1b)[_0x8c99[46]](_0xa0a6x2b)}}exports[_0x8c99[47]]= function(_0xa0a6x2c,_0xa0a6x1a){var _0xa0a6x1f={},_0xa0a6x2d={},_0xa0a6x2e={count:0,rows:[]};_0xa0a6x2d[_0x8c99[48]]= _[_0x8c99[52]](_[_0x8c99[51]](db[_0x8c99[50]][_0x8c99[49]]),[_0x8c99[45]]);var _0xa0a6x2f={dateStart:_0xa0a6x2c[_0x8c99[54]][_0x8c99[53]],dateEnd:_0xa0a6x2c[_0x8c99[54]][_0x8c99[55]]};delete _0xa0a6x2c[_0x8c99[54]][_0x8c99[53]];delete _0xa0a6x2c[_0x8c99[54]][_0x8c99[55]];_0xa0a6x2d[_0x8c99[54]]= _[_0x8c99[51]](_0xa0a6x2c[_0x8c99[54]]);_0xa0a6x2d[_0x8c99[56]]= _[_0x8c99[57]](_0xa0a6x2d[_0x8c99[48]],_0xa0a6x2d[_0x8c99[54]]);_0xa0a6x1f[_0x8c99[58]]= _[_0x8c99[57]](_0xa0a6x2d[_0x8c99[48]],qs[_0x8c99[59]](_0xa0a6x2c[_0x8c99[54]][_0x8c99[59]]));_0xa0a6x1f[_0x8c99[58]]= (_0xa0a6x1f[_0x8c99[58]][_0x8c99[60]])?_0xa0a6x1f[_0x8c99[58]]:_0xa0a6x2d[_0x8c99[48]];if(!_0xa0a6x2c[_0x8c99[54]][_0x8c99[62]](_0x8c99[61])){_0xa0a6x1f[_0x8c99[32]]= qs[_0x8c99[32]](_0xa0a6x2c[_0x8c99[54]][_0x8c99[32]]);_0xa0a6x1f[_0x8c99[31]]= qs[_0x8c99[31]](_0xa0a6x2c[_0x8c99[54]][_0x8c99[31]])};_0xa0a6x1f[_0x8c99[63]]= qs[_0x8c99[64]](_0xa0a6x2c[_0x8c99[54]][_0x8c99[64]]);_0xa0a6x1f[_0x8c99[65]]= qs[_0x8c99[56]](_[_0x8c99[66]](_0xa0a6x2c[_0x8c99[54]],_0xa0a6x2d[_0x8c99[56]]));if(_0xa0a6x2f[_0x8c99[53]]){if(_0xa0a6x2f[_0x8c99[55]]){_0xa0a6x2f[_0x8c99[55]]= moment(_0xa0a6x2f[_0x8c99[55]])[_0x8c99[68]](1,_0x8c99[67])}else {_0xa0a6x2f[_0x8c99[55]]= moment(_0xa0a6x2f[_0x8c99[53]])[_0x8c99[68]](1,_0x8c99[67])};_[_0x8c99[69]](_0xa0a6x1f[_0x8c99[65]],{createdAt:{$gte:_0xa0a6x2f[_0x8c99[53]],$lte:_0xa0a6x2f[_0x8c99[55]]}})};if(_0xa0a6x2c[_0x8c99[54]][_0x8c99[70]]){_0xa0a6x1f[_0x8c99[65]]= _[_0x8c99[69]](_0xa0a6x1f[_0x8c99[65]],{$or:_[_0x8c99[72]](_0xa0a6x1f[_0x8c99[58]],function(_0xa0a6x30){var _0xa0a6x2e={};_0xa0a6x2e[_0xa0a6x30]= {$like:_0x8c99[71]+ _0xa0a6x2c[_0x8c99[54]][_0x8c99[70]]+ _0x8c99[71]};return _0xa0a6x2e})})};_0xa0a6x1f= _[_0x8c99[69]]({},_0xa0a6x1f,_0xa0a6x2c[_0x8c99[73]]);var _0xa0a6x31={where:_0xa0a6x1f[_0x8c99[65]]};return db[_0x8c99[50]][_0x8c99[30]](_0xa0a6x31)[_0x8c99[40]](function(_0xa0a6x20){_0xa0a6x2e[_0x8c99[30]]= _0xa0a6x20;if(_0xa0a6x2c[_0x8c99[54]][_0x8c99[76]]){_0xa0a6x1f[_0x8c99[77]]= [{all:true}]};return db[_0x8c99[50]][_0x8c99[78]](_0xa0a6x1f)})[_0x8c99[40]](function(_0xa0a6x32){_0xa0a6x2e[_0x8c99[75]]= _0xa0a6x32;return _0xa0a6x2e})[_0x8c99[40]](respondWithFilteredResult(_0xa0a6x1a,_0xa0a6x1f))[_0x8c99[74]](handleError(_0xa0a6x1a,null))};exports[_0x8c99[79]]= function(_0xa0a6x2c,_0xa0a6x1a){var _0xa0a6x1f={raw:true,where:{id:_0xa0a6x2c[_0x8c99[81]][_0x8c99[80]]}},_0xa0a6x2d={};_0xa0a6x2d[_0x8c99[48]]= _[_0x8c99[51]](db[_0x8c99[50]][_0x8c99[49]]);_0xa0a6x2d[_0x8c99[54]]= _[_0x8c99[51]](_0xa0a6x2c[_0x8c99[54]]);_0xa0a6x2d[_0x8c99[56]]= _[_0x8c99[57]](_0xa0a6x2d[_0x8c99[48]],_0xa0a6x2d[_0x8c99[54]]);_0xa0a6x1f[_0x8c99[58]]= _[_0x8c99[57]](_0xa0a6x2d[_0x8c99[48]],qs[_0x8c99[59]](_0xa0a6x2c[_0x8c99[54]][_0x8c99[59]]));_0xa0a6x1f[_0x8c99[58]]= (_0xa0a6x1f[_0x8c99[58]][_0x8c99[60]])?_0xa0a6x1f[_0x8c99[58]]:_0xa0a6x2d[_0x8c99[48]];if(_0xa0a6x2c[_0x8c99[54]][_0x8c99[76]]){_0xa0a6x1f[_0x8c99[77]]= [{all:true}]};_0xa0a6x1f= _[_0x8c99[69]]({},_0xa0a6x1f,_0xa0a6x2c[_0x8c99[73]]);return db[_0x8c99[50]][_0x8c99[82]](_0xa0a6x1f)[_0x8c99[40]](handleEntityNotFound(_0xa0a6x1a,null))[_0x8c99[40]](respondWithResult(_0xa0a6x1a,null))[_0x8c99[74]](handleError(_0xa0a6x1a,null))};exports[_0x8c99[83]]= function(_0xa0a6x2c,_0xa0a6x1a){return db[_0x8c99[50]][_0x8c99[83]](_0xa0a6x2c[_0x8c99[84]],{})[_0x8c99[40]](respondWithResult(_0xa0a6x1a,201))[_0x8c99[74]](handleError(_0xa0a6x1a,null))};exports[_0x8c99[41]]= function(_0xa0a6x2c,_0xa0a6x1a){if(_0xa0a6x2c[_0x8c99[84]][_0x8c99[80]]){delete _0xa0a6x2c[_0x8c99[84]][_0x8c99[80]]};return db[_0x8c99[50]][_0x8c99[82]]({where:{id:_0xa0a6x2c[_0x8c99[81]][_0x8c99[80]]}})[_0x8c99[40]](handleEntityNotFound(_0xa0a6x1a,null))[_0x8c99[40]](saveUpdates(_0xa0a6x2c[_0x8c99[84]],null))[_0x8c99[40]](respondWithResult(_0xa0a6x1a,null))[_0x8c99[74]](handleError(_0xa0a6x1a,null))};exports[_0x8c99[42]]= function(_0xa0a6x2c,_0xa0a6x1a){return db[_0x8c99[50]][_0x8c99[82]]({where:{id:_0xa0a6x2c[_0x8c99[81]][_0x8c99[80]]}})[_0x8c99[40]](handleEntityNotFound(_0xa0a6x1a,null))[_0x8c99[40]](removeEntity(_0xa0a6x1a,null))[_0x8c99[74]](handleError(_0xa0a6x1a,null))};exports[_0x8c99[85]]= function(_0xa0a6x2c,_0xa0a6x1a,_0xa0a6x33){return db[_0x8c99[50]][_0x8c99[82]]({where:{id:_0xa0a6x2c[_0x8c99[81]][_0x8c99[80]]},attributes:[_0x8c99[80],_0x8c99[86],_0x8c99[91]]})[_0x8c99[40]](handleEntityNotFound(_0xa0a6x1a,null))[_0x8c99[40]](function(_0xa0a6x1c){if(_0xa0a6x1c){if(!_0xa0a6x1c[_0x8c99[86]]){throw  new db[_0x8c99[88]].ValidationError(_0x8c99[87])};var _0xa0a6x34={"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x8c99[89],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E":_0x8c99[90]};if(_0xa0a6x1c[_0x8c99[91]]){_0xa0a6x34[_0x8c99[92]]= _0x8c99[93]+ _0xa0a6x1c[_0x8c99[91]]+ _0x8c99[94]};_0xa0a6x1a[_0x8c99[36]](_0xa0a6x34);return _0xa0a6x1a[_0x8c99[46]]( new Buffer(_0xa0a6x1c[_0x8c99[86]]))}})[_0x8c99[74]](handleError(_0xa0a6x1a,null))}
\ No newline at end of file
+var _0x85f3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x6B\x65\x79\x73","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65\x42\x79","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x61\x75\x64\x69\x6F\x2F\x77\x61\x76","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x6D\x73\x67\x5F\x69\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3B\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3D\x22","\x2E\x77\x61\x76\x22"];_0x85f3[0];var jsonpatch=require(_0x85f3[1]);var rp=require(_0x85f3[2]);var moment=require(_0x85f3[3]);var BPromise=require(_0x85f3[4]);var Mustache=require(_0x85f3[5]);var util=require(_0x85f3[6]);var path=require(_0x85f3[7]);var sox=require(_0x85f3[8]);var csv=require(_0x85f3[9]);var ejs=require(_0x85f3[10]);var fs=require(_0x85f3[11]);var _=require(_0x85f3[12]);var squel=require(_0x85f3[13]);var crypto=require(_0x85f3[14]);var jsforce=require(_0x85f3[15]);var deskjs=require(_0x85f3[16]);var toCsv=require(_0x85f3[9]);var querystring=require(_0x85f3[17]);var Papa=require(_0x85f3[18]);var qs=require(_0x85f3[19]);var logger=require(_0x85f3[21])(_0x85f3[20]);var utils=require(_0x85f3[22]);var config=require(_0x85f3[23]);var db=require(_0x85f3[25])[_0x85f3[24]];function respondWithStatusCode(_0x7db7x1a,_0x7db7x1b){_0x7db7x1b= _0x7db7x1b|| 204;return function(_0x7db7x1c){if(_0x7db7x1c){return _0x7db7x1a[_0x85f3[26]](_0x7db7x1b)};return _0x7db7x1a[_0x85f3[28]](_0x7db7x1b)[_0x85f3[27]]()}}function respondWithResult(_0x7db7x1a,_0x7db7x1b){_0x7db7x1b= _0x7db7x1b|| 200;return function(_0x7db7x1c){if(_0x7db7x1c){return _0x7db7x1a[_0x85f3[28]](_0x7db7x1b)[_0x85f3[29]](_0x7db7x1c)}}}function respondWithFilteredResult(_0x7db7x1a,_0x7db7x1f){return function(_0x7db7x1c){if(_0x7db7x1c){var _0x7db7x20=_0x7db7x1c[_0x85f3[30]],_0x7db7x21=_0x7db7x1f[_0x85f3[31]],_0x7db7x22=_0x7db7x1f[_0x85f3[31]]+ _0x7db7x1f[_0x85f3[32]],_0x7db7x1b;if(_0x7db7x22>= _0x7db7x20){_0x7db7x22= _0x7db7x20;_0x7db7x1b= 200}else {_0x7db7x1b= 206};_0x7db7x1a[_0x85f3[28]](_0x7db7x1b);return _0x7db7x1a[_0x85f3[36]](_0x85f3[33],_0x7db7x21+ _0x85f3[34]+ _0x7db7x22+ _0x85f3[35]+ _0x7db7x20)[_0x85f3[29]](_0x7db7x1c)};return null}}function patchUpdates(_0x7db7x24){return function(_0x7db7x1c){try{jsonpatch[_0x85f3[37]](_0x7db7x1c,_0x7db7x24,true)}catch(err){return BPromise[_0x85f3[38]](err)};return _0x7db7x1c[_0x85f3[39]]()}}function saveUpdates(_0x7db7x26,_0x7db7x1b){return function(_0x7db7x1c){if(_0x7db7x1c){return _0x7db7x1c[_0x85f3[41]](_0x7db7x26)[_0x85f3[40]](function(_0x7db7x27){return _0x7db7x27})};return null}}function removeEntity(_0x7db7x1a,_0x7db7x1b){return function(_0x7db7x1c){if(_0x7db7x1c){return _0x7db7x1c[_0x85f3[42]]()[_0x85f3[40]](function(){_0x7db7x1a[_0x85f3[28]](204)[_0x85f3[27]]()})}}}function handleEntityNotFound(_0x7db7x1a,_0x7db7x1b){return function(_0x7db7x1c){if(!_0x7db7x1c){_0x7db7x1a[_0x85f3[26]](404)};return _0x7db7x1c}}function handleError(_0x7db7x1a,_0x7db7x1b){_0x7db7x1b= _0x7db7x1b|| 500;return function(_0x7db7x2b){logger[_0x85f3[44]](_0x7db7x2b[_0x85f3[43]]);if(_0x7db7x2b[_0x85f3[45]]){delete _0x7db7x2b[_0x85f3[45]]};_0x7db7x1a[_0x85f3[28]](_0x7db7x1b)[_0x85f3[46]](_0x7db7x2b)}}exports[_0x85f3[47]]= function(_0x7db7x2c,_0x7db7x1a){var _0x7db7x1f={},_0x7db7x2d={},_0x7db7x2e={count:0,rows:[]};_0x7db7x2d[_0x85f3[48]]= _[_0x85f3[52]](_[_0x85f3[51]](db[_0x85f3[50]][_0x85f3[49]]),[_0x85f3[45]]);var _0x7db7x2f={dateStart:_0x7db7x2c[_0x85f3[54]][_0x85f3[53]],dateEnd:_0x7db7x2c[_0x85f3[54]][_0x85f3[55]]};delete _0x7db7x2c[_0x85f3[54]][_0x85f3[53]];delete _0x7db7x2c[_0x85f3[54]][_0x85f3[55]];_0x7db7x2d[_0x85f3[54]]= _[_0x85f3[51]](_0x7db7x2c[_0x85f3[54]]);_0x7db7x2d[_0x85f3[56]]= _[_0x85f3[57]](_0x7db7x2d[_0x85f3[48]],_0x7db7x2d[_0x85f3[54]]);_0x7db7x1f[_0x85f3[58]]= _[_0x85f3[57]](_0x7db7x2d[_0x85f3[48]],qs[_0x85f3[59]](_0x7db7x2c[_0x85f3[54]][_0x85f3[59]]));_0x7db7x1f[_0x85f3[58]]= (_0x7db7x1f[_0x85f3[58]][_0x85f3[60]])?_0x7db7x1f[_0x85f3[58]]:_0x7db7x2d[_0x85f3[48]];if(!_0x7db7x2c[_0x85f3[54]][_0x85f3[62]](_0x85f3[61])){_0x7db7x1f[_0x85f3[32]]= qs[_0x85f3[32]](_0x7db7x2c[_0x85f3[54]][_0x85f3[32]]);_0x7db7x1f[_0x85f3[31]]= qs[_0x85f3[31]](_0x7db7x2c[_0x85f3[54]][_0x85f3[31]])};_0x7db7x1f[_0x85f3[63]]= qs[_0x85f3[64]](_0x7db7x2c[_0x85f3[54]][_0x85f3[64]]);_0x7db7x1f[_0x85f3[65]]= qs[_0x85f3[56]](_[_0x85f3[66]](_0x7db7x2c[_0x85f3[54]],_0x7db7x2d[_0x85f3[56]]));if(_0x7db7x2f[_0x85f3[53]]){if(_0x7db7x2f[_0x85f3[55]]){_0x7db7x2f[_0x85f3[55]]= moment(_0x7db7x2f[_0x85f3[55]])[_0x85f3[68]](1,_0x85f3[67])}else {_0x7db7x2f[_0x85f3[55]]= moment(_0x7db7x2f[_0x85f3[53]])[_0x85f3[68]](1,_0x85f3[67])};_[_0x85f3[69]](_0x7db7x1f[_0x85f3[65]],{createdAt:{$gte:_0x7db7x2f[_0x85f3[53]],$lte:_0x7db7x2f[_0x85f3[55]]}})};if(_0x7db7x2c[_0x85f3[54]][_0x85f3[70]]){_0x7db7x1f[_0x85f3[65]]= _[_0x85f3[69]](_0x7db7x1f[_0x85f3[65]],{$or:_[_0x85f3[72]](_0x7db7x1f[_0x85f3[58]],function(_0x7db7x30){var _0x7db7x2e={};_0x7db7x2e[_0x7db7x30]= {$like:_0x85f3[71]+ _0x7db7x2c[_0x85f3[54]][_0x85f3[70]]+ _0x85f3[71]};return _0x7db7x2e})})};_0x7db7x1f= _[_0x85f3[69]]({},_0x7db7x1f,_0x7db7x2c[_0x85f3[73]]);var _0x7db7x31={where:_0x7db7x1f[_0x85f3[65]]};return db[_0x85f3[50]][_0x85f3[30]](_0x7db7x31)[_0x85f3[40]](function(_0x7db7x20){_0x7db7x2e[_0x85f3[30]]= _0x7db7x20;if(_0x7db7x2c[_0x85f3[54]][_0x85f3[76]]){_0x7db7x1f[_0x85f3[77]]= [{all:true}]};return db[_0x85f3[50]][_0x85f3[78]](_0x7db7x1f)})[_0x85f3[40]](function(_0x7db7x32){_0x7db7x2e[_0x85f3[75]]= _0x7db7x32;return _0x7db7x2e})[_0x85f3[40]](respondWithFilteredResult(_0x7db7x1a,_0x7db7x1f))[_0x85f3[74]](handleError(_0x7db7x1a,null))};exports[_0x85f3[79]]= function(_0x7db7x2c,_0x7db7x1a){var _0x7db7x1f={raw:true,where:{id:_0x7db7x2c[_0x85f3[81]][_0x85f3[80]]}},_0x7db7x2d={};_0x7db7x2d[_0x85f3[48]]= _[_0x85f3[51]](db[_0x85f3[50]][_0x85f3[49]]);_0x7db7x2d[_0x85f3[54]]= _[_0x85f3[51]](_0x7db7x2c[_0x85f3[54]]);_0x7db7x2d[_0x85f3[56]]= _[_0x85f3[57]](_0x7db7x2d[_0x85f3[48]],_0x7db7x2d[_0x85f3[54]]);_0x7db7x1f[_0x85f3[58]]= _[_0x85f3[57]](_0x7db7x2d[_0x85f3[48]],qs[_0x85f3[59]](_0x7db7x2c[_0x85f3[54]][_0x85f3[59]]));_0x7db7x1f[_0x85f3[58]]= (_0x7db7x1f[_0x85f3[58]][_0x85f3[60]])?_0x7db7x1f[_0x85f3[58]]:_0x7db7x2d[_0x85f3[48]];if(_0x7db7x2c[_0x85f3[54]][_0x85f3[76]]){_0x7db7x1f[_0x85f3[77]]= [{all:true}]};_0x7db7x1f= _[_0x85f3[69]]({},_0x7db7x1f,_0x7db7x2c[_0x85f3[73]]);return db[_0x85f3[50]][_0x85f3[82]](_0x7db7x1f)[_0x85f3[40]](handleEntityNotFound(_0x7db7x1a,null))[_0x85f3[40]](respondWithResult(_0x7db7x1a,null))[_0x85f3[74]](handleError(_0x7db7x1a,null))};exports[_0x85f3[83]]= function(_0x7db7x2c,_0x7db7x1a){return db[_0x85f3[50]][_0x85f3[83]](_0x7db7x2c[_0x85f3[84]],{})[_0x85f3[40]](respondWithResult(_0x7db7x1a,201))[_0x85f3[74]](handleError(_0x7db7x1a,null))};exports[_0x85f3[41]]= function(_0x7db7x2c,_0x7db7x1a){if(_0x7db7x2c[_0x85f3[84]][_0x85f3[80]]){delete _0x7db7x2c[_0x85f3[84]][_0x85f3[80]]};return db[_0x85f3[50]][_0x85f3[82]]({where:{id:_0x7db7x2c[_0x85f3[81]][_0x85f3[80]]}})[_0x85f3[40]](handleEntityNotFound(_0x7db7x1a,null))[_0x85f3[40]](saveUpdates(_0x7db7x2c[_0x85f3[84]],null))[_0x85f3[40]](respondWithResult(_0x7db7x1a,null))[_0x85f3[74]](handleError(_0x7db7x1a,null))};exports[_0x85f3[42]]= function(_0x7db7x2c,_0x7db7x1a){return db[_0x85f3[50]][_0x85f3[82]]({where:{id:_0x7db7x2c[_0x85f3[81]][_0x85f3[80]]}})[_0x85f3[40]](handleEntityNotFound(_0x7db7x1a,null))[_0x85f3[40]](removeEntity(_0x7db7x1a,null))[_0x85f3[74]](handleError(_0x7db7x1a,null))};exports[_0x85f3[85]]= function(_0x7db7x2c,_0x7db7x1a,_0x7db7x33){return db[_0x85f3[50]][_0x85f3[82]]({where:{id:_0x7db7x2c[_0x85f3[81]][_0x85f3[80]]},attributes:[_0x85f3[80],_0x85f3[86],_0x85f3[91]]})[_0x85f3[40]](handleEntityNotFound(_0x7db7x1a,null))[_0x85f3[40]](function(_0x7db7x1c){if(_0x7db7x1c){if(!_0x7db7x1c[_0x85f3[86]]){throw  new db[_0x85f3[88]].ValidationError(_0x85f3[87])};var _0x7db7x34={"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x85f3[89],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E":_0x85f3[90]};if(_0x7db7x1c[_0x85f3[91]]){_0x7db7x34[_0x85f3[92]]= _0x85f3[93]+ _0x7db7x1c[_0x85f3[91]]+ _0x85f3[94]};_0x7db7x1a[_0x85f3[36]](_0x7db7x34);return _0x7db7x1a[_0x85f3[46]]( new Buffer(_0x7db7x1c[_0x85f3[86]]))}})[_0x85f3[74]](handleError(_0x7db7x1a,null))}
\ No newline at end of file
index c2c820a..9fdc33d 100644 (file)
@@ -1 +1 @@
-var _0xafa3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x64\x69\x72","\x64\x65\x66\x69\x6E\x65"];_0xafa3[0];var _=require(_0xafa3[1]);var util=require(_0xafa3[2]);var logger=require(_0xafa3[4])(_0xafa3[3]);var moment=require(_0xafa3[5]);var BPromise=require(_0xafa3[6]);var rp=require(_0xafa3[7]);var attributes=require(_0xafa3[8]);module[_0xafa3[9]]= function(_0x9463x8,_0x9463x9){return _0x9463x8[_0xafa3[13]](_0xafa3[10],attributes,{tableName:_0xafa3[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0xafa3[12],"\x66\x69\x65\x6C\x64\x73":[_0xafa3[12]]}],timestamps:false})}
\ No newline at end of file
+var _0xdbde=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x64\x69\x72","\x64\x65\x66\x69\x6E\x65"];_0xdbde[0];var _=require(_0xdbde[1]);var util=require(_0xdbde[2]);var logger=require(_0xdbde[4])(_0xdbde[3]);var moment=require(_0xdbde[5]);var BPromise=require(_0xdbde[6]);var rp=require(_0xdbde[7]);var attributes=require(_0xdbde[8]);module[_0xdbde[9]]= function(_0x91ccx8,_0x91ccx9){return _0x91ccx8[_0xdbde[13]](_0xdbde[10],attributes,{tableName:_0xdbde[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0xdbde[12],"\x66\x69\x65\x6C\x64\x73":[_0xdbde[12]]}],timestamps:false})}
\ No newline at end of file
index 7ec716a..df92443 100644 (file)
@@ -1 +1 @@
-var _0x1100=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x1100[0];var _=require(_0x1100[1]);var util=require(_0x1100[2]);var moment=require(_0x1100[3]);var BPromise=require(_0x1100[4]);var rs=require(_0x1100[5]);var fs=require(_0x1100[6]);var db=require(_0x1100[8])[_0x1100[7]];var utils=require(_0x1100[9]);var logger=require(_0x1100[11])(_0x1100[10]);var config=require(_0x1100[12]);var jayson=require(_0x1100[13]);var client=jayson[_0x1100[15]][_0x1100[14]]({port:9002});function respondWithRpcPromise(_0xede1xe,_0xede1xf,_0xede1x10){return  new BPromise(function(_0xede1x11,_0xede1x12){return client[_0x1100[28]](_0xede1xe,_0xede1x10)[_0x1100[27]](function(_0xede1x14){logger[_0x1100[20]](_0x1100[16],_0xede1xf,_0x1100[19]);logger[_0x1100[23]](_0x1100[21],_0xede1xf,_0x1100[19],JSON[_0x1100[22]](_0xede1x14));if(_0xede1x14[_0x1100[17]]){if(_0xede1x14[_0x1100[17]][_0x1100[24]]=== 500){logger[_0x1100[17]](_0x1100[16],_0xede1xf,_0xede1x14[_0x1100[17]][_0x1100[25]]);return _0xede1x12(_0xede1x14[_0x1100[17]][_0x1100[25]])};logger[_0x1100[17]](_0x1100[16],_0xede1xf,_0xede1x14[_0x1100[17]][_0x1100[25]]);return _0xede1x11(_0xede1x14[_0x1100[17]][_0x1100[25]])}else {logger[_0x1100[20]](_0x1100[16],_0xede1xf,_0x1100[19]);_0xede1x11(_0xede1x14[_0x1100[26]][_0x1100[25]])}})[_0x1100[18]](function(_0xede1x13){logger[_0x1100[17]](_0x1100[16],_0xede1xf,_0xede1x13);_0xede1x12(_0xede1x13)})})}
\ No newline at end of file
+var _0xf6f7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xf6f7[0];var _=require(_0xf6f7[1]);var util=require(_0xf6f7[2]);var moment=require(_0xf6f7[3]);var BPromise=require(_0xf6f7[4]);var rs=require(_0xf6f7[5]);var fs=require(_0xf6f7[6]);var db=require(_0xf6f7[8])[_0xf6f7[7]];var utils=require(_0xf6f7[9]);var logger=require(_0xf6f7[11])(_0xf6f7[10]);var config=require(_0xf6f7[12]);var jayson=require(_0xf6f7[13]);var client=jayson[_0xf6f7[15]][_0xf6f7[14]]({port:9002});function respondWithRpcPromise(_0x6efbxe,_0x6efbxf,_0x6efbx10){return  new BPromise(function(_0x6efbx11,_0x6efbx12){return client[_0xf6f7[28]](_0x6efbxe,_0x6efbx10)[_0xf6f7[27]](function(_0x6efbx14){logger[_0xf6f7[20]](_0xf6f7[16],_0x6efbxf,_0xf6f7[19]);logger[_0xf6f7[23]](_0xf6f7[21],_0x6efbxf,_0xf6f7[19],JSON[_0xf6f7[22]](_0x6efbx14));if(_0x6efbx14[_0xf6f7[17]]){if(_0x6efbx14[_0xf6f7[17]][_0xf6f7[24]]=== 500){logger[_0xf6f7[17]](_0xf6f7[16],_0x6efbxf,_0x6efbx14[_0xf6f7[17]][_0xf6f7[25]]);return _0x6efbx12(_0x6efbx14[_0xf6f7[17]][_0xf6f7[25]])};logger[_0xf6f7[17]](_0xf6f7[16],_0x6efbxf,_0x6efbx14[_0xf6f7[17]][_0xf6f7[25]]);return _0x6efbx11(_0x6efbx14[_0xf6f7[17]][_0xf6f7[25]])}else {logger[_0xf6f7[20]](_0xf6f7[16],_0x6efbxf,_0xf6f7[19]);_0x6efbx11(_0x6efbx14[_0xf6f7[26]][_0xf6f7[25]])}})[_0xf6f7[18]](function(_0x6efbx13){logger[_0xf6f7[17]](_0xf6f7[16],_0x6efbxf,_0x6efbx13);_0x6efbx12(_0x6efbx13)})})}
\ No newline at end of file
index defa452..059e30f 100644 (file)
@@ -1 +1 @@
-var _0xa7c9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x73\x6F\x75\x6E\x64\x73","\x67\x65\x74\x53\x6F\x75\x6E\x64\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x53\x6F\x75\x6E\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x2F\x3A\x69\x64\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x3A\x69\x64\x32","\x72\x65\x6D\x6F\x76\x65\x53\x6F\x75\x6E\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0xa7c9[0];var multer=require(_0xa7c9[1]);var util=require(_0xa7c9[2]);var path=require(_0xa7c9[3]);var express=require(_0xa7c9[4]);var router=express.Router();var auth=require(_0xa7c9[5]);var interaction=require(_0xa7c9[6]);var config=require(_0xa7c9[7]);var controller=require(_0xa7c9[8]);router[_0xa7c9[12]](_0xa7c9[9],auth[_0xa7c9[10]](),controller[_0xa7c9[11]]);router[_0xa7c9[12]](_0xa7c9[13],auth[_0xa7c9[10]](),controller[_0xa7c9[14]]);router[_0xa7c9[12]](_0xa7c9[15],auth[_0xa7c9[10]](),controller[_0xa7c9[16]]);router[_0xa7c9[18]](_0xa7c9[9],auth[_0xa7c9[10]](),controller[_0xa7c9[17]]);router[_0xa7c9[18]](_0xa7c9[15],auth[_0xa7c9[10]](),controller[_0xa7c9[19]]);router[_0xa7c9[21]](_0xa7c9[13],auth[_0xa7c9[10]](),controller[_0xa7c9[20]]);router[_0xa7c9[23]](_0xa7c9[13],auth[_0xa7c9[10]](),controller[_0xa7c9[22]]);router[_0xa7c9[23]](_0xa7c9[24],auth[_0xa7c9[10]](),controller[_0xa7c9[25]]);module[_0xa7c9[26]]= router
\ No newline at end of file
+var _0xd72e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x73\x6F\x75\x6E\x64\x73","\x67\x65\x74\x53\x6F\x75\x6E\x64\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x53\x6F\x75\x6E\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x2F\x3A\x69\x64\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x3A\x69\x64\x32","\x72\x65\x6D\x6F\x76\x65\x53\x6F\x75\x6E\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0xd72e[0];var multer=require(_0xd72e[1]);var util=require(_0xd72e[2]);var path=require(_0xd72e[3]);var express=require(_0xd72e[4]);var router=express.Router();var auth=require(_0xd72e[5]);var interaction=require(_0xd72e[6]);var config=require(_0xd72e[7]);var controller=require(_0xd72e[8]);router[_0xd72e[12]](_0xd72e[9],auth[_0xd72e[10]](),controller[_0xd72e[11]]);router[_0xd72e[12]](_0xd72e[13],auth[_0xd72e[10]](),controller[_0xd72e[14]]);router[_0xd72e[12]](_0xd72e[15],auth[_0xd72e[10]](),controller[_0xd72e[16]]);router[_0xd72e[18]](_0xd72e[9],auth[_0xd72e[10]](),controller[_0xd72e[17]]);router[_0xd72e[18]](_0xd72e[15],auth[_0xd72e[10]](),controller[_0xd72e[19]]);router[_0xd72e[21]](_0xd72e[13],auth[_0xd72e[10]](),controller[_0xd72e[20]]);router[_0xd72e[23]](_0xd72e[13],auth[_0xd72e[10]](),controller[_0xd72e[22]]);router[_0xd72e[23]](_0xd72e[24],auth[_0xd72e[10]](),controller[_0xd72e[25]]);module[_0xd72e[26]]= router
\ No newline at end of file
index f29e5fc..ccd7260 100644 (file)
@@ -1 +1 @@
-var _0xdb56=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D","\x66\x69\x6C\x65\x73","\x6D\x70\x33\x6E\x62","\x71\x75\x69\x65\x74\x6D\x70\x33\x6E\x62","\x71\x75\x69\x65\x74\x6D\x70\x33","\x6D\x70\x33","\x61\x6C\x70\x68\x61","\x54\x49\x4D\x45\x53\x54\x41\x4D\x50","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0xdb56[0];var Sequelize=require(_0xdb56[1]);module[_0xdb56[2]]= {name:{type:Sequelize[_0xdb56[3]],allowNull:false,unique:_0xdb56[4]},mode:{type:Sequelize.ENUM(_0xdb56[5],_0xdb56[6],_0xdb56[7],_0xdb56[8],_0xdb56[9],_0xdb56[10]),allowNull:true,defaultValue:_0xdb56[6]},directory:{type:Sequelize[_0xdb56[3]],allowNull:true},application:{type:Sequelize[_0xdb56[3]],allowNull:true},digit:{type:Sequelize[_0xdb56[3]],allowNull:true},sort:{type:Sequelize[_0xdb56[3]],allowNull:true,defaultValue:_0xdb56[11]},format:{type:Sequelize[_0xdb56[3]],allowNull:true},stamp:{type:_0xdb56[12]},defaultEntry:{type:Sequelize[_0xdb56[13]],defaultValue:0}}
\ No newline at end of file
+var _0xf8b9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D","\x66\x69\x6C\x65\x73","\x6D\x70\x33\x6E\x62","\x71\x75\x69\x65\x74\x6D\x70\x33\x6E\x62","\x71\x75\x69\x65\x74\x6D\x70\x33","\x6D\x70\x33","\x61\x6C\x70\x68\x61","\x54\x49\x4D\x45\x53\x54\x41\x4D\x50","\x42\x4F\x4F\x4C\x45\x41\x4E"];_0xf8b9[0];var Sequelize=require(_0xf8b9[1]);module[_0xf8b9[2]]= {name:{type:Sequelize[_0xf8b9[3]],allowNull:false,unique:_0xf8b9[4]},mode:{type:Sequelize.ENUM(_0xf8b9[5],_0xf8b9[6],_0xf8b9[7],_0xf8b9[8],_0xf8b9[9],_0xf8b9[10]),allowNull:true,defaultValue:_0xf8b9[6]},directory:{type:Sequelize[_0xf8b9[3]],allowNull:true},application:{type:Sequelize[_0xf8b9[3]],allowNull:true},digit:{type:Sequelize[_0xf8b9[3]],allowNull:true},sort:{type:Sequelize[_0xf8b9[3]],allowNull:true,defaultValue:_0xf8b9[11]},format:{type:Sequelize[_0xf8b9[3]],allowNull:true},stamp:{type:_0xf8b9[12]},defaultEntry:{type:Sequelize[_0xf8b9[13]],defaultValue:0}}
\ No newline at end of file
index 558ec7a..be4416a 100644 (file)
@@ -1 +1 @@
-var _0x9b87=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65","\x6D\x6F\x64\x65","\x66\x69\x6C\x65\x73","\x64\x69\x72\x65\x63\x74\x6F\x72\x79","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x6D\x6F\x68","\x6A\x6F\x69\x6E","\x30\x37\x37\x37","\x6D\x6B\x64\x69\x72\x53\x79\x6E\x63","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x65\x73\x73\x61\x67\x65","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x75\x6E\x6C\x69\x6E\x6B\x53\x79\x6E\x63","\x66\x6F\x72\x45\x61\x63\x68","\x72\x65\x61\x64\x64\x69\x72\x53\x79\x6E\x63","\x72\x6D\x64\x69\x72\x53\x79\x6E\x63","\x61\x64\x64\x53\x6F\x75\x6E\x64","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x25\x73\x2E\x25\x73","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x66\x6F\x72\x6D\x61\x74","\x66\x6F\x72\x6D\x61\x74","\x73\x79\x6D\x6C\x69\x6E\x6B\x53\x79\x6E\x63","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x53\x6F\x75\x6E\x64","\x72\x65\x6D\x6F\x76\x65\x53\x6F\x75\x6E\x64","\x69\x64\x32","\x67\x65\x74\x53\x6F\x75\x6E\x64\x73"];_0x9b87[0];var jsonpatch=require(_0x9b87[1]);var rp=require(_0x9b87[2]);var moment=require(_0x9b87[3]);var BPromise=require(_0x9b87[4]);var Mustache=require(_0x9b87[5]);var util=require(_0x9b87[6]);var path=require(_0x9b87[7]);var sox=require(_0x9b87[8]);var csv=require(_0x9b87[9]);var ejs=require(_0x9b87[10]);var fs=require(_0x9b87[11]);var _=require(_0x9b87[12]);var squel=require(_0x9b87[13]);var crypto=require(_0x9b87[14]);var jsforce=require(_0x9b87[15]);var deskjs=require(_0x9b87[16]);var toCsv=require(_0x9b87[9]);var querystring=require(_0x9b87[17]);var Papa=require(_0x9b87[18]);var qs=require(_0x9b87[19]);var logger=require(_0x9b87[21])(_0x9b87[20]);var utils=require(_0x9b87[22]);var config=require(_0x9b87[23]);var db=require(_0x9b87[25])[_0x9b87[24]];function respondWithStatusCode(_0xd3bbx1a,_0xd3bbx1b){_0xd3bbx1b= _0xd3bbx1b|| 204;return function(_0xd3bbx1c){if(_0xd3bbx1c){return _0xd3bbx1a[_0x9b87[26]](_0xd3bbx1b)};return _0xd3bbx1a[_0x9b87[28]](_0xd3bbx1b)[_0x9b87[27]]()}}function respondWithResult(_0xd3bbx1a,_0xd3bbx1b){_0xd3bbx1b= _0xd3bbx1b|| 200;return function(_0xd3bbx1c){if(_0xd3bbx1c){return _0xd3bbx1a[_0x9b87[28]](_0xd3bbx1b)[_0x9b87[29]](_0xd3bbx1c)}}}function respondWithFilteredResult(_0xd3bbx1a,_0xd3bbx1f){return function(_0xd3bbx1c){if(_0xd3bbx1c){var _0xd3bbx20=_0xd3bbx1c[_0x9b87[30]],_0xd3bbx21=_0xd3bbx1f[_0x9b87[31]],_0xd3bbx22=_0xd3bbx1f[_0x9b87[31]]+ _0xd3bbx1f[_0x9b87[32]],_0xd3bbx1b;if(_0xd3bbx22>= _0xd3bbx20){_0xd3bbx22= _0xd3bbx20;_0xd3bbx1b= 200}else {_0xd3bbx1b= 206};_0xd3bbx1a[_0x9b87[28]](_0xd3bbx1b);return _0xd3bbx1a[_0x9b87[36]](_0x9b87[33],_0xd3bbx21+ _0x9b87[34]+ _0xd3bbx22+ _0x9b87[35]+ _0xd3bbx20)[_0x9b87[29]](_0xd3bbx1c)};return null}}function patchUpdates(_0xd3bbx24){return function(_0xd3bbx1c){try{jsonpatch[_0x9b87[37]](_0xd3bbx1c,_0xd3bbx24,true)}catch(err){return BPromise[_0x9b87[38]](err)};return _0xd3bbx1c[_0x9b87[39]]()}}function saveUpdates(_0xd3bbx26,_0xd3bbx1b){return function(_0xd3bbx1c){if(_0xd3bbx1c){return _0xd3bbx1c[_0x9b87[41]](_0xd3bbx26)[_0x9b87[40]](function(_0xd3bbx27){return _0xd3bbx27})};return null}}function removeEntity(_0xd3bbx1a,_0xd3bbx1b){return function(_0xd3bbx1c){if(_0xd3bbx1c){return _0xd3bbx1c[_0x9b87[42]]()[_0x9b87[40]](function(){_0xd3bbx1a[_0x9b87[28]](204)[_0x9b87[27]]()})}}}function handleEntityNotFound(_0xd3bbx1a,_0xd3bbx1b){return function(_0xd3bbx1c){if(!_0xd3bbx1c){_0xd3bbx1a[_0x9b87[26]](404)};return _0xd3bbx1c}}function handleError(_0xd3bbx1a,_0xd3bbx1b){_0xd3bbx1b= _0xd3bbx1b|| 500;return function(_0xd3bbx2b){logger[_0x9b87[44]](_0xd3bbx2b[_0x9b87[43]]);if(_0xd3bbx2b[_0x9b87[45]]){delete _0xd3bbx2b[_0x9b87[45]]};_0xd3bbx1a[_0x9b87[28]](_0xd3bbx1b)[_0x9b87[46]](_0xd3bbx2b)}}exports[_0x9b87[47]]= function(_0xd3bbx2c,_0xd3bbx1a){var _0xd3bbx1f={},_0xd3bbx2d={},_0xd3bbx2e={count:0,rows:[]};_0xd3bbx2d[_0x9b87[48]]= _[_0x9b87[51]](db[_0x9b87[50]][_0x9b87[49]]);var _0xd3bbx2f={dateStart:_0xd3bbx2c[_0x9b87[53]][_0x9b87[52]],dateEnd:_0xd3bbx2c[_0x9b87[53]][_0x9b87[54]]};delete _0xd3bbx2c[_0x9b87[53]][_0x9b87[52]];delete _0xd3bbx2c[_0x9b87[53]][_0x9b87[54]];_0xd3bbx2d[_0x9b87[53]]= _[_0x9b87[51]](_0xd3bbx2c[_0x9b87[53]]);_0xd3bbx2d[_0x9b87[55]]= _[_0x9b87[56]](_0xd3bbx2d[_0x9b87[48]],_0xd3bbx2d[_0x9b87[53]]);_0xd3bbx1f[_0x9b87[57]]= _[_0x9b87[56]](_0xd3bbx2d[_0x9b87[48]],qs[_0x9b87[58]](_0xd3bbx2c[_0x9b87[53]][_0x9b87[58]]));_0xd3bbx1f[_0x9b87[57]]= (_0xd3bbx1f[_0x9b87[57]][_0x9b87[59]])?_0xd3bbx1f[_0x9b87[57]]:_0xd3bbx2d[_0x9b87[48]];if(!_0xd3bbx2c[_0x9b87[53]][_0x9b87[61]](_0x9b87[60])){_0xd3bbx1f[_0x9b87[32]]= qs[_0x9b87[32]](_0xd3bbx2c[_0x9b87[53]][_0x9b87[32]]);_0xd3bbx1f[_0x9b87[31]]= qs[_0x9b87[31]](_0xd3bbx2c[_0x9b87[53]][_0x9b87[31]])};_0xd3bbx1f[_0x9b87[62]]= qs[_0x9b87[63]](_0xd3bbx2c[_0x9b87[53]][_0x9b87[63]]);_0xd3bbx1f[_0x9b87[64]]= qs[_0x9b87[55]](_[_0x9b87[65]](_0xd3bbx2c[_0x9b87[53]],_0xd3bbx2d[_0x9b87[55]]));if(_0xd3bbx2f[_0x9b87[52]]){if(_0xd3bbx2f[_0x9b87[54]]){_0xd3bbx2f[_0x9b87[54]]= moment(_0xd3bbx2f[_0x9b87[54]])[_0x9b87[67]](1,_0x9b87[66])}else {_0xd3bbx2f[_0x9b87[54]]= moment(_0xd3bbx2f[_0x9b87[52]])[_0x9b87[67]](1,_0x9b87[66])};_[_0x9b87[68]](_0xd3bbx1f[_0x9b87[64]],{createdAt:{$gte:_0xd3bbx2f[_0x9b87[52]],$lte:_0xd3bbx2f[_0x9b87[54]]}})};if(_0xd3bbx2c[_0x9b87[53]][_0x9b87[69]]){_0xd3bbx1f[_0x9b87[64]]= _[_0x9b87[68]](_0xd3bbx1f[_0x9b87[64]],{$or:_[_0x9b87[71]](_0xd3bbx1f[_0x9b87[57]],function(_0xd3bbx30){var _0xd3bbx2e={};_0xd3bbx2e[_0xd3bbx30]= {$like:_0x9b87[70]+ _0xd3bbx2c[_0x9b87[53]][_0x9b87[69]]+ _0x9b87[70]};return _0xd3bbx2e})})};_0xd3bbx1f= _[_0x9b87[68]]({},_0xd3bbx1f,_0xd3bbx2c[_0x9b87[72]]);var _0xd3bbx31={where:_0xd3bbx1f[_0x9b87[64]]};return db[_0x9b87[50]][_0x9b87[30]](_0xd3bbx31)[_0x9b87[40]](function(_0xd3bbx20){_0xd3bbx2e[_0x9b87[30]]= _0xd3bbx20;if(_0xd3bbx2c[_0x9b87[53]][_0x9b87[75]]){_0xd3bbx1f[_0x9b87[76]]= [{all:true}]};return db[_0x9b87[50]][_0x9b87[77]](_0xd3bbx1f)})[_0x9b87[40]](function(_0xd3bbx32){_0xd3bbx2e[_0x9b87[74]]= _0xd3bbx32;return _0xd3bbx2e})[_0x9b87[40]](respondWithFilteredResult(_0xd3bbx1a,_0xd3bbx1f))[_0x9b87[73]](handleError(_0xd3bbx1a,null))};exports[_0x9b87[78]]= function(_0xd3bbx2c,_0xd3bbx1a){var _0xd3bbx1f={raw:false,where:{id:_0xd3bbx2c[_0x9b87[80]][_0x9b87[79]]}},_0xd3bbx2d={};_0xd3bbx2d[_0x9b87[48]]= _[_0x9b87[51]](db[_0x9b87[50]][_0x9b87[49]]);_0xd3bbx2d[_0x9b87[53]]= _[_0x9b87[51]](_0xd3bbx2c[_0x9b87[53]]);_0xd3bbx2d[_0x9b87[55]]= _[_0x9b87[56]](_0xd3bbx2d[_0x9b87[48]],_0xd3bbx2d[_0x9b87[53]]);_0xd3bbx1f[_0x9b87[57]]= _[_0x9b87[56]](_0xd3bbx2d[_0x9b87[48]],qs[_0x9b87[58]](_0xd3bbx2c[_0x9b87[53]][_0x9b87[58]]));_0xd3bbx1f[_0x9b87[57]]= (_0xd3bbx1f[_0x9b87[57]][_0x9b87[59]])?_0xd3bbx1f[_0x9b87[57]]:_0xd3bbx2d[_0x9b87[48]];if(_0xd3bbx2c[_0x9b87[53]][_0x9b87[75]]){_0xd3bbx1f[_0x9b87[76]]= [{all:true}]};_0xd3bbx1f= _[_0x9b87[68]]({},_0xd3bbx1f,_0xd3bbx2c[_0x9b87[72]]);return db[_0x9b87[50]][_0x9b87[81]](_0xd3bbx1f)[_0x9b87[40]](handleEntityNotFound(_0xd3bbx1a,null))[_0x9b87[40]](respondWithResult(_0xd3bbx1a,null))[_0x9b87[73]](handleError(_0xd3bbx1a,null))};exports[_0x9b87[41]]= function(_0xd3bbx2c,_0xd3bbx1a){if(_0xd3bbx2c[_0x9b87[82]][_0x9b87[79]]){delete _0xd3bbx2c[_0x9b87[82]][_0x9b87[79]]};return db[_0x9b87[50]][_0x9b87[81]]({where:{id:_0xd3bbx2c[_0x9b87[80]][_0x9b87[79]]}})[_0x9b87[40]](handleEntityNotFound(_0xd3bbx1a,null))[_0x9b87[40]](saveUpdates(_0xd3bbx2c[_0x9b87[82]],null))[_0x9b87[40]](respondWithResult(_0xd3bbx1a,null))[_0x9b87[73]](handleError(_0xd3bbx1a,null))};exports[_0x9b87[83]]= function(_0xd3bbx2c,_0xd3bbx1a,_0xd3bbx33){return db[_0x9b87[93]][_0x9b87[92]](function(_0xd3bbx34){if(_0xd3bbx2c[_0x9b87[82]][_0x9b87[84]]=== _0x9b87[85]){_0xd3bbx2c[_0x9b87[82]][_0x9b87[86]]= path[_0x9b87[89]](config[_0x9b87[87]],_0x9b87[88],_0xd3bbx2c[_0x9b87[82]][_0x9b87[45]])};return db[_0x9b87[50]][_0x9b87[83]](_0xd3bbx2c[_0x9b87[82]],{transaction:_0xd3bbx34})[_0x9b87[40]](function(_0xd3bbx1c){if(_0xd3bbx2c[_0x9b87[82]][_0x9b87[84]]=== _0x9b87[85]){fs[_0x9b87[91]](_0xd3bbx1c[_0x9b87[86]],parseInt(_0x9b87[90],8))};return _0xd3bbx1c})})[_0x9b87[40]](respondWithResult(_0xd3bbx1a,201))[_0x9b87[73]](handleError(_0xd3bbx1a,null))};exports[_0x9b87[42]]= function(_0xd3bbx2c,_0xd3bbx1a,_0xd3bbx33){var _0xd3bbx35;return db[_0x9b87[50]][_0x9b87[81]]({where:{id:_0xd3bbx2c[_0x9b87[80]][_0x9b87[79]]}})[_0x9b87[40]](function(_0xd3bbx1c){if(_0xd3bbx1c){return db[_0x9b87[93]][_0x9b87[92]](function(_0xd3bbx34){return _0xd3bbx1c[_0x9b87[42]]({transaction:_0xd3bbx34,raw:true})[_0x9b87[40]](function(_0xd3bbx1c){if(_0xd3bbx1c[_0x9b87[86]]){fs[_0x9b87[98]](_0xd3bbx1c[_0x9b87[86]])[_0x9b87[97]](function(_0xd3bbx36){fs[_0x9b87[96]](path[_0x9b87[89]](_0xd3bbx1c[_0x9b87[86]],_0xd3bbx36))});fs[_0x9b87[99]](_0xd3bbx1c[_0x9b87[86]])};return _0xd3bbx1c})})[_0x9b87[73]](function(_0xd3bbx2b){throw  new db[_0x9b87[95]].ValidationError(_0xd3bbx2b[_0x9b87[94]])})}})[_0x9b87[40]](handleEntityNotFound(_0xd3bbx1a,null))[_0x9b87[40]](removeEntity(_0xd3bbx1a,null))[_0x9b87[73]](handleError(_0xd3bbx1a,null))};exports[_0x9b87[100]]= function(_0xd3bbx2c,_0xd3bbx1a,_0xd3bbx33){return db[_0x9b87[93]][_0x9b87[92]](function(_0xd3bbx34){var _0xd3bbx37;return db[_0x9b87[50]][_0x9b87[81]]({where:{id:_0xd3bbx2c[_0x9b87[80]][_0x9b87[79]]}})[_0x9b87[40]](function(_0xd3bbx1c){if(_0xd3bbx1c){_0xd3bbx37= _0xd3bbx1c;return _0xd3bbx1c[_0x9b87[100]](_0xd3bbx2c[_0x9b87[82]][_0x9b87[79]],{transaction:_0xd3bbx34})}})[_0x9b87[40]](function(_0xd3bbx1c){if(_0xd3bbx1c){return db[_0x9b87[111]][_0x9b87[110]]({where:{id:_0xd3bbx2c[_0x9b87[82]][_0x9b87[79]]},attributes:[_0x9b87[79],_0x9b87[45],_0x9b87[103],_0x9b87[106],_0x9b87[109]],raw:true})}})[_0x9b87[40]](function(_0xd3bbx1c){if(_0xd3bbx1c){var _0xd3bbx38=path[_0x9b87[89]](config[_0x9b87[87]],_0x9b87[101],util[_0x9b87[107]](_0x9b87[102],path[_0x9b87[105]](_0xd3bbx1c[_0x9b87[103]],path[_0x9b87[104]](_0xd3bbx1c[_0x9b87[103]])),_0xd3bbx1c[_0x9b87[106]]));var _0xd3bbx39=path[_0x9b87[89]](config[_0x9b87[87]],_0x9b87[88],_0xd3bbx37[_0x9b87[45]],util[_0x9b87[107]](_0x9b87[102],_0xd3bbx1c[_0x9b87[45]],_0xd3bbx1c[_0x9b87[106]]));fs[_0x9b87[108]](_0xd3bbx38,_0xd3bbx39);return _0xd3bbx1c}})[_0x9b87[73]](function(_0xd3bbx2b){throw  new db[_0x9b87[95]].ValidationError(_0xd3bbx2b[_0x9b87[94]])})})[_0x9b87[40]](handleEntityNotFound(_0xd3bbx1a,null))[_0x9b87[40]](respondWithResult(_0xd3bbx1a,201))[_0x9b87[73]](handleError(_0xd3bbx1a,null))};exports[_0x9b87[112]]= function(_0xd3bbx2c,_0xd3bbx1a,_0xd3bbx33){return db[_0x9b87[93]][_0x9b87[92]](function(_0xd3bbx34){var _0xd3bbx37;return db[_0x9b87[50]][_0x9b87[110]]({where:{id:_0xd3bbx2c[_0x9b87[80]][_0x9b87[79]]}})[_0x9b87[40]](handleEntityNotFound(_0xd3bbx1a,null))[_0x9b87[40]](function(_0xd3bbx1c){if(_0xd3bbx1c){_0xd3bbx37= _0xd3bbx1c;return _0xd3bbx1c[_0x9b87[112]](_0xd3bbx2c[_0x9b87[80]][_0x9b87[113]])}})[_0x9b87[40]](function(_0xd3bbx1c){if(_0xd3bbx1c){return db[_0x9b87[111]][_0x9b87[110]]({where:{id:_0xd3bbx2c[_0x9b87[80]][_0x9b87[113]]},attributes:[_0x9b87[79],_0x9b87[45],_0x9b87[103],_0x9b87[106],_0x9b87[109]],raw:true})}})[_0x9b87[40]](function(_0xd3bbx1c){if(_0xd3bbx1c){fs[_0x9b87[96]](path[_0x9b87[89]](_0xd3bbx37[_0x9b87[86]],util[_0x9b87[107]](_0x9b87[102],_0xd3bbx1c[_0x9b87[45]],_0xd3bbx1c[_0x9b87[106]])));return _0xd3bbx1c}})[_0x9b87[73]](function(_0xd3bbx2b){throw  new db[_0x9b87[95]].ValidationError(_0xd3bbx2b[_0x9b87[94]])})})[_0x9b87[40]](handleEntityNotFound(_0xd3bbx1a,null))[_0x9b87[40]](respondWithStatusCode(_0xd3bbx1a,204))[_0x9b87[73]](handleError(_0xd3bbx1a,null))};exports[_0x9b87[114]]= function(_0xd3bbx2c,_0xd3bbx1c,_0xd3bbx33){var _0xd3bbx1f={};var _0xd3bbx2d={};var _0xd3bbx3a;var _0xd3bbx20;return db[_0x9b87[50]][_0x9b87[110]]({where:{id:_0xd3bbx2c[_0x9b87[80]][_0x9b87[79]]}})[_0x9b87[40]](handleEntityNotFound(_0xd3bbx1c,null))[_0x9b87[40]](function(_0xd3bbx1c){if(_0xd3bbx1c){_0xd3bbx3a= _0xd3bbx1c;_0xd3bbx2d[_0x9b87[48]]= _[_0x9b87[51]](db[_0x9b87[111]][_0x9b87[49]]);_0xd3bbx2d[_0x9b87[53]]= _[_0x9b87[51]](_0xd3bbx2c[_0x9b87[53]]);_0xd3bbx2d[_0x9b87[55]]= _[_0x9b87[56]](_0xd3bbx2d[_0x9b87[48]],_0xd3bbx2d[_0x9b87[53]]);_0xd3bbx1f[_0x9b87[57]]= _[_0x9b87[56]](_0xd3bbx2d[_0x9b87[48]],qs[_0x9b87[58]](_0xd3bbx2c[_0x9b87[53]][_0x9b87[58]]));_0xd3bbx1f[_0x9b87[57]]= (_0xd3bbx1f[_0x9b87[57]][_0x9b87[59]])?_0xd3bbx1f[_0x9b87[57]]:_0xd3bbx2d[_0x9b87[48]];_0xd3bbx1f[_0x9b87[62]]= qs[_0x9b87[63]](_0xd3bbx2c[_0x9b87[53]][_0x9b87[63]]);_0xd3bbx1f[_0x9b87[64]]= qs[_0x9b87[55]](_[_0x9b87[65]](_0xd3bbx2c[_0x9b87[53]],_0xd3bbx2d[_0x9b87[55]]));if(_0xd3bbx2c[_0x9b87[53]][_0x9b87[69]]){_0xd3bbx1f[_0x9b87[64]]= _[_0x9b87[68]](_0xd3bbx1f[_0x9b87[64]],{$or:_[_0x9b87[71]](_0xd3bbx1f[_0x9b87[57]],function(_0xd3bbx30){var _0xd3bbx2e={};_0xd3bbx2e[_0xd3bbx30]= {$like:_0x9b87[70]+ _0xd3bbx2c[_0x9b87[53]][_0x9b87[69]]+ _0x9b87[70]};return _0xd3bbx2e})})};_0xd3bbx1f= _[_0x9b87[68]]({},_0xd3bbx1f,_0xd3bbx2c[_0x9b87[72]]);return _0xd3bbx3a[_0x9b87[114]](_0xd3bbx1f)}})[_0x9b87[40]](function(_0xd3bbx3b){if(_0xd3bbx3b){_0xd3bbx20= _0xd3bbx3b[_0x9b87[59]];if(!_0xd3bbx2c[_0x9b87[53]][_0x9b87[61]](_0x9b87[60])){_0xd3bbx1f[_0x9b87[32]]= qs[_0x9b87[32]](_0xd3bbx2c[_0x9b87[53]][_0x9b87[32]]);_0xd3bbx1f[_0x9b87[31]]= qs[_0x9b87[31]](_0xd3bbx2c[_0x9b87[53]][_0x9b87[31]])};return _0xd3bbx3a[_0x9b87[114]](_0xd3bbx1f)}})[_0x9b87[40]](function(_0xd3bbx32){if(_0xd3bbx32){return _0xd3bbx32?{count:_0xd3bbx20,rows:_0xd3bbx32}:null}})[_0x9b87[40]](respondWithResult(_0xd3bbx1c,null))[_0x9b87[73]](handleError(_0xd3bbx1c,null))}
\ No newline at end of file
+var _0xd291=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65","\x6D\x6F\x64\x65","\x66\x69\x6C\x65\x73","\x64\x69\x72\x65\x63\x74\x6F\x72\x79","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x6D\x6F\x68","\x6A\x6F\x69\x6E","\x30\x37\x37\x37","\x6D\x6B\x64\x69\x72\x53\x79\x6E\x63","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x65\x73\x73\x61\x67\x65","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x75\x6E\x6C\x69\x6E\x6B\x53\x79\x6E\x63","\x66\x6F\x72\x45\x61\x63\x68","\x72\x65\x61\x64\x64\x69\x72\x53\x79\x6E\x63","\x72\x6D\x64\x69\x72\x53\x79\x6E\x63","\x61\x64\x64\x53\x6F\x75\x6E\x64","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x25\x73\x2E\x25\x73","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x66\x6F\x72\x6D\x61\x74","\x66\x6F\x72\x6D\x61\x74","\x73\x79\x6D\x6C\x69\x6E\x6B\x53\x79\x6E\x63","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x53\x6F\x75\x6E\x64","\x72\x65\x6D\x6F\x76\x65\x53\x6F\x75\x6E\x64","\x69\x64\x32","\x67\x65\x74\x53\x6F\x75\x6E\x64\x73"];_0xd291[0];var jsonpatch=require(_0xd291[1]);var rp=require(_0xd291[2]);var moment=require(_0xd291[3]);var BPromise=require(_0xd291[4]);var Mustache=require(_0xd291[5]);var util=require(_0xd291[6]);var path=require(_0xd291[7]);var sox=require(_0xd291[8]);var csv=require(_0xd291[9]);var ejs=require(_0xd291[10]);var fs=require(_0xd291[11]);var _=require(_0xd291[12]);var squel=require(_0xd291[13]);var crypto=require(_0xd291[14]);var jsforce=require(_0xd291[15]);var deskjs=require(_0xd291[16]);var toCsv=require(_0xd291[9]);var querystring=require(_0xd291[17]);var Papa=require(_0xd291[18]);var qs=require(_0xd291[19]);var logger=require(_0xd291[21])(_0xd291[20]);var utils=require(_0xd291[22]);var config=require(_0xd291[23]);var db=require(_0xd291[25])[_0xd291[24]];function respondWithStatusCode(_0x359bx1a,_0x359bx1b){_0x359bx1b= _0x359bx1b|| 204;return function(_0x359bx1c){if(_0x359bx1c){return _0x359bx1a[_0xd291[26]](_0x359bx1b)};return _0x359bx1a[_0xd291[28]](_0x359bx1b)[_0xd291[27]]()}}function respondWithResult(_0x359bx1a,_0x359bx1b){_0x359bx1b= _0x359bx1b|| 200;return function(_0x359bx1c){if(_0x359bx1c){return _0x359bx1a[_0xd291[28]](_0x359bx1b)[_0xd291[29]](_0x359bx1c)}}}function respondWithFilteredResult(_0x359bx1a,_0x359bx1f){return function(_0x359bx1c){if(_0x359bx1c){var _0x359bx20=_0x359bx1c[_0xd291[30]],_0x359bx21=_0x359bx1f[_0xd291[31]],_0x359bx22=_0x359bx1f[_0xd291[31]]+ _0x359bx1f[_0xd291[32]],_0x359bx1b;if(_0x359bx22>= _0x359bx20){_0x359bx22= _0x359bx20;_0x359bx1b= 200}else {_0x359bx1b= 206};_0x359bx1a[_0xd291[28]](_0x359bx1b);return _0x359bx1a[_0xd291[36]](_0xd291[33],_0x359bx21+ _0xd291[34]+ _0x359bx22+ _0xd291[35]+ _0x359bx20)[_0xd291[29]](_0x359bx1c)};return null}}function patchUpdates(_0x359bx24){return function(_0x359bx1c){try{jsonpatch[_0xd291[37]](_0x359bx1c,_0x359bx24,true)}catch(err){return BPromise[_0xd291[38]](err)};return _0x359bx1c[_0xd291[39]]()}}function saveUpdates(_0x359bx26,_0x359bx1b){return function(_0x359bx1c){if(_0x359bx1c){return _0x359bx1c[_0xd291[41]](_0x359bx26)[_0xd291[40]](function(_0x359bx27){return _0x359bx27})};return null}}function removeEntity(_0x359bx1a,_0x359bx1b){return function(_0x359bx1c){if(_0x359bx1c){return _0x359bx1c[_0xd291[42]]()[_0xd291[40]](function(){_0x359bx1a[_0xd291[28]](204)[_0xd291[27]]()})}}}function handleEntityNotFound(_0x359bx1a,_0x359bx1b){return function(_0x359bx1c){if(!_0x359bx1c){_0x359bx1a[_0xd291[26]](404)};return _0x359bx1c}}function handleError(_0x359bx1a,_0x359bx1b){_0x359bx1b= _0x359bx1b|| 500;return function(_0x359bx2b){logger[_0xd291[44]](_0x359bx2b[_0xd291[43]]);if(_0x359bx2b[_0xd291[45]]){delete _0x359bx2b[_0xd291[45]]};_0x359bx1a[_0xd291[28]](_0x359bx1b)[_0xd291[46]](_0x359bx2b)}}exports[_0xd291[47]]= function(_0x359bx2c,_0x359bx1a){var _0x359bx1f={},_0x359bx2d={},_0x359bx2e={count:0,rows:[]};_0x359bx2d[_0xd291[48]]= _[_0xd291[51]](db[_0xd291[50]][_0xd291[49]]);var _0x359bx2f={dateStart:_0x359bx2c[_0xd291[53]][_0xd291[52]],dateEnd:_0x359bx2c[_0xd291[53]][_0xd291[54]]};delete _0x359bx2c[_0xd291[53]][_0xd291[52]];delete _0x359bx2c[_0xd291[53]][_0xd291[54]];_0x359bx2d[_0xd291[53]]= _[_0xd291[51]](_0x359bx2c[_0xd291[53]]);_0x359bx2d[_0xd291[55]]= _[_0xd291[56]](_0x359bx2d[_0xd291[48]],_0x359bx2d[_0xd291[53]]);_0x359bx1f[_0xd291[57]]= _[_0xd291[56]](_0x359bx2d[_0xd291[48]],qs[_0xd291[58]](_0x359bx2c[_0xd291[53]][_0xd291[58]]));_0x359bx1f[_0xd291[57]]= (_0x359bx1f[_0xd291[57]][_0xd291[59]])?_0x359bx1f[_0xd291[57]]:_0x359bx2d[_0xd291[48]];if(!_0x359bx2c[_0xd291[53]][_0xd291[61]](_0xd291[60])){_0x359bx1f[_0xd291[32]]= qs[_0xd291[32]](_0x359bx2c[_0xd291[53]][_0xd291[32]]);_0x359bx1f[_0xd291[31]]= qs[_0xd291[31]](_0x359bx2c[_0xd291[53]][_0xd291[31]])};_0x359bx1f[_0xd291[62]]= qs[_0xd291[63]](_0x359bx2c[_0xd291[53]][_0xd291[63]]);_0x359bx1f[_0xd291[64]]= qs[_0xd291[55]](_[_0xd291[65]](_0x359bx2c[_0xd291[53]],_0x359bx2d[_0xd291[55]]));if(_0x359bx2f[_0xd291[52]]){if(_0x359bx2f[_0xd291[54]]){_0x359bx2f[_0xd291[54]]= moment(_0x359bx2f[_0xd291[54]])[_0xd291[67]](1,_0xd291[66])}else {_0x359bx2f[_0xd291[54]]= moment(_0x359bx2f[_0xd291[52]])[_0xd291[67]](1,_0xd291[66])};_[_0xd291[68]](_0x359bx1f[_0xd291[64]],{createdAt:{$gte:_0x359bx2f[_0xd291[52]],$lte:_0x359bx2f[_0xd291[54]]}})};if(_0x359bx2c[_0xd291[53]][_0xd291[69]]){_0x359bx1f[_0xd291[64]]= _[_0xd291[68]](_0x359bx1f[_0xd291[64]],{$or:_[_0xd291[71]](_0x359bx1f[_0xd291[57]],function(_0x359bx30){var _0x359bx2e={};_0x359bx2e[_0x359bx30]= {$like:_0xd291[70]+ _0x359bx2c[_0xd291[53]][_0xd291[69]]+ _0xd291[70]};return _0x359bx2e})})};_0x359bx1f= _[_0xd291[68]]({},_0x359bx1f,_0x359bx2c[_0xd291[72]]);var _0x359bx31={where:_0x359bx1f[_0xd291[64]]};return db[_0xd291[50]][_0xd291[30]](_0x359bx31)[_0xd291[40]](function(_0x359bx20){_0x359bx2e[_0xd291[30]]= _0x359bx20;if(_0x359bx2c[_0xd291[53]][_0xd291[75]]){_0x359bx1f[_0xd291[76]]= [{all:true}]};return db[_0xd291[50]][_0xd291[77]](_0x359bx1f)})[_0xd291[40]](function(_0x359bx32){_0x359bx2e[_0xd291[74]]= _0x359bx32;return _0x359bx2e})[_0xd291[40]](respondWithFilteredResult(_0x359bx1a,_0x359bx1f))[_0xd291[73]](handleError(_0x359bx1a,null))};exports[_0xd291[78]]= function(_0x359bx2c,_0x359bx1a){var _0x359bx1f={raw:false,where:{id:_0x359bx2c[_0xd291[80]][_0xd291[79]]}},_0x359bx2d={};_0x359bx2d[_0xd291[48]]= _[_0xd291[51]](db[_0xd291[50]][_0xd291[49]]);_0x359bx2d[_0xd291[53]]= _[_0xd291[51]](_0x359bx2c[_0xd291[53]]);_0x359bx2d[_0xd291[55]]= _[_0xd291[56]](_0x359bx2d[_0xd291[48]],_0x359bx2d[_0xd291[53]]);_0x359bx1f[_0xd291[57]]= _[_0xd291[56]](_0x359bx2d[_0xd291[48]],qs[_0xd291[58]](_0x359bx2c[_0xd291[53]][_0xd291[58]]));_0x359bx1f[_0xd291[57]]= (_0x359bx1f[_0xd291[57]][_0xd291[59]])?_0x359bx1f[_0xd291[57]]:_0x359bx2d[_0xd291[48]];if(_0x359bx2c[_0xd291[53]][_0xd291[75]]){_0x359bx1f[_0xd291[76]]= [{all:true}]};_0x359bx1f= _[_0xd291[68]]({},_0x359bx1f,_0x359bx2c[_0xd291[72]]);return db[_0xd291[50]][_0xd291[81]](_0x359bx1f)[_0xd291[40]](handleEntityNotFound(_0x359bx1a,null))[_0xd291[40]](respondWithResult(_0x359bx1a,null))[_0xd291[73]](handleError(_0x359bx1a,null))};exports[_0xd291[41]]= function(_0x359bx2c,_0x359bx1a){if(_0x359bx2c[_0xd291[82]][_0xd291[79]]){delete _0x359bx2c[_0xd291[82]][_0xd291[79]]};return db[_0xd291[50]][_0xd291[81]]({where:{id:_0x359bx2c[_0xd291[80]][_0xd291[79]]}})[_0xd291[40]](handleEntityNotFound(_0x359bx1a,null))[_0xd291[40]](saveUpdates(_0x359bx2c[_0xd291[82]],null))[_0xd291[40]](respondWithResult(_0x359bx1a,null))[_0xd291[73]](handleError(_0x359bx1a,null))};exports[_0xd291[83]]= function(_0x359bx2c,_0x359bx1a,_0x359bx33){return db[_0xd291[93]][_0xd291[92]](function(_0x359bx34){if(_0x359bx2c[_0xd291[82]][_0xd291[84]]=== _0xd291[85]){_0x359bx2c[_0xd291[82]][_0xd291[86]]= path[_0xd291[89]](config[_0xd291[87]],_0xd291[88],_0x359bx2c[_0xd291[82]][_0xd291[45]])};return db[_0xd291[50]][_0xd291[83]](_0x359bx2c[_0xd291[82]],{transaction:_0x359bx34})[_0xd291[40]](function(_0x359bx1c){if(_0x359bx2c[_0xd291[82]][_0xd291[84]]=== _0xd291[85]){fs[_0xd291[91]](_0x359bx1c[_0xd291[86]],parseInt(_0xd291[90],8))};return _0x359bx1c})})[_0xd291[40]](respondWithResult(_0x359bx1a,201))[_0xd291[73]](handleError(_0x359bx1a,null))};exports[_0xd291[42]]= function(_0x359bx2c,_0x359bx1a,_0x359bx33){var _0x359bx35;return db[_0xd291[50]][_0xd291[81]]({where:{id:_0x359bx2c[_0xd291[80]][_0xd291[79]]}})[_0xd291[40]](function(_0x359bx1c){if(_0x359bx1c){return db[_0xd291[93]][_0xd291[92]](function(_0x359bx34){return _0x359bx1c[_0xd291[42]]({transaction:_0x359bx34,raw:true})[_0xd291[40]](function(_0x359bx1c){if(_0x359bx1c[_0xd291[86]]){fs[_0xd291[98]](_0x359bx1c[_0xd291[86]])[_0xd291[97]](function(_0x359bx36){fs[_0xd291[96]](path[_0xd291[89]](_0x359bx1c[_0xd291[86]],_0x359bx36))});fs[_0xd291[99]](_0x359bx1c[_0xd291[86]])};return _0x359bx1c})})[_0xd291[73]](function(_0x359bx2b){throw  new db[_0xd291[95]].ValidationError(_0x359bx2b[_0xd291[94]])})}})[_0xd291[40]](handleEntityNotFound(_0x359bx1a,null))[_0xd291[40]](removeEntity(_0x359bx1a,null))[_0xd291[73]](handleError(_0x359bx1a,null))};exports[_0xd291[100]]= function(_0x359bx2c,_0x359bx1a,_0x359bx33){return db[_0xd291[93]][_0xd291[92]](function(_0x359bx34){var _0x359bx37;return db[_0xd291[50]][_0xd291[81]]({where:{id:_0x359bx2c[_0xd291[80]][_0xd291[79]]}})[_0xd291[40]](function(_0x359bx1c){if(_0x359bx1c){_0x359bx37= _0x359bx1c;return _0x359bx1c[_0xd291[100]](_0x359bx2c[_0xd291[82]][_0xd291[79]],{transaction:_0x359bx34})}})[_0xd291[40]](function(_0x359bx1c){if(_0x359bx1c){return db[_0xd291[111]][_0xd291[110]]({where:{id:_0x359bx2c[_0xd291[82]][_0xd291[79]]},attributes:[_0xd291[79],_0xd291[45],_0xd291[103],_0xd291[106],_0xd291[109]],raw:true})}})[_0xd291[40]](function(_0x359bx1c){if(_0x359bx1c){var _0x359bx38=path[_0xd291[89]](config[_0xd291[87]],_0xd291[101],util[_0xd291[107]](_0xd291[102],path[_0xd291[105]](_0x359bx1c[_0xd291[103]],path[_0xd291[104]](_0x359bx1c[_0xd291[103]])),_0x359bx1c[_0xd291[106]]));var _0x359bx39=path[_0xd291[89]](config[_0xd291[87]],_0xd291[88],_0x359bx37[_0xd291[45]],util[_0xd291[107]](_0xd291[102],_0x359bx1c[_0xd291[45]],_0x359bx1c[_0xd291[106]]));fs[_0xd291[108]](_0x359bx38,_0x359bx39);return _0x359bx1c}})[_0xd291[73]](function(_0x359bx2b){throw  new db[_0xd291[95]].ValidationError(_0x359bx2b[_0xd291[94]])})})[_0xd291[40]](handleEntityNotFound(_0x359bx1a,null))[_0xd291[40]](respondWithResult(_0x359bx1a,201))[_0xd291[73]](handleError(_0x359bx1a,null))};exports[_0xd291[112]]= function(_0x359bx2c,_0x359bx1a,_0x359bx33){return db[_0xd291[93]][_0xd291[92]](function(_0x359bx34){var _0x359bx37;return db[_0xd291[50]][_0xd291[110]]({where:{id:_0x359bx2c[_0xd291[80]][_0xd291[79]]}})[_0xd291[40]](handleEntityNotFound(_0x359bx1a,null))[_0xd291[40]](function(_0x359bx1c){if(_0x359bx1c){_0x359bx37= _0x359bx1c;return _0x359bx1c[_0xd291[112]](_0x359bx2c[_0xd291[80]][_0xd291[113]])}})[_0xd291[40]](function(_0x359bx1c){if(_0x359bx1c){return db[_0xd291[111]][_0xd291[110]]({where:{id:_0x359bx2c[_0xd291[80]][_0xd291[113]]},attributes:[_0xd291[79],_0xd291[45],_0xd291[103],_0xd291[106],_0xd291[109]],raw:true})}})[_0xd291[40]](function(_0x359bx1c){if(_0x359bx1c){fs[_0xd291[96]](path[_0xd291[89]](_0x359bx37[_0xd291[86]],util[_0xd291[107]](_0xd291[102],_0x359bx1c[_0xd291[45]],_0x359bx1c[_0xd291[106]])));return _0x359bx1c}})[_0xd291[73]](function(_0x359bx2b){throw  new db[_0xd291[95]].ValidationError(_0x359bx2b[_0xd291[94]])})})[_0xd291[40]](handleEntityNotFound(_0x359bx1a,null))[_0xd291[40]](respondWithStatusCode(_0x359bx1a,204))[_0xd291[73]](handleError(_0x359bx1a,null))};exports[_0xd291[114]]= function(_0x359bx2c,_0x359bx1c,_0x359bx33){var _0x359bx1f={};var _0x359bx2d={};var _0x359bx3a;var _0x359bx20;return db[_0xd291[50]][_0xd291[110]]({where:{id:_0x359bx2c[_0xd291[80]][_0xd291[79]]}})[_0xd291[40]](handleEntityNotFound(_0x359bx1c,null))[_0xd291[40]](function(_0x359bx1c){if(_0x359bx1c){_0x359bx3a= _0x359bx1c;_0x359bx2d[_0xd291[48]]= _[_0xd291[51]](db[_0xd291[111]][_0xd291[49]]);_0x359bx2d[_0xd291[53]]= _[_0xd291[51]](_0x359bx2c[_0xd291[53]]);_0x359bx2d[_0xd291[55]]= _[_0xd291[56]](_0x359bx2d[_0xd291[48]],_0x359bx2d[_0xd291[53]]);_0x359bx1f[_0xd291[57]]= _[_0xd291[56]](_0x359bx2d[_0xd291[48]],qs[_0xd291[58]](_0x359bx2c[_0xd291[53]][_0xd291[58]]));_0x359bx1f[_0xd291[57]]= (_0x359bx1f[_0xd291[57]][_0xd291[59]])?_0x359bx1f[_0xd291[57]]:_0x359bx2d[_0xd291[48]];_0x359bx1f[_0xd291[62]]= qs[_0xd291[63]](_0x359bx2c[_0xd291[53]][_0xd291[63]]);_0x359bx1f[_0xd291[64]]= qs[_0xd291[55]](_[_0xd291[65]](_0x359bx2c[_0xd291[53]],_0x359bx2d[_0xd291[55]]));if(_0x359bx2c[_0xd291[53]][_0xd291[69]]){_0x359bx1f[_0xd291[64]]= _[_0xd291[68]](_0x359bx1f[_0xd291[64]],{$or:_[_0xd291[71]](_0x359bx1f[_0xd291[57]],function(_0x359bx30){var _0x359bx2e={};_0x359bx2e[_0x359bx30]= {$like:_0xd291[70]+ _0x359bx2c[_0xd291[53]][_0xd291[69]]+ _0xd291[70]};return _0x359bx2e})})};_0x359bx1f= _[_0xd291[68]]({},_0x359bx1f,_0x359bx2c[_0xd291[72]]);return _0x359bx3a[_0xd291[114]](_0x359bx1f)}})[_0xd291[40]](function(_0x359bx3b){if(_0x359bx3b){_0x359bx20= _0x359bx3b[_0xd291[59]];if(!_0x359bx2c[_0xd291[53]][_0xd291[61]](_0xd291[60])){_0x359bx1f[_0xd291[32]]= qs[_0xd291[32]](_0x359bx2c[_0xd291[53]][_0xd291[32]]);_0x359bx1f[_0xd291[31]]= qs[_0xd291[31]](_0x359bx2c[_0xd291[53]][_0xd291[31]])};return _0x359bx3a[_0xd291[114]](_0x359bx1f)}})[_0xd291[40]](function(_0x359bx32){if(_0x359bx32){return _0x359bx32?{count:_0x359bx20,rows:_0x359bx32}:null}})[_0xd291[40]](respondWithResult(_0x359bx1c,null))[_0xd291[73]](handleError(_0x359bx1c,null))}
\ No newline at end of file
index 7a0fbd1..b480736 100644 (file)
@@ -1 +1 @@
-var _0x5234=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64","\x64\x65\x66\x69\x6E\x65"];_0x5234[0];var _=require(_0x5234[1]);var util=require(_0x5234[2]);var logger=require(_0x5234[4])(_0x5234[3]);var moment=require(_0x5234[5]);var BPromise=require(_0x5234[6]);var rp=require(_0x5234[7]);var attributes=require(_0x5234[8]);module[_0x5234[9]]= function(_0x6ce1x8,_0x6ce1x9){return _0x6ce1x8[_0x5234[12]](_0x5234[10],attributes,{tableName:_0x5234[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x45fe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64","\x64\x65\x66\x69\x6E\x65"];_0x45fe[0];var _=require(_0x45fe[1]);var util=require(_0x45fe[2]);var logger=require(_0x45fe[4])(_0x45fe[3]);var moment=require(_0x45fe[5]);var BPromise=require(_0x45fe[6]);var rp=require(_0x45fe[7]);var attributes=require(_0x45fe[8]);module[_0x45fe[9]]= function(_0x63f0x8,_0x63f0x9){return _0x63f0x8[_0x45fe[12]](_0x45fe[10],attributes,{tableName:_0x45fe[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 33425a9..504bfc2 100644 (file)
@@ -1 +1 @@
-var _0x9021=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x9021[0];var _=require(_0x9021[1]);var util=require(_0x9021[2]);var moment=require(_0x9021[3]);var BPromise=require(_0x9021[4]);var rs=require(_0x9021[5]);var fs=require(_0x9021[6]);var db=require(_0x9021[8])[_0x9021[7]];var utils=require(_0x9021[9]);var logger=require(_0x9021[11])(_0x9021[10]);var config=require(_0x9021[12]);var jayson=require(_0x9021[13]);var client=jayson[_0x9021[15]][_0x9021[14]]({port:9002});function respondWithRpcPromise(_0xe5a6xe,_0xe5a6xf,_0xe5a6x10){return  new BPromise(function(_0xe5a6x11,_0xe5a6x12){return client[_0x9021[28]](_0xe5a6xe,_0xe5a6x10)[_0x9021[27]](function(_0xe5a6x14){logger[_0x9021[20]](_0x9021[16],_0xe5a6xf,_0x9021[19]);logger[_0x9021[23]](_0x9021[21],_0xe5a6xf,_0x9021[19],JSON[_0x9021[22]](_0xe5a6x14));if(_0xe5a6x14[_0x9021[17]]){if(_0xe5a6x14[_0x9021[17]][_0x9021[24]]=== 500){logger[_0x9021[17]](_0x9021[16],_0xe5a6xf,_0xe5a6x14[_0x9021[17]][_0x9021[25]]);return _0xe5a6x12(_0xe5a6x14[_0x9021[17]][_0x9021[25]])};logger[_0x9021[17]](_0x9021[16],_0xe5a6xf,_0xe5a6x14[_0x9021[17]][_0x9021[25]]);return _0xe5a6x11(_0xe5a6x14[_0x9021[17]][_0x9021[25]])}else {logger[_0x9021[20]](_0x9021[16],_0xe5a6xf,_0x9021[19]);_0xe5a6x11(_0xe5a6x14[_0x9021[26]][_0x9021[25]])}})[_0x9021[18]](function(_0xe5a6x13){logger[_0x9021[17]](_0x9021[16],_0xe5a6xf,_0xe5a6x13);_0xe5a6x12(_0xe5a6x13)})})}
\ No newline at end of file
+var _0x6888=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x6888[0];var _=require(_0x6888[1]);var util=require(_0x6888[2]);var moment=require(_0x6888[3]);var BPromise=require(_0x6888[4]);var rs=require(_0x6888[5]);var fs=require(_0x6888[6]);var db=require(_0x6888[8])[_0x6888[7]];var utils=require(_0x6888[9]);var logger=require(_0x6888[11])(_0x6888[10]);var config=require(_0x6888[12]);var jayson=require(_0x6888[13]);var client=jayson[_0x6888[15]][_0x6888[14]]({port:9002});function respondWithRpcPromise(_0xda78xe,_0xda78xf,_0xda78x10){return  new BPromise(function(_0xda78x11,_0xda78x12){return client[_0x6888[28]](_0xda78xe,_0xda78x10)[_0x6888[27]](function(_0xda78x14){logger[_0x6888[20]](_0x6888[16],_0xda78xf,_0x6888[19]);logger[_0x6888[23]](_0x6888[21],_0xda78xf,_0x6888[19],JSON[_0x6888[22]](_0xda78x14));if(_0xda78x14[_0x6888[17]]){if(_0xda78x14[_0x6888[17]][_0x6888[24]]=== 500){logger[_0x6888[17]](_0x6888[16],_0xda78xf,_0xda78x14[_0x6888[17]][_0x6888[25]]);return _0xda78x12(_0xda78x14[_0x6888[17]][_0x6888[25]])};logger[_0x6888[17]](_0x6888[16],_0xda78xf,_0xda78x14[_0x6888[17]][_0x6888[25]]);return _0xda78x11(_0xda78x14[_0x6888[17]][_0x6888[25]])}else {logger[_0x6888[20]](_0x6888[16],_0xda78xf,_0x6888[19]);_0xda78x11(_0xda78x14[_0x6888[26]][_0x6888[25]])}})[_0x6888[18]](function(_0xda78x13){logger[_0x6888[17]](_0x6888[16],_0xda78xf,_0xda78x13);_0xda78x12(_0xda78x13)})})}
\ No newline at end of file
index 64e6c2a..38bab19 100644 (file)
@@ -1 +1 @@
-var _0xbc31=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x73","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x5F\x68\x69\x73\x74\x6F\x72\x69\x65\x73","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x69\x65\x73","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x5F\x66\x69\x6E\x61\x6C\x73","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x73","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x5F\x62\x6C\x61\x63\x6B","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x73","\x2F\x3A\x69\x64\x2F\x74\x65\x61\x6D\x73","\x67\x65\x74\x54\x65\x61\x6D\x73","\x2F\x3A\x69\x64\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x2F\x3A\x69\x64\x2F\x6D\x65\x6D\x62\x65\x72\x73","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x6C\x69\x73\x74\x73","\x67\x65\x74\x4C\x69\x73\x74\x73","\x2F\x3A\x69\x64\x2F\x62\x6C\x61\x63\x6B\x6C\x69\x73\x74\x73","\x67\x65\x74\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x54\x65\x61\x6D\x73","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x61\x64\x64\x4C\x69\x73\x74\x73","\x61\x64\x64\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x73","\x72\x65\x6D\x6F\x76\x65\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xbc31[0];var multer=require(_0xbc31[1]);var util=require(_0xbc31[2]);var path=require(_0xbc31[3]);var express=require(_0xbc31[4]);var router=express.Router();var auth=require(_0xbc31[5]);var interaction=require(_0xbc31[6]);var config=require(_0xbc31[7]);var controller=require(_0xbc31[8]);router[_0xbc31[12]](_0xbc31[9],auth[_0xbc31[10]](),controller[_0xbc31[11]]);router[_0xbc31[12]](_0xbc31[13],auth[_0xbc31[10]](),controller[_0xbc31[14]]);router[_0xbc31[12]](_0xbc31[15],auth[_0xbc31[10]](),controller[_0xbc31[16]]);router[_0xbc31[12]](_0xbc31[17],auth[_0xbc31[10]](),controller[_0xbc31[18]]);router[_0xbc31[12]](_0xbc31[19],auth[_0xbc31[10]](),controller[_0xbc31[20]]);router[_0xbc31[12]](_0xbc31[21],auth[_0xbc31[10]](),controller[_0xbc31[22]]);router[_0xbc31[12]](_0xbc31[23],auth[_0xbc31[10]](),controller[_0xbc31[24]]);router[_0xbc31[12]](_0xbc31[25],auth[_0xbc31[10]](),controller[_0xbc31[26]]);router[_0xbc31[12]](_0xbc31[27],auth[_0xbc31[10]](),controller[_0xbc31[28]]);router[_0xbc31[12]](_0xbc31[29],auth[_0xbc31[10]](),controller[_0xbc31[30]]);router[_0xbc31[12]](_0xbc31[31],auth[_0xbc31[10]](),controller[_0xbc31[32]]);router[_0xbc31[34]](_0xbc31[9],auth[_0xbc31[10]](),controller[_0xbc31[33]]);router[_0xbc31[34]](_0xbc31[23],auth[_0xbc31[10]](),controller[_0xbc31[35]]);router[_0xbc31[34]](_0xbc31[25],auth[_0xbc31[10]](),controller[_0xbc31[36]]);router[_0xbc31[34]](_0xbc31[29],auth[_0xbc31[10]](),controller[_0xbc31[37]]);router[_0xbc31[34]](_0xbc31[31],auth[_0xbc31[10]](),controller[_0xbc31[38]]);router[_0xbc31[40]](_0xbc31[13],auth[_0xbc31[10]](),controller[_0xbc31[39]]);router[_0xbc31[42]](_0xbc31[13],auth[_0xbc31[10]](),controller[_0xbc31[41]]);router[_0xbc31[42]](_0xbc31[23],auth[_0xbc31[10]](),controller[_0xbc31[43]]);router[_0xbc31[42]](_0xbc31[25],auth[_0xbc31[10]](),controller[_0xbc31[44]]);router[_0xbc31[42]](_0xbc31[29],auth[_0xbc31[10]](),controller[_0xbc31[45]]);router[_0xbc31[42]](_0xbc31[31],auth[_0xbc31[10]](),controller[_0xbc31[46]]);module[_0xbc31[47]]= router
\ No newline at end of file
+var _0x3f0f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x73","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x5F\x68\x69\x73\x74\x6F\x72\x69\x65\x73","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x69\x65\x73","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x5F\x66\x69\x6E\x61\x6C\x73","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x73","\x2F\x3A\x69\x64\x2F\x68\x6F\x70\x70\x65\x72\x5F\x62\x6C\x61\x63\x6B","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x73","\x2F\x3A\x69\x64\x2F\x74\x65\x61\x6D\x73","\x67\x65\x74\x54\x65\x61\x6D\x73","\x2F\x3A\x69\x64\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x2F\x3A\x69\x64\x2F\x6D\x65\x6D\x62\x65\x72\x73","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x2F\x3A\x69\x64\x2F\x6C\x69\x73\x74\x73","\x67\x65\x74\x4C\x69\x73\x74\x73","\x2F\x3A\x69\x64\x2F\x62\x6C\x61\x63\x6B\x6C\x69\x73\x74\x73","\x67\x65\x74\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x54\x65\x61\x6D\x73","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x61\x64\x64\x4C\x69\x73\x74\x73","\x61\x64\x64\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x73","\x72\x65\x6D\x6F\x76\x65\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x3f0f[0];var multer=require(_0x3f0f[1]);var util=require(_0x3f0f[2]);var path=require(_0x3f0f[3]);var express=require(_0x3f0f[4]);var router=express.Router();var auth=require(_0x3f0f[5]);var interaction=require(_0x3f0f[6]);var config=require(_0x3f0f[7]);var controller=require(_0x3f0f[8]);router[_0x3f0f[12]](_0x3f0f[9],auth[_0x3f0f[10]](),controller[_0x3f0f[11]]);router[_0x3f0f[12]](_0x3f0f[13],auth[_0x3f0f[10]](),controller[_0x3f0f[14]]);router[_0x3f0f[12]](_0x3f0f[15],auth[_0x3f0f[10]](),controller[_0x3f0f[16]]);router[_0x3f0f[12]](_0x3f0f[17],auth[_0x3f0f[10]](),controller[_0x3f0f[18]]);router[_0x3f0f[12]](_0x3f0f[19],auth[_0x3f0f[10]](),controller[_0x3f0f[20]]);router[_0x3f0f[12]](_0x3f0f[21],auth[_0x3f0f[10]](),controller[_0x3f0f[22]]);router[_0x3f0f[12]](_0x3f0f[23],auth[_0x3f0f[10]](),controller[_0x3f0f[24]]);router[_0x3f0f[12]](_0x3f0f[25],auth[_0x3f0f[10]](),controller[_0x3f0f[26]]);router[_0x3f0f[12]](_0x3f0f[27],auth[_0x3f0f[10]](),controller[_0x3f0f[28]]);router[_0x3f0f[12]](_0x3f0f[29],auth[_0x3f0f[10]](),controller[_0x3f0f[30]]);router[_0x3f0f[12]](_0x3f0f[31],auth[_0x3f0f[10]](),controller[_0x3f0f[32]]);router[_0x3f0f[34]](_0x3f0f[9],auth[_0x3f0f[10]](),controller[_0x3f0f[33]]);router[_0x3f0f[34]](_0x3f0f[23],auth[_0x3f0f[10]](),controller[_0x3f0f[35]]);router[_0x3f0f[34]](_0x3f0f[25],auth[_0x3f0f[10]](),controller[_0x3f0f[36]]);router[_0x3f0f[34]](_0x3f0f[29],auth[_0x3f0f[10]](),controller[_0x3f0f[37]]);router[_0x3f0f[34]](_0x3f0f[31],auth[_0x3f0f[10]](),controller[_0x3f0f[38]]);router[_0x3f0f[40]](_0x3f0f[13],auth[_0x3f0f[10]](),controller[_0x3f0f[39]]);router[_0x3f0f[42]](_0x3f0f[13],auth[_0x3f0f[10]](),controller[_0x3f0f[41]]);router[_0x3f0f[42]](_0x3f0f[23],auth[_0x3f0f[10]](),controller[_0x3f0f[43]]);router[_0x3f0f[42]](_0x3f0f[25],auth[_0x3f0f[10]](),controller[_0x3f0f[44]]);router[_0x3f0f[42]](_0x3f0f[29],auth[_0x3f0f[10]](),controller[_0x3f0f[45]]);router[_0x3f0f[42]](_0x3f0f[31],auth[_0x3f0f[10]](),controller[_0x3f0f[46]]);module[_0x3f0f[47]]= router
\ No newline at end of file
index 7136148..132568d 100644 (file)
@@ -1 +1 @@
-var _0x8d68=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x69\x6E\x62\x6F\x75\x6E\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x65\x66\x61\x75\x6C\x74","","\x72\x72","\x72\x69\x6E\x67\x61\x6C\x6C","\x6C\x65\x61\x73\x74\x72\x65\x63\x65\x6E\x74","\x66\x65\x77\x65\x73\x74\x63\x61\x6C\x6C\x73","\x72\x61\x6E\x64\x6F\x6D","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x6C\x69\x6E\x65\x61\x72","\x77\x72\x61\x6E\x64\x6F\x6D","\x72\x72\x6F\x72\x64\x65\x72\x65\x64","\x73\x74\x72\x61\x74\x65\x67\x79","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x74\x79\x70\x65","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x64\x69\x61\x6C\x4D\x65\x74\x68\x6F\x64","\x62\x6F\x6F\x6B\x65\x64","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E","\x70\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x70\x6F\x77\x65\x72","\x79\x65\x73","\x6E\x6F","\x61\x6C\x6C","\x6F\x6E\x63\x65","\x30","\x35","\x31\x30","\x31\x35","\x32\x30","\x33\x30","\x54\x45\x58\x54","\x70\x65\x72\x69\x6F\x64\x69\x63\x5F\x61\x6E\x6E\x6F\x75\x6E\x63\x65","\x2C","\x6A\x6F\x69\x6E","\x73\x70\x6C\x69\x74","\x6A\x6F\x69\x6E\x65\x6D\x70\x74\x79","\x6C\x65\x61\x76\x65\x77\x68\x65\x6E\x65\x6D\x70\x74\x79","\x42\x4F\x4F\x4C\x45\x41\x4E","\x61\x63\x77","\x77\x72\x61\x70\x75\x70\x74\x69\x6D\x65","\x41\x63\x74\x69\x76\x65\x2F\x44\x69\x73\x61\x63\x74\x69\x76\x65\x20\x43\x61\x6D\x70\x61\x69\x67\x6E","\x70\x72\x65\x76\x69\x65\x77","\x44\x69\x61\x6C\x20\x4D\x65\x74\x68\x6F\x64\x2E","\x55\x4E\x53\x49\x47\x4E\x45\x44","\x4D\x61\x78\x20\x39\x39\x39\x39\x20\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2C\x20\x30\x20\x6D\x65\x61\x6E\x73\x20\x75\x6E\x6C\x69\x6D\x69\x74\x65\x64\x2E","\x4D\x61\x78\x20\x39\x39\x39\x39\x20\x6D\x65\x6D\x62\x65\x72\x20\x69\x6E\x20\x71\x75\x65\x75\x65\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x39\x29\x2C\x20\x30\x20\x6D\x65\x61\x6E\x73\x20\x75\x6E\x6C\x69\x6D\x69\x74\x65\x64\x2E","\x50\x6F\x77\x65\x72\x20\x4C\x65\x76\x65\x6C\x3A\x20\x43\x61\x6C\x6C\x73\x20\x66\x6F\x72\x20\x61\x67\x65\x6E\x74\x73\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x31\x30\x29\x2E","\x61\x67\x65\x6E\x74\x42\x75\x73\x79\x46\x61\x63\x74\x6F\x72","\x64\x72\x6F\x70\x52\x61\x74\x65","\x4F\x6E\x6C\x79\x20\x66\x6F\x72\x20\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x20\x6D\x65\x74\x68\x6F\x64\x2E","\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x20\x4F\x70\x74\x69\x6D\x69\x7A\x61\x74\x69\x6F\x6E\x20\x50\x65\x72\x63\x65\x6E\x74\x61\x67\x65\x20\x28\x6D\x69\x6E\x3A\x20\x31\x2C\x20\x6D\x61\x78\x3A\x20\x39\x35\x29","\x49\x6E\x74\x65\x72\x76\x61\x6C\x20\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x20\x4D\x69\x6E\x75\x74\x65\x73\x20\x28\x6D\x69\x6E\x3A\x35\x20\x6D\x61\x78\x3A\x33\x30\x29","\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x20\x54\x69\x6D\x65\x6F\x75\x74\x20\x53\x65\x63\x6F\x6E\x64\x73\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x74\x54\x78\x58","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x69\x6B\x69\x2E\x61\x73\x74\x65\x72\x69\x73\x6B\x2E\x6F\x72\x67\x2F\x77\x69\x6B\x69\x2F\x64\x69\x73\x70\x6C\x61\x79\x2F\x41\x53\x54\x2F\x41\x73\x74\x65\x72\x69\x73\x6B\x2B\x31\x33\x2B\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x5F\x51\x75\x65\x75\x65","\x51\x75\x65\x75\x65\x20\x54\x69\x6D\x65\x6F\x75\x74\x20\x53\x65\x63\x6F\x6E\x64\x73\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x41\x47\x49\x20\x71\x75\x65\x75\x65\x20\x6F\x70\x74\x69\x6F\x6E\x20\x28\x75\x73\x65\x3A\x20\x61\x67\x69\x3A\x2F\x2F\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x2F\x73\x71\x75\x61\x72\x65\x2C\x3C\x70\x72\x6F\x6A\x65\x63\x74\x5F\x6E\x61\x6D\x65\x3E\x29","\x23\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x20\x52\x65\x74\x72\x79\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x20\x52\x65\x74\x72\x79\x20\x46\x72\x65\x71\x75\x65\x6E\x63\x79\x20\x4D\x69\x6E\x75\x74\x65\x73\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x39\x39\x29","\x23\x42\x75\x73\x79\x20\x52\x65\x74\x72\x79\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x42\x75\x73\x79\x20\x52\x65\x74\x72\x79\x20\x46\x72\x65\x71\x75\x65\x6E\x63\x79\x20\x4D\x69\x6E\x75\x74\x65\x73\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x39\x39\x29","\x23\x4E\x6F\x41\x6E\x73\x77\x65\x72\x20\x52\x65\x74\x72\x79\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x4E\x6F\x41\x6E\x73\x77\x65\x72\x20\x52\x65\x74\x72\x79\x20\x46\x72\x65\x71\x75\x65\x6E\x63\x79\x20\x4D\x69\x6E\x75\x74\x65\x73\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x39\x39\x29","\x23\x47\x6C\x6F\x62\x61\x6C\x20\x4D\x61\x78\x20\x52\x65\x74\x72\x79\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x30\x37\x3A\x30\x30\x2D\x32\x32\x3A\x30\x30\x2C\x2A\x2C\x2A\x2C\x2A","\x61\x6C\x77\x61\x79\x73","\x6E\x65\x76\x65\x72","\x6F\x6E\x6C\x79\x49\x66\x4F\x70\x65\x6E","\x41\x63\x74\x69\x76\x65\x2F\x44\x69\x73\x61\x63\x74\x69\x76\x65\x20\x41\x4D\x44","\x23\x41\x4D\x44\x20\x49\x6E\x69\x74\x69\x61\x6C\x20\x53\x69\x6C\x65\x6E\x63\x65","\x23\x41\x4D\x44\x20\x47\x72\x65\x65\x74\x69\x6E\x67","\x23\x41\x4D\x44\x20\x41\x66\x74\x65\x72\x20\x47\x72\x65\x65\x74\x69\x6E\x67\x20\x53\x69\x6C\x65\x6E\x63\x65","\x23\x41\x4D\x44\x20\x54\x6F\x74\x61\x6C\x20\x41\x6E\x61\x6C\x79\x73\x69\x73\x20\x54\x69\x6D\x65","\x23\x41\x4D\x44\x20\x4D\x69\x6E\x20\x57\x6F\x72\x64\x20\x4C\x65\x6E\x67\x74\x68","\x23\x41\x4D\x44\x20\x42\x65\x74\x77\x65\x65\x6E\x20\x57\x6F\x72\x64\x73\x20\x53\x69\x6C\x65\x6E\x63\x65","\x23\x41\x4D\x44\x20\x4D\x61\x78\x69\x6D\x75\x6D\x20\x4E\x75\x6D\x62\x65\x72\x20\x4F\x66\x20\x57\x6F\x72\x64\x73","\x23\x41\x4D\x44\x20\x53\x69\x6C\x65\x6E\x63\x65\x20\x54\x68\x72\x65\x73\x68\x6F\x6C\x64\x20\x28\x6D\x69\x6E\x3A\x30\x2C\x20\x6D\x61\x78\x3A\x33\x32\x37\x36\x37\x29","\x23\x41\x4D\x44\x20\x4D\x61\x78\x69\x6D\x75\x6D\x20\x57\x6F\x72\x64\x20\x4C\x65\x6E\x67\x74\x68","\x23\x52\x65\x63\x61\x6C\x6C\x4D\x65\x20\x54\x69\x6D\x65\x6F\x75\x74\x20\x28\x6D\x69\x6E\x3A\x31\x29","\x41\x63\x74\x69\x76\x65\x2F\x44\x69\x73\x61\x63\x74\x69\x76\x65\x20\x52\x65\x63\x61\x6C\x6C\x20\x49\x6E\x20\x51\x75\x65\x75\x65","\x44\x45\x53\x43","\x41\x53\x43"];_0x8d68[0];var Sequelize=require(_0x8d68[1]);module[_0x8d68[2]]= {name:{type:Sequelize[_0x8d68[3]],allowNull:false,unique:_0x8d68[4],validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i}},type:{type:Sequelize.ENUM(_0x8d68[5],_0x8d68[6]),allowNull:false,defaultValue:_0x8d68[5]},musiconhold:{type:Sequelize[_0x8d68[3]],defaultValue:_0x8d68[7]},announce:{type:Sequelize[_0x8d68[3]],defaultValue:_0x8d68[8]},strategy:{type:Sequelize.ENUM(_0x8d68[9],_0x8d68[10],_0x8d68[11],_0x8d68[12],_0x8d68[13],_0x8d68[14],_0x8d68[15],_0x8d68[16],_0x8d68[17]),allowNull:false,defaultValue:_0x8d68[10],set:function(_0x1abdx2){this[_0x8d68[19]](_0x8d68[18],_0x1abdx2?_0x1abdx2:_0x8d68[14])},get:function(){var _0x1abdx3=this[_0x8d68[21]](_0x8d68[20]);var _0x1abdx4=this[_0x8d68[21]](_0x8d68[22]);var _0x1abdx5=this[_0x8d68[21]](_0x8d68[18]);if(_0x1abdx3=== _0x8d68[5]){return _0x1abdx5};if((_0x1abdx4=== _0x8d68[23]&& _0x1abdx5=== _0x8d68[14])|| (_0x1abdx4=== _0x8d68[23]&& _0x1abdx5=== _0x8d68[24])){return _0x1abdx5};if(_0x1abdx4=== _0x8d68[25]|| _0x1abdx4=== _0x8d68[26]|| _0x1abdx4=== _0x8d68[27]){return _0x1abdx5};return null}},servicelevel:{type:Sequelize.INTEGER(11),defaultValue:0},context:{type:Sequelize[_0x8d68[3]],defaultValue:null},penaltymemberslimit:{type:Sequelize.INTEGER(11)},timeout:{type:Sequelize.INTEGER(11),defaultValue:15},retry:{type:Sequelize.INTEGER(11),defaultValue:2},timeoutpriority:{type:Sequelize[_0x8d68[3]]},weight:{type:Sequelize.INTEGER(11),allowNull:true,defaultValue:0},wrapuptime:{type:Sequelize.INTEGER(11),defaultValue:0},autofill:{type:Sequelize.ENUM(_0x8d68[28],_0x8d68[29]),defaultValue:_0x8d68[28]},autopause:{type:Sequelize.ENUM(_0x8d68[28],_0x8d68[29],_0x8d68[30]),defaultValue:_0x8d68[29]},autopausedelay:{type:Sequelize.INTEGER(11)},autopausebusy:{type:Sequelize.ENUM(_0x8d68[28],_0x8d68[29]),defaultValue:_0x8d68[29]},autopauseunavail:{type:Sequelize.ENUM(_0x8d68[28],_0x8d68[29]),defaultValue:_0x8d68[29]},maxlen:{type:Sequelize.INTEGER(11),defaultValue:0},setinterfacevar:{type:Sequelize.ENUM(_0x8d68[28],_0x8d68[29]),defaultValue:_0x8d68[29]},setqueueentryvar:{type:Sequelize.ENUM(_0x8d68[28],_0x8d68[29]),defautValue:_0x8d68[29]},setqueuevar:{type:Sequelize.ENUM(_0x8d68[28],_0x8d68[29]),defaultValue:_0x8d68[29]},eventmemberstatus:{type:Sequelize.ENUM(_0x8d68[28],_0x8d68[29]),defaultValue:_0x8d68[29]},membermacro:{type:Sequelize[_0x8d68[3]],allowNull:true},membergosub:{type:Sequelize[_0x8d68[3]],allowNull:true},announce_frequency:{type:Sequelize.INTEGER(11),defaultValue:0},min_announce_frequency:{type:Sequelize.INTEGER(11),defaultValue:0},periodic_announce_frequency:{type:Sequelize.INTEGER(11),defaultValue:0},random_periodic_announce:{type:Sequelize.ENUM(_0x8d68[28],_0x8d68[29]),defaultValue:_0x8d68[29]},relative_periodic_announce:{type:Sequelize.ENUM(_0x8d68[28],_0x8d68[29]),defaultValue:_0x8d68[28]},announce_holdtime:{type:Sequelize.ENUM(_0x8d68[28],_0x8d68[29],_0x8d68[31]),defaultValue:_0x8d68[29]},announce_position:{type:Sequelize[_0x8d68[3]],defaultValue:_0x8d68[29]},announce_to_first_user:{type:Sequelize.ENUM(_0x8d68[28],_0x8d68[29])},announce_position_limit:{type:Sequelize.INTEGER(11)},announce_round_seconds:{type:Sequelize.ENUM(_0x8d68[32],_0x8d68[33],_0x8d68[34],_0x8d68[35],_0x8d68[36],_0x8d68[37]),defaultValue:_0x8d68[32]},monitor_format:{type:Sequelize[_0x8d68[3]],defaultValue:_0x8d68[8]},monitor_type:{type:Sequelize[_0x8d68[3]]},queue_youarenext:{type:Sequelize[_0x8d68[3]],defaultValue:null},queue_thereare:{type:Sequelize[_0x8d68[3]],defaultValue:null},queue_callswaiting:{type:Sequelize[_0x8d68[3]],defaultValue:null},queue_holdtime:{type:Sequelize[_0x8d68[3]],defaultValue:null},queue_minute:{type:Sequelize[_0x8d68[3]],allowNull:true,defaultValue:null},queue_minutes:{type:Sequelize[_0x8d68[3]],defaultValue:null},queue_seconds:{type:Sequelize[_0x8d68[3]],defaultValue:null},queue_thankyou:{type:Sequelize[_0x8d68[3]],defaultValue:null},queue_reporthold:{type:Sequelize[_0x8d68[3]]},queue_quantity1:{type:Sequelize[_0x8d68[3]]},queue_quantity2:{type:Sequelize[_0x8d68[3]]},queue_periodic_announce:{type:Sequelize[_0x8d68[3]]},queue_less_than:{type:Sequelize[_0x8d68[3]]},periodic_announce:{type:Sequelize[_0x8d68[38]],set:function(_0x1abdx2){this[_0x8d68[19]](_0x8d68[39],_0x1abdx2?_0x1abdx2[_0x8d68[41]](_0x8d68[40]):[])},get:function(){return this[_0x8d68[21]](_0x8d68[39])?this[_0x8d68[21]](_0x8d68[39])[_0x8d68[42]](_0x8d68[40]):[]}},joinempty:{type:Sequelize[_0x8d68[3]],defaultValue:_0x8d68[28],set:function(_0x1abdx2){this[_0x8d68[19]](_0x8d68[43],_0x1abdx2?_0x1abdx2[_0x8d68[41]](_0x8d68[40]):[])},get:function(){return this[_0x8d68[21]](_0x8d68[43])?this[_0x8d68[21]](_0x8d68[43])[_0x8d68[42]](_0x8d68[40]):[]}},leavewhenempty:{type:Sequelize[_0x8d68[3]],defaultValue:_0x8d68[29],set:function(_0x1abdx2){this[_0x8d68[19]](_0x8d68[44],_0x1abdx2?_0x1abdx2[_0x8d68[41]](_0x8d68[40]):[])},get:function(){return this[_0x8d68[21]](_0x8d68[44])?this[_0x8d68[21]](_0x8d68[44])[_0x8d68[42]](_0x8d68[40]):[]}},reportholdtime:{type:Sequelize.ENUM(_0x8d68[28],_0x8d68[29]),defaultValue:_0x8d68[29]},ringinuse:{type:Sequelize.ENUM(_0x8d68[28],_0x8d68[29]),defaultValue:_0x8d68[29]},memberdelay:{type:Sequelize.INTEGER(11),defaultValue:0},timeoutrestart:{type:Sequelize.ENUM(_0x8d68[28],_0x8d68[29]),defaultValue:_0x8d68[29]},defaultrule:{type:Sequelize[_0x8d68[3]]},description:{type:Sequelize[_0x8d68[3]]},acw:{type:Sequelize[_0x8d68[45]],defaultValue:0,set:function(_0x1abdx2){this[_0x8d68[19]](_0x8d68[46],_0x1abdx2);if(_0x1abdx2){if(this[_0x8d68[21]](_0x8d68[47])< 2){this[_0x8d68[19]](_0x8d68[47],2)}}}},acwTimeout:{type:Sequelize.INTEGER(11),defaultValue:10},dialActive:{type:Sequelize[_0x8d68[45]],defaultValue:0,comment:_0x8d68[48]},dialMethod:{type:Sequelize.ENUM(_0x8d68[49],_0x8d68[25],_0x8d68[27],_0x8d68[26],_0x8d68[23]),defaultValue:_0x8d68[25],comment:_0x8d68[50]},dialLimitChannel:{type:Sequelize.INTEGER(4)[_0x8d68[51]],defaultValue:0,validate:{min:0,max:9999},comment:_0x8d68[52]},dialLimitQueue:{type:Sequelize.INTEGER(4)[_0x8d68[51]],defaultValue:0,validate:{min:0,max:9999},comment:_0x8d68[53]},dialPowerLevel:{type:Sequelize.FLOAT(2)[_0x8d68[51]],defaultValue:1,validate:{min:1,max:10},comment:_0x8d68[54]},dialPredictiveOptimization:{type:Sequelize.ENUM(_0x8d68[55],_0x8d68[56]),defaultValue:_0x8d68[56],comment:_0x8d68[57]},dialPredictiveOptimizationPercentage:{type:Sequelize.FLOAT(2)[_0x8d68[51]],defaultValue:3,validate:{min:1,max:95},comment:_0x8d68[58]},dialPredictiveInterval:{type:Sequelize.INTEGER(3)[_0x8d68[51]],defaultValue:10,validate:{min:5,max:30},comment:_0x8d68[59]},dialOriginateCallerIdName:{type:Sequelize[_0x8d68[3]]},dialOriginateCallerIdNumber:{type:Sequelize[_0x8d68[3]]},dialOriginateTimeout:{type:Sequelize.INTEGER(3)[_0x8d68[51]],defaultValue:30,validate:{min:1,max:999},comment:_0x8d68[60]},dialQueueOptions:{type:Sequelize[_0x8d68[3]],defaultValue:_0x8d68[61],comment:_0x8d68[62]},dialQueueTimeout:{type:Sequelize.INTEGER(3)[_0x8d68[51]],defaultValue:3,validate:{min:1,max:999},comment:_0x8d68[63]},dialQueueProject:{type:Sequelize[_0x8d68[3]],comment:_0x8d68[64]},dialCongestionMaxRetry:{type:Sequelize.INTEGER(3)[_0x8d68[51]],defaultValue:3,validate:{min:1,max:999},comment:_0x8d68[65]},dialCongestionRetryFrequency:{type:Sequelize.INTEGER(5)[_0x8d68[51]],validate:{min:1,max:99999},defaultValue:150,comment:_0x8d68[66]},dialBusyMaxRetry:{type:Sequelize.INTEGER(3)[_0x8d68[51]],defaultValue:3,validate:{min:1,max:999},comment:_0x8d68[67]},dialBusyRetryFrequency:{type:Sequelize.INTEGER(5)[_0x8d68[51]],validate:{min:1,max:99999},defaultValue:150,comment:_0x8d68[68]},dialNoAnswerMaxRetry:{type:Sequelize.INTEGER(3)[_0x8d68[51]],defaultValue:3,comment:_0x8d68[69]},dialNoAnswerRetryFrequency:{type:Sequelize.INTEGER(5)[_0x8d68[51]],validate:{min:1,max:99999},defaultValue:150,comment:_0x8d68[70]},dialGlobalMaxRetry:{type:Sequelize.INTEGER(3)[_0x8d68[51]],validate:{min:1,max:999},defaultValue:4,comment:_0x8d68[71]},dialTimezone:{type:Sequelize[_0x8d68[3]],defaultValue:null},dialGlobalInterval:{type:Sequelize[_0x8d68[3]],defaultValue:_0x8d68[72]},dialPrefix:{type:Sequelize[_0x8d68[3]],defaultValue:null},dialCheckDuplicateType:{type:Sequelize.ENUM(_0x8d68[73],_0x8d68[74],_0x8d68[75]),defaultValue:_0x8d68[73]},dialAMDActive:{type:Sequelize[_0x8d68[45]],defaultValue:0,comment:_0x8d68[76]},dialAMDInitialSilence:{type:Sequelize.INTEGER(9)[_0x8d68[51]],defaultValue:2500,validate:{min:0},comment:_0x8d68[77]},dialAMDGreeting:{type:Sequelize.INTEGER(9)[_0x8d68[51]],defaultValue:1500,validate:{min:0},comment:_0x8d68[78]},dialAMDAfterGreetingSilence:{type:Sequelize.INTEGER(9)[_0x8d68[51]],defaultValue:800,validate:{min:0},comment:_0x8d68[79]},dialAMDTotalAnalysisTime:{type:Sequelize.INTEGER(9)[_0x8d68[51]],defaultValue:5000,validate:{min:0},comment:_0x8d68[80]},dialAMDMinWordLength:{type:Sequelize.INTEGER(9)[_0x8d68[51]],defaultValue:100,validate:{min:0},comment:_0x8d68[81]},dialAMDBetweenWordsSilence:{type:Sequelize.INTEGER(9)[_0x8d68[51]],defaultValue:50,validate:{min:0},comment:_0x8d68[82]},dialAMDMaximumNumberOfWords:{type:Sequelize.INTEGER(9)[_0x8d68[51]],defaultValue:3,validate:{min:0},comment:_0x8d68[83]},dialAMDSilenceThreshold:{type:Sequelize.INTEGER(5)[_0x8d68[51]],validate:{min:0,max:32767},defaultValue:256,comment:_0x8d68[84]},dialAMDMaximumWordLength:{type:Sequelize.INTEGER(9)[_0x8d68[51]],defaultValue:5000,validate:{min:0},comment:_0x8d68[85]},dialRecallMeTimeout:{type:Sequelize.INTEGER(5)[_0x8d68[51]],validate:{min:1},defaultValue:30,comment:_0x8d68[86]},dialRecallInQueue:{type:Sequelize[_0x8d68[45]],defaultValue:0,comment:_0x8d68[87]},dialOrderByScheduledAt:{type:Sequelize.ENUM(_0x8d68[88],_0x8d68[89]),defaultValue:_0x8d68[88]},dialQueueProject2:{type:Sequelize[_0x8d68[3]],comment:_0x8d68[64]},dialAgiAfterHangupClient:{type:Sequelize[_0x8d68[45]],defaultValue:false},dialAgiAfterHangupAgent:{type:Sequelize[_0x8d68[45]],defaultValue:false}}
\ No newline at end of file
+var _0x2c9c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x69\x6E\x62\x6F\x75\x6E\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x65\x66\x61\x75\x6C\x74","","\x72\x72","\x72\x69\x6E\x67\x61\x6C\x6C","\x6C\x65\x61\x73\x74\x72\x65\x63\x65\x6E\x74","\x66\x65\x77\x65\x73\x74\x63\x61\x6C\x6C\x73","\x72\x61\x6E\x64\x6F\x6D","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x6C\x69\x6E\x65\x61\x72","\x77\x72\x61\x6E\x64\x6F\x6D","\x72\x72\x6F\x72\x64\x65\x72\x65\x64","\x73\x74\x72\x61\x74\x65\x67\x79","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x74\x79\x70\x65","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x64\x69\x61\x6C\x4D\x65\x74\x68\x6F\x64","\x62\x6F\x6F\x6B\x65\x64","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E","\x70\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x70\x6F\x77\x65\x72","\x79\x65\x73","\x6E\x6F","\x61\x6C\x6C","\x6F\x6E\x63\x65","\x30","\x35","\x31\x30","\x31\x35","\x32\x30","\x33\x30","\x54\x45\x58\x54","\x70\x65\x72\x69\x6F\x64\x69\x63\x5F\x61\x6E\x6E\x6F\x75\x6E\x63\x65","\x2C","\x6A\x6F\x69\x6E","\x73\x70\x6C\x69\x74","\x6A\x6F\x69\x6E\x65\x6D\x70\x74\x79","\x6C\x65\x61\x76\x65\x77\x68\x65\x6E\x65\x6D\x70\x74\x79","\x42\x4F\x4F\x4C\x45\x41\x4E","\x61\x63\x77","\x77\x72\x61\x70\x75\x70\x74\x69\x6D\x65","\x41\x63\x74\x69\x76\x65\x2F\x44\x69\x73\x61\x63\x74\x69\x76\x65\x20\x43\x61\x6D\x70\x61\x69\x67\x6E","\x70\x72\x65\x76\x69\x65\x77","\x44\x69\x61\x6C\x20\x4D\x65\x74\x68\x6F\x64\x2E","\x55\x4E\x53\x49\x47\x4E\x45\x44","\x4D\x61\x78\x20\x39\x39\x39\x39\x20\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2C\x20\x30\x20\x6D\x65\x61\x6E\x73\x20\x75\x6E\x6C\x69\x6D\x69\x74\x65\x64\x2E","\x4D\x61\x78\x20\x39\x39\x39\x39\x20\x6D\x65\x6D\x62\x65\x72\x20\x69\x6E\x20\x71\x75\x65\x75\x65\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x39\x29\x2C\x20\x30\x20\x6D\x65\x61\x6E\x73\x20\x75\x6E\x6C\x69\x6D\x69\x74\x65\x64\x2E","\x50\x6F\x77\x65\x72\x20\x4C\x65\x76\x65\x6C\x3A\x20\x43\x61\x6C\x6C\x73\x20\x66\x6F\x72\x20\x61\x67\x65\x6E\x74\x73\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x31\x30\x29\x2E","\x61\x67\x65\x6E\x74\x42\x75\x73\x79\x46\x61\x63\x74\x6F\x72","\x64\x72\x6F\x70\x52\x61\x74\x65","\x4F\x6E\x6C\x79\x20\x66\x6F\x72\x20\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x20\x6D\x65\x74\x68\x6F\x64\x2E","\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x20\x4F\x70\x74\x69\x6D\x69\x7A\x61\x74\x69\x6F\x6E\x20\x50\x65\x72\x63\x65\x6E\x74\x61\x67\x65\x20\x28\x6D\x69\x6E\x3A\x20\x31\x2C\x20\x6D\x61\x78\x3A\x20\x39\x35\x29","\x49\x6E\x74\x65\x72\x76\x61\x6C\x20\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x20\x4D\x69\x6E\x75\x74\x65\x73\x20\x28\x6D\x69\x6E\x3A\x35\x20\x6D\x61\x78\x3A\x33\x30\x29","\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x20\x54\x69\x6D\x65\x6F\x75\x74\x20\x53\x65\x63\x6F\x6E\x64\x73\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x74\x54\x78\x58","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x69\x6B\x69\x2E\x61\x73\x74\x65\x72\x69\x73\x6B\x2E\x6F\x72\x67\x2F\x77\x69\x6B\x69\x2F\x64\x69\x73\x70\x6C\x61\x79\x2F\x41\x53\x54\x2F\x41\x73\x74\x65\x72\x69\x73\x6B\x2B\x31\x33\x2B\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x5F\x51\x75\x65\x75\x65","\x51\x75\x65\x75\x65\x20\x54\x69\x6D\x65\x6F\x75\x74\x20\x53\x65\x63\x6F\x6E\x64\x73\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x41\x47\x49\x20\x71\x75\x65\x75\x65\x20\x6F\x70\x74\x69\x6F\x6E\x20\x28\x75\x73\x65\x3A\x20\x61\x67\x69\x3A\x2F\x2F\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x2F\x73\x71\x75\x61\x72\x65\x2C\x3C\x70\x72\x6F\x6A\x65\x63\x74\x5F\x6E\x61\x6D\x65\x3E\x29","\x23\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x20\x52\x65\x74\x72\x79\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x20\x52\x65\x74\x72\x79\x20\x46\x72\x65\x71\x75\x65\x6E\x63\x79\x20\x4D\x69\x6E\x75\x74\x65\x73\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x39\x39\x29","\x23\x42\x75\x73\x79\x20\x52\x65\x74\x72\x79\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x42\x75\x73\x79\x20\x52\x65\x74\x72\x79\x20\x46\x72\x65\x71\x75\x65\x6E\x63\x79\x20\x4D\x69\x6E\x75\x74\x65\x73\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x39\x39\x29","\x23\x4E\x6F\x41\x6E\x73\x77\x65\x72\x20\x52\x65\x74\x72\x79\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x4E\x6F\x41\x6E\x73\x77\x65\x72\x20\x52\x65\x74\x72\x79\x20\x46\x72\x65\x71\x75\x65\x6E\x63\x79\x20\x4D\x69\x6E\x75\x74\x65\x73\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x39\x39\x29","\x23\x47\x6C\x6F\x62\x61\x6C\x20\x4D\x61\x78\x20\x52\x65\x74\x72\x79\x20\x28\x6D\x69\x6E\x3A\x31\x2C\x20\x6D\x61\x78\x3A\x39\x39\x39\x29","\x30\x37\x3A\x30\x30\x2D\x32\x32\x3A\x30\x30\x2C\x2A\x2C\x2A\x2C\x2A","\x61\x6C\x77\x61\x79\x73","\x6E\x65\x76\x65\x72","\x6F\x6E\x6C\x79\x49\x66\x4F\x70\x65\x6E","\x41\x63\x74\x69\x76\x65\x2F\x44\x69\x73\x61\x63\x74\x69\x76\x65\x20\x41\x4D\x44","\x23\x41\x4D\x44\x20\x49\x6E\x69\x74\x69\x61\x6C\x20\x53\x69\x6C\x65\x6E\x63\x65","\x23\x41\x4D\x44\x20\x47\x72\x65\x65\x74\x69\x6E\x67","\x23\x41\x4D\x44\x20\x41\x66\x74\x65\x72\x20\x47\x72\x65\x65\x74\x69\x6E\x67\x20\x53\x69\x6C\x65\x6E\x63\x65","\x23\x41\x4D\x44\x20\x54\x6F\x74\x61\x6C\x20\x41\x6E\x61\x6C\x79\x73\x69\x73\x20\x54\x69\x6D\x65","\x23\x41\x4D\x44\x20\x4D\x69\x6E\x20\x57\x6F\x72\x64\x20\x4C\x65\x6E\x67\x74\x68","\x23\x41\x4D\x44\x20\x42\x65\x74\x77\x65\x65\x6E\x20\x57\x6F\x72\x64\x73\x20\x53\x69\x6C\x65\x6E\x63\x65","\x23\x41\x4D\x44\x20\x4D\x61\x78\x69\x6D\x75\x6D\x20\x4E\x75\x6D\x62\x65\x72\x20\x4F\x66\x20\x57\x6F\x72\x64\x73","\x23\x41\x4D\x44\x20\x53\x69\x6C\x65\x6E\x63\x65\x20\x54\x68\x72\x65\x73\x68\x6F\x6C\x64\x20\x28\x6D\x69\x6E\x3A\x30\x2C\x20\x6D\x61\x78\x3A\x33\x32\x37\x36\x37\x29","\x23\x41\x4D\x44\x20\x4D\x61\x78\x69\x6D\x75\x6D\x20\x57\x6F\x72\x64\x20\x4C\x65\x6E\x67\x74\x68","\x23\x52\x65\x63\x61\x6C\x6C\x4D\x65\x20\x54\x69\x6D\x65\x6F\x75\x74\x20\x28\x6D\x69\x6E\x3A\x31\x29","\x41\x63\x74\x69\x76\x65\x2F\x44\x69\x73\x61\x63\x74\x69\x76\x65\x20\x52\x65\x63\x61\x6C\x6C\x20\x49\x6E\x20\x51\x75\x65\x75\x65","\x44\x45\x53\x43","\x41\x53\x43"];_0x2c9c[0];var Sequelize=require(_0x2c9c[1]);module[_0x2c9c[2]]= {name:{type:Sequelize[_0x2c9c[3]],allowNull:false,unique:_0x2c9c[4],validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i}},type:{type:Sequelize.ENUM(_0x2c9c[5],_0x2c9c[6]),allowNull:false,defaultValue:_0x2c9c[5]},musiconhold:{type:Sequelize[_0x2c9c[3]],defaultValue:_0x2c9c[7]},announce:{type:Sequelize[_0x2c9c[3]],defaultValue:_0x2c9c[8]},strategy:{type:Sequelize.ENUM(_0x2c9c[9],_0x2c9c[10],_0x2c9c[11],_0x2c9c[12],_0x2c9c[13],_0x2c9c[14],_0x2c9c[15],_0x2c9c[16],_0x2c9c[17]),allowNull:false,defaultValue:_0x2c9c[10],set:function(_0xf211x2){this[_0x2c9c[19]](_0x2c9c[18],_0xf211x2?_0xf211x2:_0x2c9c[14])},get:function(){var _0xf211x3=this[_0x2c9c[21]](_0x2c9c[20]);var _0xf211x4=this[_0x2c9c[21]](_0x2c9c[22]);var _0xf211x5=this[_0x2c9c[21]](_0x2c9c[18]);if(_0xf211x3=== _0x2c9c[5]){return _0xf211x5};if((_0xf211x4=== _0x2c9c[23]&& _0xf211x5=== _0x2c9c[14])|| (_0xf211x4=== _0x2c9c[23]&& _0xf211x5=== _0x2c9c[24])){return _0xf211x5};if(_0xf211x4=== _0x2c9c[25]|| _0xf211x4=== _0x2c9c[26]|| _0xf211x4=== _0x2c9c[27]){return _0xf211x5};return null}},servicelevel:{type:Sequelize.INTEGER(11),defaultValue:0},context:{type:Sequelize[_0x2c9c[3]],defaultValue:null},penaltymemberslimit:{type:Sequelize.INTEGER(11)},timeout:{type:Sequelize.INTEGER(11),defaultValue:15},retry:{type:Sequelize.INTEGER(11),defaultValue:2},timeoutpriority:{type:Sequelize[_0x2c9c[3]]},weight:{type:Sequelize.INTEGER(11),allowNull:true,defaultValue:0},wrapuptime:{type:Sequelize.INTEGER(11),defaultValue:0},autofill:{type:Sequelize.ENUM(_0x2c9c[28],_0x2c9c[29]),defaultValue:_0x2c9c[28]},autopause:{type:Sequelize.ENUM(_0x2c9c[28],_0x2c9c[29],_0x2c9c[30]),defaultValue:_0x2c9c[29]},autopausedelay:{type:Sequelize.INTEGER(11)},autopausebusy:{type:Sequelize.ENUM(_0x2c9c[28],_0x2c9c[29]),defaultValue:_0x2c9c[29]},autopauseunavail:{type:Sequelize.ENUM(_0x2c9c[28],_0x2c9c[29]),defaultValue:_0x2c9c[29]},maxlen:{type:Sequelize.INTEGER(11),defaultValue:0},setinterfacevar:{type:Sequelize.ENUM(_0x2c9c[28],_0x2c9c[29]),defaultValue:_0x2c9c[29]},setqueueentryvar:{type:Sequelize.ENUM(_0x2c9c[28],_0x2c9c[29]),defautValue:_0x2c9c[29]},setqueuevar:{type:Sequelize.ENUM(_0x2c9c[28],_0x2c9c[29]),defaultValue:_0x2c9c[29]},eventmemberstatus:{type:Sequelize.ENUM(_0x2c9c[28],_0x2c9c[29]),defaultValue:_0x2c9c[29]},membermacro:{type:Sequelize[_0x2c9c[3]],allowNull:true},membergosub:{type:Sequelize[_0x2c9c[3]],allowNull:true},announce_frequency:{type:Sequelize.INTEGER(11),defaultValue:0},min_announce_frequency:{type:Sequelize.INTEGER(11),defaultValue:0},periodic_announce_frequency:{type:Sequelize.INTEGER(11),defaultValue:0},random_periodic_announce:{type:Sequelize.ENUM(_0x2c9c[28],_0x2c9c[29]),defaultValue:_0x2c9c[29]},relative_periodic_announce:{type:Sequelize.ENUM(_0x2c9c[28],_0x2c9c[29]),defaultValue:_0x2c9c[28]},announce_holdtime:{type:Sequelize.ENUM(_0x2c9c[28],_0x2c9c[29],_0x2c9c[31]),defaultValue:_0x2c9c[29]},announce_position:{type:Sequelize[_0x2c9c[3]],defaultValue:_0x2c9c[29]},announce_to_first_user:{type:Sequelize.ENUM(_0x2c9c[28],_0x2c9c[29])},announce_position_limit:{type:Sequelize.INTEGER(11)},announce_round_seconds:{type:Sequelize.ENUM(_0x2c9c[32],_0x2c9c[33],_0x2c9c[34],_0x2c9c[35],_0x2c9c[36],_0x2c9c[37]),defaultValue:_0x2c9c[32]},monitor_format:{type:Sequelize[_0x2c9c[3]],defaultValue:_0x2c9c[8]},monitor_type:{type:Sequelize[_0x2c9c[3]]},queue_youarenext:{type:Sequelize[_0x2c9c[3]],defaultValue:null},queue_thereare:{type:Sequelize[_0x2c9c[3]],defaultValue:null},queue_callswaiting:{type:Sequelize[_0x2c9c[3]],defaultValue:null},queue_holdtime:{type:Sequelize[_0x2c9c[3]],defaultValue:null},queue_minute:{type:Sequelize[_0x2c9c[3]],allowNull:true,defaultValue:null},queue_minutes:{type:Sequelize[_0x2c9c[3]],defaultValue:null},queue_seconds:{type:Sequelize[_0x2c9c[3]],defaultValue:null},queue_thankyou:{type:Sequelize[_0x2c9c[3]],defaultValue:null},queue_reporthold:{type:Sequelize[_0x2c9c[3]]},queue_quantity1:{type:Sequelize[_0x2c9c[3]]},queue_quantity2:{type:Sequelize[_0x2c9c[3]]},queue_periodic_announce:{type:Sequelize[_0x2c9c[3]]},queue_less_than:{type:Sequelize[_0x2c9c[3]]},periodic_announce:{type:Sequelize[_0x2c9c[38]],set:function(_0xf211x2){this[_0x2c9c[19]](_0x2c9c[39],_0xf211x2?_0xf211x2[_0x2c9c[41]](_0x2c9c[40]):[])},get:function(){return this[_0x2c9c[21]](_0x2c9c[39])?this[_0x2c9c[21]](_0x2c9c[39])[_0x2c9c[42]](_0x2c9c[40]):[]}},joinempty:{type:Sequelize[_0x2c9c[3]],defaultValue:_0x2c9c[28],set:function(_0xf211x2){this[_0x2c9c[19]](_0x2c9c[43],_0xf211x2?_0xf211x2[_0x2c9c[41]](_0x2c9c[40]):[])},get:function(){return this[_0x2c9c[21]](_0x2c9c[43])?this[_0x2c9c[21]](_0x2c9c[43])[_0x2c9c[42]](_0x2c9c[40]):[]}},leavewhenempty:{type:Sequelize[_0x2c9c[3]],defaultValue:_0x2c9c[29],set:function(_0xf211x2){this[_0x2c9c[19]](_0x2c9c[44],_0xf211x2?_0xf211x2[_0x2c9c[41]](_0x2c9c[40]):[])},get:function(){return this[_0x2c9c[21]](_0x2c9c[44])?this[_0x2c9c[21]](_0x2c9c[44])[_0x2c9c[42]](_0x2c9c[40]):[]}},reportholdtime:{type:Sequelize.ENUM(_0x2c9c[28],_0x2c9c[29]),defaultValue:_0x2c9c[29]},ringinuse:{type:Sequelize.ENUM(_0x2c9c[28],_0x2c9c[29]),defaultValue:_0x2c9c[29]},memberdelay:{type:Sequelize.INTEGER(11),defaultValue:0},timeoutrestart:{type:Sequelize.ENUM(_0x2c9c[28],_0x2c9c[29]),defaultValue:_0x2c9c[29]},defaultrule:{type:Sequelize[_0x2c9c[3]]},description:{type:Sequelize[_0x2c9c[3]]},acw:{type:Sequelize[_0x2c9c[45]],defaultValue:0,set:function(_0xf211x2){this[_0x2c9c[19]](_0x2c9c[46],_0xf211x2);if(_0xf211x2){if(this[_0x2c9c[21]](_0x2c9c[47])< 2){this[_0x2c9c[19]](_0x2c9c[47],2)}}}},acwTimeout:{type:Sequelize.INTEGER(11),defaultValue:10},dialActive:{type:Sequelize[_0x2c9c[45]],defaultValue:0,comment:_0x2c9c[48]},dialMethod:{type:Sequelize.ENUM(_0x2c9c[49],_0x2c9c[25],_0x2c9c[27],_0x2c9c[26],_0x2c9c[23]),defaultValue:_0x2c9c[25],comment:_0x2c9c[50]},dialLimitChannel:{type:Sequelize.INTEGER(4)[_0x2c9c[51]],defaultValue:0,validate:{min:0,max:9999},comment:_0x2c9c[52]},dialLimitQueue:{type:Sequelize.INTEGER(4)[_0x2c9c[51]],defaultValue:0,validate:{min:0,max:9999},comment:_0x2c9c[53]},dialPowerLevel:{type:Sequelize.FLOAT(2)[_0x2c9c[51]],defaultValue:1,validate:{min:1,max:10},comment:_0x2c9c[54]},dialPredictiveOptimization:{type:Sequelize.ENUM(_0x2c9c[55],_0x2c9c[56]),defaultValue:_0x2c9c[56],comment:_0x2c9c[57]},dialPredictiveOptimizationPercentage:{type:Sequelize.FLOAT(2)[_0x2c9c[51]],defaultValue:3,validate:{min:1,max:95},comment:_0x2c9c[58]},dialPredictiveInterval:{type:Sequelize.INTEGER(3)[_0x2c9c[51]],defaultValue:10,validate:{min:5,max:30},comment:_0x2c9c[59]},dialOriginateCallerIdName:{type:Sequelize[_0x2c9c[3]]},dialOriginateCallerIdNumber:{type:Sequelize[_0x2c9c[3]]},dialOriginateTimeout:{type:Sequelize.INTEGER(3)[_0x2c9c[51]],defaultValue:30,validate:{min:1,max:999},comment:_0x2c9c[60]},dialQueueOptions:{type:Sequelize[_0x2c9c[3]],defaultValue:_0x2c9c[61],comment:_0x2c9c[62]},dialQueueTimeout:{type:Sequelize.INTEGER(3)[_0x2c9c[51]],defaultValue:3,validate:{min:1,max:999},comment:_0x2c9c[63]},dialQueueProject:{type:Sequelize[_0x2c9c[3]],comment:_0x2c9c[64]},dialCongestionMaxRetry:{type:Sequelize.INTEGER(3)[_0x2c9c[51]],defaultValue:3,validate:{min:1,max:999},comment:_0x2c9c[65]},dialCongestionRetryFrequency:{type:Sequelize.INTEGER(5)[_0x2c9c[51]],validate:{min:1,max:99999},defaultValue:150,comment:_0x2c9c[66]},dialBusyMaxRetry:{type:Sequelize.INTEGER(3)[_0x2c9c[51]],defaultValue:3,validate:{min:1,max:999},comment:_0x2c9c[67]},dialBusyRetryFrequency:{type:Sequelize.INTEGER(5)[_0x2c9c[51]],validate:{min:1,max:99999},defaultValue:150,comment:_0x2c9c[68]},dialNoAnswerMaxRetry:{type:Sequelize.INTEGER(3)[_0x2c9c[51]],defaultValue:3,comment:_0x2c9c[69]},dialNoAnswerRetryFrequency:{type:Sequelize.INTEGER(5)[_0x2c9c[51]],validate:{min:1,max:99999},defaultValue:150,comment:_0x2c9c[70]},dialGlobalMaxRetry:{type:Sequelize.INTEGER(3)[_0x2c9c[51]],validate:{min:1,max:999},defaultValue:4,comment:_0x2c9c[71]},dialTimezone:{type:Sequelize[_0x2c9c[3]],defaultValue:null},dialGlobalInterval:{type:Sequelize[_0x2c9c[3]],defaultValue:_0x2c9c[72]},dialPrefix:{type:Sequelize[_0x2c9c[3]],defaultValue:null},dialCheckDuplicateType:{type:Sequelize.ENUM(_0x2c9c[73],_0x2c9c[74],_0x2c9c[75]),defaultValue:_0x2c9c[73]},dialAMDActive:{type:Sequelize[_0x2c9c[45]],defaultValue:0,comment:_0x2c9c[76]},dialAMDInitialSilence:{type:Sequelize.INTEGER(9)[_0x2c9c[51]],defaultValue:2500,validate:{min:0},comment:_0x2c9c[77]},dialAMDGreeting:{type:Sequelize.INTEGER(9)[_0x2c9c[51]],defaultValue:1500,validate:{min:0},comment:_0x2c9c[78]},dialAMDAfterGreetingSilence:{type:Sequelize.INTEGER(9)[_0x2c9c[51]],defaultValue:800,validate:{min:0},comment:_0x2c9c[79]},dialAMDTotalAnalysisTime:{type:Sequelize.INTEGER(9)[_0x2c9c[51]],defaultValue:5000,validate:{min:0},comment:_0x2c9c[80]},dialAMDMinWordLength:{type:Sequelize.INTEGER(9)[_0x2c9c[51]],defaultValue:100,validate:{min:0},comment:_0x2c9c[81]},dialAMDBetweenWordsSilence:{type:Sequelize.INTEGER(9)[_0x2c9c[51]],defaultValue:50,validate:{min:0},comment:_0x2c9c[82]},dialAMDMaximumNumberOfWords:{type:Sequelize.INTEGER(9)[_0x2c9c[51]],defaultValue:3,validate:{min:0},comment:_0x2c9c[83]},dialAMDSilenceThreshold:{type:Sequelize.INTEGER(5)[_0x2c9c[51]],validate:{min:0,max:32767},defaultValue:256,comment:_0x2c9c[84]},dialAMDMaximumWordLength:{type:Sequelize.INTEGER(9)[_0x2c9c[51]],defaultValue:5000,validate:{min:0},comment:_0x2c9c[85]},dialRecallMeTimeout:{type:Sequelize.INTEGER(5)[_0x2c9c[51]],validate:{min:1},defaultValue:30,comment:_0x2c9c[86]},dialRecallInQueue:{type:Sequelize[_0x2c9c[45]],defaultValue:0,comment:_0x2c9c[87]},dialOrderByScheduledAt:{type:Sequelize.ENUM(_0x2c9c[88],_0x2c9c[89]),defaultValue:_0x2c9c[88]},dialQueueProject2:{type:Sequelize[_0x2c9c[3]],comment:_0x2c9c[64]},dialAgiAfterHangupClient:{type:Sequelize[_0x2c9c[45]],defaultValue:false},dialAgiAfterHangupAgent:{type:Sequelize[_0x2c9c[45]],defaultValue:false}}
\ No newline at end of file
index c7425c2..dbc0e7c 100644 (file)
@@ -1 +1 @@
-var _0x1f2c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x75\x73\x65\x72","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x62\x6F\x64\x79","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x69\x65\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x67\x65\x74\x54\x65\x61\x6D\x73","\x54\x65\x61\x6D","\x61\x64\x64\x54\x65\x61\x6D\x73","\x69\x64\x73","\x70\x65\x6E\x61\x6C\x74\x79","\x41\x67\x65\x6E\x74\x73","\x75\x6E\x69\x6F\x6E","\x55\x73\x65\x72","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x66\x6F\x72\x6D\x61\x74","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x75\x70\x73\x65\x72\x74","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74","\x70\x75\x73\x68","\x61\x6C\x6C","\x6C\x6F\x67\x69\x6E\x49\x6E\x50\x61\x75\x73\x65","\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x6F\x6D\x69\x74","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x69\x73\x41\x72\x72\x61\x79","\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x67\x65\x74\x4C\x69\x73\x74\x73","\x43\x6D\x4C\x69\x73\x74","\x61\x64\x64\x4C\x69\x73\x74\x73","\x67\x65\x74","\x64\x69\x61\x6C\x43\x68\x65\x63\x6B\x44\x75\x70\x6C\x69\x63\x61\x74\x65\x54\x79\x70\x65","\x70\x68\x6F\x6E\x65","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x68\x6F\x6E\x65\x20\x4E\x4F\x54\x20\x49\x4E\x20\x28\x3F\x29","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64\x20\x3D\x20\x3F","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72","\x66\x72\x6F\x6D","\x66\x69\x65\x6C\x64","\x73\x65\x6C\x65\x63\x74","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x66\x69\x6E\x61\x6C","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x70\x68\x6F\x6E\x65\x20\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C","\x4C\x69\x73\x74\x49\x64\x20\x3D\x20\x3F","\x43\x6D\x4C\x69\x73\x74\x49\x64","\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x20\x49\x53\x20\x4E\x55\x4C\x4C","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x4E\x4F\x57\x28\x29","\x66\x72\x6F\x6D\x51\x75\x65\x72\x79","\x69\x6E\x74\x6F","\x69\x6E\x73\x65\x72\x74","\x61\x6C\x77\x61\x79\x73","\x6F\x6E\x6C\x79\x49\x66\x4F\x70\x65\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x73","\x67\x65\x74\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x61\x64\x64\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x62\x6C\x61\x63\x6B","\x72\x65\x6D\x6F\x76\x65\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73"];_0x1f2c[0];var jsonpatch=require(_0x1f2c[1]);var rp=require(_0x1f2c[2]);var moment=require(_0x1f2c[3]);var BPromise=require(_0x1f2c[4]);var Mustache=require(_0x1f2c[5]);var util=require(_0x1f2c[6]);var path=require(_0x1f2c[7]);var sox=require(_0x1f2c[8]);var csv=require(_0x1f2c[9]);var ejs=require(_0x1f2c[10]);var fs=require(_0x1f2c[11]);var _=require(_0x1f2c[12]);var squel=require(_0x1f2c[13]);var crypto=require(_0x1f2c[14]);var jsforce=require(_0x1f2c[15]);var deskjs=require(_0x1f2c[16]);var toCsv=require(_0x1f2c[9]);var querystring=require(_0x1f2c[17]);var Papa=require(_0x1f2c[18]);var qs=require(_0x1f2c[19]);var logger=require(_0x1f2c[21])(_0x1f2c[20]);var utils=require(_0x1f2c[22]);var config=require(_0x1f2c[23]);var db=require(_0x1f2c[25])[_0x1f2c[24]];var socket=require(_0x1f2c[27])({host:_0x1f2c[26],port:6379});require(_0x1f2c[29])[_0x1f2c[28]](socket);function respondWithStatusCode(_0xc278x1b,_0xc278x1c){_0xc278x1c= _0xc278x1c|| 204;return function(_0xc278x1d){if(_0xc278x1d){return _0xc278x1b[_0x1f2c[30]](_0xc278x1c)};return _0xc278x1b[_0x1f2c[32]](_0xc278x1c)[_0x1f2c[31]]()}}function respondWithResult(_0xc278x1b,_0xc278x1c){_0xc278x1c= _0xc278x1c|| 200;return function(_0xc278x1d){if(_0xc278x1d){return _0xc278x1b[_0x1f2c[32]](_0xc278x1c)[_0x1f2c[33]](_0xc278x1d)}}}function respondWithFilteredResult(_0xc278x1b,_0xc278x20){return function(_0xc278x1d){if(_0xc278x1d){var _0xc278x21=_0xc278x1d[_0x1f2c[34]],_0xc278x22=_0xc278x20[_0x1f2c[35]],_0xc278x23=_0xc278x20[_0x1f2c[35]]+ _0xc278x20[_0x1f2c[36]],_0xc278x1c;if(_0xc278x23>= _0xc278x21){_0xc278x23= _0xc278x21;_0xc278x1c= 200}else {_0xc278x1c= 206};_0xc278x1b[_0x1f2c[32]](_0xc278x1c);return _0xc278x1b[_0x1f2c[40]](_0x1f2c[37],_0xc278x22+ _0x1f2c[38]+ _0xc278x23+ _0x1f2c[39]+ _0xc278x21)[_0x1f2c[33]](_0xc278x1d)};return null}}function patchUpdates(_0xc278x25){return function(_0xc278x1d){try{jsonpatch[_0x1f2c[41]](_0xc278x1d,_0xc278x25,true)}catch(err){return BPromise[_0x1f2c[42]](err)};return _0xc278x1d[_0x1f2c[43]]()}}function saveUpdates(_0xc278x27,_0xc278x1c){return function(_0xc278x1d){if(_0xc278x1d){return _0xc278x1d[_0x1f2c[45]](_0xc278x27)[_0x1f2c[44]](function(_0xc278x28){return _0xc278x28})};return null}}function removeEntity(_0xc278x1b,_0xc278x1c){return function(_0xc278x1d){if(_0xc278x1d){return _0xc278x1d[_0x1f2c[46]]()[_0x1f2c[44]](function(){_0xc278x1b[_0x1f2c[32]](204)[_0x1f2c[31]]()})}}}function handleEntityNotFound(_0xc278x1b,_0xc278x1c){return function(_0xc278x1d){if(!_0xc278x1d){_0xc278x1b[_0x1f2c[30]](404)};return _0xc278x1d}}function handleError(_0xc278x1b,_0xc278x1c){_0xc278x1c= _0xc278x1c|| 500;return function(_0xc278x2c){logger[_0x1f2c[48]](_0xc278x2c[_0x1f2c[47]]);if(_0xc278x2c[_0x1f2c[49]]){delete _0xc278x2c[_0x1f2c[49]]};_0xc278x1b[_0x1f2c[32]](_0xc278x1c)[_0x1f2c[50]](_0xc278x2c)}}exports[_0x1f2c[51]]= function(_0xc278x2d,_0xc278x1b){var _0xc278x20={},_0xc278x2e={},_0xc278x2f={count:0,rows:[]};_0xc278x2e[_0x1f2c[52]]= _[_0x1f2c[55]](db[_0x1f2c[54]][_0x1f2c[53]]);var _0xc278x30={dateStart:_0xc278x2d[_0x1f2c[57]][_0x1f2c[56]],dateEnd:_0xc278x2d[_0x1f2c[57]][_0x1f2c[58]]};delete _0xc278x2d[_0x1f2c[57]][_0x1f2c[56]];delete _0xc278x2d[_0x1f2c[57]][_0x1f2c[58]];_0xc278x2e[_0x1f2c[57]]= _[_0x1f2c[55]](_0xc278x2d[_0x1f2c[57]]);_0xc278x2e[_0x1f2c[59]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],_0xc278x2e[_0x1f2c[57]]);_0xc278x20[_0x1f2c[61]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],qs[_0x1f2c[62]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[62]]));_0xc278x20[_0x1f2c[61]]= (_0xc278x20[_0x1f2c[61]][_0x1f2c[63]])?_0xc278x20[_0x1f2c[61]]:_0xc278x2e[_0x1f2c[52]];if(!_0xc278x2d[_0x1f2c[57]][_0x1f2c[65]](_0x1f2c[64])){_0xc278x20[_0x1f2c[36]]= qs[_0x1f2c[36]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[36]]);_0xc278x20[_0x1f2c[35]]= qs[_0x1f2c[35]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[35]])};_0xc278x20[_0x1f2c[66]]= qs[_0x1f2c[67]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[67]]);_0xc278x20[_0x1f2c[68]]= qs[_0x1f2c[59]](_[_0x1f2c[69]](_0xc278x2d[_0x1f2c[57]],_0xc278x2e[_0x1f2c[59]]));if(_0xc278x30[_0x1f2c[56]]){if(_0xc278x30[_0x1f2c[58]]){_0xc278x30[_0x1f2c[58]]= moment(_0xc278x30[_0x1f2c[58]])[_0x1f2c[71]](1,_0x1f2c[70])}else {_0xc278x30[_0x1f2c[58]]= moment(_0xc278x30[_0x1f2c[56]])[_0x1f2c[71]](1,_0x1f2c[70])};_[_0x1f2c[72]](_0xc278x20[_0x1f2c[68]],{createdAt:{$gte:_0xc278x30[_0x1f2c[56]],$lte:_0xc278x30[_0x1f2c[58]]}})};if(_0xc278x2d[_0x1f2c[57]][_0x1f2c[73]]){_0xc278x20[_0x1f2c[68]]= _[_0x1f2c[72]](_0xc278x20[_0x1f2c[68]],{$or:_[_0x1f2c[75]](_0xc278x20[_0x1f2c[61]],function(_0xc278x31){var _0xc278x2f={};_0xc278x2f[_0xc278x31]= {$like:_0x1f2c[74]+ _0xc278x2d[_0x1f2c[57]][_0x1f2c[73]]+ _0x1f2c[74]};return _0xc278x2f})})};_0xc278x20= _[_0x1f2c[72]]({},_0xc278x20,_0xc278x2d[_0x1f2c[76]]);var _0xc278x32={where:_0xc278x20[_0x1f2c[68]]};return db[_0x1f2c[54]][_0x1f2c[34]](_0xc278x32)[_0x1f2c[44]](function(_0xc278x21){_0xc278x2f[_0x1f2c[34]]= _0xc278x21;if(_0xc278x2d[_0x1f2c[57]][_0x1f2c[79]]){_0xc278x20[_0x1f2c[80]]= [{all:true}]};return db[_0x1f2c[54]][_0x1f2c[81]](_0xc278x20)})[_0x1f2c[44]](function(_0xc278x33){_0xc278x2f[_0x1f2c[78]]= _0xc278x33;return _0xc278x2f})[_0x1f2c[44]](respondWithFilteredResult(_0xc278x1b,_0xc278x20))[_0x1f2c[77]](handleError(_0xc278x1b,null))};exports[_0x1f2c[82]]= function(_0xc278x2d,_0xc278x1b){var _0xc278x20={raw:false,where:{id:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}},_0xc278x2e={};_0xc278x2e[_0x1f2c[52]]= _[_0x1f2c[55]](db[_0x1f2c[54]][_0x1f2c[53]]);_0xc278x2e[_0x1f2c[57]]= _[_0x1f2c[55]](_0xc278x2d[_0x1f2c[57]]);_0xc278x2e[_0x1f2c[59]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],_0xc278x2e[_0x1f2c[57]]);_0xc278x20[_0x1f2c[61]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],qs[_0x1f2c[62]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[62]]));_0xc278x20[_0x1f2c[61]]= (_0xc278x20[_0x1f2c[61]][_0x1f2c[63]])?_0xc278x20[_0x1f2c[61]]:_0xc278x2e[_0x1f2c[52]];if(_0xc278x2d[_0x1f2c[57]][_0x1f2c[79]]){_0xc278x20[_0x1f2c[80]]= [{all:true}]};_0xc278x20= _[_0x1f2c[72]]({},_0xc278x20,_0xc278x2d[_0x1f2c[76]]);return db[_0x1f2c[54]][_0x1f2c[85]](_0xc278x20)[_0x1f2c[44]](handleEntityNotFound(_0xc278x1b,null))[_0x1f2c[44]](respondWithResult(_0xc278x1b,null))[_0x1f2c[77]](handleError(_0xc278x1b,null))};exports[_0x1f2c[86]]= function(_0xc278x2d,_0xc278x1b){var _0xc278x34=null;return db[_0x1f2c[54]][_0x1f2c[86]](_0xc278x2d[_0x1f2c[89]],{})[_0x1f2c[44]](function(_0xc278x1d){_0xc278x34= _0xc278x1d;if(_0xc278x1d){_0xc278x34[_0x1f2c[88]]([_0xc278x2d[_0x1f2c[87]][_0x1f2c[83]]])};return _0xc278x34})[_0x1f2c[44]](respondWithResult(_0xc278x1b,201))[_0x1f2c[77]](handleError(_0xc278x1b,null))};exports[_0x1f2c[45]]= function(_0xc278x2d,_0xc278x1b){if(_0xc278x2d[_0x1f2c[89]][_0x1f2c[83]]){delete _0xc278x2d[_0x1f2c[89]][_0x1f2c[83]]};return db[_0x1f2c[54]][_0x1f2c[85]]({where:{id:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})[_0x1f2c[44]](handleEntityNotFound(_0xc278x1b,null))[_0x1f2c[44]](saveUpdates(_0xc278x2d[_0x1f2c[89]],null))[_0x1f2c[44]](respondWithResult(_0xc278x1b,null))[_0x1f2c[77]](handleError(_0xc278x1b,null))};exports[_0x1f2c[46]]= function(_0xc278x2d,_0xc278x1b){return db[_0x1f2c[54]][_0x1f2c[85]]({where:{id:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})[_0x1f2c[44]](handleEntityNotFound(_0xc278x1b,null))[_0x1f2c[44]](removeEntity(_0xc278x1b,null))[_0x1f2c[77]](handleError(_0xc278x1b,null))};exports[_0x1f2c[90]]= function(_0xc278x2d,_0xc278x1b,_0xc278x35){var _0xc278x20={raw:false,where:{}};var _0xc278x2e={};var _0xc278x36={count:0,rows:[]};return db[_0x1f2c[54]][_0x1f2c[93]]({where:{id:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})[_0x1f2c[44]](handleEntityNotFound(_0xc278x1b,null))[_0x1f2c[44]](function(_0xc278x1d){if(_0xc278x1d){_0xc278x2e[_0x1f2c[52]]= _[_0x1f2c[55]](db[_0x1f2c[91]][_0x1f2c[53]]);_0xc278x2e[_0x1f2c[57]]= _[_0x1f2c[55]](_0xc278x2d[_0x1f2c[57]]);_0xc278x2e[_0x1f2c[59]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],_0xc278x2e[_0x1f2c[57]]);_0xc278x20[_0x1f2c[61]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],qs[_0x1f2c[62]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[62]]));_0xc278x20[_0x1f2c[61]]= (_0xc278x20[_0x1f2c[61]][_0x1f2c[63]])?_0xc278x20[_0x1f2c[61]]:_0xc278x2e[_0x1f2c[52]];if(!_0xc278x2d[_0x1f2c[57]][_0x1f2c[65]](_0x1f2c[64])){_0xc278x20[_0x1f2c[36]]= qs[_0x1f2c[36]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[36]]);_0xc278x20[_0x1f2c[35]]= qs[_0x1f2c[35]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[35]])};_0xc278x20[_0x1f2c[66]]= qs[_0x1f2c[67]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[67]]);_0xc278x20[_0x1f2c[68]]= qs[_0x1f2c[59]](_[_0x1f2c[69]](_0xc278x2d[_0x1f2c[57]],_0xc278x2e[_0x1f2c[59]]));_0xc278x20[_0x1f2c[68]][_0x1f2c[92]]= _0xc278x1d[_0x1f2c[83]];if(_0xc278x2d[_0x1f2c[57]][_0x1f2c[73]]){_0xc278x20[_0x1f2c[68]]= _[_0x1f2c[72]](_0xc278x20[_0x1f2c[68]],{$or:_[_0x1f2c[75]](_0xc278x20[_0x1f2c[61]],function(_0xc278x31){var _0xc278x2f={};_0xc278x2f[_0xc278x31]= {$like:_0x1f2c[74]+ _0xc278x2d[_0x1f2c[57]][_0x1f2c[73]]+ _0x1f2c[74]};return _0xc278x2f})})};_0xc278x20= _[_0x1f2c[72]]({},_0xc278x20,_0xc278x2d[_0x1f2c[76]]);return db[_0x1f2c[91]][_0x1f2c[34]]({where:_0xc278x20[_0x1f2c[68]]})[_0x1f2c[44]](function(_0xc278x21){_0xc278x36[_0x1f2c[34]]= _0xc278x21;if(_0xc278x2d[_0x1f2c[57]][_0x1f2c[79]]){_0xc278x20[_0x1f2c[80]]= [{all:true}]};return db[_0x1f2c[91]][_0x1f2c[81]](_0xc278x20)})[_0x1f2c[44]](function(_0xc278x33){_0xc278x36[_0x1f2c[78]]= _0xc278x33;return _0xc278x36})}})[_0x1f2c[44]](respondWithFilteredResult(_0xc278x1b,_0xc278x20))[_0x1f2c[77]](handleError(_0xc278x1b,null))};exports[_0x1f2c[94]]= function(_0xc278x2d,_0xc278x1b,_0xc278x35){var _0xc278x20={raw:true,where:{}};var _0xc278x2e={};var _0xc278x36={count:0,rows:[]};return db[_0x1f2c[54]][_0x1f2c[93]]({where:{id:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})[_0x1f2c[44]](handleEntityNotFound(_0xc278x1b,null))[_0x1f2c[44]](function(_0xc278x1d){if(_0xc278x1d){_0xc278x2e[_0x1f2c[52]]= _[_0x1f2c[55]](db[_0x1f2c[95]][_0x1f2c[53]]);_0xc278x2e[_0x1f2c[57]]= _[_0x1f2c[55]](_0xc278x2d[_0x1f2c[57]]);_0xc278x2e[_0x1f2c[59]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],_0xc278x2e[_0x1f2c[57]]);_0xc278x20[_0x1f2c[61]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],qs[_0x1f2c[62]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[62]]));_0xc278x20[_0x1f2c[61]]= (_0xc278x20[_0x1f2c[61]][_0x1f2c[63]])?_0xc278x20[_0x1f2c[61]]:_0xc278x2e[_0x1f2c[52]];if(!_0xc278x2d[_0x1f2c[57]][_0x1f2c[65]](_0x1f2c[64])){_0xc278x20[_0x1f2c[36]]= qs[_0x1f2c[36]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[36]]);_0xc278x20[_0x1f2c[35]]= qs[_0x1f2c[35]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[35]])};_0xc278x20[_0x1f2c[66]]= qs[_0x1f2c[67]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[67]]);_0xc278x20[_0x1f2c[68]]= qs[_0x1f2c[59]](_[_0x1f2c[69]](_0xc278x2d[_0x1f2c[57]],_0xc278x2e[_0x1f2c[59]]));_0xc278x20[_0x1f2c[68]][_0x1f2c[92]]= _0xc278x1d[_0x1f2c[83]];if(_0xc278x2d[_0x1f2c[57]][_0x1f2c[73]]){_0xc278x20[_0x1f2c[68]]= _[_0x1f2c[72]](_0xc278x20[_0x1f2c[68]],{$or:_[_0x1f2c[75]](_0xc278x20[_0x1f2c[61]],function(_0xc278x31){var _0xc278x2f={};_0xc278x2f[_0xc278x31]= {$like:_0x1f2c[74]+ _0xc278x2d[_0x1f2c[57]][_0x1f2c[73]]+ _0x1f2c[74]};return _0xc278x2f})})};_0xc278x20= _[_0x1f2c[72]]({},_0xc278x20,_0xc278x2d[_0x1f2c[76]]);return db[_0x1f2c[95]][_0x1f2c[34]]({where:_0xc278x20[_0x1f2c[68]]})[_0x1f2c[44]](function(_0xc278x21){_0xc278x36[_0x1f2c[34]]= _0xc278x21;if(_0xc278x2d[_0x1f2c[57]][_0x1f2c[79]]){_0xc278x20[_0x1f2c[80]]= [{all:true}]};return db[_0x1f2c[95]][_0x1f2c[81]](_0xc278x20)})[_0x1f2c[44]](function(_0xc278x33){_0xc278x36[_0x1f2c[78]]= _0xc278x33;return _0xc278x36})}})[_0x1f2c[44]](respondWithFilteredResult(_0xc278x1b,_0xc278x20))[_0x1f2c[77]](handleError(_0xc278x1b,null))};exports[_0x1f2c[96]]= function(_0xc278x2d,_0xc278x1b,_0xc278x35){var _0xc278x20={raw:true,where:{}};var _0xc278x2e={};var _0xc278x36={count:0,rows:[]};return db[_0x1f2c[54]][_0x1f2c[93]]({where:{id:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})[_0x1f2c[44]](handleEntityNotFound(_0xc278x1b,null))[_0x1f2c[44]](function(_0xc278x1d){if(_0xc278x1d){_0xc278x2e[_0x1f2c[52]]= _[_0x1f2c[55]](db[_0x1f2c[97]][_0x1f2c[53]]);_0xc278x2e[_0x1f2c[57]]= _[_0x1f2c[55]](_0xc278x2d[_0x1f2c[57]]);_0xc278x2e[_0x1f2c[59]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],_0xc278x2e[_0x1f2c[57]]);_0xc278x20[_0x1f2c[61]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],qs[_0x1f2c[62]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[62]]));_0xc278x20[_0x1f2c[61]]= (_0xc278x20[_0x1f2c[61]][_0x1f2c[63]])?_0xc278x20[_0x1f2c[61]]:_0xc278x2e[_0x1f2c[52]];if(!_0xc278x2d[_0x1f2c[57]][_0x1f2c[65]](_0x1f2c[64])){_0xc278x20[_0x1f2c[36]]= qs[_0x1f2c[36]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[36]]);_0xc278x20[_0x1f2c[35]]= qs[_0x1f2c[35]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[35]])};_0xc278x20[_0x1f2c[66]]= qs[_0x1f2c[67]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[67]]);_0xc278x20[_0x1f2c[68]]= qs[_0x1f2c[59]](_[_0x1f2c[69]](_0xc278x2d[_0x1f2c[57]],_0xc278x2e[_0x1f2c[59]]));_0xc278x20[_0x1f2c[68]][_0x1f2c[92]]= _0xc278x1d[_0x1f2c[83]];if(_0xc278x2d[_0x1f2c[57]][_0x1f2c[73]]){_0xc278x20[_0x1f2c[68]]= _[_0x1f2c[72]](_0xc278x20[_0x1f2c[68]],{$or:_[_0x1f2c[75]](_0xc278x20[_0x1f2c[61]],function(_0xc278x31){var _0xc278x2f={};_0xc278x2f[_0xc278x31]= {$like:_0x1f2c[74]+ _0xc278x2d[_0x1f2c[57]][_0x1f2c[73]]+ _0x1f2c[74]};return _0xc278x2f})})};_0xc278x20= _[_0x1f2c[72]]({},_0xc278x20,_0xc278x2d[_0x1f2c[76]]);return db[_0x1f2c[97]][_0x1f2c[34]]({where:_0xc278x20[_0x1f2c[68]]})[_0x1f2c[44]](function(_0xc278x21){_0xc278x36[_0x1f2c[34]]= _0xc278x21;if(_0xc278x2d[_0x1f2c[57]][_0x1f2c[79]]){_0xc278x20[_0x1f2c[80]]= [{all:true}]};return db[_0x1f2c[97]][_0x1f2c[81]](_0xc278x20)})[_0x1f2c[44]](function(_0xc278x33){_0xc278x36[_0x1f2c[78]]= _0xc278x33;return _0xc278x36})}})[_0x1f2c[44]](respondWithFilteredResult(_0xc278x1b,_0xc278x20))[_0x1f2c[77]](handleError(_0xc278x1b,null))};exports[_0x1f2c[98]]= function(_0xc278x2d,_0xc278x1b,_0xc278x35){var _0xc278x20={raw:true,where:{}};var _0xc278x2e={};var _0xc278x36={count:0,rows:[]};return db[_0x1f2c[54]][_0x1f2c[93]]({where:{id:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})[_0x1f2c[44]](handleEntityNotFound(_0xc278x1b,null))[_0x1f2c[44]](function(_0xc278x1d){if(_0xc278x1d){_0xc278x2e[_0x1f2c[52]]= _[_0x1f2c[55]](db[_0x1f2c[99]][_0x1f2c[53]]);_0xc278x2e[_0x1f2c[57]]= _[_0x1f2c[55]](_0xc278x2d[_0x1f2c[57]]);_0xc278x2e[_0x1f2c[59]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],_0xc278x2e[_0x1f2c[57]]);_0xc278x20[_0x1f2c[61]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],qs[_0x1f2c[62]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[62]]));_0xc278x20[_0x1f2c[61]]= (_0xc278x20[_0x1f2c[61]][_0x1f2c[63]])?_0xc278x20[_0x1f2c[61]]:_0xc278x2e[_0x1f2c[52]];if(!_0xc278x2d[_0x1f2c[57]][_0x1f2c[65]](_0x1f2c[64])){_0xc278x20[_0x1f2c[36]]= qs[_0x1f2c[36]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[36]]);_0xc278x20[_0x1f2c[35]]= qs[_0x1f2c[35]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[35]])};_0xc278x20[_0x1f2c[66]]= qs[_0x1f2c[67]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[67]]);_0xc278x20[_0x1f2c[68]]= qs[_0x1f2c[59]](_[_0x1f2c[69]](_0xc278x2d[_0x1f2c[57]],_0xc278x2e[_0x1f2c[59]]));_0xc278x20[_0x1f2c[68]][_0x1f2c[92]]= _0xc278x1d[_0x1f2c[83]];if(_0xc278x2d[_0x1f2c[57]][_0x1f2c[73]]){_0xc278x20[_0x1f2c[68]]= _[_0x1f2c[72]](_0xc278x20[_0x1f2c[68]],{$or:_[_0x1f2c[75]](_0xc278x20[_0x1f2c[61]],function(_0xc278x31){var _0xc278x2f={};_0xc278x2f[_0xc278x31]= {$like:_0x1f2c[74]+ _0xc278x2d[_0x1f2c[57]][_0x1f2c[73]]+ _0x1f2c[74]};return _0xc278x2f})})};_0xc278x20= _[_0x1f2c[72]]({},_0xc278x20,_0xc278x2d[_0x1f2c[76]]);return db[_0x1f2c[99]][_0x1f2c[34]]({where:_0xc278x20[_0x1f2c[68]]})[_0x1f2c[44]](function(_0xc278x21){_0xc278x36[_0x1f2c[34]]= _0xc278x21;if(_0xc278x2d[_0x1f2c[57]][_0x1f2c[79]]){_0xc278x20[_0x1f2c[80]]= [{all:true}]};return db[_0x1f2c[99]][_0x1f2c[81]](_0xc278x20)})[_0x1f2c[44]](function(_0xc278x33){_0xc278x36[_0x1f2c[78]]= _0xc278x33;return _0xc278x36})}})[_0x1f2c[44]](respondWithFilteredResult(_0xc278x1b,_0xc278x20))[_0x1f2c[77]](handleError(_0xc278x1b,null))};exports[_0x1f2c[100]]= function(_0xc278x2d,_0xc278x1d,_0xc278x35){var _0xc278x20={};var _0xc278x2e={};var _0xc278x37;var _0xc278x21;return db[_0x1f2c[54]][_0x1f2c[93]]({where:{id:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})[_0x1f2c[44]](handleEntityNotFound(_0xc278x1d,null))[_0x1f2c[44]](function(_0xc278x1d){if(_0xc278x1d){_0xc278x37= _0xc278x1d;_0xc278x2e[_0x1f2c[52]]= _[_0x1f2c[55]](db[_0x1f2c[101]][_0x1f2c[53]]);_0xc278x2e[_0x1f2c[57]]= _[_0x1f2c[55]](_0xc278x2d[_0x1f2c[57]]);_0xc278x2e[_0x1f2c[59]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],_0xc278x2e[_0x1f2c[57]]);_0xc278x20[_0x1f2c[61]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],qs[_0x1f2c[62]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[62]]));_0xc278x20[_0x1f2c[61]]= (_0xc278x20[_0x1f2c[61]][_0x1f2c[63]])?_0xc278x20[_0x1f2c[61]]:_0xc278x2e[_0x1f2c[52]];_0xc278x20[_0x1f2c[66]]= qs[_0x1f2c[67]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[67]]);_0xc278x20[_0x1f2c[68]]= qs[_0x1f2c[59]](_[_0x1f2c[69]](_0xc278x2d[_0x1f2c[57]],_0xc278x2e[_0x1f2c[59]]));if(_0xc278x2d[_0x1f2c[57]][_0x1f2c[73]]){_0xc278x20[_0x1f2c[68]]= _[_0x1f2c[72]](_0xc278x20[_0x1f2c[68]],{$or:_[_0x1f2c[75]](_0xc278x20[_0x1f2c[61]],function(_0xc278x31){var _0xc278x2f={};_0xc278x2f[_0xc278x31]= {$like:_0x1f2c[74]+ _0xc278x2d[_0x1f2c[57]][_0x1f2c[73]]+ _0x1f2c[74]};return _0xc278x2f})})};_0xc278x20= _[_0x1f2c[72]]({},_0xc278x20,_0xc278x2d[_0x1f2c[76]]);return _0xc278x37[_0x1f2c[100]](_0xc278x20)}})[_0x1f2c[44]](function(_0xc278x38){if(_0xc278x38){_0xc278x21= _0xc278x38[_0x1f2c[63]];if(!_0xc278x2d[_0x1f2c[57]][_0x1f2c[65]](_0x1f2c[64])){_0xc278x20[_0x1f2c[36]]= qs[_0x1f2c[36]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[36]]);_0xc278x20[_0x1f2c[35]]= qs[_0x1f2c[35]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[35]])};return _0xc278x37[_0x1f2c[100]](_0xc278x20)}})[_0x1f2c[44]](function(_0xc278x33){if(_0xc278x33){return _0xc278x33?{count:_0xc278x21,rows:_0xc278x33}:null}})[_0x1f2c[44]](respondWithResult(_0xc278x1d,null))[_0x1f2c[77]](handleError(_0xc278x1d,null))};exports[_0x1f2c[102]]= function(_0xc278x2d,_0xc278x1b,_0xc278x35){var _0xc278x39=[];var _0xc278x3a;return db[_0x1f2c[101]][_0x1f2c[81]]({where:{id:_0xc278x2d[_0x1f2c[89]][_0x1f2c[103]]},attributes:[_0x1f2c[83]],include:[{model:db[_0x1f2c[107]],as:_0x1f2c[105],attributes:[_0x1f2c[83]],raw:true}]})[_0x1f2c[44]](function(_0xc278x3d){if(_0xc278x3d){for(var _0xc278x3e=0;_0xc278x3e< _0xc278x3d[_0x1f2c[63]];_0xc278x3e+= 1){for(var _0xc278x3f=0;_0xc278x3f< _0xc278x3d[_0xc278x3e][_0x1f2c[105]][_0x1f2c[63]];_0xc278x3f+= 1){_0xc278x39= _[_0x1f2c[106]](_0xc278x39,[_0xc278x3d[_0xc278x3e][_0x1f2c[105]][_0xc278x3f][_0x1f2c[83]]])}};return _0xc278x39}})[_0x1f2c[44]](function(_0xc278x3c){if(_0xc278x3c){return db[_0x1f2c[54]][_0x1f2c[85]]({where:{id:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})}})[_0x1f2c[44]](function(_0xc278x3b){if(_0xc278x3b){_0xc278x3a= _0xc278x3b;return _0xc278x3a[_0x1f2c[88]](_0xc278x39,{penalty:_0xc278x2d[_0x1f2c[89]][_0x1f2c[104]]})}})[_0x1f2c[44]](function(_0xc278x1d){if(_0xc278x1d){return _0xc278x3a[_0x1f2c[102]](_0xc278x2d[_0x1f2c[89]][_0x1f2c[103]])}})[_0x1f2c[44]](handleEntityNotFound(_0xc278x1b,null))[_0x1f2c[44]](respondWithStatusCode(_0xc278x1b,null))[_0x1f2c[77]](handleError(_0xc278x1b,null))};exports[_0x1f2c[108]]= function(_0xc278x2d,_0xc278x1b,_0xc278x35){var _0xc278x39=[];var _0xc278x3a;return db[_0x1f2c[101]][_0x1f2c[81]]({where:{id:_0xc278x2d[_0x1f2c[57]][_0x1f2c[103]]},attributes:[_0x1f2c[83]],include:[{model:db[_0x1f2c[107]],as:_0x1f2c[105],attributes:[_0x1f2c[83]],raw:true}]})[_0x1f2c[44]](function(_0xc278x3d){if(_0xc278x3d){for(var _0xc278x3e=0;_0xc278x3e< _0xc278x3d[_0x1f2c[63]];_0xc278x3e+= 1){for(var _0xc278x3f=0;_0xc278x3f< _0xc278x3d[_0xc278x3e][_0x1f2c[105]][_0x1f2c[63]];_0xc278x3f+= 1){_0xc278x39= _[_0x1f2c[106]](_0xc278x39,[_0xc278x3d[_0xc278x3e][_0x1f2c[105]][_0xc278x3f][_0x1f2c[83]]])}};return _0xc278x39}})[_0x1f2c[44]](function(_0xc278x3c){if(_0xc278x3c){return db[_0x1f2c[54]][_0x1f2c[85]]({where:{id:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})}})[_0x1f2c[44]](function(_0xc278x3b){if(_0xc278x3b){_0xc278x3a= _0xc278x3b;return _0xc278x3a[_0x1f2c[109]](_0xc278x39)}})[_0x1f2c[44]](function(_0xc278x1d){if(_0xc278x3a){return _0xc278x3a[_0x1f2c[108]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[103]])}})[_0x1f2c[44]](handleEntityNotFound(_0xc278x1b,null))[_0x1f2c[44]](respondWithStatusCode(_0xc278x1b,null))[_0x1f2c[77]](handleError(_0xc278x1b,null))};exports[_0x1f2c[88]]= function(_0xc278x2d,_0xc278x1b,_0xc278x35){var _0xc278x40,_0xc278x3a;return db[_0x1f2c[54]][_0x1f2c[85]]({where:{id:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})[_0x1f2c[44]](handleEntityNotFound(_0xc278x1b,null))[_0x1f2c[44]](function(_0xc278x1d){if(_0xc278x1d){_0xc278x3a= _0xc278x1d;return _0xc278x1d[_0x1f2c[88]](_0xc278x2d[_0x1f2c[89]][_0x1f2c[103]],_[_0x1f2c[122]](_0xc278x2d[_0x1f2c[89]],[_0x1f2c[103],_0x1f2c[83]])|| {})[_0x1f2c[121]](function(_0xc278x38){for(var _0xc278x3e=0;_0xc278x3e< _0xc278x2d[_0x1f2c[89]][_0x1f2c[103]][_0x1f2c[63]];_0xc278x3e+= 1){socket[_0x1f2c[120]](_0x1f2c[119],{UserId:_0xc278x2d[_0x1f2c[89]][_0x1f2c[103]][_0xc278x3e],VoiceQueueId:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]})};return _0xc278x38})}})[_0x1f2c[44]](function(_0xc278x42){_0xc278x40= _0xc278x42|| [];if(_0xc278x3a){return db[_0x1f2c[107]][_0x1f2c[81]]({where:{id:_0xc278x2d[_0x1f2c[89]][_0x1f2c[103]]},attributes:[_0x1f2c[83],_0x1f2c[49],_0x1f2c[118],_0x1f2c[113]],raw:true})}})[_0x1f2c[44]](function(_0xc278x42){if(_0xc278x42&& _0xc278x42[_0x1f2c[63]]){var _0xc278x43=[];for(var _0xc278x3e=0;_0xc278x3e< _0xc278x42[_0x1f2c[63]];_0xc278x3e++){_0xc278x43[_0x1f2c[116]](db[_0x1f2c[115]][_0x1f2c[114]]({membername:_0xc278x42[_0xc278x3e][_0x1f2c[49]],UserId:_0xc278x42[_0xc278x3e][_0x1f2c[83]],queue_name:_0xc278x3a[_0x1f2c[49]],VoiceQueueId:_0xc278x3a[_0x1f2c[83]],interface:util[_0x1f2c[112]](_0x1f2c[110],_0x1f2c[111],_0xc278x42[_0xc278x3e][_0x1f2c[49]]),paused:_0xc278x42[_0xc278x3e][_0x1f2c[113]]|| false,penalty:_0xc278x2d[_0x1f2c[89]][_0x1f2c[104]]|| 0}))};return BPromise[_0x1f2c[117]](_0xc278x43)}})[_0x1f2c[44]](function(_0xc278x41){return _0xc278x40})[_0x1f2c[44]](respondWithResult(_0xc278x1b,null))[_0x1f2c[77]](handleError(_0xc278x1b,null))};exports[_0x1f2c[109]]= function(_0xc278x2d,_0xc278x1b,_0xc278x35){var _0xc278x38;return db[_0x1f2c[54]][_0x1f2c[85]]({where:{id:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})[_0x1f2c[44]](handleEntityNotFound(_0xc278x1b,null))[_0x1f2c[44]](function(_0xc278x1d){if(_0xc278x1d){return _0xc278x1d[_0x1f2c[109]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[103]])[_0x1f2c[44]](function(_0xc278x38){if(_[_0x1f2c[124]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[103]])){for(var _0xc278x3e=0;_0xc278x3e< _0xc278x2d[_0x1f2c[57]][_0x1f2c[103]][_0x1f2c[63]];_0xc278x3e+= 1){socket[_0x1f2c[120]](_0x1f2c[125],{UserId:_0xc278x2d[_0x1f2c[57]][_0x1f2c[103]][_0xc278x3e],VoiceQueueId:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]})}}else {socket[_0x1f2c[120]](_0x1f2c[125],{UserId:_0xc278x2d[_0x1f2c[57]][_0x1f2c[103]],VoiceQueueId:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]})}})}})[_0x1f2c[44]](function(_0xc278x44){if(_0xc278x2d[_0x1f2c[57]][_0x1f2c[123]]){_0xc278x38= _0xc278x44;return db[_0x1f2c[115]][_0x1f2c[46]]({where:{VoiceQueueId:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]],UserId:_0xc278x2d[_0x1f2c[57]][_0x1f2c[103]]}})[_0x1f2c[44]](function(){return _0xc278x38})}})[_0x1f2c[44]](respondWithStatusCode(_0xc278x1b,null))[_0x1f2c[77]](handleError(_0xc278x1b,null))};exports[_0x1f2c[126]]= function(_0xc278x2d,_0xc278x1d,_0xc278x35){var _0xc278x20={};var _0xc278x2e={};var _0xc278x37;var _0xc278x21;return db[_0x1f2c[54]][_0x1f2c[93]]({where:{id:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})[_0x1f2c[44]](handleEntityNotFound(_0xc278x1d,null))[_0x1f2c[44]](function(_0xc278x1d){if(_0xc278x1d){_0xc278x37= _0xc278x1d;_0xc278x2e[_0x1f2c[52]]= _[_0x1f2c[55]](db[_0x1f2c[107]][_0x1f2c[53]]);_0xc278x2e[_0x1f2c[57]]= _[_0x1f2c[55]](_0xc278x2d[_0x1f2c[57]]);_0xc278x2e[_0x1f2c[59]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],_0xc278x2e[_0x1f2c[57]]);_0xc278x20[_0x1f2c[61]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],qs[_0x1f2c[62]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[62]]));_0xc278x20[_0x1f2c[61]]= (_0xc278x20[_0x1f2c[61]][_0x1f2c[63]])?_0xc278x20[_0x1f2c[61]]:_0xc278x2e[_0x1f2c[52]];_0xc278x20[_0x1f2c[66]]= qs[_0x1f2c[67]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[67]]);_0xc278x20[_0x1f2c[68]]= qs[_0x1f2c[59]](_[_0x1f2c[69]](_0xc278x2d[_0x1f2c[57]],_0xc278x2e[_0x1f2c[59]]));if(_0xc278x2d[_0x1f2c[57]][_0x1f2c[73]]){_0xc278x20[_0x1f2c[68]]= _[_0x1f2c[72]](_0xc278x20[_0x1f2c[68]],{$or:_[_0x1f2c[75]](_0xc278x20[_0x1f2c[61]],function(_0xc278x31){var _0xc278x2f={};_0xc278x2f[_0xc278x31]= {$like:_0x1f2c[74]+ _0xc278x2d[_0x1f2c[57]][_0x1f2c[73]]+ _0x1f2c[74]};return _0xc278x2f})})};_0xc278x20= _[_0x1f2c[72]]({},_0xc278x20,_0xc278x2d[_0x1f2c[76]]);return _0xc278x37[_0x1f2c[126]](_0xc278x20)}})[_0x1f2c[44]](function(_0xc278x38){if(_0xc278x38){_0xc278x21= _0xc278x38[_0x1f2c[63]];if(!_0xc278x2d[_0x1f2c[57]][_0x1f2c[65]](_0x1f2c[64])){_0xc278x20[_0x1f2c[36]]= qs[_0x1f2c[36]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[36]]);_0xc278x20[_0x1f2c[35]]= qs[_0x1f2c[35]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[35]])};return _0xc278x37[_0x1f2c[126]](_0xc278x20)}})[_0x1f2c[44]](function(_0xc278x33){if(_0xc278x33){return _0xc278x33?{count:_0xc278x21,rows:_0xc278x33}:null}})[_0x1f2c[44]](respondWithResult(_0xc278x1d,null))[_0x1f2c[77]](handleError(_0xc278x1d,null))};exports[_0x1f2c[127]]= function(_0xc278x2d,_0xc278x1d,_0xc278x35){var _0xc278x20={};var _0xc278x2e={};var _0xc278x37;var _0xc278x21;return db[_0x1f2c[54]][_0x1f2c[93]]({where:{id:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})[_0x1f2c[44]](handleEntityNotFound(_0xc278x1d,null))[_0x1f2c[44]](function(_0xc278x1d){if(_0xc278x1d){_0xc278x37= _0xc278x1d;_0xc278x2e[_0x1f2c[52]]= _[_0x1f2c[55]](db[_0x1f2c[115]][_0x1f2c[53]]);_0xc278x2e[_0x1f2c[57]]= _[_0x1f2c[55]](_0xc278x2d[_0x1f2c[57]]);_0xc278x2e[_0x1f2c[59]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],_0xc278x2e[_0x1f2c[57]]);_0xc278x20[_0x1f2c[61]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],qs[_0x1f2c[62]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[62]]));_0xc278x20[_0x1f2c[61]]= (_0xc278x20[_0x1f2c[61]][_0x1f2c[63]])?_0xc278x20[_0x1f2c[61]]:_0xc278x2e[_0x1f2c[52]];_0xc278x20[_0x1f2c[66]]= qs[_0x1f2c[67]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[67]]);_0xc278x20[_0x1f2c[68]]= qs[_0x1f2c[59]](_[_0x1f2c[69]](_0xc278x2d[_0x1f2c[57]],_0xc278x2e[_0x1f2c[59]]));if(_0xc278x2d[_0x1f2c[57]][_0x1f2c[73]]){_0xc278x20[_0x1f2c[68]]= _[_0x1f2c[72]](_0xc278x20[_0x1f2c[68]],{$or:_[_0x1f2c[75]](_0xc278x20[_0x1f2c[61]],function(_0xc278x31){var _0xc278x2f={};_0xc278x2f[_0xc278x31]= {$like:_0x1f2c[74]+ _0xc278x2d[_0x1f2c[57]][_0x1f2c[73]]+ _0x1f2c[74]};return _0xc278x2f})})};_0xc278x20= _[_0x1f2c[72]]({},_0xc278x20,_0xc278x2d[_0x1f2c[76]]);return _0xc278x37[_0x1f2c[127]](_0xc278x20)}})[_0x1f2c[44]](function(_0xc278x38){if(_0xc278x38){_0xc278x21= _0xc278x38[_0x1f2c[63]];if(!_0xc278x2d[_0x1f2c[57]][_0x1f2c[65]](_0x1f2c[64])){_0xc278x20[_0x1f2c[36]]= qs[_0x1f2c[36]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[36]]);_0xc278x20[_0x1f2c[35]]= qs[_0x1f2c[35]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[35]])};return _0xc278x37[_0x1f2c[127]](_0xc278x20)}})[_0x1f2c[44]](function(_0xc278x33){return _0xc278x33?{count:_0xc278x21,rows:_0xc278x33}:null})[_0x1f2c[44]](respondWithResult(_0xc278x1d,null))[_0x1f2c[77]](handleError(_0xc278x1d,null))};exports[_0x1f2c[128]]= function(_0xc278x2d,_0xc278x1d,_0xc278x35){var _0xc278x20={};var _0xc278x2e={};var _0xc278x37;var _0xc278x21;return db[_0x1f2c[54]][_0x1f2c[93]]({where:{id:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})[_0x1f2c[44]](handleEntityNotFound(_0xc278x1d,null))[_0x1f2c[44]](function(_0xc278x1d){if(_0xc278x1d){_0xc278x37= _0xc278x1d;_0xc278x2e[_0x1f2c[52]]= _[_0x1f2c[55]](db[_0x1f2c[129]][_0x1f2c[53]]);_0xc278x2e[_0x1f2c[57]]= _[_0x1f2c[55]](_0xc278x2d[_0x1f2c[57]]);_0xc278x2e[_0x1f2c[59]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],_0xc278x2e[_0x1f2c[57]]);_0xc278x20[_0x1f2c[61]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],qs[_0x1f2c[62]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[62]]));_0xc278x20[_0x1f2c[61]]= (_0xc278x20[_0x1f2c[61]][_0x1f2c[63]])?_0xc278x20[_0x1f2c[61]]:_0xc278x2e[_0x1f2c[52]];_0xc278x20[_0x1f2c[66]]= qs[_0x1f2c[67]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[67]]);_0xc278x20[_0x1f2c[68]]= qs[_0x1f2c[59]](_[_0x1f2c[69]](_0xc278x2d[_0x1f2c[57]],_0xc278x2e[_0x1f2c[59]]));if(_0xc278x2d[_0x1f2c[57]][_0x1f2c[73]]){_0xc278x20[_0x1f2c[68]]= _[_0x1f2c[72]](_0xc278x20[_0x1f2c[68]],{$or:_[_0x1f2c[75]](_0xc278x20[_0x1f2c[61]],function(_0xc278x31){var _0xc278x2f={};_0xc278x2f[_0xc278x31]= {$like:_0x1f2c[74]+ _0xc278x2d[_0x1f2c[57]][_0x1f2c[73]]+ _0x1f2c[74]};return _0xc278x2f})})};_0xc278x20= _[_0x1f2c[72]]({},_0xc278x20,_0xc278x2d[_0x1f2c[76]]);return _0xc278x37[_0x1f2c[128]](_0xc278x20)}})[_0x1f2c[44]](function(_0xc278x38){if(_0xc278x38){_0xc278x21= _0xc278x38[_0x1f2c[63]];if(!_0xc278x2d[_0x1f2c[57]][_0x1f2c[65]](_0x1f2c[64])){_0xc278x20[_0x1f2c[36]]= qs[_0x1f2c[36]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[36]]);_0xc278x20[_0x1f2c[35]]= qs[_0x1f2c[35]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[35]])};return _0xc278x37[_0x1f2c[128]](_0xc278x20)}})[_0x1f2c[44]](function(_0xc278x33){if(_0xc278x33){return _0xc278x33?{count:_0xc278x21,rows:_0xc278x33}:null}})[_0x1f2c[44]](respondWithResult(_0xc278x1d,null))[_0x1f2c[77]](handleError(_0xc278x1d,null))};exports[_0x1f2c[130]]= function(_0xc278x2d,_0xc278x1b,_0xc278x35){var _0xc278x45,_0xc278x46;return db[_0x1f2c[54]][_0x1f2c[85]]({where:{id:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})[_0x1f2c[44]](handleEntityNotFound(_0xc278x1b,null))[_0x1f2c[44]](function(_0xc278x1d){if(_0xc278x1d){_0xc278x46= _0xc278x1d;return _0xc278x1d[_0x1f2c[130]](_0xc278x2d[_0x1f2c[89]][_0x1f2c[103]],_[_0x1f2c[122]](_0xc278x2d[_0x1f2c[89]],[_0x1f2c[103],_0x1f2c[83]])|| {})};return null})[_0x1f2c[121]](function(_0xc278x44){var _0xc278x47;_0xc278x45= _0xc278x44|| [];var _0xc278x43=[];if(_0xc278x44){for(var _0xc278x3e=0;_0xc278x3e< _0xc278x44[_0x1f2c[63]];_0xc278x3e+= 1){var _0xc278x48=_0xc278x44[_0xc278x3e][_0x1f2c[131]]({plain:true});_0xc278x46[_0x1f2c[132]]= _0xc278x2d[_0x1f2c[89]][_0x1f2c[132]]?_0xc278x2d[_0x1f2c[89]][_0x1f2c[132]]:_0xc278x46[_0x1f2c[132]];switch(_0xc278x46[_0x1f2c[132]]){case _0x1f2c[156]:_0xc278x47= squel[_0x1f2c[155]]()[_0x1f2c[154]](_0x1f2c[141])[_0x1f2c[153]]([_0x1f2c[133],_0x1f2c[134],_0x1f2c[135],_0x1f2c[136],_0x1f2c[92],_0x1f2c[137],_0x1f2c[138]],squel[_0x1f2c[144]]()[_0x1f2c[143]](_0x1f2c[133],_0x1f2c[133])[_0x1f2c[143]](_0x1f2c[152],_0x1f2c[134])[_0x1f2c[143]](_0x1f2c[83],_0x1f2c[135])[_0x1f2c[143]](_0xc278x48[_0x1f2c[149]].toString(),_0x1f2c[136])[_0x1f2c[143]](_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]].toString(),_0x1f2c[92])[_0x1f2c[143]](_0x1f2c[152],_0x1f2c[137])[_0x1f2c[143]](_0x1f2c[152],_0x1f2c[138])[_0x1f2c[142]](_0x1f2c[151])[_0x1f2c[68]](_0x1f2c[150])[_0x1f2c[68]](_0x1f2c[148],_0xc278x48[_0x1f2c[149]].toString())[_0x1f2c[68]](_0x1f2c[147])[_0x1f2c[68]](_0x1f2c[139],squel[_0x1f2c[144]]()[_0x1f2c[143]](_0x1f2c[146])[_0x1f2c[142]](_0x1f2c[145])[_0x1f2c[68]](_0x1f2c[140],_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]].toString()))[_0x1f2c[68]](_0x1f2c[139],squel[_0x1f2c[144]]()[_0x1f2c[143]](_0x1f2c[133])[_0x1f2c[142]](_0x1f2c[141])[_0x1f2c[68]](_0x1f2c[140],_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]].toString()))).toString();break;case _0x1f2c[157]:_0xc278x47= squel[_0x1f2c[155]]()[_0x1f2c[154]](_0x1f2c[141])[_0x1f2c[153]]([_0x1f2c[133],_0x1f2c[134],_0x1f2c[135],_0x1f2c[136],_0x1f2c[92],_0x1f2c[137],_0x1f2c[138]],squel[_0x1f2c[144]]()[_0x1f2c[143]](_0x1f2c[133],_0x1f2c[133])[_0x1f2c[143]](_0x1f2c[152],_0x1f2c[134])[_0x1f2c[143]](_0x1f2c[83],_0x1f2c[135])[_0x1f2c[143]](_0xc278x48[_0x1f2c[149]].toString(),_0x1f2c[136])[_0x1f2c[143]](_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]].toString(),_0x1f2c[92])[_0x1f2c[143]](_0x1f2c[152],_0x1f2c[137])[_0x1f2c[143]](_0x1f2c[152],_0x1f2c[138])[_0x1f2c[142]](_0x1f2c[151])[_0x1f2c[68]](_0x1f2c[150])[_0x1f2c[68]](_0x1f2c[148],_0xc278x48[_0x1f2c[149]].toString())[_0x1f2c[68]](_0x1f2c[147])[_0x1f2c[68]](_0x1f2c[139],squel[_0x1f2c[144]]()[_0x1f2c[143]](_0x1f2c[133])[_0x1f2c[142]](_0x1f2c[141])[_0x1f2c[68]](_0x1f2c[140],_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]].toString()))).toString();break;default:_0xc278x47= squel[_0x1f2c[155]]()[_0x1f2c[154]](_0x1f2c[141])[_0x1f2c[153]]([_0x1f2c[133],_0x1f2c[134],_0x1f2c[135],_0x1f2c[136],_0x1f2c[92],_0x1f2c[137],_0x1f2c[138]],squel[_0x1f2c[144]]()[_0x1f2c[143]](_0x1f2c[133],_0x1f2c[133])[_0x1f2c[143]](_0x1f2c[152],_0x1f2c[134])[_0x1f2c[143]](_0x1f2c[83],_0x1f2c[135])[_0x1f2c[143]](_0xc278x48[_0x1f2c[149]].toString(),_0x1f2c[136])[_0x1f2c[143]](_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]].toString(),_0x1f2c[92])[_0x1f2c[143]](_0x1f2c[152],_0x1f2c[137])[_0x1f2c[143]](_0x1f2c[152],_0x1f2c[138])[_0x1f2c[142]](_0x1f2c[151])[_0x1f2c[68]](_0x1f2c[150])[_0x1f2c[68]](_0x1f2c[148],_0xc278x48[_0x1f2c[149]].toString())[_0x1f2c[68]](_0x1f2c[147])).toString()};_0xc278x43[_0x1f2c[116]](db[_0x1f2c[158]][_0x1f2c[57]](_0xc278x47))};return BPromise[_0x1f2c[117]](_0xc278x43)}})[_0x1f2c[44]](function(){return _0xc278x45})[_0x1f2c[44]](respondWithResult(_0xc278x1b,null))[_0x1f2c[77]](handleError(_0xc278x1b,null))};exports[_0x1f2c[159]]= function(_0xc278x2d,_0xc278x1b,_0xc278x35){var _0xc278x38;return db[_0x1f2c[54]][_0x1f2c[85]]({where:{id:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})[_0x1f2c[44]](handleEntityNotFound(_0xc278x1b,null))[_0x1f2c[44]](function(_0xc278x1d){if(_0xc278x1d){return _0xc278x1d[_0x1f2c[159]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[103]])}})[_0x1f2c[44]](function(_0xc278x44){if(_0xc278x44){_0xc278x38= _0xc278x44;return db[_0x1f2c[91]][_0x1f2c[46]]({where:{ListId:_0xc278x2d[_0x1f2c[57]][_0x1f2c[103]],VoiceQueueId:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})[_0x1f2c[44]](function(){return _0xc278x38})}})[_0x1f2c[44]](respondWithStatusCode(_0xc278x1b,null))[_0x1f2c[77]](handleError(_0xc278x1b,null))};exports[_0x1f2c[160]]= function(_0xc278x2d,_0xc278x1d,_0xc278x35){var _0xc278x20={};var _0xc278x2e={};var _0xc278x37;var _0xc278x21;return db[_0x1f2c[54]][_0x1f2c[93]]({where:{id:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})[_0x1f2c[44]](handleEntityNotFound(_0xc278x1d,null))[_0x1f2c[44]](function(_0xc278x1d){if(_0xc278x1d){_0xc278x37= _0xc278x1d;_0xc278x2e[_0x1f2c[52]]= _[_0x1f2c[55]](db[_0x1f2c[129]][_0x1f2c[53]]);_0xc278x2e[_0x1f2c[57]]= _[_0x1f2c[55]](_0xc278x2d[_0x1f2c[57]]);_0xc278x2e[_0x1f2c[59]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],_0xc278x2e[_0x1f2c[57]]);_0xc278x20[_0x1f2c[61]]= _[_0x1f2c[60]](_0xc278x2e[_0x1f2c[52]],qs[_0x1f2c[62]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[62]]));_0xc278x20[_0x1f2c[61]]= (_0xc278x20[_0x1f2c[61]][_0x1f2c[63]])?_0xc278x20[_0x1f2c[61]]:_0xc278x2e[_0x1f2c[52]];_0xc278x20[_0x1f2c[66]]= qs[_0x1f2c[67]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[67]]);_0xc278x20[_0x1f2c[68]]= qs[_0x1f2c[59]](_[_0x1f2c[69]](_0xc278x2d[_0x1f2c[57]],_0xc278x2e[_0x1f2c[59]]));if(_0xc278x2d[_0x1f2c[57]][_0x1f2c[73]]){_0xc278x20[_0x1f2c[68]]= _[_0x1f2c[72]](_0xc278x20[_0x1f2c[68]],{$or:_[_0x1f2c[75]](_0xc278x20[_0x1f2c[61]],function(_0xc278x31){var _0xc278x2f={};_0xc278x2f[_0xc278x31]= {$like:_0x1f2c[74]+ _0xc278x2d[_0x1f2c[57]][_0x1f2c[73]]+ _0x1f2c[74]};return _0xc278x2f})})};_0xc278x20= _[_0x1f2c[72]]({},_0xc278x20,_0xc278x2d[_0x1f2c[76]]);return _0xc278x37[_0x1f2c[160]](_0xc278x20)}})[_0x1f2c[44]](function(_0xc278x38){if(_0xc278x38){_0xc278x21= _0xc278x38[_0x1f2c[63]];if(!_0xc278x2d[_0x1f2c[57]][_0x1f2c[65]](_0x1f2c[64])){_0xc278x20[_0x1f2c[36]]= qs[_0x1f2c[36]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[36]]);_0xc278x20[_0x1f2c[35]]= qs[_0x1f2c[35]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[35]])};return _0xc278x37[_0x1f2c[160]](_0xc278x20)}})[_0x1f2c[44]](function(_0xc278x33){if(_0xc278x33){return _0xc278x33?{count:_0xc278x21,rows:_0xc278x33}:null}})[_0x1f2c[44]](respondWithResult(_0xc278x1d,null))[_0x1f2c[77]](handleError(_0xc278x1d,null))};exports[_0x1f2c[161]]= function(_0xc278x2d,_0xc278x1b,_0xc278x35){var _0xc278x45,_0xc278x46;return db[_0x1f2c[54]][_0x1f2c[85]]({where:{id:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})[_0x1f2c[44]](handleEntityNotFound(_0xc278x1b,null))[_0x1f2c[44]](function(_0xc278x1d){if(_0xc278x1d){_0xc278x46= _0xc278x1d;return _0xc278x1d[_0x1f2c[161]](_0xc278x2d[_0x1f2c[89]][_0x1f2c[103]],_[_0x1f2c[122]](_0xc278x2d[_0x1f2c[89]],[_0x1f2c[103],_0x1f2c[83]])|| {})};return null})[_0x1f2c[121]](function(_0xc278x44){var _0xc278x47;_0xc278x45= _0xc278x44|| [];var _0xc278x43=[];if(_0xc278x44){for(var _0xc278x3e=0;_0xc278x3e< _0xc278x44[_0x1f2c[63]];_0xc278x3e+= 1){var _0xc278x48=_0xc278x44[_0xc278x3e][_0x1f2c[131]]({plain:true});_0xc278x47= squel[_0x1f2c[155]]()[_0x1f2c[154]](_0x1f2c[162])[_0x1f2c[153]]([_0x1f2c[133],_0x1f2c[135],_0x1f2c[136],_0x1f2c[92],_0x1f2c[137],_0x1f2c[138]],squel[_0x1f2c[144]]()[_0x1f2c[143]](_0x1f2c[133],_0x1f2c[133])[_0x1f2c[143]](_0x1f2c[83],_0x1f2c[135])[_0x1f2c[143]](_0xc278x48[_0x1f2c[149]].toString(),_0x1f2c[136])[_0x1f2c[143]](_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]].toString(),_0x1f2c[92])[_0x1f2c[143]](_0x1f2c[152],_0x1f2c[137])[_0x1f2c[143]](_0x1f2c[152],_0x1f2c[138])[_0x1f2c[142]](_0x1f2c[151])[_0x1f2c[68]](_0x1f2c[150])[_0x1f2c[68]](_0x1f2c[148],_0xc278x48[_0x1f2c[149]].toString())[_0x1f2c[68]](_0x1f2c[147])).toString();_0xc278x43[_0x1f2c[116]](db[_0x1f2c[158]][_0x1f2c[57]](_0xc278x47))};return BPromise[_0x1f2c[117]](_0xc278x43)}})[_0x1f2c[44]](function(){return _0xc278x45})[_0x1f2c[44]](respondWithResult(_0xc278x1b,null))[_0x1f2c[77]](handleError(_0xc278x1b,null))};exports[_0x1f2c[163]]= function(_0xc278x2d,_0xc278x1b,_0xc278x35){var _0xc278x38;return db[_0x1f2c[54]][_0x1f2c[85]]({where:{id:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})[_0x1f2c[44]](handleEntityNotFound(_0xc278x1b,null))[_0x1f2c[44]](function(_0xc278x1d){if(_0xc278x1d){return _0xc278x1d[_0x1f2c[163]](_0xc278x2d[_0x1f2c[57]][_0x1f2c[103]])}})[_0x1f2c[44]](function(_0xc278x44){if(_0xc278x44){_0xc278x38= _0xc278x44;return db[_0x1f2c[99]][_0x1f2c[46]]({where:{ListId:_0xc278x2d[_0x1f2c[57]][_0x1f2c[103]],VoiceQueueId:_0xc278x2d[_0x1f2c[84]][_0x1f2c[83]]}})[_0x1f2c[44]](function(){return _0xc278x38})}})[_0x1f2c[44]](respondWithStatusCode(_0xc278x1b,null))[_0x1f2c[77]](handleError(_0xc278x1b,null))}
\ No newline at end of file
+var _0xc293=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x75\x73\x65\x72","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x62\x6F\x64\x79","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x69\x65\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x67\x65\x74\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x67\x65\x74\x54\x65\x61\x6D\x73","\x54\x65\x61\x6D","\x61\x64\x64\x54\x65\x61\x6D\x73","\x69\x64\x73","\x70\x65\x6E\x61\x6C\x74\x79","\x41\x67\x65\x6E\x74\x73","\x75\x6E\x69\x6F\x6E","\x55\x73\x65\x72","\x72\x65\x6D\x6F\x76\x65\x54\x65\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x66\x6F\x72\x6D\x61\x74","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x75\x70\x73\x65\x72\x74","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74","\x70\x75\x73\x68","\x61\x6C\x6C","\x6C\x6F\x67\x69\x6E\x49\x6E\x50\x61\x75\x73\x65","\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x73\x70\x72\x65\x61\x64","\x6F\x6D\x69\x74","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x69\x73\x41\x72\x72\x61\x79","\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x67\x65\x74\x4D\x65\x6D\x62\x65\x72\x73","\x67\x65\x74\x4C\x69\x73\x74\x73","\x43\x6D\x4C\x69\x73\x74","\x61\x64\x64\x4C\x69\x73\x74\x73","\x67\x65\x74","\x64\x69\x61\x6C\x43\x68\x65\x63\x6B\x44\x75\x70\x6C\x69\x63\x61\x74\x65\x54\x79\x70\x65","\x70\x68\x6F\x6E\x65","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x68\x6F\x6E\x65\x20\x4E\x4F\x54\x20\x49\x4E\x20\x28\x3F\x29","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64\x20\x3D\x20\x3F","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72","\x66\x72\x6F\x6D","\x66\x69\x65\x6C\x64","\x73\x65\x6C\x65\x63\x74","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x66\x69\x6E\x61\x6C","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x70\x68\x6F\x6E\x65\x20\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C","\x4C\x69\x73\x74\x49\x64\x20\x3D\x20\x3F","\x43\x6D\x4C\x69\x73\x74\x49\x64","\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x20\x49\x53\x20\x4E\x55\x4C\x4C","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x4E\x4F\x57\x28\x29","\x66\x72\x6F\x6D\x51\x75\x65\x72\x79","\x69\x6E\x74\x6F","\x69\x6E\x73\x65\x72\x74","\x61\x6C\x77\x61\x79\x73","\x6F\x6E\x6C\x79\x49\x66\x4F\x70\x65\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x73","\x67\x65\x74\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x61\x64\x64\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x62\x6C\x61\x63\x6B","\x72\x65\x6D\x6F\x76\x65\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73"];_0xc293[0];var jsonpatch=require(_0xc293[1]);var rp=require(_0xc293[2]);var moment=require(_0xc293[3]);var BPromise=require(_0xc293[4]);var Mustache=require(_0xc293[5]);var util=require(_0xc293[6]);var path=require(_0xc293[7]);var sox=require(_0xc293[8]);var csv=require(_0xc293[9]);var ejs=require(_0xc293[10]);var fs=require(_0xc293[11]);var _=require(_0xc293[12]);var squel=require(_0xc293[13]);var crypto=require(_0xc293[14]);var jsforce=require(_0xc293[15]);var deskjs=require(_0xc293[16]);var toCsv=require(_0xc293[9]);var querystring=require(_0xc293[17]);var Papa=require(_0xc293[18]);var qs=require(_0xc293[19]);var logger=require(_0xc293[21])(_0xc293[20]);var utils=require(_0xc293[22]);var config=require(_0xc293[23]);var db=require(_0xc293[25])[_0xc293[24]];var socket=require(_0xc293[27])({host:_0xc293[26],port:6379});require(_0xc293[29])[_0xc293[28]](socket);function respondWithStatusCode(_0xbe2dx1b,_0xbe2dx1c){_0xbe2dx1c= _0xbe2dx1c|| 204;return function(_0xbe2dx1d){if(_0xbe2dx1d){return _0xbe2dx1b[_0xc293[30]](_0xbe2dx1c)};return _0xbe2dx1b[_0xc293[32]](_0xbe2dx1c)[_0xc293[31]]()}}function respondWithResult(_0xbe2dx1b,_0xbe2dx1c){_0xbe2dx1c= _0xbe2dx1c|| 200;return function(_0xbe2dx1d){if(_0xbe2dx1d){return _0xbe2dx1b[_0xc293[32]](_0xbe2dx1c)[_0xc293[33]](_0xbe2dx1d)}}}function respondWithFilteredResult(_0xbe2dx1b,_0xbe2dx20){return function(_0xbe2dx1d){if(_0xbe2dx1d){var _0xbe2dx21=_0xbe2dx1d[_0xc293[34]],_0xbe2dx22=_0xbe2dx20[_0xc293[35]],_0xbe2dx23=_0xbe2dx20[_0xc293[35]]+ _0xbe2dx20[_0xc293[36]],_0xbe2dx1c;if(_0xbe2dx23>= _0xbe2dx21){_0xbe2dx23= _0xbe2dx21;_0xbe2dx1c= 200}else {_0xbe2dx1c= 206};_0xbe2dx1b[_0xc293[32]](_0xbe2dx1c);return _0xbe2dx1b[_0xc293[40]](_0xc293[37],_0xbe2dx22+ _0xc293[38]+ _0xbe2dx23+ _0xc293[39]+ _0xbe2dx21)[_0xc293[33]](_0xbe2dx1d)};return null}}function patchUpdates(_0xbe2dx25){return function(_0xbe2dx1d){try{jsonpatch[_0xc293[41]](_0xbe2dx1d,_0xbe2dx25,true)}catch(err){return BPromise[_0xc293[42]](err)};return _0xbe2dx1d[_0xc293[43]]()}}function saveUpdates(_0xbe2dx27,_0xbe2dx1c){return function(_0xbe2dx1d){if(_0xbe2dx1d){return _0xbe2dx1d[_0xc293[45]](_0xbe2dx27)[_0xc293[44]](function(_0xbe2dx28){return _0xbe2dx28})};return null}}function removeEntity(_0xbe2dx1b,_0xbe2dx1c){return function(_0xbe2dx1d){if(_0xbe2dx1d){return _0xbe2dx1d[_0xc293[46]]()[_0xc293[44]](function(){_0xbe2dx1b[_0xc293[32]](204)[_0xc293[31]]()})}}}function handleEntityNotFound(_0xbe2dx1b,_0xbe2dx1c){return function(_0xbe2dx1d){if(!_0xbe2dx1d){_0xbe2dx1b[_0xc293[30]](404)};return _0xbe2dx1d}}function handleError(_0xbe2dx1b,_0xbe2dx1c){_0xbe2dx1c= _0xbe2dx1c|| 500;return function(_0xbe2dx2c){logger[_0xc293[48]](_0xbe2dx2c[_0xc293[47]]);if(_0xbe2dx2c[_0xc293[49]]){delete _0xbe2dx2c[_0xc293[49]]};_0xbe2dx1b[_0xc293[32]](_0xbe2dx1c)[_0xc293[50]](_0xbe2dx2c)}}exports[_0xc293[51]]= function(_0xbe2dx2d,_0xbe2dx1b){var _0xbe2dx20={},_0xbe2dx2e={},_0xbe2dx2f={count:0,rows:[]};_0xbe2dx2e[_0xc293[52]]= _[_0xc293[55]](db[_0xc293[54]][_0xc293[53]]);var _0xbe2dx30={dateStart:_0xbe2dx2d[_0xc293[57]][_0xc293[56]],dateEnd:_0xbe2dx2d[_0xc293[57]][_0xc293[58]]};delete _0xbe2dx2d[_0xc293[57]][_0xc293[56]];delete _0xbe2dx2d[_0xc293[57]][_0xc293[58]];_0xbe2dx2e[_0xc293[57]]= _[_0xc293[55]](_0xbe2dx2d[_0xc293[57]]);_0xbe2dx2e[_0xc293[59]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],_0xbe2dx2e[_0xc293[57]]);_0xbe2dx20[_0xc293[61]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],qs[_0xc293[62]](_0xbe2dx2d[_0xc293[57]][_0xc293[62]]));_0xbe2dx20[_0xc293[61]]= (_0xbe2dx20[_0xc293[61]][_0xc293[63]])?_0xbe2dx20[_0xc293[61]]:_0xbe2dx2e[_0xc293[52]];if(!_0xbe2dx2d[_0xc293[57]][_0xc293[65]](_0xc293[64])){_0xbe2dx20[_0xc293[36]]= qs[_0xc293[36]](_0xbe2dx2d[_0xc293[57]][_0xc293[36]]);_0xbe2dx20[_0xc293[35]]= qs[_0xc293[35]](_0xbe2dx2d[_0xc293[57]][_0xc293[35]])};_0xbe2dx20[_0xc293[66]]= qs[_0xc293[67]](_0xbe2dx2d[_0xc293[57]][_0xc293[67]]);_0xbe2dx20[_0xc293[68]]= qs[_0xc293[59]](_[_0xc293[69]](_0xbe2dx2d[_0xc293[57]],_0xbe2dx2e[_0xc293[59]]));if(_0xbe2dx30[_0xc293[56]]){if(_0xbe2dx30[_0xc293[58]]){_0xbe2dx30[_0xc293[58]]= moment(_0xbe2dx30[_0xc293[58]])[_0xc293[71]](1,_0xc293[70])}else {_0xbe2dx30[_0xc293[58]]= moment(_0xbe2dx30[_0xc293[56]])[_0xc293[71]](1,_0xc293[70])};_[_0xc293[72]](_0xbe2dx20[_0xc293[68]],{createdAt:{$gte:_0xbe2dx30[_0xc293[56]],$lte:_0xbe2dx30[_0xc293[58]]}})};if(_0xbe2dx2d[_0xc293[57]][_0xc293[73]]){_0xbe2dx20[_0xc293[68]]= _[_0xc293[72]](_0xbe2dx20[_0xc293[68]],{$or:_[_0xc293[75]](_0xbe2dx20[_0xc293[61]],function(_0xbe2dx31){var _0xbe2dx2f={};_0xbe2dx2f[_0xbe2dx31]= {$like:_0xc293[74]+ _0xbe2dx2d[_0xc293[57]][_0xc293[73]]+ _0xc293[74]};return _0xbe2dx2f})})};_0xbe2dx20= _[_0xc293[72]]({},_0xbe2dx20,_0xbe2dx2d[_0xc293[76]]);var _0xbe2dx32={where:_0xbe2dx20[_0xc293[68]]};return db[_0xc293[54]][_0xc293[34]](_0xbe2dx32)[_0xc293[44]](function(_0xbe2dx21){_0xbe2dx2f[_0xc293[34]]= _0xbe2dx21;if(_0xbe2dx2d[_0xc293[57]][_0xc293[79]]){_0xbe2dx20[_0xc293[80]]= [{all:true}]};return db[_0xc293[54]][_0xc293[81]](_0xbe2dx20)})[_0xc293[44]](function(_0xbe2dx33){_0xbe2dx2f[_0xc293[78]]= _0xbe2dx33;return _0xbe2dx2f})[_0xc293[44]](respondWithFilteredResult(_0xbe2dx1b,_0xbe2dx20))[_0xc293[77]](handleError(_0xbe2dx1b,null))};exports[_0xc293[82]]= function(_0xbe2dx2d,_0xbe2dx1b){var _0xbe2dx20={raw:false,where:{id:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}},_0xbe2dx2e={};_0xbe2dx2e[_0xc293[52]]= _[_0xc293[55]](db[_0xc293[54]][_0xc293[53]]);_0xbe2dx2e[_0xc293[57]]= _[_0xc293[55]](_0xbe2dx2d[_0xc293[57]]);_0xbe2dx2e[_0xc293[59]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],_0xbe2dx2e[_0xc293[57]]);_0xbe2dx20[_0xc293[61]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],qs[_0xc293[62]](_0xbe2dx2d[_0xc293[57]][_0xc293[62]]));_0xbe2dx20[_0xc293[61]]= (_0xbe2dx20[_0xc293[61]][_0xc293[63]])?_0xbe2dx20[_0xc293[61]]:_0xbe2dx2e[_0xc293[52]];if(_0xbe2dx2d[_0xc293[57]][_0xc293[79]]){_0xbe2dx20[_0xc293[80]]= [{all:true}]};_0xbe2dx20= _[_0xc293[72]]({},_0xbe2dx20,_0xbe2dx2d[_0xc293[76]]);return db[_0xc293[54]][_0xc293[85]](_0xbe2dx20)[_0xc293[44]](handleEntityNotFound(_0xbe2dx1b,null))[_0xc293[44]](respondWithResult(_0xbe2dx1b,null))[_0xc293[77]](handleError(_0xbe2dx1b,null))};exports[_0xc293[86]]= function(_0xbe2dx2d,_0xbe2dx1b){var _0xbe2dx34=null;return db[_0xc293[54]][_0xc293[86]](_0xbe2dx2d[_0xc293[89]],{})[_0xc293[44]](function(_0xbe2dx1d){_0xbe2dx34= _0xbe2dx1d;if(_0xbe2dx1d){_0xbe2dx34[_0xc293[88]]([_0xbe2dx2d[_0xc293[87]][_0xc293[83]]])};return _0xbe2dx34})[_0xc293[44]](respondWithResult(_0xbe2dx1b,201))[_0xc293[77]](handleError(_0xbe2dx1b,null))};exports[_0xc293[45]]= function(_0xbe2dx2d,_0xbe2dx1b){if(_0xbe2dx2d[_0xc293[89]][_0xc293[83]]){delete _0xbe2dx2d[_0xc293[89]][_0xc293[83]]};return db[_0xc293[54]][_0xc293[85]]({where:{id:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})[_0xc293[44]](handleEntityNotFound(_0xbe2dx1b,null))[_0xc293[44]](saveUpdates(_0xbe2dx2d[_0xc293[89]],null))[_0xc293[44]](respondWithResult(_0xbe2dx1b,null))[_0xc293[77]](handleError(_0xbe2dx1b,null))};exports[_0xc293[46]]= function(_0xbe2dx2d,_0xbe2dx1b){return db[_0xc293[54]][_0xc293[85]]({where:{id:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})[_0xc293[44]](handleEntityNotFound(_0xbe2dx1b,null))[_0xc293[44]](removeEntity(_0xbe2dx1b,null))[_0xc293[77]](handleError(_0xbe2dx1b,null))};exports[_0xc293[90]]= function(_0xbe2dx2d,_0xbe2dx1b,_0xbe2dx35){var _0xbe2dx20={raw:false,where:{}};var _0xbe2dx2e={};var _0xbe2dx36={count:0,rows:[]};return db[_0xc293[54]][_0xc293[93]]({where:{id:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})[_0xc293[44]](handleEntityNotFound(_0xbe2dx1b,null))[_0xc293[44]](function(_0xbe2dx1d){if(_0xbe2dx1d){_0xbe2dx2e[_0xc293[52]]= _[_0xc293[55]](db[_0xc293[91]][_0xc293[53]]);_0xbe2dx2e[_0xc293[57]]= _[_0xc293[55]](_0xbe2dx2d[_0xc293[57]]);_0xbe2dx2e[_0xc293[59]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],_0xbe2dx2e[_0xc293[57]]);_0xbe2dx20[_0xc293[61]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],qs[_0xc293[62]](_0xbe2dx2d[_0xc293[57]][_0xc293[62]]));_0xbe2dx20[_0xc293[61]]= (_0xbe2dx20[_0xc293[61]][_0xc293[63]])?_0xbe2dx20[_0xc293[61]]:_0xbe2dx2e[_0xc293[52]];if(!_0xbe2dx2d[_0xc293[57]][_0xc293[65]](_0xc293[64])){_0xbe2dx20[_0xc293[36]]= qs[_0xc293[36]](_0xbe2dx2d[_0xc293[57]][_0xc293[36]]);_0xbe2dx20[_0xc293[35]]= qs[_0xc293[35]](_0xbe2dx2d[_0xc293[57]][_0xc293[35]])};_0xbe2dx20[_0xc293[66]]= qs[_0xc293[67]](_0xbe2dx2d[_0xc293[57]][_0xc293[67]]);_0xbe2dx20[_0xc293[68]]= qs[_0xc293[59]](_[_0xc293[69]](_0xbe2dx2d[_0xc293[57]],_0xbe2dx2e[_0xc293[59]]));_0xbe2dx20[_0xc293[68]][_0xc293[92]]= _0xbe2dx1d[_0xc293[83]];if(_0xbe2dx2d[_0xc293[57]][_0xc293[73]]){_0xbe2dx20[_0xc293[68]]= _[_0xc293[72]](_0xbe2dx20[_0xc293[68]],{$or:_[_0xc293[75]](_0xbe2dx20[_0xc293[61]],function(_0xbe2dx31){var _0xbe2dx2f={};_0xbe2dx2f[_0xbe2dx31]= {$like:_0xc293[74]+ _0xbe2dx2d[_0xc293[57]][_0xc293[73]]+ _0xc293[74]};return _0xbe2dx2f})})};_0xbe2dx20= _[_0xc293[72]]({},_0xbe2dx20,_0xbe2dx2d[_0xc293[76]]);return db[_0xc293[91]][_0xc293[34]]({where:_0xbe2dx20[_0xc293[68]]})[_0xc293[44]](function(_0xbe2dx21){_0xbe2dx36[_0xc293[34]]= _0xbe2dx21;if(_0xbe2dx2d[_0xc293[57]][_0xc293[79]]){_0xbe2dx20[_0xc293[80]]= [{all:true}]};return db[_0xc293[91]][_0xc293[81]](_0xbe2dx20)})[_0xc293[44]](function(_0xbe2dx33){_0xbe2dx36[_0xc293[78]]= _0xbe2dx33;return _0xbe2dx36})}})[_0xc293[44]](respondWithFilteredResult(_0xbe2dx1b,_0xbe2dx20))[_0xc293[77]](handleError(_0xbe2dx1b,null))};exports[_0xc293[94]]= function(_0xbe2dx2d,_0xbe2dx1b,_0xbe2dx35){var _0xbe2dx20={raw:true,where:{}};var _0xbe2dx2e={};var _0xbe2dx36={count:0,rows:[]};return db[_0xc293[54]][_0xc293[93]]({where:{id:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})[_0xc293[44]](handleEntityNotFound(_0xbe2dx1b,null))[_0xc293[44]](function(_0xbe2dx1d){if(_0xbe2dx1d){_0xbe2dx2e[_0xc293[52]]= _[_0xc293[55]](db[_0xc293[95]][_0xc293[53]]);_0xbe2dx2e[_0xc293[57]]= _[_0xc293[55]](_0xbe2dx2d[_0xc293[57]]);_0xbe2dx2e[_0xc293[59]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],_0xbe2dx2e[_0xc293[57]]);_0xbe2dx20[_0xc293[61]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],qs[_0xc293[62]](_0xbe2dx2d[_0xc293[57]][_0xc293[62]]));_0xbe2dx20[_0xc293[61]]= (_0xbe2dx20[_0xc293[61]][_0xc293[63]])?_0xbe2dx20[_0xc293[61]]:_0xbe2dx2e[_0xc293[52]];if(!_0xbe2dx2d[_0xc293[57]][_0xc293[65]](_0xc293[64])){_0xbe2dx20[_0xc293[36]]= qs[_0xc293[36]](_0xbe2dx2d[_0xc293[57]][_0xc293[36]]);_0xbe2dx20[_0xc293[35]]= qs[_0xc293[35]](_0xbe2dx2d[_0xc293[57]][_0xc293[35]])};_0xbe2dx20[_0xc293[66]]= qs[_0xc293[67]](_0xbe2dx2d[_0xc293[57]][_0xc293[67]]);_0xbe2dx20[_0xc293[68]]= qs[_0xc293[59]](_[_0xc293[69]](_0xbe2dx2d[_0xc293[57]],_0xbe2dx2e[_0xc293[59]]));_0xbe2dx20[_0xc293[68]][_0xc293[92]]= _0xbe2dx1d[_0xc293[83]];if(_0xbe2dx2d[_0xc293[57]][_0xc293[73]]){_0xbe2dx20[_0xc293[68]]= _[_0xc293[72]](_0xbe2dx20[_0xc293[68]],{$or:_[_0xc293[75]](_0xbe2dx20[_0xc293[61]],function(_0xbe2dx31){var _0xbe2dx2f={};_0xbe2dx2f[_0xbe2dx31]= {$like:_0xc293[74]+ _0xbe2dx2d[_0xc293[57]][_0xc293[73]]+ _0xc293[74]};return _0xbe2dx2f})})};_0xbe2dx20= _[_0xc293[72]]({},_0xbe2dx20,_0xbe2dx2d[_0xc293[76]]);return db[_0xc293[95]][_0xc293[34]]({where:_0xbe2dx20[_0xc293[68]]})[_0xc293[44]](function(_0xbe2dx21){_0xbe2dx36[_0xc293[34]]= _0xbe2dx21;if(_0xbe2dx2d[_0xc293[57]][_0xc293[79]]){_0xbe2dx20[_0xc293[80]]= [{all:true}]};return db[_0xc293[95]][_0xc293[81]](_0xbe2dx20)})[_0xc293[44]](function(_0xbe2dx33){_0xbe2dx36[_0xc293[78]]= _0xbe2dx33;return _0xbe2dx36})}})[_0xc293[44]](respondWithFilteredResult(_0xbe2dx1b,_0xbe2dx20))[_0xc293[77]](handleError(_0xbe2dx1b,null))};exports[_0xc293[96]]= function(_0xbe2dx2d,_0xbe2dx1b,_0xbe2dx35){var _0xbe2dx20={raw:true,where:{}};var _0xbe2dx2e={};var _0xbe2dx36={count:0,rows:[]};return db[_0xc293[54]][_0xc293[93]]({where:{id:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})[_0xc293[44]](handleEntityNotFound(_0xbe2dx1b,null))[_0xc293[44]](function(_0xbe2dx1d){if(_0xbe2dx1d){_0xbe2dx2e[_0xc293[52]]= _[_0xc293[55]](db[_0xc293[97]][_0xc293[53]]);_0xbe2dx2e[_0xc293[57]]= _[_0xc293[55]](_0xbe2dx2d[_0xc293[57]]);_0xbe2dx2e[_0xc293[59]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],_0xbe2dx2e[_0xc293[57]]);_0xbe2dx20[_0xc293[61]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],qs[_0xc293[62]](_0xbe2dx2d[_0xc293[57]][_0xc293[62]]));_0xbe2dx20[_0xc293[61]]= (_0xbe2dx20[_0xc293[61]][_0xc293[63]])?_0xbe2dx20[_0xc293[61]]:_0xbe2dx2e[_0xc293[52]];if(!_0xbe2dx2d[_0xc293[57]][_0xc293[65]](_0xc293[64])){_0xbe2dx20[_0xc293[36]]= qs[_0xc293[36]](_0xbe2dx2d[_0xc293[57]][_0xc293[36]]);_0xbe2dx20[_0xc293[35]]= qs[_0xc293[35]](_0xbe2dx2d[_0xc293[57]][_0xc293[35]])};_0xbe2dx20[_0xc293[66]]= qs[_0xc293[67]](_0xbe2dx2d[_0xc293[57]][_0xc293[67]]);_0xbe2dx20[_0xc293[68]]= qs[_0xc293[59]](_[_0xc293[69]](_0xbe2dx2d[_0xc293[57]],_0xbe2dx2e[_0xc293[59]]));_0xbe2dx20[_0xc293[68]][_0xc293[92]]= _0xbe2dx1d[_0xc293[83]];if(_0xbe2dx2d[_0xc293[57]][_0xc293[73]]){_0xbe2dx20[_0xc293[68]]= _[_0xc293[72]](_0xbe2dx20[_0xc293[68]],{$or:_[_0xc293[75]](_0xbe2dx20[_0xc293[61]],function(_0xbe2dx31){var _0xbe2dx2f={};_0xbe2dx2f[_0xbe2dx31]= {$like:_0xc293[74]+ _0xbe2dx2d[_0xc293[57]][_0xc293[73]]+ _0xc293[74]};return _0xbe2dx2f})})};_0xbe2dx20= _[_0xc293[72]]({},_0xbe2dx20,_0xbe2dx2d[_0xc293[76]]);return db[_0xc293[97]][_0xc293[34]]({where:_0xbe2dx20[_0xc293[68]]})[_0xc293[44]](function(_0xbe2dx21){_0xbe2dx36[_0xc293[34]]= _0xbe2dx21;if(_0xbe2dx2d[_0xc293[57]][_0xc293[79]]){_0xbe2dx20[_0xc293[80]]= [{all:true}]};return db[_0xc293[97]][_0xc293[81]](_0xbe2dx20)})[_0xc293[44]](function(_0xbe2dx33){_0xbe2dx36[_0xc293[78]]= _0xbe2dx33;return _0xbe2dx36})}})[_0xc293[44]](respondWithFilteredResult(_0xbe2dx1b,_0xbe2dx20))[_0xc293[77]](handleError(_0xbe2dx1b,null))};exports[_0xc293[98]]= function(_0xbe2dx2d,_0xbe2dx1b,_0xbe2dx35){var _0xbe2dx20={raw:true,where:{}};var _0xbe2dx2e={};var _0xbe2dx36={count:0,rows:[]};return db[_0xc293[54]][_0xc293[93]]({where:{id:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})[_0xc293[44]](handleEntityNotFound(_0xbe2dx1b,null))[_0xc293[44]](function(_0xbe2dx1d){if(_0xbe2dx1d){_0xbe2dx2e[_0xc293[52]]= _[_0xc293[55]](db[_0xc293[99]][_0xc293[53]]);_0xbe2dx2e[_0xc293[57]]= _[_0xc293[55]](_0xbe2dx2d[_0xc293[57]]);_0xbe2dx2e[_0xc293[59]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],_0xbe2dx2e[_0xc293[57]]);_0xbe2dx20[_0xc293[61]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],qs[_0xc293[62]](_0xbe2dx2d[_0xc293[57]][_0xc293[62]]));_0xbe2dx20[_0xc293[61]]= (_0xbe2dx20[_0xc293[61]][_0xc293[63]])?_0xbe2dx20[_0xc293[61]]:_0xbe2dx2e[_0xc293[52]];if(!_0xbe2dx2d[_0xc293[57]][_0xc293[65]](_0xc293[64])){_0xbe2dx20[_0xc293[36]]= qs[_0xc293[36]](_0xbe2dx2d[_0xc293[57]][_0xc293[36]]);_0xbe2dx20[_0xc293[35]]= qs[_0xc293[35]](_0xbe2dx2d[_0xc293[57]][_0xc293[35]])};_0xbe2dx20[_0xc293[66]]= qs[_0xc293[67]](_0xbe2dx2d[_0xc293[57]][_0xc293[67]]);_0xbe2dx20[_0xc293[68]]= qs[_0xc293[59]](_[_0xc293[69]](_0xbe2dx2d[_0xc293[57]],_0xbe2dx2e[_0xc293[59]]));_0xbe2dx20[_0xc293[68]][_0xc293[92]]= _0xbe2dx1d[_0xc293[83]];if(_0xbe2dx2d[_0xc293[57]][_0xc293[73]]){_0xbe2dx20[_0xc293[68]]= _[_0xc293[72]](_0xbe2dx20[_0xc293[68]],{$or:_[_0xc293[75]](_0xbe2dx20[_0xc293[61]],function(_0xbe2dx31){var _0xbe2dx2f={};_0xbe2dx2f[_0xbe2dx31]= {$like:_0xc293[74]+ _0xbe2dx2d[_0xc293[57]][_0xc293[73]]+ _0xc293[74]};return _0xbe2dx2f})})};_0xbe2dx20= _[_0xc293[72]]({},_0xbe2dx20,_0xbe2dx2d[_0xc293[76]]);return db[_0xc293[99]][_0xc293[34]]({where:_0xbe2dx20[_0xc293[68]]})[_0xc293[44]](function(_0xbe2dx21){_0xbe2dx36[_0xc293[34]]= _0xbe2dx21;if(_0xbe2dx2d[_0xc293[57]][_0xc293[79]]){_0xbe2dx20[_0xc293[80]]= [{all:true}]};return db[_0xc293[99]][_0xc293[81]](_0xbe2dx20)})[_0xc293[44]](function(_0xbe2dx33){_0xbe2dx36[_0xc293[78]]= _0xbe2dx33;return _0xbe2dx36})}})[_0xc293[44]](respondWithFilteredResult(_0xbe2dx1b,_0xbe2dx20))[_0xc293[77]](handleError(_0xbe2dx1b,null))};exports[_0xc293[100]]= function(_0xbe2dx2d,_0xbe2dx1d,_0xbe2dx35){var _0xbe2dx20={};var _0xbe2dx2e={};var _0xbe2dx37;var _0xbe2dx21;return db[_0xc293[54]][_0xc293[93]]({where:{id:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})[_0xc293[44]](handleEntityNotFound(_0xbe2dx1d,null))[_0xc293[44]](function(_0xbe2dx1d){if(_0xbe2dx1d){_0xbe2dx37= _0xbe2dx1d;_0xbe2dx2e[_0xc293[52]]= _[_0xc293[55]](db[_0xc293[101]][_0xc293[53]]);_0xbe2dx2e[_0xc293[57]]= _[_0xc293[55]](_0xbe2dx2d[_0xc293[57]]);_0xbe2dx2e[_0xc293[59]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],_0xbe2dx2e[_0xc293[57]]);_0xbe2dx20[_0xc293[61]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],qs[_0xc293[62]](_0xbe2dx2d[_0xc293[57]][_0xc293[62]]));_0xbe2dx20[_0xc293[61]]= (_0xbe2dx20[_0xc293[61]][_0xc293[63]])?_0xbe2dx20[_0xc293[61]]:_0xbe2dx2e[_0xc293[52]];_0xbe2dx20[_0xc293[66]]= qs[_0xc293[67]](_0xbe2dx2d[_0xc293[57]][_0xc293[67]]);_0xbe2dx20[_0xc293[68]]= qs[_0xc293[59]](_[_0xc293[69]](_0xbe2dx2d[_0xc293[57]],_0xbe2dx2e[_0xc293[59]]));if(_0xbe2dx2d[_0xc293[57]][_0xc293[73]]){_0xbe2dx20[_0xc293[68]]= _[_0xc293[72]](_0xbe2dx20[_0xc293[68]],{$or:_[_0xc293[75]](_0xbe2dx20[_0xc293[61]],function(_0xbe2dx31){var _0xbe2dx2f={};_0xbe2dx2f[_0xbe2dx31]= {$like:_0xc293[74]+ _0xbe2dx2d[_0xc293[57]][_0xc293[73]]+ _0xc293[74]};return _0xbe2dx2f})})};_0xbe2dx20= _[_0xc293[72]]({},_0xbe2dx20,_0xbe2dx2d[_0xc293[76]]);return _0xbe2dx37[_0xc293[100]](_0xbe2dx20)}})[_0xc293[44]](function(_0xbe2dx38){if(_0xbe2dx38){_0xbe2dx21= _0xbe2dx38[_0xc293[63]];if(!_0xbe2dx2d[_0xc293[57]][_0xc293[65]](_0xc293[64])){_0xbe2dx20[_0xc293[36]]= qs[_0xc293[36]](_0xbe2dx2d[_0xc293[57]][_0xc293[36]]);_0xbe2dx20[_0xc293[35]]= qs[_0xc293[35]](_0xbe2dx2d[_0xc293[57]][_0xc293[35]])};return _0xbe2dx37[_0xc293[100]](_0xbe2dx20)}})[_0xc293[44]](function(_0xbe2dx33){if(_0xbe2dx33){return _0xbe2dx33?{count:_0xbe2dx21,rows:_0xbe2dx33}:null}})[_0xc293[44]](respondWithResult(_0xbe2dx1d,null))[_0xc293[77]](handleError(_0xbe2dx1d,null))};exports[_0xc293[102]]= function(_0xbe2dx2d,_0xbe2dx1b,_0xbe2dx35){var _0xbe2dx39=[];var _0xbe2dx3a;return db[_0xc293[101]][_0xc293[81]]({where:{id:_0xbe2dx2d[_0xc293[89]][_0xc293[103]]},attributes:[_0xc293[83]],include:[{model:db[_0xc293[107]],as:_0xc293[105],attributes:[_0xc293[83]],raw:true}]})[_0xc293[44]](function(_0xbe2dx3d){if(_0xbe2dx3d){for(var _0xbe2dx3e=0;_0xbe2dx3e< _0xbe2dx3d[_0xc293[63]];_0xbe2dx3e+= 1){for(var _0xbe2dx3f=0;_0xbe2dx3f< _0xbe2dx3d[_0xbe2dx3e][_0xc293[105]][_0xc293[63]];_0xbe2dx3f+= 1){_0xbe2dx39= _[_0xc293[106]](_0xbe2dx39,[_0xbe2dx3d[_0xbe2dx3e][_0xc293[105]][_0xbe2dx3f][_0xc293[83]]])}};return _0xbe2dx39}})[_0xc293[44]](function(_0xbe2dx3c){if(_0xbe2dx3c){return db[_0xc293[54]][_0xc293[85]]({where:{id:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})}})[_0xc293[44]](function(_0xbe2dx3b){if(_0xbe2dx3b){_0xbe2dx3a= _0xbe2dx3b;return _0xbe2dx3a[_0xc293[88]](_0xbe2dx39,{penalty:_0xbe2dx2d[_0xc293[89]][_0xc293[104]]})}})[_0xc293[44]](function(_0xbe2dx1d){if(_0xbe2dx1d){return _0xbe2dx3a[_0xc293[102]](_0xbe2dx2d[_0xc293[89]][_0xc293[103]])}})[_0xc293[44]](handleEntityNotFound(_0xbe2dx1b,null))[_0xc293[44]](respondWithStatusCode(_0xbe2dx1b,null))[_0xc293[77]](handleError(_0xbe2dx1b,null))};exports[_0xc293[108]]= function(_0xbe2dx2d,_0xbe2dx1b,_0xbe2dx35){var _0xbe2dx39=[];var _0xbe2dx3a;return db[_0xc293[101]][_0xc293[81]]({where:{id:_0xbe2dx2d[_0xc293[57]][_0xc293[103]]},attributes:[_0xc293[83]],include:[{model:db[_0xc293[107]],as:_0xc293[105],attributes:[_0xc293[83]],raw:true}]})[_0xc293[44]](function(_0xbe2dx3d){if(_0xbe2dx3d){for(var _0xbe2dx3e=0;_0xbe2dx3e< _0xbe2dx3d[_0xc293[63]];_0xbe2dx3e+= 1){for(var _0xbe2dx3f=0;_0xbe2dx3f< _0xbe2dx3d[_0xbe2dx3e][_0xc293[105]][_0xc293[63]];_0xbe2dx3f+= 1){_0xbe2dx39= _[_0xc293[106]](_0xbe2dx39,[_0xbe2dx3d[_0xbe2dx3e][_0xc293[105]][_0xbe2dx3f][_0xc293[83]]])}};return _0xbe2dx39}})[_0xc293[44]](function(_0xbe2dx3c){if(_0xbe2dx3c){return db[_0xc293[54]][_0xc293[85]]({where:{id:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})}})[_0xc293[44]](function(_0xbe2dx3b){if(_0xbe2dx3b){_0xbe2dx3a= _0xbe2dx3b;return _0xbe2dx3a[_0xc293[109]](_0xbe2dx39)}})[_0xc293[44]](function(_0xbe2dx1d){if(_0xbe2dx3a){return _0xbe2dx3a[_0xc293[108]](_0xbe2dx2d[_0xc293[57]][_0xc293[103]])}})[_0xc293[44]](handleEntityNotFound(_0xbe2dx1b,null))[_0xc293[44]](respondWithStatusCode(_0xbe2dx1b,null))[_0xc293[77]](handleError(_0xbe2dx1b,null))};exports[_0xc293[88]]= function(_0xbe2dx2d,_0xbe2dx1b,_0xbe2dx35){var _0xbe2dx40,_0xbe2dx3a;return db[_0xc293[54]][_0xc293[85]]({where:{id:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})[_0xc293[44]](handleEntityNotFound(_0xbe2dx1b,null))[_0xc293[44]](function(_0xbe2dx1d){if(_0xbe2dx1d){_0xbe2dx3a= _0xbe2dx1d;return _0xbe2dx1d[_0xc293[88]](_0xbe2dx2d[_0xc293[89]][_0xc293[103]],_[_0xc293[122]](_0xbe2dx2d[_0xc293[89]],[_0xc293[103],_0xc293[83]])|| {})[_0xc293[121]](function(_0xbe2dx38){for(var _0xbe2dx3e=0;_0xbe2dx3e< _0xbe2dx2d[_0xc293[89]][_0xc293[103]][_0xc293[63]];_0xbe2dx3e+= 1){socket[_0xc293[120]](_0xc293[119],{UserId:_0xbe2dx2d[_0xc293[89]][_0xc293[103]][_0xbe2dx3e],VoiceQueueId:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]})};return _0xbe2dx38})}})[_0xc293[44]](function(_0xbe2dx42){_0xbe2dx40= _0xbe2dx42|| [];if(_0xbe2dx3a){return db[_0xc293[107]][_0xc293[81]]({where:{id:_0xbe2dx2d[_0xc293[89]][_0xc293[103]]},attributes:[_0xc293[83],_0xc293[49],_0xc293[118],_0xc293[113]],raw:true})}})[_0xc293[44]](function(_0xbe2dx42){if(_0xbe2dx42&& _0xbe2dx42[_0xc293[63]]){var _0xbe2dx43=[];for(var _0xbe2dx3e=0;_0xbe2dx3e< _0xbe2dx42[_0xc293[63]];_0xbe2dx3e++){_0xbe2dx43[_0xc293[116]](db[_0xc293[115]][_0xc293[114]]({membername:_0xbe2dx42[_0xbe2dx3e][_0xc293[49]],UserId:_0xbe2dx42[_0xbe2dx3e][_0xc293[83]],queue_name:_0xbe2dx3a[_0xc293[49]],VoiceQueueId:_0xbe2dx3a[_0xc293[83]],interface:util[_0xc293[112]](_0xc293[110],_0xc293[111],_0xbe2dx42[_0xbe2dx3e][_0xc293[49]]),paused:_0xbe2dx42[_0xbe2dx3e][_0xc293[113]]|| false,penalty:_0xbe2dx2d[_0xc293[89]][_0xc293[104]]|| 0}))};return BPromise[_0xc293[117]](_0xbe2dx43)}})[_0xc293[44]](function(_0xbe2dx41){return _0xbe2dx40})[_0xc293[44]](respondWithResult(_0xbe2dx1b,null))[_0xc293[77]](handleError(_0xbe2dx1b,null))};exports[_0xc293[109]]= function(_0xbe2dx2d,_0xbe2dx1b,_0xbe2dx35){var _0xbe2dx38;return db[_0xc293[54]][_0xc293[85]]({where:{id:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})[_0xc293[44]](handleEntityNotFound(_0xbe2dx1b,null))[_0xc293[44]](function(_0xbe2dx1d){if(_0xbe2dx1d){return _0xbe2dx1d[_0xc293[109]](_0xbe2dx2d[_0xc293[57]][_0xc293[103]])[_0xc293[44]](function(_0xbe2dx38){if(_[_0xc293[124]](_0xbe2dx2d[_0xc293[57]][_0xc293[103]])){for(var _0xbe2dx3e=0;_0xbe2dx3e< _0xbe2dx2d[_0xc293[57]][_0xc293[103]][_0xc293[63]];_0xbe2dx3e+= 1){socket[_0xc293[120]](_0xc293[125],{UserId:_0xbe2dx2d[_0xc293[57]][_0xc293[103]][_0xbe2dx3e],VoiceQueueId:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]})}}else {socket[_0xc293[120]](_0xc293[125],{UserId:_0xbe2dx2d[_0xc293[57]][_0xc293[103]],VoiceQueueId:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]})}})}})[_0xc293[44]](function(_0xbe2dx44){if(_0xbe2dx2d[_0xc293[57]][_0xc293[123]]){_0xbe2dx38= _0xbe2dx44;return db[_0xc293[115]][_0xc293[46]]({where:{VoiceQueueId:_0xbe2dx2d[_0xc293[84]][_0xc293[83]],UserId:_0xbe2dx2d[_0xc293[57]][_0xc293[103]]}})[_0xc293[44]](function(){return _0xbe2dx38})}})[_0xc293[44]](respondWithStatusCode(_0xbe2dx1b,null))[_0xc293[77]](handleError(_0xbe2dx1b,null))};exports[_0xc293[126]]= function(_0xbe2dx2d,_0xbe2dx1d,_0xbe2dx35){var _0xbe2dx20={};var _0xbe2dx2e={};var _0xbe2dx37;var _0xbe2dx21;return db[_0xc293[54]][_0xc293[93]]({where:{id:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})[_0xc293[44]](handleEntityNotFound(_0xbe2dx1d,null))[_0xc293[44]](function(_0xbe2dx1d){if(_0xbe2dx1d){_0xbe2dx37= _0xbe2dx1d;_0xbe2dx2e[_0xc293[52]]= _[_0xc293[55]](db[_0xc293[107]][_0xc293[53]]);_0xbe2dx2e[_0xc293[57]]= _[_0xc293[55]](_0xbe2dx2d[_0xc293[57]]);_0xbe2dx2e[_0xc293[59]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],_0xbe2dx2e[_0xc293[57]]);_0xbe2dx20[_0xc293[61]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],qs[_0xc293[62]](_0xbe2dx2d[_0xc293[57]][_0xc293[62]]));_0xbe2dx20[_0xc293[61]]= (_0xbe2dx20[_0xc293[61]][_0xc293[63]])?_0xbe2dx20[_0xc293[61]]:_0xbe2dx2e[_0xc293[52]];_0xbe2dx20[_0xc293[66]]= qs[_0xc293[67]](_0xbe2dx2d[_0xc293[57]][_0xc293[67]]);_0xbe2dx20[_0xc293[68]]= qs[_0xc293[59]](_[_0xc293[69]](_0xbe2dx2d[_0xc293[57]],_0xbe2dx2e[_0xc293[59]]));if(_0xbe2dx2d[_0xc293[57]][_0xc293[73]]){_0xbe2dx20[_0xc293[68]]= _[_0xc293[72]](_0xbe2dx20[_0xc293[68]],{$or:_[_0xc293[75]](_0xbe2dx20[_0xc293[61]],function(_0xbe2dx31){var _0xbe2dx2f={};_0xbe2dx2f[_0xbe2dx31]= {$like:_0xc293[74]+ _0xbe2dx2d[_0xc293[57]][_0xc293[73]]+ _0xc293[74]};return _0xbe2dx2f})})};_0xbe2dx20= _[_0xc293[72]]({},_0xbe2dx20,_0xbe2dx2d[_0xc293[76]]);return _0xbe2dx37[_0xc293[126]](_0xbe2dx20)}})[_0xc293[44]](function(_0xbe2dx38){if(_0xbe2dx38){_0xbe2dx21= _0xbe2dx38[_0xc293[63]];if(!_0xbe2dx2d[_0xc293[57]][_0xc293[65]](_0xc293[64])){_0xbe2dx20[_0xc293[36]]= qs[_0xc293[36]](_0xbe2dx2d[_0xc293[57]][_0xc293[36]]);_0xbe2dx20[_0xc293[35]]= qs[_0xc293[35]](_0xbe2dx2d[_0xc293[57]][_0xc293[35]])};return _0xbe2dx37[_0xc293[126]](_0xbe2dx20)}})[_0xc293[44]](function(_0xbe2dx33){if(_0xbe2dx33){return _0xbe2dx33?{count:_0xbe2dx21,rows:_0xbe2dx33}:null}})[_0xc293[44]](respondWithResult(_0xbe2dx1d,null))[_0xc293[77]](handleError(_0xbe2dx1d,null))};exports[_0xc293[127]]= function(_0xbe2dx2d,_0xbe2dx1d,_0xbe2dx35){var _0xbe2dx20={};var _0xbe2dx2e={};var _0xbe2dx37;var _0xbe2dx21;return db[_0xc293[54]][_0xc293[93]]({where:{id:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})[_0xc293[44]](handleEntityNotFound(_0xbe2dx1d,null))[_0xc293[44]](function(_0xbe2dx1d){if(_0xbe2dx1d){_0xbe2dx37= _0xbe2dx1d;_0xbe2dx2e[_0xc293[52]]= _[_0xc293[55]](db[_0xc293[115]][_0xc293[53]]);_0xbe2dx2e[_0xc293[57]]= _[_0xc293[55]](_0xbe2dx2d[_0xc293[57]]);_0xbe2dx2e[_0xc293[59]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],_0xbe2dx2e[_0xc293[57]]);_0xbe2dx20[_0xc293[61]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],qs[_0xc293[62]](_0xbe2dx2d[_0xc293[57]][_0xc293[62]]));_0xbe2dx20[_0xc293[61]]= (_0xbe2dx20[_0xc293[61]][_0xc293[63]])?_0xbe2dx20[_0xc293[61]]:_0xbe2dx2e[_0xc293[52]];_0xbe2dx20[_0xc293[66]]= qs[_0xc293[67]](_0xbe2dx2d[_0xc293[57]][_0xc293[67]]);_0xbe2dx20[_0xc293[68]]= qs[_0xc293[59]](_[_0xc293[69]](_0xbe2dx2d[_0xc293[57]],_0xbe2dx2e[_0xc293[59]]));if(_0xbe2dx2d[_0xc293[57]][_0xc293[73]]){_0xbe2dx20[_0xc293[68]]= _[_0xc293[72]](_0xbe2dx20[_0xc293[68]],{$or:_[_0xc293[75]](_0xbe2dx20[_0xc293[61]],function(_0xbe2dx31){var _0xbe2dx2f={};_0xbe2dx2f[_0xbe2dx31]= {$like:_0xc293[74]+ _0xbe2dx2d[_0xc293[57]][_0xc293[73]]+ _0xc293[74]};return _0xbe2dx2f})})};_0xbe2dx20= _[_0xc293[72]]({},_0xbe2dx20,_0xbe2dx2d[_0xc293[76]]);return _0xbe2dx37[_0xc293[127]](_0xbe2dx20)}})[_0xc293[44]](function(_0xbe2dx38){if(_0xbe2dx38){_0xbe2dx21= _0xbe2dx38[_0xc293[63]];if(!_0xbe2dx2d[_0xc293[57]][_0xc293[65]](_0xc293[64])){_0xbe2dx20[_0xc293[36]]= qs[_0xc293[36]](_0xbe2dx2d[_0xc293[57]][_0xc293[36]]);_0xbe2dx20[_0xc293[35]]= qs[_0xc293[35]](_0xbe2dx2d[_0xc293[57]][_0xc293[35]])};return _0xbe2dx37[_0xc293[127]](_0xbe2dx20)}})[_0xc293[44]](function(_0xbe2dx33){return _0xbe2dx33?{count:_0xbe2dx21,rows:_0xbe2dx33}:null})[_0xc293[44]](respondWithResult(_0xbe2dx1d,null))[_0xc293[77]](handleError(_0xbe2dx1d,null))};exports[_0xc293[128]]= function(_0xbe2dx2d,_0xbe2dx1d,_0xbe2dx35){var _0xbe2dx20={};var _0xbe2dx2e={};var _0xbe2dx37;var _0xbe2dx21;return db[_0xc293[54]][_0xc293[93]]({where:{id:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})[_0xc293[44]](handleEntityNotFound(_0xbe2dx1d,null))[_0xc293[44]](function(_0xbe2dx1d){if(_0xbe2dx1d){_0xbe2dx37= _0xbe2dx1d;_0xbe2dx2e[_0xc293[52]]= _[_0xc293[55]](db[_0xc293[129]][_0xc293[53]]);_0xbe2dx2e[_0xc293[57]]= _[_0xc293[55]](_0xbe2dx2d[_0xc293[57]]);_0xbe2dx2e[_0xc293[59]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],_0xbe2dx2e[_0xc293[57]]);_0xbe2dx20[_0xc293[61]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],qs[_0xc293[62]](_0xbe2dx2d[_0xc293[57]][_0xc293[62]]));_0xbe2dx20[_0xc293[61]]= (_0xbe2dx20[_0xc293[61]][_0xc293[63]])?_0xbe2dx20[_0xc293[61]]:_0xbe2dx2e[_0xc293[52]];_0xbe2dx20[_0xc293[66]]= qs[_0xc293[67]](_0xbe2dx2d[_0xc293[57]][_0xc293[67]]);_0xbe2dx20[_0xc293[68]]= qs[_0xc293[59]](_[_0xc293[69]](_0xbe2dx2d[_0xc293[57]],_0xbe2dx2e[_0xc293[59]]));if(_0xbe2dx2d[_0xc293[57]][_0xc293[73]]){_0xbe2dx20[_0xc293[68]]= _[_0xc293[72]](_0xbe2dx20[_0xc293[68]],{$or:_[_0xc293[75]](_0xbe2dx20[_0xc293[61]],function(_0xbe2dx31){var _0xbe2dx2f={};_0xbe2dx2f[_0xbe2dx31]= {$like:_0xc293[74]+ _0xbe2dx2d[_0xc293[57]][_0xc293[73]]+ _0xc293[74]};return _0xbe2dx2f})})};_0xbe2dx20= _[_0xc293[72]]({},_0xbe2dx20,_0xbe2dx2d[_0xc293[76]]);return _0xbe2dx37[_0xc293[128]](_0xbe2dx20)}})[_0xc293[44]](function(_0xbe2dx38){if(_0xbe2dx38){_0xbe2dx21= _0xbe2dx38[_0xc293[63]];if(!_0xbe2dx2d[_0xc293[57]][_0xc293[65]](_0xc293[64])){_0xbe2dx20[_0xc293[36]]= qs[_0xc293[36]](_0xbe2dx2d[_0xc293[57]][_0xc293[36]]);_0xbe2dx20[_0xc293[35]]= qs[_0xc293[35]](_0xbe2dx2d[_0xc293[57]][_0xc293[35]])};return _0xbe2dx37[_0xc293[128]](_0xbe2dx20)}})[_0xc293[44]](function(_0xbe2dx33){if(_0xbe2dx33){return _0xbe2dx33?{count:_0xbe2dx21,rows:_0xbe2dx33}:null}})[_0xc293[44]](respondWithResult(_0xbe2dx1d,null))[_0xc293[77]](handleError(_0xbe2dx1d,null))};exports[_0xc293[130]]= function(_0xbe2dx2d,_0xbe2dx1b,_0xbe2dx35){var _0xbe2dx45,_0xbe2dx46;return db[_0xc293[54]][_0xc293[85]]({where:{id:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})[_0xc293[44]](handleEntityNotFound(_0xbe2dx1b,null))[_0xc293[44]](function(_0xbe2dx1d){if(_0xbe2dx1d){_0xbe2dx46= _0xbe2dx1d;return _0xbe2dx1d[_0xc293[130]](_0xbe2dx2d[_0xc293[89]][_0xc293[103]],_[_0xc293[122]](_0xbe2dx2d[_0xc293[89]],[_0xc293[103],_0xc293[83]])|| {})};return null})[_0xc293[121]](function(_0xbe2dx44){var _0xbe2dx47;_0xbe2dx45= _0xbe2dx44|| [];var _0xbe2dx43=[];if(_0xbe2dx44){for(var _0xbe2dx3e=0;_0xbe2dx3e< _0xbe2dx44[_0xc293[63]];_0xbe2dx3e+= 1){var _0xbe2dx48=_0xbe2dx44[_0xbe2dx3e][_0xc293[131]]({plain:true});_0xbe2dx46[_0xc293[132]]= _0xbe2dx2d[_0xc293[89]][_0xc293[132]]?_0xbe2dx2d[_0xc293[89]][_0xc293[132]]:_0xbe2dx46[_0xc293[132]];switch(_0xbe2dx46[_0xc293[132]]){case _0xc293[156]:_0xbe2dx47= squel[_0xc293[155]]()[_0xc293[154]](_0xc293[141])[_0xc293[153]]([_0xc293[133],_0xc293[134],_0xc293[135],_0xc293[136],_0xc293[92],_0xc293[137],_0xc293[138]],squel[_0xc293[144]]()[_0xc293[143]](_0xc293[133],_0xc293[133])[_0xc293[143]](_0xc293[152],_0xc293[134])[_0xc293[143]](_0xc293[83],_0xc293[135])[_0xc293[143]](_0xbe2dx48[_0xc293[149]].toString(),_0xc293[136])[_0xc293[143]](_0xbe2dx2d[_0xc293[84]][_0xc293[83]].toString(),_0xc293[92])[_0xc293[143]](_0xc293[152],_0xc293[137])[_0xc293[143]](_0xc293[152],_0xc293[138])[_0xc293[142]](_0xc293[151])[_0xc293[68]](_0xc293[150])[_0xc293[68]](_0xc293[148],_0xbe2dx48[_0xc293[149]].toString())[_0xc293[68]](_0xc293[147])[_0xc293[68]](_0xc293[139],squel[_0xc293[144]]()[_0xc293[143]](_0xc293[146])[_0xc293[142]](_0xc293[145])[_0xc293[68]](_0xc293[140],_0xbe2dx2d[_0xc293[84]][_0xc293[83]].toString()))[_0xc293[68]](_0xc293[139],squel[_0xc293[144]]()[_0xc293[143]](_0xc293[133])[_0xc293[142]](_0xc293[141])[_0xc293[68]](_0xc293[140],_0xbe2dx2d[_0xc293[84]][_0xc293[83]].toString()))).toString();break;case _0xc293[157]:_0xbe2dx47= squel[_0xc293[155]]()[_0xc293[154]](_0xc293[141])[_0xc293[153]]([_0xc293[133],_0xc293[134],_0xc293[135],_0xc293[136],_0xc293[92],_0xc293[137],_0xc293[138]],squel[_0xc293[144]]()[_0xc293[143]](_0xc293[133],_0xc293[133])[_0xc293[143]](_0xc293[152],_0xc293[134])[_0xc293[143]](_0xc293[83],_0xc293[135])[_0xc293[143]](_0xbe2dx48[_0xc293[149]].toString(),_0xc293[136])[_0xc293[143]](_0xbe2dx2d[_0xc293[84]][_0xc293[83]].toString(),_0xc293[92])[_0xc293[143]](_0xc293[152],_0xc293[137])[_0xc293[143]](_0xc293[152],_0xc293[138])[_0xc293[142]](_0xc293[151])[_0xc293[68]](_0xc293[150])[_0xc293[68]](_0xc293[148],_0xbe2dx48[_0xc293[149]].toString())[_0xc293[68]](_0xc293[147])[_0xc293[68]](_0xc293[139],squel[_0xc293[144]]()[_0xc293[143]](_0xc293[133])[_0xc293[142]](_0xc293[141])[_0xc293[68]](_0xc293[140],_0xbe2dx2d[_0xc293[84]][_0xc293[83]].toString()))).toString();break;default:_0xbe2dx47= squel[_0xc293[155]]()[_0xc293[154]](_0xc293[141])[_0xc293[153]]([_0xc293[133],_0xc293[134],_0xc293[135],_0xc293[136],_0xc293[92],_0xc293[137],_0xc293[138]],squel[_0xc293[144]]()[_0xc293[143]](_0xc293[133],_0xc293[133])[_0xc293[143]](_0xc293[152],_0xc293[134])[_0xc293[143]](_0xc293[83],_0xc293[135])[_0xc293[143]](_0xbe2dx48[_0xc293[149]].toString(),_0xc293[136])[_0xc293[143]](_0xbe2dx2d[_0xc293[84]][_0xc293[83]].toString(),_0xc293[92])[_0xc293[143]](_0xc293[152],_0xc293[137])[_0xc293[143]](_0xc293[152],_0xc293[138])[_0xc293[142]](_0xc293[151])[_0xc293[68]](_0xc293[150])[_0xc293[68]](_0xc293[148],_0xbe2dx48[_0xc293[149]].toString())[_0xc293[68]](_0xc293[147])).toString()};_0xbe2dx43[_0xc293[116]](db[_0xc293[158]][_0xc293[57]](_0xbe2dx47))};return BPromise[_0xc293[117]](_0xbe2dx43)}})[_0xc293[44]](function(){return _0xbe2dx45})[_0xc293[44]](respondWithResult(_0xbe2dx1b,null))[_0xc293[77]](handleError(_0xbe2dx1b,null))};exports[_0xc293[159]]= function(_0xbe2dx2d,_0xbe2dx1b,_0xbe2dx35){var _0xbe2dx38;return db[_0xc293[54]][_0xc293[85]]({where:{id:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})[_0xc293[44]](handleEntityNotFound(_0xbe2dx1b,null))[_0xc293[44]](function(_0xbe2dx1d){if(_0xbe2dx1d){return _0xbe2dx1d[_0xc293[159]](_0xbe2dx2d[_0xc293[57]][_0xc293[103]])}})[_0xc293[44]](function(_0xbe2dx44){if(_0xbe2dx44){_0xbe2dx38= _0xbe2dx44;return db[_0xc293[91]][_0xc293[46]]({where:{ListId:_0xbe2dx2d[_0xc293[57]][_0xc293[103]],VoiceQueueId:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})[_0xc293[44]](function(){return _0xbe2dx38})}})[_0xc293[44]](respondWithStatusCode(_0xbe2dx1b,null))[_0xc293[77]](handleError(_0xbe2dx1b,null))};exports[_0xc293[160]]= function(_0xbe2dx2d,_0xbe2dx1d,_0xbe2dx35){var _0xbe2dx20={};var _0xbe2dx2e={};var _0xbe2dx37;var _0xbe2dx21;return db[_0xc293[54]][_0xc293[93]]({where:{id:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})[_0xc293[44]](handleEntityNotFound(_0xbe2dx1d,null))[_0xc293[44]](function(_0xbe2dx1d){if(_0xbe2dx1d){_0xbe2dx37= _0xbe2dx1d;_0xbe2dx2e[_0xc293[52]]= _[_0xc293[55]](db[_0xc293[129]][_0xc293[53]]);_0xbe2dx2e[_0xc293[57]]= _[_0xc293[55]](_0xbe2dx2d[_0xc293[57]]);_0xbe2dx2e[_0xc293[59]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],_0xbe2dx2e[_0xc293[57]]);_0xbe2dx20[_0xc293[61]]= _[_0xc293[60]](_0xbe2dx2e[_0xc293[52]],qs[_0xc293[62]](_0xbe2dx2d[_0xc293[57]][_0xc293[62]]));_0xbe2dx20[_0xc293[61]]= (_0xbe2dx20[_0xc293[61]][_0xc293[63]])?_0xbe2dx20[_0xc293[61]]:_0xbe2dx2e[_0xc293[52]];_0xbe2dx20[_0xc293[66]]= qs[_0xc293[67]](_0xbe2dx2d[_0xc293[57]][_0xc293[67]]);_0xbe2dx20[_0xc293[68]]= qs[_0xc293[59]](_[_0xc293[69]](_0xbe2dx2d[_0xc293[57]],_0xbe2dx2e[_0xc293[59]]));if(_0xbe2dx2d[_0xc293[57]][_0xc293[73]]){_0xbe2dx20[_0xc293[68]]= _[_0xc293[72]](_0xbe2dx20[_0xc293[68]],{$or:_[_0xc293[75]](_0xbe2dx20[_0xc293[61]],function(_0xbe2dx31){var _0xbe2dx2f={};_0xbe2dx2f[_0xbe2dx31]= {$like:_0xc293[74]+ _0xbe2dx2d[_0xc293[57]][_0xc293[73]]+ _0xc293[74]};return _0xbe2dx2f})})};_0xbe2dx20= _[_0xc293[72]]({},_0xbe2dx20,_0xbe2dx2d[_0xc293[76]]);return _0xbe2dx37[_0xc293[160]](_0xbe2dx20)}})[_0xc293[44]](function(_0xbe2dx38){if(_0xbe2dx38){_0xbe2dx21= _0xbe2dx38[_0xc293[63]];if(!_0xbe2dx2d[_0xc293[57]][_0xc293[65]](_0xc293[64])){_0xbe2dx20[_0xc293[36]]= qs[_0xc293[36]](_0xbe2dx2d[_0xc293[57]][_0xc293[36]]);_0xbe2dx20[_0xc293[35]]= qs[_0xc293[35]](_0xbe2dx2d[_0xc293[57]][_0xc293[35]])};return _0xbe2dx37[_0xc293[160]](_0xbe2dx20)}})[_0xc293[44]](function(_0xbe2dx33){if(_0xbe2dx33){return _0xbe2dx33?{count:_0xbe2dx21,rows:_0xbe2dx33}:null}})[_0xc293[44]](respondWithResult(_0xbe2dx1d,null))[_0xc293[77]](handleError(_0xbe2dx1d,null))};exports[_0xc293[161]]= function(_0xbe2dx2d,_0xbe2dx1b,_0xbe2dx35){var _0xbe2dx45,_0xbe2dx46;return db[_0xc293[54]][_0xc293[85]]({where:{id:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})[_0xc293[44]](handleEntityNotFound(_0xbe2dx1b,null))[_0xc293[44]](function(_0xbe2dx1d){if(_0xbe2dx1d){_0xbe2dx46= _0xbe2dx1d;return _0xbe2dx1d[_0xc293[161]](_0xbe2dx2d[_0xc293[89]][_0xc293[103]],_[_0xc293[122]](_0xbe2dx2d[_0xc293[89]],[_0xc293[103],_0xc293[83]])|| {})};return null})[_0xc293[121]](function(_0xbe2dx44){var _0xbe2dx47;_0xbe2dx45= _0xbe2dx44|| [];var _0xbe2dx43=[];if(_0xbe2dx44){for(var _0xbe2dx3e=0;_0xbe2dx3e< _0xbe2dx44[_0xc293[63]];_0xbe2dx3e+= 1){var _0xbe2dx48=_0xbe2dx44[_0xbe2dx3e][_0xc293[131]]({plain:true});_0xbe2dx47= squel[_0xc293[155]]()[_0xc293[154]](_0xc293[162])[_0xc293[153]]([_0xc293[133],_0xc293[135],_0xc293[136],_0xc293[92],_0xc293[137],_0xc293[138]],squel[_0xc293[144]]()[_0xc293[143]](_0xc293[133],_0xc293[133])[_0xc293[143]](_0xc293[83],_0xc293[135])[_0xc293[143]](_0xbe2dx48[_0xc293[149]].toString(),_0xc293[136])[_0xc293[143]](_0xbe2dx2d[_0xc293[84]][_0xc293[83]].toString(),_0xc293[92])[_0xc293[143]](_0xc293[152],_0xc293[137])[_0xc293[143]](_0xc293[152],_0xc293[138])[_0xc293[142]](_0xc293[151])[_0xc293[68]](_0xc293[150])[_0xc293[68]](_0xc293[148],_0xbe2dx48[_0xc293[149]].toString())[_0xc293[68]](_0xc293[147])).toString();_0xbe2dx43[_0xc293[116]](db[_0xc293[158]][_0xc293[57]](_0xbe2dx47))};return BPromise[_0xc293[117]](_0xbe2dx43)}})[_0xc293[44]](function(){return _0xbe2dx45})[_0xc293[44]](respondWithResult(_0xbe2dx1b,null))[_0xc293[77]](handleError(_0xbe2dx1b,null))};exports[_0xc293[163]]= function(_0xbe2dx2d,_0xbe2dx1b,_0xbe2dx35){var _0xbe2dx38;return db[_0xc293[54]][_0xc293[85]]({where:{id:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})[_0xc293[44]](handleEntityNotFound(_0xbe2dx1b,null))[_0xc293[44]](function(_0xbe2dx1d){if(_0xbe2dx1d){return _0xbe2dx1d[_0xc293[163]](_0xbe2dx2d[_0xc293[57]][_0xc293[103]])}})[_0xc293[44]](function(_0xbe2dx44){if(_0xbe2dx44){_0xbe2dx38= _0xbe2dx44;return db[_0xc293[99]][_0xc293[46]]({where:{ListId:_0xbe2dx2d[_0xc293[57]][_0xc293[103]],VoiceQueueId:_0xbe2dx2d[_0xc293[84]][_0xc293[83]]}})[_0xc293[44]](function(){return _0xbe2dx38})}})[_0xc293[44]](respondWithStatusCode(_0xbe2dx1b,null))[_0xc293[77]](handleError(_0xbe2dx1b,null))}
\ No newline at end of file
index 800dbef..235f3cf 100644 (file)
@@ -1 +1 @@
-var _0xdc80=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xdc80[0];var EventEmitter=require(_0xdc80[1]);var VoiceQueue=require(_0xdc80[4])[_0xdc80[3]][_0xdc80[2]];var VoiceQueueEvents= new EventEmitter();VoiceQueueEvents[_0xdc80[5]](0);var events={afterCreate:_0xdc80[6],afterUpdate:_0xdc80[7],afterDestroy:_0xdc80[8]};function emitEvent(event){return function(_0xaa32x7,_0xaa32x8,_0xaa32x9){VoiceQueueEvents[_0xdc80[11]](event+ _0xdc80[9]+ _0xaa32x7[_0xdc80[10]],_0xaa32x7);VoiceQueueEvents[_0xdc80[11]](event,_0xaa32x7);_0xaa32x9(null)}}for(var e in events){if(events[_0xdc80[12]](e)){var event=events[e];VoiceQueue[_0xdc80[13]](e,emitEvent(event))}};module[_0xdc80[14]]= VoiceQueueEvents
\ No newline at end of file
+var _0xc534=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xc534[0];var EventEmitter=require(_0xc534[1]);var VoiceQueue=require(_0xc534[4])[_0xc534[3]][_0xc534[2]];var VoiceQueueEvents= new EventEmitter();VoiceQueueEvents[_0xc534[5]](0);var events={afterCreate:_0xc534[6],afterUpdate:_0xc534[7],afterDestroy:_0xc534[8]};function emitEvent(event){return function(_0x9ae5x7,_0x9ae5x8,_0x9ae5x9){VoiceQueueEvents[_0xc534[11]](event+ _0xc534[9]+ _0x9ae5x7[_0xc534[10]],_0x9ae5x7);VoiceQueueEvents[_0xc534[11]](event,_0x9ae5x7);_0x9ae5x9(null)}}for(var e in events){if(events[_0xc534[12]](e)){var event=events[e];VoiceQueue[_0xc534[13]](e,emitEvent(event))}};module[_0xc534[14]]= VoiceQueueEvents
\ No newline at end of file
index 7b8f062..3462d3b 100644 (file)
@@ -1 +1 @@
-var _0x4cbd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x4cbd[0];var _=require(_0x4cbd[1]);var util=require(_0x4cbd[2]);var logger=require(_0x4cbd[4])(_0x4cbd[3]);var moment=require(_0x4cbd[5]);var BPromise=require(_0x4cbd[6]);var rp=require(_0x4cbd[7]);var attributes=require(_0x4cbd[8]);module[_0x4cbd[9]]= function(_0x9742x8,_0x9742x9){return _0x9742x8[_0x4cbd[12]](_0x4cbd[10],attributes,{tableName:_0x4cbd[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x46ea=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73","\x64\x65\x66\x69\x6E\x65"];_0x46ea[0];var _=require(_0x46ea[1]);var util=require(_0x46ea[2]);var logger=require(_0x46ea[4])(_0x46ea[3]);var moment=require(_0x46ea[5]);var BPromise=require(_0x46ea[6]);var rp=require(_0x46ea[7]);var attributes=require(_0x46ea[8]);module[_0x46ea[9]]= function(_0xfe0cx8,_0xfe0cx9){return _0xfe0cx8[_0x46ea[12]](_0x46ea[10],attributes,{tableName:_0x46ea[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 90aa3d7..6732616 100644 (file)
@@ -1 +1 @@
-var _0xb724=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x53\x68\x6F\x77\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x66\x69\x6E\x64"];_0xb724[0];var _=require(_0xb724[1]);var util=require(_0xb724[2]);var moment=require(_0xb724[3]);var BPromise=require(_0xb724[4]);var rs=require(_0xb724[5]);var fs=require(_0xb724[6]);var db=require(_0xb724[8])[_0xb724[7]];var utils=require(_0xb724[9]);var logger=require(_0xb724[11])(_0xb724[10]);var config=require(_0xb724[12]);var jayson=require(_0xb724[13]);var client=jayson[_0xb724[15]][_0xb724[14]]({port:9002});var socket=require(_0xb724[17])({host:_0xb724[16],port:6379});require(_0xb724[19])[_0xb724[18]](socket);function respondWithRpcPromise(_0x3243xf,_0x3243x10,_0x3243x11){return  new BPromise(function(_0x3243x12,_0x3243x13){return client[_0xb724[32]](_0x3243xf,_0x3243x11)[_0xb724[31]](function(_0x3243x15){logger[_0xb724[24]](_0xb724[20],_0x3243x10,_0xb724[23]);logger[_0xb724[27]](_0xb724[25],_0x3243x10,_0xb724[23],JSON[_0xb724[26]](_0x3243x15));if(_0x3243x15[_0xb724[21]]){if(_0x3243x15[_0xb724[21]][_0xb724[28]]=== 500){logger[_0xb724[21]](_0xb724[20],_0x3243x10,_0x3243x15[_0xb724[21]][_0xb724[29]]);return _0x3243x13(_0x3243x15[_0xb724[21]][_0xb724[29]])};logger[_0xb724[21]](_0xb724[20],_0x3243x10,_0x3243x15[_0xb724[21]][_0xb724[29]]);return _0x3243x12(_0x3243x15[_0xb724[21]][_0xb724[29]])}else {logger[_0xb724[24]](_0xb724[20],_0x3243x10,_0xb724[23]);_0x3243x12(_0x3243x15[_0xb724[30]][_0xb724[29]])}})[_0xb724[22]](function(_0x3243x14){logger[_0xb724[21]](_0xb724[20],_0x3243x10,_0x3243x14);_0x3243x13(_0x3243x14)})})}exports[_0xb724[33]]= function(_0x3243x11){var _0x3243x16=this;return  new Promise(function(_0x3243x12,_0x3243x13){return db[_0xb724[44]][_0xb724[43]]({raw:_0x3243x11[_0xb724[34]]?(_0x3243x11[_0xb724[34]][_0xb724[35]]=== undefined)?true:false:true,where:_0x3243x11[_0xb724[34]]?_0x3243x11[_0xb724[34]][_0xb724[36]]|| null:null,attributes:_0x3243x11[_0xb724[34]]?_0x3243x11[_0xb724[34]][_0xb724[37]]|| null:null,limit:_0x3243x11[_0xb724[34]]?_0x3243x11[_0xb724[34]][_0xb724[38]]|| null:null,include:_0x3243x11[_0xb724[34]]?(_0x3243x11[_0xb724[34]][_0xb724[39]]?_[_0xb724[42]](_0x3243x11[_0xb724[34]][_0xb724[39]],function(_0x3243x17){return {model:db[_0x3243x17[_0xb724[40]]],as:_0x3243x17[_0xb724[41]],attributes:_0x3243x17[_0xb724[37]],include:_0x3243x17[_0xb724[39]]?_[_0xb724[42]](_0x3243x17[_0xb724[39]],function(_0x3243x18){return {model:db[_0x3243x18[_0xb724[40]]],as:_0x3243x18[_0xb724[41]],attributes:_0x3243x18[_0xb724[37]],include:_0x3243x18[_0xb724[39]]?_[_0xb724[42]](_0x3243x18[_0xb724[39]],function(_0x3243x19){return {model:db[_0x3243x19[_0xb724[40]]],as:_0x3243x19[_0xb724[41]],attributes:_0x3243x19[_0xb724[37]]}}):[]}}):[]}}):[]):[]})[_0xb724[31]](function(_0x3243x15){logger[_0xb724[24]](_0xb724[33],_0x3243x11);logger[_0xb724[27]](_0xb724[33],_0x3243x11,JSON[_0xb724[26]](_0x3243x15));_0x3243x12(_0x3243x15)})[_0xb724[22]](function(_0x3243x14){logger[_0xb724[21]](_0xb724[33],_0x3243x14[_0xb724[29]],_0x3243x11);_0x3243x13(_0x3243x16[_0xb724[21]](500,_0x3243x14[_0xb724[29]]))})})};exports[_0xb724[45]]= function(_0x3243x11){var _0x3243x16=this;return  new Promise(function(_0x3243x12,_0x3243x13){return db[_0xb724[44]][_0xb724[46]]({raw:_0x3243x11[_0xb724[34]]?(_0x3243x11[_0xb724[34]][_0xb724[35]]=== undefined)?true:false:true,where:_0x3243x11[_0xb724[34]]?_0x3243x11[_0xb724[34]][_0xb724[36]]|| null:null,attributes:_0x3243x11[_0xb724[34]]?_0x3243x11[_0xb724[34]][_0xb724[37]]|| null:null,include:_0x3243x11[_0xb724[34]]?(_0x3243x11[_0xb724[34]][_0xb724[39]]?_[_0xb724[42]](_0x3243x11[_0xb724[34]][_0xb724[39]],function(_0x3243x17){return {model:db[_0x3243x17[_0xb724[40]]],as:_0x3243x17[_0xb724[41]],attributes:_0x3243x17[_0xb724[37]],include:_0x3243x17[_0xb724[39]]?_[_0xb724[42]](_0x3243x17[_0xb724[39]],function(_0x3243x18){return {model:db[_0x3243x18[_0xb724[40]]],as:_0x3243x18[_0xb724[41]],attributes:_0x3243x18[_0xb724[37]],include:_0x3243x18[_0xb724[39]]?_[_0xb724[42]](_0x3243x18[_0xb724[39]],function(_0x3243x19){return {model:db[_0x3243x19[_0xb724[40]]],as:_0x3243x19[_0xb724[41]],attributes:_0x3243x19[_0xb724[37]]}}):[]}}):[]}}):[]):[]})[_0xb724[31]](function(_0x3243x15){logger[_0xb724[24]](_0xb724[45],_0x3243x11);logger[_0xb724[27]](_0xb724[45],_0x3243x11,JSON[_0xb724[26]](_0x3243x15));_0x3243x12(_0x3243x15)})[_0xb724[22]](function(_0x3243x14){logger[_0xb724[21]](_0xb724[45],_0x3243x14[_0xb724[29]],_0x3243x11);_0x3243x13(_0x3243x16[_0xb724[21]](500,_0x3243x14[_0xb724[29]]))})})}
\ No newline at end of file
+var _0xd3df=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x53\x68\x6F\x77\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x66\x69\x6E\x64"];_0xd3df[0];var _=require(_0xd3df[1]);var util=require(_0xd3df[2]);var moment=require(_0xd3df[3]);var BPromise=require(_0xd3df[4]);var rs=require(_0xd3df[5]);var fs=require(_0xd3df[6]);var db=require(_0xd3df[8])[_0xd3df[7]];var utils=require(_0xd3df[9]);var logger=require(_0xd3df[11])(_0xd3df[10]);var config=require(_0xd3df[12]);var jayson=require(_0xd3df[13]);var client=jayson[_0xd3df[15]][_0xd3df[14]]({port:9002});var socket=require(_0xd3df[17])({host:_0xd3df[16],port:6379});require(_0xd3df[19])[_0xd3df[18]](socket);function respondWithRpcPromise(_0xe7b2xf,_0xe7b2x10,_0xe7b2x11){return  new BPromise(function(_0xe7b2x12,_0xe7b2x13){return client[_0xd3df[32]](_0xe7b2xf,_0xe7b2x11)[_0xd3df[31]](function(_0xe7b2x15){logger[_0xd3df[24]](_0xd3df[20],_0xe7b2x10,_0xd3df[23]);logger[_0xd3df[27]](_0xd3df[25],_0xe7b2x10,_0xd3df[23],JSON[_0xd3df[26]](_0xe7b2x15));if(_0xe7b2x15[_0xd3df[21]]){if(_0xe7b2x15[_0xd3df[21]][_0xd3df[28]]=== 500){logger[_0xd3df[21]](_0xd3df[20],_0xe7b2x10,_0xe7b2x15[_0xd3df[21]][_0xd3df[29]]);return _0xe7b2x13(_0xe7b2x15[_0xd3df[21]][_0xd3df[29]])};logger[_0xd3df[21]](_0xd3df[20],_0xe7b2x10,_0xe7b2x15[_0xd3df[21]][_0xd3df[29]]);return _0xe7b2x12(_0xe7b2x15[_0xd3df[21]][_0xd3df[29]])}else {logger[_0xd3df[24]](_0xd3df[20],_0xe7b2x10,_0xd3df[23]);_0xe7b2x12(_0xe7b2x15[_0xd3df[30]][_0xd3df[29]])}})[_0xd3df[22]](function(_0xe7b2x14){logger[_0xd3df[21]](_0xd3df[20],_0xe7b2x10,_0xe7b2x14);_0xe7b2x13(_0xe7b2x14)})})}exports[_0xd3df[33]]= function(_0xe7b2x11){var _0xe7b2x16=this;return  new Promise(function(_0xe7b2x12,_0xe7b2x13){return db[_0xd3df[44]][_0xd3df[43]]({raw:_0xe7b2x11[_0xd3df[34]]?(_0xe7b2x11[_0xd3df[34]][_0xd3df[35]]=== undefined)?true:false:true,where:_0xe7b2x11[_0xd3df[34]]?_0xe7b2x11[_0xd3df[34]][_0xd3df[36]]|| null:null,attributes:_0xe7b2x11[_0xd3df[34]]?_0xe7b2x11[_0xd3df[34]][_0xd3df[37]]|| null:null,limit:_0xe7b2x11[_0xd3df[34]]?_0xe7b2x11[_0xd3df[34]][_0xd3df[38]]|| null:null,include:_0xe7b2x11[_0xd3df[34]]?(_0xe7b2x11[_0xd3df[34]][_0xd3df[39]]?_[_0xd3df[42]](_0xe7b2x11[_0xd3df[34]][_0xd3df[39]],function(_0xe7b2x17){return {model:db[_0xe7b2x17[_0xd3df[40]]],as:_0xe7b2x17[_0xd3df[41]],attributes:_0xe7b2x17[_0xd3df[37]],include:_0xe7b2x17[_0xd3df[39]]?_[_0xd3df[42]](_0xe7b2x17[_0xd3df[39]],function(_0xe7b2x18){return {model:db[_0xe7b2x18[_0xd3df[40]]],as:_0xe7b2x18[_0xd3df[41]],attributes:_0xe7b2x18[_0xd3df[37]],include:_0xe7b2x18[_0xd3df[39]]?_[_0xd3df[42]](_0xe7b2x18[_0xd3df[39]],function(_0xe7b2x19){return {model:db[_0xe7b2x19[_0xd3df[40]]],as:_0xe7b2x19[_0xd3df[41]],attributes:_0xe7b2x19[_0xd3df[37]]}}):[]}}):[]}}):[]):[]})[_0xd3df[31]](function(_0xe7b2x15){logger[_0xd3df[24]](_0xd3df[33],_0xe7b2x11);logger[_0xd3df[27]](_0xd3df[33],_0xe7b2x11,JSON[_0xd3df[26]](_0xe7b2x15));_0xe7b2x12(_0xe7b2x15)})[_0xd3df[22]](function(_0xe7b2x14){logger[_0xd3df[21]](_0xd3df[33],_0xe7b2x14[_0xd3df[29]],_0xe7b2x11);_0xe7b2x13(_0xe7b2x16[_0xd3df[21]](500,_0xe7b2x14[_0xd3df[29]]))})})};exports[_0xd3df[45]]= function(_0xe7b2x11){var _0xe7b2x16=this;return  new Promise(function(_0xe7b2x12,_0xe7b2x13){return db[_0xd3df[44]][_0xd3df[46]]({raw:_0xe7b2x11[_0xd3df[34]]?(_0xe7b2x11[_0xd3df[34]][_0xd3df[35]]=== undefined)?true:false:true,where:_0xe7b2x11[_0xd3df[34]]?_0xe7b2x11[_0xd3df[34]][_0xd3df[36]]|| null:null,attributes:_0xe7b2x11[_0xd3df[34]]?_0xe7b2x11[_0xd3df[34]][_0xd3df[37]]|| null:null,include:_0xe7b2x11[_0xd3df[34]]?(_0xe7b2x11[_0xd3df[34]][_0xd3df[39]]?_[_0xd3df[42]](_0xe7b2x11[_0xd3df[34]][_0xd3df[39]],function(_0xe7b2x17){return {model:db[_0xe7b2x17[_0xd3df[40]]],as:_0xe7b2x17[_0xd3df[41]],attributes:_0xe7b2x17[_0xd3df[37]],include:_0xe7b2x17[_0xd3df[39]]?_[_0xd3df[42]](_0xe7b2x17[_0xd3df[39]],function(_0xe7b2x18){return {model:db[_0xe7b2x18[_0xd3df[40]]],as:_0xe7b2x18[_0xd3df[41]],attributes:_0xe7b2x18[_0xd3df[37]],include:_0xe7b2x18[_0xd3df[39]]?_[_0xd3df[42]](_0xe7b2x18[_0xd3df[39]],function(_0xe7b2x19){return {model:db[_0xe7b2x19[_0xd3df[40]]],as:_0xe7b2x19[_0xd3df[41]],attributes:_0xe7b2x19[_0xd3df[37]]}}):[]}}):[]}}):[]):[]})[_0xd3df[31]](function(_0xe7b2x15){logger[_0xd3df[24]](_0xd3df[45],_0xe7b2x11);logger[_0xd3df[27]](_0xd3df[45],_0xe7b2x11,JSON[_0xd3df[26]](_0xe7b2x15));_0xe7b2x12(_0xe7b2x15)})[_0xd3df[22]](function(_0xe7b2x14){logger[_0xd3df[21]](_0xd3df[45],_0xe7b2x14[_0xd3df[29]],_0xe7b2x11);_0xe7b2x13(_0xe7b2x16[_0xd3df[21]](500,_0xe7b2x14[_0xd3df[29]]))})})}
\ No newline at end of file
index d3006b6..31293de 100644 (file)
@@ -1 +1 @@
-var _0xd2bc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x3A","\x6F\x6E"];_0xd2bc[0];var VoiceQueueEvents=require(_0xd2bc[1]);var events=[_0xd2bc[2],_0xd2bc[3],_0xd2bc[4]];function createListener(_0x2569x4,_0x2569x5){return function(_0x2569x6){_0x2569x5[_0xd2bc[5]](_0x2569x4,_0x2569x6)}}function removeListener(_0x2569x4,_0x2569x8){return function(){VoiceQueueEvents[_0xd2bc[6]](_0x2569x4,_0x2569x8)}}exports[_0xd2bc[7]]= function(_0x2569x5){for(var _0x2569x9=0,_0x2569xa=events[_0xd2bc[8]];_0x2569x9< _0x2569xa;_0x2569x9++){var _0x2569x4=events[_0x2569x9];var _0x2569x8=createListener(_0xd2bc[9]+ _0x2569x4,_0x2569x5);VoiceQueueEvents[_0xd2bc[10]](_0x2569x4,_0x2569x8)}}
\ No newline at end of file
+var _0xc0a8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x3A","\x6F\x6E"];_0xc0a8[0];var VoiceQueueEvents=require(_0xc0a8[1]);var events=[_0xc0a8[2],_0xc0a8[3],_0xc0a8[4]];function createListener(_0x6062x4,_0x6062x5){return function(_0x6062x6){_0x6062x5[_0xc0a8[5]](_0x6062x4,_0x6062x6)}}function removeListener(_0x6062x4,_0x6062x8){return function(){VoiceQueueEvents[_0xc0a8[6]](_0x6062x4,_0x6062x8)}}exports[_0xc0a8[7]]= function(_0x6062x5){for(var _0x6062x9=0,_0x6062xa=events[_0xc0a8[8]];_0x6062x9< _0x6062xa;_0x6062x9++){var _0x6062x4=events[_0x6062x9];var _0x6062x8=createListener(_0xc0a8[9]+ _0x6062x4,_0x6062x5);VoiceQueueEvents[_0xc0a8[10]](_0x6062x4,_0x6062x8)}}
\ No newline at end of file
index 9a36256..b3433fb 100644 (file)
@@ -1 +1 @@
-var _0xc697=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x69\x6E\x64\x65\x78","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x52\x65\x70\x6F\x72\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc697[0];var multer=require(_0xc697[1]);var util=require(_0xc697[2]);var path=require(_0xc697[3]);var express=require(_0xc697[4]);var router=express.Router();var auth=require(_0xc697[5]);var interaction=require(_0xc697[6]);var config=require(_0xc697[7]);var controller=require(_0xc697[8]);router[_0xc697[12]](_0xc697[9],auth[_0xc697[10]](),controller[_0xc697[11]]);router[_0xc697[12]](_0xc697[13],auth[_0xc697[10]](),controller[_0xc697[14]]);router[_0xc697[12]](_0xc697[15],auth[_0xc697[10]](),controller[_0xc697[16]]);router[_0xc697[12]](_0xc697[17],auth[_0xc697[10]](),controller[_0xc697[18]]);router[_0xc697[20]](_0xc697[9],auth[_0xc697[10]](),controller[_0xc697[19]]);router[_0xc697[22]](_0xc697[17],auth[_0xc697[10]](),controller[_0xc697[21]]);router[_0xc697[24]](_0xc697[17],auth[_0xc697[10]](),controller[_0xc697[23]]);module[_0xc697[25]]= router
\ No newline at end of file
+var _0xe90b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x69\x6E\x64\x65\x78","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x52\x65\x70\x6F\x72\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xe90b[0];var multer=require(_0xe90b[1]);var util=require(_0xe90b[2]);var path=require(_0xe90b[3]);var express=require(_0xe90b[4]);var router=express.Router();var auth=require(_0xe90b[5]);var interaction=require(_0xe90b[6]);var config=require(_0xe90b[7]);var controller=require(_0xe90b[8]);router[_0xe90b[12]](_0xe90b[9],auth[_0xe90b[10]](),controller[_0xe90b[11]]);router[_0xe90b[12]](_0xe90b[13],auth[_0xe90b[10]](),controller[_0xe90b[14]]);router[_0xe90b[12]](_0xe90b[15],auth[_0xe90b[10]](),controller[_0xe90b[16]]);router[_0xe90b[12]](_0xe90b[17],auth[_0xe90b[10]](),controller[_0xe90b[18]]);router[_0xe90b[20]](_0xe90b[9],auth[_0xe90b[10]](),controller[_0xe90b[19]]);router[_0xe90b[22]](_0xe90b[17],auth[_0xe90b[10]](),controller[_0xe90b[21]]);router[_0xe90b[24]](_0xe90b[17],auth[_0xe90b[10]](),controller[_0xe90b[23]]);module[_0xe90b[25]]= router
\ No newline at end of file
index c150218..6212935 100644 (file)
@@ -1 +1 @@
-var _0x6212=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x43\x4F\x4D\x50\x4C\x45\x54\x45\x44\x42\x59\x43\x41\x4C\x4C\x45\x52\x2C\x20\x43\x4F\x4D\x50\x4C\x45\x54\x45\x44\x42\x59\x41\x47\x45\x4E\x54\x2C\x20\x46\x4F\x52\x57\x41\x52\x44\x54\x52\x41\x4E\x46\x45\x52\x2C\x20\x42\x4C\x49\x4E\x44\x54\x52\x41\x4E\x53\x46\x45\x52\x2C\x20\x41\x54\x54\x45\x4E\x44\x45\x44\x54\x52\x41\x4E\x53\x46\x45\x52\x2C\x20\x45\x58\x49\x54\x57\x49\x54\x48\x4B\x45\x59\x2C\x20\x54\x49\x4D\x45\x4F\x55\x54","\x46\x4F\x52\x57\x41\x52\x44\x2C\x20\x42\x4C\x49\x4E\x44\x2C\x20\x41\x54\x54\x45\x4E\x44\x45\x44"];_0x6212[0];var Sequelize=require(_0x6212[1]);var moment=require(_0x6212[2]);module[_0x6212[3]]= {type:{type:Sequelize[_0x6212[4]]},uniqueid:{type:Sequelize[_0x6212[4]]},calleridnum:{type:Sequelize[_0x6212[4]]},calleridname:{type:Sequelize[_0x6212[4]]},queue:{type:Sequelize[_0x6212[4]]},queuecallerjoinAt:{type:Sequelize[_0x6212[5]]},queuecallerleaveAt:{type:Sequelize[_0x6212[5]],set:function(_0x20f7x3){var _0x20f7x4=moment(_0x20f7x3);var _0x20f7x5=moment(this[_0x6212[9]](_0x6212[8]))[_0x6212[7]](_0x6212[6]);var _0x20f7x6=_0x20f7x4[_0x6212[11]](_0x20f7x5,_0x6212[10]);this[_0x6212[13]](_0x6212[12],_0x20f7x3);this[_0x6212[13]](_0x6212[14],_0x20f7x6|| null)}},position:{type:Sequelize[_0x6212[15]]},count:{type:Sequelize[_0x6212[15]]},queuecallerabandon:{type:Sequelize[_0x6212[16]],defaultValue:false},queuecallerabandonAt:{type:Sequelize[_0x6212[5]]},queuecallercomplete:{type:Sequelize[_0x6212[16]],defaultValue:false},queuecallercompleteAt:{type:Sequelize[_0x6212[5]]},queuecallerexit:{type:Sequelize[_0x6212[16]],defaultValue:false},queuecallerexitAt:{type:Sequelize[_0x6212[5]]},queuecallerexitreason:{type:Sequelize[_0x6212[4]],comment:_0x6212[17]},originalposition:{type:Sequelize[_0x6212[15]]},channel:{type:Sequelize[_0x6212[4]]},connectedlinenum:{type:Sequelize[_0x6212[4]]},connectedlinename:{type:Sequelize[_0x6212[4]]},accountcode:{type:Sequelize[_0x6212[4]]},context:{type:Sequelize[_0x6212[4]]},exten:{type:Sequelize[_0x6212[4]]},priority:{type:Sequelize[_0x6212[4]]},holdtime:{type:Sequelize[_0x6212[15]]},assigned:{type:Sequelize[_0x6212[16]],defaultValue:false},lastAssignedTo:{type:Sequelize[_0x6212[4]]},transfer:{type:Sequelize[_0x6212[16]],defaultValue:false},transfertype:{type:Sequelize[_0x6212[4]],comment:_0x6212[18]},transferexten:{type:Sequelize[_0x6212[4]]},transferuniqueid:{type:Sequelize[_0x6212[4]]},disposition:{type:Sequelize[_0x6212[4]]}}
\ No newline at end of file
+var _0x6ba0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x43\x4F\x4D\x50\x4C\x45\x54\x45\x44\x42\x59\x43\x41\x4C\x4C\x45\x52\x2C\x20\x43\x4F\x4D\x50\x4C\x45\x54\x45\x44\x42\x59\x41\x47\x45\x4E\x54\x2C\x20\x46\x4F\x52\x57\x41\x52\x44\x54\x52\x41\x4E\x46\x45\x52\x2C\x20\x42\x4C\x49\x4E\x44\x54\x52\x41\x4E\x53\x46\x45\x52\x2C\x20\x41\x54\x54\x45\x4E\x44\x45\x44\x54\x52\x41\x4E\x53\x46\x45\x52\x2C\x20\x45\x58\x49\x54\x57\x49\x54\x48\x4B\x45\x59\x2C\x20\x54\x49\x4D\x45\x4F\x55\x54","\x46\x4F\x52\x57\x41\x52\x44\x2C\x20\x42\x4C\x49\x4E\x44\x2C\x20\x41\x54\x54\x45\x4E\x44\x45\x44"];_0x6ba0[0];var Sequelize=require(_0x6ba0[1]);var moment=require(_0x6ba0[2]);module[_0x6ba0[3]]= {type:{type:Sequelize[_0x6ba0[4]]},uniqueid:{type:Sequelize[_0x6ba0[4]]},calleridnum:{type:Sequelize[_0x6ba0[4]]},calleridname:{type:Sequelize[_0x6ba0[4]]},queue:{type:Sequelize[_0x6ba0[4]]},queuecallerjoinAt:{type:Sequelize[_0x6ba0[5]]},queuecallerleaveAt:{type:Sequelize[_0x6ba0[5]],set:function(_0x5a6dx3){var _0x5a6dx4=moment(_0x5a6dx3);var _0x5a6dx5=moment(this[_0x6ba0[9]](_0x6ba0[8]))[_0x6ba0[7]](_0x6ba0[6]);var _0x5a6dx6=_0x5a6dx4[_0x6ba0[11]](_0x5a6dx5,_0x6ba0[10]);this[_0x6ba0[13]](_0x6ba0[12],_0x5a6dx3);this[_0x6ba0[13]](_0x6ba0[14],_0x5a6dx6|| null)}},position:{type:Sequelize[_0x6ba0[15]]},count:{type:Sequelize[_0x6ba0[15]]},queuecallerabandon:{type:Sequelize[_0x6ba0[16]],defaultValue:false},queuecallerabandonAt:{type:Sequelize[_0x6ba0[5]]},queuecallercomplete:{type:Sequelize[_0x6ba0[16]],defaultValue:false},queuecallercompleteAt:{type:Sequelize[_0x6ba0[5]]},queuecallerexit:{type:Sequelize[_0x6ba0[16]],defaultValue:false},queuecallerexitAt:{type:Sequelize[_0x6ba0[5]]},queuecallerexitreason:{type:Sequelize[_0x6ba0[4]],comment:_0x6ba0[17]},originalposition:{type:Sequelize[_0x6ba0[15]]},channel:{type:Sequelize[_0x6ba0[4]]},connectedlinenum:{type:Sequelize[_0x6ba0[4]]},connectedlinename:{type:Sequelize[_0x6ba0[4]]},accountcode:{type:Sequelize[_0x6ba0[4]]},context:{type:Sequelize[_0x6ba0[4]]},exten:{type:Sequelize[_0x6ba0[4]]},priority:{type:Sequelize[_0x6ba0[4]]},holdtime:{type:Sequelize[_0x6ba0[15]]},assigned:{type:Sequelize[_0x6ba0[16]],defaultValue:false},lastAssignedTo:{type:Sequelize[_0x6ba0[4]]},transfer:{type:Sequelize[_0x6ba0[16]],defaultValue:false},transfertype:{type:Sequelize[_0x6ba0[4]],comment:_0x6ba0[18]},transferexten:{type:Sequelize[_0x6ba0[4]]},transferuniqueid:{type:Sequelize[_0x6ba0[4]]},disposition:{type:Sequelize[_0x6ba0[4]]}}
\ No newline at end of file
index 75062e9..c45c34b 100644 (file)
@@ -1 +1 @@
-var _0x20be=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x52\x65\x70\x6F\x72\x74"];_0x20be[0];var jsonpatch=require(_0x20be[1]);var rp=require(_0x20be[2]);var moment=require(_0x20be[3]);var BPromise=require(_0x20be[4]);var Mustache=require(_0x20be[5]);var util=require(_0x20be[6]);var path=require(_0x20be[7]);var sox=require(_0x20be[8]);var csv=require(_0x20be[9]);var ejs=require(_0x20be[10]);var fs=require(_0x20be[11]);var _=require(_0x20be[12]);var squel=require(_0x20be[13]);var crypto=require(_0x20be[14]);var jsforce=require(_0x20be[15]);var deskjs=require(_0x20be[16]);var toCsv=require(_0x20be[9]);var querystring=require(_0x20be[17]);var Papa=require(_0x20be[18]);var qs=require(_0x20be[19]);var logger=require(_0x20be[21])(_0x20be[20]);var utils=require(_0x20be[22]);var config=require(_0x20be[23]);var db=require(_0x20be[25])[_0x20be[24]];var socket=require(_0x20be[27])({host:_0x20be[26],port:6379});require(_0x20be[29])[_0x20be[28]](socket);function respondWithStatusCode(_0x959cx1b,_0x959cx1c){_0x959cx1c= _0x959cx1c|| 204;return function(_0x959cx1d){if(_0x959cx1d){return _0x959cx1b[_0x20be[30]](_0x959cx1c)};return _0x959cx1b[_0x20be[32]](_0x959cx1c)[_0x20be[31]]()}}function respondWithResult(_0x959cx1b,_0x959cx1c){_0x959cx1c= _0x959cx1c|| 200;return function(_0x959cx1d){if(_0x959cx1d){return _0x959cx1b[_0x20be[32]](_0x959cx1c)[_0x20be[33]](_0x959cx1d)}}}function respondWithFilteredResult(_0x959cx1b,_0x959cx20){return function(_0x959cx1d){if(_0x959cx1d){var _0x959cx21=_0x959cx1d[_0x20be[34]],_0x959cx22=_0x959cx20[_0x20be[35]],_0x959cx23=_0x959cx20[_0x20be[35]]+ _0x959cx20[_0x20be[36]],_0x959cx1c;if(_0x959cx23>= _0x959cx21){_0x959cx23= _0x959cx21;_0x959cx1c= 200}else {_0x959cx1c= 206};_0x959cx1b[_0x20be[32]](_0x959cx1c);return _0x959cx1b[_0x20be[40]](_0x20be[37],_0x959cx22+ _0x20be[38]+ _0x959cx23+ _0x20be[39]+ _0x959cx21)[_0x20be[33]](_0x959cx1d)};return null}}function patchUpdates(_0x959cx25){return function(_0x959cx1d){try{jsonpatch[_0x20be[41]](_0x959cx1d,_0x959cx25,true)}catch(err){return BPromise[_0x20be[42]](err)};return _0x959cx1d[_0x20be[43]]()}}function saveUpdates(_0x959cx27,_0x959cx1c){return function(_0x959cx1d){if(_0x959cx1d){return _0x959cx1d[_0x20be[45]](_0x959cx27)[_0x20be[44]](function(_0x959cx28){return _0x959cx28})};return null}}function removeEntity(_0x959cx1b,_0x959cx1c){return function(_0x959cx1d){if(_0x959cx1d){return _0x959cx1d[_0x20be[46]]()[_0x20be[44]](function(){_0x959cx1b[_0x20be[32]](204)[_0x20be[31]]()})}}}function handleEntityNotFound(_0x959cx1b,_0x959cx1c){return function(_0x959cx1d){if(!_0x959cx1d){_0x959cx1b[_0x20be[30]](404)};return _0x959cx1d}}function handleError(_0x959cx1b,_0x959cx1c){_0x959cx1c= _0x959cx1c|| 500;return function(_0x959cx2c){logger[_0x20be[48]](_0x959cx2c[_0x20be[47]]);if(_0x959cx2c[_0x20be[49]]){delete _0x959cx2c[_0x20be[49]]};_0x959cx1b[_0x20be[32]](_0x959cx1c)[_0x20be[50]](_0x959cx2c)}}exports[_0x20be[51]]= function(_0x959cx2d,_0x959cx1b){var _0x959cx20={},_0x959cx2e={},_0x959cx2f={count:0,rows:[]};_0x959cx2e[_0x20be[52]]= _[_0x20be[55]](db[_0x20be[54]][_0x20be[53]]);var _0x959cx30={dateStart:_0x959cx2d[_0x20be[57]][_0x20be[56]],dateEnd:_0x959cx2d[_0x20be[57]][_0x20be[58]]};delete _0x959cx2d[_0x20be[57]][_0x20be[56]];delete _0x959cx2d[_0x20be[57]][_0x20be[58]];_0x959cx2e[_0x20be[57]]= _[_0x20be[55]](_0x959cx2d[_0x20be[57]]);_0x959cx2e[_0x20be[59]]= _[_0x20be[60]](_0x959cx2e[_0x20be[52]],_0x959cx2e[_0x20be[57]]);_0x959cx20[_0x20be[61]]= _[_0x20be[60]](_0x959cx2e[_0x20be[52]],qs[_0x20be[62]](_0x959cx2d[_0x20be[57]][_0x20be[62]]));_0x959cx20[_0x20be[61]]= (_0x959cx20[_0x20be[61]][_0x20be[63]])?_0x959cx20[_0x20be[61]]:_0x959cx2e[_0x20be[52]];if(!_0x959cx2d[_0x20be[57]][_0x20be[65]](_0x20be[64])){_0x959cx20[_0x20be[36]]= qs[_0x20be[36]](_0x959cx2d[_0x20be[57]][_0x20be[36]]);_0x959cx20[_0x20be[35]]= qs[_0x20be[35]](_0x959cx2d[_0x20be[57]][_0x20be[35]])};_0x959cx20[_0x20be[66]]= qs[_0x20be[67]](_0x959cx2d[_0x20be[57]][_0x20be[67]]);_0x959cx20[_0x20be[68]]= qs[_0x20be[59]](_[_0x20be[69]](_0x959cx2d[_0x20be[57]],_0x959cx2e[_0x20be[59]]));if(_0x959cx30[_0x20be[56]]){if(_0x959cx30[_0x20be[58]]){_0x959cx30[_0x20be[58]]= moment(_0x959cx30[_0x20be[58]])[_0x20be[71]](1,_0x20be[70])}else {_0x959cx30[_0x20be[58]]= moment(_0x959cx30[_0x20be[56]])[_0x20be[71]](1,_0x20be[70])};_[_0x20be[72]](_0x959cx20[_0x20be[68]],{createdAt:{$gte:_0x959cx30[_0x20be[56]],$lte:_0x959cx30[_0x20be[58]]}})};if(_0x959cx2d[_0x20be[57]][_0x20be[73]]){_0x959cx20[_0x20be[68]]= _[_0x20be[72]](_0x959cx20[_0x20be[68]],{$or:_[_0x20be[75]](_0x959cx20[_0x20be[61]],function(_0x959cx31){var _0x959cx2f={};_0x959cx2f[_0x959cx31]= {$like:_0x20be[74]+ _0x959cx2d[_0x20be[57]][_0x20be[73]]+ _0x20be[74]};return _0x959cx2f})})};_0x959cx20= _[_0x20be[72]]({},_0x959cx20,_0x959cx2d[_0x20be[76]]);var _0x959cx32={where:_0x959cx20[_0x20be[68]]};return db[_0x20be[54]][_0x20be[34]](_0x959cx32)[_0x20be[44]](function(_0x959cx21){_0x959cx2f[_0x20be[34]]= _0x959cx21;if(_0x959cx2d[_0x20be[57]][_0x20be[79]]){_0x959cx20[_0x20be[80]]= [{all:true}]};return db[_0x20be[54]][_0x20be[81]](_0x959cx20)})[_0x20be[44]](function(_0x959cx33){_0x959cx2f[_0x20be[78]]= _0x959cx33;return _0x959cx2f})[_0x20be[44]](respondWithFilteredResult(_0x959cx1b,_0x959cx20))[_0x20be[77]](handleError(_0x959cx1b,null))};exports[_0x20be[82]]= function(_0x959cx2d,_0x959cx1b){var _0x959cx20={raw:false,where:{id:_0x959cx2d[_0x20be[84]][_0x20be[83]]}},_0x959cx2e={};_0x959cx2e[_0x20be[52]]= _[_0x20be[55]](db[_0x20be[54]][_0x20be[53]]);_0x959cx2e[_0x20be[57]]= _[_0x20be[55]](_0x959cx2d[_0x20be[57]]);_0x959cx2e[_0x20be[59]]= _[_0x20be[60]](_0x959cx2e[_0x20be[52]],_0x959cx2e[_0x20be[57]]);_0x959cx20[_0x20be[61]]= _[_0x20be[60]](_0x959cx2e[_0x20be[52]],qs[_0x20be[62]](_0x959cx2d[_0x20be[57]][_0x20be[62]]));_0x959cx20[_0x20be[61]]= (_0x959cx20[_0x20be[61]][_0x20be[63]])?_0x959cx20[_0x20be[61]]:_0x959cx2e[_0x20be[52]];if(_0x959cx2d[_0x20be[57]][_0x20be[79]]){_0x959cx20[_0x20be[80]]= [{all:true}]};_0x959cx20= _[_0x20be[72]]({},_0x959cx20,_0x959cx2d[_0x20be[76]]);return db[_0x20be[54]][_0x20be[85]](_0x959cx20)[_0x20be[44]](handleEntityNotFound(_0x959cx1b,null))[_0x20be[44]](respondWithResult(_0x959cx1b,null))[_0x20be[77]](handleError(_0x959cx1b,null))};exports[_0x20be[86]]= function(_0x959cx2d,_0x959cx1b){return db[_0x20be[54]][_0x20be[86]](_0x959cx2d[_0x20be[87]],{})[_0x20be[44]](respondWithResult(_0x959cx1b,201))[_0x20be[77]](handleError(_0x959cx1b,null))};exports[_0x20be[45]]= function(_0x959cx2d,_0x959cx1b){if(_0x959cx2d[_0x20be[87]][_0x20be[83]]){delete _0x959cx2d[_0x20be[87]][_0x20be[83]]};return db[_0x20be[54]][_0x20be[85]]({where:{id:_0x959cx2d[_0x20be[84]][_0x20be[83]]}})[_0x20be[44]](handleEntityNotFound(_0x959cx1b,null))[_0x20be[44]](saveUpdates(_0x959cx2d[_0x20be[87]],null))[_0x20be[44]](respondWithResult(_0x959cx1b,null))[_0x20be[77]](handleError(_0x959cx1b,null))};exports[_0x20be[46]]= function(_0x959cx2d,_0x959cx1b){return db[_0x20be[54]][_0x20be[85]]({where:{id:_0x959cx2d[_0x20be[84]][_0x20be[83]]}})[_0x20be[44]](handleEntityNotFound(_0x959cx1b,null))[_0x20be[44]](removeEntity(_0x959cx1b,null))[_0x20be[77]](handleError(_0x959cx1b,null))};exports[_0x20be[88]]= function(_0x959cx2d,_0x959cx1b){return db[_0x20be[54]][_0x20be[88]]()[_0x20be[44]](respondWithResult(_0x959cx1b,null))[_0x20be[77]](handleError(_0x959cx1b,null))};exports[_0x20be[89]]= function(_0x959cx2d,_0x959cx1b){var _0x959cx20={},_0x959cx2e={},_0x959cx2f={count:0,rows:[]};_0x959cx2e[_0x20be[52]]= _[_0x20be[55]](db[_0x20be[54]][_0x20be[53]]);var _0x959cx30={dateStart:_0x959cx2d[_0x20be[57]][_0x20be[56]],dateEnd:_0x959cx2d[_0x20be[57]][_0x20be[58]]};delete _0x959cx2d[_0x20be[57]][_0x20be[56]];delete _0x959cx2d[_0x20be[57]][_0x20be[58]];_0x959cx2e[_0x20be[57]]= _[_0x20be[55]](_0x959cx2d[_0x20be[57]]);_0x959cx2e[_0x20be[59]]= _[_0x20be[60]](_0x959cx2e[_0x20be[52]],_0x959cx2e[_0x20be[57]]);_0x959cx20[_0x20be[61]]= _[_0x20be[60]](_0x959cx2e[_0x20be[52]],qs[_0x20be[62]](_0x959cx2d[_0x20be[57]][_0x20be[62]]));_0x959cx20[_0x20be[61]]= (_0x959cx20[_0x20be[61]][_0x20be[63]])?_0x959cx20[_0x20be[61]]:_0x959cx2e[_0x20be[52]];if(!_0x959cx2d[_0x20be[57]][_0x20be[65]](_0x20be[64])){_0x959cx20[_0x20be[36]]= qs[_0x20be[36]](_0x959cx2d[_0x20be[57]][_0x20be[36]]);_0x959cx20[_0x20be[35]]= qs[_0x20be[35]](_0x959cx2d[_0x20be[57]][_0x20be[35]])};_0x959cx20[_0x20be[66]]= qs[_0x20be[67]](_0x959cx2d[_0x20be[57]][_0x20be[67]]);_0x959cx20[_0x20be[68]]= qs[_0x20be[59]](_[_0x20be[69]](_0x959cx2d[_0x20be[57]],_0x959cx2e[_0x20be[59]]));if(_0x959cx30[_0x20be[56]]){if(_0x959cx30[_0x20be[58]]){_0x959cx30[_0x20be[58]]= moment(_0x959cx30[_0x20be[58]])[_0x20be[71]](1,_0x20be[70])}else {_0x959cx30[_0x20be[58]]= moment(_0x959cx30[_0x20be[56]])[_0x20be[71]](1,_0x20be[70])};_[_0x20be[72]](_0x959cx20[_0x20be[68]],{createdAt:{$gte:_0x959cx30[_0x20be[56]],$lte:_0x959cx30[_0x20be[58]]}})};if(_0x959cx2d[_0x20be[57]][_0x20be[73]]){_0x959cx20[_0x20be[68]]= _[_0x20be[72]](_0x959cx20[_0x20be[68]],{$or:_[_0x20be[75]](_0x959cx20[_0x20be[61]],function(_0x959cx31){var _0x959cx2f={};_0x959cx2f[_0x959cx31]= {$like:_0x20be[74]+ _0x959cx2d[_0x20be[57]][_0x20be[73]]+ _0x20be[74]};return _0x959cx2f})})};_0x959cx20= _[_0x20be[72]]({},_0x959cx20,_0x959cx2d[_0x20be[76]]);var _0x959cx32={where:_0x959cx20[_0x20be[68]]};return db[_0x20be[54]][_0x20be[34]](_0x959cx32)[_0x20be[44]](function(_0x959cx21){_0x959cx2f[_0x20be[34]]= _0x959cx21;if(_0x959cx2d[_0x20be[57]][_0x20be[79]]){_0x959cx20[_0x20be[80]]= [{all:true}]};return db[_0x20be[54]][_0x20be[81]](_0x959cx20)})[_0x20be[44]](function(_0x959cx33){_0x959cx2f[_0x20be[78]]= _0x959cx33;return _0x959cx2f})[_0x20be[44]](respondWithFilteredResult(_0x959cx1b,_0x959cx20,_0x20be[89]))[_0x20be[77]](handleError(_0x959cx1b,null,_0x20be[89]))}
\ No newline at end of file
+var _0x9be9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x52\x65\x70\x6F\x72\x74"];_0x9be9[0];var jsonpatch=require(_0x9be9[1]);var rp=require(_0x9be9[2]);var moment=require(_0x9be9[3]);var BPromise=require(_0x9be9[4]);var Mustache=require(_0x9be9[5]);var util=require(_0x9be9[6]);var path=require(_0x9be9[7]);var sox=require(_0x9be9[8]);var csv=require(_0x9be9[9]);var ejs=require(_0x9be9[10]);var fs=require(_0x9be9[11]);var _=require(_0x9be9[12]);var squel=require(_0x9be9[13]);var crypto=require(_0x9be9[14]);var jsforce=require(_0x9be9[15]);var deskjs=require(_0x9be9[16]);var toCsv=require(_0x9be9[9]);var querystring=require(_0x9be9[17]);var Papa=require(_0x9be9[18]);var qs=require(_0x9be9[19]);var logger=require(_0x9be9[21])(_0x9be9[20]);var utils=require(_0x9be9[22]);var config=require(_0x9be9[23]);var db=require(_0x9be9[25])[_0x9be9[24]];var socket=require(_0x9be9[27])({host:_0x9be9[26],port:6379});require(_0x9be9[29])[_0x9be9[28]](socket);function respondWithStatusCode(_0x47d6x1b,_0x47d6x1c){_0x47d6x1c= _0x47d6x1c|| 204;return function(_0x47d6x1d){if(_0x47d6x1d){return _0x47d6x1b[_0x9be9[30]](_0x47d6x1c)};return _0x47d6x1b[_0x9be9[32]](_0x47d6x1c)[_0x9be9[31]]()}}function respondWithResult(_0x47d6x1b,_0x47d6x1c){_0x47d6x1c= _0x47d6x1c|| 200;return function(_0x47d6x1d){if(_0x47d6x1d){return _0x47d6x1b[_0x9be9[32]](_0x47d6x1c)[_0x9be9[33]](_0x47d6x1d)}}}function respondWithFilteredResult(_0x47d6x1b,_0x47d6x20){return function(_0x47d6x1d){if(_0x47d6x1d){var _0x47d6x21=_0x47d6x1d[_0x9be9[34]],_0x47d6x22=_0x47d6x20[_0x9be9[35]],_0x47d6x23=_0x47d6x20[_0x9be9[35]]+ _0x47d6x20[_0x9be9[36]],_0x47d6x1c;if(_0x47d6x23>= _0x47d6x21){_0x47d6x23= _0x47d6x21;_0x47d6x1c= 200}else {_0x47d6x1c= 206};_0x47d6x1b[_0x9be9[32]](_0x47d6x1c);return _0x47d6x1b[_0x9be9[40]](_0x9be9[37],_0x47d6x22+ _0x9be9[38]+ _0x47d6x23+ _0x9be9[39]+ _0x47d6x21)[_0x9be9[33]](_0x47d6x1d)};return null}}function patchUpdates(_0x47d6x25){return function(_0x47d6x1d){try{jsonpatch[_0x9be9[41]](_0x47d6x1d,_0x47d6x25,true)}catch(err){return BPromise[_0x9be9[42]](err)};return _0x47d6x1d[_0x9be9[43]]()}}function saveUpdates(_0x47d6x27,_0x47d6x1c){return function(_0x47d6x1d){if(_0x47d6x1d){return _0x47d6x1d[_0x9be9[45]](_0x47d6x27)[_0x9be9[44]](function(_0x47d6x28){return _0x47d6x28})};return null}}function removeEntity(_0x47d6x1b,_0x47d6x1c){return function(_0x47d6x1d){if(_0x47d6x1d){return _0x47d6x1d[_0x9be9[46]]()[_0x9be9[44]](function(){_0x47d6x1b[_0x9be9[32]](204)[_0x9be9[31]]()})}}}function handleEntityNotFound(_0x47d6x1b,_0x47d6x1c){return function(_0x47d6x1d){if(!_0x47d6x1d){_0x47d6x1b[_0x9be9[30]](404)};return _0x47d6x1d}}function handleError(_0x47d6x1b,_0x47d6x1c){_0x47d6x1c= _0x47d6x1c|| 500;return function(_0x47d6x2c){logger[_0x9be9[48]](_0x47d6x2c[_0x9be9[47]]);if(_0x47d6x2c[_0x9be9[49]]){delete _0x47d6x2c[_0x9be9[49]]};_0x47d6x1b[_0x9be9[32]](_0x47d6x1c)[_0x9be9[50]](_0x47d6x2c)}}exports[_0x9be9[51]]= function(_0x47d6x2d,_0x47d6x1b){var _0x47d6x20={},_0x47d6x2e={},_0x47d6x2f={count:0,rows:[]};_0x47d6x2e[_0x9be9[52]]= _[_0x9be9[55]](db[_0x9be9[54]][_0x9be9[53]]);var _0x47d6x30={dateStart:_0x47d6x2d[_0x9be9[57]][_0x9be9[56]],dateEnd:_0x47d6x2d[_0x9be9[57]][_0x9be9[58]]};delete _0x47d6x2d[_0x9be9[57]][_0x9be9[56]];delete _0x47d6x2d[_0x9be9[57]][_0x9be9[58]];_0x47d6x2e[_0x9be9[57]]= _[_0x9be9[55]](_0x47d6x2d[_0x9be9[57]]);_0x47d6x2e[_0x9be9[59]]= _[_0x9be9[60]](_0x47d6x2e[_0x9be9[52]],_0x47d6x2e[_0x9be9[57]]);_0x47d6x20[_0x9be9[61]]= _[_0x9be9[60]](_0x47d6x2e[_0x9be9[52]],qs[_0x9be9[62]](_0x47d6x2d[_0x9be9[57]][_0x9be9[62]]));_0x47d6x20[_0x9be9[61]]= (_0x47d6x20[_0x9be9[61]][_0x9be9[63]])?_0x47d6x20[_0x9be9[61]]:_0x47d6x2e[_0x9be9[52]];if(!_0x47d6x2d[_0x9be9[57]][_0x9be9[65]](_0x9be9[64])){_0x47d6x20[_0x9be9[36]]= qs[_0x9be9[36]](_0x47d6x2d[_0x9be9[57]][_0x9be9[36]]);_0x47d6x20[_0x9be9[35]]= qs[_0x9be9[35]](_0x47d6x2d[_0x9be9[57]][_0x9be9[35]])};_0x47d6x20[_0x9be9[66]]= qs[_0x9be9[67]](_0x47d6x2d[_0x9be9[57]][_0x9be9[67]]);_0x47d6x20[_0x9be9[68]]= qs[_0x9be9[59]](_[_0x9be9[69]](_0x47d6x2d[_0x9be9[57]],_0x47d6x2e[_0x9be9[59]]));if(_0x47d6x30[_0x9be9[56]]){if(_0x47d6x30[_0x9be9[58]]){_0x47d6x30[_0x9be9[58]]= moment(_0x47d6x30[_0x9be9[58]])[_0x9be9[71]](1,_0x9be9[70])}else {_0x47d6x30[_0x9be9[58]]= moment(_0x47d6x30[_0x9be9[56]])[_0x9be9[71]](1,_0x9be9[70])};_[_0x9be9[72]](_0x47d6x20[_0x9be9[68]],{createdAt:{$gte:_0x47d6x30[_0x9be9[56]],$lte:_0x47d6x30[_0x9be9[58]]}})};if(_0x47d6x2d[_0x9be9[57]][_0x9be9[73]]){_0x47d6x20[_0x9be9[68]]= _[_0x9be9[72]](_0x47d6x20[_0x9be9[68]],{$or:_[_0x9be9[75]](_0x47d6x20[_0x9be9[61]],function(_0x47d6x31){var _0x47d6x2f={};_0x47d6x2f[_0x47d6x31]= {$like:_0x9be9[74]+ _0x47d6x2d[_0x9be9[57]][_0x9be9[73]]+ _0x9be9[74]};return _0x47d6x2f})})};_0x47d6x20= _[_0x9be9[72]]({},_0x47d6x20,_0x47d6x2d[_0x9be9[76]]);var _0x47d6x32={where:_0x47d6x20[_0x9be9[68]]};return db[_0x9be9[54]][_0x9be9[34]](_0x47d6x32)[_0x9be9[44]](function(_0x47d6x21){_0x47d6x2f[_0x9be9[34]]= _0x47d6x21;if(_0x47d6x2d[_0x9be9[57]][_0x9be9[79]]){_0x47d6x20[_0x9be9[80]]= [{all:true}]};return db[_0x9be9[54]][_0x9be9[81]](_0x47d6x20)})[_0x9be9[44]](function(_0x47d6x33){_0x47d6x2f[_0x9be9[78]]= _0x47d6x33;return _0x47d6x2f})[_0x9be9[44]](respondWithFilteredResult(_0x47d6x1b,_0x47d6x20))[_0x9be9[77]](handleError(_0x47d6x1b,null))};exports[_0x9be9[82]]= function(_0x47d6x2d,_0x47d6x1b){var _0x47d6x20={raw:false,where:{id:_0x47d6x2d[_0x9be9[84]][_0x9be9[83]]}},_0x47d6x2e={};_0x47d6x2e[_0x9be9[52]]= _[_0x9be9[55]](db[_0x9be9[54]][_0x9be9[53]]);_0x47d6x2e[_0x9be9[57]]= _[_0x9be9[55]](_0x47d6x2d[_0x9be9[57]]);_0x47d6x2e[_0x9be9[59]]= _[_0x9be9[60]](_0x47d6x2e[_0x9be9[52]],_0x47d6x2e[_0x9be9[57]]);_0x47d6x20[_0x9be9[61]]= _[_0x9be9[60]](_0x47d6x2e[_0x9be9[52]],qs[_0x9be9[62]](_0x47d6x2d[_0x9be9[57]][_0x9be9[62]]));_0x47d6x20[_0x9be9[61]]= (_0x47d6x20[_0x9be9[61]][_0x9be9[63]])?_0x47d6x20[_0x9be9[61]]:_0x47d6x2e[_0x9be9[52]];if(_0x47d6x2d[_0x9be9[57]][_0x9be9[79]]){_0x47d6x20[_0x9be9[80]]= [{all:true}]};_0x47d6x20= _[_0x9be9[72]]({},_0x47d6x20,_0x47d6x2d[_0x9be9[76]]);return db[_0x9be9[54]][_0x9be9[85]](_0x47d6x20)[_0x9be9[44]](handleEntityNotFound(_0x47d6x1b,null))[_0x9be9[44]](respondWithResult(_0x47d6x1b,null))[_0x9be9[77]](handleError(_0x47d6x1b,null))};exports[_0x9be9[86]]= function(_0x47d6x2d,_0x47d6x1b){return db[_0x9be9[54]][_0x9be9[86]](_0x47d6x2d[_0x9be9[87]],{})[_0x9be9[44]](respondWithResult(_0x47d6x1b,201))[_0x9be9[77]](handleError(_0x47d6x1b,null))};exports[_0x9be9[45]]= function(_0x47d6x2d,_0x47d6x1b){if(_0x47d6x2d[_0x9be9[87]][_0x9be9[83]]){delete _0x47d6x2d[_0x9be9[87]][_0x9be9[83]]};return db[_0x9be9[54]][_0x9be9[85]]({where:{id:_0x47d6x2d[_0x9be9[84]][_0x9be9[83]]}})[_0x9be9[44]](handleEntityNotFound(_0x47d6x1b,null))[_0x9be9[44]](saveUpdates(_0x47d6x2d[_0x9be9[87]],null))[_0x9be9[44]](respondWithResult(_0x47d6x1b,null))[_0x9be9[77]](handleError(_0x47d6x1b,null))};exports[_0x9be9[46]]= function(_0x47d6x2d,_0x47d6x1b){return db[_0x9be9[54]][_0x9be9[85]]({where:{id:_0x47d6x2d[_0x9be9[84]][_0x9be9[83]]}})[_0x9be9[44]](handleEntityNotFound(_0x47d6x1b,null))[_0x9be9[44]](removeEntity(_0x47d6x1b,null))[_0x9be9[77]](handleError(_0x47d6x1b,null))};exports[_0x9be9[88]]= function(_0x47d6x2d,_0x47d6x1b){return db[_0x9be9[54]][_0x9be9[88]]()[_0x9be9[44]](respondWithResult(_0x47d6x1b,null))[_0x9be9[77]](handleError(_0x47d6x1b,null))};exports[_0x9be9[89]]= function(_0x47d6x2d,_0x47d6x1b){var _0x47d6x20={},_0x47d6x2e={},_0x47d6x2f={count:0,rows:[]};_0x47d6x2e[_0x9be9[52]]= _[_0x9be9[55]](db[_0x9be9[54]][_0x9be9[53]]);var _0x47d6x30={dateStart:_0x47d6x2d[_0x9be9[57]][_0x9be9[56]],dateEnd:_0x47d6x2d[_0x9be9[57]][_0x9be9[58]]};delete _0x47d6x2d[_0x9be9[57]][_0x9be9[56]];delete _0x47d6x2d[_0x9be9[57]][_0x9be9[58]];_0x47d6x2e[_0x9be9[57]]= _[_0x9be9[55]](_0x47d6x2d[_0x9be9[57]]);_0x47d6x2e[_0x9be9[59]]= _[_0x9be9[60]](_0x47d6x2e[_0x9be9[52]],_0x47d6x2e[_0x9be9[57]]);_0x47d6x20[_0x9be9[61]]= _[_0x9be9[60]](_0x47d6x2e[_0x9be9[52]],qs[_0x9be9[62]](_0x47d6x2d[_0x9be9[57]][_0x9be9[62]]));_0x47d6x20[_0x9be9[61]]= (_0x47d6x20[_0x9be9[61]][_0x9be9[63]])?_0x47d6x20[_0x9be9[61]]:_0x47d6x2e[_0x9be9[52]];if(!_0x47d6x2d[_0x9be9[57]][_0x9be9[65]](_0x9be9[64])){_0x47d6x20[_0x9be9[36]]= qs[_0x9be9[36]](_0x47d6x2d[_0x9be9[57]][_0x9be9[36]]);_0x47d6x20[_0x9be9[35]]= qs[_0x9be9[35]](_0x47d6x2d[_0x9be9[57]][_0x9be9[35]])};_0x47d6x20[_0x9be9[66]]= qs[_0x9be9[67]](_0x47d6x2d[_0x9be9[57]][_0x9be9[67]]);_0x47d6x20[_0x9be9[68]]= qs[_0x9be9[59]](_[_0x9be9[69]](_0x47d6x2d[_0x9be9[57]],_0x47d6x2e[_0x9be9[59]]));if(_0x47d6x30[_0x9be9[56]]){if(_0x47d6x30[_0x9be9[58]]){_0x47d6x30[_0x9be9[58]]= moment(_0x47d6x30[_0x9be9[58]])[_0x9be9[71]](1,_0x9be9[70])}else {_0x47d6x30[_0x9be9[58]]= moment(_0x47d6x30[_0x9be9[56]])[_0x9be9[71]](1,_0x9be9[70])};_[_0x9be9[72]](_0x47d6x20[_0x9be9[68]],{createdAt:{$gte:_0x47d6x30[_0x9be9[56]],$lte:_0x47d6x30[_0x9be9[58]]}})};if(_0x47d6x2d[_0x9be9[57]][_0x9be9[73]]){_0x47d6x20[_0x9be9[68]]= _[_0x9be9[72]](_0x47d6x20[_0x9be9[68]],{$or:_[_0x9be9[75]](_0x47d6x20[_0x9be9[61]],function(_0x47d6x31){var _0x47d6x2f={};_0x47d6x2f[_0x47d6x31]= {$like:_0x9be9[74]+ _0x47d6x2d[_0x9be9[57]][_0x9be9[73]]+ _0x9be9[74]};return _0x47d6x2f})})};_0x47d6x20= _[_0x9be9[72]]({},_0x47d6x20,_0x47d6x2d[_0x9be9[76]]);var _0x47d6x32={where:_0x47d6x20[_0x9be9[68]]};return db[_0x9be9[54]][_0x9be9[34]](_0x47d6x32)[_0x9be9[44]](function(_0x47d6x21){_0x47d6x2f[_0x9be9[34]]= _0x47d6x21;if(_0x47d6x2d[_0x9be9[57]][_0x9be9[79]]){_0x47d6x20[_0x9be9[80]]= [{all:true}]};return db[_0x9be9[54]][_0x9be9[81]](_0x47d6x20)})[_0x9be9[44]](function(_0x47d6x33){_0x47d6x2f[_0x9be9[78]]= _0x47d6x33;return _0x47d6x2f})[_0x9be9[44]](respondWithFilteredResult(_0x47d6x1b,_0x47d6x20,_0x9be9[89]))[_0x9be9[77]](handleError(_0x47d6x1b,null,_0x9be9[89]))}
\ No newline at end of file
index 33f93ef..b325080 100644 (file)
@@ -1 +1 @@
-var _0xc5d0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0xc5d0[0];var EventEmitter=require(_0xc5d0[1]);var VoiceQueueReport=require(_0xc5d0[4])[_0xc5d0[3]][_0xc5d0[2]];var VoiceQueueReportEvents= new EventEmitter();VoiceQueueReportEvents[_0xc5d0[5]](0);var events={afterCreate:_0xc5d0[6],afterUpdate:_0xc5d0[7],afterDestroy:_0xc5d0[8]};function emitEvent(event){return function(_0x610cx7,_0x610cx8,_0x610cx9){VoiceQueueReportEvents[_0xc5d0[11]](event+ _0xc5d0[9]+ _0x610cx7[_0xc5d0[10]],_0x610cx7);VoiceQueueReportEvents[_0xc5d0[11]](event,_0x610cx7);_0x610cx9(null)}}for(var e in events){if(events[_0xc5d0[12]](e)){var event=events[e];VoiceQueueReport[_0xc5d0[13]](e,emitEvent(event))}};module[_0xc5d0[14]]= VoiceQueueReportEvents
\ No newline at end of file
+var _0x1044=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x3A","\x69\x64","\x65\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x68\x6F\x6F\x6B","\x65\x78\x70\x6F\x72\x74\x73"];_0x1044[0];var EventEmitter=require(_0x1044[1]);var VoiceQueueReport=require(_0x1044[4])[_0x1044[3]][_0x1044[2]];var VoiceQueueReportEvents= new EventEmitter();VoiceQueueReportEvents[_0x1044[5]](0);var events={afterCreate:_0x1044[6],afterUpdate:_0x1044[7],afterDestroy:_0x1044[8]};function emitEvent(event){return function(_0x9091x7,_0x9091x8,_0x9091x9){VoiceQueueReportEvents[_0x1044[11]](event+ _0x1044[9]+ _0x9091x7[_0x1044[10]],_0x9091x7);VoiceQueueReportEvents[_0x1044[11]](event,_0x9091x7);_0x9091x9(null)}}for(var e in events){if(events[_0x1044[12]](e)){var event=events[e];VoiceQueueReport[_0x1044[13]](e,emitEvent(event))}};module[_0x1044[14]]= VoiceQueueReportEvents
\ No newline at end of file
index 65ac8f0..2de1ef8 100644 (file)
@@ -1 +1 @@
-var _0x6104=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x64\x65\x66\x69\x6E\x65"];_0x6104[0];var _=require(_0x6104[1]);var util=require(_0x6104[2]);var logger=require(_0x6104[4])(_0x6104[3]);var moment=require(_0x6104[5]);var BPromise=require(_0x6104[6]);var rp=require(_0x6104[7]);var attributes=require(_0x6104[8]);module[_0x6104[9]]= function(_0x277ax8,_0x277ax9){return _0x277ax8[_0x6104[14]](_0x6104[10],attributes,{tableName:_0x6104[11],paranoid:false,indexes:[{"\x66\x69\x65\x6C\x64\x73":[_0x6104[12]]},{"\x66\x69\x65\x6C\x64\x73":[_0x6104[13]]}],timestamps:true})}
\ No newline at end of file
+var _0xcd39=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x64\x65\x66\x69\x6E\x65"];_0xcd39[0];var _=require(_0xcd39[1]);var util=require(_0xcd39[2]);var logger=require(_0xcd39[4])(_0xcd39[3]);var moment=require(_0xcd39[5]);var BPromise=require(_0xcd39[6]);var rp=require(_0xcd39[7]);var attributes=require(_0xcd39[8]);module[_0xcd39[9]]= function(_0x749dx8,_0x749dx9){return _0x749dx8[_0xcd39[14]](_0xcd39[10],attributes,{tableName:_0xcd39[11],paranoid:false,indexes:[{"\x66\x69\x65\x6C\x64\x73":[_0xcd39[12]]},{"\x66\x69\x65\x6C\x64\x73":[_0xcd39[13]]}],timestamps:true})}
\ No newline at end of file
index d2a672e..1e0c628 100644 (file)
@@ -1 +1 @@
-var _0x3f97=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65"];_0x3f97[0];var _=require(_0x3f97[1]);var util=require(_0x3f97[2]);var moment=require(_0x3f97[3]);var BPromise=require(_0x3f97[4]);var rs=require(_0x3f97[5]);var fs=require(_0x3f97[6]);var db=require(_0x3f97[8])[_0x3f97[7]];var utils=require(_0x3f97[9]);var logger=require(_0x3f97[11])(_0x3f97[10]);var config=require(_0x3f97[12]);var jayson=require(_0x3f97[13]);var client=jayson[_0x3f97[15]][_0x3f97[14]]({port:9002});var socket=require(_0x3f97[17])({host:_0x3f97[16],port:6379});require(_0x3f97[19])[_0x3f97[18]](socket);function respondWithRpcPromise(_0xe608xf,_0xe608x10,_0xe608x11){return  new BPromise(function(_0xe608x12,_0xe608x13){return client[_0x3f97[32]](_0xe608xf,_0xe608x11)[_0x3f97[31]](function(_0xe608x15){logger[_0x3f97[24]](_0x3f97[20],_0xe608x10,_0x3f97[23]);logger[_0x3f97[27]](_0x3f97[25],_0xe608x10,_0x3f97[23],JSON[_0x3f97[26]](_0xe608x15));if(_0xe608x15[_0x3f97[21]]){if(_0xe608x15[_0x3f97[21]][_0x3f97[28]]=== 500){logger[_0x3f97[21]](_0x3f97[20],_0xe608x10,_0xe608x15[_0x3f97[21]][_0x3f97[29]]);return _0xe608x13(_0xe608x15[_0x3f97[21]][_0x3f97[29]])};logger[_0x3f97[21]](_0x3f97[20],_0xe608x10,_0xe608x15[_0x3f97[21]][_0x3f97[29]]);return _0xe608x12(_0xe608x15[_0x3f97[21]][_0x3f97[29]])}else {logger[_0x3f97[24]](_0x3f97[20],_0xe608x10,_0x3f97[23]);_0xe608x12(_0xe608x15[_0x3f97[30]][_0x3f97[29]])}})[_0x3f97[22]](function(_0xe608x14){logger[_0x3f97[21]](_0x3f97[20],_0xe608x10,_0xe608x14);_0xe608x13(_0xe608x14)})})}exports[_0x3f97[33]]= function(_0xe608x11){var _0xe608x16=this;return  new Promise(function(_0xe608x12,_0xe608x13){return db[_0x3f97[44]][_0x3f97[43]]({raw:_0xe608x11[_0x3f97[34]]?(_0xe608x11[_0x3f97[34]][_0x3f97[35]]=== undefined)?true:false:true,where:_0xe608x11[_0x3f97[34]]?_0xe608x11[_0x3f97[34]][_0x3f97[36]]|| null:null,attributes:_0xe608x11[_0x3f97[34]]?_0xe608x11[_0x3f97[34]][_0x3f97[37]]|| null:null,limit:_0xe608x11[_0x3f97[34]]?_0xe608x11[_0x3f97[34]][_0x3f97[38]]|| null:null,include:_0xe608x11[_0x3f97[34]]?(_0xe608x11[_0x3f97[34]][_0x3f97[39]]?_[_0x3f97[42]](_0xe608x11[_0x3f97[34]][_0x3f97[39]],function(_0xe608x17){return {model:db[_0xe608x17[_0x3f97[40]]],as:_0xe608x17[_0x3f97[41]],attributes:_0xe608x17[_0x3f97[37]],include:_0xe608x17[_0x3f97[39]]?_[_0x3f97[42]](_0xe608x17[_0x3f97[39]],function(_0xe608x18){return {model:db[_0xe608x18[_0x3f97[40]]],as:_0xe608x18[_0x3f97[41]],attributes:_0xe608x18[_0x3f97[37]],include:_0xe608x18[_0x3f97[39]]?_[_0x3f97[42]](_0xe608x18[_0x3f97[39]],function(_0xe608x19){return {model:db[_0xe608x19[_0x3f97[40]]],as:_0xe608x19[_0x3f97[41]],attributes:_0xe608x19[_0x3f97[37]]}}):[]}}):[]}}):[]):[]})[_0x3f97[31]](function(_0xe608x15){logger[_0x3f97[24]](_0x3f97[33],_0xe608x11);logger[_0x3f97[27]](_0x3f97[33],_0xe608x11,JSON[_0x3f97[26]](_0xe608x15));_0xe608x12(_0xe608x15)})[_0x3f97[22]](function(_0xe608x14){logger[_0x3f97[21]](_0x3f97[33],_0xe608x14[_0x3f97[29]],_0xe608x11);_0xe608x13(_0xe608x16[_0x3f97[21]](500,_0xe608x14[_0x3f97[29]]))})})};exports[_0x3f97[45]]= function(_0xe608x11){var _0xe608x16=this;return  new Promise(function(_0xe608x12,_0xe608x13){return db[_0x3f97[44]][_0x3f97[47]](_0xe608x11[_0x3f97[46]],{raw:_0xe608x11[_0x3f97[34]]?(_0xe608x11[_0x3f97[34]][_0x3f97[35]]=== undefined)?true:false:true})[_0x3f97[31]](function(_0xe608x15){logger[_0x3f97[24]](_0x3f97[45],_0xe608x11);logger[_0x3f97[27]](_0x3f97[45],_0xe608x11,JSON[_0x3f97[26]](_0xe608x15));_0xe608x12(_0xe608x15)})[_0x3f97[22]](function(_0xe608x14){logger[_0x3f97[21]](_0x3f97[45],_0xe608x14[_0x3f97[29]],_0xe608x11);_0xe608x13(_0xe608x16[_0x3f97[21]](500,_0xe608x14[_0x3f97[29]]))})})};exports[_0x3f97[48]]= function(_0xe608x11){var _0xe608x16=this;return  new Promise(function(_0xe608x12,_0xe608x13){return db[_0x3f97[44]][_0x3f97[49]](_0xe608x11[_0x3f97[46]],{raw:_0xe608x11[_0x3f97[34]]?(_0xe608x11[_0x3f97[34]][_0x3f97[35]]=== undefined)?true:false:true,individualHooks:true,where:_0xe608x11[_0x3f97[34]]?_0xe608x11[_0x3f97[34]][_0x3f97[36]]|| null:null,attributes:_0xe608x11[_0x3f97[34]]?_0xe608x11[_0x3f97[34]][_0x3f97[37]]|| null:null,limit:_0xe608x11[_0x3f97[34]]?_0xe608x11[_0x3f97[34]][_0x3f97[38]]|| null:null})[_0x3f97[31]](function(_0xe608x15){logger[_0x3f97[24]](_0x3f97[48],_0xe608x11);logger[_0x3f97[27]](_0x3f97[48],_0xe608x11,JSON[_0x3f97[26]](_0xe608x15));_0xe608x12(_0xe608x15)})[_0x3f97[22]](function(_0xe608x14){logger[_0x3f97[21]](_0x3f97[48],_0xe608x14[_0x3f97[29]],_0xe608x11);_0xe608x13(_0xe608x16[_0x3f97[21]](500,_0xe608x14[_0x3f97[29]]))})})}
\ No newline at end of file
+var _0xe699=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x47\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x69\x6E\x63\x6C\x75\x64\x65","\x6D\x6F\x64\x65\x6C","\x61\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65"];_0xe699[0];var _=require(_0xe699[1]);var util=require(_0xe699[2]);var moment=require(_0xe699[3]);var BPromise=require(_0xe699[4]);var rs=require(_0xe699[5]);var fs=require(_0xe699[6]);var db=require(_0xe699[8])[_0xe699[7]];var utils=require(_0xe699[9]);var logger=require(_0xe699[11])(_0xe699[10]);var config=require(_0xe699[12]);var jayson=require(_0xe699[13]);var client=jayson[_0xe699[15]][_0xe699[14]]({port:9002});var socket=require(_0xe699[17])({host:_0xe699[16],port:6379});require(_0xe699[19])[_0xe699[18]](socket);function respondWithRpcPromise(_0x87d7xf,_0x87d7x10,_0x87d7x11){return  new BPromise(function(_0x87d7x12,_0x87d7x13){return client[_0xe699[32]](_0x87d7xf,_0x87d7x11)[_0xe699[31]](function(_0x87d7x15){logger[_0xe699[24]](_0xe699[20],_0x87d7x10,_0xe699[23]);logger[_0xe699[27]](_0xe699[25],_0x87d7x10,_0xe699[23],JSON[_0xe699[26]](_0x87d7x15));if(_0x87d7x15[_0xe699[21]]){if(_0x87d7x15[_0xe699[21]][_0xe699[28]]=== 500){logger[_0xe699[21]](_0xe699[20],_0x87d7x10,_0x87d7x15[_0xe699[21]][_0xe699[29]]);return _0x87d7x13(_0x87d7x15[_0xe699[21]][_0xe699[29]])};logger[_0xe699[21]](_0xe699[20],_0x87d7x10,_0x87d7x15[_0xe699[21]][_0xe699[29]]);return _0x87d7x12(_0x87d7x15[_0xe699[21]][_0xe699[29]])}else {logger[_0xe699[24]](_0xe699[20],_0x87d7x10,_0xe699[23]);_0x87d7x12(_0x87d7x15[_0xe699[30]][_0xe699[29]])}})[_0xe699[22]](function(_0x87d7x14){logger[_0xe699[21]](_0xe699[20],_0x87d7x10,_0x87d7x14);_0x87d7x13(_0x87d7x14)})})}exports[_0xe699[33]]= function(_0x87d7x11){var _0x87d7x16=this;return  new Promise(function(_0x87d7x12,_0x87d7x13){return db[_0xe699[44]][_0xe699[43]]({raw:_0x87d7x11[_0xe699[34]]?(_0x87d7x11[_0xe699[34]][_0xe699[35]]=== undefined)?true:false:true,where:_0x87d7x11[_0xe699[34]]?_0x87d7x11[_0xe699[34]][_0xe699[36]]|| null:null,attributes:_0x87d7x11[_0xe699[34]]?_0x87d7x11[_0xe699[34]][_0xe699[37]]|| null:null,limit:_0x87d7x11[_0xe699[34]]?_0x87d7x11[_0xe699[34]][_0xe699[38]]|| null:null,include:_0x87d7x11[_0xe699[34]]?(_0x87d7x11[_0xe699[34]][_0xe699[39]]?_[_0xe699[42]](_0x87d7x11[_0xe699[34]][_0xe699[39]],function(_0x87d7x17){return {model:db[_0x87d7x17[_0xe699[40]]],as:_0x87d7x17[_0xe699[41]],attributes:_0x87d7x17[_0xe699[37]],include:_0x87d7x17[_0xe699[39]]?_[_0xe699[42]](_0x87d7x17[_0xe699[39]],function(_0x87d7x18){return {model:db[_0x87d7x18[_0xe699[40]]],as:_0x87d7x18[_0xe699[41]],attributes:_0x87d7x18[_0xe699[37]],include:_0x87d7x18[_0xe699[39]]?_[_0xe699[42]](_0x87d7x18[_0xe699[39]],function(_0x87d7x19){return {model:db[_0x87d7x19[_0xe699[40]]],as:_0x87d7x19[_0xe699[41]],attributes:_0x87d7x19[_0xe699[37]]}}):[]}}):[]}}):[]):[]})[_0xe699[31]](function(_0x87d7x15){logger[_0xe699[24]](_0xe699[33],_0x87d7x11);logger[_0xe699[27]](_0xe699[33],_0x87d7x11,JSON[_0xe699[26]](_0x87d7x15));_0x87d7x12(_0x87d7x15)})[_0xe699[22]](function(_0x87d7x14){logger[_0xe699[21]](_0xe699[33],_0x87d7x14[_0xe699[29]],_0x87d7x11);_0x87d7x13(_0x87d7x16[_0xe699[21]](500,_0x87d7x14[_0xe699[29]]))})})};exports[_0xe699[45]]= function(_0x87d7x11){var _0x87d7x16=this;return  new Promise(function(_0x87d7x12,_0x87d7x13){return db[_0xe699[44]][_0xe699[47]](_0x87d7x11[_0xe699[46]],{raw:_0x87d7x11[_0xe699[34]]?(_0x87d7x11[_0xe699[34]][_0xe699[35]]=== undefined)?true:false:true})[_0xe699[31]](function(_0x87d7x15){logger[_0xe699[24]](_0xe699[45],_0x87d7x11);logger[_0xe699[27]](_0xe699[45],_0x87d7x11,JSON[_0xe699[26]](_0x87d7x15));_0x87d7x12(_0x87d7x15)})[_0xe699[22]](function(_0x87d7x14){logger[_0xe699[21]](_0xe699[45],_0x87d7x14[_0xe699[29]],_0x87d7x11);_0x87d7x13(_0x87d7x16[_0xe699[21]](500,_0x87d7x14[_0xe699[29]]))})})};exports[_0xe699[48]]= function(_0x87d7x11){var _0x87d7x16=this;return  new Promise(function(_0x87d7x12,_0x87d7x13){return db[_0xe699[44]][_0xe699[49]](_0x87d7x11[_0xe699[46]],{raw:_0x87d7x11[_0xe699[34]]?(_0x87d7x11[_0xe699[34]][_0xe699[35]]=== undefined)?true:false:true,individualHooks:true,where:_0x87d7x11[_0xe699[34]]?_0x87d7x11[_0xe699[34]][_0xe699[36]]|| null:null,attributes:_0x87d7x11[_0xe699[34]]?_0x87d7x11[_0xe699[34]][_0xe699[37]]|| null:null,limit:_0x87d7x11[_0xe699[34]]?_0x87d7x11[_0xe699[34]][_0xe699[38]]|| null:null})[_0xe699[31]](function(_0x87d7x15){logger[_0xe699[24]](_0xe699[48],_0x87d7x11);logger[_0xe699[27]](_0xe699[48],_0x87d7x11,JSON[_0xe699[26]](_0x87d7x15));_0x87d7x12(_0x87d7x15)})[_0xe699[22]](function(_0x87d7x14){logger[_0xe699[21]](_0xe699[48],_0x87d7x14[_0xe699[29]],_0x87d7x11);_0x87d7x13(_0x87d7x16[_0xe699[21]](500,_0x87d7x14[_0xe699[29]]))})})}
\ No newline at end of file
index d6b1bd3..fd64be4 100644 (file)
@@ -1 +1 @@
-var _0x1dba=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x3A","\x6F\x6E"];_0x1dba[0];var VoiceQueueReportEvents=require(_0x1dba[1]);var events=[_0x1dba[2],_0x1dba[3],_0x1dba[4]];function createListener(_0x7c00x4,_0x7c00x5){return function(_0x7c00x6){_0x7c00x5[_0x1dba[5]](_0x7c00x4,_0x7c00x6)}}function removeListener(_0x7c00x4,_0x7c00x8){return function(){VoiceQueueReportEvents[_0x1dba[6]](_0x7c00x4,_0x7c00x8)}}exports[_0x1dba[7]]= function(_0x7c00x5){for(var _0x7c00x9=0,_0x7c00xa=events[_0x1dba[8]];_0x7c00x9< _0x7c00xa;_0x7c00x9++){var _0x7c00x4=events[_0x7c00x9];var _0x7c00x8=createListener(_0x1dba[9]+ _0x7c00x4,_0x7c00x5);VoiceQueueReportEvents[_0x1dba[10]](_0x7c00x4,_0x7c00x8)}}
\ No newline at end of file
+var _0xcc3c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x75\x70\x64\x61\x74\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x3A","\x6F\x6E"];_0xcc3c[0];var VoiceQueueReportEvents=require(_0xcc3c[1]);var events=[_0xcc3c[2],_0xcc3c[3],_0xcc3c[4]];function createListener(_0x2c83x4,_0x2c83x5){return function(_0x2c83x6){_0x2c83x5[_0xcc3c[5]](_0x2c83x4,_0x2c83x6)}}function removeListener(_0x2c83x4,_0x2c83x8){return function(){VoiceQueueReportEvents[_0xcc3c[6]](_0x2c83x4,_0x2c83x8)}}exports[_0xcc3c[7]]= function(_0x2c83x5){for(var _0x2c83x9=0,_0x2c83xa=events[_0xcc3c[8]];_0x2c83x9< _0x2c83xa;_0x2c83x9++){var _0x2c83x4=events[_0x2c83x9];var _0x2c83x8=createListener(_0xcc3c[9]+ _0x2c83x4,_0x2c83x5);VoiceQueueReportEvents[_0xcc3c[10]](_0x2c83x4,_0x2c83x8)}}
\ No newline at end of file
index 798c0f7..419483d 100644 (file)
@@ -1 +1 @@
-var _0x672c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x672c[0];var multer=require(_0x672c[1]);var util=require(_0x672c[2]);var path=require(_0x672c[3]);var express=require(_0x672c[4]);var router=express.Router();var auth=require(_0x672c[5]);var interaction=require(_0x672c[6]);var config=require(_0x672c[7]);var controller=require(_0x672c[8]);router[_0x672c[12]](_0x672c[9],auth[_0x672c[10]](),controller[_0x672c[11]]);router[_0x672c[12]](_0x672c[13],auth[_0x672c[10]](),controller[_0x672c[14]]);router[_0x672c[16]](_0x672c[9],auth[_0x672c[10]](),controller[_0x672c[15]]);router[_0x672c[18]](_0x672c[13],auth[_0x672c[10]](),controller[_0x672c[17]]);router[_0x672c[20]](_0x672c[13],auth[_0x672c[10]](),controller[_0x672c[19]]);module[_0x672c[21]]= router
\ No newline at end of file
+var _0x8a29=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x8a29[0];var multer=require(_0x8a29[1]);var util=require(_0x8a29[2]);var path=require(_0x8a29[3]);var express=require(_0x8a29[4]);var router=express.Router();var auth=require(_0x8a29[5]);var interaction=require(_0x8a29[6]);var config=require(_0x8a29[7]);var controller=require(_0x8a29[8]);router[_0x8a29[12]](_0x8a29[9],auth[_0x8a29[10]](),controller[_0x8a29[11]]);router[_0x8a29[12]](_0x8a29[13],auth[_0x8a29[10]](),controller[_0x8a29[14]]);router[_0x8a29[16]](_0x8a29[9],auth[_0x8a29[10]](),controller[_0x8a29[15]]);router[_0x8a29[18]](_0x8a29[13],auth[_0x8a29[10]](),controller[_0x8a29[17]]);router[_0x8a29[20]](_0x8a29[13],auth[_0x8a29[10]](),controller[_0x8a29[19]]);module[_0x8a29[21]]= router
\ No newline at end of file
index 78bd891..723a0a4 100644 (file)
@@ -1 +1 @@
-var _0xb4a6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","","\x44\x41\x54\x45","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74"];_0xb4a6[0];var Sequelize=require(_0xb4a6[1]);var moment=require(_0xb4a6[2]);module[_0xb4a6[3]]= {time:{type:Sequelize[_0xb4a6[4]]},callid:{type:Sequelize[_0xb4a6[4]],allowNull:false,defaultValue:_0xb4a6[5]},queuename:{type:Sequelize[_0xb4a6[4]],allowNull:false,defaultValue:_0xb4a6[5]},agent:{type:Sequelize[_0xb4a6[4]],allowNull:false,defaultValue:_0xb4a6[5]},event:{type:Sequelize[_0xb4a6[4]],allowNull:false,defaultValue:_0xb4a6[5]},data1:{type:Sequelize[_0xb4a6[4]],allowNull:false,defaultValue:_0xb4a6[5]},data2:{type:Sequelize[_0xb4a6[4]],allowNull:false,defaultValue:_0xb4a6[5]},data3:{type:Sequelize[_0xb4a6[4]],allowNull:false,defaultValue:_0xb4a6[5]},data4:{type:Sequelize[_0xb4a6[4]],allowNull:false,defaultValue:_0xb4a6[5]},data5:{type:Sequelize[_0xb4a6[4]],allowNull:false,defaultValue:_0xb4a6[5]},dtm:{type:Sequelize[_0xb4a6[6]],allowNull:false,defaultValue:moment()[_0xb4a6[8]](_0xb4a6[7])}}
\ No newline at end of file
+var _0x1213=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x54\x52\x49\x4E\x47","","\x44\x41\x54\x45","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74"];_0x1213[0];var Sequelize=require(_0x1213[1]);var moment=require(_0x1213[2]);module[_0x1213[3]]= {time:{type:Sequelize[_0x1213[4]]},callid:{type:Sequelize[_0x1213[4]],allowNull:false,defaultValue:_0x1213[5]},queuename:{type:Sequelize[_0x1213[4]],allowNull:false,defaultValue:_0x1213[5]},agent:{type:Sequelize[_0x1213[4]],allowNull:false,defaultValue:_0x1213[5]},event:{type:Sequelize[_0x1213[4]],allowNull:false,defaultValue:_0x1213[5]},data1:{type:Sequelize[_0x1213[4]],allowNull:false,defaultValue:_0x1213[5]},data2:{type:Sequelize[_0x1213[4]],allowNull:false,defaultValue:_0x1213[5]},data3:{type:Sequelize[_0x1213[4]],allowNull:false,defaultValue:_0x1213[5]},data4:{type:Sequelize[_0x1213[4]],allowNull:false,defaultValue:_0x1213[5]},data5:{type:Sequelize[_0x1213[4]],allowNull:false,defaultValue:_0x1213[5]},dtm:{type:Sequelize[_0x1213[6]],allowNull:false,defaultValue:moment()[_0x1213[8]](_0x1213[7])}}
\ No newline at end of file
index 035e0f2..169e9a7 100644 (file)
@@ -1 +1 @@
-var _0x5998=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x5998[0];var jsonpatch=require(_0x5998[1]);var rp=require(_0x5998[2]);var moment=require(_0x5998[3]);var BPromise=require(_0x5998[4]);var Mustache=require(_0x5998[5]);var util=require(_0x5998[6]);var path=require(_0x5998[7]);var sox=require(_0x5998[8]);var csv=require(_0x5998[9]);var ejs=require(_0x5998[10]);var fs=require(_0x5998[11]);var _=require(_0x5998[12]);var squel=require(_0x5998[13]);var crypto=require(_0x5998[14]);var jsforce=require(_0x5998[15]);var deskjs=require(_0x5998[16]);var toCsv=require(_0x5998[9]);var querystring=require(_0x5998[17]);var Papa=require(_0x5998[18]);var qs=require(_0x5998[19]);var logger=require(_0x5998[21])(_0x5998[20]);var utils=require(_0x5998[22]);var config=require(_0x5998[23]);var db=require(_0x5998[25])[_0x5998[24]];function respondWithStatusCode(_0x90a1x1a,_0x90a1x1b){_0x90a1x1b= _0x90a1x1b|| 204;return function(_0x90a1x1c){if(_0x90a1x1c){return _0x90a1x1a[_0x5998[26]](_0x90a1x1b)};return _0x90a1x1a[_0x5998[28]](_0x90a1x1b)[_0x5998[27]]()}}function respondWithResult(_0x90a1x1a,_0x90a1x1b){_0x90a1x1b= _0x90a1x1b|| 200;return function(_0x90a1x1c){if(_0x90a1x1c){return _0x90a1x1a[_0x5998[28]](_0x90a1x1b)[_0x5998[29]](_0x90a1x1c)}}}function respondWithFilteredResult(_0x90a1x1a,_0x90a1x1f){return function(_0x90a1x1c){if(_0x90a1x1c){var _0x90a1x20=_0x90a1x1c[_0x5998[30]],_0x90a1x21=_0x90a1x1f[_0x5998[31]],_0x90a1x22=_0x90a1x1f[_0x5998[31]]+ _0x90a1x1f[_0x5998[32]],_0x90a1x1b;if(_0x90a1x22>= _0x90a1x20){_0x90a1x22= _0x90a1x20;_0x90a1x1b= 200}else {_0x90a1x1b= 206};_0x90a1x1a[_0x5998[28]](_0x90a1x1b);return _0x90a1x1a[_0x5998[36]](_0x5998[33],_0x90a1x21+ _0x5998[34]+ _0x90a1x22+ _0x5998[35]+ _0x90a1x20)[_0x5998[29]](_0x90a1x1c)};return null}}function patchUpdates(_0x90a1x24){return function(_0x90a1x1c){try{jsonpatch[_0x5998[37]](_0x90a1x1c,_0x90a1x24,true)}catch(err){return BPromise[_0x5998[38]](err)};return _0x90a1x1c[_0x5998[39]]()}}function saveUpdates(_0x90a1x26,_0x90a1x1b){return function(_0x90a1x1c){if(_0x90a1x1c){return _0x90a1x1c[_0x5998[41]](_0x90a1x26)[_0x5998[40]](function(_0x90a1x27){return _0x90a1x27})};return null}}function removeEntity(_0x90a1x1a,_0x90a1x1b){return function(_0x90a1x1c){if(_0x90a1x1c){return _0x90a1x1c[_0x5998[42]]()[_0x5998[40]](function(){_0x90a1x1a[_0x5998[28]](204)[_0x5998[27]]()})}}}function handleEntityNotFound(_0x90a1x1a,_0x90a1x1b){return function(_0x90a1x1c){if(!_0x90a1x1c){_0x90a1x1a[_0x5998[26]](404)};return _0x90a1x1c}}function handleError(_0x90a1x1a,_0x90a1x1b){_0x90a1x1b= _0x90a1x1b|| 500;return function(_0x90a1x2b){logger[_0x5998[44]](_0x90a1x2b[_0x5998[43]]);if(_0x90a1x2b[_0x5998[45]]){delete _0x90a1x2b[_0x5998[45]]};_0x90a1x1a[_0x5998[28]](_0x90a1x1b)[_0x5998[46]](_0x90a1x2b)}}exports[_0x5998[47]]= function(_0x90a1x2c,_0x90a1x1a){var _0x90a1x1f={},_0x90a1x2d={},_0x90a1x2e={count:0,rows:[]};_0x90a1x2d[_0x5998[48]]= _[_0x5998[51]](db[_0x5998[50]][_0x5998[49]]);var _0x90a1x2f={dateStart:_0x90a1x2c[_0x5998[53]][_0x5998[52]],dateEnd:_0x90a1x2c[_0x5998[53]][_0x5998[54]]};delete _0x90a1x2c[_0x5998[53]][_0x5998[52]];delete _0x90a1x2c[_0x5998[53]][_0x5998[54]];_0x90a1x2d[_0x5998[53]]= _[_0x5998[51]](_0x90a1x2c[_0x5998[53]]);_0x90a1x2d[_0x5998[55]]= _[_0x5998[56]](_0x90a1x2d[_0x5998[48]],_0x90a1x2d[_0x5998[53]]);_0x90a1x1f[_0x5998[57]]= _[_0x5998[56]](_0x90a1x2d[_0x5998[48]],qs[_0x5998[58]](_0x90a1x2c[_0x5998[53]][_0x5998[58]]));_0x90a1x1f[_0x5998[57]]= (_0x90a1x1f[_0x5998[57]][_0x5998[59]])?_0x90a1x1f[_0x5998[57]]:_0x90a1x2d[_0x5998[48]];if(!_0x90a1x2c[_0x5998[53]][_0x5998[61]](_0x5998[60])){_0x90a1x1f[_0x5998[32]]= qs[_0x5998[32]](_0x90a1x2c[_0x5998[53]][_0x5998[32]]);_0x90a1x1f[_0x5998[31]]= qs[_0x5998[31]](_0x90a1x2c[_0x5998[53]][_0x5998[31]])};_0x90a1x1f[_0x5998[62]]= qs[_0x5998[63]](_0x90a1x2c[_0x5998[53]][_0x5998[63]]);_0x90a1x1f[_0x5998[64]]= qs[_0x5998[55]](_[_0x5998[65]](_0x90a1x2c[_0x5998[53]],_0x90a1x2d[_0x5998[55]]));if(_0x90a1x2f[_0x5998[52]]){if(_0x90a1x2f[_0x5998[54]]){_0x90a1x2f[_0x5998[54]]= moment(_0x90a1x2f[_0x5998[54]])[_0x5998[67]](1,_0x5998[66])}else {_0x90a1x2f[_0x5998[54]]= moment(_0x90a1x2f[_0x5998[52]])[_0x5998[67]](1,_0x5998[66])};_[_0x5998[68]](_0x90a1x1f[_0x5998[64]],{createdAt:{$gte:_0x90a1x2f[_0x5998[52]],$lte:_0x90a1x2f[_0x5998[54]]}})};if(_0x90a1x2c[_0x5998[53]][_0x5998[69]]){_0x90a1x1f[_0x5998[64]]= _[_0x5998[68]](_0x90a1x1f[_0x5998[64]],{$or:_[_0x5998[71]](_0x90a1x1f[_0x5998[57]],function(_0x90a1x30){var _0x90a1x2e={};_0x90a1x2e[_0x90a1x30]= {$like:_0x5998[70]+ _0x90a1x2c[_0x5998[53]][_0x5998[69]]+ _0x5998[70]};return _0x90a1x2e})})};_0x90a1x1f= _[_0x5998[68]]({},_0x90a1x1f,_0x90a1x2c[_0x5998[72]]);var _0x90a1x31={where:_0x90a1x1f[_0x5998[64]]};return db[_0x5998[50]][_0x5998[30]](_0x90a1x31)[_0x5998[40]](function(_0x90a1x20){_0x90a1x2e[_0x5998[30]]= _0x90a1x20;if(_0x90a1x2c[_0x5998[53]][_0x5998[75]]){_0x90a1x1f[_0x5998[76]]= [{all:true}]};return db[_0x5998[50]][_0x5998[77]](_0x90a1x1f)})[_0x5998[40]](function(_0x90a1x32){_0x90a1x2e[_0x5998[74]]= _0x90a1x32;return _0x90a1x2e})[_0x5998[40]](respondWithFilteredResult(_0x90a1x1a,_0x90a1x1f))[_0x5998[73]](handleError(_0x90a1x1a,null))};exports[_0x5998[78]]= function(_0x90a1x2c,_0x90a1x1a){var _0x90a1x1f={raw:true,where:{id:_0x90a1x2c[_0x5998[80]][_0x5998[79]]}},_0x90a1x2d={};_0x90a1x2d[_0x5998[48]]= _[_0x5998[51]](db[_0x5998[50]][_0x5998[49]]);_0x90a1x2d[_0x5998[53]]= _[_0x5998[51]](_0x90a1x2c[_0x5998[53]]);_0x90a1x2d[_0x5998[55]]= _[_0x5998[56]](_0x90a1x2d[_0x5998[48]],_0x90a1x2d[_0x5998[53]]);_0x90a1x1f[_0x5998[57]]= _[_0x5998[56]](_0x90a1x2d[_0x5998[48]],qs[_0x5998[58]](_0x90a1x2c[_0x5998[53]][_0x5998[58]]));_0x90a1x1f[_0x5998[57]]= (_0x90a1x1f[_0x5998[57]][_0x5998[59]])?_0x90a1x1f[_0x5998[57]]:_0x90a1x2d[_0x5998[48]];if(_0x90a1x2c[_0x5998[53]][_0x5998[75]]){_0x90a1x1f[_0x5998[76]]= [{all:true}]};_0x90a1x1f= _[_0x5998[68]]({},_0x90a1x1f,_0x90a1x2c[_0x5998[72]]);return db[_0x5998[50]][_0x5998[81]](_0x90a1x1f)[_0x5998[40]](handleEntityNotFound(_0x90a1x1a,null))[_0x5998[40]](respondWithResult(_0x90a1x1a,null))[_0x5998[73]](handleError(_0x90a1x1a,null))};exports[_0x5998[82]]= function(_0x90a1x2c,_0x90a1x1a){return db[_0x5998[50]][_0x5998[82]](_0x90a1x2c[_0x5998[83]],{})[_0x5998[40]](respondWithResult(_0x90a1x1a,201))[_0x5998[73]](handleError(_0x90a1x1a,null))};exports[_0x5998[41]]= function(_0x90a1x2c,_0x90a1x1a){if(_0x90a1x2c[_0x5998[83]][_0x5998[79]]){delete _0x90a1x2c[_0x5998[83]][_0x5998[79]]};return db[_0x5998[50]][_0x5998[81]]({where:{id:_0x90a1x2c[_0x5998[80]][_0x5998[79]]}})[_0x5998[40]](handleEntityNotFound(_0x90a1x1a,null))[_0x5998[40]](saveUpdates(_0x90a1x2c[_0x5998[83]],null))[_0x5998[40]](respondWithResult(_0x90a1x1a,null))[_0x5998[73]](handleError(_0x90a1x1a,null))};exports[_0x5998[42]]= function(_0x90a1x2c,_0x90a1x1a){return db[_0x5998[50]][_0x5998[81]]({where:{id:_0x90a1x2c[_0x5998[80]][_0x5998[79]]}})[_0x5998[40]](handleEntityNotFound(_0x90a1x1a,null))[_0x5998[40]](removeEntity(_0x90a1x1a,null))[_0x5998[73]](handleError(_0x90a1x1a,null))}
\ No newline at end of file
+var _0x55eb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x55eb[0];var jsonpatch=require(_0x55eb[1]);var rp=require(_0x55eb[2]);var moment=require(_0x55eb[3]);var BPromise=require(_0x55eb[4]);var Mustache=require(_0x55eb[5]);var util=require(_0x55eb[6]);var path=require(_0x55eb[7]);var sox=require(_0x55eb[8]);var csv=require(_0x55eb[9]);var ejs=require(_0x55eb[10]);var fs=require(_0x55eb[11]);var _=require(_0x55eb[12]);var squel=require(_0x55eb[13]);var crypto=require(_0x55eb[14]);var jsforce=require(_0x55eb[15]);var deskjs=require(_0x55eb[16]);var toCsv=require(_0x55eb[9]);var querystring=require(_0x55eb[17]);var Papa=require(_0x55eb[18]);var qs=require(_0x55eb[19]);var logger=require(_0x55eb[21])(_0x55eb[20]);var utils=require(_0x55eb[22]);var config=require(_0x55eb[23]);var db=require(_0x55eb[25])[_0x55eb[24]];function respondWithStatusCode(_0x2aeax1a,_0x2aeax1b){_0x2aeax1b= _0x2aeax1b|| 204;return function(_0x2aeax1c){if(_0x2aeax1c){return _0x2aeax1a[_0x55eb[26]](_0x2aeax1b)};return _0x2aeax1a[_0x55eb[28]](_0x2aeax1b)[_0x55eb[27]]()}}function respondWithResult(_0x2aeax1a,_0x2aeax1b){_0x2aeax1b= _0x2aeax1b|| 200;return function(_0x2aeax1c){if(_0x2aeax1c){return _0x2aeax1a[_0x55eb[28]](_0x2aeax1b)[_0x55eb[29]](_0x2aeax1c)}}}function respondWithFilteredResult(_0x2aeax1a,_0x2aeax1f){return function(_0x2aeax1c){if(_0x2aeax1c){var _0x2aeax20=_0x2aeax1c[_0x55eb[30]],_0x2aeax21=_0x2aeax1f[_0x55eb[31]],_0x2aeax22=_0x2aeax1f[_0x55eb[31]]+ _0x2aeax1f[_0x55eb[32]],_0x2aeax1b;if(_0x2aeax22>= _0x2aeax20){_0x2aeax22= _0x2aeax20;_0x2aeax1b= 200}else {_0x2aeax1b= 206};_0x2aeax1a[_0x55eb[28]](_0x2aeax1b);return _0x2aeax1a[_0x55eb[36]](_0x55eb[33],_0x2aeax21+ _0x55eb[34]+ _0x2aeax22+ _0x55eb[35]+ _0x2aeax20)[_0x55eb[29]](_0x2aeax1c)};return null}}function patchUpdates(_0x2aeax24){return function(_0x2aeax1c){try{jsonpatch[_0x55eb[37]](_0x2aeax1c,_0x2aeax24,true)}catch(err){return BPromise[_0x55eb[38]](err)};return _0x2aeax1c[_0x55eb[39]]()}}function saveUpdates(_0x2aeax26,_0x2aeax1b){return function(_0x2aeax1c){if(_0x2aeax1c){return _0x2aeax1c[_0x55eb[41]](_0x2aeax26)[_0x55eb[40]](function(_0x2aeax27){return _0x2aeax27})};return null}}function removeEntity(_0x2aeax1a,_0x2aeax1b){return function(_0x2aeax1c){if(_0x2aeax1c){return _0x2aeax1c[_0x55eb[42]]()[_0x55eb[40]](function(){_0x2aeax1a[_0x55eb[28]](204)[_0x55eb[27]]()})}}}function handleEntityNotFound(_0x2aeax1a,_0x2aeax1b){return function(_0x2aeax1c){if(!_0x2aeax1c){_0x2aeax1a[_0x55eb[26]](404)};return _0x2aeax1c}}function handleError(_0x2aeax1a,_0x2aeax1b){_0x2aeax1b= _0x2aeax1b|| 500;return function(_0x2aeax2b){logger[_0x55eb[44]](_0x2aeax2b[_0x55eb[43]]);if(_0x2aeax2b[_0x55eb[45]]){delete _0x2aeax2b[_0x55eb[45]]};_0x2aeax1a[_0x55eb[28]](_0x2aeax1b)[_0x55eb[46]](_0x2aeax2b)}}exports[_0x55eb[47]]= function(_0x2aeax2c,_0x2aeax1a){var _0x2aeax1f={},_0x2aeax2d={},_0x2aeax2e={count:0,rows:[]};_0x2aeax2d[_0x55eb[48]]= _[_0x55eb[51]](db[_0x55eb[50]][_0x55eb[49]]);var _0x2aeax2f={dateStart:_0x2aeax2c[_0x55eb[53]][_0x55eb[52]],dateEnd:_0x2aeax2c[_0x55eb[53]][_0x55eb[54]]};delete _0x2aeax2c[_0x55eb[53]][_0x55eb[52]];delete _0x2aeax2c[_0x55eb[53]][_0x55eb[54]];_0x2aeax2d[_0x55eb[53]]= _[_0x55eb[51]](_0x2aeax2c[_0x55eb[53]]);_0x2aeax2d[_0x55eb[55]]= _[_0x55eb[56]](_0x2aeax2d[_0x55eb[48]],_0x2aeax2d[_0x55eb[53]]);_0x2aeax1f[_0x55eb[57]]= _[_0x55eb[56]](_0x2aeax2d[_0x55eb[48]],qs[_0x55eb[58]](_0x2aeax2c[_0x55eb[53]][_0x55eb[58]]));_0x2aeax1f[_0x55eb[57]]= (_0x2aeax1f[_0x55eb[57]][_0x55eb[59]])?_0x2aeax1f[_0x55eb[57]]:_0x2aeax2d[_0x55eb[48]];if(!_0x2aeax2c[_0x55eb[53]][_0x55eb[61]](_0x55eb[60])){_0x2aeax1f[_0x55eb[32]]= qs[_0x55eb[32]](_0x2aeax2c[_0x55eb[53]][_0x55eb[32]]);_0x2aeax1f[_0x55eb[31]]= qs[_0x55eb[31]](_0x2aeax2c[_0x55eb[53]][_0x55eb[31]])};_0x2aeax1f[_0x55eb[62]]= qs[_0x55eb[63]](_0x2aeax2c[_0x55eb[53]][_0x55eb[63]]);_0x2aeax1f[_0x55eb[64]]= qs[_0x55eb[55]](_[_0x55eb[65]](_0x2aeax2c[_0x55eb[53]],_0x2aeax2d[_0x55eb[55]]));if(_0x2aeax2f[_0x55eb[52]]){if(_0x2aeax2f[_0x55eb[54]]){_0x2aeax2f[_0x55eb[54]]= moment(_0x2aeax2f[_0x55eb[54]])[_0x55eb[67]](1,_0x55eb[66])}else {_0x2aeax2f[_0x55eb[54]]= moment(_0x2aeax2f[_0x55eb[52]])[_0x55eb[67]](1,_0x55eb[66])};_[_0x55eb[68]](_0x2aeax1f[_0x55eb[64]],{createdAt:{$gte:_0x2aeax2f[_0x55eb[52]],$lte:_0x2aeax2f[_0x55eb[54]]}})};if(_0x2aeax2c[_0x55eb[53]][_0x55eb[69]]){_0x2aeax1f[_0x55eb[64]]= _[_0x55eb[68]](_0x2aeax1f[_0x55eb[64]],{$or:_[_0x55eb[71]](_0x2aeax1f[_0x55eb[57]],function(_0x2aeax30){var _0x2aeax2e={};_0x2aeax2e[_0x2aeax30]= {$like:_0x55eb[70]+ _0x2aeax2c[_0x55eb[53]][_0x55eb[69]]+ _0x55eb[70]};return _0x2aeax2e})})};_0x2aeax1f= _[_0x55eb[68]]({},_0x2aeax1f,_0x2aeax2c[_0x55eb[72]]);var _0x2aeax31={where:_0x2aeax1f[_0x55eb[64]]};return db[_0x55eb[50]][_0x55eb[30]](_0x2aeax31)[_0x55eb[40]](function(_0x2aeax20){_0x2aeax2e[_0x55eb[30]]= _0x2aeax20;if(_0x2aeax2c[_0x55eb[53]][_0x55eb[75]]){_0x2aeax1f[_0x55eb[76]]= [{all:true}]};return db[_0x55eb[50]][_0x55eb[77]](_0x2aeax1f)})[_0x55eb[40]](function(_0x2aeax32){_0x2aeax2e[_0x55eb[74]]= _0x2aeax32;return _0x2aeax2e})[_0x55eb[40]](respondWithFilteredResult(_0x2aeax1a,_0x2aeax1f))[_0x55eb[73]](handleError(_0x2aeax1a,null))};exports[_0x55eb[78]]= function(_0x2aeax2c,_0x2aeax1a){var _0x2aeax1f={raw:true,where:{id:_0x2aeax2c[_0x55eb[80]][_0x55eb[79]]}},_0x2aeax2d={};_0x2aeax2d[_0x55eb[48]]= _[_0x55eb[51]](db[_0x55eb[50]][_0x55eb[49]]);_0x2aeax2d[_0x55eb[53]]= _[_0x55eb[51]](_0x2aeax2c[_0x55eb[53]]);_0x2aeax2d[_0x55eb[55]]= _[_0x55eb[56]](_0x2aeax2d[_0x55eb[48]],_0x2aeax2d[_0x55eb[53]]);_0x2aeax1f[_0x55eb[57]]= _[_0x55eb[56]](_0x2aeax2d[_0x55eb[48]],qs[_0x55eb[58]](_0x2aeax2c[_0x55eb[53]][_0x55eb[58]]));_0x2aeax1f[_0x55eb[57]]= (_0x2aeax1f[_0x55eb[57]][_0x55eb[59]])?_0x2aeax1f[_0x55eb[57]]:_0x2aeax2d[_0x55eb[48]];if(_0x2aeax2c[_0x55eb[53]][_0x55eb[75]]){_0x2aeax1f[_0x55eb[76]]= [{all:true}]};_0x2aeax1f= _[_0x55eb[68]]({},_0x2aeax1f,_0x2aeax2c[_0x55eb[72]]);return db[_0x55eb[50]][_0x55eb[81]](_0x2aeax1f)[_0x55eb[40]](handleEntityNotFound(_0x2aeax1a,null))[_0x55eb[40]](respondWithResult(_0x2aeax1a,null))[_0x55eb[73]](handleError(_0x2aeax1a,null))};exports[_0x55eb[82]]= function(_0x2aeax2c,_0x2aeax1a){return db[_0x55eb[50]][_0x55eb[82]](_0x2aeax2c[_0x55eb[83]],{})[_0x55eb[40]](respondWithResult(_0x2aeax1a,201))[_0x55eb[73]](handleError(_0x2aeax1a,null))};exports[_0x55eb[41]]= function(_0x2aeax2c,_0x2aeax1a){if(_0x2aeax2c[_0x55eb[83]][_0x55eb[79]]){delete _0x2aeax2c[_0x55eb[83]][_0x55eb[79]]};return db[_0x55eb[50]][_0x55eb[81]]({where:{id:_0x2aeax2c[_0x55eb[80]][_0x55eb[79]]}})[_0x55eb[40]](handleEntityNotFound(_0x2aeax1a,null))[_0x55eb[40]](saveUpdates(_0x2aeax2c[_0x55eb[83]],null))[_0x55eb[40]](respondWithResult(_0x2aeax1a,null))[_0x55eb[73]](handleError(_0x2aeax1a,null))};exports[_0x55eb[42]]= function(_0x2aeax2c,_0x2aeax1a){return db[_0x55eb[50]][_0x55eb[81]]({where:{id:_0x2aeax2c[_0x55eb[80]][_0x55eb[79]]}})[_0x55eb[40]](handleEntityNotFound(_0x2aeax1a,null))[_0x55eb[40]](removeEntity(_0x2aeax1a,null))[_0x55eb[73]](handleError(_0x2aeax1a,null))}
\ No newline at end of file
index 8a110fc..e931b1e 100644 (file)
@@ -1 +1 @@
-var _0x3ba1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73\x5F\x6C\x6F\x67","\x65\x76\x65\x6E\x74\x5F\x64\x74\x6D","\x65\x76\x65\x6E\x74","\x64\x74\x6D","\x64\x65\x66\x69\x6E\x65"];_0x3ba1[0];var _=require(_0x3ba1[1]);var util=require(_0x3ba1[2]);var logger=require(_0x3ba1[4])(_0x3ba1[3]);var moment=require(_0x3ba1[5]);var BPromise=require(_0x3ba1[6]);var rp=require(_0x3ba1[7]);var attributes=require(_0x3ba1[8]);module[_0x3ba1[9]]= function(_0x8e47x8,_0x8e47x9){return _0x8e47x8[_0x3ba1[15]](_0x3ba1[10],attributes,{tableName:_0x3ba1[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x3ba1[12],"\x66\x69\x65\x6C\x64\x73":[_0x3ba1[13],_0x3ba1[14]]}],timestamps:false})}
\ No newline at end of file
+var _0x7573=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73\x5F\x6C\x6F\x67","\x65\x76\x65\x6E\x74\x5F\x64\x74\x6D","\x65\x76\x65\x6E\x74","\x64\x74\x6D","\x64\x65\x66\x69\x6E\x65"];_0x7573[0];var _=require(_0x7573[1]);var util=require(_0x7573[2]);var logger=require(_0x7573[4])(_0x7573[3]);var moment=require(_0x7573[5]);var BPromise=require(_0x7573[6]);var rp=require(_0x7573[7]);var attributes=require(_0x7573[8]);module[_0x7573[9]]= function(_0xfcb3x8,_0xfcb3x9){return _0xfcb3x8[_0x7573[15]](_0x7573[10],attributes,{tableName:_0x7573[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0x7573[12],"\x66\x69\x65\x6C\x64\x73":[_0x7573[13],_0x7573[14]]}],timestamps:false})}
\ No newline at end of file
index 025c4af..b1e5fca 100644 (file)
@@ -1 +1 @@
-var _0x2bef=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0x2bef[0];var _=require(_0x2bef[1]);var util=require(_0x2bef[2]);var moment=require(_0x2bef[3]);var BPromise=require(_0x2bef[4]);var rs=require(_0x2bef[5]);var fs=require(_0x2bef[6]);var db=require(_0x2bef[8])[_0x2bef[7]];var utils=require(_0x2bef[9]);var logger=require(_0x2bef[11])(_0x2bef[10]);var config=require(_0x2bef[12]);var jayson=require(_0x2bef[13]);var client=jayson[_0x2bef[15]][_0x2bef[14]]({port:9002});function respondWithRpcPromise(_0x92e5xe,_0x92e5xf,_0x92e5x10){return  new BPromise(function(_0x92e5x11,_0x92e5x12){return client[_0x2bef[28]](_0x92e5xe,_0x92e5x10)[_0x2bef[27]](function(_0x92e5x14){logger[_0x2bef[20]](_0x2bef[16],_0x92e5xf,_0x2bef[19]);logger[_0x2bef[23]](_0x2bef[21],_0x92e5xf,_0x2bef[19],JSON[_0x2bef[22]](_0x92e5x14));if(_0x92e5x14[_0x2bef[17]]){if(_0x92e5x14[_0x2bef[17]][_0x2bef[24]]=== 500){logger[_0x2bef[17]](_0x2bef[16],_0x92e5xf,_0x92e5x14[_0x2bef[17]][_0x2bef[25]]);return _0x92e5x12(_0x92e5x14[_0x2bef[17]][_0x2bef[25]])};logger[_0x2bef[17]](_0x2bef[16],_0x92e5xf,_0x92e5x14[_0x2bef[17]][_0x2bef[25]]);return _0x92e5x11(_0x92e5x14[_0x2bef[17]][_0x2bef[25]])}else {logger[_0x2bef[20]](_0x2bef[16],_0x92e5xf,_0x2bef[19]);_0x92e5x11(_0x92e5x14[_0x2bef[26]][_0x2bef[25]])}})[_0x2bef[18]](function(_0x92e5x13){logger[_0x2bef[17]](_0x2bef[16],_0x92e5xf,_0x92e5x13);_0x92e5x12(_0x92e5x13)})})}
\ No newline at end of file
+var _0xd694=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74"];_0xd694[0];var _=require(_0xd694[1]);var util=require(_0xd694[2]);var moment=require(_0xd694[3]);var BPromise=require(_0xd694[4]);var rs=require(_0xd694[5]);var fs=require(_0xd694[6]);var db=require(_0xd694[8])[_0xd694[7]];var utils=require(_0xd694[9]);var logger=require(_0xd694[11])(_0xd694[10]);var config=require(_0xd694[12]);var jayson=require(_0xd694[13]);var client=jayson[_0xd694[15]][_0xd694[14]]({port:9002});function respondWithRpcPromise(_0x96fbxe,_0x96fbxf,_0x96fbx10){return  new BPromise(function(_0x96fbx11,_0x96fbx12){return client[_0xd694[28]](_0x96fbxe,_0x96fbx10)[_0xd694[27]](function(_0x96fbx14){logger[_0xd694[20]](_0xd694[16],_0x96fbxf,_0xd694[19]);logger[_0xd694[23]](_0xd694[21],_0x96fbxf,_0xd694[19],JSON[_0xd694[22]](_0x96fbx14));if(_0x96fbx14[_0xd694[17]]){if(_0x96fbx14[_0xd694[17]][_0xd694[24]]=== 500){logger[_0xd694[17]](_0xd694[16],_0x96fbxf,_0x96fbx14[_0xd694[17]][_0xd694[25]]);return _0x96fbx12(_0x96fbx14[_0xd694[17]][_0xd694[25]])};logger[_0xd694[17]](_0xd694[16],_0x96fbxf,_0x96fbx14[_0xd694[17]][_0xd694[25]]);return _0x96fbx11(_0x96fbx14[_0xd694[17]][_0xd694[25]])}else {logger[_0xd694[20]](_0xd694[16],_0x96fbxf,_0xd694[19]);_0x96fbx11(_0x96fbx14[_0xd694[26]][_0xd694[25]])}})[_0xd694[18]](function(_0x96fbx13){logger[_0xd694[17]](_0xd694[16],_0x96fbxf,_0x96fbx13);_0x96fbx12(_0x96fbx13)})})}
\ No newline at end of file
index 8ab9801..3f216a2 100644 (file)
@@ -1 +1 @@
-var _0xf625=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x73","\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf625[0];var multer=require(_0xf625[1]);var util=require(_0xf625[2]);var path=require(_0xf625[3]);var express=require(_0xf625[4]);var router=express.Router();var auth=require(_0xf625[5]);var interaction=require(_0xf625[6]);var config=require(_0xf625[7]);var controller=require(_0xf625[8]);router[_0xf625[12]](_0xf625[9],auth[_0xf625[10]](),controller[_0xf625[11]]);router[_0xf625[12]](_0xf625[13],auth[_0xf625[10]](),controller[_0xf625[14]]);router[_0xf625[12]](_0xf625[15],auth[_0xf625[10]](),controller[_0xf625[16]]);router[_0xf625[12]](_0xf625[17],auth[_0xf625[10]](),controller[_0xf625[18]]);router[_0xf625[12]](_0xf625[19],controller[_0xf625[20]]);router[_0xf625[22]](_0xf625[9],auth[_0xf625[10]](),controller[_0xf625[21]]);router[_0xf625[24]](_0xf625[15],auth[_0xf625[10]](),controller[_0xf625[23]]);router[_0xf625[26]](_0xf625[15],auth[_0xf625[10]](),controller[_0xf625[25]]);module[_0xf625[27]]= router
\ No newline at end of file
+var _0x5d7d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x73","\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x5d7d[0];var multer=require(_0x5d7d[1]);var util=require(_0x5d7d[2]);var path=require(_0x5d7d[3]);var express=require(_0x5d7d[4]);var router=express.Router();var auth=require(_0x5d7d[5]);var interaction=require(_0x5d7d[6]);var config=require(_0x5d7d[7]);var controller=require(_0x5d7d[8]);router[_0x5d7d[12]](_0x5d7d[9],auth[_0x5d7d[10]](),controller[_0x5d7d[11]]);router[_0x5d7d[12]](_0x5d7d[13],auth[_0x5d7d[10]](),controller[_0x5d7d[14]]);router[_0x5d7d[12]](_0x5d7d[15],auth[_0x5d7d[10]](),controller[_0x5d7d[16]]);router[_0x5d7d[12]](_0x5d7d[17],auth[_0x5d7d[10]](),controller[_0x5d7d[18]]);router[_0x5d7d[12]](_0x5d7d[19],controller[_0x5d7d[20]]);router[_0x5d7d[22]](_0x5d7d[9],auth[_0x5d7d[10]](),controller[_0x5d7d[21]]);router[_0x5d7d[24]](_0x5d7d[15],auth[_0x5d7d[10]](),controller[_0x5d7d[23]]);router[_0x5d7d[26]](_0x5d7d[15],auth[_0x5d7d[10]](),controller[_0x5d7d[25]]);module[_0x5d7d[27]]= router
\ No newline at end of file
index 356c199..9a6c66d 100644 (file)
@@ -1 +1 @@
-var _0x9241=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x70\x61\x74\x68","\x65\x78\x70\x6F\x72\x74\x73","\x56\x49\x52\x54\x55\x41\x4C","\x76\x61\x6C\x75\x65","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x53\x54\x52\x49\x4E\x47","\x63\x68\x61\x6E\x6E\x65\x6C","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x73\x70\x6C\x69\x74","\x49\x4E\x54\x45\x47\x45\x52","\x44\x41\x54\x45","\x4D\x4D\x2D\x44\x44\x2D\x59\x59\x59\x59\x20\x48\x48\x3A\x6D\x6D","\x66\x6F\x72\x6D\x61\x74","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74"];_0x9241[0];var Sequelize=require(_0x9241[1]);var moment=require(_0x9241[2]);var path=require(_0x9241[3]);module[_0x9241[4]]= {format:{type:Sequelize[_0x9241[5]],get:function(){return this[_0x9241[7]](_0x9241[6])?path[_0x9241[8]](this[_0x9241[7]](_0x9241[6])):undefined}},uniqueid:{type:Sequelize[_0x9241[9]]},channel:{type:Sequelize[_0x9241[9]],set:function(_0x4fb6x4){if(_0x4fb6x4){this[_0x9241[11]](_0x9241[10],_0x4fb6x4);this[_0x9241[11]](_0x9241[12],_0x4fb6x4[_0x9241[13]](/\/|-/)[1])}}},membername:{type:Sequelize[_0x9241[9]]},calleridnum:{type:Sequelize[_0x9241[9]]},calleridname:{type:Sequelize[_0x9241[9]]},connectedlinenum:{type:Sequelize[_0x9241[9]]},connectedlinename:{type:Sequelize[_0x9241[9]]},accountcode:{type:Sequelize[_0x9241[9]]},context:{type:Sequelize[_0x9241[9]]},exten:{type:Sequelize[_0x9241[9]]},value:{type:Sequelize[_0x9241[9]]},type:{type:Sequelize[_0x9241[9]]},rating:{type:Sequelize[_0x9241[14]],validate:{max:5,min:0}},queue:{type:Sequelize[_0x9241[9]]},userDisposition:{type:Sequelize[_0x9241[9]]},createdAt:{type:Sequelize[_0x9241[15]],get:function(){return moment(this[_0x9241[7]](_0x9241[18]))[_0x9241[17]](_0x9241[16]).toString()}},updatedAt:{type:Sequelize[_0x9241[15]],get:function(){return moment(this[_0x9241[7]](_0x9241[19]))[_0x9241[17]](_0x9241[16]).toString()}}}
\ No newline at end of file
+var _0xe607=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x70\x61\x74\x68","\x65\x78\x70\x6F\x72\x74\x73","\x56\x49\x52\x54\x55\x41\x4C","\x76\x61\x6C\x75\x65","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x53\x54\x52\x49\x4E\x47","\x63\x68\x61\x6E\x6E\x65\x6C","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x73\x70\x6C\x69\x74","\x49\x4E\x54\x45\x47\x45\x52","\x44\x41\x54\x45","\x4D\x4D\x2D\x44\x44\x2D\x59\x59\x59\x59\x20\x48\x48\x3A\x6D\x6D","\x66\x6F\x72\x6D\x61\x74","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74"];_0xe607[0];var Sequelize=require(_0xe607[1]);var moment=require(_0xe607[2]);var path=require(_0xe607[3]);module[_0xe607[4]]= {format:{type:Sequelize[_0xe607[5]],get:function(){return this[_0xe607[7]](_0xe607[6])?path[_0xe607[8]](this[_0xe607[7]](_0xe607[6])):undefined}},uniqueid:{type:Sequelize[_0xe607[9]]},channel:{type:Sequelize[_0xe607[9]],set:function(_0x6c6cx4){if(_0x6c6cx4){this[_0xe607[11]](_0xe607[10],_0x6c6cx4);this[_0xe607[11]](_0xe607[12],_0x6c6cx4[_0xe607[13]](/\/|-/)[1])}}},membername:{type:Sequelize[_0xe607[9]]},calleridnum:{type:Sequelize[_0xe607[9]]},calleridname:{type:Sequelize[_0xe607[9]]},connectedlinenum:{type:Sequelize[_0xe607[9]]},connectedlinename:{type:Sequelize[_0xe607[9]]},accountcode:{type:Sequelize[_0xe607[9]]},context:{type:Sequelize[_0xe607[9]]},exten:{type:Sequelize[_0xe607[9]]},value:{type:Sequelize[_0xe607[9]]},type:{type:Sequelize[_0xe607[9]]},rating:{type:Sequelize[_0xe607[14]],validate:{max:5,min:0}},queue:{type:Sequelize[_0xe607[9]]},userDisposition:{type:Sequelize[_0xe607[9]]},createdAt:{type:Sequelize[_0xe607[15]],get:function(){return moment(this[_0xe607[7]](_0xe607[18]))[_0xe607[17]](_0xe607[16]).toString()}},updatedAt:{type:Sequelize[_0xe607[15]],get:function(){return moment(this[_0xe607[7]](_0xe607[19]))[_0xe607[17]](_0xe607[16]).toString()}}}
\ No newline at end of file
index af752ce..017f7d1 100644 (file)
@@ -1 +1 @@
-var _0x5b55=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x6B\x65\x79\x73","\x66\x6F\x72\x6D\x61\x74","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65\x42\x79","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x65\x6E\x63\x72\x79\x70\x74\x6F\x72","\x74\x79\x70\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x76\x61\x6C\x75\x65","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x75\x6E\x6C\x69\x6E\x6B","\x25\x73\x2E\x63\x79\x70\x68\x65\x72","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x73\x65\x63\x72\x65\x74\x73","\x64\x65\x63\x72\x79\x70\x74\x46\x69\x6C\x65","\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x73","\x4D\x44\x35","\x63\x6F\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x6E","\x74\x6F\x6B\x65\x6E","\x70\x75\x73\x68","\x24\x61\x6E\x64"];_0x5b55[0];var jsonpatch=require(_0x5b55[1]);var rp=require(_0x5b55[2]);var moment=require(_0x5b55[3]);var BPromise=require(_0x5b55[4]);var Mustache=require(_0x5b55[5]);var util=require(_0x5b55[6]);var path=require(_0x5b55[7]);var sox=require(_0x5b55[8]);var csv=require(_0x5b55[9]);var ejs=require(_0x5b55[10]);var fs=require(_0x5b55[11]);var _=require(_0x5b55[12]);var squel=require(_0x5b55[13]);var crypto=require(_0x5b55[14]);var jsforce=require(_0x5b55[15]);var deskjs=require(_0x5b55[16]);var toCsv=require(_0x5b55[9]);var querystring=require(_0x5b55[17]);var Papa=require(_0x5b55[18]);var qs=require(_0x5b55[19]);var logger=require(_0x5b55[21])(_0x5b55[20]);var utils=require(_0x5b55[22]);var config=require(_0x5b55[23]);var db=require(_0x5b55[25])[_0x5b55[24]];function respondWithStatusCode(_0x68dax1a,_0x68dax1b){_0x68dax1b= _0x68dax1b|| 204;return function(_0x68dax1c){if(_0x68dax1c){return _0x68dax1a[_0x5b55[26]](_0x68dax1b)};return _0x68dax1a[_0x5b55[28]](_0x68dax1b)[_0x5b55[27]]()}}function respondWithResult(_0x68dax1a,_0x68dax1b){_0x68dax1b= _0x68dax1b|| 200;return function(_0x68dax1c){if(_0x68dax1c){return _0x68dax1a[_0x5b55[28]](_0x68dax1b)[_0x5b55[29]](_0x68dax1c)}}}function respondWithFilteredResult(_0x68dax1a,_0x68dax1f){return function(_0x68dax1c){if(_0x68dax1c){var _0x68dax20=_0x68dax1c[_0x5b55[30]],_0x68dax21=_0x68dax1f[_0x5b55[31]],_0x68dax22=_0x68dax1f[_0x5b55[31]]+ _0x68dax1f[_0x5b55[32]],_0x68dax1b;if(_0x68dax22>= _0x68dax20){_0x68dax22= _0x68dax20;_0x68dax1b= 200}else {_0x68dax1b= 206};_0x68dax1a[_0x5b55[28]](_0x68dax1b);return _0x68dax1a[_0x5b55[36]](_0x5b55[33],_0x68dax21+ _0x5b55[34]+ _0x68dax22+ _0x5b55[35]+ _0x68dax20)[_0x5b55[29]](_0x68dax1c)};return null}}function patchUpdates(_0x68dax24){return function(_0x68dax1c){try{jsonpatch[_0x5b55[37]](_0x68dax1c,_0x68dax24,true)}catch(err){return BPromise[_0x5b55[38]](err)};return _0x68dax1c[_0x5b55[39]]()}}function saveUpdates(_0x68dax26,_0x68dax1b){return function(_0x68dax1c){if(_0x68dax1c){return _0x68dax1c[_0x5b55[41]](_0x68dax26)[_0x5b55[40]](function(_0x68dax27){return _0x68dax27})};return null}}function removeEntity(_0x68dax1a,_0x68dax1b){return function(_0x68dax1c){if(_0x68dax1c){return _0x68dax1c[_0x5b55[42]]()[_0x5b55[40]](function(){_0x68dax1a[_0x5b55[28]](204)[_0x5b55[27]]()})}}}function handleEntityNotFound(_0x68dax1a,_0x68dax1b){return function(_0x68dax1c){if(!_0x68dax1c){_0x68dax1a[_0x5b55[26]](404)};return _0x68dax1c}}function handleError(_0x68dax1a,_0x68dax1b){_0x68dax1b= _0x68dax1b|| 500;return function(_0x68dax2b){logger[_0x5b55[44]](_0x68dax2b[_0x5b55[43]]);if(_0x68dax2b[_0x5b55[45]]){delete _0x68dax2b[_0x5b55[45]]};_0x68dax1a[_0x5b55[28]](_0x68dax1b)[_0x5b55[46]](_0x68dax2b)}}exports[_0x5b55[47]]= function(_0x68dax2c,_0x68dax1a){var _0x68dax1f={},_0x68dax2d={},_0x68dax2e={count:0,rows:[]};_0x68dax2d[_0x5b55[48]]= _[_0x5b55[53]](_[_0x5b55[51]](db[_0x5b55[50]][_0x5b55[49]]),[_0x5b55[52]]);var _0x68dax2f={dateStart:_0x68dax2c[_0x5b55[55]][_0x5b55[54]],dateEnd:_0x68dax2c[_0x5b55[55]][_0x5b55[56]]};delete _0x68dax2c[_0x5b55[55]][_0x5b55[54]];delete _0x68dax2c[_0x5b55[55]][_0x5b55[56]];_0x68dax2d[_0x5b55[55]]= _[_0x5b55[51]](_0x68dax2c[_0x5b55[55]]);_0x68dax2d[_0x5b55[57]]= _[_0x5b55[58]](_0x68dax2d[_0x5b55[48]],_0x68dax2d[_0x5b55[55]]);_0x68dax1f[_0x5b55[59]]= _[_0x5b55[58]](_0x68dax2d[_0x5b55[48]],qs[_0x5b55[60]](_0x68dax2c[_0x5b55[55]][_0x5b55[60]]));_0x68dax1f[_0x5b55[59]]= (_0x68dax1f[_0x5b55[59]][_0x5b55[61]])?_0x68dax1f[_0x5b55[59]]:_0x68dax2d[_0x5b55[48]];if(!_0x68dax2c[_0x5b55[55]][_0x5b55[63]](_0x5b55[62])){_0x68dax1f[_0x5b55[32]]= qs[_0x5b55[32]](_0x68dax2c[_0x5b55[55]][_0x5b55[32]]);_0x68dax1f[_0x5b55[31]]= qs[_0x5b55[31]](_0x68dax2c[_0x5b55[55]][_0x5b55[31]])};_0x68dax1f[_0x5b55[64]]= qs[_0x5b55[65]](_0x68dax2c[_0x5b55[55]][_0x5b55[65]]);_0x68dax1f[_0x5b55[66]]= qs[_0x5b55[57]](_[_0x5b55[67]](_0x68dax2c[_0x5b55[55]],_0x68dax2d[_0x5b55[57]]));if(_0x68dax2f[_0x5b55[54]]){if(_0x68dax2f[_0x5b55[56]]){_0x68dax2f[_0x5b55[56]]= moment(_0x68dax2f[_0x5b55[56]])[_0x5b55[69]](1,_0x5b55[68])}else {_0x68dax2f[_0x5b55[56]]= moment(_0x68dax2f[_0x5b55[54]])[_0x5b55[69]](1,_0x5b55[68])};_[_0x5b55[70]](_0x68dax1f[_0x5b55[66]],{createdAt:{$gte:_0x68dax2f[_0x5b55[54]],$lte:_0x68dax2f[_0x5b55[56]]}})};if(_0x68dax2c[_0x5b55[55]][_0x5b55[71]]){_0x68dax1f[_0x5b55[66]]= _[_0x5b55[70]](_0x68dax1f[_0x5b55[66]],{$or:_[_0x5b55[73]](_0x68dax1f[_0x5b55[59]],function(_0x68dax30){var _0x68dax2e={};_0x68dax2e[_0x68dax30]= {$like:_0x5b55[72]+ _0x68dax2c[_0x5b55[55]][_0x5b55[71]]+ _0x5b55[72]};return _0x68dax2e})})};_0x68dax1f= _[_0x5b55[70]]({},_0x68dax1f,_0x68dax2c[_0x5b55[74]]);var _0x68dax31={where:_0x68dax1f[_0x5b55[66]]};return db[_0x5b55[50]][_0x5b55[30]](_0x68dax31)[_0x5b55[40]](function(_0x68dax20){_0x68dax2e[_0x5b55[30]]= _0x68dax20;if(_0x68dax2c[_0x5b55[55]][_0x5b55[77]]){_0x68dax1f[_0x5b55[78]]= [{all:true}]};return db[_0x5b55[50]][_0x5b55[79]](_0x68dax1f)})[_0x5b55[40]](function(_0x68dax32){_0x68dax2e[_0x5b55[76]]= _0x68dax32;return _0x68dax2e})[_0x5b55[40]](respondWithFilteredResult(_0x68dax1a,_0x68dax1f))[_0x5b55[75]](handleError(_0x68dax1a,null))};exports[_0x5b55[80]]= function(_0x68dax2c,_0x68dax1a){var _0x68dax1f={raw:false,where:{id:_0x68dax2c[_0x5b55[82]][_0x5b55[81]]}},_0x68dax2d={};_0x68dax2d[_0x5b55[48]]= _[_0x5b55[51]](db[_0x5b55[50]][_0x5b55[49]]);_0x68dax2d[_0x5b55[55]]= _[_0x5b55[51]](_0x68dax2c[_0x5b55[55]]);_0x68dax2d[_0x5b55[57]]= _[_0x5b55[58]](_0x68dax2d[_0x5b55[48]],_0x68dax2d[_0x5b55[55]]);_0x68dax1f[_0x5b55[59]]= _[_0x5b55[58]](_0x68dax2d[_0x5b55[48]],qs[_0x5b55[60]](_0x68dax2c[_0x5b55[55]][_0x5b55[60]]));_0x68dax1f[_0x5b55[59]]= (_0x68dax1f[_0x5b55[59]][_0x5b55[61]])?_0x68dax1f[_0x5b55[59]]:_0x68dax2d[_0x5b55[48]];if(_0x68dax2c[_0x5b55[55]][_0x5b55[77]]){_0x68dax1f[_0x5b55[78]]= [{all:true}]};_0x68dax1f= _[_0x5b55[70]]({},_0x68dax1f,_0x68dax2c[_0x5b55[74]]);return db[_0x5b55[50]][_0x5b55[83]](_0x68dax1f)[_0x5b55[40]](handleEntityNotFound(_0x68dax1a,null))[_0x5b55[40]](respondWithResult(_0x68dax1a,null))[_0x5b55[75]](handleError(_0x68dax1a,null))};exports[_0x5b55[84]]= function(_0x68dax2c,_0x68dax1a){return db[_0x5b55[50]][_0x5b55[84]](_0x68dax2c[_0x5b55[85]],{})[_0x5b55[40]](respondWithResult(_0x68dax1a,201))[_0x5b55[75]](handleError(_0x68dax1a,null))};exports[_0x5b55[41]]= function(_0x68dax2c,_0x68dax1a){if(_0x68dax2c[_0x5b55[85]][_0x5b55[81]]){delete _0x68dax2c[_0x5b55[85]][_0x5b55[81]]};return db[_0x5b55[50]][_0x5b55[83]]({where:{id:_0x68dax2c[_0x5b55[82]][_0x5b55[81]]}})[_0x5b55[40]](handleEntityNotFound(_0x68dax1a,null))[_0x5b55[40]](saveUpdates(_0x68dax2c[_0x5b55[85]],null))[_0x5b55[40]](respondWithResult(_0x68dax1a,null))[_0x5b55[75]](handleError(_0x68dax1a,null))};exports[_0x5b55[42]]= function(_0x68dax2c,_0x68dax1a){return db[_0x5b55[50]][_0x5b55[83]]({where:{id:_0x68dax2c[_0x5b55[82]][_0x5b55[81]]}})[_0x5b55[40]](handleEntityNotFound(_0x68dax1a,null))[_0x5b55[40]](removeEntity(_0x68dax1a,null))[_0x5b55[75]](handleError(_0x68dax1a,null))};exports[_0x5b55[86]]= function(_0x68dax2c,_0x68dax1a){return db[_0x5b55[50]][_0x5b55[86]]()[_0x5b55[40]](respondWithResult(_0x68dax1a,null))[_0x5b55[75]](handleError(_0x68dax1a,null))};exports[_0x5b55[87]]= function(_0x68dax2c,_0x68dax1a,_0x68dax33){var _0x68dax34=require(_0x5b55[88]);var _0x68dax35=false;var _0x68dax36={};if(_0x68dax2c[_0x5b55[55]][_0x5b55[89]]&& _0x68dax2c[_0x5b55[55]][_0x5b55[89]]=== _0x5b55[90]){_0x68dax36[_0x5b55[90]]= _0x68dax2c[_0x5b55[82]][_0x5b55[81]]}else {_0x68dax36[_0x5b55[81]]= _0x68dax2c[_0x5b55[82]][_0x5b55[81]]};return db[_0x5b55[50]][_0x5b55[83]]({where:_0x68dax36,attributes:[_0x5b55[81],_0x5b55[91]],raw:true})[_0x5b55[40]](handleEntityNotFound(_0x68dax1a,null))[_0x5b55[40]](function(_0x68dax1c){if(_0x68dax1c){var _0x68dax37=util[_0x5b55[52]](_0x5b55[98],_0x68dax1c[_0x5b55[91]]);if(fs[_0x5b55[92]](_0x68dax37)){_0x68dax35= true;return _0x68dax34[_0x5b55[101]](_0x68dax37,_0x68dax1c[_0x5b55[91]],config[_0x5b55[100]][_0x5b55[99]])[_0x5b55[40]](function(){return _0x68dax1c})};return _0x68dax1c}})[_0x5b55[40]](function(_0x68dax1c){if(_0x68dax1c){if(!fs[_0x5b55[92]](_0x68dax1c[_0x5b55[91]])){throw  new db[_0x5b55[94]].ValidationError(_0x5b55[93])};if(_0x68dax1c[_0x5b55[95]]){return _0x68dax1a[_0x5b55[87]](_0x68dax1c[_0x5b55[91]],_0x68dax1c[_0x5b55[95]]+ path[_0x5b55[96]](_0x68dax1c[_0x5b55[91]]),function(){if(_0x68dax35){fs[_0x5b55[97]](_0x68dax1c[_0x5b55[91]])}})}else {return _0x68dax1a[_0x5b55[87]](_0x68dax1c[_0x5b55[91]],function(_0x68dax1a){if(_0x68dax35){fs[_0x5b55[97]](_0x68dax1c[_0x5b55[91]])}})}}})[_0x5b55[75]](handleError(_0x68dax1a,null))};exports[_0x5b55[102]]= function(_0x68dax2c,_0x68dax1a,_0x68dax33){var _0x68dax34=require(_0x5b55[88]);var _0x68dax35=false;var _0x68dax36={$and:[db[_0x5b55[105]][_0x5b55[66]](db[_0x5b55[105]][_0x5b55[106]](_0x5b55[103],db[_0x5b55[105]][_0x5b55[104]](_0x5b55[90])),_0x68dax2c[_0x5b55[55]][_0x5b55[107]])]};if(_0x68dax2c[_0x5b55[55]][_0x5b55[89]]&& _0x68dax2c[_0x5b55[55]][_0x5b55[89]]=== _0x5b55[90]){_0x68dax36[_0x5b55[109]][_0x5b55[108]]({uniqueid:_0x68dax2c[_0x5b55[82]][_0x5b55[81]]})}else {_0x68dax36[_0x5b55[109]][_0x5b55[108]]({id:_0x68dax2c[_0x5b55[82]][_0x5b55[81]]})};return db[_0x5b55[50]][_0x5b55[83]]({where:_0x68dax36,attributes:[_0x5b55[81],_0x5b55[91]],raw:true})[_0x5b55[40]](handleEntityNotFound(_0x68dax1a,null))[_0x5b55[40]](function(_0x68dax1c){if(_0x68dax1c){var _0x68dax37=util[_0x5b55[52]](_0x5b55[98],_0x68dax1c[_0x5b55[91]]);if(fs[_0x5b55[92]](_0x68dax37)){_0x68dax35= true;return _0x68dax34[_0x5b55[101]](_0x68dax37,_0x68dax1c[_0x5b55[91]],config[_0x5b55[100]][_0x5b55[99]])[_0x5b55[40]](function(){return _0x68dax1c})};return _0x68dax1c}})[_0x5b55[40]](function(_0x68dax1c){if(_0x68dax1c){if(!fs[_0x5b55[92]](_0x68dax1c[_0x5b55[91]])){throw  new db[_0x5b55[94]].ValidationError(_0x5b55[93])};if(_0x68dax1c[_0x5b55[95]]){return _0x68dax1a[_0x5b55[87]](_0x68dax1c[_0x5b55[91]],_0x68dax1c[_0x5b55[95]]+ path[_0x5b55[96]](_0x68dax1c[_0x5b55[91]]),function(){if(_0x68dax35){fs[_0x5b55[97]](_0x68dax1c[_0x5b55[91]])}})}else {return _0x68dax1a[_0x5b55[87]](_0x68dax1c[_0x5b55[91]],function(_0x68dax1a){if(_0x68dax35){fs[_0x5b55[97]](_0x68dax1c[_0x5b55[91]])}})}}})[_0x5b55[75]](handleError(_0x68dax1a,null))}
\ No newline at end of file
+var _0x7c58=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x6B\x65\x79\x73","\x66\x6F\x72\x6D\x61\x74","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65\x42\x79","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x65\x6E\x63\x72\x79\x70\x74\x6F\x72","\x74\x79\x70\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x76\x61\x6C\x75\x65","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x75\x6E\x6C\x69\x6E\x6B","\x25\x73\x2E\x63\x79\x70\x68\x65\x72","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x73\x65\x63\x72\x65\x74\x73","\x64\x65\x63\x72\x79\x70\x74\x46\x69\x6C\x65","\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x73","\x4D\x44\x35","\x63\x6F\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x6E","\x74\x6F\x6B\x65\x6E","\x70\x75\x73\x68","\x24\x61\x6E\x64"];_0x7c58[0];var jsonpatch=require(_0x7c58[1]);var rp=require(_0x7c58[2]);var moment=require(_0x7c58[3]);var BPromise=require(_0x7c58[4]);var Mustache=require(_0x7c58[5]);var util=require(_0x7c58[6]);var path=require(_0x7c58[7]);var sox=require(_0x7c58[8]);var csv=require(_0x7c58[9]);var ejs=require(_0x7c58[10]);var fs=require(_0x7c58[11]);var _=require(_0x7c58[12]);var squel=require(_0x7c58[13]);var crypto=require(_0x7c58[14]);var jsforce=require(_0x7c58[15]);var deskjs=require(_0x7c58[16]);var toCsv=require(_0x7c58[9]);var querystring=require(_0x7c58[17]);var Papa=require(_0x7c58[18]);var qs=require(_0x7c58[19]);var logger=require(_0x7c58[21])(_0x7c58[20]);var utils=require(_0x7c58[22]);var config=require(_0x7c58[23]);var db=require(_0x7c58[25])[_0x7c58[24]];function respondWithStatusCode(_0x44e4x1a,_0x44e4x1b){_0x44e4x1b= _0x44e4x1b|| 204;return function(_0x44e4x1c){if(_0x44e4x1c){return _0x44e4x1a[_0x7c58[26]](_0x44e4x1b)};return _0x44e4x1a[_0x7c58[28]](_0x44e4x1b)[_0x7c58[27]]()}}function respondWithResult(_0x44e4x1a,_0x44e4x1b){_0x44e4x1b= _0x44e4x1b|| 200;return function(_0x44e4x1c){if(_0x44e4x1c){return _0x44e4x1a[_0x7c58[28]](_0x44e4x1b)[_0x7c58[29]](_0x44e4x1c)}}}function respondWithFilteredResult(_0x44e4x1a,_0x44e4x1f){return function(_0x44e4x1c){if(_0x44e4x1c){var _0x44e4x20=_0x44e4x1c[_0x7c58[30]],_0x44e4x21=_0x44e4x1f[_0x7c58[31]],_0x44e4x22=_0x44e4x1f[_0x7c58[31]]+ _0x44e4x1f[_0x7c58[32]],_0x44e4x1b;if(_0x44e4x22>= _0x44e4x20){_0x44e4x22= _0x44e4x20;_0x44e4x1b= 200}else {_0x44e4x1b= 206};_0x44e4x1a[_0x7c58[28]](_0x44e4x1b);return _0x44e4x1a[_0x7c58[36]](_0x7c58[33],_0x44e4x21+ _0x7c58[34]+ _0x44e4x22+ _0x7c58[35]+ _0x44e4x20)[_0x7c58[29]](_0x44e4x1c)};return null}}function patchUpdates(_0x44e4x24){return function(_0x44e4x1c){try{jsonpatch[_0x7c58[37]](_0x44e4x1c,_0x44e4x24,true)}catch(err){return BPromise[_0x7c58[38]](err)};return _0x44e4x1c[_0x7c58[39]]()}}function saveUpdates(_0x44e4x26,_0x44e4x1b){return function(_0x44e4x1c){if(_0x44e4x1c){return _0x44e4x1c[_0x7c58[41]](_0x44e4x26)[_0x7c58[40]](function(_0x44e4x27){return _0x44e4x27})};return null}}function removeEntity(_0x44e4x1a,_0x44e4x1b){return function(_0x44e4x1c){if(_0x44e4x1c){return _0x44e4x1c[_0x7c58[42]]()[_0x7c58[40]](function(){_0x44e4x1a[_0x7c58[28]](204)[_0x7c58[27]]()})}}}function handleEntityNotFound(_0x44e4x1a,_0x44e4x1b){return function(_0x44e4x1c){if(!_0x44e4x1c){_0x44e4x1a[_0x7c58[26]](404)};return _0x44e4x1c}}function handleError(_0x44e4x1a,_0x44e4x1b){_0x44e4x1b= _0x44e4x1b|| 500;return function(_0x44e4x2b){logger[_0x7c58[44]](_0x44e4x2b[_0x7c58[43]]);if(_0x44e4x2b[_0x7c58[45]]){delete _0x44e4x2b[_0x7c58[45]]};_0x44e4x1a[_0x7c58[28]](_0x44e4x1b)[_0x7c58[46]](_0x44e4x2b)}}exports[_0x7c58[47]]= function(_0x44e4x2c,_0x44e4x1a){var _0x44e4x1f={},_0x44e4x2d={},_0x44e4x2e={count:0,rows:[]};_0x44e4x2d[_0x7c58[48]]= _[_0x7c58[53]](_[_0x7c58[51]](db[_0x7c58[50]][_0x7c58[49]]),[_0x7c58[52]]);var _0x44e4x2f={dateStart:_0x44e4x2c[_0x7c58[55]][_0x7c58[54]],dateEnd:_0x44e4x2c[_0x7c58[55]][_0x7c58[56]]};delete _0x44e4x2c[_0x7c58[55]][_0x7c58[54]];delete _0x44e4x2c[_0x7c58[55]][_0x7c58[56]];_0x44e4x2d[_0x7c58[55]]= _[_0x7c58[51]](_0x44e4x2c[_0x7c58[55]]);_0x44e4x2d[_0x7c58[57]]= _[_0x7c58[58]](_0x44e4x2d[_0x7c58[48]],_0x44e4x2d[_0x7c58[55]]);_0x44e4x1f[_0x7c58[59]]= _[_0x7c58[58]](_0x44e4x2d[_0x7c58[48]],qs[_0x7c58[60]](_0x44e4x2c[_0x7c58[55]][_0x7c58[60]]));_0x44e4x1f[_0x7c58[59]]= (_0x44e4x1f[_0x7c58[59]][_0x7c58[61]])?_0x44e4x1f[_0x7c58[59]]:_0x44e4x2d[_0x7c58[48]];if(!_0x44e4x2c[_0x7c58[55]][_0x7c58[63]](_0x7c58[62])){_0x44e4x1f[_0x7c58[32]]= qs[_0x7c58[32]](_0x44e4x2c[_0x7c58[55]][_0x7c58[32]]);_0x44e4x1f[_0x7c58[31]]= qs[_0x7c58[31]](_0x44e4x2c[_0x7c58[55]][_0x7c58[31]])};_0x44e4x1f[_0x7c58[64]]= qs[_0x7c58[65]](_0x44e4x2c[_0x7c58[55]][_0x7c58[65]]);_0x44e4x1f[_0x7c58[66]]= qs[_0x7c58[57]](_[_0x7c58[67]](_0x44e4x2c[_0x7c58[55]],_0x44e4x2d[_0x7c58[57]]));if(_0x44e4x2f[_0x7c58[54]]){if(_0x44e4x2f[_0x7c58[56]]){_0x44e4x2f[_0x7c58[56]]= moment(_0x44e4x2f[_0x7c58[56]])[_0x7c58[69]](1,_0x7c58[68])}else {_0x44e4x2f[_0x7c58[56]]= moment(_0x44e4x2f[_0x7c58[54]])[_0x7c58[69]](1,_0x7c58[68])};_[_0x7c58[70]](_0x44e4x1f[_0x7c58[66]],{createdAt:{$gte:_0x44e4x2f[_0x7c58[54]],$lte:_0x44e4x2f[_0x7c58[56]]}})};if(_0x44e4x2c[_0x7c58[55]][_0x7c58[71]]){_0x44e4x1f[_0x7c58[66]]= _[_0x7c58[70]](_0x44e4x1f[_0x7c58[66]],{$or:_[_0x7c58[73]](_0x44e4x1f[_0x7c58[59]],function(_0x44e4x30){var _0x44e4x2e={};_0x44e4x2e[_0x44e4x30]= {$like:_0x7c58[72]+ _0x44e4x2c[_0x7c58[55]][_0x7c58[71]]+ _0x7c58[72]};return _0x44e4x2e})})};_0x44e4x1f= _[_0x7c58[70]]({},_0x44e4x1f,_0x44e4x2c[_0x7c58[74]]);var _0x44e4x31={where:_0x44e4x1f[_0x7c58[66]]};return db[_0x7c58[50]][_0x7c58[30]](_0x44e4x31)[_0x7c58[40]](function(_0x44e4x20){_0x44e4x2e[_0x7c58[30]]= _0x44e4x20;if(_0x44e4x2c[_0x7c58[55]][_0x7c58[77]]){_0x44e4x1f[_0x7c58[78]]= [{all:true}]};return db[_0x7c58[50]][_0x7c58[79]](_0x44e4x1f)})[_0x7c58[40]](function(_0x44e4x32){_0x44e4x2e[_0x7c58[76]]= _0x44e4x32;return _0x44e4x2e})[_0x7c58[40]](respondWithFilteredResult(_0x44e4x1a,_0x44e4x1f))[_0x7c58[75]](handleError(_0x44e4x1a,null))};exports[_0x7c58[80]]= function(_0x44e4x2c,_0x44e4x1a){var _0x44e4x1f={raw:false,where:{id:_0x44e4x2c[_0x7c58[82]][_0x7c58[81]]}},_0x44e4x2d={};_0x44e4x2d[_0x7c58[48]]= _[_0x7c58[51]](db[_0x7c58[50]][_0x7c58[49]]);_0x44e4x2d[_0x7c58[55]]= _[_0x7c58[51]](_0x44e4x2c[_0x7c58[55]]);_0x44e4x2d[_0x7c58[57]]= _[_0x7c58[58]](_0x44e4x2d[_0x7c58[48]],_0x44e4x2d[_0x7c58[55]]);_0x44e4x1f[_0x7c58[59]]= _[_0x7c58[58]](_0x44e4x2d[_0x7c58[48]],qs[_0x7c58[60]](_0x44e4x2c[_0x7c58[55]][_0x7c58[60]]));_0x44e4x1f[_0x7c58[59]]= (_0x44e4x1f[_0x7c58[59]][_0x7c58[61]])?_0x44e4x1f[_0x7c58[59]]:_0x44e4x2d[_0x7c58[48]];if(_0x44e4x2c[_0x7c58[55]][_0x7c58[77]]){_0x44e4x1f[_0x7c58[78]]= [{all:true}]};_0x44e4x1f= _[_0x7c58[70]]({},_0x44e4x1f,_0x44e4x2c[_0x7c58[74]]);return db[_0x7c58[50]][_0x7c58[83]](_0x44e4x1f)[_0x7c58[40]](handleEntityNotFound(_0x44e4x1a,null))[_0x7c58[40]](respondWithResult(_0x44e4x1a,null))[_0x7c58[75]](handleError(_0x44e4x1a,null))};exports[_0x7c58[84]]= function(_0x44e4x2c,_0x44e4x1a){return db[_0x7c58[50]][_0x7c58[84]](_0x44e4x2c[_0x7c58[85]],{})[_0x7c58[40]](respondWithResult(_0x44e4x1a,201))[_0x7c58[75]](handleError(_0x44e4x1a,null))};exports[_0x7c58[41]]= function(_0x44e4x2c,_0x44e4x1a){if(_0x44e4x2c[_0x7c58[85]][_0x7c58[81]]){delete _0x44e4x2c[_0x7c58[85]][_0x7c58[81]]};return db[_0x7c58[50]][_0x7c58[83]]({where:{id:_0x44e4x2c[_0x7c58[82]][_0x7c58[81]]}})[_0x7c58[40]](handleEntityNotFound(_0x44e4x1a,null))[_0x7c58[40]](saveUpdates(_0x44e4x2c[_0x7c58[85]],null))[_0x7c58[40]](respondWithResult(_0x44e4x1a,null))[_0x7c58[75]](handleError(_0x44e4x1a,null))};exports[_0x7c58[42]]= function(_0x44e4x2c,_0x44e4x1a){return db[_0x7c58[50]][_0x7c58[83]]({where:{id:_0x44e4x2c[_0x7c58[82]][_0x7c58[81]]}})[_0x7c58[40]](handleEntityNotFound(_0x44e4x1a,null))[_0x7c58[40]](removeEntity(_0x44e4x1a,null))[_0x7c58[75]](handleError(_0x44e4x1a,null))};exports[_0x7c58[86]]= function(_0x44e4x2c,_0x44e4x1a){return db[_0x7c58[50]][_0x7c58[86]]()[_0x7c58[40]](respondWithResult(_0x44e4x1a,null))[_0x7c58[75]](handleError(_0x44e4x1a,null))};exports[_0x7c58[87]]= function(_0x44e4x2c,_0x44e4x1a,_0x44e4x33){var _0x44e4x34=require(_0x7c58[88]);var _0x44e4x35=false;var _0x44e4x36={};if(_0x44e4x2c[_0x7c58[55]][_0x7c58[89]]&& _0x44e4x2c[_0x7c58[55]][_0x7c58[89]]=== _0x7c58[90]){_0x44e4x36[_0x7c58[90]]= _0x44e4x2c[_0x7c58[82]][_0x7c58[81]]}else {_0x44e4x36[_0x7c58[81]]= _0x44e4x2c[_0x7c58[82]][_0x7c58[81]]};return db[_0x7c58[50]][_0x7c58[83]]({where:_0x44e4x36,attributes:[_0x7c58[81],_0x7c58[91]],raw:true})[_0x7c58[40]](handleEntityNotFound(_0x44e4x1a,null))[_0x7c58[40]](function(_0x44e4x1c){if(_0x44e4x1c){var _0x44e4x37=util[_0x7c58[52]](_0x7c58[98],_0x44e4x1c[_0x7c58[91]]);if(fs[_0x7c58[92]](_0x44e4x37)){_0x44e4x35= true;return _0x44e4x34[_0x7c58[101]](_0x44e4x37,_0x44e4x1c[_0x7c58[91]],config[_0x7c58[100]][_0x7c58[99]])[_0x7c58[40]](function(){return _0x44e4x1c})};return _0x44e4x1c}})[_0x7c58[40]](function(_0x44e4x1c){if(_0x44e4x1c){if(!fs[_0x7c58[92]](_0x44e4x1c[_0x7c58[91]])){throw  new db[_0x7c58[94]].ValidationError(_0x7c58[93])};if(_0x44e4x1c[_0x7c58[95]]){return _0x44e4x1a[_0x7c58[87]](_0x44e4x1c[_0x7c58[91]],_0x44e4x1c[_0x7c58[95]]+ path[_0x7c58[96]](_0x44e4x1c[_0x7c58[91]]),function(){if(_0x44e4x35){fs[_0x7c58[97]](_0x44e4x1c[_0x7c58[91]])}})}else {return _0x44e4x1a[_0x7c58[87]](_0x44e4x1c[_0x7c58[91]],function(_0x44e4x1a){if(_0x44e4x35){fs[_0x7c58[97]](_0x44e4x1c[_0x7c58[91]])}})}}})[_0x7c58[75]](handleError(_0x44e4x1a,null))};exports[_0x7c58[102]]= function(_0x44e4x2c,_0x44e4x1a,_0x44e4x33){var _0x44e4x34=require(_0x7c58[88]);var _0x44e4x35=false;var _0x44e4x36={$and:[db[_0x7c58[105]][_0x7c58[66]](db[_0x7c58[105]][_0x7c58[106]](_0x7c58[103],db[_0x7c58[105]][_0x7c58[104]](_0x7c58[90])),_0x44e4x2c[_0x7c58[55]][_0x7c58[107]])]};if(_0x44e4x2c[_0x7c58[55]][_0x7c58[89]]&& _0x44e4x2c[_0x7c58[55]][_0x7c58[89]]=== _0x7c58[90]){_0x44e4x36[_0x7c58[109]][_0x7c58[108]]({uniqueid:_0x44e4x2c[_0x7c58[82]][_0x7c58[81]]})}else {_0x44e4x36[_0x7c58[109]][_0x7c58[108]]({id:_0x44e4x2c[_0x7c58[82]][_0x7c58[81]]})};return db[_0x7c58[50]][_0x7c58[83]]({where:_0x44e4x36,attributes:[_0x7c58[81],_0x7c58[91]],raw:true})[_0x7c58[40]](handleEntityNotFound(_0x44e4x1a,null))[_0x7c58[40]](function(_0x44e4x1c){if(_0x44e4x1c){var _0x44e4x37=util[_0x7c58[52]](_0x7c58[98],_0x44e4x1c[_0x7c58[91]]);if(fs[_0x7c58[92]](_0x44e4x37)){_0x44e4x35= true;return _0x44e4x34[_0x7c58[101]](_0x44e4x37,_0x44e4x1c[_0x7c58[91]],config[_0x7c58[100]][_0x7c58[99]])[_0x7c58[40]](function(){return _0x44e4x1c})};return _0x44e4x1c}})[_0x7c58[40]](function(_0x44e4x1c){if(_0x44e4x1c){if(!fs[_0x7c58[92]](_0x44e4x1c[_0x7c58[91]])){throw  new db[_0x7c58[94]].ValidationError(_0x7c58[93])};if(_0x44e4x1c[_0x7c58[95]]){return _0x44e4x1a[_0x7c58[87]](_0x44e4x1c[_0x7c58[91]],_0x44e4x1c[_0x7c58[95]]+ path[_0x7c58[96]](_0x44e4x1c[_0x7c58[91]]),function(){if(_0x44e4x35){fs[_0x7c58[97]](_0x44e4x1c[_0x7c58[91]])}})}else {return _0x44e4x1a[_0x7c58[87]](_0x44e4x1c[_0x7c58[91]],function(_0x44e4x1a){if(_0x44e4x35){fs[_0x7c58[97]](_0x44e4x1c[_0x7c58[91]])}})}}})[_0x7c58[75]](handleError(_0x44e4x1a,null))}
\ No newline at end of file
index 2fe739c..1793549 100644 (file)
@@ -1 +1 @@
-var _0xfcfa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0xfcfa[0];var _=require(_0xfcfa[1]);var util=require(_0xfcfa[2]);var logger=require(_0xfcfa[4])(_0xfcfa[3]);var moment=require(_0xfcfa[5]);var BPromise=require(_0xfcfa[6]);var rp=require(_0xfcfa[7]);var attributes=require(_0xfcfa[8]);module[_0xfcfa[9]]= function(_0x67dex8,_0x67dex9){return _0x67dex8[_0xfcfa[13]](_0xfcfa[10],attributes,{tableName:_0xfcfa[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0xfcfa[12],"\x66\x69\x65\x6C\x64\x73":[_0xfcfa[12]]}],timestamps:true})}
\ No newline at end of file
+var _0xe1f8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x66\x69\x6E\x65"];_0xe1f8[0];var _=require(_0xe1f8[1]);var util=require(_0xe1f8[2]);var logger=require(_0xe1f8[4])(_0xe1f8[3]);var moment=require(_0xe1f8[5]);var BPromise=require(_0xe1f8[6]);var rp=require(_0xe1f8[7]);var attributes=require(_0xe1f8[8]);module[_0xe1f8[9]]= function(_0x3daax8,_0x3daax9){return _0x3daax8[_0xe1f8[13]](_0xe1f8[10],attributes,{tableName:_0xe1f8[11],paranoid:false,indexes:[{"\x6E\x61\x6D\x65":_0xe1f8[12],"\x66\x69\x65\x6C\x64\x73":[_0xe1f8[12]]}],timestamps:true})}
\ No newline at end of file
index 4dc670b..8ea70a8 100644 (file)
@@ -1 +1 @@
-var _0xdcaa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x65\x6E\x63\x72\x79\x70\x74\x6F\x72","\x63\x61\x6C\x6C\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x45\x6E\x63\x72\x79\x70\x74\x69\x6F\x6E","\x76\x61\x6C\x75\x65","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x25\x73\x2E\x63\x79\x70\x68\x65\x72","\x66\x6F\x72\x6D\x61\x74","\x75\x6E\x6C\x69\x6E\x6B","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x66\x69\x6C\x65\x20\x65\x6E\x63\x72\x79\x70\x74\x65\x64","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x73\x65\x63\x72\x65\x74\x73","\x65\x6E\x63\x72\x79\x70\x74\x46\x69\x6C\x65","\x63\x72\x65\x61\x74\x65","\x69\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x53\x65\x74\x74\x69\x6E\x67"];_0xdcaa[0];var _=require(_0xdcaa[1]);var util=require(_0xdcaa[2]);var moment=require(_0xdcaa[3]);var BPromise=require(_0xdcaa[4]);var rs=require(_0xdcaa[5]);var fs=require(_0xdcaa[6]);var db=require(_0xdcaa[8])[_0xdcaa[7]];var utils=require(_0xdcaa[9]);var logger=require(_0xdcaa[11])(_0xdcaa[10]);var config=require(_0xdcaa[12]);var jayson=require(_0xdcaa[13]);var client=jayson[_0xdcaa[15]][_0xdcaa[14]]({port:9002});function respondWithRpcPromise(_0x8478xe,_0x8478xf,_0x8478x10){return  new BPromise(function(_0x8478x11,_0x8478x12){return client[_0xdcaa[28]](_0x8478xe,_0x8478x10)[_0xdcaa[27]](function(_0x8478x14){logger[_0xdcaa[20]](_0xdcaa[16],_0x8478xf,_0xdcaa[19]);logger[_0xdcaa[23]](_0xdcaa[21],_0x8478xf,_0xdcaa[19],JSON[_0xdcaa[22]](_0x8478x14));if(_0x8478x14[_0xdcaa[17]]){if(_0x8478x14[_0xdcaa[17]][_0xdcaa[24]]=== 500){logger[_0xdcaa[17]](_0xdcaa[16],_0x8478xf,_0x8478x14[_0xdcaa[17]][_0xdcaa[25]]);return _0x8478x12(_0x8478x14[_0xdcaa[17]][_0xdcaa[25]])};logger[_0xdcaa[17]](_0xdcaa[16],_0x8478xf,_0x8478x14[_0xdcaa[17]][_0xdcaa[25]]);return _0x8478x11(_0x8478x14[_0xdcaa[17]][_0xdcaa[25]])}else {logger[_0xdcaa[20]](_0xdcaa[16],_0x8478xf,_0xdcaa[19]);_0x8478x11(_0x8478x14[_0xdcaa[26]][_0xdcaa[25]])}})[_0xdcaa[18]](function(_0x8478x13){logger[_0xdcaa[17]](_0xdcaa[16],_0x8478xf,_0x8478x13);_0x8478x12(_0x8478x13)})})}exports[_0xdcaa[29]]= function(_0x8478x10){var _0x8478x15=this;return  new Promise(function(_0x8478x11,_0x8478x12){return db[_0xdcaa[37]][_0xdcaa[36]](_0x8478x10[_0xdcaa[30]],{raw:_0x8478x10[_0xdcaa[31]]?(_0x8478x10[_0xdcaa[31]][_0xdcaa[32]]=== undefined)?true:false:true,individualHooks:true,where:_0x8478x10[_0xdcaa[31]]?_0x8478x10[_0xdcaa[31]][_0xdcaa[33]]|| null:null,attributes:_0x8478x10[_0xdcaa[31]]?_0x8478x10[_0xdcaa[31]][_0xdcaa[34]]|| null:null,limit:_0x8478x10[_0xdcaa[31]]?_0x8478x10[_0xdcaa[31]][_0xdcaa[35]]|| null:null})[_0xdcaa[27]](function(_0x8478x14){logger[_0xdcaa[20]](_0xdcaa[29],_0x8478x10);logger[_0xdcaa[23]](_0xdcaa[29],_0x8478x10,JSON[_0xdcaa[22]](_0x8478x14));_0x8478x11(_0x8478x14)})[_0xdcaa[18]](function(_0x8478x13){logger[_0xdcaa[17]](_0xdcaa[29],_0x8478x13[_0xdcaa[25]],_0x8478x10);_0x8478x12(_0x8478x15[_0xdcaa[17]](500,_0x8478x13[_0xdcaa[25]]))})})};exports[_0xdcaa[38]]= function(_0x8478x10){var _0x8478x15=this;return  new Promise(function(_0x8478x11,_0x8478x12){var _0x8478x16=require(_0xdcaa[39]);var _0x8478x17;return db[_0xdcaa[53]][_0xdcaa[52]]({attributes:[_0xdcaa[51],_0xdcaa[40]],where:{id:1},raw:true})[_0xdcaa[27]](function(_0x8478x18){_0x8478x17= _0x8478x18;return db[_0xdcaa[37]][_0xdcaa[50]](_0x8478x10[_0xdcaa[30]])})[_0xdcaa[27]](function(_0x8478x18){if(_0x8478x17[_0xdcaa[40]]&& fs[_0xdcaa[42]](_0x8478x18[_0xdcaa[41]])){var _0x8478x19=util[_0xdcaa[44]](_0xdcaa[43],_0x8478x18[_0xdcaa[41]]);return _0x8478x16[_0xdcaa[49]](_0x8478x18[_0xdcaa[41]],_0x8478x19,config[_0xdcaa[48]][_0xdcaa[47]])[_0xdcaa[27]](function(){fs[_0xdcaa[45]](_0x8478x18[_0xdcaa[41]]);logger[_0xdcaa[20]](_0xdcaa[46]);return _0x8478x18})};return _0x8478x18})[_0xdcaa[27]](function(_0x8478x14){logger[_0xdcaa[20]](_0xdcaa[38],_0x8478x10);logger[_0xdcaa[23]](_0xdcaa[38],_0x8478x10,JSON[_0xdcaa[22]](_0x8478x14));_0x8478x11(_0x8478x14)})[_0xdcaa[18]](function(_0x8478x13){logger[_0xdcaa[17]](_0xdcaa[38],_0x8478x13[_0xdcaa[25]],_0x8478x10);_0x8478x12(_0x8478x15[_0xdcaa[17]](500,_0x8478x13[_0xdcaa[25]]))})})}
\ No newline at end of file
+var _0x17c4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x55\x70\x64\x61\x74\x65\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x77\x68\x65\x72\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x6C\x69\x6D\x69\x74","\x75\x70\x64\x61\x74\x65","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x65\x6E\x63\x72\x79\x70\x74\x6F\x72","\x63\x61\x6C\x6C\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x45\x6E\x63\x72\x79\x70\x74\x69\x6F\x6E","\x76\x61\x6C\x75\x65","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x25\x73\x2E\x63\x79\x70\x68\x65\x72","\x66\x6F\x72\x6D\x61\x74","\x75\x6E\x6C\x69\x6E\x6B","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x66\x69\x6C\x65\x20\x65\x6E\x63\x72\x79\x70\x74\x65\x64","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x73\x65\x63\x72\x65\x74\x73","\x65\x6E\x63\x72\x79\x70\x74\x46\x69\x6C\x65","\x63\x72\x65\x61\x74\x65","\x69\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x53\x65\x74\x74\x69\x6E\x67"];_0x17c4[0];var _=require(_0x17c4[1]);var util=require(_0x17c4[2]);var moment=require(_0x17c4[3]);var BPromise=require(_0x17c4[4]);var rs=require(_0x17c4[5]);var fs=require(_0x17c4[6]);var db=require(_0x17c4[8])[_0x17c4[7]];var utils=require(_0x17c4[9]);var logger=require(_0x17c4[11])(_0x17c4[10]);var config=require(_0x17c4[12]);var jayson=require(_0x17c4[13]);var client=jayson[_0x17c4[15]][_0x17c4[14]]({port:9002});function respondWithRpcPromise(_0x5d84xe,_0x5d84xf,_0x5d84x10){return  new BPromise(function(_0x5d84x11,_0x5d84x12){return client[_0x17c4[28]](_0x5d84xe,_0x5d84x10)[_0x17c4[27]](function(_0x5d84x14){logger[_0x17c4[20]](_0x17c4[16],_0x5d84xf,_0x17c4[19]);logger[_0x17c4[23]](_0x17c4[21],_0x5d84xf,_0x17c4[19],JSON[_0x17c4[22]](_0x5d84x14));if(_0x5d84x14[_0x17c4[17]]){if(_0x5d84x14[_0x17c4[17]][_0x17c4[24]]=== 500){logger[_0x17c4[17]](_0x17c4[16],_0x5d84xf,_0x5d84x14[_0x17c4[17]][_0x17c4[25]]);return _0x5d84x12(_0x5d84x14[_0x17c4[17]][_0x17c4[25]])};logger[_0x17c4[17]](_0x17c4[16],_0x5d84xf,_0x5d84x14[_0x17c4[17]][_0x17c4[25]]);return _0x5d84x11(_0x5d84x14[_0x17c4[17]][_0x17c4[25]])}else {logger[_0x17c4[20]](_0x17c4[16],_0x5d84xf,_0x17c4[19]);_0x5d84x11(_0x5d84x14[_0x17c4[26]][_0x17c4[25]])}})[_0x17c4[18]](function(_0x5d84x13){logger[_0x17c4[17]](_0x17c4[16],_0x5d84xf,_0x5d84x13);_0x5d84x12(_0x5d84x13)})})}exports[_0x17c4[29]]= function(_0x5d84x10){var _0x5d84x15=this;return  new Promise(function(_0x5d84x11,_0x5d84x12){return db[_0x17c4[37]][_0x17c4[36]](_0x5d84x10[_0x17c4[30]],{raw:_0x5d84x10[_0x17c4[31]]?(_0x5d84x10[_0x17c4[31]][_0x17c4[32]]=== undefined)?true:false:true,individualHooks:true,where:_0x5d84x10[_0x17c4[31]]?_0x5d84x10[_0x17c4[31]][_0x17c4[33]]|| null:null,attributes:_0x5d84x10[_0x17c4[31]]?_0x5d84x10[_0x17c4[31]][_0x17c4[34]]|| null:null,limit:_0x5d84x10[_0x17c4[31]]?_0x5d84x10[_0x17c4[31]][_0x17c4[35]]|| null:null})[_0x17c4[27]](function(_0x5d84x14){logger[_0x17c4[20]](_0x17c4[29],_0x5d84x10);logger[_0x17c4[23]](_0x17c4[29],_0x5d84x10,JSON[_0x17c4[22]](_0x5d84x14));_0x5d84x11(_0x5d84x14)})[_0x17c4[18]](function(_0x5d84x13){logger[_0x17c4[17]](_0x17c4[29],_0x5d84x13[_0x17c4[25]],_0x5d84x10);_0x5d84x12(_0x5d84x15[_0x17c4[17]](500,_0x5d84x13[_0x17c4[25]]))})})};exports[_0x17c4[38]]= function(_0x5d84x10){var _0x5d84x15=this;return  new Promise(function(_0x5d84x11,_0x5d84x12){var _0x5d84x16=require(_0x17c4[39]);var _0x5d84x17;return db[_0x17c4[53]][_0x17c4[52]]({attributes:[_0x17c4[51],_0x17c4[40]],where:{id:1},raw:true})[_0x17c4[27]](function(_0x5d84x18){_0x5d84x17= _0x5d84x18;return db[_0x17c4[37]][_0x17c4[50]](_0x5d84x10[_0x17c4[30]])})[_0x17c4[27]](function(_0x5d84x18){if(_0x5d84x17[_0x17c4[40]]&& fs[_0x17c4[42]](_0x5d84x18[_0x17c4[41]])){var _0x5d84x19=util[_0x17c4[44]](_0x17c4[43],_0x5d84x18[_0x17c4[41]]);return _0x5d84x16[_0x17c4[49]](_0x5d84x18[_0x17c4[41]],_0x5d84x19,config[_0x17c4[48]][_0x17c4[47]])[_0x17c4[27]](function(){fs[_0x17c4[45]](_0x5d84x18[_0x17c4[41]]);logger[_0x17c4[20]](_0x17c4[46]);return _0x5d84x18})};return _0x5d84x18})[_0x17c4[27]](function(_0x5d84x14){logger[_0x17c4[20]](_0x17c4[38],_0x5d84x10);logger[_0x17c4[23]](_0x17c4[38],_0x5d84x10,JSON[_0x17c4[22]](_0x5d84x14));_0x5d84x11(_0x5d84x14)})[_0x17c4[18]](function(_0x5d84x13){logger[_0x17c4[17]](_0x17c4[38],_0x5d84x13[_0x17c4[25]],_0x5d84x10);_0x5d84x12(_0x5d84x15[_0x17c4[17]](500,_0x5d84x13[_0x17c4[25]]))})})}
\ No newline at end of file
index d91ebf6..03fb017 100644 (file)
@@ -1 +1 @@
-var _0x688b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x688b[0];var multer=require(_0x688b[1]);var util=require(_0x688b[2]);var path=require(_0x688b[3]);var express=require(_0x688b[4]);var router=express.Router();var auth=require(_0x688b[5]);var interaction=require(_0x688b[6]);var config=require(_0x688b[7]);var controller=require(_0x688b[8]);router[_0x688b[12]](_0x688b[9],auth[_0x688b[10]](),controller[_0x688b[11]]);router[_0x688b[12]](_0x688b[13],auth[_0x688b[10]](),controller[_0x688b[14]]);router[_0x688b[16]](_0x688b[9],auth[_0x688b[10]](),controller[_0x688b[15]]);router[_0x688b[18]](_0x688b[13],auth[_0x688b[10]](),controller[_0x688b[17]]);router[_0x688b[20]](_0x688b[13],auth[_0x688b[10]](),controller[_0x688b[19]]);module[_0x688b[21]]= router
\ No newline at end of file
+var _0x4cac=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x6C\x74\x65\x72","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x61\x75\x74\x68\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4cac[0];var multer=require(_0x4cac[1]);var util=require(_0x4cac[2]);var path=require(_0x4cac[3]);var express=require(_0x4cac[4]);var router=express.Router();var auth=require(_0x4cac[5]);var interaction=require(_0x4cac[6]);var config=require(_0x4cac[7]);var controller=require(_0x4cac[8]);router[_0x4cac[12]](_0x4cac[9],auth[_0x4cac[10]](),controller[_0x4cac[11]]);router[_0x4cac[12]](_0x4cac[13],auth[_0x4cac[10]](),controller[_0x4cac[14]]);router[_0x4cac[16]](_0x4cac[9],auth[_0x4cac[10]](),controller[_0x4cac[15]]);router[_0x4cac[18]](_0x4cac[13],auth[_0x4cac[10]](),controller[_0x4cac[17]]);router[_0x4cac[20]](_0x4cac[13],auth[_0x4cac[10]](),controller[_0x4cac[19]]);module[_0x4cac[21]]= router
\ No newline at end of file
index 043914a..9bcef6f 100644 (file)
@@ -1 +1 @@
-var _0x4c3a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x62\x6C\x69\x6E\x64","\x61\x74\x74\x65\x6E\x64\x65\x64","\x53\x54\x52\x49\x4E\x47","\x59\x65\x73","\x4E\x6F"];_0x4c3a[0];var Sequelize=require(_0x4c3a[1]);var moment=require(_0x4c3a[2]);module[_0x4c3a[3]]= {type:{type:Sequelize.ENUM(_0x4c3a[4],_0x4c3a[5])},result:{type:Sequelize[_0x4c3a[6]]},transfererchannel:{type:Sequelize[_0x4c3a[6]]},transferercalleridnum:{type:Sequelize[_0x4c3a[6]]},transferercalleridname:{type:Sequelize[_0x4c3a[6]]},transfererconnectedlinenum:{type:Sequelize[_0x4c3a[6]]},transfererconnectedlinename:{type:Sequelize[_0x4c3a[6]]},transfereraccountcode:{type:Sequelize[_0x4c3a[6]]},transferercontext:{type:Sequelize[_0x4c3a[6]]},transfererexten:{type:Sequelize[_0x4c3a[6]]},transfererlinkedid:{type:Sequelize[_0x4c3a[6]]},transfereechannel:{type:Sequelize[_0x4c3a[6]]},transfereecalleridnum:{type:Sequelize[_0x4c3a[6]]},transfereecalleridname:{type:Sequelize[_0x4c3a[6]]},transfereeconnectedlinenum:{type:Sequelize[_0x4c3a[6]]},transfereeconnectedlinename:{type:Sequelize[_0x4c3a[6]]},transfereeaccountcode:{type:Sequelize[_0x4c3a[6]]},transfereecontext:{type:Sequelize[_0x4c3a[6]]},transfereeexten:{type:Sequelize[_0x4c3a[6]]},transfereelinkedid:{type:Sequelize[_0x4c3a[6]]},isexternal:{type:Sequelize.ENUM(_0x4c3a[7],_0x4c3a[8])},context:{type:Sequelize[_0x4c3a[6]]},extension:{type:Sequelize[_0x4c3a[6]]}}
\ No newline at end of file
+var _0xbe37=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x62\x6C\x69\x6E\x64","\x61\x74\x74\x65\x6E\x64\x65\x64","\x53\x54\x52\x49\x4E\x47","\x59\x65\x73","\x4E\x6F"];_0xbe37[0];var Sequelize=require(_0xbe37[1]);var moment=require(_0xbe37[2]);module[_0xbe37[3]]= {type:{type:Sequelize.ENUM(_0xbe37[4],_0xbe37[5])},result:{type:Sequelize[_0xbe37[6]]},transfererchannel:{type:Sequelize[_0xbe37[6]]},transferercalleridnum:{type:Sequelize[_0xbe37[6]]},transferercalleridname:{type:Sequelize[_0xbe37[6]]},transfererconnectedlinenum:{type:Sequelize[_0xbe37[6]]},transfererconnectedlinename:{type:Sequelize[_0xbe37[6]]},transfereraccountcode:{type:Sequelize[_0xbe37[6]]},transferercontext:{type:Sequelize[_0xbe37[6]]},transfererexten:{type:Sequelize[_0xbe37[6]]},transfererlinkedid:{type:Sequelize[_0xbe37[6]]},transfereechannel:{type:Sequelize[_0xbe37[6]]},transfereecalleridnum:{type:Sequelize[_0xbe37[6]]},transfereecalleridname:{type:Sequelize[_0xbe37[6]]},transfereeconnectedlinenum:{type:Sequelize[_0xbe37[6]]},transfereeconnectedlinename:{type:Sequelize[_0xbe37[6]]},transfereeaccountcode:{type:Sequelize[_0xbe37[6]]},transfereecontext:{type:Sequelize[_0xbe37[6]]},transfereeexten:{type:Sequelize[_0xbe37[6]]},transfereelinkedid:{type:Sequelize[_0xbe37[6]]},isexternal:{type:Sequelize.ENUM(_0xbe37[7],_0xbe37[8])},context:{type:Sequelize[_0xbe37[6]]},extension:{type:Sequelize[_0xbe37[6]]}}
\ No newline at end of file
index 04b1d96..c71707d 100644 (file)
@@ -1 +1 @@
-var _0xdd28=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xdd28[0];var jsonpatch=require(_0xdd28[1]);var rp=require(_0xdd28[2]);var moment=require(_0xdd28[3]);var BPromise=require(_0xdd28[4]);var Mustache=require(_0xdd28[5]);var util=require(_0xdd28[6]);var path=require(_0xdd28[7]);var sox=require(_0xdd28[8]);var csv=require(_0xdd28[9]);var ejs=require(_0xdd28[10]);var fs=require(_0xdd28[11]);var _=require(_0xdd28[12]);var squel=require(_0xdd28[13]);var crypto=require(_0xdd28[14]);var jsforce=require(_0xdd28[15]);var deskjs=require(_0xdd28[16]);var toCsv=require(_0xdd28[9]);var querystring=require(_0xdd28[17]);var Papa=require(_0xdd28[18]);var qs=require(_0xdd28[19]);var logger=require(_0xdd28[21])(_0xdd28[20]);var utils=require(_0xdd28[22]);var config=require(_0xdd28[23]);var db=require(_0xdd28[25])[_0xdd28[24]];function respondWithStatusCode(_0xea3dx1a,_0xea3dx1b){_0xea3dx1b= _0xea3dx1b|| 204;return function(_0xea3dx1c){if(_0xea3dx1c){return _0xea3dx1a[_0xdd28[26]](_0xea3dx1b)};return _0xea3dx1a[_0xdd28[28]](_0xea3dx1b)[_0xdd28[27]]()}}function respondWithResult(_0xea3dx1a,_0xea3dx1b){_0xea3dx1b= _0xea3dx1b|| 200;return function(_0xea3dx1c){if(_0xea3dx1c){return _0xea3dx1a[_0xdd28[28]](_0xea3dx1b)[_0xdd28[29]](_0xea3dx1c)}}}function respondWithFilteredResult(_0xea3dx1a,_0xea3dx1f){return function(_0xea3dx1c){if(_0xea3dx1c){var _0xea3dx20=_0xea3dx1c[_0xdd28[30]],_0xea3dx21=_0xea3dx1f[_0xdd28[31]],_0xea3dx22=_0xea3dx1f[_0xdd28[31]]+ _0xea3dx1f[_0xdd28[32]],_0xea3dx1b;if(_0xea3dx22>= _0xea3dx20){_0xea3dx22= _0xea3dx20;_0xea3dx1b= 200}else {_0xea3dx1b= 206};_0xea3dx1a[_0xdd28[28]](_0xea3dx1b);return _0xea3dx1a[_0xdd28[36]](_0xdd28[33],_0xea3dx21+ _0xdd28[34]+ _0xea3dx22+ _0xdd28[35]+ _0xea3dx20)[_0xdd28[29]](_0xea3dx1c)};return null}}function patchUpdates(_0xea3dx24){return function(_0xea3dx1c){try{jsonpatch[_0xdd28[37]](_0xea3dx1c,_0xea3dx24,true)}catch(err){return BPromise[_0xdd28[38]](err)};return _0xea3dx1c[_0xdd28[39]]()}}function saveUpdates(_0xea3dx26,_0xea3dx1b){return function(_0xea3dx1c){if(_0xea3dx1c){return _0xea3dx1c[_0xdd28[41]](_0xea3dx26)[_0xdd28[40]](function(_0xea3dx27){return _0xea3dx27})};return null}}function removeEntity(_0xea3dx1a,_0xea3dx1b){return function(_0xea3dx1c){if(_0xea3dx1c){return _0xea3dx1c[_0xdd28[42]]()[_0xdd28[40]](function(){_0xea3dx1a[_0xdd28[28]](204)[_0xdd28[27]]()})}}}function handleEntityNotFound(_0xea3dx1a,_0xea3dx1b){return function(_0xea3dx1c){if(!_0xea3dx1c){_0xea3dx1a[_0xdd28[26]](404)};return _0xea3dx1c}}function handleError(_0xea3dx1a,_0xea3dx1b){_0xea3dx1b= _0xea3dx1b|| 500;return function(_0xea3dx2b){logger[_0xdd28[44]](_0xea3dx2b[_0xdd28[43]]);if(_0xea3dx2b[_0xdd28[45]]){delete _0xea3dx2b[_0xdd28[45]]};_0xea3dx1a[_0xdd28[28]](_0xea3dx1b)[_0xdd28[46]](_0xea3dx2b)}}exports[_0xdd28[47]]= function(_0xea3dx2c,_0xea3dx1a){var _0xea3dx1f={},_0xea3dx2d={},_0xea3dx2e={count:0,rows:[]};_0xea3dx2d[_0xdd28[48]]= _[_0xdd28[51]](db[_0xdd28[50]][_0xdd28[49]]);var _0xea3dx2f={dateStart:_0xea3dx2c[_0xdd28[53]][_0xdd28[52]],dateEnd:_0xea3dx2c[_0xdd28[53]][_0xdd28[54]]};delete _0xea3dx2c[_0xdd28[53]][_0xdd28[52]];delete _0xea3dx2c[_0xdd28[53]][_0xdd28[54]];_0xea3dx2d[_0xdd28[53]]= _[_0xdd28[51]](_0xea3dx2c[_0xdd28[53]]);_0xea3dx2d[_0xdd28[55]]= _[_0xdd28[56]](_0xea3dx2d[_0xdd28[48]],_0xea3dx2d[_0xdd28[53]]);_0xea3dx1f[_0xdd28[57]]= _[_0xdd28[56]](_0xea3dx2d[_0xdd28[48]],qs[_0xdd28[58]](_0xea3dx2c[_0xdd28[53]][_0xdd28[58]]));_0xea3dx1f[_0xdd28[57]]= (_0xea3dx1f[_0xdd28[57]][_0xdd28[59]])?_0xea3dx1f[_0xdd28[57]]:_0xea3dx2d[_0xdd28[48]];if(!_0xea3dx2c[_0xdd28[53]][_0xdd28[61]](_0xdd28[60])){_0xea3dx1f[_0xdd28[32]]= qs[_0xdd28[32]](_0xea3dx2c[_0xdd28[53]][_0xdd28[32]]);_0xea3dx1f[_0xdd28[31]]= qs[_0xdd28[31]](_0xea3dx2c[_0xdd28[53]][_0xdd28[31]])};_0xea3dx1f[_0xdd28[62]]= qs[_0xdd28[63]](_0xea3dx2c[_0xdd28[53]][_0xdd28[63]]);_0xea3dx1f[_0xdd28[64]]= qs[_0xdd28[55]](_[_0xdd28[65]](_0xea3dx2c[_0xdd28[53]],_0xea3dx2d[_0xdd28[55]]));if(_0xea3dx2f[_0xdd28[52]]){if(_0xea3dx2f[_0xdd28[54]]){_0xea3dx2f[_0xdd28[54]]= moment(_0xea3dx2f[_0xdd28[54]])[_0xdd28[67]](1,_0xdd28[66])}else {_0xea3dx2f[_0xdd28[54]]= moment(_0xea3dx2f[_0xdd28[52]])[_0xdd28[67]](1,_0xdd28[66])};_[_0xdd28[68]](_0xea3dx1f[_0xdd28[64]],{createdAt:{$gte:_0xea3dx2f[_0xdd28[52]],$lte:_0xea3dx2f[_0xdd28[54]]}})};if(_0xea3dx2c[_0xdd28[53]][_0xdd28[69]]){_0xea3dx1f[_0xdd28[64]]= _[_0xdd28[68]](_0xea3dx1f[_0xdd28[64]],{$or:_[_0xdd28[71]](_0xea3dx1f[_0xdd28[57]],function(_0xea3dx30){var _0xea3dx2e={};_0xea3dx2e[_0xea3dx30]= {$like:_0xdd28[70]+ _0xea3dx2c[_0xdd28[53]][_0xdd28[69]]+ _0xdd28[70]};return _0xea3dx2e})})};_0xea3dx1f= _[_0xdd28[68]]({},_0xea3dx1f,_0xea3dx2c[_0xdd28[72]]);var _0xea3dx31={where:_0xea3dx1f[_0xdd28[64]]};return db[_0xdd28[50]][_0xdd28[30]](_0xea3dx31)[_0xdd28[40]](function(_0xea3dx20){_0xea3dx2e[_0xdd28[30]]= _0xea3dx20;if(_0xea3dx2c[_0xdd28[53]][_0xdd28[75]]){_0xea3dx1f[_0xdd28[76]]= [{all:true}]};return db[_0xdd28[50]][_0xdd28[77]](_0xea3dx1f)})[_0xdd28[40]](function(_0xea3dx32){_0xea3dx2e[_0xdd28[74]]= _0xea3dx32;return _0xea3dx2e})[_0xdd28[40]](respondWithFilteredResult(_0xea3dx1a,_0xea3dx1f))[_0xdd28[73]](handleError(_0xea3dx1a,null))};exports[_0xdd28[78]]= function(_0xea3dx2c,_0xea3dx1a){var _0xea3dx1f={raw:true,where:{id:_0xea3dx2c[_0xdd28[80]][_0xdd28[79]]}},_0xea3dx2d={};_0xea3dx2d[_0xdd28[48]]= _[_0xdd28[51]](db[_0xdd28[50]][_0xdd28[49]]);_0xea3dx2d[_0xdd28[53]]= _[_0xdd28[51]](_0xea3dx2c[_0xdd28[53]]);_0xea3dx2d[_0xdd28[55]]= _[_0xdd28[56]](_0xea3dx2d[_0xdd28[48]],_0xea3dx2d[_0xdd28[53]]);_0xea3dx1f[_0xdd28[57]]= _[_0xdd28[56]](_0xea3dx2d[_0xdd28[48]],qs[_0xdd28[58]](_0xea3dx2c[_0xdd28[53]][_0xdd28[58]]));_0xea3dx1f[_0xdd28[57]]= (_0xea3dx1f[_0xdd28[57]][_0xdd28[59]])?_0xea3dx1f[_0xdd28[57]]:_0xea3dx2d[_0xdd28[48]];if(_0xea3dx2c[_0xdd28[53]][_0xdd28[75]]){_0xea3dx1f[_0xdd28[76]]= [{all:true}]};_0xea3dx1f= _[_0xdd28[68]]({},_0xea3dx1f,_0xea3dx2c[_0xdd28[72]]);return db[_0xdd28[50]][_0xdd28[81]](_0xea3dx1f)[_0xdd28[40]](handleEntityNotFound(_0xea3dx1a,null))[_0xdd28[40]](respondWithResult(_0xea3dx1a,null))[_0xdd28[73]](handleError(_0xea3dx1a,null))};exports[_0xdd28[82]]= function(_0xea3dx2c,_0xea3dx1a){return db[_0xdd28[50]][_0xdd28[82]](_0xea3dx2c[_0xdd28[83]],{})[_0xdd28[40]](respondWithResult(_0xea3dx1a,201))[_0xdd28[73]](handleError(_0xea3dx1a,null))};exports[_0xdd28[41]]= function(_0xea3dx2c,_0xea3dx1a){if(_0xea3dx2c[_0xdd28[83]][_0xdd28[79]]){delete _0xea3dx2c[_0xdd28[83]][_0xdd28[79]]};return db[_0xdd28[50]][_0xdd28[81]]({where:{id:_0xea3dx2c[_0xdd28[80]][_0xdd28[79]]}})[_0xdd28[40]](handleEntityNotFound(_0xea3dx1a,null))[_0xdd28[40]](saveUpdates(_0xea3dx2c[_0xdd28[83]],null))[_0xdd28[40]](respondWithResult(_0xea3dx1a,null))[_0xdd28[73]](handleError(_0xea3dx1a,null))};exports[_0xdd28[42]]= function(_0xea3dx2c,_0xea3dx1a){return db[_0xdd28[50]][_0xdd28[81]]({where:{id:_0xea3dx2c[_0xdd28[80]][_0xdd28[79]]}})[_0xdd28[40]](handleEntityNotFound(_0xea3dx1a,null))[_0xdd28[40]](removeEntity(_0xea3dx1a,null))[_0xdd28[73]](handleError(_0xea3dx1a,null))}
\ No newline at end of file
+var _0xbd50=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x75\x73\x74\x61\x63\x68\x65","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x74\x6F\x2D\x63\x73\x76","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x64\x65\x73\x6B\x2E\x6A\x73","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x56\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74","\x6B\x65\x79\x73","\x64\x61\x74\x65\x53\x74\x61\x72\x74","\x71\x75\x65\x72\x79","\x64\x61\x74\x65\x45\x6E\x64","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x64\x61\x79","\x61\x64\x64","\x6D\x65\x72\x67\x65","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x69\x6E\x63\x6C\x75\x64\x65\x41\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0xbd50[0];var jsonpatch=require(_0xbd50[1]);var rp=require(_0xbd50[2]);var moment=require(_0xbd50[3]);var BPromise=require(_0xbd50[4]);var Mustache=require(_0xbd50[5]);var util=require(_0xbd50[6]);var path=require(_0xbd50[7]);var sox=require(_0xbd50[8]);var csv=require(_0xbd50[9]);var ejs=require(_0xbd50[10]);var fs=require(_0xbd50[11]);var _=require(_0xbd50[12]);var squel=require(_0xbd50[13]);var crypto=require(_0xbd50[14]);var jsforce=require(_0xbd50[15]);var deskjs=require(_0xbd50[16]);var toCsv=require(_0xbd50[9]);var querystring=require(_0xbd50[17]);var Papa=require(_0xbd50[18]);var qs=require(_0xbd50[19]);var logger=require(_0xbd50[21])(_0xbd50[20]);var utils=require(_0xbd50[22]);var config=require(_0xbd50[23]);var db=require(_0xbd50[25])[_0xbd50[24]];function respondWithStatusCode(_0xda48x1a,_0xda48x1b){_0xda48x1b= _0xda48x1b|| 204;return function(_0xda48x1c){if(_0xda48x1c){return _0xda48x1a[_0xbd50[26]](_0xda48x1b)};return _0xda48x1a[_0xbd50[28]](_0xda48x1b)[_0xbd50[27]]()}}function respondWithResult(_0xda48x1a,_0xda48x1b){_0xda48x1b= _0xda48x1b|| 200;return function(_0xda48x1c){if(_0xda48x1c){return _0xda48x1a[_0xbd50[28]](_0xda48x1b)[_0xbd50[29]](_0xda48x1c)}}}function respondWithFilteredResult(_0xda48x1a,_0xda48x1f){return function(_0xda48x1c){if(_0xda48x1c){var _0xda48x20=_0xda48x1c[_0xbd50[30]],_0xda48x21=_0xda48x1f[_0xbd50[31]],_0xda48x22=_0xda48x1f[_0xbd50[31]]+ _0xda48x1f[_0xbd50[32]],_0xda48x1b;if(_0xda48x22>= _0xda48x20){_0xda48x22= _0xda48x20;_0xda48x1b= 200}else {_0xda48x1b= 206};_0xda48x1a[_0xbd50[28]](_0xda48x1b);return _0xda48x1a[_0xbd50[36]](_0xbd50[33],_0xda48x21+ _0xbd50[34]+ _0xda48x22+ _0xbd50[35]+ _0xda48x20)[_0xbd50[29]](_0xda48x1c)};return null}}function patchUpdates(_0xda48x24){return function(_0xda48x1c){try{jsonpatch[_0xbd50[37]](_0xda48x1c,_0xda48x24,true)}catch(err){return BPromise[_0xbd50[38]](err)};return _0xda48x1c[_0xbd50[39]]()}}function saveUpdates(_0xda48x26,_0xda48x1b){return function(_0xda48x1c){if(_0xda48x1c){return _0xda48x1c[_0xbd50[41]](_0xda48x26)[_0xbd50[40]](function(_0xda48x27){return _0xda48x27})};return null}}function removeEntity(_0xda48x1a,_0xda48x1b){return function(_0xda48x1c){if(_0xda48x1c){return _0xda48x1c[_0xbd50[42]]()[_0xbd50[40]](function(){_0xda48x1a[_0xbd50[28]](204)[_0xbd50[27]]()})}}}function handleEntityNotFound(_0xda48x1a,_0xda48x1b){return function(_0xda48x1c){if(!_0xda48x1c){_0xda48x1a[_0xbd50[26]](404)};return _0xda48x1c}}function handleError(_0xda48x1a,_0xda48x1b){_0xda48x1b= _0xda48x1b|| 500;return function(_0xda48x2b){logger[_0xbd50[44]](_0xda48x2b[_0xbd50[43]]);if(_0xda48x2b[_0xbd50[45]]){delete _0xda48x2b[_0xbd50[45]]};_0xda48x1a[_0xbd50[28]](_0xda48x1b)[_0xbd50[46]](_0xda48x2b)}}exports[_0xbd50[47]]= function(_0xda48x2c,_0xda48x1a){var _0xda48x1f={},_0xda48x2d={},_0xda48x2e={count:0,rows:[]};_0xda48x2d[_0xbd50[48]]= _[_0xbd50[51]](db[_0xbd50[50]][_0xbd50[49]]);var _0xda48x2f={dateStart:_0xda48x2c[_0xbd50[53]][_0xbd50[52]],dateEnd:_0xda48x2c[_0xbd50[53]][_0xbd50[54]]};delete _0xda48x2c[_0xbd50[53]][_0xbd50[52]];delete _0xda48x2c[_0xbd50[53]][_0xbd50[54]];_0xda48x2d[_0xbd50[53]]= _[_0xbd50[51]](_0xda48x2c[_0xbd50[53]]);_0xda48x2d[_0xbd50[55]]= _[_0xbd50[56]](_0xda48x2d[_0xbd50[48]],_0xda48x2d[_0xbd50[53]]);_0xda48x1f[_0xbd50[57]]= _[_0xbd50[56]](_0xda48x2d[_0xbd50[48]],qs[_0xbd50[58]](_0xda48x2c[_0xbd50[53]][_0xbd50[58]]));_0xda48x1f[_0xbd50[57]]= (_0xda48x1f[_0xbd50[57]][_0xbd50[59]])?_0xda48x1f[_0xbd50[57]]:_0xda48x2d[_0xbd50[48]];if(!_0xda48x2c[_0xbd50[53]][_0xbd50[61]](_0xbd50[60])){_0xda48x1f[_0xbd50[32]]= qs[_0xbd50[32]](_0xda48x2c[_0xbd50[53]][_0xbd50[32]]);_0xda48x1f[_0xbd50[31]]= qs[_0xbd50[31]](_0xda48x2c[_0xbd50[53]][_0xbd50[31]])};_0xda48x1f[_0xbd50[62]]= qs[_0xbd50[63]](_0xda48x2c[_0xbd50[53]][_0xbd50[63]]);_0xda48x1f[_0xbd50[64]]= qs[_0xbd50[55]](_[_0xbd50[65]](_0xda48x2c[_0xbd50[53]],_0xda48x2d[_0xbd50[55]]));if(_0xda48x2f[_0xbd50[52]]){if(_0xda48x2f[_0xbd50[54]]){_0xda48x2f[_0xbd50[54]]= moment(_0xda48x2f[_0xbd50[54]])[_0xbd50[67]](1,_0xbd50[66])}else {_0xda48x2f[_0xbd50[54]]= moment(_0xda48x2f[_0xbd50[52]])[_0xbd50[67]](1,_0xbd50[66])};_[_0xbd50[68]](_0xda48x1f[_0xbd50[64]],{createdAt:{$gte:_0xda48x2f[_0xbd50[52]],$lte:_0xda48x2f[_0xbd50[54]]}})};if(_0xda48x2c[_0xbd50[53]][_0xbd50[69]]){_0xda48x1f[_0xbd50[64]]= _[_0xbd50[68]](_0xda48x1f[_0xbd50[64]],{$or:_[_0xbd50[71]](_0xda48x1f[_0xbd50[57]],function(_0xda48x30){var _0xda48x2e={};_0xda48x2e[_0xda48x30]= {$like:_0xbd50[70]+ _0xda48x2c[_0xbd50[53]][_0xbd50[69]]+ _0xbd50[70]};return _0xda48x2e})})};_0xda48x1f= _[_0xbd50[68]]({},_0xda48x1f,_0xda48x2c[_0xbd50[72]]);var _0xda48x31={where:_0xda48x1f[_0xbd50[64]]};return db[_0xbd50[50]][_0xbd50[30]](_0xda48x31)[_0xbd50[40]](function(_0xda48x20){_0xda48x2e[_0xbd50[30]]= _0xda48x20;if(_0xda48x2c[_0xbd50[53]][_0xbd50[75]]){_0xda48x1f[_0xbd50[76]]= [{all:true}]};return db[_0xbd50[50]][_0xbd50[77]](_0xda48x1f)})[_0xbd50[40]](function(_0xda48x32){_0xda48x2e[_0xbd50[74]]= _0xda48x32;return _0xda48x2e})[_0xbd50[40]](respondWithFilteredResult(_0xda48x1a,_0xda48x1f))[_0xbd50[73]](handleError(_0xda48x1a,null))};exports[_0xbd50[78]]= function(_0xda48x2c,_0xda48x1a){var _0xda48x1f={raw:true,where:{id:_0xda48x2c[_0xbd50[80]][_0xbd50[79]]}},_0xda48x2d={};_0xda48x2d[_0xbd50[48]]= _[_0xbd50[51]](db[_0xbd50[50]][_0xbd50[49]]);_0xda48x2d[_0xbd50[53]]= _[_0xbd50[51]](_0xda48x2c[_0xbd50[53]]);_0xda48x2d[_0xbd50[55]]= _[_0xbd50[56]](_0xda48x2d[_0xbd50[48]],_0xda48x2d[_0xbd50[53]]);_0xda48x1f[_0xbd50[57]]= _[_0xbd50[56]](_0xda48x2d[_0xbd50[48]],qs[_0xbd50[58]](_0xda48x2c[_0xbd50[53]][_0xbd50[58]]));_0xda48x1f[_0xbd50[57]]= (_0xda48x1f[_0xbd50[57]][_0xbd50[59]])?_0xda48x1f[_0xbd50[57]]:_0xda48x2d[_0xbd50[48]];if(_0xda48x2c[_0xbd50[53]][_0xbd50[75]]){_0xda48x1f[_0xbd50[76]]= [{all:true}]};_0xda48x1f= _[_0xbd50[68]]({},_0xda48x1f,_0xda48x2c[_0xbd50[72]]);return db[_0xbd50[50]][_0xbd50[81]](_0xda48x1f)[_0xbd50[40]](handleEntityNotFound(_0xda48x1a,null))[_0xbd50[40]](respondWithResult(_0xda48x1a,null))[_0xbd50[73]](handleError(_0xda48x1a,null))};exports[_0xbd50[82]]= function(_0xda48x2c,_0xda48x1a){return db[_0xbd50[50]][_0xbd50[82]](_0xda48x2c[_0xbd50[83]],{})[_0xbd50[40]](respondWithResult(_0xda48x1a,201))[_0xbd50[73]](handleError(_0xda48x1a,null))};exports[_0xbd50[41]]= function(_0xda48x2c,_0xda48x1a){if(_0xda48x2c[_0xbd50[83]][_0xbd50[79]]){delete _0xda48x2c[_0xbd50[83]][_0xbd50[79]]};return db[_0xbd50[50]][_0xbd50[81]]({where:{id:_0xda48x2c[_0xbd50[80]][_0xbd50[79]]}})[_0xbd50[40]](handleEntityNotFound(_0xda48x1a,null))[_0xbd50[40]](saveUpdates(_0xda48x2c[_0xbd50[83]],null))[_0xbd50[40]](respondWithResult(_0xda48x1a,null))[_0xbd50[73]](handleError(_0xda48x1a,null))};exports[_0xbd50[42]]= function(_0xda48x2c,_0xda48x1a){return db[_0xbd50[50]][_0xbd50[81]]({where:{id:_0xda48x2c[_0xbd50[80]][_0xbd50[79]]}})[_0xbd50[40]](handleEntityNotFound(_0xda48x1a,null))[_0xbd50[40]](removeEntity(_0xda48x1a,null))[_0xbd50[73]](handleError(_0xda48x1a,null))}
\ No newline at end of file
index 6b7949c..ea9d356 100644 (file)
@@ -1 +1 @@
-var _0x48d0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x5F\x74\x72\x61\x6E\x73\x66\x65\x72","\x64\x65\x66\x69\x6E\x65"];_0x48d0[0];var _=require(_0x48d0[1]);var util=require(_0x48d0[2]);var logger=require(_0x48d0[4])(_0x48d0[3]);var moment=require(_0x48d0[5]);var BPromise=require(_0x48d0[6]);var rp=require(_0x48d0[7]);var attributes=require(_0x48d0[8]);module[_0x48d0[9]]= function(_0x2ff6x8,_0x2ff6x9){return _0x2ff6x8[_0x48d0[12]](_0x48d0[10],attributes,{tableName:_0x48d0[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
+var _0x1b61=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73","\x56\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x5F\x74\x72\x61\x6E\x73\x66\x65\x72","\x64\x65\x66\x69\x6E\x65"];_0x1b61[0];var _=require(_0x1b61[1]);var util=require(_0x1b61[2]);var logger=require(_0x1b61[4])(_0x1b61[3]);var moment=require(_0x1b61[5]);var BPromise=require(_0x1b61[6]);var rp=require(_0x1b61[7]);var attributes=require(_0x1b61[8]);module[_0x1b61[9]]= function(_0xafd8x8,_0xafd8x9){return _0xafd8x8[_0x1b61[12]](_0x1b61[10],attributes,{tableName:_0x1b61[11],paranoid:false,indexes:[],timestamps:true})}
\ No newline at end of file
index 9b7dbd5..5f1371f 100644 (file)
@@ -1 +1 @@
-var _0x1923=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74"];_0x1923[0];var _=require(_0x1923[1]);var util=require(_0x1923[2]);var moment=require(_0x1923[3]);var BPromise=require(_0x1923[4]);var rs=require(_0x1923[5]);var fs=require(_0x1923[6]);var db=require(_0x1923[8])[_0x1923[7]];var utils=require(_0x1923[9]);var logger=require(_0x1923[11])(_0x1923[10]);var config=require(_0x1923[12]);var jayson=require(_0x1923[13]);var client=jayson[_0x1923[15]][_0x1923[14]]({port:9002});function respondWithRpcPromise(_0xc310xe,_0xc310xf,_0xc310x10){return  new BPromise(function(_0xc310x11,_0xc310x12){return client[_0x1923[28]](_0xc310xe,_0xc310x10)[_0x1923[27]](function(_0xc310x14){logger[_0x1923[20]](_0x1923[16],_0xc310xf,_0x1923[19]);logger[_0x1923[23]](_0x1923[21],_0xc310xf,_0x1923[19],JSON[_0x1923[22]](_0xc310x14));if(_0xc310x14[_0x1923[17]]){if(_0xc310x14[_0x1923[17]][_0x1923[24]]=== 500){logger[_0x1923[17]](_0x1923[16],_0xc310xf,_0xc310x14[_0x1923[17]][_0x1923[25]]);return _0xc310x12(_0xc310x14[_0x1923[17]][_0x1923[25]])};logger[_0x1923[17]](_0x1923[16],_0xc310xf,_0xc310x14[_0x1923[17]][_0x1923[25]]);return _0xc310x11(_0xc310x14[_0x1923[17]][_0x1923[25]])}else {logger[_0x1923[20]](_0x1923[16],_0xc310xf,_0x1923[19]);_0xc310x11(_0xc310x14[_0x1923[26]][_0x1923[25]])}})[_0x1923[18]](function(_0xc310x13){logger[_0x1923[17]](_0x1923[16],_0xc310xf,_0xc310x13);_0xc310x12(_0xc310x13)})})}exports[_0x1923[29]]= function(_0xc310x10){var _0xc310x15=this;return  new Promise(function(_0xc310x11,_0xc310x12){return db[_0x1923[34]][_0x1923[33]](_0xc310x10[_0x1923[30]],{raw:_0xc310x10[_0x1923[31]]?(_0xc310x10[_0x1923[31]][_0x1923[32]]=== undefined)?true:false:true})[_0x1923[27]](function(_0xc310x14){logger[_0x1923[20]](_0x1923[29],_0xc310x10);logger[_0x1923[23]](_0x1923[29],_0xc310x10,JSON[_0x1923[22]](_0xc310x14));_0xc310x11(_0xc310x14)})[_0x1923[18]](function(_0xc310x13){logger[_0x1923[17]](_0x1923[29],_0xc310x13[_0x1923[25]],_0xc310x10);_0xc310x12(_0xc310x15[_0x1923[17]](500,_0xc310x13[_0x1923[25]]))})})}
\ No newline at end of file
+var _0xd506=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x56\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x56\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x63\x6F\x64\x65","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74","\x62\x6F\x64\x79","\x6F\x70\x74\x69\x6F\x6E\x73","\x72\x61\x77","\x63\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74"];_0xd506[0];var _=require(_0xd506[1]);var util=require(_0xd506[2]);var moment=require(_0xd506[3]);var BPromise=require(_0xd506[4]);var rs=require(_0xd506[5]);var fs=require(_0xd506[6]);var db=require(_0xd506[8])[_0xd506[7]];var utils=require(_0xd506[9]);var logger=require(_0xd506[11])(_0xd506[10]);var config=require(_0xd506[12]);var jayson=require(_0xd506[13]);var client=jayson[_0xd506[15]][_0xd506[14]]({port:9002});function respondWithRpcPromise(_0xcbe8xe,_0xcbe8xf,_0xcbe8x10){return  new BPromise(function(_0xcbe8x11,_0xcbe8x12){return client[_0xd506[28]](_0xcbe8xe,_0xcbe8x10)[_0xd506[27]](function(_0xcbe8x14){logger[_0xd506[20]](_0xd506[16],_0xcbe8xf,_0xd506[19]);logger[_0xd506[23]](_0xd506[21],_0xcbe8xf,_0xd506[19],JSON[_0xd506[22]](_0xcbe8x14));if(_0xcbe8x14[_0xd506[17]]){if(_0xcbe8x14[_0xd506[17]][_0xd506[24]]=== 500){logger[_0xd506[17]](_0xd506[16],_0xcbe8xf,_0xcbe8x14[_0xd506[17]][_0xd506[25]]);return _0xcbe8x12(_0xcbe8x14[_0xd506[17]][_0xd506[25]])};logger[_0xd506[17]](_0xd506[16],_0xcbe8xf,_0xcbe8x14[_0xd506[17]][_0xd506[25]]);return _0xcbe8x11(_0xcbe8x14[_0xd506[17]][_0xd506[25]])}else {logger[_0xd506[20]](_0xd506[16],_0xcbe8xf,_0xd506[19]);_0xcbe8x11(_0xcbe8x14[_0xd506[26]][_0xd506[25]])}})[_0xd506[18]](function(_0xcbe8x13){logger[_0xd506[17]](_0xd506[16],_0xcbe8xf,_0xcbe8x13);_0xcbe8x12(_0xcbe8x13)})})}exports[_0xd506[29]]= function(_0xcbe8x10){var _0xcbe8x15=this;return  new Promise(function(_0xcbe8x11,_0xcbe8x12){return db[_0xd506[34]][_0xd506[33]](_0xcbe8x10[_0xd506[30]],{raw:_0xcbe8x10[_0xd506[31]]?(_0xcbe8x10[_0xd506[31]][_0xd506[32]]=== undefined)?true:false:true})[_0xd506[27]](function(_0xcbe8x14){logger[_0xd506[20]](_0xd506[29],_0xcbe8x10);logger[_0xd506[23]](_0xd506[29],_0xcbe8x10,JSON[_0xd506[22]](_0xcbe8x14));_0xcbe8x11(_0xcbe8x14)})[_0xd506[18]](function(_0xcbe8x13){logger[_0xd506[17]](_0xd506[29],_0xcbe8x13[_0xd506[25]],_0xcbe8x10);_0xcbe8x12(_0xcbe8x15[_0xd506[17]](500,_0xcbe8x13[_0xd506[25]]))})})}
\ No newline at end of file
index 67f62e0..5b5d08b 100644 (file)
@@ -1 +1 @@
-var _0xcd1a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2F\x72\x70\x63","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x61\x70\x70","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x70\x6D\x32","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65","\x53\x65\x72\x76\x65\x72\x20\x66\x61\x69\x6C\x65\x64\x20\x74\x6F\x20\x73\x74\x61\x72\x74\x20\x64\x75\x65\x20\x74\x6F\x20\x65\x72\x72\x6F\x72\x3A\x20\x25\x73","\x65\x72\x72\x6F\x72","\x65\x78\x69\x74","\x63\x61\x74\x63\x68","\x4F\x6E\x6C\x69\x6E\x65\x20\x61\x70\x70\x73\x3A","\x6A\x6F\x69\x6E","\x6F\x6E\x6C\x69\x6E\x65","\x66\x69\x6C\x74\x65\x72","\x6E\x61\x6D\x65","\x6D\x61\x70","\x69\x6E\x66\x6F","\x4F\x66\x66\x6C\x69\x6E\x65\x20\x61\x70\x70\x73\x3A","\x73\x74\x61\x74\x75\x73","\x4E\x6F\x6E\x65","\x73\x65\x65\x64\x44\x42","\x64\x65\x66\x61\x75\x6C\x74","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x65\x65\x64\x44\x42","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65","\x74\x68\x65\x6E","\x73\x74\x61\x72\x74","\x6C\x69\x73\x74\x65\x6E","\x73\x79\x6E\x63","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x64\x62"];_0xcd1a[0];var _=require(_0xcd1a[1]);var mysqldb=require(_0xcd1a[2]);var rpc=require(_0xcd1a[3]);var config=require(_0xcd1a[4]);var logger=require(_0xcd1a[6])(_0xcd1a[5]);var pm2=require(_0xcd1a[7]);var schedule=require(_0xcd1a[8]);return mysqldb[_0xcd1a[32]][_0xcd1a[31]][_0xcd1a[30]]()[_0xcd1a[27]](function(){return rpc[_0xcd1a[29]]()})[_0xcd1a[27]](function(_0xe527xb){logger[_0xcd1a[19]](_0xe527xb);return schedule[_0xcd1a[28]]()})[_0xcd1a[27]](function(_0xe527xb){logger[_0xcd1a[19]](_0xe527xb);return pm2[_0xcd1a[28]]()})[_0xcd1a[27]](function(_0xe527x9){logger[_0xcd1a[19]](_0xcd1a[13],_[_0xcd1a[18]](_[_0xcd1a[16]](_0xe527x9,{status:_0xcd1a[15]}),_0xcd1a[17])[_0xcd1a[14]]());logger[_0xcd1a[19]](_0xcd1a[20],_[_0xcd1a[18]](_[_0xcd1a[16]](_0xe527x9,function(_0xe527xa){return _0xe527xa[_0xcd1a[21]]!== _0xcd1a[15]}),_0xcd1a[17])[_0xcd1a[14]]()|| _0xcd1a[22]);config[_0xcd1a[23]]&& require(_0xcd1a[25])[_0xcd1a[24]]();require(_0xcd1a[26])[_0xcd1a[24]]()})[_0xcd1a[12]](function(_0xe527x8){logger[_0xcd1a[10]](_0xcd1a[9],_0xe527x8);process[_0xcd1a[11]](1)})
\ No newline at end of file
+var _0x255f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2F\x72\x70\x63","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x61\x70\x70","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x70\x6D\x32","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65","\x53\x65\x72\x76\x65\x72\x20\x66\x61\x69\x6C\x65\x64\x20\x74\x6F\x20\x73\x74\x61\x72\x74\x20\x64\x75\x65\x20\x74\x6F\x20\x65\x72\x72\x6F\x72\x3A\x20\x25\x73","\x65\x72\x72\x6F\x72","\x65\x78\x69\x74","\x63\x61\x74\x63\x68","\x4F\x6E\x6C\x69\x6E\x65\x20\x61\x70\x70\x73\x3A","\x6A\x6F\x69\x6E","\x6F\x6E\x6C\x69\x6E\x65","\x66\x69\x6C\x74\x65\x72","\x6E\x61\x6D\x65","\x6D\x61\x70","\x69\x6E\x66\x6F","\x4F\x66\x66\x6C\x69\x6E\x65\x20\x61\x70\x70\x73\x3A","\x73\x74\x61\x74\x75\x73","\x4E\x6F\x6E\x65","\x73\x65\x65\x64\x44\x42","\x64\x65\x66\x61\x75\x6C\x74","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x65\x65\x64\x44\x42","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65","\x74\x68\x65\x6E","\x73\x74\x61\x72\x74","\x6C\x69\x73\x74\x65\x6E","\x73\x79\x6E\x63","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x64\x62"];_0x255f[0];var _=require(_0x255f[1]);var mysqldb=require(_0x255f[2]);var rpc=require(_0x255f[3]);var config=require(_0x255f[4]);var logger=require(_0x255f[6])(_0x255f[5]);var pm2=require(_0x255f[7]);var schedule=require(_0x255f[8]);return mysqldb[_0x255f[32]][_0x255f[31]][_0x255f[30]]()[_0x255f[27]](function(){return rpc[_0x255f[29]]()})[_0x255f[27]](function(_0x3832xb){logger[_0x255f[19]](_0x3832xb);return schedule[_0x255f[28]]()})[_0x255f[27]](function(_0x3832xb){logger[_0x255f[19]](_0x3832xb);return pm2[_0x255f[28]]()})[_0x255f[27]](function(_0x3832x9){logger[_0x255f[19]](_0x255f[13],_[_0x255f[18]](_[_0x255f[16]](_0x3832x9,{status:_0x255f[15]}),_0x255f[17])[_0x255f[14]]());logger[_0x255f[19]](_0x255f[20],_[_0x255f[18]](_[_0x255f[16]](_0x3832x9,function(_0x3832xa){return _0x3832xa[_0x255f[21]]!== _0x255f[15]}),_0x255f[17])[_0x255f[14]]()|| _0x255f[22]);config[_0x255f[23]]&& require(_0x255f[25])[_0x255f[24]]();require(_0x255f[26])[_0x255f[24]]()})[_0x255f[12]](function(_0x3832x8){logger[_0x255f[10]](_0x255f[9],_0x3832x8);process[_0x255f[11]](1)})
\ No newline at end of file
index 6ddf30f..d4cfb4f 100644 (file)
@@ -1 +1 @@
-var _0x9b22=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x6A\x73\x6F\x6E\x77\x65\x62\x74\x6F\x6B\x65\x6E","\x65\x78\x70\x72\x65\x73\x73\x2D\x6A\x77\x74","\x63\x6F\x6D\x70\x6F\x73\x61\x62\x6C\x65\x2D\x6D\x69\x64\x64\x6C\x65\x77\x61\x72\x65","\x62\x61\x73\x69\x63\x2D\x61\x75\x74\x68","\x69\x70\x61\x64\x64\x72\x2E\x6A\x73","\x73\x65\x73\x73\x69\x6F\x6E","\x73\x65\x63\x72\x65\x74\x73","\x69\x64","\x72\x6F\x6C\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x65\x6D\x61\x69\x6C","\x75\x73\x65\x72\x70\x69\x63","\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x73\x6D\x73\x50\x61\x75\x73\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x50\x61\x75\x73\x65","\x70\x61\x75\x73\x65\x54\x79\x70\x65","\x73\x68\x6F\x77\x57\x65\x62\x42\x61\x72","\x70\x68\x6F\x6E\x65\x42\x61\x72\x52\x65\x6D\x6F\x74\x65\x43\x6F\x6E\x74\x72\x6F\x6C\x50\x6F\x72\x74","\x70\x68\x6F\x6E\x65\x42\x61\x72\x52\x65\x6D\x6F\x74\x65\x43\x6F\x6E\x74\x72\x6F\x6C","\x69\x73\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x41\x75\x74\x68\x6F\x72\x69\x7A\x65\x64","\x75\x73\x65\x72","\x63\x61\x74\x63\x68","\x63\x6C\x6F\x73\x65\x64","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64\x2E","\x46\x6F\x72\x62\x69\x64\x64\x65\x6E\x2E","\x6A\x73\x6F\x6E","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x75\x73\x65","\x55\x73\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E","\x66\x69\x6E\x64","\x55\x73\x65\x72","\x55\x73\x65\x72\x20\x6F\x62\x6A\x65\x63\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E","\x61\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x68\x65\x61\x64\x65\x72\x73","\x42\x61\x73\x69\x63","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x70\x61\x73\x73","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73\x2E","\x42\x65\x61\x72\x65\x72","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x61\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E\x20\x66\x6F\x72\x6D\x61\x74\x2E","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x75\x70\x64\x61\x74\x65","\x46\x6F\x72\x62\x69\x64\x64\x65\x6E","\x67\x65\x74\x4C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x75\x74\x69\x6C","\x63\x61\x6E\x55\x70\x64\x61\x74\x65","\x73\x69\x67\x6E","\x73\x69\x67\x6E\x54\x6F\x6B\x65\x6E","\x68\x61\x73\x52\x6F\x6C\x65","\x52\x65\x71\x75\x69\x72\x65\x64\x20\x72\x6F\x6C\x65\x20\x6E\x65\x65\x64\x73\x20\x74\x6F\x20\x62\x65\x20\x73\x65\x74","\x69\x6E\x64\x65\x78\x4F\x66","\x75\x73\x65\x72\x52\x6F\x6C\x65\x73","\x73\x65\x74\x54\x6F\x6B\x65\x6E\x43\x6F\x6F\x6B\x69\x65","\x49\x74\x20\x6C\x6F\x6F\x6B\x73\x20\x6C\x69\x6B\x65\x20\x79\x6F\x75\x20\x61\x72\x65\x6E\x27\x74\x20\x6C\x6F\x67\x67\x65\x64\x20\x69\x6E\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x74\x72\x79\x20\x61\x67\x61\x69\x6E\x2E","\x6D\x6F\x74\x69\x6F\x6E\x2E\x74\x6F\x6B\x65\x6E","\x63\x6F\x6F\x6B\x69\x65","\x6D\x6F\x74\x69\x6F\x6E\x2E\x75\x73\x65\x72","\x70\x69\x63\x6B","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73\x2F\x67\x65\x6E\x65\x72\x61\x6C","\x72\x65\x64\x69\x72\x65\x63\x74"];_0x9b22[0];var db=require(_0x9b22[2])[_0x9b22[1]];var config=require(_0x9b22[3]);var _=require(_0x9b22[4]);var jwt=require(_0x9b22[5]);var expressJwt=require(_0x9b22[6]);var compose=require(_0x9b22[7]);var basicAuth=require(_0x9b22[8]);var ipaddr=require(_0x9b22[9]);var validateJwt=expressJwt({secret:config[_0x9b22[11]][_0x9b22[10]]});var userAttributes=[_0x9b22[12],_0x9b22[13],_0x9b22[14],_0x9b22[15],_0x9b22[16],_0x9b22[17],_0x9b22[18],_0x9b22[19],_0x9b22[20],_0x9b22[21],_0x9b22[22],_0x9b22[23],_0x9b22[24],_0x9b22[25],_0x9b22[26],_0x9b22[27],_0x9b22[28],_0x9b22[29]];exports[_0x9b22[30]]= function(){return isAuthenticated(true)[_0x9b22[44]](function(_0x397dxb,_0x397dxc,_0x397dxd){if(_0x397dxb[_0x9b22[31]]){_0x397dxd()}else {return db[_0x9b22[43]][_0x9b22[42]]({where:{id:_0x397dxb[_0x9b22[41]][_0x9b22[12]]},attributes:[_0x9b22[12],_0x9b22[33],_0x9b22[34]],raw:true})[_0x9b22[40]](function(_0x397dxf){if(_0x397dxf&& _0x397dxf[_0x9b22[33]]){return _0x397dxc[_0x9b22[39]](_0x397dxf[_0x9b22[34]]=== _0x9b22[35]?405:403)[_0x9b22[38]]({message:_0x397dxf[_0x9b22[34]]=== _0x9b22[35]?_0x9b22[36]:_0x9b22[37]})}else {_0x397dxd()}})[_0x9b22[32]](function(_0x397dxe){_0x397dxd(_0x397dxe)})}})};function isAuthenticated(_0x397dx11){return compose()[_0x9b22[44]](function(_0x397dxb,_0x397dxc,_0x397dxd){if(_0x397dxb[_0x9b22[50]][_0x9b22[49]]){if(_[_0x9b22[52]](_0x397dxb[_0x9b22[50]][_0x9b22[49]],_0x9b22[51])){var _0x397dx13=basicAuth(_0x397dxb);db[_0x9b22[47]][_0x9b22[46]]({where:{name:_0x397dx13[_0x9b22[15]]}})[_0x9b22[40]](function(_0x397dx12){if(!_0x397dx12||  !_0x397dx12[_0x9b22[54]](_0x397dx13[_0x9b22[53]])){return _0x397dxc[_0x9b22[39]](401)[_0x9b22[38]]({message:_0x9b22[55]})};_0x397dxb[_0x9b22[31]]= {id:_0x397dx12[_0x9b22[12]]};_0x397dxd()})[_0x9b22[32]](function(_0x397dxe){_0x397dxd(_0x397dxe)})}else {if(_[_0x9b22[52]](_0x397dxb[_0x9b22[50]][_0x9b22[49]],_0x9b22[56])){validateJwt(_0x397dxb,_0x397dxc,_0x397dxd)}}}else {if(_0x397dx11){_0x397dxd()}else {return _0x397dxc[_0x9b22[39]](401)[_0x9b22[38]]({message:_0x9b22[57]})}}})[_0x9b22[44]](function(_0x397dxb,_0x397dxc,_0x397dxd){if(_0x397dxb[_0x9b22[31]]){db[_0x9b22[47]][_0x9b22[46]]({where:{id:_0x397dxb[_0x9b22[31]][_0x9b22[12]]},attributes:userAttributes})[_0x9b22[40]](function(_0x397dx12){if(!_0x397dx12){return _0x397dxc[_0x9b22[39]](404)[_0x9b22[38]]({message:_0x9b22[45]})};_0x397dxb[_0x9b22[31]]= _0x397dx12;_0x397dxd()})[_0x9b22[32]](function(_0x397dxe){_0x397dxd(_0x397dxe)})}else {if(_0x397dx11){_0x397dxd()}else {return _0x397dxc[_0x9b22[39]](404)[_0x9b22[38]]({message:_0x9b22[48]})}}})}exports[_0x9b22[58]]= isAuthenticated;function canUpdate(){return compose()[_0x9b22[44]](function(_0x397dxb,_0x397dxc,_0x397dxd){return require(_0x9b22[62])[_0x9b22[61]]()[_0x9b22[40]](function(_0x397dx15){if(_0x397dx15[_0x9b22[59]]){_0x397dxd()}else {return _0x397dxc[_0x9b22[39]](403)[_0x9b22[38]]({message:_0x9b22[60]})}})[_0x9b22[32]](function(_0x397dxe){_0x397dxd(_0x397dxe)})})}exports[_0x9b22[63]]= canUpdate;function signToken(_0x397dx17,_0x397dx18){return jwt[_0x9b22[64]]({id:_0x397dx17,role:_0x397dx18},config[_0x9b22[11]][_0x9b22[10]],{expiresIn:86400})}exports[_0x9b22[65]]= signToken;exports[_0x9b22[66]]= function(_0x397dx19){if(!_0x397dx19){throw  new Error(_0x9b22[67])};return compose()[_0x9b22[44]](isAuthenticated())[_0x9b22[44]](function _0x397dx1a(_0x397dxb,_0x397dxc,_0x397dxd){if(config[_0x9b22[69]][_0x9b22[68]](_0x397dxb[_0x9b22[31]][_0x9b22[13]])>= config[_0x9b22[69]][_0x9b22[68]](_0x397dx19)){return _0x397dxd()}else {return _0x397dxc[_0x9b22[39]](403)[_0x9b22[38]]({message:_0x9b22[60]})}})};exports[_0x9b22[70]]= function(_0x397dxb,_0x397dxc){if(!_0x397dxb[_0x9b22[31]]){return _0x397dxc[_0x9b22[39]](404)[_0x9b22[38]]({message:_0x9b22[71]})};var _0x397dx1b=signToken(_0x397dxb[_0x9b22[31]][_0x9b22[12]],_0x397dxb[_0x9b22[31]][_0x9b22[13]]);_0x397dxc[_0x9b22[73]](_0x9b22[72],_0x397dx1b);_0x397dxc[_0x9b22[73]](_0x9b22[74],JSON[_0x9b22[76]](_[_0x9b22[75]](_0x397dxb[_0x9b22[31]],userAttributes)));_0x397dxc[_0x9b22[78]](_0x9b22[77])}
\ No newline at end of file
+var _0x1eda=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x6A\x73\x6F\x6E\x77\x65\x62\x74\x6F\x6B\x65\x6E","\x65\x78\x70\x72\x65\x73\x73\x2D\x6A\x77\x74","\x63\x6F\x6D\x70\x6F\x73\x61\x62\x6C\x65\x2D\x6D\x69\x64\x64\x6C\x65\x77\x61\x72\x65","\x62\x61\x73\x69\x63\x2D\x61\x75\x74\x68","\x69\x70\x61\x64\x64\x72\x2E\x6A\x73","\x73\x65\x73\x73\x69\x6F\x6E","\x73\x65\x63\x72\x65\x74\x73","\x69\x64","\x72\x6F\x6C\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x65\x6D\x61\x69\x6C","\x75\x73\x65\x72\x70\x69\x63","\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x73\x6D\x73\x50\x61\x75\x73\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x50\x61\x75\x73\x65","\x70\x61\x75\x73\x65\x54\x79\x70\x65","\x73\x68\x6F\x77\x57\x65\x62\x42\x61\x72","\x70\x68\x6F\x6E\x65\x42\x61\x72\x52\x65\x6D\x6F\x74\x65\x43\x6F\x6E\x74\x72\x6F\x6C\x50\x6F\x72\x74","\x70\x68\x6F\x6E\x65\x42\x61\x72\x52\x65\x6D\x6F\x74\x65\x43\x6F\x6E\x74\x72\x6F\x6C","\x69\x73\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x41\x75\x74\x68\x6F\x72\x69\x7A\x65\x64","\x75\x73\x65\x72","\x63\x61\x74\x63\x68","\x63\x6C\x6F\x73\x65\x64","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64\x2E","\x46\x6F\x72\x62\x69\x64\x64\x65\x6E\x2E","\x6A\x73\x6F\x6E","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x75\x73\x65","\x55\x73\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E","\x66\x69\x6E\x64","\x55\x73\x65\x72","\x55\x73\x65\x72\x20\x6F\x62\x6A\x65\x63\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E","\x61\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x68\x65\x61\x64\x65\x72\x73","\x42\x61\x73\x69\x63","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x70\x61\x73\x73","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73\x2E","\x42\x65\x61\x72\x65\x72","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x61\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E\x20\x66\x6F\x72\x6D\x61\x74\x2E","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x75\x70\x64\x61\x74\x65","\x46\x6F\x72\x62\x69\x64\x64\x65\x6E","\x67\x65\x74\x4C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x75\x74\x69\x6C","\x63\x61\x6E\x55\x70\x64\x61\x74\x65","\x73\x69\x67\x6E","\x73\x69\x67\x6E\x54\x6F\x6B\x65\x6E","\x68\x61\x73\x52\x6F\x6C\x65","\x52\x65\x71\x75\x69\x72\x65\x64\x20\x72\x6F\x6C\x65\x20\x6E\x65\x65\x64\x73\x20\x74\x6F\x20\x62\x65\x20\x73\x65\x74","\x69\x6E\x64\x65\x78\x4F\x66","\x75\x73\x65\x72\x52\x6F\x6C\x65\x73","\x73\x65\x74\x54\x6F\x6B\x65\x6E\x43\x6F\x6F\x6B\x69\x65","\x49\x74\x20\x6C\x6F\x6F\x6B\x73\x20\x6C\x69\x6B\x65\x20\x79\x6F\x75\x20\x61\x72\x65\x6E\x27\x74\x20\x6C\x6F\x67\x67\x65\x64\x20\x69\x6E\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x74\x72\x79\x20\x61\x67\x61\x69\x6E\x2E","\x6D\x6F\x74\x69\x6F\x6E\x2E\x74\x6F\x6B\x65\x6E","\x63\x6F\x6F\x6B\x69\x65","\x6D\x6F\x74\x69\x6F\x6E\x2E\x75\x73\x65\x72","\x70\x69\x63\x6B","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73\x2F\x67\x65\x6E\x65\x72\x61\x6C","\x72\x65\x64\x69\x72\x65\x63\x74"];_0x1eda[0];var db=require(_0x1eda[2])[_0x1eda[1]];var config=require(_0x1eda[3]);var _=require(_0x1eda[4]);var jwt=require(_0x1eda[5]);var expressJwt=require(_0x1eda[6]);var compose=require(_0x1eda[7]);var basicAuth=require(_0x1eda[8]);var ipaddr=require(_0x1eda[9]);var validateJwt=expressJwt({secret:config[_0x1eda[11]][_0x1eda[10]]});var userAttributes=[_0x1eda[12],_0x1eda[13],_0x1eda[14],_0x1eda[15],_0x1eda[16],_0x1eda[17],_0x1eda[18],_0x1eda[19],_0x1eda[20],_0x1eda[21],_0x1eda[22],_0x1eda[23],_0x1eda[24],_0x1eda[25],_0x1eda[26],_0x1eda[27],_0x1eda[28],_0x1eda[29]];exports[_0x1eda[30]]= function(){return isAuthenticated(true)[_0x1eda[44]](function(_0xa430xb,_0xa430xc,_0xa430xd){if(_0xa430xb[_0x1eda[31]]){_0xa430xd()}else {return db[_0x1eda[43]][_0x1eda[42]]({where:{id:_0xa430xb[_0x1eda[41]][_0x1eda[12]]},attributes:[_0x1eda[12],_0x1eda[33],_0x1eda[34]],raw:true})[_0x1eda[40]](function(_0xa430xf){if(_0xa430xf&& _0xa430xf[_0x1eda[33]]){return _0xa430xc[_0x1eda[39]](_0xa430xf[_0x1eda[34]]=== _0x1eda[35]?405:403)[_0x1eda[38]]({message:_0xa430xf[_0x1eda[34]]=== _0x1eda[35]?_0x1eda[36]:_0x1eda[37]})}else {_0xa430xd()}})[_0x1eda[32]](function(_0xa430xe){_0xa430xd(_0xa430xe)})}})};function isAuthenticated(_0xa430x11){return compose()[_0x1eda[44]](function(_0xa430xb,_0xa430xc,_0xa430xd){if(_0xa430xb[_0x1eda[50]][_0x1eda[49]]){if(_[_0x1eda[52]](_0xa430xb[_0x1eda[50]][_0x1eda[49]],_0x1eda[51])){var _0xa430x13=basicAuth(_0xa430xb);db[_0x1eda[47]][_0x1eda[46]]({where:{name:_0xa430x13[_0x1eda[15]]}})[_0x1eda[40]](function(_0xa430x12){if(!_0xa430x12||  !_0xa430x12[_0x1eda[54]](_0xa430x13[_0x1eda[53]])){return _0xa430xc[_0x1eda[39]](401)[_0x1eda[38]]({message:_0x1eda[55]})};_0xa430xb[_0x1eda[31]]= {id:_0xa430x12[_0x1eda[12]]};_0xa430xd()})[_0x1eda[32]](function(_0xa430xe){_0xa430xd(_0xa430xe)})}else {if(_[_0x1eda[52]](_0xa430xb[_0x1eda[50]][_0x1eda[49]],_0x1eda[56])){validateJwt(_0xa430xb,_0xa430xc,_0xa430xd)}}}else {if(_0xa430x11){_0xa430xd()}else {return _0xa430xc[_0x1eda[39]](401)[_0x1eda[38]]({message:_0x1eda[57]})}}})[_0x1eda[44]](function(_0xa430xb,_0xa430xc,_0xa430xd){if(_0xa430xb[_0x1eda[31]]){db[_0x1eda[47]][_0x1eda[46]]({where:{id:_0xa430xb[_0x1eda[31]][_0x1eda[12]]},attributes:userAttributes})[_0x1eda[40]](function(_0xa430x12){if(!_0xa430x12){return _0xa430xc[_0x1eda[39]](404)[_0x1eda[38]]({message:_0x1eda[45]})};_0xa430xb[_0x1eda[31]]= _0xa430x12;_0xa430xd()})[_0x1eda[32]](function(_0xa430xe){_0xa430xd(_0xa430xe)})}else {if(_0xa430x11){_0xa430xd()}else {return _0xa430xc[_0x1eda[39]](404)[_0x1eda[38]]({message:_0x1eda[48]})}}})}exports[_0x1eda[58]]= isAuthenticated;function canUpdate(){return compose()[_0x1eda[44]](function(_0xa430xb,_0xa430xc,_0xa430xd){return require(_0x1eda[62])[_0x1eda[61]]()[_0x1eda[40]](function(_0xa430x15){if(_0xa430x15[_0x1eda[59]]){_0xa430xd()}else {return _0xa430xc[_0x1eda[39]](403)[_0x1eda[38]]({message:_0x1eda[60]})}})[_0x1eda[32]](function(_0xa430xe){_0xa430xd(_0xa430xe)})})}exports[_0x1eda[63]]= canUpdate;function signToken(_0xa430x17,_0xa430x18){return jwt[_0x1eda[64]]({id:_0xa430x17,role:_0xa430x18},config[_0x1eda[11]][_0x1eda[10]],{expiresIn:86400})}exports[_0x1eda[65]]= signToken;exports[_0x1eda[66]]= function(_0xa430x19){if(!_0xa430x19){throw  new Error(_0x1eda[67])};return compose()[_0x1eda[44]](isAuthenticated())[_0x1eda[44]](function _0xa430x1a(_0xa430xb,_0xa430xc,_0xa430xd){if(config[_0x1eda[69]][_0x1eda[68]](_0xa430xb[_0x1eda[31]][_0x1eda[13]])>= config[_0x1eda[69]][_0x1eda[68]](_0xa430x19)){return _0xa430xd()}else {return _0xa430xc[_0x1eda[39]](403)[_0x1eda[38]]({message:_0x1eda[60]})}})};exports[_0x1eda[70]]= function(_0xa430xb,_0xa430xc){if(!_0xa430xb[_0x1eda[31]]){return _0xa430xc[_0x1eda[39]](404)[_0x1eda[38]]({message:_0x1eda[71]})};var _0xa430x1b=signToken(_0xa430xb[_0x1eda[31]][_0x1eda[12]],_0xa430xb[_0x1eda[31]][_0x1eda[13]]);_0xa430xc[_0x1eda[73]](_0x1eda[72],_0xa430x1b);_0xa430xc[_0x1eda[73]](_0x1eda[74],JSON[_0x1eda[76]](_[_0x1eda[75]](_0xa430xb[_0x1eda[31]],userAttributes)));_0xa430xc[_0x1eda[78]](_0x1eda[77])}
\ No newline at end of file
index 3080395..37d4612 100644 (file)
@@ -1 +1 @@
-var _0x46ce=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x65\x78\x69\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x6C\x65\x6E\x67\x74\x68","\x6D\x65\x73\x73\x61\x67\x65","\x6B\x65\x79\x73","\x63\x6F\x75\x6E\x74\x65\x72","\x74\x61\x62\x6C\x65","\x74\x79\x70\x65","\x77\x69\x64\x67\x65\x74\x3A\x25\x64","\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x65\x6D\x69\x74","\x71\x75\x65\x72\x79","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x70\x75\x73\x68","\x61\x6C\x6C","\x67\x65\x74\x49\x74\x65\x6D\x73","\x61\x72\x67\x76","\x66\x69\x6E\x64","\x44\x61\x73\x68\x62\x6F\x61\x72\x64"];_0x46ce[0];var _=require(_0x46ce[1]);var util=require(_0x46ce[2]);var Promise=require(_0x46ce[3]);var db=require(_0x46ce[5])[_0x46ce[4]];var io=require(_0x46ce[7])({host:_0x46ce[6],port:6379});var items;return db[_0x46ce[31]][_0x46ce[30]]({where:{id:process[_0x46ce[29]][2]}})[_0x46ce[11]](function(_0xfff5xd){if(_0xfff5xd){return _0xfff5xd[_0x46ce[28]]({attributes:[_0x46ce[19],_0x46ce[17],_0x46ce[22]],where:{type:{$in:[_0x46ce[15],_0x46ce[16]]}},raw:true})}})[_0x46ce[11]](function(_0xfff5x8){var _0xfff5xc=[];if(_0xfff5x8){items= _0xfff5x8;for(var _0xfff5x9=0;_0xfff5x9< _0xfff5x8[_0x46ce[12]];_0xfff5x9++){_0xfff5xc[_0x46ce[26]](db[_0x46ce[25]][_0x46ce[22]](_0xfff5x8[_0xfff5x9][_0x46ce[22]],{type:db[_0x46ce[25]][_0x46ce[24]][_0x46ce[23]]})[_0x46ce[10]](function(_0xfff5x7){return {error:true,message:_0xfff5x7[_0x46ce[13]]}}))};return Promise[_0x46ce[27]](_0xfff5xc)}})[_0x46ce[11]](function(_0xfff5x8){if(_0xfff5x8){for(var _0xfff5x9=0;_0xfff5x9< _0xfff5x8[_0x46ce[12]];_0xfff5x9++){var _0xfff5xa;switch(items[_0xfff5x9][_0x46ce[17]]){case _0x46ce[15]:if(_0xfff5x8[_0xfff5x9][_0x46ce[9]]){_0xfff5xa= {error:_0xfff5x8[_0xfff5x9][_0x46ce[9]]?true:false,message:_0xfff5x8[_0xfff5x9][_0x46ce[13]]|| null}}else {var _0xfff5xb=_0xfff5x8[_0xfff5x9][0];_0xfff5xa= {error:_0xfff5x8[_0xfff5x9][_0x46ce[9]]?true:false,message:_0xfff5x8[_0xfff5x9][_0x46ce[13]]|| null,value:_0xfff5xb[_[_0x46ce[14]](_0xfff5xb)[0]]}};break;case _0x46ce[16]:_0xfff5xa= {error:_0xfff5x8[_0xfff5x9][_0x46ce[9]]?true:false,message:_0xfff5x8[_0xfff5x9][_0x46ce[13]]|| null,fields:_0xfff5x8[_0xfff5x9][_0x46ce[9]]?[]:_0xfff5x8[_0xfff5x9][0]?_[_0x46ce[14]](_0xfff5x8[_0xfff5x9][0]):[],rows:_0xfff5x8[_0xfff5x9][_0x46ce[9]]?[]:_0xfff5x8[_0xfff5x9],count:_0xfff5x8[_0xfff5x9][_0x46ce[12]]|| 0};break;default:_0xfff5xa= {error:_0xfff5x8[_0xfff5x9][_0x46ce[9]]?true:false,message:_0xfff5x8[_0xfff5x9][_0x46ce[13]]|| null,value:_0xfff5x8[_0xfff5x9]}};io[_0x46ce[21]](util[_0x46ce[20]](_0x46ce[18],items[_0xfff5x9][_0x46ce[19]]),_0xfff5xa)}}})[_0x46ce[11]](function(){process[_0x46ce[8]](0)})[_0x46ce[10]](function(_0xfff5x7){process[_0x46ce[8]](1);console[_0x46ce[9]](_0xfff5x7)})
\ No newline at end of file
+var _0xb98d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x65\x78\x69\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x6C\x65\x6E\x67\x74\x68","\x6D\x65\x73\x73\x61\x67\x65","\x6B\x65\x79\x73","\x63\x6F\x75\x6E\x74\x65\x72","\x74\x61\x62\x6C\x65","\x74\x79\x70\x65","\x77\x69\x64\x67\x65\x74\x3A\x25\x64","\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x65\x6D\x69\x74","\x71\x75\x65\x72\x79","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x70\x75\x73\x68","\x61\x6C\x6C","\x67\x65\x74\x49\x74\x65\x6D\x73","\x61\x72\x67\x76","\x66\x69\x6E\x64","\x44\x61\x73\x68\x62\x6F\x61\x72\x64"];_0xb98d[0];var _=require(_0xb98d[1]);var util=require(_0xb98d[2]);var Promise=require(_0xb98d[3]);var db=require(_0xb98d[5])[_0xb98d[4]];var io=require(_0xb98d[7])({host:_0xb98d[6],port:6379});var items;return db[_0xb98d[31]][_0xb98d[30]]({where:{id:process[_0xb98d[29]][2]}})[_0xb98d[11]](function(_0xaf3bxd){if(_0xaf3bxd){return _0xaf3bxd[_0xb98d[28]]({attributes:[_0xb98d[19],_0xb98d[17],_0xb98d[22]],where:{type:{$in:[_0xb98d[15],_0xb98d[16]]}},raw:true})}})[_0xb98d[11]](function(_0xaf3bx8){var _0xaf3bxc=[];if(_0xaf3bx8){items= _0xaf3bx8;for(var _0xaf3bx9=0;_0xaf3bx9< _0xaf3bx8[_0xb98d[12]];_0xaf3bx9++){_0xaf3bxc[_0xb98d[26]](db[_0xb98d[25]][_0xb98d[22]](_0xaf3bx8[_0xaf3bx9][_0xb98d[22]],{type:db[_0xb98d[25]][_0xb98d[24]][_0xb98d[23]]})[_0xb98d[10]](function(_0xaf3bx7){return {error:true,message:_0xaf3bx7[_0xb98d[13]]}}))};return Promise[_0xb98d[27]](_0xaf3bxc)}})[_0xb98d[11]](function(_0xaf3bx8){if(_0xaf3bx8){for(var _0xaf3bx9=0;_0xaf3bx9< _0xaf3bx8[_0xb98d[12]];_0xaf3bx9++){var _0xaf3bxa;switch(items[_0xaf3bx9][_0xb98d[17]]){case _0xb98d[15]:if(_0xaf3bx8[_0xaf3bx9][_0xb98d[9]]){_0xaf3bxa= {error:_0xaf3bx8[_0xaf3bx9][_0xb98d[9]]?true:false,message:_0xaf3bx8[_0xaf3bx9][_0xb98d[13]]|| null}}else {var _0xaf3bxb=_0xaf3bx8[_0xaf3bx9][0];_0xaf3bxa= {error:_0xaf3bx8[_0xaf3bx9][_0xb98d[9]]?true:false,message:_0xaf3bx8[_0xaf3bx9][_0xb98d[13]]|| null,value:_0xaf3bxb[_[_0xb98d[14]](_0xaf3bxb)[0]]}};break;case _0xb98d[16]:_0xaf3bxa= {error:_0xaf3bx8[_0xaf3bx9][_0xb98d[9]]?true:false,message:_0xaf3bx8[_0xaf3bx9][_0xb98d[13]]|| null,fields:_0xaf3bx8[_0xaf3bx9][_0xb98d[9]]?[]:_0xaf3bx8[_0xaf3bx9][0]?_[_0xb98d[14]](_0xaf3bx8[_0xaf3bx9][0]):[],rows:_0xaf3bx8[_0xaf3bx9][_0xb98d[9]]?[]:_0xaf3bx8[_0xaf3bx9],count:_0xaf3bx8[_0xaf3bx9][_0xb98d[12]]|| 0};break;default:_0xaf3bxa= {error:_0xaf3bx8[_0xaf3bx9][_0xb98d[9]]?true:false,message:_0xaf3bx8[_0xaf3bx9][_0xb98d[13]]|| null,value:_0xaf3bx8[_0xaf3bx9]}};io[_0xb98d[21]](util[_0xb98d[20]](_0xb98d[18],items[_0xaf3bx9][_0xb98d[19]]),_0xaf3bxa)}}})[_0xb98d[11]](function(){process[_0xb98d[8]](0)})[_0xb98d[10]](function(_0xaf3bx7){process[_0xb98d[8]](1);console[_0xb98d[9]](_0xaf3bx7)})
\ No newline at end of file
index 7d52b3f..5c28af0 100644 (file)
@@ -1 +1 @@
-var _0xba8f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x63\x72\x79\x70\x74\x6F","\x66\x73","\x62\x6C\x75\x65\x62\x69\x72\x64","\x61\x65\x73\x31\x39\x32","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x65\x6E\x63\x72\x79\x70\x74\x46\x69\x6C\x65","\x63\x72\x65\x61\x74\x65\x52\x65\x61\x64\x53\x74\x72\x65\x61\x6D","\x63\x72\x65\x61\x74\x65\x57\x72\x69\x74\x65\x53\x74\x72\x65\x61\x6D","\x61\x6C\x67\x6F\x72\x69\x74\x68\x6D","\x63\x72\x65\x61\x74\x65\x43\x69\x70\x68\x65\x72","\x64\x61\x74\x61","\x75\x70\x64\x61\x74\x65","\x62\x69\x6E\x61\x72\x79","\x77\x72\x69\x74\x65","\x6F\x6E","\x65\x6E\x64","\x66\x69\x6E\x61\x6C","\x63\x6C\x6F\x73\x65","\x75\x6E\x6C\x69\x6E\x6B","\x64\x65\x63\x72\x79\x70\x74\x46\x69\x6C\x65","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72"];_0xba8f[0];var crypto=require(_0xba8f[1]);var fs=require(_0xba8f[2]);var BPromise=require(_0xba8f[3]);var defaultOptions={algorithm:_0xba8f[4]};function combineOptions(_0xfad9x6){var _0xfad9x7={};for(var _0xfad9x8 in defaultOptions){if(defaultOptions[_0xba8f[5]](_0xfad9x8)){_0xfad9x7[_0xfad9x8]= defaultOptions[_0xfad9x8]}};if(_0xfad9x6){for(var _0xfad9x9 in _0xfad9x6){if(_0xfad9x6[_0xba8f[5]](_0xfad9x9)){_0xfad9x7[_0xfad9x9]= _0xfad9x6[_0xfad9x9]}}};return _0xfad9x7}exports[_0xba8f[6]]= function(_0xfad9xa,_0xfad9xb,_0xfad9x8,_0xfad9x6){return  new BPromise(function(_0xfad9xc,_0xfad9xd){_0xfad9x6= combineOptions(_0xfad9x6);var _0xfad9xe= new Buffer(_0xfad9x8);var _0xfad9xf=fs[_0xba8f[7]](_0xfad9xa);var _0xfad9x10=fs[_0xba8f[8]](_0xfad9xb);var _0xfad9x11=crypto[_0xba8f[10]](_0xfad9x6[_0xba8f[9]],_0xfad9xe);_0xfad9xf[_0xba8f[15]](_0xba8f[11],function(_0xfad9x12){var _0xfad9x13= new Buffer(_0xfad9x11[_0xba8f[12]](_0xfad9x12),_0xba8f[13]);_0xfad9x10[_0xba8f[14]](_0xfad9x13)});_0xfad9xf[_0xba8f[15]](_0xba8f[16],function(){try{var _0xfad9x13= new Buffer(_0xfad9x11[_0xba8f[17]](_0xba8f[13]),_0xba8f[13]);_0xfad9x10[_0xba8f[14]](_0xfad9x13);_0xfad9x10[_0xba8f[16]]();_0xfad9x10[_0xba8f[15]](_0xba8f[18],function(){return _0xfad9xc(_0xfad9xb)})}catch(e){fs[_0xba8f[19]](_0xfad9xb);return _0xfad9xd(e)}})})};exports[_0xba8f[20]]= function(_0xfad9xa,_0xfad9xb,_0xfad9x8,_0xfad9x6){return  new BPromise(function(_0xfad9xc,_0xfad9xd){_0xfad9x6= combineOptions(_0xfad9x6);var _0xfad9xe= new Buffer(_0xfad9x8);var _0xfad9xf=fs[_0xba8f[7]](_0xfad9xa);var _0xfad9x10=fs[_0xba8f[8]](_0xfad9xb);var _0xfad9x11=crypto[_0xba8f[21]](_0xfad9x6[_0xba8f[9]],_0xfad9xe);_0xfad9xf[_0xba8f[15]](_0xba8f[11],function(_0xfad9x12){var _0xfad9x13= new Buffer(_0xfad9x11[_0xba8f[12]](_0xfad9x12),_0xba8f[13]);_0xfad9x10[_0xba8f[14]](_0xfad9x13)});_0xfad9xf[_0xba8f[15]](_0xba8f[16],function(){try{var _0xfad9x13= new Buffer(_0xfad9x11[_0xba8f[17]](_0xba8f[13]),_0xba8f[13]);_0xfad9x10[_0xba8f[14]](_0xfad9x13);_0xfad9x10[_0xba8f[16]]();_0xfad9x10[_0xba8f[15]](_0xba8f[18],function(){return _0xfad9xc(_0xfad9xb)})}catch(e){fs[_0xba8f[19]](_0xfad9xb);return _0xfad9xd(e)}})})}
\ No newline at end of file
+var _0x757c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x63\x72\x79\x70\x74\x6F","\x66\x73","\x62\x6C\x75\x65\x62\x69\x72\x64","\x61\x65\x73\x31\x39\x32","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x65\x6E\x63\x72\x79\x70\x74\x46\x69\x6C\x65","\x63\x72\x65\x61\x74\x65\x52\x65\x61\x64\x53\x74\x72\x65\x61\x6D","\x63\x72\x65\x61\x74\x65\x57\x72\x69\x74\x65\x53\x74\x72\x65\x61\x6D","\x61\x6C\x67\x6F\x72\x69\x74\x68\x6D","\x63\x72\x65\x61\x74\x65\x43\x69\x70\x68\x65\x72","\x64\x61\x74\x61","\x75\x70\x64\x61\x74\x65","\x62\x69\x6E\x61\x72\x79","\x77\x72\x69\x74\x65","\x6F\x6E","\x65\x6E\x64","\x66\x69\x6E\x61\x6C","\x63\x6C\x6F\x73\x65","\x75\x6E\x6C\x69\x6E\x6B","\x64\x65\x63\x72\x79\x70\x74\x46\x69\x6C\x65","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72"];_0x757c[0];var crypto=require(_0x757c[1]);var fs=require(_0x757c[2]);var BPromise=require(_0x757c[3]);var defaultOptions={algorithm:_0x757c[4]};function combineOptions(_0xca7ex6){var _0xca7ex7={};for(var _0xca7ex8 in defaultOptions){if(defaultOptions[_0x757c[5]](_0xca7ex8)){_0xca7ex7[_0xca7ex8]= defaultOptions[_0xca7ex8]}};if(_0xca7ex6){for(var _0xca7ex9 in _0xca7ex6){if(_0xca7ex6[_0x757c[5]](_0xca7ex9)){_0xca7ex7[_0xca7ex9]= _0xca7ex6[_0xca7ex9]}}};return _0xca7ex7}exports[_0x757c[6]]= function(_0xca7exa,_0xca7exb,_0xca7ex8,_0xca7ex6){return  new BPromise(function(_0xca7exc,_0xca7exd){_0xca7ex6= combineOptions(_0xca7ex6);var _0xca7exe= new Buffer(_0xca7ex8);var _0xca7exf=fs[_0x757c[7]](_0xca7exa);var _0xca7ex10=fs[_0x757c[8]](_0xca7exb);var _0xca7ex11=crypto[_0x757c[10]](_0xca7ex6[_0x757c[9]],_0xca7exe);_0xca7exf[_0x757c[15]](_0x757c[11],function(_0xca7ex12){var _0xca7ex13= new Buffer(_0xca7ex11[_0x757c[12]](_0xca7ex12),_0x757c[13]);_0xca7ex10[_0x757c[14]](_0xca7ex13)});_0xca7exf[_0x757c[15]](_0x757c[16],function(){try{var _0xca7ex13= new Buffer(_0xca7ex11[_0x757c[17]](_0x757c[13]),_0x757c[13]);_0xca7ex10[_0x757c[14]](_0xca7ex13);_0xca7ex10[_0x757c[16]]();_0xca7ex10[_0x757c[15]](_0x757c[18],function(){return _0xca7exc(_0xca7exb)})}catch(e){fs[_0x757c[19]](_0xca7exb);return _0xca7exd(e)}})})};exports[_0x757c[20]]= function(_0xca7exa,_0xca7exb,_0xca7ex8,_0xca7ex6){return  new BPromise(function(_0xca7exc,_0xca7exd){_0xca7ex6= combineOptions(_0xca7ex6);var _0xca7exe= new Buffer(_0xca7ex8);var _0xca7exf=fs[_0x757c[7]](_0xca7exa);var _0xca7ex10=fs[_0x757c[8]](_0xca7exb);var _0xca7ex11=crypto[_0x757c[21]](_0xca7ex6[_0x757c[9]],_0xca7exe);_0xca7exf[_0x757c[15]](_0x757c[11],function(_0xca7ex12){var _0xca7ex13= new Buffer(_0xca7ex11[_0x757c[12]](_0xca7ex12),_0x757c[13]);_0xca7ex10[_0x757c[14]](_0xca7ex13)});_0xca7exf[_0x757c[15]](_0x757c[16],function(){try{var _0xca7ex13= new Buffer(_0xca7ex11[_0x757c[17]](_0x757c[13]),_0x757c[13]);_0xca7ex10[_0x757c[14]](_0xca7ex13);_0xca7ex10[_0x757c[16]]();_0xca7ex10[_0x757c[15]](_0x757c[18],function(){return _0xca7exc(_0xca7exb)})}catch(e){fs[_0x757c[19]](_0xca7exb);return _0xca7exd(e)}})})}
\ No newline at end of file
index 85873ea..7e6cd75 100644 (file)
@@ -1 +1 @@
-var _0x933a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x74\x6F\x2D\x63\x73\x76","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x64\x62\x48","\x61\x72\x67\x76","\x75\x70\x64\x61\x74\x65","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x65\x72\x72\x6F\x72","\x45\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x73\x45\x6D\x70\x74\x79","\x45\x6D\x70\x74\x79","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x74\x68\x65\x6E","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x71\x75\x65\x72\x79"];_0x933a[0];var util=require(_0x933a[1]);var _=require(_0x933a[2]);var toCsv=require(_0x933a[3]);var fs=require(_0x933a[4]);var db=require(_0x933a[6])[_0x933a[5]];var dbH=require(_0x933a[6])[_0x933a[7]];var EXTRACTED_REPORT_ID=process[_0x933a[8]][2];var QUERY=process[_0x933a[8]][3];var PATH=process[_0x933a[8]][4];function analyticExtractedReport(_0xe301xb){return db[_0x933a[10]][_0x933a[9]]({status:_0xe301xb},{where:{id:EXTRACTED_REPORT_ID}})}return dbH[_0x933a[21]][_0x933a[22]](QUERY,{type:dbH[_0x933a[21]][_0x933a[20]][_0x933a[19]]})[_0x933a[18]](function(_0xe301xd){if(_[_0x933a[14]](_0xe301xd)){return analyticExtractedReport(_0x933a[15])};var _0xe301xe=toCsv(_0xe301xd);fs[_0x933a[16]](PATH,_0xe301xe);return analyticExtractedReport(_0x933a[17])})[_0x933a[13]](function(_0xe301xc){console[_0x933a[11]](_0xe301xc);return analyticExtractedReport(_0x933a[12])})
\ No newline at end of file
+var _0x299c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x74\x6F\x2D\x63\x73\x76","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x64\x62\x48","\x61\x72\x67\x76","\x75\x70\x64\x61\x74\x65","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x65\x72\x72\x6F\x72","\x45\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x73\x45\x6D\x70\x74\x79","\x45\x6D\x70\x74\x79","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x74\x68\x65\x6E","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x71\x75\x65\x72\x79"];_0x299c[0];var util=require(_0x299c[1]);var _=require(_0x299c[2]);var toCsv=require(_0x299c[3]);var fs=require(_0x299c[4]);var db=require(_0x299c[6])[_0x299c[5]];var dbH=require(_0x299c[6])[_0x299c[7]];var EXTRACTED_REPORT_ID=process[_0x299c[8]][2];var QUERY=process[_0x299c[8]][3];var PATH=process[_0x299c[8]][4];function analyticExtractedReport(_0xc0dfxb){return db[_0x299c[10]][_0x299c[9]]({status:_0xc0dfxb},{where:{id:EXTRACTED_REPORT_ID}})}return dbH[_0x299c[21]][_0x299c[22]](QUERY,{type:dbH[_0x299c[21]][_0x299c[20]][_0x299c[19]]})[_0x299c[18]](function(_0xc0dfxd){if(_[_0x299c[14]](_0xc0dfxd)){return analyticExtractedReport(_0x299c[15])};var _0xc0dfxe=toCsv(_0xc0dfxd);fs[_0x299c[16]](PATH,_0xc0dfxe);return analyticExtractedReport(_0x299c[17])})[_0x299c[13]](function(_0xc0dfxc){console[_0x299c[11]](_0xc0dfxc);return analyticExtractedReport(_0x299c[12])})
\ No newline at end of file
index a4f61f9..632d551 100644 (file)
@@ -1 +1 @@
-var _0xa746=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x66\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x70\x64\x66\x6D\x61\x6B\x65\x2F\x73\x72\x63\x2F\x70\x72\x69\x6E\x74\x65\x72","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x64\x62\x48","\x61\x72\x67\x76","\x4D\x4D\x4D\x4D\x20\x44\x6F\x20\x59\x59\x59\x59\x2C\x20\x68\x3A\x6D\x6D\x3A\x73\x73\x20\x61","\x75\x70\x64\x61\x74\x65","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x74\x61\x62\x6C\x65\x48\x65\x61\x64\x65\x72","\x70\x75\x73\x68","\x65\x72\x72\x6F\x72","\x45\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x73\x45\x6D\x70\x74\x79","\x45\x6D\x70\x74\x79","\x4E\x61\x6D\x65\x3A\x20\x25\x73\x0A\x52\x65\x70\x6F\x72\x74\x3A\x20\x25\x73\x0A\x46\x72\x6F\x6D\x3A\x20\x25\x73\x20\x54\x6F\x3A\x20\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x65\x6E\x64\x44\x61\x74\x65","\x41\x34","\x6C\x61\x6E\x64\x73\x63\x61\x70\x65","\x68\x65\x61\x64\x65\x72","\x62\x6C\x61\x63\x6B","\x62\x6F\x64\x79","\x6C\x65\x6E\x67\x74\x68","","\x63\x6F\x6E\x74\x65\x6E\x74","\x2F\x66\x6F\x6E\x74\x73\x2F\x52\x6F\x62\x6F\x74\x6F\x2D\x52\x65\x67\x75\x6C\x61\x72\x2E\x74\x74\x66","\x2F\x66\x6F\x6E\x74\x73\x2F\x52\x6F\x62\x6F\x74\x6F\x2D\x4D\x65\x64\x69\x75\x6D\x2E\x74\x74\x66","\x2F\x66\x6F\x6E\x74\x73\x2F\x52\x6F\x62\x6F\x74\x6F\x2D\x49\x74\x61\x6C\x69\x63\x2E\x74\x74\x66","\x2F\x66\x6F\x6E\x74\x73\x2F\x52\x6F\x62\x6F\x74\x6F\x2D\x4D\x65\x64\x69\x75\x6D\x49\x74\x61\x6C\x69\x63\x2E\x74\x74\x66","\x63\x72\x65\x61\x74\x65\x50\x64\x66\x4B\x69\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x57\x72\x69\x74\x65\x53\x74\x72\x65\x61\x6D","\x70\x69\x70\x65","\x65\x6E\x64","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x74\x68\x65\x6E","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x4F\x6E\x65"];_0xa746[0];var _=require(_0xa746[1]);var fs=require(_0xa746[2]);var util=require(_0xa746[3]);var moment=require(_0xa746[4]);var PdfPrinter=require(_0xa746[5]);var db=require(_0xa746[7])[_0xa746[6]];var dbH=require(_0xa746[7])[_0xa746[8]];var EXTRACTED_REPORT_ID=Number(process[_0xa746[9]][2]);var QUERY=process[_0xa746[9]][3];var PATH=process[_0xa746[9]][4];var NAME=process[_0xa746[9]][5];var FORMAT=_0xa746[10];var _extractedReport;function analyticExtractedReport(_0x2a42xf){return db[_0xa746[12]][_0xa746[11]]({status:_0x2a42xf},{where:{id:EXTRACTED_REPORT_ID}})}function getHeader(_0x2a42x11){var _0x2a42x12=[];for(var _0x2a42x13 in _0x2a42x11){if(_0x2a42x11[_0xa746[13]](_0x2a42x13)){_0x2a42x12[_0xa746[15]]({text:_0x2a42x13,style:_0xa746[14]})}};return _0x2a42x12}return db[_0xa746[12]][_0xa746[48]]({where:{id:EXTRACTED_REPORT_ID}})[_0xa746[43]](function(_0x2a42x1c){_extractedReport= _0x2a42x1c;return dbH[_0xa746[46]][_0xa746[47]](QUERY,{type:dbH[_0xa746[46]][_0xa746[45]][_0xa746[44]]})})[_0xa746[43]](function(_0x2a42x15){if(_[_0xa746[19]](_0x2a42x15)){return analyticExtractedReport(_0xa746[20])};var _0x2a42x16=util[_0xa746[23]](_0xa746[21],NAME,_extractedReport[_0xa746[22]],moment(_extractedReport[_0xa746[24]])[_0xa746[23]](FORMAT),moment(_extractedReport[_0xa746[25]])[_0xa746[23]](FORMAT));var _0x2a42x17={pageSize:_0xa746[26],pageOrientation:_0xa746[27],content:[{text:_0x2a42x16,style:_0xa746[28]}],styles:{header:{fontSize:18,bold:true,margin:[0,0,0,10]},tableHeader:{bold:true,fontSize:13,color:_0xa746[29]}}};var _0x2a42x18={headerRows:1,body:[]};_0x2a42x18[_0xa746[30]][_0xa746[15]](getHeader(_0x2a42x15[0]));var _0x2a42x12;for(var _0x2a42x19=0;_0x2a42x19< _0x2a42x15[_0xa746[31]];_0x2a42x19+= 1){_0x2a42x12= [];for(var _0x2a42x13 in _0x2a42x15[_0x2a42x19]){if(_0x2a42x15[_0x2a42x19][_0xa746[13]](_0x2a42x13)){_0x2a42x12[_0xa746[15]](_0x2a42x15[_0x2a42x19][_0x2a42x13]?_.toString(_0x2a42x15[_0x2a42x19][_0x2a42x13]):_0xa746[32])}};_0x2a42x18[_0xa746[30]][_0xa746[15]](_0x2a42x12)};_0x2a42x17[_0xa746[33]][_0xa746[15]]({table:_0x2a42x18});var _0x2a42x1a= new PdfPrinter({Roboto:{normal:__dirname+ _0xa746[34],bold:__dirname+ _0xa746[35],italics:__dirname+ _0xa746[36],bolditalics:__dirname+ _0xa746[37]}});var _0x2a42x1b=_0x2a42x1a[_0xa746[38]](_0x2a42x17);_0x2a42x1b[_0xa746[40]](fs[_0xa746[39]](PATH));_0x2a42x1b[_0xa746[41]]();return analyticExtractedReport(_0xa746[42])})[_0xa746[18]](function(_0x2a42x14){console[_0xa746[16]](_0x2a42x14);return analyticExtractedReport(_0xa746[17])})
\ No newline at end of file
+var _0x148e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x66\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x70\x64\x66\x6D\x61\x6B\x65\x2F\x73\x72\x63\x2F\x70\x72\x69\x6E\x74\x65\x72","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x64\x62\x48","\x61\x72\x67\x76","\x4D\x4D\x4D\x4D\x20\x44\x6F\x20\x59\x59\x59\x59\x2C\x20\x68\x3A\x6D\x6D\x3A\x73\x73\x20\x61","\x75\x70\x64\x61\x74\x65","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x74\x61\x62\x6C\x65\x48\x65\x61\x64\x65\x72","\x70\x75\x73\x68","\x65\x72\x72\x6F\x72","\x45\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x73\x45\x6D\x70\x74\x79","\x45\x6D\x70\x74\x79","\x4E\x61\x6D\x65\x3A\x20\x25\x73\x0A\x52\x65\x70\x6F\x72\x74\x3A\x20\x25\x73\x0A\x46\x72\x6F\x6D\x3A\x20\x25\x73\x20\x54\x6F\x3A\x20\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x65\x6E\x64\x44\x61\x74\x65","\x41\x34","\x6C\x61\x6E\x64\x73\x63\x61\x70\x65","\x68\x65\x61\x64\x65\x72","\x62\x6C\x61\x63\x6B","\x62\x6F\x64\x79","\x6C\x65\x6E\x67\x74\x68","","\x63\x6F\x6E\x74\x65\x6E\x74","\x2F\x66\x6F\x6E\x74\x73\x2F\x52\x6F\x62\x6F\x74\x6F\x2D\x52\x65\x67\x75\x6C\x61\x72\x2E\x74\x74\x66","\x2F\x66\x6F\x6E\x74\x73\x2F\x52\x6F\x62\x6F\x74\x6F\x2D\x4D\x65\x64\x69\x75\x6D\x2E\x74\x74\x66","\x2F\x66\x6F\x6E\x74\x73\x2F\x52\x6F\x62\x6F\x74\x6F\x2D\x49\x74\x61\x6C\x69\x63\x2E\x74\x74\x66","\x2F\x66\x6F\x6E\x74\x73\x2F\x52\x6F\x62\x6F\x74\x6F\x2D\x4D\x65\x64\x69\x75\x6D\x49\x74\x61\x6C\x69\x63\x2E\x74\x74\x66","\x63\x72\x65\x61\x74\x65\x50\x64\x66\x4B\x69\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x57\x72\x69\x74\x65\x53\x74\x72\x65\x61\x6D","\x70\x69\x70\x65","\x65\x6E\x64","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x74\x68\x65\x6E","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x4F\x6E\x65"];_0x148e[0];var _=require(_0x148e[1]);var fs=require(_0x148e[2]);var util=require(_0x148e[3]);var moment=require(_0x148e[4]);var PdfPrinter=require(_0x148e[5]);var db=require(_0x148e[7])[_0x148e[6]];var dbH=require(_0x148e[7])[_0x148e[8]];var EXTRACTED_REPORT_ID=Number(process[_0x148e[9]][2]);var QUERY=process[_0x148e[9]][3];var PATH=process[_0x148e[9]][4];var NAME=process[_0x148e[9]][5];var FORMAT=_0x148e[10];var _extractedReport;function analyticExtractedReport(_0x9088xf){return db[_0x148e[12]][_0x148e[11]]({status:_0x9088xf},{where:{id:EXTRACTED_REPORT_ID}})}function getHeader(_0x9088x11){var _0x9088x12=[];for(var _0x9088x13 in _0x9088x11){if(_0x9088x11[_0x148e[13]](_0x9088x13)){_0x9088x12[_0x148e[15]]({text:_0x9088x13,style:_0x148e[14]})}};return _0x9088x12}return db[_0x148e[12]][_0x148e[48]]({where:{id:EXTRACTED_REPORT_ID}})[_0x148e[43]](function(_0x9088x1c){_extractedReport= _0x9088x1c;return dbH[_0x148e[46]][_0x148e[47]](QUERY,{type:dbH[_0x148e[46]][_0x148e[45]][_0x148e[44]]})})[_0x148e[43]](function(_0x9088x15){if(_[_0x148e[19]](_0x9088x15)){return analyticExtractedReport(_0x148e[20])};var _0x9088x16=util[_0x148e[23]](_0x148e[21],NAME,_extractedReport[_0x148e[22]],moment(_extractedReport[_0x148e[24]])[_0x148e[23]](FORMAT),moment(_extractedReport[_0x148e[25]])[_0x148e[23]](FORMAT));var _0x9088x17={pageSize:_0x148e[26],pageOrientation:_0x148e[27],content:[{text:_0x9088x16,style:_0x148e[28]}],styles:{header:{fontSize:18,bold:true,margin:[0,0,0,10]},tableHeader:{bold:true,fontSize:13,color:_0x148e[29]}}};var _0x9088x18={headerRows:1,body:[]};_0x9088x18[_0x148e[30]][_0x148e[15]](getHeader(_0x9088x15[0]));var _0x9088x12;for(var _0x9088x19=0;_0x9088x19< _0x9088x15[_0x148e[31]];_0x9088x19+= 1){_0x9088x12= [];for(var _0x9088x13 in _0x9088x15[_0x9088x19]){if(_0x9088x15[_0x9088x19][_0x148e[13]](_0x9088x13)){_0x9088x12[_0x148e[15]](_0x9088x15[_0x9088x19][_0x9088x13]?_.toString(_0x9088x15[_0x9088x19][_0x9088x13]):_0x148e[32])}};_0x9088x18[_0x148e[30]][_0x148e[15]](_0x9088x12)};_0x9088x17[_0x148e[33]][_0x148e[15]]({table:_0x9088x18});var _0x9088x1a= new PdfPrinter({Roboto:{normal:__dirname+ _0x148e[34],bold:__dirname+ _0x148e[35],italics:__dirname+ _0x148e[36],bolditalics:__dirname+ _0x148e[37]}});var _0x9088x1b=_0x9088x1a[_0x148e[38]](_0x9088x17);_0x9088x1b[_0x148e[40]](fs[_0x148e[39]](PATH));_0x9088x1b[_0x148e[41]]();return analyticExtractedReport(_0x148e[42])})[_0x148e[18]](function(_0x9088x14){console[_0x148e[16]](_0x9088x14);return analyticExtractedReport(_0x148e[17])})
\ No newline at end of file
index 7d64f47..41ee398 100644 (file)
@@ -1 +1 @@
-var _0xb595=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6A\x73\x6F\x6E\x32\x78\x6C\x73","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x64\x62\x48","\x61\x72\x67\x76","\x75\x70\x64\x61\x74\x65","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x65\x72\x72\x6F\x72","\x45\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x73\x45\x6D\x70\x74\x79","\x45\x6D\x70\x74\x79","\x62\x69\x6E\x61\x72\x79","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x74\x68\x65\x6E","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64"];_0xb595[0];var util=require(_0xb595[1]);var _=require(_0xb595[2]);var json2xls=require(_0xb595[3]);var fs=require(_0xb595[4]);var db=require(_0xb595[6])[_0xb595[5]];var dbH=require(_0xb595[6])[_0xb595[7]];var EXTRACTED_REPORT_ID=process[_0xb595[8]][2];var QUERY=process[_0xb595[8]][3];var PATH=process[_0xb595[8]][4];var _extractedReport;function analyticExtractedReport(_0x51f5xc){return db[_0xb595[10]][_0xb595[9]]({status:_0x51f5xc},{where:{id:EXTRACTED_REPORT_ID}})}return db[_0xb595[10]][_0xb595[24]]({id:EXTRACTED_REPORT_ID})[_0xb595[19]](function(_0x51f5x10){_extractedReport= _0x51f5x10;return dbH[_0xb595[22]][_0xb595[23]](QUERY,{type:dbH[_0xb595[22]][_0xb595[21]][_0xb595[20]]})})[_0xb595[19]](function(_0x51f5xe){if(_[_0xb595[14]](_0x51f5xe)){return analyticExtractedReport(_0xb595[15])};var _0x51f5xf=json2xls(_0x51f5xe);fs[_0xb595[17]](PATH,_0x51f5xf,_0xb595[16]);return analyticExtractedReport(_0xb595[18])})[_0xb595[13]](function(_0x51f5xd){console[_0xb595[11]](_0x51f5xd);return analyticExtractedReport(_0xb595[12])})
\ No newline at end of file
+var _0x6baa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6A\x73\x6F\x6E\x32\x78\x6C\x73","\x66\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x64\x62\x48","\x61\x72\x67\x76","\x75\x70\x64\x61\x74\x65","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x65\x72\x72\x6F\x72","\x45\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x73\x45\x6D\x70\x74\x79","\x45\x6D\x70\x74\x79","\x62\x69\x6E\x61\x72\x79","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x74\x68\x65\x6E","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64"];_0x6baa[0];var util=require(_0x6baa[1]);var _=require(_0x6baa[2]);var json2xls=require(_0x6baa[3]);var fs=require(_0x6baa[4]);var db=require(_0x6baa[6])[_0x6baa[5]];var dbH=require(_0x6baa[6])[_0x6baa[7]];var EXTRACTED_REPORT_ID=process[_0x6baa[8]][2];var QUERY=process[_0x6baa[8]][3];var PATH=process[_0x6baa[8]][4];var _extractedReport;function analyticExtractedReport(_0x82a7xc){return db[_0x6baa[10]][_0x6baa[9]]({status:_0x82a7xc},{where:{id:EXTRACTED_REPORT_ID}})}return db[_0x6baa[10]][_0x6baa[24]]({id:EXTRACTED_REPORT_ID})[_0x6baa[19]](function(_0x82a7x10){_extractedReport= _0x82a7x10;return dbH[_0x6baa[22]][_0x6baa[23]](QUERY,{type:dbH[_0x6baa[22]][_0x6baa[21]][_0x6baa[20]]})})[_0x6baa[19]](function(_0x82a7xe){if(_[_0x6baa[14]](_0x82a7xe)){return analyticExtractedReport(_0x6baa[15])};var _0x82a7xf=json2xls(_0x82a7xe);fs[_0x6baa[17]](PATH,_0x82a7xf,_0x6baa[16]);return analyticExtractedReport(_0x6baa[18])})[_0x6baa[13]](function(_0x82a7xd){console[_0x6baa[11]](_0x82a7xd);return analyticExtractedReport(_0x6baa[12])})
\ No newline at end of file
index 3c8fe0f..ec94c42 100644 (file)
@@ -1 +1 @@
-var _0xee68=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x66\x73","\x6A\x73\x6F\x6E\x32\x78\x6C\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x64\x62\x48","\x61\x72\x67\x76","\x75\x70\x64\x61\x74\x65","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x65\x72\x72\x6F\x72","\x45\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x73\x45\x6D\x70\x74\x79","\x45\x6D\x70\x74\x79","\x62\x69\x6E\x61\x72\x79","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x74\x68\x65\x6E","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x71\x75\x65\x72\x79"];_0xee68[0];var _=require(_0xee68[1]);var fs=require(_0xee68[2]);var json2xls=require(_0xee68[3]);var db=require(_0xee68[5])[_0xee68[4]];var dbH=require(_0xee68[5])[_0xee68[6]];var EXTRACTED_REPORT_ID=process[_0xee68[7]][2];var QUERY=process[_0xee68[7]][3];var PATH=process[_0xee68[7]][4];function analyticExtractedReport(_0x5f7cxa){return db[_0xee68[9]][_0xee68[8]]({status:_0x5f7cxa},{where:{id:EXTRACTED_REPORT_ID}})}return dbH[_0xee68[21]][_0xee68[22]](QUERY,{type:dbH[_0xee68[21]][_0xee68[20]][_0xee68[19]]})[_0xee68[18]](function(_0x5f7cxc){if(_[_0xee68[13]](_0x5f7cxc)){return analyticExtractedReport(_0xee68[14])};var _0x5f7cxd=json2xls(_0x5f7cxc);fs[_0xee68[16]](PATH,_0x5f7cxd,_0xee68[15]);return analyticExtractedReport(_0xee68[17])})[_0xee68[12]](function(_0x5f7cxb){console[_0xee68[10]](_0x5f7cxb);return analyticExtractedReport(_0xee68[11])})
\ No newline at end of file
+var _0xf085=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x66\x73","\x6A\x73\x6F\x6E\x32\x78\x6C\x73","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x64\x62\x48","\x61\x72\x67\x76","\x75\x70\x64\x61\x74\x65","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x65\x72\x72\x6F\x72","\x45\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x73\x45\x6D\x70\x74\x79","\x45\x6D\x70\x74\x79","\x62\x69\x6E\x61\x72\x79","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x74\x68\x65\x6E","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x71\x75\x65\x72\x79"];_0xf085[0];var _=require(_0xf085[1]);var fs=require(_0xf085[2]);var json2xls=require(_0xf085[3]);var db=require(_0xf085[5])[_0xf085[4]];var dbH=require(_0xf085[5])[_0xf085[6]];var EXTRACTED_REPORT_ID=process[_0xf085[7]][2];var QUERY=process[_0xf085[7]][3];var PATH=process[_0xf085[7]][4];function analyticExtractedReport(_0xdec3xa){return db[_0xf085[9]][_0xf085[8]]({status:_0xdec3xa},{where:{id:EXTRACTED_REPORT_ID}})}return dbH[_0xf085[21]][_0xf085[22]](QUERY,{type:dbH[_0xf085[21]][_0xf085[20]][_0xf085[19]]})[_0xf085[18]](function(_0xdec3xc){if(_[_0xf085[13]](_0xdec3xc)){return analyticExtractedReport(_0xf085[14])};var _0xdec3xd=json2xls(_0xdec3xc);fs[_0xf085[16]](PATH,_0xdec3xd,_0xf085[15]);return analyticExtractedReport(_0xf085[17])})[_0xf085[12]](function(_0xdec3xb){console[_0xf085[10]](_0xdec3xb);return analyticExtractedReport(_0xf085[11])})
\ No newline at end of file
index 9d807d2..4a3cd2a 100644 (file)
@@ -1 +1 @@
-var _0x3571=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x65\x78\x74\x65\x6E","\x67\x72\x6F\x75\x70\x42\x79","\x71\x75\x65\x75\x65","\x70\x6C\x61\x79\x62\x61\x63\x6B","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x61\x6E\x73\x77\x65\x72","\x70\x72\x6F\x67\x72\x65\x73\x73","\x70\x72\x69\x6F\x72\x69\x74\x79","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x74\x79\x70\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x49\x64","\x70\x75\x73\x68","\x6C\x65\x6E\x67\x74\x68","\x69\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x66\x69\x6C\x74\x65\x72","\x6D\x61\x70","\x74\x61\x67","\x2D\x2D","\x43\x44\x52\x28\x74\x61\x67\x29\x3D","\x63\x61\x6C\x6C\x65\x72\x49\x44","\x43\x41\x4C\x4C\x45\x52\x49\x44\x28\x61\x6C\x6C\x29\x3D","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x70\x70","\x69\x6E\x64\x65\x78\x4F\x66","\x61\x70\x70\x54\x79\x70\x65","\x63\x75\x73\x74\x6F\x6D","\x41\x6E\x73\x77\x65\x72","\x50\x72\x6F\x67\x72\x65\x73\x73","\x72\x65\x63\x6F\x72\x64","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x24\x7B\x55\x4E\x49\x51\x55\x45\x49\x44\x7D\x2E","\x2C\x61\x62","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x47\x6F\x74\x6F\x49\x66\x54\x69\x6D\x65","\x3F","\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C","\x3A","\x73\x70\x6C\x69\x63\x65","\x6C\x61\x73\x74","\x63\x6F\x6E\x63\x61\x74","\x48\x61\x6E\x67\x75\x70","\x73\x6F\x72\x74\x42\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x6D\x6F\x64\x65\x6C\x73","\x74\x68\x65\x6E","\x64\x65\x73\x74\x72\x6F\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x6E\x69\x71","\x43\x41\x53\x54\x28\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x20\x55\x4E\x53\x49\x47\x4E\x45\x44\x29","\x66\x69\x6E\x64\x41\x6C\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x72\x65\x77\x72\x69\x74\x65"];_0x3571[0];var _=require(_0x3571[1]);var util=require(_0x3571[2]);function rewrite(_0xac66x4,_0xac66x5){var _0xac66x6=this;return _0xac66x4[_0x3571[60]][_0x3571[67]][_0x3571[66]]({raw:true})[_0x3571[61]](function(_0xac66x13){_0xac66x6[_0x3571[28]]= _0xac66x13;return _0xac66x4[_0x3571[60]][_0x3571[59]][_0x3571[66]]({where:{IntervalId:_0xac66x5[_0x3571[27]]},raw:true})})[_0x3571[61]](function(_0xac66x8){return _0xac66x4[_0x3571[60]][_0x3571[59]][_0x3571[66]]({where:{exten:{$in:_[_0x3571[64]](_[_0x3571[30]](_0xac66x8,_0x3571[5]))},isApp:true},order:[{raw:_0x3571[65]}],raw:true})})[_0x3571[61]](function(_0xac66x8){var _0xac66x9=_[_0x3571[6]](_0xac66x8,_0x3571[5]);var _0xac66xa=[_0x3571[7],_0x3571[8]];var _0xac66xb=[];var _0xac66xc=[];for(var _0xac66xd in _0xac66x9){if(_0xac66x9[_0x3571[9]](_0xac66xd)){_0xac66x6[_0x3571[10]]= false;_0xac66x6[_0x3571[11]]= false;_0xac66x6[_0x3571[12]]= 2;_0xac66x6[_0x3571[13]]= [];_0xac66x6[_0x3571[13]][_0x3571[20]]({type:_0xac66x9[_0xac66xd][0][_0x3571[14]],context:_0xac66x9[_0xac66xd][0][_0x3571[15]],exten:_0xac66x9[_0xac66xd][0][_0x3571[5]],priority:_0xac66x6[_0x3571[12]]++,app:_0x3571[16],appdata:util[_0x3571[18]](_0x3571[17],_0xac66x9[_0xac66xd][0][_0x3571[14]]),VoiceExtensionId:_0xac66x9[_0xac66xd][0][_0x3571[19]]});for(var _0xac66xe=0,_0xac66xf=0;_0xac66xe< _0xac66x9[_0xac66xd][_0x3571[21]];_0xac66xe+= 1,_0xac66xf= 0){var _0xac66x10=_0xac66x9[_0xac66xd][_0xac66xe];var _0xac66x11=[];var _0xac66x12=[];delete _0xac66x10[_0x3571[22]];delete _0xac66x10[_0x3571[23]];delete _0xac66x10[_0x3571[24]];var _0xac66x13=(_0xac66x10[_0x3571[25]]!== _0x3571[26])?[_0xac66x10[_0x3571[25]]]:(_0xac66x10[_0x3571[27]]?_[_0x3571[30]](_[_0x3571[29]](_0xac66x6[_0x3571[28]],{IntervalId:_0xac66x10[_0x3571[27]]}),_0x3571[25]):[]);if(_0xac66x10[_0x3571[9]](_0x3571[31])){if(_0xac66x10[_0x3571[31]]&& _0xac66x10[_0x3571[31]]!== _0x3571[32]){_0xac66x11[_0x3571[20]]({type:_0xac66x10[_0x3571[14]],app:_0x3571[16],appdata:_0x3571[33]+ _0xac66x10[_0x3571[31]],context:_0xac66x10[_0x3571[15]],exten:_0xac66x10[_0x3571[5]],priority:_0xac66x13[_0x3571[21]]+ _0xac66x6[_0x3571[12]]+ _0xac66xf++,VoiceExtensionId:_0xac66x9[_0xac66xd][0][_0x3571[19]]})}};if(_0xac66x10[_0x3571[9]](_0x3571[34])){if(_0xac66x10[_0x3571[34]]){_0xac66x11[_0x3571[20]]({type:_0xac66x10[_0x3571[14]],app:_0x3571[16],appdata:_0x3571[35]+ _0xac66x10[_0x3571[34]],context:_0xac66x10[_0x3571[15]],exten:_0xac66x10[_0x3571[5]],priority:_0xac66x13[_0x3571[21]]+ _0xac66x6[_0x3571[12]]+ _0xac66xf++,VoiceExtensionId:_0xac66x9[_0xac66xd][0][_0x3571[19]]})}};if(_0xac66x10[_0x3571[9]](_0x3571[10])){if(_0xac66xa[_0x3571[38]](_0xac66x10[_0x3571[37]][_0x3571[36]]())>= 0&& _0xac66x10[_0x3571[39]]!== _0x3571[40]){if(!_0xac66x6[_0x3571[10]]&& _0xac66x10[_0x3571[10]]){_0xac66x6[_0x3571[10]]= true;_0xac66x11[_0x3571[20]]({type:_0xac66x10[_0x3571[14]],app:_0x3571[41],context:_0xac66x10[_0x3571[15]],exten:_0xac66x10[_0x3571[5]],priority:_0xac66x13[_0x3571[21]]+ _0xac66x6[_0x3571[12]]+ _0xac66xf++,VoiceExtensionId:_0xac66x9[_0xac66xd][0][_0x3571[19]]})};if(!_0xac66x6[_0x3571[10]]&&  !_0xac66x6[_0x3571[11]] &&  !_0xac66x10[_0x3571[10]]){_0xac66x6[_0x3571[11]]= true;_0xac66x11[_0x3571[20]]({type:_0xac66x10[_0x3571[14]],app:_0x3571[42],context:_0xac66x10[_0x3571[15]],exten:_0xac66x10[_0x3571[5]],priority:_0xac66x13[_0x3571[21]]+ _0xac66x6[_0x3571[12]]+ _0xac66xf++,VoiceExtensionId:_0xac66x9[_0xac66xd][0][_0x3571[19]]})}}};if(_0xac66x10[_0x3571[9]](_0x3571[43])&& _0xac66x10[_0x3571[9]](_0x3571[44])){if(_0xac66x10[_0x3571[43]]){_0xac66x11[_0x3571[20]]({type:_0xac66x10[_0x3571[14]],app:_0x3571[45],appdata:_0x3571[46]+ _0xac66x10[_0x3571[44]]+ _0x3571[47],context:_0xac66x10[_0x3571[15]],exten:_0xac66x10[_0x3571[5]],priority:_0xac66x13[_0x3571[21]]+ _0xac66x6[_0x3571[12]]+ _0xac66xf++,VoiceExtensionId:_0xac66x9[_0xac66xd][0][_0x3571[19]]})}};if(_0xac66x10[_0x3571[9]](_0x3571[43])&& _0xac66x10[_0x3571[9]](_0x3571[44])){if(_0xac66x10[_0x3571[43]]){_0xac66x12[_0x3571[20]]({type:_0xac66x10[_0x3571[14]],app:_0x3571[48],appdata:null,context:_0xac66x10[_0x3571[15]],exten:_0xac66x10[_0x3571[5]],priority:_0xac66x13[_0x3571[21]]+ _0xac66x6[_0x3571[12]]+ _0xac66xf+++  1,VoiceExtensionId:_0xac66x9[_0xac66xd][0][_0x3571[19]]})}};for(var _0xac66x14=0;_0xac66x14< _0xac66x13[_0x3571[21]];_0xac66x14+= 1){var _0xac66x15=_0xac66x6[_0x3571[12]]+ _0xac66x13[_0x3571[21]];var _0xac66x16=(_0xac66x14=== (_0xac66x13[_0x3571[21]]- 1))?_0xac66x6[_0x3571[12]]+ _0xac66x11[_0x3571[21]]+ _0xac66x12[_0x3571[21]]+ 2:_0xac66x6[_0x3571[12]]+ _0xac66x14+ 1;_0xac66x11[_0x3571[53]](_0xac66x14,0,{type:_0xac66x10[_0x3571[14]],app:_0x3571[49],appdata:_0xac66x13[_0xac66x14]+ _0x3571[50]+ _0xac66x10[_0x3571[15]]+ _0x3571[51]+ _0xac66x15+ _0x3571[52]+ _0xac66x10[_0x3571[15]]+ _0x3571[51]+ _0xac66x16,exten:_0xac66x10[_0x3571[5]],context:_0xac66x10[_0x3571[15]],priority:_0xac66x6[_0x3571[12]]+ _0xac66x14,VoiceExtensionId:_0xac66x9[_0xac66xd][0][_0x3571[19]]})};_0xac66x10[_0x3571[12]]= (_0xac66x11[_0x3571[21]]?_[_0x3571[54]](_0xac66x11)[_0x3571[12]]+ 1:_0xac66x6[_0x3571[12]]);_0xac66x6[_0x3571[12]]= (_0xac66x12[_0x3571[21]]?_[_0x3571[54]](_0xac66x12)[_0x3571[12]]:_0xac66x10[_0x3571[12]])+ 1;_0xac66x6[_0x3571[13]]= _[_0x3571[55]](_0xac66x6[_0x3571[13]],_0xac66x11,[_0xac66x10],_0xac66x12)};_0xac66x6[_0x3571[13]][_0x3571[20]]({type:_0xac66x9[_0xac66xd][0][_0x3571[14]],app:_0x3571[56],exten:_0xac66x9[_0xac66xd][0][_0x3571[5]],context:_0xac66x9[_0xac66xd][0][_0x3571[15]],priority:_0xac66x6[_0x3571[12]],VoiceExtensionId:_0xac66x9[_0xac66xd][0][_0x3571[19]]});_0xac66xb[_0x3571[20]](_0xac66x9[_0xac66xd][0].VoiceExtensionId);_0xac66xc= _[_0x3571[55]](_0xac66xc,_0xac66x6[_0x3571[13]])}};return _0xac66x4[_0x3571[63]](function(_0xac66x17){return _0xac66x4[_0x3571[60]][_0x3571[59]][_0x3571[62]]({where:{VoiceExtensionId:{$in:_0xac66xb}},transaction:_0xac66x17})[_0x3571[61]](function(_0xac66x18){return _0xac66x4[_0x3571[60]][_0x3571[59]][_0x3571[58]](_[_0x3571[57]](_0xac66xc,_0x3571[12]),{transaction:_0xac66x17})})})})[_0x3571[4]](function(_0xac66x7){console[_0x3571[3]](_0xac66x7)})}exports[_0x3571[68]]= rewrite
\ No newline at end of file
+var _0x4cba=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x65\x78\x74\x65\x6E","\x67\x72\x6F\x75\x70\x42\x79","\x71\x75\x65\x75\x65","\x70\x6C\x61\x79\x62\x61\x63\x6B","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x61\x6E\x73\x77\x65\x72","\x70\x72\x6F\x67\x72\x65\x73\x73","\x70\x72\x69\x6F\x72\x69\x74\x79","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x74\x79\x70\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x49\x64","\x70\x75\x73\x68","\x6C\x65\x6E\x67\x74\x68","\x69\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x66\x69\x6C\x74\x65\x72","\x6D\x61\x70","\x74\x61\x67","\x2D\x2D","\x43\x44\x52\x28\x74\x61\x67\x29\x3D","\x63\x61\x6C\x6C\x65\x72\x49\x44","\x43\x41\x4C\x4C\x45\x52\x49\x44\x28\x61\x6C\x6C\x29\x3D","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x70\x70","\x69\x6E\x64\x65\x78\x4F\x66","\x61\x70\x70\x54\x79\x70\x65","\x63\x75\x73\x74\x6F\x6D","\x41\x6E\x73\x77\x65\x72","\x50\x72\x6F\x67\x72\x65\x73\x73","\x72\x65\x63\x6F\x72\x64","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x24\x7B\x55\x4E\x49\x51\x55\x45\x49\x44\x7D\x2E","\x2C\x61\x62","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x47\x6F\x74\x6F\x49\x66\x54\x69\x6D\x65","\x3F","\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C","\x3A","\x73\x70\x6C\x69\x63\x65","\x6C\x61\x73\x74","\x63\x6F\x6E\x63\x61\x74","\x48\x61\x6E\x67\x75\x70","\x73\x6F\x72\x74\x42\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x6D\x6F\x64\x65\x6C\x73","\x74\x68\x65\x6E","\x64\x65\x73\x74\x72\x6F\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x6E\x69\x71","\x43\x41\x53\x54\x28\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x20\x55\x4E\x53\x49\x47\x4E\x45\x44\x29","\x66\x69\x6E\x64\x41\x6C\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x72\x65\x77\x72\x69\x74\x65"];_0x4cba[0];var _=require(_0x4cba[1]);var util=require(_0x4cba[2]);function rewrite(_0x977ex4,_0x977ex5){var _0x977ex6=this;return _0x977ex4[_0x4cba[60]][_0x4cba[67]][_0x4cba[66]]({raw:true})[_0x4cba[61]](function(_0x977ex13){_0x977ex6[_0x4cba[28]]= _0x977ex13;return _0x977ex4[_0x4cba[60]][_0x4cba[59]][_0x4cba[66]]({where:{IntervalId:_0x977ex5[_0x4cba[27]]},raw:true})})[_0x4cba[61]](function(_0x977ex8){return _0x977ex4[_0x4cba[60]][_0x4cba[59]][_0x4cba[66]]({where:{exten:{$in:_[_0x4cba[64]](_[_0x4cba[30]](_0x977ex8,_0x4cba[5]))},isApp:true},order:[{raw:_0x4cba[65]}],raw:true})})[_0x4cba[61]](function(_0x977ex8){var _0x977ex9=_[_0x4cba[6]](_0x977ex8,_0x4cba[5]);var _0x977exa=[_0x4cba[7],_0x4cba[8]];var _0x977exb=[];var _0x977exc=[];for(var _0x977exd in _0x977ex9){if(_0x977ex9[_0x4cba[9]](_0x977exd)){_0x977ex6[_0x4cba[10]]= false;_0x977ex6[_0x4cba[11]]= false;_0x977ex6[_0x4cba[12]]= 2;_0x977ex6[_0x4cba[13]]= [];_0x977ex6[_0x4cba[13]][_0x4cba[20]]({type:_0x977ex9[_0x977exd][0][_0x4cba[14]],context:_0x977ex9[_0x977exd][0][_0x4cba[15]],exten:_0x977ex9[_0x977exd][0][_0x4cba[5]],priority:_0x977ex6[_0x4cba[12]]++,app:_0x4cba[16],appdata:util[_0x4cba[18]](_0x4cba[17],_0x977ex9[_0x977exd][0][_0x4cba[14]]),VoiceExtensionId:_0x977ex9[_0x977exd][0][_0x4cba[19]]});for(var _0x977exe=0,_0x977exf=0;_0x977exe< _0x977ex9[_0x977exd][_0x4cba[21]];_0x977exe+= 1,_0x977exf= 0){var _0x977ex10=_0x977ex9[_0x977exd][_0x977exe];var _0x977ex11=[];var _0x977ex12=[];delete _0x977ex10[_0x4cba[22]];delete _0x977ex10[_0x4cba[23]];delete _0x977ex10[_0x4cba[24]];var _0x977ex13=(_0x977ex10[_0x4cba[25]]!== _0x4cba[26])?[_0x977ex10[_0x4cba[25]]]:(_0x977ex10[_0x4cba[27]]?_[_0x4cba[30]](_[_0x4cba[29]](_0x977ex6[_0x4cba[28]],{IntervalId:_0x977ex10[_0x4cba[27]]}),_0x4cba[25]):[]);if(_0x977ex10[_0x4cba[9]](_0x4cba[31])){if(_0x977ex10[_0x4cba[31]]&& _0x977ex10[_0x4cba[31]]!== _0x4cba[32]){_0x977ex11[_0x4cba[20]]({type:_0x977ex10[_0x4cba[14]],app:_0x4cba[16],appdata:_0x4cba[33]+ _0x977ex10[_0x4cba[31]],context:_0x977ex10[_0x4cba[15]],exten:_0x977ex10[_0x4cba[5]],priority:_0x977ex13[_0x4cba[21]]+ _0x977ex6[_0x4cba[12]]+ _0x977exf++,VoiceExtensionId:_0x977ex9[_0x977exd][0][_0x4cba[19]]})}};if(_0x977ex10[_0x4cba[9]](_0x4cba[34])){if(_0x977ex10[_0x4cba[34]]){_0x977ex11[_0x4cba[20]]({type:_0x977ex10[_0x4cba[14]],app:_0x4cba[16],appdata:_0x4cba[35]+ _0x977ex10[_0x4cba[34]],context:_0x977ex10[_0x4cba[15]],exten:_0x977ex10[_0x4cba[5]],priority:_0x977ex13[_0x4cba[21]]+ _0x977ex6[_0x4cba[12]]+ _0x977exf++,VoiceExtensionId:_0x977ex9[_0x977exd][0][_0x4cba[19]]})}};if(_0x977ex10[_0x4cba[9]](_0x4cba[10])){if(_0x977exa[_0x4cba[38]](_0x977ex10[_0x4cba[37]][_0x4cba[36]]())>= 0&& _0x977ex10[_0x4cba[39]]!== _0x4cba[40]){if(!_0x977ex6[_0x4cba[10]]&& _0x977ex10[_0x4cba[10]]){_0x977ex6[_0x4cba[10]]= true;_0x977ex11[_0x4cba[20]]({type:_0x977ex10[_0x4cba[14]],app:_0x4cba[41],context:_0x977ex10[_0x4cba[15]],exten:_0x977ex10[_0x4cba[5]],priority:_0x977ex13[_0x4cba[21]]+ _0x977ex6[_0x4cba[12]]+ _0x977exf++,VoiceExtensionId:_0x977ex9[_0x977exd][0][_0x4cba[19]]})};if(!_0x977ex6[_0x4cba[10]]&&  !_0x977ex6[_0x4cba[11]] &&  !_0x977ex10[_0x4cba[10]]){_0x977ex6[_0x4cba[11]]= true;_0x977ex11[_0x4cba[20]]({type:_0x977ex10[_0x4cba[14]],app:_0x4cba[42],context:_0x977ex10[_0x4cba[15]],exten:_0x977ex10[_0x4cba[5]],priority:_0x977ex13[_0x4cba[21]]+ _0x977ex6[_0x4cba[12]]+ _0x977exf++,VoiceExtensionId:_0x977ex9[_0x977exd][0][_0x4cba[19]]})}}};if(_0x977ex10[_0x4cba[9]](_0x4cba[43])&& _0x977ex10[_0x4cba[9]](_0x4cba[44])){if(_0x977ex10[_0x4cba[43]]){_0x977ex11[_0x4cba[20]]({type:_0x977ex10[_0x4cba[14]],app:_0x4cba[45],appdata:_0x4cba[46]+ _0x977ex10[_0x4cba[44]]+ _0x4cba[47],context:_0x977ex10[_0x4cba[15]],exten:_0x977ex10[_0x4cba[5]],priority:_0x977ex13[_0x4cba[21]]+ _0x977ex6[_0x4cba[12]]+ _0x977exf++,VoiceExtensionId:_0x977ex9[_0x977exd][0][_0x4cba[19]]})}};if(_0x977ex10[_0x4cba[9]](_0x4cba[43])&& _0x977ex10[_0x4cba[9]](_0x4cba[44])){if(_0x977ex10[_0x4cba[43]]){_0x977ex12[_0x4cba[20]]({type:_0x977ex10[_0x4cba[14]],app:_0x4cba[48],appdata:null,context:_0x977ex10[_0x4cba[15]],exten:_0x977ex10[_0x4cba[5]],priority:_0x977ex13[_0x4cba[21]]+ _0x977ex6[_0x4cba[12]]+ _0x977exf+++  1,VoiceExtensionId:_0x977ex9[_0x977exd][0][_0x4cba[19]]})}};for(var _0x977ex14=0;_0x977ex14< _0x977ex13[_0x4cba[21]];_0x977ex14+= 1){var _0x977ex15=_0x977ex6[_0x4cba[12]]+ _0x977ex13[_0x4cba[21]];var _0x977ex16=(_0x977ex14=== (_0x977ex13[_0x4cba[21]]- 1))?_0x977ex6[_0x4cba[12]]+ _0x977ex11[_0x4cba[21]]+ _0x977ex12[_0x4cba[21]]+ 2:_0x977ex6[_0x4cba[12]]+ _0x977ex14+ 1;_0x977ex11[_0x4cba[53]](_0x977ex14,0,{type:_0x977ex10[_0x4cba[14]],app:_0x4cba[49],appdata:_0x977ex13[_0x977ex14]+ _0x4cba[50]+ _0x977ex10[_0x4cba[15]]+ _0x4cba[51]+ _0x977ex15+ _0x4cba[52]+ _0x977ex10[_0x4cba[15]]+ _0x4cba[51]+ _0x977ex16,exten:_0x977ex10[_0x4cba[5]],context:_0x977ex10[_0x4cba[15]],priority:_0x977ex6[_0x4cba[12]]+ _0x977ex14,VoiceExtensionId:_0x977ex9[_0x977exd][0][_0x4cba[19]]})};_0x977ex10[_0x4cba[12]]= (_0x977ex11[_0x4cba[21]]?_[_0x4cba[54]](_0x977ex11)[_0x4cba[12]]+ 1:_0x977ex6[_0x4cba[12]]);_0x977ex6[_0x4cba[12]]= (_0x977ex12[_0x4cba[21]]?_[_0x4cba[54]](_0x977ex12)[_0x4cba[12]]:_0x977ex10[_0x4cba[12]])+ 1;_0x977ex6[_0x4cba[13]]= _[_0x4cba[55]](_0x977ex6[_0x4cba[13]],_0x977ex11,[_0x977ex10],_0x977ex12)};_0x977ex6[_0x4cba[13]][_0x4cba[20]]({type:_0x977ex9[_0x977exd][0][_0x4cba[14]],app:_0x4cba[56],exten:_0x977ex9[_0x977exd][0][_0x4cba[5]],context:_0x977ex9[_0x977exd][0][_0x4cba[15]],priority:_0x977ex6[_0x4cba[12]],VoiceExtensionId:_0x977ex9[_0x977exd][0][_0x4cba[19]]});_0x977exb[_0x4cba[20]](_0x977ex9[_0x977exd][0].VoiceExtensionId);_0x977exc= _[_0x4cba[55]](_0x977exc,_0x977ex6[_0x4cba[13]])}};return _0x977ex4[_0x4cba[63]](function(_0x977ex17){return _0x977ex4[_0x4cba[60]][_0x4cba[59]][_0x4cba[62]]({where:{VoiceExtensionId:{$in:_0x977exb}},transaction:_0x977ex17})[_0x4cba[61]](function(_0x977ex18){return _0x977ex4[_0x4cba[60]][_0x4cba[59]][_0x4cba[58]](_[_0x4cba[57]](_0x977exc,_0x4cba[12]),{transaction:_0x977ex17})})})})[_0x4cba[4]](function(_0x977ex7){console[_0x4cba[3]](_0x977ex7)})}exports[_0x4cba[68]]= rewrite
\ No newline at end of file
index a60adea..01004ad 100644 (file)
@@ -1 +1 @@
-var _0xd001=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x66\x73","\x73\x71\x75\x65\x6C","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x61\x72\x67\x76","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6E\x75\x6C\x6C","\x4D\x69\x73\x73\x69\x6E\x67\x20\x66\x69\x6C\x65\x70\x61\x74\x68\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x21","\x4D\x69\x73\x73\x69\x6E\x67\x20\x62\x69\x6E\x64\x69\x6E\x67\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x21","\x2C","\x73\x70\x6C\x69\x74","\x7A\x69\x70\x4F\x62\x6A\x65\x63\x74","\x4D\x69\x73\x73\x69\x6E\x67\x20\x4C\x69\x73\x74\x49\x64\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x21","\x4D\x69\x73\x73\x69\x6E\x67\x20\x73\x6F\x63\x6B\x65\x74\x5F\x74\x69\x6D\x65\x73\x74\x61\x6D\x70\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x21","\x65\x72\x72\x6F\x72","","\x63\x6F\x6E\x74\x61\x63\x74","\x69\x6E\x64\x65\x78","\x74\x65\x73\x74","\x69\x73\x4E\x69\x6C","\x54\x68\x65\x20\x72\x6F\x77\x20\x69\x73\x20\x65\x6D\x70\x74\x79\x20\x6F\x72\x20\x74\x68\x65\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x6D\x61\x74\x63\x68\x20\x74\x68\x65\x20\x63\x6F\x6C\x75\x6D\x6E\x73\x21","\x65\x72\x72\x6F\x72\x73","\x6C\x65\x6E\x67\x74\x68","\x3B","\x6A\x6F\x69\x6E","\x6D\x65\x73\x73\x61\x67\x65","\x6D\x61\x70","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x64\x61\x74\x61","\uFEFF","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65\x20\x6E\x6F\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x21","\x70\x68\x6F\x6E\x65","\x70\x68\x6F\x6E\x65\x20\x6E\x6F\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x21","\x62\x69\x72\x74\x68\x44\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44","\x69\x73\x56\x61\x6C\x69\x64","\x62\x69\x72\x74\x68\x44\x61\x74\x65\x20\x66\x6F\x72\x6D\x61\x74\x20\x69\x73\x20\x69\x6E\x76\x61\x6C\x69\x64\x2C\x20\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x66\x6F\x72\x6D\x61\x74\x20\x69\x73\x20\x73\x75\x70\x70\x6F\x72\x74\x65\x64\x21","\x65\x6D\x61\x69\x6C","\x65\x6D\x61\x69\x6C\x20\x66\x6F\x72\x6D\x61\x74\x20\x69\x73\x20\x6E\x6F\x74\x20\x76\x61\x6C\x69\x64\x21","\x4C\x69\x73\x74\x49\x64","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x66\x69\x6E\x64","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x44\x75\x70\x6C\x69\x63\x61\x74\x65\x20\x43\x6F\x6E\x74\x61\x63\x74","\x45\x72\x72\x6F\x72\x20\x77\x68\x69\x6C\x65\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x63\x6F\x6E\x74\x61\x63\x74\x3A\x20","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x63\x61\x74\x63\x68","\x70\x69\x63\x6B","\x70\x75\x73\x68","\x69\x64","\x74\x68\x65\x6E","\x6B\x65\x79\x73","\x63\x72\x65\x61\x74\x65","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x63\x68\x65\x63\x6B\x48\x6F\x70\x70\x65\x72","\x69\x6E\x73\x70\x65\x63\x74","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x68\x6F\x6E\x65\x20\x4E\x4F\x54\x20\x49\x4E\x20\x28\x3F\x29","\x20\x3D\x20\x3F","\x77\x68\x65\x72\x65","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72","\x66\x72\x6F\x6D","\x66\x69\x65\x6C\x64","\x73\x65\x6C\x65\x63\x74","\x70\x68\x6F\x6E\x65\x20\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C","\x4C\x69\x73\x74\x49\x64\x20\x3D\x20\x3F","\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x20\x49\x53\x20\x4E\x55\x4C\x4C","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x4E\x4F\x57\x28\x29","\x66\x72\x6F\x6D\x51\x75\x65\x72\x79","\x69\x6E\x74\x6F","\x69\x6E\x73\x65\x72\x74","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x66\x69\x6E\x61\x6C","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x69\x64\x20\x49\x4E\x20\x3F","\x73\x74\x72","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x62\x6C\x61\x63\x6B","\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x67\x65\x6E\x65\x72\x61\x6C\x43\x68\x65\x63\x6B\x48\x6F\x70\x70\x65\x72","\x61\x6C\x6C","\x67\x65\x74","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x71\x75\x65\x72\x79","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x43\x6D\x4C\x69\x73\x74","\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x43\x61\x6D\x70\x61\x69\x67\x6E","\x61\x6C\x77\x61\x79\x73","\x6F\x6E\x6C\x79\x49\x66\x4F\x70\x65\x6E","\x64\x69\x61\x6C\x43\x68\x65\x63\x6B\x44\x75\x70\x6C\x69\x63\x61\x74\x65\x54\x79\x70\x65","\x4C\x69\x73\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x63\x6F\x6E\x74\x61\x63\x74\x3A\x63\x73\x76\x5F","\x65\x6D\x69\x74","\x72\x65\x73\x75\x6D\x65","\x66\x69\x6E\x61\x6C\x6C\x79","\x45\x72\x72\x6F\x72\x20\x70\x72\x6F\x63\x65\x73\x73\x69\x6E\x67\x20\x72\x6F\x77\x73\x20\x62\x6C\x6F\x63\x6B\x3A","\x75\x6E\x6C\x69\x6E\x6B\x53\x79\x6E\x63","\x55\x6E\x61\x62\x6C\x65\x20\x74\x6F\x20\x64\x65\x6C\x65\x74\x65\x20\x74\x65\x6D\x70\x20\x66\x69\x6C\x65\x3A","\x65\x78\x69\x74","\x72\x65\x73\x6F\x6C\x76\x65","\x53\x49\x47\x49\x4E\x54","\x43\x53\x56\x20\x69\x6D\x70\x6F\x72\x74\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x73\x74\x6F\x70\x70\x65\x64\x21","\x69\x6E\x66\x6F","\x6F\x6E","\x45\x72\x72\x6F\x72\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x63\x73\x76\x20\x69\x6D\x70\x6F\x72\x74\x3A","\x63\x72\x65\x61\x74\x65\x52\x65\x61\x64\x53\x74\x72\x65\x61\x6D","\x70\x61\x75\x73\x65","\x43\x53\x56\x20\x70\x61\x72\x73\x65\x64\x20\x63\x6F\x72\x72\x65\x63\x74\x6C\x79\x21","\x43\x53\x56\x20\x70\x61\x72\x73\x65\x20\x65\x72\x72\x6F\x72","\x70\x61\x72\x73\x65"];_0xd001[0];var BPromise=require(_0xd001[1]);var db=require(_0xd001[3])[_0xd001[2]];var logger=require(_0xd001[5])(_0xd001[4]);var util=require(_0xd001[6]);var _=require(_0xd001[7]);var fs=require(_0xd001[8]);var squel=require(_0xd001[9]);var Papa=require(_0xd001[10]);var socket=require(_0xd001[12])({host:_0xd001[11],port:6379});require(_0xd001[14])[_0xd001[13]](socket);try{if(!process[_0xd001[15]][2]|| process[_0xd001[15]][2]=== _0xd001[16] || process[_0xd001[15]][2]=== _0xd001[17]){throw  new Error(_0xd001[18])};var FILEPATH=process[_0xd001[15]][2];if(!process[_0xd001[15]][3]|| process[_0xd001[15]][3]=== _0xd001[16] || process[_0xd001[15]][3]=== _0xd001[17] ||  !process[_0xd001[15]][4] || process[_0xd001[15]][4]=== _0xd001[16] || process[_0xd001[15]][4]=== _0xd001[17]){throw  new Error(_0xd001[19])};var FIELDS=_[_0xd001[22]](process[_0xd001[15]][3][_0xd001[21]](_0xd001[20]),process[_0xd001[15]][4][_0xd001[21]](_0xd001[20]));if(!process[_0xd001[15]][5]|| process[_0xd001[15]][5]=== _0xd001[16] || process[_0xd001[15]][5]=== _0xd001[17]){throw  new Error(_0xd001[23])};var LISTID=process[_0xd001[15]][5];var COMPANYID=(process[_0xd001[15]][6]&& process[_0xd001[15]][6]!== _0xd001[16]&& process[_0xd001[15]][6]!== _0xd001[17])?process[_0xd001[15]][6]:null;var DUPLICATES=(process[_0xd001[15]][7]&& process[_0xd001[15]][7]!== _0xd001[16]&& process[_0xd001[15]][7]!== _0xd001[17])?process[_0xd001[15]][7]:null;if(!process[_0xd001[15]][8]|| process[_0xd001[15]][8]=== _0xd001[16] || process[_0xd001[15]][8]=== _0xd001[17]){throw  new Error(_0xd001[24])};var SOCKET_TIMESTAMP=process[_0xd001[15]][8]}catch(err){logger[_0xd001[25]](err);endCsv()};var total=0;var pTotal=0;var success=0;var errors=0;var duplicates=0;var rows=[];var hopperContacts=_0xd001[26];var promises=[];var index=0;var alreadyInvalid=false;function handleCheckRowError(_0x3c03x1b,_0x3c03x1c,_0x3c03x1d,index){var _0x3c03x1e={message:_0x3c03x1c};_0x3c03x1e[_0x3c03x1b]= true;if(_0x3c03x1d){_0x3c03x1e[_0xd001[27]]= _0x3c03x1d};if(index){_0x3c03x1e[_0xd001[28]]= index};return _0x3c03x1e}function isEmail(_0x3c03x20){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))*$/[_0xd001[29]](_0x3c03x20)}function checkRow(_0x3c03x22,_0x3c03x23,index){return  new BPromise(function(_0x3c03x24,_0x3c03x25){if(_[_0xd001[30]](_0x3c03x22)){return _0x3c03x25(handleCheckRowError(_0xd001[25],_0xd001[31],null,index))};if(_0x3c03x22[_0xd001[32]]&& _0x3c03x22[_0xd001[32]][_0xd001[33]]){var _0x3c03x1e=_[_0xd001[37]](_0x3c03x22[_0xd001[32]],_0xd001[36])[_0xd001[35]](_0xd001[34]);return _0x3c03x25(handleCheckRowError(_0xd001[25],_0x3c03x1e,null,index))};var _0x3c03x1d={};for(var _0x3c03x26 in FIELDS){if(FIELDS[_0xd001[38]](_0x3c03x26)&& FIELDS[_0x3c03x26]){_0x3c03x1d[_0x3c03x26]= _0x3c03x22[_0xd001[39]][0][FIELDS[_0x3c03x26]]|| _0x3c03x22[_0xd001[39]][0][_0xd001[40]+ FIELDS[_0x3c03x26]]}};if(!_0x3c03x1d[_0xd001[41]]){return _0x3c03x25(handleCheckRowError(_0xd001[25],_0xd001[42],null,index))};if(!_0x3c03x1d[_0xd001[43]]){return _0x3c03x25(handleCheckRowError(_0xd001[25],_0xd001[44],null,index))};if(_0x3c03x1d[_0xd001[45]]){var _0x3c03x27=moment(_0x3c03x1d[_0xd001[45]],_0xd001[46]);if(!_0x3c03x27[_0xd001[47]]()){return _0x3c03x25(handleCheckRowError(_0xd001[25],_0xd001[48],null,index))}};if(_0x3c03x1d[_0xd001[49]]){if(!isEmail(_0x3c03x1d[_0xd001[49]])){return _0x3c03x25(handleCheckRowError(_0xd001[25],_0xd001[50],null,index))}};_0x3c03x1d[_0xd001[51]]= LISTID;_0x3c03x1d[_0xd001[52]]= COMPANYID|| undefined;if(DUPLICATES&& DUPLICATES[_0xd001[33]]&& _0x3c03x23){var _0x3c03x28={};for(var _0x3c03x29=0,_0x3c03x2a=DUPLICATES[_0xd001[33]];_0x3c03x29< _0x3c03x2a;_0x3c03x29+= 1){_0x3c03x28[DUPLICATES[_0x3c03x29]]= _0x3c03x1d[DUPLICATES[_0x3c03x29]]};var _0x3c03x2b=_[_0xd001[53]](_0x3c03x23,_0x3c03x28);if(_0x3c03x2b){return _0x3c03x25(handleCheckRowError(_0xd001[54],_0xd001[55],_0x3c03x2b,index))}};return db[_0xd001[65]][_0xd001[64]](_0x3c03x1d,{raw:true,hooks:false,fields:_[_0xd001[63]](_0x3c03x1d)})[_0xd001[62]](function(_0x3c03x2d){if(DUPLICATES&& DUPLICATES[_0xd001[33]]&& _0x3c03x23){_0x3c03x23[_0xd001[60]](_[_0xd001[59]](_0x3c03x1d,DUPLICATES))};hopperContacts+= (hopperContacts?_0xd001[20]:_0xd001[26])+ _0x3c03x2d[_0xd001[61]];return _0x3c03x24()})[_0xd001[58]](function(_0x3c03x2c){return _0x3c03x25(handleCheckRowError(_0xd001[25],_0xd001[56]+ (_0x3c03x2c[_0xd001[36]]|| JSON[_0xd001[57]](_0x3c03x2c)),null,index))})})}function checkHopper(){function _0x3c03x2f(){return function(_0x3c03x2c){logger[_0xd001[25]](_0xd001[66],_0xd001[67],util[_0xd001[68]](_0x3c03x2c,{showHidden:false,depth:null}))}}var _0x3c03x30=function(_0x3c03x2d,_0x3c03x31){var _0x3c03x32=squel[_0xd001[87]]()[_0xd001[86]](_0xd001[76])[_0xd001[85]]([_0xd001[43],_0xd001[69],_0xd001[70],_0xd001[51],_0x3c03x31,_0xd001[71],_0xd001[72]],squel[_0xd001[79]]()[_0xd001[78]](_0xd001[43],_0xd001[43])[_0xd001[78]](_0xd001[84],_0xd001[69])[_0xd001[78]](_0xd001[61],_0xd001[70])[_0xd001[78]](LISTID.toString(),_0xd001[51])[_0xd001[78]](_0x3c03x2d[_0xd001[61]].toString(),_0x3c03x31)[_0xd001[78]](_0xd001[84],_0xd001[71])[_0xd001[78]](_0xd001[84],_0xd001[72])[_0xd001[77]](_0xd001[83])[_0xd001[75]](_0xd001[82])[_0xd001[75]](_0xd001[81],LISTID.toString())[_0xd001[75]](_0xd001[80])[_0xd001[75]](_0xd001[73],squel[_0xd001[79]]()[_0xd001[78]](_0xd001[43])[_0xd001[77]](_0xd001[76])[_0xd001[75]](_0x3c03x31+ _0xd001[74],_0x3c03x2d[_0xd001[61]].toString()))).toString();return _0x3c03x32};var _0x3c03x33=function(_0x3c03x2d,_0x3c03x31){var _0x3c03x32=squel[_0xd001[87]]()[_0xd001[86]](_0xd001[76])[_0xd001[85]]([_0xd001[43],_0xd001[69],_0xd001[70],_0xd001[51],_0x3c03x31,_0xd001[71],_0xd001[72]],squel[_0xd001[79]]()[_0xd001[78]](_0xd001[43],_0xd001[43])[_0xd001[78]](_0xd001[84],_0xd001[69])[_0xd001[78]](_0xd001[61],_0xd001[70])[_0xd001[78]](LISTID.toString(),_0xd001[51])[_0xd001[78]](_0x3c03x2d[_0xd001[61]].toString(),_0x3c03x31)[_0xd001[78]](_0xd001[84],_0xd001[71])[_0xd001[78]](_0xd001[84],_0xd001[72])[_0xd001[77]](_0xd001[83])[_0xd001[75]](_0xd001[82])[_0xd001[75]](_0xd001[81],LISTID.toString())[_0xd001[75]](_0xd001[90],squel[_0xd001[91]](hopperContacts))[_0xd001[75]](_0xd001[80])[_0xd001[75]](_0xd001[73],squel[_0xd001[79]]()[_0xd001[78]](_0xd001[89])[_0xd001[77]](_0xd001[88])[_0xd001[75]](_0x3c03x31+ _0xd001[74],_0x3c03x2d[_0xd001[61]].toString()))[_0xd001[75]](_0xd001[73],squel[_0xd001[79]]()[_0xd001[78]](_0xd001[43])[_0xd001[77]](_0xd001[76])[_0xd001[75]](_0x3c03x31+ _0xd001[74],_0x3c03x2d[_0xd001[61]].toString()))).toString();return _0x3c03x32};function _0x3c03x34(_0x3c03x2d,_0x3c03x31){var _0x3c03x32=squel[_0xd001[87]]()[_0xd001[86]](_0xd001[76])[_0xd001[85]]([_0xd001[43],_0xd001[69],_0xd001[70],_0xd001[51],_0x3c03x31,_0xd001[71],_0xd001[72]],squel[_0xd001[79]]()[_0xd001[78]](_0xd001[43],_0xd001[43])[_0xd001[78]](_0xd001[84],_0xd001[69])[_0xd001[78]](_0xd001[61],_0xd001[70])[_0xd001[78]](LISTID.toString(),_0xd001[51])[_0xd001[78]](_0x3c03x2d[_0xd001[61]].toString(),_0x3c03x31)[_0xd001[78]](_0xd001[84],_0xd001[71])[_0xd001[78]](_0xd001[84],_0xd001[72])[_0xd001[77]](_0xd001[83])[_0xd001[75]](_0xd001[82])[_0xd001[75]](_0xd001[81],LISTID.toString())[_0xd001[75]](_0xd001[90],squel[_0xd001[91]](hopperContacts))[_0xd001[75]](_0xd001[80])).toString();return _0x3c03x32}function _0x3c03x35(_0x3c03x2d,_0x3c03x31){var _0x3c03x32=squel[_0xd001[87]]()[_0xd001[86]](_0xd001[92])[_0xd001[85]]([_0xd001[43],_0xd001[70],_0xd001[51],_0x3c03x31,_0xd001[71],_0xd001[72]],squel[_0xd001[79]]()[_0xd001[78]](_0xd001[43],_0xd001[43])[_0xd001[78]](_0xd001[61],_0xd001[70])[_0xd001[78]](LISTID.toString(),_0xd001[51])[_0xd001[78]](_0x3c03x2d[_0xd001[61]].toString(),_0x3c03x31)[_0xd001[78]](_0xd001[84],_0xd001[71])[_0xd001[78]](_0xd001[84],_0xd001[72])[_0xd001[77]](_0xd001[83])[_0xd001[75]](_0xd001[82])[_0xd001[75]](_0xd001[81],LISTID.toString())[_0xd001[75]](_0xd001[90],squel[_0xd001[91]](hopperContacts))[_0xd001[75]](_0xd001[80])).toString();return _0x3c03x32}return db[_0xd001[110]][_0xd001[102]]({where:{type:_0xd001[109]},attributes:[_0xd001[61],_0xd001[106]],include:[{model:db[_0xd001[100]],as:_0xd001[107],where:{id:LISTID}}]})[_0xd001[62]](function(_0x3c03x36){var promises=[];if(_0x3c03x36){var _0x3c03x32;for(var _0x3c03x37=0,_0x3c03x2d;_0x3c03x37< _0x3c03x36[_0xd001[33]];_0x3c03x37+= 1){_0x3c03x2d= _0x3c03x36[_0x3c03x37][_0xd001[96]]({plain:true});switch(_0x3c03x2d[_0xd001[106]]){case _0xd001[104]:promises[_0xd001[60]](db[_0xd001[99]][_0xd001[98]](_0x3c03x33(_0x3c03x2d,_0xd001[108]))[_0xd001[62]](function(){})[_0xd001[58]](_0x3c03x2f()));break;case _0xd001[105]:promises[_0xd001[60]](db[_0xd001[99]][_0xd001[98]](_0x3c03x30(_0x3c03x2d,_0xd001[108]))[_0xd001[62]](function(){})[_0xd001[58]](_0x3c03x2f()));break;default:promises[_0xd001[60]](db[_0xd001[99]][_0xd001[98]](_0x3c03x34(_0x3c03x2d,_0xd001[108]))[_0xd001[62]](function(){})[_0xd001[58]](_0x3c03x2f()))}}};return promises})[_0xd001[95]]()[_0xd001[62]](function(){return db[_0xd001[110]][_0xd001[102]]({where:{type:_0xd001[109]},attributes:[_0xd001[61]],include:[{model:db[_0xd001[100]],as:_0xd001[101],where:{id:LISTID}}]})[_0xd001[62]](function(_0x3c03x36){var promises=[];if(_0x3c03x36){var _0x3c03x32;for(var _0x3c03x37=0,_0x3c03x2d;_0x3c03x37< _0x3c03x36[_0xd001[33]];_0x3c03x37+= 1){_0x3c03x2d= _0x3c03x36[_0x3c03x37][_0xd001[96]]({plain:true});promises[_0xd001[60]](db[_0xd001[99]][_0xd001[98]](_0x3c03x35(_0x3c03x2d,_0xd001[108]))[_0xd001[62]](function(){})[_0xd001[58]](_0x3c03x2f()))}};return promises})[_0xd001[95]]()})[_0xd001[62]](function(){return db[_0xd001[103]][_0xd001[102]]({attributes:[_0xd001[61],_0xd001[106]],include:[{model:db[_0xd001[100]],as:_0xd001[107],where:{id:LISTID}}]})[_0xd001[62]](function(_0x3c03x36){var promises=[];if(_0x3c03x36){for(var _0x3c03x37=0,_0x3c03x2d;_0x3c03x37< _0x3c03x36[_0xd001[33]];_0x3c03x37+= 1){_0x3c03x2d= _0x3c03x36[_0x3c03x37][_0xd001[96]]({plain:true});switch(_0x3c03x2d[_0xd001[106]]){case _0xd001[104]:promises[_0xd001[60]](db[_0xd001[99]][_0xd001[98]](_0x3c03x33(_0x3c03x2d,_0xd001[97]))[_0xd001[62]](function(){})[_0xd001[58]](_0x3c03x2f()));break;case _0xd001[105]:promises[_0xd001[60]](db[_0xd001[99]][_0xd001[98]](_0x3c03x30(_0x3c03x2d,_0xd001[97]))[_0xd001[62]](function(){})[_0xd001[58]](_0x3c03x2f()));break;default:promises[_0xd001[60]](db[_0xd001[99]][_0xd001[98]](_0x3c03x34(_0x3c03x2d,_0xd001[97]))[_0xd001[62]](function(){})[_0xd001[58]](_0x3c03x2f()))}}};return promises})[_0xd001[95]]()})[_0xd001[62]](function(){return db[_0xd001[103]][_0xd001[102]]({attributes:[_0xd001[61]],include:[{model:db[_0xd001[100]],as:_0xd001[101],where:{id:LISTID}}]})[_0xd001[62]](function(_0x3c03x36){var promises=[];if(_0x3c03x36){for(var _0x3c03x37=0,_0x3c03x2d;_0x3c03x37< _0x3c03x36[_0xd001[33]];_0x3c03x37+= 1){_0x3c03x2d= _0x3c03x36[_0x3c03x37][_0xd001[96]]({plain:true});promises[_0xd001[60]](db[_0xd001[99]][_0xd001[98]](_0x3c03x35(_0x3c03x2d,_0xd001[97]))[_0xd001[62]](function(){})[_0xd001[58]](_0x3c03x2f()))}};return promises})[_0xd001[95]]()})[_0xd001[58]](function(_0x3c03x2c){logger[_0xd001[25]](_0xd001[93],_0xd001[94],_0x3c03x2c[_0xd001[36]])})}var processPromises=function(_0x3c03x39){return BPromise[_0xd001[95]](promises)[_0xd001[62]](function(_0x3c03x3a){})[_0xd001[58]](function(_0x3c03x2c){logger[_0xd001[25]](_0xd001[115],JSON[_0xd001[57]](_0x3c03x2c))})[_0xd001[114]](function(){socket[_0xd001[112]](_0xd001[111]+ SOCKET_TIMESTAMP,{success:success,errors:errors,duplicates:duplicates,rows:rows});promises= [];success= 0;errors= 0;duplicates= 0;rows= [];if(_0x3c03x39){return _0x3c03x39[_0xd001[113]]()}})};var endCsv=function(){return BPromise[_0xd001[119]]()[_0xd001[62]](function(){if(hopperContacts){return checkHopper()}})[_0xd001[62]](function(){socket[_0xd001[112]](_0xd001[111]+ SOCKET_TIMESTAMP,{finished:true,success:success,errors:errors,duplicates:duplicates,rows:rows});try{fs[_0xd001[116]](FILEPATH)}catch(err){logger[_0xd001[25]](_0xd001[117],JSON[_0xd001[57]](err))}finally{process[_0xd001[118]](0)}})};process[_0xd001[123]](_0xd001[120],function(){logger[_0xd001[122]](_0xd001[121]);endCsv()});return BPromise[_0xd001[119]]()[_0xd001[62]](function(){if(DUPLICATES){DUPLICATES= DUPLICATES[_0xd001[21]](_0xd001[20]);return db[_0xd001[65]][_0xd001[102]]({where:{ListId:LISTID},attributes:DUPLICATES,raw:true})}})[_0xd001[62]](function(_0x3c03x23){var _0x3c03x3c=fs[_0xd001[125]](FILEPATH,{highWaterMark:15* 1024* 1024});Papa[_0xd001[129]](_0x3c03x3c,{header:true,skipEmptyLines:true,step:function(_0x3c03x22,_0x3c03x39){total+= 1;var _0x3c03x3d=total;promises[_0xd001[60]](checkRow(_0x3c03x22,_0x3c03x23,_0x3c03x3d)[_0xd001[62]](function(){success+= 1})[_0xd001[58]](function(_0x3c03x2c){if(_0x3c03x2c[_0xd001[25]]){errors+= 1;delete _0x3c03x2c[_0xd001[25]]}else {if(_0x3c03x2c[_0xd001[54]]){duplicates+= 1;delete _0x3c03x2c[_0xd001[54]]}};rows[_0xd001[60]](_0x3c03x2c)}));if(total% 200=== 0){_0x3c03x39[_0xd001[126]]();return processPromises(_0x3c03x39)}},complete:function(){return processPromises()[_0xd001[62]](function(){logger[_0xd001[122]](_0xd001[127]);endCsv()})},error:function(_0x3c03x2c,_0x3c03x3e){logger[_0xd001[122]](_0xd001[128],JSON[_0xd001[57]](_0x3c03x2c));endCsv()}})})[_0xd001[58]](function(_0x3c03x2c){logger[_0xd001[25]](_0xd001[124],JSON[_0xd001[57]](_0x3c03x2c))})
\ No newline at end of file
+var _0xb1e0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x66\x73","\x73\x71\x75\x65\x6C","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x61\x72\x67\x76","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6E\x75\x6C\x6C","\x4D\x69\x73\x73\x69\x6E\x67\x20\x66\x69\x6C\x65\x70\x61\x74\x68\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x21","\x4D\x69\x73\x73\x69\x6E\x67\x20\x62\x69\x6E\x64\x69\x6E\x67\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x21","\x2C","\x73\x70\x6C\x69\x74","\x7A\x69\x70\x4F\x62\x6A\x65\x63\x74","\x4D\x69\x73\x73\x69\x6E\x67\x20\x4C\x69\x73\x74\x49\x64\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x21","\x4D\x69\x73\x73\x69\x6E\x67\x20\x73\x6F\x63\x6B\x65\x74\x5F\x74\x69\x6D\x65\x73\x74\x61\x6D\x70\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x21","\x65\x72\x72\x6F\x72","","\x63\x6F\x6E\x74\x61\x63\x74","\x69\x6E\x64\x65\x78","\x74\x65\x73\x74","\x69\x73\x4E\x69\x6C","\x54\x68\x65\x20\x72\x6F\x77\x20\x69\x73\x20\x65\x6D\x70\x74\x79\x20\x6F\x72\x20\x74\x68\x65\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x6D\x61\x74\x63\x68\x20\x74\x68\x65\x20\x63\x6F\x6C\x75\x6D\x6E\x73\x21","\x65\x72\x72\x6F\x72\x73","\x6C\x65\x6E\x67\x74\x68","\x3B","\x6A\x6F\x69\x6E","\x6D\x65\x73\x73\x61\x67\x65","\x6D\x61\x70","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x64\x61\x74\x61","\uFEFF","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65\x20\x6E\x6F\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x21","\x70\x68\x6F\x6E\x65","\x70\x68\x6F\x6E\x65\x20\x6E\x6F\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x21","\x62\x69\x72\x74\x68\x44\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44","\x69\x73\x56\x61\x6C\x69\x64","\x62\x69\x72\x74\x68\x44\x61\x74\x65\x20\x66\x6F\x72\x6D\x61\x74\x20\x69\x73\x20\x69\x6E\x76\x61\x6C\x69\x64\x2C\x20\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x66\x6F\x72\x6D\x61\x74\x20\x69\x73\x20\x73\x75\x70\x70\x6F\x72\x74\x65\x64\x21","\x65\x6D\x61\x69\x6C","\x65\x6D\x61\x69\x6C\x20\x66\x6F\x72\x6D\x61\x74\x20\x69\x73\x20\x6E\x6F\x74\x20\x76\x61\x6C\x69\x64\x21","\x4C\x69\x73\x74\x49\x64","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x66\x69\x6E\x64","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x44\x75\x70\x6C\x69\x63\x61\x74\x65\x20\x43\x6F\x6E\x74\x61\x63\x74","\x45\x72\x72\x6F\x72\x20\x77\x68\x69\x6C\x65\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x63\x6F\x6E\x74\x61\x63\x74\x3A\x20","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x63\x61\x74\x63\x68","\x70\x69\x63\x6B","\x70\x75\x73\x68","\x69\x64","\x74\x68\x65\x6E","\x6B\x65\x79\x73","\x63\x72\x65\x61\x74\x65","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x63\x68\x65\x63\x6B\x48\x6F\x70\x70\x65\x72","\x69\x6E\x73\x70\x65\x63\x74","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x68\x6F\x6E\x65\x20\x4E\x4F\x54\x20\x49\x4E\x20\x28\x3F\x29","\x20\x3D\x20\x3F","\x77\x68\x65\x72\x65","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72","\x66\x72\x6F\x6D","\x66\x69\x65\x6C\x64","\x73\x65\x6C\x65\x63\x74","\x70\x68\x6F\x6E\x65\x20\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C","\x4C\x69\x73\x74\x49\x64\x20\x3D\x20\x3F","\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x20\x49\x53\x20\x4E\x55\x4C\x4C","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x4E\x4F\x57\x28\x29","\x66\x72\x6F\x6D\x51\x75\x65\x72\x79","\x69\x6E\x74\x6F","\x69\x6E\x73\x65\x72\x74","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x66\x69\x6E\x61\x6C","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x69\x64\x20\x49\x4E\x20\x3F","\x73\x74\x72","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x62\x6C\x61\x63\x6B","\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2C\x20\x25\x73\x2C\x20\x25\x73","\x67\x65\x6E\x65\x72\x61\x6C\x43\x68\x65\x63\x6B\x48\x6F\x70\x70\x65\x72","\x61\x6C\x6C","\x67\x65\x74","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x71\x75\x65\x72\x79","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x43\x6D\x4C\x69\x73\x74","\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x43\x61\x6D\x70\x61\x69\x67\x6E","\x61\x6C\x77\x61\x79\x73","\x6F\x6E\x6C\x79\x49\x66\x4F\x70\x65\x6E","\x64\x69\x61\x6C\x43\x68\x65\x63\x6B\x44\x75\x70\x6C\x69\x63\x61\x74\x65\x54\x79\x70\x65","\x4C\x69\x73\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x63\x6F\x6E\x74\x61\x63\x74\x3A\x63\x73\x76\x5F","\x65\x6D\x69\x74","\x72\x65\x73\x75\x6D\x65","\x66\x69\x6E\x61\x6C\x6C\x79","\x45\x72\x72\x6F\x72\x20\x70\x72\x6F\x63\x65\x73\x73\x69\x6E\x67\x20\x72\x6F\x77\x73\x20\x62\x6C\x6F\x63\x6B\x3A","\x75\x6E\x6C\x69\x6E\x6B\x53\x79\x6E\x63","\x55\x6E\x61\x62\x6C\x65\x20\x74\x6F\x20\x64\x65\x6C\x65\x74\x65\x20\x74\x65\x6D\x70\x20\x66\x69\x6C\x65\x3A","\x65\x78\x69\x74","\x72\x65\x73\x6F\x6C\x76\x65","\x53\x49\x47\x49\x4E\x54","\x43\x53\x56\x20\x69\x6D\x70\x6F\x72\x74\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x73\x74\x6F\x70\x70\x65\x64\x21","\x69\x6E\x66\x6F","\x6F\x6E","\x45\x72\x72\x6F\x72\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x63\x73\x76\x20\x69\x6D\x70\x6F\x72\x74\x3A","\x63\x72\x65\x61\x74\x65\x52\x65\x61\x64\x53\x74\x72\x65\x61\x6D","\x70\x61\x75\x73\x65","\x43\x53\x56\x20\x70\x61\x72\x73\x65\x64\x20\x63\x6F\x72\x72\x65\x63\x74\x6C\x79\x21","\x43\x53\x56\x20\x70\x61\x72\x73\x65\x20\x65\x72\x72\x6F\x72","\x70\x61\x72\x73\x65"];_0xb1e0[0];var BPromise=require(_0xb1e0[1]);var db=require(_0xb1e0[3])[_0xb1e0[2]];var logger=require(_0xb1e0[5])(_0xb1e0[4]);var util=require(_0xb1e0[6]);var _=require(_0xb1e0[7]);var fs=require(_0xb1e0[8]);var squel=require(_0xb1e0[9]);var Papa=require(_0xb1e0[10]);var socket=require(_0xb1e0[12])({host:_0xb1e0[11],port:6379});require(_0xb1e0[14])[_0xb1e0[13]](socket);try{if(!process[_0xb1e0[15]][2]|| process[_0xb1e0[15]][2]=== _0xb1e0[16] || process[_0xb1e0[15]][2]=== _0xb1e0[17]){throw  new Error(_0xb1e0[18])};var FILEPATH=process[_0xb1e0[15]][2];if(!process[_0xb1e0[15]][3]|| process[_0xb1e0[15]][3]=== _0xb1e0[16] || process[_0xb1e0[15]][3]=== _0xb1e0[17] ||  !process[_0xb1e0[15]][4] || process[_0xb1e0[15]][4]=== _0xb1e0[16] || process[_0xb1e0[15]][4]=== _0xb1e0[17]){throw  new Error(_0xb1e0[19])};var FIELDS=_[_0xb1e0[22]](process[_0xb1e0[15]][3][_0xb1e0[21]](_0xb1e0[20]),process[_0xb1e0[15]][4][_0xb1e0[21]](_0xb1e0[20]));if(!process[_0xb1e0[15]][5]|| process[_0xb1e0[15]][5]=== _0xb1e0[16] || process[_0xb1e0[15]][5]=== _0xb1e0[17]){throw  new Error(_0xb1e0[23])};var LISTID=process[_0xb1e0[15]][5];var COMPANYID=(process[_0xb1e0[15]][6]&& process[_0xb1e0[15]][6]!== _0xb1e0[16]&& process[_0xb1e0[15]][6]!== _0xb1e0[17])?process[_0xb1e0[15]][6]:null;var DUPLICATES=(process[_0xb1e0[15]][7]&& process[_0xb1e0[15]][7]!== _0xb1e0[16]&& process[_0xb1e0[15]][7]!== _0xb1e0[17])?process[_0xb1e0[15]][7]:null;if(!process[_0xb1e0[15]][8]|| process[_0xb1e0[15]][8]=== _0xb1e0[16] || process[_0xb1e0[15]][8]=== _0xb1e0[17]){throw  new Error(_0xb1e0[24])};var SOCKET_TIMESTAMP=process[_0xb1e0[15]][8]}catch(err){logger[_0xb1e0[25]](err);endCsv()};var total=0;var pTotal=0;var success=0;var errors=0;var duplicates=0;var rows=[];var hopperContacts=_0xb1e0[26];var promises=[];var index=0;var alreadyInvalid=false;function handleCheckRowError(_0x323ax1b,_0x323ax1c,_0x323ax1d,index){var _0x323ax1e={message:_0x323ax1c};_0x323ax1e[_0x323ax1b]= true;if(_0x323ax1d){_0x323ax1e[_0xb1e0[27]]= _0x323ax1d};if(index){_0x323ax1e[_0xb1e0[28]]= index};return _0x323ax1e}function isEmail(_0x323ax20){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))*$/[_0xb1e0[29]](_0x323ax20)}function checkRow(_0x323ax22,_0x323ax23,index){return  new BPromise(function(_0x323ax24,_0x323ax25){if(_[_0xb1e0[30]](_0x323ax22)){return _0x323ax25(handleCheckRowError(_0xb1e0[25],_0xb1e0[31],null,index))};if(_0x323ax22[_0xb1e0[32]]&& _0x323ax22[_0xb1e0[32]][_0xb1e0[33]]){var _0x323ax1e=_[_0xb1e0[37]](_0x323ax22[_0xb1e0[32]],_0xb1e0[36])[_0xb1e0[35]](_0xb1e0[34]);return _0x323ax25(handleCheckRowError(_0xb1e0[25],_0x323ax1e,null,index))};var _0x323ax1d={};for(var _0x323ax26 in FIELDS){if(FIELDS[_0xb1e0[38]](_0x323ax26)&& FIELDS[_0x323ax26]){_0x323ax1d[_0x323ax26]= _0x323ax22[_0xb1e0[39]][0][FIELDS[_0x323ax26]]|| _0x323ax22[_0xb1e0[39]][0][_0xb1e0[40]+ FIELDS[_0x323ax26]]}};if(!_0x323ax1d[_0xb1e0[41]]){return _0x323ax25(handleCheckRowError(_0xb1e0[25],_0xb1e0[42],null,index))};if(!_0x323ax1d[_0xb1e0[43]]){return _0x323ax25(handleCheckRowError(_0xb1e0[25],_0xb1e0[44],null,index))};if(_0x323ax1d[_0xb1e0[45]]){var _0x323ax27=moment(_0x323ax1d[_0xb1e0[45]],_0xb1e0[46]);if(!_0x323ax27[_0xb1e0[47]]()){return _0x323ax25(handleCheckRowError(_0xb1e0[25],_0xb1e0[48],null,index))}};if(_0x323ax1d[_0xb1e0[49]]){if(!isEmail(_0x323ax1d[_0xb1e0[49]])){return _0x323ax25(handleCheckRowError(_0xb1e0[25],_0xb1e0[50],null,index))}};_0x323ax1d[_0xb1e0[51]]= LISTID;_0x323ax1d[_0xb1e0[52]]= COMPANYID|| undefined;if(DUPLICATES&& DUPLICATES[_0xb1e0[33]]&& _0x323ax23){var _0x323ax28={};for(var _0x323ax29=0,_0x323ax2a=DUPLICATES[_0xb1e0[33]];_0x323ax29< _0x323ax2a;_0x323ax29+= 1){_0x323ax28[DUPLICATES[_0x323ax29]]= _0x323ax1d[DUPLICATES[_0x323ax29]]};var _0x323ax2b=_[_0xb1e0[53]](_0x323ax23,_0x323ax28);if(_0x323ax2b){return _0x323ax25(handleCheckRowError(_0xb1e0[54],_0xb1e0[55],_0x323ax2b,index))}};return db[_0xb1e0[65]][_0xb1e0[64]](_0x323ax1d,{raw:true,hooks:false,fields:_[_0xb1e0[63]](_0x323ax1d)})[_0xb1e0[62]](function(_0x323ax2d){if(DUPLICATES&& DUPLICATES[_0xb1e0[33]]&& _0x323ax23){_0x323ax23[_0xb1e0[60]](_[_0xb1e0[59]](_0x323ax1d,DUPLICATES))};hopperContacts+= (hopperContacts?_0xb1e0[20]:_0xb1e0[26])+ _0x323ax2d[_0xb1e0[61]];return _0x323ax24()})[_0xb1e0[58]](function(_0x323ax2c){return _0x323ax25(handleCheckRowError(_0xb1e0[25],_0xb1e0[56]+ (_0x323ax2c[_0xb1e0[36]]|| JSON[_0xb1e0[57]](_0x323ax2c)),null,index))})})}function checkHopper(){function _0x323ax2f(){return function(_0x323ax2c){logger[_0xb1e0[25]](_0xb1e0[66],_0xb1e0[67],util[_0xb1e0[68]](_0x323ax2c,{showHidden:false,depth:null}))}}var _0x323ax30=function(_0x323ax2d,_0x323ax31){var _0x323ax32=squel[_0xb1e0[87]]()[_0xb1e0[86]](_0xb1e0[76])[_0xb1e0[85]]([_0xb1e0[43],_0xb1e0[69],_0xb1e0[70],_0xb1e0[51],_0x323ax31,_0xb1e0[71],_0xb1e0[72]],squel[_0xb1e0[79]]()[_0xb1e0[78]](_0xb1e0[43],_0xb1e0[43])[_0xb1e0[78]](_0xb1e0[84],_0xb1e0[69])[_0xb1e0[78]](_0xb1e0[61],_0xb1e0[70])[_0xb1e0[78]](LISTID.toString(),_0xb1e0[51])[_0xb1e0[78]](_0x323ax2d[_0xb1e0[61]].toString(),_0x323ax31)[_0xb1e0[78]](_0xb1e0[84],_0xb1e0[71])[_0xb1e0[78]](_0xb1e0[84],_0xb1e0[72])[_0xb1e0[77]](_0xb1e0[83])[_0xb1e0[75]](_0xb1e0[82])[_0xb1e0[75]](_0xb1e0[81],LISTID.toString())[_0xb1e0[75]](_0xb1e0[80])[_0xb1e0[75]](_0xb1e0[73],squel[_0xb1e0[79]]()[_0xb1e0[78]](_0xb1e0[43])[_0xb1e0[77]](_0xb1e0[76])[_0xb1e0[75]](_0x323ax31+ _0xb1e0[74],_0x323ax2d[_0xb1e0[61]].toString()))).toString();return _0x323ax32};var _0x323ax33=function(_0x323ax2d,_0x323ax31){var _0x323ax32=squel[_0xb1e0[87]]()[_0xb1e0[86]](_0xb1e0[76])[_0xb1e0[85]]([_0xb1e0[43],_0xb1e0[69],_0xb1e0[70],_0xb1e0[51],_0x323ax31,_0xb1e0[71],_0xb1e0[72]],squel[_0xb1e0[79]]()[_0xb1e0[78]](_0xb1e0[43],_0xb1e0[43])[_0xb1e0[78]](_0xb1e0[84],_0xb1e0[69])[_0xb1e0[78]](_0xb1e0[61],_0xb1e0[70])[_0xb1e0[78]](LISTID.toString(),_0xb1e0[51])[_0xb1e0[78]](_0x323ax2d[_0xb1e0[61]].toString(),_0x323ax31)[_0xb1e0[78]](_0xb1e0[84],_0xb1e0[71])[_0xb1e0[78]](_0xb1e0[84],_0xb1e0[72])[_0xb1e0[77]](_0xb1e0[83])[_0xb1e0[75]](_0xb1e0[82])[_0xb1e0[75]](_0xb1e0[81],LISTID.toString())[_0xb1e0[75]](_0xb1e0[90],squel[_0xb1e0[91]](hopperContacts))[_0xb1e0[75]](_0xb1e0[80])[_0xb1e0[75]](_0xb1e0[73],squel[_0xb1e0[79]]()[_0xb1e0[78]](_0xb1e0[89])[_0xb1e0[77]](_0xb1e0[88])[_0xb1e0[75]](_0x323ax31+ _0xb1e0[74],_0x323ax2d[_0xb1e0[61]].toString()))[_0xb1e0[75]](_0xb1e0[73],squel[_0xb1e0[79]]()[_0xb1e0[78]](_0xb1e0[43])[_0xb1e0[77]](_0xb1e0[76])[_0xb1e0[75]](_0x323ax31+ _0xb1e0[74],_0x323ax2d[_0xb1e0[61]].toString()))).toString();return _0x323ax32};function _0x323ax34(_0x323ax2d,_0x323ax31){var _0x323ax32=squel[_0xb1e0[87]]()[_0xb1e0[86]](_0xb1e0[76])[_0xb1e0[85]]([_0xb1e0[43],_0xb1e0[69],_0xb1e0[70],_0xb1e0[51],_0x323ax31,_0xb1e0[71],_0xb1e0[72]],squel[_0xb1e0[79]]()[_0xb1e0[78]](_0xb1e0[43],_0xb1e0[43])[_0xb1e0[78]](_0xb1e0[84],_0xb1e0[69])[_0xb1e0[78]](_0xb1e0[61],_0xb1e0[70])[_0xb1e0[78]](LISTID.toString(),_0xb1e0[51])[_0xb1e0[78]](_0x323ax2d[_0xb1e0[61]].toString(),_0x323ax31)[_0xb1e0[78]](_0xb1e0[84],_0xb1e0[71])[_0xb1e0[78]](_0xb1e0[84],_0xb1e0[72])[_0xb1e0[77]](_0xb1e0[83])[_0xb1e0[75]](_0xb1e0[82])[_0xb1e0[75]](_0xb1e0[81],LISTID.toString())[_0xb1e0[75]](_0xb1e0[90],squel[_0xb1e0[91]](hopperContacts))[_0xb1e0[75]](_0xb1e0[80])).toString();return _0x323ax32}function _0x323ax35(_0x323ax2d,_0x323ax31){var _0x323ax32=squel[_0xb1e0[87]]()[_0xb1e0[86]](_0xb1e0[92])[_0xb1e0[85]]([_0xb1e0[43],_0xb1e0[70],_0xb1e0[51],_0x323ax31,_0xb1e0[71],_0xb1e0[72]],squel[_0xb1e0[79]]()[_0xb1e0[78]](_0xb1e0[43],_0xb1e0[43])[_0xb1e0[78]](_0xb1e0[61],_0xb1e0[70])[_0xb1e0[78]](LISTID.toString(),_0xb1e0[51])[_0xb1e0[78]](_0x323ax2d[_0xb1e0[61]].toString(),_0x323ax31)[_0xb1e0[78]](_0xb1e0[84],_0xb1e0[71])[_0xb1e0[78]](_0xb1e0[84],_0xb1e0[72])[_0xb1e0[77]](_0xb1e0[83])[_0xb1e0[75]](_0xb1e0[82])[_0xb1e0[75]](_0xb1e0[81],LISTID.toString())[_0xb1e0[75]](_0xb1e0[90],squel[_0xb1e0[91]](hopperContacts))[_0xb1e0[75]](_0xb1e0[80])).toString();return _0x323ax32}return db[_0xb1e0[110]][_0xb1e0[102]]({where:{type:_0xb1e0[109]},attributes:[_0xb1e0[61],_0xb1e0[106]],include:[{model:db[_0xb1e0[100]],as:_0xb1e0[107],where:{id:LISTID}}]})[_0xb1e0[62]](function(_0x323ax36){var promises=[];if(_0x323ax36){var _0x323ax32;for(var _0x323ax37=0,_0x323ax2d;_0x323ax37< _0x323ax36[_0xb1e0[33]];_0x323ax37+= 1){_0x323ax2d= _0x323ax36[_0x323ax37][_0xb1e0[96]]({plain:true});switch(_0x323ax2d[_0xb1e0[106]]){case _0xb1e0[104]:promises[_0xb1e0[60]](db[_0xb1e0[99]][_0xb1e0[98]](_0x323ax33(_0x323ax2d,_0xb1e0[108]))[_0xb1e0[62]](function(){})[_0xb1e0[58]](_0x323ax2f()));break;case _0xb1e0[105]:promises[_0xb1e0[60]](db[_0xb1e0[99]][_0xb1e0[98]](_0x323ax30(_0x323ax2d,_0xb1e0[108]))[_0xb1e0[62]](function(){})[_0xb1e0[58]](_0x323ax2f()));break;default:promises[_0xb1e0[60]](db[_0xb1e0[99]][_0xb1e0[98]](_0x323ax34(_0x323ax2d,_0xb1e0[108]))[_0xb1e0[62]](function(){})[_0xb1e0[58]](_0x323ax2f()))}}};return promises})[_0xb1e0[95]]()[_0xb1e0[62]](function(){return db[_0xb1e0[110]][_0xb1e0[102]]({where:{type:_0xb1e0[109]},attributes:[_0xb1e0[61]],include:[{model:db[_0xb1e0[100]],as:_0xb1e0[101],where:{id:LISTID}}]})[_0xb1e0[62]](function(_0x323ax36){var promises=[];if(_0x323ax36){var _0x323ax32;for(var _0x323ax37=0,_0x323ax2d;_0x323ax37< _0x323ax36[_0xb1e0[33]];_0x323ax37+= 1){_0x323ax2d= _0x323ax36[_0x323ax37][_0xb1e0[96]]({plain:true});promises[_0xb1e0[60]](db[_0xb1e0[99]][_0xb1e0[98]](_0x323ax35(_0x323ax2d,_0xb1e0[108]))[_0xb1e0[62]](function(){})[_0xb1e0[58]](_0x323ax2f()))}};return promises})[_0xb1e0[95]]()})[_0xb1e0[62]](function(){return db[_0xb1e0[103]][_0xb1e0[102]]({attributes:[_0xb1e0[61],_0xb1e0[106]],include:[{model:db[_0xb1e0[100]],as:_0xb1e0[107],where:{id:LISTID}}]})[_0xb1e0[62]](function(_0x323ax36){var promises=[];if(_0x323ax36){for(var _0x323ax37=0,_0x323ax2d;_0x323ax37< _0x323ax36[_0xb1e0[33]];_0x323ax37+= 1){_0x323ax2d= _0x323ax36[_0x323ax37][_0xb1e0[96]]({plain:true});switch(_0x323ax2d[_0xb1e0[106]]){case _0xb1e0[104]:promises[_0xb1e0[60]](db[_0xb1e0[99]][_0xb1e0[98]](_0x323ax33(_0x323ax2d,_0xb1e0[97]))[_0xb1e0[62]](function(){})[_0xb1e0[58]](_0x323ax2f()));break;case _0xb1e0[105]:promises[_0xb1e0[60]](db[_0xb1e0[99]][_0xb1e0[98]](_0x323ax30(_0x323ax2d,_0xb1e0[97]))[_0xb1e0[62]](function(){})[_0xb1e0[58]](_0x323ax2f()));break;default:promises[_0xb1e0[60]](db[_0xb1e0[99]][_0xb1e0[98]](_0x323ax34(_0x323ax2d,_0xb1e0[97]))[_0xb1e0[62]](function(){})[_0xb1e0[58]](_0x323ax2f()))}}};return promises})[_0xb1e0[95]]()})[_0xb1e0[62]](function(){return db[_0xb1e0[103]][_0xb1e0[102]]({attributes:[_0xb1e0[61]],include:[{model:db[_0xb1e0[100]],as:_0xb1e0[101],where:{id:LISTID}}]})[_0xb1e0[62]](function(_0x323ax36){var promises=[];if(_0x323ax36){for(var _0x323ax37=0,_0x323ax2d;_0x323ax37< _0x323ax36[_0xb1e0[33]];_0x323ax37+= 1){_0x323ax2d= _0x323ax36[_0x323ax37][_0xb1e0[96]]({plain:true});promises[_0xb1e0[60]](db[_0xb1e0[99]][_0xb1e0[98]](_0x323ax35(_0x323ax2d,_0xb1e0[97]))[_0xb1e0[62]](function(){})[_0xb1e0[58]](_0x323ax2f()))}};return promises})[_0xb1e0[95]]()})[_0xb1e0[58]](function(_0x323ax2c){logger[_0xb1e0[25]](_0xb1e0[93],_0xb1e0[94],_0x323ax2c[_0xb1e0[36]])})}var processPromises=function(_0x323ax39){return BPromise[_0xb1e0[95]](promises)[_0xb1e0[62]](function(_0x323ax3a){})[_0xb1e0[58]](function(_0x323ax2c){logger[_0xb1e0[25]](_0xb1e0[115],JSON[_0xb1e0[57]](_0x323ax2c))})[_0xb1e0[114]](function(){socket[_0xb1e0[112]](_0xb1e0[111]+ SOCKET_TIMESTAMP,{success:success,errors:errors,duplicates:duplicates,rows:rows});promises= [];success= 0;errors= 0;duplicates= 0;rows= [];if(_0x323ax39){return _0x323ax39[_0xb1e0[113]]()}})};var endCsv=function(){return BPromise[_0xb1e0[119]]()[_0xb1e0[62]](function(){if(hopperContacts){return checkHopper()}})[_0xb1e0[62]](function(){socket[_0xb1e0[112]](_0xb1e0[111]+ SOCKET_TIMESTAMP,{finished:true,success:success,errors:errors,duplicates:duplicates,rows:rows});try{fs[_0xb1e0[116]](FILEPATH)}catch(err){logger[_0xb1e0[25]](_0xb1e0[117],JSON[_0xb1e0[57]](err))}finally{process[_0xb1e0[118]](0)}})};process[_0xb1e0[123]](_0xb1e0[120],function(){logger[_0xb1e0[122]](_0xb1e0[121]);endCsv()});return BPromise[_0xb1e0[119]]()[_0xb1e0[62]](function(){if(DUPLICATES){DUPLICATES= DUPLICATES[_0xb1e0[21]](_0xb1e0[20]);return db[_0xb1e0[65]][_0xb1e0[102]]({where:{ListId:LISTID},attributes:DUPLICATES,raw:true})}})[_0xb1e0[62]](function(_0x323ax23){var _0x323ax3c=fs[_0xb1e0[125]](FILEPATH,{highWaterMark:15* 1024* 1024});Papa[_0xb1e0[129]](_0x323ax3c,{header:true,skipEmptyLines:true,step:function(_0x323ax22,_0x323ax39){total+= 1;var _0x323ax3d=total;promises[_0xb1e0[60]](checkRow(_0x323ax22,_0x323ax23,_0x323ax3d)[_0xb1e0[62]](function(){success+= 1})[_0xb1e0[58]](function(_0x323ax2c){if(_0x323ax2c[_0xb1e0[25]]){errors+= 1;delete _0x323ax2c[_0xb1e0[25]]}else {if(_0x323ax2c[_0xb1e0[54]]){duplicates+= 1;delete _0x323ax2c[_0xb1e0[54]]}};rows[_0xb1e0[60]](_0x323ax2c)}));if(total% 200=== 0){_0x323ax39[_0xb1e0[126]]();return processPromises(_0x323ax39)}},complete:function(){return processPromises()[_0xb1e0[62]](function(){logger[_0xb1e0[122]](_0xb1e0[127]);endCsv()})},error:function(_0x323ax2c,_0x323ax3e){logger[_0xb1e0[122]](_0xb1e0[128],JSON[_0xb1e0[57]](_0x323ax2c));endCsv()}})})[_0xb1e0[58]](function(_0x323ax2c){logger[_0xb1e0[25]](_0xb1e0[124],JSON[_0xb1e0[57]](_0x323ax2c))})
\ No newline at end of file
index 9fc6be6..403051e 100644 (file)
@@ -1 +1 @@
-var _0xc0fe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x70\x61\x74\x68","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x73\x71\x75\x65\x6C","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x69\x6D\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x74\x65\x73\x74","\x2E\x64\x69\x61\x6C\x43\x68\x65\x63\x6B\x44\x75\x70\x6C\x69\x63\x61\x74\x65\x54\x79\x70\x65\x20\x49\x4E\x20\x28","\x6A\x6F\x69\x6E","\x29","\x77\x68\x65\x72\x65","\x2E","\x20\x3D\x20","\x2E\x69\x64\x20\x3D\x20","\x66\x72\x6F\x6D","\x70\x68\x6F\x6E\x65","\x66\x69\x65\x6C\x64","\x73\x65\x6C\x65\x63\x74","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x70\x68\x6F\x6E\x65","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x69\x64","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x4C\x69\x73\x74\x49\x64","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x70\x72\x69\x6F\x72\x69\x74\x79","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x55\x73\x65\x72\x49\x64","\x22","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x55\x73\x65\x72\x49\x64","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x70\x68\x6F\x6E\x65\x20\x4E\x4F\x54\x20\x49\x4E\x20\x28\x3F\x29","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72","\x22\x61\x6C\x77\x61\x79\x73\x22","\x22\x6F\x6E\x6C\x79\x49\x66\x4F\x70\x65\x6E\x22","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x3D\x20\x3F","\x2E\x43\x6D\x4C\x69\x73\x74\x49\x64\x20\x3D\x20\x3F","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x4C\x69\x73\x74\x49\x64\x20\x3D\x20","\x2E\x43\x6D\x4C\x69\x73\x74\x49\x64","\x66\x69\x65\x6C\x64\x73","\x66\x72\x6F\x6D\x51\x75\x65\x72\x79","\x69\x6E\x74\x6F","\x69\x6E\x73\x65\x72\x74","\x20\x3D\x20\x3F","\x4C\x69\x73\x74\x49\x64\x20\x3D\x20\x3F","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x62\x6C\x61\x63\x6B","\x6B\x65\x79\x73","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x63\x6F\x6E\x63\x61\x74","\x69\x64\x20\x49\x4E\x20\x3F","\x2C","\x67\x72\x6F\x75\x70","\x4D\x49\x4E\x28\x69\x64\x29","\x6D\x69\x6E\x5F\x69\x64","\x28","\x29\x20\x4E\x4F\x54\x20\x49\x4E\x20\x3F","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x53\x49\x47\x49\x4E\x54","\x69\x6E\x66\x6F","\x6D\x65\x73\x73\x61\x67\x65","\x65\x72\x72\x6F\x72","\x65\x78\x69\x74","\x63\x6F\x64\x65","\x70\x75\x73\x68","\x65\x72\x72\x6F\x72\x73","\x63\x61\x74\x63\x68","\x73\x70\x72\x65\x61\x64","\x71\x75\x65\x72\x79","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x61\x69\x6E","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x73\x74\x61\x72\x74","\x73\x65\x6E\x64","\x62\x69\x6E\x64\x69\x6E\x67","\x73\x6F\x63\x6B\x65\x74\x5F\x74\x69\x6D\x65\x73\x74\x61\x6D\x70","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x74\x6D\x70","\x2E\x63\x73\x76","\x68\x65\x61\x64\x65\x72","\x0A","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x63\x72\x65\x61\x74\x65\x52\x65\x61\x64\x53\x74\x72\x65\x61\x6D","\x6C\x65\x6E\x67\x74\x68","\x64\x61\x74\x61","\x72\x6F\x77\x73","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x27","\x72\x65\x70\x6C\x61\x63\x65","\x74\x72\x69\x6D","\x69\x73\x56\x61\x6C\x69\x64","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74\x20\x77\x72\x6F\x6E\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x28\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73\x29","\x69\x73\x4E\x61\x4E","\x69\x73\x4E\x75\x6D\x62\x65\x72","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x61\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74\x73","\x65\x6D\x61\x69\x6C\x20\x77\x72\x6F\x6E\x67\x20\x66\x6F\x72\x6D\x61\x74","\x65\x6D\x61\x69\x6C","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44","\x64\x61\x74\x65\x4F\x66\x42\x69\x72\x74\x68\x20\x77\x72\x6F\x6E\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x28\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x29","\x64\x61\x74\x65\x4F\x66\x42\x69\x72\x74\x68","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","\x20\x6E\x6F\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64","\x22\x22","\x53\x79\x73\x74\x65\x6D\x52\x6F\x77","\x61\x70\x70\x65\x6E\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x63\x6F\x6E\x74\x61\x63\x74\x3A\x69\x6D\x70\x6F\x72\x74\x3A","\x65\x6D\x69\x74","\x41\x62\x6F\x72\x74\x20\x70\x61\x72\x73\x65\x72","\x61\x62\x6F\x72\x74","\x53\x79\x73\x74\x65\x6D\x45\x72\x72\x6F\x72","\x73\x74\x65\x70","\x64\x75\x70\x6C\x69\x63\x61\x74\x65\x73","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x5F","\x43\x52\x45\x41\x54\x45\x20\x54\x41\x42\x4C\x45\x20","\x20\x4C\x49\x4B\x45\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x3B","\x4C\x4F\x41\x44\x20\x44\x41\x54\x41\x20\x4C\x4F\x43\x41\x4C\x20\x49\x4E\x46\x49\x4C\x45\x20\x27\x25\x73\x27\x20\x49\x4E\x54\x4F\x20\x54\x41\x42\x4C\x45\x20\x25\x73\x20\x46\x49\x45\x4C\x44\x53\x20\x54\x45\x52\x4D\x49\x4E\x41\x54\x45\x44\x20\x42\x59\x20\x27\x2C\x27\x20\x45\x4E\x43\x4C\x4F\x53\x45\x44\x20\x42\x59\x20\x27\x22\x27\x20\x4C\x49\x4E\x45\x53\x20\x54\x45\x52\x4D\x49\x4E\x41\x54\x45\x44\x20\x42\x59\x20\x27\x0A\x27\x20\x49\x47\x4E\x4F\x52\x45\x20\x31\x20\x52\x4F\x57\x53\x20\x28\x25\x73\x29\x20\x53\x45\x54\x20\x69\x64\x20\x3D\x20\x4E\x55\x4C\x4C\x2C\x20\x4C\x69\x73\x74\x49\x64\x20\x3D\x20\x25\x73\x2C\x20\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64\x20\x3D\x20\x25\x73\x2C\x20\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x3D\x20\x27\x25\x73\x27\x2C\x20\x75\x70\x64\x61\x74\x65\x64\x41\x74\x20\x3D\x20\x27\x25\x73\x27","\x69\x73\x4E\x69\x6C","\x2C\x20\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74\x20\x3D\x20\x4E\x4F\x57\x28\x29","\x44\x52\x4F\x50\x20\x54\x41\x42\x4C\x45\x20","\x3B","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73\x5F\x68\x61\x73\x5F\x63\x6D\x5F\x6C\x69\x73\x74\x73","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73\x5F\x68\x61\x73\x5F\x63\x6D\x5F\x62\x6C\x61\x63\x6B\x6C\x69\x73\x74\x73","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73\x5F\x68\x61\x73\x5F\x63\x6D\x5F\x6C\x69\x73\x74\x73","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73\x5F\x68\x61\x73\x5F\x63\x6D\x5F\x62\x6C\x61\x63\x6B\x6C\x69\x73\x74\x73","\x66\x69\x6E\x69\x73\x68","\x61\x66\x66\x65\x63\x74\x65\x64\x52\x6F\x77\x73","\x75\x6E\x6C\x69\x6E\x6B","\x74\x68\x65\x6E","\x65\x61\x63\x68","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x70\x61\x72\x73\x65","\x61\x72\x67\x76","\x61\x72\x67\x75\x6D\x65\x6E\x74\x73\x20\x3C\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3E\x20\x3C\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x3E\x20\x3C\x61\x67\x65\x6E\x74\x73\x3E","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x66\x69\x6C\x65\x20\x64\x6F\x65\x73\x6E\x27\x74\x20\x65\x78\x69\x73\x74\x73","\x62\x69\x6E\x64\x69\x6E\x67\x20\x64\x6F\x65\x73\x6E\x27\x74\x20\x65\x78\x69\x73\x74\x73","\x70\x68\x6F\x6E\x65\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","\x4C\x69\x73\x74\x49\x64\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","\x62\x6F\x64\x79\x20\x69\x64\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","\x69\x64","\x6D\x61\x70","\x4E\x6F\x20\x61\x67\x65\x6E\x74\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x53\x49\x47\x49\x4E\x54","\x6F\x6E","\x75\x6E\x63\x61\x75\x67\x68\x74\x45\x78\x63\x65\x70\x74\x69\x6F\x6E"];_0xc0fe[0];var fs=require(_0xc0fe[1]);var path=require(_0xc0fe[2]);var _=require(_0xc0fe[3]);var Papa=require(_0xc0fe[4]);var util=require(_0xc0fe[5]);var BPromise=require(_0xc0fe[6]);var moment=require(_0xc0fe[7]);var squel=require(_0xc0fe[8]);var db=require(_0xc0fe[10])[_0xc0fe[9]];var config=require(_0xc0fe[11]);var logger=require(_0xc0fe[13])(_0xc0fe[12]);var socket=require(_0xc0fe[15])({host:_0xc0fe[14],port:6379});var stats={finish:false,errors:[],rows:0,affectedRows:0};var results=[];var stopped=false;var NOW=moment()[_0xc0fe[17]](_0xc0fe[16]);function isEmail(_0x9414x12){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))*$/[_0xc0fe[18]](_0x9414x12)}function selectNotIn(_0x9414x14,_0x9414x15,_0x9414x16,_0x9414x17,_0x9414x18){return squel[_0xc0fe[29]]()[_0xc0fe[28]](_0xc0fe[27])[_0xc0fe[26]](_0x9414x17)[_0xc0fe[20]](_0x9414x15,null,_0x9414x15+ _0xc0fe[25]+ _0x9414x17+ _0xc0fe[23]+ _0x9414x16)[_0xc0fe[22]](_0x9414x17+ _0xc0fe[23]+ _0x9414x16+ _0xc0fe[24]+ _0x9414x14+ _0xc0fe[23]+ _0x9414x16)[_0xc0fe[22]](_0x9414x15+ _0xc0fe[19]+ _0x9414x18[_0xc0fe[20]]()+ _0xc0fe[21])}function insertCmHopper(_0x9414x1a,_0x9414x14,_0x9414x15,_0x9414x16,_0x9414x1b){var _0x9414x1c=[_0xc0fe[30],_0xc0fe[31],_0xc0fe[32],_0xc0fe[33],_0x9414x14+ _0xc0fe[23]+ _0x9414x16,_0xc0fe[34],_0xc0fe[35],_0xc0fe[36],_0xc0fe[37],_0xc0fe[38]+ _0x9414x1b+ _0xc0fe[38]];return squel[_0xc0fe[59]]()[_0xc0fe[58]](_0xc0fe[48])[_0xc0fe[57]]([_0xc0fe[27],_0xc0fe[39],_0xc0fe[40],_0xc0fe[41],_0x9414x16,_0xc0fe[42],_0xc0fe[43],_0xc0fe[44],_0xc0fe[45],_0xc0fe[46]],squel[_0xc0fe[29]]()[_0xc0fe[56]](_0x9414x1c)[_0xc0fe[26]](_0x9414x14)[_0xc0fe[20]](_0xc0fe[53],null,_0xc0fe[54]+ _0x9414x14+ _0xc0fe[55])[_0xc0fe[20]](_0x9414x15,null,_0x9414x15+ _0xc0fe[25]+ _0x9414x14+ _0xc0fe[23]+ _0x9414x16)[_0xc0fe[22]](_0x9414x14+ _0xc0fe[52],_0x9414x1a)[_0xc0fe[22]](_0xc0fe[51],NOW)[_0xc0fe[22]](_0xc0fe[47],selectNotIn(_0x9414x14,_0x9414x15,_0x9414x16,_0xc0fe[48],[_0xc0fe[49],_0xc0fe[50]]))[_0xc0fe[22]](_0xc0fe[47],selectNotIn(_0x9414x14,_0x9414x15,_0x9414x16,_0xc0fe[48],[_0xc0fe[49]]))).toString()}function insertCmHopperBlack(_0x9414x1a,_0x9414x14,_0x9414x15,_0x9414x16){var _0x9414x1c=[_0xc0fe[30],_0xc0fe[32],_0xc0fe[33],_0x9414x14+ _0xc0fe[23]+ _0x9414x16,_0xc0fe[34],_0xc0fe[35]];return squel[_0xc0fe[59]]()[_0xc0fe[58]](_0xc0fe[62])[_0xc0fe[57]]([_0xc0fe[27],_0xc0fe[40],_0xc0fe[41],_0x9414x16,_0xc0fe[42],_0xc0fe[43]],squel[_0xc0fe[29]]()[_0xc0fe[56]](_0x9414x1c)[_0xc0fe[26]](_0x9414x14)[_0xc0fe[20]](_0xc0fe[53],null,_0xc0fe[54]+ _0x9414x14+ _0xc0fe[55])[_0xc0fe[20]](_0x9414x15,null,_0x9414x15+ _0xc0fe[25]+ _0x9414x14+ _0xc0fe[23]+ _0x9414x16)[_0xc0fe[22]](_0x9414x14+ _0xc0fe[52],_0x9414x1a)[_0xc0fe[22]](_0xc0fe[51],NOW)[_0xc0fe[22]](_0xc0fe[47],squel[_0xc0fe[29]]()[_0xc0fe[28]](_0xc0fe[27])[_0xc0fe[26]](_0xc0fe[62])[_0xc0fe[22]](_0xc0fe[61],_0x9414x1a)[_0xc0fe[22]](_0x9414x16+ _0xc0fe[60],_0x9414x14+ _0xc0fe[23]+ _0x9414x16))).toString()}function insertCmContact(_0x9414x1a,_0x9414x14,_0x9414x1f,_0x9414x20){var _0x9414x1c=_[_0xc0fe[65]](_[_0xc0fe[63]](_0x9414x20),[_0xc0fe[41],_0xc0fe[64],_0xc0fe[42],_0xc0fe[43]]);return squel[_0xc0fe[59]]()[_0xc0fe[58]](_0xc0fe[53])[_0xc0fe[57]](_0x9414x1c,squel[_0xc0fe[29]]()[_0xc0fe[56]](_0x9414x1c)[_0xc0fe[26]](_0x9414x14)[_0xc0fe[22]](_0xc0fe[71]+ _0x9414x1f[_0xc0fe[20]](_0xc0fe[67])+ _0xc0fe[72],squel[_0xc0fe[29]]()[_0xc0fe[56]](_0x9414x1f)[_0xc0fe[26]](_0xc0fe[53])[_0xc0fe[22]](_0xc0fe[61],_0x9414x1a))[_0xc0fe[22]](_0xc0fe[66],squel[_0xc0fe[29]]()[_0xc0fe[28]](_0xc0fe[69],_0xc0fe[70])[_0xc0fe[26]](_0x9414x14)[_0xc0fe[68]](_0x9414x1f[_0xc0fe[20]](_0xc0fe[67])))).toString()}function handleStop(){logger[_0xc0fe[74]](_0xc0fe[73]);stopped= true}function handleUncaughtException(_0x9414x23){logger[_0xc0fe[76]](_0x9414x23[_0xc0fe[75]]);process[_0xc0fe[77]](1)}function handleError(_0x9414x25,_0x9414x26){stats[_0xc0fe[80]][_0xc0fe[79]]({name:_0x9414x26[_0xc0fe[78]],message:_0x9414x26[_0xc0fe[75]],row:_0x9414x25})}function handleQuery(_0x9414x28){logger[_0xc0fe[74]](_0x9414x28);return db[_0xc0fe[84]][_0xc0fe[83]](_0x9414x28)[_0xc0fe[82]](function(_0x9414x29){results[_0xc0fe[79]](_0x9414x29)})[_0xc0fe[81]](function(_0x9414x23){logger[_0xc0fe[76]](_0x9414x23[_0xc0fe[75]])})}function main(_0x9414x2b,_0x9414x2c,_0x9414x2d,_0x9414x1b){logger[_0xc0fe[74]](_0xc0fe[85],_0x9414x2b,JSON[_0xc0fe[86]](_0x9414x2c));process[_0xc0fe[88]](_0xc0fe[87]);var _0x9414x20=_0x9414x2c[_0xc0fe[89]];var _0x9414x2e=_0x9414x2c[_0xc0fe[90]];var _0x9414x2f=path[_0xc0fe[20]](config[_0xc0fe[91]],_0xc0fe[92],_0x9414x2e+ _0xc0fe[93]);var _0x9414x30=_[_0xc0fe[63]](_0x9414x20)[_0xc0fe[20]]();logger[_0xc0fe[74]](_0xc0fe[94],_0x9414x30);fs[_0xc0fe[96]](_0x9414x2f,_0x9414x30+ _0xc0fe[95]);Papa[_0xc0fe[150]](fs[_0xc0fe[97]](_0x9414x2b),{header:true,skipEmptyLines:true,step:function(_0x9414x29,_0x9414x31){try{for(var _0x9414x32=0,_0x9414x33=[];_0x9414x32< _0x9414x29[_0xc0fe[99]][_0xc0fe[98]];_0x9414x32++){stats[_0xc0fe[100]]+= 1;if(_0x9414x29[_0xc0fe[80]][_0x9414x32]){handleError(_0x9414x29[_0xc0fe[99]][_0x9414x32],_0x9414x29[_0xc0fe[80]][_0x9414x32])}else {var _0x9414x34=[];for(var _0x9414x35 in _0x9414x20){if(_0x9414x20[_0xc0fe[101]](_0x9414x35)){if(_0x9414x29[_0xc0fe[99]][_0x9414x32][_0x9414x20[_0x9414x35]]){var _0x9414x36=_[_0xc0fe[104]](_0x9414x29[_0xc0fe[99]][_0x9414x32][_0x9414x20[_0x9414x35]][_0xc0fe[103]](/"/g,_0xc0fe[102]));switch(_0x9414x35){case _0xc0fe[39]:var _0x9414x37=moment(_0x9414x36,_0xc0fe[16],true);if(_0x9414x37[_0xc0fe[105]]()){_0x9414x33[_0xc0fe[79]](_0xc0fe[38]+ _0x9414x36+ _0xc0fe[38])}else {_0x9414x34[_0xc0fe[79]](_0xc0fe[106])};break;case _0xc0fe[44]:var _0x9414x38=parseInt(_0x9414x36);_0x9414x36= _[_0xc0fe[107]](_0x9414x38)|| _0x9414x38< 0|| _0x9414x38> 4?(_0x9414x1b?3:2):_0x9414x38;_0x9414x33[_0xc0fe[79]](_0xc0fe[38]+ _0x9414x36+ _0xc0fe[38]);break;case _0xc0fe[45]:var _0x9414x39=parseInt(_0x9414x36);if(_[_0xc0fe[108]](_0x9414x39)&& _[_0xc0fe[109]](_0x9414x2d,_0x9414x39)){_0x9414x33[_0xc0fe[79]](_0xc0fe[38]+ _0x9414x39+ _0xc0fe[38])}else {_0x9414x34[_0xc0fe[79]](_0xc0fe[110])};break;case _0xc0fe[112]:if(isEmail(_0x9414x36)){_0x9414x33[_0xc0fe[79]](_0xc0fe[38]+ _0x9414x36+ _0xc0fe[38])}else {_0x9414x34[_0xc0fe[79]](_0xc0fe[111])};break;case _0xc0fe[115]:var _0x9414x3a=moment(_0x9414x36,_0xc0fe[113],true);if(_0x9414x3a[_0xc0fe[105]]()){_0x9414x33[_0xc0fe[79]](_0xc0fe[38]+ _0x9414x36+ _0xc0fe[38])}else {_0x9414x34[_0xc0fe[79]](_0xc0fe[114])};break;default:_0x9414x33[_0xc0fe[79]](_0xc0fe[38]+ _0x9414x36+ _0xc0fe[38])}}else {switch(_0x9414x35){case _0xc0fe[116]:;case _0xc0fe[27]:_0x9414x34[_0xc0fe[79]](_0x9414x35+ _0xc0fe[117]);break;default:_0x9414x33[_0xc0fe[79]](_0xc0fe[118])}}}};if(_0x9414x34[_0xc0fe[98]]){handleError(_0x9414x29[_0xc0fe[99]][_0x9414x32],{code:_0xc0fe[119],message:_0x9414x34[_0xc0fe[20]]()})}else {fs[_0xc0fe[120]](_0x9414x2f,_0x9414x33[_0xc0fe[20]]()+ _0xc0fe[95])};_0x9414x33= []};if(!(stats[_0xc0fe[100]]% 200)){socket[_0xc0fe[122]](_0xc0fe[121]+ _0x9414x2e,stats);stats[_0xc0fe[80]]= []}};if(stopped){logger[_0xc0fe[74]](_0xc0fe[123]);_0x9414x31[_0xc0fe[124]]()}}catch(err){handleError(_0x9414x29[_0xc0fe[99]][_0x9414x32],{code:_0xc0fe[125],message:err[_0xc0fe[75]]});logger[_0xc0fe[76]](_0xc0fe[126],err[_0xc0fe[75]])}},complete:function(){try{var _0x9414x3b=[];var _0x9414x14=_0xc0fe[53];if(_0x9414x2c[_0xc0fe[127]]&& _0x9414x2c[_0xc0fe[127]][_0xc0fe[98]]){_0x9414x14= _0xc0fe[128]+ _0x9414x2e;_0x9414x3b[_0xc0fe[79]](_0xc0fe[129]+ _0x9414x14+ _0xc0fe[130])};var _0x9414x3c=util[_0xc0fe[17]](_0xc0fe[131],_0x9414x2f,_0x9414x14,_0x9414x30,_0x9414x2c.ListId,_0x9414x2c[_0xc0fe[64]]|| null,NOW,NOW);if(_[_0xc0fe[132]](_0x9414x20[_0xc0fe[39]])){_0x9414x3c+= _0xc0fe[133]};_0x9414x3b[_0xc0fe[79]](_0x9414x3c);if(_0x9414x2c[_0xc0fe[127]]&& _0x9414x2c[_0xc0fe[127]][_0xc0fe[98]]){_0x9414x3b[_0xc0fe[79]](insertCmContact(_0x9414x2c.ListId,_0x9414x14,_0x9414x2c[_0xc0fe[127]],_0x9414x20));_0x9414x3b[_0xc0fe[79]](_0xc0fe[134]+ _0x9414x14+ _0xc0fe[135])};_0x9414x3b[_0xc0fe[79]](insertCmHopper(_0x9414x2c.ListId,_0xc0fe[136],_0xc0fe[137],_0xc0fe[138],_0x9414x1b));_0x9414x3b[_0xc0fe[79]](insertCmHopperBlack(_0x9414x2c.ListId,_0xc0fe[139],_0xc0fe[137],_0xc0fe[138]));_0x9414x3b[_0xc0fe[79]](insertCmHopper(_0x9414x2c.ListId,_0xc0fe[140],_0xc0fe[141],_0xc0fe[142],_0x9414x1b));_0x9414x3b[_0xc0fe[79]](insertCmHopperBlack(_0x9414x2c.ListId,_0xc0fe[143],_0xc0fe[141],_0xc0fe[142]));BPromise[_0xc0fe[148]](_0x9414x3b,handleQuery)[_0xc0fe[147]](function(_0x9414x3d){stats[_0xc0fe[144]]= true;stats[_0xc0fe[145]]= _0x9414x2c[_0xc0fe[127]]&& _0x9414x2c[_0xc0fe[127]][_0xc0fe[98]]?results[2][_0xc0fe[145]]:results[0][_0xc0fe[145]];socket[_0xc0fe[122]](_0xc0fe[121]+ _0x9414x2e,stats);fs[_0xc0fe[146]](_0x9414x2b);fs[_0xc0fe[146]](_0x9414x2f);process[_0xc0fe[77]](0)})[_0xc0fe[81]](function(_0x9414x23){logger[_0xc0fe[76]](_0x9414x23[_0xc0fe[75]]);process[_0xc0fe[77]](1)})}catch(err){logger[_0xc0fe[76]](_0xc0fe[149],err[_0xc0fe[75]]);process[_0xc0fe[77]](1)}},error:function(_0x9414x23,_0x9414x3e,_0x9414x3f,_0x9414x40){throw  new Error(_0x9414x40)}})}function validate(){if(process[_0xc0fe[151]]&& process[_0xc0fe[151]][_0xc0fe[98]]< 4){throw  new Error(_0xc0fe[152])};var _0x9414x2b=path[_0xc0fe[20]](config[_0xc0fe[91]],_0xc0fe[92],process[_0xc0fe[151]][2]);if(!fs[_0xc0fe[153]](_0x9414x2b)){throw  new Error(_0xc0fe[154])};var _0x9414x2c={};try{_0x9414x2c= JSON[_0xc0fe[150]](process[_0xc0fe[151]][3]);if(!_0x9414x2c[_0xc0fe[89]]){throw  new Error(_0xc0fe[155])};if(!_0x9414x2c[_0xc0fe[89]][_0xc0fe[27]]){throw  new Error(_0xc0fe[156])};if(!_0x9414x2c[_0xc0fe[89]][_0xc0fe[116]]){throw  new Error(_0xc0fe[157])};var _0x9414x1b=0;if(_0x9414x2c[_0xc0fe[89]][_0xc0fe[45]]){_0x9414x1b= 1};if(!_0x9414x2c[_0xc0fe[41]]){throw  new Error(_0xc0fe[158])}}catch(error){throw  new Error(_0xc0fe[159])};var _0x9414x2d=[];try{_0x9414x2d= _[_0xc0fe[161]](JSON[_0xc0fe[150]](process[_0xc0fe[151]][4]),_0xc0fe[160])}catch(err){logger[_0xc0fe[74]](_0xc0fe[162])};main(_0x9414x2b,_0x9414x2c,_0x9414x2d,_0x9414x1b)}validate();process[_0xc0fe[164]](_0xc0fe[163],handleStop);process[_0xc0fe[164]](_0xc0fe[165],handleUncaughtException)
\ No newline at end of file
+var _0x494a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x70\x61\x74\x68","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x70\x61\x70\x61\x72\x73\x65","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x73\x71\x75\x65\x6C","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x69\x6D\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x74\x65\x73\x74","\x2E\x64\x69\x61\x6C\x43\x68\x65\x63\x6B\x44\x75\x70\x6C\x69\x63\x61\x74\x65\x54\x79\x70\x65\x20\x49\x4E\x20\x28","\x6A\x6F\x69\x6E","\x29","\x77\x68\x65\x72\x65","\x2E","\x20\x3D\x20","\x2E\x69\x64\x20\x3D\x20","\x66\x72\x6F\x6D","\x70\x68\x6F\x6E\x65","\x66\x69\x65\x6C\x64","\x73\x65\x6C\x65\x63\x74","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x70\x68\x6F\x6E\x65","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x69\x64","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x4C\x69\x73\x74\x49\x64","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x70\x72\x69\x6F\x72\x69\x74\x79","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x55\x73\x65\x72\x49\x64","\x22","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x55\x73\x65\x72\x49\x64","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x70\x68\x6F\x6E\x65\x20\x4E\x4F\x54\x20\x49\x4E\x20\x28\x3F\x29","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72","\x22\x61\x6C\x77\x61\x79\x73\x22","\x22\x6F\x6E\x6C\x79\x49\x66\x4F\x70\x65\x6E\x22","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x3D\x20\x3F","\x2E\x43\x6D\x4C\x69\x73\x74\x49\x64\x20\x3D\x20\x3F","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x4C\x69\x73\x74\x49\x64\x20\x3D\x20","\x2E\x43\x6D\x4C\x69\x73\x74\x49\x64","\x66\x69\x65\x6C\x64\x73","\x66\x72\x6F\x6D\x51\x75\x65\x72\x79","\x69\x6E\x74\x6F","\x69\x6E\x73\x65\x72\x74","\x20\x3D\x20\x3F","\x4C\x69\x73\x74\x49\x64\x20\x3D\x20\x3F","\x63\x6D\x5F\x68\x6F\x70\x70\x65\x72\x5F\x62\x6C\x61\x63\x6B","\x6B\x65\x79\x73","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x63\x6F\x6E\x63\x61\x74","\x69\x64\x20\x49\x4E\x20\x3F","\x2C","\x67\x72\x6F\x75\x70","\x4D\x49\x4E\x28\x69\x64\x29","\x6D\x69\x6E\x5F\x69\x64","\x28","\x29\x20\x4E\x4F\x54\x20\x49\x4E\x20\x3F","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x53\x49\x47\x49\x4E\x54","\x69\x6E\x66\x6F","\x6D\x65\x73\x73\x61\x67\x65","\x65\x72\x72\x6F\x72","\x65\x78\x69\x74","\x63\x6F\x64\x65","\x70\x75\x73\x68","\x65\x72\x72\x6F\x72\x73","\x63\x61\x74\x63\x68","\x73\x70\x72\x65\x61\x64","\x71\x75\x65\x72\x79","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6D\x61\x69\x6E","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x73\x74\x61\x72\x74","\x73\x65\x6E\x64","\x62\x69\x6E\x64\x69\x6E\x67","\x73\x6F\x63\x6B\x65\x74\x5F\x74\x69\x6D\x65\x73\x74\x61\x6D\x70","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x74\x6D\x70","\x2E\x63\x73\x76","\x68\x65\x61\x64\x65\x72","\x0A","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x63\x72\x65\x61\x74\x65\x52\x65\x61\x64\x53\x74\x72\x65\x61\x6D","\x6C\x65\x6E\x67\x74\x68","\x64\x61\x74\x61","\x72\x6F\x77\x73","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x27","\x72\x65\x70\x6C\x61\x63\x65","\x74\x72\x69\x6D","\x69\x73\x56\x61\x6C\x69\x64","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74\x20\x77\x72\x6F\x6E\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x28\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73\x29","\x69\x73\x4E\x61\x4E","\x69\x73\x4E\x75\x6D\x62\x65\x72","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x61\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74\x73","\x65\x6D\x61\x69\x6C\x20\x77\x72\x6F\x6E\x67\x20\x66\x6F\x72\x6D\x61\x74","\x65\x6D\x61\x69\x6C","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44","\x64\x61\x74\x65\x4F\x66\x42\x69\x72\x74\x68\x20\x77\x72\x6F\x6E\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x28\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x29","\x64\x61\x74\x65\x4F\x66\x42\x69\x72\x74\x68","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","\x20\x6E\x6F\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64","\x22\x22","\x53\x79\x73\x74\x65\x6D\x52\x6F\x77","\x61\x70\x70\x65\x6E\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x63\x6F\x6E\x74\x61\x63\x74\x3A\x69\x6D\x70\x6F\x72\x74\x3A","\x65\x6D\x69\x74","\x41\x62\x6F\x72\x74\x20\x70\x61\x72\x73\x65\x72","\x61\x62\x6F\x72\x74","\x53\x79\x73\x74\x65\x6D\x45\x72\x72\x6F\x72","\x73\x74\x65\x70","\x64\x75\x70\x6C\x69\x63\x61\x74\x65\x73","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x5F","\x43\x52\x45\x41\x54\x45\x20\x54\x41\x42\x4C\x45\x20","\x20\x4C\x49\x4B\x45\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x3B","\x4C\x4F\x41\x44\x20\x44\x41\x54\x41\x20\x4C\x4F\x43\x41\x4C\x20\x49\x4E\x46\x49\x4C\x45\x20\x27\x25\x73\x27\x20\x49\x4E\x54\x4F\x20\x54\x41\x42\x4C\x45\x20\x25\x73\x20\x46\x49\x45\x4C\x44\x53\x20\x54\x45\x52\x4D\x49\x4E\x41\x54\x45\x44\x20\x42\x59\x20\x27\x2C\x27\x20\x45\x4E\x43\x4C\x4F\x53\x45\x44\x20\x42\x59\x20\x27\x22\x27\x20\x4C\x49\x4E\x45\x53\x20\x54\x45\x52\x4D\x49\x4E\x41\x54\x45\x44\x20\x42\x59\x20\x27\x0A\x27\x20\x49\x47\x4E\x4F\x52\x45\x20\x31\x20\x52\x4F\x57\x53\x20\x28\x25\x73\x29\x20\x53\x45\x54\x20\x69\x64\x20\x3D\x20\x4E\x55\x4C\x4C\x2C\x20\x4C\x69\x73\x74\x49\x64\x20\x3D\x20\x25\x73\x2C\x20\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64\x20\x3D\x20\x25\x73\x2C\x20\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x3D\x20\x27\x25\x73\x27\x2C\x20\x75\x70\x64\x61\x74\x65\x64\x41\x74\x20\x3D\x20\x27\x25\x73\x27","\x69\x73\x4E\x69\x6C","\x2C\x20\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74\x20\x3D\x20\x4E\x4F\x57\x28\x29","\x44\x52\x4F\x50\x20\x54\x41\x42\x4C\x45\x20","\x3B","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73\x5F\x68\x61\x73\x5F\x63\x6D\x5F\x6C\x69\x73\x74\x73","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73\x5F\x68\x61\x73\x5F\x63\x6D\x5F\x62\x6C\x61\x63\x6B\x6C\x69\x73\x74\x73","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73\x5F\x68\x61\x73\x5F\x63\x6D\x5F\x6C\x69\x73\x74\x73","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73\x5F\x68\x61\x73\x5F\x63\x6D\x5F\x62\x6C\x61\x63\x6B\x6C\x69\x73\x74\x73","\x66\x69\x6E\x69\x73\x68","\x61\x66\x66\x65\x63\x74\x65\x64\x52\x6F\x77\x73","\x75\x6E\x6C\x69\x6E\x6B","\x74\x68\x65\x6E","\x65\x61\x63\x68","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x70\x61\x72\x73\x65","\x61\x72\x67\x76","\x61\x72\x67\x75\x6D\x65\x6E\x74\x73\x20\x3C\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3E\x20\x3C\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x3E\x20\x3C\x61\x67\x65\x6E\x74\x73\x3E","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x66\x69\x6C\x65\x20\x64\x6F\x65\x73\x6E\x27\x74\x20\x65\x78\x69\x73\x74\x73","\x62\x69\x6E\x64\x69\x6E\x67\x20\x64\x6F\x65\x73\x6E\x27\x74\x20\x65\x78\x69\x73\x74\x73","\x70\x68\x6F\x6E\x65\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","\x4C\x69\x73\x74\x49\x64\x20\x69\x73\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","\x62\x6F\x64\x79\x20\x69\x64\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","\x69\x64","\x6D\x61\x70","\x4E\x6F\x20\x61\x67\x65\x6E\x74\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x53\x49\x47\x49\x4E\x54","\x6F\x6E","\x75\x6E\x63\x61\x75\x67\x68\x74\x45\x78\x63\x65\x70\x74\x69\x6F\x6E"];_0x494a[0];var fs=require(_0x494a[1]);var path=require(_0x494a[2]);var _=require(_0x494a[3]);var Papa=require(_0x494a[4]);var util=require(_0x494a[5]);var BPromise=require(_0x494a[6]);var moment=require(_0x494a[7]);var squel=require(_0x494a[8]);var db=require(_0x494a[10])[_0x494a[9]];var config=require(_0x494a[11]);var logger=require(_0x494a[13])(_0x494a[12]);var socket=require(_0x494a[15])({host:_0x494a[14],port:6379});var stats={finish:false,errors:[],rows:0,affectedRows:0};var results=[];var stopped=false;var NOW=moment()[_0x494a[17]](_0x494a[16]);function isEmail(_0x91aax12){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))*$/[_0x494a[18]](_0x91aax12)}function selectNotIn(_0x91aax14,_0x91aax15,_0x91aax16,_0x91aax17,_0x91aax18){return squel[_0x494a[29]]()[_0x494a[28]](_0x494a[27])[_0x494a[26]](_0x91aax17)[_0x494a[20]](_0x91aax15,null,_0x91aax15+ _0x494a[25]+ _0x91aax17+ _0x494a[23]+ _0x91aax16)[_0x494a[22]](_0x91aax17+ _0x494a[23]+ _0x91aax16+ _0x494a[24]+ _0x91aax14+ _0x494a[23]+ _0x91aax16)[_0x494a[22]](_0x91aax15+ _0x494a[19]+ _0x91aax18[_0x494a[20]]()+ _0x494a[21])}function insertCmHopper(_0x91aax1a,_0x91aax14,_0x91aax15,_0x91aax16,_0x91aax1b){var _0x91aax1c=[_0x494a[30],_0x494a[31],_0x494a[32],_0x494a[33],_0x91aax14+ _0x494a[23]+ _0x91aax16,_0x494a[34],_0x494a[35],_0x494a[36],_0x494a[37],_0x494a[38]+ _0x91aax1b+ _0x494a[38]];return squel[_0x494a[59]]()[_0x494a[58]](_0x494a[48])[_0x494a[57]]([_0x494a[27],_0x494a[39],_0x494a[40],_0x494a[41],_0x91aax16,_0x494a[42],_0x494a[43],_0x494a[44],_0x494a[45],_0x494a[46]],squel[_0x494a[29]]()[_0x494a[56]](_0x91aax1c)[_0x494a[26]](_0x91aax14)[_0x494a[20]](_0x494a[53],null,_0x494a[54]+ _0x91aax14+ _0x494a[55])[_0x494a[20]](_0x91aax15,null,_0x91aax15+ _0x494a[25]+ _0x91aax14+ _0x494a[23]+ _0x91aax16)[_0x494a[22]](_0x91aax14+ _0x494a[52],_0x91aax1a)[_0x494a[22]](_0x494a[51],NOW)[_0x494a[22]](_0x494a[47],selectNotIn(_0x91aax14,_0x91aax15,_0x91aax16,_0x494a[48],[_0x494a[49],_0x494a[50]]))[_0x494a[22]](_0x494a[47],selectNotIn(_0x91aax14,_0x91aax15,_0x91aax16,_0x494a[48],[_0x494a[49]]))).toString()}function insertCmHopperBlack(_0x91aax1a,_0x91aax14,_0x91aax15,_0x91aax16){var _0x91aax1c=[_0x494a[30],_0x494a[32],_0x494a[33],_0x91aax14+ _0x494a[23]+ _0x91aax16,_0x494a[34],_0x494a[35]];return squel[_0x494a[59]]()[_0x494a[58]](_0x494a[62])[_0x494a[57]]([_0x494a[27],_0x494a[40],_0x494a[41],_0x91aax16,_0x494a[42],_0x494a[43]],squel[_0x494a[29]]()[_0x494a[56]](_0x91aax1c)[_0x494a[26]](_0x91aax14)[_0x494a[20]](_0x494a[53],null,_0x494a[54]+ _0x91aax14+ _0x494a[55])[_0x494a[20]](_0x91aax15,null,_0x91aax15+ _0x494a[25]+ _0x91aax14+ _0x494a[23]+ _0x91aax16)[_0x494a[22]](_0x91aax14+ _0x494a[52],_0x91aax1a)[_0x494a[22]](_0x494a[51],NOW)[_0x494a[22]](_0x494a[47],squel[_0x494a[29]]()[_0x494a[28]](_0x494a[27])[_0x494a[26]](_0x494a[62])[_0x494a[22]](_0x494a[61],_0x91aax1a)[_0x494a[22]](_0x91aax16+ _0x494a[60],_0x91aax14+ _0x494a[23]+ _0x91aax16))).toString()}function insertCmContact(_0x91aax1a,_0x91aax14,_0x91aax1f,_0x91aax20){var _0x91aax1c=_[_0x494a[65]](_[_0x494a[63]](_0x91aax20),[_0x494a[41],_0x494a[64],_0x494a[42],_0x494a[43]]);return squel[_0x494a[59]]()[_0x494a[58]](_0x494a[53])[_0x494a[57]](_0x91aax1c,squel[_0x494a[29]]()[_0x494a[56]](_0x91aax1c)[_0x494a[26]](_0x91aax14)[_0x494a[22]](_0x494a[71]+ _0x91aax1f[_0x494a[20]](_0x494a[67])+ _0x494a[72],squel[_0x494a[29]]()[_0x494a[56]](_0x91aax1f)[_0x494a[26]](_0x494a[53])[_0x494a[22]](_0x494a[61],_0x91aax1a))[_0x494a[22]](_0x494a[66],squel[_0x494a[29]]()[_0x494a[28]](_0x494a[69],_0x494a[70])[_0x494a[26]](_0x91aax14)[_0x494a[68]](_0x91aax1f[_0x494a[20]](_0x494a[67])))).toString()}function handleStop(){logger[_0x494a[74]](_0x494a[73]);stopped= true}function handleUncaughtException(_0x91aax23){logger[_0x494a[76]](_0x91aax23[_0x494a[75]]);process[_0x494a[77]](1)}function handleError(_0x91aax25,_0x91aax26){stats[_0x494a[80]][_0x494a[79]]({name:_0x91aax26[_0x494a[78]],message:_0x91aax26[_0x494a[75]],row:_0x91aax25})}function handleQuery(_0x91aax28){logger[_0x494a[74]](_0x91aax28);return db[_0x494a[84]][_0x494a[83]](_0x91aax28)[_0x494a[82]](function(_0x91aax29){results[_0x494a[79]](_0x91aax29)})[_0x494a[81]](function(_0x91aax23){logger[_0x494a[76]](_0x91aax23[_0x494a[75]])})}function main(_0x91aax2b,_0x91aax2c,_0x91aax2d,_0x91aax1b){logger[_0x494a[74]](_0x494a[85],_0x91aax2b,JSON[_0x494a[86]](_0x91aax2c));process[_0x494a[88]](_0x494a[87]);var _0x91aax20=_0x91aax2c[_0x494a[89]];var _0x91aax2e=_0x91aax2c[_0x494a[90]];var _0x91aax2f=path[_0x494a[20]](config[_0x494a[91]],_0x494a[92],_0x91aax2e+ _0x494a[93]);var _0x91aax30=_[_0x494a[63]](_0x91aax20)[_0x494a[20]]();logger[_0x494a[74]](_0x494a[94],_0x91aax30);fs[_0x494a[96]](_0x91aax2f,_0x91aax30+ _0x494a[95]);Papa[_0x494a[150]](fs[_0x494a[97]](_0x91aax2b),{header:true,skipEmptyLines:true,step:function(_0x91aax29,_0x91aax31){try{for(var _0x91aax32=0,_0x91aax33=[];_0x91aax32< _0x91aax29[_0x494a[99]][_0x494a[98]];_0x91aax32++){stats[_0x494a[100]]+= 1;if(_0x91aax29[_0x494a[80]][_0x91aax32]){handleError(_0x91aax29[_0x494a[99]][_0x91aax32],_0x91aax29[_0x494a[80]][_0x91aax32])}else {var _0x91aax34=[];for(var _0x91aax35 in _0x91aax20){if(_0x91aax20[_0x494a[101]](_0x91aax35)){if(_0x91aax29[_0x494a[99]][_0x91aax32][_0x91aax20[_0x91aax35]]){var _0x91aax36=_[_0x494a[104]](_0x91aax29[_0x494a[99]][_0x91aax32][_0x91aax20[_0x91aax35]][_0x494a[103]](/"/g,_0x494a[102]));switch(_0x91aax35){case _0x494a[39]:var _0x91aax37=moment(_0x91aax36,_0x494a[16],true);if(_0x91aax37[_0x494a[105]]()){_0x91aax33[_0x494a[79]](_0x494a[38]+ _0x91aax36+ _0x494a[38])}else {_0x91aax34[_0x494a[79]](_0x494a[106])};break;case _0x494a[44]:var _0x91aax38=parseInt(_0x91aax36);_0x91aax36= _[_0x494a[107]](_0x91aax38)|| _0x91aax38< 0|| _0x91aax38> 4?(_0x91aax1b?3:2):_0x91aax38;_0x91aax33[_0x494a[79]](_0x494a[38]+ _0x91aax36+ _0x494a[38]);break;case _0x494a[45]:var _0x91aax39=parseInt(_0x91aax36);if(_[_0x494a[108]](_0x91aax39)&& _[_0x494a[109]](_0x91aax2d,_0x91aax39)){_0x91aax33[_0x494a[79]](_0x494a[38]+ _0x91aax39+ _0x494a[38])}else {_0x91aax34[_0x494a[79]](_0x494a[110])};break;case _0x494a[112]:if(isEmail(_0x91aax36)){_0x91aax33[_0x494a[79]](_0x494a[38]+ _0x91aax36+ _0x494a[38])}else {_0x91aax34[_0x494a[79]](_0x494a[111])};break;case _0x494a[115]:var _0x91aax3a=moment(_0x91aax36,_0x494a[113],true);if(_0x91aax3a[_0x494a[105]]()){_0x91aax33[_0x494a[79]](_0x494a[38]+ _0x91aax36+ _0x494a[38])}else {_0x91aax34[_0x494a[79]](_0x494a[114])};break;default:_0x91aax33[_0x494a[79]](_0x494a[38]+ _0x91aax36+ _0x494a[38])}}else {switch(_0x91aax35){case _0x494a[116]:;case _0x494a[27]:_0x91aax34[_0x494a[79]](_0x91aax35+ _0x494a[117]);break;default:_0x91aax33[_0x494a[79]](_0x494a[118])}}}};if(_0x91aax34[_0x494a[98]]){handleError(_0x91aax29[_0x494a[99]][_0x91aax32],{code:_0x494a[119],message:_0x91aax34[_0x494a[20]]()})}else {fs[_0x494a[120]](_0x91aax2f,_0x91aax33[_0x494a[20]]()+ _0x494a[95])};_0x91aax33= []};if(!(stats[_0x494a[100]]% 200)){socket[_0x494a[122]](_0x494a[121]+ _0x91aax2e,stats);stats[_0x494a[80]]= []}};if(stopped){logger[_0x494a[74]](_0x494a[123]);_0x91aax31[_0x494a[124]]()}}catch(err){handleError(_0x91aax29[_0x494a[99]][_0x91aax32],{code:_0x494a[125],message:err[_0x494a[75]]});logger[_0x494a[76]](_0x494a[126],err[_0x494a[75]])}},complete:function(){try{var _0x91aax3b=[];var _0x91aax14=_0x494a[53];if(_0x91aax2c[_0x494a[127]]&& _0x91aax2c[_0x494a[127]][_0x494a[98]]){_0x91aax14= _0x494a[128]+ _0x91aax2e;_0x91aax3b[_0x494a[79]](_0x494a[129]+ _0x91aax14+ _0x494a[130])};var _0x91aax3c=util[_0x494a[17]](_0x494a[131],_0x91aax2f,_0x91aax14,_0x91aax30,_0x91aax2c.ListId,_0x91aax2c[_0x494a[64]]|| null,NOW,NOW);if(_[_0x494a[132]](_0x91aax20[_0x494a[39]])){_0x91aax3c+= _0x494a[133]};_0x91aax3b[_0x494a[79]](_0x91aax3c);if(_0x91aax2c[_0x494a[127]]&& _0x91aax2c[_0x494a[127]][_0x494a[98]]){_0x91aax3b[_0x494a[79]](insertCmContact(_0x91aax2c.ListId,_0x91aax14,_0x91aax2c[_0x494a[127]],_0x91aax20));_0x91aax3b[_0x494a[79]](_0x494a[134]+ _0x91aax14+ _0x494a[135])};_0x91aax3b[_0x494a[79]](insertCmHopper(_0x91aax2c.ListId,_0x494a[136],_0x494a[137],_0x494a[138],_0x91aax1b));_0x91aax3b[_0x494a[79]](insertCmHopperBlack(_0x91aax2c.ListId,_0x494a[139],_0x494a[137],_0x494a[138]));_0x91aax3b[_0x494a[79]](insertCmHopper(_0x91aax2c.ListId,_0x494a[140],_0x494a[141],_0x494a[142],_0x91aax1b));_0x91aax3b[_0x494a[79]](insertCmHopperBlack(_0x91aax2c.ListId,_0x494a[143],_0x494a[141],_0x494a[142]));BPromise[_0x494a[148]](_0x91aax3b,handleQuery)[_0x494a[147]](function(_0x91aax3d){stats[_0x494a[144]]= true;stats[_0x494a[145]]= _0x91aax2c[_0x494a[127]]&& _0x91aax2c[_0x494a[127]][_0x494a[98]]?results[2][_0x494a[145]]:results[0][_0x494a[145]];socket[_0x494a[122]](_0x494a[121]+ _0x91aax2e,stats);fs[_0x494a[146]](_0x91aax2b);fs[_0x494a[146]](_0x91aax2f);process[_0x494a[77]](0)})[_0x494a[81]](function(_0x91aax23){logger[_0x494a[76]](_0x91aax23[_0x494a[75]]);process[_0x494a[77]](1)})}catch(err){logger[_0x494a[76]](_0x494a[149],err[_0x494a[75]]);process[_0x494a[77]](1)}},error:function(_0x91aax23,_0x91aax3e,_0x91aax3f,_0x91aax40){throw  new Error(_0x91aax40)}})}function validate(){if(process[_0x494a[151]]&& process[_0x494a[151]][_0x494a[98]]< 4){throw  new Error(_0x494a[152])};var _0x91aax2b=path[_0x494a[20]](config[_0x494a[91]],_0x494a[92],process[_0x494a[151]][2]);if(!fs[_0x494a[153]](_0x91aax2b)){throw  new Error(_0x494a[154])};var _0x91aax2c={};try{_0x91aax2c= JSON[_0x494a[150]](process[_0x494a[151]][3]);if(!_0x91aax2c[_0x494a[89]]){throw  new Error(_0x494a[155])};if(!_0x91aax2c[_0x494a[89]][_0x494a[27]]){throw  new Error(_0x494a[156])};if(!_0x91aax2c[_0x494a[89]][_0x494a[116]]){throw  new Error(_0x494a[157])};var _0x91aax1b=0;if(_0x91aax2c[_0x494a[89]][_0x494a[45]]){_0x91aax1b= 1};if(!_0x91aax2c[_0x494a[41]]){throw  new Error(_0x494a[158])}}catch(error){throw  new Error(_0x494a[159])};var _0x91aax2d=[];try{_0x91aax2d= _[_0x494a[161]](JSON[_0x494a[150]](process[_0x494a[151]][4]),_0x494a[160])}catch(err){logger[_0x494a[74]](_0x494a[162])};main(_0x91aax2b,_0x91aax2c,_0x91aax2d,_0x91aax1b)}validate();process[_0x494a[164]](_0x494a[163],handleStop);process[_0x494a[164]](_0x494a[165],handleUncaughtException)
\ No newline at end of file
index 7b380f8..26e8a31 100644 (file)
@@ -1 +1 @@
-var _0xd51a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x73\x74\x72\x69\x6E\x67","\x5B\x78\x43\x41\x4C\x4C\x59\x20\x54\x69\x63\x6B\x65\x74\x5D","\x76\x61\x72\x69\x61\x62\x6C\x65","","\x71\x75\x65\x75\x65","\x70\x75\x73\x68","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x69\x6E\x62\x6F\x75\x6E\x64","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x76\x6F\x69\x63\x65","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x2A\x2A\x2A\x20\x43\x61\x6C\x6C\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x43\x61\x6C\x6C\x65\x72\x20\x4E\x75\x6D\x62\x65\x72","\x43\x61\x6C\x6C\x65\x72\x20\x4E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x43\x61\x6C\x6C\x20\x54\x6F","\x64\x65\x73\x74\x65\x78\x74\x65\x6E","\x51\x75\x65\x75\x65","\x55\x6E\x69\x71\x75\x65\x49\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x44\x61\x74\x65","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64\x41\x74","\x2A\x2A\x2A\x20\x41\x67\x65\x6E\x74\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x41\x67\x65\x6E\x74\x20\x4E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x41\x67\x65\x6E\x74\x20\x4E\x75\x6D\x62\x65\x72","\x2A\x2A\x2A\x20\x54\x69\x6D\x65\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x41\x67\x65\x6E\x74\x20\x52\x69\x6E\x67","\x41\x67\x65\x6E\x74\x20\x43\x6F\x6E\x6E\x65\x63\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x41\x67\x65\x6E\x74\x20\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x48\x6F\x6C\x64\x20\x54\x69\x6D\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x54\x61\x6C\x6B\x20\x54\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x43\x61\x6C\x6C\x65\x64\x20\x4E\x75\x6D\x62\x65\x72","\x4D\x65\x6D\x62\x65\x72\x20\x4E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x41\x6E\x73\x77\x65\x72\x20\x54\x69\x6D\x65","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x20\x54\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65"];_0xd51a[0];exports[_0xd51a[1]]= function(_0x251dx1,_0x251dx2){var _0x251dx3=[{type:_0xd51a[2],content:_0xd51a[3],variableName:null}];switch(_0x251dx1[_0xd51a[13]]()){case _0xd51a[14]:switch(_0x251dx2[_0xd51a[13]]()){case _0xd51a[9]:_0x251dx3[_0xd51a[7]]({type:_0xd51a[4],content:_0xd51a[5],variableName:_0xd51a[6]});_0x251dx3[_0xd51a[7]]({type:_0xd51a[4],content:_0xd51a[5],variableName:_0xd51a[8]});break;case _0xd51a[12]:_0x251dx3[_0xd51a[7]]({type:_0xd51a[2],content:_0xd51a[10],variableName:null});_0x251dx3[_0xd51a[7]]({type:_0xd51a[4],content:_0xd51a[5],variableName:_0xd51a[11]});break}};return _0x251dx3};exports[_0xd51a[15]]= function(_0x251dx1,_0x251dx2){var _0x251dx4=[];switch(_0x251dx1[_0xd51a[13]]()){case _0xd51a[14]:switch(_0x251dx2[_0xd51a[13]]()){case _0xd51a[9]:_0x251dx4= [{type:_0xd51a[2],content:_0xd51a[16],key:null,keyType:null,variableName:null},{type:_0xd51a[17],content:_0xd51a[5],key:_0xd51a[18],keyType:_0xd51a[4],variableName:_0xd51a[8]},{type:_0xd51a[17],content:_0xd51a[5],key:_0xd51a[19],keyType:_0xd51a[4],variableName:_0xd51a[20]},{type:_0xd51a[17],content:_0xd51a[5],key:_0xd51a[21],keyType:_0xd51a[4],variableName:_0xd51a[22]},{type:_0xd51a[17],content:_0xd51a[5],key:_0xd51a[23],keyType:_0xd51a[4],variableName:_0xd51a[6]},{type:_0xd51a[17],content:_0xd51a[5],key:_0xd51a[24],keyType:_0xd51a[4],variableName:_0xd51a[25]},{type:_0xd51a[17],content:_0xd51a[5],key:_0xd51a[26],keyType:_0xd51a[4],variableName:_0xd51a[27]},{type:_0xd51a[2],content:_0xd51a[28],key:null,keyType:null,variableName:null},{type:_0xd51a[17],content:_0xd51a[5],key:_0xd51a[29],keyType:_0xd51a[4],variableName:_0xd51a[30]},{type:_0xd51a[17],content:_0xd51a[5],key:_0xd51a[31],keyType:_0xd51a[4],variableName:_0xd51a[11]},{type:_0xd51a[2],content:_0xd51a[32],key:null,keyType:null,variableName:null},{type:_0xd51a[17],content:_0xd51a[5],key:_0xd51a[33],keyType:_0xd51a[4],variableName:_0xd51a[27]},{type:_0xd51a[17],content:_0xd51a[5],key:_0xd51a[34],keyType:_0xd51a[4],variableName:_0xd51a[35]},{type:_0xd51a[17],content:_0xd51a[5],key:_0xd51a[36],keyType:_0xd51a[4],variableName:_0xd51a[37]},{type:_0xd51a[17],content:_0xd51a[5],key:_0xd51a[38],keyType:_0xd51a[4],variableName:_0xd51a[39]},{type:_0xd51a[17],content:_0xd51a[5],key:_0xd51a[40],keyType:_0xd51a[4],variableName:_0xd51a[41]}];break;case _0xd51a[12]:_0x251dx4= [{type:_0xd51a[2],content:_0xd51a[16],variableName:null},{type:_0xd51a[17],content:_0xd51a[5],key:_0xd51a[42],keyType:_0xd51a[4],keyContent:_0xd51a[5],variableName:_0xd51a[11]},{type:_0xd51a[17],content:_0xd51a[5],key:_0xd51a[43],keyType:_0xd51a[4],keyContent:_0xd51a[5],variableName:_0xd51a[44]},{type:_0xd51a[17],content:_0xd51a[5],key:_0xd51a[24],keyType:_0xd51a[4],keyContent:_0xd51a[5],variableName:_0xd51a[25]},{type:_0xd51a[17],content:_0xd51a[5],key:_0xd51a[26],keyType:_0xd51a[4],keyContent:_0xd51a[5],variableName:_0xd51a[45]},{type:_0xd51a[2],content:_0xd51a[32]},{type:_0xd51a[17],content:_0xd51a[5],key:_0xd51a[46],keyType:_0xd51a[4],keyContent:_0xd51a[5],variableName:_0xd51a[47]},{type:_0xd51a[17],content:_0xd51a[5],key:_0xd51a[48],keyType:_0xd51a[4],keyContent:_0xd51a[5],variableName:_0xd51a[49]}];break}};return _0x251dx4}
\ No newline at end of file
+var _0x1c09=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x67\x65\x74\x53\x75\x62\x6A\x65\x63\x74\x73","\x73\x74\x72\x69\x6E\x67","\x5B\x78\x43\x41\x4C\x4C\x59\x20\x54\x69\x63\x6B\x65\x74\x5D","\x76\x61\x72\x69\x61\x62\x6C\x65","","\x71\x75\x65\x75\x65","\x70\x75\x73\x68","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x69\x6E\x62\x6F\x75\x6E\x64","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x76\x6F\x69\x63\x65","\x67\x65\x74\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x2A\x2A\x2A\x20\x43\x61\x6C\x6C\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x43\x61\x6C\x6C\x65\x72\x20\x4E\x75\x6D\x62\x65\x72","\x43\x61\x6C\x6C\x65\x72\x20\x4E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x43\x61\x6C\x6C\x20\x54\x6F","\x64\x65\x73\x74\x65\x78\x74\x65\x6E","\x51\x75\x65\x75\x65","\x55\x6E\x69\x71\x75\x65\x49\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x44\x61\x74\x65","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64\x41\x74","\x2A\x2A\x2A\x20\x41\x67\x65\x6E\x74\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x41\x67\x65\x6E\x74\x20\x4E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x41\x67\x65\x6E\x74\x20\x4E\x75\x6D\x62\x65\x72","\x2A\x2A\x2A\x20\x54\x69\x6D\x65\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x41\x67\x65\x6E\x74\x20\x52\x69\x6E\x67","\x41\x67\x65\x6E\x74\x20\x43\x6F\x6E\x6E\x65\x63\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x41\x67\x65\x6E\x74\x20\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x48\x6F\x6C\x64\x20\x54\x69\x6D\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x54\x61\x6C\x6B\x20\x54\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x43\x61\x6C\x6C\x65\x64\x20\x4E\x75\x6D\x62\x65\x72","\x4D\x65\x6D\x62\x65\x72\x20\x4E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x41\x6E\x73\x77\x65\x72\x20\x54\x69\x6D\x65","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x20\x54\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65"];_0x1c09[0];exports[_0x1c09[1]]= function(_0xdecax1,_0xdecax2){var _0xdecax3=[{type:_0x1c09[2],content:_0x1c09[3],variableName:null}];switch(_0xdecax1[_0x1c09[13]]()){case _0x1c09[14]:switch(_0xdecax2[_0x1c09[13]]()){case _0x1c09[9]:_0xdecax3[_0x1c09[7]]({type:_0x1c09[4],content:_0x1c09[5],variableName:_0x1c09[6]});_0xdecax3[_0x1c09[7]]({type:_0x1c09[4],content:_0x1c09[5],variableName:_0x1c09[8]});break;case _0x1c09[12]:_0xdecax3[_0x1c09[7]]({type:_0x1c09[2],content:_0x1c09[10],variableName:null});_0xdecax3[_0x1c09[7]]({type:_0x1c09[4],content:_0x1c09[5],variableName:_0x1c09[11]});break}};return _0xdecax3};exports[_0x1c09[15]]= function(_0xdecax1,_0xdecax2){var _0xdecax4=[];switch(_0xdecax1[_0x1c09[13]]()){case _0x1c09[14]:switch(_0xdecax2[_0x1c09[13]]()){case _0x1c09[9]:_0xdecax4= [{type:_0x1c09[2],content:_0x1c09[16],key:null,keyType:null,variableName:null},{type:_0x1c09[17],content:_0x1c09[5],key:_0x1c09[18],keyType:_0x1c09[4],variableName:_0x1c09[8]},{type:_0x1c09[17],content:_0x1c09[5],key:_0x1c09[19],keyType:_0x1c09[4],variableName:_0x1c09[20]},{type:_0x1c09[17],content:_0x1c09[5],key:_0x1c09[21],keyType:_0x1c09[4],variableName:_0x1c09[22]},{type:_0x1c09[17],content:_0x1c09[5],key:_0x1c09[23],keyType:_0x1c09[4],variableName:_0x1c09[6]},{type:_0x1c09[17],content:_0x1c09[5],key:_0x1c09[24],keyType:_0x1c09[4],variableName:_0x1c09[25]},{type:_0x1c09[17],content:_0x1c09[5],key:_0x1c09[26],keyType:_0x1c09[4],variableName:_0x1c09[27]},{type:_0x1c09[2],content:_0x1c09[28],key:null,keyType:null,variableName:null},{type:_0x1c09[17],content:_0x1c09[5],key:_0x1c09[29],keyType:_0x1c09[4],variableName:_0x1c09[30]},{type:_0x1c09[17],content:_0x1c09[5],key:_0x1c09[31],keyType:_0x1c09[4],variableName:_0x1c09[11]},{type:_0x1c09[2],content:_0x1c09[32],key:null,keyType:null,variableName:null},{type:_0x1c09[17],content:_0x1c09[5],key:_0x1c09[33],keyType:_0x1c09[4],variableName:_0x1c09[27]},{type:_0x1c09[17],content:_0x1c09[5],key:_0x1c09[34],keyType:_0x1c09[4],variableName:_0x1c09[35]},{type:_0x1c09[17],content:_0x1c09[5],key:_0x1c09[36],keyType:_0x1c09[4],variableName:_0x1c09[37]},{type:_0x1c09[17],content:_0x1c09[5],key:_0x1c09[38],keyType:_0x1c09[4],variableName:_0x1c09[39]},{type:_0x1c09[17],content:_0x1c09[5],key:_0x1c09[40],keyType:_0x1c09[4],variableName:_0x1c09[41]}];break;case _0x1c09[12]:_0xdecax4= [{type:_0x1c09[2],content:_0x1c09[16],variableName:null},{type:_0x1c09[17],content:_0x1c09[5],key:_0x1c09[42],keyType:_0x1c09[4],keyContent:_0x1c09[5],variableName:_0x1c09[11]},{type:_0x1c09[17],content:_0x1c09[5],key:_0x1c09[43],keyType:_0x1c09[4],keyContent:_0x1c09[5],variableName:_0x1c09[44]},{type:_0x1c09[17],content:_0x1c09[5],key:_0x1c09[24],keyType:_0x1c09[4],keyContent:_0x1c09[5],variableName:_0x1c09[25]},{type:_0x1c09[17],content:_0x1c09[5],key:_0x1c09[26],keyType:_0x1c09[4],keyContent:_0x1c09[5],variableName:_0x1c09[45]},{type:_0x1c09[2],content:_0x1c09[32]},{type:_0x1c09[17],content:_0x1c09[5],key:_0x1c09[46],keyType:_0x1c09[4],keyContent:_0x1c09[5],variableName:_0x1c09[47]},{type:_0x1c09[17],content:_0x1c09[5],key:_0x1c09[48],keyType:_0x1c09[4],keyContent:_0x1c09[5],variableName:_0x1c09[49]}];break}};return _0xdecax4}
\ No newline at end of file
index 1bc0c20..a2fc443 100644 (file)
@@ -1 +1 @@
-var _0xd516=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x61\x69\x6C\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x66\x61\x78\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x73\x6D\x73\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x63\x68\x61\x74\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x70\x70\x65\x72\x46\x69\x72\x73\x74","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x69\x64","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x5B\x25\x73\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6E\x75\x6C\x6C","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x6E\x66\x6F","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x74\x72\x61\x63\x6B\x65\x64","\x75\x73\x65\x72","\x71\x75\x65\x72\x79","\x62\x6F\x64\x79","\x63\x6C\x6F\x6E\x65","\x68\x74\x6D\x6C","\x70\x68\x6F\x6E\x65","\x66\x61\x78","\x6D\x6F\x62\x69\x6C\x65","\x6F\x6D\x69\x74"];_0xd516[0];var _=require(_0xd516[1]);var db=require(_0xd516[3])[_0xd516[2]];var loggers={openchannel:require(_0xd516[5])(_0xd516[4]),mail:require(_0xd516[5])(_0xd516[6]),fax:require(_0xd516[5])(_0xd516[7]),sms:require(_0xd516[5])(_0xd516[8]),chat:require(_0xd516[5])(_0xd516[9])};function getInteractionId(_0xe97fx5,_0xe97fx6,_0xe97fx7){if(_0xe97fx5&& _0xe97fx5[_[_0xd516[10]](_0xe97fx7)+ _0xd516[11]]){return _0xe97fx5[_[_0xd516[10]](_0xe97fx7)+ _0xd516[11]]}else {if(_0xe97fx5&& _0xe97fx5[_0xd516[12]]){return _0xe97fx5[_0xd516[12]]}else {if(_0xe97fx6&& _0xe97fx6[_0xd516[12]]){return _0xe97fx6[_0xd516[12]]}else {return _0xd516[13]}}}}function log(_0xe97fx9,_0xe97fxa,_0xe97fx5,_0xe97fx6,_0xe97fx7,_0xe97fxb){loggers[_0xe97fx7[_0xd516[20]]()][_0xe97fx9](_0xd516[14],_0xe97fxb[_0xd516[15]](),_0xe97fxa?_0xe97fxa[_0xd516[12]]:null,_0xe97fxa?_0xe97fxa[_0xd516[16]]:null,_0xe97fxa?_0xe97fxa[_0xd516[17]]:null,getInteractionId(_0xe97fx5,_0xe97fx6,_0xe97fx7),_0xe97fx5?JSON[_0xd516[18]](_0xe97fx5):_0xd516[19])}function updateUser(_0xe97fxa,_0xe97fx5,_0xe97fx6,_0xe97fx7,_0xe97fxb){db[_[_0xd516[10]](_0xe97fx7)+ _0xd516[27]][_0xd516[26]]({where:{id:getInteractionId(_0xe97fx5,_0xe97fx6,_0xe97fx7)}})[_0xd516[24]](function(_0xe97fxd){if(_0xe97fxd){return _0xe97fxd[_0xd516[25]]({UserId:_0xe97fxa[_0xd516[12]]})}})[_0xd516[24]](function(_0xe97fxd){if(_0xe97fxd){log(_0xd516[23],_0xe97fxa,_0xe97fx5,_0xe97fx6,_0xe97fx7,_0xe97fxb)}})[_0xd516[22]](function(){log(_0xd516[21],_0xe97fxa,_0xe97fx5,_0xe97fx6,_0xe97fx7,_0xe97fxb)})}exports[_0xd516[28]]= function(_0xe97fx7,_0xe97fxb){return function(_0xe97fxe,_0xe97fxf,_0xe97fx10){var _0xe97fxa=_0xe97fxe[_0xd516[29]];var _0xe97fx5={};var _0xe97fx6=_0xe97fxe[_0xd516[30]];if(_0xe97fx5){_0xe97fx5= _[_0xd516[32]](_0xe97fxe[_0xd516[31]]);_0xe97fx5= _[_0xd516[37]](_0xe97fx5,[_0xd516[31],_0xd516[33],_0xd516[34],_0xd516[35],_0xd516[36]])};updateUser(_0xe97fxa,_0xe97fx5,_0xe97fx6,_0xe97fx7,_0xe97fxb);_0xe97fx10(null)}}
\ No newline at end of file
+var _0x23b9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x61\x69\x6C\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x66\x61\x78\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x73\x6D\x73\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x63\x68\x61\x74\x2D\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x70\x70\x65\x72\x46\x69\x72\x73\x74","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x69\x64","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x5B\x25\x73\x5D\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3D\x25\x73\x20\x62\x6F\x64\x79\x3D\x25\x73","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6E\x75\x6C\x6C","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x6E\x66\x6F","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x74\x72\x61\x63\x6B\x65\x64","\x75\x73\x65\x72","\x71\x75\x65\x72\x79","\x62\x6F\x64\x79","\x63\x6C\x6F\x6E\x65","\x68\x74\x6D\x6C","\x70\x68\x6F\x6E\x65","\x66\x61\x78","\x6D\x6F\x62\x69\x6C\x65","\x6F\x6D\x69\x74"];_0x23b9[0];var _=require(_0x23b9[1]);var db=require(_0x23b9[3])[_0x23b9[2]];var loggers={openchannel:require(_0x23b9[5])(_0x23b9[4]),mail:require(_0x23b9[5])(_0x23b9[6]),fax:require(_0x23b9[5])(_0x23b9[7]),sms:require(_0x23b9[5])(_0x23b9[8]),chat:require(_0x23b9[5])(_0x23b9[9])};function getInteractionId(_0xe337x5,_0xe337x6,_0xe337x7){if(_0xe337x5&& _0xe337x5[_[_0x23b9[10]](_0xe337x7)+ _0x23b9[11]]){return _0xe337x5[_[_0x23b9[10]](_0xe337x7)+ _0x23b9[11]]}else {if(_0xe337x5&& _0xe337x5[_0x23b9[12]]){return _0xe337x5[_0x23b9[12]]}else {if(_0xe337x6&& _0xe337x6[_0x23b9[12]]){return _0xe337x6[_0x23b9[12]]}else {return _0x23b9[13]}}}}function log(_0xe337x9,_0xe337xa,_0xe337x5,_0xe337x6,_0xe337x7,_0xe337xb){loggers[_0xe337x7[_0x23b9[20]]()][_0xe337x9](_0x23b9[14],_0xe337xb[_0x23b9[15]](),_0xe337xa?_0xe337xa[_0x23b9[12]]:null,_0xe337xa?_0xe337xa[_0x23b9[16]]:null,_0xe337xa?_0xe337xa[_0x23b9[17]]:null,getInteractionId(_0xe337x5,_0xe337x6,_0xe337x7),_0xe337x5?JSON[_0x23b9[18]](_0xe337x5):_0x23b9[19])}function updateUser(_0xe337xa,_0xe337x5,_0xe337x6,_0xe337x7,_0xe337xb){db[_[_0x23b9[10]](_0xe337x7)+ _0x23b9[27]][_0x23b9[26]]({where:{id:getInteractionId(_0xe337x5,_0xe337x6,_0xe337x7)}})[_0x23b9[24]](function(_0xe337xd){if(_0xe337xd){return _0xe337xd[_0x23b9[25]]({UserId:_0xe337xa[_0x23b9[12]]})}})[_0x23b9[24]](function(_0xe337xd){if(_0xe337xd){log(_0x23b9[23],_0xe337xa,_0xe337x5,_0xe337x6,_0xe337x7,_0xe337xb)}})[_0x23b9[22]](function(){log(_0x23b9[21],_0xe337xa,_0xe337x5,_0xe337x6,_0xe337x7,_0xe337xb)})}exports[_0x23b9[28]]= function(_0xe337x7,_0xe337xb){return function(_0xe337xe,_0xe337xf,_0xe337x10){var _0xe337xa=_0xe337xe[_0x23b9[29]];var _0xe337x5={};var _0xe337x6=_0xe337xe[_0x23b9[30]];if(_0xe337x5){_0xe337x5= _[_0x23b9[32]](_0xe337xe[_0x23b9[31]]);_0xe337x5= _[_0x23b9[37]](_0xe337x5,[_0x23b9[31],_0x23b9[33],_0x23b9[34],_0x23b9[35],_0x23b9[36]])};updateUser(_0xe337xa,_0xe337x5,_0xe337x6,_0xe337x7,_0xe337xb);_0xe337x10(null)}}
\ No newline at end of file
index 1cb5d26..5b1e265 100644 (file)
@@ -1 +1 @@
-var _0x298c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x63\x72\x79\x70\x74\x6F","\x75\x74\x69\x6C","\x63\x6F\x6D\x70\x6F\x73\x61\x62\x6C\x65\x2D\x6D\x69\x64\x64\x6C\x65\x77\x61\x72\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x61\x74\x61\x31","\x6C\x69\x63\x65\x6E\x73\x65","\x2D","\x73\x70\x6C\x69\x74","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x25\x73\x3A\x25\x73\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72","\x62\x61\x73\x65\x36\x34","\x75\x74\x66\x38","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x61\x6C","\x70\x61\x72\x73\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x63\x61\x74\x63\x68","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x25\x73\x20\x6C\x69\x6D\x69\x74\x20\x68\x61\x76\x65\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64","\x6A\x73\x6F\x6E","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x63\x6F\x75\x6E\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x4C\x69\x63\x65\x6E\x73\x65","\x75\x73\x65","\x75\x73\x65\x72\x73","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x69\x73\x55\x73\x65\x72\x4C\x69\x6D\x69\x74"];_0x298c[0];var crypto=require(_0x298c[1]);var util=require(_0x298c[2]);var compose=require(_0x298c[3]);var db=require(_0x298c[5])[_0x298c[4]];var config=require(_0x298c[6]);function getValueFromLicense(_0xcbc2x7,_0xcbc2x8){if(_0xcbc2x7&& _0xcbc2x8){if(_0xcbc2x8[_0x298c[7]]&& _0xcbc2x8[_0x298c[8]]){var _0xcbc2x9=_0xcbc2x8[_0x298c[7]];var _0xcbc2xa=_0xcbc2x8[_0x298c[8]];var _0xcbc2xb=_0xcbc2x9[_0x298c[10]](_0x298c[9])[4];var _0xcbc2xc=_0xcbc2x9[_0x298c[10]](_0x298c[9])[0];var _0xcbc2xd=crypto[_0x298c[14]](_0x298c[11],util[_0x298c[13]](_0x298c[12],_0xcbc2xb,_0xcbc2x9,_0xcbc2xc));var _0xcbc2xe=_0xcbc2xd[_0x298c[17]](_0xcbc2xa,_0x298c[15],_0x298c[16]);_0xcbc2xe+= _0xcbc2xd[_0x298c[18]](_0x298c[16]);var _0xcbc2xf=JSON[_0x298c[19]](_0xcbc2xe);return _0xcbc2xf[_0x298c[20]](_0xcbc2x7)?_0xcbc2xf[_0xcbc2x7]:null}};return null}function isLimit(_0xcbc2xa,_0xcbc2x11,_0xcbc2x12,_0xcbc2x13){var _0xcbc2x14=_0xcbc2x11;return compose()[_0x298c[29]](function(_0xcbc2x15,_0xcbc2x16,_0xcbc2x17){return db[_0x298c[28]][_0x298c[27]]({where:{id:1},raw:true})[_0x298c[25]](function(_0xcbc2x8){var _0xcbc2x1a=getValueFromLicense(_0xcbc2xa,_0xcbc2x8);return _0xcbc2x1a?_0xcbc2x1a:_0xcbc2x14})[_0x298c[25]](function(_0xcbc2x1a){_0xcbc2x14= _0xcbc2x1a;return _0xcbc2x12[_0x298c[26]](_0xcbc2x13)})[_0x298c[25]](function(_0xcbc2x19){if(_0xcbc2x19>= _0xcbc2x14){return _0xcbc2x16[_0x298c[24]](403)[_0x298c[23]]({message:util[_0x298c[13]](_0x298c[22],_0xcbc2xa)})};_0xcbc2x17()})[_0x298c[21]](function(_0xcbc2x18){_0xcbc2x17(_0xcbc2x18)})})}function isUserLimit(){return isLimit(_0x298c[30],1,db.User,{where:{$or:[{role:_0x298c[31]},{role:_0x298c[32]}]}})}exports[_0x298c[33]]= isUserLimit
\ No newline at end of file
+var _0x6fa1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x63\x72\x79\x70\x74\x6F","\x75\x74\x69\x6C","\x63\x6F\x6D\x70\x6F\x73\x61\x62\x6C\x65\x2D\x6D\x69\x64\x64\x6C\x65\x77\x61\x72\x65","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x61\x74\x61\x31","\x6C\x69\x63\x65\x6E\x73\x65","\x2D","\x73\x70\x6C\x69\x74","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x25\x73\x3A\x25\x73\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72","\x62\x61\x73\x65\x36\x34","\x75\x74\x66\x38","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x61\x6C","\x70\x61\x72\x73\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x63\x61\x74\x63\x68","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x25\x73\x20\x6C\x69\x6D\x69\x74\x20\x68\x61\x76\x65\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64","\x6A\x73\x6F\x6E","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x63\x6F\x75\x6E\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x4C\x69\x63\x65\x6E\x73\x65","\x75\x73\x65","\x75\x73\x65\x72\x73","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x69\x73\x55\x73\x65\x72\x4C\x69\x6D\x69\x74"];_0x6fa1[0];var crypto=require(_0x6fa1[1]);var util=require(_0x6fa1[2]);var compose=require(_0x6fa1[3]);var db=require(_0x6fa1[5])[_0x6fa1[4]];var config=require(_0x6fa1[6]);function getValueFromLicense(_0x98a4x7,_0x98a4x8){if(_0x98a4x7&& _0x98a4x8){if(_0x98a4x8[_0x6fa1[7]]&& _0x98a4x8[_0x6fa1[8]]){var _0x98a4x9=_0x98a4x8[_0x6fa1[7]];var _0x98a4xa=_0x98a4x8[_0x6fa1[8]];var _0x98a4xb=_0x98a4x9[_0x6fa1[10]](_0x6fa1[9])[4];var _0x98a4xc=_0x98a4x9[_0x6fa1[10]](_0x6fa1[9])[0];var _0x98a4xd=crypto[_0x6fa1[14]](_0x6fa1[11],util[_0x6fa1[13]](_0x6fa1[12],_0x98a4xb,_0x98a4x9,_0x98a4xc));var _0x98a4xe=_0x98a4xd[_0x6fa1[17]](_0x98a4xa,_0x6fa1[15],_0x6fa1[16]);_0x98a4xe+= _0x98a4xd[_0x6fa1[18]](_0x6fa1[16]);var _0x98a4xf=JSON[_0x6fa1[19]](_0x98a4xe);return _0x98a4xf[_0x6fa1[20]](_0x98a4x7)?_0x98a4xf[_0x98a4x7]:null}};return null}function isLimit(_0x98a4xa,_0x98a4x11,_0x98a4x12,_0x98a4x13){var _0x98a4x14=_0x98a4x11;return compose()[_0x6fa1[29]](function(_0x98a4x15,_0x98a4x16,_0x98a4x17){return db[_0x6fa1[28]][_0x6fa1[27]]({where:{id:1},raw:true})[_0x6fa1[25]](function(_0x98a4x8){var _0x98a4x1a=getValueFromLicense(_0x98a4xa,_0x98a4x8);return _0x98a4x1a?_0x98a4x1a:_0x98a4x14})[_0x6fa1[25]](function(_0x98a4x1a){_0x98a4x14= _0x98a4x1a;return _0x98a4x12[_0x6fa1[26]](_0x98a4x13)})[_0x6fa1[25]](function(_0x98a4x19){if(_0x98a4x19>= _0x98a4x14){return _0x98a4x16[_0x6fa1[24]](403)[_0x6fa1[23]]({message:util[_0x6fa1[13]](_0x6fa1[22],_0x98a4xa)})};_0x98a4x17()})[_0x6fa1[21]](function(_0x98a4x18){_0x98a4x17(_0x98a4x18)})})}function isUserLimit(){return isLimit(_0x6fa1[30],1,db.User,{where:{$or:[{role:_0x6fa1[31]},{role:_0x6fa1[32]}]}})}exports[_0x6fa1[33]]= isUserLimit
\ No newline at end of file
index 658a429..5bf9830 100644 (file)
@@ -1 +1 @@
-var _0xc76a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x69\x65\x6C\x64\x73","\x2C","\x73\x70\x6C\x69\x74","\x66\x69\x6C\x74\x65\x72\x73","\x69\x73\x45\x6D\x70\x74\x79","\x70\x61\x72\x73\x65","\x66\x6F\x72\x4F\x77\x6E","\x6C\x69\x6D\x69\x74","\x6F\x66\x66\x73\x65\x74","\x73\x6F\x72\x74","\x2D","\x69\x6E\x64\x65\x78\x4F\x66","\x70\x72\x69\x6F\x72\x69\x74\x79","\x63\x6F\x6C","\x75\x6E\x73\x69\x67\x6E\x65\x64","\x63\x61\x73\x74","\x73\x75\x62\x73\x74\x72","\x44\x45\x53\x43","\x41\x53\x43","\x6D\x61\x70","\x6F\x6D\x69\x74","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x69\x73\x4F\x62\x6A\x65\x63\x74","\x69\x73\x53\x74\x72\x69\x6E\x67","\x75\x6E\x73\x65\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79"];_0xc76a[0];var _=require(_0xc76a[1]);var sequelize=require(_0xc76a[2]);var LIMIT_VALUE=250;exports[_0xc76a[3]]= function(_0x30d9x4){var _0x30d9x5=null;if(_0x30d9x4){_0x30d9x5= _0x30d9x4[_0xc76a[5]](_0xc76a[4])};return _0x30d9x5};exports[_0xc76a[6]]= function(_0x30d9x4){var _0x30d9x6={};if(!_[_0xc76a[7]](_0x30d9x4)){_0x30d9x6= {};_[_0xc76a[9]](_0x30d9x4,function(_0x30d9x7,_0x30d9x8){try{_0x30d9x6[_0x30d9x8]= JSON[_0xc76a[8]](_0x30d9x7)}catch(err){_0x30d9x6[_0x30d9x8]= _0x30d9x7[_0xc76a[5]](_0xc76a[4])}})};return _0x30d9x6};exports[_0xc76a[10]]= function(_0x30d9x7){_0x30d9x7= parseInt(_0x30d9x7,10);if(!_0x30d9x7|| _0x30d9x7< 0){_0x30d9x7= LIMIT_VALUE};return _0x30d9x7};exports[_0xc76a[11]]= function(_0x30d9x7){_0x30d9x7= parseInt(_0x30d9x7,10);if(!_0x30d9x7|| _0x30d9x7< 0){_0x30d9x7= 0};return _0x30d9x7};exports[_0xc76a[12]]= function(_0x30d9x4){var _0x30d9x9,_0x30d9xa=null;if(_0x30d9x4){_0x30d9x9= _0x30d9x4[_0xc76a[5]](_0xc76a[4]);_0x30d9xa= _[_0xc76a[22]](_0x30d9x9,function(_0x30d9xb){if(_0x30d9xb[_0xc76a[14]](_0xc76a[13])=== 0){return [_0x30d9xb=== _0xc76a[15]?sequelize[_0xc76a[18]](sequelize[_0xc76a[16]](_0xc76a[15]),_0xc76a[17]):_0x30d9xb[_0xc76a[19]](1),_0xc76a[20]]}else {return [_0x30d9xb=== _0xc76a[15]?sequelize[_0xc76a[18]](sequelize[_0xc76a[16]](_0xc76a[15]),_0xc76a[17]):_0x30d9xb,_0xc76a[21]]}})};return _0x30d9xa};exports[_0xc76a[23]]= function(_0x30d9x7,_0x30d9xc){if(_[_0xc76a[7]](_0x30d9x7)){return _0x30d9x7};if(_[_0xc76a[24]](_0x30d9x7)){for(var _0x30d9xd=0;_0x30d9xd< _0x30d9x7[_0xc76a[25]];_0x30d9xd+= 1){_0x30d9x7[_0x30d9xd]= this[_0xc76a[23]](_0x30d9x7[_0x30d9xd],_0x30d9xc)};return _0x30d9x7};if(!_[_0xc76a[26]](_0x30d9x7)){return _0x30d9x7};if(_[_0xc76a[27]](_0x30d9xc)){_0x30d9xc= [_0x30d9xc]};if(!_[_0xc76a[24]](_0x30d9xc)){return _0x30d9x7};for(var _0x30d9xe=0;_0x30d9xe< _0x30d9xc[_0xc76a[25]];_0x30d9xe+= 1){_[_0xc76a[28]](_0x30d9x7,_0x30d9xc[_0x30d9xe])};for(var _0x30d9x8 in _0x30d9x7){if(_0x30d9x7[_0xc76a[29]](_0x30d9x8)){_0x30d9x7[_0x30d9x8]= this[_0xc76a[23]](_0x30d9x7[_0x30d9x8],_0x30d9xc)}};return _0x30d9x7}
\ No newline at end of file
+var _0x5711=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x69\x65\x6C\x64\x73","\x2C","\x73\x70\x6C\x69\x74","\x66\x69\x6C\x74\x65\x72\x73","\x69\x73\x45\x6D\x70\x74\x79","\x70\x61\x72\x73\x65","\x66\x6F\x72\x4F\x77\x6E","\x6C\x69\x6D\x69\x74","\x6F\x66\x66\x73\x65\x74","\x73\x6F\x72\x74","\x2D","\x69\x6E\x64\x65\x78\x4F\x66","\x70\x72\x69\x6F\x72\x69\x74\x79","\x63\x6F\x6C","\x75\x6E\x73\x69\x67\x6E\x65\x64","\x63\x61\x73\x74","\x73\x75\x62\x73\x74\x72","\x44\x45\x53\x43","\x41\x53\x43","\x6D\x61\x70","\x6F\x6D\x69\x74","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x69\x73\x4F\x62\x6A\x65\x63\x74","\x69\x73\x53\x74\x72\x69\x6E\x67","\x75\x6E\x73\x65\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79"];_0x5711[0];var _=require(_0x5711[1]);var sequelize=require(_0x5711[2]);var LIMIT_VALUE=250;exports[_0x5711[3]]= function(_0x563cx4){var _0x563cx5=null;if(_0x563cx4){_0x563cx5= _0x563cx4[_0x5711[5]](_0x5711[4])};return _0x563cx5};exports[_0x5711[6]]= function(_0x563cx4){var _0x563cx6={};if(!_[_0x5711[7]](_0x563cx4)){_0x563cx6= {};_[_0x5711[9]](_0x563cx4,function(_0x563cx7,_0x563cx8){try{_0x563cx6[_0x563cx8]= JSON[_0x5711[8]](_0x563cx7)}catch(err){_0x563cx6[_0x563cx8]= _0x563cx7[_0x5711[5]](_0x5711[4])}})};return _0x563cx6};exports[_0x5711[10]]= function(_0x563cx7){_0x563cx7= parseInt(_0x563cx7,10);if(!_0x563cx7|| _0x563cx7< 0){_0x563cx7= LIMIT_VALUE};return _0x563cx7};exports[_0x5711[11]]= function(_0x563cx7){_0x563cx7= parseInt(_0x563cx7,10);if(!_0x563cx7|| _0x563cx7< 0){_0x563cx7= 0};return _0x563cx7};exports[_0x5711[12]]= function(_0x563cx4){var _0x563cx9,_0x563cxa=null;if(_0x563cx4){_0x563cx9= _0x563cx4[_0x5711[5]](_0x5711[4]);_0x563cxa= _[_0x5711[22]](_0x563cx9,function(_0x563cxb){if(_0x563cxb[_0x5711[14]](_0x5711[13])=== 0){return [_0x563cxb=== _0x5711[15]?sequelize[_0x5711[18]](sequelize[_0x5711[16]](_0x5711[15]),_0x5711[17]):_0x563cxb[_0x5711[19]](1),_0x5711[20]]}else {return [_0x563cxb=== _0x5711[15]?sequelize[_0x5711[18]](sequelize[_0x5711[16]](_0x5711[15]),_0x5711[17]):_0x563cxb,_0x5711[21]]}})};return _0x563cxa};exports[_0x5711[23]]= function(_0x563cx7,_0x563cxc){if(_[_0x5711[7]](_0x563cx7)){return _0x563cx7};if(_[_0x5711[24]](_0x563cx7)){for(var _0x563cxd=0;_0x563cxd< _0x563cx7[_0x5711[25]];_0x563cxd+= 1){_0x563cx7[_0x563cxd]= this[_0x5711[23]](_0x563cx7[_0x563cxd],_0x563cxc)};return _0x563cx7};if(!_[_0x5711[26]](_0x563cx7)){return _0x563cx7};if(_[_0x5711[27]](_0x563cxc)){_0x563cxc= [_0x563cxc]};if(!_[_0x5711[24]](_0x563cxc)){return _0x563cx7};for(var _0x563cxe=0;_0x563cxe< _0x563cxc[_0x5711[25]];_0x563cxe+= 1){_[_0x5711[28]](_0x563cx7,_0x563cxc[_0x563cxe])};for(var _0x563cx8 in _0x563cx7){if(_0x563cx7[_0x5711[29]](_0x563cx8)){_0x563cx7[_0x563cx8]= this[_0x5711[23]](_0x563cx7[_0x563cx8],_0x563cxc)}};return _0x563cx7}
\ No newline at end of file
index 609c31f..40cd7fd 100644 (file)
@@ -1 +1 @@
-var _0x1679=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x73\x65\x72\x76\x65\x2D\x66\x61\x76\x69\x63\x6F\x6E","\x62\x6F\x64\x79\x2D\x70\x61\x72\x73\x65\x72","\x6D\x65\x74\x68\x6F\x64\x2D\x6F\x76\x65\x72\x72\x69\x64\x65","\x63\x6F\x6F\x6B\x69\x65\x2D\x70\x61\x72\x73\x65\x72","\x65\x72\x72\x6F\x72\x68\x61\x6E\x64\x6C\x65\x72","\x70\x61\x74\x68","\x70\x61\x73\x73\x70\x6F\x72\x74","\x65\x78\x70\x72\x65\x73\x73\x2D\x73\x65\x73\x73\x69\x6F\x6E","\x63\x6F\x72\x73","\x65\x78\x70\x72\x65\x73\x73\x2D\x73\x65\x71\x75\x65\x6C\x69\x7A\x65\x2D\x73\x65\x73\x73\x69\x6F\x6E","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x64\x65\x66\x61\x75\x6C\x74","\x65\x6E\x76","\x67\x65\x74","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x72\x6F\x6F\x74","\x70\x75\x62\x6C\x69\x63","\x66\x61\x76\x69\x63\x6F\x6E\x2E\x69\x63\x6F","\x6A\x6F\x69\x6E","\x75\x73\x65","\x61\x70\x70\x50\x61\x74\x68","\x73\x65\x74","\x64\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74","\x74\x65\x73\x74","\x63\x6C\x69\x65\x6E\x74","\x6A\x73\x6F\x6E\x20\x72\x65\x70\x6C\x61\x63\x65\x72","\x2E","\x73\x70\x6C\x69\x74","\x74\x6F\x49\x53\x4F\x53\x74\x72\x69\x6E\x67","\x5A","\x73\x74\x61\x74\x69\x63","\x76\x69\x65\x77\x73","\x2F\x73\x65\x72\x76\x65\x72\x2F\x76\x69\x65\x77\x73","\x68\x74\x6D\x6C","\x72\x65\x6E\x64\x65\x72\x46\x69\x6C\x65","\x65\x6A\x73","\x65\x6E\x67\x69\x6E\x65","\x76\x69\x65\x77\x20\x65\x6E\x67\x69\x6E\x65","\x35\x30\x6D\x62","\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x6A\x73\x6F\x6E","\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x73\x65\x73\x73\x69\x6F\x6E\x73","\x73\x79\x6E\x63","\x53\x65\x73\x73\x69\x6F\x6E","\x73\x65\x73\x73\x69\x6F\x6E","\x73\x65\x63\x72\x65\x74\x73"];_0x1679[0];var express=require(_0x1679[1]);var favicon=require(_0x1679[2]);var bodyParser=require(_0x1679[3]);var methodOverride=require(_0x1679[4]);var cookieParser=require(_0x1679[5]);var errorHandler=require(_0x1679[6]);var path=require(_0x1679[7]);var passport=require(_0x1679[8]);var session=require(_0x1679[9]);var cors=require(_0x1679[10]);var expressSequelizeSession=require(_0x1679[11]);var moment=require(_0x1679[12]);var config=require(_0x1679[13]);var db=require(_0x1679[15])[_0x1679[14]];var Store=expressSequelizeSession(session.Store);exports[_0x1679[16]]= function(_0xec45x10){var _0xec45x11=_0xec45x10[_0x1679[18]](_0x1679[17]);if(_0xec45x11=== _0x1679[19]){_0xec45x10[_0x1679[24]](favicon(path[_0x1679[23]](config[_0x1679[20]],_0x1679[21],_0x1679[22])));_0xec45x10[_0x1679[26]](_0x1679[25],path[_0x1679[23]](config[_0x1679[20]],_0x1679[21]))};if(_0xec45x11=== _0x1679[27]|| _0xec45x11=== _0x1679[28]){_0xec45x10[_0x1679[24]](favicon(path[_0x1679[23]](config[_0x1679[20]],_0x1679[29],_0x1679[22])));_0xec45x10[_0x1679[26]](_0x1679[25],path[_0x1679[23]](config[_0x1679[20]],_0x1679[29]));_0xec45x10[_0x1679[24]](errorHandler())};_0xec45x10[_0x1679[26]](_0x1679[30],function(_0xec45x12,_0xec45x13){if(this[_0xec45x12] instanceof  Date){_0xec45x13= this[_0xec45x12][_0x1679[33]]()[_0x1679[32]](_0x1679[31])[0]+ _0x1679[34]};return _0xec45x13});_0xec45x10[_0x1679[24]](express[_0x1679[35]](_0xec45x10[_0x1679[18]](_0x1679[25])));_0xec45x10[_0x1679[26]](_0x1679[36],config[_0x1679[20]]+ _0x1679[37]);_0xec45x10[_0x1679[41]](_0x1679[38],require(_0x1679[40])[_0x1679[39]]);_0xec45x10[_0x1679[26]](_0x1679[42],_0x1679[38]);_0xec45x10[_0x1679[24]](bodyParser[_0x1679[44]]({limit:_0x1679[43],extended:true}));_0xec45x10[_0x1679[24]](bodyParser[_0x1679[45]]({limit:_0x1679[43]}));_0xec45x10[_0x1679[24]](cors());_0xec45x10[_0x1679[24]](methodOverride());_0xec45x10[_0x1679[24]](cookieParser());_0xec45x10[_0x1679[24]](passport[_0x1679[46]]());var _0xec45x14= new Store(db[_0x1679[47]],_0x1679[48]);_0xec45x14[_0x1679[50]][_0x1679[49]]();_0xec45x10[_0x1679[24]](session({secret:config[_0x1679[52]][_0x1679[51]],saveUninitialized:true,resave:false,store:_0xec45x14}))}
\ No newline at end of file
+var _0x227f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x73\x65\x72\x76\x65\x2D\x66\x61\x76\x69\x63\x6F\x6E","\x62\x6F\x64\x79\x2D\x70\x61\x72\x73\x65\x72","\x6D\x65\x74\x68\x6F\x64\x2D\x6F\x76\x65\x72\x72\x69\x64\x65","\x63\x6F\x6F\x6B\x69\x65\x2D\x70\x61\x72\x73\x65\x72","\x65\x72\x72\x6F\x72\x68\x61\x6E\x64\x6C\x65\x72","\x70\x61\x74\x68","\x70\x61\x73\x73\x70\x6F\x72\x74","\x65\x78\x70\x72\x65\x73\x73\x2D\x73\x65\x73\x73\x69\x6F\x6E","\x63\x6F\x72\x73","\x65\x78\x70\x72\x65\x73\x73\x2D\x73\x65\x71\x75\x65\x6C\x69\x7A\x65\x2D\x73\x65\x73\x73\x69\x6F\x6E","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x64\x65\x66\x61\x75\x6C\x74","\x65\x6E\x76","\x67\x65\x74","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x72\x6F\x6F\x74","\x70\x75\x62\x6C\x69\x63","\x66\x61\x76\x69\x63\x6F\x6E\x2E\x69\x63\x6F","\x6A\x6F\x69\x6E","\x75\x73\x65","\x61\x70\x70\x50\x61\x74\x68","\x73\x65\x74","\x64\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74","\x74\x65\x73\x74","\x63\x6C\x69\x65\x6E\x74","\x6A\x73\x6F\x6E\x20\x72\x65\x70\x6C\x61\x63\x65\x72","\x2E","\x73\x70\x6C\x69\x74","\x74\x6F\x49\x53\x4F\x53\x74\x72\x69\x6E\x67","\x5A","\x73\x74\x61\x74\x69\x63","\x76\x69\x65\x77\x73","\x2F\x73\x65\x72\x76\x65\x72\x2F\x76\x69\x65\x77\x73","\x68\x74\x6D\x6C","\x72\x65\x6E\x64\x65\x72\x46\x69\x6C\x65","\x65\x6A\x73","\x65\x6E\x67\x69\x6E\x65","\x76\x69\x65\x77\x20\x65\x6E\x67\x69\x6E\x65","\x35\x30\x6D\x62","\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x6A\x73\x6F\x6E","\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x73\x65\x73\x73\x69\x6F\x6E\x73","\x73\x79\x6E\x63","\x53\x65\x73\x73\x69\x6F\x6E","\x73\x65\x73\x73\x69\x6F\x6E","\x73\x65\x63\x72\x65\x74\x73"];_0x227f[0];var express=require(_0x227f[1]);var favicon=require(_0x227f[2]);var bodyParser=require(_0x227f[3]);var methodOverride=require(_0x227f[4]);var cookieParser=require(_0x227f[5]);var errorHandler=require(_0x227f[6]);var path=require(_0x227f[7]);var passport=require(_0x227f[8]);var session=require(_0x227f[9]);var cors=require(_0x227f[10]);var expressSequelizeSession=require(_0x227f[11]);var moment=require(_0x227f[12]);var config=require(_0x227f[13]);var db=require(_0x227f[15])[_0x227f[14]];var Store=expressSequelizeSession(session.Store);exports[_0x227f[16]]= function(_0x8395x10){var _0x8395x11=_0x8395x10[_0x227f[18]](_0x227f[17]);if(_0x8395x11=== _0x227f[19]){_0x8395x10[_0x227f[24]](favicon(path[_0x227f[23]](config[_0x227f[20]],_0x227f[21],_0x227f[22])));_0x8395x10[_0x227f[26]](_0x227f[25],path[_0x227f[23]](config[_0x227f[20]],_0x227f[21]))};if(_0x8395x11=== _0x227f[27]|| _0x8395x11=== _0x227f[28]){_0x8395x10[_0x227f[24]](favicon(path[_0x227f[23]](config[_0x227f[20]],_0x227f[29],_0x227f[22])));_0x8395x10[_0x227f[26]](_0x227f[25],path[_0x227f[23]](config[_0x227f[20]],_0x227f[29]));_0x8395x10[_0x227f[24]](errorHandler())};_0x8395x10[_0x227f[26]](_0x227f[30],function(_0x8395x12,_0x8395x13){if(this[_0x8395x12] instanceof  Date){_0x8395x13= this[_0x8395x12][_0x227f[33]]()[_0x227f[32]](_0x227f[31])[0]+ _0x227f[34]};return _0x8395x13});_0x8395x10[_0x227f[24]](express[_0x227f[35]](_0x8395x10[_0x227f[18]](_0x227f[25])));_0x8395x10[_0x227f[26]](_0x227f[36],config[_0x227f[20]]+ _0x227f[37]);_0x8395x10[_0x227f[41]](_0x227f[38],require(_0x227f[40])[_0x227f[39]]);_0x8395x10[_0x227f[26]](_0x227f[42],_0x227f[38]);_0x8395x10[_0x227f[24]](bodyParser[_0x227f[44]]({limit:_0x227f[43],extended:true}));_0x8395x10[_0x227f[24]](bodyParser[_0x227f[45]]({limit:_0x227f[43]}));_0x8395x10[_0x227f[24]](cors());_0x8395x10[_0x227f[24]](methodOverride());_0x8395x10[_0x227f[24]](cookieParser());_0x8395x10[_0x227f[24]](passport[_0x227f[46]]());var _0x8395x14= new Store(db[_0x227f[47]],_0x227f[48]);_0x8395x14[_0x227f[50]][_0x227f[49]]();_0x8395x10[_0x227f[24]](session({secret:config[_0x227f[52]][_0x227f[51]],saveUninitialized:true,resave:false,store:_0x8395x14}))}
\ No newline at end of file
index 9a8fe93..6de080d 100644 (file)
@@ -1 +1 @@
-var _0x16e8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6F\x73","\x63\x72\x79\x70\x74\x6F","\x62\x69\x6D\x65\x64\x69\x61\x2D\x6D\x61\x63\x68\x69\x6E\x65\x2D\x75\x75\x69\x64","\x65\x78\x65\x63\x53\x79\x6E\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x6E\x65\x74\x77\x6F\x72\x6B\x49\x6E\x74\x65\x72\x66\x61\x63\x65\x73","\x6B\x65\x79\x73","\x6F\x72\x64\x65\x72\x42\x79","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x6D\x69\x6C\x79","\x49\x50\x76\x34","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x66\x69\x6C\x74\x65\x72","\x63\x6F\x6E\x63\x61\x74","\x68\x65\x61\x64","\x6D\x61\x63","\x30\x30\x3A\x30\x30\x3A\x30\x30\x3A\x30\x30\x3A\x30\x30\x3A\x30\x30","\x61\x64\x64\x72\x65\x73\x73","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31","\x3A","\x6A\x6F\x69\x6E","\x6D\x6F\x64\x65\x6C","\x6D\x61\x70","\x63\x70\x75\x73","\x68\x65\x78","\x64\x69\x67\x65\x73\x74","\x75\x70\x64\x61\x74\x65","\x6D\x64\x35","\x63\x72\x65\x61\x74\x65\x48\x61\x73\x68","\x67\x65\x74\x55\x75\x69\x64","\x0D\x0A","","\x72\x65\x70\x6C\x61\x63\x65","\x64\x6D\x69\x64\x65\x63\x6F\x64\x65\x20\x2D\x2D\x73\x74\x72\x69\x6E\x67\x20\x73\x79\x73\x74\x65\x6D\x2D\x75\x75\x69\x64","\x75\x74\x66\x38","\x77\x69\x6E\x33\x32","\x7C","\x68\x6F\x73\x74\x6E\x61\x6D\x65","\x6D\x61\x63\x41\x64\x64\x72\x65\x73\x73","\x69\x70\x41\x64\x64\x72\x65\x73\x73","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x2D","\x70\x6C\x61\x74\x66\x6F\x72\x6D"];_0x16e8[0];var _=require(_0x16e8[1]);var os=require(_0x16e8[2]);var crypto=require(_0x16e8[3]);var machine=require(_0x16e8[4]);var exec=require(_0x16e8[6])[_0x16e8[5]];function getInterfaces(){var _0x8657x7=[];var _0x8657x8=os[_0x16e8[7]]();var _0x8657x9=_[_0x16e8[9]](_[_0x16e8[8]](_0x8657x8));for(var _0x8657xa=0;_0x8657xa< _0x8657x9[_0x16e8[10]];_0x8657xa++){var _0x8657xb=_0x8657x8[_0x8657x9[_0x8657xa]][_0x16e8[14]](function(_0x8657xc){return _0x8657xc[_0x16e8[11]]=== _0x16e8[12]&& _0x8657xc[_0x16e8[13]]=== false});_0x8657x7= _0x8657x7[_0x16e8[15]](_0x8657xb)};return _0x8657x7}function getFirstInterface(){var _0x8657xb=_[_0x16e8[16]](getInterfaces());return {macAddress:_0x8657xb&& _0x8657xb[_0x16e8[17]]?_0x8657xb[_0x16e8[17]]:_0x16e8[18],ipAddress:_0x8657xb&& _0x8657xb[_0x16e8[19]]?_0x8657xb[_0x16e8[19]]:_0x16e8[20]}}function getCPUhash(){var _0x8657xf=_[_0x16e8[9]](os[_0x16e8[25]]()[_0x16e8[24]](function(_0x8657x10){return _0x8657x10[_0x16e8[23]]}))[_0x16e8[22]](_0x16e8[21]);return crypto[_0x16e8[30]](_0x16e8[29])[_0x16e8[28]](_0x8657xf)[_0x16e8[27]](_0x16e8[26])}exports[_0x16e8[31]]= function(){switch(os[_0x16e8[44]]()){case _0x16e8[37]:return exec(_0x16e8[35],{encoding:_0x16e8[36]})[_0x16e8[34]](_0x16e8[32],_0x16e8[33]);default:var _0x8657x11=getFirstInterface();var _0x8657x10=getCPUhash();var _0x8657x12=_0x8657x10+ _0x16e8[38]+ os[_0x16e8[39]]()+ _0x16e8[38]+ _0x8657x11[_0x16e8[40]]+ _0x16e8[38]+ _0x8657x11[_0x16e8[41]];var _0x8657x13=crypto[_0x16e8[30]](_0x16e8[29])[_0x16e8[28]](_0x8657x12)[_0x16e8[27]](_0x16e8[26]);return _0x8657x13[_0x16e8[42]](0,8)+ _0x16e8[43]+ _0x8657x13[_0x16e8[42]](8,12)+ _0x16e8[43]+ _0x8657x13[_0x16e8[42]](12,16)+ _0x16e8[43]+ _0x8657x13[_0x16e8[42]](16,20)+ _0x16e8[43]+ _0x8657x13[_0x16e8[42]](20)}}
\ No newline at end of file
+var _0xee66=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6F\x73","\x63\x72\x79\x70\x74\x6F","\x62\x69\x6D\x65\x64\x69\x61\x2D\x6D\x61\x63\x68\x69\x6E\x65\x2D\x75\x75\x69\x64","\x65\x78\x65\x63\x53\x79\x6E\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x6E\x65\x74\x77\x6F\x72\x6B\x49\x6E\x74\x65\x72\x66\x61\x63\x65\x73","\x6B\x65\x79\x73","\x6F\x72\x64\x65\x72\x42\x79","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x6D\x69\x6C\x79","\x49\x50\x76\x34","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x66\x69\x6C\x74\x65\x72","\x63\x6F\x6E\x63\x61\x74","\x68\x65\x61\x64","\x6D\x61\x63","\x30\x30\x3A\x30\x30\x3A\x30\x30\x3A\x30\x30\x3A\x30\x30\x3A\x30\x30","\x61\x64\x64\x72\x65\x73\x73","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31","\x3A","\x6A\x6F\x69\x6E","\x6D\x6F\x64\x65\x6C","\x6D\x61\x70","\x63\x70\x75\x73","\x68\x65\x78","\x64\x69\x67\x65\x73\x74","\x75\x70\x64\x61\x74\x65","\x6D\x64\x35","\x63\x72\x65\x61\x74\x65\x48\x61\x73\x68","\x67\x65\x74\x55\x75\x69\x64","\x0D\x0A","","\x72\x65\x70\x6C\x61\x63\x65","\x64\x6D\x69\x64\x65\x63\x6F\x64\x65\x20\x2D\x2D\x73\x74\x72\x69\x6E\x67\x20\x73\x79\x73\x74\x65\x6D\x2D\x75\x75\x69\x64","\x75\x74\x66\x38","\x77\x69\x6E\x33\x32","\x7C","\x68\x6F\x73\x74\x6E\x61\x6D\x65","\x6D\x61\x63\x41\x64\x64\x72\x65\x73\x73","\x69\x70\x41\x64\x64\x72\x65\x73\x73","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x2D","\x70\x6C\x61\x74\x66\x6F\x72\x6D"];_0xee66[0];var _=require(_0xee66[1]);var os=require(_0xee66[2]);var crypto=require(_0xee66[3]);var machine=require(_0xee66[4]);var exec=require(_0xee66[6])[_0xee66[5]];function getInterfaces(){var _0x75e6x7=[];var _0x75e6x8=os[_0xee66[7]]();var _0x75e6x9=_[_0xee66[9]](_[_0xee66[8]](_0x75e6x8));for(var _0x75e6xa=0;_0x75e6xa< _0x75e6x9[_0xee66[10]];_0x75e6xa++){var _0x75e6xb=_0x75e6x8[_0x75e6x9[_0x75e6xa]][_0xee66[14]](function(_0x75e6xc){return _0x75e6xc[_0xee66[11]]=== _0xee66[12]&& _0x75e6xc[_0xee66[13]]=== false});_0x75e6x7= _0x75e6x7[_0xee66[15]](_0x75e6xb)};return _0x75e6x7}function getFirstInterface(){var _0x75e6xb=_[_0xee66[16]](getInterfaces());return {macAddress:_0x75e6xb&& _0x75e6xb[_0xee66[17]]?_0x75e6xb[_0xee66[17]]:_0xee66[18],ipAddress:_0x75e6xb&& _0x75e6xb[_0xee66[19]]?_0x75e6xb[_0xee66[19]]:_0xee66[20]}}function getCPUhash(){var _0x75e6xf=_[_0xee66[9]](os[_0xee66[25]]()[_0xee66[24]](function(_0x75e6x10){return _0x75e6x10[_0xee66[23]]}))[_0xee66[22]](_0xee66[21]);return crypto[_0xee66[30]](_0xee66[29])[_0xee66[28]](_0x75e6xf)[_0xee66[27]](_0xee66[26])}exports[_0xee66[31]]= function(){switch(os[_0xee66[44]]()){case _0xee66[37]:return exec(_0xee66[35],{encoding:_0xee66[36]})[_0xee66[34]](_0xee66[32],_0xee66[33]);default:var _0x75e6x11=getFirstInterface();var _0x75e6x10=getCPUhash();var _0x75e6x12=_0x75e6x10+ _0xee66[38]+ os[_0xee66[39]]()+ _0xee66[38]+ _0x75e6x11[_0xee66[40]]+ _0xee66[38]+ _0x75e6x11[_0xee66[41]];var _0x75e6x13=crypto[_0xee66[30]](_0xee66[29])[_0xee66[28]](_0x75e6x12)[_0xee66[27]](_0xee66[26]);return _0x75e6x13[_0xee66[42]](0,8)+ _0xee66[43]+ _0x75e6x13[_0xee66[42]](8,12)+ _0xee66[43]+ _0x75e6x13[_0xee66[42]](12,16)+ _0xee66[43]+ _0x75e6x13[_0xee66[42]](16,20)+ _0xee66[43]+ _0x75e6x13[_0xee66[42]](20)}}
\ No newline at end of file
index 9775623..5a883ea 100644 (file)
@@ -1 +1 @@
-var _0x822c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x68\x74\x74\x70\x73","\x63\x72\x79\x70\x74\x6F","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x76\x65\x72\x73\x69\x6F\x6E","\x70\x6B\x67\x69\x6E\x66\x6F","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x68\x61\x72\x64\x77\x61\x72\x65","\x6C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72","\x77\x77\x77\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D","\x2F\x61\x70\x69\x2F\x73\x65\x72\x76\x65\x72\x73\x2F\x25\x73\x2F\x63\x68\x65\x63\x6B\x3F\x76\x65\x72\x73\x69\x6F\x6E\x3D\x25\x73","\x65\x78\x70\x6F\x72\x74\x73","\x66\x6F\x72\x6D\x61\x74","\x47\x45\x54","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x75\x74\x66\x38","\x73\x65\x74\x45\x6E\x63\x6F\x64\x69\x6E\x67","","\x64\x61\x74\x61","\x6F\x6E","\x65\x6E\x64","\x70\x61\x72\x73\x65","\x72\x65\x71\x75\x65\x73\x74","\x65\x72\x72\x6F\x72","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x73\x65\x73\x73\x69\x6F\x6E","\x73\x65\x63\x72\x65\x74\x73","\x63\x72\x65\x61\x74\x65\x43\x69\x70\x68\x65\x72","\x62\x61\x73\x65\x36\x34","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x61\x6C","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72","\x67\x65\x74","\x66\x69\x6E\x61\x6C\x6C\x79","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x61\x63\x74\x69\x76\x65","\x64\x61\x74\x61\x32","\x64\x61\x79\x73","\x64\x69\x66\x66","\x64\x65\x6D\x6F","\x69\x6E\x66\x6F","\x73\x74\x61\x72\x74\x20\x67\x72\x61\x79\x20\x70\x65\x72\x69\x6F\x64","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D","\x67\x65\x74\x55\x75\x69\x64","\x73\x74\x61\x72\x74\x20\x63\x68\x65\x63\x6B\x20\x6C\x69\x63\x65\x6E\x73\x65","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x4C\x69\x63\x65\x6E\x73\x65","\x64\x65\x66\x61\x75\x6C\x74"];_0x822c[0];var util=require(_0x822c[1]);var https=require(_0x822c[2]);var crypto=require(_0x822c[3]);var moment=require(_0x822c[4]);var BPromise=require(_0x822c[5]);var pkginfo=require(_0x822c[7])(module,_0x822c[6]);var db=require(_0x822c[9])[_0x822c[8]];var config=require(_0x822c[10]);var hardware=require(_0x822c[11]);var logger=require(_0x822c[13])(_0x822c[12]);var HOST=_0x822c[14];var TIME=60* 1000;var DAYS=7;function httpRequest(_0xee9bxf){return  new BPromise(function(_0xee9bx10,_0xee9bx11){var _0xee9bx12={host:HOST,port:443,path:util[_0x822c[17]](_0x822c[15],_0xee9bxf,module[_0x822c[16]][_0x822c[6]]),method:_0x822c[18],headers:{"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x822c[19]}};var _0xee9bx13=https[_0x822c[27]](_0xee9bx12,function(_0xee9bx14){_0xee9bx14[_0x822c[21]](_0x822c[20]);var _0xee9bx15=_0x822c[22];_0xee9bx14[_0x822c[24]](_0x822c[23],function(_0xee9bx16){_0xee9bx15+= _0xee9bx16});_0xee9bx14[_0x822c[24]](_0x822c[25],function(){try{_0xee9bx10(JSON[_0x822c[26]](_0xee9bx15))}catch(e){_0xee9bx11(e)}})});_0xee9bx13[_0x822c[24]](_0x822c[28],_0xee9bx11);_0xee9bx13[_0x822c[25]]()})}function encryptDate(_0xee9bx18){var _0xee9bx19=crypto[_0x822c[32]](_0x822c[29],config[_0x822c[31]][_0x822c[30]]);var _0xee9bx1a=_0xee9bx19[_0x822c[34]](_0xee9bx18,_0x822c[20],_0x822c[33]);_0xee9bx1a+= _0xee9bx19[_0x822c[35]](_0x822c[33]);return _0xee9bx1a}function decryptDate(_0xee9bx18){var _0xee9bx1c=crypto[_0x822c[36]](_0x822c[29],config[_0x822c[31]][_0x822c[30]]);var _0xee9bx1a=_0xee9bx1c[_0x822c[34]](_0xee9bx18,_0x822c[33],_0x822c[20]);_0xee9bx1a+= _0xee9bx1c[_0x822c[35]](_0x822c[20]);return _0xee9bx1a}function manageLicense(_0xee9bxf,_0xee9bx1e){var _0xee9bx1f=_0xee9bx1e[_0x822c[37]]({plain:true});httpRequest(_0xee9bxf)[_0x822c[41]](function(_0xee9bx22){if(_0xee9bx22[_0x822c[42]]){return _0xee9bx1e[_0x822c[34]]({data1:_0xee9bxf,data2:null,license:_0xee9bx22[_0x822c[12]]})}else {if(_0xee9bx1f[_0x822c[43]]){if(moment()[_0x822c[45]](decryptDate(_0xee9bx1f[_0x822c[43]]),_0x822c[44])> DAYS){logger[_0x822c[47]](_0x822c[46]);return _0xee9bx1e[_0x822c[34]]({data1:_0xee9bxf,data2:null,license:null})}}else {if(_0xee9bx1f[_0x822c[12]]){logger[_0x822c[47]](_0x822c[48]);return _0xee9bx1e[_0x822c[34]]({data2:encryptDate(moment()[_0x822c[17]](_0x822c[49]))})}}};return _0xee9bx1e})[_0x822c[41]](function(_0xee9bx21){_0xee9bx1e= _0xee9bx21})[_0x822c[40]](function(_0xee9bx20){logger[_0x822c[28]](JSON[_0x822c[39]](_0xee9bx20))})[_0x822c[38]](function(){setTimeout(function(){manageLicense(_0xee9bxf,_0xee9bx1e)},TIME)})}function defaultLicense(){var _0xee9bxf=hardware[_0x822c[50]]();if(_0xee9bxf){return db[_0x822c[54]][_0x822c[53]]({where:{id:1},defaults:{data1:_0xee9bxf}})[_0x822c[52]](function(_0xee9bx1e,_0xee9bx24){logger[_0x822c[47]](_0x822c[51]);manageLicense(_0xee9bxf,_0xee9bx1e)})[_0x822c[40]](function(_0xee9bx20){logger[_0x822c[28]](JSON[_0x822c[39]](_0xee9bx20))})}}exports[_0x822c[55]]= defaultLicense
\ No newline at end of file
+var _0xe78e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x68\x74\x74\x70\x73","\x63\x72\x79\x70\x74\x6F","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x76\x65\x72\x73\x69\x6F\x6E","\x70\x6B\x67\x69\x6E\x66\x6F","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x68\x61\x72\x64\x77\x61\x72\x65","\x6C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72","\x77\x77\x77\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D","\x2F\x61\x70\x69\x2F\x73\x65\x72\x76\x65\x72\x73\x2F\x25\x73\x2F\x63\x68\x65\x63\x6B\x3F\x76\x65\x72\x73\x69\x6F\x6E\x3D\x25\x73","\x65\x78\x70\x6F\x72\x74\x73","\x66\x6F\x72\x6D\x61\x74","\x47\x45\x54","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x75\x74\x66\x38","\x73\x65\x74\x45\x6E\x63\x6F\x64\x69\x6E\x67","","\x64\x61\x74\x61","\x6F\x6E","\x65\x6E\x64","\x70\x61\x72\x73\x65","\x72\x65\x71\x75\x65\x73\x74","\x65\x72\x72\x6F\x72","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x73\x65\x73\x73\x69\x6F\x6E","\x73\x65\x63\x72\x65\x74\x73","\x63\x72\x65\x61\x74\x65\x43\x69\x70\x68\x65\x72","\x62\x61\x73\x65\x36\x34","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x61\x6C","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72","\x67\x65\x74","\x66\x69\x6E\x61\x6C\x6C\x79","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x61\x63\x74\x69\x76\x65","\x64\x61\x74\x61\x32","\x64\x61\x79\x73","\x64\x69\x66\x66","\x64\x65\x6D\x6F","\x69\x6E\x66\x6F","\x73\x74\x61\x72\x74\x20\x67\x72\x61\x79\x20\x70\x65\x72\x69\x6F\x64","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D","\x67\x65\x74\x55\x75\x69\x64","\x73\x74\x61\x72\x74\x20\x63\x68\x65\x63\x6B\x20\x6C\x69\x63\x65\x6E\x73\x65","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x4C\x69\x63\x65\x6E\x73\x65","\x64\x65\x66\x61\x75\x6C\x74"];_0xe78e[0];var util=require(_0xe78e[1]);var https=require(_0xe78e[2]);var crypto=require(_0xe78e[3]);var moment=require(_0xe78e[4]);var BPromise=require(_0xe78e[5]);var pkginfo=require(_0xe78e[7])(module,_0xe78e[6]);var db=require(_0xe78e[9])[_0xe78e[8]];var config=require(_0xe78e[10]);var hardware=require(_0xe78e[11]);var logger=require(_0xe78e[13])(_0xe78e[12]);var HOST=_0xe78e[14];var TIME=60* 1000;var DAYS=7;function httpRequest(_0x7298xf){return  new BPromise(function(_0x7298x10,_0x7298x11){var _0x7298x12={host:HOST,port:443,path:util[_0xe78e[17]](_0xe78e[15],_0x7298xf,module[_0xe78e[16]][_0xe78e[6]]),method:_0xe78e[18],headers:{"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xe78e[19]}};var _0x7298x13=https[_0xe78e[27]](_0x7298x12,function(_0x7298x14){_0x7298x14[_0xe78e[21]](_0xe78e[20]);var _0x7298x15=_0xe78e[22];_0x7298x14[_0xe78e[24]](_0xe78e[23],function(_0x7298x16){_0x7298x15+= _0x7298x16});_0x7298x14[_0xe78e[24]](_0xe78e[25],function(){try{_0x7298x10(JSON[_0xe78e[26]](_0x7298x15))}catch(e){_0x7298x11(e)}})});_0x7298x13[_0xe78e[24]](_0xe78e[28],_0x7298x11);_0x7298x13[_0xe78e[25]]()})}function encryptDate(_0x7298x18){var _0x7298x19=crypto[_0xe78e[32]](_0xe78e[29],config[_0xe78e[31]][_0xe78e[30]]);var _0x7298x1a=_0x7298x19[_0xe78e[34]](_0x7298x18,_0xe78e[20],_0xe78e[33]);_0x7298x1a+= _0x7298x19[_0xe78e[35]](_0xe78e[33]);return _0x7298x1a}function decryptDate(_0x7298x18){var _0x7298x1c=crypto[_0xe78e[36]](_0xe78e[29],config[_0xe78e[31]][_0xe78e[30]]);var _0x7298x1a=_0x7298x1c[_0xe78e[34]](_0x7298x18,_0xe78e[33],_0xe78e[20]);_0x7298x1a+= _0x7298x1c[_0xe78e[35]](_0xe78e[20]);return _0x7298x1a}function manageLicense(_0x7298xf,_0x7298x1e){var _0x7298x1f=_0x7298x1e[_0xe78e[37]]({plain:true});httpRequest(_0x7298xf)[_0xe78e[41]](function(_0x7298x22){if(_0x7298x22[_0xe78e[42]]){return _0x7298x1e[_0xe78e[34]]({data1:_0x7298xf,data2:null,license:_0x7298x22[_0xe78e[12]]})}else {if(_0x7298x1f[_0xe78e[43]]){if(moment()[_0xe78e[45]](decryptDate(_0x7298x1f[_0xe78e[43]]),_0xe78e[44])> DAYS){logger[_0xe78e[47]](_0xe78e[46]);return _0x7298x1e[_0xe78e[34]]({data1:_0x7298xf,data2:null,license:null})}}else {if(_0x7298x1f[_0xe78e[12]]){logger[_0xe78e[47]](_0xe78e[48]);return _0x7298x1e[_0xe78e[34]]({data2:encryptDate(moment()[_0xe78e[17]](_0xe78e[49]))})}}};return _0x7298x1e})[_0xe78e[41]](function(_0x7298x21){_0x7298x1e= _0x7298x21})[_0xe78e[40]](function(_0x7298x20){logger[_0xe78e[28]](JSON[_0xe78e[39]](_0x7298x20))})[_0xe78e[38]](function(){setTimeout(function(){manageLicense(_0x7298xf,_0x7298x1e)},TIME)})}function defaultLicense(){var _0x7298xf=hardware[_0xe78e[50]]();if(_0x7298xf){return db[_0xe78e[54]][_0xe78e[53]]({where:{id:1},defaults:{data1:_0x7298xf}})[_0xe78e[52]](function(_0x7298x1e,_0x7298x24){logger[_0xe78e[47]](_0xe78e[51]);manageLicense(_0x7298xf,_0x7298x1e)})[_0xe78e[40]](function(_0x7298x20){logger[_0xe78e[28]](JSON[_0xe78e[39]](_0x7298x20))})}}exports[_0xe78e[55]]= defaultLicense
\ No newline at end of file
index 264ce10..a2a4650 100644 (file)
@@ -1 +1 @@
-var _0x4a65=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x63\x72\x79\x70\x74\x6F","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x2E\x2F\x68\x61\x72\x64\x77\x61\x72\x65","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x65\x78\x70\x6F\x72\x74\x73","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x2D","\x73\x70\x6C\x69\x74","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x25\x73\x3A\x25\x73\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72","\x62\x61\x73\x65\x36\x34","\x75\x74\x66\x38","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x61\x6C","\x70\x61\x72\x73\x65","\x75\x75\x69\x64","\x73\x65\x73\x73\x69\x6F\x6E","\x73\x65\x63\x72\x65\x74\x73","\x67\x72\x61\x79","\x64\x65\x6D\x6F","\x6D\x61\x63\x68\x69\x6E\x65\x55\x75\x69\x64","\x67\x65\x74\x55\x75\x69\x64","\x32\x30\x32\x37\x2D\x30\x31\x2D\x30\x31\x54\x30\x30\x3A\x30\x30\x3A\x30\x30\x2E\x30\x30\x30\x5A","\x42\x72\x65\x61\x6B\x69\x6E\x67\x20\x6C\x69\x63\x65\x6E\x73\x65","\x6D\x65\x73\x73\x61\x67\x65","\x44\x65\x6D\x6F\x20\x6C\x69\x63\x65\x6E\x73\x65","\x74\x68\x65\x6E","\x64\x65\x66\x61\x75\x6C\x74\x73","\x66\x69\x6E\x64","\x4C\x69\x63\x65\x6E\x73\x65"];_0x4a65[0];var crypto=require(_0x4a65[1]);var util=require(_0x4a65[2]);var _=require(_0x4a65[3]);var hardware=require(_0x4a65[4]);var config=require(_0x4a65[5]);var db=require(_0x4a65[7])[_0x4a65[6]];module[_0x4a65[8]]= {getLicense:function(_0xfbdax7){return db[_0x4a65[37]][_0x4a65[36]](_[_0x4a65[35]](_0xfbdax7,{raw:true,where:{id:1}}))[_0x4a65[34]](function(_0xfbdax8){if(_0xfbdax8[_0x4a65[9]]&& _0xfbdax8[_0x4a65[10]]){try{var _0xfbdax9=_0xfbdax8[_0x4a65[9]];var _0xfbdaxa=_0xfbdax8[_0x4a65[10]];var _0xfbdaxb=_0xfbdax8[_0x4a65[11]];var _0xfbdaxc=_0xfbdaxa[_0x4a65[13]](_0x4a65[12])[4];var _0xfbdaxd=_0xfbdaxa[_0x4a65[13]](_0x4a65[12])[0];var _0xfbdaxe=crypto[_0x4a65[17]](_0x4a65[14],util[_0x4a65[16]](_0x4a65[15],_0xfbdaxc,_0xfbdaxa,_0xfbdaxd));var _0xfbdaxf=_0xfbdaxe[_0x4a65[20]](_0xfbdax9,_0x4a65[18],_0x4a65[19]);_0xfbdaxf+= _0xfbdaxe[_0x4a65[21]](_0x4a65[19]);var _0xfbdax10=JSON[_0x4a65[22]](_0xfbdaxf);_0xfbdax10[_0x4a65[23]]= _0xfbdaxa;if(_0xfbdaxb){var _0xfbdax11=crypto[_0x4a65[17]](_0x4a65[14],config[_0x4a65[25]][_0x4a65[24]]);var _0xfbdax12=_0xfbdax11[_0x4a65[20]](_0xfbdaxb,_0x4a65[18],_0x4a65[19]);_0xfbdax12+= _0xfbdax11[_0x4a65[21]](_0x4a65[19]);_0xfbdax10[_0x4a65[26]]= _0xfbdax12};_0xfbdax10[_0x4a65[27]]= false;_0xfbdax10[_0x4a65[28]]= hardware[_0x4a65[29]]();return _0xfbdax10}catch(err){return {breaking:true,demo:true,agents:2,telephones:0,users:1,expiration:_0x4a65[30],chat:false,mail:false,fax:false,messaging:false,cm:false,dialer:false,jscripty:false,openchannel:false,callysquare:2,webrtc:false,custom:false,update:false,description:_0x4a65[31],uuid:_0xfbdax8[_0x4a65[10]],machineUuid:hardware[_0x4a65[29]](),message:err[_0x4a65[32]]}}};return {demo:true,agents:2,telephones:0,users:1,expiration:_0x4a65[30],chat:false,mail:false,fax:false,messaging:false,cm:false,dialer:false,jscripty:false,openchannel:false,callysquare:2,webrtc:false,custom:false,update:false,description:_0x4a65[33],uuid:_0xfbdax8[_0x4a65[10]],machineUuid:hardware[_0x4a65[29]]()}})}}
\ No newline at end of file
+var _0x23a7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x63\x72\x79\x70\x74\x6F","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x2E\x2F\x68\x61\x72\x64\x77\x61\x72\x65","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x65\x78\x70\x6F\x72\x74\x73","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x2D","\x73\x70\x6C\x69\x74","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x25\x73\x3A\x25\x73\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72","\x62\x61\x73\x65\x36\x34","\x75\x74\x66\x38","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x61\x6C","\x70\x61\x72\x73\x65","\x75\x75\x69\x64","\x73\x65\x73\x73\x69\x6F\x6E","\x73\x65\x63\x72\x65\x74\x73","\x67\x72\x61\x79","\x64\x65\x6D\x6F","\x6D\x61\x63\x68\x69\x6E\x65\x55\x75\x69\x64","\x67\x65\x74\x55\x75\x69\x64","\x32\x30\x32\x37\x2D\x30\x31\x2D\x30\x31\x54\x30\x30\x3A\x30\x30\x3A\x30\x30\x2E\x30\x30\x30\x5A","\x42\x72\x65\x61\x6B\x69\x6E\x67\x20\x6C\x69\x63\x65\x6E\x73\x65","\x6D\x65\x73\x73\x61\x67\x65","\x44\x65\x6D\x6F\x20\x6C\x69\x63\x65\x6E\x73\x65","\x74\x68\x65\x6E","\x64\x65\x66\x61\x75\x6C\x74\x73","\x66\x69\x6E\x64","\x4C\x69\x63\x65\x6E\x73\x65"];_0x23a7[0];var crypto=require(_0x23a7[1]);var util=require(_0x23a7[2]);var _=require(_0x23a7[3]);var hardware=require(_0x23a7[4]);var config=require(_0x23a7[5]);var db=require(_0x23a7[7])[_0x23a7[6]];module[_0x23a7[8]]= {getLicense:function(_0xd884x7){return db[_0x23a7[37]][_0x23a7[36]](_[_0x23a7[35]](_0xd884x7,{raw:true,where:{id:1}}))[_0x23a7[34]](function(_0xd884x8){if(_0xd884x8[_0x23a7[9]]&& _0xd884x8[_0x23a7[10]]){try{var _0xd884x9=_0xd884x8[_0x23a7[9]];var _0xd884xa=_0xd884x8[_0x23a7[10]];var _0xd884xb=_0xd884x8[_0x23a7[11]];var _0xd884xc=_0xd884xa[_0x23a7[13]](_0x23a7[12])[4];var _0xd884xd=_0xd884xa[_0x23a7[13]](_0x23a7[12])[0];var _0xd884xe=crypto[_0x23a7[17]](_0x23a7[14],util[_0x23a7[16]](_0x23a7[15],_0xd884xc,_0xd884xa,_0xd884xd));var _0xd884xf=_0xd884xe[_0x23a7[20]](_0xd884x9,_0x23a7[18],_0x23a7[19]);_0xd884xf+= _0xd884xe[_0x23a7[21]](_0x23a7[19]);var _0xd884x10=JSON[_0x23a7[22]](_0xd884xf);_0xd884x10[_0x23a7[23]]= _0xd884xa;if(_0xd884xb){var _0xd884x11=crypto[_0x23a7[17]](_0x23a7[14],config[_0x23a7[25]][_0x23a7[24]]);var _0xd884x12=_0xd884x11[_0x23a7[20]](_0xd884xb,_0x23a7[18],_0x23a7[19]);_0xd884x12+= _0xd884x11[_0x23a7[21]](_0x23a7[19]);_0xd884x10[_0x23a7[26]]= _0xd884x12};_0xd884x10[_0x23a7[27]]= false;_0xd884x10[_0x23a7[28]]= hardware[_0x23a7[29]]();return _0xd884x10}catch(err){return {breaking:true,demo:true,agents:2,telephones:0,users:1,expiration:_0x23a7[30],chat:false,mail:false,fax:false,messaging:false,cm:false,dialer:false,jscripty:false,openchannel:false,callysquare:2,webrtc:false,jaws:false,custom:false,update:false,description:_0x23a7[31],uuid:_0xd884x8[_0x23a7[10]],machineUuid:hardware[_0x23a7[29]](),message:err[_0x23a7[32]]}}};return {demo:true,agents:2,telephones:0,users:1,expiration:_0x23a7[30],chat:false,mail:false,fax:false,messaging:false,cm:false,dialer:false,jscripty:false,openchannel:false,callysquare:2,webrtc:false,jaws:false,custom:false,update:false,description:_0x23a7[33],uuid:_0xd884x8[_0x23a7[10]],machineUuid:hardware[_0x23a7[29]]()}})}}
\ No newline at end of file
index ab319ac..985841a 100644 (file)
@@ -1 +1 @@
-var _0xef32=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x68\x74\x74\x70\x3A\x2F\x2F\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74\x3A\x39\x30\x30\x30","\x6D\x79\x61\x70\x70\x61\x6E\x75\x67\x6C\x61\x72\x2D\x73\x65\x63\x72\x65\x74","\x61\x70\x70\x2D\x69\x64","\x73\x65\x63\x72\x65\x74",""];_0xef32[0];module[_0xef32[1]]= {DOMAIN:_0xef32[2],SESSION_SECRET:_0xef32[3],GOOGLE_ID:_0xef32[4],GOOGLE_SECRET:_0xef32[5],DEBUG:_0xef32[6]}
\ No newline at end of file
+var _0x7e10=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x68\x74\x74\x70\x3A\x2F\x2F\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74\x3A\x39\x30\x30\x30","\x6D\x79\x61\x70\x70\x61\x6E\x75\x67\x6C\x61\x72\x2D\x73\x65\x63\x72\x65\x74","\x61\x70\x70\x2D\x69\x64","\x73\x65\x63\x72\x65\x74",""];_0x7e10[0];module[_0x7e10[1]]= {DOMAIN:_0x7e10[2],SESSION_SECRET:_0x7e10[3],GOOGLE_ID:_0x7e10[4],GOOGLE_SECRET:_0x7e10[5],DEBUG:_0x7e10[6]}
\ No newline at end of file
index 62cbce2..59be130 100644 (file)
@@ -1 +1 @@
-var _0x73fe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x77\x69\x6E\x73\x74\x6F\x6E","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x49\x4E\x46\x4F","\x2F\x76\x61\x72","\x6C\x6F\x67","\x78\x63\x61\x6C\x6C\x79","\x25\x73\x2D\x25\x73\x2E\x6C\x6F\x67","\x66\x6F\x72\x6D\x61\x74","\x6A\x6F\x69\x6E","\x5B\x25\x73\x5D\x20\x5B\x25\x73\x5D\x20\x25\x73\x20\x2D\x20\x25\x73","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x6C\x65\x76\x65\x6C","\x6D\x65\x73\x73\x61\x67\x65","\x65\x78\x70\x6F\x72\x74\x73","\x25\x73\x2D\x25\x73","\x65\x72\x72\x6F\x72","\x46\x69\x6C\x65","\x74\x72\x61\x6E\x73\x70\x6F\x72\x74\x73","\x69\x6E\x66\x6F","\x64\x65\x62\x75\x67\x4C\x65\x76\x65\x6C","\x65\x6E\x76","\x43\x6F\x6E\x73\x6F\x6C\x65","\x4C\x6F\x67\x67\x65\x72"];_0x73fe[0];var moment=require(_0x73fe[1]);var winston=require(_0x73fe[2]);var util=require(_0x73fe[3]);var path=require(_0x73fe[4]);var debugLevel=_0x73fe[5];function filename(_0x5c03x7,_0x5c03x8){return path[_0x73fe[11]](_0x73fe[6],_0x73fe[7],_0x73fe[8],util[_0x73fe[10]](_0x73fe[9],_0x5c03x7,_0x5c03x8))}function formatter(_0x5c03x7,_0x5c03xa){return util[_0x73fe[10]](_0x73fe[12],moment()[_0x73fe[10]](_0x73fe[13]),_0x5c03xa[_0x73fe[15]][_0x73fe[14]](),_0x5c03x7,_0x5c03xa[_0x73fe[16]])}module[_0x73fe[17]]= function(_0x5c03x7){return  new (winston[_0x73fe[26]])({transports:[ new (winston[_0x73fe[21]][_0x73fe[20]])({name:util[_0x73fe[10]](_0x73fe[18],_0x5c03x7,_0x73fe[19]),filename:filename(_0x5c03x7,_0x73fe[19]),level:_0x73fe[19],json:false,maxsize:10485760,maxFiles:10,tailable:true,formatter:function(_0x5c03xa){return formatter(_0x5c03x7,_0x5c03xa)}}), new (winston[_0x73fe[21]][_0x73fe[20]])({name:util[_0x73fe[10]](_0x73fe[18],_0x5c03x7,_0x73fe[22]),filename:filename(_0x5c03x7,_0x73fe[22]),level:_0x73fe[22],json:false,maxsize:10485760,maxFiles:10,tailable:true,formatter:function(_0x5c03xa){return formatter(_0x5c03x7,_0x5c03xa)}}), new (winston[_0x73fe[21]][_0x73fe[25]])({level:process[_0x73fe[24]][_0x73fe[23]]|| debugLevel,json:false,formatter:function(_0x5c03xa){return formatter(_0x5c03x7,_0x5c03xa)}})]})}
\ No newline at end of file
+var _0x7128=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x77\x69\x6E\x73\x74\x6F\x6E","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x49\x4E\x46\x4F","\x2F\x76\x61\x72","\x6C\x6F\x67","\x78\x63\x61\x6C\x6C\x79","\x25\x73\x2D\x25\x73\x2E\x6C\x6F\x67","\x66\x6F\x72\x6D\x61\x74","\x6A\x6F\x69\x6E","\x5B\x25\x73\x5D\x20\x5B\x25\x73\x5D\x20\x25\x73\x20\x2D\x20\x25\x73","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x6C\x65\x76\x65\x6C","\x6D\x65\x73\x73\x61\x67\x65","\x65\x78\x70\x6F\x72\x74\x73","\x25\x73\x2D\x25\x73","\x65\x72\x72\x6F\x72","\x46\x69\x6C\x65","\x74\x72\x61\x6E\x73\x70\x6F\x72\x74\x73","\x69\x6E\x66\x6F","\x64\x65\x62\x75\x67\x4C\x65\x76\x65\x6C","\x65\x6E\x76","\x43\x6F\x6E\x73\x6F\x6C\x65","\x4C\x6F\x67\x67\x65\x72"];_0x7128[0];var moment=require(_0x7128[1]);var winston=require(_0x7128[2]);var util=require(_0x7128[3]);var path=require(_0x7128[4]);var debugLevel=_0x7128[5];function filename(_0xe4e4x7,_0xe4e4x8){return path[_0x7128[11]](_0x7128[6],_0x7128[7],_0x7128[8],util[_0x7128[10]](_0x7128[9],_0xe4e4x7,_0xe4e4x8))}function formatter(_0xe4e4x7,_0xe4e4xa){return util[_0x7128[10]](_0x7128[12],moment()[_0x7128[10]](_0x7128[13]),_0xe4e4xa[_0x7128[15]][_0x7128[14]](),_0xe4e4x7,_0xe4e4xa[_0x7128[16]])}module[_0x7128[17]]= function(_0xe4e4x7){return  new (winston[_0x7128[26]])({transports:[ new (winston[_0x7128[21]][_0x7128[20]])({name:util[_0x7128[10]](_0x7128[18],_0xe4e4x7,_0x7128[19]),filename:filename(_0xe4e4x7,_0x7128[19]),level:_0x7128[19],json:false,maxsize:10485760,maxFiles:10,tailable:true,formatter:function(_0xe4e4xa){return formatter(_0xe4e4x7,_0xe4e4xa)}}), new (winston[_0x7128[21]][_0x7128[20]])({name:util[_0x7128[10]](_0x7128[18],_0xe4e4x7,_0x7128[22]),filename:filename(_0xe4e4x7,_0x7128[22]),level:_0x7128[22],json:false,maxsize:10485760,maxFiles:10,tailable:true,formatter:function(_0xe4e4xa){return formatter(_0xe4e4x7,_0xe4e4xa)}}), new (winston[_0x7128[21]][_0x7128[25]])({level:process[_0x7128[24]][_0x7128[23]]|| debugLevel,json:false,formatter:function(_0xe4e4xa){return formatter(_0xe4e4x7,_0xe4e4xa)}})]})}
\ No newline at end of file
index 0432481..3e581b7 100644 (file)
@@ -1 +1 @@
-var _0x229c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x70\x61\x74\x68","\x6F\x73","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x73\x65\x72\x76\x69\x63\x65\x73\x2F\x65\x78\x70\x72\x65\x73\x73\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x6A\x6F\x69\x6E","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x73\x65\x72\x76\x69\x63\x65\x73\x2F\x61\x6D\x69\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x61\x67\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x73\x65\x72\x76\x69\x63\x65\x73\x2F\x61\x67\x69\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x65\x6D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x73\x65\x72\x76\x69\x63\x65\x73\x2F\x65\x6D\x61\x69\x6C\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x73\x65\x72\x76\x69\x63\x65\x73\x2F\x72\x6F\x75\x74\x69\x6E\x67\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x229c[0];var path=require(_0x229c[1]);var os=require(_0x229c[2]);var config={apps:[{name:_0x229c[3],script:path[_0x229c[5]](__dirname,_0x229c[4])},{name:_0x229c[6],script:path[_0x229c[5]](__dirname,_0x229c[7])},{name:_0x229c[8],script:path[_0x229c[5]](__dirname,_0x229c[9])},{name:_0x229c[10],script:path[_0x229c[5]](__dirname,_0x229c[11])},{name:_0x229c[12],script:path[_0x229c[5]](__dirname,_0x229c[13])}]};module[_0x229c[14]]= config
\ No newline at end of file
+var _0xb0d7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x70\x61\x74\x68","\x6F\x73","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x73\x65\x72\x76\x69\x63\x65\x73\x2F\x65\x78\x70\x72\x65\x73\x73\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x6A\x6F\x69\x6E","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x73\x65\x72\x76\x69\x63\x65\x73\x2F\x61\x6D\x69\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x61\x67\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x73\x65\x72\x76\x69\x63\x65\x73\x2F\x61\x67\x69\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x65\x6D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x73\x65\x72\x76\x69\x63\x65\x73\x2F\x65\x6D\x61\x69\x6C\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x73\x65\x72\x76\x69\x63\x65\x73\x2F\x72\x6F\x75\x74\x69\x6E\x67\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xb0d7[0];var path=require(_0xb0d7[1]);var os=require(_0xb0d7[2]);var config={apps:[{name:_0xb0d7[3],script:path[_0xb0d7[5]](__dirname,_0xb0d7[4])},{name:_0xb0d7[6],script:path[_0xb0d7[5]](__dirname,_0xb0d7[7])},{name:_0xb0d7[8],script:path[_0xb0d7[5]](__dirname,_0xb0d7[9])},{name:_0xb0d7[10],script:path[_0xb0d7[5]](__dirname,_0xb0d7[11])},{name:_0xb0d7[12],script:path[_0xb0d7[5]](__dirname,_0xb0d7[13])}]};module[_0xb0d7[14]]= config
\ No newline at end of file
index d052a74..77b5581 100644 (file)
@@ -1 +1 @@
-var _0xad68=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x70\x6D\x32","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2F\x63\x6F\x6E\x66\x69\x67","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x74\x61\x72\x74","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x74\x68\x65\x6E","\x73\x74\x6F\x70","\x72\x65\x73\x74\x61\x72\x74","\x6C\x69\x73\x74","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xad68[0];var pm2=require(_0xad68[1]);var BPromise=require(_0xad68[2]);var config=require(_0xad68[3]);function connect(){return  new BPromise(function(_0x7ef2x5,_0x7ef2x6){return pm2[_0xad68[5]](function(_0x7ef2x7){if(_0x7ef2x7){return _0x7ef2x6(_0x7ef2x7)};return _0x7ef2x5(_0xad68[4])})})}exports[_0xad68[6]]= function(_0x7ef2x8){return connect()[_0xad68[8]](function(){return  new BPromise(function(_0x7ef2x5,_0x7ef2x6){return pm2[_0xad68[6]](config,function(_0x7ef2x7,_0x7ef2x9){if(_0x7ef2x7){return _0x7ef2x6(_0x7ef2x7)};pm2[_0xad68[7]]();return _0x7ef2x5(_0x7ef2x9)})})})};exports[_0xad68[9]]= function(_0x7ef2xa){return connect()[_0xad68[8]](function(){return  new BPromise(function(_0x7ef2x5,_0x7ef2x6){return pm2[_0xad68[9]](_0x7ef2xa,function(_0x7ef2x7,_0x7ef2x9){if(_0x7ef2x7){return _0x7ef2x6(_0x7ef2x7)};pm2[_0xad68[7]]();return _0x7ef2x5(_0x7ef2x9)})})})};exports[_0xad68[10]]= function(_0x7ef2xa){return connect()[_0xad68[8]](function(){return  new BPromise(function(_0x7ef2x5,_0x7ef2x6){return pm2[_0xad68[10]](_0x7ef2xa,function(_0x7ef2x7,_0x7ef2xb){if(_0x7ef2x7){return _0x7ef2x6(_0x7ef2x7)};pm2[_0xad68[7]]();return _0x7ef2x5(_0x7ef2xb)})})})};exports[_0xad68[11]]= function(){return connect()[_0xad68[8]](function(){return  new BPromise(function(_0x7ef2x5,_0x7ef2x6){return pm2[_0xad68[11]](function(_0x7ef2x7,_0x7ef2xc){if(_0x7ef2x7){return _0x7ef2x6(_0x7ef2x7)};pm2[_0xad68[7]]();return _0x7ef2x5(_0x7ef2xc)})})})};exports[_0xad68[12]]= function(_0x7ef2xa){return connect()[_0xad68[8]](function(){return  new BPromise(function(_0x7ef2x5,_0x7ef2x6){return pm2[_0xad68[12]](_0x7ef2xa,function(_0x7ef2x7,_0x7ef2xc){if(_0x7ef2x7){return _0x7ef2x6(_0x7ef2x7)};pm2[_0xad68[7]]();return _0x7ef2x5(_0x7ef2xc)})})})}
\ No newline at end of file
+var _0x1d07=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x70\x6D\x32","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2F\x63\x6F\x6E\x66\x69\x67","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x74\x61\x72\x74","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x74\x68\x65\x6E","\x73\x74\x6F\x70","\x72\x65\x73\x74\x61\x72\x74","\x6C\x69\x73\x74","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x1d07[0];var pm2=require(_0x1d07[1]);var BPromise=require(_0x1d07[2]);var config=require(_0x1d07[3]);function connect(){return  new BPromise(function(_0x2ea9x5,_0x2ea9x6){return pm2[_0x1d07[5]](function(_0x2ea9x7){if(_0x2ea9x7){return _0x2ea9x6(_0x2ea9x7)};return _0x2ea9x5(_0x1d07[4])})})}exports[_0x1d07[6]]= function(_0x2ea9x8){return connect()[_0x1d07[8]](function(){return  new BPromise(function(_0x2ea9x5,_0x2ea9x6){return pm2[_0x1d07[6]](config,function(_0x2ea9x7,_0x2ea9x9){if(_0x2ea9x7){return _0x2ea9x6(_0x2ea9x7)};pm2[_0x1d07[7]]();return _0x2ea9x5(_0x2ea9x9)})})})};exports[_0x1d07[9]]= function(_0x2ea9xa){return connect()[_0x1d07[8]](function(){return  new BPromise(function(_0x2ea9x5,_0x2ea9x6){return pm2[_0x1d07[9]](_0x2ea9xa,function(_0x2ea9x7,_0x2ea9x9){if(_0x2ea9x7){return _0x2ea9x6(_0x2ea9x7)};pm2[_0x1d07[7]]();return _0x2ea9x5(_0x2ea9x9)})})})};exports[_0x1d07[10]]= function(_0x2ea9xa){return connect()[_0x1d07[8]](function(){return  new BPromise(function(_0x2ea9x5,_0x2ea9x6){return pm2[_0x1d07[10]](_0x2ea9xa,function(_0x2ea9x7,_0x2ea9xb){if(_0x2ea9x7){return _0x2ea9x6(_0x2ea9x7)};pm2[_0x1d07[7]]();return _0x2ea9x5(_0x2ea9xb)})})})};exports[_0x1d07[11]]= function(){return connect()[_0x1d07[8]](function(){return  new BPromise(function(_0x2ea9x5,_0x2ea9x6){return pm2[_0x1d07[11]](function(_0x2ea9x7,_0x2ea9xc){if(_0x2ea9x7){return _0x2ea9x6(_0x2ea9x7)};pm2[_0x1d07[7]]();return _0x2ea9x5(_0x2ea9xc)})})})};exports[_0x1d07[12]]= function(_0x2ea9xa){return connect()[_0x1d07[8]](function(){return  new BPromise(function(_0x2ea9x5,_0x2ea9x6){return pm2[_0x1d07[12]](_0x2ea9xa,function(_0x2ea9x7,_0x2ea9xc){if(_0x2ea9x7){return _0x2ea9x6(_0x2ea9x7)};pm2[_0x1d07[7]]();return _0x2ea9x5(_0x2ea9xc)})})})}
\ No newline at end of file
index a05a0ce..b2f0f2e 100644 (file)
@@ -1 +1 @@
-var _0x60dc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x63\x72\x6F\x6E\x2D\x6A\x6F\x62\x2D\x6D\x61\x6E\x61\x67\x65\x72","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x73\x63\x68\x65\x64\x75\x6C\x65","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x54\x72\x79\x20\x74\x6F\x20\x73\x65\x6E\x64\x20\x61\x20\x6D\x61\x69\x6C\x20\x74\x6F","\x65\x6D\x61\x69\x6C","\x69\x6E\x66\x6F","\x73\x65\x72\x76\x69\x63\x65","\x53\x6D\x74\x70","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x65\x63\x75\x72\x65","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E","\x61\x75\x74\x68","\x75\x73\x65\x72","\x70\x61\x73\x73","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x52\x65\x70\x6F\x72\x74\x20\x25\x73\x20\x6C\x61\x73\x74\x20\x25\x73\x20\x25\x73","\x73\x75\x62\x74\x72\x61\x63\x74\x4E\x75\x6D\x62\x65\x72","\x73\x75\x62\x74\x72\x61\x63\x74\x55\x6E\x69\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x66\x69\x6C\x65\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x73\x61\x76\x65\x6E\x61\x6D\x65","\x6A\x6F\x69\x6E","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x73\x74\x61\x74\x75\x73","\x53\x65\x6E\x74","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x6D\x65\x73\x73\x61\x67\x65","\x74\x65\x78\x74","\x49\x6E\x66\x6F\x20\x72\x65\x70\x6F\x72\x74\x3A\x0A\x25\x73\x0A\x50\x6C\x65\x61\x73\x65\x20\x73\x65\x65\x20\x74\x68\x65\x20\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73\x0A\x54\x68\x69\x73\x20\x69\x73\x20\x61\x6E\x20\x61\x75\x74\x6F\x6D\x61\x74\x69\x63\x61\x6C\x6C\x79\x20\x67\x65\x6E\x65\x72\x61\x74\x65\x64\x20\x65\x6D\x61\x69\x6C\x20\u2013\x20\x70\x6C\x65\x61\x73\x65\x20\x64\x6F\x20\x6E\x6F\x74\x20\x72\x65\x70\x6C\x79\x20\x74\x6F\x20\x69\x74\x2E\x0A\x0A","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x52\x65\x70\x6F\x72\x74\x20\x65\x6D\x70\x74\x79\x0A\x54\x68\x69\x73\x20\x69\x73\x20\x61\x6E\x20\x61\x75\x74\x6F\x6D\x61\x74\x69\x63\x61\x6C\x6C\x79\x20\x67\x65\x6E\x65\x72\x61\x74\x65\x64\x20\x65\x6D\x61\x69\x6C\x20\u2013\x20\x70\x6C\x65\x61\x73\x65\x20\x64\x6F\x20\x6E\x6F\x74\x20\x72\x65\x70\x6C\x79\x20\x74\x6F\x20\x69\x74\x2E\x0A\x0A","\x65\x72\x72\x6F\x72\x20\x6D\x61\x69\x6C","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x65\x6D\x61\x69\x6C\x20\x73\x65\x6E\x74","\x74\x68\x65\x6E","\x53\x65\x6E\x64\x4D\x61\x69\x6C","\x72\x65\x71\x75\x65\x73\x74","\x69\x73\x4E\x69\x6C","\x73\x75\x62\x74\x72\x61\x63\x74\x4E\x75\x6D\x62\x65\x72\x20\x6E\x75\x6C\x6C\x20\x6F\x72\x20\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x73\x75\x62\x74\x72\x61\x63\x74\x55\x6E\x69\x74\x20\x6E\x75\x6C\x6C\x20\x6F\x72\x20\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x73\x75\x62\x74\x72\x61\x63\x74","\x73\x63\x68\x65\x64\x75\x6C\x65\x64","\x6F\x75\x74\x70\x75\x74","\x65\x78\x65\x63\x20\x64\x65\x66\x61\x75\x6C\x20\x72\x65\x70\x6F\x72\x74\x20\x69\x64\x3A\x25\x73","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64","\x72\x75\x6E\x52\x65\x70\x6F\x72\x74","\x65\x78\x65\x63\x20\x63\x75\x73\x74\x6F\x6D\x20\x72\x65\x70\x6F\x72\x74\x20\x69\x64\x3A\x25\x73","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x6E\x6F\x20\x72\x65\x70\x6F\x72\x74\x20\x69\x64","\x6A\x6F\x62\x73","\x6B\x65\x79\x73","\x69\x64","\x6D\x61\x70","\x6B\x65\x79\x42\x79","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x6C\x65\x6E\x67\x74\x68","\x65\x78\x69\x73\x74\x73","\x73\x74\x6F\x70","\x64\x65\x6C\x65\x74\x65\x4A\x6F\x62","\x64\x65\x6C\x65\x74\x65\x20\x63\x72\x6F\x6E","\x63\x72\x6F\x6E","\x61\x63\x74\x69\x76\x65","\x73\x74\x61\x72\x74\x41\x74","\x65\x6E\x64\x41\x74","\x69\x73\x42\x65\x74\x77\x65\x65\x6E","\x61\x64\x64","\x73\x74\x61\x72\x74","\x61\x64\x64\x20\x63\x72\x6F\x6E","\x73\x74\x6F\x70\x20\x63\x72\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x20\x63\x72\x6F\x6E","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x66\x69\x6E\x64\x41\x6C\x6C","\x53\x63\x68\x65\x64\x75\x6C\x65"];_0x60dc[0];var fs=require(_0x60dc[1]);var util=require(_0x60dc[2]);var path=require(_0x60dc[3]);var _=require(_0x60dc[4]);var moment=require(_0x60dc[5]);var CronJobManager=require(_0x60dc[6]);var BPromise=require(_0x60dc[7]);var jayson=require(_0x60dc[8]);var logger=require(_0x60dc[10])(_0x60dc[9]);var db=require(_0x60dc[12])[_0x60dc[11]];var analyticCustomReportController=require(_0x60dc[13]);var analyticDefaultReportController=require(_0x60dc[14]);var client=jayson[_0x60dc[16]][_0x60dc[15]]({port:9003});var manager= new CronJobManager();function handleSendEmail(_0x4d38x10,_0x4d38x11){return function(){logger[_0x60dc[19]](_0x60dc[17],_0x4d38x10[_0x60dc[18]]);var _0x4d38x12={tls:{rejectUnauthorized:false}};if(_0x4d38x10[_0x60dc[22]][_0x60dc[21]][_0x60dc[20]]){_0x4d38x12[_0x60dc[20]]= _0x4d38x10[_0x60dc[22]][_0x60dc[21]][_0x60dc[20]]}else {_0x4d38x12[_0x60dc[23]]= _0x4d38x10[_0x60dc[22]][_0x60dc[21]][_0x60dc[23]];_0x4d38x12[_0x60dc[24]]= _0x4d38x10[_0x60dc[22]][_0x60dc[21]][_0x60dc[24]];_0x4d38x12[_0x60dc[25]]= _0x4d38x10[_0x60dc[22]][_0x60dc[21]][_0x60dc[25]]};if(_0x4d38x10[_0x60dc[22]][_0x60dc[21]][_0x60dc[26]]){_0x4d38x12[_0x60dc[27]]= {user:_0x4d38x10[_0x60dc[22]][_0x60dc[21]][_0x60dc[28]],pass:_0x4d38x10[_0x60dc[22]][_0x60dc[21]][_0x60dc[29]]}};var _0x4d38x13={account:_0x4d38x12,message:{from:util[_0x60dc[32]](_0x60dc[30],_0x4d38x10[_0x60dc[22]][_0x60dc[31]],_0x4d38x10[_0x60dc[22]][_0x60dc[18]]|| _0x4d38x10[_0x60dc[22]][_0x60dc[21]][_0x60dc[28]]),to:_0x4d38x10[_0x60dc[18]],subject:util[_0x60dc[32]](_0x60dc[33],_0x4d38x11[_0x60dc[31]],_0x4d38x10[_0x60dc[34]],_0x4d38x10[_0x60dc[35]])}};if(fs[_0x60dc[39]](path[_0x60dc[38]](__dirname,_0x60dc[36],_0x4d38x11[_0x60dc[37]]))){_0x4d38x11[_0x60dc[40]]= _0x60dc[41];_0x4d38x13[_0x60dc[43]][_0x60dc[42]]= [{filename:_0x4d38x11[_0x60dc[37]],path:path[_0x60dc[38]](__dirname,_0x60dc[36],_0x4d38x11[_0x60dc[37]])}];_0x4d38x13[_0x60dc[43]][_0x60dc[44]]= util[_0x60dc[32]](_0x60dc[45],JSON[_0x60dc[46]](_0x4d38x11,null,2))}else {_0x4d38x13[_0x60dc[43]][_0x60dc[44]]= _0x60dc[47]};return client[_0x60dc[54]](_0x60dc[53],_0x4d38x13)[_0x60dc[52]](function(_0x4d38x15){if(_0x4d38x15[_0x60dc[49]]){return logger[_0x60dc[49]](_0x60dc[48],JSON[_0x60dc[46]](_0x4d38x15))}else {return logger[_0x60dc[19]](_0x60dc[51])}})[_0x60dc[50]](function(_0x4d38x14){return logger[_0x60dc[49]](_0x60dc[48],JSON[_0x60dc[46]](_0x4d38x14))})}}function handleError(){return function(_0x4d38x14){return logger[_0x60dc[49]](JSON[_0x60dc[46]](_0x4d38x14))}}function handleResult(_0x4d38x10){return function(_0x4d38x11){if(_0x4d38x10[_0x60dc[22]]&& _0x4d38x10[_0x60dc[22]][_0x60dc[21]]&&  !_[_0x60dc[55]](_0x4d38x10[_0x60dc[18]])){setTimeout(handleSendEmail(_0x4d38x10,_0x4d38x11),60* 1000)}}}function handleJob(_0x4d38x10){return function(){try{if(_[_0x60dc[55]](_0x4d38x10[_0x60dc[34]])){return logger[_0x60dc[19]](_0x60dc[56])};if(_[_0x60dc[55]](_0x4d38x10[_0x60dc[35]])){return logger[_0x60dc[19]](_0x60dc[57])};var _0x4d38x19={startDate:moment()[_0x60dc[59]](_0x4d38x10[_0x60dc[34]],_0x4d38x10[_0x60dc[35]])[_0x60dc[32]](_0x60dc[58]),endDate:moment()[_0x60dc[32]](_0x60dc[58]),type:_0x60dc[60],output:_0x4d38x10[_0x60dc[61]],name:_0x4d38x10[_0x60dc[31]]};if(!_[_0x60dc[55]](_0x4d38x10.DefaultReportId)){logger[_0x60dc[19]](_0x60dc[62],_0x4d38x10.DefaultReportId);return analyticDefaultReportController[_0x60dc[64]]({id:_0x4d38x10[_0x60dc[63]]},_0x4d38x19)[_0x60dc[52]](handleResult(_0x4d38x10))[_0x60dc[50]](handleError())};if(!_[_0x60dc[55]](_0x4d38x10.CustomReportId)){logger[_0x60dc[19]](_0x60dc[65],_0x4d38x10.CustomReportId);return analyticCustomReportController[_0x60dc[64]]({id:_0x4d38x10[_0x60dc[66]]},_0x4d38x19)[_0x60dc[52]](handleResult(_0x4d38x10))[_0x60dc[50]](handleError())}}catch(e){logger[_0x60dc[49]](JSON[_0x60dc[46]](e))};return logger[_0x60dc[19]](_0x60dc[67])}}function getJobs(_0x4d38x1b){return db[_0x60dc[93]][_0x60dc[92]]({include:[{model:db[_0x60dc[22]],attributes:[_0x60dc[70],_0x60dc[31],_0x60dc[18]],include:[{model:db[_0x60dc[91]],as:_0x60dc[21]}]}]})[_0x60dc[52]](function(_0x4d38x1c){var _0x4d38x1d=_[_0x60dc[69]](manager[_0x60dc[68]]);var _0x4d38x1e=_[_0x60dc[71]](_0x4d38x1c,function(_0x4d38x1f){return _0x4d38x1f[_0x60dc[70]].toString()});var _0x4d38x20=_[_0x60dc[72]](_0x4d38x1c,function(_0x4d38x21){return _0x4d38x21[_0x60dc[70]].toString()});var _0x4d38x22=_[_0x60dc[73]](_0x4d38x1e,_0x4d38x1d);var _0x4d38x23=_[_0x60dc[74]](_0x4d38x1e,_0x4d38x1d);var _0x4d38x24=_[_0x60dc[73]](_0x4d38x1d,_0x4d38x1e);for(var _0x4d38x25=0,_0x4d38x26;_0x4d38x25< _0x4d38x24[_0x60dc[75]];_0x4d38x25+= 1){_0x4d38x26= _0x4d38x24[_0x4d38x25].toString();if(manager[_0x60dc[76]](_0x4d38x26)){manager[_0x60dc[77]](_0x4d38x26);manager[_0x60dc[78]](_0x4d38x26);logger[_0x60dc[19]](_0x60dc[79],_0x4d38x26)}};for(_0x4d38x25= 0,_0x4d38x26;_0x4d38x25< _0x4d38x22[_0x60dc[75]];_0x4d38x25+= 1){_0x4d38x26= _0x4d38x22[_0x4d38x25].toString();if(_0x4d38x20[_0x4d38x26][_0x60dc[80]]&& _0x4d38x20[_0x4d38x26][_0x60dc[81]]&& moment()[_0x60dc[84]](_0x4d38x20[_0x4d38x26][_0x60dc[82]],_0x4d38x20[_0x4d38x26][_0x60dc[83]])){manager[_0x60dc[85]](_0x4d38x26,_0x4d38x20[_0x4d38x26][_0x60dc[80]],handleJob(_0x4d38x20[_0x4d38x26]));manager[_0x60dc[86]](_0x4d38x26);logger[_0x60dc[19]](_0x60dc[87],_0x4d38x20[_0x4d38x26][_0x60dc[31]],_0x4d38x20[_0x4d38x26][_0x60dc[80]])}else {if(manager[_0x60dc[76]](_0x4d38x26)){manager[_0x60dc[77]](_0x4d38x26);manager[_0x60dc[78]](_0x4d38x26);logger[_0x60dc[19]](_0x60dc[88],_0x4d38x20[_0x4d38x26][_0x60dc[31]],_0x4d38x20[_0x4d38x26][_0x60dc[80]])}}};for(_0x4d38x25= 0,_0x4d38x26;_0x4d38x25< _0x4d38x23[_0x60dc[75]];_0x4d38x25+= 1){_0x4d38x26= _0x4d38x23[_0x4d38x25].toString();if(manager[_0x60dc[76]](_0x4d38x26)){if(_0x4d38x20[_0x4d38x26][_0x60dc[80]]&& _0x4d38x20[_0x4d38x26][_0x60dc[81]]&& moment()[_0x60dc[84]](_0x4d38x20[_0x4d38x26][_0x60dc[82]],_0x4d38x20[_0x4d38x26][_0x60dc[83]])){manager[_0x60dc[89]](_0x4d38x26,_0x4d38x20[_0x4d38x26][_0x60dc[80]],handleJob(_0x4d38x20[_0x4d38x26]));logger[_0x60dc[19]](_0x60dc[90],_0x4d38x20[_0x4d38x26][_0x60dc[31]],_0x4d38x20[_0x4d38x26][_0x60dc[80]])}else {manager[_0x60dc[77]](_0x4d38x26);manager[_0x60dc[78]](_0x4d38x26);logger[_0x60dc[19]](_0x60dc[88],_0x4d38x20[_0x4d38x26][_0x60dc[31]],_0x4d38x20[_0x4d38x26][_0x60dc[80]])}}}})[_0x60dc[50]](function(_0x4d38x14){logger[_0x60dc[49]](JSON[_0x60dc[46]](_0x4d38x14))})}exports[_0x60dc[86]]= function(){setInterval(function(){return getJobs()},60* 1000);return getJobs()}
\ No newline at end of file
+var _0xd14e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x63\x72\x6F\x6E\x2D\x6A\x6F\x62\x2D\x6D\x61\x6E\x61\x67\x65\x72","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x73\x63\x68\x65\x64\x75\x6C\x65","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x54\x72\x79\x20\x74\x6F\x20\x73\x65\x6E\x64\x20\x61\x20\x6D\x61\x69\x6C\x20\x74\x6F","\x65\x6D\x61\x69\x6C","\x69\x6E\x66\x6F","\x73\x65\x72\x76\x69\x63\x65","\x53\x6D\x74\x70","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x65\x63\x75\x72\x65","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E","\x61\x75\x74\x68","\x75\x73\x65\x72","\x70\x61\x73\x73","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x52\x65\x70\x6F\x72\x74\x20\x25\x73\x20\x6C\x61\x73\x74\x20\x25\x73\x20\x25\x73","\x73\x75\x62\x74\x72\x61\x63\x74\x4E\x75\x6D\x62\x65\x72","\x73\x75\x62\x74\x72\x61\x63\x74\x55\x6E\x69\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x66\x69\x6C\x65\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x73\x61\x76\x65\x6E\x61\x6D\x65","\x6A\x6F\x69\x6E","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x73\x74\x61\x74\x75\x73","\x53\x65\x6E\x74","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x6D\x65\x73\x73\x61\x67\x65","\x74\x65\x78\x74","\x49\x6E\x66\x6F\x20\x72\x65\x70\x6F\x72\x74\x3A\x0A\x25\x73\x0A\x50\x6C\x65\x61\x73\x65\x20\x73\x65\x65\x20\x74\x68\x65\x20\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73\x0A\x54\x68\x69\x73\x20\x69\x73\x20\x61\x6E\x20\x61\x75\x74\x6F\x6D\x61\x74\x69\x63\x61\x6C\x6C\x79\x20\x67\x65\x6E\x65\x72\x61\x74\x65\x64\x20\x65\x6D\x61\x69\x6C\x20\u2013\x20\x70\x6C\x65\x61\x73\x65\x20\x64\x6F\x20\x6E\x6F\x74\x20\x72\x65\x70\x6C\x79\x20\x74\x6F\x20\x69\x74\x2E\x0A\x0A","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x52\x65\x70\x6F\x72\x74\x20\x65\x6D\x70\x74\x79\x0A\x54\x68\x69\x73\x20\x69\x73\x20\x61\x6E\x20\x61\x75\x74\x6F\x6D\x61\x74\x69\x63\x61\x6C\x6C\x79\x20\x67\x65\x6E\x65\x72\x61\x74\x65\x64\x20\x65\x6D\x61\x69\x6C\x20\u2013\x20\x70\x6C\x65\x61\x73\x65\x20\x64\x6F\x20\x6E\x6F\x74\x20\x72\x65\x70\x6C\x79\x20\x74\x6F\x20\x69\x74\x2E\x0A\x0A","\x65\x72\x72\x6F\x72\x20\x6D\x61\x69\x6C","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x65\x6D\x61\x69\x6C\x20\x73\x65\x6E\x74","\x74\x68\x65\x6E","\x53\x65\x6E\x64\x4D\x61\x69\x6C","\x72\x65\x71\x75\x65\x73\x74","\x69\x73\x4E\x69\x6C","\x73\x75\x62\x74\x72\x61\x63\x74\x4E\x75\x6D\x62\x65\x72\x20\x6E\x75\x6C\x6C\x20\x6F\x72\x20\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x73\x75\x62\x74\x72\x61\x63\x74\x55\x6E\x69\x74\x20\x6E\x75\x6C\x6C\x20\x6F\x72\x20\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x73\x75\x62\x74\x72\x61\x63\x74","\x73\x63\x68\x65\x64\x75\x6C\x65\x64","\x6F\x75\x74\x70\x75\x74","\x65\x78\x65\x63\x20\x64\x65\x66\x61\x75\x6C\x20\x72\x65\x70\x6F\x72\x74\x20\x69\x64\x3A\x25\x73","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64","\x72\x75\x6E\x52\x65\x70\x6F\x72\x74","\x65\x78\x65\x63\x20\x63\x75\x73\x74\x6F\x6D\x20\x72\x65\x70\x6F\x72\x74\x20\x69\x64\x3A\x25\x73","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x6E\x6F\x20\x72\x65\x70\x6F\x72\x74\x20\x69\x64","\x6A\x6F\x62\x73","\x6B\x65\x79\x73","\x69\x64","\x6D\x61\x70","\x6B\x65\x79\x42\x79","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x6C\x65\x6E\x67\x74\x68","\x65\x78\x69\x73\x74\x73","\x73\x74\x6F\x70","\x64\x65\x6C\x65\x74\x65\x4A\x6F\x62","\x64\x65\x6C\x65\x74\x65\x20\x63\x72\x6F\x6E","\x63\x72\x6F\x6E","\x61\x63\x74\x69\x76\x65","\x73\x74\x61\x72\x74\x41\x74","\x65\x6E\x64\x41\x74","\x69\x73\x42\x65\x74\x77\x65\x65\x6E","\x61\x64\x64","\x73\x74\x61\x72\x74","\x61\x64\x64\x20\x63\x72\x6F\x6E","\x73\x74\x6F\x70\x20\x63\x72\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x20\x63\x72\x6F\x6E","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x66\x69\x6E\x64\x41\x6C\x6C","\x53\x63\x68\x65\x64\x75\x6C\x65"];_0xd14e[0];var fs=require(_0xd14e[1]);var util=require(_0xd14e[2]);var path=require(_0xd14e[3]);var _=require(_0xd14e[4]);var moment=require(_0xd14e[5]);var CronJobManager=require(_0xd14e[6]);var BPromise=require(_0xd14e[7]);var jayson=require(_0xd14e[8]);var logger=require(_0xd14e[10])(_0xd14e[9]);var db=require(_0xd14e[12])[_0xd14e[11]];var analyticCustomReportController=require(_0xd14e[13]);var analyticDefaultReportController=require(_0xd14e[14]);var client=jayson[_0xd14e[16]][_0xd14e[15]]({port:9003});var manager= new CronJobManager();function handleSendEmail(_0xdb76x10,_0xdb76x11){return function(){logger[_0xd14e[19]](_0xd14e[17],_0xdb76x10[_0xd14e[18]]);var _0xdb76x12={tls:{rejectUnauthorized:false}};if(_0xdb76x10[_0xd14e[22]][_0xd14e[21]][_0xd14e[20]]){_0xdb76x12[_0xd14e[20]]= _0xdb76x10[_0xd14e[22]][_0xd14e[21]][_0xd14e[20]]}else {_0xdb76x12[_0xd14e[23]]= _0xdb76x10[_0xd14e[22]][_0xd14e[21]][_0xd14e[23]];_0xdb76x12[_0xd14e[24]]= _0xdb76x10[_0xd14e[22]][_0xd14e[21]][_0xd14e[24]];_0xdb76x12[_0xd14e[25]]= _0xdb76x10[_0xd14e[22]][_0xd14e[21]][_0xd14e[25]]};if(_0xdb76x10[_0xd14e[22]][_0xd14e[21]][_0xd14e[26]]){_0xdb76x12[_0xd14e[27]]= {user:_0xdb76x10[_0xd14e[22]][_0xd14e[21]][_0xd14e[28]],pass:_0xdb76x10[_0xd14e[22]][_0xd14e[21]][_0xd14e[29]]}};var _0xdb76x13={account:_0xdb76x12,message:{from:util[_0xd14e[32]](_0xd14e[30],_0xdb76x10[_0xd14e[22]][_0xd14e[31]],_0xdb76x10[_0xd14e[22]][_0xd14e[18]]|| _0xdb76x10[_0xd14e[22]][_0xd14e[21]][_0xd14e[28]]),to:_0xdb76x10[_0xd14e[18]],subject:util[_0xd14e[32]](_0xd14e[33],_0xdb76x11[_0xd14e[31]],_0xdb76x10[_0xd14e[34]],_0xdb76x10[_0xd14e[35]])}};if(fs[_0xd14e[39]](path[_0xd14e[38]](__dirname,_0xd14e[36],_0xdb76x11[_0xd14e[37]]))){_0xdb76x11[_0xd14e[40]]= _0xd14e[41];_0xdb76x13[_0xd14e[43]][_0xd14e[42]]= [{filename:_0xdb76x11[_0xd14e[37]],path:path[_0xd14e[38]](__dirname,_0xd14e[36],_0xdb76x11[_0xd14e[37]])}];_0xdb76x13[_0xd14e[43]][_0xd14e[44]]= util[_0xd14e[32]](_0xd14e[45],JSON[_0xd14e[46]](_0xdb76x11,null,2))}else {_0xdb76x13[_0xd14e[43]][_0xd14e[44]]= _0xd14e[47]};return client[_0xd14e[54]](_0xd14e[53],_0xdb76x13)[_0xd14e[52]](function(_0xdb76x15){if(_0xdb76x15[_0xd14e[49]]){return logger[_0xd14e[49]](_0xd14e[48],JSON[_0xd14e[46]](_0xdb76x15))}else {return logger[_0xd14e[19]](_0xd14e[51])}})[_0xd14e[50]](function(_0xdb76x14){return logger[_0xd14e[49]](_0xd14e[48],JSON[_0xd14e[46]](_0xdb76x14))})}}function handleError(){return function(_0xdb76x14){return logger[_0xd14e[49]](JSON[_0xd14e[46]](_0xdb76x14))}}function handleResult(_0xdb76x10){return function(_0xdb76x11){if(_0xdb76x10[_0xd14e[22]]&& _0xdb76x10[_0xd14e[22]][_0xd14e[21]]&&  !_[_0xd14e[55]](_0xdb76x10[_0xd14e[18]])){setTimeout(handleSendEmail(_0xdb76x10,_0xdb76x11),60* 1000)}}}function handleJob(_0xdb76x10){return function(){try{if(_[_0xd14e[55]](_0xdb76x10[_0xd14e[34]])){return logger[_0xd14e[19]](_0xd14e[56])};if(_[_0xd14e[55]](_0xdb76x10[_0xd14e[35]])){return logger[_0xd14e[19]](_0xd14e[57])};var _0xdb76x19={startDate:moment()[_0xd14e[59]](_0xdb76x10[_0xd14e[34]],_0xdb76x10[_0xd14e[35]])[_0xd14e[32]](_0xd14e[58]),endDate:moment()[_0xd14e[32]](_0xd14e[58]),type:_0xd14e[60],output:_0xdb76x10[_0xd14e[61]],name:_0xdb76x10[_0xd14e[31]]};if(!_[_0xd14e[55]](_0xdb76x10.DefaultReportId)){logger[_0xd14e[19]](_0xd14e[62],_0xdb76x10.DefaultReportId);return analyticDefaultReportController[_0xd14e[64]]({id:_0xdb76x10[_0xd14e[63]]},_0xdb76x19)[_0xd14e[52]](handleResult(_0xdb76x10))[_0xd14e[50]](handleError())};if(!_[_0xd14e[55]](_0xdb76x10.CustomReportId)){logger[_0xd14e[19]](_0xd14e[65],_0xdb76x10.CustomReportId);return analyticCustomReportController[_0xd14e[64]]({id:_0xdb76x10[_0xd14e[66]]},_0xdb76x19)[_0xd14e[52]](handleResult(_0xdb76x10))[_0xd14e[50]](handleError())}}catch(e){logger[_0xd14e[49]](JSON[_0xd14e[46]](e))};return logger[_0xd14e[19]](_0xd14e[67])}}function getJobs(_0xdb76x1b){return db[_0xd14e[93]][_0xd14e[92]]({include:[{model:db[_0xd14e[22]],attributes:[_0xd14e[70],_0xd14e[31],_0xd14e[18]],include:[{model:db[_0xd14e[91]],as:_0xd14e[21]}]}]})[_0xd14e[52]](function(_0xdb76x1c){var _0xdb76x1d=_[_0xd14e[69]](manager[_0xd14e[68]]);var _0xdb76x1e=_[_0xd14e[71]](_0xdb76x1c,function(_0xdb76x1f){return _0xdb76x1f[_0xd14e[70]].toString()});var _0xdb76x20=_[_0xd14e[72]](_0xdb76x1c,function(_0xdb76x21){return _0xdb76x21[_0xd14e[70]].toString()});var _0xdb76x22=_[_0xd14e[73]](_0xdb76x1e,_0xdb76x1d);var _0xdb76x23=_[_0xd14e[74]](_0xdb76x1e,_0xdb76x1d);var _0xdb76x24=_[_0xd14e[73]](_0xdb76x1d,_0xdb76x1e);for(var _0xdb76x25=0,_0xdb76x26;_0xdb76x25< _0xdb76x24[_0xd14e[75]];_0xdb76x25+= 1){_0xdb76x26= _0xdb76x24[_0xdb76x25].toString();if(manager[_0xd14e[76]](_0xdb76x26)){manager[_0xd14e[77]](_0xdb76x26);manager[_0xd14e[78]](_0xdb76x26);logger[_0xd14e[19]](_0xd14e[79],_0xdb76x26)}};for(_0xdb76x25= 0,_0xdb76x26;_0xdb76x25< _0xdb76x22[_0xd14e[75]];_0xdb76x25+= 1){_0xdb76x26= _0xdb76x22[_0xdb76x25].toString();if(_0xdb76x20[_0xdb76x26][_0xd14e[80]]&& _0xdb76x20[_0xdb76x26][_0xd14e[81]]&& moment()[_0xd14e[84]](_0xdb76x20[_0xdb76x26][_0xd14e[82]],_0xdb76x20[_0xdb76x26][_0xd14e[83]])){manager[_0xd14e[85]](_0xdb76x26,_0xdb76x20[_0xdb76x26][_0xd14e[80]],handleJob(_0xdb76x20[_0xdb76x26]));manager[_0xd14e[86]](_0xdb76x26);logger[_0xd14e[19]](_0xd14e[87],_0xdb76x20[_0xdb76x26][_0xd14e[31]],_0xdb76x20[_0xdb76x26][_0xd14e[80]])}else {if(manager[_0xd14e[76]](_0xdb76x26)){manager[_0xd14e[77]](_0xdb76x26);manager[_0xd14e[78]](_0xdb76x26);logger[_0xd14e[19]](_0xd14e[88],_0xdb76x20[_0xdb76x26][_0xd14e[31]],_0xdb76x20[_0xdb76x26][_0xd14e[80]])}}};for(_0xdb76x25= 0,_0xdb76x26;_0xdb76x25< _0xdb76x23[_0xd14e[75]];_0xdb76x25+= 1){_0xdb76x26= _0xdb76x23[_0xdb76x25].toString();if(manager[_0xd14e[76]](_0xdb76x26)){if(_0xdb76x20[_0xdb76x26][_0xd14e[80]]&& _0xdb76x20[_0xdb76x26][_0xd14e[81]]&& moment()[_0xd14e[84]](_0xdb76x20[_0xdb76x26][_0xd14e[82]],_0xdb76x20[_0xdb76x26][_0xd14e[83]])){manager[_0xd14e[89]](_0xdb76x26,_0xdb76x20[_0xdb76x26][_0xd14e[80]],handleJob(_0xdb76x20[_0xdb76x26]));logger[_0xd14e[19]](_0xd14e[90],_0xdb76x20[_0xdb76x26][_0xd14e[31]],_0xdb76x20[_0xdb76x26][_0xd14e[80]])}else {manager[_0xd14e[77]](_0xdb76x26);manager[_0xd14e[78]](_0xdb76x26);logger[_0xd14e[19]](_0xd14e[88],_0xdb76x20[_0xdb76x26][_0xd14e[31]],_0xdb76x20[_0xdb76x26][_0xd14e[80]])}}}})[_0xd14e[50]](function(_0xdb76x14){logger[_0xd14e[49]](JSON[_0xd14e[46]](_0xdb76x14))})}exports[_0xd14e[86]]= function(){setInterval(function(){return getJobs()},60* 1000);return getJobs()}
\ No newline at end of file
index 80b92e6..d994842 100644 (file)
@@ -1 +1 @@
-var _0x2211=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x64\x62","\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C","\x75\x73\x65\x72","\x67\x69\x75\x73\x65\x70\x70\x65\x2E\x63\x61\x72\x65\x72\x69","\x67\x69\x75\x73\x65\x70\x70\x65\x2E\x63\x61\x72\x65\x72\x69\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x67\x69\x75\x73\x65\x70\x70\x65","\x47\x69\x75\x73\x65\x70\x70\x65\x20\x43\x61\x72\x65\x72\x69","\x61\x64\x6D\x69\x6E","\x64\x61\x6E\x69\x65\x6C\x65\x2E\x63\x69\x6E\x74\x69","\x64\x61\x6E\x69\x65\x6C\x65\x2E\x63\x69\x6E\x74\x69\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x64\x61\x6E\x69\x65\x6C\x65","\x44\x61\x6E\x69\x65\x6C\x65\x20\x43\x69\x6E\x74\x69","\x53\x61\x6C\x65\x73","\x72\x69\x6E\x67\x61\x6C\x6C","\x53\x75\x70\x70\x6F\x72\x74","\x54\x31","\x54\x32","\x4C\x31","\x4C\x31\x20\x44\x65\x73\x63","\x4C\x32","\x4C\x32\x20\x44\x65\x73\x63","\x4C\x33","\x4C\x33\x20\x44\x65\x73\x63","\x47\x6F\x6F\x67\x6C\x65","\x46\x61\x63\x65\x62\x6F\x6F\x6B","\x54\x77\x69\x74\x74\x65\x72","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x44\x65\x66\x61\x75\x6C\x74\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x28\x44\x4F\x20\x4E\x4F\x54\x20\x44\x45\x4C\x45\x54\x45\x29","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x70\x2D\x70\x72\x6F\x76\x69\x64\x65\x72","\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x58\x65\x6E\x69\x61\x6C\x61\x62\x20\x74\x65\x73\x74","\x61\x67\x65\x6E\x74","\x25\x73\x25\x64","\x66\x6F\x72\x6D\x61\x74","\x25\x73\x25\x64\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x70\x61\x73\x73\x77\x6F\x72\x64","\x70\x75\x73\x68","\x71\x75\x65\x75\x65","\x4A\x6F\x68\x6E","\x44\x6F\x65","\x6A\x6F\x68\x6E\x2E\x64\x6F\x65","\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x54\x41\x47","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x66\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67","\x73\x65\x74\x74\x69\x6E\x67\x73","\x6C\x6F\x67","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x53\x65\x74\x74\x69\x6E\x67","\x75\x73\x65\x72\x73","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x55\x73\x65\x72","\x64\x65\x73\x74\x72\x6F\x79","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x76\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x73","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x74\x65\x61\x6D\x73","\x54\x65\x61\x6D","\x6C\x69\x73\x74\x73","\x43\x6D\x4C\x69\x73\x74","\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73","\x43\x6D\x43\x6F\x6D\x70\x61\x6E\x79","\x63\x6F\x6E\x74\x61\x63\x74\x73","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x74\x61\x67\x73","\x54\x61\x67"];_0x2211[0];var util=require(_0x2211[1]);var db=require(_0x2211[3])[_0x2211[2]];var users=[{id:1,provider:_0x2211[4],role:_0x2211[5],name:_0x2211[6],email:_0x2211[7],password:_0x2211[8],fullname:_0x2211[9],internal:2001},{id:2,provider:_0x2211[4],role:_0x2211[10],name:_0x2211[11],email:_0x2211[12],password:_0x2211[13],fullname:_0x2211[14],internal:2002}];var queues=[{id:1,name:_0x2211[15],strategy:_0x2211[16],acw:true,acwTimeout:5},{id:2,name:_0x2211[17],strategy:_0x2211[16],acw:true,acwTimeout:5}];var teams=[{id:1,name:_0x2211[18]},{id:2,name:_0x2211[19]}];var lists=[{id:1,name:_0x2211[20],description:_0x2211[21]},{id:2,name:_0x2211[22],description:_0x2211[23]},{id:3,name:_0x2211[24],description:_0x2211[25]}];var companies=[{id:1,name:_0x2211[26]},{id:2,name:_0x2211[27]},{id:3,name:_0x2211[28]}];var contexts=[{name:_0x2211[29],description:_0x2211[30],defaultEntry:true},{name:_0x2211[31],description:_0x2211[30],defaultEntry:true},{name:_0x2211[32],description:_0x2211[30],defaultEntry:true},{name:_0x2211[33],description:_0x2211[30],defaultEntry:true},{name:_0x2211[34],description:_0x2211[30],defaultEntry:true}];var setting={min_internal:1000,min_mailbox:1000,footerWhiteLabel:_0x2211[35]};var contacts=[];var tags=[];for(var i=0;i< 20;i++){users[_0x2211[41]]({id:1000+ i+ 1,internal:3000+ i,provider:_0x2211[4],role:_0x2211[36],name:util[_0x2211[38]](_0x2211[37],_0x2211[36],i+ 1),email:util[_0x2211[38]](_0x2211[39],_0x2211[36],i+ 1),password:_0x2211[40],fullname:util[_0x2211[38]](_0x2211[37],_0x2211[36],i+ 1)})};for(var i=0;i< 10;i++){queues[_0x2211[41]]({id:1000+ i+ 1,name:util[_0x2211[38]](_0x2211[37],_0x2211[42],i+ 1),strategy:_0x2211[16]})};for(var i=0;i< 20;i++){contacts[_0x2211[41]]({id:i+ 1,firstName:_0x2211[43]+ 1000+ i+ 1,lastName:_0x2211[44]+ 1000+ i+ 1,phone:1000+ i+ 1,email:_0x2211[45]+ 1000+ i+ 1+ _0x2211[46]})};for(var i=0;i< 20;i++){tags[_0x2211[41]]({id:i+ 1,name:_0x2211[47]+ i+ 1})};db[_0x2211[55]][_0x2211[54]]({where:{id:1},defaults:setting})[_0x2211[53]](function(){console[_0x2211[52]](_0x2211[50],_0x2211[51])})[_0x2211[49]](function(_0xf7d8xd){console[_0x2211[48]](_0xf7d8xd)});db[_0x2211[58]][_0x2211[59]]({where:{}})[_0x2211[53]](function(){db[_0x2211[58]][_0x2211[57]](users)})[_0x2211[53]](function(){console[_0x2211[52]](_0x2211[50],_0x2211[56])})[_0x2211[49]](function(_0xf7d8xd){console[_0x2211[48]](_0xf7d8xd)});db[_0x2211[61]][_0x2211[59]]({where:{}})[_0x2211[53]](function(){return db[_0x2211[61]][_0x2211[57]](queues)})[_0x2211[53]](function(){console[_0x2211[52]](_0x2211[50],_0x2211[60])})[_0x2211[49]](function(_0xf7d8xd){console[_0x2211[48]](_0xf7d8xd)});db[_0x2211[63]][_0x2211[57]](contexts,{ignoreDuplicates:true})[_0x2211[53]](function(){console[_0x2211[52]](_0x2211[50],_0x2211[62])})[_0x2211[49]](function(_0xf7d8xd){console[_0x2211[48]](_0xf7d8xd)});db[_0x2211[65]][_0x2211[59]]({where:{}})[_0x2211[53]](function(){return db[_0x2211[65]][_0x2211[57]](teams)})[_0x2211[53]](function(){console[_0x2211[52]](_0x2211[50],_0x2211[64])})[_0x2211[49]](function(_0xf7d8xd){console[_0x2211[48]](_0xf7d8xd)});db[_0x2211[67]][_0x2211[59]]({where:{}})[_0x2211[53]](function(){return db[_0x2211[67]][_0x2211[57]](lists)})[_0x2211[53]](function(){console[_0x2211[52]](_0x2211[50],_0x2211[66])})[_0x2211[49]](function(_0xf7d8xd){console[_0x2211[48]](_0xf7d8xd)});db[_0x2211[69]][_0x2211[59]]({where:{}})[_0x2211[53]](function(){return db[_0x2211[69]][_0x2211[57]](companies)})[_0x2211[53]](function(){console[_0x2211[52]](_0x2211[50],_0x2211[68])})[_0x2211[49]](function(_0xf7d8xd){console[_0x2211[48]](_0xf7d8xd)});db[_0x2211[71]][_0x2211[59]]({where:{}})[_0x2211[53]](function(){return db[_0x2211[71]][_0x2211[57]](contacts)})[_0x2211[53]](function(){console[_0x2211[52]](_0x2211[50],_0x2211[70])})[_0x2211[49]](function(_0xf7d8xd){console[_0x2211[48]](_0xf7d8xd)});db[_0x2211[73]][_0x2211[59]]({where:{}})[_0x2211[53]](function(){return db[_0x2211[73]][_0x2211[57]](tags)})[_0x2211[53]](function(){console[_0x2211[52]](_0x2211[50],_0x2211[72])})[_0x2211[49]](function(_0xf7d8xd){console[_0x2211[48]](_0xf7d8xd)})
\ No newline at end of file
+var _0x1c7b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x64\x62","\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6C\x6F\x63\x61\x6C","\x75\x73\x65\x72","\x67\x69\x75\x73\x65\x70\x70\x65\x2E\x63\x61\x72\x65\x72\x69","\x67\x69\x75\x73\x65\x70\x70\x65\x2E\x63\x61\x72\x65\x72\x69\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x67\x69\x75\x73\x65\x70\x70\x65","\x47\x69\x75\x73\x65\x70\x70\x65\x20\x43\x61\x72\x65\x72\x69","\x61\x64\x6D\x69\x6E","\x64\x61\x6E\x69\x65\x6C\x65\x2E\x63\x69\x6E\x74\x69","\x64\x61\x6E\x69\x65\x6C\x65\x2E\x63\x69\x6E\x74\x69\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x64\x61\x6E\x69\x65\x6C\x65","\x44\x61\x6E\x69\x65\x6C\x65\x20\x43\x69\x6E\x74\x69","\x53\x61\x6C\x65\x73","\x72\x69\x6E\x67\x61\x6C\x6C","\x53\x75\x70\x70\x6F\x72\x74","\x54\x31","\x54\x32","\x4C\x31","\x4C\x31\x20\x44\x65\x73\x63","\x4C\x32","\x4C\x32\x20\x44\x65\x73\x63","\x4C\x33","\x4C\x33\x20\x44\x65\x73\x63","\x47\x6F\x6F\x67\x6C\x65","\x46\x61\x63\x65\x62\x6F\x6F\x6B","\x54\x77\x69\x74\x74\x65\x72","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x44\x65\x66\x61\x75\x6C\x74\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x28\x44\x4F\x20\x4E\x4F\x54\x20\x44\x45\x4C\x45\x54\x45\x29","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x70\x2D\x70\x72\x6F\x76\x69\x64\x65\x72","\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x58\x65\x6E\x69\x61\x6C\x61\x62\x20\x74\x65\x73\x74","\x61\x67\x65\x6E\x74","\x25\x73\x25\x64","\x66\x6F\x72\x6D\x61\x74","\x25\x73\x25\x64\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x70\x61\x73\x73\x77\x6F\x72\x64","\x70\x75\x73\x68","\x71\x75\x65\x75\x65","\x4A\x6F\x68\x6E","\x44\x6F\x65","\x6A\x6F\x68\x6E\x2E\x64\x6F\x65","\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x54\x41\x47","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x66\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67","\x73\x65\x74\x74\x69\x6E\x67\x73","\x6C\x6F\x67","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x53\x65\x74\x74\x69\x6E\x67","\x75\x73\x65\x72\x73","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x55\x73\x65\x72","\x64\x65\x73\x74\x72\x6F\x79","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x76\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x73","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x74\x65\x61\x6D\x73","\x54\x65\x61\x6D","\x6C\x69\x73\x74\x73","\x43\x6D\x4C\x69\x73\x74","\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73","\x43\x6D\x43\x6F\x6D\x70\x61\x6E\x79","\x63\x6F\x6E\x74\x61\x63\x74\x73","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x74\x61\x67\x73","\x54\x61\x67"];_0x1c7b[0];var util=require(_0x1c7b[1]);var db=require(_0x1c7b[3])[_0x1c7b[2]];var users=[{id:1,provider:_0x1c7b[4],role:_0x1c7b[5],name:_0x1c7b[6],email:_0x1c7b[7],password:_0x1c7b[8],fullname:_0x1c7b[9],internal:2001},{id:2,provider:_0x1c7b[4],role:_0x1c7b[10],name:_0x1c7b[11],email:_0x1c7b[12],password:_0x1c7b[13],fullname:_0x1c7b[14],internal:2002}];var queues=[{id:1,name:_0x1c7b[15],strategy:_0x1c7b[16],acw:true,acwTimeout:5},{id:2,name:_0x1c7b[17],strategy:_0x1c7b[16],acw:true,acwTimeout:5}];var teams=[{id:1,name:_0x1c7b[18]},{id:2,name:_0x1c7b[19]}];var lists=[{id:1,name:_0x1c7b[20],description:_0x1c7b[21]},{id:2,name:_0x1c7b[22],description:_0x1c7b[23]},{id:3,name:_0x1c7b[24],description:_0x1c7b[25]}];var companies=[{id:1,name:_0x1c7b[26]},{id:2,name:_0x1c7b[27]},{id:3,name:_0x1c7b[28]}];var contexts=[{name:_0x1c7b[29],description:_0x1c7b[30],defaultEntry:true},{name:_0x1c7b[31],description:_0x1c7b[30],defaultEntry:true},{name:_0x1c7b[32],description:_0x1c7b[30],defaultEntry:true},{name:_0x1c7b[33],description:_0x1c7b[30],defaultEntry:true},{name:_0x1c7b[34],description:_0x1c7b[30],defaultEntry:true}];var setting={min_internal:1000,min_mailbox:1000,footerWhiteLabel:_0x1c7b[35]};var contacts=[];var tags=[];for(var i=0;i< 20;i++){users[_0x1c7b[41]]({id:1000+ i+ 1,internal:3000+ i,provider:_0x1c7b[4],role:_0x1c7b[36],name:util[_0x1c7b[38]](_0x1c7b[37],_0x1c7b[36],i+ 1),email:util[_0x1c7b[38]](_0x1c7b[39],_0x1c7b[36],i+ 1),password:_0x1c7b[40],fullname:util[_0x1c7b[38]](_0x1c7b[37],_0x1c7b[36],i+ 1)})};for(var i=0;i< 10;i++){queues[_0x1c7b[41]]({id:1000+ i+ 1,name:util[_0x1c7b[38]](_0x1c7b[37],_0x1c7b[42],i+ 1),strategy:_0x1c7b[16]})};for(var i=0;i< 20;i++){contacts[_0x1c7b[41]]({id:i+ 1,firstName:_0x1c7b[43]+ 1000+ i+ 1,lastName:_0x1c7b[44]+ 1000+ i+ 1,phone:1000+ i+ 1,email:_0x1c7b[45]+ 1000+ i+ 1+ _0x1c7b[46]})};for(var i=0;i< 20;i++){tags[_0x1c7b[41]]({id:i+ 1,name:_0x1c7b[47]+ i+ 1})};db[_0x1c7b[55]][_0x1c7b[54]]({where:{id:1},defaults:setting})[_0x1c7b[53]](function(){console[_0x1c7b[52]](_0x1c7b[50],_0x1c7b[51])})[_0x1c7b[49]](function(_0xfebdxd){console[_0x1c7b[48]](_0xfebdxd)});db[_0x1c7b[58]][_0x1c7b[59]]({where:{}})[_0x1c7b[53]](function(){db[_0x1c7b[58]][_0x1c7b[57]](users)})[_0x1c7b[53]](function(){console[_0x1c7b[52]](_0x1c7b[50],_0x1c7b[56])})[_0x1c7b[49]](function(_0xfebdxd){console[_0x1c7b[48]](_0xfebdxd)});db[_0x1c7b[61]][_0x1c7b[59]]({where:{}})[_0x1c7b[53]](function(){return db[_0x1c7b[61]][_0x1c7b[57]](queues)})[_0x1c7b[53]](function(){console[_0x1c7b[52]](_0x1c7b[50],_0x1c7b[60])})[_0x1c7b[49]](function(_0xfebdxd){console[_0x1c7b[48]](_0xfebdxd)});db[_0x1c7b[63]][_0x1c7b[57]](contexts,{ignoreDuplicates:true})[_0x1c7b[53]](function(){console[_0x1c7b[52]](_0x1c7b[50],_0x1c7b[62])})[_0x1c7b[49]](function(_0xfebdxd){console[_0x1c7b[48]](_0xfebdxd)});db[_0x1c7b[65]][_0x1c7b[59]]({where:{}})[_0x1c7b[53]](function(){return db[_0x1c7b[65]][_0x1c7b[57]](teams)})[_0x1c7b[53]](function(){console[_0x1c7b[52]](_0x1c7b[50],_0x1c7b[64])})[_0x1c7b[49]](function(_0xfebdxd){console[_0x1c7b[48]](_0xfebdxd)});db[_0x1c7b[67]][_0x1c7b[59]]({where:{}})[_0x1c7b[53]](function(){return db[_0x1c7b[67]][_0x1c7b[57]](lists)})[_0x1c7b[53]](function(){console[_0x1c7b[52]](_0x1c7b[50],_0x1c7b[66])})[_0x1c7b[49]](function(_0xfebdxd){console[_0x1c7b[48]](_0xfebdxd)});db[_0x1c7b[69]][_0x1c7b[59]]({where:{}})[_0x1c7b[53]](function(){return db[_0x1c7b[69]][_0x1c7b[57]](companies)})[_0x1c7b[53]](function(){console[_0x1c7b[52]](_0x1c7b[50],_0x1c7b[68])})[_0x1c7b[49]](function(_0xfebdxd){console[_0x1c7b[48]](_0xfebdxd)});db[_0x1c7b[71]][_0x1c7b[59]]({where:{}})[_0x1c7b[53]](function(){return db[_0x1c7b[71]][_0x1c7b[57]](contacts)})[_0x1c7b[53]](function(){console[_0x1c7b[52]](_0x1c7b[50],_0x1c7b[70])})[_0x1c7b[49]](function(_0xfebdxd){console[_0x1c7b[48]](_0xfebdxd)});db[_0x1c7b[73]][_0x1c7b[59]]({where:{}})[_0x1c7b[53]](function(){return db[_0x1c7b[73]][_0x1c7b[57]](tags)})[_0x1c7b[53]](function(){console[_0x1c7b[52]](_0x1c7b[50],_0x1c7b[72])})[_0x1c7b[49]](function(_0xfebdxd){console[_0x1c7b[48]](_0xfebdxd)})
\ No newline at end of file
index 4933eb6..e42f6ba 100644 (file)
@@ -1 +1 @@
-var _0xb9ff=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x64\x62","\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x49\x6E\x6E\x6F\x63\x65\x6E\x7A\x6F","\x42\x69\x6F\x6E\x64\x6F","\x69\x6E\x6E\x6F\x63\x65\x6E\x7A\x6F\x2E\x62\x69\x6F\x6E\x64\x6F","\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x70\x75\x73\x68","\x6E\x6F\x77","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x66\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67","\x68\x6F\x70\x70\x65\x72\x32","\x74\x68\x65\x6E","\x63\x6F\x6E\x74\x61\x63\x74\x73\x32","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x43\x6D\x48\x6F\x70\x70\x65\x72","\x68\x6F\x70\x70\x65\x72\x31","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x63\x6F\x6E\x74\x61\x63\x74\x73\x31","\x64\x65\x73\x74\x72\x6F\x79"];_0xb9ff[0];var util=require(_0xb9ff[1]);var db=require(_0xb9ff[3])[_0xb9ff[2]];var contacts=[];var hopper=[];var contacts2=[];var hopper2=[];for(var i=1;i<= 1200;i+= 1){contacts[_0xb9ff[8]]({id:i,firstName:_0xb9ff[4]+ i,lastName:_0xb9ff[5]+ i,phone:66699900000+ i,email:_0xb9ff[6]+ i+ _0xb9ff[7]})};for(var i=1;i<= 1200;i+= 1){hopper[_0xb9ff[8]]({id:i,active:false,scheduledat:Date[_0xb9ff[9]](),countbusyretry:0,countcongestionretry:0,countnoanswerretry:0,ContactId:i,ListId:1,UserId:1,VoiceQueueId:1021,createdAt:Date[_0xb9ff[9]](),updatedAt:Date[_0xb9ff[9]]()})};for(var i=1201;i<= 2400;i+= 1){contacts2[_0xb9ff[8]]({id:i,firstName:_0xb9ff[4]+ i,lastName:_0xb9ff[5]+ i,phone:66699900000+ i,email:_0xb9ff[6]+ i+ _0xb9ff[7]})};for(var i=1201;i<= 2400;i+= 1){hopper2[_0xb9ff[8]]({id:i,active:false,scheduledat:Date[_0xb9ff[9]](),countbusyretry:0,countcongestionretry:0,countnoanswerretry:0,ContactId:i,ListId:1,UserId:1,VoiceQueueId:1021,createdAt:Date[_0xb9ff[9]](),updatedAt:Date[_0xb9ff[9]]()})};db[_0xb9ff[19]][_0xb9ff[21]]({where:{}})[_0xb9ff[14]](function(){return db[_0xb9ff[19]][_0xb9ff[16]](contacts)})[_0xb9ff[14]](function(){console[_0xb9ff[10]](_0xb9ff[12],_0xb9ff[20]);return db[_0xb9ff[17]][_0xb9ff[21]]({where:{}})})[_0xb9ff[14]](function(){return db[_0xb9ff[17]][_0xb9ff[16]](hopper)})[_0xb9ff[14]](function(){console[_0xb9ff[10]](_0xb9ff[12],_0xb9ff[18]);return db[_0xb9ff[19]][_0xb9ff[16]](contacts2)})[_0xb9ff[14]](function(){console[_0xb9ff[10]](_0xb9ff[12],_0xb9ff[15]);return db[_0xb9ff[17]][_0xb9ff[16]](hopper2)})[_0xb9ff[14]](function(){console[_0xb9ff[10]](_0xb9ff[12],_0xb9ff[13])})[_0xb9ff[11]](function(_0x5848x8){console[_0xb9ff[10]](_0x5848x8)})
\ No newline at end of file
+var _0xf854=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x64\x62","\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x49\x6E\x6E\x6F\x63\x65\x6E\x7A\x6F","\x42\x69\x6F\x6E\x64\x6F","\x69\x6E\x6E\x6F\x63\x65\x6E\x7A\x6F\x2E\x62\x69\x6F\x6E\x64\x6F","\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x70\x75\x73\x68","\x6E\x6F\x77","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x66\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67","\x68\x6F\x70\x70\x65\x72\x32","\x74\x68\x65\x6E","\x63\x6F\x6E\x74\x61\x63\x74\x73\x32","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x43\x6D\x48\x6F\x70\x70\x65\x72","\x68\x6F\x70\x70\x65\x72\x31","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x63\x6F\x6E\x74\x61\x63\x74\x73\x31","\x64\x65\x73\x74\x72\x6F\x79"];_0xf854[0];var util=require(_0xf854[1]);var db=require(_0xf854[3])[_0xf854[2]];var contacts=[];var hopper=[];var contacts2=[];var hopper2=[];for(var i=1;i<= 1200;i+= 1){contacts[_0xf854[8]]({id:i,firstName:_0xf854[4]+ i,lastName:_0xf854[5]+ i,phone:66699900000+ i,email:_0xf854[6]+ i+ _0xf854[7]})};for(var i=1;i<= 1200;i+= 1){hopper[_0xf854[8]]({id:i,active:false,scheduledat:Date[_0xf854[9]](),countbusyretry:0,countcongestionretry:0,countnoanswerretry:0,ContactId:i,ListId:1,UserId:1,VoiceQueueId:1021,createdAt:Date[_0xf854[9]](),updatedAt:Date[_0xf854[9]]()})};for(var i=1201;i<= 2400;i+= 1){contacts2[_0xf854[8]]({id:i,firstName:_0xf854[4]+ i,lastName:_0xf854[5]+ i,phone:66699900000+ i,email:_0xf854[6]+ i+ _0xf854[7]})};for(var i=1201;i<= 2400;i+= 1){hopper2[_0xf854[8]]({id:i,active:false,scheduledat:Date[_0xf854[9]](),countbusyretry:0,countcongestionretry:0,countnoanswerretry:0,ContactId:i,ListId:1,UserId:1,VoiceQueueId:1021,createdAt:Date[_0xf854[9]](),updatedAt:Date[_0xf854[9]]()})};db[_0xf854[19]][_0xf854[21]]({where:{}})[_0xf854[14]](function(){return db[_0xf854[19]][_0xf854[16]](contacts)})[_0xf854[14]](function(){console[_0xf854[10]](_0xf854[12],_0xf854[20]);return db[_0xf854[17]][_0xf854[21]]({where:{}})})[_0xf854[14]](function(){return db[_0xf854[17]][_0xf854[16]](hopper)})[_0xf854[14]](function(){console[_0xf854[10]](_0xf854[12],_0xf854[18]);return db[_0xf854[19]][_0xf854[16]](contacts2)})[_0xf854[14]](function(){console[_0xf854[10]](_0xf854[12],_0xf854[15]);return db[_0xf854[17]][_0xf854[16]](hopper2)})[_0xf854[14]](function(){console[_0xf854[10]](_0xf854[12],_0xf854[13])})[_0xf854[11]](function(_0xb317x8){console[_0xf854[10]](_0xb317x8)})
\ No newline at end of file
index 6d1a1a5..ceb9d44 100644 (file)
@@ -1 +1 @@
-var _0xa71f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x64\x62","\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x25\x73\x25\x73","\x61\x67\x65\x6E\x74","\x66\x6F\x72\x6D\x61\x74","\x25\x73\x25\x73\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x70\x61\x73\x73\x77\x6F\x72\x64","\x66\x72\x69\x65\x6E\x64","\x75\x64\x70","\x77\x73","\x77\x73\x73","\x61\x6C\x6C","\x75\x6C\x61\x77","\x79\x65\x73","\x6E\x6F","\x2F\x65\x74\x63\x2F\x70\x6B\x69\x2F\x74\x6C\x73\x2F\x63\x65\x72\x74\x73\x2F\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x72\x74","\x2F\x65\x74\x63\x2F\x70\x6B\x69\x2F\x74\x6C\x73\x2F\x70\x72\x69\x76\x61\x74\x65\x2F\x6D\x6F\x74\x69\x6F\x6E\x2E\x6B\x65\x79","\x61\x63\x74\x70\x61\x73\x73","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x70\x75\x73\x68","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x61\x64\x64\x20\x75\x73\x65\x72","\x74\x68\x65\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x55\x73\x65\x72"];_0xa71f[0];var util=require(_0xa71f[1]);var db=require(_0xa71f[3])[_0xa71f[2]];var users=[];for(var i=1;i<= 200;i+= 1){users[_0xa71f[21]]({name:util[_0xa71f[6]](_0xa71f[4],_0xa71f[5],i),fullname:util[_0xa71f[6]](_0xa71f[4],_0xa71f[5],i),email:util[_0xa71f[6]](_0xa71f[7],_0xa71f[5],i),role:_0xa71f[5],password:_0xa71f[8],internal:4000+ i,type:_0xa71f[9],transport:[_0xa71f[10],_0xa71f[11],_0xa71f[12]],disallow:[_0xa71f[13]],allow:[_0xa71f[14]],defaultuser:util[_0xa71f[6]](_0xa71f[4],_0xa71f[5],i),encryption:_0xa71f[15],avpf:_0xa71f[15],force_avp:_0xa71f[15],icesupport:_0xa71f[15],dtlsenable:_0xa71f[15],dtlsverify:_0xa71f[16],dtlscertfile:_0xa71f[17],dtlsprivatekey:_0xa71f[18],dtlssetup:_0xa71f[19],callerid:util[_0xa71f[6]](_0xa71f[20],util[_0xa71f[6]](_0xa71f[4],_0xa71f[5],i),4000+ i)})};db[_0xa71f[27]][_0xa71f[26]](users)[_0xa71f[25]](function(){console[_0xa71f[22]](_0xa71f[24])})[_0xa71f[23]](function(_0x7c95x5){console[_0xa71f[22]](_0x7c95x5)})
\ No newline at end of file
+var _0x75fc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x64\x62","\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x25\x73\x25\x73","\x61\x67\x65\x6E\x74","\x66\x6F\x72\x6D\x61\x74","\x25\x73\x25\x73\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x70\x61\x73\x73\x77\x6F\x72\x64","\x66\x72\x69\x65\x6E\x64","\x75\x64\x70","\x77\x73","\x77\x73\x73","\x61\x6C\x6C","\x75\x6C\x61\x77","\x79\x65\x73","\x6E\x6F","\x2F\x65\x74\x63\x2F\x70\x6B\x69\x2F\x74\x6C\x73\x2F\x63\x65\x72\x74\x73\x2F\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x72\x74","\x2F\x65\x74\x63\x2F\x70\x6B\x69\x2F\x74\x6C\x73\x2F\x70\x72\x69\x76\x61\x74\x65\x2F\x6D\x6F\x74\x69\x6F\x6E\x2E\x6B\x65\x79","\x61\x63\x74\x70\x61\x73\x73","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x70\x75\x73\x68","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x61\x64\x64\x20\x75\x73\x65\x72","\x74\x68\x65\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x55\x73\x65\x72"];_0x75fc[0];var util=require(_0x75fc[1]);var db=require(_0x75fc[3])[_0x75fc[2]];var users=[];for(var i=1;i<= 200;i+= 1){users[_0x75fc[21]]({name:util[_0x75fc[6]](_0x75fc[4],_0x75fc[5],i),fullname:util[_0x75fc[6]](_0x75fc[4],_0x75fc[5],i),email:util[_0x75fc[6]](_0x75fc[7],_0x75fc[5],i),role:_0x75fc[5],password:_0x75fc[8],internal:4000+ i,type:_0x75fc[9],transport:[_0x75fc[10],_0x75fc[11],_0x75fc[12]],disallow:[_0x75fc[13]],allow:[_0x75fc[14]],defaultuser:util[_0x75fc[6]](_0x75fc[4],_0x75fc[5],i),encryption:_0x75fc[15],avpf:_0x75fc[15],force_avp:_0x75fc[15],icesupport:_0x75fc[15],dtlsenable:_0x75fc[15],dtlsverify:_0x75fc[16],dtlscertfile:_0x75fc[17],dtlsprivatekey:_0x75fc[18],dtlssetup:_0x75fc[19],callerid:util[_0x75fc[6]](_0x75fc[20],util[_0x75fc[6]](_0x75fc[4],_0x75fc[5],i),4000+ i)})};db[_0x75fc[27]][_0x75fc[26]](users)[_0x75fc[25]](function(){console[_0x75fc[22]](_0x75fc[24])})[_0x75fc[23]](function(_0x9412x5){console[_0x75fc[22]](_0x9412x5)})
\ No newline at end of file
index ab58ba3..48e5d32 100644 (file)
@@ -1 +1 @@
-var _0x7582=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x64\x62","\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x41\x67\x65\x6E\x74\x73","\x55\x73\x65\x72","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x74\x79\x70\x65","\x69\x76\x72","\x71\x75\x65\x72\x79","\x68\x61\x6E\x64\x73\x68\x61\x6B\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x6C\x65\x61\x76\x65","\x6D\x61\x70","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x72\x65\x6D\x6F\x76\x65","\x65\x6D\x69\x74","\x74\x68\x65\x6E","\x72\x65\x6D\x6F\x76\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x76\x6F\x69\x63\x65\x3A\x71\x75\x65\x75\x65\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x75\x73\x65\x72\x3A\x25\x73","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x3A\x25\x73","\x74\x72\x75\x6E\x6B\x3A\x25\x73","\x63\x61\x6D\x70\x61\x69\x67\x6E\x3A\x25\x73\x3A\x25\x73","\x76\x6F\x69\x63\x65\x3A\x69\x6E\x62\x6F\x75\x6E\x64","\x76\x6F\x69\x63\x65\x3A\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x69\x6E\x63\x6C\x75\x64\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x70\x75\x73\x68","\x54\x72\x75\x6E\x6B","\x43\x61\x6D\x70\x61\x69\x67\x6E","\x61\x64\x6D\x69\x6E","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x75\x73\x65\x72","\x61\x6C\x6C","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64","\x6A\x6F\x69\x6E","\x64\x65\x66\x61\x75\x6C\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x61\x64\x64\x72\x65\x73\x73","\x72\x65\x6D\x6F\x74\x65\x41\x64\x64\x72\x65\x73\x73","\x72\x65\x71\x75\x65\x73\x74","\x3A","\x72\x65\x6D\x6F\x74\x65\x50\x6F\x72\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x41\x74","\x53\x6F\x63\x6B\x65\x74\x49\x4F\x20","\x6E\x73\x70","\x5B","\x5D","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x44\x49\x53\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x6F\x6E","\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44"];_0x7582[0];var _=require(_0x7582[1]);var util=require(_0x7582[2]);var BPromise=require(_0x7582[3]);var db=require(_0x7582[5])[_0x7582[4]];var config=require(_0x7582[6]);var queryVoiceQueues={attributes:[_0x7582[7],_0x7582[8]],include:[{as:_0x7582[9],model:db[_0x7582[10]],attributes:[_0x7582[7],_0x7582[8],_0x7582[11]],raw:true,where:{role:_0x7582[12]},required:false}]};var queryTelephones={raw:true,attributes:[_0x7582[7],_0x7582[8]],where:{role:_0x7582[13]}};var queryTrunks={raw:true,attributes:[_0x7582[7],_0x7582[8]]};var queryAgents={raw:true,attributes:[_0x7582[7],_0x7582[8]],where:{role:_0x7582[12]}};var queryCampaigns={raw:true,attributes:[_0x7582[7],_0x7582[8],_0x7582[14]],where:{type:_0x7582[15]}};function joinOrLeave(_0x75b0xc,_0x75b0xd,_0x75b0xe){var _0x75b0xf;if(_0x75b0xc[_0x7582[17]][_0x7582[16]][_0x7582[7]]){db[_0x7582[10]][_0x7582[64]]({attributes:[_0x7582[7],_0x7582[8],_0x7582[11]],where:{id:_0x75b0xc[_0x7582[17]][_0x7582[16]][_0x7582[7]]},include:[{model:db[_0x7582[54]],as:_0x7582[55],attributes:[_0x7582[7]],raw:true},{model:db[_0x7582[56]],as:_0x7582[57],attributes:[_0x7582[7]],raw:true},{model:db[_0x7582[58]],as:_0x7582[59],attributes:[_0x7582[7]],raw:true},{model:db[_0x7582[60]],as:_0x7582[61],attributes:[_0x7582[7]],raw:true},{model:db[_0x7582[62]],as:_0x7582[63],attributes:[_0x7582[7]],raw:true}]})[_0x7582[25]](function(_0x75b0x16){if(_0x75b0x16){_0x75b0xf= _0x75b0x16;_0x75b0xc[_0x75b0xd](util[_0x7582[36]](_0x7582[37],_0x75b0x16[_0x7582[8]]));var _0x75b0x17=[];switch(_0x75b0x16[_0x7582[11]]){case _0x7582[50]:_0x75b0xc[_0x75b0xd](_0x7582[41]);_0x75b0xc[_0x75b0xd](_0x7582[42]);if(queryVoiceQueues[_0x7582[44]](_0x7582[43])){delete queryVoiceQueues[_0x7582[43]]};_0x75b0x17[_0x7582[47]](db[_0x7582[46]][_0x7582[45]](queryVoiceQueues));_0x75b0x17[_0x7582[47]](db[_0x7582[10]][_0x7582[45]](queryTelephones));_0x75b0x17[_0x7582[47]](db[_0x7582[48]][_0x7582[45]](queryTrunks));_0x75b0x17[_0x7582[47]](db[_0x7582[10]][_0x7582[45]](queryAgents));_0x75b0x17[_0x7582[47]](db[_0x7582[49]][_0x7582[45]](queryCampaigns));break;case _0x7582[52]:_0x75b0xc[_0x75b0xd](_0x7582[41]);_0x75b0xc[_0x75b0xd](_0x7582[42]);_0x75b0x17[_0x7582[47]](_0x75b0x16[_0x7582[51]](queryVoiceQueues));_0x75b0x17[_0x7582[47]](db[_0x7582[10]][_0x7582[45]](queryTelephones));_0x75b0x17[_0x7582[47]](db[_0x7582[48]][_0x7582[45]](queryTrunks));_0x75b0x17[_0x7582[47]](db[_0x7582[10]][_0x7582[45]](queryAgents));_0x75b0x17[_0x7582[47]](db[_0x7582[49]][_0x7582[45]](queryCampaigns));break;case _0x7582[12]:_0x75b0xc[_0x75b0xd](_0x7582[41]);_0x75b0xc[_0x75b0xd](_0x7582[42]);_0x75b0x17[_0x7582[47]](_0x75b0x16[_0x7582[51]]({attributes:[_0x7582[7],_0x7582[8]]}))};return BPromise[_0x7582[53]](_0x75b0x17)}})[_0x7582[25]](function(_0x75b0x13){if(_0x75b0x13&& _0x75b0x13[_0x7582[22]]){for(var _0x75b0x12=0;_0x75b0x12< _0x75b0x13[_0x7582[22]];_0x75b0x12+= 1){for(var _0x75b0x14=0;_0x75b0x14< _0x75b0x13[_0x75b0x12][_0x7582[22]];_0x75b0x14+= 1){switch(_0x75b0x12){case 0:_0x75b0xc[_0x75b0xd](util[_0x7582[36]](_0x7582[35],_0x75b0x13[_0x75b0x12][_0x75b0x14][_0x7582[8]]));if(_0x75b0x13[_0x75b0x12][_0x75b0x14][_0x7582[9]]){for(var _0x75b0x15=0;_0x75b0x15< _0x75b0x13[_0x75b0x12][_0x75b0x14][_0x7582[9]][_0x7582[22]];_0x75b0x15+= 1){_0x75b0xc[_0x75b0xd](util[_0x7582[36]](_0x7582[37],_0x75b0x13[_0x75b0x12][_0x75b0x14][_0x7582[9]][_0x75b0x15][_0x7582[8]]))}};break;case 1:_0x75b0xc[_0x75b0xd](util[_0x7582[36]](_0x7582[38],_0x75b0x13[_0x75b0x12][_0x75b0x14][_0x7582[8]]));break;case 2:_0x75b0xc[_0x75b0xd](util[_0x7582[36]](_0x7582[39],_0x75b0x13[_0x75b0x12][_0x75b0x14][_0x7582[8]]));break;case 3:_0x75b0xc[_0x75b0xd](util[_0x7582[36]](_0x7582[37],_0x75b0x13[_0x75b0x12][_0x75b0x14][_0x7582[8]]));break;case 4:_0x75b0xc[_0x75b0xd](util[_0x7582[36]](_0x7582[40],_0x75b0x13[_0x75b0x12][_0x75b0x14][_0x7582[14]],_0x75b0x13[_0x75b0x12][_0x75b0x14][_0x7582[8]]));break}}}}})[_0x7582[25]](function(){if(_0x75b0xd=== _0x7582[20]){var _0x75b0x11=_[_0x7582[21]](_0x75b0xf.ChatInteractions,_0x7582[7]);return _0x75b0xf[_0x7582[34]](_0x75b0x11)[_0x7582[25]](function(){for(var _0x75b0x12=0;_0x75b0x12< _0x75b0x11[_0x7582[22]];_0x75b0x12+= 1){_0x75b0xe[_0x7582[24]](_0x7582[33],{ChatInteractionId:Number(_0x75b0x11[_0x75b0x12]),UserId:Number(_0x75b0xf[_0x7582[7]])})}})}})[_0x7582[25]](function(){if(_0x75b0xd=== _0x7582[20]){var _0x75b0x11=_[_0x7582[21]](_0x75b0xf.MailInteractions,_0x7582[7]);return _0x75b0xf[_0x7582[32]](_0x75b0x11)[_0x7582[25]](function(){for(var _0x75b0x12=0;_0x75b0x12< _0x75b0x11[_0x7582[22]];_0x75b0x12+= 1){_0x75b0xe[_0x7582[24]](_0x7582[31],{MailInteractionId:Number(_0x75b0x11[_0x75b0x12]),UserId:Number(_0x75b0xf[_0x7582[7]])})}})}})[_0x7582[25]](function(){if(_0x75b0xd=== _0x7582[20]){var _0x75b0x11=_[_0x7582[21]](_0x75b0xf.FaxInteractions,_0x7582[7]);return _0x75b0xf[_0x7582[30]](_0x75b0x11)[_0x7582[25]](function(){for(var _0x75b0x12=0;_0x75b0x12< _0x75b0x11[_0x7582[22]];_0x75b0x12+= 1){_0x75b0xe[_0x7582[24]](_0x7582[29],{FaxInteractionId:Number(_0x75b0x11[_0x75b0x12]),UserId:Number(_0x75b0xf[_0x7582[7]])})}})}})[_0x7582[25]](function(){if(_0x75b0xd=== _0x7582[20]){var _0x75b0x11=_[_0x7582[21]](_0x75b0xf.SmsInteractions,_0x7582[7]);return _0x75b0xf[_0x7582[28]](_0x75b0x11)[_0x7582[25]](function(){for(var _0x75b0x12=0;_0x75b0x12< _0x75b0x11[_0x7582[22]];_0x75b0x12+= 1){_0x75b0xe[_0x7582[24]](_0x7582[27],{SmsInteractionId:Number(_0x75b0x11[_0x75b0x12]),UserId:Number(_0x75b0xf[_0x7582[7]])})}})}})[_0x7582[25]](function(){if(_0x75b0xd=== _0x7582[20]){var _0x75b0x11=_[_0x7582[21]](_0x75b0xf.OpenchannelInteractions,_0x7582[7]);return _0x75b0xf[_0x7582[26]](_0x75b0x11)[_0x7582[25]](function(){for(var _0x75b0x12=0;_0x75b0x12< _0x75b0x11[_0x7582[22]];_0x75b0x12+= 1){_0x75b0xe[_0x7582[24]](_0x7582[23],{OpenchannelInteractionId:Number(_0x75b0x11[_0x75b0x12]),UserId:Number(_0x75b0xf[_0x7582[7]])})}})}})[_0x7582[19]](function(_0x75b0x10){_0x75b0xc[_0x7582[18]](_0x75b0x10)})}}function onDisconnect(_0x75b0xc,_0x75b0xe){joinOrLeave(_0x75b0xc,_0x7582[20],_0x75b0xe)}function onConnect(_0x75b0xc){joinOrLeave(_0x75b0xc,_0x7582[65])}exports[_0x7582[66]]= function(_0x75b0x1a){_0x75b0x1a[_0x7582[81]](_0x7582[67],function(_0x75b0xc){_0x75b0xc[_0x7582[68]](0);_0x75b0xc[_0x7582[69]]= _0x75b0xc[_0x7582[71]][_0x7582[67]][_0x7582[70]]+ _0x7582[72]+ _0x75b0xc[_0x7582[71]][_0x7582[67]][_0x7582[73]];_0x75b0xc[_0x7582[74]]=  new Date();_0x75b0xc[_0x7582[18]]= function(_0x75b0x1b){console[_0x7582[18]](_0x7582[75]+ _0x75b0xc[_0x7582[76]][_0x7582[8]]+ _0x7582[77]+ _0x75b0xc[_0x7582[69]]+ _0x7582[78],_0x75b0x1b)};_0x75b0xc[_0x7582[81]](_0x7582[79],function(){onDisconnect(_0x75b0xc,_0x75b0x1a);_0x75b0xc[_0x7582[18]](_0x7582[80])});onConnect(_0x75b0xc);_0x75b0xc[_0x7582[18]](_0x7582[82])})}
\ No newline at end of file
+var _0xca0b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x64\x62","\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x41\x67\x65\x6E\x74\x73","\x55\x73\x65\x72","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x74\x79\x70\x65","\x69\x76\x72","\x71\x75\x65\x72\x79","\x68\x61\x6E\x64\x73\x68\x61\x6B\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x6C\x65\x61\x76\x65","\x6D\x61\x70","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x72\x65\x6D\x6F\x76\x65","\x65\x6D\x69\x74","\x74\x68\x65\x6E","\x72\x65\x6D\x6F\x76\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x76\x6F\x69\x63\x65\x3A\x71\x75\x65\x75\x65\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x75\x73\x65\x72\x3A\x25\x73","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x3A\x25\x73","\x74\x72\x75\x6E\x6B\x3A\x25\x73","\x63\x61\x6D\x70\x61\x69\x67\x6E\x3A\x25\x73\x3A\x25\x73","\x76\x6F\x69\x63\x65\x3A\x69\x6E\x62\x6F\x75\x6E\x64","\x76\x6F\x69\x63\x65\x3A\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x69\x6E\x63\x6C\x75\x64\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x70\x75\x73\x68","\x54\x72\x75\x6E\x6B","\x43\x61\x6D\x70\x61\x69\x67\x6E","\x61\x64\x6D\x69\x6E","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x75\x73\x65\x72","\x61\x6C\x6C","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64","\x6A\x6F\x69\x6E","\x64\x65\x66\x61\x75\x6C\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x61\x64\x64\x72\x65\x73\x73","\x72\x65\x6D\x6F\x74\x65\x41\x64\x64\x72\x65\x73\x73","\x72\x65\x71\x75\x65\x73\x74","\x3A","\x72\x65\x6D\x6F\x74\x65\x50\x6F\x72\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x41\x74","\x53\x6F\x63\x6B\x65\x74\x49\x4F\x20","\x6E\x73\x70","\x5B","\x5D","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x44\x49\x53\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x6F\x6E","\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44"];_0xca0b[0];var _=require(_0xca0b[1]);var util=require(_0xca0b[2]);var BPromise=require(_0xca0b[3]);var db=require(_0xca0b[5])[_0xca0b[4]];var config=require(_0xca0b[6]);var queryVoiceQueues={attributes:[_0xca0b[7],_0xca0b[8]],include:[{as:_0xca0b[9],model:db[_0xca0b[10]],attributes:[_0xca0b[7],_0xca0b[8],_0xca0b[11]],raw:true,where:{role:_0xca0b[12]},required:false}]};var queryTelephones={raw:true,attributes:[_0xca0b[7],_0xca0b[8]],where:{role:_0xca0b[13]}};var queryTrunks={raw:true,attributes:[_0xca0b[7],_0xca0b[8]]};var queryAgents={raw:true,attributes:[_0xca0b[7],_0xca0b[8]],where:{role:_0xca0b[12]}};var queryCampaigns={raw:true,attributes:[_0xca0b[7],_0xca0b[8],_0xca0b[14]],where:{type:_0xca0b[15]}};function joinOrLeave(_0xe521xc,_0xe521xd,_0xe521xe){var _0xe521xf;if(_0xe521xc[_0xca0b[17]][_0xca0b[16]][_0xca0b[7]]){db[_0xca0b[10]][_0xca0b[64]]({attributes:[_0xca0b[7],_0xca0b[8],_0xca0b[11]],where:{id:_0xe521xc[_0xca0b[17]][_0xca0b[16]][_0xca0b[7]]},include:[{model:db[_0xca0b[54]],as:_0xca0b[55],attributes:[_0xca0b[7]],raw:true},{model:db[_0xca0b[56]],as:_0xca0b[57],attributes:[_0xca0b[7]],raw:true},{model:db[_0xca0b[58]],as:_0xca0b[59],attributes:[_0xca0b[7]],raw:true},{model:db[_0xca0b[60]],as:_0xca0b[61],attributes:[_0xca0b[7]],raw:true},{model:db[_0xca0b[62]],as:_0xca0b[63],attributes:[_0xca0b[7]],raw:true}]})[_0xca0b[25]](function(_0xe521x16){if(_0xe521x16){_0xe521xf= _0xe521x16;_0xe521xc[_0xe521xd](util[_0xca0b[36]](_0xca0b[37],_0xe521x16[_0xca0b[8]]));var _0xe521x17=[];switch(_0xe521x16[_0xca0b[11]]){case _0xca0b[50]:_0xe521xc[_0xe521xd](_0xca0b[41]);_0xe521xc[_0xe521xd](_0xca0b[42]);if(queryVoiceQueues[_0xca0b[44]](_0xca0b[43])){delete queryVoiceQueues[_0xca0b[43]]};_0xe521x17[_0xca0b[47]](db[_0xca0b[46]][_0xca0b[45]](queryVoiceQueues));_0xe521x17[_0xca0b[47]](db[_0xca0b[10]][_0xca0b[45]](queryTelephones));_0xe521x17[_0xca0b[47]](db[_0xca0b[48]][_0xca0b[45]](queryTrunks));_0xe521x17[_0xca0b[47]](db[_0xca0b[10]][_0xca0b[45]](queryAgents));_0xe521x17[_0xca0b[47]](db[_0xca0b[49]][_0xca0b[45]](queryCampaigns));break;case _0xca0b[52]:_0xe521xc[_0xe521xd](_0xca0b[41]);_0xe521xc[_0xe521xd](_0xca0b[42]);_0xe521x17[_0xca0b[47]](_0xe521x16[_0xca0b[51]](queryVoiceQueues));_0xe521x17[_0xca0b[47]](db[_0xca0b[10]][_0xca0b[45]](queryTelephones));_0xe521x17[_0xca0b[47]](db[_0xca0b[48]][_0xca0b[45]](queryTrunks));_0xe521x17[_0xca0b[47]](db[_0xca0b[10]][_0xca0b[45]](queryAgents));_0xe521x17[_0xca0b[47]](db[_0xca0b[49]][_0xca0b[45]](queryCampaigns));break;case _0xca0b[12]:_0xe521xc[_0xe521xd](_0xca0b[41]);_0xe521xc[_0xe521xd](_0xca0b[42]);_0xe521x17[_0xca0b[47]](_0xe521x16[_0xca0b[51]]({attributes:[_0xca0b[7],_0xca0b[8]]}))};return BPromise[_0xca0b[53]](_0xe521x17)}})[_0xca0b[25]](function(_0xe521x13){if(_0xe521x13&& _0xe521x13[_0xca0b[22]]){for(var _0xe521x12=0;_0xe521x12< _0xe521x13[_0xca0b[22]];_0xe521x12+= 1){for(var _0xe521x14=0;_0xe521x14< _0xe521x13[_0xe521x12][_0xca0b[22]];_0xe521x14+= 1){switch(_0xe521x12){case 0:_0xe521xc[_0xe521xd](util[_0xca0b[36]](_0xca0b[35],_0xe521x13[_0xe521x12][_0xe521x14][_0xca0b[8]]));if(_0xe521x13[_0xe521x12][_0xe521x14][_0xca0b[9]]){for(var _0xe521x15=0;_0xe521x15< _0xe521x13[_0xe521x12][_0xe521x14][_0xca0b[9]][_0xca0b[22]];_0xe521x15+= 1){_0xe521xc[_0xe521xd](util[_0xca0b[36]](_0xca0b[37],_0xe521x13[_0xe521x12][_0xe521x14][_0xca0b[9]][_0xe521x15][_0xca0b[8]]))}};break;case 1:_0xe521xc[_0xe521xd](util[_0xca0b[36]](_0xca0b[38],_0xe521x13[_0xe521x12][_0xe521x14][_0xca0b[8]]));break;case 2:_0xe521xc[_0xe521xd](util[_0xca0b[36]](_0xca0b[39],_0xe521x13[_0xe521x12][_0xe521x14][_0xca0b[8]]));break;case 3:_0xe521xc[_0xe521xd](util[_0xca0b[36]](_0xca0b[37],_0xe521x13[_0xe521x12][_0xe521x14][_0xca0b[8]]));break;case 4:_0xe521xc[_0xe521xd](util[_0xca0b[36]](_0xca0b[40],_0xe521x13[_0xe521x12][_0xe521x14][_0xca0b[14]],_0xe521x13[_0xe521x12][_0xe521x14][_0xca0b[8]]));break}}}}})[_0xca0b[25]](function(){if(_0xe521xd=== _0xca0b[20]){var _0xe521x11=_[_0xca0b[21]](_0xe521xf.ChatInteractions,_0xca0b[7]);return _0xe521xf[_0xca0b[34]](_0xe521x11)[_0xca0b[25]](function(){for(var _0xe521x12=0;_0xe521x12< _0xe521x11[_0xca0b[22]];_0xe521x12+= 1){_0xe521xe[_0xca0b[24]](_0xca0b[33],{ChatInteractionId:Number(_0xe521x11[_0xe521x12]),UserId:Number(_0xe521xf[_0xca0b[7]])})}})}})[_0xca0b[25]](function(){if(_0xe521xd=== _0xca0b[20]){var _0xe521x11=_[_0xca0b[21]](_0xe521xf.MailInteractions,_0xca0b[7]);return _0xe521xf[_0xca0b[32]](_0xe521x11)[_0xca0b[25]](function(){for(var _0xe521x12=0;_0xe521x12< _0xe521x11[_0xca0b[22]];_0xe521x12+= 1){_0xe521xe[_0xca0b[24]](_0xca0b[31],{MailInteractionId:Number(_0xe521x11[_0xe521x12]),UserId:Number(_0xe521xf[_0xca0b[7]])})}})}})[_0xca0b[25]](function(){if(_0xe521xd=== _0xca0b[20]){var _0xe521x11=_[_0xca0b[21]](_0xe521xf.FaxInteractions,_0xca0b[7]);return _0xe521xf[_0xca0b[30]](_0xe521x11)[_0xca0b[25]](function(){for(var _0xe521x12=0;_0xe521x12< _0xe521x11[_0xca0b[22]];_0xe521x12+= 1){_0xe521xe[_0xca0b[24]](_0xca0b[29],{FaxInteractionId:Number(_0xe521x11[_0xe521x12]),UserId:Number(_0xe521xf[_0xca0b[7]])})}})}})[_0xca0b[25]](function(){if(_0xe521xd=== _0xca0b[20]){var _0xe521x11=_[_0xca0b[21]](_0xe521xf.SmsInteractions,_0xca0b[7]);return _0xe521xf[_0xca0b[28]](_0xe521x11)[_0xca0b[25]](function(){for(var _0xe521x12=0;_0xe521x12< _0xe521x11[_0xca0b[22]];_0xe521x12+= 1){_0xe521xe[_0xca0b[24]](_0xca0b[27],{SmsInteractionId:Number(_0xe521x11[_0xe521x12]),UserId:Number(_0xe521xf[_0xca0b[7]])})}})}})[_0xca0b[25]](function(){if(_0xe521xd=== _0xca0b[20]){var _0xe521x11=_[_0xca0b[21]](_0xe521xf.OpenchannelInteractions,_0xca0b[7]);return _0xe521xf[_0xca0b[26]](_0xe521x11)[_0xca0b[25]](function(){for(var _0xe521x12=0;_0xe521x12< _0xe521x11[_0xca0b[22]];_0xe521x12+= 1){_0xe521xe[_0xca0b[24]](_0xca0b[23],{OpenchannelInteractionId:Number(_0xe521x11[_0xe521x12]),UserId:Number(_0xe521xf[_0xca0b[7]])})}})}})[_0xca0b[19]](function(_0xe521x10){_0xe521xc[_0xca0b[18]](_0xe521x10)})}}function onDisconnect(_0xe521xc,_0xe521xe){joinOrLeave(_0xe521xc,_0xca0b[20],_0xe521xe)}function onConnect(_0xe521xc){joinOrLeave(_0xe521xc,_0xca0b[65])}exports[_0xca0b[66]]= function(_0xe521x1a){_0xe521x1a[_0xca0b[81]](_0xca0b[67],function(_0xe521xc){_0xe521xc[_0xca0b[68]](0);_0xe521xc[_0xca0b[69]]= _0xe521xc[_0xca0b[71]][_0xca0b[67]][_0xca0b[70]]+ _0xca0b[72]+ _0xe521xc[_0xca0b[71]][_0xca0b[67]][_0xca0b[73]];_0xe521xc[_0xca0b[74]]=  new Date();_0xe521xc[_0xca0b[18]]= function(_0xe521x1b){console[_0xca0b[18]](_0xca0b[75]+ _0xe521xc[_0xca0b[76]][_0xca0b[8]]+ _0xca0b[77]+ _0xe521xc[_0xca0b[69]]+ _0xca0b[78],_0xe521x1b)};_0xe521xc[_0xca0b[81]](_0xca0b[79],function(){onDisconnect(_0xe521xc,_0xe521x1a);_0xe521xc[_0xca0b[18]](_0xca0b[80])});onConnect(_0xe521xc);_0xe521xc[_0xca0b[18]](_0xca0b[82])})}
\ No newline at end of file
index 6436973..3e685cd 100644 (file)
@@ -1 +1 @@
-var _0xe400=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x74\x72\x69\x67\x67\x65\x72\x73","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x6E\x65\x77\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x6C\x6F\x73\x65\x64\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x6E\x65\x77\x6D\x65\x73\x73\x61\x67\x65","\x53\x6D\x73","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x54\x72\x69\x67\x67\x65\x72\x2C\x20\x25\x73","\x45\x76\x65\x6E\x74\x4D\x61\x6E\x61\x67\x65\x72","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x6E\x66\x6F","\x63\x6F\x64\x65","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x67\x65\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x65\x76\x65\x6E\x74","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x55\x73\x65\x72\x49\x64","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x53\x49\x50\x2F\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x69\x6E\x63\x6F\x6D\x69\x6E\x67\x6D\x65\x73\x73\x61\x67\x65","\x69\x64","\x66\x69\x6E\x64","\x55\x73\x65\x72","\x6F\x75\x74\x67\x6F\x69\x6E\x67\x6D\x65\x73\x73\x61\x67\x65","\x6F\x70\x65\x6E\x65\x64","\x63\x6C\x6F\x73\x65\x64","\x63\x68\x61\x6E\x67\x65\x64","\x64\x65\x66\x61\x75\x6C\x74","\x6C\x65\x6E\x67\x74\x68","\x6D\x6F\x64\x65\x6C","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x68\x6F\x6F\x6B"];_0xe400[0];var util=require(_0xe400[1]);var db=require(_0xe400[3])[_0xe400[2]];var jayson=require(_0xe400[4]);var logger=require(_0xe400[6])(_0xe400[5]);var client=jayson[_0xe400[8]][_0xe400[7]]({port:9002});var triggers=[{channel:_0xe400[9],model:_0xe400[10],event:_0xe400[11],condition:_0xe400[12],callback:afterCreate},{channel:_0xe400[9],model:_0xe400[10],event:_0xe400[13],condition:_0xe400[14],callback:afterUpdate},{channel:_0xe400[9],model:_0xe400[15],event:_0xe400[11],condition:_0xe400[16],callback:afterCreateMessage},{channel:_0xe400[17],model:_0xe400[18],event:_0xe400[11],condition:_0xe400[12],callback:afterCreate},{channel:_0xe400[17],model:_0xe400[18],event:_0xe400[13],condition:_0xe400[14],callback:afterUpdate},{channel:_0xe400[17],model:_0xe400[19],event:_0xe400[11],condition:_0xe400[16],callback:afterCreateMessage},{channel:_0xe400[20],model:_0xe400[21],event:_0xe400[11],condition:_0xe400[12],callback:afterCreate},{channel:_0xe400[20],model:_0xe400[21],event:_0xe400[13],condition:_0xe400[14],callback:afterUpdate},{channel:_0xe400[20],model:_0xe400[22],event:_0xe400[11],condition:_0xe400[16],callback:afterCreateMessage},{channel:_0xe400[23],model:_0xe400[24],event:_0xe400[11],condition:_0xe400[12],callback:afterCreate},{channel:_0xe400[23],model:_0xe400[24],event:_0xe400[13],condition:_0xe400[14],callback:afterUpdate},{channel:_0xe400[23],model:_0xe400[25],event:_0xe400[11],condition:_0xe400[16],callback:afterCreateMessage},{channel:_0xe400[26],model:_0xe400[27],event:_0xe400[11],condition:_0xe400[12],callback:afterCreate},{channel:_0xe400[26],model:_0xe400[27],event:_0xe400[13],condition:_0xe400[14],callback:afterUpdate},{channel:_0xe400[26],model:_0xe400[28],event:_0xe400[11],condition:_0xe400[16],callback:afterCreateMessage}];function request(_0xb499x8){return client[_0xe400[36]](_0xe400[30],_0xb499x8)[_0xe400[35]](function(_0xb499xa){logger[_0xe400[33]](_0xe400[29],_0xe400[30],_0xb499xa);if(_0xb499xa[_0xe400[31]]){if(_0xb499xa[_0xe400[31]][_0xe400[34]]=== 500){logger[_0xe400[31]](_0xe400[29],_0xe400[30],_0xb499xa[_0xe400[31]])}}})[_0xe400[32]](function(_0xb499x9){logger[_0xe400[31]](_0xe400[29],_0xe400[30],_0xb499x9)})}function afterCreateMessage(_0xb499xc,_0xb499xd){return function(_0xb499x8,_0xb499xe){_0xb499x8= _0xb499x8[_0xe400[37]]({plain:true});_0xb499x8[_0xe400[38]]= _0xb499xc;_0xb499x8[_0xe400[39]]= _0xb499x8[_0xe400[40]];if(_0xb499x8[_0xe400[41]]){return db[_0xe400[49]][_0xe400[48]]({where:{id:_0xb499x8[_0xe400[41]]},attributes:[_0xe400[47],_0xe400[44]],raw:true})[_0xe400[35]](function(_0xb499xf){_0xb499x8[_0xe400[42]]= util[_0xe400[45]](_0xe400[43],_0xb499xf[_0xe400[44]]);_0xb499x8[_0xe400[38]]= _0xb499xc;return request({event:_0xe400[46],message:_0xb499x8})})[_0xe400[32]](function(_0xb499x9){console[_0xe400[31]](_0xb499x9)})}else {return request({event:_0xe400[50],message:_0xb499x8})}}}function afterCreate(_0xb499xc,_0xb499xd){return function(_0xb499x8,_0xb499xe){_0xb499x8= _0xb499x8[_0xe400[37]]({plain:true});_0xb499x8[_0xe400[38]]= _0xb499xc;_0xb499x8[_0xe400[39]]= _0xe400[51];return request({event:_0xb499xd,message:_0xb499x8})}}function afterUpdate(_0xb499xc,_0xb499xd){return function(_0xb499x8,_0xb499xe){if(_0xb499x8[_0xe400[53]](_0xe400[52])&& _0xb499x8[_0xe400[52]]){_0xb499x8= _0xb499x8[_0xe400[37]]({plain:true});_0xb499x8[_0xe400[38]]= _0xb499xc;_0xb499x8[_0xe400[39]]= _0xe400[52];if(_0xb499x8[_0xe400[41]]){return db[_0xe400[49]][_0xe400[48]]({where:{id:_0xb499x8[_0xe400[41]]},attributes:[_0xe400[47],_0xe400[44]],raw:true})[_0xe400[35]](function(_0xb499xf){_0xb499x8[_0xe400[42]]= util[_0xe400[45]](_0xe400[43],_0xb499xf[_0xe400[44]]);return request({event:_0xb499xd,message:_0xb499x8})})[_0xe400[32]](function(_0xb499x9){console[_0xe400[31]](_0xb499x9)})}else {return request({event:_0xb499xd,message:_0xb499x8})}}}}exports[_0xe400[54]]= function(){for(var _0xb499x12=0;_0xb499x12< triggers[_0xe400[55]];_0xb499x12+= 1){if(db[_0xe400[57]](triggers[_0xb499x12][_0xe400[56]])){db[triggers[_0xb499x12][_0xe400[56]]][_0xe400[61]](triggers[_0xb499x12][_0xe400[39]],triggers[_0xb499x12][_0xe400[60]](triggers[_0xb499x12][_0xe400[38]][_0xe400[58]](),triggers[_0xb499x12][_0xe400[59]]))}}}
\ No newline at end of file
+var _0xd9af=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x74\x72\x69\x67\x67\x65\x72\x73","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x43\x68\x61\x74","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x6E\x65\x77\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x6C\x6F\x73\x65\x64\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x6E\x65\x77\x6D\x65\x73\x73\x61\x67\x65","\x53\x6D\x73","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x54\x72\x69\x67\x67\x65\x72\x2C\x20\x25\x73","\x45\x76\x65\x6E\x74\x4D\x61\x6E\x61\x67\x65\x72","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x6E\x66\x6F","\x63\x6F\x64\x65","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x67\x65\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x65\x76\x65\x6E\x74","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x55\x73\x65\x72\x49\x64","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x53\x49\x50\x2F\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x69\x6E\x63\x6F\x6D\x69\x6E\x67\x6D\x65\x73\x73\x61\x67\x65","\x69\x64","\x66\x69\x6E\x64","\x55\x73\x65\x72","\x6F\x75\x74\x67\x6F\x69\x6E\x67\x6D\x65\x73\x73\x61\x67\x65","\x6F\x70\x65\x6E\x65\x64","\x63\x6C\x6F\x73\x65\x64","\x63\x68\x61\x6E\x67\x65\x64","\x64\x65\x66\x61\x75\x6C\x74","\x6C\x65\x6E\x67\x74\x68","\x6D\x6F\x64\x65\x6C","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x68\x6F\x6F\x6B"];_0xd9af[0];var util=require(_0xd9af[1]);var db=require(_0xd9af[3])[_0xd9af[2]];var jayson=require(_0xd9af[4]);var logger=require(_0xd9af[6])(_0xd9af[5]);var client=jayson[_0xd9af[8]][_0xd9af[7]]({port:9002});var triggers=[{channel:_0xd9af[9],model:_0xd9af[10],event:_0xd9af[11],condition:_0xd9af[12],callback:afterCreate},{channel:_0xd9af[9],model:_0xd9af[10],event:_0xd9af[13],condition:_0xd9af[14],callback:afterUpdate},{channel:_0xd9af[9],model:_0xd9af[15],event:_0xd9af[11],condition:_0xd9af[16],callback:afterCreateMessage},{channel:_0xd9af[17],model:_0xd9af[18],event:_0xd9af[11],condition:_0xd9af[12],callback:afterCreate},{channel:_0xd9af[17],model:_0xd9af[18],event:_0xd9af[13],condition:_0xd9af[14],callback:afterUpdate},{channel:_0xd9af[17],model:_0xd9af[19],event:_0xd9af[11],condition:_0xd9af[16],callback:afterCreateMessage},{channel:_0xd9af[20],model:_0xd9af[21],event:_0xd9af[11],condition:_0xd9af[12],callback:afterCreate},{channel:_0xd9af[20],model:_0xd9af[21],event:_0xd9af[13],condition:_0xd9af[14],callback:afterUpdate},{channel:_0xd9af[20],model:_0xd9af[22],event:_0xd9af[11],condition:_0xd9af[16],callback:afterCreateMessage},{channel:_0xd9af[23],model:_0xd9af[24],event:_0xd9af[11],condition:_0xd9af[12],callback:afterCreate},{channel:_0xd9af[23],model:_0xd9af[24],event:_0xd9af[13],condition:_0xd9af[14],callback:afterUpdate},{channel:_0xd9af[23],model:_0xd9af[25],event:_0xd9af[11],condition:_0xd9af[16],callback:afterCreateMessage},{channel:_0xd9af[26],model:_0xd9af[27],event:_0xd9af[11],condition:_0xd9af[12],callback:afterCreate},{channel:_0xd9af[26],model:_0xd9af[27],event:_0xd9af[13],condition:_0xd9af[14],callback:afterUpdate},{channel:_0xd9af[26],model:_0xd9af[28],event:_0xd9af[11],condition:_0xd9af[16],callback:afterCreateMessage}];function request(_0x423bx8){return client[_0xd9af[36]](_0xd9af[30],_0x423bx8)[_0xd9af[35]](function(_0x423bxa){logger[_0xd9af[33]](_0xd9af[29],_0xd9af[30],_0x423bxa);if(_0x423bxa[_0xd9af[31]]){if(_0x423bxa[_0xd9af[31]][_0xd9af[34]]=== 500){logger[_0xd9af[31]](_0xd9af[29],_0xd9af[30],_0x423bxa[_0xd9af[31]])}}})[_0xd9af[32]](function(_0x423bx9){logger[_0xd9af[31]](_0xd9af[29],_0xd9af[30],_0x423bx9)})}function afterCreateMessage(_0x423bxc,_0x423bxd){return function(_0x423bx8,_0x423bxe){_0x423bx8= _0x423bx8[_0xd9af[37]]({plain:true});_0x423bx8[_0xd9af[38]]= _0x423bxc;_0x423bx8[_0xd9af[39]]= _0x423bx8[_0xd9af[40]];if(_0x423bx8[_0xd9af[41]]){return db[_0xd9af[49]][_0xd9af[48]]({where:{id:_0x423bx8[_0xd9af[41]]},attributes:[_0xd9af[47],_0xd9af[44]],raw:true})[_0xd9af[35]](function(_0x423bxf){_0x423bx8[_0xd9af[42]]= util[_0xd9af[45]](_0xd9af[43],_0x423bxf[_0xd9af[44]]);_0x423bx8[_0xd9af[38]]= _0x423bxc;return request({event:_0xd9af[46],message:_0x423bx8})})[_0xd9af[32]](function(_0x423bx9){console[_0xd9af[31]](_0x423bx9)})}else {return request({event:_0xd9af[50],message:_0x423bx8})}}}function afterCreate(_0x423bxc,_0x423bxd){return function(_0x423bx8,_0x423bxe){_0x423bx8= _0x423bx8[_0xd9af[37]]({plain:true});_0x423bx8[_0xd9af[38]]= _0x423bxc;_0x423bx8[_0xd9af[39]]= _0xd9af[51];return request({event:_0x423bxd,message:_0x423bx8})}}function afterUpdate(_0x423bxc,_0x423bxd){return function(_0x423bx8,_0x423bxe){if(_0x423bx8[_0xd9af[53]](_0xd9af[52])&& _0x423bx8[_0xd9af[52]]){_0x423bx8= _0x423bx8[_0xd9af[37]]({plain:true});_0x423bx8[_0xd9af[38]]= _0x423bxc;_0x423bx8[_0xd9af[39]]= _0xd9af[52];if(_0x423bx8[_0xd9af[41]]){return db[_0xd9af[49]][_0xd9af[48]]({where:{id:_0x423bx8[_0xd9af[41]]},attributes:[_0xd9af[47],_0xd9af[44]],raw:true})[_0xd9af[35]](function(_0x423bxf){_0x423bx8[_0xd9af[42]]= util[_0xd9af[45]](_0xd9af[43],_0x423bxf[_0xd9af[44]]);return request({event:_0x423bxd,message:_0x423bx8})})[_0xd9af[32]](function(_0x423bx9){console[_0xd9af[31]](_0x423bx9)})}else {return request({event:_0x423bxd,message:_0x423bx8})}}}}exports[_0xd9af[54]]= function(){for(var _0x423bx12=0;_0x423bx12< triggers[_0xd9af[55]];_0x423bx12+= 1){if(db[_0xd9af[57]](triggers[_0x423bx12][_0xd9af[56]])){db[triggers[_0x423bx12][_0xd9af[56]]][_0xd9af[61]](triggers[_0x423bx12][_0xd9af[39]],triggers[_0x423bx12][_0xd9af[60]](triggers[_0x423bx12][_0xd9af[38]][_0xd9af[58]](),triggers[_0x423bx12][_0xd9af[59]]))}}}
\ No newline at end of file
index 032d2f5..89c9936 100644 (file)
@@ -1 +1 @@
-var _0xa31e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x76\x6F\x69\x63\x65","\x6D\x61\x69\x6C","\x63\x68\x61\x74","\x66\x61\x78","\x73\x6D\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73"];_0xa31e[0];var _=require(_0xa31e[1]);var channels=[_0xa31e[2],_0xa31e[3],_0xa31e[4],_0xa31e[5],_0xa31e[6],_0xa31e[7]];module[_0xa31e[8]]= {getChannels:function(){return channels},isValidChannel:function(_0x42bax3){_0x42bax3= _0x42bax3[_0xa31e[9]]();return _[_0xa31e[10]](channels,_0x42bax3)}}
\ No newline at end of file
+var _0x2272=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x76\x6F\x69\x63\x65","\x6D\x61\x69\x6C","\x63\x68\x61\x74","\x66\x61\x78","\x73\x6D\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73"];_0x2272[0];var _=require(_0x2272[1]);var channels=[_0x2272[2],_0x2272[3],_0x2272[4],_0x2272[5],_0x2272[6],_0x2272[7]];module[_0x2272[8]]= {getChannels:function(){return channels},isValidChannel:function(_0xd5fax3){_0xd5fax3= _0xd5fax3[_0x2272[9]]();return _[_0x2272[10]](channels,_0xd5fax3)}}
\ No newline at end of file
index 224c530..dd03115 100644 (file)
@@ -1 +1 @@
-var _0x6502=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x34\x30\x34","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64","\x72\x65\x6E\x64\x65\x72"];_0x6502[0];module[_0x6502[1]][404]= function pageNotFound(_0x9ddbx2,_0x9ddbx3){var _0x9ddbx4=_0x6502[2];var _0x9ddbx5=404;var _0x9ddbx6={status:_0x9ddbx5};_0x9ddbx3[_0x6502[3]](_0x9ddbx6[_0x6502[3]]);_0x9ddbx3[_0x6502[6]](_0x9ddbx4,{},function(_0x9ddbx7,_0x9ddbx8){if(_0x9ddbx7){return _0x9ddbx3[_0x6502[3]](_0x9ddbx6[_0x6502[3]])[_0x6502[4]](_0x9ddbx6)};_0x9ddbx3[_0x6502[5]](_0x9ddbx8)})}
\ No newline at end of file
+var _0x1e79=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x34\x30\x34","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64","\x72\x65\x6E\x64\x65\x72"];_0x1e79[0];module[_0x1e79[1]][404]= function pageNotFound(_0x344cx2,_0x344cx3){var _0x344cx4=_0x1e79[2];var _0x344cx5=404;var _0x344cx6={status:_0x344cx5};_0x344cx3[_0x1e79[3]](_0x344cx6[_0x1e79[3]]);_0x344cx3[_0x1e79[6]](_0x344cx4,{},function(_0x344cx7,_0x344cx8){if(_0x344cx7){return _0x344cx3[_0x1e79[3]](_0x344cx6[_0x1e79[3]])[_0x1e79[4]](_0x344cx6)};_0x344cx3[_0x1e79[5]](_0x344cx8)})}
\ No newline at end of file
diff --git a/server/migrations/2.0.61.js b/server/migrations/2.0.61.js
new file mode 100644 (file)
index 0000000..6ecc9bb
--- /dev/null
@@ -0,0 +1,145 @@
+'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(res) {
+                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.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);
+
+
+
+            // START FINAL
+            migration.final(resolve);
+            // END FINAL
+        });
+    },
+
+    down: function(queryInterface, Sequelize) {
+        // var migration = new Migration(queryInterface);
+    }
+};
\ No newline at end of file
index 4827580..55c54f1 100644 (file)
@@ -1 +1 @@
-var _0x143a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x70\x61\x74\x68","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6C\x6F\x64\x61\x73\x68","\x6A\x73\x74\x7A","\x64\x65\x74\x65\x72\x6D\x69\x6E\x65","\x6D\x6F\x74\x69\x6F\x6E\x32","\x78\x63\x61\x6C\x6C","\x78\x43\x40\x4C\x4C\x31\x32\x33\x34","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31","\x6D\x79\x73\x71\x6C","\x75\x74\x66\x38\x6D\x62\x34","\x6E\x61\x6D\x65","\x75\x74\x66\x38","\x75\x74\x66\x38\x5F\x67\x65\x6E\x65\x72\x61\x6C\x5F\x63\x69","\x64\x65\x66\x61\x75\x6C\x74\x73\x44\x65\x65\x70","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65\x48\x69\x73\x74\x6F\x72\x79","\x64\x61\x74\x61\x62\x61\x73\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x6F\x70\x74\x69\x6F\x6E\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x2F\x75\x73\x65\x72\x2E\x6D\x6F\x64\x65\x6C","\x69\x6D\x70\x6F\x72\x74","\x56\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79\x2F\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2F\x76\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x76\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64\x2F\x76\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2F\x76\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x4D\x61\x69\x6C\x2F\x76\x6F\x69\x63\x65\x4D\x61\x69\x6C\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2F\x76\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x2F\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x2F\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x2F\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74\x2F\x6D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x54\x72\x75\x6E\x6B","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x72\x75\x6E\x6B\x2F\x74\x72\x75\x6E\x6B\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74\x2F\x76\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x2F\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x2E\x6D\x6F\x64\x65\x6C","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x55\x73\x65\x72\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x55\x73\x65\x72\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x55\x73\x65\x72\x46\x61\x78\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x46\x61\x78\x51\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x46\x61\x78\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x55\x73\x65\x72\x53\x6D\x73\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x53\x6D\x73\x51\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x53\x6D\x73\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x55\x73\x65\x72\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E\x2F\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E\x2E\x6D\x6F\x64\x65\x6C","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74\x2F\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74\x2E\x6D\x6F\x64\x65\x6C","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x4D\x61\x69\x6C\x53\x75\x62\x73\x74\x61\x74\x75\x73","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x53\x75\x62\x73\x74\x61\x74\x75\x73\x2F\x6D\x61\x69\x6C\x53\x75\x62\x73\x74\x61\x74\x75\x73\x2E\x6D\x6F\x64\x65\x6C","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x6D\x6F\x64\x65\x6C","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x6D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2E\x6D\x6F\x64\x65\x6C","\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D","\x2E\x2E\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D\x2E\x6D\x6F\x64\x65\x6C","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x66\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x66\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x6D\x6F\x64\x65\x6C","\x46\x61\x78\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2F\x73\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x73\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x53\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x73\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2E\x6D\x6F\x64\x65\x6C","\x53\x6D\x73\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x6D\x6F\x64\x65\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x2F\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x2E\x6D\x6F\x64\x65\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x63\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x63\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x2F\x63\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x47\x72\x6F\x75\x70","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x47\x72\x6F\x75\x70\x2F\x63\x68\x61\x74\x47\x72\x6F\x75\x70\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x2F\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x43\x6D\x43\x6F\x6D\x70\x61\x6E\x79","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x43\x6F\x6D\x70\x61\x6E\x79\x2F\x63\x6D\x43\x6F\x6D\x70\x61\x6E\x79\x2E\x6D\x6F\x64\x65\x6C","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2E\x6D\x6F\x64\x65\x6C","\x43\x6D\x48\x6F\x70\x70\x65\x72","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x2E\x6D\x6F\x64\x65\x6C","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x2E\x6D\x6F\x64\x65\x6C","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x2E\x6D\x6F\x64\x65\x6C","\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79\x2E\x6D\x6F\x64\x65\x6C","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77\x2F\x72\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77\x2E\x6D\x6F\x64\x65\x6C","\x43\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x2F\x63\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x2E\x6D\x6F\x64\x65\x6C","\x43\x6D\x4C\x69\x73\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x4C\x69\x73\x74\x2F\x63\x6D\x4C\x69\x73\x74\x2E\x6D\x6F\x64\x65\x6C","\x41\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x63\x74\x69\x6F\x6E\x2F\x61\x63\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72\x2F\x63\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72\x2E\x6D\x6F\x64\x65\x6C","\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x2F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2E\x6D\x6F\x64\x65\x6C","\x50\x61\x75\x73\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x70\x61\x75\x73\x65\x2F\x70\x61\x75\x73\x65\x2E\x6D\x6F\x64\x65\x6C","\x43\x64\x72","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x64\x72\x2F\x63\x64\x72\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67\x2E\x6D\x6F\x64\x65\x6C","\x53\x63\x68\x65\x64\x75\x6C\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x2E\x6D\x6F\x64\x65\x6C","\x53\x6F\x75\x6E\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64\x2F\x73\x6F\x75\x6E\x64\x2E\x6D\x6F\x64\x65\x6C","\x54\x61\x67","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x61\x67\x2F\x74\x61\x67\x2E\x6D\x6F\x64\x65\x6C","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2E\x6D\x6F\x64\x65\x6C","\x54\x72\x69\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x72\x69\x67\x67\x65\x72\x2F\x74\x72\x69\x67\x67\x65\x72\x2E\x6D\x6F\x64\x65\x6C","\x56\x61\x72\x69\x61\x62\x6C\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x6D\x6F\x64\x65\x6C","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x41\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x41\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x41\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63\x2E\x6D\x6F\x64\x65\x6C","\x41\x6E\x61\x6C\x79\x74\x69\x63\x46\x69\x65\x6C\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x46\x69\x65\x6C\x64\x52\x65\x70\x6F\x72\x74\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x46\x69\x65\x6C\x64\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x41\x6E\x61\x6C\x79\x74\x69\x63\x54\x72\x65\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x54\x72\x65\x65\x52\x65\x70\x6F\x72\x74\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x54\x72\x65\x65\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x2E\x6D\x6F\x64\x65\x6C","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x2E\x6D\x6F\x64\x65\x6C","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x69\x6E\x74\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x44\x65\x73\x6B\x46\x69\x65\x6C\x64\x2F\x69\x6E\x74\x44\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x6D\x6F\x64\x65\x6C","\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64\x2E\x6D\x6F\x64\x65\x6C","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x6D\x6F\x64\x65\x6C","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x6D\x6F\x64\x65\x6C","\x4E\x65\x74\x77\x6F\x72\x6B","\x2E\x2E\x2F\x61\x70\x69\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x6D\x6F\x64\x65\x6C","\x4A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x4A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x73\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x44\x65\x74\x61\x69\x6C\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x44\x65\x74\x61\x69\x6C\x2E\x6D\x6F\x64\x65\x6C","\x4A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x2E\x6D\x6F\x64\x65\x6C","\x53\x65\x74\x74\x69\x6E\x67","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x65\x74\x74\x69\x6E\x67\x2F\x73\x65\x74\x74\x69\x6E\x67\x2E\x6D\x6F\x64\x65\x6C","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x4F\x64\x62\x63\x2F\x73\x71\x75\x61\x72\x65\x4F\x64\x62\x63\x2E\x6D\x6F\x64\x65\x6C","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x2F\x73\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x2E\x6D\x6F\x64\x65\x6C","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x6D\x6F\x64\x65\x6C","\x54\x65\x61\x6D","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x65\x61\x6D\x2F\x74\x65\x61\x6D\x2E\x6D\x6F\x64\x65\x6C","\x4C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x6D\x6F\x64\x65\x6C","\x43\x61\x6D\x70\x61\x69\x67\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E\x2E\x6D\x6F\x64\x65\x6C","\x4D\x69\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x69\x67\x72\x61\x74\x69\x6F\x6E\x2F\x6D\x69\x67\x72\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x63\x61\x73\x63\x61\x64\x65","\x55\x73\x65\x72\x49\x64","\x68\x61\x73\x4F\x6E\x65","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x68\x61\x73\x4D\x61\x6E\x79","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x52\x74","\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x73","\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x47\x72\x6F\x75\x70\x73","\x63\x68\x61\x74\x5F\x67\x72\x6F\x75\x70\x5F\x68\x61\x73\x5F\x75\x73\x65\x72\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x63\x6D\x5F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x4C\x69\x73\x74\x73","\x63\x6D\x5F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x53\x70\x69\x65\x64\x41\x67\x65\x6E\x74\x73","\x43\x68\x61\x6E\x53\x70\x79\x49\x64","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x53\x6F\x75\x6E\x64\x73","\x6D\x6F\x68\x5F\x68\x61\x73\x5F\x73\x6F\x75\x6E\x64\x73","\x4D\x65\x6D\x62\x65\x72\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x48\x6F\x70\x70\x65\x72\x73","\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x69\x65\x73","\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x73","\x54\x72\x75\x6E\x6B\x49\x64","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x54\x72\x75\x6E\x6B\x42\x61\x63\x6B\x75\x70","\x54\x72\x75\x6E\x6B\x42\x61\x63\x6B\x75\x70\x49\x64","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73\x5F\x68\x61\x73\x5F\x63\x6D\x5F\x6C\x69\x73\x74\x73","\x41\x67\x65\x6E\x74\x73","\x54\x65\x61\x6D\x73","\x74\x65\x61\x6D\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73","\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73\x5F\x68\x61\x73\x5F\x63\x6D\x5F\x62\x6C\x61\x63\x6B\x6C\x69\x73\x74\x73","\x4D\x65\x73\x73\x61\x67\x65\x73","\x6D\x61\x69\x6C\x62\x6F\x78\x75\x73\x65\x72","\x6D\x61\x69\x6C\x62\x6F\x78","\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x73","\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x49\x6D\x61\x70","\x53\x6D\x74\x70","\x41\x6E\x73\x77\x65\x72\x73","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x4C\x69\x73\x74","\x4C\x69\x73\x74\x49\x64","\x54\x65\x6D\x70\x6C\x61\x74\x65\x49\x64","\x74\x65\x61\x6D\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x73","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x41\x63\x63\x6F\x75\x6E\x74","\x4F\x77\x6E\x65\x72","\x6D\x61\x69\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x5F\x68\x61\x73\x5F\x74\x61\x67\x73","\x54\x61\x67\x73","\x54\x68\x72\x6F\x75\x67\x68\x54\x61\x67\x73","\x55\x73\x65\x72\x73","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x72\x65\x73\x74\x72\x69\x63\x74","\x49\x74\x65\x6D\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x45\x78\x6E\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x6E\x61\x6D\x65\x41\x6E\x64\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x66\x61\x78\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x5F\x68\x61\x73\x5F\x74\x61\x67\x73","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x49\x64","\x74\x65\x61\x6D\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x73","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x73\x6D\x73\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x5F\x68\x61\x73\x5F\x74\x61\x67\x73","\x53\x6D\x73\x51\x75\x65\x75\x65\x49\x64","\x74\x65\x61\x6D\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x49\x64","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x5F\x68\x61\x73\x5F\x74\x61\x67\x73","\x74\x65\x61\x6D\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x73","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x41\x67\x65\x6E\x74","\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x49\x64","\x57\x65\x62\x73\x69\x74\x65","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x63\x68\x61\x74\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x5F\x68\x61\x73\x5F\x74\x61\x67\x73","\x74\x65\x61\x6D\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x73","\x43\x68\x61\x74\x47\x72\x6F\x75\x70\x49\x64","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x43\x6F\x6D\x70\x61\x6E\x79","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x51\x75\x65\x75\x65\x73","\x41\x6C\x6C","\x4F\x6E\x65\x41\x6C\x6C","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x41\x6C\x6C\x49\x64","\x41\x6E\x79","\x4F\x6E\x65\x41\x6E\x79","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x41\x6E\x79\x49\x64","\x41\x63\x74\x69\x6F\x6E\x73","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x49\x64","\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x4D\x6F\x68\x73","\x41\x6C\x6C\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x41\x6C\x6C\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x54\x72\x69\x67\x67\x65\x72\x41\x6C\x6C\x49\x64","\x41\x6E\x79\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x41\x6E\x79\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x54\x72\x69\x67\x67\x65\x72\x41\x6E\x79\x49\x64","\x54\x72\x69\x67\x67\x65\x72\x49\x64","\x46\x69\x65\x6C\x64\x73","\x4D\x65\x74\x72\x69\x63\x49\x64","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x53\x75\x62\x6A\x65\x63\x74\x49\x64","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x49\x64","\x46\x69\x65\x6C\x64\x49\x64","\x53\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64","\x56\x61\x72\x69\x61\x62\x6C\x65\x49\x64","\x69\x6E\x74\x5F\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x5F\x68\x61\x73\x5F\x74\x61\x67\x73","\x69\x6E\x74\x5F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x5F\x68\x61\x73\x5F\x74\x61\x67\x73","\x69\x6E\x74\x5F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x5F\x68\x61\x73\x5F\x74\x61\x67\x73","\x46\x72\x6F\x6D\x49\x64","\x54\x6F\x49\x64","\x53\x65\x73\x73\x69\x6F\x6E\x49\x64","\x50\x72\x6F\x6A\x65\x63\x74\x49\x64","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x49\x64","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73\x5F\x68\x61\x73\x5F\x63\x6D\x5F\x6C\x69\x73\x74\x73","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73\x5F\x68\x61\x73\x5F\x63\x6D\x5F\x62\x6C\x61\x63\x6B\x6C\x69\x73\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x143a[0];var path=require(_0x143a[1]);var config=require(_0x143a[2]);var Sequelize=require(_0x143a[3]);var _=require(_0x143a[4]);var jstz=require(_0x143a[5]);var timezone=jstz[_0x143a[6]]();config[_0x143a[3]]= _[_0x143a[16]](config[_0x143a[3]],{database:_0x143a[7],username:_0x143a[8],password:_0x143a[9],options:{host:_0x143a[10],port:3306,dialect:_0x143a[11],dialectOptions:{charset:_0x143a[12]},logging:false,timezone:timezone[_0x143a[13]](),define:{charset:_0x143a[14],collate:_0x143a[15]}}});config[_0x143a[17]]= _[_0x143a[16]](config[_0x143a[17]],{database:_0x143a[7],username:_0x143a[8],password:_0x143a[9],options:{host:_0x143a[10],port:3306,dialect:_0x143a[11],dialectOptions:{charset:_0x143a[12]},logging:false,timezone:timezone[_0x143a[13]](),define:{charset:_0x143a[14],collate:_0x143a[15]}}});var db={Sequelize:Sequelize,sequelize: new Sequelize(config[_0x143a[3]][_0x143a[18]],config[_0x143a[3]][_0x143a[19]],config[_0x143a[3]][_0x143a[20]],config[_0x143a[3]][_0x143a[21]])};var dbH={Sequelize:Sequelize,sequelize: new Sequelize(config[_0x143a[17]][_0x143a[18]],config[_0x143a[17]][_0x143a[19]],config[_0x143a[17]][_0x143a[20]],config[_0x143a[17]][_0x143a[21]])};db[_0x143a[22]]= db[_0x143a[3]][_0x143a[24]](_0x143a[23]);db[_0x143a[25]]= db[_0x143a[3]][_0x143a[24]](_0x143a[26]);db[_0x143a[27]]= db[_0x143a[3]][_0x143a[24]](_0x143a[28]);db[_0x143a[29]]= db[_0x143a[3]][_0x143a[24]](_0x143a[30]);db[_0x143a[31]]= db[_0x143a[3]][_0x143a[24]](_0x143a[32]);db[_0x143a[33]]= db[_0x143a[3]][_0x143a[24]](_0x143a[34]);db[_0x143a[35]]= db[_0x143a[3]][_0x143a[24]](_0x143a[36]);db[_0x143a[37]]= db[_0x143a[3]][_0x143a[24]](_0x143a[38]);db[_0x143a[39]]= db[_0x143a[3]][_0x143a[24]](_0x143a[40]);db[_0x143a[41]]= db[_0x143a[3]][_0x143a[24]](_0x143a[42]);db[_0x143a[43]]= db[_0x143a[3]][_0x143a[24]](_0x143a[44]);db[_0x143a[45]]= db[_0x143a[3]][_0x143a[24]](_0x143a[46]);db[_0x143a[47]]= db[_0x143a[3]][_0x143a[24]](_0x143a[48]);db[_0x143a[49]]= db[_0x143a[3]][_0x143a[24]](_0x143a[50]);db[_0x143a[51]]= db[_0x143a[3]][_0x143a[24]](_0x143a[52]);db[_0x143a[53]]= db[_0x143a[3]][_0x143a[24]](_0x143a[54]);db[_0x143a[55]]= db[_0x143a[3]][_0x143a[24]](_0x143a[56]);db[_0x143a[57]]= db[_0x143a[3]][_0x143a[24]](_0x143a[58]);db[_0x143a[59]]= db[_0x143a[3]][_0x143a[24]](_0x143a[60]);db[_0x143a[61]]= db[_0x143a[3]][_0x143a[24]](_0x143a[62]);db[_0x143a[63]]= db[_0x143a[3]][_0x143a[24]](_0x143a[64]);db[_0x143a[65]]= db[_0x143a[3]][_0x143a[24]](_0x143a[66]);db[_0x143a[67]]= db[_0x143a[3]][_0x143a[24]](_0x143a[68]);db[_0x143a[69]]= db[_0x143a[3]][_0x143a[24]](_0x143a[70]);db[_0x143a[71]]= db[_0x143a[3]][_0x143a[24]](_0x143a[72]);db[_0x143a[73]]= db[_0x143a[3]][_0x143a[24]](_0x143a[74]);db[_0x143a[75]]= db[_0x143a[3]][_0x143a[24]](_0x143a[76]);db[_0x143a[77]]= db[_0x143a[3]][_0x143a[24]](_0x143a[78]);db[_0x143a[79]]= db[_0x143a[3]][_0x143a[24]](_0x143a[80]);db[_0x143a[81]]= db[_0x143a[3]][_0x143a[24]](_0x143a[82]);db[_0x143a[83]]= db[_0x143a[3]][_0x143a[24]](_0x143a[84]);db[_0x143a[85]]= db[_0x143a[3]][_0x143a[24]](_0x143a[86]);db[_0x143a[87]]= db[_0x143a[3]][_0x143a[24]](_0x143a[88]);db[_0x143a[89]]= db[_0x143a[3]][_0x143a[24]](_0x143a[90]);db[_0x143a[91]]= db[_0x143a[3]][_0x143a[24]](_0x143a[92]);db[_0x143a[93]]= db[_0x143a[3]][_0x143a[24]](_0x143a[94]);db[_0x143a[95]]= db[_0x143a[3]][_0x143a[24]](_0x143a[96]);db[_0x143a[97]]= db[_0x143a[3]][_0x143a[24]](_0x143a[98]);db[_0x143a[99]]= db[_0x143a[3]][_0x143a[24]](_0x143a[100]);db[_0x143a[101]]= db[_0x143a[3]][_0x143a[24]](_0x143a[102]);db[_0x143a[103]]= db[_0x143a[3]][_0x143a[24]](_0x143a[104]);db[_0x143a[105]]= db[_0x143a[3]][_0x143a[24]](_0x143a[106]);db[_0x143a[107]]= db[_0x143a[3]][_0x143a[24]](_0x143a[108]);db[_0x143a[109]]= db[_0x143a[3]][_0x143a[24]](_0x143a[110]);db[_0x143a[111]]= db[_0x143a[3]][_0x143a[24]](_0x143a[112]);db[_0x143a[113]]= db[_0x143a[3]][_0x143a[24]](_0x143a[114]);db[_0x143a[115]]= db[_0x143a[3]][_0x143a[24]](_0x143a[116]);db[_0x143a[117]]= db[_0x143a[3]][_0x143a[24]](_0x143a[118]);db[_0x143a[119]]= db[_0x143a[3]][_0x143a[24]](_0x143a[120]);db[_0x143a[121]]= db[_0x143a[3]][_0x143a[24]](_0x143a[122]);db[_0x143a[123]]= db[_0x143a[3]][_0x143a[24]](_0x143a[124]);db[_0x143a[125]]= db[_0x143a[3]][_0x143a[24]](_0x143a[126]);db[_0x143a[127]]= db[_0x143a[3]][_0x143a[24]](_0x143a[128]);db[_0x143a[129]]= db[_0x143a[3]][_0x143a[24]](_0x143a[130]);db[_0x143a[131]]= db[_0x143a[3]][_0x143a[24]](_0x143a[132]);db[_0x143a[133]]= db[_0x143a[3]][_0x143a[24]](_0x143a[134]);db[_0x143a[135]]= db[_0x143a[3]][_0x143a[24]](_0x143a[136]);db[_0x143a[137]]= db[_0x143a[3]][_0x143a[24]](_0x143a[138]);db[_0x143a[139]]= db[_0x143a[3]][_0x143a[24]](_0x143a[140]);db[_0x143a[141]]= db[_0x143a[3]][_0x143a[24]](_0x143a[142]);db[_0x143a[143]]= db[_0x143a[3]][_0x143a[24]](_0x143a[144]);db[_0x143a[145]]= db[_0x143a[3]][_0x143a[24]](_0x143a[146]);db[_0x143a[147]]= db[_0x143a[3]][_0x143a[24]](_0x143a[148]);db[_0x143a[149]]= db[_0x143a[3]][_0x143a[24]](_0x143a[150]);db[_0x143a[151]]= db[_0x143a[3]][_0x143a[24]](_0x143a[152]);db[_0x143a[153]]= db[_0x143a[3]][_0x143a[24]](_0x143a[154]);db[_0x143a[155]]= db[_0x143a[3]][_0x143a[24]](_0x143a[156]);db[_0x143a[157]]= db[_0x143a[3]][_0x143a[24]](_0x143a[158]);db[_0x143a[159]]= db[_0x143a[3]][_0x143a[24]](_0x143a[160]);db[_0x143a[161]]= db[_0x143a[3]][_0x143a[24]](_0x143a[162]);db[_0x143a[163]]= db[_0x143a[3]][_0x143a[24]](_0x143a[164]);db[_0x143a[165]]= db[_0x143a[3]][_0x143a[24]](_0x143a[166]);db[_0x143a[167]]= db[_0x143a[3]][_0x143a[24]](_0x143a[168]);db[_0x143a[169]]= db[_0x143a[3]][_0x143a[24]](_0x143a[170]);db[_0x143a[171]]= db[_0x143a[3]][_0x143a[24]](_0x143a[172]);db[_0x143a[173]]= db[_0x143a[3]][_0x143a[24]](_0x143a[174]);db[_0x143a[175]]= db[_0x143a[3]][_0x143a[24]](_0x143a[176]);db[_0x143a[177]]= db[_0x143a[3]][_0x143a[24]](_0x143a[178]);db[_0x143a[179]]= db[_0x143a[3]][_0x143a[24]](_0x143a[180]);db[_0x143a[181]]= db[_0x143a[3]][_0x143a[24]](_0x143a[182]);db[_0x143a[183]]= db[_0x143a[3]][_0x143a[24]](_0x143a[184]);db[_0x143a[185]]= db[_0x143a[3]][_0x143a[24]](_0x143a[186]);db[_0x143a[187]]= db[_0x143a[3]][_0x143a[24]](_0x143a[188]);db[_0x143a[189]]= db[_0x143a[3]][_0x143a[24]](_0x143a[190]);db[_0x143a[191]]= db[_0x143a[3]][_0x143a[24]](_0x143a[192]);db[_0x143a[193]]= db[_0x143a[3]][_0x143a[24]](_0x143a[194]);db[_0x143a[195]]= db[_0x143a[3]][_0x143a[24]](_0x143a[196]);db[_0x143a[197]]= db[_0x143a[3]][_0x143a[24]](_0x143a[198]);db[_0x143a[199]]= db[_0x143a[3]][_0x143a[24]](_0x143a[200]);db[_0x143a[201]]= db[_0x143a[3]][_0x143a[24]](_0x143a[202]);db[_0x143a[203]]= db[_0x143a[3]][_0x143a[24]](_0x143a[204]);db[_0x143a[205]]= db[_0x143a[3]][_0x143a[24]](_0x143a[206]);db[_0x143a[207]]= db[_0x143a[3]][_0x143a[24]](_0x143a[208]);db[_0x143a[209]]= db[_0x143a[3]][_0x143a[24]](_0x143a[210]);db[_0x143a[211]]= db[_0x143a[3]][_0x143a[24]](_0x143a[212]);db[_0x143a[213]]= db[_0x143a[3]][_0x143a[24]](_0x143a[214]);db[_0x143a[215]]= db[_0x143a[3]][_0x143a[24]](_0x143a[216]);db[_0x143a[217]]= db[_0x143a[3]][_0x143a[24]](_0x143a[218]);db[_0x143a[219]]= db[_0x143a[3]][_0x143a[24]](_0x143a[220]);db[_0x143a[221]]= db[_0x143a[3]][_0x143a[24]](_0x143a[222]);db[_0x143a[223]]= db[_0x143a[3]][_0x143a[24]](_0x143a[224]);db[_0x143a[225]]= db[_0x143a[3]][_0x143a[24]](_0x143a[226]);db[_0x143a[227]]= db[_0x143a[3]][_0x143a[24]](_0x143a[228]);db[_0x143a[229]]= db[_0x143a[3]][_0x143a[24]](_0x143a[230]);db[_0x143a[231]]= db[_0x143a[3]][_0x143a[24]](_0x143a[232]);db[_0x143a[233]]= db[_0x143a[3]][_0x143a[24]](_0x143a[234]);db[_0x143a[235]]= db[_0x143a[3]][_0x143a[24]](_0x143a[236]);db[_0x143a[237]]= db[_0x143a[3]][_0x143a[24]](_0x143a[238]);db[_0x143a[239]]= db[_0x143a[3]][_0x143a[24]](_0x143a[240]);db[_0x143a[241]]= db[_0x143a[3]][_0x143a[24]](_0x143a[242]);db[_0x143a[243]]= db[_0x143a[3]][_0x143a[24]](_0x143a[244]);db[_0x143a[245]]= db[_0x143a[3]][_0x143a[24]](_0x143a[246]);db[_0x143a[247]]= db[_0x143a[3]][_0x143a[24]](_0x143a[248]);db[_0x143a[249]]= db[_0x143a[3]][_0x143a[24]](_0x143a[250]);db[_0x143a[199]]= db[_0x143a[3]][_0x143a[24]](_0x143a[200]);db[_0x143a[251]]= db[_0x143a[3]][_0x143a[24]](_0x143a[252]);db[_0x143a[253]]= db[_0x143a[3]][_0x143a[24]](_0x143a[254]);db[_0x143a[255]]= db[_0x143a[3]][_0x143a[24]](_0x143a[256]);db[_0x143a[257]]= db[_0x143a[3]][_0x143a[24]](_0x143a[258]);db[_0x143a[259]]= db[_0x143a[3]][_0x143a[24]](_0x143a[260]);db[_0x143a[261]]= db[_0x143a[3]][_0x143a[24]](_0x143a[262]);db[_0x143a[263]]= db[_0x143a[3]][_0x143a[24]](_0x143a[264]);db[_0x143a[265]]= db[_0x143a[3]][_0x143a[24]](_0x143a[266]);db[_0x143a[267]]= db[_0x143a[3]][_0x143a[24]](_0x143a[268]);db[_0x143a[269]]= db[_0x143a[3]][_0x143a[24]](_0x143a[270]);db[_0x143a[271]]= db[_0x143a[3]][_0x143a[24]](_0x143a[272]);db[_0x143a[273]]= db[_0x143a[3]][_0x143a[24]](_0x143a[274]);db[_0x143a[275]]= db[_0x143a[3]][_0x143a[24]](_0x143a[276]);db[_0x143a[277]]= db[_0x143a[3]][_0x143a[24]](_0x143a[278]);db[_0x143a[279]]= db[_0x143a[3]][_0x143a[24]](_0x143a[280]);db[_0x143a[281]]= db[_0x143a[3]][_0x143a[24]](_0x143a[282]);db[_0x143a[283]]= db[_0x143a[3]][_0x143a[24]](_0x143a[284]);db[_0x143a[285]]= db[_0x143a[3]][_0x143a[24]](_0x143a[286]);db[_0x143a[287]]= db[_0x143a[3]][_0x143a[24]](_0x143a[288]);db[_0x143a[22]][_0x143a[291]](db.VoiceMail,{"\x61\x73":_0x143a[39],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[290]});db[_0x143a[22]][_0x143a[293]](db.VoiceRecording,{"\x61\x73":_0x143a[292],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[290]});db[_0x143a[22]][_0x143a[293]](db.UserVoiceQueueRt,{"\x61\x73":_0x143a[294],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[290]});db[_0x143a[22]][_0x143a[293]](db.VoiceExtension,{"\x61\x73":_0x143a[295],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x68\x6F\x6F\x6B\x73":true});db[_0x143a[22]][_0x143a[293]](db.CmHopperFinal,{"\x61\x73":_0x143a[296],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[290]});db[_0x143a[22]][_0x143a[293]](db.CmHopperHistory,{"\x61\x73":_0x143a[297],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[290]});db[_0x143a[22]][_0x143a[293]](db.ReportAgentPreview,{"\x61\x73":_0x143a[165],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[290]});db[_0x143a[22]][_0x143a[293]](db.OpenchannelInteraction,{"\x61\x73":_0x143a[298],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[290]});db[_0x143a[22]][_0x143a[293]](db.ChatInteraction,{"\x61\x73":_0x143a[299],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[290]});db[_0x143a[22]][_0x143a[293]](db.SmsInteraction,{"\x61\x73":_0x143a[300],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[290]});db[_0x143a[22]][_0x143a[293]](db.FaxInteraction,{"\x61\x73":_0x143a[301],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[290]});db[_0x143a[22]][_0x143a[293]](db.MailInteraction,{"\x61\x73":_0x143a[302],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[290]});db[_0x143a[22]][_0x143a[305]](db.ChatGroup,{"\x61\x73":_0x143a[303],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[304]});db[_0x143a[22]][_0x143a[305]](db.CmContact,{"\x61\x73":_0x143a[306],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[307]});db[_0x143a[22]][_0x143a[305]](db.CmList,{"\x61\x73":_0x143a[308],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[309]});db[_0x143a[22]][_0x143a[305]](db.Team,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[310]});db[_0x143a[22]][_0x143a[305]](db.MailInteraction,{"\x61\x73":_0x143a[302],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[311]});db[_0x143a[22]][_0x143a[305]](db.ChatInteraction,{"\x61\x73":_0x143a[299],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[312]});db[_0x143a[22]][_0x143a[305]](db.FaxInteraction,{"\x61\x73":_0x143a[301],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[313]});db[_0x143a[22]][_0x143a[305]](db.SmsInteraction,{"\x61\x73":_0x143a[300],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[314]});db[_0x143a[22]][_0x143a[305]](db.OpenchannelInteraction,{"\x61\x73":_0x143a[298],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[315]});db[_0x143a[22]][_0x143a[305]](db.VoiceQueue,{"\x61\x73":_0x143a[316],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[59],"\x72\x65\x71\x75\x69\x72\x65\x64":false});db[_0x143a[22]][_0x143a[305]](db.MailQueue,{"\x61\x73":_0x143a[317],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[63],"\x72\x65\x71\x75\x69\x72\x65\x64":false});db[_0x143a[22]][_0x143a[305]](db.ChatQueue,{"\x61\x73":_0x143a[318],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[61],"\x72\x65\x71\x75\x69\x72\x65\x64":false,"\x68\x6F\x6F\x6B\x73":true});db[_0x143a[22]][_0x143a[305]](db.FaxQueue,{"\x61\x73":_0x143a[319],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[65],"\x72\x65\x71\x75\x69\x72\x65\x64":false});db[_0x143a[22]][_0x143a[305]](db.SmsQueue,{"\x61\x73":_0x143a[320],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[67],"\x72\x65\x71\x75\x69\x72\x65\x64":false});db[_0x143a[22]][_0x143a[305]](db.OpenchannelQueue,{"\x61\x73":_0x143a[321],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[69],"\x72\x65\x71\x75\x69\x72\x65\x64":false});db[_0x143a[22]][_0x143a[305]](db.CmList,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[309]});db[_0x143a[25]][_0x143a[293]](db.VoiceExtension,{"\x61\x73":_0x143a[322],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[323]});db[_0x143a[27]][_0x143a[293]](db.VoiceExtension,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289]});db[_0x143a[31]][_0x143a[293]](db.VoiceExtension,{"\x61\x73":_0x143a[324],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289]});db[_0x143a[33]][_0x143a[305]](db.Sound,{"\x61\x73":_0x143a[325],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[326]});db[_0x143a[35]][_0x143a[293]](db.UserVoiceQueueRt,{"\x61\x73":_0x143a[327],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[328]});db[_0x143a[35]][_0x143a[293]](db.CmHopper,{"\x61\x73":_0x143a[329],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[328]});db[_0x143a[35]][_0x143a[293]](db.CmHopperFinal,{"\x61\x73":_0x143a[296],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[328]});db[_0x143a[35]][_0x143a[293]](db.CmHopperHistory,{"\x61\x73":_0x143a[330],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[328]});db[_0x143a[35]][_0x143a[293]](db.ReportAgentPreview,{"\x61\x73":_0x143a[165],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[328]});db[_0x143a[35]][_0x143a[293]](db.CmHopperBlack,{"\x61\x73":_0x143a[331],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[328]});db[_0x143a[35]][_0x143a[293]](db.JscriptySessionReport,{"\x61\x73":_0x143a[332],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[328]});db[_0x143a[35]][_0x143a[334]](db.Trunk,{"\x61\x73":_0x143a[53],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[333]});db[_0x143a[35]][_0x143a[334]](db.Trunk,{"\x61\x73":_0x143a[335],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[336]});db[_0x143a[35]][_0x143a[334]](db.Interval,{"\x61\x73":_0x143a[179],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[337]});db[_0x143a[35]][_0x143a[305]](db.CmList,{"\x61\x73":_0x143a[308],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[338]});db[_0x143a[35]][_0x143a[305]](db.User,{"\x61\x73":_0x143a[339],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[59]});db[_0x143a[35]][_0x143a[305]](db.Team,{"\x61\x73":_0x143a[340],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[341]});db[_0x143a[35]][_0x143a[305]](db.CmList,{"\x61\x73":_0x143a[342],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[343]});db[_0x143a[37]][_0x143a[334]](db.User,{"\x61\x73":_0x143a[22],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[290]});db[_0x143a[39]][_0x143a[293]](db.VoiceMailMessage,{"\x61\x73":_0x143a[344],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[345],"\x73\x6F\x75\x72\x63\x65\x4B\x65\x79":_0x143a[346]});db[_0x143a[41]][_0x143a[334]](db.VoiceMail,{"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[345],"\x74\x61\x72\x67\x65\x74\x4B\x65\x79":_0x143a[346]});db[_0x143a[43]][_0x143a[293]](db.VoiceQueueReport,{"\x61\x73":_0x143a[347],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[348],"\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73":false});db[_0x143a[43]][_0x143a[293]](db.VoiceAgentReport,{"\x61\x73":_0x143a[349],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[348],"\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73":false});db[_0x143a[43]][_0x143a[334]](db.User,{"\x61\x73":_0x143a[22],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[290]});db[_0x143a[43]][_0x143a[334]](db.CmContact,{"\x61\x73":_0x143a[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351]});db[_0x143a[71]][_0x143a[334]](db.MailAccount,{"\x61\x73":_0x143a[75],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[352]});db[_0x143a[73]][_0x143a[334]](db.MailAccount,{"\x61\x73":_0x143a[75],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[352]});db[_0x143a[75]][_0x143a[291]](db.MailServerIn,{"\x61\x73":_0x143a[353],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289]});db[_0x143a[75]][_0x143a[291]](db.MailServerOut,{"\x61\x73":_0x143a[354],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289]});db[_0x143a[75]][_0x143a[293]](db.CannedAnswer,{"\x61\x73":_0x143a[355],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[352]});db[_0x143a[75]][_0x143a[293]](db.MailMessage,{"\x61\x73":_0x143a[344],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[352]});db[_0x143a[75]][_0x143a[293]](db.MailInteraction,{"\x61\x73":_0x143a[356]});db[_0x143a[75]][_0x143a[293]](db.MailApplication,{"\x61\x73":_0x143a[324]});db[_0x143a[75]][_0x143a[293]](db.MailDisposition,{"\x61\x73":_0x143a[357]});db[_0x143a[75]][_0x143a[334]](db.CmList,{"\x61\x73":_0x143a[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[359]});db[_0x143a[75]][_0x143a[334]](db.Template,{"\x61\x73":_0x143a[193],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[360]});db[_0x143a[77]][_0x143a[305]](db.User,{"\x61\x73":_0x143a[339],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[63]});db[_0x143a[77]][_0x143a[305]](db.Team,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[361],"\x61\x73":_0x143a[340]});db[_0x143a[81]][_0x143a[293]](db.MailMessage,{"\x61\x73":_0x143a[344],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[362]});db[_0x143a[81]][_0x143a[334]](db.MailAccount,{"\x61\x73":_0x143a[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[352]});db[_0x143a[81]][_0x143a[334]](db.CmContact,{"\x61\x73":_0x143a[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351]});db[_0x143a[81]][_0x143a[334]](db.User,{"\x61\x73":_0x143a[364],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[290]});db[_0x143a[81]][_0x143a[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[365],"\x61\x73":_0x143a[366]});db[_0x143a[81]][_0x143a[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[365],"\x61\x73":_0x143a[367]});db[_0x143a[81]][_0x143a[305]](db.User,{"\x61\x73":_0x143a[368],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[311],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[362]});db[_0x143a[83]][_0x143a[293]](db.Attachment,{"\x61\x73":_0x143a[369],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289]});db[_0x143a[83]][_0x143a[334]](db.User,{"\x61\x73":_0x143a[22]});db[_0x143a[83]][_0x143a[334]](db.CmContact,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x61\x73":_0x143a[350]});db[_0x143a[83]][_0x143a[334]](db.MailInteraction,{"\x61\x73":_0x143a[370],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[362]});db[_0x143a[85]][_0x143a[334]](db.User,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371]});db[_0x143a[85]][_0x143a[334]](db.MailQueue,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371]});db[_0x143a[85]][_0x143a[334]](db.MailAccount,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371]});db[_0x143a[85]][_0x143a[334]](db.Interval,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[337]});db[_0x143a[87]][_0x143a[334]](db.MailAccount,{"\x61\x73":_0x143a[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[352]});db[_0x143a[89]][_0x143a[334]](db.MailAccount,{});db[_0x143a[89]][_0x143a[334]](db.CmList,{"\x61\x73":_0x143a[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[359]});db[_0x143a[89]][_0x143a[334]](db.CmContact,{"\x61\x73":_0x143a[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351]});db[_0x143a[89]][_0x143a[334]](db.MailInteraction,{});db[_0x143a[89]][_0x143a[334]](db.MailMessage,{});db[_0x143a[89]][_0x143a[334]](db.User,{});db[_0x143a[89]][_0x143a[334]](db.MailQueue,{});db[_0x143a[91]][_0x143a[293]](db.DashboardItem,{"\x61\x73":_0x143a[372],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289]});db[_0x143a[95]][_0x143a[293]](db.CannedAnswer,{"\x61\x73":_0x143a[355],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[373]});db[_0x143a[95]][_0x143a[293]](db.FaxInteraction,{"\x61\x73":_0x143a[356]});db[_0x143a[95]][_0x143a[293]](db.FaxApplication,{"\x61\x73":_0x143a[324]});db[_0x143a[95]][_0x143a[293]](db.VoiceExtension,{"\x61\x73":_0x143a[374],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289]});db[_0x143a[95]][_0x143a[293]](db.FaxDisposition,{"\x61\x73":_0x143a[357]});db[_0x143a[95]][_0x143a[293]](db.FaxMessage,{"\x61\x73":_0x143a[344]});db[_0x143a[95]][_0x143a[334]](db.Trunk,{"\x61\x73":_0x143a[53]});db[_0x143a[95]][_0x143a[334]](db.CmList,{"\x61\x73":_0x143a[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[359]});db[_0x143a[97]][_0x143a[334]](db.User,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371]});db[_0x143a[97]][_0x143a[334]](db.FaxQueue,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371]});db[_0x143a[97]][_0x143a[334]](db.FaxAccount,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371]});db[_0x143a[99]][_0x143a[334]](db.FaxAccount,{"\x61\x73":_0x143a[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":{"\x6E\x61\x6D\x65":_0x143a[373],"\x75\x6E\x69\x71\x75\x65":_0x143a[375]}});db[_0x143a[101]][_0x143a[293]](db.FaxMessage,{"\x61\x73":_0x143a[344],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[376]});db[_0x143a[101]][_0x143a[334]](db.FaxAccount,{"\x61\x73":_0x143a[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[373]});db[_0x143a[101]][_0x143a[334]](db.CmContact,{"\x61\x73":_0x143a[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351]});db[_0x143a[101]][_0x143a[334]](db.User,{"\x61\x73":_0x143a[364],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[290]});db[_0x143a[101]][_0x143a[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[377],"\x61\x73":_0x143a[366]});db[_0x143a[101]][_0x143a[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[377],"\x61\x73":_0x143a[367]});db[_0x143a[101]][_0x143a[305]](db.User,{"\x61\x73":_0x143a[368],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[313],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[376]});db[_0x143a[103]][_0x143a[334]](db.User,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x61\x73":_0x143a[22]});db[_0x143a[103]][_0x143a[334]](db.FaxInteraction,{"\x61\x73":_0x143a[370],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[376]});db[_0x143a[103]][_0x143a[334]](db.CmContact,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x61\x73":_0x143a[350]});db[_0x143a[103]][_0x143a[334]](db.Attachment,{"\x61\x73":_0x143a[287],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[378]});db[_0x143a[105]][_0x143a[305]](db.User,{"\x61\x73":_0x143a[339],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[65]});db[_0x143a[105]][_0x143a[305]](db.Team,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[379],"\x61\x73":_0x143a[340]});db[_0x143a[107]][_0x143a[334]](db.FaxAccount,{});db[_0x143a[107]][_0x143a[334]](db.CmList,{"\x61\x73":_0x143a[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[359]});db[_0x143a[107]][_0x143a[334]](db.CmContact,{"\x61\x73":_0x143a[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351]});db[_0x143a[107]][_0x143a[334]](db.FaxInteraction,{});db[_0x143a[107]][_0x143a[334]](db.FaxMessage,{});db[_0x143a[107]][_0x143a[334]](db.User,{});db[_0x143a[107]][_0x143a[334]](db.FaxQueue,{});db[_0x143a[109]][_0x143a[293]](db.CannedAnswer,{"\x61\x73":_0x143a[355],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[380]});db[_0x143a[109]][_0x143a[293]](db.SmsMessage,{"\x61\x73":_0x143a[344],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[380]});db[_0x143a[109]][_0x143a[293]](db.SmsInteraction,{"\x61\x73":_0x143a[356]});db[_0x143a[109]][_0x143a[293]](db.SmsApplication,{"\x61\x73":_0x143a[324]});db[_0x143a[109]][_0x143a[293]](db.SmsDisposition,{"\x61\x73":_0x143a[357]});db[_0x143a[109]][_0x143a[334]](db.CmList,{"\x61\x73":_0x143a[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[359]});db[_0x143a[111]][_0x143a[334]](db.User,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371]});db[_0x143a[111]][_0x143a[334]](db.SmsQueue,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371]});db[_0x143a[111]][_0x143a[334]](db.SmsAccount,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371]});db[_0x143a[111]][_0x143a[334]](db.Interval,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[337]});db[_0x143a[113]][_0x143a[334]](db.SmsAccount,{"\x61\x73":_0x143a[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":{"\x6E\x61\x6D\x65":_0x143a[380],"\x75\x6E\x69\x71\x75\x65":_0x143a[375]}});db[_0x143a[115]][_0x143a[293]](db.SmsMessage,{"\x61\x73":_0x143a[344],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[381]});db[_0x143a[115]][_0x143a[334]](db.SmsAccount,{"\x61\x73":_0x143a[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[380]});db[_0x143a[115]][_0x143a[334]](db.CmContact,{"\x61\x73":_0x143a[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351]});db[_0x143a[115]][_0x143a[334]](db.User,{"\x61\x73":_0x143a[364],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[290]});db[_0x143a[115]][_0x143a[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[382],"\x61\x73":_0x143a[366]});db[_0x143a[115]][_0x143a[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[382],"\x61\x73":_0x143a[367]});db[_0x143a[115]][_0x143a[305]](db.User,{"\x61\x73":_0x143a[368],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[314],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[381]});db[_0x143a[117]][_0x143a[334]](db.User,{"\x61\x73":_0x143a[22]});db[_0x143a[117]][_0x143a[334]](db.CmContact,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x61\x73":_0x143a[350]});db[_0x143a[117]][_0x143a[334]](db.SmsInteraction,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x61\x73":_0x143a[370],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[381]});db[_0x143a[119]][_0x143a[305]](db.User,{"\x61\x73":_0x143a[339],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[67],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[383]});db[_0x143a[119]][_0x143a[305]](db.Team,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[384],"\x61\x73":_0x143a[340]});db[_0x143a[121]][_0x143a[293]](db.CannedAnswer,{"\x61\x73":_0x143a[355],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[385]});db[_0x143a[121]][_0x143a[293]](db.OpenchannelInteraction,{"\x61\x73":_0x143a[356],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[385]});db[_0x143a[121]][_0x143a[293]](db.OpenchannelMessage,{"\x61\x73":_0x143a[344],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[385]});db[_0x143a[121]][_0x143a[293]](db.OpenchannelApplication,{"\x61\x73":_0x143a[324],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[385]});db[_0x143a[121]][_0x143a[293]](db.OpenchannelDisposition,{"\x61\x73":_0x143a[357],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[385]});db[_0x143a[121]][_0x143a[334]](db.CmList,{"\x61\x73":_0x143a[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[359]});db[_0x143a[123]][_0x143a[334]](db.User,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371]});db[_0x143a[123]][_0x143a[334]](db.OpenchannelQueue,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[386]});db[_0x143a[123]][_0x143a[334]](db.OpenchannelAccount,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[385]});db[_0x143a[123]][_0x143a[334]](db.Interval,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[337]});db[_0x143a[125]][_0x143a[334]](db.OpenchannelAccount,{"\x61\x73":_0x143a[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":{"\x6E\x61\x6D\x65":_0x143a[385],"\x75\x6E\x69\x71\x75\x65":_0x143a[375]}});db[_0x143a[127]][_0x143a[293]](db.OpenchannelMessage,{"\x61\x73":_0x143a[344],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[387]});db[_0x143a[127]][_0x143a[334]](db.OpenchannelAccount,{"\x61\x73":_0x143a[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[385]});db[_0x143a[127]][_0x143a[334]](db.CmContact,{"\x61\x73":_0x143a[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351]});db[_0x143a[127]][_0x143a[334]](db.User,{"\x61\x73":_0x143a[364],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[290]});db[_0x143a[127]][_0x143a[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[388],"\x61\x73":_0x143a[366]});db[_0x143a[127]][_0x143a[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[388],"\x61\x73":_0x143a[367]});db[_0x143a[127]][_0x143a[305]](db.User,{"\x61\x73":_0x143a[368],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[315],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[387]});db[_0x143a[129]][_0x143a[334]](db.User,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x61\x73":_0x143a[22]});db[_0x143a[129]][_0x143a[334]](db.CmContact,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x61\x73":_0x143a[350]});db[_0x143a[129]][_0x143a[334]](db.OpenchannelInteraction,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x61\x73":_0x143a[370],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[387]});db[_0x143a[129]][_0x143a[334]](db.Attachment,{"\x61\x73":_0x143a[287],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[378]});db[_0x143a[131]][_0x143a[305]](db.User,{"\x61\x73":_0x143a[339],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[69],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[386]});db[_0x143a[131]][_0x143a[305]](db.Team,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[389],"\x61\x73":_0x143a[340]});db[_0x143a[133]][_0x143a[293]](db.CannedAnswer,{"\x61\x73":_0x143a[355],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[390]});db[_0x143a[133]][_0x143a[293]](db.ChatProactiveAction,{"\x61\x73":_0x143a[391]});db[_0x143a[133]][_0x143a[293]](db.ChatInteraction,{"\x61\x73":_0x143a[356]});db[_0x143a[133]][_0x143a[293]](db.ChatApplication,{"\x61\x73":_0x143a[324]});db[_0x143a[133]][_0x143a[293]](db.ChatDisposition,{"\x61\x73":_0x143a[357]});db[_0x143a[133]][_0x143a[293]](db.ChatMessage,{"\x61\x73":_0x143a[344]});db[_0x143a[133]][_0x143a[334]](db.CmList,{"\x61\x73":_0x143a[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[359]});db[_0x143a[133]][_0x143a[334]](db.Interval,{"\x61\x73":_0x143a[179],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[337]});db[_0x143a[135]][_0x143a[334]](db.OpenchannelAccount,{});db[_0x143a[135]][_0x143a[334]](db.CmList,{"\x61\x73":_0x143a[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[359]});db[_0x143a[135]][_0x143a[334]](db.CmContact,{"\x61\x73":_0x143a[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351]});db[_0x143a[135]][_0x143a[334]](db.OpenchannelInteraction,{});db[_0x143a[135]][_0x143a[334]](db.OpenchannelMessage,{});db[_0x143a[135]][_0x143a[334]](db.User,{});db[_0x143a[135]][_0x143a[334]](db.OpenchannelQueue,{});db[_0x143a[137]][_0x143a[334]](db.User,{"\x61\x73":_0x143a[392],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[290],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371]});db[_0x143a[137]][_0x143a[334]](db.ChatQueue,{"\x61\x73":_0x143a[393],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[394],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371]});db[_0x143a[137]][_0x143a[334]](db.ChatWebsite,{"\x61\x73":_0x143a[395],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[390],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371]});db[_0x143a[139]][_0x143a[334]](db.ChatWebsite,{"\x61\x73":_0x143a[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":{"\x6E\x61\x6D\x65":_0x143a[390],"\x75\x6E\x69\x71\x75\x65":_0x143a[375]}});db[_0x143a[141]][_0x143a[293]](db.ChatMessage,{"\x61\x73":_0x143a[344],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[396]});db[_0x143a[141]][_0x143a[334]](db.ChatWebsite,{"\x61\x73":_0x143a[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[390]});db[_0x143a[141]][_0x143a[334]](db.CmContact,{"\x61\x73":_0x143a[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351]});db[_0x143a[141]][_0x143a[334]](db.User,{"\x61\x73":_0x143a[364],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[290]});db[_0x143a[141]][_0x143a[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[397],"\x61\x73":_0x143a[366]});db[_0x143a[141]][_0x143a[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[397],"\x61\x73":_0x143a[367]});db[_0x143a[141]][_0x143a[305]](db.User,{"\x61\x73":_0x143a[368],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[312],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[396]});db[_0x143a[143]][_0x143a[334]](db.User,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x61\x73":_0x143a[22]});db[_0x143a[143]][_0x143a[334]](db.CmContact,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x61\x73":_0x143a[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351]});db[_0x143a[143]][_0x143a[334]](db.ChatInteraction,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x61\x73":_0x143a[370],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[396]});db[_0x143a[143]][_0x143a[334]](db.Attachment,{"\x61\x73":_0x143a[287],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[378]});db[_0x143a[145]][_0x143a[334]](db.CmContact,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x61\x73":_0x143a[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351]});db[_0x143a[145]][_0x143a[334]](db.ChatWebsite,{"\x61\x73":_0x143a[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[390]});db[_0x143a[147]][_0x143a[305]](db.User,{"\x61\x73":_0x143a[339],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[61],"\x68\x6F\x6F\x6B\x73":true});db[_0x143a[147]][_0x143a[305]](db.Team,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[398],"\x61\x73":_0x143a[340]});db[_0x143a[149]][_0x143a[293]](db.ChatInternalMessage,{"\x61\x73":_0x143a[344],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[399],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289]});db[_0x143a[149]][_0x143a[305]](db.User,{"\x61\x73":_0x143a[327],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[304]});db[_0x143a[151]][_0x143a[334]](db.ChatWebsite,{"\x61\x73":_0x143a[395],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[390]});db[_0x143a[153]][_0x143a[293]](db.CmContact,{"\x61\x73":_0x143a[306],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[400]});db[_0x143a[155]][_0x143a[293]](db.CmHopper,{"\x61\x73":_0x143a[329],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351]});db[_0x143a[155]][_0x143a[293]](db.CmHopperFinal,{"\x61\x73":_0x143a[296],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351]});db[_0x143a[155]][_0x143a[293]](db.CmHopperHistory,{"\x61\x73":_0x143a[330],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351]});db[_0x143a[155]][_0x143a[293]](db.ReportAgentPreview,{"\x61\x73":_0x143a[165],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351]});db[_0x143a[155]][_0x143a[293]](db.JscriptySessionReport,{"\x61\x73":_0x143a[332],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351]});db[_0x143a[155]][_0x143a[293]](db.OpenchannelInteraction,{"\x61\x73":_0x143a[298],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371]});db[_0x143a[155]][_0x143a[293]](db.ChatInteraction,{"\x61\x73":_0x143a[299],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371]});db[_0x143a[155]][_0x143a[293]](db.SmsInteraction,{"\x61\x73":_0x143a[300],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371]});db[_0x143a[155]][_0x143a[293]](db.FaxInteraction,{"\x61\x73":_0x143a[301],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371]});db[_0x143a[155]][_0x143a[293]](db.MailInteraction,{"\x61\x73":_0x143a[302],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371]});db[_0x143a[155]][_0x143a[334]](db.CmCompany,{"\x61\x73":_0x143a[401],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[400]});db[_0x143a[155]][_0x143a[334]](db.CmList,{"\x61\x73":_0x143a[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[359],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289]});db[_0x143a[155]][_0x143a[305]](db.User,{"\x61\x73":_0x143a[368],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[307]});db[_0x143a[157]][_0x143a[334]](db.CmContact,{"\x61\x73":_0x143a[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289]});db[_0x143a[157]][_0x143a[334]](db.CmList,{"\x61\x73":_0x143a[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[359],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289]});db[_0x143a[157]][_0x143a[334]](db.User,{"\x61\x73":_0x143a[392],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[290]});db[_0x143a[157]][_0x143a[334]](db.VoiceQueue,{"\x61\x73":_0x143a[393],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[328],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289]});db[_0x143a[157]][_0x143a[334]](db.Campaign,{"\x61\x73":_0x143a[283],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[402],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289]});db[_0x143a[159]][_0x143a[334]](db.CmContact,{"\x61\x73":_0x143a[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289]});db[_0x143a[159]][_0x143a[334]](db.CmList,{"\x61\x73":_0x143a[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[359],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289]});db[_0x143a[159]][_0x143a[334]](db.VoiceQueue,{"\x61\x73":_0x143a[393],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[328],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289]});db[_0x143a[159]][_0x143a[334]](db.Campaign,{"\x61\x73":_0x143a[283],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[402],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289]});db[_0x143a[169]][_0x143a[293]](db.VoiceDisposition,{"\x61\x73":_0x143a[357],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":{"\x6E\x61\x6D\x65":_0x143a[359],"\x75\x6E\x69\x71\x75\x65":_0x143a[375]}});db[_0x143a[169]][_0x143a[293]](db.CmCustomField,{"\x61\x73":_0x143a[403],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[359]});db[_0x143a[169]][_0x143a[293]](db.CmContact,{"\x61\x73":_0x143a[306],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[359]});db[_0x143a[169]][_0x143a[293]](db.CmHopperFinal,{"\x61\x73":_0x143a[296],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[359]});db[_0x143a[169]][_0x143a[293]](db.CmHopperHistory,{"\x61\x73":_0x143a[297],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[359]});db[_0x143a[169]][_0x143a[293]](db.ReportAgentPreview,{"\x61\x73":_0x143a[165],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[359]});db[_0x143a[169]][_0x143a[305]](db.VoiceQueue,{"\x61\x73":_0x143a[404],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[338]});db[_0x143a[169]][_0x143a[305]](db.User,{"\x61\x73":_0x143a[339],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[309]});db[_0x143a[173]][_0x143a[293]](db.Condition,{"\x61\x73":{"\x70\x6C\x75\x72\x61\x6C":_0x143a[405],"\x73\x69\x6E\x67\x75\x6C\x61\x72":_0x143a[406]},"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[407],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x68\x6F\x6F\x6B\x73":true});db[_0x143a[173]][_0x143a[293]](db.Condition,{"\x61\x73":{"\x70\x6C\x75\x72\x61\x6C":_0x143a[408],"\x73\x69\x6E\x67\x75\x6C\x61\x72":_0x143a[409]},"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[410],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x68\x6F\x6F\x6B\x73":true});db[_0x143a[173]][_0x143a[293]](db.Action,{"\x61\x73":_0x143a[411],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[412],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x68\x6F\x6F\x6B\x73":true});db[_0x143a[179]][_0x143a[293]](db.Interval,{"\x61\x73":_0x143a[413],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[337],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x68\x6F\x6F\x6B\x73":true,"\x72\x65\x71\x75\x69\x72\x65\x64":false});db[_0x143a[179]][_0x143a[293]](db.VoiceExtension,{"\x61\x73":_0x143a[295],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[337],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371]});db[_0x143a[179]][_0x143a[293]](db.MailApplication,{"\x61\x73":_0x143a[414],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[337]});db[_0x143a[179]][_0x143a[293]](db.ChatApplication,{"\x61\x73":_0x143a[415],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[337]});db[_0x143a[179]][_0x143a[293]](db.FaxApplication,{"\x61\x73":_0x143a[416],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[337]});db[_0x143a[179]][_0x143a[293]](db.SmsApplication,{"\x61\x73":_0x143a[417],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[337]});db[_0x143a[187]][_0x143a[334]](db.MailAccount,{});db[_0x143a[187]][_0x143a[334]](db.AnalyticDefaultReport,{"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[418]});db[_0x143a[187]][_0x143a[334]](db.AnalyticCustomReport,{"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[419]});db[_0x143a[189]][_0x143a[305]](db.VoiceMusicOnHold,{"\x61\x73":_0x143a[420],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[326],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[371]});db[_0x143a[191]][_0x143a[305]](db.ChatInteraction,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[397]});db[_0x143a[191]][_0x143a[305]](db.MailInteraction,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[365]});db[_0x143a[191]][_0x143a[305]](db.SmsInteraction,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[382]});db[_0x143a[191]][_0x143a[305]](db.FaxInteraction,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[377]});db[_0x143a[191]][_0x143a[305]](db.OpenchannelInteraction,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[388]});db[_0x143a[195]][_0x143a[293]](db.Condition,{"\x61\x73":{"\x70\x6C\x75\x72\x61\x6C":_0x143a[421],"\x73\x69\x6E\x67\x75\x6C\x61\x72":_0x143a[422]},"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[423],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x68\x6F\x6F\x6B\x73":true});db[_0x143a[195]][_0x143a[293]](db.Condition,{"\x61\x73":{"\x70\x6C\x75\x72\x61\x6C":_0x143a[424],"\x73\x69\x6E\x67\x75\x6C\x61\x72":_0x143a[425]},"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[426],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x68\x6F\x6F\x6B\x73":true});db[_0x143a[195]][_0x143a[293]](db.Action,{"\x61\x73":_0x143a[411],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[427],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x68\x6F\x6F\x6B\x73":true});db[_0x143a[203]][_0x143a[293]](db.AnalyticFieldReport,{"\x61\x73":_0x143a[428],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[419],"\x68\x6F\x6F\x6B\x73":true});db[_0x143a[205]][_0x143a[293]](db.AnalyticFieldReport,{"\x61\x73":_0x143a[428],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[418]});db[_0x143a[209]][_0x143a[293]](db.AnalyticFieldReport,{"\x61\x73":_0x143a[428],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[429]});db[_0x143a[211]][_0x143a[334]](db.AnalyticMetric,{"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[429]});db[_0x143a[215]][_0x143a[293]](db.SalesforceConfiguration,{"\x61\x73":_0x143a[430],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[431]});db[_0x143a[217]][_0x143a[293]](db.SalesforceField,{"\x61\x73":_0x143a[432],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[433]});db[_0x143a[217]][_0x143a[293]](db.SalesforceField,{"\x61\x73":_0x143a[434],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[435]});db[_0x143a[217]][_0x143a[293]](db.SalesforceField,{"\x61\x73":_0x143a[428],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[436]});db[_0x143a[217]][_0x143a[334]](db.SalesforceAccount,{"\x61\x73":_0x143a[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[431]});db[_0x143a[219]][_0x143a[293]](db.SalesforceField,{"\x61\x73":_0x143a[437],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[433]});db[_0x143a[219]][_0x143a[293]](db.SalesforceField,{"\x61\x73":_0x143a[438],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[435]});db[_0x143a[219]][_0x143a[293]](db.SalesforceField,{"\x61\x73":_0x143a[439],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[436]});db[_0x143a[219]][_0x143a[334]](db.Variable,{"\x61\x73":_0x143a[197],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[440]});db[_0x143a[221]][_0x143a[293]](db.SugarcrmConfiguration,{"\x61\x73":_0x143a[430],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[431]});db[_0x143a[223]][_0x143a[293]](db.SugarcrmField,{"\x61\x73":_0x143a[432],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[433]});db[_0x143a[223]][_0x143a[293]](db.SugarcrmField,{"\x61\x73":_0x143a[434],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[435]});db[_0x143a[223]][_0x143a[293]](db.SugarcrmField,{"\x61\x73":_0x143a[428],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[436]});db[_0x143a[223]][_0x143a[334]](db.SugarcrmAccount,{"\x61\x73":_0x143a[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[431]});db[_0x143a[225]][_0x143a[293]](db.SugarcrmField,{"\x61\x73":_0x143a[437],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[433]});db[_0x143a[225]][_0x143a[293]](db.SugarcrmField,{"\x61\x73":_0x143a[438],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[435]});db[_0x143a[225]][_0x143a[293]](db.SugarcrmField,{"\x61\x73":_0x143a[439],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[436]});db[_0x143a[225]][_0x143a[334]](db.Variable,{"\x61\x73":_0x143a[197],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[440]});db[_0x143a[227]][_0x143a[293]](db.DeskConfiguration,{"\x61\x73":_0x143a[430],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[431]});db[_0x143a[229]][_0x143a[293]](db.DeskField,{"\x61\x73":_0x143a[432],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[433]});db[_0x143a[229]][_0x143a[293]](db.DeskField,{"\x61\x73":_0x143a[434],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[435]});db[_0x143a[229]][_0x143a[293]](db.DeskField,{"\x61\x73":_0x143a[428],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[436]});db[_0x143a[229]][_0x143a[334]](db.DeskAccount,{"\x61\x73":_0x143a[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[431]});db[_0x143a[229]][_0x143a[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[441]});db[_0x143a[231]][_0x143a[293]](db.DeskField,{"\x61\x73":_0x143a[437],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[433]});db[_0x143a[231]][_0x143a[293]](db.DeskField,{"\x61\x73":_0x143a[438],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[435]});db[_0x143a[231]][_0x143a[293]](db.DeskField,{"\x61\x73":_0x143a[439],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[436]});db[_0x143a[231]][_0x143a[334]](db.Variable,{"\x61\x73":_0x143a[197],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[440]});db[_0x143a[233]][_0x143a[293]](db.ZohoConfiguration,{"\x61\x73":_0x143a[430],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[431]});db[_0x143a[235]][_0x143a[293]](db.ZohoField,{"\x61\x73":_0x143a[432],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[433]});db[_0x143a[235]][_0x143a[293]](db.ZohoField,{"\x61\x73":_0x143a[434],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[435]});db[_0x143a[235]][_0x143a[293]](db.ZohoField,{"\x61\x73":_0x143a[428],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[436]});db[_0x143a[235]][_0x143a[334]](db.ZohoAccount,{"\x61\x73":_0x143a[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[431]});db[_0x143a[237]][_0x143a[293]](db.ZohoField,{"\x61\x73":_0x143a[437],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[433]});db[_0x143a[237]][_0x143a[293]](db.ZohoField,{"\x61\x73":_0x143a[438],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[435]});db[_0x143a[237]][_0x143a[293]](db.ZohoField,{"\x61\x73":_0x143a[439],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[436]});db[_0x143a[237]][_0x143a[334]](db.Variable,{"\x61\x73":_0x143a[197],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[440]});db[_0x143a[239]][_0x143a[293]](db.ZendeskConfiguration,{"\x61\x73":_0x143a[430],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[431]});db[_0x143a[241]][_0x143a[293]](db.ZendeskField,{"\x61\x73":_0x143a[432],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[433]});db[_0x143a[241]][_0x143a[293]](db.ZendeskField,{"\x61\x73":_0x143a[434],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[435]});db[_0x143a[241]][_0x143a[293]](db.ZendeskField,{"\x61\x73":_0x143a[428],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[436]});db[_0x143a[241]][_0x143a[334]](db.ZendeskAccount,{"\x61\x73":_0x143a[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[431]});db[_0x143a[241]][_0x143a[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[442]});db[_0x143a[243]][_0x143a[293]](db.ZendeskField,{"\x61\x73":_0x143a[437],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[433]});db[_0x143a[243]][_0x143a[293]](db.ZendeskField,{"\x61\x73":_0x143a[438],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[435]});db[_0x143a[243]][_0x143a[293]](db.ZendeskField,{"\x61\x73":_0x143a[439],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[436]});db[_0x143a[243]][_0x143a[334]](db.Variable,{"\x61\x73":_0x143a[197],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[440]});db[_0x143a[245]][_0x143a[293]](db.FreshdeskConfiguration,{"\x61\x73":_0x143a[430],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[431]});db[_0x143a[247]][_0x143a[293]](db.FreshdeskField,{"\x61\x73":_0x143a[432],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[433]});db[_0x143a[247]][_0x143a[293]](db.FreshdeskField,{"\x61\x73":_0x143a[434],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[435]});db[_0x143a[247]][_0x143a[293]](db.FreshdeskField,{"\x61\x73":_0x143a[428],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[436]});db[_0x143a[247]][_0x143a[334]](db.FreshdeskAccount,{"\x61\x73":_0x143a[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[431]});db[_0x143a[247]][_0x143a[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[443]});db[_0x143a[249]][_0x143a[293]](db.FreshdeskField,{"\x61\x73":_0x143a[437],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[433]});db[_0x143a[249]][_0x143a[293]](db.FreshdeskField,{"\x61\x73":_0x143a[438],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[435]});db[_0x143a[249]][_0x143a[293]](db.FreshdeskField,{"\x61\x73":_0x143a[439],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[436]});db[_0x143a[249]][_0x143a[334]](db.Variable,{"\x61\x73":_0x143a[197],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[440]});db[_0x143a[253]][_0x143a[334]](db.ChatWebsite,{});db[_0x143a[253]][_0x143a[334]](db.CmList,{"\x61\x73":_0x143a[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[359]});db[_0x143a[253]][_0x143a[334]](db.CmContact,{"\x61\x73":_0x143a[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351]});db[_0x143a[253]][_0x143a[334]](db.ChatInteraction,{});db[_0x143a[253]][_0x143a[334]](db.ChatMessage,{});db[_0x143a[253]][_0x143a[334]](db.User,{});db[_0x143a[253]][_0x143a[334]](db.ChatQueue,{});db[_0x143a[255]][_0x143a[334]](db.User,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[444]});db[_0x143a[255]][_0x143a[334]](db.User,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[445]});db[_0x143a[261]][_0x143a[293]](db.JscriptyQuestionReport,{"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[446],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289]});db[_0x143a[261]][_0x143a[293]](db.JscriptyAnswerReport,{"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[446],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x143a[289]});db[_0x143a[263]][_0x143a[334]](db.SmsAccount,{});db[_0x143a[263]][_0x143a[334]](db.CmList,{"\x61\x73":_0x143a[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[359]});db[_0x143a[263]][_0x143a[334]](db.CmContact,{"\x61\x73":_0x143a[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[351]});db[_0x143a[263]][_0x143a[334]](db.SmsInteraction,{});db[_0x143a[263]][_0x143a[334]](db.SmsMessage,{});db[_0x143a[263]][_0x143a[334]](db.User,{});db[_0x143a[263]][_0x143a[334]](db.SmsQueue,{});db[_0x143a[269]][_0x143a[293]](db.JscriptySessionReport,{"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[447]});db[_0x143a[269]][_0x143a[293]](db.JscriptyQuestionReport,{"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[447]});db[_0x143a[269]][_0x143a[293]](db.JscriptyAnswerReport,{"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[447]});db[_0x143a[279]][_0x143a[305]](db.User,{"\x61\x73":_0x143a[339],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[310]});db[_0x143a[279]][_0x143a[305]](db.VoiceQueue,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[341],"\x61\x73":_0x143a[316]});db[_0x143a[279]][_0x143a[305]](db.MailQueue,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[361],"\x61\x73":_0x143a[317]});db[_0x143a[279]][_0x143a[305]](db.ChatQueue,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[398],"\x61\x73":_0x143a[318]});db[_0x143a[279]][_0x143a[305]](db.FaxQueue,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[379],"\x61\x73":_0x143a[319]});db[_0x143a[279]][_0x143a[305]](db.SmsQueue,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[384],"\x61\x73":_0x143a[320]});db[_0x143a[279]][_0x143a[305]](db.OpenchannelQueue,{"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[389],"\x61\x73":_0x143a[321]});db[_0x143a[283]][_0x143a[293]](db.CmHopper,{"\x61\x73":_0x143a[329],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[402]});db[_0x143a[283]][_0x143a[293]](db.CmHopperFinal,{"\x61\x73":_0x143a[296],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[402]});db[_0x143a[283]][_0x143a[293]](db.CmHopperHistory,{"\x61\x73":_0x143a[330],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[402]});db[_0x143a[283]][_0x143a[293]](db.CmHopperBlack,{"\x61\x73":_0x143a[331],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[402]});db[_0x143a[283]][_0x143a[334]](db.Trunk,{"\x61\x73":_0x143a[53],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[333]});db[_0x143a[283]][_0x143a[334]](db.Trunk,{"\x61\x73":_0x143a[335],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[336]});db[_0x143a[283]][_0x143a[334]](db.Interval,{"\x61\x73":_0x143a[179],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[337]});db[_0x143a[283]][_0x143a[334]](db.SquareProject,{"\x61\x73":_0x143a[275],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x143a[448]});db[_0x143a[283]][_0x143a[305]](db.CmList,{"\x61\x73":_0x143a[308],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[449]});db[_0x143a[283]][_0x143a[305]](db.CmList,{"\x61\x73":_0x143a[342],"\x74\x68\x72\x6F\x75\x67\x68":_0x143a[450]});module[_0x143a[451]]= {db:db,dbH:dbH}
\ No newline at end of file
+var _0x23b6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x70\x61\x74\x68","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6C\x6F\x64\x61\x73\x68","\x6A\x73\x74\x7A","\x64\x65\x74\x65\x72\x6D\x69\x6E\x65","\x6D\x6F\x74\x69\x6F\x6E\x32","\x78\x63\x61\x6C\x6C","\x78\x43\x40\x4C\x4C\x31\x32\x33\x34","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31","\x6D\x79\x73\x71\x6C","\x75\x74\x66\x38\x6D\x62\x34","\x6E\x61\x6D\x65","\x75\x74\x66\x38","\x75\x74\x66\x38\x5F\x67\x65\x6E\x65\x72\x61\x6C\x5F\x63\x69","\x64\x65\x66\x61\x75\x6C\x74\x73\x44\x65\x65\x70","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65\x48\x69\x73\x74\x6F\x72\x79","\x64\x61\x74\x61\x62\x61\x73\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x6F\x70\x74\x69\x6F\x6E\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x2F\x75\x73\x65\x72\x2E\x6D\x6F\x64\x65\x6C","\x69\x6D\x70\x6F\x72\x74","\x56\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79\x2F\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2F\x76\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x76\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64\x2F\x76\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2F\x76\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x4D\x61\x69\x6C\x2F\x76\x6F\x69\x63\x65\x4D\x61\x69\x6C\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2F\x76\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x2F\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x2F\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x2F\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74\x2F\x6D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x54\x72\x75\x6E\x6B","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x72\x75\x6E\x6B\x2F\x74\x72\x75\x6E\x6B\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74\x2F\x76\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x2F\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x2E\x6D\x6F\x64\x65\x6C","\x55\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x55\x73\x65\x72\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x55\x73\x65\x72\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x55\x73\x65\x72\x46\x61\x78\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x46\x61\x78\x51\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x46\x61\x78\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x55\x73\x65\x72\x53\x6D\x73\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x53\x6D\x73\x51\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x53\x6D\x73\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x55\x73\x65\x72\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E\x2F\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E\x2E\x6D\x6F\x64\x65\x6C","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74\x2F\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74\x2E\x6D\x6F\x64\x65\x6C","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x4D\x61\x69\x6C\x53\x75\x62\x73\x74\x61\x74\x75\x73","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x53\x75\x62\x73\x74\x61\x74\x75\x73\x2F\x6D\x61\x69\x6C\x53\x75\x62\x73\x74\x61\x74\x75\x73\x2E\x6D\x6F\x64\x65\x6C","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x6D\x6F\x64\x65\x6C","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x6D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2E\x6D\x6F\x64\x65\x6C","\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D","\x2E\x2E\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D\x2E\x6D\x6F\x64\x65\x6C","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x66\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x66\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x6D\x6F\x64\x65\x6C","\x46\x61\x78\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2F\x73\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x73\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x53\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x73\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2E\x6D\x6F\x64\x65\x6C","\x53\x6D\x73\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x6D\x6F\x64\x65\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x2F\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x2E\x6D\x6F\x64\x65\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x63\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x63\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x2F\x63\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x47\x72\x6F\x75\x70","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x47\x72\x6F\x75\x70\x2F\x63\x68\x61\x74\x47\x72\x6F\x75\x70\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x2F\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x43\x6D\x43\x6F\x6D\x70\x61\x6E\x79","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x43\x6F\x6D\x70\x61\x6E\x79\x2F\x63\x6D\x43\x6F\x6D\x70\x61\x6E\x79\x2E\x6D\x6F\x64\x65\x6C","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2E\x6D\x6F\x64\x65\x6C","\x43\x6D\x48\x6F\x70\x70\x65\x72","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x2E\x6D\x6F\x64\x65\x6C","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x2E\x6D\x6F\x64\x65\x6C","\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x2E\x6D\x6F\x64\x65\x6C","\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79\x2E\x6D\x6F\x64\x65\x6C","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77\x2F\x72\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77\x2E\x6D\x6F\x64\x65\x6C","\x43\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x2F\x63\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x2E\x6D\x6F\x64\x65\x6C","\x43\x6D\x4C\x69\x73\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x4C\x69\x73\x74\x2F\x63\x6D\x4C\x69\x73\x74\x2E\x6D\x6F\x64\x65\x6C","\x41\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x63\x74\x69\x6F\x6E\x2F\x61\x63\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72\x2F\x63\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72\x2E\x6D\x6F\x64\x65\x6C","\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x2F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2E\x6D\x6F\x64\x65\x6C","\x50\x61\x75\x73\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x70\x61\x75\x73\x65\x2F\x70\x61\x75\x73\x65\x2E\x6D\x6F\x64\x65\x6C","\x43\x64\x72","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x64\x72\x2F\x63\x64\x72\x2E\x6D\x6F\x64\x65\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67\x2E\x6D\x6F\x64\x65\x6C","\x53\x63\x68\x65\x64\x75\x6C\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x2E\x6D\x6F\x64\x65\x6C","\x53\x6F\x75\x6E\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64\x2F\x73\x6F\x75\x6E\x64\x2E\x6D\x6F\x64\x65\x6C","\x54\x61\x67","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x61\x67\x2F\x74\x61\x67\x2E\x6D\x6F\x64\x65\x6C","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2E\x6D\x6F\x64\x65\x6C","\x54\x72\x69\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x72\x69\x67\x67\x65\x72\x2F\x74\x72\x69\x67\x67\x65\x72\x2E\x6D\x6F\x64\x65\x6C","\x56\x61\x72\x69\x61\x62\x6C\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x6D\x6F\x64\x65\x6C","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x41\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x41\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x41\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x41\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63\x2E\x6D\x6F\x64\x65\x6C","\x41\x6E\x61\x6C\x79\x74\x69\x63\x46\x69\x65\x6C\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x46\x69\x65\x6C\x64\x52\x65\x70\x6F\x72\x74\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x46\x69\x65\x6C\x64\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x41\x6E\x61\x6C\x79\x74\x69\x63\x54\x72\x65\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x54\x72\x65\x65\x52\x65\x70\x6F\x72\x74\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x54\x72\x65\x65\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x2E\x6D\x6F\x64\x65\x6C","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x2E\x6D\x6F\x64\x65\x6C","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x69\x6E\x74\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x44\x65\x73\x6B\x46\x69\x65\x6C\x64\x2F\x69\x6E\x74\x44\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x6D\x6F\x64\x65\x6C","\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64\x2E\x6D\x6F\x64\x65\x6C","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x6D\x6F\x64\x65\x6C","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x2E\x6D\x6F\x64\x65\x6C","\x4E\x65\x74\x77\x6F\x72\x6B","\x2E\x2E\x2F\x61\x70\x69\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x6D\x6F\x64\x65\x6C","\x4A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x4A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x2E\x6D\x6F\x64\x65\x6C","\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x73\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x44\x65\x74\x61\x69\x6C\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x44\x65\x74\x61\x69\x6C\x2E\x6D\x6F\x64\x65\x6C","\x4A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74\x2E\x6D\x6F\x64\x65\x6C","\x53\x65\x74\x74\x69\x6E\x67","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x65\x74\x74\x69\x6E\x67\x2F\x73\x65\x74\x74\x69\x6E\x67\x2E\x6D\x6F\x64\x65\x6C","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x4F\x64\x62\x63\x2F\x73\x71\x75\x61\x72\x65\x4F\x64\x62\x63\x2E\x6D\x6F\x64\x65\x6C","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x2F\x73\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x2E\x6D\x6F\x64\x65\x6C","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x6D\x6F\x64\x65\x6C","\x54\x65\x61\x6D","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x65\x61\x6D\x2F\x74\x65\x61\x6D\x2E\x6D\x6F\x64\x65\x6C","\x4C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x6D\x6F\x64\x65\x6C","\x43\x61\x6D\x70\x61\x69\x67\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E\x2E\x6D\x6F\x64\x65\x6C","\x4D\x69\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x69\x67\x72\x61\x74\x69\x6F\x6E\x2F\x6D\x69\x67\x72\x61\x74\x69\x6F\x6E\x2E\x6D\x6F\x64\x65\x6C","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x6D\x6F\x64\x65\x6C","\x63\x61\x73\x63\x61\x64\x65","\x55\x73\x65\x72\x49\x64","\x68\x61\x73\x4F\x6E\x65","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x68\x61\x73\x4D\x61\x6E\x79","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x52\x74","\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x73","\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x47\x72\x6F\x75\x70\x73","\x63\x68\x61\x74\x5F\x67\x72\x6F\x75\x70\x5F\x68\x61\x73\x5F\x75\x73\x65\x72\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x63\x6D\x5F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x4C\x69\x73\x74\x73","\x63\x6D\x5F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x53\x70\x69\x65\x64\x41\x67\x65\x6E\x74\x73","\x43\x68\x61\x6E\x53\x70\x79\x49\x64","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x53\x6F\x75\x6E\x64\x73","\x6D\x6F\x68\x5F\x68\x61\x73\x5F\x73\x6F\x75\x6E\x64\x73","\x4D\x65\x6D\x62\x65\x72\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x48\x6F\x70\x70\x65\x72\x73","\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x69\x65\x73","\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x73","\x54\x72\x75\x6E\x6B\x49\x64","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x54\x72\x75\x6E\x6B\x42\x61\x63\x6B\x75\x70","\x54\x72\x75\x6E\x6B\x42\x61\x63\x6B\x75\x70\x49\x64","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73\x5F\x68\x61\x73\x5F\x63\x6D\x5F\x6C\x69\x73\x74\x73","\x41\x67\x65\x6E\x74\x73","\x54\x65\x61\x6D\x73","\x74\x65\x61\x6D\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73","\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x73","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x73\x5F\x68\x61\x73\x5F\x63\x6D\x5F\x62\x6C\x61\x63\x6B\x6C\x69\x73\x74\x73","\x4D\x65\x73\x73\x61\x67\x65\x73","\x6D\x61\x69\x6C\x62\x6F\x78\x75\x73\x65\x72","\x6D\x61\x69\x6C\x62\x6F\x78","\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x73","\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x49\x6D\x61\x70","\x53\x6D\x74\x70","\x41\x6E\x73\x77\x65\x72\x73","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x4C\x69\x73\x74","\x4C\x69\x73\x74\x49\x64","\x54\x65\x6D\x70\x6C\x61\x74\x65\x49\x64","\x74\x65\x61\x6D\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x73","\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x41\x63\x63\x6F\x75\x6E\x74","\x4F\x77\x6E\x65\x72","\x6D\x61\x69\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x5F\x68\x61\x73\x5F\x74\x61\x67\x73","\x54\x61\x67\x73","\x54\x68\x72\x6F\x75\x67\x68\x54\x61\x67\x73","\x55\x73\x65\x72\x73","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x72\x65\x73\x74\x72\x69\x63\x74","\x49\x74\x65\x6D\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x45\x78\x6E\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x6E\x61\x6D\x65\x41\x6E\x64\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x66\x61\x78\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x5F\x68\x61\x73\x5F\x74\x61\x67\x73","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x49\x64","\x74\x65\x61\x6D\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x73","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x73\x6D\x73\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x5F\x68\x61\x73\x5F\x74\x61\x67\x73","\x53\x6D\x73\x51\x75\x65\x75\x65\x49\x64","\x74\x65\x61\x6D\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x49\x64","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x5F\x68\x61\x73\x5F\x74\x61\x67\x73","\x74\x65\x61\x6D\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x73","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x41\x67\x65\x6E\x74","\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x49\x64","\x57\x65\x62\x73\x69\x74\x65","\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x63\x68\x61\x74\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x5F\x68\x61\x73\x5F\x74\x61\x67\x73","\x74\x65\x61\x6D\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x73","\x43\x68\x61\x74\x47\x72\x6F\x75\x70\x49\x64","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x43\x6F\x6D\x70\x61\x6E\x79","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x51\x75\x65\x75\x65\x73","\x41\x6C\x6C","\x4F\x6E\x65\x41\x6C\x6C","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x41\x6C\x6C\x49\x64","\x41\x6E\x79","\x4F\x6E\x65\x41\x6E\x79","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x41\x6E\x79\x49\x64","\x41\x63\x74\x69\x6F\x6E\x73","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x49\x64","\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x4D\x6F\x68\x73","\x41\x6C\x6C\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x41\x6C\x6C\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x54\x72\x69\x67\x67\x65\x72\x41\x6C\x6C\x49\x64","\x41\x6E\x79\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x41\x6E\x79\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x54\x72\x69\x67\x67\x65\x72\x41\x6E\x79\x49\x64","\x54\x72\x69\x67\x67\x65\x72\x49\x64","\x46\x69\x65\x6C\x64\x73","\x4D\x65\x74\x72\x69\x63\x49\x64","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x53\x75\x62\x6A\x65\x63\x74\x49\x64","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x49\x64","\x46\x69\x65\x6C\x64\x49\x64","\x53\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64","\x56\x61\x72\x69\x61\x62\x6C\x65\x49\x64","\x69\x6E\x74\x5F\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x5F\x68\x61\x73\x5F\x74\x61\x67\x73","\x69\x6E\x74\x5F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x5F\x68\x61\x73\x5F\x74\x61\x67\x73","\x69\x6E\x74\x5F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x5F\x68\x61\x73\x5F\x74\x61\x67\x73","\x46\x72\x6F\x6D\x49\x64","\x54\x6F\x49\x64","\x53\x65\x73\x73\x69\x6F\x6E\x49\x64","\x50\x72\x6F\x6A\x65\x63\x74\x49\x64","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x49\x64","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73\x5F\x68\x61\x73\x5F\x63\x6D\x5F\x6C\x69\x73\x74\x73","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73\x5F\x68\x61\x73\x5F\x63\x6D\x5F\x62\x6C\x61\x63\x6B\x6C\x69\x73\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x23b6[0];var path=require(_0x23b6[1]);var config=require(_0x23b6[2]);var Sequelize=require(_0x23b6[3]);var _=require(_0x23b6[4]);var jstz=require(_0x23b6[5]);var timezone=jstz[_0x23b6[6]]();config[_0x23b6[3]]= _[_0x23b6[16]](config[_0x23b6[3]],{database:_0x23b6[7],username:_0x23b6[8],password:_0x23b6[9],options:{host:_0x23b6[10],port:3306,dialect:_0x23b6[11],dialectOptions:{charset:_0x23b6[12]},logging:false,timezone:timezone[_0x23b6[13]](),define:{charset:_0x23b6[14],collate:_0x23b6[15]}}});config[_0x23b6[17]]= _[_0x23b6[16]](config[_0x23b6[17]],{database:_0x23b6[7],username:_0x23b6[8],password:_0x23b6[9],options:{host:_0x23b6[10],port:3306,dialect:_0x23b6[11],dialectOptions:{charset:_0x23b6[12]},logging:false,timezone:timezone[_0x23b6[13]](),define:{charset:_0x23b6[14],collate:_0x23b6[15]}}});var db={Sequelize:Sequelize,sequelize: new Sequelize(config[_0x23b6[3]][_0x23b6[18]],config[_0x23b6[3]][_0x23b6[19]],config[_0x23b6[3]][_0x23b6[20]],config[_0x23b6[3]][_0x23b6[21]])};var dbH={Sequelize:Sequelize,sequelize: new Sequelize(config[_0x23b6[17]][_0x23b6[18]],config[_0x23b6[17]][_0x23b6[19]],config[_0x23b6[17]][_0x23b6[20]],config[_0x23b6[17]][_0x23b6[21]])};db[_0x23b6[22]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[23]);db[_0x23b6[25]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[26]);db[_0x23b6[27]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[28]);db[_0x23b6[29]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[30]);db[_0x23b6[31]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[32]);db[_0x23b6[33]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[34]);db[_0x23b6[35]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[36]);db[_0x23b6[37]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[38]);db[_0x23b6[39]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[40]);db[_0x23b6[41]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[42]);db[_0x23b6[43]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[44]);db[_0x23b6[45]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[46]);db[_0x23b6[47]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[48]);db[_0x23b6[49]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[50]);db[_0x23b6[51]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[52]);db[_0x23b6[53]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[54]);db[_0x23b6[55]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[56]);db[_0x23b6[57]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[58]);db[_0x23b6[59]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[60]);db[_0x23b6[61]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[62]);db[_0x23b6[63]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[64]);db[_0x23b6[65]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[66]);db[_0x23b6[67]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[68]);db[_0x23b6[69]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[70]);db[_0x23b6[71]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[72]);db[_0x23b6[73]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[74]);db[_0x23b6[75]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[76]);db[_0x23b6[77]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[78]);db[_0x23b6[79]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[80]);db[_0x23b6[81]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[82]);db[_0x23b6[83]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[84]);db[_0x23b6[85]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[86]);db[_0x23b6[87]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[88]);db[_0x23b6[89]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[90]);db[_0x23b6[91]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[92]);db[_0x23b6[93]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[94]);db[_0x23b6[95]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[96]);db[_0x23b6[97]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[98]);db[_0x23b6[99]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[100]);db[_0x23b6[101]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[102]);db[_0x23b6[103]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[104]);db[_0x23b6[105]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[106]);db[_0x23b6[107]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[108]);db[_0x23b6[109]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[110]);db[_0x23b6[111]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[112]);db[_0x23b6[113]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[114]);db[_0x23b6[115]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[116]);db[_0x23b6[117]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[118]);db[_0x23b6[119]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[120]);db[_0x23b6[121]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[122]);db[_0x23b6[123]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[124]);db[_0x23b6[125]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[126]);db[_0x23b6[127]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[128]);db[_0x23b6[129]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[130]);db[_0x23b6[131]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[132]);db[_0x23b6[133]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[134]);db[_0x23b6[135]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[136]);db[_0x23b6[137]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[138]);db[_0x23b6[139]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[140]);db[_0x23b6[141]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[142]);db[_0x23b6[143]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[144]);db[_0x23b6[145]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[146]);db[_0x23b6[147]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[148]);db[_0x23b6[149]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[150]);db[_0x23b6[151]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[152]);db[_0x23b6[153]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[154]);db[_0x23b6[155]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[156]);db[_0x23b6[157]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[158]);db[_0x23b6[159]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[160]);db[_0x23b6[161]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[162]);db[_0x23b6[163]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[164]);db[_0x23b6[165]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[166]);db[_0x23b6[167]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[168]);db[_0x23b6[169]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[170]);db[_0x23b6[171]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[172]);db[_0x23b6[173]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[174]);db[_0x23b6[175]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[176]);db[_0x23b6[177]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[178]);db[_0x23b6[179]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[180]);db[_0x23b6[181]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[182]);db[_0x23b6[183]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[184]);db[_0x23b6[185]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[186]);db[_0x23b6[187]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[188]);db[_0x23b6[189]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[190]);db[_0x23b6[191]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[192]);db[_0x23b6[193]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[194]);db[_0x23b6[195]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[196]);db[_0x23b6[197]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[198]);db[_0x23b6[199]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[200]);db[_0x23b6[201]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[202]);db[_0x23b6[203]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[204]);db[_0x23b6[205]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[206]);db[_0x23b6[207]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[208]);db[_0x23b6[209]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[210]);db[_0x23b6[211]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[212]);db[_0x23b6[213]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[214]);db[_0x23b6[215]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[216]);db[_0x23b6[217]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[218]);db[_0x23b6[219]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[220]);db[_0x23b6[221]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[222]);db[_0x23b6[223]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[224]);db[_0x23b6[225]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[226]);db[_0x23b6[227]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[228]);db[_0x23b6[229]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[230]);db[_0x23b6[231]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[232]);db[_0x23b6[233]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[234]);db[_0x23b6[235]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[236]);db[_0x23b6[237]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[238]);db[_0x23b6[239]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[240]);db[_0x23b6[241]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[242]);db[_0x23b6[243]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[244]);db[_0x23b6[245]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[246]);db[_0x23b6[247]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[248]);db[_0x23b6[249]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[250]);db[_0x23b6[199]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[200]);db[_0x23b6[251]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[252]);db[_0x23b6[253]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[254]);db[_0x23b6[255]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[256]);db[_0x23b6[257]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[258]);db[_0x23b6[259]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[260]);db[_0x23b6[261]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[262]);db[_0x23b6[263]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[264]);db[_0x23b6[265]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[266]);db[_0x23b6[267]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[268]);db[_0x23b6[269]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[270]);db[_0x23b6[271]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[272]);db[_0x23b6[273]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[274]);db[_0x23b6[275]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[276]);db[_0x23b6[277]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[278]);db[_0x23b6[279]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[280]);db[_0x23b6[281]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[282]);db[_0x23b6[283]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[284]);db[_0x23b6[285]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[286]);db[_0x23b6[287]]= db[_0x23b6[3]][_0x23b6[24]](_0x23b6[288]);db[_0x23b6[22]][_0x23b6[291]](db.VoiceMail,{"\x61\x73":_0x23b6[39],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[290]});db[_0x23b6[22]][_0x23b6[293]](db.VoiceRecording,{"\x61\x73":_0x23b6[292],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[290]});db[_0x23b6[22]][_0x23b6[293]](db.UserVoiceQueueRt,{"\x61\x73":_0x23b6[294],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[290]});db[_0x23b6[22]][_0x23b6[293]](db.VoiceExtension,{"\x61\x73":_0x23b6[295],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x68\x6F\x6F\x6B\x73":true});db[_0x23b6[22]][_0x23b6[293]](db.CmHopperFinal,{"\x61\x73":_0x23b6[296],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[290]});db[_0x23b6[22]][_0x23b6[293]](db.CmHopperHistory,{"\x61\x73":_0x23b6[297],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[290]});db[_0x23b6[22]][_0x23b6[293]](db.ReportAgentPreview,{"\x61\x73":_0x23b6[165],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[290]});db[_0x23b6[22]][_0x23b6[293]](db.OpenchannelInteraction,{"\x61\x73":_0x23b6[298],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[290]});db[_0x23b6[22]][_0x23b6[293]](db.ChatInteraction,{"\x61\x73":_0x23b6[299],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[290]});db[_0x23b6[22]][_0x23b6[293]](db.SmsInteraction,{"\x61\x73":_0x23b6[300],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[290]});db[_0x23b6[22]][_0x23b6[293]](db.FaxInteraction,{"\x61\x73":_0x23b6[301],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[290]});db[_0x23b6[22]][_0x23b6[293]](db.MailInteraction,{"\x61\x73":_0x23b6[302],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[290]});db[_0x23b6[22]][_0x23b6[305]](db.ChatGroup,{"\x61\x73":_0x23b6[303],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[304]});db[_0x23b6[22]][_0x23b6[305]](db.CmContact,{"\x61\x73":_0x23b6[306],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[307]});db[_0x23b6[22]][_0x23b6[305]](db.CmList,{"\x61\x73":_0x23b6[308],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[309]});db[_0x23b6[22]][_0x23b6[305]](db.Team,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[310]});db[_0x23b6[22]][_0x23b6[305]](db.MailInteraction,{"\x61\x73":_0x23b6[302],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[311]});db[_0x23b6[22]][_0x23b6[305]](db.ChatInteraction,{"\x61\x73":_0x23b6[299],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[312]});db[_0x23b6[22]][_0x23b6[305]](db.FaxInteraction,{"\x61\x73":_0x23b6[301],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[313]});db[_0x23b6[22]][_0x23b6[305]](db.SmsInteraction,{"\x61\x73":_0x23b6[300],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[314]});db[_0x23b6[22]][_0x23b6[305]](db.OpenchannelInteraction,{"\x61\x73":_0x23b6[298],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[315]});db[_0x23b6[22]][_0x23b6[305]](db.VoiceQueue,{"\x61\x73":_0x23b6[316],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[59],"\x72\x65\x71\x75\x69\x72\x65\x64":false});db[_0x23b6[22]][_0x23b6[305]](db.MailQueue,{"\x61\x73":_0x23b6[317],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[63],"\x72\x65\x71\x75\x69\x72\x65\x64":false});db[_0x23b6[22]][_0x23b6[305]](db.ChatQueue,{"\x61\x73":_0x23b6[318],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[61],"\x72\x65\x71\x75\x69\x72\x65\x64":false,"\x68\x6F\x6F\x6B\x73":true});db[_0x23b6[22]][_0x23b6[305]](db.FaxQueue,{"\x61\x73":_0x23b6[319],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[65],"\x72\x65\x71\x75\x69\x72\x65\x64":false});db[_0x23b6[22]][_0x23b6[305]](db.SmsQueue,{"\x61\x73":_0x23b6[320],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[67],"\x72\x65\x71\x75\x69\x72\x65\x64":false});db[_0x23b6[22]][_0x23b6[305]](db.OpenchannelQueue,{"\x61\x73":_0x23b6[321],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[69],"\x72\x65\x71\x75\x69\x72\x65\x64":false});db[_0x23b6[22]][_0x23b6[305]](db.CmList,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[309]});db[_0x23b6[25]][_0x23b6[293]](db.VoiceExtension,{"\x61\x73":_0x23b6[322],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[323]});db[_0x23b6[27]][_0x23b6[293]](db.VoiceExtension,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289]});db[_0x23b6[31]][_0x23b6[293]](db.VoiceExtension,{"\x61\x73":_0x23b6[324],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289]});db[_0x23b6[33]][_0x23b6[305]](db.Sound,{"\x61\x73":_0x23b6[325],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[326]});db[_0x23b6[35]][_0x23b6[293]](db.UserVoiceQueueRt,{"\x61\x73":_0x23b6[327],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[328]});db[_0x23b6[35]][_0x23b6[293]](db.CmHopper,{"\x61\x73":_0x23b6[329],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[328]});db[_0x23b6[35]][_0x23b6[293]](db.CmHopperFinal,{"\x61\x73":_0x23b6[296],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[328]});db[_0x23b6[35]][_0x23b6[293]](db.CmHopperHistory,{"\x61\x73":_0x23b6[330],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[328]});db[_0x23b6[35]][_0x23b6[293]](db.ReportAgentPreview,{"\x61\x73":_0x23b6[165],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[328]});db[_0x23b6[35]][_0x23b6[293]](db.CmHopperBlack,{"\x61\x73":_0x23b6[331],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[328]});db[_0x23b6[35]][_0x23b6[293]](db.JscriptySessionReport,{"\x61\x73":_0x23b6[332],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[328]});db[_0x23b6[35]][_0x23b6[334]](db.Trunk,{"\x61\x73":_0x23b6[53],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[333]});db[_0x23b6[35]][_0x23b6[334]](db.Trunk,{"\x61\x73":_0x23b6[335],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[336]});db[_0x23b6[35]][_0x23b6[334]](db.Interval,{"\x61\x73":_0x23b6[179],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[337]});db[_0x23b6[35]][_0x23b6[305]](db.CmList,{"\x61\x73":_0x23b6[308],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[338]});db[_0x23b6[35]][_0x23b6[305]](db.User,{"\x61\x73":_0x23b6[339],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[59]});db[_0x23b6[35]][_0x23b6[305]](db.Team,{"\x61\x73":_0x23b6[340],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[341]});db[_0x23b6[35]][_0x23b6[305]](db.CmList,{"\x61\x73":_0x23b6[342],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[343]});db[_0x23b6[37]][_0x23b6[334]](db.User,{"\x61\x73":_0x23b6[22],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[290]});db[_0x23b6[39]][_0x23b6[293]](db.VoiceMailMessage,{"\x61\x73":_0x23b6[344],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[345],"\x73\x6F\x75\x72\x63\x65\x4B\x65\x79":_0x23b6[346]});db[_0x23b6[41]][_0x23b6[334]](db.VoiceMail,{"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[345],"\x74\x61\x72\x67\x65\x74\x4B\x65\x79":_0x23b6[346]});db[_0x23b6[43]][_0x23b6[293]](db.VoiceQueueReport,{"\x61\x73":_0x23b6[347],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[348],"\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73":false});db[_0x23b6[43]][_0x23b6[293]](db.VoiceAgentReport,{"\x61\x73":_0x23b6[349],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[348],"\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73":false});db[_0x23b6[43]][_0x23b6[334]](db.User,{"\x61\x73":_0x23b6[22],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[290]});db[_0x23b6[43]][_0x23b6[334]](db.CmContact,{"\x61\x73":_0x23b6[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351]});db[_0x23b6[71]][_0x23b6[334]](db.MailAccount,{"\x61\x73":_0x23b6[75],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[352]});db[_0x23b6[73]][_0x23b6[334]](db.MailAccount,{"\x61\x73":_0x23b6[75],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[352]});db[_0x23b6[75]][_0x23b6[291]](db.MailServerIn,{"\x61\x73":_0x23b6[353],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289]});db[_0x23b6[75]][_0x23b6[291]](db.MailServerOut,{"\x61\x73":_0x23b6[354],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289]});db[_0x23b6[75]][_0x23b6[293]](db.CannedAnswer,{"\x61\x73":_0x23b6[355],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[352]});db[_0x23b6[75]][_0x23b6[293]](db.MailMessage,{"\x61\x73":_0x23b6[344],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[352]});db[_0x23b6[75]][_0x23b6[293]](db.MailInteraction,{"\x61\x73":_0x23b6[356]});db[_0x23b6[75]][_0x23b6[293]](db.MailApplication,{"\x61\x73":_0x23b6[324]});db[_0x23b6[75]][_0x23b6[293]](db.MailDisposition,{"\x61\x73":_0x23b6[357]});db[_0x23b6[75]][_0x23b6[334]](db.CmList,{"\x61\x73":_0x23b6[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[359]});db[_0x23b6[75]][_0x23b6[334]](db.Template,{"\x61\x73":_0x23b6[193],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[360]});db[_0x23b6[77]][_0x23b6[305]](db.User,{"\x61\x73":_0x23b6[339],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[63]});db[_0x23b6[77]][_0x23b6[305]](db.Team,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[361],"\x61\x73":_0x23b6[340]});db[_0x23b6[81]][_0x23b6[293]](db.MailMessage,{"\x61\x73":_0x23b6[344],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[362]});db[_0x23b6[81]][_0x23b6[334]](db.MailAccount,{"\x61\x73":_0x23b6[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[352]});db[_0x23b6[81]][_0x23b6[334]](db.CmContact,{"\x61\x73":_0x23b6[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351]});db[_0x23b6[81]][_0x23b6[334]](db.User,{"\x61\x73":_0x23b6[364],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[290]});db[_0x23b6[81]][_0x23b6[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[365],"\x61\x73":_0x23b6[366]});db[_0x23b6[81]][_0x23b6[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[365],"\x61\x73":_0x23b6[367]});db[_0x23b6[81]][_0x23b6[305]](db.User,{"\x61\x73":_0x23b6[368],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[311],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[362]});db[_0x23b6[83]][_0x23b6[293]](db.Attachment,{"\x61\x73":_0x23b6[369],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289]});db[_0x23b6[83]][_0x23b6[334]](db.User,{"\x61\x73":_0x23b6[22]});db[_0x23b6[83]][_0x23b6[334]](db.CmContact,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x61\x73":_0x23b6[350]});db[_0x23b6[83]][_0x23b6[334]](db.MailInteraction,{"\x61\x73":_0x23b6[370],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[362]});db[_0x23b6[85]][_0x23b6[334]](db.User,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371]});db[_0x23b6[85]][_0x23b6[334]](db.MailQueue,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371]});db[_0x23b6[85]][_0x23b6[334]](db.MailAccount,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371]});db[_0x23b6[85]][_0x23b6[334]](db.Interval,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[337]});db[_0x23b6[87]][_0x23b6[334]](db.MailAccount,{"\x61\x73":_0x23b6[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[352]});db[_0x23b6[89]][_0x23b6[334]](db.MailAccount,{});db[_0x23b6[89]][_0x23b6[334]](db.CmList,{"\x61\x73":_0x23b6[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[359]});db[_0x23b6[89]][_0x23b6[334]](db.CmContact,{"\x61\x73":_0x23b6[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351]});db[_0x23b6[89]][_0x23b6[334]](db.MailInteraction,{});db[_0x23b6[89]][_0x23b6[334]](db.MailMessage,{});db[_0x23b6[89]][_0x23b6[334]](db.User,{});db[_0x23b6[89]][_0x23b6[334]](db.MailQueue,{});db[_0x23b6[91]][_0x23b6[293]](db.DashboardItem,{"\x61\x73":_0x23b6[372],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289]});db[_0x23b6[95]][_0x23b6[293]](db.CannedAnswer,{"\x61\x73":_0x23b6[355],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[373]});db[_0x23b6[95]][_0x23b6[293]](db.FaxInteraction,{"\x61\x73":_0x23b6[356]});db[_0x23b6[95]][_0x23b6[293]](db.FaxApplication,{"\x61\x73":_0x23b6[324]});db[_0x23b6[95]][_0x23b6[293]](db.VoiceExtension,{"\x61\x73":_0x23b6[374],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289]});db[_0x23b6[95]][_0x23b6[293]](db.FaxDisposition,{"\x61\x73":_0x23b6[357]});db[_0x23b6[95]][_0x23b6[293]](db.FaxMessage,{"\x61\x73":_0x23b6[344]});db[_0x23b6[95]][_0x23b6[334]](db.Trunk,{"\x61\x73":_0x23b6[53]});db[_0x23b6[95]][_0x23b6[334]](db.CmList,{"\x61\x73":_0x23b6[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[359]});db[_0x23b6[97]][_0x23b6[334]](db.User,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371]});db[_0x23b6[97]][_0x23b6[334]](db.FaxQueue,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371]});db[_0x23b6[97]][_0x23b6[334]](db.FaxAccount,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371]});db[_0x23b6[99]][_0x23b6[334]](db.FaxAccount,{"\x61\x73":_0x23b6[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":{"\x6E\x61\x6D\x65":_0x23b6[373],"\x75\x6E\x69\x71\x75\x65":_0x23b6[375]}});db[_0x23b6[101]][_0x23b6[293]](db.FaxMessage,{"\x61\x73":_0x23b6[344],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[376]});db[_0x23b6[101]][_0x23b6[334]](db.FaxAccount,{"\x61\x73":_0x23b6[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[373]});db[_0x23b6[101]][_0x23b6[334]](db.CmContact,{"\x61\x73":_0x23b6[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351]});db[_0x23b6[101]][_0x23b6[334]](db.User,{"\x61\x73":_0x23b6[364],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[290]});db[_0x23b6[101]][_0x23b6[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[377],"\x61\x73":_0x23b6[366]});db[_0x23b6[101]][_0x23b6[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[377],"\x61\x73":_0x23b6[367]});db[_0x23b6[101]][_0x23b6[305]](db.User,{"\x61\x73":_0x23b6[368],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[313],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[376]});db[_0x23b6[103]][_0x23b6[334]](db.User,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x61\x73":_0x23b6[22]});db[_0x23b6[103]][_0x23b6[334]](db.FaxInteraction,{"\x61\x73":_0x23b6[370],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[376]});db[_0x23b6[103]][_0x23b6[334]](db.CmContact,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x61\x73":_0x23b6[350]});db[_0x23b6[103]][_0x23b6[334]](db.Attachment,{"\x61\x73":_0x23b6[287],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[378]});db[_0x23b6[105]][_0x23b6[305]](db.User,{"\x61\x73":_0x23b6[339],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[65]});db[_0x23b6[105]][_0x23b6[305]](db.Team,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[379],"\x61\x73":_0x23b6[340]});db[_0x23b6[107]][_0x23b6[334]](db.FaxAccount,{});db[_0x23b6[107]][_0x23b6[334]](db.CmList,{"\x61\x73":_0x23b6[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[359]});db[_0x23b6[107]][_0x23b6[334]](db.CmContact,{"\x61\x73":_0x23b6[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351]});db[_0x23b6[107]][_0x23b6[334]](db.FaxInteraction,{});db[_0x23b6[107]][_0x23b6[334]](db.FaxMessage,{});db[_0x23b6[107]][_0x23b6[334]](db.User,{});db[_0x23b6[107]][_0x23b6[334]](db.FaxQueue,{});db[_0x23b6[109]][_0x23b6[293]](db.CannedAnswer,{"\x61\x73":_0x23b6[355],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[380]});db[_0x23b6[109]][_0x23b6[293]](db.SmsMessage,{"\x61\x73":_0x23b6[344],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[380]});db[_0x23b6[109]][_0x23b6[293]](db.SmsInteraction,{"\x61\x73":_0x23b6[356]});db[_0x23b6[109]][_0x23b6[293]](db.SmsApplication,{"\x61\x73":_0x23b6[324]});db[_0x23b6[109]][_0x23b6[293]](db.SmsDisposition,{"\x61\x73":_0x23b6[357]});db[_0x23b6[109]][_0x23b6[334]](db.CmList,{"\x61\x73":_0x23b6[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[359]});db[_0x23b6[111]][_0x23b6[334]](db.User,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371]});db[_0x23b6[111]][_0x23b6[334]](db.SmsQueue,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371]});db[_0x23b6[111]][_0x23b6[334]](db.SmsAccount,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371]});db[_0x23b6[111]][_0x23b6[334]](db.Interval,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[337]});db[_0x23b6[113]][_0x23b6[334]](db.SmsAccount,{"\x61\x73":_0x23b6[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":{"\x6E\x61\x6D\x65":_0x23b6[380],"\x75\x6E\x69\x71\x75\x65":_0x23b6[375]}});db[_0x23b6[115]][_0x23b6[293]](db.SmsMessage,{"\x61\x73":_0x23b6[344],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[381]});db[_0x23b6[115]][_0x23b6[334]](db.SmsAccount,{"\x61\x73":_0x23b6[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[380]});db[_0x23b6[115]][_0x23b6[334]](db.CmContact,{"\x61\x73":_0x23b6[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351]});db[_0x23b6[115]][_0x23b6[334]](db.User,{"\x61\x73":_0x23b6[364],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[290]});db[_0x23b6[115]][_0x23b6[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[382],"\x61\x73":_0x23b6[366]});db[_0x23b6[115]][_0x23b6[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[382],"\x61\x73":_0x23b6[367]});db[_0x23b6[115]][_0x23b6[305]](db.User,{"\x61\x73":_0x23b6[368],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[314],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[381]});db[_0x23b6[117]][_0x23b6[334]](db.User,{"\x61\x73":_0x23b6[22]});db[_0x23b6[117]][_0x23b6[334]](db.CmContact,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x61\x73":_0x23b6[350]});db[_0x23b6[117]][_0x23b6[334]](db.SmsInteraction,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x61\x73":_0x23b6[370],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[381]});db[_0x23b6[119]][_0x23b6[305]](db.User,{"\x61\x73":_0x23b6[339],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[67],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[383]});db[_0x23b6[119]][_0x23b6[305]](db.Team,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[384],"\x61\x73":_0x23b6[340]});db[_0x23b6[121]][_0x23b6[293]](db.CannedAnswer,{"\x61\x73":_0x23b6[355],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[385]});db[_0x23b6[121]][_0x23b6[293]](db.OpenchannelInteraction,{"\x61\x73":_0x23b6[356],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[385]});db[_0x23b6[121]][_0x23b6[293]](db.OpenchannelMessage,{"\x61\x73":_0x23b6[344],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[385]});db[_0x23b6[121]][_0x23b6[293]](db.OpenchannelApplication,{"\x61\x73":_0x23b6[324],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[385]});db[_0x23b6[121]][_0x23b6[293]](db.OpenchannelDisposition,{"\x61\x73":_0x23b6[357],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[385]});db[_0x23b6[121]][_0x23b6[334]](db.CmList,{"\x61\x73":_0x23b6[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[359]});db[_0x23b6[123]][_0x23b6[334]](db.User,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371]});db[_0x23b6[123]][_0x23b6[334]](db.OpenchannelQueue,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[386]});db[_0x23b6[123]][_0x23b6[334]](db.OpenchannelAccount,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[385]});db[_0x23b6[123]][_0x23b6[334]](db.Interval,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[337]});db[_0x23b6[125]][_0x23b6[334]](db.OpenchannelAccount,{"\x61\x73":_0x23b6[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":{"\x6E\x61\x6D\x65":_0x23b6[385],"\x75\x6E\x69\x71\x75\x65":_0x23b6[375]}});db[_0x23b6[127]][_0x23b6[293]](db.OpenchannelMessage,{"\x61\x73":_0x23b6[344],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[387]});db[_0x23b6[127]][_0x23b6[334]](db.OpenchannelAccount,{"\x61\x73":_0x23b6[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[385]});db[_0x23b6[127]][_0x23b6[334]](db.CmContact,{"\x61\x73":_0x23b6[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351]});db[_0x23b6[127]][_0x23b6[334]](db.User,{"\x61\x73":_0x23b6[364],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[290]});db[_0x23b6[127]][_0x23b6[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[388],"\x61\x73":_0x23b6[366]});db[_0x23b6[127]][_0x23b6[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[388],"\x61\x73":_0x23b6[367]});db[_0x23b6[127]][_0x23b6[305]](db.User,{"\x61\x73":_0x23b6[368],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[315],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[387]});db[_0x23b6[129]][_0x23b6[334]](db.User,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x61\x73":_0x23b6[22]});db[_0x23b6[129]][_0x23b6[334]](db.CmContact,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x61\x73":_0x23b6[350]});db[_0x23b6[129]][_0x23b6[334]](db.OpenchannelInteraction,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x61\x73":_0x23b6[370],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[387]});db[_0x23b6[129]][_0x23b6[334]](db.Attachment,{"\x61\x73":_0x23b6[287],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[378]});db[_0x23b6[131]][_0x23b6[305]](db.User,{"\x61\x73":_0x23b6[339],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[69],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[386]});db[_0x23b6[131]][_0x23b6[305]](db.Team,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[389],"\x61\x73":_0x23b6[340]});db[_0x23b6[133]][_0x23b6[293]](db.CannedAnswer,{"\x61\x73":_0x23b6[355],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[390]});db[_0x23b6[133]][_0x23b6[293]](db.ChatProactiveAction,{"\x61\x73":_0x23b6[391]});db[_0x23b6[133]][_0x23b6[293]](db.ChatInteraction,{"\x61\x73":_0x23b6[356]});db[_0x23b6[133]][_0x23b6[293]](db.ChatApplication,{"\x61\x73":_0x23b6[324]});db[_0x23b6[133]][_0x23b6[293]](db.ChatDisposition,{"\x61\x73":_0x23b6[357]});db[_0x23b6[133]][_0x23b6[293]](db.ChatMessage,{"\x61\x73":_0x23b6[344]});db[_0x23b6[133]][_0x23b6[334]](db.CmList,{"\x61\x73":_0x23b6[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[359]});db[_0x23b6[133]][_0x23b6[334]](db.Interval,{"\x61\x73":_0x23b6[179],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[337]});db[_0x23b6[135]][_0x23b6[334]](db.OpenchannelAccount,{});db[_0x23b6[135]][_0x23b6[334]](db.CmList,{"\x61\x73":_0x23b6[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[359]});db[_0x23b6[135]][_0x23b6[334]](db.CmContact,{"\x61\x73":_0x23b6[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351]});db[_0x23b6[135]][_0x23b6[334]](db.OpenchannelInteraction,{});db[_0x23b6[135]][_0x23b6[334]](db.OpenchannelMessage,{});db[_0x23b6[135]][_0x23b6[334]](db.User,{});db[_0x23b6[135]][_0x23b6[334]](db.OpenchannelQueue,{});db[_0x23b6[137]][_0x23b6[334]](db.User,{"\x61\x73":_0x23b6[392],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[290],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371]});db[_0x23b6[137]][_0x23b6[334]](db.ChatQueue,{"\x61\x73":_0x23b6[393],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[394],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371]});db[_0x23b6[137]][_0x23b6[334]](db.ChatWebsite,{"\x61\x73":_0x23b6[395],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[390],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371]});db[_0x23b6[139]][_0x23b6[334]](db.ChatWebsite,{"\x61\x73":_0x23b6[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":{"\x6E\x61\x6D\x65":_0x23b6[390],"\x75\x6E\x69\x71\x75\x65":_0x23b6[375]}});db[_0x23b6[141]][_0x23b6[293]](db.ChatMessage,{"\x61\x73":_0x23b6[344],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[396]});db[_0x23b6[141]][_0x23b6[334]](db.ChatWebsite,{"\x61\x73":_0x23b6[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[390]});db[_0x23b6[141]][_0x23b6[334]](db.CmContact,{"\x61\x73":_0x23b6[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351]});db[_0x23b6[141]][_0x23b6[334]](db.User,{"\x61\x73":_0x23b6[364],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[290]});db[_0x23b6[141]][_0x23b6[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[397],"\x61\x73":_0x23b6[366]});db[_0x23b6[141]][_0x23b6[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[397],"\x61\x73":_0x23b6[367]});db[_0x23b6[141]][_0x23b6[305]](db.User,{"\x61\x73":_0x23b6[368],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[312],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[396]});db[_0x23b6[143]][_0x23b6[334]](db.User,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x61\x73":_0x23b6[22]});db[_0x23b6[143]][_0x23b6[334]](db.CmContact,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x61\x73":_0x23b6[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351]});db[_0x23b6[143]][_0x23b6[334]](db.ChatInteraction,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x61\x73":_0x23b6[370],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[396]});db[_0x23b6[143]][_0x23b6[334]](db.Attachment,{"\x61\x73":_0x23b6[287],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[378]});db[_0x23b6[145]][_0x23b6[334]](db.CmContact,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x61\x73":_0x23b6[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351]});db[_0x23b6[145]][_0x23b6[334]](db.ChatWebsite,{"\x61\x73":_0x23b6[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[390]});db[_0x23b6[147]][_0x23b6[305]](db.User,{"\x61\x73":_0x23b6[339],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[61],"\x68\x6F\x6F\x6B\x73":true});db[_0x23b6[147]][_0x23b6[305]](db.Team,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[398],"\x61\x73":_0x23b6[340]});db[_0x23b6[149]][_0x23b6[293]](db.ChatInternalMessage,{"\x61\x73":_0x23b6[344],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[399],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289]});db[_0x23b6[149]][_0x23b6[305]](db.User,{"\x61\x73":_0x23b6[327],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[304]});db[_0x23b6[151]][_0x23b6[334]](db.ChatWebsite,{"\x61\x73":_0x23b6[395],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[390]});db[_0x23b6[153]][_0x23b6[293]](db.CmContact,{"\x61\x73":_0x23b6[306],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[400]});db[_0x23b6[155]][_0x23b6[293]](db.CmHopper,{"\x61\x73":_0x23b6[329],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351]});db[_0x23b6[155]][_0x23b6[293]](db.CmHopperFinal,{"\x61\x73":_0x23b6[296],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351]});db[_0x23b6[155]][_0x23b6[293]](db.CmHopperHistory,{"\x61\x73":_0x23b6[330],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351]});db[_0x23b6[155]][_0x23b6[293]](db.ReportAgentPreview,{"\x61\x73":_0x23b6[165],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351]});db[_0x23b6[155]][_0x23b6[293]](db.JscriptySessionReport,{"\x61\x73":_0x23b6[332],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351]});db[_0x23b6[155]][_0x23b6[293]](db.OpenchannelInteraction,{"\x61\x73":_0x23b6[298],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371]});db[_0x23b6[155]][_0x23b6[293]](db.ChatInteraction,{"\x61\x73":_0x23b6[299],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371]});db[_0x23b6[155]][_0x23b6[293]](db.SmsInteraction,{"\x61\x73":_0x23b6[300],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371]});db[_0x23b6[155]][_0x23b6[293]](db.FaxInteraction,{"\x61\x73":_0x23b6[301],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371]});db[_0x23b6[155]][_0x23b6[293]](db.MailInteraction,{"\x61\x73":_0x23b6[302],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371]});db[_0x23b6[155]][_0x23b6[334]](db.CmCompany,{"\x61\x73":_0x23b6[401],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[400]});db[_0x23b6[155]][_0x23b6[334]](db.CmList,{"\x61\x73":_0x23b6[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[359],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289]});db[_0x23b6[155]][_0x23b6[305]](db.User,{"\x61\x73":_0x23b6[368],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[307]});db[_0x23b6[157]][_0x23b6[334]](db.CmContact,{"\x61\x73":_0x23b6[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289]});db[_0x23b6[157]][_0x23b6[334]](db.CmList,{"\x61\x73":_0x23b6[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[359],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289]});db[_0x23b6[157]][_0x23b6[334]](db.User,{"\x61\x73":_0x23b6[392],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[290]});db[_0x23b6[157]][_0x23b6[334]](db.VoiceQueue,{"\x61\x73":_0x23b6[393],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[328],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289]});db[_0x23b6[157]][_0x23b6[334]](db.Campaign,{"\x61\x73":_0x23b6[283],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[402],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289]});db[_0x23b6[159]][_0x23b6[334]](db.CmContact,{"\x61\x73":_0x23b6[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289]});db[_0x23b6[159]][_0x23b6[334]](db.CmList,{"\x61\x73":_0x23b6[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[359],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289]});db[_0x23b6[159]][_0x23b6[334]](db.VoiceQueue,{"\x61\x73":_0x23b6[393],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[328],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289]});db[_0x23b6[159]][_0x23b6[334]](db.Campaign,{"\x61\x73":_0x23b6[283],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[402],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289]});db[_0x23b6[169]][_0x23b6[293]](db.VoiceDisposition,{"\x61\x73":_0x23b6[357],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":{"\x6E\x61\x6D\x65":_0x23b6[359],"\x75\x6E\x69\x71\x75\x65":_0x23b6[375]}});db[_0x23b6[169]][_0x23b6[293]](db.CmCustomField,{"\x61\x73":_0x23b6[403],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[359]});db[_0x23b6[169]][_0x23b6[293]](db.CmContact,{"\x61\x73":_0x23b6[306],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[359]});db[_0x23b6[169]][_0x23b6[293]](db.CmHopperFinal,{"\x61\x73":_0x23b6[296],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[359]});db[_0x23b6[169]][_0x23b6[293]](db.CmHopperHistory,{"\x61\x73":_0x23b6[297],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[359]});db[_0x23b6[169]][_0x23b6[293]](db.ReportAgentPreview,{"\x61\x73":_0x23b6[165],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[359]});db[_0x23b6[169]][_0x23b6[305]](db.VoiceQueue,{"\x61\x73":_0x23b6[404],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[338]});db[_0x23b6[169]][_0x23b6[305]](db.User,{"\x61\x73":_0x23b6[339],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[309]});db[_0x23b6[173]][_0x23b6[293]](db.Condition,{"\x61\x73":{"\x70\x6C\x75\x72\x61\x6C":_0x23b6[405],"\x73\x69\x6E\x67\x75\x6C\x61\x72":_0x23b6[406]},"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[407],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x68\x6F\x6F\x6B\x73":true});db[_0x23b6[173]][_0x23b6[293]](db.Condition,{"\x61\x73":{"\x70\x6C\x75\x72\x61\x6C":_0x23b6[408],"\x73\x69\x6E\x67\x75\x6C\x61\x72":_0x23b6[409]},"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[410],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x68\x6F\x6F\x6B\x73":true});db[_0x23b6[173]][_0x23b6[293]](db.Action,{"\x61\x73":_0x23b6[411],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[412],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x68\x6F\x6F\x6B\x73":true});db[_0x23b6[179]][_0x23b6[293]](db.Interval,{"\x61\x73":_0x23b6[413],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[337],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x68\x6F\x6F\x6B\x73":true,"\x72\x65\x71\x75\x69\x72\x65\x64":false});db[_0x23b6[179]][_0x23b6[293]](db.VoiceExtension,{"\x61\x73":_0x23b6[295],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[337],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371]});db[_0x23b6[179]][_0x23b6[293]](db.MailApplication,{"\x61\x73":_0x23b6[414],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[337]});db[_0x23b6[179]][_0x23b6[293]](db.ChatApplication,{"\x61\x73":_0x23b6[415],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[337]});db[_0x23b6[179]][_0x23b6[293]](db.FaxApplication,{"\x61\x73":_0x23b6[416],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[337]});db[_0x23b6[179]][_0x23b6[293]](db.SmsApplication,{"\x61\x73":_0x23b6[417],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[337]});db[_0x23b6[187]][_0x23b6[334]](db.MailAccount,{});db[_0x23b6[187]][_0x23b6[334]](db.AnalyticDefaultReport,{"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[418]});db[_0x23b6[187]][_0x23b6[334]](db.AnalyticCustomReport,{"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[419]});db[_0x23b6[189]][_0x23b6[305]](db.VoiceMusicOnHold,{"\x61\x73":_0x23b6[420],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[326],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[371]});db[_0x23b6[191]][_0x23b6[305]](db.ChatInteraction,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[397]});db[_0x23b6[191]][_0x23b6[305]](db.MailInteraction,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[365]});db[_0x23b6[191]][_0x23b6[305]](db.SmsInteraction,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[382]});db[_0x23b6[191]][_0x23b6[305]](db.FaxInteraction,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[377]});db[_0x23b6[191]][_0x23b6[305]](db.OpenchannelInteraction,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[388]});db[_0x23b6[195]][_0x23b6[293]](db.Condition,{"\x61\x73":{"\x70\x6C\x75\x72\x61\x6C":_0x23b6[421],"\x73\x69\x6E\x67\x75\x6C\x61\x72":_0x23b6[422]},"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[423],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x68\x6F\x6F\x6B\x73":true});db[_0x23b6[195]][_0x23b6[293]](db.Condition,{"\x61\x73":{"\x70\x6C\x75\x72\x61\x6C":_0x23b6[424],"\x73\x69\x6E\x67\x75\x6C\x61\x72":_0x23b6[425]},"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[426],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x68\x6F\x6F\x6B\x73":true});db[_0x23b6[195]][_0x23b6[293]](db.Action,{"\x61\x73":_0x23b6[411],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[427],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x68\x6F\x6F\x6B\x73":true});db[_0x23b6[203]][_0x23b6[293]](db.AnalyticFieldReport,{"\x61\x73":_0x23b6[428],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[419],"\x68\x6F\x6F\x6B\x73":true});db[_0x23b6[205]][_0x23b6[293]](db.AnalyticFieldReport,{"\x61\x73":_0x23b6[428],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[418]});db[_0x23b6[209]][_0x23b6[293]](db.AnalyticFieldReport,{"\x61\x73":_0x23b6[428],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[429]});db[_0x23b6[211]][_0x23b6[334]](db.AnalyticMetric,{"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[429]});db[_0x23b6[215]][_0x23b6[293]](db.SalesforceConfiguration,{"\x61\x73":_0x23b6[430],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[431]});db[_0x23b6[217]][_0x23b6[293]](db.SalesforceField,{"\x61\x73":_0x23b6[432],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[433]});db[_0x23b6[217]][_0x23b6[293]](db.SalesforceField,{"\x61\x73":_0x23b6[434],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[435]});db[_0x23b6[217]][_0x23b6[293]](db.SalesforceField,{"\x61\x73":_0x23b6[428],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[436]});db[_0x23b6[217]][_0x23b6[334]](db.SalesforceAccount,{"\x61\x73":_0x23b6[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[431]});db[_0x23b6[219]][_0x23b6[293]](db.SalesforceField,{"\x61\x73":_0x23b6[437],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[433]});db[_0x23b6[219]][_0x23b6[293]](db.SalesforceField,{"\x61\x73":_0x23b6[438],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[435]});db[_0x23b6[219]][_0x23b6[293]](db.SalesforceField,{"\x61\x73":_0x23b6[439],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[436]});db[_0x23b6[219]][_0x23b6[334]](db.Variable,{"\x61\x73":_0x23b6[197],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[440]});db[_0x23b6[221]][_0x23b6[293]](db.SugarcrmConfiguration,{"\x61\x73":_0x23b6[430],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[431]});db[_0x23b6[223]][_0x23b6[293]](db.SugarcrmField,{"\x61\x73":_0x23b6[432],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[433]});db[_0x23b6[223]][_0x23b6[293]](db.SugarcrmField,{"\x61\x73":_0x23b6[434],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[435]});db[_0x23b6[223]][_0x23b6[293]](db.SugarcrmField,{"\x61\x73":_0x23b6[428],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[436]});db[_0x23b6[223]][_0x23b6[334]](db.SugarcrmAccount,{"\x61\x73":_0x23b6[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[431]});db[_0x23b6[225]][_0x23b6[293]](db.SugarcrmField,{"\x61\x73":_0x23b6[437],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[433]});db[_0x23b6[225]][_0x23b6[293]](db.SugarcrmField,{"\x61\x73":_0x23b6[438],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[435]});db[_0x23b6[225]][_0x23b6[293]](db.SugarcrmField,{"\x61\x73":_0x23b6[439],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[436]});db[_0x23b6[225]][_0x23b6[334]](db.Variable,{"\x61\x73":_0x23b6[197],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[440]});db[_0x23b6[227]][_0x23b6[293]](db.DeskConfiguration,{"\x61\x73":_0x23b6[430],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[431]});db[_0x23b6[229]][_0x23b6[293]](db.DeskField,{"\x61\x73":_0x23b6[432],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[433]});db[_0x23b6[229]][_0x23b6[293]](db.DeskField,{"\x61\x73":_0x23b6[434],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[435]});db[_0x23b6[229]][_0x23b6[293]](db.DeskField,{"\x61\x73":_0x23b6[428],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[436]});db[_0x23b6[229]][_0x23b6[334]](db.DeskAccount,{"\x61\x73":_0x23b6[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[431]});db[_0x23b6[229]][_0x23b6[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[441]});db[_0x23b6[231]][_0x23b6[293]](db.DeskField,{"\x61\x73":_0x23b6[437],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[433]});db[_0x23b6[231]][_0x23b6[293]](db.DeskField,{"\x61\x73":_0x23b6[438],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[435]});db[_0x23b6[231]][_0x23b6[293]](db.DeskField,{"\x61\x73":_0x23b6[439],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[436]});db[_0x23b6[231]][_0x23b6[334]](db.Variable,{"\x61\x73":_0x23b6[197],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[440]});db[_0x23b6[233]][_0x23b6[293]](db.ZohoConfiguration,{"\x61\x73":_0x23b6[430],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[431]});db[_0x23b6[235]][_0x23b6[293]](db.ZohoField,{"\x61\x73":_0x23b6[432],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[433]});db[_0x23b6[235]][_0x23b6[293]](db.ZohoField,{"\x61\x73":_0x23b6[434],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[435]});db[_0x23b6[235]][_0x23b6[293]](db.ZohoField,{"\x61\x73":_0x23b6[428],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[436]});db[_0x23b6[235]][_0x23b6[334]](db.ZohoAccount,{"\x61\x73":_0x23b6[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[431]});db[_0x23b6[237]][_0x23b6[293]](db.ZohoField,{"\x61\x73":_0x23b6[437],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[433]});db[_0x23b6[237]][_0x23b6[293]](db.ZohoField,{"\x61\x73":_0x23b6[438],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[435]});db[_0x23b6[237]][_0x23b6[293]](db.ZohoField,{"\x61\x73":_0x23b6[439],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[436]});db[_0x23b6[237]][_0x23b6[334]](db.Variable,{"\x61\x73":_0x23b6[197],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[440]});db[_0x23b6[239]][_0x23b6[293]](db.ZendeskConfiguration,{"\x61\x73":_0x23b6[430],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[431]});db[_0x23b6[241]][_0x23b6[293]](db.ZendeskField,{"\x61\x73":_0x23b6[432],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[433]});db[_0x23b6[241]][_0x23b6[293]](db.ZendeskField,{"\x61\x73":_0x23b6[434],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[435]});db[_0x23b6[241]][_0x23b6[293]](db.ZendeskField,{"\x61\x73":_0x23b6[428],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[436]});db[_0x23b6[241]][_0x23b6[334]](db.ZendeskAccount,{"\x61\x73":_0x23b6[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[431]});db[_0x23b6[241]][_0x23b6[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[442]});db[_0x23b6[243]][_0x23b6[293]](db.ZendeskField,{"\x61\x73":_0x23b6[437],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[433]});db[_0x23b6[243]][_0x23b6[293]](db.ZendeskField,{"\x61\x73":_0x23b6[438],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[435]});db[_0x23b6[243]][_0x23b6[293]](db.ZendeskField,{"\x61\x73":_0x23b6[439],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[436]});db[_0x23b6[243]][_0x23b6[334]](db.Variable,{"\x61\x73":_0x23b6[197],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[440]});db[_0x23b6[245]][_0x23b6[293]](db.FreshdeskConfiguration,{"\x61\x73":_0x23b6[430],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[431]});db[_0x23b6[247]][_0x23b6[293]](db.FreshdeskField,{"\x61\x73":_0x23b6[432],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[433]});db[_0x23b6[247]][_0x23b6[293]](db.FreshdeskField,{"\x61\x73":_0x23b6[434],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[435]});db[_0x23b6[247]][_0x23b6[293]](db.FreshdeskField,{"\x61\x73":_0x23b6[428],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[436]});db[_0x23b6[247]][_0x23b6[334]](db.FreshdeskAccount,{"\x61\x73":_0x23b6[363],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[431]});db[_0x23b6[247]][_0x23b6[305]](db.Tag,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[443]});db[_0x23b6[249]][_0x23b6[293]](db.FreshdeskField,{"\x61\x73":_0x23b6[437],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[433]});db[_0x23b6[249]][_0x23b6[293]](db.FreshdeskField,{"\x61\x73":_0x23b6[438],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[435]});db[_0x23b6[249]][_0x23b6[293]](db.FreshdeskField,{"\x61\x73":_0x23b6[439],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[436]});db[_0x23b6[249]][_0x23b6[334]](db.Variable,{"\x61\x73":_0x23b6[197],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[440]});db[_0x23b6[253]][_0x23b6[334]](db.ChatWebsite,{});db[_0x23b6[253]][_0x23b6[334]](db.CmList,{"\x61\x73":_0x23b6[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[359]});db[_0x23b6[253]][_0x23b6[334]](db.CmContact,{"\x61\x73":_0x23b6[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351]});db[_0x23b6[253]][_0x23b6[334]](db.ChatInteraction,{});db[_0x23b6[253]][_0x23b6[334]](db.ChatMessage,{});db[_0x23b6[253]][_0x23b6[334]](db.User,{});db[_0x23b6[253]][_0x23b6[334]](db.ChatQueue,{});db[_0x23b6[255]][_0x23b6[334]](db.User,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[444]});db[_0x23b6[255]][_0x23b6[334]](db.User,{"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[445]});db[_0x23b6[261]][_0x23b6[293]](db.JscriptyQuestionReport,{"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[446],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289]});db[_0x23b6[261]][_0x23b6[293]](db.JscriptyAnswerReport,{"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[446],"\x6F\x6E\x44\x65\x6C\x65\x74\x65":_0x23b6[289]});db[_0x23b6[263]][_0x23b6[334]](db.SmsAccount,{});db[_0x23b6[263]][_0x23b6[334]](db.CmList,{"\x61\x73":_0x23b6[358],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[359]});db[_0x23b6[263]][_0x23b6[334]](db.CmContact,{"\x61\x73":_0x23b6[350],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[351]});db[_0x23b6[263]][_0x23b6[334]](db.SmsInteraction,{});db[_0x23b6[263]][_0x23b6[334]](db.SmsMessage,{});db[_0x23b6[263]][_0x23b6[334]](db.User,{});db[_0x23b6[263]][_0x23b6[334]](db.SmsQueue,{});db[_0x23b6[269]][_0x23b6[293]](db.JscriptySessionReport,{"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[447]});db[_0x23b6[269]][_0x23b6[293]](db.JscriptyQuestionReport,{"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[447]});db[_0x23b6[269]][_0x23b6[293]](db.JscriptyAnswerReport,{"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[447]});db[_0x23b6[279]][_0x23b6[305]](db.User,{"\x61\x73":_0x23b6[339],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[310]});db[_0x23b6[279]][_0x23b6[305]](db.VoiceQueue,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[341],"\x61\x73":_0x23b6[316]});db[_0x23b6[279]][_0x23b6[305]](db.MailQueue,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[361],"\x61\x73":_0x23b6[317]});db[_0x23b6[279]][_0x23b6[305]](db.ChatQueue,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[398],"\x61\x73":_0x23b6[318]});db[_0x23b6[279]][_0x23b6[305]](db.FaxQueue,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[379],"\x61\x73":_0x23b6[319]});db[_0x23b6[279]][_0x23b6[305]](db.SmsQueue,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[384],"\x61\x73":_0x23b6[320]});db[_0x23b6[279]][_0x23b6[305]](db.OpenchannelQueue,{"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[389],"\x61\x73":_0x23b6[321]});db[_0x23b6[283]][_0x23b6[293]](db.CmHopper,{"\x61\x73":_0x23b6[329],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[402]});db[_0x23b6[283]][_0x23b6[293]](db.CmHopperFinal,{"\x61\x73":_0x23b6[296],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[402]});db[_0x23b6[283]][_0x23b6[293]](db.CmHopperHistory,{"\x61\x73":_0x23b6[330],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[402]});db[_0x23b6[283]][_0x23b6[293]](db.CmHopperBlack,{"\x61\x73":_0x23b6[331],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[402]});db[_0x23b6[283]][_0x23b6[334]](db.Trunk,{"\x61\x73":_0x23b6[53],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[333]});db[_0x23b6[283]][_0x23b6[334]](db.Trunk,{"\x61\x73":_0x23b6[335],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[336]});db[_0x23b6[283]][_0x23b6[334]](db.Interval,{"\x61\x73":_0x23b6[179],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[337]});db[_0x23b6[283]][_0x23b6[334]](db.SquareProject,{"\x61\x73":_0x23b6[275],"\x66\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79":_0x23b6[448]});db[_0x23b6[283]][_0x23b6[305]](db.CmList,{"\x61\x73":_0x23b6[308],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[449]});db[_0x23b6[283]][_0x23b6[305]](db.CmList,{"\x61\x73":_0x23b6[342],"\x74\x68\x72\x6F\x75\x67\x68":_0x23b6[450]});module[_0x23b6[451]]= {db:db,dbH:dbH}
\ No newline at end of file
index 530e7e7..b8c6e4e 100644 (file)
@@ -1 +1 @@
-var _0x2984=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x65\x78\x70\x72\x65\x73\x73\x2D\x77\x69\x6E\x73\x74\x6F\x6E","\x75\x74\x69\x6C","\x2E\x2F\x65\x72\x72\x6F\x72\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x61\x70\x69","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x64\x65\x66\x61\x75\x6C\x74","\x25\x73\x20\x25\x73\x20\x25\x73\x20\x25\x73\x20\x25\x73\x6D\x73\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73","\x6D\x65\x74\x68\x6F\x64","\x78\x2D\x66\x6F\x72\x77\x61\x72\x64\x65\x64\x2D\x66\x6F\x72","\x68\x65\x61\x64\x65\x72\x73","\x72\x65\x6D\x6F\x74\x65\x41\x64\x64\x72\x65\x73\x73","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x69\x70","\x75\x72\x6C","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65\x54\x69\x6D\x65","\x75\x73\x65\x72","\x69\x64","\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67\x67\x65\x72","\x75\x73\x65","\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x63\x68\x61\x6E\x73\x70\x79","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x63\x6F\x6E\x74\x65\x78\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x6D\x6F\x68\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x6D\x61\x69\x6C\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x4D\x61\x69\x6C","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x6D\x61\x69\x6C\x73\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x63\x61\x6C\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x64\x69\x61\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x61\x67\x65\x6E\x74\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x6D\x65\x6D\x62\x65\x72\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x74\x72\x75\x6E\x6B\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x72\x75\x6E\x6B","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x74\x72\x61\x6E\x73\x66\x65\x72\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x6F\x75\x74\x5F\x73\x65\x72\x76\x65\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x73\x75\x62\x73\x74\x61\x74\x75\x73\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x53\x75\x62\x73\x74\x61\x74\x75\x73","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x71\x75\x65\x75\x65","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64","\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73\x2F\x69\x74\x65\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x51\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x71\x75\x65\x75\x65","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x51\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x77\x65\x62\x73\x69\x74\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x71\x75\x65\x75\x65","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x6F\x66\x66\x6C\x69\x6E\x65\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x67\x72\x6F\x75\x70\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x47\x72\x6F\x75\x70","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x63\x6D\x2F\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x43\x6F\x6D\x70\x61\x6E\x79","\x2F\x61\x70\x69\x2F\x63\x6D\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x2F\x61\x70\x69\x2F\x63\x6D\x2F\x68\x6F\x70\x70\x65\x72","\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72","\x2F\x61\x70\x69\x2F\x63\x6D\x2F\x68\x6F\x70\x70\x65\x72\x5F\x62\x6C\x61\x63\x6B","\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x2F\x61\x70\x69\x2F\x63\x6D\x2F\x68\x6F\x70\x70\x65\x72\x5F\x66\x69\x6E\x61\x6C","\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x2F\x61\x70\x69\x2F\x63\x6D\x2F\x68\x6F\x70\x70\x65\x72\x5F\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x2F\x61\x70\x69\x2F\x63\x6D\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x63\x6D\x2F\x6C\x69\x73\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x4C\x69\x73\x74","\x2F\x61\x70\x69\x2F\x61\x63\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x63\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x2F\x61\x70\x69\x2F\x70\x61\x75\x73\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x70\x61\x75\x73\x65","\x2F\x61\x70\x69\x2F\x63\x64\x72","\x2E\x2F\x61\x70\x69\x2F\x63\x64\x72","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67","\x2F\x61\x70\x69\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x63\x68\x65\x64\x75\x6C\x65","\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64","\x2F\x61\x70\x69\x2F\x74\x61\x67\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x61\x67","\x2F\x61\x70\x69\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65","\x2F\x61\x70\x69\x2F\x74\x72\x69\x67\x67\x65\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x72\x69\x67\x67\x65\x72","\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x6D\x65\x74\x72\x69\x63\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x66\x69\x65\x6C\x64\x5F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x46\x69\x65\x6C\x64\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x74\x72\x65\x65\x5F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x54\x72\x65\x65\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x7A\x6F\x68\x6F\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x7A\x6F\x68\x6F\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x7A\x6F\x68\x6F\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x73","\x2E\x2F\x61\x70\x69\x2F\x6E\x65\x74\x77\x6F\x72\x6B","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x71\x75\x65\x75\x65","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x69\x6E\x74\x65\x72\x6E\x61\x6C\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x61\x6E\x73\x77\x65\x72\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x71\x75\x65\x75\x65","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x64\x65\x74\x61\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x44\x65\x74\x61\x69\x6C","\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74","\x2F\x61\x70\x69\x2F\x73\x65\x74\x74\x69\x6E\x67\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x65\x74\x74\x69\x6E\x67","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x6F\x64\x62\x63","\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2F\x61\x70\x69\x2F\x74\x65\x61\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x65\x61\x6D","\x2F\x61\x70\x69\x2F\x6C\x69\x63\x65\x6E\x73\x65","\x2E\x2F\x61\x70\x69\x2F\x6C\x69\x63\x65\x6E\x73\x65","\x2F\x61\x70\x69\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E","\x2F\x61\x70\x69\x2F\x6D\x69\x67\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x69\x67\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2F\x61\x70\x69\x2F\x61\x75\x74\x68\x2F\x6C\x6F\x63\x61\x6C","\x2E\x2F\x61\x70\x69\x2F\x61\x75\x74\x68\x4C\x6F\x63\x61\x6C","\x2F\x61\x70\x69\x2F\x61\x75\x74\x68\x2F\x67\x6F\x6F\x67\x6C\x65","\x2E\x2F\x61\x70\x69\x2F\x61\x75\x74\x68\x47\x6F\x6F\x67\x6C\x65","\x2F\x61\x70\x69\x2F\x6A\x69\x72\x61","\x2E\x2F\x61\x70\x69\x2F\x6A\x69\x72\x61","\x2F\x61\x70\x69\x2F\x72\x70\x63","\x2E\x2F\x61\x70\x69\x2F\x72\x70\x63","\x2F\x61\x70\x69\x2F\x76\x65\x72\x73\x69\x6F\x6E","\x2E\x2F\x61\x70\x69\x2F\x76\x65\x72\x73\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x79\x73\x74\x65\x6D","\x2E\x2F\x61\x70\x69\x2F\x73\x79\x73\x74\x65\x6D","\x2F\x61\x70\x69\x2F\x70\x6D\x32","\x2E\x2F\x61\x70\x69\x2F\x70\x6D\x32","\x2F\x61\x70\x69\x64\x6F\x63","\x72\x6F\x6F\x74","\x6A\x6F\x69\x6E","\x73\x74\x61\x74\x69\x63","\x2F\x77\x77\x77","\x2F\x64\x65\x6D\x6F","\x2F\x73\x6E\x69\x70\x70\x65\x74","\x73\x6E\x69\x70\x70\x65\x74","\x31\x2E\x30\x2E\x38","\x67\x65\x74","\x2F\x3A\x75\x72\x6C\x28\x61\x70\x69\x7C\x61\x75\x74\x68\x7C\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x7C\x61\x70\x70\x7C\x62\x6F\x77\x65\x72\x5F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x7C\x61\x73\x73\x65\x74\x73\x29\x2F\x2A","\x72\x6F\x75\x74\x65","\x61\x70\x70\x50\x61\x74\x68","\x2F\x69\x6E\x64\x65\x78\x2E\x68\x74\x6D\x6C","\x72\x65\x73\x6F\x6C\x76\x65","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x2F\x2A"];_0x2984[0];var path=require(_0x2984[1]);var express=require(_0x2984[2]);var ewinston=require(_0x2984[3]);var util=require(_0x2984[4]);var errors=require(_0x2984[5]);var config=require(_0x2984[6]);var logger=require(_0x2984[8])(_0x2984[7]);exports[_0x2984[9]]= function(_0xd128x8){_0xd128x8[_0x2984[26]](ewinston[_0x2984[25]]({winstonInstance:logger,meta:false,statusLevels:true,msg:function(_0xd128x9,_0xd128xa){return util[_0x2984[24]](_0x2984[10],_0xd128x9[_0x2984[11]],_0xd128x9[_0x2984[13]][_0x2984[12]]?_0xd128x9[_0x2984[13]][_0x2984[12]]:_0xd128x9[_0x2984[15]][_0x2984[14]]|| _0xd128x9[_0x2984[16]],_0xd128x9[_0x2984[17]],_0xd128xa[_0x2984[18]],_0xd128xa[_0x2984[19]],_0xd128x9[_0x2984[20]]?_0xd128x9[_0x2984[20]][_0x2984[21]]:null,_0xd128x9[_0x2984[20]]?_0xd128x9[_0x2984[20]][_0x2984[22]]:null,_0xd128x9[_0x2984[20]]?_0xd128x9[_0x2984[20]][_0x2984[23]]:null)}}));_0xd128x8[_0x2984[26]](_0x2984[27],require(_0x2984[28]));_0xd128x8[_0x2984[26]](_0x2984[29],require(_0x2984[30]));_0xd128x8[_0x2984[26]](_0x2984[31],require(_0x2984[32]));_0xd128x8[_0x2984[26]](_0x2984[33],require(_0x2984[34]));_0xd128x8[_0x2984[26]](_0x2984[35],require(_0x2984[36]));_0xd128x8[_0x2984[26]](_0x2984[37],require(_0x2984[38]));_0xd128x8[_0x2984[26]](_0x2984[39],require(_0x2984[40]));_0xd128x8[_0x2984[26]](_0x2984[41],require(_0x2984[42]));_0xd128x8[_0x2984[26]](_0x2984[43],require(_0x2984[44]));_0xd128x8[_0x2984[26]](_0x2984[45],require(_0x2984[46]));_0xd128x8[_0x2984[26]](_0x2984[47],require(_0x2984[48]));_0xd128x8[_0x2984[26]](_0x2984[49],require(_0x2984[50]));_0xd128x8[_0x2984[26]](_0x2984[51],require(_0x2984[52]));_0xd128x8[_0x2984[26]](_0x2984[53],require(_0x2984[54]));_0xd128x8[_0x2984[26]](_0x2984[55],require(_0x2984[56]));_0xd128x8[_0x2984[26]](_0x2984[57],require(_0x2984[58]));_0xd128x8[_0x2984[26]](_0x2984[59],require(_0x2984[60]));_0xd128x8[_0x2984[26]](_0x2984[61],require(_0x2984[62]));_0xd128x8[_0x2984[26]](_0x2984[63],require(_0x2984[64]));_0xd128x8[_0x2984[26]](_0x2984[65],require(_0x2984[66]));_0xd128x8[_0x2984[26]](_0x2984[67],require(_0x2984[68]));_0xd128x8[_0x2984[26]](_0x2984[69],require(_0x2984[70]));_0xd128x8[_0x2984[26]](_0x2984[71],require(_0x2984[72]));_0xd128x8[_0x2984[26]](_0x2984[73],require(_0x2984[74]));_0xd128x8[_0x2984[26]](_0x2984[75],require(_0x2984[76]));_0xd128x8[_0x2984[26]](_0x2984[77],require(_0x2984[78]));_0xd128x8[_0x2984[26]](_0x2984[79],require(_0x2984[80]));_0xd128x8[_0x2984[26]](_0x2984[81],require(_0x2984[82]));_0xd128x8[_0x2984[26]](_0x2984[83],require(_0x2984[84]));_0xd128x8[_0x2984[26]](_0x2984[85],require(_0x2984[86]));_0xd128x8[_0x2984[26]](_0x2984[87],require(_0x2984[88]));_0xd128x8[_0x2984[26]](_0x2984[89],require(_0x2984[90]));_0xd128x8[_0x2984[26]](_0x2984[91],require(_0x2984[92]));_0xd128x8[_0x2984[26]](_0x2984[93],require(_0x2984[94]));_0xd128x8[_0x2984[26]](_0x2984[95],require(_0x2984[96]));_0xd128x8[_0x2984[26]](_0x2984[97],require(_0x2984[98]));_0xd128x8[_0x2984[26]](_0x2984[99],require(_0x2984[100]));_0xd128x8[_0x2984[26]](_0x2984[101],require(_0x2984[102]));_0xd128x8[_0x2984[26]](_0x2984[103],require(_0x2984[104]));_0xd128x8[_0x2984[26]](_0x2984[105],require(_0x2984[106]));_0xd128x8[_0x2984[26]](_0x2984[107],require(_0x2984[108]));_0xd128x8[_0x2984[26]](_0x2984[109],require(_0x2984[110]));_0xd128x8[_0x2984[26]](_0x2984[111],require(_0x2984[112]));_0xd128x8[_0x2984[26]](_0x2984[113],require(_0x2984[114]));_0xd128x8[_0x2984[26]](_0x2984[115],require(_0x2984[116]));_0xd128x8[_0x2984[26]](_0x2984[117],require(_0x2984[118]));_0xd128x8[_0x2984[26]](_0x2984[119],require(_0x2984[120]));_0xd128x8[_0x2984[26]](_0x2984[121],require(_0x2984[122]));_0xd128x8[_0x2984[26]](_0x2984[123],require(_0x2984[124]));_0xd128x8[_0x2984[26]](_0x2984[125],require(_0x2984[126]));_0xd128x8[_0x2984[26]](_0x2984[127],require(_0x2984[128]));_0xd128x8[_0x2984[26]](_0x2984[129],require(_0x2984[130]));_0xd128x8[_0x2984[26]](_0x2984[131],require(_0x2984[132]));_0xd128x8[_0x2984[26]](_0x2984[133],require(_0x2984[134]));_0xd128x8[_0x2984[26]](_0x2984[135],require(_0x2984[136]));_0xd128x8[_0x2984[26]](_0x2984[137],require(_0x2984[138]));_0xd128x8[_0x2984[26]](_0x2984[139],require(_0x2984[140]));_0xd128x8[_0x2984[26]](_0x2984[141],require(_0x2984[142]));_0xd128x8[_0x2984[26]](_0x2984[143],require(_0x2984[144]));_0xd128x8[_0x2984[26]](_0x2984[145],require(_0x2984[146]));_0xd128x8[_0x2984[26]](_0x2984[147],require(_0x2984[148]));_0xd128x8[_0x2984[26]](_0x2984[149],require(_0x2984[150]));_0xd128x8[_0x2984[26]](_0x2984[151],require(_0x2984[152]));_0xd128x8[_0x2984[26]](_0x2984[153],require(_0x2984[154]));_0xd128x8[_0x2984[26]](_0x2984[155],require(_0x2984[156]));_0xd128x8[_0x2984[26]](_0x2984[157],require(_0x2984[158]));_0xd128x8[_0x2984[26]](_0x2984[159],require(_0x2984[160]));_0xd128x8[_0x2984[26]](_0x2984[161],require(_0x2984[162]));_0xd128x8[_0x2984[26]](_0x2984[163],require(_0x2984[164]));_0xd128x8[_0x2984[26]](_0x2984[165],require(_0x2984[166]));_0xd128x8[_0x2984[26]](_0x2984[167],require(_0x2984[168]));_0xd128x8[_0x2984[26]](_0x2984[169],require(_0x2984[170]));_0xd128x8[_0x2984[26]](_0x2984[171],require(_0x2984[172]));_0xd128x8[_0x2984[26]](_0x2984[173],require(_0x2984[174]));_0xd128x8[_0x2984[26]](_0x2984[175],require(_0x2984[176]));_0xd128x8[_0x2984[26]](_0x2984[177],require(_0x2984[178]));_0xd128x8[_0x2984[26]](_0x2984[179],require(_0x2984[180]));_0xd128x8[_0x2984[26]](_0x2984[181],require(_0x2984[182]));_0xd128x8[_0x2984[26]](_0x2984[183],require(_0x2984[184]));_0xd128x8[_0x2984[26]](_0x2984[185],require(_0x2984[186]));_0xd128x8[_0x2984[26]](_0x2984[187],require(_0x2984[188]));_0xd128x8[_0x2984[26]](_0x2984[189],require(_0x2984[190]));_0xd128x8[_0x2984[26]](_0x2984[191],require(_0x2984[192]));_0xd128x8[_0x2984[26]](_0x2984[193],require(_0x2984[194]));_0xd128x8[_0x2984[26]](_0x2984[195],require(_0x2984[196]));_0xd128x8[_0x2984[26]](_0x2984[197],require(_0x2984[198]));_0xd128x8[_0x2984[26]](_0x2984[199],require(_0x2984[200]));_0xd128x8[_0x2984[26]](_0x2984[201],require(_0x2984[202]));_0xd128x8[_0x2984[26]](_0x2984[203],require(_0x2984[204]));_0xd128x8[_0x2984[26]](_0x2984[205],require(_0x2984[206]));_0xd128x8[_0x2984[26]](_0x2984[207],require(_0x2984[208]));_0xd128x8[_0x2984[26]](_0x2984[209],require(_0x2984[210]));_0xd128x8[_0x2984[26]](_0x2984[211],require(_0x2984[212]));_0xd128x8[_0x2984[26]](_0x2984[213],require(_0x2984[214]));_0xd128x8[_0x2984[26]](_0x2984[215],require(_0x2984[216]));_0xd128x8[_0x2984[26]](_0x2984[217],require(_0x2984[218]));_0xd128x8[_0x2984[26]](_0x2984[219],require(_0x2984[220]));_0xd128x8[_0x2984[26]](_0x2984[221],require(_0x2984[222]));_0xd128x8[_0x2984[26]](_0x2984[223],require(_0x2984[224]));_0xd128x8[_0x2984[26]](_0x2984[225],require(_0x2984[226]));_0xd128x8[_0x2984[26]](_0x2984[227],require(_0x2984[228]));_0xd128x8[_0x2984[26]](_0x2984[229],require(_0x2984[230]));_0xd128x8[_0x2984[26]](_0x2984[231],require(_0x2984[232]));_0xd128x8[_0x2984[26]](_0x2984[233],require(_0x2984[234]));_0xd128x8[_0x2984[26]](_0x2984[235],require(_0x2984[236]));_0xd128x8[_0x2984[26]](_0x2984[237],require(_0x2984[238]));_0xd128x8[_0x2984[26]](_0x2984[239],require(_0x2984[240]));_0xd128x8[_0x2984[26]](_0x2984[241],require(_0x2984[242]));_0xd128x8[_0x2984[26]](_0x2984[243],require(_0x2984[244]));_0xd128x8[_0x2984[26]](_0x2984[245],require(_0x2984[246]));_0xd128x8[_0x2984[26]](_0x2984[247],require(_0x2984[248]));_0xd128x8[_0x2984[26]](_0x2984[249],require(_0x2984[250]));_0xd128x8[_0x2984[26]](_0x2984[251],require(_0x2984[252]));_0xd128x8[_0x2984[26]](_0x2984[253],require(_0x2984[254]));_0xd128x8[_0x2984[26]](_0x2984[255],require(_0x2984[256]));_0xd128x8[_0x2984[26]](_0x2984[257],require(_0x2984[258]));_0xd128x8[_0x2984[26]](_0x2984[259],require(_0x2984[260]));_0xd128x8[_0x2984[26]](_0x2984[261],require(_0x2984[262]));_0xd128x8[_0x2984[26]](_0x2984[263],require(_0x2984[264]));_0xd128x8[_0x2984[26]](_0x2984[265],require(_0x2984[266]));_0xd128x8[_0x2984[26]](_0x2984[267],require(_0x2984[268]));_0xd128x8[_0x2984[26]](_0x2984[269],require(_0x2984[270]));_0xd128x8[_0x2984[26]](_0x2984[271],require(_0x2984[272]));_0xd128x8[_0x2984[26]](_0x2984[273],require(_0x2984[274]));_0xd128x8[_0x2984[26]](_0x2984[275],require(_0x2984[276]));_0xd128x8[_0x2984[26]](_0x2984[277],require(_0x2984[278]));_0xd128x8[_0x2984[26]](_0x2984[279],require(_0x2984[280]));_0xd128x8[_0x2984[26]](_0x2984[281],require(_0x2984[282]));_0xd128x8[_0x2984[26]](_0x2984[283],require(_0x2984[284]));_0xd128x8[_0x2984[26]](_0x2984[285],require(_0x2984[286]));_0xd128x8[_0x2984[26]](_0x2984[287],require(_0x2984[288]));_0xd128x8[_0x2984[26]](_0x2984[289],express[_0x2984[292]](path[_0x2984[291]](config[_0x2984[290]],_0x2984[289])));_0xd128x8[_0x2984[26]](_0x2984[293],express[_0x2984[292]](path[_0x2984[291]](config[_0x2984[290]],_0x2984[293])));_0xd128x8[_0x2984[26]](_0x2984[294],express[_0x2984[292]](path[_0x2984[291]](config[_0x2984[290]],_0x2984[294])));_0xd128x8[_0x2984[26]](_0x2984[295],express[_0x2984[292]](path[_0x2984[291]](config[_0x2984[290]],_0x2984[296],_0x2984[297])));_0xd128x8[_0x2984[300]](_0x2984[299])[_0x2984[298]](errors[404]);_0xd128x8[_0x2984[300]](_0x2984[305])[_0x2984[298]](function(_0xd128x9,_0xd128xa){_0xd128xa[_0x2984[304]](path[_0x2984[303]](_0xd128x8[_0x2984[298]](_0x2984[301])+ _0x2984[302]))})}
\ No newline at end of file
+var _0x5871=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x70\x61\x74\x68","\x65\x78\x70\x72\x65\x73\x73","\x65\x78\x70\x72\x65\x73\x73\x2D\x77\x69\x6E\x73\x74\x6F\x6E","\x75\x74\x69\x6C","\x2E\x2F\x65\x72\x72\x6F\x72\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x61\x70\x69","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x64\x65\x66\x61\x75\x6C\x74","\x25\x73\x20\x25\x73\x20\x25\x73\x20\x25\x73\x20\x25\x73\x6D\x73\x20\x69\x64\x3D\x25\x73\x20\x6E\x61\x6D\x65\x3D\x25\x73\x20\x72\x6F\x6C\x65\x3D\x25\x73","\x6D\x65\x74\x68\x6F\x64","\x78\x2D\x66\x6F\x72\x77\x61\x72\x64\x65\x64\x2D\x66\x6F\x72","\x68\x65\x61\x64\x65\x72\x73","\x72\x65\x6D\x6F\x74\x65\x41\x64\x64\x72\x65\x73\x73","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x69\x70","\x75\x72\x6C","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65\x54\x69\x6D\x65","\x75\x73\x65\x72","\x69\x64","\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67\x67\x65\x72","\x75\x73\x65","\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x63\x68\x61\x6E\x73\x70\x79","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x43\x68\x61\x6E\x53\x70\x79","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x63\x6F\x6E\x74\x65\x78\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x6D\x6F\x68\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x6D\x61\x69\x6C\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x4D\x61\x69\x6C","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x6D\x61\x69\x6C\x73\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x63\x61\x6C\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x64\x69\x61\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x61\x67\x65\x6E\x74\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x6D\x65\x6D\x62\x65\x72\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x74\x72\x75\x6E\x6B\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x72\x75\x6E\x6B","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x74\x72\x61\x6E\x73\x66\x65\x72\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x6F\x75\x74\x5F\x73\x65\x72\x76\x65\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x73\x75\x62\x73\x74\x61\x74\x75\x73\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x53\x75\x62\x73\x74\x61\x74\x75\x73","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x71\x75\x65\x75\x65","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64","\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73\x2F\x69\x74\x65\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x49\x74\x65\x6D","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x51\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x71\x75\x65\x75\x65","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x51\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x77\x65\x62\x73\x69\x74\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x71\x75\x65\x75\x65","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x6F\x66\x66\x6C\x69\x6E\x65\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x4F\x66\x66\x6C\x69\x6E\x65\x4D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x67\x72\x6F\x75\x70\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x47\x72\x6F\x75\x70","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x63\x6D\x2F\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x43\x6F\x6D\x70\x61\x6E\x79","\x2F\x61\x70\x69\x2F\x63\x6D\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x2F\x61\x70\x69\x2F\x63\x6D\x2F\x68\x6F\x70\x70\x65\x72","\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72","\x2F\x61\x70\x69\x2F\x63\x6D\x2F\x68\x6F\x70\x70\x65\x72\x5F\x62\x6C\x61\x63\x6B","\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x2F\x61\x70\x69\x2F\x63\x6D\x2F\x68\x6F\x70\x70\x65\x72\x5F\x66\x69\x6E\x61\x6C","\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x2F\x61\x70\x69\x2F\x63\x6D\x2F\x68\x6F\x70\x70\x65\x72\x5F\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x2F\x61\x70\x69\x2F\x63\x6D\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x63\x6D\x2F\x6C\x69\x73\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x4C\x69\x73\x74","\x2F\x61\x70\x69\x2F\x61\x63\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x63\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x2F\x61\x70\x69\x2F\x70\x61\x75\x73\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x70\x61\x75\x73\x65","\x2F\x61\x70\x69\x2F\x63\x64\x72","\x2E\x2F\x61\x70\x69\x2F\x63\x64\x72","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x4C\x6F\x67","\x2F\x61\x70\x69\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x63\x68\x65\x64\x75\x6C\x65","\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64","\x2F\x61\x70\x69\x2F\x74\x61\x67\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x61\x67","\x2F\x61\x70\x69\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65","\x2F\x61\x70\x69\x2F\x74\x72\x69\x67\x67\x65\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x72\x69\x67\x67\x65\x72","\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x6D\x65\x74\x72\x69\x63\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x4D\x65\x74\x72\x69\x63","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x66\x69\x65\x6C\x64\x5F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x46\x69\x65\x6C\x64\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x74\x72\x65\x65\x5F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x54\x72\x65\x65\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x7A\x6F\x68\x6F\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x7A\x6F\x68\x6F\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x7A\x6F\x68\x6F\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x73","\x2E\x2F\x61\x70\x69\x2F\x6E\x65\x74\x77\x6F\x72\x6B","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x71\x75\x65\x75\x65","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x69\x6E\x74\x65\x72\x6E\x61\x6C\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x61\x6E\x73\x77\x65\x72\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x41\x6E\x73\x77\x65\x72\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x71\x75\x65\x75\x65","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x64\x65\x74\x61\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x44\x65\x74\x61\x69\x6C","\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74","\x2F\x61\x70\x69\x2F\x73\x65\x74\x74\x69\x6E\x67\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x65\x74\x74\x69\x6E\x67","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x6F\x64\x62\x63","\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2F\x61\x70\x69\x2F\x74\x65\x61\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x65\x61\x6D","\x2F\x61\x70\x69\x2F\x6C\x69\x63\x65\x6E\x73\x65","\x2E\x2F\x61\x70\x69\x2F\x6C\x69\x63\x65\x6E\x73\x65","\x2F\x61\x70\x69\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E","\x2F\x61\x70\x69\x2F\x6D\x69\x67\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x69\x67\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2F\x61\x70\x69\x2F\x61\x75\x74\x68\x2F\x6C\x6F\x63\x61\x6C","\x2E\x2F\x61\x70\x69\x2F\x61\x75\x74\x68\x4C\x6F\x63\x61\x6C","\x2F\x61\x70\x69\x2F\x61\x75\x74\x68\x2F\x67\x6F\x6F\x67\x6C\x65","\x2E\x2F\x61\x70\x69\x2F\x61\x75\x74\x68\x47\x6F\x6F\x67\x6C\x65","\x2F\x61\x70\x69\x2F\x6A\x69\x72\x61","\x2E\x2F\x61\x70\x69\x2F\x6A\x69\x72\x61","\x2F\x61\x70\x69\x2F\x72\x70\x63","\x2E\x2F\x61\x70\x69\x2F\x72\x70\x63","\x2F\x61\x70\x69\x2F\x76\x65\x72\x73\x69\x6F\x6E","\x2E\x2F\x61\x70\x69\x2F\x76\x65\x72\x73\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x79\x73\x74\x65\x6D","\x2E\x2F\x61\x70\x69\x2F\x73\x79\x73\x74\x65\x6D","\x2F\x61\x70\x69\x2F\x70\x6D\x32","\x2E\x2F\x61\x70\x69\x2F\x70\x6D\x32","\x2F\x61\x70\x69\x64\x6F\x63","\x72\x6F\x6F\x74","\x6A\x6F\x69\x6E","\x73\x74\x61\x74\x69\x63","\x2F\x77\x77\x77","\x2F\x64\x65\x6D\x6F","\x2F\x73\x6E\x69\x70\x70\x65\x74","\x73\x6E\x69\x70\x70\x65\x74","\x31\x2E\x30\x2E\x38","\x67\x65\x74","\x2F\x3A\x75\x72\x6C\x28\x61\x70\x69\x7C\x61\x75\x74\x68\x7C\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x7C\x61\x70\x70\x7C\x62\x6F\x77\x65\x72\x5F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x7C\x61\x73\x73\x65\x74\x73\x29\x2F\x2A","\x72\x6F\x75\x74\x65","\x61\x70\x70\x50\x61\x74\x68","\x2F\x69\x6E\x64\x65\x78\x2E\x68\x74\x6D\x6C","\x72\x65\x73\x6F\x6C\x76\x65","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x2F\x2A"];_0x5871[0];var path=require(_0x5871[1]);var express=require(_0x5871[2]);var ewinston=require(_0x5871[3]);var util=require(_0x5871[4]);var errors=require(_0x5871[5]);var config=require(_0x5871[6]);var logger=require(_0x5871[8])(_0x5871[7]);exports[_0x5871[9]]= function(_0xfa3dx8){_0xfa3dx8[_0x5871[26]](ewinston[_0x5871[25]]({winstonInstance:logger,meta:false,statusLevels:true,msg:function(_0xfa3dx9,_0xfa3dxa){return util[_0x5871[24]](_0x5871[10],_0xfa3dx9[_0x5871[11]],_0xfa3dx9[_0x5871[13]][_0x5871[12]]?_0xfa3dx9[_0x5871[13]][_0x5871[12]]:_0xfa3dx9[_0x5871[15]][_0x5871[14]]|| _0xfa3dx9[_0x5871[16]],_0xfa3dx9[_0x5871[17]],_0xfa3dxa[_0x5871[18]],_0xfa3dxa[_0x5871[19]],_0xfa3dx9[_0x5871[20]]?_0xfa3dx9[_0x5871[20]][_0x5871[21]]:null,_0xfa3dx9[_0x5871[20]]?_0xfa3dx9[_0x5871[20]][_0x5871[22]]:null,_0xfa3dx9[_0x5871[20]]?_0xfa3dx9[_0x5871[20]][_0x5871[23]]:null)}}));_0xfa3dx8[_0x5871[26]](_0x5871[27],require(_0x5871[28]));_0xfa3dx8[_0x5871[26]](_0x5871[29],require(_0x5871[30]));_0xfa3dx8[_0x5871[26]](_0x5871[31],require(_0x5871[32]));_0xfa3dx8[_0x5871[26]](_0x5871[33],require(_0x5871[34]));_0xfa3dx8[_0x5871[26]](_0x5871[35],require(_0x5871[36]));_0xfa3dx8[_0x5871[26]](_0x5871[37],require(_0x5871[38]));_0xfa3dx8[_0x5871[26]](_0x5871[39],require(_0x5871[40]));_0xfa3dx8[_0x5871[26]](_0x5871[41],require(_0x5871[42]));_0xfa3dx8[_0x5871[26]](_0x5871[43],require(_0x5871[44]));_0xfa3dx8[_0x5871[26]](_0x5871[45],require(_0x5871[46]));_0xfa3dx8[_0x5871[26]](_0x5871[47],require(_0x5871[48]));_0xfa3dx8[_0x5871[26]](_0x5871[49],require(_0x5871[50]));_0xfa3dx8[_0x5871[26]](_0x5871[51],require(_0x5871[52]));_0xfa3dx8[_0x5871[26]](_0x5871[53],require(_0x5871[54]));_0xfa3dx8[_0x5871[26]](_0x5871[55],require(_0x5871[56]));_0xfa3dx8[_0x5871[26]](_0x5871[57],require(_0x5871[58]));_0xfa3dx8[_0x5871[26]](_0x5871[59],require(_0x5871[60]));_0xfa3dx8[_0x5871[26]](_0x5871[61],require(_0x5871[62]));_0xfa3dx8[_0x5871[26]](_0x5871[63],require(_0x5871[64]));_0xfa3dx8[_0x5871[26]](_0x5871[65],require(_0x5871[66]));_0xfa3dx8[_0x5871[26]](_0x5871[67],require(_0x5871[68]));_0xfa3dx8[_0x5871[26]](_0x5871[69],require(_0x5871[70]));_0xfa3dx8[_0x5871[26]](_0x5871[71],require(_0x5871[72]));_0xfa3dx8[_0x5871[26]](_0x5871[73],require(_0x5871[74]));_0xfa3dx8[_0x5871[26]](_0x5871[75],require(_0x5871[76]));_0xfa3dx8[_0x5871[26]](_0x5871[77],require(_0x5871[78]));_0xfa3dx8[_0x5871[26]](_0x5871[79],require(_0x5871[80]));_0xfa3dx8[_0x5871[26]](_0x5871[81],require(_0x5871[82]));_0xfa3dx8[_0x5871[26]](_0x5871[83],require(_0x5871[84]));_0xfa3dx8[_0x5871[26]](_0x5871[85],require(_0x5871[86]));_0xfa3dx8[_0x5871[26]](_0x5871[87],require(_0x5871[88]));_0xfa3dx8[_0x5871[26]](_0x5871[89],require(_0x5871[90]));_0xfa3dx8[_0x5871[26]](_0x5871[91],require(_0x5871[92]));_0xfa3dx8[_0x5871[26]](_0x5871[93],require(_0x5871[94]));_0xfa3dx8[_0x5871[26]](_0x5871[95],require(_0x5871[96]));_0xfa3dx8[_0x5871[26]](_0x5871[97],require(_0x5871[98]));_0xfa3dx8[_0x5871[26]](_0x5871[99],require(_0x5871[100]));_0xfa3dx8[_0x5871[26]](_0x5871[101],require(_0x5871[102]));_0xfa3dx8[_0x5871[26]](_0x5871[103],require(_0x5871[104]));_0xfa3dx8[_0x5871[26]](_0x5871[105],require(_0x5871[106]));_0xfa3dx8[_0x5871[26]](_0x5871[107],require(_0x5871[108]));_0xfa3dx8[_0x5871[26]](_0x5871[109],require(_0x5871[110]));_0xfa3dx8[_0x5871[26]](_0x5871[111],require(_0x5871[112]));_0xfa3dx8[_0x5871[26]](_0x5871[113],require(_0x5871[114]));_0xfa3dx8[_0x5871[26]](_0x5871[115],require(_0x5871[116]));_0xfa3dx8[_0x5871[26]](_0x5871[117],require(_0x5871[118]));_0xfa3dx8[_0x5871[26]](_0x5871[119],require(_0x5871[120]));_0xfa3dx8[_0x5871[26]](_0x5871[121],require(_0x5871[122]));_0xfa3dx8[_0x5871[26]](_0x5871[123],require(_0x5871[124]));_0xfa3dx8[_0x5871[26]](_0x5871[125],require(_0x5871[126]));_0xfa3dx8[_0x5871[26]](_0x5871[127],require(_0x5871[128]));_0xfa3dx8[_0x5871[26]](_0x5871[129],require(_0x5871[130]));_0xfa3dx8[_0x5871[26]](_0x5871[131],require(_0x5871[132]));_0xfa3dx8[_0x5871[26]](_0x5871[133],require(_0x5871[134]));_0xfa3dx8[_0x5871[26]](_0x5871[135],require(_0x5871[136]));_0xfa3dx8[_0x5871[26]](_0x5871[137],require(_0x5871[138]));_0xfa3dx8[_0x5871[26]](_0x5871[139],require(_0x5871[140]));_0xfa3dx8[_0x5871[26]](_0x5871[141],require(_0x5871[142]));_0xfa3dx8[_0x5871[26]](_0x5871[143],require(_0x5871[144]));_0xfa3dx8[_0x5871[26]](_0x5871[145],require(_0x5871[146]));_0xfa3dx8[_0x5871[26]](_0x5871[147],require(_0x5871[148]));_0xfa3dx8[_0x5871[26]](_0x5871[149],require(_0x5871[150]));_0xfa3dx8[_0x5871[26]](_0x5871[151],require(_0x5871[152]));_0xfa3dx8[_0x5871[26]](_0x5871[153],require(_0x5871[154]));_0xfa3dx8[_0x5871[26]](_0x5871[155],require(_0x5871[156]));_0xfa3dx8[_0x5871[26]](_0x5871[157],require(_0x5871[158]));_0xfa3dx8[_0x5871[26]](_0x5871[159],require(_0x5871[160]));_0xfa3dx8[_0x5871[26]](_0x5871[161],require(_0x5871[162]));_0xfa3dx8[_0x5871[26]](_0x5871[163],require(_0x5871[164]));_0xfa3dx8[_0x5871[26]](_0x5871[165],require(_0x5871[166]));_0xfa3dx8[_0x5871[26]](_0x5871[167],require(_0x5871[168]));_0xfa3dx8[_0x5871[26]](_0x5871[169],require(_0x5871[170]));_0xfa3dx8[_0x5871[26]](_0x5871[171],require(_0x5871[172]));_0xfa3dx8[_0x5871[26]](_0x5871[173],require(_0x5871[174]));_0xfa3dx8[_0x5871[26]](_0x5871[175],require(_0x5871[176]));_0xfa3dx8[_0x5871[26]](_0x5871[177],require(_0x5871[178]));_0xfa3dx8[_0x5871[26]](_0x5871[179],require(_0x5871[180]));_0xfa3dx8[_0x5871[26]](_0x5871[181],require(_0x5871[182]));_0xfa3dx8[_0x5871[26]](_0x5871[183],require(_0x5871[184]));_0xfa3dx8[_0x5871[26]](_0x5871[185],require(_0x5871[186]));_0xfa3dx8[_0x5871[26]](_0x5871[187],require(_0x5871[188]));_0xfa3dx8[_0x5871[26]](_0x5871[189],require(_0x5871[190]));_0xfa3dx8[_0x5871[26]](_0x5871[191],require(_0x5871[192]));_0xfa3dx8[_0x5871[26]](_0x5871[193],require(_0x5871[194]));_0xfa3dx8[_0x5871[26]](_0x5871[195],require(_0x5871[196]));_0xfa3dx8[_0x5871[26]](_0x5871[197],require(_0x5871[198]));_0xfa3dx8[_0x5871[26]](_0x5871[199],require(_0x5871[200]));_0xfa3dx8[_0x5871[26]](_0x5871[201],require(_0x5871[202]));_0xfa3dx8[_0x5871[26]](_0x5871[203],require(_0x5871[204]));_0xfa3dx8[_0x5871[26]](_0x5871[205],require(_0x5871[206]));_0xfa3dx8[_0x5871[26]](_0x5871[207],require(_0x5871[208]));_0xfa3dx8[_0x5871[26]](_0x5871[209],require(_0x5871[210]));_0xfa3dx8[_0x5871[26]](_0x5871[211],require(_0x5871[212]));_0xfa3dx8[_0x5871[26]](_0x5871[213],require(_0x5871[214]));_0xfa3dx8[_0x5871[26]](_0x5871[215],require(_0x5871[216]));_0xfa3dx8[_0x5871[26]](_0x5871[217],require(_0x5871[218]));_0xfa3dx8[_0x5871[26]](_0x5871[219],require(_0x5871[220]));_0xfa3dx8[_0x5871[26]](_0x5871[221],require(_0x5871[222]));_0xfa3dx8[_0x5871[26]](_0x5871[223],require(_0x5871[224]));_0xfa3dx8[_0x5871[26]](_0x5871[225],require(_0x5871[226]));_0xfa3dx8[_0x5871[26]](_0x5871[227],require(_0x5871[228]));_0xfa3dx8[_0x5871[26]](_0x5871[229],require(_0x5871[230]));_0xfa3dx8[_0x5871[26]](_0x5871[231],require(_0x5871[232]));_0xfa3dx8[_0x5871[26]](_0x5871[233],require(_0x5871[234]));_0xfa3dx8[_0x5871[26]](_0x5871[235],require(_0x5871[236]));_0xfa3dx8[_0x5871[26]](_0x5871[237],require(_0x5871[238]));_0xfa3dx8[_0x5871[26]](_0x5871[239],require(_0x5871[240]));_0xfa3dx8[_0x5871[26]](_0x5871[241],require(_0x5871[242]));_0xfa3dx8[_0x5871[26]](_0x5871[243],require(_0x5871[244]));_0xfa3dx8[_0x5871[26]](_0x5871[245],require(_0x5871[246]));_0xfa3dx8[_0x5871[26]](_0x5871[247],require(_0x5871[248]));_0xfa3dx8[_0x5871[26]](_0x5871[249],require(_0x5871[250]));_0xfa3dx8[_0x5871[26]](_0x5871[251],require(_0x5871[252]));_0xfa3dx8[_0x5871[26]](_0x5871[253],require(_0x5871[254]));_0xfa3dx8[_0x5871[26]](_0x5871[255],require(_0x5871[256]));_0xfa3dx8[_0x5871[26]](_0x5871[257],require(_0x5871[258]));_0xfa3dx8[_0x5871[26]](_0x5871[259],require(_0x5871[260]));_0xfa3dx8[_0x5871[26]](_0x5871[261],require(_0x5871[262]));_0xfa3dx8[_0x5871[26]](_0x5871[263],require(_0x5871[264]));_0xfa3dx8[_0x5871[26]](_0x5871[265],require(_0x5871[266]));_0xfa3dx8[_0x5871[26]](_0x5871[267],require(_0x5871[268]));_0xfa3dx8[_0x5871[26]](_0x5871[269],require(_0x5871[270]));_0xfa3dx8[_0x5871[26]](_0x5871[271],require(_0x5871[272]));_0xfa3dx8[_0x5871[26]](_0x5871[273],require(_0x5871[274]));_0xfa3dx8[_0x5871[26]](_0x5871[275],require(_0x5871[276]));_0xfa3dx8[_0x5871[26]](_0x5871[277],require(_0x5871[278]));_0xfa3dx8[_0x5871[26]](_0x5871[279],require(_0x5871[280]));_0xfa3dx8[_0x5871[26]](_0x5871[281],require(_0x5871[282]));_0xfa3dx8[_0x5871[26]](_0x5871[283],require(_0x5871[284]));_0xfa3dx8[_0x5871[26]](_0x5871[285],require(_0x5871[286]));_0xfa3dx8[_0x5871[26]](_0x5871[287],require(_0x5871[288]));_0xfa3dx8[_0x5871[26]](_0x5871[289],express[_0x5871[292]](path[_0x5871[291]](config[_0x5871[290]],_0x5871[289])));_0xfa3dx8[_0x5871[26]](_0x5871[293],express[_0x5871[292]](path[_0x5871[291]](config[_0x5871[290]],_0x5871[293])));_0xfa3dx8[_0x5871[26]](_0x5871[294],express[_0x5871[292]](path[_0x5871[291]](config[_0x5871[290]],_0x5871[294])));_0xfa3dx8[_0x5871[26]](_0x5871[295],express[_0x5871[292]](path[_0x5871[291]](config[_0x5871[290]],_0x5871[296],_0x5871[297])));_0xfa3dx8[_0x5871[300]](_0x5871[299])[_0x5871[298]](errors[404]);_0xfa3dx8[_0x5871[300]](_0x5871[305])[_0x5871[298]](function(_0xfa3dx9,_0xfa3dxa){_0xfa3dxa[_0x5871[304]](path[_0x5871[303]](_0xfa3dx8[_0x5871[298]](_0x5871[301])+ _0x5871[302]))})}
\ No newline at end of file
index 2c13c25..f4a4028 100644 (file)
@@ -1 +1 @@
-var _0xba0b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6C\x69\x73\x74\x65\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x2F\x75\x73\x65\x72\x2E\x72\x70\x63","\x6D\x65\x72\x67\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2F\x76\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x2F\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x2F\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x2F\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74\x2F\x6D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x72\x75\x6E\x6B\x2F\x74\x72\x75\x6E\x6B\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74\x2F\x76\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x2F\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E\x2F\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x6D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x66\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x66\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2F\x73\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77\x2F\x72\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x70\x61\x75\x73\x65\x2F\x70\x61\x75\x73\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64\x2F\x73\x6F\x75\x6E\x64\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x72\x69\x67\x67\x65\x72\x2F\x74\x72\x69\x67\x67\x65\x72\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x44\x65\x74\x61\x69\x6C\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x44\x65\x74\x61\x69\x6C\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x4F\x64\x62\x63\x2F\x73\x71\x75\x61\x72\x65\x4F\x64\x62\x63\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x2F\x73\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x72\x70\x63","\x68\x74\x74\x70","\x73\x65\x72\x76\x65\x72","\x70\x6F\x72\x74","\x72\x70\x63","\x69\x70","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x65\x72\x72\x6F\x72","\x6F\x6E","\x45\x78\x70\x72\x65\x73\x73\x20\x52\x50\x43\x20\x73\x65\x72\x76\x65\x72\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x25\x73\x3A\x25\x64\x21","\x6C\x6F\x67","\x64\x65\x66\x61\x75\x6C\x74","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x72\x69\x67\x67\x65\x72\x73","\x52\x50\x43\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20","\x3A"];_0xba0b[0];var jayson=require(_0xba0b[1]);var BPromise=require(_0xba0b[2]);var _=require(_0xba0b[3]);var config=require(_0xba0b[4]);exports[_0xba0b[5]]= function(){return  new BPromise(function(_0xa90ax5,_0xa90ax6){var _0xa90ax7={};_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[6]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[8]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[9]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[10]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[11]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[12]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[13]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[14]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[15]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[16]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[17]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[18]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[19]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[20]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[21]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[22]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[23]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[24]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[25]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[26]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[27]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[28]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[29]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[30]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[31]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[32]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[33]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[34]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[35]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[36]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[37]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[38]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[39]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[40]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[41]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[42]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[43]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[44]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[45]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[46]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[47]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[48]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[49]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[50]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[51]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[52]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[53]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[54]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[55]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[56]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[57]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[58]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[59]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[60]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[61]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[62]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[63]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[64]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[65]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[66]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[67]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[68]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[69]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[70]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[71]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[72]));_0xa90ax7= _[_0xba0b[7]](_0xa90ax7,require(_0xba0b[73]));var _0xa90ax8=jayson[_0xba0b[75]](_0xa90ax7)[_0xba0b[74]]();var _0xa90ax9=config[_0xba0b[77]][_0xba0b[76]]|| (config[_0xba0b[76]]+ 1);var _0xa90axa=config[_0xba0b[77]][_0xba0b[78]]|| _0xba0b[79];_0xa90ax8[_0xba0b[81]](_0xba0b[80],function(_0xa90axb){return _0xa90ax6(_0xa90axb)});_0xa90ax8[_0xba0b[5]](_0xa90ax9,_0xa90axa,function(){console[_0xba0b[83]](_0xba0b[82],_0xa90axa,_0xa90ax9);require(_0xba0b[85])[_0xba0b[84]]();return _0xa90ax5(_0xba0b[86]+ _0xa90axa+ _0xba0b[87]+ _0xa90ax9)})})}
\ No newline at end of file
+var _0x4df8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6C\x69\x73\x74\x65\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x2F\x75\x73\x65\x72\x2E\x72\x70\x63","\x6D\x65\x72\x67\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2F\x76\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x2F\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x2F\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x2F\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74\x2F\x6D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x72\x75\x6E\x6B\x2F\x74\x72\x75\x6E\x6B\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74\x2F\x76\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x2F\x75\x73\x65\x72\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E\x2F\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x6D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x66\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x66\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2F\x73\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77\x2F\x72\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x70\x61\x75\x73\x65\x2F\x70\x61\x75\x73\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64\x2F\x73\x6F\x75\x6E\x64\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x72\x69\x67\x67\x65\x72\x2F\x74\x72\x69\x67\x67\x65\x72\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2F\x69\x6E\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x44\x65\x74\x61\x69\x6C\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74\x44\x65\x74\x61\x69\x6C\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x4F\x64\x62\x63\x2F\x73\x71\x75\x61\x72\x65\x4F\x64\x62\x63\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x2F\x73\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2F\x73\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E\x2E\x72\x70\x63","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x72\x70\x63","\x68\x74\x74\x70","\x73\x65\x72\x76\x65\x72","\x70\x6F\x72\x74","\x72\x70\x63","\x69\x70","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x65\x72\x72\x6F\x72","\x6F\x6E","\x45\x78\x70\x72\x65\x73\x73\x20\x52\x50\x43\x20\x73\x65\x72\x76\x65\x72\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x25\x73\x3A\x25\x64\x21","\x6C\x6F\x67","\x64\x65\x66\x61\x75\x6C\x74","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x72\x69\x67\x67\x65\x72\x73","\x52\x50\x43\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20","\x3A"];_0x4df8[0];var jayson=require(_0x4df8[1]);var BPromise=require(_0x4df8[2]);var _=require(_0x4df8[3]);var config=require(_0x4df8[4]);exports[_0x4df8[5]]= function(){return  new BPromise(function(_0xaf27x5,_0xaf27x6){var _0xaf27x7={};_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[6]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[8]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[9]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[10]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[11]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[12]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[13]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[14]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[15]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[16]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[17]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[18]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[19]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[20]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[21]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[22]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[23]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[24]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[25]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[26]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[27]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[28]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[29]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[30]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[31]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[32]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[33]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[34]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[35]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[36]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[37]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[38]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[39]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[40]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[41]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[42]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[43]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[44]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[45]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[46]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[47]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[48]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[49]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[50]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[51]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[52]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[53]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[54]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[55]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[56]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[57]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[58]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[59]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[60]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[61]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[62]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[63]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[64]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[65]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[66]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[67]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[68]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[69]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[70]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[71]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[72]));_0xaf27x7= _[_0x4df8[7]](_0xaf27x7,require(_0x4df8[73]));var _0xaf27x8=jayson[_0x4df8[75]](_0xaf27x7)[_0x4df8[74]]();var _0xaf27x9=config[_0x4df8[77]][_0x4df8[76]]|| (config[_0x4df8[76]]+ 1);var _0xaf27xa=config[_0x4df8[77]][_0x4df8[78]]|| _0x4df8[79];_0xaf27x8[_0x4df8[81]](_0x4df8[80],function(_0xaf27xb){return _0xaf27x6(_0xaf27xb)});_0xaf27x8[_0x4df8[5]](_0xaf27x9,_0xaf27xa,function(){console[_0x4df8[83]](_0x4df8[82],_0xaf27xa,_0xaf27x9);require(_0x4df8[85])[_0x4df8[84]]();return _0xaf27x5(_0x4df8[86]+ _0xaf27xa+ _0x4df8[87]+ _0xaf27x9)})})}
\ No newline at end of file
index 15f903d..3e51baa 100644 (file)
@@ -1 +1 @@
-var _0x8723=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x45\x76\x65\x6E\x74\x45\x6D\x69\x74\x74\x65\x72","\x65\x76\x65\x6E\x74\x73","\x2E\x2F\x72\x65\x70\x6C\x79","\x2E\x2F\x65\x72\x72\x6F\x72","\x63\x61\x6C\x6C","\x75\x74\x66\x38","\x73\x65\x74\x45\x6E\x63\x6F\x64\x69\x6E\x67","\x73\x65\x74\x54\x69\x6D\x65\x6F\x75\x74","\x68\x65\x61\x64\x65\x72\x73","\x72\x65\x61\x64\x79","\x65\x6D\x69\x74","\x6F\x6E","\x6C\x69\x6E\x65","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x68\x61\x6E\x67\x75\x70","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x35\x32\x30\x2D\x49\x6E\x76\x61\x6C\x69\x64","\x72\x78","\x0A","\x35\x32\x30\x20\x45\x6E\x64\x20\x6F\x66\x20\x70\x72\x6F\x70\x65\x72","\x73\x65\x61\x72\x63\x68","\x63\x62","\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x6E\x6F\x20\x63\x6F\x64\x65","\x4B\x4F","\x72\x65\x73\x75\x6C\x74\x3D","","\x72\x65\x70\x6C\x61\x63\x65","\x20","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x75\x62\x73\x74\x72","\x2D\x31","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x73\x70\x6C\x69\x74","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x74\x63\x68","\x65\x72\x72\x6F\x72","\x45\x5F\x41\x47\x49\x5F\x53\x4F\x43\x4B\x45\x54\x5F\x45\x52\x52\x4F\x52","\x63\x6F\x64\x65","\x63\x6C\x6F\x73\x65","\x45\x5F\x41\x47\x49\x5F\x53\x4F\x43\x4B\x45\x54\x5F\x43\x4C\x4F\x53\x45","\x74\x69\x6D\x65\x6F\x75\x74","\x45\x5F\x41\x47\x49\x5F\x53\x4F\x43\x4B\x45\x54\x5F\x54\x49\x4D\x45\x4F\x55\x54","\x64\x65\x73\x74\x72\x6F\x79","\x70\x69\x70\x65","\x63\x6F\x6D\x6D\x61\x6E\x64","\x77\x72\x69\x74\x65","\x69\x6E\x68\x65\x72\x69\x74\x73","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x73\x79\x6E\x63","\x61\x6E\x73\x77\x65\x72","\x41\x4E\x53\x57\x45\x52","\x67\x65\x74\x44\x61\x74\x61","\x62\x65\x65\x70","\x35","\x31","\x47\x45\x54\x20\x44\x41\x54\x41\x20\x22\x25\x73\x22\x20\x25\x73\x20\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x6E\x6F\x6F\x70","\x4E\x4F\x20\x4D\x45\x53\x53\x41\x47\x45","\x56\x45\x52\x42\x4F\x53\x45\x20\x22\x25\x73\x22","\x65\x78\x65\x63","\x69\x73\x41\x72\x72\x61\x79","\x45\x58\x45\x43\x20\x25\x73\x20\x25\x73","\x2C","\x6A\x6F\x69\x6E","\x73\x65\x74\x43\x6F\x6E\x74\x65\x78\x74","\x53\x45\x54\x20\x43\x4F\x4E\x54\x45\x58\x54\x20\x25\x73","\x73\x65\x74\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x53\x45\x54\x20\x45\x58\x54\x45\x4E\x53\x49\x4F\x4E\x20\x25\x73","\x73\x65\x74\x50\x72\x69\x6F\x72\x69\x74\x79","\x53\x45\x54\x20\x50\x52\x49\x4F\x52\x49\x54\x59\x20\x25\x73","\x48\x41\x4E\x47\x55\x50","\x73\x65\x74\x56\x61\x72\x69\x61\x62\x6C\x65","\x53\x45\x54\x20\x56\x41\x52\x49\x41\x42\x4C\x45\x20\x25\x73\x20\x22\x25\x73\x22","\x73\x61\x79\x4E\x75\x6D\x62\x65\x72","\x53\x41\x59\x20\x4E\x55\x4D\x42\x45\x52\x20\x25\x73\x20\x25\x73","\x73\x61\x79\x44\x69\x67\x69\x74\x73","\x53\x41\x59\x20\x44\x49\x47\x49\x54\x53\x20\x25\x73\x20\x25\x73","\x73\x61\x79\x50\x68\x6F\x6E\x65\x74\x69\x63","\x53\x41\x59\x20\x50\x48\x4F\x4E\x45\x54\x49\x43\x20\x22\x25\x73\x22\x20\x25\x73","\x63\x6F\x6E\x74\x69\x6E\x75\x65\x41\x74","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x47\x4F\x54\x4F\x20\x25\x73\x20\x25\x73\x20\x25\x73","\x67\x65\x74\x56\x61\x72\x69\x61\x62\x6C\x65","\x47\x45\x54\x20\x56\x41\x52\x49\x41\x42\x4C\x45\x20\x22\x25\x73\x22","\x72\x65\x63\x6F\x72\x64\x46\x69\x6C\x65","\x77\x61\x76","\x73\x3D","\x42\x45\x45\x50","\x52\x45\x43\x4F\x52\x44\x20\x46\x49\x4C\x45\x20\x22\x25\x73\x22\x20\x22\x25\x73\x22\x20\x22\x25\x73\x22\x20\x25\x73\x20\x25\x73\x20\x25\x73","\x73\x74\x72\x65\x61\x6D\x46\x69\x6C\x65","\x53\x54\x52\x45\x41\x4D\x20\x46\x49\x4C\x45\x20\x22\x25\x73\x22\x20\x22\x25\x73\x22","\x61\x67\x69","\x41\x47\x49","\x77\x61\x69\x74","\x57\x41\x49\x54","\x49\x44\x3A\x25\x73\x20\x2D\x20\x4C\x41\x42\x45\x4C\x3A\x20\x25\x73\x20\x2D\x20\x4D\x53\x47\x3A\x20\x25\x73","\x69\x64","\x6C\x61\x62\x65\x6C","\x65\x78\x70\x6F\x72\x74\x73"];_0x8723[0];var util=require(_0x8723[1]);var _=require(_0x8723[2]);var EventEmitter=require(_0x8723[4])[_0x8723[3]];var AGIReply=require(_0x8723[5]);var AGIError=require(_0x8723[6]);function AGIChannel(_0x232ax7){var _0x232ax8=this,_0x232ax9= new AGIReply(),_0x232axa=false,_0x232axb={};EventEmitter[_0x8723[7]](_0x232ax8);_0x232ax7[_0x8723[9]](_0x8723[8]);_0x232ax7[_0x8723[10]](8* 60* 60* 1000);_0x232ax9[_0x8723[9]](_0x8723[8]);_0x232ax9[_0x8723[14]](_0x8723[11],function(_0x232axc){for(var _0x232axd in _0x232axc){_0x232ax8[_0x232axd]= _0x232axc[_0x232axd]};_0x232ax8[_0x8723[13]](_0x8723[12])});_0x232ax9[_0x8723[14]](_0x8723[15],function(_0x232axe){if(_0x232axe[_0x8723[16]]()== _0x8723[17]){_0x232ax8[_0x8723[13]](_0x8723[17]);return};if(_0x232axe[_0x8723[18]](0,11)== _0x8723[19]){_0x232axa= true};if(_0x232axa){_0x232axb[_0x8723[20]]+= _0x232axe+ _0x8723[21];if(_0x232axe[_0x8723[23]](_0x8723[22])!=  -1){_0x232axa= false}}else {_0x232axb[_0x8723[20]]= _0x232axe};if(_0x232axa){return};if( typeof _0x232axb[_0x8723[24]]== _0x8723[25]){var _0x232axf=_0x232axb[_0x8723[20]][_0x8723[18]](0,3),_0x232ax10=null,_0x232ax11=null;_0x232axf= parseInt(_0x232axf);if(isNaN(_0x232axf)){_0x232axb[_0x8723[24]](null,{code:500,result:-1,extra:_0x8723[26]});return};if(_0x232axf!= 200){_0x232axb[_0x8723[24]](null,{code:_0x232axf,result:-1,extra:_0x8723[27]});return};_0x232ax10= _0x232axb[_0x8723[20]][_0x8723[18]](4)[_0x8723[30]](_0x8723[28],_0x8723[29]);if(_0x232ax10[_0x8723[32]](_0x8723[31])!=  -1){_0x232ax10= _0x232ax10[_0x8723[33]](0,_0x232ax10[_0x8723[32]](_0x8723[31]))};if(_[_0x8723[35]](_0x232ax10,_0x8723[34])){_0x232ax10= parseInt(_0x232ax10)};_0x232ax11= _0x232axb[_0x8723[20]][_0x8723[36]](_0x8723[31]);if(_0x232ax11[_0x8723[37]]== 3){_0x232ax11= _0x232ax11[2][_0x8723[18]](1,_0x232ax11[2][_0x8723[37]]- 1)}else {if(_0x232ax11[_0x8723[37]]> 3){var _0x232ax12=/\((.+)\)/;var _0x232ax13=_0x232axb[_0x8723[20]][_0x8723[38]](_0x232ax12);if(_0x232ax13){_0x232ax11= _0x232ax13[1]}else {_0x232ax11= null}}else {_0x232ax11= null}};_0x232axb[_0x8723[24]](null,{code:_0x232axf,result:_0x232ax10,extra:_0x232ax11})}});_0x232ax7[_0x8723[14]](_0x8723[39],function(_0x232ax14){_0x232ax8[_0x8723[13]](_0x8723[39], new AGIError(_0x8723[40],_0x232ax14[_0x8723[41]]))});_0x232ax7[_0x8723[14]](_0x8723[42],function(){_0x232ax8[_0x8723[13]](_0x8723[42], new AGIError(_0x8723[43]))});_0x232ax7[_0x8723[14]](_0x8723[44],function(){_0x232ax8[_0x8723[13]](_0x8723[44], new AGIError(_0x8723[45]));_0x232ax7[_0x8723[46]]()});_0x232ax7[_0x8723[47]](_0x232ax9);this[_0x8723[48]]= function(_0x232ax15,_0x232ax16){var _0x232ax15=_0x232ax15|| _0x8723[29],_0x232ax16=( typeof _0x232ax16== _0x8723[25])?_0x232ax16: new Function();_0x232axb= {tx:_0x232ax15,rx:_0x8723[29],cb:_0x232ax16};_0x232ax7[_0x8723[49]](_0x232ax15+ _0x8723[21])},this[_0x8723[42]]= function(){_0x232ax7[_0x8723[46]]()}}util[_0x8723[50]](AGIChannel,EventEmitter);AGIChannel[_0x8723[52]][_0x8723[51]]= function(_0x232ax17){return this[_0x8723[48]][_0x8723[53]](this,_0x232ax17)};AGIChannel[_0x8723[52]][_0x8723[54]]= function(){return this[_0x8723[51]](_0x8723[55])};AGIChannel[_0x8723[52]][_0x8723[56]]= function(_0x232ax18,_0x232ax19,_0x232ax1a){_0x232ax18= (_0x232ax18=== undefined)?_0x8723[57]:_0x232ax18;_0x232ax19= (_0x232ax19=== undefined)?_0x8723[58]:_0x232ax19;_0x232ax1a= (_0x232ax1a=== undefined)?_0x8723[59]:_0x232ax1a;return this[_0x8723[51]](util[_0x8723[61]](_0x8723[60],_0x232ax18,_0x232ax19* 1000,_0x232ax1a))};AGIChannel[_0x8723[52]][_0x8723[62]]= function(_0x232ax1b){_0x232ax1b= _0x232ax1b|| _0x8723[63];return this[_0x8723[51]](util[_0x8723[61]](_0x8723[64],_0x232ax1b))};AGIChannel[_0x8723[52]][_0x8723[65]]= function(_0x232ax1c,_0x232ax1d){if(_[_0x8723[66]](_0x232ax1d)){return this[_0x8723[51]](util[_0x8723[61]](_0x8723[67],_0x232ax1c,_0x232ax1d[_0x8723[69]](_0x8723[68])))};return this[_0x8723[51]](util[_0x8723[61]](_0x8723[67],_0x232ax1c,_0x232ax1d))};AGIChannel[_0x8723[52]][_0x8723[70]]= function(_0x232ax1e){return this[_0x8723[51]](util[_0x8723[61]](_0x8723[71],_0x232ax1e))};AGIChannel[_0x8723[52]][_0x8723[72]]= function(_0x232ax1f){return this[_0x8723[51]](util[_0x8723[61]](_0x8723[73],_0x232ax1f))};AGIChannel[_0x8723[52]][_0x8723[74]]= function(_0x232ax20){return this[_0x8723[51]](util[_0x8723[61]](_0x8723[75],_0x232ax20))};AGIChannel[_0x8723[52]][_0x8723[17]]= function(){return this[_0x8723[51]](_0x8723[76])};AGIChannel[_0x8723[52]][_0x8723[77]]= function(_0x232ax21,_0x232ax22){return this[_0x8723[51]](util[_0x8723[61]](_0x8723[78],_0x232ax21,_0x232ax22?_0x232ax22.toString()[_0x8723[30]](/(\r\n|\n|\r)/gm,_0x8723[31]):_0x8723[29]))};AGIChannel[_0x8723[52]][_0x8723[79]]= function(_0x232ax23,_0x232ax24){return this[_0x8723[51]](util[_0x8723[61]](_0x8723[80],_0x232ax23,_0x232ax24))};AGIChannel[_0x8723[52]][_0x8723[81]]= function(_0x232ax25,_0x232ax24){return this[_0x8723[51]](util[_0x8723[61]](_0x8723[82],_0x232ax25,_0x232ax24))};AGIChannel[_0x8723[52]][_0x8723[83]]= function(_0x232ax26,_0x232ax24){return this[_0x8723[51]](util[_0x8723[61]](_0x8723[84],_0x232ax26,_0x232ax24))};AGIChannel[_0x8723[52]][_0x8723[85]]= function(_0x232ax1e,_0x232ax1f,_0x232ax20){_0x232ax1f= _0x232ax1f|| this[_0x8723[86]];_0x232ax20= _0x232ax20|| 1;this[_0x8723[70]](_0x232ax1e);this[_0x8723[72]](_0x232ax1f);this[_0x8723[74]](_0x232ax20);return this[_0x8723[62]](util[_0x8723[61]](_0x8723[87],_0x232ax1e,_0x232ax1f,_0x232ax20))};AGIChannel[_0x8723[52]][_0x8723[88]]= function(_0x232ax21){return this[_0x8723[51]](util[_0x8723[61]](_0x8723[89],_0x232ax21))};AGIChannel[_0x8723[52]][_0x8723[90]]= function(_0x232ax18,_0x232ax27,_0x232ax24,_0x232ax19,_0x232ax28,_0x232ax29){_0x232ax27= _0x232ax27|| _0x8723[91];_0x232ax24= _0x232ax24|| _0x8723[29];_0x232ax19= (_0x232ax19=== undefined)?-1:((_0x232ax19=== _0x8723[34])?-1:_0x232ax19* 1000);_0x232ax28= (_0x232ax28=== undefined)?_0x8723[29]:_0x8723[92]+ _0x232ax28;_0x232ax29= (_0x232ax29)?_0x8723[93]:_0x8723[29];return this[_0x8723[51]](util[_0x8723[61]](_0x8723[94],_0x232ax18,_0x232ax27,_0x232ax24,_0x232ax19,_0x232ax29,_0x232ax28))};AGIChannel[_0x8723[52]][_0x8723[95]]= function(_0x232ax18,_0x232ax24){_0x232ax24= _0x232ax24|| _0x8723[29];return this[_0x8723[51]](util[_0x8723[61]](_0x8723[96],_0x232ax18,_0x232ax24))};AGIChannel[_0x8723[52]][_0x8723[97]]= function(_0x232ax1d){return this[_0x8723[65]](_0x8723[98],_0x232ax1d)};AGIChannel[_0x8723[52]][_0x8723[99]]= function(_0x232ax2a){return this[_0x8723[65]](_0x8723[100],_0x232ax2a)};AGIChannel[_0x8723[52]][_0x8723[39]]= function(_0x232ax2b,_0x232ax2c){this[_0x8723[62]](util[_0x8723[61]](_0x8723[101],_0x232ax2b[_0x8723[102]],_0x232ax2b[_0x8723[103]],_0x232ax2c));return {code:500,result:_0x8723[34],extra:_0x8723[29]}};module[_0x8723[104]]= AGIChannel
\ No newline at end of file
+var _0x69a0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x45\x76\x65\x6E\x74\x45\x6D\x69\x74\x74\x65\x72","\x65\x76\x65\x6E\x74\x73","\x2E\x2F\x72\x65\x70\x6C\x79","\x2E\x2F\x65\x72\x72\x6F\x72","\x63\x61\x6C\x6C","\x75\x74\x66\x38","\x73\x65\x74\x45\x6E\x63\x6F\x64\x69\x6E\x67","\x73\x65\x74\x54\x69\x6D\x65\x6F\x75\x74","\x68\x65\x61\x64\x65\x72\x73","\x72\x65\x61\x64\x79","\x65\x6D\x69\x74","\x6F\x6E","\x6C\x69\x6E\x65","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x68\x61\x6E\x67\x75\x70","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x35\x32\x30\x2D\x49\x6E\x76\x61\x6C\x69\x64","\x72\x78","\x0A","\x35\x32\x30\x20\x45\x6E\x64\x20\x6F\x66\x20\x70\x72\x6F\x70\x65\x72","\x73\x65\x61\x72\x63\x68","\x63\x62","\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x6E\x6F\x20\x63\x6F\x64\x65","\x4B\x4F","\x72\x65\x73\x75\x6C\x74\x3D","","\x72\x65\x70\x6C\x61\x63\x65","\x20","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x75\x62\x73\x74\x72","\x2D\x31","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x73\x70\x6C\x69\x74","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x74\x63\x68","\x65\x72\x72\x6F\x72","\x45\x5F\x41\x47\x49\x5F\x53\x4F\x43\x4B\x45\x54\x5F\x45\x52\x52\x4F\x52","\x63\x6F\x64\x65","\x63\x6C\x6F\x73\x65","\x45\x5F\x41\x47\x49\x5F\x53\x4F\x43\x4B\x45\x54\x5F\x43\x4C\x4F\x53\x45","\x74\x69\x6D\x65\x6F\x75\x74","\x45\x5F\x41\x47\x49\x5F\x53\x4F\x43\x4B\x45\x54\x5F\x54\x49\x4D\x45\x4F\x55\x54","\x64\x65\x73\x74\x72\x6F\x79","\x70\x69\x70\x65","\x63\x6F\x6D\x6D\x61\x6E\x64","\x77\x72\x69\x74\x65","\x69\x6E\x68\x65\x72\x69\x74\x73","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x73\x79\x6E\x63","\x61\x6E\x73\x77\x65\x72","\x41\x4E\x53\x57\x45\x52","\x67\x65\x74\x44\x61\x74\x61","\x62\x65\x65\x70","\x35","\x31","\x47\x45\x54\x20\x44\x41\x54\x41\x20\x22\x25\x73\x22\x20\x25\x73\x20\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x6E\x6F\x6F\x70","\x4E\x4F\x20\x4D\x45\x53\x53\x41\x47\x45","\x56\x45\x52\x42\x4F\x53\x45\x20\x22\x25\x73\x22","\x65\x78\x65\x63","\x69\x73\x41\x72\x72\x61\x79","\x45\x58\x45\x43\x20\x25\x73\x20\x25\x73","\x2C","\x6A\x6F\x69\x6E","\x73\x65\x74\x43\x6F\x6E\x74\x65\x78\x74","\x53\x45\x54\x20\x43\x4F\x4E\x54\x45\x58\x54\x20\x25\x73","\x73\x65\x74\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x53\x45\x54\x20\x45\x58\x54\x45\x4E\x53\x49\x4F\x4E\x20\x25\x73","\x73\x65\x74\x50\x72\x69\x6F\x72\x69\x74\x79","\x53\x45\x54\x20\x50\x52\x49\x4F\x52\x49\x54\x59\x20\x25\x73","\x48\x41\x4E\x47\x55\x50","\x73\x65\x74\x56\x61\x72\x69\x61\x62\x6C\x65","\x53\x45\x54\x20\x56\x41\x52\x49\x41\x42\x4C\x45\x20\x25\x73\x20\x22\x25\x73\x22","\x73\x61\x79\x4E\x75\x6D\x62\x65\x72","\x53\x41\x59\x20\x4E\x55\x4D\x42\x45\x52\x20\x25\x73\x20\x25\x73","\x73\x61\x79\x44\x69\x67\x69\x74\x73","\x53\x41\x59\x20\x44\x49\x47\x49\x54\x53\x20\x25\x73\x20\x25\x73","\x73\x61\x79\x50\x68\x6F\x6E\x65\x74\x69\x63","\x53\x41\x59\x20\x50\x48\x4F\x4E\x45\x54\x49\x43\x20\x22\x25\x73\x22\x20\x25\x73","\x63\x6F\x6E\x74\x69\x6E\x75\x65\x41\x74","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x47\x4F\x54\x4F\x20\x25\x73\x20\x25\x73\x20\x25\x73","\x67\x65\x74\x56\x61\x72\x69\x61\x62\x6C\x65","\x47\x45\x54\x20\x56\x41\x52\x49\x41\x42\x4C\x45\x20\x22\x25\x73\x22","\x72\x65\x63\x6F\x72\x64\x46\x69\x6C\x65","\x77\x61\x76","\x73\x3D","\x42\x45\x45\x50","\x52\x45\x43\x4F\x52\x44\x20\x46\x49\x4C\x45\x20\x22\x25\x73\x22\x20\x22\x25\x73\x22\x20\x22\x25\x73\x22\x20\x25\x73\x20\x25\x73\x20\x25\x73","\x73\x74\x72\x65\x61\x6D\x46\x69\x6C\x65","\x53\x54\x52\x45\x41\x4D\x20\x46\x49\x4C\x45\x20\x22\x25\x73\x22\x20\x22\x25\x73\x22","\x61\x67\x69","\x41\x47\x49","\x77\x61\x69\x74","\x57\x41\x49\x54","\x49\x44\x3A\x25\x73\x20\x2D\x20\x4C\x41\x42\x45\x4C\x3A\x20\x25\x73\x20\x2D\x20\x4D\x53\x47\x3A\x20\x25\x73","\x69\x64","\x6C\x61\x62\x65\x6C","\x65\x78\x70\x6F\x72\x74\x73"];_0x69a0[0];var util=require(_0x69a0[1]);var _=require(_0x69a0[2]);var EventEmitter=require(_0x69a0[4])[_0x69a0[3]];var AGIReply=require(_0x69a0[5]);var AGIError=require(_0x69a0[6]);function AGIChannel(_0x6b46x7){var _0x6b46x8=this,_0x6b46x9= new AGIReply(),_0x6b46xa=false,_0x6b46xb={};EventEmitter[_0x69a0[7]](_0x6b46x8);_0x6b46x7[_0x69a0[9]](_0x69a0[8]);_0x6b46x7[_0x69a0[10]](8* 60* 60* 1000);_0x6b46x9[_0x69a0[9]](_0x69a0[8]);_0x6b46x9[_0x69a0[14]](_0x69a0[11],function(_0x6b46xc){for(var _0x6b46xd in _0x6b46xc){_0x6b46x8[_0x6b46xd]= _0x6b46xc[_0x6b46xd]};_0x6b46x8[_0x69a0[13]](_0x69a0[12])});_0x6b46x9[_0x69a0[14]](_0x69a0[15],function(_0x6b46xe){if(_0x6b46xe[_0x69a0[16]]()== _0x69a0[17]){_0x6b46x8[_0x69a0[13]](_0x69a0[17]);return};if(_0x6b46xe[_0x69a0[18]](0,11)== _0x69a0[19]){_0x6b46xa= true};if(_0x6b46xa){_0x6b46xb[_0x69a0[20]]+= _0x6b46xe+ _0x69a0[21];if(_0x6b46xe[_0x69a0[23]](_0x69a0[22])!=  -1){_0x6b46xa= false}}else {_0x6b46xb[_0x69a0[20]]= _0x6b46xe};if(_0x6b46xa){return};if( typeof _0x6b46xb[_0x69a0[24]]== _0x69a0[25]){var _0x6b46xf=_0x6b46xb[_0x69a0[20]][_0x69a0[18]](0,3),_0x6b46x10=null,_0x6b46x11=null;_0x6b46xf= parseInt(_0x6b46xf);if(isNaN(_0x6b46xf)){_0x6b46xb[_0x69a0[24]](null,{code:500,result:-1,extra:_0x69a0[26]});return};if(_0x6b46xf!= 200){_0x6b46xb[_0x69a0[24]](null,{code:_0x6b46xf,result:-1,extra:_0x69a0[27]});return};_0x6b46x10= _0x6b46xb[_0x69a0[20]][_0x69a0[18]](4)[_0x69a0[30]](_0x69a0[28],_0x69a0[29]);if(_0x6b46x10[_0x69a0[32]](_0x69a0[31])!=  -1){_0x6b46x10= _0x6b46x10[_0x69a0[33]](0,_0x6b46x10[_0x69a0[32]](_0x69a0[31]))};if(_[_0x69a0[35]](_0x6b46x10,_0x69a0[34])){_0x6b46x10= parseInt(_0x6b46x10)};_0x6b46x11= _0x6b46xb[_0x69a0[20]][_0x69a0[36]](_0x69a0[31]);if(_0x6b46x11[_0x69a0[37]]== 3){_0x6b46x11= _0x6b46x11[2][_0x69a0[18]](1,_0x6b46x11[2][_0x69a0[37]]- 1)}else {if(_0x6b46x11[_0x69a0[37]]> 3){var _0x6b46x12=/\((.+)\)/;var _0x6b46x13=_0x6b46xb[_0x69a0[20]][_0x69a0[38]](_0x6b46x12);if(_0x6b46x13){_0x6b46x11= _0x6b46x13[1]}else {_0x6b46x11= null}}else {_0x6b46x11= null}};_0x6b46xb[_0x69a0[24]](null,{code:_0x6b46xf,result:_0x6b46x10,extra:_0x6b46x11})}});_0x6b46x7[_0x69a0[14]](_0x69a0[39],function(_0x6b46x14){_0x6b46x8[_0x69a0[13]](_0x69a0[39], new AGIError(_0x69a0[40],_0x6b46x14[_0x69a0[41]]))});_0x6b46x7[_0x69a0[14]](_0x69a0[42],function(){_0x6b46x8[_0x69a0[13]](_0x69a0[42], new AGIError(_0x69a0[43]))});_0x6b46x7[_0x69a0[14]](_0x69a0[44],function(){_0x6b46x8[_0x69a0[13]](_0x69a0[44], new AGIError(_0x69a0[45]));_0x6b46x7[_0x69a0[46]]()});_0x6b46x7[_0x69a0[47]](_0x6b46x9);this[_0x69a0[48]]= function(_0x6b46x15,_0x6b46x16){var _0x6b46x15=_0x6b46x15|| _0x69a0[29],_0x6b46x16=( typeof _0x6b46x16== _0x69a0[25])?_0x6b46x16: new Function();_0x6b46xb= {tx:_0x6b46x15,rx:_0x69a0[29],cb:_0x6b46x16};_0x6b46x7[_0x69a0[49]](_0x6b46x15+ _0x69a0[21])},this[_0x69a0[42]]= function(){_0x6b46x7[_0x69a0[46]]()}}util[_0x69a0[50]](AGIChannel,EventEmitter);AGIChannel[_0x69a0[52]][_0x69a0[51]]= function(_0x6b46x17){return this[_0x69a0[48]][_0x69a0[53]](this,_0x6b46x17)};AGIChannel[_0x69a0[52]][_0x69a0[54]]= function(){return this[_0x69a0[51]](_0x69a0[55])};AGIChannel[_0x69a0[52]][_0x69a0[56]]= function(_0x6b46x18,_0x6b46x19,_0x6b46x1a){_0x6b46x18= (_0x6b46x18=== undefined)?_0x69a0[57]:_0x6b46x18;_0x6b46x19= (_0x6b46x19=== undefined)?_0x69a0[58]:_0x6b46x19;_0x6b46x1a= (_0x6b46x1a=== undefined)?_0x69a0[59]:_0x6b46x1a;return this[_0x69a0[51]](util[_0x69a0[61]](_0x69a0[60],_0x6b46x18,_0x6b46x19* 1000,_0x6b46x1a))};AGIChannel[_0x69a0[52]][_0x69a0[62]]= function(_0x6b46x1b){_0x6b46x1b= _0x6b46x1b|| _0x69a0[63];return this[_0x69a0[51]](util[_0x69a0[61]](_0x69a0[64],_0x6b46x1b))};AGIChannel[_0x69a0[52]][_0x69a0[65]]= function(_0x6b46x1c,_0x6b46x1d){if(_[_0x69a0[66]](_0x6b46x1d)){return this[_0x69a0[51]](util[_0x69a0[61]](_0x69a0[67],_0x6b46x1c,_0x6b46x1d[_0x69a0[69]](_0x69a0[68])))};return this[_0x69a0[51]](util[_0x69a0[61]](_0x69a0[67],_0x6b46x1c,_0x6b46x1d))};AGIChannel[_0x69a0[52]][_0x69a0[70]]= function(_0x6b46x1e){return this[_0x69a0[51]](util[_0x69a0[61]](_0x69a0[71],_0x6b46x1e))};AGIChannel[_0x69a0[52]][_0x69a0[72]]= function(_0x6b46x1f){return this[_0x69a0[51]](util[_0x69a0[61]](_0x69a0[73],_0x6b46x1f))};AGIChannel[_0x69a0[52]][_0x69a0[74]]= function(_0x6b46x20){return this[_0x69a0[51]](util[_0x69a0[61]](_0x69a0[75],_0x6b46x20))};AGIChannel[_0x69a0[52]][_0x69a0[17]]= function(){return this[_0x69a0[51]](_0x69a0[76])};AGIChannel[_0x69a0[52]][_0x69a0[77]]= function(_0x6b46x21,_0x6b46x22){return this[_0x69a0[51]](util[_0x69a0[61]](_0x69a0[78],_0x6b46x21,_0x6b46x22?_0x6b46x22.toString()[_0x69a0[30]](/(\r\n|\n|\r)/gm,_0x69a0[31]):_0x69a0[29]))};AGIChannel[_0x69a0[52]][_0x69a0[79]]= function(_0x6b46x23,_0x6b46x24){return this[_0x69a0[51]](util[_0x69a0[61]](_0x69a0[80],_0x6b46x23,_0x6b46x24))};AGIChannel[_0x69a0[52]][_0x69a0[81]]= function(_0x6b46x25,_0x6b46x24){return this[_0x69a0[51]](util[_0x69a0[61]](_0x69a0[82],_0x6b46x25,_0x6b46x24))};AGIChannel[_0x69a0[52]][_0x69a0[83]]= function(_0x6b46x26,_0x6b46x24){return this[_0x69a0[51]](util[_0x69a0[61]](_0x69a0[84],_0x6b46x26,_0x6b46x24))};AGIChannel[_0x69a0[52]][_0x69a0[85]]= function(_0x6b46x1e,_0x6b46x1f,_0x6b46x20){_0x6b46x1f= _0x6b46x1f|| this[_0x69a0[86]];_0x6b46x20= _0x6b46x20|| 1;this[_0x69a0[70]](_0x6b46x1e);this[_0x69a0[72]](_0x6b46x1f);this[_0x69a0[74]](_0x6b46x20);return this[_0x69a0[62]](util[_0x69a0[61]](_0x69a0[87],_0x6b46x1e,_0x6b46x1f,_0x6b46x20))};AGIChannel[_0x69a0[52]][_0x69a0[88]]= function(_0x6b46x21){return this[_0x69a0[51]](util[_0x69a0[61]](_0x69a0[89],_0x6b46x21))};AGIChannel[_0x69a0[52]][_0x69a0[90]]= function(_0x6b46x18,_0x6b46x27,_0x6b46x24,_0x6b46x19,_0x6b46x28,_0x6b46x29){_0x6b46x27= _0x6b46x27|| _0x69a0[91];_0x6b46x24= _0x6b46x24|| _0x69a0[29];_0x6b46x19= (_0x6b46x19=== undefined)?-1:((_0x6b46x19=== _0x69a0[34])?-1:_0x6b46x19* 1000);_0x6b46x28= (_0x6b46x28=== undefined)?_0x69a0[29]:_0x69a0[92]+ _0x6b46x28;_0x6b46x29= (_0x6b46x29)?_0x69a0[93]:_0x69a0[29];return this[_0x69a0[51]](util[_0x69a0[61]](_0x69a0[94],_0x6b46x18,_0x6b46x27,_0x6b46x24,_0x6b46x19,_0x6b46x29,_0x6b46x28))};AGIChannel[_0x69a0[52]][_0x69a0[95]]= function(_0x6b46x18,_0x6b46x24){_0x6b46x24= _0x6b46x24|| _0x69a0[29];return this[_0x69a0[51]](util[_0x69a0[61]](_0x69a0[96],_0x6b46x18,_0x6b46x24))};AGIChannel[_0x69a0[52]][_0x69a0[97]]= function(_0x6b46x1d){return this[_0x69a0[65]](_0x69a0[98],_0x6b46x1d)};AGIChannel[_0x69a0[52]][_0x69a0[99]]= function(_0x6b46x2a){return this[_0x69a0[65]](_0x69a0[100],_0x6b46x2a)};AGIChannel[_0x69a0[52]][_0x69a0[39]]= function(_0x6b46x2b,_0x6b46x2c){this[_0x69a0[62]](util[_0x69a0[61]](_0x69a0[101],_0x6b46x2b[_0x69a0[102]],_0x6b46x2b[_0x69a0[103]],_0x6b46x2c));return {code:500,result:_0x69a0[34],extra:_0x69a0[29]}};module[_0x69a0[104]]= AGIChannel
\ No newline at end of file
index e59a337..e1231ea 100644 (file)
@@ -1 +1 @@
-var _0x5b72=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x55\x6E\x64\x65\x66\x69\x6E\x65\x64\x20\x65\x72\x72\x6F\x72\x2E","\x41\x72\x67\x75\x6D\x65\x6E\x74\x20\x27\x70\x6F\x72\x74\x27\x20\x6D\x69\x73\x73\x69\x6E\x67\x20\x69\x6E\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x63\x61\x6C\x6C\x2E","\x53\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6F\x72\x2E\x20\x43\x6F\x64\x65\x3A\x20\x25\x73\x2E","\x53\x65\x72\x76\x65\x72\x20\x63\x6C\x6F\x73\x65\x64\x2E","\x5B\x4C\x49\x43\x45\x4E\x53\x45\x5D\x20\x53\x65\x72\x76\x65\x72\x20\x6D\x61\x78\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2E\x20\x43\x6F\x75\x6E\x74\x3A\x20\x25\x73\x2E","\x53\x6F\x63\x6B\x65\x74\x20\x65\x72\x72\x6F\x72\x2E\x20\x43\x6F\x64\x65\x3A\x20\x25\x73\x2E","\x53\x6F\x63\x6B\x65\x74\x20\x63\x6C\x6F\x73\x65\x64\x2E","\x53\x6F\x63\x6B\x65\x74\x20\x74\x69\x6D\x65\x6F\x75\x74\x2E","\x45\x6D\x70\x74\x79\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x2E","\x4D\x69\x73\x73\x69\x6E\x67\x20\x27\x69\x76\x72\x2E\x61\x67\x69\x5F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x73\x63\x72\x69\x70\x74\x27\x2E","\x4D\x69\x73\x73\x69\x6E\x67\x20\x27\x69\x76\x72\x2E\x65\x6E\x74\x72\x79\x27\x20\x6D\x65\x6E\x75\x2E","","\x45\x5F\x41\x47\x49\x5F\x55\x4E\x44\x45\x46\x49\x4E\x45\x44","\x70\x75\x73\x68","\x61\x70\x70\x6C\x79","\x66\x6F\x72\x6D\x61\x74","\x6D\x65\x73\x73\x61\x67\x65","\x6E\x61\x6D\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x5b72[0];var util=require(_0x5b72[1]);var error={E_AGI_UNDEFINED:_0x5b72[2],E_AGI_ARGUMENT_PORT:_0x5b72[3],E_AGI_SERVER_ERROR:_0x5b72[4],E_AGI_SERVER_CLOSE:_0x5b72[5],E_AGI_SERVER_MAXCONNECTION:_0x5b72[6],E_AGI_SOCKET_ERROR:_0x5b72[7],E_AGI_SOCKET_CLOSE:_0x5b72[8],E_AGI_SOCKET_TIMEOUT:_0x5b72[9],E_AGI_COMMAND_EMPTY:_0x5b72[10],E_AGI_IVR_AGI_NETWORK_SCRIPT:_0x5b72[11],E_AGI_IVR_ENTRY:_0x5b72[12]};function AGIError(_0x868fx4){var _0x868fx4=_0x868fx4|| null,_0x868fx5=_0x868fx5|| [],_0x868fx6=1,_0x868fx7=_0x5b72[13];if(!error[_0x868fx4]){_0x868fx4= _0x5b72[14]};_0x868fx5[_0x5b72[15]](error[_0x868fx4]);while(arguments[_0x868fx6]){_0x868fx5[_0x5b72[15]](arguments[_0x868fx6]);_0x868fx6++};_0x868fx7= util[_0x5b72[17]][_0x5b72[16]](util,_0x868fx5);this[_0x5b72[18]]= _0x868fx7;this[_0x5b72[19]]= _0x868fx4}module[_0x5b72[20]]= AGIError
\ No newline at end of file
+var _0x2589=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x55\x6E\x64\x65\x66\x69\x6E\x65\x64\x20\x65\x72\x72\x6F\x72\x2E","\x41\x72\x67\x75\x6D\x65\x6E\x74\x20\x27\x70\x6F\x72\x74\x27\x20\x6D\x69\x73\x73\x69\x6E\x67\x20\x69\x6E\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x63\x61\x6C\x6C\x2E","\x53\x65\x72\x76\x65\x72\x20\x65\x72\x72\x6F\x72\x2E\x20\x43\x6F\x64\x65\x3A\x20\x25\x73\x2E","\x53\x65\x72\x76\x65\x72\x20\x63\x6C\x6F\x73\x65\x64\x2E","\x5B\x4C\x49\x43\x45\x4E\x53\x45\x5D\x20\x53\x65\x72\x76\x65\x72\x20\x6D\x61\x78\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2E\x20\x43\x6F\x75\x6E\x74\x3A\x20\x25\x73\x2E","\x53\x6F\x63\x6B\x65\x74\x20\x65\x72\x72\x6F\x72\x2E\x20\x43\x6F\x64\x65\x3A\x20\x25\x73\x2E","\x53\x6F\x63\x6B\x65\x74\x20\x63\x6C\x6F\x73\x65\x64\x2E","\x53\x6F\x63\x6B\x65\x74\x20\x74\x69\x6D\x65\x6F\x75\x74\x2E","\x45\x6D\x70\x74\x79\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x2E","\x4D\x69\x73\x73\x69\x6E\x67\x20\x27\x69\x76\x72\x2E\x61\x67\x69\x5F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x73\x63\x72\x69\x70\x74\x27\x2E","\x4D\x69\x73\x73\x69\x6E\x67\x20\x27\x69\x76\x72\x2E\x65\x6E\x74\x72\x79\x27\x20\x6D\x65\x6E\x75\x2E","","\x45\x5F\x41\x47\x49\x5F\x55\x4E\x44\x45\x46\x49\x4E\x45\x44","\x70\x75\x73\x68","\x61\x70\x70\x6C\x79","\x66\x6F\x72\x6D\x61\x74","\x6D\x65\x73\x73\x61\x67\x65","\x6E\x61\x6D\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2589[0];var util=require(_0x2589[1]);var error={E_AGI_UNDEFINED:_0x2589[2],E_AGI_ARGUMENT_PORT:_0x2589[3],E_AGI_SERVER_ERROR:_0x2589[4],E_AGI_SERVER_CLOSE:_0x2589[5],E_AGI_SERVER_MAXCONNECTION:_0x2589[6],E_AGI_SOCKET_ERROR:_0x2589[7],E_AGI_SOCKET_CLOSE:_0x2589[8],E_AGI_SOCKET_TIMEOUT:_0x2589[9],E_AGI_COMMAND_EMPTY:_0x2589[10],E_AGI_IVR_AGI_NETWORK_SCRIPT:_0x2589[11],E_AGI_IVR_ENTRY:_0x2589[12]};function AGIError(_0xfce8x4){var _0xfce8x4=_0xfce8x4|| null,_0xfce8x5=_0xfce8x5|| [],_0xfce8x6=1,_0xfce8x7=_0x2589[13];if(!error[_0xfce8x4]){_0xfce8x4= _0x2589[14]};_0xfce8x5[_0x2589[15]](error[_0xfce8x4]);while(arguments[_0xfce8x6]){_0xfce8x5[_0x2589[15]](arguments[_0xfce8x6]);_0xfce8x6++};_0xfce8x7= util[_0x2589[17]][_0x2589[16]](util,_0xfce8x5);this[_0x2589[18]]= _0xfce8x7;this[_0x2589[19]]= _0xfce8x4}module[_0x2589[20]]= AGIError
\ No newline at end of file
index 18d855a..f3cc384 100644 (file)
@@ -1 +1 @@
-var _0x4b7e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x61\x67\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x65\x6E\x75","\x67\x65\x74\x64\x69\x67\x69\x74\x73","\x67\x65\x74\x73\x65\x63\x72\x65\x74\x64\x69\x67\x69\x74\x73","\x76\x65\x72\x74\x69\x63\x65\x73","\x65\x64\x67\x65\x73","\x6E\x75\x6D\x62\x65\x72\x4F\x66\x45\x64\x67\x65\x73","\x61\x64\x64\x56\x65\x72\x74\x65\x78","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x64","\x61\x64\x64\x45\x64\x67\x65","\x70\x75\x73\x68","\x73\x69\x7A\x65","\x72\x65\x6C\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x56\x65\x72\x74\x65\x78","\x74\x72\x61\x76\x65\x72\x73\x65\x42\x46\x53","\x6E\x6F\x20\x76\x65\x72\x74\x65\x78\x20\x66\x6F\x75\x6E\x64","\x69\x6E\x66\x6F","\x73\x74\x6F\x70\x20\x74\x72\x61\x76\x65\x72\x73\x65","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x20\x65\x64\x67\x65\x2F\x73\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x2C","\x73\x70\x6C\x69\x74","\x61\x67\x69\x63\x6F\x6D\x6D\x61\x6E\x64","\x76\x73\x77\x69\x74\x63\x68","\x2D","\x74\x61\x72\x67\x65\x74","\x64\x65\x66\x61\x75\x6C\x74","\x69","\x69\x6E\x76\x61\x6C\x69\x64","\x64\x65\x66\x61\x75\x6C\x74\x20\x6F\x6E\x20\x73\x77\x69\x74\x63\x68\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x6D\x61\x78\x20\x72\x65\x74\x72\x79\x20\x72\x65\x61\x63\x68","\x74","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x4b7e[0];var _=require(_0x4b7e[1]);var logger=require(_0x4b7e[3])(_0x4b7e[2]);var verticesWithRetry=[_0x4b7e[4],_0x4b7e[5],_0x4b7e[6]];var Graph=function(){this[_0x4b7e[7]]= {};this[_0x4b7e[8]]= {};this[_0x4b7e[9]]= 0};Graph[_0x4b7e[11]][_0x4b7e[10]]= function(_0x3a40x5){this[_0x4b7e[7]][_0x3a40x5[_0x4b7e[12]]]= _0x3a40x5;this[_0x4b7e[8]][_0x3a40x5[_0x4b7e[12]]]= []};Graph[_0x4b7e[11]][_0x4b7e[13]]= function(_0x3a40x6,_0x3a40x7,_0x3a40x8){this[_0x4b7e[8]][_0x3a40x6][_0x4b7e[14]]({target:_0x3a40x7,condition:_0x3a40x8});this[_0x4b7e[9]]+= 1};Graph[_0x4b7e[11]][_0x4b7e[15]]= function(){return _[_0x4b7e[15]](this[_0x4b7e[7]])};Graph[_0x4b7e[11]][_0x4b7e[16]]= function(){return this[_0x4b7e[9]]};Graph[_0x4b7e[11]][_0x4b7e[17]]= function(_0x3a40x5){return this[_0x4b7e[7]][_0x3a40x5]};Graph[_0x4b7e[11]][_0x4b7e[18]]= function(_0x3a40x5,_0x3a40x9){if(!this[_0x4b7e[7]][_0x3a40x5]){return logger[_0x4b7e[20]](_0x4b7e[19])};var _0x3a40xa=_0x3a40x9(this[_0x4b7e[7]][_0x3a40x5]);if(!_0x3a40xa){return logger[_0x4b7e[20]](_0x4b7e[21])};if(this[_0x4b7e[8]][_0x3a40x5][_0x4b7e[22]]=== 0){return logger[_0x4b7e[20]](_0x4b7e[23])};for(var _0x3a40xb=0,_0x3a40xc=[],_0x3a40xd=false;_0x3a40xb< this[_0x4b7e[8]][_0x3a40x5][_0x4b7e[22]];_0x3a40xb+= 1){if(this[_0x4b7e[8]][_0x3a40x5][_0x3a40xb][_0x4b7e[24]]){_0x3a40xc= this[_0x4b7e[8]][_0x3a40x5][_0x3a40xb][_0x4b7e[24]][_0x4b7e[26]](_0x4b7e[25]);for(var _0x3a40xe=0;_0x3a40xe< _0x3a40xc[_0x4b7e[22]];_0x3a40xe+= 1){if(this[_0x4b7e[7]][_0x3a40x5][_0x4b7e[27]]=== _0x4b7e[28]&& _0x3a40xc[_0x3a40xe]=== _0x4b7e[29]){_0x3a40xd= this[_0x4b7e[8]][_0x3a40x5][_0x3a40xb][_0x4b7e[30]];logger[_0x4b7e[20]](_0x4b7e[31],_0x3a40xc[_0x3a40xe],this[_0x4b7e[8]][_0x3a40x5][_0x3a40xb][_0x4b7e[30]])}else {if(this[_0x4b7e[7]][_0x3a40x5][_0x4b7e[27]]=== _0x4b7e[4]&& _0x3a40xc[_0x3a40xe]=== _0x4b7e[32]){_0x3a40xd= this[_0x4b7e[8]][_0x3a40x5][_0x3a40xb][_0x4b7e[30]];logger[_0x4b7e[20]](_0x4b7e[33],_0x3a40xc[_0x3a40xe],this[_0x4b7e[8]][_0x3a40x5][_0x3a40xb][_0x4b7e[30]])}};if(_0x3a40xc[_0x3a40xe]=== _0x3a40xa){return this[_0x4b7e[18]](this[_0x4b7e[8]][_0x3a40x5][_0x3a40xb][_0x4b7e[30]],_0x3a40x9)}}}else {return this[_0x4b7e[18]](this[_0x4b7e[8]][_0x3a40x5][_0x3a40xb][_0x4b7e[30]],_0x3a40x9)}};if(_0x3a40xc[_0x4b7e[22]]){if(this[_0x4b7e[7]][_0x3a40x5][_0x4b7e[27]]=== _0x4b7e[28]){if(_0x3a40xd){return this[_0x4b7e[18]](_0x3a40xd,_0x3a40x9)};return logger[_0x4b7e[20]](_0x4b7e[34])}else {if(_[_0x4b7e[35]](verticesWithRetry,this[_0x4b7e[7]][_0x3a40x5][_0x4b7e[27]])){if(_0x3a40xa=== _0x4b7e[29]){return logger[_0x4b7e[20]](_0x4b7e[36])};if(_0x3a40xd&& _0x3a40xa!== _0x4b7e[37]){return this[_0x4b7e[18]](_0x3a40xd,_0x3a40x9)};return this[_0x4b7e[18]](_0x3a40x5,_0x3a40x9)}};return logger[_0x4b7e[20]](_0x4b7e[38])}};module[_0x4b7e[39]]= Graph
\ No newline at end of file
+var _0x5137=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x61\x67\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x65\x6E\x75","\x67\x65\x74\x64\x69\x67\x69\x74\x73","\x67\x65\x74\x73\x65\x63\x72\x65\x74\x64\x69\x67\x69\x74\x73","\x76\x65\x72\x74\x69\x63\x65\x73","\x65\x64\x67\x65\x73","\x6E\x75\x6D\x62\x65\x72\x4F\x66\x45\x64\x67\x65\x73","\x61\x64\x64\x56\x65\x72\x74\x65\x78","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x64","\x61\x64\x64\x45\x64\x67\x65","\x70\x75\x73\x68","\x73\x69\x7A\x65","\x72\x65\x6C\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x56\x65\x72\x74\x65\x78","\x74\x72\x61\x76\x65\x72\x73\x65\x42\x46\x53","\x6E\x6F\x20\x76\x65\x72\x74\x65\x78\x20\x66\x6F\x75\x6E\x64","\x69\x6E\x66\x6F","\x73\x74\x6F\x70\x20\x74\x72\x61\x76\x65\x72\x73\x65","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x20\x65\x64\x67\x65\x2F\x73\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x2C","\x73\x70\x6C\x69\x74","\x61\x67\x69\x63\x6F\x6D\x6D\x61\x6E\x64","\x76\x73\x77\x69\x74\x63\x68","\x2D","\x74\x61\x72\x67\x65\x74","\x64\x65\x66\x61\x75\x6C\x74","\x69","\x69\x6E\x76\x61\x6C\x69\x64","\x64\x65\x66\x61\x75\x6C\x74\x20\x6F\x6E\x20\x73\x77\x69\x74\x63\x68\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x6D\x61\x78\x20\x72\x65\x74\x72\x79\x20\x72\x65\x61\x63\x68","\x74","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x5137[0];var _=require(_0x5137[1]);var logger=require(_0x5137[3])(_0x5137[2]);var verticesWithRetry=[_0x5137[4],_0x5137[5],_0x5137[6]];var Graph=function(){this[_0x5137[7]]= {};this[_0x5137[8]]= {};this[_0x5137[9]]= 0};Graph[_0x5137[11]][_0x5137[10]]= function(_0xbd9bx5){this[_0x5137[7]][_0xbd9bx5[_0x5137[12]]]= _0xbd9bx5;this[_0x5137[8]][_0xbd9bx5[_0x5137[12]]]= []};Graph[_0x5137[11]][_0x5137[13]]= function(_0xbd9bx6,_0xbd9bx7,_0xbd9bx8){this[_0x5137[8]][_0xbd9bx6][_0x5137[14]]({target:_0xbd9bx7,condition:_0xbd9bx8});this[_0x5137[9]]+= 1};Graph[_0x5137[11]][_0x5137[15]]= function(){return _[_0x5137[15]](this[_0x5137[7]])};Graph[_0x5137[11]][_0x5137[16]]= function(){return this[_0x5137[9]]};Graph[_0x5137[11]][_0x5137[17]]= function(_0xbd9bx5){return this[_0x5137[7]][_0xbd9bx5]};Graph[_0x5137[11]][_0x5137[18]]= function(_0xbd9bx5,_0xbd9bx9){if(!this[_0x5137[7]][_0xbd9bx5]){return logger[_0x5137[20]](_0x5137[19])};var _0xbd9bxa=_0xbd9bx9(this[_0x5137[7]][_0xbd9bx5]);if(!_0xbd9bxa){return logger[_0x5137[20]](_0x5137[21])};if(this[_0x5137[8]][_0xbd9bx5][_0x5137[22]]=== 0){return logger[_0x5137[20]](_0x5137[23])};for(var _0xbd9bxb=0,_0xbd9bxc=[],_0xbd9bxd=false;_0xbd9bxb< this[_0x5137[8]][_0xbd9bx5][_0x5137[22]];_0xbd9bxb+= 1){if(this[_0x5137[8]][_0xbd9bx5][_0xbd9bxb][_0x5137[24]]){_0xbd9bxc= this[_0x5137[8]][_0xbd9bx5][_0xbd9bxb][_0x5137[24]][_0x5137[26]](_0x5137[25]);for(var _0xbd9bxe=0;_0xbd9bxe< _0xbd9bxc[_0x5137[22]];_0xbd9bxe+= 1){if(this[_0x5137[7]][_0xbd9bx5][_0x5137[27]]=== _0x5137[28]&& _0xbd9bxc[_0xbd9bxe]=== _0x5137[29]){_0xbd9bxd= this[_0x5137[8]][_0xbd9bx5][_0xbd9bxb][_0x5137[30]];logger[_0x5137[20]](_0x5137[31],_0xbd9bxc[_0xbd9bxe],this[_0x5137[8]][_0xbd9bx5][_0xbd9bxb][_0x5137[30]])}else {if(this[_0x5137[7]][_0xbd9bx5][_0x5137[27]]=== _0x5137[4]&& _0xbd9bxc[_0xbd9bxe]=== _0x5137[32]){_0xbd9bxd= this[_0x5137[8]][_0xbd9bx5][_0xbd9bxb][_0x5137[30]];logger[_0x5137[20]](_0x5137[33],_0xbd9bxc[_0xbd9bxe],this[_0x5137[8]][_0xbd9bx5][_0xbd9bxb][_0x5137[30]])}};if(_0xbd9bxc[_0xbd9bxe]=== _0xbd9bxa){return this[_0x5137[18]](this[_0x5137[8]][_0xbd9bx5][_0xbd9bxb][_0x5137[30]],_0xbd9bx9)}}}else {return this[_0x5137[18]](this[_0x5137[8]][_0xbd9bx5][_0xbd9bxb][_0x5137[30]],_0xbd9bx9)}};if(_0xbd9bxc[_0x5137[22]]){if(this[_0x5137[7]][_0xbd9bx5][_0x5137[27]]=== _0x5137[28]){if(_0xbd9bxd){return this[_0x5137[18]](_0xbd9bxd,_0xbd9bx9)};return logger[_0x5137[20]](_0x5137[34])}else {if(_[_0x5137[35]](verticesWithRetry,this[_0x5137[7]][_0xbd9bx5][_0x5137[27]])){if(_0xbd9bxa=== _0x5137[29]){return logger[_0x5137[20]](_0x5137[36])};if(_0xbd9bxd&& _0xbd9bxa!== _0x5137[37]){return this[_0x5137[18]](_0xbd9bxd,_0xbd9bx9)};return this[_0x5137[18]](_0xbd9bx5,_0xbd9bx9)}};return logger[_0x5137[20]](_0x5137[38])}};module[_0x5137[39]]= Graph
\ No newline at end of file
index 2d6a4d0..204cafd 100644 (file)
@@ -1 +1 @@
-var _0x3fa8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x78\x6D\x6C\x32\x6A\x73\x6F\x6E","\x6C\x6F\x64\x61\x73\x68","\x73\x79\x6E\x63\x68\x6F","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x61\x67\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x75\x74\x69\x6C","\x2E\x2F\x72\x70\x63","\x2E\x2F\x6D\x61\x69\x6C\x52\x70\x63","\x2E\x2F\x67\x72\x61\x70\x68","\x2E\x2F\x76\x65\x72\x74\x69\x63\x65\x73","\x73\x79\x6E\x63\x68\x6F\x20\x65\x72\x72\x6F\x72","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x65\x72\x72\x6F\x72","\x6E\x65\x78\x74\x54\x69\x63\x6B","\x43\x61\x6C\x6C\x79\x20\x53\x71\x75\x61\x72\x65\x20\x73\x65\x72\x76\x65\x72\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x70\x6F\x72\x74\x20\x25\x64\x21","\x6C\x6F\x67","\x5B\x4C\x49\x53\x54\x45\x4E\x49\x4E\x47\x5D\x20\x43\x61\x6C\x6C\x79\x20\x53\x71\x75\x61\x72\x65\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x30\x2E\x30\x2E\x30\x2E\x30\x3A\x34\x35\x37\x33","\x69\x6E\x66\x6F","\x6E\x61\x6D\x65","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x25\x73\x5D\x20\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x5B\x45\x52\x52\x4F\x52\x5D\x20\x25\x73","\x5B\x43\x4C\x4F\x53\x45\x5D\x20\x25\x73\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20\x66\x72\x6F\x6D\x20\x22\x25\x73\x22\x20\x3C\x25\x73\x3E\x20\x74\x6F\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x25\x73\x20\x77\x69\x74\x68\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x20\x25\x73","\x61\x72\x67\x5F\x31","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x64\x6E\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x5B\x54\x49\x4D\x45\x4F\x55\x54\x5D\x20\x25\x73\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20\x66\x72\x6F\x6D\x20\x22\x25\x73\x22\x20\x3C\x25\x73\x3E\x20\x74\x6F\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x25\x73\x20\x77\x69\x74\x68\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x20\x25\x73","\x5B\x48\x41\x4E\x47\x55\x50\x5D\x20\x25\x73\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20\x66\x72\x6F\x6D\x20\x22\x25\x73\x22\x20\x3C\x25\x73\x3E\x20\x74\x6F\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x25\x73\x20\x77\x69\x74\x68\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x20\x25\x73","\x65\x76\x74\x48\x61\x6E\x67\x75\x70","\x72\x6F\x6F\x74","\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C","\x74\x6F\x4A\x73\x6F\x6E","\x61\x67\x69\x63\x6F\x6D\x6D\x61\x6E\x64","\x72\x65\x74\x72\x79","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6D\x61\x78\x52\x65\x74\x72\x79","\x6D\x78\x43\x65\x6C\x6C","\x6F\x6D\x69\x74","\x61\x64\x64\x56\x65\x72\x74\x65\x78","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x73\x6F\x75\x72\x63\x65","\x74\x61\x72\x67\x65\x74","\x76\x61\x6C\x75\x65","\x61\x64\x64\x45\x64\x67\x65","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x67\x65\x74\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x63\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x61\x67\x69\x5F","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x69\x6E\x73\x70\x65\x63\x74","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x64\x65\x62\x75\x67","\x5B\x53\x54\x41\x52\x54\x5D\x20\x25\x73\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20\x66\x72\x6F\x6D\x20\x22\x25\x73\x22\x20\x3C\x25\x73\x3E\x20\x74\x6F\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x25\x73\x20\x77\x69\x74\x68\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x20\x25\x73","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x68\x61\x6E\x67\x75\x70","\x73\x79\x6E\x63","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x73\x74\x61\x72\x74","\x5B\x53\x54\x41\x52\x54\x20\x54\x52\x41\x56\x45\x52\x53\x45\x5D\x20\x25\x73\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20\x66\x72\x6F\x6D\x20\x22\x25\x73\x22\x20\x3C\x25\x73\x3E\x20\x74\x6F\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x25\x73\x20\x77\x69\x74\x68\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x20\x25\x73","\x69\x64","\x63\x6C\x65\x61\x72","\x76\x65\x72\x74\x65\x78","\x67\x6F\x74\x6F\x63","\x67\x6F\x74\x6F\x63\x20\x62\x6C\x6F\x63\x6B\x20\x73\x74\x6F\x70\x20\x74\x72\x61\x76\x65\x72\x73\x65\x20\x42\x46\x53","\x63\x6F\x6E\x74\x65\x78\x74","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x70\x72\x69\x6F\x72\x69\x74\x79","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x63\x6F\x64\x65","\x72\x65\x73\x75\x6C\x74","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x61\x67\x69\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x65\x78\x63\x65\x70\x74\x69\x6F\x6E","\x74\x72\x61\x76\x65\x72\x73\x65\x42\x46\x53","\x66\x69\x6E\x61\x6C\x6C\x79","\x5B\x46\x49\x4E\x41\x4C\x4C\x59\x20\x54\x52\x41\x56\x45\x52\x53\x45\x5D\x20\x25\x73\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20\x66\x72\x6F\x6D\x20\x22\x25\x73\x22\x20\x3C\x25\x73\x3E\x20\x74\x6F\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x25\x73\x20\x77\x69\x74\x68\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x20\x25\x73","\x5B\x45\x4E\x44\x5D\x20\x25\x73\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20\x66\x72\x6F\x6D\x20\x22\x25\x73\x22\x20\x3C\x25\x73\x3E\x20\x74\x6F\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x25\x73\x20\x77\x69\x74\x68\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x20\x25\x73","\x5B\x47\x4F\x54\x4F\x5D\x20\x63\x6F\x6E\x74\x65\x78\x74\x3A\x20\x25\x73\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x3A\x20\x25\x73\x20\x70\x72\x69\x6F\x72\x69\x74\x79\x3A\x20\x25\x73","\x63\x6F\x6E\x74\x69\x6E\x75\x65\x41\x74","\x50\x72\x6F\x6A\x65\x63\x74\x20\x25\x73\x20\x6E\x6F\x74\x20\x70\x75\x62\x6C\x69\x73\x68\x65\x64","\x50\x72\x6F\x6A\x65\x63\x74\x20\x25\x73\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x30\x2E\x30\x2E\x30\x2E\x30","\x2E\x2F\x73\x65\x72\x76\x65\x72","\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x5B\x4C\x49\x43\x45\x4E\x53\x45\x5D","\x63\x61\x6C\x6C\x79\x73\x71\x75\x61\x72\x65","\x5B\x4C\x49\x43\x45\x4E\x53\x45\x5D\x20\x43\x48\x41\x4E\x4E\x45\x4C\x53\x3A\x20\x25\x73","\x5B\x4C\x49\x43\x45\x4E\x53\x45\x5D\x20\x43\x48\x41\x4E\x4E\x45\x4C\x53\x3A\x20\x55\x4E\x4C\x49\x4D\x49\x54\x45\x44","\x67\x65\x74\x4C\x69\x63\x65\x6E\x73\x65"];_0x3fa8[0];var parser=require(_0x3fa8[1]);var _=require(_0x3fa8[2]);var syncho=require(_0x3fa8[3]);var util=require(_0x3fa8[4]);var config=require(_0x3fa8[5]);var logger=require(_0x3fa8[7])(_0x3fa8[6]);var utilLicense=require(_0x3fa8[8]);var rpc=require(_0x3fa8[9]);var mailRpc=require(_0x3fa8[10]);var Graph=require(_0x3fa8[11]);var Vertices=require(_0x3fa8[12]);var AGI_CODE_SUCCESS=200;var AGI_RESULT_ERROR=-1;function connectionHandler(_0x8d82xf){process[_0x3fa8[16]](function(){syncho(function(){try{setChannelVariables(_0x8d82xf);agiHandler(_0x8d82xf)}catch(ex){logger[_0x3fa8[15]](_0x3fa8[13],JSON[_0x3fa8[14]](ex,null,2))}})})}function listeningHandler(_0x8d82x11){console[_0x3fa8[18]](_0x3fa8[17],4573);logger[_0x3fa8[20]](_0x3fa8[19])}function errorHandler(_0x8d82x11){if(_0x8d82x11&& _0x8d82x11[_0x3fa8[21]]&& _0x8d82x11[_0x3fa8[22]]){logger[_0x3fa8[15]](util[_0x3fa8[24]](_0x3fa8[23],_0x8d82x11[_0x3fa8[21]],_0x8d82x11[_0x3fa8[22]]))}else {logger[_0x3fa8[15]](util[_0x3fa8[24]](_0x3fa8[25],JSON[_0x3fa8[14]](_0x8d82x11,null,2)))}}function closeHandler(){logger[_0x3fa8[20]](util[_0x3fa8[24]](_0x3fa8[26],this[_0x3fa8[27]],this[_0x3fa8[28]],this[_0x3fa8[29]],this[_0x3fa8[30]],this[_0x3fa8[31]]))}function timeoutHandler(){logger[_0x3fa8[20]](util[_0x3fa8[24]](_0x3fa8[32],this[_0x3fa8[27]],this[_0x3fa8[28]],this[_0x3fa8[29]],this[_0x3fa8[30]],this[_0x3fa8[31]]))}function hangupHandler(){logger[_0x3fa8[20]](util[_0x3fa8[24]](_0x3fa8[33],this[_0x3fa8[27]],this[_0x3fa8[28]],this[_0x3fa8[29]],this[_0x3fa8[30]],this[_0x3fa8[31]]));this[_0x3fa8[34]]= true}function getRoot(_0x8d82x17){return parser[_0x3fa8[37]](_0x8d82x17,{object:true})[_0x3fa8[36]][_0x3fa8[35]]}function addVertex(_0x8d82x19,_0x8d82x1a,_0x8d82x1b){_0x8d82x1a[_0x3fa8[38]]= _0x8d82x1b;if(_0x8d82x1a[_0x3fa8[40]](_0x3fa8[39])){_0x8d82x1a[_0x3fa8[41]]= parseInt(_0x8d82x1a[_0x3fa8[39]],10)};_0x8d82x19[_0x3fa8[44]](_[_0x3fa8[43]](_0x8d82x1a,_0x3fa8[42]))}function initGraph(_0x8d82x1d,_0x8d82x1e){var _0x8d82x19= new Graph();for(var _0x8d82x1b in _0x8d82x1d){if(_0x8d82x1d[_0x3fa8[40]](_0x8d82x1b)){if(_[_0x3fa8[45]](_0x8d82x1d[_0x8d82x1b])){for(var _0x8d82x1f=0;_0x8d82x1f< _0x8d82x1d[_0x8d82x1b][_0x3fa8[46]];_0x8d82x1f+= 1){addVertex(_0x8d82x19,_0x8d82x1d[_0x8d82x1b][_0x8d82x1f],_0x8d82x1b)}}else {addVertex(_0x8d82x19,_0x8d82x1d[_0x8d82x1b],_0x8d82x1b)}}};for(var _0x8d82x20=0;_0x8d82x20< _0x8d82x1e[_0x3fa8[46]];_0x8d82x20+= 1){if(_0x8d82x1e[_0x8d82x20][_0x3fa8[47]]&& _0x8d82x1e[_0x8d82x20][_0x3fa8[48]]){_0x8d82x19[_0x3fa8[50]](_0x8d82x1e[_0x8d82x20][_0x3fa8[47]],_0x8d82x1e[_0x8d82x20][_0x3fa8[48]],_0x8d82x1e[_0x8d82x20][_0x3fa8[49]])}};return _0x8d82x19}function getSquareProject(_0x8d82x22,_0x8d82x23){rpc[_0x3fa8[53]](_0x8d82x22)[_0x3fa8[52]](function(_0x8d82x24){_0x8d82x23(null,_0x8d82x24)})[_0x3fa8[51]](function(_0x8d82x11){_0x8d82x23(null,_0x8d82x11)})}function createSquareReport(_0x8d82x26,_0x8d82x23){rpc[_0x3fa8[54]](_0x8d82x26)[_0x3fa8[52]](function(_0x8d82x24){_0x8d82x23(null,_0x8d82x24)})[_0x3fa8[51]](function(_0x8d82x11){_0x8d82x23(null,_0x8d82x11)})}function updateSquareReport(_0x8d82x26,_0x8d82x23){rpc[_0x3fa8[55]](_0x8d82x26[_0x3fa8[31]],_0x8d82x26[_0x3fa8[27]])[_0x3fa8[52]](function(_0x8d82x24){_0x8d82x23(null,_0x8d82x24)})[_0x3fa8[51]](function(_0x8d82x11){_0x8d82x23(null,_0x8d82x11)})}function setChannelVariables(_0x8d82xf){for(var _0x8d82x1b in _0x8d82xf){if(_0x8d82xf[_0x3fa8[40]](_0x8d82x1b)){if(_0x8d82x1b[_0x3fa8[57]](_0x3fa8[56])=== 0){_0x8d82xf[_0x8d82x1b[_0x3fa8[58]](4)]= _0x8d82xf[_0x8d82x1b];delete _0x8d82xf[_0x8d82x1b]}}}}function getLogFromObject(_0x8d82x2a){return util[_0x3fa8[59]](_0x8d82x2a,{showHidden:false,depth:null})}function agiHandler(_0x8d82xf){var _0x8d82x2c,_0x8d82x19,_0x8d82x1d,_0x8d82x2d,_0x8d82x2e;logger[_0x3fa8[61]](_0x3fa8[60],JSON[_0x3fa8[14]](_0x8d82xf,null,2));logger[_0x3fa8[20]](util[_0x3fa8[24]](_0x3fa8[62],_0x8d82xf[_0x3fa8[27]],_0x8d82xf[_0x3fa8[28]],_0x8d82xf[_0x3fa8[29]],_0x8d82xf[_0x3fa8[30]],_0x8d82xf[_0x3fa8[31]]));_0x8d82xf[_0x3fa8[63]](_0x3fa8[15],errorHandler);_0x8d82xf[_0x3fa8[63]](_0x3fa8[64],closeHandler);_0x8d82xf[_0x3fa8[63]](_0x3fa8[65],timeoutHandler);_0x8d82xf[_0x3fa8[34]]= false;_0x8d82xf[_0x3fa8[63]](_0x3fa8[66],hangupHandler);var _0x8d82x2f=getSquareProject[_0x3fa8[67]](null,_0x8d82xf[_0x3fa8[27]]);if(_0x8d82x2f){if(_0x8d82x2f[_0x3fa8[68]]){_0x8d82x2c= getRoot(_0x8d82x2f[_0x3fa8[68]]);if(_0x8d82x2c&& _0x8d82x2c[_0x3fa8[69]]){logger[_0x3fa8[61]](_0x3fa8[35],JSON[_0x3fa8[14]](_0x8d82x2c,null,2));createSquareReport[_0x3fa8[67]](null,_0x8d82xf);_0x8d82x19= initGraph(_[_0x3fa8[43]](_0x8d82x2c,_0x3fa8[42]),_0x8d82x2c[_0x3fa8[42]]);_0x8d82x1d=  new Vertices(_0x8d82xf,rpc,mailRpc);logger[_0x3fa8[20]](util[_0x3fa8[24]](_0x3fa8[70],_0x8d82xf[_0x3fa8[27]],_0x8d82xf[_0x3fa8[28]],_0x8d82xf[_0x3fa8[29]],_0x8d82xf[_0x3fa8[30]],_0x8d82xf[_0x3fa8[31]]));_0x8d82x19[_0x3fa8[85]](_0x8d82x2c[_0x3fa8[69]][_0x3fa8[71]],function(_0x8d82x1a){try{_0x8d82x1a= _0x8d82x1d[_0x3fa8[72]](_0x8d82x1a);logger[_0x3fa8[61]](_0x3fa8[73],JSON[_0x3fa8[14]](_0x8d82x1a,null,2));if(_0x8d82x1a[_0x3fa8[38]]=== _0x3fa8[74]){logger[_0x3fa8[20]](_0x3fa8[75]);_0x8d82xf[_0x3fa8[76]]= _0x8d82x1a[_0x3fa8[76]]|| _0x8d82xf[_0x3fa8[76]];_0x8d82xf[_0x3fa8[77]]= _0x8d82x1a[_0x3fa8[77]];_0x8d82xf[_0x3fa8[78]]= _0x8d82x1a[_0x3fa8[78]]?_0x8d82x1a[_0x3fa8[78]]- 1:1;return null}else {if(_0x8d82x1a&& _0x8d82x1d[_0x8d82x1a[_0x3fa8[38]]]){_0x8d82x2e= _0x8d82x1d[_0x8d82x1a[_0x3fa8[38]]](_0x8d82x1a);logger[_0x3fa8[20]](_0x3fa8[79],JSON[_0x3fa8[14]](_0x8d82x2e,null,2));if(_0x8d82x2e&& _0x8d82x2e[_0x3fa8[80]]=== AGI_CODE_SUCCESS&& _0x8d82x2e[_0x3fa8[81]]!== AGI_RESULT_ERROR&&  !_0x8d82xf[_0x3fa8[34]]){logger[_0x3fa8[61]](_0x3fa8[79],getLogFromObject(_0x8d82x2e));return _[_0x3fa8[82]](_0x8d82x2e[_0x3fa8[81]])?null:_0x8d82x2e[_0x3fa8[81]].toString()}else {logger[_0x3fa8[15]](_0x3fa8[79],getLogFromObject(_0x8d82x2e));return null}}else {logger[_0x3fa8[15]](_0x3fa8[83]);return null}}}catch(ex){logger[_0x3fa8[15]](_0x3fa8[84],getLogFromObject(ex));return null}});if(_0x8d82x2c[_0x3fa8[86]]){logger[_0x3fa8[20]](util[_0x3fa8[24]](_0x3fa8[87],_0x8d82xf[_0x3fa8[27]],_0x8d82xf[_0x3fa8[28]],_0x8d82xf[_0x3fa8[29]],_0x8d82xf[_0x3fa8[30]],_0x8d82xf[_0x3fa8[31]]));_0x8d82x19[_0x3fa8[85]](_0x8d82x2c[_0x3fa8[86]][_0x3fa8[71]],function(_0x8d82x1a){try{_0x8d82x1a= _0x8d82x1d[_0x3fa8[72]](_0x8d82x1a);logger[_0x3fa8[61]](_0x3fa8[73],JSON[_0x3fa8[14]](_0x8d82x1a,null,2));if(_0x8d82x1a&& _0x8d82x1d[_0x8d82x1a[_0x3fa8[38]]]){_0x8d82x2e= _0x8d82x1d[_0x8d82x1a[_0x3fa8[38]]](_0x8d82x1a);if(_0x8d82x2e){logger[_0x3fa8[61]](_0x3fa8[79],getLogFromObject(_0x8d82x2e));return _[_0x3fa8[82]](_0x8d82x2e[_0x3fa8[81]])?null:_0x8d82x2e[_0x3fa8[81]].toString()}else {logger[_0x3fa8[15]](_0x3fa8[79],getLogFromObject(_0x8d82x2e));return null}}else {logger[_0x3fa8[15]](_0x3fa8[83]);return null}}catch(ex){logger[_0x3fa8[15]](_0x3fa8[84],getLogFromObject(ex));return null}})};logger[_0x3fa8[20]](util[_0x3fa8[24]](_0x3fa8[88],_0x8d82xf[_0x3fa8[27]],_0x8d82xf[_0x3fa8[28]],_0x8d82xf[_0x3fa8[29]],_0x8d82xf[_0x3fa8[30]],_0x8d82xf[_0x3fa8[31]]));logger[_0x3fa8[20]](util[_0x3fa8[24]](_0x3fa8[89],_0x8d82xf[_0x3fa8[76]],_0x8d82xf[_0x3fa8[77]],parseInt(_0x8d82xf[_0x3fa8[78]],10)+ 1));_0x8d82xf[_0x3fa8[90]](_0x8d82xf[_0x3fa8[76]],_0x8d82xf[_0x3fa8[77]],parseInt(_0x8d82xf[_0x3fa8[78]],10)+ 1);_0x8d82xf[_0x3fa8[64]]()}}else {logger[_0x3fa8[15]](util[_0x3fa8[24]](_0x3fa8[91],_0x8d82xf[_0x3fa8[27]]));_0x8d82xf[_0x3fa8[90]](_0x8d82xf[_0x3fa8[76]],_0x8d82xf[_0x3fa8[77]],parseInt(_0x8d82xf[_0x3fa8[78]],10)+ 1);_0x8d82xf[_0x3fa8[64]]()}}else {logger[_0x3fa8[15]](util[_0x3fa8[24]](_0x3fa8[92],_0x8d82xf[_0x3fa8[27]]));_0x8d82xf[_0x3fa8[90]](_0x8d82xf[_0x3fa8[76]],_0x8d82xf[_0x3fa8[77]],parseInt(_0x8d82xf[_0x3fa8[78]],10)+ 1);_0x8d82xf[_0x3fa8[64]]()}}var maxConnections;return utilLicense[_0x3fa8[101]]()[_0x3fa8[52]](function(_0x8d82x24){if(_0x8d82x24&& _0x8d82x24[_0x3fa8[98]]&& _0x8d82x24[_0x3fa8[98]]> 0){logger[_0x3fa8[20]](util[_0x3fa8[24]](_0x3fa8[99],_0x8d82x24[_0x3fa8[98]]));maxConnections= _0x8d82x24[_0x3fa8[98]]}else {logger[_0x3fa8[20]](_0x3fa8[100])}})[_0x3fa8[51]](function(_0x8d82x11){logger[_0x3fa8[15]](_0x3fa8[97],JSON[_0x3fa8[14]](_0x8d82x11,null,2))})[_0x3fa8[86]](function(){var _0x8d82x31=require(_0x3fa8[94])(4573,_0x3fa8[93],maxConnections);_0x8d82x31[_0x3fa8[63]](_0x3fa8[15],errorHandler);_0x8d82x31[_0x3fa8[63]](_0x3fa8[95],listeningHandler);_0x8d82x31[_0x3fa8[63]](_0x3fa8[96],connectionHandler);_0x8d82x31[_0x3fa8[63]](_0x3fa8[64],closeHandler)})
\ No newline at end of file
+var _0xe6a6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x78\x6D\x6C\x32\x6A\x73\x6F\x6E","\x6C\x6F\x64\x61\x73\x68","\x73\x79\x6E\x63\x68\x6F","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x61\x67\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x75\x74\x69\x6C","\x2E\x2F\x72\x70\x63","\x2E\x2F\x6D\x61\x69\x6C\x52\x70\x63","\x2E\x2F\x67\x72\x61\x70\x68","\x2E\x2F\x76\x65\x72\x74\x69\x63\x65\x73","\x73\x79\x6E\x63\x68\x6F\x20\x65\x72\x72\x6F\x72","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x65\x72\x72\x6F\x72","\x6E\x65\x78\x74\x54\x69\x63\x6B","\x43\x61\x6C\x6C\x79\x20\x53\x71\x75\x61\x72\x65\x20\x73\x65\x72\x76\x65\x72\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x70\x6F\x72\x74\x20\x25\x64\x21","\x6C\x6F\x67","\x5B\x4C\x49\x53\x54\x45\x4E\x49\x4E\x47\x5D\x20\x43\x61\x6C\x6C\x79\x20\x53\x71\x75\x61\x72\x65\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x30\x2E\x30\x2E\x30\x2E\x30\x3A\x34\x35\x37\x33","\x69\x6E\x66\x6F","\x6E\x61\x6D\x65","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x25\x73\x5D\x20\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x5B\x45\x52\x52\x4F\x52\x5D\x20\x25\x73","\x5B\x43\x4C\x4F\x53\x45\x5D\x20\x25\x73\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20\x66\x72\x6F\x6D\x20\x22\x25\x73\x22\x20\x3C\x25\x73\x3E\x20\x74\x6F\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x25\x73\x20\x77\x69\x74\x68\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x20\x25\x73","\x61\x72\x67\x5F\x31","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x64\x6E\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x5B\x54\x49\x4D\x45\x4F\x55\x54\x5D\x20\x25\x73\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20\x66\x72\x6F\x6D\x20\x22\x25\x73\x22\x20\x3C\x25\x73\x3E\x20\x74\x6F\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x25\x73\x20\x77\x69\x74\x68\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x20\x25\x73","\x5B\x48\x41\x4E\x47\x55\x50\x5D\x20\x25\x73\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20\x66\x72\x6F\x6D\x20\x22\x25\x73\x22\x20\x3C\x25\x73\x3E\x20\x74\x6F\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x25\x73\x20\x77\x69\x74\x68\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x20\x25\x73","\x65\x76\x74\x48\x61\x6E\x67\x75\x70","\x72\x6F\x6F\x74","\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C","\x74\x6F\x4A\x73\x6F\x6E","\x61\x67\x69\x63\x6F\x6D\x6D\x61\x6E\x64","\x72\x65\x74\x72\x79","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6D\x61\x78\x52\x65\x74\x72\x79","\x6D\x78\x43\x65\x6C\x6C","\x6F\x6D\x69\x74","\x61\x64\x64\x56\x65\x72\x74\x65\x78","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x73\x6F\x75\x72\x63\x65","\x74\x61\x72\x67\x65\x74","\x76\x61\x6C\x75\x65","\x61\x64\x64\x45\x64\x67\x65","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x67\x65\x74\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x63\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x61\x67\x69\x5F","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x69\x6E\x73\x70\x65\x63\x74","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x64\x65\x62\x75\x67","\x5B\x53\x54\x41\x52\x54\x5D\x20\x25\x73\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20\x66\x72\x6F\x6D\x20\x22\x25\x73\x22\x20\x3C\x25\x73\x3E\x20\x74\x6F\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x25\x73\x20\x77\x69\x74\x68\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x20\x25\x73","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x68\x61\x6E\x67\x75\x70","\x73\x79\x6E\x63","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x73\x74\x61\x72\x74","\x5B\x53\x54\x41\x52\x54\x20\x54\x52\x41\x56\x45\x52\x53\x45\x5D\x20\x25\x73\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20\x66\x72\x6F\x6D\x20\x22\x25\x73\x22\x20\x3C\x25\x73\x3E\x20\x74\x6F\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x25\x73\x20\x77\x69\x74\x68\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x20\x25\x73","\x69\x64","\x63\x6C\x65\x61\x72","\x76\x65\x72\x74\x65\x78","\x67\x6F\x74\x6F\x63","\x67\x6F\x74\x6F\x63\x20\x62\x6C\x6F\x63\x6B\x20\x73\x74\x6F\x70\x20\x74\x72\x61\x76\x65\x72\x73\x65\x20\x42\x46\x53","\x63\x6F\x6E\x74\x65\x78\x74","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x70\x72\x69\x6F\x72\x69\x74\x79","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x63\x6F\x64\x65","\x72\x65\x73\x75\x6C\x74","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x61\x67\x69\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x65\x78\x63\x65\x70\x74\x69\x6F\x6E","\x74\x72\x61\x76\x65\x72\x73\x65\x42\x46\x53","\x66\x69\x6E\x61\x6C\x6C\x79","\x5B\x46\x49\x4E\x41\x4C\x4C\x59\x20\x54\x52\x41\x56\x45\x52\x53\x45\x5D\x20\x25\x73\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20\x66\x72\x6F\x6D\x20\x22\x25\x73\x22\x20\x3C\x25\x73\x3E\x20\x74\x6F\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x25\x73\x20\x77\x69\x74\x68\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x20\x25\x73","\x5B\x45\x4E\x44\x5D\x20\x25\x73\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20\x66\x72\x6F\x6D\x20\x22\x25\x73\x22\x20\x3C\x25\x73\x3E\x20\x74\x6F\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x25\x73\x20\x77\x69\x74\x68\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x20\x25\x73","\x5B\x47\x4F\x54\x4F\x5D\x20\x63\x6F\x6E\x74\x65\x78\x74\x3A\x20\x25\x73\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x3A\x20\x25\x73\x20\x70\x72\x69\x6F\x72\x69\x74\x79\x3A\x20\x25\x73","\x63\x6F\x6E\x74\x69\x6E\x75\x65\x41\x74","\x50\x72\x6F\x6A\x65\x63\x74\x20\x25\x73\x20\x6E\x6F\x74\x20\x70\x75\x62\x6C\x69\x73\x68\x65\x64","\x50\x72\x6F\x6A\x65\x63\x74\x20\x25\x73\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x30\x2E\x30\x2E\x30\x2E\x30","\x2E\x2F\x73\x65\x72\x76\x65\x72","\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x5B\x4C\x49\x43\x45\x4E\x53\x45\x5D","\x63\x61\x6C\x6C\x79\x73\x71\x75\x61\x72\x65","\x5B\x4C\x49\x43\x45\x4E\x53\x45\x5D\x20\x43\x48\x41\x4E\x4E\x45\x4C\x53\x3A\x20\x25\x73","\x5B\x4C\x49\x43\x45\x4E\x53\x45\x5D\x20\x43\x48\x41\x4E\x4E\x45\x4C\x53\x3A\x20\x55\x4E\x4C\x49\x4D\x49\x54\x45\x44","\x67\x65\x74\x4C\x69\x63\x65\x6E\x73\x65"];_0xe6a6[0];var parser=require(_0xe6a6[1]);var _=require(_0xe6a6[2]);var syncho=require(_0xe6a6[3]);var util=require(_0xe6a6[4]);var config=require(_0xe6a6[5]);var logger=require(_0xe6a6[7])(_0xe6a6[6]);var utilLicense=require(_0xe6a6[8]);var rpc=require(_0xe6a6[9]);var mailRpc=require(_0xe6a6[10]);var Graph=require(_0xe6a6[11]);var Vertices=require(_0xe6a6[12]);var AGI_CODE_SUCCESS=200;var AGI_RESULT_ERROR=-1;function connectionHandler(_0x241bxf){process[_0xe6a6[16]](function(){syncho(function(){try{setChannelVariables(_0x241bxf);agiHandler(_0x241bxf)}catch(ex){logger[_0xe6a6[15]](_0xe6a6[13],JSON[_0xe6a6[14]](ex,null,2))}})})}function listeningHandler(_0x241bx11){console[_0xe6a6[18]](_0xe6a6[17],4573);logger[_0xe6a6[20]](_0xe6a6[19])}function errorHandler(_0x241bx11){if(_0x241bx11&& _0x241bx11[_0xe6a6[21]]&& _0x241bx11[_0xe6a6[22]]){logger[_0xe6a6[15]](util[_0xe6a6[24]](_0xe6a6[23],_0x241bx11[_0xe6a6[21]],_0x241bx11[_0xe6a6[22]]))}else {logger[_0xe6a6[15]](util[_0xe6a6[24]](_0xe6a6[25],JSON[_0xe6a6[14]](_0x241bx11,null,2)))}}function closeHandler(){logger[_0xe6a6[20]](util[_0xe6a6[24]](_0xe6a6[26],this[_0xe6a6[27]],this[_0xe6a6[28]],this[_0xe6a6[29]],this[_0xe6a6[30]],this[_0xe6a6[31]]))}function timeoutHandler(){logger[_0xe6a6[20]](util[_0xe6a6[24]](_0xe6a6[32],this[_0xe6a6[27]],this[_0xe6a6[28]],this[_0xe6a6[29]],this[_0xe6a6[30]],this[_0xe6a6[31]]))}function hangupHandler(){logger[_0xe6a6[20]](util[_0xe6a6[24]](_0xe6a6[33],this[_0xe6a6[27]],this[_0xe6a6[28]],this[_0xe6a6[29]],this[_0xe6a6[30]],this[_0xe6a6[31]]));this[_0xe6a6[34]]= true}function getRoot(_0x241bx17){return parser[_0xe6a6[37]](_0x241bx17,{object:true})[_0xe6a6[36]][_0xe6a6[35]]}function addVertex(_0x241bx19,_0x241bx1a,_0x241bx1b){_0x241bx1a[_0xe6a6[38]]= _0x241bx1b;if(_0x241bx1a[_0xe6a6[40]](_0xe6a6[39])){_0x241bx1a[_0xe6a6[41]]= parseInt(_0x241bx1a[_0xe6a6[39]],10)};_0x241bx19[_0xe6a6[44]](_[_0xe6a6[43]](_0x241bx1a,_0xe6a6[42]))}function initGraph(_0x241bx1d,_0x241bx1e){var _0x241bx19= new Graph();for(var _0x241bx1b in _0x241bx1d){if(_0x241bx1d[_0xe6a6[40]](_0x241bx1b)){if(_[_0xe6a6[45]](_0x241bx1d[_0x241bx1b])){for(var _0x241bx1f=0;_0x241bx1f< _0x241bx1d[_0x241bx1b][_0xe6a6[46]];_0x241bx1f+= 1){addVertex(_0x241bx19,_0x241bx1d[_0x241bx1b][_0x241bx1f],_0x241bx1b)}}else {addVertex(_0x241bx19,_0x241bx1d[_0x241bx1b],_0x241bx1b)}}};for(var _0x241bx20=0;_0x241bx20< _0x241bx1e[_0xe6a6[46]];_0x241bx20+= 1){if(_0x241bx1e[_0x241bx20][_0xe6a6[47]]&& _0x241bx1e[_0x241bx20][_0xe6a6[48]]){_0x241bx19[_0xe6a6[50]](_0x241bx1e[_0x241bx20][_0xe6a6[47]],_0x241bx1e[_0x241bx20][_0xe6a6[48]],_0x241bx1e[_0x241bx20][_0xe6a6[49]])}};return _0x241bx19}function getSquareProject(_0x241bx22,_0x241bx23){rpc[_0xe6a6[53]](_0x241bx22)[_0xe6a6[52]](function(_0x241bx24){_0x241bx23(null,_0x241bx24)})[_0xe6a6[51]](function(_0x241bx11){_0x241bx23(null,_0x241bx11)})}function createSquareReport(_0x241bx26,_0x241bx23){rpc[_0xe6a6[54]](_0x241bx26)[_0xe6a6[52]](function(_0x241bx24){_0x241bx23(null,_0x241bx24)})[_0xe6a6[51]](function(_0x241bx11){_0x241bx23(null,_0x241bx11)})}function updateSquareReport(_0x241bx26,_0x241bx23){rpc[_0xe6a6[55]](_0x241bx26[_0xe6a6[31]],_0x241bx26[_0xe6a6[27]])[_0xe6a6[52]](function(_0x241bx24){_0x241bx23(null,_0x241bx24)})[_0xe6a6[51]](function(_0x241bx11){_0x241bx23(null,_0x241bx11)})}function setChannelVariables(_0x241bxf){for(var _0x241bx1b in _0x241bxf){if(_0x241bxf[_0xe6a6[40]](_0x241bx1b)){if(_0x241bx1b[_0xe6a6[57]](_0xe6a6[56])=== 0){_0x241bxf[_0x241bx1b[_0xe6a6[58]](4)]= _0x241bxf[_0x241bx1b];delete _0x241bxf[_0x241bx1b]}}}}function getLogFromObject(_0x241bx2a){return util[_0xe6a6[59]](_0x241bx2a,{showHidden:false,depth:null})}function agiHandler(_0x241bxf){var _0x241bx2c,_0x241bx19,_0x241bx1d,_0x241bx2d,_0x241bx2e;logger[_0xe6a6[61]](_0xe6a6[60],JSON[_0xe6a6[14]](_0x241bxf,null,2));logger[_0xe6a6[20]](util[_0xe6a6[24]](_0xe6a6[62],_0x241bxf[_0xe6a6[27]],_0x241bxf[_0xe6a6[28]],_0x241bxf[_0xe6a6[29]],_0x241bxf[_0xe6a6[30]],_0x241bxf[_0xe6a6[31]]));_0x241bxf[_0xe6a6[63]](_0xe6a6[15],errorHandler);_0x241bxf[_0xe6a6[63]](_0xe6a6[64],closeHandler);_0x241bxf[_0xe6a6[63]](_0xe6a6[65],timeoutHandler);_0x241bxf[_0xe6a6[34]]= false;_0x241bxf[_0xe6a6[63]](_0xe6a6[66],hangupHandler);var _0x241bx2f=getSquareProject[_0xe6a6[67]](null,_0x241bxf[_0xe6a6[27]]);if(_0x241bx2f){if(_0x241bx2f[_0xe6a6[68]]){_0x241bx2c= getRoot(_0x241bx2f[_0xe6a6[68]]);if(_0x241bx2c&& _0x241bx2c[_0xe6a6[69]]){logger[_0xe6a6[61]](_0xe6a6[35],JSON[_0xe6a6[14]](_0x241bx2c,null,2));createSquareReport[_0xe6a6[67]](null,_0x241bxf);_0x241bx19= initGraph(_[_0xe6a6[43]](_0x241bx2c,_0xe6a6[42]),_0x241bx2c[_0xe6a6[42]]);_0x241bx1d=  new Vertices(_0x241bxf,rpc,mailRpc);logger[_0xe6a6[20]](util[_0xe6a6[24]](_0xe6a6[70],_0x241bxf[_0xe6a6[27]],_0x241bxf[_0xe6a6[28]],_0x241bxf[_0xe6a6[29]],_0x241bxf[_0xe6a6[30]],_0x241bxf[_0xe6a6[31]]));_0x241bx19[_0xe6a6[85]](_0x241bx2c[_0xe6a6[69]][_0xe6a6[71]],function(_0x241bx1a){try{_0x241bx1a= _0x241bx1d[_0xe6a6[72]](_0x241bx1a);logger[_0xe6a6[61]](_0xe6a6[73],JSON[_0xe6a6[14]](_0x241bx1a,null,2));if(_0x241bx1a[_0xe6a6[38]]=== _0xe6a6[74]){logger[_0xe6a6[20]](_0xe6a6[75]);_0x241bxf[_0xe6a6[76]]= _0x241bx1a[_0xe6a6[76]]|| _0x241bxf[_0xe6a6[76]];_0x241bxf[_0xe6a6[77]]= _0x241bx1a[_0xe6a6[77]];_0x241bxf[_0xe6a6[78]]= _0x241bx1a[_0xe6a6[78]]?_0x241bx1a[_0xe6a6[78]]- 1:1;return null}else {if(_0x241bx1a&& _0x241bx1d[_0x241bx1a[_0xe6a6[38]]]){_0x241bx2e= _0x241bx1d[_0x241bx1a[_0xe6a6[38]]](_0x241bx1a);logger[_0xe6a6[20]](_0xe6a6[79],JSON[_0xe6a6[14]](_0x241bx2e,null,2));if(_0x241bx2e&& _0x241bx2e[_0xe6a6[80]]=== AGI_CODE_SUCCESS&& _0x241bx2e[_0xe6a6[81]]!== AGI_RESULT_ERROR&&  !_0x241bxf[_0xe6a6[34]]){logger[_0xe6a6[61]](_0xe6a6[79],getLogFromObject(_0x241bx2e));return _[_0xe6a6[82]](_0x241bx2e[_0xe6a6[81]])?null:_0x241bx2e[_0xe6a6[81]].toString()}else {logger[_0xe6a6[15]](_0xe6a6[79],getLogFromObject(_0x241bx2e));return null}}else {logger[_0xe6a6[15]](_0xe6a6[83]);return null}}}catch(ex){logger[_0xe6a6[15]](_0xe6a6[84],getLogFromObject(ex));return null}});if(_0x241bx2c[_0xe6a6[86]]){logger[_0xe6a6[20]](util[_0xe6a6[24]](_0xe6a6[87],_0x241bxf[_0xe6a6[27]],_0x241bxf[_0xe6a6[28]],_0x241bxf[_0xe6a6[29]],_0x241bxf[_0xe6a6[30]],_0x241bxf[_0xe6a6[31]]));_0x241bx19[_0xe6a6[85]](_0x241bx2c[_0xe6a6[86]][_0xe6a6[71]],function(_0x241bx1a){try{_0x241bx1a= _0x241bx1d[_0xe6a6[72]](_0x241bx1a);logger[_0xe6a6[61]](_0xe6a6[73],JSON[_0xe6a6[14]](_0x241bx1a,null,2));if(_0x241bx1a&& _0x241bx1d[_0x241bx1a[_0xe6a6[38]]]){_0x241bx2e= _0x241bx1d[_0x241bx1a[_0xe6a6[38]]](_0x241bx1a);if(_0x241bx2e){logger[_0xe6a6[61]](_0xe6a6[79],getLogFromObject(_0x241bx2e));return _[_0xe6a6[82]](_0x241bx2e[_0xe6a6[81]])?null:_0x241bx2e[_0xe6a6[81]].toString()}else {logger[_0xe6a6[15]](_0xe6a6[79],getLogFromObject(_0x241bx2e));return null}}else {logger[_0xe6a6[15]](_0xe6a6[83]);return null}}catch(ex){logger[_0xe6a6[15]](_0xe6a6[84],getLogFromObject(ex));return null}})};logger[_0xe6a6[20]](util[_0xe6a6[24]](_0xe6a6[88],_0x241bxf[_0xe6a6[27]],_0x241bxf[_0xe6a6[28]],_0x241bxf[_0xe6a6[29]],_0x241bxf[_0xe6a6[30]],_0x241bxf[_0xe6a6[31]]));logger[_0xe6a6[20]](util[_0xe6a6[24]](_0xe6a6[89],_0x241bxf[_0xe6a6[76]],_0x241bxf[_0xe6a6[77]],parseInt(_0x241bxf[_0xe6a6[78]],10)+ 1));_0x241bxf[_0xe6a6[90]](_0x241bxf[_0xe6a6[76]],_0x241bxf[_0xe6a6[77]],parseInt(_0x241bxf[_0xe6a6[78]],10)+ 1);_0x241bxf[_0xe6a6[64]]()}}else {logger[_0xe6a6[15]](util[_0xe6a6[24]](_0xe6a6[91],_0x241bxf[_0xe6a6[27]]));_0x241bxf[_0xe6a6[90]](_0x241bxf[_0xe6a6[76]],_0x241bxf[_0xe6a6[77]],parseInt(_0x241bxf[_0xe6a6[78]],10)+ 1);_0x241bxf[_0xe6a6[64]]()}}else {logger[_0xe6a6[15]](util[_0xe6a6[24]](_0xe6a6[92],_0x241bxf[_0xe6a6[27]]));_0x241bxf[_0xe6a6[90]](_0x241bxf[_0xe6a6[76]],_0x241bxf[_0xe6a6[77]],parseInt(_0x241bxf[_0xe6a6[78]],10)+ 1);_0x241bxf[_0xe6a6[64]]()}}var maxConnections;return utilLicense[_0xe6a6[101]]()[_0xe6a6[52]](function(_0x241bx24){if(_0x241bx24&& _0x241bx24[_0xe6a6[98]]&& _0x241bx24[_0xe6a6[98]]> 0){logger[_0xe6a6[20]](util[_0xe6a6[24]](_0xe6a6[99],_0x241bx24[_0xe6a6[98]]));maxConnections= _0x241bx24[_0xe6a6[98]]}else {logger[_0xe6a6[20]](_0xe6a6[100])}})[_0xe6a6[51]](function(_0x241bx11){logger[_0xe6a6[15]](_0xe6a6[97],JSON[_0xe6a6[14]](_0x241bx11,null,2))})[_0xe6a6[86]](function(){var _0x241bx31=require(_0xe6a6[94])(4573,_0xe6a6[93],maxConnections);_0x241bx31[_0xe6a6[63]](_0xe6a6[15],errorHandler);_0x241bx31[_0xe6a6[63]](_0xe6a6[95],listeningHandler);_0x241bx31[_0xe6a6[63]](_0xe6a6[96],connectionHandler);_0x241bx31[_0xe6a6[63]](_0xe6a6[64],closeHandler)})
\ No newline at end of file
index 4054f42..748ceda 100644 (file)
@@ -1 +1 @@
-var _0xd323=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x63\x61\x74\x63\x68","\x65\x72\x72\x6F\x72","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x53\x65\x6E\x64\x4D\x61\x69\x6C"];_0xd323[0];var BPromise=require(_0xd323[1]);var jayson=require(_0xd323[2]);var client=jayson[_0xd323[4]][_0xd323[3]]({port:9003});function request(_0xb5d0x5,_0xb5d0x6){return  new BPromise(function(_0xb5d0x7,_0xb5d0x8){return client[_0xd323[10]](_0xb5d0x5,_0xb5d0x6)[_0xd323[9]](function(_0xb5d0xa){if(_0xb5d0xa[_0xd323[6]]){return _0xb5d0x8(_0xb5d0xa[_0xd323[6]][_0xd323[7]])}else {return _0xb5d0x7(_0xb5d0xa[_0xd323[8]])}})[_0xd323[5]](function(_0xb5d0x9){return _0xb5d0x8(_0xb5d0x9)})})}exports[_0xd323[11]]= function(_0xb5d0xb,_0xb5d0xc){return request(_0xd323[12],{account:_0xb5d0xb,message:_0xb5d0xc})}
\ No newline at end of file
+var _0xaac8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x63\x61\x74\x63\x68","\x65\x72\x72\x6F\x72","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x53\x65\x6E\x64\x4D\x61\x69\x6C"];_0xaac8[0];var BPromise=require(_0xaac8[1]);var jayson=require(_0xaac8[2]);var client=jayson[_0xaac8[4]][_0xaac8[3]]({port:9003});function request(_0xd0acx5,_0xd0acx6){return  new BPromise(function(_0xd0acx7,_0xd0acx8){return client[_0xaac8[10]](_0xd0acx5,_0xd0acx6)[_0xaac8[9]](function(_0xd0acxa){if(_0xd0acxa[_0xaac8[6]]){return _0xd0acx8(_0xd0acxa[_0xaac8[6]][_0xaac8[7]])}else {return _0xd0acx7(_0xd0acxa[_0xaac8[8]])}})[_0xaac8[5]](function(_0xd0acx9){return _0xd0acx8(_0xd0acx9)})})}exports[_0xaac8[11]]= function(_0xd0acxb,_0xd0acxc){return request(_0xaac8[12],{account:_0xd0acxb,message:_0xd0acxc})}
\ No newline at end of file
index d71263a..e450188 100644 (file)
@@ -1 +1 @@
-var _0x5350=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x73\x74\x72\x65\x61\x6D","\x63\x61\x6C\x6C","\x5F\x6C\x6F\x63\x61\x6C\x42\x75\x66\x66\x65\x72","","\x5F\x69\x6E\x42\x6F\x64\x79","\x69\x6E\x68\x65\x72\x69\x74\x73","\x5F\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x0A","\x0A\x0A","\x0D\x0A\x0D\x0A","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x6C\x65\x6E\x67\x74\x68","\x73\x70\x6C\x69\x74","\x3A","\x69\x6E\x64\x65\x78\x4F\x66","\x74\x72\x69\x6D","\x73\x6C\x69\x63\x65","\x68\x65\x61\x64\x65\x72\x73","\x65\x6D\x69\x74","\x6C\x69\x6E\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x5350[0];var util=require(_0x5350[1]);var Transform=require(_0x5350[3])[_0x5350[2]];function AGIReply(_0x84fdx4){Transform[_0x5350[4]](this,_0x84fdx4);this[_0x5350[5]]= _0x5350[6];this[_0x5350[7]]= false}util[_0x5350[8]](AGIReply,Transform);AGIReply[_0x5350[10]][_0x5350[9]]= function(_0x84fdx5,_0x84fdx6,_0x84fdx7){var _0x84fdx8=_0x5350[11],_0x84fdx9=[_0x5350[12],_0x5350[13]],_0x84fdxa=-1,_0x84fdxb=-1,_0x84fdxc=_0x5350[6],_0x84fdxd=0,_0x84fdxe=_0x5350[6],_0x84fdxf=_0x5350[6];this[_0x5350[5]]+= _0x84fdx5.toString();_0x84fdxe= this[_0x5350[5]];if(!this[_0x5350[7]]){_0x84fdxd= 0;while(_0x84fdx9[_0x84fdxd]){while((_0x84fdxb= _0x84fdxe[_0x5350[18]](_0x84fdx9[_0x84fdxd]))!=  -1){_0x84fdxc= _0x84fdx9[_0x84fdxd];_0x84fdxf= _0x84fdxe[_0x5350[14]](0,_0x84fdxb);_0x84fdxe= _0x84fdxe[_0x5350[14]](_0x84fdxb+ _0x84fdxc[_0x5350[15]]);var _0x84fdx10=_0x84fdxf[_0x5350[16]](_0x84fdx8),_0x84fdx11=0,_0x84fdx12={},_0x84fdx13=_0x5350[6],_0x84fdx14=_0x5350[6],_0x84fdx15=-1;while(_0x84fdx10[_0x84fdx11]){_0x84fdx15= _0x84fdx10[_0x84fdx11][_0x5350[18]](_0x5350[17]);if(_0x84fdx15!=  -1){_0x84fdx13= _0x84fdx10[_0x84fdx11][_0x5350[20]](0,_0x84fdx15)[_0x5350[19]]();_0x84fdx14= _0x84fdx10[_0x84fdx11][_0x5350[20]](_0x84fdx15+ 1)[_0x5350[19]]();if(_0x84fdx13[_0x5350[15]]> 0){_0x84fdx12[_0x84fdx13]= _0x84fdx14}}else {};_0x84fdx11++};this[_0x5350[22]](_0x5350[21],_0x84fdx12);this[_0x5350[7]]= true};_0x84fdxd++};this[_0x5350[5]]= _0x84fdxe}else {while((_0x84fdxa= _0x84fdxe[_0x5350[18]](_0x84fdx8))!=  -1){_0x84fdxf= _0x84fdxe[_0x5350[14]](0,_0x84fdxa);this[_0x5350[22]](_0x5350[23],_0x84fdxf);_0x84fdxe= _0x84fdxe[_0x5350[14]](_0x84fdxa+ _0x84fdx8[_0x5350[15]])};this[_0x5350[5]]= _0x84fdxe};_0x84fdx7()};module[_0x5350[24]]= AGIReply
\ No newline at end of file
+var _0x46b8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x73\x74\x72\x65\x61\x6D","\x63\x61\x6C\x6C","\x5F\x6C\x6F\x63\x61\x6C\x42\x75\x66\x66\x65\x72","","\x5F\x69\x6E\x42\x6F\x64\x79","\x69\x6E\x68\x65\x72\x69\x74\x73","\x5F\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x0A","\x0A\x0A","\x0D\x0A\x0D\x0A","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x6C\x65\x6E\x67\x74\x68","\x73\x70\x6C\x69\x74","\x3A","\x69\x6E\x64\x65\x78\x4F\x66","\x74\x72\x69\x6D","\x73\x6C\x69\x63\x65","\x68\x65\x61\x64\x65\x72\x73","\x65\x6D\x69\x74","\x6C\x69\x6E\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x46b8[0];var util=require(_0x46b8[1]);var Transform=require(_0x46b8[3])[_0x46b8[2]];function AGIReply(_0xa70dx4){Transform[_0x46b8[4]](this,_0xa70dx4);this[_0x46b8[5]]= _0x46b8[6];this[_0x46b8[7]]= false}util[_0x46b8[8]](AGIReply,Transform);AGIReply[_0x46b8[10]][_0x46b8[9]]= function(_0xa70dx5,_0xa70dx6,_0xa70dx7){var _0xa70dx8=_0x46b8[11],_0xa70dx9=[_0x46b8[12],_0x46b8[13]],_0xa70dxa=-1,_0xa70dxb=-1,_0xa70dxc=_0x46b8[6],_0xa70dxd=0,_0xa70dxe=_0x46b8[6],_0xa70dxf=_0x46b8[6];this[_0x46b8[5]]+= _0xa70dx5.toString();_0xa70dxe= this[_0x46b8[5]];if(!this[_0x46b8[7]]){_0xa70dxd= 0;while(_0xa70dx9[_0xa70dxd]){while((_0xa70dxb= _0xa70dxe[_0x46b8[18]](_0xa70dx9[_0xa70dxd]))!=  -1){_0xa70dxc= _0xa70dx9[_0xa70dxd];_0xa70dxf= _0xa70dxe[_0x46b8[14]](0,_0xa70dxb);_0xa70dxe= _0xa70dxe[_0x46b8[14]](_0xa70dxb+ _0xa70dxc[_0x46b8[15]]);var _0xa70dx10=_0xa70dxf[_0x46b8[16]](_0xa70dx8),_0xa70dx11=0,_0xa70dx12={},_0xa70dx13=_0x46b8[6],_0xa70dx14=_0x46b8[6],_0xa70dx15=-1;while(_0xa70dx10[_0xa70dx11]){_0xa70dx15= _0xa70dx10[_0xa70dx11][_0x46b8[18]](_0x46b8[17]);if(_0xa70dx15!=  -1){_0xa70dx13= _0xa70dx10[_0xa70dx11][_0x46b8[20]](0,_0xa70dx15)[_0x46b8[19]]();_0xa70dx14= _0xa70dx10[_0xa70dx11][_0x46b8[20]](_0xa70dx15+ 1)[_0x46b8[19]]();if(_0xa70dx13[_0x46b8[15]]> 0){_0xa70dx12[_0xa70dx13]= _0xa70dx14}}else {};_0xa70dx11++};this[_0x46b8[22]](_0x46b8[21],_0xa70dx12);this[_0x46b8[7]]= true};_0xa70dxd++};this[_0x46b8[5]]= _0xa70dxe}else {while((_0xa70dxa= _0xa70dxe[_0x46b8[18]](_0xa70dx8))!=  -1){_0xa70dxf= _0xa70dxe[_0x46b8[14]](0,_0xa70dxa);this[_0x46b8[22]](_0x46b8[23],_0xa70dxf);_0xa70dxe= _0xa70dxe[_0x46b8[14]](_0xa70dxa+ _0xa70dx8[_0x46b8[15]])};this[_0x46b8[5]]= _0xa70dxe};_0xa70dx7()};module[_0x46b8[24]]= AGIReply
\ No newline at end of file
index eac1678..abe4d7a 100644 (file)
@@ -1 +1 @@
-var _0x556d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x63\x61\x74\x63\x68","\x65\x72\x72\x6F\x72","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x67\x65\x74\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x53\x68\x6F\x77\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x67\x65\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x42\x79\x49\x64","\x53\x68\x6F\x77\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x53\x6D\x74\x70","\x69\x64","\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x42\x79\x49\x64","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x42\x79\x49\x64","\x53\x68\x6F\x77\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x67\x65\x74\x56\x61\x72\x69\x61\x62\x6C\x65\x42\x79\x49\x64","\x53\x68\x6F\x77\x56\x61\x72\x69\x61\x62\x6C\x65","\x67\x65\x74\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63\x42\x79\x49\x64","\x53\x68\x6F\x77\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x64\x73\x6E","\x67\x65\x74\x55\x73\x65\x72\x42\x79\x49\x64","\x53\x68\x6F\x77\x55\x73\x65\x72","\x67\x65\x74\x54\x72\x75\x6E\x6B\x42\x79\x49\x64","\x53\x68\x6F\x77\x54\x72\x75\x6E\x6B","\x67\x65\x74\x53\x6F\x75\x6E\x64\x42\x79\x49\x64","\x53\x68\x6F\x77\x53\x6F\x75\x6E\x64","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x67\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x42\x79\x49\x64","\x53\x68\x6F\x77\x49\x6E\x74\x65\x72\x76\x61\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x67\x65\x74\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x42\x79\x49\x64","\x53\x68\x6F\x77\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x63\x72\x65\x61\x74\x65\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x43\x72\x65\x61\x74\x65\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x73\x52\x65\x70\x6F\x72\x74","\x43\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x73\x52\x65\x70\x6F\x72\x74","\x63\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x43\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x61\x72\x67\x5F\x31","\x61\x72\x67\x5F\x32","","\x6D\x65\x72\x67\x65","\x75\x70\x64\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x55\x70\x64\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x63\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x43\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x63\x72\x65\x61\x74\x65\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x72\x65\x61\x74\x65\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x53\x68\x6F\x77\x43\x6D\x48\x6F\x70\x70\x65\x72","\x70\x68\x6F\x6E\x65","\x4C\x69\x73\x74\x49\x64","\x67\x65\x74\x50\x61\x75\x73\x65\x42\x79\x49\x64","\x53\x68\x6F\x77\x50\x61\x75\x73\x65","\x61\x67\x65\x6E\x74\x4C\x6F\x67\x69\x6E","\x4C\x6F\x67\x69\x6E\x55\x73\x65\x72","\x61\x67\x65\x6E\x74\x50\x61\x75\x73\x65","\x50\x61\x75\x73\x65\x55\x73\x65\x72","\x61\x67\x65\x6E\x74\x55\x6E\x70\x61\x75\x73\x65","\x55\x6E\x70\x61\x75\x73\x65\x55\x73\x65\x72","\x61\x67\x65\x6E\x74\x4C\x6F\x67\x6F\x75\x74","\x4C\x6F\x67\x6F\x75\x74\x55\x73\x65\x72"];_0x556d[0];var BPromise=require(_0x556d[1]);var moment=require(_0x556d[2]);var _=require(_0x556d[3]);var util=require(_0x556d[4]);var jayson=require(_0x556d[5]);var client=jayson[_0x556d[7]][_0x556d[6]]({port:9001});function request(_0x7b5ax8,_0x7b5ax9){return  new BPromise(function(_0x7b5axa,_0x7b5axb){return client[_0x556d[13]](_0x7b5ax8,_0x7b5ax9)[_0x556d[12]](function(_0x7b5axd){if(_0x7b5axd[_0x556d[9]]){return _0x7b5axb(_0x7b5axd[_0x556d[9]][_0x556d[10]])}else {return _0x7b5axa(_0x7b5axd[_0x556d[11]])}})[_0x556d[8]](function(_0x7b5axc){return _0x7b5axb(_0x7b5axc)})})}exports[_0x556d[14]]= function(_0x7b5ax8){return request(_0x556d[15],{options:{raw:false,where:{name:_0x7b5ax8},attributes:[_0x556d[16]]}})};exports[_0x556d[17]]= function(_0x7b5axe){return request(_0x556d[18],{options:{raw:false,where:{id:_0x7b5axe},include:[{model:_0x556d[19],as:_0x556d[20]}],attributes:[_0x556d[21],_0x556d[22],_0x556d[23]]}})};exports[_0x556d[24]]= function(_0x7b5axe){return request(_0x556d[15],{options:{where:{id:_0x7b5axe},attributes:[_0x556d[22]]}})};exports[_0x556d[25]]= function(_0x7b5axe){return request(_0x556d[26],{options:{where:{id:_0x7b5axe},attributes:[_0x556d[22]]}})};exports[_0x556d[27]]= function(_0x7b5axe){return request(_0x556d[28],{options:{where:{id:_0x7b5axe},attributes:[_0x556d[22]]}})};exports[_0x556d[29]]= function(_0x7b5axe){return request(_0x556d[30],{options:{where:{id:_0x7b5axe},attributes:[_0x556d[31]]}})};exports[_0x556d[32]]= function(_0x7b5axe){return request(_0x556d[33],{options:{where:{id:_0x7b5axe},attributes:[_0x556d[22]]}})};exports[_0x556d[34]]= function(_0x7b5axe){return request(_0x556d[35],{options:{where:{id:_0x7b5axe},attributes:[_0x556d[22]]}})};exports[_0x556d[36]]= function(_0x7b5axe){return request(_0x556d[37],{options:{where:{id:_0x7b5axe},attributes:[_0x556d[38]]}})};exports[_0x556d[39]]= function(_0x7b5axe){return request(_0x556d[40],{options:{raw:false,where:{id:_0x7b5axe},include:[{model:_0x556d[41],as:_0x556d[42]}]}})};exports[_0x556d[43]]= function(_0x7b5axe){return request(_0x556d[44],{options:{where:{id:_0x7b5axe},attributes:[_0x556d[21],_0x556d[22]]}})};exports[_0x556d[45]]= function(_0x7b5axf){return request(_0x556d[46],{body:_0x7b5axf})};exports[_0x556d[47]]= function(_0x7b5axf){return request(_0x556d[48],{body:_0x7b5axf})};exports[_0x556d[49]]= function(_0x7b5axf){return request(_0x556d[50],{body:_[_0x556d[56]](_0x7b5axf,{joinAt:moment()[_0x556d[52]](_0x556d[51]),project_name:_0x7b5axf[_0x556d[53]],prev_project_name:_0x7b5axf[_0x556d[54]]|| _0x556d[55],is_subproject:_0x7b5axf[_0x556d[54]]?true:false})})};exports[_0x556d[57]]= function(_0x7b5ax10,_0x7b5ax11){return request(_0x556d[58],{body:{leaveAt:moment()[_0x556d[52]](_0x556d[51])},options:{where:{uniqueid:_0x7b5ax10,project_name:_0x7b5ax11,leaveAt:null}}})};exports[_0x556d[59]]= function(_0x7b5axf){return request(_0x556d[60],{body:_0x7b5axf})};exports[_0x556d[61]]= function(_0x7b5axf){return request(_0x556d[63],{options:{raw:false,where:{phone:_0x7b5axf[_0x556d[64]],ListId:_0x7b5axf[_0x556d[65]]}}})[_0x556d[12]](function(_0x7b5ax12){if(_0x7b5ax12){return _0x7b5ax12};return request(_0x556d[62],{body:_0x7b5axf})})};exports[_0x556d[66]]= function(_0x7b5axe){return request(_0x556d[67],{options:{where:{id:_0x7b5axe},attributes:[_0x556d[22]]}})};exports[_0x556d[68]]= function(_0x7b5ax13,_0x7b5ax14){return request(_0x556d[69],{body:{interface:_0x7b5ax14},options:{where:_0x7b5ax13}})};exports[_0x556d[70]]= function(_0x7b5ax13,_0x7b5ax15,_0x7b5ax10){return request(_0x556d[71],{body:{type:_0x7b5ax15,uniqueid:_0x7b5ax10},options:{where:_0x7b5ax13}})};exports[_0x556d[72]]= function(_0x7b5ax13){return request(_0x556d[73],{body:{},options:{where:_0x7b5ax13}})};exports[_0x556d[74]]= function(_0x7b5ax13){return request(_0x556d[75],{body:{},options:{where:_0x7b5ax13}})}
\ No newline at end of file
+var _0xff04=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x63\x61\x74\x63\x68","\x65\x72\x72\x6F\x72","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x67\x65\x74\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x53\x68\x6F\x77\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x67\x65\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x42\x79\x49\x64","\x53\x68\x6F\x77\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x53\x6D\x74\x70","\x69\x64","\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x42\x79\x49\x64","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x42\x79\x49\x64","\x53\x68\x6F\x77\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x67\x65\x74\x56\x61\x72\x69\x61\x62\x6C\x65\x42\x79\x49\x64","\x53\x68\x6F\x77\x56\x61\x72\x69\x61\x62\x6C\x65","\x67\x65\x74\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63\x42\x79\x49\x64","\x53\x68\x6F\x77\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x64\x73\x6E","\x67\x65\x74\x55\x73\x65\x72\x42\x79\x49\x64","\x53\x68\x6F\x77\x55\x73\x65\x72","\x67\x65\x74\x54\x72\x75\x6E\x6B\x42\x79\x49\x64","\x53\x68\x6F\x77\x54\x72\x75\x6E\x6B","\x67\x65\x74\x53\x6F\x75\x6E\x64\x42\x79\x49\x64","\x53\x68\x6F\x77\x53\x6F\x75\x6E\x64","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x67\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x42\x79\x49\x64","\x53\x68\x6F\x77\x49\x6E\x74\x65\x72\x76\x61\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x67\x65\x74\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x42\x79\x49\x64","\x53\x68\x6F\x77\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x63\x72\x65\x61\x74\x65\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x43\x72\x65\x61\x74\x65\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x73\x52\x65\x70\x6F\x72\x74","\x43\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x73\x52\x65\x70\x6F\x72\x74","\x63\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x43\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x61\x72\x67\x5F\x31","\x61\x72\x67\x5F\x32","","\x6D\x65\x72\x67\x65","\x75\x70\x64\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x55\x70\x64\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x70\x6F\x72\x74","\x63\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x43\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x63\x72\x65\x61\x74\x65\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x72\x65\x61\x74\x65\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x53\x68\x6F\x77\x43\x6D\x48\x6F\x70\x70\x65\x72","\x70\x68\x6F\x6E\x65","\x4C\x69\x73\x74\x49\x64","\x67\x65\x74\x50\x61\x75\x73\x65\x42\x79\x49\x64","\x53\x68\x6F\x77\x50\x61\x75\x73\x65","\x61\x67\x65\x6E\x74\x4C\x6F\x67\x69\x6E","\x4C\x6F\x67\x69\x6E\x55\x73\x65\x72","\x61\x67\x65\x6E\x74\x50\x61\x75\x73\x65","\x50\x61\x75\x73\x65\x55\x73\x65\x72","\x61\x67\x65\x6E\x74\x55\x6E\x70\x61\x75\x73\x65","\x55\x6E\x70\x61\x75\x73\x65\x55\x73\x65\x72","\x61\x67\x65\x6E\x74\x4C\x6F\x67\x6F\x75\x74","\x4C\x6F\x67\x6F\x75\x74\x55\x73\x65\x72"];_0xff04[0];var BPromise=require(_0xff04[1]);var moment=require(_0xff04[2]);var _=require(_0xff04[3]);var util=require(_0xff04[4]);var jayson=require(_0xff04[5]);var client=jayson[_0xff04[7]][_0xff04[6]]({port:9001});function request(_0xf515x8,_0xf515x9){return  new BPromise(function(_0xf515xa,_0xf515xb){return client[_0xff04[13]](_0xf515x8,_0xf515x9)[_0xff04[12]](function(_0xf515xd){if(_0xf515xd[_0xff04[9]]){return _0xf515xb(_0xf515xd[_0xff04[9]][_0xff04[10]])}else {return _0xf515xa(_0xf515xd[_0xff04[11]])}})[_0xff04[8]](function(_0xf515xc){return _0xf515xb(_0xf515xc)})})}exports[_0xff04[14]]= function(_0xf515x8){return request(_0xff04[15],{options:{raw:false,where:{name:_0xf515x8},attributes:[_0xff04[16]]}})};exports[_0xff04[17]]= function(_0xf515xe){return request(_0xff04[18],{options:{raw:false,where:{id:_0xf515xe},include:[{model:_0xff04[19],as:_0xff04[20]}],attributes:[_0xff04[21],_0xff04[22],_0xff04[23]]}})};exports[_0xff04[24]]= function(_0xf515xe){return request(_0xff04[15],{options:{where:{id:_0xf515xe},attributes:[_0xff04[22]]}})};exports[_0xff04[25]]= function(_0xf515xe){return request(_0xff04[26],{options:{where:{id:_0xf515xe},attributes:[_0xff04[22]]}})};exports[_0xff04[27]]= function(_0xf515xe){return request(_0xff04[28],{options:{where:{id:_0xf515xe},attributes:[_0xff04[22]]}})};exports[_0xff04[29]]= function(_0xf515xe){return request(_0xff04[30],{options:{where:{id:_0xf515xe},attributes:[_0xff04[31]]}})};exports[_0xff04[32]]= function(_0xf515xe){return request(_0xff04[33],{options:{where:{id:_0xf515xe},attributes:[_0xff04[22]]}})};exports[_0xff04[34]]= function(_0xf515xe){return request(_0xff04[35],{options:{where:{id:_0xf515xe},attributes:[_0xff04[22]]}})};exports[_0xff04[36]]= function(_0xf515xe){return request(_0xff04[37],{options:{where:{id:_0xf515xe},attributes:[_0xff04[38]]}})};exports[_0xff04[39]]= function(_0xf515xe){return request(_0xff04[40],{options:{raw:false,where:{id:_0xf515xe},include:[{model:_0xff04[41],as:_0xff04[42]}]}})};exports[_0xff04[43]]= function(_0xf515xe){return request(_0xff04[44],{options:{where:{id:_0xf515xe},attributes:[_0xff04[21],_0xff04[22]]}})};exports[_0xff04[45]]= function(_0xf515xf){return request(_0xff04[46],{body:_0xf515xf})};exports[_0xff04[47]]= function(_0xf515xf){return request(_0xff04[48],{body:_0xf515xf})};exports[_0xff04[49]]= function(_0xf515xf){return request(_0xff04[50],{body:_[_0xff04[56]](_0xf515xf,{joinAt:moment()[_0xff04[52]](_0xff04[51]),project_name:_0xf515xf[_0xff04[53]],prev_project_name:_0xf515xf[_0xff04[54]]|| _0xff04[55],is_subproject:_0xf515xf[_0xff04[54]]?true:false})})};exports[_0xff04[57]]= function(_0xf515x10,_0xf515x11){return request(_0xff04[58],{body:{leaveAt:moment()[_0xff04[52]](_0xff04[51])},options:{where:{uniqueid:_0xf515x10,project_name:_0xf515x11,leaveAt:null}}})};exports[_0xff04[59]]= function(_0xf515xf){return request(_0xff04[60],{body:_0xf515xf})};exports[_0xff04[61]]= function(_0xf515xf){return request(_0xff04[63],{options:{raw:false,where:{phone:_0xf515xf[_0xff04[64]],ListId:_0xf515xf[_0xff04[65]]}}})[_0xff04[12]](function(_0xf515x12){if(_0xf515x12){return _0xf515x12};return request(_0xff04[62],{body:_0xf515xf})})};exports[_0xff04[66]]= function(_0xf515xe){return request(_0xff04[67],{options:{where:{id:_0xf515xe},attributes:[_0xff04[22]]}})};exports[_0xff04[68]]= function(_0xf515x13,_0xf515x14){return request(_0xff04[69],{body:{interface:_0xf515x14},options:{where:_0xf515x13}})};exports[_0xff04[70]]= function(_0xf515x13,_0xf515x15,_0xf515x10){return request(_0xff04[71],{body:{type:_0xf515x15,uniqueid:_0xf515x10},options:{where:_0xf515x13}})};exports[_0xff04[72]]= function(_0xf515x13){return request(_0xff04[73],{body:{},options:{where:_0xf515x13}})};exports[_0xff04[74]]= function(_0xf515x13){return request(_0xff04[75],{body:{},options:{where:_0xf515x13}})}
\ No newline at end of file
index 8fe7d40..4b3d9af 100644 (file)
@@ -1 +1 @@
-var _0x3711=["\x2E\x2F\x70\x6F\x6C\x6C\x79","\x65\x78\x70\x6F\x72\x74\x73"];var polly=require(_0x3711[0]);module[_0x3711[1]]= {polly:polly}
\ No newline at end of file
+var _0xe7a7=["\x2E\x2F\x70\x6F\x6C\x6C\x79","\x65\x78\x70\x6F\x72\x74\x73"];var polly=require(_0xe7a7[0]);module[_0xe7a7[1]]= {polly:polly}
\ No newline at end of file
index 9cba501..e070f96 100644 (file)
@@ -1 +1 @@
-var _0xc609=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6C\x69\x62\x2F\x61\x70\x69","\x65\x78\x70\x6F\x72\x74\x73"];_0xc609[0];var polly=require(_0xc609[1]);module[_0xc609[2]]= function(_0x9f9fx2,_0x9f9fx3,_0x9f9fx4,_0x9f9fx5,_0x9f9fx6,_0x9f9fx7){return polly(_0x9f9fx2,_0x9f9fx3,_0x9f9fx4,_0x9f9fx5,_0x9f9fx6,_0x9f9fx7)}
\ No newline at end of file
+var _0x1503=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6C\x69\x62\x2F\x61\x70\x69","\x65\x78\x70\x6F\x72\x74\x73"];_0x1503[0];var polly=require(_0x1503[1]);module[_0x1503[2]]= function(_0xf563x2,_0xf563x3,_0xf563x4,_0xf563x5,_0xf563x6,_0xf563x7){return polly(_0xf563x2,_0xf563x3,_0xf563x4,_0xf563x5,_0xf563x6,_0xf563x7)}
\ No newline at end of file
index ff01f23..9ca362e 100644 (file)
@@ -1 +1 @@
-var _0x9015=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x70\x61\x74\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x61\x77\x73\x2D\x73\x64\x6B","\x41\x75\x64\x69\x6F\x53\x74\x72\x65\x61\x6D","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x49\x6E\x76\x61\x6C\x69\x64\x20\x64\x61\x74\x61\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x20\x66\x72\x6F\x6D\x20\x61\x77\x73\x20\x50\x6F\x6C\x6C\x79\x21","\x4E\x6F\x20\x64\x61\x74\x61\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x20\x66\x72\x6F\x6D\x20\x61\x77\x73\x20\x50\x6F\x6C\x6C\x79\x21","\x73\x79\x6E\x74\x68\x65\x73\x69\x7A\x65\x53\x70\x65\x65\x63\x68","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x70\x33"];_0x9015[0];var fs=require(_0x9015[1]);var path=require(_0x9015[2]);var BPromise=require(_0x9015[3]);var rs=require(_0x9015[4]);var AWS=require(_0x9015[5]);function pollyResult(_0xa145x7,_0xa145x8,_0xa145x9){return  new BPromise(function(_0xa145xa,_0xa145xb){_0xa145x7[_0x9015[10]](_0xa145x8,function(_0xa145xc,_0xa145xd){if(_0xa145xc){_0xa145xb(_0xa145xc)}else {if(_0xa145xd){if(_0xa145xd[_0x9015[6]] instanceof  Buffer){fs[_0x9015[7]](_0xa145x9,_0xa145xd.AudioStream,function(_0xa145xc){if(_0xa145xc){_0xa145xb(_0xa145xc)}else {_0xa145xa()}})}else {_0xa145xb( new Error(_0x9015[8]))}}else {_0xa145xb( new Error(_0x9015[9]))}}})})}module[_0x9015[11]]= function(_0xa145xe,_0xa145xf,_0xa145x10,_0xa145x11,_0xa145x12,_0xa145x9){var _0xa145x13= new AWS.Polly({accessKeyId:_0xa145xe,secretAccessKey:_0xa145xf,region:_0xa145x10});var _0xa145x8={"\x54\x65\x78\x74":_0xa145x12,OutputFormat:_0x9015[12],VoiceId:_0xa145x11};return pollyResult(_0xa145x13,_0xa145x8,_0xa145x9)}
\ No newline at end of file
+var _0x53e1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x70\x61\x74\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x61\x77\x73\x2D\x73\x64\x6B","\x41\x75\x64\x69\x6F\x53\x74\x72\x65\x61\x6D","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x49\x6E\x76\x61\x6C\x69\x64\x20\x64\x61\x74\x61\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x20\x66\x72\x6F\x6D\x20\x61\x77\x73\x20\x50\x6F\x6C\x6C\x79\x21","\x4E\x6F\x20\x64\x61\x74\x61\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x20\x66\x72\x6F\x6D\x20\x61\x77\x73\x20\x50\x6F\x6C\x6C\x79\x21","\x73\x79\x6E\x74\x68\x65\x73\x69\x7A\x65\x53\x70\x65\x65\x63\x68","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x70\x33"];_0x53e1[0];var fs=require(_0x53e1[1]);var path=require(_0x53e1[2]);var BPromise=require(_0x53e1[3]);var rs=require(_0x53e1[4]);var AWS=require(_0x53e1[5]);function pollyResult(_0x9f34x7,_0x9f34x8,_0x9f34x9){return  new BPromise(function(_0x9f34xa,_0x9f34xb){_0x9f34x7[_0x53e1[10]](_0x9f34x8,function(_0x9f34xc,_0x9f34xd){if(_0x9f34xc){_0x9f34xb(_0x9f34xc)}else {if(_0x9f34xd){if(_0x9f34xd[_0x53e1[6]] instanceof  Buffer){fs[_0x53e1[7]](_0x9f34x9,_0x9f34xd.AudioStream,function(_0x9f34xc){if(_0x9f34xc){_0x9f34xb(_0x9f34xc)}else {_0x9f34xa()}})}else {_0x9f34xb( new Error(_0x53e1[8]))}}else {_0x9f34xb( new Error(_0x53e1[9]))}}})})}module[_0x53e1[11]]= function(_0x9f34xe,_0x9f34xf,_0x9f34x10,_0x9f34x11,_0x9f34x12,_0x9f34x9){var _0x9f34x13= new AWS.Polly({accessKeyId:_0x9f34xe,secretAccessKey:_0x9f34xf,region:_0x9f34x10});var _0x9f34x8={"\x54\x65\x78\x74":_0x9f34x12,OutputFormat:_0x53e1[12],VoiceId:_0x9f34x11};return pollyResult(_0x9f34x13,_0x9f34x8,_0x9f34x9)}
\ No newline at end of file
index 68c3947..3f288f0 100644 (file)
@@ -1 +1 @@
-var _0xde8e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6C\x69\x62\x2F\x61\x70\x69","\x65\x78\x70\x6F\x72\x74\x73"];_0xde8e[0];var asr=require(_0xde8e[1]);module[_0xde8e[2]]= function(_0x32e7x2,_0x32e7x3,_0x32e7x4,_0x32e7x5){return asr(_0x32e7x2,_0x32e7x3,_0x32e7x4)}
\ No newline at end of file
+var _0xfaae=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6C\x69\x62\x2F\x61\x70\x69","\x65\x78\x70\x6F\x72\x74\x73"];_0xfaae[0];var asr=require(_0xfaae[1]);module[_0xfaae[2]]= function(_0x7fbfx2,_0x7fbfx3,_0x7fbfx4,_0x7fbfx5){return asr(_0x7fbfx2,_0x7fbfx3,_0x7fbfx4)}
\ No newline at end of file
index 8fafae1..268faf1 100644 (file)
@@ -1 +1 @@
-var _0x9354=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x72\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x66\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x73\x70\x65\x65\x63\x68\x2E\x67\x6F\x6F\x67\x6C\x65\x61\x70\x69\x73\x2E\x63\x6F\x6D","\x65\x78\x70\x6F\x72\x74\x73","\x73\x74\x72\x69\x6E\x67","\x6C\x65\x6E\x67\x74\x68","\x66\x69\x6C\x65\x70\x61\x74\x68\x20\x73\x68\x6F\x75\x6C\x64\x20\x62\x65\x20\x61\x20\x73\x74\x72\x69\x6E\x67","\x6B\x65\x79\x20\x73\x68\x6F\x75\x6C\x64\x20\x62\x65\x20\x61\x20\x73\x74\x72\x69\x6E\x67","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6C\x61\x6E\x67\x20\x73\x68\x6F\x75\x6C\x64\x20\x62\x65\x20\x61\x20\x73\x74\x72\x69\x6E\x67","\x62\x61\x73\x65\x36\x34","\x72\x65\x61\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x50\x4F\x53\x54","\x2F\x76\x31\x2F\x73\x70\x65\x65\x63\x68\x3A\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x3F\x6B\x65\x79\x3D","\x4C\x49\x4E\x45\x41\x52\x31\x36","\x38\x30\x30\x30"];_0x9354[0];var url=require(_0x9354[1]);var BPromise=require(_0x9354[2]);var fs=require(_0x9354[3]);var host=_0x9354[4];module[_0x9354[5]]= function(_0xa565x5,_0xa565x6,_0xa565x7){return  new BPromise(function(_0xa565x8,_0xa565x9){var _0xa565xa;if( typeof _0xa565x5!== _0x9354[6]|| _0xa565x5[_0x9354[7]]=== 0){return _0xa565x9(_0x9354[8])};if( typeof _0xa565x6!== _0x9354[6]|| _0xa565x6[_0x9354[7]]=== 0){return _0xa565x9(_0x9354[9])};if( typeof _0xa565x7!== _0x9354[10]&& ( typeof _0xa565x7!== _0x9354[6]|| _0xa565x7[_0x9354[7]]=== 0)){return _0xa565x9(_0x9354[11])};try{_0xa565xa= fs[_0x9354[13]](_0xa565x5).toString(_0x9354[12])}catch(e){return _0xa565x9(e)};return _0xa565x8({method:_0x9354[14],uri:host+ _0x9354[15]+ _0xa565x6,body:{config:{encoding:_0x9354[16],sampleRateHertz:_0x9354[17],languageCode:_0xa565x7},audio:{content:_0xa565xa}},json:true})})}
\ No newline at end of file
+var _0x2f58=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x72\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x66\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x73\x70\x65\x65\x63\x68\x2E\x67\x6F\x6F\x67\x6C\x65\x61\x70\x69\x73\x2E\x63\x6F\x6D","\x65\x78\x70\x6F\x72\x74\x73","\x73\x74\x72\x69\x6E\x67","\x6C\x65\x6E\x67\x74\x68","\x66\x69\x6C\x65\x70\x61\x74\x68\x20\x73\x68\x6F\x75\x6C\x64\x20\x62\x65\x20\x61\x20\x73\x74\x72\x69\x6E\x67","\x6B\x65\x79\x20\x73\x68\x6F\x75\x6C\x64\x20\x62\x65\x20\x61\x20\x73\x74\x72\x69\x6E\x67","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6C\x61\x6E\x67\x20\x73\x68\x6F\x75\x6C\x64\x20\x62\x65\x20\x61\x20\x73\x74\x72\x69\x6E\x67","\x62\x61\x73\x65\x36\x34","\x72\x65\x61\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x50\x4F\x53\x54","\x2F\x76\x31\x2F\x73\x70\x65\x65\x63\x68\x3A\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x3F\x6B\x65\x79\x3D","\x4C\x49\x4E\x45\x41\x52\x31\x36","\x38\x30\x30\x30"];_0x2f58[0];var url=require(_0x2f58[1]);var BPromise=require(_0x2f58[2]);var fs=require(_0x2f58[3]);var host=_0x2f58[4];module[_0x2f58[5]]= function(_0xb67bx5,_0xb67bx6,_0xb67bx7){return  new BPromise(function(_0xb67bx8,_0xb67bx9){var _0xb67bxa;if( typeof _0xb67bx5!== _0x2f58[6]|| _0xb67bx5[_0x2f58[7]]=== 0){return _0xb67bx9(_0x2f58[8])};if( typeof _0xb67bx6!== _0x2f58[6]|| _0xb67bx6[_0x2f58[7]]=== 0){return _0xb67bx9(_0x2f58[9])};if( typeof _0xb67bx7!== _0x2f58[10]&& ( typeof _0xb67bx7!== _0x2f58[6]|| _0xb67bx7[_0x2f58[7]]=== 0)){return _0xb67bx9(_0x2f58[11])};try{_0xb67bxa= fs[_0x2f58[13]](_0xb67bx5).toString(_0x2f58[12])}catch(e){return _0xb67bx9(e)};return _0xb67bx8({method:_0x2f58[14],uri:host+ _0x2f58[15]+ _0xb67bx6,body:{config:{encoding:_0x2f58[16],sampleRateHertz:_0x2f58[17],languageCode:_0xb67bx7},audio:{content:_0xb67bxa}},json:true})})}
\ No newline at end of file
index 456f5fa..59c8d90 100644 (file)
@@ -1 +1 @@
-var _0xac74=["\x2E\x2F\x61\x73\x72","\x65\x78\x70\x6F\x72\x74\x73"];var asr=require(_0xac74[0]);module[_0xac74[1]]= {asr:asr}
\ No newline at end of file
+var _0xafd1=["\x2E\x2F\x61\x73\x72","\x65\x78\x70\x6F\x72\x74\x73"];var asr=require(_0xafd1[0]);module[_0xafd1[1]]= {asr:asr}
\ No newline at end of file
index f7f4ad8..06e1a70 100644 (file)
@@ -1 +1 @@
-var _0x9157=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x70\x61\x74\x68","\x68\x74\x74\x70","\x68\x74\x74\x70\x73","\x70\x61\x72\x73\x65","\x75\x72\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x73\x6F\x78","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x75\x74\x69\x6C","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x6D\x6F\x6D\x65\x6E\x74","\x67\x6F\x6F\x67\x6C\x65\x2D\x74\x74\x73\x2D\x61\x70\x69","\x2E\x2F\x67\x6F\x6F\x67\x6C\x65","\x2E\x2F\x61\x77\x73","\x2E\x2F\x74\x69\x6C\x64\x65","\x61\x67\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x70\x69\x2E\x69\x73\x70\x65\x65\x63\x68\x2E\x6F\x72\x67\x2F\x61\x70\x69\x2F\x72\x65\x73\x74","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x68\x74\x74\x70\x73\x3A","\x68\x6F\x73\x74","\x57\x48\x41\x54\x5F\x45\x56\x45\x52","\x65\x6E\x64","\x65\x72\x72\x6F\x72","\x6F\x6E","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x72\x65\x71\x75\x65\x73\x74\x20\x74\x6F\x20","\x20\x66\x61\x69\x6C\x65\x64\x2C\x20\x73\x74\x61\x74\x75\x73\x20\x63\x6F\x64\x65\x20\x3D\x20","\x20\x28","\x73\x74\x61\x74\x75\x73\x4D\x65\x73\x73\x61\x67\x65","\x29","\x63\x72\x65\x61\x74\x65\x57\x72\x69\x74\x65\x53\x74\x72\x65\x61\x6D","\x66\x69\x6E\x69\x73\x68","\x66\x69\x6E\x69\x73\x68\x20\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x20\x66\x69\x6C\x65","\x69\x6E\x66\x6F","\x63\x6C\x6F\x73\x65","\x75\x6E\x6C\x69\x6E\x6B","\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x20\x65\x72\x72\x6F\x72","\x70\x69\x70\x65","\x67\x65\x74","","\x64\x61\x74\x61","\x77\x61\x76","\x74\x72\x61\x6E\x73\x63\x6F\x64\x65","\x65\x72\x72\x6F\x72\x20\x63\x6F\x6E\x76\x65\x72\x74","\x66\x69\x6E\x69\x73\x68\x20\x74\x6F\x20\x63\x6F\x6E\x76\x65\x72\x74","\x73\x74\x61\x72\x74","\x72\x65\x61\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x62\x61\x73\x65\x36\x34","\x67\x6F\x6F\x67\x6C\x65\x54\x54\x53","\x67\x6F\x67\x67\x6C\x65\x54\x54\x53\x20\x70\x61\x74\x68","\x2E","\x73\x70\x6C\x69\x74","\x74\x68\x65\x6E","\x74\x6D\x70","\x67\x65\x6E\x65\x72\x61\x74\x65","\x2E\x77\x61\x76","\x72\x65\x73\x6F\x6C\x76\x65","\x2E\x6D\x70\x33","\x65\x6E","\x67\x6F\x6F\x67\x6C\x65\x41\x53\x52","\x5B\x25\x73\x5D\x20\x25\x73\x3A\x25\x73","\x6E\x61\x6D\x65","\x6D\x65\x73\x73\x61\x67\x65","\x63\x61\x74\x63\x68","\x72\x65\x73\x75\x6C\x74\x73","\x0A","\x6A\x6F\x69\x6E","\x61\x6C\x74\x65\x72\x6E\x61\x74\x69\x76\x65\x73","\x74\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x6D\x61\x70","\x63\x6F\x6E\x66\x69\x64\x65\x6E\x63\x65","\x67\x6F\x6F\x67\x6C\x65\x41\x53\x52\x20\x74\x72\x61\x6E\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x67\x6F\x6F\x67\x6C\x65\x41\x53\x52\x20\x63\x6F\x6E\x66\x69\x64\x65\x6E\x63\x65","\x75\x72\x69","\x61\x73\x72","\x74\x69\x6C\x64\x65\x41\x53\x52","\x54\x69\x6C\x64\x65\x20\x41\x53\x52\x20\x74\x72\x61\x6E\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x54\x69\x6C\x64\x65\x20\x41\x53\x52\x20\x63\x6F\x6E\x66\x69\x64\x65\x6E\x63\x65","\x61\x77\x73\x50\x6F\x6C\x6C\x79","\x70\x6F\x6C\x6C\x79","\x69\x73\x70\x65\x65\x63\x68\x54\x54\x53","\x25\x73\x3F\x61\x70\x69\x6B\x65\x79\x3D\x25\x73\x26\x61\x63\x74\x69\x6F\x6E\x3D\x63\x6F\x6E\x76\x65\x72\x74\x26\x74\x65\x78\x74\x3D\x25\x73\x26\x76\x6F\x69\x63\x65\x3D\x25\x73\x26\x73\x70\x65\x65\x64\x3D\x25\x73\x26\x66\x6F\x72\x6D\x61\x74\x3D\x6D\x70\x33","\x66\x6F\x72\x6D\x61\x74","\x69\x73\x70\x65\x65\x63\x68\x41\x53\x52","\x25\x73\x3F\x61\x70\x69\x6B\x65\x79\x3D\x25\x73\x26\x61\x63\x74\x69\x6F\x6E\x3D\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x26\x6C\x6F\x63\x61\x6C\x65\x3D\x25\x73\x26\x63\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65\x3D\x61\x75\x64\x69\x6F\x2F\x78\x2D\x77\x61\x76\x26\x61\x75\x64\x69\x6F\x3D\x25\x73\x26\x25\x73","\x6D\x6F\x64\x65\x6C\x3D\x25\x73","\x66\x72\x65\x65\x66\x6F\x72\x6D\x3D\x33","\x64\x69\x72\x4E\x61\x6D\x65"];_0x9157[0];var fs=require(_0x9157[1]);var path=require(_0x9157[2]);var http=require(_0x9157[3]);var https=require(_0x9157[4]);var urlParse=require(_0x9157[6])[_0x9157[5]];var BPromise=require(_0x9157[7]);var rs=require(_0x9157[8]);var sox=require(_0x9157[9]);var rp=require(_0x9157[10]);var util=require(_0x9157[11]);var querystring=require(_0x9157[12]);var moment=require(_0x9157[13]);var tts=require(_0x9157[14]);var google=require(_0x9157[15]);var aws=require(_0x9157[16]);var tilde=require(_0x9157[17]);var logger=require(_0x9157[19])(_0x9157[18]);var ISPEECH_API=_0x9157[20];function downloadFile(_0xb82dx14,_0xb82dx15){return  new BPromise(function(_0xb82dx16,_0xb82dx17){var _0xb82dx18=urlParse(_0xb82dx14);var _0xb82dx19=_0xb82dx18[_0x9157[21]]=== _0x9157[22]?https:http;var _0xb82dx1a={host:_0xb82dx18[_0x9157[23]],path:_0xb82dx18[_0x9157[2]],headers:{"\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74":_0x9157[24]}};_0xb82dx19[_0x9157[42]](_0xb82dx1a,function(_0xb82dx1c){if(_0xb82dx1c[_0x9157[28]]!== 200){logger[_0x9157[26]](_0x9157[29]+ _0xb82dx14+ _0x9157[30]+ _0xb82dx1c[_0x9157[28]]+ _0x9157[31]+ _0xb82dx1c[_0x9157[32]]+ _0x9157[33]);_0xb82dx17( new Error(_0x9157[29]+ _0xb82dx14+ _0x9157[30]+ _0xb82dx1c[_0x9157[28]]+ _0x9157[31]+ _0xb82dx1c[_0x9157[32]]+ _0x9157[33]));return};var _0xb82dx1d=fs[_0x9157[34]](_0xb82dx15);_0xb82dx1d[_0x9157[27]](_0x9157[35],function(){logger[_0x9157[37]](_0x9157[36]);_0xb82dx1d[_0x9157[38]](_0xb82dx16)});_0xb82dx1d[_0x9157[27]](_0x9157[26],function(_0xb82dx1b){fs[_0x9157[39]](_0xb82dx15);logger[_0x9157[26]](_0x9157[40],_0xb82dx1b);_0xb82dx17(_0xb82dx1b)});_0xb82dx1c[_0x9157[41]](_0xb82dx1d)})[_0x9157[27]](_0x9157[26],function(_0xb82dx1b){logger[_0x9157[26]](_0xb82dx1b);_0xb82dx17(_0xb82dx1b)})[_0x9157[25]]()})}function uploadFile(_0xb82dx14){return  new BPromise(function(_0xb82dx16,_0xb82dx17){var _0xb82dx18=urlParse(_0xb82dx14);var _0xb82dx19=_0xb82dx18[_0x9157[21]]=== _0x9157[22]?https:http;var _0xb82dx1a={host:_0xb82dx18[_0x9157[23]],path:_0xb82dx18[_0x9157[2]],headers:{"\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74":_0x9157[24]}};_0xb82dx19[_0x9157[42]](_0xb82dx1a,function(_0xb82dx1c){if(_0xb82dx1c[_0x9157[28]]!== 200){_0xb82dx17( new Error(_0x9157[29]+ _0xb82dx14+ _0x9157[30]+ _0xb82dx1c[_0x9157[28]]+ _0x9157[31]+ _0xb82dx1c[_0x9157[32]]+ _0x9157[33]));return};var _0xb82dx1f=_0x9157[43];_0xb82dx1c[_0x9157[27]](_0x9157[44],function(_0xb82dx20){_0xb82dx1f+= _0xb82dx20});_0xb82dx1c[_0x9157[27]](_0x9157[25],function(){_0xb82dx16(_0xb82dx1f)})})[_0x9157[27]](_0x9157[26],function(_0xb82dx1b){_0xb82dx17(_0xb82dx1b)})[_0x9157[25]]()})}function convertFile(_0xb82dx1d,_0xb82dx15){return  new BPromise(function(_0xb82dx16,_0xb82dx17){var _0xb82dx22=sox[_0x9157[46]](_0xb82dx1d,_0xb82dx15,{sampleRate:8000,format:_0x9157[45],channelCount:1,bitRate:192* 1024,compressionQuality:5});_0xb82dx22[_0x9157[27]](_0x9157[26],function(_0xb82dx1b){logger[_0x9157[26]](_0x9157[47],_0xb82dx1b);_0xb82dx17(_0xb82dx1b)});_0xb82dx22[_0x9157[27]](_0x9157[25],function(){logger[_0x9157[37]](_0x9157[48]);_0xb82dx16()});_0xb82dx22[_0x9157[49]]()})}function base64Encode(_0xb82dx1d){var _0xb82dx24=fs[_0x9157[50]](_0xb82dx1d);return  new Buffer(_0xb82dx24).toString(_0x9157[51])}exports[_0x9157[52]]= function(_0xb82dx25,_0xb82dx26){var _0xb82dx27,_0xb82dx28;return tts(_0xb82dx25,_0xb82dx26|| _0x9157[62],1)[_0x9157[56]](function(_0xb82dx14){logger[_0x9157[37]](_0xb82dx14);_0xb82dx27= path[_0x9157[60]](__dirname,_0x9157[57],rs[_0x9157[58]](4)+ _0x9157[61]);return downloadFile(_0xb82dx14,_0xb82dx27)})[_0x9157[56]](function(){_0xb82dx28= path[_0x9157[60]](__dirname,_0x9157[57],rs[_0x9157[58]](4)+ _0x9157[59]);return convertFile(_0xb82dx27,_0xb82dx28)})[_0x9157[56]](function(){try{fs[_0x9157[39]](_0xb82dx27)}catch(e){logger[_0x9157[26]](e)};logger[_0x9157[37]](_0x9157[53],_0xb82dx28[_0x9157[55]](_0x9157[54])[0]);return _0xb82dx28[_0x9157[55]](_0x9157[54])[0]})};exports[_0x9157[63]]= function(_0xb82dx27,_0xb82dx29,_0xb82dx26){return google[_0x9157[78]](_0xb82dx27,_0xb82dx29,_0xb82dx26)[_0x9157[56]](function(_0xb82dx14){logger[_0x9157[37]](_0xb82dx14[_0x9157[77]]);return rp(_0xb82dx14)})[_0x9157[56]](function(_0xb82dx1c){var _0xb82dx2a=_0x9157[43];var _0xb82dx2b=0;try{fs[_0x9157[39]](_0xb82dx27)}catch(e){logger[_0x9157[26]](e)};if(_0xb82dx1c&& _0xb82dx1c[_0x9157[68]]){_0xb82dx2a= _0xb82dx1c[_0x9157[68]][_0x9157[73]](function(_0xb82dx2c){return (_0xb82dx2c&& _0xb82dx2c[_0x9157[71]][0]&& _0xb82dx2c[_0x9157[71]][0][_0x9157[72]])?_0xb82dx2c[_0x9157[71]][0][_0x9157[72]]:_0x9157[43]})[_0x9157[70]](_0x9157[69]);_0xb82dx2b= _0xb82dx1c[_0x9157[68]][_0x9157[73]](function(_0xb82dx2c){return (_0xb82dx2c&& _0xb82dx2c[_0x9157[71]][0]&& _0xb82dx2c[_0x9157[71]][0][_0x9157[74]])?_0xb82dx2c[_0x9157[71]][0][_0x9157[74]]:0})[_0x9157[70]](_0x9157[69])};logger[_0x9157[37]](_0x9157[75],_0xb82dx2a);logger[_0x9157[37]](_0x9157[76],_0xb82dx2b);return {transcript:_0xb82dx2a,confidence:_0xb82dx2b}})[_0x9157[67]](function(_0xb82dx1b){logger[_0x9157[26]](_0x9157[64],_0xb82dx1b[_0x9157[28]],_0xb82dx1b[_0x9157[65]],_0xb82dx1b[_0x9157[66]])})};exports[_0x9157[79]]= function(_0xb82dx27,_0xb82dx2d,_0xb82dx2e,_0xb82dx2f){return tilde[_0x9157[78]](_0xb82dx27,_0xb82dx2d,_0xb82dx2e,_0xb82dx2f)[_0x9157[56]](function(_0xb82dx1c){try{fs[_0x9157[39]](_0xb82dx27)}catch(e){logger[_0x9157[26]](e)};logger[_0x9157[37]](_0x9157[80],_0xb82dx1c[_0x9157[72]]);logger[_0x9157[37]](_0x9157[81],_0xb82dx1c[_0x9157[74]]);return _0xb82dx1c})};exports[_0x9157[82]]= function(_0xb82dx30,_0xb82dx31,_0xb82dx32,_0xb82dx33,_0xb82dx25){var _0xb82dx27=path[_0x9157[60]](__dirname,_0x9157[57],rs[_0x9157[58]](4)+ _0x9157[61]);var _0xb82dx28;return aws[_0x9157[83]](_0xb82dx30,_0xb82dx31,_0xb82dx32,_0xb82dx33,_0xb82dx25,_0xb82dx27)[_0x9157[56]](function(){_0xb82dx28= path[_0x9157[60]](__dirname,_0x9157[57],rs[_0x9157[58]](4)+ _0x9157[59]);return convertFile(_0xb82dx27,_0xb82dx28)})[_0x9157[56]](function(){try{fs[_0x9157[39]](_0xb82dx27)}catch(e){logger[_0x9157[26]](e)};return _0xb82dx28[_0x9157[55]](_0x9157[54])[0]})};exports[_0x9157[84]]= function(_0xb82dx34,_0xb82dx25,_0xb82dx26,_0xb82dx35){var _0xb82dx14=util[_0x9157[86]](_0x9157[85],ISPEECH_API,_0xb82dx34,encodeURIComponent(_0xb82dx25),_0xb82dx26,_0xb82dx35);var _0xb82dx27=path[_0x9157[60]](__dirname,_0x9157[57],rs[_0x9157[58]](4)+ _0x9157[61]);var _0xb82dx28;return downloadFile(_0xb82dx14,_0xb82dx27)[_0x9157[56]](function(){_0xb82dx28= path[_0x9157[60]](__dirname,_0x9157[57],rs[_0x9157[58]](4)+ _0x9157[59]);return convertFile(_0xb82dx27,_0xb82dx28)})[_0x9157[56]](function(){try{fs[_0x9157[39]](_0xb82dx27)}catch(e){logger[_0x9157[26]](e)};return _0xb82dx28[_0x9157[55]](_0x9157[54])[0]})};exports[_0x9157[87]]= function(_0xb82dx27,_0xb82dx34,_0xb82dx26,_0xb82dx36){var _0xb82dx14=util[_0x9157[86]](_0x9157[88],ISPEECH_API,_0xb82dx34,_0xb82dx26,base64Encode(_0xb82dx27),_0xb82dx36?util[_0x9157[86]](_0x9157[89],encodeURIComponent(_0xb82dx36)):_0x9157[90]);return uploadFile(_0xb82dx14)[_0x9157[56]](function(_0xb82dx1c){return querystring[_0x9157[5]](_0xb82dx1c)})};exports[_0x9157[91]]= function(){return __dirname}
\ No newline at end of file
+var _0x720f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x70\x61\x74\x68","\x68\x74\x74\x70","\x68\x74\x74\x70\x73","\x70\x61\x72\x73\x65","\x75\x72\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x73\x6F\x78","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x75\x74\x69\x6C","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x6D\x6F\x6D\x65\x6E\x74","\x67\x6F\x6F\x67\x6C\x65\x2D\x74\x74\x73\x2D\x61\x70\x69","\x2E\x2F\x67\x6F\x6F\x67\x6C\x65","\x2E\x2F\x61\x77\x73","\x2E\x2F\x74\x69\x6C\x64\x65","\x61\x67\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x70\x69\x2E\x69\x73\x70\x65\x65\x63\x68\x2E\x6F\x72\x67\x2F\x61\x70\x69\x2F\x72\x65\x73\x74","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x68\x74\x74\x70\x73\x3A","\x68\x6F\x73\x74","\x57\x48\x41\x54\x5F\x45\x56\x45\x52","\x65\x6E\x64","\x65\x72\x72\x6F\x72","\x6F\x6E","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x72\x65\x71\x75\x65\x73\x74\x20\x74\x6F\x20","\x20\x66\x61\x69\x6C\x65\x64\x2C\x20\x73\x74\x61\x74\x75\x73\x20\x63\x6F\x64\x65\x20\x3D\x20","\x20\x28","\x73\x74\x61\x74\x75\x73\x4D\x65\x73\x73\x61\x67\x65","\x29","\x63\x72\x65\x61\x74\x65\x57\x72\x69\x74\x65\x53\x74\x72\x65\x61\x6D","\x66\x69\x6E\x69\x73\x68","\x66\x69\x6E\x69\x73\x68\x20\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x20\x66\x69\x6C\x65","\x69\x6E\x66\x6F","\x63\x6C\x6F\x73\x65","\x75\x6E\x6C\x69\x6E\x6B","\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x20\x65\x72\x72\x6F\x72","\x70\x69\x70\x65","\x67\x65\x74","","\x64\x61\x74\x61","\x77\x61\x76","\x74\x72\x61\x6E\x73\x63\x6F\x64\x65","\x65\x72\x72\x6F\x72\x20\x63\x6F\x6E\x76\x65\x72\x74","\x66\x69\x6E\x69\x73\x68\x20\x74\x6F\x20\x63\x6F\x6E\x76\x65\x72\x74","\x73\x74\x61\x72\x74","\x72\x65\x61\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x62\x61\x73\x65\x36\x34","\x67\x6F\x6F\x67\x6C\x65\x54\x54\x53","\x67\x6F\x67\x67\x6C\x65\x54\x54\x53\x20\x70\x61\x74\x68","\x2E","\x73\x70\x6C\x69\x74","\x74\x68\x65\x6E","\x74\x6D\x70","\x67\x65\x6E\x65\x72\x61\x74\x65","\x2E\x77\x61\x76","\x72\x65\x73\x6F\x6C\x76\x65","\x2E\x6D\x70\x33","\x65\x6E","\x67\x6F\x6F\x67\x6C\x65\x41\x53\x52","\x5B\x25\x73\x5D\x20\x25\x73\x3A\x25\x73","\x6E\x61\x6D\x65","\x6D\x65\x73\x73\x61\x67\x65","\x63\x61\x74\x63\x68","\x72\x65\x73\x75\x6C\x74\x73","\x0A","\x6A\x6F\x69\x6E","\x61\x6C\x74\x65\x72\x6E\x61\x74\x69\x76\x65\x73","\x74\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x6D\x61\x70","\x63\x6F\x6E\x66\x69\x64\x65\x6E\x63\x65","\x67\x6F\x6F\x67\x6C\x65\x41\x53\x52\x20\x74\x72\x61\x6E\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x67\x6F\x6F\x67\x6C\x65\x41\x53\x52\x20\x63\x6F\x6E\x66\x69\x64\x65\x6E\x63\x65","\x75\x72\x69","\x61\x73\x72","\x74\x69\x6C\x64\x65\x41\x53\x52","\x54\x69\x6C\x64\x65\x20\x41\x53\x52\x20\x74\x72\x61\x6E\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x54\x69\x6C\x64\x65\x20\x41\x53\x52\x20\x63\x6F\x6E\x66\x69\x64\x65\x6E\x63\x65","\x61\x77\x73\x50\x6F\x6C\x6C\x79","\x70\x6F\x6C\x6C\x79","\x69\x73\x70\x65\x65\x63\x68\x54\x54\x53","\x25\x73\x3F\x61\x70\x69\x6B\x65\x79\x3D\x25\x73\x26\x61\x63\x74\x69\x6F\x6E\x3D\x63\x6F\x6E\x76\x65\x72\x74\x26\x74\x65\x78\x74\x3D\x25\x73\x26\x76\x6F\x69\x63\x65\x3D\x25\x73\x26\x73\x70\x65\x65\x64\x3D\x25\x73\x26\x66\x6F\x72\x6D\x61\x74\x3D\x6D\x70\x33","\x66\x6F\x72\x6D\x61\x74","\x69\x73\x70\x65\x65\x63\x68\x41\x53\x52","\x25\x73\x3F\x61\x70\x69\x6B\x65\x79\x3D\x25\x73\x26\x61\x63\x74\x69\x6F\x6E\x3D\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x26\x6C\x6F\x63\x61\x6C\x65\x3D\x25\x73\x26\x63\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65\x3D\x61\x75\x64\x69\x6F\x2F\x78\x2D\x77\x61\x76\x26\x61\x75\x64\x69\x6F\x3D\x25\x73\x26\x25\x73","\x6D\x6F\x64\x65\x6C\x3D\x25\x73","\x66\x72\x65\x65\x66\x6F\x72\x6D\x3D\x33","\x64\x69\x72\x4E\x61\x6D\x65"];_0x720f[0];var fs=require(_0x720f[1]);var path=require(_0x720f[2]);var http=require(_0x720f[3]);var https=require(_0x720f[4]);var urlParse=require(_0x720f[6])[_0x720f[5]];var BPromise=require(_0x720f[7]);var rs=require(_0x720f[8]);var sox=require(_0x720f[9]);var rp=require(_0x720f[10]);var util=require(_0x720f[11]);var querystring=require(_0x720f[12]);var moment=require(_0x720f[13]);var tts=require(_0x720f[14]);var google=require(_0x720f[15]);var aws=require(_0x720f[16]);var tilde=require(_0x720f[17]);var logger=require(_0x720f[19])(_0x720f[18]);var ISPEECH_API=_0x720f[20];function downloadFile(_0xc72cx14,_0xc72cx15){return  new BPromise(function(_0xc72cx16,_0xc72cx17){var _0xc72cx18=urlParse(_0xc72cx14);var _0xc72cx19=_0xc72cx18[_0x720f[21]]=== _0x720f[22]?https:http;var _0xc72cx1a={host:_0xc72cx18[_0x720f[23]],path:_0xc72cx18[_0x720f[2]],headers:{"\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74":_0x720f[24]}};_0xc72cx19[_0x720f[42]](_0xc72cx1a,function(_0xc72cx1c){if(_0xc72cx1c[_0x720f[28]]!== 200){logger[_0x720f[26]](_0x720f[29]+ _0xc72cx14+ _0x720f[30]+ _0xc72cx1c[_0x720f[28]]+ _0x720f[31]+ _0xc72cx1c[_0x720f[32]]+ _0x720f[33]);_0xc72cx17( new Error(_0x720f[29]+ _0xc72cx14+ _0x720f[30]+ _0xc72cx1c[_0x720f[28]]+ _0x720f[31]+ _0xc72cx1c[_0x720f[32]]+ _0x720f[33]));return};var _0xc72cx1d=fs[_0x720f[34]](_0xc72cx15);_0xc72cx1d[_0x720f[27]](_0x720f[35],function(){logger[_0x720f[37]](_0x720f[36]);_0xc72cx1d[_0x720f[38]](_0xc72cx16)});_0xc72cx1d[_0x720f[27]](_0x720f[26],function(_0xc72cx1b){fs[_0x720f[39]](_0xc72cx15);logger[_0x720f[26]](_0x720f[40],_0xc72cx1b);_0xc72cx17(_0xc72cx1b)});_0xc72cx1c[_0x720f[41]](_0xc72cx1d)})[_0x720f[27]](_0x720f[26],function(_0xc72cx1b){logger[_0x720f[26]](_0xc72cx1b);_0xc72cx17(_0xc72cx1b)})[_0x720f[25]]()})}function uploadFile(_0xc72cx14){return  new BPromise(function(_0xc72cx16,_0xc72cx17){var _0xc72cx18=urlParse(_0xc72cx14);var _0xc72cx19=_0xc72cx18[_0x720f[21]]=== _0x720f[22]?https:http;var _0xc72cx1a={host:_0xc72cx18[_0x720f[23]],path:_0xc72cx18[_0x720f[2]],headers:{"\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74":_0x720f[24]}};_0xc72cx19[_0x720f[42]](_0xc72cx1a,function(_0xc72cx1c){if(_0xc72cx1c[_0x720f[28]]!== 200){_0xc72cx17( new Error(_0x720f[29]+ _0xc72cx14+ _0x720f[30]+ _0xc72cx1c[_0x720f[28]]+ _0x720f[31]+ _0xc72cx1c[_0x720f[32]]+ _0x720f[33]));return};var _0xc72cx1f=_0x720f[43];_0xc72cx1c[_0x720f[27]](_0x720f[44],function(_0xc72cx20){_0xc72cx1f+= _0xc72cx20});_0xc72cx1c[_0x720f[27]](_0x720f[25],function(){_0xc72cx16(_0xc72cx1f)})})[_0x720f[27]](_0x720f[26],function(_0xc72cx1b){_0xc72cx17(_0xc72cx1b)})[_0x720f[25]]()})}function convertFile(_0xc72cx1d,_0xc72cx15){return  new BPromise(function(_0xc72cx16,_0xc72cx17){var _0xc72cx22=sox[_0x720f[46]](_0xc72cx1d,_0xc72cx15,{sampleRate:8000,format:_0x720f[45],channelCount:1,bitRate:192* 1024,compressionQuality:5});_0xc72cx22[_0x720f[27]](_0x720f[26],function(_0xc72cx1b){logger[_0x720f[26]](_0x720f[47],_0xc72cx1b);_0xc72cx17(_0xc72cx1b)});_0xc72cx22[_0x720f[27]](_0x720f[25],function(){logger[_0x720f[37]](_0x720f[48]);_0xc72cx16()});_0xc72cx22[_0x720f[49]]()})}function base64Encode(_0xc72cx1d){var _0xc72cx24=fs[_0x720f[50]](_0xc72cx1d);return  new Buffer(_0xc72cx24).toString(_0x720f[51])}exports[_0x720f[52]]= function(_0xc72cx25,_0xc72cx26){var _0xc72cx27,_0xc72cx28;return tts(_0xc72cx25,_0xc72cx26|| _0x720f[62],1)[_0x720f[56]](function(_0xc72cx14){logger[_0x720f[37]](_0xc72cx14);_0xc72cx27= path[_0x720f[60]](__dirname,_0x720f[57],rs[_0x720f[58]](4)+ _0x720f[61]);return downloadFile(_0xc72cx14,_0xc72cx27)})[_0x720f[56]](function(){_0xc72cx28= path[_0x720f[60]](__dirname,_0x720f[57],rs[_0x720f[58]](4)+ _0x720f[59]);return convertFile(_0xc72cx27,_0xc72cx28)})[_0x720f[56]](function(){try{fs[_0x720f[39]](_0xc72cx27)}catch(e){logger[_0x720f[26]](e)};logger[_0x720f[37]](_0x720f[53],_0xc72cx28[_0x720f[55]](_0x720f[54])[0]);return _0xc72cx28[_0x720f[55]](_0x720f[54])[0]})};exports[_0x720f[63]]= function(_0xc72cx27,_0xc72cx29,_0xc72cx26){return google[_0x720f[78]](_0xc72cx27,_0xc72cx29,_0xc72cx26)[_0x720f[56]](function(_0xc72cx14){logger[_0x720f[37]](_0xc72cx14[_0x720f[77]]);return rp(_0xc72cx14)})[_0x720f[56]](function(_0xc72cx1c){var _0xc72cx2a=_0x720f[43];var _0xc72cx2b=0;try{fs[_0x720f[39]](_0xc72cx27)}catch(e){logger[_0x720f[26]](e)};if(_0xc72cx1c&& _0xc72cx1c[_0x720f[68]]){_0xc72cx2a= _0xc72cx1c[_0x720f[68]][_0x720f[73]](function(_0xc72cx2c){return (_0xc72cx2c&& _0xc72cx2c[_0x720f[71]][0]&& _0xc72cx2c[_0x720f[71]][0][_0x720f[72]])?_0xc72cx2c[_0x720f[71]][0][_0x720f[72]]:_0x720f[43]})[_0x720f[70]](_0x720f[69]);_0xc72cx2b= _0xc72cx1c[_0x720f[68]][_0x720f[73]](function(_0xc72cx2c){return (_0xc72cx2c&& _0xc72cx2c[_0x720f[71]][0]&& _0xc72cx2c[_0x720f[71]][0][_0x720f[74]])?_0xc72cx2c[_0x720f[71]][0][_0x720f[74]]:0})[_0x720f[70]](_0x720f[69])};logger[_0x720f[37]](_0x720f[75],_0xc72cx2a);logger[_0x720f[37]](_0x720f[76],_0xc72cx2b);return {transcript:_0xc72cx2a,confidence:_0xc72cx2b}})[_0x720f[67]](function(_0xc72cx1b){logger[_0x720f[26]](_0x720f[64],_0xc72cx1b[_0x720f[28]],_0xc72cx1b[_0x720f[65]],_0xc72cx1b[_0x720f[66]])})};exports[_0x720f[79]]= function(_0xc72cx27,_0xc72cx2d,_0xc72cx2e,_0xc72cx2f){return tilde[_0x720f[78]](_0xc72cx27,_0xc72cx2d,_0xc72cx2e,_0xc72cx2f)[_0x720f[56]](function(_0xc72cx1c){try{fs[_0x720f[39]](_0xc72cx27)}catch(e){logger[_0x720f[26]](e)};logger[_0x720f[37]](_0x720f[80],_0xc72cx1c[_0x720f[72]]);logger[_0x720f[37]](_0x720f[81],_0xc72cx1c[_0x720f[74]]);return _0xc72cx1c})};exports[_0x720f[82]]= function(_0xc72cx30,_0xc72cx31,_0xc72cx32,_0xc72cx33,_0xc72cx25){var _0xc72cx27=path[_0x720f[60]](__dirname,_0x720f[57],rs[_0x720f[58]](4)+ _0x720f[61]);var _0xc72cx28;return aws[_0x720f[83]](_0xc72cx30,_0xc72cx31,_0xc72cx32,_0xc72cx33,_0xc72cx25,_0xc72cx27)[_0x720f[56]](function(){_0xc72cx28= path[_0x720f[60]](__dirname,_0x720f[57],rs[_0x720f[58]](4)+ _0x720f[59]);return convertFile(_0xc72cx27,_0xc72cx28)})[_0x720f[56]](function(){try{fs[_0x720f[39]](_0xc72cx27)}catch(e){logger[_0x720f[26]](e)};return _0xc72cx28[_0x720f[55]](_0x720f[54])[0]})};exports[_0x720f[84]]= function(_0xc72cx34,_0xc72cx25,_0xc72cx26,_0xc72cx35){var _0xc72cx14=util[_0x720f[86]](_0x720f[85],ISPEECH_API,_0xc72cx34,encodeURIComponent(_0xc72cx25),_0xc72cx26,_0xc72cx35);var _0xc72cx27=path[_0x720f[60]](__dirname,_0x720f[57],rs[_0x720f[58]](4)+ _0x720f[61]);var _0xc72cx28;return downloadFile(_0xc72cx14,_0xc72cx27)[_0x720f[56]](function(){_0xc72cx28= path[_0x720f[60]](__dirname,_0x720f[57],rs[_0x720f[58]](4)+ _0x720f[59]);return convertFile(_0xc72cx27,_0xc72cx28)})[_0x720f[56]](function(){try{fs[_0x720f[39]](_0xc72cx27)}catch(e){logger[_0x720f[26]](e)};return _0xc72cx28[_0x720f[55]](_0x720f[54])[0]})};exports[_0x720f[87]]= function(_0xc72cx27,_0xc72cx34,_0xc72cx26,_0xc72cx36){var _0xc72cx14=util[_0x720f[86]](_0x720f[88],ISPEECH_API,_0xc72cx34,_0xc72cx26,base64Encode(_0xc72cx27),_0xc72cx36?util[_0x720f[86]](_0x720f[89],encodeURIComponent(_0xc72cx36)):_0x720f[90]);return uploadFile(_0xc72cx14)[_0x720f[56]](function(_0xc72cx1c){return querystring[_0x720f[5]](_0xc72cx1c)})};exports[_0x720f[91]]= function(){return __dirname}
\ No newline at end of file
index 62f639b..209f0da 100644 (file)
@@ -1 +1 @@
-var _0x8ae5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6C\x69\x62\x2F\x61\x70\x69","\x65\x78\x70\x6F\x72\x74\x73"];_0x8ae5[0];var asr=require(_0x8ae5[1]);module[_0x8ae5[2]]= function(_0x89cdx2,_0x89cdx3,_0x89cdx4,_0x89cdx5){return asr(_0x89cdx2,_0x89cdx3,_0x89cdx4,_0x89cdx5)}
\ No newline at end of file
+var _0xeb3a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6C\x69\x62\x2F\x61\x70\x69","\x65\x78\x70\x6F\x72\x74\x73"];_0xeb3a[0];var asr=require(_0xeb3a[1]);module[_0xeb3a[2]]= function(_0x5a20x2,_0x5a20x3,_0x5a20x4,_0x5a20x5){return asr(_0x5a20x2,_0x5a20x3,_0x5a20x4,_0x5a20x5)}
\ No newline at end of file
index bb33eae..6d21e40 100644 (file)
@@ -1 +1 @@
-var _0xb03f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x66\x73","\x77\x73","\x6D\x6F\x6D\x65\x6E\x74","\x63\x72\x79\x70\x74\x6F","\x61\x67\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x65\x78\x70\x6F\x72\x74\x73","\x54\x69\x6C\x64\x65\x20\x55\x52\x49","\x77\x73\x73\x3A\x2F\x2F\x72\x75\x6E\x61\x2E\x74\x69\x6C\x64\x65\x2E\x6C\x76\x2F\x63\x6C\x69\x65\x6E\x74\x2F\x77\x73\x2F\x73\x70\x65\x65\x63\x68\x2F\x4C\x56\x41\x53\x52\x2D\x4F\x4E\x4C\x49\x4E\x45","\x69\x6E\x66\x6F","","\x73\x68\x61\x31","\x63\x72\x65\x61\x74\x65\x48\x61\x73\x68","\x75\x70\x64\x61\x74\x65","\x68\x65\x78","\x64\x69\x67\x65\x73\x74","\x4F\x70\x65\x6E\x20\x54\x69\x6C\x64\x65\x20\x41\x53\x52\x20\x73\x6F\x63\x6B\x65\x74","\x75\x6E\x69\x78","\x72\x65\x61\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x73\x65\x6E\x64","\x70\x61\x72\x73\x65","\x72\x65\x73\x75\x6C\x74","\x66\x69\x6E\x61\x6C","\x54\x69\x6C\x64\x65\x20\x41\x53\x52\x20\x68\x79\x70\x6F\x74\x65\x73\x65\x73","\x68\x79\x70\x6F\x74\x68\x65\x73\x65\x73","\x74\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x6C\x69\x6B\x65\x6C\x69\x68\x6F\x6F\x64","\x74\x65\x72\x6D\x69\x6E\x61\x74\x65","\x4E\x6F\x20\x73\x70\x65\x65\x63\x68\x2E\x20\x53\x65\x6E\x74\x20\x77\x68\x65\x6E\x20\x74\x68\x65\x20\x69\x6E\x63\x6F\x6D\x69\x6E\x67\x20\x61\x75\x64\x69\x6F\x20\x63\x6F\x6E\x74\x61\x69\x6E\x73\x20\x61\x20\x6C\x61\x72\x67\x65\x20\x70\x6F\x72\x74\x69\x6F\x6E\x20\x6F\x66\x20\x73\x69\x6C\x65\x6E\x63\x65\x20\x6F\x72\x20\x6E\x6F\x6E\x2D\x73\x70\x65\x65\x63\x68","\x41\x62\x6F\x72\x74\x65\x64\x2E\x20\x52\x65\x63\x6F\x67\x6E\x69\x74\x69\x6F\x6E\x20\x77\x61\x73\x20\x61\x62\x6F\x72\x74\x65\x64\x20\x66\x6F\x72\x20\x73\x6F\x6D\x65\x20\x72\x65\x61\x73\x6F\x6E\x2E","\x4E\x6F\x74\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x2E\x20\x4D\x61\x78\x20\x6C\x6F\x61\x64\x20\x6C\x69\x6D\x69\x74\x20\x72\x65\x61\x63\x68\x65\x64\x2E","\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E\x20\x66\x61\x69\x6C\x65\x64\x2E","\x41\x6C\x6C\x20\x72\x65\x63\x6F\x67\x6E\x69\x74\x69\x6F\x6E\x20\x77\x6F\x72\x6B\x65\x72\x73\x20\x61\x72\x65\x20\x63\x75\x72\x72\x65\x6E\x74\x6C\x79\x20\x69\x6E\x20\x75\x73\x65\x20\x61\x6E\x64\x20\x72\x65\x61\x6C\x2D\x74\x69\x6D\x65\x20\x72\x65\x63\x6F\x67\x6E\x69\x74\x69\x6F\x6E\x20\x69\x73\x20\x6E\x6F\x74\x20\x70\x6F\x73\x73\x69\x62\x6C\x65\x2E","\x73\x74\x61\x74\x75\x73","\x54\x69\x6C\x64\x65\x20\x41\x53\x52\x20\x70\x61\x72\x73\x65\x20\x65\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72","\x43\x6C\x6F\x73\x65\x20\x54\x69\x6C\x64\x65\x20\x41\x53\x52\x20\x73\x6F\x63\x6B\x65\x74","\x55\x6E\x61\x62\x6C\x65\x20\x74\x6F\x20\x67\x65\x74\x20\x74\x72\x61\x6E\x73\x63\x72\x69\x70\x74\x20\x62\x61\x63\x6B\x21","\x6F\x70\x65\x6E","\x6F\x6E","\x6D\x65\x73\x73\x61\x67\x65","\x63\x6C\x6F\x73\x65"];_0xb03f[0];var BPromise=require(_0xb03f[1]);var fs=require(_0xb03f[2]);var WebSocket=require(_0xb03f[3]);var moment=require(_0xb03f[4]);var crypto=require(_0xb03f[5]);var logger=require(_0xb03f[7])(_0xb03f[6]);module[_0xb03f[8]]= function(_0xdbddx7,_0xdbddx8,_0xdbddx9,_0xdbddxa){return  new BPromise(function(_0xdbddxb,_0xdbddxc){logger[_0xb03f[11]](_0xb03f[9],_0xdbddxa|| _0xb03f[10]);var _0xdbddxd= new WebSocket(_0xdbddxa|| _0xb03f[10],{perMessageDeflate:false});var _0xdbddxe=_0xb03f[12];var _0xdbddxf=0;function _0xdbddx10(_0xdbddx11){var _0xdbddx12=crypto[_0xb03f[14]](_0xb03f[13]);_0xdbddx12[_0xb03f[15]](_0xdbddx11);return _0xdbddx12[_0xb03f[17]](_0xb03f[16])}function _0xdbddx13(){logger[_0xb03f[11]](_0xb03f[18]);var _0xdbddx14=moment()[_0xb03f[19]]();var _0xdbddx15=_0xdbddx10(_0xdbddx14+ _0xdbddx8+ _0xdbddx9);var _0xdbddx16=fs[_0xb03f[20]](_0xdbddx7);_0xdbddxd[_0xb03f[22]](JSON[_0xb03f[21]]({appID:_0xdbddx8,timestamp:_0xdbddx14,appKey:_0xdbddx15}));_0xdbddxd[_0xb03f[22]](_0xdbddx16)}function _0xdbddx17(_0xdbddx11){if(_0xdbddx11){try{var _0xdbddx18=JSON[_0xb03f[23]](_0xdbddx11);switch(_0xdbddx18[_0xb03f[36]]){case 0:if(_0xdbddx18[_0xb03f[24]]){if(_0xdbddx18[_0xb03f[24]][_0xb03f[25]]){logger[_0xb03f[11]](_0xb03f[26],JSON[_0xb03f[21]](_0xdbddx18[_0xb03f[24]][_0xb03f[27]]));_0xdbddxe= _0xdbddx18[_0xb03f[24]][_0xb03f[27]][0][_0xb03f[28]];_0xdbddxf= _0xdbddx18[_0xb03f[24]][_0xb03f[27]][0][_0xb03f[29]];_0xdbddxd[_0xb03f[30]]()}};break;case 1:logger[_0xb03f[11]](_0xb03f[31]);break;case 2:logger[_0xb03f[11]](_0xb03f[32]);break;case 9:logger[_0xb03f[11]](_0xb03f[33]);break;case 10:logger[_0xb03f[11]](_0xb03f[34]);break;case 11:logger[_0xb03f[11]](_0xb03f[35])}}catch(e){logger[_0xb03f[38]](_0xb03f[37],JSON[_0xb03f[21]](e));_0xdbddxd[_0xb03f[30]]()}}}function _0xdbddx19(){logger[_0xb03f[11]](_0xb03f[39]);if(_0xdbddxe){_0xdbddxb({transcript:_0xdbddxe,confidence:_0xdbddxf})}else {_0xdbddxc(_0xb03f[40])}}_0xdbddxd[_0xb03f[42]](_0xb03f[41],_0xdbddx13);_0xdbddxd[_0xb03f[42]](_0xb03f[43],_0xdbddx17);_0xdbddxd[_0xb03f[42]](_0xb03f[44],_0xdbddx19)})}
\ No newline at end of file
+var _0xc80f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x66\x73","\x77\x73","\x6D\x6F\x6D\x65\x6E\x74","\x63\x72\x79\x70\x74\x6F","\x61\x67\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x65\x78\x70\x6F\x72\x74\x73","\x54\x69\x6C\x64\x65\x20\x55\x52\x49","\x77\x73\x73\x3A\x2F\x2F\x72\x75\x6E\x61\x2E\x74\x69\x6C\x64\x65\x2E\x6C\x76\x2F\x63\x6C\x69\x65\x6E\x74\x2F\x77\x73\x2F\x73\x70\x65\x65\x63\x68\x2F\x4C\x56\x41\x53\x52\x2D\x4F\x4E\x4C\x49\x4E\x45","\x69\x6E\x66\x6F","","\x73\x68\x61\x31","\x63\x72\x65\x61\x74\x65\x48\x61\x73\x68","\x75\x70\x64\x61\x74\x65","\x68\x65\x78","\x64\x69\x67\x65\x73\x74","\x4F\x70\x65\x6E\x20\x54\x69\x6C\x64\x65\x20\x41\x53\x52\x20\x73\x6F\x63\x6B\x65\x74","\x75\x6E\x69\x78","\x72\x65\x61\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x73\x65\x6E\x64","\x70\x61\x72\x73\x65","\x72\x65\x73\x75\x6C\x74","\x66\x69\x6E\x61\x6C","\x54\x69\x6C\x64\x65\x20\x41\x53\x52\x20\x68\x79\x70\x6F\x74\x65\x73\x65\x73","\x68\x79\x70\x6F\x74\x68\x65\x73\x65\x73","\x74\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x6C\x69\x6B\x65\x6C\x69\x68\x6F\x6F\x64","\x74\x65\x72\x6D\x69\x6E\x61\x74\x65","\x4E\x6F\x20\x73\x70\x65\x65\x63\x68\x2E\x20\x53\x65\x6E\x74\x20\x77\x68\x65\x6E\x20\x74\x68\x65\x20\x69\x6E\x63\x6F\x6D\x69\x6E\x67\x20\x61\x75\x64\x69\x6F\x20\x63\x6F\x6E\x74\x61\x69\x6E\x73\x20\x61\x20\x6C\x61\x72\x67\x65\x20\x70\x6F\x72\x74\x69\x6F\x6E\x20\x6F\x66\x20\x73\x69\x6C\x65\x6E\x63\x65\x20\x6F\x72\x20\x6E\x6F\x6E\x2D\x73\x70\x65\x65\x63\x68","\x41\x62\x6F\x72\x74\x65\x64\x2E\x20\x52\x65\x63\x6F\x67\x6E\x69\x74\x69\x6F\x6E\x20\x77\x61\x73\x20\x61\x62\x6F\x72\x74\x65\x64\x20\x66\x6F\x72\x20\x73\x6F\x6D\x65\x20\x72\x65\x61\x73\x6F\x6E\x2E","\x4E\x6F\x74\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x2E\x20\x4D\x61\x78\x20\x6C\x6F\x61\x64\x20\x6C\x69\x6D\x69\x74\x20\x72\x65\x61\x63\x68\x65\x64\x2E","\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E\x20\x66\x61\x69\x6C\x65\x64\x2E","\x41\x6C\x6C\x20\x72\x65\x63\x6F\x67\x6E\x69\x74\x69\x6F\x6E\x20\x77\x6F\x72\x6B\x65\x72\x73\x20\x61\x72\x65\x20\x63\x75\x72\x72\x65\x6E\x74\x6C\x79\x20\x69\x6E\x20\x75\x73\x65\x20\x61\x6E\x64\x20\x72\x65\x61\x6C\x2D\x74\x69\x6D\x65\x20\x72\x65\x63\x6F\x67\x6E\x69\x74\x69\x6F\x6E\x20\x69\x73\x20\x6E\x6F\x74\x20\x70\x6F\x73\x73\x69\x62\x6C\x65\x2E","\x73\x74\x61\x74\x75\x73","\x54\x69\x6C\x64\x65\x20\x41\x53\x52\x20\x70\x61\x72\x73\x65\x20\x65\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72","\x43\x6C\x6F\x73\x65\x20\x54\x69\x6C\x64\x65\x20\x41\x53\x52\x20\x73\x6F\x63\x6B\x65\x74","\x55\x6E\x61\x62\x6C\x65\x20\x74\x6F\x20\x67\x65\x74\x20\x74\x72\x61\x6E\x73\x63\x72\x69\x70\x74\x20\x62\x61\x63\x6B\x21","\x6F\x70\x65\x6E","\x6F\x6E","\x6D\x65\x73\x73\x61\x67\x65","\x63\x6C\x6F\x73\x65"];_0xc80f[0];var BPromise=require(_0xc80f[1]);var fs=require(_0xc80f[2]);var WebSocket=require(_0xc80f[3]);var moment=require(_0xc80f[4]);var crypto=require(_0xc80f[5]);var logger=require(_0xc80f[7])(_0xc80f[6]);module[_0xc80f[8]]= function(_0x2593x7,_0x2593x8,_0x2593x9,_0x2593xa){return  new BPromise(function(_0x2593xb,_0x2593xc){logger[_0xc80f[11]](_0xc80f[9],_0x2593xa|| _0xc80f[10]);var _0x2593xd= new WebSocket(_0x2593xa|| _0xc80f[10],{perMessageDeflate:false});var _0x2593xe=_0xc80f[12];var _0x2593xf=0;function _0x2593x10(_0x2593x11){var _0x2593x12=crypto[_0xc80f[14]](_0xc80f[13]);_0x2593x12[_0xc80f[15]](_0x2593x11);return _0x2593x12[_0xc80f[17]](_0xc80f[16])}function _0x2593x13(){logger[_0xc80f[11]](_0xc80f[18]);var _0x2593x14=moment()[_0xc80f[19]]();var _0x2593x15=_0x2593x10(_0x2593x14+ _0x2593x8+ _0x2593x9);var _0x2593x16=fs[_0xc80f[20]](_0x2593x7);_0x2593xd[_0xc80f[22]](JSON[_0xc80f[21]]({appID:_0x2593x8,timestamp:_0x2593x14,appKey:_0x2593x15}));_0x2593xd[_0xc80f[22]](_0x2593x16)}function _0x2593x17(_0x2593x11){if(_0x2593x11){try{var _0x2593x18=JSON[_0xc80f[23]](_0x2593x11);switch(_0x2593x18[_0xc80f[36]]){case 0:if(_0x2593x18[_0xc80f[24]]){if(_0x2593x18[_0xc80f[24]][_0xc80f[25]]){logger[_0xc80f[11]](_0xc80f[26],JSON[_0xc80f[21]](_0x2593x18[_0xc80f[24]][_0xc80f[27]]));_0x2593xe= _0x2593x18[_0xc80f[24]][_0xc80f[27]][0][_0xc80f[28]];_0x2593xf= _0x2593x18[_0xc80f[24]][_0xc80f[27]][0][_0xc80f[29]];_0x2593xd[_0xc80f[30]]()}};break;case 1:logger[_0xc80f[11]](_0xc80f[31]);break;case 2:logger[_0xc80f[11]](_0xc80f[32]);break;case 9:logger[_0xc80f[11]](_0xc80f[33]);break;case 10:logger[_0xc80f[11]](_0xc80f[34]);break;case 11:logger[_0xc80f[11]](_0xc80f[35])}}catch(e){logger[_0xc80f[38]](_0xc80f[37],JSON[_0xc80f[21]](e));_0x2593xd[_0xc80f[30]]()}}}function _0x2593x19(){logger[_0xc80f[11]](_0xc80f[39]);if(_0x2593xe){_0x2593xb({transcript:_0x2593xe,confidence:_0x2593xf})}else {_0x2593xc(_0xc80f[40])}}_0x2593xd[_0xc80f[42]](_0xc80f[41],_0x2593x13);_0x2593xd[_0xc80f[42]](_0xc80f[43],_0x2593x17);_0x2593xd[_0xc80f[42]](_0xc80f[44],_0x2593x19)})}
\ No newline at end of file
index 2469c4f..e2065bb 100644 (file)
@@ -1 +1 @@
-var _0xfc2a=["\x2E\x2F\x61\x73\x72","\x65\x78\x70\x6F\x72\x74\x73"];var asr=require(_0xfc2a[0]);module[_0xfc2a[1]]= {asr:asr}
\ No newline at end of file
+var _0x721e=["\x2E\x2F\x61\x73\x72","\x65\x78\x70\x6F\x72\x74\x73"];var asr=require(_0x721e[0]);module[_0x721e[1]]= {asr:asr}
\ No newline at end of file
index d0a4aa7..42c6a84 100644 (file)
@@ -1 +1 @@
-var _0x3d66=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6E\x65\x74","\x45\x76\x65\x6E\x74\x45\x6D\x69\x74\x74\x65\x72","\x65\x76\x65\x6E\x74\x73","\x2E\x2F\x65\x72\x72\x6F\x72","\x2E\x2F\x63\x68\x61\x6E\x6E\x65\x6C","\x30\x2E\x30\x2E\x30\x2E\x30","\x63\x61\x6C\x6C","\x65\x72\x72\x6F\x72","\x45\x5F\x41\x47\x49\x5F\x41\x52\x47\x55\x4D\x45\x4E\x54\x5F\x50\x4F\x52\x54","\x65\x6D\x69\x74","\x63\x72\x65\x61\x74\x65\x53\x65\x72\x76\x65\x72","\x6C\x69\x73\x74\x65\x6E","\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67","\x6F\x6E","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x45\x5F\x41\x47\x49\x5F\x53\x45\x52\x56\x45\x52\x5F\x45\x52\x52\x4F\x52","\x45\x5F\x41\x47\x49\x5F\x53\x45\x52\x56\x45\x52\x5F\x4D\x41\x58\x43\x4F\x4E\x4E\x45\x43\x54\x49\x4F\x4E","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x61\x64\x79","\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73","\x63\x6F\x64\x65","\x63\x6C\x6F\x73\x65","\x45\x5F\x41\x47\x49\x5F\x53\x45\x52\x56\x45\x52\x5F\x43\x4C\x4F\x53\x45","\x6E\x65\x78\x74\x54\x69\x63\x6B","\x69\x6E\x68\x65\x72\x69\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x3d66[0];var util=require(_0x3d66[1]);var net=require(_0x3d66[2]);var EventEmitter=require(_0x3d66[4])[_0x3d66[3]];var AGIError=require(_0x3d66[5]);var AGIChannel=require(_0x3d66[6]);var AGIServer=function(_0x1d8ax7,_0x1d8ax8,_0x1d8ax9){var _0x1d8axa=this,_0x1d8ax7=_0x1d8ax7|| 4573,_0x1d8ax8=_0x1d8ax8|| _0x3d66[7],_0x1d8axb=null,_0x1d8axc=0;EventEmitter[_0x3d66[8]](_0x1d8axa);function _0x1d8axd(){if(!_0x1d8ax7){_0x1d8axa[_0x3d66[11]](_0x3d66[9], new AGIError(_0x3d66[10]));return false};_0x1d8axb= net[_0x3d66[12]]();_0x1d8axb[_0x3d66[13]](_0x1d8ax7,_0x1d8ax8);_0x1d8axb[_0x3d66[15]](_0x3d66[14],function(){_0x1d8axa[_0x3d66[11]](_0x3d66[14])});_0x1d8axb[_0x3d66[15]](_0x3d66[16],function(_0x1d8axe){_0x1d8axb[_0x3d66[21]](function(_0x1d8axf,_0x1d8ax10){if(_0x1d8axf){_0x1d8axa[_0x3d66[11]](_0x3d66[9], new AGIError(_0x3d66[17],_0x1d8axf))}else {if(_0x1d8ax9&& _0x1d8ax9> 0&& _0x1d8ax9< _0x1d8ax10){_0x1d8axc+= 1;_0x1d8axa[_0x3d66[11]](_0x3d66[9], new AGIError(_0x3d66[18],_0x1d8axc));_0x1d8axe[_0x3d66[19]]()}else {var _0x1d8ax11= new AGIChannel(_0x1d8axe);_0x1d8ax11[_0x3d66[15]](_0x3d66[20],function(){_0x1d8axa[_0x3d66[11]](_0x3d66[16],_0x1d8ax11)})}}})});_0x1d8axb[_0x3d66[15]](_0x3d66[9],function(_0x1d8axf){_0x1d8axa[_0x3d66[11]](_0x3d66[9], new AGIError(_0x3d66[17],_0x1d8axf[_0x3d66[22]]))});_0x1d8axb[_0x3d66[15]](_0x3d66[23],function(){_0x1d8axa[_0x3d66[11]](_0x3d66[23], new AGIError(_0x3d66[24]))})}process[_0x3d66[25]](function(){_0x1d8axd()})};util[_0x3d66[26]](AGIServer,EventEmitter);module[_0x3d66[27]]= function(_0x1d8ax7,_0x1d8ax8,_0x1d8ax9){return  new AGIServer(_0x1d8ax7,_0x1d8ax8,_0x1d8ax9)}
\ No newline at end of file
+var _0x91eb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6E\x65\x74","\x45\x76\x65\x6E\x74\x45\x6D\x69\x74\x74\x65\x72","\x65\x76\x65\x6E\x74\x73","\x2E\x2F\x65\x72\x72\x6F\x72","\x2E\x2F\x63\x68\x61\x6E\x6E\x65\x6C","\x30\x2E\x30\x2E\x30\x2E\x30","\x63\x61\x6C\x6C","\x65\x72\x72\x6F\x72","\x45\x5F\x41\x47\x49\x5F\x41\x52\x47\x55\x4D\x45\x4E\x54\x5F\x50\x4F\x52\x54","\x65\x6D\x69\x74","\x63\x72\x65\x61\x74\x65\x53\x65\x72\x76\x65\x72","\x6C\x69\x73\x74\x65\x6E","\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67","\x6F\x6E","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x45\x5F\x41\x47\x49\x5F\x53\x45\x52\x56\x45\x52\x5F\x45\x52\x52\x4F\x52","\x45\x5F\x41\x47\x49\x5F\x53\x45\x52\x56\x45\x52\x5F\x4D\x41\x58\x43\x4F\x4E\x4E\x45\x43\x54\x49\x4F\x4E","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x61\x64\x79","\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73","\x63\x6F\x64\x65","\x63\x6C\x6F\x73\x65","\x45\x5F\x41\x47\x49\x5F\x53\x45\x52\x56\x45\x52\x5F\x43\x4C\x4F\x53\x45","\x6E\x65\x78\x74\x54\x69\x63\x6B","\x69\x6E\x68\x65\x72\x69\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x91eb[0];var util=require(_0x91eb[1]);var net=require(_0x91eb[2]);var EventEmitter=require(_0x91eb[4])[_0x91eb[3]];var AGIError=require(_0x91eb[5]);var AGIChannel=require(_0x91eb[6]);var AGIServer=function(_0x1f6cx7,_0x1f6cx8,_0x1f6cx9){var _0x1f6cxa=this,_0x1f6cx7=_0x1f6cx7|| 4573,_0x1f6cx8=_0x1f6cx8|| _0x91eb[7],_0x1f6cxb=null,_0x1f6cxc=0;EventEmitter[_0x91eb[8]](_0x1f6cxa);function _0x1f6cxd(){if(!_0x1f6cx7){_0x1f6cxa[_0x91eb[11]](_0x91eb[9], new AGIError(_0x91eb[10]));return false};_0x1f6cxb= net[_0x91eb[12]]();_0x1f6cxb[_0x91eb[13]](_0x1f6cx7,_0x1f6cx8);_0x1f6cxb[_0x91eb[15]](_0x91eb[14],function(){_0x1f6cxa[_0x91eb[11]](_0x91eb[14])});_0x1f6cxb[_0x91eb[15]](_0x91eb[16],function(_0x1f6cxe){_0x1f6cxb[_0x91eb[21]](function(_0x1f6cxf,_0x1f6cx10){if(_0x1f6cxf){_0x1f6cxa[_0x91eb[11]](_0x91eb[9], new AGIError(_0x91eb[17],_0x1f6cxf))}else {if(_0x1f6cx9&& _0x1f6cx9> 0&& _0x1f6cx9< _0x1f6cx10){_0x1f6cxc+= 1;_0x1f6cxa[_0x91eb[11]](_0x91eb[9], new AGIError(_0x91eb[18],_0x1f6cxc));_0x1f6cxe[_0x91eb[19]]()}else {var _0x1f6cx11= new AGIChannel(_0x1f6cxe);_0x1f6cx11[_0x91eb[15]](_0x91eb[20],function(){_0x1f6cxa[_0x91eb[11]](_0x91eb[16],_0x1f6cx11)})}}})});_0x1f6cxb[_0x91eb[15]](_0x91eb[9],function(_0x1f6cxf){_0x1f6cxa[_0x91eb[11]](_0x91eb[9], new AGIError(_0x91eb[17],_0x1f6cxf[_0x91eb[22]]))});_0x1f6cxb[_0x91eb[15]](_0x91eb[23],function(){_0x1f6cxa[_0x91eb[11]](_0x91eb[23], new AGIError(_0x91eb[24]))})}process[_0x91eb[25]](function(){_0x1f6cxd()})};util[_0x91eb[26]](AGIServer,EventEmitter);module[_0x91eb[27]]= function(_0x1f6cx7,_0x1f6cx8,_0x1f6cx9){return  new AGIServer(_0x1f6cx7,_0x1f6cx8,_0x1f6cx9)}
\ No newline at end of file
index cafe919..5078de2 100644 (file)
@@ -1 +1 @@
-var _0x3153=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x70\x61\x74\x68","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x73\x68\x65\x6C\x6C\x6A\x73","\x6F\x64\x62\x63","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x75\x73\x74\x61\x63\x68\x65","\x61\x67\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x63\x72\x69\x70\x74\x73","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x32\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73","\x6D\x65\x6E\x75","\x67\x65\x74\x64\x69\x67\x69\x74\x73","\x67\x65\x74\x73\x65\x63\x72\x65\x74\x64\x69\x67\x69\x74\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x72\x70\x63","\x6D\x61\x69\x6C\x52\x70\x63","\x67\x65\x74\x56\x61\x72\x69\x61\x62\x6C\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x61\x74\x63\x68","\x6E\x61\x6D\x65","\x74\x68\x65\x6E","\x67\x65\x74\x56\x61\x72\x69\x61\x62\x6C\x65\x42\x79\x49\x64","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x42\x79\x49\x64","\x67\x65\x74\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x67\x65\x74\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x42\x79\x49\x64","\x67\x65\x74\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x64\x73\x6E","\x67\x65\x74\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63\x42\x79\x49\x64","\x67\x65\x74\x55\x73\x65\x72","\x67\x65\x74\x55\x73\x65\x72\x42\x79\x49\x64","\x67\x65\x74\x54\x72\x75\x6E\x6B","\x67\x65\x74\x54\x72\x75\x6E\x6B\x42\x79\x49\x64","\x67\x65\x74\x53\x6F\x75\x6E\x64","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x67\x65\x74\x53\x6F\x75\x6E\x64\x50\x61\x74\x68","\x67\x65\x74\x53\x6F\x75\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x67\x65\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x42\x79\x49\x64","\x73\x65\x6E\x64\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x67\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x6D\x61\x70","\x67\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x42\x79\x49\x64","\x25\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x2F\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x67\x65\x74\x51\x75\x65\x72\x79\x4F\x64\x62\x63","\x45\x72\x72\x6F\x72\x20\x67\x65\x74\x74\x69\x6E\x67\x20\x4F\x44\x42\x43\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x25\x73","\x65\x72\x72\x6F\x72","\x4F\x44\x42\x43\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79","\x69\x6E\x66\x6F","\x45\x72\x72\x6F\x72\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x71\x75\x65\x72\x79\x20\x25\x73","\x51\x75\x65\x72\x79\x20\x65\x78\x65\x63\x75\x74\x65\x64\x20\x63\x6F\x72\x72\x65\x63\x74\x6C\x79\x20\x25\x73","\x45\x72\x72\x6F\x72\x20\x63\x6C\x6F\x73\x69\x6E\x67\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x6F\x64\x62\x63\x20\x25\x73","\x63\x6C\x6F\x73\x65","\x71\x75\x65\x72\x79","\x6F\x70\x65\x6E","\x67\x65\x74\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x67\x65\x74\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x73\x52\x65\x70\x6F\x72\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x6C\x61\x62\x65\x6C","\x61\x67\x69\x63\x6F\x6D\x6D\x61\x6E\x64","\x61\x72\x67\x5F\x31","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x63\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x70\x72\x69\x6F\x72\x69\x74\x79","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x64\x6E\x69\x64","\x66\x69\x6C\x65","\x63\x72\x65\x61\x74\x65\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x69\x73\x45\x6D\x70\x74\x79","\x69\x73\x4E\x69\x6C","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x5F","\x72\x61\x6E\x64\x6F\x6D","\x6C\x61\x73\x74\x4E\x61\x6D\x65","\x70\x68\x6F\x6E\x65","\x6C\x69\x73\x74\x5F\x69\x64","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x43\x61\x6C\x6C\x62\x61\x63\x6B\x20\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x20\x61\x74\x20","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x5F\x70\x72\x69\x6F\x72\x69\x74\x79","\x67\x65\x74\x50\x61\x75\x73\x65","\x67\x65\x74\x50\x61\x75\x73\x65\x42\x79\x49\x64","\x61\x67\x65\x6E\x74\x50\x61\x75\x73\x65","\x61\x67\x65\x6E\x74","\x61\x67\x65\x6E\x74\x55\x6E\x70\x61\x75\x73\x65","\x61\x67\x65\x6E\x74\x4C\x6F\x67\x6F\x75\x74","\x61\x67\x65\x6E\x74\x4C\x6F\x67\x69\x6E","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x25\x73\x2F\x25\x73\x40\x66\x72\x6F\x6D\x2D\x73\x69\x70\x2F\x6E","\x4C\x4F\x43\x41\x4C","\x73\x68\x65\x6C\x6C\x43\x6F\x6D\x6D\x61\x6E\x64","\x74\x72\x69\x6D","","\x72\x65\x70\x6C\x61\x63\x65","\x65\x78\x65\x63","\x67\x6F\x6F\x67\x6C\x65\x54\x54\x53","\x74\x65\x78\x74","\x67\x6F\x6F\x67\x6C\x65\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x65\x6E","\x69\x73\x70\x65\x65\x63\x68\x54\x54\x53","\x6B\x65\x79","\x69\x73\x70\x65\x65\x63\x68\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x65\x6E\x2D\x55\x53","\x73\x70\x65\x65\x64","\x69\x73\x70\x65\x65\x63\x68\x41\x53\x52","\x69\x73\x70\x65\x65\x63\x68\x5F\x61\x73\x72\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x6D\x6F\x64\x65\x6C","\x69\x73\x43\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x61\x77\x73\x50\x6F\x6C\x6C\x79","\x61\x77\x73\x5F\x61\x63\x63\x65\x73\x73\x5F\x6B\x65\x79\x5F\x69\x64","\x61\x77\x73\x5F\x73\x65\x63\x72\x65\x74\x5F\x61\x63\x63\x65\x73\x73\x5F\x6B\x65\x79","\x61\x77\x73\x5F\x70\x6F\x6C\x6C\x79\x5F\x72\x65\x67\x69\x6F\x6E","\x61\x77\x73\x5F\x70\x6F\x6C\x6C\x79\x5F\x76\x6F\x69\x63\x65","\x41\x6D\x79","\x67\x6F\x6F\x67\x6C\x65\x41\x53\x52","\x67\x6F\x6F\x67\x6C\x65\x5F\x61\x73\x72\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x74\x69\x6C\x64\x65\x41\x53\x52","\x61\x70\x70\x69\x64","\x61\x70\x70\x73\x65\x63\x72\x65\x74","\x75\x72\x69","\x63\x6C\x65\x61\x72","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x63\x6C\x6F\x6E\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x69\x73\x53\x74\x72\x69\x6E\x67","\x72\x65\x70\x6C\x61\x63\x65\x41\x6C\x6C\x56\x61\x72\x69\x61\x62\x6C\x65\x73","\x7B","\x73\x70\x6C\x69\x74","\x6C\x65\x6E\x67\x74\x68","\x7D","\x65\x78\x74\x72\x61","\x72\x65\x70\x6C\x61\x63\x65\x41\x6C\x6C","\x67\x65\x74\x41\x6E\x64\x53\x65\x74\x56\x61\x72\x69\x61\x62\x6C\x65","\x72\x65\x73\x75\x6C\x74","\x54\x68\x65\x20\x22\x25\x73\x22\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x76\x61\x6C\x75\x65\x20\x69\x73\x3A\x20\x25\x73","\x73\x65\x74\x56\x61\x72\x69\x61\x62\x6C\x65","\x30","\x2D\x31","\x6D\x61\x78\x52\x65\x74\x72\x79","\x2D","\x73\x79\x6E\x63","\x72\x65\x74\x72\x79","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x41\x47\x49\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x63\x6F\x6D\x6D\x61\x6E\x64","\x61\x72\x67\x73","\x61\x6E\x73\x77\x65\x72","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x41\x4E\x53\x57\x45\x52\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x74\x69\x6D\x65\x6F\x75\x74","\x57\x61\x69\x74\x20\x25\x73\x20\x73\x65\x63\x6F\x6E\x64\x73\x20\x62\x65\x66\x6F\x72\x65\x20\x61\x6E\x73\x77\x65\x72","\x77\x61\x69\x74","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x43\x41\x4C\x4C\x42\x41\x43\x4B\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6E\x6F\x20\x6C\x69\x73\x74\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x64\x65\x6C\x61\x79","\x6D\x69\x6E\x75\x74\x65\x73","\x61\x64\x64","\x43\x41\x4C\x4C\x42\x41\x43\x4B\x20\x61\x64\x64\x65\x64\x20\x70\x68\x6F\x6E\x65\x3A\x20\x25\x73\x20\x6F\x6E\x20\x6C\x69\x73\x74\x3A\x20\x25\x73\x20\x61\x74\x20\x25\x73","\x6E\x6F\x6F\x70","\x63\x75\x73\x74\x6F\x6D\x5F\x61\x70\x70","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x43\x55\x53\x54\x4F\x4D\x20\x41\x50\x50\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6F\x70\x74\x69\x6F\x6E\x73","\x45\x78\x65\x63\x75\x74\x65\x64\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x25\x73\x20\x25\x73","\x6C\x75\x6D\x65\x6E\x76\x6F\x78\x74\x74\x73","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x4C\x55\x4D\x45\x4E\x56\x4F\x58\x54\x54\x53\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6E\x6F\x20\x74\x65\x78\x74\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x22","\x2C","\x4D\x52\x43\x50\x53\x79\x6E\x74\x68","\x45\x78\x65\x63\x75\x74\x65\x64\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x4D\x52\x43\x50\x53\x79\x6E\x74\x68\x20\x25\x73","\x6C\x75\x6D\x65\x6E\x76\x6F\x78\x61\x73\x72","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x4C\x55\x4D\x45\x4E\x56\x4F\x58\x41\x53\x52\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x67\x72\x61\x6D\x6D\x61\x72","\x6E\x6F\x20\x67\x72\x61\x6D\x6D\x61\x72\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x4D\x52\x43\x50\x52\x65\x63\x6F\x67","\x52\x45\x43\x4F\x47\x5F\x43\x4F\x4E\x46\x49\x44\x45\x4E\x43\x45\x28\x29","\x4C\x55\x4D\x45\x4E\x56\x4F\x58\x5F\x41\x53\x52\x5F\x43\x4F\x4E\x46\x49\x44\x45\x4E\x43\x45","\x52\x45\x43\x4F\x47\x5F\x49\x4E\x50\x55\x54\x28\x29","\x4C\x55\x4D\x45\x4E\x56\x4F\x58\x5F\x41\x53\x52\x5F\x54\x52\x41\x4E\x53\x43\x52\x49\x50\x54","\x52\x45\x43\x4F\x47\x5F\x49\x4E\x53\x54\x41\x4E\x43\x45\x28\x29","\x4C\x55\x4D\x45\x4E\x56\x4F\x58\x5F\x41\x53\x52\x5F\x49\x4E\x53\x54\x41\x4E\x43\x45","\x45\x78\x65\x63\x75\x74\x65\x64\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x4D\x52\x43\x50\x52\x65\x63\x6F\x67\x20\x25\x73","\x64\x61\x74\x61\x62\x61\x73\x65","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x44\x41\x54\x41\x42\x41\x53\x45\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6F\x64\x62\x63\x5F\x69\x64","\x6E\x6F\x20\x64\x61\x74\x61\x62\x61\x73\x65\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x6E\x6F\x20\x6F\x64\x62\x63\x20\x64\x61\x74\x61\x62\x61\x73\x65\x20\x66\x6F\x75\x6E\x64","\x6E\x6F\x20\x71\x75\x65\x72\x79\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x20","\x71\x75\x65\x72\x79\x3A\x20\x25\x73","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64","\x6E\x6F\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x73\x65\x6C\x65\x63\x74\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x72\x65\x73\x75\x6C\x74","\x6E\x6F\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x66\x6F\x75\x6E\x64","\x25\x73\x5B\x25\x73\x5D\x5B\x25\x73\x5D","\x66\x6F\x72\x45\x61\x63\x68","\x6B\x65\x79\x73","\x25\x73\x5F\x52\x4F\x57\x53\x5F\x43\x4F\x55\x4E\x54","\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x25\x73\x20\x73\x65\x74","\x64\x69\x61\x6C","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x44\x49\x41\x4C\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x64\x65\x62\x75\x67","\x73\x69\x70\x5F\x69\x64","\x6E\x6F\x20\x75\x73\x65\x72\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x6E\x6F\x20\x75\x73\x65\x72\x20\x66\x6F\x75\x6E\x64","\x44\x49\x41\x4C","\x53\x49\x50\x2F\x25\x73","\x6F\x70\x74\x73","\x75\x72\x6C","\x45\x78\x65\x63\x75\x74\x65\x64\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x25\x73","\x65\x6E\x64","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x45\x4E\x44\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x65\x78\x74\x5F\x64\x69\x61\x6C","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x45\x58\x54\x45\x52\x4E\x41\x4C\x20\x44\x49\x41\x4C\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x74\x72\x75\x6E\x6B\x5F\x69\x64","\x6E\x6F\x20\x74\x72\x75\x6E\x6B\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x6E\x6F\x20\x74\x72\x75\x6E\x6B\x20\x66\x6F\x75\x6E\x64","\x74\x72\x75\x6E\x6B\x5F\x6E\x61\x6D\x65","\x53\x49\x50\x2F\x25\x73\x2F\x25\x73","\x66\x69\x6E\x61\x6C\x6C\x79","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x46\x49\x4E\x41\x4C\x4C\x59\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x47\x45\x54\x44\x49\x47\x49\x54\x53\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x66\x69\x6C\x65\x5F\x69\x64","\x6E\x6F\x20\x66\x69\x6C\x65\x20\x61\x75\x64\x69\x6F\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x6E\x6F\x20\x66\x69\x6C\x65\x20\x61\x75\x64\x69\x6F\x20\x66\x6F\x75\x6E\x64","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x6D\x61\x78\x64\x69\x67\x69\x74","\x67\x65\x74\x44\x61\x74\x61","\x74\x65\x73\x74","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6D\x69\x6E\x64\x69\x67\x69\x74","\x78","\x69","\x68\x69\x64\x64\x65\x6E\x64\x69\x67\x69\x74\x73\x6E\x75\x6D","\x2A","\x67\x65\x6E\x65\x72\x61\x74\x65","\x68\x69\x64\x64\x65\x6E\x64\x69\x67\x69\x74\x73\x70\x6F\x73","\x66\x69\x72\x73\x74","\x73\x75\x62\x73\x74\x72","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x47\x45\x54\x53\x45\x43\x52\x45\x54\x44\x49\x47\x49\x54\x53\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x67\x6F\x61\x6C","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x47\x4F\x41\x4C\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x67\x6F\x61\x6C\x6E\x61\x6D\x65","\x47\x4F\x41\x4C\x20\x25\x73","\x61\x77\x73\x70\x6F\x6C\x6C\x79","\x5B\x41\x47\x49\x5D\x20\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x41\x57\x53\x50\x4F\x4C\x4C\x59\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6E\x6F\x20\x76\x61\x6C\x69\x64\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x54\x72\x79\x69\x6E\x67\x20\x61\x77\x73\x20\x50\x6F\x6C\x6C\x79\x20\x25\x73","\x61\x77\x73\x20\x50\x6F\x6C\x6C\x79\x20\x25\x73\x20\x66\x69\x6C\x65\x20\x63\x72\x65\x61\x74\x65\x64","\x69\x6E\x74\x4B\x65\x79","\x73\x74\x72\x65\x61\x6D\x46\x69\x6C\x65","\x2E\x77\x61\x76","\x75\x6E\x6C\x69\x6E\x6B","\x61\x77\x73\x20\x50\x6F\x6C\x6C\x79\x20\x69\x73\x20\x75\x6E\x72\x65\x61\x63\x68\x61\x62\x6C\x65","\x67\x6F\x6F\x67\x6C\x65\x61\x73\x72","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x47\x4F\x4F\x47\x4C\x45\x41\x53\x52\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B\x20\x25\x73","\x6E\x6F\x20\x6B\x65\x79\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x77\x61\x76","\x25\x73\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73","\x25\x73\x2E\x25\x73","\x62\x65\x65\x70","\x4E\x4F\x42\x45\x45\x50","\x72\x65\x63\x6F\x72\x64\x46\x69\x6C\x65","\x67\x6F\x6F\x67\x6C\x65\x20\x25\x73\x20\x66\x69\x6C\x65\x20\x63\x72\x65\x61\x74\x65\x64","\x47\x4F\x4F\x47\x4C\x45\x5F\x41\x53\x52\x5F\x25\x73","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x47\x6F\x6F\x67\x6C\x65\x41\x53\x52\x20\x52\x65\x73\x75\x6C\x74\x20\x25\x73","\x74\x69\x6C\x64\x65\x61\x73\x72","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x54\x49\x4C\x44\x45\x41\x53\x52\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6E\x6F\x20\x61\x70\x70\x69\x64\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x6E\x6F\x20\x61\x70\x70\x73\x65\x63\x72\x65\x74\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x74\x69\x6C\x64\x65\x20\x25\x73\x20\x66\x69\x6C\x65\x20\x63\x72\x65\x61\x74\x65\x64","\x54\x49\x4C\x44\x45\x5F\x41\x53\x52\x5F\x25\x73","\x54\x69\x6C\x64\x65\x41\x53\x52\x20\x52\x65\x73\x75\x6C\x74\x20\x25\x73","\x67\x6F\x74\x6F\x63","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x47\x4F\x54\x4F\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x63\x6F\x6E\x74\x69\x6E\x75\x65\x41\x74","\x67\x6F\x74\x6F\x69\x66","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x47\x4F\x54\x4F\x49\x46\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x6E\x6F\x20\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x74\x72\x75\x65","\x66\x61\x6C\x73\x65","\x45\x56\x41\x4C\x20\x43\x4F\x4E\x44\x49\x54\x49\x4F\x4E\x20\x25\x73\x20\x25\x73","\x67\x6F\x74\x6F\x69\x66\x74\x69\x6D\x65","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x47\x4F\x54\x4F\x49\x46\x54\x49\x4D\x45\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x69\x6E\x74\x65\x72\x76\x61\x6C\x5F\x69\x64","\x6E\x6F\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x6E\x6F\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x73\x20\x66\x6F\x75\x6E\x64","\x49\x46\x54\x49\x4D\x45\x28\x25\x73\x3F\x74\x72\x75\x65\x3A\x66\x61\x6C\x73\x65\x29","\x49\x46\x54\x49\x4D\x45\x20\x25\x73\x20\x25\x73","\x68\x61\x6E\x67\x75\x70","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x48\x41\x4E\x47\x55\x50\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x69\x73\x70\x65\x65\x63\x68\x61\x73\x72","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x49\x53\x50\x45\x45\x43\x48\x41\x53\x52\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x69\x73\x70\x65\x65\x63\x68\x20\x25\x73\x20\x66\x69\x6C\x65\x20\x63\x72\x65\x61\x74\x65\x64","\x49\x53\x50\x45\x45\x43\x48\x5F\x41\x53\x52\x5F\x25\x73","\x49\x73\x70\x65\x65\x63\x68\x41\x53\x52\x20\x52\x65\x73\x75\x6C\x74\x20\x25\x73","\x69\x73\x70\x65\x65\x63\x68\x74\x74\x73","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x49\x53\x50\x45\x45\x43\x48\x54\x54\x53\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x54\x72\x79\x69\x6E\x67\x20\x69\x73\x70\x65\x65\x63\x68\x20\x54\x54\x53\x20\x25\x73","\x69\x73\x70\x65\x65\x63\x68\x20\x54\x54\x53\x20\x69\x73\x20\x75\x6E\x72\x65\x61\x63\x68\x61\x62\x6C\x65","\x6C\x6F\x67\x69\x6E","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x4C\x4F\x47\x49\x4E\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x66\x69\x6E\x64\x42\x79","\x6E\x6F\x20\x66\x69\x6E\x64\x20\x62\x79\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x46\x49\x4E\x44\x20\x41\x47\x45\x4E\x54\x20\x25\x73\x20\x42\x59\x20\x25\x73","\x41\x47\x45\x4E\x54\x20\x25\x73\x20\x46\x4F\x55\x4E\x44\x20\x42\x59","\x73\x75\x63\x63\x65\x73\x73","\x41\x47\x45\x4E\x54\x20\x25\x73\x20\x4E\x4F\x54\x20\x46\x4F\x55\x4E\x44\x20\x42\x59","\x66\x61\x69\x6C\x75\x72\x65","\x6C\x6F\x67\x6F\x75\x74","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x4C\x4F\x47\x4F\x55\x54\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6D\x61\x74\x68","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x4D\x41\x54\x48\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E","\x6E\x6F\x20\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x6D\x61\x74\x68\x20\x25\x73","\x69\x73\x41\x72\x72\x61\x79","\x25\x73\x5B\x25\x73\x5D","\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x25\x73\x5B\x6B\x65\x79\x5D\x20\x73\x65\x74","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x4D\x45\x4E\x55\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x64\x69\x67\x69\x74","\x74","\x23","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x4E\x4F\x4F\x50\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6F\x75\x74\x70\x75\x74","\x70\x61\x75\x73\x65","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x50\x41\x55\x53\x45\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x70\x61\x75\x73\x65\x5F\x69\x64","\x70\x6C\x61\x79\x62\x61\x63\x6B","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x50\x4C\x41\x59\x42\x41\x43\x4B\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x50\x4C\x41\x59\x42\x41\x43\x4B","\x71\x75\x65\x75\x65","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x51\x55\x45\x55\x45\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x71\x75\x65\x75\x65\x5F\x69\x64","\x6E\x6F\x20\x71\x75\x65\x75\x65\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x6E\x6F\x20\x71\x75\x65\x75\x65\x20\x66\x6F\x75\x6E\x64","\x69\x6E\x64\x65\x78\x4F\x66","\x58","\x58\x4D\x43\x53\x2D\x51\x55\x45\x55\x45","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x51\x55\x45\x55\x45","\x6D\x61\x63\x72\x6F","\x67\x6F\x73\x75\x62","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x72\x65\x63\x6F\x72\x64","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x52\x45\x43\x4F\x52\x44\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x25\x73\x5F\x25\x73","\x25\x73\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2E\x25\x73","\x52\x45\x43\x4F\x52\x44\x49\x4E\x47\x5F\x53\x41\x56\x45\x4E\x41\x4D\x45","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x25\x73\x20\x25\x73\x20\x25\x73\x20\x25\x73","\x65\x73\x63\x61\x70\x65\x5F\x64\x69\x67\x69\x74\x73","\x73\x61\x79\x64\x69\x67\x69\x74\x73","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x41\x59\x44\x49\x47\x49\x54\x53\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x64\x69\x67\x69\x74\x73","\x73\x61\x79\x44\x69\x67\x69\x74\x73","\x73\x61\x79\x6E\x75\x6D\x62\x65\x72","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x41\x59\x4E\x55\x4D\x42\x45\x52\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6E\x75\x6D\x62\x65\x72","\x73\x61\x79\x4E\x75\x6D\x62\x65\x72","\x73\x61\x79\x70\x68\x6F\x6E\x65\x74\x69\x63","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x41\x59\x50\x48\x4F\x4E\x45\x54\x49\x43\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x73\x61\x79\x50\x68\x6F\x6E\x65\x74\x69\x63","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x45\x4E\x44\x4D\x41\x49\x4C\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x61\x63\x63\x6F\x75\x6E\x74\x5F\x69\x64","\x6E\x6F\x20\x6D\x61\x69\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x53\x6D\x74\x70","\x6E\x6F\x20\x6D\x61\x69\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x66\x6F\x75\x6E\x64","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x65\x6D\x61\x69\x6C","\x75\x73\x65\x72","\x74\x6F","\x63\x63","\x62\x63\x63","\x73\x75\x62\x6A\x65\x63\x74","\x73\x65\x72\x76\x69\x63\x65","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x65\x63\x75\x72\x65","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E","\x61\x75\x74\x68","\x70\x61\x73\x73","\x74\x65\x6D\x70\x6C\x61\x74\x65\x5F\x69\x64","\x73\x65\x6E\x64\x4D\x61\x69\x6C\x20\x6D\x65\x73\x73\x61\x67\x65","\x54\x72\x79\x69\x6E\x67\x20\x53\x65\x6E\x64\x4D\x61\x69\x6C\x20\x77\x69\x74\x68\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x25\x73","\x4D\x61\x69\x6C\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x61\x64\x64\x65\x64\x20\x74\x6F\x20\x6F\x75\x74\x67\x6F\x69\x6E\x67\x20\x70\x72\x6F\x63\x65\x73\x73","\x73\x65\x6E\x64\x46\x61\x78","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x45\x4E\x44\x46\x41\x58\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x53\x45\x4E\x44\x46\x41\x58\x20\x62\x6C\x6F\x63\x6B\x20\x6E\x6F\x74\x20\x69\x6D\x70\x6C\x65\x6D\x65\x6E\x74\x65\x64","\x73\x65\x6E\x64\x53\x4D\x53","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x45\x4E\x44\x53\x4D\x53\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74\x5F\x69\x64","\x6E\x6F\x20\x73\x6D\x73\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x6E\x6F\x20\x73\x6D\x73\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x66\x6F\x75\x6E\x64","\x73\x6D\x73\x5F\x74\x65\x78\x74","\x69\x64","\x73\x65\x6E\x64\x53\x4D\x53\x20\x6D\x65\x73\x73\x61\x67\x65","\x54\x72\x79\x69\x6E\x67\x20\x53\x65\x6E\x64\x53\x4D\x53\x20\x77\x69\x74\x68\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x25\x73","\x53\x6D\x73\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x61\x64\x64\x65\x64\x20\x74\x6F\x20\x6F\x75\x74\x67\x6F\x69\x6E\x67\x20\x70\x72\x6F\x63\x65\x73\x73","\x73\x65\x74","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x45\x54\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6E\x6F\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x76\x61\x6C\x75\x65","\x73\x74\x61\x72\x74","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x54\x41\x52\x54\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x53\x54\x41\x52\x54\x20\x43\x41\x4C\x4C\x59\x20\x53\x51\x55\x41\x52\x45","\x79\x65\x73","\x41\x6E\x73\x77\x65\x72","\x53\x6B\x69\x70\x70\x65\x64\x20\x41\x6E\x73\x77\x65\x72","\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x55\x42\x50\x52\x4F\x4A\x45\x43\x54\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x70\x72\x6F\x6A\x65\x63\x74\x5F\x69\x64","\x6E\x6F\x20\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x6E\x6F\x20\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74\x20\x66\x6F\x75\x6E\x64\x20\x77\x69\x74\x68\x20\x69\x64\x20\x25\x64","\x70\x72\x6F\x6A\x65\x63\x74\x20\x69\x6E\x20\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x66\x72\x6F\x6D\x20\x74\x68\x65\x20\x63\x61\x6C\x6C\x65\x64\x20\x70\x72\x6F\x6A\x65\x63\x74","\x41\x47\x49","\x61\x67\x69\x3A\x2F\x2F\x25\x73\x2F\x73\x71\x75\x61\x72\x65\x2C\x22\x25\x73\x22\x2C\x22\x25\x73\x22","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31","\x73\x79\x73\x74\x65\x6D","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x59\x53\x54\x45\x4D\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x73\x68\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x3A\x20\x25\x73\x20\x72\x65\x73\x75\x6C\x74\x20\x6F\x6E\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x3A\x20\x25\x73","\x73\x68\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x3A\x20\x25\x73\x20\x72\x65\x73\x75\x6C\x74\x20\x6E\x6F\x20\x73\x74\x6F\x72\x65\x64","\x74\x74\x73","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x47\x4F\x4F\x47\x4C\x45\x54\x54\x53\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x54\x72\x79\x69\x6E\x67\x20\x47\x6F\x6F\x67\x6C\x65\x20\x54\x54\x53\x20\x25\x73","\x47\x6F\x6F\x67\x6C\x65\x20\x54\x54\x53\x20\x25\x73\x20\x66\x69\x6C\x65\x20\x63\x72\x65\x61\x74\x65\x64","\x47\x6F\x6F\x67\x6C\x65\x20\x54\x54\x53\x20\x69\x73\x20\x75\x6E\x72\x65\x61\x63\x68\x61\x62\x6C\x65","\x75\x6E\x70\x61\x75\x73\x65","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x55\x4E\x50\x41\x55\x53\x45\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x56\x4F\x49\x43\x45\x4D\x41\x49\x4C\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x56\x4F\x49\x43\x45\x4D\x41\x49\x4C","\x6D\x61\x69\x6C\x62\x6F\x78","\x76\x73\x77\x69\x74\x63\x68","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x57\x49\x54\x43\x48\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6A\x6F\x69\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x3153[0];var fs=require(_0x3153[1]);var path=require(_0x3153[2]);var util=require(_0x3153[3]);var _=require(_0x3153[4]);var sh=require(_0x3153[5]);var odbc=require(_0x3153[6])();var rs=require(_0x3153[7]);var moment=require(_0x3153[8]);var Mustache=require(_0x3153[9]);var logger=require(_0x3153[11])(_0x3153[10]);var config=require(_0x3153[12]);var scripts=require(_0x3153[13]);var FILES_PATH=_0x3153[14];var verticesWithRetry=[_0x3153[15],_0x3153[16],_0x3153[17]];var AGIVertices=function(_0x9004x10,_0x9004x11,_0x9004x12){this[_0x3153[18]]= _0x9004x10;this[_0x3153[19]]= _0x9004x11;this[_0x3153[20]]= _0x9004x12};AGIVertices[_0x3153[22]][_0x3153[21]]= function(_0x9004x13,_0x9004x14){this[_0x3153[19]][_0x3153[26]](_0x9004x13)[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,(_0x9004x16)?_0x9004x16[_0x3153[24]]:false)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[27]]= function(_0x9004x13,_0x9004x14){this[_0x3153[19]][_0x3153[28]](_0x9004x13)[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,(_0x9004x16)?_0x9004x16[_0x3153[24]]:false)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[29]]= function(_0x9004x13,_0x9004x14){this[_0x3153[19]][_0x3153[30]](_0x9004x13)[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,(_0x9004x16)?_0x9004x16[_0x3153[24]]:false)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[31]]= function(_0x9004x13,_0x9004x14){this[_0x3153[19]][_0x3153[33]](_0x9004x13)[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,(_0x9004x16)?_0x9004x16[_0x3153[32]]:false)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[34]]= function(_0x9004x13,_0x9004x14){this[_0x3153[19]][_0x3153[35]](_0x9004x13)[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,(_0x9004x16)?_0x9004x16[_0x3153[24]]:false)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[36]]= function(_0x9004x13,_0x9004x14){this[_0x3153[19]][_0x3153[37]](_0x9004x13)[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,(_0x9004x16)?_0x9004x16[_0x3153[24]]:false)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[38]]= function(_0x9004x13,_0x9004x14){var _0x9004x17=this;this[_0x3153[19]][_0x3153[41]](_0x9004x13)[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,(_0x9004x16)?_0x9004x17[_0x3153[40]](_0x9004x16[_0x3153[39]]):false)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[42]]= function(_0x9004x13,_0x9004x14){this[_0x3153[19]][_0x3153[43]](_0x9004x13)[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,(_0x9004x16)?_0x9004x16:false)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[44]]= function(_0x9004x18,_0x9004x19,_0x9004x14){this[_0x3153[20]][_0x3153[44]](_0x9004x18,_0x9004x19)[_0x3153[25]](function(){_0x9004x14(null)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[45]]= function(_0x9004x13,_0x9004x14){this[_0x3153[19]][_0x3153[49]](_0x9004x13)[_0x3153[25]](function(_0x9004x16){if(_0x9004x16){if(_0x9004x16[_0x3153[46]]){_0x9004x14(null,[_0x9004x16[_0x3153[47]]])}else {_0x9004x14(null,_[_0x3153[48]](_0x9004x16.Intervals,_0x3153[47]))}}else {_0x9004x14(null,false)}})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[40]]= function(_0x9004x1a){return util[_0x3153[51]](_0x3153[50],FILES_PATH,_0x9004x1a)};AGIVertices[_0x3153[22]][_0x3153[52]]= function(_0x9004x1b,_0x9004x1c,_0x9004x14){odbc[_0x3153[62]](_0x9004x1b,function(_0x9004x15){if(_0x9004x15){logger[_0x3153[54]](_0x3153[53],_0x9004x15);_0x9004x14(_0x9004x15)}else {logger[_0x3153[56]](_0x3153[55]);odbc[_0x3153[61]](_0x9004x1c,function(_0x9004x15,_0x9004x1d){if(_0x9004x15){logger[_0x3153[56]](_0x3153[57],_0x9004x1c);_0x9004x14(_0x9004x15)}else {logger[_0x3153[56]](_0x3153[58],_0x9004x1c);odbc[_0x3153[60]](function(_0x9004x15){if(_0x9004x15){logger[_0x3153[54]](_0x3153[59],_0x9004x15)};_0x9004x14(null,_0x9004x1d)})}})}})};AGIVertices[_0x3153[22]][_0x3153[63]]= function(_0x9004x13,_0x9004x14){this[_0x3153[19]][_0x3153[64]](_0x9004x13)[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,(_0x9004x16)?_0x9004x16:false)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[65]]= function(_0x9004x19,_0x9004x14){this[_0x3153[19]][_0x3153[65]](_0x9004x19)[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,_0x9004x16)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[66]]= function(_0x9004x1e,_0x9004x1d,_0x9004x14){this[_0x3153[19]][_0x3153[66]]({uniqueid:this[_0x3153[18]][_0x3153[67]],node:_0x9004x1e[_0x3153[68]],application:_0x9004x1e[_0x3153[69]],data:_0x9004x1d|| null,project_name:this[_0x3153[18]][_0x3153[70]],callerid:this[_0x3153[18]][_0x3153[71]]})[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,_0x9004x16)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[72]]= function(_0x9004x1e,_0x9004x1f,_0x9004x20,_0x9004x14){this[_0x3153[19]][_0x3153[72]]({uniqueid:this[_0x3153[18]][_0x3153[67]],callerid:this[_0x3153[18]][_0x3153[71]],calleridname:this[_0x3153[18]][_0x3153[73]],context:this[_0x3153[18]][_0x3153[74]],extension:this[_0x3153[18]][_0x3153[75]],priority:this[_0x3153[18]][_0x3153[76]],accountcode:this[_0x3153[18]][_0x3153[77]],dnid:this[_0x3153[18]][_0x3153[78]],projectName:this[_0x3153[18]][_0x3153[70]],saveName:_0x9004x1f,filename:_0x9004x1e[_0x3153[79]]|| _0x9004x1f,savePath:_0x9004x20})[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,_0x9004x16)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[80]]= function(_0x9004x21,_0x9004x14){this[_0x3153[19]][_0x3153[80]]({firstName:(_[_0x3153[81]](_0x9004x21[_0x3153[24]])|| _[_0x3153[82]](_0x9004x21[_0x3153[24]]))?(_0x3153[83]+ Math[_0x3153[84]]()):_0x9004x21[_0x3153[24]],lastName:(_[_0x3153[81]](_0x9004x21[_0x3153[85]])|| _[_0x3153[82]](_0x9004x21[_0x3153[85]]))?null:_0x9004x21[_0x3153[85]],phone:_0x9004x21[_0x3153[86]],ListId:_0x9004x21[_0x3153[87]],scheduledAt:_0x9004x21[_0x3153[88]],callbackUniqueid:this[_0x3153[18]][_0x3153[67]],tags:_0x3153[89],description:_0x3153[90]+ _0x9004x21[_0x3153[88]].toString(),priority:_0x9004x21[_0x3153[91]]})[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,_0x9004x16)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[92]]= function(_0x9004x13,_0x9004x14){this[_0x3153[19]][_0x3153[93]](_0x9004x13)[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,(_0x9004x16)?_0x9004x16[_0x3153[24]]:false)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[94]]= function(_0x9004x22,_0x9004x23,_0x9004x14){var _0x9004x24={role:_0x3153[95]};_0x9004x24[_0x9004x22]= this[_0x3153[18]][_0x3153[71]];this[_0x3153[19]][_0x3153[94]](_0x9004x24,_0x9004x23,this[_0x3153[18]][_0x3153[67]])[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,_[_0x3153[82]](_0x9004x16)?false:true)})[_0x3153[23]](function(_0x9004x15){logger[_0x3153[54]](_0x9004x15);_0x9004x14(null,false)})};AGIVertices[_0x3153[22]][_0x3153[96]]= function(_0x9004x22,_0x9004x14){var _0x9004x24={role:_0x3153[95]};_0x9004x24[_0x9004x22]= this[_0x3153[18]][_0x3153[71]];this[_0x3153[19]][_0x3153[96]](_0x9004x24)[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,_[_0x3153[82]](_0x9004x16)?false:true)})[_0x3153[23]](function(_0x9004x15){logger[_0x3153[54]](_0x9004x15);_0x9004x14(null,false)})};AGIVertices[_0x3153[22]][_0x3153[97]]= function(_0x9004x22,_0x9004x14){var _0x9004x24={role:_0x3153[95]};_0x9004x24[_0x9004x22]= this[_0x3153[18]][_0x3153[71]];this[_0x3153[19]][_0x3153[97]](_0x9004x24)[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,_[_0x3153[82]](_0x9004x16)?false:true)})[_0x3153[23]](function(_0x9004x15){logger[_0x3153[54]](_0x9004x15);_0x9004x14(null,false)})};AGIVertices[_0x3153[22]][_0x3153[98]]= function(_0x9004x22,_0x9004x14){var _0x9004x24={role:_0x3153[95]};_0x9004x24[_0x9004x22]= this[_0x3153[18]][_0x3153[71]];var _0x9004x25=_0x9004x22!= _0x3153[99]?util[_0x3153[51]](_0x3153[100],_0x3153[101],this[_0x3153[18]][_0x3153[71]]):undefined;this[_0x3153[19]][_0x3153[98]](_0x9004x24,_0x9004x25)[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,_[_0x3153[82]](_0x9004x16)?false:true)})[_0x3153[23]](function(_0x9004x15){logger[_0x3153[54]](_0x9004x15);_0x9004x14(null,false)})};AGIVertices[_0x3153[22]][_0x3153[102]]= function(_0x9004x26,_0x9004x14){sh[_0x3153[106]](_[_0x3153[103]](_0x9004x26),function(_0x9004x27,_0x9004x28){var _0x9004x29=_0x9004x28[_0x3153[105]](/(\r\n|\n|\r)/gm,_0x3153[104]);_0x9004x14(null,_0x9004x29)})};AGIVertices[_0x3153[22]][_0x3153[107]]= function(_0x9004x1e,_0x9004x14){scripts[_0x3153[107]](_0x9004x1e[_0x3153[108]],_0x9004x1e[_0x3153[109]]|| _0x3153[110],1)[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,_0x9004x16)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[111]]= function(_0x9004x1e,_0x9004x14){scripts[_0x3153[111]](_0x9004x1e[_0x3153[112]],_0x9004x1e[_0x3153[108]],_0x9004x1e[_0x3153[113]]|| _0x3153[114],_0x9004x1e[_0x3153[115]])[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,_0x9004x16)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[116]]= function(_0x9004x1e,_0x9004x2a,_0x9004x14){scripts[_0x3153[116]](_0x9004x2a,_0x9004x1e[_0x3153[112]],_0x9004x1e[_0x3153[117]]|| _0x3153[114],this[_0x3153[119]](_0x9004x1e[_0x3153[118]])?_0x9004x1e[_0x3153[118]]:undefined)[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,_0x9004x16)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[120]]= function(_0x9004x1e,_0x9004x14){scripts[_0x3153[120]](_0x9004x1e[_0x3153[121]],_0x9004x1e[_0x3153[122]],_0x9004x1e[_0x3153[123]],_0x9004x1e[_0x3153[124]]|| _0x3153[125],_0x9004x1e[_0x3153[108]])[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,_0x9004x16)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[126]]= function(_0x9004x1e,_0x9004x2a,_0x9004x14){scripts[_0x3153[126]](_0x9004x2a,_0x9004x1e[_0x3153[112]],_0x9004x1e[_0x3153[127]]|| _0x3153[114])[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,_0x9004x16)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[128]]= function(_0x9004x1e,_0x9004x2a,_0x9004x14){scripts[_0x3153[128]](_0x9004x2a,_0x9004x1e[_0x3153[129]],_0x9004x1e[_0x3153[130]],_0x9004x1e[_0x3153[131]])[_0x3153[25]](function(_0x9004x16){_0x9004x14(null,_0x9004x16)})[_0x3153[23]](function(_0x9004x15){_0x9004x14(_0x9004x15)})};AGIVertices[_0x3153[22]][_0x3153[132]]= function(_0x9004x1e){var _0x9004x24=_[_0x3153[133]](verticesWithRetry,_0x9004x1e[_0x3153[69]])?_0x9004x1e:_[_0x3153[134]](_0x9004x1e);for(var _0x9004x2b in _0x9004x24){if(_0x9004x24[_0x3153[135]](_0x9004x2b)){if(_0x9004x24[_0x9004x2b]&& _[_0x3153[136]](_0x9004x24[_0x9004x2b])){_0x9004x24[_0x9004x2b]= this[_0x3153[137]](_0x9004x24[_0x9004x2b])}}};return _0x9004x24};AGIVertices[_0x3153[22]][_0x3153[137]]= function(_0x9004x2c){var _0x9004x2d=_0x9004x2c[_0x3153[139]](_0x3153[138]);for(var _0x9004x2e=1;_0x9004x2e< _0x9004x2d[_0x3153[140]];_0x9004x2e+= 1){var _0x9004x2f=_0x9004x2d[_0x9004x2e][_0x3153[139]](_0x3153[141]);if(_0x9004x2f[_0x3153[140]]> 1){_0x9004x2c= _0x9004x2c[_0x3153[143]](_0x3153[138]+ _0x9004x2f[0]+ _0x3153[141],this[_0x3153[18]][_0x3153[21]](_0x9004x2f[0])[_0x3153[142]]|| (_0x9004x2f[0]))}};if(_0x9004x2d[_0x3153[140]]=== 1){return _0x9004x2c.toString()};return this[_0x3153[137]](_0x9004x2c)};AGIVertices[_0x3153[22]][_0x3153[144]]= function(_0x9004x30,_0x9004x31){var _0x9004x32=this[_0x3153[18]][_0x3153[21]](_0x9004x30);if(_0x9004x32[_0x3153[145]]===  -1){return _0x9004x32};logger[_0x3153[56]](util[_0x3153[51]](_0x3153[146],_0x9004x31,_0x9004x32[_0x3153[142]]));return this[_0x3153[18]][_0x3153[147]](_0x9004x31,_0x9004x32[_0x3153[142]])};AGIVertices[_0x3153[22]][_0x3153[119]]= function(_0x9004x33){return _0x9004x33&& _0x9004x33!== _0x3153[148]&& _0x9004x33!== _0x3153[149]&& _0x9004x33!== _0x3153[104]};AGIVertices[_0x3153[22]][_0x3153[150]]= function(_0x9004x1e){this[_0x3153[66]][_0x3153[152]](this,_0x9004x1e,_0x3153[151]);_0x9004x1e[_0x3153[153]]= _0x9004x1e[_0x3153[150]];return {code:200,result:_0x3153[151]}};AGIVertices[_0x3153[22]][_0x3153[10]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[154],_0x9004x1e[_0x3153[68]]));return this[_0x3153[18]][_0x3153[10]]([_0x9004x1e[_0x3153[155]],_0x9004x1e[_0x3153[156]]])};AGIVertices[_0x3153[22]][_0x3153[157]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[158],_0x9004x1e[_0x3153[68]]));if(this[_0x3153[119]](_0x9004x1e[_0x3153[159]])){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[160],_0x9004x1e[_0x3153[159]]));var _0x9004x1d=this[_0x3153[18]][_0x3153[161]](_0x9004x1e[_0x3153[159]]);if(_0x9004x1d[_0x3153[145]]===  -1){return _0x9004x1d}};return this[_0x3153[18]][_0x3153[157]]()};AGIVertices[_0x3153[22]][_0x3153[89]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[162],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[87]])){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[163])};_0x9004x1e[_0x3153[88]]= moment();if(this[_0x3153[119]](_0x9004x1e[_0x3153[164]])){_0x9004x1e[_0x3153[88]]= moment()[_0x3153[166]](_0x9004x1e[_0x3153[164]],_0x3153[165])};if(!this[_0x3153[119]](_0x9004x1e[_0x3153[91]])){_0x9004x1e[_0x3153[91]]= 2};this[_0x3153[80]][_0x3153[152]](this,_0x9004x1e);return this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[167],_0x9004x1e[_0x3153[86]],_0x9004x1e[_0x3153[87]],_0x9004x1e[_0x3153[88]]))};AGIVertices[_0x3153[22]][_0x3153[169]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[170],_0x9004x1e[_0x3153[68]]));var _0x9004x34=this[_0x3153[18]][_0x3153[106]](_0x9004x1e[_0x3153[171]],_0x9004x1e[_0x3153[172]]);if(_0x9004x34[_0x3153[145]]===  -1){return _0x9004x34};return this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[173],_0x9004x1e[_0x3153[171]],_0x9004x1e[_0x3153[172]]))};AGIVertices[_0x3153[22]][_0x3153[174]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[175],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[108]])){return this[_0x3153[18]][_0x3153[168]](_0x3153[176])};var _0x9004x35=_0x3153[177]+ _0x9004x1e[_0x3153[108]]+ _0x3153[177];if(this[_0x3153[119]](_0x9004x1e[_0x3153[172]])){_0x9004x35+= _0x3153[178]+ _0x9004x1e[_0x3153[172]]};var _0x9004x34=this[_0x3153[18]][_0x3153[106]](_0x3153[179],_0x9004x35);if(_0x9004x34[_0x3153[145]]===  -1){return _0x9004x34};return this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[180],_0x9004x35))};AGIVertices[_0x3153[22]][_0x3153[181]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[182],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[183]])){return this[_0x3153[18]][_0x3153[168]](_0x3153[184])};var _0x9004x35=_0x9004x1e[_0x3153[183]];if(this[_0x3153[119]](_0x9004x1e[_0x3153[172]])){_0x9004x35+= _0x3153[178]+ _0x9004x1e[_0x3153[172]]};var _0x9004x34=this[_0x3153[18]][_0x3153[106]](_0x3153[185],_0x9004x35);if(_0x9004x34[_0x3153[145]]===  -1){return _0x9004x34};var _0x9004x36=this[_0x3153[144]](_0x3153[186],_0x3153[187]);if(_0x9004x36[_0x3153[145]]===  -1){return _0x9004x36};var _0x9004x37=this[_0x3153[144]](_0x3153[188],_0x3153[189]);if(_0x9004x37[_0x3153[145]]===  -1){return _0x9004x37};var _0x9004x38=this[_0x3153[144]](_0x3153[190],_0x3153[191]);if(_0x9004x38[_0x3153[145]]===  -1){return _0x9004x38};return this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[192],_0x9004x35))};AGIVertices[_0x3153[22]][_0x3153[193]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[194],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[195]])){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[196])};var _0x9004x1b=this[_0x3153[31]][_0x3153[152]](this,_0x9004x1e[_0x3153[195]]);if(!_0x9004x1b){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[197])};if(!this[_0x3153[119]](_0x9004x1e[_0x3153[61]])){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[198])};var _0x9004x1c=_0x9004x1e[_0x3153[61]][_0x3153[105]](/(\r\n|\n|\r)/gm,_0x3153[199]);this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[200],_0x9004x1c));var _0x9004x39=this[_0x3153[52]][_0x3153[152]](this,_0x9004x1b,_0x9004x1c);this[_0x3153[66]][_0x3153[152]](this,_0x9004x1e,_0x9004x1c);if(!this[_0x3153[119]](_0x9004x1e[_0x3153[201]])){return this[_0x3153[18]][_0x3153[168]](_0x3153[202])};var _0x9004x3a=this[_0x3153[21]][_0x3153[152]](this,_0x9004x1e[_0x3153[201]]);if(!_0x9004x3a){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[203])};var _0x9004x17=this;_0x9004x39[_0x3153[205]](function(_0x9004x33,_0x9004x3b){Object[_0x3153[206]](_0x9004x33)[_0x3153[205]](function(_0x9004x2b){_0x9004x17[_0x3153[18]][_0x3153[147]](util[_0x3153[51]](_0x3153[204],_0x9004x3a,_0x9004x3b,_0x9004x2b),_0x9004x33[_0x9004x2b])})});this[_0x3153[18]][_0x3153[147]](util[_0x3153[51]](_0x3153[207],_0x9004x3a),_0x9004x39[_0x3153[140]]);return this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[208],_0x9004x3a))};AGIVertices[_0x3153[22]][_0x3153[209]]= function(_0x9004x1e){logger[_0x3153[211]](util[_0x3153[51]](_0x3153[210],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[212]])){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[213])};var _0x9004x3c=this[_0x3153[34]][_0x3153[152]](this,_0x9004x1e[_0x3153[212]]);if(!_0x9004x3c){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[214])};var _0x9004x34=this[_0x3153[18]][_0x3153[106]](_0x3153[215],[util[_0x3153[51]](_0x3153[216],_0x9004x3c),_0x9004x1e[_0x3153[159]],_0x9004x1e[_0x3153[217]],_0x9004x1e[_0x3153[218]]]);if(_0x9004x34[_0x3153[145]]===  -1){return _0x9004x34};return this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[219],_0x3153[215]))};AGIVertices[_0x3153[22]][_0x3153[220]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[221],_0x9004x1e[_0x3153[68]]));return this[_0x3153[18]][_0x3153[168]](_0x3153[220])};AGIVertices[_0x3153[22]][_0x3153[222]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[223],_0x9004x1e[_0x3153[68]]));var _0x9004x3d=_0x3153[104];if(_0x9004x1e[_0x3153[224]]){if(!this[_0x3153[119]](_0x9004x1e[_0x3153[224]])){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[225])}else {var _0x9004x13=parseInt(_0x9004x1e[_0x3153[224]],10);if(isNaN(_0x9004x13)){_0x9004x3d= _0x9004x1e[_0x3153[224]]}else {_0x9004x3d= this[_0x3153[36]][_0x3153[152]](this,_0x9004x1e[_0x3153[224]]);if(!_0x9004x3d){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[226])}}}}else {if(_0x9004x1e[_0x3153[227]]){_0x9004x3d= _0x9004x1e[_0x3153[227]]}else {return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[225])}};var _0x9004x34=this[_0x3153[18]][_0x3153[106]](_0x3153[215],[util[_0x3153[51]](_0x3153[228],_0x9004x3d,_0x9004x1e[_0x3153[86]]),_0x9004x1e[_0x3153[159]],_0x9004x1e[_0x3153[217]],_0x9004x1e[_0x3153[218]]]);if(_0x9004x34[_0x3153[145]]===  -1){return _0x9004x34};return this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[219],_0x3153[215]))};AGIVertices[_0x3153[22]][_0x3153[229]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[230],_0x9004x1e[_0x3153[68]]));return this[_0x3153[18]][_0x3153[168]](_0x3153[229])};AGIVertices[_0x3153[22]][_0x3153[16]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[231],_0x9004x1e[_0x3153[68]]));if(_0x9004x1e[_0x3153[153]]=== 0){return this[_0x3153[150]](_0x9004x1e)};_0x9004x1e[_0x3153[153]]-= 1;if(!this[_0x3153[119]](_0x9004x1e[_0x3153[232]])){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[233])};var _0x9004x3e=this[_0x3153[38]][_0x3153[152]](this,_0x9004x1e[_0x3153[232]]);if(!_0x9004x3e){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[234])};if(!this[_0x3153[119]](_0x9004x1e[_0x3153[201]])){return this[_0x3153[18]][_0x3153[54]](_0x3153[202])};var _0x9004x1d=this[_0x3153[18]][_0x3153[237]](_0x9004x3e,_0x9004x1e[_0x3153[235]],_0x9004x1e[_0x3153[236]]);var _0x9004x3f=_0x9004x1d[_0x3153[145]]?_0x9004x1d[_0x3153[145]].toString():_0x3153[104];logger[_0x3153[56]](_0x3153[238],JSON[_0x3153[239]](_0x9004x1d));if(_0x9004x1d[_0x3153[145]]===  -1){this[_0x3153[66]][_0x3153[152]](this,_0x9004x1e,_0x9004x3f);return _0x9004x1d}else {if(_0x9004x1d[_0x3153[142]]=== _0x3153[159]){_0x9004x1d[_0x3153[145]]= (_0x9004x3f[_0x3153[140]]>= parseInt(_0x9004x1e[_0x3153[240]]))?_0x3153[241]:_0x3153[242]}else {_0x9004x1d[_0x3153[145]]= ((_0x9004x3f[_0x3153[140]]>= parseInt(_0x9004x1e[_0x3153[240]]))&& (_0x9004x3f[_0x3153[140]]<= parseInt(_0x9004x1e[_0x3153[236]])))?_0x3153[241]:_0x3153[242]}};var _0x9004x3a=this[_0x3153[21]][_0x3153[152]](this,_0x9004x1e[_0x3153[201]]);if(!_0x9004x3a){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[203])};this[_0x3153[18]][_0x3153[147]](_0x9004x3a,_0x9004x3f);if(this[_0x3153[119]](_0x9004x1e[_0x3153[243]])){var _0x9004x40=parseInt(_0x9004x1e[_0x3153[243]],10);var _0x9004x33=rs[_0x3153[245]]({charset:_0x3153[244],length:_0x9004x40});var _0x9004x41=_0x9004x3f[_0x3153[140]];if(_0x9004x41> 0){if(_0x9004x41> _0x9004x40){this[_0x3153[66]][_0x3153[152]](this,_0x9004x1e,(_0x9004x1e[_0x3153[246]]=== _0x3153[247])?_0x9004x33+ _0x9004x3f[_0x3153[248]](_0x9004x40):_0x9004x3f[_0x3153[248]](0,_0x9004x41- _0x9004x40)+ _0x9004x33)}else {this[_0x3153[66]][_0x3153[152]](this,_0x9004x1e,rs[_0x3153[245]]({charset:_0x3153[244],length:_0x9004x41}))}}else {this[_0x3153[66]][_0x3153[152]](this,_0x9004x1e,_0x3153[104])}}else {this[_0x3153[66]][_0x3153[152]](this,_0x9004x1e,_0x9004x3f)};return _0x9004x1d};AGIVertices[_0x3153[22]][_0x3153[17]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[249],_0x9004x1e[_0x3153[68]]));return this[_0x3153[16]](_0x9004x1e)};AGIVertices[_0x3153[22]][_0x3153[250]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[251],_0x9004x1e[_0x3153[68]]));this[_0x3153[66]][_0x3153[152]](this,_0x9004x1e,_0x9004x1e[_0x3153[252]]);return this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[253],_0x9004x1e[_0x3153[252]]))};AGIVertices[_0x3153[22]][_0x3153[254]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[255],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[121]])||  !this[_0x3153[119]](_0x9004x1e[_0x3153[122]])){return this[_0x3153[18]][_0x3153[168]](_0x3153[256])};if(!this[_0x3153[119]](_0x9004x1e[_0x3153[108]])){return this[_0x3153[18]][_0x3153[168]](_0x3153[176])};this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[257],_0x9004x1e[_0x3153[108]]));var _0x9004x42=this[_0x3153[120]][_0x3153[152]](this,_0x9004x1e);if(_0x9004x42){this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[258],_0x9004x42));var _0x9004x1d=this[_0x3153[18]][_0x3153[260]](_0x9004x42,_0x9004x1e[_0x3153[259]]);try{fs[_0x3153[262]](_0x9004x42+ _0x3153[261])}catch(e){logger[_0x3153[54]](e)};return _0x9004x1d};return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[263])};AGIVertices[_0x3153[22]][_0x3153[264]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[265],_0x9004x1e[_0x3153[68]],_0x9004x1e[_0x3153[159]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[112]])){return this[_0x3153[18]][_0x3153[168]](_0x3153[266])};var _0x9004x43=_0x3153[267];var _0x9004x2a=util[_0x3153[51]](_0x3153[268],FILES_PATH,rs[_0x3153[245]](4));var _0x9004x1f=util[_0x3153[51]](_0x3153[269],_0x9004x2a,_0x9004x43);var _0x9004x44=true;if(_0x9004x1e[_0x3153[270]]=== _0x3153[271]){_0x9004x44= false};var _0x9004x1d=this[_0x3153[18]][_0x3153[272]](_0x9004x2a,_0x9004x43,_0x9004x1e[_0x3153[259]],_0x9004x1e[_0x3153[159]],undefined,_0x9004x44);if(_0x9004x1d[_0x3153[145]]!==  -1){this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[273],_0x9004x1f));var _0x9004x39=this[_0x3153[126]][_0x3153[152]](this,_0x9004x1e,_0x9004x1f);if(_0x9004x39){for(var _0x9004x2b in _0x9004x39){if(_0x9004x39[_0x3153[135]](_0x9004x2b)){this[_0x3153[18]][_0x3153[147]](util[_0x3153[51]](_0x3153[274],_0x9004x2b[_0x3153[275]]()),_0x9004x39[_0x9004x2b])}};return this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[276],JSON[_0x3153[239]](_0x9004x39)))}};return _0x9004x1d};AGIVertices[_0x3153[22]][_0x3153[277]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[278],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[129]])){return this[_0x3153[18]][_0x3153[168]](_0x3153[279])};if(!this[_0x3153[119]](_0x9004x1e[_0x3153[130]])){return this[_0x3153[18]][_0x3153[168]](_0x3153[280])};var _0x9004x43=_0x3153[267];var _0x9004x2a=util[_0x3153[51]](_0x3153[268],FILES_PATH,rs[_0x3153[245]](4));var _0x9004x1f=util[_0x3153[51]](_0x3153[269],_0x9004x2a,_0x9004x43);var _0x9004x44=true;if(_0x9004x1e[_0x3153[270]]=== _0x3153[271]){_0x9004x44= false};var _0x9004x1d=this[_0x3153[18]][_0x3153[272]](_0x9004x2a,_0x9004x43,_0x9004x1e[_0x3153[259]],_0x9004x1e[_0x3153[159]],undefined,_0x9004x44);if(_0x9004x1d[_0x3153[145]]!==  -1){this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[281],_0x9004x1f));var _0x9004x39=this[_0x3153[128]][_0x3153[152]](this,_0x9004x1e,_0x9004x1f);if(_0x9004x39){for(var _0x9004x2b in _0x9004x39){if(_0x9004x39[_0x3153[135]](_0x9004x2b)){this[_0x3153[18]][_0x3153[147]](util[_0x3153[51]](_0x3153[282],_0x9004x2b[_0x3153[275]]()),_0x9004x39[_0x9004x2b])}};return this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[283],JSON[_0x3153[239]](_0x9004x39)))}};return _0x9004x1d};AGIVertices[_0x3153[22]][_0x3153[284]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[285],_0x9004x1e[_0x3153[68]]));return this[_0x3153[18]][_0x3153[286]](_0x9004x1e[_0x3153[74]],_0x9004x1e[_0x3153[75]],_0x9004x1e[_0x3153[76]])};AGIVertices[_0x3153[22]][_0x3153[287]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[288],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[289]])){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[290])};try{var _0x9004x45=eval(_0x9004x1e[_0x3153[289]])?_0x3153[291]:_0x3153[292];this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[293],_0x9004x1e[_0x3153[289]],_0x9004x45));return {code:200,result:_0x9004x45}}catch(e){return {code:200,result:_0x3153[292]}}};AGIVertices[_0x3153[22]][_0x3153[294]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[295],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[296]])){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[297])};var _0x9004x46=this[_0x3153[45]][_0x3153[152]](this,_0x9004x1e[_0x3153[296]]);if(!_0x9004x46){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[298])};for(var _0x9004x2e=0;_0x9004x2e< _0x9004x46[_0x3153[140]];_0x9004x2e+= 1){var _0x9004x32=this[_0x3153[18]][_0x3153[21]](util[_0x3153[51]](_0x3153[299],_0x9004x46[_0x9004x2e]));if(_0x9004x32[_0x3153[145]]===  -1){return _0x9004x32};logger[_0x3153[56]](util[_0x3153[51]](_0x3153[300],_0x9004x46[_0x9004x2e],_0x9004x32[_0x3153[142]]));if(_0x9004x32[_0x3153[142]]=== _0x3153[291]){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[300],_0x9004x46[_0x9004x2e],_0x3153[291]));this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[300],_0x9004x46[_0x9004x2e],_0x3153[291]));return {code:200,result:_0x3153[291]}}else {logger[_0x3153[56]](util[_0x3153[51]](_0x3153[300],_0x9004x46[_0x9004x2e],_0x3153[292]));this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[300],_0x9004x46[_0x9004x2e],_0x3153[292]))}};return {code:200,result:_0x3153[292]}};AGIVertices[_0x3153[22]][_0x3153[301]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[302],_0x9004x1e[_0x3153[68]]));return this[_0x3153[18]][_0x3153[301]]()};AGIVertices[_0x3153[22]][_0x3153[303]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[304],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[112]])){return this[_0x3153[18]][_0x3153[168]](_0x3153[266])};var _0x9004x43=_0x3153[267];var _0x9004x2a=util[_0x3153[51]](_0x3153[268],FILES_PATH,rs[_0x3153[245]](4));var _0x9004x1f=util[_0x3153[51]](_0x3153[269],_0x9004x2a,_0x9004x43);var _0x9004x44=true;if(_0x9004x1e[_0x3153[270]]=== _0x3153[271]){_0x9004x44= false};var _0x9004x1d=this[_0x3153[18]][_0x3153[272]](_0x9004x2a,_0x9004x43,_0x9004x1e[_0x3153[259]],_0x9004x1e[_0x3153[159]],undefined,_0x9004x44);if(_0x9004x1d[_0x3153[145]]!==  -1){this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[305],_0x9004x1f));var _0x9004x39=this[_0x3153[116]][_0x3153[152]](this,_0x9004x1e,_0x9004x1f);if(_0x9004x39){for(var _0x9004x2b in _0x9004x39){if(_0x9004x39[_0x3153[135]](_0x9004x2b)){this[_0x3153[18]][_0x3153[147]](util[_0x3153[51]](_0x3153[306],_0x9004x2b[_0x3153[275]]()),_0x9004x39[_0x9004x2b])}};return this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[307],JSON[_0x3153[239]](_0x9004x39)))}};return _0x9004x1d};AGIVertices[_0x3153[22]][_0x3153[308]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[309],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[112]])){return this[_0x3153[18]][_0x3153[168]](_0x3153[266])};if(!this[_0x3153[119]](_0x9004x1e[_0x3153[108]])){return this[_0x3153[18]][_0x3153[168]](_0x3153[176])};this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[310],_0x9004x1e[_0x3153[108]]));var _0x9004x42=this[_0x3153[111]][_0x3153[152]](this,_0x9004x1e);if(_0x9004x42){this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[305],_0x9004x42));var _0x9004x1d=this[_0x3153[18]][_0x3153[260]](_0x9004x42,_0x9004x1e[_0x3153[259]]);try{fs[_0x3153[262]](_0x9004x42+ _0x3153[261])}catch(e){logger[_0x3153[54]](e)};return _0x9004x1d};return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[311])};AGIVertices[_0x3153[22]][_0x3153[312]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[313],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[314]])){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[315])};logger[_0x3153[56]](util[_0x3153[51]](_0x3153[316],this[_0x3153[18]][_0x3153[71]],_0x9004x1e[_0x3153[314]]));var _0x9004x47=this[_0x3153[98]][_0x3153[152]](this,_0x9004x1e[_0x3153[314]]);if(_0x9004x47){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[317],this[_0x3153[18]][_0x3153[71]],_0x9004x1e[_0x3153[314]]));this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[317],this[_0x3153[18]][_0x3153[71]],_0x9004x1e[_0x3153[314]]));return {code:200,result:_0x3153[318]}}else {logger[_0x3153[56]](util[_0x3153[51]](_0x3153[319],this[_0x3153[18]][_0x3153[71]],_0x9004x1e[_0x3153[314]]));this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[319],this[_0x3153[18]][_0x3153[71]],_0x9004x1e[_0x3153[314]]));return {code:200,result:_0x3153[320]}}};AGIVertices[_0x3153[22]][_0x3153[321]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[322],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[314]])){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[315])};logger[_0x3153[56]](util[_0x3153[51]](_0x3153[316],this[_0x3153[18]][_0x3153[71]],_0x9004x1e[_0x3153[314]]));var _0x9004x47=this[_0x3153[97]][_0x3153[152]](this,_0x9004x1e[_0x3153[314]]);if(_0x9004x47){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[317],this[_0x3153[18]][_0x3153[71]],_0x9004x1e[_0x3153[314]]));this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[317],this[_0x3153[18]][_0x3153[71]],_0x9004x1e[_0x3153[314]]));return {code:200,result:_0x3153[318]}}else {logger[_0x3153[56]](util[_0x3153[51]](_0x3153[319],this[_0x3153[18]][_0x3153[71]],_0x9004x1e[_0x3153[314]]));this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[319],this[_0x3153[18]][_0x3153[71]],_0x9004x1e[_0x3153[314]]));return {code:200,result:_0x3153[320]}}};AGIVertices[_0x3153[22]][_0x3153[323]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[324],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[325]])){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[326])};this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[327],_0x9004x1e[_0x3153[325]]));var _0x9004x39=eval(_0x9004x1e[_0x3153[325]]);if(!this[_0x3153[119]](_0x9004x1e[_0x3153[201]])){return this[_0x3153[18]][_0x3153[168]](_0x3153[202])};var _0x9004x3a=this[_0x3153[21]][_0x3153[152]](this,_0x9004x1e[_0x3153[201]]);if(!_0x9004x3a){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[203])};if(_[_0x3153[328]](_0x9004x39)){var _0x9004x17=this;_0x9004x39[_0x3153[205]](function(_0x9004x33,_0x9004x2b){_0x9004x17[_0x3153[18]][_0x3153[147]](util[_0x3153[51]](_0x3153[329],_0x9004x3a,_0x9004x2b),_0x9004x33)});return this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[330],_0x9004x3a))}else {return this[_0x3153[18]][_0x3153[147]](_0x9004x3a,_0x9004x39)}};AGIVertices[_0x3153[22]][_0x3153[15]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[331],_0x9004x1e[_0x3153[68]]));if(_0x9004x1e[_0x3153[153]]=== 0){return this[_0x3153[150]](_0x9004x1e)};_0x9004x1e[_0x3153[153]]-= 1;if(!this[_0x3153[119]](_0x9004x1e[_0x3153[232]])){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[233])};var _0x9004x3e=this[_0x3153[38]][_0x3153[152]](this,_0x9004x1e[_0x3153[232]]);if(!_0x9004x3e){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[234])};var _0x9004x1d=this[_0x3153[18]][_0x3153[237]](_0x9004x3e,_0x9004x1e[_0x3153[235]],_0x9004x1e[_0x3153[332]]);var _0x9004x3f=_0x9004x1d[_0x3153[145]];if(_0x9004x1d[_0x3153[145]]===  -1){this[_0x3153[66]][_0x3153[152]](this,_0x9004x1e,_0x3153[149]);return _0x9004x1d}else {if(_0x9004x1d[_0x3153[142]]=== _0x3153[159]){_0x9004x1d[_0x3153[145]]= (_0x9004x1d[_0x3153[145]][_0x3153[140]]> 0)?_0x9004x1d[_0x3153[145]]:_0x3153[333]}else {if(_[_0x3153[81]](_0x9004x1d[_0x3153[145]])){_0x9004x1d[_0x3153[145]]= _0x3153[334];_0x9004x3f= _0x3153[334]}}};if(!this[_0x3153[119]](_0x9004x1e[_0x3153[201]])){this[_0x3153[18]][_0x3153[168]](_0x3153[202])}else {var _0x9004x3a=this[_0x3153[21]][_0x3153[152]](this,_0x9004x1e[_0x3153[201]]);if(!_0x9004x3a){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[203])};this[_0x3153[18]][_0x3153[147]](_0x9004x3a,_0x9004x3f)};this[_0x3153[66]][_0x3153[152]](this,_0x9004x1e,_0x9004x3f);return _0x9004x1d};AGIVertices[_0x3153[22]][_0x3153[168]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[335],_0x9004x1e[_0x3153[68]]));return this[_0x3153[18]][_0x3153[168]](_0x9004x1e[_0x3153[336]]|| _0x9004x1e[_0x3153[68]])};AGIVertices[_0x3153[22]][_0x3153[337]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[338],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[314]])){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[315])};logger[_0x3153[56]](util[_0x3153[51]](_0x3153[316],this[_0x3153[18]][_0x3153[71]],_0x9004x1e[_0x3153[314]]));var _0x9004x48=this[_0x3153[92]][_0x3153[152]](this,_0x9004x1e[_0x3153[339]]);var _0x9004x47=this[_0x3153[94]][_0x3153[152]](this,_0x9004x1e[_0x3153[314]],_0x9004x48);if(_0x9004x47){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[317],this[_0x3153[18]][_0x3153[71]],_0x9004x1e[_0x3153[314]]));this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[317],this[_0x3153[18]][_0x3153[71]],_0x9004x1e[_0x3153[314]]));return {code:200,result:_0x3153[318]}}else {logger[_0x3153[56]](util[_0x3153[51]](_0x3153[319],this[_0x3153[18]][_0x3153[71]],_0x9004x1e[_0x3153[314]]));this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[317],this[_0x3153[18]][_0x3153[71]],_0x9004x1e[_0x3153[314]]));return {code:200,result:_0x3153[320]}}};AGIVertices[_0x3153[22]][_0x3153[340]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[341],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[232]])){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[233])};var _0x9004x3e=this[_0x3153[38]][_0x3153[152]](this,_0x9004x1e[_0x3153[232]]);if(!_0x9004x3e){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[234])};var _0x9004x34=this[_0x3153[18]][_0x3153[106]](_0x3153[342],[_0x9004x3e,_0x9004x1e[_0x3153[217]]]);if(_0x9004x34[_0x3153[145]]===  -1){return _0x9004x34};return this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[173],_0x3153[342],_0x9004x3e))};AGIVertices[_0x3153[22]][_0x3153[343]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[344],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[345]])){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[346])};var _0x9004x49=_0x3153[104];var _0x9004x13=parseInt(_0x9004x1e[_0x3153[345]],10);if(isNaN(_0x9004x13)){_0x9004x49= _0x9004x1e[_0x3153[345]]}else {_0x9004x49= this[_0x3153[27]][_0x3153[152]](this,_0x9004x1e[_0x3153[345]]);if(!_0x9004x49){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[347])}};var _0x9004x4a=_0x3153[104];if(this[_0x3153[119]](_0x9004x1e[_0x3153[232]])){var _0x9004x4b=this[_0x3153[38]][_0x3153[152]](this,_0x9004x1e[_0x3153[232]]);if(_0x9004x4b){_0x9004x4a= _0x9004x4b}};this[_0x3153[66]][_0x3153[152]](this,_0x9004x1e,_0x9004x49);if(_0x9004x1e[_0x3153[217]][_0x3153[348]](_0x3153[241])< 0){_0x9004x1e[_0x3153[217]]+= _0x3153[241]};if(_0x9004x1e[_0x3153[217]][_0x3153[348]](_0x3153[349])< 0){_0x9004x1e[_0x3153[217]]+= _0x3153[349]};this[_0x3153[18]][_0x3153[147]](_0x3153[350],_0x9004x49?_0x9004x49[_0x3153[351]]():_0x3153[104]);var _0x9004x34=this[_0x3153[18]][_0x3153[106]](_0x3153[352],[_0x9004x49,_0x9004x1e[_0x3153[217]],_0x9004x1e[_0x3153[218]],_0x9004x4a,_0x9004x1e[_0x3153[159]],_0x9004x1e[_0x3153[10]],_0x9004x1e[_0x3153[353]],_0x9004x1e[_0x3153[354]],_0x3153[104],_0x9004x1e[_0x3153[355]]]);if(_0x9004x34[_0x3153[145]]===  -1){return _0x9004x34};return this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[173],_0x3153[352],_0x9004x49))};AGIVertices[_0x3153[22]][_0x3153[356]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[357],_0x9004x1e[_0x3153[68]]));var _0x9004x43=_0x9004x1e[_0x3153[358]]|| _0x3153[267];var _0x9004x1f=util[_0x3153[51]](_0x3153[359],this[_0x3153[18]][_0x3153[67]],rs[_0x3153[245]](5));var _0x9004x20=util[_0x3153[51]](_0x3153[360],FILES_PATH,_0x9004x1f,_0x9004x43);var _0x9004x4c=util[_0x3153[51]](_0x3153[268],FILES_PATH,_0x9004x1f);this[_0x3153[72]][_0x3153[152]](this,_0x9004x1e,_0x9004x1f,_0x9004x20);this[_0x3153[18]][_0x3153[147]](_0x3153[361],_0x9004x1f);logger[_0x3153[56]](_0x3153[362],_0x9004x4c,_0x9004x43,_0x9004x1e[_0x3153[363]],_0x9004x1e[_0x3153[159]]);return this[_0x3153[18]][_0x3153[272]](_0x9004x4c,_0x9004x43,_0x9004x1e[_0x3153[363]],_0x9004x1e[_0x3153[159]],undefined,true)};AGIVertices[_0x3153[22]][_0x3153[364]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[365],_0x9004x1e[_0x3153[68]]));return this[_0x3153[18]][_0x3153[367]](_0x9004x1e[_0x3153[366]][_0x3153[105]](/\s+/g,_0x3153[104]),_0x9004x1e[_0x3153[363]])};AGIVertices[_0x3153[22]][_0x3153[368]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[369],_0x9004x1e[_0x3153[68]]));return this[_0x3153[18]][_0x3153[371]](_0x9004x1e[_0x3153[370]][_0x3153[105]](/\s+/g,_0x3153[104]),_0x9004x1e[_0x3153[363]])};AGIVertices[_0x3153[22]][_0x3153[372]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[373],_0x9004x1e[_0x3153[68]]));return this[_0x3153[18]][_0x3153[374]](_0x9004x1e[_0x3153[108]],_0x9004x1e[_0x3153[363]])};AGIVertices[_0x3153[22]][_0x3153[375]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[376],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[377]])){return this[_0x3153[18]][_0x3153[168]](_0x3153[378])};var _0x9004x4d=this[_0x3153[42]][_0x3153[152]](this,_0x9004x1e[_0x3153[377]]);if(!_0x9004x4d||  !_0x9004x4d[_0x3153[379]]){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[380])};var _0x9004x19={from:util[_0x3153[51]](_0x3153[381],_0x9004x4d[_0x3153[24]],_0x9004x4d[_0x3153[382]]|| _0x9004x4d[_0x3153[379]][_0x3153[383]]),to:_0x9004x1e[_0x3153[384]]|| _0x3153[104],cc:_0x9004x1e[_0x3153[385]]|| _0x3153[104],bcc:_0x9004x1e[_0x3153[386]]|| _0x3153[104],subject:_0x9004x1e[_0x3153[387]],html:_0x9004x1e[_0x3153[108]],text:_0x9004x1e[_0x3153[108]]};var _0x9004x18={tls:{rejectUnauthorized:false}};if(_0x9004x4d[_0x3153[379]][_0x3153[388]]){_0x9004x18[_0x3153[388]]= _0x9004x4d[_0x3153[379]][_0x3153[388]]}else {_0x9004x18[_0x3153[389]]= _0x9004x4d[_0x3153[379]][_0x3153[389]];_0x9004x18[_0x3153[390]]= _0x9004x4d[_0x3153[379]][_0x3153[390]];_0x9004x18[_0x3153[391]]= _0x9004x4d[_0x3153[379]][_0x3153[391]]};if(_0x9004x4d[_0x3153[379]][_0x3153[392]]){_0x9004x18[_0x3153[393]]= {user:_0x9004x4d[_0x3153[379]][_0x3153[383]],pass:_0x9004x4d[_0x3153[379]][_0x3153[394]]}};if(this[_0x3153[119]](_0x9004x1e[_0x3153[395]])){};logger[_0x3153[211]](_0x3153[396],JSON[_0x3153[239]](_0x9004x19));this[_0x3153[66]][_0x3153[152]](this,_0x9004x1e,_0x9004x1e[_0x3153[377]]);this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[397],_0x9004x4d[_0x3153[24]]));this[_0x3153[44]][_0x3153[152]](this,_0x9004x18,_0x9004x19);return this[_0x3153[18]][_0x3153[168]](_0x3153[398])};AGIVertices[_0x3153[22]][_0x3153[399]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[400],_0x9004x1e[_0x3153[68]]));return this[_0x3153[18]][_0x3153[168]](_0x3153[401])};AGIVertices[_0x3153[22]][_0x3153[402]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[403],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[404]])){return this[_0x3153[18]][_0x3153[168]](_0x3153[405])};var _0x9004x4e=this[_0x3153[63]][_0x3153[152]](this,_0x9004x1e[_0x3153[404]]);if(!_0x9004x4e){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[406])};var _0x9004x19={body:_0x9004x1e[_0x3153[407]],phone:_0x9004x1e[_0x3153[384]]|| _0x3153[104],SmsAccountId:_0x9004x4e[_0x3153[408]]};logger[_0x3153[211]](_0x3153[409],JSON[_0x3153[239]](_0x9004x19));this[_0x3153[66]][_0x3153[152]](this,_0x9004x1e,_0x9004x1e[_0x3153[404]]);this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[410],_0x9004x4e[_0x3153[24]]));this[_0x3153[65]][_0x3153[152]](this,_0x9004x19);return this[_0x3153[18]][_0x3153[168]](_0x3153[411])};AGIVertices[_0x3153[22]][_0x3153[412]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[413],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[201]])){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[414])};var _0x9004x3a=this[_0x3153[21]][_0x3153[152]](this,_0x9004x1e[_0x3153[201]]);if(!_0x9004x3a){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[203])};return this[_0x3153[18]][_0x3153[147]](_0x9004x3a,_0x9004x1e[_0x3153[415]])};AGIVertices[_0x3153[22]][_0x3153[416]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[417],_0x9004x1e[_0x3153[68]]));this[_0x3153[18]][_0x3153[168]](_0x3153[418]);if(_0x9004x1e[_0x3153[157]]=== _0x3153[419]){this[_0x3153[18]][_0x3153[168]](_0x3153[420]);return this[_0x3153[18]][_0x3153[157]]()};return this[_0x3153[18]][_0x3153[168]](_0x3153[421])};AGIVertices[_0x3153[22]][_0x3153[422]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[423],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[424]])){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[425])};var _0x9004x4f=this[_0x3153[29]][_0x3153[152]](this,_0x9004x1e[_0x3153[424]]);if(!this[_0x3153[119]](_0x9004x4f)){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,util[_0x3153[51]](_0x3153[426],_0x9004x1e[_0x3153[424]]))};if(_0x9004x4f=== this[_0x3153[18]][_0x3153[70]]){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[427])};this[_0x3153[66]][_0x3153[152]](this,_0x9004x1e,_0x9004x4f);var _0x9004x34=this[_0x3153[18]][_0x3153[106]](_0x3153[428],util[_0x3153[51]](_0x3153[429],config[_0x3153[10]][_0x3153[389]]|| _0x3153[430],_0x9004x4f,this[_0x3153[18]][_0x3153[70]]));if(_0x9004x34[_0x3153[145]]===  -1){return _0x9004x34};return this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[173],_0x3153[428],_0x9004x4f))};AGIVertices[_0x3153[22]][_0x3153[431]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[432],_0x9004x1e[_0x3153[68]]));var _0x9004x28=this[_0x3153[102]][_0x3153[152]](this,_0x9004x1e[_0x3153[155]]);this[_0x3153[66]][_0x3153[152]](this,_0x9004x1e,_0x9004x1e[_0x3153[155]]);if(this[_0x3153[119]](_0x9004x1e[_0x3153[201]])){var _0x9004x3a=this[_0x3153[21]][_0x3153[152]](this,_0x9004x1e[_0x3153[201]]);if(_0x9004x3a){this[_0x3153[18]][_0x3153[147]](_0x9004x3a,_0x9004x28);return this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[433],_0x9004x1e[_0x3153[155]],_0x9004x3a))}};return this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[434],_0x9004x1e[_0x3153[155]]))};AGIVertices[_0x3153[22]][_0x3153[435]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[436],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[108]])){return this[_0x3153[18]][_0x3153[168]](_0x3153[176])};this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[437],_0x9004x1e[_0x3153[108]]));var _0x9004x42=this[_0x3153[107]][_0x3153[152]](this,_0x9004x1e);if(_0x9004x42){this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[438],_0x9004x42));var _0x9004x1d=this[_0x3153[18]][_0x3153[260]](_0x9004x42);try{fs[_0x3153[262]](_0x9004x42+ _0x3153[261])}catch(e){logger[_0x3153[54]](e)};return _0x9004x1d};return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[439])};AGIVertices[_0x3153[22]][_0x3153[440]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[441],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[314]])){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[315])};logger[_0x3153[56]](util[_0x3153[51]](_0x3153[316],this[_0x3153[18]][_0x3153[71]],_0x9004x1e[_0x3153[314]]));var _0x9004x47=this[_0x3153[96]][_0x3153[152]](this,_0x9004x1e[_0x3153[314]]);if(_0x9004x47){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[317],this[_0x3153[18]][_0x3153[71]],_0x9004x1e[_0x3153[314]]));this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[317],this[_0x3153[18]][_0x3153[71]],_0x9004x1e[_0x3153[314]]));return {code:200,result:_0x3153[318]}}else {logger[_0x3153[56]](util[_0x3153[51]](_0x3153[319],this[_0x3153[18]][_0x3153[71]],_0x9004x1e[_0x3153[314]]));this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[319],this[_0x3153[18]][_0x3153[71]],_0x9004x1e[_0x3153[314]]));return {code:200,result:_0x3153[320]}}};AGIVertices[_0x3153[22]][_0x3153[442]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[443],_0x9004x1e[_0x3153[68]]));var _0x9004x34=this[_0x3153[18]][_0x3153[106]](_0x3153[444],[_0x9004x1e[_0x3153[445]],_0x9004x1e[_0x3153[172]]]);if(_0x9004x34[_0x3153[145]]===  -1){return _0x9004x34};return this[_0x3153[18]][_0x3153[168]](util[_0x3153[51]](_0x3153[173],_0x3153[444],_0x9004x1e[_0x3153[445]]))};AGIVertices[_0x3153[22]][_0x3153[446]]= function(_0x9004x1e){logger[_0x3153[56]](util[_0x3153[51]](_0x3153[447],_0x9004x1e[_0x3153[68]]));if(!this[_0x3153[119]](_0x9004x1e[_0x3153[201]])){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[414])};var _0x9004x3a=this[_0x3153[21]][_0x3153[152]](this,_0x9004x1e[_0x3153[201]]);if(!_0x9004x3a){return this[_0x3153[18]][_0x3153[54]](_0x9004x1e,_0x3153[203])};var _0x9004x32=this[_0x3153[18]][_0x3153[21]](_0x9004x3a);return {code:200,result:(_0x9004x32[_0x3153[142]])?_0x9004x32[_0x3153[142]]:_0x3153[151]}};String[_0x3153[22]][_0x3153[143]]= function(_0x9004x50,_0x9004x51){return this[_0x3153[139]](_0x9004x50)[_0x3153[448]](_0x9004x51)};module[_0x3153[449]]= AGIVertices
\ No newline at end of file
+var _0xae25=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x70\x61\x74\x68","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x73\x68\x65\x6C\x6C\x6A\x73","\x6F\x64\x62\x63","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x75\x73\x74\x61\x63\x68\x65","\x61\x67\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x63\x72\x69\x70\x74\x73","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x32\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73","\x6D\x65\x6E\x75","\x67\x65\x74\x64\x69\x67\x69\x74\x73","\x67\x65\x74\x73\x65\x63\x72\x65\x74\x64\x69\x67\x69\x74\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x72\x70\x63","\x6D\x61\x69\x6C\x52\x70\x63","\x67\x65\x74\x56\x61\x72\x69\x61\x62\x6C\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x61\x74\x63\x68","\x6E\x61\x6D\x65","\x74\x68\x65\x6E","\x67\x65\x74\x56\x61\x72\x69\x61\x62\x6C\x65\x42\x79\x49\x64","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x42\x79\x49\x64","\x67\x65\x74\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x67\x65\x74\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74\x42\x79\x49\x64","\x67\x65\x74\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x64\x73\x6E","\x67\x65\x74\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63\x42\x79\x49\x64","\x67\x65\x74\x55\x73\x65\x72","\x67\x65\x74\x55\x73\x65\x72\x42\x79\x49\x64","\x67\x65\x74\x54\x72\x75\x6E\x6B","\x67\x65\x74\x54\x72\x75\x6E\x6B\x42\x79\x49\x64","\x67\x65\x74\x53\x6F\x75\x6E\x64","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x67\x65\x74\x53\x6F\x75\x6E\x64\x50\x61\x74\x68","\x67\x65\x74\x53\x6F\x75\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x67\x65\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x42\x79\x49\x64","\x73\x65\x6E\x64\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x67\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x6D\x61\x70","\x67\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x42\x79\x49\x64","\x25\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x2F\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x67\x65\x74\x51\x75\x65\x72\x79\x4F\x64\x62\x63","\x45\x72\x72\x6F\x72\x20\x67\x65\x74\x74\x69\x6E\x67\x20\x4F\x44\x42\x43\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x25\x73","\x65\x72\x72\x6F\x72","\x4F\x44\x42\x43\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79","\x69\x6E\x66\x6F","\x45\x72\x72\x6F\x72\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x71\x75\x65\x72\x79\x20\x25\x73","\x51\x75\x65\x72\x79\x20\x65\x78\x65\x63\x75\x74\x65\x64\x20\x63\x6F\x72\x72\x65\x63\x74\x6C\x79\x20\x25\x73","\x45\x72\x72\x6F\x72\x20\x63\x6C\x6F\x73\x69\x6E\x67\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x6F\x64\x62\x63\x20\x25\x73","\x63\x6C\x6F\x73\x65","\x71\x75\x65\x72\x79","\x6F\x70\x65\x6E","\x67\x65\x74\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x67\x65\x74\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x73\x52\x65\x70\x6F\x72\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x6C\x61\x62\x65\x6C","\x61\x67\x69\x63\x6F\x6D\x6D\x61\x6E\x64","\x61\x72\x67\x5F\x31","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x63\x72\x65\x61\x74\x65\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x70\x72\x69\x6F\x72\x69\x74\x79","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x64\x6E\x69\x64","\x66\x69\x6C\x65","\x63\x72\x65\x61\x74\x65\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x69\x73\x45\x6D\x70\x74\x79","\x69\x73\x4E\x69\x6C","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x5F","\x72\x61\x6E\x64\x6F\x6D","\x6C\x61\x73\x74\x4E\x61\x6D\x65","\x70\x68\x6F\x6E\x65","\x6C\x69\x73\x74\x5F\x69\x64","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x43\x61\x6C\x6C\x62\x61\x63\x6B\x20\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x20\x61\x74\x20","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x5F\x70\x72\x69\x6F\x72\x69\x74\x79","\x67\x65\x74\x50\x61\x75\x73\x65","\x67\x65\x74\x50\x61\x75\x73\x65\x42\x79\x49\x64","\x61\x67\x65\x6E\x74\x50\x61\x75\x73\x65","\x61\x67\x65\x6E\x74","\x61\x67\x65\x6E\x74\x55\x6E\x70\x61\x75\x73\x65","\x61\x67\x65\x6E\x74\x4C\x6F\x67\x6F\x75\x74","\x61\x67\x65\x6E\x74\x4C\x6F\x67\x69\x6E","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x25\x73\x2F\x25\x73\x40\x66\x72\x6F\x6D\x2D\x73\x69\x70\x2F\x6E","\x4C\x4F\x43\x41\x4C","\x73\x68\x65\x6C\x6C\x43\x6F\x6D\x6D\x61\x6E\x64","\x74\x72\x69\x6D","","\x72\x65\x70\x6C\x61\x63\x65","\x65\x78\x65\x63","\x67\x6F\x6F\x67\x6C\x65\x54\x54\x53","\x74\x65\x78\x74","\x67\x6F\x6F\x67\x6C\x65\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x65\x6E","\x69\x73\x70\x65\x65\x63\x68\x54\x54\x53","\x6B\x65\x79","\x69\x73\x70\x65\x65\x63\x68\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x65\x6E\x2D\x55\x53","\x73\x70\x65\x65\x64","\x69\x73\x70\x65\x65\x63\x68\x41\x53\x52","\x69\x73\x70\x65\x65\x63\x68\x5F\x61\x73\x72\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x6D\x6F\x64\x65\x6C","\x69\x73\x43\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x61\x77\x73\x50\x6F\x6C\x6C\x79","\x61\x77\x73\x5F\x61\x63\x63\x65\x73\x73\x5F\x6B\x65\x79\x5F\x69\x64","\x61\x77\x73\x5F\x73\x65\x63\x72\x65\x74\x5F\x61\x63\x63\x65\x73\x73\x5F\x6B\x65\x79","\x61\x77\x73\x5F\x70\x6F\x6C\x6C\x79\x5F\x72\x65\x67\x69\x6F\x6E","\x61\x77\x73\x5F\x70\x6F\x6C\x6C\x79\x5F\x76\x6F\x69\x63\x65","\x41\x6D\x79","\x67\x6F\x6F\x67\x6C\x65\x41\x53\x52","\x67\x6F\x6F\x67\x6C\x65\x5F\x61\x73\x72\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x74\x69\x6C\x64\x65\x41\x53\x52","\x61\x70\x70\x69\x64","\x61\x70\x70\x73\x65\x63\x72\x65\x74","\x75\x72\x69","\x63\x6C\x65\x61\x72","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x63\x6C\x6F\x6E\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x69\x73\x53\x74\x72\x69\x6E\x67","\x72\x65\x70\x6C\x61\x63\x65\x41\x6C\x6C\x56\x61\x72\x69\x61\x62\x6C\x65\x73","\x7B","\x73\x70\x6C\x69\x74","\x6C\x65\x6E\x67\x74\x68","\x7D","\x65\x78\x74\x72\x61","\x72\x65\x70\x6C\x61\x63\x65\x41\x6C\x6C","\x67\x65\x74\x41\x6E\x64\x53\x65\x74\x56\x61\x72\x69\x61\x62\x6C\x65","\x72\x65\x73\x75\x6C\x74","\x54\x68\x65\x20\x22\x25\x73\x22\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x76\x61\x6C\x75\x65\x20\x69\x73\x3A\x20\x25\x73","\x73\x65\x74\x56\x61\x72\x69\x61\x62\x6C\x65","\x30","\x2D\x31","\x6D\x61\x78\x52\x65\x74\x72\x79","\x2D","\x73\x79\x6E\x63","\x72\x65\x74\x72\x79","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x41\x47\x49\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x63\x6F\x6D\x6D\x61\x6E\x64","\x61\x72\x67\x73","\x61\x6E\x73\x77\x65\x72","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x41\x4E\x53\x57\x45\x52\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x74\x69\x6D\x65\x6F\x75\x74","\x57\x61\x69\x74\x20\x25\x73\x20\x73\x65\x63\x6F\x6E\x64\x73\x20\x62\x65\x66\x6F\x72\x65\x20\x61\x6E\x73\x77\x65\x72","\x77\x61\x69\x74","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x43\x41\x4C\x4C\x42\x41\x43\x4B\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6E\x6F\x20\x6C\x69\x73\x74\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x64\x65\x6C\x61\x79","\x6D\x69\x6E\x75\x74\x65\x73","\x61\x64\x64","\x43\x41\x4C\x4C\x42\x41\x43\x4B\x20\x61\x64\x64\x65\x64\x20\x70\x68\x6F\x6E\x65\x3A\x20\x25\x73\x20\x6F\x6E\x20\x6C\x69\x73\x74\x3A\x20\x25\x73\x20\x61\x74\x20\x25\x73","\x6E\x6F\x6F\x70","\x63\x75\x73\x74\x6F\x6D\x5F\x61\x70\x70","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x43\x55\x53\x54\x4F\x4D\x20\x41\x50\x50\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6F\x70\x74\x69\x6F\x6E\x73","\x45\x78\x65\x63\x75\x74\x65\x64\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x25\x73\x20\x25\x73","\x6C\x75\x6D\x65\x6E\x76\x6F\x78\x74\x74\x73","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x4C\x55\x4D\x45\x4E\x56\x4F\x58\x54\x54\x53\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6E\x6F\x20\x74\x65\x78\x74\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x22","\x2C","\x4D\x52\x43\x50\x53\x79\x6E\x74\x68","\x45\x78\x65\x63\x75\x74\x65\x64\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x4D\x52\x43\x50\x53\x79\x6E\x74\x68\x20\x25\x73","\x6C\x75\x6D\x65\x6E\x76\x6F\x78\x61\x73\x72","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x4C\x55\x4D\x45\x4E\x56\x4F\x58\x41\x53\x52\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x67\x72\x61\x6D\x6D\x61\x72","\x6E\x6F\x20\x67\x72\x61\x6D\x6D\x61\x72\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x4D\x52\x43\x50\x52\x65\x63\x6F\x67","\x52\x45\x43\x4F\x47\x5F\x43\x4F\x4E\x46\x49\x44\x45\x4E\x43\x45\x28\x29","\x4C\x55\x4D\x45\x4E\x56\x4F\x58\x5F\x41\x53\x52\x5F\x43\x4F\x4E\x46\x49\x44\x45\x4E\x43\x45","\x52\x45\x43\x4F\x47\x5F\x49\x4E\x50\x55\x54\x28\x29","\x4C\x55\x4D\x45\x4E\x56\x4F\x58\x5F\x41\x53\x52\x5F\x54\x52\x41\x4E\x53\x43\x52\x49\x50\x54","\x52\x45\x43\x4F\x47\x5F\x49\x4E\x53\x54\x41\x4E\x43\x45\x28\x29","\x4C\x55\x4D\x45\x4E\x56\x4F\x58\x5F\x41\x53\x52\x5F\x49\x4E\x53\x54\x41\x4E\x43\x45","\x45\x78\x65\x63\x75\x74\x65\x64\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x4D\x52\x43\x50\x52\x65\x63\x6F\x67\x20\x25\x73","\x64\x61\x74\x61\x62\x61\x73\x65","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x44\x41\x54\x41\x42\x41\x53\x45\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6F\x64\x62\x63\x5F\x69\x64","\x6E\x6F\x20\x64\x61\x74\x61\x62\x61\x73\x65\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x6E\x6F\x20\x6F\x64\x62\x63\x20\x64\x61\x74\x61\x62\x61\x73\x65\x20\x66\x6F\x75\x6E\x64","\x6E\x6F\x20\x71\x75\x65\x72\x79\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x20","\x71\x75\x65\x72\x79\x3A\x20\x25\x73","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64","\x6E\x6F\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x73\x65\x6C\x65\x63\x74\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x72\x65\x73\x75\x6C\x74","\x6E\x6F\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x66\x6F\x75\x6E\x64","\x25\x73\x5B\x25\x73\x5D\x5B\x25\x73\x5D","\x66\x6F\x72\x45\x61\x63\x68","\x6B\x65\x79\x73","\x25\x73\x5F\x52\x4F\x57\x53\x5F\x43\x4F\x55\x4E\x54","\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x25\x73\x20\x73\x65\x74","\x64\x69\x61\x6C","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x44\x49\x41\x4C\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x64\x65\x62\x75\x67","\x73\x69\x70\x5F\x69\x64","\x6E\x6F\x20\x75\x73\x65\x72\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x6E\x6F\x20\x75\x73\x65\x72\x20\x66\x6F\x75\x6E\x64","\x44\x49\x41\x4C","\x53\x49\x50\x2F\x25\x73","\x6F\x70\x74\x73","\x75\x72\x6C","\x45\x78\x65\x63\x75\x74\x65\x64\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x25\x73","\x65\x6E\x64","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x45\x4E\x44\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x65\x78\x74\x5F\x64\x69\x61\x6C","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x45\x58\x54\x45\x52\x4E\x41\x4C\x20\x44\x49\x41\x4C\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x74\x72\x75\x6E\x6B\x5F\x69\x64","\x6E\x6F\x20\x74\x72\x75\x6E\x6B\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x6E\x6F\x20\x74\x72\x75\x6E\x6B\x20\x66\x6F\x75\x6E\x64","\x74\x72\x75\x6E\x6B\x5F\x6E\x61\x6D\x65","\x53\x49\x50\x2F\x25\x73\x2F\x25\x73","\x66\x69\x6E\x61\x6C\x6C\x79","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x46\x49\x4E\x41\x4C\x4C\x59\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x47\x45\x54\x44\x49\x47\x49\x54\x53\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x66\x69\x6C\x65\x5F\x69\x64","\x6E\x6F\x20\x66\x69\x6C\x65\x20\x61\x75\x64\x69\x6F\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x6E\x6F\x20\x66\x69\x6C\x65\x20\x61\x75\x64\x69\x6F\x20\x66\x6F\x75\x6E\x64","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x6D\x61\x78\x64\x69\x67\x69\x74","\x67\x65\x74\x44\x61\x74\x61","\x74\x65\x73\x74","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6D\x69\x6E\x64\x69\x67\x69\x74","\x78","\x69","\x68\x69\x64\x64\x65\x6E\x64\x69\x67\x69\x74\x73\x6E\x75\x6D","\x2A","\x67\x65\x6E\x65\x72\x61\x74\x65","\x68\x69\x64\x64\x65\x6E\x64\x69\x67\x69\x74\x73\x70\x6F\x73","\x66\x69\x72\x73\x74","\x73\x75\x62\x73\x74\x72","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x47\x45\x54\x53\x45\x43\x52\x45\x54\x44\x49\x47\x49\x54\x53\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x67\x6F\x61\x6C","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x47\x4F\x41\x4C\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x67\x6F\x61\x6C\x6E\x61\x6D\x65","\x47\x4F\x41\x4C\x20\x25\x73","\x61\x77\x73\x70\x6F\x6C\x6C\x79","\x5B\x41\x47\x49\x5D\x20\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x41\x57\x53\x50\x4F\x4C\x4C\x59\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6E\x6F\x20\x76\x61\x6C\x69\x64\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x54\x72\x79\x69\x6E\x67\x20\x61\x77\x73\x20\x50\x6F\x6C\x6C\x79\x20\x25\x73","\x61\x77\x73\x20\x50\x6F\x6C\x6C\x79\x20\x25\x73\x20\x66\x69\x6C\x65\x20\x63\x72\x65\x61\x74\x65\x64","\x69\x6E\x74\x4B\x65\x79","\x73\x74\x72\x65\x61\x6D\x46\x69\x6C\x65","\x2E\x77\x61\x76","\x75\x6E\x6C\x69\x6E\x6B","\x61\x77\x73\x20\x50\x6F\x6C\x6C\x79\x20\x69\x73\x20\x75\x6E\x72\x65\x61\x63\x68\x61\x62\x6C\x65","\x67\x6F\x6F\x67\x6C\x65\x61\x73\x72","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x47\x4F\x4F\x47\x4C\x45\x41\x53\x52\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B\x20\x25\x73","\x6E\x6F\x20\x6B\x65\x79\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x77\x61\x76","\x25\x73\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73","\x25\x73\x2E\x25\x73","\x62\x65\x65\x70","\x4E\x4F\x42\x45\x45\x50","\x72\x65\x63\x6F\x72\x64\x46\x69\x6C\x65","\x67\x6F\x6F\x67\x6C\x65\x20\x25\x73\x20\x66\x69\x6C\x65\x20\x63\x72\x65\x61\x74\x65\x64","\x47\x4F\x4F\x47\x4C\x45\x5F\x41\x53\x52\x5F\x25\x73","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x47\x6F\x6F\x67\x6C\x65\x41\x53\x52\x20\x52\x65\x73\x75\x6C\x74\x20\x25\x73","\x74\x69\x6C\x64\x65\x61\x73\x72","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x54\x49\x4C\x44\x45\x41\x53\x52\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6E\x6F\x20\x61\x70\x70\x69\x64\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x6E\x6F\x20\x61\x70\x70\x73\x65\x63\x72\x65\x74\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x74\x69\x6C\x64\x65\x20\x25\x73\x20\x66\x69\x6C\x65\x20\x63\x72\x65\x61\x74\x65\x64","\x54\x49\x4C\x44\x45\x5F\x41\x53\x52\x5F\x25\x73","\x54\x69\x6C\x64\x65\x41\x53\x52\x20\x52\x65\x73\x75\x6C\x74\x20\x25\x73","\x67\x6F\x74\x6F\x63","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x47\x4F\x54\x4F\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x63\x6F\x6E\x74\x69\x6E\x75\x65\x41\x74","\x67\x6F\x74\x6F\x69\x66","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x47\x4F\x54\x4F\x49\x46\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x6E\x6F\x20\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x74\x72\x75\x65","\x66\x61\x6C\x73\x65","\x45\x56\x41\x4C\x20\x43\x4F\x4E\x44\x49\x54\x49\x4F\x4E\x20\x25\x73\x20\x25\x73","\x67\x6F\x74\x6F\x69\x66\x74\x69\x6D\x65","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x47\x4F\x54\x4F\x49\x46\x54\x49\x4D\x45\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x69\x6E\x74\x65\x72\x76\x61\x6C\x5F\x69\x64","\x6E\x6F\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x6E\x6F\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x73\x20\x66\x6F\x75\x6E\x64","\x49\x46\x54\x49\x4D\x45\x28\x25\x73\x3F\x74\x72\x75\x65\x3A\x66\x61\x6C\x73\x65\x29","\x49\x46\x54\x49\x4D\x45\x20\x25\x73\x20\x25\x73","\x68\x61\x6E\x67\x75\x70","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x48\x41\x4E\x47\x55\x50\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x69\x73\x70\x65\x65\x63\x68\x61\x73\x72","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x49\x53\x50\x45\x45\x43\x48\x41\x53\x52\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x69\x73\x70\x65\x65\x63\x68\x20\x25\x73\x20\x66\x69\x6C\x65\x20\x63\x72\x65\x61\x74\x65\x64","\x49\x53\x50\x45\x45\x43\x48\x5F\x41\x53\x52\x5F\x25\x73","\x49\x73\x70\x65\x65\x63\x68\x41\x53\x52\x20\x52\x65\x73\x75\x6C\x74\x20\x25\x73","\x69\x73\x70\x65\x65\x63\x68\x74\x74\x73","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x49\x53\x50\x45\x45\x43\x48\x54\x54\x53\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x54\x72\x79\x69\x6E\x67\x20\x69\x73\x70\x65\x65\x63\x68\x20\x54\x54\x53\x20\x25\x73","\x69\x73\x70\x65\x65\x63\x68\x20\x54\x54\x53\x20\x69\x73\x20\x75\x6E\x72\x65\x61\x63\x68\x61\x62\x6C\x65","\x6C\x6F\x67\x69\x6E","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x4C\x4F\x47\x49\x4E\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x66\x69\x6E\x64\x42\x79","\x6E\x6F\x20\x66\x69\x6E\x64\x20\x62\x79\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x46\x49\x4E\x44\x20\x41\x47\x45\x4E\x54\x20\x25\x73\x20\x42\x59\x20\x25\x73","\x41\x47\x45\x4E\x54\x20\x25\x73\x20\x46\x4F\x55\x4E\x44\x20\x42\x59","\x73\x75\x63\x63\x65\x73\x73","\x41\x47\x45\x4E\x54\x20\x25\x73\x20\x4E\x4F\x54\x20\x46\x4F\x55\x4E\x44\x20\x42\x59","\x66\x61\x69\x6C\x75\x72\x65","\x6C\x6F\x67\x6F\x75\x74","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x4C\x4F\x47\x4F\x55\x54\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6D\x61\x74\x68","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x4D\x41\x54\x48\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E","\x6E\x6F\x20\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x6D\x61\x74\x68\x20\x25\x73","\x69\x73\x41\x72\x72\x61\x79","\x25\x73\x5B\x25\x73\x5D","\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x25\x73\x5B\x6B\x65\x79\x5D\x20\x73\x65\x74","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x4D\x45\x4E\x55\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x64\x69\x67\x69\x74","\x74","\x23","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x4E\x4F\x4F\x50\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6F\x75\x74\x70\x75\x74","\x70\x61\x75\x73\x65","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x50\x41\x55\x53\x45\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x70\x61\x75\x73\x65\x5F\x69\x64","\x70\x6C\x61\x79\x62\x61\x63\x6B","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x50\x4C\x41\x59\x42\x41\x43\x4B\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x50\x4C\x41\x59\x42\x41\x43\x4B","\x71\x75\x65\x75\x65","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x51\x55\x45\x55\x45\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x71\x75\x65\x75\x65\x5F\x69\x64","\x6E\x6F\x20\x71\x75\x65\x75\x65\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x6E\x6F\x20\x71\x75\x65\x75\x65\x20\x66\x6F\x75\x6E\x64","\x69\x6E\x64\x65\x78\x4F\x66","\x58","\x58\x4D\x43\x53\x2D\x51\x55\x45\x55\x45","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x51\x55\x45\x55\x45","\x6D\x61\x63\x72\x6F","\x67\x6F\x73\x75\x62","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x72\x65\x63\x6F\x72\x64","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x52\x45\x43\x4F\x52\x44\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x25\x73\x5F\x25\x73","\x25\x73\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2E\x25\x73","\x52\x45\x43\x4F\x52\x44\x49\x4E\x47\x5F\x53\x41\x56\x45\x4E\x41\x4D\x45","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x25\x73\x20\x25\x73\x20\x25\x73\x20\x25\x73","\x65\x73\x63\x61\x70\x65\x5F\x64\x69\x67\x69\x74\x73","\x73\x61\x79\x64\x69\x67\x69\x74\x73","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x41\x59\x44\x49\x47\x49\x54\x53\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x64\x69\x67\x69\x74\x73","\x73\x61\x79\x44\x69\x67\x69\x74\x73","\x73\x61\x79\x6E\x75\x6D\x62\x65\x72","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x41\x59\x4E\x55\x4D\x42\x45\x52\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6E\x75\x6D\x62\x65\x72","\x73\x61\x79\x4E\x75\x6D\x62\x65\x72","\x73\x61\x79\x70\x68\x6F\x6E\x65\x74\x69\x63","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x41\x59\x50\x48\x4F\x4E\x45\x54\x49\x43\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x73\x61\x79\x50\x68\x6F\x6E\x65\x74\x69\x63","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x45\x4E\x44\x4D\x41\x49\x4C\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x61\x63\x63\x6F\x75\x6E\x74\x5F\x69\x64","\x6E\x6F\x20\x6D\x61\x69\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x53\x6D\x74\x70","\x6E\x6F\x20\x6D\x61\x69\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x66\x6F\x75\x6E\x64","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x65\x6D\x61\x69\x6C","\x75\x73\x65\x72","\x74\x6F","\x63\x63","\x62\x63\x63","\x73\x75\x62\x6A\x65\x63\x74","\x73\x65\x72\x76\x69\x63\x65","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x65\x63\x75\x72\x65","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E","\x61\x75\x74\x68","\x70\x61\x73\x73","\x74\x65\x6D\x70\x6C\x61\x74\x65\x5F\x69\x64","\x73\x65\x6E\x64\x4D\x61\x69\x6C\x20\x6D\x65\x73\x73\x61\x67\x65","\x54\x72\x79\x69\x6E\x67\x20\x53\x65\x6E\x64\x4D\x61\x69\x6C\x20\x77\x69\x74\x68\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x25\x73","\x4D\x61\x69\x6C\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x61\x64\x64\x65\x64\x20\x74\x6F\x20\x6F\x75\x74\x67\x6F\x69\x6E\x67\x20\x70\x72\x6F\x63\x65\x73\x73","\x73\x65\x6E\x64\x46\x61\x78","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x45\x4E\x44\x46\x41\x58\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x53\x45\x4E\x44\x46\x41\x58\x20\x62\x6C\x6F\x63\x6B\x20\x6E\x6F\x74\x20\x69\x6D\x70\x6C\x65\x6D\x65\x6E\x74\x65\x64","\x73\x65\x6E\x64\x53\x4D\x53","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x45\x4E\x44\x53\x4D\x53\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74\x5F\x69\x64","\x6E\x6F\x20\x73\x6D\x73\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x6E\x6F\x20\x73\x6D\x73\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x66\x6F\x75\x6E\x64","\x73\x6D\x73\x5F\x74\x65\x78\x74","\x69\x64","\x73\x65\x6E\x64\x53\x4D\x53\x20\x6D\x65\x73\x73\x61\x67\x65","\x54\x72\x79\x69\x6E\x67\x20\x53\x65\x6E\x64\x53\x4D\x53\x20\x77\x69\x74\x68\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x25\x73","\x53\x6D\x73\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x61\x64\x64\x65\x64\x20\x74\x6F\x20\x6F\x75\x74\x67\x6F\x69\x6E\x67\x20\x70\x72\x6F\x63\x65\x73\x73","\x73\x65\x74","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x45\x54\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6E\x6F\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x76\x61\x6C\x75\x65","\x73\x74\x61\x72\x74","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x54\x41\x52\x54\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x53\x54\x41\x52\x54\x20\x43\x41\x4C\x4C\x59\x20\x53\x51\x55\x41\x52\x45","\x79\x65\x73","\x41\x6E\x73\x77\x65\x72","\x53\x6B\x69\x70\x70\x65\x64\x20\x41\x6E\x73\x77\x65\x72","\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x55\x42\x50\x52\x4F\x4A\x45\x43\x54\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x70\x72\x6F\x6A\x65\x63\x74\x5F\x69\x64","\x6E\x6F\x20\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x6E\x6F\x20\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74\x20\x66\x6F\x75\x6E\x64\x20\x77\x69\x74\x68\x20\x69\x64\x20\x25\x64","\x70\x72\x6F\x6A\x65\x63\x74\x20\x69\x6E\x20\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x66\x72\x6F\x6D\x20\x74\x68\x65\x20\x63\x61\x6C\x6C\x65\x64\x20\x70\x72\x6F\x6A\x65\x63\x74","\x41\x47\x49","\x61\x67\x69\x3A\x2F\x2F\x25\x73\x2F\x73\x71\x75\x61\x72\x65\x2C\x22\x25\x73\x22\x2C\x22\x25\x73\x22","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31","\x73\x79\x73\x74\x65\x6D","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x59\x53\x54\x45\x4D\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x73\x68\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x3A\x20\x25\x73\x20\x72\x65\x73\x75\x6C\x74\x20\x6F\x6E\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x3A\x20\x25\x73","\x73\x68\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x3A\x20\x25\x73\x20\x72\x65\x73\x75\x6C\x74\x20\x6E\x6F\x20\x73\x74\x6F\x72\x65\x64","\x74\x74\x73","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x47\x4F\x4F\x47\x4C\x45\x54\x54\x53\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x54\x72\x79\x69\x6E\x67\x20\x47\x6F\x6F\x67\x6C\x65\x20\x54\x54\x53\x20\x25\x73","\x47\x6F\x6F\x67\x6C\x65\x20\x54\x54\x53\x20\x25\x73\x20\x66\x69\x6C\x65\x20\x63\x72\x65\x61\x74\x65\x64","\x47\x6F\x6F\x67\x6C\x65\x20\x54\x54\x53\x20\x69\x73\x20\x75\x6E\x72\x65\x61\x63\x68\x61\x62\x6C\x65","\x75\x6E\x70\x61\x75\x73\x65","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x55\x4E\x50\x41\x55\x53\x45\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x56\x4F\x49\x43\x45\x4D\x41\x49\x4C\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x56\x4F\x49\x43\x45\x4D\x41\x49\x4C","\x6D\x61\x69\x6C\x62\x6F\x78","\x76\x73\x77\x69\x74\x63\x68","\x45\x6E\x74\x65\x72\x20\x69\x6E\x20\x53\x57\x49\x54\x43\x48\x20\x28\x25\x73\x29\x20\x62\x6C\x6F\x63\x6B","\x6A\x6F\x69\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0xae25[0];var fs=require(_0xae25[1]);var path=require(_0xae25[2]);var util=require(_0xae25[3]);var _=require(_0xae25[4]);var sh=require(_0xae25[5]);var odbc=require(_0xae25[6])();var rs=require(_0xae25[7]);var moment=require(_0xae25[8]);var Mustache=require(_0xae25[9]);var logger=require(_0xae25[11])(_0xae25[10]);var config=require(_0xae25[12]);var scripts=require(_0xae25[13]);var FILES_PATH=_0xae25[14];var verticesWithRetry=[_0xae25[15],_0xae25[16],_0xae25[17]];var AGIVertices=function(_0xfe01x10,_0xfe01x11,_0xfe01x12){this[_0xae25[18]]= _0xfe01x10;this[_0xae25[19]]= _0xfe01x11;this[_0xae25[20]]= _0xfe01x12};AGIVertices[_0xae25[22]][_0xae25[21]]= function(_0xfe01x13,_0xfe01x14){this[_0xae25[19]][_0xae25[26]](_0xfe01x13)[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,(_0xfe01x16)?_0xfe01x16[_0xae25[24]]:false)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[27]]= function(_0xfe01x13,_0xfe01x14){this[_0xae25[19]][_0xae25[28]](_0xfe01x13)[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,(_0xfe01x16)?_0xfe01x16[_0xae25[24]]:false)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[29]]= function(_0xfe01x13,_0xfe01x14){this[_0xae25[19]][_0xae25[30]](_0xfe01x13)[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,(_0xfe01x16)?_0xfe01x16[_0xae25[24]]:false)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[31]]= function(_0xfe01x13,_0xfe01x14){this[_0xae25[19]][_0xae25[33]](_0xfe01x13)[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,(_0xfe01x16)?_0xfe01x16[_0xae25[32]]:false)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[34]]= function(_0xfe01x13,_0xfe01x14){this[_0xae25[19]][_0xae25[35]](_0xfe01x13)[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,(_0xfe01x16)?_0xfe01x16[_0xae25[24]]:false)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[36]]= function(_0xfe01x13,_0xfe01x14){this[_0xae25[19]][_0xae25[37]](_0xfe01x13)[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,(_0xfe01x16)?_0xfe01x16[_0xae25[24]]:false)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[38]]= function(_0xfe01x13,_0xfe01x14){var _0xfe01x17=this;this[_0xae25[19]][_0xae25[41]](_0xfe01x13)[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,(_0xfe01x16)?_0xfe01x17[_0xae25[40]](_0xfe01x16[_0xae25[39]]):false)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[42]]= function(_0xfe01x13,_0xfe01x14){this[_0xae25[19]][_0xae25[43]](_0xfe01x13)[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,(_0xfe01x16)?_0xfe01x16:false)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[44]]= function(_0xfe01x18,_0xfe01x19,_0xfe01x14){this[_0xae25[20]][_0xae25[44]](_0xfe01x18,_0xfe01x19)[_0xae25[25]](function(){_0xfe01x14(null)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[45]]= function(_0xfe01x13,_0xfe01x14){this[_0xae25[19]][_0xae25[49]](_0xfe01x13)[_0xae25[25]](function(_0xfe01x16){if(_0xfe01x16){if(_0xfe01x16[_0xae25[46]]){_0xfe01x14(null,[_0xfe01x16[_0xae25[47]]])}else {_0xfe01x14(null,_[_0xae25[48]](_0xfe01x16.Intervals,_0xae25[47]))}}else {_0xfe01x14(null,false)}})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[40]]= function(_0xfe01x1a){return util[_0xae25[51]](_0xae25[50],FILES_PATH,_0xfe01x1a)};AGIVertices[_0xae25[22]][_0xae25[52]]= function(_0xfe01x1b,_0xfe01x1c,_0xfe01x14){odbc[_0xae25[62]](_0xfe01x1b,function(_0xfe01x15){if(_0xfe01x15){logger[_0xae25[54]](_0xae25[53],_0xfe01x15);_0xfe01x14(_0xfe01x15)}else {logger[_0xae25[56]](_0xae25[55]);odbc[_0xae25[61]](_0xfe01x1c,function(_0xfe01x15,_0xfe01x1d){if(_0xfe01x15){logger[_0xae25[56]](_0xae25[57],_0xfe01x1c);_0xfe01x14(_0xfe01x15)}else {logger[_0xae25[56]](_0xae25[58],_0xfe01x1c);odbc[_0xae25[60]](function(_0xfe01x15){if(_0xfe01x15){logger[_0xae25[54]](_0xae25[59],_0xfe01x15)};_0xfe01x14(null,_0xfe01x1d)})}})}})};AGIVertices[_0xae25[22]][_0xae25[63]]= function(_0xfe01x13,_0xfe01x14){this[_0xae25[19]][_0xae25[64]](_0xfe01x13)[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,(_0xfe01x16)?_0xfe01x16:false)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[65]]= function(_0xfe01x19,_0xfe01x14){this[_0xae25[19]][_0xae25[65]](_0xfe01x19)[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,_0xfe01x16)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[66]]= function(_0xfe01x1e,_0xfe01x1d,_0xfe01x14){this[_0xae25[19]][_0xae25[66]]({uniqueid:this[_0xae25[18]][_0xae25[67]],node:_0xfe01x1e[_0xae25[68]],application:_0xfe01x1e[_0xae25[69]],data:_0xfe01x1d|| null,project_name:this[_0xae25[18]][_0xae25[70]],callerid:this[_0xae25[18]][_0xae25[71]]})[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,_0xfe01x16)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[72]]= function(_0xfe01x1e,_0xfe01x1f,_0xfe01x20,_0xfe01x14){this[_0xae25[19]][_0xae25[72]]({uniqueid:this[_0xae25[18]][_0xae25[67]],callerid:this[_0xae25[18]][_0xae25[71]],calleridname:this[_0xae25[18]][_0xae25[73]],context:this[_0xae25[18]][_0xae25[74]],extension:this[_0xae25[18]][_0xae25[75]],priority:this[_0xae25[18]][_0xae25[76]],accountcode:this[_0xae25[18]][_0xae25[77]],dnid:this[_0xae25[18]][_0xae25[78]],projectName:this[_0xae25[18]][_0xae25[70]],saveName:_0xfe01x1f,filename:_0xfe01x1e[_0xae25[79]]|| _0xfe01x1f,savePath:_0xfe01x20})[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,_0xfe01x16)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[80]]= function(_0xfe01x21,_0xfe01x14){this[_0xae25[19]][_0xae25[80]]({firstName:(_[_0xae25[81]](_0xfe01x21[_0xae25[24]])|| _[_0xae25[82]](_0xfe01x21[_0xae25[24]]))?(_0xae25[83]+ Math[_0xae25[84]]()):_0xfe01x21[_0xae25[24]],lastName:(_[_0xae25[81]](_0xfe01x21[_0xae25[85]])|| _[_0xae25[82]](_0xfe01x21[_0xae25[85]]))?null:_0xfe01x21[_0xae25[85]],phone:_0xfe01x21[_0xae25[86]],ListId:_0xfe01x21[_0xae25[87]],scheduledAt:_0xfe01x21[_0xae25[88]],callbackUniqueid:this[_0xae25[18]][_0xae25[67]],tags:_0xae25[89],description:_0xae25[90]+ _0xfe01x21[_0xae25[88]].toString(),priority:_0xfe01x21[_0xae25[91]]})[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,_0xfe01x16)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[92]]= function(_0xfe01x13,_0xfe01x14){this[_0xae25[19]][_0xae25[93]](_0xfe01x13)[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,(_0xfe01x16)?_0xfe01x16[_0xae25[24]]:false)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[94]]= function(_0xfe01x22,_0xfe01x23,_0xfe01x14){var _0xfe01x24={role:_0xae25[95]};_0xfe01x24[_0xfe01x22]= this[_0xae25[18]][_0xae25[71]];this[_0xae25[19]][_0xae25[94]](_0xfe01x24,_0xfe01x23,this[_0xae25[18]][_0xae25[67]])[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,_[_0xae25[82]](_0xfe01x16)?false:true)})[_0xae25[23]](function(_0xfe01x15){logger[_0xae25[54]](_0xfe01x15);_0xfe01x14(null,false)})};AGIVertices[_0xae25[22]][_0xae25[96]]= function(_0xfe01x22,_0xfe01x14){var _0xfe01x24={role:_0xae25[95]};_0xfe01x24[_0xfe01x22]= this[_0xae25[18]][_0xae25[71]];this[_0xae25[19]][_0xae25[96]](_0xfe01x24)[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,_[_0xae25[82]](_0xfe01x16)?false:true)})[_0xae25[23]](function(_0xfe01x15){logger[_0xae25[54]](_0xfe01x15);_0xfe01x14(null,false)})};AGIVertices[_0xae25[22]][_0xae25[97]]= function(_0xfe01x22,_0xfe01x14){var _0xfe01x24={role:_0xae25[95]};_0xfe01x24[_0xfe01x22]= this[_0xae25[18]][_0xae25[71]];this[_0xae25[19]][_0xae25[97]](_0xfe01x24)[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,_[_0xae25[82]](_0xfe01x16)?false:true)})[_0xae25[23]](function(_0xfe01x15){logger[_0xae25[54]](_0xfe01x15);_0xfe01x14(null,false)})};AGIVertices[_0xae25[22]][_0xae25[98]]= function(_0xfe01x22,_0xfe01x14){var _0xfe01x24={role:_0xae25[95]};_0xfe01x24[_0xfe01x22]= this[_0xae25[18]][_0xae25[71]];var _0xfe01x25=_0xfe01x22!= _0xae25[99]?util[_0xae25[51]](_0xae25[100],_0xae25[101],this[_0xae25[18]][_0xae25[71]]):undefined;this[_0xae25[19]][_0xae25[98]](_0xfe01x24,_0xfe01x25)[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,_[_0xae25[82]](_0xfe01x16)?false:true)})[_0xae25[23]](function(_0xfe01x15){logger[_0xae25[54]](_0xfe01x15);_0xfe01x14(null,false)})};AGIVertices[_0xae25[22]][_0xae25[102]]= function(_0xfe01x26,_0xfe01x14){sh[_0xae25[106]](_[_0xae25[103]](_0xfe01x26),function(_0xfe01x27,_0xfe01x28){var _0xfe01x29=_0xfe01x28[_0xae25[105]](/(\r\n|\n|\r)/gm,_0xae25[104]);_0xfe01x14(null,_0xfe01x29)})};AGIVertices[_0xae25[22]][_0xae25[107]]= function(_0xfe01x1e,_0xfe01x14){scripts[_0xae25[107]](_0xfe01x1e[_0xae25[108]],_0xfe01x1e[_0xae25[109]]|| _0xae25[110],1)[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,_0xfe01x16)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[111]]= function(_0xfe01x1e,_0xfe01x14){scripts[_0xae25[111]](_0xfe01x1e[_0xae25[112]],_0xfe01x1e[_0xae25[108]],_0xfe01x1e[_0xae25[113]]|| _0xae25[114],_0xfe01x1e[_0xae25[115]])[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,_0xfe01x16)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[116]]= function(_0xfe01x1e,_0xfe01x2a,_0xfe01x14){scripts[_0xae25[116]](_0xfe01x2a,_0xfe01x1e[_0xae25[112]],_0xfe01x1e[_0xae25[117]]|| _0xae25[114],this[_0xae25[119]](_0xfe01x1e[_0xae25[118]])?_0xfe01x1e[_0xae25[118]]:undefined)[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,_0xfe01x16)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[120]]= function(_0xfe01x1e,_0xfe01x14){scripts[_0xae25[120]](_0xfe01x1e[_0xae25[121]],_0xfe01x1e[_0xae25[122]],_0xfe01x1e[_0xae25[123]],_0xfe01x1e[_0xae25[124]]|| _0xae25[125],_0xfe01x1e[_0xae25[108]])[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,_0xfe01x16)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[126]]= function(_0xfe01x1e,_0xfe01x2a,_0xfe01x14){scripts[_0xae25[126]](_0xfe01x2a,_0xfe01x1e[_0xae25[112]],_0xfe01x1e[_0xae25[127]]|| _0xae25[114])[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,_0xfe01x16)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[128]]= function(_0xfe01x1e,_0xfe01x2a,_0xfe01x14){scripts[_0xae25[128]](_0xfe01x2a,_0xfe01x1e[_0xae25[129]],_0xfe01x1e[_0xae25[130]],_0xfe01x1e[_0xae25[131]])[_0xae25[25]](function(_0xfe01x16){_0xfe01x14(null,_0xfe01x16)})[_0xae25[23]](function(_0xfe01x15){_0xfe01x14(_0xfe01x15)})};AGIVertices[_0xae25[22]][_0xae25[132]]= function(_0xfe01x1e){var _0xfe01x24=_[_0xae25[133]](verticesWithRetry,_0xfe01x1e[_0xae25[69]])?_0xfe01x1e:_[_0xae25[134]](_0xfe01x1e);for(var _0xfe01x2b in _0xfe01x24){if(_0xfe01x24[_0xae25[135]](_0xfe01x2b)){if(_0xfe01x24[_0xfe01x2b]&& _[_0xae25[136]](_0xfe01x24[_0xfe01x2b])){_0xfe01x24[_0xfe01x2b]= this[_0xae25[137]](_0xfe01x24[_0xfe01x2b])}}};return _0xfe01x24};AGIVertices[_0xae25[22]][_0xae25[137]]= function(_0xfe01x2c){var _0xfe01x2d=_0xfe01x2c[_0xae25[139]](_0xae25[138]);for(var _0xfe01x2e=1;_0xfe01x2e< _0xfe01x2d[_0xae25[140]];_0xfe01x2e+= 1){var _0xfe01x2f=_0xfe01x2d[_0xfe01x2e][_0xae25[139]](_0xae25[141]);if(_0xfe01x2f[_0xae25[140]]> 1){_0xfe01x2c= _0xfe01x2c[_0xae25[143]](_0xae25[138]+ _0xfe01x2f[0]+ _0xae25[141],this[_0xae25[18]][_0xae25[21]](_0xfe01x2f[0])[_0xae25[142]]|| (_0xfe01x2f[0]))}};if(_0xfe01x2d[_0xae25[140]]=== 1){return _0xfe01x2c.toString()};return this[_0xae25[137]](_0xfe01x2c)};AGIVertices[_0xae25[22]][_0xae25[144]]= function(_0xfe01x30,_0xfe01x31){var _0xfe01x32=this[_0xae25[18]][_0xae25[21]](_0xfe01x30);if(_0xfe01x32[_0xae25[145]]===  -1){return _0xfe01x32};logger[_0xae25[56]](util[_0xae25[51]](_0xae25[146],_0xfe01x31,_0xfe01x32[_0xae25[142]]));return this[_0xae25[18]][_0xae25[147]](_0xfe01x31,_0xfe01x32[_0xae25[142]])};AGIVertices[_0xae25[22]][_0xae25[119]]= function(_0xfe01x33){return _0xfe01x33&& _0xfe01x33!== _0xae25[148]&& _0xfe01x33!== _0xae25[149]&& _0xfe01x33!== _0xae25[104]};AGIVertices[_0xae25[22]][_0xae25[150]]= function(_0xfe01x1e){this[_0xae25[66]][_0xae25[152]](this,_0xfe01x1e,_0xae25[151]);_0xfe01x1e[_0xae25[153]]= _0xfe01x1e[_0xae25[150]];return {code:200,result:_0xae25[151]}};AGIVertices[_0xae25[22]][_0xae25[10]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[154],_0xfe01x1e[_0xae25[68]]));return this[_0xae25[18]][_0xae25[10]]([_0xfe01x1e[_0xae25[155]],_0xfe01x1e[_0xae25[156]]])};AGIVertices[_0xae25[22]][_0xae25[157]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[158],_0xfe01x1e[_0xae25[68]]));if(this[_0xae25[119]](_0xfe01x1e[_0xae25[159]])){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[160],_0xfe01x1e[_0xae25[159]]));var _0xfe01x1d=this[_0xae25[18]][_0xae25[161]](_0xfe01x1e[_0xae25[159]]);if(_0xfe01x1d[_0xae25[145]]===  -1){return _0xfe01x1d}};return this[_0xae25[18]][_0xae25[157]]()};AGIVertices[_0xae25[22]][_0xae25[89]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[162],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[87]])){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[163])};_0xfe01x1e[_0xae25[88]]= moment();if(this[_0xae25[119]](_0xfe01x1e[_0xae25[164]])){_0xfe01x1e[_0xae25[88]]= moment()[_0xae25[166]](_0xfe01x1e[_0xae25[164]],_0xae25[165])};if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[91]])){_0xfe01x1e[_0xae25[91]]= 2};this[_0xae25[80]][_0xae25[152]](this,_0xfe01x1e);return this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[167],_0xfe01x1e[_0xae25[86]],_0xfe01x1e[_0xae25[87]],_0xfe01x1e[_0xae25[88]]))};AGIVertices[_0xae25[22]][_0xae25[169]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[170],_0xfe01x1e[_0xae25[68]]));var _0xfe01x34=this[_0xae25[18]][_0xae25[106]](_0xfe01x1e[_0xae25[171]],_0xfe01x1e[_0xae25[172]]);if(_0xfe01x34[_0xae25[145]]===  -1){return _0xfe01x34};return this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[173],_0xfe01x1e[_0xae25[171]],_0xfe01x1e[_0xae25[172]]))};AGIVertices[_0xae25[22]][_0xae25[174]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[175],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[108]])){return this[_0xae25[18]][_0xae25[168]](_0xae25[176])};var _0xfe01x35=_0xae25[177]+ _0xfe01x1e[_0xae25[108]]+ _0xae25[177];if(this[_0xae25[119]](_0xfe01x1e[_0xae25[172]])){_0xfe01x35+= _0xae25[178]+ _0xfe01x1e[_0xae25[172]]};var _0xfe01x34=this[_0xae25[18]][_0xae25[106]](_0xae25[179],_0xfe01x35);if(_0xfe01x34[_0xae25[145]]===  -1){return _0xfe01x34};return this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[180],_0xfe01x35))};AGIVertices[_0xae25[22]][_0xae25[181]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[182],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[183]])){return this[_0xae25[18]][_0xae25[168]](_0xae25[184])};var _0xfe01x35=_0xfe01x1e[_0xae25[183]];if(this[_0xae25[119]](_0xfe01x1e[_0xae25[172]])){_0xfe01x35+= _0xae25[178]+ _0xfe01x1e[_0xae25[172]]};var _0xfe01x34=this[_0xae25[18]][_0xae25[106]](_0xae25[185],_0xfe01x35);if(_0xfe01x34[_0xae25[145]]===  -1){return _0xfe01x34};var _0xfe01x36=this[_0xae25[144]](_0xae25[186],_0xae25[187]);if(_0xfe01x36[_0xae25[145]]===  -1){return _0xfe01x36};var _0xfe01x37=this[_0xae25[144]](_0xae25[188],_0xae25[189]);if(_0xfe01x37[_0xae25[145]]===  -1){return _0xfe01x37};var _0xfe01x38=this[_0xae25[144]](_0xae25[190],_0xae25[191]);if(_0xfe01x38[_0xae25[145]]===  -1){return _0xfe01x38};return this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[192],_0xfe01x35))};AGIVertices[_0xae25[22]][_0xae25[193]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[194],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[195]])){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[196])};var _0xfe01x1b=this[_0xae25[31]][_0xae25[152]](this,_0xfe01x1e[_0xae25[195]]);if(!_0xfe01x1b){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[197])};if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[61]])){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[198])};var _0xfe01x1c=_0xfe01x1e[_0xae25[61]][_0xae25[105]](/(\r\n|\n|\r)/gm,_0xae25[199]);this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[200],_0xfe01x1c));var _0xfe01x39=this[_0xae25[52]][_0xae25[152]](this,_0xfe01x1b,_0xfe01x1c);this[_0xae25[66]][_0xae25[152]](this,_0xfe01x1e,_0xfe01x1c);if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[201]])){return this[_0xae25[18]][_0xae25[168]](_0xae25[202])};var _0xfe01x3a=this[_0xae25[21]][_0xae25[152]](this,_0xfe01x1e[_0xae25[201]]);if(!_0xfe01x3a){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[203])};var _0xfe01x17=this;_0xfe01x39[_0xae25[205]](function(_0xfe01x33,_0xfe01x3b){Object[_0xae25[206]](_0xfe01x33)[_0xae25[205]](function(_0xfe01x2b){_0xfe01x17[_0xae25[18]][_0xae25[147]](util[_0xae25[51]](_0xae25[204],_0xfe01x3a,_0xfe01x3b,_0xfe01x2b),_0xfe01x33[_0xfe01x2b])})});this[_0xae25[18]][_0xae25[147]](util[_0xae25[51]](_0xae25[207],_0xfe01x3a),_0xfe01x39[_0xae25[140]]);return this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[208],_0xfe01x3a))};AGIVertices[_0xae25[22]][_0xae25[209]]= function(_0xfe01x1e){logger[_0xae25[211]](util[_0xae25[51]](_0xae25[210],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[212]])){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[213])};var _0xfe01x3c=this[_0xae25[34]][_0xae25[152]](this,_0xfe01x1e[_0xae25[212]]);if(!_0xfe01x3c){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[214])};var _0xfe01x34=this[_0xae25[18]][_0xae25[106]](_0xae25[215],[util[_0xae25[51]](_0xae25[216],_0xfe01x3c),_0xfe01x1e[_0xae25[159]],_0xfe01x1e[_0xae25[217]],_0xfe01x1e[_0xae25[218]]]);if(_0xfe01x34[_0xae25[145]]===  -1){return _0xfe01x34};return this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[219],_0xae25[215]))};AGIVertices[_0xae25[22]][_0xae25[220]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[221],_0xfe01x1e[_0xae25[68]]));return this[_0xae25[18]][_0xae25[168]](_0xae25[220])};AGIVertices[_0xae25[22]][_0xae25[222]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[223],_0xfe01x1e[_0xae25[68]]));var _0xfe01x3d=_0xae25[104];if(_0xfe01x1e[_0xae25[224]]){if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[224]])){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[225])}else {var _0xfe01x13=parseInt(_0xfe01x1e[_0xae25[224]],10);if(isNaN(_0xfe01x13)){_0xfe01x3d= _0xfe01x1e[_0xae25[224]]}else {_0xfe01x3d= this[_0xae25[36]][_0xae25[152]](this,_0xfe01x1e[_0xae25[224]]);if(!_0xfe01x3d){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[226])}}}}else {if(_0xfe01x1e[_0xae25[227]]){_0xfe01x3d= _0xfe01x1e[_0xae25[227]]}else {return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[225])}};var _0xfe01x34=this[_0xae25[18]][_0xae25[106]](_0xae25[215],[util[_0xae25[51]](_0xae25[228],_0xfe01x3d,_0xfe01x1e[_0xae25[86]]),_0xfe01x1e[_0xae25[159]],_0xfe01x1e[_0xae25[217]],_0xfe01x1e[_0xae25[218]]]);if(_0xfe01x34[_0xae25[145]]===  -1){return _0xfe01x34};return this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[219],_0xae25[215]))};AGIVertices[_0xae25[22]][_0xae25[229]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[230],_0xfe01x1e[_0xae25[68]]));return this[_0xae25[18]][_0xae25[168]](_0xae25[229])};AGIVertices[_0xae25[22]][_0xae25[16]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[231],_0xfe01x1e[_0xae25[68]]));if(_0xfe01x1e[_0xae25[153]]=== 0){return this[_0xae25[150]](_0xfe01x1e)};_0xfe01x1e[_0xae25[153]]-= 1;if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[232]])){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[233])};var _0xfe01x3e=this[_0xae25[38]][_0xae25[152]](this,_0xfe01x1e[_0xae25[232]]);if(!_0xfe01x3e){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[234])};if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[201]])){return this[_0xae25[18]][_0xae25[54]](_0xae25[202])};var _0xfe01x1d=this[_0xae25[18]][_0xae25[237]](_0xfe01x3e,_0xfe01x1e[_0xae25[235]],_0xfe01x1e[_0xae25[236]]);var _0xfe01x3f=_0xfe01x1d[_0xae25[145]]?_0xfe01x1d[_0xae25[145]].toString():_0xae25[104];logger[_0xae25[56]](_0xae25[238],JSON[_0xae25[239]](_0xfe01x1d));if(_0xfe01x1d[_0xae25[145]]===  -1){this[_0xae25[66]][_0xae25[152]](this,_0xfe01x1e,_0xfe01x3f);return _0xfe01x1d}else {if(_0xfe01x1d[_0xae25[142]]=== _0xae25[159]){_0xfe01x1d[_0xae25[145]]= (_0xfe01x3f[_0xae25[140]]>= parseInt(_0xfe01x1e[_0xae25[240]]))?_0xae25[241]:_0xae25[242]}else {_0xfe01x1d[_0xae25[145]]= ((_0xfe01x3f[_0xae25[140]]>= parseInt(_0xfe01x1e[_0xae25[240]]))&& (_0xfe01x3f[_0xae25[140]]<= parseInt(_0xfe01x1e[_0xae25[236]])))?_0xae25[241]:_0xae25[242]}};var _0xfe01x3a=this[_0xae25[21]][_0xae25[152]](this,_0xfe01x1e[_0xae25[201]]);if(!_0xfe01x3a){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[203])};this[_0xae25[18]][_0xae25[147]](_0xfe01x3a,_0xfe01x3f);if(this[_0xae25[119]](_0xfe01x1e[_0xae25[243]])){var _0xfe01x40=parseInt(_0xfe01x1e[_0xae25[243]],10);var _0xfe01x33=rs[_0xae25[245]]({charset:_0xae25[244],length:_0xfe01x40});var _0xfe01x41=_0xfe01x3f[_0xae25[140]];if(_0xfe01x41> 0){if(_0xfe01x41> _0xfe01x40){this[_0xae25[66]][_0xae25[152]](this,_0xfe01x1e,(_0xfe01x1e[_0xae25[246]]=== _0xae25[247])?_0xfe01x33+ _0xfe01x3f[_0xae25[248]](_0xfe01x40):_0xfe01x3f[_0xae25[248]](0,_0xfe01x41- _0xfe01x40)+ _0xfe01x33)}else {this[_0xae25[66]][_0xae25[152]](this,_0xfe01x1e,rs[_0xae25[245]]({charset:_0xae25[244],length:_0xfe01x41}))}}else {this[_0xae25[66]][_0xae25[152]](this,_0xfe01x1e,_0xae25[104])}}else {this[_0xae25[66]][_0xae25[152]](this,_0xfe01x1e,_0xfe01x3f)};return _0xfe01x1d};AGIVertices[_0xae25[22]][_0xae25[17]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[249],_0xfe01x1e[_0xae25[68]]));return this[_0xae25[16]](_0xfe01x1e)};AGIVertices[_0xae25[22]][_0xae25[250]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[251],_0xfe01x1e[_0xae25[68]]));this[_0xae25[66]][_0xae25[152]](this,_0xfe01x1e,_0xfe01x1e[_0xae25[252]]);return this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[253],_0xfe01x1e[_0xae25[252]]))};AGIVertices[_0xae25[22]][_0xae25[254]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[255],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[121]])||  !this[_0xae25[119]](_0xfe01x1e[_0xae25[122]])){return this[_0xae25[18]][_0xae25[168]](_0xae25[256])};if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[108]])){return this[_0xae25[18]][_0xae25[168]](_0xae25[176])};this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[257],_0xfe01x1e[_0xae25[108]]));var _0xfe01x42=this[_0xae25[120]][_0xae25[152]](this,_0xfe01x1e);if(_0xfe01x42){this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[258],_0xfe01x42));var _0xfe01x1d=this[_0xae25[18]][_0xae25[260]](_0xfe01x42,_0xfe01x1e[_0xae25[259]]);try{fs[_0xae25[262]](_0xfe01x42+ _0xae25[261])}catch(e){logger[_0xae25[54]](e)};return _0xfe01x1d};return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[263])};AGIVertices[_0xae25[22]][_0xae25[264]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[265],_0xfe01x1e[_0xae25[68]],_0xfe01x1e[_0xae25[159]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[112]])){return this[_0xae25[18]][_0xae25[168]](_0xae25[266])};var _0xfe01x43=_0xae25[267];var _0xfe01x2a=util[_0xae25[51]](_0xae25[268],FILES_PATH,rs[_0xae25[245]](4));var _0xfe01x1f=util[_0xae25[51]](_0xae25[269],_0xfe01x2a,_0xfe01x43);var _0xfe01x44=true;if(_0xfe01x1e[_0xae25[270]]=== _0xae25[271]){_0xfe01x44= false};var _0xfe01x1d=this[_0xae25[18]][_0xae25[272]](_0xfe01x2a,_0xfe01x43,_0xfe01x1e[_0xae25[259]],_0xfe01x1e[_0xae25[159]],undefined,_0xfe01x44);if(_0xfe01x1d[_0xae25[145]]!==  -1){this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[273],_0xfe01x1f));var _0xfe01x39=this[_0xae25[126]][_0xae25[152]](this,_0xfe01x1e,_0xfe01x1f);if(_0xfe01x39){for(var _0xfe01x2b in _0xfe01x39){if(_0xfe01x39[_0xae25[135]](_0xfe01x2b)){this[_0xae25[18]][_0xae25[147]](util[_0xae25[51]](_0xae25[274],_0xfe01x2b[_0xae25[275]]()),_0xfe01x39[_0xfe01x2b])}};return this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[276],JSON[_0xae25[239]](_0xfe01x39)))}};return _0xfe01x1d};AGIVertices[_0xae25[22]][_0xae25[277]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[278],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[129]])){return this[_0xae25[18]][_0xae25[168]](_0xae25[279])};if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[130]])){return this[_0xae25[18]][_0xae25[168]](_0xae25[280])};var _0xfe01x43=_0xae25[267];var _0xfe01x2a=util[_0xae25[51]](_0xae25[268],FILES_PATH,rs[_0xae25[245]](4));var _0xfe01x1f=util[_0xae25[51]](_0xae25[269],_0xfe01x2a,_0xfe01x43);var _0xfe01x44=true;if(_0xfe01x1e[_0xae25[270]]=== _0xae25[271]){_0xfe01x44= false};var _0xfe01x1d=this[_0xae25[18]][_0xae25[272]](_0xfe01x2a,_0xfe01x43,_0xfe01x1e[_0xae25[259]],_0xfe01x1e[_0xae25[159]],undefined,_0xfe01x44);if(_0xfe01x1d[_0xae25[145]]!==  -1){this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[281],_0xfe01x1f));var _0xfe01x39=this[_0xae25[128]][_0xae25[152]](this,_0xfe01x1e,_0xfe01x1f);if(_0xfe01x39){for(var _0xfe01x2b in _0xfe01x39){if(_0xfe01x39[_0xae25[135]](_0xfe01x2b)){this[_0xae25[18]][_0xae25[147]](util[_0xae25[51]](_0xae25[282],_0xfe01x2b[_0xae25[275]]()),_0xfe01x39[_0xfe01x2b])}};return this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[283],JSON[_0xae25[239]](_0xfe01x39)))}};return _0xfe01x1d};AGIVertices[_0xae25[22]][_0xae25[284]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[285],_0xfe01x1e[_0xae25[68]]));return this[_0xae25[18]][_0xae25[286]](_0xfe01x1e[_0xae25[74]],_0xfe01x1e[_0xae25[75]],_0xfe01x1e[_0xae25[76]])};AGIVertices[_0xae25[22]][_0xae25[287]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[288],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[289]])){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[290])};try{var _0xfe01x45=eval(_0xfe01x1e[_0xae25[289]])?_0xae25[291]:_0xae25[292];this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[293],_0xfe01x1e[_0xae25[289]],_0xfe01x45));return {code:200,result:_0xfe01x45}}catch(e){return {code:200,result:_0xae25[292]}}};AGIVertices[_0xae25[22]][_0xae25[294]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[295],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[296]])){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[297])};var _0xfe01x46=this[_0xae25[45]][_0xae25[152]](this,_0xfe01x1e[_0xae25[296]]);if(!_0xfe01x46){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[298])};for(var _0xfe01x2e=0;_0xfe01x2e< _0xfe01x46[_0xae25[140]];_0xfe01x2e+= 1){var _0xfe01x32=this[_0xae25[18]][_0xae25[21]](util[_0xae25[51]](_0xae25[299],_0xfe01x46[_0xfe01x2e]));if(_0xfe01x32[_0xae25[145]]===  -1){return _0xfe01x32};logger[_0xae25[56]](util[_0xae25[51]](_0xae25[300],_0xfe01x46[_0xfe01x2e],_0xfe01x32[_0xae25[142]]));if(_0xfe01x32[_0xae25[142]]=== _0xae25[291]){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[300],_0xfe01x46[_0xfe01x2e],_0xae25[291]));this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[300],_0xfe01x46[_0xfe01x2e],_0xae25[291]));return {code:200,result:_0xae25[291]}}else {logger[_0xae25[56]](util[_0xae25[51]](_0xae25[300],_0xfe01x46[_0xfe01x2e],_0xae25[292]));this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[300],_0xfe01x46[_0xfe01x2e],_0xae25[292]))}};return {code:200,result:_0xae25[292]}};AGIVertices[_0xae25[22]][_0xae25[301]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[302],_0xfe01x1e[_0xae25[68]]));return this[_0xae25[18]][_0xae25[301]]()};AGIVertices[_0xae25[22]][_0xae25[303]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[304],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[112]])){return this[_0xae25[18]][_0xae25[168]](_0xae25[266])};var _0xfe01x43=_0xae25[267];var _0xfe01x2a=util[_0xae25[51]](_0xae25[268],FILES_PATH,rs[_0xae25[245]](4));var _0xfe01x1f=util[_0xae25[51]](_0xae25[269],_0xfe01x2a,_0xfe01x43);var _0xfe01x44=true;if(_0xfe01x1e[_0xae25[270]]=== _0xae25[271]){_0xfe01x44= false};var _0xfe01x1d=this[_0xae25[18]][_0xae25[272]](_0xfe01x2a,_0xfe01x43,_0xfe01x1e[_0xae25[259]],_0xfe01x1e[_0xae25[159]],undefined,_0xfe01x44);if(_0xfe01x1d[_0xae25[145]]!==  -1){this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[305],_0xfe01x1f));var _0xfe01x39=this[_0xae25[116]][_0xae25[152]](this,_0xfe01x1e,_0xfe01x1f);if(_0xfe01x39){for(var _0xfe01x2b in _0xfe01x39){if(_0xfe01x39[_0xae25[135]](_0xfe01x2b)){this[_0xae25[18]][_0xae25[147]](util[_0xae25[51]](_0xae25[306],_0xfe01x2b[_0xae25[275]]()),_0xfe01x39[_0xfe01x2b])}};return this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[307],JSON[_0xae25[239]](_0xfe01x39)))}};return _0xfe01x1d};AGIVertices[_0xae25[22]][_0xae25[308]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[309],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[112]])){return this[_0xae25[18]][_0xae25[168]](_0xae25[266])};if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[108]])){return this[_0xae25[18]][_0xae25[168]](_0xae25[176])};this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[310],_0xfe01x1e[_0xae25[108]]));var _0xfe01x42=this[_0xae25[111]][_0xae25[152]](this,_0xfe01x1e);if(_0xfe01x42){this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[305],_0xfe01x42));var _0xfe01x1d=this[_0xae25[18]][_0xae25[260]](_0xfe01x42,_0xfe01x1e[_0xae25[259]]);try{fs[_0xae25[262]](_0xfe01x42+ _0xae25[261])}catch(e){logger[_0xae25[54]](e)};return _0xfe01x1d};return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[311])};AGIVertices[_0xae25[22]][_0xae25[312]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[313],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[314]])){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[315])};logger[_0xae25[56]](util[_0xae25[51]](_0xae25[316],this[_0xae25[18]][_0xae25[71]],_0xfe01x1e[_0xae25[314]]));var _0xfe01x47=this[_0xae25[98]][_0xae25[152]](this,_0xfe01x1e[_0xae25[314]]);if(_0xfe01x47){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[317],this[_0xae25[18]][_0xae25[71]],_0xfe01x1e[_0xae25[314]]));this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[317],this[_0xae25[18]][_0xae25[71]],_0xfe01x1e[_0xae25[314]]));return {code:200,result:_0xae25[318]}}else {logger[_0xae25[56]](util[_0xae25[51]](_0xae25[319],this[_0xae25[18]][_0xae25[71]],_0xfe01x1e[_0xae25[314]]));this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[319],this[_0xae25[18]][_0xae25[71]],_0xfe01x1e[_0xae25[314]]));return {code:200,result:_0xae25[320]}}};AGIVertices[_0xae25[22]][_0xae25[321]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[322],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[314]])){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[315])};logger[_0xae25[56]](util[_0xae25[51]](_0xae25[316],this[_0xae25[18]][_0xae25[71]],_0xfe01x1e[_0xae25[314]]));var _0xfe01x47=this[_0xae25[97]][_0xae25[152]](this,_0xfe01x1e[_0xae25[314]]);if(_0xfe01x47){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[317],this[_0xae25[18]][_0xae25[71]],_0xfe01x1e[_0xae25[314]]));this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[317],this[_0xae25[18]][_0xae25[71]],_0xfe01x1e[_0xae25[314]]));return {code:200,result:_0xae25[318]}}else {logger[_0xae25[56]](util[_0xae25[51]](_0xae25[319],this[_0xae25[18]][_0xae25[71]],_0xfe01x1e[_0xae25[314]]));this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[319],this[_0xae25[18]][_0xae25[71]],_0xfe01x1e[_0xae25[314]]));return {code:200,result:_0xae25[320]}}};AGIVertices[_0xae25[22]][_0xae25[323]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[324],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[325]])){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[326])};this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[327],_0xfe01x1e[_0xae25[325]]));var _0xfe01x39=eval(_0xfe01x1e[_0xae25[325]]);if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[201]])){return this[_0xae25[18]][_0xae25[168]](_0xae25[202])};var _0xfe01x3a=this[_0xae25[21]][_0xae25[152]](this,_0xfe01x1e[_0xae25[201]]);if(!_0xfe01x3a){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[203])};if(_[_0xae25[328]](_0xfe01x39)){var _0xfe01x17=this;_0xfe01x39[_0xae25[205]](function(_0xfe01x33,_0xfe01x2b){_0xfe01x17[_0xae25[18]][_0xae25[147]](util[_0xae25[51]](_0xae25[329],_0xfe01x3a,_0xfe01x2b),_0xfe01x33)});return this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[330],_0xfe01x3a))}else {return this[_0xae25[18]][_0xae25[147]](_0xfe01x3a,_0xfe01x39)}};AGIVertices[_0xae25[22]][_0xae25[15]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[331],_0xfe01x1e[_0xae25[68]]));if(_0xfe01x1e[_0xae25[153]]=== 0){return this[_0xae25[150]](_0xfe01x1e)};_0xfe01x1e[_0xae25[153]]-= 1;if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[232]])){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[233])};var _0xfe01x3e=this[_0xae25[38]][_0xae25[152]](this,_0xfe01x1e[_0xae25[232]]);if(!_0xfe01x3e){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[234])};var _0xfe01x1d=this[_0xae25[18]][_0xae25[237]](_0xfe01x3e,_0xfe01x1e[_0xae25[235]],_0xfe01x1e[_0xae25[332]]);var _0xfe01x3f=_0xfe01x1d[_0xae25[145]];if(_0xfe01x1d[_0xae25[145]]===  -1){this[_0xae25[66]][_0xae25[152]](this,_0xfe01x1e,_0xae25[149]);return _0xfe01x1d}else {if(_0xfe01x1d[_0xae25[142]]=== _0xae25[159]){_0xfe01x1d[_0xae25[145]]= (_0xfe01x1d[_0xae25[145]][_0xae25[140]]> 0)?_0xfe01x1d[_0xae25[145]]:_0xae25[333]}else {if(_[_0xae25[81]](_0xfe01x1d[_0xae25[145]])){_0xfe01x1d[_0xae25[145]]= _0xae25[334];_0xfe01x3f= _0xae25[334]}}};if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[201]])){this[_0xae25[18]][_0xae25[168]](_0xae25[202])}else {var _0xfe01x3a=this[_0xae25[21]][_0xae25[152]](this,_0xfe01x1e[_0xae25[201]]);if(!_0xfe01x3a){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[203])};this[_0xae25[18]][_0xae25[147]](_0xfe01x3a,_0xfe01x3f)};this[_0xae25[66]][_0xae25[152]](this,_0xfe01x1e,_0xfe01x3f);return _0xfe01x1d};AGIVertices[_0xae25[22]][_0xae25[168]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[335],_0xfe01x1e[_0xae25[68]]));return this[_0xae25[18]][_0xae25[168]](_0xfe01x1e[_0xae25[336]]|| _0xfe01x1e[_0xae25[68]])};AGIVertices[_0xae25[22]][_0xae25[337]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[338],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[314]])){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[315])};logger[_0xae25[56]](util[_0xae25[51]](_0xae25[316],this[_0xae25[18]][_0xae25[71]],_0xfe01x1e[_0xae25[314]]));var _0xfe01x48=this[_0xae25[92]][_0xae25[152]](this,_0xfe01x1e[_0xae25[339]]);var _0xfe01x47=this[_0xae25[94]][_0xae25[152]](this,_0xfe01x1e[_0xae25[314]],_0xfe01x48);if(_0xfe01x47){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[317],this[_0xae25[18]][_0xae25[71]],_0xfe01x1e[_0xae25[314]]));this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[317],this[_0xae25[18]][_0xae25[71]],_0xfe01x1e[_0xae25[314]]));return {code:200,result:_0xae25[318]}}else {logger[_0xae25[56]](util[_0xae25[51]](_0xae25[319],this[_0xae25[18]][_0xae25[71]],_0xfe01x1e[_0xae25[314]]));this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[317],this[_0xae25[18]][_0xae25[71]],_0xfe01x1e[_0xae25[314]]));return {code:200,result:_0xae25[320]}}};AGIVertices[_0xae25[22]][_0xae25[340]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[341],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[232]])){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[233])};var _0xfe01x3e=this[_0xae25[38]][_0xae25[152]](this,_0xfe01x1e[_0xae25[232]]);if(!_0xfe01x3e){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[234])};var _0xfe01x34=this[_0xae25[18]][_0xae25[106]](_0xae25[342],[_0xfe01x3e,_0xfe01x1e[_0xae25[217]]]);if(_0xfe01x34[_0xae25[145]]===  -1){return _0xfe01x34};return this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[173],_0xae25[342],_0xfe01x3e))};AGIVertices[_0xae25[22]][_0xae25[343]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[344],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[345]])){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[346])};var _0xfe01x49=_0xae25[104];var _0xfe01x13=parseInt(_0xfe01x1e[_0xae25[345]],10);if(isNaN(_0xfe01x13)){_0xfe01x49= _0xfe01x1e[_0xae25[345]]}else {_0xfe01x49= this[_0xae25[27]][_0xae25[152]](this,_0xfe01x1e[_0xae25[345]]);if(!_0xfe01x49){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[347])}};var _0xfe01x4a=_0xae25[104];if(this[_0xae25[119]](_0xfe01x1e[_0xae25[232]])){var _0xfe01x4b=this[_0xae25[38]][_0xae25[152]](this,_0xfe01x1e[_0xae25[232]]);if(_0xfe01x4b){_0xfe01x4a= _0xfe01x4b}};this[_0xae25[66]][_0xae25[152]](this,_0xfe01x1e,_0xfe01x49);if(_0xfe01x1e[_0xae25[217]][_0xae25[348]](_0xae25[241])< 0){_0xfe01x1e[_0xae25[217]]+= _0xae25[241]};if(_0xfe01x1e[_0xae25[217]][_0xae25[348]](_0xae25[349])< 0){_0xfe01x1e[_0xae25[217]]+= _0xae25[349]};this[_0xae25[18]][_0xae25[147]](_0xae25[350],_0xfe01x49?_0xfe01x49[_0xae25[351]]():_0xae25[104]);var _0xfe01x34=this[_0xae25[18]][_0xae25[106]](_0xae25[352],[_0xfe01x49,_0xfe01x1e[_0xae25[217]],_0xfe01x1e[_0xae25[218]],_0xfe01x4a,_0xfe01x1e[_0xae25[159]],_0xfe01x1e[_0xae25[10]],_0xfe01x1e[_0xae25[353]],_0xfe01x1e[_0xae25[354]],_0xae25[104],_0xfe01x1e[_0xae25[355]]]);if(_0xfe01x34[_0xae25[145]]===  -1){return _0xfe01x34};return this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[173],_0xae25[352],_0xfe01x49))};AGIVertices[_0xae25[22]][_0xae25[356]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[357],_0xfe01x1e[_0xae25[68]]));var _0xfe01x43=_0xfe01x1e[_0xae25[358]]|| _0xae25[267];var _0xfe01x1f=util[_0xae25[51]](_0xae25[359],this[_0xae25[18]][_0xae25[67]],rs[_0xae25[245]](5));var _0xfe01x20=util[_0xae25[51]](_0xae25[360],FILES_PATH,_0xfe01x1f,_0xfe01x43);var _0xfe01x4c=util[_0xae25[51]](_0xae25[268],FILES_PATH,_0xfe01x1f);this[_0xae25[72]][_0xae25[152]](this,_0xfe01x1e,_0xfe01x1f,_0xfe01x20);this[_0xae25[18]][_0xae25[147]](_0xae25[361],_0xfe01x1f);logger[_0xae25[56]](_0xae25[362],_0xfe01x4c,_0xfe01x43,_0xfe01x1e[_0xae25[363]],_0xfe01x1e[_0xae25[159]]);return this[_0xae25[18]][_0xae25[272]](_0xfe01x4c,_0xfe01x43,_0xfe01x1e[_0xae25[363]],_0xfe01x1e[_0xae25[159]],undefined,true)};AGIVertices[_0xae25[22]][_0xae25[364]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[365],_0xfe01x1e[_0xae25[68]]));return this[_0xae25[18]][_0xae25[367]](_0xfe01x1e[_0xae25[366]][_0xae25[105]](/\s+/g,_0xae25[104]),_0xfe01x1e[_0xae25[363]])};AGIVertices[_0xae25[22]][_0xae25[368]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[369],_0xfe01x1e[_0xae25[68]]));return this[_0xae25[18]][_0xae25[371]](_0xfe01x1e[_0xae25[370]][_0xae25[105]](/\s+/g,_0xae25[104]),_0xfe01x1e[_0xae25[363]])};AGIVertices[_0xae25[22]][_0xae25[372]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[373],_0xfe01x1e[_0xae25[68]]));return this[_0xae25[18]][_0xae25[374]](_0xfe01x1e[_0xae25[108]],_0xfe01x1e[_0xae25[363]])};AGIVertices[_0xae25[22]][_0xae25[375]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[376],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[377]])){return this[_0xae25[18]][_0xae25[168]](_0xae25[378])};var _0xfe01x4d=this[_0xae25[42]][_0xae25[152]](this,_0xfe01x1e[_0xae25[377]]);if(!_0xfe01x4d||  !_0xfe01x4d[_0xae25[379]]){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[380])};var _0xfe01x19={from:util[_0xae25[51]](_0xae25[381],_0xfe01x4d[_0xae25[24]],_0xfe01x4d[_0xae25[382]]|| _0xfe01x4d[_0xae25[379]][_0xae25[383]]),to:_0xfe01x1e[_0xae25[384]]|| _0xae25[104],cc:_0xfe01x1e[_0xae25[385]]|| _0xae25[104],bcc:_0xfe01x1e[_0xae25[386]]|| _0xae25[104],subject:_0xfe01x1e[_0xae25[387]],html:_0xfe01x1e[_0xae25[108]],text:_0xfe01x1e[_0xae25[108]]};var _0xfe01x18={tls:{rejectUnauthorized:false}};if(_0xfe01x4d[_0xae25[379]][_0xae25[388]]){_0xfe01x18[_0xae25[388]]= _0xfe01x4d[_0xae25[379]][_0xae25[388]]}else {_0xfe01x18[_0xae25[389]]= _0xfe01x4d[_0xae25[379]][_0xae25[389]];_0xfe01x18[_0xae25[390]]= _0xfe01x4d[_0xae25[379]][_0xae25[390]];_0xfe01x18[_0xae25[391]]= _0xfe01x4d[_0xae25[379]][_0xae25[391]]};if(_0xfe01x4d[_0xae25[379]][_0xae25[392]]){_0xfe01x18[_0xae25[393]]= {user:_0xfe01x4d[_0xae25[379]][_0xae25[383]],pass:_0xfe01x4d[_0xae25[379]][_0xae25[394]]}};if(this[_0xae25[119]](_0xfe01x1e[_0xae25[395]])){};logger[_0xae25[211]](_0xae25[396],JSON[_0xae25[239]](_0xfe01x19));this[_0xae25[66]][_0xae25[152]](this,_0xfe01x1e,_0xfe01x1e[_0xae25[377]]);this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[397],_0xfe01x4d[_0xae25[24]]));this[_0xae25[44]][_0xae25[152]](this,_0xfe01x18,_0xfe01x19);return this[_0xae25[18]][_0xae25[168]](_0xae25[398])};AGIVertices[_0xae25[22]][_0xae25[399]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[400],_0xfe01x1e[_0xae25[68]]));return this[_0xae25[18]][_0xae25[168]](_0xae25[401])};AGIVertices[_0xae25[22]][_0xae25[402]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[403],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[404]])){return this[_0xae25[18]][_0xae25[168]](_0xae25[405])};var _0xfe01x4e=this[_0xae25[63]][_0xae25[152]](this,_0xfe01x1e[_0xae25[404]]);if(!_0xfe01x4e){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[406])};var _0xfe01x19={body:_0xfe01x1e[_0xae25[407]],phone:_0xfe01x1e[_0xae25[384]]|| _0xae25[104],SmsAccountId:_0xfe01x4e[_0xae25[408]]};logger[_0xae25[211]](_0xae25[409],JSON[_0xae25[239]](_0xfe01x19));this[_0xae25[66]][_0xae25[152]](this,_0xfe01x1e,_0xfe01x1e[_0xae25[404]]);this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[410],_0xfe01x4e[_0xae25[24]]));this[_0xae25[65]][_0xae25[152]](this,_0xfe01x19);return this[_0xae25[18]][_0xae25[168]](_0xae25[411])};AGIVertices[_0xae25[22]][_0xae25[412]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[413],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[201]])){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[414])};var _0xfe01x3a=this[_0xae25[21]][_0xae25[152]](this,_0xfe01x1e[_0xae25[201]]);if(!_0xfe01x3a){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[203])};return this[_0xae25[18]][_0xae25[147]](_0xfe01x3a,_0xfe01x1e[_0xae25[415]])};AGIVertices[_0xae25[22]][_0xae25[416]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[417],_0xfe01x1e[_0xae25[68]]));this[_0xae25[18]][_0xae25[168]](_0xae25[418]);if(_0xfe01x1e[_0xae25[157]]=== _0xae25[419]){this[_0xae25[18]][_0xae25[168]](_0xae25[420]);return this[_0xae25[18]][_0xae25[157]]()};return this[_0xae25[18]][_0xae25[168]](_0xae25[421])};AGIVertices[_0xae25[22]][_0xae25[422]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[423],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[424]])){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[425])};var _0xfe01x4f=this[_0xae25[29]][_0xae25[152]](this,_0xfe01x1e[_0xae25[424]]);if(!this[_0xae25[119]](_0xfe01x4f)){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,util[_0xae25[51]](_0xae25[426],_0xfe01x1e[_0xae25[424]]))};if(_0xfe01x4f=== this[_0xae25[18]][_0xae25[70]]){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[427])};this[_0xae25[66]][_0xae25[152]](this,_0xfe01x1e,_0xfe01x4f);var _0xfe01x34=this[_0xae25[18]][_0xae25[106]](_0xae25[428],util[_0xae25[51]](_0xae25[429],config[_0xae25[10]][_0xae25[389]]|| _0xae25[430],_0xfe01x4f,this[_0xae25[18]][_0xae25[70]]));if(_0xfe01x34[_0xae25[145]]===  -1){return _0xfe01x34};return this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[173],_0xae25[428],_0xfe01x4f))};AGIVertices[_0xae25[22]][_0xae25[431]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[432],_0xfe01x1e[_0xae25[68]]));var _0xfe01x28=this[_0xae25[102]][_0xae25[152]](this,_0xfe01x1e[_0xae25[155]]);this[_0xae25[66]][_0xae25[152]](this,_0xfe01x1e,_0xfe01x1e[_0xae25[155]]);if(this[_0xae25[119]](_0xfe01x1e[_0xae25[201]])){var _0xfe01x3a=this[_0xae25[21]][_0xae25[152]](this,_0xfe01x1e[_0xae25[201]]);if(_0xfe01x3a){this[_0xae25[18]][_0xae25[147]](_0xfe01x3a,_0xfe01x28);return this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[433],_0xfe01x1e[_0xae25[155]],_0xfe01x3a))}};return this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[434],_0xfe01x1e[_0xae25[155]]))};AGIVertices[_0xae25[22]][_0xae25[435]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[436],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[108]])){return this[_0xae25[18]][_0xae25[168]](_0xae25[176])};this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[437],_0xfe01x1e[_0xae25[108]]));var _0xfe01x42=this[_0xae25[107]][_0xae25[152]](this,_0xfe01x1e);if(_0xfe01x42){this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[438],_0xfe01x42));var _0xfe01x1d=this[_0xae25[18]][_0xae25[260]](_0xfe01x42);try{fs[_0xae25[262]](_0xfe01x42+ _0xae25[261])}catch(e){logger[_0xae25[54]](e)};return _0xfe01x1d};return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[439])};AGIVertices[_0xae25[22]][_0xae25[440]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[441],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[314]])){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[315])};logger[_0xae25[56]](util[_0xae25[51]](_0xae25[316],this[_0xae25[18]][_0xae25[71]],_0xfe01x1e[_0xae25[314]]));var _0xfe01x47=this[_0xae25[96]][_0xae25[152]](this,_0xfe01x1e[_0xae25[314]]);if(_0xfe01x47){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[317],this[_0xae25[18]][_0xae25[71]],_0xfe01x1e[_0xae25[314]]));this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[317],this[_0xae25[18]][_0xae25[71]],_0xfe01x1e[_0xae25[314]]));return {code:200,result:_0xae25[318]}}else {logger[_0xae25[56]](util[_0xae25[51]](_0xae25[319],this[_0xae25[18]][_0xae25[71]],_0xfe01x1e[_0xae25[314]]));this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[319],this[_0xae25[18]][_0xae25[71]],_0xfe01x1e[_0xae25[314]]));return {code:200,result:_0xae25[320]}}};AGIVertices[_0xae25[22]][_0xae25[442]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[443],_0xfe01x1e[_0xae25[68]]));var _0xfe01x34=this[_0xae25[18]][_0xae25[106]](_0xae25[444],[_0xfe01x1e[_0xae25[445]],_0xfe01x1e[_0xae25[172]]]);if(_0xfe01x34[_0xae25[145]]===  -1){return _0xfe01x34};return this[_0xae25[18]][_0xae25[168]](util[_0xae25[51]](_0xae25[173],_0xae25[444],_0xfe01x1e[_0xae25[445]]))};AGIVertices[_0xae25[22]][_0xae25[446]]= function(_0xfe01x1e){logger[_0xae25[56]](util[_0xae25[51]](_0xae25[447],_0xfe01x1e[_0xae25[68]]));if(!this[_0xae25[119]](_0xfe01x1e[_0xae25[201]])){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[414])};var _0xfe01x3a=this[_0xae25[21]][_0xae25[152]](this,_0xfe01x1e[_0xae25[201]]);if(!_0xfe01x3a){return this[_0xae25[18]][_0xae25[54]](_0xfe01x1e,_0xae25[203])};var _0xfe01x32=this[_0xae25[18]][_0xae25[21]](_0xfe01x3a);return {code:200,result:(_0xfe01x32[_0xae25[142]])?_0xfe01x32[_0xae25[142]]:_0xae25[151]}};String[_0xae25[22]][_0xae25[143]]= function(_0xfe01x50,_0xfe01x51){return this[_0xae25[139]](_0xfe01x50)[_0xae25[448]](_0xfe01x51)};module[_0xae25[449]]= AGIVertices
\ No newline at end of file
index c5c791f..3217874 100644 (file)
@@ -1 +1 @@
-var _0x9995=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x61\x6D\x69","\x61\x63\x77","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x72\x70\x63\x2F\x75\x73\x65\x72","\x2E\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74\x73","\x74\x69\x6D\x65\x72\x73","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6E\x6E\x65\x63\x74","\x6F\x6E","\x68\x61\x6E\x67\x75\x70\x72\x65\x71\x75\x65\x73\x74","\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x52\x65\x71\x75\x65\x73\x74","\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x52\x69\x6E\x67\x4E\x6F\x41\x6E\x73\x77\x65\x72","\x61\x74\x74\x65\x6E\x64\x65\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x73\x79\x6E\x63\x41\x74\x74\x65\x6E\x64\x65\x64\x54\x72\x61\x6E\x73\x66\x65\x72","\x62\x6C\x69\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x73\x79\x6E\x63\x42\x6C\x69\x6E\x64\x54\x72\x61\x6E\x73\x66\x65\x72","\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x73\x74\x61\x72\x74\x41\x63\x77","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x71\x75\x65\x75\x65","\x66\x69\x6E\x61\x6C\x6C\x79","\x5B\x25\x73\x5D\x5B\x54\x49\x4D\x45\x52\x3A\x25\x73\x5D\x5B\x41\x47\x45\x4E\x54\x3A\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x3A\x25\x73\x5D","\x61\x63\x77\x54\x69\x6D\x65\x6F\x75\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x5B\x25\x73\x5D\x5B\x53\x54\x41\x52\x54\x5D\x5B\x41\x47\x45\x4E\x54\x3A\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x3A\x25\x73\x5D","\x69\x6E\x66\x6F","\x74\x69\x6D\x65\x72","\x73\x74\x6F\x70\x41\x63\x77","\x6C\x61\x73\x74\x50\x61\x75\x73\x65\x41\x74","\x75\x70\x64\x61\x74\x65\x41\x63\x77","\x5B\x25\x73\x5D\x5B\x55\x50\x44\x41\x54\x45\x5D\x5B\x45\x52\x52\x4F\x52\x53\x3A\x25\x73\x5D","\x5B\x25\x73\x5D\x5B\x55\x50\x44\x41\x54\x45\x5D\x5B\x41\x43\x57\x54\x49\x4D\x45\x3A\x25\x73\x5D","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x41\x43\x57","\x73\x61\x76\x65\x50\x61\x75\x73\x65","\x5B\x25\x73\x5D\x5B\x49\x4E\x50\x41\x55\x53\x45\x5D\x5B\x41\x47\x45\x4E\x54\x3A\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x3A\x25\x73\x5D","\x69\x64","\x67\x65\x74\x41\x67\x65\x6E\x74","\x51\x75\x65\x75\x65\x50\x61\x75\x73\x65","\x5B\x54\x49\x4D\x45\x52\x5D\x5B\x53\x54\x4F\x50\x5D\x5B\x41\x47\x45\x4E\x54\x3A\x25\x73\x5D","\x73\x61\x76\x65\x55\x6E\x70\x61\x75\x73\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x5B\x25\x73\x5D\x5B\x48\x41\x4E\x47\x55\x50\x3A\x55\x4E\x49\x51\x55\x45\x49\x44\x5D","\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x5B\x25\x73\x5D\x5B\x48\x41\x4E\x47\x55\x50\x3A\x4C\x49\x4E\x4B\x45\x44\x49\x44\x5D","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x75\x6E\x69\x71\x75\x65\x69\x64","\x5B\x25\x73\x5D\x5B\x41\x54\x54\x45\x4E\x44\x45\x44\x54\x52\x41\x4E\x53\x46\x45\x52\x3A\x55\x4E\x49\x51\x55\x45\x49\x44\x5D","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x5B\x25\x73\x5D\x5B\x41\x54\x54\x45\x4E\x44\x45\x44\x54\x52\x41\x4E\x53\x46\x45\x52\x3A\x4C\x49\x4E\x4B\x45\x44\x49\x44\x5D","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x75\x6E\x69\x71\x75\x65\x69\x64","\x5B\x25\x73\x5D\x5B\x42\x4C\x49\x4E\x44\x54\x52\x41\x4E\x53\x46\x45\x52\x3A\x55\x4E\x49\x51\x55\x45\x49\x44\x5D","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x5B\x25\x73\x5D\x5B\x42\x4C\x49\x4E\x44\x54\x52\x41\x4E\x53\x46\x45\x52\x3A\x4C\x49\x4E\x4B\x45\x44\x49\x44\x5D","\x61\x75\x74\x6F\x70\x61\x75\x73\x65","\x61\x6C\x6C","\x5B\x25\x73\x5D\x5B\x41\x55\x54\x4F\x50\x41\x55\x53\x45\x5D\x5B\x41\x47\x45\x4E\x54\x3A\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x3A\x25\x5D","\x41\x75\x74\x6F\x2D\x50\x61\x75\x73\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9995[0];var util=require(_0x9995[1]);var _=require(_0x9995[2]);var moment=require(_0x9995[3]);var ami=require(_0x9995[4]);var logger=require(_0x9995[6])(_0x9995[5]);var RpcUser=require(_0x9995[7]);var RpcVoiceAgentReport=require(_0x9995[8]);var io=require(_0x9995[10])({host:_0x9995[9],port:6379});function Acw(_0x6260xa){this[_0x9995[11]]= _0x6260xa[_0x9995[11]];this[_0x9995[12]]= _0x6260xa[_0x9995[12]];this[_0x9995[13]]= _0x6260xa[_0x9995[13]];this[_0x9995[14]]= {};ami[_0x9995[18]](_0x9995[15],this[_0x9995[17]][_0x9995[16]](this));ami[_0x9995[18]](_0x9995[19],this[_0x9995[20]][_0x9995[16]](this));ami[_0x9995[18]](_0x9995[21],this[_0x9995[22]][_0x9995[16]](this));ami[_0x9995[18]](_0x9995[23],this[_0x9995[24]][_0x9995[16]](this));ami[_0x9995[18]](_0x9995[25],this[_0x9995[26]][_0x9995[16]](this))}function getDiff(_0x6260xc){var _0x6260xd=moment()[_0x9995[27]](0);var _0x6260xe=moment(_0x6260xc)[_0x9995[27]](0);return _0x6260xd[_0x9995[29]](_0x6260xe,_0x9995[28])}Acw[_0x9995[31]][_0x9995[30]]= function(_0x6260xf){var _0x6260x10=this;var _0x6260x11=this[_0x9995[14]][_0x6260xf][_0x9995[32]];var _0x6260x12=this[_0x9995[14]][_0x6260xf][_0x9995[33]];ami.Action({action:_0x9995[55],interface:_0x6260x11,paused:true,reason:_0x9995[50]})[_0x9995[48]](function(_0x6260x14){if(_0x6260x10[_0x9995[12]][_0x6260x11]){return RpcUser[_0x9995[54]](_0x6260x10[_0x9995[12]][_0x6260x11][_0x9995[53]])[_0x9995[48]](function(_0x6260x15){if(_0x6260x15&&  !_0x6260x15[_0x9995[39]]){logger[_0x9995[41]](_0x9995[40],_0x6260xf,_0x6260x11,_0x6260x12);return RpcUser[_0x9995[51]](_0x6260x10[_0x9995[12]][_0x6260x11],_0x9995[50],_0x6260xf)[_0x9995[48]](function(_0x6260x15){_0x6260x10[_0x9995[13]][_0x6260x11]= {};logger[_0x9995[41]](_0x9995[35],_0x6260xf,_0x6260x10[_0x9995[11]][_0x6260x12][_0x9995[36]],_0x6260x11,_0x6260x12);_0x6260x10[_0x9995[13]][_0x6260x11][_0x9995[42]]= setTimeout(_0x6260x10[_0x9995[43]][_0x9995[16]](_0x6260x10,_0x6260x11),_0x6260x10[_0x9995[11]][_0x6260x12][_0x9995[36]]* 1000);_0x6260x10[_0x9995[13]][_0x6260x11][_0x9995[44]]= _0x6260x15[_0x9995[44]];_0x6260x10[_0x9995[13]][_0x6260x11][_0x9995[45]]= function(){var _0x6260x16=getDiff(_0x6260x10[_0x9995[13]][_0x6260x11][_0x9995[44]]);clearTimeout(_0x6260x10[_0x9995[13]][_0x6260x11][_0x9995[42]]);RpcVoiceAgentReport[_0x9995[49]]({acwtime:_0x6260x16},_0x6260xf)[_0x9995[48]](function(_0x6260x15){logger[_0x9995[41]](_0x9995[47],_0x6260xf,_0x6260x16,_0x6260x15)})[_0x9995[38]](function(_0x6260x13){logger[_0x9995[37]](_0x9995[46],_0x6260xf,_0x6260x13)});delete _0x6260x10[_0x9995[13]][_0x6260x11]}})}else {logger[_0x9995[41]](_0x9995[52],_0x6260xf,_0x6260x11,_0x6260x12)}})}})[_0x9995[38]](function(_0x6260x13){logger[_0x9995[37]](_0x9995[35],_0x6260xf,_0x6260x10[_0x9995[11]][_0x6260x12][_0x9995[36]],_0x6260x11,_0x6260x12)})[_0x9995[34]](function(){delete _0x6260x10[_0x9995[14]][_0x6260xf]})};Acw[_0x9995[31]][_0x9995[43]]= function(_0x6260x11){logger[_0x9995[41]](_0x9995[56],_0x6260x11);RpcUser[_0x9995[57]](this[_0x9995[12]][_0x6260x11])};Acw[_0x9995[31]][_0x9995[17]]= function(_0x6260x17){if(this[_0x9995[11]][_0x6260x17[_0x9995[33]]]&& this[_0x9995[11]][_0x6260x17[_0x9995[33]]][_0x9995[5]]){if(this[_0x9995[12]][_0x6260x17[_0x9995[32]]]){this[_0x9995[14]][_0x6260x17[_0x9995[58]]]= {queue:_0x6260x17[_0x9995[33]],interface:_0x6260x17[_0x9995[32]]}}}};Acw[_0x9995[31]][_0x9995[20]]= function(_0x6260x17){if(this[_0x9995[14]][_0x6260x17[_0x9995[58]]]){logger[_0x9995[41]](_0x9995[59],_0x6260x17[_0x9995[58]]);this[_0x9995[30]](_0x6260x17[_0x9995[58]])}else {if(this[_0x9995[14]][_0x6260x17[_0x9995[60]]]){logger[_0x9995[41]](_0x9995[61],_0x6260x17[_0x9995[60]]);this[_0x9995[30]](_0x6260x17[_0x9995[60]])}}};Acw[_0x9995[31]][_0x9995[24]]= function(_0x6260x17){if(this[_0x9995[14]][_0x6260x17[_0x9995[62]]]){logger[_0x9995[41]](_0x9995[63],_0x6260x17[_0x9995[62]]);this[_0x9995[30]](_0x6260x17[_0x9995[62]])}else {if(this[_0x9995[14]][_0x6260x17[_0x9995[64]]]){logger[_0x9995[41]](_0x9995[65],_0x6260x17[_0x9995[64]]);this[_0x9995[30]](_0x6260x17[_0x9995[64]])}}};Acw[_0x9995[31]][_0x9995[26]]= function(_0x6260x17){if(this[_0x9995[14]][_0x6260x17[_0x9995[66]]]){logger[_0x9995[41]](_0x9995[67],_0x6260x17[_0x9995[66]]);this[_0x9995[30]](_0x6260x17[_0x9995[66]])}else {if(this[_0x9995[14]][_0x6260x17[_0x9995[68]]]){logger[_0x9995[41]](_0x9995[69],_0x6260x17[_0x9995[68]]);this[_0x9995[30]](_0x6260x17[_0x9995[68]])}}};Acw[_0x9995[31]][_0x9995[22]]= function(_0x6260x17){if(this[_0x9995[11]][_0x6260x17[_0x9995[33]]]&& this[_0x9995[11]][_0x6260x17[_0x9995[33]]][_0x9995[70]]=== _0x9995[71]){if(this[_0x9995[12]][_0x6260x17[_0x9995[32]]]){logger[_0x9995[41]](_0x9995[72],_0x6260x17[_0x9995[58]],_0x6260x17[_0x9995[32]],_0x6260x17[_0x9995[33]]);return RpcUser[_0x9995[51]](this[_0x9995[12]][_0x6260x17[_0x9995[32]]],_0x9995[73],_0x6260x17[_0x9995[58]])}}};module[_0x9995[74]]= Acw
\ No newline at end of file
+var _0xf067=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x61\x6D\x69","\x61\x63\x77","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x72\x70\x63\x2F\x75\x73\x65\x72","\x2E\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74\x73","\x74\x69\x6D\x65\x72\x73","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6E\x6E\x65\x63\x74","\x6F\x6E","\x68\x61\x6E\x67\x75\x70\x72\x65\x71\x75\x65\x73\x74","\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x52\x65\x71\x75\x65\x73\x74","\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x52\x69\x6E\x67\x4E\x6F\x41\x6E\x73\x77\x65\x72","\x61\x74\x74\x65\x6E\x64\x65\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x73\x79\x6E\x63\x41\x74\x74\x65\x6E\x64\x65\x64\x54\x72\x61\x6E\x73\x66\x65\x72","\x62\x6C\x69\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x73\x79\x6E\x63\x42\x6C\x69\x6E\x64\x54\x72\x61\x6E\x73\x66\x65\x72","\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x73\x74\x61\x72\x74\x41\x63\x77","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x71\x75\x65\x75\x65","\x66\x69\x6E\x61\x6C\x6C\x79","\x5B\x25\x73\x5D\x5B\x54\x49\x4D\x45\x52\x3A\x25\x73\x5D\x5B\x41\x47\x45\x4E\x54\x3A\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x3A\x25\x73\x5D","\x61\x63\x77\x54\x69\x6D\x65\x6F\x75\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x5B\x25\x73\x5D\x5B\x53\x54\x41\x52\x54\x5D\x5B\x41\x47\x45\x4E\x54\x3A\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x3A\x25\x73\x5D","\x69\x6E\x66\x6F","\x74\x69\x6D\x65\x72","\x73\x74\x6F\x70\x41\x63\x77","\x6C\x61\x73\x74\x50\x61\x75\x73\x65\x41\x74","\x75\x70\x64\x61\x74\x65\x41\x63\x77","\x5B\x25\x73\x5D\x5B\x55\x50\x44\x41\x54\x45\x5D\x5B\x45\x52\x52\x4F\x52\x53\x3A\x25\x73\x5D","\x5B\x25\x73\x5D\x5B\x55\x50\x44\x41\x54\x45\x5D\x5B\x41\x43\x57\x54\x49\x4D\x45\x3A\x25\x73\x5D","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x41\x43\x57","\x73\x61\x76\x65\x50\x61\x75\x73\x65","\x5B\x25\x73\x5D\x5B\x49\x4E\x50\x41\x55\x53\x45\x5D\x5B\x41\x47\x45\x4E\x54\x3A\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x3A\x25\x73\x5D","\x69\x64","\x67\x65\x74\x41\x67\x65\x6E\x74","\x51\x75\x65\x75\x65\x50\x61\x75\x73\x65","\x5B\x54\x49\x4D\x45\x52\x5D\x5B\x53\x54\x4F\x50\x5D\x5B\x41\x47\x45\x4E\x54\x3A\x25\x73\x5D","\x73\x61\x76\x65\x55\x6E\x70\x61\x75\x73\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x5B\x25\x73\x5D\x5B\x48\x41\x4E\x47\x55\x50\x3A\x55\x4E\x49\x51\x55\x45\x49\x44\x5D","\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x5B\x25\x73\x5D\x5B\x48\x41\x4E\x47\x55\x50\x3A\x4C\x49\x4E\x4B\x45\x44\x49\x44\x5D","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x75\x6E\x69\x71\x75\x65\x69\x64","\x5B\x25\x73\x5D\x5B\x41\x54\x54\x45\x4E\x44\x45\x44\x54\x52\x41\x4E\x53\x46\x45\x52\x3A\x55\x4E\x49\x51\x55\x45\x49\x44\x5D","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x5B\x25\x73\x5D\x5B\x41\x54\x54\x45\x4E\x44\x45\x44\x54\x52\x41\x4E\x53\x46\x45\x52\x3A\x4C\x49\x4E\x4B\x45\x44\x49\x44\x5D","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x75\x6E\x69\x71\x75\x65\x69\x64","\x5B\x25\x73\x5D\x5B\x42\x4C\x49\x4E\x44\x54\x52\x41\x4E\x53\x46\x45\x52\x3A\x55\x4E\x49\x51\x55\x45\x49\x44\x5D","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x5B\x25\x73\x5D\x5B\x42\x4C\x49\x4E\x44\x54\x52\x41\x4E\x53\x46\x45\x52\x3A\x4C\x49\x4E\x4B\x45\x44\x49\x44\x5D","\x61\x75\x74\x6F\x70\x61\x75\x73\x65","\x61\x6C\x6C","\x5B\x25\x73\x5D\x5B\x41\x55\x54\x4F\x50\x41\x55\x53\x45\x5D\x5B\x41\x47\x45\x4E\x54\x3A\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x3A\x25\x5D","\x41\x75\x74\x6F\x2D\x50\x61\x75\x73\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf067[0];var util=require(_0xf067[1]);var _=require(_0xf067[2]);var moment=require(_0xf067[3]);var ami=require(_0xf067[4]);var logger=require(_0xf067[6])(_0xf067[5]);var RpcUser=require(_0xf067[7]);var RpcVoiceAgentReport=require(_0xf067[8]);var io=require(_0xf067[10])({host:_0xf067[9],port:6379});function Acw(_0x6f68xa){this[_0xf067[11]]= _0x6f68xa[_0xf067[11]];this[_0xf067[12]]= _0x6f68xa[_0xf067[12]];this[_0xf067[13]]= _0x6f68xa[_0xf067[13]];this[_0xf067[14]]= {};ami[_0xf067[18]](_0xf067[15],this[_0xf067[17]][_0xf067[16]](this));ami[_0xf067[18]](_0xf067[19],this[_0xf067[20]][_0xf067[16]](this));ami[_0xf067[18]](_0xf067[21],this[_0xf067[22]][_0xf067[16]](this));ami[_0xf067[18]](_0xf067[23],this[_0xf067[24]][_0xf067[16]](this));ami[_0xf067[18]](_0xf067[25],this[_0xf067[26]][_0xf067[16]](this))}function getDiff(_0x6f68xc){var _0x6f68xd=moment()[_0xf067[27]](0);var _0x6f68xe=moment(_0x6f68xc)[_0xf067[27]](0);return _0x6f68xd[_0xf067[29]](_0x6f68xe,_0xf067[28])}Acw[_0xf067[31]][_0xf067[30]]= function(_0x6f68xf){var _0x6f68x10=this;var _0x6f68x11=this[_0xf067[14]][_0x6f68xf][_0xf067[32]];var _0x6f68x12=this[_0xf067[14]][_0x6f68xf][_0xf067[33]];ami.Action({action:_0xf067[55],interface:_0x6f68x11,paused:true,reason:_0xf067[50]})[_0xf067[48]](function(_0x6f68x14){if(_0x6f68x10[_0xf067[12]][_0x6f68x11]){return RpcUser[_0xf067[54]](_0x6f68x10[_0xf067[12]][_0x6f68x11][_0xf067[53]])[_0xf067[48]](function(_0x6f68x15){if(_0x6f68x15&&  !_0x6f68x15[_0xf067[39]]){logger[_0xf067[41]](_0xf067[40],_0x6f68xf,_0x6f68x11,_0x6f68x12);return RpcUser[_0xf067[51]](_0x6f68x10[_0xf067[12]][_0x6f68x11],_0xf067[50],_0x6f68xf)[_0xf067[48]](function(_0x6f68x15){_0x6f68x10[_0xf067[13]][_0x6f68x11]= {};logger[_0xf067[41]](_0xf067[35],_0x6f68xf,_0x6f68x10[_0xf067[11]][_0x6f68x12][_0xf067[36]],_0x6f68x11,_0x6f68x12);_0x6f68x10[_0xf067[13]][_0x6f68x11][_0xf067[42]]= setTimeout(_0x6f68x10[_0xf067[43]][_0xf067[16]](_0x6f68x10,_0x6f68x11),_0x6f68x10[_0xf067[11]][_0x6f68x12][_0xf067[36]]* 1000);_0x6f68x10[_0xf067[13]][_0x6f68x11][_0xf067[44]]= _0x6f68x15[_0xf067[44]];_0x6f68x10[_0xf067[13]][_0x6f68x11][_0xf067[45]]= function(){var _0x6f68x16=getDiff(_0x6f68x10[_0xf067[13]][_0x6f68x11][_0xf067[44]]);clearTimeout(_0x6f68x10[_0xf067[13]][_0x6f68x11][_0xf067[42]]);RpcVoiceAgentReport[_0xf067[49]]({acwtime:_0x6f68x16},_0x6f68xf)[_0xf067[48]](function(_0x6f68x15){logger[_0xf067[41]](_0xf067[47],_0x6f68xf,_0x6f68x16,_0x6f68x15)})[_0xf067[38]](function(_0x6f68x13){logger[_0xf067[37]](_0xf067[46],_0x6f68xf,_0x6f68x13)});delete _0x6f68x10[_0xf067[13]][_0x6f68x11]}})}else {logger[_0xf067[41]](_0xf067[52],_0x6f68xf,_0x6f68x11,_0x6f68x12)}})}})[_0xf067[38]](function(_0x6f68x13){logger[_0xf067[37]](_0xf067[35],_0x6f68xf,_0x6f68x10[_0xf067[11]][_0x6f68x12][_0xf067[36]],_0x6f68x11,_0x6f68x12)})[_0xf067[34]](function(){delete _0x6f68x10[_0xf067[14]][_0x6f68xf]})};Acw[_0xf067[31]][_0xf067[43]]= function(_0x6f68x11){logger[_0xf067[41]](_0xf067[56],_0x6f68x11);RpcUser[_0xf067[57]](this[_0xf067[12]][_0x6f68x11])};Acw[_0xf067[31]][_0xf067[17]]= function(_0x6f68x17){if(this[_0xf067[11]][_0x6f68x17[_0xf067[33]]]&& this[_0xf067[11]][_0x6f68x17[_0xf067[33]]][_0xf067[5]]){if(this[_0xf067[12]][_0x6f68x17[_0xf067[32]]]){this[_0xf067[14]][_0x6f68x17[_0xf067[58]]]= {queue:_0x6f68x17[_0xf067[33]],interface:_0x6f68x17[_0xf067[32]]}}}};Acw[_0xf067[31]][_0xf067[20]]= function(_0x6f68x17){if(this[_0xf067[14]][_0x6f68x17[_0xf067[58]]]){logger[_0xf067[41]](_0xf067[59],_0x6f68x17[_0xf067[58]]);this[_0xf067[30]](_0x6f68x17[_0xf067[58]])}else {if(this[_0xf067[14]][_0x6f68x17[_0xf067[60]]]){logger[_0xf067[41]](_0xf067[61],_0x6f68x17[_0xf067[60]]);this[_0xf067[30]](_0x6f68x17[_0xf067[60]])}}};Acw[_0xf067[31]][_0xf067[24]]= function(_0x6f68x17){if(this[_0xf067[14]][_0x6f68x17[_0xf067[62]]]){logger[_0xf067[41]](_0xf067[63],_0x6f68x17[_0xf067[62]]);this[_0xf067[30]](_0x6f68x17[_0xf067[62]])}else {if(this[_0xf067[14]][_0x6f68x17[_0xf067[64]]]){logger[_0xf067[41]](_0xf067[65],_0x6f68x17[_0xf067[64]]);this[_0xf067[30]](_0x6f68x17[_0xf067[64]])}}};Acw[_0xf067[31]][_0xf067[26]]= function(_0x6f68x17){if(this[_0xf067[14]][_0x6f68x17[_0xf067[66]]]){logger[_0xf067[41]](_0xf067[67],_0x6f68x17[_0xf067[66]]);this[_0xf067[30]](_0x6f68x17[_0xf067[66]])}else {if(this[_0xf067[14]][_0x6f68x17[_0xf067[68]]]){logger[_0xf067[41]](_0xf067[69],_0x6f68x17[_0xf067[68]]);this[_0xf067[30]](_0x6f68x17[_0xf067[68]])}}};Acw[_0xf067[31]][_0xf067[22]]= function(_0x6f68x17){if(this[_0xf067[11]][_0x6f68x17[_0xf067[33]]]&& this[_0xf067[11]][_0x6f68x17[_0xf067[33]]][_0xf067[70]]=== _0xf067[71]){if(this[_0xf067[12]][_0x6f68x17[_0xf067[32]]]){logger[_0xf067[41]](_0xf067[72],_0x6f68x17[_0xf067[58]],_0x6f68x17[_0xf067[32]],_0x6f68x17[_0xf067[33]]);return RpcUser[_0xf067[51]](this[_0xf067[12]][_0x6f68x17[_0xf067[32]]],_0xf067[73],_0x6f68x17[_0xf067[58]])}}};module[_0xf067[74]]= Acw
\ No newline at end of file
index 16f0d45..af81d71 100644 (file)
@@ -1 +1 @@
-var _0x9bb1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x61\x73\x74\x65\x72\x69\x73\x6B\x2D\x6D\x61\x6E\x61\x67\x65\x72","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x70\x6F\x72\x74","\x61\x73\x74\x65\x72\x69\x73\x6B","\x69\x70","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x6B\x65\x65\x70\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x41\x63\x74\x69\x6F\x6E","\x61\x63\x74\x69\x6F\x6E","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x4D\x61\x6E\x61\x67\x65\x72\x20\x22\x25\x73\x22\x20\x65\x72\x72\x6F\x72\x20\x74\x6F\x20\x25\x73\x3A\x25\x73\x20\x77\x69\x74\x68\x3A\x0A\x25\x73","\x69\x6E\x73\x70\x65\x63\x74","\x66\x6F\x72\x6D\x61\x74","\x65\x72\x72\x6F\x72","\x4D\x61\x6E\x61\x67\x65\x72\x20\x22\x25\x73\x22\x20\x63\x6C\x6F\x73\x65\x64\x20\x74\x6F\x20\x25\x73\x3A\x25\x73","\x61\x63\x74\x69\x6F\x6E\x53\x69\x70\x53\x68\x6F\x77\x52\x65\x67\x69\x73\x74\x72\x79","\x61\x63\x74\x69\x6F\x6E\x3A","\x53\x69\x70\x53\x68\x6F\x77\x52\x65\x67\x69\x73\x74\x72\x79","\x69\x6E\x66\x6F","\x73\x69\x70\x73\x68\x6F\x77\x72\x65\x67\x69\x73\x74\x72\x79","\x61\x63\x74\x69\x6F\x6E\x44\x65\x76\x69\x63\x65\x53\x74\x61\x74\x65\x4C\x69\x73\x74","\x64\x65\x76\x69\x63\x65\x73\x74\x61\x74\x65\x6C\x69\x73\x74","\x61\x63\x74\x69\x6F\x6E\x53\x69\x70\x50\x65\x65\x72\x53\x74\x61\x74\x75\x73","\x53\x69\x70\x50\x65\x65\x72\x53\x74\x61\x74\x75\x73","\x73\x69\x70\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73","\x61\x63\x74\x69\x6F\x6E\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79","\x71\x75\x65\x75\x65\x73\x75\x6D\x6D\x61\x72\x79","\x61\x63\x74\x69\x6F\x6E\x43\x6F\x72\x65\x53\x68\x6F\x77\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x63\x6F\x72\x65\x73\x68\x6F\x77\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x4D\x61\x6E\x61\x67\x65\x72\x20\x22\x25\x73\x22\x20\x6C\x6F\x67\x67\x65\x64\x20\x6F\x6E\x20\x74\x6F\x20\x25\x73\x3A\x25\x73","\x6F\x6E\x63\x65","\x63\x6C\x6F\x73\x65","\x63\x6F\x6E\x6E\x65\x63\x74","\x6F\x6E","\x73\x68\x75\x74\x64\x6F\x77\x6E","\x53\x68\x75\x74\x64\x6F\x77\x6E\x20\x22\x25\x73\x22\x20\x74\x6F\x20\x25\x73\x3A\x25\x73\x20\x77\x69\x74\x68\x3A\x0A\x25\x73","\x66\x75\x6C\x6C\x79\x62\x6F\x6F\x74\x65\x64","\x46\x75\x6C\x6C\x79\x62\x6F\x6F\x74\x65\x64\x20\x22\x25\x73\x22\x20\x74\x6F\x20\x25\x73\x3A\x25\x73","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x72\x65\x73\x6F\x6C\x76\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9bb1[0];var Manager=require(_0x9bb1[1]);var BPromise=require(_0x9bb1[2]);var moment=require(_0x9bb1[3]);var util=require(_0x9bb1[4]);var _=require(_0x9bb1[5]);var logger=require(_0x9bb1[7])(_0x9bb1[6]);var config=require(_0x9bb1[8]);var ami= new Manager(config[_0x9bb1[10]][_0x9bb1[9]],config[_0x9bb1[10]][_0x9bb1[11]],config[_0x9bb1[10]][_0x9bb1[12]],config[_0x9bb1[10]][_0x9bb1[13]],true);ami[_0x9bb1[14]]();ami[_0x9bb1[15]]= BPromise[_0x9bb1[17]](ami[_0x9bb1[16]]);function error(_0x29e8xa){logger[_0x9bb1[21]](util[_0x9bb1[20]](_0x9bb1[18],config[_0x9bb1[10]][_0x9bb1[12]],config[_0x9bb1[10]][_0x9bb1[11]],config[_0x9bb1[10]][_0x9bb1[9]],util[_0x9bb1[19]](_0x29e8xa,false,null)))}function close(){logger[_0x9bb1[21]](util[_0x9bb1[20]](_0x9bb1[22],config[_0x9bb1[10]][_0x9bb1[12]],config[_0x9bb1[10]][_0x9bb1[11]],config[_0x9bb1[10]][_0x9bb1[9]]))}ami[_0x9bb1[23]]= function(){logger[_0x9bb1[26]](_0x9bb1[24],_0x9bb1[25]);return function(){return ami.Action({action:_0x9bb1[27]})}};ami[_0x9bb1[28]]= function(){logger[_0x9bb1[26]](_0x9bb1[24],_0x9bb1[25]);return function(){return ami.Action({action:_0x9bb1[29]})}};ami[_0x9bb1[30]]= function(){logger[_0x9bb1[26]](_0x9bb1[24],_0x9bb1[31]);return function(){return ami.Action({action:_0x9bb1[32]})}};ami[_0x9bb1[33]]= function(){return function(){return ami.Action({action:_0x9bb1[34]})}};ami[_0x9bb1[35]]= function(){return function(){return ami.Action({action:_0x9bb1[36]})}};function connect(_0x29e8xa){logger[_0x9bb1[26]](util[_0x9bb1[20]](_0x9bb1[37],config[_0x9bb1[10]][_0x9bb1[12]],config[_0x9bb1[10]][_0x9bb1[11]],config[_0x9bb1[10]][_0x9bb1[9]]));ami[_0x9bb1[38]](_0x9bb1[21],error);ami[_0x9bb1[38]](_0x9bb1[39],close)}ami[_0x9bb1[41]](_0x9bb1[40],connect);ami[_0x9bb1[41]](_0x9bb1[42],function(_0x29e8xd){logger[_0x9bb1[26]](util[_0x9bb1[20]](_0x9bb1[43],config[_0x9bb1[10]][_0x9bb1[12]],config[_0x9bb1[10]][_0x9bb1[11]],config[_0x9bb1[10]][_0x9bb1[9]],util[_0x9bb1[19]](_0x29e8xd,false,null)))});ami[_0x9bb1[41]](_0x9bb1[44],function(_0x29e8xd){logger[_0x9bb1[26]](util[_0x9bb1[20]](_0x9bb1[45],config[_0x9bb1[10]][_0x9bb1[12]],config[_0x9bb1[10]][_0x9bb1[11]],config[_0x9bb1[10]][_0x9bb1[9]]));return BPromise[_0x9bb1[49]]()[_0x9bb1[48]](ami[_0x9bb1[23]]())[_0x9bb1[48]](ami[_0x9bb1[28]]())[_0x9bb1[48]](ami[_0x9bb1[30]]())[_0x9bb1[48]](ami[_0x9bb1[33]]())[_0x9bb1[48]](ami[_0x9bb1[35]]())[_0x9bb1[47]](function(_0x29e8xa){console[_0x9bb1[46]](_0x29e8xa)})});ami[_0x9bb1[38]](_0x9bb1[21],error);ami[_0x9bb1[38]](_0x9bb1[39],close);module[_0x9bb1[50]]= ami
\ No newline at end of file
+var _0x6b42=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x61\x73\x74\x65\x72\x69\x73\x6B\x2D\x6D\x61\x6E\x61\x67\x65\x72","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x70\x6F\x72\x74","\x61\x73\x74\x65\x72\x69\x73\x6B","\x69\x70","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x6B\x65\x65\x70\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x41\x63\x74\x69\x6F\x6E","\x61\x63\x74\x69\x6F\x6E","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x4D\x61\x6E\x61\x67\x65\x72\x20\x22\x25\x73\x22\x20\x65\x72\x72\x6F\x72\x20\x74\x6F\x20\x25\x73\x3A\x25\x73\x20\x77\x69\x74\x68\x3A\x0A\x25\x73","\x69\x6E\x73\x70\x65\x63\x74","\x66\x6F\x72\x6D\x61\x74","\x65\x72\x72\x6F\x72","\x4D\x61\x6E\x61\x67\x65\x72\x20\x22\x25\x73\x22\x20\x63\x6C\x6F\x73\x65\x64\x20\x74\x6F\x20\x25\x73\x3A\x25\x73","\x61\x63\x74\x69\x6F\x6E\x53\x69\x70\x53\x68\x6F\x77\x52\x65\x67\x69\x73\x74\x72\x79","\x61\x63\x74\x69\x6F\x6E\x3A","\x53\x69\x70\x53\x68\x6F\x77\x52\x65\x67\x69\x73\x74\x72\x79","\x69\x6E\x66\x6F","\x73\x69\x70\x73\x68\x6F\x77\x72\x65\x67\x69\x73\x74\x72\x79","\x61\x63\x74\x69\x6F\x6E\x44\x65\x76\x69\x63\x65\x53\x74\x61\x74\x65\x4C\x69\x73\x74","\x64\x65\x76\x69\x63\x65\x73\x74\x61\x74\x65\x6C\x69\x73\x74","\x61\x63\x74\x69\x6F\x6E\x53\x69\x70\x50\x65\x65\x72\x53\x74\x61\x74\x75\x73","\x53\x69\x70\x50\x65\x65\x72\x53\x74\x61\x74\x75\x73","\x73\x69\x70\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73","\x61\x63\x74\x69\x6F\x6E\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79","\x71\x75\x65\x75\x65\x73\x75\x6D\x6D\x61\x72\x79","\x61\x63\x74\x69\x6F\x6E\x43\x6F\x72\x65\x53\x68\x6F\x77\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x63\x6F\x72\x65\x73\x68\x6F\x77\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x4D\x61\x6E\x61\x67\x65\x72\x20\x22\x25\x73\x22\x20\x6C\x6F\x67\x67\x65\x64\x20\x6F\x6E\x20\x74\x6F\x20\x25\x73\x3A\x25\x73","\x6F\x6E\x63\x65","\x63\x6C\x6F\x73\x65","\x63\x6F\x6E\x6E\x65\x63\x74","\x6F\x6E","\x73\x68\x75\x74\x64\x6F\x77\x6E","\x53\x68\x75\x74\x64\x6F\x77\x6E\x20\x22\x25\x73\x22\x20\x74\x6F\x20\x25\x73\x3A\x25\x73\x20\x77\x69\x74\x68\x3A\x0A\x25\x73","\x66\x75\x6C\x6C\x79\x62\x6F\x6F\x74\x65\x64","\x46\x75\x6C\x6C\x79\x62\x6F\x6F\x74\x65\x64\x20\x22\x25\x73\x22\x20\x74\x6F\x20\x25\x73\x3A\x25\x73","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x72\x65\x73\x6F\x6C\x76\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6b42[0];var Manager=require(_0x6b42[1]);var BPromise=require(_0x6b42[2]);var moment=require(_0x6b42[3]);var util=require(_0x6b42[4]);var _=require(_0x6b42[5]);var logger=require(_0x6b42[7])(_0x6b42[6]);var config=require(_0x6b42[8]);var ami= new Manager(config[_0x6b42[10]][_0x6b42[9]],config[_0x6b42[10]][_0x6b42[11]],config[_0x6b42[10]][_0x6b42[12]],config[_0x6b42[10]][_0x6b42[13]],true);ami[_0x6b42[14]]();ami[_0x6b42[15]]= BPromise[_0x6b42[17]](ami[_0x6b42[16]]);function error(_0xc169xa){logger[_0x6b42[21]](util[_0x6b42[20]](_0x6b42[18],config[_0x6b42[10]][_0x6b42[12]],config[_0x6b42[10]][_0x6b42[11]],config[_0x6b42[10]][_0x6b42[9]],util[_0x6b42[19]](_0xc169xa,false,null)))}function close(){logger[_0x6b42[21]](util[_0x6b42[20]](_0x6b42[22],config[_0x6b42[10]][_0x6b42[12]],config[_0x6b42[10]][_0x6b42[11]],config[_0x6b42[10]][_0x6b42[9]]))}ami[_0x6b42[23]]= function(){logger[_0x6b42[26]](_0x6b42[24],_0x6b42[25]);return function(){return ami.Action({action:_0x6b42[27]})}};ami[_0x6b42[28]]= function(){logger[_0x6b42[26]](_0x6b42[24],_0x6b42[25]);return function(){return ami.Action({action:_0x6b42[29]})}};ami[_0x6b42[30]]= function(){logger[_0x6b42[26]](_0x6b42[24],_0x6b42[31]);return function(){return ami.Action({action:_0x6b42[32]})}};ami[_0x6b42[33]]= function(){return function(){return ami.Action({action:_0x6b42[34]})}};ami[_0x6b42[35]]= function(){return function(){return ami.Action({action:_0x6b42[36]})}};function connect(_0xc169xa){logger[_0x6b42[26]](util[_0x6b42[20]](_0x6b42[37],config[_0x6b42[10]][_0x6b42[12]],config[_0x6b42[10]][_0x6b42[11]],config[_0x6b42[10]][_0x6b42[9]]));ami[_0x6b42[38]](_0x6b42[21],error);ami[_0x6b42[38]](_0x6b42[39],close)}ami[_0x6b42[41]](_0x6b42[40],connect);ami[_0x6b42[41]](_0x6b42[42],function(_0xc169xd){logger[_0x6b42[26]](util[_0x6b42[20]](_0x6b42[43],config[_0x6b42[10]][_0x6b42[12]],config[_0x6b42[10]][_0x6b42[11]],config[_0x6b42[10]][_0x6b42[9]],util[_0x6b42[19]](_0xc169xd,false,null)))});ami[_0x6b42[41]](_0x6b42[44],function(_0xc169xd){logger[_0x6b42[26]](util[_0x6b42[20]](_0x6b42[45],config[_0x6b42[10]][_0x6b42[12]],config[_0x6b42[10]][_0x6b42[11]],config[_0x6b42[10]][_0x6b42[9]]));return BPromise[_0x6b42[49]]()[_0x6b42[48]](ami[_0x6b42[23]]())[_0x6b42[48]](ami[_0x6b42[28]]())[_0x6b42[48]](ami[_0x6b42[30]]())[_0x6b42[48]](ami[_0x6b42[33]]())[_0x6b42[48]](ami[_0x6b42[35]]())[_0x6b42[47]](function(_0xc169xa){console[_0x6b42[46]](_0xc169xa)})});ami[_0x6b42[38]](_0x6b42[21],error);ami[_0x6b42[38]](_0x6b42[39],close);module[_0x6b42[50]]= ami
\ No newline at end of file
index 6d7508d..3bcb08a 100644 (file)
@@ -1 +1 @@
-var _0x2ac9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x52\x65\x71\x75\x65\x73\x74","\x72\x70\x63","\x6D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x64\x65\x62\x75\x67","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x2ac9[0];var jayson=require(_0x2ac9[1]);var BPromise=require(_0x2ac9[2]);var logger=require(_0x2ac9[4])(_0x2ac9[3]);var client=jayson[_0x2ac9[6]][_0x2ac9[5]]({port:9001});client[_0x2ac9[7]]= function(_0xf99cx5,_0xf99cx6){return  new BPromise(function(_0xf99cx7,_0xf99cx8){return client[_0x2ac9[16]](_0xf99cx5,_0xf99cx6)[_0x2ac9[15]](function(_0xf99cxa){logger[_0x2ac9[12]](_0x2ac9[8],_0x2ac9[9],_0xf99cx5,_0xf99cx6,_0xf99cxa);if(_0xf99cxa[_0x2ac9[10]]){logger[_0x2ac9[10]](_0x2ac9[8],_0x2ac9[9],_0xf99cx5,_0xf99cxa[_0x2ac9[10]][_0x2ac9[13]],_0xf99cx6);return _0xf99cx8(_0xf99cxa[_0x2ac9[10]][_0x2ac9[13]])}else {return _0xf99cx7(_0xf99cxa[_0x2ac9[14]])}})[_0x2ac9[11]](function(_0xf99cx9){logger[_0x2ac9[10]](_0x2ac9[8],_0x2ac9[9],_0xf99cx5,_0xf99cx9,_0xf99cx6);return _0xf99cx8(_0xf99cx9)})})};module[_0x2ac9[17]]= client
\ No newline at end of file
+var _0xd89a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x52\x65\x71\x75\x65\x73\x74","\x72\x70\x63","\x6D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x64\x65\x62\x75\x67","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xd89a[0];var jayson=require(_0xd89a[1]);var BPromise=require(_0xd89a[2]);var logger=require(_0xd89a[4])(_0xd89a[3]);var client=jayson[_0xd89a[6]][_0xd89a[5]]({port:9001});client[_0xd89a[7]]= function(_0xb93ax5,_0xb93ax6){return  new BPromise(function(_0xb93ax7,_0xb93ax8){return client[_0xd89a[16]](_0xb93ax5,_0xb93ax6)[_0xd89a[15]](function(_0xb93axa){logger[_0xd89a[12]](_0xd89a[8],_0xd89a[9],_0xb93ax5,_0xb93ax6,_0xb93axa);if(_0xb93axa[_0xd89a[10]]){logger[_0xd89a[10]](_0xd89a[8],_0xd89a[9],_0xb93ax5,_0xb93axa[_0xd89a[10]][_0xd89a[13]],_0xb93ax6);return _0xb93ax8(_0xb93axa[_0xd89a[10]][_0xd89a[13]])}else {return _0xb93ax7(_0xb93axa[_0xd89a[14]])}})[_0xd89a[11]](function(_0xb93ax9){logger[_0xd89a[10]](_0xd89a[8],_0xd89a[9],_0xb93ax5,_0xb93ax9,_0xb93ax6);return _0xb93ax8(_0xb93ax9)})})};module[_0xd89a[17]]= client
\ No newline at end of file
index 6aa7b65..4dbdc43 100644 (file)
@@ -1 +1 @@
-var _0x8d37=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","","\x69\x73\x4E\x69\x6C","\x73\x74\x72\x69\x6E\x67","\x20","\x75\x6E\x69\x71\x75\x65\x69\x64","\x6E\x61\x6D\x65","\x70\x68\x6F\x6E\x65","\x43\x6F\x6E\x74\x61\x63\x74","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","\x6C\x61\x73\x74\x4E\x61\x6D\x65","\x6E\x75\x6D\x62\x65\x72","\x71\x75\x65\x75\x65","\x61\x63\x74\x69\x76\x65","\x74\x79\x70\x65","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x54\x69\x6D\x65\x6F\x75\x74","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x63\x6F\x75\x6E\x74\x62\x75\x73\x79\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x6E\x6F\x61\x6E\x73\x77\x65\x72\x72\x65\x74\x72\x79","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x55\x73\x65\x72\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x69\x64\x48\x6F\x70\x70\x65\x72","\x69\x64","\x43\x6F\x6E\x74\x61\x63\x74\x46\x69\x72\x73\x74\x4E\x61\x6D\x65","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x61\x74","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x67\x65\x74\x43\x61\x6C\x6C\x65\x72","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x67\x65\x74\x51\x75\x65\x75\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x8d37[0];var util=require(_0x8d37[1]);var _=require(_0x8d37[2]);var moment=require(_0x8d37[3]);function checkNameSurname(_0xacd8x5,_0xacd8x6,_0xacd8x7){var _0xacd8x8=_0x8d37[4];if(!_[_0x8d37[5]](_0xacd8x6)&& _0x8d37[6]===  typeof _0xacd8x6){_0xacd8x8+= _0xacd8x6};if(!_[_0x8d37[5]](_0xacd8x7)&& _0x8d37[6]===  typeof _0xacd8x7){_0xacd8x8+= _0x8d37[7]+ _0xacd8x7};if(_0xacd8x8!== _0x8d37[4]){return _0xacd8x8};return _0xacd8x5}function Action(_0xacd8xa,_0xacd8xb,_0xacd8xc){this[_0x8d37[8]]= _0xacd8xc|| undefined;this[_0x8d37[9]]= checkNameSurname(_0xacd8xb[_0x8d37[11]][_0x8d37[10]],_0xacd8xb[_0x8d37[11]][_0x8d37[12]],_0xacd8xb[_0x8d37[11]][_0x8d37[13]]);this[_0x8d37[14]]= _0xacd8xb[_0x8d37[11]][_0x8d37[10]];this[_0x8d37[15]]= _0xacd8xa[_0x8d37[9]];this[_0x8d37[16]]= _0xacd8xb[_0x8d37[16]]|| false;this[_0x8d37[17]]= _0xacd8xa[_0x8d37[17]];this[_0x8d37[18]]= _0xacd8xa[_0x8d37[18]]|| 3;this[_0x8d37[19]]= _0xacd8xb[_0x8d37[19]];this[_0x8d37[20]]= _0xacd8xb[_0x8d37[20]];this[_0x8d37[21]]= _0xacd8xb[_0x8d37[21]];this[_0x8d37[22]]= _0xacd8xb[_0x8d37[22]];this[_0x8d37[23]]= _0xacd8xb[_0x8d37[23]];this[_0x8d37[24]]= _0xacd8xb[_0x8d37[24]];this[_0x8d37[25]]= _0xacd8xb[_0x8d37[25]];this[_0x8d37[26]]= _0xacd8xb[_0x8d37[26]];this[_0x8d37[27]]= _0xacd8xb[_0x8d37[27]];this[_0x8d37[28]]= _0xacd8xb[_0x8d37[29]];this[_0x8d37[30]]= _0xacd8xb[_0x8d37[11]][_0x8d37[12]]|| _0x8d37[4];this[_0x8d37[31]]= moment()[_0x8d37[33]](_0x8d37[32]);this[_0x8d37[34]]= _0xacd8xb[_0x8d37[34]];this[_0x8d37[35]]= _0xacd8xb[_0x8d37[35]];this[_0x8d37[36]]= _0xacd8xb[_0x8d37[36]];this[_0x8d37[37]]= _0xacd8xb[_0x8d37[37]]}Action[_0x8d37[39]][_0x8d37[38]]= function(){return util[_0x8d37[33]](_0x8d37[40],this[_0x8d37[9]],this[_0x8d37[14]])};Action[_0x8d37[39]][_0x8d37[41]]= function(){return this[_0x8d37[15]]};module[_0x8d37[42]]= Action
\ No newline at end of file
+var _0xaf82=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","","\x69\x73\x4E\x69\x6C","\x73\x74\x72\x69\x6E\x67","\x20","\x75\x6E\x69\x71\x75\x65\x69\x64","\x6E\x61\x6D\x65","\x70\x68\x6F\x6E\x65","\x43\x6F\x6E\x74\x61\x63\x74","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","\x6C\x61\x73\x74\x4E\x61\x6D\x65","\x6E\x75\x6D\x62\x65\x72","\x71\x75\x65\x75\x65","\x61\x63\x74\x69\x76\x65","\x74\x79\x70\x65","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x54\x69\x6D\x65\x6F\x75\x74","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x63\x6F\x75\x6E\x74\x62\x75\x73\x79\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x6E\x6F\x61\x6E\x73\x77\x65\x72\x72\x65\x74\x72\x79","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x55\x73\x65\x72\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x69\x64\x48\x6F\x70\x70\x65\x72","\x69\x64","\x43\x6F\x6E\x74\x61\x63\x74\x46\x69\x72\x73\x74\x4E\x61\x6D\x65","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x61\x74","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x67\x65\x74\x43\x61\x6C\x6C\x65\x72","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x67\x65\x74\x51\x75\x65\x75\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xaf82[0];var util=require(_0xaf82[1]);var _=require(_0xaf82[2]);var moment=require(_0xaf82[3]);function checkNameSurname(_0xdb47x5,_0xdb47x6,_0xdb47x7){var _0xdb47x8=_0xaf82[4];if(!_[_0xaf82[5]](_0xdb47x6)&& _0xaf82[6]===  typeof _0xdb47x6){_0xdb47x8+= _0xdb47x6};if(!_[_0xaf82[5]](_0xdb47x7)&& _0xaf82[6]===  typeof _0xdb47x7){_0xdb47x8+= _0xaf82[7]+ _0xdb47x7};if(_0xdb47x8!== _0xaf82[4]){return _0xdb47x8};return _0xdb47x5}function Action(_0xdb47xa,_0xdb47xb,_0xdb47xc){this[_0xaf82[8]]= _0xdb47xc|| undefined;this[_0xaf82[9]]= checkNameSurname(_0xdb47xb[_0xaf82[11]][_0xaf82[10]],_0xdb47xb[_0xaf82[11]][_0xaf82[12]],_0xdb47xb[_0xaf82[11]][_0xaf82[13]]);this[_0xaf82[14]]= _0xdb47xb[_0xaf82[11]][_0xaf82[10]];this[_0xaf82[15]]= _0xdb47xa[_0xaf82[9]];this[_0xaf82[16]]= _0xdb47xb[_0xaf82[16]]|| false;this[_0xaf82[17]]= _0xdb47xa[_0xaf82[17]];this[_0xaf82[18]]= _0xdb47xa[_0xaf82[18]]|| 3;this[_0xaf82[19]]= _0xdb47xb[_0xaf82[19]];this[_0xaf82[20]]= _0xdb47xb[_0xaf82[20]];this[_0xaf82[21]]= _0xdb47xb[_0xaf82[21]];this[_0xaf82[22]]= _0xdb47xb[_0xaf82[22]];this[_0xaf82[23]]= _0xdb47xb[_0xaf82[23]];this[_0xaf82[24]]= _0xdb47xb[_0xaf82[24]];this[_0xaf82[25]]= _0xdb47xb[_0xaf82[25]];this[_0xaf82[26]]= _0xdb47xb[_0xaf82[26]];this[_0xaf82[27]]= _0xdb47xb[_0xaf82[27]];this[_0xaf82[28]]= _0xdb47xb[_0xaf82[29]];this[_0xaf82[30]]= _0xdb47xb[_0xaf82[11]][_0xaf82[12]]|| _0xaf82[4];this[_0xaf82[31]]= moment()[_0xaf82[33]](_0xaf82[32]);this[_0xaf82[34]]= _0xdb47xb[_0xaf82[34]];this[_0xaf82[35]]= _0xdb47xb[_0xaf82[35]];this[_0xaf82[36]]= _0xdb47xb[_0xaf82[36]];this[_0xaf82[37]]= _0xdb47xb[_0xaf82[37]]}Action[_0xaf82[39]][_0xaf82[38]]= function(){return util[_0xaf82[33]](_0xaf82[40],this[_0xaf82[9]],this[_0xaf82[14]])};Action[_0xaf82[39]][_0xaf82[41]]= function(){return this[_0xaf82[15]]};module[_0xaf82[42]]= Action
\ No newline at end of file
index fb41070..c81af60 100644 (file)
@@ -1 +1 @@
-var _0x9cca=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x73\x74\x61\x74\x65","\x73\x74\x61\x74\x65\x64\x65\x73\x63","\x41\x6E\x73\x77\x65\x72","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x74\x79\x70\x65","\x63\x61\x6D\x70\x61\x69\x67\x6E\x74\x79\x70\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x71\x75\x65\x75\x65","\x63\x6F\x75\x6E\x74\x62\x75\x73\x79\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x6E\x6F\x61\x6E\x73\x77\x65\x72\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x67\x6C\x6F\x62\x61\x6C","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6E\x75\x6D\x62\x65\x72","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65\x74\x69\x6D\x65","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x72\x69\x6E\x67\x74\x69\x6D\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x72\x65\x61\x73\x6F\x6E","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x61\x74","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x55\x73\x65\x72\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x9cca[0];var util=require(_0x9cca[1]);var _=require(_0x9cca[2]);var moment=require(_0x9cca[3]);function getSeconds(_0x6b06x5,_0x6b06x6){var _0x6b06x7=moment(_0x6b06x5)[_0x9cca[4]](0);var _0x6b06x8=moment(_0x6b06x6)[_0x9cca[4]](0);return _0x6b06x7[_0x9cca[6]](_0x6b06x8,_0x9cca[5])}function AgentComplete(_0x6b06xa,_0x6b06xb){this[_0x9cca[7]]= 4;this[_0x9cca[8]]= _0x9cca[9];this[_0x9cca[10]]= _0x6b06xa[_0x9cca[10]];this[_0x9cca[11]]= _0x6b06xa[_0x9cca[11]];this[_0x9cca[12]]= (_0x6b06xa[_0x9cca[11]]=== _0x9cca[13])?_0x9cca[14]:_0x6b06xa[_0x9cca[11]];this[_0x9cca[15]]= _0x6b06xa[_0x9cca[15]];this[_0x9cca[16]]= _0x6b06xa[_0x9cca[16]];this[_0x9cca[17]]= _0x6b06xa[_0x9cca[17]];this[_0x9cca[18]]= _0x6b06xa[_0x9cca[15]]+ _0x6b06xa[_0x9cca[16]]+ _0x6b06xa[_0x9cca[17]];this[_0x9cca[19]]= _0x6b06xb[_0x9cca[19]];this[_0x9cca[20]]= _0x6b06xa[_0x9cca[21]];this[_0x9cca[22]]= _0x6b06xa[_0x9cca[23]];this[_0x9cca[24]]= _0x6b06xa[_0x9cca[24]];this[_0x9cca[25]]= _0x6b06xa[_0x9cca[25]];this[_0x9cca[26]]= _0x6b06xa[_0x9cca[26]];this[_0x9cca[27]]= moment()[_0x9cca[29]](_0x9cca[28]);this[_0x9cca[30]]= getSeconds(_0x6b06xa[_0x9cca[25]],_0x6b06xa[_0x9cca[24]]);this[_0x9cca[31]]= getSeconds(_0x6b06xa[_0x9cca[26]],_0x6b06xa[_0x9cca[25]]);this[_0x9cca[32]]= getSeconds(this[_0x9cca[27]],_0x6b06xa[_0x9cca[26]]);this[_0x9cca[14]]= _0x6b06xb[_0x9cca[14]];this[_0x9cca[33]]= _0x6b06xb[_0x9cca[33]];this[_0x9cca[34]]= _0x6b06xb[_0x9cca[34]];this[_0x9cca[35]]= _0x6b06xa[_0x9cca[35]];this[_0x9cca[36]]= _0x6b06xa[_0x9cca[36]];this[_0x9cca[37]]= _0x6b06xa[_0x9cca[37]];this[_0x9cca[38]]= _0x6b06xa[_0x9cca[38]];this[_0x9cca[39]]= _0x6b06xa[_0x9cca[39]];this[_0x9cca[40]]= _0x6b06xa[_0x9cca[40]];this[_0x9cca[41]]= _0x6b06xa[_0x9cca[41]];this[_0x9cca[42]]= _0x6b06xa[_0x9cca[42]];this[_0x9cca[43]]= _0x6b06xa[_0x9cca[43]]}module[_0x9cca[44]]= AgentComplete
\ No newline at end of file
+var _0xfae2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x73\x74\x61\x74\x65","\x73\x74\x61\x74\x65\x64\x65\x73\x63","\x41\x6E\x73\x77\x65\x72","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x74\x79\x70\x65","\x63\x61\x6D\x70\x61\x69\x67\x6E\x74\x79\x70\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x71\x75\x65\x75\x65","\x63\x6F\x75\x6E\x74\x62\x75\x73\x79\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x6E\x6F\x61\x6E\x73\x77\x65\x72\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x67\x6C\x6F\x62\x61\x6C","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6E\x75\x6D\x62\x65\x72","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65\x74\x69\x6D\x65","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x72\x69\x6E\x67\x74\x69\x6D\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x72\x65\x61\x73\x6F\x6E","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x61\x74","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x55\x73\x65\x72\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0xfae2[0];var util=require(_0xfae2[1]);var _=require(_0xfae2[2]);var moment=require(_0xfae2[3]);function getSeconds(_0x33e5x5,_0x33e5x6){var _0x33e5x7=moment(_0x33e5x5)[_0xfae2[4]](0);var _0x33e5x8=moment(_0x33e5x6)[_0xfae2[4]](0);return _0x33e5x7[_0xfae2[6]](_0x33e5x8,_0xfae2[5])}function AgentComplete(_0x33e5xa,_0x33e5xb){this[_0xfae2[7]]= 4;this[_0xfae2[8]]= _0xfae2[9];this[_0xfae2[10]]= _0x33e5xa[_0xfae2[10]];this[_0xfae2[11]]= _0x33e5xa[_0xfae2[11]];this[_0xfae2[12]]= (_0x33e5xa[_0xfae2[11]]=== _0xfae2[13])?_0xfae2[14]:_0x33e5xa[_0xfae2[11]];this[_0xfae2[15]]= _0x33e5xa[_0xfae2[15]];this[_0xfae2[16]]= _0x33e5xa[_0xfae2[16]];this[_0xfae2[17]]= _0x33e5xa[_0xfae2[17]];this[_0xfae2[18]]= _0x33e5xa[_0xfae2[15]]+ _0x33e5xa[_0xfae2[16]]+ _0x33e5xa[_0xfae2[17]];this[_0xfae2[19]]= _0x33e5xb[_0xfae2[19]];this[_0xfae2[20]]= _0x33e5xa[_0xfae2[21]];this[_0xfae2[22]]= _0x33e5xa[_0xfae2[23]];this[_0xfae2[24]]= _0x33e5xa[_0xfae2[24]];this[_0xfae2[25]]= _0x33e5xa[_0xfae2[25]];this[_0xfae2[26]]= _0x33e5xa[_0xfae2[26]];this[_0xfae2[27]]= moment()[_0xfae2[29]](_0xfae2[28]);this[_0xfae2[30]]= getSeconds(_0x33e5xa[_0xfae2[25]],_0x33e5xa[_0xfae2[24]]);this[_0xfae2[31]]= getSeconds(_0x33e5xa[_0xfae2[26]],_0x33e5xa[_0xfae2[25]]);this[_0xfae2[32]]= getSeconds(this[_0xfae2[27]],_0x33e5xa[_0xfae2[26]]);this[_0xfae2[14]]= _0x33e5xb[_0xfae2[14]];this[_0xfae2[33]]= _0x33e5xb[_0xfae2[33]];this[_0xfae2[34]]= _0x33e5xb[_0xfae2[34]];this[_0xfae2[35]]= _0x33e5xa[_0xfae2[35]];this[_0xfae2[36]]= _0x33e5xa[_0xfae2[36]];this[_0xfae2[37]]= _0x33e5xa[_0xfae2[37]];this[_0xfae2[38]]= _0x33e5xa[_0xfae2[38]];this[_0xfae2[39]]= _0x33e5xa[_0xfae2[39]];this[_0xfae2[40]]= _0x33e5xa[_0xfae2[40]];this[_0xfae2[41]]= _0x33e5xa[_0xfae2[41]];this[_0xfae2[42]]= _0x33e5xa[_0xfae2[42]];this[_0xfae2[43]]= _0x33e5xa[_0xfae2[43]]}module[_0xfae2[44]]= AgentComplete
\ No newline at end of file
index 636fe5e..6e529e9 100644 (file)
@@ -1 +1 @@
-var _0x24ce=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x75\x6E\x69\x71\x75\x65\x69\x64","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x74\x79\x70\x65","\x63\x61\x6D\x70\x61\x69\x67\x6E\x74\x79\x70\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x71\x75\x65\x75\x65","\x63\x6F\x75\x6E\x74\x62\x75\x73\x79\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x6E\x6F\x61\x6E\x73\x77\x65\x72\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x67\x6C\x6F\x62\x61\x6C","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x72\x69\x6E\x67\x74\x69\x6D\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x61\x74","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x55\x73\x65\x72\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x24ce[0];var util=require(_0x24ce[1]);var _=require(_0x24ce[2]);var moment=require(_0x24ce[3]);function getSeconds(_0xb321x5,_0xb321x6){var _0xb321x7=moment(_0xb321x5)[_0x24ce[4]](0);var _0xb321x8=moment(_0xb321x6)[_0x24ce[4]](0);return _0xb321x7[_0x24ce[6]](_0xb321x8,_0x24ce[5])}function Final(_0xb321xa){this[_0x24ce[7]]= _0xb321xa[_0x24ce[7]];this[_0x24ce[8]]= _0xb321xa[_0x24ce[8]];this[_0x24ce[9]]= _0xb321xa[_0x24ce[9]];this[_0x24ce[10]]= (_0xb321xa[_0x24ce[9]]=== _0x24ce[11])?_0x24ce[12]:_0xb321xa[_0x24ce[9]];this[_0x24ce[13]]= _0xb321xa[_0x24ce[13]];this[_0x24ce[14]]= _0xb321xa[_0x24ce[14]];this[_0x24ce[15]]= _0xb321xa[_0x24ce[15]];this[_0x24ce[16]]= _0xb321xa[_0x24ce[13]]+ _0xb321xa[_0x24ce[14]]+ _0xb321xa[_0x24ce[15]];this[_0x24ce[12]]= _0xb321xa[_0x24ce[12]];this[_0x24ce[17]]= _0xb321xa[_0x24ce[17]];this[_0x24ce[18]]= _0xb321xa[_0x24ce[18]];this[_0x24ce[19]]= _0xb321xa[_0x24ce[19]];this[_0x24ce[20]]= _0xb321xa[_0x24ce[20]];this[_0x24ce[21]]= _0xb321xa[_0x24ce[20]];this[_0x24ce[22]]= _0xb321xa[_0x24ce[22]]|| 0;this[_0x24ce[23]]= _0xb321xa[_0x24ce[23]]|| 0;this[_0x24ce[24]]= _0xb321xa[_0x24ce[24]]|| 0;this[_0x24ce[25]]= _0xb321xa[_0x24ce[25]];this[_0x24ce[26]]= _0xb321xa[_0x24ce[26]];this[_0x24ce[27]]= _0xb321xa[_0x24ce[27]];this[_0x24ce[28]]= _0xb321xa[_0x24ce[28]];this[_0x24ce[29]]= _0xb321xa[_0x24ce[29]];this[_0x24ce[30]]= _0xb321xa[_0x24ce[30]];this[_0x24ce[31]]= _0xb321xa[_0x24ce[31]];this[_0x24ce[32]]= _0xb321xa[_0x24ce[32]];this[_0x24ce[33]]= _0xb321xa[_0x24ce[33]]}module[_0x24ce[34]]= Final
\ No newline at end of file
+var _0x8b81=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x75\x6E\x69\x71\x75\x65\x69\x64","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x74\x79\x70\x65","\x63\x61\x6D\x70\x61\x69\x67\x6E\x74\x79\x70\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x71\x75\x65\x75\x65","\x63\x6F\x75\x6E\x74\x62\x75\x73\x79\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x6E\x6F\x61\x6E\x73\x77\x65\x72\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x67\x6C\x6F\x62\x61\x6C","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x72\x69\x6E\x67\x74\x69\x6D\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x61\x74","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x55\x73\x65\x72\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x8b81[0];var util=require(_0x8b81[1]);var _=require(_0x8b81[2]);var moment=require(_0x8b81[3]);function getSeconds(_0x2a4ax5,_0x2a4ax6){var _0x2a4ax7=moment(_0x2a4ax5)[_0x8b81[4]](0);var _0x2a4ax8=moment(_0x2a4ax6)[_0x8b81[4]](0);return _0x2a4ax7[_0x8b81[6]](_0x2a4ax8,_0x8b81[5])}function Final(_0x2a4axa){this[_0x8b81[7]]= _0x2a4axa[_0x8b81[7]];this[_0x8b81[8]]= _0x2a4axa[_0x8b81[8]];this[_0x8b81[9]]= _0x2a4axa[_0x8b81[9]];this[_0x8b81[10]]= (_0x2a4axa[_0x8b81[9]]=== _0x8b81[11])?_0x8b81[12]:_0x2a4axa[_0x8b81[9]];this[_0x8b81[13]]= _0x2a4axa[_0x8b81[13]];this[_0x8b81[14]]= _0x2a4axa[_0x8b81[14]];this[_0x8b81[15]]= _0x2a4axa[_0x8b81[15]];this[_0x8b81[16]]= _0x2a4axa[_0x8b81[13]]+ _0x2a4axa[_0x8b81[14]]+ _0x2a4axa[_0x8b81[15]];this[_0x8b81[12]]= _0x2a4axa[_0x8b81[12]];this[_0x8b81[17]]= _0x2a4axa[_0x8b81[17]];this[_0x8b81[18]]= _0x2a4axa[_0x8b81[18]];this[_0x8b81[19]]= _0x2a4axa[_0x8b81[19]];this[_0x8b81[20]]= _0x2a4axa[_0x8b81[20]];this[_0x8b81[21]]= _0x2a4axa[_0x8b81[20]];this[_0x8b81[22]]= _0x2a4axa[_0x8b81[22]]|| 0;this[_0x8b81[23]]= _0x2a4axa[_0x8b81[23]]|| 0;this[_0x8b81[24]]= _0x2a4axa[_0x8b81[24]]|| 0;this[_0x8b81[25]]= _0x2a4axa[_0x8b81[25]];this[_0x8b81[26]]= _0x2a4axa[_0x8b81[26]];this[_0x8b81[27]]= _0x2a4axa[_0x8b81[27]];this[_0x8b81[28]]= _0x2a4axa[_0x8b81[28]];this[_0x8b81[29]]= _0x2a4axa[_0x8b81[29]];this[_0x8b81[30]]= _0x2a4axa[_0x8b81[30]];this[_0x8b81[31]]= _0x2a4axa[_0x8b81[31]];this[_0x8b81[32]]= _0x2a4axa[_0x8b81[32]];this[_0x8b81[33]]= _0x2a4axa[_0x8b81[33]]}module[_0x8b81[34]]= Final
\ No newline at end of file
index 2d6e631..f2111b2 100644 (file)
@@ -1 +1 @@
-var _0xf8d0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x73\x74\x61\x74\x65","\x73\x74\x61\x74\x65\x64\x65\x73\x63","\x41\x6E\x73\x77\x65\x72","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x74\x79\x70\x65","\x63\x61\x6D\x70\x61\x69\x67\x6E\x74\x79\x70\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x71\x75\x65\x75\x65","\x63\x6F\x75\x6E\x74\x62\x75\x73\x79\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x6E\x6F\x61\x6E\x73\x77\x65\x72\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x67\x6C\x6F\x62\x61\x6C","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6E\x75\x6D\x62\x65\x72","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x72\x69\x6E\x67\x74\x69\x6D\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x49\x56\x52","\x72\x65\x61\x73\x6F\x6E","\x63\x61\x75\x73\x65\x2D\x74\x78\x74","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x61\x74","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x55\x73\x65\x72\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0xf8d0[0];var util=require(_0xf8d0[1]);var _=require(_0xf8d0[2]);var moment=require(_0xf8d0[3]);function getSeconds(_0x1fc9x5,_0x1fc9x6){var _0x1fc9x7=moment(_0x1fc9x5)[_0xf8d0[4]](0);var _0x1fc9x8=moment(_0x1fc9x6)[_0xf8d0[4]](0);return _0x1fc9x7[_0xf8d0[6]](_0x1fc9x8,_0xf8d0[5])}function Hangup(_0x1fc9xa,_0x1fc9xb){this[_0xf8d0[7]]= 4;this[_0xf8d0[8]]= _0xf8d0[9];this[_0xf8d0[10]]= _0x1fc9xa[_0xf8d0[10]];this[_0xf8d0[11]]= _0x1fc9xa[_0xf8d0[11]];this[_0xf8d0[12]]= (_0x1fc9xa[_0xf8d0[11]]=== _0xf8d0[13])?_0xf8d0[14]:_0x1fc9xa[_0xf8d0[11]];this[_0xf8d0[15]]= _0x1fc9xa[_0xf8d0[15]];this[_0xf8d0[16]]= _0x1fc9xa[_0xf8d0[16]];this[_0xf8d0[17]]= _0x1fc9xa[_0xf8d0[17]];this[_0xf8d0[18]]= _0x1fc9xa[_0xf8d0[15]]+ _0x1fc9xa[_0xf8d0[16]]+ _0x1fc9xa[_0xf8d0[17]];this[_0xf8d0[19]]= _0x1fc9xb[_0xf8d0[19]];this[_0xf8d0[20]]= _0x1fc9xa[_0xf8d0[21]];this[_0xf8d0[22]]= _0x1fc9xa[_0xf8d0[23]];this[_0xf8d0[24]]= _0x1fc9xa[_0xf8d0[24]];this[_0xf8d0[25]]= _0x1fc9xa[_0xf8d0[25]];this[_0xf8d0[26]]= moment()[_0xf8d0[28]](_0xf8d0[27]);this[_0xf8d0[29]]= getSeconds(_0x1fc9xa[_0xf8d0[25]],_0x1fc9xa[_0xf8d0[24]]);this[_0xf8d0[30]]= 0;this[_0xf8d0[31]]= getSeconds(this[_0xf8d0[26]],_0x1fc9xa[_0xf8d0[25]]);this[_0xf8d0[14]]= _0x1fc9xa[_0xf8d0[14]];this[_0xf8d0[32]]= _0xf8d0[33];this[_0xf8d0[34]]= _0x1fc9xb[_0xf8d0[35]];this[_0xf8d0[36]]= _0x1fc9xa[_0xf8d0[36]];this[_0xf8d0[37]]= _0x1fc9xa[_0xf8d0[37]];this[_0xf8d0[38]]= _0x1fc9xa[_0xf8d0[38]];this[_0xf8d0[39]]= _0x1fc9xa[_0xf8d0[39]];this[_0xf8d0[40]]= _0x1fc9xa[_0xf8d0[40]];this[_0xf8d0[41]]= _0x1fc9xa[_0xf8d0[41]];this[_0xf8d0[42]]= _0x1fc9xa[_0xf8d0[42]];this[_0xf8d0[43]]= _0x1fc9xa[_0xf8d0[43]];this[_0xf8d0[44]]= _0x1fc9xa[_0xf8d0[44]]}module[_0xf8d0[45]]= Hangup
\ No newline at end of file
+var _0x9ac6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x73\x74\x61\x74\x65","\x73\x74\x61\x74\x65\x64\x65\x73\x63","\x41\x6E\x73\x77\x65\x72","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x74\x79\x70\x65","\x63\x61\x6D\x70\x61\x69\x67\x6E\x74\x79\x70\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x71\x75\x65\x75\x65","\x63\x6F\x75\x6E\x74\x62\x75\x73\x79\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x6E\x6F\x61\x6E\x73\x77\x65\x72\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x67\x6C\x6F\x62\x61\x6C","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6E\x75\x6D\x62\x65\x72","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x72\x69\x6E\x67\x74\x69\x6D\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x49\x56\x52","\x72\x65\x61\x73\x6F\x6E","\x63\x61\x75\x73\x65\x2D\x74\x78\x74","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x61\x74","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x55\x73\x65\x72\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x9ac6[0];var util=require(_0x9ac6[1]);var _=require(_0x9ac6[2]);var moment=require(_0x9ac6[3]);function getSeconds(_0x157dx5,_0x157dx6){var _0x157dx7=moment(_0x157dx5)[_0x9ac6[4]](0);var _0x157dx8=moment(_0x157dx6)[_0x9ac6[4]](0);return _0x157dx7[_0x9ac6[6]](_0x157dx8,_0x9ac6[5])}function Hangup(_0x157dxa,_0x157dxb){this[_0x9ac6[7]]= 4;this[_0x9ac6[8]]= _0x9ac6[9];this[_0x9ac6[10]]= _0x157dxa[_0x9ac6[10]];this[_0x9ac6[11]]= _0x157dxa[_0x9ac6[11]];this[_0x9ac6[12]]= (_0x157dxa[_0x9ac6[11]]=== _0x9ac6[13])?_0x9ac6[14]:_0x157dxa[_0x9ac6[11]];this[_0x9ac6[15]]= _0x157dxa[_0x9ac6[15]];this[_0x9ac6[16]]= _0x157dxa[_0x9ac6[16]];this[_0x9ac6[17]]= _0x157dxa[_0x9ac6[17]];this[_0x9ac6[18]]= _0x157dxa[_0x9ac6[15]]+ _0x157dxa[_0x9ac6[16]]+ _0x157dxa[_0x9ac6[17]];this[_0x9ac6[19]]= _0x157dxb[_0x9ac6[19]];this[_0x9ac6[20]]= _0x157dxa[_0x9ac6[21]];this[_0x9ac6[22]]= _0x157dxa[_0x9ac6[23]];this[_0x9ac6[24]]= _0x157dxa[_0x9ac6[24]];this[_0x9ac6[25]]= _0x157dxa[_0x9ac6[25]];this[_0x9ac6[26]]= moment()[_0x9ac6[28]](_0x9ac6[27]);this[_0x9ac6[29]]= getSeconds(_0x157dxa[_0x9ac6[25]],_0x157dxa[_0x9ac6[24]]);this[_0x9ac6[30]]= 0;this[_0x9ac6[31]]= getSeconds(this[_0x9ac6[26]],_0x157dxa[_0x9ac6[25]]);this[_0x9ac6[14]]= _0x157dxa[_0x9ac6[14]];this[_0x9ac6[32]]= _0x9ac6[33];this[_0x9ac6[34]]= _0x157dxb[_0x9ac6[35]];this[_0x9ac6[36]]= _0x157dxa[_0x9ac6[36]];this[_0x9ac6[37]]= _0x157dxa[_0x9ac6[37]];this[_0x9ac6[38]]= _0x157dxa[_0x9ac6[38]];this[_0x9ac6[39]]= _0x157dxa[_0x9ac6[39]];this[_0x9ac6[40]]= _0x157dxa[_0x9ac6[40]];this[_0x9ac6[41]]= _0x157dxa[_0x9ac6[41]];this[_0x9ac6[42]]= _0x157dxa[_0x9ac6[42]];this[_0x9ac6[43]]= _0x157dxa[_0x9ac6[43]];this[_0x9ac6[44]]= _0x157dxa[_0x9ac6[44]]}module[_0x9ac6[45]]= Hangup
\ No newline at end of file
index de84b10..3c4ca65 100644 (file)
@@ -1 +1 @@
-var _0xa53a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x75\x6E\x69\x71\x75\x65\x69\x64","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x74\x79\x70\x65","\x63\x61\x6D\x70\x61\x69\x67\x6E\x74\x79\x70\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x71\x75\x65\x75\x65","\x63\x6F\x75\x6E\x74\x62\x75\x73\x79\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x6E\x6F\x61\x6E\x73\x77\x65\x72\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x67\x6C\x6F\x62\x61\x6C","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6E\x75\x6D\x62\x65\x72","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x72\x69\x6E\x67\x74\x69\x6D\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x61\x74","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x55\x73\x65\x72\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0xa53a[0];var util=require(_0xa53a[1]);var _=require(_0xa53a[2]);var moment=require(_0xa53a[3]);function getSeconds(_0x2307x5,_0x2307x6){var _0x2307x7=moment(_0x2307x5)[_0xa53a[4]](0);var _0x2307x8=moment(_0x2307x6)[_0xa53a[4]](0);return _0x2307x7[_0xa53a[6]](_0x2307x8,_0xa53a[5])}function History(_0x2307xa){this[_0xa53a[7]]= _0x2307xa[_0xa53a[7]];this[_0xa53a[8]]= _0x2307xa[_0xa53a[8]]|| undefined;this[_0xa53a[9]]= _0x2307xa[_0xa53a[9]];this[_0xa53a[10]]= (_0x2307xa[_0xa53a[9]]=== _0xa53a[11])?_0xa53a[12]:_0x2307xa[_0xa53a[9]];this[_0xa53a[13]]= _0x2307xa[_0xa53a[13]];this[_0xa53a[14]]= _0x2307xa[_0xa53a[14]];this[_0xa53a[15]]= _0x2307xa[_0xa53a[15]];this[_0xa53a[16]]= _0x2307xa[_0xa53a[13]]+ _0x2307xa[_0xa53a[14]]+ _0x2307xa[_0xa53a[15]];this[_0xa53a[12]]= _0x2307xa[_0xa53a[12]];this[_0xa53a[17]]= _0x2307xa[_0xa53a[18]];this[_0xa53a[19]]= _0x2307xa[_0xa53a[20]];this[_0xa53a[21]]= _0x2307xa[_0xa53a[21]];this[_0xa53a[22]]= _0x2307xa[_0xa53a[22]];this[_0xa53a[23]]= _0x2307xa[_0xa53a[22]];this[_0xa53a[24]]= getSeconds(_0x2307xa[_0xa53a[22]],_0x2307xa[_0xa53a[21]]);this[_0xa53a[25]]= 0;this[_0xa53a[26]]= 0;this[_0xa53a[27]]= _0x2307xa[_0xa53a[27]];this[_0xa53a[28]]= _0x2307xa[_0xa53a[28]];this[_0xa53a[29]]= _0x2307xa[_0xa53a[29]];this[_0xa53a[30]]= _0x2307xa[_0xa53a[30]];this[_0xa53a[31]]= _0x2307xa[_0xa53a[31]];this[_0xa53a[32]]= _0x2307xa[_0xa53a[32]];this[_0xa53a[33]]= _0x2307xa[_0xa53a[33]];this[_0xa53a[34]]= _0x2307xa[_0xa53a[34]];this[_0xa53a[35]]= _0x2307xa[_0xa53a[35]]}module[_0xa53a[36]]= History
\ No newline at end of file
+var _0x6386=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x75\x6E\x69\x71\x75\x65\x69\x64","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x74\x79\x70\x65","\x63\x61\x6D\x70\x61\x69\x67\x6E\x74\x79\x70\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x71\x75\x65\x75\x65","\x63\x6F\x75\x6E\x74\x62\x75\x73\x79\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x6E\x6F\x61\x6E\x73\x77\x65\x72\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x67\x6C\x6F\x62\x61\x6C","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6E\x75\x6D\x62\x65\x72","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x72\x69\x6E\x67\x74\x69\x6D\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x61\x74","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x55\x73\x65\x72\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x6386[0];var util=require(_0x6386[1]);var _=require(_0x6386[2]);var moment=require(_0x6386[3]);function getSeconds(_0xa8abx5,_0xa8abx6){var _0xa8abx7=moment(_0xa8abx5)[_0x6386[4]](0);var _0xa8abx8=moment(_0xa8abx6)[_0x6386[4]](0);return _0xa8abx7[_0x6386[6]](_0xa8abx8,_0x6386[5])}function History(_0xa8abxa){this[_0x6386[7]]= _0xa8abxa[_0x6386[7]];this[_0x6386[8]]= _0xa8abxa[_0x6386[8]]|| undefined;this[_0x6386[9]]= _0xa8abxa[_0x6386[9]];this[_0x6386[10]]= (_0xa8abxa[_0x6386[9]]=== _0x6386[11])?_0x6386[12]:_0xa8abxa[_0x6386[9]];this[_0x6386[13]]= _0xa8abxa[_0x6386[13]];this[_0x6386[14]]= _0xa8abxa[_0x6386[14]];this[_0x6386[15]]= _0xa8abxa[_0x6386[15]];this[_0x6386[16]]= _0xa8abxa[_0x6386[13]]+ _0xa8abxa[_0x6386[14]]+ _0xa8abxa[_0x6386[15]];this[_0x6386[12]]= _0xa8abxa[_0x6386[12]];this[_0x6386[17]]= _0xa8abxa[_0x6386[18]];this[_0x6386[19]]= _0xa8abxa[_0x6386[20]];this[_0x6386[21]]= _0xa8abxa[_0x6386[21]];this[_0x6386[22]]= _0xa8abxa[_0x6386[22]];this[_0x6386[23]]= _0xa8abxa[_0x6386[22]];this[_0x6386[24]]= getSeconds(_0xa8abxa[_0x6386[22]],_0xa8abxa[_0x6386[21]]);this[_0x6386[25]]= 0;this[_0x6386[26]]= 0;this[_0x6386[27]]= _0xa8abxa[_0x6386[27]];this[_0x6386[28]]= _0xa8abxa[_0x6386[28]];this[_0x6386[29]]= _0xa8abxa[_0x6386[29]];this[_0x6386[30]]= _0xa8abxa[_0x6386[30]];this[_0x6386[31]]= _0xa8abxa[_0x6386[31]];this[_0x6386[32]]= _0xa8abxa[_0x6386[32]];this[_0x6386[33]]= _0xa8abxa[_0x6386[33]];this[_0x6386[34]]= _0xa8abxa[_0x6386[34]];this[_0x6386[35]]= _0xa8abxa[_0x6386[35]]}module[_0x6386[36]]= History
\ No newline at end of file
index d99c8f5..5aa0b76 100644 (file)
@@ -1 +1 @@
-var _0x3923=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x75\x69\x64","\x6D\x6F\x6D\x65\x6E\x74","\x72\x72","\x64\x69\x61\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x62\x6F\x6F\x6B\x65\x64","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x43\x61\x6C\x6C\x73","\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74\x2F","\x2E\x2E\x2F\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x2E\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74","\x2E\x2F\x61\x63\x74\x69\x6F\x6E","\x2E\x2F\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2F\x66\x69\x6E\x61\x6C","\x2E\x2F\x61\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x2E\x2F\x71\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E","\x2E\x2F\x68\x61\x6E\x67\x75\x70","\x58\x43\x41\x4C\x4C\x59\x5F\x49\x50\x5F\x41\x47\x49","\x65\x6E\x76","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E","\x65\x6E\x71\x75\x65\x75\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x74\x61\x69\x6C","\x66\x69\x6E\x61\x6C\x6C\x79","\x73\x65\x71\x75\x65\x6E\x63\x65","\x70\x72\x65\x76\x69\x65\x77","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x61\x67\x65\x6E\x74\x73","\x74\x72\x75\x6E\x6B\x73","\x6D\x61\x78\x4E\x75\x6D\x62\x65\x72\x4F\x72\x69\x67\x69\x6E\x61\x74\x65","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x61\x63\x74\x69\x6F\x6E\x73","\x63\x6F\x6E\x74\x61\x63\x74\x73\x49\x64","\x75\x6E\x69\x71\x75\x65\x49\x64","\x6F\x70\x74\x69\x6F\x6E\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x73\x74\x61\x72\x74\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x73\x74\x61\x72\x74\x50\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65","\x69\x76\x72\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x64","\x71\x75\x65\x75\x65\x42\x6F\x6F\x6B\x65\x64","\x71\x75\x65\x75\x65\x42\x6F\x6F\x6B\x65\x64\x52\x52","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6E\x6E\x65\x63\x74","\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x72\x65\x73\x70\x6F\x6E\x73\x65","\x73\x79\x6E\x63\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x52\x65\x73\x70\x6F\x6E\x73\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x71\x75\x65\x75\x65\x73\x75\x6D\x6D\x61\x72\x79","\x68\x61\x6E\x67\x75\x70","\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70","\x6E\x65\x77\x65\x78\x74\x65\x6E","\x73\x79\x6E\x63\x4E\x65\x77\x45\x78\x74\x65\x6E","\x76\x61\x72\x73\x65\x74","\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72","\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x4D\x65\x6D\x62\x65\x72","\x71\x75\x65\x75\x65\x73\x74\x61\x74\x75\x73\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x6C\x6F\x6F\x70\x43\x61\x6D\x70\x61\x69\x67\x6E\x73","\x6C\x6F\x6F\x70\x43\x6C\x65\x61\x72\x5A\x6F\x6D\x62\x69\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6D\x65\x73\x73\x61\x67\x65","\x41\x47\x45\x4E\x54\x53\x5F\x4E\x4F\x54\x5F\x4C\x4F\x47\x47\x45\x44","\x6E\x61\x6D\x65","\x20\x41\x47\x45\x4E\x54\x53\x20\x4E\x4F\x54\x20\x4C\x4F\x47\x47\x45\x44","\x4E\x4F\x54\x5F\x41\x43\x54\x49\x56\x45","\x20\x4E\x4F\x54\x20\x41\x63\x74\x69\x76\x65","\x49\x4E\x54\x45\x52\x56\x41\x4C\x5F\x49\x53\x5F\x4E\x55\x4C\x4C","\x20\x49\x4E\x54\x45\x52\x56\x41\x4C\x5F\x49\x53\x5F\x4E\x55\x4C\x4C","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x69\x73\x45\x6D\x70\x74\x79","\x5B\x69\x66\x54\x69\x6D\x65\x5D\x5B\x41\x63\x74\x69\x6F\x6E\x5D","\x45\x72\x72\x6F\x72","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x65\x6D\x69\x74","\x74\x6F","\x74\x79\x70\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x76\x6F\x69\x63\x65\x3A\x71\x75\x65\x75\x65\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x68\x61\x6E\x64\x6C\x65\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x6F\x6D\x69\x74","\x69\x76\x72","\x63\x61\x6D\x70\x61\x69\x67\x6E\x3A\x69\x76\x72\x3A\x25\x73","\x63\x61\x6D\x70\x61\x69\x67\x6E\x3A\x73\x61\x76\x65","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x54\x6F\x74\x61\x6C\x43\x61\x6C\x6C\x73","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x41\x76\x67\x54\x61\x6C\x6B\x74\x69\x6D\x65","\x5B\x63\x68\x65\x63\x6B\x47\x65\x74\x44\x61\x74\x61\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x61\x76\x67\x54\x61\x6C\x6B\x74\x69\x6D\x65\x5D","\x69\x6E\x66\x6F","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x41\x76\x67\x48\x6F\x6C\x64\x74\x69\x6D\x65","\x5B\x63\x68\x65\x63\x6B\x47\x65\x74\x44\x61\x74\x61\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x61\x76\x67\x48\x6F\x6C\x64\x74\x69\x6D\x65\x5D","\x5B\x63\x68\x65\x63\x6B\x47\x65\x74\x44\x61\x74\x61\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x74\x6F\x74\x61\x6C\x43\x61\x6C\x6C\x73\x5D","\x5B\x63\x68\x65\x63\x6B\x47\x65\x74\x44\x61\x74\x61\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x6F\x62\x6A\x49\x73\x45\x6D\x70\x74\x79\x5D","\x5B\x63\x68\x65\x63\x6B\x47\x65\x74\x44\x61\x74\x61\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x6F\x62\x6A\x5D","\x5B\x45\x72\x6C\x61\x6E\x67\x42\x5D","\x6D\x65\x72\x67\x65","\x5B\x66\x72\x65\x65\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D","\x73\x74\x72\x69\x6E\x67","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x22\x22\x20\x3C\x3E","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x6C\x65\x6E\x67\x74\x68","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x64","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x5B\x64\x65\x63\x72\x65\x6D\x65\x74\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x20\x6F\x62\x6A\x65\x63\x74\x20\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x64\x20\x69\x73\x20\x6E\x65\x67\x61\x74\x69\x76\x65","\x5B\x64\x65\x63\x72\x65\x6D\x65\x74\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x20\x69\x73\x20\x6E\x75\x6C\x6C\x20\x6F\x72\x20\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x63\x6F\x6E\x74\x61\x63\x74\x73\x52\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x64","\x52\x45\x53\x43\x48\x45\x44\x55\x4C\x45\x44\x5F\x43\x4F\x4E\x54\x41\x43\x54\x53","\x5B\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72\x32\x5D\x5B\x52\x65\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x5D","\x63\x6F\x6E\x74\x61\x63\x74\x73","\x41\x56\x41\x49\x4C\x41\x42\x4C\x45\x5F\x43\x4F\x4E\x54\x41\x43\x54\x53\x5F\x46\x49\x4E\x49\x53\x48\x45\x44","\x5B\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72\x32\x5D\x5B\x45\x6D\x70\x74\x79\x5D","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65\x4F\x6E\x65\x4E\x6F\x74\x41\x63\x74\x69\x76\x65","\x74\x61\x6C\x6B\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67","\x70\x54\x61\x6C\x6B\x69\x6E\x67","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79\x5D\x20\x43\x61\x6D\x70\x61\x69\x67\x6E\x20\x51\x75\x65\x75\x65\x3A\x20","\x69\x73\x20\x6E\x6F\x74\x20\x61\x63\x74\x69\x76\x65","\x49\x53\x5F\x44\x49\x53\x41\x43\x54\x49\x56\x45\x44","\x69\x73\x20\x64\x69\x73\x61\x63\x74\x69\x76\x65","\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79\x5D\x20\x43\x61\x6D\x70\x61\x69\x67\x6E\x20\x49\x76\x72\x3A\x20","\x73\x74\x61\x74\x65","\x73\x74\x61\x74\x65\x64\x65\x73\x63","\x65\x6E\x64\x74\x69\x6D\x65","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x5B\x75\x6E\x69\x71\x75\x65\x69\x64\x5D","\x63\x6C\x65\x61\x72\x5A\x6F\x6D\x62\x69\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x5B\x61\x63\x74\x69\x6F\x6E\x73\x5D","\x69\x73\x4E\x69\x6C","\x4E\x6F\x20\x73\x75\x63\x68\x20\x63\x68\x61\x6E\x6E\x65\x6C","\x71\x75\x65\x75\x65","\x75\x70\x64\x61\x74\x65\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x64","\x5B\x44\x69\x61\x6C\x65\x72\x5D\x5B\x63\x68\x65\x63\x6B\x43\x68\x61\x6E\x6E\x65\x6C\x5D","\x5B\x44\x69\x61\x6C\x65\x72\x5D\x5B\x63\x68\x65\x63\x6B\x43\x68\x61\x6E\x6E\x65\x6C\x5D\x5B\x69\x76\x72\x5D","\x63\x61\x74\x63\x68","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x6F\x75\x6E\x74\x52\x65\x53\x63\x68\x65\x64\x75\x6C\x65\x64","\x5B\x63\x6F\x75\x6E\x74\x52\x65\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x5D\x20","\x74\x68\x65\x6E","\x72\x65\x73\x6F\x6C\x76\x65","\x63\x68\x65\x63\x6B\x49\x73\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74","\x5B\x63\x68\x65\x63\x6B\x49\x73\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x5D\x20","\x63\x68\x65\x63\x6B\x49\x73\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x49\x76\x72","\x5B\x63\x68\x65\x63\x6B\x49\x73\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x49\x76\x72\x5D\x20","\x61\x76\x65\x72\x61\x67\x65\x48\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65","\x5B\x61\x76\x65\x72\x61\x67\x65\x48\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65\x5D\x20","\x61\x76\x67\x48\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65","\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74","\x5B\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x20","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72","\x5B\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72\x5D\x20","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72\x49\x76\x72","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x50\x61\x75\x73\x65\x73","\x5B\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x50\x61\x75\x73\x65\x73\x5D\x20","\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x64\x44\x69\x61\x6C\x65\x72","\x5B\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x64\x44\x69\x61\x6C\x65\x72\x5D\x20","\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79","\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D\x20","\x5B\x75\x70\x64\x61\x74\x65\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x64\x5D\x20\x6F\x62\x6A\x65\x63\x74\x20\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x64\x20\x69\x73\x20\x6E\x65\x67\x61\x74\x69\x76\x65","\x5B\x75\x70\x64\x61\x74\x65\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x64\x5D\x20\x69\x73\x20\x6E\x75\x6C\x6C\x20\x6F\x72\x20\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6C\x6F\x67\x67\x65\x72\x48\x61\x6E\x64\x6C\x65\x72","\x65\x6D\x70\x74\x79\x43\x6F\x6E\x74\x61\x63\x74","\x6E\x6F\x74\x46\x6F\x75\x6E\x64","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x55\x73\x65\x72\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x70\x69\x63\x6B","\x5B\x65\x6D\x70\x74\x79\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D","\x5B\x65\x6D\x70\x74\x79\x43\x6F\x6E\x74\x61\x63\x74\x5D","\x73\x61\x76\x65\x49\x6E\x44\x62","\x69\x73\x53\x75\x63\x63\x65\x73\x73","\x53\x75\x63\x63\x65\x73\x73","\x69\x73\x54\x72\x75\x6E\x6B\x52\x65\x61\x63\x68\x61\x62\x6C\x65","\x61\x63\x74\x69\x76\x65","\x53\x49\x50\x2F\x25\x73","\x72\x65\x61\x63\x68\x61\x62\x6C\x65","\x75\x6E\x6D\x6F\x6E\x69\x74\x6F\x72\x65\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x76\x61\x72\x69\x61\x62\x6C\x65","\x61\x6D\x64\x73\x74\x61\x74\x75\x73","\x65\x78\x74\x65\x6E","\x78\x63\x61\x6C\x6C\x79\x2D\x6D\x6F\x74\x69\x6F\x6E\x2D\x64\x69\x61\x6C\x65\x72","\x64\x69\x61\x6C\x41\x4D\x44\x41\x63\x74\x69\x76\x65","\x76\x61\x6C\x75\x65","\x48\x41\x4E\x47\x55\x50","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x41\x67\x69\x43\x61\x6C\x6C\x73\x44\x61\x79","\x48\x61\x6E\x67\x75\x70\x49\x6E\x41\x4D\x44","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x41\x4D\x44","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x49\x6E\x41\x4D\x44\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x49\x6E\x41\x4D\x44\x5D","\x4D\x41\x43\x48\x49\x4E\x45","\x4D\x61\x63\x68\x69\x6E\x65","\x61\x6D\x64","\x5B\x73\x79\x6E\x63\x4D\x61\x63\x68\x69\x6E\x65\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D","\x5B\x73\x79\x6E\x63\x4D\x61\x63\x68\x69\x6E\x65\x5D","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x49\x6E\x41\x4D\x44\x49\x76\x72\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x49\x6E\x41\x4D\x44\x49\x76\x72\x5D","\x5B\x73\x79\x6E\x63\x4D\x61\x63\x68\x69\x6E\x65\x49\x76\x72\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D","\x5B\x73\x79\x6E\x63\x4D\x61\x63\x68\x69\x6E\x65\x49\x76\x72\x5D","\x69\x76\x72\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x49\x76\x72\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x49\x76\x72\x5D","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x50\x72\x6F\x6A\x65\x63\x74","\x41\x6E\x73\x77\x65\x72\x41\x47\x49","\x41\x47\x49","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x55\x6E\x6B\x6E\x6F\x77\x6E\x43\x61\x6C\x6C\x73\x44\x61\x79","\x63\x61\x75\x73\x65\x2D\x74\x78\x74","\x55\x6E\x6B\x6E\x6F\x77","\x72\x65\x61\x73\x6F\x6E","\x61\x67\x65\x6E\x74","\x61\x67\x69\x61\x66\x74\x65\x72\x61\x74","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x50\x72\x6F\x6A\x65\x63\x74\x32","\x64\x69\x61\x6C\x41\x67\x69\x41\x66\x74\x65\x72\x48\x61\x6E\x67\x75\x70\x41\x67\x65\x6E\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x71\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x43\x72\x65\x61\x74\x65\x53\x74\x61\x74\x65","\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x5D\x20\x5B\x44\x72\x6F\x70\x5D","\x64\x72\x6F\x70\x74\x69\x6D\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65\x74\x69\x6D\x65","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x54\x69\x6D\x65\x6F\x75\x74","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x44\x72\x6F\x70\x70\x65\x64\x43\x61\x6C\x6C\x73\x54\x69\x6D\x65\x6F\x75\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x72\x6F\x70\x43\x61\x6C\x6C\x73\x44\x61\x79\x54\x69\x6D\x65\x6F\x75\x74","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x45\x72\x6C\x61\x6E\x67\x43\x61\x6C\x6C\x73\x44\x72\x6F\x70\x70\x65\x64\x43\x61\x6C\x6C\x73","\x44\x72\x6F\x70","\x64\x72\x6F\x70\x72\x65\x61\x73\x6F\x6E","\x54\x49\x4D\x45\x4F\x55\x54","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x44\x72\x6F\x70\x70\x65\x64\x43\x61\x6C\x6C\x73\x43\x61\x6C\x6C\x65\x72\x73\x45\x78\x69\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x72\x6F\x70\x43\x61\x6C\x6C\x73\x44\x61\x79\x43\x61\x6C\x6C\x65\x72\x73\x45\x78\x69\x74","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x43\x41\x4C\x4C\x45\x52\x45\x58\x49\x54","\x73\x74\x72\x61\x74\x65\x67\x79","\x61\x63\x74\x69\x6F\x6E\x69\x64","\x6C\x6F\x63\x6B\x65\x64","\x31","\x70\x61\x75\x73\x65\x64","\x30","\x73\x74\x61\x74\x65\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x69\x64\x48\x6F\x70\x70\x65\x72","\x70\x75\x73\x68","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x5B\x75\x6E\x6C\x6F\x63\x6B\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x5D\x5B\x75\x6E\x64\x65\x66\x69\x6E\x65\x64\x5D","\x5B\x43\x61\x74\x63\x68\x5D\x5B\x50\x72\x65\x76\x69\x65\x77\x5D\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D","\x72\x75\x6E","\x5B\x75\x6E\x6C\x6F\x63\x6B\x5D\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D","\x5F\x72\x72","\x6C\x6F\x63\x6B\x52\x52","\x5B\x62\x6F\x6F\x6B\x65\x64\x5D\x5B\x75\x6E\x6C\x6F\x63\x6B\x5D","\x5B\x62\x6F\x6F\x6B\x65\x64\x5D\x5B\x75\x6E\x6C\x6F\x63\x6B\x32\x5D","\x5B\x75\x6E\x6C\x6F\x63\x6B\x32\x5D\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D","\x5B\x62\x6F\x6F\x6B\x65\x64\x5D\x5B\x75\x6E\x6C\x6F\x63\x6B\x33\x5D","\x5B\x75\x6E\x6C\x6F\x63\x6B\x33\x5D\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D","\x73\x79\x6E\x63\x43\x61\x6D\x70\x61\x69\x67\x6E\x73","\x63\x68\x65\x63\x6B\x49\x73\x54\x72\x75\x6E\x6B\x52\x65\x61\x63\x68\x61\x62\x6C\x65","\x54\x52\x55\x4E\x4B\x5F\x49\x53\x5F\x4E\x4F\x54\x5F\x52\x45\x41\x43\x48\x41\x42\x4C\x45","\x20\x74\x72\x75\x6E\x6B\x20\x69\x73\x20\x6E\x6F\x74\x20\x72\x65\x61\x63\x68\x61\x62\x6C\x65","\x63\x68\x65\x63\x6B\x49\x66\x54\x69\x6D\x65","\x69\x66\x54\x69\x6D\x65","\x63\x68\x65\x63\x6B\x49\x66\x54\x69\x6D\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x46\x61\x69\x6C\x75\x72\x65","\x20\x49\x6E\x74\x65\x72\x76\x61\x6C\x73\x20\x69\x73\x20\x6E\x75\x6C\x6C\x20","\x49\x4E\x54\x45\x52\x56\x41\x4C\x5F\x49\x53\x5F\x45\x4D\x50\x54\x59","\x20\x49\x6E\x74\x65\x72\x76\x61\x6C\x73\x20\x69\x73\x20\x65\x6D\x70\x74\x79\x20","\x74\x69\x6D\x65\x7A\x6F\x6E\x65\x73","\x54\x49\x4D\x45\x5A\x4F\x4E\x45\x5F\x55\x4E\x4B\x4E\x4F\x57","\x20\x54\x69\x6D\x65\x7A\x6F\x6E\x65\x20\x75\x6E\x6B\x6E\x6F\x77\x20","\x69\x73\x41\x72\x72\x61\x79","\x74\x72\x75\x65","\x69\x6E\x64\x65\x78\x4F\x66","\x63\x6F\x6E\x74\x65\x6E\x74","\x63\x6F\x6D\x6D\x61\x6E\x64","\x69\x66\x74\x69\x6D\x65\x20\x25\x73\x2C\x25\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C","","\x73\x6F\x6D\x65","\x47\x4C\x4F\x42\x41\x4C\x5F\x49\x4E\x54\x45\x52\x56\x41\x4C\x5F\x49\x53\x5F\x4F\x56\x45\x52\x54\x49\x4D\x45","\x49\x4E\x54\x45\x52\x56\x41\x4C\x5F\x49\x53\x5F\x4F\x56\x45\x52\x54\x49\x4D\x45","\x5B\x69\x66\x54\x69\x6D\x65\x5D\x5B\x70\x72\x6F\x6D\x69\x73\x65\x41\x6C\x6C\x5D","\x47\x6C\x6F\x62\x61\x6C\x3A\x20","\x20","\x20\x49\x6E\x74\x65\x72\x76\x61\x6C\x20\x69\x73\x20\x6F\x76\x65\x72\x74\x69\x6D\x65\x3A\x20","\x54\x69\x6D\x65\x7A\x6F\x6E\x65\x3A\x20","\x61\x6C\x6C","\x63\x68\x65\x63\x6B\x44\x69\x61\x6C\x4D\x65\x74\x68\x6F\x64","\x68\x61\x6E\x64\x6C\x65\x50\x6F\x77\x65\x72","\x70\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65","\x64\x69\x61\x6C\x50\x6F\x77\x65\x72\x4C\x65\x76\x65\x6C","\x70\x6F\x77\x65\x72","\x51\x75\x65\x75\x65","\x6D\x65\x74\x68\x6F\x64\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x64\x69\x61\x6C\x4D\x65\x74\x68\x6F\x64","\x6C\x61\x75\x6E\x63\x68\x48\x61\x6E\x64\x6C\x65\x49\x76\x72","\x68\x61\x6E\x64\x6C\x65\x49\x76\x72","\x64\x69\x61\x6C\x41\x63\x74\x69\x76\x65","\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79\x5D","\x64\x69\x61\x6C\x54\x69\x6D\x65\x7A\x6F\x6E\x65","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x49\x6E\x74\x65\x72\x76\x61\x6C","\x6C\x6F\x67\x67\x65\x64\x49\x6E","\x5B\x73\x79\x6E\x63\x43\x61\x6D\x70\x61\x69\x67\x6E\x73\x5D","\x61\x63\x74\x69\x6F\x6E\x4F\x72\x69\x67\x69\x6E\x61\x74\x65","\x76\x34","\x6F\x62\x6A\x65\x63\x74","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x20\x69\x73\x20\x75\x6E\x64\x65\x66\x69\x6E\x65","\x70\x68\x6F\x6E\x65","\x43\x6F\x6E\x74\x61\x63\x74","\x63\x6F\x6E\x74\x61\x63\x74\x20\x69\x73\x20\x75\x6E\x64\x65\x66\x69\x6E\x65","\x67\x65\x74\x43\x61\x6C\x6C\x65\x72","\x22\x61\x67\x69\x3A\x2F\x2F\x25\x73\x2F\x73\x71\x75\x61\x72\x65\x2C\x25\x73\x22","\x4E\x4F\x4E\x45","\x22\x25\x73\x2C\x25\x73\x25\x73\x2C\x2C\x2C\x25\x73\x22","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x4F\x70\x74\x69\x6F\x6E\x73","\x63","\x41\x43\x54\x49\x56\x45","\x58\x4D\x44\x2D\x41\x4D\x44\x49\x4E\x49\x54\x49\x41\x4C\x53\x49\x4C\x45\x4E\x43\x45","\x64\x69\x61\x6C\x41\x4D\x44\x49\x6E\x69\x74\x69\x61\x6C\x53\x69\x6C\x65\x6E\x63\x65","\x58\x4D\x44\x2D\x41\x4D\x44\x47\x52\x45\x45\x54\x49\x4E\x47","\x64\x69\x61\x6C\x41\x4D\x44\x47\x72\x65\x65\x74\x69\x6E\x67","\x58\x4D\x44\x2D\x41\x4D\x44\x41\x46\x54\x45\x52\x47\x52\x45\x45\x54\x49\x4E\x47\x53\x49\x4C\x45\x4E\x43\x45","\x64\x69\x61\x6C\x41\x4D\x44\x41\x66\x74\x65\x72\x47\x72\x65\x65\x74\x69\x6E\x67\x53\x69\x6C\x65\x6E\x63\x65","\x58\x4D\x44\x2D\x41\x4D\x44\x54\x4F\x54\x41\x4C\x41\x4E\x41\x4C\x59\x53\x49\x53\x54\x49\x4D\x45","\x64\x69\x61\x6C\x41\x4D\x44\x54\x6F\x74\x61\x6C\x41\x6E\x61\x6C\x79\x73\x69\x73\x54\x69\x6D\x65","\x58\x4D\x44\x2D\x41\x4D\x44\x4D\x49\x4E\x57\x4F\x52\x44\x4C\x45\x4E\x47\x54\x48","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x69\x6E\x57\x6F\x72\x64\x4C\x65\x6E\x67\x74\x68","\x58\x4D\x44\x2D\x41\x4D\x44\x42\x45\x54\x57\x45\x45\x4E\x57\x4F\x52\x44\x53\x53\x49\x4C\x45\x4E\x43\x45","\x64\x69\x61\x6C\x41\x4D\x44\x42\x65\x74\x77\x65\x65\x6E\x57\x6F\x72\x64\x73\x53\x69\x6C\x65\x6E\x63\x65","\x58\x4D\x44\x2D\x41\x4D\x44\x4D\x41\x58\x49\x4D\x55\x4D\x4E\x55\x4D\x42\x45\x52\x4F\x46\x57\x4F\x52\x44\x53","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x61\x78\x69\x6D\x75\x6D\x4E\x75\x6D\x62\x65\x72\x4F\x66\x57\x6F\x72\x64\x73","\x58\x4D\x44\x2D\x41\x4D\x44\x53\x49\x4C\x45\x4E\x43\x45\x54\x48\x52\x45\x53\x48\x4F\x4C\x44","\x64\x69\x61\x6C\x41\x4D\x44\x53\x69\x6C\x65\x6E\x63\x65\x54\x68\x72\x65\x73\x68\x6F\x6C\x64","\x58\x4D\x44\x2D\x41\x4D\x44\x4D\x41\x58\x49\x4D\x55\x4D\x57\x4F\x52\x44\x4C\x45\x4E\x47\x54\x48","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x61\x78\x69\x6D\x75\x6D\x57\x6F\x72\x64\x4C\x65\x6E\x67\x74\x68","\x58\x4D\x44\x2D\x56\x4F\x49\x43\x45\x51\x55\x45\x55\x45\x49\x44","\x58\x4D\x44\x2D\x43\x41\x4D\x50\x41\x49\x47\x4E\x49\x44","\x69\x64","\x74\x61\x67\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x25\x73\x25\x73","\x58\x4D\x44\x2D","\x74\x6F\x55\x70\x70\x65\x72","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x46\x61\x69\x6C\x75\x72\x65\x43\x61\x6C\x6C\x73\x44\x61\x79","\x5B\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x45\x72\x72\x6F\x72\x5D\x3A\x20\x25\x73","\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x45\x72\x72\x6F\x72","\x5B\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x5B\x65\x72\x72\x6F\x72\x5D","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x20\x61\x63\x74\x69\x6F\x6E\x20\x45\x72\x72\x6F\x72","\x53\x49\x50\x2F\x25\x73\x2F\x25\x73\x25\x73","\x54\x72\x75\x6E\x6B","\x64\x69\x61\x6C\x50\x72\x65\x66\x69\x78","\x74\x72\x69\x6D","\x54\x72\x75\x6E\x6B\x42\x61\x63\x6B\x75\x70","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x61\x6D\x65","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x75\x6D\x62\x65\x72","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x54\x69\x6D\x65\x6F\x75\x74","\x67\x65\x74\x51\x75\x65\x75\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x5D\x20","\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67","\x63\x68\x65\x63\x6B\x52\x65\x74\x72\x69\x76\x65\x4D\x61\x78","\x63\x6F\x75\x6E\x74\x62\x75\x73\x79\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x6E\x6F\x61\x6E\x73\x77\x65\x72\x72\x65\x74\x72\x79","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x4D\x61\x78\x52\x65\x74\x72\x79","\x5B\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x4E\x6F\x41\x6E\x73\x77\x65\x72\x5D","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x6D\x69\x6E\x75\x74\x65\x73","\x61\x64\x64","\x64\x69\x61\x6C\x42\x75\x73\x79\x4D\x61\x78\x52\x65\x74\x72\x79","\x5B\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x20\x5B\x42\x75\x73\x79\x5D","\x64\x69\x61\x6C\x42\x75\x73\x79\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x4D\x61\x78\x52\x65\x74\x72\x79","\x5B\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x20\x5B\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x5D","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x5D","\x65\x6E\x74\x69\x74\x79\x20\x69\x73\x20\x75\x6E\x64\x65\x66\x69\x6E\x65","\x65\x76\x74\x20\x69\x73\x20\x75\x6E\x64\x65\x66\x69\x6E\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4E\x6F\x53\x75\x63\x68\x43\x61\x6C\x6C\x73\x44\x61\x79","\x4E\x6F\x53\x75\x63\x68\x4E\x75\x6D\x62\x65\x72","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D\x5B\x30\x5D","\x72\x65\x61\x73\x6F\x6E\x20\x30\x20\x6E\x6F\x20\x73\x75\x63\x68\x20\x6E\x75\x6D\x62\x65\x72\x2E\x2E\x2E\x2E","\x73\x74\x61\x74\x65\x47\x6C\x6F\x62\x61\x6C","\x63\x72\x65\x61\x74\x65\x53\x74\x61\x74\x65\x46\x69\x6E\x61\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4E\x6F\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x4E\x6F\x41\x6E\x73\x77\x65\x72","\x63\x6F\x75\x6E\x74\x67\x6C\x6F\x62\x61\x6C","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D\x5B\x33\x5D","\x72\x65\x61\x73\x6F\x6E\x20\x33\x20\x72\x69\x6E\x67\x69\x6E\x67\x20\x6E\x6F\x20\x61\x6E\x73\x77\x65\x72","\x33","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x42\x75\x73\x79\x43\x61\x6C\x6C\x73\x44\x61\x79","\x42\x75\x73\x79","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D\x5B\x35\x5D","\x72\x65\x61\x73\x6F\x6E\x20\x35\x20\x62\x75\x73\x79","\x35","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x43\x61\x6C\x6C\x73\x44\x61\x79","\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D\x5B\x38\x5D","\x72\x65\x61\x73\x6F\x6E\x20\x38\x20\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E","\x38","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D\x5B\x3F\x5D","\x47\x6C\x6F\x62\x61\x6C","\x5B\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x64\x44\x69\x61\x6C\x65\x72\x5D\x5B\x30\x5D","\x63\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x6D\x6F\x76\x65\x64","\x64\x69\x61\x6C\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x4F\x70\x74\x69\x6D\x69\x7A\x61\x74\x69\x6F\x6E\x50\x65\x72\x63\x65\x6E\x74\x61\x67\x65","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x50\x61\x75\x73\x65\x73","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x4C\x6F\x77\x65\x72\x4C\x69\x6D\x69\x74","\x65\x72\x6C\x61\x6E\x67\x43\x61\x6C\x6C\x73","\x65\x72\x6C\x61\x6E\x67\x41\x62\x61\x6E\x64\x6F\x6E\x6D\x65\x6E\x74\x52\x61\x74\x65","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x48\x69\x74\x52\x61\x74\x65","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x4D\x75\x6C\x74\x69\x70\x6C\x69\x63\x61\x74\x69\x76\x65\x46\x61\x63\x74\x6F\x72","\x66\x6C\x6F\x6F\x72","\x5B\x73\x74\x61\x72\x74\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x53\x74\x61\x72\x74\x50\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65\x5D\x5B\x46\x69\x72\x73\x74\x5D","\x5B\x73\x74\x61\x72\x74\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x53\x74\x61\x72\x74\x50\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65\x5D","\x63\x68\x65\x63\x6B\x20\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x20\x69\x73\x20\x6E\x6F\x74\x20\x75\x6E\x64\x65\x66\x69\x6E\x65","\x63\x68\x65\x63\x6B\x20\x68\x61\x6E\x64\x6C\x65\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x20\x69\x73\x20\x6E\x6F\x74\x20\x75\x6E\x64\x65\x66\x69\x6E\x65","\x5B\x73\x74\x61\x72\x74\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x53\x74\x61\x72\x74\x50\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65\x5D\x5B\x44\x61\x74\x65\x5D","\x64\x69\x61\x6C\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C","\x5B\x73\x74\x61\x72\x74\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x53\x74\x61\x72\x74\x50\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65\x5D\x5B\x4C\x6F\x6F\x70\x5D","\x64\x69\x61\x6C\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x4F\x70\x74\x69\x6D\x69\x7A\x61\x74\x69\x6F\x6E","\x64\x72\x6F\x70\x52\x61\x74\x65","\x5B\x73\x74\x6F\x70\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x52\x65\x53\x74\x61\x72\x74\x50\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65\x5D\x5B\x45\x78\x63\x65\x65\x64\x65\x64\x44\x72\x6F\x70\x44\x61\x79\x5D","\x44\x72\x6F\x70\x70\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x64\x61\x79","\x5B\x73\x74\x6F\x70\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x52\x65\x53\x74\x61\x72\x74\x50\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65\x5D\x5B\x4C\x6F\x77\x65\x72\x4C\x69\x6D\x69\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x5D","\x41\x67\x65\x6E\x74\x20\x66\x72\x65\x65","\x61\x67\x65\x6E\x74\x20\x6D\x61\x78\x20\x66\x72\x65\x65\x20","\x5B\x73\x74\x6F\x70\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x52\x65\x53\x74\x61\x72\x74\x50\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65\x5D\x5B\x45\x78\x63\x65\x65\x64\x65\x64\x44\x72\x6F\x70\x49\x6E\x74\x65\x72\x76\x61\x6C\x5D","\x4D\x61\x78\x20\x44\x72\x6F\x70\x20","\x44\x72\x6F\x70\x20\x69\x6E\x20\x74\x68\x69\x73\x20\x69\x6E\x74\x65\x72\x76\x61\x6C","\x5B\x73\x74\x61\x72\x74\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x53\x74\x61\x72\x74\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x46\x69\x72\x73\x74\x5D","\x5B\x61\x76\x65\x72\x61\x67\x65\x48\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65\x5D\x5B\x45\x72\x6C\x61\x6E\x67\x42\x5D\x20","\x73\x74\x61\x72\x74\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x67\x65\x74\x44\x61\x74\x61\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x5B\x73\x74\x61\x72\x74\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x53\x74\x61\x72\x74\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x52\x65\x70\x65\x61\x74\x5D","\x5B\x43\x61\x74\x63\x68\x45\x72\x6C\x61\x6E\x67\x42\x5D","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x51\x75\x65\x75\x65\x50\x61\x75\x73\x65\x73","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x41\x6E\x73\x77\x65\x72\x65\x64\x43\x61\x6C\x6C\x73","\x61\x62\x61\x6E\x64\x6F\x6E\x6D\x65\x6E\x74\x52\x61\x74\x65","\x61\x67\x65\x6E\x74\x42\x75\x73\x79\x46\x61\x63\x74\x6F\x72","\x62\x75\x73\x79\x46\x61\x63\x74\x6F\x72","\x5B\x67\x65\x74\x44\x61\x74\x61\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D","\x63\x68\x65\x63\x6B\x20\x66\x61\x69\x6C\x75\x72\x65","\x65\x72\x6C\x61\x6E\x67\x43\x61\x6C\x6C\x54\x6F\x53\x65\x63\x6F\x6E\x64","\x5B\x73\x74\x61\x72\x74\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D","\x5B\x68\x61\x6E\x64\x6C\x65\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D","\x5B\x73\x74\x61\x72\x74\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73\x5D\x20","\x46\x61\x69\x6C\x75\x72\x65\x20","\x63\x68\x65\x63\x6B\x43\x6F\x6E\x74\x61\x63\x74\x42\x6C\x61\x63\x6B","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x5B\x75\x6E\x6C\x6F\x63\x6B\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D","\x71\x75\x65\x75\x65\x73\x74\x61\x74\x75\x73","\x5B\x62\x6F\x6F\x6B\x65\x64\x5D","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x64\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x4D\x65\x54\x69\x6D\x65\x6F\x75\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x52\x65\x43\x61\x6C\x6C\x73\x44\x61\x79","\x64\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x49\x6E\x51\x75\x65\x75\x65","\x5B\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x64\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x49\x6E\x51\x75\x65\x75\x65\x5D","\x5B\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x5B\x48\x69\x73\x74\x6F\x72\x79\x44\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x49\x6E\x51\x75\x65\x75\x65\x5D\x5B\x68\x69\x73\x74\x6F\x72\x79\x43\x61\x74\x63\x68\x5D","\x52\x45\x43\x41\x4C\x4C\x49\x4E\x51\x55\x45\x55\x45","\x52\x65\x63\x61\x6C\x6C\x49\x6E\x51\x75\x65\x75\x65","\x52\x45\x43\x41\x4C\x4C\x46\x41\x49\x4C\x45\x44\x54\x49\x4D\x45\x4F\x55\x54","\x52\x65\x63\x61\x6C\x6C\x46\x61\x69\x6C\x65\x64\x54\x69\x6D\x65\x6F\x75\x74","\x5B\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x5B\x48\x69\x73\x74\x6F\x72\x79\x52\x65\x63\x61\x6C\x6C\x43\x6C\x6F\x73\x65\x5D\x5B\x68\x69\x73\x74\x6F\x72\x79\x43\x61\x74\x63\x68\x5D","\x5B\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x5B\x48\x69\x73\x74\x6F\x72\x79\x52\x65\x63\x61\x6C\x6C\x43\x6C\x6F\x73\x65\x5D","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74\x43\x61\x6C\x6C\x73\x44\x61\x79","\x42\x4C\x41\x43\x4B\x4C\x49\x53\x54","\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74","\x5B\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x5B\x68\x69\x73\x74\x6F\x72\x79\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74\x5D","\x5B\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x5B\x4D\x6F\x76\x65\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74\x5D","\x69\x6E\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74","\x6C\x69\x6D\x69\x74\x43\x61\x6C\x6C\x73","\x74\x65\x6D\x70","\x5B\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x32\x5D","\x5B\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x32\x5D\x5B\x45\x6D\x70\x74\x79\x5D","\x52\x55\x4E\x4E\x49\x4E\x47","\x69\x76\x72\x54\x6F\x74\x61\x6C\x43\x61\x6C\x6C\x73\x44\x61\x79\x73","\x5B\x61\x63\x74\x69\x6F\x6E\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x20","\x5B\x61\x63\x74\x69\x6F\x6E\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x49\x76\x72\x5D\x20","\x43\x6F\x6E\x74\x61\x63\x74\x2E\x70\x68\x6F\x6E\x65","\x64\x69\x61\x6C\x4F\x72\x64\x65\x72\x42\x79\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x64\x69\x61\x6C\x4C\x69\x6D\x69\x74\x51\x75\x65\x75\x65","\x6E\x6F\x74\x5F\x69\x6E\x75\x73\x65","\x5B\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72\x32\x5D","\x74\x72\x79\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x5B\x68\x61\x6E\x64\x6C\x65\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x6C\x69\x6D\x69\x74\x43\x68\x61\x6E\x6E\x65\x6C\x5D","\x5B\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D","\x5B\x61\x63\x74\x69\x6F\x6E\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x20","\x5B\x61\x62\x61\x6E\x64\x6F\x6E\x6D\x65\x6E\x74\x52\x61\x74\x65\x5D","\x20\x6D\x20\x3D\x20","\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x20\x3D\x20","\x20\x54\x73\x20\x3D\x20","\x20\x70\x20\x3D\x20","\x20\x41\x6D\x61\x78\x20\x3D\x20","\x6D\x20\x3D\x20","\x54\x73\x20\x3D\x20","\x70\x20\x3D\x20","\x69\x6E\x74\x65\x72\x76\x61\x6C\x20\x3D\x20","\x41\x6D\x61\x78\x20\x3D\x20","\x5B\x62\x75\x73\x79\x46\x61\x63\x74\x6F\x72\x5D","\x20\x55\x6D\x69\x6E\x20\x3D\x20","\x65\x78\x70\x6F\x72\x74\x73"];_0x3923[0];var util=require(_0x3923[1]);var _=require(_0x3923[2]);var BPromise=require(_0x3923[3]);var uuid=require(_0x3923[4]);var moment=require(_0x3923[5]);var rr=require(_0x3923[6]);var logger=require(_0x3923[8])(_0x3923[7]);var loggerBooked=require(_0x3923[8])(_0x3923[9]);var loggerPredictive=require(_0x3923[8])(_0x3923[10]);var loggerPredictiveCalls=require(_0x3923[8])(_0x3923[11]);var loggerSyncQueueSummary=require(_0x3923[8])(_0x3923[12]);var config=require(_0x3923[13]);var ami=require(_0x3923[14]);var io=require(_0x3923[16])({host:_0x3923[15],port:6379});var cmHopper=require(_0x3923[17]);var cmHopperFinal=require(_0x3923[18]);var cmHopperHistory=require(_0x3923[19]);var cmHopperBlack=require(_0x3923[20]);var voiceQueueRt=require(_0x3923[21]);var Action=require(_0x3923[22]);var History=require(_0x3923[23]);var Final=require(_0x3923[24]);var AgentComplete=require(_0x3923[25]);var QueueCallerAbandon=require(_0x3923[26]);var Hangup=require(_0x3923[27]);var ipAgi=process[_0x3923[29]][_0x3923[28]]|| _0x3923[30];var strategy={rrmemory:_0x3923[31],roundrobin:_0x3923[32]};var Sequence=function(){};Sequence[_0x3923[34]][_0x3923[33]]= function(_0x752fx1d){this[_0x3923[35]]= this[_0x3923[35]]?this[_0x3923[35]][_0x3923[36]](_0x752fx1d):_0x752fx1d()};function Dialer(_0x752fx1f,_0x752fx20){this[_0x3923[37]]=  new Sequence();this[_0x3923[38]]= _0x752fx20;this[_0x3923[39]]= _0x752fx1f[_0x3923[39]];this[_0x3923[40]]= _0x752fx1f[_0x3923[40]];this[_0x3923[41]]= _0x752fx1f[_0x3923[41]];this[_0x3923[42]]= _0x752fx1f[_0x3923[42]];this[_0x3923[43]]= config[_0x3923[43]]|| 2;this[_0x3923[44]]= {};this[_0x3923[45]]= {};this[_0x3923[46]]= {};this[_0x3923[47]]= {};this[_0x3923[48]]= {};this[_0x3923[49]]= {};this[_0x3923[50]]= {};this[_0x3923[51]]= {};this[_0x3923[52]]= {};this[_0x3923[53]]= {};ami[_0x3923[57]](_0x3923[54],this[_0x3923[56]][_0x3923[55]](this));ami[_0x3923[57]](_0x3923[58],this[_0x3923[59]][_0x3923[55]](this));ami[_0x3923[57]](_0x3923[60],this[_0x3923[61]][_0x3923[55]](this));ami[_0x3923[57]](_0x3923[62],this[_0x3923[63]][_0x3923[55]](this));ami[_0x3923[57]](_0x3923[64],this[_0x3923[12]][_0x3923[55]](this));ami[_0x3923[57]](_0x3923[65],this[_0x3923[66]][_0x3923[55]](this));ami[_0x3923[57]](_0x3923[67],this[_0x3923[68]][_0x3923[55]](this));ami[_0x3923[57]](_0x3923[69],this[_0x3923[70]][_0x3923[55]](this));ami[_0x3923[57]](_0x3923[71],this[_0x3923[72]][_0x3923[55]](this));ami[_0x3923[57]](_0x3923[73],this[_0x3923[74]][_0x3923[55]](this));this[_0x3923[75]]();this[_0x3923[76]]()}function isNotNull(_0x752fx22){return _0x752fx22!== null&&  !_[_0x3923[77]](_0x752fx22)}function checkIsLoggedIn(_0x752fx24,_0x752fx25){return function(){if(_0x752fx25<= 0){_0x752fx24[_0x3923[78]]= _0x3923[79];throw _0x752fx24[_0x3923[80]]+ _0x3923[81]}}}function isActive(_0x752fx27){return _0x752fx27}function checkIsActive(_0x752fx24,_0x752fx27){return function(){if(!isActive(_0x752fx27)){_0x752fx24[_0x3923[78]]= _0x3923[82];throw _0x752fx24[_0x3923[80]]+ _0x3923[83]}}}function checkInterval(_0x752fx24){return function(){if(!isNotNull(_0x752fx24.Interval)){_0x752fx24[_0x3923[78]]= _0x3923[84];throw _0x752fx24[_0x3923[80]]+ _0x3923[85]};if(!isNotNull(_0x752fx24[_0x3923[86]].Intervals)){_0x752fx24[_0x3923[78]]= _0x3923[84];throw _0x752fx24[_0x3923[80]]+ _0x3923[85]};if(!isNotNull(_[_0x3923[87]](_0x752fx24[_0x3923[86]].Intervals))){_0x752fx24[_0x3923[78]]= _0x3923[84];throw _0x752fx24[_0x3923[80]]+ _0x3923[85]}}}function msgResponse(_0x752fx2b,_0x752fx2c,_0x752fx2d){return {action:_0x752fx2b,response:_0x752fx2c,message:_0x752fx2d}}function myreject(_0x752fx2f){return function(_0x752fx30){return _0x752fx2f(msgResponse(_0x3923[88],_0x3923[89],JSON[_0x3923[90]](_0x752fx30)))}}function getSeconds(_0x752fx32,_0x752fx33){var _0x752fx34=moment(_0x752fx32)[_0x3923[91]](0);var _0x752fx35=moment(_0x752fx33)[_0x3923[91]](0);return _0x752fx34[_0x3923[93]](_0x752fx35,_0x3923[92])}function emit(_0x752fx37,_0x752fx38,_0x752fx22){io[_0x3923[95]](_0x752fx37)[_0x3923[94]](_0x752fx38,_0x752fx22)}function emitVoiceQueueSummary(_0x752fx22){if(_0x752fx22[_0x3923[96]]=== _0x3923[97]){emit(util[_0x3923[99]](_0x3923[98],_0x752fx22[_0x3923[80]]),_0x3923[100],_[_0x3923[102]](_0x752fx22,[_0x3923[101]]))}}function emitCampaignSummary(_0x752fx22){if(_0x752fx22[_0x3923[96]]=== _0x3923[103]){emit(util[_0x3923[99]](_0x3923[104],_0x752fx22[_0x3923[80]]),_0x3923[105],_0x752fx22)}}function checkGetDataPredictive(_0x752fx22){if(isNotNull(_0x752fx22)){if(!_[_0x3923[87]](_0x752fx22)){if(_0x752fx22[_0x3923[106]]> 0){if(!_[_0x3923[77]](_0x752fx22[_0x3923[107]])&& _0x752fx22[_0x3923[107]]> 0){return true}else {loggerPredictive[_0x3923[109]](_0x3923[108],JSON[_0x3923[90]](_0x752fx22))};if(!_[_0x3923[77]](_0x752fx22[_0x3923[110]])&& _0x752fx22[_0x3923[110]]> 0){return true}else {loggerPredictive[_0x3923[109]](_0x3923[111],JSON[_0x3923[90]](_0x752fx22))}}else {loggerPredictive[_0x3923[109]](_0x3923[112],JSON[_0x3923[90]](_0x752fx22))}}else {loggerPredictive[_0x3923[109]](_0x3923[113],JSON[_0x3923[90]](_0x752fx22))}}else {loggerPredictive[_0x3923[109]](_0x3923[114],JSON[_0x3923[90]](_0x752fx22))};return false}function mergeDataErlangB(_0x752fx3d){return function(_0x752fx3e){loggerPredictive[_0x3923[109]](_0x3923[115],JSON[_0x3923[90]](_0x752fx3e));_[_0x3923[116]](_0x752fx3d,_0x752fx3e)}}function getDiff(_0x752fx33){var _0x752fx34=moment()[_0x3923[91]](0);var _0x752fx35=moment(_0x752fx33)[_0x3923[91]](0);return _0x752fx34[_0x3923[93]](_0x752fx35,_0x3923[92])}function ifInterval(_0x752fx41,_0x752fx42){if(_[_0x3923[77]](_0x752fx42)){return false};if(getDiff(_0x752fx42)< _0x752fx41* 60){return true}else {return false}}function freeVariablesPredictive(_0x752fx3d){if(isNotNull(_0x752fx3d)){if(!_[_0x3923[77]](_0x752fx3d[_0x3923[50]])){_0x752fx3d[_0x3923[50]]= undefined;loggerPredictive[_0x3923[109]](_0x3923[117],_0x3923[50],_0x752fx3d[_0x3923[80]])};if(!_[_0x3923[77]](_0x752fx3d[_0x3923[49]])){_0x752fx3d[_0x3923[49]]= undefined;loggerPredictive[_0x3923[109]](_0x3923[117],_0x3923[49],_0x752fx3d[_0x3923[80]])};if(!_[_0x3923[77]](_0x752fx3d[_0x3923[101]])){clearInterval(_0x752fx3d[_0x3923[101]]);_0x752fx3d[_0x3923[101]]= undefined;loggerPredictive[_0x3923[109]](_0x3923[117],_0x3923[101],_0x752fx3d[_0x3923[80]])}}}function erlangb(_0x752fx45,_0x752fx46){if(_0x752fx46=== 0){return 0};var _0x752fx47=1;for(var _0x752fx48=1;_0x752fx48<= _0x752fx46;_0x752fx48+= 1){_0x752fx47= 1+ _0x752fx47* _0x752fx48/ _0x752fx45};return 1/ _0x752fx47}function isVoiceQueueOutbound(_0x752fx4a){return _0x752fx4a=== _0x3923[97]}function isNotPreview(_0x752fx4c){return _0x752fx4c!== _0x3923[38]}function isCampaignIvr(_0x752fx4a){return _0x752fx4a=== _0x3923[103]}function getCallerId(_0x752fx4f,_0x752fx50,_0x752fx51){if(!_[_0x3923[77]](_0x752fx51)&& _0x3923[118]===  typeof _0x752fx51){if(!_[_0x3923[77]](_0x752fx50)&& _0x3923[118]===  typeof _0x752fx50){return util[_0x3923[99]](_0x3923[119],_0x752fx50,_0x752fx51)};return util[_0x3923[99]](_0x3923[119],_0x752fx51,_0x752fx51)};if(!_[_0x3923[77]](_0x752fx4f)&& _0x3923[118]===  typeof _0x752fx4f){return _0x752fx4f};return _0x3923[120]}function loggerCatchQueueSummary(_0x752fx53,_0x752fx3d){return function(_0x752fx30){freeVariablesPredictive(_0x752fx3d);emitVoiceQueueSummary(_0x752fx3d);emitCampaignSummary(_0x752fx3d);loggerSyncQueueSummary[_0x3923[122]](_0x752fx53,util[_0x3923[121]](_0x752fx30,{showHidden:false,depth:null}))}}function loggerCatchPredictive(_0x752fx53,_0x752fx3d){return function(_0x752fx30){loggerPredictive[_0x3923[122]](_0x752fx53,JSON[_0x3923[90]](_0x752fx30));freeVariablesPredictive(_0x752fx3d)}}function loggerCatch(_0x752fx53){return function(_0x752fx30){logger[_0x3923[122]](_0x752fx53,util[_0x3923[121]](_0x752fx30,{showHidden:false,depth:null}))}}function checkContactEmpty(_0x752fx3e){return _0x752fx3e&&  !_[_0x3923[77]](_0x752fx3e)&& (_0x752fx3e[_0x3923[123]]> 0)}function decremetOriginate(_0x752fx22){if(!_[_0x3923[77]](_0x752fx22)&& _0x752fx22!== null){if(_0x752fx22[_0x3923[125]](_0x3923[124])){if(_0x752fx22[_0x3923[124]]> 0){_0x752fx22[_0x3923[124]]-= 1}else {logger[_0x3923[122]](_0x3923[126])}}}else {logger[_0x3923[122]](_0x3923[127])}}function checkContactLowerLimitOriginate(_0x752fx3d,_0x752fx59,_0x752fx5a){if(_0x752fx59> _0x752fx5a){for(var _0x752fx5b=0;_0x752fx5b< _0x752fx59- _0x752fx5a;_0x752fx5b+= 1){decremetOriginate(_0x752fx3d)}}}function loggerGetContactDialer(_0x752fx53,_0x752fx3d,_0x752fx5d){return function(_0x752fx30){checkContactLowerLimitOriginate(_0x752fx3d,_0x752fx5d,0);logger[_0x3923[122]](_0x752fx53,util[_0x3923[121]](_0x752fx30,{showHidden:false,depth:null}))}}function sendMessageReschedule(_0x752fx24){return function(_0x752fx5f){if(isNotNull(_0x752fx5f)&& isNotNull(_0x752fx5f[0])){if(_0x752fx5f[0][_0x3923[128]]> 0){_0x752fx24[_0x3923[78]]= _0x3923[129];logger[_0x3923[109]](_0x3923[130]+ _0x752fx24[_0x3923[80]],_0x752fx5f[0][_0x3923[128]],_0x3923[131])}else {_0x752fx24[_0x3923[78]]= _0x3923[132];logger[_0x3923[109]](_0x3923[133]+ _0x752fx24[_0x3923[80]])}}}}function notSendMessagesQueue(_0x752fx3d){if(_0x752fx3d[_0x3923[134]]){freeVariablesPredictive(_0x752fx3d);if(_0x752fx3d[_0x3923[124]]=== 0&& _0x752fx3d[_0x3923[135]]=== 0&& _0x752fx3d[_0x3923[136]]=== 0&& (_0x752fx3d[_0x3923[137]]|| 0)=== 0){_0x752fx3d[_0x3923[134]]= false;_0x752fx3d[_0x3923[138]]= 0;_0x752fx3d[_0x3923[78]]= _0x3923[82];loggerSyncQueueSummary[_0x3923[122]](_0x3923[139],_0x752fx3d[_0x3923[80]],_0x3923[140])}else {_0x752fx3d[_0x3923[78]]= _0x3923[141];loggerSyncQueueSummary[_0x3923[122]](_0x3923[139],_0x752fx3d[_0x3923[80]],_0x3923[142])};emitVoiceQueueSummary(_0x752fx3d)}}function notSendMessagesCampaign(_0x752fx62){if(_0x752fx62[_0x3923[134]]){if(_0x752fx62[_0x3923[124]]=== 0){_0x752fx62[_0x3923[134]]= false;_0x752fx62[_0x3923[78]]= _0x3923[82];loggerSyncQueueSummary[_0x3923[122]](_0x3923[143],_0x752fx62[_0x3923[80]],_0x3923[140])}else {_0x752fx62[_0x3923[78]]= _0x3923[141];loggerSyncQueueSummary[_0x3923[122]](_0x3923[143],_0x752fx62[_0x3923[80]],_0x3923[142])};emitCampaignSummary(_0x752fx62)}}function createObjHistory(_0x752fx3d,_0x752fx64,_0x752fx2d,_0x752fx65,_0x752fx66){_0x752fx3d[_0x3923[78]]= _0x752fx2d;var _0x752fx2b= new Action(_0x752fx3d,_0x752fx64);var _0x752fx67= new History(_0x752fx2b);_0x752fx67[_0x3923[144]]= _0x752fx65;_0x752fx67[_0x3923[145]]= _0x752fx66;_0x752fx67[_0x3923[146]]= _0x752fx2b[_0x3923[147]];return _0x752fx67}Dialer[_0x3923[34]][_0x3923[76]]= function(){var _0x752fx68=this;setInterval(function(){_0x752fx68[_0x3923[149]](_0x752fx68[_0x3923[47]],_0x3923[148]);_0x752fx68[_0x3923[149]](_0x752fx68[_0x3923[45]],_0x3923[150])},13000)};Dialer[_0x3923[34]][_0x3923[149]]= function(_0x752fx69,_0x752fx53){var _0x752fx68=this;for(var _0x752fx6a in _0x752fx69){if(_0x752fx69[_0x3923[125]](_0x752fx6a)){this[_0x3923[37]][_0x3923[33]](function(){if(!_[_0x3923[151]](_0x752fx69[_0x752fx6a])){return ami.Action({action:_0x3923[158],channel:_0x752fx69[_0x752fx6a][_0x3923[159]]})[_0x3923[157]](function(_0x752fx30){if(_0x752fx30[_0x3923[78]]=== _0x3923[152]){setTimeout(function(){if(_0x752fx69[_0x752fx6a]&& _0x752fx69[_0x752fx6a][_0x3923[96]]!== _0x3923[103]){_0x752fx68[_0x3923[154]](_0x752fx68[_0x3923[39]][_0x752fx69[_0x752fx6a][_0x3923[153]]]);logger[_0x3923[122]](_0x3923[155],_0x752fx53,_0x752fx6a,_0x752fx69[_0x752fx6a][_0x3923[153]]);delete _0x752fx69[_0x752fx6a]};if(_0x752fx69[_0x752fx6a]&& _0x752fx69[_0x752fx6a][_0x3923[96]]=== _0x3923[103]){_0x752fx68[_0x3923[154]](_0x752fx68[_0x3923[40]][_0x752fx69[_0x752fx6a][_0x3923[153]]]);logger[_0x3923[122]](_0x3923[156],_0x752fx53,_0x752fx6a,_0x752fx69[_0x752fx6a][_0x3923[153]]);delete _0x752fx69[_0x752fx6a]}},9000)}})}})}}};Dialer[_0x3923[34]][_0x3923[160]]= function(_0x752fx6b){return BPromise[_0x3923[163]]()[_0x3923[162]](cmHopper[_0x3923[160]](_0x752fx6b))[_0x3923[157]](loggerCatch(_0x3923[161]))};Dialer[_0x3923[34]][_0x3923[164]]= function(_0x752fx64){return BPromise[_0x3923[163]]()[_0x3923[162]](cmHopperBlack[_0x3923[164]](_0x752fx64))[_0x3923[157]](loggerCatch(_0x3923[165]))};Dialer[_0x3923[34]][_0x3923[166]]= function(_0x752fx64){return BPromise[_0x3923[163]]()[_0x3923[162]](cmHopperBlack[_0x3923[166]](_0x752fx64))[_0x3923[157]](loggerCatch(_0x3923[167]))};Dialer[_0x3923[34]][_0x3923[168]]= function(_0x752fx6c){return BPromise[_0x3923[163]]()[_0x3923[162]](cmHopperHistory[_0x3923[170]](_0x752fx6c))[_0x3923[157]](loggerCatch(_0x3923[169]))};Dialer[_0x3923[34]][_0x3923[171]]= function(_0x752fx6d){return BPromise[_0x3923[163]]()[_0x3923[162]](cmHopper[_0x3923[171]](_0x752fx6d))[_0x3923[157]](loggerCatch(_0x3923[172]))};Dialer[_0x3923[34]][_0x3923[173]]= function(_0x752fx6e,_0x752fx6f,_0x752fx59,_0x752fx70){return BPromise[_0x3923[163]]()[_0x3923[162]](cmHopper[_0x3923[173]](_0x752fx6e,_0x752fx6f,_0x752fx59,_0x752fx70))[_0x3923[157]](loggerCatch(_0x3923[174]))};Dialer[_0x3923[34]][_0x3923[175]]= function(_0x752fx71,_0x752fx59,_0x752fx70){return BPromise[_0x3923[163]]()[_0x3923[162]](cmHopper[_0x3923[175]](_0x752fx71,_0x752fx59,_0x752fx70))[_0x3923[157]](loggerCatch(_0x3923[174]))};Dialer[_0x3923[34]][_0x3923[176]]= function(_0x752fx6b){return BPromise[_0x3923[163]]()[_0x3923[162]](voiceQueueRt[_0x3923[176]](_0x752fx6b))[_0x3923[157]](loggerCatch(_0x3923[177]))};Dialer[_0x3923[34]][_0x3923[178]]= function(_0x752fx6d){return BPromise[_0x3923[163]]()[_0x3923[162]](cmHopper[_0x3923[178]](_0x752fx6d))[_0x3923[157]](loggerCatch(_0x3923[179]))};Dialer[_0x3923[34]][_0x3923[180]]= function(_0x752fx6d){return BPromise[_0x3923[163]]()[_0x3923[162]](cmHopperHistory[_0x3923[180]](_0x752fx6d))[_0x3923[157]](loggerCatch(_0x3923[181]))};Dialer[_0x3923[34]][_0x3923[154]]= function(_0x752fx22){if(!_[_0x3923[77]](_0x752fx22)&& _0x752fx22!== null){if(_0x752fx22[_0x3923[125]](_0x3923[124])){if(_0x752fx22[_0x3923[124]]> 0){_0x752fx22[_0x3923[124]]-= 1}else {logger[_0x3923[122]](_0x3923[182])}}}else {logger[_0x3923[122]](_0x3923[183])}};Dialer[_0x3923[34]][_0x3923[184]]= function(_0x752fx53,_0x752fx24){var _0x752fx68=this;return function(_0x752fx30){_0x752fx68[_0x3923[154]](_0x752fx24);logger[_0x3923[122]](_0x752fx53,util[_0x3923[121]](_0x752fx30,{showHidden:false,depth:null}))}};Dialer[_0x3923[34]][_0x3923[185]]= function(_0x752fx53,_0x752fx24,_0x752fx64){var _0x752fx72={state:25,statedesc:_0x3923[186]};this[_0x3923[154]](_0x752fx24);this[_0x3923[195]](_[_0x3923[116]](_0x752fx72,_[_0x3923[192]](_0x752fx64,[_0x3923[187],_0x3923[188],_0x3923[189],_0x3923[190],_0x3923[191]])),_0x3923[193],_0x3923[194]);logger[_0x3923[122]](_0x752fx53)};Dialer[_0x3923[34]][_0x3923[196]]= function(_0x752fx73){return _0x752fx73=== _0x3923[197]};Dialer[_0x3923[34]][_0x3923[198]]= function(_0x752fx74){return !_[_0x3923[77]](_0x752fx74)&& _0x752fx74 &&  !_[_0x3923[77]](_0x752fx74[_0x3923[80]]) &&  !_[_0x3923[77]](_0x752fx74[_0x3923[199]]) && _0x752fx74[_0x3923[199]] && (this[_0x3923[42]][util[_0x3923[99]](_0x3923[200],_0x752fx74[_0x3923[80]])][_0x3923[158]]=== _0x3923[201]|| this[_0x3923[42]][util[_0x3923[99]](_0x3923[200],_0x752fx74[_0x3923[80]])][_0x3923[158]]=== _0x3923[202])};Dialer[_0x3923[34]][_0x3923[195]]= function(_0x752fx22,_0x752fx75,_0x752fx76){this[_0x3923[180]](_0x752fx22)[_0x3923[157]](loggerCatch(_0x752fx75));this[_0x3923[178]](_0x752fx22)[_0x3923[157]](loggerCatch(_0x752fx76))};Dialer[_0x3923[34]][_0x3923[70]]= function(_0x752fx38){var _0x752fx6a=this[_0x3923[47]][_0x752fx38[_0x3923[203]]];var _0x752fx77;if(!_[_0x3923[151]](_0x752fx38)&&  !_[_0x3923[151]](_0x752fx38[_0x3923[204]]) &&  !_[_0x3923[151]](_0x752fx38[_0x3923[204]][_0x3923[205]]) && _0x752fx38[_0x3923[206]]=== _0x3923[207] && _0x752fx6a){if(_0x752fx6a[_0x3923[96]]!== _0x3923[103]&& this[_0x3923[39]][_0x752fx6a[_0x3923[153]]][_0x3923[208]]&& _0x752fx38[_0x3923[209]]=== _0x3923[210]){delete this[_0x3923[47]][_0x752fx38[_0x3923[203]]];this[_0x3923[154]](this[_0x3923[39]][_0x752fx6a[_0x3923[153]]]);this[_0x3923[39]][_0x752fx6a[_0x3923[153]]][_0x3923[211]]+= 1;this[_0x3923[39]][_0x752fx6a[_0x3923[153]]][_0x3923[212]]+= 1;_0x752fx77=  new Hangup(_0x752fx6a,_0x752fx38);_0x752fx77[_0x3923[144]]= 18;_0x752fx77[_0x3923[145]]= _0x3923[213];_0x752fx77[_0x3923[214]]= _0x3923[215];this[_0x3923[195]](_0x752fx77,_0x3923[216],_0x3923[217])};if(_0x752fx6a[_0x3923[96]]!== _0x3923[103]&& this[_0x3923[39]][_0x752fx6a[_0x3923[153]]][_0x3923[208]]&& _0x752fx38[_0x3923[209]]=== _0x3923[218]){delete this[_0x3923[47]][_0x752fx38[_0x3923[203]]];this[_0x3923[154]](this[_0x3923[39]][_0x752fx6a[_0x3923[153]]]);this[_0x3923[39]][_0x752fx6a[_0x3923[153]]][_0x3923[211]]+= 1;this[_0x3923[39]][_0x752fx6a[_0x3923[153]]][_0x3923[212]]+= 1;_0x752fx77=  new Hangup(_0x752fx6a,_0x752fx38);_0x752fx77[_0x3923[144]]= 19;_0x752fx77[_0x3923[145]]= _0x3923[219];_0x752fx77[_0x3923[214]]= _0x3923[215];_0x752fx77[_0x3923[220]]= true;this[_0x3923[195]](_0x752fx77,_0x3923[221],_0x3923[222])};if(_0x752fx6a[_0x3923[96]]=== _0x3923[103]&& this[_0x3923[40]][_0x752fx6a[_0x3923[153]]][_0x3923[208]]&& _0x752fx38[_0x3923[209]]=== _0x3923[210]){delete this[_0x3923[47]][_0x752fx38[_0x3923[203]]];this[_0x3923[154]](this[_0x3923[40]][_0x752fx6a[_0x3923[153]]]);_0x752fx77=  new Hangup(_0x752fx6a,_0x752fx38);_0x752fx77[_0x3923[144]]= 18;_0x752fx77[_0x3923[145]]= _0x3923[213];_0x752fx77[_0x3923[214]]= _0x3923[215];this[_0x3923[195]](_0x752fx77,_0x3923[223],_0x3923[224])};if(_0x752fx6a[_0x3923[96]]=== _0x3923[103]&& this[_0x3923[40]][_0x752fx6a[_0x3923[153]]][_0x3923[208]]&& _0x752fx38[_0x3923[209]]=== _0x3923[218]){delete this[_0x3923[47]][_0x752fx38[_0x3923[203]]];this[_0x3923[154]](this[_0x3923[40]][_0x752fx6a[_0x3923[153]]]);_0x752fx77=  new Hangup(_0x752fx6a,_0x752fx38);_0x752fx77[_0x3923[144]]= 19;_0x752fx77[_0x3923[145]]= _0x3923[219];_0x752fx77[_0x3923[214]]= _0x3923[215];_0x752fx77[_0x3923[220]]= true;this[_0x3923[195]](_0x752fx77,_0x3923[225],_0x3923[226])}}};Dialer[_0x3923[34]][_0x3923[66]]= function(_0x752fx38){var _0x752fx6a=this[_0x3923[47]][_0x752fx38[_0x3923[203]]];var _0x752fx68=this;var _0x752fx77;if(_0x752fx6a&& _0x752fx6a[_0x3923[96]]=== _0x3923[103]){delete this[_0x3923[47]][_0x752fx38[_0x3923[203]]];this[_0x3923[154]](this[_0x3923[40]][_0x752fx6a[_0x3923[153]]]);this[_0x3923[40]][_0x752fx6a[_0x3923[153]]][_0x3923[227]]+= 1;_0x752fx77=  new Hangup(_0x752fx6a,_0x752fx38);this[_0x3923[180]](_0x752fx77)[_0x3923[157]](loggerCatch(_0x3923[228]));this[_0x3923[178]](_0x752fx77)[_0x3923[157]](loggerCatch(_0x3923[229]))};if(_0x752fx6a&& _0x752fx6a[_0x3923[96]]!== _0x3923[103]&& isNotNull(this[_0x3923[39]][_0x752fx6a[_0x3923[153]]][_0x3923[230]])){delete this[_0x3923[47]][_0x752fx38[_0x3923[203]]];this[_0x3923[154]](this[_0x3923[39]][_0x752fx6a[_0x3923[153]]]);this[_0x3923[39]][_0x752fx6a[_0x3923[153]]][_0x3923[211]]+= 1;this[_0x3923[39]][_0x752fx6a[_0x3923[153]]][_0x3923[212]]+= 1;_0x752fx77=  new Hangup(_0x752fx6a,_0x752fx38);_0x752fx77[_0x3923[144]]= 16;_0x752fx77[_0x3923[145]]= _0x3923[231];_0x752fx77[_0x3923[214]]= _0x3923[232];this[_0x3923[180]](_0x752fx77)[_0x3923[157]](loggerCatch(_0x3923[228]));this[_0x3923[178]](_0x752fx77)[_0x3923[157]](loggerCatch(_0x3923[229]))};if(_0x752fx6a&& _0x752fx6a[_0x3923[96]]!== _0x3923[103]&&  !isNotNull(this[_0x3923[39]][_0x752fx6a[_0x3923[153]]][_0x3923[230]])){delete this[_0x3923[47]][_0x752fx38[_0x3923[203]]];this[_0x3923[154]](this[_0x3923[39]][_0x752fx6a[_0x3923[153]]]);this[_0x3923[39]][_0x752fx6a[_0x3923[153]]][_0x3923[233]]+= 1;_0x752fx77=  new Hangup(_0x752fx6a,_0x752fx38);_0x752fx77[_0x3923[144]]= 12;_0x752fx77[_0x3923[145]]= _0x752fx38[_0x3923[234]];_0x752fx77[_0x3923[214]]= _0x3923[235];this[_0x3923[180]](_0x752fx77)[_0x3923[157]](loggerCatch(_0x3923[228]));this[_0x3923[178]](_0x752fx77)[_0x3923[157]](loggerCatch(_0x3923[229]))}};Dialer[_0x3923[34]][_0x3923[63]]= function(_0x752fx38){var _0x752fx6a=this[_0x3923[47]][_0x752fx38[_0x3923[203]]];var _0x752fx68=this;if(this[_0x3923[39]][_0x752fx38[_0x3923[153]]]){if(_0x752fx6a&& _0x752fx6a[_0x3923[96]]!== _0x3923[103]){delete this[_0x3923[47]][_0x752fx38[_0x3923[203]]];this[_0x3923[39]][_0x752fx38[_0x3923[153]]][_0x3923[211]]+= 1;var _0x752fx78= new AgentComplete(_0x752fx6a,_0x752fx38);if(_0x752fx38[_0x3923[236]]=== _0x3923[237]){_0x752fx78[_0x3923[238]]= (this[_0x3923[39]][_0x752fx38[_0x3923[153]]][_0x3923[239]]&& this[_0x3923[39]][_0x752fx38[_0x3923[153]]][_0x3923[240]])?moment()[_0x3923[99]](_0x3923[241]):undefined};this[_0x3923[180]](_0x752fx78)[_0x3923[157]](loggerCatch(_0x3923[242]));this[_0x3923[178]](_0x752fx78)[_0x3923[157]](loggerCatch(_0x3923[243]))}}};Dialer[_0x3923[34]][_0x3923[56]]= function(_0x752fx38){if(this[_0x3923[39]][_0x752fx38[_0x3923[153]]]){if(this[_0x3923[47]][_0x752fx38[_0x3923[203]]]&& this[_0x3923[47]][_0x752fx38[_0x3923[203]]][_0x3923[96]]!== _0x3923[103]){this[_0x3923[154]](this[_0x3923[39]][_0x752fx38[_0x3923[153]]]);this[_0x3923[47]][_0x752fx38[_0x3923[203]]][_0x3923[244]]= moment()[_0x3923[99]](_0x3923[241])}}};Dialer[_0x3923[34]][_0x3923[245]]= function(_0x752fx79){this[_0x3923[180]](_0x752fx79)[_0x3923[157]](loggerCatch(_0x3923[242]));this[_0x3923[178]](_0x752fx79)[_0x3923[157]](loggerCatch(_0x3923[246]))};Dialer[_0x3923[34]][_0x3923[59]]= function(_0x752fx38){var _0x752fx6a=this[_0x3923[47]][_0x752fx38[_0x3923[203]]];var _0x752fx68=this;if(this[_0x3923[39]][_0x752fx38[_0x3923[153]]]){if(_0x752fx6a&& _0x752fx6a[_0x3923[96]]!== _0x3923[103]){delete this[_0x3923[47]][_0x752fx38[_0x3923[203]]];this[_0x3923[154]](this[_0x3923[39]][_0x752fx38[_0x3923[153]]]);_0x752fx6a[_0x3923[247]]= moment()[_0x3923[99]](_0x3923[241]);var _0x752fx79= new QueueCallerAbandon(_0x752fx6a,_0x752fx38);if(getSeconds(_0x752fx6a[_0x3923[247]],_0x752fx6a[_0x3923[248]])>= _0x752fx6a[_0x3923[249]]){this[_0x3923[39]][_0x752fx38[_0x3923[153]]][_0x3923[250]]+= 1;this[_0x3923[39]][_0x752fx38[_0x3923[153]]][_0x3923[251]]+= 1;this[_0x3923[39]][_0x752fx38[_0x3923[153]]][_0x3923[252]]+= 1;_0x752fx79[_0x3923[144]]= 10;_0x752fx79[_0x3923[145]]= _0x3923[253];_0x752fx79[_0x3923[254]]= _0x3923[255];_0x752fx79[_0x3923[238]]= this[_0x3923[39]][_0x752fx38[_0x3923[153]]][_0x3923[239]]?moment()[_0x3923[99]](_0x3923[241]):undefined;this[_0x3923[245]](_0x752fx79)}else {this[_0x3923[39]][_0x752fx38[_0x3923[153]]][_0x3923[256]]+= 1;this[_0x3923[39]][_0x752fx38[_0x3923[153]]][_0x3923[257]]+= 1;_0x752fx79[_0x3923[144]]= 11;_0x752fx79[_0x3923[145]]= _0x3923[258];_0x752fx79[_0x3923[254]]= _0x3923[259];this[_0x3923[245]](_0x752fx79)}}}};Dialer[_0x3923[34]][_0x3923[68]]= function(_0x752fx38){if(this[_0x3923[45]][_0x752fx38[_0x3923[203]]]){this[_0x3923[45]][_0x752fx38[_0x3923[203]]][_0x3923[159]]= _0x752fx38[_0x3923[159]]};if(this[_0x3923[47]][_0x752fx38[_0x3923[203]]]){this[_0x3923[47]][_0x752fx38[_0x3923[203]]][_0x3923[159]]= _0x752fx38[_0x3923[159]]}};Dialer[_0x3923[34]][_0x3923[72]]= function(_0x752fx38){if(strategy[this[_0x3923[39]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]][_0x3923[260]]]=== _0x3923[32]){if(this[_0x3923[45]][_0x752fx38[_0x3923[261]]]&& _[_0x3923[151]](this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[262]])&& _0x752fx38[_0x3923[158]]=== _0x3923[263]&& _0x752fx38[_0x3923[264]]=== _0x3923[265]){if(this[_0x3923[41]][_0x752fx38[_0x3923[266]]]){if(!this[_0x3923[41]][_0x752fx38[_0x3923[266]]][_0x3923[262]]){this[_0x3923[41]][_0x752fx38[_0x3923[266]]][_0x3923[262]]= true;this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[262]]= true;this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[266]]= _0x752fx38[_0x3923[266]]}}}}else {if((strategy[this[_0x3923[39]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]][_0x3923[260]]]|| _0x3923[31])=== _0x3923[31]){if(this[_0x3923[45]][_0x752fx38[_0x3923[261]]]){if(this[_0x3923[41]][_0x752fx38[_0x3923[266]]]){this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[266]]= _0x752fx38[_0x3923[266]];if(_[_0x3923[151]](this[_0x3923[52]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]])){this[_0x3923[52]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]]= []};this[_0x3923[52]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]][_0x3923[268]](_[_0x3923[116]](_[_0x3923[192]](this[_0x3923[45]][_0x752fx38[_0x3923[261]]],[_0x3923[267],_0x3923[266]]),{status:_0x752fx38[_0x3923[158]],paused:_0x752fx38[_0x3923[264]]}))}}}}};function unlockQueueStatus(_0x752fx7b){setTimeout(function(){if(_[_0x3923[77]](_0x752fx7b[_0x3923[269]])){loggerBooked[_0x3923[122]](_0x3923[270])};_0x752fx7b[_0x3923[269]]= true},499)}Dialer[_0x3923[34]][_0x3923[74]]= function(_0x752fx38){var _0x752fx68=this;var _0x752fx7b=_0x752fx68[_0x3923[39]][_0x752fx68[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]];if(strategy[this[_0x3923[39]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]][_0x3923[260]]]=== _0x3923[32]){if(this[_0x3923[45]][_0x752fx38[_0x3923[261]]]&& this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[266]]){this[_0x3923[38]][_0x3923[272]](this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[267]],this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[266]])[_0x3923[157]](function(_0x752fx30){logger[_0x3923[122]](_0x3923[271],util[_0x3923[121]](_0x752fx30,{showHidden:false,depth:null}))})[_0x3923[36]](function(){_0x752fx68[_0x3923[154]](_0x752fx68[_0x3923[39]][_0x752fx68[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]]);_0x752fx68[_0x3923[41]][_0x752fx68[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[266]]][_0x3923[262]]= false;delete _0x752fx68[_0x3923[45]][_0x752fx38[_0x3923[261]]];unlockQueueStatus(_0x752fx7b)})}else {this[_0x3923[154]](this[_0x3923[39]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]]);this[_0x3923[171]]({active:false,ContactId:this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[187]],ListId:this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[188]],VoiceQueueId:this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[190]]|| undefined,CampaignId:this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[191]]|| undefined})[_0x3923[157]](loggerCatch(_0x3923[273]));delete this[_0x3923[45]][_0x752fx38[_0x3923[261]]];unlockQueueStatus(_0x752fx7b)}}else {if((strategy[this[_0x3923[39]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]][_0x3923[260]]]|| _0x3923[31])=== _0x3923[31]){var _0x752fx7c;if(this[_0x3923[45]][_0x752fx38[_0x3923[261]]]&&  !_[_0x3923[87]](this[_0x3923[52]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]])){if(this[_0x3923[53]][_0x752fx68[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]]){this[_0x3923[53]][_0x752fx68[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]]= this[_0x3923[53]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]]?this[_0x3923[53]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]]:this[_0x3923[52]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]]?this[_0x3923[52]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]][_0x3923[274]]|| 0:0};this[_0x3923[52]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]][_0x3923[274]]= this[_0x3923[53]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]];for(var _0x752fx5b=0;_0x752fx5b< this[_0x3923[52]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]][_0x3923[123]];_0x752fx5b+= 1){_0x752fx7c= rr(this[_0x3923[52]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]]);this[_0x3923[53]][_0x752fx68[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]]= this[_0x3923[52]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]][_0x3923[274]];if(_0x752fx7c[_0x3923[158]]=== _0x3923[263]&& _0x752fx7c[_0x3923[264]]=== _0x3923[265]){break}};if(!_[_0x3923[151]](_0x752fx7c)){this[_0x3923[41]][_0x752fx7c[_0x3923[266]]][_0x3923[275]]= _[_0x3923[77]](this[_0x3923[41]][_0x752fx7c[_0x3923[266]]][_0x3923[275]])?true:this[_0x3923[41]][_0x752fx7c[_0x3923[266]]][_0x3923[275]]};if(!_[_0x3923[151]](_0x752fx7c)&& _0x752fx7c[_0x3923[158]]=== _0x3923[263] && _0x752fx7c[_0x3923[264]]=== _0x3923[265] && this[_0x3923[41]][_0x752fx7c[_0x3923[266]]][_0x3923[275]]){this[_0x3923[41]][_0x752fx7c[_0x3923[266]]][_0x3923[275]]= false;this[_0x3923[52]][_0x752fx68[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]]= [];this[_0x3923[38]][_0x3923[272]](_0x752fx7c[_0x3923[267]],_0x752fx7c[_0x3923[266]])[_0x3923[157]](function(_0x752fx30){logger[_0x3923[122]](_0x3923[271],util[_0x3923[121]](_0x752fx30,{showHidden:false,depth:null}))})[_0x3923[36]](function(){_0x752fx68[_0x3923[154]](_0x752fx68[_0x3923[39]][_0x752fx68[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]]);setTimeout(function(){_0x752fx68[_0x3923[41]][_0x752fx7c[_0x3923[266]]][_0x3923[275]]= true},199);delete _0x752fx68[_0x3923[45]][_0x752fx38[_0x3923[261]]];unlockQueueStatus(_0x752fx7b)})}else {loggerBooked[_0x3923[109]](_0x3923[276]);this[_0x3923[154]](this[_0x3923[39]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]]);this[_0x3923[171]]({active:false,ContactId:this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[187]],ListId:this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[188]],VoiceQueueId:this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[190]]|| undefined,CampaignId:this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[191]]|| undefined})[_0x3923[157]](loggerCatch(_0x3923[273]));delete this[_0x3923[45]][_0x752fx38[_0x3923[261]]];unlockQueueStatus(_0x752fx7b)}}else {loggerBooked[_0x3923[109]](_0x3923[277]);this[_0x3923[154]](this[_0x3923[39]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]]);this[_0x3923[171]]({active:false,ContactId:this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[187]],ListId:this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[188]],VoiceQueueId:this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[190]]|| undefined,CampaignId:this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[191]]|| undefined})[_0x3923[157]](loggerCatch(_0x3923[278]));delete this[_0x3923[45]][_0x752fx38[_0x3923[261]]];unlockQueueStatus(_0x752fx7b)}}else {loggerBooked[_0x3923[109]](_0x3923[279]);this[_0x3923[154]](this[_0x3923[39]][this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[153]]]);this[_0x3923[171]]({active:false,ContactId:this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[187]],ListId:this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[188]],VoiceQueueId:this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[190]]|| undefined,CampaignId:this[_0x3923[45]][_0x752fx38[_0x3923[261]]][_0x3923[191]]|| undefined})[_0x3923[157]](loggerCatch(_0x3923[280]));delete this[_0x3923[45]][_0x752fx38[_0x3923[261]]];unlockQueueStatus(_0x752fx7b)}}};Dialer[_0x3923[34]][_0x3923[75]]= function(){var _0x752fx68=this;setInterval(function(){_0x752fx68[_0x3923[281]]()},1000)};Dialer[_0x3923[34]][_0x3923[282]]= function(_0x752fx24){var _0x752fx68=this;return function(){if(!_0x752fx68[_0x3923[198]](_0x752fx24.Trunk)){if(!_0x752fx68[_0x3923[198]](_0x752fx24.TrunkBackup)){_0x752fx24[_0x3923[78]]= _0x3923[283];throw _0x752fx24[_0x3923[80]]+ _0x3923[284]}}}};Dialer[_0x3923[34]][_0x3923[285]]= function(_0x752fx7d,_0x752fx7e,_0x752fx50,_0x752fx3d){var _0x752fx68=this;return function(){var _0x752fx7f=true;return _0x752fx68[_0x3923[286]](_0x752fx7d,_0x752fx7e,_0x752fx50,_0x752fx3d,_0x752fx7f)}};Dialer[_0x3923[34]][_0x3923[287]]= function(_0x752fx80,_0x752fx7e,_0x752fx50,_0x752fx3d){var _0x752fx68=this;return function(){var _0x752fx7f=false;return _0x752fx68[_0x3923[286]](_0x752fx80.Intervals,_0x752fx7e,_0x752fx50,_0x752fx3d,_0x752fx7f)}};Dialer[_0x3923[34]][_0x3923[286]]= function(_0x752fx7d,_0x752fx7e,_0x752fx50,_0x752fx3d,_0x752fx7f){var _0x752fx81=[];return  new BPromise(function(_0x752fx82,_0x752fx2f){if(!isNotNull(_0x752fx7d)){_0x752fx3d[_0x3923[78]]= _0x3923[84];return _0x752fx2f(msgResponse(_0x3923[286],_0x3923[288],_0x752fx50+ _0x3923[289]))};if(_[_0x3923[87]](_0x752fx7d)){_0x752fx3d[_0x3923[78]]= _0x3923[290];return _0x752fx2f(msgResponse(_0x3923[286],_0x3923[288],_0x752fx50+ _0x3923[291]))};if(_0x752fx7e&& _[_0x3923[77]](config[_0x3923[292]][_0x752fx7e])){_0x752fx3d[_0x3923[78]]= _0x3923[293];return _0x752fx2f(msgResponse(_0x3923[286],_0x3923[288],_0x752fx50+ _0x3923[294]+ _0x752fx7e))};if(_[_0x3923[295]](_0x752fx7d)){for(var _0x752fx5b=0;_0x752fx5b< _0x752fx7d[_0x3923[123]];_0x752fx5b+= 1){_0x752fx81[_0x3923[268]](ami.Action({action:_0x3923[299],command:util[_0x3923[99]](_0x3923[300],_0x752fx7d[_0x752fx5b][_0x3923[301]],!_[_0x3923[77]](config[_0x3923[292]][_0x752fx7e])?_0x752fx7e:_0x3923[302])})[_0x3923[162]](function(_0x752fx3e){return (_0x752fx3e[_0x3923[298]][_0x3923[297]](_0x3923[296])>= 0)?true:false})[_0x3923[157]](myreject(_0x752fx2f)))}}else {_0x752fx81[_0x3923[268]](ami.Action({action:_0x3923[299],command:util[_0x3923[99]](_0x3923[300],_0x752fx7d,!_[_0x3923[77]](config[_0x3923[292]][_0x752fx7e])?_0x752fx7e:_0x3923[302])})[_0x3923[162]](function(_0x752fx3e){return (_0x752fx3e[_0x3923[298]][_0x3923[297]](_0x3923[296])>= 0)?true:false})[_0x3923[157]](myreject(_0x752fx2f)))};BPromise[_0x3923[311]](_0x752fx81)[_0x3923[162]](function(_0x752fx83){var _0x752fx84=_[_0x3923[303]](_0x752fx83);if(_0x752fx84){return _0x752fx82(_0x752fx84)}else {_0x752fx3d[_0x3923[78]]= _0x752fx7f?_0x3923[304]:_0x3923[305];return _0x752fx2f(msgResponse(_0x3923[306],_0x3923[288],_0x3923[307]+ _0x752fx7f+ _0x3923[308]+ _0x752fx50+ _0x3923[309]+ util[_0x3923[121]](_0x752fx7d,{showHidden:false,depth:null})+ _0x3923[310]+ _0x752fx7e))}})[_0x3923[157]](function(_0x752fx30){return _0x752fx2f(msgResponse(_0x3923[286],_0x3923[288],JSON[_0x3923[90]](_0x752fx30)))})})};Dialer[_0x3923[34]][_0x3923[312]]= function(_0x752fx3d){var _0x752fx68=this;return function(){switch(_0x752fx3d[_0x3923[319]]){case _0x3923[314]:freeVariablesPredictive(_0x752fx3d);_0x752fx68[_0x3923[313]](_0x752fx3d,1);break;case _0x3923[316]:freeVariablesPredictive(_0x752fx3d);_0x752fx68[_0x3923[313]](_0x752fx3d,_0x752fx3d[_0x3923[315]]);break;case _0x3923[10]:_0x752fx68[_0x3923[10]](_0x752fx3d);break;case _0x3923[9]:freeVariablesPredictive(_0x752fx3d);_0x752fx68[_0x3923[313]](_0x752fx3d,1);break;default:freeVariablesPredictive(_0x752fx3d);logger[_0x3923[122]](_0x3923[317],_0x752fx3d[_0x3923[80]],_0x3923[318])}}};Dialer[_0x3923[34]][_0x3923[320]]= function(_0x752fx62){var _0x752fx68=this;return function(){_0x752fx68[_0x3923[321]](_0x752fx62)}};Dialer[_0x3923[34]][_0x3923[12]]= function(_0x752fx3d){var _0x752fx68=this;if(isNotPreview(_0x752fx3d[_0x3923[319]])){if(isVoiceQueueOutbound(_0x752fx3d[_0x3923[96]])&& isActive(_0x752fx3d[_0x3923[322]])){_0x752fx3d[_0x3923[134]]= true;BPromise[_0x3923[163]]()[_0x3923[162]](checkIsLoggedIn(_0x752fx3d,_0x752fx3d[_0x3923[326]]))[_0x3923[162]](checkIsActive(_0x752fx3d,_0x752fx3d[_0x3923[322]]))[_0x3923[162]](checkInterval(_0x752fx3d))[_0x3923[162]](_0x752fx68[_0x3923[282]](_0x752fx3d))[_0x3923[162]](_0x752fx68[_0x3923[285]](_0x752fx3d[_0x3923[325]],_0x752fx3d[_0x3923[324]],_0x752fx3d[_0x3923[80]],_0x752fx3d))[_0x3923[162]](_0x752fx68[_0x3923[287]](_0x752fx3d.Interval,_0x752fx3d[_0x3923[324]],_0x752fx3d[_0x3923[80]],_0x752fx3d))[_0x3923[162]](_0x752fx68[_0x3923[312]](_0x752fx3d))[_0x3923[157]](loggerCatchQueueSummary(_0x3923[323],_0x752fx3d))}else {notSendMessagesQueue(_0x752fx3d)}}else {freeVariablesPredictive(_0x752fx3d)}};Dialer[_0x3923[34]][_0x3923[281]]= function(){var _0x752fx68=this;var _0x752fx62;for(var _0x752fx85 in this[_0x3923[40]]){if(this[_0x3923[40]][_0x3923[125]](_0x752fx85)){_0x752fx62= this[_0x3923[40]][_0x752fx85];if(isCampaignIvr(_0x752fx62[_0x3923[96]])&& isActive(_0x752fx62[_0x3923[199]])){_0x752fx62[_0x3923[134]]= true;BPromise[_0x3923[163]]()[_0x3923[162]](checkIsActive(_0x752fx62,_0x752fx62[_0x3923[199]]))[_0x3923[162]](checkInterval(_0x752fx62))[_0x3923[162]](_0x752fx68[_0x3923[282]](_0x752fx62))[_0x3923[162]](_0x752fx68[_0x3923[285]](_0x752fx62[_0x3923[325]],_0x752fx62[_0x3923[324]],_0x752fx62[_0x3923[80]],_0x752fx62))[_0x3923[162]](_0x752fx68[_0x3923[287]](_0x752fx62.Interval,_0x752fx62[_0x3923[324]],_0x752fx62[_0x3923[80]],_0x752fx62))[_0x3923[162]](_0x752fx68[_0x3923[320]](_0x752fx62))[_0x3923[157]](loggerCatchQueueSummary(_0x3923[327],_0x752fx62))}else {notSendMessagesCampaign(_0x752fx62)}}}};Dialer[_0x3923[34]][_0x3923[328]]= function(_0x752fx3d,_0x752fx22){var _0x752fx68=this;var _0x752fx86=uuid[_0x3923[329]]();this[_0x3923[45]][_0x752fx86]=  new Action(_0x752fx3d,_0x752fx22,_0x752fx86);return  new BPromise(function(_0x752fx82,_0x752fx2f){if(_[_0x3923[77]](_0x752fx3d)&& _0x3923[330]!==  typeof _0x752fx3d){return _0x752fx2f(msgResponse(_0x3923[331],_0x3923[288],_0x3923[332]))};if(_[_0x3923[77]](_0x752fx22[_0x3923[334]][_0x3923[333]])|| _0x752fx22[_0x3923[334]][_0x3923[333]]=== null){return _0x752fx2f(msgResponse(_0x3923[331],_0x3923[288],_0x3923[335]))};var _0x752fx87={"\x58\x4D\x44\x2D\x43\x41\x4C\x4C\x45\x52\x49\x44":_0x752fx68[_0x3923[45]][_0x752fx86][_0x3923[336]](),"\x58\x4D\x44\x2D\x41\x47\x49":_0x752fx3d[_0x3923[230]]?util[_0x3923[99]](_0x3923[337],ipAgi,_0x752fx3d[_0x3923[230]]):_0x3923[338],"\x58\x4D\x44\x2D\x41\x47\x49\x41\x46\x54\x45\x52":_0x752fx3d[_0x3923[239]]?util[_0x3923[99]](_0x3923[337],ipAgi,_0x752fx3d[_0x3923[239]]):_0x3923[338],"\x58\x4D\x44\x2D\x51\x55\x45\x55\x45":(_0x752fx3d[_0x3923[96]]=== _0x3923[97])?util[_0x3923[99]](_0x3923[339],_0x752fx3d[_0x3923[80]],_0x752fx3d[_0x3923[340]]|| _0x3923[302],_0x752fx3d[_0x3923[240]]?_0x3923[341]:_0x3923[302],_0x752fx3d[_0x3923[249]]|| 3):_0x3923[338],"\x58\x4D\x44\x2D\x43\x4F\x4E\x54\x41\x43\x54\x49\x44":_0x752fx22[_0x3923[187]],"\x58\x4D\x44\x2D\x43\x44\x52\x54\x59\x50\x45":_0x3923[7],"\x43\x41\x4C\x4C\x45\x52\x49\x44\x28\x61\x6C\x6C\x29":_0x752fx68[_0x3923[45]][_0x752fx86][_0x3923[336]](),"\x58\x4D\x44\x2D\x41\x4D\x44":_0x752fx3d[_0x3923[208]]?_0x3923[342]:_0x3923[338]};if(_0x752fx3d[_0x3923[208]]){_0x752fx87[_0x3923[343]]= _0x752fx3d[_0x3923[344]]|| 2500;_0x752fx87[_0x3923[345]]= _0x752fx3d[_0x3923[346]]|| 1500;_0x752fx87[_0x3923[347]]= _0x752fx3d[_0x3923[348]]|| 800;_0x752fx87[_0x3923[349]]= _0x752fx3d[_0x3923[350]]|| 5000;_0x752fx87[_0x3923[351]]= _0x752fx3d[_0x3923[352]]|| 100;_0x752fx87[_0x3923[353]]= _0x752fx3d[_0x3923[354]]|| 50;_0x752fx87[_0x3923[355]]= _0x752fx3d[_0x3923[356]]|| 3;_0x752fx87[_0x3923[357]]= _0x752fx3d[_0x3923[358]]|| 256;_0x752fx87[_0x3923[359]]= _0x752fx3d[_0x3923[360]]|| 5000};if(_0x752fx3d[_0x3923[96]]=== _0x3923[97]){_0x752fx87[_0x3923[361]]= _0x752fx22[_0x3923[190]]}else {_0x752fx87[_0x3923[362]]= _0x752fx22[_0x3923[191]]};for(var _0x752fx85 in _0x752fx22[_0x3923[334]]){if(_0x752fx22[_0x3923[334]][_0x3923[125]](_0x752fx85)){if(isNotNull(_0x752fx22[_0x3923[334]][_0x752fx85])&& (_0x752fx85!== _0x3923[363])&& (_0x752fx85!== _0x3923[364])&& (_0x752fx85!== _0x3923[365])&& (_0x752fx85!== _0x3923[366])){_0x752fx87[util[_0x3923[99]](_0x3923[367],_0x3923[368],_[_0x3923[369]](_0x752fx85))]= _0x752fx22[_0x3923[334]][_0x752fx85]}}};return ami.Action({actionid:_0x752fx86,action:_0x3923[331],channel:(_0x752fx68[_0x3923[198]](_0x752fx3d.Trunk))?util[_0x3923[99]](_0x3923[375],_0x752fx3d[_0x3923[376]][_0x3923[80]],isNotNull(_0x752fx3d[_0x3923[377]])?_0x752fx3d[_0x3923[377]][_0x3923[378]]()|| _0x3923[302]:_0x3923[302],_0x752fx22[_0x3923[334]][_0x3923[333]]):util[_0x3923[99]](_0x3923[375],_[_0x3923[151]](_0x752fx3d.TrunkBackup)?_0x752fx3d[_0x3923[376]][_0x3923[80]]:_0x752fx3d[_0x3923[379]][_0x3923[80]],isNotNull(_0x752fx3d[_0x3923[377]])?_0x752fx3d[_0x3923[377]][_0x3923[378]]()|| _0x3923[302]:_0x3923[302],_0x752fx22[_0x3923[334]][_0x3923[333]]),callerid:(_0x752fx68[_0x3923[198]](_0x752fx3d.Trunk))?getCallerId(_0x752fx3d[_0x3923[376]][_0x3923[380]],_0x752fx3d[_0x3923[381]],_0x752fx3d[_0x3923[382]]):getCallerId(_[_0x3923[151]](_0x752fx3d.TrunkBackup)?_0x752fx3d[_0x3923[376]][_0x3923[380]]:_0x752fx3d[_0x3923[379]][_0x3923[380]],_0x752fx3d[_0x3923[381]],_0x752fx3d[_0x3923[382]]),Exten:_0x3923[207],Context:_0x3923[383],Priority:_0x3923[263],variable:_0x752fx87,timeout:(_0x752fx3d[_0x3923[384]]|| 30)* 1000,async:true,channelid:_0x752fx86})[_0x3923[162]](function(_0x752fx3e){return _0x752fx82(_0x752fx3e)})[_0x3923[157]](function(_0x752fx30){_0x752fx3d[_0x3923[370]]+= 1;var _0x752fx67= new History(_0x752fx68[_0x3923[45]][_0x752fx86]);logger[_0x3923[122]](util[_0x3923[99]](_0x3923[371],JSON[_0x3923[90]](_0x752fx30)));_0x752fx67[_0x3923[144]]= 14;_0x752fx67[_0x3923[145]]= _0x3923[372];_0x752fx67[_0x3923[147]]= moment()[_0x3923[99]](_0x3923[241]);_0x752fx67[_0x3923[146]]= _0x752fx67[_0x3923[147]];_0x752fx68[_0x3923[180]](_0x752fx67)[_0x3923[157]](loggerCatch(_0x3923[373]));_0x752fx68[_0x3923[178]](_0x752fx67)[_0x3923[157]](loggerCatch(_0x3923[373]))[_0x3923[36]](function(){delete _0x752fx68[_0x3923[45]][_0x752fx86];return _0x752fx2f(msgResponse(_0x3923[331],_0x3923[89],_0x3923[374]))})})})};Dialer[_0x3923[34]][_0x3923[61]]= function(_0x752fx38){var _0x752fx2b=this[_0x3923[45]][_0x752fx38[_0x3923[261]]];var _0x752fx68=this;if(_0x752fx2b){delete this[_0x3923[45]][_0x752fx38[_0x3923[261]]];_0x752fx2b[_0x3923[248]]= moment()[_0x3923[99]](_0x3923[241]);var _0x752fx24=(_0x752fx2b[_0x3923[96]]=== _0x3923[103])?this[_0x3923[40]][_0x752fx2b[_0x3923[153]]]:this[_0x3923[39]][_0x752fx2b[_0x3923[385]]()];if(!this[_0x3923[196]](_0x752fx38[_0x3923[386]])){this[_0x3923[154]](_0x752fx24);return this[_0x3923[388]](_0x752fx2b,_0x752fx24,_0x752fx38)[_0x3923[162]](function(_0x752fx3e){})[_0x3923[157]](loggerCatch(_0x3923[387]))}else {this[_0x3923[47]][_0x752fx38[_0x3923[203]]]= _0x752fx2b}}};Dialer[_0x3923[34]][_0x3923[389]]= function(_0x752fx88,_0x752fx22,_0x752fx24){var _0x752fx67= new History(_0x752fx22);if(_0x752fx67[_0x3923[390]]+ _0x752fx67[_0x3923[391]]+ _0x752fx67[_0x3923[392]]>= _0x752fx24[_0x3923[393]]- 1){return true};switch(_0x752fx88){case 3:if(_0x752fx67[_0x3923[392]]>= _0x752fx24[_0x3923[394]]- 1){return true}else {this[_0x3923[171]]({active:false,countnoanswerretry:_0x752fx67[_0x3923[392]]+= 1,scheduledat:moment()[_0x3923[398]](_0x752fx24[_0x3923[396]],_0x3923[397])[_0x3923[99]](_0x3923[241]),ContactId:_0x752fx67[_0x3923[187]],ListId:_0x752fx67[_0x3923[188]],VoiceQueueId:_0x752fx67[_0x3923[190]]|| undefined,CampaignId:_0x752fx67[_0x3923[191]]|| undefined})[_0x3923[157]](loggerCatch(_0x3923[395]))};break;case 5:if(_0x752fx67[_0x3923[390]]>= _0x752fx24[_0x3923[399]]- 1){return true}else {this[_0x3923[171]]({active:false,countbusyretry:_0x752fx67[_0x3923[390]]+= 1,scheduledat:moment()[_0x3923[398]](_0x752fx24[_0x3923[401]],_0x3923[397])[_0x3923[99]](_0x3923[241]),ContactId:_0x752fx67[_0x3923[187]],ListId:_0x752fx67[_0x3923[188]],VoiceQueueId:_0x752fx67[_0x3923[190]]|| undefined,CampaignId:_0x752fx67[_0x3923[191]]|| undefined})[_0x3923[157]](loggerCatch(_0x3923[400]))};break;case 8:if(_0x752fx67[_0x3923[391]]>= _0x752fx24[_0x3923[402]]- 1){return true}else {this[_0x3923[171]]({active:false,countcongestionretry:_0x752fx67[_0x3923[391]]+= 1,scheduledat:moment()[_0x3923[398]](_0x752fx24[_0x3923[404]],_0x3923[397])[_0x3923[99]](_0x3923[241]),ContactId:_0x752fx67[_0x3923[187]],ListId:_0x752fx67[_0x3923[188]],VoiceQueueId:_0x752fx67[_0x3923[190]]|| undefined,CampaignId:_0x752fx67[_0x3923[191]]|| undefined})[_0x3923[157]](loggerCatch(_0x3923[403]))};break;default:return true}};Dialer[_0x3923[34]][_0x3923[388]]= function(_0x752fx2b,_0x752fx24,_0x752fx38){var _0x752fx68=this;var _0x752fx67= new History(_0x752fx2b);return  new BPromise(function(_0x752fx82,_0x752fx2f){if(_[_0x3923[77]](_0x752fx24)&& _0x3923[330]!==  typeof _0x752fx24){return _0x752fx2f(msgResponse(_0x3923[405],_0x3923[288],_0x3923[406]))};if(_[_0x3923[77]](_0x752fx38)&& _0x3923[330]!==  typeof _0x752fx38){return _0x752fx2f(msgResponse(_0x3923[405],_0x3923[288],_0x3923[407]))};switch(_0x752fx38[_0x3923[236]]){case _0x3923[265]:_0x752fx24[_0x3923[408]]+= 1;_0x752fx67[_0x3923[144]]= 0;_0x752fx67[_0x3923[145]]= _0x3923[409];_0x752fx68[_0x3923[180]](_0x752fx67)[_0x3923[157]](loggerCatch(_0x3923[410]));if(_0x752fx68[_0x3923[389]](0,_0x752fx2b,_0x752fx24)){if(_0x752fx67[_0x3923[390]]+ _0x752fx67[_0x3923[391]]+ _0x752fx67[_0x3923[392]]>= _0x752fx24[_0x3923[393]]){_0x752fx68[_0x3923[412]](_0x752fx67,_0x752fx82,_0x752fx2f,_0x3923[411])}else {_0x752fx68[_0x3923[413]](_0x752fx67,_0x752fx82,_0x752fx2f,_0x3923[411])}};break;case _0x3923[419]:_0x752fx24[_0x3923[414]]+= 1;_0x752fx67[_0x3923[144]]= 3;_0x752fx67[_0x3923[145]]= _0x3923[415];_0x752fx67[_0x3923[392]]+= 1;_0x752fx67[_0x3923[416]]+= 1;_0x752fx68[_0x3923[180]](_0x752fx67)[_0x3923[157]](loggerCatch(_0x3923[417]));if(_0x752fx68[_0x3923[389]](3,_0x752fx2b,_0x752fx24)){if(_0x752fx67[_0x3923[392]]>= _0x752fx24[_0x3923[394]]){_0x752fx68[_0x3923[413]](_0x752fx67,_0x752fx82,_0x752fx2f,_0x3923[418])}else {_0x752fx68[_0x3923[412]](_0x752fx67,_0x752fx82,_0x752fx2f,_0x3923[418])}};break;case _0x3923[424]:_0x752fx24[_0x3923[420]]+= 1;_0x752fx67[_0x3923[144]]= 5;_0x752fx67[_0x3923[145]]= _0x3923[421];_0x752fx67[_0x3923[390]]+= 1;_0x752fx67[_0x3923[416]]+= 1;_0x752fx68[_0x3923[180]](_0x752fx67)[_0x3923[157]](loggerCatch(_0x3923[422]));if(_0x752fx68[_0x3923[389]](5,_0x752fx2b,_0x752fx24)){if(_0x752fx67[_0x3923[390]]>= _0x752fx24[_0x3923[399]]){_0x752fx68[_0x3923[413]](_0x752fx67,_0x752fx82,_0x752fx2f,_0x3923[423])}else {_0x752fx68[_0x3923[412]](_0x752fx67,_0x752fx82,_0x752fx2f,_0x3923[423])}};break;case _0x3923[429]:_0x752fx24[_0x3923[425]]+= 1;_0x752fx67[_0x3923[144]]= 8;_0x752fx67[_0x3923[145]]= _0x3923[426];_0x752fx67[_0x3923[391]]+= 1;_0x752fx67[_0x3923[416]]+= 1;_0x752fx68[_0x3923[180]](_0x752fx67)[_0x3923[157]](loggerCatch(_0x3923[427]));if(_0x752fx68[_0x3923[389]](8,_0x752fx2b,_0x752fx24)){if(_0x752fx67[_0x3923[391]]>= _0x752fx24[_0x3923[402]]){_0x752fx68[_0x3923[413]](_0x752fx67,_0x752fx82,_0x752fx2f,_0x3923[428])}else {_0x752fx68[_0x3923[412]](_0x752fx67,_0x752fx82,_0x752fx2f,_0x3923[428])}};break;default:_0x752fx24[_0x3923[233]]+= 1;_0x752fx67[_0x3923[144]]= 12;_0x752fx67[_0x3923[145]]= _0x752fx38[_0x3923[236]];_0x752fx68[_0x3923[180]](_0x752fx67)[_0x3923[157]](loggerCatch(_0x3923[430]));if(_0x752fx68[_0x3923[389]](_0x752fx38[_0x3923[236]],_0x752fx2b,_0x752fx24)){if(_0x752fx67[_0x3923[390]]+ _0x752fx67[_0x3923[391]]+ _0x752fx67[_0x3923[392]]>= _0x752fx24[_0x3923[393]]){_0x752fx68[_0x3923[412]](_0x752fx67,_0x752fx82,_0x752fx2f,_0x752fx38[_0x3923[236]])}else {_0x752fx68[_0x3923[413]](_0x752fx67,_0x752fx82,_0x752fx2f,_0x752fx38[_0x3923[236]])}}}})};Dialer[_0x3923[34]][_0x3923[412]]= function(_0x752fx67,_0x752fx82,_0x752fx2f,_0x752fx2d){var _0x752fx89= new Final(_0x752fx67);_0x752fx89[_0x3923[144]]= 15;_0x752fx89[_0x3923[145]]= _0x3923[431];this[_0x3923[413]](_0x752fx89,_0x752fx82,_0x752fx2f,_0x752fx2d)};Dialer[_0x3923[34]][_0x3923[413]]= function(_0x752fx67,_0x752fx82,_0x752fx2f,_0x752fx2d){this[_0x3923[178]](_0x752fx67)[_0x3923[162]](function(_0x752fx3e){return _0x752fx82(msgResponse(_0x3923[405],_0x3923[197],_0x752fx2d))})[_0x3923[157]](function(_0x752fx30){return _0x752fx2f(msgResponse(_0x3923[432],_0x3923[288],_0x3923[433]))})};Dialer[_0x3923[34]][_0x3923[10]]= function(_0x752fx3d){var _0x752fx68=this;var _0x752fx8a=_0x752fx3d[_0x3923[434]]/ 100;var _0x752fx8b=_0x752fx3d[_0x3923[251]]/ (_0x752fx3d[_0x3923[251]]+ _0x752fx3d[_0x3923[211]]);var _0x752fx8c=_0x752fx3d[_0x3923[326]]- _0x752fx3d[_0x3923[435]]- _0x752fx3d[_0x3923[136]]- _0x752fx3d[_0x3923[124]]- _0x752fx3d[_0x3923[135]];var _0x752fx8d=(_0x752fx3d[_0x3923[326]]- _0x752fx3d[_0x3923[435]])* _0x752fx3d[_0x3923[436]];var _0x752fx8e=Math[_0x3923[441]](_0x752fx3d[_0x3923[437]]* _0x752fx3d[_0x3923[438]]* _0x752fx3d[_0x3923[439]]* _0x752fx3d[_0x3923[440]]);if(_[_0x3923[77]](_0x752fx3d[_0x3923[50]])){loggerPredictive[_0x3923[109]](_0x3923[442]);if(!_[_0x3923[77]](_0x752fx3d[_0x3923[49]])){_0x752fx3d[_0x3923[49]]= undefined;loggerPredictive[_0x3923[122]](_0x3923[443],_0x3923[444])};if(!_[_0x3923[77]](_0x752fx3d[_0x3923[101]])){loggerPredictive[_0x3923[122]](_0x3923[443],_0x3923[445]);clearInterval(_0x752fx3d[_0x3923[101]]);_0x752fx3d[_0x3923[101]]= undefined};_0x752fx3d[_0x3923[50]]= moment()[_0x3923[99]](_0x3923[241]);loggerPredictive[_0x3923[109]](_0x3923[446],_0x752fx3d[_0x3923[50]],_0x752fx3d[_0x3923[80]]);this[_0x3923[313]](_0x752fx3d,1)}else {if(ifInterval(_0x752fx3d[_0x3923[447]],_0x752fx3d[_0x3923[50]])){this[_0x3923[313]](_0x752fx3d,1);loggerPredictiveCalls[_0x3923[109]](_0x3923[448],_0x752fx3d[_0x3923[50]],_0x752fx3d[_0x3923[80]]);_0x752fx3d[_0x3923[437]]= 0;_0x752fx3d[_0x3923[252]]= 0}else {if((_0x752fx8a< _0x752fx8b)&& _0x752fx3d[_0x3923[449]]=== _0x3923[450]){freeVariablesPredictive(_0x752fx3d);loggerPredictive[_0x3923[109]](_0x3923[451],_0x3923[452],_0x752fx8b,_0x3923[50],_0x752fx3d[_0x3923[80]])}else {if(_0x752fx8c> _0x752fx8d){freeVariablesPredictive(_0x752fx3d);loggerPredictive[_0x3923[109]](_0x3923[453],_0x3923[454],_0x752fx8c,_0x3923[455],_0x752fx8d)}else {if((_0x752fx8e)< _0x752fx3d[_0x3923[252]]&& _0x752fx3d[_0x3923[449]]=== _0x3923[450]){freeVariablesPredictive(_0x752fx3d);loggerPredictive[_0x3923[109]](_0x3923[456],_0x3923[457],_0x752fx8e,_0x3923[458],_0x752fx3d[_0x3923[252]],_0x3923[50],_0x752fx3d[_0x3923[80]])}else {if(!ifInterval(_0x752fx3d[_0x3923[447]],_0x752fx3d[_0x3923[50]])&& _[_0x3923[77]](_0x752fx3d[_0x3923[49]]) &&  !_[_0x3923[77]](_0x752fx3d[_0x3923[50]])){_0x752fx3d[_0x3923[49]]= moment()[_0x3923[99]](_0x3923[241]);loggerPredictive[_0x3923[109]](_0x3923[459],_0x752fx3d[_0x3923[49]],_0x752fx3d[_0x3923[80]]);this[_0x3923[168]](_0x752fx3d[_0x3923[447]])[_0x3923[162]](this[_0x3923[462]](_0x752fx3d))[_0x3923[162]](mergeDataErlangB(_0x752fx3d))[_0x3923[162]](this[_0x3923[461]](_0x752fx3d))[_0x3923[157]](loggerCatchPredictive(_0x3923[460],_0x752fx3d))}else {if(!ifInterval(_0x752fx3d[_0x3923[447]],_0x752fx3d[_0x3923[49]])){_0x752fx3d[_0x3923[252]]= 0;_0x752fx3d[_0x3923[49]]= moment()[_0x3923[99]](_0x3923[241]);loggerPredictive[_0x3923[109]](_0x3923[463],_0x752fx3d[_0x3923[49]],_0x752fx3d[_0x3923[80]]);clearInterval(_0x752fx3d[_0x3923[101]]);_0x752fx3d[_0x3923[101]]= undefined;this[_0x3923[168]](_0x752fx3d[_0x3923[447]])[_0x3923[162]](this[_0x3923[462]](_0x752fx3d))[_0x3923[162]](mergeDataErlangB(_0x752fx3d))[_0x3923[162]](this[_0x3923[461]](_0x752fx3d))[_0x3923[157]](loggerCatchPredictive(_0x3923[460],_0x752fx3d))}}}}}}}};Dialer[_0x3923[34]][_0x3923[462]]= function(_0x752fx3d){var _0x752fx68=this;return function(_0x752fx3e){return  new BPromise(function(_0x752fx82,_0x752fx2f){_[_0x3923[116]](_0x752fx3d,_0x752fx3e[0]);if(checkGetDataPredictive(_0x752fx3e[0])){loggerPredictive[_0x3923[109]](JSON[_0x3923[90]](_0x752fx3e[0]));if(_0x752fx3d[_0x3923[449]]=== _0x3923[450]){return _0x752fx68[_0x3923[176]](_0x752fx3d[_0x3923[363]])[_0x3923[162]](function(_0x752fx8f){var _0x752fx46=_0x752fx3d[_0x3923[326]]- _0x752fx8f[0][_0x3923[465]];var _0x752fx6c=_0x752fx3d[_0x3923[447]]* 60;var _0x752fx90=_0x752fx3e[0][_0x3923[107]]+ _0x752fx3e[0][_0x3923[110]];var _0x752fx91=((_0x752fx3e[0][_0x3923[466]]+ _0x752fx3e[0][_0x3923[250]]+ _0x752fx3e[0][_0x3923[256]])/ _0x752fx3e[0][_0x3923[106]]);var _0x752fx92=_0x752fx3d[_0x3923[434]]/ 100;_0x752fx3d[_0x3923[435]]= _0x752fx8f[0][_0x3923[465]]|| 0;_0x752fx3d[_0x3923[439]]= (_0x752fx91> 0)?_0x752fx91:1;return _0x752fx68[_0x3923[467]](_0x752fx46,_0x752fx6c,_0x752fx90,_0x752fx91,_0x752fx92)})[_0x3923[162]](function(_0x752fx3e){return _0x752fx82(_0x752fx3e)})[_0x3923[157]](function(_0x752fx30){return _0x752fx2f(msgResponse(_0x3923[464],_0x3923[288],JSON[_0x3923[90]](_0x752fx30)))})};if(_0x752fx3d[_0x3923[449]]=== _0x3923[468]){return _0x752fx68[_0x3923[176]](_0x752fx3d[_0x3923[363]])[_0x3923[162]](function(_0x752fx8f){var _0x752fx46=_0x752fx3d[_0x3923[326]]- _0x752fx8f[0][_0x3923[465]];var _0x752fx6c=_0x752fx3d[_0x3923[447]]* 60;var _0x752fx90=_0x752fx3e[0][_0x3923[107]]+ _0x752fx3e[0][_0x3923[110]];var _0x752fx91=((_0x752fx3e[0][_0x3923[466]]+ _0x752fx3e[0][_0x3923[250]]+ _0x752fx3e[0][_0x3923[256]])/ _0x752fx3e[0][_0x3923[106]]);var _0x752fx93=_0x752fx3d[_0x3923[434]]/ 100;_0x752fx3d[_0x3923[435]]= _0x752fx8f[0][_0x3923[465]]|| 0;_0x752fx3d[_0x3923[439]]= (_0x752fx91> 0)?_0x752fx91:1;return _0x752fx68[_0x3923[469]](_0x752fx46,_0x752fx6c,_0x752fx90,_0x752fx91,_0x752fx93)})[_0x3923[162]](function(_0x752fx3e){return _0x752fx82(_0x752fx3e)})[_0x3923[157]](function(_0x752fx30){return _0x752fx2f(msgResponse(_0x3923[464],_0x3923[288],JSON[_0x3923[90]](_0x752fx30)))})}}else {return _0x752fx2f(msgResponse(_0x3923[470],_0x3923[288],_0x3923[471]))}})}};Dialer[_0x3923[34]][_0x3923[461]]= function(_0x752fx3d){var _0x752fx68=this;return function(){var _0x752fx5b=0;var _0x752fx94=Math[_0x3923[441]](_0x752fx3d[_0x3923[472]]* 1000);if(_0x752fx94> 0){_0x752fx94= (_0x752fx94< 100)?100:_0x752fx94;loggerPredictive[_0x3923[109]](_0x3923[473],_0x752fx94);_0x752fx3d[_0x3923[101]]= setInterval(function(){_0x752fx68[_0x3923[101]](_0x752fx3d);loggerPredictiveCalls[_0x3923[109]](_0x3923[474],_0x752fx5b+= 1)},_0x752fx94)}else {loggerPredictive[_0x3923[109]](_0x3923[475],_0x3923[476],_0x752fx94)}}};Dialer[_0x3923[34]][_0x3923[477]]= function(_0x752fx3d,_0x752fx64){var _0x752fx68=this;return function(_0x752fx3e){if(_[_0x3923[87]](_0x752fx3e)){if(_[_0x3923[151]](_0x752fx64.UserId)||  !_0x752fx64[_0x3923[478]]){if(_0x752fx3d[_0x3923[319]]=== _0x3923[9]){_0x752fx3d[_0x3923[269]]= _[_0x3923[77]](_0x752fx3d[_0x3923[269]])?true:_0x752fx3d[_0x3923[269]];var _0x752fx86=uuid[_0x3923[329]]();_0x752fx68[_0x3923[45]][_0x752fx86]=  new Action(_0x752fx3d,_0x752fx64,_0x752fx86);if(_0x752fx3d[_0x3923[269]]){_0x752fx3d[_0x3923[269]]= false;_0x752fx68[_0x3923[52]][_0x752fx68[_0x3923[45]][_0x752fx86][_0x3923[153]]]= [];ami.Action({actionid:_0x752fx86,action:_0x3923[480],queue:_0x752fx3d[_0x3923[80]]})[_0x3923[157]](function(_0x752fx30){_0x752fx68[_0x3923[154]](_0x752fx3d);_0x752fx68[_0x3923[171]]({active:false,ContactId:_0x752fx68[_0x3923[45]][_0x752fx86][_0x3923[187]],ListId:_0x752fx68[_0x3923[45]][_0x752fx86][_0x3923[188]],VoiceQueueId:_0x752fx68[_0x3923[45]][_0x752fx86][_0x3923[190]]|| undefined,CampaignId:_0x752fx68[_0x3923[45]][_0x752fx86][_0x3923[191]]|| undefined})[_0x3923[157]](loggerCatch(_0x3923[479]));delete _0x752fx68[_0x3923[45]][_0x752fx86]})}else {loggerBooked[_0x3923[109]](_0x3923[481],_0x752fx3d[_0x3923[269]]);_0x752fx68[_0x3923[154]](_0x752fx3d);_0x752fx68[_0x3923[171]]({active:false,ContactId:_0x752fx68[_0x3923[45]][_0x752fx86][_0x3923[187]],ListId:_0x752fx68[_0x3923[45]][_0x752fx86][_0x3923[188]],VoiceQueueId:_0x752fx68[_0x3923[45]][_0x752fx86][_0x3923[190]]|| undefined,CampaignId:_0x752fx68[_0x3923[45]][_0x752fx86][_0x3923[191]]|| undefined})[_0x3923[157]](loggerCatch(_0x3923[479]));delete _0x752fx68[_0x3923[45]][_0x752fx86]}}else {return _0x752fx68[_0x3923[328]](_0x752fx3d,_0x752fx64)}}else {if(getDiff(_0x752fx64[_0x3923[482]])< (_0x752fx3d[_0x3923[483]]* 60)){_0x752fx68[_0x3923[38]][_0x3923[272]](_0x752fx64[_0x3923[363]])[_0x3923[36]](function(){_0x752fx68[_0x3923[154]](_0x752fx3d)})}else {_0x752fx3d[_0x3923[484]]+= 1;_0x752fx68[_0x3923[154]](_0x752fx3d);if(_0x752fx3d[_0x3923[485]]){_0x752fx68[_0x3923[171]]({active:false,recallme:false,UserId:null,ContactId:_0x752fx64[_0x3923[187]],ListId:_0x752fx64[_0x3923[188]],VoiceQueueId:_0x752fx64[_0x3923[190]]|| undefined,CampaignId:_0x752fx64[_0x3923[191]]|| undefined})[_0x3923[157]](loggerCatch(_0x3923[486]));_0x752fx68[_0x3923[180]](createObjHistory(_0x752fx3d,_0x752fx64,_0x3923[488],23,_0x3923[489]))[_0x3923[157]](loggerCatch(_0x3923[487]))}else {_0x752fx68[_0x3923[195]](createObjHistory(_0x752fx3d,_0x752fx64,_0x3923[490],22,_0x3923[491]),_0x3923[492],_0x3923[493])}}}}else {_0x752fx3d[_0x3923[494]]+= 1;_0x752fx68[_0x3923[195]](createObjHistory(_0x752fx3d,_0x752fx64,_0x3923[495],13,_0x3923[496]),_0x3923[497],_0x3923[498]);throw _0x3923[499]}}};Dialer[_0x3923[34]][_0x3923[321]]= function(_0x752fx62){var _0x752fx68=this;var _0x752fx5a=[];var _0x752fx5d=_0x752fx62[_0x3923[500]]- _0x752fx62[_0x3923[124]]- _0x752fx62[_0x3923[501]];emitCampaignSummary(_0x752fx62);if(_0x752fx5d> 0){if(_0x752fx5d> this[_0x3923[43]]){_0x752fx5d= this[_0x3923[43]]};_0x752fx62[_0x3923[501]]+= _0x752fx5d;this[_0x3923[175]](_0x752fx62[_0x3923[363]],_0x752fx5d,_0x752fx62[_0x3923[509]])[_0x3923[162]](function(_0x752fx3e){_0x752fx62[_0x3923[501]]-= _0x752fx5d;_0x752fx62[_0x3923[501]]= (_0x752fx62[_0x3923[501]]> 0)?_0x752fx62[_0x3923[501]]:0;if(!checkContactEmpty(_0x752fx3e)){_0x752fx62[_0x3923[78]]= _0x3923[132];logger[_0x3923[109]](_0x3923[503]+ _0x752fx62[_0x3923[80]])}else {_0x752fx62[_0x3923[124]]+= _0x752fx3e[_0x3923[123]];_0x752fx62[_0x3923[78]]= _0x3923[504];for(var _0x752fx95=0;_0x752fx95< _0x752fx3e[_0x3923[123]];_0x752fx95+= 1){_0x752fx62[_0x3923[505]]+= 1;if(_[_0x3923[151]](_0x752fx3e[_0x752fx95])|| _[_0x3923[151]](_0x752fx3e[_0x752fx95].Contact)|| _[_0x3923[151]](_0x752fx3e[_0x752fx95][_0x3923[334]][_0x3923[333]])){_0x752fx68[_0x3923[185]](_0x3923[506],_0x752fx62,_0x752fx3e[_0x752fx95])}else {_0x752fx68[_0x3923[166]](_[_0x3923[192]](_0x752fx3e[_0x752fx95],[_0x3923[191],_0x3923[508]]))[_0x3923[162]](_0x752fx68[_0x3923[477]](_0x752fx62,_0x752fx3e[_0x752fx95]))[_0x3923[157]](_0x752fx68[_0x3923[184]](_0x3923[507],_0x752fx62))}}}})[_0x3923[157]](loggerGetContactDialer(_0x3923[502],_0x752fx62,_0x752fx5d))}};Dialer[_0x3923[34]][_0x3923[313]]= function(_0x752fx3d,_0x752fx96){var _0x752fx68=this;var _0x752fx97=[];var _0x752fx98=_0x752fx96>= 1?_0x752fx96:1;var _0x752fx5a=[];var _0x752fx5d=Math[_0x3923[441]](_0x752fx3d[_0x3923[319]]=== _0x3923[9]?(_0x752fx3d[_0x3923[326]]- _0x752fx3d[_0x3923[137]]):_0x752fx3d[_0x3923[138]]* _0x752fx98)- _0x752fx3d[_0x3923[124]]- _0x752fx3d[_0x3923[501]];emitVoiceQueueSummary(_0x752fx3d);if(_0x752fx3d[_0x3923[510]]> 0){var _0x752fx99=_0x752fx3d[_0x3923[510]]- _0x752fx3d[_0x3923[124]]- _0x752fx3d[_0x3923[135]]- _0x752fx3d[_0x3923[501]]- _0x752fx3d[_0x3923[137]];if(_0x752fx5d> _0x752fx99){_0x752fx5d= _0x752fx99}};if(_0x752fx5d> 0){if(_0x752fx3d[_0x3923[319]]=== _0x3923[9]){_0x752fx5d= 1};if(_0x752fx5d> this[_0x3923[43]]){_0x752fx5d= this[_0x3923[43]]};_0x752fx3d[_0x3923[501]]+= _0x752fx5d;for(var _0x752fx9a in this[_0x3923[41]]){if(this[_0x3923[41]][_0x3923[125]](_0x752fx9a)){if(this[_0x3923[41]][_0x752fx9a][_0x3923[144]]=== _0x3923[511]&& this[_0x3923[41]][_0x752fx9a][_0x3923[158]]=== _0x3923[201]){_0x752fx97[_0x3923[268]](this[_0x3923[41]][_0x752fx9a][_0x3923[363]])}}};this[_0x3923[173]](_0x752fx3d[_0x3923[363]],_0x752fx97,_0x752fx5d,_0x752fx3d[_0x3923[509]])[_0x3923[162]](function(_0x752fx3e){_0x752fx3d[_0x3923[501]]-= _0x752fx5d;_0x752fx3d[_0x3923[501]]= (_0x752fx3d[_0x3923[501]]> 0)?_0x752fx3d[_0x3923[501]]:0;if(!checkContactEmpty(_0x752fx3e)){_0x752fx68[_0x3923[160]](_0x752fx3d)[_0x3923[162]](sendMessageReschedule(_0x752fx3d))[_0x3923[157]](loggerCatch(_0x3923[161]))}else {_0x752fx3d[_0x3923[124]]+= _0x752fx3e[_0x3923[123]];_0x752fx3d[_0x3923[78]]= _0x752fx3d[_0x3923[319]]=== _0x3923[9]?_0x3923[342]:_0x3923[504];for(var _0x752fx95=0;_0x752fx95< _0x752fx3e[_0x3923[123]];_0x752fx95+= 1){if(_[_0x3923[151]](_0x752fx3e[_0x752fx95])|| _[_0x3923[151]](_0x752fx3e[_0x752fx95].Contact)|| _[_0x3923[151]](_0x752fx3e[_0x752fx95][_0x3923[334]][_0x3923[333]])){_0x752fx68[_0x3923[185]](_0x3923[506],_0x752fx3d,_0x752fx3e[_0x752fx95])}else {_0x752fx68[_0x3923[164]](_[_0x3923[192]](_0x752fx3e[_0x752fx95],[_0x3923[190],_0x3923[508]]))[_0x3923[162]](_0x752fx68[_0x3923[477]](_0x752fx3d,_0x752fx3e[_0x752fx95]))[_0x3923[157]](_0x752fx68[_0x3923[184]](_0x3923[506],_0x752fx3d))}}}})[_0x3923[157]](loggerGetContactDialer(_0x3923[512],_0x752fx3d,_0x752fx5d))}};Dialer[_0x3923[34]][_0x3923[101]]= function(_0x752fx3d){var _0x752fx68=this;if(_0x752fx3d[_0x3923[510]]> 0){var _0x752fx99=_0x752fx3d[_0x3923[510]]- _0x752fx3d[_0x3923[124]]- _0x752fx3d[_0x3923[135]];if(_0x752fx99> 0){this[_0x3923[513]](_0x752fx3d)}else {loggerPredictiveCalls[_0x3923[109]](_0x3923[514])}}else {this[_0x3923[513]](_0x752fx3d)}};Dialer[_0x3923[34]][_0x3923[513]]= function(_0x752fx3d){var _0x752fx68=this;var _0x752fx97=[];_0x752fx3d[_0x3923[124]]+= 1;for(var _0x752fx9a in this[_0x3923[41]]){if(this[_0x3923[41]][_0x3923[125]](_0x752fx9a)){if(this[_0x3923[41]][_0x752fx9a][_0x3923[144]]=== _0x3923[511]&& this[_0x3923[41]][_0x752fx9a][_0x3923[158]]=== _0x3923[201]){_0x752fx97[_0x3923[268]](this[_0x3923[41]][_0x752fx9a][_0x3923[363]])}}};this[_0x3923[173]](_0x752fx3d[_0x3923[363]],_0x752fx97,1,_0x752fx3d[_0x3923[509]])[_0x3923[162]](function(_0x752fx3e){if(!checkContactEmpty(_0x752fx3e)){checkContactLowerLimitOriginate(_0x752fx3d,1,0);_0x752fx68[_0x3923[160]](_0x752fx3d)[_0x3923[162]](sendMessageReschedule(_0x752fx3d))[_0x3923[157]](loggerCatch(_0x3923[161]))}else {_0x752fx3d[_0x3923[78]]= _0x3923[504];if(_[_0x3923[151]](_0x752fx3e[0])|| _[_0x3923[151]](_0x752fx3e[0].Contact)|| _[_0x3923[151]](_0x752fx3e[0][_0x3923[334]][_0x3923[333]])){_0x752fx68[_0x3923[185]](_0x3923[506],_0x752fx3d,_0x752fx3e[0])}else {_0x752fx68[_0x3923[164]](_[_0x3923[192]](_0x752fx3e[0],[_0x3923[190],_0x3923[508]]))[_0x3923[162]](_0x752fx68[_0x3923[477]](_0x752fx3d,_0x752fx3e[0]))[_0x3923[157]](_0x752fx68[_0x3923[184]](_0x3923[516],_0x752fx3d))}}})[_0x3923[157]](loggerGetContactDialer(_0x3923[515],_0x752fx3d,1));emitVoiceQueueSummary(_0x752fx3d)};Dialer[_0x3923[34]][_0x3923[467]]= function(_0x752fx46,_0x752fx6c,_0x752fx90,_0x752fx9b,_0x752fx92,_0x752fx9c){loggerPredictive[_0x3923[109]](_0x3923[517],_0x3923[518],_0x752fx46,_0x3923[519],_0x752fx6c,_0x3923[520],_0x752fx90,_0x3923[521],_0x752fx9b,_0x3923[522],_0x752fx92);return  new BPromise(function(_0x752fx82,_0x752fx2f){if(_0x752fx46<= 0|| isNaN(_0x752fx46)){return _0x752fx2f(msgResponse(_0x3923[517],_0x3923[89],_0x3923[523]+ _0x752fx46))};if(_0x752fx90<= 0|| isNaN(_0x752fx90)){return _0x752fx2f(msgResponse(_0x3923[517],_0x3923[89],_0x3923[524]+ _0x752fx90))};if(_0x752fx9b<= 0|| isNaN(_0x752fx9b)){return _0x752fx2f(msgResponse(_0x3923[517],_0x3923[89],_0x3923[525]+ _0x752fx9b))};if(_0x752fx6c<= 0|| isNaN(_0x752fx6c)){return _0x752fx2f(msgResponse(_0x3923[517],_0x3923[89],_0x3923[526]+ _0x752fx6c))};if(_0x752fx92<= 0|| isNaN(_0x752fx92)){return _0x752fx2f(msgResponse(_0x3923[517],_0x3923[89],_0x3923[527]+ _0x752fx92))};_0x752fx9c= _0x752fx9c|| 0.0;var _0x752fx9d=1.0/ _0x752fx90;var _0x752fx45=0.0;var _0x752fx9e=0.0;var _0x752fx33=0.0;var _0x752fx9f=0.0;for(var _0x752fx5b=0;_0x752fx33< _0x752fx92;_0x752fx5b+= 1){_0x752fx9e= _0x752fx5b/ _0x752fx6c;_0x752fx45= ((_0x752fx9b* _0x752fx9e)+ _0x752fx9c)/ _0x752fx9d;_0x752fx33= erlangb(_0x752fx45,_0x752fx46);_0x752fx9f= (_0x752fx45/ _0x752fx46)* (1- erlangb(_0x752fx45,_0x752fx46))};return _0x752fx82({erlangCalls:_0x752fx5b,erlangCallToSecond:(_0x752fx6c/ _0x752fx5b),erlangAbandonmentRate:_0x752fx33,erlangBusyFactor:_0x752fx9f})})};Dialer[_0x3923[34]][_0x3923[469]]= function(_0x752fx46,_0x752fx6c,_0x752fx90,_0x752fx9b,_0x752fx93,_0x752fx9c){loggerPredictive[_0x3923[109]](_0x3923[528],_0x3923[518],_0x752fx46,_0x3923[519],_0x752fx6c,_0x3923[520],_0x752fx90,_0x3923[521],_0x752fx9b,_0x3923[529],_0x752fx93);return  new BPromise(function(_0x752fx82,_0x752fx2f){if(_0x752fx46<= 0|| isNaN(_0x752fx46)){return _0x752fx2f(msgResponse(_0x3923[517],_0x3923[89],_0x3923[523]+ _0x752fx46))};if(_0x752fx90<= 0|| isNaN(_0x752fx90)){return _0x752fx2f(msgResponse(_0x3923[517],_0x3923[89],_0x3923[524]+ _0x752fx90))};if(_0x752fx9b<= 0|| isNaN(_0x752fx9b)){return _0x752fx2f(msgResponse(_0x3923[517],_0x3923[89],_0x3923[525]+ _0x752fx9b))};if(_0x752fx6c<= 0|| isNaN(_0x752fx6c)){return _0x752fx2f(msgResponse(_0x3923[517],_0x3923[89],_0x3923[526]+ _0x752fx6c))};if(_0x752fx93<= 0|| isNaN(_0x752fx93)){return _0x752fx2f(msgResponse(_0x3923[517],_0x3923[89],_0x3923[527]+ _0x752fx93))};_0x752fx9c= _0x752fx9c|| 0.0;var _0x752fx9d=1.0/ _0x752fx90;var _0x752fx45=0.0;var _0x752fx9e=0.0;var _0x752fx33=0.0;var _0x752fx9f=0.0;for(var _0x752fx5b=0;_0x752fx9f< _0x752fx93;_0x752fx5b+= 1){_0x752fx9e= _0x752fx5b/ _0x752fx6c;_0x752fx45= ((_0x752fx9b* _0x752fx9e)+ _0x752fx9c)/ _0x752fx9d;_0x752fx33= erlangb(_0x752fx45,_0x752fx46);_0x752fx9f= (_0x752fx45/ _0x752fx46)* (1- erlangb(_0x752fx45,_0x752fx46))};return _0x752fx82({erlangCalls:_0x752fx5b,erlangCallToSecond:(_0x752fx6c/ _0x752fx5b),erlangAbandonmentRate:_0x752fx33,erlangBusyFactor:_0x752fx9f})})};module[_0x3923[530]]= Dialer
\ No newline at end of file
+var _0x7460=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x75\x69\x64","\x6D\x6F\x6D\x65\x6E\x74","\x72\x72","\x64\x69\x61\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x62\x6F\x6F\x6B\x65\x64","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x43\x61\x6C\x6C\x73","\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74\x2F","\x2E\x2E\x2F\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x2E\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74","\x2E\x2F\x61\x63\x74\x69\x6F\x6E","\x2E\x2F\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2F\x66\x69\x6E\x61\x6C","\x2E\x2F\x61\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x2E\x2F\x71\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E","\x2E\x2F\x68\x61\x6E\x67\x75\x70","\x58\x43\x41\x4C\x4C\x59\x5F\x49\x50\x5F\x41\x47\x49","\x65\x6E\x76","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E","\x65\x6E\x71\x75\x65\x75\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x74\x61\x69\x6C","\x66\x69\x6E\x61\x6C\x6C\x79","\x73\x65\x71\x75\x65\x6E\x63\x65","\x70\x72\x65\x76\x69\x65\x77","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x61\x67\x65\x6E\x74\x73","\x74\x72\x75\x6E\x6B\x73","\x6D\x61\x78\x4E\x75\x6D\x62\x65\x72\x4F\x72\x69\x67\x69\x6E\x61\x74\x65","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x61\x63\x74\x69\x6F\x6E\x73","\x63\x6F\x6E\x74\x61\x63\x74\x73\x49\x64","\x75\x6E\x69\x71\x75\x65\x49\x64","\x6F\x70\x74\x69\x6F\x6E\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x73\x74\x61\x72\x74\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x73\x74\x61\x72\x74\x50\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65","\x69\x76\x72\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x64","\x71\x75\x65\x75\x65\x42\x6F\x6F\x6B\x65\x64","\x71\x75\x65\x75\x65\x42\x6F\x6F\x6B\x65\x64\x52\x52","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6E\x6E\x65\x63\x74","\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x72\x65\x73\x70\x6F\x6E\x73\x65","\x73\x79\x6E\x63\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x52\x65\x73\x70\x6F\x6E\x73\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x71\x75\x65\x75\x65\x73\x75\x6D\x6D\x61\x72\x79","\x68\x61\x6E\x67\x75\x70","\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70","\x6E\x65\x77\x65\x78\x74\x65\x6E","\x73\x79\x6E\x63\x4E\x65\x77\x45\x78\x74\x65\x6E","\x76\x61\x72\x73\x65\x74","\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72","\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x4D\x65\x6D\x62\x65\x72","\x71\x75\x65\x75\x65\x73\x74\x61\x74\x75\x73\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x6C\x6F\x6F\x70\x43\x61\x6D\x70\x61\x69\x67\x6E\x73","\x6C\x6F\x6F\x70\x43\x6C\x65\x61\x72\x5A\x6F\x6D\x62\x69\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6D\x65\x73\x73\x61\x67\x65","\x41\x47\x45\x4E\x54\x53\x5F\x4E\x4F\x54\x5F\x4C\x4F\x47\x47\x45\x44","\x6E\x61\x6D\x65","\x20\x41\x47\x45\x4E\x54\x53\x20\x4E\x4F\x54\x20\x4C\x4F\x47\x47\x45\x44","\x4E\x4F\x54\x5F\x41\x43\x54\x49\x56\x45","\x20\x4E\x4F\x54\x20\x41\x63\x74\x69\x76\x65","\x49\x4E\x54\x45\x52\x56\x41\x4C\x5F\x49\x53\x5F\x4E\x55\x4C\x4C","\x20\x49\x4E\x54\x45\x52\x56\x41\x4C\x5F\x49\x53\x5F\x4E\x55\x4C\x4C","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x69\x73\x45\x6D\x70\x74\x79","\x5B\x69\x66\x54\x69\x6D\x65\x5D\x5B\x41\x63\x74\x69\x6F\x6E\x5D","\x45\x72\x72\x6F\x72","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x65\x6D\x69\x74","\x74\x6F","\x74\x79\x70\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x76\x6F\x69\x63\x65\x3A\x71\x75\x65\x75\x65\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x68\x61\x6E\x64\x6C\x65\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x6F\x6D\x69\x74","\x69\x76\x72","\x63\x61\x6D\x70\x61\x69\x67\x6E\x3A\x69\x76\x72\x3A\x25\x73","\x63\x61\x6D\x70\x61\x69\x67\x6E\x3A\x73\x61\x76\x65","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x54\x6F\x74\x61\x6C\x43\x61\x6C\x6C\x73","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x41\x76\x67\x54\x61\x6C\x6B\x74\x69\x6D\x65","\x5B\x63\x68\x65\x63\x6B\x47\x65\x74\x44\x61\x74\x61\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x61\x76\x67\x54\x61\x6C\x6B\x74\x69\x6D\x65\x5D","\x69\x6E\x66\x6F","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x41\x76\x67\x48\x6F\x6C\x64\x74\x69\x6D\x65","\x5B\x63\x68\x65\x63\x6B\x47\x65\x74\x44\x61\x74\x61\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x61\x76\x67\x48\x6F\x6C\x64\x74\x69\x6D\x65\x5D","\x5B\x63\x68\x65\x63\x6B\x47\x65\x74\x44\x61\x74\x61\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x74\x6F\x74\x61\x6C\x43\x61\x6C\x6C\x73\x5D","\x5B\x63\x68\x65\x63\x6B\x47\x65\x74\x44\x61\x74\x61\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x6F\x62\x6A\x49\x73\x45\x6D\x70\x74\x79\x5D","\x5B\x63\x68\x65\x63\x6B\x47\x65\x74\x44\x61\x74\x61\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x6F\x62\x6A\x5D","\x5B\x45\x72\x6C\x61\x6E\x67\x42\x5D","\x6D\x65\x72\x67\x65","\x5B\x66\x72\x65\x65\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D","\x73\x74\x72\x69\x6E\x67","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x22\x22\x20\x3C\x3E","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x6C\x65\x6E\x67\x74\x68","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x64","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x5B\x64\x65\x63\x72\x65\x6D\x65\x74\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x20\x6F\x62\x6A\x65\x63\x74\x20\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x64\x20\x69\x73\x20\x6E\x65\x67\x61\x74\x69\x76\x65","\x5B\x64\x65\x63\x72\x65\x6D\x65\x74\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x20\x69\x73\x20\x6E\x75\x6C\x6C\x20\x6F\x72\x20\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x63\x6F\x6E\x74\x61\x63\x74\x73\x52\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x64","\x52\x45\x53\x43\x48\x45\x44\x55\x4C\x45\x44\x5F\x43\x4F\x4E\x54\x41\x43\x54\x53","\x5B\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72\x32\x5D\x5B\x52\x65\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x5D","\x63\x6F\x6E\x74\x61\x63\x74\x73","\x41\x56\x41\x49\x4C\x41\x42\x4C\x45\x5F\x43\x4F\x4E\x54\x41\x43\x54\x53\x5F\x46\x49\x4E\x49\x53\x48\x45\x44","\x5B\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72\x32\x5D\x5B\x45\x6D\x70\x74\x79\x5D","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65\x4F\x6E\x65\x4E\x6F\x74\x41\x63\x74\x69\x76\x65","\x74\x61\x6C\x6B\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67","\x70\x54\x61\x6C\x6B\x69\x6E\x67","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79\x5D\x20\x43\x61\x6D\x70\x61\x69\x67\x6E\x20\x51\x75\x65\x75\x65\x3A\x20","\x69\x73\x20\x6E\x6F\x74\x20\x61\x63\x74\x69\x76\x65","\x49\x53\x5F\x44\x49\x53\x41\x43\x54\x49\x56\x45\x44","\x69\x73\x20\x64\x69\x73\x61\x63\x74\x69\x76\x65","\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79\x5D\x20\x43\x61\x6D\x70\x61\x69\x67\x6E\x20\x49\x76\x72\x3A\x20","\x73\x74\x61\x74\x65","\x73\x74\x61\x74\x65\x64\x65\x73\x63","\x65\x6E\x64\x74\x69\x6D\x65","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x5B\x75\x6E\x69\x71\x75\x65\x69\x64\x5D","\x63\x6C\x65\x61\x72\x5A\x6F\x6D\x62\x69\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x5B\x61\x63\x74\x69\x6F\x6E\x73\x5D","\x69\x73\x4E\x69\x6C","\x4E\x6F\x20\x73\x75\x63\x68\x20\x63\x68\x61\x6E\x6E\x65\x6C","\x71\x75\x65\x75\x65","\x75\x70\x64\x61\x74\x65\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x64","\x5B\x44\x69\x61\x6C\x65\x72\x5D\x5B\x63\x68\x65\x63\x6B\x43\x68\x61\x6E\x6E\x65\x6C\x5D","\x5B\x44\x69\x61\x6C\x65\x72\x5D\x5B\x63\x68\x65\x63\x6B\x43\x68\x61\x6E\x6E\x65\x6C\x5D\x5B\x69\x76\x72\x5D","\x63\x61\x74\x63\x68","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x6F\x75\x6E\x74\x52\x65\x53\x63\x68\x65\x64\x75\x6C\x65\x64","\x5B\x63\x6F\x75\x6E\x74\x52\x65\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x5D\x20","\x74\x68\x65\x6E","\x72\x65\x73\x6F\x6C\x76\x65","\x63\x68\x65\x63\x6B\x49\x73\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74","\x5B\x63\x68\x65\x63\x6B\x49\x73\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x5D\x20","\x63\x68\x65\x63\x6B\x49\x73\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x49\x76\x72","\x5B\x63\x68\x65\x63\x6B\x49\x73\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x49\x76\x72\x5D\x20","\x61\x76\x65\x72\x61\x67\x65\x48\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65","\x5B\x61\x76\x65\x72\x61\x67\x65\x48\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65\x5D\x20","\x61\x76\x67\x48\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65","\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74","\x5B\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x20","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72","\x5B\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72\x5D\x20","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72\x49\x76\x72","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x50\x61\x75\x73\x65\x73","\x5B\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x50\x61\x75\x73\x65\x73\x5D\x20","\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x64\x44\x69\x61\x6C\x65\x72","\x5B\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x64\x44\x69\x61\x6C\x65\x72\x5D\x20","\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79","\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D\x20","\x5B\x75\x70\x64\x61\x74\x65\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x64\x5D\x20\x6F\x62\x6A\x65\x63\x74\x20\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x64\x20\x69\x73\x20\x6E\x65\x67\x61\x74\x69\x76\x65","\x5B\x75\x70\x64\x61\x74\x65\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x64\x5D\x20\x69\x73\x20\x6E\x75\x6C\x6C\x20\x6F\x72\x20\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6C\x6F\x67\x67\x65\x72\x48\x61\x6E\x64\x6C\x65\x72","\x65\x6D\x70\x74\x79\x43\x6F\x6E\x74\x61\x63\x74","\x6E\x6F\x74\x46\x6F\x75\x6E\x64","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x55\x73\x65\x72\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x70\x69\x63\x6B","\x5B\x65\x6D\x70\x74\x79\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D","\x5B\x65\x6D\x70\x74\x79\x43\x6F\x6E\x74\x61\x63\x74\x5D","\x73\x61\x76\x65\x49\x6E\x44\x62","\x69\x73\x53\x75\x63\x63\x65\x73\x73","\x53\x75\x63\x63\x65\x73\x73","\x69\x73\x54\x72\x75\x6E\x6B\x52\x65\x61\x63\x68\x61\x62\x6C\x65","\x61\x63\x74\x69\x76\x65","\x53\x49\x50\x2F\x25\x73","\x72\x65\x61\x63\x68\x61\x62\x6C\x65","\x75\x6E\x6D\x6F\x6E\x69\x74\x6F\x72\x65\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x76\x61\x72\x69\x61\x62\x6C\x65","\x61\x6D\x64\x73\x74\x61\x74\x75\x73","\x65\x78\x74\x65\x6E","\x78\x63\x61\x6C\x6C\x79\x2D\x6D\x6F\x74\x69\x6F\x6E\x2D\x64\x69\x61\x6C\x65\x72","\x64\x69\x61\x6C\x41\x4D\x44\x41\x63\x74\x69\x76\x65","\x76\x61\x6C\x75\x65","\x48\x41\x4E\x47\x55\x50","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x41\x67\x69\x43\x61\x6C\x6C\x73\x44\x61\x79","\x48\x61\x6E\x67\x75\x70\x49\x6E\x41\x4D\x44","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x41\x4D\x44","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x49\x6E\x41\x4D\x44\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x49\x6E\x41\x4D\x44\x5D","\x4D\x41\x43\x48\x49\x4E\x45","\x4D\x61\x63\x68\x69\x6E\x65","\x61\x6D\x64","\x5B\x73\x79\x6E\x63\x4D\x61\x63\x68\x69\x6E\x65\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D","\x5B\x73\x79\x6E\x63\x4D\x61\x63\x68\x69\x6E\x65\x5D","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x49\x6E\x41\x4D\x44\x49\x76\x72\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x49\x6E\x41\x4D\x44\x49\x76\x72\x5D","\x5B\x73\x79\x6E\x63\x4D\x61\x63\x68\x69\x6E\x65\x49\x76\x72\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D","\x5B\x73\x79\x6E\x63\x4D\x61\x63\x68\x69\x6E\x65\x49\x76\x72\x5D","\x69\x76\x72\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x49\x76\x72\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x49\x76\x72\x5D","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x50\x72\x6F\x6A\x65\x63\x74","\x41\x6E\x73\x77\x65\x72\x41\x47\x49","\x41\x47\x49","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x55\x6E\x6B\x6E\x6F\x77\x6E\x43\x61\x6C\x6C\x73\x44\x61\x79","\x63\x61\x75\x73\x65\x2D\x74\x78\x74","\x55\x6E\x6B\x6E\x6F\x77","\x72\x65\x61\x73\x6F\x6E","\x61\x67\x65\x6E\x74","\x61\x67\x69\x61\x66\x74\x65\x72\x61\x74","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x50\x72\x6F\x6A\x65\x63\x74\x32","\x64\x69\x61\x6C\x41\x67\x69\x41\x66\x74\x65\x72\x48\x61\x6E\x67\x75\x70\x41\x67\x65\x6E\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x71\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x43\x72\x65\x61\x74\x65\x53\x74\x61\x74\x65","\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x5D\x20\x5B\x44\x72\x6F\x70\x5D","\x64\x72\x6F\x70\x74\x69\x6D\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65\x74\x69\x6D\x65","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x54\x69\x6D\x65\x6F\x75\x74","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x44\x72\x6F\x70\x70\x65\x64\x43\x61\x6C\x6C\x73\x54\x69\x6D\x65\x6F\x75\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x72\x6F\x70\x43\x61\x6C\x6C\x73\x44\x61\x79\x54\x69\x6D\x65\x6F\x75\x74","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x45\x72\x6C\x61\x6E\x67\x43\x61\x6C\x6C\x73\x44\x72\x6F\x70\x70\x65\x64\x43\x61\x6C\x6C\x73","\x44\x72\x6F\x70","\x64\x72\x6F\x70\x72\x65\x61\x73\x6F\x6E","\x54\x49\x4D\x45\x4F\x55\x54","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x44\x72\x6F\x70\x70\x65\x64\x43\x61\x6C\x6C\x73\x43\x61\x6C\x6C\x65\x72\x73\x45\x78\x69\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x72\x6F\x70\x43\x61\x6C\x6C\x73\x44\x61\x79\x43\x61\x6C\x6C\x65\x72\x73\x45\x78\x69\x74","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x43\x41\x4C\x4C\x45\x52\x45\x58\x49\x54","\x73\x74\x72\x61\x74\x65\x67\x79","\x61\x63\x74\x69\x6F\x6E\x69\x64","\x6C\x6F\x63\x6B\x65\x64","\x31","\x70\x61\x75\x73\x65\x64","\x30","\x73\x74\x61\x74\x65\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x69\x64\x48\x6F\x70\x70\x65\x72","\x70\x75\x73\x68","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x5B\x75\x6E\x6C\x6F\x63\x6B\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x5D\x5B\x75\x6E\x64\x65\x66\x69\x6E\x65\x64\x5D","\x5B\x43\x61\x74\x63\x68\x5D\x5B\x50\x72\x65\x76\x69\x65\x77\x5D\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D","\x72\x75\x6E","\x5B\x75\x6E\x6C\x6F\x63\x6B\x5D\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D","\x5F\x72\x72","\x6C\x6F\x63\x6B\x52\x52","\x5B\x62\x6F\x6F\x6B\x65\x64\x5D\x5B\x75\x6E\x6C\x6F\x63\x6B\x5D","\x5B\x62\x6F\x6F\x6B\x65\x64\x5D\x5B\x75\x6E\x6C\x6F\x63\x6B\x32\x5D","\x5B\x75\x6E\x6C\x6F\x63\x6B\x32\x5D\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D","\x5B\x62\x6F\x6F\x6B\x65\x64\x5D\x5B\x75\x6E\x6C\x6F\x63\x6B\x33\x5D","\x5B\x75\x6E\x6C\x6F\x63\x6B\x33\x5D\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D","\x73\x79\x6E\x63\x43\x61\x6D\x70\x61\x69\x67\x6E\x73","\x63\x68\x65\x63\x6B\x49\x73\x54\x72\x75\x6E\x6B\x52\x65\x61\x63\x68\x61\x62\x6C\x65","\x54\x52\x55\x4E\x4B\x5F\x49\x53\x5F\x4E\x4F\x54\x5F\x52\x45\x41\x43\x48\x41\x42\x4C\x45","\x20\x74\x72\x75\x6E\x6B\x20\x69\x73\x20\x6E\x6F\x74\x20\x72\x65\x61\x63\x68\x61\x62\x6C\x65","\x63\x68\x65\x63\x6B\x49\x66\x54\x69\x6D\x65","\x69\x66\x54\x69\x6D\x65","\x63\x68\x65\x63\x6B\x49\x66\x54\x69\x6D\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x46\x61\x69\x6C\x75\x72\x65","\x20\x49\x6E\x74\x65\x72\x76\x61\x6C\x73\x20\x69\x73\x20\x6E\x75\x6C\x6C\x20","\x49\x4E\x54\x45\x52\x56\x41\x4C\x5F\x49\x53\x5F\x45\x4D\x50\x54\x59","\x20\x49\x6E\x74\x65\x72\x76\x61\x6C\x73\x20\x69\x73\x20\x65\x6D\x70\x74\x79\x20","\x74\x69\x6D\x65\x7A\x6F\x6E\x65\x73","\x54\x49\x4D\x45\x5A\x4F\x4E\x45\x5F\x55\x4E\x4B\x4E\x4F\x57","\x20\x54\x69\x6D\x65\x7A\x6F\x6E\x65\x20\x75\x6E\x6B\x6E\x6F\x77\x20","\x69\x73\x41\x72\x72\x61\x79","\x74\x72\x75\x65","\x69\x6E\x64\x65\x78\x4F\x66","\x63\x6F\x6E\x74\x65\x6E\x74","\x63\x6F\x6D\x6D\x61\x6E\x64","\x69\x66\x74\x69\x6D\x65\x20\x25\x73\x2C\x25\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C","","\x73\x6F\x6D\x65","\x47\x4C\x4F\x42\x41\x4C\x5F\x49\x4E\x54\x45\x52\x56\x41\x4C\x5F\x49\x53\x5F\x4F\x56\x45\x52\x54\x49\x4D\x45","\x49\x4E\x54\x45\x52\x56\x41\x4C\x5F\x49\x53\x5F\x4F\x56\x45\x52\x54\x49\x4D\x45","\x5B\x69\x66\x54\x69\x6D\x65\x5D\x5B\x70\x72\x6F\x6D\x69\x73\x65\x41\x6C\x6C\x5D","\x47\x6C\x6F\x62\x61\x6C\x3A\x20","\x20","\x20\x49\x6E\x74\x65\x72\x76\x61\x6C\x20\x69\x73\x20\x6F\x76\x65\x72\x74\x69\x6D\x65\x3A\x20","\x54\x69\x6D\x65\x7A\x6F\x6E\x65\x3A\x20","\x61\x6C\x6C","\x63\x68\x65\x63\x6B\x44\x69\x61\x6C\x4D\x65\x74\x68\x6F\x64","\x68\x61\x6E\x64\x6C\x65\x50\x6F\x77\x65\x72","\x70\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65","\x64\x69\x61\x6C\x50\x6F\x77\x65\x72\x4C\x65\x76\x65\x6C","\x70\x6F\x77\x65\x72","\x51\x75\x65\x75\x65","\x6D\x65\x74\x68\x6F\x64\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x64\x69\x61\x6C\x4D\x65\x74\x68\x6F\x64","\x6C\x61\x75\x6E\x63\x68\x48\x61\x6E\x64\x6C\x65\x49\x76\x72","\x68\x61\x6E\x64\x6C\x65\x49\x76\x72","\x64\x69\x61\x6C\x41\x63\x74\x69\x76\x65","\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79\x5D","\x64\x69\x61\x6C\x54\x69\x6D\x65\x7A\x6F\x6E\x65","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x49\x6E\x74\x65\x72\x76\x61\x6C","\x6C\x6F\x67\x67\x65\x64\x49\x6E","\x5B\x73\x79\x6E\x63\x43\x61\x6D\x70\x61\x69\x67\x6E\x73\x5D","\x61\x63\x74\x69\x6F\x6E\x4F\x72\x69\x67\x69\x6E\x61\x74\x65","\x76\x34","\x6F\x62\x6A\x65\x63\x74","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x20\x69\x73\x20\x75\x6E\x64\x65\x66\x69\x6E\x65","\x70\x68\x6F\x6E\x65","\x43\x6F\x6E\x74\x61\x63\x74","\x63\x6F\x6E\x74\x61\x63\x74\x20\x69\x73\x20\x75\x6E\x64\x65\x66\x69\x6E\x65","\x67\x65\x74\x43\x61\x6C\x6C\x65\x72","\x22\x61\x67\x69\x3A\x2F\x2F\x25\x73\x2F\x73\x71\x75\x61\x72\x65\x2C\x25\x73\x22","\x4E\x4F\x4E\x45","\x22\x25\x73\x2C\x25\x73\x25\x73\x2C\x2C\x2C\x25\x73\x22","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x4F\x70\x74\x69\x6F\x6E\x73","\x63","\x41\x43\x54\x49\x56\x45","\x58\x4D\x44\x2D\x41\x4D\x44\x49\x4E\x49\x54\x49\x41\x4C\x53\x49\x4C\x45\x4E\x43\x45","\x64\x69\x61\x6C\x41\x4D\x44\x49\x6E\x69\x74\x69\x61\x6C\x53\x69\x6C\x65\x6E\x63\x65","\x58\x4D\x44\x2D\x41\x4D\x44\x47\x52\x45\x45\x54\x49\x4E\x47","\x64\x69\x61\x6C\x41\x4D\x44\x47\x72\x65\x65\x74\x69\x6E\x67","\x58\x4D\x44\x2D\x41\x4D\x44\x41\x46\x54\x45\x52\x47\x52\x45\x45\x54\x49\x4E\x47\x53\x49\x4C\x45\x4E\x43\x45","\x64\x69\x61\x6C\x41\x4D\x44\x41\x66\x74\x65\x72\x47\x72\x65\x65\x74\x69\x6E\x67\x53\x69\x6C\x65\x6E\x63\x65","\x58\x4D\x44\x2D\x41\x4D\x44\x54\x4F\x54\x41\x4C\x41\x4E\x41\x4C\x59\x53\x49\x53\x54\x49\x4D\x45","\x64\x69\x61\x6C\x41\x4D\x44\x54\x6F\x74\x61\x6C\x41\x6E\x61\x6C\x79\x73\x69\x73\x54\x69\x6D\x65","\x58\x4D\x44\x2D\x41\x4D\x44\x4D\x49\x4E\x57\x4F\x52\x44\x4C\x45\x4E\x47\x54\x48","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x69\x6E\x57\x6F\x72\x64\x4C\x65\x6E\x67\x74\x68","\x58\x4D\x44\x2D\x41\x4D\x44\x42\x45\x54\x57\x45\x45\x4E\x57\x4F\x52\x44\x53\x53\x49\x4C\x45\x4E\x43\x45","\x64\x69\x61\x6C\x41\x4D\x44\x42\x65\x74\x77\x65\x65\x6E\x57\x6F\x72\x64\x73\x53\x69\x6C\x65\x6E\x63\x65","\x58\x4D\x44\x2D\x41\x4D\x44\x4D\x41\x58\x49\x4D\x55\x4D\x4E\x55\x4D\x42\x45\x52\x4F\x46\x57\x4F\x52\x44\x53","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x61\x78\x69\x6D\x75\x6D\x4E\x75\x6D\x62\x65\x72\x4F\x66\x57\x6F\x72\x64\x73","\x58\x4D\x44\x2D\x41\x4D\x44\x53\x49\x4C\x45\x4E\x43\x45\x54\x48\x52\x45\x53\x48\x4F\x4C\x44","\x64\x69\x61\x6C\x41\x4D\x44\x53\x69\x6C\x65\x6E\x63\x65\x54\x68\x72\x65\x73\x68\x6F\x6C\x64","\x58\x4D\x44\x2D\x41\x4D\x44\x4D\x41\x58\x49\x4D\x55\x4D\x57\x4F\x52\x44\x4C\x45\x4E\x47\x54\x48","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x61\x78\x69\x6D\x75\x6D\x57\x6F\x72\x64\x4C\x65\x6E\x67\x74\x68","\x58\x4D\x44\x2D\x56\x4F\x49\x43\x45\x51\x55\x45\x55\x45\x49\x44","\x58\x4D\x44\x2D\x43\x41\x4D\x50\x41\x49\x47\x4E\x49\x44","\x69\x64","\x74\x61\x67\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x25\x73\x25\x73","\x58\x4D\x44\x2D","\x74\x6F\x55\x70\x70\x65\x72","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x46\x61\x69\x6C\x75\x72\x65\x43\x61\x6C\x6C\x73\x44\x61\x79","\x5B\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x45\x72\x72\x6F\x72\x5D\x3A\x20\x25\x73","\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x45\x72\x72\x6F\x72","\x5B\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x5B\x65\x72\x72\x6F\x72\x5D","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x20\x61\x63\x74\x69\x6F\x6E\x20\x45\x72\x72\x6F\x72","\x53\x49\x50\x2F\x25\x73\x2F\x25\x73\x25\x73","\x54\x72\x75\x6E\x6B","\x64\x69\x61\x6C\x50\x72\x65\x66\x69\x78","\x74\x72\x69\x6D","\x54\x72\x75\x6E\x6B\x42\x61\x63\x6B\x75\x70","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x61\x6D\x65","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x75\x6D\x62\x65\x72","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x54\x69\x6D\x65\x6F\x75\x74","\x67\x65\x74\x51\x75\x65\x75\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x5D\x20","\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67","\x63\x68\x65\x63\x6B\x52\x65\x74\x72\x69\x76\x65\x4D\x61\x78","\x63\x6F\x75\x6E\x74\x62\x75\x73\x79\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x6E\x6F\x61\x6E\x73\x77\x65\x72\x72\x65\x74\x72\x79","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x4D\x61\x78\x52\x65\x74\x72\x79","\x5B\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x4E\x6F\x41\x6E\x73\x77\x65\x72\x5D","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x6D\x69\x6E\x75\x74\x65\x73","\x61\x64\x64","\x64\x69\x61\x6C\x42\x75\x73\x79\x4D\x61\x78\x52\x65\x74\x72\x79","\x5B\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x20\x5B\x42\x75\x73\x79\x5D","\x64\x69\x61\x6C\x42\x75\x73\x79\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x4D\x61\x78\x52\x65\x74\x72\x79","\x5B\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x20\x5B\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x5D","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x5D","\x65\x6E\x74\x69\x74\x79\x20\x69\x73\x20\x75\x6E\x64\x65\x66\x69\x6E\x65","\x65\x76\x74\x20\x69\x73\x20\x75\x6E\x64\x65\x66\x69\x6E\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4E\x6F\x53\x75\x63\x68\x43\x61\x6C\x6C\x73\x44\x61\x79","\x4E\x6F\x53\x75\x63\x68\x4E\x75\x6D\x62\x65\x72","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D\x5B\x30\x5D","\x72\x65\x61\x73\x6F\x6E\x20\x30\x20\x6E\x6F\x20\x73\x75\x63\x68\x20\x6E\x75\x6D\x62\x65\x72\x2E\x2E\x2E\x2E","\x73\x74\x61\x74\x65\x47\x6C\x6F\x62\x61\x6C","\x63\x72\x65\x61\x74\x65\x53\x74\x61\x74\x65\x46\x69\x6E\x61\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4E\x6F\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x4E\x6F\x41\x6E\x73\x77\x65\x72","\x63\x6F\x75\x6E\x74\x67\x6C\x6F\x62\x61\x6C","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D\x5B\x33\x5D","\x72\x65\x61\x73\x6F\x6E\x20\x33\x20\x72\x69\x6E\x67\x69\x6E\x67\x20\x6E\x6F\x20\x61\x6E\x73\x77\x65\x72","\x33","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x42\x75\x73\x79\x43\x61\x6C\x6C\x73\x44\x61\x79","\x42\x75\x73\x79","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D\x5B\x35\x5D","\x72\x65\x61\x73\x6F\x6E\x20\x35\x20\x62\x75\x73\x79","\x35","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x43\x61\x6C\x6C\x73\x44\x61\x79","\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D\x5B\x38\x5D","\x72\x65\x61\x73\x6F\x6E\x20\x38\x20\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E","\x38","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D\x5B\x3F\x5D","\x47\x6C\x6F\x62\x61\x6C","\x5B\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x64\x44\x69\x61\x6C\x65\x72\x5D\x5B\x30\x5D","\x63\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x6D\x6F\x76\x65\x64","\x64\x69\x61\x6C\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x4F\x70\x74\x69\x6D\x69\x7A\x61\x74\x69\x6F\x6E\x50\x65\x72\x63\x65\x6E\x74\x61\x67\x65","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x50\x61\x75\x73\x65\x73","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x4C\x6F\x77\x65\x72\x4C\x69\x6D\x69\x74","\x65\x72\x6C\x61\x6E\x67\x43\x61\x6C\x6C\x73","\x65\x72\x6C\x61\x6E\x67\x41\x62\x61\x6E\x64\x6F\x6E\x6D\x65\x6E\x74\x52\x61\x74\x65","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x48\x69\x74\x52\x61\x74\x65","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x4D\x75\x6C\x74\x69\x70\x6C\x69\x63\x61\x74\x69\x76\x65\x46\x61\x63\x74\x6F\x72","\x66\x6C\x6F\x6F\x72","\x5B\x73\x74\x61\x72\x74\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x53\x74\x61\x72\x74\x50\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65\x5D\x5B\x46\x69\x72\x73\x74\x5D","\x5B\x73\x74\x61\x72\x74\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x53\x74\x61\x72\x74\x50\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65\x5D","\x63\x68\x65\x63\x6B\x20\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x20\x69\x73\x20\x6E\x6F\x74\x20\x75\x6E\x64\x65\x66\x69\x6E\x65","\x63\x68\x65\x63\x6B\x20\x68\x61\x6E\x64\x6C\x65\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x20\x69\x73\x20\x6E\x6F\x74\x20\x75\x6E\x64\x65\x66\x69\x6E\x65","\x5B\x73\x74\x61\x72\x74\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x53\x74\x61\x72\x74\x50\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65\x5D\x5B\x44\x61\x74\x65\x5D","\x64\x69\x61\x6C\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C","\x5B\x73\x74\x61\x72\x74\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x53\x74\x61\x72\x74\x50\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65\x5D\x5B\x4C\x6F\x6F\x70\x5D","\x64\x69\x61\x6C\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x4F\x70\x74\x69\x6D\x69\x7A\x61\x74\x69\x6F\x6E","\x64\x72\x6F\x70\x52\x61\x74\x65","\x5B\x73\x74\x6F\x70\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x52\x65\x53\x74\x61\x72\x74\x50\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65\x5D\x5B\x45\x78\x63\x65\x65\x64\x65\x64\x44\x72\x6F\x70\x44\x61\x79\x5D","\x44\x72\x6F\x70\x70\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x64\x61\x79","\x5B\x73\x74\x6F\x70\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x52\x65\x53\x74\x61\x72\x74\x50\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65\x5D\x5B\x4C\x6F\x77\x65\x72\x4C\x69\x6D\x69\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x5D","\x41\x67\x65\x6E\x74\x20\x66\x72\x65\x65","\x61\x67\x65\x6E\x74\x20\x6D\x61\x78\x20\x66\x72\x65\x65\x20","\x5B\x73\x74\x6F\x70\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x52\x65\x53\x74\x61\x72\x74\x50\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65\x5D\x5B\x45\x78\x63\x65\x65\x64\x65\x64\x44\x72\x6F\x70\x49\x6E\x74\x65\x72\x76\x61\x6C\x5D","\x4D\x61\x78\x20\x44\x72\x6F\x70\x20","\x44\x72\x6F\x70\x20\x69\x6E\x20\x74\x68\x69\x73\x20\x69\x6E\x74\x65\x72\x76\x61\x6C","\x5B\x73\x74\x61\x72\x74\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x53\x74\x61\x72\x74\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x46\x69\x72\x73\x74\x5D","\x5B\x61\x76\x65\x72\x61\x67\x65\x48\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65\x5D\x5B\x45\x72\x6C\x61\x6E\x67\x42\x5D\x20","\x73\x74\x61\x72\x74\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x67\x65\x74\x44\x61\x74\x61\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x5B\x73\x74\x61\x72\x74\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x53\x74\x61\x72\x74\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x52\x65\x70\x65\x61\x74\x5D","\x5B\x43\x61\x74\x63\x68\x45\x72\x6C\x61\x6E\x67\x42\x5D","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x51\x75\x65\x75\x65\x50\x61\x75\x73\x65\x73","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x41\x6E\x73\x77\x65\x72\x65\x64\x43\x61\x6C\x6C\x73","\x61\x62\x61\x6E\x64\x6F\x6E\x6D\x65\x6E\x74\x52\x61\x74\x65","\x61\x67\x65\x6E\x74\x42\x75\x73\x79\x46\x61\x63\x74\x6F\x72","\x62\x75\x73\x79\x46\x61\x63\x74\x6F\x72","\x5B\x67\x65\x74\x44\x61\x74\x61\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D","\x63\x68\x65\x63\x6B\x20\x66\x61\x69\x6C\x75\x72\x65","\x65\x72\x6C\x61\x6E\x67\x43\x61\x6C\x6C\x54\x6F\x53\x65\x63\x6F\x6E\x64","\x5B\x73\x74\x61\x72\x74\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D","\x5B\x68\x61\x6E\x64\x6C\x65\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D","\x5B\x73\x74\x61\x72\x74\x4D\x65\x74\x68\x6F\x64\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73\x5D\x20","\x46\x61\x69\x6C\x75\x72\x65\x20","\x63\x68\x65\x63\x6B\x43\x6F\x6E\x74\x61\x63\x74\x42\x6C\x61\x63\x6B","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x5B\x75\x6E\x6C\x6F\x63\x6B\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D","\x71\x75\x65\x75\x65\x73\x74\x61\x74\x75\x73","\x5B\x62\x6F\x6F\x6B\x65\x64\x5D","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x64\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x4D\x65\x54\x69\x6D\x65\x6F\x75\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x52\x65\x43\x61\x6C\x6C\x73\x44\x61\x79","\x64\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x49\x6E\x51\x75\x65\x75\x65","\x5B\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x64\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x49\x6E\x51\x75\x65\x75\x65\x5D","\x5B\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x5B\x48\x69\x73\x74\x6F\x72\x79\x44\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x49\x6E\x51\x75\x65\x75\x65\x5D\x5B\x68\x69\x73\x74\x6F\x72\x79\x43\x61\x74\x63\x68\x5D","\x52\x45\x43\x41\x4C\x4C\x49\x4E\x51\x55\x45\x55\x45","\x52\x65\x63\x61\x6C\x6C\x49\x6E\x51\x75\x65\x75\x65","\x52\x45\x43\x41\x4C\x4C\x46\x41\x49\x4C\x45\x44\x54\x49\x4D\x45\x4F\x55\x54","\x52\x65\x63\x61\x6C\x6C\x46\x61\x69\x6C\x65\x64\x54\x69\x6D\x65\x6F\x75\x74","\x5B\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x5B\x48\x69\x73\x74\x6F\x72\x79\x52\x65\x63\x61\x6C\x6C\x43\x6C\x6F\x73\x65\x5D\x5B\x68\x69\x73\x74\x6F\x72\x79\x43\x61\x74\x63\x68\x5D","\x5B\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x5B\x48\x69\x73\x74\x6F\x72\x79\x52\x65\x63\x61\x6C\x6C\x43\x6C\x6F\x73\x65\x5D","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74\x43\x61\x6C\x6C\x73\x44\x61\x79","\x42\x4C\x41\x43\x4B\x4C\x49\x53\x54","\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74","\x5B\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x5B\x68\x69\x73\x74\x6F\x72\x79\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74\x5D","\x5B\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x5B\x4D\x6F\x76\x65\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74\x5D","\x69\x6E\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74","\x6C\x69\x6D\x69\x74\x43\x61\x6C\x6C\x73","\x74\x65\x6D\x70","\x5B\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x32\x5D","\x5B\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x32\x5D\x5B\x45\x6D\x70\x74\x79\x5D","\x52\x55\x4E\x4E\x49\x4E\x47","\x69\x76\x72\x54\x6F\x74\x61\x6C\x43\x61\x6C\x6C\x73\x44\x61\x79\x73","\x5B\x61\x63\x74\x69\x6F\x6E\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x20","\x5B\x61\x63\x74\x69\x6F\x6E\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x49\x76\x72\x5D\x20","\x43\x6F\x6E\x74\x61\x63\x74\x2E\x70\x68\x6F\x6E\x65","\x64\x69\x61\x6C\x4F\x72\x64\x65\x72\x42\x79\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x64\x69\x61\x6C\x4C\x69\x6D\x69\x74\x51\x75\x65\x75\x65","\x6E\x6F\x74\x5F\x69\x6E\x75\x73\x65","\x5B\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72\x32\x5D","\x74\x72\x79\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x5B\x68\x61\x6E\x64\x6C\x65\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x5B\x6C\x69\x6D\x69\x74\x43\x68\x61\x6E\x6E\x65\x6C\x5D","\x5B\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D","\x5B\x61\x63\x74\x69\x6F\x6E\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x5D\x20","\x5B\x61\x62\x61\x6E\x64\x6F\x6E\x6D\x65\x6E\x74\x52\x61\x74\x65\x5D","\x20\x6D\x20\x3D\x20","\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x20\x3D\x20","\x20\x54\x73\x20\x3D\x20","\x20\x70\x20\x3D\x20","\x20\x41\x6D\x61\x78\x20\x3D\x20","\x6D\x20\x3D\x20","\x54\x73\x20\x3D\x20","\x70\x20\x3D\x20","\x69\x6E\x74\x65\x72\x76\x61\x6C\x20\x3D\x20","\x41\x6D\x61\x78\x20\x3D\x20","\x5B\x62\x75\x73\x79\x46\x61\x63\x74\x6F\x72\x5D","\x20\x55\x6D\x69\x6E\x20\x3D\x20","\x65\x78\x70\x6F\x72\x74\x73"];_0x7460[0];var util=require(_0x7460[1]);var _=require(_0x7460[2]);var BPromise=require(_0x7460[3]);var uuid=require(_0x7460[4]);var moment=require(_0x7460[5]);var rr=require(_0x7460[6]);var logger=require(_0x7460[8])(_0x7460[7]);var loggerBooked=require(_0x7460[8])(_0x7460[9]);var loggerPredictive=require(_0x7460[8])(_0x7460[10]);var loggerPredictiveCalls=require(_0x7460[8])(_0x7460[11]);var loggerSyncQueueSummary=require(_0x7460[8])(_0x7460[12]);var config=require(_0x7460[13]);var ami=require(_0x7460[14]);var io=require(_0x7460[16])({host:_0x7460[15],port:6379});var cmHopper=require(_0x7460[17]);var cmHopperFinal=require(_0x7460[18]);var cmHopperHistory=require(_0x7460[19]);var cmHopperBlack=require(_0x7460[20]);var voiceQueueRt=require(_0x7460[21]);var Action=require(_0x7460[22]);var History=require(_0x7460[23]);var Final=require(_0x7460[24]);var AgentComplete=require(_0x7460[25]);var QueueCallerAbandon=require(_0x7460[26]);var Hangup=require(_0x7460[27]);var ipAgi=process[_0x7460[29]][_0x7460[28]]|| _0x7460[30];var strategy={rrmemory:_0x7460[31],roundrobin:_0x7460[32]};var Sequence=function(){};Sequence[_0x7460[34]][_0x7460[33]]= function(_0xdcd9x1d){this[_0x7460[35]]= this[_0x7460[35]]?this[_0x7460[35]][_0x7460[36]](_0xdcd9x1d):_0xdcd9x1d()};function Dialer(_0xdcd9x1f,_0xdcd9x20){this[_0x7460[37]]=  new Sequence();this[_0x7460[38]]= _0xdcd9x20;this[_0x7460[39]]= _0xdcd9x1f[_0x7460[39]];this[_0x7460[40]]= _0xdcd9x1f[_0x7460[40]];this[_0x7460[41]]= _0xdcd9x1f[_0x7460[41]];this[_0x7460[42]]= _0xdcd9x1f[_0x7460[42]];this[_0x7460[43]]= config[_0x7460[43]]|| 2;this[_0x7460[44]]= {};this[_0x7460[45]]= {};this[_0x7460[46]]= {};this[_0x7460[47]]= {};this[_0x7460[48]]= {};this[_0x7460[49]]= {};this[_0x7460[50]]= {};this[_0x7460[51]]= {};this[_0x7460[52]]= {};this[_0x7460[53]]= {};ami[_0x7460[57]](_0x7460[54],this[_0x7460[56]][_0x7460[55]](this));ami[_0x7460[57]](_0x7460[58],this[_0x7460[59]][_0x7460[55]](this));ami[_0x7460[57]](_0x7460[60],this[_0x7460[61]][_0x7460[55]](this));ami[_0x7460[57]](_0x7460[62],this[_0x7460[63]][_0x7460[55]](this));ami[_0x7460[57]](_0x7460[64],this[_0x7460[12]][_0x7460[55]](this));ami[_0x7460[57]](_0x7460[65],this[_0x7460[66]][_0x7460[55]](this));ami[_0x7460[57]](_0x7460[67],this[_0x7460[68]][_0x7460[55]](this));ami[_0x7460[57]](_0x7460[69],this[_0x7460[70]][_0x7460[55]](this));ami[_0x7460[57]](_0x7460[71],this[_0x7460[72]][_0x7460[55]](this));ami[_0x7460[57]](_0x7460[73],this[_0x7460[74]][_0x7460[55]](this));this[_0x7460[75]]();this[_0x7460[76]]()}function isNotNull(_0xdcd9x22){return _0xdcd9x22!== null&&  !_[_0x7460[77]](_0xdcd9x22)}function checkIsLoggedIn(_0xdcd9x24,_0xdcd9x25){return function(){if(_0xdcd9x25<= 0){_0xdcd9x24[_0x7460[78]]= _0x7460[79];throw _0xdcd9x24[_0x7460[80]]+ _0x7460[81]}}}function isActive(_0xdcd9x27){return _0xdcd9x27}function checkIsActive(_0xdcd9x24,_0xdcd9x27){return function(){if(!isActive(_0xdcd9x27)){_0xdcd9x24[_0x7460[78]]= _0x7460[82];throw _0xdcd9x24[_0x7460[80]]+ _0x7460[83]}}}function checkInterval(_0xdcd9x24){return function(){if(!isNotNull(_0xdcd9x24.Interval)){_0xdcd9x24[_0x7460[78]]= _0x7460[84];throw _0xdcd9x24[_0x7460[80]]+ _0x7460[85]};if(!isNotNull(_0xdcd9x24[_0x7460[86]].Intervals)){_0xdcd9x24[_0x7460[78]]= _0x7460[84];throw _0xdcd9x24[_0x7460[80]]+ _0x7460[85]};if(!isNotNull(_[_0x7460[87]](_0xdcd9x24[_0x7460[86]].Intervals))){_0xdcd9x24[_0x7460[78]]= _0x7460[84];throw _0xdcd9x24[_0x7460[80]]+ _0x7460[85]}}}function msgResponse(_0xdcd9x2b,_0xdcd9x2c,_0xdcd9x2d){return {action:_0xdcd9x2b,response:_0xdcd9x2c,message:_0xdcd9x2d}}function myreject(_0xdcd9x2f){return function(_0xdcd9x30){return _0xdcd9x2f(msgResponse(_0x7460[88],_0x7460[89],JSON[_0x7460[90]](_0xdcd9x30)))}}function getSeconds(_0xdcd9x32,_0xdcd9x33){var _0xdcd9x34=moment(_0xdcd9x32)[_0x7460[91]](0);var _0xdcd9x35=moment(_0xdcd9x33)[_0x7460[91]](0);return _0xdcd9x34[_0x7460[93]](_0xdcd9x35,_0x7460[92])}function emit(_0xdcd9x37,_0xdcd9x38,_0xdcd9x22){io[_0x7460[95]](_0xdcd9x37)[_0x7460[94]](_0xdcd9x38,_0xdcd9x22)}function emitVoiceQueueSummary(_0xdcd9x22){if(_0xdcd9x22[_0x7460[96]]=== _0x7460[97]){emit(util[_0x7460[99]](_0x7460[98],_0xdcd9x22[_0x7460[80]]),_0x7460[100],_[_0x7460[102]](_0xdcd9x22,[_0x7460[101]]))}}function emitCampaignSummary(_0xdcd9x22){if(_0xdcd9x22[_0x7460[96]]=== _0x7460[103]){emit(util[_0x7460[99]](_0x7460[104],_0xdcd9x22[_0x7460[80]]),_0x7460[105],_0xdcd9x22)}}function checkGetDataPredictive(_0xdcd9x22){if(isNotNull(_0xdcd9x22)){if(!_[_0x7460[87]](_0xdcd9x22)){if(_0xdcd9x22[_0x7460[106]]> 0){if(!_[_0x7460[77]](_0xdcd9x22[_0x7460[107]])&& _0xdcd9x22[_0x7460[107]]> 0){return true}else {loggerPredictive[_0x7460[109]](_0x7460[108],JSON[_0x7460[90]](_0xdcd9x22))};if(!_[_0x7460[77]](_0xdcd9x22[_0x7460[110]])&& _0xdcd9x22[_0x7460[110]]> 0){return true}else {loggerPredictive[_0x7460[109]](_0x7460[111],JSON[_0x7460[90]](_0xdcd9x22))}}else {loggerPredictive[_0x7460[109]](_0x7460[112],JSON[_0x7460[90]](_0xdcd9x22))}}else {loggerPredictive[_0x7460[109]](_0x7460[113],JSON[_0x7460[90]](_0xdcd9x22))}}else {loggerPredictive[_0x7460[109]](_0x7460[114],JSON[_0x7460[90]](_0xdcd9x22))};return false}function mergeDataErlangB(_0xdcd9x3d){return function(_0xdcd9x3e){loggerPredictive[_0x7460[109]](_0x7460[115],JSON[_0x7460[90]](_0xdcd9x3e));_[_0x7460[116]](_0xdcd9x3d,_0xdcd9x3e)}}function getDiff(_0xdcd9x33){var _0xdcd9x34=moment()[_0x7460[91]](0);var _0xdcd9x35=moment(_0xdcd9x33)[_0x7460[91]](0);return _0xdcd9x34[_0x7460[93]](_0xdcd9x35,_0x7460[92])}function ifInterval(_0xdcd9x41,_0xdcd9x42){if(_[_0x7460[77]](_0xdcd9x42)){return false};if(getDiff(_0xdcd9x42)< _0xdcd9x41* 60){return true}else {return false}}function freeVariablesPredictive(_0xdcd9x3d){if(isNotNull(_0xdcd9x3d)){if(!_[_0x7460[77]](_0xdcd9x3d[_0x7460[50]])){_0xdcd9x3d[_0x7460[50]]= undefined;loggerPredictive[_0x7460[109]](_0x7460[117],_0x7460[50],_0xdcd9x3d[_0x7460[80]])};if(!_[_0x7460[77]](_0xdcd9x3d[_0x7460[49]])){_0xdcd9x3d[_0x7460[49]]= undefined;loggerPredictive[_0x7460[109]](_0x7460[117],_0x7460[49],_0xdcd9x3d[_0x7460[80]])};if(!_[_0x7460[77]](_0xdcd9x3d[_0x7460[101]])){clearInterval(_0xdcd9x3d[_0x7460[101]]);_0xdcd9x3d[_0x7460[101]]= undefined;loggerPredictive[_0x7460[109]](_0x7460[117],_0x7460[101],_0xdcd9x3d[_0x7460[80]])}}}function erlangb(_0xdcd9x45,_0xdcd9x46){if(_0xdcd9x46=== 0){return 0};var _0xdcd9x47=1;for(var _0xdcd9x48=1;_0xdcd9x48<= _0xdcd9x46;_0xdcd9x48+= 1){_0xdcd9x47= 1+ _0xdcd9x47* _0xdcd9x48/ _0xdcd9x45};return 1/ _0xdcd9x47}function isVoiceQueueOutbound(_0xdcd9x4a){return _0xdcd9x4a=== _0x7460[97]}function isNotPreview(_0xdcd9x4c){return _0xdcd9x4c!== _0x7460[38]}function isCampaignIvr(_0xdcd9x4a){return _0xdcd9x4a=== _0x7460[103]}function getCallerId(_0xdcd9x4f,_0xdcd9x50,_0xdcd9x51){if(!_[_0x7460[77]](_0xdcd9x51)&& _0x7460[118]===  typeof _0xdcd9x51){if(!_[_0x7460[77]](_0xdcd9x50)&& _0x7460[118]===  typeof _0xdcd9x50){return util[_0x7460[99]](_0x7460[119],_0xdcd9x50,_0xdcd9x51)};return util[_0x7460[99]](_0x7460[119],_0xdcd9x51,_0xdcd9x51)};if(!_[_0x7460[77]](_0xdcd9x4f)&& _0x7460[118]===  typeof _0xdcd9x4f){return _0xdcd9x4f};return _0x7460[120]}function loggerCatchQueueSummary(_0xdcd9x53,_0xdcd9x3d){return function(_0xdcd9x30){freeVariablesPredictive(_0xdcd9x3d);emitVoiceQueueSummary(_0xdcd9x3d);emitCampaignSummary(_0xdcd9x3d);loggerSyncQueueSummary[_0x7460[122]](_0xdcd9x53,util[_0x7460[121]](_0xdcd9x30,{showHidden:false,depth:null}))}}function loggerCatchPredictive(_0xdcd9x53,_0xdcd9x3d){return function(_0xdcd9x30){loggerPredictive[_0x7460[122]](_0xdcd9x53,JSON[_0x7460[90]](_0xdcd9x30));freeVariablesPredictive(_0xdcd9x3d)}}function loggerCatch(_0xdcd9x53){return function(_0xdcd9x30){logger[_0x7460[122]](_0xdcd9x53,util[_0x7460[121]](_0xdcd9x30,{showHidden:false,depth:null}))}}function checkContactEmpty(_0xdcd9x3e){return _0xdcd9x3e&&  !_[_0x7460[77]](_0xdcd9x3e)&& (_0xdcd9x3e[_0x7460[123]]> 0)}function decremetOriginate(_0xdcd9x22){if(!_[_0x7460[77]](_0xdcd9x22)&& _0xdcd9x22!== null){if(_0xdcd9x22[_0x7460[125]](_0x7460[124])){if(_0xdcd9x22[_0x7460[124]]> 0){_0xdcd9x22[_0x7460[124]]-= 1}else {logger[_0x7460[122]](_0x7460[126])}}}else {logger[_0x7460[122]](_0x7460[127])}}function checkContactLowerLimitOriginate(_0xdcd9x3d,_0xdcd9x59,_0xdcd9x5a){if(_0xdcd9x59> _0xdcd9x5a){for(var _0xdcd9x5b=0;_0xdcd9x5b< _0xdcd9x59- _0xdcd9x5a;_0xdcd9x5b+= 1){decremetOriginate(_0xdcd9x3d)}}}function loggerGetContactDialer(_0xdcd9x53,_0xdcd9x3d,_0xdcd9x5d){return function(_0xdcd9x30){checkContactLowerLimitOriginate(_0xdcd9x3d,_0xdcd9x5d,0);logger[_0x7460[122]](_0xdcd9x53,util[_0x7460[121]](_0xdcd9x30,{showHidden:false,depth:null}))}}function sendMessageReschedule(_0xdcd9x24){return function(_0xdcd9x5f){if(isNotNull(_0xdcd9x5f)&& isNotNull(_0xdcd9x5f[0])){if(_0xdcd9x5f[0][_0x7460[128]]> 0){_0xdcd9x24[_0x7460[78]]= _0x7460[129];logger[_0x7460[109]](_0x7460[130]+ _0xdcd9x24[_0x7460[80]],_0xdcd9x5f[0][_0x7460[128]],_0x7460[131])}else {_0xdcd9x24[_0x7460[78]]= _0x7460[132];logger[_0x7460[109]](_0x7460[133]+ _0xdcd9x24[_0x7460[80]])}}}}function notSendMessagesQueue(_0xdcd9x3d){if(_0xdcd9x3d[_0x7460[134]]){freeVariablesPredictive(_0xdcd9x3d);if(_0xdcd9x3d[_0x7460[124]]=== 0&& _0xdcd9x3d[_0x7460[135]]=== 0&& _0xdcd9x3d[_0x7460[136]]=== 0&& (_0xdcd9x3d[_0x7460[137]]|| 0)=== 0){_0xdcd9x3d[_0x7460[134]]= false;_0xdcd9x3d[_0x7460[138]]= 0;_0xdcd9x3d[_0x7460[78]]= _0x7460[82];loggerSyncQueueSummary[_0x7460[122]](_0x7460[139],_0xdcd9x3d[_0x7460[80]],_0x7460[140])}else {_0xdcd9x3d[_0x7460[78]]= _0x7460[141];loggerSyncQueueSummary[_0x7460[122]](_0x7460[139],_0xdcd9x3d[_0x7460[80]],_0x7460[142])};emitVoiceQueueSummary(_0xdcd9x3d)}}function notSendMessagesCampaign(_0xdcd9x62){if(_0xdcd9x62[_0x7460[134]]){if(_0xdcd9x62[_0x7460[124]]=== 0){_0xdcd9x62[_0x7460[134]]= false;_0xdcd9x62[_0x7460[78]]= _0x7460[82];loggerSyncQueueSummary[_0x7460[122]](_0x7460[143],_0xdcd9x62[_0x7460[80]],_0x7460[140])}else {_0xdcd9x62[_0x7460[78]]= _0x7460[141];loggerSyncQueueSummary[_0x7460[122]](_0x7460[143],_0xdcd9x62[_0x7460[80]],_0x7460[142])};emitCampaignSummary(_0xdcd9x62)}}function createObjHistory(_0xdcd9x3d,_0xdcd9x64,_0xdcd9x2d,_0xdcd9x65,_0xdcd9x66){_0xdcd9x3d[_0x7460[78]]= _0xdcd9x2d;var _0xdcd9x2b= new Action(_0xdcd9x3d,_0xdcd9x64);var _0xdcd9x67= new History(_0xdcd9x2b);_0xdcd9x67[_0x7460[144]]= _0xdcd9x65;_0xdcd9x67[_0x7460[145]]= _0xdcd9x66;_0xdcd9x67[_0x7460[146]]= _0xdcd9x2b[_0x7460[147]];return _0xdcd9x67}Dialer[_0x7460[34]][_0x7460[76]]= function(){var _0xdcd9x68=this;setInterval(function(){_0xdcd9x68[_0x7460[149]](_0xdcd9x68[_0x7460[47]],_0x7460[148]);_0xdcd9x68[_0x7460[149]](_0xdcd9x68[_0x7460[45]],_0x7460[150])},13000)};Dialer[_0x7460[34]][_0x7460[149]]= function(_0xdcd9x69,_0xdcd9x53){var _0xdcd9x68=this;for(var _0xdcd9x6a in _0xdcd9x69){if(_0xdcd9x69[_0x7460[125]](_0xdcd9x6a)){this[_0x7460[37]][_0x7460[33]](function(){if(!_[_0x7460[151]](_0xdcd9x69[_0xdcd9x6a])){return ami.Action({action:_0x7460[158],channel:_0xdcd9x69[_0xdcd9x6a][_0x7460[159]]})[_0x7460[157]](function(_0xdcd9x30){if(_0xdcd9x30[_0x7460[78]]=== _0x7460[152]){setTimeout(function(){if(_0xdcd9x69[_0xdcd9x6a]&& _0xdcd9x69[_0xdcd9x6a][_0x7460[96]]!== _0x7460[103]){_0xdcd9x68[_0x7460[154]](_0xdcd9x68[_0x7460[39]][_0xdcd9x69[_0xdcd9x6a][_0x7460[153]]]);logger[_0x7460[122]](_0x7460[155],_0xdcd9x53,_0xdcd9x6a,_0xdcd9x69[_0xdcd9x6a][_0x7460[153]]);delete _0xdcd9x69[_0xdcd9x6a]};if(_0xdcd9x69[_0xdcd9x6a]&& _0xdcd9x69[_0xdcd9x6a][_0x7460[96]]=== _0x7460[103]){_0xdcd9x68[_0x7460[154]](_0xdcd9x68[_0x7460[40]][_0xdcd9x69[_0xdcd9x6a][_0x7460[153]]]);logger[_0x7460[122]](_0x7460[156],_0xdcd9x53,_0xdcd9x6a,_0xdcd9x69[_0xdcd9x6a][_0x7460[153]]);delete _0xdcd9x69[_0xdcd9x6a]}},9000)}})}})}}};Dialer[_0x7460[34]][_0x7460[160]]= function(_0xdcd9x6b){return BPromise[_0x7460[163]]()[_0x7460[162]](cmHopper[_0x7460[160]](_0xdcd9x6b))[_0x7460[157]](loggerCatch(_0x7460[161]))};Dialer[_0x7460[34]][_0x7460[164]]= function(_0xdcd9x64){return BPromise[_0x7460[163]]()[_0x7460[162]](cmHopperBlack[_0x7460[164]](_0xdcd9x64))[_0x7460[157]](loggerCatch(_0x7460[165]))};Dialer[_0x7460[34]][_0x7460[166]]= function(_0xdcd9x64){return BPromise[_0x7460[163]]()[_0x7460[162]](cmHopperBlack[_0x7460[166]](_0xdcd9x64))[_0x7460[157]](loggerCatch(_0x7460[167]))};Dialer[_0x7460[34]][_0x7460[168]]= function(_0xdcd9x6c){return BPromise[_0x7460[163]]()[_0x7460[162]](cmHopperHistory[_0x7460[170]](_0xdcd9x6c))[_0x7460[157]](loggerCatch(_0x7460[169]))};Dialer[_0x7460[34]][_0x7460[171]]= function(_0xdcd9x6d){return BPromise[_0x7460[163]]()[_0x7460[162]](cmHopper[_0x7460[171]](_0xdcd9x6d))[_0x7460[157]](loggerCatch(_0x7460[172]))};Dialer[_0x7460[34]][_0x7460[173]]= function(_0xdcd9x6e,_0xdcd9x6f,_0xdcd9x59,_0xdcd9x70){return BPromise[_0x7460[163]]()[_0x7460[162]](cmHopper[_0x7460[173]](_0xdcd9x6e,_0xdcd9x6f,_0xdcd9x59,_0xdcd9x70))[_0x7460[157]](loggerCatch(_0x7460[174]))};Dialer[_0x7460[34]][_0x7460[175]]= function(_0xdcd9x71,_0xdcd9x59,_0xdcd9x70){return BPromise[_0x7460[163]]()[_0x7460[162]](cmHopper[_0x7460[175]](_0xdcd9x71,_0xdcd9x59,_0xdcd9x70))[_0x7460[157]](loggerCatch(_0x7460[174]))};Dialer[_0x7460[34]][_0x7460[176]]= function(_0xdcd9x6b){return BPromise[_0x7460[163]]()[_0x7460[162]](voiceQueueRt[_0x7460[176]](_0xdcd9x6b))[_0x7460[157]](loggerCatch(_0x7460[177]))};Dialer[_0x7460[34]][_0x7460[178]]= function(_0xdcd9x6d){return BPromise[_0x7460[163]]()[_0x7460[162]](cmHopper[_0x7460[178]](_0xdcd9x6d))[_0x7460[157]](loggerCatch(_0x7460[179]))};Dialer[_0x7460[34]][_0x7460[180]]= function(_0xdcd9x6d){return BPromise[_0x7460[163]]()[_0x7460[162]](cmHopperHistory[_0x7460[180]](_0xdcd9x6d))[_0x7460[157]](loggerCatch(_0x7460[181]))};Dialer[_0x7460[34]][_0x7460[154]]= function(_0xdcd9x22){if(!_[_0x7460[77]](_0xdcd9x22)&& _0xdcd9x22!== null){if(_0xdcd9x22[_0x7460[125]](_0x7460[124])){if(_0xdcd9x22[_0x7460[124]]> 0){_0xdcd9x22[_0x7460[124]]-= 1}else {logger[_0x7460[122]](_0x7460[182])}}}else {logger[_0x7460[122]](_0x7460[183])}};Dialer[_0x7460[34]][_0x7460[184]]= function(_0xdcd9x53,_0xdcd9x24){var _0xdcd9x68=this;return function(_0xdcd9x30){_0xdcd9x68[_0x7460[154]](_0xdcd9x24);logger[_0x7460[122]](_0xdcd9x53,util[_0x7460[121]](_0xdcd9x30,{showHidden:false,depth:null}))}};Dialer[_0x7460[34]][_0x7460[185]]= function(_0xdcd9x53,_0xdcd9x24,_0xdcd9x64){var _0xdcd9x72={state:25,statedesc:_0x7460[186]};this[_0x7460[154]](_0xdcd9x24);this[_0x7460[195]](_[_0x7460[116]](_0xdcd9x72,_[_0x7460[192]](_0xdcd9x64,[_0x7460[187],_0x7460[188],_0x7460[189],_0x7460[190],_0x7460[191]])),_0x7460[193],_0x7460[194]);logger[_0x7460[122]](_0xdcd9x53)};Dialer[_0x7460[34]][_0x7460[196]]= function(_0xdcd9x73){return _0xdcd9x73=== _0x7460[197]};Dialer[_0x7460[34]][_0x7460[198]]= function(_0xdcd9x74){return !_[_0x7460[77]](_0xdcd9x74)&& _0xdcd9x74 &&  !_[_0x7460[77]](_0xdcd9x74[_0x7460[80]]) &&  !_[_0x7460[77]](_0xdcd9x74[_0x7460[199]]) && _0xdcd9x74[_0x7460[199]] && (this[_0x7460[42]][util[_0x7460[99]](_0x7460[200],_0xdcd9x74[_0x7460[80]])][_0x7460[158]]=== _0x7460[201]|| this[_0x7460[42]][util[_0x7460[99]](_0x7460[200],_0xdcd9x74[_0x7460[80]])][_0x7460[158]]=== _0x7460[202])};Dialer[_0x7460[34]][_0x7460[195]]= function(_0xdcd9x22,_0xdcd9x75,_0xdcd9x76){this[_0x7460[180]](_0xdcd9x22)[_0x7460[157]](loggerCatch(_0xdcd9x75));this[_0x7460[178]](_0xdcd9x22)[_0x7460[157]](loggerCatch(_0xdcd9x76))};Dialer[_0x7460[34]][_0x7460[70]]= function(_0xdcd9x38){var _0xdcd9x6a=this[_0x7460[47]][_0xdcd9x38[_0x7460[203]]];var _0xdcd9x77;if(!_[_0x7460[151]](_0xdcd9x38)&&  !_[_0x7460[151]](_0xdcd9x38[_0x7460[204]]) &&  !_[_0x7460[151]](_0xdcd9x38[_0x7460[204]][_0x7460[205]]) && _0xdcd9x38[_0x7460[206]]=== _0x7460[207] && _0xdcd9x6a){if(_0xdcd9x6a[_0x7460[96]]!== _0x7460[103]&& this[_0x7460[39]][_0xdcd9x6a[_0x7460[153]]][_0x7460[208]]&& _0xdcd9x38[_0x7460[209]]=== _0x7460[210]){delete this[_0x7460[47]][_0xdcd9x38[_0x7460[203]]];this[_0x7460[154]](this[_0x7460[39]][_0xdcd9x6a[_0x7460[153]]]);this[_0x7460[39]][_0xdcd9x6a[_0x7460[153]]][_0x7460[211]]+= 1;this[_0x7460[39]][_0xdcd9x6a[_0x7460[153]]][_0x7460[212]]+= 1;_0xdcd9x77=  new Hangup(_0xdcd9x6a,_0xdcd9x38);_0xdcd9x77[_0x7460[144]]= 18;_0xdcd9x77[_0x7460[145]]= _0x7460[213];_0xdcd9x77[_0x7460[214]]= _0x7460[215];this[_0x7460[195]](_0xdcd9x77,_0x7460[216],_0x7460[217])};if(_0xdcd9x6a[_0x7460[96]]!== _0x7460[103]&& this[_0x7460[39]][_0xdcd9x6a[_0x7460[153]]][_0x7460[208]]&& _0xdcd9x38[_0x7460[209]]=== _0x7460[218]){delete this[_0x7460[47]][_0xdcd9x38[_0x7460[203]]];this[_0x7460[154]](this[_0x7460[39]][_0xdcd9x6a[_0x7460[153]]]);this[_0x7460[39]][_0xdcd9x6a[_0x7460[153]]][_0x7460[211]]+= 1;this[_0x7460[39]][_0xdcd9x6a[_0x7460[153]]][_0x7460[212]]+= 1;_0xdcd9x77=  new Hangup(_0xdcd9x6a,_0xdcd9x38);_0xdcd9x77[_0x7460[144]]= 19;_0xdcd9x77[_0x7460[145]]= _0x7460[219];_0xdcd9x77[_0x7460[214]]= _0x7460[215];_0xdcd9x77[_0x7460[220]]= true;this[_0x7460[195]](_0xdcd9x77,_0x7460[221],_0x7460[222])};if(_0xdcd9x6a[_0x7460[96]]=== _0x7460[103]&& this[_0x7460[40]][_0xdcd9x6a[_0x7460[153]]][_0x7460[208]]&& _0xdcd9x38[_0x7460[209]]=== _0x7460[210]){delete this[_0x7460[47]][_0xdcd9x38[_0x7460[203]]];this[_0x7460[154]](this[_0x7460[40]][_0xdcd9x6a[_0x7460[153]]]);_0xdcd9x77=  new Hangup(_0xdcd9x6a,_0xdcd9x38);_0xdcd9x77[_0x7460[144]]= 18;_0xdcd9x77[_0x7460[145]]= _0x7460[213];_0xdcd9x77[_0x7460[214]]= _0x7460[215];this[_0x7460[195]](_0xdcd9x77,_0x7460[223],_0x7460[224])};if(_0xdcd9x6a[_0x7460[96]]=== _0x7460[103]&& this[_0x7460[40]][_0xdcd9x6a[_0x7460[153]]][_0x7460[208]]&& _0xdcd9x38[_0x7460[209]]=== _0x7460[218]){delete this[_0x7460[47]][_0xdcd9x38[_0x7460[203]]];this[_0x7460[154]](this[_0x7460[40]][_0xdcd9x6a[_0x7460[153]]]);_0xdcd9x77=  new Hangup(_0xdcd9x6a,_0xdcd9x38);_0xdcd9x77[_0x7460[144]]= 19;_0xdcd9x77[_0x7460[145]]= _0x7460[219];_0xdcd9x77[_0x7460[214]]= _0x7460[215];_0xdcd9x77[_0x7460[220]]= true;this[_0x7460[195]](_0xdcd9x77,_0x7460[225],_0x7460[226])}}};Dialer[_0x7460[34]][_0x7460[66]]= function(_0xdcd9x38){var _0xdcd9x6a=this[_0x7460[47]][_0xdcd9x38[_0x7460[203]]];var _0xdcd9x68=this;var _0xdcd9x77;if(_0xdcd9x6a&& _0xdcd9x6a[_0x7460[96]]=== _0x7460[103]){delete this[_0x7460[47]][_0xdcd9x38[_0x7460[203]]];this[_0x7460[154]](this[_0x7460[40]][_0xdcd9x6a[_0x7460[153]]]);this[_0x7460[40]][_0xdcd9x6a[_0x7460[153]]][_0x7460[227]]+= 1;_0xdcd9x77=  new Hangup(_0xdcd9x6a,_0xdcd9x38);this[_0x7460[180]](_0xdcd9x77)[_0x7460[157]](loggerCatch(_0x7460[228]));this[_0x7460[178]](_0xdcd9x77)[_0x7460[157]](loggerCatch(_0x7460[229]))};if(_0xdcd9x6a&& _0xdcd9x6a[_0x7460[96]]!== _0x7460[103]&& isNotNull(this[_0x7460[39]][_0xdcd9x6a[_0x7460[153]]][_0x7460[230]])){delete this[_0x7460[47]][_0xdcd9x38[_0x7460[203]]];this[_0x7460[154]](this[_0x7460[39]][_0xdcd9x6a[_0x7460[153]]]);this[_0x7460[39]][_0xdcd9x6a[_0x7460[153]]][_0x7460[211]]+= 1;this[_0x7460[39]][_0xdcd9x6a[_0x7460[153]]][_0x7460[212]]+= 1;_0xdcd9x77=  new Hangup(_0xdcd9x6a,_0xdcd9x38);_0xdcd9x77[_0x7460[144]]= 16;_0xdcd9x77[_0x7460[145]]= _0x7460[231];_0xdcd9x77[_0x7460[214]]= _0x7460[232];this[_0x7460[180]](_0xdcd9x77)[_0x7460[157]](loggerCatch(_0x7460[228]));this[_0x7460[178]](_0xdcd9x77)[_0x7460[157]](loggerCatch(_0x7460[229]))};if(_0xdcd9x6a&& _0xdcd9x6a[_0x7460[96]]!== _0x7460[103]&&  !isNotNull(this[_0x7460[39]][_0xdcd9x6a[_0x7460[153]]][_0x7460[230]])){delete this[_0x7460[47]][_0xdcd9x38[_0x7460[203]]];this[_0x7460[154]](this[_0x7460[39]][_0xdcd9x6a[_0x7460[153]]]);this[_0x7460[39]][_0xdcd9x6a[_0x7460[153]]][_0x7460[233]]+= 1;_0xdcd9x77=  new Hangup(_0xdcd9x6a,_0xdcd9x38);_0xdcd9x77[_0x7460[144]]= 12;_0xdcd9x77[_0x7460[145]]= _0xdcd9x38[_0x7460[234]];_0xdcd9x77[_0x7460[214]]= _0x7460[235];this[_0x7460[180]](_0xdcd9x77)[_0x7460[157]](loggerCatch(_0x7460[228]));this[_0x7460[178]](_0xdcd9x77)[_0x7460[157]](loggerCatch(_0x7460[229]))}};Dialer[_0x7460[34]][_0x7460[63]]= function(_0xdcd9x38){var _0xdcd9x6a=this[_0x7460[47]][_0xdcd9x38[_0x7460[203]]];var _0xdcd9x68=this;if(this[_0x7460[39]][_0xdcd9x38[_0x7460[153]]]){if(_0xdcd9x6a&& _0xdcd9x6a[_0x7460[96]]!== _0x7460[103]){delete this[_0x7460[47]][_0xdcd9x38[_0x7460[203]]];this[_0x7460[39]][_0xdcd9x38[_0x7460[153]]][_0x7460[211]]+= 1;var _0xdcd9x78= new AgentComplete(_0xdcd9x6a,_0xdcd9x38);if(_0xdcd9x38[_0x7460[236]]=== _0x7460[237]){_0xdcd9x78[_0x7460[238]]= (this[_0x7460[39]][_0xdcd9x38[_0x7460[153]]][_0x7460[239]]&& this[_0x7460[39]][_0xdcd9x38[_0x7460[153]]][_0x7460[240]])?moment()[_0x7460[99]](_0x7460[241]):undefined};this[_0x7460[180]](_0xdcd9x78)[_0x7460[157]](loggerCatch(_0x7460[242]));this[_0x7460[178]](_0xdcd9x78)[_0x7460[157]](loggerCatch(_0x7460[243]))}}};Dialer[_0x7460[34]][_0x7460[56]]= function(_0xdcd9x38){if(this[_0x7460[39]][_0xdcd9x38[_0x7460[153]]]){if(this[_0x7460[47]][_0xdcd9x38[_0x7460[203]]]&& this[_0x7460[47]][_0xdcd9x38[_0x7460[203]]][_0x7460[96]]!== _0x7460[103]){this[_0x7460[154]](this[_0x7460[39]][_0xdcd9x38[_0x7460[153]]]);this[_0x7460[47]][_0xdcd9x38[_0x7460[203]]][_0x7460[244]]= moment()[_0x7460[99]](_0x7460[241])}}};Dialer[_0x7460[34]][_0x7460[245]]= function(_0xdcd9x79){this[_0x7460[180]](_0xdcd9x79)[_0x7460[157]](loggerCatch(_0x7460[242]));this[_0x7460[178]](_0xdcd9x79)[_0x7460[157]](loggerCatch(_0x7460[246]))};Dialer[_0x7460[34]][_0x7460[59]]= function(_0xdcd9x38){var _0xdcd9x6a=this[_0x7460[47]][_0xdcd9x38[_0x7460[203]]];var _0xdcd9x68=this;if(this[_0x7460[39]][_0xdcd9x38[_0x7460[153]]]){if(_0xdcd9x6a&& _0xdcd9x6a[_0x7460[96]]!== _0x7460[103]){delete this[_0x7460[47]][_0xdcd9x38[_0x7460[203]]];this[_0x7460[154]](this[_0x7460[39]][_0xdcd9x38[_0x7460[153]]]);_0xdcd9x6a[_0x7460[247]]= moment()[_0x7460[99]](_0x7460[241]);var _0xdcd9x79= new QueueCallerAbandon(_0xdcd9x6a,_0xdcd9x38);if(getSeconds(_0xdcd9x6a[_0x7460[247]],_0xdcd9x6a[_0x7460[248]])>= _0xdcd9x6a[_0x7460[249]]){this[_0x7460[39]][_0xdcd9x38[_0x7460[153]]][_0x7460[250]]+= 1;this[_0x7460[39]][_0xdcd9x38[_0x7460[153]]][_0x7460[251]]+= 1;this[_0x7460[39]][_0xdcd9x38[_0x7460[153]]][_0x7460[252]]+= 1;_0xdcd9x79[_0x7460[144]]= 10;_0xdcd9x79[_0x7460[145]]= _0x7460[253];_0xdcd9x79[_0x7460[254]]= _0x7460[255];_0xdcd9x79[_0x7460[238]]= this[_0x7460[39]][_0xdcd9x38[_0x7460[153]]][_0x7460[239]]?moment()[_0x7460[99]](_0x7460[241]):undefined;this[_0x7460[245]](_0xdcd9x79)}else {this[_0x7460[39]][_0xdcd9x38[_0x7460[153]]][_0x7460[256]]+= 1;this[_0x7460[39]][_0xdcd9x38[_0x7460[153]]][_0x7460[257]]+= 1;_0xdcd9x79[_0x7460[144]]= 11;_0xdcd9x79[_0x7460[145]]= _0x7460[258];_0xdcd9x79[_0x7460[254]]= _0x7460[259];this[_0x7460[245]](_0xdcd9x79)}}}};Dialer[_0x7460[34]][_0x7460[68]]= function(_0xdcd9x38){if(this[_0x7460[45]][_0xdcd9x38[_0x7460[203]]]){this[_0x7460[45]][_0xdcd9x38[_0x7460[203]]][_0x7460[159]]= _0xdcd9x38[_0x7460[159]]};if(this[_0x7460[47]][_0xdcd9x38[_0x7460[203]]]){this[_0x7460[47]][_0xdcd9x38[_0x7460[203]]][_0x7460[159]]= _0xdcd9x38[_0x7460[159]]}};Dialer[_0x7460[34]][_0x7460[72]]= function(_0xdcd9x38){if(strategy[this[_0x7460[39]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]][_0x7460[260]]]=== _0x7460[32]){if(this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]]&& _[_0x7460[151]](this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[262]])&& _0xdcd9x38[_0x7460[158]]=== _0x7460[263]&& _0xdcd9x38[_0x7460[264]]=== _0x7460[265]){if(this[_0x7460[41]][_0xdcd9x38[_0x7460[266]]]){if(!this[_0x7460[41]][_0xdcd9x38[_0x7460[266]]][_0x7460[262]]){this[_0x7460[41]][_0xdcd9x38[_0x7460[266]]][_0x7460[262]]= true;this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[262]]= true;this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[266]]= _0xdcd9x38[_0x7460[266]]}}}}else {if((strategy[this[_0x7460[39]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]][_0x7460[260]]]|| _0x7460[31])=== _0x7460[31]){if(this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]]){if(this[_0x7460[41]][_0xdcd9x38[_0x7460[266]]]){this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[266]]= _0xdcd9x38[_0x7460[266]];if(_[_0x7460[151]](this[_0x7460[52]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]])){this[_0x7460[52]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]]= []};this[_0x7460[52]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]][_0x7460[268]](_[_0x7460[116]](_[_0x7460[192]](this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]],[_0x7460[267],_0x7460[266]]),{status:_0xdcd9x38[_0x7460[158]],paused:_0xdcd9x38[_0x7460[264]]}))}}}}};function unlockQueueStatus(_0xdcd9x7b){setTimeout(function(){if(_[_0x7460[77]](_0xdcd9x7b[_0x7460[269]])){loggerBooked[_0x7460[122]](_0x7460[270])};_0xdcd9x7b[_0x7460[269]]= true},499)}Dialer[_0x7460[34]][_0x7460[74]]= function(_0xdcd9x38){var _0xdcd9x68=this;var _0xdcd9x7b=_0xdcd9x68[_0x7460[39]][_0xdcd9x68[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]];if(strategy[this[_0x7460[39]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]][_0x7460[260]]]=== _0x7460[32]){if(this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]]&& this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[266]]){this[_0x7460[38]][_0x7460[272]](this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[267]],this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[266]])[_0x7460[157]](function(_0xdcd9x30){logger[_0x7460[122]](_0x7460[271],util[_0x7460[121]](_0xdcd9x30,{showHidden:false,depth:null}))})[_0x7460[36]](function(){_0xdcd9x68[_0x7460[154]](_0xdcd9x68[_0x7460[39]][_0xdcd9x68[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]]);_0xdcd9x68[_0x7460[41]][_0xdcd9x68[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[266]]][_0x7460[262]]= false;delete _0xdcd9x68[_0x7460[45]][_0xdcd9x38[_0x7460[261]]];unlockQueueStatus(_0xdcd9x7b)})}else {this[_0x7460[154]](this[_0x7460[39]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]]);this[_0x7460[171]]({active:false,ContactId:this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[187]],ListId:this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[188]],VoiceQueueId:this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[190]]|| undefined,CampaignId:this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[191]]|| undefined})[_0x7460[157]](loggerCatch(_0x7460[273]));delete this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]];unlockQueueStatus(_0xdcd9x7b)}}else {if((strategy[this[_0x7460[39]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]][_0x7460[260]]]|| _0x7460[31])=== _0x7460[31]){var _0xdcd9x7c;if(this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]]&&  !_[_0x7460[87]](this[_0x7460[52]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]])){if(this[_0x7460[53]][_0xdcd9x68[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]]){this[_0x7460[53]][_0xdcd9x68[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]]= this[_0x7460[53]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]]?this[_0x7460[53]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]]:this[_0x7460[52]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]]?this[_0x7460[52]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]][_0x7460[274]]|| 0:0};this[_0x7460[52]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]][_0x7460[274]]= this[_0x7460[53]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]];for(var _0xdcd9x5b=0;_0xdcd9x5b< this[_0x7460[52]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]][_0x7460[123]];_0xdcd9x5b+= 1){_0xdcd9x7c= rr(this[_0x7460[52]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]]);this[_0x7460[53]][_0xdcd9x68[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]]= this[_0x7460[52]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]][_0x7460[274]];if(_0xdcd9x7c[_0x7460[158]]=== _0x7460[263]&& _0xdcd9x7c[_0x7460[264]]=== _0x7460[265]){break}};if(!_[_0x7460[151]](_0xdcd9x7c)){this[_0x7460[41]][_0xdcd9x7c[_0x7460[266]]][_0x7460[275]]= _[_0x7460[77]](this[_0x7460[41]][_0xdcd9x7c[_0x7460[266]]][_0x7460[275]])?true:this[_0x7460[41]][_0xdcd9x7c[_0x7460[266]]][_0x7460[275]]};if(!_[_0x7460[151]](_0xdcd9x7c)&& _0xdcd9x7c[_0x7460[158]]=== _0x7460[263] && _0xdcd9x7c[_0x7460[264]]=== _0x7460[265] && this[_0x7460[41]][_0xdcd9x7c[_0x7460[266]]][_0x7460[275]]){this[_0x7460[41]][_0xdcd9x7c[_0x7460[266]]][_0x7460[275]]= false;this[_0x7460[52]][_0xdcd9x68[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]]= [];this[_0x7460[38]][_0x7460[272]](_0xdcd9x7c[_0x7460[267]],_0xdcd9x7c[_0x7460[266]])[_0x7460[157]](function(_0xdcd9x30){logger[_0x7460[122]](_0x7460[271],util[_0x7460[121]](_0xdcd9x30,{showHidden:false,depth:null}))})[_0x7460[36]](function(){_0xdcd9x68[_0x7460[154]](_0xdcd9x68[_0x7460[39]][_0xdcd9x68[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]]);setTimeout(function(){_0xdcd9x68[_0x7460[41]][_0xdcd9x7c[_0x7460[266]]][_0x7460[275]]= true},199);delete _0xdcd9x68[_0x7460[45]][_0xdcd9x38[_0x7460[261]]];unlockQueueStatus(_0xdcd9x7b)})}else {loggerBooked[_0x7460[109]](_0x7460[276]);this[_0x7460[154]](this[_0x7460[39]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]]);this[_0x7460[171]]({active:false,ContactId:this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[187]],ListId:this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[188]],VoiceQueueId:this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[190]]|| undefined,CampaignId:this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[191]]|| undefined})[_0x7460[157]](loggerCatch(_0x7460[273]));delete this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]];unlockQueueStatus(_0xdcd9x7b)}}else {loggerBooked[_0x7460[109]](_0x7460[277]);this[_0x7460[154]](this[_0x7460[39]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]]);this[_0x7460[171]]({active:false,ContactId:this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[187]],ListId:this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[188]],VoiceQueueId:this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[190]]|| undefined,CampaignId:this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[191]]|| undefined})[_0x7460[157]](loggerCatch(_0x7460[278]));delete this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]];unlockQueueStatus(_0xdcd9x7b)}}else {loggerBooked[_0x7460[109]](_0x7460[279]);this[_0x7460[154]](this[_0x7460[39]][this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[153]]]);this[_0x7460[171]]({active:false,ContactId:this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[187]],ListId:this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[188]],VoiceQueueId:this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[190]]|| undefined,CampaignId:this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]][_0x7460[191]]|| undefined})[_0x7460[157]](loggerCatch(_0x7460[280]));delete this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]];unlockQueueStatus(_0xdcd9x7b)}}};Dialer[_0x7460[34]][_0x7460[75]]= function(){var _0xdcd9x68=this;setInterval(function(){_0xdcd9x68[_0x7460[281]]()},1000)};Dialer[_0x7460[34]][_0x7460[282]]= function(_0xdcd9x24){var _0xdcd9x68=this;return function(){if(!_0xdcd9x68[_0x7460[198]](_0xdcd9x24.Trunk)){if(!_0xdcd9x68[_0x7460[198]](_0xdcd9x24.TrunkBackup)){_0xdcd9x24[_0x7460[78]]= _0x7460[283];throw _0xdcd9x24[_0x7460[80]]+ _0x7460[284]}}}};Dialer[_0x7460[34]][_0x7460[285]]= function(_0xdcd9x7d,_0xdcd9x7e,_0xdcd9x50,_0xdcd9x3d){var _0xdcd9x68=this;return function(){var _0xdcd9x7f=true;return _0xdcd9x68[_0x7460[286]](_0xdcd9x7d,_0xdcd9x7e,_0xdcd9x50,_0xdcd9x3d,_0xdcd9x7f)}};Dialer[_0x7460[34]][_0x7460[287]]= function(_0xdcd9x80,_0xdcd9x7e,_0xdcd9x50,_0xdcd9x3d){var _0xdcd9x68=this;return function(){var _0xdcd9x7f=false;return _0xdcd9x68[_0x7460[286]](_0xdcd9x80.Intervals,_0xdcd9x7e,_0xdcd9x50,_0xdcd9x3d,_0xdcd9x7f)}};Dialer[_0x7460[34]][_0x7460[286]]= function(_0xdcd9x7d,_0xdcd9x7e,_0xdcd9x50,_0xdcd9x3d,_0xdcd9x7f){var _0xdcd9x81=[];return  new BPromise(function(_0xdcd9x82,_0xdcd9x2f){if(!isNotNull(_0xdcd9x7d)){_0xdcd9x3d[_0x7460[78]]= _0x7460[84];return _0xdcd9x2f(msgResponse(_0x7460[286],_0x7460[288],_0xdcd9x50+ _0x7460[289]))};if(_[_0x7460[87]](_0xdcd9x7d)){_0xdcd9x3d[_0x7460[78]]= _0x7460[290];return _0xdcd9x2f(msgResponse(_0x7460[286],_0x7460[288],_0xdcd9x50+ _0x7460[291]))};if(_0xdcd9x7e&& _[_0x7460[77]](config[_0x7460[292]][_0xdcd9x7e])){_0xdcd9x3d[_0x7460[78]]= _0x7460[293];return _0xdcd9x2f(msgResponse(_0x7460[286],_0x7460[288],_0xdcd9x50+ _0x7460[294]+ _0xdcd9x7e))};if(_[_0x7460[295]](_0xdcd9x7d)){for(var _0xdcd9x5b=0;_0xdcd9x5b< _0xdcd9x7d[_0x7460[123]];_0xdcd9x5b+= 1){_0xdcd9x81[_0x7460[268]](ami.Action({action:_0x7460[299],command:util[_0x7460[99]](_0x7460[300],_0xdcd9x7d[_0xdcd9x5b][_0x7460[301]],!_[_0x7460[77]](config[_0x7460[292]][_0xdcd9x7e])?_0xdcd9x7e:_0x7460[302])})[_0x7460[162]](function(_0xdcd9x3e){return (_0xdcd9x3e[_0x7460[298]][_0x7460[297]](_0x7460[296])>= 0)?true:false})[_0x7460[157]](myreject(_0xdcd9x2f)))}}else {_0xdcd9x81[_0x7460[268]](ami.Action({action:_0x7460[299],command:util[_0x7460[99]](_0x7460[300],_0xdcd9x7d,!_[_0x7460[77]](config[_0x7460[292]][_0xdcd9x7e])?_0xdcd9x7e:_0x7460[302])})[_0x7460[162]](function(_0xdcd9x3e){return (_0xdcd9x3e[_0x7460[298]][_0x7460[297]](_0x7460[296])>= 0)?true:false})[_0x7460[157]](myreject(_0xdcd9x2f)))};BPromise[_0x7460[311]](_0xdcd9x81)[_0x7460[162]](function(_0xdcd9x83){var _0xdcd9x84=_[_0x7460[303]](_0xdcd9x83);if(_0xdcd9x84){return _0xdcd9x82(_0xdcd9x84)}else {_0xdcd9x3d[_0x7460[78]]= _0xdcd9x7f?_0x7460[304]:_0x7460[305];return _0xdcd9x2f(msgResponse(_0x7460[306],_0x7460[288],_0x7460[307]+ _0xdcd9x7f+ _0x7460[308]+ _0xdcd9x50+ _0x7460[309]+ util[_0x7460[121]](_0xdcd9x7d,{showHidden:false,depth:null})+ _0x7460[310]+ _0xdcd9x7e))}})[_0x7460[157]](function(_0xdcd9x30){return _0xdcd9x2f(msgResponse(_0x7460[286],_0x7460[288],JSON[_0x7460[90]](_0xdcd9x30)))})})};Dialer[_0x7460[34]][_0x7460[312]]= function(_0xdcd9x3d){var _0xdcd9x68=this;return function(){switch(_0xdcd9x3d[_0x7460[319]]){case _0x7460[314]:freeVariablesPredictive(_0xdcd9x3d);_0xdcd9x68[_0x7460[313]](_0xdcd9x3d,1);break;case _0x7460[316]:freeVariablesPredictive(_0xdcd9x3d);_0xdcd9x68[_0x7460[313]](_0xdcd9x3d,_0xdcd9x3d[_0x7460[315]]);break;case _0x7460[10]:_0xdcd9x68[_0x7460[10]](_0xdcd9x3d);break;case _0x7460[9]:freeVariablesPredictive(_0xdcd9x3d);_0xdcd9x68[_0x7460[313]](_0xdcd9x3d,1);break;default:freeVariablesPredictive(_0xdcd9x3d);logger[_0x7460[122]](_0x7460[317],_0xdcd9x3d[_0x7460[80]],_0x7460[318])}}};Dialer[_0x7460[34]][_0x7460[320]]= function(_0xdcd9x62){var _0xdcd9x68=this;return function(){_0xdcd9x68[_0x7460[321]](_0xdcd9x62)}};Dialer[_0x7460[34]][_0x7460[12]]= function(_0xdcd9x3d){var _0xdcd9x68=this;if(isNotPreview(_0xdcd9x3d[_0x7460[319]])){if(isVoiceQueueOutbound(_0xdcd9x3d[_0x7460[96]])&& isActive(_0xdcd9x3d[_0x7460[322]])){_0xdcd9x3d[_0x7460[134]]= true;BPromise[_0x7460[163]]()[_0x7460[162]](checkIsLoggedIn(_0xdcd9x3d,_0xdcd9x3d[_0x7460[326]]))[_0x7460[162]](checkIsActive(_0xdcd9x3d,_0xdcd9x3d[_0x7460[322]]))[_0x7460[162]](checkInterval(_0xdcd9x3d))[_0x7460[162]](_0xdcd9x68[_0x7460[282]](_0xdcd9x3d))[_0x7460[162]](_0xdcd9x68[_0x7460[285]](_0xdcd9x3d[_0x7460[325]],_0xdcd9x3d[_0x7460[324]],_0xdcd9x3d[_0x7460[80]],_0xdcd9x3d))[_0x7460[162]](_0xdcd9x68[_0x7460[287]](_0xdcd9x3d.Interval,_0xdcd9x3d[_0x7460[324]],_0xdcd9x3d[_0x7460[80]],_0xdcd9x3d))[_0x7460[162]](_0xdcd9x68[_0x7460[312]](_0xdcd9x3d))[_0x7460[157]](loggerCatchQueueSummary(_0x7460[323],_0xdcd9x3d))}else {notSendMessagesQueue(_0xdcd9x3d)}}else {freeVariablesPredictive(_0xdcd9x3d)}};Dialer[_0x7460[34]][_0x7460[281]]= function(){var _0xdcd9x68=this;var _0xdcd9x62;for(var _0xdcd9x85 in this[_0x7460[40]]){if(this[_0x7460[40]][_0x7460[125]](_0xdcd9x85)){_0xdcd9x62= this[_0x7460[40]][_0xdcd9x85];if(isCampaignIvr(_0xdcd9x62[_0x7460[96]])&& isActive(_0xdcd9x62[_0x7460[199]])){_0xdcd9x62[_0x7460[134]]= true;BPromise[_0x7460[163]]()[_0x7460[162]](checkIsActive(_0xdcd9x62,_0xdcd9x62[_0x7460[199]]))[_0x7460[162]](checkInterval(_0xdcd9x62))[_0x7460[162]](_0xdcd9x68[_0x7460[282]](_0xdcd9x62))[_0x7460[162]](_0xdcd9x68[_0x7460[285]](_0xdcd9x62[_0x7460[325]],_0xdcd9x62[_0x7460[324]],_0xdcd9x62[_0x7460[80]],_0xdcd9x62))[_0x7460[162]](_0xdcd9x68[_0x7460[287]](_0xdcd9x62.Interval,_0xdcd9x62[_0x7460[324]],_0xdcd9x62[_0x7460[80]],_0xdcd9x62))[_0x7460[162]](_0xdcd9x68[_0x7460[320]](_0xdcd9x62))[_0x7460[157]](loggerCatchQueueSummary(_0x7460[327],_0xdcd9x62))}else {notSendMessagesCampaign(_0xdcd9x62)}}}};Dialer[_0x7460[34]][_0x7460[328]]= function(_0xdcd9x3d,_0xdcd9x22){var _0xdcd9x68=this;var _0xdcd9x86=uuid[_0x7460[329]]();this[_0x7460[45]][_0xdcd9x86]=  new Action(_0xdcd9x3d,_0xdcd9x22,_0xdcd9x86);return  new BPromise(function(_0xdcd9x82,_0xdcd9x2f){if(_[_0x7460[77]](_0xdcd9x3d)&& _0x7460[330]!==  typeof _0xdcd9x3d){return _0xdcd9x2f(msgResponse(_0x7460[331],_0x7460[288],_0x7460[332]))};if(_[_0x7460[77]](_0xdcd9x22[_0x7460[334]][_0x7460[333]])|| _0xdcd9x22[_0x7460[334]][_0x7460[333]]=== null){return _0xdcd9x2f(msgResponse(_0x7460[331],_0x7460[288],_0x7460[335]))};var _0xdcd9x87={"\x58\x4D\x44\x2D\x43\x41\x4C\x4C\x45\x52\x49\x44":_0xdcd9x68[_0x7460[45]][_0xdcd9x86][_0x7460[336]](),"\x58\x4D\x44\x2D\x41\x47\x49":_0xdcd9x3d[_0x7460[230]]?util[_0x7460[99]](_0x7460[337],ipAgi,_0xdcd9x3d[_0x7460[230]]):_0x7460[338],"\x58\x4D\x44\x2D\x41\x47\x49\x41\x46\x54\x45\x52":_0xdcd9x3d[_0x7460[239]]?util[_0x7460[99]](_0x7460[337],ipAgi,_0xdcd9x3d[_0x7460[239]]):_0x7460[338],"\x58\x4D\x44\x2D\x51\x55\x45\x55\x45":(_0xdcd9x3d[_0x7460[96]]=== _0x7460[97])?util[_0x7460[99]](_0x7460[339],_0xdcd9x3d[_0x7460[80]],_0xdcd9x3d[_0x7460[340]]|| _0x7460[302],_0xdcd9x3d[_0x7460[240]]?_0x7460[341]:_0x7460[302],_0xdcd9x3d[_0x7460[249]]|| 3):_0x7460[338],"\x58\x4D\x44\x2D\x43\x4F\x4E\x54\x41\x43\x54\x49\x44":_0xdcd9x22[_0x7460[187]],"\x58\x4D\x44\x2D\x43\x44\x52\x54\x59\x50\x45":_0x7460[7],"\x43\x41\x4C\x4C\x45\x52\x49\x44\x28\x61\x6C\x6C\x29":_0xdcd9x68[_0x7460[45]][_0xdcd9x86][_0x7460[336]](),"\x58\x4D\x44\x2D\x41\x4D\x44":_0xdcd9x3d[_0x7460[208]]?_0x7460[342]:_0x7460[338]};if(_0xdcd9x3d[_0x7460[208]]){_0xdcd9x87[_0x7460[343]]= _0xdcd9x3d[_0x7460[344]]|| 2500;_0xdcd9x87[_0x7460[345]]= _0xdcd9x3d[_0x7460[346]]|| 1500;_0xdcd9x87[_0x7460[347]]= _0xdcd9x3d[_0x7460[348]]|| 800;_0xdcd9x87[_0x7460[349]]= _0xdcd9x3d[_0x7460[350]]|| 5000;_0xdcd9x87[_0x7460[351]]= _0xdcd9x3d[_0x7460[352]]|| 100;_0xdcd9x87[_0x7460[353]]= _0xdcd9x3d[_0x7460[354]]|| 50;_0xdcd9x87[_0x7460[355]]= _0xdcd9x3d[_0x7460[356]]|| 3;_0xdcd9x87[_0x7460[357]]= _0xdcd9x3d[_0x7460[358]]|| 256;_0xdcd9x87[_0x7460[359]]= _0xdcd9x3d[_0x7460[360]]|| 5000};if(_0xdcd9x3d[_0x7460[96]]=== _0x7460[97]){_0xdcd9x87[_0x7460[361]]= _0xdcd9x22[_0x7460[190]]}else {_0xdcd9x87[_0x7460[362]]= _0xdcd9x22[_0x7460[191]]};for(var _0xdcd9x85 in _0xdcd9x22[_0x7460[334]]){if(_0xdcd9x22[_0x7460[334]][_0x7460[125]](_0xdcd9x85)){if(isNotNull(_0xdcd9x22[_0x7460[334]][_0xdcd9x85])&& (_0xdcd9x85!== _0x7460[363])&& (_0xdcd9x85!== _0x7460[364])&& (_0xdcd9x85!== _0x7460[365])&& (_0xdcd9x85!== _0x7460[366])){_0xdcd9x87[util[_0x7460[99]](_0x7460[367],_0x7460[368],_[_0x7460[369]](_0xdcd9x85))]= _0xdcd9x22[_0x7460[334]][_0xdcd9x85]}}};return ami.Action({actionid:_0xdcd9x86,action:_0x7460[331],channel:(_0xdcd9x68[_0x7460[198]](_0xdcd9x3d.Trunk))?util[_0x7460[99]](_0x7460[375],_0xdcd9x3d[_0x7460[376]][_0x7460[80]],isNotNull(_0xdcd9x3d[_0x7460[377]])?_0xdcd9x3d[_0x7460[377]][_0x7460[378]]()|| _0x7460[302]:_0x7460[302],_0xdcd9x22[_0x7460[334]][_0x7460[333]]):util[_0x7460[99]](_0x7460[375],_[_0x7460[151]](_0xdcd9x3d.TrunkBackup)?_0xdcd9x3d[_0x7460[376]][_0x7460[80]]:_0xdcd9x3d[_0x7460[379]][_0x7460[80]],isNotNull(_0xdcd9x3d[_0x7460[377]])?_0xdcd9x3d[_0x7460[377]][_0x7460[378]]()|| _0x7460[302]:_0x7460[302],_0xdcd9x22[_0x7460[334]][_0x7460[333]]),callerid:(_0xdcd9x68[_0x7460[198]](_0xdcd9x3d.Trunk))?getCallerId(_0xdcd9x3d[_0x7460[376]][_0x7460[380]],_0xdcd9x3d[_0x7460[381]],_0xdcd9x3d[_0x7460[382]]):getCallerId(_[_0x7460[151]](_0xdcd9x3d.TrunkBackup)?_0xdcd9x3d[_0x7460[376]][_0x7460[380]]:_0xdcd9x3d[_0x7460[379]][_0x7460[380]],_0xdcd9x3d[_0x7460[381]],_0xdcd9x3d[_0x7460[382]]),Exten:_0x7460[207],Context:_0x7460[383],Priority:_0x7460[263],variable:_0xdcd9x87,timeout:(_0xdcd9x3d[_0x7460[384]]|| 30)* 1000,async:true,channelid:_0xdcd9x86})[_0x7460[162]](function(_0xdcd9x3e){return _0xdcd9x82(_0xdcd9x3e)})[_0x7460[157]](function(_0xdcd9x30){_0xdcd9x3d[_0x7460[370]]+= 1;var _0xdcd9x67= new History(_0xdcd9x68[_0x7460[45]][_0xdcd9x86]);logger[_0x7460[122]](util[_0x7460[99]](_0x7460[371],JSON[_0x7460[90]](_0xdcd9x30)));_0xdcd9x67[_0x7460[144]]= 14;_0xdcd9x67[_0x7460[145]]= _0x7460[372];_0xdcd9x67[_0x7460[147]]= moment()[_0x7460[99]](_0x7460[241]);_0xdcd9x67[_0x7460[146]]= _0xdcd9x67[_0x7460[147]];_0xdcd9x68[_0x7460[180]](_0xdcd9x67)[_0x7460[157]](loggerCatch(_0x7460[373]));_0xdcd9x68[_0x7460[178]](_0xdcd9x67)[_0x7460[157]](loggerCatch(_0x7460[373]))[_0x7460[36]](function(){delete _0xdcd9x68[_0x7460[45]][_0xdcd9x86];return _0xdcd9x2f(msgResponse(_0x7460[331],_0x7460[89],_0x7460[374]))})})})};Dialer[_0x7460[34]][_0x7460[61]]= function(_0xdcd9x38){var _0xdcd9x2b=this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]];var _0xdcd9x68=this;if(_0xdcd9x2b){delete this[_0x7460[45]][_0xdcd9x38[_0x7460[261]]];_0xdcd9x2b[_0x7460[248]]= moment()[_0x7460[99]](_0x7460[241]);var _0xdcd9x24=(_0xdcd9x2b[_0x7460[96]]=== _0x7460[103])?this[_0x7460[40]][_0xdcd9x2b[_0x7460[153]]]:this[_0x7460[39]][_0xdcd9x2b[_0x7460[385]]()];if(!this[_0x7460[196]](_0xdcd9x38[_0x7460[386]])){this[_0x7460[154]](_0xdcd9x24);return this[_0x7460[388]](_0xdcd9x2b,_0xdcd9x24,_0xdcd9x38)[_0x7460[162]](function(_0xdcd9x3e){})[_0x7460[157]](loggerCatch(_0x7460[387]))}else {this[_0x7460[47]][_0xdcd9x38[_0x7460[203]]]= _0xdcd9x2b}}};Dialer[_0x7460[34]][_0x7460[389]]= function(_0xdcd9x88,_0xdcd9x22,_0xdcd9x24){var _0xdcd9x67= new History(_0xdcd9x22);if(_0xdcd9x67[_0x7460[390]]+ _0xdcd9x67[_0x7460[391]]+ _0xdcd9x67[_0x7460[392]]>= _0xdcd9x24[_0x7460[393]]- 1){return true};switch(_0xdcd9x88){case 3:if(_0xdcd9x67[_0x7460[392]]>= _0xdcd9x24[_0x7460[394]]- 1){return true}else {this[_0x7460[171]]({active:false,countnoanswerretry:_0xdcd9x67[_0x7460[392]]+= 1,scheduledat:moment()[_0x7460[398]](_0xdcd9x24[_0x7460[396]],_0x7460[397])[_0x7460[99]](_0x7460[241]),ContactId:_0xdcd9x67[_0x7460[187]],ListId:_0xdcd9x67[_0x7460[188]],VoiceQueueId:_0xdcd9x67[_0x7460[190]]|| undefined,CampaignId:_0xdcd9x67[_0x7460[191]]|| undefined})[_0x7460[157]](loggerCatch(_0x7460[395]))};break;case 5:if(_0xdcd9x67[_0x7460[390]]>= _0xdcd9x24[_0x7460[399]]- 1){return true}else {this[_0x7460[171]]({active:false,countbusyretry:_0xdcd9x67[_0x7460[390]]+= 1,scheduledat:moment()[_0x7460[398]](_0xdcd9x24[_0x7460[401]],_0x7460[397])[_0x7460[99]](_0x7460[241]),ContactId:_0xdcd9x67[_0x7460[187]],ListId:_0xdcd9x67[_0x7460[188]],VoiceQueueId:_0xdcd9x67[_0x7460[190]]|| undefined,CampaignId:_0xdcd9x67[_0x7460[191]]|| undefined})[_0x7460[157]](loggerCatch(_0x7460[400]))};break;case 8:if(_0xdcd9x67[_0x7460[391]]>= _0xdcd9x24[_0x7460[402]]- 1){return true}else {this[_0x7460[171]]({active:false,countcongestionretry:_0xdcd9x67[_0x7460[391]]+= 1,scheduledat:moment()[_0x7460[398]](_0xdcd9x24[_0x7460[404]],_0x7460[397])[_0x7460[99]](_0x7460[241]),ContactId:_0xdcd9x67[_0x7460[187]],ListId:_0xdcd9x67[_0x7460[188]],VoiceQueueId:_0xdcd9x67[_0x7460[190]]|| undefined,CampaignId:_0xdcd9x67[_0x7460[191]]|| undefined})[_0x7460[157]](loggerCatch(_0x7460[403]))};break;default:return true}};Dialer[_0x7460[34]][_0x7460[388]]= function(_0xdcd9x2b,_0xdcd9x24,_0xdcd9x38){var _0xdcd9x68=this;var _0xdcd9x67= new History(_0xdcd9x2b);return  new BPromise(function(_0xdcd9x82,_0xdcd9x2f){if(_[_0x7460[77]](_0xdcd9x24)&& _0x7460[330]!==  typeof _0xdcd9x24){return _0xdcd9x2f(msgResponse(_0x7460[405],_0x7460[288],_0x7460[406]))};if(_[_0x7460[77]](_0xdcd9x38)&& _0x7460[330]!==  typeof _0xdcd9x38){return _0xdcd9x2f(msgResponse(_0x7460[405],_0x7460[288],_0x7460[407]))};switch(_0xdcd9x38[_0x7460[236]]){case _0x7460[265]:_0xdcd9x24[_0x7460[408]]+= 1;_0xdcd9x67[_0x7460[144]]= 0;_0xdcd9x67[_0x7460[145]]= _0x7460[409];_0xdcd9x68[_0x7460[180]](_0xdcd9x67)[_0x7460[157]](loggerCatch(_0x7460[410]));if(_0xdcd9x68[_0x7460[389]](0,_0xdcd9x2b,_0xdcd9x24)){if(_0xdcd9x67[_0x7460[390]]+ _0xdcd9x67[_0x7460[391]]+ _0xdcd9x67[_0x7460[392]]>= _0xdcd9x24[_0x7460[393]]){_0xdcd9x68[_0x7460[412]](_0xdcd9x67,_0xdcd9x82,_0xdcd9x2f,_0x7460[411])}else {_0xdcd9x68[_0x7460[413]](_0xdcd9x67,_0xdcd9x82,_0xdcd9x2f,_0x7460[411])}};break;case _0x7460[419]:_0xdcd9x24[_0x7460[414]]+= 1;_0xdcd9x67[_0x7460[144]]= 3;_0xdcd9x67[_0x7460[145]]= _0x7460[415];_0xdcd9x67[_0x7460[392]]+= 1;_0xdcd9x67[_0x7460[416]]+= 1;_0xdcd9x68[_0x7460[180]](_0xdcd9x67)[_0x7460[157]](loggerCatch(_0x7460[417]));if(_0xdcd9x68[_0x7460[389]](3,_0xdcd9x2b,_0xdcd9x24)){if(_0xdcd9x67[_0x7460[392]]>= _0xdcd9x24[_0x7460[394]]){_0xdcd9x68[_0x7460[413]](_0xdcd9x67,_0xdcd9x82,_0xdcd9x2f,_0x7460[418])}else {_0xdcd9x68[_0x7460[412]](_0xdcd9x67,_0xdcd9x82,_0xdcd9x2f,_0x7460[418])}};break;case _0x7460[424]:_0xdcd9x24[_0x7460[420]]+= 1;_0xdcd9x67[_0x7460[144]]= 5;_0xdcd9x67[_0x7460[145]]= _0x7460[421];_0xdcd9x67[_0x7460[390]]+= 1;_0xdcd9x67[_0x7460[416]]+= 1;_0xdcd9x68[_0x7460[180]](_0xdcd9x67)[_0x7460[157]](loggerCatch(_0x7460[422]));if(_0xdcd9x68[_0x7460[389]](5,_0xdcd9x2b,_0xdcd9x24)){if(_0xdcd9x67[_0x7460[390]]>= _0xdcd9x24[_0x7460[399]]){_0xdcd9x68[_0x7460[413]](_0xdcd9x67,_0xdcd9x82,_0xdcd9x2f,_0x7460[423])}else {_0xdcd9x68[_0x7460[412]](_0xdcd9x67,_0xdcd9x82,_0xdcd9x2f,_0x7460[423])}};break;case _0x7460[429]:_0xdcd9x24[_0x7460[425]]+= 1;_0xdcd9x67[_0x7460[144]]= 8;_0xdcd9x67[_0x7460[145]]= _0x7460[426];_0xdcd9x67[_0x7460[391]]+= 1;_0xdcd9x67[_0x7460[416]]+= 1;_0xdcd9x68[_0x7460[180]](_0xdcd9x67)[_0x7460[157]](loggerCatch(_0x7460[427]));if(_0xdcd9x68[_0x7460[389]](8,_0xdcd9x2b,_0xdcd9x24)){if(_0xdcd9x67[_0x7460[391]]>= _0xdcd9x24[_0x7460[402]]){_0xdcd9x68[_0x7460[413]](_0xdcd9x67,_0xdcd9x82,_0xdcd9x2f,_0x7460[428])}else {_0xdcd9x68[_0x7460[412]](_0xdcd9x67,_0xdcd9x82,_0xdcd9x2f,_0x7460[428])}};break;default:_0xdcd9x24[_0x7460[233]]+= 1;_0xdcd9x67[_0x7460[144]]= 12;_0xdcd9x67[_0x7460[145]]= _0xdcd9x38[_0x7460[236]];_0xdcd9x68[_0x7460[180]](_0xdcd9x67)[_0x7460[157]](loggerCatch(_0x7460[430]));if(_0xdcd9x68[_0x7460[389]](_0xdcd9x38[_0x7460[236]],_0xdcd9x2b,_0xdcd9x24)){if(_0xdcd9x67[_0x7460[390]]+ _0xdcd9x67[_0x7460[391]]+ _0xdcd9x67[_0x7460[392]]>= _0xdcd9x24[_0x7460[393]]){_0xdcd9x68[_0x7460[412]](_0xdcd9x67,_0xdcd9x82,_0xdcd9x2f,_0xdcd9x38[_0x7460[236]])}else {_0xdcd9x68[_0x7460[413]](_0xdcd9x67,_0xdcd9x82,_0xdcd9x2f,_0xdcd9x38[_0x7460[236]])}}}})};Dialer[_0x7460[34]][_0x7460[412]]= function(_0xdcd9x67,_0xdcd9x82,_0xdcd9x2f,_0xdcd9x2d){var _0xdcd9x89= new Final(_0xdcd9x67);_0xdcd9x89[_0x7460[144]]= 15;_0xdcd9x89[_0x7460[145]]= _0x7460[431];this[_0x7460[413]](_0xdcd9x89,_0xdcd9x82,_0xdcd9x2f,_0xdcd9x2d)};Dialer[_0x7460[34]][_0x7460[413]]= function(_0xdcd9x67,_0xdcd9x82,_0xdcd9x2f,_0xdcd9x2d){this[_0x7460[178]](_0xdcd9x67)[_0x7460[162]](function(_0xdcd9x3e){return _0xdcd9x82(msgResponse(_0x7460[405],_0x7460[197],_0xdcd9x2d))})[_0x7460[157]](function(_0xdcd9x30){return _0xdcd9x2f(msgResponse(_0x7460[432],_0x7460[288],_0x7460[433]))})};Dialer[_0x7460[34]][_0x7460[10]]= function(_0xdcd9x3d){var _0xdcd9x68=this;var _0xdcd9x8a=_0xdcd9x3d[_0x7460[434]]/ 100;var _0xdcd9x8b=_0xdcd9x3d[_0x7460[251]]/ (_0xdcd9x3d[_0x7460[251]]+ _0xdcd9x3d[_0x7460[211]]);var _0xdcd9x8c=_0xdcd9x3d[_0x7460[326]]- _0xdcd9x3d[_0x7460[435]]- _0xdcd9x3d[_0x7460[136]]- _0xdcd9x3d[_0x7460[124]]- _0xdcd9x3d[_0x7460[135]];var _0xdcd9x8d=(_0xdcd9x3d[_0x7460[326]]- _0xdcd9x3d[_0x7460[435]])* _0xdcd9x3d[_0x7460[436]];var _0xdcd9x8e=Math[_0x7460[441]](_0xdcd9x3d[_0x7460[437]]* _0xdcd9x3d[_0x7460[438]]* _0xdcd9x3d[_0x7460[439]]* _0xdcd9x3d[_0x7460[440]]);if(_[_0x7460[77]](_0xdcd9x3d[_0x7460[50]])){loggerPredictive[_0x7460[109]](_0x7460[442]);if(!_[_0x7460[77]](_0xdcd9x3d[_0x7460[49]])){_0xdcd9x3d[_0x7460[49]]= undefined;loggerPredictive[_0x7460[122]](_0x7460[443],_0x7460[444])};if(!_[_0x7460[77]](_0xdcd9x3d[_0x7460[101]])){loggerPredictive[_0x7460[122]](_0x7460[443],_0x7460[445]);clearInterval(_0xdcd9x3d[_0x7460[101]]);_0xdcd9x3d[_0x7460[101]]= undefined};_0xdcd9x3d[_0x7460[50]]= moment()[_0x7460[99]](_0x7460[241]);loggerPredictive[_0x7460[109]](_0x7460[446],_0xdcd9x3d[_0x7460[50]],_0xdcd9x3d[_0x7460[80]]);this[_0x7460[313]](_0xdcd9x3d,1)}else {if(ifInterval(_0xdcd9x3d[_0x7460[447]],_0xdcd9x3d[_0x7460[50]])){this[_0x7460[313]](_0xdcd9x3d,1);loggerPredictiveCalls[_0x7460[109]](_0x7460[448],_0xdcd9x3d[_0x7460[50]],_0xdcd9x3d[_0x7460[80]]);_0xdcd9x3d[_0x7460[437]]= 0;_0xdcd9x3d[_0x7460[252]]= 0}else {if((_0xdcd9x8a< _0xdcd9x8b)&& _0xdcd9x3d[_0x7460[449]]=== _0x7460[450]){freeVariablesPredictive(_0xdcd9x3d);loggerPredictive[_0x7460[109]](_0x7460[451],_0x7460[452],_0xdcd9x8b,_0x7460[50],_0xdcd9x3d[_0x7460[80]])}else {if(_0xdcd9x8c> _0xdcd9x8d){freeVariablesPredictive(_0xdcd9x3d);loggerPredictive[_0x7460[109]](_0x7460[453],_0x7460[454],_0xdcd9x8c,_0x7460[455],_0xdcd9x8d)}else {if((_0xdcd9x8e)< _0xdcd9x3d[_0x7460[252]]&& _0xdcd9x3d[_0x7460[449]]=== _0x7460[450]){freeVariablesPredictive(_0xdcd9x3d);loggerPredictive[_0x7460[109]](_0x7460[456],_0x7460[457],_0xdcd9x8e,_0x7460[458],_0xdcd9x3d[_0x7460[252]],_0x7460[50],_0xdcd9x3d[_0x7460[80]])}else {if(!ifInterval(_0xdcd9x3d[_0x7460[447]],_0xdcd9x3d[_0x7460[50]])&& _[_0x7460[77]](_0xdcd9x3d[_0x7460[49]]) &&  !_[_0x7460[77]](_0xdcd9x3d[_0x7460[50]])){_0xdcd9x3d[_0x7460[49]]= moment()[_0x7460[99]](_0x7460[241]);loggerPredictive[_0x7460[109]](_0x7460[459],_0xdcd9x3d[_0x7460[49]],_0xdcd9x3d[_0x7460[80]]);this[_0x7460[168]](_0xdcd9x3d[_0x7460[447]])[_0x7460[162]](this[_0x7460[462]](_0xdcd9x3d))[_0x7460[162]](mergeDataErlangB(_0xdcd9x3d))[_0x7460[162]](this[_0x7460[461]](_0xdcd9x3d))[_0x7460[157]](loggerCatchPredictive(_0x7460[460],_0xdcd9x3d))}else {if(!ifInterval(_0xdcd9x3d[_0x7460[447]],_0xdcd9x3d[_0x7460[49]])){_0xdcd9x3d[_0x7460[252]]= 0;_0xdcd9x3d[_0x7460[49]]= moment()[_0x7460[99]](_0x7460[241]);loggerPredictive[_0x7460[109]](_0x7460[463],_0xdcd9x3d[_0x7460[49]],_0xdcd9x3d[_0x7460[80]]);clearInterval(_0xdcd9x3d[_0x7460[101]]);_0xdcd9x3d[_0x7460[101]]= undefined;this[_0x7460[168]](_0xdcd9x3d[_0x7460[447]])[_0x7460[162]](this[_0x7460[462]](_0xdcd9x3d))[_0x7460[162]](mergeDataErlangB(_0xdcd9x3d))[_0x7460[162]](this[_0x7460[461]](_0xdcd9x3d))[_0x7460[157]](loggerCatchPredictive(_0x7460[460],_0xdcd9x3d))}}}}}}}};Dialer[_0x7460[34]][_0x7460[462]]= function(_0xdcd9x3d){var _0xdcd9x68=this;return function(_0xdcd9x3e){return  new BPromise(function(_0xdcd9x82,_0xdcd9x2f){_[_0x7460[116]](_0xdcd9x3d,_0xdcd9x3e[0]);if(checkGetDataPredictive(_0xdcd9x3e[0])){loggerPredictive[_0x7460[109]](JSON[_0x7460[90]](_0xdcd9x3e[0]));if(_0xdcd9x3d[_0x7460[449]]=== _0x7460[450]){return _0xdcd9x68[_0x7460[176]](_0xdcd9x3d[_0x7460[363]])[_0x7460[162]](function(_0xdcd9x8f){var _0xdcd9x46=_0xdcd9x3d[_0x7460[326]]- _0xdcd9x8f[0][_0x7460[465]];var _0xdcd9x6c=_0xdcd9x3d[_0x7460[447]]* 60;var _0xdcd9x90=_0xdcd9x3e[0][_0x7460[107]]+ _0xdcd9x3e[0][_0x7460[110]];var _0xdcd9x91=((_0xdcd9x3e[0][_0x7460[466]]+ _0xdcd9x3e[0][_0x7460[250]]+ _0xdcd9x3e[0][_0x7460[256]])/ _0xdcd9x3e[0][_0x7460[106]]);var _0xdcd9x92=_0xdcd9x3d[_0x7460[434]]/ 100;_0xdcd9x3d[_0x7460[435]]= _0xdcd9x8f[0][_0x7460[465]]|| 0;_0xdcd9x3d[_0x7460[439]]= (_0xdcd9x91> 0)?_0xdcd9x91:1;return _0xdcd9x68[_0x7460[467]](_0xdcd9x46,_0xdcd9x6c,_0xdcd9x90,_0xdcd9x91,_0xdcd9x92)})[_0x7460[162]](function(_0xdcd9x3e){return _0xdcd9x82(_0xdcd9x3e)})[_0x7460[157]](function(_0xdcd9x30){return _0xdcd9x2f(msgResponse(_0x7460[464],_0x7460[288],JSON[_0x7460[90]](_0xdcd9x30)))})};if(_0xdcd9x3d[_0x7460[449]]=== _0x7460[468]){return _0xdcd9x68[_0x7460[176]](_0xdcd9x3d[_0x7460[363]])[_0x7460[162]](function(_0xdcd9x8f){var _0xdcd9x46=_0xdcd9x3d[_0x7460[326]]- _0xdcd9x8f[0][_0x7460[465]];var _0xdcd9x6c=_0xdcd9x3d[_0x7460[447]]* 60;var _0xdcd9x90=_0xdcd9x3e[0][_0x7460[107]]+ _0xdcd9x3e[0][_0x7460[110]];var _0xdcd9x91=((_0xdcd9x3e[0][_0x7460[466]]+ _0xdcd9x3e[0][_0x7460[250]]+ _0xdcd9x3e[0][_0x7460[256]])/ _0xdcd9x3e[0][_0x7460[106]]);var _0xdcd9x93=_0xdcd9x3d[_0x7460[434]]/ 100;_0xdcd9x3d[_0x7460[435]]= _0xdcd9x8f[0][_0x7460[465]]|| 0;_0xdcd9x3d[_0x7460[439]]= (_0xdcd9x91> 0)?_0xdcd9x91:1;return _0xdcd9x68[_0x7460[469]](_0xdcd9x46,_0xdcd9x6c,_0xdcd9x90,_0xdcd9x91,_0xdcd9x93)})[_0x7460[162]](function(_0xdcd9x3e){return _0xdcd9x82(_0xdcd9x3e)})[_0x7460[157]](function(_0xdcd9x30){return _0xdcd9x2f(msgResponse(_0x7460[464],_0x7460[288],JSON[_0x7460[90]](_0xdcd9x30)))})}}else {return _0xdcd9x2f(msgResponse(_0x7460[470],_0x7460[288],_0x7460[471]))}})}};Dialer[_0x7460[34]][_0x7460[461]]= function(_0xdcd9x3d){var _0xdcd9x68=this;return function(){var _0xdcd9x5b=0;var _0xdcd9x94=Math[_0x7460[441]](_0xdcd9x3d[_0x7460[472]]* 1000);if(_0xdcd9x94> 0){_0xdcd9x94= (_0xdcd9x94< 100)?100:_0xdcd9x94;loggerPredictive[_0x7460[109]](_0x7460[473],_0xdcd9x94);_0xdcd9x3d[_0x7460[101]]= setInterval(function(){_0xdcd9x68[_0x7460[101]](_0xdcd9x3d);loggerPredictiveCalls[_0x7460[109]](_0x7460[474],_0xdcd9x5b+= 1)},_0xdcd9x94)}else {loggerPredictive[_0x7460[109]](_0x7460[475],_0x7460[476],_0xdcd9x94)}}};Dialer[_0x7460[34]][_0x7460[477]]= function(_0xdcd9x3d,_0xdcd9x64){var _0xdcd9x68=this;return function(_0xdcd9x3e){if(_[_0x7460[87]](_0xdcd9x3e)){if(_[_0x7460[151]](_0xdcd9x64.UserId)||  !_0xdcd9x64[_0x7460[478]]){if(_0xdcd9x3d[_0x7460[319]]=== _0x7460[9]){_0xdcd9x3d[_0x7460[269]]= _[_0x7460[77]](_0xdcd9x3d[_0x7460[269]])?true:_0xdcd9x3d[_0x7460[269]];var _0xdcd9x86=uuid[_0x7460[329]]();_0xdcd9x68[_0x7460[45]][_0xdcd9x86]=  new Action(_0xdcd9x3d,_0xdcd9x64,_0xdcd9x86);if(_0xdcd9x3d[_0x7460[269]]){_0xdcd9x3d[_0x7460[269]]= false;_0xdcd9x68[_0x7460[52]][_0xdcd9x68[_0x7460[45]][_0xdcd9x86][_0x7460[153]]]= [];ami.Action({actionid:_0xdcd9x86,action:_0x7460[480],queue:_0xdcd9x3d[_0x7460[80]]})[_0x7460[157]](function(_0xdcd9x30){_0xdcd9x68[_0x7460[154]](_0xdcd9x3d);_0xdcd9x68[_0x7460[171]]({active:false,ContactId:_0xdcd9x68[_0x7460[45]][_0xdcd9x86][_0x7460[187]],ListId:_0xdcd9x68[_0x7460[45]][_0xdcd9x86][_0x7460[188]],VoiceQueueId:_0xdcd9x68[_0x7460[45]][_0xdcd9x86][_0x7460[190]]|| undefined,CampaignId:_0xdcd9x68[_0x7460[45]][_0xdcd9x86][_0x7460[191]]|| undefined})[_0x7460[157]](loggerCatch(_0x7460[479]));delete _0xdcd9x68[_0x7460[45]][_0xdcd9x86]})}else {loggerBooked[_0x7460[109]](_0x7460[481],_0xdcd9x3d[_0x7460[269]]);_0xdcd9x68[_0x7460[154]](_0xdcd9x3d);_0xdcd9x68[_0x7460[171]]({active:false,ContactId:_0xdcd9x68[_0x7460[45]][_0xdcd9x86][_0x7460[187]],ListId:_0xdcd9x68[_0x7460[45]][_0xdcd9x86][_0x7460[188]],VoiceQueueId:_0xdcd9x68[_0x7460[45]][_0xdcd9x86][_0x7460[190]]|| undefined,CampaignId:_0xdcd9x68[_0x7460[45]][_0xdcd9x86][_0x7460[191]]|| undefined})[_0x7460[157]](loggerCatch(_0x7460[479]));delete _0xdcd9x68[_0x7460[45]][_0xdcd9x86]}}else {return _0xdcd9x68[_0x7460[328]](_0xdcd9x3d,_0xdcd9x64)}}else {if(getDiff(_0xdcd9x64[_0x7460[482]])< (_0xdcd9x3d[_0x7460[483]]* 60)){_0xdcd9x68[_0x7460[38]][_0x7460[272]](_0xdcd9x64[_0x7460[363]])[_0x7460[36]](function(){_0xdcd9x68[_0x7460[154]](_0xdcd9x3d)})}else {_0xdcd9x3d[_0x7460[484]]+= 1;_0xdcd9x68[_0x7460[154]](_0xdcd9x3d);if(_0xdcd9x3d[_0x7460[485]]){_0xdcd9x68[_0x7460[171]]({active:false,recallme:false,UserId:null,ContactId:_0xdcd9x64[_0x7460[187]],ListId:_0xdcd9x64[_0x7460[188]],VoiceQueueId:_0xdcd9x64[_0x7460[190]]|| undefined,CampaignId:_0xdcd9x64[_0x7460[191]]|| undefined})[_0x7460[157]](loggerCatch(_0x7460[486]));_0xdcd9x68[_0x7460[180]](createObjHistory(_0xdcd9x3d,_0xdcd9x64,_0x7460[488],23,_0x7460[489]))[_0x7460[157]](loggerCatch(_0x7460[487]))}else {_0xdcd9x68[_0x7460[195]](createObjHistory(_0xdcd9x3d,_0xdcd9x64,_0x7460[490],22,_0x7460[491]),_0x7460[492],_0x7460[493])}}}}else {_0xdcd9x3d[_0x7460[494]]+= 1;_0xdcd9x68[_0x7460[195]](createObjHistory(_0xdcd9x3d,_0xdcd9x64,_0x7460[495],13,_0x7460[496]),_0x7460[497],_0x7460[498]);throw _0x7460[499]}}};Dialer[_0x7460[34]][_0x7460[321]]= function(_0xdcd9x62){var _0xdcd9x68=this;var _0xdcd9x5a=[];var _0xdcd9x5d=_0xdcd9x62[_0x7460[500]]- _0xdcd9x62[_0x7460[124]]- _0xdcd9x62[_0x7460[501]];emitCampaignSummary(_0xdcd9x62);if(_0xdcd9x5d> 0){if(_0xdcd9x5d> this[_0x7460[43]]){_0xdcd9x5d= this[_0x7460[43]]};_0xdcd9x62[_0x7460[501]]+= _0xdcd9x5d;this[_0x7460[175]](_0xdcd9x62[_0x7460[363]],_0xdcd9x5d,_0xdcd9x62[_0x7460[509]])[_0x7460[162]](function(_0xdcd9x3e){_0xdcd9x62[_0x7460[501]]-= _0xdcd9x5d;_0xdcd9x62[_0x7460[501]]= (_0xdcd9x62[_0x7460[501]]> 0)?_0xdcd9x62[_0x7460[501]]:0;if(!checkContactEmpty(_0xdcd9x3e)){_0xdcd9x62[_0x7460[78]]= _0x7460[132];logger[_0x7460[109]](_0x7460[503]+ _0xdcd9x62[_0x7460[80]])}else {_0xdcd9x62[_0x7460[124]]+= _0xdcd9x3e[_0x7460[123]];_0xdcd9x62[_0x7460[78]]= _0x7460[504];for(var _0xdcd9x95=0;_0xdcd9x95< _0xdcd9x3e[_0x7460[123]];_0xdcd9x95+= 1){_0xdcd9x62[_0x7460[505]]+= 1;if(_[_0x7460[151]](_0xdcd9x3e[_0xdcd9x95])|| _[_0x7460[151]](_0xdcd9x3e[_0xdcd9x95].Contact)|| _[_0x7460[151]](_0xdcd9x3e[_0xdcd9x95][_0x7460[334]][_0x7460[333]])){_0xdcd9x68[_0x7460[185]](_0x7460[506],_0xdcd9x62,_0xdcd9x3e[_0xdcd9x95])}else {_0xdcd9x68[_0x7460[166]](_[_0x7460[192]](_0xdcd9x3e[_0xdcd9x95],[_0x7460[191],_0x7460[508]]))[_0x7460[162]](_0xdcd9x68[_0x7460[477]](_0xdcd9x62,_0xdcd9x3e[_0xdcd9x95]))[_0x7460[157]](_0xdcd9x68[_0x7460[184]](_0x7460[507],_0xdcd9x62))}}}})[_0x7460[157]](loggerGetContactDialer(_0x7460[502],_0xdcd9x62,_0xdcd9x5d))}};Dialer[_0x7460[34]][_0x7460[313]]= function(_0xdcd9x3d,_0xdcd9x96){var _0xdcd9x68=this;var _0xdcd9x97=[];var _0xdcd9x98=_0xdcd9x96>= 1?_0xdcd9x96:1;var _0xdcd9x5a=[];var _0xdcd9x5d=Math[_0x7460[441]](_0xdcd9x3d[_0x7460[319]]=== _0x7460[9]?(_0xdcd9x3d[_0x7460[326]]- _0xdcd9x3d[_0x7460[137]]):_0xdcd9x3d[_0x7460[138]]* _0xdcd9x98)- _0xdcd9x3d[_0x7460[124]]- _0xdcd9x3d[_0x7460[501]];emitVoiceQueueSummary(_0xdcd9x3d);if(_0xdcd9x3d[_0x7460[510]]> 0){var _0xdcd9x99=_0xdcd9x3d[_0x7460[510]]- _0xdcd9x3d[_0x7460[124]]- _0xdcd9x3d[_0x7460[135]]- _0xdcd9x3d[_0x7460[501]]- _0xdcd9x3d[_0x7460[137]];if(_0xdcd9x5d> _0xdcd9x99){_0xdcd9x5d= _0xdcd9x99}};if(_0xdcd9x5d> 0){if(_0xdcd9x3d[_0x7460[319]]=== _0x7460[9]){_0xdcd9x5d= 1};if(_0xdcd9x5d> this[_0x7460[43]]){_0xdcd9x5d= this[_0x7460[43]]};_0xdcd9x3d[_0x7460[501]]+= _0xdcd9x5d;for(var _0xdcd9x9a in this[_0x7460[41]]){if(this[_0x7460[41]][_0x7460[125]](_0xdcd9x9a)){if(this[_0x7460[41]][_0xdcd9x9a][_0x7460[144]]=== _0x7460[511]&& this[_0x7460[41]][_0xdcd9x9a][_0x7460[158]]=== _0x7460[201]){_0xdcd9x97[_0x7460[268]](this[_0x7460[41]][_0xdcd9x9a][_0x7460[363]])}}};this[_0x7460[173]](_0xdcd9x3d[_0x7460[363]],_0xdcd9x97,_0xdcd9x5d,_0xdcd9x3d[_0x7460[509]])[_0x7460[162]](function(_0xdcd9x3e){_0xdcd9x3d[_0x7460[501]]-= _0xdcd9x5d;_0xdcd9x3d[_0x7460[501]]= (_0xdcd9x3d[_0x7460[501]]> 0)?_0xdcd9x3d[_0x7460[501]]:0;if(!checkContactEmpty(_0xdcd9x3e)){_0xdcd9x68[_0x7460[160]](_0xdcd9x3d)[_0x7460[162]](sendMessageReschedule(_0xdcd9x3d))[_0x7460[157]](loggerCatch(_0x7460[161]))}else {_0xdcd9x3d[_0x7460[124]]+= _0xdcd9x3e[_0x7460[123]];_0xdcd9x3d[_0x7460[78]]= _0xdcd9x3d[_0x7460[319]]=== _0x7460[9]?_0x7460[342]:_0x7460[504];for(var _0xdcd9x95=0;_0xdcd9x95< _0xdcd9x3e[_0x7460[123]];_0xdcd9x95+= 1){if(_[_0x7460[151]](_0xdcd9x3e[_0xdcd9x95])|| _[_0x7460[151]](_0xdcd9x3e[_0xdcd9x95].Contact)|| _[_0x7460[151]](_0xdcd9x3e[_0xdcd9x95][_0x7460[334]][_0x7460[333]])){_0xdcd9x68[_0x7460[185]](_0x7460[506],_0xdcd9x3d,_0xdcd9x3e[_0xdcd9x95])}else {_0xdcd9x68[_0x7460[164]](_[_0x7460[192]](_0xdcd9x3e[_0xdcd9x95],[_0x7460[190],_0x7460[508]]))[_0x7460[162]](_0xdcd9x68[_0x7460[477]](_0xdcd9x3d,_0xdcd9x3e[_0xdcd9x95]))[_0x7460[157]](_0xdcd9x68[_0x7460[184]](_0x7460[506],_0xdcd9x3d))}}}})[_0x7460[157]](loggerGetContactDialer(_0x7460[512],_0xdcd9x3d,_0xdcd9x5d))}};Dialer[_0x7460[34]][_0x7460[101]]= function(_0xdcd9x3d){var _0xdcd9x68=this;if(_0xdcd9x3d[_0x7460[510]]> 0){var _0xdcd9x99=_0xdcd9x3d[_0x7460[510]]- _0xdcd9x3d[_0x7460[124]]- _0xdcd9x3d[_0x7460[135]];if(_0xdcd9x99> 0){this[_0x7460[513]](_0xdcd9x3d)}else {loggerPredictiveCalls[_0x7460[109]](_0x7460[514])}}else {this[_0x7460[513]](_0xdcd9x3d)}};Dialer[_0x7460[34]][_0x7460[513]]= function(_0xdcd9x3d){var _0xdcd9x68=this;var _0xdcd9x97=[];_0xdcd9x3d[_0x7460[124]]+= 1;for(var _0xdcd9x9a in this[_0x7460[41]]){if(this[_0x7460[41]][_0x7460[125]](_0xdcd9x9a)){if(this[_0x7460[41]][_0xdcd9x9a][_0x7460[144]]=== _0x7460[511]&& this[_0x7460[41]][_0xdcd9x9a][_0x7460[158]]=== _0x7460[201]){_0xdcd9x97[_0x7460[268]](this[_0x7460[41]][_0xdcd9x9a][_0x7460[363]])}}};this[_0x7460[173]](_0xdcd9x3d[_0x7460[363]],_0xdcd9x97,1,_0xdcd9x3d[_0x7460[509]])[_0x7460[162]](function(_0xdcd9x3e){if(!checkContactEmpty(_0xdcd9x3e)){checkContactLowerLimitOriginate(_0xdcd9x3d,1,0);_0xdcd9x68[_0x7460[160]](_0xdcd9x3d)[_0x7460[162]](sendMessageReschedule(_0xdcd9x3d))[_0x7460[157]](loggerCatch(_0x7460[161]))}else {_0xdcd9x3d[_0x7460[78]]= _0x7460[504];if(_[_0x7460[151]](_0xdcd9x3e[0])|| _[_0x7460[151]](_0xdcd9x3e[0].Contact)|| _[_0x7460[151]](_0xdcd9x3e[0][_0x7460[334]][_0x7460[333]])){_0xdcd9x68[_0x7460[185]](_0x7460[506],_0xdcd9x3d,_0xdcd9x3e[0])}else {_0xdcd9x68[_0x7460[164]](_[_0x7460[192]](_0xdcd9x3e[0],[_0x7460[190],_0x7460[508]]))[_0x7460[162]](_0xdcd9x68[_0x7460[477]](_0xdcd9x3d,_0xdcd9x3e[0]))[_0x7460[157]](_0xdcd9x68[_0x7460[184]](_0x7460[516],_0xdcd9x3d))}}})[_0x7460[157]](loggerGetContactDialer(_0x7460[515],_0xdcd9x3d,1));emitVoiceQueueSummary(_0xdcd9x3d)};Dialer[_0x7460[34]][_0x7460[467]]= function(_0xdcd9x46,_0xdcd9x6c,_0xdcd9x90,_0xdcd9x9b,_0xdcd9x92,_0xdcd9x9c){loggerPredictive[_0x7460[109]](_0x7460[517],_0x7460[518],_0xdcd9x46,_0x7460[519],_0xdcd9x6c,_0x7460[520],_0xdcd9x90,_0x7460[521],_0xdcd9x9b,_0x7460[522],_0xdcd9x92);return  new BPromise(function(_0xdcd9x82,_0xdcd9x2f){if(_0xdcd9x46<= 0|| isNaN(_0xdcd9x46)){return _0xdcd9x2f(msgResponse(_0x7460[517],_0x7460[89],_0x7460[523]+ _0xdcd9x46))};if(_0xdcd9x90<= 0|| isNaN(_0xdcd9x90)){return _0xdcd9x2f(msgResponse(_0x7460[517],_0x7460[89],_0x7460[524]+ _0xdcd9x90))};if(_0xdcd9x9b<= 0|| isNaN(_0xdcd9x9b)){return _0xdcd9x2f(msgResponse(_0x7460[517],_0x7460[89],_0x7460[525]+ _0xdcd9x9b))};if(_0xdcd9x6c<= 0|| isNaN(_0xdcd9x6c)){return _0xdcd9x2f(msgResponse(_0x7460[517],_0x7460[89],_0x7460[526]+ _0xdcd9x6c))};if(_0xdcd9x92<= 0|| isNaN(_0xdcd9x92)){return _0xdcd9x2f(msgResponse(_0x7460[517],_0x7460[89],_0x7460[527]+ _0xdcd9x92))};_0xdcd9x9c= _0xdcd9x9c|| 0.0;var _0xdcd9x9d=1.0/ _0xdcd9x90;var _0xdcd9x45=0.0;var _0xdcd9x9e=0.0;var _0xdcd9x33=0.0;var _0xdcd9x9f=0.0;for(var _0xdcd9x5b=0;_0xdcd9x33< _0xdcd9x92;_0xdcd9x5b+= 1){_0xdcd9x9e= _0xdcd9x5b/ _0xdcd9x6c;_0xdcd9x45= ((_0xdcd9x9b* _0xdcd9x9e)+ _0xdcd9x9c)/ _0xdcd9x9d;_0xdcd9x33= erlangb(_0xdcd9x45,_0xdcd9x46);_0xdcd9x9f= (_0xdcd9x45/ _0xdcd9x46)* (1- erlangb(_0xdcd9x45,_0xdcd9x46))};return _0xdcd9x82({erlangCalls:_0xdcd9x5b,erlangCallToSecond:(_0xdcd9x6c/ _0xdcd9x5b),erlangAbandonmentRate:_0xdcd9x33,erlangBusyFactor:_0xdcd9x9f})})};Dialer[_0x7460[34]][_0x7460[469]]= function(_0xdcd9x46,_0xdcd9x6c,_0xdcd9x90,_0xdcd9x9b,_0xdcd9x93,_0xdcd9x9c){loggerPredictive[_0x7460[109]](_0x7460[528],_0x7460[518],_0xdcd9x46,_0x7460[519],_0xdcd9x6c,_0x7460[520],_0xdcd9x90,_0x7460[521],_0xdcd9x9b,_0x7460[529],_0xdcd9x93);return  new BPromise(function(_0xdcd9x82,_0xdcd9x2f){if(_0xdcd9x46<= 0|| isNaN(_0xdcd9x46)){return _0xdcd9x2f(msgResponse(_0x7460[517],_0x7460[89],_0x7460[523]+ _0xdcd9x46))};if(_0xdcd9x90<= 0|| isNaN(_0xdcd9x90)){return _0xdcd9x2f(msgResponse(_0x7460[517],_0x7460[89],_0x7460[524]+ _0xdcd9x90))};if(_0xdcd9x9b<= 0|| isNaN(_0xdcd9x9b)){return _0xdcd9x2f(msgResponse(_0x7460[517],_0x7460[89],_0x7460[525]+ _0xdcd9x9b))};if(_0xdcd9x6c<= 0|| isNaN(_0xdcd9x6c)){return _0xdcd9x2f(msgResponse(_0x7460[517],_0x7460[89],_0x7460[526]+ _0xdcd9x6c))};if(_0xdcd9x93<= 0|| isNaN(_0xdcd9x93)){return _0xdcd9x2f(msgResponse(_0x7460[517],_0x7460[89],_0x7460[527]+ _0xdcd9x93))};_0xdcd9x9c= _0xdcd9x9c|| 0.0;var _0xdcd9x9d=1.0/ _0xdcd9x90;var _0xdcd9x45=0.0;var _0xdcd9x9e=0.0;var _0xdcd9x33=0.0;var _0xdcd9x9f=0.0;for(var _0xdcd9x5b=0;_0xdcd9x9f< _0xdcd9x93;_0xdcd9x5b+= 1){_0xdcd9x9e= _0xdcd9x5b/ _0xdcd9x6c;_0xdcd9x45= ((_0xdcd9x9b* _0xdcd9x9e)+ _0xdcd9x9c)/ _0xdcd9x9d;_0xdcd9x33= erlangb(_0xdcd9x45,_0xdcd9x46);_0xdcd9x9f= (_0xdcd9x45/ _0xdcd9x46)* (1- erlangb(_0xdcd9x45,_0xdcd9x46))};return _0xdcd9x82({erlangCalls:_0xdcd9x5b,erlangCallToSecond:(_0xdcd9x6c/ _0xdcd9x5b),erlangAbandonmentRate:_0xdcd9x33,erlangBusyFactor:_0xdcd9x9f})})};module[_0x7460[530]]= Dialer
\ No newline at end of file
index 48874c4..b1e4d2e 100644 (file)
@@ -1 +1 @@
-var _0x9151=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x74\x79\x70\x65","\x63\x61\x6D\x70\x61\x69\x67\x6E\x74\x79\x70\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x71\x75\x65\x75\x65","\x63\x6F\x75\x6E\x74\x62\x75\x73\x79\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x6E\x6F\x61\x6E\x73\x77\x65\x72\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x67\x6C\x6F\x62\x61\x6C","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6E\x75\x6D\x62\x65\x72","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65\x74\x69\x6D\x65","\x64\x72\x6F\x70\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x72\x69\x6E\x67\x74\x69\x6D\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x72\x65\x61\x73\x6F\x6E","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x61\x74","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x55\x73\x65\x72\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x9151[0];var util=require(_0x9151[1]);var _=require(_0x9151[2]);var moment=require(_0x9151[3]);function getSeconds(_0x94d6x5,_0x94d6x6){var _0x94d6x7=moment(_0x94d6x5)[_0x9151[4]](0);var _0x94d6x8=moment(_0x94d6x6)[_0x9151[4]](0);return _0x94d6x7[_0x9151[6]](_0x94d6x8,_0x9151[5])}function QueueCallerAbandon(_0x94d6xa,_0x94d6xb){this[_0x9151[7]]= _0x94d6xa[_0x9151[7]];this[_0x9151[8]]= _0x94d6xa[_0x9151[8]];this[_0x9151[9]]= (_0x94d6xa[_0x9151[8]]=== _0x9151[10])?_0x9151[11]:_0x94d6xa[_0x9151[8]];this[_0x9151[12]]= _0x94d6xa[_0x9151[12]];this[_0x9151[13]]= _0x94d6xa[_0x9151[13]];this[_0x9151[14]]= _0x94d6xa[_0x9151[14]];this[_0x9151[15]]= _0x94d6xa[_0x9151[12]]+ _0x94d6xa[_0x9151[13]]+ _0x94d6xa[_0x9151[14]];this[_0x9151[16]]= _0x94d6xb[_0x9151[16]];this[_0x9151[17]]= _0x94d6xa[_0x9151[18]];this[_0x9151[19]]= _0x94d6xa[_0x9151[20]];this[_0x9151[21]]= _0x94d6xa[_0x9151[21]];this[_0x9151[22]]= _0x94d6xa[_0x9151[22]];this[_0x9151[23]]= _0x94d6xa[_0x9151[23]];this[_0x9151[24]]= this[_0x9151[23]];this[_0x9151[25]]= getSeconds(_0x94d6xa[_0x9151[22]],_0x94d6xa[_0x9151[21]]);this[_0x9151[26]]= getSeconds(this[_0x9151[23]],_0x94d6xa[_0x9151[22]]);this[_0x9151[27]]= 0;this[_0x9151[11]]= _0x94d6xb[_0x9151[11]];this[_0x9151[28]]= _0x94d6xb[_0x9151[29]];this[_0x9151[30]]= _0x94d6xb[_0x9151[30]];this[_0x9151[31]]= _0x94d6xa[_0x9151[31]];this[_0x9151[32]]= _0x94d6xa[_0x9151[32]];this[_0x9151[33]]= _0x94d6xa[_0x9151[33]];this[_0x9151[34]]= _0x94d6xa[_0x9151[34]];this[_0x9151[35]]= _0x94d6xa[_0x9151[35]];this[_0x9151[36]]= _0x94d6xa[_0x9151[36]];this[_0x9151[37]]= _0x94d6xa[_0x9151[37]];this[_0x9151[38]]= _0x94d6xa[_0x9151[38]];this[_0x9151[39]]= _0x94d6xa[_0x9151[39]]}module[_0x9151[40]]= QueueCallerAbandon
\ No newline at end of file
+var _0x6ad5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x74\x79\x70\x65","\x63\x61\x6D\x70\x61\x69\x67\x6E\x74\x79\x70\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x71\x75\x65\x75\x65","\x63\x6F\x75\x6E\x74\x62\x75\x73\x79\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x6E\x6F\x61\x6E\x73\x77\x65\x72\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x67\x6C\x6F\x62\x61\x6C","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6E\x75\x6D\x62\x65\x72","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65\x74\x69\x6D\x65","\x64\x72\x6F\x70\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x72\x69\x6E\x67\x74\x69\x6D\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x72\x65\x61\x73\x6F\x6E","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x61\x74","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x55\x73\x65\x72\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x6ad5[0];var util=require(_0x6ad5[1]);var _=require(_0x6ad5[2]);var moment=require(_0x6ad5[3]);function getSeconds(_0x5959x5,_0x5959x6){var _0x5959x7=moment(_0x5959x5)[_0x6ad5[4]](0);var _0x5959x8=moment(_0x5959x6)[_0x6ad5[4]](0);return _0x5959x7[_0x6ad5[6]](_0x5959x8,_0x6ad5[5])}function QueueCallerAbandon(_0x5959xa,_0x5959xb){this[_0x6ad5[7]]= _0x5959xa[_0x6ad5[7]];this[_0x6ad5[8]]= _0x5959xa[_0x6ad5[8]];this[_0x6ad5[9]]= (_0x5959xa[_0x6ad5[8]]=== _0x6ad5[10])?_0x6ad5[11]:_0x5959xa[_0x6ad5[8]];this[_0x6ad5[12]]= _0x5959xa[_0x6ad5[12]];this[_0x6ad5[13]]= _0x5959xa[_0x6ad5[13]];this[_0x6ad5[14]]= _0x5959xa[_0x6ad5[14]];this[_0x6ad5[15]]= _0x5959xa[_0x6ad5[12]]+ _0x5959xa[_0x6ad5[13]]+ _0x5959xa[_0x6ad5[14]];this[_0x6ad5[16]]= _0x5959xb[_0x6ad5[16]];this[_0x6ad5[17]]= _0x5959xa[_0x6ad5[18]];this[_0x6ad5[19]]= _0x5959xa[_0x6ad5[20]];this[_0x6ad5[21]]= _0x5959xa[_0x6ad5[21]];this[_0x6ad5[22]]= _0x5959xa[_0x6ad5[22]];this[_0x6ad5[23]]= _0x5959xa[_0x6ad5[23]];this[_0x6ad5[24]]= this[_0x6ad5[23]];this[_0x6ad5[25]]= getSeconds(_0x5959xa[_0x6ad5[22]],_0x5959xa[_0x6ad5[21]]);this[_0x6ad5[26]]= getSeconds(this[_0x6ad5[23]],_0x5959xa[_0x6ad5[22]]);this[_0x6ad5[27]]= 0;this[_0x6ad5[11]]= _0x5959xb[_0x6ad5[11]];this[_0x6ad5[28]]= _0x5959xb[_0x6ad5[29]];this[_0x6ad5[30]]= _0x5959xb[_0x6ad5[30]];this[_0x6ad5[31]]= _0x5959xa[_0x6ad5[31]];this[_0x6ad5[32]]= _0x5959xa[_0x6ad5[32]];this[_0x6ad5[33]]= _0x5959xa[_0x6ad5[33]];this[_0x6ad5[34]]= _0x5959xa[_0x6ad5[34]];this[_0x6ad5[35]]= _0x5959xa[_0x6ad5[35]];this[_0x6ad5[36]]= _0x5959xa[_0x6ad5[36]];this[_0x6ad5[37]]= _0x5959xa[_0x6ad5[37]];this[_0x6ad5[38]]= _0x5959xa[_0x6ad5[38]];this[_0x6ad5[39]]= _0x5959xa[_0x6ad5[39]]}module[_0x6ad5[40]]= QueueCallerAbandon
\ No newline at end of file
index c3ae69d..1ba862e 100644 (file)
@@ -1 +1 @@
-var _0x1930=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x25\x73\x2F\x25\x73\x2F\x25\x73","\x74\x65\x63\x68","\x6E\x61\x6D\x65","\x54\x72\x75\x6E\x6B","\x66\x61\x78","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F","\x70\x61\x74\x68","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x49\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x1930[0];var util=require(_0x1930[1]);var _=require(_0x1930[2]);var moment=require(_0x1930[3]);function Action(_0xf24dx5,_0xf24dx6,_0xf24dx7){this[_0x1930[4]]= _0xf24dx5|| undefined;this[_0x1930[5]]= util[_0x1930[11]](_0x1930[6],_0xf24dx6[_0x1930[7]],_0xf24dx6[_0x1930[9]][_0x1930[8]],_0xf24dx7[_0x1930[10]]);this[_0x1930[12]]= _0xf24dx6[_0x1930[12]];this[_0x1930[13]]= _0xf24dx6[_0x1930[13]];this[_0x1930[14]]= _0xf24dx7[_0x1930[14]];this[_0x1930[15]]= _0xf24dx7[_0x1930[15]]}module[_0x1930[16]]= Action
\ No newline at end of file
+var _0xa195=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x25\x73\x2F\x25\x73\x2F\x25\x73","\x74\x65\x63\x68","\x6E\x61\x6D\x65","\x54\x72\x75\x6E\x6B","\x66\x61\x78","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F","\x70\x61\x74\x68","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x49\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0xa195[0];var util=require(_0xa195[1]);var _=require(_0xa195[2]);var moment=require(_0xa195[3]);function Action(_0xe987x5,_0xe987x6,_0xe987x7){this[_0xa195[4]]= _0xe987x5|| undefined;this[_0xa195[5]]= util[_0xa195[11]](_0xa195[6],_0xe987x6[_0xa195[7]],_0xe987x6[_0xa195[9]][_0xa195[8]],_0xe987x7[_0xa195[10]]);this[_0xa195[12]]= _0xe987x6[_0xa195[12]];this[_0xa195[13]]= _0xe987x6[_0xa195[13]];this[_0xa195[14]]= _0xe987x7[_0xa195[14]];this[_0xa195[15]]= _0xe987x7[_0xa195[15]]}module[_0xa195[16]]= Action
\ No newline at end of file
index 4fd04f7..0f3c594 100644 (file)
@@ -1 +1 @@
-var _0x17a1=[]
\ No newline at end of file
+var _0x8a5b=[]
\ No newline at end of file
index edf4ce1..0267489 100644 (file)
@@ -1 +1 @@
-var _0xd4b2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x75\x69\x64","\x6D\x6F\x6D\x65\x6E\x74","\x70\x61\x74\x68","\x74\x69\x66\x66\x32\x70\x64\x66","\x2E\x2F\x75\x74\x69\x6C\x2F\x67\x73","\x66\x61\x78","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x6D\x69","\x2E\x2F\x72\x70\x63\x44\x62","\x2E\x2F\x63\x68\x61\x6E\x6E\x65\x6C","\x2E\x2F\x75\x74\x69\x6C\x2F\x75\x74\x69\x6C","\x2E\x2F\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x72\x70\x63\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x74\x72\x75\x6E\x6B\x73","\x61\x63\x74\x69\x6F\x6E\x73","\x6E\x65\x77\x63\x68\x61\x6E\x6E\x65\x6C","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x4E\x65\x77\x63\x68\x61\x6E\x6E\x65\x6C","\x6F\x6E","\x76\x61\x72\x73\x65\x74","\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74","\x6E\x65\x77\x73\x74\x61\x74\x65","\x73\x79\x6E\x63\x4E\x65\x77\x53\x74\x61\x74\x65","\x6E\x65\x77\x65\x78\x74\x65\x6E","\x73\x79\x6E\x63\x4E\x65\x77\x45\x78\x74\x65\x6E","\x66\x61\x78\x73\x74\x61\x74\x75\x73","\x73\x79\x6E\x63\x46\x61\x78\x53\x74\x61\x74\x75\x73","\x72\x65\x63\x65\x69\x76\x65\x66\x61\x78","\x73\x79\x6E\x63\x52\x65\x63\x65\x69\x76\x65\x46\x61\x78","\x68\x61\x6E\x67\x75\x70","\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x72\x65\x73\x70\x6F\x6E\x73\x65","\x73\x79\x6E\x63\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x52\x65\x73\x70\x6F\x6E\x73\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x70\x2D\x70\x72\x6F\x76\x69\x64\x65\x72","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x65\x78\x74\x65\x6E","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x69\x64","\x6E\x61\x6D\x65","\x20\x73\x79\x6E\x63\x4E\x65\x77\x63\x68\x61\x6E\x6E\x65\x6C\x20","\x69\x6E\x66\x6F","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x6C\x75\x65","\x63\x68\x61\x6E\x6E\x65\x6C\x73\x74\x61\x74\x65","\x63\x68\x61\x6E\x6E\x65\x6C\x73\x74\x61\x74\x65\x64\x65\x73\x63","\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E","\x73\x74\x61\x74\x75\x73","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x20\x73\x79\x6E\x63\x46\x61\x78\x53\x74\x61\x74\x75\x73\x20","\x72\x65\x6D\x6F\x74\x65\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x70\x61\x67\x65\x73\x74\x72\x61\x6E\x73\x66\x65\x72\x72\x65\x64","\x72\x65\x73\x6F\x6C\x75\x74\x69\x6F\x6E","\x74\x72\x61\x6E\x73\x66\x65\x72\x72\x61\x74\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x32\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73\x2F","\x20\x72\x65\x73\x75\x6C\x74\x20\x63\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x66\x69\x6C\x65\x20","\x6D\x65\x73\x73\x61\x67\x65","\x20\x72\x65\x63\x65\x69\x76\x65\x46\x61\x78\x20","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x20\x6E\x6F\x74\x69\x66\x79\x20","\x70\x61\x72\x73\x65","\x2E\x70\x64\x66","\x6E\x6F\x74\x69\x66\x79","\x74\x68\x65\x6E","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x70\x64\x66","\x63\x72\x65\x61\x74\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x72\x65\x61\x73\x6F\x6E","\x70\x69\x63\x6B","\x6D\x65\x72\x67\x65","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x49\x64","\x5B\x46\x61\x78\x5D\x5B\x4D\x65\x73\x73\x61\x67\x65\x5D\x5B\x45\x72\x72\x6F\x72\x5D\x5B\x4E\x6F\x55\x70\x64\x61\x74\x65\x31\x5D","\x6C\x6F\x67\x67\x65\x72","\x5B\x46\x61\x78\x5D\x5B\x4D\x65\x73\x73\x61\x67\x65\x5D\x5B\x45\x72\x72\x6F\x72\x5D\x5B\x55\x70\x64\x61\x74\x65\x64\x5D","\x53\x45\x4E\x44\x49\x4E\x47\x20\x46\x41\x49\x4C\x45\x44\x20","\x75\x70\x64\x61\x74\x65","\x5B\x46\x61\x78\x5D\x5B\x4D\x65\x73\x73\x61\x67\x65\x5D\x5B\x45\x72\x72\x6F\x72\x5D\x5B\x4E\x6F\x55\x70\x64\x61\x74\x65\x32\x5D","\x75\x70\x64\x61\x74\x65\x53\x74\x61\x74\x75\x73","\x66\x69\x6E\x61\x6C\x6C\x79","\x5B\x46\x61\x78\x5D\x5B\x4D\x65\x73\x73\x61\x67\x65\x5D\x5B\x4E\x6F\x55\x70\x64\x61\x74\x65\x31\x5D","\x5B\x46\x61\x78\x5D\x5B\x4D\x65\x73\x73\x61\x67\x65\x5D\x5B\x55\x70\x64\x61\x74\x65\x64\x5D","\x5B\x46\x61\x78\x5D\x5B\x4D\x65\x73\x73\x61\x67\x65\x5D\x5B\x4E\x6F\x55\x70\x64\x61\x74\x65\x32\x5D","\x20\x68\x61\x6E\x67\x75\x70\x20\x73\x65\x6E\x64\x46\x69\x6C\x65\x20","\x20\x68\x61\x6E\x67\x75\x70\x20\x66\x61\x78\x52\x69\x63\x65\x69\x76\x65\x20","\x66\x61\x78\x70\x61\x67\x65\x73","\x53\x55\x43\x43\x45\x53\x53","\x66\x61\x78\x73\x74\x61\x74\x75\x73\x73\x74\x72\x69\x6E\x67","\x53\x45\x4E\x44\x49\x4E\x47\x20\x46\x41\x49\x4C\x45\x44\x3A\x20","\x53\x45\x4E\x44\x49\x4E\x47\x20\x46\x41\x49\x4C\x45\x44","\x73\x65\x6E\x64","\x5B\x46\x61\x78\x5D\x5B\x65\x78\x65\x63\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x5B\x66\x61\x69\x6C\x75\x72\x65\x5D","\x46\x61\x78\x20\x66\x61\x69\x6C\x65\x64","\x5B\x46\x61\x78\x5D\x5B\x65\x78\x65\x63\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x5B\x73\x75\x63\x63\x65\x73\x73\x5D","\x46\x61\x78\x20\x72\x65\x63\x65\x69\x76\x65\x64","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x65\x78\x65\x63\x4F\x72\x69\x67\x69\x6E\x61\x74\x65","\x63\x68\x65\x63\x6B\x41\x66\x74\x65\x72\x53\x65\x6E\x64","\x63\x68\x65\x63\x6B\x54\x72\x75\x6E\x6B","\x69\x73\x56\x61\x6C\x69\x64","\x54\x72\x75\x6E\x6B\x20\x52\x65\x61\x63\x68\x61\x62\x6C\x65","\x67\x73\x20\x2D\x71\x20\x2D\x64\x4E\x4F\x50\x41\x55\x53\x45\x20\x2D\x64\x42\x41\x54\x43\x48\x20\x2D\x73\x44\x45\x56\x49\x43\x45\x3D\x74\x69\x66\x66\x67\x34\x20\x2D\x73\x50\x41\x50\x45\x52\x53\x49\x5A\x45\x3D\x6C\x65\x74\x74\x65\x72\x20\x2D\x73\x4F\x75\x74\x70\x75\x74\x46\x69\x6C\x65\x3D\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x32\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73\x2F\x25\x73\x2E\x74\x69\x66\x20\x20\x25\x73\x20\x2D\x63\x20\x71\x75\x69\x74","\x66\x6F\x72\x6D\x61\x74","\x25\x73\x2F\x25\x73\x2E\x74\x69\x66","\x64\x69\x72","\x58\x4D\x46\x2D\x50\x41\x54\x48","\x43\x6F\x6E\x76\x65\x72\x74\x20\x70\x64\x66\x20\x74\x6F\x20\x74\x69\x66","","\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x41\x63\x74\x69\x6F\x6E","\x65\x78\x65\x63\x75\x74\x65","\x76\x34","\x61\x64\x64\x56\x61\x72\x69\x61\x62\x6C\x65\x73","\x65\x78\x74","\x69\x73\x54\x72\x75\x6E\x6B\x52\x65\x61\x63\x68\x61\x62\x6C\x65","\x69\x73\x4E\x69\x6C","\x61\x63\x74\x69\x76\x65","\x53\x49\x50\x2F\x25\x73","\x72\x65\x61\x63\x68\x61\x62\x6C\x65","\x75\x6E\x6D\x6F\x6E\x69\x74\x6F\x72\x65\x64","\x5B\x46\x61\x78\x5D\x5B\x63\x68\x65\x63\x6B\x54\x72\x75\x6E\x6B\x5D\x5B\x54\x72\x75\x6E\x6B\x20\x6E\x6F\x74\x20\x77\x6F\x72\x6B\x5D","\x20\x54\x72\x75\x6E\x6B\x20\x69\x73\x20\x6E\x6F\x74\x20\x61\x63\x74\x69\x76\x65","\x54\x72\x75\x6E\x6B\x20\x6E\x6F\x74\x20\x77\x6F\x72\x6B\x69\x6E\x67","\x5B\x46\x61\x78\x5D\x5B\x63\x68\x65\x63\x6B\x54\x72\x75\x6E\x6B\x5D\x5B\x45\x6D\x70\x74\x79\x20\x46\x61\x78\x5D","\x45\x6D\x70\x74\x79\x20\x46\x61\x78","\x5B\x46\x61\x78\x5D\x5B\x63\x68\x65\x63\x6B\x54\x72\x75\x6E\x6B\x5D\x5B\x45\x6D\x70\x74\x79\x20\x70\x61\x74\x68\x5D","\x45\x6D\x70\x74\x79\x20\x70\x61\x74\x68","\x49\x73\x20\x56\x61\x6C\x69\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0xd4b2[0];var util=require(_0xd4b2[1]);var _=require(_0xd4b2[2]);var BPromise=require(_0xd4b2[3]);var uuid=require(_0xd4b2[4]);var moment=require(_0xd4b2[5]);var path=require(_0xd4b2[6]);var tiff2pdf=require(_0xd4b2[7]);var gs=require(_0xd4b2[8]);var logger=require(_0xd4b2[10])(_0xd4b2[9]);var ami=require(_0xd4b2[11]);var rpcDb=require(_0xd4b2[12]);var Channel=require(_0xd4b2[13]);var ut=require(_0xd4b2[14]);var Action=require(_0xd4b2[15]);var faxAccount=require(_0xd4b2[16]);var attachment=require(_0xd4b2[17]);var faxMessage=require(_0xd4b2[18]);function Fax(_0xadf6x13){this[_0xd4b2[19]]= {};this[_0xd4b2[20]]= _0xadf6x13[_0xd4b2[20]];this[_0xd4b2[21]]= _0xadf6x13[_0xd4b2[21]];this[_0xd4b2[22]]= {};ami[_0xd4b2[26]](_0xd4b2[23],this[_0xd4b2[25]][_0xd4b2[24]](this));ami[_0xd4b2[26]](_0xd4b2[27],this[_0xd4b2[28]][_0xd4b2[24]](this));ami[_0xd4b2[26]](_0xd4b2[29],this[_0xd4b2[30]][_0xd4b2[24]](this));ami[_0xd4b2[26]](_0xd4b2[31],this[_0xd4b2[32]][_0xd4b2[24]](this));ami[_0xd4b2[26]](_0xd4b2[33],this[_0xd4b2[34]][_0xd4b2[24]](this));ami[_0xd4b2[26]](_0xd4b2[35],this[_0xd4b2[36]][_0xd4b2[24]](this));ami[_0xd4b2[26]](_0xd4b2[37],this[_0xd4b2[38]][_0xd4b2[24]](this));ami[_0xd4b2[26]](_0xd4b2[39],this[_0xd4b2[40]][_0xd4b2[24]](this))}Fax[_0xd4b2[41]][_0xd4b2[25]]= function(_0xadf6x14){if(_0xadf6x14[_0xd4b2[42]]=== _0xd4b2[43]){for(var _0xadf6x15 in this[_0xd4b2[20]]){if(this[_0xd4b2[20]][_0xd4b2[44]](_0xadf6x15)){if(_0xadf6x14[_0xd4b2[45]]=== this[_0xd4b2[20]][_0xadf6x15][_0xd4b2[46]]){this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]]= {};this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[48]]= _0xadf6x14[_0xd4b2[48]];this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[49]]= this[_0xd4b2[20]][_0xadf6x15][_0xd4b2[49]];this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[50]]= this[_0xd4b2[20]][_0xadf6x15][_0xd4b2[50]];logger[_0xd4b2[52]](_0xadf6x14[_0xd4b2[47]],_0xd4b2[51])}}}};if(this[_0xd4b2[22]][_0xadf6x14[_0xd4b2[47]]]){this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]]= {};this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[48]]= _0xadf6x14[_0xd4b2[48]];logger[_0xd4b2[52]](_0xadf6x14[_0xd4b2[47]],_0xd4b2[51])}};Fax[_0xd4b2[41]][_0xd4b2[28]]= function(_0xadf6x14){if(this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]]){for(var _0xadf6x16 in _0xadf6x14[_0xd4b2[53]]){if(_0xadf6x14[_0xd4b2[53]][_0xd4b2[44]](_0xadf6x16)){this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xadf6x16]= _0xadf6x14[_0xd4b2[54]]}}}};Fax[_0xd4b2[41]][_0xd4b2[30]]= function(_0xadf6x14){if(this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]]){this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[55]]= _0xadf6x14[_0xd4b2[55]];this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[56]]= _0xadf6x14[_0xd4b2[56]]}};Fax[_0xd4b2[41]][_0xd4b2[32]]= function(_0xadf6x14){if(this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]]){for(var _0xadf6x16 in _0xadf6x14[_0xd4b2[53]]){if(_0xadf6x14[_0xd4b2[53]][_0xd4b2[44]](_0xadf6x16)){this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xadf6x16]= _0xadf6x14[_0xd4b2[54]]}}}};Fax[_0xd4b2[41]][_0xd4b2[34]]= function(_0xadf6x14){if(this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]]){this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[57]]= _0xadf6x14[_0xd4b2[57]];this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[58]]= _0xadf6x14[_0xd4b2[58]];this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[46]]= _0xadf6x14[_0xd4b2[46]];this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[59]]= _0xadf6x14[_0xd4b2[59]];logger[_0xd4b2[52]](_0xadf6x14[_0xd4b2[47]],_0xd4b2[60])}};Fax[_0xd4b2[41]][_0xd4b2[36]]= function(_0xadf6x14){var _0xadf6x17=this;if(this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]]){var _0xadf6x18=this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[49]];this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[61]]= _0xadf6x14[_0xd4b2[61]];this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[62]]= _0xadf6x14[_0xd4b2[62]];this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[46]]= _0xadf6x14[_0xd4b2[46]];this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[63]]= _0xadf6x14[_0xd4b2[63]];this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[64]]= _0xadf6x14[_0xd4b2[64]];this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[59]]= _0xadf6x14[_0xd4b2[59]];this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[65]]= _0xadf6x14[_0xd4b2[65]];if(this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[62]]> 0){tiff2pdf(_0xadf6x14[_0xd4b2[59]],_0xd4b2[66],function(_0xadf6x19){logger[_0xd4b2[52]](_0xadf6x14[_0xd4b2[47]],_0xd4b2[67],_0xadf6x19[_0xd4b2[68]]);attachment[_0xd4b2[79]]({name:path[_0xd4b2[74]](_0xadf6x14[_0xd4b2[59]])[_0xd4b2[50]],basename:path[_0xd4b2[74]](_0xadf6x14[_0xd4b2[59]])[_0xd4b2[50]]+ _0xd4b2[75],type:_0xd4b2[78]})[_0xd4b2[77]](function(attachment){faxAccount[_0xd4b2[76]](_0xadf6x18,{from:_0xadf6x14[_0xd4b2[65]],mapKey:_0xd4b2[9],body:path[_0xd4b2[74]](_0xadf6x14[_0xd4b2[59]])[_0xd4b2[50]]+ _0xd4b2[75],AttachmentId:attachment[_0xd4b2[49]]})[_0xd4b2[72]](function(_0xadf6x1a){logger[_0xd4b2[71]](_0xadf6x14[_0xd4b2[47]],_0xd4b2[73],JSON[_0xd4b2[70]](_0xadf6x1a))})})[_0xd4b2[72]](function(_0xadf6x1a){logger[_0xd4b2[71]](_0xadf6x14[_0xd4b2[47]],_0xd4b2[69],JSON[_0xd4b2[70]](_0xadf6x1a))})})};logger[_0xd4b2[52]](_0xadf6x14[_0xd4b2[47]],_0xd4b2[69])}};Fax[_0xd4b2[41]][_0xd4b2[40]]= function(_0xadf6x14){if(this[_0xd4b2[22]][_0xadf6x14[_0xd4b2[47]]]){_[_0xd4b2[83]](this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]],_[_0xd4b2[82]](_0xadf6x14,[_0xd4b2[80],_0xd4b2[81]]))}};function updateStatus(_0xadf6x1c){if(_0xadf6x1c[_0xd4b2[84]]){faxMessage[_0xd4b2[89]](_0xadf6x1c.AttachmentId,{failMessage:_0xd4b2[88]})[_0xd4b2[77]](function(_0xadf6x1d){ut[_0xd4b2[86]](_0xd4b2[87],_0xadf6x1d)})[_0xd4b2[72]](function(_0xadf6x1a){ut[_0xd4b2[86]](_0xd4b2[85],_0xadf6x1a)})}else {ut[_0xd4b2[86]](_0xd4b2[90])}}Fax[_0xd4b2[41]][_0xd4b2[91]]= function(_0xadf6x1e,_0xadf6x1f,_0xadf6x20){var _0xadf6x17=this;var _0xadf6x21={};if(_0xadf6x1f){_0xadf6x21= {read:_0xadf6x1f}}else {_0xadf6x21= {failMessage:_0xadf6x20}};if(this[_0xd4b2[22]][_0xadf6x1e][_0xd4b2[84]]){faxMessage[_0xd4b2[89]](this[_0xd4b2[22]][_0xadf6x1e].AttachmentId,_0xadf6x21)[_0xd4b2[77]](function(_0xadf6x1d){ut[_0xd4b2[86]](_0xd4b2[94],_0xadf6x1d)})[_0xd4b2[72]](function(_0xadf6x1a){ut[_0xd4b2[86]](_0xd4b2[93],_0xadf6x1a)})[_0xd4b2[92]](function(){delete _0xadf6x17[_0xd4b2[19]][_0xadf6x1e];delete _0xadf6x17[_0xd4b2[22]][_0xadf6x1e]})}else {ut[_0xd4b2[86]](_0xd4b2[95]);delete this[_0xd4b2[19]][_0xadf6x1e];delete this[_0xd4b2[22]][_0xadf6x1e]}};Fax[_0xd4b2[41]][_0xd4b2[38]]= function(_0xadf6x14){var _0xadf6x17=this;if(this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]]){if(this[_0xd4b2[22]][_0xadf6x14[_0xd4b2[47]]]){this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[49]]= this[_0xd4b2[22]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[49]];this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[50]]= this[_0xd4b2[22]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[50]]};logger[_0xd4b2[52]](_0xadf6x14[_0xd4b2[47]],this[_0xd4b2[22]][_0xadf6x14[_0xd4b2[47]]]?_0xd4b2[96]:_0xd4b2[97],JSON[_0xd4b2[70]](this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]]));if(this[_0xd4b2[22]][_0xadf6x14[_0xd4b2[47]]]){if(this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[98]]> 0&& this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[33]]=== _0xd4b2[99]){this[_0xd4b2[91]](_0xadf6x14[_0xd4b2[47]],true)}else {this[_0xd4b2[91]](_0xadf6x14[_0xd4b2[47]],false,this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[100]]?_0xd4b2[101]+ this[_0xd4b2[19]][_0xadf6x14[_0xd4b2[47]]][_0xd4b2[100]]:_0xd4b2[102])}}}};Fax[_0xd4b2[41]][_0xd4b2[103]]= function(_0xadf6x1c){var _0xadf6x17=this;return  new BPromise(function(_0xadf6x22,_0xadf6x23){_0xadf6x17[_0xd4b2[109]](_0xadf6x1c,_0xadf6x17[_0xd4b2[20]][_0xadf6x1c[_0xd4b2[108]]])[_0xd4b2[77]](function(_0xadf6x1d){ut[_0xd4b2[86]](_0xd4b2[106],_0xadf6x1d);_0xadf6x22(ut[_0xd4b2[68]](_0xd4b2[107]))})[_0xd4b2[72]](function(_0xadf6x1a){ut[_0xd4b2[86]](_0xd4b2[104],_0xadf6x1a);updateStatus(_0xadf6x1c);_0xadf6x23(ut[_0xd4b2[68]](_0xd4b2[105]))})})};Fax[_0xd4b2[41]][_0xd4b2[110]]= function(_0xadf6x1c){var _0xadf6x17=this;return  new BPromise(function(_0xadf6x22,_0xadf6x23){var _0xadf6x24=_0xadf6x17[_0xd4b2[111]](_0xadf6x17[_0xd4b2[20]][_0xadf6x1c[_0xd4b2[108]]].Trunk,_0xadf6x1c);if(_0xadf6x24[_0xd4b2[112]]){_0xadf6x22(ut[_0xd4b2[68]](_0xd4b2[113]))}else {_0xadf6x23(ut[_0xd4b2[68]](_0xadf6x24[_0xd4b2[68]]))}})};function originate(_0xadf6x26,_0xadf6x27,_0xadf6x28){return  new BPromise(function(_0xadf6x22,_0xadf6x23){if(_0xadf6x28){var _0xadf6x29=util[_0xd4b2[115]](_0xd4b2[114],path[_0xd4b2[74]](_0xadf6x26[_0xd4b2[6]])[_0xd4b2[50]],_0xadf6x26[_0xd4b2[6]]);gs[_0xd4b2[122]](_0xadf6x29)[_0xd4b2[77]](function(){_0xadf6x26[_0xd4b2[6]]= util[_0xd4b2[115]](_0xd4b2[116],path[_0xd4b2[74]](_0xadf6x26[_0xd4b2[6]])[_0xd4b2[117]],path[_0xd4b2[74]](_0xadf6x26[_0xd4b2[6]])[_0xd4b2[50]]);_0xadf6x27[_0xd4b2[118]]= _0xadf6x26[_0xd4b2[6]];ut[_0xd4b2[86]](_0xd4b2[119],_0xd4b2[120]);ami.Action(ut[_0xd4b2[121]](_0xadf6x26,_0xadf6x27))[_0xd4b2[77]](function(_0xadf6x1d){_0xadf6x22(_0xadf6x1d)})[_0xd4b2[72]](function(_0xadf6x1a){_0xadf6x23(_0xadf6x1a)})})[_0xd4b2[72]](function(_0xadf6x1a){_0xadf6x23(_0xadf6x1a)})}else {ami.Action(ut[_0xd4b2[121]](_0xadf6x26,_0xadf6x27))[_0xd4b2[77]](function(_0xadf6x1d){_0xadf6x22(_0xadf6x1d)})[_0xd4b2[72]](function(_0xadf6x1a){_0xadf6x23(_0xadf6x1a)})}})}Fax[_0xd4b2[41]][_0xd4b2[109]]= function(_0xadf6x1c,faxAccount){var _0xadf6x17=this;return  new BPromise(function(_0xadf6x22,_0xadf6x23){var _0xadf6x2a=uuid[_0xd4b2[123]]();var _0xadf6x27=ut[_0xd4b2[124]](_0xadf6x1c,faxAccount);_0xadf6x17[_0xd4b2[22]][_0xadf6x2a]=  new Action(_0xadf6x2a,faxAccount,_0xadf6x1c);var _0xadf6x26=_0xadf6x17[_0xd4b2[22]][_0xadf6x2a];if(path[_0xd4b2[74]](_0xadf6x1c[_0xd4b2[6]])[_0xd4b2[125]]=== _0xd4b2[75]){originate(_0xadf6x26,_0xadf6x27,true)[_0xd4b2[77]](function(_0xadf6x1d){_0xadf6x22(_0xadf6x1d)})[_0xd4b2[72]](function(_0xadf6x1a){_0xadf6x23(_0xadf6x1a)})}else {originate(_0xadf6x26,_0xadf6x27,false)[_0xd4b2[77]](function(_0xadf6x1d){_0xadf6x22(_0xadf6x1d)})[_0xd4b2[72]](function(_0xadf6x1a){_0xadf6x23(_0xadf6x1a)})}})};Fax[_0xd4b2[41]][_0xd4b2[126]]= function(_0xadf6x2b){return !_[_0xd4b2[127]](_0xadf6x2b)&&  !_[_0xd4b2[127]](_0xadf6x2b[_0xd4b2[50]]) &&  !_[_0xd4b2[127]](_0xadf6x2b[_0xd4b2[128]]) && _0xadf6x2b[_0xd4b2[128]] &&  !_[_0xd4b2[127]](this[_0xd4b2[21]][util[_0xd4b2[115]](_0xd4b2[129],_0xadf6x2b[_0xd4b2[50]])]) &&  !_[_0xd4b2[127]](this[_0xd4b2[21]][util[_0xd4b2[115]](_0xd4b2[129],_0xadf6x2b[_0xd4b2[50]])][_0xd4b2[58]]) && (this[_0xd4b2[21]][util[_0xd4b2[115]](_0xd4b2[129],_0xadf6x2b[_0xd4b2[50]])][_0xd4b2[58]]=== _0xd4b2[130]|| this[_0xd4b2[21]][util[_0xd4b2[115]](_0xd4b2[129],_0xadf6x2b[_0xd4b2[50]])][_0xd4b2[58]]=== _0xd4b2[131])};Fax[_0xd4b2[41]][_0xd4b2[111]]= function(_0xadf6x2b,_0xadf6x1c){if(!this[_0xd4b2[126]](_0xadf6x2b)){ut[_0xd4b2[86]](_0xd4b2[132],_[_0xd4b2[127]](_0xadf6x2b)?_0xd4b2[120]:_0xadf6x2b[_0xd4b2[50]]+ _0xd4b2[133]);return {isValid:false,message:_0xd4b2[134]}};if(_[_0xd4b2[127]](_0xadf6x1c[_0xd4b2[9]])){ut[_0xd4b2[86]](_0xd4b2[135],JSON[_0xd4b2[70]](_0xadf6x1c));return {isValid:false,message:_0xd4b2[136]}};if(_[_0xd4b2[127]](_0xadf6x1c[_0xd4b2[6]])){ut[_0xd4b2[86]](_0xd4b2[137],JSON[_0xd4b2[70]](_0xadf6x1c));return {isValid:false,message:_0xd4b2[138]}};return {isValid:true,message:_0xd4b2[139]}};module[_0xd4b2[140]]= Fax
\ No newline at end of file
+var _0x9d17=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x75\x69\x64","\x6D\x6F\x6D\x65\x6E\x74","\x70\x61\x74\x68","\x74\x69\x66\x66\x32\x70\x64\x66","\x2E\x2F\x75\x74\x69\x6C\x2F\x67\x73","\x66\x61\x78","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x6D\x69","\x2E\x2F\x72\x70\x63\x44\x62","\x2E\x2F\x63\x68\x61\x6E\x6E\x65\x6C","\x2E\x2F\x75\x74\x69\x6C\x2F\x75\x74\x69\x6C","\x2E\x2F\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x72\x70\x63\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x74\x72\x75\x6E\x6B\x73","\x61\x63\x74\x69\x6F\x6E\x73","\x6E\x65\x77\x63\x68\x61\x6E\x6E\x65\x6C","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x4E\x65\x77\x63\x68\x61\x6E\x6E\x65\x6C","\x6F\x6E","\x76\x61\x72\x73\x65\x74","\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74","\x6E\x65\x77\x73\x74\x61\x74\x65","\x73\x79\x6E\x63\x4E\x65\x77\x53\x74\x61\x74\x65","\x6E\x65\x77\x65\x78\x74\x65\x6E","\x73\x79\x6E\x63\x4E\x65\x77\x45\x78\x74\x65\x6E","\x66\x61\x78\x73\x74\x61\x74\x75\x73","\x73\x79\x6E\x63\x46\x61\x78\x53\x74\x61\x74\x75\x73","\x72\x65\x63\x65\x69\x76\x65\x66\x61\x78","\x73\x79\x6E\x63\x52\x65\x63\x65\x69\x76\x65\x46\x61\x78","\x68\x61\x6E\x67\x75\x70","\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x72\x65\x73\x70\x6F\x6E\x73\x65","\x73\x79\x6E\x63\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x52\x65\x73\x70\x6F\x6E\x73\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x70\x2D\x70\x72\x6F\x76\x69\x64\x65\x72","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x65\x78\x74\x65\x6E","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x69\x64","\x6E\x61\x6D\x65","\x20\x73\x79\x6E\x63\x4E\x65\x77\x63\x68\x61\x6E\x6E\x65\x6C\x20","\x69\x6E\x66\x6F","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x6C\x75\x65","\x63\x68\x61\x6E\x6E\x65\x6C\x73\x74\x61\x74\x65","\x63\x68\x61\x6E\x6E\x65\x6C\x73\x74\x61\x74\x65\x64\x65\x73\x63","\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E","\x73\x74\x61\x74\x75\x73","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x20\x73\x79\x6E\x63\x46\x61\x78\x53\x74\x61\x74\x75\x73\x20","\x72\x65\x6D\x6F\x74\x65\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x70\x61\x67\x65\x73\x74\x72\x61\x6E\x73\x66\x65\x72\x72\x65\x64","\x72\x65\x73\x6F\x6C\x75\x74\x69\x6F\x6E","\x74\x72\x61\x6E\x73\x66\x65\x72\x72\x61\x74\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x32\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73\x2F","\x20\x72\x65\x73\x75\x6C\x74\x20\x63\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x66\x69\x6C\x65\x20","\x6D\x65\x73\x73\x61\x67\x65","\x20\x72\x65\x63\x65\x69\x76\x65\x46\x61\x78\x20","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x20\x6E\x6F\x74\x69\x66\x79\x20","\x70\x61\x72\x73\x65","\x2E\x70\x64\x66","\x6E\x6F\x74\x69\x66\x79","\x74\x68\x65\x6E","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x70\x64\x66","\x63\x72\x65\x61\x74\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x72\x65\x61\x73\x6F\x6E","\x70\x69\x63\x6B","\x6D\x65\x72\x67\x65","\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x49\x64","\x5B\x46\x61\x78\x5D\x5B\x4D\x65\x73\x73\x61\x67\x65\x5D\x5B\x45\x72\x72\x6F\x72\x5D\x5B\x4E\x6F\x55\x70\x64\x61\x74\x65\x31\x5D","\x6C\x6F\x67\x67\x65\x72","\x5B\x46\x61\x78\x5D\x5B\x4D\x65\x73\x73\x61\x67\x65\x5D\x5B\x45\x72\x72\x6F\x72\x5D\x5B\x55\x70\x64\x61\x74\x65\x64\x5D","\x53\x45\x4E\x44\x49\x4E\x47\x20\x46\x41\x49\x4C\x45\x44\x20","\x75\x70\x64\x61\x74\x65","\x5B\x46\x61\x78\x5D\x5B\x4D\x65\x73\x73\x61\x67\x65\x5D\x5B\x45\x72\x72\x6F\x72\x5D\x5B\x4E\x6F\x55\x70\x64\x61\x74\x65\x32\x5D","\x75\x70\x64\x61\x74\x65\x53\x74\x61\x74\x75\x73","\x66\x69\x6E\x61\x6C\x6C\x79","\x5B\x46\x61\x78\x5D\x5B\x4D\x65\x73\x73\x61\x67\x65\x5D\x5B\x4E\x6F\x55\x70\x64\x61\x74\x65\x31\x5D","\x5B\x46\x61\x78\x5D\x5B\x4D\x65\x73\x73\x61\x67\x65\x5D\x5B\x55\x70\x64\x61\x74\x65\x64\x5D","\x5B\x46\x61\x78\x5D\x5B\x4D\x65\x73\x73\x61\x67\x65\x5D\x5B\x4E\x6F\x55\x70\x64\x61\x74\x65\x32\x5D","\x20\x68\x61\x6E\x67\x75\x70\x20\x73\x65\x6E\x64\x46\x69\x6C\x65\x20","\x20\x68\x61\x6E\x67\x75\x70\x20\x66\x61\x78\x52\x69\x63\x65\x69\x76\x65\x20","\x66\x61\x78\x70\x61\x67\x65\x73","\x53\x55\x43\x43\x45\x53\x53","\x66\x61\x78\x73\x74\x61\x74\x75\x73\x73\x74\x72\x69\x6E\x67","\x53\x45\x4E\x44\x49\x4E\x47\x20\x46\x41\x49\x4C\x45\x44\x3A\x20","\x53\x45\x4E\x44\x49\x4E\x47\x20\x46\x41\x49\x4C\x45\x44","\x73\x65\x6E\x64","\x5B\x46\x61\x78\x5D\x5B\x65\x78\x65\x63\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x5B\x66\x61\x69\x6C\x75\x72\x65\x5D","\x46\x61\x78\x20\x66\x61\x69\x6C\x65\x64","\x5B\x46\x61\x78\x5D\x5B\x65\x78\x65\x63\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x5D\x5B\x73\x75\x63\x63\x65\x73\x73\x5D","\x46\x61\x78\x20\x72\x65\x63\x65\x69\x76\x65\x64","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x65\x78\x65\x63\x4F\x72\x69\x67\x69\x6E\x61\x74\x65","\x63\x68\x65\x63\x6B\x41\x66\x74\x65\x72\x53\x65\x6E\x64","\x63\x68\x65\x63\x6B\x54\x72\x75\x6E\x6B","\x69\x73\x56\x61\x6C\x69\x64","\x54\x72\x75\x6E\x6B\x20\x52\x65\x61\x63\x68\x61\x62\x6C\x65","\x67\x73\x20\x2D\x71\x20\x2D\x64\x4E\x4F\x50\x41\x55\x53\x45\x20\x2D\x64\x42\x41\x54\x43\x48\x20\x2D\x73\x44\x45\x56\x49\x43\x45\x3D\x74\x69\x66\x66\x67\x34\x20\x2D\x73\x50\x41\x50\x45\x52\x53\x49\x5A\x45\x3D\x6C\x65\x74\x74\x65\x72\x20\x2D\x73\x4F\x75\x74\x70\x75\x74\x46\x69\x6C\x65\x3D\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x32\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73\x2F\x25\x73\x2E\x74\x69\x66\x20\x20\x25\x73\x20\x2D\x63\x20\x71\x75\x69\x74","\x66\x6F\x72\x6D\x61\x74","\x25\x73\x2F\x25\x73\x2E\x74\x69\x66","\x64\x69\x72","\x58\x4D\x46\x2D\x50\x41\x54\x48","\x43\x6F\x6E\x76\x65\x72\x74\x20\x70\x64\x66\x20\x74\x6F\x20\x74\x69\x66","","\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x41\x63\x74\x69\x6F\x6E","\x65\x78\x65\x63\x75\x74\x65","\x76\x34","\x61\x64\x64\x56\x61\x72\x69\x61\x62\x6C\x65\x73","\x65\x78\x74","\x69\x73\x54\x72\x75\x6E\x6B\x52\x65\x61\x63\x68\x61\x62\x6C\x65","\x69\x73\x4E\x69\x6C","\x61\x63\x74\x69\x76\x65","\x53\x49\x50\x2F\x25\x73","\x72\x65\x61\x63\x68\x61\x62\x6C\x65","\x75\x6E\x6D\x6F\x6E\x69\x74\x6F\x72\x65\x64","\x5B\x46\x61\x78\x5D\x5B\x63\x68\x65\x63\x6B\x54\x72\x75\x6E\x6B\x5D\x5B\x54\x72\x75\x6E\x6B\x20\x6E\x6F\x74\x20\x77\x6F\x72\x6B\x5D","\x20\x54\x72\x75\x6E\x6B\x20\x69\x73\x20\x6E\x6F\x74\x20\x61\x63\x74\x69\x76\x65","\x54\x72\x75\x6E\x6B\x20\x6E\x6F\x74\x20\x77\x6F\x72\x6B\x69\x6E\x67","\x5B\x46\x61\x78\x5D\x5B\x63\x68\x65\x63\x6B\x54\x72\x75\x6E\x6B\x5D\x5B\x45\x6D\x70\x74\x79\x20\x46\x61\x78\x5D","\x45\x6D\x70\x74\x79\x20\x46\x61\x78","\x5B\x46\x61\x78\x5D\x5B\x63\x68\x65\x63\x6B\x54\x72\x75\x6E\x6B\x5D\x5B\x45\x6D\x70\x74\x79\x20\x70\x61\x74\x68\x5D","\x45\x6D\x70\x74\x79\x20\x70\x61\x74\x68","\x49\x73\x20\x56\x61\x6C\x69\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x9d17[0];var util=require(_0x9d17[1]);var _=require(_0x9d17[2]);var BPromise=require(_0x9d17[3]);var uuid=require(_0x9d17[4]);var moment=require(_0x9d17[5]);var path=require(_0x9d17[6]);var tiff2pdf=require(_0x9d17[7]);var gs=require(_0x9d17[8]);var logger=require(_0x9d17[10])(_0x9d17[9]);var ami=require(_0x9d17[11]);var rpcDb=require(_0x9d17[12]);var Channel=require(_0x9d17[13]);var ut=require(_0x9d17[14]);var Action=require(_0x9d17[15]);var faxAccount=require(_0x9d17[16]);var attachment=require(_0x9d17[17]);var faxMessage=require(_0x9d17[18]);function Fax(_0x5e8ax13){this[_0x9d17[19]]= {};this[_0x9d17[20]]= _0x5e8ax13[_0x9d17[20]];this[_0x9d17[21]]= _0x5e8ax13[_0x9d17[21]];this[_0x9d17[22]]= {};ami[_0x9d17[26]](_0x9d17[23],this[_0x9d17[25]][_0x9d17[24]](this));ami[_0x9d17[26]](_0x9d17[27],this[_0x9d17[28]][_0x9d17[24]](this));ami[_0x9d17[26]](_0x9d17[29],this[_0x9d17[30]][_0x9d17[24]](this));ami[_0x9d17[26]](_0x9d17[31],this[_0x9d17[32]][_0x9d17[24]](this));ami[_0x9d17[26]](_0x9d17[33],this[_0x9d17[34]][_0x9d17[24]](this));ami[_0x9d17[26]](_0x9d17[35],this[_0x9d17[36]][_0x9d17[24]](this));ami[_0x9d17[26]](_0x9d17[37],this[_0x9d17[38]][_0x9d17[24]](this));ami[_0x9d17[26]](_0x9d17[39],this[_0x9d17[40]][_0x9d17[24]](this))}Fax[_0x9d17[41]][_0x9d17[25]]= function(_0x5e8ax14){if(_0x5e8ax14[_0x9d17[42]]=== _0x9d17[43]){for(var _0x5e8ax15 in this[_0x9d17[20]]){if(this[_0x9d17[20]][_0x9d17[44]](_0x5e8ax15)){if(_0x5e8ax14[_0x9d17[45]]=== this[_0x9d17[20]][_0x5e8ax15][_0x9d17[46]]){this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]]= {};this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[48]]= _0x5e8ax14[_0x9d17[48]];this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[49]]= this[_0x9d17[20]][_0x5e8ax15][_0x9d17[49]];this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[50]]= this[_0x9d17[20]][_0x5e8ax15][_0x9d17[50]];logger[_0x9d17[52]](_0x5e8ax14[_0x9d17[47]],_0x9d17[51])}}}};if(this[_0x9d17[22]][_0x5e8ax14[_0x9d17[47]]]){this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]]= {};this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[48]]= _0x5e8ax14[_0x9d17[48]];logger[_0x9d17[52]](_0x5e8ax14[_0x9d17[47]],_0x9d17[51])}};Fax[_0x9d17[41]][_0x9d17[28]]= function(_0x5e8ax14){if(this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]]){for(var _0x5e8ax16 in _0x5e8ax14[_0x9d17[53]]){if(_0x5e8ax14[_0x9d17[53]][_0x9d17[44]](_0x5e8ax16)){this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x5e8ax16]= _0x5e8ax14[_0x9d17[54]]}}}};Fax[_0x9d17[41]][_0x9d17[30]]= function(_0x5e8ax14){if(this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]]){this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[55]]= _0x5e8ax14[_0x9d17[55]];this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[56]]= _0x5e8ax14[_0x9d17[56]]}};Fax[_0x9d17[41]][_0x9d17[32]]= function(_0x5e8ax14){if(this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]]){for(var _0x5e8ax16 in _0x5e8ax14[_0x9d17[53]]){if(_0x5e8ax14[_0x9d17[53]][_0x9d17[44]](_0x5e8ax16)){this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x5e8ax16]= _0x5e8ax14[_0x9d17[54]]}}}};Fax[_0x9d17[41]][_0x9d17[34]]= function(_0x5e8ax14){if(this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]]){this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[57]]= _0x5e8ax14[_0x9d17[57]];this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[58]]= _0x5e8ax14[_0x9d17[58]];this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[46]]= _0x5e8ax14[_0x9d17[46]];this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[59]]= _0x5e8ax14[_0x9d17[59]];logger[_0x9d17[52]](_0x5e8ax14[_0x9d17[47]],_0x9d17[60])}};Fax[_0x9d17[41]][_0x9d17[36]]= function(_0x5e8ax14){var _0x5e8ax17=this;if(this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]]){var _0x5e8ax18=this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[49]];this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[61]]= _0x5e8ax14[_0x9d17[61]];this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[62]]= _0x5e8ax14[_0x9d17[62]];this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[46]]= _0x5e8ax14[_0x9d17[46]];this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[63]]= _0x5e8ax14[_0x9d17[63]];this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[64]]= _0x5e8ax14[_0x9d17[64]];this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[59]]= _0x5e8ax14[_0x9d17[59]];this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[65]]= _0x5e8ax14[_0x9d17[65]];if(this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[62]]> 0){tiff2pdf(_0x5e8ax14[_0x9d17[59]],_0x9d17[66],function(_0x5e8ax19){logger[_0x9d17[52]](_0x5e8ax14[_0x9d17[47]],_0x9d17[67],_0x5e8ax19[_0x9d17[68]]);attachment[_0x9d17[79]]({name:path[_0x9d17[74]](_0x5e8ax14[_0x9d17[59]])[_0x9d17[50]],basename:path[_0x9d17[74]](_0x5e8ax14[_0x9d17[59]])[_0x9d17[50]]+ _0x9d17[75],type:_0x9d17[78]})[_0x9d17[77]](function(attachment){faxAccount[_0x9d17[76]](_0x5e8ax18,{from:_0x5e8ax14[_0x9d17[65]],mapKey:_0x9d17[9],body:path[_0x9d17[74]](_0x5e8ax14[_0x9d17[59]])[_0x9d17[50]]+ _0x9d17[75],AttachmentId:attachment[_0x9d17[49]]})[_0x9d17[72]](function(_0x5e8ax1a){logger[_0x9d17[71]](_0x5e8ax14[_0x9d17[47]],_0x9d17[73],JSON[_0x9d17[70]](_0x5e8ax1a))})})[_0x9d17[72]](function(_0x5e8ax1a){logger[_0x9d17[71]](_0x5e8ax14[_0x9d17[47]],_0x9d17[69],JSON[_0x9d17[70]](_0x5e8ax1a))})})};logger[_0x9d17[52]](_0x5e8ax14[_0x9d17[47]],_0x9d17[69])}};Fax[_0x9d17[41]][_0x9d17[40]]= function(_0x5e8ax14){if(this[_0x9d17[22]][_0x5e8ax14[_0x9d17[47]]]){_[_0x9d17[83]](this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]],_[_0x9d17[82]](_0x5e8ax14,[_0x9d17[80],_0x9d17[81]]))}};function updateStatus(_0x5e8ax1c){if(_0x5e8ax1c[_0x9d17[84]]){faxMessage[_0x9d17[89]](_0x5e8ax1c.AttachmentId,{failMessage:_0x9d17[88]})[_0x9d17[77]](function(_0x5e8ax1d){ut[_0x9d17[86]](_0x9d17[87],_0x5e8ax1d)})[_0x9d17[72]](function(_0x5e8ax1a){ut[_0x9d17[86]](_0x9d17[85],_0x5e8ax1a)})}else {ut[_0x9d17[86]](_0x9d17[90])}}Fax[_0x9d17[41]][_0x9d17[91]]= function(_0x5e8ax1e,_0x5e8ax1f,_0x5e8ax20){var _0x5e8ax17=this;var _0x5e8ax21={};if(_0x5e8ax1f){_0x5e8ax21= {read:_0x5e8ax1f}}else {_0x5e8ax21= {failMessage:_0x5e8ax20}};if(this[_0x9d17[22]][_0x5e8ax1e][_0x9d17[84]]){faxMessage[_0x9d17[89]](this[_0x9d17[22]][_0x5e8ax1e].AttachmentId,_0x5e8ax21)[_0x9d17[77]](function(_0x5e8ax1d){ut[_0x9d17[86]](_0x9d17[94],_0x5e8ax1d)})[_0x9d17[72]](function(_0x5e8ax1a){ut[_0x9d17[86]](_0x9d17[93],_0x5e8ax1a)})[_0x9d17[92]](function(){delete _0x5e8ax17[_0x9d17[19]][_0x5e8ax1e];delete _0x5e8ax17[_0x9d17[22]][_0x5e8ax1e]})}else {ut[_0x9d17[86]](_0x9d17[95]);delete this[_0x9d17[19]][_0x5e8ax1e];delete this[_0x9d17[22]][_0x5e8ax1e]}};Fax[_0x9d17[41]][_0x9d17[38]]= function(_0x5e8ax14){var _0x5e8ax17=this;if(this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]]){if(this[_0x9d17[22]][_0x5e8ax14[_0x9d17[47]]]){this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[49]]= this[_0x9d17[22]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[49]];this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[50]]= this[_0x9d17[22]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[50]]};logger[_0x9d17[52]](_0x5e8ax14[_0x9d17[47]],this[_0x9d17[22]][_0x5e8ax14[_0x9d17[47]]]?_0x9d17[96]:_0x9d17[97],JSON[_0x9d17[70]](this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]]));if(this[_0x9d17[22]][_0x5e8ax14[_0x9d17[47]]]){if(this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[98]]> 0&& this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[33]]=== _0x9d17[99]){this[_0x9d17[91]](_0x5e8ax14[_0x9d17[47]],true)}else {this[_0x9d17[91]](_0x5e8ax14[_0x9d17[47]],false,this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[100]]?_0x9d17[101]+ this[_0x9d17[19]][_0x5e8ax14[_0x9d17[47]]][_0x9d17[100]]:_0x9d17[102])}}}};Fax[_0x9d17[41]][_0x9d17[103]]= function(_0x5e8ax1c){var _0x5e8ax17=this;return  new BPromise(function(_0x5e8ax22,_0x5e8ax23){_0x5e8ax17[_0x9d17[109]](_0x5e8ax1c,_0x5e8ax17[_0x9d17[20]][_0x5e8ax1c[_0x9d17[108]]])[_0x9d17[77]](function(_0x5e8ax1d){ut[_0x9d17[86]](_0x9d17[106],_0x5e8ax1d);_0x5e8ax22(ut[_0x9d17[68]](_0x9d17[107]))})[_0x9d17[72]](function(_0x5e8ax1a){ut[_0x9d17[86]](_0x9d17[104],_0x5e8ax1a);updateStatus(_0x5e8ax1c);_0x5e8ax23(ut[_0x9d17[68]](_0x9d17[105]))})})};Fax[_0x9d17[41]][_0x9d17[110]]= function(_0x5e8ax1c){var _0x5e8ax17=this;return  new BPromise(function(_0x5e8ax22,_0x5e8ax23){var _0x5e8ax24=_0x5e8ax17[_0x9d17[111]](_0x5e8ax17[_0x9d17[20]][_0x5e8ax1c[_0x9d17[108]]].Trunk,_0x5e8ax1c);if(_0x5e8ax24[_0x9d17[112]]){_0x5e8ax22(ut[_0x9d17[68]](_0x9d17[113]))}else {_0x5e8ax23(ut[_0x9d17[68]](_0x5e8ax24[_0x9d17[68]]))}})};function originate(_0x5e8ax26,_0x5e8ax27,_0x5e8ax28){return  new BPromise(function(_0x5e8ax22,_0x5e8ax23){if(_0x5e8ax28){var _0x5e8ax29=util[_0x9d17[115]](_0x9d17[114],path[_0x9d17[74]](_0x5e8ax26[_0x9d17[6]])[_0x9d17[50]],_0x5e8ax26[_0x9d17[6]]);gs[_0x9d17[122]](_0x5e8ax29)[_0x9d17[77]](function(){_0x5e8ax26[_0x9d17[6]]= util[_0x9d17[115]](_0x9d17[116],path[_0x9d17[74]](_0x5e8ax26[_0x9d17[6]])[_0x9d17[117]],path[_0x9d17[74]](_0x5e8ax26[_0x9d17[6]])[_0x9d17[50]]);_0x5e8ax27[_0x9d17[118]]= _0x5e8ax26[_0x9d17[6]];ut[_0x9d17[86]](_0x9d17[119],_0x9d17[120]);ami.Action(ut[_0x9d17[121]](_0x5e8ax26,_0x5e8ax27))[_0x9d17[77]](function(_0x5e8ax1d){_0x5e8ax22(_0x5e8ax1d)})[_0x9d17[72]](function(_0x5e8ax1a){_0x5e8ax23(_0x5e8ax1a)})})[_0x9d17[72]](function(_0x5e8ax1a){_0x5e8ax23(_0x5e8ax1a)})}else {ami.Action(ut[_0x9d17[121]](_0x5e8ax26,_0x5e8ax27))[_0x9d17[77]](function(_0x5e8ax1d){_0x5e8ax22(_0x5e8ax1d)})[_0x9d17[72]](function(_0x5e8ax1a){_0x5e8ax23(_0x5e8ax1a)})}})}Fax[_0x9d17[41]][_0x9d17[109]]= function(_0x5e8ax1c,faxAccount){var _0x5e8ax17=this;return  new BPromise(function(_0x5e8ax22,_0x5e8ax23){var _0x5e8ax2a=uuid[_0x9d17[123]]();var _0x5e8ax27=ut[_0x9d17[124]](_0x5e8ax1c,faxAccount);_0x5e8ax17[_0x9d17[22]][_0x5e8ax2a]=  new Action(_0x5e8ax2a,faxAccount,_0x5e8ax1c);var _0x5e8ax26=_0x5e8ax17[_0x9d17[22]][_0x5e8ax2a];if(path[_0x9d17[74]](_0x5e8ax1c[_0x9d17[6]])[_0x9d17[125]]=== _0x9d17[75]){originate(_0x5e8ax26,_0x5e8ax27,true)[_0x9d17[77]](function(_0x5e8ax1d){_0x5e8ax22(_0x5e8ax1d)})[_0x9d17[72]](function(_0x5e8ax1a){_0x5e8ax23(_0x5e8ax1a)})}else {originate(_0x5e8ax26,_0x5e8ax27,false)[_0x9d17[77]](function(_0x5e8ax1d){_0x5e8ax22(_0x5e8ax1d)})[_0x9d17[72]](function(_0x5e8ax1a){_0x5e8ax23(_0x5e8ax1a)})}})};Fax[_0x9d17[41]][_0x9d17[126]]= function(_0x5e8ax2b){return !_[_0x9d17[127]](_0x5e8ax2b)&&  !_[_0x9d17[127]](_0x5e8ax2b[_0x9d17[50]]) &&  !_[_0x9d17[127]](_0x5e8ax2b[_0x9d17[128]]) && _0x5e8ax2b[_0x9d17[128]] &&  !_[_0x9d17[127]](this[_0x9d17[21]][util[_0x9d17[115]](_0x9d17[129],_0x5e8ax2b[_0x9d17[50]])]) &&  !_[_0x9d17[127]](this[_0x9d17[21]][util[_0x9d17[115]](_0x9d17[129],_0x5e8ax2b[_0x9d17[50]])][_0x9d17[58]]) && (this[_0x9d17[21]][util[_0x9d17[115]](_0x9d17[129],_0x5e8ax2b[_0x9d17[50]])][_0x9d17[58]]=== _0x9d17[130]|| this[_0x9d17[21]][util[_0x9d17[115]](_0x9d17[129],_0x5e8ax2b[_0x9d17[50]])][_0x9d17[58]]=== _0x9d17[131])};Fax[_0x9d17[41]][_0x9d17[111]]= function(_0x5e8ax2b,_0x5e8ax1c){if(!this[_0x9d17[126]](_0x5e8ax2b)){ut[_0x9d17[86]](_0x9d17[132],_[_0x9d17[127]](_0x5e8ax2b)?_0x9d17[120]:_0x5e8ax2b[_0x9d17[50]]+ _0x9d17[133]);return {isValid:false,message:_0x9d17[134]}};if(_[_0x9d17[127]](_0x5e8ax1c[_0x9d17[9]])){ut[_0x9d17[86]](_0x9d17[135],JSON[_0x9d17[70]](_0x5e8ax1c));return {isValid:false,message:_0x9d17[136]}};if(_[_0x9d17[127]](_0x5e8ax1c[_0x9d17[6]])){ut[_0x9d17[86]](_0x9d17[137],JSON[_0x9d17[70]](_0x5e8ax1c));return {isValid:false,message:_0x9d17[138]}};return {isValid:true,message:_0x9d17[139]}};module[_0x9d17[140]]= Fax
\ No newline at end of file
index 80ffad5..0261c88 100644 (file)
@@ -1 +1 @@
-var _0xeaae=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x70\x72\x65\x76\x69\x65\x77","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x72\x70\x63\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x6E\x6F\x74\x69\x66\x79","\x5B\x4E\x6F\x74\x69\x66\x79\x5D\x20","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x72\x65\x73\x6F\x6C\x76\x65"];_0xeaae[0];var util=require(_0xeaae[1]);var BPromise=require(_0xeaae[2]);var logger=require(_0xeaae[4])(_0xeaae[3]);var _=require(_0xeaae[5]);var faxAccount=require(_0xeaae[6]);function loggerCatch(_0xf33ax7){return function(_0xf33ax8){logger[_0xeaae[8]](_0xf33ax7,util[_0xeaae[7]](_0xf33ax8,{showHidden:false,depth:null}))}}exports[_0xeaae[9]]= function(_0xf33ax9,_0xf33axa){return BPromise[_0xeaae[13]]()[_0xeaae[12]](faxAccount[_0xeaae[9]](_0xf33ax9,_0xf33axa))[_0xeaae[11]](loggerCatch(_0xeaae[10]))}
\ No newline at end of file
+var _0xd562=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x70\x72\x65\x76\x69\x65\x77","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x72\x70\x63\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x6E\x6F\x74\x69\x66\x79","\x5B\x4E\x6F\x74\x69\x66\x79\x5D\x20","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x72\x65\x73\x6F\x6C\x76\x65"];_0xd562[0];var util=require(_0xd562[1]);var BPromise=require(_0xd562[2]);var logger=require(_0xd562[4])(_0xd562[3]);var _=require(_0xd562[5]);var faxAccount=require(_0xd562[6]);function loggerCatch(_0x2edfx7){return function(_0x2edfx8){logger[_0xd562[8]](_0x2edfx7,util[_0xd562[7]](_0x2edfx8,{showHidden:false,depth:null}))}}exports[_0xd562[9]]= function(_0x2edfx9,_0x2edfxa){return BPromise[_0xd562[13]]()[_0xd562[12]](faxAccount[_0xd562[9]](_0x2edfx9,_0x2edfxa))[_0xd562[11]](loggerCatch(_0xd562[10]))}
\ No newline at end of file
index 2d10104..cc0c2b2 100644 (file)
@@ -1 +1 @@
-var _0x5b90=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x66\x61\x78","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x62\x6C\x75\x65\x62\x69\x72\x64","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x65\x78\x65\x63\x75\x74\x65","\x45\x78\x65\x63\x20\x67\x73","\x69\x6E\x66\x6F","\x20\x45\x72\x72\x6F\x72\x20\x3A","\x69\x6E\x73\x70\x65\x63\x74"];_0x5b90[0];var util=require(_0x5b90[1]);var logger=require(_0x5b90[3])(_0x5b90[2]);var BPromise=require(_0x5b90[4]);var exec=require(_0x5b90[6])[_0x5b90[5]];exports[_0x5b90[7]]= function(_0xd56cx5){return  new BPromise(function(_0xd56cx6,_0xd56cx7){exec(_0xd56cx5,function(_0xd56cx8,_0xd56cx9,_0xd56cxa){logger[_0x5b90[9]](_0x5b90[8],_0xd56cx9);if(_0xd56cx8){logger[_0x5b90[9]](_0x5b90[8],_0x5b90[10],util[_0x5b90[11]](_0xd56cx8,{showHidden:false,depth:null}),_0xd56cx9,_0xd56cxa);_0xd56cx7(_0xd56cx8)};_0xd56cx6(_0xd56cx9)})})}
\ No newline at end of file
+var _0xef60=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x66\x61\x78","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x62\x6C\x75\x65\x62\x69\x72\x64","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x65\x78\x65\x63\x75\x74\x65","\x45\x78\x65\x63\x20\x67\x73","\x69\x6E\x66\x6F","\x20\x45\x72\x72\x6F\x72\x20\x3A","\x69\x6E\x73\x70\x65\x63\x74"];_0xef60[0];var util=require(_0xef60[1]);var logger=require(_0xef60[3])(_0xef60[2]);var BPromise=require(_0xef60[4]);var exec=require(_0xef60[6])[_0xef60[5]];exports[_0xef60[7]]= function(_0xe1a2x5){return  new BPromise(function(_0xe1a2x6,_0xe1a2x7){exec(_0xe1a2x5,function(_0xe1a2x8,_0xe1a2x9,_0xe1a2xa){logger[_0xef60[9]](_0xef60[8],_0xe1a2x9);if(_0xe1a2x8){logger[_0xef60[9]](_0xef60[8],_0xef60[10],util[_0xef60[11]](_0xe1a2x8,{showHidden:false,depth:null}),_0xe1a2x9,_0xe1a2xa);_0xe1a2x7(_0xe1a2x8)};_0xe1a2x6(_0xe1a2x9)})})}
\ No newline at end of file
index 7212478..0dc5ecc 100644 (file)
@@ -1 +1 @@
-var _0x5f9a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x66\x61\x78","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x65\x73\x73\x61\x67\x65","\x6C\x6F\x67\x67\x65\x72","\x69\x6E\x73\x70\x65\x63\x74","\x69\x6E\x66\x6F","\x61\x64\x64\x56\x61\x72\x69\x61\x62\x6C\x65\x73","\x65\x63\x6D","\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F","\x6D\x69\x6E\x72\x61\x74\x65","\x6D\x61\x78\x72\x61\x74\x65","\x22\x25\x73\x22","\x6D\x6F\x64\x65\x6D","\x66\x6F\x72\x6D\x61\x74","\x67\x61\x74\x65\x77\x61\x79","\x66\x61\x78\x64\x65\x74\x65\x63\x74","\x74\x33\x38\x74\x69\x6D\x65\x6F\x75\x74","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x70\x61\x74\x68","\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x41\x63\x74\x69\x6F\x6E","\x75\x6E\x69\x71\x75\x65\x69\x64","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x63\x68\x61\x6E\x6E\x65\x6C","\x78\x63\x61\x6C\x6C\x79\x2D\x6D\x6F\x74\x69\x6F\x6E\x2D\x66\x61\x78","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x31","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E",""];_0x5f9a[0];var util=require(_0x5f9a[1]);var _=require(_0x5f9a[2]);var moment=require(_0x5f9a[3]);var logger=require(_0x5f9a[5])(_0x5f9a[4]);exports[_0x5f9a[6]]= function(_0x63bbx5){return {"\x6D\x65\x73\x73\x61\x67\x65":_0x63bbx5}};exports[_0x5f9a[7]]= function(_0x63bbx6,_0x63bbx7){logger[_0x5f9a[9]](_0x63bbx6,util[_0x5f9a[8]](_0x63bbx7,{showHidden:false,depth:null}))};exports[_0x5f9a[10]]= function(_0x63bbx8,_0x63bbx9){var _0x63bbxa={"\x58\x4D\x46\x2D\x45\x43\x4D":_0x63bbx9[_0x5f9a[11]],"\x58\x4D\x46\x2D\x48\x45\x41\x44\x45\x52\x49\x4E\x46\x4F":_0x63bbx9[_0x5f9a[12]],"\x58\x4D\x46\x2D\x4D\x49\x4E\x52\x41\x54\x45":_0x63bbx9[_0x5f9a[13]],"\x58\x4D\x46\x2D\x4D\x41\x58\x52\x41\x54\x45":_0x63bbx9[_0x5f9a[14]],"\x58\x4D\x46\x2D\x4D\x4F\x44\x45\x4D":util[_0x5f9a[17]](_0x5f9a[15],_0x63bbx9[_0x5f9a[16]]),"\x58\x4D\x46\x2D\x47\x41\x54\x45\x57\x41\x59":_0x63bbx9[_0x5f9a[18]],"\x58\x4D\x46\x2D\x46\x41\x58\x44\x45\x54\x45\x43\x54":_0x63bbx9[_0x5f9a[19]],"\x58\x4D\x46\x2D\x54\x33\x38\x54\x49\x4D\x45\x4F\x55\x54":_0x63bbx9[_0x5f9a[20]],"\x58\x4D\x46\x2D\x4C\x4F\x43\x41\x4C\x53\x54\x41\x54\x49\x4F\x4E\x49\x44":_0x63bbx9[_0x5f9a[21]],"\x58\x4D\x46\x2D\x50\x41\x54\x48":_0x63bbx8[_0x5f9a[22]]};return _0x63bbxa};exports[_0x5f9a[23]]= function(_0x63bbxb,_0x63bbxa){return {actionid:_0x63bbxb[_0x5f9a[24]],action:_0x5f9a[25],channel:_0x63bbxb[_0x5f9a[26]],Exten:_0x5f9a[27],Context:_0x5f9a[28],Priority:_0x5f9a[29],callerid:util[_0x5f9a[17]](_0x5f9a[30],_0x63bbxb[_0x5f9a[12]]?_0x63bbxb[_0x5f9a[12]]:_0x5f9a[31],_0x63bbxb[_0x5f9a[21]]),variable:_0x63bbxa,timeout:30* 1000,async:true,channelid:_0x63bbxb[_0x5f9a[24]]}}
\ No newline at end of file
+var _0xea9f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x66\x61\x78","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x65\x73\x73\x61\x67\x65","\x6C\x6F\x67\x67\x65\x72","\x69\x6E\x73\x70\x65\x63\x74","\x69\x6E\x66\x6F","\x61\x64\x64\x56\x61\x72\x69\x61\x62\x6C\x65\x73","\x65\x63\x6D","\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F","\x6D\x69\x6E\x72\x61\x74\x65","\x6D\x61\x78\x72\x61\x74\x65","\x22\x25\x73\x22","\x6D\x6F\x64\x65\x6D","\x66\x6F\x72\x6D\x61\x74","\x67\x61\x74\x65\x77\x61\x79","\x66\x61\x78\x64\x65\x74\x65\x63\x74","\x74\x33\x38\x74\x69\x6D\x65\x6F\x75\x74","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x70\x61\x74\x68","\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x41\x63\x74\x69\x6F\x6E","\x75\x6E\x69\x71\x75\x65\x69\x64","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x63\x68\x61\x6E\x6E\x65\x6C","\x78\x63\x61\x6C\x6C\x79\x2D\x6D\x6F\x74\x69\x6F\x6E\x2D\x66\x61\x78","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x31","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E",""];_0xea9f[0];var util=require(_0xea9f[1]);var _=require(_0xea9f[2]);var moment=require(_0xea9f[3]);var logger=require(_0xea9f[5])(_0xea9f[4]);exports[_0xea9f[6]]= function(_0x7608x5){return {"\x6D\x65\x73\x73\x61\x67\x65":_0x7608x5}};exports[_0xea9f[7]]= function(_0x7608x6,_0x7608x7){logger[_0xea9f[9]](_0x7608x6,util[_0xea9f[8]](_0x7608x7,{showHidden:false,depth:null}))};exports[_0xea9f[10]]= function(_0x7608x8,_0x7608x9){var _0x7608xa={"\x58\x4D\x46\x2D\x45\x43\x4D":_0x7608x9[_0xea9f[11]],"\x58\x4D\x46\x2D\x48\x45\x41\x44\x45\x52\x49\x4E\x46\x4F":_0x7608x9[_0xea9f[12]],"\x58\x4D\x46\x2D\x4D\x49\x4E\x52\x41\x54\x45":_0x7608x9[_0xea9f[13]],"\x58\x4D\x46\x2D\x4D\x41\x58\x52\x41\x54\x45":_0x7608x9[_0xea9f[14]],"\x58\x4D\x46\x2D\x4D\x4F\x44\x45\x4D":util[_0xea9f[17]](_0xea9f[15],_0x7608x9[_0xea9f[16]]),"\x58\x4D\x46\x2D\x47\x41\x54\x45\x57\x41\x59":_0x7608x9[_0xea9f[18]],"\x58\x4D\x46\x2D\x46\x41\x58\x44\x45\x54\x45\x43\x54":_0x7608x9[_0xea9f[19]],"\x58\x4D\x46\x2D\x54\x33\x38\x54\x49\x4D\x45\x4F\x55\x54":_0x7608x9[_0xea9f[20]],"\x58\x4D\x46\x2D\x4C\x4F\x43\x41\x4C\x53\x54\x41\x54\x49\x4F\x4E\x49\x44":_0x7608x9[_0xea9f[21]],"\x58\x4D\x46\x2D\x50\x41\x54\x48":_0x7608x8[_0xea9f[22]]};return _0x7608xa};exports[_0xea9f[23]]= function(_0x7608xb,_0x7608xa){return {actionid:_0x7608xb[_0xea9f[24]],action:_0xea9f[25],channel:_0x7608xb[_0xea9f[26]],Exten:_0xea9f[27],Context:_0xea9f[28],Priority:_0xea9f[29],callerid:util[_0xea9f[17]](_0xea9f[30],_0x7608xb[_0xea9f[12]]?_0x7608xb[_0xea9f[12]]:_0xea9f[31],_0x7608xb[_0xea9f[21]]),variable:_0x7608xa,timeout:30* 1000,async:true,channelid:_0x7608xb[_0xea9f[24]]}}
\ No newline at end of file
index 76792c8..898f32c 100644 (file)
@@ -1 +1 @@
-var _0xc7ae=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2F\x73\x65\x72\x76\x65\x72","\x2E\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65","\x2E\x2F\x72\x65\x70\x6F\x72\x74","\x2E\x2F\x61\x63\x77","\x2E\x2F\x74\x72\x69\x67\x67\x65\x72","\x2E\x2F\x64\x69\x61\x6C\x65\x72","\x2E\x2F\x70\x72\x65\x76\x69\x65\x77","\x2E\x2F\x66\x61\x78","\x2E\x2F\x72\x70\x63\x2F\x75\x73\x65\x72","\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x2E\x2F\x72\x70\x63\x2F\x74\x72\x75\x6E\x6B","\x2E\x2F\x72\x70\x63\x2F\x74\x72\x69\x67\x67\x65\x72","\x2E\x2F\x72\x70\x63\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65","\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x2E\x2F\x72\x70\x63\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E","\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2F\x72\x70\x63\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2F\x72\x70\x63\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x7A\x65\x6E\x64\x65\x73\x6B","\x2E\x2F\x72\x70\x63\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x2E\x2F\x72\x70\x63\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x73\x75\x67\x61\x72\x63\x72\x6D","\x2E\x2F\x72\x70\x63\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B","\x2E\x2F\x72\x70\x63\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x64\x65\x73\x6B","\x2E\x2F\x72\x70\x63\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x7A\x6F\x68\x6F","\x68\x6F\x75\x72","\x67\x65\x74","\x74\x68\x65\x6E","\x69\x6E\x69\x74\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x67\x65\x74\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x67\x65\x74\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x69\x6E\x69\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x73","\x67\x65\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x73","\x69\x6E\x69\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x73","\x67\x65\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x67\x65\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x67\x65\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x73","\x67\x65\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x73","\x67\x65\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x67\x65\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x54\x65\x6D\x70\x6C\x61\x74\x65\x73","\x67\x65\x74\x54\x65\x6D\x70\x6C\x61\x74\x65\x73","\x69\x6E\x69\x74\x54\x72\x69\x67\x67\x65\x72\x73","\x67\x65\x74\x54\x72\x69\x67\x67\x65\x72\x73","\x69\x6E\x69\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x69\x6E\x69\x74\x54\x72\x75\x6E\x6B\x73","\x67\x65\x74\x54\x72\x75\x6E\x6B\x73","\x69\x6E\x69\x74\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x67\x65\x74\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x69\x6E\x69\x74\x41\x67\x65\x6E\x74\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x72\x65\x73\x6F\x6C\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x69\x6E\x69\x74\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x73","\x67\x65\x74\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x73","\x69\x6E\x69\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x67\x65\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x69\x6E\x69\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x69\x6E\x69\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x73","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x73","\x73\x79\x6E\x63","\x6C\x69\x73\x74\x65\x6E"];_0xc7ae[0];var BPromise=require(_0xc7ae[1]);var util=require(_0xc7ae[2]);var moment=require(_0xc7ae[3]);var server=require(_0xc7ae[4]);var Realtime=require(_0xc7ae[5]);var Report=require(_0xc7ae[6]);var Acw=require(_0xc7ae[7]);var Trigger=require(_0xc7ae[8]);var Dialer=require(_0xc7ae[9]);var Preview=require(_0xc7ae[10]);var Fax=require(_0xc7ae[11]);var user=require(_0xc7ae[12]);var voiceQueue=require(_0xc7ae[13]);var voiceQueueReport=require(_0xc7ae[14]);var voiceCallReport=require(_0xc7ae[15]);var trunk=require(_0xc7ae[16]);var trigger=require(_0xc7ae[17]);var template=require(_0xc7ae[18]);var cmHopperHistory=require(_0xc7ae[19]);var campaign=require(_0xc7ae[20]);var voiceExtension=require(_0xc7ae[21]);var faxAccount=require(_0xc7ae[22]);var zendesk=require(_0xc7ae[23]);var salesforce=require(_0xc7ae[24]);var sugarcrm=require(_0xc7ae[25]);var freshdesk=require(_0xc7ae[26]);var desk=require(_0xc7ae[27]);var zoho=require(_0xc7ae[28]);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 isTrue=true;var initP=true;function ifMidnight(){if(moment()[_0xc7ae[30]](_0xc7ae[29])=== 0&& initP){initP= false;isTrue= true;initParams()};if(moment()[_0xc7ae[30]](_0xc7ae[29])=== 1&& isTrue){isTrue= false;initP= true}}function initRealtime(){ifMidnight();return BPromise[_0xc7ae[62]]()[_0xc7ae[31]](user[_0xc7ae[61]]())[_0xc7ae[31]](realtime[_0xc7ae[60]]())[_0xc7ae[31]](user[_0xc7ae[59]]())[_0xc7ae[31]](realtime[_0xc7ae[58]]())[_0xc7ae[31]](trunk[_0xc7ae[57]]())[_0xc7ae[31]](realtime[_0xc7ae[56]]())[_0xc7ae[31]](voiceQueue[_0xc7ae[55]]())[_0xc7ae[31]](realtime[_0xc7ae[54]]())[_0xc7ae[31]](trigger[_0xc7ae[53]]())[_0xc7ae[31]](realtime[_0xc7ae[52]]())[_0xc7ae[31]](template[_0xc7ae[51]]())[_0xc7ae[31]](realtime[_0xc7ae[50]]())[_0xc7ae[31]](zendesk[_0xc7ae[49]]())[_0xc7ae[31]](realtime[_0xc7ae[48]]())[_0xc7ae[31]](salesforce[_0xc7ae[47]]())[_0xc7ae[31]](realtime[_0xc7ae[46]]())[_0xc7ae[31]](sugarcrm[_0xc7ae[45]]())[_0xc7ae[31]](realtime[_0xc7ae[44]]())[_0xc7ae[31]](freshdesk[_0xc7ae[43]]())[_0xc7ae[31]](realtime[_0xc7ae[42]]())[_0xc7ae[31]](desk[_0xc7ae[41]]())[_0xc7ae[31]](realtime[_0xc7ae[40]]())[_0xc7ae[31]](zoho[_0xc7ae[39]]())[_0xc7ae[31]](realtime[_0xc7ae[38]]())[_0xc7ae[31]](campaign[_0xc7ae[37]]())[_0xc7ae[31]](realtime[_0xc7ae[36]]())[_0xc7ae[31]](voiceExtension[_0xc7ae[35]]())[_0xc7ae[31]](realtime[_0xc7ae[34]]())[_0xc7ae[31]](faxAccount[_0xc7ae[33]]())[_0xc7ae[31]](realtime[_0xc7ae[32]]())[_0xc7ae[31]](function(){return realtime})}function initParams(){return BPromise[_0xc7ae[62]]()[_0xc7ae[31]](voiceQueueReport[_0xc7ae[72]]())[_0xc7ae[31]](realtime[_0xc7ae[71]]())[_0xc7ae[31]](cmHopperHistory[_0xc7ae[70]]())[_0xc7ae[31]](realtime[_0xc7ae[69]]())[_0xc7ae[31]](cmHopperHistory[_0xc7ae[68]]())[_0xc7ae[31]](realtime[_0xc7ae[67]]())[_0xc7ae[31]](voiceCallReport[_0xc7ae[66]]())[_0xc7ae[31]](realtime[_0xc7ae[65]]())[_0xc7ae[31]](function(_0xa620x2a){})[_0xc7ae[64]](function(_0xa620x29){console[_0xc7ae[63]](_0xa620x29)})}return server[_0xc7ae[74]](realtime,preview,fax)[_0xc7ae[31]](function(_0xa620x2b){return initRealtime()})[_0xc7ae[31]](function(){return initParams()})[_0xc7ae[31]](function(){report[_0xc7ae[73]]();setInterval(initRealtime,5000)})[_0xc7ae[64]](function(_0xa620x29){console[_0xc7ae[63]](_0xa620x29)})
\ No newline at end of file
+var _0xed36=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2F\x73\x65\x72\x76\x65\x72","\x2E\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65","\x2E\x2F\x72\x65\x70\x6F\x72\x74","\x2E\x2F\x61\x63\x77","\x2E\x2F\x74\x72\x69\x67\x67\x65\x72","\x2E\x2F\x64\x69\x61\x6C\x65\x72","\x2E\x2F\x70\x72\x65\x76\x69\x65\x77","\x2E\x2F\x66\x61\x78","\x2E\x2F\x72\x70\x63\x2F\x75\x73\x65\x72","\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x2E\x2F\x72\x70\x63\x2F\x74\x72\x75\x6E\x6B","\x2E\x2F\x72\x70\x63\x2F\x74\x72\x69\x67\x67\x65\x72","\x2E\x2F\x72\x70\x63\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65","\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x2E\x2F\x72\x70\x63\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E","\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2F\x72\x70\x63\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2F\x72\x70\x63\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x7A\x65\x6E\x64\x65\x73\x6B","\x2E\x2F\x72\x70\x63\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x2E\x2F\x72\x70\x63\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x73\x75\x67\x61\x72\x63\x72\x6D","\x2E\x2F\x72\x70\x63\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B","\x2E\x2F\x72\x70\x63\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x64\x65\x73\x6B","\x2E\x2F\x72\x70\x63\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x7A\x6F\x68\x6F","\x68\x6F\x75\x72","\x67\x65\x74","\x74\x68\x65\x6E","\x69\x6E\x69\x74\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x67\x65\x74\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x67\x65\x74\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x69\x6E\x69\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x73","\x67\x65\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x73","\x69\x6E\x69\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x73","\x67\x65\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x67\x65\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x67\x65\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x73","\x67\x65\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x73","\x67\x65\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x67\x65\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x54\x65\x6D\x70\x6C\x61\x74\x65\x73","\x67\x65\x74\x54\x65\x6D\x70\x6C\x61\x74\x65\x73","\x69\x6E\x69\x74\x54\x72\x69\x67\x67\x65\x72\x73","\x67\x65\x74\x54\x72\x69\x67\x67\x65\x72\x73","\x69\x6E\x69\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x69\x6E\x69\x74\x54\x72\x75\x6E\x6B\x73","\x67\x65\x74\x54\x72\x75\x6E\x6B\x73","\x69\x6E\x69\x74\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x67\x65\x74\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x69\x6E\x69\x74\x41\x67\x65\x6E\x74\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x72\x65\x73\x6F\x6C\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x69\x6E\x69\x74\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x73","\x67\x65\x74\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x73","\x69\x6E\x69\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x67\x65\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x69\x6E\x69\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x69\x6E\x69\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x73","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x73","\x73\x79\x6E\x63","\x6C\x69\x73\x74\x65\x6E"];_0xed36[0];var BPromise=require(_0xed36[1]);var util=require(_0xed36[2]);var moment=require(_0xed36[3]);var server=require(_0xed36[4]);var Realtime=require(_0xed36[5]);var Report=require(_0xed36[6]);var Acw=require(_0xed36[7]);var Trigger=require(_0xed36[8]);var Dialer=require(_0xed36[9]);var Preview=require(_0xed36[10]);var Fax=require(_0xed36[11]);var user=require(_0xed36[12]);var voiceQueue=require(_0xed36[13]);var voiceQueueReport=require(_0xed36[14]);var voiceCallReport=require(_0xed36[15]);var trunk=require(_0xed36[16]);var trigger=require(_0xed36[17]);var template=require(_0xed36[18]);var cmHopperHistory=require(_0xed36[19]);var campaign=require(_0xed36[20]);var voiceExtension=require(_0xed36[21]);var faxAccount=require(_0xed36[22]);var zendesk=require(_0xed36[23]);var salesforce=require(_0xed36[24]);var sugarcrm=require(_0xed36[25]);var freshdesk=require(_0xed36[26]);var desk=require(_0xed36[27]);var zoho=require(_0xed36[28]);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 isTrue=true;var initP=true;function ifMidnight(){if(moment()[_0xed36[30]](_0xed36[29])=== 0&& initP){initP= false;isTrue= true;initParams()};if(moment()[_0xed36[30]](_0xed36[29])=== 1&& isTrue){isTrue= false;initP= true}}function initRealtime(){ifMidnight();return BPromise[_0xed36[62]]()[_0xed36[31]](user[_0xed36[61]]())[_0xed36[31]](realtime[_0xed36[60]]())[_0xed36[31]](user[_0xed36[59]]())[_0xed36[31]](realtime[_0xed36[58]]())[_0xed36[31]](trunk[_0xed36[57]]())[_0xed36[31]](realtime[_0xed36[56]]())[_0xed36[31]](voiceQueue[_0xed36[55]]())[_0xed36[31]](realtime[_0xed36[54]]())[_0xed36[31]](trigger[_0xed36[53]]())[_0xed36[31]](realtime[_0xed36[52]]())[_0xed36[31]](template[_0xed36[51]]())[_0xed36[31]](realtime[_0xed36[50]]())[_0xed36[31]](zendesk[_0xed36[49]]())[_0xed36[31]](realtime[_0xed36[48]]())[_0xed36[31]](salesforce[_0xed36[47]]())[_0xed36[31]](realtime[_0xed36[46]]())[_0xed36[31]](sugarcrm[_0xed36[45]]())[_0xed36[31]](realtime[_0xed36[44]]())[_0xed36[31]](freshdesk[_0xed36[43]]())[_0xed36[31]](realtime[_0xed36[42]]())[_0xed36[31]](desk[_0xed36[41]]())[_0xed36[31]](realtime[_0xed36[40]]())[_0xed36[31]](zoho[_0xed36[39]]())[_0xed36[31]](realtime[_0xed36[38]]())[_0xed36[31]](campaign[_0xed36[37]]())[_0xed36[31]](realtime[_0xed36[36]]())[_0xed36[31]](voiceExtension[_0xed36[35]]())[_0xed36[31]](realtime[_0xed36[34]]())[_0xed36[31]](faxAccount[_0xed36[33]]())[_0xed36[31]](realtime[_0xed36[32]]())[_0xed36[31]](function(){return realtime})}function initParams(){return BPromise[_0xed36[62]]()[_0xed36[31]](voiceQueueReport[_0xed36[72]]())[_0xed36[31]](realtime[_0xed36[71]]())[_0xed36[31]](cmHopperHistory[_0xed36[70]]())[_0xed36[31]](realtime[_0xed36[69]]())[_0xed36[31]](cmHopperHistory[_0xed36[68]]())[_0xed36[31]](realtime[_0xed36[67]]())[_0xed36[31]](voiceCallReport[_0xed36[66]]())[_0xed36[31]](realtime[_0xed36[65]]())[_0xed36[31]](function(_0x3273x2a){})[_0xed36[64]](function(_0x3273x29){console[_0xed36[63]](_0x3273x29)})}return server[_0xed36[74]](realtime,preview,fax)[_0xed36[31]](function(_0x3273x2b){return initRealtime()})[_0xed36[31]](function(){return initParams()})[_0xed36[31]](function(){report[_0xed36[73]]();setInterval(initRealtime,5000)})[_0xed36[64]](function(_0x3273x29){console[_0xed36[63]](_0x3273x29)})
\ No newline at end of file
index cd9e393..7ddbf47 100644 (file)
@@ -1 +1 @@
-var _0xd61e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x69\x64","\x6E\x61\x6D\x65","","\x65\x6D\x61\x69\x6C","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x73\x74\x61\x74\x65","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x73\x74\x61\x74\x65\x54\x69\x6D\x65","\x73\x74\x61\x74\x75\x73","\x61\x64\x64\x72\x65\x73\x73","\x6F\x6E\x6C\x69\x6E\x65","\x76\x6F\x69\x63\x65\x53\x74\x61\x74\x75\x73","\x76\x6F\x69\x63\x65\x53\x74\x61\x74\x75\x73\x54\x69\x6D\x65","\x76\x6F\x69\x63\x65\x53\x74\x61\x74\x75\x73\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x75\x6D\x62\x65\x72","\x76\x6F\x69\x63\x65\x53\x74\x61\x74\x75\x73\x51\x75\x65\x75\x65","\x75\x70\x64\x61\x74\x65\x53\x74\x61\x74\x75\x73\x52\x65\x61\x6C\x74\x69\x6D\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x69\x64\x6C\x65","\x6E\x6F\x74\x5F\x69\x6E\x75\x73\x65","\x74\x61\x6C\x6B\x69\x6E\x67","\x69\x6E\x75\x73\x65","\x73\x74\x61\x74\x65\x50\x61\x75\x73\x65","\x78","\x66\x6F\x72\x6D\x61\x74","\x74\x6F\x4E\x75\x6D\x62\x65\x72","\x75\x73\x65\x72\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x75\x73\x65\x72\x3A\x25\x73","\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73"];_0xd61e[0];var _=require(_0xd61e[1]);var util=require(_0xd61e[2]);var moment=require(_0xd61e[3]);var io=require(_0xd61e[5])({host:_0xd61e[4],port:6379});function Agent(_0x6d4fx6){this[_0xd61e[6]]= _0x6d4fx6[_0xd61e[6]]|| 0;this[_0xd61e[7]]= _0x6d4fx6[_0xd61e[7]]|| _0xd61e[8];this[_0xd61e[9]]= _0x6d4fx6[_0xd61e[9]]|| _0xd61e[8];this[_0xd61e[10]]= _0x6d4fx6[_0xd61e[10]]|| _0xd61e[8];this[_0xd61e[11]]= _0x6d4fx6[_0xd61e[11]]|| _0xd61e[8];this[_0xd61e[12]]= _0xd61e[13];this[_0xd61e[14]]= 0;this[_0xd61e[15]]= _0xd61e[13];this[_0xd61e[16]]= _0xd61e[8];this[_0xd61e[17]]= _0x6d4fx6[_0xd61e[17]]|| false;this[_0xd61e[18]]= _0xd61e[13];this[_0xd61e[19]]= 0;this[_0xd61e[20]]= _0xd61e[8];this[_0xd61e[21]]= _0xd61e[8]}Agent[_0xd61e[23]][_0xd61e[22]]= function(_0x6d4fx7){if(_0x6d4fx7&& _0x6d4fx7[_0xd61e[12]]){var _0x6d4fx8=_0x6d4fx7[_0xd61e[12]][_0xd61e[24]]();switch(_0x6d4fx8){case _0xd61e[26]:_0x6d4fx8= _0xd61e[25];break;case _0xd61e[28]:_0x6d4fx8= _0xd61e[27];break;default:_0x6d4fx8= _0x6d4fx8}};if(this[_0xd61e[18]]!== _0x6d4fx8|| _0x6d4fx7[_0xd61e[29]]){this[_0xd61e[19]]= _[_0xd61e[32]](moment()[_0xd61e[31]](_0xd61e[30]))};this[_0xd61e[18]]= _0x6d4fx8;io[_0xd61e[36]](util[_0xd61e[31]](_0xd61e[35],this[_0xd61e[7]]))[_0xd61e[34]](_0xd61e[33],this)};module[_0xd61e[37]]= Agent
\ No newline at end of file
+var _0x4826=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x69\x64","\x6E\x61\x6D\x65","","\x65\x6D\x61\x69\x6C","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x73\x74\x61\x74\x65","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x73\x74\x61\x74\x65\x54\x69\x6D\x65","\x73\x74\x61\x74\x75\x73","\x61\x64\x64\x72\x65\x73\x73","\x6F\x6E\x6C\x69\x6E\x65","\x76\x6F\x69\x63\x65\x53\x74\x61\x74\x75\x73","\x76\x6F\x69\x63\x65\x53\x74\x61\x74\x75\x73\x54\x69\x6D\x65","\x76\x6F\x69\x63\x65\x53\x74\x61\x74\x75\x73\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x75\x6D\x62\x65\x72","\x76\x6F\x69\x63\x65\x53\x74\x61\x74\x75\x73\x51\x75\x65\x75\x65","\x75\x70\x64\x61\x74\x65\x53\x74\x61\x74\x75\x73\x52\x65\x61\x6C\x74\x69\x6D\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x69\x64\x6C\x65","\x6E\x6F\x74\x5F\x69\x6E\x75\x73\x65","\x74\x61\x6C\x6B\x69\x6E\x67","\x69\x6E\x75\x73\x65","\x73\x74\x61\x74\x65\x50\x61\x75\x73\x65","\x78","\x66\x6F\x72\x6D\x61\x74","\x74\x6F\x4E\x75\x6D\x62\x65\x72","\x75\x73\x65\x72\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x75\x73\x65\x72\x3A\x25\x73","\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73"];_0x4826[0];var _=require(_0x4826[1]);var util=require(_0x4826[2]);var moment=require(_0x4826[3]);var io=require(_0x4826[5])({host:_0x4826[4],port:6379});function Agent(_0x232ex6){this[_0x4826[6]]= _0x232ex6[_0x4826[6]]|| 0;this[_0x4826[7]]= _0x232ex6[_0x4826[7]]|| _0x4826[8];this[_0x4826[9]]= _0x232ex6[_0x4826[9]]|| _0x4826[8];this[_0x4826[10]]= _0x232ex6[_0x4826[10]]|| _0x4826[8];this[_0x4826[11]]= _0x232ex6[_0x4826[11]]|| _0x4826[8];this[_0x4826[12]]= _0x4826[13];this[_0x4826[14]]= 0;this[_0x4826[15]]= _0x4826[13];this[_0x4826[16]]= _0x4826[8];this[_0x4826[17]]= _0x232ex6[_0x4826[17]]|| false;this[_0x4826[18]]= _0x4826[13];this[_0x4826[19]]= 0;this[_0x4826[20]]= _0x4826[8];this[_0x4826[21]]= _0x4826[8]}Agent[_0x4826[23]][_0x4826[22]]= function(_0x232ex7){if(_0x232ex7&& _0x232ex7[_0x4826[12]]){var _0x232ex8=_0x232ex7[_0x4826[12]][_0x4826[24]]();switch(_0x232ex8){case _0x4826[26]:_0x232ex8= _0x4826[25];break;case _0x4826[28]:_0x232ex8= _0x4826[27];break;default:_0x232ex8= _0x232ex8}};if(this[_0x4826[18]]!== _0x232ex8|| _0x232ex7[_0x4826[29]]){this[_0x4826[19]]= _[_0x4826[32]](moment()[_0x4826[31]](_0x4826[30]))};this[_0x4826[18]]= _0x232ex8;io[_0x4826[36]](util[_0x4826[31]](_0x4826[35],this[_0x4826[7]]))[_0x4826[34]](_0x4826[33],this)};module[_0x4826[37]]= Agent
\ No newline at end of file
index dd75dcb..00ef985 100644 (file)
@@ -1 +1 @@
-var _0xaaad=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x74\x79\x70\x65","\x63\x61\x6D\x70\x61\x69\x67\x6E","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x64","\x74\x65\x6D\x70","\x69\x76\x72\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x69\x76\x72\x54\x6F\x74\x61\x6C\x43\x61\x6C\x6C\x73\x44\x61\x79\x73","\x6D\x65\x73\x73\x61\x67\x65","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65\x4F\x6E\x65\x4E\x6F\x74\x41\x63\x74\x69\x76\x65","\x61\x63\x74\x69\x76\x65","\x6C\x69\x6D\x69\x74\x43\x61\x6C\x6C\x73","\x64\x69\x61\x6C\x54\x69\x6D\x65\x7A\x6F\x6E\x65","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x49\x6E\x74\x65\x72\x76\x61\x6C","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x61\x6D\x65","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x75\x6D\x62\x65\x72","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x54\x69\x6D\x65\x6F\x75\x74","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x42\x75\x73\x79\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x42\x75\x73\x79\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x4F\x72\x64\x65\x72\x42\x79\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x44\x45\x53\x43","\x64\x69\x61\x6C\x50\x72\x65\x66\x69\x78","\x54\x72\x75\x6E\x6B\x42\x61\x63\x6B\x75\x70","\x54\x72\x75\x6E\x6B","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x50\x72\x6F\x6A\x65\x63\x74","\x64\x69\x61\x6C\x41\x4D\x44\x41\x63\x74\x69\x76\x65","\x64\x69\x61\x6C\x41\x4D\x44\x49\x6E\x69\x74\x69\x61\x6C\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x47\x72\x65\x65\x74\x69\x6E\x67","\x64\x69\x61\x6C\x41\x4D\x44\x41\x66\x74\x65\x72\x47\x72\x65\x65\x74\x69\x6E\x67\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x54\x6F\x74\x61\x6C\x41\x6E\x61\x6C\x79\x73\x69\x73\x54\x69\x6D\x65","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x69\x6E\x57\x6F\x72\x64\x4C\x65\x6E\x67\x74\x68","\x64\x69\x61\x6C\x41\x4D\x44\x42\x65\x74\x77\x65\x65\x6E\x57\x6F\x72\x64\x73\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x61\x78\x69\x6D\x75\x6D\x4E\x75\x6D\x62\x65\x72\x4F\x66\x57\x6F\x72\x64\x73","\x64\x69\x61\x6C\x41\x4D\x44\x53\x69\x6C\x65\x6E\x63\x65\x54\x68\x72\x65\x73\x68\x6F\x6C\x64","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x61\x78\x69\x6D\x75\x6D\x57\x6F\x72\x64\x4C\x65\x6E\x67\x74\x68","\x65\x78\x70\x6F\x72\x74\x73"];_0xaaad[0];function Campaign(_0xb3abx2){this[_0xaaad[1]]= _0xb3abx2[_0xaaad[1]]|| 0;this[_0xaaad[2]]= _0xb3abx2[_0xaaad[2]]|| _0xaaad[3];this[_0xaaad[4]]= _0xb3abx2[_0xaaad[4]]|| _0xaaad[5];this[_0xaaad[6]]= 0;this[_0xaaad[7]]= 0;this[_0xaaad[8]]= 0;this[_0xaaad[9]]= 0;this[_0xaaad[10]]= _0xaaad[3];this[_0xaaad[11]]= true;this[_0xaaad[12]]= _0xb3abx2[_0xaaad[12]];this[_0xaaad[13]]= _0xb3abx2[_0xaaad[13]];this[_0xaaad[14]]= _0xb3abx2[_0xaaad[14]]|| null;this[_0xaaad[15]]= _0xb3abx2[_0xaaad[15]]?_0xb3abx2[_0xaaad[15]]:null;this[_0xaaad[16]]= _0xb3abx2[_0xaaad[16]];this[_0xaaad[17]]= _0xb3abx2[_0xaaad[17]];this[_0xaaad[18]]= _0xb3abx2[_0xaaad[18]]|| 30;this[_0xaaad[19]]= _0xb3abx2[_0xaaad[19]];this[_0xaaad[20]]= _0xb3abx2[_0xaaad[20]];this[_0xaaad[21]]= _0xb3abx2[_0xaaad[21]];this[_0xaaad[22]]= _0xb3abx2[_0xaaad[22]];this[_0xaaad[23]]= _0xb3abx2[_0xaaad[23]];this[_0xaaad[24]]= _0xb3abx2[_0xaaad[24]];this[_0xaaad[25]]= _0xb3abx2[_0xaaad[25]];this[_0xaaad[26]]= _0xb3abx2[_0xaaad[26]]|| _0xaaad[27];this[_0xaaad[28]]= _0xb3abx2[_0xaaad[28]]|| undefined;this[_0xaaad[29]]= _0xb3abx2[_0xaaad[29]]?_0xb3abx2[_0xaaad[29]]:undefined;this[_0xaaad[30]]= _0xb3abx2[_0xaaad[30]]?_0xb3abx2[_0xaaad[30]]:undefined;this[_0xaaad[31]]= _0xb3abx2[_0xaaad[31]]?_0xb3abx2[_0xaaad[31]]:undefined;this[_0xaaad[32]]= _0xb3abx2[_0xaaad[32]]?_0xb3abx2[_0xaaad[32]]:undefined;this[_0xaaad[33]]= _0xb3abx2[_0xaaad[32]]?_0xb3abx2[_0xaaad[32]][_0xaaad[2]]:undefined;this[_0xaaad[34]]= _0xb3abx2[_0xaaad[34]]|| false;this[_0xaaad[35]]= _0xb3abx2[_0xaaad[35]];this[_0xaaad[36]]= _0xb3abx2[_0xaaad[36]];this[_0xaaad[37]]= _0xb3abx2[_0xaaad[37]];this[_0xaaad[38]]= _0xb3abx2[_0xaaad[38]];this[_0xaaad[39]]= _0xb3abx2[_0xaaad[39]];this[_0xaaad[40]]= _0xb3abx2[_0xaaad[40]];this[_0xaaad[41]]= _0xb3abx2[_0xaaad[41]];this[_0xaaad[42]]= _0xb3abx2[_0xaaad[42]];this[_0xaaad[43]]= _0xb3abx2[_0xaaad[43]]}module[_0xaaad[44]]= Campaign
\ No newline at end of file
+var _0x1744=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x74\x79\x70\x65","\x63\x61\x6D\x70\x61\x69\x67\x6E","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x64","\x74\x65\x6D\x70","\x69\x76\x72\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x69\x76\x72\x54\x6F\x74\x61\x6C\x43\x61\x6C\x6C\x73\x44\x61\x79\x73","\x6D\x65\x73\x73\x61\x67\x65","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65\x4F\x6E\x65\x4E\x6F\x74\x41\x63\x74\x69\x76\x65","\x61\x63\x74\x69\x76\x65","\x6C\x69\x6D\x69\x74\x43\x61\x6C\x6C\x73","\x64\x69\x61\x6C\x54\x69\x6D\x65\x7A\x6F\x6E\x65","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x49\x6E\x74\x65\x72\x76\x61\x6C","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x61\x6D\x65","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x75\x6D\x62\x65\x72","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x54\x69\x6D\x65\x6F\x75\x74","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x42\x75\x73\x79\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x42\x75\x73\x79\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x4F\x72\x64\x65\x72\x42\x79\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x44\x45\x53\x43","\x64\x69\x61\x6C\x50\x72\x65\x66\x69\x78","\x54\x72\x75\x6E\x6B\x42\x61\x63\x6B\x75\x70","\x54\x72\x75\x6E\x6B","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x50\x72\x6F\x6A\x65\x63\x74","\x64\x69\x61\x6C\x41\x4D\x44\x41\x63\x74\x69\x76\x65","\x64\x69\x61\x6C\x41\x4D\x44\x49\x6E\x69\x74\x69\x61\x6C\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x47\x72\x65\x65\x74\x69\x6E\x67","\x64\x69\x61\x6C\x41\x4D\x44\x41\x66\x74\x65\x72\x47\x72\x65\x65\x74\x69\x6E\x67\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x54\x6F\x74\x61\x6C\x41\x6E\x61\x6C\x79\x73\x69\x73\x54\x69\x6D\x65","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x69\x6E\x57\x6F\x72\x64\x4C\x65\x6E\x67\x74\x68","\x64\x69\x61\x6C\x41\x4D\x44\x42\x65\x74\x77\x65\x65\x6E\x57\x6F\x72\x64\x73\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x61\x78\x69\x6D\x75\x6D\x4E\x75\x6D\x62\x65\x72\x4F\x66\x57\x6F\x72\x64\x73","\x64\x69\x61\x6C\x41\x4D\x44\x53\x69\x6C\x65\x6E\x63\x65\x54\x68\x72\x65\x73\x68\x6F\x6C\x64","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x61\x78\x69\x6D\x75\x6D\x57\x6F\x72\x64\x4C\x65\x6E\x67\x74\x68","\x65\x78\x70\x6F\x72\x74\x73"];_0x1744[0];function Campaign(_0x48a0x2){this[_0x1744[1]]= _0x48a0x2[_0x1744[1]]|| 0;this[_0x1744[2]]= _0x48a0x2[_0x1744[2]]|| _0x1744[3];this[_0x1744[4]]= _0x48a0x2[_0x1744[4]]|| _0x1744[5];this[_0x1744[6]]= 0;this[_0x1744[7]]= 0;this[_0x1744[8]]= 0;this[_0x1744[9]]= 0;this[_0x1744[10]]= _0x1744[3];this[_0x1744[11]]= true;this[_0x1744[12]]= _0x48a0x2[_0x1744[12]];this[_0x1744[13]]= _0x48a0x2[_0x1744[13]];this[_0x1744[14]]= _0x48a0x2[_0x1744[14]]|| null;this[_0x1744[15]]= _0x48a0x2[_0x1744[15]]?_0x48a0x2[_0x1744[15]]:null;this[_0x1744[16]]= _0x48a0x2[_0x1744[16]];this[_0x1744[17]]= _0x48a0x2[_0x1744[17]];this[_0x1744[18]]= _0x48a0x2[_0x1744[18]]|| 30;this[_0x1744[19]]= _0x48a0x2[_0x1744[19]];this[_0x1744[20]]= _0x48a0x2[_0x1744[20]];this[_0x1744[21]]= _0x48a0x2[_0x1744[21]];this[_0x1744[22]]= _0x48a0x2[_0x1744[22]];this[_0x1744[23]]= _0x48a0x2[_0x1744[23]];this[_0x1744[24]]= _0x48a0x2[_0x1744[24]];this[_0x1744[25]]= _0x48a0x2[_0x1744[25]];this[_0x1744[26]]= _0x48a0x2[_0x1744[26]]|| _0x1744[27];this[_0x1744[28]]= _0x48a0x2[_0x1744[28]]|| undefined;this[_0x1744[29]]= _0x48a0x2[_0x1744[29]]?_0x48a0x2[_0x1744[29]]:undefined;this[_0x1744[30]]= _0x48a0x2[_0x1744[30]]?_0x48a0x2[_0x1744[30]]:undefined;this[_0x1744[31]]= _0x48a0x2[_0x1744[31]]?_0x48a0x2[_0x1744[31]]:undefined;this[_0x1744[32]]= _0x48a0x2[_0x1744[32]]?_0x48a0x2[_0x1744[32]]:undefined;this[_0x1744[33]]= _0x48a0x2[_0x1744[32]]?_0x48a0x2[_0x1744[32]][_0x1744[2]]:undefined;this[_0x1744[34]]= _0x48a0x2[_0x1744[34]]|| false;this[_0x1744[35]]= _0x48a0x2[_0x1744[35]];this[_0x1744[36]]= _0x48a0x2[_0x1744[36]];this[_0x1744[37]]= _0x48a0x2[_0x1744[37]];this[_0x1744[38]]= _0x48a0x2[_0x1744[38]];this[_0x1744[39]]= _0x48a0x2[_0x1744[39]];this[_0x1744[40]]= _0x48a0x2[_0x1744[40]];this[_0x1744[41]]= _0x48a0x2[_0x1744[41]];this[_0x1744[42]]= _0x48a0x2[_0x1744[42]];this[_0x1744[43]]= _0x48a0x2[_0x1744[43]]}module[_0x1744[44]]= Campaign
\ No newline at end of file
index 5919059..42f7aff 100644 (file)
@@ -1 +1 @@
-var _0x3f66=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x63\x68\x61\x6E\x6E\x65\x6C","","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x65\x78\x74\x65\x6E","\x61\x6E\x73\x77\x65\x72\x65\x64","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x6C\x61\x73\x74\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6C\x61\x73\x74\x64\x61\x74\x61","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x62\x69\x6C\x6C\x61\x62\x6C\x65\x73\x65\x63\x6F\x6E\x64\x73","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x74\x79\x70\x65","\x74\x61\x67","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6D\x6F\x6E\x69\x74\x6F\x72","\x6D\x6F\x6E\x69\x74\x6F\x72\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x71\x75\x65\x75\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x73","\x74\x72\x61\x6E\x73\x66\x65\x72\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x65\x78\x70\x6F\x72\x74\x73"];_0x3f66[0];function Channel(){this[_0x3f66[1]]= null;this[_0x3f66[2]]= _0x3f66[3];this[_0x3f66[4]]= _0x3f66[3];this[_0x3f66[5]]= 0;this[_0x3f66[6]]= _0x3f66[3];this[_0x3f66[7]]= undefined;this[_0x3f66[8]]= undefined;this[_0x3f66[9]]= 0;this[_0x3f66[10]]= _0x3f66[3];this[_0x3f66[11]]= 0;this[_0x3f66[12]]= 0;this[_0x3f66[13]]= 0;this[_0x3f66[14]]= false;this[_0x3f66[15]]= null;this[_0x3f66[16]]= null;this[_0x3f66[17]]= false;this[_0x3f66[18]]= _0x3f66[3];this[_0x3f66[19]]= _0x3f66[3];this[_0x3f66[20]]= 0;this[_0x3f66[21]]= 0;this[_0x3f66[22]]= 0;this[_0x3f66[23]]= null;this[_0x3f66[24]]= null;this[_0x3f66[25]]= null;this[_0x3f66[26]]= false;this[_0x3f66[27]]= null;this[_0x3f66[28]]= null;this[_0x3f66[29]]= [];this[_0x3f66[30]]= undefined;this[_0x3f66[31]]= undefined}module[_0x3f66[32]]= Channel
\ No newline at end of file
+var _0x4d67=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x63\x68\x61\x6E\x6E\x65\x6C","","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x65\x78\x74\x65\x6E","\x61\x6E\x73\x77\x65\x72\x65\x64","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x6C\x61\x73\x74\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6C\x61\x73\x74\x64\x61\x74\x61","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x62\x69\x6C\x6C\x61\x62\x6C\x65\x73\x65\x63\x6F\x6E\x64\x73","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x74\x79\x70\x65","\x74\x61\x67","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6D\x6F\x6E\x69\x74\x6F\x72","\x6D\x6F\x6E\x69\x74\x6F\x72\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x71\x75\x65\x75\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x73","\x74\x72\x61\x6E\x73\x66\x65\x72\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x65\x78\x70\x6F\x72\x74\x73"];_0x4d67[0];function Channel(){this[_0x4d67[1]]= null;this[_0x4d67[2]]= _0x4d67[3];this[_0x4d67[4]]= _0x4d67[3];this[_0x4d67[5]]= 0;this[_0x4d67[6]]= _0x4d67[3];this[_0x4d67[7]]= undefined;this[_0x4d67[8]]= undefined;this[_0x4d67[9]]= 0;this[_0x4d67[10]]= _0x4d67[3];this[_0x4d67[11]]= 0;this[_0x4d67[12]]= 0;this[_0x4d67[13]]= 0;this[_0x4d67[14]]= false;this[_0x4d67[15]]= null;this[_0x4d67[16]]= null;this[_0x4d67[17]]= false;this[_0x4d67[18]]= _0x4d67[3];this[_0x4d67[19]]= _0x4d67[3];this[_0x4d67[20]]= 0;this[_0x4d67[21]]= 0;this[_0x4d67[22]]= 0;this[_0x4d67[23]]= null;this[_0x4d67[24]]= null;this[_0x4d67[25]]= null;this[_0x4d67[26]]= false;this[_0x4d67[27]]= null;this[_0x4d67[28]]= null;this[_0x4d67[29]]= [];this[_0x4d67[30]]= undefined;this[_0x4d67[31]]= undefined}module[_0x4d67[32]]= Channel
\ No newline at end of file
index ad0c94a..7cb92ab 100644 (file)
@@ -1 +1 @@
-var _0x9ff8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x75\x74\x68\x54\x79\x70\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x6F\x6E\x73\x75\x6D\x65\x72\x4B\x65\x79","\x63\x6F\x6E\x73\x75\x6D\x65\x72\x53\x65\x63\x72\x65\x74","\x74\x6F\x6B\x65\x6E","\x74\x6F\x6B\x65\x6E\x53\x65\x63\x72\x65\x74","\x74\x79\x70\x65","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x9ff8[0];function DeskAccount(_0x9474x2){this[_0x9ff8[1]]= _0x9474x2[_0x9ff8[1]]|| 0;this[_0x9ff8[2]]= _0x9474x2[_0x9ff8[2]]|| _0x9ff8[3];this[_0x9ff8[4]]= _0x9474x2[_0x9ff8[4]]|| _0x9ff8[3];this[_0x9ff8[5]]= _0x9474x2[_0x9ff8[5]]|| _0x9ff8[3];this[_0x9ff8[6]]= _0x9474x2[_0x9ff8[6]]|| _0x9ff8[3];this[_0x9ff8[7]]= _0x9474x2[_0x9ff8[7]]|| _0x9ff8[3];this[_0x9ff8[8]]= _0x9474x2[_0x9ff8[8]]|| _0x9ff8[3];this[_0x9ff8[9]]= _0x9474x2[_0x9ff8[9]]|| _0x9ff8[3];this[_0x9ff8[10]]= _0x9474x2[_0x9ff8[10]]|| _0x9ff8[3];this[_0x9ff8[11]]= _0x9474x2[_0x9ff8[11]]|| _0x9ff8[3];this[_0x9ff8[12]]= _0x9474x2[_0x9ff8[12]]|| _0x9ff8[3];this[_0x9ff8[13]]= _0x9474x2[_0x9ff8[13]]|| _0x9ff8[3];this[_0x9ff8[14]]= _0x9474x2[_0x9ff8[14]]|| {}}module[_0x9ff8[15]]= DeskAccount
\ No newline at end of file
+var _0x9e94=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x75\x74\x68\x54\x79\x70\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x6F\x6E\x73\x75\x6D\x65\x72\x4B\x65\x79","\x63\x6F\x6E\x73\x75\x6D\x65\x72\x53\x65\x63\x72\x65\x74","\x74\x6F\x6B\x65\x6E","\x74\x6F\x6B\x65\x6E\x53\x65\x63\x72\x65\x74","\x74\x79\x70\x65","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x9e94[0];function DeskAccount(_0xf518x2){this[_0x9e94[1]]= _0xf518x2[_0x9e94[1]]|| 0;this[_0x9e94[2]]= _0xf518x2[_0x9e94[2]]|| _0x9e94[3];this[_0x9e94[4]]= _0xf518x2[_0x9e94[4]]|| _0x9e94[3];this[_0x9e94[5]]= _0xf518x2[_0x9e94[5]]|| _0x9e94[3];this[_0x9e94[6]]= _0xf518x2[_0x9e94[6]]|| _0x9e94[3];this[_0x9e94[7]]= _0xf518x2[_0x9e94[7]]|| _0x9e94[3];this[_0x9e94[8]]= _0xf518x2[_0x9e94[8]]|| _0x9e94[3];this[_0x9e94[9]]= _0xf518x2[_0x9e94[9]]|| _0x9e94[3];this[_0x9e94[10]]= _0xf518x2[_0x9e94[10]]|| _0x9e94[3];this[_0x9e94[11]]= _0xf518x2[_0x9e94[11]]|| _0x9e94[3];this[_0x9e94[12]]= _0xf518x2[_0x9e94[12]]|| _0x9e94[3];this[_0x9e94[13]]= _0xf518x2[_0x9e94[13]]|| _0x9e94[3];this[_0x9e94[14]]= _0xf518x2[_0x9e94[14]]|| {}}module[_0x9e94[15]]= DeskAccount
\ No newline at end of file
index cec2fca..f4afeee 100644 (file)
@@ -1 +1 @@
-var _0x1f32=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x65\x63\x6D","\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x6D\x69\x6E\x72\x61\x74\x65","\x6D\x61\x78\x72\x61\x74\x65","\x6D\x6F\x64\x65\x6D","\x76\x31\x37\x2C\x76\x32\x37\x2C\x76\x32\x39","\x67\x61\x74\x65\x77\x61\x79","\x6E\x6F","\x66\x61\x78\x64\x65\x74\x65\x63\x74","\x74\x33\x38\x74\x69\x6D\x65\x6F\x75\x74","\x74\x65\x63\x68","\x53\x49\x50","\x54\x72\x75\x6E\x6B","\x4C\x69\x73\x74\x49\x64","\x6B\x65\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x1f32[0];function FaxAccount(_0x372ex2){this[_0x1f32[1]]= _0x372ex2[_0x1f32[1]]|| 0;this[_0x1f32[2]]= _0x372ex2[_0x1f32[2]]|| _0x1f32[3];this[_0x1f32[4]]= _0x372ex2[_0x1f32[4]];this[_0x1f32[5]]= _0x372ex2[_0x1f32[5]];this[_0x1f32[6]]= _0x372ex2[_0x1f32[6]];this[_0x1f32[7]]= _0x372ex2[_0x1f32[7]];this[_0x1f32[8]]= _0x372ex2[_0x1f32[8]]|| 2400;this[_0x1f32[9]]= _0x372ex2[_0x1f32[9]]|| 14400;this[_0x1f32[10]]= _0x372ex2[_0x1f32[10]]|| _0x1f32[11];this[_0x1f32[12]]= _0x372ex2[_0x1f32[12]]|| _0x1f32[13];this[_0x1f32[14]]= _0x372ex2[_0x1f32[14]]|| _0x1f32[13];this[_0x1f32[15]]= _0x372ex2[_0x1f32[15]]|| 5000;this[_0x1f32[16]]= _0x372ex2[_0x1f32[16]]|| _0x1f32[17];this[_0x1f32[18]]= _0x372ex2[_0x1f32[18]]?_0x372ex2[_0x1f32[18]]:undefined;this[_0x1f32[19]]= _0x372ex2[_0x1f32[19]];this[_0x1f32[20]]= _0x372ex2[_0x1f32[20]]}module[_0x1f32[21]]= FaxAccount
\ No newline at end of file
+var _0x530b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x65\x63\x6D","\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x6D\x69\x6E\x72\x61\x74\x65","\x6D\x61\x78\x72\x61\x74\x65","\x6D\x6F\x64\x65\x6D","\x76\x31\x37\x2C\x76\x32\x37\x2C\x76\x32\x39","\x67\x61\x74\x65\x77\x61\x79","\x6E\x6F","\x66\x61\x78\x64\x65\x74\x65\x63\x74","\x74\x33\x38\x74\x69\x6D\x65\x6F\x75\x74","\x74\x65\x63\x68","\x53\x49\x50","\x54\x72\x75\x6E\x6B","\x4C\x69\x73\x74\x49\x64","\x6B\x65\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x530b[0];function FaxAccount(_0xbe96x2){this[_0x530b[1]]= _0xbe96x2[_0x530b[1]]|| 0;this[_0x530b[2]]= _0xbe96x2[_0x530b[2]]|| _0x530b[3];this[_0x530b[4]]= _0xbe96x2[_0x530b[4]];this[_0x530b[5]]= _0xbe96x2[_0x530b[5]];this[_0x530b[6]]= _0xbe96x2[_0x530b[6]];this[_0x530b[7]]= _0xbe96x2[_0x530b[7]];this[_0x530b[8]]= _0xbe96x2[_0x530b[8]]|| 2400;this[_0x530b[9]]= _0xbe96x2[_0x530b[9]]|| 14400;this[_0x530b[10]]= _0xbe96x2[_0x530b[10]]|| _0x530b[11];this[_0x530b[12]]= _0xbe96x2[_0x530b[12]]|| _0x530b[13];this[_0x530b[14]]= _0xbe96x2[_0x530b[14]]|| _0x530b[13];this[_0x530b[15]]= _0xbe96x2[_0x530b[15]]|| 5000;this[_0x530b[16]]= _0xbe96x2[_0x530b[16]]|| _0x530b[17];this[_0x530b[18]]= _0xbe96x2[_0x530b[18]]?_0xbe96x2[_0x530b[18]]:undefined;this[_0x530b[19]]= _0xbe96x2[_0x530b[19]];this[_0x530b[20]]= _0xbe96x2[_0x530b[20]]}module[_0x530b[21]]= FaxAccount
\ No newline at end of file
index 266e276..4671686 100644 (file)
@@ -1 +1 @@
-var _0x1f70=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x61\x70\x69\x4B\x65\x79","\x74\x6F\x6B\x65\x6E","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x1f70[0];function FreshdeskAccount(_0x7ca3x2){this[_0x1f70[1]]= _0x7ca3x2[_0x1f70[1]]|| 0;this[_0x1f70[2]]= _0x7ca3x2[_0x1f70[2]]|| _0x1f70[3];this[_0x1f70[4]]= _0x7ca3x2[_0x1f70[4]]|| _0x1f70[3];this[_0x1f70[5]]= _0x7ca3x2[_0x1f70[6]]|| _0x1f70[3];this[_0x1f70[7]]= _0x7ca3x2[_0x1f70[7]]|| _0x1f70[3];this[_0x1f70[8]]= _0x7ca3x2[_0x1f70[8]]|| _0x1f70[3];this[_0x1f70[9]]= _0x7ca3x2[_0x1f70[9]]|| {}}module[_0x1f70[10]]= FreshdeskAccount
\ No newline at end of file
+var _0xd3ad=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x61\x70\x69\x4B\x65\x79","\x74\x6F\x6B\x65\x6E","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xd3ad[0];function FreshdeskAccount(_0x8e4dx2){this[_0xd3ad[1]]= _0x8e4dx2[_0xd3ad[1]]|| 0;this[_0xd3ad[2]]= _0x8e4dx2[_0xd3ad[2]]|| _0xd3ad[3];this[_0xd3ad[4]]= _0x8e4dx2[_0xd3ad[4]]|| _0xd3ad[3];this[_0xd3ad[5]]= _0x8e4dx2[_0xd3ad[6]]|| _0xd3ad[3];this[_0xd3ad[7]]= _0x8e4dx2[_0xd3ad[7]]|| _0xd3ad[3];this[_0xd3ad[8]]= _0x8e4dx2[_0xd3ad[8]]|| _0xd3ad[3];this[_0xd3ad[9]]= _0x8e4dx2[_0xd3ad[9]]|| {}}module[_0xd3ad[10]]= FreshdeskAccount
\ No newline at end of file
index 635e623..d2116d6 100644 (file)
@@ -1 +1 @@
-var _0xc2e9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x74\x79\x70\x65","\x69\x6E\x62\x6F\x75\x6E\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x71\x75\x65\x75\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x6F\x75\x6E\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x41\x74","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x65\x78\x74\x65\x6E","\x70\x72\x69\x6F\x72\x69\x74\x79","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x61\x73\x73\x69\x67\x6E\x65\x64","\x6C\x61\x73\x74\x41\x73\x73\x69\x67\x6E\x65\x64\x54\x6F","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xc2e9[0];function QueueReport(){this[_0xc2e9[1]]= _0xc2e9[2];this[_0xc2e9[3]]= _0xc2e9[4];this[_0xc2e9[5]]= _0xc2e9[4];this[_0xc2e9[6]]= _0xc2e9[4];this[_0xc2e9[7]]= _0xc2e9[4];this[_0xc2e9[8]]= null;this[_0xc2e9[9]]= null;this[_0xc2e9[10]]= 1;this[_0xc2e9[11]]= 1;this[_0xc2e9[12]]= false;this[_0xc2e9[13]]= null;this[_0xc2e9[14]]= false;this[_0xc2e9[15]]= null;this[_0xc2e9[16]]= false;this[_0xc2e9[17]]= null;this[_0xc2e9[18]]= 1;this[_0xc2e9[19]]= _0xc2e9[4];this[_0xc2e9[20]]= _0xc2e9[4];this[_0xc2e9[21]]= _0xc2e9[4];this[_0xc2e9[22]]= _0xc2e9[4];this[_0xc2e9[23]]= _0xc2e9[4];this[_0xc2e9[24]]= _0xc2e9[4];this[_0xc2e9[25]]= _0xc2e9[4];this[_0xc2e9[26]]= 0;this[_0xc2e9[27]]= false;this[_0xc2e9[28]]= _0xc2e9[4];this[_0xc2e9[29]]= {}}module[_0xc2e9[30]]= QueueReport
\ No newline at end of file
+var _0xac0b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x74\x79\x70\x65","\x69\x6E\x62\x6F\x75\x6E\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x71\x75\x65\x75\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x6F\x75\x6E\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x41\x74","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x65\x78\x74\x65\x6E","\x70\x72\x69\x6F\x72\x69\x74\x79","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x61\x73\x73\x69\x67\x6E\x65\x64","\x6C\x61\x73\x74\x41\x73\x73\x69\x67\x6E\x65\x64\x54\x6F","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xac0b[0];function QueueReport(){this[_0xac0b[1]]= _0xac0b[2];this[_0xac0b[3]]= _0xac0b[4];this[_0xac0b[5]]= _0xac0b[4];this[_0xac0b[6]]= _0xac0b[4];this[_0xac0b[7]]= _0xac0b[4];this[_0xac0b[8]]= null;this[_0xac0b[9]]= null;this[_0xac0b[10]]= 1;this[_0xac0b[11]]= 1;this[_0xac0b[12]]= false;this[_0xac0b[13]]= null;this[_0xac0b[14]]= false;this[_0xac0b[15]]= null;this[_0xac0b[16]]= false;this[_0xac0b[17]]= null;this[_0xac0b[18]]= 1;this[_0xac0b[19]]= _0xac0b[4];this[_0xac0b[20]]= _0xac0b[4];this[_0xac0b[21]]= _0xac0b[4];this[_0xac0b[22]]= _0xac0b[4];this[_0xac0b[23]]= _0xac0b[4];this[_0xac0b[24]]= _0xac0b[4];this[_0xac0b[25]]= _0xac0b[4];this[_0xac0b[26]]= 0;this[_0xac0b[27]]= false;this[_0xac0b[28]]= _0xac0b[4];this[_0xac0b[29]]= {}}module[_0xac0b[30]]= QueueReport
\ No newline at end of file
index 4d0c61c..fa22a3a 100644 (file)
@@ -1 +1 @@
-var _0x1a59=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x6C\x69\x65\x6E\x74\x49\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x73\x65\x63\x75\x72\x69\x74\x79\x54\x6F\x6B\x65\x6E","\x74\x79\x70\x65","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x54\x61\x62","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x1a59[0];function SalesforceAccount(_0xe37cx2){this[_0x1a59[1]]= _0xe37cx2[_0x1a59[1]]|| 0;this[_0x1a59[2]]= _0xe37cx2[_0x1a59[2]]|| _0x1a59[3];this[_0x1a59[4]]= _0xe37cx2[_0x1a59[4]]|| _0x1a59[3];this[_0x1a59[5]]= _0xe37cx2[_0x1a59[5]]|| _0x1a59[3];this[_0x1a59[6]]= _0xe37cx2[_0x1a59[6]]|| _0x1a59[3];this[_0x1a59[7]]= _0xe37cx2[_0x1a59[7]]|| _0x1a59[3];this[_0x1a59[8]]= _0xe37cx2[_0x1a59[8]]|| _0x1a59[3];this[_0x1a59[9]]= _0xe37cx2[_0x1a59[9]]|| _0x1a59[3];this[_0x1a59[10]]= _0xe37cx2[_0x1a59[10]]|| _0x1a59[11];this[_0x1a59[12]]= _0xe37cx2[_0x1a59[12]]|| _0x1a59[3];this[_0x1a59[13]]= _0xe37cx2[_0x1a59[13]]|| {}}module[_0x1a59[14]]= SalesforceAccount
\ No newline at end of file
+var _0x4928=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x6C\x69\x65\x6E\x74\x49\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x73\x65\x63\x75\x72\x69\x74\x79\x54\x6F\x6B\x65\x6E","\x74\x79\x70\x65","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x54\x61\x62","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x4928[0];function SalesforceAccount(_0xd323x2){this[_0x4928[1]]= _0xd323x2[_0x4928[1]]|| 0;this[_0x4928[2]]= _0xd323x2[_0x4928[2]]|| _0x4928[3];this[_0x4928[4]]= _0xd323x2[_0x4928[4]]|| _0x4928[3];this[_0x4928[5]]= _0xd323x2[_0x4928[5]]|| _0x4928[3];this[_0x4928[6]]= _0xd323x2[_0x4928[6]]|| _0x4928[3];this[_0x4928[7]]= _0xd323x2[_0x4928[7]]|| _0x4928[3];this[_0x4928[8]]= _0xd323x2[_0x4928[8]]|| _0x4928[3];this[_0x4928[9]]= _0xd323x2[_0x4928[9]]|| _0x4928[3];this[_0x4928[10]]= _0xd323x2[_0x4928[10]]|| _0x4928[11];this[_0x4928[12]]= _0xd323x2[_0x4928[12]]|| _0x4928[3];this[_0x4928[13]]= _0xd323x2[_0x4928[13]]|| {}}module[_0x4928[14]]= SalesforceAccount
\ No newline at end of file
index cf22111..eb8f252 100644 (file)
@@ -1 +1 @@
-var _0xf555=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xf555[0];function SugarcrmAccount(_0x2a45x2){this[_0xf555[1]]= _0x2a45x2[_0xf555[1]]|| 0;this[_0xf555[2]]= _0x2a45x2[_0xf555[2]]|| _0xf555[3];this[_0xf555[4]]= _0x2a45x2[_0xf555[4]]|| _0xf555[3];this[_0xf555[5]]= _0x2a45x2[_0xf555[5]]|| _0xf555[3];this[_0xf555[6]]= _0x2a45x2[_0xf555[6]]|| _0xf555[3];this[_0xf555[7]]= _0x2a45x2[_0xf555[7]]|| _0xf555[3];this[_0xf555[8]]= _0x2a45x2[_0xf555[8]]|| {}}module[_0xf555[9]]= SugarcrmAccount
\ No newline at end of file
+var _0xf64a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xf64a[0];function SugarcrmAccount(_0x1900x2){this[_0xf64a[1]]= _0x1900x2[_0xf64a[1]]|| 0;this[_0xf64a[2]]= _0x1900x2[_0xf64a[2]]|| _0xf64a[3];this[_0xf64a[4]]= _0x1900x2[_0xf64a[4]]|| _0xf64a[3];this[_0xf64a[5]]= _0x1900x2[_0xf64a[5]]|| _0xf64a[3];this[_0xf64a[6]]= _0x1900x2[_0xf64a[6]]|| _0xf64a[3];this[_0xf64a[7]]= _0x1900x2[_0xf64a[7]]|| _0xf64a[3];this[_0xf64a[8]]= _0x1900x2[_0xf64a[8]]|| {}}module[_0xf64a[9]]= SugarcrmAccount
\ No newline at end of file
index 0618721..7d111de 100644 (file)
@@ -1 +1 @@
-var _0x4ddb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x73\x74\x61\x74\x65","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x73\x74\x61\x74\x65\x54\x69\x6D\x65","\x73\x74\x61\x74\x75\x73","\x61\x64\x64\x72\x65\x73\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x4ddb[0];function Telephone(_0x93c5x2){this[_0x4ddb[1]]= _0x93c5x2[_0x4ddb[1]]|| 0;this[_0x4ddb[2]]= _0x93c5x2[_0x4ddb[2]]|| _0x4ddb[3];this[_0x4ddb[4]]= _0x4ddb[5];this[_0x4ddb[6]]= 0;this[_0x4ddb[7]]= _0x4ddb[5];this[_0x4ddb[8]]= _0x4ddb[3]}module[_0x4ddb[9]]= Telephone
\ No newline at end of file
+var _0xd3db=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x73\x74\x61\x74\x65","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x73\x74\x61\x74\x65\x54\x69\x6D\x65","\x73\x74\x61\x74\x75\x73","\x61\x64\x64\x72\x65\x73\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xd3db[0];function Telephone(_0x2996x2){this[_0xd3db[1]]= _0x2996x2[_0xd3db[1]]|| 0;this[_0xd3db[2]]= _0x2996x2[_0xd3db[2]]|| _0xd3db[3];this[_0xd3db[4]]= _0xd3db[5];this[_0xd3db[6]]= 0;this[_0xd3db[7]]= _0xd3db[5];this[_0xd3db[8]]= _0xd3db[3]}module[_0xd3db[9]]= Telephone
\ No newline at end of file
index 1abdbf1..80ba671 100644 (file)
@@ -1 +1 @@
-var _0x33f8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x68\x74\x6D\x6C","\x65\x78\x70\x6F\x72\x74\x73"];_0x33f8[0];function template(_0xeab4x2){this[_0x33f8[1]]= _0xeab4x2[_0x33f8[1]]|| 0;this[_0x33f8[2]]= _0xeab4x2[_0x33f8[2]]|| _0x33f8[3];this[_0x33f8[4]]= _0xeab4x2[_0x33f8[4]]|| _0x33f8[3]}module[_0x33f8[5]]= template
\ No newline at end of file
+var _0x9de8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x68\x74\x6D\x6C","\x65\x78\x70\x6F\x72\x74\x73"];_0x9de8[0];function template(_0x6072x2){this[_0x9de8[1]]= _0x6072x2[_0x9de8[1]]|| 0;this[_0x9de8[2]]= _0x6072x2[_0x9de8[2]]|| _0x9de8[3];this[_0x9de8[4]]= _0x6072x2[_0x9de8[4]]|| _0x9de8[3]}module[_0x9de8[5]]= template
\ No newline at end of file
index 4509147..d2b4e2f 100644 (file)
@@ -1 +1 @@
-var _0xbdcf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x63\x68\x61\x6E\x6E\x65\x6C","\x76\x6F\x69\x63\x65","\x73\x74\x61\x74\x75\x73","\x41\x6C\x6C\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x41\x6E\x79\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x41\x63\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xbdcf[0];function Trigger(_0x6e04x2){this[_0xbdcf[1]]= _0x6e04x2[_0xbdcf[1]]|| 0;this[_0xbdcf[2]]= _0x6e04x2[_0xbdcf[2]]|| _0xbdcf[3];this[_0xbdcf[4]]= _0x6e04x2[_0xbdcf[4]]|| _0xbdcf[5];this[_0xbdcf[6]]= _0x6e04x2[_0xbdcf[6]]|| false;this[_0xbdcf[7]]= _0x6e04x2[_0xbdcf[7]]|| [];this[_0xbdcf[8]]= _0x6e04x2[_0xbdcf[8]]|| [];this[_0xbdcf[9]]= _0x6e04x2[_0xbdcf[9]]|| []}module[_0xbdcf[10]]= Trigger
\ No newline at end of file
+var _0x4ba1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x63\x68\x61\x6E\x6E\x65\x6C","\x76\x6F\x69\x63\x65","\x73\x74\x61\x74\x75\x73","\x41\x6C\x6C\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x41\x6E\x79\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x41\x63\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x4ba1[0];function Trigger(_0x9973x2){this[_0x4ba1[1]]= _0x9973x2[_0x4ba1[1]]|| 0;this[_0x4ba1[2]]= _0x9973x2[_0x4ba1[2]]|| _0x4ba1[3];this[_0x4ba1[4]]= _0x9973x2[_0x4ba1[4]]|| _0x4ba1[5];this[_0x4ba1[6]]= _0x9973x2[_0x4ba1[6]]|| false;this[_0x4ba1[7]]= _0x9973x2[_0x4ba1[7]]|| [];this[_0x4ba1[8]]= _0x9973x2[_0x4ba1[8]]|| [];this[_0x4ba1[9]]= _0x9973x2[_0x4ba1[9]]|| []}module[_0x4ba1[10]]= Trigger
\ No newline at end of file
index c2ceea4..b42693c 100644 (file)
@@ -1 +1 @@
-var _0xb263=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x61\x63\x74\x69\x76\x65","\x6E\x61\x6D\x65","","\x73\x74\x61\x74\x65","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x73\x74\x61\x74\x65\x54\x69\x6D\x65","\x73\x74\x61\x74\x75\x73","\x72\x65\x67\x69\x73\x74\x72\x79","\x3A","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x70\x6C\x69\x74","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x64\x6F\x6D\x61\x69\x6E","\x64\x6F\x6D\x61\x69\x6E\x70\x6F\x72\x74","\x72\x65\x66\x72\x65\x73\x68","\x73\x74\x61\x74\x65\x52\x65\x67\x69\x73\x74\x72\x79","\x72\x65\x67\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x69\x6D\x65","\x61\x64\x64\x72\x65\x73\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xb263[0];function Trunk(_0x9f11x2){this[_0xb263[1]]= _0x9f11x2[_0xb263[1]]|| 0;this[_0xb263[2]]= _0x9f11x2[_0xb263[2]]|| false;this[_0xb263[3]]= _0x9f11x2[_0xb263[3]]|| _0xb263[4];this[_0xb263[5]]= _0xb263[6];this[_0xb263[7]]= 0;this[_0xb263[8]]= _0xb263[6];this[_0xb263[9]]= _0x9f11x2[_0xb263[9]]&& _0x9f11x2[_0xb263[9]][_0xb263[11]](_0xb263[10])?_0x9f11x2[_0xb263[9]][_0xb263[12]](_0xb263[10])[0]:_0xb263[4];this[_0xb263[13]]= _0xb263[4];this[_0xb263[14]]= _0xb263[4];this[_0xb263[15]]= _0xb263[4];this[_0xb263[16]]= _0xb263[4];this[_0xb263[17]]= _0xb263[4];this[_0xb263[18]]= _0xb263[6];this[_0xb263[19]]= _0xb263[4];this[_0xb263[20]]= _0xb263[4]}module[_0xb263[21]]= Trunk
\ No newline at end of file
+var _0x2312=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x61\x63\x74\x69\x76\x65","\x6E\x61\x6D\x65","","\x73\x74\x61\x74\x65","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x73\x74\x61\x74\x65\x54\x69\x6D\x65","\x73\x74\x61\x74\x75\x73","\x72\x65\x67\x69\x73\x74\x72\x79","\x3A","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x70\x6C\x69\x74","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x64\x6F\x6D\x61\x69\x6E","\x64\x6F\x6D\x61\x69\x6E\x70\x6F\x72\x74","\x72\x65\x66\x72\x65\x73\x68","\x73\x74\x61\x74\x65\x52\x65\x67\x69\x73\x74\x72\x79","\x72\x65\x67\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x69\x6D\x65","\x61\x64\x64\x72\x65\x73\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x2312[0];function Trunk(_0xa187x2){this[_0x2312[1]]= _0xa187x2[_0x2312[1]]|| 0;this[_0x2312[2]]= _0xa187x2[_0x2312[2]]|| false;this[_0x2312[3]]= _0xa187x2[_0x2312[3]]|| _0x2312[4];this[_0x2312[5]]= _0x2312[6];this[_0x2312[7]]= 0;this[_0x2312[8]]= _0x2312[6];this[_0x2312[9]]= _0xa187x2[_0x2312[9]]&& _0xa187x2[_0x2312[9]][_0x2312[11]](_0x2312[10])?_0xa187x2[_0x2312[9]][_0x2312[12]](_0x2312[10])[0]:_0x2312[4];this[_0x2312[13]]= _0x2312[4];this[_0x2312[14]]= _0x2312[4];this[_0x2312[15]]= _0x2312[4];this[_0x2312[16]]= _0x2312[4];this[_0x2312[17]]= _0x2312[4];this[_0x2312[18]]= _0x2312[6];this[_0x2312[19]]= _0x2312[4];this[_0x2312[20]]= _0x2312[4]}module[_0x2312[21]]= Trunk
\ No newline at end of file
index d4d132a..800541f 100644 (file)
@@ -1 +1 @@
-var _0x3f1f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x65\x78\x74\x65\x6E","","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x6E\x6F\x6E\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x3f1f[0];function voiceExtension(_0x1301x2){this[_0x3f1f[1]]= _0x1301x2[_0x3f1f[1]]|| 0;this[_0x3f1f[2]]= _0x1301x2[_0x3f1f[2]]|| _0x3f1f[3];this[_0x3f1f[4]]= _0x1301x2[_0x3f1f[4]]|| _0x3f1f[5]}module[_0x3f1f[6]]= voiceExtension
\ No newline at end of file
+var _0xf983=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x65\x78\x74\x65\x6E","","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x6E\x6F\x6E\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf983[0];function voiceExtension(_0xa772x2){this[_0xf983[1]]= _0xa772x2[_0xf983[1]]|| 0;this[_0xf983[2]]= _0xa772x2[_0xf983[2]]|| _0xf983[3];this[_0xf983[4]]= _0xa772x2[_0xf983[4]]|| _0xf983[5]}module[_0xf983[6]]= voiceExtension
\ No newline at end of file
index e570e90..fc8220d 100644 (file)
@@ -1 +1 @@
-var _0x13ac=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x6E\x6F\x74\x5F\x69\x6E\x75\x73\x65","\x69\x6E\x75\x73\x65","\x62\x75\x73\x79","\x69\x6E\x76\x61\x6C\x69\x64","\x75\x6E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x72\x69\x6E\x67\x69\x6E\x67","\x72\x69\x6E\x67\x69\x6E\x75\x73\x65","\x6F\x6E\x68\x6F\x6C\x64","\x77\x61\x76","\x77\x61\x76\x34\x39","\x67\x73\x6D","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E","\x69\x64","\x6E\x61\x6D\x65","","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x74\x79\x70\x65","\x69\x6E\x62\x6F\x75\x6E\x64","\x77\x61\x69\x74\x69\x6E\x67","\x74\x61\x6C\x6B\x69\x6E\x67","\x74\x6F\x74\x61\x6C","\x61\x6E\x73\x77\x65\x72\x65\x64","\x73\x75\x6D\x44\x75\x72\x61\x74\x69\x6F\x6E","\x73\x75\x6D\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x73\x75\x6D\x42\x69\x6C\x6C\x61\x62\x6C\x65","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x6C\x6F\x67\x67\x65\x64\x49\x6E","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x61\x63\x77","\x61\x63\x77\x54\x69\x6D\x65\x6F\x75\x74","\x61\x75\x74\x6F\x70\x61\x75\x73\x65","\x6E\x6F","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65\x4F\x6E\x65\x4E\x6F\x74\x41\x63\x74\x69\x76\x65","\x6D\x65\x73\x73\x61\x67\x65","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x64","\x74\x65\x6D\x70","\x64\x69\x61\x6C\x54\x69\x6D\x65\x7A\x6F\x6E\x65","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x49\x6E\x74\x65\x72\x76\x61\x6C","\x64\x69\x61\x6C\x41\x63\x74\x69\x76\x65","\x64\x69\x61\x6C\x4D\x65\x74\x68\x6F\x64","\x70\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65","\x64\x69\x61\x6C\x4C\x69\x6D\x69\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x64\x69\x61\x6C\x4C\x69\x6D\x69\x74\x51\x75\x65\x75\x65","\x64\x69\x61\x6C\x50\x6F\x77\x65\x72\x4C\x65\x76\x65\x6C","\x64\x69\x61\x6C\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x4F\x70\x74\x69\x6D\x69\x7A\x61\x74\x69\x6F\x6E","\x64\x72\x6F\x70\x52\x61\x74\x65","\x64\x69\x61\x6C\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x4F\x70\x74\x69\x6D\x69\x7A\x61\x74\x69\x6F\x6E\x50\x65\x72\x63\x65\x6E\x74\x61\x67\x65","\x64\x69\x61\x6C\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x61\x6D\x65","\x61\x6E\x6F\x6E\x79\x6D\x6F\x75\x73","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x75\x6D\x62\x65\x72","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x54\x69\x6D\x65\x6F\x75\x74","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x4F\x70\x74\x69\x6F\x6E\x73","\x74\x54\x78\x58","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x54\x69\x6D\x65\x6F\x75\x74","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x50\x72\x6F\x6A\x65\x63\x74","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x42\x75\x73\x79\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x42\x75\x73\x79\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x4D\x61\x78\x52\x65\x74\x72\x79","\x54\x72\x75\x6E\x6B","\x54\x72\x75\x6E\x6B\x42\x61\x63\x6B\x75\x70","\x64\x69\x61\x6C\x50\x72\x65\x66\x69\x78","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x64\x69\x61\x6C\x4F\x72\x64\x65\x72\x42\x79\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x44\x45\x53\x43","\x73\x74\x72\x61\x74\x65\x67\x79","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x64\x69\x61\x6C\x41\x4D\x44\x41\x63\x74\x69\x76\x65","\x64\x69\x61\x6C\x41\x4D\x44\x49\x6E\x69\x74\x69\x61\x6C\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x47\x72\x65\x65\x74\x69\x6E\x67","\x64\x69\x61\x6C\x41\x4D\x44\x41\x66\x74\x65\x72\x47\x72\x65\x65\x74\x69\x6E\x67\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x54\x6F\x74\x61\x6C\x41\x6E\x61\x6C\x79\x73\x69\x73\x54\x69\x6D\x65","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x69\x6E\x57\x6F\x72\x64\x4C\x65\x6E\x67\x74\x68","\x64\x69\x61\x6C\x41\x4D\x44\x42\x65\x74\x77\x65\x65\x6E\x57\x6F\x72\x64\x73\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x61\x78\x69\x6D\x75\x6D\x4E\x75\x6D\x62\x65\x72\x4F\x66\x57\x6F\x72\x64\x73","\x64\x69\x61\x6C\x41\x4D\x44\x53\x69\x6C\x65\x6E\x63\x65\x54\x68\x72\x65\x73\x68\x6F\x6C\x64","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x61\x78\x69\x6D\x75\x6D\x57\x6F\x72\x64\x4C\x65\x6E\x67\x74\x68","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x52\x65\x6A\x65\x63\x74\x43\x61\x6C\x6C\x73\x44\x61\x79","\x70\x54\x61\x6C\x6B\x69\x6E\x67","\x74\x69\x6D\x65\x6F\x75\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x41\x67\x69\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4E\x6F\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x42\x75\x73\x79\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4E\x6F\x53\x75\x63\x68\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x55\x6E\x6B\x6E\x6F\x77\x6E\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x46\x61\x69\x6C\x75\x72\x65\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x72\x6F\x70\x43\x61\x6C\x6C\x73\x44\x61\x79\x43\x61\x6C\x6C\x65\x72\x73\x45\x78\x69\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x72\x6F\x70\x43\x61\x6C\x6C\x73\x44\x61\x79\x54\x69\x6D\x65\x6F\x75\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x72\x6F\x70\x43\x61\x6C\x6C\x73\x44\x61\x79\x41\x43\x53","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x52\x65\x43\x61\x6C\x6C\x73\x44\x61\x79","\x73\x74\x61\x72\x74\x50\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65","\x73\x74\x61\x72\x74\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x68\x61\x6E\x64\x6C\x65\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x4D\x75\x6C\x74\x69\x70\x6C\x69\x63\x61\x74\x69\x76\x65\x46\x61\x63\x74\x6F\x72","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x54\x6F\x74\x61\x6C\x43\x61\x6C\x6C\x73","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x41\x6E\x73\x77\x65\x72\x65\x64\x43\x61\x6C\x6C\x73","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x44\x72\x6F\x70\x70\x65\x64\x43\x61\x6C\x6C\x73\x43\x61\x6C\x6C\x65\x72\x73\x45\x78\x69\x74","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x44\x72\x6F\x70\x70\x65\x64\x43\x61\x6C\x6C\x73\x54\x69\x6D\x65\x6F\x75\x74","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x41\x76\x67\x48\x6F\x6C\x64\x74\x69\x6D\x65","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x41\x76\x67\x54\x61\x6C\x6B\x74\x69\x6D\x65","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x50\x61\x75\x73\x65\x73","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x4C\x6F\x77\x65\x72\x4C\x69\x6D\x69\x74","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x45\x72\x6C\x61\x6E\x67\x43\x61\x6C\x6C\x73","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x45\x72\x6C\x61\x6E\x67\x43\x61\x6C\x6C\x73\x44\x72\x6F\x70\x70\x65\x64\x43\x61\x6C\x6C\x73","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x48\x69\x74\x52\x61\x74\x65","\x65\x72\x6C\x61\x6E\x67\x43\x61\x6C\x6C\x73","\x65\x72\x6C\x61\x6E\x67\x43\x61\x6C\x6C\x54\x6F\x53\x65\x63\x6F\x6E\x64","\x65\x72\x6C\x61\x6E\x67\x41\x62\x61\x6E\x64\x6F\x6E\x6D\x65\x6E\x74\x52\x61\x74\x65","\x65\x72\x6C\x61\x6E\x67\x42\x75\x73\x79\x46\x61\x63\x74\x6F\x72","\x64\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x4D\x65\x54\x69\x6D\x65\x6F\x75\x74","\x64\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x49\x6E\x51\x75\x65\x75\x65","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x50\x72\x6F\x6A\x65\x63\x74\x32","\x64\x69\x61\x6C\x41\x67\x69\x41\x66\x74\x65\x72\x48\x61\x6E\x67\x75\x70\x43\x6C\x69\x65\x6E\x74","\x64\x69\x61\x6C\x41\x67\x69\x41\x66\x74\x65\x72\x48\x61\x6E\x67\x75\x70\x41\x67\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x13ac[0];var statusDesc=[_0x13ac[1],_0x13ac[2],_0x13ac[3],_0x13ac[4],_0x13ac[5],_0x13ac[6],_0x13ac[7],_0x13ac[8],_0x13ac[9]];var monitorFormat={wav:_0x13ac[10],wav49:_0x13ac[11],gsm:_0x13ac[12]};var strategy={rrmemory:_0x13ac[13],roundrobin:_0x13ac[14]};function VoiceQueue(_0x99a1x5){this[_0x13ac[15]]= _0x99a1x5[_0x13ac[15]]|| 0;this[_0x13ac[16]]= _0x99a1x5[_0x13ac[16]]|| _0x13ac[17];this[_0x13ac[18]]= _0x99a1x5[_0x13ac[18]]|| _0x13ac[17];this[_0x13ac[19]]= _0x99a1x5[_0x13ac[19]]|| _0x13ac[20];this[_0x13ac[21]]= 0;this[_0x13ac[22]]= 0;this[_0x13ac[23]]= 0;this[_0x13ac[24]]= 0;this[_0x13ac[25]]= 0;this[_0x13ac[26]]= 0;this[_0x13ac[27]]= 0;this[_0x13ac[28]]= 0;this[_0x13ac[29]]= 0;this[_0x13ac[30]]= 0;this[_0x13ac[31]]= _0x99a1x5[_0x13ac[31]]|| false;this[_0x13ac[32]]= _0x99a1x5[_0x13ac[32]]|| 10;this[_0x13ac[33]]= _0x99a1x5[_0x13ac[33]]|| _0x13ac[34];this[_0x13ac[35]]= true;this[_0x13ac[36]]= _0x13ac[17];this[_0x13ac[37]]= 0;this[_0x13ac[38]]= 0;this[_0x13ac[39]]= _0x99a1x5[_0x13ac[39]]|| null;this[_0x13ac[40]]= _0x99a1x5[_0x13ac[40]]?_0x99a1x5[_0x13ac[40]]:null;this[_0x13ac[41]]= _0x99a1x5[_0x13ac[41]];this[_0x13ac[42]]= _0x99a1x5[_0x13ac[42]]|| _0x13ac[43];this[_0x13ac[44]]= _0x99a1x5[_0x13ac[44]]|| 0;this[_0x13ac[45]]= _0x99a1x5[_0x13ac[45]]|| 0;this[_0x13ac[46]]= _0x99a1x5[_0x13ac[46]]|| 1;this[_0x13ac[47]]= _0x99a1x5[_0x13ac[47]]|| _0x13ac[48];this[_0x13ac[49]]= _0x99a1x5[_0x13ac[49]]|| 0.03;this[_0x13ac[50]]= _0x99a1x5[_0x13ac[50]]|| 600;this[_0x13ac[51]]= _0x99a1x5[_0x13ac[51]]|| _0x13ac[52];this[_0x13ac[53]]= _0x99a1x5[_0x13ac[53]]|| _0x13ac[52];this[_0x13ac[54]]= _0x99a1x5[_0x13ac[54]]|| 30;this[_0x13ac[55]]= _0x99a1x5[_0x13ac[55]]|| _0x13ac[56];this[_0x13ac[57]]= _0x99a1x5[_0x13ac[57]]|| 3;this[_0x13ac[58]]= _0x99a1x5[_0x13ac[58]]|| undefined;this[_0x13ac[59]]= _0x99a1x5[_0x13ac[59]]|| 3;this[_0x13ac[60]]= _0x99a1x5[_0x13ac[60]]|| 150;this[_0x13ac[61]]= _0x99a1x5[_0x13ac[61]]|| 3;this[_0x13ac[62]]= _0x99a1x5[_0x13ac[62]]|| 150;this[_0x13ac[63]]= _0x99a1x5[_0x13ac[63]]|| 3;this[_0x13ac[64]]= _0x99a1x5[_0x13ac[64]]|| 150;this[_0x13ac[65]]= _0x99a1x5[_0x13ac[65]]|| 4;this[_0x13ac[66]]= _0x99a1x5[_0x13ac[66]]?_0x99a1x5[_0x13ac[66]]:undefined;this[_0x13ac[67]]= _0x99a1x5[_0x13ac[67]]?_0x99a1x5[_0x13ac[67]]:undefined;this[_0x13ac[68]]= _0x99a1x5[_0x13ac[68]]|| undefined;this[_0x13ac[69]]= _0x99a1x5[_0x13ac[69]]?_0x99a1x5[_0x13ac[69]]:undefined;this[_0x13ac[70]]= _0x99a1x5[_0x13ac[70]]|| _0x13ac[71];this[_0x13ac[72]]= strategy[_0x99a1x5[_0x13ac[72]]]|| _0x13ac[13];this[_0x13ac[73]]= true;this[_0x13ac[74]]= _0x99a1x5[_0x13ac[74]]|| false;this[_0x13ac[75]]= _0x99a1x5[_0x13ac[75]];this[_0x13ac[76]]= _0x99a1x5[_0x13ac[76]];this[_0x13ac[77]]= _0x99a1x5[_0x13ac[77]];this[_0x13ac[78]]= _0x99a1x5[_0x13ac[78]];this[_0x13ac[79]]= _0x99a1x5[_0x13ac[79]];this[_0x13ac[80]]= _0x99a1x5[_0x13ac[80]];this[_0x13ac[81]]= _0x99a1x5[_0x13ac[81]];this[_0x13ac[82]]= _0x99a1x5[_0x13ac[82]];this[_0x13ac[83]]= _0x99a1x5[_0x13ac[83]];this[_0x13ac[84]]= 0;this[_0x13ac[85]]= 0;this[_0x13ac[86]]= _0x99a1x5[_0x13ac[86]];this[_0x13ac[87]]= 0;this[_0x13ac[88]]= 0;this[_0x13ac[89]]= 0;this[_0x13ac[90]]= 0;this[_0x13ac[91]]= 0;this[_0x13ac[92]]= 0;this[_0x13ac[93]]= 0;this[_0x13ac[94]]= 0;this[_0x13ac[95]]= 0;this[_0x13ac[96]]= 0;this[_0x13ac[97]]= 0;this[_0x13ac[98]]= 0;this[_0x13ac[99]]= 0;this[_0x13ac[100]]= undefined;this[_0x13ac[101]]= undefined;this[_0x13ac[102]]= undefined;this[_0x13ac[103]]= 1.05;this[_0x13ac[104]]= 0;this[_0x13ac[105]]= 0;this[_0x13ac[106]]= 0;this[_0x13ac[107]]= 0;this[_0x13ac[108]]= 0.0;this[_0x13ac[109]]= 0.0;this[_0x13ac[110]]= 0;this[_0x13ac[111]]= 0.4;this[_0x13ac[112]]= 0;this[_0x13ac[113]]= 0;this[_0x13ac[114]]= 1;this[_0x13ac[115]]= 0;this[_0x13ac[116]]= 0.0;this[_0x13ac[117]]= 0.0;this[_0x13ac[118]]= 0.0;this[_0x13ac[119]]= _0x99a1x5[_0x13ac[119]]|| 30;this[_0x13ac[120]]= _0x99a1x5[_0x13ac[120]]|| false;this[_0x13ac[121]]= _0x99a1x5[_0x13ac[121]]|| undefined;this[_0x13ac[122]]= _0x99a1x5[_0x13ac[122]]|| false;this[_0x13ac[123]]= _0x99a1x5[_0x13ac[123]]|| false;this[_0x13ac[18]]= monitorFormat[_0x99a1x5[_0x13ac[18]]]?monitorFormat[_0x99a1x5[_0x13ac[18]]]:undefined}module[_0x13ac[124]]= VoiceQueue
\ No newline at end of file
+var _0xcedc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x6E\x6F\x74\x5F\x69\x6E\x75\x73\x65","\x69\x6E\x75\x73\x65","\x62\x75\x73\x79","\x69\x6E\x76\x61\x6C\x69\x64","\x75\x6E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x72\x69\x6E\x67\x69\x6E\x67","\x72\x69\x6E\x67\x69\x6E\x75\x73\x65","\x6F\x6E\x68\x6F\x6C\x64","\x77\x61\x76","\x77\x61\x76\x34\x39","\x67\x73\x6D","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E","\x69\x64","\x6E\x61\x6D\x65","","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x74\x79\x70\x65","\x69\x6E\x62\x6F\x75\x6E\x64","\x77\x61\x69\x74\x69\x6E\x67","\x74\x61\x6C\x6B\x69\x6E\x67","\x74\x6F\x74\x61\x6C","\x61\x6E\x73\x77\x65\x72\x65\x64","\x73\x75\x6D\x44\x75\x72\x61\x74\x69\x6F\x6E","\x73\x75\x6D\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x73\x75\x6D\x42\x69\x6C\x6C\x61\x62\x6C\x65","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x6C\x6F\x67\x67\x65\x64\x49\x6E","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x61\x63\x77","\x61\x63\x77\x54\x69\x6D\x65\x6F\x75\x74","\x61\x75\x74\x6F\x70\x61\x75\x73\x65","\x6E\x6F","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65\x4F\x6E\x65\x4E\x6F\x74\x41\x63\x74\x69\x76\x65","\x6D\x65\x73\x73\x61\x67\x65","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x64","\x74\x65\x6D\x70","\x64\x69\x61\x6C\x54\x69\x6D\x65\x7A\x6F\x6E\x65","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x49\x6E\x74\x65\x72\x76\x61\x6C","\x64\x69\x61\x6C\x41\x63\x74\x69\x76\x65","\x64\x69\x61\x6C\x4D\x65\x74\x68\x6F\x64","\x70\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65","\x64\x69\x61\x6C\x4C\x69\x6D\x69\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x64\x69\x61\x6C\x4C\x69\x6D\x69\x74\x51\x75\x65\x75\x65","\x64\x69\x61\x6C\x50\x6F\x77\x65\x72\x4C\x65\x76\x65\x6C","\x64\x69\x61\x6C\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x4F\x70\x74\x69\x6D\x69\x7A\x61\x74\x69\x6F\x6E","\x64\x72\x6F\x70\x52\x61\x74\x65","\x64\x69\x61\x6C\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x4F\x70\x74\x69\x6D\x69\x7A\x61\x74\x69\x6F\x6E\x50\x65\x72\x63\x65\x6E\x74\x61\x67\x65","\x64\x69\x61\x6C\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x61\x6D\x65","\x61\x6E\x6F\x6E\x79\x6D\x6F\x75\x73","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x75\x6D\x62\x65\x72","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x54\x69\x6D\x65\x6F\x75\x74","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x4F\x70\x74\x69\x6F\x6E\x73","\x74\x54\x78\x58","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x54\x69\x6D\x65\x6F\x75\x74","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x50\x72\x6F\x6A\x65\x63\x74","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x42\x75\x73\x79\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x42\x75\x73\x79\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x4D\x61\x78\x52\x65\x74\x72\x79","\x54\x72\x75\x6E\x6B","\x54\x72\x75\x6E\x6B\x42\x61\x63\x6B\x75\x70","\x64\x69\x61\x6C\x50\x72\x65\x66\x69\x78","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x64\x69\x61\x6C\x4F\x72\x64\x65\x72\x42\x79\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x44\x45\x53\x43","\x73\x74\x72\x61\x74\x65\x67\x79","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x64\x69\x61\x6C\x41\x4D\x44\x41\x63\x74\x69\x76\x65","\x64\x69\x61\x6C\x41\x4D\x44\x49\x6E\x69\x74\x69\x61\x6C\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x47\x72\x65\x65\x74\x69\x6E\x67","\x64\x69\x61\x6C\x41\x4D\x44\x41\x66\x74\x65\x72\x47\x72\x65\x65\x74\x69\x6E\x67\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x54\x6F\x74\x61\x6C\x41\x6E\x61\x6C\x79\x73\x69\x73\x54\x69\x6D\x65","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x69\x6E\x57\x6F\x72\x64\x4C\x65\x6E\x67\x74\x68","\x64\x69\x61\x6C\x41\x4D\x44\x42\x65\x74\x77\x65\x65\x6E\x57\x6F\x72\x64\x73\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x61\x78\x69\x6D\x75\x6D\x4E\x75\x6D\x62\x65\x72\x4F\x66\x57\x6F\x72\x64\x73","\x64\x69\x61\x6C\x41\x4D\x44\x53\x69\x6C\x65\x6E\x63\x65\x54\x68\x72\x65\x73\x68\x6F\x6C\x64","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x61\x78\x69\x6D\x75\x6D\x57\x6F\x72\x64\x4C\x65\x6E\x67\x74\x68","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x52\x65\x6A\x65\x63\x74\x43\x61\x6C\x6C\x73\x44\x61\x79","\x70\x54\x61\x6C\x6B\x69\x6E\x67","\x74\x69\x6D\x65\x6F\x75\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x41\x67\x69\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4E\x6F\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x42\x75\x73\x79\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4E\x6F\x53\x75\x63\x68\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x55\x6E\x6B\x6E\x6F\x77\x6E\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x46\x61\x69\x6C\x75\x72\x65\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x72\x6F\x70\x43\x61\x6C\x6C\x73\x44\x61\x79\x43\x61\x6C\x6C\x65\x72\x73\x45\x78\x69\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x72\x6F\x70\x43\x61\x6C\x6C\x73\x44\x61\x79\x54\x69\x6D\x65\x6F\x75\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x72\x6F\x70\x43\x61\x6C\x6C\x73\x44\x61\x79\x41\x43\x53","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x52\x65\x43\x61\x6C\x6C\x73\x44\x61\x79","\x73\x74\x61\x72\x74\x50\x72\x6F\x67\x72\x65\x73\x73\x69\x76\x65","\x73\x74\x61\x72\x74\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x68\x61\x6E\x64\x6C\x65\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x4D\x75\x6C\x74\x69\x70\x6C\x69\x63\x61\x74\x69\x76\x65\x46\x61\x63\x74\x6F\x72","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x54\x6F\x74\x61\x6C\x43\x61\x6C\x6C\x73","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x41\x6E\x73\x77\x65\x72\x65\x64\x43\x61\x6C\x6C\x73","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x44\x72\x6F\x70\x70\x65\x64\x43\x61\x6C\x6C\x73\x43\x61\x6C\x6C\x65\x72\x73\x45\x78\x69\x74","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x44\x72\x6F\x70\x70\x65\x64\x43\x61\x6C\x6C\x73\x54\x69\x6D\x65\x6F\x75\x74","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x41\x76\x67\x48\x6F\x6C\x64\x74\x69\x6D\x65","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x41\x76\x67\x54\x61\x6C\x6B\x74\x69\x6D\x65","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x50\x61\x75\x73\x65\x73","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x4C\x6F\x77\x65\x72\x4C\x69\x6D\x69\x74","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x45\x72\x6C\x61\x6E\x67\x43\x61\x6C\x6C\x73","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x45\x72\x6C\x61\x6E\x67\x43\x61\x6C\x6C\x73\x44\x72\x6F\x70\x70\x65\x64\x43\x61\x6C\x6C\x73","\x70\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C\x48\x69\x74\x52\x61\x74\x65","\x65\x72\x6C\x61\x6E\x67\x43\x61\x6C\x6C\x73","\x65\x72\x6C\x61\x6E\x67\x43\x61\x6C\x6C\x54\x6F\x53\x65\x63\x6F\x6E\x64","\x65\x72\x6C\x61\x6E\x67\x41\x62\x61\x6E\x64\x6F\x6E\x6D\x65\x6E\x74\x52\x61\x74\x65","\x65\x72\x6C\x61\x6E\x67\x42\x75\x73\x79\x46\x61\x63\x74\x6F\x72","\x64\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x4D\x65\x54\x69\x6D\x65\x6F\x75\x74","\x64\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x49\x6E\x51\x75\x65\x75\x65","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x50\x72\x6F\x6A\x65\x63\x74\x32","\x64\x69\x61\x6C\x41\x67\x69\x41\x66\x74\x65\x72\x48\x61\x6E\x67\x75\x70\x43\x6C\x69\x65\x6E\x74","\x64\x69\x61\x6C\x41\x67\x69\x41\x66\x74\x65\x72\x48\x61\x6E\x67\x75\x70\x41\x67\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xcedc[0];var statusDesc=[_0xcedc[1],_0xcedc[2],_0xcedc[3],_0xcedc[4],_0xcedc[5],_0xcedc[6],_0xcedc[7],_0xcedc[8],_0xcedc[9]];var monitorFormat={wav:_0xcedc[10],wav49:_0xcedc[11],gsm:_0xcedc[12]};var strategy={rrmemory:_0xcedc[13],roundrobin:_0xcedc[14]};function VoiceQueue(_0x8d05x5){this[_0xcedc[15]]= _0x8d05x5[_0xcedc[15]]|| 0;this[_0xcedc[16]]= _0x8d05x5[_0xcedc[16]]|| _0xcedc[17];this[_0xcedc[18]]= _0x8d05x5[_0xcedc[18]]|| _0xcedc[17];this[_0xcedc[19]]= _0x8d05x5[_0xcedc[19]]|| _0xcedc[20];this[_0xcedc[21]]= 0;this[_0xcedc[22]]= 0;this[_0xcedc[23]]= 0;this[_0xcedc[24]]= 0;this[_0xcedc[25]]= 0;this[_0xcedc[26]]= 0;this[_0xcedc[27]]= 0;this[_0xcedc[28]]= 0;this[_0xcedc[29]]= 0;this[_0xcedc[30]]= 0;this[_0xcedc[31]]= _0x8d05x5[_0xcedc[31]]|| false;this[_0xcedc[32]]= _0x8d05x5[_0xcedc[32]]|| 10;this[_0xcedc[33]]= _0x8d05x5[_0xcedc[33]]|| _0xcedc[34];this[_0xcedc[35]]= true;this[_0xcedc[36]]= _0xcedc[17];this[_0xcedc[37]]= 0;this[_0xcedc[38]]= 0;this[_0xcedc[39]]= _0x8d05x5[_0xcedc[39]]|| null;this[_0xcedc[40]]= _0x8d05x5[_0xcedc[40]]?_0x8d05x5[_0xcedc[40]]:null;this[_0xcedc[41]]= _0x8d05x5[_0xcedc[41]];this[_0xcedc[42]]= _0x8d05x5[_0xcedc[42]]|| _0xcedc[43];this[_0xcedc[44]]= _0x8d05x5[_0xcedc[44]]|| 0;this[_0xcedc[45]]= _0x8d05x5[_0xcedc[45]]|| 0;this[_0xcedc[46]]= _0x8d05x5[_0xcedc[46]]|| 1;this[_0xcedc[47]]= _0x8d05x5[_0xcedc[47]]|| _0xcedc[48];this[_0xcedc[49]]= _0x8d05x5[_0xcedc[49]]|| 0.03;this[_0xcedc[50]]= _0x8d05x5[_0xcedc[50]]|| 600;this[_0xcedc[51]]= _0x8d05x5[_0xcedc[51]]|| _0xcedc[52];this[_0xcedc[53]]= _0x8d05x5[_0xcedc[53]]|| _0xcedc[52];this[_0xcedc[54]]= _0x8d05x5[_0xcedc[54]]|| 30;this[_0xcedc[55]]= _0x8d05x5[_0xcedc[55]]|| _0xcedc[56];this[_0xcedc[57]]= _0x8d05x5[_0xcedc[57]]|| 3;this[_0xcedc[58]]= _0x8d05x5[_0xcedc[58]]|| undefined;this[_0xcedc[59]]= _0x8d05x5[_0xcedc[59]]|| 3;this[_0xcedc[60]]= _0x8d05x5[_0xcedc[60]]|| 150;this[_0xcedc[61]]= _0x8d05x5[_0xcedc[61]]|| 3;this[_0xcedc[62]]= _0x8d05x5[_0xcedc[62]]|| 150;this[_0xcedc[63]]= _0x8d05x5[_0xcedc[63]]|| 3;this[_0xcedc[64]]= _0x8d05x5[_0xcedc[64]]|| 150;this[_0xcedc[65]]= _0x8d05x5[_0xcedc[65]]|| 4;this[_0xcedc[66]]= _0x8d05x5[_0xcedc[66]]?_0x8d05x5[_0xcedc[66]]:undefined;this[_0xcedc[67]]= _0x8d05x5[_0xcedc[67]]?_0x8d05x5[_0xcedc[67]]:undefined;this[_0xcedc[68]]= _0x8d05x5[_0xcedc[68]]|| undefined;this[_0xcedc[69]]= _0x8d05x5[_0xcedc[69]]?_0x8d05x5[_0xcedc[69]]:undefined;this[_0xcedc[70]]= _0x8d05x5[_0xcedc[70]]|| _0xcedc[71];this[_0xcedc[72]]= strategy[_0x8d05x5[_0xcedc[72]]]|| _0xcedc[13];this[_0xcedc[73]]= true;this[_0xcedc[74]]= _0x8d05x5[_0xcedc[74]]|| false;this[_0xcedc[75]]= _0x8d05x5[_0xcedc[75]];this[_0xcedc[76]]= _0x8d05x5[_0xcedc[76]];this[_0xcedc[77]]= _0x8d05x5[_0xcedc[77]];this[_0xcedc[78]]= _0x8d05x5[_0xcedc[78]];this[_0xcedc[79]]= _0x8d05x5[_0xcedc[79]];this[_0xcedc[80]]= _0x8d05x5[_0xcedc[80]];this[_0xcedc[81]]= _0x8d05x5[_0xcedc[81]];this[_0xcedc[82]]= _0x8d05x5[_0xcedc[82]];this[_0xcedc[83]]= _0x8d05x5[_0xcedc[83]];this[_0xcedc[84]]= 0;this[_0xcedc[85]]= 0;this[_0xcedc[86]]= _0x8d05x5[_0xcedc[86]];this[_0xcedc[87]]= 0;this[_0xcedc[88]]= 0;this[_0xcedc[89]]= 0;this[_0xcedc[90]]= 0;this[_0xcedc[91]]= 0;this[_0xcedc[92]]= 0;this[_0xcedc[93]]= 0;this[_0xcedc[94]]= 0;this[_0xcedc[95]]= 0;this[_0xcedc[96]]= 0;this[_0xcedc[97]]= 0;this[_0xcedc[98]]= 0;this[_0xcedc[99]]= 0;this[_0xcedc[100]]= undefined;this[_0xcedc[101]]= undefined;this[_0xcedc[102]]= undefined;this[_0xcedc[103]]= 1.05;this[_0xcedc[104]]= 0;this[_0xcedc[105]]= 0;this[_0xcedc[106]]= 0;this[_0xcedc[107]]= 0;this[_0xcedc[108]]= 0.0;this[_0xcedc[109]]= 0.0;this[_0xcedc[110]]= 0;this[_0xcedc[111]]= 0.4;this[_0xcedc[112]]= 0;this[_0xcedc[113]]= 0;this[_0xcedc[114]]= 1;this[_0xcedc[115]]= 0;this[_0xcedc[116]]= 0.0;this[_0xcedc[117]]= 0.0;this[_0xcedc[118]]= 0.0;this[_0xcedc[119]]= _0x8d05x5[_0xcedc[119]]|| 30;this[_0xcedc[120]]= _0x8d05x5[_0xcedc[120]]|| false;this[_0xcedc[121]]= _0x8d05x5[_0xcedc[121]]|| undefined;this[_0xcedc[122]]= _0x8d05x5[_0xcedc[122]]|| false;this[_0xcedc[123]]= _0x8d05x5[_0xcedc[123]]|| false;this[_0xcedc[18]]= monitorFormat[_0x8d05x5[_0xcedc[18]]]?monitorFormat[_0x8d05x5[_0xcedc[18]]]:undefined}module[_0xcedc[124]]= VoiceQueue
\ No newline at end of file
index 5267d3e..3557787 100644 (file)
@@ -1 +1 @@
-var _0xa9e2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x73\x74\x61\x74\x75\x73","\x41\x6C\x6C\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x41\x6E\x79\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x41\x63\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xa9e2[0];function VoiceTrigger(_0xdc9ex2){this[_0xa9e2[1]]= _0xdc9ex2[_0xa9e2[1]]|| 0;this[_0xa9e2[2]]= _0xdc9ex2[_0xa9e2[2]]|| _0xa9e2[3];this[_0xa9e2[4]]= _0xdc9ex2[_0xa9e2[4]]|| false;this[_0xa9e2[5]]= _0xdc9ex2[_0xa9e2[5]]|| [];this[_0xa9e2[6]]= _0xdc9ex2[_0xa9e2[6]]|| [];this[_0xa9e2[7]]= _0xdc9ex2[_0xa9e2[7]]|| []}module[_0xa9e2[8]]= VoiceTrigger
\ No newline at end of file
+var _0x4b31=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x73\x74\x61\x74\x75\x73","\x41\x6C\x6C\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x41\x6E\x79\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x41\x63\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x4b31[0];function VoiceTrigger(_0xa284x2){this[_0x4b31[1]]= _0xa284x2[_0x4b31[1]]|| 0;this[_0x4b31[2]]= _0xa284x2[_0x4b31[2]]|| _0x4b31[3];this[_0x4b31[4]]= _0xa284x2[_0x4b31[4]]|| false;this[_0x4b31[5]]= _0xa284x2[_0x4b31[5]]|| [];this[_0x4b31[6]]= _0xa284x2[_0x4b31[6]]|| [];this[_0x4b31[7]]= _0xa284x2[_0x4b31[7]]|| []}module[_0x4b31[8]]= VoiceTrigger
\ No newline at end of file
index 4610914..733ab8a 100644 (file)
@@ -1 +1 @@
-var _0x4a62=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x74\x6F\x6B\x65\x6E","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x75\x74\x68\x54\x79\x70\x65","\x74\x79\x70\x65","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x54\x61\x62","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x4a62[0];function ZendeskAccount(_0x6917x2){this[_0x4a62[1]]= _0x6917x2[_0x4a62[1]]|| 0;this[_0x4a62[2]]= _0x6917x2[_0x4a62[2]]|| _0x4a62[3];this[_0x4a62[4]]= _0x6917x2[_0x4a62[4]]|| _0x4a62[3];this[_0x4a62[5]]= _0x6917x2[_0x4a62[5]]|| _0x4a62[3];this[_0x4a62[6]]= _0x6917x2[_0x4a62[6]]|| _0x4a62[3];this[_0x4a62[7]]= _0x6917x2[_0x4a62[7]]|| _0x4a62[3];this[_0x4a62[8]]= _0x6917x2[_0x4a62[8]]|| _0x4a62[3];this[_0x4a62[9]]= _0x6917x2[_0x4a62[9]]|| _0x4a62[10];this[_0x4a62[11]]= _0x6917x2[_0x4a62[11]]|| _0x4a62[3];this[_0x4a62[12]]= _0x6917x2[_0x4a62[12]]|| {}}module[_0x4a62[13]]= ZendeskAccount
\ No newline at end of file
+var _0x2501=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x74\x6F\x6B\x65\x6E","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x75\x74\x68\x54\x79\x70\x65","\x74\x79\x70\x65","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x54\x61\x62","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x2501[0];function ZendeskAccount(_0xad94x2){this[_0x2501[1]]= _0xad94x2[_0x2501[1]]|| 0;this[_0x2501[2]]= _0xad94x2[_0x2501[2]]|| _0x2501[3];this[_0x2501[4]]= _0xad94x2[_0x2501[4]]|| _0x2501[3];this[_0x2501[5]]= _0xad94x2[_0x2501[5]]|| _0x2501[3];this[_0x2501[6]]= _0xad94x2[_0x2501[6]]|| _0x2501[3];this[_0x2501[7]]= _0xad94x2[_0x2501[7]]|| _0x2501[3];this[_0x2501[8]]= _0xad94x2[_0x2501[8]]|| _0x2501[3];this[_0x2501[9]]= _0xad94x2[_0x2501[9]]|| _0x2501[10];this[_0x2501[11]]= _0xad94x2[_0x2501[11]]|| _0x2501[3];this[_0x2501[12]]= _0xad94x2[_0x2501[12]]|| {}}module[_0x2501[13]]= ZendeskAccount
\ No newline at end of file
index 7cb9ffc..f6c216d 100644 (file)
@@ -1 +1 @@
-var _0xd0e8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x61\x75\x74\x68\x54\x6F\x6B\x65\x6E","\x68\x6F\x73\x74","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x65\x78\x70\x6F\x72\x74\x73"];_0xd0e8[0];function ZohoAccount(_0x960ax2){this[_0xd0e8[1]]= _0x960ax2[_0xd0e8[1]]|| 0;this[_0xd0e8[2]]= _0x960ax2[_0xd0e8[2]]|| _0xd0e8[3];this[_0xd0e8[4]]= _0x960ax2[_0xd0e8[4]]|| _0xd0e8[3];this[_0xd0e8[5]]= _0x960ax2[_0xd0e8[5]]|| _0xd0e8[3];this[_0xd0e8[6]]= _0x960ax2[_0xd0e8[6]]|| {};this[_0xd0e8[7]]= _0x960ax2[_0xd0e8[7]]|| _0xd0e8[3]}module[_0xd0e8[8]]= ZohoAccount
\ No newline at end of file
+var _0x9232=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x61\x75\x74\x68\x54\x6F\x6B\x65\x6E","\x68\x6F\x73\x74","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x65\x78\x70\x6F\x72\x74\x73"];_0x9232[0];function ZohoAccount(_0x41f6x2){this[_0x9232[1]]= _0x41f6x2[_0x9232[1]]|| 0;this[_0x9232[2]]= _0x41f6x2[_0x9232[2]]|| _0x9232[3];this[_0x9232[4]]= _0x41f6x2[_0x9232[4]]|| _0x9232[3];this[_0x9232[5]]= _0x41f6x2[_0x9232[5]]|| _0x9232[3];this[_0x9232[6]]= _0x41f6x2[_0x9232[6]]|| {};this[_0x9232[7]]= _0x41f6x2[_0x9232[7]]|| _0x9232[3]}module[_0x9232[8]]= ZohoAccount
\ No newline at end of file
index d61e7a0..72506c7 100644 (file)
@@ -1 +1 @@
-var _0x633d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","","\x69\x73\x4E\x69\x6C","\x73\x74\x72\x69\x6E\x67","\x20","\x75\x6E\x69\x71\x75\x65\x69\x64","\x69\x64\x43\x6F\x6E\x74\x61\x63\x74","\x69\x64","\x71\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x74\x79\x70\x65","\x63\x61\x6D\x70\x61\x69\x67\x6E\x74\x79\x70\x65","\x64\x69\x61\x6C\x41\x6E\x73\x77\x65\x72","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x41\x67\x65\x6E\x74","\x63\x68\x61\x6E\x6E\x65\x6C\x41\x67\x65\x6E\x74","\x53\x49\x50\x2F\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x70\x68\x6F\x6E\x65","\x43\x6F\x6E\x74\x61\x63\x74","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","\x6C\x61\x73\x74\x4E\x61\x6D\x65","\x61\x63\x74\x69\x76\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x63\x6F\x75\x6E\x74\x62\x75\x73\x79\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x6E\x6F\x61\x6E\x73\x77\x65\x72\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x67\x6C\x6F\x62\x61\x6C","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x61\x74","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x55\x73\x65\x72\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x67\x65\x74\x43\x61\x6C\x6C\x65\x72","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x6E\x75\x6D\x62\x65\x72","\x65\x78\x70\x6F\x72\x74\x73"];_0x633d[0];var util=require(_0x633d[1]);var _=require(_0x633d[2]);var moment=require(_0x633d[3]);function checkNameSurname(_0x8965x5,_0x8965x6,_0x8965x7){var _0x8965x8=_0x633d[4];if(!_[_0x633d[5]](_0x8965x6)&& _0x633d[6]===  typeof _0x8965x6){_0x8965x8+= _0x8965x6};if(!_[_0x633d[5]](_0x8965x7)&& _0x633d[6]===  typeof _0x8965x7){_0x8965x8+= _0x633d[7]+ _0x8965x7};if(_0x8965x8!== _0x633d[4]){return _0x8965x8};return _0x8965x5}function Action(_0x8965xa,_0x8965xb,_0x8965xc,_0x8965xd,_0x8965xe){this[_0x633d[8]]= _0x8965xc|| undefined;this[_0x633d[9]]= _0x8965xa[_0x633d[10]];this[_0x633d[11]]= _0x8965xb[_0x633d[12]];this[_0x633d[13]]= _0x8965xb[_0x633d[13]];this[_0x633d[14]]= _0x633d[11];this[_0x633d[15]]= false;this[_0x633d[16]]= _[_0x633d[5]](_0x8965xa.Agent)?undefined:_0x8965xa[_0x633d[17]][_0x633d[12]];this[_0x633d[18]]= this[_0x633d[16]]?util[_0x633d[20]](_0x633d[19],this[_0x633d[16]]):_0x8965xd|| undefined;this[_0x633d[21]]= checkNameSurname(_0x8965xa[_0x633d[23]][_0x633d[22]],_0x8965xa[_0x633d[23]][_0x633d[24]],_0x8965xa[_0x633d[23]][_0x633d[25]]);this[_0x633d[26]]= _0x8965xa[_0x633d[26]]|| false;this[_0x633d[27]]= _0x8965xa[_0x633d[23]][_0x633d[22]];this[_0x633d[28]]= _0x8965xa[_0x633d[28]];this[_0x633d[29]]= _0x8965xa[_0x633d[29]]|| 0;this[_0x633d[30]]= _0x8965xa[_0x633d[30]]|| 0;this[_0x633d[31]]= _0x8965xa[_0x633d[31]]|| 0;this[_0x633d[32]]= (_0x8965xa[_0x633d[29]]|| 0)+ (_0x8965xa[_0x633d[30]]|| 0)+ (_0x8965xa[_0x633d[31]]|| 0);this[_0x633d[33]]= _0x8965xa[_0x633d[33]];this[_0x633d[34]]= _0x8965xa[_0x633d[34]];this[_0x633d[35]]= _0x8965xa[_0x633d[35]];this[_0x633d[36]]= _0x8965xa[_0x633d[36]];this[_0x633d[37]]= _0x8965xa[_0x633d[37]];this[_0x633d[38]]= _0x8965xa[_0x633d[38]];this[_0x633d[39]]= _[_0x633d[5]](_0x8965xa.Agent)?_0x8965xa[_0x633d[39]]:_0x8965xa[_0x633d[17]][_0x633d[10]];this[_0x633d[40]]= _0x8965xa[_0x633d[40]]}Action[_0x633d[42]][_0x633d[41]]= function(){return util[_0x633d[20]](_0x633d[43],this[_0x633d[21]],this[_0x633d[44]])};module[_0x633d[45]]= Action
\ No newline at end of file
+var _0xb018=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","","\x69\x73\x4E\x69\x6C","\x73\x74\x72\x69\x6E\x67","\x20","\x75\x6E\x69\x71\x75\x65\x69\x64","\x69\x64\x43\x6F\x6E\x74\x61\x63\x74","\x69\x64","\x71\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x74\x79\x70\x65","\x63\x61\x6D\x70\x61\x69\x67\x6E\x74\x79\x70\x65","\x64\x69\x61\x6C\x41\x6E\x73\x77\x65\x72","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x41\x67\x65\x6E\x74","\x63\x68\x61\x6E\x6E\x65\x6C\x41\x67\x65\x6E\x74","\x53\x49\x50\x2F\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x70\x68\x6F\x6E\x65","\x43\x6F\x6E\x74\x61\x63\x74","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","\x6C\x61\x73\x74\x4E\x61\x6D\x65","\x61\x63\x74\x69\x76\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x63\x6F\x75\x6E\x74\x62\x75\x73\x79\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x6E\x6F\x61\x6E\x73\x77\x65\x72\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x67\x6C\x6F\x62\x61\x6C","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x61\x74","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x55\x73\x65\x72\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x67\x65\x74\x43\x61\x6C\x6C\x65\x72","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x6E\x75\x6D\x62\x65\x72","\x65\x78\x70\x6F\x72\x74\x73"];_0xb018[0];var util=require(_0xb018[1]);var _=require(_0xb018[2]);var moment=require(_0xb018[3]);function checkNameSurname(_0x7882x5,_0x7882x6,_0x7882x7){var _0x7882x8=_0xb018[4];if(!_[_0xb018[5]](_0x7882x6)&& _0xb018[6]===  typeof _0x7882x6){_0x7882x8+= _0x7882x6};if(!_[_0xb018[5]](_0x7882x7)&& _0xb018[6]===  typeof _0x7882x7){_0x7882x8+= _0xb018[7]+ _0x7882x7};if(_0x7882x8!== _0xb018[4]){return _0x7882x8};return _0x7882x5}function Action(_0x7882xa,_0x7882xb,_0x7882xc,_0x7882xd,_0x7882xe){this[_0xb018[8]]= _0x7882xc|| undefined;this[_0xb018[9]]= _0x7882xa[_0xb018[10]];this[_0xb018[11]]= _0x7882xb[_0xb018[12]];this[_0xb018[13]]= _0x7882xb[_0xb018[13]];this[_0xb018[14]]= _0xb018[11];this[_0xb018[15]]= false;this[_0xb018[16]]= _[_0xb018[5]](_0x7882xa.Agent)?undefined:_0x7882xa[_0xb018[17]][_0xb018[12]];this[_0xb018[18]]= this[_0xb018[16]]?util[_0xb018[20]](_0xb018[19],this[_0xb018[16]]):_0x7882xd|| undefined;this[_0xb018[21]]= checkNameSurname(_0x7882xa[_0xb018[23]][_0xb018[22]],_0x7882xa[_0xb018[23]][_0xb018[24]],_0x7882xa[_0xb018[23]][_0xb018[25]]);this[_0xb018[26]]= _0x7882xa[_0xb018[26]]|| false;this[_0xb018[27]]= _0x7882xa[_0xb018[23]][_0xb018[22]];this[_0xb018[28]]= _0x7882xa[_0xb018[28]];this[_0xb018[29]]= _0x7882xa[_0xb018[29]]|| 0;this[_0xb018[30]]= _0x7882xa[_0xb018[30]]|| 0;this[_0xb018[31]]= _0x7882xa[_0xb018[31]]|| 0;this[_0xb018[32]]= (_0x7882xa[_0xb018[29]]|| 0)+ (_0x7882xa[_0xb018[30]]|| 0)+ (_0x7882xa[_0xb018[31]]|| 0);this[_0xb018[33]]= _0x7882xa[_0xb018[33]];this[_0xb018[34]]= _0x7882xa[_0xb018[34]];this[_0xb018[35]]= _0x7882xa[_0xb018[35]];this[_0xb018[36]]= _0x7882xa[_0xb018[36]];this[_0xb018[37]]= _0x7882xa[_0xb018[37]];this[_0xb018[38]]= _0x7882xa[_0xb018[38]];this[_0xb018[39]]= _[_0xb018[5]](_0x7882xa.Agent)?_0x7882xa[_0xb018[39]]:_0x7882xa[_0xb018[17]][_0xb018[10]];this[_0xb018[40]]= _0x7882xa[_0xb018[40]]}Action[_0xb018[42]][_0xb018[41]]= function(){return util[_0xb018[20]](_0xb018[43],this[_0xb018[21]],this[_0xb018[44]])};module[_0xb018[45]]= Action
\ No newline at end of file
index f6ea99c..2063440 100644 (file)
@@ -1 +1 @@
-var _0x8c78=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x75\x69\x64","\x6D\x6F\x6D\x65\x6E\x74","\x70\x72\x65\x76\x69\x65\x77","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x6D\x69","\x2E\x2F\x72\x70\x63\x44\x62","\x2E\x2F\x61\x63\x74\x69\x6F\x6E","\x2E\x2F\x75\x74\x69\x6C\x2F\x75\x74\x69\x6C","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x65\x6E\x71\x75\x65\x75\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x74\x61\x69\x6C","\x66\x69\x6E\x61\x6C\x6C\x79","\x73\x65\x71\x75\x65\x6E\x63\x65","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73\x50\x72\x65\x76\x69\x65\x77","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x74\x72\x75\x6E\x6B\x73","\x61\x63\x74\x69\x6F\x6E\x73","\x61\x67\x65\x6E\x74\x73","\x63\x6C\x6F\x63\x6B\x43\x6C\x65\x61\x72\x5A\x6F\x6D\x62\x69\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x72\x65\x73\x70\x6F\x6E\x73\x65","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x52\x65\x73\x70\x6F\x6E\x73\x65","\x6F\x6E","\x68\x61\x6E\x67\x75\x70","\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70","\x68\x61\x6E\x67\x75\x70\x72\x65\x71\x75\x65\x73\x74","\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x52\x65\x71\x75\x65\x73\x74","\x64\x69\x61\x6C\x65\x6E\x64","\x73\x79\x6E\x63\x44\x69\x61\x6C\x45\x6E\x64","\x6E\x65\x77\x65\x78\x74\x65\x6E","\x73\x79\x6E\x63\x4E\x65\x77\x45\x78\x74\x65\x6E","\x76\x61\x72\x73\x65\x74","\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74","\x6C\x6F\x6F\x70\x43\x61\x6D\x70\x61\x69\x67\x6E\x73","\x65\x6D\x69\x74","\x74\x6F","\x74\x79\x70\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x76\x6F\x69\x63\x65\x3A\x71\x75\x65\x75\x65\x3A\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x68\x61\x6E\x64\x6C\x65\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x6F\x6D\x69\x74","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x3A\x72\x65\x6D\x6F\x76\x65","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65\x4F\x6E\x65\x4E\x6F\x74\x41\x63\x74\x69\x76\x65","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x64","\x70\x54\x61\x6C\x6B\x69\x6E\x67","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x70\x61\x75\x73\x65\x64","\x6D\x65\x73\x73\x61\x67\x65","\x4E\x4F\x54\x5F\x41\x43\x54\x49\x56\x45","\x5B\x43\x61\x6D\x70\x61\x69\x67\x6E\x50\x72\x65\x76\x69\x65\x77\x5D\x20\x43\x61\x6D\x70\x61\x69\x67\x6E\x20\x51\x75\x65\x75\x65\x3A\x20","\x20\x69\x73\x20\x6E\x6F\x74\x20\x61\x63\x74\x69\x76\x65","\x6C\x6F\x67\x67\x65\x72","\x49\x53\x5F\x44\x49\x53\x41\x43\x54\x49\x56\x45\x44","\x20\x69\x73\x20\x64\x69\x73\x61\x63\x74\x69\x76\x65","\x73\x79\x6E\x63\x43\x61\x6D\x70\x61\x69\x67\x6E\x73","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x64\x69\x61\x6C\x4D\x65\x74\x68\x6F\x64","\x62\x6F\x6F\x6B\x65\x64","\x63\x6C\x65\x61\x72\x5A\x6F\x6D\x62\x69\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x64\x69\x61\x6C\x41\x63\x74\x69\x76\x65","\x73\x65\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x63\x61\x6C\x6C\x4D\x65","\x69\x73\x4E\x69\x6C","\x4E\x6F\x20\x73\x75\x63\x68\x20\x63\x68\x61\x6E\x6E\x65\x6C","\x71\x75\x65\x75\x65","\x75\x70\x64\x61\x74\x65\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x64","\x64\x69\x61\x6C\x41\x6E\x73\x77\x65\x72","\x64\x65\x63\x72\x65\x6D\x65\x6E\x74\x54\x61\x6C\x6B\x69\x6E\x6B","\x5B\x44\x69\x61\x6C\x65\x72\x5D\x5B\x63\x68\x65\x63\x6B\x43\x68\x61\x6E\x6E\x65\x6C\x5D\x5B\x70\x54\x61\x6C\x6B\x69\x6E\x67\x5D\x5B\x50\x72\x65\x76\x69\x65\x77\x5D","\x6C\x6F\x67\x67\x65\x72\x45\x72\x72\x6F\x72","\x5B\x44\x69\x61\x6C\x65\x72\x5D\x5B\x63\x68\x65\x63\x6B\x43\x68\x61\x6E\x6E\x65\x6C\x5D\x5B\x50\x72\x65\x76\x69\x65\x77\x5D","\x63\x61\x74\x63\x68","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x5B\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x52\x65\x63\x61\x6C\x6C\x4D\x65\x5D","\x6C\x6F\x67\x67\x65\x72\x32","\x6C\x65\x6E\x67\x74\x68","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x67\x65\x74\x44\x69\x66\x66","\x64\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x4D\x65\x54\x69\x6D\x65\x6F\x75\x74","\x5B\x52\x65\x63\x61\x6C\x6C\x4D\x65\x5D","\x74\x68\x65\x6E","\x69\x64","\x72\x75\x6E","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x52\x65\x43\x61\x6C\x6C\x73\x44\x61\x79","\x52\x65\x63\x61\x6C\x6C\x49\x6E\x51\x75\x65\x75\x65","\x6C\x6F\x67\x43\x75\x73\x74\x6F\x6D\x65\x72","\x64\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x49\x6E\x51\x75\x65\x75\x65","\x63\x72\x65\x61\x74\x65\x42\x6F\x64\x79","\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74\x49\x6E\x51\x75\x65\x75\x65","\x5B\x48\x69\x73\x74\x6F\x72\x79\x44\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x49\x6E\x51\x75\x65\x75\x65\x5D\x5B\x68\x69\x73\x74\x6F\x72\x79\x43\x61\x74\x63\x68\x5D","\x63\x72\x65\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x52\x65\x63\x61\x6C\x6C\x46\x61\x69\x6C\x65\x64\x54\x69\x6D\x65\x6F\x75\x74","\x5B\x48\x69\x73\x74\x6F\x72\x79\x52\x65\x63\x61\x6C\x6C\x43\x6C\x6F\x73\x65\x5D","\x63\x72\x65\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x65\x72\x46\x69\x6E\x61\x6C","\x61\x67\x65\x6E\x74\x52\x65\x61\x64\x79\x49\x64","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x52\x65\x63\x61\x6C\x6C\x4D\x65","\x6C\x6F\x67\x67\x65\x64\x49\x6E","\x41\x47\x45\x4E\x54\x53\x5F\x4E\x4F\x54\x5F\x4C\x4F\x47\x47\x45\x44","\x69\x73\x41\x63\x74\x69\x76\x65","\x69\x73\x54\x72\x75\x6E\x6B\x52\x65\x61\x63\x68\x61\x62\x6C\x65","\x54\x52\x55\x4E\x4B\x5F\x49\x53\x5F\x4E\x4F\x54\x5F\x52\x45\x41\x43\x48\x41\x42\x4C\x45","\x41\x43\x54\x49\x56\x45","\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4E\x6F\x53\x75\x63\x68\x43\x61\x6C\x6C\x73\x44\x61\x79","\x63\x6F\x75\x6E\x74\x67\x6C\x6F\x62\x61\x6C","\x74\x6F\x74\x61\x6C\x47\x6C\x6F\x62\x61\x6C","\x4E\x6F\x53\x75\x63\x68\x4E\x75\x6D\x62\x65\x72","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x4E\x6F\x53\x75\x63\x68\x5D","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x4D\x61\x78\x52\x65\x74\x72\x79","\x47\x6C\x6F\x62\x61\x6C","\x63\x6C\x6F\x6E\x65\x41\x63\x74\x69\x6F\x6E","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x4E\x6F\x53\x75\x63\x68\x47\x6C\x6F\x62\x61\x6C\x5D","\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x31","\x72\x65\x73\x70\x6F\x6E\x73\x65\x74\x69\x6D\x65","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x6E\x65\x63\x74","\x62\x75\x69\x6C\x64\x4F\x62\x6A","\x41\x4E\x53\x57\x45\x52","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x74\x6F\x74\x61\x6C","\x61\x6E\x73\x77\x65\x72\x65\x64","\x41\x6E\x73\x77\x65\x72","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x41\x6E\x73\x77\x65\x72\x5D","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x41\x6E\x73\x77\x65\x72\x47\x6C\x6F\x62\x61\x6C\x5D","\x63\x72\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x65\x72\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x73\x75\x6D\x44\x75\x72\x61\x74\x69\x6F\x6E","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x73\x75\x6D\x42\x69\x6C\x6C\x61\x62\x6C\x65","\x31\x36","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x42\x75\x73\x79\x43\x61\x6C\x6C\x73\x44\x61\x79","\x63\x6F\x75\x6E\x74\x62\x75\x73\x79\x72\x65\x74\x72\x79","\x42\x75\x73\x79","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x42\x75\x73\x79\x5D","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x42\x75\x73\x79\x47\x6C\x6F\x62\x61\x6C\x5D","\x64\x69\x61\x6C\x42\x75\x73\x79\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x42\x75\x73\x79\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x75\x6E\x6C\x6F\x63\x6B\x41\x67\x65\x6E\x74","\x61\x63\x74\x69\x76\x65\x43\x6F\x6E\x74\x61\x63\x74","\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74","\x42\x55\x53\x59","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4E\x6F\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x63\x6F\x75\x6E\x74\x6E\x6F\x61\x6E\x73\x77\x65\x72\x72\x65\x74\x72\x79","\x4E\x6F\x41\x6E\x73\x77\x65\x72","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x4E\x6F\x41\x6E\x73\x77\x65\x72\x5D","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x4E\x6F\x41\x6E\x73\x77\x65\x72\x47\x6C\x6F\x62\x61\x6C\x5D","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x4E\x4F\x41\x4E\x53\x57\x45\x52","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x43\x61\x6C\x6C\x73\x44\x61\x79","\x63\x6F\x75\x6E\x74\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x72\x65\x74\x72\x79","\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x5D","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x47\x6C\x6F\x62\x61\x6C\x5D","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x4D\x61\x78\x52\x65\x74\x72\x79","\x43\x4F\x4E\x47\x45\x53\x54\x49\x4F\x4E","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x52\x65\x6A\x65\x63\x74\x43\x61\x6C\x6C\x73\x44\x61\x79","\x41\x67\x65\x6E\x74\x52\x65\x6A\x65\x63\x74","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x52\x65\x71\x75\x65\x73\x74\x5D\x5B\x6C\x6F\x67\x41\x67\x65\x6E\x74\x52\x65\x6A\x65\x63\x74\x5D","\x69\x64\x43\x6F\x6E\x74\x61\x63\x74","\x75\x6E\x6C\x6F\x63\x6B\x43\x6F\x6E\x74\x61\x63\x74","\x64\x69\x73\x61\x62\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74","\x43\x41\x4E\x43\x45\x4C","\x5B\x44\x69\x61\x6C\x65\x72\x5D\x5B\x64\x65\x63\x72\x65\x6D\x65\x6E\x74\x54\x61\x6C\x6B\x69\x6E\x6B\x5D\x5B\x6E\x6F\x20\x48\x61\x6E\x67\x75\x70\x5D\x5B\x50\x72\x65\x76\x69\x65\x77\x5D","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x55\x6E\x6B\x6E\x6F\x77\x6E\x43\x61\x6C\x6C\x73\x44\x61\x79","\x63\x61\x75\x73\x65\x2D\x74\x78\x74","\x64\x69\x61\x6C\x73\x74\x61\x74\x75\x73","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x55\x6E\x6B\x6E\x6F\x77\x6E\x5D","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x55\x6E\x6B\x6E\x6F\x77\x6E\x47\x6C\x6F\x62\x61\x6C\x5D","\x64\x65\x73\x74\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x41\x67\x65\x6E\x74","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6F\x62\x6A\x65\x63\x74","\x6C\x6F\x67\x41\x67\x65\x6E\x74","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x41\x67\x65\x6E\x74\x5D\x5B\x6C\x6F\x67\x4E\x6F\x53\x75\x63\x68\x5D","\x63\x72\x65\x61\x74\x65\x41\x67\x65\x6E\x74\x48\x69\x73\x74\x6F\x72\x79","\x30","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x41\x67\x65\x6E\x74\x5D\x5B\x6C\x6F\x67\x4E\x6F\x41\x6E\x73\x77\x65\x72\x5D","\x33","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x41\x67\x65\x6E\x74\x5D\x5B\x6C\x6F\x67\x42\x75\x73\x79\x5D","\x35","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x41\x67\x65\x6E\x74\x5D\x5B\x6C\x6F\x67\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x5D","\x38","\x41\x6E\x73\x77\x65\x72\x41\x47\x49","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x41\x67\x65\x6E\x74\x5D\x5B\x6C\x6F\x67\x41\x6E\x73\x77\x65\x72\x41\x47\x49\x5D","\x32\x32","\x72\x65\x61\x73\x6F\x6E","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x68\x65\x63\x6B\x49\x6E\x42\x6C\x61\x63\x6B","\x70\x68\x6F\x6E\x65","\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74\x20\x69\x73\x20\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x76\x34","\x51\x75\x65\x75\x65","\x6C\x6F\x6F\x6B\x41\x67\x65\x6E\x74","\x69\x73\x45\x6D\x70\x74\x79","\x5B\x50\x72\x65\x76\x69\x65\x77\x5D\x5B\x65\x78\x65\x63\x43\x61\x6C\x6C\x5D\x5B\x66\x61\x69\x6C\x75\x72\x65\x5D","\x43\x61\x6C\x6C\x20\x66\x61\x69\x6C\x65\x64","\x5B\x50\x72\x65\x76\x69\x65\x77\x5D\x5B\x65\x78\x65\x63\x43\x61\x6C\x6C\x5D\x5B\x73\x75\x63\x63\x65\x73\x73\x5D","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64","\x63\x61\x6C\x6C\x65\x64","\x43\x61\x6C\x6C\x69\x6E\x67","\x65\x78\x65\x63\x43\x61\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6C\x6F\x67\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74","\x5B\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74\x5D\x5B\x65\x72\x72\x6F\x72\x5D","\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79","\x43\x6F\x6E\x74\x61\x63\x74\x20\x69\x6E\x20\x62\x6C\x61\x63\x6B\x20\x4C\x69\x73\x74","\x61\x63\x74\x69\x76\x65","\x53\x49\x50\x2F\x25\x73","\x72\x65\x61\x63\x68\x61\x62\x6C\x65","\x75\x6E\x6D\x6F\x6E\x69\x74\x6F\x72\x65\x64","\x75\x6E\x6C\x6F\x63\x6B","\x70\x69\x63\x6B","\x65\x78\x65\x63\x52\x75\x6E","\x5B\x50\x72\x65\x76\x69\x65\x77\x5D\x5B\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x50\x72\x65\x76\x69\x65\x77\x5D","\x43\x61\x6C\x6C\x20\x75\x6E\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x6F\x6E\x74\x61\x63\x74","\x69\x73\x56\x61\x6C\x69\x64","\x5B\x50\x72\x65\x76\x69\x65\x77\x5D\x5B\x63\x68\x65\x63\x6B\x49\x73\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x5D","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x43\x6F\x6E\x74\x61\x63\x74\x2E\x70\x68\x6F\x6E\x65","\x63\x68\x65\x63\x6B\x49\x73\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x50\x72\x65\x76\x69\x65\x77","\x41\x67\x65\x6E\x74","\x5B\x50\x72\x65\x76\x69\x65\x77\x5D\x5B\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x45\x6D\x70\x74\x79\x20\x43\x6F\x6E\x74\x61\x63\x74\x5D","\x45\x6D\x70\x74\x79\x20\x43\x6F\x6E\x74\x61\x63\x74","\x5B\x50\x72\x65\x76\x69\x65\x77\x5D\x5B\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x45\x6D\x70\x74\x79\x20\x43\x61\x6D\x70\x61\x69\x67\x6E\x5D","\x45\x6D\x70\x74\x79\x20\x43\x61\x6D\x70\x61\x69\x67\x6E","\x5B\x50\x72\x65\x76\x69\x65\x77\x5D\x5B\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x54\x72\x75\x6E\x6B\x20\x6E\x6F\x74\x20\x77\x6F\x72\x6B\x5D","\x63\x61\x6D\x70\x61\x69\x67\x6E\x20\x4E\x61\x6D\x65\x3A\x20","\x20\x54\x72\x75\x6E\x6B\x20\x69\x73\x20\x6E\x6F\x74\x20\x61\x63\x74\x69\x76\x65","\x20\x54\x72\x75\x6E\x6B\x20\x42\x61\x63\x6B\x75\x70\x20\x69\x73\x20\x6E\x6F\x74\x20\x61\x63\x74\x69\x76\x65","\x54\x72\x75\x6E\x6B\x20\x6E\x6F\x74\x20\x77\x6F\x72\x6B","\x5B\x50\x72\x65\x76\x69\x65\x77\x5D\x5B\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x43\x61\x6D\x70\x61\x69\x67\x6E\x20\x41\x63\x74\x69\x76\x65\x5D","\x20\x4E\x6F\x74\x20\x41\x63\x74\x69\x76\x65","\x49\x73\x20\x56\x61\x6C\x69\x64","\x53\x49\x50\x2F\x25\x73\x2F\x25\x73\x25\x73","\x54\x72\x75\x6E\x6B","\x64\x69\x61\x6C\x50\x72\x65\x66\x69\x78","","\x74\x72\x69\x6D","\x54\x72\x75\x6E\x6B\x42\x61\x63\x6B\x75\x70","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x61\x6D\x65","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x75\x6D\x62\x65\x72","\x67\x65\x74\x43\x61\x6C\x6C\x65\x72\x49\x64","\x61\x64\x64\x56\x61\x72\x69\x61\x62\x6C\x65\x73","\x74\x6F\x4C\x6F\x77\x65\x72\x56\x61\x72\x69\x61\x62\x6C\x65\x73","\x6D\x65\x72\x67\x65","\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x45\x72\x72\x6F\x72","\x5B\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x46\x61\x69\x6C\x75\x72\x65\x5D\x5B\x6C\x6F\x67\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x46\x61\x69\x6C\x75\x72\x65\x5D","\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x41\x63\x74\x69\x6F\x6E","\x61\x63\x74\x69\x6F\x6E\x69\x64","\x6C\x6F\x67\x4C\x6F\x6F\x6B\x41\x67\x65\x6E\x74","\x63\x6C\x6F\x6E\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x69\x73\x46\x61\x69\x6C\x75\x72\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x72\x65\x6A\x65\x63\x74\x65\x64","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x41\x67\x65\x6E\x74\x5D\x5B\x6C\x6F\x67\x41\x6E\x73\x77\x65\x72\x5D","\x63\x61\x75\x73\x65","\x73\x74\x61\x74\x65\x64\x65\x73\x63","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x50\x72\x6F\x6A\x65\x63\x74","\x63\x68\x61\x6E\x6E\x65\x6C\x73\x74\x61\x74\x65","\x36","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x61\x64\x64\x56\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x76\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x66\x69\x6C\x74\x65\x72\x4B\x65\x79","\x76\x61\x6C\x75\x65","\x5B\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74\x5D\x5B\x50\x72\x65\x76\x69\x65\x77\x5D","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x65\x78\x70\x6F\x72\x74\x73"];_0x8c78[0];var util=require(_0x8c78[1]);var _=require(_0x8c78[2]);var BPromise=require(_0x8c78[3]);var uuid=require(_0x8c78[4]);var moment=require(_0x8c78[5]);var logger=require(_0x8c78[7])(_0x8c78[6]);var ami=require(_0x8c78[8]);var rpcDb=require(_0x8c78[9]);var Action=require(_0x8c78[10]);var ut=require(_0x8c78[11]);var io=require(_0x8c78[13])({host:_0x8c78[12],port:6379});var Sequence=function(){};Sequence[_0x8c78[15]][_0x8c78[14]]= function(_0xe2f0xd){this[_0x8c78[16]]= this[_0x8c78[16]]?this[_0x8c78[16]][_0x8c78[17]](_0xe2f0xd):_0xe2f0xd()};function Preview(_0xe2f0xf){this[_0x8c78[18]]=  new Sequence();this[_0x8c78[19]]= _0xe2f0xf[_0x8c78[20]];this[_0x8c78[21]]= _0xe2f0xf[_0x8c78[21]];this[_0x8c78[22]]= {};this[_0x8c78[23]]= _0xe2f0xf[_0x8c78[23]];this[_0x8c78[24]]= 0;ami[_0x8c78[28]](_0x8c78[25],this[_0x8c78[27]][_0x8c78[26]](this));ami[_0x8c78[28]](_0x8c78[29],this[_0x8c78[30]][_0x8c78[26]](this));ami[_0x8c78[28]](_0x8c78[31],this[_0x8c78[32]][_0x8c78[26]](this));ami[_0x8c78[28]](_0x8c78[33],this[_0x8c78[34]][_0x8c78[26]](this));ami[_0x8c78[28]](_0x8c78[35],this[_0x8c78[36]][_0x8c78[26]](this));ami[_0x8c78[28]](_0x8c78[37],this[_0x8c78[38]][_0x8c78[26]](this));this[_0x8c78[39]](this[_0x8c78[19]])}function emit(_0xe2f0x11,_0xe2f0x12,_0xe2f0x13){io[_0x8c78[41]](_0xe2f0x11)[_0x8c78[40]](_0xe2f0x12,_0xe2f0x13)}function emitCampaignPreview(_0xe2f0x13){if(_0xe2f0x13[_0x8c78[42]]=== _0x8c78[43]){emit(util[_0x8c78[46]](_0x8c78[44],_0xe2f0x13[_0x8c78[45]]),_0x8c78[47],_[_0x8c78[49]](_0xe2f0x13,[_0x8c78[48]]))}}function emitVoiceQueueChannelRemove(_0xe2f0x13){emit(util[_0x8c78[46]](_0x8c78[44],_0xe2f0x13[_0x8c78[45]]),_0x8c78[50],_0xe2f0x13)}function notSendMessagesQueue(_0xe2f0x17){if(_0xe2f0x17[_0x8c78[51]]){if(_0xe2f0x17[_0x8c78[52]]=== 0&& _0xe2f0x17[_0x8c78[53]]=== 0){_0xe2f0x17[_0x8c78[51]]= false;_0xe2f0x17[_0x8c78[54]]= 0;_0xe2f0x17[_0x8c78[55]]= 0;_0xe2f0x17[_0x8c78[56]]= _0x8c78[57];ut[_0x8c78[60]](_0x8c78[58],_0xe2f0x17[_0x8c78[45]]+ _0x8c78[59])}else {_0xe2f0x17[_0x8c78[56]]= _0x8c78[61];ut[_0x8c78[60]](_0x8c78[58],_0xe2f0x17[_0x8c78[45]]+ _0x8c78[62])};emitCampaignPreview(_0xe2f0x17)}}Preview[_0x8c78[15]][_0x8c78[39]]= function(){var _0xe2f0x18=this;setInterval(function(){_0xe2f0x18[_0x8c78[63]]()},1999)};Preview[_0x8c78[15]][_0x8c78[63]]= function(){var _0xe2f0x19=this[_0x8c78[19]];this[_0x8c78[24]]+= 1;for(var _0xe2f0x1a in _0xe2f0x19){if(_0xe2f0x19[_0x8c78[64]](_0xe2f0x1a)&& (_0xe2f0x19[_0xe2f0x1a][_0x8c78[65]]=== _0x8c78[6]|| _0xe2f0x19[_0xe2f0x1a][_0x8c78[65]]=== _0x8c78[66])&& _0xe2f0x19[_0xe2f0x1a][_0x8c78[42]]=== _0x8c78[43]){if(this[_0x8c78[24]]> 7){this[_0x8c78[24]]= 0;this[_0x8c78[67]]()}};if(_0xe2f0x19[_0x8c78[64]](_0xe2f0x1a)&& _0xe2f0x19[_0xe2f0x1a][_0x8c78[65]]=== _0x8c78[6]&& _0xe2f0x19[_0xe2f0x1a][_0x8c78[42]]=== _0x8c78[43]){if(_0xe2f0x19[_0xe2f0x1a][_0x8c78[68]]){this[_0x8c78[69]](_0xe2f0x19[_0xe2f0x1a]);this[_0x8c78[70]](_0xe2f0x19[_0xe2f0x1a])}else {notSendMessagesQueue(_0xe2f0x19[_0xe2f0x1a])}}}};Preview[_0x8c78[15]][_0x8c78[67]]= function(){var _0xe2f0x18=this;for(var _0xe2f0x1b in this[_0x8c78[22]]){if(_0xe2f0x18[_0x8c78[22]][_0x8c78[64]](_0xe2f0x1b)){this[_0x8c78[18]][_0x8c78[14]](function(){if(!_[_0x8c78[71]](_0xe2f0x18[_0x8c78[22]][_0xe2f0x1b])){return ami.Action({action:_0x8c78[81],channel:_0xe2f0x18[_0x8c78[22]][_0xe2f0x1b][_0x8c78[82]]})[_0x8c78[80]](function(_0xe2f0x1c){if(_0xe2f0x1c[_0x8c78[56]]=== _0x8c78[72]){setTimeout(function(){if(_0xe2f0x18[_0x8c78[22]][_0xe2f0x1b]){ut[_0x8c78[74]](_0xe2f0x18[_0x8c78[19]][_0xe2f0x18[_0x8c78[22]][_0xe2f0x1b][_0x8c78[73]]]);if(_0xe2f0x18[_0x8c78[22]][_0xe2f0x1b][_0x8c78[75]]=== true){ut[_0x8c78[76]](_0xe2f0x18[_0x8c78[19]][_0xe2f0x18[_0x8c78[22]][_0xe2f0x1b][_0x8c78[73]]]);ut[_0x8c78[78]](_0x8c78[77]+ _0xe2f0x1b,_0xe2f0x18[_0x8c78[22]][_0xe2f0x1b][_0x8c78[73]])};ut[_0x8c78[78]](_0x8c78[79]+ _0xe2f0x1b,_0xe2f0x18[_0x8c78[22]][_0xe2f0x1b][_0x8c78[73]]);delete _0xe2f0x18[_0x8c78[22]][_0xe2f0x1b]}},9000)}})}})}}};Preview[_0x8c78[15]][_0x8c78[70]]= function(_0xe2f0x17){var _0xe2f0x18=this;rpcDb[_0x8c78[107]](_0xe2f0x17[_0x8c78[91]],ut[_0x8c78[106]](this[_0x8c78[23]]))[_0x8c78[90]](function(_0xe2f0x1d){if(!_[_0x8c78[71]](_0xe2f0x1d)){for(var _0xe2f0x1e=0;_0xe2f0x1e< _0xe2f0x1d[_0x8c78[85]];_0xe2f0x1e+= 1){if(ut[_0x8c78[87]](_0xe2f0x1d[_0xe2f0x1e][_0x8c78[86]])< (_0xe2f0x17[_0x8c78[88]]* 60)){_0xe2f0x18[_0x8c78[92]](_0xe2f0x1d[_0xe2f0x1e][_0x8c78[91]])[_0x8c78[90]](ut[_0x8c78[84]](_0x8c78[89]))[_0x8c78[80]](ut[_0x8c78[84]](_0x8c78[89]))}else {var _0xe2f0x1f= new Action(_0xe2f0x1d[_0xe2f0x1e],_0xe2f0x17);_0xe2f0x1f[_0x8c78[93]]= moment()[_0x8c78[46]](_0x8c78[94]);_0xe2f0x17[_0x8c78[95]]+= 1;ut[_0x8c78[97]](_0xe2f0x1f,23,_0x8c78[96]);if(_0xe2f0x17[_0x8c78[98]]){rpcDb[_0x8c78[100]](ut[_0x8c78[99]](_0xe2f0x1d[_0xe2f0x1e]));rpcDb[_0x8c78[102]](_0xe2f0x1f,_0x8c78[101])}else {ut[_0x8c78[97]](_0xe2f0x1f,22,_0x8c78[103]);rpcDb[_0x8c78[102]](_0xe2f0x1f,_0x8c78[104]);rpcDb[_0x8c78[105]](_0xe2f0x1f,_0x8c78[104])}}}}})[_0x8c78[80]](ut[_0x8c78[84]](_0x8c78[83]))};Preview[_0x8c78[15]][_0x8c78[69]]= function(_0xe2f0x17){_0xe2f0x17[_0x8c78[51]]= true;if(ut.IsNotLoggedIn(_0xe2f0x17[_0x8c78[108]])){_0xe2f0x17[_0x8c78[56]]= _0x8c78[109]}else {if(!ut[_0x8c78[110]](_0xe2f0x17[_0x8c78[68]])){_0xe2f0x17[_0x8c78[56]]= _0x8c78[57]}else {if(!this[_0x8c78[111]](_0xe2f0x17.Trunk)){if(!this[_0x8c78[111]](_0xe2f0x17.TrunkBackup)){_0xe2f0x17[_0x8c78[56]]= _0x8c78[112]}else {_0xe2f0x17[_0x8c78[56]]= _0x8c78[113]}}else {_0xe2f0x17[_0x8c78[56]]= _0x8c78[113]}}};emitCampaignPreview(_0xe2f0x17)};Preview[_0x8c78[15]][_0x8c78[114]]= function(_0xe2f0x12,_0xe2f0x20,_0xe2f0x21){var _0xe2f0x18=this;var _0xe2f0x1f=this[_0x8c78[22]][_0xe2f0x20];var _0xe2f0x17=this[_0x8c78[19]][_0xe2f0x1f[_0x8c78[73]]];var _0xe2f0x22;if(_0xe2f0x17){switch(_0xe2f0x21){case _0x8c78[125]:_0xe2f0x17[_0x8c78[115]]+= 1;_0xe2f0x1f[_0x8c78[116]]= ut[_0x8c78[117]](_0xe2f0x1f);ut[_0x8c78[97]](_0xe2f0x1f,0,_0x8c78[118]);rpcDb[_0x8c78[102]](_0xe2f0x1f,_0x8c78[119]);if(ut[_0x8c78[117]](_0xe2f0x1f)>= _0xe2f0x17[_0x8c78[120]]){_0xe2f0x22= ut[_0x8c78[122]](_0xe2f0x1f,15,_0x8c78[121]);rpcDb[_0x8c78[105]](_0xe2f0x22,_0x8c78[123])}else {rpcDb[_0x8c78[105]](_0xe2f0x1f,_0x8c78[123])};delete this[_0x8c78[22]][_0xe2f0x12[_0x8c78[124]]];break;case _0x8c78[131]:var _0xe2f0x23=moment()[_0x8c78[46]](_0x8c78[94]);_0xe2f0x1f[_0x8c78[126]]= _0xe2f0x23;_0xe2f0x1f[_0x8c78[127]]= _0xe2f0x23;_0xe2f0x1f[_0x8c78[75]]= true;_0xe2f0x17[_0x8c78[53]]+= 1;ami[_0x8c78[40]](_0x8c78[128],ut[_0x8c78[130]](_0xe2f0x1f,_0x8c78[129]));break;case _0x8c78[144]:ami[_0x8c78[40]](_0x8c78[132],ut[_0x8c78[130]](_0xe2f0x1f,_0x8c78[133]));emitVoiceQueueChannelRemove(ut[_0x8c78[130]](_0xe2f0x1f,_0x8c78[133]));_0xe2f0x17[_0x8c78[134]]+= 1;_0xe2f0x17[_0x8c78[135]]+= 1;_0xe2f0x17[_0x8c78[136]]+= 1;ut[_0x8c78[76]](_0xe2f0x17);_0xe2f0x1f[_0x8c78[116]]= ut[_0x8c78[117]](_0xe2f0x1f);ut[_0x8c78[97]](_0xe2f0x1f,4,_0x8c78[137]);rpcDb[_0x8c78[102]](_0xe2f0x1f,_0x8c78[138]);rpcDb[_0x8c78[105]](_0xe2f0x1f,_0x8c78[139]);rpcDb[_0x8c78[140]](_0xe2f0x1f);_0xe2f0x17[_0x8c78[141]]+= _0xe2f0x1f[_0x8c78[142]];_0xe2f0x17[_0x8c78[143]]+= _0xe2f0x1f[_0x8c78[142]];delete this[_0x8c78[22]][_0xe2f0x12[_0x8c78[124]]];break;case _0x8c78[156]:_0xe2f0x17[_0x8c78[145]]+= 1;_0xe2f0x1f[_0x8c78[146]]+= 1;_0xe2f0x1f[_0x8c78[116]]= ut[_0x8c78[117]](_0xe2f0x1f);ut[_0x8c78[97]](_0xe2f0x1f,5,_0x8c78[147]);rpcDb[_0x8c78[102]](_0xe2f0x1f,_0x8c78[148]);if(ut[_0x8c78[117]](_0xe2f0x1f)>= _0xe2f0x17[_0x8c78[120]]){_0xe2f0x22= ut[_0x8c78[122]](_0xe2f0x1f,15,_0x8c78[121]);rpcDb[_0x8c78[105]](_0xe2f0x22,_0x8c78[149])}else {if(_0xe2f0x1f[_0x8c78[146]]>= _0xe2f0x17[_0x8c78[150]]){rpcDb[_0x8c78[105]](_0xe2f0x1f,_0x8c78[148])}else {rpcDb[_0x8c78[155]](ut[_0x8c78[152]](_0xe2f0x1f,_0x8c78[146],_0xe2f0x17[_0x8c78[151]]),_0xe2f0x1f[_0x8c78[153]],_0xe2f0x1f[_0x8c78[154]])}};break;case _0x8c78[164]:_0xe2f0x17[_0x8c78[157]]+= 1;_0xe2f0x1f[_0x8c78[158]]+= 1;_0xe2f0x1f[_0x8c78[116]]= ut[_0x8c78[117]](_0xe2f0x1f);ut[_0x8c78[97]](_0xe2f0x1f,3,_0x8c78[159]);rpcDb[_0x8c78[102]](_0xe2f0x1f,_0x8c78[160]);if(ut[_0x8c78[117]](_0xe2f0x1f)>= _0xe2f0x17[_0x8c78[120]]){_0xe2f0x22= ut[_0x8c78[122]](_0xe2f0x1f,15,_0x8c78[121]);rpcDb[_0x8c78[105]](_0xe2f0x22,_0x8c78[161])}else {if(_0xe2f0x1f[_0x8c78[158]]>= _0xe2f0x17[_0x8c78[162]]){rpcDb[_0x8c78[105]](_0xe2f0x1f,_0x8c78[160])}else {rpcDb[_0x8c78[155]](ut[_0x8c78[152]](_0xe2f0x1f,_0x8c78[158],_0xe2f0x17[_0x8c78[163]]),_0xe2f0x1f[_0x8c78[153]],_0xe2f0x1f[_0x8c78[154]])}};break;case _0x8c78[171]:_0xe2f0x17[_0x8c78[165]]+= 1;_0xe2f0x1f[_0x8c78[166]]+= 1;_0xe2f0x1f[_0x8c78[116]]= ut[_0x8c78[117]](_0xe2f0x1f);ut[_0x8c78[97]](_0xe2f0x1f,8,_0x8c78[167]);rpcDb[_0x8c78[102]](_0xe2f0x1f,_0x8c78[168]);if(ut[_0x8c78[117]](_0xe2f0x1f)>= _0xe2f0x17[_0x8c78[120]]){_0xe2f0x22= ut[_0x8c78[122]](_0xe2f0x1f,15,_0x8c78[121]);rpcDb[_0x8c78[105]](_0xe2f0x22,_0x8c78[169])}else {if(_0xe2f0x1f[_0x8c78[166]]>= _0xe2f0x17[_0x8c78[170]]){rpcDb[_0x8c78[105]](_0xe2f0x1f,_0x8c78[168])}else {rpcDb[_0x8c78[155]](ut[_0x8c78[152]](_0xe2f0x1f,_0x8c78[166],_0xe2f0x17[_0x8c78[151]]),_0xe2f0x1f[_0x8c78[153]],_0xe2f0x1f[_0x8c78[154]])}};break;case _0x8c78[178]:_0xe2f0x17[_0x8c78[172]]+= 1;_0xe2f0x1f[_0x8c78[116]]= ut[_0x8c78[117]](_0xe2f0x1f);ut[_0x8c78[97]](_0xe2f0x1f,20,_0x8c78[173]);rpcDb[_0x8c78[102]](_0xe2f0x1f,_0x8c78[174]);if(_0xe2f0x1f[_0x8c78[153]]){rpcDb[_0x8c78[176]](_0xe2f0x1f[_0x8c78[175]])};if(_0xe2f0x1f[_0x8c78[154]]){rpcDb[_0x8c78[177]](_0xe2f0x1f[_0x8c78[175]])};break;default:if(_0xe2f0x1f[_0x8c78[75]]){ut[_0x8c78[76]](_0xe2f0x17);ut[_0x8c78[78]](_0x8c78[179]+ _0xe2f0x17[_0x8c78[45]],_0xe2f0x12)};_0xe2f0x17[_0x8c78[180]]+= 1;_0xe2f0x1f[_0x8c78[116]]= ut[_0x8c78[117]](_0xe2f0x1f);ut[_0x8c78[97]](_0xe2f0x1f,12,_0xe2f0x12[_0x8c78[181]]|| _0xe2f0x12[_0x8c78[182]]);rpcDb[_0x8c78[102]](_0xe2f0x1f,_0x8c78[183]);if(ut[_0x8c78[117]](_0xe2f0x1f)>= _0xe2f0x17[_0x8c78[120]]){_0xe2f0x22= ut[_0x8c78[122]](_0xe2f0x1f,15,_0x8c78[121]);rpcDb[_0x8c78[105]](_0xe2f0x22,_0x8c78[184])}else {rpcDb[_0x8c78[105]](_0xe2f0x1f,_0x8c78[184])};delete this[_0x8c78[22]][_0xe2f0x12[_0x8c78[124]]]};if(!(_0xe2f0x1f[_0x8c78[75]]&& _0xe2f0x21=== _0x8c78[144])){ut[_0x8c78[74]](_0xe2f0x17)};if(_0xe2f0x21!== _0x8c78[131]){delete this[_0x8c78[22]][_0xe2f0x12[_0x8c78[124]]];delete this[_0x8c78[22]][_0xe2f0x12[_0x8c78[185]]]}}};Preview[_0x8c78[15]][_0x8c78[186]]= function(_0xe2f0x1f,_0xe2f0x17,_0xe2f0x12){if(_[_0x8c78[187]](_0xe2f0x17)&& _0x8c78[188]!==  typeof _0xe2f0x17){return};if(_[_0x8c78[187]](_0xe2f0x12)&& _0x8c78[188]!==  typeof _0xe2f0x12){return};switch(_0xe2f0x12[_0x8c78[202]]){case _0x8c78[192]:ut[_0x8c78[189]](_0xe2f0x1f,0,_0x8c78[118]);rpcDb[_0x8c78[191]](_0xe2f0x1f,_0x8c78[190]);break;case _0x8c78[194]:ut[_0x8c78[189]](_0xe2f0x1f,3,_0x8c78[159]);rpcDb[_0x8c78[191]](_0xe2f0x1f,_0x8c78[193]);break;case _0x8c78[196]:ut[_0x8c78[189]](_0xe2f0x1f,5,_0x8c78[147]);rpcDb[_0x8c78[191]](_0xe2f0x1f,_0x8c78[195]);break;case _0x8c78[198]:ut[_0x8c78[189]](_0xe2f0x1f,8,_0x8c78[167]);rpcDb[_0x8c78[191]](_0xe2f0x1f,_0x8c78[197]);break;case _0x8c78[201]:ut[_0x8c78[189]](_0xe2f0x1f,22,_0x8c78[199]);rpcDb[_0x8c78[191]](_0xe2f0x1f,_0x8c78[200]);break;default:ut[_0x8c78[189]](_0xe2f0x1f,12,_0xe2f0x12[_0x8c78[202]]);rpcDb[_0x8c78[191]](_0xe2f0x1f,_0x8c78[197])};ut[_0x8c78[74]](_0xe2f0x17);delete this[_0x8c78[22]][_0xe2f0x1f[_0x8c78[203]]]};Preview[_0x8c78[15]][_0x8c78[204]]= function(_0xe2f0x24,_0xe2f0x25,_0xe2f0x26,_0xe2f0x27,_0xe2f0x28){var _0xe2f0x18=this;return  new BPromise(function(_0xe2f0x29,_0xe2f0x2a){if(_[_0x8c78[71]](_0xe2f0x25)|| _[_0x8c78[71]](_0xe2f0x25.Contact)|| _[_0x8c78[71]](_0xe2f0x25[_0x8c78[206]][_0x8c78[205]])|| _[_0x8c78[71]](_0xe2f0x25.VoiceQueueId)){_0xe2f0x2a(ut[_0x8c78[56]](_0x8c78[207],_0xe2f0x27,_0xe2f0x28));return};var _0xe2f0x20=uuid[_0x8c78[208]]();var _0xe2f0x17=_0xe2f0x18[_0x8c78[19]][_0xe2f0x25[_0x8c78[209]][_0x8c78[45]]];var _0xe2f0x2b=_0xe2f0x26?_0xe2f0x18[_0x8c78[23]][_0xe2f0x26][_0x8c78[91]]:undefined;_0xe2f0x18[_0x8c78[22]][_0xe2f0x20]=  new Action(_0xe2f0x25,_0xe2f0x17,_0xe2f0x20,_0xe2f0x26,_0xe2f0x2b);var _0xe2f0x1f=_0xe2f0x18[_0x8c78[22]][_0xe2f0x20];_0xe2f0x1f[_0x8c78[153]]= _0xe2f0x27;_0xe2f0x1f[_0x8c78[154]]= _0xe2f0x28;_0xe2f0x1f[_0x8c78[210]]= _0xe2f0x26;if(_[_0x8c78[211]](_0xe2f0x24)){_0xe2f0x18[_0x8c78[218]](_0xe2f0x1f,_0xe2f0x17,_0xe2f0x25,_0xe2f0x26)[_0x8c78[90]](function(_0xe2f0x1d){ut[_0x8c78[60]](_0x8c78[214],_0xe2f0x1d);ami[_0x8c78[40]](_0x8c78[215],ut[_0x8c78[130]](_0xe2f0x1f,_0x8c78[216]));_0xe2f0x29(ut[_0x8c78[56]](_0x8c78[217]))})[_0x8c78[80]](function(_0xe2f0x1c){ut[_0x8c78[60]](_0x8c78[212],_0xe2f0x1c);_0xe2f0x2a(ut[_0x8c78[56]](_0x8c78[213],_0xe2f0x27,_0xe2f0x28))})}else {_0xe2f0x17[_0x8c78[219]]+= 1;ut[_0x8c78[220]](_0xe2f0x1f);rpcDb[_0x8c78[222]](_0xe2f0x1f,_0x8c78[221]);delete _0xe2f0x18[_0x8c78[22]][_0xe2f0x20];_0xe2f0x2a(ut[_0x8c78[56]](_0x8c78[223],_0xe2f0x27,_0xe2f0x28))}})};Preview[_0x8c78[15]][_0x8c78[111]]= function(_0xe2f0x2c){return !_[_0x8c78[71]](_0xe2f0x2c)&&  !_[_0x8c78[71]](_0xe2f0x2c[_0x8c78[45]]) &&  !_[_0x8c78[71]](_0xe2f0x2c[_0x8c78[224]]) && _0xe2f0x2c[_0x8c78[224]] &&  !_[_0x8c78[71]](this[_0x8c78[21]][util[_0x8c78[46]](_0x8c78[225],_0xe2f0x2c[_0x8c78[45]])]) &&  !_[_0x8c78[71]](this[_0x8c78[21]][util[_0x8c78[46]](_0x8c78[225],_0xe2f0x2c[_0x8c78[45]])][_0x8c78[81]]) && (this[_0x8c78[21]][util[_0x8c78[46]](_0x8c78[225],_0xe2f0x2c[_0x8c78[45]])][_0x8c78[81]]=== _0x8c78[226]|| this[_0x8c78[21]][util[_0x8c78[46]](_0x8c78[225],_0xe2f0x2c[_0x8c78[45]])][_0x8c78[81]]=== _0x8c78[227])};Preview[_0x8c78[15]][_0x8c78[92]]= function(_0xe2f0x2d,_0xe2f0x26){var _0xe2f0x18=this;return  new BPromise(function(_0xe2f0x29,_0xe2f0x2a){_0xe2f0x18[_0x8c78[230]](_0xe2f0x2d,_0xe2f0x26)[_0x8c78[90]](function(_0xe2f0x1d){_0xe2f0x29(_[_0x8c78[229]](_0xe2f0x1d,[_0x8c78[56]]))})[_0x8c78[80]](function(_0xe2f0x1c){if(_0xe2f0x1c[_0x8c78[228]]){rpcDb[_0x8c78[176]](_0xe2f0x2d)};if(_0xe2f0x1c[_0x8c78[224]]){rpcDb[_0x8c78[177]](_0xe2f0x2d)};_0xe2f0x2a(_[_0x8c78[229]](_0xe2f0x1c,[_0x8c78[56]]))})})};Preview[_0x8c78[15]][_0x8c78[230]]= function(_0xe2f0x2d,_0xe2f0x26){var _0xe2f0x18=this;return  new BPromise(function(_0xe2f0x29,_0xe2f0x2a){var _0xe2f0x28,_0xe2f0x27;rpcDb[_0x8c78[240]](_0xe2f0x2d)[_0x8c78[90]](function(_0xe2f0x1d){if(!_[_0x8c78[71]](_0xe2f0x1d[0])){_0xe2f0x27= _0xe2f0x1d[0][_0x8c78[233]]?false:true;_0xe2f0x28= _0xe2f0x1d[0][_0x8c78[233]]?true:false;_0xe2f0x28= _0xe2f0x26?true:_0xe2f0x28};var _0xe2f0x25=_0xe2f0x18[_0x8c78[234]](_0xe2f0x1d);if(_0xe2f0x25[_0x8c78[235]]){rpcDb[_0x8c78[239]](_[_0x8c78[229]](_0xe2f0x1d[0],[_0x8c78[237],_0x8c78[238]]))[_0x8c78[90]](function(_0xe2f0x24){_0xe2f0x18[_0x8c78[204]](_0xe2f0x24,_0xe2f0x1d[0],_0xe2f0x26,_0xe2f0x27,_0xe2f0x28)[_0x8c78[90]](function(_0xe2f0x30){_0xe2f0x29(_0xe2f0x30)})[_0x8c78[80]](function(_0xe2f0x2f){_0xe2f0x2a(_0xe2f0x2f)})})[_0x8c78[80]](function(_0xe2f0x2e){ut[_0x8c78[60]](_0x8c78[236],_0xe2f0x2e);_0xe2f0x2a(ut[_0x8c78[56]](_0x8c78[232],_0xe2f0x27,_0xe2f0x28))})}else {_0xe2f0x2a(ut[_0x8c78[56]](_0xe2f0x25[_0x8c78[56]],_0xe2f0x27,_0xe2f0x28))}})[_0x8c78[80]](function(_0xe2f0x1c){ut[_0x8c78[60]](_0x8c78[231],_0xe2f0x1c);_0xe2f0x2a(ut[_0x8c78[56]](_0x8c78[232],false,true))})})};Preview[_0x8c78[15]][_0x8c78[234]]= function(_0xe2f0x25){if(_[_0x8c78[71]](_0xe2f0x25)|| _[_0x8c78[211]](_0xe2f0x25)|| (!_[_0x8c78[71]](_0xe2f0x25[0].Agent)&& _[_0x8c78[71]](_0xe2f0x25[0][_0x8c78[241]][_0x8c78[45]]))){ut[_0x8c78[60]](_0x8c78[242],_0xe2f0x25);return {isValid:false,message:_0x8c78[243]}};var _0xe2f0x17=this[_0x8c78[19]][_0xe2f0x25[0][_0x8c78[209]][_0x8c78[45]]];_0xe2f0x17[_0x8c78[56]]= _0x8c78[113];if(_[_0x8c78[71]](_0xe2f0x17)){ut[_0x8c78[60]](_0x8c78[244],_0xe2f0x17);return {isValid:false,message:_0x8c78[245]}};if(!this[_0x8c78[111]](_0xe2f0x17.Trunk)){ut[_0x8c78[60]](_0x8c78[246],_0x8c78[247]+ _0xe2f0x17[_0x8c78[45]]+ _0x8c78[248]);if(!this[_0x8c78[111]](_0xe2f0x17.TrunkBackup)){ut[_0x8c78[60]](_0x8c78[246],_0xe2f0x17[_0x8c78[45]]+ _0x8c78[249]);return {isValid:false,message:_0x8c78[250]}}};if(!ut[_0x8c78[110]](_0xe2f0x17[_0x8c78[68]])){ut[_0x8c78[60]](_0x8c78[251],_0xe2f0x17[_0x8c78[45]]+ _0x8c78[252]);return {isValid:false,message:_0x8c78[247]+ _0xe2f0x17[_0x8c78[45]]+ _0x8c78[252]}};return {isValid:true,message:_0x8c78[253]}};Preview[_0x8c78[15]][_0x8c78[218]]= function(_0xe2f0x1f,_0xe2f0x17,_0xe2f0x25,_0xe2f0x26){var _0xe2f0x18=this;return  new BPromise(function(_0xe2f0x29,_0xe2f0x2a){var _0xe2f0x31=_0xe2f0x1f[_0x8c78[203]];var _0xe2f0x32=(_0xe2f0x18[_0x8c78[111]](_0xe2f0x17.Trunk))?util[_0x8c78[46]](_0x8c78[254],_0xe2f0x17[_0x8c78[255]][_0x8c78[45]],_[_0x8c78[71]](_0xe2f0x17[_0x8c78[256]])?_0x8c78[257]:_0xe2f0x17[_0x8c78[256]][_0x8c78[258]]()|| _0x8c78[257],_0xe2f0x25[_0x8c78[206]][_0x8c78[205]]):util[_0x8c78[46]](_0x8c78[254],_[_0x8c78[71]](_0xe2f0x17.TrunkBackup)?_0xe2f0x17[_0x8c78[255]][_0x8c78[45]]:_0xe2f0x17[_0x8c78[259]][_0x8c78[45]],_[_0x8c78[71]](_0xe2f0x17[_0x8c78[256]])?_0x8c78[257]:_0xe2f0x17[_0x8c78[256]][_0x8c78[258]]()|| _0x8c78[257],_0xe2f0x25[_0x8c78[206]][_0x8c78[205]]);var _0xe2f0x33=(_0xe2f0x18[_0x8c78[111]](_0xe2f0x17.Trunk))?ut[_0x8c78[263]](_0xe2f0x17[_0x8c78[255]][_0x8c78[260]],_0xe2f0x17[_0x8c78[261]],_0xe2f0x17[_0x8c78[262]]):ut[_0x8c78[263]](_[_0x8c78[71]](_0xe2f0x17.TrunkBackup)?_0xe2f0x17[_0x8c78[255]][_0x8c78[260]]:_0xe2f0x17[_0x8c78[259]][_0x8c78[260]],_0xe2f0x17[_0x8c78[261]],_0xe2f0x17[_0x8c78[262]]);var _0xe2f0x34=ut[_0x8c78[264]](_0xe2f0x17,_0xe2f0x25,_0xe2f0x32,_0xe2f0x33,_0xe2f0x31);_[_0x8c78[266]](_0xe2f0x1f,ut[_0x8c78[265]](_0xe2f0x34));_0xe2f0x1f[_0x8c78[93]]= moment()[_0x8c78[46]](_0x8c78[94]);ami.Action(ut[_0x8c78[269]](_0xe2f0x1f,_0xe2f0x17,_0xe2f0x34,_0xe2f0x1f[_0x8c78[154]],_0xe2f0x26))[_0x8c78[90]](function(_0xe2f0x1d){_0xe2f0x17[_0x8c78[52]]+= 1;_0xe2f0x29(_0xe2f0x1d)})[_0x8c78[80]](function(_0xe2f0x1c){ut[_0x8c78[189]](_0xe2f0x1f,14,_0x8c78[267]);rpcDb[_0x8c78[191]](_0xe2f0x1f,_0x8c78[268]);_0xe2f0x2a(_0xe2f0x1c)})})};Preview[_0x8c78[15]][_0x8c78[36]]= function(_0xe2f0x12){if(this[_0x8c78[22]][_0xe2f0x12[_0x8c78[124]]]){this[_0x8c78[22]][_0xe2f0x12[_0x8c78[124]]][_0x8c78[82]]= _0xe2f0x12[_0x8c78[82]]}};Preview[_0x8c78[15]][_0x8c78[27]]= function(_0xe2f0x12){var _0xe2f0x18=this;var _0xe2f0x1f=this[_0x8c78[22]][_0xe2f0x12[_0x8c78[270]]];if(_0xe2f0x1f){if(_0xe2f0x1f[_0x8c78[210]]&& this[_0x8c78[23]][_0xe2f0x1f[_0x8c78[210]]]){ut[_0x8c78[271]](_0xe2f0x1f,this[_0x8c78[23]][_0xe2f0x1f[_0x8c78[210]]][_0x8c78[45]],this[_0x8c78[23]][_0xe2f0x1f[_0x8c78[210]]][_0x8c78[91]])};var _0xe2f0x22=_[_0x8c78[272]](_0xe2f0x1f);_0xe2f0x22[_0x8c78[126]]= moment()[_0x8c78[46]](_0x8c78[94]);var _0xe2f0x17=_0xe2f0x18[_0x8c78[19]][_0xe2f0x1f[_0x8c78[73]]];if(ut[_0x8c78[274]](_0xe2f0x12[_0x8c78[273]])){if(_0xe2f0x1f[_0x8c78[153]]){rpcDb[_0x8c78[176]](_0xe2f0x1f[_0x8c78[175]])};if(_0xe2f0x1f[_0x8c78[154]]){rpcDb[_0x8c78[177]](_0xe2f0x1f[_0x8c78[175]])};ami[_0x8c78[40]](_0x8c78[275],ut[_0x8c78[130]](_0xe2f0x1f,_0x8c78[276]));this[_0x8c78[186]](_0xe2f0x22,_0xe2f0x17,_0xe2f0x12)}else {_0xe2f0x1f[_0x8c78[93]]= moment()[_0x8c78[46]](_0x8c78[94]);ut[_0x8c78[189]](_0xe2f0x22,4,_0x8c78[137]);rpcDb[_0x8c78[191]](_0xe2f0x22,_0x8c78[277])}}};Preview[_0x8c78[15]][_0x8c78[30]]= function(_0xe2f0x12){var _0xe2f0x18=this;var _0xe2f0x1f=this[_0x8c78[22]][_0xe2f0x12[_0x8c78[124]]];var _0xe2f0x17;if(_0xe2f0x1f){_0xe2f0x17= this[_0x8c78[19]][_0xe2f0x1f[_0x8c78[73]]]};if(this[_0x8c78[22]][_0xe2f0x12[_0x8c78[124]]]&& _0xe2f0x12[_0x8c78[124]]!== _0xe2f0x12[_0x8c78[203]]){if(_0xe2f0x12[_0x8c78[278]]=== _0x8c78[144]&& this[_0x8c78[22]][_0xe2f0x12[_0x8c78[124]]][_0x8c78[75]]){this[_0x8c78[114]](_0xe2f0x12,_0xe2f0x12[_0x8c78[124]],_0xe2f0x12[_0x8c78[278]])}}else {if(_0xe2f0x1f&& _[_0x8c78[71]](_0xe2f0x1f[_0x8c78[279]])&& _0xe2f0x17[_0x8c78[280]]&& _0xe2f0x12[_0x8c78[124]]=== _0xe2f0x12[_0x8c78[203]]&& _[_0x8c78[71]](_0xe2f0x12[_0x8c78[202]])&& _0xe2f0x12[_0x8c78[278]]=== _0x8c78[144]&& _0xe2f0x12[_0x8c78[281]]=== _0x8c78[282]){if(_0xe2f0x1f[_0x8c78[153]]){rpcDb[_0x8c78[176]](_0xe2f0x1f[_0x8c78[175]])};if(_0xe2f0x1f[_0x8c78[154]]){rpcDb[_0x8c78[177]](_0xe2f0x1f[_0x8c78[175]])};_0xe2f0x12[_0x8c78[202]]= _0x8c78[201];this[_0x8c78[186]](_0xe2f0x1f,_0xe2f0x17,_0xe2f0x12)}}};Preview[_0x8c78[15]][_0x8c78[34]]= function(_0xe2f0x12){if(this[_0x8c78[22]][_0xe2f0x12[_0x8c78[185]]]&& _0xe2f0x12[_0x8c78[185]]!== _0xe2f0x12[_0x8c78[283]]){this[_0x8c78[114]](_0xe2f0x12,_0xe2f0x12[_0x8c78[185]],_0xe2f0x12[_0x8c78[182]])}};Preview[_0x8c78[15]][_0x8c78[32]]= function(_0xe2f0x12){if(this[_0x8c78[22]][_0xe2f0x12[_0x8c78[124]]]&& _0xe2f0x12[_0x8c78[124]]!== _0xe2f0x12[_0x8c78[203]]&&  !this[_0x8c78[22]][_0xe2f0x12[_0x8c78[124]]][_0x8c78[75]]){if(_0xe2f0x12[_0x8c78[278]]=== _0x8c78[125]){this[_0x8c78[114]](_0xe2f0x12,_0xe2f0x12[_0x8c78[124]],_0xe2f0x12[_0x8c78[278]])}}};Preview[_0x8c78[15]][_0x8c78[284]]= function(_0xe2f0x1b,_0xe2f0x35,_0xe2f0x36){if(this[_0x8c78[22]][_0xe2f0x1b]){if(_[_0x8c78[71]](this[_0x8c78[22]][_0xe2f0x1b][_0x8c78[285]])){this[_0x8c78[22]][_0xe2f0x1b][_0x8c78[285]]= {}};this[_0x8c78[22]][_0xe2f0x1b][_0x8c78[285]][_0xe2f0x35]= _0xe2f0x36}};Preview[_0x8c78[15]][_0x8c78[38]]= function(_0xe2f0x12){try{if(!_[_0x8c78[71]](_0xe2f0x12)){if(ut[_0x8c78[288]](_[_0x8c78[287]](_0xe2f0x12[_0x8c78[286]])[0])){this[_0x8c78[284]](_0xe2f0x12[_0x8c78[203]],_[_0x8c78[287]](_0xe2f0x12[_0x8c78[286]])[0],_0xe2f0x12[_0x8c78[289]])}}}catch(e){logger[_0x8c78[292]](_0x8c78[290],util[_0x8c78[291]](e,{showHidden:false,depth:null}))}};module[_0x8c78[293]]= Preview
\ No newline at end of file
+var _0x50af=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x75\x69\x64","\x6D\x6F\x6D\x65\x6E\x74","\x70\x72\x65\x76\x69\x65\x77","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x6D\x69","\x2E\x2F\x72\x70\x63\x44\x62","\x2E\x2F\x61\x63\x74\x69\x6F\x6E","\x2E\x2F\x75\x74\x69\x6C\x2F\x75\x74\x69\x6C","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x65\x6E\x71\x75\x65\x75\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x74\x61\x69\x6C","\x66\x69\x6E\x61\x6C\x6C\x79","\x73\x65\x71\x75\x65\x6E\x63\x65","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73\x50\x72\x65\x76\x69\x65\x77","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x74\x72\x75\x6E\x6B\x73","\x61\x63\x74\x69\x6F\x6E\x73","\x61\x67\x65\x6E\x74\x73","\x63\x6C\x6F\x63\x6B\x43\x6C\x65\x61\x72\x5A\x6F\x6D\x62\x69\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x72\x65\x73\x70\x6F\x6E\x73\x65","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x52\x65\x73\x70\x6F\x6E\x73\x65","\x6F\x6E","\x68\x61\x6E\x67\x75\x70","\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70","\x68\x61\x6E\x67\x75\x70\x72\x65\x71\x75\x65\x73\x74","\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x52\x65\x71\x75\x65\x73\x74","\x64\x69\x61\x6C\x65\x6E\x64","\x73\x79\x6E\x63\x44\x69\x61\x6C\x45\x6E\x64","\x6E\x65\x77\x65\x78\x74\x65\x6E","\x73\x79\x6E\x63\x4E\x65\x77\x45\x78\x74\x65\x6E","\x76\x61\x72\x73\x65\x74","\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74","\x6C\x6F\x6F\x70\x43\x61\x6D\x70\x61\x69\x67\x6E\x73","\x65\x6D\x69\x74","\x74\x6F","\x74\x79\x70\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x76\x6F\x69\x63\x65\x3A\x71\x75\x65\x75\x65\x3A\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x68\x61\x6E\x64\x6C\x65\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65","\x6F\x6D\x69\x74","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x3A\x72\x65\x6D\x6F\x76\x65","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65\x4F\x6E\x65\x4E\x6F\x74\x41\x63\x74\x69\x76\x65","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x64","\x70\x54\x61\x6C\x6B\x69\x6E\x67","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x70\x61\x75\x73\x65\x64","\x6D\x65\x73\x73\x61\x67\x65","\x4E\x4F\x54\x5F\x41\x43\x54\x49\x56\x45","\x5B\x43\x61\x6D\x70\x61\x69\x67\x6E\x50\x72\x65\x76\x69\x65\x77\x5D\x20\x43\x61\x6D\x70\x61\x69\x67\x6E\x20\x51\x75\x65\x75\x65\x3A\x20","\x20\x69\x73\x20\x6E\x6F\x74\x20\x61\x63\x74\x69\x76\x65","\x6C\x6F\x67\x67\x65\x72","\x49\x53\x5F\x44\x49\x53\x41\x43\x54\x49\x56\x45\x44","\x20\x69\x73\x20\x64\x69\x73\x61\x63\x74\x69\x76\x65","\x73\x79\x6E\x63\x43\x61\x6D\x70\x61\x69\x67\x6E\x73","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x64\x69\x61\x6C\x4D\x65\x74\x68\x6F\x64","\x62\x6F\x6F\x6B\x65\x64","\x63\x6C\x65\x61\x72\x5A\x6F\x6D\x62\x69\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x64\x69\x61\x6C\x41\x63\x74\x69\x76\x65","\x73\x65\x74\x4D\x65\x73\x73\x61\x67\x65","\x72\x65\x63\x61\x6C\x6C\x4D\x65","\x69\x73\x4E\x69\x6C","\x4E\x6F\x20\x73\x75\x63\x68\x20\x63\x68\x61\x6E\x6E\x65\x6C","\x71\x75\x65\x75\x65","\x75\x70\x64\x61\x74\x65\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x64","\x64\x69\x61\x6C\x41\x6E\x73\x77\x65\x72","\x64\x65\x63\x72\x65\x6D\x65\x6E\x74\x54\x61\x6C\x6B\x69\x6E\x6B","\x5B\x44\x69\x61\x6C\x65\x72\x5D\x5B\x63\x68\x65\x63\x6B\x43\x68\x61\x6E\x6E\x65\x6C\x5D\x5B\x70\x54\x61\x6C\x6B\x69\x6E\x67\x5D\x5B\x50\x72\x65\x76\x69\x65\x77\x5D","\x6C\x6F\x67\x67\x65\x72\x45\x72\x72\x6F\x72","\x5B\x44\x69\x61\x6C\x65\x72\x5D\x5B\x63\x68\x65\x63\x6B\x43\x68\x61\x6E\x6E\x65\x6C\x5D\x5B\x50\x72\x65\x76\x69\x65\x77\x5D","\x63\x61\x74\x63\x68","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x5B\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x52\x65\x63\x61\x6C\x6C\x4D\x65\x5D","\x6C\x6F\x67\x67\x65\x72\x32","\x6C\x65\x6E\x67\x74\x68","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x67\x65\x74\x44\x69\x66\x66","\x64\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x4D\x65\x54\x69\x6D\x65\x6F\x75\x74","\x5B\x52\x65\x63\x61\x6C\x6C\x4D\x65\x5D","\x74\x68\x65\x6E","\x69\x64","\x72\x75\x6E","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x52\x65\x43\x61\x6C\x6C\x73\x44\x61\x79","\x52\x65\x63\x61\x6C\x6C\x49\x6E\x51\x75\x65\x75\x65","\x6C\x6F\x67\x43\x75\x73\x74\x6F\x6D\x65\x72","\x64\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x49\x6E\x51\x75\x65\x75\x65","\x63\x72\x65\x61\x74\x65\x42\x6F\x64\x79","\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74\x49\x6E\x51\x75\x65\x75\x65","\x5B\x48\x69\x73\x74\x6F\x72\x79\x44\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x49\x6E\x51\x75\x65\x75\x65\x5D\x5B\x68\x69\x73\x74\x6F\x72\x79\x43\x61\x74\x63\x68\x5D","\x63\x72\x65\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x52\x65\x63\x61\x6C\x6C\x46\x61\x69\x6C\x65\x64\x54\x69\x6D\x65\x6F\x75\x74","\x5B\x48\x69\x73\x74\x6F\x72\x79\x52\x65\x63\x61\x6C\x6C\x43\x6C\x6F\x73\x65\x5D","\x63\x72\x65\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x65\x72\x46\x69\x6E\x61\x6C","\x61\x67\x65\x6E\x74\x52\x65\x61\x64\x79\x49\x64","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x52\x65\x63\x61\x6C\x6C\x4D\x65","\x6C\x6F\x67\x67\x65\x64\x49\x6E","\x41\x47\x45\x4E\x54\x53\x5F\x4E\x4F\x54\x5F\x4C\x4F\x47\x47\x45\x44","\x69\x73\x41\x63\x74\x69\x76\x65","\x69\x73\x54\x72\x75\x6E\x6B\x52\x65\x61\x63\x68\x61\x62\x6C\x65","\x54\x52\x55\x4E\x4B\x5F\x49\x53\x5F\x4E\x4F\x54\x5F\x52\x45\x41\x43\x48\x41\x42\x4C\x45","\x41\x43\x54\x49\x56\x45","\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4E\x6F\x53\x75\x63\x68\x43\x61\x6C\x6C\x73\x44\x61\x79","\x63\x6F\x75\x6E\x74\x67\x6C\x6F\x62\x61\x6C","\x74\x6F\x74\x61\x6C\x47\x6C\x6F\x62\x61\x6C","\x4E\x6F\x53\x75\x63\x68\x4E\x75\x6D\x62\x65\x72","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x4E\x6F\x53\x75\x63\x68\x5D","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x4D\x61\x78\x52\x65\x74\x72\x79","\x47\x6C\x6F\x62\x61\x6C","\x63\x6C\x6F\x6E\x65\x41\x63\x74\x69\x6F\x6E","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x4E\x6F\x53\x75\x63\x68\x47\x6C\x6F\x62\x61\x6C\x5D","\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x31","\x72\x65\x73\x70\x6F\x6E\x73\x65\x74\x69\x6D\x65","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x6E\x65\x63\x74","\x62\x75\x69\x6C\x64\x4F\x62\x6A","\x41\x4E\x53\x57\x45\x52","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x74\x6F\x74\x61\x6C","\x61\x6E\x73\x77\x65\x72\x65\x64","\x41\x6E\x73\x77\x65\x72","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x41\x6E\x73\x77\x65\x72\x5D","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x41\x6E\x73\x77\x65\x72\x47\x6C\x6F\x62\x61\x6C\x5D","\x63\x72\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x65\x72\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x73\x75\x6D\x44\x75\x72\x61\x74\x69\x6F\x6E","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x73\x75\x6D\x42\x69\x6C\x6C\x61\x62\x6C\x65","\x31\x36","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x42\x75\x73\x79\x43\x61\x6C\x6C\x73\x44\x61\x79","\x63\x6F\x75\x6E\x74\x62\x75\x73\x79\x72\x65\x74\x72\x79","\x42\x75\x73\x79","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x42\x75\x73\x79\x5D","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x42\x75\x73\x79\x47\x6C\x6F\x62\x61\x6C\x5D","\x64\x69\x61\x6C\x42\x75\x73\x79\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x42\x75\x73\x79\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x75\x6E\x6C\x6F\x63\x6B\x41\x67\x65\x6E\x74","\x61\x63\x74\x69\x76\x65\x43\x6F\x6E\x74\x61\x63\x74","\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74","\x42\x55\x53\x59","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4E\x6F\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x63\x6F\x75\x6E\x74\x6E\x6F\x61\x6E\x73\x77\x65\x72\x72\x65\x74\x72\x79","\x4E\x6F\x41\x6E\x73\x77\x65\x72","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x4E\x6F\x41\x6E\x73\x77\x65\x72\x5D","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x4E\x6F\x41\x6E\x73\x77\x65\x72\x47\x6C\x6F\x62\x61\x6C\x5D","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x4E\x4F\x41\x4E\x53\x57\x45\x52","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x43\x61\x6C\x6C\x73\x44\x61\x79","\x63\x6F\x75\x6E\x74\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x72\x65\x74\x72\x79","\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x5D","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x47\x6C\x6F\x62\x61\x6C\x5D","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x4D\x61\x78\x52\x65\x74\x72\x79","\x43\x4F\x4E\x47\x45\x53\x54\x49\x4F\x4E","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x52\x65\x6A\x65\x63\x74\x43\x61\x6C\x6C\x73\x44\x61\x79","\x41\x67\x65\x6E\x74\x52\x65\x6A\x65\x63\x74","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x52\x65\x71\x75\x65\x73\x74\x5D\x5B\x6C\x6F\x67\x41\x67\x65\x6E\x74\x52\x65\x6A\x65\x63\x74\x5D","\x69\x64\x43\x6F\x6E\x74\x61\x63\x74","\x75\x6E\x6C\x6F\x63\x6B\x43\x6F\x6E\x74\x61\x63\x74","\x64\x69\x73\x61\x62\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74","\x43\x41\x4E\x43\x45\x4C","\x5B\x44\x69\x61\x6C\x65\x72\x5D\x5B\x64\x65\x63\x72\x65\x6D\x65\x6E\x74\x54\x61\x6C\x6B\x69\x6E\x6B\x5D\x5B\x6E\x6F\x20\x48\x61\x6E\x67\x75\x70\x5D\x5B\x50\x72\x65\x76\x69\x65\x77\x5D","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x55\x6E\x6B\x6E\x6F\x77\x6E\x43\x61\x6C\x6C\x73\x44\x61\x79","\x63\x61\x75\x73\x65\x2D\x74\x78\x74","\x64\x69\x61\x6C\x73\x74\x61\x74\x75\x73","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x55\x6E\x6B\x6E\x6F\x77\x6E\x5D","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x43\x75\x73\x74\x6F\x6D\x65\x72\x5D\x5B\x6C\x6F\x67\x55\x6E\x6B\x6E\x6F\x77\x6E\x47\x6C\x6F\x62\x61\x6C\x5D","\x64\x65\x73\x74\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x41\x67\x65\x6E\x74","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6F\x62\x6A\x65\x63\x74","\x6C\x6F\x67\x41\x67\x65\x6E\x74","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x41\x67\x65\x6E\x74\x5D\x5B\x6C\x6F\x67\x4E\x6F\x53\x75\x63\x68\x5D","\x63\x72\x65\x61\x74\x65\x41\x67\x65\x6E\x74\x48\x69\x73\x74\x6F\x72\x79","\x30","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x41\x67\x65\x6E\x74\x5D\x5B\x6C\x6F\x67\x4E\x6F\x41\x6E\x73\x77\x65\x72\x5D","\x33","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x41\x67\x65\x6E\x74\x5D\x5B\x6C\x6F\x67\x42\x75\x73\x79\x5D","\x35","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x41\x67\x65\x6E\x74\x5D\x5B\x6C\x6F\x67\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x5D","\x38","\x41\x6E\x73\x77\x65\x72\x41\x47\x49","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x41\x67\x65\x6E\x74\x5D\x5B\x6C\x6F\x67\x41\x6E\x73\x77\x65\x72\x41\x47\x49\x5D","\x32\x32","\x72\x65\x61\x73\x6F\x6E","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x68\x65\x63\x6B\x49\x6E\x42\x6C\x61\x63\x6B","\x70\x68\x6F\x6E\x65","\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74\x20\x69\x73\x20\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x76\x34","\x51\x75\x65\x75\x65","\x6C\x6F\x6F\x6B\x41\x67\x65\x6E\x74","\x69\x73\x45\x6D\x70\x74\x79","\x5B\x50\x72\x65\x76\x69\x65\x77\x5D\x5B\x65\x78\x65\x63\x43\x61\x6C\x6C\x5D\x5B\x66\x61\x69\x6C\x75\x72\x65\x5D","\x43\x61\x6C\x6C\x20\x66\x61\x69\x6C\x65\x64","\x5B\x50\x72\x65\x76\x69\x65\x77\x5D\x5B\x65\x78\x65\x63\x43\x61\x6C\x6C\x5D\x5B\x73\x75\x63\x63\x65\x73\x73\x5D","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64","\x63\x61\x6C\x6C\x65\x64","\x43\x61\x6C\x6C\x69\x6E\x67","\x65\x78\x65\x63\x43\x61\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6C\x6F\x67\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74","\x5B\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74\x5D\x5B\x65\x72\x72\x6F\x72\x5D","\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79","\x43\x6F\x6E\x74\x61\x63\x74\x20\x69\x6E\x20\x62\x6C\x61\x63\x6B\x20\x4C\x69\x73\x74","\x61\x63\x74\x69\x76\x65","\x53\x49\x50\x2F\x25\x73","\x72\x65\x61\x63\x68\x61\x62\x6C\x65","\x75\x6E\x6D\x6F\x6E\x69\x74\x6F\x72\x65\x64","\x75\x6E\x6C\x6F\x63\x6B","\x70\x69\x63\x6B","\x65\x78\x65\x63\x52\x75\x6E","\x5B\x50\x72\x65\x76\x69\x65\x77\x5D\x5B\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x50\x72\x65\x76\x69\x65\x77\x5D","\x43\x61\x6C\x6C\x20\x75\x6E\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x6F\x6E\x74\x61\x63\x74","\x69\x73\x56\x61\x6C\x69\x64","\x5B\x50\x72\x65\x76\x69\x65\x77\x5D\x5B\x63\x68\x65\x63\x6B\x49\x73\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x5D","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x43\x6F\x6E\x74\x61\x63\x74\x2E\x70\x68\x6F\x6E\x65","\x63\x68\x65\x63\x6B\x49\x73\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x50\x72\x65\x76\x69\x65\x77","\x41\x67\x65\x6E\x74","\x5B\x50\x72\x65\x76\x69\x65\x77\x5D\x5B\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x45\x6D\x70\x74\x79\x20\x43\x6F\x6E\x74\x61\x63\x74\x5D","\x45\x6D\x70\x74\x79\x20\x43\x6F\x6E\x74\x61\x63\x74","\x5B\x50\x72\x65\x76\x69\x65\x77\x5D\x5B\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x45\x6D\x70\x74\x79\x20\x43\x61\x6D\x70\x61\x69\x67\x6E\x5D","\x45\x6D\x70\x74\x79\x20\x43\x61\x6D\x70\x61\x69\x67\x6E","\x5B\x50\x72\x65\x76\x69\x65\x77\x5D\x5B\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x54\x72\x75\x6E\x6B\x20\x6E\x6F\x74\x20\x77\x6F\x72\x6B\x5D","\x63\x61\x6D\x70\x61\x69\x67\x6E\x20\x4E\x61\x6D\x65\x3A\x20","\x20\x54\x72\x75\x6E\x6B\x20\x69\x73\x20\x6E\x6F\x74\x20\x61\x63\x74\x69\x76\x65","\x20\x54\x72\x75\x6E\x6B\x20\x42\x61\x63\x6B\x75\x70\x20\x69\x73\x20\x6E\x6F\x74\x20\x61\x63\x74\x69\x76\x65","\x54\x72\x75\x6E\x6B\x20\x6E\x6F\x74\x20\x77\x6F\x72\x6B","\x5B\x50\x72\x65\x76\x69\x65\x77\x5D\x5B\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x5B\x43\x61\x6D\x70\x61\x69\x67\x6E\x20\x41\x63\x74\x69\x76\x65\x5D","\x20\x4E\x6F\x74\x20\x41\x63\x74\x69\x76\x65","\x49\x73\x20\x56\x61\x6C\x69\x64","\x53\x49\x50\x2F\x25\x73\x2F\x25\x73\x25\x73","\x54\x72\x75\x6E\x6B","\x64\x69\x61\x6C\x50\x72\x65\x66\x69\x78","","\x74\x72\x69\x6D","\x54\x72\x75\x6E\x6B\x42\x61\x63\x6B\x75\x70","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x61\x6D\x65","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x75\x6D\x62\x65\x72","\x67\x65\x74\x43\x61\x6C\x6C\x65\x72\x49\x64","\x61\x64\x64\x56\x61\x72\x69\x61\x62\x6C\x65\x73","\x74\x6F\x4C\x6F\x77\x65\x72\x56\x61\x72\x69\x61\x62\x6C\x65\x73","\x6D\x65\x72\x67\x65","\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x45\x72\x72\x6F\x72","\x5B\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x46\x61\x69\x6C\x75\x72\x65\x5D\x5B\x6C\x6F\x67\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x46\x61\x69\x6C\x75\x72\x65\x5D","\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x41\x63\x74\x69\x6F\x6E","\x61\x63\x74\x69\x6F\x6E\x69\x64","\x6C\x6F\x67\x4C\x6F\x6F\x6B\x41\x67\x65\x6E\x74","\x63\x6C\x6F\x6E\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x69\x73\x46\x61\x69\x6C\x75\x72\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x72\x65\x6A\x65\x63\x74\x65\x64","\x5B\x63\x61\x6C\x6C\x50\x72\x6F\x67\x72\x65\x73\x73\x44\x65\x74\x65\x63\x74\x69\x6E\x67\x41\x67\x65\x6E\x74\x5D\x5B\x6C\x6F\x67\x41\x6E\x73\x77\x65\x72\x5D","\x63\x61\x75\x73\x65","\x73\x74\x61\x74\x65\x64\x65\x73\x63","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x50\x72\x6F\x6A\x65\x63\x74","\x63\x68\x61\x6E\x6E\x65\x6C\x73\x74\x61\x74\x65","\x36","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x61\x64\x64\x56\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x76\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x66\x69\x6C\x74\x65\x72\x4B\x65\x79","\x76\x61\x6C\x75\x65","\x5B\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74\x5D\x5B\x50\x72\x65\x76\x69\x65\x77\x5D","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x65\x78\x70\x6F\x72\x74\x73"];_0x50af[0];var util=require(_0x50af[1]);var _=require(_0x50af[2]);var BPromise=require(_0x50af[3]);var uuid=require(_0x50af[4]);var moment=require(_0x50af[5]);var logger=require(_0x50af[7])(_0x50af[6]);var ami=require(_0x50af[8]);var rpcDb=require(_0x50af[9]);var Action=require(_0x50af[10]);var ut=require(_0x50af[11]);var io=require(_0x50af[13])({host:_0x50af[12],port:6379});var Sequence=function(){};Sequence[_0x50af[15]][_0x50af[14]]= function(_0xddfaxd){this[_0x50af[16]]= this[_0x50af[16]]?this[_0x50af[16]][_0x50af[17]](_0xddfaxd):_0xddfaxd()};function Preview(_0xddfaxf){this[_0x50af[18]]=  new Sequence();this[_0x50af[19]]= _0xddfaxf[_0x50af[20]];this[_0x50af[21]]= _0xddfaxf[_0x50af[21]];this[_0x50af[22]]= {};this[_0x50af[23]]= _0xddfaxf[_0x50af[23]];this[_0x50af[24]]= 0;ami[_0x50af[28]](_0x50af[25],this[_0x50af[27]][_0x50af[26]](this));ami[_0x50af[28]](_0x50af[29],this[_0x50af[30]][_0x50af[26]](this));ami[_0x50af[28]](_0x50af[31],this[_0x50af[32]][_0x50af[26]](this));ami[_0x50af[28]](_0x50af[33],this[_0x50af[34]][_0x50af[26]](this));ami[_0x50af[28]](_0x50af[35],this[_0x50af[36]][_0x50af[26]](this));ami[_0x50af[28]](_0x50af[37],this[_0x50af[38]][_0x50af[26]](this));this[_0x50af[39]](this[_0x50af[19]])}function emit(_0xddfax11,_0xddfax12,_0xddfax13){io[_0x50af[41]](_0xddfax11)[_0x50af[40]](_0xddfax12,_0xddfax13)}function emitCampaignPreview(_0xddfax13){if(_0xddfax13[_0x50af[42]]=== _0x50af[43]){emit(util[_0x50af[46]](_0x50af[44],_0xddfax13[_0x50af[45]]),_0x50af[47],_[_0x50af[49]](_0xddfax13,[_0x50af[48]]))}}function emitVoiceQueueChannelRemove(_0xddfax13){emit(util[_0x50af[46]](_0x50af[44],_0xddfax13[_0x50af[45]]),_0x50af[50],_0xddfax13)}function notSendMessagesQueue(_0xddfax17){if(_0xddfax17[_0x50af[51]]){if(_0xddfax17[_0x50af[52]]=== 0&& _0xddfax17[_0x50af[53]]=== 0){_0xddfax17[_0x50af[51]]= false;_0xddfax17[_0x50af[54]]= 0;_0xddfax17[_0x50af[55]]= 0;_0xddfax17[_0x50af[56]]= _0x50af[57];ut[_0x50af[60]](_0x50af[58],_0xddfax17[_0x50af[45]]+ _0x50af[59])}else {_0xddfax17[_0x50af[56]]= _0x50af[61];ut[_0x50af[60]](_0x50af[58],_0xddfax17[_0x50af[45]]+ _0x50af[62])};emitCampaignPreview(_0xddfax17)}}Preview[_0x50af[15]][_0x50af[39]]= function(){var _0xddfax18=this;setInterval(function(){_0xddfax18[_0x50af[63]]()},1999)};Preview[_0x50af[15]][_0x50af[63]]= function(){var _0xddfax19=this[_0x50af[19]];this[_0x50af[24]]+= 1;for(var _0xddfax1a in _0xddfax19){if(_0xddfax19[_0x50af[64]](_0xddfax1a)&& (_0xddfax19[_0xddfax1a][_0x50af[65]]=== _0x50af[6]|| _0xddfax19[_0xddfax1a][_0x50af[65]]=== _0x50af[66])&& _0xddfax19[_0xddfax1a][_0x50af[42]]=== _0x50af[43]){if(this[_0x50af[24]]> 7){this[_0x50af[24]]= 0;this[_0x50af[67]]()}};if(_0xddfax19[_0x50af[64]](_0xddfax1a)&& _0xddfax19[_0xddfax1a][_0x50af[65]]=== _0x50af[6]&& _0xddfax19[_0xddfax1a][_0x50af[42]]=== _0x50af[43]){if(_0xddfax19[_0xddfax1a][_0x50af[68]]){this[_0x50af[69]](_0xddfax19[_0xddfax1a]);this[_0x50af[70]](_0xddfax19[_0xddfax1a])}else {notSendMessagesQueue(_0xddfax19[_0xddfax1a])}}}};Preview[_0x50af[15]][_0x50af[67]]= function(){var _0xddfax18=this;for(var _0xddfax1b in this[_0x50af[22]]){if(_0xddfax18[_0x50af[22]][_0x50af[64]](_0xddfax1b)){this[_0x50af[18]][_0x50af[14]](function(){if(!_[_0x50af[71]](_0xddfax18[_0x50af[22]][_0xddfax1b])){return ami.Action({action:_0x50af[81],channel:_0xddfax18[_0x50af[22]][_0xddfax1b][_0x50af[82]]})[_0x50af[80]](function(_0xddfax1c){if(_0xddfax1c[_0x50af[56]]=== _0x50af[72]){setTimeout(function(){if(_0xddfax18[_0x50af[22]][_0xddfax1b]){ut[_0x50af[74]](_0xddfax18[_0x50af[19]][_0xddfax18[_0x50af[22]][_0xddfax1b][_0x50af[73]]]);if(_0xddfax18[_0x50af[22]][_0xddfax1b][_0x50af[75]]=== true){ut[_0x50af[76]](_0xddfax18[_0x50af[19]][_0xddfax18[_0x50af[22]][_0xddfax1b][_0x50af[73]]]);ut[_0x50af[78]](_0x50af[77]+ _0xddfax1b,_0xddfax18[_0x50af[22]][_0xddfax1b][_0x50af[73]])};ut[_0x50af[78]](_0x50af[79]+ _0xddfax1b,_0xddfax18[_0x50af[22]][_0xddfax1b][_0x50af[73]]);delete _0xddfax18[_0x50af[22]][_0xddfax1b]}},9000)}})}})}}};Preview[_0x50af[15]][_0x50af[70]]= function(_0xddfax17){var _0xddfax18=this;rpcDb[_0x50af[107]](_0xddfax17[_0x50af[91]],ut[_0x50af[106]](this[_0x50af[23]]))[_0x50af[90]](function(_0xddfax1d){if(!_[_0x50af[71]](_0xddfax1d)){for(var _0xddfax1e=0;_0xddfax1e< _0xddfax1d[_0x50af[85]];_0xddfax1e+= 1){if(ut[_0x50af[87]](_0xddfax1d[_0xddfax1e][_0x50af[86]])< (_0xddfax17[_0x50af[88]]* 60)){_0xddfax18[_0x50af[92]](_0xddfax1d[_0xddfax1e][_0x50af[91]])[_0x50af[90]](ut[_0x50af[84]](_0x50af[89]))[_0x50af[80]](ut[_0x50af[84]](_0x50af[89]))}else {var _0xddfax1f= new Action(_0xddfax1d[_0xddfax1e],_0xddfax17);_0xddfax1f[_0x50af[93]]= moment()[_0x50af[46]](_0x50af[94]);_0xddfax17[_0x50af[95]]+= 1;ut[_0x50af[97]](_0xddfax1f,23,_0x50af[96]);if(_0xddfax17[_0x50af[98]]){rpcDb[_0x50af[100]](ut[_0x50af[99]](_0xddfax1d[_0xddfax1e]));rpcDb[_0x50af[102]](_0xddfax1f,_0x50af[101])}else {ut[_0x50af[97]](_0xddfax1f,22,_0x50af[103]);rpcDb[_0x50af[102]](_0xddfax1f,_0x50af[104]);rpcDb[_0x50af[105]](_0xddfax1f,_0x50af[104])}}}}})[_0x50af[80]](ut[_0x50af[84]](_0x50af[83]))};Preview[_0x50af[15]][_0x50af[69]]= function(_0xddfax17){_0xddfax17[_0x50af[51]]= true;if(ut.IsNotLoggedIn(_0xddfax17[_0x50af[108]])){_0xddfax17[_0x50af[56]]= _0x50af[109]}else {if(!ut[_0x50af[110]](_0xddfax17[_0x50af[68]])){_0xddfax17[_0x50af[56]]= _0x50af[57]}else {if(!this[_0x50af[111]](_0xddfax17.Trunk)){if(!this[_0x50af[111]](_0xddfax17.TrunkBackup)){_0xddfax17[_0x50af[56]]= _0x50af[112]}else {_0xddfax17[_0x50af[56]]= _0x50af[113]}}else {_0xddfax17[_0x50af[56]]= _0x50af[113]}}};emitCampaignPreview(_0xddfax17)};Preview[_0x50af[15]][_0x50af[114]]= function(_0xddfax12,_0xddfax20,_0xddfax21){var _0xddfax18=this;var _0xddfax1f=this[_0x50af[22]][_0xddfax20];var _0xddfax17=this[_0x50af[19]][_0xddfax1f[_0x50af[73]]];var _0xddfax22;if(_0xddfax17){switch(_0xddfax21){case _0x50af[125]:_0xddfax17[_0x50af[115]]+= 1;_0xddfax1f[_0x50af[116]]= ut[_0x50af[117]](_0xddfax1f);ut[_0x50af[97]](_0xddfax1f,0,_0x50af[118]);rpcDb[_0x50af[102]](_0xddfax1f,_0x50af[119]);if(ut[_0x50af[117]](_0xddfax1f)>= _0xddfax17[_0x50af[120]]){_0xddfax22= ut[_0x50af[122]](_0xddfax1f,15,_0x50af[121]);rpcDb[_0x50af[105]](_0xddfax22,_0x50af[123])}else {rpcDb[_0x50af[105]](_0xddfax1f,_0x50af[123])};delete this[_0x50af[22]][_0xddfax12[_0x50af[124]]];break;case _0x50af[131]:var _0xddfax23=moment()[_0x50af[46]](_0x50af[94]);_0xddfax1f[_0x50af[126]]= _0xddfax23;_0xddfax1f[_0x50af[127]]= _0xddfax23;_0xddfax1f[_0x50af[75]]= true;_0xddfax17[_0x50af[53]]+= 1;ami[_0x50af[40]](_0x50af[128],ut[_0x50af[130]](_0xddfax1f,_0x50af[129]));break;case _0x50af[144]:ami[_0x50af[40]](_0x50af[132],ut[_0x50af[130]](_0xddfax1f,_0x50af[133]));emitVoiceQueueChannelRemove(ut[_0x50af[130]](_0xddfax1f,_0x50af[133]));_0xddfax17[_0x50af[134]]+= 1;_0xddfax17[_0x50af[135]]+= 1;_0xddfax17[_0x50af[136]]+= 1;ut[_0x50af[76]](_0xddfax17);_0xddfax1f[_0x50af[116]]= ut[_0x50af[117]](_0xddfax1f);ut[_0x50af[97]](_0xddfax1f,4,_0x50af[137]);rpcDb[_0x50af[102]](_0xddfax1f,_0x50af[138]);rpcDb[_0x50af[105]](_0xddfax1f,_0x50af[139]);rpcDb[_0x50af[140]](_0xddfax1f);_0xddfax17[_0x50af[141]]+= _0xddfax1f[_0x50af[142]];_0xddfax17[_0x50af[143]]+= _0xddfax1f[_0x50af[142]];delete this[_0x50af[22]][_0xddfax12[_0x50af[124]]];break;case _0x50af[156]:_0xddfax17[_0x50af[145]]+= 1;_0xddfax1f[_0x50af[146]]+= 1;_0xddfax1f[_0x50af[116]]= ut[_0x50af[117]](_0xddfax1f);ut[_0x50af[97]](_0xddfax1f,5,_0x50af[147]);rpcDb[_0x50af[102]](_0xddfax1f,_0x50af[148]);if(ut[_0x50af[117]](_0xddfax1f)>= _0xddfax17[_0x50af[120]]){_0xddfax22= ut[_0x50af[122]](_0xddfax1f,15,_0x50af[121]);rpcDb[_0x50af[105]](_0xddfax22,_0x50af[149])}else {if(_0xddfax1f[_0x50af[146]]>= _0xddfax17[_0x50af[150]]){rpcDb[_0x50af[105]](_0xddfax1f,_0x50af[148])}else {rpcDb[_0x50af[155]](ut[_0x50af[152]](_0xddfax1f,_0x50af[146],_0xddfax17[_0x50af[151]]),_0xddfax1f[_0x50af[153]],_0xddfax1f[_0x50af[154]])}};break;case _0x50af[164]:_0xddfax17[_0x50af[157]]+= 1;_0xddfax1f[_0x50af[158]]+= 1;_0xddfax1f[_0x50af[116]]= ut[_0x50af[117]](_0xddfax1f);ut[_0x50af[97]](_0xddfax1f,3,_0x50af[159]);rpcDb[_0x50af[102]](_0xddfax1f,_0x50af[160]);if(ut[_0x50af[117]](_0xddfax1f)>= _0xddfax17[_0x50af[120]]){_0xddfax22= ut[_0x50af[122]](_0xddfax1f,15,_0x50af[121]);rpcDb[_0x50af[105]](_0xddfax22,_0x50af[161])}else {if(_0xddfax1f[_0x50af[158]]>= _0xddfax17[_0x50af[162]]){rpcDb[_0x50af[105]](_0xddfax1f,_0x50af[160])}else {rpcDb[_0x50af[155]](ut[_0x50af[152]](_0xddfax1f,_0x50af[158],_0xddfax17[_0x50af[163]]),_0xddfax1f[_0x50af[153]],_0xddfax1f[_0x50af[154]])}};break;case _0x50af[171]:_0xddfax17[_0x50af[165]]+= 1;_0xddfax1f[_0x50af[166]]+= 1;_0xddfax1f[_0x50af[116]]= ut[_0x50af[117]](_0xddfax1f);ut[_0x50af[97]](_0xddfax1f,8,_0x50af[167]);rpcDb[_0x50af[102]](_0xddfax1f,_0x50af[168]);if(ut[_0x50af[117]](_0xddfax1f)>= _0xddfax17[_0x50af[120]]){_0xddfax22= ut[_0x50af[122]](_0xddfax1f,15,_0x50af[121]);rpcDb[_0x50af[105]](_0xddfax22,_0x50af[169])}else {if(_0xddfax1f[_0x50af[166]]>= _0xddfax17[_0x50af[170]]){rpcDb[_0x50af[105]](_0xddfax1f,_0x50af[168])}else {rpcDb[_0x50af[155]](ut[_0x50af[152]](_0xddfax1f,_0x50af[166],_0xddfax17[_0x50af[151]]),_0xddfax1f[_0x50af[153]],_0xddfax1f[_0x50af[154]])}};break;case _0x50af[178]:_0xddfax17[_0x50af[172]]+= 1;_0xddfax1f[_0x50af[116]]= ut[_0x50af[117]](_0xddfax1f);ut[_0x50af[97]](_0xddfax1f,20,_0x50af[173]);rpcDb[_0x50af[102]](_0xddfax1f,_0x50af[174]);if(_0xddfax1f[_0x50af[153]]){rpcDb[_0x50af[176]](_0xddfax1f[_0x50af[175]])};if(_0xddfax1f[_0x50af[154]]){rpcDb[_0x50af[177]](_0xddfax1f[_0x50af[175]])};break;default:if(_0xddfax1f[_0x50af[75]]){ut[_0x50af[76]](_0xddfax17);ut[_0x50af[78]](_0x50af[179]+ _0xddfax17[_0x50af[45]],_0xddfax12)};_0xddfax17[_0x50af[180]]+= 1;_0xddfax1f[_0x50af[116]]= ut[_0x50af[117]](_0xddfax1f);ut[_0x50af[97]](_0xddfax1f,12,_0xddfax12[_0x50af[181]]|| _0xddfax12[_0x50af[182]]);rpcDb[_0x50af[102]](_0xddfax1f,_0x50af[183]);if(ut[_0x50af[117]](_0xddfax1f)>= _0xddfax17[_0x50af[120]]){_0xddfax22= ut[_0x50af[122]](_0xddfax1f,15,_0x50af[121]);rpcDb[_0x50af[105]](_0xddfax22,_0x50af[184])}else {rpcDb[_0x50af[105]](_0xddfax1f,_0x50af[184])};delete this[_0x50af[22]][_0xddfax12[_0x50af[124]]]};if(!(_0xddfax1f[_0x50af[75]]&& _0xddfax21=== _0x50af[144])){ut[_0x50af[74]](_0xddfax17)};if(_0xddfax21!== _0x50af[131]){delete this[_0x50af[22]][_0xddfax12[_0x50af[124]]];delete this[_0x50af[22]][_0xddfax12[_0x50af[185]]]}}};Preview[_0x50af[15]][_0x50af[186]]= function(_0xddfax1f,_0xddfax17,_0xddfax12){if(_[_0x50af[187]](_0xddfax17)&& _0x50af[188]!==  typeof _0xddfax17){return};if(_[_0x50af[187]](_0xddfax12)&& _0x50af[188]!==  typeof _0xddfax12){return};switch(_0xddfax12[_0x50af[202]]){case _0x50af[192]:ut[_0x50af[189]](_0xddfax1f,0,_0x50af[118]);rpcDb[_0x50af[191]](_0xddfax1f,_0x50af[190]);break;case _0x50af[194]:ut[_0x50af[189]](_0xddfax1f,3,_0x50af[159]);rpcDb[_0x50af[191]](_0xddfax1f,_0x50af[193]);break;case _0x50af[196]:ut[_0x50af[189]](_0xddfax1f,5,_0x50af[147]);rpcDb[_0x50af[191]](_0xddfax1f,_0x50af[195]);break;case _0x50af[198]:ut[_0x50af[189]](_0xddfax1f,8,_0x50af[167]);rpcDb[_0x50af[191]](_0xddfax1f,_0x50af[197]);break;case _0x50af[201]:ut[_0x50af[189]](_0xddfax1f,22,_0x50af[199]);rpcDb[_0x50af[191]](_0xddfax1f,_0x50af[200]);break;default:ut[_0x50af[189]](_0xddfax1f,12,_0xddfax12[_0x50af[202]]);rpcDb[_0x50af[191]](_0xddfax1f,_0x50af[197])};ut[_0x50af[74]](_0xddfax17);delete this[_0x50af[22]][_0xddfax1f[_0x50af[203]]]};Preview[_0x50af[15]][_0x50af[204]]= function(_0xddfax24,_0xddfax25,_0xddfax26,_0xddfax27,_0xddfax28){var _0xddfax18=this;return  new BPromise(function(_0xddfax29,_0xddfax2a){if(_[_0x50af[71]](_0xddfax25)|| _[_0x50af[71]](_0xddfax25.Contact)|| _[_0x50af[71]](_0xddfax25[_0x50af[206]][_0x50af[205]])|| _[_0x50af[71]](_0xddfax25.VoiceQueueId)){_0xddfax2a(ut[_0x50af[56]](_0x50af[207],_0xddfax27,_0xddfax28));return};var _0xddfax20=uuid[_0x50af[208]]();var _0xddfax17=_0xddfax18[_0x50af[19]][_0xddfax25[_0x50af[209]][_0x50af[45]]];var _0xddfax2b=_0xddfax26?_0xddfax18[_0x50af[23]][_0xddfax26][_0x50af[91]]:undefined;_0xddfax18[_0x50af[22]][_0xddfax20]=  new Action(_0xddfax25,_0xddfax17,_0xddfax20,_0xddfax26,_0xddfax2b);var _0xddfax1f=_0xddfax18[_0x50af[22]][_0xddfax20];_0xddfax1f[_0x50af[153]]= _0xddfax27;_0xddfax1f[_0x50af[154]]= _0xddfax28;_0xddfax1f[_0x50af[210]]= _0xddfax26;if(_[_0x50af[211]](_0xddfax24)){_0xddfax18[_0x50af[218]](_0xddfax1f,_0xddfax17,_0xddfax25,_0xddfax26)[_0x50af[90]](function(_0xddfax1d){ut[_0x50af[60]](_0x50af[214],_0xddfax1d);ami[_0x50af[40]](_0x50af[215],ut[_0x50af[130]](_0xddfax1f,_0x50af[216]));_0xddfax29(ut[_0x50af[56]](_0x50af[217]))})[_0x50af[80]](function(_0xddfax1c){ut[_0x50af[60]](_0x50af[212],_0xddfax1c);_0xddfax2a(ut[_0x50af[56]](_0x50af[213],_0xddfax27,_0xddfax28))})}else {_0xddfax17[_0x50af[219]]+= 1;ut[_0x50af[220]](_0xddfax1f);rpcDb[_0x50af[222]](_0xddfax1f,_0x50af[221]);delete _0xddfax18[_0x50af[22]][_0xddfax20];_0xddfax2a(ut[_0x50af[56]](_0x50af[223],_0xddfax27,_0xddfax28))}})};Preview[_0x50af[15]][_0x50af[111]]= function(_0xddfax2c){return !_[_0x50af[71]](_0xddfax2c)&&  !_[_0x50af[71]](_0xddfax2c[_0x50af[45]]) &&  !_[_0x50af[71]](_0xddfax2c[_0x50af[224]]) && _0xddfax2c[_0x50af[224]] &&  !_[_0x50af[71]](this[_0x50af[21]][util[_0x50af[46]](_0x50af[225],_0xddfax2c[_0x50af[45]])]) &&  !_[_0x50af[71]](this[_0x50af[21]][util[_0x50af[46]](_0x50af[225],_0xddfax2c[_0x50af[45]])][_0x50af[81]]) && (this[_0x50af[21]][util[_0x50af[46]](_0x50af[225],_0xddfax2c[_0x50af[45]])][_0x50af[81]]=== _0x50af[226]|| this[_0x50af[21]][util[_0x50af[46]](_0x50af[225],_0xddfax2c[_0x50af[45]])][_0x50af[81]]=== _0x50af[227])};Preview[_0x50af[15]][_0x50af[92]]= function(_0xddfax2d,_0xddfax26){var _0xddfax18=this;return  new BPromise(function(_0xddfax29,_0xddfax2a){_0xddfax18[_0x50af[230]](_0xddfax2d,_0xddfax26)[_0x50af[90]](function(_0xddfax1d){_0xddfax29(_[_0x50af[229]](_0xddfax1d,[_0x50af[56]]))})[_0x50af[80]](function(_0xddfax1c){if(_0xddfax1c[_0x50af[228]]){rpcDb[_0x50af[176]](_0xddfax2d)};if(_0xddfax1c[_0x50af[224]]){rpcDb[_0x50af[177]](_0xddfax2d)};_0xddfax2a(_[_0x50af[229]](_0xddfax1c,[_0x50af[56]]))})})};Preview[_0x50af[15]][_0x50af[230]]= function(_0xddfax2d,_0xddfax26){var _0xddfax18=this;return  new BPromise(function(_0xddfax29,_0xddfax2a){var _0xddfax28,_0xddfax27;rpcDb[_0x50af[240]](_0xddfax2d)[_0x50af[90]](function(_0xddfax1d){if(!_[_0x50af[71]](_0xddfax1d[0])){_0xddfax27= _0xddfax1d[0][_0x50af[233]]?false:true;_0xddfax28= _0xddfax1d[0][_0x50af[233]]?true:false;_0xddfax28= _0xddfax26?true:_0xddfax28};var _0xddfax25=_0xddfax18[_0x50af[234]](_0xddfax1d);if(_0xddfax25[_0x50af[235]]){rpcDb[_0x50af[239]](_[_0x50af[229]](_0xddfax1d[0],[_0x50af[237],_0x50af[238]]))[_0x50af[90]](function(_0xddfax24){_0xddfax18[_0x50af[204]](_0xddfax24,_0xddfax1d[0],_0xddfax26,_0xddfax27,_0xddfax28)[_0x50af[90]](function(_0xddfax30){_0xddfax29(_0xddfax30)})[_0x50af[80]](function(_0xddfax2f){_0xddfax2a(_0xddfax2f)})})[_0x50af[80]](function(_0xddfax2e){ut[_0x50af[60]](_0x50af[236],_0xddfax2e);_0xddfax2a(ut[_0x50af[56]](_0x50af[232],_0xddfax27,_0xddfax28))})}else {_0xddfax2a(ut[_0x50af[56]](_0xddfax25[_0x50af[56]],_0xddfax27,_0xddfax28))}})[_0x50af[80]](function(_0xddfax1c){ut[_0x50af[60]](_0x50af[231],_0xddfax1c);_0xddfax2a(ut[_0x50af[56]](_0x50af[232],false,true))})})};Preview[_0x50af[15]][_0x50af[234]]= function(_0xddfax25){if(_[_0x50af[71]](_0xddfax25)|| _[_0x50af[211]](_0xddfax25)|| (!_[_0x50af[71]](_0xddfax25[0].Agent)&& _[_0x50af[71]](_0xddfax25[0][_0x50af[241]][_0x50af[45]]))){ut[_0x50af[60]](_0x50af[242],_0xddfax25);return {isValid:false,message:_0x50af[243]}};var _0xddfax17=this[_0x50af[19]][_0xddfax25[0][_0x50af[209]][_0x50af[45]]];_0xddfax17[_0x50af[56]]= _0x50af[113];if(_[_0x50af[71]](_0xddfax17)){ut[_0x50af[60]](_0x50af[244],_0xddfax17);return {isValid:false,message:_0x50af[245]}};if(!this[_0x50af[111]](_0xddfax17.Trunk)){ut[_0x50af[60]](_0x50af[246],_0x50af[247]+ _0xddfax17[_0x50af[45]]+ _0x50af[248]);if(!this[_0x50af[111]](_0xddfax17.TrunkBackup)){ut[_0x50af[60]](_0x50af[246],_0xddfax17[_0x50af[45]]+ _0x50af[249]);return {isValid:false,message:_0x50af[250]}}};if(!ut[_0x50af[110]](_0xddfax17[_0x50af[68]])){ut[_0x50af[60]](_0x50af[251],_0xddfax17[_0x50af[45]]+ _0x50af[252]);return {isValid:false,message:_0x50af[247]+ _0xddfax17[_0x50af[45]]+ _0x50af[252]}};return {isValid:true,message:_0x50af[253]}};Preview[_0x50af[15]][_0x50af[218]]= function(_0xddfax1f,_0xddfax17,_0xddfax25,_0xddfax26){var _0xddfax18=this;return  new BPromise(function(_0xddfax29,_0xddfax2a){var _0xddfax31=_0xddfax1f[_0x50af[203]];var _0xddfax32=(_0xddfax18[_0x50af[111]](_0xddfax17.Trunk))?util[_0x50af[46]](_0x50af[254],_0xddfax17[_0x50af[255]][_0x50af[45]],_[_0x50af[71]](_0xddfax17[_0x50af[256]])?_0x50af[257]:_0xddfax17[_0x50af[256]][_0x50af[258]]()|| _0x50af[257],_0xddfax25[_0x50af[206]][_0x50af[205]]):util[_0x50af[46]](_0x50af[254],_[_0x50af[71]](_0xddfax17.TrunkBackup)?_0xddfax17[_0x50af[255]][_0x50af[45]]:_0xddfax17[_0x50af[259]][_0x50af[45]],_[_0x50af[71]](_0xddfax17[_0x50af[256]])?_0x50af[257]:_0xddfax17[_0x50af[256]][_0x50af[258]]()|| _0x50af[257],_0xddfax25[_0x50af[206]][_0x50af[205]]);var _0xddfax33=(_0xddfax18[_0x50af[111]](_0xddfax17.Trunk))?ut[_0x50af[263]](_0xddfax17[_0x50af[255]][_0x50af[260]],_0xddfax17[_0x50af[261]],_0xddfax17[_0x50af[262]]):ut[_0x50af[263]](_[_0x50af[71]](_0xddfax17.TrunkBackup)?_0xddfax17[_0x50af[255]][_0x50af[260]]:_0xddfax17[_0x50af[259]][_0x50af[260]],_0xddfax17[_0x50af[261]],_0xddfax17[_0x50af[262]]);var _0xddfax34=ut[_0x50af[264]](_0xddfax17,_0xddfax25,_0xddfax32,_0xddfax33,_0xddfax31);_[_0x50af[266]](_0xddfax1f,ut[_0x50af[265]](_0xddfax34));_0xddfax1f[_0x50af[93]]= moment()[_0x50af[46]](_0x50af[94]);ami.Action(ut[_0x50af[269]](_0xddfax1f,_0xddfax17,_0xddfax34,_0xddfax1f[_0x50af[154]],_0xddfax26))[_0x50af[90]](function(_0xddfax1d){_0xddfax17[_0x50af[52]]+= 1;_0xddfax29(_0xddfax1d)})[_0x50af[80]](function(_0xddfax1c){ut[_0x50af[189]](_0xddfax1f,14,_0x50af[267]);rpcDb[_0x50af[191]](_0xddfax1f,_0x50af[268]);_0xddfax2a(_0xddfax1c)})})};Preview[_0x50af[15]][_0x50af[36]]= function(_0xddfax12){if(this[_0x50af[22]][_0xddfax12[_0x50af[124]]]){this[_0x50af[22]][_0xddfax12[_0x50af[124]]][_0x50af[82]]= _0xddfax12[_0x50af[82]]}};Preview[_0x50af[15]][_0x50af[27]]= function(_0xddfax12){var _0xddfax18=this;var _0xddfax1f=this[_0x50af[22]][_0xddfax12[_0x50af[270]]];if(_0xddfax1f){if(_0xddfax1f[_0x50af[210]]&& this[_0x50af[23]][_0xddfax1f[_0x50af[210]]]){ut[_0x50af[271]](_0xddfax1f,this[_0x50af[23]][_0xddfax1f[_0x50af[210]]][_0x50af[45]],this[_0x50af[23]][_0xddfax1f[_0x50af[210]]][_0x50af[91]])};var _0xddfax22=_[_0x50af[272]](_0xddfax1f);_0xddfax22[_0x50af[126]]= moment()[_0x50af[46]](_0x50af[94]);var _0xddfax17=_0xddfax18[_0x50af[19]][_0xddfax1f[_0x50af[73]]];if(ut[_0x50af[274]](_0xddfax12[_0x50af[273]])){if(_0xddfax1f[_0x50af[153]]){rpcDb[_0x50af[176]](_0xddfax1f[_0x50af[175]])};if(_0xddfax1f[_0x50af[154]]){rpcDb[_0x50af[177]](_0xddfax1f[_0x50af[175]])};ami[_0x50af[40]](_0x50af[275],ut[_0x50af[130]](_0xddfax1f,_0x50af[276]));this[_0x50af[186]](_0xddfax22,_0xddfax17,_0xddfax12)}else {_0xddfax1f[_0x50af[93]]= moment()[_0x50af[46]](_0x50af[94]);ut[_0x50af[189]](_0xddfax22,4,_0x50af[137]);rpcDb[_0x50af[191]](_0xddfax22,_0x50af[277])}}};Preview[_0x50af[15]][_0x50af[30]]= function(_0xddfax12){var _0xddfax18=this;var _0xddfax1f=this[_0x50af[22]][_0xddfax12[_0x50af[124]]];var _0xddfax17;if(_0xddfax1f){_0xddfax17= this[_0x50af[19]][_0xddfax1f[_0x50af[73]]]};if(this[_0x50af[22]][_0xddfax12[_0x50af[124]]]&& _0xddfax12[_0x50af[124]]!== _0xddfax12[_0x50af[203]]){if(_0xddfax12[_0x50af[278]]=== _0x50af[144]&& this[_0x50af[22]][_0xddfax12[_0x50af[124]]][_0x50af[75]]){this[_0x50af[114]](_0xddfax12,_0xddfax12[_0x50af[124]],_0xddfax12[_0x50af[278]])}}else {if(_0xddfax1f&& _[_0x50af[71]](_0xddfax1f[_0x50af[279]])&& _0xddfax17[_0x50af[280]]&& _0xddfax12[_0x50af[124]]=== _0xddfax12[_0x50af[203]]&& _[_0x50af[71]](_0xddfax12[_0x50af[202]])&& _0xddfax12[_0x50af[278]]=== _0x50af[144]&& _0xddfax12[_0x50af[281]]=== _0x50af[282]){if(_0xddfax1f[_0x50af[153]]){rpcDb[_0x50af[176]](_0xddfax1f[_0x50af[175]])};if(_0xddfax1f[_0x50af[154]]){rpcDb[_0x50af[177]](_0xddfax1f[_0x50af[175]])};_0xddfax12[_0x50af[202]]= _0x50af[201];this[_0x50af[186]](_0xddfax1f,_0xddfax17,_0xddfax12)}}};Preview[_0x50af[15]][_0x50af[34]]= function(_0xddfax12){if(this[_0x50af[22]][_0xddfax12[_0x50af[185]]]&& _0xddfax12[_0x50af[185]]!== _0xddfax12[_0x50af[283]]){this[_0x50af[114]](_0xddfax12,_0xddfax12[_0x50af[185]],_0xddfax12[_0x50af[182]])}};Preview[_0x50af[15]][_0x50af[32]]= function(_0xddfax12){if(this[_0x50af[22]][_0xddfax12[_0x50af[124]]]&& _0xddfax12[_0x50af[124]]!== _0xddfax12[_0x50af[203]]&&  !this[_0x50af[22]][_0xddfax12[_0x50af[124]]][_0x50af[75]]){if(_0xddfax12[_0x50af[278]]=== _0x50af[125]){this[_0x50af[114]](_0xddfax12,_0xddfax12[_0x50af[124]],_0xddfax12[_0x50af[278]])}}};Preview[_0x50af[15]][_0x50af[284]]= function(_0xddfax1b,_0xddfax35,_0xddfax36){if(this[_0x50af[22]][_0xddfax1b]){if(_[_0x50af[71]](this[_0x50af[22]][_0xddfax1b][_0x50af[285]])){this[_0x50af[22]][_0xddfax1b][_0x50af[285]]= {}};this[_0x50af[22]][_0xddfax1b][_0x50af[285]][_0xddfax35]= _0xddfax36}};Preview[_0x50af[15]][_0x50af[38]]= function(_0xddfax12){try{if(!_[_0x50af[71]](_0xddfax12)){if(ut[_0x50af[288]](_[_0x50af[287]](_0xddfax12[_0x50af[286]])[0])){this[_0x50af[284]](_0xddfax12[_0x50af[203]],_[_0x50af[287]](_0xddfax12[_0x50af[286]])[0],_0xddfax12[_0x50af[289]])}}}catch(e){logger[_0x50af[292]](_0x50af[290],util[_0x50af[291]](e,{showHidden:false,depth:null}))}};module[_0x50af[293]]= Preview
\ No newline at end of file
index 2d0af63..e046768 100644 (file)
@@ -1 +1 @@
-var _0xc03e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x70\x72\x65\x76\x69\x65\x77","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x2E\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x61\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x50\x72\x65\x76\x69\x65\x77","\x2E\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D\x20","\x63\x61\x74\x63\x68","\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79","\x74\x68\x65\x6E","\x72\x65\x73\x6F\x6C\x76\x65","\x5B\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x64\x44\x69\x61\x6C\x65\x72\x5D\x20","\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x64\x44\x69\x61\x6C\x65\x72","\x63\x68\x65\x63\x6B\x49\x73\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74","\x5B\x63\x68\x65\x63\x6B\x49\x73\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x5D\x20","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x50\x72\x65\x76\x69\x65\x77","\x5B\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x50\x72\x65\x76\x69\x65\x77\x5D\x20","\x63\x72\x65\x61\x74\x65\x41\x67\x65\x6E\x74\x48\x69\x73\x74\x6F\x72\x79","\x63\x72\x65\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x63\x72\x65\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x65\x72\x46\x69\x6E\x61\x6C","\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74","\x55\x73\x65\x72\x49\x64","\x61\x63\x74\x69\x76\x65","\x5B\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x20","\x63\x6F\x75\x6E\x74\x52\x65\x53\x63\x68\x65\x64\x75\x6C\x65\x64","\x5B\x63\x6F\x75\x6E\x74\x52\x65\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x5D\x20","\x75\x6E\x6C\x6F\x63\x6B\x43\x6F\x6E\x74\x61\x63\x74","\x5B\x75\x6E\x6C\x6F\x63\x6B\x43\x6F\x6E\x74\x61\x63\x74\x5D\x20","\x64\x69\x73\x61\x62\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74","\x5B\x61\x63\x74\x69\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x20","\x63\x72\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x65\x72\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x74\x79\x70\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x71\x75\x65\x75\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x65\x6E\x64\x74\x69\x6D\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x65\x78\x74\x65\x6E","\x78\x63\x61\x6C\x6C\x79\x2D\x6D\x6F\x74\x69\x6F\x6E\x2D\x70\x72\x65\x76\x69\x65\x77","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x61\x73\x73\x69\x67\x6E\x65\x64","\x6C\x61\x73\x74\x41\x73\x73\x69\x67\x6E\x65\x64\x54\x6F","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x74\x72\x65\x61\x73\x6F\x6E","\x52\x45\x43\x41\x4C\x4C","\x5B\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D\x20","\x63\x72\x65\x61\x74\x65","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x52\x65\x63\x61\x6C\x6C\x4D\x65","\x5B\x47\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x52\x65\x63\x61\x6C\x6C\x4D\x65\x5D\x20","\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74\x49\x6E\x51\x75\x65\x75\x65","\x5B\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74\x49\x6E\x51\x75\x65\x75\x65\x5D\x20"];_0xc03e[0];var util=require(_0xc03e[1]);var BPromise=require(_0xc03e[2]);var logger=require(_0xc03e[4])(_0xc03e[3]);var _=require(_0xc03e[5]);var cmHopper=require(_0xc03e[6]);var cmHopperFinal=require(_0xc03e[7]);var cmHopperHistory=require(_0xc03e[8]);var cmHopperBlack=require(_0xc03e[9]);var voiceQueueRt=require(_0xc03e[10]);var agentReportPreview=require(_0xc03e[11]);var voiceQueueReport=require(_0xc03e[12]);function loggerCatch(_0x44c0xd){return function(_0x44c0xe){logger[_0xc03e[14]](_0x44c0xd,util[_0xc03e[13]](_0x44c0xe,{showHidden:false,depth:null}))}}function create(_0x44c0x10){return BPromise[_0xc03e[19]]()[_0xc03e[18]](cmHopperHistory[_0xc03e[17]](_0x44c0x10))[_0xc03e[16]](loggerCatch(_0xc03e[15]))}function createAgent(_0x44c0x10){return BPromise[_0xc03e[19]]()[_0xc03e[18]](agentReportPreview[_0xc03e[17]](_0x44c0x10))[_0xc03e[16]](loggerCatch(_0xc03e[15]))}function moveContact(_0x44c0x10){return BPromise[_0xc03e[19]]()[_0xc03e[18]](cmHopper[_0xc03e[21]](_0x44c0x10,true))[_0xc03e[16]](loggerCatch(_0xc03e[20]))}exports[_0xc03e[22]]= function(_0x44c0x13){return BPromise[_0xc03e[19]]()[_0xc03e[18]](cmHopperBlack[_0xc03e[22]](_0x44c0x13))[_0xc03e[16]](loggerCatch(_0xc03e[23]))};exports[_0xc03e[24]]= function(_0x44c0x14){return BPromise[_0xc03e[19]]()[_0xc03e[18]](cmHopper[_0xc03e[24]](_0x44c0x14))[_0xc03e[16]](loggerCatch(_0xc03e[25]))};exports[_0xc03e[17]]= function(_0x44c0x10,_0x44c0xd){create(_0x44c0x10)[_0xc03e[16]](loggerCatch(_0x44c0xd));moveContact(_0x44c0x10)[_0xc03e[16]](loggerCatch(_0x44c0xd))};exports[_0xc03e[26]]= function(_0x44c0x10,_0x44c0xd){createAgent(_0x44c0x10)[_0xc03e[16]](loggerCatch(_0x44c0xd))};exports[_0xc03e[27]]= function(_0x44c0x10,_0x44c0xd){create(_0x44c0x10)[_0xc03e[16]](loggerCatch(_0x44c0xd))};exports[_0xc03e[28]]= function(_0x44c0x10,_0x44c0xd){moveContact(_0x44c0x10)[_0xc03e[16]](loggerCatch(_0x44c0xd))};exports[_0xc03e[29]]= function(_0x44c0x10,_0x44c0x15,_0x44c0x16){if(_0x44c0x15){_0x44c0x10[_0xc03e[30]]= null};if(_0x44c0x16){_0x44c0x10[_0xc03e[31]]= false};return BPromise[_0xc03e[19]]()[_0xc03e[18]](cmHopper[_0xc03e[29]](_0x44c0x10))[_0xc03e[16]](loggerCatch(_0xc03e[32]))};exports[_0xc03e[33]]= function(_0x44c0x17){return BPromise[_0xc03e[19]]()[_0xc03e[18]](cmHopper[_0xc03e[33]](_0x44c0x17))[_0xc03e[16]](loggerCatch(_0xc03e[34]))};exports[_0xc03e[35]]= function(_0x44c0x17){return BPromise[_0xc03e[19]]()[_0xc03e[18]](cmHopper[_0xc03e[35]]({UserId:null},_0x44c0x17,1))[_0xc03e[16]](loggerCatch(_0xc03e[36]))};exports[_0xc03e[37]]= function(_0x44c0x17){return BPromise[_0xc03e[19]]()[_0xc03e[18]](cmHopper[_0xc03e[35]]({active:false},_0x44c0x17,1))[_0xc03e[16]](loggerCatch(_0xc03e[38]))};exports[_0xc03e[39]]= function(_0x44c0x10){var _0x44c0x18={};_0x44c0x18[_0xc03e[40]]= _0x44c0x10[_0xc03e[40]];_0x44c0x18[_0xc03e[41]]= _0x44c0x10[_0xc03e[41]];_0x44c0x18[_0xc03e[42]]= _0x44c0x10[_0xc03e[42]];_0x44c0x18[_0xc03e[43]]= _0x44c0x10[_0xc03e[43]];_0x44c0x18[_0xc03e[44]]= _0x44c0x10[_0xc03e[44]];_0x44c0x18[_0xc03e[45]]= _0x44c0x10[_0xc03e[46]];_0x44c0x18[_0xc03e[47]]= _0x44c0x10[_0xc03e[46]];_0x44c0x18[_0xc03e[48]]= 1;_0x44c0x18[_0xc03e[49]]= _0x44c0x10[_0xc03e[50]];_0x44c0x18[_0xc03e[51]]= _0x44c0x10[_0xc03e[52]];_0x44c0x18[_0xc03e[53]]= _0xc03e[54];_0x44c0x18[_0xc03e[55]]= _0xc03e[56];_0x44c0x18[_0xc03e[57]]= 0;_0x44c0x18[_0xc03e[58]]= 1;_0x44c0x18[_0xc03e[59]]= _0x44c0x10[_0xc03e[52]];_0x44c0x18[_0xc03e[60]]= _0xc03e[61];return BPromise[_0xc03e[19]]()[_0xc03e[18]](voiceQueueReport[_0xc03e[63]](_0x44c0x18))[_0xc03e[16]](loggerCatch(_0xc03e[62]))};exports[_0xc03e[64]]= function(_0x44c0x19,_0x44c0x1a){return BPromise[_0xc03e[19]]()[_0xc03e[18]](cmHopper[_0xc03e[64]](_0x44c0x19,_0x44c0x1a))[_0xc03e[16]](loggerCatch(_0xc03e[65]))};exports[_0xc03e[66]]= function(_0x44c0x10){return BPromise[_0xc03e[19]]()[_0xc03e[18]](cmHopper[_0xc03e[29]](_0x44c0x10,true,true))[_0xc03e[16]](loggerCatch(_0xc03e[67]))}
\ No newline at end of file
+var _0xe61d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x70\x72\x65\x76\x69\x65\x77","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x2E\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x61\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x50\x72\x65\x76\x69\x65\x77","\x2E\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x5B\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79\x5D\x20","\x63\x61\x74\x63\x68","\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79","\x74\x68\x65\x6E","\x72\x65\x73\x6F\x6C\x76\x65","\x5B\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x64\x44\x69\x61\x6C\x65\x72\x5D\x20","\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x64\x44\x69\x61\x6C\x65\x72","\x63\x68\x65\x63\x6B\x49\x73\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74","\x5B\x63\x68\x65\x63\x6B\x49\x73\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x5D\x20","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x50\x72\x65\x76\x69\x65\x77","\x5B\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x50\x72\x65\x76\x69\x65\x77\x5D\x20","\x63\x72\x65\x61\x74\x65\x41\x67\x65\x6E\x74\x48\x69\x73\x74\x6F\x72\x79","\x63\x72\x65\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x63\x72\x65\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x65\x72\x46\x69\x6E\x61\x6C","\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74","\x55\x73\x65\x72\x49\x64","\x61\x63\x74\x69\x76\x65","\x5B\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x20","\x63\x6F\x75\x6E\x74\x52\x65\x53\x63\x68\x65\x64\x75\x6C\x65\x64","\x5B\x63\x6F\x75\x6E\x74\x52\x65\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x5D\x20","\x75\x6E\x6C\x6F\x63\x6B\x43\x6F\x6E\x74\x61\x63\x74","\x5B\x75\x6E\x6C\x6F\x63\x6B\x43\x6F\x6E\x74\x61\x63\x74\x5D\x20","\x64\x69\x73\x61\x62\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74","\x5B\x61\x63\x74\x69\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x5D\x20","\x63\x72\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x65\x72\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x74\x79\x70\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x71\x75\x65\x75\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x65\x6E\x64\x74\x69\x6D\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x65\x78\x74\x65\x6E","\x78\x63\x61\x6C\x6C\x79\x2D\x6D\x6F\x74\x69\x6F\x6E\x2D\x70\x72\x65\x76\x69\x65\x77","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x61\x73\x73\x69\x67\x6E\x65\x64","\x6C\x61\x73\x74\x41\x73\x73\x69\x67\x6E\x65\x64\x54\x6F","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x74\x72\x65\x61\x73\x6F\x6E","\x52\x45\x43\x41\x4C\x4C","\x5B\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D\x20","\x63\x72\x65\x61\x74\x65","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x52\x65\x63\x61\x6C\x6C\x4D\x65","\x5B\x47\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x52\x65\x63\x61\x6C\x6C\x4D\x65\x5D\x20","\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74\x49\x6E\x51\x75\x65\x75\x65","\x5B\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74\x49\x6E\x51\x75\x65\x75\x65\x5D\x20"];_0xe61d[0];var util=require(_0xe61d[1]);var BPromise=require(_0xe61d[2]);var logger=require(_0xe61d[4])(_0xe61d[3]);var _=require(_0xe61d[5]);var cmHopper=require(_0xe61d[6]);var cmHopperFinal=require(_0xe61d[7]);var cmHopperHistory=require(_0xe61d[8]);var cmHopperBlack=require(_0xe61d[9]);var voiceQueueRt=require(_0xe61d[10]);var agentReportPreview=require(_0xe61d[11]);var voiceQueueReport=require(_0xe61d[12]);function loggerCatch(_0x4f44xd){return function(_0x4f44xe){logger[_0xe61d[14]](_0x4f44xd,util[_0xe61d[13]](_0x4f44xe,{showHidden:false,depth:null}))}}function create(_0x4f44x10){return BPromise[_0xe61d[19]]()[_0xe61d[18]](cmHopperHistory[_0xe61d[17]](_0x4f44x10))[_0xe61d[16]](loggerCatch(_0xe61d[15]))}function createAgent(_0x4f44x10){return BPromise[_0xe61d[19]]()[_0xe61d[18]](agentReportPreview[_0xe61d[17]](_0x4f44x10))[_0xe61d[16]](loggerCatch(_0xe61d[15]))}function moveContact(_0x4f44x10){return BPromise[_0xe61d[19]]()[_0xe61d[18]](cmHopper[_0xe61d[21]](_0x4f44x10,true))[_0xe61d[16]](loggerCatch(_0xe61d[20]))}exports[_0xe61d[22]]= function(_0x4f44x13){return BPromise[_0xe61d[19]]()[_0xe61d[18]](cmHopperBlack[_0xe61d[22]](_0x4f44x13))[_0xe61d[16]](loggerCatch(_0xe61d[23]))};exports[_0xe61d[24]]= function(_0x4f44x14){return BPromise[_0xe61d[19]]()[_0xe61d[18]](cmHopper[_0xe61d[24]](_0x4f44x14))[_0xe61d[16]](loggerCatch(_0xe61d[25]))};exports[_0xe61d[17]]= function(_0x4f44x10,_0x4f44xd){create(_0x4f44x10)[_0xe61d[16]](loggerCatch(_0x4f44xd));moveContact(_0x4f44x10)[_0xe61d[16]](loggerCatch(_0x4f44xd))};exports[_0xe61d[26]]= function(_0x4f44x10,_0x4f44xd){createAgent(_0x4f44x10)[_0xe61d[16]](loggerCatch(_0x4f44xd))};exports[_0xe61d[27]]= function(_0x4f44x10,_0x4f44xd){create(_0x4f44x10)[_0xe61d[16]](loggerCatch(_0x4f44xd))};exports[_0xe61d[28]]= function(_0x4f44x10,_0x4f44xd){moveContact(_0x4f44x10)[_0xe61d[16]](loggerCatch(_0x4f44xd))};exports[_0xe61d[29]]= function(_0x4f44x10,_0x4f44x15,_0x4f44x16){if(_0x4f44x15){_0x4f44x10[_0xe61d[30]]= null};if(_0x4f44x16){_0x4f44x10[_0xe61d[31]]= false};return BPromise[_0xe61d[19]]()[_0xe61d[18]](cmHopper[_0xe61d[29]](_0x4f44x10))[_0xe61d[16]](loggerCatch(_0xe61d[32]))};exports[_0xe61d[33]]= function(_0x4f44x17){return BPromise[_0xe61d[19]]()[_0xe61d[18]](cmHopper[_0xe61d[33]](_0x4f44x17))[_0xe61d[16]](loggerCatch(_0xe61d[34]))};exports[_0xe61d[35]]= function(_0x4f44x17){return BPromise[_0xe61d[19]]()[_0xe61d[18]](cmHopper[_0xe61d[35]]({UserId:null},_0x4f44x17,1))[_0xe61d[16]](loggerCatch(_0xe61d[36]))};exports[_0xe61d[37]]= function(_0x4f44x17){return BPromise[_0xe61d[19]]()[_0xe61d[18]](cmHopper[_0xe61d[35]]({active:false},_0x4f44x17,1))[_0xe61d[16]](loggerCatch(_0xe61d[38]))};exports[_0xe61d[39]]= function(_0x4f44x10){var _0x4f44x18={};_0x4f44x18[_0xe61d[40]]= _0x4f44x10[_0xe61d[40]];_0x4f44x18[_0xe61d[41]]= _0x4f44x10[_0xe61d[41]];_0x4f44x18[_0xe61d[42]]= _0x4f44x10[_0xe61d[42]];_0x4f44x18[_0xe61d[43]]= _0x4f44x10[_0xe61d[43]];_0x4f44x18[_0xe61d[44]]= _0x4f44x10[_0xe61d[44]];_0x4f44x18[_0xe61d[45]]= _0x4f44x10[_0xe61d[46]];_0x4f44x18[_0xe61d[47]]= _0x4f44x10[_0xe61d[46]];_0x4f44x18[_0xe61d[48]]= 1;_0x4f44x18[_0xe61d[49]]= _0x4f44x10[_0xe61d[50]];_0x4f44x18[_0xe61d[51]]= _0x4f44x10[_0xe61d[52]];_0x4f44x18[_0xe61d[53]]= _0xe61d[54];_0x4f44x18[_0xe61d[55]]= _0xe61d[56];_0x4f44x18[_0xe61d[57]]= 0;_0x4f44x18[_0xe61d[58]]= 1;_0x4f44x18[_0xe61d[59]]= _0x4f44x10[_0xe61d[52]];_0x4f44x18[_0xe61d[60]]= _0xe61d[61];return BPromise[_0xe61d[19]]()[_0xe61d[18]](voiceQueueReport[_0xe61d[63]](_0x4f44x18))[_0xe61d[16]](loggerCatch(_0xe61d[62]))};exports[_0xe61d[64]]= function(_0x4f44x19,_0x4f44x1a){return BPromise[_0xe61d[19]]()[_0xe61d[18]](cmHopper[_0xe61d[64]](_0x4f44x19,_0x4f44x1a))[_0xe61d[16]](loggerCatch(_0xe61d[65]))};exports[_0xe61d[66]]= function(_0x4f44x10){return BPromise[_0xe61d[19]]()[_0xe61d[18]](cmHopper[_0xe61d[29]](_0x4f44x10,true,true))[_0xe61d[16]](loggerCatch(_0xe61d[67]))}
\ No newline at end of file
index 3a9eecb..17a09ad 100644 (file)
@@ -1 +1 @@
-var _0xe5bd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x70\x72\x65\x76\x69\x65\x77","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x58\x43\x41\x4C\x4C\x59\x5F\x49\x50\x5F\x41\x47\x49","\x65\x6E\x76","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31","\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x6C\x6F\x67\x67\x65\x72\x43\x61\x74\x63\x68","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x6C\x6F\x67\x67\x65\x72","\x69\x6E\x66\x6F","\x6C\x6F\x67\x67\x65\x72\x45\x72\x72\x6F\x72","\x6C\x6F\x67\x67\x65\x72\x32","\x6D\x65\x73\x73\x61\x67\x65","\x67\x65\x74\x43\x61\x6C\x6C\x65\x72\x49\x64","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x73\x74\x72\x69\x6E\x67","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x66\x6F\x72\x6D\x61\x74","\x22\x22\x20\x3C\x3E","\x69\x73\x41\x63\x74\x69\x76\x65","\x69\x73\x4E\x69\x6C","\x61\x64\x64\x56\x61\x72\x69\x61\x62\x6C\x65\x73","\x51\x75\x65\x75\x65","\x6E\x61\x6D\x65","","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x64\x69\x61\x6C\x65\x72","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x54\x69\x6D\x65\x6F\x75\x74","\x22\x72\x74\x54\x78\x58\x25\x73\x25\x73\x22","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x50\x72\x6F\x6A\x65\x63\x74\x32","\x67","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x69\x73\x45\x6D\x70\x74\x79","\x55\x28\x78\x63\x61\x6C\x6C\x79\x2D\x6D\x69\x78\x6D\x6F\x6E\x69\x74\x6F\x72\x2D\x63\x6F\x6E\x74\x65\x78\x74\x29","\x64\x69\x61\x6C\x50\x72\x65\x76\x69\x65\x77\x55\x72\x6C","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x50\x72\x6F\x6A\x65\x63\x74","\x22\x61\x67\x69\x3A\x2F\x2F\x25\x73\x2F\x73\x71\x75\x61\x72\x65\x2C\x25\x73\x22","\x4E\x4F\x4E\x45","\x25\x73","\x5F\x58\x43\x41\x4C\x4C\x59\x5F\x4D\x49\x58\x4D\x4F\x4E\x49\x54\x4F\x52\x5F\x46\x4F\x52\x4D\x41\x54","\x5F\x58\x43\x41\x4C\x4C\x59\x5F\x4D\x49\x58\x4D\x4F\x4E\x49\x54\x4F\x52\x5F\x55\x4E\x49\x51\x55\x45\x49\x44","\x43\x6F\x6E\x74\x61\x63\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x69\x64","\x74\x61\x67\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x25\x73\x25\x73","\x58\x4D\x44\x2D","\x74\x6F\x55\x70\x70\x65\x72","\x74\x6F\x4C\x6F\x77\x65\x72\x56\x61\x72\x69\x61\x62\x6C\x65\x73","\x74\x6F\x4C\x6F\x77\x65\x72","\x75\x70\x64\x61\x74\x65\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x64","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x64","\x5B\x75\x70\x64\x61\x74\x65\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x64\x5D\x20\x6F\x62\x6A\x65\x63\x74\x20\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x64\x20\x69\x73\x20\x6E\x65\x67\x61\x74\x69\x76\x65","\x5B\x75\x70\x64\x61\x74\x65\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x64\x5D\x20\x69\x73\x20\x6E\x75\x6C\x6C\x20\x6F\x72\x20\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6C\x6F\x67\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x73\x74\x61\x74\x65","\x73\x74\x61\x74\x65\x64\x65\x73\x63","\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x6C\x6F\x67\x41\x67\x65\x6E\x74","\x72\x69\x6E\x67\x74\x69\x6D\x65","\x6C\x6F\x67\x4C\x6F\x6F\x6B\x41\x67\x65\x6E\x74","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x55\x73\x65\x72\x49\x64","\x6C\x6F\x67\x43\x75\x73\x74\x6F\x6D\x65\x72","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x69\x73\x46\x61\x69\x6C\x75\x72\x65","\x46\x61\x69\x6C\x75\x72\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x41\x63\x74\x69\x6F\x6E","\x52\x45\x43\x41\x4C\x4C","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x42\x4F\x4F\x4B\x45\x44","\x75\x6E\x69\x71\x75\x65\x69\x64","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x63\x68\x61\x6E\x6E\x65\x6C\x41\x67\x65\x6E\x74","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x78\x63\x61\x6C\x6C\x79\x2D\x6D\x6F\x74\x69\x6F\x6E\x2D\x70\x72\x65\x76\x69\x65\x77","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x31","\x74\x69\x6D\x65\x6F\x75\x74","\x74\x6F\x74\x61\x6C\x47\x6C\x6F\x62\x61\x6C","\x63\x6F\x75\x6E\x74\x62\x75\x73\x79\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x6E\x6F\x61\x6E\x73\x77\x65\x72\x72\x65\x74\x72\x79","\x63\x6C\x6F\x6E\x65\x41\x63\x74\x69\x6F\x6E","\x63\x6C\x6F\x6E\x65","\x47\x6C\x6F\x62\x61\x6C","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x61\x63\x74\x69\x76\x65","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x6D\x69\x6E\x75\x74\x65\x73","\x61\x64\x64","\x4C\x69\x73\x74\x49\x64","\x64\x65\x63\x72\x65\x6D\x65\x6E\x74\x54\x61\x6C\x6B\x69\x6E\x6B","\x70\x54\x61\x6C\x6B\x69\x6E\x67","\x5B\x64\x65\x63\x72\x65\x6D\x65\x6E\x74\x54\x61\x6C\x6B\x69\x6E\x6B\x5D\x20\x6F\x62\x6A\x65\x63\x74\x20\x74\x61\x6C\x6B\x69\x6E\x67\x20\x69\x73\x20\x6E\x65\x67\x61\x74\x69\x76\x65","\x5B\x64\x65\x63\x72\x65\x6D\x65\x6E\x74\x54\x61\x6C\x6B\x69\x6E\x6B\x5D\x20\x69\x73\x20\x6E\x75\x6C\x6C\x20\x6F\x72\x20\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x49\x73\x4E\x6F\x74\x4C\x6F\x67\x67\x65\x64\x49\x6E","\x62\x75\x69\x6C\x64\x4F\x62\x6A","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x71\x75\x65\x75\x65","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x61\x67\x65\x6E\x74\x52\x65\x61\x64\x79\x49\x64","\x6E\x6F\x74\x5F\x69\x6E\x75\x73\x65","\x73\x74\x61\x74\x75\x73","\x72\x65\x61\x63\x68\x61\x62\x6C\x65","\x70\x75\x73\x68","\x67\x65\x74\x44\x69\x66\x66","\x63\x72\x65\x61\x74\x65\x42\x6F\x64\x79","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x66\x69\x6C\x74\x65\x72\x4B\x65\x79","\x69\x64\x43\x6F\x6E\x74\x61\x63\x74","\x74\x79\x70\x65","\x63\x61\x6D\x70\x61\x69\x67\x6E\x74\x79\x70\x65","\x64\x69\x61\x6C\x41\x6E\x73\x77\x65\x72","\x63\x6F\x75\x6E\x74\x67\x6C\x6F\x62\x61\x6C","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x61\x74","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x73\x69\x70\x63\x61\x6C\x6C\x69\x64","\x78\x6D\x64\x2D\x76\x6F\x69\x63\x65\x71\x75\x65\x75\x65\x69\x64","\x78\x6D\x64\x2D\x71\x75\x65\x75\x65","\x78\x6D\x64\x2D\x70\x68\x6F\x6E\x65","\x78\x6D\x64\x2D\x6C\x69\x73\x74\x69\x64","\x78\x6D\x64\x2D\x64\x69\x61\x6C\x75\x72\x6C","\x78\x6D\x64\x2D\x64\x69\x61\x6C\x74\x69\x6D\x65\x6F\x75\x74","\x78\x6D\x64\x2D\x64\x69\x61\x6C\x6F\x70\x74\x69\x6F\x6E\x73","\x78\x6D\x64\x2D\x64\x69\x61\x6C\x69\x64","\x78\x6D\x64\x2D\x64\x69\x61\x6C\x63\x68\x61\x6E\x6E\x65\x6C","\x78\x6D\x64\x2D\x63\x6F\x6E\x74\x61\x63\x74\x69\x64","\x78\x6D\x64\x2D\x63\x64\x72\x74\x79\x70\x65","\x78\x6D\x64\x2D\x63\x61\x6C\x6C\x65\x72\x69\x64","\x78\x6D\x64\x2D\x61\x67\x69\x61\x66\x74\x65\x72","\x78\x6D\x64\x2D\x61\x67\x69","\x72\x74\x70\x61\x75\x64\x69\x6F\x71\x6F\x73","\x72\x74\x70\x61\x75\x64\x69\x6F\x71\x6F\x73\x62\x72\x69\x64\x67\x65\x64","\x72\x74\x70\x61\x75\x64\x69\x6F\x71\x6F\x73\x6A\x69\x74\x74\x65\x72","\x72\x74\x70\x61\x75\x64\x69\x6F\x71\x6F\x73\x6A\x69\x74\x74\x65\x72\x62\x72\x69\x64\x67\x65\x64","\x72\x74\x70\x61\x75\x64\x69\x6F\x71\x6F\x73\x6C\x6F\x73\x73","\x72\x74\x70\x61\x75\x64\x69\x6F\x71\x6F\x73\x6C\x6F\x73\x73\x62\x72\x69\x64\x67\x65\x64","\x72\x74\x70\x61\x75\x64\x69\x6F\x71\x6F\x73\x72\x74\x74","\x72\x74\x70\x61\x75\x64\x69\x6F\x71\x6F\x73\x72\x74\x74\x62\x72\x69\x64\x67\x65\x64","\x62\x72\x69\x64\x67\x65\x70\x65\x65\x72","\x62\x72\x69\x64\x67\x65\x70\x76\x74\x63\x61\x6C\x6C\x69\x64"];_0xe5bd[0];var util=require(_0xe5bd[1]);var _=require(_0xe5bd[2]);var moment=require(_0xe5bd[3]);var logger=require(_0xe5bd[5])(_0xe5bd[4]);var ipAgi=process[_0xe5bd[7]][_0xe5bd[6]]|| _0xe5bd[8];function getSeconds(_0x8dbcx7,_0x8dbcx8){var _0x8dbcx9=moment(_0x8dbcx7)[_0xe5bd[9]](0);var _0x8dbcxa=moment(_0x8dbcx8)[_0xe5bd[9]](0);return _0x8dbcx9[_0xe5bd[11]](_0x8dbcxa,_0xe5bd[10])}exports[_0xe5bd[12]]= function(_0x8dbcxb){return function(_0x8dbcxc){logger[_0xe5bd[14]](_0x8dbcxb,util[_0xe5bd[13]](_0x8dbcxc,{showHidden:false,depth:null}))}};exports[_0xe5bd[15]]= function(_0x8dbcxb,_0x8dbcxd){logger[_0xe5bd[16]](_0x8dbcxb,util[_0xe5bd[13]](_0x8dbcxd,{showHidden:false,depth:null}))};exports[_0xe5bd[17]]= function(_0x8dbcxb,_0x8dbcxd){logger[_0xe5bd[14]](_0x8dbcxb,util[_0xe5bd[13]](_0x8dbcxd,{showHidden:false,depth:null}))};exports[_0xe5bd[18]]= function(_0x8dbcxb){return function(_0x8dbcxe){logger[_0xe5bd[16]](_0x8dbcxb,util[_0xe5bd[13]](_0x8dbcxe,{showHidden:false,depth:null}))}};exports[_0xe5bd[19]]= function(_0x8dbcxe,_0x8dbcxf,_0x8dbcx10){return {"\x6D\x65\x73\x73\x61\x67\x65":_0x8dbcxe,"\x75\x6E\x6C\x6F\x63\x6B":_0x8dbcxf,"\x61\x63\x74\x69\x76\x65":_0x8dbcx10}};exports[_0xe5bd[20]]= function(_0x8dbcx11,_0x8dbcx12,_0x8dbcx13){if(!_[_0xe5bd[21]](_0x8dbcx13)&& _0xe5bd[22]===  typeof _0x8dbcx13){if(!_[_0xe5bd[21]](_0x8dbcx12)&& _0xe5bd[22]===  typeof _0x8dbcx12){return util[_0xe5bd[24]](_0xe5bd[23],_0x8dbcx12,_0x8dbcx13)};return util[_0xe5bd[24]](_0xe5bd[23],_0x8dbcx13,_0x8dbcx13)};if(!_[_0xe5bd[21]](_0x8dbcx11)&& _0xe5bd[22]===  typeof _0x8dbcx11){return _0x8dbcx11};return _0xe5bd[25]};exports[_0xe5bd[26]]= function(_0x8dbcx10){if(_[_0xe5bd[27]](_0x8dbcx10)){return false};return _0x8dbcx10};exports[_0xe5bd[28]]= function(_0x8dbcx14,_0x8dbcx15,_0x8dbcx16,_0x8dbcx17,_0x8dbcx18){var _0x8dbcx19={"\x58\x4D\x44\x2D\x51\x55\x45\x55\x45":_0x8dbcx15[_0xe5bd[29]]?_0x8dbcx15[_0xe5bd[29]][_0xe5bd[30]]:_0xe5bd[31],"\x58\x4D\x44\x2D\x43\x41\x4C\x4C\x45\x52\x49\x44":_0x8dbcx17,"\x58\x4D\x44\x2D\x44\x49\x41\x4C\x49\x44":_0x8dbcx18,"\x58\x4D\x44\x2D\x43\x4F\x4E\x54\x41\x43\x54\x49\x44":_0x8dbcx15[_0xe5bd[32]],"\x58\x4D\x44\x2D\x43\x44\x52\x54\x59\x50\x45":_0xe5bd[33],"\x43\x41\x4C\x4C\x45\x52\x49\x44\x28\x61\x6C\x6C\x29":_0x8dbcx17,"\x58\x4D\x44\x2D\x56\x4F\x49\x43\x45\x51\x55\x45\x55\x45\x49\x44":_0x8dbcx15[_0xe5bd[34]],"\x58\x4D\x44\x2D\x44\x49\x41\x4C\x43\x48\x41\x4E\x4E\x45\x4C":_0x8dbcx16,"\x58\x4D\x44\x2D\x44\x49\x41\x4C\x54\x49\x4D\x45\x4F\x55\x54":(_0x8dbcx14[_0xe5bd[35]]|| 30),"\x58\x4D\x44\x2D\x44\x49\x41\x4C\x4F\x50\x54\x49\x4F\x4E\x53":util[_0xe5bd[24]](_0xe5bd[36],_0x8dbcx14[_0xe5bd[37]]?_0xe5bd[38]:_0xe5bd[31],_[_0xe5bd[40]](_0x8dbcx14[_0xe5bd[39]])?_0xe5bd[31]:_0xe5bd[41]),"\x58\x4D\x44\x2D\x44\x49\x41\x4C\x55\x52\x4C":(_0x8dbcx14[_0xe5bd[42]]|| _0xe5bd[31]),"\x58\x4D\x44\x2D\x41\x47\x49":_0x8dbcx14[_0xe5bd[43]]?util[_0xe5bd[24]](_0xe5bd[44],ipAgi,_0x8dbcx14[_0xe5bd[43]]):_0xe5bd[45],"\x58\x4D\x44\x2D\x41\x47\x49\x41\x46\x54\x45\x52":_0x8dbcx14[_0xe5bd[37]]?util[_0xe5bd[24]](_0xe5bd[44],ipAgi,_0x8dbcx14[_0xe5bd[37]]):_0xe5bd[45]};if(!_[_0xe5bd[40]](_0x8dbcx14[_0xe5bd[39]])){_0x8dbcx19[util[_0xe5bd[24]](_0xe5bd[46],_0xe5bd[47])]= _0x8dbcx14[_0xe5bd[39]];_0x8dbcx19[util[_0xe5bd[24]](_0xe5bd[46],_0xe5bd[48])]= _0x8dbcx18};if(_0x8dbcx15&& _0x8dbcx15[_0xe5bd[49]]){for(var _0x8dbcx1a in _0x8dbcx15[_0xe5bd[49]]){if(_0x8dbcx15[_0xe5bd[49]][_0xe5bd[50]](_0x8dbcx1a)){if(!_[_0xe5bd[27]](_0x8dbcx15[_0xe5bd[49]][_0x8dbcx1a])&& (_0x8dbcx1a!== _0xe5bd[51]) && (_0x8dbcx1a!== _0xe5bd[52]) && (_0x8dbcx1a!== _0xe5bd[53]) && (_0x8dbcx1a!== _0xe5bd[54])){_0x8dbcx19[util[_0xe5bd[24]](_0xe5bd[55],_0xe5bd[56],_[_0xe5bd[57]](_0x8dbcx1a))]= _0x8dbcx15[_0xe5bd[49]][_0x8dbcx1a]}}}};return _0x8dbcx19};exports[_0xe5bd[58]]= function(_0x8dbcx19){var _0x8dbcxd={};for(var _0x8dbcx1a in _0x8dbcx19){if(_0x8dbcx19[_0xe5bd[50]](_0x8dbcx1a)){_0x8dbcxd[util[_0xe5bd[24]](_0xe5bd[46],_[_0xe5bd[59]](_0x8dbcx1a))]= _0x8dbcx19[_0x8dbcx1a]}};return {variables:_0x8dbcxd}};exports[_0xe5bd[60]]= function(_0x8dbcxd){if(!_[_0xe5bd[27]](_0x8dbcxd)){if(_0x8dbcxd[_0xe5bd[50]](_0xe5bd[61])){if(_0x8dbcxd[_0xe5bd[61]]> 0){_0x8dbcxd[_0xe5bd[61]]-= 1}else {logger[_0xe5bd[14]](_0xe5bd[62])}}}else {logger[_0xe5bd[14]](_0xe5bd[63])}};exports[_0xe5bd[64]]= function(_0x8dbcx1b){var _0x8dbcx1c=moment()[_0xe5bd[24]](_0xe5bd[65]);_0x8dbcx1b[_0xe5bd[66]]= 13;_0x8dbcx1b[_0xe5bd[67]]= _0xe5bd[68];_0x8dbcx1b[_0xe5bd[69]]= _0x8dbcx1c;_0x8dbcx1b[_0xe5bd[70]]= _0x8dbcx1c;_0x8dbcx1b[_0xe5bd[71]]= _0x8dbcx1c};exports[_0xe5bd[72]]= function(_0x8dbcx1b,_0x8dbcx1d,_0x8dbcx1e){var _0x8dbcx1c=moment()[_0xe5bd[24]](_0xe5bd[65]);_0x8dbcx1b[_0xe5bd[66]]= _0x8dbcx1d;_0x8dbcx1b[_0xe5bd[67]]= _0x8dbcx1e;_0x8dbcx1b[_0xe5bd[70]]= _0x8dbcx1c;_0x8dbcx1b[_0xe5bd[73]]= getSeconds(_0x8dbcx1b[_0xe5bd[70]],_0x8dbcx1b[_0xe5bd[69]])};exports[_0xe5bd[74]]= function(_0x8dbcx1b,_0x8dbcx1f,_0x8dbcx20){_0x8dbcx1b[_0xe5bd[75]]= _0x8dbcx1f;_0x8dbcx1b[_0xe5bd[76]]= _0x8dbcx20};exports[_0xe5bd[77]]= function(_0x8dbcx1b,_0x8dbcx1d,_0x8dbcx1e){var _0x8dbcx1c=moment()[_0xe5bd[24]](_0xe5bd[65]);_0x8dbcx1b[_0xe5bd[66]]= _0x8dbcx1d;_0x8dbcx1b[_0xe5bd[67]]= _0x8dbcx1e;_0x8dbcx1b[_0xe5bd[70]]= _0x8dbcx1b[_0xe5bd[70]]?_0x8dbcx1b[_0xe5bd[70]]:_0x8dbcx1c;_0x8dbcx1b[_0xe5bd[71]]= _0x8dbcx1b[_0xe5bd[71]]?_0x8dbcx1b[_0xe5bd[71]]:_0x8dbcx1c;_0x8dbcx1b[_0xe5bd[73]]= getSeconds(_0x8dbcx1b[_0xe5bd[70]]|| 0,_0x8dbcx1b[_0xe5bd[69]]|| 0);_0x8dbcx1b[_0xe5bd[78]]= _0x8dbcx1b[_0xe5bd[79]]?getSeconds(_0x8dbcx1b[_0xe5bd[71]],_0x8dbcx1b[_0xe5bd[79]]):0};exports[_0xe5bd[80]]= function(_0x8dbcx21){return _0x8dbcx21=== _0xe5bd[81]};exports[_0xe5bd[82]]= function(_0x8dbcx1b,_0x8dbcx14,_0x8dbcx19,_0x8dbcx10,_0x8dbcx22){var _0x8dbcx23=_0x8dbcx10?_0xe5bd[83]:_0x8dbcx1b[_0xe5bd[84]];_0x8dbcx23= _0x8dbcx22?_0xe5bd[85]:_0x8dbcx23;return {actionid:_0x8dbcx1b[_0xe5bd[86]],action:_0xe5bd[87],channel:_0x8dbcx1b[_0xe5bd[88]],callerid:util[_0xe5bd[24]](_0xe5bd[23],_0x8dbcx23,_0x8dbcx1b[_0xe5bd[89]]),Exten:_0xe5bd[90],Context:_0xe5bd[91],Priority:_0xe5bd[92],variable:_0x8dbcx19,timeout:(_0x8dbcx14[_0xe5bd[93]]|| 30)* 1000,async:true,channelid:_0x8dbcx1b[_0xe5bd[86]]}};exports[_0xe5bd[94]]= function(_0x8dbcx1b){return _0x8dbcx1b[_0xe5bd[95]]+ _0x8dbcx1b[_0xe5bd[96]]+ _0x8dbcx1b[_0xe5bd[97]]};exports[_0xe5bd[98]]= function(_0x8dbcx1b){var _0x8dbcx24=_[_0xe5bd[99]](_0x8dbcx1b);_0x8dbcx24[_0xe5bd[66]]= 15;_0x8dbcx24[_0xe5bd[67]]= _0xe5bd[100];return _0x8dbcx24};exports[_0xe5bd[101]]= function(_0x8dbcx1b,_0x8dbcx25,_0x8dbcx26){var _0x8dbcxd={};_0x8dbcxd[_0x8dbcx25]= _0x8dbcx1b[_0x8dbcx25];_0x8dbcxd[_0xe5bd[102]]= false;_0x8dbcxd[_0xe5bd[103]]= moment()[_0xe5bd[105]](_0x8dbcx26,_0xe5bd[104])[_0xe5bd[24]](_0xe5bd[65]);_0x8dbcxd[_0xe5bd[32]]= _0x8dbcx1b[_0xe5bd[32]];_0x8dbcxd[_0xe5bd[106]]= _0x8dbcx1b[_0xe5bd[106]];_0x8dbcxd[_0xe5bd[34]]= _0x8dbcx1b[_0xe5bd[34]]|| undefined;return _0x8dbcxd};exports[_0xe5bd[107]]= function(_0x8dbcx14){if(!_[_0xe5bd[27]](_0x8dbcx14)){if(_0x8dbcx14[_0xe5bd[108]]> 0){_0x8dbcx14[_0xe5bd[108]]-= 1}else {logger[_0xe5bd[14]](_0xe5bd[109])}}else {logger[_0xe5bd[14]](_0xe5bd[110])}};exports[_0xe5bd[111]]= function(_0x8dbcx27){if(_0x8dbcx27<= 0){return true};return false};exports[_0xe5bd[112]]= function(_0x8dbcx1b,_0x8dbcx28){_0x8dbcx1b[_0xe5bd[113]]= _0x8dbcx28;_0x8dbcx1b[_0xe5bd[30]]= _0x8dbcx1b[_0xe5bd[114]];_0x8dbcx1b[_0xe5bd[115]]= _0x8dbcx1b[_0xe5bd[88]];return _0x8dbcx1b};exports[_0xe5bd[116]]= function(_0x8dbcx29){var _0x8dbcx2a=[];for(var _0x8dbcx2b in _0x8dbcx29){if(_0x8dbcx29[_0xe5bd[50]](_0x8dbcx2b)){if(!_[_0xe5bd[27]](_0x8dbcx29[_0x8dbcx2b])&& _0x8dbcx29[_0x8dbcx2b][_0xe5bd[66]]=== _0xe5bd[117] && _0x8dbcx29[_0x8dbcx2b][_0xe5bd[118]]=== _0xe5bd[119]){_0x8dbcx2a[_0xe5bd[120]](_0x8dbcx29[_0x8dbcx2b][_0xe5bd[51]])}}};return _0x8dbcx2a};exports[_0xe5bd[121]]= function(_0x8dbcx8){var _0x8dbcx9=moment()[_0xe5bd[9]](0);var _0x8dbcxa=moment(_0x8dbcx8)[_0xe5bd[9]](0);return _0x8dbcx9[_0xe5bd[11]](_0x8dbcxa,_0xe5bd[10])};exports[_0xe5bd[122]]= function(_0x8dbcx15){return {active:false,recallme:false,UserId:null,ContactId:_0x8dbcx15[_0xe5bd[32]],ListId:_0x8dbcx15[_0xe5bd[106]],VoiceQueueId:_0x8dbcx15[_0xe5bd[34]]|| undefined,CampaignId:_0x8dbcx15[_0xe5bd[123]]|| undefined}};exports[_0xe5bd[124]]= function(_0x8dbcx1a){if(_0x8dbcx1a=== _0xe5bd[86]|| _0x8dbcx1a=== _0xe5bd[125]|| _0x8dbcx1a=== _0xe5bd[114]|| _0x8dbcx1a=== _0xe5bd[126]|| _0x8dbcx1a=== _0xe5bd[127]|| _0x8dbcx1a=== _0xe5bd[128]|| _0x8dbcx1a=== _0xe5bd[75]|| _0x8dbcx1a=== _0xe5bd[88]|| _0x8dbcx1a=== _0xe5bd[84]|| _0x8dbcx1a=== _0xe5bd[102]|| _0x8dbcx1a=== _0xe5bd[89]|| _0x8dbcx1a=== _0xe5bd[103]|| _0x8dbcx1a=== _0xe5bd[95]|| _0x8dbcx1a=== _0xe5bd[96]|| _0x8dbcx1a=== _0xe5bd[97]|| _0x8dbcx1a=== _0xe5bd[129]|| _0x8dbcx1a=== _0xe5bd[130]|| _0x8dbcx1a=== _0xe5bd[131]|| _0x8dbcx1a=== _0xe5bd[132]|| _0x8dbcx1a=== _0xe5bd[133]|| _0x8dbcx1a=== _0xe5bd[32]|| _0x8dbcx1a=== _0xe5bd[106]|| _0x8dbcx1a=== _0xe5bd[76]|| _0x8dbcx1a=== _0xe5bd[34]|| _0x8dbcx1a=== _0xe5bd[134]|| _0x8dbcx1a=== _0xe5bd[135]|| _0x8dbcx1a=== _0xe5bd[136]|| _0x8dbcx1a=== _0xe5bd[137]|| _0x8dbcx1a=== _0xe5bd[138]|| _0x8dbcx1a=== _0xe5bd[139]|| _0x8dbcx1a=== _0xe5bd[140]|| _0x8dbcx1a=== _0xe5bd[141]|| _0x8dbcx1a=== _0xe5bd[142]|| _0x8dbcx1a=== _0xe5bd[143]|| _0x8dbcx1a=== _0xe5bd[144]|| _0x8dbcx1a=== _0xe5bd[145]|| _0x8dbcx1a=== _0xe5bd[146]|| _0x8dbcx1a=== _0xe5bd[147]|| _0x8dbcx1a=== _0xe5bd[148]|| _0x8dbcx1a=== _0xe5bd[149]|| _0x8dbcx1a=== _0xe5bd[150]|| _0x8dbcx1a=== _0xe5bd[151]|| _0x8dbcx1a=== _0xe5bd[152]|| _0x8dbcx1a=== _0xe5bd[153]|| _0x8dbcx1a=== _0xe5bd[154]|| _0x8dbcx1a=== _0xe5bd[155]|| _0x8dbcx1a=== _0xe5bd[156]|| _0x8dbcx1a=== _0xe5bd[149]|| _0x8dbcx1a=== _0xe5bd[150]|| _0x8dbcx1a=== _0xe5bd[151]|| _0x8dbcx1a=== _0xe5bd[152]|| _0x8dbcx1a=== _0xe5bd[153]|| _0x8dbcx1a=== _0xe5bd[154]|| _0x8dbcx1a=== _0xe5bd[155]|| _0x8dbcx1a=== _0xe5bd[156]|| _0x8dbcx1a=== _0xe5bd[157]|| _0x8dbcx1a=== _0xe5bd[158]|| _0x8dbcx1a=== _0xe5bd[66]|| _0x8dbcx1a=== _0xe5bd[67]){return false};return true}
\ No newline at end of file
+var _0x8ea3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x70\x72\x65\x76\x69\x65\x77","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x58\x43\x41\x4C\x4C\x59\x5F\x49\x50\x5F\x41\x47\x49","\x65\x6E\x76","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31","\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x6C\x6F\x67\x67\x65\x72\x43\x61\x74\x63\x68","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x6C\x6F\x67\x67\x65\x72","\x69\x6E\x66\x6F","\x6C\x6F\x67\x67\x65\x72\x45\x72\x72\x6F\x72","\x6C\x6F\x67\x67\x65\x72\x32","\x6D\x65\x73\x73\x61\x67\x65","\x67\x65\x74\x43\x61\x6C\x6C\x65\x72\x49\x64","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x73\x74\x72\x69\x6E\x67","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x66\x6F\x72\x6D\x61\x74","\x22\x22\x20\x3C\x3E","\x69\x73\x41\x63\x74\x69\x76\x65","\x69\x73\x4E\x69\x6C","\x61\x64\x64\x56\x61\x72\x69\x61\x62\x6C\x65\x73","\x51\x75\x65\x75\x65","\x6E\x61\x6D\x65","","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x64\x69\x61\x6C\x65\x72","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x54\x69\x6D\x65\x6F\x75\x74","\x22\x72\x74\x54\x78\x58\x25\x73\x25\x73\x22","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x50\x72\x6F\x6A\x65\x63\x74\x32","\x67","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x69\x73\x45\x6D\x70\x74\x79","\x55\x28\x78\x63\x61\x6C\x6C\x79\x2D\x6D\x69\x78\x6D\x6F\x6E\x69\x74\x6F\x72\x2D\x63\x6F\x6E\x74\x65\x78\x74\x29","\x64\x69\x61\x6C\x50\x72\x65\x76\x69\x65\x77\x55\x72\x6C","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x50\x72\x6F\x6A\x65\x63\x74","\x22\x61\x67\x69\x3A\x2F\x2F\x25\x73\x2F\x73\x71\x75\x61\x72\x65\x2C\x25\x73\x22","\x4E\x4F\x4E\x45","\x25\x73","\x5F\x58\x43\x41\x4C\x4C\x59\x5F\x4D\x49\x58\x4D\x4F\x4E\x49\x54\x4F\x52\x5F\x46\x4F\x52\x4D\x41\x54","\x5F\x58\x43\x41\x4C\x4C\x59\x5F\x4D\x49\x58\x4D\x4F\x4E\x49\x54\x4F\x52\x5F\x55\x4E\x49\x51\x55\x45\x49\x44","\x43\x6F\x6E\x74\x61\x63\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x69\x64","\x74\x61\x67\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x25\x73\x25\x73","\x58\x4D\x44\x2D","\x74\x6F\x55\x70\x70\x65\x72","\x74\x6F\x4C\x6F\x77\x65\x72\x56\x61\x72\x69\x61\x62\x6C\x65\x73","\x74\x6F\x4C\x6F\x77\x65\x72","\x75\x70\x64\x61\x74\x65\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x64","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x64","\x5B\x75\x70\x64\x61\x74\x65\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x64\x5D\x20\x6F\x62\x6A\x65\x63\x74\x20\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x64\x20\x69\x73\x20\x6E\x65\x67\x61\x74\x69\x76\x65","\x5B\x75\x70\x64\x61\x74\x65\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x64\x5D\x20\x69\x73\x20\x6E\x75\x6C\x6C\x20\x6F\x72\x20\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6C\x6F\x67\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x73\x74\x61\x74\x65","\x73\x74\x61\x74\x65\x64\x65\x73\x63","\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x6C\x6F\x67\x41\x67\x65\x6E\x74","\x72\x69\x6E\x67\x74\x69\x6D\x65","\x6C\x6F\x67\x4C\x6F\x6F\x6B\x41\x67\x65\x6E\x74","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x55\x73\x65\x72\x49\x64","\x6C\x6F\x67\x43\x75\x73\x74\x6F\x6D\x65\x72","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x69\x73\x46\x61\x69\x6C\x75\x72\x65","\x46\x61\x69\x6C\x75\x72\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x41\x63\x74\x69\x6F\x6E","\x52\x45\x43\x41\x4C\x4C","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x42\x4F\x4F\x4B\x45\x44","\x75\x6E\x69\x71\x75\x65\x69\x64","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x63\x68\x61\x6E\x6E\x65\x6C\x41\x67\x65\x6E\x74","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x78\x63\x61\x6C\x6C\x79\x2D\x6D\x6F\x74\x69\x6F\x6E\x2D\x70\x72\x65\x76\x69\x65\x77","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x31","\x74\x69\x6D\x65\x6F\x75\x74","\x74\x6F\x74\x61\x6C\x47\x6C\x6F\x62\x61\x6C","\x63\x6F\x75\x6E\x74\x62\x75\x73\x79\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x63\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x72\x65\x74\x72\x79","\x63\x6F\x75\x6E\x74\x6E\x6F\x61\x6E\x73\x77\x65\x72\x72\x65\x74\x72\x79","\x63\x6C\x6F\x6E\x65\x41\x63\x74\x69\x6F\x6E","\x63\x6C\x6F\x6E\x65","\x47\x6C\x6F\x62\x61\x6C","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x61\x63\x74\x69\x76\x65","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x6D\x69\x6E\x75\x74\x65\x73","\x61\x64\x64","\x4C\x69\x73\x74\x49\x64","\x64\x65\x63\x72\x65\x6D\x65\x6E\x74\x54\x61\x6C\x6B\x69\x6E\x6B","\x70\x54\x61\x6C\x6B\x69\x6E\x67","\x5B\x64\x65\x63\x72\x65\x6D\x65\x6E\x74\x54\x61\x6C\x6B\x69\x6E\x6B\x5D\x20\x6F\x62\x6A\x65\x63\x74\x20\x74\x61\x6C\x6B\x69\x6E\x67\x20\x69\x73\x20\x6E\x65\x67\x61\x74\x69\x76\x65","\x5B\x64\x65\x63\x72\x65\x6D\x65\x6E\x74\x54\x61\x6C\x6B\x69\x6E\x6B\x5D\x20\x69\x73\x20\x6E\x75\x6C\x6C\x20\x6F\x72\x20\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x49\x73\x4E\x6F\x74\x4C\x6F\x67\x67\x65\x64\x49\x6E","\x62\x75\x69\x6C\x64\x4F\x62\x6A","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x71\x75\x65\x75\x65","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x61\x67\x65\x6E\x74\x52\x65\x61\x64\x79\x49\x64","\x6E\x6F\x74\x5F\x69\x6E\x75\x73\x65","\x73\x74\x61\x74\x75\x73","\x72\x65\x61\x63\x68\x61\x62\x6C\x65","\x70\x75\x73\x68","\x67\x65\x74\x44\x69\x66\x66","\x63\x72\x65\x61\x74\x65\x42\x6F\x64\x79","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x66\x69\x6C\x74\x65\x72\x4B\x65\x79","\x69\x64\x43\x6F\x6E\x74\x61\x63\x74","\x74\x79\x70\x65","\x63\x61\x6D\x70\x61\x69\x67\x6E\x74\x79\x70\x65","\x64\x69\x61\x6C\x41\x6E\x73\x77\x65\x72","\x63\x6F\x75\x6E\x74\x67\x6C\x6F\x62\x61\x6C","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x61\x74","\x72\x65\x63\x61\x6C\x6C\x6D\x65","\x73\x69\x70\x63\x61\x6C\x6C\x69\x64","\x78\x6D\x64\x2D\x76\x6F\x69\x63\x65\x71\x75\x65\x75\x65\x69\x64","\x78\x6D\x64\x2D\x71\x75\x65\x75\x65","\x78\x6D\x64\x2D\x70\x68\x6F\x6E\x65","\x78\x6D\x64\x2D\x6C\x69\x73\x74\x69\x64","\x78\x6D\x64\x2D\x64\x69\x61\x6C\x75\x72\x6C","\x78\x6D\x64\x2D\x64\x69\x61\x6C\x74\x69\x6D\x65\x6F\x75\x74","\x78\x6D\x64\x2D\x64\x69\x61\x6C\x6F\x70\x74\x69\x6F\x6E\x73","\x78\x6D\x64\x2D\x64\x69\x61\x6C\x69\x64","\x78\x6D\x64\x2D\x64\x69\x61\x6C\x63\x68\x61\x6E\x6E\x65\x6C","\x78\x6D\x64\x2D\x63\x6F\x6E\x74\x61\x63\x74\x69\x64","\x78\x6D\x64\x2D\x63\x64\x72\x74\x79\x70\x65","\x78\x6D\x64\x2D\x63\x61\x6C\x6C\x65\x72\x69\x64","\x78\x6D\x64\x2D\x61\x67\x69\x61\x66\x74\x65\x72","\x78\x6D\x64\x2D\x61\x67\x69","\x72\x74\x70\x61\x75\x64\x69\x6F\x71\x6F\x73","\x72\x74\x70\x61\x75\x64\x69\x6F\x71\x6F\x73\x62\x72\x69\x64\x67\x65\x64","\x72\x74\x70\x61\x75\x64\x69\x6F\x71\x6F\x73\x6A\x69\x74\x74\x65\x72","\x72\x74\x70\x61\x75\x64\x69\x6F\x71\x6F\x73\x6A\x69\x74\x74\x65\x72\x62\x72\x69\x64\x67\x65\x64","\x72\x74\x70\x61\x75\x64\x69\x6F\x71\x6F\x73\x6C\x6F\x73\x73","\x72\x74\x70\x61\x75\x64\x69\x6F\x71\x6F\x73\x6C\x6F\x73\x73\x62\x72\x69\x64\x67\x65\x64","\x72\x74\x70\x61\x75\x64\x69\x6F\x71\x6F\x73\x72\x74\x74","\x72\x74\x70\x61\x75\x64\x69\x6F\x71\x6F\x73\x72\x74\x74\x62\x72\x69\x64\x67\x65\x64","\x62\x72\x69\x64\x67\x65\x70\x65\x65\x72","\x62\x72\x69\x64\x67\x65\x70\x76\x74\x63\x61\x6C\x6C\x69\x64"];_0x8ea3[0];var util=require(_0x8ea3[1]);var _=require(_0x8ea3[2]);var moment=require(_0x8ea3[3]);var logger=require(_0x8ea3[5])(_0x8ea3[4]);var ipAgi=process[_0x8ea3[7]][_0x8ea3[6]]|| _0x8ea3[8];function getSeconds(_0x15e6x7,_0x15e6x8){var _0x15e6x9=moment(_0x15e6x7)[_0x8ea3[9]](0);var _0x15e6xa=moment(_0x15e6x8)[_0x8ea3[9]](0);return _0x15e6x9[_0x8ea3[11]](_0x15e6xa,_0x8ea3[10])}exports[_0x8ea3[12]]= function(_0x15e6xb){return function(_0x15e6xc){logger[_0x8ea3[14]](_0x15e6xb,util[_0x8ea3[13]](_0x15e6xc,{showHidden:false,depth:null}))}};exports[_0x8ea3[15]]= function(_0x15e6xb,_0x15e6xd){logger[_0x8ea3[16]](_0x15e6xb,util[_0x8ea3[13]](_0x15e6xd,{showHidden:false,depth:null}))};exports[_0x8ea3[17]]= function(_0x15e6xb,_0x15e6xd){logger[_0x8ea3[14]](_0x15e6xb,util[_0x8ea3[13]](_0x15e6xd,{showHidden:false,depth:null}))};exports[_0x8ea3[18]]= function(_0x15e6xb){return function(_0x15e6xe){logger[_0x8ea3[16]](_0x15e6xb,util[_0x8ea3[13]](_0x15e6xe,{showHidden:false,depth:null}))}};exports[_0x8ea3[19]]= function(_0x15e6xe,_0x15e6xf,_0x15e6x10){return {"\x6D\x65\x73\x73\x61\x67\x65":_0x15e6xe,"\x75\x6E\x6C\x6F\x63\x6B":_0x15e6xf,"\x61\x63\x74\x69\x76\x65":_0x15e6x10}};exports[_0x8ea3[20]]= function(_0x15e6x11,_0x15e6x12,_0x15e6x13){if(!_[_0x8ea3[21]](_0x15e6x13)&& _0x8ea3[22]===  typeof _0x15e6x13){if(!_[_0x8ea3[21]](_0x15e6x12)&& _0x8ea3[22]===  typeof _0x15e6x12){return util[_0x8ea3[24]](_0x8ea3[23],_0x15e6x12,_0x15e6x13)};return util[_0x8ea3[24]](_0x8ea3[23],_0x15e6x13,_0x15e6x13)};if(!_[_0x8ea3[21]](_0x15e6x11)&& _0x8ea3[22]===  typeof _0x15e6x11){return _0x15e6x11};return _0x8ea3[25]};exports[_0x8ea3[26]]= function(_0x15e6x10){if(_[_0x8ea3[27]](_0x15e6x10)){return false};return _0x15e6x10};exports[_0x8ea3[28]]= function(_0x15e6x14,_0x15e6x15,_0x15e6x16,_0x15e6x17,_0x15e6x18){var _0x15e6x19={"\x58\x4D\x44\x2D\x51\x55\x45\x55\x45":_0x15e6x15[_0x8ea3[29]]?_0x15e6x15[_0x8ea3[29]][_0x8ea3[30]]:_0x8ea3[31],"\x58\x4D\x44\x2D\x43\x41\x4C\x4C\x45\x52\x49\x44":_0x15e6x17,"\x58\x4D\x44\x2D\x44\x49\x41\x4C\x49\x44":_0x15e6x18,"\x58\x4D\x44\x2D\x43\x4F\x4E\x54\x41\x43\x54\x49\x44":_0x15e6x15[_0x8ea3[32]],"\x58\x4D\x44\x2D\x43\x44\x52\x54\x59\x50\x45":_0x8ea3[33],"\x43\x41\x4C\x4C\x45\x52\x49\x44\x28\x61\x6C\x6C\x29":_0x15e6x17,"\x58\x4D\x44\x2D\x56\x4F\x49\x43\x45\x51\x55\x45\x55\x45\x49\x44":_0x15e6x15[_0x8ea3[34]],"\x58\x4D\x44\x2D\x44\x49\x41\x4C\x43\x48\x41\x4E\x4E\x45\x4C":_0x15e6x16,"\x58\x4D\x44\x2D\x44\x49\x41\x4C\x54\x49\x4D\x45\x4F\x55\x54":(_0x15e6x14[_0x8ea3[35]]|| 30),"\x58\x4D\x44\x2D\x44\x49\x41\x4C\x4F\x50\x54\x49\x4F\x4E\x53":util[_0x8ea3[24]](_0x8ea3[36],_0x15e6x14[_0x8ea3[37]]?_0x8ea3[38]:_0x8ea3[31],_[_0x8ea3[40]](_0x15e6x14[_0x8ea3[39]])?_0x8ea3[31]:_0x8ea3[41]),"\x58\x4D\x44\x2D\x44\x49\x41\x4C\x55\x52\x4C":(_0x15e6x14[_0x8ea3[42]]|| _0x8ea3[31]),"\x58\x4D\x44\x2D\x41\x47\x49":_0x15e6x14[_0x8ea3[43]]?util[_0x8ea3[24]](_0x8ea3[44],ipAgi,_0x15e6x14[_0x8ea3[43]]):_0x8ea3[45],"\x58\x4D\x44\x2D\x41\x47\x49\x41\x46\x54\x45\x52":_0x15e6x14[_0x8ea3[37]]?util[_0x8ea3[24]](_0x8ea3[44],ipAgi,_0x15e6x14[_0x8ea3[37]]):_0x8ea3[45]};if(!_[_0x8ea3[40]](_0x15e6x14[_0x8ea3[39]])){_0x15e6x19[util[_0x8ea3[24]](_0x8ea3[46],_0x8ea3[47])]= _0x15e6x14[_0x8ea3[39]];_0x15e6x19[util[_0x8ea3[24]](_0x8ea3[46],_0x8ea3[48])]= _0x15e6x18};if(_0x15e6x15&& _0x15e6x15[_0x8ea3[49]]){for(var _0x15e6x1a in _0x15e6x15[_0x8ea3[49]]){if(_0x15e6x15[_0x8ea3[49]][_0x8ea3[50]](_0x15e6x1a)){if(!_[_0x8ea3[27]](_0x15e6x15[_0x8ea3[49]][_0x15e6x1a])&& (_0x15e6x1a!== _0x8ea3[51]) && (_0x15e6x1a!== _0x8ea3[52]) && (_0x15e6x1a!== _0x8ea3[53]) && (_0x15e6x1a!== _0x8ea3[54])){_0x15e6x19[util[_0x8ea3[24]](_0x8ea3[55],_0x8ea3[56],_[_0x8ea3[57]](_0x15e6x1a))]= _0x15e6x15[_0x8ea3[49]][_0x15e6x1a]}}}};return _0x15e6x19};exports[_0x8ea3[58]]= function(_0x15e6x19){var _0x15e6xd={};for(var _0x15e6x1a in _0x15e6x19){if(_0x15e6x19[_0x8ea3[50]](_0x15e6x1a)){_0x15e6xd[util[_0x8ea3[24]](_0x8ea3[46],_[_0x8ea3[59]](_0x15e6x1a))]= _0x15e6x19[_0x15e6x1a]}};return {variables:_0x15e6xd}};exports[_0x8ea3[60]]= function(_0x15e6xd){if(!_[_0x8ea3[27]](_0x15e6xd)){if(_0x15e6xd[_0x8ea3[50]](_0x8ea3[61])){if(_0x15e6xd[_0x8ea3[61]]> 0){_0x15e6xd[_0x8ea3[61]]-= 1}else {logger[_0x8ea3[14]](_0x8ea3[62])}}}else {logger[_0x8ea3[14]](_0x8ea3[63])}};exports[_0x8ea3[64]]= function(_0x15e6x1b){var _0x15e6x1c=moment()[_0x8ea3[24]](_0x8ea3[65]);_0x15e6x1b[_0x8ea3[66]]= 13;_0x15e6x1b[_0x8ea3[67]]= _0x8ea3[68];_0x15e6x1b[_0x8ea3[69]]= _0x15e6x1c;_0x15e6x1b[_0x8ea3[70]]= _0x15e6x1c;_0x15e6x1b[_0x8ea3[71]]= _0x15e6x1c};exports[_0x8ea3[72]]= function(_0x15e6x1b,_0x15e6x1d,_0x15e6x1e){var _0x15e6x1c=moment()[_0x8ea3[24]](_0x8ea3[65]);_0x15e6x1b[_0x8ea3[66]]= _0x15e6x1d;_0x15e6x1b[_0x8ea3[67]]= _0x15e6x1e;_0x15e6x1b[_0x8ea3[70]]= _0x15e6x1c;_0x15e6x1b[_0x8ea3[73]]= getSeconds(_0x15e6x1b[_0x8ea3[70]],_0x15e6x1b[_0x8ea3[69]])};exports[_0x8ea3[74]]= function(_0x15e6x1b,_0x15e6x1f,_0x15e6x20){_0x15e6x1b[_0x8ea3[75]]= _0x15e6x1f;_0x15e6x1b[_0x8ea3[76]]= _0x15e6x20};exports[_0x8ea3[77]]= function(_0x15e6x1b,_0x15e6x1d,_0x15e6x1e){var _0x15e6x1c=moment()[_0x8ea3[24]](_0x8ea3[65]);_0x15e6x1b[_0x8ea3[66]]= _0x15e6x1d;_0x15e6x1b[_0x8ea3[67]]= _0x15e6x1e;_0x15e6x1b[_0x8ea3[70]]= _0x15e6x1b[_0x8ea3[70]]?_0x15e6x1b[_0x8ea3[70]]:_0x15e6x1c;_0x15e6x1b[_0x8ea3[71]]= _0x15e6x1b[_0x8ea3[71]]?_0x15e6x1b[_0x8ea3[71]]:_0x15e6x1c;_0x15e6x1b[_0x8ea3[73]]= getSeconds(_0x15e6x1b[_0x8ea3[70]]|| 0,_0x15e6x1b[_0x8ea3[69]]|| 0);_0x15e6x1b[_0x8ea3[78]]= _0x15e6x1b[_0x8ea3[79]]?getSeconds(_0x15e6x1b[_0x8ea3[71]],_0x15e6x1b[_0x8ea3[79]]):0};exports[_0x8ea3[80]]= function(_0x15e6x21){return _0x15e6x21=== _0x8ea3[81]};exports[_0x8ea3[82]]= function(_0x15e6x1b,_0x15e6x14,_0x15e6x19,_0x15e6x10,_0x15e6x22){var _0x15e6x23=_0x15e6x10?_0x8ea3[83]:_0x15e6x1b[_0x8ea3[84]];_0x15e6x23= _0x15e6x22?_0x8ea3[85]:_0x15e6x23;return {actionid:_0x15e6x1b[_0x8ea3[86]],action:_0x8ea3[87],channel:_0x15e6x1b[_0x8ea3[88]],callerid:util[_0x8ea3[24]](_0x8ea3[23],_0x15e6x23,_0x15e6x1b[_0x8ea3[89]]),Exten:_0x8ea3[90],Context:_0x8ea3[91],Priority:_0x8ea3[92],variable:_0x15e6x19,timeout:(_0x15e6x14[_0x8ea3[93]]|| 30)* 1000,async:true,channelid:_0x15e6x1b[_0x8ea3[86]]}};exports[_0x8ea3[94]]= function(_0x15e6x1b){return _0x15e6x1b[_0x8ea3[95]]+ _0x15e6x1b[_0x8ea3[96]]+ _0x15e6x1b[_0x8ea3[97]]};exports[_0x8ea3[98]]= function(_0x15e6x1b){var _0x15e6x24=_[_0x8ea3[99]](_0x15e6x1b);_0x15e6x24[_0x8ea3[66]]= 15;_0x15e6x24[_0x8ea3[67]]= _0x8ea3[100];return _0x15e6x24};exports[_0x8ea3[101]]= function(_0x15e6x1b,_0x15e6x25,_0x15e6x26){var _0x15e6xd={};_0x15e6xd[_0x15e6x25]= _0x15e6x1b[_0x15e6x25];_0x15e6xd[_0x8ea3[102]]= false;_0x15e6xd[_0x8ea3[103]]= moment()[_0x8ea3[105]](_0x15e6x26,_0x8ea3[104])[_0x8ea3[24]](_0x8ea3[65]);_0x15e6xd[_0x8ea3[32]]= _0x15e6x1b[_0x8ea3[32]];_0x15e6xd[_0x8ea3[106]]= _0x15e6x1b[_0x8ea3[106]];_0x15e6xd[_0x8ea3[34]]= _0x15e6x1b[_0x8ea3[34]]|| undefined;return _0x15e6xd};exports[_0x8ea3[107]]= function(_0x15e6x14){if(!_[_0x8ea3[27]](_0x15e6x14)){if(_0x15e6x14[_0x8ea3[108]]> 0){_0x15e6x14[_0x8ea3[108]]-= 1}else {logger[_0x8ea3[14]](_0x8ea3[109])}}else {logger[_0x8ea3[14]](_0x8ea3[110])}};exports[_0x8ea3[111]]= function(_0x15e6x27){if(_0x15e6x27<= 0){return true};return false};exports[_0x8ea3[112]]= function(_0x15e6x1b,_0x15e6x28){_0x15e6x1b[_0x8ea3[113]]= _0x15e6x28;_0x15e6x1b[_0x8ea3[30]]= _0x15e6x1b[_0x8ea3[114]];_0x15e6x1b[_0x8ea3[115]]= _0x15e6x1b[_0x8ea3[88]];return _0x15e6x1b};exports[_0x8ea3[116]]= function(_0x15e6x29){var _0x15e6x2a=[];for(var _0x15e6x2b in _0x15e6x29){if(_0x15e6x29[_0x8ea3[50]](_0x15e6x2b)){if(!_[_0x8ea3[27]](_0x15e6x29[_0x15e6x2b])&& _0x15e6x29[_0x15e6x2b][_0x8ea3[66]]=== _0x8ea3[117] && _0x15e6x29[_0x15e6x2b][_0x8ea3[118]]=== _0x8ea3[119]){_0x15e6x2a[_0x8ea3[120]](_0x15e6x29[_0x15e6x2b][_0x8ea3[51]])}}};return _0x15e6x2a};exports[_0x8ea3[121]]= function(_0x15e6x8){var _0x15e6x9=moment()[_0x8ea3[9]](0);var _0x15e6xa=moment(_0x15e6x8)[_0x8ea3[9]](0);return _0x15e6x9[_0x8ea3[11]](_0x15e6xa,_0x8ea3[10])};exports[_0x8ea3[122]]= function(_0x15e6x15){return {active:false,recallme:false,UserId:null,ContactId:_0x15e6x15[_0x8ea3[32]],ListId:_0x15e6x15[_0x8ea3[106]],VoiceQueueId:_0x15e6x15[_0x8ea3[34]]|| undefined,CampaignId:_0x15e6x15[_0x8ea3[123]]|| undefined}};exports[_0x8ea3[124]]= function(_0x15e6x1a){if(_0x15e6x1a=== _0x8ea3[86]|| _0x15e6x1a=== _0x8ea3[125]|| _0x15e6x1a=== _0x8ea3[114]|| _0x15e6x1a=== _0x8ea3[126]|| _0x15e6x1a=== _0x8ea3[127]|| _0x15e6x1a=== _0x8ea3[128]|| _0x15e6x1a=== _0x8ea3[75]|| _0x15e6x1a=== _0x8ea3[88]|| _0x15e6x1a=== _0x8ea3[84]|| _0x15e6x1a=== _0x8ea3[102]|| _0x15e6x1a=== _0x8ea3[89]|| _0x15e6x1a=== _0x8ea3[103]|| _0x15e6x1a=== _0x8ea3[95]|| _0x15e6x1a=== _0x8ea3[96]|| _0x15e6x1a=== _0x8ea3[97]|| _0x15e6x1a=== _0x8ea3[129]|| _0x15e6x1a=== _0x8ea3[130]|| _0x15e6x1a=== _0x8ea3[131]|| _0x15e6x1a=== _0x8ea3[132]|| _0x15e6x1a=== _0x8ea3[133]|| _0x15e6x1a=== _0x8ea3[32]|| _0x15e6x1a=== _0x8ea3[106]|| _0x15e6x1a=== _0x8ea3[76]|| _0x15e6x1a=== _0x8ea3[34]|| _0x15e6x1a=== _0x8ea3[134]|| _0x15e6x1a=== _0x8ea3[135]|| _0x15e6x1a=== _0x8ea3[136]|| _0x15e6x1a=== _0x8ea3[137]|| _0x15e6x1a=== _0x8ea3[138]|| _0x15e6x1a=== _0x8ea3[139]|| _0x15e6x1a=== _0x8ea3[140]|| _0x15e6x1a=== _0x8ea3[141]|| _0x15e6x1a=== _0x8ea3[142]|| _0x15e6x1a=== _0x8ea3[143]|| _0x15e6x1a=== _0x8ea3[144]|| _0x15e6x1a=== _0x8ea3[145]|| _0x15e6x1a=== _0x8ea3[146]|| _0x15e6x1a=== _0x8ea3[147]|| _0x15e6x1a=== _0x8ea3[148]|| _0x15e6x1a=== _0x8ea3[149]|| _0x15e6x1a=== _0x8ea3[150]|| _0x15e6x1a=== _0x8ea3[151]|| _0x15e6x1a=== _0x8ea3[152]|| _0x15e6x1a=== _0x8ea3[153]|| _0x15e6x1a=== _0x8ea3[154]|| _0x15e6x1a=== _0x8ea3[155]|| _0x15e6x1a=== _0x8ea3[156]|| _0x15e6x1a=== _0x8ea3[149]|| _0x15e6x1a=== _0x8ea3[150]|| _0x15e6x1a=== _0x8ea3[151]|| _0x15e6x1a=== _0x8ea3[152]|| _0x15e6x1a=== _0x8ea3[153]|| _0x15e6x1a=== _0x8ea3[154]|| _0x15e6x1a=== _0x8ea3[155]|| _0x15e6x1a=== _0x8ea3[156]|| _0x15e6x1a=== _0x8ea3[157]|| _0x15e6x1a=== _0x8ea3[158]|| _0x15e6x1a=== _0x8ea3[66]|| _0x15e6x1a=== _0x8ea3[67]){return false};return true}
\ No newline at end of file
index 84c21d9..c142e8d 100644 (file)
@@ -1 +1 @@
-var _0xdd88=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x71\x75\x65\x75\x65\x61\x64\x64","\x73\x74\x72\x69\x6E\x67","\x6E\x75\x6D\x62\x65\x72","\x62\x6F\x6F\x6C\x65\x61\x6E","\x71\x75\x65\x75\x65\x72\x65\x6D\x6F\x76\x65","\x71\x75\x65\x75\x65\x70\x61\x75\x73\x65","\x72\x65\x6C\x6F\x61\x64","\x76\x6F\x69\x63\x65\x71\x75\x65\x75\x65\x63\x68\x61\x6E\x6E\x65\x6C","\x76\x6F\x69\x63\x65\x63\x68\x61\x6E\x6E\x65\x6C","\x76\x6F\x69\x63\x65\x71\x75\x65\x75\x65\x63\x68\x61\x6E\x6E\x65\x6C\x68\x61\x6E\x67\x75\x70","\x76\x6F\x69\x63\x65\x71\x75\x65\x75\x65\x63\x68\x61\x6E\x6E\x65\x6C\x72\x65\x64\x69\x72\x65\x63\x74"];_0xdd88[0];exports[_0xdd88[1]]= {queue:{type:_0xdd88[2],required:true},interface:{type:_0xdd88[2],required:true},membername:{type:_0xdd88[2],required:true},penalty:{type:_0xdd88[3],required:false},paused:{type:_0xdd88[4],required:false}};exports[_0xdd88[5]]= {queue:{type:_0xdd88[2],required:true},interface:{type:_0xdd88[2],required:true}};exports[_0xdd88[6]]= {interface:{type:_0xdd88[2],required:true},paused:{type:_0xdd88[4]},reason:{type:_0xdd88[2],required:false}};exports[_0xdd88[7]]= {module:{type:_0xdd88[2],required:false}};exports[_0xdd88[8]]= {uniqueid:{type:_0xdd88[2],required:true}};exports[_0xdd88[9]]= {uniqueid:{type:_0xdd88[2],required:true},filename:{type:_0xdd88[2]},format:{type:_0xdd88[2]},mixmonitorid:{type:_0xdd88[2]}};exports[_0xdd88[10]]= {uniqueid:{type:_0xdd88[2],required:true}};exports[_0xdd88[11]]= {uniqueid:{type:_0xdd88[2],required:true},exten:{type:_0xdd88[2],required:true}}
\ No newline at end of file
+var _0x9447=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x71\x75\x65\x75\x65\x61\x64\x64","\x73\x74\x72\x69\x6E\x67","\x6E\x75\x6D\x62\x65\x72","\x62\x6F\x6F\x6C\x65\x61\x6E","\x71\x75\x65\x75\x65\x72\x65\x6D\x6F\x76\x65","\x71\x75\x65\x75\x65\x70\x61\x75\x73\x65","\x72\x65\x6C\x6F\x61\x64","\x76\x6F\x69\x63\x65\x71\x75\x65\x75\x65\x63\x68\x61\x6E\x6E\x65\x6C","\x76\x6F\x69\x63\x65\x63\x68\x61\x6E\x6E\x65\x6C","\x76\x6F\x69\x63\x65\x71\x75\x65\x75\x65\x63\x68\x61\x6E\x6E\x65\x6C\x68\x61\x6E\x67\x75\x70","\x76\x6F\x69\x63\x65\x71\x75\x65\x75\x65\x63\x68\x61\x6E\x6E\x65\x6C\x72\x65\x64\x69\x72\x65\x63\x74"];_0x9447[0];exports[_0x9447[1]]= {queue:{type:_0x9447[2],required:true},interface:{type:_0x9447[2],required:true},membername:{type:_0x9447[2],required:true},penalty:{type:_0x9447[3],required:false},paused:{type:_0x9447[4],required:false}};exports[_0x9447[5]]= {queue:{type:_0x9447[2],required:true},interface:{type:_0x9447[2],required:true}};exports[_0x9447[6]]= {interface:{type:_0x9447[2],required:true},paused:{type:_0x9447[4]},reason:{type:_0x9447[2],required:false}};exports[_0x9447[7]]= {module:{type:_0x9447[2],required:false}};exports[_0x9447[8]]= {uniqueid:{type:_0x9447[2],required:true}};exports[_0x9447[9]]= {uniqueid:{type:_0x9447[2],required:true},filename:{type:_0x9447[2]},format:{type:_0x9447[2]},mixmonitorid:{type:_0x9447[2]}};exports[_0x9447[10]]= {uniqueid:{type:_0x9447[2],required:true}};exports[_0x9447[11]]= {uniqueid:{type:_0x9447[2],required:true},exten:{type:_0x9447[2],required:true}}
\ No newline at end of file
index c0f850b..fdfd98a 100644 (file)
@@ -1 +1 @@
-var _0x6978=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x61\x67\x65\x6E\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x74\x72\x75\x6E\x6B","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x74\x72\x69\x67\x67\x65\x72","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x7A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x61\x67\x65\x6E\x74\x73","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x74\x72\x75\x6E\x6B\x73","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x74\x72\x69\x67\x67\x65\x72\x73","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x71\x75\x65\x75\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x74\x69\x6D\x65\x72\x73","\x7A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x73","\x73\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x73","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x7A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x6D\x61\x70\x4B\x65\x79\x73","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x53\x49\x50\x2F\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x74\x6F\x74\x61\x6C","\x61\x6E\x73\x77\x65\x72\x65\x64","\x73\x75\x6D\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x73\x75\x6D\x44\x75\x72\x61\x74\x69\x6F\x6E","\x73\x75\x6D\x42\x69\x6C\x6C\x61\x62\x6C\x65","\x69\x73\x45\x6D\x70\x74\x79","\x69\x76\x72\x54\x6F\x74\x61\x6C\x43\x61\x6C\x6C\x73\x44\x61\x79\x73","\x69\x76\x72\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x41\x67\x69\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4E\x6F\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x42\x75\x73\x79\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4E\x6F\x53\x75\x63\x68\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x55\x6E\x6B\x6E\x6F\x77\x6E\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x72\x6F\x70\x43\x61\x6C\x6C\x73\x44\x61\x79\x54\x69\x6D\x65\x6F\x75\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x72\x6F\x70\x43\x61\x6C\x6C\x73\x44\x61\x79\x43\x61\x6C\x6C\x65\x72\x73\x45\x78\x69\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x46\x61\x69\x6C\x75\x72\x65\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x52\x65\x6A\x65\x63\x74\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x52\x65\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x6D\x65\x72\x67\x65\x46\x72\x6F\x6D\x44\x61\x74\x61\x62\x61\x73\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x6E\x69\x74\x41\x67\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x69\x6E\x69\x74\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x69\x6E\x69\x74\x54\x72\x75\x6E\x6B\x73","\x69\x6E\x69\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x69\x6E\x69\x74\x54\x72\x69\x67\x67\x65\x72\x73","\x69\x64","\x69\x6E\x69\x74\x54\x65\x6D\x70\x6C\x61\x74\x65\x73","\x69\x6E\x69\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x6D\x65\x72\x67\x65","\x69\x6E\x69\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x67\x72\x6F\x75\x70\x42\x79","\x71\x75\x65\x75\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x69\x6E\x69\x74\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x73","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x41\x4E\x53\x57\x45\x52\x45\x44","\x62\x69\x6C\x6C\x61\x62\x6C\x65\x73\x65\x63\x6F\x6E\x64\x73","\x69\x6E\x69\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x73","\x69\x6E\x69\x74\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x69\x6E\x69\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x69\x6E\x69\x74\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x6978[0];var BPromise=require(_0x6978[1]);var util=require(_0x6978[2]);var _=require(_0x6978[3]);var moment=require(_0x6978[4]);var Agent=require(_0x6978[5]);var Telephone=require(_0x6978[6]);var Trunk=require(_0x6978[7]);var VoiceQueue=require(_0x6978[8]);var Trigger=require(_0x6978[9]);var Template=require(_0x6978[10]);var Campaign=require(_0x6978[11]);var VoiceExtension=require(_0x6978[12]);var ZendeskAccount=require(_0x6978[13]);var SalesforceAccount=require(_0x6978[14]);var FreshdeskAccount=require(_0x6978[15]);var SugarcrmAccount=require(_0x6978[16]);var ZohoAccount=require(_0x6978[17]);var DeskAccount=require(_0x6978[18]);var FaxAccount=require(_0x6978[19]);var Realtime=function(){this[_0x6978[20]]= {};this[_0x6978[21]]= {};this[_0x6978[22]]= {};this[_0x6978[23]]= {};this[_0x6978[24]]= {};this[_0x6978[25]]= {};this[_0x6978[26]]= {};this[_0x6978[27]]= {total:0,answered:0,sumHoldTime:0,sumDuration:0,sumBillable:0};this[_0x6978[28]]= {};this[_0x6978[29]]= {};this[_0x6978[30]]= {};this[_0x6978[31]]= {};this[_0x6978[32]]= {};this[_0x6978[33]]= {};this[_0x6978[34]]= {};this[_0x6978[35]]= {};this[_0x6978[36]]= {};this[_0x6978[37]]= {};this[_0x6978[38]]= {};this[_0x6978[39]]= {}};function freeIsNotKey(_0xd655x16,_0xd655x17,_0xd655x18){var _0xd655x19=_[_0x6978[40]](_0xd655x16,function(_0xd655x1a,_0xd655x1b){return _0xd655x1a[_0xd655x18]});for(var _0xd655x1b in _0xd655x17){if(_0xd655x17[_0x6978[41]](_0xd655x1b)){if(!_0xd655x19[_0xd655x1b]){delete _0xd655x17[_0xd655x1b]}}}}function freeIsNotKeySip(_0xd655x16,_0xd655x17){var _0xd655x19=_[_0x6978[40]](_0xd655x16,function(_0xd655x1a,_0xd655x1b){return util[_0x6978[44]](_0x6978[42],_0xd655x1a[_0x6978[43]])});for(var _0xd655x1b in _0xd655x17){if(_0xd655x17[_0x6978[41]](_0xd655x1b)){if(!_0xd655x19[_0xd655x1b]){delete _0xd655x17[_0xd655x1b]}}}}function clearVoiceCallReports(_0xd655x1e){_0xd655x1e[_0x6978[45]]= 0;_0xd655x1e[_0x6978[46]]= 0;_0xd655x1e[_0x6978[47]]= 0;_0xd655x1e[_0x6978[48]]= 0;_0xd655x1e[_0x6978[49]]= 0}function clearCampaigns(_0xd655x20){if(!_[_0x6978[50]](_0xd655x20)){for(var _0xd655x1b in _0xd655x20){if(_0xd655x20[_0x6978[41]](_0xd655x1b)){_0xd655x20[_0xd655x1b][_0x6978[51]]= 0;_0xd655x20[_0xd655x1b][_0x6978[52]]= 0}}}}function clearVoiceQueues(_0xd655x22){if(!_[_0x6978[50]](_0xd655x22)){for(var _0xd655x1b in _0xd655x22){if(_0xd655x22[_0x6978[41]](_0xd655x1b)){_0xd655x22[_0xd655x1b][_0x6978[45]]= 0;_0xd655x22[_0xd655x1b][_0x6978[46]]= 0;_0xd655x22[_0xd655x1b][_0x6978[53]]= 0;_0xd655x22[_0xd655x1b][_0x6978[47]]= 0;_0xd655x22[_0xd655x1b][_0x6978[48]]= 0;_0xd655x22[_0xd655x1b][_0x6978[49]]= 0;_0xd655x22[_0xd655x1b][_0x6978[54]]= 0;_0xd655x22[_0xd655x1b][_0x6978[55]]= 0;_0xd655x22[_0xd655x1b][_0x6978[56]]= 0;_0xd655x22[_0xd655x1b][_0x6978[57]]= 0;_0xd655x22[_0xd655x1b][_0x6978[58]]= 0;_0xd655x22[_0xd655x1b][_0x6978[59]]= 0;_0xd655x22[_0xd655x1b][_0x6978[60]]= 0;_0xd655x22[_0xd655x1b][_0x6978[61]]= 0;_0xd655x22[_0xd655x1b][_0x6978[62]]= 0;_0xd655x22[_0xd655x1b][_0x6978[63]]= 0;_0xd655x22[_0xd655x1b][_0x6978[64]]= 0;_0xd655x22[_0xd655x1b][_0x6978[65]]= 0;_0xd655x22[_0xd655x1b][_0x6978[54]]= 0;_0xd655x22[_0xd655x1b][_0x6978[66]]= 0;_0xd655x22[_0xd655x1b][_0x6978[67]]= true}}}}Realtime[_0x6978[69]][_0x6978[68]]= function(_0xd655x23,_0xd655x24){for(var _0xd655x1b in _0xd655x24){if(_0xd655x23[_0x6978[41]](_0xd655x1b)){_0xd655x23[_0xd655x1b]= _0xd655x24[_0xd655x1b]}}};Realtime[_0x6978[69]][_0x6978[70]]= function(){var _0xd655x25=this;return function(_0xd655x16){if(_0xd655x16){freeIsNotKeySip(_0xd655x16,_0xd655x25[_0x6978[20]]);for(var _0xd655x26=0,_0xd655x27={},_0xd655x28={};_0xd655x26< _0xd655x16[_0x6978[71]];_0xd655x26+= 1){_0xd655x27= _0xd655x16[_0xd655x26];if(_[_0x6978[72]](_0xd655x25[_0x6978[20]][util[_0x6978[44]](_0x6978[42],_0xd655x27[_0x6978[43]])])){_0xd655x25[_0x6978[20]][util[_0x6978[44]](_0x6978[42],_0xd655x27[_0x6978[43]])]=  new Agent(_0xd655x27)}else {_0xd655x25[_0x6978[68]](_0xd655x25[_0x6978[20]][util[_0x6978[44]](_0x6978[42],_0xd655x27[_0x6978[43]])],_0xd655x27)}}};return _0xd655x25[_0x6978[20]]}};Realtime[_0x6978[69]][_0x6978[73]]= function(){var _0xd655x25=this;return function(_0xd655x16){if(_0xd655x16){freeIsNotKeySip(_0xd655x16,_0xd655x25[_0x6978[21]]);for(var _0xd655x26=0,_0xd655x29={},_0xd655x2a={};_0xd655x26< _0xd655x16[_0x6978[71]];_0xd655x26+= 1){_0xd655x29= _0xd655x16[_0xd655x26];if(_[_0x6978[72]](_0xd655x25[_0x6978[21]][util[_0x6978[44]](_0x6978[42],_0xd655x29[_0x6978[43]])])){_0xd655x25[_0x6978[21]][util[_0x6978[44]](_0x6978[42],_0xd655x29[_0x6978[43]])]=  new Telephone(_0xd655x29)}else {_0xd655x25[_0x6978[68]](_0xd655x25[_0x6978[21]][util[_0x6978[44]](_0x6978[42],_0xd655x29[_0x6978[43]])],_0xd655x29)}}};return _0xd655x25[_0x6978[21]]}};Realtime[_0x6978[69]][_0x6978[74]]= function(){var _0xd655x25=this;return function(_0xd655x16){if(_0xd655x16){freeIsNotKeySip(_0xd655x16,_0xd655x25[_0x6978[22]]);for(var _0xd655x26=0,_0xd655x2b={},_0xd655x2c={};_0xd655x26< _0xd655x16[_0x6978[71]];_0xd655x26+= 1){_0xd655x2b= _0xd655x16[_0xd655x26];if(_[_0x6978[72]](_0xd655x25[_0x6978[22]][util[_0x6978[44]](_0x6978[42],_0xd655x2b[_0x6978[43]])])){_0xd655x25[_0x6978[22]][util[_0x6978[44]](_0x6978[42],_0xd655x2b[_0x6978[43]])]=  new Trunk(_0xd655x2b)}else {_0xd655x25[_0x6978[68]](_0xd655x25[_0x6978[22]][util[_0x6978[44]](_0x6978[42],_0xd655x2b[_0x6978[43]])],_0xd655x2b)}}};return _0xd655x25[_0x6978[22]]}};Realtime[_0x6978[69]][_0x6978[75]]= function(){var _0xd655x25=this;return function(_0xd655x16){if(_0xd655x16){freeIsNotKey(_0xd655x16,_0xd655x25[_0x6978[23]],_0x6978[43]);for(var _0xd655x26=0,_0xd655x2d={},_0xd655x22={};_0xd655x26< _0xd655x16[_0x6978[71]];_0xd655x26+= 1){_0xd655x2d= _0xd655x16[_0xd655x26];if(_[_0x6978[72]](_0xd655x25[_0x6978[23]][_0xd655x2d[_0x6978[43]]])){_0xd655x25[_0x6978[23]][_0xd655x2d[_0x6978[43]]]=  new VoiceQueue(_0xd655x2d)}else {_0xd655x25[_0x6978[68]](_0xd655x25[_0x6978[23]][_0xd655x2d[_0x6978[43]]],_0xd655x2d)}}};return _0xd655x25[_0x6978[23]]}};Realtime[_0x6978[69]][_0x6978[76]]= function(){var _0xd655x25=this;return function(_0xd655x16){if(_0xd655x16){freeIsNotKey(_0xd655x16,_0xd655x25[_0x6978[24]],_0x6978[77]);for(var _0xd655x26=0,_0xd655x2e={},_0xd655x2f={};_0xd655x26< _0xd655x16[_0x6978[71]];_0xd655x26+= 1){_0xd655x2e= _0xd655x16[_0xd655x26];if(_[_0x6978[72]](_0xd655x25[_0x6978[24]][_0xd655x2e[_0x6978[77]]])){_0xd655x25[_0x6978[24]][_0xd655x2e[_0x6978[77]]]=  new Trigger(_0xd655x2e)}else {_0xd655x25[_0x6978[68]](_0xd655x25[_0x6978[24]][_0xd655x2e[_0x6978[77]]],_0xd655x2e)}}};return _0xd655x25[_0x6978[24]]}};Realtime[_0x6978[69]][_0x6978[78]]= function(){var _0xd655x25=this;return function(_0xd655x16){if(_0xd655x16){freeIsNotKey(_0xd655x16,_0xd655x25[_0x6978[26]],_0x6978[77]);for(var _0xd655x26=0,_0xd655x30={},_0xd655x31={};_0xd655x26< _0xd655x16[_0x6978[71]];_0xd655x26+= 1){_0xd655x30= _0xd655x16[_0xd655x26];if(_[_0x6978[72]](_0xd655x25[_0x6978[26]][_0xd655x30[_0x6978[77]]])){_0xd655x25[_0x6978[26]][_0xd655x30[_0x6978[77]]]=  new Template(_0xd655x30)}else {_0xd655x25[_0x6978[68]](_0xd655x25[_0x6978[26]][_0xd655x30[_0x6978[77]]],_0xd655x30)}}};return _0xd655x25[_0x6978[26]]}};Realtime[_0x6978[69]][_0x6978[79]]= function(){var _0xd655x25=this;return function(_0xd655x16){if(_0xd655x16){freeIsNotKey(_0xd655x16,_0xd655x25[_0x6978[33]],_0x6978[77]);for(var _0xd655x26=0,_0xd655x32={},_0xd655x33={};_0xd655x26< _0xd655x16[_0x6978[71]];_0xd655x26+= 1){_0xd655x32= _0xd655x16[_0xd655x26];if(_[_0x6978[72]](_0xd655x25[_0x6978[33]][_0xd655x32[_0x6978[77]]])){_0xd655x25[_0x6978[33]][_0xd655x32[_0x6978[77]]]=  new ZendeskAccount(_0xd655x32)}else {_0xd655x25[_0x6978[68]](_0xd655x25[_0x6978[33]][_0xd655x32[_0x6978[77]]],_0xd655x32)}}};return _0xd655x25[_0x6978[33]]}};Realtime[_0x6978[69]][_0x6978[80]]= function(){var _0xd655x25=this;return function(_0xd655x16){if(_0xd655x16){freeIsNotKey(_0xd655x16,_0xd655x25[_0x6978[34]],_0x6978[77]);for(var _0xd655x26=0,_0xd655x34={},_0xd655x35={};_0xd655x26< _0xd655x16[_0x6978[71]];_0xd655x26+= 1){_0xd655x34= _0xd655x16[_0xd655x26];if(_[_0x6978[72]](_0xd655x25[_0x6978[34]][_0xd655x34[_0x6978[77]]])){_0xd655x25[_0x6978[34]][_0xd655x34[_0x6978[77]]]=  new SalesforceAccount(_0xd655x34)}else {_0xd655x25[_0x6978[68]](_0xd655x25[_0x6978[34]][_0xd655x34[_0x6978[77]]],_0xd655x34)}}};return _0xd655x25[_0x6978[34]]}};Realtime[_0x6978[69]][_0x6978[81]]= function(){var _0xd655x25=this;return function(_0xd655x16){if(_0xd655x16){freeIsNotKey(_0xd655x16,_0xd655x25[_0x6978[36]],_0x6978[77]);for(var _0xd655x26=0,_0xd655x36={},_0xd655x37={};_0xd655x26< _0xd655x16[_0x6978[71]];_0xd655x26+= 1){_0xd655x36= _0xd655x16[_0xd655x26];if(_[_0x6978[72]](_0xd655x25[_0x6978[36]][_0xd655x36[_0x6978[77]]])){_0xd655x25[_0x6978[36]][_0xd655x36[_0x6978[77]]]=  new FreshdeskAccount(_0xd655x36)}else {_0xd655x25[_0x6978[68]](_0xd655x25[_0x6978[36]][_0xd655x36[_0x6978[77]]],_0xd655x36)}}};return _0xd655x25[_0x6978[36]]}};Realtime[_0x6978[69]][_0x6978[82]]= function(){var _0xd655x25=this;return function(_0xd655x16){if(_0xd655x16){freeIsNotKey(_0xd655x16,_0xd655x25[_0x6978[37]],_0x6978[77]);for(var _0xd655x26=0,_0xd655x38={},_0xd655x39={};_0xd655x26< _0xd655x16[_0x6978[71]];_0xd655x26+= 1){_0xd655x38= _0xd655x16[_0xd655x26];if(_[_0x6978[72]](_0xd655x25[_0x6978[37]][_0xd655x38[_0x6978[77]]])){_0xd655x25[_0x6978[37]][_0xd655x38[_0x6978[77]]]=  new ZohoAccount(_0xd655x38)}else {_0xd655x25[_0x6978[68]](_0xd655x25[_0x6978[37]][_0xd655x38[_0x6978[77]]],_0xd655x38)}}};return _0xd655x25[_0x6978[37]]}};Realtime[_0x6978[69]][_0x6978[83]]= function(){var _0xd655x25=this;return function(_0xd655x16){if(_0xd655x16){freeIsNotKey(_0xd655x16,_0xd655x25[_0x6978[38]],_0x6978[77]);for(var _0xd655x26=0,_0xd655x3a={},_0xd655x3b={};_0xd655x26< _0xd655x16[_0x6978[71]];_0xd655x26+= 1){_0xd655x3a= _0xd655x16[_0xd655x26];if(_[_0x6978[72]](_0xd655x25[_0x6978[38]][_0xd655x3a[_0x6978[77]]])){_0xd655x25[_0x6978[38]][_0xd655x3a[_0x6978[77]]]=  new DeskAccount(_0xd655x3a)}else {_0xd655x25[_0x6978[68]](_0xd655x25[_0x6978[38]][_0xd655x3a[_0x6978[77]]],_0xd655x3a)}}};return _0xd655x25[_0x6978[38]]}};Realtime[_0x6978[69]][_0x6978[84]]= function(){var _0xd655x25=this;return function(_0xd655x16){if(_0xd655x16){freeIsNotKey(_0xd655x16,_0xd655x25[_0x6978[35]],_0x6978[77]);for(var _0xd655x26=0,_0xd655x3c={},_0xd655x3d={};_0xd655x26< _0xd655x16[_0x6978[71]];_0xd655x26+= 1){_0xd655x3c= _0xd655x16[_0xd655x26];if(_[_0x6978[72]](_0xd655x25[_0x6978[35]][_0xd655x3c[_0x6978[77]]])){_0xd655x25[_0x6978[35]][_0xd655x3c[_0x6978[77]]]=  new SugarcrmAccount(_0xd655x3c)}else {_0xd655x25[_0x6978[68]](_0xd655x25[_0x6978[35]][_0xd655x3c[_0x6978[77]]],_0xd655x3c)}}};return _0xd655x25[_0x6978[35]]}};Realtime[_0x6978[69]][_0x6978[85]]= function(){var _0xd655x25=this;return function(_0xd655x16){for(var _0xd655x26=0;_0xd655x26< _0xd655x16[_0x6978[71]];_0xd655x26+= 1){_[_0x6978[86]](_0xd655x25[_0x6978[23]][_0xd655x16[_0xd655x26][_0x6978[43]]],_0xd655x16[_0xd655x26])};return _0xd655x25[_0x6978[23]]}};Realtime[_0x6978[69]][_0x6978[87]]= function(){var _0xd655x25=this;return function(_0xd655x16){clearVoiceQueues(_0xd655x25[_0x6978[23]]);if(_0xd655x16){_0xd655x16= _[_0x6978[89]](_0xd655x16,_0x6978[88]);for(var _0xd655x1b in _0xd655x16){if(_0xd655x16[_0x6978[41]](_0xd655x1b)){var _0xd655x1a={};for(var _0xd655x26=0;_0xd655x26< _0xd655x16[_0xd655x1b][_0x6978[71]];_0xd655x26+= 1){var _0xd655x3e=_0xd655x16[_0xd655x1b][_0xd655x26][_0x6978[90]];if(_0xd655x25[_0x6978[23]][_0xd655x3e]){if(_0xd655x16[_0xd655x1b][_0xd655x26][_0x6978[91]]){_0xd655x25[_0x6978[23]][_0xd655x3e][_0x6978[53]]+= 1};_0xd655x25[_0x6978[23]][_0xd655x3e][_0x6978[47]]+= moment(_0xd655x16[_0xd655x1b][_0xd655x26][_0x6978[95]])[_0x6978[94]](moment(_0xd655x16[_0xd655x1b][_0xd655x26][_0x6978[92]]),_0x6978[93])|| 0;if(_0xd655x26=== _0xd655x16[_0xd655x1b][_0x6978[71]]- 1){_0xd655x25[_0x6978[23]][_0xd655x3e][_0x6978[48]]+= moment(_0xd655x16[_0xd655x1b][_0xd655x26][_0x6978[96]]|| _0xd655x16[_0xd655x1b][_0xd655x26][_0x6978[97]]|| _0xd655x16[_0xd655x1b][_0xd655x26][_0x6978[98]])[_0x6978[94]](moment(_0xd655x16[_0xd655x1b][_0xd655x26][_0x6978[92]]),_0x6978[93])|| 0;_0xd655x25[_0x6978[23]][_0xd655x3e][_0x6978[45]]+= 1;if(_0xd655x16[_0xd655x1b][_0xd655x26][_0x6978[99]]){_0xd655x25[_0x6978[23]][_0xd655x3e][_0x6978[46]]+= 1;_0xd655x25[_0x6978[23]][_0xd655x3e][_0x6978[49]]+= moment(_0xd655x16[_0xd655x1b][_0xd655x26][_0x6978[96]])[_0x6978[94]](moment(_0xd655x16[_0xd655x1b][_0xd655x26][_0x6978[95]]),_0x6978[93])|| 0}}else {_0xd655x25[_0x6978[23]][_0xd655x3e][_0x6978[48]]+= _0xd655x25[_0x6978[23]][_0xd655x3e][_0x6978[47]]}}}}}};return _0xd655x25[_0x6978[23]]}};Realtime[_0x6978[69]][_0x6978[100]]= function(){var _0xd655x25=this;return function(_0xd655x16){clearVoiceCallReports(_0xd655x25[_0x6978[27]]);if(_0xd655x16){for(var _0xd655x26=0;_0xd655x26< _0xd655x16[_0x6978[71]];_0xd655x26+= 1){_0xd655x25[_0x6978[27]][_0x6978[45]]+= 1;_0xd655x25[_0x6978[27]][_0x6978[48]]+= _0xd655x16[_0xd655x26][_0x6978[101]];if(_0xd655x16[_0xd655x26][_0x6978[102]]=== _0x6978[103]){_0xd655x25[_0x6978[27]][_0x6978[46]]+= 1;_0xd655x25[_0x6978[27]][_0x6978[47]]+= (_0xd655x16[_0xd655x26][_0x6978[101]]- _0xd655x16[_0xd655x26][_0x6978[104]]);_0xd655x25[_0x6978[27]][_0x6978[49]]+= _0xd655x16[_0xd655x26][_0x6978[104]]}}};return _0xd655x25[_0x6978[27]]}};Realtime[_0x6978[69]][_0x6978[105]]= function(){var _0xd655x25=this;return function(_0xd655x16){if(_0xd655x16){freeIsNotKey(_0xd655x16,_0xd655x25[_0x6978[25]],_0x6978[43]);for(var _0xd655x26=0,_0xd655x3f={};_0xd655x26< _0xd655x16[_0x6978[71]];_0xd655x26+= 1){_0xd655x3f= _0xd655x16[_0xd655x26];if(_[_0x6978[72]](_0xd655x25[_0x6978[25]][_0xd655x3f[_0x6978[43]]])){_0xd655x25[_0x6978[25]][_0xd655x3f[_0x6978[43]]]=  new Campaign(_0xd655x3f)}else {_0xd655x25[_0x6978[68]](_0xd655x25[_0x6978[25]][_0xd655x3f[_0x6978[43]]],_0xd655x3f)}}};return _0xd655x25[_0x6978[25]]}};Realtime[_0x6978[69]][_0x6978[106]]= function(){var _0xd655x25=this;return function(_0xd655x16){if(_0xd655x16){freeIsNotKey(_0xd655x16,_0xd655x25[_0x6978[28]],_0x6978[77]);for(var _0xd655x26=0,_0xd655x40={};_0xd655x26< _0xd655x16[_0x6978[71]];_0xd655x26+= 1){_0xd655x40= _0xd655x16[_0xd655x26];if(_[_0x6978[72]](_0xd655x25[_0x6978[28]][_0xd655x40[_0x6978[77]]])){_0xd655x25[_0x6978[28]][_0xd655x40[_0x6978[77]]]=  new VoiceExtension(_0xd655x40)}else {_0xd655x25[_0x6978[68]](_0xd655x25[_0x6978[28]][_0xd655x40[_0x6978[77]]],_0xd655x40)}}};return _0xd655x25[_0x6978[28]]}};Realtime[_0x6978[69]][_0x6978[107]]= function(){var _0xd655x25=this;return function(_0xd655x16){clearCampaigns(_0xd655x25[_0x6978[25]]);for(var _0xd655x26=0;_0xd655x26< _0xd655x16[_0x6978[71]];_0xd655x26+= 1){_[_0x6978[86]](_0xd655x25[_0x6978[25]][_0xd655x16[_0xd655x26][_0x6978[43]]],_0xd655x16[_0xd655x26])};return _0xd655x25[_0x6978[25]]}};Realtime[_0x6978[69]][_0x6978[108]]= function(){var _0xd655x25=this;return function(_0xd655x16){if(_0xd655x16){freeIsNotKey(_0xd655x16,_0xd655x25[_0x6978[39]],_0x6978[77]);for(var _0xd655x26=0,_0xd655x41={},_0xd655x42={};_0xd655x26< _0xd655x16[_0x6978[71]];_0xd655x26+= 1){_0xd655x41= _0xd655x16[_0xd655x26];if(_[_0x6978[72]](_0xd655x25[_0x6978[39]][_0xd655x41[_0x6978[77]]])){_0xd655x25[_0x6978[39]][_0xd655x41[_0x6978[77]]]=  new FaxAccount(_0xd655x41)}else {_0xd655x25[_0x6978[68]](_0xd655x25[_0x6978[39]][_0xd655x41[_0x6978[77]]],_0xd655x41)}}};return _0xd655x25[_0x6978[39]]}};module[_0x6978[109]]= Realtime
\ No newline at end of file
+var _0x7a71=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x61\x67\x65\x6E\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x74\x72\x75\x6E\x6B","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x74\x72\x69\x67\x67\x65\x72","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x63\x61\x6D\x70\x61\x69\x67\x6E","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x7A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x61\x67\x65\x6E\x74\x73","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x74\x72\x75\x6E\x6B\x73","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x74\x72\x69\x67\x67\x65\x72\x73","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x71\x75\x65\x75\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x74\x69\x6D\x65\x72\x73","\x7A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x73","\x73\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x73","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x7A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x6D\x61\x70\x4B\x65\x79\x73","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x53\x49\x50\x2F\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x74\x6F\x74\x61\x6C","\x61\x6E\x73\x77\x65\x72\x65\x64","\x73\x75\x6D\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x73\x75\x6D\x44\x75\x72\x61\x74\x69\x6F\x6E","\x73\x75\x6D\x42\x69\x6C\x6C\x61\x62\x6C\x65","\x69\x73\x45\x6D\x70\x74\x79","\x69\x76\x72\x54\x6F\x74\x61\x6C\x43\x61\x6C\x6C\x73\x44\x61\x79\x73","\x69\x76\x72\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x41\x67\x69\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4E\x6F\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x42\x75\x73\x79\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4E\x6F\x53\x75\x63\x68\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x55\x6E\x6B\x6E\x6F\x77\x6E\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x72\x6F\x70\x43\x61\x6C\x6C\x73\x44\x61\x79\x54\x69\x6D\x65\x6F\x75\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x72\x6F\x70\x43\x61\x6C\x6C\x73\x44\x61\x79\x43\x61\x6C\x6C\x65\x72\x73\x45\x78\x69\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x42\x6C\x61\x63\x6B\x6C\x69\x73\x74\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x46\x61\x69\x6C\x75\x72\x65\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x52\x65\x6A\x65\x63\x74\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x52\x65\x43\x61\x6C\x6C\x73\x44\x61\x79","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x43\x61\x6C\x6C\x73\x44\x61\x79","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x6D\x65\x72\x67\x65\x46\x72\x6F\x6D\x44\x61\x74\x61\x62\x61\x73\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x6E\x69\x74\x41\x67\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x69\x6E\x69\x74\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x69\x6E\x69\x74\x54\x72\x75\x6E\x6B\x73","\x69\x6E\x69\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x69\x6E\x69\x74\x54\x72\x69\x67\x67\x65\x72\x73","\x69\x64","\x69\x6E\x69\x74\x54\x65\x6D\x70\x6C\x61\x74\x65\x73","\x69\x6E\x69\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6E\x69\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x6D\x65\x72\x67\x65","\x69\x6E\x69\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x67\x72\x6F\x75\x70\x42\x79","\x71\x75\x65\x75\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x69\x6E\x69\x74\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x73","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x41\x4E\x53\x57\x45\x52\x45\x44","\x62\x69\x6C\x6C\x61\x62\x6C\x65\x73\x65\x63\x6F\x6E\x64\x73","\x69\x6E\x69\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x73","\x69\x6E\x69\x74\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x69\x6E\x69\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x69\x6E\x69\x74\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x7a71[0];var BPromise=require(_0x7a71[1]);var util=require(_0x7a71[2]);var _=require(_0x7a71[3]);var moment=require(_0x7a71[4]);var Agent=require(_0x7a71[5]);var Telephone=require(_0x7a71[6]);var Trunk=require(_0x7a71[7]);var VoiceQueue=require(_0x7a71[8]);var Trigger=require(_0x7a71[9]);var Template=require(_0x7a71[10]);var Campaign=require(_0x7a71[11]);var VoiceExtension=require(_0x7a71[12]);var ZendeskAccount=require(_0x7a71[13]);var SalesforceAccount=require(_0x7a71[14]);var FreshdeskAccount=require(_0x7a71[15]);var SugarcrmAccount=require(_0x7a71[16]);var ZohoAccount=require(_0x7a71[17]);var DeskAccount=require(_0x7a71[18]);var FaxAccount=require(_0x7a71[19]);var Realtime=function(){this[_0x7a71[20]]= {};this[_0x7a71[21]]= {};this[_0x7a71[22]]= {};this[_0x7a71[23]]= {};this[_0x7a71[24]]= {};this[_0x7a71[25]]= {};this[_0x7a71[26]]= {};this[_0x7a71[27]]= {total:0,answered:0,sumHoldTime:0,sumDuration:0,sumBillable:0};this[_0x7a71[28]]= {};this[_0x7a71[29]]= {};this[_0x7a71[30]]= {};this[_0x7a71[31]]= {};this[_0x7a71[32]]= {};this[_0x7a71[33]]= {};this[_0x7a71[34]]= {};this[_0x7a71[35]]= {};this[_0x7a71[36]]= {};this[_0x7a71[37]]= {};this[_0x7a71[38]]= {};this[_0x7a71[39]]= {}};function freeIsNotKey(_0xba3ex16,_0xba3ex17,_0xba3ex18){var _0xba3ex19=_[_0x7a71[40]](_0xba3ex16,function(_0xba3ex1a,_0xba3ex1b){return _0xba3ex1a[_0xba3ex18]});for(var _0xba3ex1b in _0xba3ex17){if(_0xba3ex17[_0x7a71[41]](_0xba3ex1b)){if(!_0xba3ex19[_0xba3ex1b]){delete _0xba3ex17[_0xba3ex1b]}}}}function freeIsNotKeySip(_0xba3ex16,_0xba3ex17){var _0xba3ex19=_[_0x7a71[40]](_0xba3ex16,function(_0xba3ex1a,_0xba3ex1b){return util[_0x7a71[44]](_0x7a71[42],_0xba3ex1a[_0x7a71[43]])});for(var _0xba3ex1b in _0xba3ex17){if(_0xba3ex17[_0x7a71[41]](_0xba3ex1b)){if(!_0xba3ex19[_0xba3ex1b]){delete _0xba3ex17[_0xba3ex1b]}}}}function clearVoiceCallReports(_0xba3ex1e){_0xba3ex1e[_0x7a71[45]]= 0;_0xba3ex1e[_0x7a71[46]]= 0;_0xba3ex1e[_0x7a71[47]]= 0;_0xba3ex1e[_0x7a71[48]]= 0;_0xba3ex1e[_0x7a71[49]]= 0}function clearCampaigns(_0xba3ex20){if(!_[_0x7a71[50]](_0xba3ex20)){for(var _0xba3ex1b in _0xba3ex20){if(_0xba3ex20[_0x7a71[41]](_0xba3ex1b)){_0xba3ex20[_0xba3ex1b][_0x7a71[51]]= 0;_0xba3ex20[_0xba3ex1b][_0x7a71[52]]= 0}}}}function clearVoiceQueues(_0xba3ex22){if(!_[_0x7a71[50]](_0xba3ex22)){for(var _0xba3ex1b in _0xba3ex22){if(_0xba3ex22[_0x7a71[41]](_0xba3ex1b)){_0xba3ex22[_0xba3ex1b][_0x7a71[45]]= 0;_0xba3ex22[_0xba3ex1b][_0x7a71[46]]= 0;_0xba3ex22[_0xba3ex1b][_0x7a71[53]]= 0;_0xba3ex22[_0xba3ex1b][_0x7a71[47]]= 0;_0xba3ex22[_0xba3ex1b][_0x7a71[48]]= 0;_0xba3ex22[_0xba3ex1b][_0x7a71[49]]= 0;_0xba3ex22[_0xba3ex1b][_0x7a71[54]]= 0;_0xba3ex22[_0xba3ex1b][_0x7a71[55]]= 0;_0xba3ex22[_0xba3ex1b][_0x7a71[56]]= 0;_0xba3ex22[_0xba3ex1b][_0x7a71[57]]= 0;_0xba3ex22[_0xba3ex1b][_0x7a71[58]]= 0;_0xba3ex22[_0xba3ex1b][_0x7a71[59]]= 0;_0xba3ex22[_0xba3ex1b][_0x7a71[60]]= 0;_0xba3ex22[_0xba3ex1b][_0x7a71[61]]= 0;_0xba3ex22[_0xba3ex1b][_0x7a71[62]]= 0;_0xba3ex22[_0xba3ex1b][_0x7a71[63]]= 0;_0xba3ex22[_0xba3ex1b][_0x7a71[64]]= 0;_0xba3ex22[_0xba3ex1b][_0x7a71[65]]= 0;_0xba3ex22[_0xba3ex1b][_0x7a71[54]]= 0;_0xba3ex22[_0xba3ex1b][_0x7a71[66]]= 0;_0xba3ex22[_0xba3ex1b][_0x7a71[67]]= true}}}}Realtime[_0x7a71[69]][_0x7a71[68]]= function(_0xba3ex23,_0xba3ex24){for(var _0xba3ex1b in _0xba3ex24){if(_0xba3ex23[_0x7a71[41]](_0xba3ex1b)){_0xba3ex23[_0xba3ex1b]= _0xba3ex24[_0xba3ex1b]}}};Realtime[_0x7a71[69]][_0x7a71[70]]= function(){var _0xba3ex25=this;return function(_0xba3ex16){if(_0xba3ex16){freeIsNotKeySip(_0xba3ex16,_0xba3ex25[_0x7a71[20]]);for(var _0xba3ex26=0,_0xba3ex27={},_0xba3ex28={};_0xba3ex26< _0xba3ex16[_0x7a71[71]];_0xba3ex26+= 1){_0xba3ex27= _0xba3ex16[_0xba3ex26];if(_[_0x7a71[72]](_0xba3ex25[_0x7a71[20]][util[_0x7a71[44]](_0x7a71[42],_0xba3ex27[_0x7a71[43]])])){_0xba3ex25[_0x7a71[20]][util[_0x7a71[44]](_0x7a71[42],_0xba3ex27[_0x7a71[43]])]=  new Agent(_0xba3ex27)}else {_0xba3ex25[_0x7a71[68]](_0xba3ex25[_0x7a71[20]][util[_0x7a71[44]](_0x7a71[42],_0xba3ex27[_0x7a71[43]])],_0xba3ex27)}}};return _0xba3ex25[_0x7a71[20]]}};Realtime[_0x7a71[69]][_0x7a71[73]]= function(){var _0xba3ex25=this;return function(_0xba3ex16){if(_0xba3ex16){freeIsNotKeySip(_0xba3ex16,_0xba3ex25[_0x7a71[21]]);for(var _0xba3ex26=0,_0xba3ex29={},_0xba3ex2a={};_0xba3ex26< _0xba3ex16[_0x7a71[71]];_0xba3ex26+= 1){_0xba3ex29= _0xba3ex16[_0xba3ex26];if(_[_0x7a71[72]](_0xba3ex25[_0x7a71[21]][util[_0x7a71[44]](_0x7a71[42],_0xba3ex29[_0x7a71[43]])])){_0xba3ex25[_0x7a71[21]][util[_0x7a71[44]](_0x7a71[42],_0xba3ex29[_0x7a71[43]])]=  new Telephone(_0xba3ex29)}else {_0xba3ex25[_0x7a71[68]](_0xba3ex25[_0x7a71[21]][util[_0x7a71[44]](_0x7a71[42],_0xba3ex29[_0x7a71[43]])],_0xba3ex29)}}};return _0xba3ex25[_0x7a71[21]]}};Realtime[_0x7a71[69]][_0x7a71[74]]= function(){var _0xba3ex25=this;return function(_0xba3ex16){if(_0xba3ex16){freeIsNotKeySip(_0xba3ex16,_0xba3ex25[_0x7a71[22]]);for(var _0xba3ex26=0,_0xba3ex2b={},_0xba3ex2c={};_0xba3ex26< _0xba3ex16[_0x7a71[71]];_0xba3ex26+= 1){_0xba3ex2b= _0xba3ex16[_0xba3ex26];if(_[_0x7a71[72]](_0xba3ex25[_0x7a71[22]][util[_0x7a71[44]](_0x7a71[42],_0xba3ex2b[_0x7a71[43]])])){_0xba3ex25[_0x7a71[22]][util[_0x7a71[44]](_0x7a71[42],_0xba3ex2b[_0x7a71[43]])]=  new Trunk(_0xba3ex2b)}else {_0xba3ex25[_0x7a71[68]](_0xba3ex25[_0x7a71[22]][util[_0x7a71[44]](_0x7a71[42],_0xba3ex2b[_0x7a71[43]])],_0xba3ex2b)}}};return _0xba3ex25[_0x7a71[22]]}};Realtime[_0x7a71[69]][_0x7a71[75]]= function(){var _0xba3ex25=this;return function(_0xba3ex16){if(_0xba3ex16){freeIsNotKey(_0xba3ex16,_0xba3ex25[_0x7a71[23]],_0x7a71[43]);for(var _0xba3ex26=0,_0xba3ex2d={},_0xba3ex22={};_0xba3ex26< _0xba3ex16[_0x7a71[71]];_0xba3ex26+= 1){_0xba3ex2d= _0xba3ex16[_0xba3ex26];if(_[_0x7a71[72]](_0xba3ex25[_0x7a71[23]][_0xba3ex2d[_0x7a71[43]]])){_0xba3ex25[_0x7a71[23]][_0xba3ex2d[_0x7a71[43]]]=  new VoiceQueue(_0xba3ex2d)}else {_0xba3ex25[_0x7a71[68]](_0xba3ex25[_0x7a71[23]][_0xba3ex2d[_0x7a71[43]]],_0xba3ex2d)}}};return _0xba3ex25[_0x7a71[23]]}};Realtime[_0x7a71[69]][_0x7a71[76]]= function(){var _0xba3ex25=this;return function(_0xba3ex16){if(_0xba3ex16){freeIsNotKey(_0xba3ex16,_0xba3ex25[_0x7a71[24]],_0x7a71[77]);for(var _0xba3ex26=0,_0xba3ex2e={},_0xba3ex2f={};_0xba3ex26< _0xba3ex16[_0x7a71[71]];_0xba3ex26+= 1){_0xba3ex2e= _0xba3ex16[_0xba3ex26];if(_[_0x7a71[72]](_0xba3ex25[_0x7a71[24]][_0xba3ex2e[_0x7a71[77]]])){_0xba3ex25[_0x7a71[24]][_0xba3ex2e[_0x7a71[77]]]=  new Trigger(_0xba3ex2e)}else {_0xba3ex25[_0x7a71[68]](_0xba3ex25[_0x7a71[24]][_0xba3ex2e[_0x7a71[77]]],_0xba3ex2e)}}};return _0xba3ex25[_0x7a71[24]]}};Realtime[_0x7a71[69]][_0x7a71[78]]= function(){var _0xba3ex25=this;return function(_0xba3ex16){if(_0xba3ex16){freeIsNotKey(_0xba3ex16,_0xba3ex25[_0x7a71[26]],_0x7a71[77]);for(var _0xba3ex26=0,_0xba3ex30={},_0xba3ex31={};_0xba3ex26< _0xba3ex16[_0x7a71[71]];_0xba3ex26+= 1){_0xba3ex30= _0xba3ex16[_0xba3ex26];if(_[_0x7a71[72]](_0xba3ex25[_0x7a71[26]][_0xba3ex30[_0x7a71[77]]])){_0xba3ex25[_0x7a71[26]][_0xba3ex30[_0x7a71[77]]]=  new Template(_0xba3ex30)}else {_0xba3ex25[_0x7a71[68]](_0xba3ex25[_0x7a71[26]][_0xba3ex30[_0x7a71[77]]],_0xba3ex30)}}};return _0xba3ex25[_0x7a71[26]]}};Realtime[_0x7a71[69]][_0x7a71[79]]= function(){var _0xba3ex25=this;return function(_0xba3ex16){if(_0xba3ex16){freeIsNotKey(_0xba3ex16,_0xba3ex25[_0x7a71[33]],_0x7a71[77]);for(var _0xba3ex26=0,_0xba3ex32={},_0xba3ex33={};_0xba3ex26< _0xba3ex16[_0x7a71[71]];_0xba3ex26+= 1){_0xba3ex32= _0xba3ex16[_0xba3ex26];if(_[_0x7a71[72]](_0xba3ex25[_0x7a71[33]][_0xba3ex32[_0x7a71[77]]])){_0xba3ex25[_0x7a71[33]][_0xba3ex32[_0x7a71[77]]]=  new ZendeskAccount(_0xba3ex32)}else {_0xba3ex25[_0x7a71[68]](_0xba3ex25[_0x7a71[33]][_0xba3ex32[_0x7a71[77]]],_0xba3ex32)}}};return _0xba3ex25[_0x7a71[33]]}};Realtime[_0x7a71[69]][_0x7a71[80]]= function(){var _0xba3ex25=this;return function(_0xba3ex16){if(_0xba3ex16){freeIsNotKey(_0xba3ex16,_0xba3ex25[_0x7a71[34]],_0x7a71[77]);for(var _0xba3ex26=0,_0xba3ex34={},_0xba3ex35={};_0xba3ex26< _0xba3ex16[_0x7a71[71]];_0xba3ex26+= 1){_0xba3ex34= _0xba3ex16[_0xba3ex26];if(_[_0x7a71[72]](_0xba3ex25[_0x7a71[34]][_0xba3ex34[_0x7a71[77]]])){_0xba3ex25[_0x7a71[34]][_0xba3ex34[_0x7a71[77]]]=  new SalesforceAccount(_0xba3ex34)}else {_0xba3ex25[_0x7a71[68]](_0xba3ex25[_0x7a71[34]][_0xba3ex34[_0x7a71[77]]],_0xba3ex34)}}};return _0xba3ex25[_0x7a71[34]]}};Realtime[_0x7a71[69]][_0x7a71[81]]= function(){var _0xba3ex25=this;return function(_0xba3ex16){if(_0xba3ex16){freeIsNotKey(_0xba3ex16,_0xba3ex25[_0x7a71[36]],_0x7a71[77]);for(var _0xba3ex26=0,_0xba3ex36={},_0xba3ex37={};_0xba3ex26< _0xba3ex16[_0x7a71[71]];_0xba3ex26+= 1){_0xba3ex36= _0xba3ex16[_0xba3ex26];if(_[_0x7a71[72]](_0xba3ex25[_0x7a71[36]][_0xba3ex36[_0x7a71[77]]])){_0xba3ex25[_0x7a71[36]][_0xba3ex36[_0x7a71[77]]]=  new FreshdeskAccount(_0xba3ex36)}else {_0xba3ex25[_0x7a71[68]](_0xba3ex25[_0x7a71[36]][_0xba3ex36[_0x7a71[77]]],_0xba3ex36)}}};return _0xba3ex25[_0x7a71[36]]}};Realtime[_0x7a71[69]][_0x7a71[82]]= function(){var _0xba3ex25=this;return function(_0xba3ex16){if(_0xba3ex16){freeIsNotKey(_0xba3ex16,_0xba3ex25[_0x7a71[37]],_0x7a71[77]);for(var _0xba3ex26=0,_0xba3ex38={},_0xba3ex39={};_0xba3ex26< _0xba3ex16[_0x7a71[71]];_0xba3ex26+= 1){_0xba3ex38= _0xba3ex16[_0xba3ex26];if(_[_0x7a71[72]](_0xba3ex25[_0x7a71[37]][_0xba3ex38[_0x7a71[77]]])){_0xba3ex25[_0x7a71[37]][_0xba3ex38[_0x7a71[77]]]=  new ZohoAccount(_0xba3ex38)}else {_0xba3ex25[_0x7a71[68]](_0xba3ex25[_0x7a71[37]][_0xba3ex38[_0x7a71[77]]],_0xba3ex38)}}};return _0xba3ex25[_0x7a71[37]]}};Realtime[_0x7a71[69]][_0x7a71[83]]= function(){var _0xba3ex25=this;return function(_0xba3ex16){if(_0xba3ex16){freeIsNotKey(_0xba3ex16,_0xba3ex25[_0x7a71[38]],_0x7a71[77]);for(var _0xba3ex26=0,_0xba3ex3a={},_0xba3ex3b={};_0xba3ex26< _0xba3ex16[_0x7a71[71]];_0xba3ex26+= 1){_0xba3ex3a= _0xba3ex16[_0xba3ex26];if(_[_0x7a71[72]](_0xba3ex25[_0x7a71[38]][_0xba3ex3a[_0x7a71[77]]])){_0xba3ex25[_0x7a71[38]][_0xba3ex3a[_0x7a71[77]]]=  new DeskAccount(_0xba3ex3a)}else {_0xba3ex25[_0x7a71[68]](_0xba3ex25[_0x7a71[38]][_0xba3ex3a[_0x7a71[77]]],_0xba3ex3a)}}};return _0xba3ex25[_0x7a71[38]]}};Realtime[_0x7a71[69]][_0x7a71[84]]= function(){var _0xba3ex25=this;return function(_0xba3ex16){if(_0xba3ex16){freeIsNotKey(_0xba3ex16,_0xba3ex25[_0x7a71[35]],_0x7a71[77]);for(var _0xba3ex26=0,_0xba3ex3c={},_0xba3ex3d={};_0xba3ex26< _0xba3ex16[_0x7a71[71]];_0xba3ex26+= 1){_0xba3ex3c= _0xba3ex16[_0xba3ex26];if(_[_0x7a71[72]](_0xba3ex25[_0x7a71[35]][_0xba3ex3c[_0x7a71[77]]])){_0xba3ex25[_0x7a71[35]][_0xba3ex3c[_0x7a71[77]]]=  new SugarcrmAccount(_0xba3ex3c)}else {_0xba3ex25[_0x7a71[68]](_0xba3ex25[_0x7a71[35]][_0xba3ex3c[_0x7a71[77]]],_0xba3ex3c)}}};return _0xba3ex25[_0x7a71[35]]}};Realtime[_0x7a71[69]][_0x7a71[85]]= function(){var _0xba3ex25=this;return function(_0xba3ex16){for(var _0xba3ex26=0;_0xba3ex26< _0xba3ex16[_0x7a71[71]];_0xba3ex26+= 1){_[_0x7a71[86]](_0xba3ex25[_0x7a71[23]][_0xba3ex16[_0xba3ex26][_0x7a71[43]]],_0xba3ex16[_0xba3ex26])};return _0xba3ex25[_0x7a71[23]]}};Realtime[_0x7a71[69]][_0x7a71[87]]= function(){var _0xba3ex25=this;return function(_0xba3ex16){clearVoiceQueues(_0xba3ex25[_0x7a71[23]]);if(_0xba3ex16){_0xba3ex16= _[_0x7a71[89]](_0xba3ex16,_0x7a71[88]);for(var _0xba3ex1b in _0xba3ex16){if(_0xba3ex16[_0x7a71[41]](_0xba3ex1b)){var _0xba3ex1a={};for(var _0xba3ex26=0;_0xba3ex26< _0xba3ex16[_0xba3ex1b][_0x7a71[71]];_0xba3ex26+= 1){var _0xba3ex3e=_0xba3ex16[_0xba3ex1b][_0xba3ex26][_0x7a71[90]];if(_0xba3ex25[_0x7a71[23]][_0xba3ex3e]){if(_0xba3ex16[_0xba3ex1b][_0xba3ex26][_0x7a71[91]]){_0xba3ex25[_0x7a71[23]][_0xba3ex3e][_0x7a71[53]]+= 1};_0xba3ex25[_0x7a71[23]][_0xba3ex3e][_0x7a71[47]]+= moment(_0xba3ex16[_0xba3ex1b][_0xba3ex26][_0x7a71[95]])[_0x7a71[94]](moment(_0xba3ex16[_0xba3ex1b][_0xba3ex26][_0x7a71[92]]),_0x7a71[93])|| 0;if(_0xba3ex26=== _0xba3ex16[_0xba3ex1b][_0x7a71[71]]- 1){_0xba3ex25[_0x7a71[23]][_0xba3ex3e][_0x7a71[48]]+= moment(_0xba3ex16[_0xba3ex1b][_0xba3ex26][_0x7a71[96]]|| _0xba3ex16[_0xba3ex1b][_0xba3ex26][_0x7a71[97]]|| _0xba3ex16[_0xba3ex1b][_0xba3ex26][_0x7a71[98]])[_0x7a71[94]](moment(_0xba3ex16[_0xba3ex1b][_0xba3ex26][_0x7a71[92]]),_0x7a71[93])|| 0;_0xba3ex25[_0x7a71[23]][_0xba3ex3e][_0x7a71[45]]+= 1;if(_0xba3ex16[_0xba3ex1b][_0xba3ex26][_0x7a71[99]]){_0xba3ex25[_0x7a71[23]][_0xba3ex3e][_0x7a71[46]]+= 1;_0xba3ex25[_0x7a71[23]][_0xba3ex3e][_0x7a71[49]]+= moment(_0xba3ex16[_0xba3ex1b][_0xba3ex26][_0x7a71[96]])[_0x7a71[94]](moment(_0xba3ex16[_0xba3ex1b][_0xba3ex26][_0x7a71[95]]),_0x7a71[93])|| 0}}else {_0xba3ex25[_0x7a71[23]][_0xba3ex3e][_0x7a71[48]]+= _0xba3ex25[_0x7a71[23]][_0xba3ex3e][_0x7a71[47]]}}}}}};return _0xba3ex25[_0x7a71[23]]}};Realtime[_0x7a71[69]][_0x7a71[100]]= function(){var _0xba3ex25=this;return function(_0xba3ex16){clearVoiceCallReports(_0xba3ex25[_0x7a71[27]]);if(_0xba3ex16){for(var _0xba3ex26=0;_0xba3ex26< _0xba3ex16[_0x7a71[71]];_0xba3ex26+= 1){_0xba3ex25[_0x7a71[27]][_0x7a71[45]]+= 1;_0xba3ex25[_0x7a71[27]][_0x7a71[48]]+= _0xba3ex16[_0xba3ex26][_0x7a71[101]];if(_0xba3ex16[_0xba3ex26][_0x7a71[102]]=== _0x7a71[103]){_0xba3ex25[_0x7a71[27]][_0x7a71[46]]+= 1;_0xba3ex25[_0x7a71[27]][_0x7a71[47]]+= (_0xba3ex16[_0xba3ex26][_0x7a71[101]]- _0xba3ex16[_0xba3ex26][_0x7a71[104]]);_0xba3ex25[_0x7a71[27]][_0x7a71[49]]+= _0xba3ex16[_0xba3ex26][_0x7a71[104]]}}};return _0xba3ex25[_0x7a71[27]]}};Realtime[_0x7a71[69]][_0x7a71[105]]= function(){var _0xba3ex25=this;return function(_0xba3ex16){if(_0xba3ex16){freeIsNotKey(_0xba3ex16,_0xba3ex25[_0x7a71[25]],_0x7a71[43]);for(var _0xba3ex26=0,_0xba3ex3f={};_0xba3ex26< _0xba3ex16[_0x7a71[71]];_0xba3ex26+= 1){_0xba3ex3f= _0xba3ex16[_0xba3ex26];if(_[_0x7a71[72]](_0xba3ex25[_0x7a71[25]][_0xba3ex3f[_0x7a71[43]]])){_0xba3ex25[_0x7a71[25]][_0xba3ex3f[_0x7a71[43]]]=  new Campaign(_0xba3ex3f)}else {_0xba3ex25[_0x7a71[68]](_0xba3ex25[_0x7a71[25]][_0xba3ex3f[_0x7a71[43]]],_0xba3ex3f)}}};return _0xba3ex25[_0x7a71[25]]}};Realtime[_0x7a71[69]][_0x7a71[106]]= function(){var _0xba3ex25=this;return function(_0xba3ex16){if(_0xba3ex16){freeIsNotKey(_0xba3ex16,_0xba3ex25[_0x7a71[28]],_0x7a71[77]);for(var _0xba3ex26=0,_0xba3ex40={};_0xba3ex26< _0xba3ex16[_0x7a71[71]];_0xba3ex26+= 1){_0xba3ex40= _0xba3ex16[_0xba3ex26];if(_[_0x7a71[72]](_0xba3ex25[_0x7a71[28]][_0xba3ex40[_0x7a71[77]]])){_0xba3ex25[_0x7a71[28]][_0xba3ex40[_0x7a71[77]]]=  new VoiceExtension(_0xba3ex40)}else {_0xba3ex25[_0x7a71[68]](_0xba3ex25[_0x7a71[28]][_0xba3ex40[_0x7a71[77]]],_0xba3ex40)}}};return _0xba3ex25[_0x7a71[28]]}};Realtime[_0x7a71[69]][_0x7a71[107]]= function(){var _0xba3ex25=this;return function(_0xba3ex16){clearCampaigns(_0xba3ex25[_0x7a71[25]]);for(var _0xba3ex26=0;_0xba3ex26< _0xba3ex16[_0x7a71[71]];_0xba3ex26+= 1){_[_0x7a71[86]](_0xba3ex25[_0x7a71[25]][_0xba3ex16[_0xba3ex26][_0x7a71[43]]],_0xba3ex16[_0xba3ex26])};return _0xba3ex25[_0x7a71[25]]}};Realtime[_0x7a71[69]][_0x7a71[108]]= function(){var _0xba3ex25=this;return function(_0xba3ex16){if(_0xba3ex16){freeIsNotKey(_0xba3ex16,_0xba3ex25[_0x7a71[39]],_0x7a71[77]);for(var _0xba3ex26=0,_0xba3ex41={},_0xba3ex42={};_0xba3ex26< _0xba3ex16[_0x7a71[71]];_0xba3ex26+= 1){_0xba3ex41= _0xba3ex16[_0xba3ex26];if(_[_0x7a71[72]](_0xba3ex25[_0x7a71[39]][_0xba3ex41[_0x7a71[77]]])){_0xba3ex25[_0x7a71[39]][_0xba3ex41[_0x7a71[77]]]=  new FaxAccount(_0xba3ex41)}else {_0xba3ex25[_0x7a71[68]](_0xba3ex25[_0x7a71[39]][_0xba3ex41[_0x7a71[77]]],_0xba3ex41)}}};return _0xba3ex25[_0x7a71[39]]}};module[_0x7a71[109]]= Realtime
\ No newline at end of file
index ebe4e3c..3f8d795 100644 (file)
@@ -1 +1 @@
-var _0x33e8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x6D\x69","\x2E\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x6D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x2E\x2F\x75\x73\x65\x72\x52\x65\x70\x6F\x72\x74","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x73\x79\x6E\x63","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x62\x69\x6E\x64","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x6F\x6E","\x63\x75\x73\x74\x6F\x6D\x3A\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x63\x75\x73\x74\x6F\x6D\x3A\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x63\x75\x73\x74\x6F\x6D\x3A\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x62\x6C\x69\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x62\x6C\x69\x6E\x64\x54\x72\x61\x6E\x73\x66\x65\x72","\x61\x74\x74\x65\x6E\x64\x65\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x61\x74\x74\x65\x6E\x64\x65\x64\x54\x72\x61\x6E\x73\x66\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x63\x72\x65\x61\x74\x65","\x6D\x6F\x6E\x69\x74\x6F\x72","\x6D\x6F\x6E\x69\x74\x6F\x72\x73","\x6D\x6F\x6E\x69\x74\x6F\x72\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x33e8[0];var BPromise=require(_0x33e8[1]);var _=require(_0x33e8[2]);var moment=require(_0x33e8[3]);var util=require(_0x33e8[4]);var logger=require(_0x33e8[6])(_0x33e8[5]);var ami=require(_0x33e8[7]);var RpcVoiceAgentReport=require(_0x33e8[8]);var RpcVoiceCallReport=require(_0x33e8[9]);var RpcVoiceDialReport=require(_0x33e8[10]);var RpcMemberReport=require(_0x33e8[11]);var RpcVoiceQueueReport=require(_0x33e8[12]);var RpcVoiceRecording=require(_0x33e8[13]);var RpcVoiceTransferReport=require(_0x33e8[14]);var VoiceQueueReport=require(_0x33e8[15]);var VoiceCallReport=require(_0x33e8[16]);var VoiceAgentReport=require(_0x33e8[17]);var VoiceDialReport=require(_0x33e8[18]);var UserReport=require(_0x33e8[19]);function Report(_0x9d10x14){this[_0x33e8[20]]= _0x9d10x14}Report[_0x33e8[22]][_0x33e8[21]]= function(_0x9d10x14){var _0x9d10x15= new VoiceQueueReport(this[_0x33e8[20]]);var _0x9d10x16= new VoiceAgentReport(this[_0x33e8[20]]);var _0x9d10x17= new VoiceDialReport(this[_0x33e8[20]]);var _0x9d10x18= new VoiceCallReport(this[_0x33e8[20]]);var _0x9d10x19= new UserReport(this[_0x33e8[20]]);ami[_0x33e8[26]](_0x33e8[23],this[_0x33e8[25]][_0x33e8[24]](this));ami[_0x33e8[26]](_0x33e8[27],this[_0x33e8[28]][_0x33e8[24]](this));ami[_0x33e8[26]](_0x33e8[29],this[_0x33e8[30]][_0x33e8[24]](this));ami[_0x33e8[26]](_0x33e8[31],this[_0x33e8[32]][_0x33e8[24]](this));ami[_0x33e8[26]](_0x33e8[33],this[_0x33e8[34]][_0x33e8[24]](this));ami[_0x33e8[26]](_0x33e8[35],this[_0x33e8[36]][_0x33e8[24]](this))};Report[_0x33e8[22]][_0x33e8[25]]= function(_0x9d10x1a){for(var _0x9d10x1b=0;_0x9d10x1b< _0x9d10x1a[_0x33e8[37]];_0x9d10x1b+= 1){if(_0x9d10x1a[_0x9d10x1b][_0x33e8[38]]){RpcMemberReport[_0x33e8[25]](_0x9d10x1a[_0x9d10x1b])};RpcVoiceQueueReport[_0x33e8[39]](_0x9d10x1a[_0x9d10x1b])}};Report[_0x33e8[22]][_0x33e8[28]]= function(_0x9d10x1c){if(_0x9d10x1c[_0x33e8[40]]){for(var _0x9d10x1b=0;_0x9d10x1b< _0x9d10x1c[_0x33e8[41]][_0x33e8[37]];_0x9d10x1b+= 1){_0x9d10x1c[_0x33e8[42]]= _0x9d10x1c[_0x33e8[41]][_0x9d10x1b][_0x33e8[43]];_0x9d10x1c[_0x33e8[44]]= _0x9d10x1c[_0x33e8[41]][_0x9d10x1b][_0x33e8[44]];RpcVoiceRecording[_0x33e8[39]](_0x9d10x1c)}};RpcVoiceCallReport[_0x33e8[39]](_0x9d10x1c)};Report[_0x33e8[22]][_0x33e8[30]]= function(_0x9d10x1d){for(var _0x9d10x1b=0;_0x9d10x1b< _0x9d10x1d[_0x33e8[37]];_0x9d10x1b+= 1){RpcVoiceAgentReport[_0x33e8[39]](_0x9d10x1d[_0x9d10x1b])}};Report[_0x33e8[22]][_0x33e8[32]]= function(_0x9d10x1e){RpcVoiceDialReport[_0x33e8[39]](_0x9d10x1e);RpcMemberReport[_0x33e8[32]](_0x9d10x1e)};Report[_0x33e8[22]][_0x33e8[34]]= function(_0x9d10x1f){RpcVoiceTransferReport[_0x33e8[34]](_0x9d10x1f)};Report[_0x33e8[22]][_0x33e8[36]]= function(_0x9d10x1f){RpcVoiceTransferReport[_0x33e8[36]](_0x9d10x1f)};module[_0x33e8[45]]= Report
\ No newline at end of file
+var _0xa2ef=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x6D\x69","\x2E\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x6D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x72\x70\x63\x2F\x76\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x2E\x2F\x75\x73\x65\x72\x52\x65\x70\x6F\x72\x74","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x73\x79\x6E\x63","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x62\x69\x6E\x64","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x6F\x6E","\x63\x75\x73\x74\x6F\x6D\x3A\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x63\x75\x73\x74\x6F\x6D\x3A\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x63\x75\x73\x74\x6F\x6D\x3A\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x62\x6C\x69\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x62\x6C\x69\x6E\x64\x54\x72\x61\x6E\x73\x66\x65\x72","\x61\x74\x74\x65\x6E\x64\x65\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x61\x74\x74\x65\x6E\x64\x65\x64\x54\x72\x61\x6E\x73\x66\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x63\x72\x65\x61\x74\x65","\x6D\x6F\x6E\x69\x74\x6F\x72","\x6D\x6F\x6E\x69\x74\x6F\x72\x73","\x6D\x6F\x6E\x69\x74\x6F\x72\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xa2ef[0];var BPromise=require(_0xa2ef[1]);var _=require(_0xa2ef[2]);var moment=require(_0xa2ef[3]);var util=require(_0xa2ef[4]);var logger=require(_0xa2ef[6])(_0xa2ef[5]);var ami=require(_0xa2ef[7]);var RpcVoiceAgentReport=require(_0xa2ef[8]);var RpcVoiceCallReport=require(_0xa2ef[9]);var RpcVoiceDialReport=require(_0xa2ef[10]);var RpcMemberReport=require(_0xa2ef[11]);var RpcVoiceQueueReport=require(_0xa2ef[12]);var RpcVoiceRecording=require(_0xa2ef[13]);var RpcVoiceTransferReport=require(_0xa2ef[14]);var VoiceQueueReport=require(_0xa2ef[15]);var VoiceCallReport=require(_0xa2ef[16]);var VoiceAgentReport=require(_0xa2ef[17]);var VoiceDialReport=require(_0xa2ef[18]);var UserReport=require(_0xa2ef[19]);function Report(_0xdf11x14){this[_0xa2ef[20]]= _0xdf11x14}Report[_0xa2ef[22]][_0xa2ef[21]]= function(_0xdf11x14){var _0xdf11x15= new VoiceQueueReport(this[_0xa2ef[20]]);var _0xdf11x16= new VoiceAgentReport(this[_0xa2ef[20]]);var _0xdf11x17= new VoiceDialReport(this[_0xa2ef[20]]);var _0xdf11x18= new VoiceCallReport(this[_0xa2ef[20]]);var _0xdf11x19= new UserReport(this[_0xa2ef[20]]);ami[_0xa2ef[26]](_0xa2ef[23],this[_0xa2ef[25]][_0xa2ef[24]](this));ami[_0xa2ef[26]](_0xa2ef[27],this[_0xa2ef[28]][_0xa2ef[24]](this));ami[_0xa2ef[26]](_0xa2ef[29],this[_0xa2ef[30]][_0xa2ef[24]](this));ami[_0xa2ef[26]](_0xa2ef[31],this[_0xa2ef[32]][_0xa2ef[24]](this));ami[_0xa2ef[26]](_0xa2ef[33],this[_0xa2ef[34]][_0xa2ef[24]](this));ami[_0xa2ef[26]](_0xa2ef[35],this[_0xa2ef[36]][_0xa2ef[24]](this))};Report[_0xa2ef[22]][_0xa2ef[25]]= function(_0xdf11x1a){for(var _0xdf11x1b=0;_0xdf11x1b< _0xdf11x1a[_0xa2ef[37]];_0xdf11x1b+= 1){if(_0xdf11x1a[_0xdf11x1b][_0xa2ef[38]]){RpcMemberReport[_0xa2ef[25]](_0xdf11x1a[_0xdf11x1b])};RpcVoiceQueueReport[_0xa2ef[39]](_0xdf11x1a[_0xdf11x1b])}};Report[_0xa2ef[22]][_0xa2ef[28]]= function(_0xdf11x1c){if(_0xdf11x1c[_0xa2ef[40]]){for(var _0xdf11x1b=0;_0xdf11x1b< _0xdf11x1c[_0xa2ef[41]][_0xa2ef[37]];_0xdf11x1b+= 1){_0xdf11x1c[_0xa2ef[42]]= _0xdf11x1c[_0xa2ef[41]][_0xdf11x1b][_0xa2ef[43]];_0xdf11x1c[_0xa2ef[44]]= _0xdf11x1c[_0xa2ef[41]][_0xdf11x1b][_0xa2ef[44]];RpcVoiceRecording[_0xa2ef[39]](_0xdf11x1c)}};RpcVoiceCallReport[_0xa2ef[39]](_0xdf11x1c)};Report[_0xa2ef[22]][_0xa2ef[30]]= function(_0xdf11x1d){for(var _0xdf11x1b=0;_0xdf11x1b< _0xdf11x1d[_0xa2ef[37]];_0xdf11x1b+= 1){RpcVoiceAgentReport[_0xa2ef[39]](_0xdf11x1d[_0xdf11x1b])}};Report[_0xa2ef[22]][_0xa2ef[32]]= function(_0xdf11x1e){RpcVoiceDialReport[_0xa2ef[39]](_0xdf11x1e);RpcMemberReport[_0xa2ef[32]](_0xdf11x1e)};Report[_0xa2ef[22]][_0xa2ef[34]]= function(_0xdf11x1f){RpcVoiceTransferReport[_0xa2ef[34]](_0xdf11x1f)};Report[_0xa2ef[22]][_0xa2ef[36]]= function(_0xdf11x1f){RpcVoiceTransferReport[_0xa2ef[36]](_0xdf11x1f)};module[_0xa2ef[45]]= Report
\ No newline at end of file
index a764b84..f49cd98 100644 (file)
@@ -1 +1 @@
-var _0x20af=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x74\x72\x75\x6E\x6B\x73","\x61\x67\x65\x6E\x74\x73","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x72\x65\x67\x69\x73\x74\x72\x79\x65\x6E\x74\x72\x79","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x52\x65\x67\x69\x73\x74\x72\x79","\x6F\x6E","\x72\x65\x67\x69\x73\x74\x72\x79","\x64\x65\x76\x69\x63\x65\x73\x74\x61\x74\x65\x63\x68\x61\x6E\x67\x65","\x73\x79\x6E\x63\x44\x65\x76\x69\x63\x65\x53\x74\x61\x74\x65","\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73","\x73\x79\x6E\x63\x50\x65\x65\x72\x53\x74\x61\x74\x75\x73","\x6C\x6F\x6F\x70\x53\x79\x6E\x63\x52\x65\x61\x6C\x54\x69\x6D\x65\x53\x68\x6F\x77","\x5B\x6C\x6F\x6F\x70\x53\x79\x6E\x63\x52\x65\x61\x6C\x54\x69\x6D\x65\x53\x68\x6F\x77\x5D","\x63\x61\x74\x63\x68","\x61\x63\x74\x69\x6F\x6E\x53\x69\x70\x50\x65\x65\x72\x53\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x61\x63\x74\x69\x6F\x6E\x44\x65\x76\x69\x63\x65\x53\x74\x61\x74\x65\x4C\x69\x73\x74","\x61\x63\x74\x69\x6F\x6E\x53\x69\x70\x53\x68\x6F\x77\x52\x65\x67\x69\x73\x74\x72\x79","\x72\x65\x73\x6F\x6C\x76\x65","\x6C\x6F\x67","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x73\x4E\x6F\x74\x4E\x75\x6C\x6C","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x65\x6D\x69\x74","\x74\x6F","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x66\x69\x6E\x64","\x73\x74\x61\x74\x65\x52\x65\x67\x69\x73\x74\x72\x79","\x73\x74\x61\x74\x65","\x65\x76\x65\x6E\x74","\x61\x63\x74\x69\x6F\x6E\x69\x64","\x6F\x6D\x69\x74","\x6D\x65\x72\x67\x65","\x74\x72\x75\x6E\x6B\x3A\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x74\x72\x75\x6E\x6B\x3A\x73\x61\x76\x65","\x5B\x73\x79\x6E\x63\x52\x65\x67\x69\x73\x74\x72\x79\x5D\x5B\x55\x73\x65\x72\x52\x65\x70\x6F\x72\x74\x5D","\x64\x65\x76\x69\x63\x65","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x73\x74\x61\x74\x65\x54\x69\x6D\x65","\x78","\x74\x6F\x4E\x75\x6D\x62\x65\x72","\x75\x70\x64\x61\x74\x65\x53\x74\x61\x74\x75\x73\x52\x65\x61\x6C\x74\x69\x6D\x65","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x3A\x25\x73","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x3A\x73\x61\x76\x65","\x51\x75\x65\x75\x65","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x5B\x73\x79\x6E\x63\x44\x65\x76\x69\x63\x65\x53\x74\x61\x74\x65\x5D\x5B\x55\x73\x65\x72\x52\x65\x70\x6F\x72\x74\x5D","\x70\x65\x65\x72","\x73\x74\x61\x74\x75\x73","\x61\x64\x64\x72\x65\x73\x73","\x75\x73\x65\x72\x3A\x25\x73","\x75\x73\x65\x72\x3A\x73\x61\x76\x65","\x5B\x73\x79\x6E\x63\x50\x65\x65\x72\x53\x74\x61\x74\x75\x73\x5D\x5B\x55\x73\x65\x72\x52\x65\x70\x6F\x72\x74\x5D","\x65\x78\x70\x6F\x72\x74\x73"];_0x20af[0];var _=require(_0x20af[1]);var moment=require(_0x20af[2]);var BPromise=require(_0x20af[3]);var util=require(_0x20af[4]);var logger=require(_0x20af[6])(_0x20af[5]);var ami=require(_0x20af[7]);var io=require(_0x20af[9])({host:_0x20af[8],port:6379});function UserReport(_0xae35x9){this[_0x20af[10]]= _0xae35x9[_0x20af[10]];this[_0x20af[11]]= _0xae35x9[_0x20af[11]];this[_0x20af[12]]= _0xae35x9[_0x20af[12]];ami[_0x20af[16]](_0x20af[13],this[_0x20af[15]][_0x20af[14]](this));ami[_0x20af[16]](_0x20af[17],this[_0x20af[15]][_0x20af[14]](this));ami[_0x20af[16]](_0x20af[18],this[_0x20af[19]][_0x20af[14]](this));ami[_0x20af[16]](_0x20af[20],this[_0x20af[21]][_0x20af[14]](this));this[_0x20af[22]]();return BPromise[_0x20af[29]]()[_0x20af[26]](ami[_0x20af[28]]())[_0x20af[26]](ami[_0x20af[27]]())[_0x20af[26]](ami[_0x20af[25]]())[_0x20af[24]](loggerCatch(_0x20af[23]))}function loggerCatch(_0xae35xb){return function(_0xae35xc){console[_0x20af[30]](_0xae35xb,_0xae35xc);logger[_0x20af[32]](_0xae35xb,util[_0x20af[31]](_0xae35xc,{showHidden:false,depth:null}))}}UserReport[_0x20af[33]][_0x20af[22]]= function(){setInterval(function(){BPromise[_0x20af[29]]()[_0x20af[26]](ami[_0x20af[28]]())[_0x20af[26]](ami[_0x20af[27]]())[_0x20af[26]](ami[_0x20af[25]]())[_0x20af[24]](loggerCatch(_0x20af[23]))},13000)};UserReport[_0x20af[33]][_0x20af[34]]= function(_0xae35xd){return _0xae35xd!== null&&  !_[_0x20af[35]](_0xae35xd)};UserReport[_0x20af[33]][_0x20af[36]]= function(_0xae35xe,_0xae35xf,_0xae35xd){io[_0x20af[37]](_0xae35xe)[_0x20af[36]](_0xae35xf,_0xae35xd)};UserReport[_0x20af[33]][_0x20af[15]]= function(_0xae35xf){try{if(this[_0x20af[34]](_0xae35xf)){var _0xae35x10=_[_0x20af[39]](this[_0x20af[10]],{registry:_0xae35xf[_0x20af[38]]});if(_0xae35x10){_0xae35xf[_0x20af[40]]= _0xae35xf[_0x20af[41]];_[_0x20af[45]](_0xae35x10,_[_0x20af[44]](_0xae35xf,[_0x20af[42],_0x20af[43],_0x20af[38],_0x20af[41]]));this[_0x20af[36]](util[_0x20af[48]](_0x20af[46],_0xae35x10[_0x20af[47]]),_0x20af[49],_0xae35x10)}}}catch(e){logger[_0x20af[32]](_0x20af[50],util[_0x20af[31]](e,{showHidden:false,depth:null}))}};UserReport[_0x20af[33]][_0x20af[19]]= function(_0xae35xf){try{if(this[_0x20af[34]](_0xae35xf)){if(this[_0x20af[11]][_0xae35xf[_0x20af[51]]]){if(this[_0x20af[11]][_0xae35xf[_0x20af[51]]][_0x20af[41]]!== _0xae35xf[_0x20af[41]][_0x20af[52]]()){this[_0x20af[11]][_0xae35xf[_0x20af[51]]][_0x20af[53]]= _[_0x20af[55]](moment()[_0x20af[48]](_0x20af[54]))};this[_0x20af[11]][_0xae35xf[_0x20af[51]]][_0x20af[41]]= _0xae35xf[_0x20af[41]][_0x20af[52]]();this[_0x20af[11]][_0xae35xf[_0x20af[51]]][_0x20af[56]](_0xae35xf)}else {if(this[_0x20af[12]][_0xae35xf[_0x20af[51]]]){if(this[_0x20af[12]][_0xae35xf[_0x20af[51]]][_0x20af[41]]!== _0xae35xf[_0x20af[41]][_0x20af[52]]()){this[_0x20af[12]][_0xae35xf[_0x20af[51]]][_0x20af[53]]= _[_0x20af[55]](moment()[_0x20af[48]](_0x20af[54]))};this[_0x20af[12]][_0xae35xf[_0x20af[51]]][_0x20af[41]]= _0xae35xf[_0x20af[41]][_0x20af[52]]();this[_0x20af[36]](util[_0x20af[48]](_0x20af[57],this[_0x20af[12]][_0xae35xf[_0x20af[51]]][_0x20af[47]]),_0x20af[58],this[_0x20af[12]][_0xae35xf[_0x20af[51]]])}else {if(this[_0x20af[10]][_0xae35xf[_0x20af[51]]]){if(this[_0x20af[10]][_0xae35xf[_0x20af[51]]][_0x20af[41]]!== _0xae35xf[_0x20af[41]][_0x20af[52]]()){this[_0x20af[10]][_0xae35xf[_0x20af[51]]][_0x20af[53]]= _[_0x20af[55]](moment()[_0x20af[48]](_0x20af[54]))};this[_0x20af[10]][_0xae35xf[_0x20af[51]]][_0x20af[41]]= _0xae35xf[_0x20af[41]][_0x20af[52]]();this[_0x20af[36]](util[_0x20af[48]](_0x20af[46],this[_0x20af[10]][_0xae35xf[_0x20af[51]]][_0x20af[47]]),_0x20af[49],this[_0x20af[10]][_0xae35xf[_0x20af[51]]])}else {if(_[_0x20af[60]](_0xae35xf[_0x20af[51]],_0x20af[59])){}else {}}}}}}catch(e){logger[_0x20af[32]](_0x20af[61],util[_0x20af[31]](e,{showHidden:false,depth:null}))}};UserReport[_0x20af[33]][_0x20af[21]]= function(_0xae35xf){try{if(this[_0x20af[34]](_0xae35xf)&& this[_0x20af[34]](_0xae35xf[_0x20af[20]])){if(this[_0x20af[11]][_0xae35xf[_0x20af[62]]]){this[_0x20af[11]][_0xae35xf[_0x20af[62]]][_0x20af[63]]= _0xae35xf[_0x20af[20]][_0x20af[52]]();this[_0x20af[11]][_0xae35xf[_0x20af[62]]][_0x20af[64]]= _0xae35xf[_0x20af[64]];this[_0x20af[36]](util[_0x20af[48]](_0x20af[65],this[_0x20af[11]][_0xae35xf[_0x20af[62]]][_0x20af[47]]),_0x20af[66],this[_0x20af[11]][_0xae35xf[_0x20af[62]]])}else {if(this[_0x20af[12]][_0xae35xf[_0x20af[62]]]){this[_0x20af[12]][_0xae35xf[_0x20af[62]]][_0x20af[63]]= _0xae35xf[_0x20af[20]][_0x20af[52]]();this[_0x20af[12]][_0xae35xf[_0x20af[62]]][_0x20af[64]]= _0xae35xf[_0x20af[64]];this[_0x20af[36]](util[_0x20af[48]](_0x20af[57],this[_0x20af[12]][_0xae35xf[_0x20af[62]]][_0x20af[47]]),_0x20af[58],this[_0x20af[12]][_0xae35xf[_0x20af[62]]])}else {if(this[_0x20af[10]][_0xae35xf[_0x20af[62]]]){this[_0x20af[10]][_0xae35xf[_0x20af[62]]][_0x20af[63]]= _0xae35xf[_0x20af[20]][_0x20af[52]]();this[_0x20af[10]][_0xae35xf[_0x20af[62]]][_0x20af[64]]= _0xae35xf[_0x20af[64]];this[_0x20af[36]](util[_0x20af[48]](_0x20af[46],this[_0x20af[10]][_0xae35xf[_0x20af[62]]][_0x20af[47]]),_0x20af[49],this[_0x20af[10]][_0xae35xf[_0x20af[62]]])}else {}}}}}catch(e){logger[_0x20af[32]](_0x20af[67],util[_0x20af[31]](e,{showHidden:false,depth:null}))}};module[_0x20af[68]]= UserReport
\ No newline at end of file
+var _0x4ae7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x74\x72\x75\x6E\x6B\x73","\x61\x67\x65\x6E\x74\x73","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x72\x65\x67\x69\x73\x74\x72\x79\x65\x6E\x74\x72\x79","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x52\x65\x67\x69\x73\x74\x72\x79","\x6F\x6E","\x72\x65\x67\x69\x73\x74\x72\x79","\x64\x65\x76\x69\x63\x65\x73\x74\x61\x74\x65\x63\x68\x61\x6E\x67\x65","\x73\x79\x6E\x63\x44\x65\x76\x69\x63\x65\x53\x74\x61\x74\x65","\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73","\x73\x79\x6E\x63\x50\x65\x65\x72\x53\x74\x61\x74\x75\x73","\x6C\x6F\x6F\x70\x53\x79\x6E\x63\x52\x65\x61\x6C\x54\x69\x6D\x65\x53\x68\x6F\x77","\x5B\x6C\x6F\x6F\x70\x53\x79\x6E\x63\x52\x65\x61\x6C\x54\x69\x6D\x65\x53\x68\x6F\x77\x5D","\x63\x61\x74\x63\x68","\x61\x63\x74\x69\x6F\x6E\x53\x69\x70\x50\x65\x65\x72\x53\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x61\x63\x74\x69\x6F\x6E\x44\x65\x76\x69\x63\x65\x53\x74\x61\x74\x65\x4C\x69\x73\x74","\x61\x63\x74\x69\x6F\x6E\x53\x69\x70\x53\x68\x6F\x77\x52\x65\x67\x69\x73\x74\x72\x79","\x72\x65\x73\x6F\x6C\x76\x65","\x6C\x6F\x67","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x73\x4E\x6F\x74\x4E\x75\x6C\x6C","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x65\x6D\x69\x74","\x74\x6F","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x66\x69\x6E\x64","\x73\x74\x61\x74\x65\x52\x65\x67\x69\x73\x74\x72\x79","\x73\x74\x61\x74\x65","\x65\x76\x65\x6E\x74","\x61\x63\x74\x69\x6F\x6E\x69\x64","\x6F\x6D\x69\x74","\x6D\x65\x72\x67\x65","\x74\x72\x75\x6E\x6B\x3A\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x74\x72\x75\x6E\x6B\x3A\x73\x61\x76\x65","\x5B\x73\x79\x6E\x63\x52\x65\x67\x69\x73\x74\x72\x79\x5D\x5B\x55\x73\x65\x72\x52\x65\x70\x6F\x72\x74\x5D","\x64\x65\x76\x69\x63\x65","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x73\x74\x61\x74\x65\x54\x69\x6D\x65","\x78","\x74\x6F\x4E\x75\x6D\x62\x65\x72","\x75\x70\x64\x61\x74\x65\x53\x74\x61\x74\x75\x73\x52\x65\x61\x6C\x74\x69\x6D\x65","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x3A\x25\x73","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x3A\x73\x61\x76\x65","\x51\x75\x65\x75\x65","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x5B\x73\x79\x6E\x63\x44\x65\x76\x69\x63\x65\x53\x74\x61\x74\x65\x5D\x5B\x55\x73\x65\x72\x52\x65\x70\x6F\x72\x74\x5D","\x70\x65\x65\x72","\x73\x74\x61\x74\x75\x73","\x61\x64\x64\x72\x65\x73\x73","\x75\x73\x65\x72\x3A\x25\x73","\x75\x73\x65\x72\x3A\x73\x61\x76\x65","\x5B\x73\x79\x6E\x63\x50\x65\x65\x72\x53\x74\x61\x74\x75\x73\x5D\x5B\x55\x73\x65\x72\x52\x65\x70\x6F\x72\x74\x5D","\x65\x78\x70\x6F\x72\x74\x73"];_0x4ae7[0];var _=require(_0x4ae7[1]);var moment=require(_0x4ae7[2]);var BPromise=require(_0x4ae7[3]);var util=require(_0x4ae7[4]);var logger=require(_0x4ae7[6])(_0x4ae7[5]);var ami=require(_0x4ae7[7]);var io=require(_0x4ae7[9])({host:_0x4ae7[8],port:6379});function UserReport(_0x802cx9){this[_0x4ae7[10]]= _0x802cx9[_0x4ae7[10]];this[_0x4ae7[11]]= _0x802cx9[_0x4ae7[11]];this[_0x4ae7[12]]= _0x802cx9[_0x4ae7[12]];ami[_0x4ae7[16]](_0x4ae7[13],this[_0x4ae7[15]][_0x4ae7[14]](this));ami[_0x4ae7[16]](_0x4ae7[17],this[_0x4ae7[15]][_0x4ae7[14]](this));ami[_0x4ae7[16]](_0x4ae7[18],this[_0x4ae7[19]][_0x4ae7[14]](this));ami[_0x4ae7[16]](_0x4ae7[20],this[_0x4ae7[21]][_0x4ae7[14]](this));this[_0x4ae7[22]]();return BPromise[_0x4ae7[29]]()[_0x4ae7[26]](ami[_0x4ae7[28]]())[_0x4ae7[26]](ami[_0x4ae7[27]]())[_0x4ae7[26]](ami[_0x4ae7[25]]())[_0x4ae7[24]](loggerCatch(_0x4ae7[23]))}function loggerCatch(_0x802cxb){return function(_0x802cxc){console[_0x4ae7[30]](_0x802cxb,_0x802cxc);logger[_0x4ae7[32]](_0x802cxb,util[_0x4ae7[31]](_0x802cxc,{showHidden:false,depth:null}))}}UserReport[_0x4ae7[33]][_0x4ae7[22]]= function(){setInterval(function(){BPromise[_0x4ae7[29]]()[_0x4ae7[26]](ami[_0x4ae7[28]]())[_0x4ae7[26]](ami[_0x4ae7[27]]())[_0x4ae7[26]](ami[_0x4ae7[25]]())[_0x4ae7[24]](loggerCatch(_0x4ae7[23]))},13000)};UserReport[_0x4ae7[33]][_0x4ae7[34]]= function(_0x802cxd){return _0x802cxd!== null&&  !_[_0x4ae7[35]](_0x802cxd)};UserReport[_0x4ae7[33]][_0x4ae7[36]]= function(_0x802cxe,_0x802cxf,_0x802cxd){io[_0x4ae7[37]](_0x802cxe)[_0x4ae7[36]](_0x802cxf,_0x802cxd)};UserReport[_0x4ae7[33]][_0x4ae7[15]]= function(_0x802cxf){try{if(this[_0x4ae7[34]](_0x802cxf)){var _0x802cx10=_[_0x4ae7[39]](this[_0x4ae7[10]],{registry:_0x802cxf[_0x4ae7[38]]});if(_0x802cx10){_0x802cxf[_0x4ae7[40]]= _0x802cxf[_0x4ae7[41]];_[_0x4ae7[45]](_0x802cx10,_[_0x4ae7[44]](_0x802cxf,[_0x4ae7[42],_0x4ae7[43],_0x4ae7[38],_0x4ae7[41]]));this[_0x4ae7[36]](util[_0x4ae7[48]](_0x4ae7[46],_0x802cx10[_0x4ae7[47]]),_0x4ae7[49],_0x802cx10)}}}catch(e){logger[_0x4ae7[32]](_0x4ae7[50],util[_0x4ae7[31]](e,{showHidden:false,depth:null}))}};UserReport[_0x4ae7[33]][_0x4ae7[19]]= function(_0x802cxf){try{if(this[_0x4ae7[34]](_0x802cxf)){if(this[_0x4ae7[11]][_0x802cxf[_0x4ae7[51]]]){if(this[_0x4ae7[11]][_0x802cxf[_0x4ae7[51]]][_0x4ae7[41]]!== _0x802cxf[_0x4ae7[41]][_0x4ae7[52]]()){this[_0x4ae7[11]][_0x802cxf[_0x4ae7[51]]][_0x4ae7[53]]= _[_0x4ae7[55]](moment()[_0x4ae7[48]](_0x4ae7[54]))};this[_0x4ae7[11]][_0x802cxf[_0x4ae7[51]]][_0x4ae7[41]]= _0x802cxf[_0x4ae7[41]][_0x4ae7[52]]();this[_0x4ae7[11]][_0x802cxf[_0x4ae7[51]]][_0x4ae7[56]](_0x802cxf)}else {if(this[_0x4ae7[12]][_0x802cxf[_0x4ae7[51]]]){if(this[_0x4ae7[12]][_0x802cxf[_0x4ae7[51]]][_0x4ae7[41]]!== _0x802cxf[_0x4ae7[41]][_0x4ae7[52]]()){this[_0x4ae7[12]][_0x802cxf[_0x4ae7[51]]][_0x4ae7[53]]= _[_0x4ae7[55]](moment()[_0x4ae7[48]](_0x4ae7[54]))};this[_0x4ae7[12]][_0x802cxf[_0x4ae7[51]]][_0x4ae7[41]]= _0x802cxf[_0x4ae7[41]][_0x4ae7[52]]();this[_0x4ae7[36]](util[_0x4ae7[48]](_0x4ae7[57],this[_0x4ae7[12]][_0x802cxf[_0x4ae7[51]]][_0x4ae7[47]]),_0x4ae7[58],this[_0x4ae7[12]][_0x802cxf[_0x4ae7[51]]])}else {if(this[_0x4ae7[10]][_0x802cxf[_0x4ae7[51]]]){if(this[_0x4ae7[10]][_0x802cxf[_0x4ae7[51]]][_0x4ae7[41]]!== _0x802cxf[_0x4ae7[41]][_0x4ae7[52]]()){this[_0x4ae7[10]][_0x802cxf[_0x4ae7[51]]][_0x4ae7[53]]= _[_0x4ae7[55]](moment()[_0x4ae7[48]](_0x4ae7[54]))};this[_0x4ae7[10]][_0x802cxf[_0x4ae7[51]]][_0x4ae7[41]]= _0x802cxf[_0x4ae7[41]][_0x4ae7[52]]();this[_0x4ae7[36]](util[_0x4ae7[48]](_0x4ae7[46],this[_0x4ae7[10]][_0x802cxf[_0x4ae7[51]]][_0x4ae7[47]]),_0x4ae7[49],this[_0x4ae7[10]][_0x802cxf[_0x4ae7[51]]])}else {if(_[_0x4ae7[60]](_0x802cxf[_0x4ae7[51]],_0x4ae7[59])){}else {}}}}}}catch(e){logger[_0x4ae7[32]](_0x4ae7[61],util[_0x4ae7[31]](e,{showHidden:false,depth:null}))}};UserReport[_0x4ae7[33]][_0x4ae7[21]]= function(_0x802cxf){try{if(this[_0x4ae7[34]](_0x802cxf)&& this[_0x4ae7[34]](_0x802cxf[_0x4ae7[20]])){if(this[_0x4ae7[11]][_0x802cxf[_0x4ae7[62]]]){this[_0x4ae7[11]][_0x802cxf[_0x4ae7[62]]][_0x4ae7[63]]= _0x802cxf[_0x4ae7[20]][_0x4ae7[52]]();this[_0x4ae7[11]][_0x802cxf[_0x4ae7[62]]][_0x4ae7[64]]= _0x802cxf[_0x4ae7[64]];this[_0x4ae7[36]](util[_0x4ae7[48]](_0x4ae7[65],this[_0x4ae7[11]][_0x802cxf[_0x4ae7[62]]][_0x4ae7[47]]),_0x4ae7[66],this[_0x4ae7[11]][_0x802cxf[_0x4ae7[62]]])}else {if(this[_0x4ae7[12]][_0x802cxf[_0x4ae7[62]]]){this[_0x4ae7[12]][_0x802cxf[_0x4ae7[62]]][_0x4ae7[63]]= _0x802cxf[_0x4ae7[20]][_0x4ae7[52]]();this[_0x4ae7[12]][_0x802cxf[_0x4ae7[62]]][_0x4ae7[64]]= _0x802cxf[_0x4ae7[64]];this[_0x4ae7[36]](util[_0x4ae7[48]](_0x4ae7[57],this[_0x4ae7[12]][_0x802cxf[_0x4ae7[62]]][_0x4ae7[47]]),_0x4ae7[58],this[_0x4ae7[12]][_0x802cxf[_0x4ae7[62]]])}else {if(this[_0x4ae7[10]][_0x802cxf[_0x4ae7[62]]]){this[_0x4ae7[10]][_0x802cxf[_0x4ae7[62]]][_0x4ae7[63]]= _0x802cxf[_0x4ae7[20]][_0x4ae7[52]]();this[_0x4ae7[10]][_0x802cxf[_0x4ae7[62]]][_0x4ae7[64]]= _0x802cxf[_0x4ae7[64]];this[_0x4ae7[36]](util[_0x4ae7[48]](_0x4ae7[46],this[_0x4ae7[10]][_0x802cxf[_0x4ae7[62]]][_0x4ae7[47]]),_0x4ae7[49],this[_0x4ae7[10]][_0x802cxf[_0x4ae7[62]]])}else {}}}}}catch(e){logger[_0x4ae7[32]](_0x4ae7[67],util[_0x4ae7[31]](e,{showHidden:false,depth:null}))}};module[_0x4ae7[68]]= UserReport
\ No newline at end of file
index 49cf3ad..388e446 100644 (file)
@@ -1 +1 @@
-var _0x2893=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74\x73","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x61\x6C\x6C\x65\x64","\x6F\x6E","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6E\x6E\x65\x63\x74","\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x52\x69\x6E\x67\x4E\x6F\x41\x6E\x73\x77\x65\x72","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x76\x61\x72\x73\x65\x74","\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74","\x68\x61\x6E\x67\x75\x70","\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70","\x65\x6D\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x74\x6F","\x69\x73\x4E\x6F\x74\x4E\x75\x6C\x6C","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x61\x6C\x6C\x65\x64","\x71\x75\x65\x75\x65","\x74\x79\x70\x65","\x69\x6E\x62\x6F\x75\x6E\x64","\x65\x76\x65\x6E\x74","\x70\x72\x69\x76\x69\x6C\x65\x67\x65","\x6F\x6D\x69\x74","\x6D\x65\x72\x67\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64","\x75\x73\x65\x72\x3A\x25\x73","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x75\x73\x65\x72\x3A\x63\x61\x6C\x6C\x65\x64","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x61\x6C\x6C\x65\x64\x5D\x5B\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x5D","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x63\x6F\x6E\x6E\x65\x63\x74","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x64\x65\x73\x74\x63\x68\x61\x6E\x6E\x65\x6C\x73\x74\x61\x74\x65","\x64\x65\x73\x74\x63\x68\x61\x6E\x6E\x65\x6C\x73\x74\x61\x74\x65\x64\x65\x73\x63","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x64\x65\x73\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x70\x69\x63\x6B","\x75\x73\x65\x72\x3A\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72\x41\x74","\x72\x65\x61\x73\x6F\x6E","\x61\x6E\x73\x77\x65\x72\x65\x64\x5F\x65\x6C\x73\x65\x77\x68\x65\x72\x65","\x61\x6E\x73\x77\x65\x72\x65\x64\x65\x6C\x73\x65\x77\x68\x65\x72\x65\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x75\x6E\x69\x71\x75\x65\x69\x64","\x61\x6E\x73\x77\x65\x72\x65\x64\x65\x6C\x73\x65\x77\x68\x65\x72\x65\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x61\x6E\x73\x77\x65\x72\x65\x64\x65\x6C\x73\x65\x77\x68\x65\x72\x65","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6E\x6E\x65\x63\x74\x5D\x5B\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x5D","\x72\x65\x6A\x65\x63\x74\x65\x64","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x52\x69\x6E\x67\x4E\x6F\x41\x6E\x73\x77\x65\x72\x5D\x5B\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x5D","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x5D\x5B\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x5D","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x61\x63\x77","\x61\x67\x65\x6E\x74\x61\x63\x77","\x61\x63\x77\x74\x69\x6D\x65","\x61\x63\x77\x54\x69\x6D\x65\x6F\x75\x74","\x75\x73\x65\x72\x3A\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D\x5B\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x5D","\x76\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x76\x61\x6C\x75\x65","\x61\x64\x64\x56\x61\x72\x69\x61\x62\x6C\x65","\x5B\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74\x5D\x5B\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x5D","\x63\x75\x73\x74\x6F\x6D\x3A\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x76\x61\x6C\x75\x65\x73","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x5D\x5B\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x5D","\x65\x78\x70\x6F\x72\x74\x73"];_0x2893[0];var _=require(_0x2893[1]);var moment=require(_0x2893[2]);var util=require(_0x2893[3]);var logger=require(_0x2893[5])(_0x2893[4]);var ami=require(_0x2893[6]);var io=require(_0x2893[8])({host:_0x2893[7],port:6379});function VoiceAgentReport(_0x3e4cx8){this[_0x2893[9]]= {};this[_0x2893[10]]= _0x3e4cx8[_0x2893[10]];this[_0x2893[11]]= _0x3e4cx8[_0x2893[11]];this[_0x2893[12]]= {};ami[_0x2893[16]](_0x2893[13],this[_0x2893[15]][_0x2893[14]](this));ami[_0x2893[16]](_0x2893[17],this[_0x2893[18]][_0x2893[14]](this));ami[_0x2893[16]](_0x2893[19],this[_0x2893[20]][_0x2893[14]](this));ami[_0x2893[16]](_0x2893[21],this[_0x2893[22]][_0x2893[14]](this));ami[_0x2893[16]](_0x2893[23],this[_0x2893[24]][_0x2893[14]](this));ami[_0x2893[16]](_0x2893[25],this[_0x2893[26]][_0x2893[14]](this));ami[_0x2893[16]](_0x2893[27],this[_0x2893[28]][_0x2893[14]](this))}VoiceAgentReport[_0x2893[30]][_0x2893[29]]= function(_0x3e4cx9,_0x3e4cxa,_0x3e4cxb){io[_0x2893[31]](_0x3e4cx9)[_0x2893[29]](_0x3e4cxa,_0x3e4cxb)};VoiceAgentReport[_0x2893[30]][_0x2893[32]]= function(_0x3e4cxb){return _0x3e4cxb!== null&&  !_[_0x2893[33]](_0x3e4cxb)};VoiceAgentReport[_0x2893[30]][_0x2893[15]]= function(_0x3e4cxa){try{if(this[_0x2893[32]](_0x3e4cxa)){if(_[_0x2893[33]](this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]])){this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]]= {}};if(_[_0x2893[33]](this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]])){this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]]= {agentcalledAt:moment()[_0x2893[37]](_0x2893[36]),lastevent:_0x2893[38],variables:this[_0x2893[12]][_0x3e4cxa[_0x2893[34]]],type:this[_0x2893[10]][_0x3e4cxa[_0x2893[39]]]?this[_0x2893[10]][_0x3e4cxa[_0x2893[39]]][_0x2893[40]]|| _0x2893[41]:_0x2893[41]}};_[_0x2893[45]](this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]],_[_0x2893[44]](_0x3e4cxa,[_0x2893[42],_0x2893[43]]));ami[_0x2893[29]](_0x2893[46],this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]]);this[_0x2893[29]](util[_0x2893[37]](_0x2893[47],_0x3e4cxa[_0x2893[48]]),_0x2893[49],this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]])}}catch(e){logger[_0x2893[52]](_0x2893[50],util[_0x2893[51]](e,{showHidden:false,depth:null}))}};VoiceAgentReport[_0x2893[30]][_0x2893[18]]= function(_0x3e4cxa){try{if(this[_0x2893[32]](_0x3e4cxa)){if(this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]]){for(var _0x3e4cxc in this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]]){if(this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x2893[53]](_0x3e4cxc)){if(_0x3e4cxa[_0x2893[35]]=== _0x3e4cxc){this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[54]]= moment()[_0x2893[37]](_0x2893[36]);this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[55]]= _0x2893[56];this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[57]]= _0x3e4cxa[_0x2893[57]];this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[58]]= _0x3e4cxa[_0x2893[58]];this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[59]]= _0x3e4cxa[_0x2893[59]];this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[60]]= _0x3e4cxa[_0x2893[60]];this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[61]]= _0x3e4cxa[_0x2893[61]];_[_0x2893[45]](this[_0x2893[11]][_0x3e4cxa[_0x2893[62]]],_[_0x2893[64]](_0x3e4cxa,[_0x2893[39],_0x2893[63]]));this[_0x2893[29]](util[_0x2893[37]](_0x2893[47],_0x3e4cxa[_0x2893[48]]),_0x2893[65],this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]]);ami[_0x2893[29]](_0x2893[66],this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc])}else {if(this[_0x2893[32]](this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[19]])){this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[19]]= true;this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[67]]= moment()[_0x2893[37]](_0x2893[36]);this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[68]]= _0x2893[69];this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[55]]= _0x2893[69];this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[70]]= _0x3e4cxa[_0x2893[35]];this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[71]]= _0x3e4cxa[_0x2893[48]];ami[_0x2893[29]](_0x2893[72],this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc])}}}}}}}catch(e){logger[_0x2893[52]](_0x2893[73],util[_0x2893[51]](e,{showHidden:false,depth:null}))}};VoiceAgentReport[_0x2893[30]][_0x2893[20]]= function(_0x3e4cxa){try{if(this[_0x2893[32]](_0x3e4cxa)){if(this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]]&& this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]]&& _[_0x2893[33]](this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]][_0x2893[19]])){this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]][_0x2893[19]]= true;this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]][_0x2893[67]]= moment()[_0x2893[37]](_0x2893[36]);this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]][_0x2893[68]]= _0x2893[74];this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]][_0x2893[55]]= _0x2893[74];ami[_0x2893[29]](_0x2893[75],this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]])}}}catch(e){logger[_0x2893[52]](_0x2893[76],util[_0x2893[51]](e,{showHidden:false,depth:null}))}};VoiceAgentReport[_0x2893[30]][_0x2893[22]]= function(_0x3e4cxa){try{if(this[_0x2893[32]](_0x3e4cxa)){if(this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]]){for(var _0x3e4cxc in this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]]){if(this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x2893[53]](_0x3e4cxc)&& _[_0x2893[33]](this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[19]])){this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[19]]= true;this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[67]]= moment()[_0x2893[37]](_0x2893[36]);this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[68]]= _0x2893[77];this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[55]]= _0x2893[77];ami[_0x2893[29]](_0x2893[78],this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc])}}}}}catch(e){logger[_0x2893[52]](_0x2893[79],util[_0x2893[51]](e,{showHidden:false,depth:null}))}};VoiceAgentReport[_0x2893[30]][_0x2893[24]]= function(_0x3e4cxa){try{if(this[_0x2893[32]](_0x3e4cxa)){if(this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]]&& this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]]&& _[_0x2893[33]](this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]][_0x2893[23]])){this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]][_0x2893[23]]= true;this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]][_0x2893[80]]= moment()[_0x2893[37]](_0x2893[36]);this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]][_0x2893[55]]= _0x2893[81];this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]][_0x2893[82]]= _0x3e4cxa[_0x2893[82]];this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]][_0x2893[68]]= _0x3e4cxa[_0x2893[68]];if(this[_0x2893[10]][_0x3e4cxa[_0x2893[39]]]&& this[_0x2893[10]][_0x3e4cxa[_0x2893[39]]][_0x2893[83]]){this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]][_0x2893[84]]= true;this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]][_0x2893[85]]= this[_0x2893[10]][_0x3e4cxa[_0x2893[39]]][_0x2893[86]]};this[_0x2893[11]][_0x3e4cxa[_0x2893[62]]]= _[_0x2893[44]](this[_0x2893[11]][_0x3e4cxa[_0x2893[62]]],[_0x2893[39],_0x2893[63]]);this[_0x2893[29]](util[_0x2893[37]](_0x2893[47],_0x3e4cxa[_0x2893[48]]),_0x2893[87],this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]]);ami[_0x2893[29]](_0x2893[88],this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxa[_0x2893[35]]])}}}catch(e){logger[_0x2893[52]](_0x2893[89],util[_0x2893[51]](e,{showHidden:false,depth:null}))}};VoiceAgentReport[_0x2893[30]][_0x2893[26]]= function(_0x3e4cxa){try{if(this[_0x2893[32]](_0x3e4cxa)){this[_0x2893[93]](_0x3e4cxa[_0x2893[34]],_[_0x2893[91]](_0x3e4cxa[_0x2893[90]])[0],_0x3e4cxa[_0x2893[92]]);if(this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]]){for(var _0x3e4cxc in this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]]){if(this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x2893[53]](_0x3e4cxc)){if(_[_0x2893[33]](this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[12]])){this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[12]]= {}};this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]][_0x3e4cxc][_0x2893[12]]= this[_0x2893[12]][_0x3e4cxa[_0x2893[34]]]}}}}}catch(e){logger[_0x2893[52]](_0x2893[94],util[_0x2893[51]](e,{showHidden:false,depth:null}))}};VoiceAgentReport[_0x2893[30]][_0x2893[93]]= function(_0x3e4cxd,_0x3e4cxe,_0x3e4cxf){if(_[_0x2893[33]](this[_0x2893[12]][_0x3e4cxd])){this[_0x2893[12]][_0x3e4cxd]= {}};this[_0x2893[12]][_0x3e4cxd][_0x3e4cxe]= _0x3e4cxf};VoiceAgentReport[_0x2893[30]][_0x2893[28]]= function(_0x3e4cxa){try{if(this[_0x2893[32]](_0x3e4cxa)){if(this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]]){ami[_0x2893[29]](_0x2893[95],_[_0x2893[96]](this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]]));delete this[_0x2893[9]][_0x3e4cxa[_0x2893[34]]]};if(this[_0x2893[12]][_0x3e4cxa[_0x2893[34]]]){delete this[_0x2893[12]][_0x3e4cxa[_0x2893[34]]]}}}catch(e){logger[_0x2893[52]](_0x2893[97],util[_0x2893[51]](e,{showHidden:false,depth:null}))}};module[_0x2893[98]]= VoiceAgentReport
\ No newline at end of file
+var _0x8e33=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74\x73","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x61\x6C\x6C\x65\x64","\x6F\x6E","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6E\x6E\x65\x63\x74","\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x52\x69\x6E\x67\x4E\x6F\x41\x6E\x73\x77\x65\x72","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x76\x61\x72\x73\x65\x74","\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74","\x68\x61\x6E\x67\x75\x70","\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70","\x65\x6D\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x74\x6F","\x69\x73\x4E\x6F\x74\x4E\x75\x6C\x6C","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x61\x6C\x6C\x65\x64","\x71\x75\x65\x75\x65","\x74\x79\x70\x65","\x69\x6E\x62\x6F\x75\x6E\x64","\x65\x76\x65\x6E\x74","\x70\x72\x69\x76\x69\x6C\x65\x67\x65","\x6F\x6D\x69\x74","\x6D\x65\x72\x67\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64","\x75\x73\x65\x72\x3A\x25\x73","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x75\x73\x65\x72\x3A\x63\x61\x6C\x6C\x65\x64","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x61\x6C\x6C\x65\x64\x5D\x5B\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x5D","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x63\x6F\x6E\x6E\x65\x63\x74","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x64\x65\x73\x74\x63\x68\x61\x6E\x6E\x65\x6C\x73\x74\x61\x74\x65","\x64\x65\x73\x74\x63\x68\x61\x6E\x6E\x65\x6C\x73\x74\x61\x74\x65\x64\x65\x73\x63","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x64\x65\x73\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x70\x69\x63\x6B","\x75\x73\x65\x72\x3A\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72\x41\x74","\x72\x65\x61\x73\x6F\x6E","\x61\x6E\x73\x77\x65\x72\x65\x64\x5F\x65\x6C\x73\x65\x77\x68\x65\x72\x65","\x61\x6E\x73\x77\x65\x72\x65\x64\x65\x6C\x73\x65\x77\x68\x65\x72\x65\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x75\x6E\x69\x71\x75\x65\x69\x64","\x61\x6E\x73\x77\x65\x72\x65\x64\x65\x6C\x73\x65\x77\x68\x65\x72\x65\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x61\x6E\x73\x77\x65\x72\x65\x64\x65\x6C\x73\x65\x77\x68\x65\x72\x65","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6E\x6E\x65\x63\x74\x5D\x5B\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x5D","\x72\x65\x6A\x65\x63\x74\x65\x64","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x52\x69\x6E\x67\x4E\x6F\x41\x6E\x73\x77\x65\x72\x5D\x5B\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x5D","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x5D\x5B\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x5D","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x61\x63\x77","\x61\x67\x65\x6E\x74\x61\x63\x77","\x61\x63\x77\x74\x69\x6D\x65","\x61\x63\x77\x54\x69\x6D\x65\x6F\x75\x74","\x75\x73\x65\x72\x3A\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D\x5B\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x5D","\x76\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x76\x61\x6C\x75\x65","\x61\x64\x64\x56\x61\x72\x69\x61\x62\x6C\x65","\x5B\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74\x5D\x5B\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x5D","\x63\x75\x73\x74\x6F\x6D\x3A\x76\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x76\x61\x6C\x75\x65\x73","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x5D\x5B\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74\x5D","\x65\x78\x70\x6F\x72\x74\x73"];_0x8e33[0];var _=require(_0x8e33[1]);var moment=require(_0x8e33[2]);var util=require(_0x8e33[3]);var logger=require(_0x8e33[5])(_0x8e33[4]);var ami=require(_0x8e33[6]);var io=require(_0x8e33[8])({host:_0x8e33[7],port:6379});function VoiceAgentReport(_0x6f19x8){this[_0x8e33[9]]= {};this[_0x8e33[10]]= _0x6f19x8[_0x8e33[10]];this[_0x8e33[11]]= _0x6f19x8[_0x8e33[11]];this[_0x8e33[12]]= {};ami[_0x8e33[16]](_0x8e33[13],this[_0x8e33[15]][_0x8e33[14]](this));ami[_0x8e33[16]](_0x8e33[17],this[_0x8e33[18]][_0x8e33[14]](this));ami[_0x8e33[16]](_0x8e33[19],this[_0x8e33[20]][_0x8e33[14]](this));ami[_0x8e33[16]](_0x8e33[21],this[_0x8e33[22]][_0x8e33[14]](this));ami[_0x8e33[16]](_0x8e33[23],this[_0x8e33[24]][_0x8e33[14]](this));ami[_0x8e33[16]](_0x8e33[25],this[_0x8e33[26]][_0x8e33[14]](this));ami[_0x8e33[16]](_0x8e33[27],this[_0x8e33[28]][_0x8e33[14]](this))}VoiceAgentReport[_0x8e33[30]][_0x8e33[29]]= function(_0x6f19x9,_0x6f19xa,_0x6f19xb){io[_0x8e33[31]](_0x6f19x9)[_0x8e33[29]](_0x6f19xa,_0x6f19xb)};VoiceAgentReport[_0x8e33[30]][_0x8e33[32]]= function(_0x6f19xb){return _0x6f19xb!== null&&  !_[_0x8e33[33]](_0x6f19xb)};VoiceAgentReport[_0x8e33[30]][_0x8e33[15]]= function(_0x6f19xa){try{if(this[_0x8e33[32]](_0x6f19xa)){if(_[_0x8e33[33]](this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]])){this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]]= {}};if(_[_0x8e33[33]](this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]])){this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]]= {agentcalledAt:moment()[_0x8e33[37]](_0x8e33[36]),lastevent:_0x8e33[38],variables:this[_0x8e33[12]][_0x6f19xa[_0x8e33[34]]],type:this[_0x8e33[10]][_0x6f19xa[_0x8e33[39]]]?this[_0x8e33[10]][_0x6f19xa[_0x8e33[39]]][_0x8e33[40]]|| _0x8e33[41]:_0x8e33[41]}};_[_0x8e33[45]](this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]],_[_0x8e33[44]](_0x6f19xa,[_0x8e33[42],_0x8e33[43]]));ami[_0x8e33[29]](_0x8e33[46],this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]]);this[_0x8e33[29]](util[_0x8e33[37]](_0x8e33[47],_0x6f19xa[_0x8e33[48]]),_0x8e33[49],this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]])}}catch(e){logger[_0x8e33[52]](_0x8e33[50],util[_0x8e33[51]](e,{showHidden:false,depth:null}))}};VoiceAgentReport[_0x8e33[30]][_0x8e33[18]]= function(_0x6f19xa){try{if(this[_0x8e33[32]](_0x6f19xa)){if(this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]]){for(var _0x6f19xc in this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]]){if(this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x8e33[53]](_0x6f19xc)){if(_0x6f19xa[_0x8e33[35]]=== _0x6f19xc){this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[54]]= moment()[_0x8e33[37]](_0x8e33[36]);this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[55]]= _0x8e33[56];this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[57]]= _0x6f19xa[_0x8e33[57]];this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[58]]= _0x6f19xa[_0x8e33[58]];this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[59]]= _0x6f19xa[_0x8e33[59]];this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[60]]= _0x6f19xa[_0x8e33[60]];this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[61]]= _0x6f19xa[_0x8e33[61]];_[_0x8e33[45]](this[_0x8e33[11]][_0x6f19xa[_0x8e33[62]]],_[_0x8e33[64]](_0x6f19xa,[_0x8e33[39],_0x8e33[63]]));this[_0x8e33[29]](util[_0x8e33[37]](_0x8e33[47],_0x6f19xa[_0x8e33[48]]),_0x8e33[65],this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]]);ami[_0x8e33[29]](_0x8e33[66],this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc])}else {if(this[_0x8e33[32]](this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[19]])){this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[19]]= true;this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[67]]= moment()[_0x8e33[37]](_0x8e33[36]);this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[68]]= _0x8e33[69];this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[55]]= _0x8e33[69];this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[70]]= _0x6f19xa[_0x8e33[35]];this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[71]]= _0x6f19xa[_0x8e33[48]];ami[_0x8e33[29]](_0x8e33[72],this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc])}}}}}}}catch(e){logger[_0x8e33[52]](_0x8e33[73],util[_0x8e33[51]](e,{showHidden:false,depth:null}))}};VoiceAgentReport[_0x8e33[30]][_0x8e33[20]]= function(_0x6f19xa){try{if(this[_0x8e33[32]](_0x6f19xa)){if(this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]]&& this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]]&& _[_0x8e33[33]](this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]][_0x8e33[19]])){this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]][_0x8e33[19]]= true;this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]][_0x8e33[67]]= moment()[_0x8e33[37]](_0x8e33[36]);this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]][_0x8e33[68]]= _0x8e33[74];this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]][_0x8e33[55]]= _0x8e33[74];ami[_0x8e33[29]](_0x8e33[75],this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]])}}}catch(e){logger[_0x8e33[52]](_0x8e33[76],util[_0x8e33[51]](e,{showHidden:false,depth:null}))}};VoiceAgentReport[_0x8e33[30]][_0x8e33[22]]= function(_0x6f19xa){try{if(this[_0x8e33[32]](_0x6f19xa)){if(this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]]){for(var _0x6f19xc in this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]]){if(this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x8e33[53]](_0x6f19xc)&& _[_0x8e33[33]](this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[19]])){this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[19]]= true;this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[67]]= moment()[_0x8e33[37]](_0x8e33[36]);this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[68]]= _0x8e33[77];this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[55]]= _0x8e33[77];ami[_0x8e33[29]](_0x8e33[78],this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc])}}}}}catch(e){logger[_0x8e33[52]](_0x8e33[79],util[_0x8e33[51]](e,{showHidden:false,depth:null}))}};VoiceAgentReport[_0x8e33[30]][_0x8e33[24]]= function(_0x6f19xa){try{if(this[_0x8e33[32]](_0x6f19xa)){if(this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]]&& this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]]&& _[_0x8e33[33]](this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]][_0x8e33[23]])){this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]][_0x8e33[23]]= true;this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]][_0x8e33[80]]= moment()[_0x8e33[37]](_0x8e33[36]);this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]][_0x8e33[55]]= _0x8e33[81];this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]][_0x8e33[82]]= _0x6f19xa[_0x8e33[82]];this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]][_0x8e33[68]]= _0x6f19xa[_0x8e33[68]];if(this[_0x8e33[10]][_0x6f19xa[_0x8e33[39]]]&& this[_0x8e33[10]][_0x6f19xa[_0x8e33[39]]][_0x8e33[83]]){this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]][_0x8e33[84]]= true;this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]][_0x8e33[85]]= this[_0x8e33[10]][_0x6f19xa[_0x8e33[39]]][_0x8e33[86]]};this[_0x8e33[11]][_0x6f19xa[_0x8e33[62]]]= _[_0x8e33[44]](this[_0x8e33[11]][_0x6f19xa[_0x8e33[62]]],[_0x8e33[39],_0x8e33[63]]);this[_0x8e33[29]](util[_0x8e33[37]](_0x8e33[47],_0x6f19xa[_0x8e33[48]]),_0x8e33[87],this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]]);ami[_0x8e33[29]](_0x8e33[88],this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xa[_0x8e33[35]]])}}}catch(e){logger[_0x8e33[52]](_0x8e33[89],util[_0x8e33[51]](e,{showHidden:false,depth:null}))}};VoiceAgentReport[_0x8e33[30]][_0x8e33[26]]= function(_0x6f19xa){try{if(this[_0x8e33[32]](_0x6f19xa)){this[_0x8e33[93]](_0x6f19xa[_0x8e33[34]],_[_0x8e33[91]](_0x6f19xa[_0x8e33[90]])[0],_0x6f19xa[_0x8e33[92]]);if(this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]]){for(var _0x6f19xc in this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]]){if(this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x8e33[53]](_0x6f19xc)){if(_[_0x8e33[33]](this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[12]])){this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[12]]= {}};this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]][_0x6f19xc][_0x8e33[12]]= this[_0x8e33[12]][_0x6f19xa[_0x8e33[34]]]}}}}}catch(e){logger[_0x8e33[52]](_0x8e33[94],util[_0x8e33[51]](e,{showHidden:false,depth:null}))}};VoiceAgentReport[_0x8e33[30]][_0x8e33[93]]= function(_0x6f19xd,_0x6f19xe,_0x6f19xf){if(_[_0x8e33[33]](this[_0x8e33[12]][_0x6f19xd])){this[_0x8e33[12]][_0x6f19xd]= {}};this[_0x8e33[12]][_0x6f19xd][_0x6f19xe]= _0x6f19xf};VoiceAgentReport[_0x8e33[30]][_0x8e33[28]]= function(_0x6f19xa){try{if(this[_0x8e33[32]](_0x6f19xa)){if(this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]]){ami[_0x8e33[29]](_0x8e33[95],_[_0x8e33[96]](this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]]));delete this[_0x8e33[9]][_0x6f19xa[_0x8e33[34]]]};if(this[_0x8e33[12]][_0x6f19xa[_0x8e33[34]]]){delete this[_0x8e33[12]][_0x6f19xa[_0x8e33[34]]]}}}catch(e){logger[_0x8e33[52]](_0x8e33[97],util[_0x8e33[51]](e,{showHidden:false,depth:null}))}};module[_0x8e33[98]]= VoiceAgentReport
\ No newline at end of file
index 57f4cbe..d820c57 100644 (file)
@@ -1 +1 @@
-var _0xef1d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x6D\x69","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x63\x68\x61\x6E\x6E\x65\x6C","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x6E\x6F\x74\x5F\x69\x6E\x75\x73\x65","\x69\x6E\x75\x73\x65","\x62\x75\x73\x79","\x69\x6E\x76\x61\x6C\x69\x64","\x75\x6E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x72\x69\x6E\x67\x69\x6E\x67","\x72\x69\x6E\x67\x69\x6E\x75\x73\x65","\x6F\x6E\x68\x6F\x6C\x64","\x73\x65\x74","\x71\x75\x65\x75\x65","\x61\x67\x69","\x64\x69\x61\x6C","\x70\x6C\x61\x79\x62\x61\x63\x6B","\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x4E\x4F\x20\x41\x4E\x53\x57\x45\x52","\x46\x41\x49\x4C\x45\x44","\x41\x4E\x53\x57\x45\x52\x45\x44","\x42\x55\x53\x59","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x61\x67\x65\x6E\x74\x73","\x63\x6F\x72\x65\x73\x68\x6F\x77\x63\x68\x61\x6E\x6E\x65\x6C","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x4E\x65\x77\x45\x78\x74\x65\x6E","\x6F\x6E","\x6E\x65\x77\x65\x78\x74\x65\x6E","\x6E\x65\x77\x63\x68\x61\x6E\x6E\x65\x6C","\x73\x79\x6E\x63\x4E\x65\x77\x43\x68\x61\x6E\x6E\x65\x6C","\x6E\x65\x77\x73\x74\x61\x74\x65","\x73\x79\x6E\x63\x4E\x65\x77\x53\x74\x61\x74\x65","\x76\x61\x72\x73\x65\x74","\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74","\x68\x61\x6E\x67\x75\x70","\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70","\x6E\x65\x77\x63\x61\x6C\x6C\x65\x72\x69\x64","\x73\x79\x6E\x63\x4E\x65\x77\x43\x61\x6C\x6C\x65\x72\x49\x64","\x61\x74\x74\x65\x6E\x64\x65\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x73\x79\x6E\x63\x41\x74\x74\x65\x6E\x64\x65\x64\x54\x72\x61\x6E\x73\x66\x65\x72","\x62\x6C\x69\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x73\x79\x6E\x63\x42\x6C\x69\x6E\x64\x54\x72\x61\x6E\x73\x66\x65\x72","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x61\x63\x74\x69\x6F\x6E\x43\x6F\x72\x65\x53\x68\x6F\x77\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x74\x68\x65\x6E","\x72\x65\x73\x6F\x6C\x76\x65","\x69\x73\x4E\x6F\x74\x4E\x75\x6C\x6C","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x65\x6D\x69\x74","\x74\x6F","\x75\x6E\x69\x71\x75\x65\x69\x64","\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x6B\x65\x79\x73","\x70\x69\x63\x6B","\x6D\x65\x72\x67\x65","\x5B\x73\x79\x6E\x63\x4E\x65\x77\x43\x61\x6C\x6C\x65\x72\x49\x64\x5D\x5B\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x63\x68\x61\x6E\x6E\x65\x6C","\x4F\x75\x74\x67\x6F\x69\x6E\x67\x53\x70\x6F\x6F\x6C\x46\x61\x69\x6C\x65\x64","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x68\x61\x6E\x6E\x65\x6C\x73\x74\x61\x74\x65","\x74\x6F\x4E\x75\x6D\x62\x65\x72","\x63\x6F\x6E\x74\x65\x78\x74","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x2D","\x73\x70\x6C\x69\x74","\x64\x65\x73\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x65\x78\x74\x65\x6E","\x75\x73\x65\x72\x3A\x25\x73","\x6E\x61\x6D\x65","\x75\x73\x65\x72\x3A\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x5B\x73\x79\x6E\x63\x4E\x65\x77\x43\x68\x61\x6E\x6E\x65\x6C\x5D\x5B\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x68","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x64\x61\x74\x61","\x61\x70\x70\x64\x61\x74\x61","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x73\x65\x63\x6F\x6E\x64\x73","\x73\x75\x62\x74\x72\x61\x63\x74","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x6C\x61\x73\x74\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6C\x61\x73\x74\x64\x61\x74\x61","\x63\x64\x72\x28","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x3D","\x6D\x61\x74\x63\x68","\x2C","\x5B\x73\x79\x6E\x63\x4E\x65\x77\x45\x78\x74\x65\x6E\x5D\x5B\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x36","\x61\x6E\x73\x77\x65\x72\x65\x64","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x78\x63\x61\x6C\x6C\x79\x2D\x6D\x6F\x74\x69\x6F\x6E\x2D\x70\x72\x65\x76\x69\x65\x77","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x55\x73\x65\x72\x49\x64","\x69\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x5B\x73\x79\x6E\x63\x4E\x65\x77\x53\x74\x61\x74\x65\x5D\x5B\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x73\x79\x6E\x63\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x6D\x6F\x6E\x69\x74\x6F\x72","\x2E\x77\x61\x76\x34\x39","\x65\x6E\x64\x73\x57\x69\x74\x68","\x2E\x57\x41\x56","\x72\x65\x70\x6C\x61\x63\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x73","\x66\x69\x6E\x64","\x69\x73\x4E\x69\x6C","","\x72\x65\x63","\x70\x75\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x6D\x69\x78\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x78\x6D\x64\x2D\x70\x68\x6F\x6E\x65","\x78\x6D\x64\x2D\x63\x61\x6C\x6C\x65\x72\x69\x64","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x78\x6D\x64\x2D\x63\x64\x72\x74\x79\x70\x65","\x74\x79\x70\x65","\x78\x6D\x64\x2D\x71\x75\x65\x75\x65","\x78\x6D\x63\x73\x2D\x71\x75\x65\x75\x65","\x73\x69\x70\x63\x61\x6C\x6C\x69\x64","\x73\x69\x70\x63\x61\x6C\x6C\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x73\x65","\x73\x69\x70\x63\x61\x6C\x6C\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x5B\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74\x5D\x5B\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x65\x6E\x64\x74\x69\x6D\x65","\x64\x69\x66\x66","\x62\x69\x6C\x6C\x61\x62\x6C\x65\x73\x65\x63\x6F\x6E\x64\x73","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x6F\x6D\x69\x74","\x75\x73\x65\x72\x3A\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x5D\x5B\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x75\x6E\x69\x71\x75\x65\x69\x64","\x74\x72\x61\x6E\x73\x66\x65\x72\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x68\x61\x6E\x6E\x65\x6C","\x5B\x73\x79\x6E\x63\x41\x74\x74\x65\x6E\x64\x65\x64\x54\x72\x61\x6E\x73\x66\x65\x72\x5D\x5B\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x68\x61\x6E\x6E\x65\x6C","\x5B\x73\x79\x6E\x63\x42\x6C\x69\x6E\x64\x54\x72\x61\x6E\x73\x66\x65\x72\x5D\x5B\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x65\x78\x70\x6F\x72\x74\x73"];_0xef1d[0];var BPromise=require(_0xef1d[1]);var _=require(_0xef1d[2]);var moment=require(_0xef1d[3]);var util=require(_0xef1d[4]);var path=require(_0xef1d[5]);var logger=require(_0xef1d[7])(_0xef1d[6]);var ami=require(_0xef1d[8]);var Channel=require(_0xef1d[9]);var statusDesc=[_0xef1d[10],_0xef1d[11],_0xef1d[12],_0xef1d[13],_0xef1d[14],_0xef1d[15],_0xef1d[16],_0xef1d[17],_0xef1d[18]];var applications=[_0xef1d[19],_0xef1d[20],_0xef1d[21],_0xef1d[22],_0xef1d[23],_0xef1d[24]];var dispositions=[_0xef1d[25],_0xef1d[26],_0xef1d[26],_0xef1d[25],_0xef1d[25],_0xef1d[25],_0xef1d[27],_0xef1d[28],_0xef1d[26],_0xef1d[26],_0xef1d[26]];var actions={};var io=require(_0xef1d[30])({host:_0xef1d[29],port:6379});function VoiceCallReport(_0xc87exf){this[_0xef1d[31]]= _0xc87exf[_0xef1d[31]];this[_0xef1d[32]]= _0xc87exf[_0xef1d[32]];ami[_0xef1d[36]](_0xef1d[33],this[_0xef1d[35]][_0xef1d[34]](this));ami[_0xef1d[36]](_0xef1d[37],this[_0xef1d[35]][_0xef1d[34]](this));ami[_0xef1d[36]](_0xef1d[38],this[_0xef1d[39]][_0xef1d[34]](this));ami[_0xef1d[36]](_0xef1d[40],this[_0xef1d[41]][_0xef1d[34]](this));ami[_0xef1d[36]](_0xef1d[42],this[_0xef1d[43]][_0xef1d[34]](this));ami[_0xef1d[36]](_0xef1d[44],this[_0xef1d[45]][_0xef1d[34]](this));ami[_0xef1d[36]](_0xef1d[46],this[_0xef1d[47]][_0xef1d[34]](this));ami[_0xef1d[36]](_0xef1d[48],this[_0xef1d[49]][_0xef1d[34]](this));ami[_0xef1d[36]](_0xef1d[50],this[_0xef1d[51]][_0xef1d[34]](this));return BPromise[_0xef1d[56]]()[_0xef1d[55]](ami[_0xef1d[54]]())[_0xef1d[53]](function(_0xc87ex10){console[_0xef1d[52]](_0xc87ex10)})}VoiceCallReport[_0xef1d[58]][_0xef1d[57]]= function(_0xc87ex11){return _0xc87ex11!== null&&  !_[_0xef1d[59]](_0xc87ex11)};VoiceCallReport[_0xef1d[58]][_0xef1d[60]]= function(_0xc87ex12,_0xc87ex13,_0xc87ex11){io[_0xef1d[61]](_0xc87ex12)[_0xef1d[60]](_0xc87ex13,_0xc87ex11)};VoiceCallReport[_0xef1d[58]][_0xef1d[47]]= function(_0xc87ex13){try{if(this[_0xef1d[57]](_0xc87ex13)){if(_0xc87ex13[_0xef1d[62]]=== _0xc87ex13[_0xef1d[63]]){if(!_[_0xef1d[59]](this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]])){_[_0xef1d[66]](this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]],_[_0xef1d[65]](_0xc87ex13,_[_0xef1d[64]](this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]])))}}}}catch(e){logger[_0xef1d[69]](_0xef1d[67],util[_0xef1d[68]](e,{showHidden:false,depth:null}))}};VoiceCallReport[_0xef1d[58]][_0xef1d[39]]= function(_0xc87ex13){try{if(this[_0xef1d[57]](_0xc87ex13)){if(_0xc87ex13[_0xef1d[62]]=== _0xc87ex13[_0xef1d[63]]&& _0xc87ex13[_0xef1d[70]]!= _0xef1d[71]){if(_[_0xef1d[59]](this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]])){this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]]=  new Channel();this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[72]]= moment()[_0xef1d[74]](_0xef1d[73]);this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[75]]= dispositions[_[_0xef1d[77]](_0xc87ex13[_0xef1d[76]])];_[_0xef1d[66]](this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]],_[_0xef1d[65]](_0xc87ex13,_[_0xef1d[64]](this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]])));if(_0xc87ex13[_0xef1d[78]]=== _0xef1d[79]){if(this[_0xef1d[32]][_0xc87ex13[_0xef1d[70]][_0xef1d[81]](_0xef1d[80])[0]]){this[_0xef1d[32]][_0xc87ex13[_0xef1d[70]][_0xef1d[81]](_0xef1d[80])[0]][_0xef1d[82]]= _0xc87ex13[_0xef1d[83]];this[_0xef1d[60]](util[_0xef1d[74]](_0xef1d[84],this[_0xef1d[32]][_0xc87ex13[_0xef1d[70]][_0xef1d[81]](_0xef1d[80])[0]][_0xef1d[85]]),_0xef1d[86],{destaccountcode:this[_0xef1d[32]][_0xc87ex13[_0xef1d[70]][_0xef1d[81]](_0xef1d[80])[0]][_0xef1d[87]],destconnectedlinenum:_0xc87ex13[_0xef1d[83]]})}}}}}}catch(e){logger[_0xef1d[69]](_0xef1d[88],util[_0xef1d[68]](e,{showHidden:false,depth:null}))}};VoiceCallReport[_0xef1d[58]][_0xef1d[35]]= function(_0xc87ex13){try{if(this[_0xef1d[57]](_0xc87ex13)){if(_0xc87ex13[_0xef1d[62]]=== _0xc87ex13[_0xef1d[63]]&& _0xc87ex13[_0xef1d[83]]!= _0xef1d[89]&& _0xc87ex13[_0xef1d[70]]!= _0xef1d[71]){_0xc87ex13[_0xef1d[90]]= _0xc87ex13[_0xef1d[90]][_0xef1d[91]]();_0xc87ex13[_0xef1d[92]]= (_0xc87ex13[_0xef1d[93]]|| _0xc87ex13[_0xef1d[92]])[_0xef1d[91]]();if(_[_0xef1d[59]](this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]])){this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]]=  new Channel();this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[72]]= _0xc87ex13[_0xef1d[94]]?moment()[_0xef1d[96]](moment[_0xef1d[94]](_0xc87ex13[_0xef1d[94]])[_0xef1d[95]](),_0xef1d[95])[_0xef1d[74]](_0xef1d[73]):moment()[_0xef1d[74]](_0xef1d[73]);this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[75]]= _0xef1d[25]};_[_0xef1d[66]](this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]],_[_0xef1d[65]](_0xc87ex13,_[_0xef1d[64]](this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]])));if(_[_0xef1d[97]](applications,_0xc87ex13[_0xef1d[90]])){this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[98]]= _0xc87ex13[_0xef1d[90]];this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[99]]= _0xc87ex13[_0xef1d[92]];if(_0xc87ex13[_0xef1d[90]]=== _0xef1d[19]&& _[_0xef1d[101]](_0xc87ex13[_0xef1d[92]],_0xef1d[100])){var _0xc87ex14=_0xc87ex13[_0xef1d[92]][_0xef1d[81]](_0xef1d[102]);var _0xc87ex15=_0xc87ex14[0][_0xef1d[103]](/cdr\((.*)\)/);if(_0xc87ex15){this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xc87ex15[1]]= _0xc87ex14[1]}}else {if(_0xc87ex13[_0xef1d[90]]=== _0xef1d[20]){this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[20]]= _0xc87ex13[_0xef1d[92]][_0xef1d[81]](_0xef1d[104])[0]}}}}}}catch(e){logger[_0xef1d[69]](_0xef1d[105],util[_0xef1d[68]](e,{showHidden:false,depth:null}))}};VoiceCallReport[_0xef1d[58]][_0xef1d[41]]= function(_0xc87ex13){try{if(this[_0xef1d[57]](_0xc87ex13)){if(_0xc87ex13[_0xef1d[62]]!== _0xc87ex13[_0xef1d[63]]){if(this[_0xef1d[31]][_0xc87ex13[_0xef1d[63]]]){if(_0xc87ex13[_0xef1d[76]]=== _0xef1d[106]){this[_0xef1d[31]][_0xc87ex13[_0xef1d[63]]][_0xef1d[107]]= true;this[_0xef1d[31]][_0xc87ex13[_0xef1d[63]]][_0xef1d[108]]= moment()[_0xef1d[74]](_0xef1d[73]);this[_0xef1d[31]][_0xc87ex13[_0xef1d[63]]][_0xef1d[63]]= _0xc87ex13[_0xef1d[62]];if(_0xc87ex13[_0xef1d[109]]!== _0xef1d[110]){this[_0xef1d[31]][_0xc87ex13[_0xef1d[63]]][_0xef1d[111]]= _0xc87ex13[_0xef1d[109]]};this[_0xef1d[31]][_0xc87ex13[_0xef1d[63]]][_0xef1d[112]]= _0xc87ex13[_0xef1d[113]];this[_0xef1d[31]][_0xc87ex13[_0xef1d[63]]][_0xef1d[114]]= _0xc87ex13[_0xef1d[70]];this[_0xef1d[31]][_0xc87ex13[_0xef1d[63]]][_0xef1d[75]]= dispositions[_[_0xef1d[77]](_0xc87ex13[_0xef1d[76]])];if(this[_0xef1d[32]][_0xc87ex13[_0xef1d[70]][_0xef1d[81]](_0xef1d[80])[0]]){this[_0xef1d[31]][_0xc87ex13[_0xef1d[63]]][_0xef1d[115]]= this[_0xef1d[32]][_0xc87ex13[_0xef1d[70]][_0xef1d[81]](_0xef1d[80])[0]][_0xef1d[116]];this[_0xef1d[31]][_0xc87ex13[_0xef1d[63]]][_0xef1d[117]]= this[_0xef1d[32]][_0xc87ex13[_0xef1d[70]][_0xef1d[81]](_0xef1d[80])[0]][_0xef1d[85]]}}}}else {if(this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]]){if(_0xc87ex13[_0xef1d[76]]=== _0xef1d[106]){if(this[_0xef1d[32]][_0xc87ex13[_0xef1d[70]][_0xef1d[81]](_0xef1d[80])[0]]){this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[115]]= this[_0xef1d[32]][_0xc87ex13[_0xef1d[70]][_0xef1d[81]](_0xef1d[80])[0]][_0xef1d[116]];this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[117]]= this[_0xef1d[32]][_0xc87ex13[_0xef1d[70]][_0xef1d[81]](_0xef1d[80])[0]][_0xef1d[85]]}}}}}}catch(e){logger[_0xef1d[69]](_0xef1d[118],util[_0xef1d[68]](e,{showHidden:false,depth:null}))}};VoiceCallReport[_0xef1d[58]][_0xef1d[119]]= function(_0xc87ex16,_0xc87ex17){if(this[_0xef1d[31]][_0xc87ex16]){this[_0xef1d[31]][_0xc87ex16][_0xef1d[120]]= true;if(_[_0xef1d[122]](_0xc87ex17,_0xef1d[121])){_0xc87ex17= _0xc87ex17[_0xef1d[124]](_0xef1d[121],_0xef1d[123])};this[_0xef1d[31]][_0xc87ex16][_0xef1d[125]]= _0xc87ex17;var _0xc87ex18=_[_0xef1d[127]](this[_0xef1d[31]][_0xc87ex16][_0xef1d[126]],{filename:_0xc87ex17});if(_[_0xef1d[128]](_0xc87ex18)){this[_0xef1d[31]][_0xc87ex16][_0xef1d[126]][_0xef1d[131]]({filename:_0xc87ex17,createdAt:moment()[_0xef1d[74]](_0xef1d[73]),mixmonitorid:_0xef1d[129],status:_0xef1d[130]})}}};VoiceCallReport[_0xef1d[58]][_0xef1d[43]]= function(_0xc87ex13){try{if(this[_0xef1d[57]](_0xc87ex13)){if(this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]]&& _0xc87ex13[_0xef1d[70]]!= _0xef1d[71]){if(this[_0xef1d[57]](_0xc87ex13[_0xef1d[132]])){if(this[_0xef1d[57]](_0xc87ex13[_0xef1d[132]][_0xef1d[133]])){this[_0xef1d[119]](_0xc87ex13[_0xef1d[62]],_0xc87ex13[_0xef1d[134]])}else {if(this[_0xef1d[57]](_0xc87ex13[_0xef1d[132]][_0xef1d[135]])){this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[109]]= _0xc87ex13[_0xef1d[132]][_0xef1d[135]]}else {if(this[_0xef1d[57]](_0xc87ex13[_0xef1d[132]][_0xef1d[136]])){this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[137]]= _0xc87ex13[_0xef1d[132]][_0xef1d[136]]}else {if(this[_0xef1d[57]](_0xc87ex13[_0xef1d[132]][_0xef1d[138]])){this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[139]]= _0xc87ex13[_0xef1d[134]]}else {if(this[_0xef1d[57]](_0xc87ex13[_0xef1d[132]][_0xef1d[140]])){this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[20]]= _0xc87ex13[_0xef1d[134]][_0xef1d[81]](_0xef1d[104])[0]}else {if(this[_0xef1d[57]](_0xc87ex13[_0xef1d[132]][_0xef1d[141]])){this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[20]]= _0xc87ex13[_0xef1d[134]]}else {if(this[_0xef1d[57]](_0xc87ex13[_0xef1d[132]][_0xef1d[142]])){this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[143]]= _0xc87ex13[_0xef1d[134]]}}}}}}}}}else {if(this[_0xef1d[57]](_0xc87ex13[_0xef1d[132]][_0xef1d[133]])){if(_0xc87ex13[_0xef1d[134]]){var _0xc87ex16=path[_0xef1d[144]](_0xc87ex13[_0xef1d[134]])[_0xef1d[85]];this[_0xef1d[119]](_0xc87ex16,_0xc87ex13[_0xef1d[134]])}}else {if(this[_0xef1d[31]][_0xc87ex13[_0xef1d[63]]]){if(this[_0xef1d[57]](_0xc87ex13[_0xef1d[132]])){if(this[_0xef1d[57]](_0xc87ex13[_0xef1d[132]][_0xef1d[142]])){this[_0xef1d[31]][_0xc87ex13[_0xef1d[63]]][_0xef1d[145]]= _0xc87ex13[_0xef1d[134]]}}}}}}}catch(e){logger[_0xef1d[69]](_0xef1d[146],util[_0xef1d[68]](e,{showHidden:false,depth:null}))}};VoiceCallReport[_0xef1d[58]][_0xef1d[45]]= function(_0xc87ex13){try{if(this[_0xef1d[57]](_0xc87ex13)){if(this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]]){var _0xc87ex19=moment();this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[147]]= _0xc87ex19[_0xef1d[74]](_0xef1d[73]);this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[94]]= _0xc87ex19[_0xef1d[148]](this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[72]],_0xef1d[95]);if(this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[107]]){this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[149]]= _0xc87ex19[_0xef1d[148]](this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[108]],_0xef1d[95]);this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[150]]= this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[94]]- this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]][_0xef1d[149]]};if(_0xc87ex13[_0xef1d[78]]=== _0xef1d[79]){if(this[_0xef1d[32]][_0xc87ex13[_0xef1d[70]][_0xef1d[81]](_0xef1d[80])[0]]){this[_0xef1d[32]][_0xc87ex13[_0xef1d[70]][_0xef1d[81]](_0xef1d[80])[0]]= _[_0xef1d[151]](this[_0xef1d[32]][_0xc87ex13[_0xef1d[70]][_0xef1d[81]](_0xef1d[80])[0]],[_0xef1d[82]]);this[_0xef1d[60]](util[_0xef1d[74]](_0xef1d[84],this[_0xef1d[32]][_0xc87ex13[_0xef1d[70]][_0xef1d[81]](_0xef1d[80])[0]][_0xef1d[85]]),_0xef1d[152],{destaccountcode:this[_0xef1d[32]][_0xc87ex13[_0xef1d[70]][_0xef1d[81]](_0xef1d[80])[0]][_0xef1d[87]]})}};ami[_0xef1d[60]](_0xef1d[153],this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]]);delete this[_0xef1d[31]][_0xc87ex13[_0xef1d[62]]]}}}catch(e){logger[_0xef1d[69]](_0xef1d[154],util[_0xef1d[68]](e,{showHidden:false,depth:null}))}};VoiceCallReport[_0xef1d[58]][_0xef1d[49]]= function(_0xc87ex13){try{if(this[_0xef1d[57]](_0xc87ex13)){if(this[_0xef1d[31]][_0xc87ex13[_0xef1d[155]]]){this[_0xef1d[31]][_0xc87ex13[_0xef1d[155]]][_0xef1d[156]]= _0xc87ex13[_0xef1d[157]];this[_0xef1d[31]][_0xc87ex13[_0xef1d[155]]][_0xef1d[158]]= _0xc87ex13[_0xef1d[159]];this[_0xef1d[45]]({uniqueid:_0xc87ex13[_0xef1d[155]],context:_0xc87ex13[_0xef1d[78]],channel:_0xc87ex13[_0xef1d[160]]})}}}catch(e){logger[_0xef1d[69]](_0xef1d[161],util[_0xef1d[68]](e,{showHidden:false,depth:null}))}};VoiceCallReport[_0xef1d[58]][_0xef1d[51]]= function(_0xc87ex13){try{if(this[_0xef1d[57]](_0xc87ex13)){if(this[_0xef1d[31]][_0xc87ex13[_0xef1d[155]]]){this[_0xef1d[31]][_0xc87ex13[_0xef1d[155]]][_0xef1d[156]]= _0xc87ex13[_0xef1d[162]];this[_0xef1d[31]][_0xc87ex13[_0xef1d[155]]][_0xef1d[158]]= _0xc87ex13[_0xef1d[163]];this[_0xef1d[45]]({uniqueid:_0xc87ex13[_0xef1d[155]],context:_0xc87ex13[_0xef1d[78]],channel:_0xc87ex13[_0xef1d[164]]})}}}catch(e){logger[_0xef1d[69]](_0xef1d[165],util[_0xef1d[68]](e,{showHidden:false,depth:null}))}};module[_0xef1d[166]]= VoiceCallReport
\ No newline at end of file
+var _0x6581=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x6D\x69","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x63\x68\x61\x6E\x6E\x65\x6C","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x6E\x6F\x74\x5F\x69\x6E\x75\x73\x65","\x69\x6E\x75\x73\x65","\x62\x75\x73\x79","\x69\x6E\x76\x61\x6C\x69\x64","\x75\x6E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x72\x69\x6E\x67\x69\x6E\x67","\x72\x69\x6E\x67\x69\x6E\x75\x73\x65","\x6F\x6E\x68\x6F\x6C\x64","\x73\x65\x74","\x71\x75\x65\x75\x65","\x61\x67\x69","\x64\x69\x61\x6C","\x70\x6C\x61\x79\x62\x61\x63\x6B","\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x4E\x4F\x20\x41\x4E\x53\x57\x45\x52","\x46\x41\x49\x4C\x45\x44","\x41\x4E\x53\x57\x45\x52\x45\x44","\x42\x55\x53\x59","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x61\x67\x65\x6E\x74\x73","\x63\x6F\x72\x65\x73\x68\x6F\x77\x63\x68\x61\x6E\x6E\x65\x6C","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x4E\x65\x77\x45\x78\x74\x65\x6E","\x6F\x6E","\x6E\x65\x77\x65\x78\x74\x65\x6E","\x6E\x65\x77\x63\x68\x61\x6E\x6E\x65\x6C","\x73\x79\x6E\x63\x4E\x65\x77\x43\x68\x61\x6E\x6E\x65\x6C","\x6E\x65\x77\x73\x74\x61\x74\x65","\x73\x79\x6E\x63\x4E\x65\x77\x53\x74\x61\x74\x65","\x76\x61\x72\x73\x65\x74","\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74","\x68\x61\x6E\x67\x75\x70","\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70","\x6E\x65\x77\x63\x61\x6C\x6C\x65\x72\x69\x64","\x73\x79\x6E\x63\x4E\x65\x77\x43\x61\x6C\x6C\x65\x72\x49\x64","\x61\x74\x74\x65\x6E\x64\x65\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x73\x79\x6E\x63\x41\x74\x74\x65\x6E\x64\x65\x64\x54\x72\x61\x6E\x73\x66\x65\x72","\x62\x6C\x69\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x73\x79\x6E\x63\x42\x6C\x69\x6E\x64\x54\x72\x61\x6E\x73\x66\x65\x72","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x61\x63\x74\x69\x6F\x6E\x43\x6F\x72\x65\x53\x68\x6F\x77\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x74\x68\x65\x6E","\x72\x65\x73\x6F\x6C\x76\x65","\x69\x73\x4E\x6F\x74\x4E\x75\x6C\x6C","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x65\x6D\x69\x74","\x74\x6F","\x75\x6E\x69\x71\x75\x65\x69\x64","\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x6B\x65\x79\x73","\x70\x69\x63\x6B","\x6D\x65\x72\x67\x65","\x5B\x73\x79\x6E\x63\x4E\x65\x77\x43\x61\x6C\x6C\x65\x72\x49\x64\x5D\x5B\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x63\x68\x61\x6E\x6E\x65\x6C","\x4F\x75\x74\x67\x6F\x69\x6E\x67\x53\x70\x6F\x6F\x6C\x46\x61\x69\x6C\x65\x64","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x68\x61\x6E\x6E\x65\x6C\x73\x74\x61\x74\x65","\x74\x6F\x4E\x75\x6D\x62\x65\x72","\x63\x6F\x6E\x74\x65\x78\x74","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x2D","\x73\x70\x6C\x69\x74","\x64\x65\x73\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x65\x78\x74\x65\x6E","\x75\x73\x65\x72\x3A\x25\x73","\x6E\x61\x6D\x65","\x75\x73\x65\x72\x3A\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x5B\x73\x79\x6E\x63\x4E\x65\x77\x43\x68\x61\x6E\x6E\x65\x6C\x5D\x5B\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x68","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x64\x61\x74\x61","\x61\x70\x70\x64\x61\x74\x61","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x73\x65\x63\x6F\x6E\x64\x73","\x73\x75\x62\x74\x72\x61\x63\x74","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x6C\x61\x73\x74\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6C\x61\x73\x74\x64\x61\x74\x61","\x63\x64\x72\x28","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x3D","\x6D\x61\x74\x63\x68","\x2C","\x5B\x73\x79\x6E\x63\x4E\x65\x77\x45\x78\x74\x65\x6E\x5D\x5B\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x36","\x61\x6E\x73\x77\x65\x72\x65\x64","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x78\x63\x61\x6C\x6C\x79\x2D\x6D\x6F\x74\x69\x6F\x6E\x2D\x70\x72\x65\x76\x69\x65\x77","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x55\x73\x65\x72\x49\x64","\x69\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x5B\x73\x79\x6E\x63\x4E\x65\x77\x53\x74\x61\x74\x65\x5D\x5B\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x73\x79\x6E\x63\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x6D\x6F\x6E\x69\x74\x6F\x72","\x2E\x77\x61\x76\x34\x39","\x65\x6E\x64\x73\x57\x69\x74\x68","\x2E\x57\x41\x56","\x72\x65\x70\x6C\x61\x63\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x73","\x66\x69\x6E\x64","\x69\x73\x4E\x69\x6C","","\x72\x65\x63","\x70\x75\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x6D\x69\x78\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x78\x6D\x64\x2D\x70\x68\x6F\x6E\x65","\x78\x6D\x64\x2D\x63\x61\x6C\x6C\x65\x72\x69\x64","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x78\x6D\x64\x2D\x63\x64\x72\x74\x79\x70\x65","\x74\x79\x70\x65","\x78\x6D\x64\x2D\x71\x75\x65\x75\x65","\x78\x6D\x63\x73\x2D\x71\x75\x65\x75\x65","\x73\x69\x70\x63\x61\x6C\x6C\x69\x64","\x73\x69\x70\x63\x61\x6C\x6C\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x73\x65","\x73\x69\x70\x63\x61\x6C\x6C\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x5B\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74\x5D\x5B\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x65\x6E\x64\x74\x69\x6D\x65","\x64\x69\x66\x66","\x62\x69\x6C\x6C\x61\x62\x6C\x65\x73\x65\x63\x6F\x6E\x64\x73","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x6F\x6D\x69\x74","\x75\x73\x65\x72\x3A\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x76\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x5D\x5B\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x75\x6E\x69\x71\x75\x65\x69\x64","\x74\x72\x61\x6E\x73\x66\x65\x72\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x68\x61\x6E\x6E\x65\x6C","\x5B\x73\x79\x6E\x63\x41\x74\x74\x65\x6E\x64\x65\x64\x54\x72\x61\x6E\x73\x66\x65\x72\x5D\x5B\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x68\x61\x6E\x6E\x65\x6C","\x5B\x73\x79\x6E\x63\x42\x6C\x69\x6E\x64\x54\x72\x61\x6E\x73\x66\x65\x72\x5D\x5B\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x65\x78\x70\x6F\x72\x74\x73"];_0x6581[0];var BPromise=require(_0x6581[1]);var _=require(_0x6581[2]);var moment=require(_0x6581[3]);var util=require(_0x6581[4]);var path=require(_0x6581[5]);var logger=require(_0x6581[7])(_0x6581[6]);var ami=require(_0x6581[8]);var Channel=require(_0x6581[9]);var statusDesc=[_0x6581[10],_0x6581[11],_0x6581[12],_0x6581[13],_0x6581[14],_0x6581[15],_0x6581[16],_0x6581[17],_0x6581[18]];var applications=[_0x6581[19],_0x6581[20],_0x6581[21],_0x6581[22],_0x6581[23],_0x6581[24]];var dispositions=[_0x6581[25],_0x6581[26],_0x6581[26],_0x6581[25],_0x6581[25],_0x6581[25],_0x6581[27],_0x6581[28],_0x6581[26],_0x6581[26],_0x6581[26]];var actions={};var io=require(_0x6581[30])({host:_0x6581[29],port:6379});function VoiceCallReport(_0x52fexf){this[_0x6581[31]]= _0x52fexf[_0x6581[31]];this[_0x6581[32]]= _0x52fexf[_0x6581[32]];ami[_0x6581[36]](_0x6581[33],this[_0x6581[35]][_0x6581[34]](this));ami[_0x6581[36]](_0x6581[37],this[_0x6581[35]][_0x6581[34]](this));ami[_0x6581[36]](_0x6581[38],this[_0x6581[39]][_0x6581[34]](this));ami[_0x6581[36]](_0x6581[40],this[_0x6581[41]][_0x6581[34]](this));ami[_0x6581[36]](_0x6581[42],this[_0x6581[43]][_0x6581[34]](this));ami[_0x6581[36]](_0x6581[44],this[_0x6581[45]][_0x6581[34]](this));ami[_0x6581[36]](_0x6581[46],this[_0x6581[47]][_0x6581[34]](this));ami[_0x6581[36]](_0x6581[48],this[_0x6581[49]][_0x6581[34]](this));ami[_0x6581[36]](_0x6581[50],this[_0x6581[51]][_0x6581[34]](this));return BPromise[_0x6581[56]]()[_0x6581[55]](ami[_0x6581[54]]())[_0x6581[53]](function(_0x52fex10){console[_0x6581[52]](_0x52fex10)})}VoiceCallReport[_0x6581[58]][_0x6581[57]]= function(_0x52fex11){return _0x52fex11!== null&&  !_[_0x6581[59]](_0x52fex11)};VoiceCallReport[_0x6581[58]][_0x6581[60]]= function(_0x52fex12,_0x52fex13,_0x52fex11){io[_0x6581[61]](_0x52fex12)[_0x6581[60]](_0x52fex13,_0x52fex11)};VoiceCallReport[_0x6581[58]][_0x6581[47]]= function(_0x52fex13){try{if(this[_0x6581[57]](_0x52fex13)){if(_0x52fex13[_0x6581[62]]=== _0x52fex13[_0x6581[63]]){if(!_[_0x6581[59]](this[_0x6581[31]][_0x52fex13[_0x6581[62]]])){_[_0x6581[66]](this[_0x6581[31]][_0x52fex13[_0x6581[62]]],_[_0x6581[65]](_0x52fex13,_[_0x6581[64]](this[_0x6581[31]][_0x52fex13[_0x6581[62]]])))}}}}catch(e){logger[_0x6581[69]](_0x6581[67],util[_0x6581[68]](e,{showHidden:false,depth:null}))}};VoiceCallReport[_0x6581[58]][_0x6581[39]]= function(_0x52fex13){try{if(this[_0x6581[57]](_0x52fex13)){if(_0x52fex13[_0x6581[62]]=== _0x52fex13[_0x6581[63]]&& _0x52fex13[_0x6581[70]]!= _0x6581[71]){if(_[_0x6581[59]](this[_0x6581[31]][_0x52fex13[_0x6581[62]]])){this[_0x6581[31]][_0x52fex13[_0x6581[62]]]=  new Channel();this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[72]]= moment()[_0x6581[74]](_0x6581[73]);this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[75]]= dispositions[_[_0x6581[77]](_0x52fex13[_0x6581[76]])];_[_0x6581[66]](this[_0x6581[31]][_0x52fex13[_0x6581[62]]],_[_0x6581[65]](_0x52fex13,_[_0x6581[64]](this[_0x6581[31]][_0x52fex13[_0x6581[62]]])));if(_0x52fex13[_0x6581[78]]=== _0x6581[79]){if(this[_0x6581[32]][_0x52fex13[_0x6581[70]][_0x6581[81]](_0x6581[80])[0]]){this[_0x6581[32]][_0x52fex13[_0x6581[70]][_0x6581[81]](_0x6581[80])[0]][_0x6581[82]]= _0x52fex13[_0x6581[83]];this[_0x6581[60]](util[_0x6581[74]](_0x6581[84],this[_0x6581[32]][_0x52fex13[_0x6581[70]][_0x6581[81]](_0x6581[80])[0]][_0x6581[85]]),_0x6581[86],{destaccountcode:this[_0x6581[32]][_0x52fex13[_0x6581[70]][_0x6581[81]](_0x6581[80])[0]][_0x6581[87]],destconnectedlinenum:_0x52fex13[_0x6581[83]]})}}}}}}catch(e){logger[_0x6581[69]](_0x6581[88],util[_0x6581[68]](e,{showHidden:false,depth:null}))}};VoiceCallReport[_0x6581[58]][_0x6581[35]]= function(_0x52fex13){try{if(this[_0x6581[57]](_0x52fex13)){if(_0x52fex13[_0x6581[62]]=== _0x52fex13[_0x6581[63]]&& _0x52fex13[_0x6581[83]]!= _0x6581[89]&& _0x52fex13[_0x6581[70]]!= _0x6581[71]){_0x52fex13[_0x6581[90]]= _0x52fex13[_0x6581[90]][_0x6581[91]]();_0x52fex13[_0x6581[92]]= (_0x52fex13[_0x6581[93]]|| _0x52fex13[_0x6581[92]])[_0x6581[91]]();if(_[_0x6581[59]](this[_0x6581[31]][_0x52fex13[_0x6581[62]]])){this[_0x6581[31]][_0x52fex13[_0x6581[62]]]=  new Channel();this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[72]]= _0x52fex13[_0x6581[94]]?moment()[_0x6581[96]](moment[_0x6581[94]](_0x52fex13[_0x6581[94]])[_0x6581[95]](),_0x6581[95])[_0x6581[74]](_0x6581[73]):moment()[_0x6581[74]](_0x6581[73]);this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[75]]= _0x6581[25]};_[_0x6581[66]](this[_0x6581[31]][_0x52fex13[_0x6581[62]]],_[_0x6581[65]](_0x52fex13,_[_0x6581[64]](this[_0x6581[31]][_0x52fex13[_0x6581[62]]])));if(_[_0x6581[97]](applications,_0x52fex13[_0x6581[90]])){this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[98]]= _0x52fex13[_0x6581[90]];this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[99]]= _0x52fex13[_0x6581[92]];if(_0x52fex13[_0x6581[90]]=== _0x6581[19]&& _[_0x6581[101]](_0x52fex13[_0x6581[92]],_0x6581[100])){var _0x52fex14=_0x52fex13[_0x6581[92]][_0x6581[81]](_0x6581[102]);var _0x52fex15=_0x52fex14[0][_0x6581[103]](/cdr\((.*)\)/);if(_0x52fex15){this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x52fex15[1]]= _0x52fex14[1]}}else {if(_0x52fex13[_0x6581[90]]=== _0x6581[20]){this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[20]]= _0x52fex13[_0x6581[92]][_0x6581[81]](_0x6581[104])[0]}}}}}}catch(e){logger[_0x6581[69]](_0x6581[105],util[_0x6581[68]](e,{showHidden:false,depth:null}))}};VoiceCallReport[_0x6581[58]][_0x6581[41]]= function(_0x52fex13){try{if(this[_0x6581[57]](_0x52fex13)){if(_0x52fex13[_0x6581[62]]!== _0x52fex13[_0x6581[63]]){if(this[_0x6581[31]][_0x52fex13[_0x6581[63]]]){if(_0x52fex13[_0x6581[76]]=== _0x6581[106]){this[_0x6581[31]][_0x52fex13[_0x6581[63]]][_0x6581[107]]= true;this[_0x6581[31]][_0x52fex13[_0x6581[63]]][_0x6581[108]]= moment()[_0x6581[74]](_0x6581[73]);this[_0x6581[31]][_0x52fex13[_0x6581[63]]][_0x6581[63]]= _0x52fex13[_0x6581[62]];if(_0x52fex13[_0x6581[109]]!== _0x6581[110]){this[_0x6581[31]][_0x52fex13[_0x6581[63]]][_0x6581[111]]= _0x52fex13[_0x6581[109]]};this[_0x6581[31]][_0x52fex13[_0x6581[63]]][_0x6581[112]]= _0x52fex13[_0x6581[113]];this[_0x6581[31]][_0x52fex13[_0x6581[63]]][_0x6581[114]]= _0x52fex13[_0x6581[70]];this[_0x6581[31]][_0x52fex13[_0x6581[63]]][_0x6581[75]]= dispositions[_[_0x6581[77]](_0x52fex13[_0x6581[76]])];if(this[_0x6581[32]][_0x52fex13[_0x6581[70]][_0x6581[81]](_0x6581[80])[0]]){this[_0x6581[31]][_0x52fex13[_0x6581[63]]][_0x6581[115]]= this[_0x6581[32]][_0x52fex13[_0x6581[70]][_0x6581[81]](_0x6581[80])[0]][_0x6581[116]];this[_0x6581[31]][_0x52fex13[_0x6581[63]]][_0x6581[117]]= this[_0x6581[32]][_0x52fex13[_0x6581[70]][_0x6581[81]](_0x6581[80])[0]][_0x6581[85]]}}}}else {if(this[_0x6581[31]][_0x52fex13[_0x6581[62]]]){if(_0x52fex13[_0x6581[76]]=== _0x6581[106]){if(this[_0x6581[32]][_0x52fex13[_0x6581[70]][_0x6581[81]](_0x6581[80])[0]]){this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[115]]= this[_0x6581[32]][_0x52fex13[_0x6581[70]][_0x6581[81]](_0x6581[80])[0]][_0x6581[116]];this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[117]]= this[_0x6581[32]][_0x52fex13[_0x6581[70]][_0x6581[81]](_0x6581[80])[0]][_0x6581[85]]}}}}}}catch(e){logger[_0x6581[69]](_0x6581[118],util[_0x6581[68]](e,{showHidden:false,depth:null}))}};VoiceCallReport[_0x6581[58]][_0x6581[119]]= function(_0x52fex16,_0x52fex17){if(this[_0x6581[31]][_0x52fex16]){this[_0x6581[31]][_0x52fex16][_0x6581[120]]= true;if(_[_0x6581[122]](_0x52fex17,_0x6581[121])){_0x52fex17= _0x52fex17[_0x6581[124]](_0x6581[121],_0x6581[123])};this[_0x6581[31]][_0x52fex16][_0x6581[125]]= _0x52fex17;var _0x52fex18=_[_0x6581[127]](this[_0x6581[31]][_0x52fex16][_0x6581[126]],{filename:_0x52fex17});if(_[_0x6581[128]](_0x52fex18)){this[_0x6581[31]][_0x52fex16][_0x6581[126]][_0x6581[131]]({filename:_0x52fex17,createdAt:moment()[_0x6581[74]](_0x6581[73]),mixmonitorid:_0x6581[129],status:_0x6581[130]})}}};VoiceCallReport[_0x6581[58]][_0x6581[43]]= function(_0x52fex13){try{if(this[_0x6581[57]](_0x52fex13)){if(this[_0x6581[31]][_0x52fex13[_0x6581[62]]]&& _0x52fex13[_0x6581[70]]!= _0x6581[71]){if(this[_0x6581[57]](_0x52fex13[_0x6581[132]])){if(this[_0x6581[57]](_0x52fex13[_0x6581[132]][_0x6581[133]])){this[_0x6581[119]](_0x52fex13[_0x6581[62]],_0x52fex13[_0x6581[134]])}else {if(this[_0x6581[57]](_0x52fex13[_0x6581[132]][_0x6581[135]])){this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[109]]= _0x52fex13[_0x6581[132]][_0x6581[135]]}else {if(this[_0x6581[57]](_0x52fex13[_0x6581[132]][_0x6581[136]])){this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[137]]= _0x52fex13[_0x6581[132]][_0x6581[136]]}else {if(this[_0x6581[57]](_0x52fex13[_0x6581[132]][_0x6581[138]])){this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[139]]= _0x52fex13[_0x6581[134]]}else {if(this[_0x6581[57]](_0x52fex13[_0x6581[132]][_0x6581[140]])){this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[20]]= _0x52fex13[_0x6581[134]][_0x6581[81]](_0x6581[104])[0]}else {if(this[_0x6581[57]](_0x52fex13[_0x6581[132]][_0x6581[141]])){this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[20]]= _0x52fex13[_0x6581[134]]}else {if(this[_0x6581[57]](_0x52fex13[_0x6581[132]][_0x6581[142]])){this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[143]]= _0x52fex13[_0x6581[134]]}}}}}}}}}else {if(this[_0x6581[57]](_0x52fex13[_0x6581[132]][_0x6581[133]])){if(_0x52fex13[_0x6581[134]]){var _0x52fex16=path[_0x6581[144]](_0x52fex13[_0x6581[134]])[_0x6581[85]];this[_0x6581[119]](_0x52fex16,_0x52fex13[_0x6581[134]])}}else {if(this[_0x6581[31]][_0x52fex13[_0x6581[63]]]){if(this[_0x6581[57]](_0x52fex13[_0x6581[132]])){if(this[_0x6581[57]](_0x52fex13[_0x6581[132]][_0x6581[142]])){this[_0x6581[31]][_0x52fex13[_0x6581[63]]][_0x6581[145]]= _0x52fex13[_0x6581[134]]}}}}}}}catch(e){logger[_0x6581[69]](_0x6581[146],util[_0x6581[68]](e,{showHidden:false,depth:null}))}};VoiceCallReport[_0x6581[58]][_0x6581[45]]= function(_0x52fex13){try{if(this[_0x6581[57]](_0x52fex13)){if(this[_0x6581[31]][_0x52fex13[_0x6581[62]]]){var _0x52fex19=moment();this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[147]]= _0x52fex19[_0x6581[74]](_0x6581[73]);this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[94]]= _0x52fex19[_0x6581[148]](this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[72]],_0x6581[95]);if(this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[107]]){this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[149]]= _0x52fex19[_0x6581[148]](this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[108]],_0x6581[95]);this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[150]]= this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[94]]- this[_0x6581[31]][_0x52fex13[_0x6581[62]]][_0x6581[149]]};if(_0x52fex13[_0x6581[78]]=== _0x6581[79]){if(this[_0x6581[32]][_0x52fex13[_0x6581[70]][_0x6581[81]](_0x6581[80])[0]]){this[_0x6581[32]][_0x52fex13[_0x6581[70]][_0x6581[81]](_0x6581[80])[0]]= _[_0x6581[151]](this[_0x6581[32]][_0x52fex13[_0x6581[70]][_0x6581[81]](_0x6581[80])[0]],[_0x6581[82]]);this[_0x6581[60]](util[_0x6581[74]](_0x6581[84],this[_0x6581[32]][_0x52fex13[_0x6581[70]][_0x6581[81]](_0x6581[80])[0]][_0x6581[85]]),_0x6581[152],{destaccountcode:this[_0x6581[32]][_0x52fex13[_0x6581[70]][_0x6581[81]](_0x6581[80])[0]][_0x6581[87]]})}};ami[_0x6581[60]](_0x6581[153],this[_0x6581[31]][_0x52fex13[_0x6581[62]]]);delete this[_0x6581[31]][_0x52fex13[_0x6581[62]]]}}}catch(e){logger[_0x6581[69]](_0x6581[154],util[_0x6581[68]](e,{showHidden:false,depth:null}))}};VoiceCallReport[_0x6581[58]][_0x6581[49]]= function(_0x52fex13){try{if(this[_0x6581[57]](_0x52fex13)){if(this[_0x6581[31]][_0x52fex13[_0x6581[155]]]){this[_0x6581[31]][_0x52fex13[_0x6581[155]]][_0x6581[156]]= _0x52fex13[_0x6581[157]];this[_0x6581[31]][_0x52fex13[_0x6581[155]]][_0x6581[158]]= _0x52fex13[_0x6581[159]];this[_0x6581[45]]({uniqueid:_0x52fex13[_0x6581[155]],context:_0x52fex13[_0x6581[78]],channel:_0x52fex13[_0x6581[160]]})}}}catch(e){logger[_0x6581[69]](_0x6581[161],util[_0x6581[68]](e,{showHidden:false,depth:null}))}};VoiceCallReport[_0x6581[58]][_0x6581[51]]= function(_0x52fex13){try{if(this[_0x6581[57]](_0x52fex13)){if(this[_0x6581[31]][_0x52fex13[_0x6581[155]]]){this[_0x6581[31]][_0x52fex13[_0x6581[155]]][_0x6581[156]]= _0x52fex13[_0x6581[162]];this[_0x6581[31]][_0x52fex13[_0x6581[155]]][_0x6581[158]]= _0x52fex13[_0x6581[163]];this[_0x6581[45]]({uniqueid:_0x52fex13[_0x6581[155]],context:_0x52fex13[_0x6581[78]],channel:_0x52fex13[_0x6581[164]]})}}}catch(e){logger[_0x6581[69]](_0x6581[165],util[_0x6581[68]](e,{showHidden:false,depth:null}))}};module[_0x6581[166]]= VoiceCallReport
\ No newline at end of file
index 901c1be..71c8633 100644 (file)
@@ -1 +1 @@
-var _0xc6b8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x64\x69\x61\x6C\x62\x65\x67\x69\x6E","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x44\x69\x61\x6C\x42\x65\x67\x69\x6E","\x6F\x6E","\x64\x69\x61\x6C\x65\x6E\x64","\x73\x79\x6E\x63\x44\x69\x61\x6C\x45\x6E\x64","\x76\x61\x72\x73\x65\x74","\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74","\x68\x61\x6E\x67\x75\x70","\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70","\x69\x73\x4E\x6F\x74\x4E\x75\x6C\x6C","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x65\x6D\x69\x74","\x74\x6F","\x75\x6E\x69\x71\x75\x65\x69\x64","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x61\x6C\x6C\x65\x64","\x2D","\x6C\x61\x73\x74\x49\x6E\x64\x65\x78\x4F\x66","\x63\x68\x61\x6E\x6E\x65\x6C","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x2F","\x65\x76\x65\x6E\x74","\x70\x72\x69\x76\x69\x6C\x65\x67\x65","\x6F\x6D\x69\x74","\x6D\x65\x72\x67\x65","\x76\x6F\x69\x63\x65\x3A\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x76\x6F\x69\x63\x65\x5F\x6F\x75\x74\x62\x6F\x75\x6E\x64\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x3A\x73\x61\x76\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x64\x69\x61\x6C\x62\x65\x67\x69\x6E","\x5B\x73\x79\x6E\x63\x44\x69\x61\x6C\x42\x65\x67\x69\x6E\x5D\x5B\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x64\x69\x61\x6C\x73\x74\x61\x74\x75\x73","\x41\x4E\x53\x57\x45\x52","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x75\x73\x74\x6F\x6D\x3A\x64\x69\x61\x6C\x63\x6F\x6E\x6E\x65\x63\x74","\x5B\x73\x79\x6E\x63\x44\x69\x61\x6C\x45\x6E\x64\x5D\x5B\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x76\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x76\x61\x6C\x75\x65","\x61\x64\x64\x56\x61\x72\x69\x61\x62\x6C\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x72\x6F\x75\x74\x65\x69\x64","\x5B\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74\x5D\x5B\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x65\x6E\x64\x74\x69\x6D\x65","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x74\x6F\x74\x61\x6C","\x61\x6E\x73\x77\x65\x72\x65\x64","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x62\x69\x6C\x6C\x61\x62\x6C\x65\x73\x65\x63\x6F\x6E\x64\x73","\x73\x75\x6D\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x73\x75\x6D\x42\x69\x6C\x6C\x61\x62\x6C\x65","\x73\x75\x6D\x44\x75\x72\x61\x74\x69\x6F\x6E","\x63\x75\x73\x74\x6F\x6D\x3A\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x63\x75\x73\x74\x6F\x6D\x3A\x64\x69\x61\x6C\x65\x6E\x64","\x76\x6F\x69\x63\x65\x5F\x6F\x75\x74\x62\x6F\x75\x6E\x64\x3A\x73\x61\x76\x65","\x76\x6F\x69\x63\x65\x5F\x6F\x75\x74\x62\x6F\x75\x6E\x64\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x3A\x72\x65\x6D\x6F\x76\x65","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x5D\x5B\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x65\x78\x70\x6F\x72\x74\x73"];_0xc6b8[0];var _=require(_0xc6b8[1]);var moment=require(_0xc6b8[2]);var util=require(_0xc6b8[3]);var logger=require(_0xc6b8[5])(_0xc6b8[4]);var ami=require(_0xc6b8[6]);var io=require(_0xc6b8[8])({host:_0xc6b8[7],port:6379});function VoiceDialReport(_0x1e55x8){this[_0xc6b8[9]]= _0x1e55x8[_0xc6b8[10]];this[_0xc6b8[11]]= _0x1e55x8[_0xc6b8[11]];this[_0xc6b8[12]]= {};ami[_0xc6b8[16]](_0xc6b8[13],this[_0xc6b8[15]][_0xc6b8[14]](this));ami[_0xc6b8[16]](_0xc6b8[17],this[_0xc6b8[18]][_0xc6b8[14]](this));ami[_0xc6b8[16]](_0xc6b8[19],this[_0xc6b8[20]][_0xc6b8[14]](this));ami[_0xc6b8[16]](_0xc6b8[21],this[_0xc6b8[22]][_0xc6b8[14]](this))}VoiceDialReport[_0xc6b8[24]][_0xc6b8[23]]= function(_0x1e55x9){return _0x1e55x9!== null&&  !_[_0xc6b8[25]](_0x1e55x9)};VoiceDialReport[_0xc6b8[24]][_0xc6b8[26]]= function(_0x1e55xa,_0x1e55xb,_0x1e55x9){io[_0xc6b8[27]](_0x1e55xa)[_0xc6b8[26]](_0x1e55xb,_0x1e55x9)};VoiceDialReport[_0xc6b8[24]][_0xc6b8[15]]= function(_0x1e55xb){try{if(this[_0xc6b8[23]](_0x1e55xb)){if(this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]]){_[_0xc6b8[40]](this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]],{starttime:moment()[_0xc6b8[30]](_0xc6b8[29]),lastevent:_0xc6b8[31],interface:_0x1e55xb[_0xc6b8[34]][_0xc6b8[35]](0,_0x1e55xb[_0xc6b8[34]][_0xc6b8[33]](_0xc6b8[32])),membername:_0x1e55xb[_0xc6b8[34]][_0xc6b8[35]](_0x1e55xb[_0xc6b8[34]][_0xc6b8[33]](_0xc6b8[36])+ 1,_0x1e55xb[_0xc6b8[34]][_0xc6b8[33]](_0xc6b8[32]))},_[_0xc6b8[39]](_0x1e55xb,[_0xc6b8[37],_0xc6b8[38]]));this[_0xc6b8[26]](_0xc6b8[41],_0xc6b8[42],this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]]);ami[_0xc6b8[26]](_0xc6b8[43],this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]])}}}catch(e){logger[_0xc6b8[46]](_0xc6b8[44],util[_0xc6b8[45]](e,{showHidden:false,depth:null}))}};VoiceDialReport[_0xc6b8[24]][_0xc6b8[18]]= function(_0x1e55xb){try{if(this[_0xc6b8[23]](_0x1e55xb)){if(this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]]){this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]][_0xc6b8[47]]= _0x1e55xb[_0xc6b8[47]];if(_0x1e55xb[_0xc6b8[47]]=== _0xc6b8[48]){this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]][_0xc6b8[49]]= _0x1e55xb[_0xc6b8[49]];this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]][_0xc6b8[50]]= _0x1e55xb[_0xc6b8[50]];this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]][_0xc6b8[51]]= moment()[_0xc6b8[30]](_0xc6b8[29]);this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]][_0xc6b8[52]]= _0xc6b8[53];ami[_0xc6b8[26]](_0xc6b8[54],this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]])};this[_0xc6b8[26]](_0xc6b8[41],_0xc6b8[42],this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]])}}}catch(e){logger[_0xc6b8[46]](_0xc6b8[55],util[_0xc6b8[45]](e,{showHidden:false,depth:null}))}};VoiceDialReport[_0xc6b8[24]][_0xc6b8[20]]= function(_0x1e55xb){try{if(this[_0xc6b8[23]](_0x1e55xb)){this[_0xc6b8[59]](_0x1e55xb[_0xc6b8[28]],_[_0xc6b8[57]](_0x1e55xb[_0xc6b8[56]])[0],_0x1e55xb[_0xc6b8[58]]);if(this[_0xc6b8[23]](_0x1e55xb[_0xc6b8[56]])&& this[_0xc6b8[23]](_0x1e55xb[_0xc6b8[56]][_0xc6b8[60]])){if(_[_0xc6b8[25]](this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]])){this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]]= {routeId:_0x1e55xb[_0xc6b8[58]],variables:this[_0xc6b8[12]][_0x1e55xb[_0xc6b8[28]]]};this[_0xc6b8[26]](_0xc6b8[41],_0xc6b8[42],this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]])}}}}catch(e){logger[_0xc6b8[46]](_0xc6b8[61],util[_0xc6b8[45]](e,{showHidden:false,depth:null}))}};VoiceDialReport[_0xc6b8[24]][_0xc6b8[59]]= function(_0x1e55xc,_0x1e55xd,_0x1e55xe){if(_[_0xc6b8[25]](this[_0xc6b8[12]][_0x1e55xc])){this[_0xc6b8[12]][_0x1e55xc]= {}};this[_0xc6b8[12]][_0x1e55xc][_0x1e55xd]= _0x1e55xe};VoiceDialReport[_0xc6b8[24]][_0xc6b8[22]]= function(_0x1e55xb){try{if(this[_0xc6b8[23]](_0x1e55xb)){if(this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]]){this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]][_0xc6b8[62]]= moment()[_0xc6b8[30]](_0xc6b8[29]);this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]][_0xc6b8[63]]= moment(this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]][_0xc6b8[62]])[_0xc6b8[66]](this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]][_0xc6b8[64]],_0xc6b8[65]);this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]][_0xc6b8[52]]= _0xc6b8[67];this[_0xc6b8[11]][_0xc6b8[68]]+= 1;if(this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]][_0xc6b8[51]]){this[_0xc6b8[11]][_0xc6b8[69]]+= 1;this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]][_0xc6b8[70]]= moment(this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]][_0xc6b8[51]])[_0xc6b8[66]](this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]][_0xc6b8[64]],_0xc6b8[65]);this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]][_0xc6b8[71]]= moment(this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]][_0xc6b8[62]])[_0xc6b8[66]](this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]][_0xc6b8[51]],_0xc6b8[65]);this[_0xc6b8[11]][_0xc6b8[72]]+= this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]][_0xc6b8[70]];this[_0xc6b8[11]][_0xc6b8[73]]+= this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]][_0xc6b8[71]]};this[_0xc6b8[11]][_0xc6b8[74]]+= this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]][_0xc6b8[63]];ami[_0xc6b8[26]](_0xc6b8[75],this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]]);ami[_0xc6b8[26]](_0xc6b8[76],this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]]);this[_0xc6b8[26]](_0xc6b8[41],_0xc6b8[77],this[_0xc6b8[11]]);this[_0xc6b8[26]](_0xc6b8[41],_0xc6b8[78],this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]]);delete this[_0xc6b8[9]][_0x1e55xb[_0xc6b8[28]]]};if(this[_0xc6b8[12]][_0x1e55xb[_0xc6b8[28]]]){delete this[_0xc6b8[12]][_0x1e55xb[_0xc6b8[28]]]}}}catch(e){logger[_0xc6b8[46]](_0xc6b8[79],util[_0xc6b8[45]](e,{showHidden:false,depth:null}))}};module[_0xc6b8[80]]= VoiceDialReport
\ No newline at end of file
+var _0x21c4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x64\x69\x61\x6C\x62\x65\x67\x69\x6E","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x44\x69\x61\x6C\x42\x65\x67\x69\x6E","\x6F\x6E","\x64\x69\x61\x6C\x65\x6E\x64","\x73\x79\x6E\x63\x44\x69\x61\x6C\x45\x6E\x64","\x76\x61\x72\x73\x65\x74","\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74","\x68\x61\x6E\x67\x75\x70","\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70","\x69\x73\x4E\x6F\x74\x4E\x75\x6C\x6C","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x65\x6D\x69\x74","\x74\x6F","\x75\x6E\x69\x71\x75\x65\x69\x64","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x61\x6C\x6C\x65\x64","\x2D","\x6C\x61\x73\x74\x49\x6E\x64\x65\x78\x4F\x66","\x63\x68\x61\x6E\x6E\x65\x6C","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x2F","\x65\x76\x65\x6E\x74","\x70\x72\x69\x76\x69\x6C\x65\x67\x65","\x6F\x6D\x69\x74","\x6D\x65\x72\x67\x65","\x76\x6F\x69\x63\x65\x3A\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x76\x6F\x69\x63\x65\x5F\x6F\x75\x74\x62\x6F\x75\x6E\x64\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x3A\x73\x61\x76\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x64\x69\x61\x6C\x62\x65\x67\x69\x6E","\x5B\x73\x79\x6E\x63\x44\x69\x61\x6C\x42\x65\x67\x69\x6E\x5D\x5B\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x64\x69\x61\x6C\x73\x74\x61\x74\x75\x73","\x41\x4E\x53\x57\x45\x52","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x75\x73\x74\x6F\x6D\x3A\x64\x69\x61\x6C\x63\x6F\x6E\x6E\x65\x63\x74","\x5B\x73\x79\x6E\x63\x44\x69\x61\x6C\x45\x6E\x64\x5D\x5B\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x76\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x76\x61\x6C\x75\x65","\x61\x64\x64\x56\x61\x72\x69\x61\x62\x6C\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x72\x6F\x75\x74\x65\x69\x64","\x5B\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74\x5D\x5B\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x65\x6E\x64\x74\x69\x6D\x65","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x74\x6F\x74\x61\x6C","\x61\x6E\x73\x77\x65\x72\x65\x64","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x62\x69\x6C\x6C\x61\x62\x6C\x65\x73\x65\x63\x6F\x6E\x64\x73","\x73\x75\x6D\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x73\x75\x6D\x42\x69\x6C\x6C\x61\x62\x6C\x65","\x73\x75\x6D\x44\x75\x72\x61\x74\x69\x6F\x6E","\x63\x75\x73\x74\x6F\x6D\x3A\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x63\x75\x73\x74\x6F\x6D\x3A\x64\x69\x61\x6C\x65\x6E\x64","\x76\x6F\x69\x63\x65\x5F\x6F\x75\x74\x62\x6F\x75\x6E\x64\x3A\x73\x61\x76\x65","\x76\x6F\x69\x63\x65\x5F\x6F\x75\x74\x62\x6F\x75\x6E\x64\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x3A\x72\x65\x6D\x6F\x76\x65","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x5D\x5B\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x65\x78\x70\x6F\x72\x74\x73"];_0x21c4[0];var _=require(_0x21c4[1]);var moment=require(_0x21c4[2]);var util=require(_0x21c4[3]);var logger=require(_0x21c4[5])(_0x21c4[4]);var ami=require(_0x21c4[6]);var io=require(_0x21c4[8])({host:_0x21c4[7],port:6379});function VoiceDialReport(_0x7960x8){this[_0x21c4[9]]= _0x7960x8[_0x21c4[10]];this[_0x21c4[11]]= _0x7960x8[_0x21c4[11]];this[_0x21c4[12]]= {};ami[_0x21c4[16]](_0x21c4[13],this[_0x21c4[15]][_0x21c4[14]](this));ami[_0x21c4[16]](_0x21c4[17],this[_0x21c4[18]][_0x21c4[14]](this));ami[_0x21c4[16]](_0x21c4[19],this[_0x21c4[20]][_0x21c4[14]](this));ami[_0x21c4[16]](_0x21c4[21],this[_0x21c4[22]][_0x21c4[14]](this))}VoiceDialReport[_0x21c4[24]][_0x21c4[23]]= function(_0x7960x9){return _0x7960x9!== null&&  !_[_0x21c4[25]](_0x7960x9)};VoiceDialReport[_0x21c4[24]][_0x21c4[26]]= function(_0x7960xa,_0x7960xb,_0x7960x9){io[_0x21c4[27]](_0x7960xa)[_0x21c4[26]](_0x7960xb,_0x7960x9)};VoiceDialReport[_0x21c4[24]][_0x21c4[15]]= function(_0x7960xb){try{if(this[_0x21c4[23]](_0x7960xb)){if(this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]]){_[_0x21c4[40]](this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]],{starttime:moment()[_0x21c4[30]](_0x21c4[29]),lastevent:_0x21c4[31],interface:_0x7960xb[_0x21c4[34]][_0x21c4[35]](0,_0x7960xb[_0x21c4[34]][_0x21c4[33]](_0x21c4[32])),membername:_0x7960xb[_0x21c4[34]][_0x21c4[35]](_0x7960xb[_0x21c4[34]][_0x21c4[33]](_0x21c4[36])+ 1,_0x7960xb[_0x21c4[34]][_0x21c4[33]](_0x21c4[32]))},_[_0x21c4[39]](_0x7960xb,[_0x21c4[37],_0x21c4[38]]));this[_0x21c4[26]](_0x21c4[41],_0x21c4[42],this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]]);ami[_0x21c4[26]](_0x21c4[43],this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]])}}}catch(e){logger[_0x21c4[46]](_0x21c4[44],util[_0x21c4[45]](e,{showHidden:false,depth:null}))}};VoiceDialReport[_0x21c4[24]][_0x21c4[18]]= function(_0x7960xb){try{if(this[_0x21c4[23]](_0x7960xb)){if(this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]]){this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]][_0x21c4[47]]= _0x7960xb[_0x21c4[47]];if(_0x7960xb[_0x21c4[47]]=== _0x21c4[48]){this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]][_0x21c4[49]]= _0x7960xb[_0x21c4[49]];this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]][_0x21c4[50]]= _0x7960xb[_0x21c4[50]];this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]][_0x21c4[51]]= moment()[_0x21c4[30]](_0x21c4[29]);this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]][_0x21c4[52]]= _0x21c4[53];ami[_0x21c4[26]](_0x21c4[54],this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]])};this[_0x21c4[26]](_0x21c4[41],_0x21c4[42],this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]])}}}catch(e){logger[_0x21c4[46]](_0x21c4[55],util[_0x21c4[45]](e,{showHidden:false,depth:null}))}};VoiceDialReport[_0x21c4[24]][_0x21c4[20]]= function(_0x7960xb){try{if(this[_0x21c4[23]](_0x7960xb)){this[_0x21c4[59]](_0x7960xb[_0x21c4[28]],_[_0x21c4[57]](_0x7960xb[_0x21c4[56]])[0],_0x7960xb[_0x21c4[58]]);if(this[_0x21c4[23]](_0x7960xb[_0x21c4[56]])&& this[_0x21c4[23]](_0x7960xb[_0x21c4[56]][_0x21c4[60]])){if(_[_0x21c4[25]](this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]])){this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]]= {routeId:_0x7960xb[_0x21c4[58]],variables:this[_0x21c4[12]][_0x7960xb[_0x21c4[28]]]};this[_0x21c4[26]](_0x21c4[41],_0x21c4[42],this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]])}}}}catch(e){logger[_0x21c4[46]](_0x21c4[61],util[_0x21c4[45]](e,{showHidden:false,depth:null}))}};VoiceDialReport[_0x21c4[24]][_0x21c4[59]]= function(_0x7960xc,_0x7960xd,_0x7960xe){if(_[_0x21c4[25]](this[_0x21c4[12]][_0x7960xc])){this[_0x21c4[12]][_0x7960xc]= {}};this[_0x21c4[12]][_0x7960xc][_0x7960xd]= _0x7960xe};VoiceDialReport[_0x21c4[24]][_0x21c4[22]]= function(_0x7960xb){try{if(this[_0x21c4[23]](_0x7960xb)){if(this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]]){this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]][_0x21c4[62]]= moment()[_0x21c4[30]](_0x21c4[29]);this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]][_0x21c4[63]]= moment(this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]][_0x21c4[62]])[_0x21c4[66]](this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]][_0x21c4[64]],_0x21c4[65]);this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]][_0x21c4[52]]= _0x21c4[67];this[_0x21c4[11]][_0x21c4[68]]+= 1;if(this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]][_0x21c4[51]]){this[_0x21c4[11]][_0x21c4[69]]+= 1;this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]][_0x21c4[70]]= moment(this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]][_0x21c4[51]])[_0x21c4[66]](this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]][_0x21c4[64]],_0x21c4[65]);this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]][_0x21c4[71]]= moment(this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]][_0x21c4[62]])[_0x21c4[66]](this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]][_0x21c4[51]],_0x21c4[65]);this[_0x21c4[11]][_0x21c4[72]]+= this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]][_0x21c4[70]];this[_0x21c4[11]][_0x21c4[73]]+= this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]][_0x21c4[71]]};this[_0x21c4[11]][_0x21c4[74]]+= this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]][_0x21c4[63]];ami[_0x21c4[26]](_0x21c4[75],this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]]);ami[_0x21c4[26]](_0x21c4[76],this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]]);this[_0x21c4[26]](_0x21c4[41],_0x21c4[77],this[_0x21c4[11]]);this[_0x21c4[26]](_0x21c4[41],_0x21c4[78],this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]]);delete this[_0x21c4[9]][_0x7960xb[_0x21c4[28]]]};if(this[_0x21c4[12]][_0x7960xb[_0x21c4[28]]]){delete this[_0x21c4[12]][_0x7960xb[_0x21c4[28]]]}}}catch(e){logger[_0x21c4[46]](_0x21c4[79],util[_0x21c4[45]](e,{showHidden:false,depth:null}))}};module[_0x21c4[80]]= VoiceDialReport
\ No newline at end of file
index 69ef87c..0318a8e 100644 (file)
@@ -1 +1 @@
-var _0x9cd5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x6D\x69","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x71\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x65\x6E\x71\x75\x65\x75\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x74\x61\x69\x6C","\x66\x69\x6E\x61\x6C\x6C\x79","\x73\x65\x71\x75\x65\x6E\x63\x65","\x71\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x73","\x61\x67\x65\x6E\x74\x73","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x71\x75\x65\x75\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x66\x6C\x61\x67\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x6E\x65\x77\x65\x78\x74\x65\x6E","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x4E\x65\x77\x45\x78\x74\x65\x6E","\x6F\x6E","\x71\x75\x65\x75\x65\x73\x75\x6D\x6D\x61\x72\x79","\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79","\x71\x75\x65\x75\x65\x73\x75\x6D\x6D\x61\x72\x79\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E","\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x4A\x6F\x69\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65","\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x4C\x65\x61\x76\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x76\x61\x72\x73\x65\x74","\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74","\x68\x61\x6E\x67\x75\x70","\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70","\x66\x75\x6C\x6C\x79\x62\x6F\x6F\x74\x65\x64","\x73\x79\x6E\x63\x46\x75\x6C\x6C\x79\x42\x6F\x6F\x74\x65\x64","\x61\x74\x74\x65\x6E\x64\x65\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x73\x79\x6E\x63\x41\x74\x74\x65\x6E\x64\x65\x64\x54\x72\x61\x6E\x73\x66\x65\x72","\x62\x6C\x69\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x73\x79\x6E\x63\x42\x6C\x69\x6E\x64\x54\x72\x61\x6E\x73\x66\x65\x72","\x6C\x6F\x6F\x70\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79","\x6C\x6F\x6F\x70\x51\x75\x65\x75\x65\x53\x68\x6F\x77","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x69\x73\x45\x6D\x70\x74\x79","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x64","\x74\x61\x6C\x6B\x69\x6E\x67","\x70\x54\x61\x6C\x6B\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x6C\x6F\x63\x6B\x52\x52","\x63\x6C\x65\x61\x72\x5A\x6F\x6D\x62\x69\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x69\x73\x4E\x69\x6C","\x6D\x65\x73\x73\x61\x67\x65","\x4E\x6F\x20\x73\x75\x63\x68\x20\x63\x68\x61\x6E\x6E\x65\x6C","\x5B\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D\x5B\x63\x68\x65\x63\x6B\x43\x68\x61\x6E\x6E\x65\x6C\x5D","\x65\x72\x72\x6F\x72","\x5B\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D\x5B\x63\x68\x65\x63\x6B\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x5B\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D\x5B\x63\x68\x65\x63\x6B\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x5D","\x63\x61\x74\x63\x68","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x5B\x46\x75\x6C\x6C\x79\x42\x6F\x6F\x74\x65\x64\x5D\x20\x63\x6C\x65\x61\x72\x20\x72\x65\x61\x6C\x74\x69\x6D\x65","\x63\x6C\x65\x61\x72\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x65\x6D\x69\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x43\x68\x61\x6E\x6E\x65\x6C\x52\x65\x6D\x6F\x76\x65","\x69\x6E\x73\x70\x65\x63\x74","\x65\x6D\x69\x74","\x74\x6F","\x65\x6D\x69\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x43\x68\x61\x6E\x6E\x65\x6C\x53\x61\x76\x65","\x76\x6F\x69\x63\x65\x3A\x71\x75\x65\x75\x65\x3A\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x3A\x73\x61\x76\x65","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x3A\x72\x65\x6D\x6F\x76\x65","\x65\x6D\x69\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79","\x74\x79\x70\x65","\x69\x6E\x62\x6F\x75\x6E\x64","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x69\x73\x4E\x6F\x74\x4E\x75\x6C\x6C","\x5B\x71\x75\x65\x75\x65\x73\x5D","\x71\x75\x65\x75\x65\x73","\x5B\x71\x75\x65\x75\x65\x73\x75\x6D\x6D\x61\x72\x79\x5D","\x74\x68\x65\x6E","\x71\x75\x65\x75\x65","\x63\x6F\x75\x6E\x74\x42\x79","\x63\x61\x6C\x6C\x65\x72\x73","\x74\x6F\x4E\x75\x6D\x62\x65\x72","\x6C\x6F\x67\x67\x65\x64\x49\x6E","\x6C\x6F\x67\x67\x65\x64\x69\x6E","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x71\x75\x65\x75\x65\x73\x75\x6D\x6D\x61\x72\x79","\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79\x5D\x5B\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x65\x78\x74\x65\x6E","\x66\x69\x6E\x64","\x2C","\x73\x70\x6C\x69\x74","\x61\x70\x70\x64\x61\x74\x61","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x6B\x65\x79\x73","\x70\x69\x63\x6B","\x6D\x65\x72\x67\x65","\x70\x75\x73\x68","\x5B\x73\x79\x6E\x63\x4E\x65\x77\x45\x78\x74\x65\x6E\x5D\x5B\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x6C\x61\x73\x74","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x6F\x75\x6E\x74","\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x4A\x6F\x69\x6E\x5D\x5B\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x72\x65\x61\x73\x6F\x6E","\x41\x42\x41\x4E\x44\x4F\x4E\x45\x44","\x6C\x61\x73\x74\x41\x73\x73\x69\x67\x6E\x65\x64\x54\x6F","\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x5D\x5B\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x4C\x65\x61\x76\x65\x5D\x5B\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x61\x73\x73\x69\x67\x6E\x65\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x73\x69\x70\x2F","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x41\x74","\x73\x65\x63\x6F\x6E\x64\x73","\x61\x64\x64","\x46\x4F\x52\x57\x41\x52\x44\x54\x52\x41\x4E\x53\x46\x45\x52","\x74\x72\x61\x6E\x73\x66\x65\x72","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x79\x70\x65","\x46\x4F\x52\x57\x41\x52\x44","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x78\x74\x65\x6E","\x64\x65\x73\x74\x65\x78\x74\x65\x6E","\x74\x72\x61\x6E\x73\x66\x65\x72\x75\x6E\x69\x71\x75\x65\x69\x64","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x72\x65\x61\x73\x6F\x6E","\x43\x4F\x4D\x50\x4C\x45\x54\x45\x44\x42\x59","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D\x5B\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x6C\x75\x65","\x61\x64\x64\x56\x61\x72\x69\x61\x62\x6C\x65","\x71\x75\x65\x75\x65\x73\x74\x61\x74\x75\x73","\x43\x4F\x4E\x54\x49\x4E\x55\x45","\x71\x75\x65\x75\x65\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x45\x58\x49\x54\x57\x49\x54\x48\x4B\x45\x59","\x5B\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74\x5D\x5B\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x6C\x65\x6E\x67\x74\x68","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x73\x75\x6D\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x64\x69\x66\x66","\x73\x75\x6D\x44\x75\x72\x61\x74\x69\x6F\x6E","\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73","\x74\x6F\x74\x61\x6C","\x61\x6E\x73\x77\x65\x72\x65\x64","\x73\x75\x6D\x42\x69\x6C\x6C\x61\x62\x6C\x65","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x63\x75\x73\x74\x6F\x6D\x3A\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x63\x75\x73\x74\x6F\x6D\x3A\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x63\x75\x73\x74\x6F\x6D\x3A\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x5D\x5B\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x75\x6E\x69\x71\x75\x65\x69\x64","\x41\x54\x54\x45\x4E\x44\x45\x44\x54\x52\x41\x4E\x53\x46\x45\x52","\x41\x54\x54\x45\x4E\x44\x45\x44","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x65\x78\x74\x65\x6E","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x75\x6E\x69\x71\x75\x65\x69\x64","\x5B\x73\x79\x6E\x63\x41\x74\x74\x65\x6E\x64\x65\x64\x54\x72\x61\x6E\x73\x66\x65\x72\x5D\x5B\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x42\x4C\x49\x4E\x44\x54\x52\x41\x4E\x53\x46\x45\x52","\x42\x4C\x49\x4E\x44","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x5B\x73\x79\x6E\x63\x42\x6C\x69\x6E\x64\x54\x72\x61\x6E\x73\x66\x65\x72\x5D\x5B\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x65\x78\x70\x6F\x72\x74\x73"];_0x9cd5[0];var _=require(_0x9cd5[1]);var moment=require(_0x9cd5[2]);var BPromise=require(_0x9cd5[3]);var util=require(_0x9cd5[4]);var logger=require(_0x9cd5[6])(_0x9cd5[5]);var ami=require(_0x9cd5[7]);var QueueReport=require(_0x9cd5[8]);var io=require(_0x9cd5[10])({host:_0x9cd5[9],port:6379});var Sequence=function(){};Sequence[_0x9cd5[12]][_0x9cd5[11]]= function(_0x7227xa){this[_0x9cd5[13]]= this[_0x9cd5[13]]?this[_0x9cd5[13]][_0x9cd5[14]](_0x7227xa):_0x7227xa()};function VoiceQueueReport(_0x7227xc){this[_0x9cd5[15]]=  new Sequence();this[_0x9cd5[16]]= {};this[_0x9cd5[17]]= _0x7227xc[_0x9cd5[17]];this[_0x9cd5[18]]= _0x7227xc[_0x9cd5[19]];this[_0x9cd5[20]]= _0x7227xc[_0x9cd5[20]];this[_0x9cd5[21]]= true;this[_0x9cd5[22]]= _0x7227xc[_0x9cd5[22]];this[_0x9cd5[23]]= {};ami[_0x9cd5[27]](_0x9cd5[24],this[_0x9cd5[26]][_0x9cd5[25]](this));ami[_0x9cd5[27]](_0x9cd5[28],this[_0x9cd5[29]][_0x9cd5[25]](this));ami[_0x9cd5[27]](_0x9cd5[30],this[_0x9cd5[31]][_0x9cd5[25]](this));ami[_0x9cd5[27]](_0x9cd5[32],this[_0x9cd5[33]][_0x9cd5[25]](this));ami[_0x9cd5[27]](_0x9cd5[34],this[_0x9cd5[35]][_0x9cd5[25]](this));ami[_0x9cd5[27]](_0x9cd5[36],this[_0x9cd5[37]][_0x9cd5[25]](this));ami[_0x9cd5[27]](_0x9cd5[38],this[_0x9cd5[39]][_0x9cd5[25]](this));ami[_0x9cd5[27]](_0x9cd5[40],this[_0x9cd5[41]][_0x9cd5[25]](this));ami[_0x9cd5[27]](_0x9cd5[42],this[_0x9cd5[43]][_0x9cd5[25]](this));ami[_0x9cd5[27]](_0x9cd5[44],this[_0x9cd5[45]][_0x9cd5[25]](this));ami[_0x9cd5[27]](_0x9cd5[46],this[_0x9cd5[47]][_0x9cd5[25]](this));ami[_0x9cd5[27]](_0x9cd5[48],this[_0x9cd5[49]][_0x9cd5[25]](this));this[_0x9cd5[50]]();this[_0x9cd5[51]]()}function isNotNull(_0x7227xe){return _0x7227xe!== null&&  !_[_0x9cd5[52]](_0x7227xe)}function clearChannels(_0x7227x10){if(!_[_0x9cd5[53]](_0x7227x10)){for(var _0x7227x11 in _0x7227x10){if(_0x7227x10[_0x9cd5[54]](_0x7227x11)){delete _0x7227x10[_0x7227x11]}}}}function clearCampaigns(_0x7227x13){if(!_[_0x9cd5[53]](_0x7227x13)){for(var _0x7227x11 in _0x7227x13){if(_0x7227x13[_0x9cd5[54]](_0x7227x11)){_0x7227x13[_0x7227x11][_0x9cd5[55]]= 0}}}}function clearVoiceQueues(_0x7227x15){if(!_[_0x9cd5[53]](_0x7227x15)){for(var _0x7227x11 in _0x7227x15){if(_0x7227x15[_0x9cd5[54]](_0x7227x11)){_0x7227x15[_0x7227x11][_0x9cd5[55]]= 0;_0x7227x15[_0x7227x11][_0x9cd5[56]]= 0;_0x7227x15[_0x7227x11][_0x9cd5[57]]= 0;_0x7227x15[_0x7227x11][_0x9cd5[58]]= 0;_0x7227x15[_0x7227x11][_0x9cd5[59]]= true}}}}function clearAgentBooked(_0x7227x17){if(!_[_0x9cd5[53]](_0x7227x17)){for(var _0x7227x11 in _0x7227x17){if(_0x7227x17[_0x9cd5[54]](_0x7227x11)){_0x7227x17[_0x7227x11][_0x9cd5[60]]= true}}}}VoiceQueueReport[_0x9cd5[12]][_0x9cd5[61]]= function(){var _0x7227x18=this;for(var _0x7227x19 in this[_0x9cd5[18]]){if(this[_0x9cd5[18]][_0x9cd5[54]](_0x7227x19)){this[_0x9cd5[15]][_0x9cd5[11]](function(){if(!_[_0x9cd5[62]](_0x7227x18[_0x9cd5[18]][_0x7227x19])){return ami.Action({action:_0x9cd5[70],channel:_0x7227x18[_0x9cd5[18]][_0x7227x19][_0x9cd5[71]]})[_0x9cd5[69]](function(_0x7227x1a){if(_0x7227x1a[_0x9cd5[63]]=== _0x9cd5[64]){setTimeout(function(){if(_0x7227x18[_0x9cd5[18]][_0x7227x19]){delete _0x7227x18[_0x9cd5[18]][_0x7227x19];logger[_0x9cd5[66]](_0x9cd5[65],_0x7227x19)};if(_0x7227x18[_0x9cd5[16]][_0x7227x19]){delete _0x7227x18[_0x9cd5[16]][_0x7227x19];logger[_0x9cd5[66]](_0x9cd5[67],_0x7227x19)};if(_0x7227x18[_0x9cd5[23]][_0x7227x19]){delete _0x7227x18[_0x9cd5[23]][_0x7227x19];logger[_0x9cd5[66]](_0x9cd5[68],_0x7227x19)}},8000)}})}})}}};VoiceQueueReport[_0x9cd5[12]][_0x9cd5[45]]= function(){logger[_0x9cd5[66]](_0x9cd5[72]);clearChannels(this[_0x9cd5[18]]);this[_0x9cd5[73]](this[_0x9cd5[16]]);clearAgentBooked(this[_0x9cd5[17]]);clearVoiceQueues(this[_0x9cd5[20]]);clearCampaigns(this[_0x9cd5[22]])};VoiceQueueReport[_0x9cd5[12]][_0x9cd5[73]]= function(_0x7227x1b){var _0x7227x18=this;if(!_[_0x9cd5[53]](_0x7227x1b)){for(var _0x7227x11 in _0x7227x1b){if(_0x7227x1b[_0x9cd5[54]](_0x7227x11)){_0x7227x18[_0x9cd5[74]](_0x7227x1b[_0x7227x11]);delete _0x7227x1b[_0x7227x11]}}}};function loggerCatch(_0x7227x1d){return function(_0x7227x1a){logger[_0x9cd5[66]](_0x7227x1d,util[_0x9cd5[75]](_0x7227x1a,{showHidden:false,depth:null}))}}VoiceQueueReport[_0x9cd5[12]][_0x9cd5[76]]= function(_0x7227x1e,_0x7227x1f,_0x7227xe){io[_0x9cd5[77]](_0x7227x1e)[_0x9cd5[76]](_0x7227x1f,_0x7227xe)};VoiceQueueReport[_0x9cd5[12]][_0x9cd5[78]]= function(_0x7227xe){this[_0x9cd5[76]](util[_0x9cd5[81]](_0x9cd5[79],_0x7227xe[_0x9cd5[80]]),_0x9cd5[82],_0x7227xe)};VoiceQueueReport[_0x9cd5[12]][_0x9cd5[74]]= function(_0x7227xe){this[_0x9cd5[76]](util[_0x9cd5[81]](_0x9cd5[79],_0x7227xe[_0x9cd5[80]]),_0x9cd5[83],_0x7227xe)};VoiceQueueReport[_0x9cd5[12]][_0x9cd5[84]]= function(_0x7227xe){if(_0x7227xe[_0x9cd5[85]]=== _0x9cd5[86]){this[_0x9cd5[76]](util[_0x9cd5[81]](_0x9cd5[79],_0x7227xe[_0x9cd5[80]]),_0x9cd5[87],_0x7227xe)}};VoiceQueueReport[_0x9cd5[12]][_0x9cd5[88]]= function(_0x7227xe){return _0x7227xe!== null&&  !_[_0x9cd5[52]](_0x7227xe)};VoiceQueueReport[_0x9cd5[12]][_0x9cd5[51]]= function(){var _0x7227x18=this;setInterval(function(){_0x7227x18[_0x9cd5[61]]();ami.Action({action:_0x9cd5[90]})[_0x9cd5[69]](loggerCatch(_0x9cd5[89]))},10000)};VoiceQueueReport[_0x9cd5[12]][_0x9cd5[50]]= function(){var _0x7227x18=this;setInterval(function(){if(_0x7227x18[_0x9cd5[21]]){return ami.Action({action:_0x9cd5[28]})[_0x9cd5[92]](function(_0x7227x1f){_0x7227x18[_0x9cd5[21]]= false})[_0x9cd5[69]](loggerCatch(_0x9cd5[91]))}},1000)};VoiceQueueReport[_0x9cd5[12]][_0x9cd5[29]]= function(_0x7227x1f){try{if(this[_0x9cd5[88]](_0x7227x1f)&& this[_0x9cd5[88]](_0x7227x1f[_0x9cd5[93]])){if(this[_0x9cd5[20]][_0x7227x1f[_0x9cd5[93]]]){var _0x7227x20=_[_0x9cd5[94]](this[_0x9cd5[18]],_0x9cd5[93])[_0x7227x1f[_0x9cd5[93]]]|| 0;var _0x7227x21=_0x7227x20- _0x7227x1f[_0x9cd5[95]];if(this[_0x9cd5[20]][_0x7227x1f[_0x9cd5[93]]][_0x9cd5[58]]!== _[_0x9cd5[96]](_0x7227x1f[_0x9cd5[95]])|| this[_0x9cd5[20]][_0x7227x1f[_0x9cd5[93]]][_0x9cd5[97]]!== _[_0x9cd5[96]](_0x7227x1f[_0x9cd5[98]])|| this[_0x9cd5[20]][_0x7227x1f[_0x9cd5[93]]][_0x9cd5[99]]!== _[_0x9cd5[96]](_0x7227x1f[_0x9cd5[99]])|| this[_0x9cd5[20]][_0x7227x1f[_0x9cd5[93]]][_0x9cd5[56]]!== _0x7227x21){this[_0x9cd5[20]][_0x7227x1f[_0x9cd5[93]]][_0x9cd5[58]]= _[_0x9cd5[96]](_0x7227x1f[_0x9cd5[95]]);this[_0x9cd5[20]][_0x7227x1f[_0x9cd5[93]]][_0x9cd5[97]]= _[_0x9cd5[96]](_0x7227x1f[_0x9cd5[98]]);this[_0x9cd5[20]][_0x7227x1f[_0x9cd5[93]]][_0x9cd5[99]]= _[_0x9cd5[96]](_0x7227x1f[_0x9cd5[99]]);this[_0x9cd5[20]][_0x7227x1f[_0x9cd5[93]]][_0x9cd5[56]]= _0x7227x21> 0?_0x7227x21:0;this[_0x9cd5[20]][_0x7227x1f[_0x9cd5[93]]][_0x9cd5[56]]= (this[_0x9cd5[20]][_0x7227x1f[_0x9cd5[93]]][_0x9cd5[56]]> _[_0x9cd5[96]](_0x7227x1f[_0x9cd5[98]]))?_[_0x9cd5[96]](_0x7227x1f[_0x9cd5[98]]):this[_0x9cd5[20]][_0x7227x1f[_0x9cd5[93]]][_0x9cd5[56]];this[_0x9cd5[84]](this[_0x9cd5[20]][_0x7227x1f[_0x9cd5[93]]])};ami[_0x9cd5[76]](_0x9cd5[100],this[_0x9cd5[20]][_0x7227x1f[_0x9cd5[93]]])}}}catch(e){logger[_0x9cd5[66]](_0x9cd5[101],util[_0x9cd5[75]](e,{showHidden:false,depth:null}))}};VoiceQueueReport[_0x9cd5[12]][_0x9cd5[31]]= function(_0x7227x1f){this[_0x9cd5[21]]= true};VoiceQueueReport[_0x9cd5[12]][_0x9cd5[26]]= function(_0x7227x1f){var _0x7227x22=true;try{if(this[_0x9cd5[88]](_0x7227x1f)){if(!_[_0x9cd5[52]](_0x7227x1f[_0x9cd5[102]])&& _0x7227x1f[_0x9cd5[102]][_0x9cd5[103]]()=== _0x9cd5[93]){if(_[_0x9cd5[52]](this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]])){this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]]= [];this[_0x9cd5[18]][_0x7227x1f[_0x9cd5[104]]]= {}}else {_0x7227x22= _[_0x9cd5[106]](this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]],{exten:_0x7227x1f[_0x9cd5[105]]})};if(_0x7227x22){var _0x7227x23= new QueueReport();_0x7227x23[_0x9cd5[80]]= _0x7227x1f[_0x9cd5[109]][_0x9cd5[108]](_0x9cd5[107])[0];_0x7227x23[_0x9cd5[85]]= this[_0x9cd5[20]][_0x7227x23[_0x9cd5[80]]][_0x9cd5[85]]?this[_0x9cd5[20]][_0x7227x23[_0x9cd5[80]]][_0x9cd5[85]]|| _0x9cd5[86]:_0x9cd5[86];_0x7227x23[_0x9cd5[93]]= _0x7227x1f[_0x9cd5[109]][_0x9cd5[108]](_0x9cd5[107])[0];_0x7227x23[_0x9cd5[110]]= moment()[_0x9cd5[81]](_0x9cd5[111]);_[_0x9cd5[114]](_0x7227x23,_[_0x9cd5[113]](_0x7227x1f,_[_0x9cd5[112]](_0x7227x23)));this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]][_0x9cd5[115]](_0x7227x23);this[_0x9cd5[18]][_0x7227x1f[_0x9cd5[104]]]= _0x7227x23;this[_0x9cd5[78]](_0x7227x23)}}}}catch(e){logger[_0x9cd5[66]](_0x9cd5[116],util[_0x9cd5[75]](e,{showHidden:false,depth:null}))}};VoiceQueueReport[_0x9cd5[12]][_0x9cd5[33]]= function(_0x7227x1f){try{if(this[_0x9cd5[88]](_0x7227x1f)){var _0x7227x23;if(_[_0x9cd5[52]](this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]])){this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]]= [];this[_0x9cd5[18]][_0x7227x1f[_0x9cd5[104]]]= {};_0x7227x23=  new QueueReport();_[_0x9cd5[114]](_0x7227x23,_[_0x9cd5[113]](_0x7227x1f,_[_0x9cd5[112]](_0x7227x23)));this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]][_0x9cd5[115]](_0x7227x23)}else {_0x7227x23= _[_0x9cd5[117]](this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]])};_0x7227x23[_0x9cd5[80]]= _0x7227x1f[_0x9cd5[93]];_0x7227x23[_0x9cd5[85]]= this[_0x9cd5[20]][_0x7227x23[_0x9cd5[80]]][_0x9cd5[85]]?this[_0x9cd5[20]][_0x7227x23[_0x9cd5[80]]][_0x9cd5[85]]|| _0x9cd5[86]:_0x9cd5[86];_0x7227x23[_0x9cd5[93]]= _0x7227x1f[_0x9cd5[93]];_0x7227x23[_0x9cd5[110]]= moment()[_0x9cd5[81]](_0x9cd5[111]);_0x7227x23[_0x9cd5[118]]= _0x7227x1f[_0x9cd5[118]];_0x7227x23[_0x9cd5[119]]= _0x7227x1f[_0x9cd5[119]];this[_0x9cd5[18]][_0x7227x1f[_0x9cd5[104]]]= _0x7227x23;this[_0x9cd5[78]](_0x7227x23)}}catch(e){logger[_0x9cd5[66]](_0x9cd5[120],util[_0x9cd5[75]](e,{showHidden:false,depth:null}))}};VoiceQueueReport[_0x9cd5[12]][_0x9cd5[35]]= function(_0x7227x1f){try{if(this[_0x9cd5[88]](_0x7227x1f)){if(this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]]){var _0x7227x23=_[_0x9cd5[117]](this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]]);_0x7227x23[_0x9cd5[121]]= _0x7227x1f[_0x9cd5[121]];_0x7227x23[_0x9cd5[122]]= _0x7227x1f[_0x9cd5[122]];_0x7227x23[_0x9cd5[34]]= true;_0x7227x23[_0x9cd5[123]]= moment()[_0x9cd5[81]](_0x9cd5[111]);_0x7227x23[_0x9cd5[124]]= _0x9cd5[125];_0x7227x23[_0x9cd5[126]]= null;this[_0x9cd5[18]][_0x7227x1f[_0x9cd5[104]]]= _0x7227x23;this[_0x9cd5[74]](_0x7227x23)}}}catch(e){logger[_0x9cd5[66]](_0x9cd5[127],util[_0x9cd5[75]](e,{showHidden:false,depth:null}))}};VoiceQueueReport[_0x9cd5[12]][_0x9cd5[37]]= function(_0x7227x1f){try{if(this[_0x9cd5[88]](_0x7227x1f)){if(this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]]){var _0x7227x23=_[_0x9cd5[117]](this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]]);_0x7227x23[_0x9cd5[128]]= moment()[_0x9cd5[81]](_0x9cd5[111]);_0x7227x23[_0x9cd5[129]]= _0x7227x1f[_0x9cd5[129]];_0x7227x23[_0x9cd5[130]]= _0x7227x1f[_0x9cd5[130]];this[_0x9cd5[18]][_0x7227x1f[_0x9cd5[104]]]= _0x7227x23;this[_0x9cd5[78]](_0x7227x23)}}}catch(e){logger[_0x9cd5[66]](_0x9cd5[131],util[_0x9cd5[75]](e,{showHidden:false,depth:null}))}};VoiceQueueReport[_0x9cd5[12]][_0x9cd5[39]]= function(_0x7227x1f){try{if(this[_0x9cd5[88]](_0x7227x1f)){if(this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]]){var _0x7227x23=_[_0x9cd5[117]](this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]]);_0x7227x23[_0x9cd5[34]]= false;_0x7227x23[_0x9cd5[123]]= null;_0x7227x23[_0x9cd5[132]]= true;_0x7227x23[_0x9cd5[126]]= _0x7227x1f[_0x9cd5[133]];_0x7227x23[_0x9cd5[121]]= _0x7227x1f[_0x9cd5[121]];if(_0x7227x1f[_0x9cd5[129]]=== _0x9cd5[134]&& _[_0x9cd5[137]](_0x7227x1f[_0x9cd5[135]][_0x9cd5[103]](),_0x9cd5[136])){_0x7227x23[_0x9cd5[138]]= true;_0x7227x23[_0x9cd5[139]]= moment(_0x7227x23[_0x9cd5[110]])[_0x9cd5[141]](_0x7227x1f[_0x9cd5[121]],_0x9cd5[140])[_0x9cd5[81]](_0x9cd5[111]);_0x7227x23[_0x9cd5[124]]= _0x9cd5[142];_0x7227x23[_0x9cd5[143]]= true;_0x7227x23[_0x9cd5[144]]= _0x9cd5[145];_0x7227x23[_0x9cd5[146]]= _0x7227x1f[_0x9cd5[147]];_0x7227x23[_0x9cd5[148]]= _0x7227x1f[_0x9cd5[104]];if(this[_0x9cd5[17]][_0x7227x1f[_0x9cd5[135]]]){_0x7227x23[_0x9cd5[129]]= this[_0x9cd5[17]][_0x7227x1f[_0x9cd5[135]]][_0x9cd5[149]];_0x7227x23[_0x9cd5[130]]= this[_0x9cd5[17]][_0x7227x1f[_0x9cd5[135]]][_0x9cd5[150]];_0x7227x23[_0x9cd5[151]]= this[_0x9cd5[17]][_0x7227x1f[_0x9cd5[135]]][_0x9cd5[149]];_0x7227x23[_0x9cd5[152]]= this[_0x9cd5[17]][_0x7227x1f[_0x9cd5[135]]][_0x9cd5[150]]}}else {_0x7227x23[_0x9cd5[153]]= true;_0x7227x23[_0x9cd5[154]]= moment()[_0x9cd5[81]](_0x9cd5[111]);_0x7227x23[_0x9cd5[138]]= false;_0x7227x23[_0x9cd5[139]]= null;if(_0x7227x1f[_0x9cd5[155]]!== _0x9cd5[143]){_0x7227x23[_0x9cd5[124]]= _0x9cd5[156]+ _0x7227x1f[_0x9cd5[155]][_0x9cd5[157]]()}};this[_0x9cd5[18]][_0x7227x1f[_0x9cd5[104]]]= _0x7227x23;this[_0x9cd5[74]](_0x7227x23)}}}catch(e){logger[_0x9cd5[66]](_0x9cd5[158],util[_0x9cd5[75]](e,{showHidden:false,depth:null}))}};VoiceQueueReport[_0x9cd5[12]][_0x9cd5[41]]= function(_0x7227x1f){try{if(this[_0x9cd5[88]](_0x7227x1f)){this[_0x9cd5[161]](_0x7227x1f[_0x9cd5[104]],_[_0x9cd5[112]](_0x7227x1f[_0x9cd5[159]])[0],_0x7227x1f[_0x9cd5[160]]);if(this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]]){var _0x7227x23=_[_0x9cd5[117]](this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]]);if(this[_0x9cd5[88]](_0x7227x1f[_0x9cd5[159]])&& this[_0x9cd5[88]](_0x7227x1f[_0x9cd5[159]][_0x9cd5[162]])){switch(_0x7227x1f[_0x9cd5[160]]){case _0x9cd5[163]:_0x7227x23[_0x9cd5[138]]= false;_0x7227x23[_0x9cd5[139]]= null;break;default:_0x7227x23[_0x9cd5[138]]= true;_0x7227x23[_0x9cd5[139]]= moment()[_0x9cd5[81]](_0x9cd5[111]);_0x7227x23[_0x9cd5[128]]= moment()[_0x9cd5[81]](_0x9cd5[111])};_0x7227x23[_0x9cd5[34]]= false;_0x7227x23[_0x9cd5[123]]= null;_0x7227x23[_0x9cd5[124]]= _0x7227x1f[_0x9cd5[160]];this[_0x9cd5[18]][_0x7227x1f[_0x9cd5[104]]]= _0x7227x23;this[_0x9cd5[74]](_0x7227x23)}else {if(this[_0x9cd5[88]](_0x7227x1f[_0x9cd5[159]])&& this[_0x9cd5[88]](_0x7227x1f[_0x9cd5[159]][_0x9cd5[164]])){if(!_0x7227x23[_0x9cd5[34]]){_0x7227x23[_0x9cd5[138]]= true;_0x7227x23[_0x9cd5[139]]= moment()[_0x9cd5[81]](_0x9cd5[111]);_0x7227x23[_0x9cd5[124]]= _0x9cd5[165];_0x7227x23[_0x9cd5[128]]= moment()[_0x9cd5[81]](_0x9cd5[111]);this[_0x9cd5[18]][_0x7227x1f[_0x9cd5[104]]]= _0x7227x23}}};_0x7227x23[_0x9cd5[23]]= this[_0x9cd5[23]][_0x7227x1f[_0x9cd5[104]]]}}}catch(e){logger[_0x9cd5[66]](_0x9cd5[166],util[_0x9cd5[75]](e,{showHidden:false,depth:null}))}};VoiceQueueReport[_0x9cd5[12]][_0x9cd5[161]]= function(_0x7227x19,_0x7227x24,_0x7227x25){if(_[_0x9cd5[52]](this[_0x9cd5[23]][_0x7227x19])){this[_0x9cd5[23]][_0x7227x19]= {}};this[_0x9cd5[23]][_0x7227x19][_0x7227x24]= _0x7227x25};VoiceQueueReport[_0x9cd5[12]][_0x9cd5[43]]= function(_0x7227x1f){try{if(this[_0x9cd5[88]](_0x7227x1f)){if(this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]]){for(var _0x7227x26=0,_0x7227x23={};_0x7227x26< this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]][_0x9cd5[167]];_0x7227x26+= 1){_0x7227x23= this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]][_0x7227x26];if(this[_0x9cd5[20]][_0x7227x23[_0x9cd5[93]]]){if(_0x7227x23[_0x9cd5[138]]){this[_0x9cd5[20]][_0x7227x23[_0x9cd5[93]]][_0x9cd5[168]]+= 1};this[_0x9cd5[20]][_0x7227x23[_0x9cd5[93]]][_0x9cd5[169]]+= moment(_0x7227x23[_0x9cd5[128]])[_0x9cd5[170]](_0x7227x23[_0x9cd5[110]],_0x9cd5[140]);if(_0x7227x26=== this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]][_0x9cd5[167]]- 1){this[_0x9cd5[20]][_0x7227x23[_0x9cd5[93]]][_0x9cd5[171]]+= moment()[_0x9cd5[172]](0)[_0x9cd5[170]](_0x7227x23[_0x9cd5[110]],_0x9cd5[140]);this[_0x9cd5[20]][_0x7227x23[_0x9cd5[93]]][_0x9cd5[173]]+= 1;if(_0x7227x23[_0x9cd5[153]]){this[_0x9cd5[20]][_0x7227x23[_0x9cd5[93]]][_0x9cd5[174]]+= 1;this[_0x9cd5[20]][_0x7227x23[_0x9cd5[93]]][_0x9cd5[175]]+= moment()[_0x9cd5[172]](0)[_0x9cd5[170]](_0x7227x23[_0x9cd5[128]],_0x9cd5[140])};if(_0x7227x23[_0x9cd5[34]]){_0x7227x23[_0x9cd5[176]]= _0x9cd5[177];ami[_0x9cd5[76]](_0x9cd5[178],_0x7227x23)};if(_0x7227x23[_0x9cd5[138]]){_0x7227x23[_0x9cd5[176]]= _0x9cd5[168];ami[_0x9cd5[76]](_0x9cd5[179],_0x7227x23)}}else {this[_0x9cd5[20]][_0x7227x23[_0x9cd5[93]]][_0x9cd5[171]]+= this[_0x9cd5[20]][_0x7227x23[_0x9cd5[93]]][_0x9cd5[169]]};this[_0x9cd5[18]][_0x7227x1f[_0x9cd5[104]]]= _0x7227x23;this[_0x9cd5[74]](_0x7227x23)}};ami[_0x9cd5[76]](_0x9cd5[180],this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]]);delete this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[104]]];delete this[_0x9cd5[18]][_0x7227x1f[_0x9cd5[104]]]};if(this[_0x9cd5[23]][_0x7227x1f[_0x9cd5[104]]]){delete this[_0x9cd5[23]][_0x7227x1f[_0x9cd5[104]]]}}}catch(e){logger[_0x9cd5[66]](_0x9cd5[181],util[_0x9cd5[75]](e,{showHidden:false,depth:null}))}};VoiceQueueReport[_0x9cd5[12]][_0x9cd5[47]]= function(_0x7227x1f){try{if(this[_0x9cd5[88]](_0x7227x1f)){if(this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[182]]]){var _0x7227x23=_[_0x9cd5[117]](this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[182]]]);_0x7227x23[_0x9cd5[124]]= _0x9cd5[183];_0x7227x23[_0x9cd5[143]]= true;_0x7227x23[_0x9cd5[144]]= _0x9cd5[184];_0x7227x23[_0x9cd5[146]]= _0x7227x1f[_0x9cd5[185]];_0x7227x23[_0x9cd5[148]]= _0x7227x1f[_0x9cd5[186]]}}}catch(e){logger[_0x9cd5[66]](_0x9cd5[187],util[_0x9cd5[75]](e,{showHidden:false,depth:null}))}};VoiceQueueReport[_0x9cd5[12]][_0x9cd5[49]]= function(_0x7227x1f){try{if(this[_0x9cd5[88]](_0x7227x1f)){if(this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[182]]]){var _0x7227x23=_[_0x9cd5[117]](this[_0x9cd5[16]][_0x7227x1f[_0x9cd5[182]]]);_0x7227x23[_0x9cd5[124]]= _0x9cd5[188];_0x7227x23[_0x9cd5[143]]= true;_0x7227x23[_0x9cd5[144]]= _0x9cd5[189];_0x7227x23[_0x9cd5[146]]= _0x7227x1f[_0x9cd5[190]];_0x7227x23[_0x9cd5[148]]= _0x7227x1f[_0x9cd5[182]]}}}catch(e){logger[_0x9cd5[66]](_0x9cd5[191],util[_0x9cd5[75]](e,{showHidden:false,depth:null}))}};module[_0x9cd5[192]]= VoiceQueueReport
\ No newline at end of file
+var _0x53d8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x6D\x69","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x71\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x65\x6E\x71\x75\x65\x75\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x74\x61\x69\x6C","\x66\x69\x6E\x61\x6C\x6C\x79","\x73\x65\x71\x75\x65\x6E\x63\x65","\x71\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x73","\x61\x67\x65\x6E\x74\x73","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x71\x75\x65\x75\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x66\x6C\x61\x67\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x6E\x65\x77\x65\x78\x74\x65\x6E","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x4E\x65\x77\x45\x78\x74\x65\x6E","\x6F\x6E","\x71\x75\x65\x75\x65\x73\x75\x6D\x6D\x61\x72\x79","\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79","\x71\x75\x65\x75\x65\x73\x75\x6D\x6D\x61\x72\x79\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E","\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x4A\x6F\x69\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65","\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x4C\x65\x61\x76\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x76\x61\x72\x73\x65\x74","\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74","\x68\x61\x6E\x67\x75\x70","\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70","\x66\x75\x6C\x6C\x79\x62\x6F\x6F\x74\x65\x64","\x73\x79\x6E\x63\x46\x75\x6C\x6C\x79\x42\x6F\x6F\x74\x65\x64","\x61\x74\x74\x65\x6E\x64\x65\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x73\x79\x6E\x63\x41\x74\x74\x65\x6E\x64\x65\x64\x54\x72\x61\x6E\x73\x66\x65\x72","\x62\x6C\x69\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x73\x79\x6E\x63\x42\x6C\x69\x6E\x64\x54\x72\x61\x6E\x73\x66\x65\x72","\x6C\x6F\x6F\x70\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79","\x6C\x6F\x6F\x70\x51\x75\x65\x75\x65\x53\x68\x6F\x77","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x69\x73\x45\x6D\x70\x74\x79","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65\x64","\x74\x61\x6C\x6B\x69\x6E\x67","\x70\x54\x61\x6C\x6B\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x6C\x6F\x63\x6B\x52\x52","\x63\x6C\x65\x61\x72\x5A\x6F\x6D\x62\x69\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x69\x73\x4E\x69\x6C","\x6D\x65\x73\x73\x61\x67\x65","\x4E\x6F\x20\x73\x75\x63\x68\x20\x63\x68\x61\x6E\x6E\x65\x6C","\x5B\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D\x5B\x63\x68\x65\x63\x6B\x43\x68\x61\x6E\x6E\x65\x6C\x5D","\x65\x72\x72\x6F\x72","\x5B\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D\x5B\x63\x68\x65\x63\x6B\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x5B\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D\x5B\x63\x68\x65\x63\x6B\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x5D","\x63\x61\x74\x63\x68","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x5B\x46\x75\x6C\x6C\x79\x42\x6F\x6F\x74\x65\x64\x5D\x20\x63\x6C\x65\x61\x72\x20\x72\x65\x61\x6C\x74\x69\x6D\x65","\x63\x6C\x65\x61\x72\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x65\x6D\x69\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x43\x68\x61\x6E\x6E\x65\x6C\x52\x65\x6D\x6F\x76\x65","\x69\x6E\x73\x70\x65\x63\x74","\x65\x6D\x69\x74","\x74\x6F","\x65\x6D\x69\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x43\x68\x61\x6E\x6E\x65\x6C\x53\x61\x76\x65","\x76\x6F\x69\x63\x65\x3A\x71\x75\x65\x75\x65\x3A\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x3A\x73\x61\x76\x65","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x3A\x72\x65\x6D\x6F\x76\x65","\x65\x6D\x69\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79","\x74\x79\x70\x65","\x69\x6E\x62\x6F\x75\x6E\x64","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x69\x73\x4E\x6F\x74\x4E\x75\x6C\x6C","\x5B\x71\x75\x65\x75\x65\x73\x5D","\x71\x75\x65\x75\x65\x73","\x5B\x71\x75\x65\x75\x65\x73\x75\x6D\x6D\x61\x72\x79\x5D","\x74\x68\x65\x6E","\x71\x75\x65\x75\x65","\x63\x6F\x75\x6E\x74\x42\x79","\x63\x61\x6C\x6C\x65\x72\x73","\x74\x6F\x4E\x75\x6D\x62\x65\x72","\x6C\x6F\x67\x67\x65\x64\x49\x6E","\x6C\x6F\x67\x67\x65\x64\x69\x6E","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x71\x75\x65\x75\x65\x73\x75\x6D\x6D\x61\x72\x79","\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x53\x75\x6D\x6D\x61\x72\x79\x5D\x5B\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x65\x78\x74\x65\x6E","\x66\x69\x6E\x64","\x2C","\x73\x70\x6C\x69\x74","\x61\x70\x70\x64\x61\x74\x61","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x6B\x65\x79\x73","\x70\x69\x63\x6B","\x6D\x65\x72\x67\x65","\x70\x75\x73\x68","\x5B\x73\x79\x6E\x63\x4E\x65\x77\x45\x78\x74\x65\x6E\x5D\x5B\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x6C\x61\x73\x74","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x6F\x75\x6E\x74","\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x4A\x6F\x69\x6E\x5D\x5B\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x72\x65\x61\x73\x6F\x6E","\x41\x42\x41\x4E\x44\x4F\x4E\x45\x44","\x6C\x61\x73\x74\x41\x73\x73\x69\x67\x6E\x65\x64\x54\x6F","\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x5D\x5B\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x5B\x73\x79\x6E\x63\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x4C\x65\x61\x76\x65\x5D\x5B\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x61\x73\x73\x69\x67\x6E\x65\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x73\x69\x70\x2F","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x41\x74","\x73\x65\x63\x6F\x6E\x64\x73","\x61\x64\x64","\x46\x4F\x52\x57\x41\x52\x44\x54\x52\x41\x4E\x53\x46\x45\x52","\x74\x72\x61\x6E\x73\x66\x65\x72","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x79\x70\x65","\x46\x4F\x52\x57\x41\x52\x44","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x78\x74\x65\x6E","\x64\x65\x73\x74\x65\x78\x74\x65\x6E","\x74\x72\x61\x6E\x73\x66\x65\x72\x75\x6E\x69\x71\x75\x65\x69\x64","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x72\x65\x61\x73\x6F\x6E","\x43\x4F\x4D\x50\x4C\x45\x54\x45\x44\x42\x59","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x5B\x73\x79\x6E\x63\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x5D\x5B\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x6C\x75\x65","\x61\x64\x64\x56\x61\x72\x69\x61\x62\x6C\x65","\x71\x75\x65\x75\x65\x73\x74\x61\x74\x75\x73","\x43\x4F\x4E\x54\x49\x4E\x55\x45","\x71\x75\x65\x75\x65\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x45\x58\x49\x54\x57\x49\x54\x48\x4B\x45\x59","\x5B\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74\x5D\x5B\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x6C\x65\x6E\x67\x74\x68","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x73\x75\x6D\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x64\x69\x66\x66","\x73\x75\x6D\x44\x75\x72\x61\x74\x69\x6F\x6E","\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73","\x74\x6F\x74\x61\x6C","\x61\x6E\x73\x77\x65\x72\x65\x64","\x73\x75\x6D\x42\x69\x6C\x6C\x61\x62\x6C\x65","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x63\x75\x73\x74\x6F\x6D\x3A\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x63\x75\x73\x74\x6F\x6D\x3A\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x63\x75\x73\x74\x6F\x6D\x3A\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x5D\x5B\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x75\x6E\x69\x71\x75\x65\x69\x64","\x41\x54\x54\x45\x4E\x44\x45\x44\x54\x52\x41\x4E\x53\x46\x45\x52","\x41\x54\x54\x45\x4E\x44\x45\x44","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x65\x78\x74\x65\x6E","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x75\x6E\x69\x71\x75\x65\x69\x64","\x5B\x73\x79\x6E\x63\x41\x74\x74\x65\x6E\x64\x65\x64\x54\x72\x61\x6E\x73\x66\x65\x72\x5D\x5B\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x42\x4C\x49\x4E\x44\x54\x52\x41\x4E\x53\x46\x45\x52","\x42\x4C\x49\x4E\x44","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x5B\x73\x79\x6E\x63\x42\x6C\x69\x6E\x64\x54\x72\x61\x6E\x73\x66\x65\x72\x5D\x5B\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x5D","\x65\x78\x70\x6F\x72\x74\x73"];_0x53d8[0];var _=require(_0x53d8[1]);var moment=require(_0x53d8[2]);var BPromise=require(_0x53d8[3]);var util=require(_0x53d8[4]);var logger=require(_0x53d8[6])(_0x53d8[5]);var ami=require(_0x53d8[7]);var QueueReport=require(_0x53d8[8]);var io=require(_0x53d8[10])({host:_0x53d8[9],port:6379});var Sequence=function(){};Sequence[_0x53d8[12]][_0x53d8[11]]= function(_0x513exa){this[_0x53d8[13]]= this[_0x53d8[13]]?this[_0x53d8[13]][_0x53d8[14]](_0x513exa):_0x513exa()};function VoiceQueueReport(_0x513exc){this[_0x53d8[15]]=  new Sequence();this[_0x53d8[16]]= {};this[_0x53d8[17]]= _0x513exc[_0x53d8[17]];this[_0x53d8[18]]= _0x513exc[_0x53d8[19]];this[_0x53d8[20]]= _0x513exc[_0x53d8[20]];this[_0x53d8[21]]= true;this[_0x53d8[22]]= _0x513exc[_0x53d8[22]];this[_0x53d8[23]]= {};ami[_0x53d8[27]](_0x53d8[24],this[_0x53d8[26]][_0x53d8[25]](this));ami[_0x53d8[27]](_0x53d8[28],this[_0x53d8[29]][_0x53d8[25]](this));ami[_0x53d8[27]](_0x53d8[30],this[_0x53d8[31]][_0x53d8[25]](this));ami[_0x53d8[27]](_0x53d8[32],this[_0x53d8[33]][_0x53d8[25]](this));ami[_0x53d8[27]](_0x53d8[34],this[_0x53d8[35]][_0x53d8[25]](this));ami[_0x53d8[27]](_0x53d8[36],this[_0x53d8[37]][_0x53d8[25]](this));ami[_0x53d8[27]](_0x53d8[38],this[_0x53d8[39]][_0x53d8[25]](this));ami[_0x53d8[27]](_0x53d8[40],this[_0x53d8[41]][_0x53d8[25]](this));ami[_0x53d8[27]](_0x53d8[42],this[_0x53d8[43]][_0x53d8[25]](this));ami[_0x53d8[27]](_0x53d8[44],this[_0x53d8[45]][_0x53d8[25]](this));ami[_0x53d8[27]](_0x53d8[46],this[_0x53d8[47]][_0x53d8[25]](this));ami[_0x53d8[27]](_0x53d8[48],this[_0x53d8[49]][_0x53d8[25]](this));this[_0x53d8[50]]();this[_0x53d8[51]]()}function isNotNull(_0x513exe){return _0x513exe!== null&&  !_[_0x53d8[52]](_0x513exe)}function clearChannels(_0x513ex10){if(!_[_0x53d8[53]](_0x513ex10)){for(var _0x513ex11 in _0x513ex10){if(_0x513ex10[_0x53d8[54]](_0x513ex11)){delete _0x513ex10[_0x513ex11]}}}}function clearCampaigns(_0x513ex13){if(!_[_0x53d8[53]](_0x513ex13)){for(var _0x513ex11 in _0x513ex13){if(_0x513ex13[_0x53d8[54]](_0x513ex11)){_0x513ex13[_0x513ex11][_0x53d8[55]]= 0}}}}function clearVoiceQueues(_0x513ex15){if(!_[_0x53d8[53]](_0x513ex15)){for(var _0x513ex11 in _0x513ex15){if(_0x513ex15[_0x53d8[54]](_0x513ex11)){_0x513ex15[_0x513ex11][_0x53d8[55]]= 0;_0x513ex15[_0x513ex11][_0x53d8[56]]= 0;_0x513ex15[_0x513ex11][_0x53d8[57]]= 0;_0x513ex15[_0x513ex11][_0x53d8[58]]= 0;_0x513ex15[_0x513ex11][_0x53d8[59]]= true}}}}function clearAgentBooked(_0x513ex17){if(!_[_0x53d8[53]](_0x513ex17)){for(var _0x513ex11 in _0x513ex17){if(_0x513ex17[_0x53d8[54]](_0x513ex11)){_0x513ex17[_0x513ex11][_0x53d8[60]]= true}}}}VoiceQueueReport[_0x53d8[12]][_0x53d8[61]]= function(){var _0x513ex18=this;for(var _0x513ex19 in this[_0x53d8[18]]){if(this[_0x53d8[18]][_0x53d8[54]](_0x513ex19)){this[_0x53d8[15]][_0x53d8[11]](function(){if(!_[_0x53d8[62]](_0x513ex18[_0x53d8[18]][_0x513ex19])){return ami.Action({action:_0x53d8[70],channel:_0x513ex18[_0x53d8[18]][_0x513ex19][_0x53d8[71]]})[_0x53d8[69]](function(_0x513ex1a){if(_0x513ex1a[_0x53d8[63]]=== _0x53d8[64]){setTimeout(function(){if(_0x513ex18[_0x53d8[18]][_0x513ex19]){delete _0x513ex18[_0x53d8[18]][_0x513ex19];logger[_0x53d8[66]](_0x53d8[65],_0x513ex19)};if(_0x513ex18[_0x53d8[16]][_0x513ex19]){delete _0x513ex18[_0x53d8[16]][_0x513ex19];logger[_0x53d8[66]](_0x53d8[67],_0x513ex19)};if(_0x513ex18[_0x53d8[23]][_0x513ex19]){delete _0x513ex18[_0x53d8[23]][_0x513ex19];logger[_0x53d8[66]](_0x53d8[68],_0x513ex19)}},8000)}})}})}}};VoiceQueueReport[_0x53d8[12]][_0x53d8[45]]= function(){logger[_0x53d8[66]](_0x53d8[72]);clearChannels(this[_0x53d8[18]]);this[_0x53d8[73]](this[_0x53d8[16]]);clearAgentBooked(this[_0x53d8[17]]);clearVoiceQueues(this[_0x53d8[20]]);clearCampaigns(this[_0x53d8[22]])};VoiceQueueReport[_0x53d8[12]][_0x53d8[73]]= function(_0x513ex1b){var _0x513ex18=this;if(!_[_0x53d8[53]](_0x513ex1b)){for(var _0x513ex11 in _0x513ex1b){if(_0x513ex1b[_0x53d8[54]](_0x513ex11)){_0x513ex18[_0x53d8[74]](_0x513ex1b[_0x513ex11]);delete _0x513ex1b[_0x513ex11]}}}};function loggerCatch(_0x513ex1d){return function(_0x513ex1a){logger[_0x53d8[66]](_0x513ex1d,util[_0x53d8[75]](_0x513ex1a,{showHidden:false,depth:null}))}}VoiceQueueReport[_0x53d8[12]][_0x53d8[76]]= function(_0x513ex1e,_0x513ex1f,_0x513exe){io[_0x53d8[77]](_0x513ex1e)[_0x53d8[76]](_0x513ex1f,_0x513exe)};VoiceQueueReport[_0x53d8[12]][_0x53d8[78]]= function(_0x513exe){this[_0x53d8[76]](util[_0x53d8[81]](_0x53d8[79],_0x513exe[_0x53d8[80]]),_0x53d8[82],_0x513exe)};VoiceQueueReport[_0x53d8[12]][_0x53d8[74]]= function(_0x513exe){this[_0x53d8[76]](util[_0x53d8[81]](_0x53d8[79],_0x513exe[_0x53d8[80]]),_0x53d8[83],_0x513exe)};VoiceQueueReport[_0x53d8[12]][_0x53d8[84]]= function(_0x513exe){if(_0x513exe[_0x53d8[85]]=== _0x53d8[86]){this[_0x53d8[76]](util[_0x53d8[81]](_0x53d8[79],_0x513exe[_0x53d8[80]]),_0x53d8[87],_0x513exe)}};VoiceQueueReport[_0x53d8[12]][_0x53d8[88]]= function(_0x513exe){return _0x513exe!== null&&  !_[_0x53d8[52]](_0x513exe)};VoiceQueueReport[_0x53d8[12]][_0x53d8[51]]= function(){var _0x513ex18=this;setInterval(function(){_0x513ex18[_0x53d8[61]]();ami.Action({action:_0x53d8[90]})[_0x53d8[69]](loggerCatch(_0x53d8[89]))},10000)};VoiceQueueReport[_0x53d8[12]][_0x53d8[50]]= function(){var _0x513ex18=this;setInterval(function(){if(_0x513ex18[_0x53d8[21]]){return ami.Action({action:_0x53d8[28]})[_0x53d8[92]](function(_0x513ex1f){_0x513ex18[_0x53d8[21]]= false})[_0x53d8[69]](loggerCatch(_0x53d8[91]))}},1000)};VoiceQueueReport[_0x53d8[12]][_0x53d8[29]]= function(_0x513ex1f){try{if(this[_0x53d8[88]](_0x513ex1f)&& this[_0x53d8[88]](_0x513ex1f[_0x53d8[93]])){if(this[_0x53d8[20]][_0x513ex1f[_0x53d8[93]]]){var _0x513ex20=_[_0x53d8[94]](this[_0x53d8[18]],_0x53d8[93])[_0x513ex1f[_0x53d8[93]]]|| 0;var _0x513ex21=_0x513ex20- _0x513ex1f[_0x53d8[95]];if(this[_0x53d8[20]][_0x513ex1f[_0x53d8[93]]][_0x53d8[58]]!== _[_0x53d8[96]](_0x513ex1f[_0x53d8[95]])|| this[_0x53d8[20]][_0x513ex1f[_0x53d8[93]]][_0x53d8[97]]!== _[_0x53d8[96]](_0x513ex1f[_0x53d8[98]])|| this[_0x53d8[20]][_0x513ex1f[_0x53d8[93]]][_0x53d8[99]]!== _[_0x53d8[96]](_0x513ex1f[_0x53d8[99]])|| this[_0x53d8[20]][_0x513ex1f[_0x53d8[93]]][_0x53d8[56]]!== _0x513ex21){this[_0x53d8[20]][_0x513ex1f[_0x53d8[93]]][_0x53d8[58]]= _[_0x53d8[96]](_0x513ex1f[_0x53d8[95]]);this[_0x53d8[20]][_0x513ex1f[_0x53d8[93]]][_0x53d8[97]]= _[_0x53d8[96]](_0x513ex1f[_0x53d8[98]]);this[_0x53d8[20]][_0x513ex1f[_0x53d8[93]]][_0x53d8[99]]= _[_0x53d8[96]](_0x513ex1f[_0x53d8[99]]);this[_0x53d8[20]][_0x513ex1f[_0x53d8[93]]][_0x53d8[56]]= _0x513ex21> 0?_0x513ex21:0;this[_0x53d8[20]][_0x513ex1f[_0x53d8[93]]][_0x53d8[56]]= (this[_0x53d8[20]][_0x513ex1f[_0x53d8[93]]][_0x53d8[56]]> _[_0x53d8[96]](_0x513ex1f[_0x53d8[98]]))?_[_0x53d8[96]](_0x513ex1f[_0x53d8[98]]):this[_0x53d8[20]][_0x513ex1f[_0x53d8[93]]][_0x53d8[56]];this[_0x53d8[84]](this[_0x53d8[20]][_0x513ex1f[_0x53d8[93]]])};ami[_0x53d8[76]](_0x53d8[100],this[_0x53d8[20]][_0x513ex1f[_0x53d8[93]]])}}}catch(e){logger[_0x53d8[66]](_0x53d8[101],util[_0x53d8[75]](e,{showHidden:false,depth:null}))}};VoiceQueueReport[_0x53d8[12]][_0x53d8[31]]= function(_0x513ex1f){this[_0x53d8[21]]= true};VoiceQueueReport[_0x53d8[12]][_0x53d8[26]]= function(_0x513ex1f){var _0x513ex22=true;try{if(this[_0x53d8[88]](_0x513ex1f)){if(!_[_0x53d8[52]](_0x513ex1f[_0x53d8[102]])&& _0x513ex1f[_0x53d8[102]][_0x53d8[103]]()=== _0x53d8[93]){if(_[_0x53d8[52]](this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]])){this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]]= [];this[_0x53d8[18]][_0x513ex1f[_0x53d8[104]]]= {}}else {_0x513ex22= _[_0x53d8[106]](this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]],{exten:_0x513ex1f[_0x53d8[105]]})};if(_0x513ex22){var _0x513ex23= new QueueReport();_0x513ex23[_0x53d8[80]]= _0x513ex1f[_0x53d8[109]][_0x53d8[108]](_0x53d8[107])[0];_0x513ex23[_0x53d8[85]]= this[_0x53d8[20]][_0x513ex23[_0x53d8[80]]][_0x53d8[85]]?this[_0x53d8[20]][_0x513ex23[_0x53d8[80]]][_0x53d8[85]]|| _0x53d8[86]:_0x53d8[86];_0x513ex23[_0x53d8[93]]= _0x513ex1f[_0x53d8[109]][_0x53d8[108]](_0x53d8[107])[0];_0x513ex23[_0x53d8[110]]= moment()[_0x53d8[81]](_0x53d8[111]);_[_0x53d8[114]](_0x513ex23,_[_0x53d8[113]](_0x513ex1f,_[_0x53d8[112]](_0x513ex23)));this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]][_0x53d8[115]](_0x513ex23);this[_0x53d8[18]][_0x513ex1f[_0x53d8[104]]]= _0x513ex23;this[_0x53d8[78]](_0x513ex23)}}}}catch(e){logger[_0x53d8[66]](_0x53d8[116],util[_0x53d8[75]](e,{showHidden:false,depth:null}))}};VoiceQueueReport[_0x53d8[12]][_0x53d8[33]]= function(_0x513ex1f){try{if(this[_0x53d8[88]](_0x513ex1f)){var _0x513ex23;if(_[_0x53d8[52]](this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]])){this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]]= [];this[_0x53d8[18]][_0x513ex1f[_0x53d8[104]]]= {};_0x513ex23=  new QueueReport();_[_0x53d8[114]](_0x513ex23,_[_0x53d8[113]](_0x513ex1f,_[_0x53d8[112]](_0x513ex23)));this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]][_0x53d8[115]](_0x513ex23)}else {_0x513ex23= _[_0x53d8[117]](this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]])};_0x513ex23[_0x53d8[80]]= _0x513ex1f[_0x53d8[93]];_0x513ex23[_0x53d8[85]]= this[_0x53d8[20]][_0x513ex23[_0x53d8[80]]][_0x53d8[85]]?this[_0x53d8[20]][_0x513ex23[_0x53d8[80]]][_0x53d8[85]]|| _0x53d8[86]:_0x53d8[86];_0x513ex23[_0x53d8[93]]= _0x513ex1f[_0x53d8[93]];_0x513ex23[_0x53d8[110]]= moment()[_0x53d8[81]](_0x53d8[111]);_0x513ex23[_0x53d8[118]]= _0x513ex1f[_0x53d8[118]];_0x513ex23[_0x53d8[119]]= _0x513ex1f[_0x53d8[119]];this[_0x53d8[18]][_0x513ex1f[_0x53d8[104]]]= _0x513ex23;this[_0x53d8[78]](_0x513ex23)}}catch(e){logger[_0x53d8[66]](_0x53d8[120],util[_0x53d8[75]](e,{showHidden:false,depth:null}))}};VoiceQueueReport[_0x53d8[12]][_0x53d8[35]]= function(_0x513ex1f){try{if(this[_0x53d8[88]](_0x513ex1f)){if(this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]]){var _0x513ex23=_[_0x53d8[117]](this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]]);_0x513ex23[_0x53d8[121]]= _0x513ex1f[_0x53d8[121]];_0x513ex23[_0x53d8[122]]= _0x513ex1f[_0x53d8[122]];_0x513ex23[_0x53d8[34]]= true;_0x513ex23[_0x53d8[123]]= moment()[_0x53d8[81]](_0x53d8[111]);_0x513ex23[_0x53d8[124]]= _0x53d8[125];_0x513ex23[_0x53d8[126]]= null;this[_0x53d8[18]][_0x513ex1f[_0x53d8[104]]]= _0x513ex23;this[_0x53d8[74]](_0x513ex23)}}}catch(e){logger[_0x53d8[66]](_0x53d8[127],util[_0x53d8[75]](e,{showHidden:false,depth:null}))}};VoiceQueueReport[_0x53d8[12]][_0x53d8[37]]= function(_0x513ex1f){try{if(this[_0x53d8[88]](_0x513ex1f)){if(this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]]){var _0x513ex23=_[_0x53d8[117]](this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]]);_0x513ex23[_0x53d8[128]]= moment()[_0x53d8[81]](_0x53d8[111]);_0x513ex23[_0x53d8[129]]= _0x513ex1f[_0x53d8[129]];_0x513ex23[_0x53d8[130]]= _0x513ex1f[_0x53d8[130]];this[_0x53d8[18]][_0x513ex1f[_0x53d8[104]]]= _0x513ex23;this[_0x53d8[78]](_0x513ex23)}}}catch(e){logger[_0x53d8[66]](_0x53d8[131],util[_0x53d8[75]](e,{showHidden:false,depth:null}))}};VoiceQueueReport[_0x53d8[12]][_0x53d8[39]]= function(_0x513ex1f){try{if(this[_0x53d8[88]](_0x513ex1f)){if(this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]]){var _0x513ex23=_[_0x53d8[117]](this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]]);_0x513ex23[_0x53d8[34]]= false;_0x513ex23[_0x53d8[123]]= null;_0x513ex23[_0x53d8[132]]= true;_0x513ex23[_0x53d8[126]]= _0x513ex1f[_0x53d8[133]];_0x513ex23[_0x53d8[121]]= _0x513ex1f[_0x53d8[121]];if(_0x513ex1f[_0x53d8[129]]=== _0x53d8[134]&& _[_0x53d8[137]](_0x513ex1f[_0x53d8[135]][_0x53d8[103]](),_0x53d8[136])){_0x513ex23[_0x53d8[138]]= true;_0x513ex23[_0x53d8[139]]= moment(_0x513ex23[_0x53d8[110]])[_0x53d8[141]](_0x513ex1f[_0x53d8[121]],_0x53d8[140])[_0x53d8[81]](_0x53d8[111]);_0x513ex23[_0x53d8[124]]= _0x53d8[142];_0x513ex23[_0x53d8[143]]= true;_0x513ex23[_0x53d8[144]]= _0x53d8[145];_0x513ex23[_0x53d8[146]]= _0x513ex1f[_0x53d8[147]];_0x513ex23[_0x53d8[148]]= _0x513ex1f[_0x53d8[104]];if(this[_0x53d8[17]][_0x513ex1f[_0x53d8[135]]]){_0x513ex23[_0x53d8[129]]= this[_0x53d8[17]][_0x513ex1f[_0x53d8[135]]][_0x53d8[149]];_0x513ex23[_0x53d8[130]]= this[_0x53d8[17]][_0x513ex1f[_0x53d8[135]]][_0x53d8[150]];_0x513ex23[_0x53d8[151]]= this[_0x53d8[17]][_0x513ex1f[_0x53d8[135]]][_0x53d8[149]];_0x513ex23[_0x53d8[152]]= this[_0x53d8[17]][_0x513ex1f[_0x53d8[135]]][_0x53d8[150]]}}else {_0x513ex23[_0x53d8[153]]= true;_0x513ex23[_0x53d8[154]]= moment()[_0x53d8[81]](_0x53d8[111]);_0x513ex23[_0x53d8[138]]= false;_0x513ex23[_0x53d8[139]]= null;if(_0x513ex1f[_0x53d8[155]]!== _0x53d8[143]){_0x513ex23[_0x53d8[124]]= _0x53d8[156]+ _0x513ex1f[_0x53d8[155]][_0x53d8[157]]()}};this[_0x53d8[18]][_0x513ex1f[_0x53d8[104]]]= _0x513ex23;this[_0x53d8[74]](_0x513ex23)}}}catch(e){logger[_0x53d8[66]](_0x53d8[158],util[_0x53d8[75]](e,{showHidden:false,depth:null}))}};VoiceQueueReport[_0x53d8[12]][_0x53d8[41]]= function(_0x513ex1f){try{if(this[_0x53d8[88]](_0x513ex1f)){this[_0x53d8[161]](_0x513ex1f[_0x53d8[104]],_[_0x53d8[112]](_0x513ex1f[_0x53d8[159]])[0],_0x513ex1f[_0x53d8[160]]);if(this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]]){var _0x513ex23=_[_0x53d8[117]](this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]]);if(this[_0x53d8[88]](_0x513ex1f[_0x53d8[159]])&& this[_0x53d8[88]](_0x513ex1f[_0x53d8[159]][_0x53d8[162]])){switch(_0x513ex1f[_0x53d8[160]]){case _0x53d8[163]:_0x513ex23[_0x53d8[138]]= false;_0x513ex23[_0x53d8[139]]= null;break;default:_0x513ex23[_0x53d8[138]]= true;_0x513ex23[_0x53d8[139]]= moment()[_0x53d8[81]](_0x53d8[111]);_0x513ex23[_0x53d8[128]]= moment()[_0x53d8[81]](_0x53d8[111])};_0x513ex23[_0x53d8[34]]= false;_0x513ex23[_0x53d8[123]]= null;_0x513ex23[_0x53d8[124]]= _0x513ex1f[_0x53d8[160]];this[_0x53d8[18]][_0x513ex1f[_0x53d8[104]]]= _0x513ex23;this[_0x53d8[74]](_0x513ex23)}else {if(this[_0x53d8[88]](_0x513ex1f[_0x53d8[159]])&& this[_0x53d8[88]](_0x513ex1f[_0x53d8[159]][_0x53d8[164]])){if(!_0x513ex23[_0x53d8[34]]){_0x513ex23[_0x53d8[138]]= true;_0x513ex23[_0x53d8[139]]= moment()[_0x53d8[81]](_0x53d8[111]);_0x513ex23[_0x53d8[124]]= _0x53d8[165];_0x513ex23[_0x53d8[128]]= moment()[_0x53d8[81]](_0x53d8[111]);this[_0x53d8[18]][_0x513ex1f[_0x53d8[104]]]= _0x513ex23}}};_0x513ex23[_0x53d8[23]]= this[_0x53d8[23]][_0x513ex1f[_0x53d8[104]]]}}}catch(e){logger[_0x53d8[66]](_0x53d8[166],util[_0x53d8[75]](e,{showHidden:false,depth:null}))}};VoiceQueueReport[_0x53d8[12]][_0x53d8[161]]= function(_0x513ex19,_0x513ex24,_0x513ex25){if(_[_0x53d8[52]](this[_0x53d8[23]][_0x513ex19])){this[_0x53d8[23]][_0x513ex19]= {}};this[_0x53d8[23]][_0x513ex19][_0x513ex24]= _0x513ex25};VoiceQueueReport[_0x53d8[12]][_0x53d8[43]]= function(_0x513ex1f){try{if(this[_0x53d8[88]](_0x513ex1f)){if(this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]]){for(var _0x513ex26=0,_0x513ex23={};_0x513ex26< this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]][_0x53d8[167]];_0x513ex26+= 1){_0x513ex23= this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]][_0x513ex26];if(this[_0x53d8[20]][_0x513ex23[_0x53d8[93]]]){if(_0x513ex23[_0x53d8[138]]){this[_0x53d8[20]][_0x513ex23[_0x53d8[93]]][_0x53d8[168]]+= 1};this[_0x53d8[20]][_0x513ex23[_0x53d8[93]]][_0x53d8[169]]+= moment(_0x513ex23[_0x53d8[128]])[_0x53d8[170]](_0x513ex23[_0x53d8[110]],_0x53d8[140]);if(_0x513ex26=== this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]][_0x53d8[167]]- 1){this[_0x53d8[20]][_0x513ex23[_0x53d8[93]]][_0x53d8[171]]+= moment()[_0x53d8[172]](0)[_0x53d8[170]](_0x513ex23[_0x53d8[110]],_0x53d8[140]);this[_0x53d8[20]][_0x513ex23[_0x53d8[93]]][_0x53d8[173]]+= 1;if(_0x513ex23[_0x53d8[153]]){this[_0x53d8[20]][_0x513ex23[_0x53d8[93]]][_0x53d8[174]]+= 1;this[_0x53d8[20]][_0x513ex23[_0x53d8[93]]][_0x53d8[175]]+= moment()[_0x53d8[172]](0)[_0x53d8[170]](_0x513ex23[_0x53d8[128]],_0x53d8[140])};if(_0x513ex23[_0x53d8[34]]){_0x513ex23[_0x53d8[176]]= _0x53d8[177];ami[_0x53d8[76]](_0x53d8[178],_0x513ex23)};if(_0x513ex23[_0x53d8[138]]){_0x513ex23[_0x53d8[176]]= _0x53d8[168];ami[_0x53d8[76]](_0x53d8[179],_0x513ex23)}}else {this[_0x53d8[20]][_0x513ex23[_0x53d8[93]]][_0x53d8[171]]+= this[_0x53d8[20]][_0x513ex23[_0x53d8[93]]][_0x53d8[169]]};this[_0x53d8[18]][_0x513ex1f[_0x53d8[104]]]= _0x513ex23;this[_0x53d8[74]](_0x513ex23)}};ami[_0x53d8[76]](_0x53d8[180],this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]]);delete this[_0x53d8[16]][_0x513ex1f[_0x53d8[104]]];delete this[_0x53d8[18]][_0x513ex1f[_0x53d8[104]]]};if(this[_0x53d8[23]][_0x513ex1f[_0x53d8[104]]]){delete this[_0x53d8[23]][_0x513ex1f[_0x53d8[104]]]}}}catch(e){logger[_0x53d8[66]](_0x53d8[181],util[_0x53d8[75]](e,{showHidden:false,depth:null}))}};VoiceQueueReport[_0x53d8[12]][_0x53d8[47]]= function(_0x513ex1f){try{if(this[_0x53d8[88]](_0x513ex1f)){if(this[_0x53d8[16]][_0x513ex1f[_0x53d8[182]]]){var _0x513ex23=_[_0x53d8[117]](this[_0x53d8[16]][_0x513ex1f[_0x53d8[182]]]);_0x513ex23[_0x53d8[124]]= _0x53d8[183];_0x513ex23[_0x53d8[143]]= true;_0x513ex23[_0x53d8[144]]= _0x53d8[184];_0x513ex23[_0x53d8[146]]= _0x513ex1f[_0x53d8[185]];_0x513ex23[_0x53d8[148]]= _0x513ex1f[_0x53d8[186]]}}}catch(e){logger[_0x53d8[66]](_0x53d8[187],util[_0x53d8[75]](e,{showHidden:false,depth:null}))}};VoiceQueueReport[_0x53d8[12]][_0x53d8[49]]= function(_0x513ex1f){try{if(this[_0x53d8[88]](_0x513ex1f)){if(this[_0x53d8[16]][_0x513ex1f[_0x53d8[182]]]){var _0x513ex23=_[_0x53d8[117]](this[_0x53d8[16]][_0x513ex1f[_0x53d8[182]]]);_0x513ex23[_0x53d8[124]]= _0x53d8[188];_0x513ex23[_0x53d8[143]]= true;_0x513ex23[_0x53d8[144]]= _0x53d8[189];_0x513ex23[_0x53d8[146]]= _0x513ex1f[_0x53d8[190]];_0x513ex23[_0x53d8[148]]= _0x513ex1f[_0x53d8[182]]}}}catch(e){logger[_0x53d8[66]](_0x53d8[191],util[_0x53d8[75]](e,{showHidden:false,depth:null}))}};module[_0x53d8[192]]= VoiceQueueReport
\ No newline at end of file
index ca5aff9..63a101b 100644 (file)
@@ -1 +1 @@
-var _0x8ae2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79","\x63\x61\x6D\x70\x61\x69\x67\x6E","\x71\x75\x65\x75\x65","\x43\x72\x65\x61\x74\x65\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77"];_0x8ae2[0];var client=require(_0x8ae2[1]);exports[_0x8ae2[2]]= function(_0xef46x2){return function(){_0xef46x2[_0x8ae2[3]]= _0xef46x2[_0x8ae2[4]];return client.Request(_0x8ae2[5],{body:_0xef46x2,log:_0x8ae2[5]})}}
\ No newline at end of file
+var _0xcf79=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79","\x63\x61\x6D\x70\x61\x69\x67\x6E","\x71\x75\x65\x75\x65","\x43\x72\x65\x61\x74\x65\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x50\x72\x65\x76\x69\x65\x77"];_0xcf79[0];var client=require(_0xcf79[1]);exports[_0xcf79[2]]= function(_0xf080x2){return function(){_0xf080x2[_0xcf79[3]]= _0xf080x2[_0xcf79[4]];return client.Request(_0xcf79[5],{body:_0xf080x2,log:_0xcf79[5]})}}
\ No newline at end of file
index 3f80d09..01f771d 100644 (file)
@@ -1 +1 @@
-var _0xa1be=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74"];_0xa1be[0];var client=require(_0xa1be[1]);exports[_0xa1be[2]]= function(_0xb761x2){return client.Request(_0xa1be[3],{body:_0xb761x2,log:_0xa1be[3]})}
\ No newline at end of file
+var _0x55c9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74"];_0x55c9[0];var client=require(_0x55c9[1]);exports[_0x55c9[2]]= function(_0x6184x2){return client.Request(_0x55c9[3],{body:_0x6184x2,log:_0x55c9[3]})}
\ No newline at end of file
index 9901ac9..3864b5d 100644 (file)
@@ -1 +1 @@
-var _0xab69=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x73","\x47\x65\x74\x43\x61\x6D\x70\x61\x69\x67\x6E","\x69\x64","\x6E\x61\x6D\x65","\x74\x79\x70\x65","\x61\x63\x74\x69\x76\x65","\x6C\x69\x6D\x69\x74\x43\x61\x6C\x6C\x73","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x61\x6D\x65","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x75\x6D\x62\x65\x72","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x54\x69\x6D\x65\x6F\x75\x74","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x42\x75\x73\x79\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x42\x75\x73\x79\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x54\x69\x6D\x65\x7A\x6F\x6E\x65","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x49\x6E\x74\x65\x72\x76\x61\x6C","\x64\x69\x61\x6C\x41\x4D\x44\x41\x63\x74\x69\x76\x65","\x64\x69\x61\x6C\x41\x4D\x44\x49\x6E\x69\x74\x69\x61\x6C\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x47\x72\x65\x65\x74\x69\x6E\x67","\x64\x69\x61\x6C\x41\x4D\x44\x41\x66\x74\x65\x72\x47\x72\x65\x65\x74\x69\x6E\x67\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x54\x6F\x74\x61\x6C\x41\x6E\x61\x6C\x79\x73\x69\x73\x54\x69\x6D\x65","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x69\x6E\x57\x6F\x72\x64\x4C\x65\x6E\x67\x74\x68","\x64\x69\x61\x6C\x41\x4D\x44\x42\x65\x74\x77\x65\x65\x6E\x57\x6F\x72\x64\x73\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x61\x78\x69\x6D\x75\x6D\x4E\x75\x6D\x62\x65\x72\x4F\x66\x57\x6F\x72\x64\x73","\x64\x69\x61\x6C\x41\x4D\x44\x53\x69\x6C\x65\x6E\x63\x65\x54\x68\x72\x65\x73\x68\x6F\x6C\x64","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x61\x78\x69\x6D\x75\x6D\x57\x6F\x72\x64\x4C\x65\x6E\x67\x74\x68","\x64\x69\x61\x6C\x4F\x72\x64\x65\x72\x42\x79\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x64\x69\x61\x6C\x50\x72\x65\x66\x69\x78","\x54\x72\x75\x6E\x6B","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x54\x72\x75\x6E\x6B\x42\x61\x63\x6B\x75\x70","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x67\x65\x74\x43\x61\x6D\x70\x61\x69\x67\x6E"];_0xab69[0];var client=require(_0xab69[1]);exports[_0xab69[2]]= function(){return function(){return client.Request(_0xab69[3],{options:{raw:false,attributes:[_0xab69[4],_0xab69[5],_0xab69[6],_0xab69[7],_0xab69[8],_0xab69[9],_0xab69[10],_0xab69[11],_0xab69[12],_0xab69[13],_0xab69[14],_0xab69[15],_0xab69[16],_0xab69[17],_0xab69[18],_0xab69[19],_0xab69[20],_0xab69[21],_0xab69[22],_0xab69[23],_0xab69[24],_0xab69[25],_0xab69[26],_0xab69[27],_0xab69[28],_0xab69[29],_0xab69[30],_0xab69[31],_0xab69[32]],include:[{model:_0xab69[33],as:_0xab69[33],attributes:[_0xab69[4],_0xab69[5],_0xab69[34],_0xab69[7]]},{model:_0xab69[33],as:_0xab69[35],attributes:[_0xab69[4],_0xab69[5],_0xab69[34],_0xab69[7]]},{model:_0xab69[36],as:_0xab69[36],attributes:[_0xab69[4],_0xab69[5]],include:[{model:_0xab69[36],as:_0xab69[37],attributes:[_0xab69[4],_0xab69[5],_0xab69[38]]}]},{model:_0xab69[39],as:_0xab69[39],attributes:[_0xab69[4],_0xab69[5]]}]},log:_0xab69[40]})}}
\ No newline at end of file
+var _0x3bbe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x73","\x47\x65\x74\x43\x61\x6D\x70\x61\x69\x67\x6E","\x69\x64","\x6E\x61\x6D\x65","\x74\x79\x70\x65","\x61\x63\x74\x69\x76\x65","\x6C\x69\x6D\x69\x74\x43\x61\x6C\x6C\x73","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x61\x6D\x65","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x75\x6D\x62\x65\x72","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x54\x69\x6D\x65\x6F\x75\x74","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x42\x75\x73\x79\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x42\x75\x73\x79\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x54\x69\x6D\x65\x7A\x6F\x6E\x65","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x49\x6E\x74\x65\x72\x76\x61\x6C","\x64\x69\x61\x6C\x41\x4D\x44\x41\x63\x74\x69\x76\x65","\x64\x69\x61\x6C\x41\x4D\x44\x49\x6E\x69\x74\x69\x61\x6C\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x47\x72\x65\x65\x74\x69\x6E\x67","\x64\x69\x61\x6C\x41\x4D\x44\x41\x66\x74\x65\x72\x47\x72\x65\x65\x74\x69\x6E\x67\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x54\x6F\x74\x61\x6C\x41\x6E\x61\x6C\x79\x73\x69\x73\x54\x69\x6D\x65","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x69\x6E\x57\x6F\x72\x64\x4C\x65\x6E\x67\x74\x68","\x64\x69\x61\x6C\x41\x4D\x44\x42\x65\x74\x77\x65\x65\x6E\x57\x6F\x72\x64\x73\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x61\x78\x69\x6D\x75\x6D\x4E\x75\x6D\x62\x65\x72\x4F\x66\x57\x6F\x72\x64\x73","\x64\x69\x61\x6C\x41\x4D\x44\x53\x69\x6C\x65\x6E\x63\x65\x54\x68\x72\x65\x73\x68\x6F\x6C\x64","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x61\x78\x69\x6D\x75\x6D\x57\x6F\x72\x64\x4C\x65\x6E\x67\x74\x68","\x64\x69\x61\x6C\x4F\x72\x64\x65\x72\x42\x79\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x64\x69\x61\x6C\x50\x72\x65\x66\x69\x78","\x54\x72\x75\x6E\x6B","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x54\x72\x75\x6E\x6B\x42\x61\x63\x6B\x75\x70","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x67\x65\x74\x43\x61\x6D\x70\x61\x69\x67\x6E"];_0x3bbe[0];var client=require(_0x3bbe[1]);exports[_0x3bbe[2]]= function(){return function(){return client.Request(_0x3bbe[3],{options:{raw:false,attributes:[_0x3bbe[4],_0x3bbe[5],_0x3bbe[6],_0x3bbe[7],_0x3bbe[8],_0x3bbe[9],_0x3bbe[10],_0x3bbe[11],_0x3bbe[12],_0x3bbe[13],_0x3bbe[14],_0x3bbe[15],_0x3bbe[16],_0x3bbe[17],_0x3bbe[18],_0x3bbe[19],_0x3bbe[20],_0x3bbe[21],_0x3bbe[22],_0x3bbe[23],_0x3bbe[24],_0x3bbe[25],_0x3bbe[26],_0x3bbe[27],_0x3bbe[28],_0x3bbe[29],_0x3bbe[30],_0x3bbe[31],_0x3bbe[32]],include:[{model:_0x3bbe[33],as:_0x3bbe[33],attributes:[_0x3bbe[4],_0x3bbe[5],_0x3bbe[34],_0x3bbe[7]]},{model:_0x3bbe[33],as:_0x3bbe[35],attributes:[_0x3bbe[4],_0x3bbe[5],_0x3bbe[34],_0x3bbe[7]]},{model:_0x3bbe[36],as:_0x3bbe[36],attributes:[_0x3bbe[4],_0x3bbe[5]],include:[{model:_0x3bbe[36],as:_0x3bbe[37],attributes:[_0x3bbe[4],_0x3bbe[5],_0x3bbe[38]]}]},{model:_0x3bbe[39],as:_0x3bbe[39],attributes:[_0x3bbe[4],_0x3bbe[5]]}]},log:_0x3bbe[40]})}}
\ No newline at end of file
index e866feb..0852c3a 100644 (file)
@@ -1 +1 @@
-var _0x6ef8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x74\x61\x63\x74","\x43\x72\x65\x61\x74\x65\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x73\x68\x6F\x77\x43\x6F\x6E\x74\x61\x63\x74","\x53\x68\x6F\x77\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74"];_0x6ef8[0];var client=require(_0x6ef8[1]);exports[_0x6ef8[2]]= function(_0xfd35x2){return function(){return client.Request(_0x6ef8[3],{body:_0xfd35x2,log:_0x6ef8[3]})}};exports[_0x6ef8[4]]= function(_0xfd35x3){return function(){return client.Request(_0x6ef8[5],{options:_0xfd35x3,log:_0x6ef8[5]})}}
\ No newline at end of file
+var _0xb147=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x74\x61\x63\x74","\x43\x72\x65\x61\x74\x65\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x73\x68\x6F\x77\x43\x6F\x6E\x74\x61\x63\x74","\x53\x68\x6F\x77\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74"];_0xb147[0];var client=require(_0xb147[1]);exports[_0xb147[2]]= function(_0xedc0x2){return function(){return client.Request(_0xb147[3],{body:_0xedc0x2,log:_0xb147[3]})}};exports[_0xb147[4]]= function(_0xedc0x3){return function(){return client.Request(_0xb147[5],{options:_0xedc0x3,log:_0xb147[5]})}}
\ No newline at end of file
index 350eb4a..702c2f1 100644 (file)
@@ -1 +1 @@
-var _0x13fa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x47\x65\x74\x43\x6D\x48\x6F\x70\x70\x65\x72","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x67\x65\x74\x43\x6D\x48\x6F\x70\x70\x65\x72","\x75\x70\x64\x61\x74\x65\x43\x6F\x6E\x74\x61\x63\x74\x73","\x55\x70\x64\x61\x74\x65\x43\x6D\x48\x6F\x70\x70\x65\x72","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x64\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x74\x61\x63\x74","\x44\x65\x73\x74\x72\x6F\x79\x43\x6D\x48\x6F\x70\x70\x65\x72","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72","\x47\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72","\x70\x72\x69\x6F\x72\x69\x74\x79","\x44\x45\x53\x43","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x69\x64","\x41\x53\x43","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72\x49\x76\x72","\x47\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72\x49\x76\x72","\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x64\x44\x69\x61\x6C\x65\x72","\x63\x61\x6D\x70\x61\x69\x67\x6E","\x71\x75\x65\x75\x65","\x4D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x64\x44\x69\x61\x6C\x65\x72","\x63\x6F\x75\x6E\x74\x52\x65\x53\x63\x68\x65\x64\x75\x6C\x65\x64","\x43\x6F\x75\x6E\x74\x52\x65\x53\x63\x68\x65\x64\x75\x6C\x65\x64","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x50\x72\x65\x76\x69\x65\x77","\x55\x73\x65\x72","\x41\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x51\x75\x65\x75\x65","\x75\x6E\x6C\x6F\x63\x6B\x43\x6F\x6E\x74\x61\x63\x74","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x52\x65\x63\x61\x6C\x6C\x4D\x65","\x47\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x52\x65\x63\x61\x6C\x6C\x4D\x65","\x64\x62\x2E\x43\x6D\x48\x6F\x70\x70\x65\x72\x2E\x55\x73\x65\x72\x49\x64"];_0x13fa[0];var client=require(_0x13fa[1]);var moment=require(_0x13fa[2]);var _=require(_0x13fa[3]);exports[_0x13fa[4]]= function(_0x9d6cx4,_0x9d6cx5){return function(){return client.Request(_0x13fa[5],{options:{where:{VoiceQueueId:_0x9d6cx4},include:[{model:_0x13fa[6],as:_0x13fa[7]}],limit:_0x9d6cx5,raw:false},log:_0x13fa[8]})}};exports[_0x13fa[9]]= function(_0x9d6cx6,_0x9d6cx4,_0x9d6cx5){return function(){return client.Request(_0x13fa[10],{body:_0x9d6cx6,options:{where:{VoiceQueueId:_0x9d6cx4,scheduledat:{$lte:moment()[_0x13fa[12]](_0x13fa[11])}},limit:_0x9d6cx5},log:_0x13fa[10]})}};exports[_0x13fa[13]]= function(_0x9d6cx6){return function(){return client.Request(_0x13fa[10],{body:_0x9d6cx6,options:{where:{ContactId:_0x9d6cx6[_0x13fa[14]],ListId:_0x9d6cx6[_0x13fa[15]],VoiceQueueId:_0x9d6cx6[_0x13fa[16]],CampaignId:_0x9d6cx6[_0x13fa[17]]}},log:_0x13fa[13]})}};exports[_0x13fa[18]]= function(_0x9d6cx4,_0x9d6cx7,_0x9d6cx8){return function(){return client.Request(_0x13fa[19],{options:{where:{VoiceQueueId:_0x9d6cx4,ListId:_0x9d6cx7,ContactId:_0x9d6cx8}},log:_0x13fa[19]})}};exports[_0x13fa[20]]= function(_0x9d6cx4,_0x9d6cx9,_0x9d6cx5,_0x9d6cxa){return function(){return client.Request(_0x13fa[21],{body:{active:true},options:{where:{VoiceQueueId:_0x9d6cx4,active:false,scheduledat:{$lte:moment()[_0x13fa[12]](_0x13fa[11])},$or:[{UserId:null},{UserId:{$in:_0x9d6cx9}}]},include:[{model:_0x13fa[6],as:_0x13fa[7]}],order:[[_0x13fa[22],_0x13fa[23]],[_0x13fa[24],_0x9d6cxa],[_0x13fa[25],_0x13fa[26]]],raw:true,limit:_0x9d6cx5},log:_0x13fa[21]})}};exports[_0x13fa[27]]= function(_0x9d6cxb,_0x9d6cx5,_0x9d6cxa){return function(){return client.Request(_0x13fa[21],{body:{active:true},options:{where:{CampaignId:_0x9d6cxb,active:false,scheduledat:{$lte:moment()[_0x13fa[12]](_0x13fa[11])}},include:[{model:_0x13fa[6],as:_0x13fa[7]}],order:[[_0x13fa[22],_0x13fa[23]],[_0x13fa[24],_0x9d6cxa],[_0x13fa[25],_0x13fa[26]]],raw:true,limit:_0x9d6cx5},log:_0x13fa[28]})}};exports[_0x13fa[29]]= function(_0x9d6cx6,_0x9d6cxc){return function(){_0x9d6cx6[_0x13fa[30]]= _0x9d6cx6[_0x13fa[31]];return client.Request(_0x13fa[32],{body:_0x9d6cx6,options:{where:{ContactId:_0x9d6cx6[_0x13fa[14]],ListId:_0x9d6cx6[_0x13fa[15]],VoiceQueueId:_0x9d6cx6[_0x13fa[16]],CampaignId:_0x9d6cx6[_0x13fa[17]],active:_0x9d6cxc?undefined:true}},log:_0x13fa[32]})}};exports[_0x13fa[33]]= function(_0x9d6cxd){return function(){return client.Request(_0x13fa[34],{options:{where:{VoiceQueueId:_0x9d6cxd[_0x13fa[25]]?_0x9d6cxd[_0x13fa[25]]|| null:null}},log:_0x13fa[33]})}};exports[_0x13fa[35]]= function(_0x9d6cxe){return function(){return client.Request(_0x13fa[5],{options:{where:{id:_0x9d6cxe},include:[{model:_0x13fa[6],as:_0x13fa[7]},{model:_0x13fa[36],as:_0x13fa[37],attributes:[_0x13fa[25],_0x13fa[38]]},{model:_0x13fa[39],as:_0x13fa[40],attributes:[_0x13fa[25],_0x13fa[38]]}],raw:true},log:_0x13fa[8]})}};exports[_0x13fa[41]]= function(_0x9d6cx6,_0x9d6cxf,_0x9d6cx5){return function(){return client.Request(_0x13fa[10],{body:_0x9d6cx6,options:{where:{id:_0x9d6cxf},limit:_0x9d6cx5},log:_0x13fa[10]})}};exports[_0x13fa[42]]= function(_0x9d6cx10,_0x9d6cx11){return function(){return client.Request(_0x13fa[43],{body:{active:true},options:{where:{VoiceQueueId:_0x9d6cx10,active:false,recallme:true,scheduledat:{$lte:moment()[_0x13fa[12]](_0x13fa[11])},UserId:{$in:_0x9d6cx11}},order:[[_0x13fa[22],_0x13fa[23]],[_0x13fa[24],_0x13fa[23]],[_0x13fa[25],_0x13fa[26]]],include:[{model:_0x13fa[6],as:_0x13fa[7]}],group:_0x13fa[44],raw:true},log:_0x13fa[21]})}}
\ No newline at end of file
+var _0xe78c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x47\x65\x74\x43\x6D\x48\x6F\x70\x70\x65\x72","\x43\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x67\x65\x74\x43\x6D\x48\x6F\x70\x70\x65\x72","\x75\x70\x64\x61\x74\x65\x43\x6F\x6E\x74\x61\x63\x74\x73","\x55\x70\x64\x61\x74\x65\x43\x6D\x48\x6F\x70\x70\x65\x72","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x72\x65\x73\x63\x68\x65\x64\x75\x6C\x65\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6E\x74\x61\x63\x74\x49\x64","\x4C\x69\x73\x74\x49\x64","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x64\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x74\x61\x63\x74","\x44\x65\x73\x74\x72\x6F\x79\x43\x6D\x48\x6F\x70\x70\x65\x72","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72","\x47\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72","\x70\x72\x69\x6F\x72\x69\x74\x79","\x44\x45\x53\x43","\x73\x63\x68\x65\x64\x75\x6C\x65\x64\x61\x74","\x69\x64","\x41\x53\x43","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72\x49\x76\x72","\x47\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x44\x69\x61\x6C\x65\x72\x49\x76\x72","\x6D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x64\x44\x69\x61\x6C\x65\x72","\x63\x61\x6D\x70\x61\x69\x67\x6E","\x71\x75\x65\x75\x65","\x4D\x6F\x76\x65\x43\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x64\x44\x69\x61\x6C\x65\x72","\x63\x6F\x75\x6E\x74\x52\x65\x53\x63\x68\x65\x64\x75\x6C\x65\x64","\x43\x6F\x75\x6E\x74\x52\x65\x53\x63\x68\x65\x64\x75\x6C\x65\x64","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x50\x72\x65\x76\x69\x65\x77","\x55\x73\x65\x72","\x41\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x51\x75\x65\x75\x65","\x75\x6E\x6C\x6F\x63\x6B\x43\x6F\x6E\x74\x61\x63\x74","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x52\x65\x63\x61\x6C\x6C\x4D\x65","\x47\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x52\x65\x63\x61\x6C\x6C\x4D\x65","\x64\x62\x2E\x43\x6D\x48\x6F\x70\x70\x65\x72\x2E\x55\x73\x65\x72\x49\x64"];_0xe78c[0];var client=require(_0xe78c[1]);var moment=require(_0xe78c[2]);var _=require(_0xe78c[3]);exports[_0xe78c[4]]= function(_0x4573x4,_0x4573x5){return function(){return client.Request(_0xe78c[5],{options:{where:{VoiceQueueId:_0x4573x4},include:[{model:_0xe78c[6],as:_0xe78c[7]}],limit:_0x4573x5,raw:false},log:_0xe78c[8]})}};exports[_0xe78c[9]]= function(_0x4573x6,_0x4573x4,_0x4573x5){return function(){return client.Request(_0xe78c[10],{body:_0x4573x6,options:{where:{VoiceQueueId:_0x4573x4,scheduledat:{$lte:moment()[_0xe78c[12]](_0xe78c[11])}},limit:_0x4573x5},log:_0xe78c[10]})}};exports[_0xe78c[13]]= function(_0x4573x6){return function(){return client.Request(_0xe78c[10],{body:_0x4573x6,options:{where:{ContactId:_0x4573x6[_0xe78c[14]],ListId:_0x4573x6[_0xe78c[15]],VoiceQueueId:_0x4573x6[_0xe78c[16]],CampaignId:_0x4573x6[_0xe78c[17]]}},log:_0xe78c[13]})}};exports[_0xe78c[18]]= function(_0x4573x4,_0x4573x7,_0x4573x8){return function(){return client.Request(_0xe78c[19],{options:{where:{VoiceQueueId:_0x4573x4,ListId:_0x4573x7,ContactId:_0x4573x8}},log:_0xe78c[19]})}};exports[_0xe78c[20]]= function(_0x4573x4,_0x4573x9,_0x4573x5,_0x4573xa){return function(){return client.Request(_0xe78c[21],{body:{active:true},options:{where:{VoiceQueueId:_0x4573x4,active:false,scheduledat:{$lte:moment()[_0xe78c[12]](_0xe78c[11])},$or:[{UserId:null},{UserId:{$in:_0x4573x9}}]},include:[{model:_0xe78c[6],as:_0xe78c[7]}],order:[[_0xe78c[22],_0xe78c[23]],[_0xe78c[24],_0x4573xa],[_0xe78c[25],_0xe78c[26]]],raw:true,limit:_0x4573x5},log:_0xe78c[21]})}};exports[_0xe78c[27]]= function(_0x4573xb,_0x4573x5,_0x4573xa){return function(){return client.Request(_0xe78c[21],{body:{active:true},options:{where:{CampaignId:_0x4573xb,active:false,scheduledat:{$lte:moment()[_0xe78c[12]](_0xe78c[11])}},include:[{model:_0xe78c[6],as:_0xe78c[7]}],order:[[_0xe78c[22],_0xe78c[23]],[_0xe78c[24],_0x4573xa],[_0xe78c[25],_0xe78c[26]]],raw:true,limit:_0x4573x5},log:_0xe78c[28]})}};exports[_0xe78c[29]]= function(_0x4573x6,_0x4573xc){return function(){_0x4573x6[_0xe78c[30]]= _0x4573x6[_0xe78c[31]];return client.Request(_0xe78c[32],{body:_0x4573x6,options:{where:{ContactId:_0x4573x6[_0xe78c[14]],ListId:_0x4573x6[_0xe78c[15]],VoiceQueueId:_0x4573x6[_0xe78c[16]],CampaignId:_0x4573x6[_0xe78c[17]],active:_0x4573xc?undefined:true}},log:_0xe78c[32]})}};exports[_0xe78c[33]]= function(_0x4573xd){return function(){return client.Request(_0xe78c[34],{options:{where:{VoiceQueueId:_0x4573xd[_0xe78c[25]]?_0x4573xd[_0xe78c[25]]|| null:null}},log:_0xe78c[33]})}};exports[_0xe78c[35]]= function(_0x4573xe){return function(){return client.Request(_0xe78c[5],{options:{where:{id:_0x4573xe},include:[{model:_0xe78c[6],as:_0xe78c[7]},{model:_0xe78c[36],as:_0xe78c[37],attributes:[_0xe78c[25],_0xe78c[38]]},{model:_0xe78c[39],as:_0xe78c[40],attributes:[_0xe78c[25],_0xe78c[38]]}],raw:true},log:_0xe78c[8]})}};exports[_0xe78c[41]]= function(_0x4573x6,_0x4573xf,_0x4573x5){return function(){return client.Request(_0xe78c[10],{body:_0x4573x6,options:{where:{id:_0x4573xf},limit:_0x4573x5},log:_0xe78c[10]})}};exports[_0xe78c[42]]= function(_0x4573x10,_0x4573x11){return function(){return client.Request(_0xe78c[43],{body:{active:true},options:{where:{VoiceQueueId:_0x4573x10,active:false,recallme:true,scheduledat:{$lte:moment()[_0xe78c[12]](_0xe78c[11])},UserId:{$in:_0x4573x11}},order:[[_0xe78c[22],_0xe78c[23]],[_0xe78c[24],_0xe78c[23]],[_0xe78c[25],_0xe78c[26]]],include:[{model:_0xe78c[6],as:_0xe78c[7]}],group:_0xe78c[44],raw:true},log:_0xe78c[21]})}}
\ No newline at end of file
index 4af5b2e..0cdf86a 100644 (file)
@@ -1 +1 @@
-var _0xca1f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x68\x65\x63\x6B\x49\x73\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74","\x47\x65\x74\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x70\x68\x6F\x6E\x65","\x43\x6F\x6E\x74\x61\x63\x74","\x63\x68\x65\x63\x6B\x49\x73\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x49\x76\x72","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x47\x65\x74\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x49\x76\x72"];_0xca1f[0];var client=require(_0xca1f[1]);exports[_0xca1f[2]]= function(_0x98fdx2){return function(){return client.Request(_0xca1f[3],{options:{where:{VoiceQueueId:_0x98fdx2[_0xca1f[4]],phone:_0x98fdx2[_0xca1f[6]][_0xca1f[5]]},raw:false},log:_0xca1f[3]})}};exports[_0xca1f[7]]= function(_0x98fdx2){return function(){return client.Request(_0xca1f[3],{options:{where:{CampaignId:_0x98fdx2[_0xca1f[8]],phone:_0x98fdx2[_0xca1f[6]][_0xca1f[5]]},raw:false},log:_0xca1f[9]})}}
\ No newline at end of file
+var _0x1c91=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x68\x65\x63\x6B\x49\x73\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74","\x47\x65\x74\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x49\x64","\x70\x68\x6F\x6E\x65","\x43\x6F\x6E\x74\x61\x63\x74","\x63\x68\x65\x63\x6B\x49\x73\x42\x6C\x61\x63\x6B\x4C\x69\x73\x74\x49\x76\x72","\x43\x61\x6D\x70\x61\x69\x67\x6E\x49\x64","\x47\x65\x74\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x49\x76\x72"];_0x1c91[0];var client=require(_0x1c91[1]);exports[_0x1c91[2]]= function(_0xf753x2){return function(){return client.Request(_0x1c91[3],{options:{where:{VoiceQueueId:_0xf753x2[_0x1c91[4]],phone:_0xf753x2[_0x1c91[6]][_0x1c91[5]]},raw:false},log:_0x1c91[3]})}};exports[_0x1c91[7]]= function(_0xf753x2){return function(){return client.Request(_0x1c91[3],{options:{where:{CampaignId:_0xf753x2[_0x1c91[8]],phone:_0xf753x2[_0x1c91[6]][_0x1c91[5]]},raw:false},log:_0x1c91[9]})}}
\ No newline at end of file
index f64b242..a726505 100644 (file)
@@ -1 +1 @@
-var _0x4f74=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x74\x61\x63\x74","\x63\x61\x6D\x70\x61\x69\x67\x6E","\x71\x75\x65\x75\x65","\x43\x72\x65\x61\x74\x65\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C"];_0x4f74[0];var client=require(_0x4f74[1]);exports[_0x4f74[2]]= function(_0xac17x2){return function(){_0xac17x2[_0x4f74[3]]= _0xac17x2[_0x4f74[4]];return client.Request(_0x4f74[5],{body:_0xac17x2,log:_0x4f74[5]})}}
\ No newline at end of file
+var _0xfe1f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x74\x61\x63\x74","\x63\x61\x6D\x70\x61\x69\x67\x6E","\x71\x75\x65\x75\x65","\x43\x72\x65\x61\x74\x65\x43\x6D\x48\x6F\x70\x70\x65\x72\x46\x69\x6E\x61\x6C"];_0xfe1f[0];var client=require(_0xfe1f[1]);exports[_0xfe1f[2]]= function(_0xa958x2){return function(){_0xa958x2[_0xfe1f[3]]= _0xa958x2[_0xfe1f[4]];return client.Request(_0xfe1f[5],{body:_0xa958x2,log:_0xfe1f[5]})}}
\ No newline at end of file
index 52af8a7..4ca82a7 100644 (file)
@@ -1 +1 @@
-var _0x3eb3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x6D\x6F\x6D\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79","\x63\x61\x6D\x70\x61\x69\x67\x6E","\x71\x75\x65\x75\x65","\x43\x72\x65\x61\x74\x65\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x61\x76\x67\x48\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65","\x41\x76\x67\x48\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x69\x6E\x75\x74\x65\x73","\x73\x75\x62\x74\x72\x61\x63\x74","\x47\x65\x74\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x47\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x65\x6E\x64\x4F\x66","\x67\x65\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x47\x65\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x69\x76\x72"];_0x3eb3[0];var client=require(_0x3eb3[1]);var moment=require(_0x3eb3[2]);exports[_0x3eb3[3]]= function(_0x4120x3){return function(){_0x4120x3[_0x3eb3[4]]= _0x4120x3[_0x3eb3[5]];return client.Request(_0x3eb3[6],{body:_0x4120x3,log:_0x3eb3[6]})}};exports[_0x3eb3[7]]= function(_0x4120x4){return function(){return client.Request(_0x3eb3[8],{options:{where:{endtime:{$between:[moment()[_0x3eb3[12]](_0x4120x4,_0x3eb3[11])[_0x3eb3[10]](_0x3eb3[9]),moment()[_0x3eb3[10]](_0x3eb3[9])]}},raw:false},log:_0x3eb3[13]})}};exports[_0x3eb3[14]]= function(_0x4120x4){return function(){return client.Request(_0x3eb3[15],{options:{where:{createdAt:{$between:[moment()[_0x3eb3[17]](_0x3eb3[16])[_0x3eb3[10]](_0x3eb3[9]),moment()[_0x3eb3[18]](_0x3eb3[16])[_0x3eb3[10]](_0x3eb3[9])]},campaigntype:_0x3eb3[5]},raw:false},log:_0x3eb3[15]})}};exports[_0x3eb3[19]]= function(_0x4120x4){return function(){return client.Request(_0x3eb3[20],{options:{where:{createdAt:{$between:[moment()[_0x3eb3[17]](_0x3eb3[16])[_0x3eb3[10]](_0x3eb3[9]),moment()[_0x3eb3[18]](_0x3eb3[16])[_0x3eb3[10]](_0x3eb3[9])]},campaigntype:_0x3eb3[21]},raw:false},log:_0x3eb3[20]})}}
\ No newline at end of file
+var _0x904f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x6D\x6F\x6D\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x48\x69\x73\x74\x6F\x72\x79","\x63\x61\x6D\x70\x61\x69\x67\x6E","\x71\x75\x65\x75\x65","\x43\x72\x65\x61\x74\x65\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x61\x76\x67\x48\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65","\x41\x76\x67\x48\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x69\x6E\x75\x74\x65\x73","\x73\x75\x62\x74\x72\x61\x63\x74","\x47\x65\x74\x43\x6D\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x47\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x65\x6E\x64\x4F\x66","\x67\x65\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x47\x65\x74\x43\x61\x6D\x70\x61\x69\x67\x6E\x48\x6F\x70\x70\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x69\x76\x72"];_0x904f[0];var client=require(_0x904f[1]);var moment=require(_0x904f[2]);exports[_0x904f[3]]= function(_0xab5bx3){return function(){_0xab5bx3[_0x904f[4]]= _0xab5bx3[_0x904f[5]];return client.Request(_0x904f[6],{body:_0xab5bx3,log:_0x904f[6]})}};exports[_0x904f[7]]= function(_0xab5bx4){return function(){return client.Request(_0x904f[8],{options:{where:{endtime:{$between:[moment()[_0x904f[12]](_0xab5bx4,_0x904f[11])[_0x904f[10]](_0x904f[9]),moment()[_0x904f[10]](_0x904f[9])]}},raw:false},log:_0x904f[13]})}};exports[_0x904f[14]]= function(_0xab5bx4){return function(){return client.Request(_0x904f[15],{options:{where:{createdAt:{$between:[moment()[_0x904f[17]](_0x904f[16])[_0x904f[10]](_0x904f[9]),moment()[_0x904f[18]](_0x904f[16])[_0x904f[10]](_0x904f[9])]},campaigntype:_0x904f[5]},raw:false},log:_0x904f[15]})}};exports[_0x904f[19]]= function(_0xab5bx4){return function(){return client.Request(_0x904f[20],{options:{where:{createdAt:{$between:[moment()[_0x904f[17]](_0x904f[16])[_0x904f[10]](_0x904f[9]),moment()[_0x904f[18]](_0x904f[16])[_0x904f[10]](_0x904f[9])]},campaigntype:_0x904f[21]},raw:false},log:_0x904f[20]})}}
\ No newline at end of file
index f7abf44..44be697 100644 (file)
@@ -1 +1 @@
-var _0xae53=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x47\x65\x74\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x65\x63\x6D","\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x6D\x69\x6E\x72\x61\x74\x65","\x6D\x61\x78\x72\x61\x74\x65","\x6D\x6F\x64\x65\x6D","\x67\x61\x74\x65\x77\x61\x79","\x66\x61\x78\x64\x65\x74\x65\x63\x74","\x74\x33\x38\x74\x69\x6D\x65\x6F\x75\x74","\x74\x65\x63\x68","\x54\x72\x75\x6E\x6B\x49\x64","\x4C\x69\x73\x74\x49\x64","\x6B\x65\x79","\x54\x72\x75\x6E\x6B","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x61\x63\x74\x69\x76\x65","\x67\x65\x74\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x6E\x6F\x74\x69\x66\x79","\x4E\x6F\x74\x69\x66\x79\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74"];_0xae53[0];var client=require(_0xae53[1]);exports[_0xae53[2]]= function(){return function(){return client.Request(_0xae53[3],{options:{raw:false,attributes:[_0xae53[4],_0xae53[5],_0xae53[6],_0xae53[7],_0xae53[8],_0xae53[9],_0xae53[10],_0xae53[11],_0xae53[12],_0xae53[13],_0xae53[14],_0xae53[15],_0xae53[16],_0xae53[17],_0xae53[18],_0xae53[19]],include:[{model:_0xae53[20],as:_0xae53[20],attributes:[_0xae53[4],_0xae53[5],_0xae53[21],_0xae53[22]]}]},log:_0xae53[23]})}};exports[_0xae53[24]]= function(_0xa4dfx2,_0xa4dfx3){return client.Request(_0xae53[25],{account:{id:_0xa4dfx2},body:_0xa4dfx3,log:_0xae53[25]})}
\ No newline at end of file
+var _0x9680=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x47\x65\x74\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x65\x63\x6D","\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x6D\x69\x6E\x72\x61\x74\x65","\x6D\x61\x78\x72\x61\x74\x65","\x6D\x6F\x64\x65\x6D","\x67\x61\x74\x65\x77\x61\x79","\x66\x61\x78\x64\x65\x74\x65\x63\x74","\x74\x33\x38\x74\x69\x6D\x65\x6F\x75\x74","\x74\x65\x63\x68","\x54\x72\x75\x6E\x6B\x49\x64","\x4C\x69\x73\x74\x49\x64","\x6B\x65\x79","\x54\x72\x75\x6E\x6B","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x61\x63\x74\x69\x76\x65","\x67\x65\x74\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x6E\x6F\x74\x69\x66\x79","\x4E\x6F\x74\x69\x66\x79\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74"];_0x9680[0];var client=require(_0x9680[1]);exports[_0x9680[2]]= function(){return function(){return client.Request(_0x9680[3],{options:{raw:false,attributes:[_0x9680[4],_0x9680[5],_0x9680[6],_0x9680[7],_0x9680[8],_0x9680[9],_0x9680[10],_0x9680[11],_0x9680[12],_0x9680[13],_0x9680[14],_0x9680[15],_0x9680[16],_0x9680[17],_0x9680[18],_0x9680[19]],include:[{model:_0x9680[20],as:_0x9680[20],attributes:[_0x9680[4],_0x9680[5],_0x9680[21],_0x9680[22]]}]},log:_0x9680[23]})}};exports[_0x9680[24]]= function(_0x17a3x2,_0x17a3x3){return client.Request(_0x9680[25],{account:{id:_0x17a3x2},body:_0x17a3x3,log:_0x9680[25]})}
\ No newline at end of file
index c2f8198..71f6287 100644 (file)
@@ -1 +1 @@
-var _0x7c37=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65"];_0x7c37[0];var client=require(_0x7c37[1]);exports[_0x7c37[2]]= function(_0x3e64x2,_0x3e64x3){return client.Request(_0x7c37[3],{body:_0x3e64x3,options:{where:{AttachmentId:_0x3e64x2}},log:_0x7c37[3]})}
\ No newline at end of file
+var _0xd6a6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65"];_0xd6a6[0];var client=require(_0xd6a6[1]);exports[_0xd6a6[2]]= function(_0x61e7x2,_0x61e7x3){return client.Request(_0xd6a6[3],{body:_0x61e7x3,options:{where:{AttachmentId:_0x61e7x2}},log:_0xd6a6[3]})}
\ No newline at end of file
index 938ed13..9bac6b0 100644 (file)
@@ -1 +1 @@
-var _0x506f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x47\x65\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x75\x74\x68\x54\x79\x70\x65","\x74\x79\x70\x65","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x63\x6F\x6E\x74\x65\x6E\x74","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x6B\x65\x79","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x46\x69\x65\x6C\x64\x73","\x69\x64\x46\x69\x65\x6C\x64","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x54\x61\x67","\x54\x61\x67\x73"];_0x506f[0];var client=require(_0x506f[1]);exports[_0x506f[2]]= function(){return function(_0x4fbex2){return client.Request(_0x506f[3],{options:{raw:false,attributes:[_0x506f[4],_0x506f[5],_0x506f[6],_0x506f[7],_0x506f[8],_0x506f[9],_0x506f[10],_0x506f[11],_0x506f[12]],include:[{model:_0x506f[13],as:_0x506f[14],attributes:[_0x506f[4],_0x506f[5]],include:[{model:_0x506f[15],as:_0x506f[16],attributes:[_0x506f[4],_0x506f[11],_0x506f[17],_0x506f[18]],include:[{model:_0x506f[19],as:_0x506f[19],attributes:[_0x506f[4],_0x506f[5]]}]},{model:_0x506f[15],as:_0x506f[20],attributes:[_0x506f[4],_0x506f[11],_0x506f[17],_0x506f[21],_0x506f[22],_0x506f[23],_0x506f[18]],include:[{model:_0x506f[19],as:_0x506f[19],attributes:[_0x506f[4],_0x506f[5]]}]},{model:_0x506f[15],as:_0x506f[24],attributes:[_0x506f[4],_0x506f[11],_0x506f[17],_0x506f[25],_0x506f[26],_0x506f[27],_0x506f[18]],include:[{model:_0x506f[19],as:_0x506f[19],attributes:[_0x506f[4],_0x506f[5]]}]},{model:_0x506f[28],as:_0x506f[29],attributes:[_0x506f[4],_0x506f[5]]}]}]},log:_0x506f[3]})}}
\ No newline at end of file
+var _0x2338=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x47\x65\x74\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x75\x74\x68\x54\x79\x70\x65","\x74\x79\x70\x65","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x63\x6F\x6E\x74\x65\x6E\x74","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x6B\x65\x79","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x46\x69\x65\x6C\x64\x73","\x69\x64\x46\x69\x65\x6C\x64","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x54\x61\x67","\x54\x61\x67\x73"];_0x2338[0];var client=require(_0x2338[1]);exports[_0x2338[2]]= function(){return function(_0x7753x2){return client.Request(_0x2338[3],{options:{raw:false,attributes:[_0x2338[4],_0x2338[5],_0x2338[6],_0x2338[7],_0x2338[8],_0x2338[9],_0x2338[10],_0x2338[11],_0x2338[12]],include:[{model:_0x2338[13],as:_0x2338[14],attributes:[_0x2338[4],_0x2338[5]],include:[{model:_0x2338[15],as:_0x2338[16],attributes:[_0x2338[4],_0x2338[11],_0x2338[17],_0x2338[18]],include:[{model:_0x2338[19],as:_0x2338[19],attributes:[_0x2338[4],_0x2338[5]]}]},{model:_0x2338[15],as:_0x2338[20],attributes:[_0x2338[4],_0x2338[11],_0x2338[17],_0x2338[21],_0x2338[22],_0x2338[23],_0x2338[18]],include:[{model:_0x2338[19],as:_0x2338[19],attributes:[_0x2338[4],_0x2338[5]]}]},{model:_0x2338[15],as:_0x2338[24],attributes:[_0x2338[4],_0x2338[11],_0x2338[17],_0x2338[25],_0x2338[26],_0x2338[27],_0x2338[18]],include:[{model:_0x2338[19],as:_0x2338[19],attributes:[_0x2338[4],_0x2338[5]]}]},{model:_0x2338[28],as:_0x2338[29],attributes:[_0x2338[4],_0x2338[5]]}]}]},log:_0x2338[3]})}}
\ No newline at end of file
index d34bb89..d204ea3 100644 (file)
@@ -1 +1 @@
-var _0x27dc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x47\x65\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x61\x70\x69\x4B\x65\x79","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x54\x61\x67","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x74\x79\x70\x65","\x63\x6F\x6E\x74\x65\x6E\x74","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x6B\x65\x79","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x46\x69\x65\x6C\x64\x73","\x69\x64\x46\x69\x65\x6C\x64","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64"];_0x27dc[0];var client=require(_0x27dc[1]);exports[_0x27dc[2]]= function(){return function(_0x15dcx2){return client.Request(_0x27dc[3],{options:{raw:false,attributes:[_0x27dc[4],_0x27dc[5],_0x27dc[6],_0x27dc[7],_0x27dc[8],_0x27dc[9]],include:[{model:_0x27dc[10],as:_0x27dc[11],attributes:[_0x27dc[4],_0x27dc[5]],include:[{model:_0x27dc[12],attributes:[_0x27dc[4],_0x27dc[5]]},{model:_0x27dc[13],as:_0x27dc[14],attributes:[_0x27dc[4],_0x27dc[15],_0x27dc[16],_0x27dc[17]],include:[{model:_0x27dc[18],as:_0x27dc[18],attributes:[_0x27dc[4],_0x27dc[5]]}]},{model:_0x27dc[13],as:_0x27dc[19],attributes:[_0x27dc[4],_0x27dc[15],_0x27dc[16],_0x27dc[20],_0x27dc[21],_0x27dc[22],_0x27dc[17]],include:[{model:_0x27dc[18],as:_0x27dc[18],attributes:[_0x27dc[4],_0x27dc[5]]}]},{model:_0x27dc[13],as:_0x27dc[23],attributes:[_0x27dc[4],_0x27dc[15],_0x27dc[16],_0x27dc[24],_0x27dc[25],_0x27dc[26],_0x27dc[17]],include:[{model:_0x27dc[18],as:_0x27dc[18],attributes:[_0x27dc[4],_0x27dc[5]]}]}]}]},log:_0x27dc[3]})}}
\ No newline at end of file
+var _0x6fb2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x47\x65\x74\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x61\x70\x69\x4B\x65\x79","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x54\x61\x67","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x74\x79\x70\x65","\x63\x6F\x6E\x74\x65\x6E\x74","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x6B\x65\x79","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x46\x69\x65\x6C\x64\x73","\x69\x64\x46\x69\x65\x6C\x64","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64"];_0x6fb2[0];var client=require(_0x6fb2[1]);exports[_0x6fb2[2]]= function(){return function(_0xd853x2){return client.Request(_0x6fb2[3],{options:{raw:false,attributes:[_0x6fb2[4],_0x6fb2[5],_0x6fb2[6],_0x6fb2[7],_0x6fb2[8],_0x6fb2[9]],include:[{model:_0x6fb2[10],as:_0x6fb2[11],attributes:[_0x6fb2[4],_0x6fb2[5]],include:[{model:_0x6fb2[12],attributes:[_0x6fb2[4],_0x6fb2[5]]},{model:_0x6fb2[13],as:_0x6fb2[14],attributes:[_0x6fb2[4],_0x6fb2[15],_0x6fb2[16],_0x6fb2[17]],include:[{model:_0x6fb2[18],as:_0x6fb2[18],attributes:[_0x6fb2[4],_0x6fb2[5]]}]},{model:_0x6fb2[13],as:_0x6fb2[19],attributes:[_0x6fb2[4],_0x6fb2[15],_0x6fb2[16],_0x6fb2[20],_0x6fb2[21],_0x6fb2[22],_0x6fb2[17]],include:[{model:_0x6fb2[18],as:_0x6fb2[18],attributes:[_0x6fb2[4],_0x6fb2[5]]}]},{model:_0x6fb2[13],as:_0x6fb2[23],attributes:[_0x6fb2[4],_0x6fb2[15],_0x6fb2[16],_0x6fb2[24],_0x6fb2[25],_0x6fb2[26],_0x6fb2[17]],include:[{model:_0x6fb2[18],as:_0x6fb2[18],attributes:[_0x6fb2[4],_0x6fb2[5]]}]}]}]},log:_0x6fb2[3]})}}
\ No newline at end of file
index 5af8eed..7f7be20 100644 (file)
@@ -1 +1 @@
-var _0xc8fb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x73","\x47\x65\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x63\x6C\x69\x65\x6E\x74\x49\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x73\x65\x63\x75\x72\x69\x74\x79\x54\x6F\x6B\x65\x6E","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x74\x79\x70\x65","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x6D\x6F\x64\x75\x6C\x65\x53\x65\x61\x72\x63\x68","\x6D\x6F\x64\x75\x6C\x65\x43\x72\x65\x61\x74\x65","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x56\x61\x72\x69\x61\x62\x6C\x65","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x46\x69\x65\x6C\x64\x73"];_0xc8fb[0];var client=require(_0xc8fb[1]);exports[_0xc8fb[2]]= function(){return function(_0x59ebx2){return client.Request(_0xc8fb[3],{options:{raw:false,attributes:[_0xc8fb[4],_0xc8fb[5],_0xc8fb[6],_0xc8fb[7],_0xc8fb[8],_0xc8fb[9],_0xc8fb[10],_0xc8fb[11],_0xc8fb[12],_0xc8fb[13]],include:[{model:_0xc8fb[14],as:_0xc8fb[15],attributes:[_0xc8fb[4],_0xc8fb[5],_0xc8fb[16],_0xc8fb[17]],include:[{model:_0xc8fb[18],as:_0xc8fb[19],include:[{model:_0xc8fb[20],as:_0xc8fb[20],attributes:[_0xc8fb[4],_0xc8fb[5]]}]},{model:_0xc8fb[18],as:_0xc8fb[21],include:[{model:_0xc8fb[20],as:_0xc8fb[20],attributes:[_0xc8fb[4],_0xc8fb[5]]}]},{model:_0xc8fb[18],as:_0xc8fb[22],include:[{model:_0xc8fb[20],as:_0xc8fb[20],attributes:[_0xc8fb[4],_0xc8fb[5]]}]}]}]},log:_0xc8fb[3]})}}
\ No newline at end of file
+var _0x3028=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x73","\x47\x65\x74\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x63\x6C\x69\x65\x6E\x74\x49\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x73\x65\x63\x75\x72\x69\x74\x79\x54\x6F\x6B\x65\x6E","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x74\x79\x70\x65","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x6D\x6F\x64\x75\x6C\x65\x53\x65\x61\x72\x63\x68","\x6D\x6F\x64\x75\x6C\x65\x43\x72\x65\x61\x74\x65","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x56\x61\x72\x69\x61\x62\x6C\x65","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x46\x69\x65\x6C\x64\x73"];_0x3028[0];var client=require(_0x3028[1]);exports[_0x3028[2]]= function(){return function(_0x7611x2){return client.Request(_0x3028[3],{options:{raw:false,attributes:[_0x3028[4],_0x3028[5],_0x3028[6],_0x3028[7],_0x3028[8],_0x3028[9],_0x3028[10],_0x3028[11],_0x3028[12],_0x3028[13]],include:[{model:_0x3028[14],as:_0x3028[15],attributes:[_0x3028[4],_0x3028[5],_0x3028[16],_0x3028[17]],include:[{model:_0x3028[18],as:_0x3028[19],include:[{model:_0x3028[20],as:_0x3028[20],attributes:[_0x3028[4],_0x3028[5]]}]},{model:_0x3028[18],as:_0x3028[21],include:[{model:_0x3028[20],as:_0x3028[20],attributes:[_0x3028[4],_0x3028[5]]}]},{model:_0x3028[18],as:_0x3028[22],include:[{model:_0x3028[20],as:_0x3028[20],attributes:[_0x3028[4],_0x3028[5]]}]}]}]},log:_0x3028[3]})}}
\ No newline at end of file
index d15ad4c..7546279 100644 (file)
@@ -1 +1 @@
-var _0xc767=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x73","\x47\x65\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x74\x79\x70\x65","\x63\x6F\x6E\x74\x65\x6E\x74","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x6B\x65\x79","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x46\x69\x65\x6C\x64\x73","\x69\x64\x46\x69\x65\x6C\x64","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64"];_0xc767[0];var client=require(_0xc767[1]);exports[_0xc767[2]]= function(){return function(_0x2538x2){return client.Request(_0xc767[3],{options:{raw:false,attributes:[_0xc767[4],_0xc767[5],_0xc767[6],_0xc767[7],_0xc767[8],_0xc767[9]],include:[{model:_0xc767[10],as:_0xc767[11],attributes:[_0xc767[4],_0xc767[5]],include:[{model:_0xc767[12],as:_0xc767[13],attributes:[_0xc767[4],_0xc767[14],_0xc767[15],_0xc767[16]],include:[{model:_0xc767[17],as:_0xc767[17],attributes:[_0xc767[4],_0xc767[5]]}]},{model:_0xc767[12],as:_0xc767[18],attributes:[_0xc767[4],_0xc767[14],_0xc767[15],_0xc767[19],_0xc767[20],_0xc767[21],_0xc767[16]],include:[{model:_0xc767[17],as:_0xc767[17],attributes:[_0xc767[4],_0xc767[5]]}]},{model:_0xc767[12],as:_0xc767[22],attributes:[_0xc767[4],_0xc767[14],_0xc767[15],_0xc767[23],_0xc767[24],_0xc767[25],_0xc767[16]],include:[{model:_0xc767[17],as:_0xc767[17],attributes:[_0xc767[4],_0xc767[5]]}]}]}]},log:_0xc767[3]})}}
\ No newline at end of file
+var _0x488b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x73","\x47\x65\x74\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x74\x79\x70\x65","\x63\x6F\x6E\x74\x65\x6E\x74","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x6B\x65\x79","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x46\x69\x65\x6C\x64\x73","\x69\x64\x46\x69\x65\x6C\x64","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64"];_0x488b[0];var client=require(_0x488b[1]);exports[_0x488b[2]]= function(){return function(_0x9ec2x2){return client.Request(_0x488b[3],{options:{raw:false,attributes:[_0x488b[4],_0x488b[5],_0x488b[6],_0x488b[7],_0x488b[8],_0x488b[9]],include:[{model:_0x488b[10],as:_0x488b[11],attributes:[_0x488b[4],_0x488b[5]],include:[{model:_0x488b[12],as:_0x488b[13],attributes:[_0x488b[4],_0x488b[14],_0x488b[15],_0x488b[16]],include:[{model:_0x488b[17],as:_0x488b[17],attributes:[_0x488b[4],_0x488b[5]]}]},{model:_0x488b[12],as:_0x488b[18],attributes:[_0x488b[4],_0x488b[14],_0x488b[15],_0x488b[19],_0x488b[20],_0x488b[21],_0x488b[16]],include:[{model:_0x488b[17],as:_0x488b[17],attributes:[_0x488b[4],_0x488b[5]]}]},{model:_0x488b[12],as:_0x488b[22],attributes:[_0x488b[4],_0x488b[14],_0x488b[15],_0x488b[23],_0x488b[24],_0x488b[25],_0x488b[16]],include:[{model:_0x488b[17],as:_0x488b[17],attributes:[_0x488b[4],_0x488b[5]]}]}]}]},log:_0x488b[3]})}}
\ No newline at end of file
index c2bb149..2e365cd 100644 (file)
@@ -1 +1 @@
-var _0xdc3d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x47\x65\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x74\x6F\x6B\x65\x6E","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x75\x74\x68\x54\x79\x70\x65","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x74\x79\x70\x65","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x54\x61\x67","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x63\x6F\x6E\x74\x65\x6E\x74","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x6B\x65\x79","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x46\x69\x65\x6C\x64\x73","\x69\x64\x46\x69\x65\x6C\x64","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64"];_0xdc3d[0];var client=require(_0xdc3d[1]);exports[_0xdc3d[2]]= function(){return function(_0xf22dx2){return client.Request(_0xdc3d[3],{options:{raw:false,attributes:[_0xdc3d[4],_0xdc3d[5],_0xdc3d[6],_0xdc3d[7],_0xdc3d[8],_0xdc3d[9],_0xdc3d[10],_0xdc3d[11],_0xdc3d[12]],include:[{model:_0xdc3d[13],as:_0xdc3d[14],attributes:[_0xdc3d[4],_0xdc3d[5]],include:[{model:_0xdc3d[15],attributes:[_0xdc3d[4],_0xdc3d[5]]},{model:_0xdc3d[16],as:_0xdc3d[17],attributes:[_0xdc3d[4],_0xdc3d[12],_0xdc3d[18],_0xdc3d[19]],include:[{model:_0xdc3d[20],as:_0xdc3d[20],attributes:[_0xdc3d[4],_0xdc3d[5]]}]},{model:_0xdc3d[16],as:_0xdc3d[21],attributes:[_0xdc3d[4],_0xdc3d[12],_0xdc3d[18],_0xdc3d[22],_0xdc3d[23],_0xdc3d[24],_0xdc3d[19]],include:[{model:_0xdc3d[20],as:_0xdc3d[20],attributes:[_0xdc3d[4],_0xdc3d[5]]}]},{model:_0xdc3d[16],as:_0xdc3d[25],attributes:[_0xdc3d[4],_0xdc3d[12],_0xdc3d[18],_0xdc3d[26],_0xdc3d[27],_0xdc3d[28],_0xdc3d[19]],include:[{model:_0xdc3d[20],as:_0xdc3d[20],attributes:[_0xdc3d[4],_0xdc3d[5]]}]}]}]},log:_0xdc3d[3]})}}
\ No newline at end of file
+var _0x2c2e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x47\x65\x74\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x74\x6F\x6B\x65\x6E","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x75\x74\x68\x54\x79\x70\x65","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x74\x79\x70\x65","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x54\x61\x67","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x63\x6F\x6E\x74\x65\x6E\x74","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x6B\x65\x79","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x46\x69\x65\x6C\x64\x73","\x69\x64\x46\x69\x65\x6C\x64","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64"];_0x2c2e[0];var client=require(_0x2c2e[1]);exports[_0x2c2e[2]]= function(){return function(_0x1214x2){return client.Request(_0x2c2e[3],{options:{raw:false,attributes:[_0x2c2e[4],_0x2c2e[5],_0x2c2e[6],_0x2c2e[7],_0x2c2e[8],_0x2c2e[9],_0x2c2e[10],_0x2c2e[11],_0x2c2e[12]],include:[{model:_0x2c2e[13],as:_0x2c2e[14],attributes:[_0x2c2e[4],_0x2c2e[5]],include:[{model:_0x2c2e[15],attributes:[_0x2c2e[4],_0x2c2e[5]]},{model:_0x2c2e[16],as:_0x2c2e[17],attributes:[_0x2c2e[4],_0x2c2e[12],_0x2c2e[18],_0x2c2e[19]],include:[{model:_0x2c2e[20],as:_0x2c2e[20],attributes:[_0x2c2e[4],_0x2c2e[5]]}]},{model:_0x2c2e[16],as:_0x2c2e[21],attributes:[_0x2c2e[4],_0x2c2e[12],_0x2c2e[18],_0x2c2e[22],_0x2c2e[23],_0x2c2e[24],_0x2c2e[19]],include:[{model:_0x2c2e[20],as:_0x2c2e[20],attributes:[_0x2c2e[4],_0x2c2e[5]]}]},{model:_0x2c2e[16],as:_0x2c2e[25],attributes:[_0x2c2e[4],_0x2c2e[12],_0x2c2e[18],_0x2c2e[26],_0x2c2e[27],_0x2c2e[28],_0x2c2e[19]],include:[{model:_0x2c2e[20],as:_0x2c2e[20],attributes:[_0x2c2e[4],_0x2c2e[5]]}]}]}]},log:_0x2c2e[3]})}}
\ No newline at end of file
index 10a0223..1d7a8e6 100644 (file)
@@ -1 +1 @@
-var _0xe684=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x73","\x47\x65\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x75\x74\x68\x54\x6F\x6B\x65\x6E","\x68\x6F\x73\x74","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x74\x79\x70\x65","\x63\x6F\x6E\x74\x65\x6E\x74","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x6B\x65\x79","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x46\x69\x65\x6C\x64\x73","\x69\x64\x46\x69\x65\x6C\x64","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64"];_0xe684[0];var client=require(_0xe684[1]);exports[_0xe684[2]]= function(){return function(_0x63d0x2){return client.Request(_0xe684[3],{options:{raw:false,attributes:[_0xe684[4],_0xe684[5],_0xe684[6],_0xe684[7],_0xe684[8],_0xe684[9]],include:[{model:_0xe684[10],as:_0xe684[11],attributes:[_0xe684[4],_0xe684[5]],include:[{model:_0xe684[12],as:_0xe684[13],attributes:[_0xe684[4],_0xe684[14],_0xe684[15],_0xe684[16]],include:[{model:_0xe684[17],as:_0xe684[17],attributes:[_0xe684[4],_0xe684[5]]}]},{model:_0xe684[12],as:_0xe684[18],attributes:[_0xe684[4],_0xe684[14],_0xe684[15],_0xe684[19],_0xe684[20],_0xe684[21],_0xe684[16]],include:[{model:_0xe684[17],as:_0xe684[17],attributes:[_0xe684[4],_0xe684[5]]}]},{model:_0xe684[12],as:_0xe684[22],attributes:[_0xe684[4],_0xe684[14],_0xe684[15],_0xe684[23],_0xe684[24],_0xe684[25],_0xe684[16]],include:[{model:_0xe684[17],as:_0xe684[17],attributes:[_0xe684[4],_0xe684[5]]}]}]}]},log:_0xe684[3]})}}
\ No newline at end of file
+var _0xa961=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x73","\x47\x65\x74\x5A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x75\x74\x68\x54\x6F\x6B\x65\x6E","\x68\x6F\x73\x74","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x5A\x6F\x68\x6F\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x5A\x6F\x68\x6F\x46\x69\x65\x6C\x64","\x53\x75\x62\x6A\x65\x63\x74\x73","\x74\x79\x70\x65","\x63\x6F\x6E\x74\x65\x6E\x74","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x73","\x6B\x65\x79","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x46\x69\x65\x6C\x64\x73","\x69\x64\x46\x69\x65\x6C\x64","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64"];_0xa961[0];var client=require(_0xa961[1]);exports[_0xa961[2]]= function(){return function(_0x5450x2){return client.Request(_0xa961[3],{options:{raw:false,attributes:[_0xa961[4],_0xa961[5],_0xa961[6],_0xa961[7],_0xa961[8],_0xa961[9]],include:[{model:_0xa961[10],as:_0xa961[11],attributes:[_0xa961[4],_0xa961[5]],include:[{model:_0xa961[12],as:_0xa961[13],attributes:[_0xa961[4],_0xa961[14],_0xa961[15],_0xa961[16]],include:[{model:_0xa961[17],as:_0xa961[17],attributes:[_0xa961[4],_0xa961[5]]}]},{model:_0xa961[12],as:_0xa961[18],attributes:[_0xa961[4],_0xa961[14],_0xa961[15],_0xa961[19],_0xa961[20],_0xa961[21],_0xa961[16]],include:[{model:_0xa961[17],as:_0xa961[17],attributes:[_0xa961[4],_0xa961[5]]}]},{model:_0xa961[12],as:_0xa961[22],attributes:[_0xa961[4],_0xa961[14],_0xa961[15],_0xa961[23],_0xa961[24],_0xa961[25],_0xa961[16]],include:[{model:_0xa961[17],as:_0xa961[17],attributes:[_0xa961[4],_0xa961[5]]}]}]}]},log:_0xa961[3]})}}
\ No newline at end of file
index 069a259..4b69cf6 100644 (file)
@@ -1 +1 @@
-var _0x98fb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x43\x72\x65\x61\x74\x65\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x76\x6F\x69\x63\x65","\x6C\x61\x73\x74\x41\x73\x73\x69\x67\x6E\x65\x64\x54\x6F","\x53\x49\x50\x2F","\x54\x41\x4C\x4B\x49\x4E\x47","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x69\x6E\x62\x6F\x75\x6E\x64","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x65\x78\x74\x65\x6E","\x71\x75\x65\x75\x65","\x61\x67\x65\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x74\x6F\x4E\x75\x6D\x62\x65\x72","\x75\x6E\x69\x71\x75\x65\x69\x64","\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x73\x70\x6C\x69\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x2D","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x69\x61\x6C\x73\x74\x72\x69\x6E\x67"];_0x98fb[0];var moment=require(_0x98fb[1]);var _=require(_0x98fb[2]);var client=require(_0x98fb[3]);exports[_0x98fb[4]]= function(_0x15c9x4){return client.Request(_0x98fb[5],{body:{channel:_0x98fb[6],membername:_0x15c9x4[_0x98fb[7]],interface:_0x98fb[8]+ _0x15c9x4[_0x98fb[7]],type:_0x98fb[9],enterAt:_0x15c9x4[_0x98fb[10]],exitAt:_0x15c9x4[_0x98fb[11]],duration:moment(_0x15c9x4[_0x98fb[11]])[_0x98fb[13]](_0x15c9x4[_0x98fb[10]],_0x98fb[12]),data1:_0x98fb[14],data2:_0x15c9x4[_0x98fb[15]],data3:_0x15c9x4[_0x98fb[16]],data4:null,data5:_0x15c9x4[_0x98fb[17]],role:_0x98fb[18],internal:_0x15c9x4[_0x98fb[19]]?_[_0x98fb[20]](_0x15c9x4[_0x98fb[19]]):undefined,uniqueid:_0x15c9x4[_0x98fb[21]]},log:_0x98fb[5]})};exports[_0x98fb[22]]= function(_0x15c9x5){return client.Request(_0x98fb[5],{body:{channel:_0x98fb[6],membername:_0x15c9x5[_0x98fb[24]][_0x98fb[23]](/\/|-/)[1],interface:_0x15c9x5[_0x98fb[24]][_0x98fb[23]](_0x98fb[25])[0],type:_0x98fb[9],enterAt:_0x15c9x5[_0x98fb[26]],exitAt:_0x15c9x5[_0x98fb[27]],data1:_0x98fb[28],data2:_0x15c9x5[_0x98fb[19]],data3:_0x15c9x5[_0x98fb[16]],data4:_0x15c9x5[_0x98fb[29]]|| null,role:_0x98fb[18],internal:_0x15c9x5[_0x98fb[19]]?_[_0x98fb[20]](_0x15c9x5[_0x98fb[19]]):undefined,uniqueid:_0x15c9x5[_0x98fb[21]]},log:_0x98fb[5]})}
\ No newline at end of file
+var _0xfcaa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x43\x72\x65\x61\x74\x65\x4D\x65\x6D\x62\x65\x72\x52\x65\x70\x6F\x72\x74","\x76\x6F\x69\x63\x65","\x6C\x61\x73\x74\x41\x73\x73\x69\x67\x6E\x65\x64\x54\x6F","\x53\x49\x50\x2F","\x54\x41\x4C\x4B\x49\x4E\x47","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x69\x6E\x62\x6F\x75\x6E\x64","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x65\x78\x74\x65\x6E","\x71\x75\x65\x75\x65","\x61\x67\x65\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x74\x6F\x4E\x75\x6D\x62\x65\x72","\x75\x6E\x69\x71\x75\x65\x69\x64","\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x73\x70\x6C\x69\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x2D","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x69\x61\x6C\x73\x74\x72\x69\x6E\x67"];_0xfcaa[0];var moment=require(_0xfcaa[1]);var _=require(_0xfcaa[2]);var client=require(_0xfcaa[3]);exports[_0xfcaa[4]]= function(_0x9419x4){return client.Request(_0xfcaa[5],{body:{channel:_0xfcaa[6],membername:_0x9419x4[_0xfcaa[7]],interface:_0xfcaa[8]+ _0x9419x4[_0xfcaa[7]],type:_0xfcaa[9],enterAt:_0x9419x4[_0xfcaa[10]],exitAt:_0x9419x4[_0xfcaa[11]],duration:moment(_0x9419x4[_0xfcaa[11]])[_0xfcaa[13]](_0x9419x4[_0xfcaa[10]],_0xfcaa[12]),data1:_0xfcaa[14],data2:_0x9419x4[_0xfcaa[15]],data3:_0x9419x4[_0xfcaa[16]],data4:null,data5:_0x9419x4[_0xfcaa[17]],role:_0xfcaa[18],internal:_0x9419x4[_0xfcaa[19]]?_[_0xfcaa[20]](_0x9419x4[_0xfcaa[19]]):undefined,uniqueid:_0x9419x4[_0xfcaa[21]]},log:_0xfcaa[5]})};exports[_0xfcaa[22]]= function(_0x9419x5){return client.Request(_0xfcaa[5],{body:{channel:_0xfcaa[6],membername:_0x9419x5[_0xfcaa[24]][_0xfcaa[23]](/\/|-/)[1],interface:_0x9419x5[_0xfcaa[24]][_0xfcaa[23]](_0xfcaa[25])[0],type:_0xfcaa[9],enterAt:_0x9419x5[_0xfcaa[26]],exitAt:_0x9419x5[_0xfcaa[27]],data1:_0xfcaa[28],data2:_0x9419x5[_0xfcaa[19]],data3:_0x9419x5[_0xfcaa[16]],data4:_0x9419x5[_0xfcaa[29]]|| null,role:_0xfcaa[18],internal:_0x9419x5[_0xfcaa[19]]?_[_0xfcaa[20]](_0x9419x5[_0xfcaa[19]]):undefined,uniqueid:_0x9419x5[_0xfcaa[21]]},log:_0xfcaa[5]})}
\ No newline at end of file
index 45f0c16..9c9dbd6 100644 (file)
@@ -1 +1 @@
-var _0xdf1f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x54\x65\x6D\x70\x6C\x61\x74\x65\x73","\x47\x65\x74\x54\x65\x6D\x70\x6C\x61\x74\x65","\x69\x64","\x6E\x61\x6D\x65","\x68\x74\x6D\x6C"];_0xdf1f[0];var client=require(_0xdf1f[1]);exports[_0xdf1f[2]]= function(_0x35c9x2){return function(_0x35c9x3){return client.Request(_0xdf1f[3],{options:{raw:true,attributes:[_0xdf1f[4],_0xdf1f[5],_0xdf1f[6]]},log:_0xdf1f[3]})}}
\ No newline at end of file
+var _0x5cef=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x54\x65\x6D\x70\x6C\x61\x74\x65\x73","\x47\x65\x74\x54\x65\x6D\x70\x6C\x61\x74\x65","\x69\x64","\x6E\x61\x6D\x65","\x68\x74\x6D\x6C"];_0x5cef[0];var client=require(_0x5cef[1]);exports[_0x5cef[2]]= function(_0x2426x2){return function(_0x2426x3){return client.Request(_0x5cef[3],{options:{raw:true,attributes:[_0x5cef[4],_0x5cef[5],_0x5cef[6]]},log:_0x5cef[3]})}}
\ No newline at end of file
index 6c77bdf..515c2a5 100644 (file)
@@ -1 +1 @@
-var _0x2b96=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x54\x72\x69\x67\x67\x65\x72\x73","\x47\x65\x74\x54\x72\x69\x67\x67\x65\x72","\x69\x64","\x6E\x61\x6D\x65","\x63\x68\x61\x6E\x6E\x65\x6C","\x73\x74\x61\x74\x75\x73","\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x41\x6C\x6C\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x66\x69\x65\x6C\x64","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x76\x61\x6C\x75\x65","\x41\x6E\x79\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x41\x63\x74\x69\x6F\x6E","\x41\x63\x74\x69\x6F\x6E\x73","\x61\x63\x74\x69\x6F\x6E","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x64\x61\x74\x61\x34","\x64\x61\x74\x61\x35","\x64\x61\x74\x61\x36"];_0x2b96[0];var client=require(_0x2b96[1]);exports[_0x2b96[2]]= function(_0x6b53x2){return function(_0x6b53x3){return client.Request(_0x2b96[3],{options:{raw:false,attributes:[_0x2b96[4],_0x2b96[5],_0x2b96[6],_0x2b96[7]],include:[{model:_0x2b96[8],as:_0x2b96[9],attributes:[_0x2b96[4],_0x2b96[10],_0x2b96[11],_0x2b96[12]]},{model:_0x2b96[8],as:_0x2b96[13],attributes:[_0x2b96[4],_0x2b96[10],_0x2b96[11],_0x2b96[12]]},{model:_0x2b96[14],as:_0x2b96[15],attributes:[_0x2b96[4],_0x2b96[16],_0x2b96[17],_0x2b96[18],_0x2b96[19],_0x2b96[20],_0x2b96[21],_0x2b96[22]]}]},log:_0x2b96[3]})}}
\ No newline at end of file
+var _0xcbd5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x54\x72\x69\x67\x67\x65\x72\x73","\x47\x65\x74\x54\x72\x69\x67\x67\x65\x72","\x69\x64","\x6E\x61\x6D\x65","\x63\x68\x61\x6E\x6E\x65\x6C","\x73\x74\x61\x74\x75\x73","\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x41\x6C\x6C\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x66\x69\x65\x6C\x64","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x76\x61\x6C\x75\x65","\x41\x6E\x79\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x41\x63\x74\x69\x6F\x6E","\x41\x63\x74\x69\x6F\x6E\x73","\x61\x63\x74\x69\x6F\x6E","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x64\x61\x74\x61\x34","\x64\x61\x74\x61\x35","\x64\x61\x74\x61\x36"];_0xcbd5[0];var client=require(_0xcbd5[1]);exports[_0xcbd5[2]]= function(_0x7fd6x2){return function(_0x7fd6x3){return client.Request(_0xcbd5[3],{options:{raw:false,attributes:[_0xcbd5[4],_0xcbd5[5],_0xcbd5[6],_0xcbd5[7]],include:[{model:_0xcbd5[8],as:_0xcbd5[9],attributes:[_0xcbd5[4],_0xcbd5[10],_0xcbd5[11],_0xcbd5[12]]},{model:_0xcbd5[8],as:_0xcbd5[13],attributes:[_0xcbd5[4],_0xcbd5[10],_0xcbd5[11],_0xcbd5[12]]},{model:_0xcbd5[14],as:_0xcbd5[15],attributes:[_0xcbd5[4],_0xcbd5[16],_0xcbd5[17],_0xcbd5[18],_0xcbd5[19],_0xcbd5[20],_0xcbd5[21],_0xcbd5[22]]}]},log:_0xcbd5[3]})}}
\ No newline at end of file
index 9b9f87f..2fa52e6 100644 (file)
@@ -1 +1 @@
-var _0xbf82=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x54\x72\x75\x6E\x6B\x73","\x47\x65\x74\x54\x72\x75\x6E\x6B","\x69\x64","\x6E\x61\x6D\x65","\x72\x65\x67\x69\x73\x74\x72\x79"];_0xbf82[0];var client=require(_0xbf82[1]);exports[_0xbf82[2]]= function(_0xe65fx2){return function(_0xe65fx3){return client.Request(_0xbf82[3],{options:{raw:true,where:{active:1},attributes:[_0xbf82[4],_0xbf82[5],_0xbf82[6]]},log:_0xbf82[3]})}}
\ No newline at end of file
+var _0xa362=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x54\x72\x75\x6E\x6B\x73","\x47\x65\x74\x54\x72\x75\x6E\x6B","\x69\x64","\x6E\x61\x6D\x65","\x72\x65\x67\x69\x73\x74\x72\x79"];_0xa362[0];var client=require(_0xa362[1]);exports[_0xa362[2]]= function(_0xe5aax2){return function(_0xe5aax3){return client.Request(_0xa362[3],{options:{raw:true,where:{active:1},attributes:[_0xa362[4],_0xa362[5],_0xa362[6]]},log:_0xa362[3]})}}
\ No newline at end of file
index 16cd16a..d9928f5 100644 (file)
@@ -1 +1 @@
-var _0xb2bb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x47\x65\x74\x55\x73\x65\x72","\x61\x67\x65\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x6C\x61\x73\x74\x4C\x6F\x67\x69\x6E\x41\x74","\x70\x61\x75\x73\x65\x54\x79\x70\x65","\x6C\x61\x73\x74\x50\x61\x75\x73\x65\x41\x74","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x67\x65\x74\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x73\x61\x76\x65\x50\x61\x75\x73\x65","\x50\x61\x75\x73\x65\x55\x73\x65\x72","\x73\x61\x76\x65\x55\x6E\x70\x61\x75\x73\x65","\x55\x6E\x70\x61\x75\x73\x65\x55\x73\x65\x72","\x67\x65\x74\x41\x67\x65\x6E\x74","\x53\x68\x6F\x77\x55\x73\x65\x72"];_0xb2bb[0];var client=require(_0xb2bb[1]);exports[_0xb2bb[2]]= function(){return function(){return client.Request(_0xb2bb[3],{options:{raw:false,where:{role:_0xb2bb[4]},attributes:[_0xb2bb[5],_0xb2bb[6],_0xb2bb[7],_0xb2bb[8],_0xb2bb[9],_0xb2bb[10],_0xb2bb[11],_0xb2bb[12],_0xb2bb[13],_0xb2bb[14]]},log:_0xb2bb[2]})}};exports[_0xb2bb[15]]= function(){return function(){return client.Request(_0xb2bb[3],{options:{raw:true,where:{role:_0xb2bb[16]},attributes:[_0xb2bb[5],_0xb2bb[6]]},log:_0xb2bb[15]})}};exports[_0xb2bb[17]]= function(_0x89f4x2,_0x89f4x3,_0x89f4x4){return client.Request(_0xb2bb[18],{body:{type:_0x89f4x3,uniqueid:_0x89f4x4},options:{where:{id:_0x89f4x2[_0xb2bb[5]]}},log:_0xb2bb[17]})};exports[_0xb2bb[19]]= function(_0x89f4x2){return client.Request(_0xb2bb[20],{body:{},options:{where:{id:_0x89f4x2[_0xb2bb[5]]}},log:_0xb2bb[17]})};exports[_0xb2bb[21]]= function(_0x89f4x5){return client.Request(_0xb2bb[22],{options:{raw:false,where:{role:_0xb2bb[4],id:_0x89f4x5},attributes:[_0xb2bb[5],_0xb2bb[6],_0xb2bb[7],_0xb2bb[8],_0xb2bb[9],_0xb2bb[10],_0xb2bb[11],_0xb2bb[12],_0xb2bb[13],_0xb2bb[14]]},log:_0xb2bb[21]})}
\ No newline at end of file
+var _0xd754=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x47\x65\x74\x55\x73\x65\x72","\x61\x67\x65\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x6C\x61\x73\x74\x4C\x6F\x67\x69\x6E\x41\x74","\x70\x61\x75\x73\x65\x54\x79\x70\x65","\x6C\x61\x73\x74\x50\x61\x75\x73\x65\x41\x74","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x67\x65\x74\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x73\x61\x76\x65\x50\x61\x75\x73\x65","\x50\x61\x75\x73\x65\x55\x73\x65\x72","\x73\x61\x76\x65\x55\x6E\x70\x61\x75\x73\x65","\x55\x6E\x70\x61\x75\x73\x65\x55\x73\x65\x72","\x67\x65\x74\x41\x67\x65\x6E\x74","\x53\x68\x6F\x77\x55\x73\x65\x72"];_0xd754[0];var client=require(_0xd754[1]);exports[_0xd754[2]]= function(){return function(){return client.Request(_0xd754[3],{options:{raw:false,where:{role:_0xd754[4]},attributes:[_0xd754[5],_0xd754[6],_0xd754[7],_0xd754[8],_0xd754[9],_0xd754[10],_0xd754[11],_0xd754[12],_0xd754[13],_0xd754[14]]},log:_0xd754[2]})}};exports[_0xd754[15]]= function(){return function(){return client.Request(_0xd754[3],{options:{raw:true,where:{role:_0xd754[16]},attributes:[_0xd754[5],_0xd754[6]]},log:_0xd754[15]})}};exports[_0xd754[17]]= function(_0x396dx2,_0x396dx3,_0x396dx4){return client.Request(_0xd754[18],{body:{type:_0x396dx3,uniqueid:_0x396dx4},options:{where:{id:_0x396dx2[_0xd754[5]]}},log:_0xd754[17]})};exports[_0xd754[19]]= function(_0x396dx2){return client.Request(_0xd754[20],{body:{},options:{where:{id:_0x396dx2[_0xd754[5]]}},log:_0xd754[17]})};exports[_0xd754[21]]= function(_0x396dx5){return client.Request(_0xd754[22],{options:{raw:false,where:{role:_0xd754[4],id:_0x396dx5},attributes:[_0xd754[5],_0xd754[6],_0xd754[7],_0xd754[8],_0xd754[9],_0xd754[10],_0xd754[11],_0xd754[12],_0xd754[13],_0xd754[14]]},log:_0xd754[21]})}
\ No newline at end of file
index 4e2ab24..c82e3c6 100644 (file)
@@ -1 +1 @@
-var _0x76bf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74"];_0x76bf[0];var client=require(_0x76bf[1]);exports[_0x76bf[2]]= function(_0x495cx2){return client.Request(_0x76bf[3],{body:_0x495cx2,log:_0x76bf[3]})};exports[_0x76bf[4]]= function(_0x495cx2,_0x495cx3){return client.Request(_0x76bf[5],{body:_0x495cx2,options:{where:{uniqueid:_0x495cx3}},log:_0x76bf[5]})}
\ No newline at end of file
+var _0x99d1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x56\x6F\x69\x63\x65\x41\x67\x65\x6E\x74\x52\x65\x70\x6F\x72\x74"];_0x99d1[0];var client=require(_0x99d1[1]);exports[_0x99d1[2]]= function(_0xfddax2){return client.Request(_0x99d1[3],{body:_0xfddax2,log:_0x99d1[3]})};exports[_0x99d1[4]]= function(_0xfddax2,_0xfddax3){return client.Request(_0x99d1[5],{body:_0xfddax2,options:{where:{uniqueid:_0xfddax3}},log:_0x99d1[5]})}
\ No newline at end of file
index 9791511..a95c662 100644 (file)
@@ -1 +1 @@
-var _0x1f7e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x65\x78\x74\x65\x6E","\x78\x63\x61\x6C\x6C\x79\x2D\x6D\x6F\x74\x69\x6F\x6E\x2D\x64\x69\x61\x6C\x65\x72","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x63\x6F\x6E\x74\x65\x78\x74","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x44\x4F\x43\x55\x4D\x45\x4E\x54\x41\x54\x49\x4F\x4E","\x6D\x65\x72\x67\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x73","\x47\x65\x74\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x65\x6E\x64\x4F\x66","\x74\x79\x70\x65","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x62\x69\x6C\x6C\x61\x62\x6C\x65\x73\x65\x63\x6F\x6E\x64\x73","\x47\x65\x74\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x73"];_0x1f7e[0];var moment=require(_0x1f7e[1]);var util=require(_0x1f7e[2]);var _=require(_0x1f7e[3]);var client=require(_0x1f7e[4]);exports[_0x1f7e[5]]= function(_0x17e3x5){return client.Request(_0x1f7e[6],{body:_[_0x1f7e[16]](_0x17e3x5,{source:_0x17e3x5[_0x1f7e[7]],destination:_0x17e3x5[_0x1f7e[8]]=== _0x1f7e[9]?_0x17e3x5[_0x1f7e[10]]:_0x17e3x5[_0x1f7e[8]],destinationcontext:_0x17e3x5[_0x1f7e[11]],callerid:util[_0x1f7e[14]](_0x1f7e[12],_0x17e3x5[_0x1f7e[13]],_0x17e3x5[_0x1f7e[7]]),amaflags:_0x1f7e[15]}),log:_0x1f7e[6]})};exports[_0x1f7e[17]]= function(){return function(){return client.Request(_0x1f7e[18],{options:{where:{type:[_0x1f7e[19]],createdAt:{$between:[moment()[_0x1f7e[22]](_0x1f7e[21])[_0x1f7e[14]](_0x1f7e[20]),moment()[_0x1f7e[23]](_0x1f7e[21])[_0x1f7e[14]](_0x1f7e[20])]}},attributes:[_0x1f7e[24],_0x1f7e[25],_0x1f7e[26],_0x1f7e[27]]},log:_0x1f7e[28]})}}
\ No newline at end of file
+var _0x19c1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x65\x78\x74\x65\x6E","\x78\x63\x61\x6C\x6C\x79\x2D\x6D\x6F\x74\x69\x6F\x6E\x2D\x64\x69\x61\x6C\x65\x72","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x63\x6F\x6E\x74\x65\x78\x74","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x44\x4F\x43\x55\x4D\x45\x4E\x54\x41\x54\x49\x4F\x4E","\x6D\x65\x72\x67\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x73","\x47\x65\x74\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x65\x6E\x64\x4F\x66","\x74\x79\x70\x65","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x62\x69\x6C\x6C\x61\x62\x6C\x65\x73\x65\x63\x6F\x6E\x64\x73","\x47\x65\x74\x56\x6F\x69\x63\x65\x43\x61\x6C\x6C\x52\x65\x70\x6F\x72\x74\x73"];_0x19c1[0];var moment=require(_0x19c1[1]);var util=require(_0x19c1[2]);var _=require(_0x19c1[3]);var client=require(_0x19c1[4]);exports[_0x19c1[5]]= function(_0x5eaex5){return client.Request(_0x19c1[6],{body:_[_0x19c1[16]](_0x5eaex5,{source:_0x5eaex5[_0x19c1[7]],destination:_0x5eaex5[_0x19c1[8]]=== _0x19c1[9]?_0x5eaex5[_0x19c1[10]]:_0x5eaex5[_0x19c1[8]],destinationcontext:_0x5eaex5[_0x19c1[11]],callerid:util[_0x19c1[14]](_0x19c1[12],_0x5eaex5[_0x19c1[13]],_0x5eaex5[_0x19c1[7]]),amaflags:_0x19c1[15]}),log:_0x19c1[6]})};exports[_0x19c1[17]]= function(){return function(){return client.Request(_0x19c1[18],{options:{where:{type:[_0x19c1[19]],createdAt:{$between:[moment()[_0x19c1[22]](_0x19c1[21])[_0x19c1[14]](_0x19c1[20]),moment()[_0x19c1[23]](_0x19c1[21])[_0x19c1[14]](_0x19c1[20])]}},attributes:[_0x19c1[24],_0x19c1[25],_0x19c1[26],_0x19c1[27]]},log:_0x19c1[28]})}}
\ No newline at end of file
index 143d959..113be11 100644 (file)
@@ -1 +1 @@
-var _0xa2bd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74"];_0xa2bd[0];var client=require(_0xa2bd[1]);exports[_0xa2bd[2]]= function(_0x7f5fx2){return client.Request(_0xa2bd[3],{body:_0x7f5fx2,log:_0xa2bd[3]})}
\ No newline at end of file
+var _0x13af=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74"];_0x13af[0];var client=require(_0x13af[1]);exports[_0x13af[2]]= function(_0xd381x2){return client.Request(_0x13af[3],{body:_0xd381x2,log:_0x13af[3]})}
\ No newline at end of file
index 9b6989d..9f535f6 100644 (file)
@@ -1 +1 @@
-var _0xcae6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x47\x65\x74\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x69\x64","\x65\x78\x74\x65\x6E","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74"];_0xcae6[0];var client=require(_0xcae6[1]);exports[_0xcae6[2]]= function(){return function(){return client.Request(_0xcae6[3],{options:{raw:true,attributes:[_0xcae6[4],_0xcae6[5],_0xcae6[6]],where:{VoiceExtensionId:null}},log:_0xcae6[2]})}}
\ No newline at end of file
+var _0x31b4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x47\x65\x74\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x69\x64","\x65\x78\x74\x65\x6E","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74"];_0x31b4[0];var client=require(_0x31b4[1]);exports[_0x31b4[2]]= function(){return function(){return client.Request(_0x31b4[3],{options:{raw:true,attributes:[_0x31b4[4],_0x31b4[5],_0x31b4[6]],where:{VoiceExtensionId:null}},log:_0x31b4[2]})}}
\ No newline at end of file
index 444dc1c..63adeb3 100644 (file)
@@ -1 +1 @@
-var _0x49ca=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x47\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x69\x64","\x6E\x61\x6D\x65","\x61\x63\x77","\x61\x63\x77\x54\x69\x6D\x65\x6F\x75\x74","\x61\x75\x74\x6F\x70\x61\x75\x73\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x74\x79\x70\x65","\x64\x69\x61\x6C\x41\x63\x74\x69\x76\x65","\x64\x69\x61\x6C\x4D\x65\x74\x68\x6F\x64","\x64\x69\x61\x6C\x4C\x69\x6D\x69\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x64\x69\x61\x6C\x4C\x69\x6D\x69\x74\x51\x75\x65\x75\x65","\x64\x69\x61\x6C\x50\x6F\x77\x65\x72\x4C\x65\x76\x65\x6C","\x64\x69\x61\x6C\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x4F\x70\x74\x69\x6D\x69\x7A\x61\x74\x69\x6F\x6E","\x64\x69\x61\x6C\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x4F\x70\x74\x69\x6D\x69\x7A\x61\x74\x69\x6F\x6E\x50\x65\x72\x63\x65\x6E\x74\x61\x67\x65","\x64\x69\x61\x6C\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x61\x6D\x65","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x75\x6D\x62\x65\x72","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x54\x69\x6D\x65\x6F\x75\x74","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x4F\x70\x74\x69\x6F\x6E\x73","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x54\x69\x6D\x65\x6F\x75\x74","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x50\x72\x6F\x6A\x65\x63\x74","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x42\x75\x73\x79\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x42\x75\x73\x79\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x54\x69\x6D\x65\x7A\x6F\x6E\x65","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x49\x6E\x74\x65\x72\x76\x61\x6C","\x64\x69\x61\x6C\x50\x72\x65\x66\x69\x78","\x64\x69\x61\x6C\x43\x68\x65\x63\x6B\x44\x75\x70\x6C\x69\x63\x61\x74\x65\x54\x79\x70\x65","\x64\x69\x61\x6C\x41\x4D\x44\x41\x63\x74\x69\x76\x65","\x64\x69\x61\x6C\x41\x4D\x44\x49\x6E\x69\x74\x69\x61\x6C\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x47\x72\x65\x65\x74\x69\x6E\x67","\x64\x69\x61\x6C\x41\x4D\x44\x41\x66\x74\x65\x72\x47\x72\x65\x65\x74\x69\x6E\x67\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x54\x6F\x74\x61\x6C\x41\x6E\x61\x6C\x79\x73\x69\x73\x54\x69\x6D\x65","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x69\x6E\x57\x6F\x72\x64\x4C\x65\x6E\x67\x74\x68","\x64\x69\x61\x6C\x41\x4D\x44\x42\x65\x74\x77\x65\x65\x6E\x57\x6F\x72\x64\x73\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x61\x78\x69\x6D\x75\x6D\x4E\x75\x6D\x62\x65\x72\x4F\x66\x57\x6F\x72\x64\x73","\x64\x69\x61\x6C\x41\x4D\x44\x53\x69\x6C\x65\x6E\x63\x65\x54\x68\x72\x65\x73\x68\x6F\x6C\x64","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x61\x78\x69\x6D\x75\x6D\x57\x6F\x72\x64\x4C\x65\x6E\x67\x74\x68","\x74\x69\x6D\x65\x6F\x75\x74","\x64\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x4D\x65\x54\x69\x6D\x65\x6F\x75\x74","\x64\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x49\x6E\x51\x75\x65\x75\x65","\x64\x69\x61\x6C\x4F\x72\x64\x65\x72\x42\x79\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x64\x69\x61\x6C\x41\x67\x69\x41\x66\x74\x65\x72\x48\x61\x6E\x67\x75\x70\x41\x67\x65\x6E\x74","\x64\x69\x61\x6C\x41\x67\x69\x41\x66\x74\x65\x72\x48\x61\x6E\x67\x75\x70\x43\x6C\x69\x65\x6E\x74","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x50\x72\x6F\x6A\x65\x63\x74\x32","\x73\x74\x72\x61\x74\x65\x67\x79","\x54\x72\x75\x6E\x6B","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x61\x63\x74\x69\x76\x65","\x54\x72\x75\x6E\x6B\x42\x61\x63\x6B\x75\x70","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C"];_0x49ca[0];var client=require(_0x49ca[1]);exports[_0x49ca[2]]= function(){return function(){return client.Request(_0x49ca[3],{options:{raw:false,attributes:[_0x49ca[4],_0x49ca[5],_0x49ca[6],_0x49ca[7],_0x49ca[8],_0x49ca[9],_0x49ca[10],_0x49ca[11],_0x49ca[12],_0x49ca[13],_0x49ca[14],_0x49ca[15],_0x49ca[16],_0x49ca[17],_0x49ca[18],_0x49ca[19],_0x49ca[20],_0x49ca[21],_0x49ca[22],_0x49ca[23],_0x49ca[24],_0x49ca[25],_0x49ca[26],_0x49ca[27],_0x49ca[28],_0x49ca[29],_0x49ca[30],_0x49ca[31],_0x49ca[32],_0x49ca[33],_0x49ca[34],_0x49ca[35],_0x49ca[36],_0x49ca[37],_0x49ca[38],_0x49ca[39],_0x49ca[40],_0x49ca[41],_0x49ca[42],_0x49ca[43],_0x49ca[44],_0x49ca[45],_0x49ca[46],_0x49ca[47],_0x49ca[48],_0x49ca[49],_0x49ca[50],_0x49ca[51],_0x49ca[52],_0x49ca[9],_0x49ca[53]],include:[{model:_0x49ca[54],as:_0x49ca[54],attributes:[_0x49ca[4],_0x49ca[5],_0x49ca[55],_0x49ca[56]]},{model:_0x49ca[54],as:_0x49ca[57],attributes:[_0x49ca[4],_0x49ca[5],_0x49ca[55],_0x49ca[56]]},{model:_0x49ca[58],as:_0x49ca[58],attributes:[_0x49ca[4],_0x49ca[5]],include:[{model:_0x49ca[58],as:_0x49ca[59],attributes:[_0x49ca[4],_0x49ca[5],_0x49ca[60]]}]}]},log:_0x49ca[2]})}}
\ No newline at end of file
+var _0xcf89=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x47\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x69\x64","\x6E\x61\x6D\x65","\x61\x63\x77","\x61\x63\x77\x54\x69\x6D\x65\x6F\x75\x74","\x61\x75\x74\x6F\x70\x61\x75\x73\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x74\x79\x70\x65","\x64\x69\x61\x6C\x41\x63\x74\x69\x76\x65","\x64\x69\x61\x6C\x4D\x65\x74\x68\x6F\x64","\x64\x69\x61\x6C\x4C\x69\x6D\x69\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x64\x69\x61\x6C\x4C\x69\x6D\x69\x74\x51\x75\x65\x75\x65","\x64\x69\x61\x6C\x50\x6F\x77\x65\x72\x4C\x65\x76\x65\x6C","\x64\x69\x61\x6C\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x4F\x70\x74\x69\x6D\x69\x7A\x61\x74\x69\x6F\x6E","\x64\x69\x61\x6C\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x4F\x70\x74\x69\x6D\x69\x7A\x61\x74\x69\x6F\x6E\x50\x65\x72\x63\x65\x6E\x74\x61\x67\x65","\x64\x69\x61\x6C\x50\x72\x65\x64\x69\x63\x74\x69\x76\x65\x49\x6E\x74\x65\x72\x76\x61\x6C","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x61\x6D\x65","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x75\x6D\x62\x65\x72","\x64\x69\x61\x6C\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x54\x69\x6D\x65\x6F\x75\x74","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x4F\x70\x74\x69\x6F\x6E\x73","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x54\x69\x6D\x65\x6F\x75\x74","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x50\x72\x6F\x6A\x65\x63\x74","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x43\x6F\x6E\x67\x65\x73\x74\x69\x6F\x6E\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x42\x75\x73\x79\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x42\x75\x73\x79\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x4E\x6F\x41\x6E\x73\x77\x65\x72\x52\x65\x74\x72\x79\x46\x72\x65\x71\x75\x65\x6E\x63\x79","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x4D\x61\x78\x52\x65\x74\x72\x79","\x64\x69\x61\x6C\x54\x69\x6D\x65\x7A\x6F\x6E\x65","\x64\x69\x61\x6C\x47\x6C\x6F\x62\x61\x6C\x49\x6E\x74\x65\x72\x76\x61\x6C","\x64\x69\x61\x6C\x50\x72\x65\x66\x69\x78","\x64\x69\x61\x6C\x43\x68\x65\x63\x6B\x44\x75\x70\x6C\x69\x63\x61\x74\x65\x54\x79\x70\x65","\x64\x69\x61\x6C\x41\x4D\x44\x41\x63\x74\x69\x76\x65","\x64\x69\x61\x6C\x41\x4D\x44\x49\x6E\x69\x74\x69\x61\x6C\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x47\x72\x65\x65\x74\x69\x6E\x67","\x64\x69\x61\x6C\x41\x4D\x44\x41\x66\x74\x65\x72\x47\x72\x65\x65\x74\x69\x6E\x67\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x54\x6F\x74\x61\x6C\x41\x6E\x61\x6C\x79\x73\x69\x73\x54\x69\x6D\x65","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x69\x6E\x57\x6F\x72\x64\x4C\x65\x6E\x67\x74\x68","\x64\x69\x61\x6C\x41\x4D\x44\x42\x65\x74\x77\x65\x65\x6E\x57\x6F\x72\x64\x73\x53\x69\x6C\x65\x6E\x63\x65","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x61\x78\x69\x6D\x75\x6D\x4E\x75\x6D\x62\x65\x72\x4F\x66\x57\x6F\x72\x64\x73","\x64\x69\x61\x6C\x41\x4D\x44\x53\x69\x6C\x65\x6E\x63\x65\x54\x68\x72\x65\x73\x68\x6F\x6C\x64","\x64\x69\x61\x6C\x41\x4D\x44\x4D\x61\x78\x69\x6D\x75\x6D\x57\x6F\x72\x64\x4C\x65\x6E\x67\x74\x68","\x74\x69\x6D\x65\x6F\x75\x74","\x64\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x4D\x65\x54\x69\x6D\x65\x6F\x75\x74","\x64\x69\x61\x6C\x52\x65\x63\x61\x6C\x6C\x49\x6E\x51\x75\x65\x75\x65","\x64\x69\x61\x6C\x4F\x72\x64\x65\x72\x42\x79\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x41\x74","\x64\x69\x61\x6C\x41\x67\x69\x41\x66\x74\x65\x72\x48\x61\x6E\x67\x75\x70\x41\x67\x65\x6E\x74","\x64\x69\x61\x6C\x41\x67\x69\x41\x66\x74\x65\x72\x48\x61\x6E\x67\x75\x70\x43\x6C\x69\x65\x6E\x74","\x64\x69\x61\x6C\x51\x75\x65\x75\x65\x50\x72\x6F\x6A\x65\x63\x74\x32","\x73\x74\x72\x61\x74\x65\x67\x79","\x54\x72\x75\x6E\x6B","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x61\x63\x74\x69\x76\x65","\x54\x72\x75\x6E\x6B\x42\x61\x63\x6B\x75\x70","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C"];_0xcf89[0];var client=require(_0xcf89[1]);exports[_0xcf89[2]]= function(){return function(){return client.Request(_0xcf89[3],{options:{raw:false,attributes:[_0xcf89[4],_0xcf89[5],_0xcf89[6],_0xcf89[7],_0xcf89[8],_0xcf89[9],_0xcf89[10],_0xcf89[11],_0xcf89[12],_0xcf89[13],_0xcf89[14],_0xcf89[15],_0xcf89[16],_0xcf89[17],_0xcf89[18],_0xcf89[19],_0xcf89[20],_0xcf89[21],_0xcf89[22],_0xcf89[23],_0xcf89[24],_0xcf89[25],_0xcf89[26],_0xcf89[27],_0xcf89[28],_0xcf89[29],_0xcf89[30],_0xcf89[31],_0xcf89[32],_0xcf89[33],_0xcf89[34],_0xcf89[35],_0xcf89[36],_0xcf89[37],_0xcf89[38],_0xcf89[39],_0xcf89[40],_0xcf89[41],_0xcf89[42],_0xcf89[43],_0xcf89[44],_0xcf89[45],_0xcf89[46],_0xcf89[47],_0xcf89[48],_0xcf89[49],_0xcf89[50],_0xcf89[51],_0xcf89[52],_0xcf89[9],_0xcf89[53]],include:[{model:_0xcf89[54],as:_0xcf89[54],attributes:[_0xcf89[4],_0xcf89[5],_0xcf89[55],_0xcf89[56]]},{model:_0xcf89[54],as:_0xcf89[57],attributes:[_0xcf89[4],_0xcf89[5],_0xcf89[55],_0xcf89[56]]},{model:_0xcf89[58],as:_0xcf89[58],attributes:[_0xcf89[4],_0xcf89[5]],include:[{model:_0xcf89[58],as:_0xcf89[59],attributes:[_0xcf89[4],_0xcf89[5],_0xcf89[60]]}]}]},log:_0xcf89[2]})}}
\ No newline at end of file
index d61e716..4b1c646 100644 (file)
@@ -1 +1 @@
-var _0xfbac=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x73","\x47\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x65\x6E\x64\x4F\x66","\x75\x6E\x69\x71\x75\x65\x69\x64","\x71\x75\x65\x75\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x47\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x73"];_0xfbac[0];var moment=require(_0xfbac[1]);var _=require(_0xfbac[2]);var client=require(_0xfbac[3]);exports[_0xfbac[4]]= function(_0xcf9dx4){return client.Request(_0xfbac[5],{body:_0xcf9dx4,log:_0xfbac[5]})};exports[_0xfbac[6]]= function(){return function(){return client.Request(_0xfbac[7],{options:{where:{createdAt:{$between:[moment()[_0xfbac[11]](_0xfbac[10])[_0xfbac[9]](_0xfbac[8]),moment()[_0xfbac[12]](_0xfbac[10])[_0xfbac[9]](_0xfbac[8])]}},attributes:[_0xfbac[13],_0xfbac[14],_0xfbac[15],_0xfbac[16],_0xfbac[17],_0xfbac[18],_0xfbac[19],_0xfbac[20],_0xfbac[21],_0xfbac[22]]},log:_0xfbac[23]})}}
\ No newline at end of file
+var _0x38f8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x73","\x47\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x65\x6E\x64\x4F\x66","\x75\x6E\x69\x71\x75\x65\x69\x64","\x71\x75\x65\x75\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x47\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74\x73"];_0x38f8[0];var moment=require(_0x38f8[1]);var _=require(_0x38f8[2]);var client=require(_0x38f8[3]);exports[_0x38f8[4]]= function(_0xa393x4){return client.Request(_0x38f8[5],{body:_0xa393x4,log:_0x38f8[5]})};exports[_0x38f8[6]]= function(){return function(){return client.Request(_0x38f8[7],{options:{where:{createdAt:{$between:[moment()[_0x38f8[11]](_0x38f8[10])[_0x38f8[9]](_0x38f8[8]),moment()[_0x38f8[12]](_0x38f8[10])[_0x38f8[9]](_0x38f8[8])]}},attributes:[_0x38f8[13],_0x38f8[14],_0x38f8[15],_0x38f8[16],_0x38f8[17],_0x38f8[18],_0x38f8[19],_0x38f8[20],_0x38f8[21],_0x38f8[22]]},log:_0x38f8[23]})}}
\ No newline at end of file
index 4daa9ab..05169a2 100644 (file)
@@ -1 +1 @@
-var _0xb2ad=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x50\x61\x75\x73\x65\x73","\x47\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x50\x61\x75\x73\x65\x73"];_0xb2ad[0];var client=require(_0xb2ad[1]);exports[_0xb2ad[2]]= function(_0xfdb5x2){return function(){return client.Request(_0xb2ad[3],{options:{where:{VoiceQueueId:_0xfdb5x2,paused:true},raw:true},log:_0xb2ad[2]})}}
\ No newline at end of file
+var _0xf753=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x50\x61\x75\x73\x65\x73","\x47\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x52\x74\x50\x61\x75\x73\x65\x73"];_0xf753[0];var client=require(_0xf753[1]);exports[_0xf753[2]]= function(_0x9ca0x2){return function(){return client.Request(_0xf753[3],{options:{where:{VoiceQueueId:_0x9ca0x2,paused:true},raw:true},log:_0xf753[2]})}}
\ No newline at end of file
index ea75a2c..5255765 100644 (file)
@@ -1 +1 @@
-var _0xe636=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x6D\x6F\x6E\x69\x74\x6F\x72\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x6D\x65\x72\x67\x65"];_0xe636[0];var _=require(_0xe636[1]);var client=require(_0xe636[2]);exports[_0xe636[3]]= function(_0x55d7x3){return client.Request(_0xe636[4],{body:_[_0xe636[6]](_0x55d7x3,{value:_0x55d7x3[_0xe636[5]]}),log:_0xe636[4]})}
\ No newline at end of file
+var _0x95d3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x6D\x6F\x6E\x69\x74\x6F\x72\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x6D\x65\x72\x67\x65"];_0x95d3[0];var _=require(_0x95d3[1]);var client=require(_0x95d3[2]);exports[_0x95d3[3]]= function(_0xd7d6x3){return client.Request(_0x95d3[4],{body:_[_0x95d3[6]](_0xd7d6x3,{value:_0xd7d6x3[_0x95d3[5]]}),log:_0x95d3[4]})}
\ No newline at end of file
index b425a5c..9d85871 100644 (file)
@@ -1 +1 @@
-var _0xa849=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x62\x6C\x69\x6E\x64\x54\x72\x61\x6E\x73\x66\x65\x72","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74","\x72\x65\x73\x75\x6C\x74","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x74\x65\x78\x74","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x65\x78\x74\x65\x6E","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x63\x6F\x6E\x74\x65\x78\x74","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x65\x78\x74\x65\x6E","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x69\x73\x65\x78\x74\x65\x72\x6E\x61\x6C","\x63\x6F\x6E\x74\x65\x78\x74","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x62\x6C\x69\x6E\x64","\x61\x74\x74\x65\x6E\x64\x65\x64\x54\x72\x61\x6E\x73\x66\x65\x72","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x68\x61\x6E\x6E\x65\x6C","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x74\x65\x78\x74","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x65\x78\x74\x65\x6E","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x6F\x6E\x74\x65\x78\x74","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x65\x78\x74\x65\x6E","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x74\x65\x78\x74","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x65\x78\x74\x65\x6E","\x61\x74\x74\x65\x6E\x64\x65\x64"];_0xa849[0];var client=require(_0xa849[1]);exports[_0xa849[2]]= function(_0x3087x2){return client.Request(_0xa849[3],{body:{result:_0x3087x2[_0xa849[4]],transfererchannel:_0x3087x2[_0xa849[5]],transferercalleridnum:_0x3087x2[_0xa849[6]],transferercalleridname:_0x3087x2[_0xa849[7]],transfererconnectedlinenum:_0x3087x2[_0xa849[8]],transfererconnectedlinename:_0x3087x2[_0xa849[9]],transfereraccountcode:_0x3087x2[_0xa849[10]],transferercontext:_0x3087x2[_0xa849[11]],transfererexten:_0x3087x2[_0xa849[12]],transfererlinkedid:_0x3087x2[_0xa849[13]],transfereechannel:_0x3087x2[_0xa849[14]],transfereecalleridnum:_0x3087x2[_0xa849[15]],transfereecalleridname:_0x3087x2[_0xa849[16]],transfereeconnectedlinenum:_0x3087x2[_0xa849[17]],transfereeconnectedlinename:_0x3087x2[_0xa849[18]],transfereeaccountcode:_0x3087x2[_0xa849[19]],transfereecontext:_0x3087x2[_0xa849[20]],transfereeexten:_0x3087x2[_0xa849[21]],transfereelinkedid:_0x3087x2[_0xa849[22]],isexternal:_0x3087x2[_0xa849[23]],context:_0x3087x2[_0xa849[24]],extension:_0x3087x2[_0xa849[25]],type:_0xa849[26]},log:_0xa849[3]})};exports[_0xa849[27]]= function(_0x3087x2){return client.Request(_0xa849[3],{body:{result:_0x3087x2[_0xa849[4]],transfererchannel:_0x3087x2[_0xa849[28]],transferercalleridnum:_0x3087x2[_0xa849[29]],transferercalleridname:_0x3087x2[_0xa849[30]],transfererconnectedlinenum:_0x3087x2[_0xa849[31]],transfererconnectedlinename:_0x3087x2[_0xa849[32]],transfereraccountcode:_0x3087x2[_0xa849[33]],transferercontext:_0x3087x2[_0xa849[34]],transfererexten:_0x3087x2[_0xa849[35]],transfererlinkedid:_0x3087x2[_0xa849[36]],transfereechannel:_0x3087x2[_0xa849[37]],transfereecalleridnum:_0x3087x2[_0xa849[38]],transfereecalleridname:_0x3087x2[_0xa849[39]],transfereeconnectedlinenum:_0x3087x2[_0xa849[40]],transfereeconnectedlinename:_0x3087x2[_0xa849[41]],transfereeaccountcode:_0x3087x2[_0xa849[42]],transfereecontext:_0x3087x2[_0xa849[43]],transfereeexten:_0x3087x2[_0xa849[44]],transfereelinkedid:_0x3087x2[_0xa849[45]],isexternal:_0x3087x2[_0xa849[23]],context:_0x3087x2[_0xa849[46]],extension:_0x3087x2[_0xa849[47]],type:_0xa849[48]},log:_0xa849[3]})}
\ No newline at end of file
+var _0x4469=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x62\x6C\x69\x6E\x64\x54\x72\x61\x6E\x73\x66\x65\x72","\x43\x72\x65\x61\x74\x65\x56\x6F\x69\x63\x65\x54\x72\x61\x6E\x73\x66\x65\x72\x52\x65\x70\x6F\x72\x74","\x72\x65\x73\x75\x6C\x74","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x74\x65\x78\x74","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x65\x78\x74\x65\x6E","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x63\x6F\x6E\x74\x65\x78\x74","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x65\x78\x74\x65\x6E","\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x65\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x69\x73\x65\x78\x74\x65\x72\x6E\x61\x6C","\x63\x6F\x6E\x74\x65\x78\x74","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x62\x6C\x69\x6E\x64","\x61\x74\x74\x65\x6E\x64\x65\x64\x54\x72\x61\x6E\x73\x66\x65\x72","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x68\x61\x6E\x6E\x65\x6C","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x74\x65\x78\x74","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x65\x78\x74\x65\x6E","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x6F\x6E\x74\x65\x78\x74","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x65\x78\x74\x65\x6E","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x74\x65\x78\x74","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x65\x78\x74\x65\x6E","\x61\x74\x74\x65\x6E\x64\x65\x64"];_0x4469[0];var client=require(_0x4469[1]);exports[_0x4469[2]]= function(_0x863bx2){return client.Request(_0x4469[3],{body:{result:_0x863bx2[_0x4469[4]],transfererchannel:_0x863bx2[_0x4469[5]],transferercalleridnum:_0x863bx2[_0x4469[6]],transferercalleridname:_0x863bx2[_0x4469[7]],transfererconnectedlinenum:_0x863bx2[_0x4469[8]],transfererconnectedlinename:_0x863bx2[_0x4469[9]],transfereraccountcode:_0x863bx2[_0x4469[10]],transferercontext:_0x863bx2[_0x4469[11]],transfererexten:_0x863bx2[_0x4469[12]],transfererlinkedid:_0x863bx2[_0x4469[13]],transfereechannel:_0x863bx2[_0x4469[14]],transfereecalleridnum:_0x863bx2[_0x4469[15]],transfereecalleridname:_0x863bx2[_0x4469[16]],transfereeconnectedlinenum:_0x863bx2[_0x4469[17]],transfereeconnectedlinename:_0x863bx2[_0x4469[18]],transfereeaccountcode:_0x863bx2[_0x4469[19]],transfereecontext:_0x863bx2[_0x4469[20]],transfereeexten:_0x863bx2[_0x4469[21]],transfereelinkedid:_0x863bx2[_0x4469[22]],isexternal:_0x863bx2[_0x4469[23]],context:_0x863bx2[_0x4469[24]],extension:_0x863bx2[_0x4469[25]],type:_0x4469[26]},log:_0x4469[3]})};exports[_0x4469[27]]= function(_0x863bx2){return client.Request(_0x4469[3],{body:{result:_0x863bx2[_0x4469[4]],transfererchannel:_0x863bx2[_0x4469[28]],transferercalleridnum:_0x863bx2[_0x4469[29]],transferercalleridname:_0x863bx2[_0x4469[30]],transfererconnectedlinenum:_0x863bx2[_0x4469[31]],transfererconnectedlinename:_0x863bx2[_0x4469[32]],transfereraccountcode:_0x863bx2[_0x4469[33]],transferercontext:_0x863bx2[_0x4469[34]],transfererexten:_0x863bx2[_0x4469[35]],transfererlinkedid:_0x863bx2[_0x4469[36]],transfereechannel:_0x863bx2[_0x4469[37]],transfereecalleridnum:_0x863bx2[_0x4469[38]],transfereecalleridname:_0x863bx2[_0x4469[39]],transfereeconnectedlinenum:_0x863bx2[_0x4469[40]],transfereeconnectedlinename:_0x863bx2[_0x4469[41]],transfereeaccountcode:_0x863bx2[_0x4469[42]],transfereecontext:_0x863bx2[_0x4469[43]],transfereeexten:_0x863bx2[_0x4469[44]],transfereelinkedid:_0x863bx2[_0x4469[45]],isexternal:_0x863bx2[_0x4469[23]],context:_0x863bx2[_0x4469[46]],extension:_0x863bx2[_0x4469[47]],type:_0x4469[48]},log:_0x4469[3]})}
\ No newline at end of file
index 17e5e20..1b1195a 100644 (file)
@@ -1 +1 @@
-var _0xe5ba=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x76\x61\x6C\x69\x64\x61\x74\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x70\x72\x6F\x70\x65\x72\x74\x69\x65\x73","\x2E\x2E\x2F\x61\x6D\x69","\x6C\x69\x73\x74\x65\x6E","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x74\x69\x6D\x65\x72\x73","\x74\x69\x6D\x65\x72","\x75\x70\x64\x61\x74\x65\x41\x63\x77","\x61\x67\x65\x6E\x74\x73","\x70\x61\x75\x73\x65","\x75\x70\x64\x61\x74\x65\x53\x74\x61\x74\x75\x73\x52\x65\x61\x6C\x74\x69\x6D\x65","\x51\x75\x65\x75\x65\x50\x61\x75\x73\x65","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x20","\x6A\x6F\x69\x6E","\x69\x70","\x61\x73\x74\x65\x72\x69\x73\x6B","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x61\x6D\x69\x20\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x65\x72\x72\x6F\x72","\x6D\x6F\x64\x75\x6C\x65","\x6B\x65\x79\x73","\x70\x69\x63\x6B","\x61\x63\x74\x69\x6F\x6E","\x52\x65\x6C\x6F\x61\x64","\x6D\x65\x73\x73\x61\x67\x65","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x63\x6F\x6D\x6D\x61\x6E\x64","\x43\x6F\x6D\x6D\x61\x6E\x64","\x63\x6F\x6E\x74\x65\x6E\x74","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x76\x61\x6C\x75\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x76\x6F\x69\x63\x65\x63\x68\x61\x6E\x6E\x65\x6C","\x2C\x20","\x6D\x61\x70","\x75\x6E\x69\x71\x75\x65\x69\x64","\x66\x69\x6E\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x25\x73\x2E\x25\x73","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x77\x61\x76","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x73","\x2F\x76\x61\x72\x2F\x73\x70\x6F\x6F\x6C\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x6D\x6F\x6E\x69\x74\x6F\x72\x2F","\x69\x73\x4E\x69\x6C","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x6D\x69\x78\x6D\x6F\x6E\x69\x74\x6F\x72\x69\x64","\x72\x65\x63","\x70\x75\x73\x68","\x73\x74\x61\x74\x75\x73","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72\x20\x53\x75\x63\x63\x65\x73\x73","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x61\x69\x28\x6D\x69\x78\x6D\x6F\x6E\x69\x74\x6F\x72\x69\x64\x29","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x64\x6F\x65\x73\x6E\x27\x74\x20\x65\x78\x69\x73\x74","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72\x20\x53\x75\x63\x63\x65\x73\x73","\x73\x74\x6F\x70","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x72\x65\x73\x6F\x6C\x76\x65","\x71\x75\x65\x75\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x76\x6F\x69\x63\x65\x71\x75\x65\x75\x65\x63\x68\x61\x6E\x6E\x65\x6C","\x76\x6F\x69\x63\x65\x71\x75\x65\x75\x65\x63\x68\x61\x6E\x6E\x65\x6C\x68\x61\x6E\x67\x75\x70","\x48\x61\x6E\x67\x75\x70","\x76\x6F\x69\x63\x65\x71\x75\x65\x75\x65\x63\x68\x61\x6E\x6E\x65\x6C\x72\x65\x64\x69\x72\x65\x63\x74","\x52\x65\x64\x69\x72\x65\x63\x74","\x65\x78\x74\x65\x6E","\x63\x6F\x6E\x74\x65\x78\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x74\x72\x75\x6E\x6B\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x69\x64","\x72\x75\x6E","\x65\x76\x65\x6E\x74","\x45\x76\x65\x6E\x74\x20\x6E\x61\x6D\x65\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","\x63\x75\x73\x74\x6F\x6D\x3A","\x65\x6D\x69\x74","\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x73\x65\x6E\x64","\x63\x68\x65\x63\x6B\x41\x66\x74\x65\x72\x53\x65\x6E\x64","\x68\x74\x74\x70","\x73\x65\x72\x76\x65\x72","\x6F\x6E","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31","\x41\x4D\x49\x20\x52\x50\x43\x20\x73\x65\x72\x76\x65\x72\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x3A\x25\x64\x21","\x6C\x6F\x67","\x52\x50\x43\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x70\x6F\x72\x74\x3A"];_0xe5ba[0];var _=require(_0xe5ba[1]);var util=require(_0xe5ba[2]);var jayson=require(_0xe5ba[3]);var schema=require(_0xe5ba[4]);var BPromise=require(_0xe5ba[5]);var moment=require(_0xe5ba[6]);var config=require(_0xe5ba[7]);var properties=require(_0xe5ba[8]);var ami=require(_0xe5ba[9]);exports[_0xe5ba[10]]= function(_0xa034xa,_0xa034xb,_0xa034xc){return  new BPromise(function(_0xa034xd,_0xa034xe){var _0xa034xf={QueuePause:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x11=util[_0xe5ba[14]](_0xe5ba[11],_0xe5ba[12],_0xa034x10[_0xe5ba[13]]);if(_0xa034xa[_0xe5ba[15]]&& _0xa034xa[_0xe5ba[15]][_0xa034x11]&& _0xa034xa[_0xe5ba[15]][_0xa034x11][_0xe5ba[16]]){_0xa034xa[_0xe5ba[15]][_0xa034x11][_0xe5ba[17]]()};if(_0xa034xa[_0xe5ba[18]][_0xa034x11]){_0xa034xa[_0xe5ba[18]][_0xa034x11][_0xe5ba[20]]({statePause:_0xa034x10[_0xe5ba[19]]?true:false})};_0xa034xd({code:200,message:_0xe5ba[21]})})},Reload:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){if(ami[_0xe5ba[22]]()== false){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,[config[_0xe5ba[26]][_0xe5ba[25]],config[_0xe5ba[26]][_0xe5ba[27]],_0xe5ba[28]][_0xe5ba[24]](_0xe5ba[23])))};_0xa034x10= _[_0xe5ba[32]](_0xa034x10,_[_0xe5ba[31]](properties[_0xe5ba[30]]));_0xa034x10[_0xe5ba[33]]= _0xe5ba[34];return ami.Action(_0xa034x10)[_0xe5ba[37]](function(_0xa034x14){_0xa034xd({code:200,message:_0xa034x14[_0xe5ba[35]]})})[_0xe5ba[36]](function(_0xa034x13){_0xa034xe(_0xa034x12[_0xe5ba[29]](501,_0xa034x13[_0xe5ba[35]]))})})},Command:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){if(ami[_0xe5ba[22]]()== false){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,[config[_0xe5ba[26]][_0xe5ba[25]],config[_0xe5ba[26]][_0xe5ba[27]],_0xe5ba[28]][_0xe5ba[24]](_0xe5ba[23])))};_0xa034x10= _[_0xe5ba[32]](_0xa034x10,_0xe5ba[38]);_0xa034x10[_0xe5ba[33]]= _0xe5ba[39];return ami.Action(_0xa034x10)[_0xe5ba[37]](function(_0xa034x14){_0xa034xd({code:200,message:_0xa034x14[_0xe5ba[40]]})})[_0xe5ba[36]](function(_0xa034x13){_0xa034xe(_0xa034x12[_0xe5ba[29]](501,_0xa034x13[_0xe5ba[35]]))})})},VoiceQueues:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x15=_[_0xe5ba[42]](_0xa034xa[_0xe5ba[41]]);_0xa034xd({count:_0xa034x15[_0xe5ba[43]],rows:_0xa034x15})})},VoiceChannels:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x15=_[_0xe5ba[42]](_0xa034xa[_0xe5ba[44]]);_0xa034xd({count:_0xa034x15[_0xe5ba[43]],rows:_0xa034x15})})},VoiceChannelMixMonitor:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){if(ami[_0xe5ba[22]]()== false){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,[config[_0xe5ba[26]][_0xe5ba[25]],config[_0xe5ba[26]][_0xe5ba[27]],_0xe5ba[28]][_0xe5ba[24]](_0xe5ba[23])))};var _0xa034x16=schema(properties[_0xe5ba[45]])[_0xe5ba[4]](_0xa034x10);if(_0xa034x16[_0xe5ba[43]]> 0){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,_[_0xe5ba[47]](_0xa034x16,_0xe5ba[35])[_0xe5ba[24]](_0xe5ba[46])))};var _0xa034x17=_[_0xe5ba[49]](_0xa034xa[_0xe5ba[44]],{uniqueid:_0xa034x10[_0xe5ba[48]]});if(_0xa034x17&& _0xa034x17[_0xe5ba[50]]){var _0xa034x18=util[_0xe5ba[14]](_0xe5ba[51],_0xa034x10[_0xe5ba[52]]|| _0xa034x10[_0xe5ba[48]],_0xa034x10[_0xe5ba[14]]|| _0xe5ba[53]);return ami.Action({action:_0xe5ba[64],channel:_0xa034x17[_0xe5ba[50]],file:_0xa034x18,options:_0xe5ba[65]})[_0xe5ba[37]](function(_0xa034x14){var _0xa034x19=_[_0xe5ba[49]](_0xa034x17[_0xe5ba[55]],{filename:_0xe5ba[56]+ _0xa034x18[_0xe5ba[54]]()});if(_[_0xe5ba[57]](_0xa034x19)){_0xa034x17[_0xe5ba[55]][_0xe5ba[61]]({filename:_0xe5ba[56]+ _0xa034x18[_0xe5ba[54]](),createdAt:moment()[_0xe5ba[14]](_0xe5ba[58]),mixmonitorid:_0xa034x14[_0xe5ba[59]],status:_0xe5ba[60]})}else {_0xa034x19[_0xe5ba[59]]= _0xa034x14[_0xe5ba[59]];_0xa034x19[_0xe5ba[62]]= _0xe5ba[60]};_0xa034xd({code:200,message:[_0xa034x10[_0xe5ba[48]],_0xe5ba[63],_0xa034x14[_0xe5ba[59]]][_0xe5ba[24]](_0xe5ba[23]),mixmonitorid:_0xa034x14[_0xe5ba[59]]})})[_0xe5ba[36]](function(_0xa034x13){_0xa034xe(_0xa034x12[_0xe5ba[29]](501,[_0xa034x10[_0xe5ba[48]],_0xa034x13[_0xe5ba[35]][_0xe5ba[54]]()][_0xe5ba[24]](_0xe5ba[23])))})}else {return _0xa034xe(_0xa034x12[_0xe5ba[29]](501,_0xe5ba[66]))}})},VoiceChannelStopMixMonitor:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){if(ami[_0xe5ba[22]]()== false){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,[config[_0xe5ba[26]][_0xe5ba[25]],config[_0xe5ba[26]][_0xe5ba[27]],_0xe5ba[28]][_0xe5ba[24]](_0xe5ba[23])))};var _0xa034x16=schema(properties[_0xe5ba[45]])[_0xe5ba[4]](_0xa034x10);if(_0xa034x16[_0xe5ba[43]]> 0){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,_[_0xe5ba[47]](_0xa034x16,_0xe5ba[35])[_0xe5ba[24]](_0xe5ba[46])))};var _0xa034x17=_[_0xe5ba[49]](_0xa034xa[_0xe5ba[44]],{uniqueid:_0xa034x10[_0xe5ba[48]]});if(_0xa034x17){return BPromise[_0xe5ba[71]]()[_0xe5ba[37]](function(){if(_0xa034x17[_0xe5ba[50]]){return ami.Action({action:_0xe5ba[70],channel:_0xa034x17[_0xe5ba[50]],mixmonitorid:_0xa034x10[_0xe5ba[59]]})[_0xe5ba[36]](function(_0xa034x13){})}})[_0xe5ba[37]](function(){if(_0xa034x17[_0xe5ba[69]]){return ami.Action({action:_0xe5ba[70],channel:_0xa034x17[_0xe5ba[69]],mixmonitorid:_0xa034x10[_0xe5ba[59]]})[_0xe5ba[36]](function(_0xa034x13){})}})[_0xe5ba[37]](function(_0xa034x14){var _0xa034x19=_[_0xe5ba[49]](_0xa034x17[_0xe5ba[55]],{mixmonitorid:_0xa034x10[_0xe5ba[59]]});if(_0xa034x19){_0xa034x19[_0xe5ba[62]]= _0xe5ba[68]}})[_0xe5ba[37]](function(){var _0xa034x18=util[_0xe5ba[14]](_0xe5ba[51],_0xa034x10[_0xe5ba[52]]|| _0xa034x10[_0xe5ba[48]],_0xa034x10[_0xe5ba[14]]|| _0xe5ba[53]);var _0xa034x19=_[_0xe5ba[49]](_0xa034x17[_0xe5ba[55]],{filename:_0xe5ba[56]+ _0xa034x18[_0xe5ba[54]]()});if(_0xa034x19){_0xa034x19[_0xe5ba[62]]= _0xe5ba[68]}})[_0xe5ba[37]](function(){_0xa034xd({code:200,message:[_0xa034x10[_0xe5ba[48]],_0xe5ba[67]][_0xe5ba[24]](_0xe5ba[23])})})[_0xe5ba[36]](function(_0xa034x13){_0xa034xe(_0xa034x12[_0xe5ba[29]](501,[_0xa034x10[_0xe5ba[48]],_0xa034x13[_0xe5ba[35]][_0xe5ba[54]]()][_0xe5ba[24]](_0xe5ba[23])))})}else {return _0xa034xe(_0xa034x12[_0xe5ba[29]](501,_0xe5ba[66]))}})},VoiceQueuesChannels:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x15=_[_0xe5ba[42]](_0xa034xa[_0xe5ba[72]]);_0xa034xd({count:_0xa034x15[_0xe5ba[43]],rows:_0xa034x15})})},VoiceQueuesChannel:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x16=schema(properties[_0xe5ba[73]])[_0xe5ba[4]](_0xa034x10);if(_0xa034x16[_0xe5ba[43]]> 0){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,_[_0xe5ba[47]](_0xa034x16,_0xe5ba[35])[_0xe5ba[24]](_0xe5ba[46])))};var _0xa034x17=_[_0xe5ba[49]](_0xa034xa[_0xe5ba[72]],{uniqueid:_0xa034x10[_0xe5ba[48]]});if(_0xa034x17){_0xa034xd(_0xa034x17)}else {return _0xa034xe(_0xa034x12[_0xe5ba[29]](501,_0xe5ba[66]))}})},VoiceQueuesChannelHangup:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){if(ami[_0xe5ba[22]]()== false){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,[config[_0xe5ba[26]][_0xe5ba[25]],config[_0xe5ba[26]][_0xe5ba[27]],_0xe5ba[28]][_0xe5ba[24]](_0xe5ba[23])))};var _0xa034x16=schema(properties[_0xe5ba[74]])[_0xe5ba[4]](_0xa034x10);if(_0xa034x16[_0xe5ba[43]]> 0){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,_[_0xe5ba[47]](_0xa034x16,_0xe5ba[35])[_0xe5ba[24]](_0xe5ba[46])))};var _0xa034x17=_[_0xe5ba[49]](_0xa034xa[_0xe5ba[72]],{uniqueid:_0xa034x10[_0xe5ba[48]]});if(_0xa034x17&& _0xa034x17[_0xe5ba[50]]){return ami.Action({action:_0xe5ba[75],channel:_0xa034x17[_0xe5ba[50]]})[_0xe5ba[37]](function(_0xa034x14){_0xa034xd({code:200,message:[_0xa034x10[_0xe5ba[48]],_0xa034x14[_0xe5ba[35]][_0xe5ba[54]]()][_0xe5ba[24]](_0xe5ba[23])})})[_0xe5ba[36]](function(_0xa034x13){_0xa034xe(_0xa034x12[_0xe5ba[29]](501,[_0xa034x10[_0xe5ba[48]],_0xa034x13[_0xe5ba[35]][_0xe5ba[54]]()][_0xe5ba[24]](_0xe5ba[23])))})}else {return _0xa034xe(_0xa034x12[_0xe5ba[29]](501,_0xe5ba[66]))}})},VoiceQueuesChannelRedirect:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){if(ami[_0xe5ba[22]]()== false){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,[config[_0xe5ba[26]][_0xe5ba[25]],config[_0xe5ba[26]][_0xe5ba[27]],_0xe5ba[28]][_0xe5ba[24]](_0xe5ba[23])))};var _0xa034x16=schema(properties[_0xe5ba[76]])[_0xe5ba[4]](_0xa034x10);if(_0xa034x16[_0xe5ba[43]]> 0){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,_[_0xe5ba[47]](_0xa034x16,_0xe5ba[35])[_0xe5ba[24]](_0xe5ba[46])))};var _0xa034x17=_[_0xe5ba[49]](_0xa034xa[_0xe5ba[72]],{uniqueid:_0xa034x10[_0xe5ba[48]]});if(_0xa034x17&& _0xa034x17[_0xe5ba[50]]){return ami.Action({action:_0xe5ba[77],channel:_0xa034x17[_0xe5ba[50]],exten:_0xa034x10[_0xe5ba[78]],context:_0xa034x17[_0xe5ba[79]],priority:1})[_0xe5ba[37]](function(_0xa034x14){_0xa034xd({code:200,message:[_0xa034x10[_0xe5ba[48]],_0xa034x14[_0xe5ba[35]][_0xe5ba[54]]()][_0xe5ba[24]](_0xe5ba[23])})})[_0xe5ba[36]](function(_0xa034x13){_0xa034xe(_0xa034x12[_0xe5ba[29]](501,[_0xa034x10[_0xe5ba[48]],_0xa034x13[_0xe5ba[35]][_0xe5ba[54]]()][_0xe5ba[24]](_0xe5ba[23])))})}else {return _0xa034xe(_0xa034x12[_0xe5ba[29]](501,_0xe5ba[66]))}})},Agents:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x15=_[_0xe5ba[42]](_0xa034xa[_0xe5ba[18]]);_0xa034xd({count:_0xa034x15[_0xe5ba[43]],rows:_0xa034x15})})},Telephones:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x15=_[_0xe5ba[42]](_0xa034xa[_0xe5ba[80]]);_0xa034xd({count:_0xa034x15[_0xe5ba[43]],rows:_0xa034x15})})},Trunks:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x15=_[_0xe5ba[42]](_0xa034xa[_0xe5ba[81]]);_0xa034xd({count:_0xa034x15[_0xe5ba[43]],rows:_0xa034x15})})},OutboundChannels:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x15=_[_0xe5ba[42]](_0xa034xa[_0xe5ba[82]]);_0xa034xd({count:_0xa034x15[_0xe5ba[43]],rows:_0xa034x15})})},Outbound:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){_0xa034xd(_0xa034xa[_0xe5ba[83]])})},Campaigns:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x15=_[_0xe5ba[42]](_0xa034xa[_0xe5ba[84]]);_0xa034xd({count:_0xa034x15[_0xe5ba[43]],rows:_0xa034x15})})},VoiceQueuesPreview:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){_0xa034xb[_0xe5ba[86]](_0xa034x10[_0xe5ba[85]])[_0xe5ba[37]](function(_0xa034x14){_0xa034xd({code:200,message:_0xa034x14[_0xe5ba[35]]})})[_0xe5ba[36]](function(_0xa034x13){_0xa034xe(_0xa034x12[_0xe5ba[29]](500,_0xa034x13[_0xe5ba[35]]))})})},EventManager:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){if(!_0xa034x10[_0xe5ba[87]]){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,_0xe5ba[88]))};ami[_0xe5ba[90]](_0xe5ba[89]+ _0xa034x10[_0xe5ba[87]],_0xa034x10[_0xe5ba[35]]);_0xa034xd({code:200,message:_0xa034x10})})},FaxAccounts:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x15=_[_0xe5ba[42]](_0xa034xa[_0xe5ba[91]]);_0xa034xd({count:_0xa034x15[_0xe5ba[43]],rows:_0xa034x15})})},SendFax:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){_0xa034xc[_0xe5ba[92]](_0xa034x10)[_0xe5ba[37]](function(_0xa034x14){_0xa034xd({code:200,message:_0xa034x14[_0xe5ba[35]]})})[_0xe5ba[36]](function(_0xa034x13){_0xa034xe(_0xa034x12[_0xe5ba[29]](500,_0xa034x13[_0xe5ba[35]]))})})},CheckAfterSend:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){_0xa034xc[_0xe5ba[93]](_0xa034x10)[_0xe5ba[37]](function(_0xa034x14){_0xa034xd({code:200,message:_0xa034x14[_0xe5ba[35]]})})[_0xe5ba[36]](function(_0xa034x13){_0xa034xe(_0xa034x12[_0xe5ba[29]](500,_0xa034x13[_0xe5ba[35]]))})})}};var _0xa034x1a=jayson[_0xe5ba[95]](_0xa034xf)[_0xe5ba[94]]();_0xa034x1a[_0xe5ba[96]](_0xe5ba[29],function(_0xa034x13){return _0xa034xe(_0xa034x13)});_0xa034x1a[_0xe5ba[10]](9002,_0xe5ba[97],function(){console[_0xe5ba[99]](_0xe5ba[98],9002);return _0xa034xd(_0xe5ba[100]+ 9002)})})}
\ No newline at end of file
+var _0x5c84=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x76\x61\x6C\x69\x64\x61\x74\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x70\x72\x6F\x70\x65\x72\x74\x69\x65\x73","\x2E\x2E\x2F\x61\x6D\x69","\x6C\x69\x73\x74\x65\x6E","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x74\x69\x6D\x65\x72\x73","\x74\x69\x6D\x65\x72","\x75\x70\x64\x61\x74\x65\x41\x63\x77","\x61\x67\x65\x6E\x74\x73","\x70\x61\x75\x73\x65","\x75\x70\x64\x61\x74\x65\x53\x74\x61\x74\x75\x73\x52\x65\x61\x6C\x74\x69\x6D\x65","\x51\x75\x65\x75\x65\x50\x61\x75\x73\x65","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x20","\x6A\x6F\x69\x6E","\x69\x70","\x61\x73\x74\x65\x72\x69\x73\x6B","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x61\x6D\x69\x20\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x65\x72\x72\x6F\x72","\x6D\x6F\x64\x75\x6C\x65","\x6B\x65\x79\x73","\x70\x69\x63\x6B","\x61\x63\x74\x69\x6F\x6E","\x52\x65\x6C\x6F\x61\x64","\x6D\x65\x73\x73\x61\x67\x65","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x63\x6F\x6D\x6D\x61\x6E\x64","\x43\x6F\x6D\x6D\x61\x6E\x64","\x63\x6F\x6E\x74\x65\x6E\x74","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x76\x61\x6C\x75\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x76\x6F\x69\x63\x65\x63\x68\x61\x6E\x6E\x65\x6C","\x2C\x20","\x6D\x61\x70","\x75\x6E\x69\x71\x75\x65\x69\x64","\x66\x69\x6E\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x25\x73\x2E\x25\x73","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x77\x61\x76","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x73","\x2F\x76\x61\x72\x2F\x73\x70\x6F\x6F\x6C\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x6D\x6F\x6E\x69\x74\x6F\x72\x2F","\x69\x73\x4E\x69\x6C","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x6D\x69\x78\x6D\x6F\x6E\x69\x74\x6F\x72\x69\x64","\x72\x65\x63","\x70\x75\x73\x68","\x73\x74\x61\x74\x75\x73","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72\x20\x53\x75\x63\x63\x65\x73\x73","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x61\x69\x28\x6D\x69\x78\x6D\x6F\x6E\x69\x74\x6F\x72\x69\x64\x29","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x64\x6F\x65\x73\x6E\x27\x74\x20\x65\x78\x69\x73\x74","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72\x20\x53\x75\x63\x63\x65\x73\x73","\x73\x74\x6F\x70","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x72\x65\x73\x6F\x6C\x76\x65","\x71\x75\x65\x75\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x76\x6F\x69\x63\x65\x71\x75\x65\x75\x65\x63\x68\x61\x6E\x6E\x65\x6C","\x76\x6F\x69\x63\x65\x71\x75\x65\x75\x65\x63\x68\x61\x6E\x6E\x65\x6C\x68\x61\x6E\x67\x75\x70","\x48\x61\x6E\x67\x75\x70","\x76\x6F\x69\x63\x65\x71\x75\x65\x75\x65\x63\x68\x61\x6E\x6E\x65\x6C\x72\x65\x64\x69\x72\x65\x63\x74","\x52\x65\x64\x69\x72\x65\x63\x74","\x65\x78\x74\x65\x6E","\x63\x6F\x6E\x74\x65\x78\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x74\x72\x75\x6E\x6B\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x69\x64","\x72\x75\x6E","\x65\x76\x65\x6E\x74","\x45\x76\x65\x6E\x74\x20\x6E\x61\x6D\x65\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","\x63\x75\x73\x74\x6F\x6D\x3A","\x65\x6D\x69\x74","\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x73\x65\x6E\x64","\x63\x68\x65\x63\x6B\x41\x66\x74\x65\x72\x53\x65\x6E\x64","\x68\x74\x74\x70","\x73\x65\x72\x76\x65\x72","\x6F\x6E","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31","\x41\x4D\x49\x20\x52\x50\x43\x20\x73\x65\x72\x76\x65\x72\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x3A\x25\x64\x21","\x6C\x6F\x67","\x52\x50\x43\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x70\x6F\x72\x74\x3A"];_0x5c84[0];var _=require(_0x5c84[1]);var util=require(_0x5c84[2]);var jayson=require(_0x5c84[3]);var schema=require(_0x5c84[4]);var BPromise=require(_0x5c84[5]);var moment=require(_0x5c84[6]);var config=require(_0x5c84[7]);var properties=require(_0x5c84[8]);var ami=require(_0x5c84[9]);exports[_0x5c84[10]]= function(_0xf0c5xa,_0xf0c5xb,_0xf0c5xc){return  new BPromise(function(_0xf0c5xd,_0xf0c5xe){var _0xf0c5xf={QueuePause:function(_0xf0c5x10){return  new Promise(function(_0xf0c5xd,_0xf0c5xe){var _0xf0c5x11=util[_0x5c84[14]](_0x5c84[11],_0x5c84[12],_0xf0c5x10[_0x5c84[13]]);if(_0xf0c5xa[_0x5c84[15]]&& _0xf0c5xa[_0x5c84[15]][_0xf0c5x11]&& _0xf0c5xa[_0x5c84[15]][_0xf0c5x11][_0x5c84[16]]){_0xf0c5xa[_0x5c84[15]][_0xf0c5x11][_0x5c84[17]]()};if(_0xf0c5xa[_0x5c84[18]][_0xf0c5x11]){_0xf0c5xa[_0x5c84[18]][_0xf0c5x11][_0x5c84[20]]({statePause:_0xf0c5x10[_0x5c84[19]]?true:false})};_0xf0c5xd({code:200,message:_0x5c84[21]})})},Reload:function(_0xf0c5x10){var _0xf0c5x12=this;return  new Promise(function(_0xf0c5xd,_0xf0c5xe){if(ami[_0x5c84[22]]()== false){return _0xf0c5xe(_0xf0c5x12[_0x5c84[29]](500,[config[_0x5c84[26]][_0x5c84[25]],config[_0x5c84[26]][_0x5c84[27]],_0x5c84[28]][_0x5c84[24]](_0x5c84[23])))};_0xf0c5x10= _[_0x5c84[32]](_0xf0c5x10,_[_0x5c84[31]](properties[_0x5c84[30]]));_0xf0c5x10[_0x5c84[33]]= _0x5c84[34];return ami.Action(_0xf0c5x10)[_0x5c84[37]](function(_0xf0c5x14){_0xf0c5xd({code:200,message:_0xf0c5x14[_0x5c84[35]]})})[_0x5c84[36]](function(_0xf0c5x13){_0xf0c5xe(_0xf0c5x12[_0x5c84[29]](501,_0xf0c5x13[_0x5c84[35]]))})})},Command:function(_0xf0c5x10){var _0xf0c5x12=this;return  new Promise(function(_0xf0c5xd,_0xf0c5xe){if(ami[_0x5c84[22]]()== false){return _0xf0c5xe(_0xf0c5x12[_0x5c84[29]](500,[config[_0x5c84[26]][_0x5c84[25]],config[_0x5c84[26]][_0x5c84[27]],_0x5c84[28]][_0x5c84[24]](_0x5c84[23])))};_0xf0c5x10= _[_0x5c84[32]](_0xf0c5x10,_0x5c84[38]);_0xf0c5x10[_0x5c84[33]]= _0x5c84[39];return ami.Action(_0xf0c5x10)[_0x5c84[37]](function(_0xf0c5x14){_0xf0c5xd({code:200,message:_0xf0c5x14[_0x5c84[40]]})})[_0x5c84[36]](function(_0xf0c5x13){_0xf0c5xe(_0xf0c5x12[_0x5c84[29]](501,_0xf0c5x13[_0x5c84[35]]))})})},VoiceQueues:function(_0xf0c5x10){return  new Promise(function(_0xf0c5xd,_0xf0c5xe){var _0xf0c5x15=_[_0x5c84[42]](_0xf0c5xa[_0x5c84[41]]);_0xf0c5xd({count:_0xf0c5x15[_0x5c84[43]],rows:_0xf0c5x15})})},VoiceChannels:function(_0xf0c5x10){return  new Promise(function(_0xf0c5xd,_0xf0c5xe){var _0xf0c5x15=_[_0x5c84[42]](_0xf0c5xa[_0x5c84[44]]);_0xf0c5xd({count:_0xf0c5x15[_0x5c84[43]],rows:_0xf0c5x15})})},VoiceChannelMixMonitor:function(_0xf0c5x10){var _0xf0c5x12=this;return  new Promise(function(_0xf0c5xd,_0xf0c5xe){if(ami[_0x5c84[22]]()== false){return _0xf0c5xe(_0xf0c5x12[_0x5c84[29]](500,[config[_0x5c84[26]][_0x5c84[25]],config[_0x5c84[26]][_0x5c84[27]],_0x5c84[28]][_0x5c84[24]](_0x5c84[23])))};var _0xf0c5x16=schema(properties[_0x5c84[45]])[_0x5c84[4]](_0xf0c5x10);if(_0xf0c5x16[_0x5c84[43]]> 0){return _0xf0c5xe(_0xf0c5x12[_0x5c84[29]](500,_[_0x5c84[47]](_0xf0c5x16,_0x5c84[35])[_0x5c84[24]](_0x5c84[46])))};var _0xf0c5x17=_[_0x5c84[49]](_0xf0c5xa[_0x5c84[44]],{uniqueid:_0xf0c5x10[_0x5c84[48]]});if(_0xf0c5x17&& _0xf0c5x17[_0x5c84[50]]){var _0xf0c5x18=util[_0x5c84[14]](_0x5c84[51],_0xf0c5x10[_0x5c84[52]]|| _0xf0c5x10[_0x5c84[48]],_0xf0c5x10[_0x5c84[14]]|| _0x5c84[53]);return ami.Action({action:_0x5c84[64],channel:_0xf0c5x17[_0x5c84[50]],file:_0xf0c5x18,options:_0x5c84[65]})[_0x5c84[37]](function(_0xf0c5x14){var _0xf0c5x19=_[_0x5c84[49]](_0xf0c5x17[_0x5c84[55]],{filename:_0x5c84[56]+ _0xf0c5x18[_0x5c84[54]]()});if(_[_0x5c84[57]](_0xf0c5x19)){_0xf0c5x17[_0x5c84[55]][_0x5c84[61]]({filename:_0x5c84[56]+ _0xf0c5x18[_0x5c84[54]](),createdAt:moment()[_0x5c84[14]](_0x5c84[58]),mixmonitorid:_0xf0c5x14[_0x5c84[59]],status:_0x5c84[60]})}else {_0xf0c5x19[_0x5c84[59]]= _0xf0c5x14[_0x5c84[59]];_0xf0c5x19[_0x5c84[62]]= _0x5c84[60]};_0xf0c5xd({code:200,message:[_0xf0c5x10[_0x5c84[48]],_0x5c84[63],_0xf0c5x14[_0x5c84[59]]][_0x5c84[24]](_0x5c84[23]),mixmonitorid:_0xf0c5x14[_0x5c84[59]]})})[_0x5c84[36]](function(_0xf0c5x13){_0xf0c5xe(_0xf0c5x12[_0x5c84[29]](501,[_0xf0c5x10[_0x5c84[48]],_0xf0c5x13[_0x5c84[35]][_0x5c84[54]]()][_0x5c84[24]](_0x5c84[23])))})}else {return _0xf0c5xe(_0xf0c5x12[_0x5c84[29]](501,_0x5c84[66]))}})},VoiceChannelStopMixMonitor:function(_0xf0c5x10){var _0xf0c5x12=this;return  new Promise(function(_0xf0c5xd,_0xf0c5xe){if(ami[_0x5c84[22]]()== false){return _0xf0c5xe(_0xf0c5x12[_0x5c84[29]](500,[config[_0x5c84[26]][_0x5c84[25]],config[_0x5c84[26]][_0x5c84[27]],_0x5c84[28]][_0x5c84[24]](_0x5c84[23])))};var _0xf0c5x16=schema(properties[_0x5c84[45]])[_0x5c84[4]](_0xf0c5x10);if(_0xf0c5x16[_0x5c84[43]]> 0){return _0xf0c5xe(_0xf0c5x12[_0x5c84[29]](500,_[_0x5c84[47]](_0xf0c5x16,_0x5c84[35])[_0x5c84[24]](_0x5c84[46])))};var _0xf0c5x17=_[_0x5c84[49]](_0xf0c5xa[_0x5c84[44]],{uniqueid:_0xf0c5x10[_0x5c84[48]]});if(_0xf0c5x17){return BPromise[_0x5c84[71]]()[_0x5c84[37]](function(){if(_0xf0c5x17[_0x5c84[50]]){return ami.Action({action:_0x5c84[70],channel:_0xf0c5x17[_0x5c84[50]],mixmonitorid:_0xf0c5x10[_0x5c84[59]]})[_0x5c84[36]](function(_0xf0c5x13){})}})[_0x5c84[37]](function(){if(_0xf0c5x17[_0x5c84[69]]){return ami.Action({action:_0x5c84[70],channel:_0xf0c5x17[_0x5c84[69]],mixmonitorid:_0xf0c5x10[_0x5c84[59]]})[_0x5c84[36]](function(_0xf0c5x13){})}})[_0x5c84[37]](function(_0xf0c5x14){var _0xf0c5x19=_[_0x5c84[49]](_0xf0c5x17[_0x5c84[55]],{mixmonitorid:_0xf0c5x10[_0x5c84[59]]});if(_0xf0c5x19){_0xf0c5x19[_0x5c84[62]]= _0x5c84[68]}})[_0x5c84[37]](function(){var _0xf0c5x18=util[_0x5c84[14]](_0x5c84[51],_0xf0c5x10[_0x5c84[52]]|| _0xf0c5x10[_0x5c84[48]],_0xf0c5x10[_0x5c84[14]]|| _0x5c84[53]);var _0xf0c5x19=_[_0x5c84[49]](_0xf0c5x17[_0x5c84[55]],{filename:_0x5c84[56]+ _0xf0c5x18[_0x5c84[54]]()});if(_0xf0c5x19){_0xf0c5x19[_0x5c84[62]]= _0x5c84[68]}})[_0x5c84[37]](function(){_0xf0c5xd({code:200,message:[_0xf0c5x10[_0x5c84[48]],_0x5c84[67]][_0x5c84[24]](_0x5c84[23])})})[_0x5c84[36]](function(_0xf0c5x13){_0xf0c5xe(_0xf0c5x12[_0x5c84[29]](501,[_0xf0c5x10[_0x5c84[48]],_0xf0c5x13[_0x5c84[35]][_0x5c84[54]]()][_0x5c84[24]](_0x5c84[23])))})}else {return _0xf0c5xe(_0xf0c5x12[_0x5c84[29]](501,_0x5c84[66]))}})},VoiceQueuesChannels:function(_0xf0c5x10){return  new Promise(function(_0xf0c5xd,_0xf0c5xe){var _0xf0c5x15=_[_0x5c84[42]](_0xf0c5xa[_0x5c84[72]]);_0xf0c5xd({count:_0xf0c5x15[_0x5c84[43]],rows:_0xf0c5x15})})},VoiceQueuesChannel:function(_0xf0c5x10){var _0xf0c5x12=this;return  new Promise(function(_0xf0c5xd,_0xf0c5xe){var _0xf0c5x16=schema(properties[_0x5c84[73]])[_0x5c84[4]](_0xf0c5x10);if(_0xf0c5x16[_0x5c84[43]]> 0){return _0xf0c5xe(_0xf0c5x12[_0x5c84[29]](500,_[_0x5c84[47]](_0xf0c5x16,_0x5c84[35])[_0x5c84[24]](_0x5c84[46])))};var _0xf0c5x17=_[_0x5c84[49]](_0xf0c5xa[_0x5c84[72]],{uniqueid:_0xf0c5x10[_0x5c84[48]]});if(_0xf0c5x17){_0xf0c5xd(_0xf0c5x17)}else {return _0xf0c5xe(_0xf0c5x12[_0x5c84[29]](501,_0x5c84[66]))}})},VoiceQueuesChannelHangup:function(_0xf0c5x10){var _0xf0c5x12=this;return  new Promise(function(_0xf0c5xd,_0xf0c5xe){if(ami[_0x5c84[22]]()== false){return _0xf0c5xe(_0xf0c5x12[_0x5c84[29]](500,[config[_0x5c84[26]][_0x5c84[25]],config[_0x5c84[26]][_0x5c84[27]],_0x5c84[28]][_0x5c84[24]](_0x5c84[23])))};var _0xf0c5x16=schema(properties[_0x5c84[74]])[_0x5c84[4]](_0xf0c5x10);if(_0xf0c5x16[_0x5c84[43]]> 0){return _0xf0c5xe(_0xf0c5x12[_0x5c84[29]](500,_[_0x5c84[47]](_0xf0c5x16,_0x5c84[35])[_0x5c84[24]](_0x5c84[46])))};var _0xf0c5x17=_[_0x5c84[49]](_0xf0c5xa[_0x5c84[72]],{uniqueid:_0xf0c5x10[_0x5c84[48]]});if(_0xf0c5x17&& _0xf0c5x17[_0x5c84[50]]){return ami.Action({action:_0x5c84[75],channel:_0xf0c5x17[_0x5c84[50]]})[_0x5c84[37]](function(_0xf0c5x14){_0xf0c5xd({code:200,message:[_0xf0c5x10[_0x5c84[48]],_0xf0c5x14[_0x5c84[35]][_0x5c84[54]]()][_0x5c84[24]](_0x5c84[23])})})[_0x5c84[36]](function(_0xf0c5x13){_0xf0c5xe(_0xf0c5x12[_0x5c84[29]](501,[_0xf0c5x10[_0x5c84[48]],_0xf0c5x13[_0x5c84[35]][_0x5c84[54]]()][_0x5c84[24]](_0x5c84[23])))})}else {return _0xf0c5xe(_0xf0c5x12[_0x5c84[29]](501,_0x5c84[66]))}})},VoiceQueuesChannelRedirect:function(_0xf0c5x10){var _0xf0c5x12=this;return  new Promise(function(_0xf0c5xd,_0xf0c5xe){if(ami[_0x5c84[22]]()== false){return _0xf0c5xe(_0xf0c5x12[_0x5c84[29]](500,[config[_0x5c84[26]][_0x5c84[25]],config[_0x5c84[26]][_0x5c84[27]],_0x5c84[28]][_0x5c84[24]](_0x5c84[23])))};var _0xf0c5x16=schema(properties[_0x5c84[76]])[_0x5c84[4]](_0xf0c5x10);if(_0xf0c5x16[_0x5c84[43]]> 0){return _0xf0c5xe(_0xf0c5x12[_0x5c84[29]](500,_[_0x5c84[47]](_0xf0c5x16,_0x5c84[35])[_0x5c84[24]](_0x5c84[46])))};var _0xf0c5x17=_[_0x5c84[49]](_0xf0c5xa[_0x5c84[72]],{uniqueid:_0xf0c5x10[_0x5c84[48]]});if(_0xf0c5x17&& _0xf0c5x17[_0x5c84[50]]){return ami.Action({action:_0x5c84[77],channel:_0xf0c5x17[_0x5c84[50]],exten:_0xf0c5x10[_0x5c84[78]],context:_0xf0c5x17[_0x5c84[79]],priority:1})[_0x5c84[37]](function(_0xf0c5x14){_0xf0c5xd({code:200,message:[_0xf0c5x10[_0x5c84[48]],_0xf0c5x14[_0x5c84[35]][_0x5c84[54]]()][_0x5c84[24]](_0x5c84[23])})})[_0x5c84[36]](function(_0xf0c5x13){_0xf0c5xe(_0xf0c5x12[_0x5c84[29]](501,[_0xf0c5x10[_0x5c84[48]],_0xf0c5x13[_0x5c84[35]][_0x5c84[54]]()][_0x5c84[24]](_0x5c84[23])))})}else {return _0xf0c5xe(_0xf0c5x12[_0x5c84[29]](501,_0x5c84[66]))}})},Agents:function(_0xf0c5x10){return  new Promise(function(_0xf0c5xd,_0xf0c5xe){var _0xf0c5x15=_[_0x5c84[42]](_0xf0c5xa[_0x5c84[18]]);_0xf0c5xd({count:_0xf0c5x15[_0x5c84[43]],rows:_0xf0c5x15})})},Telephones:function(_0xf0c5x10){return  new Promise(function(_0xf0c5xd,_0xf0c5xe){var _0xf0c5x15=_[_0x5c84[42]](_0xf0c5xa[_0x5c84[80]]);_0xf0c5xd({count:_0xf0c5x15[_0x5c84[43]],rows:_0xf0c5x15})})},Trunks:function(_0xf0c5x10){return  new Promise(function(_0xf0c5xd,_0xf0c5xe){var _0xf0c5x15=_[_0x5c84[42]](_0xf0c5xa[_0x5c84[81]]);_0xf0c5xd({count:_0xf0c5x15[_0x5c84[43]],rows:_0xf0c5x15})})},OutboundChannels:function(_0xf0c5x10){return  new Promise(function(_0xf0c5xd,_0xf0c5xe){var _0xf0c5x15=_[_0x5c84[42]](_0xf0c5xa[_0x5c84[82]]);_0xf0c5xd({count:_0xf0c5x15[_0x5c84[43]],rows:_0xf0c5x15})})},Outbound:function(_0xf0c5x10){return  new Promise(function(_0xf0c5xd,_0xf0c5xe){_0xf0c5xd(_0xf0c5xa[_0x5c84[83]])})},Campaigns:function(_0xf0c5x10){return  new Promise(function(_0xf0c5xd,_0xf0c5xe){var _0xf0c5x15=_[_0x5c84[42]](_0xf0c5xa[_0x5c84[84]]);_0xf0c5xd({count:_0xf0c5x15[_0x5c84[43]],rows:_0xf0c5x15})})},VoiceQueuesPreview:function(_0xf0c5x10){var _0xf0c5x12=this;return  new Promise(function(_0xf0c5xd,_0xf0c5xe){_0xf0c5xb[_0x5c84[86]](_0xf0c5x10[_0x5c84[85]])[_0x5c84[37]](function(_0xf0c5x14){_0xf0c5xd({code:200,message:_0xf0c5x14[_0x5c84[35]]})})[_0x5c84[36]](function(_0xf0c5x13){_0xf0c5xe(_0xf0c5x12[_0x5c84[29]](500,_0xf0c5x13[_0x5c84[35]]))})})},EventManager:function(_0xf0c5x10){var _0xf0c5x12=this;return  new Promise(function(_0xf0c5xd,_0xf0c5xe){if(!_0xf0c5x10[_0x5c84[87]]){return _0xf0c5xe(_0xf0c5x12[_0x5c84[29]](500,_0x5c84[88]))};ami[_0x5c84[90]](_0x5c84[89]+ _0xf0c5x10[_0x5c84[87]],_0xf0c5x10[_0x5c84[35]]);_0xf0c5xd({code:200,message:_0xf0c5x10})})},FaxAccounts:function(_0xf0c5x10){return  new Promise(function(_0xf0c5xd,_0xf0c5xe){var _0xf0c5x15=_[_0x5c84[42]](_0xf0c5xa[_0x5c84[91]]);_0xf0c5xd({count:_0xf0c5x15[_0x5c84[43]],rows:_0xf0c5x15})})},SendFax:function(_0xf0c5x10){var _0xf0c5x12=this;return  new Promise(function(_0xf0c5xd,_0xf0c5xe){_0xf0c5xc[_0x5c84[92]](_0xf0c5x10)[_0x5c84[37]](function(_0xf0c5x14){_0xf0c5xd({code:200,message:_0xf0c5x14[_0x5c84[35]]})})[_0x5c84[36]](function(_0xf0c5x13){_0xf0c5xe(_0xf0c5x12[_0x5c84[29]](500,_0xf0c5x13[_0x5c84[35]]))})})},CheckAfterSend:function(_0xf0c5x10){var _0xf0c5x12=this;return  new Promise(function(_0xf0c5xd,_0xf0c5xe){_0xf0c5xc[_0x5c84[93]](_0xf0c5x10)[_0x5c84[37]](function(_0xf0c5x14){_0xf0c5xd({code:200,message:_0xf0c5x14[_0x5c84[35]]})})[_0x5c84[36]](function(_0xf0c5x13){_0xf0c5xe(_0xf0c5x12[_0x5c84[29]](500,_0xf0c5x13[_0x5c84[35]]))})})}};var _0xf0c5x1a=jayson[_0x5c84[95]](_0xf0c5xf)[_0x5c84[94]]();_0xf0c5x1a[_0x5c84[96]](_0x5c84[29],function(_0xf0c5x13){return _0xf0c5xe(_0xf0c5x13)});_0xf0c5x1a[_0x5c84[10]](9002,_0x5c84[97],function(){console[_0x5c84[99]](_0x5c84[98],9002);return _0xf0c5xd(_0x5c84[100]+ 9002)})})}
\ No newline at end of file
index aaf6fac..1b6bddc 100644 (file)
@@ -1 +1 @@
-var _0x8aab=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x74\x72\x69\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x69\x6E\x66\x6F","\x65\x6D\x69\x74","\x74\x6F","\x65\x78\x65\x63","\x61\x75\x74\x6F\x43\x72\x65\x61\x74\x65","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x31","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x72\x6F\x75\x74\x65\x49\x64","\x69\x73\x4E\x69\x6C","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x63\x6F\x6E\x74\x61\x63\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x78\x6D\x64\x2D\x63\x6F\x6E\x74\x61\x63\x74\x69\x64\x32","\x69\x64","\x75\x73\x65\x72\x3A\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x74\x72\x69\x67\x67\x65\x72\x3A\x25\x73","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x63\x74\x69\x6F\x6E","\x6D\x65\x72\x67\x65","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x74\x61\x63\x74","\x72\x65\x73\x6F\x6C\x76\x65","\x6F\x6D\x69\x74","\x73\x68\x6F\x77\x43\x6F\x6E\x74\x61\x63\x74"];_0x8aab[0];var BPromise=require(_0x8aab[1]);var util=require(_0x8aab[2]);var _=require(_0x8aab[3]);var logger=require(_0x8aab[5])(_0x8aab[4]);var cmContactRpc=require(_0x8aab[6]);var io=require(_0x8aab[8])({host:_0x8aab[7],port:6379});function emit(_0x767bx8,_0x767bx9,_0x767bxa){logger[_0x8aab[10]](_0x767bx8,_0x767bx9,JSON[_0x8aab[9]](_0x767bxa));io[_0x8aab[12]](_0x767bx8)[_0x8aab[11]](_0x767bx9,_0x767bxa)}exports[_0x8aab[13]]= function(_0x767bxb,_0x767bxc,_0x767bx9){_0x767bx9[_0x8aab[14]]= 0;if(_0x767bxc[_0x8aab[15]]&& parseInt(_0x767bxc[_0x8aab[15]],10)){var _0x767bxd={ListId:parseInt(_0x767bxc[_0x8aab[16]],10),phone:_0x767bx9[_0x8aab[17]]};if(_[_0x8aab[19]](_0x767bx9[_0x8aab[18]])){_0x767bxd[_0x8aab[20]]= (_0x767bx9[_0x8aab[21]]&& _0x767bx9[_0x8aab[21]]!== _0x8aab[22])?_0x767bx9[_0x8aab[21]]:(_0x767bx9[_0x8aab[17]]|| _0x767bx9[_0x8aab[23]])}else {_0x767bxd[_0x8aab[20]]= (_0x767bx9[_0x8aab[24]]&& _0x767bx9[_0x8aab[24]]!== _0x8aab[22])?_0x767bx9[_0x8aab[24]]:(_0x767bx9[_0x8aab[25]]|| _0x767bx9[_0x8aab[23]])};BPromise[_0x8aab[40]]()[_0x8aab[38]](cmContactRpc[_0x8aab[42]]({where:_[_0x8aab[41]](_0x767bxd,[_0x8aab[20]])}))[_0x8aab[38]](function(_0x767bx10){if(_0x767bx10){_0x767bx9[_0x8aab[29]]= _0x767bx10[_0x8aab[30]];emit(util[_0x8aab[33]](_0x8aab[31],_0x767bxb[_0x8aab[32]]),util[_0x8aab[33]](_0x8aab[34],_0x767bxc[_0x8aab[36]][_0x8aab[35]]()),_[_0x8aab[37]](_0x767bx9,{ListId:parseInt(_0x767bxc[_0x8aab[16]],10)}));return}else {return BPromise[_0x8aab[40]]()[_0x8aab[38]](cmContactRpc[_0x8aab[39]](_0x767bxd))}})[_0x8aab[38]](function(_0x767bxf){if(_0x767bxf){_0x767bx9[_0x8aab[29]]= _0x767bxf[_0x8aab[30]];emit(util[_0x8aab[33]](_0x8aab[31],_0x767bxb[_0x8aab[32]]),util[_0x8aab[33]](_0x8aab[34],_0x767bxc[_0x8aab[36]][_0x8aab[35]]()),_[_0x8aab[37]](_0x767bx9,{ListId:parseInt(_0x767bxc[_0x8aab[16]],10)}))}})[_0x8aab[28]](function(_0x767bxe){logger[_0x8aab[27]](_0x8aab[26],JSON[_0x8aab[9]](_0x767bxe))})}else {if(_0x767bxb){emit(util[_0x8aab[33]](_0x8aab[31],_0x767bxb[_0x8aab[32]]),util[_0x8aab[33]](_0x8aab[34],_0x767bxc[_0x8aab[36]][_0x8aab[35]]()),_[_0x8aab[37]]({ListId:parseInt(_0x767bxc[_0x8aab[16]],10)},_0x767bx9))}}}
\ No newline at end of file
+var _0x3bb8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x74\x72\x69\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x69\x6E\x66\x6F","\x65\x6D\x69\x74","\x74\x6F","\x65\x78\x65\x63","\x61\x75\x74\x6F\x43\x72\x65\x61\x74\x65","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x31","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x72\x6F\x75\x74\x65\x49\x64","\x69\x73\x4E\x69\x6C","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x63\x6F\x6E\x74\x61\x63\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x78\x6D\x64\x2D\x63\x6F\x6E\x74\x61\x63\x74\x69\x64\x32","\x69\x64","\x75\x73\x65\x72\x3A\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x74\x72\x69\x67\x67\x65\x72\x3A\x25\x73","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x63\x74\x69\x6F\x6E","\x6D\x65\x72\x67\x65","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x74\x61\x63\x74","\x72\x65\x73\x6F\x6C\x76\x65","\x6F\x6D\x69\x74","\x73\x68\x6F\x77\x43\x6F\x6E\x74\x61\x63\x74"];_0x3bb8[0];var BPromise=require(_0x3bb8[1]);var util=require(_0x3bb8[2]);var _=require(_0x3bb8[3]);var logger=require(_0x3bb8[5])(_0x3bb8[4]);var cmContactRpc=require(_0x3bb8[6]);var io=require(_0x3bb8[8])({host:_0x3bb8[7],port:6379});function emit(_0x9831x8,_0x9831x9,_0x9831xa){logger[_0x3bb8[10]](_0x9831x8,_0x9831x9,JSON[_0x3bb8[9]](_0x9831xa));io[_0x3bb8[12]](_0x9831x8)[_0x3bb8[11]](_0x9831x9,_0x9831xa)}exports[_0x3bb8[13]]= function(_0x9831xb,_0x9831xc,_0x9831x9){_0x9831x9[_0x3bb8[14]]= 0;if(_0x9831xc[_0x3bb8[15]]&& parseInt(_0x9831xc[_0x3bb8[15]],10)){var _0x9831xd={ListId:parseInt(_0x9831xc[_0x3bb8[16]],10),phone:_0x9831x9[_0x3bb8[17]]};if(_[_0x3bb8[19]](_0x9831x9[_0x3bb8[18]])){_0x9831xd[_0x3bb8[20]]= (_0x9831x9[_0x3bb8[21]]&& _0x9831x9[_0x3bb8[21]]!== _0x3bb8[22])?_0x9831x9[_0x3bb8[21]]:(_0x9831x9[_0x3bb8[17]]|| _0x9831x9[_0x3bb8[23]])}else {_0x9831xd[_0x3bb8[20]]= (_0x9831x9[_0x3bb8[24]]&& _0x9831x9[_0x3bb8[24]]!== _0x3bb8[22])?_0x9831x9[_0x3bb8[24]]:(_0x9831x9[_0x3bb8[25]]|| _0x9831x9[_0x3bb8[23]])};BPromise[_0x3bb8[40]]()[_0x3bb8[38]](cmContactRpc[_0x3bb8[42]]({where:_[_0x3bb8[41]](_0x9831xd,[_0x3bb8[20]])}))[_0x3bb8[38]](function(_0x9831x10){if(_0x9831x10){_0x9831x9[_0x3bb8[29]]= _0x9831x10[_0x3bb8[30]];emit(util[_0x3bb8[33]](_0x3bb8[31],_0x9831xb[_0x3bb8[32]]),util[_0x3bb8[33]](_0x3bb8[34],_0x9831xc[_0x3bb8[36]][_0x3bb8[35]]()),_[_0x3bb8[37]](_0x9831x9,{ListId:parseInt(_0x9831xc[_0x3bb8[16]],10)}));return}else {return BPromise[_0x3bb8[40]]()[_0x3bb8[38]](cmContactRpc[_0x3bb8[39]](_0x9831xd))}})[_0x3bb8[38]](function(_0x9831xf){if(_0x9831xf){_0x9831x9[_0x3bb8[29]]= _0x9831xf[_0x3bb8[30]];emit(util[_0x3bb8[33]](_0x3bb8[31],_0x9831xb[_0x3bb8[32]]),util[_0x3bb8[33]](_0x3bb8[34],_0x9831xc[_0x3bb8[36]][_0x3bb8[35]]()),_[_0x3bb8[37]](_0x9831x9,{ListId:parseInt(_0x9831xc[_0x3bb8[16]],10)}))}})[_0x3bb8[28]](function(_0x9831xe){logger[_0x3bb8[27]](_0x3bb8[26],JSON[_0x3bb8[9]](_0x9831xe))})}else {if(_0x9831xb){emit(util[_0x3bb8[33]](_0x3bb8[31],_0x9831xb[_0x3bb8[32]]),util[_0x3bb8[33]](_0x3bb8[34],_0x9831xc[_0x3bb8[36]][_0x3bb8[35]]()),_[_0x3bb8[37]]({ListId:parseInt(_0x9831xc[_0x3bb8[16]],10)},_0x9831x9))}}}
\ No newline at end of file
index 871c7f0..915fcba 100644 (file)
@@ -1 +1 @@
-var _0x7a50=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x75\x72\x6C","\x6D\x75\x73\x74\x61\x63\x68\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2F\x75\x72\x6C\x66\x6F\x72\x77\x61\x72\x64","\x2E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x74\x72\x69\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x75\x72\x6C\x66\x6F\x72\x77\x61\x72\x64","\x70\x6F\x70\x75\x70","\x77\x69\x6E\x61\x70\x70","\x74\x72\x69\x67\x67\x65\x72\x73","\x61\x67\x65\x6E\x74\x73","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x7A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x73","\x73\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x73","\x7A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x61\x63\x63\x6F\x75\x6E\x74\x73","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x43\x75\x73\x74\x6F\x6D\x45\x76\x65\x6E\x74","\x6F\x6E","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x63\x75\x73\x74\x6F\x6D\x3A\x64\x69\x61\x6C\x62\x65\x67\x69\x6E","\x63\x75\x73\x74\x6F\x6D\x3A\x64\x69\x61\x6C\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x75\x73\x74\x6F\x6D\x3A\x64\x69\x61\x6C\x65\x6E\x64","\x63\x75\x73\x74\x6F\x6D\x3A\x6E\x65\x77\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x63\x75\x73\x74\x6F\x6D\x3A\x63\x6C\x6F\x73\x65\x64\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x63\x75\x73\x74\x6F\x6D\x3A\x69\x6E\x63\x6F\x6D\x69\x6E\x67\x6D\x65\x73\x73\x61\x67\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x6F\x75\x74\x67\x6F\x69\x6E\x67\x6D\x65\x73\x73\x61\x67\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x63\x63\x65\x70\x74\x6D\x65\x73\x73\x61\x67\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x72\x65\x6A\x65\x63\x74\x6D\x65\x73\x73\x61\x67\x65","\x65\x6D\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x69\x6E\x66\x6F","\x74\x6F","\x63\x68\x65\x63\x6B\x54\x72\x69\x67\x67\x65\x72\x73","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x73\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x54\x72\x69\x67\x67\x65\x72","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x6D\x65\x72\x67\x65","\x6C\x65\x6E\x67\x74\x68","\x41\x63\x74\x69\x6F\x6E\x73","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72","\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x54\x65\x6D\x70\x6C\x61\x74\x65\x49\x64","\x64\x61\x74\x61\x32","\x68\x74\x6D\x6C","\x72\x65\x6E\x64\x65\x72","\x74\x65\x6D\x70\x6C\x61\x74\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x75\x72\x69","\x64\x61\x74\x61\x33","\x69\x73\x4E\x69\x6C","\x62\x75\x69\x6C\x64\x55\x72\x69","\x64\x61\x74\x61\x34","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x30","\x75\x72\x69\x4C\x6F\x63\x61\x74\x69\x6F\x6E","\x77\x69\x6E\x64\x6F\x77\x57\x69\x64\x74\x68","\x64\x61\x74\x61\x35","\x38\x30\x30","\x77\x69\x6E\x64\x6F\x77\x48\x65\x69\x67\x68\x74","\x64\x61\x74\x61\x36","\x36\x30\x30","\x77\x69\x6E\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","","\x77\x69\x6E\x41\x72\x67\x75\x6D\x65\x6E\x74\x73","\x64\x61\x74\x61\x31","\x75\x73\x65\x72\x3A\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x74\x72\x69\x67\x67\x65\x72\x3A\x25\x73\x3A\x25\x73","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x63\x74\x69\x6F\x6E","\x62\x72\x6F\x77\x73\x65\x72","\x74\x72\x69\x67\x67\x65\x72\x3A\x25\x73","\x6A\x73\x63\x72\x69\x70\x74\x79","\x65\x78\x65\x63","\x71\x75\x65\x75\x65","\x72\x6F\x75\x74\x65\x49\x64","\x70\x61\x72\x73\x65","\x71\x75\x65\x72\x79","\x73\x65\x61\x72\x63\x68","\x41\x6C\x6C\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x68\x65\x63\x6B\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x65\x76\x65\x72\x79","\x41\x6E\x79\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x73\x6F\x6D\x65","\x63\x68\x61\x74","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x76\x61\x6C\x75\x65","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x75\x70\x70\x65\x72\x46\x69\x72\x73\x74","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x61\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x65\x76\x65\x6E\x74","\x6D\x65\x73\x73\x61\x67\x65","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x66\x69\x65\x6C\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x7a50[0];var util=require(_0x7a50[1]);var _=require(_0x7a50[2]);var url=require(_0x7a50[3]);var Mustache=require(_0x7a50[4]);var BPromise=require(_0x7a50[5]);var urlforward=require(_0x7a50[6]);var integration=require(_0x7a50[7]);var cmContact=require(_0x7a50[8]);var cmContactRpc=require(_0x7a50[9]);var logger=require(_0x7a50[11])(_0x7a50[10]);var ami=require(_0x7a50[12]);var io=require(_0x7a50[14])({host:_0x7a50[13],port:6379});var operators={"\x65\x71\x75\x61\x6C\x73":function(_0x1ef5xe,_0x1ef5xf){return _0x1ef5xe== _0x1ef5xf},"\x6E\x6F\x74\x5F\x65\x71\x75\x61\x6C\x73":function(_0x1ef5xe,_0x1ef5xf){return _0x1ef5xe!= _0x1ef5xf}};var serverActions=[_0x7a50[15],_0x7a50[16]];var barAndWebActions=[_0x7a50[17],_0x7a50[3],_0x7a50[18]];function Trigger(_0x1ef5x13){this[_0x7a50[19]]= _0x1ef5x13[_0x7a50[19]];this[_0x7a50[20]]= _0x1ef5x13[_0x7a50[20]];this[_0x7a50[21]]= _0x1ef5x13[_0x7a50[21]];this[_0x7a50[22]]= _0x1ef5x13[_0x7a50[22]];this[_0x7a50[23]]= _0x1ef5x13[_0x7a50[23]];this[_0x7a50[24]]= _0x1ef5x13[_0x7a50[24]];this[_0x7a50[25]]= _0x1ef5x13[_0x7a50[25]];this[_0x7a50[26]]= _0x1ef5x13[_0x7a50[26]];this[_0x7a50[27]]= _0x1ef5x13[_0x7a50[27]];this[_0x7a50[28]]= _0x1ef5x13[_0x7a50[28]];this[_0x7a50[29]]= _0x1ef5x13[_0x7a50[29]];this[_0x7a50[30]]= {zendesk:this[_0x7a50[24]],salesforce:this[_0x7a50[26]],freshdesk:this[_0x7a50[25]],sugarcrm:this[_0x7a50[27]],zoho:this[_0x7a50[28]],desk:this[_0x7a50[29]]};ami[_0x7a50[34]](_0x7a50[31],this[_0x7a50[33]][_0x7a50[32]](this));ami[_0x7a50[34]](_0x7a50[35],this[_0x7a50[33]][_0x7a50[32]](this));ami[_0x7a50[34]](_0x7a50[36],this[_0x7a50[33]][_0x7a50[32]](this));ami[_0x7a50[34]](_0x7a50[37],this[_0x7a50[33]][_0x7a50[32]](this));ami[_0x7a50[34]](_0x7a50[38],this[_0x7a50[33]][_0x7a50[32]](this));ami[_0x7a50[34]](_0x7a50[39],this[_0x7a50[33]][_0x7a50[32]](this));ami[_0x7a50[34]](_0x7a50[40],this[_0x7a50[33]][_0x7a50[32]](this));ami[_0x7a50[34]](_0x7a50[41],this[_0x7a50[33]][_0x7a50[32]](this));ami[_0x7a50[34]](_0x7a50[42],this[_0x7a50[33]][_0x7a50[32]](this));ami[_0x7a50[34]](_0x7a50[43],this[_0x7a50[33]][_0x7a50[32]](this));ami[_0x7a50[34]](_0x7a50[44],this[_0x7a50[33]][_0x7a50[32]](this));ami[_0x7a50[34]](_0x7a50[45],this[_0x7a50[33]][_0x7a50[32]](this));ami[_0x7a50[34]](_0x7a50[46],this[_0x7a50[33]][_0x7a50[32]](this));ami[_0x7a50[34]](_0x7a50[47],this[_0x7a50[33]][_0x7a50[32]](this))}Trigger[_0x7a50[49]][_0x7a50[48]]= function(_0x1ef5x14,_0x1ef5x15,_0x1ef5x16){logger[_0x7a50[51]](_0x1ef5x14,_0x1ef5x15,JSON[_0x7a50[50]](_0x1ef5x16));io[_0x7a50[52]](_0x1ef5x14)[_0x7a50[48]](_0x1ef5x15,_0x1ef5x16)};Trigger[_0x7a50[49]][_0x7a50[33]]= function(_0x1ef5x15){this[_0x7a50[53]](_0x1ef5x15)};Trigger[_0x7a50[49]][_0x7a50[53]]= function(_0x1ef5x15){var _0x1ef5x17;for(var _0x1ef5x18 in this[_0x7a50[19]]){if(this[_0x7a50[19]][_0x7a50[54]](_0x1ef5x18)){if(this[_0x7a50[19]][_0x1ef5x18][_0x7a50[55]]){_0x1ef5x17= this[_0x7a50[56]](this[_0x7a50[19]][_0x1ef5x18],_0x1ef5x15);if(_0x1ef5x17){_[_0x7a50[58]](_0x1ef5x15,_0x1ef5x15[_0x7a50[57]]);for(var _0x1ef5x19=0,_0x1ef5x1a,_0x1ef5x1b,_0x1ef5x1c;_0x1ef5x19< this[_0x7a50[19]][_0x1ef5x18][_0x7a50[60]][_0x7a50[59]];_0x1ef5x19+= 1){_0x1ef5x1a= this[_0x7a50[19]][_0x1ef5x18][_0x7a50[60]][_0x1ef5x19];if(this[_0x7a50[20]][_0x1ef5x15[_0x7a50[61]]]){switch(_0x1ef5x1a[_0x7a50[92]][_0x7a50[91]]()){case _0x7a50[62]:break;case _0x7a50[63]:;case _0x7a50[93]:var _0x1ef5x16={};switch(barAndWebActions[_0x1ef5x1a[_0x7a50[86]]]){case _0x7a50[17]:_0x1ef5x16[_0x7a50[64]]= _0x1ef5x1a[_0x7a50[65]];_0x1ef5x16[_0x7a50[66]]= this[_0x7a50[22]][_0x1ef5x1a[_0x7a50[65]]]?Mustache[_0x7a50[67]](this[_0x7a50[22]][_0x1ef5x1a[_0x7a50[65]]][_0x7a50[66]],_0x1ef5x15):_0x7a50[68];break;case _0x7a50[3]:_0x1ef5x16[_0x7a50[69]]= this[_0x7a50[72]](_0x1ef5x1a[_0x7a50[65]],_0x1ef5x15,_[_0x7a50[71]](_0x1ef5x1a[_0x7a50[70]])?true:parseInt(_0x1ef5x1a[_0x7a50[70]],10));if(_[_0x7a50[71]](_0x1ef5x1a[_0x7a50[73]])){_0x1ef5x16[_0x7a50[74]]= _0x7a50[75]}else {_0x1ef5x16[_0x7a50[76]]= _0x1ef5x1a[_0x7a50[73]];_0x1ef5x16[_0x7a50[77]]= _[_0x7a50[71]](_0x1ef5x1a[_0x7a50[78]])?_0x7a50[79]:_0x1ef5x1a[_0x7a50[78]];_0x1ef5x16[_0x7a50[80]]= _[_0x7a50[71]](_0x1ef5x1a[_0x7a50[81]])?_0x7a50[82]:_0x1ef5x1a[_0x7a50[81]]};break;case _0x7a50[18]:_0x1ef5x16[_0x7a50[83]]= _0x1ef5x1a[_0x7a50[65]]|| _0x7a50[84];_0x1ef5x16[_0x7a50[85]]= _0x1ef5x1a[_0x7a50[70]]|| _0x7a50[84];break};this[_0x7a50[48]](util[_0x7a50[89]](_0x7a50[87],this[_0x7a50[20]][_0x1ef5x15[_0x7a50[61]]][_0x7a50[88]]),util[_0x7a50[89]](_0x7a50[90],_0x1ef5x1a[_0x7a50[92]][_0x7a50[91]](),barAndWebActions[_0x1ef5x1a[_0x7a50[86]]]),_[_0x7a50[58]](_0x1ef5x16,_0x1ef5x15));break;case _0x7a50[95]:this[_0x7a50[48]](util[_0x7a50[89]](_0x7a50[87],this[_0x7a50[20]][_0x1ef5x15[_0x7a50[61]]][_0x7a50[88]]),util[_0x7a50[89]](_0x7a50[94],_0x1ef5x1a[_0x7a50[92]][_0x7a50[91]]()),_[_0x7a50[58]]({ProjectId:parseInt(_0x1ef5x1a[_0x7a50[86]],10)},_0x1ef5x15));break;default:this[_0x7a50[48]](util[_0x7a50[89]](_0x7a50[87],this[_0x7a50[20]][_0x1ef5x15[_0x7a50[61]]][_0x7a50[88]]),util[_0x7a50[89]](_0x7a50[94],_0x1ef5x1a[_0x7a50[92]][_0x7a50[91]]()),_[_0x7a50[58]]({},_0x1ef5x1a,_0x1ef5x15))}};switch(_0x1ef5x1a[_0x7a50[92]][_0x7a50[91]]()){case _0x7a50[62]:cmContact[_0x7a50[96]](this[_0x7a50[20]][_0x1ef5x15[_0x7a50[61]]],_0x1ef5x1a,_0x1ef5x15,cmContactRpc);break;case _0x7a50[15]:integration[_0x7a50[96]](_0x1ef5x1a,_0x1ef5x15,this[_0x7a50[30]],this[_0x7a50[20]][_0x1ef5x15[_0x7a50[61]]],this[_0x7a50[21]][_0x1ef5x15[_0x7a50[97]]],this[_0x7a50[23]][_0x1ef5x15[_0x7a50[98]]]);break;case _0x7a50[16]:urlforward[_0x7a50[96]](_0x1ef5x1a,_0x1ef5x15);break}}}}}}};Trigger[_0x7a50[49]][_0x7a50[72]]= function(_0x1ef5x1d,_0x1ef5x15,_0x1ef5x1e){var _0x1ef5x1f=url[_0x7a50[99]](Mustache[_0x7a50[67]](_0x1ef5x1d,_0x1ef5x15),true);if(_0x1ef5x1e){_[_0x7a50[58]](_0x1ef5x1f[_0x7a50[100]],_0x1ef5x15)};delete _0x1ef5x1f[_0x7a50[101]];return url[_0x7a50[89]](_0x1ef5x1f)};Trigger[_0x7a50[49]][_0x7a50[56]]= function(_0x1ef5x20,_0x1ef5x15){var _0x1ef5x21=true,_0x1ef5x22=true;if(_0x1ef5x20[_0x7a50[102]][_0x7a50[59]]){_0x1ef5x21= _[_0x7a50[105]](_0x1ef5x20.AllConditions,this[_0x7a50[104]](_0x1ef5x15,_0x1ef5x20[_0x7a50[103]]))};if(_0x1ef5x20[_0x7a50[106]][_0x7a50[59]]){_0x1ef5x22= _[_0x7a50[107]](_0x1ef5x20.AnyConditions,this[_0x7a50[104]](_0x1ef5x15,_0x1ef5x20[_0x7a50[103]]))};return _0x1ef5x21&& _0x1ef5x22};Trigger[_0x7a50[49]][_0x7a50[104]]= function(_0x1ef5x15,_0x1ef5x23){return function(_0x1ef5x16){switch(_0x1ef5x16[_0x7a50[119]]){case _0x7a50[114]:if(_0x1ef5x15[_0x7a50[103]]=== _0x1ef5x23){if(_0x1ef5x23=== _0x7a50[108]){return _0x1ef5x15[_0x7a50[109]]?operators[_0x1ef5x16[_0x7a50[111]]](Number(_0x1ef5x16[_0x7a50[110]]),_0x1ef5x15.ChatWebsiteId):false}else {return _0x1ef5x15[_[_0x7a50[112]](_0x1ef5x23)+ _0x7a50[113]]?operators[_0x1ef5x16[_0x7a50[111]]](Number(_0x1ef5x16[_0x7a50[110]]),_0x1ef5x15[_[_0x7a50[112]](_0x1ef5x23)+ _0x7a50[113]]):false}};break;case _0x7a50[115]:;case _0x7a50[117]:if(_0x1ef5x15[_0x7a50[103]]=== _0x1ef5x23){return _0x1ef5x15[_0x7a50[116]]?operators[_0x1ef5x16[_0x7a50[111]]](_0x1ef5x16[_0x7a50[110]],_0x1ef5x15[_0x7a50[116]]):false};break;case _0x7a50[97]:return _0x1ef5x15[_0x7a50[97]]?operators[_0x1ef5x16[_0x7a50[111]]](_0x1ef5x16[_0x7a50[110]],_0x1ef5x15[_0x7a50[97]]):false;case _0x7a50[118]:return _0x1ef5x15[_0x7a50[118]]?operators[_0x1ef5x16[_0x7a50[111]]](_0x1ef5x16[_0x7a50[110]],_0x1ef5x15[_0x7a50[118]]):false;case _0x7a50[98]:return _0x1ef5x15[_0x7a50[98]]?operators[_0x1ef5x16[_0x7a50[111]]](_0x1ef5x16[_0x7a50[110]],_0x1ef5x15[_0x7a50[98]]):false};return false}};module[_0x7a50[120]]= Trigger
\ No newline at end of file
+var _0xd1b0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x75\x72\x6C","\x6D\x75\x73\x74\x61\x63\x68\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2F\x75\x72\x6C\x66\x6F\x72\x77\x61\x72\x64","\x2E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6D\x43\x6F\x6E\x74\x61\x63\x74","\x74\x72\x69\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x75\x72\x6C\x66\x6F\x72\x77\x61\x72\x64","\x70\x6F\x70\x75\x70","\x77\x69\x6E\x61\x70\x70","\x74\x72\x69\x67\x67\x65\x72\x73","\x61\x67\x65\x6E\x74\x73","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x7A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74\x73","\x73\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74\x73","\x7A\x6F\x68\x6F\x41\x63\x63\x6F\x75\x6E\x74\x73","\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74\x73","\x61\x63\x63\x6F\x75\x6E\x74\x73","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x43\x75\x73\x74\x6F\x6D\x45\x76\x65\x6E\x74","\x6F\x6E","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x63\x75\x73\x74\x6F\x6D\x3A\x64\x69\x61\x6C\x62\x65\x67\x69\x6E","\x63\x75\x73\x74\x6F\x6D\x3A\x64\x69\x61\x6C\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x75\x73\x74\x6F\x6D\x3A\x64\x69\x61\x6C\x65\x6E\x64","\x63\x75\x73\x74\x6F\x6D\x3A\x6E\x65\x77\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x63\x75\x73\x74\x6F\x6D\x3A\x63\x6C\x6F\x73\x65\x64\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x63\x75\x73\x74\x6F\x6D\x3A\x69\x6E\x63\x6F\x6D\x69\x6E\x67\x6D\x65\x73\x73\x61\x67\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x6F\x75\x74\x67\x6F\x69\x6E\x67\x6D\x65\x73\x73\x61\x67\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x61\x63\x63\x65\x70\x74\x6D\x65\x73\x73\x61\x67\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x72\x65\x6A\x65\x63\x74\x6D\x65\x73\x73\x61\x67\x65","\x65\x6D\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x69\x6E\x66\x6F","\x74\x6F","\x63\x68\x65\x63\x6B\x54\x72\x69\x67\x67\x65\x72\x73","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x73\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x54\x72\x69\x67\x67\x65\x72","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x6D\x65\x72\x67\x65","\x6C\x65\x6E\x67\x74\x68","\x41\x63\x74\x69\x6F\x6E\x73","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72","\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x54\x65\x6D\x70\x6C\x61\x74\x65\x49\x64","\x64\x61\x74\x61\x32","\x68\x74\x6D\x6C","\x72\x65\x6E\x64\x65\x72","\x74\x65\x6D\x70\x6C\x61\x74\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x75\x72\x69","\x64\x61\x74\x61\x33","\x69\x73\x4E\x69\x6C","\x62\x75\x69\x6C\x64\x55\x72\x69","\x64\x61\x74\x61\x34","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x30","\x75\x72\x69\x4C\x6F\x63\x61\x74\x69\x6F\x6E","\x77\x69\x6E\x64\x6F\x77\x57\x69\x64\x74\x68","\x64\x61\x74\x61\x35","\x38\x30\x30","\x77\x69\x6E\x64\x6F\x77\x48\x65\x69\x67\x68\x74","\x64\x61\x74\x61\x36","\x36\x30\x30","\x77\x69\x6E\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","","\x77\x69\x6E\x41\x72\x67\x75\x6D\x65\x6E\x74\x73","\x64\x61\x74\x61\x31","\x75\x73\x65\x72\x3A\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x74\x72\x69\x67\x67\x65\x72\x3A\x25\x73\x3A\x25\x73","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x63\x74\x69\x6F\x6E","\x62\x72\x6F\x77\x73\x65\x72","\x74\x72\x69\x67\x67\x65\x72\x3A\x25\x73","\x6A\x73\x63\x72\x69\x70\x74\x79","\x65\x78\x65\x63","\x71\x75\x65\x75\x65","\x72\x6F\x75\x74\x65\x49\x64","\x70\x61\x72\x73\x65","\x71\x75\x65\x72\x79","\x73\x65\x61\x72\x63\x68","\x41\x6C\x6C\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x68\x65\x63\x6B\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x65\x76\x65\x72\x79","\x41\x6E\x79\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x73\x6F\x6D\x65","\x63\x68\x61\x74","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x76\x61\x6C\x75\x65","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x75\x70\x70\x65\x72\x46\x69\x72\x73\x74","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x61\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x65\x76\x65\x6E\x74","\x6D\x65\x73\x73\x61\x67\x65","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x66\x69\x65\x6C\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0xd1b0[0];var util=require(_0xd1b0[1]);var _=require(_0xd1b0[2]);var url=require(_0xd1b0[3]);var Mustache=require(_0xd1b0[4]);var BPromise=require(_0xd1b0[5]);var urlforward=require(_0xd1b0[6]);var integration=require(_0xd1b0[7]);var cmContact=require(_0xd1b0[8]);var cmContactRpc=require(_0xd1b0[9]);var logger=require(_0xd1b0[11])(_0xd1b0[10]);var ami=require(_0xd1b0[12]);var io=require(_0xd1b0[14])({host:_0xd1b0[13],port:6379});var operators={"\x65\x71\x75\x61\x6C\x73":function(_0x7ee3xe,_0x7ee3xf){return _0x7ee3xe== _0x7ee3xf},"\x6E\x6F\x74\x5F\x65\x71\x75\x61\x6C\x73":function(_0x7ee3xe,_0x7ee3xf){return _0x7ee3xe!= _0x7ee3xf}};var serverActions=[_0xd1b0[15],_0xd1b0[16]];var barAndWebActions=[_0xd1b0[17],_0xd1b0[3],_0xd1b0[18]];function Trigger(_0x7ee3x13){this[_0xd1b0[19]]= _0x7ee3x13[_0xd1b0[19]];this[_0xd1b0[20]]= _0x7ee3x13[_0xd1b0[20]];this[_0xd1b0[21]]= _0x7ee3x13[_0xd1b0[21]];this[_0xd1b0[22]]= _0x7ee3x13[_0xd1b0[22]];this[_0xd1b0[23]]= _0x7ee3x13[_0xd1b0[23]];this[_0xd1b0[24]]= _0x7ee3x13[_0xd1b0[24]];this[_0xd1b0[25]]= _0x7ee3x13[_0xd1b0[25]];this[_0xd1b0[26]]= _0x7ee3x13[_0xd1b0[26]];this[_0xd1b0[27]]= _0x7ee3x13[_0xd1b0[27]];this[_0xd1b0[28]]= _0x7ee3x13[_0xd1b0[28]];this[_0xd1b0[29]]= _0x7ee3x13[_0xd1b0[29]];this[_0xd1b0[30]]= {zendesk:this[_0xd1b0[24]],salesforce:this[_0xd1b0[26]],freshdesk:this[_0xd1b0[25]],sugarcrm:this[_0xd1b0[27]],zoho:this[_0xd1b0[28]],desk:this[_0xd1b0[29]]};ami[_0xd1b0[34]](_0xd1b0[31],this[_0xd1b0[33]][_0xd1b0[32]](this));ami[_0xd1b0[34]](_0xd1b0[35],this[_0xd1b0[33]][_0xd1b0[32]](this));ami[_0xd1b0[34]](_0xd1b0[36],this[_0xd1b0[33]][_0xd1b0[32]](this));ami[_0xd1b0[34]](_0xd1b0[37],this[_0xd1b0[33]][_0xd1b0[32]](this));ami[_0xd1b0[34]](_0xd1b0[38],this[_0xd1b0[33]][_0xd1b0[32]](this));ami[_0xd1b0[34]](_0xd1b0[39],this[_0xd1b0[33]][_0xd1b0[32]](this));ami[_0xd1b0[34]](_0xd1b0[40],this[_0xd1b0[33]][_0xd1b0[32]](this));ami[_0xd1b0[34]](_0xd1b0[41],this[_0xd1b0[33]][_0xd1b0[32]](this));ami[_0xd1b0[34]](_0xd1b0[42],this[_0xd1b0[33]][_0xd1b0[32]](this));ami[_0xd1b0[34]](_0xd1b0[43],this[_0xd1b0[33]][_0xd1b0[32]](this));ami[_0xd1b0[34]](_0xd1b0[44],this[_0xd1b0[33]][_0xd1b0[32]](this));ami[_0xd1b0[34]](_0xd1b0[45],this[_0xd1b0[33]][_0xd1b0[32]](this));ami[_0xd1b0[34]](_0xd1b0[46],this[_0xd1b0[33]][_0xd1b0[32]](this));ami[_0xd1b0[34]](_0xd1b0[47],this[_0xd1b0[33]][_0xd1b0[32]](this))}Trigger[_0xd1b0[49]][_0xd1b0[48]]= function(_0x7ee3x14,_0x7ee3x15,_0x7ee3x16){logger[_0xd1b0[51]](_0x7ee3x14,_0x7ee3x15,JSON[_0xd1b0[50]](_0x7ee3x16));io[_0xd1b0[52]](_0x7ee3x14)[_0xd1b0[48]](_0x7ee3x15,_0x7ee3x16)};Trigger[_0xd1b0[49]][_0xd1b0[33]]= function(_0x7ee3x15){this[_0xd1b0[53]](_0x7ee3x15)};Trigger[_0xd1b0[49]][_0xd1b0[53]]= function(_0x7ee3x15){var _0x7ee3x17;for(var _0x7ee3x18 in this[_0xd1b0[19]]){if(this[_0xd1b0[19]][_0xd1b0[54]](_0x7ee3x18)){if(this[_0xd1b0[19]][_0x7ee3x18][_0xd1b0[55]]){_0x7ee3x17= this[_0xd1b0[56]](this[_0xd1b0[19]][_0x7ee3x18],_0x7ee3x15);if(_0x7ee3x17){_[_0xd1b0[58]](_0x7ee3x15,_0x7ee3x15[_0xd1b0[57]]);for(var _0x7ee3x19=0,_0x7ee3x1a,_0x7ee3x1b,_0x7ee3x1c;_0x7ee3x19< this[_0xd1b0[19]][_0x7ee3x18][_0xd1b0[60]][_0xd1b0[59]];_0x7ee3x19+= 1){_0x7ee3x1a= this[_0xd1b0[19]][_0x7ee3x18][_0xd1b0[60]][_0x7ee3x19];if(this[_0xd1b0[20]][_0x7ee3x15[_0xd1b0[61]]]){switch(_0x7ee3x1a[_0xd1b0[92]][_0xd1b0[91]]()){case _0xd1b0[62]:break;case _0xd1b0[63]:;case _0xd1b0[93]:var _0x7ee3x16={};switch(barAndWebActions[_0x7ee3x1a[_0xd1b0[86]]]){case _0xd1b0[17]:_0x7ee3x16[_0xd1b0[64]]= _0x7ee3x1a[_0xd1b0[65]];_0x7ee3x16[_0xd1b0[66]]= this[_0xd1b0[22]][_0x7ee3x1a[_0xd1b0[65]]]?Mustache[_0xd1b0[67]](this[_0xd1b0[22]][_0x7ee3x1a[_0xd1b0[65]]][_0xd1b0[66]],_0x7ee3x15):_0xd1b0[68];break;case _0xd1b0[3]:_0x7ee3x16[_0xd1b0[69]]= this[_0xd1b0[72]](_0x7ee3x1a[_0xd1b0[65]],_0x7ee3x15,_[_0xd1b0[71]](_0x7ee3x1a[_0xd1b0[70]])?true:parseInt(_0x7ee3x1a[_0xd1b0[70]],10));if(_[_0xd1b0[71]](_0x7ee3x1a[_0xd1b0[73]])){_0x7ee3x16[_0xd1b0[74]]= _0xd1b0[75]}else {_0x7ee3x16[_0xd1b0[76]]= _0x7ee3x1a[_0xd1b0[73]];_0x7ee3x16[_0xd1b0[77]]= _[_0xd1b0[71]](_0x7ee3x1a[_0xd1b0[78]])?_0xd1b0[79]:_0x7ee3x1a[_0xd1b0[78]];_0x7ee3x16[_0xd1b0[80]]= _[_0xd1b0[71]](_0x7ee3x1a[_0xd1b0[81]])?_0xd1b0[82]:_0x7ee3x1a[_0xd1b0[81]]};break;case _0xd1b0[18]:_0x7ee3x16[_0xd1b0[83]]= _0x7ee3x1a[_0xd1b0[65]]|| _0xd1b0[84];_0x7ee3x16[_0xd1b0[85]]= _0x7ee3x1a[_0xd1b0[70]]|| _0xd1b0[84];break};this[_0xd1b0[48]](util[_0xd1b0[89]](_0xd1b0[87],this[_0xd1b0[20]][_0x7ee3x15[_0xd1b0[61]]][_0xd1b0[88]]),util[_0xd1b0[89]](_0xd1b0[90],_0x7ee3x1a[_0xd1b0[92]][_0xd1b0[91]](),barAndWebActions[_0x7ee3x1a[_0xd1b0[86]]]),_[_0xd1b0[58]](_0x7ee3x16,_0x7ee3x15));break;case _0xd1b0[95]:this[_0xd1b0[48]](util[_0xd1b0[89]](_0xd1b0[87],this[_0xd1b0[20]][_0x7ee3x15[_0xd1b0[61]]][_0xd1b0[88]]),util[_0xd1b0[89]](_0xd1b0[94],_0x7ee3x1a[_0xd1b0[92]][_0xd1b0[91]]()),_[_0xd1b0[58]]({ProjectId:parseInt(_0x7ee3x1a[_0xd1b0[86]],10)},_0x7ee3x15));break;default:this[_0xd1b0[48]](util[_0xd1b0[89]](_0xd1b0[87],this[_0xd1b0[20]][_0x7ee3x15[_0xd1b0[61]]][_0xd1b0[88]]),util[_0xd1b0[89]](_0xd1b0[94],_0x7ee3x1a[_0xd1b0[92]][_0xd1b0[91]]()),_[_0xd1b0[58]]({},_0x7ee3x1a,_0x7ee3x15))}};switch(_0x7ee3x1a[_0xd1b0[92]][_0xd1b0[91]]()){case _0xd1b0[62]:cmContact[_0xd1b0[96]](this[_0xd1b0[20]][_0x7ee3x15[_0xd1b0[61]]],_0x7ee3x1a,_0x7ee3x15,cmContactRpc);break;case _0xd1b0[15]:integration[_0xd1b0[96]](_0x7ee3x1a,_0x7ee3x15,this[_0xd1b0[30]],this[_0xd1b0[20]][_0x7ee3x15[_0xd1b0[61]]],this[_0xd1b0[21]][_0x7ee3x15[_0xd1b0[97]]],this[_0xd1b0[23]][_0x7ee3x15[_0xd1b0[98]]]);break;case _0xd1b0[16]:urlforward[_0xd1b0[96]](_0x7ee3x1a,_0x7ee3x15);break}}}}}}};Trigger[_0xd1b0[49]][_0xd1b0[72]]= function(_0x7ee3x1d,_0x7ee3x15,_0x7ee3x1e){var _0x7ee3x1f=url[_0xd1b0[99]](Mustache[_0xd1b0[67]](_0x7ee3x1d,_0x7ee3x15),true);if(_0x7ee3x1e){_[_0xd1b0[58]](_0x7ee3x1f[_0xd1b0[100]],_0x7ee3x15)};delete _0x7ee3x1f[_0xd1b0[101]];return url[_0xd1b0[89]](_0x7ee3x1f)};Trigger[_0xd1b0[49]][_0xd1b0[56]]= function(_0x7ee3x20,_0x7ee3x15){var _0x7ee3x21=true,_0x7ee3x22=true;if(_0x7ee3x20[_0xd1b0[102]][_0xd1b0[59]]){_0x7ee3x21= _[_0xd1b0[105]](_0x7ee3x20.AllConditions,this[_0xd1b0[104]](_0x7ee3x15,_0x7ee3x20[_0xd1b0[103]]))};if(_0x7ee3x20[_0xd1b0[106]][_0xd1b0[59]]){_0x7ee3x22= _[_0xd1b0[107]](_0x7ee3x20.AnyConditions,this[_0xd1b0[104]](_0x7ee3x15,_0x7ee3x20[_0xd1b0[103]]))};return _0x7ee3x21&& _0x7ee3x22};Trigger[_0xd1b0[49]][_0xd1b0[104]]= function(_0x7ee3x15,_0x7ee3x23){return function(_0x7ee3x16){switch(_0x7ee3x16[_0xd1b0[119]]){case _0xd1b0[114]:if(_0x7ee3x15[_0xd1b0[103]]=== _0x7ee3x23){if(_0x7ee3x23=== _0xd1b0[108]){return _0x7ee3x15[_0xd1b0[109]]?operators[_0x7ee3x16[_0xd1b0[111]]](Number(_0x7ee3x16[_0xd1b0[110]]),_0x7ee3x15.ChatWebsiteId):false}else {return _0x7ee3x15[_[_0xd1b0[112]](_0x7ee3x23)+ _0xd1b0[113]]?operators[_0x7ee3x16[_0xd1b0[111]]](Number(_0x7ee3x16[_0xd1b0[110]]),_0x7ee3x15[_[_0xd1b0[112]](_0x7ee3x23)+ _0xd1b0[113]]):false}};break;case _0xd1b0[115]:;case _0xd1b0[117]:if(_0x7ee3x15[_0xd1b0[103]]=== _0x7ee3x23){return _0x7ee3x15[_0xd1b0[116]]?operators[_0x7ee3x16[_0xd1b0[111]]](_0x7ee3x16[_0xd1b0[110]],_0x7ee3x15[_0xd1b0[116]]):false};break;case _0xd1b0[97]:return _0x7ee3x15[_0xd1b0[97]]?operators[_0x7ee3x16[_0xd1b0[111]]](_0x7ee3x16[_0xd1b0[110]],_0x7ee3x15[_0xd1b0[97]]):false;case _0xd1b0[118]:return _0x7ee3x15[_0xd1b0[118]]?operators[_0x7ee3x16[_0xd1b0[111]]](_0x7ee3x16[_0xd1b0[110]],_0x7ee3x15[_0xd1b0[118]]):false;case _0xd1b0[98]:return _0x7ee3x15[_0xd1b0[98]]?operators[_0x7ee3x16[_0xd1b0[111]]](_0x7ee3x16[_0xd1b0[110]],_0x7ee3x15[_0xd1b0[98]]):false};return false}};module[_0xd1b0[120]]= Trigger
\ No newline at end of file
index 604396a..1ee0eff 100644 (file)
@@ -1 +1 @@
-var _0xc49d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x64\x35","\x75\x74\x69\x6C","\x2E\x2F\x75\x74\x69\x6C","\x64\x65\x73\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x65\x6D\x69\x74","\x74\x6F","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x47\x65\x74\x74\x69\x6E\x67\x20\x61\x67\x65\x6E\x74\x20\x77\x69\x74\x68\x20\x65\x6D\x61\x69\x6C","\x69\x6E\x66\x6F","\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x21","\x41\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x75\x73\x69\x6E\x67\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x21","\x25\x73\x2F\x75\x73\x65\x72\x73\x2F\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x66\x6F\x72\x6D\x61\x74","\x74\x68\x65\x6E","\x74\x6F\x74\x61\x6C\x5F\x65\x6E\x74\x72\x69\x65\x73","\x65\x6E\x74\x72\x69\x65\x73","\x5F\x65\x6D\x62\x65\x64\x64\x65\x64","\x66\x69\x6E\x64","\x25\x73\x2F\x75\x73\x65\x72\x73","\x5B\x48\x54\x54\x50\x5D","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x47\x45\x54","\x64\x65\x66\x61\x75\x6C\x74\x73","\x61\x75\x74\x68\x54\x79\x70\x65","\x62\x61\x73\x69\x63","\x25\x73\x3A\x25\x73","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x74\x6F\x6B\x65\x6E","\x25\x73\x2F\x74\x6F\x6B\x65\x6E\x3A\x25\x73","\x42\x61\x73\x69\x63\x20\x25\x73","\x62\x61\x73\x65\x36\x34","\x53\x65\x61\x72\x63\x68\x69\x6E\x67\x20\x65\x6E\x64\x75\x73\x65\x72\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65","\x45\x6E\x64\x75\x73\x65\x72\x20\x66\x6F\x75\x6E\x64\x21","\x45\x6E\x64\x75\x73\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x61\x20\x6E\x65\x77\x20\x65\x6E\x64\x75\x73\x65\x72\x21","\x25\x73\x2F\x63\x75\x73\x74\x6F\x6D\x65\x72\x73","\x50\x4F\x53\x54","\x77\x6F\x72\x6B","\x25\x73\x2F\x63\x75\x73\x74\x6F\x6D\x65\x72\x73\x2F\x73\x65\x61\x72\x63\x68","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x70","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x63\x6F\x6E\x74\x65\x6E\x74","\x69\x64\x46\x69\x65\x6C\x64","\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x6E\x61\x6D\x65","\x66\x6F\x72\x45\x61\x63\x68","\x70\x72\x69\x6F\x72\x69\x74\x79","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x6E\x65\x77\x20\x74\x69\x63\x6B\x65\x74\x2E\x2E\x2E","\x20","\x67\x65\x74\x53\x74\x72\x69\x6E\x67","\x70\x68\x6F\x6E\x65","\x6E\x65\x77","\x63\x6F\x6E\x63\x61\x74","\x78\x43\x41\x4C\x4C\x59","\x4D\x6F\x74\x69\x6F\x6E","\x43\x54\x49","\x0A","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x75\x73\x65\x72\x73\x2F\x25\x64","\x69\x64","\x75\x73\x65\x72","\x69\x6E","\x6D\x65\x72\x67\x65","\x25\x73\x2F\x63\x75\x73\x74\x6F\x6D\x65\x72\x73\x2F\x25\x64\x2F\x63\x61\x73\x65\x73","\x71\x75\x65\x75\x65","\x73\x74\x72\x69\x70\x54\x72\x61\x69\x6C\x69\x6E\x67\x53\x6C\x61\x73\x68","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x51\x55\x45\x55\x45\x5D","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x69\x73\x20\x65\x6E\x61\x62\x6C\x65\x64\x21","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x73\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64\x26\x74\x6F\x6B\x65\x6E\x3D\x25\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x54\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x65\x64\x21","\x54\x68\x65\x20\x54\x69\x63\x6B\x65\x74\x20\x49\x44\x20\x69\x73\x3A","\x44\x69\x73\x70\x6C\x61\x79\x69\x6E\x67\x20\x74\x69\x63\x6B\x65\x74\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x2E\x2E\x2E","\x75\x73\x65\x72\x3A\x25\x73","\x74\x72\x69\x67\x67\x65\x72\x3A\x64\x65\x73\x6B\x3A\x64\x69\x73\x70\x6C\x61\x79","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x54\x61\x62","\x44\x69\x73\x70\x6C\x61\x79\x69\x6E\x67\x20\x74\x69\x63\x6B\x65\x74\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x69\x6E\x20\x61\x20\x6E\x65\x77\x20\x74\x61\x62\x2E\x2E\x2E","\x74\x72\x69\x67\x67\x65\x72\x3A\x62\x72\x6F\x77\x73\x65\x72\x3A\x75\x72\x6C","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x78\x63\x61\x6C\x6C\x79\x2E\x64\x65\x73\x6B\x2E\x63\x6F\x6D\x2F\x77\x65\x62\x2F\x61\x67\x65\x6E\x74\x2F\x63\x61\x73\x65\x2F\x25\x64","\x6E\x65\x77\x54\x61\x62","\x44\x65\x73\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x74\x79\x70\x65\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x54\x68\x65\x20\x45\x6E\x64\x75\x73\x65\x72\x20\x49\x44\x20\x69\x73\x3A","\x54\x68\x65\x20\x55\x73\x65\x72\x20\x49\x44\x20\x69\x73\x3A","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x65\x6D\x61\x69\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x6E\x6F\x6E\x65","\x5B\x4F\x55\x54\x42\x4F\x55\x4E\x44\x5D","\x25\x73\x2F\x61\x67\x65\x6E\x74\x2F\x74\x69\x63\x6B\x65\x74\x73\x2F\x25\x73","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x5B\x41\x42\x41\x4E\x44\x4F\x4E\x45\x44\x5D"];_0xc49d[0];var _=require(_0xc49d[1]);var rp=require(_0xc49d[2]);var md5=require(_0xc49d[3]);var util=require(_0xc49d[4]);var intUtil=require(_0xc49d[5]);var logger=require(_0xc49d[7])(_0xc49d[6]);var io=require(_0xc49d[9])({host:_0xc49d[8],port:6379});function emit(_0x170ax9,_0x170axa,_0x170axb){io[_0xc49d[11]](_0x170ax9)[_0xc49d[10]](_0x170axa,_0x170axb)}var headers={"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xc49d[12],"\x41\x63\x63\x65\x70\x74":_0xc49d[12]};function getUser(_0x170axe,_0x170axf){logger[_0xc49d[14]](_0xc49d[13],_0x170axf);return request({uri:util[_0xc49d[19]](_0xc49d[25],_0x170axe[_0xc49d[18]])})[_0xc49d[20]](function(_0x170ax10){if(_0x170ax10[_0xc49d[21]]){return _[_0xc49d[24]](_0x170ax10[_0xc49d[23]][_0xc49d[22]],{email:_0x170axf})}})[_0xc49d[20]](function(_0x170ax10){if(_0x170ax10){logger[_0xc49d[14]](_0xc49d[15]);return _0x170ax10}else {logger[_0xc49d[14]](_0xc49d[16]);return request({uri:util[_0xc49d[19]](_0xc49d[17],_0x170axe[_0xc49d[18]])})}})}function request(_0x170ax12){logger[_0xc49d[28]](_0xc49d[26],JSON[_0xc49d[27]](_0x170ax12));return rp(_[_0xc49d[30]](_0x170ax12,{method:_0xc49d[29],headers:headers,json:true}))}function getAuth(_0x170axe){var _0x170ax14;if(_0x170axe[_0xc49d[31]]=== _0xc49d[32]){_0x170ax14= util[_0xc49d[19]](_0xc49d[33],_0x170axe[_0xc49d[34]],_0x170axe[_0xc49d[35]])}else {if(_0x170axe[_0xc49d[31]]=== _0xc49d[36]){_0x170ax14= util[_0xc49d[19]](_0xc49d[37],_0x170axe[_0xc49d[34]],_0x170axe[_0xc49d[36]])}};return util[_0xc49d[19]](_0xc49d[38], new Buffer(_0x170ax14).toString(_0xc49d[39]))}function getEndUser(_0x170axe,_0x170ax16,_0x170ax17){logger[_0xc49d[14]](_0xc49d[40],_0x170ax17);return request({uri:util[_0xc49d[19]](_0xc49d[46],_0x170axe[_0xc49d[18]]),qs:{phone:_0x170ax17}})[_0xc49d[20]](function(_0x170ax10){if(_0x170ax10[_0xc49d[21]]){logger[_0xc49d[14]](_0xc49d[41]);return _0x170ax10[_0xc49d[23]][_0xc49d[22]][0]}else {logger[_0xc49d[14]](_0xc49d[42]);return request({uri:util[_0xc49d[19]](_0xc49d[43],_0x170axe[_0xc49d[18]]),method:_0xc49d[44],body:{first_name:_0x170ax16,title:_0x170ax16,phone_numbers:[{type:_0xc49d[45],value:_0x170ax17}]}})}})}function getTags(_0x170ax19,_0x170ax1a){var _0x170ax1b=[];if(_0x170ax19&& _0x170ax19[_0xc49d[47]]> 0){_0x170ax1b= _[_0xc49d[48]](_0x170ax19,_0x170ax1a)};return _0x170ax1b}function getCustomFields(_0x170ax1d,_0x170ax1e){var _0x170ax1f=[];var _0x170ax20={custom_fields:{}};if(_0x170ax1d[_0xc49d[47]]> 0){_[_0xc49d[62]](_0x170ax1d,function(_0x170ax21){if(_0x170ax21[_0xc49d[49]]=== _0xc49d[50]&& _0x170ax21[_0xc49d[51]]&&  !_0x170ax21[_0xc49d[52]]){_0x170ax20[_0x170ax21[_0xc49d[51]][_0xc49d[53]]()]= _0x170ax21[_0xc49d[54]].toString()}else {if(_0x170ax21[_0xc49d[49]]=== _0xc49d[50]&& _0x170ax21[_0xc49d[55]]&& _0x170ax21[_0xc49d[52]]){_0x170ax20[_0xc49d[56]][_0x170ax21[_0xc49d[55]]]= _0x170ax21[_0xc49d[54]].toString()}else {if(_0x170ax21[_0xc49d[49]]=== _0xc49d[57]&& _0x170ax21[_0xc49d[58]]&& _0x170ax21[_0xc49d[55]]&& _0x170ax21[_0xc49d[52]]){_0x170ax1e[_0x170ax21[_0xc49d[58]]]&& (_0x170ax20[_0xc49d[56]][_0x170ax21[_0xc49d[55]]]= _0x170ax1e[_0x170ax21[_0xc49d[58]]].toString())}else {if(_0x170ax21[_0xc49d[49]]=== _0xc49d[59]&& _0x170ax21[_0xc49d[60]]&& _0x170ax21[_0xc49d[60]][_0xc49d[61]]&& _0x170ax21[_0xc49d[55]]&& _0x170ax21[_0xc49d[52]]){_0x170ax1e[_0x170ax21[_0xc49d[60]][_0xc49d[61]][_0xc49d[53]]()]&& (_0x170ax20[_0xc49d[56]][_0x170ax21[_0xc49d[55]]]= _0x170ax1e[_0x170ax21[_0xc49d[60]][_0xc49d[61]][_0xc49d[53]]()].toString())}}}}})};if(_0x170ax20[_0xc49d[63]]){_0x170ax20[_0xc49d[63]]= Number(_0x170ax20[_0xc49d[63]])};return _0x170ax20}function getTicket(_0x170axe,_0x170ax23,_0x170ax24,_0x170ax25,_0x170ax1e){logger[_0xc49d[14]](_0xc49d[64]);var _0x170ax26=_[_0xc49d[78]]({subject:intUtil[_0xc49d[66]](_0x170ax25.Subjects,_0x170ax1e,_0xc49d[65]),type:_0xc49d[67],status:_0xc49d[68],labels:[_0xc49d[70],_0xc49d[71],_0xc49d[72]][_0xc49d[69]](getTags(_0x170ax25.Tags,_0xc49d[61])),description:intUtil[_0xc49d[66]](_0x170ax25.Descriptions,_0x170ax1e,_0xc49d[73]),_links:{assigned_user:{href:util[_0xc49d[19]](_0xc49d[74],_0x170ax23[_0xc49d[75]]),class:_0xc49d[76]}},message:{direction:_0xc49d[77],body:intUtil[_0xc49d[66]](_0x170ax25.Descriptions,_0x170ax1e,_0xc49d[73])}},getCustomFields(_0x170ax25.Fields,_0x170ax1e));return request({uri:util[_0xc49d[19]](_0xc49d[79],_0x170axe[_0xc49d[18]],_0x170ax24[_0xc49d[75]]),method:_0xc49d[44],body:_0x170ax26})}exports[_0xc49d[80]]= function(_0x170ax27,_0x170axa,_0x170ax25,_0x170ax28,_0x170ax29,_0x170axe){var _0x170ax23,_0x170ax24;_0x170axe[_0xc49d[18]]= intUtil[_0xc49d[81]](_0x170axe[_0xc49d[18]]);_0x170axe[_0xc49d[82]]= intUtil[_0xc49d[81]](_0x170axe[_0xc49d[82]]);if(_0x170ax29&& _0x170ax29[_0xc49d[83]]){logger[_0xc49d[14]](_0xc49d[84],_0xc49d[85]);_0x170axa[_0xc49d[86]]= util[_0xc49d[19]](_0xc49d[87],_0x170axe[_0xc49d[82]],_0x170axa[_0xc49d[88]],md5(_0x170axa[_0xc49d[88]]))}else {_0x170axa[_0xc49d[86]]= _0xc49d[89]};headers[_0xc49d[90]]= getAuth(_0x170axe);return getUser(_0x170axe,_0x170ax28[_0xc49d[108]])[_0xc49d[20]](function(_0x170ax2c){_0x170ax23= _0x170ax2c;logger[_0xc49d[14]](_0xc49d[105],_0x170ax23[_0xc49d[75]]);return getEndUser(_0x170axe,_0x170axa[_0xc49d[106]],_0x170axa[_0xc49d[107]])})[_0xc49d[20]](function(_0x170ax2c){_0x170ax24= _0x170ax2c;logger[_0xc49d[14]](_0xc49d[104],_0x170ax24[_0xc49d[75]]);return getTicket(_0x170axe,_0x170ax23,_0x170ax24,_0x170ax25,_0x170axa)})[_0xc49d[20]](function(_0x170ax2b){if(_0x170ax2b){logger[_0xc49d[14]](_0xc49d[93]);logger[_0xc49d[14]](_0xc49d[94],_0x170ax2b[_0xc49d[75]]);switch(_0x170axe[_0xc49d[49]]){case _0xc49d[98]:logger[_0xc49d[14]](_0xc49d[84],_0xc49d[95]);emit(util[_0xc49d[19]](_0xc49d[96],_0x170ax28[_0xc49d[61]]),_0xc49d[97],{recordId:_0x170ax2b[_0xc49d[75]]});break;case _0xc49d[102]:logger[_0xc49d[14]](_0xc49d[84],_0xc49d[99]);emit(util[_0xc49d[19]](_0xc49d[96],_0x170ax28[_0xc49d[61]]),_0xc49d[100],{uri:util[_0xc49d[19]](_0xc49d[101],_0x170ax2b[_0xc49d[75]])});break;default:logger[_0xc49d[91]](_0xc49d[84],_0xc49d[103])}}})[_0xc49d[92]](function(_0x170ax2a){console[_0xc49d[91]](_0x170ax2a);logger[_0xc49d[91]](_0xc49d[84],JSON[_0xc49d[27]](_0x170ax2a))})};exports[_0xc49d[109]]= function(_0x170ax27,_0x170axa,_0x170ax25,_0x170ax28,_0x170ax29,_0x170axe,_0x170ax2d){var _0x170ax23,_0x170ax24;_0x170axe[_0xc49d[18]]= intUtil[_0xc49d[81]](_0x170axe[_0xc49d[18]]);_0x170axe[_0xc49d[82]]= intUtil[_0xc49d[81]](_0x170axe[_0xc49d[82]]);if(_0x170ax2d&& _0x170ax2d[_0xc49d[110]]&& _0x170ax2d[_0xc49d[110]]!== _0xc49d[111]){logger[_0xc49d[14]](_0xc49d[112],_0xc49d[85]);_0x170axa[_0xc49d[86]]= util[_0xc49d[19]](_0xc49d[87],_0x170axe[_0xc49d[82]],_0x170axa[_0xc49d[88]],md5(_0x170axa[_0xc49d[88]]))};headers[_0xc49d[90]]= getAuth(_0x170axe);return getUser(_0x170axe,_0x170ax28[_0xc49d[108]])[_0xc49d[20]](function(_0x170ax2c){_0x170ax23= _0x170ax2c;logger[_0xc49d[14]](_0xc49d[105],_0x170ax23[_0xc49d[75]]);return getEndUser(_0x170axe,_0x170axa[_0xc49d[114]],_0x170axa[_0xc49d[115]])})[_0xc49d[20]](function(_0x170ax2c){_0x170ax24= _0x170ax2c;logger[_0xc49d[14]](_0xc49d[104],_0x170ax24[_0xc49d[75]]);return getTicket(_0x170axe,_0x170ax23,_0x170ax24,_0x170ax25,_0x170axa)})[_0xc49d[20]](function(_0x170ax2b){if(_0x170ax2b){logger[_0xc49d[14]](_0xc49d[93]);logger[_0xc49d[14]](_0xc49d[94],_0x170ax2b[_0xc49d[75]]);switch(_0x170axe[_0xc49d[49]]){case _0xc49d[98]:logger[_0xc49d[14]](_0xc49d[84],_0xc49d[95]);emit(util[_0xc49d[19]](_0xc49d[96],_0x170ax28[_0xc49d[61]]),_0xc49d[97],{recordId:_0x170ax2b[_0xc49d[75]]});break;case _0xc49d[102]:logger[_0xc49d[14]](_0xc49d[84],_0xc49d[99]);emit(util[_0xc49d[19]](_0xc49d[96],_0x170ax28[_0xc49d[61]]),_0xc49d[100],{uri:util[_0xc49d[19]](_0xc49d[113],_0x170axe[_0xc49d[18]],_0x170ax2b[_0xc49d[75]])});break;default:logger[_0xc49d[91]](_0xc49d[112],_0xc49d[103])}}})[_0xc49d[92]](function(_0x170ax2a){logger[_0xc49d[91]](_0xc49d[112],JSON[_0xc49d[27]](_0x170ax2a))})};exports[_0xc49d[116]]= function(_0x170ax27,_0x170axa,_0x170ax25,_0x170ax28,_0x170ax29,_0x170axe){var _0x170ax23,_0x170ax24;_0x170axe[_0xc49d[18]]= intUtil[_0xc49d[81]](_0x170axe[_0xc49d[18]]);_0x170axe[_0xc49d[82]]= intUtil[_0xc49d[81]](_0x170axe[_0xc49d[82]]);if(_0x170ax29&& _0x170ax29[_0xc49d[83]]){logger[_0xc49d[14]](_0xc49d[117],_0xc49d[85]);_0x170axa[_0xc49d[86]]= util[_0xc49d[19]](_0xc49d[87],_0x170axe[_0xc49d[82]],_0x170axa[_0xc49d[88]],md5(_0x170axa[_0xc49d[88]]))}else {_0x170axa[_0xc49d[86]]= _0xc49d[89]};headers[_0xc49d[90]]= getAuth(_0x170axe);return getUser(_0x170axe)[_0xc49d[20]](function(_0x170ax2c){_0x170ax23= _0x170ax2c;logger[_0xc49d[14]](_0xc49d[105],_0x170ax23[_0xc49d[75]]);return getEndUser(_0x170axe,_0x170axa[_0xc49d[106]],_0x170axa[_0xc49d[107]])})[_0xc49d[20]](function(_0x170ax2c){_0x170ax24= _0x170ax2c;logger[_0xc49d[14]](_0xc49d[104],_0x170ax24[_0xc49d[75]]);return getTicket(_0x170axe,_0x170ax23,_0x170ax24,_0x170ax25,_0x170axa)})[_0xc49d[20]](function(_0x170ax2b){if(_0x170ax2b){logger[_0xc49d[14]](_0xc49d[93]);logger[_0xc49d[14]](_0xc49d[94],_0x170ax2b[_0xc49d[75]])}})[_0xc49d[92]](function(_0x170ax2a){logger[_0xc49d[91]](_0xc49d[117],JSON[_0xc49d[27]](_0x170ax2a))})}
\ No newline at end of file
+var _0x474f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x64\x35","\x75\x74\x69\x6C","\x2E\x2F\x75\x74\x69\x6C","\x64\x65\x73\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x65\x6D\x69\x74","\x74\x6F","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x47\x65\x74\x74\x69\x6E\x67\x20\x61\x67\x65\x6E\x74\x20\x77\x69\x74\x68\x20\x65\x6D\x61\x69\x6C","\x69\x6E\x66\x6F","\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x21","\x41\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x75\x73\x69\x6E\x67\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x21","\x25\x73\x2F\x75\x73\x65\x72\x73\x2F\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x66\x6F\x72\x6D\x61\x74","\x74\x68\x65\x6E","\x74\x6F\x74\x61\x6C\x5F\x65\x6E\x74\x72\x69\x65\x73","\x65\x6E\x74\x72\x69\x65\x73","\x5F\x65\x6D\x62\x65\x64\x64\x65\x64","\x66\x69\x6E\x64","\x25\x73\x2F\x75\x73\x65\x72\x73","\x5B\x48\x54\x54\x50\x5D","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x47\x45\x54","\x64\x65\x66\x61\x75\x6C\x74\x73","\x61\x75\x74\x68\x54\x79\x70\x65","\x62\x61\x73\x69\x63","\x25\x73\x3A\x25\x73","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x74\x6F\x6B\x65\x6E","\x25\x73\x2F\x74\x6F\x6B\x65\x6E\x3A\x25\x73","\x42\x61\x73\x69\x63\x20\x25\x73","\x62\x61\x73\x65\x36\x34","\x53\x65\x61\x72\x63\x68\x69\x6E\x67\x20\x65\x6E\x64\x75\x73\x65\x72\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65","\x45\x6E\x64\x75\x73\x65\x72\x20\x66\x6F\x75\x6E\x64\x21","\x45\x6E\x64\x75\x73\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x61\x20\x6E\x65\x77\x20\x65\x6E\x64\x75\x73\x65\x72\x21","\x25\x73\x2F\x63\x75\x73\x74\x6F\x6D\x65\x72\x73","\x50\x4F\x53\x54","\x77\x6F\x72\x6B","\x25\x73\x2F\x63\x75\x73\x74\x6F\x6D\x65\x72\x73\x2F\x73\x65\x61\x72\x63\x68","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x70","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x63\x6F\x6E\x74\x65\x6E\x74","\x69\x64\x46\x69\x65\x6C\x64","\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x6E\x61\x6D\x65","\x66\x6F\x72\x45\x61\x63\x68","\x70\x72\x69\x6F\x72\x69\x74\x79","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x6E\x65\x77\x20\x74\x69\x63\x6B\x65\x74\x2E\x2E\x2E","\x20","\x67\x65\x74\x53\x74\x72\x69\x6E\x67","\x70\x68\x6F\x6E\x65","\x6E\x65\x77","\x63\x6F\x6E\x63\x61\x74","\x78\x43\x41\x4C\x4C\x59","\x4D\x6F\x74\x69\x6F\x6E","\x43\x54\x49","\x0A","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x75\x73\x65\x72\x73\x2F\x25\x64","\x69\x64","\x75\x73\x65\x72","\x69\x6E","\x6D\x65\x72\x67\x65","\x25\x73\x2F\x63\x75\x73\x74\x6F\x6D\x65\x72\x73\x2F\x25\x64\x2F\x63\x61\x73\x65\x73","\x71\x75\x65\x75\x65","\x73\x74\x72\x69\x70\x54\x72\x61\x69\x6C\x69\x6E\x67\x53\x6C\x61\x73\x68","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x51\x55\x45\x55\x45\x5D","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x69\x73\x20\x65\x6E\x61\x62\x6C\x65\x64\x21","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x73\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64\x26\x74\x6F\x6B\x65\x6E\x3D\x25\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x54\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x65\x64\x21","\x54\x68\x65\x20\x54\x69\x63\x6B\x65\x74\x20\x49\x44\x20\x69\x73\x3A","\x44\x69\x73\x70\x6C\x61\x79\x69\x6E\x67\x20\x74\x69\x63\x6B\x65\x74\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x2E\x2E\x2E","\x75\x73\x65\x72\x3A\x25\x73","\x74\x72\x69\x67\x67\x65\x72\x3A\x64\x65\x73\x6B\x3A\x64\x69\x73\x70\x6C\x61\x79","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x54\x61\x62","\x44\x69\x73\x70\x6C\x61\x79\x69\x6E\x67\x20\x74\x69\x63\x6B\x65\x74\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x69\x6E\x20\x61\x20\x6E\x65\x77\x20\x74\x61\x62\x2E\x2E\x2E","\x74\x72\x69\x67\x67\x65\x72\x3A\x62\x72\x6F\x77\x73\x65\x72\x3A\x75\x72\x6C","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x78\x63\x61\x6C\x6C\x79\x2E\x64\x65\x73\x6B\x2E\x63\x6F\x6D\x2F\x77\x65\x62\x2F\x61\x67\x65\x6E\x74\x2F\x63\x61\x73\x65\x2F\x25\x64","\x6E\x65\x77\x54\x61\x62","\x44\x65\x73\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x74\x79\x70\x65\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x54\x68\x65\x20\x45\x6E\x64\x75\x73\x65\x72\x20\x49\x44\x20\x69\x73\x3A","\x54\x68\x65\x20\x55\x73\x65\x72\x20\x49\x44\x20\x69\x73\x3A","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x65\x6D\x61\x69\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x6E\x6F\x6E\x65","\x5B\x4F\x55\x54\x42\x4F\x55\x4E\x44\x5D","\x25\x73\x2F\x61\x67\x65\x6E\x74\x2F\x74\x69\x63\x6B\x65\x74\x73\x2F\x25\x73","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x5B\x41\x42\x41\x4E\x44\x4F\x4E\x45\x44\x5D"];_0x474f[0];var _=require(_0x474f[1]);var rp=require(_0x474f[2]);var md5=require(_0x474f[3]);var util=require(_0x474f[4]);var intUtil=require(_0x474f[5]);var logger=require(_0x474f[7])(_0x474f[6]);var io=require(_0x474f[9])({host:_0x474f[8],port:6379});function emit(_0x26aax9,_0x26aaxa,_0x26aaxb){io[_0x474f[11]](_0x26aax9)[_0x474f[10]](_0x26aaxa,_0x26aaxb)}var headers={"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x474f[12],"\x41\x63\x63\x65\x70\x74":_0x474f[12]};function getUser(_0x26aaxe,_0x26aaxf){logger[_0x474f[14]](_0x474f[13],_0x26aaxf);return request({uri:util[_0x474f[19]](_0x474f[25],_0x26aaxe[_0x474f[18]])})[_0x474f[20]](function(_0x26aax10){if(_0x26aax10[_0x474f[21]]){return _[_0x474f[24]](_0x26aax10[_0x474f[23]][_0x474f[22]],{email:_0x26aaxf})}})[_0x474f[20]](function(_0x26aax10){if(_0x26aax10){logger[_0x474f[14]](_0x474f[15]);return _0x26aax10}else {logger[_0x474f[14]](_0x474f[16]);return request({uri:util[_0x474f[19]](_0x474f[17],_0x26aaxe[_0x474f[18]])})}})}function request(_0x26aax12){logger[_0x474f[28]](_0x474f[26],JSON[_0x474f[27]](_0x26aax12));return rp(_[_0x474f[30]](_0x26aax12,{method:_0x474f[29],headers:headers,json:true}))}function getAuth(_0x26aaxe){var _0x26aax14;if(_0x26aaxe[_0x474f[31]]=== _0x474f[32]){_0x26aax14= util[_0x474f[19]](_0x474f[33],_0x26aaxe[_0x474f[34]],_0x26aaxe[_0x474f[35]])}else {if(_0x26aaxe[_0x474f[31]]=== _0x474f[36]){_0x26aax14= util[_0x474f[19]](_0x474f[37],_0x26aaxe[_0x474f[34]],_0x26aaxe[_0x474f[36]])}};return util[_0x474f[19]](_0x474f[38], new Buffer(_0x26aax14).toString(_0x474f[39]))}function getEndUser(_0x26aaxe,_0x26aax16,_0x26aax17){logger[_0x474f[14]](_0x474f[40],_0x26aax17);return request({uri:util[_0x474f[19]](_0x474f[46],_0x26aaxe[_0x474f[18]]),qs:{phone:_0x26aax17}})[_0x474f[20]](function(_0x26aax10){if(_0x26aax10[_0x474f[21]]){logger[_0x474f[14]](_0x474f[41]);return _0x26aax10[_0x474f[23]][_0x474f[22]][0]}else {logger[_0x474f[14]](_0x474f[42]);return request({uri:util[_0x474f[19]](_0x474f[43],_0x26aaxe[_0x474f[18]]),method:_0x474f[44],body:{first_name:_0x26aax16,title:_0x26aax16,phone_numbers:[{type:_0x474f[45],value:_0x26aax17}]}})}})}function getTags(_0x26aax19,_0x26aax1a){var _0x26aax1b=[];if(_0x26aax19&& _0x26aax19[_0x474f[47]]> 0){_0x26aax1b= _[_0x474f[48]](_0x26aax19,_0x26aax1a)};return _0x26aax1b}function getCustomFields(_0x26aax1d,_0x26aax1e){var _0x26aax1f=[];var _0x26aax20={custom_fields:{}};if(_0x26aax1d[_0x474f[47]]> 0){_[_0x474f[62]](_0x26aax1d,function(_0x26aax21){if(_0x26aax21[_0x474f[49]]=== _0x474f[50]&& _0x26aax21[_0x474f[51]]&&  !_0x26aax21[_0x474f[52]]){_0x26aax20[_0x26aax21[_0x474f[51]][_0x474f[53]]()]= _0x26aax21[_0x474f[54]].toString()}else {if(_0x26aax21[_0x474f[49]]=== _0x474f[50]&& _0x26aax21[_0x474f[55]]&& _0x26aax21[_0x474f[52]]){_0x26aax20[_0x474f[56]][_0x26aax21[_0x474f[55]]]= _0x26aax21[_0x474f[54]].toString()}else {if(_0x26aax21[_0x474f[49]]=== _0x474f[57]&& _0x26aax21[_0x474f[58]]&& _0x26aax21[_0x474f[55]]&& _0x26aax21[_0x474f[52]]){_0x26aax1e[_0x26aax21[_0x474f[58]]]&& (_0x26aax20[_0x474f[56]][_0x26aax21[_0x474f[55]]]= _0x26aax1e[_0x26aax21[_0x474f[58]]].toString())}else {if(_0x26aax21[_0x474f[49]]=== _0x474f[59]&& _0x26aax21[_0x474f[60]]&& _0x26aax21[_0x474f[60]][_0x474f[61]]&& _0x26aax21[_0x474f[55]]&& _0x26aax21[_0x474f[52]]){_0x26aax1e[_0x26aax21[_0x474f[60]][_0x474f[61]][_0x474f[53]]()]&& (_0x26aax20[_0x474f[56]][_0x26aax21[_0x474f[55]]]= _0x26aax1e[_0x26aax21[_0x474f[60]][_0x474f[61]][_0x474f[53]]()].toString())}}}}})};if(_0x26aax20[_0x474f[63]]){_0x26aax20[_0x474f[63]]= Number(_0x26aax20[_0x474f[63]])};return _0x26aax20}function getTicket(_0x26aaxe,_0x26aax23,_0x26aax24,_0x26aax25,_0x26aax1e){logger[_0x474f[14]](_0x474f[64]);var _0x26aax26=_[_0x474f[78]]({subject:intUtil[_0x474f[66]](_0x26aax25.Subjects,_0x26aax1e,_0x474f[65]),type:_0x474f[67],status:_0x474f[68],labels:[_0x474f[70],_0x474f[71],_0x474f[72]][_0x474f[69]](getTags(_0x26aax25.Tags,_0x474f[61])),description:intUtil[_0x474f[66]](_0x26aax25.Descriptions,_0x26aax1e,_0x474f[73]),_links:{assigned_user:{href:util[_0x474f[19]](_0x474f[74],_0x26aax23[_0x474f[75]]),class:_0x474f[76]}},message:{direction:_0x474f[77],body:intUtil[_0x474f[66]](_0x26aax25.Descriptions,_0x26aax1e,_0x474f[73])}},getCustomFields(_0x26aax25.Fields,_0x26aax1e));return request({uri:util[_0x474f[19]](_0x474f[79],_0x26aaxe[_0x474f[18]],_0x26aax24[_0x474f[75]]),method:_0x474f[44],body:_0x26aax26})}exports[_0x474f[80]]= function(_0x26aax27,_0x26aaxa,_0x26aax25,_0x26aax28,_0x26aax29,_0x26aaxe){var _0x26aax23,_0x26aax24;_0x26aaxe[_0x474f[18]]= intUtil[_0x474f[81]](_0x26aaxe[_0x474f[18]]);_0x26aaxe[_0x474f[82]]= intUtil[_0x474f[81]](_0x26aaxe[_0x474f[82]]);if(_0x26aax29&& _0x26aax29[_0x474f[83]]){logger[_0x474f[14]](_0x474f[84],_0x474f[85]);_0x26aaxa[_0x474f[86]]= util[_0x474f[19]](_0x474f[87],_0x26aaxe[_0x474f[82]],_0x26aaxa[_0x474f[88]],md5(_0x26aaxa[_0x474f[88]]))}else {_0x26aaxa[_0x474f[86]]= _0x474f[89]};headers[_0x474f[90]]= getAuth(_0x26aaxe);return getUser(_0x26aaxe,_0x26aax28[_0x474f[108]])[_0x474f[20]](function(_0x26aax2c){_0x26aax23= _0x26aax2c;logger[_0x474f[14]](_0x474f[105],_0x26aax23[_0x474f[75]]);return getEndUser(_0x26aaxe,_0x26aaxa[_0x474f[106]],_0x26aaxa[_0x474f[107]])})[_0x474f[20]](function(_0x26aax2c){_0x26aax24= _0x26aax2c;logger[_0x474f[14]](_0x474f[104],_0x26aax24[_0x474f[75]]);return getTicket(_0x26aaxe,_0x26aax23,_0x26aax24,_0x26aax25,_0x26aaxa)})[_0x474f[20]](function(_0x26aax2b){if(_0x26aax2b){logger[_0x474f[14]](_0x474f[93]);logger[_0x474f[14]](_0x474f[94],_0x26aax2b[_0x474f[75]]);switch(_0x26aaxe[_0x474f[49]]){case _0x474f[98]:logger[_0x474f[14]](_0x474f[84],_0x474f[95]);emit(util[_0x474f[19]](_0x474f[96],_0x26aax28[_0x474f[61]]),_0x474f[97],{recordId:_0x26aax2b[_0x474f[75]]});break;case _0x474f[102]:logger[_0x474f[14]](_0x474f[84],_0x474f[99]);emit(util[_0x474f[19]](_0x474f[96],_0x26aax28[_0x474f[61]]),_0x474f[100],{uri:util[_0x474f[19]](_0x474f[101],_0x26aax2b[_0x474f[75]])});break;default:logger[_0x474f[91]](_0x474f[84],_0x474f[103])}}})[_0x474f[92]](function(_0x26aax2a){console[_0x474f[91]](_0x26aax2a);logger[_0x474f[91]](_0x474f[84],JSON[_0x474f[27]](_0x26aax2a))})};exports[_0x474f[109]]= function(_0x26aax27,_0x26aaxa,_0x26aax25,_0x26aax28,_0x26aax29,_0x26aaxe,_0x26aax2d){var _0x26aax23,_0x26aax24;_0x26aaxe[_0x474f[18]]= intUtil[_0x474f[81]](_0x26aaxe[_0x474f[18]]);_0x26aaxe[_0x474f[82]]= intUtil[_0x474f[81]](_0x26aaxe[_0x474f[82]]);if(_0x26aax2d&& _0x26aax2d[_0x474f[110]]&& _0x26aax2d[_0x474f[110]]!== _0x474f[111]){logger[_0x474f[14]](_0x474f[112],_0x474f[85]);_0x26aaxa[_0x474f[86]]= util[_0x474f[19]](_0x474f[87],_0x26aaxe[_0x474f[82]],_0x26aaxa[_0x474f[88]],md5(_0x26aaxa[_0x474f[88]]))};headers[_0x474f[90]]= getAuth(_0x26aaxe);return getUser(_0x26aaxe,_0x26aax28[_0x474f[108]])[_0x474f[20]](function(_0x26aax2c){_0x26aax23= _0x26aax2c;logger[_0x474f[14]](_0x474f[105],_0x26aax23[_0x474f[75]]);return getEndUser(_0x26aaxe,_0x26aaxa[_0x474f[114]],_0x26aaxa[_0x474f[115]])})[_0x474f[20]](function(_0x26aax2c){_0x26aax24= _0x26aax2c;logger[_0x474f[14]](_0x474f[104],_0x26aax24[_0x474f[75]]);return getTicket(_0x26aaxe,_0x26aax23,_0x26aax24,_0x26aax25,_0x26aaxa)})[_0x474f[20]](function(_0x26aax2b){if(_0x26aax2b){logger[_0x474f[14]](_0x474f[93]);logger[_0x474f[14]](_0x474f[94],_0x26aax2b[_0x474f[75]]);switch(_0x26aaxe[_0x474f[49]]){case _0x474f[98]:logger[_0x474f[14]](_0x474f[84],_0x474f[95]);emit(util[_0x474f[19]](_0x474f[96],_0x26aax28[_0x474f[61]]),_0x474f[97],{recordId:_0x26aax2b[_0x474f[75]]});break;case _0x474f[102]:logger[_0x474f[14]](_0x474f[84],_0x474f[99]);emit(util[_0x474f[19]](_0x474f[96],_0x26aax28[_0x474f[61]]),_0x474f[100],{uri:util[_0x474f[19]](_0x474f[113],_0x26aaxe[_0x474f[18]],_0x26aax2b[_0x474f[75]])});break;default:logger[_0x474f[91]](_0x474f[112],_0x474f[103])}}})[_0x474f[92]](function(_0x26aax2a){logger[_0x474f[91]](_0x474f[112],JSON[_0x474f[27]](_0x26aax2a))})};exports[_0x474f[116]]= function(_0x26aax27,_0x26aaxa,_0x26aax25,_0x26aax28,_0x26aax29,_0x26aaxe){var _0x26aax23,_0x26aax24;_0x26aaxe[_0x474f[18]]= intUtil[_0x474f[81]](_0x26aaxe[_0x474f[18]]);_0x26aaxe[_0x474f[82]]= intUtil[_0x474f[81]](_0x26aaxe[_0x474f[82]]);if(_0x26aax29&& _0x26aax29[_0x474f[83]]){logger[_0x474f[14]](_0x474f[117],_0x474f[85]);_0x26aaxa[_0x474f[86]]= util[_0x474f[19]](_0x474f[87],_0x26aaxe[_0x474f[82]],_0x26aaxa[_0x474f[88]],md5(_0x26aaxa[_0x474f[88]]))}else {_0x26aaxa[_0x474f[86]]= _0x474f[89]};headers[_0x474f[90]]= getAuth(_0x26aaxe);return getUser(_0x26aaxe)[_0x474f[20]](function(_0x26aax2c){_0x26aax23= _0x26aax2c;logger[_0x474f[14]](_0x474f[105],_0x26aax23[_0x474f[75]]);return getEndUser(_0x26aaxe,_0x26aaxa[_0x474f[106]],_0x26aaxa[_0x474f[107]])})[_0x474f[20]](function(_0x26aax2c){_0x26aax24= _0x26aax2c;logger[_0x474f[14]](_0x474f[104],_0x26aax24[_0x474f[75]]);return getTicket(_0x26aaxe,_0x26aax23,_0x26aax24,_0x26aax25,_0x26aaxa)})[_0x474f[20]](function(_0x26aax2b){if(_0x26aax2b){logger[_0x474f[14]](_0x474f[93]);logger[_0x474f[14]](_0x474f[94],_0x26aax2b[_0x474f[75]])}})[_0x474f[92]](function(_0x26aax2a){logger[_0x474f[91]](_0x474f[117],JSON[_0x474f[27]](_0x26aax2a))})}
\ No newline at end of file
index 32b2a71..1bf267e 100644 (file)
@@ -1 +1 @@
-var _0x7c57=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x64\x35","\x75\x74\x69\x6C","\x2E\x2F\x75\x74\x69\x6C","\x66\x72\x65\x73\x68\x64\x65\x73\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x65\x6D\x69\x74","\x74\x6F","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x6E\x65\x77\x20\x74\x69\x63\x6B\x65\x74\x2E\x2E\x2E","\x69\x6E\x66\x6F","\x69\x64","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x20","\x67\x65\x74\x53\x74\x72\x69\x6E\x67","\x3C\x62\x72\x3E","\x6E\x61\x6D\x65","\x6D\x65\x72\x67\x65","\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x6B\x65\x79\x42\x79","\x76\x61\x6C\x75\x65","\x6D\x61\x70\x56\x61\x6C\x75\x65\x73","\x54\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x65\x64\x21","\x74\x68\x65\x6E","\x25\x73\x2F\x61\x70\x69\x2F\x76\x32\x2F\x74\x69\x63\x6B\x65\x74\x73","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x50\x4F\x53\x54","\x47\x65\x74\x74\x69\x6E\x67\x20\x61\x67\x65\x6E\x74\x20\x77\x69\x74\x68\x20\x65\x6D\x61\x69\x6C","\x6C\x65\x6E\x67\x74\x68","\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x21","\x65\x6D\x61\x69\x6C","\x63\x6F\x6E\x74\x61\x63\x74","\x66\x69\x6E\x64","\x41\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x75\x73\x69\x6E\x67\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x21","\x41\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x73\x65\x6C\x65\x63\x74\x65\x64\x2E","\x25\x73\x2F\x61\x70\x69\x2F\x76\x32\x2F\x61\x67\x65\x6E\x74\x73\x2F\x6D\x65","\x25\x73\x2F\x61\x70\x69\x2F\x76\x32\x2F\x61\x67\x65\x6E\x74\x73","\x53\x65\x61\x72\x63\x68\x69\x6E\x67\x20\x65\x6E\x64\x75\x73\x65\x72\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65","\x45\x6E\x64\x75\x73\x65\x72\x20\x66\x6F\x75\x6E\x64\x21","\x45\x6E\x64\x75\x73\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x61\x20\x6E\x65\x77\x20\x65\x6E\x64\x75\x73\x65\x72\x21","\x45\x6E\x64\x75\x73\x65\x72\x20\x63\x72\x65\x61\x74\x65\x64\x2E","\x25\x73\x2F\x61\x70\x69\x2F\x76\x32\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x42\x61\x73\x69\x63\x20\x25\x73","\x62\x61\x73\x65\x36\x34","\x61\x70\x69\x4B\x65\x79","\x3A\x58","\x5B\x48\x54\x54\x50\x5D","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x47\x45\x54","\x64\x65\x66\x61\x75\x6C\x74\x73","\x6D\x61\x70","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x63\x6F\x6E\x74\x65\x6E\x74","\x69\x64\x46\x69\x65\x6C\x64","\x70\x75\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x66\x6F\x72\x45\x61\x63\x68","\x71\x75\x65\x75\x65","\x73\x74\x72\x69\x70\x54\x72\x61\x69\x6C\x69\x6E\x67\x53\x6C\x61\x73\x68","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x51\x55\x45\x55\x45\x5D","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x69\x73\x20\x65\x6E\x61\x62\x6C\x65\x64\x21","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x73\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64\x26\x74\x6F\x6B\x65\x6E\x3D\x25\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x54\x68\x65\x20\x54\x69\x63\x6B\x65\x74\x20\x49\x44\x20\x69\x73\x3A","\x44\x69\x73\x70\x6C\x61\x79\x69\x6E\x67\x20\x74\x69\x63\x6B\x65\x74\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x69\x6E\x20\x61\x20\x6E\x65\x77\x20\x74\x61\x62\x2E\x2E\x2E","\x75\x73\x65\x72\x3A\x25\x73","\x74\x72\x69\x67\x67\x65\x72\x3A\x62\x72\x6F\x77\x73\x65\x72\x3A\x75\x72\x6C","\x25\x73\x2F\x68\x65\x6C\x70\x64\x65\x73\x6B\x2F\x74\x69\x63\x6B\x65\x74\x73\x2F\x25\x64","\x54\x68\x65\x20\x45\x6E\x64\x75\x73\x65\x72\x20\x49\x44\x20\x69\x73\x3A","\x54\x68\x65\x20\x55\x73\x65\x72\x20\x49\x44\x20\x69\x73\x3A","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x6E\x6F\x6E\x65","\x5B\x4F\x55\x54\x42\x4F\x55\x4E\x44\x5D","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x5B\x41\x42\x41\x4E\x44\x4F\x4E\x45\x44\x5D"];_0x7c57[0];var _=require(_0x7c57[1]);var rp=require(_0x7c57[2]);var md5=require(_0x7c57[3]);var util=require(_0x7c57[4]);var intUtil=require(_0x7c57[5]);var logger=require(_0x7c57[7])(_0x7c57[6]);var io=require(_0x7c57[9])({host:_0x7c57[8],port:6379});var headers={"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x7c57[10],"\x41\x63\x63\x65\x70\x74":_0x7c57[10]};function emit(_0xcb97xa,_0xcb97xb,_0xcb97xc){io[_0x7c57[12]](_0xcb97xa)[_0x7c57[11]](_0xcb97xb,_0xcb97xc)}function getTicket(_0xcb97xe,_0xcb97xf,_0xcb97x10,_0xcb97x11,_0xcb97x12){logger[_0x7c57[14]](_0x7c57[13]);var _0xcb97x13=_[_0x7c57[24]]({responder_id:_0xcb97xf[_0x7c57[15]],requester_id:_0xcb97x10[_0x7c57[15]],name:util[_0x7c57[18]](_0x7c57[16],_0xcb97x12[_0x7c57[17]]),phone:_0xcb97x12[_0x7c57[19]],source:3,priority:1,status:2,subject:intUtil[_0x7c57[21]](_0xcb97x11.Subjects,_0xcb97x12,_0x7c57[20]),description:intUtil[_0x7c57[21]](_0xcb97x11.Descriptions,_0xcb97x12,_0x7c57[22]),tags:getTags(_0xcb97x11.Tags,_0x7c57[23])},getCustomFields(_0xcb97x11.Fields,_0xcb97x12));_0xcb97x13[_0x7c57[25]]= _[_0x7c57[28]](_[_0x7c57[26]](_0xcb97x13[_0x7c57[25]],_0x7c57[15]),_0x7c57[27]);return request({uri:util[_0x7c57[18]](_0x7c57[31],_0xcb97xe[_0x7c57[32]]),method:_0x7c57[33],body:_0xcb97x13})[_0x7c57[30]](function(_0xcb97x14){logger[_0x7c57[14]](_0x7c57[29]);return _0xcb97x14})}function getUser(_0xcb97xe,_0xcb97x16){logger[_0x7c57[14]](_0x7c57[34],_0xcb97x16);return request({uri:util[_0x7c57[18]](_0x7c57[43],_0xcb97xe[_0x7c57[32]]),qs:{email:_0xcb97x16}})[_0x7c57[30]](function(_0xcb97x17){if(_0xcb97x17[_0x7c57[35]]){logger[_0x7c57[14]](_0x7c57[36]);return _[_0x7c57[39]](_0xcb97x17,function(_0xcb97x18){return _0xcb97x18[_0x7c57[38]][_0x7c57[37]]=== _0xcb97x16})}else {logger[_0x7c57[14]](_0x7c57[40]);return request({uri:util[_0x7c57[18]](_0x7c57[42],_0xcb97xe[_0x7c57[32]])})[_0x7c57[30]](function(_0xcb97x19){logger[_0x7c57[14]](_0x7c57[41]);return _0xcb97x19})}})}function getEndUser(_0xcb97xe,_0xcb97x1b,_0xcb97x1c){logger[_0x7c57[14]](_0x7c57[44],_0xcb97x1c);return request({uri:util[_0x7c57[18]](_0x7c57[48],_0xcb97xe[_0x7c57[32]]),qs:{phone:_0xcb97x1c}})[_0x7c57[30]](function(_0xcb97x17){if(_0xcb97x17[_0x7c57[35]]){logger[_0x7c57[14]](_0x7c57[45]);return _[_0x7c57[39]](_0xcb97x17,{phone:_0xcb97x1c})}else {logger[_0x7c57[14]](_0x7c57[46]);return request({uri:util[_0x7c57[18]](_0x7c57[48],_0xcb97xe[_0x7c57[32]]),method:_0x7c57[33],body:{name:_0xcb97x1b,phone:_0xcb97x1c}})[_0x7c57[30]](function(_0xcb97xf){logger[_0x7c57[14]](_0x7c57[47]);return _0xcb97xf})}})}function getAuth(_0xcb97xe){return util[_0x7c57[18]](_0x7c57[49], new Buffer(_0xcb97xe[_0x7c57[51]]+ _0x7c57[52]).toString(_0x7c57[50]))}function request(_0xcb97x1f){logger[_0x7c57[55]](_0x7c57[53],JSON[_0x7c57[54]](_0xcb97x1f));return rp(_[_0x7c57[57]](_0xcb97x1f,{method:_0x7c57[56],headers:headers,json:true}))}function getTags(_0xcb97x21,_0xcb97x22){var _0xcb97x23=[];if(_0xcb97x21&& _0xcb97x21[_0x7c57[35]]> 0){_0xcb97x23= _[_0x7c57[58]](_0xcb97x21,_0xcb97x22)};return _0xcb97x23}function getCustomFields(_0xcb97x25,_0xcb97x12){var _0xcb97x26=[];var _0xcb97x27={custom_fields:[]};if(_0xcb97x25[_0x7c57[35]]> 0){_[_0x7c57[71]](_0xcb97x25,function(_0xcb97x28){if(_0xcb97x28[_0x7c57[59]]=== _0x7c57[60]&& _0xcb97x28[_0x7c57[61]]&&  !_0xcb97x28[_0x7c57[62]]){_0xcb97x27[_0xcb97x28[_0x7c57[61]][_0x7c57[63]]()]= _0xcb97x28[_0x7c57[64]].toString()}else {if(_0xcb97x28[_0x7c57[59]]=== _0x7c57[60]&& _0xcb97x28[_0x7c57[65]]&& _0xcb97x28[_0x7c57[62]]){_0xcb97x27[_0x7c57[25]][_0x7c57[66]]({id:_0xcb97x28[_0x7c57[65]],value:_0xcb97x28[_0x7c57[64]].toString()})}else {if(_0xcb97x28[_0x7c57[59]]=== _0x7c57[67]&& _0xcb97x28[_0x7c57[68]]&& _0xcb97x28[_0x7c57[65]]&& _0xcb97x28[_0x7c57[62]]){_0xcb97x12[_0xcb97x28[_0x7c57[68]]]&& _0xcb97x27[_0x7c57[25]][_0x7c57[66]]({id:_0xcb97x28[_0x7c57[65]],value:_0xcb97x12[_0xcb97x28[_0x7c57[68]]].toString()})}else {if(_0xcb97x28[_0x7c57[59]]=== _0x7c57[69]&& _0xcb97x28[_0x7c57[70]]&& _0xcb97x28[_0x7c57[70]][_0x7c57[23]]&& _0xcb97x28[_0x7c57[65]]&& _0xcb97x28[_0x7c57[62]]){_0xcb97x12[_0xcb97x28[_0x7c57[70]][_0x7c57[23]][_0x7c57[63]]()]&& _0xcb97x27[_0x7c57[25]][_0x7c57[66]]({id:_0xcb97x28[_0x7c57[65]],value:_0xcb97x12[_0xcb97x28[_0x7c57[70]][_0x7c57[23]][_0x7c57[63]]()].toString()})}}}}})};return _0xcb97x27}exports[_0x7c57[72]]= function(_0xcb97x29,_0xcb97xb,_0xcb97x11,_0xcb97x19,_0xcb97x2a,_0xcb97xe){var _0xcb97xf,_0xcb97x10;_0xcb97xe[_0x7c57[32]]= intUtil[_0x7c57[73]](_0xcb97xe[_0x7c57[32]]);_0xcb97xe[_0x7c57[74]]= intUtil[_0x7c57[73]](_0xcb97xe[_0x7c57[74]]);if(_0xcb97x2a&& _0xcb97x2a[_0x7c57[75]]){logger[_0x7c57[14]](_0x7c57[76],_0x7c57[77]);_0xcb97xb[_0x7c57[78]]= util[_0x7c57[18]](_0x7c57[79],_0xcb97xe[_0x7c57[74]],_0xcb97xb[_0x7c57[80]],md5(_0xcb97xb[_0x7c57[80]]))}else {_0xcb97xb[_0x7c57[78]]= _0x7c57[81]};headers[_0x7c57[82]]= getAuth(_0xcb97xe);return getUser(_0xcb97xe,_0xcb97x19[_0x7c57[37]])[_0x7c57[30]](function(_0xcb97x2c){_0xcb97xf= _0xcb97x2c;logger[_0x7c57[14]](_0x7c57[91],_0xcb97xf[_0x7c57[15]]);return getEndUser(_0xcb97xe,_0xcb97xb[_0x7c57[17]],_0xcb97xb[_0x7c57[19]])})[_0x7c57[30]](function(_0xcb97x2c){_0xcb97x10= _0xcb97x2c;logger[_0x7c57[14]](_0x7c57[90],_0xcb97x10[_0x7c57[15]]);return getTicket(_0xcb97xe,_0xcb97xf,_0xcb97x10,_0xcb97x11,_0xcb97xb)})[_0x7c57[30]](function(_0xcb97x14){if(_0xcb97x14&& _0xcb97x14[_0x7c57[15]]){logger[_0x7c57[14]](_0x7c57[29]);logger[_0x7c57[14]](_0x7c57[85],_0xcb97x14[_0x7c57[15]]);logger[_0x7c57[14]](_0x7c57[76],_0x7c57[86]);emit(util[_0x7c57[18]](_0x7c57[87],_0xcb97x19[_0x7c57[23]]),_0x7c57[88],{uri:util[_0x7c57[18]](_0x7c57[89],_0xcb97xe[_0x7c57[32]],_0xcb97x14[_0x7c57[15]])})}})[_0x7c57[84]](function(_0xcb97x2b){logger[_0x7c57[83]](_0x7c57[76],JSON[_0x7c57[54]](_0xcb97x2b))})};exports[_0x7c57[92]]= function(_0xcb97x29,_0xcb97xb,_0xcb97x11,_0xcb97x19,_0xcb97x2a,_0xcb97xe,_0xcb97x2d){var _0xcb97xf,_0xcb97x10;_0xcb97xe[_0x7c57[32]]= intUtil[_0x7c57[73]](_0xcb97xe[_0x7c57[32]]);_0xcb97xe[_0x7c57[74]]= intUtil[_0x7c57[73]](_0xcb97xe[_0x7c57[74]]);if(_0xcb97x2d&& _0xcb97x2d[_0x7c57[93]]&& _0xcb97x2d[_0x7c57[93]]!== _0x7c57[94]){logger[_0x7c57[14]](_0x7c57[95],_0x7c57[77]);_0xcb97xb[_0x7c57[78]]= util[_0x7c57[18]](_0x7c57[79],_0xcb97xe[_0x7c57[74]],_0xcb97xb[_0x7c57[80]],md5(_0xcb97xb[_0x7c57[80]]))};headers[_0x7c57[82]]= getAuth(_0xcb97xe);return getUser(_0xcb97xe,_0xcb97x19[_0x7c57[37]])[_0x7c57[30]](function(_0xcb97x2c){_0xcb97xf= _0xcb97x2c;logger[_0x7c57[14]](_0x7c57[91],_0xcb97xf[_0x7c57[15]]);return getEndUser(_0xcb97xe,_0xcb97xb[_0x7c57[96]],_0xcb97xb[_0x7c57[97]])})[_0x7c57[30]](function(_0xcb97x2c){_0xcb97x10= _0xcb97x2c;logger[_0x7c57[14]](_0x7c57[90],_0xcb97x10[_0x7c57[15]]);return getTicket(_0xcb97xe,_0xcb97xf,_0xcb97x10,_0xcb97x11,_0xcb97xb)})[_0x7c57[30]](function(_0xcb97x14){if(_0xcb97x14&& _0xcb97x14[_0x7c57[15]]){logger[_0x7c57[14]](_0x7c57[29]);logger[_0x7c57[14]](_0x7c57[85],_0xcb97x14[_0x7c57[15]]);logger[_0x7c57[14]](_0x7c57[95],_0x7c57[86]);emit(util[_0x7c57[18]](_0x7c57[87],_0xcb97x19[_0x7c57[23]]),_0x7c57[88],{uri:util[_0x7c57[18]](_0x7c57[89],_0xcb97xe[_0x7c57[32]],_0xcb97x14[_0x7c57[15]])})}})[_0x7c57[84]](function(_0xcb97x2b){logger[_0x7c57[83]](_0x7c57[95],JSON[_0x7c57[54]](_0xcb97x2b))})};exports[_0x7c57[98]]= function(_0xcb97x29,_0xcb97xb,_0xcb97x11,_0xcb97x19,_0xcb97x2a,_0xcb97xe){var _0xcb97xf,_0xcb97x10;_0xcb97xe[_0x7c57[32]]= intUtil[_0x7c57[73]](_0xcb97xe[_0x7c57[32]]);_0xcb97xe[_0x7c57[74]]= intUtil[_0x7c57[73]](_0xcb97xe[_0x7c57[74]]);if(_0xcb97x2a&& _0xcb97x2a[_0x7c57[75]]){logger[_0x7c57[14]](_0x7c57[99],_0x7c57[77]);_0xcb97xb[_0x7c57[78]]= util[_0x7c57[18]](_0x7c57[79],_0xcb97xe[_0x7c57[74]],_0xcb97xb[_0x7c57[80]],md5(_0xcb97xb[_0x7c57[80]]))}else {_0xcb97xb[_0x7c57[78]]= _0x7c57[81]};headers[_0x7c57[82]]= getAuth(_0xcb97xe);return getUser(_0xcb97xe,_0xcb97x19[_0x7c57[37]])[_0x7c57[30]](function(_0xcb97x2c){_0xcb97xf= _0xcb97x2c;logger[_0x7c57[14]](_0x7c57[91],_0xcb97xf[_0x7c57[15]]);return getEndUser(_0xcb97xe,_0xcb97xb[_0x7c57[17]],_0xcb97xb[_0x7c57[19]])})[_0x7c57[30]](function(_0xcb97x2c){_0xcb97x10= _0xcb97x2c;logger[_0x7c57[14]](_0x7c57[90],_0xcb97x10[_0x7c57[15]]);return getTicket(_0xcb97xe,_0xcb97xf,_0xcb97x10,_0xcb97x11,_0xcb97xb)})[_0x7c57[30]](function(_0xcb97x14){if(_0xcb97x14){logger[_0x7c57[14]](_0x7c57[29]);logger[_0x7c57[14]](_0x7c57[85],_0xcb97x14[_0x7c57[15]])}})[_0x7c57[84]](function(_0xcb97x2b){logger[_0x7c57[83]](_0x7c57[99],JSON[_0x7c57[54]](_0xcb97x2b))})}
\ No newline at end of file
+var _0xfc08=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x64\x35","\x75\x74\x69\x6C","\x2E\x2F\x75\x74\x69\x6C","\x66\x72\x65\x73\x68\x64\x65\x73\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x65\x6D\x69\x74","\x74\x6F","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x6E\x65\x77\x20\x74\x69\x63\x6B\x65\x74\x2E\x2E\x2E","\x69\x6E\x66\x6F","\x69\x64","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x20","\x67\x65\x74\x53\x74\x72\x69\x6E\x67","\x3C\x62\x72\x3E","\x6E\x61\x6D\x65","\x6D\x65\x72\x67\x65","\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x6B\x65\x79\x42\x79","\x76\x61\x6C\x75\x65","\x6D\x61\x70\x56\x61\x6C\x75\x65\x73","\x54\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x65\x64\x21","\x74\x68\x65\x6E","\x25\x73\x2F\x61\x70\x69\x2F\x76\x32\x2F\x74\x69\x63\x6B\x65\x74\x73","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x50\x4F\x53\x54","\x47\x65\x74\x74\x69\x6E\x67\x20\x61\x67\x65\x6E\x74\x20\x77\x69\x74\x68\x20\x65\x6D\x61\x69\x6C","\x6C\x65\x6E\x67\x74\x68","\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x21","\x65\x6D\x61\x69\x6C","\x63\x6F\x6E\x74\x61\x63\x74","\x66\x69\x6E\x64","\x41\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x75\x73\x69\x6E\x67\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x21","\x41\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x73\x65\x6C\x65\x63\x74\x65\x64\x2E","\x25\x73\x2F\x61\x70\x69\x2F\x76\x32\x2F\x61\x67\x65\x6E\x74\x73\x2F\x6D\x65","\x25\x73\x2F\x61\x70\x69\x2F\x76\x32\x2F\x61\x67\x65\x6E\x74\x73","\x53\x65\x61\x72\x63\x68\x69\x6E\x67\x20\x65\x6E\x64\x75\x73\x65\x72\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65","\x45\x6E\x64\x75\x73\x65\x72\x20\x66\x6F\x75\x6E\x64\x21","\x45\x6E\x64\x75\x73\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x61\x20\x6E\x65\x77\x20\x65\x6E\x64\x75\x73\x65\x72\x21","\x45\x6E\x64\x75\x73\x65\x72\x20\x63\x72\x65\x61\x74\x65\x64\x2E","\x25\x73\x2F\x61\x70\x69\x2F\x76\x32\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x42\x61\x73\x69\x63\x20\x25\x73","\x62\x61\x73\x65\x36\x34","\x61\x70\x69\x4B\x65\x79","\x3A\x58","\x5B\x48\x54\x54\x50\x5D","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x47\x45\x54","\x64\x65\x66\x61\x75\x6C\x74\x73","\x6D\x61\x70","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x63\x6F\x6E\x74\x65\x6E\x74","\x69\x64\x46\x69\x65\x6C\x64","\x70\x75\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x66\x6F\x72\x45\x61\x63\x68","\x71\x75\x65\x75\x65","\x73\x74\x72\x69\x70\x54\x72\x61\x69\x6C\x69\x6E\x67\x53\x6C\x61\x73\x68","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x51\x55\x45\x55\x45\x5D","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x69\x73\x20\x65\x6E\x61\x62\x6C\x65\x64\x21","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x73\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64\x26\x74\x6F\x6B\x65\x6E\x3D\x25\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x54\x68\x65\x20\x54\x69\x63\x6B\x65\x74\x20\x49\x44\x20\x69\x73\x3A","\x44\x69\x73\x70\x6C\x61\x79\x69\x6E\x67\x20\x74\x69\x63\x6B\x65\x74\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x69\x6E\x20\x61\x20\x6E\x65\x77\x20\x74\x61\x62\x2E\x2E\x2E","\x75\x73\x65\x72\x3A\x25\x73","\x74\x72\x69\x67\x67\x65\x72\x3A\x62\x72\x6F\x77\x73\x65\x72\x3A\x75\x72\x6C","\x25\x73\x2F\x68\x65\x6C\x70\x64\x65\x73\x6B\x2F\x74\x69\x63\x6B\x65\x74\x73\x2F\x25\x64","\x54\x68\x65\x20\x45\x6E\x64\x75\x73\x65\x72\x20\x49\x44\x20\x69\x73\x3A","\x54\x68\x65\x20\x55\x73\x65\x72\x20\x49\x44\x20\x69\x73\x3A","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x6E\x6F\x6E\x65","\x5B\x4F\x55\x54\x42\x4F\x55\x4E\x44\x5D","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x5B\x41\x42\x41\x4E\x44\x4F\x4E\x45\x44\x5D"];_0xfc08[0];var _=require(_0xfc08[1]);var rp=require(_0xfc08[2]);var md5=require(_0xfc08[3]);var util=require(_0xfc08[4]);var intUtil=require(_0xfc08[5]);var logger=require(_0xfc08[7])(_0xfc08[6]);var io=require(_0xfc08[9])({host:_0xfc08[8],port:6379});var headers={"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xfc08[10],"\x41\x63\x63\x65\x70\x74":_0xfc08[10]};function emit(_0xcb8bxa,_0xcb8bxb,_0xcb8bxc){io[_0xfc08[12]](_0xcb8bxa)[_0xfc08[11]](_0xcb8bxb,_0xcb8bxc)}function getTicket(_0xcb8bxe,_0xcb8bxf,_0xcb8bx10,_0xcb8bx11,_0xcb8bx12){logger[_0xfc08[14]](_0xfc08[13]);var _0xcb8bx13=_[_0xfc08[24]]({responder_id:_0xcb8bxf[_0xfc08[15]],requester_id:_0xcb8bx10[_0xfc08[15]],name:util[_0xfc08[18]](_0xfc08[16],_0xcb8bx12[_0xfc08[17]]),phone:_0xcb8bx12[_0xfc08[19]],source:3,priority:1,status:2,subject:intUtil[_0xfc08[21]](_0xcb8bx11.Subjects,_0xcb8bx12,_0xfc08[20]),description:intUtil[_0xfc08[21]](_0xcb8bx11.Descriptions,_0xcb8bx12,_0xfc08[22]),tags:getTags(_0xcb8bx11.Tags,_0xfc08[23])},getCustomFields(_0xcb8bx11.Fields,_0xcb8bx12));_0xcb8bx13[_0xfc08[25]]= _[_0xfc08[28]](_[_0xfc08[26]](_0xcb8bx13[_0xfc08[25]],_0xfc08[15]),_0xfc08[27]);return request({uri:util[_0xfc08[18]](_0xfc08[31],_0xcb8bxe[_0xfc08[32]]),method:_0xfc08[33],body:_0xcb8bx13})[_0xfc08[30]](function(_0xcb8bx14){logger[_0xfc08[14]](_0xfc08[29]);return _0xcb8bx14})}function getUser(_0xcb8bxe,_0xcb8bx16){logger[_0xfc08[14]](_0xfc08[34],_0xcb8bx16);return request({uri:util[_0xfc08[18]](_0xfc08[43],_0xcb8bxe[_0xfc08[32]]),qs:{email:_0xcb8bx16}})[_0xfc08[30]](function(_0xcb8bx17){if(_0xcb8bx17[_0xfc08[35]]){logger[_0xfc08[14]](_0xfc08[36]);return _[_0xfc08[39]](_0xcb8bx17,function(_0xcb8bx18){return _0xcb8bx18[_0xfc08[38]][_0xfc08[37]]=== _0xcb8bx16})}else {logger[_0xfc08[14]](_0xfc08[40]);return request({uri:util[_0xfc08[18]](_0xfc08[42],_0xcb8bxe[_0xfc08[32]])})[_0xfc08[30]](function(_0xcb8bx19){logger[_0xfc08[14]](_0xfc08[41]);return _0xcb8bx19})}})}function getEndUser(_0xcb8bxe,_0xcb8bx1b,_0xcb8bx1c){logger[_0xfc08[14]](_0xfc08[44],_0xcb8bx1c);return request({uri:util[_0xfc08[18]](_0xfc08[48],_0xcb8bxe[_0xfc08[32]]),qs:{phone:_0xcb8bx1c}})[_0xfc08[30]](function(_0xcb8bx17){if(_0xcb8bx17[_0xfc08[35]]){logger[_0xfc08[14]](_0xfc08[45]);return _[_0xfc08[39]](_0xcb8bx17,{phone:_0xcb8bx1c})}else {logger[_0xfc08[14]](_0xfc08[46]);return request({uri:util[_0xfc08[18]](_0xfc08[48],_0xcb8bxe[_0xfc08[32]]),method:_0xfc08[33],body:{name:_0xcb8bx1b,phone:_0xcb8bx1c}})[_0xfc08[30]](function(_0xcb8bxf){logger[_0xfc08[14]](_0xfc08[47]);return _0xcb8bxf})}})}function getAuth(_0xcb8bxe){return util[_0xfc08[18]](_0xfc08[49], new Buffer(_0xcb8bxe[_0xfc08[51]]+ _0xfc08[52]).toString(_0xfc08[50]))}function request(_0xcb8bx1f){logger[_0xfc08[55]](_0xfc08[53],JSON[_0xfc08[54]](_0xcb8bx1f));return rp(_[_0xfc08[57]](_0xcb8bx1f,{method:_0xfc08[56],headers:headers,json:true}))}function getTags(_0xcb8bx21,_0xcb8bx22){var _0xcb8bx23=[];if(_0xcb8bx21&& _0xcb8bx21[_0xfc08[35]]> 0){_0xcb8bx23= _[_0xfc08[58]](_0xcb8bx21,_0xcb8bx22)};return _0xcb8bx23}function getCustomFields(_0xcb8bx25,_0xcb8bx12){var _0xcb8bx26=[];var _0xcb8bx27={custom_fields:[]};if(_0xcb8bx25[_0xfc08[35]]> 0){_[_0xfc08[71]](_0xcb8bx25,function(_0xcb8bx28){if(_0xcb8bx28[_0xfc08[59]]=== _0xfc08[60]&& _0xcb8bx28[_0xfc08[61]]&&  !_0xcb8bx28[_0xfc08[62]]){_0xcb8bx27[_0xcb8bx28[_0xfc08[61]][_0xfc08[63]]()]= _0xcb8bx28[_0xfc08[64]].toString()}else {if(_0xcb8bx28[_0xfc08[59]]=== _0xfc08[60]&& _0xcb8bx28[_0xfc08[65]]&& _0xcb8bx28[_0xfc08[62]]){_0xcb8bx27[_0xfc08[25]][_0xfc08[66]]({id:_0xcb8bx28[_0xfc08[65]],value:_0xcb8bx28[_0xfc08[64]].toString()})}else {if(_0xcb8bx28[_0xfc08[59]]=== _0xfc08[67]&& _0xcb8bx28[_0xfc08[68]]&& _0xcb8bx28[_0xfc08[65]]&& _0xcb8bx28[_0xfc08[62]]){_0xcb8bx12[_0xcb8bx28[_0xfc08[68]]]&& _0xcb8bx27[_0xfc08[25]][_0xfc08[66]]({id:_0xcb8bx28[_0xfc08[65]],value:_0xcb8bx12[_0xcb8bx28[_0xfc08[68]]].toString()})}else {if(_0xcb8bx28[_0xfc08[59]]=== _0xfc08[69]&& _0xcb8bx28[_0xfc08[70]]&& _0xcb8bx28[_0xfc08[70]][_0xfc08[23]]&& _0xcb8bx28[_0xfc08[65]]&& _0xcb8bx28[_0xfc08[62]]){_0xcb8bx12[_0xcb8bx28[_0xfc08[70]][_0xfc08[23]][_0xfc08[63]]()]&& _0xcb8bx27[_0xfc08[25]][_0xfc08[66]]({id:_0xcb8bx28[_0xfc08[65]],value:_0xcb8bx12[_0xcb8bx28[_0xfc08[70]][_0xfc08[23]][_0xfc08[63]]()].toString()})}}}}})};return _0xcb8bx27}exports[_0xfc08[72]]= function(_0xcb8bx29,_0xcb8bxb,_0xcb8bx11,_0xcb8bx19,_0xcb8bx2a,_0xcb8bxe){var _0xcb8bxf,_0xcb8bx10;_0xcb8bxe[_0xfc08[32]]= intUtil[_0xfc08[73]](_0xcb8bxe[_0xfc08[32]]);_0xcb8bxe[_0xfc08[74]]= intUtil[_0xfc08[73]](_0xcb8bxe[_0xfc08[74]]);if(_0xcb8bx2a&& _0xcb8bx2a[_0xfc08[75]]){logger[_0xfc08[14]](_0xfc08[76],_0xfc08[77]);_0xcb8bxb[_0xfc08[78]]= util[_0xfc08[18]](_0xfc08[79],_0xcb8bxe[_0xfc08[74]],_0xcb8bxb[_0xfc08[80]],md5(_0xcb8bxb[_0xfc08[80]]))}else {_0xcb8bxb[_0xfc08[78]]= _0xfc08[81]};headers[_0xfc08[82]]= getAuth(_0xcb8bxe);return getUser(_0xcb8bxe,_0xcb8bx19[_0xfc08[37]])[_0xfc08[30]](function(_0xcb8bx2c){_0xcb8bxf= _0xcb8bx2c;logger[_0xfc08[14]](_0xfc08[91],_0xcb8bxf[_0xfc08[15]]);return getEndUser(_0xcb8bxe,_0xcb8bxb[_0xfc08[17]],_0xcb8bxb[_0xfc08[19]])})[_0xfc08[30]](function(_0xcb8bx2c){_0xcb8bx10= _0xcb8bx2c;logger[_0xfc08[14]](_0xfc08[90],_0xcb8bx10[_0xfc08[15]]);return getTicket(_0xcb8bxe,_0xcb8bxf,_0xcb8bx10,_0xcb8bx11,_0xcb8bxb)})[_0xfc08[30]](function(_0xcb8bx14){if(_0xcb8bx14&& _0xcb8bx14[_0xfc08[15]]){logger[_0xfc08[14]](_0xfc08[29]);logger[_0xfc08[14]](_0xfc08[85],_0xcb8bx14[_0xfc08[15]]);logger[_0xfc08[14]](_0xfc08[76],_0xfc08[86]);emit(util[_0xfc08[18]](_0xfc08[87],_0xcb8bx19[_0xfc08[23]]),_0xfc08[88],{uri:util[_0xfc08[18]](_0xfc08[89],_0xcb8bxe[_0xfc08[32]],_0xcb8bx14[_0xfc08[15]])})}})[_0xfc08[84]](function(_0xcb8bx2b){logger[_0xfc08[83]](_0xfc08[76],JSON[_0xfc08[54]](_0xcb8bx2b))})};exports[_0xfc08[92]]= function(_0xcb8bx29,_0xcb8bxb,_0xcb8bx11,_0xcb8bx19,_0xcb8bx2a,_0xcb8bxe,_0xcb8bx2d){var _0xcb8bxf,_0xcb8bx10;_0xcb8bxe[_0xfc08[32]]= intUtil[_0xfc08[73]](_0xcb8bxe[_0xfc08[32]]);_0xcb8bxe[_0xfc08[74]]= intUtil[_0xfc08[73]](_0xcb8bxe[_0xfc08[74]]);if(_0xcb8bx2d&& _0xcb8bx2d[_0xfc08[93]]&& _0xcb8bx2d[_0xfc08[93]]!== _0xfc08[94]){logger[_0xfc08[14]](_0xfc08[95],_0xfc08[77]);_0xcb8bxb[_0xfc08[78]]= util[_0xfc08[18]](_0xfc08[79],_0xcb8bxe[_0xfc08[74]],_0xcb8bxb[_0xfc08[80]],md5(_0xcb8bxb[_0xfc08[80]]))};headers[_0xfc08[82]]= getAuth(_0xcb8bxe);return getUser(_0xcb8bxe,_0xcb8bx19[_0xfc08[37]])[_0xfc08[30]](function(_0xcb8bx2c){_0xcb8bxf= _0xcb8bx2c;logger[_0xfc08[14]](_0xfc08[91],_0xcb8bxf[_0xfc08[15]]);return getEndUser(_0xcb8bxe,_0xcb8bxb[_0xfc08[96]],_0xcb8bxb[_0xfc08[97]])})[_0xfc08[30]](function(_0xcb8bx2c){_0xcb8bx10= _0xcb8bx2c;logger[_0xfc08[14]](_0xfc08[90],_0xcb8bx10[_0xfc08[15]]);return getTicket(_0xcb8bxe,_0xcb8bxf,_0xcb8bx10,_0xcb8bx11,_0xcb8bxb)})[_0xfc08[30]](function(_0xcb8bx14){if(_0xcb8bx14&& _0xcb8bx14[_0xfc08[15]]){logger[_0xfc08[14]](_0xfc08[29]);logger[_0xfc08[14]](_0xfc08[85],_0xcb8bx14[_0xfc08[15]]);logger[_0xfc08[14]](_0xfc08[95],_0xfc08[86]);emit(util[_0xfc08[18]](_0xfc08[87],_0xcb8bx19[_0xfc08[23]]),_0xfc08[88],{uri:util[_0xfc08[18]](_0xfc08[89],_0xcb8bxe[_0xfc08[32]],_0xcb8bx14[_0xfc08[15]])})}})[_0xfc08[84]](function(_0xcb8bx2b){logger[_0xfc08[83]](_0xfc08[95],JSON[_0xfc08[54]](_0xcb8bx2b))})};exports[_0xfc08[98]]= function(_0xcb8bx29,_0xcb8bxb,_0xcb8bx11,_0xcb8bx19,_0xcb8bx2a,_0xcb8bxe){var _0xcb8bxf,_0xcb8bx10;_0xcb8bxe[_0xfc08[32]]= intUtil[_0xfc08[73]](_0xcb8bxe[_0xfc08[32]]);_0xcb8bxe[_0xfc08[74]]= intUtil[_0xfc08[73]](_0xcb8bxe[_0xfc08[74]]);if(_0xcb8bx2a&& _0xcb8bx2a[_0xfc08[75]]){logger[_0xfc08[14]](_0xfc08[99],_0xfc08[77]);_0xcb8bxb[_0xfc08[78]]= util[_0xfc08[18]](_0xfc08[79],_0xcb8bxe[_0xfc08[74]],_0xcb8bxb[_0xfc08[80]],md5(_0xcb8bxb[_0xfc08[80]]))}else {_0xcb8bxb[_0xfc08[78]]= _0xfc08[81]};headers[_0xfc08[82]]= getAuth(_0xcb8bxe);return getUser(_0xcb8bxe,_0xcb8bx19[_0xfc08[37]])[_0xfc08[30]](function(_0xcb8bx2c){_0xcb8bxf= _0xcb8bx2c;logger[_0xfc08[14]](_0xfc08[91],_0xcb8bxf[_0xfc08[15]]);return getEndUser(_0xcb8bxe,_0xcb8bxb[_0xfc08[17]],_0xcb8bxb[_0xfc08[19]])})[_0xfc08[30]](function(_0xcb8bx2c){_0xcb8bx10= _0xcb8bx2c;logger[_0xfc08[14]](_0xfc08[90],_0xcb8bx10[_0xfc08[15]]);return getTicket(_0xcb8bxe,_0xcb8bxf,_0xcb8bx10,_0xcb8bx11,_0xcb8bxb)})[_0xfc08[30]](function(_0xcb8bx14){if(_0xcb8bx14){logger[_0xfc08[14]](_0xfc08[29]);logger[_0xfc08[14]](_0xfc08[85],_0xcb8bx14[_0xfc08[15]])}})[_0xfc08[84]](function(_0xcb8bx2b){logger[_0xfc08[83]](_0xfc08[99],JSON[_0xfc08[54]](_0xcb8bx2b))})}
\ No newline at end of file
index 1e71f82..edb1f2e 100644 (file)
@@ -1 +1 @@
-var _0x38ca=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B","\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x2E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D","\x2E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B","\x2E\x2F\x7A\x6F\x68\x6F","\x2E\x2F\x64\x65\x73\x6B","\x7A\x65\x6E\x64\x65\x73\x6B","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x73\x75\x67\x61\x72\x63\x72\x6D","\x66\x72\x65\x73\x68\x64\x65\x73\x6B","\x7A\x6F\x68\x6F","\x64\x65\x73\x6B","\x65\x78\x65\x63","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x64\x61\x74\x61\x31","\x69\x6E\x63\x6C\x75\x64\x65\x73","","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x66\x69\x6E\x64","\x71\x75\x65\x75\x65","\x72\x6F\x75\x74\x65\x49\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x45\x56\x45\x4E\x54\x20\x55\x4E\x4B\x4E\x4F\x57\x4E","\x6C\x6F\x67","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x5B\x45\x58\x45\x43\x5D","\x25\x73\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x20\x23\x25\x73\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x66\x6F\x72\x6D\x61\x74","\x65\x72\x72\x6F\x72","\x25\x73\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x23\x25\x73\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64"];_0x38ca[0];var _=require(_0x38ca[1]);var util=require(_0x38ca[2]);var zendesk=require(_0x38ca[3]);var salesforce=require(_0x38ca[4]);var sugarcrm=require(_0x38ca[5]);var freshdesk=require(_0x38ca[6]);var zoho=require(_0x38ca[7]);var desk=require(_0x38ca[8]);var integrations=[_0x38ca[9],_0x38ca[10],_0x38ca[11],_0x38ca[12],_0x38ca[13],_0x38ca[14]];exports[_0x38ca[15]]= function(_0x6354xa,_0x6354xb,_0x6354xc,_0x6354xd,_0x6354xe,_0x6354xf){if(_0x6354xc){if(_[_0x38ca[18]](integrations,_0x6354xa[_0x38ca[17]][_0x38ca[16]]())){try{var _0x6354x10=null;var _0x6354x11=_0x38ca[19];var _0x6354x12=_0x6354xc[_0x6354xa[_0x38ca[17]][_0x38ca[16]]()];if(_0x6354x12){var _0x6354x13=_0x6354x12[_0x6354xa[_0x38ca[20]]];if(_0x6354x13){var _0x6354x14=_[_0x38ca[22]](_0x6354x13.Configurations,{id:parseInt(_0x6354xa[_0x38ca[21]],10)});if(_0x6354x14){if(_0x6354xd){if(_0x6354xe&& _0x6354xb[_0x38ca[23]]){_0x6354x11= _0x38ca[23]}else {if(_0x6354xb[_0x38ca[24]]){_0x6354x11= _0x38ca[25]}else {console[_0x38ca[27]](_0x38ca[26],_0x6354xb)}}}else {_0x6354x11= _0x38ca[28]};switch(_0x6354xa[_0x38ca[17]][_0x38ca[16]]()){case _0x38ca[9]:zendesk[_0x6354x11](_0x6354xa,_0x6354xb,_0x6354x14,_0x6354xd,_0x6354xe,_0x6354x13,_0x6354xf);break;case _0x38ca[10]:salesforce[_0x6354x11](_0x6354xa,_0x6354xb,_0x6354x14,_0x6354xd,_0x6354xe,_0x6354x13,_0x6354xf);break;case _0x38ca[11]:sugarcrm[_0x6354x11](_0x6354xa,_0x6354xb,_0x6354x14,_0x6354xd,_0x6354xe,_0x6354x13,_0x6354xf);break;case _0x38ca[12]:freshdesk[_0x6354x11](_0x6354xa,_0x6354xb,_0x6354x14,_0x6354xd,_0x6354xe,_0x6354x13,_0x6354xf);break;case _0x38ca[13]:zoho[_0x6354x11](_0x6354xa,_0x6354xb,_0x6354x14,_0x6354xd,_0x6354xe,_0x6354x13,_0x6354xf);break;case _0x38ca[14]:desk[_0x6354x11](_0x6354xa,_0x6354xb,_0x6354x14,_0x6354xd,_0x6354xe,_0x6354x13,_0x6354xf);break;default:console[_0x38ca[27]](_0x38ca[29])}}else {_0x6354x10= require(_0x38ca[30])(_0x6354xa[_0x38ca[17]][_0x38ca[16]]());_0x6354x10[_0x38ca[34]](_0x38ca[31],util[_0x38ca[33]](_0x38ca[32],_0x6354xa[_0x38ca[17]][_0x38ca[16]](),_0x6354xa[_0x38ca[21]]))}}else {_0x6354x10= require(_0x38ca[30])(_0x6354xa[_0x38ca[17]][_0x38ca[16]]());_0x6354x10[_0x38ca[34]](_0x38ca[31],util[_0x38ca[33]](_0x38ca[35],_0x6354xa[_0x38ca[17]][_0x38ca[16]](),_0x6354xa[_0x38ca[20]]))}}else {}}catch(e){console[_0x38ca[34]](e)}}}}
\ No newline at end of file
+var _0x9d09=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B","\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x2E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D","\x2E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B","\x2E\x2F\x7A\x6F\x68\x6F","\x2E\x2F\x64\x65\x73\x6B","\x7A\x65\x6E\x64\x65\x73\x6B","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x73\x75\x67\x61\x72\x63\x72\x6D","\x66\x72\x65\x73\x68\x64\x65\x73\x6B","\x7A\x6F\x68\x6F","\x64\x65\x73\x6B","\x65\x78\x65\x63","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x64\x61\x74\x61\x31","\x69\x6E\x63\x6C\x75\x64\x65\x73","","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x66\x69\x6E\x64","\x71\x75\x65\x75\x65","\x72\x6F\x75\x74\x65\x49\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x45\x56\x45\x4E\x54\x20\x55\x4E\x4B\x4E\x4F\x57\x4E","\x6C\x6F\x67","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x5B\x45\x58\x45\x43\x5D","\x25\x73\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x20\x23\x25\x73\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x66\x6F\x72\x6D\x61\x74","\x65\x72\x72\x6F\x72","\x25\x73\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x23\x25\x73\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64"];_0x9d09[0];var _=require(_0x9d09[1]);var util=require(_0x9d09[2]);var zendesk=require(_0x9d09[3]);var salesforce=require(_0x9d09[4]);var sugarcrm=require(_0x9d09[5]);var freshdesk=require(_0x9d09[6]);var zoho=require(_0x9d09[7]);var desk=require(_0x9d09[8]);var integrations=[_0x9d09[9],_0x9d09[10],_0x9d09[11],_0x9d09[12],_0x9d09[13],_0x9d09[14]];exports[_0x9d09[15]]= function(_0x1d94xa,_0x1d94xb,_0x1d94xc,_0x1d94xd,_0x1d94xe,_0x1d94xf){if(_0x1d94xc){if(_[_0x9d09[18]](integrations,_0x1d94xa[_0x9d09[17]][_0x9d09[16]]())){try{var _0x1d94x10=null;var _0x1d94x11=_0x9d09[19];var _0x1d94x12=_0x1d94xc[_0x1d94xa[_0x9d09[17]][_0x9d09[16]]()];if(_0x1d94x12){var _0x1d94x13=_0x1d94x12[_0x1d94xa[_0x9d09[20]]];if(_0x1d94x13){var _0x1d94x14=_[_0x9d09[22]](_0x1d94x13.Configurations,{id:parseInt(_0x1d94xa[_0x9d09[21]],10)});if(_0x1d94x14){if(_0x1d94xd){if(_0x1d94xe&& _0x1d94xb[_0x9d09[23]]){_0x1d94x11= _0x9d09[23]}else {if(_0x1d94xb[_0x9d09[24]]){_0x1d94x11= _0x9d09[25]}else {console[_0x9d09[27]](_0x9d09[26],_0x1d94xb)}}}else {_0x1d94x11= _0x9d09[28]};switch(_0x1d94xa[_0x9d09[17]][_0x9d09[16]]()){case _0x9d09[9]:zendesk[_0x1d94x11](_0x1d94xa,_0x1d94xb,_0x1d94x14,_0x1d94xd,_0x1d94xe,_0x1d94x13,_0x1d94xf);break;case _0x9d09[10]:salesforce[_0x1d94x11](_0x1d94xa,_0x1d94xb,_0x1d94x14,_0x1d94xd,_0x1d94xe,_0x1d94x13,_0x1d94xf);break;case _0x9d09[11]:sugarcrm[_0x1d94x11](_0x1d94xa,_0x1d94xb,_0x1d94x14,_0x1d94xd,_0x1d94xe,_0x1d94x13,_0x1d94xf);break;case _0x9d09[12]:freshdesk[_0x1d94x11](_0x1d94xa,_0x1d94xb,_0x1d94x14,_0x1d94xd,_0x1d94xe,_0x1d94x13,_0x1d94xf);break;case _0x9d09[13]:zoho[_0x1d94x11](_0x1d94xa,_0x1d94xb,_0x1d94x14,_0x1d94xd,_0x1d94xe,_0x1d94x13,_0x1d94xf);break;case _0x9d09[14]:desk[_0x1d94x11](_0x1d94xa,_0x1d94xb,_0x1d94x14,_0x1d94xd,_0x1d94xe,_0x1d94x13,_0x1d94xf);break;default:console[_0x9d09[27]](_0x9d09[29])}}else {_0x1d94x10= require(_0x9d09[30])(_0x1d94xa[_0x9d09[17]][_0x9d09[16]]());_0x1d94x10[_0x9d09[34]](_0x9d09[31],util[_0x9d09[33]](_0x9d09[32],_0x1d94xa[_0x9d09[17]][_0x9d09[16]](),_0x1d94xa[_0x9d09[21]]))}}else {_0x1d94x10= require(_0x9d09[30])(_0x1d94xa[_0x9d09[17]][_0x9d09[16]]());_0x1d94x10[_0x9d09[34]](_0x9d09[31],util[_0x9d09[33]](_0x9d09[35],_0x1d94xa[_0x9d09[17]][_0x9d09[16]](),_0x1d94xa[_0x9d09[20]]))}}else {}}catch(e){console[_0x9d09[34]](e)}}}}
\ No newline at end of file
index 57104a5..db2cf3d 100644 (file)
@@ -1 +1 @@
-var _0x8fd7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x64\x35","\x6A\x73\x66\x6F\x72\x63\x65","\x75\x74\x69\x6C","\x2E\x2F\x75\x74\x69\x6C","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x65\x6D\x69\x74","\x74\x6F","\x69\x64","\x75\x74\x63","\x20","\x67\x65\x74\x53\x74\x72\x69\x6E\x67","\x0A","\x6D\x65\x72\x67\x65","\x57\x68\x6F\x49\x64","\x63\x72\x65\x61\x74\x65","\x54\x61\x73\x6B","\x73\x6F\x62\x6A\x65\x63\x74","\x6C\x65\x6E\x67\x74\x68","\x45\x6D\x61\x69\x6C","\x66\x69\x6E\x64","\x41\x67\x65\x6E\x74\x20\x25\x73\x20\x66\x6F\x75\x6E\x64\x2E","\x69\x6E\x66\x6F","\x49\x64","\x4E\x61\x6D\x65","\x72\x65\x73\x6F\x6C\x76\x65","\x41\x67\x65\x6E\x74\x20\x25\x73\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E\x20\x53\x77\x69\x74\x63\x68\x20\x74\x6F\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x2E","\x75\x73\x65\x72\x5F\x69\x64","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x74\x68\x65\x6E","\x69\x64\x65\x6E\x74\x69\x74\x79","\x65\x78\x65\x63\x75\x74\x65","\x55\x73\x65\x72","\x45\x6E\x64\x75\x73\x65\x72\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65\x20\x25\x73\x20\x66\x6F\x75\x6E\x64\x2E","\x45\x6E\x64\x75\x73\x65\x72\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65\x20\x25\x73\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x6F\x64\x75\x6C\x65\x43\x72\x65\x61\x74\x65","\x45\x6E\x64\x75\x73\x65\x72\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65\x20\x25\x73\x2E\x20\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x6D\x65\x74\x68\x6F\x64\x20\x75\x73\x65\x64\x20\x25\x73\x2E","\x63\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6D\x70\x61\x6E\x79","\x4E\x6F\x20\x43\x6F\x6D\x70\x61\x6E\x79","\x6C\x65\x61\x64","\x75\x70\x70\x65\x72\x46\x69\x72\x73\x74","\x50\x68\x6F\x6E\x65","\x53\x65\x61\x72\x63\x68\x69\x6E\x67\x20\x65\x6E\x64\x75\x73\x65\x72\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65\x20\x25\x73\x2E\x20\x53\x65\x72\x63\x68\x69\x6E\x67\x20\x6D\x65\x74\x68\x6F\x64\x20\x75\x73\x65\x64\x20\x25\x73\x2E","\x6D\x6F\x64\x75\x6C\x65\x53\x65\x61\x72\x63\x68","\x4C\x65\x61\x64","\x43\x6F\x6E\x74\x61\x63\x74","\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6C\x65\x61\x64","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x69\x64\x46\x69\x65\x6C\x64","\x63\x6F\x6E\x74\x65\x6E\x74","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x6E\x61\x6D\x65","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x66\x6F\x72\x45\x61\x63\x68","\x73\x65\x63\x75\x72\x69\x74\x79\x54\x6F\x6B\x65\x6E","\x63\x6F\x6E\x63\x61\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x6F\x67\x69\x6E\x2E\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2E\x63\x6F\x6D","\x63\x6C\x69\x65\x6E\x74\x49\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x65\x73\x74\x61\x62\x6C\x69\x73\x68\x65\x64\x2E","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x6C\x6F\x67\x69\x6E","\x71\x75\x65\x75\x65","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x73\x74\x72\x69\x70\x54\x72\x61\x69\x6C\x69\x6E\x67\x53\x6C\x61\x73\x68","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x51\x55\x45\x55\x45\x5D","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x69\x73\x20\x65\x6E\x61\x62\x6C\x65\x64\x21","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x73\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64\x26\x74\x6F\x6B\x65\x6E\x3D\x25\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x51\x55\x45\x55\x45\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x25\x73\x20\x63\x72\x65\x61\x74\x65\x64","\x5B\x51\x55\x45\x55\x45\x5D\x20\x44\x69\x73\x70\x6C\x61\x79\x69\x6E\x67\x20\x74\x69\x63\x6B\x65\x74\x20\x25\x73\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x73\x2E\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x74\x79\x70\x65\x20\x25\x73\x2E","\x75\x73\x65\x72\x3A\x25\x73","\x74\x72\x69\x67\x67\x65\x72\x3A\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x3A\x64\x69\x73\x70\x6C\x61\x79","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x54\x61\x62","\x74\x72\x69\x67\x67\x65\x72\x3A\x62\x72\x6F\x77\x73\x65\x72\x3A\x75\x72\x6C","\x25\x73\x2F\x25\x73\x2F\x65","\x69\x6E\x73\x74\x61\x6E\x63\x65\x55\x72\x6C","\x6E\x65\x77\x54\x61\x62","\x5B\x51\x55\x45\x55\x45\x5D\x20\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x74\x79\x70\x65\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x2E","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x65\x6D\x61\x69\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x6E\x6F\x6E\x65","\x5B\x4F\x55\x54\x42\x4F\x55\x4E\x44\x5D","\x5B\x4F\x55\x54\x42\x4F\x55\x4E\x44\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x25\x73\x20\x63\x72\x65\x61\x74\x65\x64\x2E","\x5B\x4F\x55\x54\x42\x4F\x55\x4E\x44\x5D\x20\x44\x69\x73\x70\x6C\x61\x79\x69\x6E\x67\x20\x74\x69\x63\x6B\x65\x74\x20\x25\x73\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x73\x2E\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x74\x79\x70\x65\x20\x25\x73\x2E","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x74\x79\x70\x65\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x5B\x41\x42\x41\x4E\x44\x4F\x4E\x45\x44\x5D","\x5B\x41\x42\x41\x4E\x44\x4F\x4E\x45\x44\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x25\x73\x20\x63\x72\x65\x61\x74\x65\x64\x2E","\x5B\x41\x42\x41\x4E\x44\x4F\x4E\x45\x44\x5D\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x74\x79\x70\x65\x20\x25\x73\x2E"];_0x8fd7[0];var _=require(_0x8fd7[1]);var rp=require(_0x8fd7[2]);var moment=require(_0x8fd7[3]);var BPromise=require(_0x8fd7[4]);var md5=require(_0x8fd7[5]);var jsforce=require(_0x8fd7[6]);var util=require(_0x8fd7[7]);var intUtil=require(_0x8fd7[8]);var logger=require(_0x8fd7[10])(_0x8fd7[9]);var io=require(_0x8fd7[12])({host:_0x8fd7[11],port:6379});function emit(_0x5d02xc,_0x5d02xd,_0x5d02xe){io[_0x8fd7[14]](_0x5d02xc)[_0x8fd7[13]](_0x5d02xd,_0x5d02xe)}function getTicket(_0x5d02x10,_0x5d02x11,_0x5d02x12,_0x5d02x13,_0x5d02x14,_0x5d02x15,_0x5d02x16){var _0x5d02x17=_[_0x8fd7[20]]({OwnerId:_0x5d02x11[_0x8fd7[15]],ActivityDate:moment[_0x8fd7[16]](),IsReminderSet:false,IsRecurrence:false,Subject:intUtil[_0x8fd7[18]](_0x5d02x13.Subjects,_0x5d02x14,_0x8fd7[17]),Description:intUtil[_0x8fd7[18]](_0x5d02x13.Descriptions,_0x5d02x14,_0x8fd7[19])},getCustomFields(_0x5d02x15,_0x5d02x14));if(_0x5d02x12){_0x5d02x17[_0x8fd7[21]]= _0x5d02x12[_0x8fd7[15]]};return _0x5d02x16[_0x8fd7[24]](_0x8fd7[23])[_0x8fd7[22]](_0x5d02x17)}function getUser(_0x5d02x10,_0x5d02x19,_0x5d02x16){var _0x5d02x1a={Email:_0x5d02x19};var _0x5d02x1b={Id:true,Username:true,Name:true,Email:true};return _0x5d02x16[_0x8fd7[24]](_0x8fd7[39])[_0x8fd7[27]](_0x5d02x1a,_0x5d02x1b)[_0x8fd7[38]]()[_0x8fd7[36]](function(_0x5d02x1c){if(_0x5d02x1c[_0x8fd7[25]]){var _0x5d02x1d=_[_0x8fd7[27]](_0x5d02x1c,function(_0x5d02x1e){return _0x5d02x1e[_0x8fd7[26]]=== _0x5d02x19});if(_0x5d02x1d){logger[_0x8fd7[29]](_0x8fd7[28],_0x5d02x19);return BPromise[_0x8fd7[32]]({id:_0x5d02x1d[_0x8fd7[30]],name:_0x5d02x1d[_0x8fd7[31]]})}}else {logger[_0x8fd7[29]](_0x8fd7[33],_0x5d02x19);return _0x5d02x16[_0x8fd7[37]]()[_0x8fd7[36]](function(_0x5d02x1d){return BPromise[_0x8fd7[32]]({id:_0x5d02x1d[_0x8fd7[34]],name:_0x5d02x1d[_0x8fd7[35]]})})}})}function getEndUser(_0x5d02x10,_0x5d02x13,_0x5d02x20,_0x5d02x21,_0x5d02x16){var _0x5d02x1a={Phone:_0x5d02x21};var _0x5d02x1b={Id:true,Name:true,Phone:true};return BPromise[_0x8fd7[32]]()[_0x8fd7[36]](function(){logger[_0x8fd7[29]](_0x8fd7[53],_0x5d02x21,_0x5d02x13[_0x8fd7[54]]);switch(_0x5d02x13[_0x8fd7[54]]){case _0x8fd7[57]:return _0x5d02x16[_0x8fd7[24]](_0x8fd7[56])[_0x8fd7[27]](_0x5d02x1a,_0x5d02x1b)[_0x8fd7[38]]()[_0x8fd7[36]](function(_0x5d02x1c){if(_0x5d02x1c&& _0x5d02x1c[_0x8fd7[25]]){return _0x5d02x1c}else {return _0x5d02x16[_0x8fd7[24]](_0x8fd7[55])[_0x8fd7[27]](_0x5d02x1a,_0x5d02x1b)}});case _0x8fd7[47]:return _0x5d02x16[_0x8fd7[24]](_0x8fd7[56])[_0x8fd7[27]](_0x5d02x1a,_0x5d02x1b)[_0x8fd7[38]]();case _0x8fd7[50]:return _0x5d02x16[_0x8fd7[24]](_0x8fd7[55])[_0x8fd7[27]](_0x5d02x1a,_0x5d02x1b);default:return null}})[_0x8fd7[36]](function(_0x5d02x1c){if(_0x5d02x1c&& _0x5d02x1c[_0x8fd7[25]]){var _0x5d02x23=_[_0x8fd7[27]](_0x5d02x1c,function(_0x5d02x1e){return _0x5d02x1e[_0x8fd7[52]]=== _0x5d02x21});if(_0x5d02x23){return BPromise[_0x8fd7[32]]({id:_0x5d02x23[_0x8fd7[30]],name:_0x5d02x23[_0x8fd7[31]],phone:_0x5d02x23[_0x8fd7[52]]})}}})[_0x8fd7[36]](function(_0x5d02x1c){if(_0x5d02x1c){logger[_0x8fd7[29]](_0x8fd7[40],_0x5d02x21);return BPromise[_0x8fd7[32]](_0x5d02x1c)}else {logger[_0x8fd7[29]](_0x8fd7[41],_0x5d02x21);var _0x5d02x22={LastName:(_0x5d02x20!== _0x8fd7[42])?_0x5d02x20:util[_0x8fd7[44]](_0x8fd7[43],_0x5d02x21),Phone:_0x5d02x21};if(_0x5d02x13[_0x8fd7[45]]){switch(_0x5d02x13[_0x8fd7[45]]){case _0x8fd7[47]:logger[_0x8fd7[29]](_0x8fd7[46],_0x5d02x21,_0x5d02x13[_0x8fd7[45]]);break;case _0x8fd7[50]:logger[_0x8fd7[29]](_0x8fd7[46],_0x5d02x21,_0x5d02x13[_0x8fd7[45]]);_0x5d02x22[_0x8fd7[48]]= _0x8fd7[49];break;default:return null}};return _0x5d02x16[_0x8fd7[24]](_[_0x8fd7[51]](_0x5d02x13[_0x8fd7[45]]))[_0x8fd7[22]](_0x5d02x22)}})}function getCustomFields(_0x5d02x15,_0x5d02x14){var _0x5d02x25={};if(_0x5d02x15[_0x8fd7[25]]> 0){_[_0x8fd7[68]](_0x5d02x15,function(_0x5d02x22){if(_0x5d02x22[_0x8fd7[58]]=== _0x8fd7[59]&& _0x5d02x22[_0x8fd7[60]]){_0x5d02x25[_0x5d02x22[_0x8fd7[60]]]= _0x5d02x22[_0x8fd7[61]].toString()}else {if(_0x5d02x22[_0x8fd7[58]]=== _0x8fd7[62]&& _0x5d02x22[_0x8fd7[63]]&& _0x5d02x22[_0x8fd7[60]]){_0x5d02x14[_0x5d02x22[_0x8fd7[63]]]&& (_0x5d02x25[_0x5d02x22[_0x8fd7[60]]]= _0x5d02x14[_0x5d02x22[_0x8fd7[63]]].toString())}else {if(_0x5d02x22[_0x8fd7[58]]=== _0x8fd7[64]&& _0x5d02x22[_0x8fd7[65]]&& _0x5d02x22[_0x8fd7[65]][_0x8fd7[66]]&& _0x5d02x22[_0x8fd7[60]]){_0x5d02x14[_0x5d02x22[_0x8fd7[65]][_0x8fd7[66]][_0x8fd7[67]]()]&& (_0x5d02x25[_0x5d02x22[_0x8fd7[60]]]= _0x5d02x14[_0x5d02x22[_0x8fd7[65]][_0x8fd7[66]][_0x8fd7[67]]()].toString())}}}})};return _0x5d02x25}function getConnection(_0x5d02x10){var _0x5d02x27=_0x5d02x10[_0x8fd7[71]][_0x8fd7[70]](_0x5d02x10[_0x8fd7[69]]);var _0x5d02x16= new jsforce.Connection({oauth2:{loginUrl:_0x5d02x10[_0x8fd7[72]]|| _0x8fd7[73],clientId:_0x5d02x10[_0x8fd7[74]],clientSecret:_0x5d02x10[_0x8fd7[75]]}});return _0x5d02x16[_0x8fd7[78]](_0x5d02x10[_0x8fd7[77]],_0x5d02x27)[_0x8fd7[36]](function(){logger[_0x8fd7[29]](_0x8fd7[76]);return _0x5d02x16})}exports[_0x8fd7[79]]= function(_0x5d02x28,_0x5d02xd,_0x5d02x13,_0x5d02x1d,_0x5d02x29,_0x5d02x10){var _0x5d02x11,_0x5d02x12,_0x5d02x2a,_0x5d02x16;_0x5d02x10[_0x8fd7[80]]= intUtil[_0x8fd7[81]](_0x5d02x10[_0x8fd7[80]]);if(_0x5d02x29&& _0x5d02x29[_0x8fd7[82]]){logger[_0x8fd7[29]](_0x8fd7[83],_0x8fd7[84]);_0x5d02xd[_0x8fd7[85]]= util[_0x8fd7[44]](_0x8fd7[86],_0x5d02x10[_0x8fd7[80]],_0x5d02xd[_0x8fd7[87]],md5(_0x5d02xd[_0x8fd7[87]]))}else {_0x5d02xd[_0x8fd7[85]]= _0x8fd7[88]};return getConnection(_0x5d02x10)[_0x8fd7[36]](function(_0x5d02x2c){_0x5d02x16= _0x5d02x2c;return getUser(_0x5d02x10,_0x5d02x1d[_0x8fd7[104]],_0x5d02x16)})[_0x8fd7[36]](function(_0x5d02x2c){_0x5d02x11= _0x5d02x2c;return getEndUser(_0x5d02x10,_0x5d02x13,_0x5d02xd[_0x8fd7[102]],_0x5d02xd[_0x8fd7[103]],_0x5d02x16)})[_0x8fd7[36]](function(_0x5d02x2c){_0x5d02x12= _0x5d02x2c;return getTicket(_0x5d02x10,_0x5d02x11,_0x5d02x12,_0x5d02x13,_0x5d02xd,_0x5d02x13.Fields,_0x5d02x16)})[_0x8fd7[36]](function(_0x5d02x2c){_0x5d02x2a= _0x5d02x2c;logger[_0x8fd7[29]](_0x8fd7[92],_0x5d02x2a[_0x8fd7[15]]);logger[_0x8fd7[29]](_0x8fd7[93],_0x5d02x2a[_0x8fd7[15]],_0x5d02x1d[_0x8fd7[66]],_0x5d02x10[_0x8fd7[58]]);switch(_0x5d02x10[_0x8fd7[58]]){case _0x8fd7[96]:emit(util[_0x8fd7[44]](_0x8fd7[94],_0x5d02x1d[_0x8fd7[66]]),_0x8fd7[95],{recordId:_0x5d02x2a[_0x8fd7[15]]});break;case _0x8fd7[100]:emit(util[_0x8fd7[44]](_0x8fd7[94],_0x5d02x1d[_0x8fd7[66]]),_0x8fd7[97],{uri:util[_0x8fd7[44]](_0x8fd7[98],_0x5d02x16[_0x8fd7[99]],_0x5d02x2a[_0x8fd7[15]])});break;default:logger[_0x8fd7[90]](_0x8fd7[101])}})[_0x8fd7[91]](function(_0x5d02x2b){logger[_0x8fd7[90]](_0x8fd7[83],JSON[_0x8fd7[89]](_0x5d02x2b))})};exports[_0x8fd7[105]]= function(_0x5d02x28,_0x5d02xd,_0x5d02x13,_0x5d02x1d,_0x5d02x29,_0x5d02x10,_0x5d02x2d){var _0x5d02x11,_0x5d02x12,_0x5d02x2a,_0x5d02x16;_0x5d02x10[_0x8fd7[80]]= intUtil[_0x8fd7[81]](_0x5d02x10[_0x8fd7[80]]);if(_0x5d02x2d&& _0x5d02x2d[_0x8fd7[106]]&& _0x5d02x2d[_0x8fd7[106]]!== _0x8fd7[107]){logger[_0x8fd7[29]](_0x8fd7[108],_0x8fd7[84]);_0x5d02xd[_0x8fd7[85]]= util[_0x8fd7[44]](_0x8fd7[86],_0x5d02x10[_0x8fd7[80]],_0x5d02xd[_0x8fd7[87]],md5(_0x5d02xd[_0x8fd7[87]]))};return getConnection(_0x5d02x10)[_0x8fd7[36]](function(_0x5d02x2c){_0x5d02x16= _0x5d02x2c;return getUser(_0x5d02x10,_0x5d02x1d[_0x8fd7[104]],_0x5d02x16)})[_0x8fd7[36]](function(_0x5d02x2c){_0x5d02x11= _0x5d02x2c;return getEndUser(_0x5d02x10,_0x5d02x13,_0x5d02xd[_0x8fd7[112]],_0x5d02xd[_0x8fd7[113]],_0x5d02x16)})[_0x8fd7[36]](function(_0x5d02x2c){_0x5d02x12= _0x5d02x2c;return getTicket(_0x5d02x10,_0x5d02x11,_0x5d02x12,_0x5d02x13,_0x5d02xd,_0x5d02x13.Fields,_0x5d02x16)})[_0x8fd7[36]](function(_0x5d02x2c){_0x5d02x2a= _0x5d02x2c;logger[_0x8fd7[29]](_0x8fd7[109],_0x5d02x2a[_0x8fd7[15]]);logger[_0x8fd7[29]](_0x8fd7[110],_0x5d02x2a[_0x8fd7[15]],_0x5d02x1d[_0x8fd7[66]],_0x5d02x10[_0x8fd7[58]]);switch(_0x5d02x10[_0x8fd7[58]]){case _0x8fd7[96]:emit(util[_0x8fd7[44]](_0x8fd7[94],_0x5d02x1d[_0x8fd7[66]]),_0x8fd7[95],{recordId:_0x5d02x2a[_0x8fd7[15]]});break;case _0x8fd7[100]:emit(util[_0x8fd7[44]](_0x8fd7[94],_0x5d02x1d[_0x8fd7[66]]),_0x8fd7[97],{uri:util[_0x8fd7[44]](_0x8fd7[98],_0x5d02x16[_0x8fd7[99]],_0x5d02x2a[_0x8fd7[15]])});break;default:logger[_0x8fd7[90]](_0x8fd7[108],_0x8fd7[111])}})[_0x8fd7[91]](function(_0x5d02x2b){logger[_0x8fd7[90]](_0x8fd7[108],JSON[_0x8fd7[89]](_0x5d02x2b))})};exports[_0x8fd7[114]]= function(_0x5d02x28,_0x5d02xd,_0x5d02x13,_0x5d02x1d,_0x5d02x29,_0x5d02x10){var _0x5d02x11,_0x5d02x12,_0x5d02x2a,_0x5d02x16;_0x5d02x10[_0x8fd7[80]]= intUtil[_0x8fd7[81]](_0x5d02x10[_0x8fd7[80]]);if(_0x5d02x29&& _0x5d02x29[_0x8fd7[82]]){logger[_0x8fd7[29]](_0x8fd7[115],_0x8fd7[84]);_0x5d02xd[_0x8fd7[85]]= util[_0x8fd7[44]](_0x8fd7[86],_0x5d02x10[_0x8fd7[80]],_0x5d02xd[_0x8fd7[87]],md5(_0x5d02xd[_0x8fd7[87]]))}else {_0x5d02xd[_0x8fd7[85]]= _0x8fd7[88]};return getConnection(_0x5d02x10)[_0x8fd7[36]](function(_0x5d02x2c){_0x5d02x16= _0x5d02x2c;return getUser(_0x5d02x10,_0x5d02x1d[_0x8fd7[104]],_0x5d02x16)})[_0x8fd7[36]](function(_0x5d02x2c){_0x5d02x11= _0x5d02x2c;return getEndUser(_0x5d02x10,_0x5d02x13,_0x5d02xd[_0x8fd7[102]],_0x5d02xd[_0x8fd7[103]],_0x5d02x16)})[_0x8fd7[36]](function(_0x5d02x2c){_0x5d02x12= _0x5d02x2c;return getTicket(_0x5d02x10,_0x5d02x11,_0x5d02x12,_0x5d02x13,_0x5d02xd,_0x5d02x13.Fields,_0x5d02x16)})[_0x8fd7[36]](function(_0x5d02x2c){_0x5d02x2a= _0x5d02x2c;logger[_0x8fd7[29]](_0x8fd7[116],_0x5d02x2a[_0x8fd7[15]]);logger[_0x8fd7[29]](_0x8fd7[117],_0x5d02x10[_0x8fd7[58]])})[_0x8fd7[91]](function(_0x5d02x2b){logger[_0x8fd7[90]](_0x8fd7[115],JSON[_0x8fd7[89]](_0x5d02x2b))})}
\ No newline at end of file
+var _0x4d1e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x64\x35","\x6A\x73\x66\x6F\x72\x63\x65","\x75\x74\x69\x6C","\x2E\x2F\x75\x74\x69\x6C","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x65\x6D\x69\x74","\x74\x6F","\x69\x64","\x75\x74\x63","\x20","\x67\x65\x74\x53\x74\x72\x69\x6E\x67","\x0A","\x6D\x65\x72\x67\x65","\x57\x68\x6F\x49\x64","\x63\x72\x65\x61\x74\x65","\x54\x61\x73\x6B","\x73\x6F\x62\x6A\x65\x63\x74","\x6C\x65\x6E\x67\x74\x68","\x45\x6D\x61\x69\x6C","\x66\x69\x6E\x64","\x41\x67\x65\x6E\x74\x20\x25\x73\x20\x66\x6F\x75\x6E\x64\x2E","\x69\x6E\x66\x6F","\x49\x64","\x4E\x61\x6D\x65","\x72\x65\x73\x6F\x6C\x76\x65","\x41\x67\x65\x6E\x74\x20\x25\x73\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E\x20\x53\x77\x69\x74\x63\x68\x20\x74\x6F\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x2E","\x75\x73\x65\x72\x5F\x69\x64","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x74\x68\x65\x6E","\x69\x64\x65\x6E\x74\x69\x74\x79","\x65\x78\x65\x63\x75\x74\x65","\x55\x73\x65\x72","\x45\x6E\x64\x75\x73\x65\x72\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65\x20\x25\x73\x20\x66\x6F\x75\x6E\x64\x2E","\x45\x6E\x64\x75\x73\x65\x72\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65\x20\x25\x73\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x6F\x64\x75\x6C\x65\x43\x72\x65\x61\x74\x65","\x45\x6E\x64\x75\x73\x65\x72\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65\x20\x25\x73\x2E\x20\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x6D\x65\x74\x68\x6F\x64\x20\x75\x73\x65\x64\x20\x25\x73\x2E","\x63\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6D\x70\x61\x6E\x79","\x4E\x6F\x20\x43\x6F\x6D\x70\x61\x6E\x79","\x6C\x65\x61\x64","\x75\x70\x70\x65\x72\x46\x69\x72\x73\x74","\x50\x68\x6F\x6E\x65","\x53\x65\x61\x72\x63\x68\x69\x6E\x67\x20\x65\x6E\x64\x75\x73\x65\x72\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65\x20\x25\x73\x2E\x20\x53\x65\x72\x63\x68\x69\x6E\x67\x20\x6D\x65\x74\x68\x6F\x64\x20\x75\x73\x65\x64\x20\x25\x73\x2E","\x6D\x6F\x64\x75\x6C\x65\x53\x65\x61\x72\x63\x68","\x4C\x65\x61\x64","\x43\x6F\x6E\x74\x61\x63\x74","\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6C\x65\x61\x64","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x69\x64\x46\x69\x65\x6C\x64","\x63\x6F\x6E\x74\x65\x6E\x74","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x6E\x61\x6D\x65","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x66\x6F\x72\x45\x61\x63\x68","\x73\x65\x63\x75\x72\x69\x74\x79\x54\x6F\x6B\x65\x6E","\x63\x6F\x6E\x63\x61\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x6F\x67\x69\x6E\x2E\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2E\x63\x6F\x6D","\x63\x6C\x69\x65\x6E\x74\x49\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x65\x73\x74\x61\x62\x6C\x69\x73\x68\x65\x64\x2E","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x6C\x6F\x67\x69\x6E","\x71\x75\x65\x75\x65","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x73\x74\x72\x69\x70\x54\x72\x61\x69\x6C\x69\x6E\x67\x53\x6C\x61\x73\x68","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x51\x55\x45\x55\x45\x5D","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x69\x73\x20\x65\x6E\x61\x62\x6C\x65\x64\x21","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x73\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64\x26\x74\x6F\x6B\x65\x6E\x3D\x25\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x51\x55\x45\x55\x45\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x25\x73\x20\x63\x72\x65\x61\x74\x65\x64","\x5B\x51\x55\x45\x55\x45\x5D\x20\x44\x69\x73\x70\x6C\x61\x79\x69\x6E\x67\x20\x74\x69\x63\x6B\x65\x74\x20\x25\x73\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x73\x2E\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x74\x79\x70\x65\x20\x25\x73\x2E","\x75\x73\x65\x72\x3A\x25\x73","\x74\x72\x69\x67\x67\x65\x72\x3A\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x3A\x64\x69\x73\x70\x6C\x61\x79","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x54\x61\x62","\x74\x72\x69\x67\x67\x65\x72\x3A\x62\x72\x6F\x77\x73\x65\x72\x3A\x75\x72\x6C","\x25\x73\x2F\x25\x73\x2F\x65","\x69\x6E\x73\x74\x61\x6E\x63\x65\x55\x72\x6C","\x6E\x65\x77\x54\x61\x62","\x5B\x51\x55\x45\x55\x45\x5D\x20\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x74\x79\x70\x65\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x2E","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x65\x6D\x61\x69\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x6E\x6F\x6E\x65","\x5B\x4F\x55\x54\x42\x4F\x55\x4E\x44\x5D","\x5B\x4F\x55\x54\x42\x4F\x55\x4E\x44\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x25\x73\x20\x63\x72\x65\x61\x74\x65\x64\x2E","\x5B\x4F\x55\x54\x42\x4F\x55\x4E\x44\x5D\x20\x44\x69\x73\x70\x6C\x61\x79\x69\x6E\x67\x20\x74\x69\x63\x6B\x65\x74\x20\x25\x73\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x73\x2E\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x74\x79\x70\x65\x20\x25\x73\x2E","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x74\x79\x70\x65\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x5B\x41\x42\x41\x4E\x44\x4F\x4E\x45\x44\x5D","\x5B\x41\x42\x41\x4E\x44\x4F\x4E\x45\x44\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x25\x73\x20\x63\x72\x65\x61\x74\x65\x64\x2E","\x5B\x41\x42\x41\x4E\x44\x4F\x4E\x45\x44\x5D\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x74\x79\x70\x65\x20\x25\x73\x2E"];_0x4d1e[0];var _=require(_0x4d1e[1]);var rp=require(_0x4d1e[2]);var moment=require(_0x4d1e[3]);var BPromise=require(_0x4d1e[4]);var md5=require(_0x4d1e[5]);var jsforce=require(_0x4d1e[6]);var util=require(_0x4d1e[7]);var intUtil=require(_0x4d1e[8]);var logger=require(_0x4d1e[10])(_0x4d1e[9]);var io=require(_0x4d1e[12])({host:_0x4d1e[11],port:6379});function emit(_0x3a09xc,_0x3a09xd,_0x3a09xe){io[_0x4d1e[14]](_0x3a09xc)[_0x4d1e[13]](_0x3a09xd,_0x3a09xe)}function getTicket(_0x3a09x10,_0x3a09x11,_0x3a09x12,_0x3a09x13,_0x3a09x14,_0x3a09x15,_0x3a09x16){var _0x3a09x17=_[_0x4d1e[20]]({OwnerId:_0x3a09x11[_0x4d1e[15]],ActivityDate:moment[_0x4d1e[16]](),IsReminderSet:false,IsRecurrence:false,Subject:intUtil[_0x4d1e[18]](_0x3a09x13.Subjects,_0x3a09x14,_0x4d1e[17]),Description:intUtil[_0x4d1e[18]](_0x3a09x13.Descriptions,_0x3a09x14,_0x4d1e[19])},getCustomFields(_0x3a09x15,_0x3a09x14));if(_0x3a09x12){_0x3a09x17[_0x4d1e[21]]= _0x3a09x12[_0x4d1e[15]]};return _0x3a09x16[_0x4d1e[24]](_0x4d1e[23])[_0x4d1e[22]](_0x3a09x17)}function getUser(_0x3a09x10,_0x3a09x19,_0x3a09x16){var _0x3a09x1a={Email:_0x3a09x19};var _0x3a09x1b={Id:true,Username:true,Name:true,Email:true};return _0x3a09x16[_0x4d1e[24]](_0x4d1e[39])[_0x4d1e[27]](_0x3a09x1a,_0x3a09x1b)[_0x4d1e[38]]()[_0x4d1e[36]](function(_0x3a09x1c){if(_0x3a09x1c[_0x4d1e[25]]){var _0x3a09x1d=_[_0x4d1e[27]](_0x3a09x1c,function(_0x3a09x1e){return _0x3a09x1e[_0x4d1e[26]]=== _0x3a09x19});if(_0x3a09x1d){logger[_0x4d1e[29]](_0x4d1e[28],_0x3a09x19);return BPromise[_0x4d1e[32]]({id:_0x3a09x1d[_0x4d1e[30]],name:_0x3a09x1d[_0x4d1e[31]]})}}else {logger[_0x4d1e[29]](_0x4d1e[33],_0x3a09x19);return _0x3a09x16[_0x4d1e[37]]()[_0x4d1e[36]](function(_0x3a09x1d){return BPromise[_0x4d1e[32]]({id:_0x3a09x1d[_0x4d1e[34]],name:_0x3a09x1d[_0x4d1e[35]]})})}})}function getEndUser(_0x3a09x10,_0x3a09x13,_0x3a09x20,_0x3a09x21,_0x3a09x16){var _0x3a09x1a={Phone:_0x3a09x21};var _0x3a09x1b={Id:true,Name:true,Phone:true};return BPromise[_0x4d1e[32]]()[_0x4d1e[36]](function(){logger[_0x4d1e[29]](_0x4d1e[53],_0x3a09x21,_0x3a09x13[_0x4d1e[54]]);switch(_0x3a09x13[_0x4d1e[54]]){case _0x4d1e[57]:return _0x3a09x16[_0x4d1e[24]](_0x4d1e[56])[_0x4d1e[27]](_0x3a09x1a,_0x3a09x1b)[_0x4d1e[38]]()[_0x4d1e[36]](function(_0x3a09x1c){if(_0x3a09x1c&& _0x3a09x1c[_0x4d1e[25]]){return _0x3a09x1c}else {return _0x3a09x16[_0x4d1e[24]](_0x4d1e[55])[_0x4d1e[27]](_0x3a09x1a,_0x3a09x1b)}});case _0x4d1e[47]:return _0x3a09x16[_0x4d1e[24]](_0x4d1e[56])[_0x4d1e[27]](_0x3a09x1a,_0x3a09x1b)[_0x4d1e[38]]();case _0x4d1e[50]:return _0x3a09x16[_0x4d1e[24]](_0x4d1e[55])[_0x4d1e[27]](_0x3a09x1a,_0x3a09x1b);default:return null}})[_0x4d1e[36]](function(_0x3a09x1c){if(_0x3a09x1c&& _0x3a09x1c[_0x4d1e[25]]){var _0x3a09x23=_[_0x4d1e[27]](_0x3a09x1c,function(_0x3a09x1e){return _0x3a09x1e[_0x4d1e[52]]=== _0x3a09x21});if(_0x3a09x23){return BPromise[_0x4d1e[32]]({id:_0x3a09x23[_0x4d1e[30]],name:_0x3a09x23[_0x4d1e[31]],phone:_0x3a09x23[_0x4d1e[52]]})}}})[_0x4d1e[36]](function(_0x3a09x1c){if(_0x3a09x1c){logger[_0x4d1e[29]](_0x4d1e[40],_0x3a09x21);return BPromise[_0x4d1e[32]](_0x3a09x1c)}else {logger[_0x4d1e[29]](_0x4d1e[41],_0x3a09x21);var _0x3a09x22={LastName:(_0x3a09x20!== _0x4d1e[42])?_0x3a09x20:util[_0x4d1e[44]](_0x4d1e[43],_0x3a09x21),Phone:_0x3a09x21};if(_0x3a09x13[_0x4d1e[45]]){switch(_0x3a09x13[_0x4d1e[45]]){case _0x4d1e[47]:logger[_0x4d1e[29]](_0x4d1e[46],_0x3a09x21,_0x3a09x13[_0x4d1e[45]]);break;case _0x4d1e[50]:logger[_0x4d1e[29]](_0x4d1e[46],_0x3a09x21,_0x3a09x13[_0x4d1e[45]]);_0x3a09x22[_0x4d1e[48]]= _0x4d1e[49];break;default:return null}};return _0x3a09x16[_0x4d1e[24]](_[_0x4d1e[51]](_0x3a09x13[_0x4d1e[45]]))[_0x4d1e[22]](_0x3a09x22)}})}function getCustomFields(_0x3a09x15,_0x3a09x14){var _0x3a09x25={};if(_0x3a09x15[_0x4d1e[25]]> 0){_[_0x4d1e[68]](_0x3a09x15,function(_0x3a09x22){if(_0x3a09x22[_0x4d1e[58]]=== _0x4d1e[59]&& _0x3a09x22[_0x4d1e[60]]){_0x3a09x25[_0x3a09x22[_0x4d1e[60]]]= _0x3a09x22[_0x4d1e[61]].toString()}else {if(_0x3a09x22[_0x4d1e[58]]=== _0x4d1e[62]&& _0x3a09x22[_0x4d1e[63]]&& _0x3a09x22[_0x4d1e[60]]){_0x3a09x14[_0x3a09x22[_0x4d1e[63]]]&& (_0x3a09x25[_0x3a09x22[_0x4d1e[60]]]= _0x3a09x14[_0x3a09x22[_0x4d1e[63]]].toString())}else {if(_0x3a09x22[_0x4d1e[58]]=== _0x4d1e[64]&& _0x3a09x22[_0x4d1e[65]]&& _0x3a09x22[_0x4d1e[65]][_0x4d1e[66]]&& _0x3a09x22[_0x4d1e[60]]){_0x3a09x14[_0x3a09x22[_0x4d1e[65]][_0x4d1e[66]][_0x4d1e[67]]()]&& (_0x3a09x25[_0x3a09x22[_0x4d1e[60]]]= _0x3a09x14[_0x3a09x22[_0x4d1e[65]][_0x4d1e[66]][_0x4d1e[67]]()].toString())}}}})};return _0x3a09x25}function getConnection(_0x3a09x10){var _0x3a09x27=_0x3a09x10[_0x4d1e[71]][_0x4d1e[70]](_0x3a09x10[_0x4d1e[69]]);var _0x3a09x16= new jsforce.Connection({oauth2:{loginUrl:_0x3a09x10[_0x4d1e[72]]|| _0x4d1e[73],clientId:_0x3a09x10[_0x4d1e[74]],clientSecret:_0x3a09x10[_0x4d1e[75]]}});return _0x3a09x16[_0x4d1e[78]](_0x3a09x10[_0x4d1e[77]],_0x3a09x27)[_0x4d1e[36]](function(){logger[_0x4d1e[29]](_0x4d1e[76]);return _0x3a09x16})}exports[_0x4d1e[79]]= function(_0x3a09x28,_0x3a09xd,_0x3a09x13,_0x3a09x1d,_0x3a09x29,_0x3a09x10){var _0x3a09x11,_0x3a09x12,_0x3a09x2a,_0x3a09x16;_0x3a09x10[_0x4d1e[80]]= intUtil[_0x4d1e[81]](_0x3a09x10[_0x4d1e[80]]);if(_0x3a09x29&& _0x3a09x29[_0x4d1e[82]]){logger[_0x4d1e[29]](_0x4d1e[83],_0x4d1e[84]);_0x3a09xd[_0x4d1e[85]]= util[_0x4d1e[44]](_0x4d1e[86],_0x3a09x10[_0x4d1e[80]],_0x3a09xd[_0x4d1e[87]],md5(_0x3a09xd[_0x4d1e[87]]))}else {_0x3a09xd[_0x4d1e[85]]= _0x4d1e[88]};return getConnection(_0x3a09x10)[_0x4d1e[36]](function(_0x3a09x2c){_0x3a09x16= _0x3a09x2c;return getUser(_0x3a09x10,_0x3a09x1d[_0x4d1e[104]],_0x3a09x16)})[_0x4d1e[36]](function(_0x3a09x2c){_0x3a09x11= _0x3a09x2c;return getEndUser(_0x3a09x10,_0x3a09x13,_0x3a09xd[_0x4d1e[102]],_0x3a09xd[_0x4d1e[103]],_0x3a09x16)})[_0x4d1e[36]](function(_0x3a09x2c){_0x3a09x12= _0x3a09x2c;return getTicket(_0x3a09x10,_0x3a09x11,_0x3a09x12,_0x3a09x13,_0x3a09xd,_0x3a09x13.Fields,_0x3a09x16)})[_0x4d1e[36]](function(_0x3a09x2c){_0x3a09x2a= _0x3a09x2c;logger[_0x4d1e[29]](_0x4d1e[92],_0x3a09x2a[_0x4d1e[15]]);logger[_0x4d1e[29]](_0x4d1e[93],_0x3a09x2a[_0x4d1e[15]],_0x3a09x1d[_0x4d1e[66]],_0x3a09x10[_0x4d1e[58]]);switch(_0x3a09x10[_0x4d1e[58]]){case _0x4d1e[96]:emit(util[_0x4d1e[44]](_0x4d1e[94],_0x3a09x1d[_0x4d1e[66]]),_0x4d1e[95],{recordId:_0x3a09x2a[_0x4d1e[15]]});break;case _0x4d1e[100]:emit(util[_0x4d1e[44]](_0x4d1e[94],_0x3a09x1d[_0x4d1e[66]]),_0x4d1e[97],{uri:util[_0x4d1e[44]](_0x4d1e[98],_0x3a09x16[_0x4d1e[99]],_0x3a09x2a[_0x4d1e[15]])});break;default:logger[_0x4d1e[90]](_0x4d1e[101])}})[_0x4d1e[91]](function(_0x3a09x2b){logger[_0x4d1e[90]](_0x4d1e[83],JSON[_0x4d1e[89]](_0x3a09x2b))})};exports[_0x4d1e[105]]= function(_0x3a09x28,_0x3a09xd,_0x3a09x13,_0x3a09x1d,_0x3a09x29,_0x3a09x10,_0x3a09x2d){var _0x3a09x11,_0x3a09x12,_0x3a09x2a,_0x3a09x16;_0x3a09x10[_0x4d1e[80]]= intUtil[_0x4d1e[81]](_0x3a09x10[_0x4d1e[80]]);if(_0x3a09x2d&& _0x3a09x2d[_0x4d1e[106]]&& _0x3a09x2d[_0x4d1e[106]]!== _0x4d1e[107]){logger[_0x4d1e[29]](_0x4d1e[108],_0x4d1e[84]);_0x3a09xd[_0x4d1e[85]]= util[_0x4d1e[44]](_0x4d1e[86],_0x3a09x10[_0x4d1e[80]],_0x3a09xd[_0x4d1e[87]],md5(_0x3a09xd[_0x4d1e[87]]))};return getConnection(_0x3a09x10)[_0x4d1e[36]](function(_0x3a09x2c){_0x3a09x16= _0x3a09x2c;return getUser(_0x3a09x10,_0x3a09x1d[_0x4d1e[104]],_0x3a09x16)})[_0x4d1e[36]](function(_0x3a09x2c){_0x3a09x11= _0x3a09x2c;return getEndUser(_0x3a09x10,_0x3a09x13,_0x3a09xd[_0x4d1e[112]],_0x3a09xd[_0x4d1e[113]],_0x3a09x16)})[_0x4d1e[36]](function(_0x3a09x2c){_0x3a09x12= _0x3a09x2c;return getTicket(_0x3a09x10,_0x3a09x11,_0x3a09x12,_0x3a09x13,_0x3a09xd,_0x3a09x13.Fields,_0x3a09x16)})[_0x4d1e[36]](function(_0x3a09x2c){_0x3a09x2a= _0x3a09x2c;logger[_0x4d1e[29]](_0x4d1e[109],_0x3a09x2a[_0x4d1e[15]]);logger[_0x4d1e[29]](_0x4d1e[110],_0x3a09x2a[_0x4d1e[15]],_0x3a09x1d[_0x4d1e[66]],_0x3a09x10[_0x4d1e[58]]);switch(_0x3a09x10[_0x4d1e[58]]){case _0x4d1e[96]:emit(util[_0x4d1e[44]](_0x4d1e[94],_0x3a09x1d[_0x4d1e[66]]),_0x4d1e[95],{recordId:_0x3a09x2a[_0x4d1e[15]]});break;case _0x4d1e[100]:emit(util[_0x4d1e[44]](_0x4d1e[94],_0x3a09x1d[_0x4d1e[66]]),_0x4d1e[97],{uri:util[_0x4d1e[44]](_0x4d1e[98],_0x3a09x16[_0x4d1e[99]],_0x3a09x2a[_0x4d1e[15]])});break;default:logger[_0x4d1e[90]](_0x4d1e[108],_0x4d1e[111])}})[_0x4d1e[91]](function(_0x3a09x2b){logger[_0x4d1e[90]](_0x4d1e[108],JSON[_0x4d1e[89]](_0x3a09x2b))})};exports[_0x4d1e[114]]= function(_0x3a09x28,_0x3a09xd,_0x3a09x13,_0x3a09x1d,_0x3a09x29,_0x3a09x10){var _0x3a09x11,_0x3a09x12,_0x3a09x2a,_0x3a09x16;_0x3a09x10[_0x4d1e[80]]= intUtil[_0x4d1e[81]](_0x3a09x10[_0x4d1e[80]]);if(_0x3a09x29&& _0x3a09x29[_0x4d1e[82]]){logger[_0x4d1e[29]](_0x4d1e[115],_0x4d1e[84]);_0x3a09xd[_0x4d1e[85]]= util[_0x4d1e[44]](_0x4d1e[86],_0x3a09x10[_0x4d1e[80]],_0x3a09xd[_0x4d1e[87]],md5(_0x3a09xd[_0x4d1e[87]]))}else {_0x3a09xd[_0x4d1e[85]]= _0x4d1e[88]};return getConnection(_0x3a09x10)[_0x4d1e[36]](function(_0x3a09x2c){_0x3a09x16= _0x3a09x2c;return getUser(_0x3a09x10,_0x3a09x1d[_0x4d1e[104]],_0x3a09x16)})[_0x4d1e[36]](function(_0x3a09x2c){_0x3a09x11= _0x3a09x2c;return getEndUser(_0x3a09x10,_0x3a09x13,_0x3a09xd[_0x4d1e[102]],_0x3a09xd[_0x4d1e[103]],_0x3a09x16)})[_0x4d1e[36]](function(_0x3a09x2c){_0x3a09x12= _0x3a09x2c;return getTicket(_0x3a09x10,_0x3a09x11,_0x3a09x12,_0x3a09x13,_0x3a09xd,_0x3a09x13.Fields,_0x3a09x16)})[_0x4d1e[36]](function(_0x3a09x2c){_0x3a09x2a= _0x3a09x2c;logger[_0x4d1e[29]](_0x4d1e[116],_0x3a09x2a[_0x4d1e[15]]);logger[_0x4d1e[29]](_0x4d1e[117],_0x3a09x10[_0x4d1e[58]])})[_0x4d1e[91]](function(_0x3a09x2b){logger[_0x4d1e[90]](_0x4d1e[115],JSON[_0x4d1e[89]](_0x3a09x2b))})}
\ No newline at end of file
index 65bb17c..2af1723 100644 (file)
@@ -1 +1 @@
-var _0x9d01=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x64\x35","\x75\x74\x69\x6C","\x2E\x2F\x75\x74\x69\x6C","\x73\x75\x67\x61\x72\x63\x72\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x50\x4F\x53\x54","\x65\x6D\x69\x74","\x74\x6F","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x6E\x65\x77\x20\x74\x69\x63\x6B\x65\x74\x2E\x2E\x2E","\x69\x6E\x66\x6F","\x6E\x61\x6D\x65","\x20","\x67\x65\x74\x53\x74\x72\x69\x6E\x67","\x61\x73\x73\x69\x67\x6E\x65\x64\x5F\x75\x73\x65\x72\x5F\x69\x64","\x69\x64","\x63\x72\x65\x61\x74\x65\x64\x5F\x62\x79","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x0A","\x64\x61\x74\x65\x5F\x73\x74\x61\x72\x74","\x54","\x72\x65\x70\x6C\x61\x63\x65","\x73\x6C\x69\x63\x65","\x74\x6F\x49\x53\x4F\x53\x74\x72\x69\x6E\x67","\x64\x75\x72\x61\x74\x69\x6F\x6E\x5F\x68\x6F\x75\x72\x73","\x30","\x64\x75\x72\x61\x74\x69\x6F\x6E\x5F\x6D\x69\x6E\x75\x74\x65\x73","\x31\x35","\x70\x61\x72\x65\x6E\x74\x5F\x69\x64","\x70\x61\x72\x65\x6E\x74\x5F\x74\x79\x70\x65","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x70\x61\x72\x65\x6E\x74\x5F\x6E\x61\x6D\x65","\x6C\x65\x6E\x67\x74\x68","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x69\x64\x46\x69\x65\x6C\x64","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x73\x65\x74\x5F\x65\x6E\x74\x72\x79","\x4A\x53\x4F\x4E","\x43\x61\x6C\x6C\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x42\x61\x73\x69\x63\x20\x25\x73","\x62\x61\x73\x65\x36\x34","\x61\x70\x69\x4B\x65\x79","\x3A\x58","\x66\x6F\x72\x6D\x61\x74","\x67\x65\x74\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x66\x6F","\x47\x65\x74\x74\x69\x6E\x67\x20\x61\x67\x65\x6E\x74\x20\x77\x69\x74\x68\x20\x6E\x61\x6D\x65","\x65\x6E\x74\x72\x79\x5F\x6C\x69\x73\x74","\x76\x61\x6C\x75\x65","\x75\x73\x65\x72\x5F\x6E\x61\x6D\x65","\x6E\x61\x6D\x65\x5F\x76\x61\x6C\x75\x65\x5F\x6C\x69\x73\x74","\x66\x69\x6E\x64","\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x21","\x72\x65\x73\x6F\x6C\x76\x65","\x41\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x75\x73\x69\x6E\x67\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x21","\x75\x73\x65\x72\x5F\x69\x64","\x74\x68\x65\x6E","\x67\x65\x74\x5F\x65\x6E\x74\x72\x79\x5F\x6C\x69\x73\x74","\x45\x6D\x70\x6C\x6F\x79\x65\x65\x73","\x49\x4E\x53\x54\x52\x20\x28\x20\x75\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x6E\x61\x6D\x65\x2C\x20\x22\x25\x73\x22\x29\x20\x3E\x20\x30","","\x53\x65\x61\x72\x63\x68\x69\x6E\x67\x20\x65\x6E\x64\x75\x73\x65\x72\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65","\x70\x68\x6F\x6E\x65\x5F\x68\x6F\x6D\x65","\x45\x6E\x64\x75\x73\x65\x72\x20\x66\x6F\x75\x6E\x64\x21","\x45\x6E\x64\x75\x73\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x61\x20\x6E\x65\x77\x20\x65\x6E\x64\x75\x73\x65\x72\x21","\x45\x6E\x64\x75\x73\x65\x72\x20\x63\x72\x65\x61\x74\x65\x64\x2E","\x66\x69\x72\x73\x74\x5F\x6E\x61\x6D\x65","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x70\x68\x6F\x6E\x65\x5F\x68\x6F\x6D\x65\x20\x3D\x20\x22\x25\x73\x22","\x5B\x48\x54\x54\x50\x5D","\x64\x65\x62\x75\x67","\x6D\x65\x72\x67\x65","\x6D\x61\x70","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x63\x6F\x6E\x74\x65\x6E\x74","\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x76\x61\x72\x69\x61\x62\x6C\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x73\x65\x73\x73\x69\x6F\x6E\x49\x44","\x41\x63\x63\x6F\x75\x6E\x74\x20\x25\x64\x20\x69\x73\x20\x6E\x6F\x74\x20\x76\x61\x6C\x69\x64","\x6C\x6F\x67\x69\x6E","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x50\x4C\x41\x49\x4E","\x78\x43\x41\x4C\x4C\x59\x20\x4D\x6F\x74\x69\x6F\x6E\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x73\x65\x74\x5F\x72\x65\x6C\x61\x74\x69\x6F\x6E\x73\x68\x69\x70","\x71\x75\x65\x75\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x73\x74\x72\x69\x70\x54\x72\x61\x69\x6C\x69\x6E\x67\x53\x6C\x61\x73\x68","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x75\x72\x69","\x25\x73\x2F\x73\x65\x72\x76\x69\x63\x65\x2F\x76\x34\x5F\x31\x2F\x72\x65\x73\x74\x2E\x70\x68\x70","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x51\x55\x45\x55\x45\x5D","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x69\x73\x20\x65\x6E\x61\x62\x6C\x65\x64\x21","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x73\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64\x26\x74\x6F\x6B\x65\x6E\x3D\x25\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x63\x68\x61\x72\x41\x74","\x76\x65\x72\x73\x69\x6F\x6E","\x25\x73\x2F\x69\x6E\x64\x65\x78\x2E\x70\x68\x70\x3F\x61\x63\x74\x69\x6F\x6E\x3D\x61\x6A\x61\x78\x75\x69\x23\x61\x6A\x61\x78\x55\x49\x4C\x6F\x63\x3D\x69\x6E\x64\x65\x78\x2E\x70\x68\x70\x25\x33\x46\x6D\x6F\x64\x75\x6C\x65\x25\x33\x44\x43\x61\x6C\x6C\x73\x25\x32\x36\x61\x63\x74\x69\x6F\x6E\x25\x33\x44\x45\x64\x69\x74\x56\x69\x65\x77\x25\x32\x36\x72\x65\x63\x6F\x72\x64\x25\x33\x44\x25\x73","\x25\x73\x2F\x23\x62\x77\x63\x2F\x69\x6E\x64\x65\x78\x2E\x70\x68\x70\x3F\x6D\x6F\x64\x75\x6C\x65\x3D\x43\x61\x6C\x6C\x73\x26\x61\x63\x74\x69\x6F\x6E\x3D\x45\x64\x69\x74\x56\x69\x65\x77\x26\x72\x65\x63\x6F\x72\x64\x3D\x25\x73","\x44\x69\x73\x70\x6C\x61\x79\x69\x6E\x67\x20\x74\x69\x63\x6B\x65\x74\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x69\x6E\x20\x61\x20\x6E\x65\x77\x20\x74\x61\x62\x2E\x2E\x2E","\x75\x73\x65\x72\x3A\x25\x73","\x74\x72\x69\x67\x67\x65\x72\x3A\x62\x72\x6F\x77\x73\x65\x72\x3A\x75\x72\x6C","\x63\x6F\x6E\x74\x61\x63\x74\x73","\x54\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x65\x64\x21","\x54\x68\x65\x20\x54\x69\x63\x6B\x65\x74\x20\x49\x44\x20\x69\x73\x3A","\x75\x73\x65\x72\x73","\x54\x68\x65\x20\x45\x6E\x64\x75\x73\x65\x72\x20\x49\x44\x20\x69\x73\x3A","\x54\x68\x65\x20\x55\x73\x65\x72\x20\x49\x44\x20\x69\x73\x3A","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x6E\x6F\x6E\x65","\x5B\x4F\x55\x54\x42\x4F\x55\x4E\x44\x5D","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x5B\x41\x42\x41\x4E\x44\x4F\x4E\x45\x44\x5D"];_0x9d01[0];var _=require(_0x9d01[1]);var rp=require(_0x9d01[2]);var BPromise=require(_0x9d01[3]);var md5=require(_0x9d01[4]);var util=require(_0x9d01[5]);var intUtil=require(_0x9d01[6]);var logger=require(_0x9d01[8])(_0x9d01[7]);var io=require(_0x9d01[10])({host:_0x9d01[9],port:6379});var def={method:_0x9d01[11],json:true};function emit(_0xaff5xb,_0xaff5xc,_0xaff5xd){io[_0x9d01[13]](_0xaff5xb)[_0x9d01[12]](_0xaff5xc,_0xaff5xd)}function getTicket(_0xaff5xf,_0xaff5x10,_0xaff5x11,_0xaff5x12,_0xaff5x13,_0xaff5x14,_0xaff5x15){logger[_0x9d01[15]](_0x9d01[14]);var _0xaff5x16= new Date();var _0xaff5x17=[{name:_0x9d01[16],value:intUtil[_0x9d01[18]](_0xaff5x12.Subjects,_0xaff5x13,_0x9d01[17])},{name:_0x9d01[19],value:_0xaff5x10[_0x9d01[20]]},{name:_0x9d01[21],value:_0xaff5x10[_0x9d01[20]]},{name:_0x9d01[22],value:intUtil[_0x9d01[18]](_0xaff5x12.Descriptions,_0xaff5x13,_0x9d01[23])},{name:_0x9d01[24],value:_0xaff5x16[_0x9d01[28]]()[_0x9d01[27]](0,19)[_0x9d01[26]](_0x9d01[25],_0x9d01[17])},{name:_0x9d01[29],value:_0x9d01[30]},{name:_0x9d01[31],value:_0x9d01[32]},{name:_0x9d01[33],value:_0xaff5x11[_0x9d01[20]]},{name:_0x9d01[34],value:_0x9d01[35]},{name:_0x9d01[36],value:_0xaff5x11[_0x9d01[16]]}];if(_0xaff5x14[_0x9d01[37]]){_[_0x9d01[41]](_0xaff5x14,function(_0xaff5x18){if(_0xaff5x13[_0xaff5x18[_0x9d01[38]]]){_0xaff5x17[_0x9d01[40]]({name:_0xaff5x18[_0x9d01[39]],value:_0xaff5x13[_0xaff5x18[_0x9d01[38]]]})}})};return request({form:{method:_0x9d01[42],input_type:_0x9d01[43],response_type:_0x9d01[43],rest_data:JSON[_0x9d01[45]]({session:_0xaff5x15[_0x9d01[20]],module_name:_0x9d01[44],name_value_list:_0xaff5x17})}})}function getAuth(_0xaff5xf){return util[_0x9d01[50]](_0x9d01[46], new Buffer(_0xaff5xf[_0x9d01[48]]+ _0x9d01[49]).toString(_0x9d01[47]))}function getServerInfo(_0xaff5x15){return request({form:{method:_0x9d01[51],input_type:_0x9d01[43],response_type:_0x9d01[43],rest_data:JSON[_0x9d01[45]]({session:_0xaff5x15[_0x9d01[20]]})}})}function getUser(_0xaff5xf,_0xaff5x1c,_0xaff5x15){logger[_0x9d01[15]](_0x9d01[52],_0xaff5x1c);return request({form:{method:_0x9d01[63],input_type:_0x9d01[43],response_type:_0x9d01[43],rest_data:JSON[_0x9d01[45]]({session:_0xaff5x15[_0x9d01[20]],module_name:_0x9d01[64],query:util[_0x9d01[50]](_0x9d01[65],_0xaff5x1c),order_by:_0x9d01[66],offset:_0x9d01[30],select_fields:[_0x9d01[20],_0x9d01[16],_0x9d01[55]],link_name_to_fields_array:[],max_results:-1,deleted:_0x9d01[30]})}})[_0x9d01[62]](function(_0xaff5x1d){if(_0xaff5x1d[_0x9d01[53]][_0x9d01[37]]){var _0xaff5x1e=_[_0x9d01[57]](_0xaff5x1d[_0x9d01[53]],function(_0xaff5x1f){return _0xaff5x1f[_0x9d01[56]][_0x9d01[55]][_0x9d01[54]]=== _0xaff5x1c});if(_0xaff5x1e){logger[_0x9d01[15]](_0x9d01[58]);return BPromise[_0x9d01[59]]({id:_0xaff5x1e[_0x9d01[56]][_0x9d01[20]][_0x9d01[54]],name:_0xaff5x1e[_0x9d01[56]][_0x9d01[16]][_0x9d01[54]]})}}else {logger[_0x9d01[15]](_0x9d01[60]);return BPromise[_0x9d01[59]]({id:_0xaff5x15[_0x9d01[56]][_0x9d01[61]][_0x9d01[20]],name:_0xaff5x15[_0x9d01[56]][_0x9d01[55]][_0x9d01[20]]})}})}function getEndUser(_0xaff5xf,_0xaff5x1c,_0xaff5x21,_0xaff5x15){logger[_0x9d01[15]](_0x9d01[67],_0xaff5x21);return request({form:{method:_0x9d01[63],input_type:_0x9d01[43],response_type:_0x9d01[43],rest_data:JSON[_0x9d01[45]]({session:_0xaff5x15[_0x9d01[20]],module_name:_0x9d01[35],query:util[_0x9d01[50]](_0x9d01[75],_0xaff5x21),order_by:_0x9d01[66],offset:_0x9d01[30],select_fields:[_0x9d01[20],_0x9d01[16],_0x9d01[68]],link_name_to_fields_array:[],max_results:-1,deleted:_0x9d01[30]})}})[_0x9d01[62]](function(_0xaff5x1d){if(_0xaff5x1d[_0x9d01[53]][_0x9d01[37]]){var _0xaff5x22=_[_0x9d01[57]](_0xaff5x1d[_0x9d01[53]],function(_0xaff5x1f){return _0xaff5x1f[_0x9d01[56]][_0x9d01[68]][_0x9d01[54]]=== _0xaff5x21});if(_0xaff5x22){logger[_0x9d01[15]](_0x9d01[69]);return BPromise[_0x9d01[59]]({id:_0xaff5x22[_0x9d01[56]][_0x9d01[20]][_0x9d01[54]],name:_0xaff5x22[_0x9d01[56]][_0x9d01[16]][_0x9d01[54]],phone:_0xaff5x22[_0x9d01[56]][_0x9d01[68]][_0x9d01[54]]})}}else {logger[_0x9d01[15]](_0x9d01[70]);return request({form:{method:_0x9d01[42],input_type:_0x9d01[43],response_type:_0x9d01[43],rest_data:JSON[_0x9d01[45]]({session:_0xaff5x15[_0x9d01[20]],module_name:_0x9d01[35],name_value_list:[{name:_0x9d01[72],value:(_0xaff5x1c!== _0x9d01[73])?_0xaff5x1c:util[_0x9d01[50]](_0x9d01[74],_0xaff5x21)},{name:_0x9d01[68],value:_0xaff5x21}]})}})[_0x9d01[62]](function(_0xaff5x22){logger[_0x9d01[15]](_0x9d01[71]);return BPromise[_0x9d01[59]]({id:_0xaff5x22[_0x9d01[20]],name:_0xaff5x22[_0x9d01[53]][_0x9d01[72]][_0x9d01[54]],phone:_0xaff5x22[_0x9d01[53]][_0x9d01[68]][_0x9d01[54]]})})}})}function request(_0xaff5x24){logger[_0x9d01[77]](_0x9d01[76],JSON[_0x9d01[45]](_0xaff5x24));return rp(_[_0x9d01[78]](def,_0xaff5x24))}function getTags(_0xaff5x26,_0xaff5x27){var _0xaff5x28=[];if(_0xaff5x26&& _0xaff5x26[_0x9d01[37]]> 0){_0xaff5x28= _[_0x9d01[79]](_0xaff5x26,_0xaff5x27)};return _0xaff5x28}function getCustomFields(_0xaff5x14,_0xaff5x13){var _0xaff5x2a=[];var _0xaff5x2b={custom_fields:[]};if(_0xaff5x14[_0x9d01[37]]> 0){_[_0x9d01[41]](_0xaff5x14,function(_0xaff5x18){if(_0xaff5x18[_0x9d01[80]]=== _0x9d01[81]&& _0xaff5x18[_0x9d01[82]]&&  !_0xaff5x18[_0x9d01[83]]){_0xaff5x2b[_0xaff5x18[_0x9d01[82]][_0x9d01[84]]()]= _0xaff5x18[_0x9d01[85]].toString()}else {if(_0xaff5x18[_0x9d01[80]]=== _0x9d01[81]&& _0xaff5x18[_0x9d01[39]]&& _0xaff5x18[_0x9d01[83]]){_0xaff5x2b[_0x9d01[86]][_0x9d01[40]]({id:_0xaff5x18[_0x9d01[39]],value:_0xaff5x18[_0x9d01[85]].toString()})}else {if(_0xaff5x18[_0x9d01[80]]=== _0x9d01[87]&& _0xaff5x18[_0x9d01[38]]&& _0xaff5x18[_0x9d01[39]]&& _0xaff5x18[_0x9d01[83]]){_0xaff5x13[_0xaff5x18[_0x9d01[38]]]&& _0xaff5x2b[_0x9d01[86]][_0x9d01[40]]({id:_0xaff5x18[_0x9d01[39]],value:_0xaff5x13[_0xaff5x18[_0x9d01[38]]].toString()})}else {if(_0xaff5x18[_0x9d01[80]]=== _0x9d01[88]&& _0xaff5x18[_0x9d01[89]]&& _0xaff5x18[_0x9d01[89]][_0x9d01[16]]&& _0xaff5x18[_0x9d01[39]]&& _0xaff5x18[_0x9d01[83]]){_0xaff5x13[_0xaff5x18[_0x9d01[89]][_0x9d01[16]][_0x9d01[84]]()]&& _0xaff5x2b[_0x9d01[86]][_0x9d01[40]]({id:_0xaff5x18[_0x9d01[39]],value:_0xaff5x13[_0xaff5x18[_0x9d01[89]][_0x9d01[16]][_0x9d01[84]]()].toString()})}}}}})};return _0xaff5x2b}function getConnection(_0xaff5xf){return request({method:_0x9d01[11],form:{method:_0x9d01[92],input_type:_0x9d01[43],response_type:_0x9d01[43],rest_data:JSON[_0x9d01[45]]({user_auth:{user_name:_0xaff5xf[_0x9d01[93]],password:_0xaff5xf[_0x9d01[94]],encryption:_0x9d01[95]},application:_0x9d01[96]})}})[_0x9d01[62]](function(_0xaff5x2d){var _0xaff5x15=_0xaff5x2d;if(_0xaff5x15[_0x9d01[20]]){def[_0x9d01[90]]= _0xaff5x15[_0x9d01[20]];return BPromise[_0x9d01[59]](_0xaff5x15)}else {throw  new Error(util[_0x9d01[50]](_0x9d01[91],_0xaff5xf[_0x9d01[20]]))}})}function setRelationship(_0xaff5x15,_0xaff5x10,_0xaff5x2f,_0xaff5x30){return request({form:{method:_0x9d01[97],input_type:_0x9d01[43],response_type:_0x9d01[43],rest_data:JSON[_0x9d01[45]]({session:_0xaff5x15[_0x9d01[20]],module_name:_0x9d01[44],module_id:_0xaff5x2f[_0x9d01[20]],link_field_name:_0xaff5x30,related_ids:[_0xaff5x10[_0x9d01[20]]]})}})}exports[_0x9d01[98]]= function(_0xaff5x31,_0xaff5xc,_0xaff5x12,_0xaff5x1e,_0xaff5x32,_0xaff5xf){var _0xaff5x10,_0xaff5x11,_0xaff5x2f,_0xaff5x15;_0xaff5xf[_0x9d01[99]]= intUtil[_0x9d01[100]](_0xaff5xf[_0x9d01[99]]);_0xaff5xf[_0x9d01[101]]= intUtil[_0x9d01[100]](_0xaff5xf[_0x9d01[101]]);def[_0x9d01[102]]= util[_0x9d01[50]](_0x9d01[103],_0xaff5xf[_0x9d01[99]]);if(_0xaff5x32&& _0xaff5x32[_0x9d01[104]]){logger[_0x9d01[15]](_0x9d01[105],_0x9d01[106]);_0xaff5xc[_0x9d01[107]]= util[_0x9d01[50]](_0x9d01[108],_0xaff5xf[_0x9d01[101]],_0xaff5xc[_0x9d01[109]],md5(_0xaff5xc[_0x9d01[109]]))}else {_0xaff5xc[_0x9d01[107]]= _0x9d01[66]};return getConnection(_0xaff5xf)[_0x9d01[62]](function(_0xaff5x2d){_0xaff5x15= _0xaff5x2d;return getUser(_0xaff5xf,_0xaff5x1e[_0x9d01[16]],_0xaff5x15)})[_0x9d01[62]](function(_0xaff5x2d){_0xaff5x10= _0xaff5x2d;logger[_0x9d01[15]](_0x9d01[124],_0xaff5x10[_0x9d01[20]]);return getEndUser(_0xaff5xf,_0xaff5xc[_0x9d01[125]],_0xaff5xc[_0x9d01[126]],_0xaff5x15)})[_0x9d01[62]](function(_0xaff5x2d){_0xaff5x11= _0xaff5x2d;logger[_0x9d01[15]](_0x9d01[123],_0xaff5x11[_0x9d01[20]]);return getTicket(_0xaff5xf,_0xaff5x10,_0xaff5x11,_0xaff5x12,_0xaff5xc,_0xaff5x12.Fields,_0xaff5x15)})[_0x9d01[62]](function(_0xaff5x2d){_0xaff5x2f= _0xaff5x2d;logger[_0x9d01[15]](_0x9d01[120]);logger[_0x9d01[15]](_0x9d01[121],_0xaff5x2f[_0x9d01[20]]);return setRelationship(_0xaff5x15,_0xaff5x10,_0xaff5x2f,_0x9d01[122])})[_0x9d01[62]](function(){return setRelationship(_0xaff5x15,_0xaff5x11,_0xaff5x2f,_0x9d01[119])})[_0x9d01[62]](function(){return getServerInfo(_0xaff5x15)})[_0x9d01[62]](function(_0xaff5x2d){var _0xaff5x34=parseInt(_0xaff5x2d[_0x9d01[113]][_0x9d01[112]](0));var _0xaff5x35=util[_0x9d01[50]](_0x9d01[114],_0xaff5xf[_0x9d01[99]],_0xaff5x2f[_0x9d01[20]]);if(_0xaff5x34> 6){_0xaff5x35= util[_0x9d01[50]](_0x9d01[115],_0xaff5xf[_0x9d01[99]],_0xaff5x2f[_0x9d01[20]])};logger[_0x9d01[15]](_0x9d01[105],_0x9d01[116]);emit(util[_0x9d01[50]](_0x9d01[117],_0xaff5x1e[_0x9d01[16]]),_0x9d01[118],{uri:_0xaff5x35})})[_0x9d01[111]](function(_0xaff5x33){logger[_0x9d01[110]](_0x9d01[105],JSON[_0x9d01[45]](_0xaff5x33))})};exports[_0x9d01[127]]= function(_0xaff5x31,_0xaff5xc,_0xaff5x12,_0xaff5x1e,_0xaff5x32,_0xaff5xf,_0xaff5x36){var _0xaff5x10,_0xaff5x11,_0xaff5x2f,_0xaff5x15;_0xaff5xf[_0x9d01[99]]= intUtil[_0x9d01[100]](_0xaff5xf[_0x9d01[99]]);_0xaff5xf[_0x9d01[101]]= intUtil[_0x9d01[100]](_0xaff5xf[_0x9d01[101]]);def[_0x9d01[102]]= util[_0x9d01[50]](_0x9d01[103],_0xaff5xf[_0x9d01[99]]);if(_0xaff5x36&& _0xaff5x36[_0x9d01[128]]&& _0xaff5x36[_0x9d01[128]]!== _0x9d01[129]){logger[_0x9d01[15]](_0x9d01[130],_0x9d01[106]);_0xaff5xc[_0x9d01[107]]= util[_0x9d01[50]](_0x9d01[108],_0xaff5xf[_0x9d01[101]],_0xaff5xc[_0x9d01[109]],md5(_0xaff5xc[_0x9d01[109]]))};return getConnection(_0xaff5xf)[_0x9d01[62]](function(_0xaff5x2d){_0xaff5x15= _0xaff5x2d;return getUser(_0xaff5xf,_0xaff5x1e[_0x9d01[16]],_0xaff5x15)})[_0x9d01[62]](function(_0xaff5x2d){_0xaff5x10= _0xaff5x2d;logger[_0x9d01[15]](_0x9d01[124],_0xaff5x10[_0x9d01[20]]);return getEndUser(_0xaff5xf,_0xaff5xc[_0x9d01[131]],_0xaff5xc[_0x9d01[132]],_0xaff5x15)})[_0x9d01[62]](function(_0xaff5x2d){_0xaff5x11= _0xaff5x2d;logger[_0x9d01[15]](_0x9d01[123],_0xaff5x11[_0x9d01[20]]);return getTicket(_0xaff5xf,_0xaff5x10,_0xaff5x11,_0xaff5x12,_0xaff5xc,_0xaff5x12.Fields,_0xaff5x15)})[_0x9d01[62]](function(_0xaff5x2d){_0xaff5x2f= _0xaff5x2d;logger[_0x9d01[15]](_0x9d01[120]);logger[_0x9d01[15]](_0x9d01[121],_0xaff5x2f[_0x9d01[20]]);return setRelationship(_0xaff5x15,_0xaff5x10,_0xaff5x2f,_0x9d01[122])})[_0x9d01[62]](function(){return setRelationship(_0xaff5x15,_0xaff5x11,_0xaff5x2f,_0x9d01[119])})[_0x9d01[62]](function(){return getServerInfo(_0xaff5x15)})[_0x9d01[62]](function(_0xaff5x2d){var _0xaff5x34=parseInt(_0xaff5x2d[_0x9d01[113]][_0x9d01[112]](0));var _0xaff5x35=util[_0x9d01[50]](_0x9d01[114],_0xaff5xf[_0x9d01[99]],_0xaff5x2f[_0x9d01[20]]);if(_0xaff5x34> 6){_0xaff5x35= util[_0x9d01[50]](_0x9d01[115],_0xaff5xf[_0x9d01[99]],_0xaff5x2f[_0x9d01[20]])};logger[_0x9d01[15]](_0x9d01[130],_0x9d01[116]);emit(util[_0x9d01[50]](_0x9d01[117],_0xaff5x1e[_0x9d01[16]]),_0x9d01[118],{uri:_0xaff5x35})})[_0x9d01[111]](function(_0xaff5x33){logger[_0x9d01[110]](_0x9d01[130],JSON[_0x9d01[45]](_0xaff5x33))})};exports[_0x9d01[133]]= function(_0xaff5x31,_0xaff5xc,_0xaff5x12,_0xaff5x1e,_0xaff5x32,_0xaff5xf){var _0xaff5x10,_0xaff5x11,_0xaff5x2f,_0xaff5x15;_0xaff5xf[_0x9d01[99]]= intUtil[_0x9d01[100]](_0xaff5xf[_0x9d01[99]]);_0xaff5xf[_0x9d01[101]]= intUtil[_0x9d01[100]](_0xaff5xf[_0x9d01[101]]);def[_0x9d01[102]]= util[_0x9d01[50]](_0x9d01[103],_0xaff5xf[_0x9d01[99]]);if(_0xaff5x32&& _0xaff5x32[_0x9d01[104]]){logger[_0x9d01[15]](_0x9d01[134],_0x9d01[106]);_0xaff5xc[_0x9d01[107]]= util[_0x9d01[50]](_0x9d01[108],_0xaff5xf[_0x9d01[101]],_0xaff5xc[_0x9d01[109]],md5(_0xaff5xc[_0x9d01[109]]))}else {_0xaff5xc[_0x9d01[107]]= _0x9d01[66]};return getConnection(_0xaff5xf)[_0x9d01[62]](function(_0xaff5x2d){_0xaff5x15= _0xaff5x2d;return getUser(_0xaff5xf,_0xaff5x1e[_0x9d01[16]],_0xaff5x15)})[_0x9d01[62]](function(_0xaff5x2d){_0xaff5x10= _0xaff5x2d;logger[_0x9d01[15]](_0x9d01[124],_0xaff5x10[_0x9d01[20]]);return getEndUser(_0xaff5xf,_0xaff5xc[_0x9d01[125]],_0xaff5xc[_0x9d01[126]],_0xaff5x15)})[_0x9d01[62]](function(_0xaff5x2d){_0xaff5x11= _0xaff5x2d;logger[_0x9d01[15]](_0x9d01[123],_0xaff5x11[_0x9d01[20]]);return getTicket(_0xaff5xf,_0xaff5x10,_0xaff5x11,_0xaff5x12,_0xaff5xc,_0xaff5x12.Fields,_0xaff5x15)})[_0x9d01[62]](function(_0xaff5x2d){_0xaff5x2f= _0xaff5x2d;logger[_0x9d01[15]](_0x9d01[120]);logger[_0x9d01[15]](_0x9d01[121],_0xaff5x2f[_0x9d01[20]]);return setRelationship(_0xaff5x15,_0xaff5x10,_0xaff5x2f,_0x9d01[122])})[_0x9d01[62]](function(){return setRelationship(_0xaff5x15,_0xaff5x11,_0xaff5x2f,_0x9d01[119])})[_0x9d01[62]](function(){return getServerInfo(_0xaff5x15)})[_0x9d01[111]](function(_0xaff5x33){logger[_0x9d01[110]](_0x9d01[134],JSON[_0x9d01[45]](_0xaff5x33))})}
\ No newline at end of file
+var _0xb5b2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x64\x35","\x75\x74\x69\x6C","\x2E\x2F\x75\x74\x69\x6C","\x73\x75\x67\x61\x72\x63\x72\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x50\x4F\x53\x54","\x65\x6D\x69\x74","\x74\x6F","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x6E\x65\x77\x20\x74\x69\x63\x6B\x65\x74\x2E\x2E\x2E","\x69\x6E\x66\x6F","\x6E\x61\x6D\x65","\x20","\x67\x65\x74\x53\x74\x72\x69\x6E\x67","\x61\x73\x73\x69\x67\x6E\x65\x64\x5F\x75\x73\x65\x72\x5F\x69\x64","\x69\x64","\x63\x72\x65\x61\x74\x65\x64\x5F\x62\x79","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x0A","\x64\x61\x74\x65\x5F\x73\x74\x61\x72\x74","\x54","\x72\x65\x70\x6C\x61\x63\x65","\x73\x6C\x69\x63\x65","\x74\x6F\x49\x53\x4F\x53\x74\x72\x69\x6E\x67","\x64\x75\x72\x61\x74\x69\x6F\x6E\x5F\x68\x6F\x75\x72\x73","\x30","\x64\x75\x72\x61\x74\x69\x6F\x6E\x5F\x6D\x69\x6E\x75\x74\x65\x73","\x31\x35","\x70\x61\x72\x65\x6E\x74\x5F\x69\x64","\x70\x61\x72\x65\x6E\x74\x5F\x74\x79\x70\x65","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x70\x61\x72\x65\x6E\x74\x5F\x6E\x61\x6D\x65","\x6C\x65\x6E\x67\x74\x68","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x69\x64\x46\x69\x65\x6C\x64","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x73\x65\x74\x5F\x65\x6E\x74\x72\x79","\x4A\x53\x4F\x4E","\x43\x61\x6C\x6C\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x42\x61\x73\x69\x63\x20\x25\x73","\x62\x61\x73\x65\x36\x34","\x61\x70\x69\x4B\x65\x79","\x3A\x58","\x66\x6F\x72\x6D\x61\x74","\x67\x65\x74\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x66\x6F","\x47\x65\x74\x74\x69\x6E\x67\x20\x61\x67\x65\x6E\x74\x20\x77\x69\x74\x68\x20\x6E\x61\x6D\x65","\x65\x6E\x74\x72\x79\x5F\x6C\x69\x73\x74","\x76\x61\x6C\x75\x65","\x75\x73\x65\x72\x5F\x6E\x61\x6D\x65","\x6E\x61\x6D\x65\x5F\x76\x61\x6C\x75\x65\x5F\x6C\x69\x73\x74","\x66\x69\x6E\x64","\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x21","\x72\x65\x73\x6F\x6C\x76\x65","\x41\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x75\x73\x69\x6E\x67\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x21","\x75\x73\x65\x72\x5F\x69\x64","\x74\x68\x65\x6E","\x67\x65\x74\x5F\x65\x6E\x74\x72\x79\x5F\x6C\x69\x73\x74","\x45\x6D\x70\x6C\x6F\x79\x65\x65\x73","\x49\x4E\x53\x54\x52\x20\x28\x20\x75\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x6E\x61\x6D\x65\x2C\x20\x22\x25\x73\x22\x29\x20\x3E\x20\x30","","\x53\x65\x61\x72\x63\x68\x69\x6E\x67\x20\x65\x6E\x64\x75\x73\x65\x72\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65","\x70\x68\x6F\x6E\x65\x5F\x68\x6F\x6D\x65","\x45\x6E\x64\x75\x73\x65\x72\x20\x66\x6F\x75\x6E\x64\x21","\x45\x6E\x64\x75\x73\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x61\x20\x6E\x65\x77\x20\x65\x6E\x64\x75\x73\x65\x72\x21","\x45\x6E\x64\x75\x73\x65\x72\x20\x63\x72\x65\x61\x74\x65\x64\x2E","\x66\x69\x72\x73\x74\x5F\x6E\x61\x6D\x65","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x70\x68\x6F\x6E\x65\x5F\x68\x6F\x6D\x65\x20\x3D\x20\x22\x25\x73\x22","\x5B\x48\x54\x54\x50\x5D","\x64\x65\x62\x75\x67","\x6D\x65\x72\x67\x65","\x6D\x61\x70","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x63\x6F\x6E\x74\x65\x6E\x74","\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x76\x61\x72\x69\x61\x62\x6C\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x73\x65\x73\x73\x69\x6F\x6E\x49\x44","\x41\x63\x63\x6F\x75\x6E\x74\x20\x25\x64\x20\x69\x73\x20\x6E\x6F\x74\x20\x76\x61\x6C\x69\x64","\x6C\x6F\x67\x69\x6E","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x50\x4C\x41\x49\x4E","\x78\x43\x41\x4C\x4C\x59\x20\x4D\x6F\x74\x69\x6F\x6E\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x73\x65\x74\x5F\x72\x65\x6C\x61\x74\x69\x6F\x6E\x73\x68\x69\x70","\x71\x75\x65\x75\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x73\x74\x72\x69\x70\x54\x72\x61\x69\x6C\x69\x6E\x67\x53\x6C\x61\x73\x68","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x75\x72\x69","\x25\x73\x2F\x73\x65\x72\x76\x69\x63\x65\x2F\x76\x34\x5F\x31\x2F\x72\x65\x73\x74\x2E\x70\x68\x70","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x51\x55\x45\x55\x45\x5D","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x69\x73\x20\x65\x6E\x61\x62\x6C\x65\x64\x21","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x73\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64\x26\x74\x6F\x6B\x65\x6E\x3D\x25\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x63\x68\x61\x72\x41\x74","\x76\x65\x72\x73\x69\x6F\x6E","\x25\x73\x2F\x69\x6E\x64\x65\x78\x2E\x70\x68\x70\x3F\x61\x63\x74\x69\x6F\x6E\x3D\x61\x6A\x61\x78\x75\x69\x23\x61\x6A\x61\x78\x55\x49\x4C\x6F\x63\x3D\x69\x6E\x64\x65\x78\x2E\x70\x68\x70\x25\x33\x46\x6D\x6F\x64\x75\x6C\x65\x25\x33\x44\x43\x61\x6C\x6C\x73\x25\x32\x36\x61\x63\x74\x69\x6F\x6E\x25\x33\x44\x45\x64\x69\x74\x56\x69\x65\x77\x25\x32\x36\x72\x65\x63\x6F\x72\x64\x25\x33\x44\x25\x73","\x25\x73\x2F\x23\x62\x77\x63\x2F\x69\x6E\x64\x65\x78\x2E\x70\x68\x70\x3F\x6D\x6F\x64\x75\x6C\x65\x3D\x43\x61\x6C\x6C\x73\x26\x61\x63\x74\x69\x6F\x6E\x3D\x45\x64\x69\x74\x56\x69\x65\x77\x26\x72\x65\x63\x6F\x72\x64\x3D\x25\x73","\x44\x69\x73\x70\x6C\x61\x79\x69\x6E\x67\x20\x74\x69\x63\x6B\x65\x74\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x69\x6E\x20\x61\x20\x6E\x65\x77\x20\x74\x61\x62\x2E\x2E\x2E","\x75\x73\x65\x72\x3A\x25\x73","\x74\x72\x69\x67\x67\x65\x72\x3A\x62\x72\x6F\x77\x73\x65\x72\x3A\x75\x72\x6C","\x63\x6F\x6E\x74\x61\x63\x74\x73","\x54\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x65\x64\x21","\x54\x68\x65\x20\x54\x69\x63\x6B\x65\x74\x20\x49\x44\x20\x69\x73\x3A","\x75\x73\x65\x72\x73","\x54\x68\x65\x20\x45\x6E\x64\x75\x73\x65\x72\x20\x49\x44\x20\x69\x73\x3A","\x54\x68\x65\x20\x55\x73\x65\x72\x20\x49\x44\x20\x69\x73\x3A","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x6E\x6F\x6E\x65","\x5B\x4F\x55\x54\x42\x4F\x55\x4E\x44\x5D","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x5B\x41\x42\x41\x4E\x44\x4F\x4E\x45\x44\x5D"];_0xb5b2[0];var _=require(_0xb5b2[1]);var rp=require(_0xb5b2[2]);var BPromise=require(_0xb5b2[3]);var md5=require(_0xb5b2[4]);var util=require(_0xb5b2[5]);var intUtil=require(_0xb5b2[6]);var logger=require(_0xb5b2[8])(_0xb5b2[7]);var io=require(_0xb5b2[10])({host:_0xb5b2[9],port:6379});var def={method:_0xb5b2[11],json:true};function emit(_0x6caaxb,_0x6caaxc,_0x6caaxd){io[_0xb5b2[13]](_0x6caaxb)[_0xb5b2[12]](_0x6caaxc,_0x6caaxd)}function getTicket(_0x6caaxf,_0x6caax10,_0x6caax11,_0x6caax12,_0x6caax13,_0x6caax14,_0x6caax15){logger[_0xb5b2[15]](_0xb5b2[14]);var _0x6caax16= new Date();var _0x6caax17=[{name:_0xb5b2[16],value:intUtil[_0xb5b2[18]](_0x6caax12.Subjects,_0x6caax13,_0xb5b2[17])},{name:_0xb5b2[19],value:_0x6caax10[_0xb5b2[20]]},{name:_0xb5b2[21],value:_0x6caax10[_0xb5b2[20]]},{name:_0xb5b2[22],value:intUtil[_0xb5b2[18]](_0x6caax12.Descriptions,_0x6caax13,_0xb5b2[23])},{name:_0xb5b2[24],value:_0x6caax16[_0xb5b2[28]]()[_0xb5b2[27]](0,19)[_0xb5b2[26]](_0xb5b2[25],_0xb5b2[17])},{name:_0xb5b2[29],value:_0xb5b2[30]},{name:_0xb5b2[31],value:_0xb5b2[32]},{name:_0xb5b2[33],value:_0x6caax11[_0xb5b2[20]]},{name:_0xb5b2[34],value:_0xb5b2[35]},{name:_0xb5b2[36],value:_0x6caax11[_0xb5b2[16]]}];if(_0x6caax14[_0xb5b2[37]]){_[_0xb5b2[41]](_0x6caax14,function(_0x6caax18){if(_0x6caax13[_0x6caax18[_0xb5b2[38]]]){_0x6caax17[_0xb5b2[40]]({name:_0x6caax18[_0xb5b2[39]],value:_0x6caax13[_0x6caax18[_0xb5b2[38]]]})}})};return request({form:{method:_0xb5b2[42],input_type:_0xb5b2[43],response_type:_0xb5b2[43],rest_data:JSON[_0xb5b2[45]]({session:_0x6caax15[_0xb5b2[20]],module_name:_0xb5b2[44],name_value_list:_0x6caax17})}})}function getAuth(_0x6caaxf){return util[_0xb5b2[50]](_0xb5b2[46], new Buffer(_0x6caaxf[_0xb5b2[48]]+ _0xb5b2[49]).toString(_0xb5b2[47]))}function getServerInfo(_0x6caax15){return request({form:{method:_0xb5b2[51],input_type:_0xb5b2[43],response_type:_0xb5b2[43],rest_data:JSON[_0xb5b2[45]]({session:_0x6caax15[_0xb5b2[20]]})}})}function getUser(_0x6caaxf,_0x6caax1c,_0x6caax15){logger[_0xb5b2[15]](_0xb5b2[52],_0x6caax1c);return request({form:{method:_0xb5b2[63],input_type:_0xb5b2[43],response_type:_0xb5b2[43],rest_data:JSON[_0xb5b2[45]]({session:_0x6caax15[_0xb5b2[20]],module_name:_0xb5b2[64],query:util[_0xb5b2[50]](_0xb5b2[65],_0x6caax1c),order_by:_0xb5b2[66],offset:_0xb5b2[30],select_fields:[_0xb5b2[20],_0xb5b2[16],_0xb5b2[55]],link_name_to_fields_array:[],max_results:-1,deleted:_0xb5b2[30]})}})[_0xb5b2[62]](function(_0x6caax1d){if(_0x6caax1d[_0xb5b2[53]][_0xb5b2[37]]){var _0x6caax1e=_[_0xb5b2[57]](_0x6caax1d[_0xb5b2[53]],function(_0x6caax1f){return _0x6caax1f[_0xb5b2[56]][_0xb5b2[55]][_0xb5b2[54]]=== _0x6caax1c});if(_0x6caax1e){logger[_0xb5b2[15]](_0xb5b2[58]);return BPromise[_0xb5b2[59]]({id:_0x6caax1e[_0xb5b2[56]][_0xb5b2[20]][_0xb5b2[54]],name:_0x6caax1e[_0xb5b2[56]][_0xb5b2[16]][_0xb5b2[54]]})}}else {logger[_0xb5b2[15]](_0xb5b2[60]);return BPromise[_0xb5b2[59]]({id:_0x6caax15[_0xb5b2[56]][_0xb5b2[61]][_0xb5b2[20]],name:_0x6caax15[_0xb5b2[56]][_0xb5b2[55]][_0xb5b2[20]]})}})}function getEndUser(_0x6caaxf,_0x6caax1c,_0x6caax21,_0x6caax15){logger[_0xb5b2[15]](_0xb5b2[67],_0x6caax21);return request({form:{method:_0xb5b2[63],input_type:_0xb5b2[43],response_type:_0xb5b2[43],rest_data:JSON[_0xb5b2[45]]({session:_0x6caax15[_0xb5b2[20]],module_name:_0xb5b2[35],query:util[_0xb5b2[50]](_0xb5b2[75],_0x6caax21),order_by:_0xb5b2[66],offset:_0xb5b2[30],select_fields:[_0xb5b2[20],_0xb5b2[16],_0xb5b2[68]],link_name_to_fields_array:[],max_results:-1,deleted:_0xb5b2[30]})}})[_0xb5b2[62]](function(_0x6caax1d){if(_0x6caax1d[_0xb5b2[53]][_0xb5b2[37]]){var _0x6caax22=_[_0xb5b2[57]](_0x6caax1d[_0xb5b2[53]],function(_0x6caax1f){return _0x6caax1f[_0xb5b2[56]][_0xb5b2[68]][_0xb5b2[54]]=== _0x6caax21});if(_0x6caax22){logger[_0xb5b2[15]](_0xb5b2[69]);return BPromise[_0xb5b2[59]]({id:_0x6caax22[_0xb5b2[56]][_0xb5b2[20]][_0xb5b2[54]],name:_0x6caax22[_0xb5b2[56]][_0xb5b2[16]][_0xb5b2[54]],phone:_0x6caax22[_0xb5b2[56]][_0xb5b2[68]][_0xb5b2[54]]})}}else {logger[_0xb5b2[15]](_0xb5b2[70]);return request({form:{method:_0xb5b2[42],input_type:_0xb5b2[43],response_type:_0xb5b2[43],rest_data:JSON[_0xb5b2[45]]({session:_0x6caax15[_0xb5b2[20]],module_name:_0xb5b2[35],name_value_list:[{name:_0xb5b2[72],value:(_0x6caax1c!== _0xb5b2[73])?_0x6caax1c:util[_0xb5b2[50]](_0xb5b2[74],_0x6caax21)},{name:_0xb5b2[68],value:_0x6caax21}]})}})[_0xb5b2[62]](function(_0x6caax22){logger[_0xb5b2[15]](_0xb5b2[71]);return BPromise[_0xb5b2[59]]({id:_0x6caax22[_0xb5b2[20]],name:_0x6caax22[_0xb5b2[53]][_0xb5b2[72]][_0xb5b2[54]],phone:_0x6caax22[_0xb5b2[53]][_0xb5b2[68]][_0xb5b2[54]]})})}})}function request(_0x6caax24){logger[_0xb5b2[77]](_0xb5b2[76],JSON[_0xb5b2[45]](_0x6caax24));return rp(_[_0xb5b2[78]](def,_0x6caax24))}function getTags(_0x6caax26,_0x6caax27){var _0x6caax28=[];if(_0x6caax26&& _0x6caax26[_0xb5b2[37]]> 0){_0x6caax28= _[_0xb5b2[79]](_0x6caax26,_0x6caax27)};return _0x6caax28}function getCustomFields(_0x6caax14,_0x6caax13){var _0x6caax2a=[];var _0x6caax2b={custom_fields:[]};if(_0x6caax14[_0xb5b2[37]]> 0){_[_0xb5b2[41]](_0x6caax14,function(_0x6caax18){if(_0x6caax18[_0xb5b2[80]]=== _0xb5b2[81]&& _0x6caax18[_0xb5b2[82]]&&  !_0x6caax18[_0xb5b2[83]]){_0x6caax2b[_0x6caax18[_0xb5b2[82]][_0xb5b2[84]]()]= _0x6caax18[_0xb5b2[85]].toString()}else {if(_0x6caax18[_0xb5b2[80]]=== _0xb5b2[81]&& _0x6caax18[_0xb5b2[39]]&& _0x6caax18[_0xb5b2[83]]){_0x6caax2b[_0xb5b2[86]][_0xb5b2[40]]({id:_0x6caax18[_0xb5b2[39]],value:_0x6caax18[_0xb5b2[85]].toString()})}else {if(_0x6caax18[_0xb5b2[80]]=== _0xb5b2[87]&& _0x6caax18[_0xb5b2[38]]&& _0x6caax18[_0xb5b2[39]]&& _0x6caax18[_0xb5b2[83]]){_0x6caax13[_0x6caax18[_0xb5b2[38]]]&& _0x6caax2b[_0xb5b2[86]][_0xb5b2[40]]({id:_0x6caax18[_0xb5b2[39]],value:_0x6caax13[_0x6caax18[_0xb5b2[38]]].toString()})}else {if(_0x6caax18[_0xb5b2[80]]=== _0xb5b2[88]&& _0x6caax18[_0xb5b2[89]]&& _0x6caax18[_0xb5b2[89]][_0xb5b2[16]]&& _0x6caax18[_0xb5b2[39]]&& _0x6caax18[_0xb5b2[83]]){_0x6caax13[_0x6caax18[_0xb5b2[89]][_0xb5b2[16]][_0xb5b2[84]]()]&& _0x6caax2b[_0xb5b2[86]][_0xb5b2[40]]({id:_0x6caax18[_0xb5b2[39]],value:_0x6caax13[_0x6caax18[_0xb5b2[89]][_0xb5b2[16]][_0xb5b2[84]]()].toString()})}}}}})};return _0x6caax2b}function getConnection(_0x6caaxf){return request({method:_0xb5b2[11],form:{method:_0xb5b2[92],input_type:_0xb5b2[43],response_type:_0xb5b2[43],rest_data:JSON[_0xb5b2[45]]({user_auth:{user_name:_0x6caaxf[_0xb5b2[93]],password:_0x6caaxf[_0xb5b2[94]],encryption:_0xb5b2[95]},application:_0xb5b2[96]})}})[_0xb5b2[62]](function(_0x6caax2d){var _0x6caax15=_0x6caax2d;if(_0x6caax15[_0xb5b2[20]]){def[_0xb5b2[90]]= _0x6caax15[_0xb5b2[20]];return BPromise[_0xb5b2[59]](_0x6caax15)}else {throw  new Error(util[_0xb5b2[50]](_0xb5b2[91],_0x6caaxf[_0xb5b2[20]]))}})}function setRelationship(_0x6caax15,_0x6caax10,_0x6caax2f,_0x6caax30){return request({form:{method:_0xb5b2[97],input_type:_0xb5b2[43],response_type:_0xb5b2[43],rest_data:JSON[_0xb5b2[45]]({session:_0x6caax15[_0xb5b2[20]],module_name:_0xb5b2[44],module_id:_0x6caax2f[_0xb5b2[20]],link_field_name:_0x6caax30,related_ids:[_0x6caax10[_0xb5b2[20]]]})}})}exports[_0xb5b2[98]]= function(_0x6caax31,_0x6caaxc,_0x6caax12,_0x6caax1e,_0x6caax32,_0x6caaxf){var _0x6caax10,_0x6caax11,_0x6caax2f,_0x6caax15;_0x6caaxf[_0xb5b2[99]]= intUtil[_0xb5b2[100]](_0x6caaxf[_0xb5b2[99]]);_0x6caaxf[_0xb5b2[101]]= intUtil[_0xb5b2[100]](_0x6caaxf[_0xb5b2[101]]);def[_0xb5b2[102]]= util[_0xb5b2[50]](_0xb5b2[103],_0x6caaxf[_0xb5b2[99]]);if(_0x6caax32&& _0x6caax32[_0xb5b2[104]]){logger[_0xb5b2[15]](_0xb5b2[105],_0xb5b2[106]);_0x6caaxc[_0xb5b2[107]]= util[_0xb5b2[50]](_0xb5b2[108],_0x6caaxf[_0xb5b2[101]],_0x6caaxc[_0xb5b2[109]],md5(_0x6caaxc[_0xb5b2[109]]))}else {_0x6caaxc[_0xb5b2[107]]= _0xb5b2[66]};return getConnection(_0x6caaxf)[_0xb5b2[62]](function(_0x6caax2d){_0x6caax15= _0x6caax2d;return getUser(_0x6caaxf,_0x6caax1e[_0xb5b2[16]],_0x6caax15)})[_0xb5b2[62]](function(_0x6caax2d){_0x6caax10= _0x6caax2d;logger[_0xb5b2[15]](_0xb5b2[124],_0x6caax10[_0xb5b2[20]]);return getEndUser(_0x6caaxf,_0x6caaxc[_0xb5b2[125]],_0x6caaxc[_0xb5b2[126]],_0x6caax15)})[_0xb5b2[62]](function(_0x6caax2d){_0x6caax11= _0x6caax2d;logger[_0xb5b2[15]](_0xb5b2[123],_0x6caax11[_0xb5b2[20]]);return getTicket(_0x6caaxf,_0x6caax10,_0x6caax11,_0x6caax12,_0x6caaxc,_0x6caax12.Fields,_0x6caax15)})[_0xb5b2[62]](function(_0x6caax2d){_0x6caax2f= _0x6caax2d;logger[_0xb5b2[15]](_0xb5b2[120]);logger[_0xb5b2[15]](_0xb5b2[121],_0x6caax2f[_0xb5b2[20]]);return setRelationship(_0x6caax15,_0x6caax10,_0x6caax2f,_0xb5b2[122])})[_0xb5b2[62]](function(){return setRelationship(_0x6caax15,_0x6caax11,_0x6caax2f,_0xb5b2[119])})[_0xb5b2[62]](function(){return getServerInfo(_0x6caax15)})[_0xb5b2[62]](function(_0x6caax2d){var _0x6caax34=parseInt(_0x6caax2d[_0xb5b2[113]][_0xb5b2[112]](0));var _0x6caax35=util[_0xb5b2[50]](_0xb5b2[114],_0x6caaxf[_0xb5b2[99]],_0x6caax2f[_0xb5b2[20]]);if(_0x6caax34> 6){_0x6caax35= util[_0xb5b2[50]](_0xb5b2[115],_0x6caaxf[_0xb5b2[99]],_0x6caax2f[_0xb5b2[20]])};logger[_0xb5b2[15]](_0xb5b2[105],_0xb5b2[116]);emit(util[_0xb5b2[50]](_0xb5b2[117],_0x6caax1e[_0xb5b2[16]]),_0xb5b2[118],{uri:_0x6caax35})})[_0xb5b2[111]](function(_0x6caax33){logger[_0xb5b2[110]](_0xb5b2[105],JSON[_0xb5b2[45]](_0x6caax33))})};exports[_0xb5b2[127]]= function(_0x6caax31,_0x6caaxc,_0x6caax12,_0x6caax1e,_0x6caax32,_0x6caaxf,_0x6caax36){var _0x6caax10,_0x6caax11,_0x6caax2f,_0x6caax15;_0x6caaxf[_0xb5b2[99]]= intUtil[_0xb5b2[100]](_0x6caaxf[_0xb5b2[99]]);_0x6caaxf[_0xb5b2[101]]= intUtil[_0xb5b2[100]](_0x6caaxf[_0xb5b2[101]]);def[_0xb5b2[102]]= util[_0xb5b2[50]](_0xb5b2[103],_0x6caaxf[_0xb5b2[99]]);if(_0x6caax36&& _0x6caax36[_0xb5b2[128]]&& _0x6caax36[_0xb5b2[128]]!== _0xb5b2[129]){logger[_0xb5b2[15]](_0xb5b2[130],_0xb5b2[106]);_0x6caaxc[_0xb5b2[107]]= util[_0xb5b2[50]](_0xb5b2[108],_0x6caaxf[_0xb5b2[101]],_0x6caaxc[_0xb5b2[109]],md5(_0x6caaxc[_0xb5b2[109]]))};return getConnection(_0x6caaxf)[_0xb5b2[62]](function(_0x6caax2d){_0x6caax15= _0x6caax2d;return getUser(_0x6caaxf,_0x6caax1e[_0xb5b2[16]],_0x6caax15)})[_0xb5b2[62]](function(_0x6caax2d){_0x6caax10= _0x6caax2d;logger[_0xb5b2[15]](_0xb5b2[124],_0x6caax10[_0xb5b2[20]]);return getEndUser(_0x6caaxf,_0x6caaxc[_0xb5b2[131]],_0x6caaxc[_0xb5b2[132]],_0x6caax15)})[_0xb5b2[62]](function(_0x6caax2d){_0x6caax11= _0x6caax2d;logger[_0xb5b2[15]](_0xb5b2[123],_0x6caax11[_0xb5b2[20]]);return getTicket(_0x6caaxf,_0x6caax10,_0x6caax11,_0x6caax12,_0x6caaxc,_0x6caax12.Fields,_0x6caax15)})[_0xb5b2[62]](function(_0x6caax2d){_0x6caax2f= _0x6caax2d;logger[_0xb5b2[15]](_0xb5b2[120]);logger[_0xb5b2[15]](_0xb5b2[121],_0x6caax2f[_0xb5b2[20]]);return setRelationship(_0x6caax15,_0x6caax10,_0x6caax2f,_0xb5b2[122])})[_0xb5b2[62]](function(){return setRelationship(_0x6caax15,_0x6caax11,_0x6caax2f,_0xb5b2[119])})[_0xb5b2[62]](function(){return getServerInfo(_0x6caax15)})[_0xb5b2[62]](function(_0x6caax2d){var _0x6caax34=parseInt(_0x6caax2d[_0xb5b2[113]][_0xb5b2[112]](0));var _0x6caax35=util[_0xb5b2[50]](_0xb5b2[114],_0x6caaxf[_0xb5b2[99]],_0x6caax2f[_0xb5b2[20]]);if(_0x6caax34> 6){_0x6caax35= util[_0xb5b2[50]](_0xb5b2[115],_0x6caaxf[_0xb5b2[99]],_0x6caax2f[_0xb5b2[20]])};logger[_0xb5b2[15]](_0xb5b2[130],_0xb5b2[116]);emit(util[_0xb5b2[50]](_0xb5b2[117],_0x6caax1e[_0xb5b2[16]]),_0xb5b2[118],{uri:_0x6caax35})})[_0xb5b2[111]](function(_0x6caax33){logger[_0xb5b2[110]](_0xb5b2[130],JSON[_0xb5b2[45]](_0x6caax33))})};exports[_0xb5b2[133]]= function(_0x6caax31,_0x6caaxc,_0x6caax12,_0x6caax1e,_0x6caax32,_0x6caaxf){var _0x6caax10,_0x6caax11,_0x6caax2f,_0x6caax15;_0x6caaxf[_0xb5b2[99]]= intUtil[_0xb5b2[100]](_0x6caaxf[_0xb5b2[99]]);_0x6caaxf[_0xb5b2[101]]= intUtil[_0xb5b2[100]](_0x6caaxf[_0xb5b2[101]]);def[_0xb5b2[102]]= util[_0xb5b2[50]](_0xb5b2[103],_0x6caaxf[_0xb5b2[99]]);if(_0x6caax32&& _0x6caax32[_0xb5b2[104]]){logger[_0xb5b2[15]](_0xb5b2[134],_0xb5b2[106]);_0x6caaxc[_0xb5b2[107]]= util[_0xb5b2[50]](_0xb5b2[108],_0x6caaxf[_0xb5b2[101]],_0x6caaxc[_0xb5b2[109]],md5(_0x6caaxc[_0xb5b2[109]]))}else {_0x6caaxc[_0xb5b2[107]]= _0xb5b2[66]};return getConnection(_0x6caaxf)[_0xb5b2[62]](function(_0x6caax2d){_0x6caax15= _0x6caax2d;return getUser(_0x6caaxf,_0x6caax1e[_0xb5b2[16]],_0x6caax15)})[_0xb5b2[62]](function(_0x6caax2d){_0x6caax10= _0x6caax2d;logger[_0xb5b2[15]](_0xb5b2[124],_0x6caax10[_0xb5b2[20]]);return getEndUser(_0x6caaxf,_0x6caaxc[_0xb5b2[125]],_0x6caaxc[_0xb5b2[126]],_0x6caax15)})[_0xb5b2[62]](function(_0x6caax2d){_0x6caax11= _0x6caax2d;logger[_0xb5b2[15]](_0xb5b2[123],_0x6caax11[_0xb5b2[20]]);return getTicket(_0x6caaxf,_0x6caax10,_0x6caax11,_0x6caax12,_0x6caaxc,_0x6caax12.Fields,_0x6caax15)})[_0xb5b2[62]](function(_0x6caax2d){_0x6caax2f= _0x6caax2d;logger[_0xb5b2[15]](_0xb5b2[120]);logger[_0xb5b2[15]](_0xb5b2[121],_0x6caax2f[_0xb5b2[20]]);return setRelationship(_0x6caax15,_0x6caax10,_0x6caax2f,_0xb5b2[122])})[_0xb5b2[62]](function(){return setRelationship(_0x6caax15,_0x6caax11,_0x6caax2f,_0xb5b2[119])})[_0xb5b2[62]](function(){return getServerInfo(_0x6caax15)})[_0xb5b2[111]](function(_0x6caax33){logger[_0xb5b2[110]](_0xb5b2[134],JSON[_0xb5b2[45]](_0x6caax33))})}
\ No newline at end of file
index 0bac3c3..d1d9679 100644 (file)
@@ -1 +1 @@
-var _0x17fb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x67\x65\x74\x53\x74\x72\x69\x6E\x67","\x6C\x65\x6E\x67\x74\x68","\x69\x64","\x73\x6F\x72\x74\x42\x79","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x74\x65\x6E\x74","\x70\x75\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x6E\x61\x6D\x65","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79","\x25\x73\x3A\x20\x25\x73","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x66\x6F\x72\x6D\x61\x74","\x6A\x6F\x69\x6E","\x73\x74\x72\x69\x70\x54\x72\x61\x69\x6C\x69\x6E\x67\x53\x6C\x61\x73\x68","\x73\x75\x62\x73\x74\x72","\x2F"];_0x17fb[0];var _=require(_0x17fb[1]);var util=require(_0x17fb[2]);exports[_0x17fb[3]]= function(_0x4e08x3,_0x4e08x4,_0x4e08x5){var _0x4e08x6=[];if(_0x4e08x3[_0x17fb[4]]> 0){var _0x4e08x7=_[_0x17fb[6]](_0x4e08x3,[_0x17fb[5]]);for(var _0x4e08x8=0;_0x4e08x8< _0x4e08x7[_0x17fb[4]];_0x4e08x8++){var _0x4e08x9=_0x4e08x7[_0x4e08x8];if(_0x4e08x9[_0x17fb[7]]=== _0x17fb[8]){_0x4e08x6[_0x17fb[10]](_0x4e08x9[_0x17fb[9]])}else {if(_0x4e08x9[_0x17fb[7]]=== _0x17fb[11]&& _0x4e08x9[_0x17fb[12]]){_0x4e08x4[_0x4e08x9[_0x17fb[12]]]&& _0x4e08x6[_0x17fb[10]](_0x4e08x4[_0x4e08x9[_0x17fb[12]]].toString())}else {if(_0x4e08x9[_0x17fb[7]]=== _0x17fb[13]&& _0x4e08x9[_0x17fb[14]]&& _0x4e08x9[_0x17fb[14]][_0x17fb[15]]){_0x4e08x4[_0x4e08x9[_0x17fb[14]][_0x17fb[15]][_0x17fb[16]]()]&& _0x4e08x6[_0x17fb[10]](_0x4e08x4[_0x4e08x9[_0x17fb[14]][_0x17fb[15]][_0x17fb[16]]()].toString())}else {if(_0x4e08x9[_0x17fb[7]]=== _0x17fb[17]){if(_0x4e08x9[_0x17fb[18]]=== _0x17fb[8]&& _0x4e08x9[_0x17fb[19]]){_0x4e08x6[_0x17fb[10]](util[_0x17fb[22]](_0x17fb[20],_0x4e08x9[_0x17fb[19]],_0x4e08x9[_0x17fb[21]]))}else {if(_0x4e08x9[_0x17fb[18]]=== _0x17fb[11]&& _0x4e08x9[_0x17fb[12]]&& _0x4e08x9[_0x17fb[19]]){_0x4e08x4[_0x4e08x9[_0x17fb[12]]]&& _0x4e08x6[_0x17fb[10]](util[_0x17fb[22]](_0x17fb[20],_0x4e08x9[_0x17fb[19]],_0x4e08x4[_0x4e08x9[_0x17fb[12]]]))}else {if(_0x4e08x9[_0x17fb[18]]=== _0x17fb[13]&& _0x4e08x9[_0x17fb[14]]&& _0x4e08x9[_0x17fb[14]][_0x17fb[15]]&& _0x4e08x9[_0x17fb[19]]){_0x4e08x4[_0x4e08x9[_0x17fb[14]][_0x17fb[15]][_0x17fb[16]]()]&& _0x4e08x6[_0x17fb[10]](util[_0x17fb[22]](_0x17fb[20],_0x4e08x9[_0x17fb[19]],_0x4e08x4[_0x4e08x9[_0x17fb[14]][_0x17fb[15]][_0x17fb[16]]()]))}}}}}}}}};return _0x4e08x6[_0x17fb[23]](_0x4e08x5)};exports[_0x17fb[24]]= function(_0x4e08xa){if(_0x4e08xa&& _0x4e08xa[_0x17fb[25]](-1) === _0x17fb[26]){return _0x4e08xa[_0x17fb[25]](0,_0x4e08xa[_0x17fb[4]]- 1)};return _0x4e08xa}
\ No newline at end of file
+var _0x146e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x67\x65\x74\x53\x74\x72\x69\x6E\x67","\x6C\x65\x6E\x67\x74\x68","\x69\x64","\x73\x6F\x72\x74\x42\x79","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x74\x65\x6E\x74","\x70\x75\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x6E\x61\x6D\x65","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79","\x25\x73\x3A\x20\x25\x73","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x66\x6F\x72\x6D\x61\x74","\x6A\x6F\x69\x6E","\x73\x74\x72\x69\x70\x54\x72\x61\x69\x6C\x69\x6E\x67\x53\x6C\x61\x73\x68","\x73\x75\x62\x73\x74\x72","\x2F"];_0x146e[0];var _=require(_0x146e[1]);var util=require(_0x146e[2]);exports[_0x146e[3]]= function(_0xe1e5x3,_0xe1e5x4,_0xe1e5x5){var _0xe1e5x6=[];if(_0xe1e5x3[_0x146e[4]]> 0){var _0xe1e5x7=_[_0x146e[6]](_0xe1e5x3,[_0x146e[5]]);for(var _0xe1e5x8=0;_0xe1e5x8< _0xe1e5x7[_0x146e[4]];_0xe1e5x8++){var _0xe1e5x9=_0xe1e5x7[_0xe1e5x8];if(_0xe1e5x9[_0x146e[7]]=== _0x146e[8]){_0xe1e5x6[_0x146e[10]](_0xe1e5x9[_0x146e[9]])}else {if(_0xe1e5x9[_0x146e[7]]=== _0x146e[11]&& _0xe1e5x9[_0x146e[12]]){_0xe1e5x4[_0xe1e5x9[_0x146e[12]]]&& _0xe1e5x6[_0x146e[10]](_0xe1e5x4[_0xe1e5x9[_0x146e[12]]].toString())}else {if(_0xe1e5x9[_0x146e[7]]=== _0x146e[13]&& _0xe1e5x9[_0x146e[14]]&& _0xe1e5x9[_0x146e[14]][_0x146e[15]]){_0xe1e5x4[_0xe1e5x9[_0x146e[14]][_0x146e[15]][_0x146e[16]]()]&& _0xe1e5x6[_0x146e[10]](_0xe1e5x4[_0xe1e5x9[_0x146e[14]][_0x146e[15]][_0x146e[16]]()].toString())}else {if(_0xe1e5x9[_0x146e[7]]=== _0x146e[17]){if(_0xe1e5x9[_0x146e[18]]=== _0x146e[8]&& _0xe1e5x9[_0x146e[19]]){_0xe1e5x6[_0x146e[10]](util[_0x146e[22]](_0x146e[20],_0xe1e5x9[_0x146e[19]],_0xe1e5x9[_0x146e[21]]))}else {if(_0xe1e5x9[_0x146e[18]]=== _0x146e[11]&& _0xe1e5x9[_0x146e[12]]&& _0xe1e5x9[_0x146e[19]]){_0xe1e5x4[_0xe1e5x9[_0x146e[12]]]&& _0xe1e5x6[_0x146e[10]](util[_0x146e[22]](_0x146e[20],_0xe1e5x9[_0x146e[19]],_0xe1e5x4[_0xe1e5x9[_0x146e[12]]]))}else {if(_0xe1e5x9[_0x146e[18]]=== _0x146e[13]&& _0xe1e5x9[_0x146e[14]]&& _0xe1e5x9[_0x146e[14]][_0x146e[15]]&& _0xe1e5x9[_0x146e[19]]){_0xe1e5x4[_0xe1e5x9[_0x146e[14]][_0x146e[15]][_0x146e[16]]()]&& _0xe1e5x6[_0x146e[10]](util[_0x146e[22]](_0x146e[20],_0xe1e5x9[_0x146e[19]],_0xe1e5x4[_0xe1e5x9[_0x146e[14]][_0x146e[15]][_0x146e[16]]()]))}}}}}}}}};return _0xe1e5x6[_0x146e[23]](_0xe1e5x5)};exports[_0x146e[24]]= function(_0xe1e5xa){if(_0xe1e5xa&& _0xe1e5xa[_0x146e[25]](-1) === _0x146e[26]){return _0xe1e5xa[_0x146e[25]](0,_0xe1e5xa[_0x146e[4]]- 1)};return _0xe1e5xa}
\ No newline at end of file
index e79ab38..224dbf0 100644 (file)
@@ -1 +1 @@
-var _0xc282=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x64\x35","\x75\x74\x69\x6C","\x2E\x2F\x75\x74\x69\x6C","\x7A\x65\x6E\x64\x65\x73\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x65\x6D\x69\x74","\x74\x6F","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x6E\x65\x77\x20\x74\x69\x63\x6B\x65\x74\x2E\x2E\x2E","\x69\x6E\x66\x6F","\x54\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x65\x64\x21","\x74\x69\x63\x6B\x65\x74","\x74\x68\x65\x6E","\x25\x73\x2F\x74\x69\x63\x6B\x65\x74\x73\x2E\x6A\x73\x6F\x6E","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x66\x6F\x72\x6D\x61\x74","\x50\x4F\x53\x54","\x69\x64","\x6E\x61\x6D\x65","\x20","\x67\x65\x74\x53\x74\x72\x69\x6E\x67","\x0A","\x6D\x65\x72\x67\x65","\x47\x65\x74\x74\x69\x6E\x67\x20\x61\x67\x65\x6E\x74\x20\x77\x69\x74\x68\x20\x65\x6D\x61\x69\x6C","\x63\x6F\x75\x6E\x74","\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x21","\x72\x65\x73\x75\x6C\x74\x73","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64","\x41\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x75\x73\x69\x6E\x67\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x21","\x41\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x73\x65\x6C\x65\x63\x74\x65\x64\x2E","\x75\x73\x65\x72","\x25\x73\x2F\x75\x73\x65\x72\x73\x2F\x6D\x65\x2E\x6A\x73\x6F\x6E","\x25\x73\x2F\x73\x65\x61\x72\x63\x68\x2E\x6A\x73\x6F\x6E","\x74\x79\x70\x65\x3A\x75\x73\x65\x72\x20\x72\x6F\x6C\x65\x3A\x61\x67\x65\x6E\x74\x20\x65\x6D\x61\x69\x6C\x3A\x25\x73","\x53\x65\x61\x72\x63\x68\x69\x6E\x67\x20\x65\x6E\x64\x75\x73\x65\x72\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65","\x45\x6E\x64\x75\x73\x65\x72\x20\x66\x6F\x75\x6E\x64\x21","\x65\x6E\x64\x2D\x75\x73\x65\x72","\x45\x6E\x64\x75\x73\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x61\x20\x6E\x65\x77\x20\x65\x6E\x64\x75\x73\x65\x72\x21","\x45\x6E\x64\x75\x73\x65\x72\x20\x63\x72\x65\x61\x74\x65\x64\x2E","\x25\x73\x2F\x75\x73\x65\x72\x73\x2E\x6A\x73\x6F\x6E","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x74\x79\x70\x65\x3A\x75\x73\x65\x72\x20\x72\x6F\x6C\x65\x3A\x65\x6E\x64\x2D\x75\x73\x65\x72\x20\x70\x68\x6F\x6E\x65\x3A\x25\x73","\x61\x75\x74\x68\x54\x79\x70\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x25\x73\x3A\x25\x73","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x74\x6F\x6B\x65\x6E","\x25\x73\x2F\x74\x6F\x6B\x65\x6E\x3A\x25\x73","\x42\x61\x73\x69\x63\x20\x25\x73","\x62\x61\x73\x65\x36\x34","\x5B\x48\x54\x54\x50\x5D","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x47\x45\x54","\x64\x65\x66\x61\x75\x6C\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x70","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x63\x6F\x6E\x74\x65\x6E\x74","\x69\x64\x46\x69\x65\x6C\x64","\x70\x75\x73\x68","\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x66\x6F\x72\x45\x61\x63\x68","\x71\x75\x65\x75\x65","\x73\x74\x72\x69\x70\x54\x72\x61\x69\x6C\x69\x6E\x67\x53\x6C\x61\x73\x68","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x51\x55\x45\x55\x45\x5D","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x69\x73\x20\x65\x6E\x61\x62\x6C\x65\x64\x21","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x73\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64\x26\x74\x6F\x6B\x65\x6E\x3D\x25\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x54\x68\x65\x20\x54\x69\x63\x6B\x65\x74\x20\x49\x44\x20\x69\x73\x3A","\x44\x69\x73\x70\x6C\x61\x79\x69\x6E\x67\x20\x74\x69\x63\x6B\x65\x74\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x2E\x2E\x2E","\x25\x73\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x61\x67\x65\x6E\x74\x73\x2F\x25\x64\x2F\x74\x69\x63\x6B\x65\x74\x73\x2F\x25\x64\x2F\x64\x69\x73\x70\x6C\x61\x79\x2E\x6A\x73\x6F\x6E","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x54\x61\x62","\x44\x69\x73\x70\x6C\x61\x79\x69\x6E\x67\x20\x74\x69\x63\x6B\x65\x74\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x69\x6E\x20\x61\x20\x6E\x65\x77\x20\x74\x61\x62\x2E\x2E\x2E","\x75\x73\x65\x72\x3A\x25\x73","\x74\x72\x69\x67\x67\x65\x72\x3A\x62\x72\x6F\x77\x73\x65\x72\x3A\x75\x72\x6C","\x25\x73\x2F\x61\x67\x65\x6E\x74\x2F\x74\x69\x63\x6B\x65\x74\x73\x2F\x25\x73","\x6E\x65\x77\x54\x61\x62","\x5A\x65\x6E\x64\x65\x73\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x74\x79\x70\x65\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x54\x68\x65\x20\x45\x6E\x64\x75\x73\x65\x72\x20\x49\x44\x20\x69\x73\x3A","\x54\x68\x65\x20\x55\x73\x65\x72\x20\x49\x44\x20\x69\x73\x3A","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x65\x6D\x61\x69\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x6E\x6F\x6E\x65","\x5B\x4F\x55\x54\x42\x4F\x55\x4E\x44\x5D","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x5B\x41\x42\x41\x4E\x44\x4F\x4E\x45\x44\x5D"];_0xc282[0];var _=require(_0xc282[1]);var rp=require(_0xc282[2]);var md5=require(_0xc282[3]);var util=require(_0xc282[4]);var intUtil=require(_0xc282[5]);var logger=require(_0xc282[7])(_0xc282[6]);var io=require(_0xc282[9])({host:_0xc282[8],port:6379});function emit(_0xaa78x9,_0xaa78xa,_0xaa78xb){io[_0xc282[11]](_0xaa78x9)[_0xc282[10]](_0xaa78xa,_0xaa78xb)}var headers={"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xc282[12],"\x41\x63\x63\x65\x70\x74":_0xc282[12]};function getTicket(_0xaa78xe,_0xaa78xf,_0xaa78x10,_0xaa78x11,_0xaa78x12){logger[_0xc282[14]](_0xc282[13]);return request({uri:util[_0xc282[20]](_0xc282[18],_0xaa78xe[_0xc282[19]]),method:_0xc282[21],body:{ticket:_[_0xc282[27]]({requester_id:_0xaa78x10[_0xc282[22]],submitter_id:_0xaa78xf?_0xaa78xf[_0xc282[22]]:undefined,assignee_id:_0xaa78xf?_0xaa78xf[_0xc282[22]]:undefined,tags:getTags(_0xaa78x11.Tags,_0xc282[23]),subject:intUtil[_0xc282[25]](_0xaa78x11.Subjects,_0xaa78x12,_0xc282[24]),description:intUtil[_0xc282[25]](_0xaa78x11.Descriptions,_0xaa78x12,_0xc282[26]),comment:{public:false,body:intUtil[_0xc282[25]](_0xaa78x11.Descriptions,_0xaa78x12,_0xc282[26])}},getCustomFields(_0xaa78x11.Fields,_0xaa78x12))}})[_0xc282[17]](function(_0xaa78x13){logger[_0xc282[14]](_0xc282[15]);return _0xaa78x13[_0xc282[16]]})}function getUser(_0xaa78xe,_0xaa78x15){logger[_0xc282[14]](_0xc282[28],_0xaa78x15);return request({uri:util[_0xc282[20]](_0xc282[38],_0xaa78xe[_0xc282[19]]),qs:{query:util[_0xc282[20]](_0xc282[39],_0xaa78x15)}})[_0xc282[17]](function(_0xaa78x13){if(_0xaa78x13[_0xc282[29]]){logger[_0xc282[14]](_0xc282[30]);return _[_0xc282[33]](_0xaa78x13[_0xc282[31]],{email:_0xaa78x15,role:_0xc282[32]})}else {logger[_0xc282[14]](_0xc282[34]);return request({uri:util[_0xc282[20]](_0xc282[37],_0xaa78xe[_0xc282[19]])})[_0xc282[17]](function(_0xaa78x13){logger[_0xc282[14]](_0xc282[35]);return _0xaa78x13[_0xc282[36]]})}})}function getEndUser(_0xaa78xe,_0xaa78x17,_0xaa78x18){logger[_0xc282[14]](_0xc282[40],_0xaa78x18);return request({uri:util[_0xc282[20]](_0xc282[38],_0xaa78xe[_0xc282[19]]),qs:{query:util[_0xc282[20]](_0xc282[47],_0xaa78x18)}})[_0xc282[17]](function(_0xaa78x13){if(_0xaa78x13[_0xc282[29]]){logger[_0xc282[14]](_0xc282[41]);return _[_0xc282[33]](_0xaa78x13[_0xc282[31]],{phone:_0xaa78x18,role:_0xc282[42]})}else {logger[_0xc282[14]](_0xc282[43]);return request({uri:util[_0xc282[20]](_0xc282[45],_0xaa78xe[_0xc282[19]]),method:_0xc282[21],body:{user:{role:_0xc282[42],name:util[_0xc282[20]](_0xc282[46],_0xaa78x17|| _0xaa78x18),phone:_0xaa78x18}}})[_0xc282[17]](function(_0xaa78x13){logger[_0xc282[14]](_0xc282[44]);return _0xaa78x13[_0xc282[36]]})}})}function getAuth(_0xaa78xe){var _0xaa78x1a;if(_0xaa78xe[_0xc282[48]]=== _0xc282[49]){_0xaa78x1a= util[_0xc282[20]](_0xc282[50],_0xaa78xe[_0xc282[51]],_0xaa78xe[_0xc282[49]])}else {if(_0xaa78xe[_0xc282[48]]=== _0xc282[52]){_0xaa78x1a= util[_0xc282[20]](_0xc282[53],_0xaa78xe[_0xc282[51]],_0xaa78xe[_0xc282[52]])}};return util[_0xc282[20]](_0xc282[54], new Buffer(_0xaa78x1a).toString(_0xc282[55]))}function request(_0xaa78x1c){logger[_0xc282[58]](_0xc282[56],JSON[_0xc282[57]](_0xaa78x1c));return rp(_[_0xc282[60]](_0xaa78x1c,{method:_0xc282[59],headers:headers,json:true}))}function getTags(_0xaa78x1e,_0xaa78x1f){var _0xaa78x20=[];if(_0xaa78x1e&& _0xaa78x1e[_0xc282[61]]> 0){_0xaa78x20= _[_0xc282[62]](_0xaa78x1e,_0xaa78x1f)};return _0xaa78x20}function getCustomFields(_0xaa78x22,_0xaa78x12){var _0xaa78x23=[];var _0xaa78x24={custom_fields:[]};if(_0xaa78x22[_0xc282[61]]> 0){_[_0xc282[76]](_0xaa78x22,function(_0xaa78x25){if(_0xaa78x25[_0xc282[63]]=== _0xc282[64]&& _0xaa78x25[_0xc282[65]]&&  !_0xaa78x25[_0xc282[66]]){_0xaa78x24[_0xaa78x25[_0xc282[65]][_0xc282[67]]()]= _0xaa78x25[_0xc282[68]].toString()}else {if(_0xaa78x25[_0xc282[63]]=== _0xc282[64]&& _0xaa78x25[_0xc282[69]]&& _0xaa78x25[_0xc282[66]]){_0xaa78x24[_0xc282[71]][_0xc282[70]]({id:_0xaa78x25[_0xc282[69]],value:_0xaa78x25[_0xc282[68]].toString()})}else {if(_0xaa78x25[_0xc282[63]]=== _0xc282[72]&& _0xaa78x25[_0xc282[73]]&& _0xaa78x25[_0xc282[69]]&& _0xaa78x25[_0xc282[66]]){_0xaa78x12[_0xaa78x25[_0xc282[73]]]&& _0xaa78x24[_0xc282[71]][_0xc282[70]]({id:_0xaa78x25[_0xc282[69]],value:_0xaa78x12[_0xaa78x25[_0xc282[73]]].toString()})}else {if(_0xaa78x25[_0xc282[63]]=== _0xc282[74]&& _0xaa78x25[_0xc282[75]]&& _0xaa78x25[_0xc282[75]][_0xc282[23]]&& _0xaa78x25[_0xc282[69]]&& _0xaa78x25[_0xc282[66]]){_0xaa78x12[_0xaa78x25[_0xc282[75]][_0xc282[23]][_0xc282[67]]()]&& _0xaa78x24[_0xc282[71]][_0xc282[70]]({id:_0xaa78x25[_0xc282[69]],value:_0xaa78x12[_0xaa78x25[_0xc282[75]][_0xc282[23]][_0xc282[67]]()].toString()})}}}}})};return _0xaa78x24}exports[_0xc282[77]]= function(_0xaa78x26,_0xaa78xa,_0xaa78x11,_0xaa78x27,_0xaa78x28,_0xaa78xe){var _0xaa78xf,_0xaa78x10;_0xaa78xe[_0xc282[19]]= intUtil[_0xc282[78]](_0xaa78xe[_0xc282[19]]);_0xaa78xe[_0xc282[79]]= intUtil[_0xc282[78]](_0xaa78xe[_0xc282[79]]);if(_0xaa78x28&& _0xaa78x28[_0xc282[80]]){logger[_0xc282[14]](_0xc282[81],_0xc282[82]);_0xaa78xa[_0xc282[83]]= util[_0xc282[20]](_0xc282[84],_0xaa78xe[_0xc282[79]],_0xaa78xa[_0xc282[85]],md5(_0xaa78xa[_0xc282[85]]))}else {_0xaa78xa[_0xc282[83]]= _0xc282[86]};headers[_0xc282[87]]= getAuth(_0xaa78xe);return getUser(_0xaa78xe,_0xaa78x27[_0xc282[104]])[_0xc282[17]](function(_0xaa78x2b){_0xaa78xf= _0xaa78x2b;logger[_0xc282[14]](_0xc282[101],_0xaa78xf[_0xc282[22]]);return getEndUser(_0xaa78xe,_0xaa78xa[_0xc282[102]],_0xaa78xa[_0xc282[103]])})[_0xc282[17]](function(_0xaa78x2b){_0xaa78x10= _0xaa78x2b;logger[_0xc282[14]](_0xc282[100],_0xaa78x10[_0xc282[22]]);return getTicket(_0xaa78xe,_0xaa78xf,_0xaa78x10,_0xaa78x11,_0xaa78xa)})[_0xc282[17]](function(_0xaa78x2a){if(_0xaa78x2a){logger[_0xc282[14]](_0xc282[90],_0xaa78x2a[_0xc282[22]]);switch(_0xaa78xe[_0xc282[63]]){case _0xc282[93]:logger[_0xc282[14]](_0xc282[81],_0xc282[91]);return request({uri:util[_0xc282[20]](_0xc282[92],_0xaa78xe[_0xc282[19]],_0xaa78xf[_0xc282[22]],_0xaa78x2a[_0xc282[22]]),method:_0xc282[21]});case _0xc282[98]:logger[_0xc282[14]](_0xc282[81],_0xc282[94]);emit(util[_0xc282[20]](_0xc282[95],_0xaa78x27[_0xc282[23]]),_0xc282[96],{uri:util[_0xc282[20]](_0xc282[97],_0xaa78xe[_0xc282[19]],_0xaa78x2a[_0xc282[22]])});break;default:logger[_0xc282[88]](_0xc282[81],_0xc282[99])}}})[_0xc282[89]](function(_0xaa78x29){logger[_0xc282[88]](_0xc282[81],JSON[_0xc282[57]](_0xaa78x29))})};exports[_0xc282[105]]= function(_0xaa78x26,_0xaa78xa,_0xaa78x11,_0xaa78x27,_0xaa78x28,_0xaa78xe,_0xaa78x2c){var _0xaa78xf,_0xaa78x10;_0xaa78xe[_0xc282[19]]= intUtil[_0xc282[78]](_0xaa78xe[_0xc282[19]]);_0xaa78xe[_0xc282[79]]= intUtil[_0xc282[78]](_0xaa78xe[_0xc282[79]]);if(_0xaa78x2c&& _0xaa78x2c[_0xc282[106]]&& _0xaa78x2c[_0xc282[106]]!== _0xc282[107]){logger[_0xc282[14]](_0xc282[108],_0xc282[82]);_0xaa78xa[_0xc282[83]]= util[_0xc282[20]](_0xc282[84],_0xaa78xe[_0xc282[79]],_0xaa78xa[_0xc282[85]],md5(_0xaa78xa[_0xc282[85]]))};headers[_0xc282[87]]= getAuth(_0xaa78xe);return getUser(_0xaa78xe,_0xaa78x27[_0xc282[104]])[_0xc282[17]](function(_0xaa78x2b){_0xaa78xf= _0xaa78x2b;logger[_0xc282[14]](_0xc282[101],_0xaa78xf[_0xc282[22]]);return getEndUser(_0xaa78xe,_0xaa78xa[_0xc282[109]],_0xaa78xa[_0xc282[110]])})[_0xc282[17]](function(_0xaa78x2b){_0xaa78x10= _0xaa78x2b;logger[_0xc282[14]](_0xc282[100],_0xaa78x10[_0xc282[22]]);return getTicket(_0xaa78xe,_0xaa78xf,_0xaa78x10,_0xaa78x11,_0xaa78xa)})[_0xc282[17]](function(_0xaa78x2a){if(_0xaa78x2a){logger[_0xc282[14]](_0xc282[90],_0xaa78x2a[_0xc282[22]]);switch(_0xaa78xe[_0xc282[63]]){case _0xc282[93]:logger[_0xc282[14]](_0xc282[108],_0xc282[91]);return request({uri:util[_0xc282[20]](_0xc282[92],_0xaa78xe[_0xc282[19]],_0xaa78xf[_0xc282[22]],_0xaa78x2a[_0xc282[22]]),method:_0xc282[21]});case _0xc282[98]:logger[_0xc282[14]](_0xc282[108],_0xc282[94]);emit(util[_0xc282[20]](_0xc282[95],_0xaa78x27[_0xc282[23]]),_0xc282[96],{uri:util[_0xc282[20]](_0xc282[97],_0xaa78xe[_0xc282[19]],_0xaa78x2a[_0xc282[22]])});break;default:logger[_0xc282[88]](_0xc282[108],_0xc282[99])}}})[_0xc282[89]](function(_0xaa78x29){logger[_0xc282[88]](_0xc282[108],JSON[_0xc282[57]](_0xaa78x29))})};exports[_0xc282[111]]= function(_0xaa78x26,_0xaa78xa,_0xaa78x11,_0xaa78x27,_0xaa78x28,_0xaa78xe){var _0xaa78xf,_0xaa78x10;_0xaa78xe[_0xc282[19]]= intUtil[_0xc282[78]](_0xaa78xe[_0xc282[19]]);_0xaa78xe[_0xc282[79]]= intUtil[_0xc282[78]](_0xaa78xe[_0xc282[79]]);if(_0xaa78x28&& _0xaa78x28[_0xc282[80]]){logger[_0xc282[14]](_0xc282[112],_0xc282[82]);_0xaa78xa[_0xc282[83]]= util[_0xc282[20]](_0xc282[84],_0xaa78xe[_0xc282[79]],_0xaa78xa[_0xc282[85]],md5(_0xaa78xa[_0xc282[85]]))}else {_0xaa78xa[_0xc282[83]]= _0xc282[86]};headers[_0xc282[87]]= getAuth(_0xaa78xe);return getUser(_0xaa78xe)[_0xc282[17]](function(_0xaa78x2b){_0xaa78xf= _0xaa78x2b;logger[_0xc282[14]](_0xc282[101],_0xaa78xf[_0xc282[22]]);return getEndUser(_0xaa78xe,_0xaa78xa[_0xc282[102]],_0xaa78xa[_0xc282[103]])})[_0xc282[17]](function(_0xaa78x2b){_0xaa78x10= _0xaa78x2b;logger[_0xc282[14]](_0xc282[100],_0xaa78x10[_0xc282[22]]);return getTicket(_0xaa78xe,_0xaa78xf,_0xaa78x10,_0xaa78x11,_0xaa78xa)})[_0xc282[17]](function(_0xaa78x2a){if(_0xaa78x2a){logger[_0xc282[14]](_0xc282[90],_0xaa78x2a[_0xc282[22]])}})[_0xc282[89]](function(_0xaa78x29){logger[_0xc282[88]](_0xc282[112],JSON[_0xc282[57]](_0xaa78x29))})}
\ No newline at end of file
+var _0xabd7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x64\x35","\x75\x74\x69\x6C","\x2E\x2F\x75\x74\x69\x6C","\x7A\x65\x6E\x64\x65\x73\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x65\x6D\x69\x74","\x74\x6F","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x6E\x65\x77\x20\x74\x69\x63\x6B\x65\x74\x2E\x2E\x2E","\x69\x6E\x66\x6F","\x54\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x65\x64\x21","\x74\x69\x63\x6B\x65\x74","\x74\x68\x65\x6E","\x25\x73\x2F\x74\x69\x63\x6B\x65\x74\x73\x2E\x6A\x73\x6F\x6E","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x66\x6F\x72\x6D\x61\x74","\x50\x4F\x53\x54","\x69\x64","\x6E\x61\x6D\x65","\x20","\x67\x65\x74\x53\x74\x72\x69\x6E\x67","\x0A","\x6D\x65\x72\x67\x65","\x47\x65\x74\x74\x69\x6E\x67\x20\x61\x67\x65\x6E\x74\x20\x77\x69\x74\x68\x20\x65\x6D\x61\x69\x6C","\x63\x6F\x75\x6E\x74","\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x21","\x72\x65\x73\x75\x6C\x74\x73","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64","\x41\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x75\x73\x69\x6E\x67\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x21","\x41\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x73\x65\x6C\x65\x63\x74\x65\x64\x2E","\x75\x73\x65\x72","\x25\x73\x2F\x75\x73\x65\x72\x73\x2F\x6D\x65\x2E\x6A\x73\x6F\x6E","\x25\x73\x2F\x73\x65\x61\x72\x63\x68\x2E\x6A\x73\x6F\x6E","\x74\x79\x70\x65\x3A\x75\x73\x65\x72\x20\x72\x6F\x6C\x65\x3A\x61\x67\x65\x6E\x74\x20\x65\x6D\x61\x69\x6C\x3A\x25\x73","\x53\x65\x61\x72\x63\x68\x69\x6E\x67\x20\x65\x6E\x64\x75\x73\x65\x72\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65","\x45\x6E\x64\x75\x73\x65\x72\x20\x66\x6F\x75\x6E\x64\x21","\x65\x6E\x64\x2D\x75\x73\x65\x72","\x45\x6E\x64\x75\x73\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x61\x20\x6E\x65\x77\x20\x65\x6E\x64\x75\x73\x65\x72\x21","\x45\x6E\x64\x75\x73\x65\x72\x20\x63\x72\x65\x61\x74\x65\x64\x2E","\x25\x73\x2F\x75\x73\x65\x72\x73\x2E\x6A\x73\x6F\x6E","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x74\x79\x70\x65\x3A\x75\x73\x65\x72\x20\x72\x6F\x6C\x65\x3A\x65\x6E\x64\x2D\x75\x73\x65\x72\x20\x70\x68\x6F\x6E\x65\x3A\x25\x73","\x61\x75\x74\x68\x54\x79\x70\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x25\x73\x3A\x25\x73","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x74\x6F\x6B\x65\x6E","\x25\x73\x2F\x74\x6F\x6B\x65\x6E\x3A\x25\x73","\x42\x61\x73\x69\x63\x20\x25\x73","\x62\x61\x73\x65\x36\x34","\x5B\x48\x54\x54\x50\x5D","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x64\x65\x62\x75\x67","\x47\x45\x54","\x64\x65\x66\x61\x75\x6C\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x70","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x63\x6F\x6E\x74\x65\x6E\x74","\x69\x64\x46\x69\x65\x6C\x64","\x70\x75\x73\x68","\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x66\x6F\x72\x45\x61\x63\x68","\x71\x75\x65\x75\x65","\x73\x74\x72\x69\x70\x54\x72\x61\x69\x6C\x69\x6E\x67\x53\x6C\x61\x73\x68","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x51\x55\x45\x55\x45\x5D","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x69\x73\x20\x65\x6E\x61\x62\x6C\x65\x64\x21","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x73\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64\x26\x74\x6F\x6B\x65\x6E\x3D\x25\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x54\x68\x65\x20\x54\x69\x63\x6B\x65\x74\x20\x49\x44\x20\x69\x73\x3A","\x44\x69\x73\x70\x6C\x61\x79\x69\x6E\x67\x20\x74\x69\x63\x6B\x65\x74\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x2E\x2E\x2E","\x25\x73\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x61\x67\x65\x6E\x74\x73\x2F\x25\x64\x2F\x74\x69\x63\x6B\x65\x74\x73\x2F\x25\x64\x2F\x64\x69\x73\x70\x6C\x61\x79\x2E\x6A\x73\x6F\x6E","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x54\x61\x62","\x44\x69\x73\x70\x6C\x61\x79\x69\x6E\x67\x20\x74\x69\x63\x6B\x65\x74\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x69\x6E\x20\x61\x20\x6E\x65\x77\x20\x74\x61\x62\x2E\x2E\x2E","\x75\x73\x65\x72\x3A\x25\x73","\x74\x72\x69\x67\x67\x65\x72\x3A\x62\x72\x6F\x77\x73\x65\x72\x3A\x75\x72\x6C","\x25\x73\x2F\x61\x67\x65\x6E\x74\x2F\x74\x69\x63\x6B\x65\x74\x73\x2F\x25\x73","\x6E\x65\x77\x54\x61\x62","\x5A\x65\x6E\x64\x65\x73\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x74\x79\x70\x65\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x54\x68\x65\x20\x45\x6E\x64\x75\x73\x65\x72\x20\x49\x44\x20\x69\x73\x3A","\x54\x68\x65\x20\x55\x73\x65\x72\x20\x49\x44\x20\x69\x73\x3A","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x65\x6D\x61\x69\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x6E\x6F\x6E\x65","\x5B\x4F\x55\x54\x42\x4F\x55\x4E\x44\x5D","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x5B\x41\x42\x41\x4E\x44\x4F\x4E\x45\x44\x5D"];_0xabd7[0];var _=require(_0xabd7[1]);var rp=require(_0xabd7[2]);var md5=require(_0xabd7[3]);var util=require(_0xabd7[4]);var intUtil=require(_0xabd7[5]);var logger=require(_0xabd7[7])(_0xabd7[6]);var io=require(_0xabd7[9])({host:_0xabd7[8],port:6379});function emit(_0xbbf1x9,_0xbbf1xa,_0xbbf1xb){io[_0xabd7[11]](_0xbbf1x9)[_0xabd7[10]](_0xbbf1xa,_0xbbf1xb)}var headers={"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xabd7[12],"\x41\x63\x63\x65\x70\x74":_0xabd7[12]};function getTicket(_0xbbf1xe,_0xbbf1xf,_0xbbf1x10,_0xbbf1x11,_0xbbf1x12){logger[_0xabd7[14]](_0xabd7[13]);return request({uri:util[_0xabd7[20]](_0xabd7[18],_0xbbf1xe[_0xabd7[19]]),method:_0xabd7[21],body:{ticket:_[_0xabd7[27]]({requester_id:_0xbbf1x10[_0xabd7[22]],submitter_id:_0xbbf1xf?_0xbbf1xf[_0xabd7[22]]:undefined,assignee_id:_0xbbf1xf?_0xbbf1xf[_0xabd7[22]]:undefined,tags:getTags(_0xbbf1x11.Tags,_0xabd7[23]),subject:intUtil[_0xabd7[25]](_0xbbf1x11.Subjects,_0xbbf1x12,_0xabd7[24]),description:intUtil[_0xabd7[25]](_0xbbf1x11.Descriptions,_0xbbf1x12,_0xabd7[26]),comment:{public:false,body:intUtil[_0xabd7[25]](_0xbbf1x11.Descriptions,_0xbbf1x12,_0xabd7[26])}},getCustomFields(_0xbbf1x11.Fields,_0xbbf1x12))}})[_0xabd7[17]](function(_0xbbf1x13){logger[_0xabd7[14]](_0xabd7[15]);return _0xbbf1x13[_0xabd7[16]]})}function getUser(_0xbbf1xe,_0xbbf1x15){logger[_0xabd7[14]](_0xabd7[28],_0xbbf1x15);return request({uri:util[_0xabd7[20]](_0xabd7[38],_0xbbf1xe[_0xabd7[19]]),qs:{query:util[_0xabd7[20]](_0xabd7[39],_0xbbf1x15)}})[_0xabd7[17]](function(_0xbbf1x13){if(_0xbbf1x13[_0xabd7[29]]){logger[_0xabd7[14]](_0xabd7[30]);return _[_0xabd7[33]](_0xbbf1x13[_0xabd7[31]],{email:_0xbbf1x15,role:_0xabd7[32]})}else {logger[_0xabd7[14]](_0xabd7[34]);return request({uri:util[_0xabd7[20]](_0xabd7[37],_0xbbf1xe[_0xabd7[19]])})[_0xabd7[17]](function(_0xbbf1x13){logger[_0xabd7[14]](_0xabd7[35]);return _0xbbf1x13[_0xabd7[36]]})}})}function getEndUser(_0xbbf1xe,_0xbbf1x17,_0xbbf1x18){logger[_0xabd7[14]](_0xabd7[40],_0xbbf1x18);return request({uri:util[_0xabd7[20]](_0xabd7[38],_0xbbf1xe[_0xabd7[19]]),qs:{query:util[_0xabd7[20]](_0xabd7[47],_0xbbf1x18)}})[_0xabd7[17]](function(_0xbbf1x13){if(_0xbbf1x13[_0xabd7[29]]){logger[_0xabd7[14]](_0xabd7[41]);return _[_0xabd7[33]](_0xbbf1x13[_0xabd7[31]],{phone:_0xbbf1x18,role:_0xabd7[42]})}else {logger[_0xabd7[14]](_0xabd7[43]);return request({uri:util[_0xabd7[20]](_0xabd7[45],_0xbbf1xe[_0xabd7[19]]),method:_0xabd7[21],body:{user:{role:_0xabd7[42],name:util[_0xabd7[20]](_0xabd7[46],_0xbbf1x17|| _0xbbf1x18),phone:_0xbbf1x18}}})[_0xabd7[17]](function(_0xbbf1x13){logger[_0xabd7[14]](_0xabd7[44]);return _0xbbf1x13[_0xabd7[36]]})}})}function getAuth(_0xbbf1xe){var _0xbbf1x1a;if(_0xbbf1xe[_0xabd7[48]]=== _0xabd7[49]){_0xbbf1x1a= util[_0xabd7[20]](_0xabd7[50],_0xbbf1xe[_0xabd7[51]],_0xbbf1xe[_0xabd7[49]])}else {if(_0xbbf1xe[_0xabd7[48]]=== _0xabd7[52]){_0xbbf1x1a= util[_0xabd7[20]](_0xabd7[53],_0xbbf1xe[_0xabd7[51]],_0xbbf1xe[_0xabd7[52]])}};return util[_0xabd7[20]](_0xabd7[54], new Buffer(_0xbbf1x1a).toString(_0xabd7[55]))}function request(_0xbbf1x1c){logger[_0xabd7[58]](_0xabd7[56],JSON[_0xabd7[57]](_0xbbf1x1c));return rp(_[_0xabd7[60]](_0xbbf1x1c,{method:_0xabd7[59],headers:headers,json:true}))}function getTags(_0xbbf1x1e,_0xbbf1x1f){var _0xbbf1x20=[];if(_0xbbf1x1e&& _0xbbf1x1e[_0xabd7[61]]> 0){_0xbbf1x20= _[_0xabd7[62]](_0xbbf1x1e,_0xbbf1x1f)};return _0xbbf1x20}function getCustomFields(_0xbbf1x22,_0xbbf1x12){var _0xbbf1x23=[];var _0xbbf1x24={custom_fields:[]};if(_0xbbf1x22[_0xabd7[61]]> 0){_[_0xabd7[76]](_0xbbf1x22,function(_0xbbf1x25){if(_0xbbf1x25[_0xabd7[63]]=== _0xabd7[64]&& _0xbbf1x25[_0xabd7[65]]&&  !_0xbbf1x25[_0xabd7[66]]){_0xbbf1x24[_0xbbf1x25[_0xabd7[65]][_0xabd7[67]]()]= _0xbbf1x25[_0xabd7[68]].toString()}else {if(_0xbbf1x25[_0xabd7[63]]=== _0xabd7[64]&& _0xbbf1x25[_0xabd7[69]]&& _0xbbf1x25[_0xabd7[66]]){_0xbbf1x24[_0xabd7[71]][_0xabd7[70]]({id:_0xbbf1x25[_0xabd7[69]],value:_0xbbf1x25[_0xabd7[68]].toString()})}else {if(_0xbbf1x25[_0xabd7[63]]=== _0xabd7[72]&& _0xbbf1x25[_0xabd7[73]]&& _0xbbf1x25[_0xabd7[69]]&& _0xbbf1x25[_0xabd7[66]]){_0xbbf1x12[_0xbbf1x25[_0xabd7[73]]]&& _0xbbf1x24[_0xabd7[71]][_0xabd7[70]]({id:_0xbbf1x25[_0xabd7[69]],value:_0xbbf1x12[_0xbbf1x25[_0xabd7[73]]].toString()})}else {if(_0xbbf1x25[_0xabd7[63]]=== _0xabd7[74]&& _0xbbf1x25[_0xabd7[75]]&& _0xbbf1x25[_0xabd7[75]][_0xabd7[23]]&& _0xbbf1x25[_0xabd7[69]]&& _0xbbf1x25[_0xabd7[66]]){_0xbbf1x12[_0xbbf1x25[_0xabd7[75]][_0xabd7[23]][_0xabd7[67]]()]&& _0xbbf1x24[_0xabd7[71]][_0xabd7[70]]({id:_0xbbf1x25[_0xabd7[69]],value:_0xbbf1x12[_0xbbf1x25[_0xabd7[75]][_0xabd7[23]][_0xabd7[67]]()].toString()})}}}}})};return _0xbbf1x24}exports[_0xabd7[77]]= function(_0xbbf1x26,_0xbbf1xa,_0xbbf1x11,_0xbbf1x27,_0xbbf1x28,_0xbbf1xe){var _0xbbf1xf,_0xbbf1x10;_0xbbf1xe[_0xabd7[19]]= intUtil[_0xabd7[78]](_0xbbf1xe[_0xabd7[19]]);_0xbbf1xe[_0xabd7[79]]= intUtil[_0xabd7[78]](_0xbbf1xe[_0xabd7[79]]);if(_0xbbf1x28&& _0xbbf1x28[_0xabd7[80]]){logger[_0xabd7[14]](_0xabd7[81],_0xabd7[82]);_0xbbf1xa[_0xabd7[83]]= util[_0xabd7[20]](_0xabd7[84],_0xbbf1xe[_0xabd7[79]],_0xbbf1xa[_0xabd7[85]],md5(_0xbbf1xa[_0xabd7[85]]))}else {_0xbbf1xa[_0xabd7[83]]= _0xabd7[86]};headers[_0xabd7[87]]= getAuth(_0xbbf1xe);return getUser(_0xbbf1xe,_0xbbf1x27[_0xabd7[104]])[_0xabd7[17]](function(_0xbbf1x2b){_0xbbf1xf= _0xbbf1x2b;logger[_0xabd7[14]](_0xabd7[101],_0xbbf1xf[_0xabd7[22]]);return getEndUser(_0xbbf1xe,_0xbbf1xa[_0xabd7[102]],_0xbbf1xa[_0xabd7[103]])})[_0xabd7[17]](function(_0xbbf1x2b){_0xbbf1x10= _0xbbf1x2b;logger[_0xabd7[14]](_0xabd7[100],_0xbbf1x10[_0xabd7[22]]);return getTicket(_0xbbf1xe,_0xbbf1xf,_0xbbf1x10,_0xbbf1x11,_0xbbf1xa)})[_0xabd7[17]](function(_0xbbf1x2a){if(_0xbbf1x2a){logger[_0xabd7[14]](_0xabd7[90],_0xbbf1x2a[_0xabd7[22]]);switch(_0xbbf1xe[_0xabd7[63]]){case _0xabd7[93]:logger[_0xabd7[14]](_0xabd7[81],_0xabd7[91]);return request({uri:util[_0xabd7[20]](_0xabd7[92],_0xbbf1xe[_0xabd7[19]],_0xbbf1xf[_0xabd7[22]],_0xbbf1x2a[_0xabd7[22]]),method:_0xabd7[21]});case _0xabd7[98]:logger[_0xabd7[14]](_0xabd7[81],_0xabd7[94]);emit(util[_0xabd7[20]](_0xabd7[95],_0xbbf1x27[_0xabd7[23]]),_0xabd7[96],{uri:util[_0xabd7[20]](_0xabd7[97],_0xbbf1xe[_0xabd7[19]],_0xbbf1x2a[_0xabd7[22]])});break;default:logger[_0xabd7[88]](_0xabd7[81],_0xabd7[99])}}})[_0xabd7[89]](function(_0xbbf1x29){logger[_0xabd7[88]](_0xabd7[81],JSON[_0xabd7[57]](_0xbbf1x29))})};exports[_0xabd7[105]]= function(_0xbbf1x26,_0xbbf1xa,_0xbbf1x11,_0xbbf1x27,_0xbbf1x28,_0xbbf1xe,_0xbbf1x2c){var _0xbbf1xf,_0xbbf1x10;_0xbbf1xe[_0xabd7[19]]= intUtil[_0xabd7[78]](_0xbbf1xe[_0xabd7[19]]);_0xbbf1xe[_0xabd7[79]]= intUtil[_0xabd7[78]](_0xbbf1xe[_0xabd7[79]]);if(_0xbbf1x2c&& _0xbbf1x2c[_0xabd7[106]]&& _0xbbf1x2c[_0xabd7[106]]!== _0xabd7[107]){logger[_0xabd7[14]](_0xabd7[108],_0xabd7[82]);_0xbbf1xa[_0xabd7[83]]= util[_0xabd7[20]](_0xabd7[84],_0xbbf1xe[_0xabd7[79]],_0xbbf1xa[_0xabd7[85]],md5(_0xbbf1xa[_0xabd7[85]]))};headers[_0xabd7[87]]= getAuth(_0xbbf1xe);return getUser(_0xbbf1xe,_0xbbf1x27[_0xabd7[104]])[_0xabd7[17]](function(_0xbbf1x2b){_0xbbf1xf= _0xbbf1x2b;logger[_0xabd7[14]](_0xabd7[101],_0xbbf1xf[_0xabd7[22]]);return getEndUser(_0xbbf1xe,_0xbbf1xa[_0xabd7[109]],_0xbbf1xa[_0xabd7[110]])})[_0xabd7[17]](function(_0xbbf1x2b){_0xbbf1x10= _0xbbf1x2b;logger[_0xabd7[14]](_0xabd7[100],_0xbbf1x10[_0xabd7[22]]);return getTicket(_0xbbf1xe,_0xbbf1xf,_0xbbf1x10,_0xbbf1x11,_0xbbf1xa)})[_0xabd7[17]](function(_0xbbf1x2a){if(_0xbbf1x2a){logger[_0xabd7[14]](_0xabd7[90],_0xbbf1x2a[_0xabd7[22]]);switch(_0xbbf1xe[_0xabd7[63]]){case _0xabd7[93]:logger[_0xabd7[14]](_0xabd7[108],_0xabd7[91]);return request({uri:util[_0xabd7[20]](_0xabd7[92],_0xbbf1xe[_0xabd7[19]],_0xbbf1xf[_0xabd7[22]],_0xbbf1x2a[_0xabd7[22]]),method:_0xabd7[21]});case _0xabd7[98]:logger[_0xabd7[14]](_0xabd7[108],_0xabd7[94]);emit(util[_0xabd7[20]](_0xabd7[95],_0xbbf1x27[_0xabd7[23]]),_0xabd7[96],{uri:util[_0xabd7[20]](_0xabd7[97],_0xbbf1xe[_0xabd7[19]],_0xbbf1x2a[_0xabd7[22]])});break;default:logger[_0xabd7[88]](_0xabd7[108],_0xabd7[99])}}})[_0xabd7[89]](function(_0xbbf1x29){logger[_0xabd7[88]](_0xabd7[108],JSON[_0xabd7[57]](_0xbbf1x29))})};exports[_0xabd7[111]]= function(_0xbbf1x26,_0xbbf1xa,_0xbbf1x11,_0xbbf1x27,_0xbbf1x28,_0xbbf1xe){var _0xbbf1xf,_0xbbf1x10;_0xbbf1xe[_0xabd7[19]]= intUtil[_0xabd7[78]](_0xbbf1xe[_0xabd7[19]]);_0xbbf1xe[_0xabd7[79]]= intUtil[_0xabd7[78]](_0xbbf1xe[_0xabd7[79]]);if(_0xbbf1x28&& _0xbbf1x28[_0xabd7[80]]){logger[_0xabd7[14]](_0xabd7[112],_0xabd7[82]);_0xbbf1xa[_0xabd7[83]]= util[_0xabd7[20]](_0xabd7[84],_0xbbf1xe[_0xabd7[79]],_0xbbf1xa[_0xabd7[85]],md5(_0xbbf1xa[_0xabd7[85]]))}else {_0xbbf1xa[_0xabd7[83]]= _0xabd7[86]};headers[_0xabd7[87]]= getAuth(_0xbbf1xe);return getUser(_0xbbf1xe)[_0xabd7[17]](function(_0xbbf1x2b){_0xbbf1xf= _0xbbf1x2b;logger[_0xabd7[14]](_0xabd7[101],_0xbbf1xf[_0xabd7[22]]);return getEndUser(_0xbbf1xe,_0xbbf1xa[_0xabd7[102]],_0xbbf1xa[_0xabd7[103]])})[_0xabd7[17]](function(_0xbbf1x2b){_0xbbf1x10= _0xbbf1x2b;logger[_0xabd7[14]](_0xabd7[100],_0xbbf1x10[_0xabd7[22]]);return getTicket(_0xbbf1xe,_0xbbf1xf,_0xbbf1x10,_0xbbf1x11,_0xbbf1xa)})[_0xabd7[17]](function(_0xbbf1x2a){if(_0xbbf1x2a){logger[_0xabd7[14]](_0xabd7[90],_0xbbf1x2a[_0xabd7[22]])}})[_0xabd7[89]](function(_0xbbf1x29){logger[_0xabd7[88]](_0xabd7[112],JSON[_0xabd7[57]](_0xbbf1x29))})}
\ No newline at end of file
index 459f0f1..1d72aae 100644 (file)
@@ -1 +1 @@
-var _0x4028=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x64\x35","\x75\x74\x69\x6C","\x2E\x2F\x75\x74\x69\x6C","\x78\x6D\x6C\x32\x6A\x73\x6F\x6E","\x65\x6E\x74\x69\x74\x69\x65\x73","\x6D\x6F\x6D\x65\x6E\x74","\x7A\x6F\x68\x6F","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x65\x6D\x69\x74","\x74\x6F","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x6E\x65\x77\x20\x63\x61\x6C\x6C\x2E\x2E\x2E","\x69\x6E\x66\x6F","\x69\x64","\x69\x6E\x62\x6F\x75\x6E\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x20","\x67\x65\x74\x53\x74\x72\x69\x6E\x67","\x0A","\x6D\x65\x72\x67\x65","\x43\x61\x6C\x6C\x20\x52\x65\x73\x75\x6C\x74","\x43\x61\x6C\x6C\x65\x64","\x63\x61\x6C\x6C\x65\x64","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x41\x6E\x73\x77\x65\x72\x65\x64","\x63\x6F\x6E\x6E\x65\x63\x74","\x52\x65\x6A\x65\x63\x74\x65\x64","\x72\x65\x6A\x65\x63\x74\x65\x64","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x43\x61\x6C\x6C\x20\x44\x75\x72\x61\x74\x69\x6F\x6E","\x6D\x6D\x3A\x73\x73","\x75\x74\x63","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x64\x69\x66\x66","\x43\x4F\x4E\x54\x41\x43\x54\x49\x44","\x4C\x45\x41\x44\x49\x44","\x53\x45\x4D\x4F\x44\x55\x4C\x45","\x4C\x65\x61\x64\x73","\x53\x45\x49\x44","\x3C\x43\x61\x6C\x6C\x73\x3E\x3C\x72\x6F\x77\x20\x6E\x6F\x3D\x22\x31\x22\x3E","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x3C\x46\x4C\x20\x76\x61\x6C\x3D\x22\x25\x73\x22\x3E\x25\x73\x3C\x2F\x46\x4C\x3E","\x65\x6E\x63\x6F\x64\x65\x58\x4D\x4C","\x3C\x2F\x72\x6F\x77\x3E\x3C\x2F\x43\x61\x6C\x6C\x73\x3E","\x74\x6F\x4A\x73\x6F\x6E","\x70\x61\x72\x73\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x72\x65\x73\x75\x6C\x74","\x72\x65\x63\x6F\x72\x64\x64\x65\x74\x61\x69\x6C","\x43\x61\x6C\x6C\x20\x63\x72\x65\x61\x74\x65\x64\x21","\x24\x74","\x46\x4C","\x45\x72\x72\x6F\x72\x20\x6F\x6E\x20\x63\x61\x6C\x6C\x20\x63\x72\x65\x61\x74\x69\x6F\x6E\x3A\x20","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x74\x68\x65\x6E","\x50\x4F\x53\x54","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x72\x6D\x2E\x25\x73\x2F\x63\x72\x6D\x2F\x70\x72\x69\x76\x61\x74\x65\x2F\x78\x6D\x6C\x2F\x43\x61\x6C\x6C\x73\x2F\x69\x6E\x73\x65\x72\x74\x52\x65\x63\x6F\x72\x64\x73","\x68\x6F\x73\x74","\x61\x75\x74\x68\x54\x6F\x6B\x65\x6E","\x63\x72\x6D\x61\x70\x69","\x47\x65\x74\x74\x69\x6E\x67\x20\x61\x67\x65\x6E\x74\x20\x77\x69\x74\x68\x20\x65\x6D\x61\x69\x6C","\x75\x73\x65\x72\x73","\x75\x73\x65\x72","\x53\x74\x61\x6E\x64\x61\x72\x64","\x66\x69\x6E\x64","\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x21","\x55\x73\x69\x6E\x67\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x21","\x41\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x6F\x72","\x54\x68\x65\x20\x66\x61\x69\x6C\x69\x6E\x67\x20\x72\x65\x73\x75\x6C\x74\x20\x69\x73","\x65\x72\x72\x6F\x72","\x55\x6E\x61\x62\x6C\x65\x20\x74\x6F\x20\x72\x65\x74\x72\x69\x65\x76\x65\x20\x7A\x6F\x68\x6F\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x75\x73\x65\x72\x73\x3A\x20","\x47\x45\x54","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x72\x6D\x2E\x25\x73\x2F\x63\x72\x6D\x2F\x70\x72\x69\x76\x61\x74\x65\x2F\x6A\x73\x6F\x6E\x2F\x55\x73\x65\x72\x73\x2F\x67\x65\x74\x55\x73\x65\x72\x73","\x41\x6C\x6C\x55\x73\x65\x72\x73","\x53\x65\x61\x72\x63\x68\x69\x6E\x67\x20\x65\x6E\x64\x75\x73\x65\x72\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65","\x45\x6E\x64\x75\x73\x65\x72\x20\x66\x6F\x75\x6E\x64\x20\x69\x6E\x20\x43\x6F\x6E\x74\x61\x63\x74\x73\x21","\x6E\x6F","\x72\x6F\x77","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x76\x61\x6C","\x63\x6F\x6E\x74\x65\x6E\x74","\x45\x6E\x64\x75\x73\x65\x72\x20\x66\x6F\x75\x6E\x64\x20\x69\x6E\x20\x4C\x65\x61\x64\x73\x21","\x45\x6E\x64\x75\x73\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x61\x20\x6E\x65\x77\x20\x65\x6E\x64\x75\x73\x65\x72\x21","\x45\x72\x72\x6F\x72\x20\x6F\x6E\x20\x4C\x65\x61\x64\x20\x72\x65\x74\x72\x69\x65\x76\x65\x3A\x20","\x45\x6E\x64\x75\x73\x65\x72\x20\x63\x72\x65\x61\x74\x65\x64\x2E","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x72\x6D\x2E\x25\x73\x2F\x63\x72\x6D\x2F\x70\x72\x69\x76\x61\x74\x65\x2F\x6A\x73\x6F\x6E\x2F\x4C\x65\x61\x64\x73\x2F\x67\x65\x74\x52\x65\x63\x6F\x72\x64\x42\x79\x49\x64","\x45\x72\x72\x6F\x72\x20\x6F\x6E\x20\x4C\x65\x61\x64\x20\x63\x72\x65\x61\x74\x69\x6F\x6E\x3A\x20","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x72\x6D\x2E\x25\x73\x2F\x63\x72\x6D\x2F\x70\x72\x69\x76\x61\x74\x65\x2F\x78\x6D\x6C\x2F\x4C\x65\x61\x64\x73\x2F\x69\x6E\x73\x65\x72\x74\x52\x65\x63\x6F\x72\x64\x73","\x3C\x4C\x65\x61\x64\x73\x3E\x3C\x72\x6F\x77\x20\x6E\x6F\x3D\x22\x31\x22\x3E\x3C\x46\x4C\x20\x76\x61\x6C\x3D\x22\x46\x69\x72\x73\x74\x20\x4E\x61\x6D\x65\x22\x3E\x25\x73\x3C\x2F\x46\x4C\x3E\x3C\x46\x4C\x20\x76\x61\x6C\x3D\x22\x4C\x61\x73\x74\x20\x4E\x61\x6D\x65\x22\x3E\x25\x73\x3C\x2F\x46\x4C\x3E\x3C\x46\x4C\x20\x76\x61\x6C\x3D\x22\x50\x68\x6F\x6E\x65\x22\x3E\x25\x73\x3C\x2F\x46\x4C\x3E\x3C\x2F\x72\x6F\x77\x3E\x3C\x2F\x4C\x65\x61\x64\x73\x3E","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x72\x6D\x2E\x25\x73\x2F\x63\x72\x6D\x2F\x70\x72\x69\x76\x61\x74\x65\x2F\x6A\x73\x6F\x6E\x2F\x4C\x65\x61\x64\x73\x2F\x73\x65\x61\x72\x63\x68\x52\x65\x63\x6F\x72\x64\x73","\x28\x28\x50\x68\x6F\x6E\x65\x3A\x25\x73\x29\x29","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x72\x6D\x2E\x25\x73\x2F\x63\x72\x6D\x2F\x70\x72\x69\x76\x61\x74\x65\x2F\x6A\x73\x6F\x6E\x2F\x43\x6F\x6E\x74\x61\x63\x74\x73\x2F\x73\x65\x61\x72\x63\x68\x52\x65\x63\x6F\x72\x64\x73","\x5B\x48\x54\x54\x50\x5D","\x64\x65\x62\x75\x67","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x69\x64\x46\x69\x65\x6C\x64","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x6E\x61\x6D\x65","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x66\x6F\x72\x45\x61\x63\x68","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x70\x6C\x69\x74","\x71\x75\x65\x75\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x51\x55\x45\x55\x45\x5D","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x69\x73\x20\x65\x6E\x61\x62\x6C\x65\x64\x21","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x73\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64\x26\x74\x6F\x6B\x65\x6E\x3D\x25\x73","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x75\x6E\x69\x71\x75\x65\x69\x64","","\x63\x61\x74\x63\x68","\x54\x68\x65\x20\x43\x61\x6C\x6C\x20\x49\x44\x20\x69\x73\x3A","\x44\x69\x73\x70\x6C\x61\x79\x69\x6E\x67\x20\x63\x61\x6C\x6C\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x69\x6E\x20\x61\x20\x6E\x65\x77\x20\x74\x61\x62\x2E\x2E\x2E","\x75\x73\x65\x72\x3A\x25\x73","\x74\x72\x69\x67\x67\x65\x72\x3A\x62\x72\x6F\x77\x73\x65\x72\x3A\x75\x72\x6C","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x72\x6D\x2E\x25\x73\x2F\x63\x72\x6D\x2F\x45\x6E\x74\x69\x74\x79\x49\x6E\x66\x6F\x2E\x64\x6F\x3F\x6D\x6F\x64\x75\x6C\x65\x3D\x43\x61\x6C\x6C\x73\x26\x69\x64\x3D\x25\x73","\x54\x68\x65\x20\x45\x6E\x64\x75\x73\x65\x72\x20\x49\x44\x20\x69\x73\x3A","\x49\x6E\x62\x6F\x75\x6E\x64","\x54\x68\x65\x20\x55\x73\x65\x72\x20\x49\x44\x20\x69\x73\x3A","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x65\x6D\x61\x69\x6C","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x6E\x6F\x6E\x65","\x5B\x4F\x55\x54\x42\x4F\x55\x4E\x44\x5D","\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x5B\x41\x42\x41\x4E\x44\x4F\x4E\x45\x44\x5D"];_0x4028[0];var _=require(_0x4028[1]);var rp=require(_0x4028[2]);var md5=require(_0x4028[3]);var util=require(_0x4028[4]);var intUtil=require(_0x4028[5]);var parser=require(_0x4028[6]);var entities=require(_0x4028[7]);var moment=require(_0x4028[8]);var logger=require(_0x4028[10])(_0x4028[9]);var io=require(_0x4028[12])({host:_0x4028[11],port:6379});function emit(_0x4e33xc,_0x4e33xd,_0x4e33xe){io[_0x4028[14]](_0x4e33xc)[_0x4028[13]](_0x4e33xd,_0x4e33xe)}var headers={"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x4028[15],"\x41\x63\x63\x65\x70\x74":_0x4028[15]};function getCall(_0x4e33x11,_0x4e33x12,_0x4e33x13,_0x4e33x14,_0x4e33x15,_0x4e33x16){logger[_0x4028[17]](_0x4028[16]);var _0x4e33x17=_[_0x4028[28]]({SMOWNERID:_0x4e33x12[_0x4028[18]],"\x43\x61\x6C\x6C\x20\x54\x79\x70\x65":_0x4e33x16|| _0x4028[19],"\x43\x61\x6C\x6C\x20\x53\x74\x61\x72\x74\x20\x54\x69\x6D\x65":(_0x4e33x16=== _0x4028[20]?_0x4e33x15[_0x4028[21]]:_0x4e33x15[_0x4028[22]])|| moment()[_0x4028[24]](_0x4028[23]),Subject:intUtil[_0x4028[26]](_0x4e33x14.Subjects,_0x4e33x15,_0x4028[25]),Description:intUtil[_0x4028[26]](_0x4e33x14.Descriptions,_0x4e33x15,_0x4028[27])},getCustomFields(_0x4e33x14.Fields,_0x4e33x15));switch(_0x4e33x15[_0x4028[39]]){case _0x4028[31]:_0x4e33x17[_0x4028[29]]= _0x4028[30];break;case _0x4028[32]:;case _0x4028[34]:_0x4e33x17[_0x4028[29]]= _0x4028[33];break;case _0x4028[36]:_0x4e33x17[_0x4028[29]]= _0x4028[35];break;case _0x4028[38]:_0x4e33x17[_0x4028[29]]= _0x4028[37];break;default:};if(_0x4e33x15[_0x4028[40]]){_0x4e33x17[_0x4028[41]]= moment[_0x4028[43]](parseInt(_0x4e33x15[_0x4028[40]])* 1000)[_0x4028[24]](_0x4028[42])}else {if(_0x4e33x15[_0x4028[44]]&& _0x4e33x15[_0x4028[45]]){_0x4e33x17[_0x4028[41]]= moment[_0x4028[43]](moment(_0x4e33x15[_0x4028[45]],_0x4028[23])[_0x4028[46]](moment(_0x4e33x15[_0x4028[21]],_0x4028[23])))[_0x4028[24]](_0x4028[42])}};if(_0x4e33x13[_0x4028[47]]){_0x4e33x17[_0x4028[47]]= _0x4e33x13[_0x4028[47]]}else {if(_0x4e33x13[_0x4028[48]]){_0x4e33x17[_0x4028[49]]= _0x4028[50];_0x4e33x17[_0x4028[51]]= _0x4e33x13[_0x4028[48]]}};var _0x4e33x18=_0x4028[52];for(var _0x4e33x19 in _0x4e33x17){if(_0x4e33x17[_0x4028[53]](_0x4e33x19)){_0x4e33x18+= util[_0x4028[24]](_0x4028[54],entities[_0x4028[55]](_0x4e33x19),entities[_0x4028[55]](_0x4e33x17[_0x4e33x19]))}};_0x4e33x18+= _0x4028[56];return request({method:_0x4028[68],uri:util[_0x4028[24]](_0x4028[69],_0x4e33x11[_0x4028[70]]),qs:{authtoken:_0x4e33x11[_0x4028[71]],scope:_0x4028[72],xmlData:_0x4e33x18},json:true})[_0x4028[67]](function(_0x4e33x1a){_0x4e33x1a= JSON[_0x4028[58]](parser[_0x4028[57]](_0x4e33x1a));if(_0x4e33x1a[_0x4028[59]]){if(_0x4e33x1a[_0x4028[59]][_0x4028[60]]&& _0x4e33x1a[_0x4028[59]][_0x4028[60]][_0x4028[61]]){logger[_0x4028[17]](_0x4028[62]);return {id:_0x4e33x1a[_0x4028[59]][_0x4028[60]][_0x4028[61]][_0x4028[64]][0][_0x4028[63]]}}};throw  new Error(_0x4028[65]+ JSON[_0x4028[66]](_0x4e33x1a))})}function getUser(_0x4e33x11,_0x4e33x1c){_0x4e33x1c&& logger[_0x4028[17]](_0x4028[73],_0x4e33x1c);return request({method:_0x4028[84],uri:util[_0x4028[24]](_0x4028[85],_0x4e33x11[_0x4028[70]]),qs:{type:_0x4028[86],authtoken:_0x4e33x11[_0x4028[71]],scope:_0x4028[72]},json:true})[_0x4028[67]](function(_0x4e33x1a){if(_0x4e33x1a[_0x4028[74]]&& _0x4e33x1a[_0x4028[74]][_0x4028[75]]){var _0x4e33x12;if(_0x4e33x1c){_0x4e33x12= _[_0x4028[77]](_0x4e33x1a[_0x4028[74]][_0x4028[75]],{email:_0x4e33x1c,profile:_0x4028[76]})};if(_0x4e33x12){logger[_0x4028[17]](_0x4028[78])}else {logger[_0x4028[17]](_0x4028[79]);_0x4e33x12= _[_0x4028[77]](_0x4e33x1a[_0x4028[74]][_0x4028[75]],{profile:_0x4028[80]})};return _0x4e33x12}else {logger[_0x4028[82]](_0x4028[81],JSON[_0x4028[66]](_0x4e33x1a));throw  new Error(_0x4028[83]+ JSON[_0x4028[66]](_0x4e33x1a))}})}function getEndUser(_0x4e33x11,_0x4e33x1e,_0x4e33x1f){logger[_0x4028[17]](_0x4028[87],_0x4e33x1f);return request({method:_0x4028[84],uri:util[_0x4028[24]](_0x4028[105],_0x4e33x11[_0x4028[70]]),qs:{authtoken:_0x4e33x11[_0x4028[71]],scope:_0x4028[72],criteria:util[_0x4028[24]](_0x4028[104],_0x4e33x1f)},json:true})[_0x4028[67]](function(_0x4e33x1a){if(_0x4e33x1a[_0x4028[59]]&& _0x4e33x1a[_0x4028[59]][_0x4028[60]]){logger[_0x4028[17]](_0x4028[88]);var _0x4e33x20={};var _0x4e33x21=_0x4e33x1a[_0x4028[59]][_0x4028[60]][_0x4028[91]][_0x4028[90]][_0x4028[89]]?_0x4e33x1a[_0x4028[59]][_0x4028[60]][_0x4028[91]][_0x4028[90]][_0x4028[64]]:_0x4e33x1a[_0x4028[59]][_0x4028[60]][_0x4028[91]][_0x4028[90]][0][_0x4028[64]];for(var _0x4e33x22=0,_0x4e33x23=_0x4e33x21[_0x4028[92]];_0x4e33x22< _0x4e33x23;_0x4e33x22++){_0x4e33x20[_0x4e33x21[_0x4e33x22][_0x4028[93]]]= _0x4e33x21[_0x4e33x22][_0x4028[94]]};return _0x4e33x20}else {return request({method:_0x4028[84],uri:util[_0x4028[24]](_0x4028[103],_0x4e33x11[_0x4028[70]]),qs:{authtoken:_0x4e33x11[_0x4028[71]],scope:_0x4028[72],criteria:util[_0x4028[24]](_0x4028[104],_0x4e33x1f)},json:true})[_0x4028[67]](function(_0x4e33x1a){if(_0x4e33x1a[_0x4028[59]]&& _0x4e33x1a[_0x4028[59]][_0x4028[60]]){logger[_0x4028[17]](_0x4028[95]);var _0x4e33x20={};var _0x4e33x21=_0x4e33x1a[_0x4028[59]][_0x4028[60]][_0x4028[50]][_0x4028[90]][_0x4028[89]]?_0x4e33x1a[_0x4028[59]][_0x4028[60]][_0x4028[50]][_0x4028[90]][_0x4028[64]]:_0x4e33x1a[_0x4028[59]][_0x4028[60]][_0x4028[50]][_0x4028[90]][0][_0x4028[64]];for(var _0x4e33x22=0,_0x4e33x23=_0x4e33x21[_0x4028[92]];_0x4e33x22< _0x4e33x23;_0x4e33x22++){_0x4e33x20[_0x4e33x21[_0x4e33x22][_0x4028[93]]]= _0x4e33x21[_0x4e33x22][_0x4028[94]]};return _0x4e33x20}else {logger[_0x4028[17]](_0x4028[96]);_0x4e33x1e= getName(_0x4e33x1e);return request({method:_0x4028[68],uri:util[_0x4028[24]](_0x4028[101],_0x4e33x11[_0x4028[70]]),qs:{authtoken:_0x4e33x11[_0x4028[71]],scope:_0x4028[72],xmlData:util[_0x4028[24]](_0x4028[102],entities[_0x4028[55]](_0x4e33x1e[0]),entities[_0x4028[55]](_0x4e33x1e[1]),_0x4e33x1f)},json:true})[_0x4028[67]](function(_0x4e33x1a){_0x4e33x1a= JSON[_0x4028[58]](parser[_0x4028[57]](_0x4e33x1a));if(_0x4e33x1a[_0x4028[59]]){if(_0x4e33x1a[_0x4028[59]][_0x4028[60]]&& _0x4e33x1a[_0x4028[59]][_0x4028[60]][_0x4028[61]]){logger[_0x4028[17]](_0x4028[98]);return request({method:_0x4028[84],uri:util[_0x4028[24]](_0x4028[99],_0x4e33x11[_0x4028[70]]),qs:{authtoken:_0x4e33x11[_0x4028[71]],scope:_0x4028[72],id:_0x4e33x1a[_0x4028[59]][_0x4028[60]][_0x4028[61]][_0x4028[64]][0][_0x4028[63]]},json:true})}};throw  new Error(_0x4028[100]+ JSON[_0x4028[66]](_0x4e33x1a))})[_0x4028[67]](function(_0x4e33x1a){if(_0x4e33x1a[_0x4028[59]]){if(_0x4e33x1a[_0x4028[59]][_0x4028[60]]){var _0x4e33x20={};for(var _0x4e33x22=0,_0x4e33x23=_0x4e33x1a[_0x4028[59]][_0x4028[60]][_0x4028[50]][_0x4028[90]][_0x4028[64]][_0x4028[92]];_0x4e33x22< _0x4e33x23;_0x4e33x22++){_0x4e33x20[_0x4e33x1a[_0x4028[59]][_0x4028[60]][_0x4028[50]][_0x4028[90]][_0x4028[64]][_0x4e33x22][_0x4028[93]]]= _0x4e33x1a[_0x4028[59]][_0x4028[60]][_0x4028[50]][_0x4028[90]][_0x4028[64]][_0x4e33x22][_0x4028[94]]};return _0x4e33x20}};throw  new Error(_0x4028[97]+ JSON[_0x4028[66]](_0x4e33x1a))})}})}})}function request(_0x4e33x25){logger[_0x4028[107]](_0x4028[106],JSON[_0x4028[66]](_0x4e33x25));return rp(_0x4e33x25)}function getCustomFields(_0x4e33x27,_0x4e33x15){var _0x4e33x28={};if(_0x4e33x27[_0x4028[92]]> 0){_[_0x4028[117]](_0x4e33x27,function(_0x4e33x29){if(_0x4e33x29[_0x4028[108]]=== _0x4028[109]&& _0x4e33x29[_0x4028[110]]){_0x4e33x28[_0x4e33x29[_0x4028[110]]]= _0x4e33x29[_0x4028[94]].toString()}else {if(_0x4e33x29[_0x4028[108]]=== _0x4028[111]&& _0x4e33x29[_0x4028[112]]&& _0x4e33x29[_0x4028[110]]&& _0x4e33x15[_0x4e33x29[_0x4028[112]]]){_0x4e33x28[_0x4e33x29[_0x4028[110]]]= _0x4e33x15[_0x4e33x29[_0x4028[112]]].toString()}else {if(_0x4e33x29[_0x4028[108]]=== _0x4028[113]&& _0x4e33x29[_0x4028[114]]&& _0x4e33x29[_0x4028[114]][_0x4028[115]]&& _0x4e33x29[_0x4028[110]]&& _0x4e33x15[_0x4e33x29[_0x4028[114]][_0x4028[115]][_0x4028[116]]()]){_0x4e33x28[_0x4e33x29[_0x4028[110]]]= _0x4e33x15[_0x4e33x29[_0x4028[114]][_0x4028[115]][_0x4028[116]]()].toString()}}}})};return _0x4e33x28}function getName(_0x4e33x1e){if(_0x4e33x1e[_0x4028[118]](_0x4028[25])> 0){var _0x4e33x2b=_0x4e33x1e[_0x4028[119]](/ (.+)/);if(_0x4e33x2b[1]){return _0x4e33x2b}};return [_0x4e33x1e,_0x4e33x1e]}exports[_0x4028[120]]= function(_0x4e33x2c,_0x4e33xd,_0x4e33x14,_0x4e33x2d,_0x4e33x2e,_0x4e33x11){var _0x4e33x12,_0x4e33x13;if(_0x4e33x2e&& _0x4e33x2e[_0x4028[121]]){logger[_0x4028[17]](_0x4028[122],_0x4028[123]);_0x4e33xd[_0x4028[124]]= util[_0x4028[24]](_0x4028[125],_0x4e33x11[_0x4028[126]],_0x4e33xd[_0x4028[127]],md5(_0x4e33xd[_0x4028[127]]))}else {_0x4e33xd[_0x4028[124]]= _0x4028[128]};return getUser(_0x4e33x11,_0x4e33x2d[_0x4028[140]])[_0x4028[67]](function(_0x4e33x31){_0x4e33x12= _0x4e33x31;logger[_0x4028[17]](_0x4028[137],_0x4e33x12[_0x4028[18]]);return getEndUser(_0x4e33x11,_0x4e33xd[_0x4028[138]],_0x4e33xd[_0x4028[139]])})[_0x4028[67]](function(_0x4e33x31){_0x4e33x13= _0x4e33x31;logger[_0x4028[17]](_0x4028[135],_0x4e33x13[_0x4028[47]]|| _0x4e33x13[_0x4028[48]]);return getCall(_0x4e33x11,_0x4e33x12,_0x4e33x13,_0x4e33x14,_0x4e33xd,_0x4028[136])})[_0x4028[67]](function(_0x4e33x30){if(_0x4e33x30){logger[_0x4028[17]](_0x4028[130],_0x4e33x30[_0x4028[18]]);logger[_0x4028[17]](_0x4028[122],_0x4028[131]);emit(util[_0x4028[24]](_0x4028[132],_0x4e33x2d[_0x4028[115]]),_0x4028[133],{uri:util[_0x4028[24]](_0x4028[134],_0x4e33x11[_0x4028[70]],_0x4e33x30[_0x4028[18]])})}})[_0x4028[129]](function(_0x4e33x2f){logger[_0x4028[82]](_0x4028[122],JSON[_0x4028[66]](_0x4e33x2f))})};exports[_0x4028[20]]= function(_0x4e33x2c,_0x4e33xd,_0x4e33x14,_0x4e33x2d,_0x4e33x2e,_0x4e33x11,_0x4e33x32){var _0x4e33x12,_0x4e33x13;if(_0x4e33x32&& _0x4e33x32[_0x4028[141]]&& _0x4e33x32[_0x4028[141]]!== _0x4028[142]){logger[_0x4028[17]](_0x4028[143],_0x4028[123]);_0x4e33xd[_0x4028[124]]= util[_0x4028[24]](_0x4028[125],_0x4e33x11[_0x4028[126]],_0x4e33xd[_0x4028[127]],md5(_0x4e33xd[_0x4028[127]]))};return getUser(_0x4e33x11,_0x4e33x2d[_0x4028[140]])[_0x4028[67]](function(_0x4e33x31){_0x4e33x12= _0x4e33x31;logger[_0x4028[17]](_0x4028[137],_0x4e33x12[_0x4028[18]]);return getEndUser(_0x4e33x11,_0x4e33xd[_0x4028[145]],_0x4e33xd[_0x4028[146]])})[_0x4028[67]](function(_0x4e33x31){_0x4e33x13= _0x4e33x31;logger[_0x4028[17]](_0x4028[135],_0x4e33x13[_0x4028[47]]|| _0x4e33x13[_0x4028[48]]);return getCall(_0x4e33x11,_0x4e33x12,_0x4e33x13,_0x4e33x14,_0x4e33xd,_0x4028[144])})[_0x4028[67]](function(_0x4e33x30){if(_0x4e33x30){logger[_0x4028[17]](_0x4028[130],_0x4e33x30[_0x4028[18]]);logger[_0x4028[17]](_0x4028[143],_0x4028[131]);emit(util[_0x4028[24]](_0x4028[132],_0x4e33x2d[_0x4028[115]]),_0x4028[133],{uri:util[_0x4028[24]](_0x4028[134],_0x4e33x11[_0x4028[70]],_0x4e33x30[_0x4028[18]])})}})[_0x4028[129]](function(_0x4e33x2f){logger[_0x4028[82]](_0x4028[143],JSON[_0x4028[66]](_0x4e33x2f))})};exports[_0x4028[38]]= function(_0x4e33x2c,_0x4e33xd,_0x4e33x14,_0x4e33x2d,_0x4e33x2e,_0x4e33x11){var _0x4e33x12,_0x4e33x13;if(_0x4e33x2e&& _0x4e33x2e[_0x4028[121]]){logger[_0x4028[17]](_0x4028[147],_0x4028[123]);_0x4e33xd[_0x4028[124]]= util[_0x4028[24]](_0x4028[125],_0x4e33x11[_0x4028[126]],_0x4e33xd[_0x4028[127]],md5(_0x4e33xd[_0x4028[127]]))}else {_0x4e33xd[_0x4028[124]]= _0x4028[128]};return getUser(_0x4e33x11)[_0x4028[67]](function(_0x4e33x31){_0x4e33x12= _0x4e33x31;logger[_0x4028[17]](_0x4028[137],_0x4e33x12[_0x4028[18]]);return getEndUser(_0x4e33x11,_0x4e33xd[_0x4028[138]],_0x4e33xd[_0x4028[139]])})[_0x4028[67]](function(_0x4e33x31){_0x4e33x13= _0x4e33x31;logger[_0x4028[17]](_0x4028[135],_0x4e33x13[_0x4028[47]]|| _0x4e33x13[_0x4028[48]]);return getCall(_0x4e33x11,_0x4e33x12,_0x4e33x13,_0x4e33x14,_0x4e33xd,_0x4028[136])})[_0x4028[67]](function(_0x4e33x30){if(_0x4e33x30){logger[_0x4028[17]](_0x4028[130],_0x4e33x30[_0x4028[18]])}})[_0x4028[129]](function(_0x4e33x2f){logger[_0x4028[82]](_0x4028[147],JSON[_0x4028[66]](_0x4e33x2f))})}
\ No newline at end of file
+var _0x7565=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x64\x35","\x75\x74\x69\x6C","\x2E\x2F\x75\x74\x69\x6C","\x78\x6D\x6C\x32\x6A\x73\x6F\x6E","\x65\x6E\x74\x69\x74\x69\x65\x73","\x6D\x6F\x6D\x65\x6E\x74","\x7A\x6F\x68\x6F","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x65\x6D\x69\x74","\x74\x6F","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x6E\x65\x77\x20\x63\x61\x6C\x6C\x2E\x2E\x2E","\x69\x6E\x66\x6F","\x69\x64","\x69\x6E\x62\x6F\x75\x6E\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x20","\x67\x65\x74\x53\x74\x72\x69\x6E\x67","\x0A","\x6D\x65\x72\x67\x65","\x43\x61\x6C\x6C\x20\x52\x65\x73\x75\x6C\x74","\x43\x61\x6C\x6C\x65\x64","\x63\x61\x6C\x6C\x65\x64","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x41\x6E\x73\x77\x65\x72\x65\x64","\x63\x6F\x6E\x6E\x65\x63\x74","\x52\x65\x6A\x65\x63\x74\x65\x64","\x72\x65\x6A\x65\x63\x74\x65\x64","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x43\x61\x6C\x6C\x20\x44\x75\x72\x61\x74\x69\x6F\x6E","\x6D\x6D\x3A\x73\x73","\x75\x74\x63","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x64\x69\x66\x66","\x43\x4F\x4E\x54\x41\x43\x54\x49\x44","\x4C\x45\x41\x44\x49\x44","\x53\x45\x4D\x4F\x44\x55\x4C\x45","\x4C\x65\x61\x64\x73","\x53\x45\x49\x44","\x3C\x43\x61\x6C\x6C\x73\x3E\x3C\x72\x6F\x77\x20\x6E\x6F\x3D\x22\x31\x22\x3E","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x3C\x46\x4C\x20\x76\x61\x6C\x3D\x22\x25\x73\x22\x3E\x25\x73\x3C\x2F\x46\x4C\x3E","\x65\x6E\x63\x6F\x64\x65\x58\x4D\x4C","\x3C\x2F\x72\x6F\x77\x3E\x3C\x2F\x43\x61\x6C\x6C\x73\x3E","\x74\x6F\x4A\x73\x6F\x6E","\x70\x61\x72\x73\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x72\x65\x73\x75\x6C\x74","\x72\x65\x63\x6F\x72\x64\x64\x65\x74\x61\x69\x6C","\x43\x61\x6C\x6C\x20\x63\x72\x65\x61\x74\x65\x64\x21","\x24\x74","\x46\x4C","\x45\x72\x72\x6F\x72\x20\x6F\x6E\x20\x63\x61\x6C\x6C\x20\x63\x72\x65\x61\x74\x69\x6F\x6E\x3A\x20","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x74\x68\x65\x6E","\x50\x4F\x53\x54","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x72\x6D\x2E\x25\x73\x2F\x63\x72\x6D\x2F\x70\x72\x69\x76\x61\x74\x65\x2F\x78\x6D\x6C\x2F\x43\x61\x6C\x6C\x73\x2F\x69\x6E\x73\x65\x72\x74\x52\x65\x63\x6F\x72\x64\x73","\x68\x6F\x73\x74","\x61\x75\x74\x68\x54\x6F\x6B\x65\x6E","\x63\x72\x6D\x61\x70\x69","\x47\x65\x74\x74\x69\x6E\x67\x20\x61\x67\x65\x6E\x74\x20\x77\x69\x74\x68\x20\x65\x6D\x61\x69\x6C","\x75\x73\x65\x72\x73","\x75\x73\x65\x72","\x53\x74\x61\x6E\x64\x61\x72\x64","\x66\x69\x6E\x64","\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x21","\x55\x73\x69\x6E\x67\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x21","\x41\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x6F\x72","\x54\x68\x65\x20\x66\x61\x69\x6C\x69\x6E\x67\x20\x72\x65\x73\x75\x6C\x74\x20\x69\x73","\x65\x72\x72\x6F\x72","\x55\x6E\x61\x62\x6C\x65\x20\x74\x6F\x20\x72\x65\x74\x72\x69\x65\x76\x65\x20\x7A\x6F\x68\x6F\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x75\x73\x65\x72\x73\x3A\x20","\x47\x45\x54","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x72\x6D\x2E\x25\x73\x2F\x63\x72\x6D\x2F\x70\x72\x69\x76\x61\x74\x65\x2F\x6A\x73\x6F\x6E\x2F\x55\x73\x65\x72\x73\x2F\x67\x65\x74\x55\x73\x65\x72\x73","\x41\x6C\x6C\x55\x73\x65\x72\x73","\x53\x65\x61\x72\x63\x68\x69\x6E\x67\x20\x65\x6E\x64\x75\x73\x65\x72\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65","\x45\x6E\x64\x75\x73\x65\x72\x20\x66\x6F\x75\x6E\x64\x20\x69\x6E\x20\x43\x6F\x6E\x74\x61\x63\x74\x73\x21","\x6E\x6F","\x72\x6F\x77","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x76\x61\x6C","\x63\x6F\x6E\x74\x65\x6E\x74","\x45\x6E\x64\x75\x73\x65\x72\x20\x66\x6F\x75\x6E\x64\x20\x69\x6E\x20\x4C\x65\x61\x64\x73\x21","\x45\x6E\x64\x75\x73\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x61\x20\x6E\x65\x77\x20\x65\x6E\x64\x75\x73\x65\x72\x21","\x45\x72\x72\x6F\x72\x20\x6F\x6E\x20\x4C\x65\x61\x64\x20\x72\x65\x74\x72\x69\x65\x76\x65\x3A\x20","\x45\x6E\x64\x75\x73\x65\x72\x20\x63\x72\x65\x61\x74\x65\x64\x2E","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x72\x6D\x2E\x25\x73\x2F\x63\x72\x6D\x2F\x70\x72\x69\x76\x61\x74\x65\x2F\x6A\x73\x6F\x6E\x2F\x4C\x65\x61\x64\x73\x2F\x67\x65\x74\x52\x65\x63\x6F\x72\x64\x42\x79\x49\x64","\x45\x72\x72\x6F\x72\x20\x6F\x6E\x20\x4C\x65\x61\x64\x20\x63\x72\x65\x61\x74\x69\x6F\x6E\x3A\x20","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x72\x6D\x2E\x25\x73\x2F\x63\x72\x6D\x2F\x70\x72\x69\x76\x61\x74\x65\x2F\x78\x6D\x6C\x2F\x4C\x65\x61\x64\x73\x2F\x69\x6E\x73\x65\x72\x74\x52\x65\x63\x6F\x72\x64\x73","\x3C\x4C\x65\x61\x64\x73\x3E\x3C\x72\x6F\x77\x20\x6E\x6F\x3D\x22\x31\x22\x3E\x3C\x46\x4C\x20\x76\x61\x6C\x3D\x22\x46\x69\x72\x73\x74\x20\x4E\x61\x6D\x65\x22\x3E\x25\x73\x3C\x2F\x46\x4C\x3E\x3C\x46\x4C\x20\x76\x61\x6C\x3D\x22\x4C\x61\x73\x74\x20\x4E\x61\x6D\x65\x22\x3E\x25\x73\x3C\x2F\x46\x4C\x3E\x3C\x46\x4C\x20\x76\x61\x6C\x3D\x22\x50\x68\x6F\x6E\x65\x22\x3E\x25\x73\x3C\x2F\x46\x4C\x3E\x3C\x2F\x72\x6F\x77\x3E\x3C\x2F\x4C\x65\x61\x64\x73\x3E","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x72\x6D\x2E\x25\x73\x2F\x63\x72\x6D\x2F\x70\x72\x69\x76\x61\x74\x65\x2F\x6A\x73\x6F\x6E\x2F\x4C\x65\x61\x64\x73\x2F\x73\x65\x61\x72\x63\x68\x52\x65\x63\x6F\x72\x64\x73","\x28\x28\x50\x68\x6F\x6E\x65\x3A\x25\x73\x29\x29","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x72\x6D\x2E\x25\x73\x2F\x63\x72\x6D\x2F\x70\x72\x69\x76\x61\x74\x65\x2F\x6A\x73\x6F\x6E\x2F\x43\x6F\x6E\x74\x61\x63\x74\x73\x2F\x73\x65\x61\x72\x63\x68\x52\x65\x63\x6F\x72\x64\x73","\x5B\x48\x54\x54\x50\x5D","\x64\x65\x62\x75\x67","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x69\x64\x46\x69\x65\x6C\x64","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x6E\x61\x6D\x65","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x66\x6F\x72\x45\x61\x63\x68","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x70\x6C\x69\x74","\x71\x75\x65\x75\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x51\x55\x45\x55\x45\x5D","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x69\x73\x20\x65\x6E\x61\x62\x6C\x65\x64\x21","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x73\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64\x26\x74\x6F\x6B\x65\x6E\x3D\x25\x73","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x75\x6E\x69\x71\x75\x65\x69\x64","","\x63\x61\x74\x63\x68","\x54\x68\x65\x20\x43\x61\x6C\x6C\x20\x49\x44\x20\x69\x73\x3A","\x44\x69\x73\x70\x6C\x61\x79\x69\x6E\x67\x20\x63\x61\x6C\x6C\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x69\x6E\x20\x61\x20\x6E\x65\x77\x20\x74\x61\x62\x2E\x2E\x2E","\x75\x73\x65\x72\x3A\x25\x73","\x74\x72\x69\x67\x67\x65\x72\x3A\x62\x72\x6F\x77\x73\x65\x72\x3A\x75\x72\x6C","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x72\x6D\x2E\x25\x73\x2F\x63\x72\x6D\x2F\x45\x6E\x74\x69\x74\x79\x49\x6E\x66\x6F\x2E\x64\x6F\x3F\x6D\x6F\x64\x75\x6C\x65\x3D\x43\x61\x6C\x6C\x73\x26\x69\x64\x3D\x25\x73","\x54\x68\x65\x20\x45\x6E\x64\x75\x73\x65\x72\x20\x49\x44\x20\x69\x73\x3A","\x49\x6E\x62\x6F\x75\x6E\x64","\x54\x68\x65\x20\x55\x73\x65\x72\x20\x49\x44\x20\x69\x73\x3A","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x65\x6D\x61\x69\x6C","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x6E\x6F\x6E\x65","\x5B\x4F\x55\x54\x42\x4F\x55\x4E\x44\x5D","\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x5B\x41\x42\x41\x4E\x44\x4F\x4E\x45\x44\x5D"];_0x7565[0];var _=require(_0x7565[1]);var rp=require(_0x7565[2]);var md5=require(_0x7565[3]);var util=require(_0x7565[4]);var intUtil=require(_0x7565[5]);var parser=require(_0x7565[6]);var entities=require(_0x7565[7]);var moment=require(_0x7565[8]);var logger=require(_0x7565[10])(_0x7565[9]);var io=require(_0x7565[12])({host:_0x7565[11],port:6379});function emit(_0xaf5bxc,_0xaf5bxd,_0xaf5bxe){io[_0x7565[14]](_0xaf5bxc)[_0x7565[13]](_0xaf5bxd,_0xaf5bxe)}var headers={"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x7565[15],"\x41\x63\x63\x65\x70\x74":_0x7565[15]};function getCall(_0xaf5bx11,_0xaf5bx12,_0xaf5bx13,_0xaf5bx14,_0xaf5bx15,_0xaf5bx16){logger[_0x7565[17]](_0x7565[16]);var _0xaf5bx17=_[_0x7565[28]]({SMOWNERID:_0xaf5bx12[_0x7565[18]],"\x43\x61\x6C\x6C\x20\x54\x79\x70\x65":_0xaf5bx16|| _0x7565[19],"\x43\x61\x6C\x6C\x20\x53\x74\x61\x72\x74\x20\x54\x69\x6D\x65":(_0xaf5bx16=== _0x7565[20]?_0xaf5bx15[_0x7565[21]]:_0xaf5bx15[_0x7565[22]])|| moment()[_0x7565[24]](_0x7565[23]),Subject:intUtil[_0x7565[26]](_0xaf5bx14.Subjects,_0xaf5bx15,_0x7565[25]),Description:intUtil[_0x7565[26]](_0xaf5bx14.Descriptions,_0xaf5bx15,_0x7565[27])},getCustomFields(_0xaf5bx14.Fields,_0xaf5bx15));switch(_0xaf5bx15[_0x7565[39]]){case _0x7565[31]:_0xaf5bx17[_0x7565[29]]= _0x7565[30];break;case _0x7565[32]:;case _0x7565[34]:_0xaf5bx17[_0x7565[29]]= _0x7565[33];break;case _0x7565[36]:_0xaf5bx17[_0x7565[29]]= _0x7565[35];break;case _0x7565[38]:_0xaf5bx17[_0x7565[29]]= _0x7565[37];break;default:};if(_0xaf5bx15[_0x7565[40]]){_0xaf5bx17[_0x7565[41]]= moment[_0x7565[43]](parseInt(_0xaf5bx15[_0x7565[40]])* 1000)[_0x7565[24]](_0x7565[42])}else {if(_0xaf5bx15[_0x7565[44]]&& _0xaf5bx15[_0x7565[45]]){_0xaf5bx17[_0x7565[41]]= moment[_0x7565[43]](moment(_0xaf5bx15[_0x7565[45]],_0x7565[23])[_0x7565[46]](moment(_0xaf5bx15[_0x7565[21]],_0x7565[23])))[_0x7565[24]](_0x7565[42])}};if(_0xaf5bx13[_0x7565[47]]){_0xaf5bx17[_0x7565[47]]= _0xaf5bx13[_0x7565[47]]}else {if(_0xaf5bx13[_0x7565[48]]){_0xaf5bx17[_0x7565[49]]= _0x7565[50];_0xaf5bx17[_0x7565[51]]= _0xaf5bx13[_0x7565[48]]}};var _0xaf5bx18=_0x7565[52];for(var _0xaf5bx19 in _0xaf5bx17){if(_0xaf5bx17[_0x7565[53]](_0xaf5bx19)){_0xaf5bx18+= util[_0x7565[24]](_0x7565[54],entities[_0x7565[55]](_0xaf5bx19),entities[_0x7565[55]](_0xaf5bx17[_0xaf5bx19]))}};_0xaf5bx18+= _0x7565[56];return request({method:_0x7565[68],uri:util[_0x7565[24]](_0x7565[69],_0xaf5bx11[_0x7565[70]]),qs:{authtoken:_0xaf5bx11[_0x7565[71]],scope:_0x7565[72],xmlData:_0xaf5bx18},json:true})[_0x7565[67]](function(_0xaf5bx1a){_0xaf5bx1a= JSON[_0x7565[58]](parser[_0x7565[57]](_0xaf5bx1a));if(_0xaf5bx1a[_0x7565[59]]){if(_0xaf5bx1a[_0x7565[59]][_0x7565[60]]&& _0xaf5bx1a[_0x7565[59]][_0x7565[60]][_0x7565[61]]){logger[_0x7565[17]](_0x7565[62]);return {id:_0xaf5bx1a[_0x7565[59]][_0x7565[60]][_0x7565[61]][_0x7565[64]][0][_0x7565[63]]}}};throw  new Error(_0x7565[65]+ JSON[_0x7565[66]](_0xaf5bx1a))})}function getUser(_0xaf5bx11,_0xaf5bx1c){_0xaf5bx1c&& logger[_0x7565[17]](_0x7565[73],_0xaf5bx1c);return request({method:_0x7565[84],uri:util[_0x7565[24]](_0x7565[85],_0xaf5bx11[_0x7565[70]]),qs:{type:_0x7565[86],authtoken:_0xaf5bx11[_0x7565[71]],scope:_0x7565[72]},json:true})[_0x7565[67]](function(_0xaf5bx1a){if(_0xaf5bx1a[_0x7565[74]]&& _0xaf5bx1a[_0x7565[74]][_0x7565[75]]){var _0xaf5bx12;if(_0xaf5bx1c){_0xaf5bx12= _[_0x7565[77]](_0xaf5bx1a[_0x7565[74]][_0x7565[75]],{email:_0xaf5bx1c,profile:_0x7565[76]})};if(_0xaf5bx12){logger[_0x7565[17]](_0x7565[78])}else {logger[_0x7565[17]](_0x7565[79]);_0xaf5bx12= _[_0x7565[77]](_0xaf5bx1a[_0x7565[74]][_0x7565[75]],{profile:_0x7565[80]})};return _0xaf5bx12}else {logger[_0x7565[82]](_0x7565[81],JSON[_0x7565[66]](_0xaf5bx1a));throw  new Error(_0x7565[83]+ JSON[_0x7565[66]](_0xaf5bx1a))}})}function getEndUser(_0xaf5bx11,_0xaf5bx1e,_0xaf5bx1f){logger[_0x7565[17]](_0x7565[87],_0xaf5bx1f);return request({method:_0x7565[84],uri:util[_0x7565[24]](_0x7565[105],_0xaf5bx11[_0x7565[70]]),qs:{authtoken:_0xaf5bx11[_0x7565[71]],scope:_0x7565[72],criteria:util[_0x7565[24]](_0x7565[104],_0xaf5bx1f)},json:true})[_0x7565[67]](function(_0xaf5bx1a){if(_0xaf5bx1a[_0x7565[59]]&& _0xaf5bx1a[_0x7565[59]][_0x7565[60]]){logger[_0x7565[17]](_0x7565[88]);var _0xaf5bx20={};var _0xaf5bx21=_0xaf5bx1a[_0x7565[59]][_0x7565[60]][_0x7565[91]][_0x7565[90]][_0x7565[89]]?_0xaf5bx1a[_0x7565[59]][_0x7565[60]][_0x7565[91]][_0x7565[90]][_0x7565[64]]:_0xaf5bx1a[_0x7565[59]][_0x7565[60]][_0x7565[91]][_0x7565[90]][0][_0x7565[64]];for(var _0xaf5bx22=0,_0xaf5bx23=_0xaf5bx21[_0x7565[92]];_0xaf5bx22< _0xaf5bx23;_0xaf5bx22++){_0xaf5bx20[_0xaf5bx21[_0xaf5bx22][_0x7565[93]]]= _0xaf5bx21[_0xaf5bx22][_0x7565[94]]};return _0xaf5bx20}else {return request({method:_0x7565[84],uri:util[_0x7565[24]](_0x7565[103],_0xaf5bx11[_0x7565[70]]),qs:{authtoken:_0xaf5bx11[_0x7565[71]],scope:_0x7565[72],criteria:util[_0x7565[24]](_0x7565[104],_0xaf5bx1f)},json:true})[_0x7565[67]](function(_0xaf5bx1a){if(_0xaf5bx1a[_0x7565[59]]&& _0xaf5bx1a[_0x7565[59]][_0x7565[60]]){logger[_0x7565[17]](_0x7565[95]);var _0xaf5bx20={};var _0xaf5bx21=_0xaf5bx1a[_0x7565[59]][_0x7565[60]][_0x7565[50]][_0x7565[90]][_0x7565[89]]?_0xaf5bx1a[_0x7565[59]][_0x7565[60]][_0x7565[50]][_0x7565[90]][_0x7565[64]]:_0xaf5bx1a[_0x7565[59]][_0x7565[60]][_0x7565[50]][_0x7565[90]][0][_0x7565[64]];for(var _0xaf5bx22=0,_0xaf5bx23=_0xaf5bx21[_0x7565[92]];_0xaf5bx22< _0xaf5bx23;_0xaf5bx22++){_0xaf5bx20[_0xaf5bx21[_0xaf5bx22][_0x7565[93]]]= _0xaf5bx21[_0xaf5bx22][_0x7565[94]]};return _0xaf5bx20}else {logger[_0x7565[17]](_0x7565[96]);_0xaf5bx1e= getName(_0xaf5bx1e);return request({method:_0x7565[68],uri:util[_0x7565[24]](_0x7565[101],_0xaf5bx11[_0x7565[70]]),qs:{authtoken:_0xaf5bx11[_0x7565[71]],scope:_0x7565[72],xmlData:util[_0x7565[24]](_0x7565[102],entities[_0x7565[55]](_0xaf5bx1e[0]),entities[_0x7565[55]](_0xaf5bx1e[1]),_0xaf5bx1f)},json:true})[_0x7565[67]](function(_0xaf5bx1a){_0xaf5bx1a= JSON[_0x7565[58]](parser[_0x7565[57]](_0xaf5bx1a));if(_0xaf5bx1a[_0x7565[59]]){if(_0xaf5bx1a[_0x7565[59]][_0x7565[60]]&& _0xaf5bx1a[_0x7565[59]][_0x7565[60]][_0x7565[61]]){logger[_0x7565[17]](_0x7565[98]);return request({method:_0x7565[84],uri:util[_0x7565[24]](_0x7565[99],_0xaf5bx11[_0x7565[70]]),qs:{authtoken:_0xaf5bx11[_0x7565[71]],scope:_0x7565[72],id:_0xaf5bx1a[_0x7565[59]][_0x7565[60]][_0x7565[61]][_0x7565[64]][0][_0x7565[63]]},json:true})}};throw  new Error(_0x7565[100]+ JSON[_0x7565[66]](_0xaf5bx1a))})[_0x7565[67]](function(_0xaf5bx1a){if(_0xaf5bx1a[_0x7565[59]]){if(_0xaf5bx1a[_0x7565[59]][_0x7565[60]]){var _0xaf5bx20={};for(var _0xaf5bx22=0,_0xaf5bx23=_0xaf5bx1a[_0x7565[59]][_0x7565[60]][_0x7565[50]][_0x7565[90]][_0x7565[64]][_0x7565[92]];_0xaf5bx22< _0xaf5bx23;_0xaf5bx22++){_0xaf5bx20[_0xaf5bx1a[_0x7565[59]][_0x7565[60]][_0x7565[50]][_0x7565[90]][_0x7565[64]][_0xaf5bx22][_0x7565[93]]]= _0xaf5bx1a[_0x7565[59]][_0x7565[60]][_0x7565[50]][_0x7565[90]][_0x7565[64]][_0xaf5bx22][_0x7565[94]]};return _0xaf5bx20}};throw  new Error(_0x7565[97]+ JSON[_0x7565[66]](_0xaf5bx1a))})}})}})}function request(_0xaf5bx25){logger[_0x7565[107]](_0x7565[106],JSON[_0x7565[66]](_0xaf5bx25));return rp(_0xaf5bx25)}function getCustomFields(_0xaf5bx27,_0xaf5bx15){var _0xaf5bx28={};if(_0xaf5bx27[_0x7565[92]]> 0){_[_0x7565[117]](_0xaf5bx27,function(_0xaf5bx29){if(_0xaf5bx29[_0x7565[108]]=== _0x7565[109]&& _0xaf5bx29[_0x7565[110]]){_0xaf5bx28[_0xaf5bx29[_0x7565[110]]]= _0xaf5bx29[_0x7565[94]].toString()}else {if(_0xaf5bx29[_0x7565[108]]=== _0x7565[111]&& _0xaf5bx29[_0x7565[112]]&& _0xaf5bx29[_0x7565[110]]&& _0xaf5bx15[_0xaf5bx29[_0x7565[112]]]){_0xaf5bx28[_0xaf5bx29[_0x7565[110]]]= _0xaf5bx15[_0xaf5bx29[_0x7565[112]]].toString()}else {if(_0xaf5bx29[_0x7565[108]]=== _0x7565[113]&& _0xaf5bx29[_0x7565[114]]&& _0xaf5bx29[_0x7565[114]][_0x7565[115]]&& _0xaf5bx29[_0x7565[110]]&& _0xaf5bx15[_0xaf5bx29[_0x7565[114]][_0x7565[115]][_0x7565[116]]()]){_0xaf5bx28[_0xaf5bx29[_0x7565[110]]]= _0xaf5bx15[_0xaf5bx29[_0x7565[114]][_0x7565[115]][_0x7565[116]]()].toString()}}}})};return _0xaf5bx28}function getName(_0xaf5bx1e){if(_0xaf5bx1e[_0x7565[118]](_0x7565[25])> 0){var _0xaf5bx2b=_0xaf5bx1e[_0x7565[119]](/ (.+)/);if(_0xaf5bx2b[1]){return _0xaf5bx2b}};return [_0xaf5bx1e,_0xaf5bx1e]}exports[_0x7565[120]]= function(_0xaf5bx2c,_0xaf5bxd,_0xaf5bx14,_0xaf5bx2d,_0xaf5bx2e,_0xaf5bx11){var _0xaf5bx12,_0xaf5bx13;if(_0xaf5bx2e&& _0xaf5bx2e[_0x7565[121]]){logger[_0x7565[17]](_0x7565[122],_0x7565[123]);_0xaf5bxd[_0x7565[124]]= util[_0x7565[24]](_0x7565[125],_0xaf5bx11[_0x7565[126]],_0xaf5bxd[_0x7565[127]],md5(_0xaf5bxd[_0x7565[127]]))}else {_0xaf5bxd[_0x7565[124]]= _0x7565[128]};return getUser(_0xaf5bx11,_0xaf5bx2d[_0x7565[140]])[_0x7565[67]](function(_0xaf5bx31){_0xaf5bx12= _0xaf5bx31;logger[_0x7565[17]](_0x7565[137],_0xaf5bx12[_0x7565[18]]);return getEndUser(_0xaf5bx11,_0xaf5bxd[_0x7565[138]],_0xaf5bxd[_0x7565[139]])})[_0x7565[67]](function(_0xaf5bx31){_0xaf5bx13= _0xaf5bx31;logger[_0x7565[17]](_0x7565[135],_0xaf5bx13[_0x7565[47]]|| _0xaf5bx13[_0x7565[48]]);return getCall(_0xaf5bx11,_0xaf5bx12,_0xaf5bx13,_0xaf5bx14,_0xaf5bxd,_0x7565[136])})[_0x7565[67]](function(_0xaf5bx30){if(_0xaf5bx30){logger[_0x7565[17]](_0x7565[130],_0xaf5bx30[_0x7565[18]]);logger[_0x7565[17]](_0x7565[122],_0x7565[131]);emit(util[_0x7565[24]](_0x7565[132],_0xaf5bx2d[_0x7565[115]]),_0x7565[133],{uri:util[_0x7565[24]](_0x7565[134],_0xaf5bx11[_0x7565[70]],_0xaf5bx30[_0x7565[18]])})}})[_0x7565[129]](function(_0xaf5bx2f){logger[_0x7565[82]](_0x7565[122],JSON[_0x7565[66]](_0xaf5bx2f))})};exports[_0x7565[20]]= function(_0xaf5bx2c,_0xaf5bxd,_0xaf5bx14,_0xaf5bx2d,_0xaf5bx2e,_0xaf5bx11,_0xaf5bx32){var _0xaf5bx12,_0xaf5bx13;if(_0xaf5bx32&& _0xaf5bx32[_0x7565[141]]&& _0xaf5bx32[_0x7565[141]]!== _0x7565[142]){logger[_0x7565[17]](_0x7565[143],_0x7565[123]);_0xaf5bxd[_0x7565[124]]= util[_0x7565[24]](_0x7565[125],_0xaf5bx11[_0x7565[126]],_0xaf5bxd[_0x7565[127]],md5(_0xaf5bxd[_0x7565[127]]))};return getUser(_0xaf5bx11,_0xaf5bx2d[_0x7565[140]])[_0x7565[67]](function(_0xaf5bx31){_0xaf5bx12= _0xaf5bx31;logger[_0x7565[17]](_0x7565[137],_0xaf5bx12[_0x7565[18]]);return getEndUser(_0xaf5bx11,_0xaf5bxd[_0x7565[145]],_0xaf5bxd[_0x7565[146]])})[_0x7565[67]](function(_0xaf5bx31){_0xaf5bx13= _0xaf5bx31;logger[_0x7565[17]](_0x7565[135],_0xaf5bx13[_0x7565[47]]|| _0xaf5bx13[_0x7565[48]]);return getCall(_0xaf5bx11,_0xaf5bx12,_0xaf5bx13,_0xaf5bx14,_0xaf5bxd,_0x7565[144])})[_0x7565[67]](function(_0xaf5bx30){if(_0xaf5bx30){logger[_0x7565[17]](_0x7565[130],_0xaf5bx30[_0x7565[18]]);logger[_0x7565[17]](_0x7565[143],_0x7565[131]);emit(util[_0x7565[24]](_0x7565[132],_0xaf5bx2d[_0x7565[115]]),_0x7565[133],{uri:util[_0x7565[24]](_0x7565[134],_0xaf5bx11[_0x7565[70]],_0xaf5bx30[_0x7565[18]])})}})[_0x7565[129]](function(_0xaf5bx2f){logger[_0x7565[82]](_0x7565[143],JSON[_0x7565[66]](_0xaf5bx2f))})};exports[_0x7565[38]]= function(_0xaf5bx2c,_0xaf5bxd,_0xaf5bx14,_0xaf5bx2d,_0xaf5bx2e,_0xaf5bx11){var _0xaf5bx12,_0xaf5bx13;if(_0xaf5bx2e&& _0xaf5bx2e[_0x7565[121]]){logger[_0x7565[17]](_0x7565[147],_0x7565[123]);_0xaf5bxd[_0x7565[124]]= util[_0x7565[24]](_0x7565[125],_0xaf5bx11[_0x7565[126]],_0xaf5bxd[_0x7565[127]],md5(_0xaf5bxd[_0x7565[127]]))}else {_0xaf5bxd[_0x7565[124]]= _0x7565[128]};return getUser(_0xaf5bx11)[_0x7565[67]](function(_0xaf5bx31){_0xaf5bx12= _0xaf5bx31;logger[_0x7565[17]](_0x7565[137],_0xaf5bx12[_0x7565[18]]);return getEndUser(_0xaf5bx11,_0xaf5bxd[_0x7565[138]],_0xaf5bxd[_0x7565[139]])})[_0x7565[67]](function(_0xaf5bx31){_0xaf5bx13= _0xaf5bx31;logger[_0x7565[17]](_0x7565[135],_0xaf5bx13[_0x7565[47]]|| _0xaf5bx13[_0x7565[48]]);return getCall(_0xaf5bx11,_0xaf5bx12,_0xaf5bx13,_0xaf5bx14,_0xaf5bxd,_0x7565[136])})[_0x7565[67]](function(_0xaf5bx30){if(_0xaf5bx30){logger[_0x7565[17]](_0x7565[130],_0xaf5bx30[_0x7565[18]])}})[_0x7565[129]](function(_0xaf5bx2f){logger[_0x7565[82]](_0x7565[147],JSON[_0x7565[66]](_0xaf5bx2f))})}
\ No newline at end of file
index eca0132..ce9040c 100644 (file)
@@ -1 +1 @@
-var _0x26eb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x75\x74\x69\x6C","\x6D\x75\x73\x74\x61\x63\x68\x65","\x74\x72\x69\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x65\x78\x65\x63","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x72\x65\x6E\x64\x65\x72","\x71\x73","\x47\x45\x54","\x62\x6F\x64\x79","\x50\x4F\x53\x54","\x25\x73\x20\x25\x73\x20\x25\x73\x20\x5B\x25\x73\x5D\x3A\x25\x73","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x6E\x61\x6D\x65","\x6D\x65\x73\x73\x61\x67\x65","\x66\x6F\x72\x6D\x61\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x25\x73\x20\x25\x73\x20\x73\x75\x63\x63\x65\x65\x64\x65\x64\x20\x77\x69\x74\x68\x20\x73\x74\x61\x74\x75\x73\x3A\x20\x25\x64\x20\x61\x6E\x64\x20\x62\x6F\x64\x79\x3A\x20\x25\x73","\x69\x6E\x66\x6F","\x74\x68\x65\x6E"];_0x26eb[0];var rp=require(_0x26eb[1]);var util=require(_0x26eb[2]);var Mustache=require(_0x26eb[3]);var logger=require(_0x26eb[5])(_0x26eb[4]);exports[_0x26eb[6]]= function(_0x2fb6x5,_0x2fb6x6){var _0x2fb6x7={method:_0x2fb6x5[_0x26eb[8]][_0x26eb[7]](),uri:encodeURI(Mustache[_0x26eb[10]](_0x2fb6x5[_0x26eb[9]],_0x2fb6x6)),json:true,resolveWithFullResponse:true};switch(_0x2fb6x5[_0x26eb[8]][_0x26eb[7]]()){case _0x26eb[12]:_0x2fb6x7[_0x26eb[11]]= _0x2fb6x6;break;case _0x26eb[14]:_0x2fb6x7[_0x26eb[13]]= _0x2fb6x6;break};rp(_0x2fb6x7)[_0x26eb[24]](function(_0x2fb6x9){logger[_0x26eb[23]](util[_0x26eb[19]](_0x26eb[22],_0x2fb6x5[_0x26eb[8]],_0x2fb6x5[_0x26eb[9]],_0x2fb6x9[_0x26eb[16]],_0x2fb6x9[_0x26eb[13]]))})[_0x26eb[21]](function(_0x2fb6x8){logger[_0x26eb[20]](util[_0x26eb[19]](_0x26eb[15],_0x2fb6x5[_0x26eb[8]],_0x2fb6x5[_0x26eb[9]],_0x2fb6x8[_0x26eb[16]],_0x2fb6x8[_0x26eb[17]],_0x2fb6x8[_0x26eb[18]]))})}
\ No newline at end of file
+var _0xed6c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x75\x74\x69\x6C","\x6D\x75\x73\x74\x61\x63\x68\x65","\x74\x72\x69\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x65\x78\x65\x63","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x72\x65\x6E\x64\x65\x72","\x71\x73","\x47\x45\x54","\x62\x6F\x64\x79","\x50\x4F\x53\x54","\x25\x73\x20\x25\x73\x20\x25\x73\x20\x5B\x25\x73\x5D\x3A\x25\x73","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x6E\x61\x6D\x65","\x6D\x65\x73\x73\x61\x67\x65","\x66\x6F\x72\x6D\x61\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x25\x73\x20\x25\x73\x20\x73\x75\x63\x63\x65\x65\x64\x65\x64\x20\x77\x69\x74\x68\x20\x73\x74\x61\x74\x75\x73\x3A\x20\x25\x64\x20\x61\x6E\x64\x20\x62\x6F\x64\x79\x3A\x20\x25\x73","\x69\x6E\x66\x6F","\x74\x68\x65\x6E"];_0xed6c[0];var rp=require(_0xed6c[1]);var util=require(_0xed6c[2]);var Mustache=require(_0xed6c[3]);var logger=require(_0xed6c[5])(_0xed6c[4]);exports[_0xed6c[6]]= function(_0x12fdx5,_0x12fdx6){var _0x12fdx7={method:_0x12fdx5[_0xed6c[8]][_0xed6c[7]](),uri:encodeURI(Mustache[_0xed6c[10]](_0x12fdx5[_0xed6c[9]],_0x12fdx6)),json:true,resolveWithFullResponse:true};switch(_0x12fdx5[_0xed6c[8]][_0xed6c[7]]()){case _0xed6c[12]:_0x12fdx7[_0xed6c[11]]= _0x12fdx6;break;case _0xed6c[14]:_0x12fdx7[_0xed6c[13]]= _0x12fdx6;break};rp(_0x12fdx7)[_0xed6c[24]](function(_0x12fdx9){logger[_0xed6c[23]](util[_0xed6c[19]](_0xed6c[22],_0x12fdx5[_0xed6c[8]],_0x12fdx5[_0xed6c[9]],_0x12fdx9[_0xed6c[16]],_0x12fdx9[_0xed6c[13]]))})[_0xed6c[21]](function(_0x12fdx8){logger[_0xed6c[20]](util[_0xed6c[19]](_0xed6c[15],_0x12fdx5[_0xed6c[8]],_0x12fdx5[_0xed6c[9]],_0x12fdx8[_0xed6c[16]],_0x12fdx8[_0xed6c[17]],_0x12fdx8[_0xed6c[18]]))})}
\ No newline at end of file
index 03dd8e7..6f78389 100644 (file)
@@ -1 +1 @@
-var _0x2215=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x52\x65\x71\x75\x65\x73\x74","\x72\x70\x63","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x64\x65\x62\x75\x67","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x2215[0];var jayson=require(_0x2215[1]);var BPromise=require(_0x2215[2]);var logger=require(_0x2215[4])(_0x2215[3]);var client=jayson[_0x2215[6]][_0x2215[5]]({port:9001});client[_0x2215[7]]= function(_0xf94ex5,_0xf94ex6){return  new BPromise(function(_0xf94ex7,_0xf94ex8){return client[_0x2215[15]](_0xf94ex5,_0xf94ex6)[_0x2215[14]](function(_0xf94exa){logger[_0x2215[11]](_0x2215[8],_0x2215[3],_0xf94ex5,_0xf94ex6,_0xf94exa);if(_0xf94exa[_0x2215[9]]){logger[_0x2215[9]](_0x2215[8],_0x2215[3],_0xf94ex5,_0xf94exa[_0x2215[9]][_0x2215[12]],_0xf94ex6);return _0xf94ex8(_0xf94exa[_0x2215[9]][_0x2215[12]])}else {return _0xf94ex7(_0xf94exa[_0x2215[13]])}})[_0x2215[10]](function(_0xf94ex9){logger[_0x2215[9]](_0x2215[8],_0x2215[3],_0xf94ex5,_0xf94ex9,_0xf94ex6);return _0xf94ex8(_0xf94ex9)})})};module[_0x2215[16]]= client
\ No newline at end of file
+var _0x9d6b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x52\x65\x71\x75\x65\x73\x74","\x72\x70\x63","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x64\x65\x62\x75\x67","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x9d6b[0];var jayson=require(_0x9d6b[1]);var BPromise=require(_0x9d6b[2]);var logger=require(_0x9d6b[4])(_0x9d6b[3]);var client=jayson[_0x9d6b[6]][_0x9d6b[5]]({port:9001});client[_0x9d6b[7]]= function(_0x6789x5,_0x6789x6){return  new BPromise(function(_0x6789x7,_0x6789x8){return client[_0x9d6b[15]](_0x6789x5,_0x6789x6)[_0x9d6b[14]](function(_0x6789xa){logger[_0x9d6b[11]](_0x9d6b[8],_0x9d6b[3],_0x6789x5,_0x6789x6,_0x6789xa);if(_0x6789xa[_0x9d6b[9]]){logger[_0x9d6b[9]](_0x9d6b[8],_0x9d6b[3],_0x6789x5,_0x6789xa[_0x9d6b[9]][_0x9d6b[12]],_0x6789x6);return _0x6789x8(_0x6789xa[_0x9d6b[9]][_0x9d6b[12]])}else {return _0x6789x7(_0x6789xa[_0x9d6b[13]])}})[_0x9d6b[10]](function(_0x6789x9){logger[_0x9d6b[9]](_0x9d6b[8],_0x9d6b[3],_0x6789x5,_0x6789x9,_0x6789x6);return _0x6789x8(_0x6789x9)})})};module[_0x9d6b[16]]= client
\ No newline at end of file
index 93654c9..f4eff6b 100644 (file)
@@ -1 +1 @@
-var _0x8974=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2F\x73\x65\x72\x76\x65\x72","\x2E\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65","\x2E\x2F\x6C\x69\x62\x2F\x65\x6D\x61\x69\x6C","\x2E\x2F\x72\x70\x63\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x72\x65\x66\x72\x65\x73\x68","\x74\x68\x65\x6E","\x69\x6E\x69\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x67\x65\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x72\x65\x73\x6F\x6C\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x6C\x69\x73\x74\x65\x6E"];_0x8974[0];var BPromise=require(_0x8974[1]);var server=require(_0x8974[2]);var Realtime=require(_0x8974[3]);var EmailChannel=require(_0x8974[4]);var mailAccount=require(_0x8974[5]);var realtime= new Realtime();var email= new EmailChannel(realtime);function initRealtime(){return BPromise[_0x8974[11]]()[_0x8974[8]](mailAccount[_0x8974[10]]())[_0x8974[8]](realtime[_0x8974[9]]())[_0x8974[8]](function(){email[_0x8974[7]](realtime[_0x8974[6]]);return realtime})}return server[_0x8974[14]](realtime,email)[_0x8974[8]](function(_0x5635xa){return initRealtime()})[_0x8974[8]](function(realtime){return setInterval(initRealtime,10000)})[_0x8974[13]](function(_0x5635x9){console[_0x8974[12]](_0x5635x9)})
\ No newline at end of file
+var _0xbc3f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2F\x73\x65\x72\x76\x65\x72","\x2E\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65","\x2E\x2F\x6C\x69\x62\x2F\x65\x6D\x61\x69\x6C","\x2E\x2F\x72\x70\x63\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x72\x65\x66\x72\x65\x73\x68","\x74\x68\x65\x6E","\x69\x6E\x69\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x67\x65\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x72\x65\x73\x6F\x6C\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x6C\x69\x73\x74\x65\x6E"];_0xbc3f[0];var BPromise=require(_0xbc3f[1]);var server=require(_0xbc3f[2]);var Realtime=require(_0xbc3f[3]);var EmailChannel=require(_0xbc3f[4]);var mailAccount=require(_0xbc3f[5]);var realtime= new Realtime();var email= new EmailChannel(realtime);function initRealtime(){return BPromise[_0xbc3f[11]]()[_0xbc3f[8]](mailAccount[_0xbc3f[10]]())[_0xbc3f[8]](realtime[_0xbc3f[9]]())[_0xbc3f[8]](function(){email[_0xbc3f[7]](realtime[_0xbc3f[6]]);return realtime})}return server[_0xbc3f[14]](realtime,email)[_0xbc3f[8]](function(_0xfcaexa){return initRealtime()})[_0xbc3f[8]](function(realtime){return setInterval(initRealtime,10000)})[_0xbc3f[13]](function(_0xfcaex9){console[_0xbc3f[12]](_0xfcaex9)})
\ No newline at end of file
index 25069e4..45bd70c 100644 (file)
@@ -1 +1 @@
-var _0xe202=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x2E\x2F\x69\x6D\x61\x70","\x2E\x2F\x73\x6D\x74\x70","\x65\x6D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x72\x70\x63\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x73\x74\x61\x72\x74\x20\x65\x6D\x61\x69\x6C\x20\x63\x68\x61\x6E\x6E\x65\x6C","\x69\x6E\x66\x6F","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6D\x61\x70\x41\x63\x63\x6F\x75\x6E\x74\x73","\x73\x6D\x74\x70","\x65\x6D\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x3A\x75\x70\x64\x61\x74\x65","\x72\x65\x66\x72\x65\x73\x68","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x49\x6D\x61\x70","\x61\x63\x74\x69\x76\x65","\x69\x64","\x62\x6F\x78","\x62\x69\x6E\x64","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x70\x42\x6F\x78","\x6F\x6E","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x70\x45\x6D\x61\x69\x6C","\x65\x6E\x64","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x70\x45\x6E\x64","\x65\x72\x72\x6F\x72","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x70\x45\x72\x72\x6F\x72","\x69\x73\x4E\x69\x6C","\x73\x74\x61\x74\x75\x73","\x64\x69\x73\x61\x62\x6C\x65\x64","\x6D\x65\x73\x73\x61\x67\x65\x53\x74\x61\x74\x75\x73","","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x6E\x61\x6D\x65","\x6D\x65\x73\x73\x61\x67\x65\x73","\x74\x6F\x74\x61\x6C","\x4E\x65\x77\x20\x65\x6D\x61\x69\x6C\x20\x66\x72\x6F\x6D\x20\x25\x73\x20\x25\x73\x20\x25\x73\x20\x74\x6F\x20\x25\x73","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","\x6C\x61\x73\x74\x4E\x61\x6D\x65","\x66\x72\x6F\x6D","\x4D\x61\x69\x6C\x20\x6E\x6F\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64\x20\x66\x72\x6F\x6D\x20\x72\x6F\x75\x74\x69\x6E\x67\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x63\x61\x74\x63\x68","\x4D\x61\x69\x6C\x20\x61\x63\x63\x65\x70\x74\x65\x64\x20\x66\x72\x6F\x6D\x20\x72\x6F\x75\x74\x69\x6E\x67","\x74\x68\x65\x6E","\x6E\x6F\x74\x69\x66\x79","\x6C\x61\x73\x74\x53\x79\x6E\x63","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x73\x65\x6E\x64","\x76\x65\x72\x69\x66\x79\x53\x6D\x74\x70","\x53\x6D\x74\x70","\x76\x65\x72\x69\x66\x69\x65\x64","\x76\x65\x72\x69\x66\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xe202[0];var _=require(_0xe202[1]);var moment=require(_0xe202[2]);var BPromise=require(_0xe202[3]);var io=require(_0xe202[5])({host:_0xe202[4],port:6379});var EmailImap=require(_0xe202[6]);var EmailSmtp=require(_0xe202[7]);var logger=require(_0xe202[9])(_0xe202[8]);var mailAccount=require(_0xe202[10]);function EmailChannel(_0x32f3xa){logger[_0xe202[12]](_0xe202[11]);this[_0xe202[13]]= _0x32f3xa[_0xe202[13]];this[_0xe202[14]]= {};this[_0xe202[15]]=  new EmailSmtp()}EmailChannel[_0xe202[17]][_0xe202[16]]= function(_0x32f3xb){io[_0xe202[16]](_0xe202[18],this[_0xe202[13]][_0x32f3xb])};EmailChannel[_0xe202[17]][_0xe202[19]]= function(_0x32f3xc){for(var _0x32f3xb in _0x32f3xc){if(_0x32f3xc[_0xe202[20]](_0x32f3xb)){if(_0x32f3xc[_0x32f3xb][_0xe202[21]]&& _0x32f3xc[_0x32f3xb][_0xe202[22]]){var _0x32f3xd=_0x32f3xc[_0x32f3xb][_0xe202[21]];if(!this[_0xe202[14]][_0xe202[20]](_0x32f3xd[_0xe202[23]])){this[_0xe202[14]][_0x32f3xd[_0xe202[23]]]=  new EmailImap(_0x32f3xd,_0x32f3xc[_0x32f3xb][_0xe202[8]]);this[_0xe202[14]][_0x32f3xd[_0xe202[23]]][_0xe202[27]](_0xe202[24],this[_0xe202[26]][_0xe202[25]](this,_0x32f3xb));this[_0xe202[14]][_0x32f3xd[_0xe202[23]]][_0xe202[27]](_0xe202[8],this[_0xe202[28]][_0xe202[25]](this,_0x32f3xb));this[_0xe202[14]][_0x32f3xd[_0xe202[23]]][_0xe202[27]](_0xe202[29],this[_0xe202[30]][_0xe202[25]](this,_0x32f3xb));this[_0xe202[14]][_0x32f3xd[_0xe202[23]]][_0xe202[27]](_0xe202[31],this[_0xe202[32]][_0xe202[25]](this,_0x32f3xb))}}else {if(_[_0xe202[33]](this[_0xe202[13]][_0x32f3xb].Imap)){this[_0xe202[13]][_0x32f3xb][_0xe202[21]]= {}};this[_0xe202[13]][_0x32f3xb][_0xe202[21]][_0xe202[34]]= _0xe202[35];this[_0xe202[13]][_0x32f3xb][_0xe202[21]][_0xe202[36]]= _0xe202[37];this[_0xe202[16]](_0x32f3xb)}}}};EmailChannel[_0xe202[17]][_0xe202[26]]= function(_0x32f3xb,_0x32f3xe){if(this[_0xe202[13]][_0x32f3xb]){this[_0xe202[13]][_0x32f3xb][_0xe202[21]][_0xe202[34]]= _0xe202[38];this[_0xe202[13]][_0x32f3xb][_0xe202[21]][_0xe202[36]]= _0x32f3xe[_0xe202[39]];if(_0x32f3xe[_0xe202[40]]){this[_0xe202[13]][_0x32f3xb][_0xe202[21]][_0xe202[41]]= _0x32f3xe[_0xe202[40]][_0xe202[41]]};return this[_0xe202[16]](_0x32f3xb)}};EmailChannel[_0xe202[17]][_0xe202[28]]= function(_0x32f3xb,_0x32f3xf){logger[_0xe202[12]](_0xe202[42],_0x32f3xf[_0xe202[43]],_0x32f3xf[_0xe202[44]],_0x32f3xf[_0xe202[45]],_0x32f3xb);if(this[_0xe202[13]][_0x32f3xb]){return mailAccount[_0xe202[51]](_0x32f3xb,_0x32f3xf)[_0xe202[50]](function(_0x32f3x11){if(_0x32f3x11){logger[_0xe202[12]](_0xe202[49])}})[_0xe202[48]](function(_0x32f3x10){logger[_0xe202[31]](_0xe202[46],JSON[_0xe202[47]](_0x32f3x10))})}};EmailChannel[_0xe202[17]][_0xe202[30]]= function(_0x32f3xb){if(this[_0xe202[13]][_0x32f3xb]&& this[_0xe202[13]][_0x32f3xb][_0xe202[21]]){if(this[_0xe202[14]][this[_0xe202[13]][_0x32f3xb][_0xe202[21]][_0xe202[23]]]){delete this[_0xe202[14]][this[_0xe202[13]][_0x32f3xb][_0xe202[21]][_0xe202[23]]]};this[_0xe202[13]][_0x32f3xb][_0xe202[21]][_0xe202[52]]= moment();this[_0xe202[16]](_0x32f3xb)}};EmailChannel[_0xe202[17]][_0xe202[32]]= function(_0x32f3xb,_0x32f3x10){if(this[_0xe202[13]][_0x32f3xb]){this[_0xe202[13]][_0x32f3xb][_0xe202[21]][_0xe202[34]]= _0xe202[31];this[_0xe202[13]][_0x32f3xb][_0xe202[21]][_0xe202[36]]= _0x32f3x10;return this[_0xe202[16]](_0x32f3xb)}};EmailChannel[_0xe202[17]][_0xe202[53]]= function(_0x32f3x12,_0x32f3x13){return this[_0xe202[15]][_0xe202[54]](_0x32f3x12,_0x32f3x13)};EmailChannel[_0xe202[17]][_0xe202[55]]= function(_0x32f3x12){var _0x32f3x14=this;if(this[_0xe202[13]][_0x32f3x12[_0xe202[23]]]){if(_[_0xe202[33]](this[_0xe202[13]][_0x32f3x12[_0xe202[23]]].Smtp)){this[_0xe202[13]][_0x32f3x12[_0xe202[23]]][_0xe202[56]]= {}};this[_0xe202[13]][_0x32f3x12[_0xe202[23]]][_0xe202[56]][_0xe202[52]]= moment();return  new BPromise(function(_0x32f3x15,_0x32f3x16){return _0x32f3x14[_0xe202[15]][_0xe202[58]](_0x32f3x12)[_0xe202[50]](function(_0x32f3x11){_0x32f3x14[_0xe202[13]][_0x32f3x12[_0xe202[23]]][_0xe202[56]][_0xe202[34]]= _0xe202[57];_0x32f3x14[_0xe202[13]][_0x32f3x12[_0xe202[23]]][_0xe202[56]][_0xe202[36]]= _0xe202[37];_0x32f3x14[_0xe202[16]](_0x32f3x12[_0xe202[23]]);_0x32f3x15(_0x32f3x11)})[_0xe202[48]](function(_0x32f3x10){_0x32f3x14[_0xe202[13]][_0x32f3x12[_0xe202[23]]][_0xe202[56]][_0xe202[34]]= _0xe202[31];_0x32f3x14[_0xe202[13]][_0x32f3x12[_0xe202[23]]][_0xe202[56]][_0xe202[36]]= _0x32f3x10;_0x32f3x14[_0xe202[16]](_0x32f3x12[_0xe202[23]]);_0x32f3x16(_0x32f3x10)})})};return this[_0xe202[15]][_0xe202[58]](_0x32f3x12)};module[_0xe202[59]]= EmailChannel
\ No newline at end of file
+var _0xffc7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x2E\x2F\x69\x6D\x61\x70","\x2E\x2F\x73\x6D\x74\x70","\x65\x6D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x72\x70\x63\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x73\x74\x61\x72\x74\x20\x65\x6D\x61\x69\x6C\x20\x63\x68\x61\x6E\x6E\x65\x6C","\x69\x6E\x66\x6F","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x6D\x61\x70\x41\x63\x63\x6F\x75\x6E\x74\x73","\x73\x6D\x74\x70","\x65\x6D\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x3A\x75\x70\x64\x61\x74\x65","\x72\x65\x66\x72\x65\x73\x68","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x49\x6D\x61\x70","\x61\x63\x74\x69\x76\x65","\x69\x64","\x62\x6F\x78","\x62\x69\x6E\x64","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x70\x42\x6F\x78","\x6F\x6E","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x70\x45\x6D\x61\x69\x6C","\x65\x6E\x64","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x70\x45\x6E\x64","\x65\x72\x72\x6F\x72","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x70\x45\x72\x72\x6F\x72","\x69\x73\x4E\x69\x6C","\x73\x74\x61\x74\x75\x73","\x64\x69\x73\x61\x62\x6C\x65\x64","\x6D\x65\x73\x73\x61\x67\x65\x53\x74\x61\x74\x75\x73","","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x6E\x61\x6D\x65","\x6D\x65\x73\x73\x61\x67\x65\x73","\x74\x6F\x74\x61\x6C","\x4E\x65\x77\x20\x65\x6D\x61\x69\x6C\x20\x66\x72\x6F\x6D\x20\x25\x73\x20\x25\x73\x20\x25\x73\x20\x74\x6F\x20\x25\x73","\x66\x69\x72\x73\x74\x4E\x61\x6D\x65","\x6C\x61\x73\x74\x4E\x61\x6D\x65","\x66\x72\x6F\x6D","\x4D\x61\x69\x6C\x20\x6E\x6F\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64\x20\x66\x72\x6F\x6D\x20\x72\x6F\x75\x74\x69\x6E\x67\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x63\x61\x74\x63\x68","\x4D\x61\x69\x6C\x20\x61\x63\x63\x65\x70\x74\x65\x64\x20\x66\x72\x6F\x6D\x20\x72\x6F\x75\x74\x69\x6E\x67","\x74\x68\x65\x6E","\x6E\x6F\x74\x69\x66\x79","\x6C\x61\x73\x74\x53\x79\x6E\x63","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x73\x65\x6E\x64","\x76\x65\x72\x69\x66\x79\x53\x6D\x74\x70","\x53\x6D\x74\x70","\x76\x65\x72\x69\x66\x69\x65\x64","\x76\x65\x72\x69\x66\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xffc7[0];var _=require(_0xffc7[1]);var moment=require(_0xffc7[2]);var BPromise=require(_0xffc7[3]);var io=require(_0xffc7[5])({host:_0xffc7[4],port:6379});var EmailImap=require(_0xffc7[6]);var EmailSmtp=require(_0xffc7[7]);var logger=require(_0xffc7[9])(_0xffc7[8]);var mailAccount=require(_0xffc7[10]);function EmailChannel(_0xfa9axa){logger[_0xffc7[12]](_0xffc7[11]);this[_0xffc7[13]]= _0xfa9axa[_0xffc7[13]];this[_0xffc7[14]]= {};this[_0xffc7[15]]=  new EmailSmtp()}EmailChannel[_0xffc7[17]][_0xffc7[16]]= function(_0xfa9axb){io[_0xffc7[16]](_0xffc7[18],this[_0xffc7[13]][_0xfa9axb])};EmailChannel[_0xffc7[17]][_0xffc7[19]]= function(_0xfa9axc){for(var _0xfa9axb in _0xfa9axc){if(_0xfa9axc[_0xffc7[20]](_0xfa9axb)){if(_0xfa9axc[_0xfa9axb][_0xffc7[21]]&& _0xfa9axc[_0xfa9axb][_0xffc7[22]]){var _0xfa9axd=_0xfa9axc[_0xfa9axb][_0xffc7[21]];if(!this[_0xffc7[14]][_0xffc7[20]](_0xfa9axd[_0xffc7[23]])){this[_0xffc7[14]][_0xfa9axd[_0xffc7[23]]]=  new EmailImap(_0xfa9axd,_0xfa9axc[_0xfa9axb][_0xffc7[8]]);this[_0xffc7[14]][_0xfa9axd[_0xffc7[23]]][_0xffc7[27]](_0xffc7[24],this[_0xffc7[26]][_0xffc7[25]](this,_0xfa9axb));this[_0xffc7[14]][_0xfa9axd[_0xffc7[23]]][_0xffc7[27]](_0xffc7[8],this[_0xffc7[28]][_0xffc7[25]](this,_0xfa9axb));this[_0xffc7[14]][_0xfa9axd[_0xffc7[23]]][_0xffc7[27]](_0xffc7[29],this[_0xffc7[30]][_0xffc7[25]](this,_0xfa9axb));this[_0xffc7[14]][_0xfa9axd[_0xffc7[23]]][_0xffc7[27]](_0xffc7[31],this[_0xffc7[32]][_0xffc7[25]](this,_0xfa9axb))}}else {if(_[_0xffc7[33]](this[_0xffc7[13]][_0xfa9axb].Imap)){this[_0xffc7[13]][_0xfa9axb][_0xffc7[21]]= {}};this[_0xffc7[13]][_0xfa9axb][_0xffc7[21]][_0xffc7[34]]= _0xffc7[35];this[_0xffc7[13]][_0xfa9axb][_0xffc7[21]][_0xffc7[36]]= _0xffc7[37];this[_0xffc7[16]](_0xfa9axb)}}}};EmailChannel[_0xffc7[17]][_0xffc7[26]]= function(_0xfa9axb,_0xfa9axe){if(this[_0xffc7[13]][_0xfa9axb]){this[_0xffc7[13]][_0xfa9axb][_0xffc7[21]][_0xffc7[34]]= _0xffc7[38];this[_0xffc7[13]][_0xfa9axb][_0xffc7[21]][_0xffc7[36]]= _0xfa9axe[_0xffc7[39]];if(_0xfa9axe[_0xffc7[40]]){this[_0xffc7[13]][_0xfa9axb][_0xffc7[21]][_0xffc7[41]]= _0xfa9axe[_0xffc7[40]][_0xffc7[41]]};return this[_0xffc7[16]](_0xfa9axb)}};EmailChannel[_0xffc7[17]][_0xffc7[28]]= function(_0xfa9axb,_0xfa9axf){logger[_0xffc7[12]](_0xffc7[42],_0xfa9axf[_0xffc7[43]],_0xfa9axf[_0xffc7[44]],_0xfa9axf[_0xffc7[45]],_0xfa9axb);if(this[_0xffc7[13]][_0xfa9axb]){return mailAccount[_0xffc7[51]](_0xfa9axb,_0xfa9axf)[_0xffc7[50]](function(_0xfa9ax11){if(_0xfa9ax11){logger[_0xffc7[12]](_0xffc7[49])}})[_0xffc7[48]](function(_0xfa9ax10){logger[_0xffc7[31]](_0xffc7[46],JSON[_0xffc7[47]](_0xfa9ax10))})}};EmailChannel[_0xffc7[17]][_0xffc7[30]]= function(_0xfa9axb){if(this[_0xffc7[13]][_0xfa9axb]&& this[_0xffc7[13]][_0xfa9axb][_0xffc7[21]]){if(this[_0xffc7[14]][this[_0xffc7[13]][_0xfa9axb][_0xffc7[21]][_0xffc7[23]]]){delete this[_0xffc7[14]][this[_0xffc7[13]][_0xfa9axb][_0xffc7[21]][_0xffc7[23]]]};this[_0xffc7[13]][_0xfa9axb][_0xffc7[21]][_0xffc7[52]]= moment();this[_0xffc7[16]](_0xfa9axb)}};EmailChannel[_0xffc7[17]][_0xffc7[32]]= function(_0xfa9axb,_0xfa9ax10){if(this[_0xffc7[13]][_0xfa9axb]){this[_0xffc7[13]][_0xfa9axb][_0xffc7[21]][_0xffc7[34]]= _0xffc7[31];this[_0xffc7[13]][_0xfa9axb][_0xffc7[21]][_0xffc7[36]]= _0xfa9ax10;return this[_0xffc7[16]](_0xfa9axb)}};EmailChannel[_0xffc7[17]][_0xffc7[53]]= function(_0xfa9ax12,_0xfa9ax13){return this[_0xffc7[15]][_0xffc7[54]](_0xfa9ax12,_0xfa9ax13)};EmailChannel[_0xffc7[17]][_0xffc7[55]]= function(_0xfa9ax12){var _0xfa9ax14=this;if(this[_0xffc7[13]][_0xfa9ax12[_0xffc7[23]]]){if(_[_0xffc7[33]](this[_0xffc7[13]][_0xfa9ax12[_0xffc7[23]]].Smtp)){this[_0xffc7[13]][_0xfa9ax12[_0xffc7[23]]][_0xffc7[56]]= {}};this[_0xffc7[13]][_0xfa9ax12[_0xffc7[23]]][_0xffc7[56]][_0xffc7[52]]= moment();return  new BPromise(function(_0xfa9ax15,_0xfa9ax16){return _0xfa9ax14[_0xffc7[15]][_0xffc7[58]](_0xfa9ax12)[_0xffc7[50]](function(_0xfa9ax11){_0xfa9ax14[_0xffc7[13]][_0xfa9ax12[_0xffc7[23]]][_0xffc7[56]][_0xffc7[34]]= _0xffc7[57];_0xfa9ax14[_0xffc7[13]][_0xfa9ax12[_0xffc7[23]]][_0xffc7[56]][_0xffc7[36]]= _0xffc7[37];_0xfa9ax14[_0xffc7[16]](_0xfa9ax12[_0xffc7[23]]);_0xfa9ax15(_0xfa9ax11)})[_0xffc7[48]](function(_0xfa9ax10){_0xfa9ax14[_0xffc7[13]][_0xfa9ax12[_0xffc7[23]]][_0xffc7[56]][_0xffc7[34]]= _0xffc7[31];_0xfa9ax14[_0xffc7[13]][_0xfa9ax12[_0xffc7[23]]][_0xffc7[56]][_0xffc7[36]]= _0xfa9ax10;_0xfa9ax14[_0xffc7[16]](_0xfa9ax12[_0xffc7[23]]);_0xfa9ax16(_0xfa9ax10)})})};return this[_0xffc7[15]][_0xffc7[58]](_0xfa9ax12)};module[_0xffc7[59]]= EmailChannel
\ No newline at end of file
index 653ff31..d1998dc 100644 (file)
@@ -1 +1 @@
-var _0x75b1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x70\x61\x74\x68","\x75\x74\x69\x6C","\x69\x6D\x61\x70","\x6C\x6F\x64\x61\x73\x68","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x73\x69\x6D\x70\x6C\x65\x50\x61\x72\x73\x65\x72","\x6D\x61\x69\x6C\x70\x61\x72\x73\x65\x72","\x45\x76\x65\x6E\x74\x45\x6D\x69\x74\x74\x65\x72","\x65\x76\x65\x6E\x74\x73","\x2E\x2F\x75\x74\x69\x6C\x73","\x65\x6D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x61\x69\x6C\x62\x6F\x78","\x49\x4E\x42\x4F\x58","\x61\x63\x63\x6F\x75\x6E\x74","\x67\x65\x74\x41\x63\x63\x6F\x75\x6E\x74","\x72\x65\x61\x64\x79","\x62\x69\x6E\x64","\x68\x61\x6E\x64\x6C\x65\x52\x65\x61\x64\x79","\x6F\x6E\x63\x65","\x65\x6E\x64","\x68\x61\x6E\x64\x6C\x65\x45\x6E\x64","\x65\x72\x72\x6F\x72","\x68\x61\x6E\x64\x6C\x65\x45\x72\x72\x6F\x72","\x6F\x6E","\x63\x6F\x6E\x6E\x65\x63\x74","\x69\x6E\x68\x65\x72\x69\x74\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x6E\x54\x69\x6D\x65\x6F\x75\x74","\x61\x75\x74\x68\x54\x69\x6D\x65\x6F\x75\x74","\x73\x65\x72\x76\x69\x63\x65","\x69\x73\x4E\x69\x6C","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E","\x75\x73\x65\x72","\x70\x61\x73\x73\x77\x6F\x72\x64","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x74\x6C\x73","\x61\x75\x74\x6F\x74\x6C\x73","\x72\x65\x71\x75\x69\x72\x65\x64","\x67\x65\x74\x48\x6F\x73\x74","\x61\x6E\x6F\x6E\x79\x6D\x6F\x75\x73\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x68\x61\x6E\x64\x6C\x65\x4F\x70\x65\x6E\x42\x6F\x78","\x6F\x70\x65\x6E\x42\x6F\x78","\x62\x6F\x78","\x65\x6D\x69\x74","\x72\x65\x61\x64\x55\x6E\x73\x65\x65\x6E","\x68\x61\x6E\x64\x6C\x65\x43\x6C\x6F\x73\x65\x42\x6F\x78","\x55\x4E\x53\x45\x45\x4E","\x68\x61\x6E\x64\x6C\x65\x52\x65\x61\x64\x55\x6E\x73\x65\x65\x6E","\x73\x65\x61\x72\x63\x68","\x6C\x65\x6E\x67\x74\x68","","\x66\x65\x74\x63\x68","\x6D\x65\x73\x73\x61\x67\x65","\x68\x61\x6E\x64\x6C\x65\x46\x65\x74\x63\x68\x4D\x65\x73\x73\x61\x67\x65","\x68\x61\x6E\x64\x6C\x65\x46\x65\x74\x63\x68\x45\x72\x72\x6F\x72","\x68\x61\x6E\x64\x6C\x65\x46\x65\x74\x63\x68\x45\x6E\x64","\x63\x6C\x6F\x73\x65\x42\x6F\x78","\x62\x6F\x64\x79","\x68\x61\x6E\x64\x6C\x65\x4D\x65\x73\x73\x61\x67\x65\x42\x6F\x64\x79","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x68\x61\x6E\x64\x6C\x65\x4D\x65\x73\x73\x61\x67\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x68\x61\x6E\x64\x6C\x65\x4D\x65\x73\x73\x61\x67\x65\x45\x6E\x64","\x68\x61\x6E\x64\x6C\x65\x53\x69\x6D\x70\x6C\x65\x50\x61\x72\x73\x65\x72","\x70\x61\x72\x73\x65\x72","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x74\x65\x78\x74\x43\x6F\x64\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x75\x70\x70\x65\x72\x46\x69\x72\x73\x74","\x3A\x20","\x0A","\x65\x78\x70\x6F\x72\x74\x73"];_0x75b1[0];var fs=require(_0x75b1[1]);var path=require(_0x75b1[2]);var util=require(_0x75b1[3]);var Imap=require(_0x75b1[4]);var _=require(_0x75b1[5]);var rs=require(_0x75b1[6]);var simpleParser=require(_0x75b1[8])[_0x75b1[7]];var EventEmitter=require(_0x75b1[10])[_0x75b1[9]];var utils=require(_0x75b1[11]);var logger=require(_0x75b1[13])(_0x75b1[12]);function EmailImap(_0xdb67xc,_0xdb67xd){this[_0x75b1[14]]= _0x75b1[15];this[_0x75b1[16]]= this[_0x75b1[17]](_0xdb67xc,_0xdb67xd);this[_0x75b1[4]]=  new Imap(this[_0x75b1[16]]);this[_0x75b1[4]][_0x75b1[21]](_0x75b1[18],this[_0x75b1[20]][_0x75b1[19]](this));this[_0x75b1[4]][_0x75b1[21]](_0x75b1[22],this[_0x75b1[23]][_0x75b1[19]](this));this[_0x75b1[4]][_0x75b1[26]](_0x75b1[24],this[_0x75b1[25]][_0x75b1[19]](this));this[_0x75b1[4]][_0x75b1[27]]()}util[_0x75b1[28]](EmailImap,EventEmitter);EmailImap[_0x75b1[29]][_0x75b1[17]]= function(_0xdb67xc,_0xdb67xd){var _0xdb67xe={connTimeout:_0xdb67xc[_0x75b1[30]]?_0xdb67xc[_0x75b1[30]]* 1000:10000,authTimeout:_0xdb67xc[_0x75b1[31]]?_0xdb67xc[_0x75b1[31]]* 1000:5000};if(_[_0x75b1[33]](_0xdb67xc[_0x75b1[32]])){if(_0xdb67xc[_0x75b1[34]]){_0xdb67xe[_0x75b1[35]]= _0xdb67xc[_0x75b1[35]];_0xdb67xe[_0x75b1[36]]= _0xdb67xc[_0x75b1[36]]};_0xdb67xe[_0x75b1[37]]= _0xdb67xc[_0x75b1[37]];_0xdb67xe[_0x75b1[38]]= _0xdb67xc[_0x75b1[38]]|| 993;if(_0xdb67xc[_0x75b1[39]]){_0xdb67xe[_0x75b1[39]]= true}else {_0xdb67xe[_0x75b1[39]]= false;_0xdb67xe[_0x75b1[40]]= _0x75b1[41]}}else {_0xdb67xe[_0x75b1[35]]= _0xdb67xc[_0x75b1[35]];_0xdb67xe[_0x75b1[36]]= _0xdb67xc[_0x75b1[36]];_0xdb67xe[_0x75b1[37]]= utils[_0x75b1[42]](_0xdb67xc[_0x75b1[32]]);_0xdb67xe[_0x75b1[38]]= 993;_0xdb67xe[_0x75b1[39]]= true};_0xdb67xe[_0x75b1[12]]= _0xdb67xd|| _0xdb67xc[_0x75b1[35]]|| _0x75b1[43];return _0xdb67xe};EmailImap[_0x75b1[29]][_0x75b1[20]]= function(){this[_0x75b1[4]][_0x75b1[45]](this[_0x75b1[14]],false,this[_0x75b1[44]][_0x75b1[19]](this))};EmailImap[_0x75b1[29]][_0x75b1[44]]= function(_0xdb67xf,_0xdb67x10){if(_0xdb67xf){this[_0x75b1[25]](_0xdb67xf,true)}else {this[_0x75b1[47]](_0x75b1[46],_0xdb67x10);this[_0x75b1[48]]()}};EmailImap[_0x75b1[29]][_0x75b1[49]]= function(_0xdb67xf){if(_0xdb67xf){this[_0x75b1[25]](_0xdb67xf,true)}else {this[_0x75b1[4]][_0x75b1[22]]()}};EmailImap[_0x75b1[29]][_0x75b1[48]]= function(){this[_0x75b1[4]][_0x75b1[52]]([_0x75b1[50]],this[_0x75b1[51]][_0x75b1[19]](this))};EmailImap[_0x75b1[29]][_0x75b1[51]]= function(_0xdb67xf,_0xdb67x11){if(_0xdb67xf){this[_0x75b1[25]](_0xdb67xf,true)}else {if(_0xdb67x11[_0x75b1[53]]){try{var _0xdb67x12=this[_0x75b1[4]][_0x75b1[55]](_0xdb67x11,{bodies:_0x75b1[54],markSeen:true});_0xdb67x12[_0x75b1[26]](_0x75b1[56],this[_0x75b1[57]][_0x75b1[19]](this));_0xdb67x12[_0x75b1[21]](_0x75b1[24],this[_0x75b1[58]][_0x75b1[19]](this));_0xdb67x12[_0x75b1[21]](_0x75b1[22],this[_0x75b1[59]][_0x75b1[19]](this))}catch(e){logger[_0x75b1[24]](e)}}else {this[_0x75b1[4]][_0x75b1[60]](true,this[_0x75b1[49]][_0x75b1[19]](this))}}};EmailImap[_0x75b1[29]][_0x75b1[57]]= function(_0xdb67x13,_0xdb67x14){_0xdb67x13[_0x75b1[26]](_0x75b1[61],this[_0x75b1[62]][_0x75b1[19]](this));_0xdb67x13[_0x75b1[21]](_0x75b1[63],this[_0x75b1[64]][_0x75b1[19]](this));_0xdb67x13[_0x75b1[21]](_0x75b1[22],this[_0x75b1[65]][_0x75b1[19]](this))};EmailImap[_0x75b1[29]][_0x75b1[62]]= function(_0xdb67x15,_0xdb67x16){simpleParser(_0xdb67x15,this[_0x75b1[66]][_0x75b1[19]](this))};EmailImap[_0x75b1[29]][_0x75b1[64]]= function(_0xdb67x17){};EmailImap[_0x75b1[29]][_0x75b1[65]]= function(){};EmailImap[_0x75b1[29]][_0x75b1[66]]= function(_0xdb67xf,_0xdb67xd){if(_0xdb67xf){logger[_0x75b1[24]](_0xdb67xf)}else {this[_0x75b1[47]](_0x75b1[12],utils[_0x75b1[67]](this[_0x75b1[16]],_0xdb67xd))}};EmailImap[_0x75b1[29]][_0x75b1[59]]= function(){this[_0x75b1[4]][_0x75b1[60]](true,this[_0x75b1[49]][_0x75b1[19]](this))};EmailImap[_0x75b1[29]][_0x75b1[58]]= function(_0xdb67xf){this[_0x75b1[25]](_0xdb67xf);this[_0x75b1[4]][_0x75b1[60]](true,this[_0x75b1[49]][_0x75b1[19]](this))};EmailImap[_0x75b1[29]][_0x75b1[23]]= function(){this[_0x75b1[47]](_0x75b1[22])};EmailImap[_0x75b1[29]][_0x75b1[25]]= function(_0xdb67xf,_0xdb67x18){logger[_0x75b1[24]](_0x75b1[25],this[_0x75b1[16]][_0x75b1[12]],JSON[_0x75b1[68]](_0xdb67xf));var _0xdb67x19=_0x75b1[54];if(_0xdb67xf){if(_0xdb67xf[_0x75b1[69]]){_0xdb67x19= _0xdb67xf[_0x75b1[69]]}else {for(var _0xdb67x1a in _0xdb67xf){if(_0xdb67xf[_0x75b1[70]](_0xdb67x1a)){_0xdb67x19+= _[_0x75b1[71]](_0xdb67x1a)+ _0x75b1[72]+ _0xdb67xf[_0xdb67x1a]+ _0x75b1[73]}}}};if(_0xdb67x18){this[_0x75b1[4]][_0x75b1[22]]()}else {this[_0x75b1[47]](_0x75b1[24],_0xdb67x19);this[_0x75b1[47]](_0x75b1[22])}};module[_0x75b1[74]]= EmailImap
\ No newline at end of file
+var _0x7d82=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x70\x61\x74\x68","\x75\x74\x69\x6C","\x69\x6D\x61\x70","\x6C\x6F\x64\x61\x73\x68","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x73\x69\x6D\x70\x6C\x65\x50\x61\x72\x73\x65\x72","\x6D\x61\x69\x6C\x70\x61\x72\x73\x65\x72","\x45\x76\x65\x6E\x74\x45\x6D\x69\x74\x74\x65\x72","\x65\x76\x65\x6E\x74\x73","\x2E\x2F\x75\x74\x69\x6C\x73","\x65\x6D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6D\x61\x69\x6C\x62\x6F\x78","\x49\x4E\x42\x4F\x58","\x61\x63\x63\x6F\x75\x6E\x74","\x67\x65\x74\x41\x63\x63\x6F\x75\x6E\x74","\x72\x65\x61\x64\x79","\x62\x69\x6E\x64","\x68\x61\x6E\x64\x6C\x65\x52\x65\x61\x64\x79","\x6F\x6E\x63\x65","\x65\x6E\x64","\x68\x61\x6E\x64\x6C\x65\x45\x6E\x64","\x65\x72\x72\x6F\x72","\x68\x61\x6E\x64\x6C\x65\x45\x72\x72\x6F\x72","\x6F\x6E","\x63\x6F\x6E\x6E\x65\x63\x74","\x69\x6E\x68\x65\x72\x69\x74\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x6E\x54\x69\x6D\x65\x6F\x75\x74","\x61\x75\x74\x68\x54\x69\x6D\x65\x6F\x75\x74","\x73\x65\x72\x76\x69\x63\x65","\x69\x73\x4E\x69\x6C","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E","\x75\x73\x65\x72","\x70\x61\x73\x73\x77\x6F\x72\x64","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x74\x6C\x73","\x61\x75\x74\x6F\x74\x6C\x73","\x72\x65\x71\x75\x69\x72\x65\x64","\x67\x65\x74\x48\x6F\x73\x74","\x61\x6E\x6F\x6E\x79\x6D\x6F\x75\x73\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x68\x61\x6E\x64\x6C\x65\x4F\x70\x65\x6E\x42\x6F\x78","\x6F\x70\x65\x6E\x42\x6F\x78","\x62\x6F\x78","\x65\x6D\x69\x74","\x72\x65\x61\x64\x55\x6E\x73\x65\x65\x6E","\x68\x61\x6E\x64\x6C\x65\x43\x6C\x6F\x73\x65\x42\x6F\x78","\x55\x4E\x53\x45\x45\x4E","\x68\x61\x6E\x64\x6C\x65\x52\x65\x61\x64\x55\x6E\x73\x65\x65\x6E","\x73\x65\x61\x72\x63\x68","\x6C\x65\x6E\x67\x74\x68","","\x66\x65\x74\x63\x68","\x6D\x65\x73\x73\x61\x67\x65","\x68\x61\x6E\x64\x6C\x65\x46\x65\x74\x63\x68\x4D\x65\x73\x73\x61\x67\x65","\x68\x61\x6E\x64\x6C\x65\x46\x65\x74\x63\x68\x45\x72\x72\x6F\x72","\x68\x61\x6E\x64\x6C\x65\x46\x65\x74\x63\x68\x45\x6E\x64","\x63\x6C\x6F\x73\x65\x42\x6F\x78","\x62\x6F\x64\x79","\x68\x61\x6E\x64\x6C\x65\x4D\x65\x73\x73\x61\x67\x65\x42\x6F\x64\x79","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x68\x61\x6E\x64\x6C\x65\x4D\x65\x73\x73\x61\x67\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x68\x61\x6E\x64\x6C\x65\x4D\x65\x73\x73\x61\x67\x65\x45\x6E\x64","\x68\x61\x6E\x64\x6C\x65\x53\x69\x6D\x70\x6C\x65\x50\x61\x72\x73\x65\x72","\x70\x61\x72\x73\x65\x72","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x74\x65\x78\x74\x43\x6F\x64\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x75\x70\x70\x65\x72\x46\x69\x72\x73\x74","\x3A\x20","\x0A","\x65\x78\x70\x6F\x72\x74\x73"];_0x7d82[0];var fs=require(_0x7d82[1]);var path=require(_0x7d82[2]);var util=require(_0x7d82[3]);var Imap=require(_0x7d82[4]);var _=require(_0x7d82[5]);var rs=require(_0x7d82[6]);var simpleParser=require(_0x7d82[8])[_0x7d82[7]];var EventEmitter=require(_0x7d82[10])[_0x7d82[9]];var utils=require(_0x7d82[11]);var logger=require(_0x7d82[13])(_0x7d82[12]);function EmailImap(_0x8c99xc,_0x8c99xd){this[_0x7d82[14]]= _0x7d82[15];this[_0x7d82[16]]= this[_0x7d82[17]](_0x8c99xc,_0x8c99xd);this[_0x7d82[4]]=  new Imap(this[_0x7d82[16]]);this[_0x7d82[4]][_0x7d82[21]](_0x7d82[18],this[_0x7d82[20]][_0x7d82[19]](this));this[_0x7d82[4]][_0x7d82[21]](_0x7d82[22],this[_0x7d82[23]][_0x7d82[19]](this));this[_0x7d82[4]][_0x7d82[26]](_0x7d82[24],this[_0x7d82[25]][_0x7d82[19]](this));this[_0x7d82[4]][_0x7d82[27]]()}util[_0x7d82[28]](EmailImap,EventEmitter);EmailImap[_0x7d82[29]][_0x7d82[17]]= function(_0x8c99xc,_0x8c99xd){var _0x8c99xe={connTimeout:_0x8c99xc[_0x7d82[30]]?_0x8c99xc[_0x7d82[30]]* 1000:10000,authTimeout:_0x8c99xc[_0x7d82[31]]?_0x8c99xc[_0x7d82[31]]* 1000:5000};if(_[_0x7d82[33]](_0x8c99xc[_0x7d82[32]])){if(_0x8c99xc[_0x7d82[34]]){_0x8c99xe[_0x7d82[35]]= _0x8c99xc[_0x7d82[35]];_0x8c99xe[_0x7d82[36]]= _0x8c99xc[_0x7d82[36]]};_0x8c99xe[_0x7d82[37]]= _0x8c99xc[_0x7d82[37]];_0x8c99xe[_0x7d82[38]]= _0x8c99xc[_0x7d82[38]]|| 993;if(_0x8c99xc[_0x7d82[39]]){_0x8c99xe[_0x7d82[39]]= true}else {_0x8c99xe[_0x7d82[39]]= false;_0x8c99xe[_0x7d82[40]]= _0x7d82[41]}}else {_0x8c99xe[_0x7d82[35]]= _0x8c99xc[_0x7d82[35]];_0x8c99xe[_0x7d82[36]]= _0x8c99xc[_0x7d82[36]];_0x8c99xe[_0x7d82[37]]= utils[_0x7d82[42]](_0x8c99xc[_0x7d82[32]]);_0x8c99xe[_0x7d82[38]]= 993;_0x8c99xe[_0x7d82[39]]= true};_0x8c99xe[_0x7d82[12]]= _0x8c99xd|| _0x8c99xc[_0x7d82[35]]|| _0x7d82[43];return _0x8c99xe};EmailImap[_0x7d82[29]][_0x7d82[20]]= function(){this[_0x7d82[4]][_0x7d82[45]](this[_0x7d82[14]],false,this[_0x7d82[44]][_0x7d82[19]](this))};EmailImap[_0x7d82[29]][_0x7d82[44]]= function(_0x8c99xf,_0x8c99x10){if(_0x8c99xf){this[_0x7d82[25]](_0x8c99xf,true)}else {this[_0x7d82[47]](_0x7d82[46],_0x8c99x10);this[_0x7d82[48]]()}};EmailImap[_0x7d82[29]][_0x7d82[49]]= function(_0x8c99xf){if(_0x8c99xf){this[_0x7d82[25]](_0x8c99xf,true)}else {this[_0x7d82[4]][_0x7d82[22]]()}};EmailImap[_0x7d82[29]][_0x7d82[48]]= function(){this[_0x7d82[4]][_0x7d82[52]]([_0x7d82[50]],this[_0x7d82[51]][_0x7d82[19]](this))};EmailImap[_0x7d82[29]][_0x7d82[51]]= function(_0x8c99xf,_0x8c99x11){if(_0x8c99xf){this[_0x7d82[25]](_0x8c99xf,true)}else {if(_0x8c99x11[_0x7d82[53]]){try{var _0x8c99x12=this[_0x7d82[4]][_0x7d82[55]](_0x8c99x11,{bodies:_0x7d82[54],markSeen:true});_0x8c99x12[_0x7d82[26]](_0x7d82[56],this[_0x7d82[57]][_0x7d82[19]](this));_0x8c99x12[_0x7d82[21]](_0x7d82[24],this[_0x7d82[58]][_0x7d82[19]](this));_0x8c99x12[_0x7d82[21]](_0x7d82[22],this[_0x7d82[59]][_0x7d82[19]](this))}catch(e){logger[_0x7d82[24]](e)}}else {this[_0x7d82[4]][_0x7d82[60]](true,this[_0x7d82[49]][_0x7d82[19]](this))}}};EmailImap[_0x7d82[29]][_0x7d82[57]]= function(_0x8c99x13,_0x8c99x14){_0x8c99x13[_0x7d82[26]](_0x7d82[61],this[_0x7d82[62]][_0x7d82[19]](this));_0x8c99x13[_0x7d82[21]](_0x7d82[63],this[_0x7d82[64]][_0x7d82[19]](this));_0x8c99x13[_0x7d82[21]](_0x7d82[22],this[_0x7d82[65]][_0x7d82[19]](this))};EmailImap[_0x7d82[29]][_0x7d82[62]]= function(_0x8c99x15,_0x8c99x16){simpleParser(_0x8c99x15,this[_0x7d82[66]][_0x7d82[19]](this))};EmailImap[_0x7d82[29]][_0x7d82[64]]= function(_0x8c99x17){};EmailImap[_0x7d82[29]][_0x7d82[65]]= function(){};EmailImap[_0x7d82[29]][_0x7d82[66]]= function(_0x8c99xf,_0x8c99xd){if(_0x8c99xf){logger[_0x7d82[24]](_0x8c99xf)}else {this[_0x7d82[47]](_0x7d82[12],utils[_0x7d82[67]](this[_0x7d82[16]],_0x8c99xd))}};EmailImap[_0x7d82[29]][_0x7d82[59]]= function(){this[_0x7d82[4]][_0x7d82[60]](true,this[_0x7d82[49]][_0x7d82[19]](this))};EmailImap[_0x7d82[29]][_0x7d82[58]]= function(_0x8c99xf){this[_0x7d82[25]](_0x8c99xf);this[_0x7d82[4]][_0x7d82[60]](true,this[_0x7d82[49]][_0x7d82[19]](this))};EmailImap[_0x7d82[29]][_0x7d82[23]]= function(){this[_0x7d82[47]](_0x7d82[22])};EmailImap[_0x7d82[29]][_0x7d82[25]]= function(_0x8c99xf,_0x8c99x18){logger[_0x7d82[24]](_0x7d82[25],this[_0x7d82[16]][_0x7d82[12]],JSON[_0x7d82[68]](_0x8c99xf));var _0x8c99x19=_0x7d82[54];if(_0x8c99xf){if(_0x8c99xf[_0x7d82[69]]){_0x8c99x19= _0x8c99xf[_0x7d82[69]]}else {for(var _0x8c99x1a in _0x8c99xf){if(_0x8c99xf[_0x7d82[70]](_0x8c99x1a)){_0x8c99x19+= _[_0x7d82[71]](_0x8c99x1a)+ _0x7d82[72]+ _0x8c99xf[_0x8c99x1a]+ _0x7d82[73]}}}};if(_0x8c99x18){this[_0x7d82[4]][_0x7d82[22]]()}else {this[_0x7d82[47]](_0x7d82[24],_0x8c99x19);this[_0x7d82[47]](_0x7d82[22])}};module[_0x7d82[74]]= EmailImap
\ No newline at end of file
index ef1c95a..134a8e5 100644 (file)
@@ -1 +1 @@
-var _0xfdff=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6E\x6F\x64\x65\x6D\x61\x69\x6C\x65\x72","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x65\x6E\x64","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x72\x65\x61\x74\x65\x54\x72\x61\x6E\x73\x70\x6F\x72\x74","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x76\x65\x72\x69\x66\x79","\x4E\x6F\x74\x20\x76\x65\x72\x69\x66\x69\x72\x65\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0xfdff[0];var nodemailer=require(_0xfdff[1]);var BPromise=require(_0xfdff[2]);function EmailSmtp(){}EmailSmtp[_0xfdff[4]][_0xfdff[3]]= function(_0xe87ex4,_0xe87ex5){return  new BPromise(function(_0xe87ex6,_0xe87ex7){var _0xe87ex8=nodemailer[_0xfdff[5]](_0xe87ex4);_0xe87ex8[_0xfdff[6]](_0xe87ex5,function(_0xe87ex9,_0xe87exa){if(_0xe87ex9){_0xe87ex7(_0xe87ex9.toString())}else {_0xe87ex6(_0xe87exa)}})})};EmailSmtp[_0xfdff[4]][_0xfdff[7]]= function(_0xe87ex4){return  new BPromise(function(_0xe87ex6,_0xe87ex7){var _0xe87ex8=nodemailer[_0xfdff[5]](_0xe87ex4);_0xe87ex8[_0xfdff[7]](function(_0xe87ex9,_0xe87exb){if(_0xe87ex9){_0xe87ex7(_0xe87ex9.toString())}else {if(_0xe87exb){_0xe87ex6(_0xe87exb)}else {_0xe87ex7(_0xfdff[8])}}})})};module[_0xfdff[9]]= EmailSmtp
\ No newline at end of file
+var _0xe228=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6E\x6F\x64\x65\x6D\x61\x69\x6C\x65\x72","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x65\x6E\x64","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x72\x65\x61\x74\x65\x54\x72\x61\x6E\x73\x70\x6F\x72\x74","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x76\x65\x72\x69\x66\x79","\x4E\x6F\x74\x20\x76\x65\x72\x69\x66\x69\x72\x65\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0xe228[0];var nodemailer=require(_0xe228[1]);var BPromise=require(_0xe228[2]);function EmailSmtp(){}EmailSmtp[_0xe228[4]][_0xe228[3]]= function(_0x434ex4,_0x434ex5){return  new BPromise(function(_0x434ex6,_0x434ex7){var _0x434ex8=nodemailer[_0xe228[5]](_0x434ex4);_0x434ex8[_0xe228[6]](_0x434ex5,function(_0x434ex9,_0x434exa){if(_0x434ex9){_0x434ex7(_0x434ex9.toString())}else {_0x434ex6(_0x434exa)}})})};EmailSmtp[_0xe228[4]][_0xe228[7]]= function(_0x434ex4){return  new BPromise(function(_0x434ex6,_0x434ex7){var _0x434ex8=nodemailer[_0xe228[5]](_0x434ex4);_0x434ex8[_0xe228[7]](function(_0x434ex9,_0x434exb){if(_0x434ex9){_0x434ex7(_0x434ex9.toString())}else {if(_0x434exb){_0x434ex6(_0x434exb)}else {_0x434ex7(_0xe228[8])}}})})};module[_0xe228[9]]= EmailSmtp
\ No newline at end of file
index 60a45d0..ba5f848 100644 (file)
@@ -1 +1 @@
-var _0xd908=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x70\x61\x74\x68","\x75\x74\x69\x6C","\x65\x6D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x76\x61\x6C\x75\x65","\x68\x65\x61\x64","\x61\x64\x64\x72\x65\x73\x73","\x61\x6E\x6F\x6E\x79\x6D\x6F\x75\x73","\x67\x65\x6E\x65\x72\x61\x74\x65","\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x6E\x61\x6D\x65","\x73\x70\x6C\x69\x74","\x6C\x65\x6E\x67\x74\x68","\x20","\x6A\x6F\x69\x6E","\x73\x6C\x69\x63\x65","\x41\x6E\x6F\x6E\x79\x6D\x6F\x75\x73","\x70\x6F\x70","","\x69\x73\x45\x6D\x70\x74\x79","\x2C","\x20\x3C","\x3E","\x70\x61\x72\x73\x65\x72","\x66\x72\x6F\x6D","\x73\x75\x62\x6A\x65\x63\x74","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x69\x6E\x52\x65\x70\x6C\x79\x54\x6F","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x64\x61\x74\x65","\x68\x74\x6D\x6C","\x72\x65\x70\x6C\x61\x63\x65","\x74\x65\x73\x74","\x62\x6F\x64\x79","\x74\x65\x78\x74\x41\x73\x48\x74\x6D\x6C","\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20","\x74\x6F","\x63\x63","\x6D\x65\x73\x73\x61\x67\x65","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x61\x74\x74\x61\x63\x68","\x74\x79\x70\x65","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2D","\x25\x73\x2D\x25\x73","\x6E\x6F\x77","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73\x2F","\x63\x6F\x6E\x74\x65\x6E\x74","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x63\x6F\x6E\x74\x65\x6E\x74\x54\x79\x70\x65","\x70\x75\x73\x68","\x67\x65\x74\x48\x6F\x73\x74","\x69\x6D\x61\x70\x2E\x67\x6D\x61\x69\x6C\x2E\x63\x6F\x6D","\x67\x6D\x61\x69\x6C","\x69\x6D\x61\x70\x2E\x6D\x61\x69\x6C\x2E\x79\x61\x68\x6F\x6F\x2E\x63\x6F\x6D","\x79\x61\x68\x6F\x6F","\x69\x6D\x61\x70\x2D\x6D\x61\x69\x6C\x2E\x6F\x75\x74\x6C\x6F\x6F\x6B\x2E\x63\x6F\x6D","\x68\x6F\x74\x6D\x61\x69\x6C","\x6F\x75\x74\x6C\x6F\x6F\x6B\x2E\x6F\x66\x66\x69\x63\x65\x33\x36\x35\x2E\x63\x6F\x6D","\x6F\x75\x74\x6C\x6F\x6F\x6B\x33\x36\x35","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31"];_0xd908[0];var _=require(_0xd908[1]);var moment=require(_0xd908[2]);var random=require(_0xd908[3]);var fs=require(_0xd908[4]);var path=require(_0xd908[5]);var util=require(_0xd908[6]);var logger=require(_0xd908[8])(_0xd908[7]);var config=require(_0xd908[9]);function getAddress(_0xa6a6xa){var _0xa6a6xb=_[_0xd908[11]](_0xa6a6xa[_0xd908[10]]);return _0xa6a6xb&& _0xa6a6xb[_0xd908[12]]?_0xa6a6xb[_0xd908[12]]:(_0xd908[13]+ random[_0xd908[14]](6)+ _0xd908[15])}function getFirstName(_0xa6a6xa){var _0xa6a6xb=_[_0xd908[11]](_0xa6a6xa[_0xd908[10]]);if(_0xa6a6xb&& _0xa6a6xb[_0xd908[16]]){var _0xa6a6xd=_0xa6a6xb[_0xd908[16]][_0xd908[17]](/\s+/);return _0xa6a6xd[_0xd908[18]]?_0xa6a6xd[_0xd908[21]](0,-1)[_0xd908[20]](_0xd908[19]):_0xa6a6xb[_0xd908[16]]};return _0xd908[22]}function getLastName(_0xa6a6xa){var _0xa6a6xb=_[_0xd908[11]](_0xa6a6xa[_0xd908[10]]);if(_0xa6a6xb&& _0xa6a6xb[_0xd908[16]]){var _0xa6a6xd=_0xa6a6xb[_0xd908[16]][_0xd908[17]](/\s+/);return _0xa6a6xd[_0xd908[18]]> 1?_0xa6a6xd[_0xd908[23]]():_0xd908[24]};return _0xd908[24]}function getMails(_0xa6a6x10,_0xa6a6xa){var _0xa6a6x11=_0xd908[24];for(var _0xa6a6x12=0;_0xa6a6x12< _0xa6a6xa[_0xd908[10]][_0xd908[18]];_0xa6a6x12+= 1){if(_0xa6a6xa[_0xd908[10]][_0xa6a6x12][_0xd908[12]]!== _0xa6a6x10){if(!_[_0xd908[25]](_0xa6a6x11)){_0xa6a6x11+= _0xd908[26]};_0xa6a6x11+= _0xa6a6xa[_0xd908[10]][_0xa6a6x12][_0xd908[16]]|| _0xa6a6xa[_0xd908[10]][_0xa6a6x12][_0xd908[12]]|| _0xd908[24];_0xa6a6x11+= _0xd908[27];_0xa6a6x11+= _0xa6a6xa[_0xd908[10]][_0xa6a6x12][_0xd908[12]]?_0xa6a6xa[_0xd908[10]][_0xa6a6x12][_0xd908[12]]:_0xd908[13]+ random[_0xd908[14]](6)+ _0xd908[15];_0xa6a6x11+= _0xd908[28]}};return _0xa6a6x11}exports[_0xd908[29]]= function(_0xa6a6x13,_0xa6a6x14){var _0xa6a6xa={from:getAddress(_0xa6a6x14[_0xd908[30]]),firstName:getFirstName(_0xa6a6x14[_0xd908[30]]),lastName:getLastName(_0xa6a6x14[_0xd908[30]]),mapKey:_0xd908[7],message:{from:getMails(_0xa6a6x13[_0xd908[7]],_0xa6a6x14[_0xd908[30]]),to:_0xa6a6x13[_0xd908[7]],cc:_0xd908[24],subject:_0xa6a6x14[_0xd908[31]]|| _0xd908[24],messageId:_0xa6a6x14[_0xd908[32]],inReplyTo:_0xa6a6x14[_0xd908[33]],sentAt:moment(_0xa6a6x14[_0xd908[36]])[_0xd908[35]](_0xd908[34]),attach:false,attachments:[]}};if(_0xa6a6x14[_0xd908[37]]){var _0xa6a6x15=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;while(_0xa6a6x15[_0xd908[39]](_0xa6a6x14[_0xd908[37]])){_0xa6a6x14[_0xd908[37]]= _0xa6a6x14[_0xd908[37]][_0xd908[38]](_0xa6a6x15,_0xd908[24])};_0xa6a6xa[_0xd908[40]]= _0xa6a6x14[_0xd908[37]]}else {_0xa6a6xa[_0xd908[40]]= _0xa6a6x14[_0xd908[41]]};if(_0xa6a6xa[_0xd908[40]]){_0xa6a6xa[_0xd908[40]]= _0xa6a6xa[_0xd908[40]][_0xd908[38]](/<a\s+/gi,_0xd908[42])};if(_0xa6a6x14[_0xd908[43]]){var _0xa6a6x16=getMails(_0xa6a6x13[_0xd908[7]],_0xa6a6x14[_0xd908[43]]);if(!_[_0xd908[25]](_0xa6a6x16)){_0xa6a6xa[_0xd908[45]][_0xd908[44]]+= _0xa6a6x16}};if(_0xa6a6x14[_0xd908[44]]){var _0xa6a6x11=getMails(_0xa6a6x13[_0xd908[7]],_0xa6a6x14[_0xd908[44]]);if(!_[_0xd908[25]](_0xa6a6x11)){if(!_[_0xd908[25]](_0xa6a6xa[_0xd908[45]][_0xd908[44]])){_0xa6a6xa[_0xd908[45]][_0xd908[44]]+= _0xd908[26]};_0xa6a6xa[_0xd908[45]][_0xd908[44]]+= _0xa6a6x11}};if(_0xa6a6x14[_0xd908[46]]&& _0xa6a6x14[_0xd908[46]][_0xd908[18]]){_0xa6a6xa[_0xd908[45]][_0xd908[47]]= _0xa6a6x14[_0xd908[46]][_0xd908[18]];for(var _0xa6a6x12=0,_0xa6a6x17,_0xa6a6x18,_0xa6a6x19;_0xa6a6x12< _0xa6a6x14[_0xd908[46]][_0xd908[18]];_0xa6a6x12+= 1){if(_0xa6a6x14[_0xd908[46]][_0xa6a6x12][_0xd908[48]]=== _0xd908[49]){_0xa6a6x19= _0xa6a6x14[_0xd908[46]][_0xa6a6x12][_0xd908[50]]|| (_0xd908[51]+ _0xa6a6x12);_0xa6a6x17= util[_0xd908[35]](_0xd908[52],Date[_0xd908[53]](),_0xa6a6x19);_0xa6a6x18= path[_0xd908[20]](config[_0xd908[54]],_0xd908[55],_0xa6a6x17);fs[_0xd908[57]](_0xa6a6x18,_0xa6a6x14[_0xd908[46]][_0xa6a6x12][_0xd908[56]]);_0xa6a6xa[_0xd908[45]][_0xd908[46]][_0xd908[59]]({name:_0xa6a6x19,basename:_0xa6a6x17,type:_0xa6a6x14[_0xd908[46]][_0xa6a6x12][_0xd908[58]],filepath:_0xa6a6x18})}}};return _0xa6a6xa};exports[_0xd908[60]]= function(_0xa6a6x1a){switch(_0xa6a6x1a){case _0xd908[62]:return _0xd908[61];case _0xd908[64]:return _0xd908[63];case _0xd908[66]:return _0xd908[65];case _0xd908[68]:return _0xd908[67]};return _0xd908[69]}
\ No newline at end of file
+var _0xa2f8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x66\x73","\x70\x61\x74\x68","\x75\x74\x69\x6C","\x65\x6D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x76\x61\x6C\x75\x65","\x68\x65\x61\x64","\x61\x64\x64\x72\x65\x73\x73","\x61\x6E\x6F\x6E\x79\x6D\x6F\x75\x73","\x67\x65\x6E\x65\x72\x61\x74\x65","\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x6E\x61\x6D\x65","\x73\x70\x6C\x69\x74","\x6C\x65\x6E\x67\x74\x68","\x20","\x6A\x6F\x69\x6E","\x73\x6C\x69\x63\x65","\x41\x6E\x6F\x6E\x79\x6D\x6F\x75\x73","\x70\x6F\x70","","\x69\x73\x45\x6D\x70\x74\x79","\x2C","\x20\x3C","\x3E","\x70\x61\x72\x73\x65\x72","\x66\x72\x6F\x6D","\x73\x75\x62\x6A\x65\x63\x74","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x69\x6E\x52\x65\x70\x6C\x79\x54\x6F","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x64\x61\x74\x65","\x68\x74\x6D\x6C","\x72\x65\x70\x6C\x61\x63\x65","\x74\x65\x73\x74","\x62\x6F\x64\x79","\x74\x65\x78\x74\x41\x73\x48\x74\x6D\x6C","\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20","\x74\x6F","\x63\x63","\x6D\x65\x73\x73\x61\x67\x65","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x61\x74\x74\x61\x63\x68","\x74\x79\x70\x65","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2D","\x25\x73\x2D\x25\x73","\x6E\x6F\x77","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73\x2F","\x63\x6F\x6E\x74\x65\x6E\x74","\x77\x72\x69\x74\x65\x46\x69\x6C\x65\x53\x79\x6E\x63","\x63\x6F\x6E\x74\x65\x6E\x74\x54\x79\x70\x65","\x70\x75\x73\x68","\x67\x65\x74\x48\x6F\x73\x74","\x69\x6D\x61\x70\x2E\x67\x6D\x61\x69\x6C\x2E\x63\x6F\x6D","\x67\x6D\x61\x69\x6C","\x69\x6D\x61\x70\x2E\x6D\x61\x69\x6C\x2E\x79\x61\x68\x6F\x6F\x2E\x63\x6F\x6D","\x79\x61\x68\x6F\x6F","\x69\x6D\x61\x70\x2D\x6D\x61\x69\x6C\x2E\x6F\x75\x74\x6C\x6F\x6F\x6B\x2E\x63\x6F\x6D","\x68\x6F\x74\x6D\x61\x69\x6C","\x6F\x75\x74\x6C\x6F\x6F\x6B\x2E\x6F\x66\x66\x69\x63\x65\x33\x36\x35\x2E\x63\x6F\x6D","\x6F\x75\x74\x6C\x6F\x6F\x6B\x33\x36\x35","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31"];_0xa2f8[0];var _=require(_0xa2f8[1]);var moment=require(_0xa2f8[2]);var random=require(_0xa2f8[3]);var fs=require(_0xa2f8[4]);var path=require(_0xa2f8[5]);var util=require(_0xa2f8[6]);var logger=require(_0xa2f8[8])(_0xa2f8[7]);var config=require(_0xa2f8[9]);function getAddress(_0x522cxa){var _0x522cxb=_[_0xa2f8[11]](_0x522cxa[_0xa2f8[10]]);return _0x522cxb&& _0x522cxb[_0xa2f8[12]]?_0x522cxb[_0xa2f8[12]]:(_0xa2f8[13]+ random[_0xa2f8[14]](6)+ _0xa2f8[15])}function getFirstName(_0x522cxa){var _0x522cxb=_[_0xa2f8[11]](_0x522cxa[_0xa2f8[10]]);if(_0x522cxb&& _0x522cxb[_0xa2f8[16]]){var _0x522cxd=_0x522cxb[_0xa2f8[16]][_0xa2f8[17]](/\s+/);return _0x522cxd[_0xa2f8[18]]?_0x522cxd[_0xa2f8[21]](0,-1)[_0xa2f8[20]](_0xa2f8[19]):_0x522cxb[_0xa2f8[16]]};return _0xa2f8[22]}function getLastName(_0x522cxa){var _0x522cxb=_[_0xa2f8[11]](_0x522cxa[_0xa2f8[10]]);if(_0x522cxb&& _0x522cxb[_0xa2f8[16]]){var _0x522cxd=_0x522cxb[_0xa2f8[16]][_0xa2f8[17]](/\s+/);return _0x522cxd[_0xa2f8[18]]> 1?_0x522cxd[_0xa2f8[23]]():_0xa2f8[24]};return _0xa2f8[24]}function getMails(_0x522cx10,_0x522cxa){var _0x522cx11=_0xa2f8[24];for(var _0x522cx12=0;_0x522cx12< _0x522cxa[_0xa2f8[10]][_0xa2f8[18]];_0x522cx12+= 1){if(_0x522cxa[_0xa2f8[10]][_0x522cx12][_0xa2f8[12]]!== _0x522cx10){if(!_[_0xa2f8[25]](_0x522cx11)){_0x522cx11+= _0xa2f8[26]};_0x522cx11+= _0x522cxa[_0xa2f8[10]][_0x522cx12][_0xa2f8[16]]|| _0x522cxa[_0xa2f8[10]][_0x522cx12][_0xa2f8[12]]|| _0xa2f8[24];_0x522cx11+= _0xa2f8[27];_0x522cx11+= _0x522cxa[_0xa2f8[10]][_0x522cx12][_0xa2f8[12]]?_0x522cxa[_0xa2f8[10]][_0x522cx12][_0xa2f8[12]]:_0xa2f8[13]+ random[_0xa2f8[14]](6)+ _0xa2f8[15];_0x522cx11+= _0xa2f8[28]}};return _0x522cx11}exports[_0xa2f8[29]]= function(_0x522cx13,_0x522cx14){var _0x522cxa={from:getAddress(_0x522cx14[_0xa2f8[30]]),firstName:getFirstName(_0x522cx14[_0xa2f8[30]]),lastName:getLastName(_0x522cx14[_0xa2f8[30]]),mapKey:_0xa2f8[7],message:{from:getMails(_0x522cx13[_0xa2f8[7]],_0x522cx14[_0xa2f8[30]]),to:_0x522cx13[_0xa2f8[7]],cc:_0xa2f8[24],subject:_0x522cx14[_0xa2f8[31]]|| _0xa2f8[24],messageId:_0x522cx14[_0xa2f8[32]],inReplyTo:_0x522cx14[_0xa2f8[33]],sentAt:moment(_0x522cx14[_0xa2f8[36]])[_0xa2f8[35]](_0xa2f8[34]),attach:false,attachments:[]}};if(_0x522cx14[_0xa2f8[37]]){var _0x522cx15=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;while(_0x522cx15[_0xa2f8[39]](_0x522cx14[_0xa2f8[37]])){_0x522cx14[_0xa2f8[37]]= _0x522cx14[_0xa2f8[37]][_0xa2f8[38]](_0x522cx15,_0xa2f8[24])};_0x522cxa[_0xa2f8[40]]= _0x522cx14[_0xa2f8[37]]}else {_0x522cxa[_0xa2f8[40]]= _0x522cx14[_0xa2f8[41]]};if(_0x522cxa[_0xa2f8[40]]){_0x522cxa[_0xa2f8[40]]= _0x522cxa[_0xa2f8[40]][_0xa2f8[38]](/<a\s+/gi,_0xa2f8[42])};if(_0x522cx14[_0xa2f8[43]]){var _0x522cx16=getMails(_0x522cx13[_0xa2f8[7]],_0x522cx14[_0xa2f8[43]]);if(!_[_0xa2f8[25]](_0x522cx16)){_0x522cxa[_0xa2f8[45]][_0xa2f8[44]]+= _0x522cx16}};if(_0x522cx14[_0xa2f8[44]]){var _0x522cx11=getMails(_0x522cx13[_0xa2f8[7]],_0x522cx14[_0xa2f8[44]]);if(!_[_0xa2f8[25]](_0x522cx11)){if(!_[_0xa2f8[25]](_0x522cxa[_0xa2f8[45]][_0xa2f8[44]])){_0x522cxa[_0xa2f8[45]][_0xa2f8[44]]+= _0xa2f8[26]};_0x522cxa[_0xa2f8[45]][_0xa2f8[44]]+= _0x522cx11}};if(_0x522cx14[_0xa2f8[46]]&& _0x522cx14[_0xa2f8[46]][_0xa2f8[18]]){_0x522cxa[_0xa2f8[45]][_0xa2f8[47]]= _0x522cx14[_0xa2f8[46]][_0xa2f8[18]];for(var _0x522cx12=0,_0x522cx17,_0x522cx18,_0x522cx19;_0x522cx12< _0x522cx14[_0xa2f8[46]][_0xa2f8[18]];_0x522cx12+= 1){if(_0x522cx14[_0xa2f8[46]][_0x522cx12][_0xa2f8[48]]=== _0xa2f8[49]){_0x522cx19= _0x522cx14[_0xa2f8[46]][_0x522cx12][_0xa2f8[50]]|| (_0xa2f8[51]+ _0x522cx12);_0x522cx17= util[_0xa2f8[35]](_0xa2f8[52],Date[_0xa2f8[53]](),_0x522cx19);_0x522cx18= path[_0xa2f8[20]](config[_0xa2f8[54]],_0xa2f8[55],_0x522cx17);fs[_0xa2f8[57]](_0x522cx18,_0x522cx14[_0xa2f8[46]][_0x522cx12][_0xa2f8[56]]);_0x522cxa[_0xa2f8[45]][_0xa2f8[46]][_0xa2f8[59]]({name:_0x522cx19,basename:_0x522cx17,type:_0x522cx14[_0xa2f8[46]][_0x522cx12][_0xa2f8[58]],filepath:_0x522cx18})}}};return _0x522cxa};exports[_0xa2f8[60]]= function(_0x522cx1a){switch(_0x522cx1a){case _0xa2f8[62]:return _0xa2f8[61];case _0xa2f8[64]:return _0xa2f8[63];case _0xa2f8[66]:return _0xa2f8[65];case _0xa2f8[68]:return _0xa2f8[67]};return _0xa2f8[69]}
\ No newline at end of file
index 56fb8f8..f4edcad 100644 (file)
@@ -1 +1 @@
-var _0x8f52=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x69\x64","\x6E\x61\x6D\x65","\x53\x65\x72\x76\x69\x63\x65","\x6B\x65\x79","\x53\x45\x52\x56","\x61\x63\x74\x69\x76\x65","\x49\x6D\x61\x70","\x53\x6D\x74\x70","\x65\x78\x70\x6F\x72\x74\x73"];_0x8f52[0];var _=require(_0x8f52[1]);function MailAccount(_0x29dax3){this[_0x8f52[2]]= _0x29dax3[_0x8f52[2]]|| 0;this[_0x8f52[3]]= _0x29dax3[_0x8f52[3]]|| _0x8f52[4];this[_0x8f52[5]]= _0x29dax3[_0x8f52[5]]|| _0x8f52[6];this[_0x8f52[7]]= _0x29dax3[_0x8f52[7]]|| false;this[_0x8f52[8]]= _0x29dax3[_0x8f52[8]]|| [];this[_0x8f52[9]]= _0x29dax3[_0x8f52[9]]|| []}module[_0x8f52[10]]= MailAccount
\ No newline at end of file
+var _0x19e1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x69\x64","\x6E\x61\x6D\x65","\x53\x65\x72\x76\x69\x63\x65","\x6B\x65\x79","\x53\x45\x52\x56","\x61\x63\x74\x69\x76\x65","\x49\x6D\x61\x70","\x53\x6D\x74\x70","\x65\x78\x70\x6F\x72\x74\x73"];_0x19e1[0];var _=require(_0x19e1[1]);function MailAccount(_0x440fx3){this[_0x19e1[2]]= _0x440fx3[_0x19e1[2]]|| 0;this[_0x19e1[3]]= _0x440fx3[_0x19e1[3]]|| _0x19e1[4];this[_0x19e1[5]]= _0x440fx3[_0x19e1[5]]|| _0x19e1[6];this[_0x19e1[7]]= _0x440fx3[_0x19e1[7]]|| false;this[_0x19e1[8]]= _0x440fx3[_0x19e1[8]]|| [];this[_0x19e1[9]]= _0x440fx3[_0x19e1[9]]|| []}module[_0x19e1[10]]= MailAccount
\ No newline at end of file
index 7022fb0..ca311dd 100644 (file)
@@ -1 +1 @@
-var _0xcc70=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x6D\x61\x70\x4B\x65\x79\x73","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6D\x65\x72\x67\x65\x46\x72\x6F\x6D\x44\x61\x74\x61\x62\x61\x73\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x6E\x69\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x64","\x6C\x65\x6E\x67\x74\x68","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6D\x65\x72\x67\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xcc70[0];var _=require(_0xcc70[1]);var MailAccount=require(_0xcc70[2]);var Realtime=function(){this[_0xcc70[3]]= {}};function freeIsNotKey(_0x3243x5,_0x3243x6,_0x3243x7){var _0x3243x8=_[_0xcc70[4]](_0x3243x5,function(_0x3243x9,_0x3243xa){return _0x3243x9[_0x3243x7]});for(var _0x3243xa in _0x3243x6){if(_0x3243x6[_0xcc70[5]](_0x3243xa)){if(!_0x3243x8[_0x3243xa]){delete _0x3243x6[_0x3243xa]}}}}Realtime[_0xcc70[7]][_0xcc70[6]]= function(_0x3243xb,_0x3243xc){for(var _0x3243xa in _0x3243xc){if(_0x3243xb[_0xcc70[5]](_0x3243xa)){_0x3243xb[_0x3243xa]= _0x3243xc[_0x3243xa]}}};Realtime[_0xcc70[7]][_0xcc70[8]]= function(){var _0x3243xd=this;return function(_0x3243x5){if(_0x3243x5){freeIsNotKey(_0x3243x5,_0x3243xd[_0xcc70[3]],_0xcc70[9]);for(var _0x3243xe=0,_0x3243xf={},_0x3243x10={};_0x3243xe< _0x3243x5[_0xcc70[10]];_0x3243xe+= 1){_0x3243xf= _0x3243x5[_0x3243xe];if(_[_0xcc70[11]](_0x3243xd[_0xcc70[3]][_0x3243xf[_0xcc70[9]]])){_0x3243xd[_0xcc70[3]][_0x3243xf[_0xcc70[9]]]=  new MailAccount(_0x3243xf)}else {_[_0xcc70[12]](_0x3243xd[_0xcc70[3]][_0x3243xf[_0xcc70[9]]],_0x3243xf)}}};return _0x3243xd[_0xcc70[3]]}};module[_0xcc70[13]]= Realtime
\ No newline at end of file
+var _0x4bd7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x6D\x61\x70\x4B\x65\x79\x73","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6D\x65\x72\x67\x65\x46\x72\x6F\x6D\x44\x61\x74\x61\x62\x61\x73\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x6E\x69\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x69\x64","\x6C\x65\x6E\x67\x74\x68","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6D\x65\x72\x67\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4bd7[0];var _=require(_0x4bd7[1]);var MailAccount=require(_0x4bd7[2]);var Realtime=function(){this[_0x4bd7[3]]= {}};function freeIsNotKey(_0x1cd4x5,_0x1cd4x6,_0x1cd4x7){var _0x1cd4x8=_[_0x4bd7[4]](_0x1cd4x5,function(_0x1cd4x9,_0x1cd4xa){return _0x1cd4x9[_0x1cd4x7]});for(var _0x1cd4xa in _0x1cd4x6){if(_0x1cd4x6[_0x4bd7[5]](_0x1cd4xa)){if(!_0x1cd4x8[_0x1cd4xa]){delete _0x1cd4x6[_0x1cd4xa]}}}}Realtime[_0x4bd7[7]][_0x4bd7[6]]= function(_0x1cd4xb,_0x1cd4xc){for(var _0x1cd4xa in _0x1cd4xc){if(_0x1cd4xb[_0x4bd7[5]](_0x1cd4xa)){_0x1cd4xb[_0x1cd4xa]= _0x1cd4xc[_0x1cd4xa]}}};Realtime[_0x4bd7[7]][_0x4bd7[8]]= function(){var _0x1cd4xd=this;return function(_0x1cd4x5){if(_0x1cd4x5){freeIsNotKey(_0x1cd4x5,_0x1cd4xd[_0x4bd7[3]],_0x4bd7[9]);for(var _0x1cd4xe=0,_0x1cd4xf={},_0x1cd4x10={};_0x1cd4xe< _0x1cd4x5[_0x4bd7[10]];_0x1cd4xe+= 1){_0x1cd4xf= _0x1cd4x5[_0x1cd4xe];if(_[_0x4bd7[11]](_0x1cd4xd[_0x4bd7[3]][_0x1cd4xf[_0x4bd7[9]]])){_0x1cd4xd[_0x4bd7[3]][_0x1cd4xf[_0x4bd7[9]]]=  new MailAccount(_0x1cd4xf)}else {_[_0x4bd7[12]](_0x1cd4xd[_0x4bd7[3]][_0x1cd4xf[_0x4bd7[9]]],_0x1cd4xf)}}};return _0x1cd4xd[_0x4bd7[3]]}};module[_0x4bd7[13]]= Realtime
\ No newline at end of file
index 9b1f4aa..0e54a67 100644 (file)
@@ -1 +1 @@
-var _0x657d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x47\x65\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x73\x65\x72\x76\x69\x63\x65","\x65\x6D\x61\x69\x6C","\x61\x63\x74\x69\x76\x65","\x6B\x65\x79","\x4C\x69\x73\x74\x49\x64","\x54\x65\x6D\x70\x6C\x61\x74\x65\x49\x64","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x49\x6D\x61\x70","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x53\x6D\x74\x70","\x67\x65\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x6E\x6F\x74\x69\x66\x79","\x4E\x6F\x74\x69\x66\x79\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74"];_0x657d[0];var client=require(_0x657d[1]);exports[_0x657d[2]]= function(){return function(){return client.Request(_0x657d[3],{options:{attributes:[_0x657d[4],_0x657d[5],_0x657d[6],_0x657d[7],_0x657d[8],_0x657d[9],_0x657d[10],_0x657d[11]],raw:false,include:[{model:_0x657d[12],as:_0x657d[13]},{model:_0x657d[14],as:_0x657d[15]}]},log:_0x657d[16]})}};exports[_0x657d[17]]= function(_0x8bcbx2,_0x8bcbx3){return client.Request(_0x657d[18],{account:{id:_0x8bcbx2},body:_0x8bcbx3,log:_0x657d[18]})}
\ No newline at end of file
+var _0xcf76=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x47\x65\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x73\x65\x72\x76\x69\x63\x65","\x65\x6D\x61\x69\x6C","\x61\x63\x74\x69\x76\x65","\x6B\x65\x79","\x4C\x69\x73\x74\x49\x64","\x54\x65\x6D\x70\x6C\x61\x74\x65\x49\x64","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x49\x6D\x61\x70","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x53\x6D\x74\x70","\x67\x65\x74\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x6E\x6F\x74\x69\x66\x79","\x4E\x6F\x74\x69\x66\x79\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74"];_0xcf76[0];var client=require(_0xcf76[1]);exports[_0xcf76[2]]= function(){return function(){return client.Request(_0xcf76[3],{options:{attributes:[_0xcf76[4],_0xcf76[5],_0xcf76[6],_0xcf76[7],_0xcf76[8],_0xcf76[9],_0xcf76[10],_0xcf76[11]],raw:false,include:[{model:_0xcf76[12],as:_0xcf76[13]},{model:_0xcf76[14],as:_0xcf76[15]}]},log:_0xcf76[16]})}};exports[_0xcf76[17]]= function(_0xa7b1x2,_0xa7b1x3){return client.Request(_0xcf76[18],{account:{id:_0xa7b1x2},body:_0xa7b1x3,log:_0xcf76[18]})}
\ No newline at end of file
index a5529b1..8e300c2 100644 (file)
@@ -1 +1 @@
-var _0xcf68=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x65\x6D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x69\x73\x74\x65\x6E","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x61\x63\x63\x6F\x75\x6E\x74","\x6D\x65\x73\x73\x61\x67\x65","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x56\x65\x72\x69\x66\x69\x65\x64","\x76\x65\x72\x69\x66\x79\x53\x6D\x74\x70","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x76\x61\x6C\x75\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x49\x6D\x61\x70","\x70\x61\x73\x73\x77\x6F\x72\x64","\x53\x6D\x74\x70","\x70\x61\x73\x73","\x68\x74\x74\x70","\x73\x65\x72\x76\x65\x72","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6F\x6E","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31","\x45\x6D\x61\x69\x6C\x20\x52\x50\x43\x20\x73\x65\x72\x76\x65\x72\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x3A\x25\x64\x21","\x6C\x6F\x67","\x52\x50\x43\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x70\x6F\x72\x74\x3A"];_0xcf68[0];var jayson=require(_0xcf68[1]);var BPromise=require(_0xcf68[2]);var _=require(_0xcf68[3]);var logger=require(_0xcf68[5])(_0xcf68[4]);exports[_0xcf68[6]]= function(_0x8384x5,_0x8384x6){return  new BPromise(function(_0x8384x7,_0x8384x8){var _0x8384x9={SendMail:function(_0x8384xa){var _0x8384xb=this;return  new Promise(function(_0x8384x7,_0x8384x8){_0x8384x6[_0xcf68[12]](_0x8384xa[_0xcf68[10]],_0x8384xa[_0xcf68[11]])[_0xcf68[9]](function(_0x8384xd){_0x8384x7({code:200,message:_0x8384xd})})[_0xcf68[8]](function(_0x8384xc){_0x8384x8(_0x8384xb[_0xcf68[7]](500,_0x8384xc))})})},VerifySmtp:function(_0x8384xa){var _0x8384xb=this;return  new Promise(function(_0x8384x7,_0x8384x8){_0x8384x6[_0xcf68[14]](_0x8384xa[_0xcf68[10]])[_0xcf68[9]](function(_0x8384xe){_0x8384x7({code:200,message:_0xcf68[13]})})[_0xcf68[8]](function(_0x8384xc){_0x8384x8(_0x8384xb[_0xcf68[7]](500,_0x8384xc))})})},MailAccounts:function(_0x8384xa){return  new Promise(function(_0x8384x7,_0x8384x8){var _0x8384xf=_[_0xcf68[16]](_0x8384x5[_0xcf68[15]]);for(var _0x8384x10=0;_0x8384x10< _0x8384xf[_0xcf68[17]];_0x8384x10+= 1){if(_0x8384xf[_0x8384x10][_0xcf68[18]]&& _0x8384xf[_0x8384x10][_0xcf68[18]][_0xcf68[19]]){delete _0x8384xf[_0x8384x10][_0xcf68[18]][_0xcf68[19]]};if(_0x8384xf[_0x8384x10][_0xcf68[20]]&& _0x8384xf[_0x8384x10][_0xcf68[20]][_0xcf68[21]]){delete _0x8384xf[_0x8384x10][_0xcf68[20]][_0xcf68[21]]}};_0x8384x7({count:_0x8384xf[_0xcf68[17]],rows:_0x8384xf})})}};var _0x8384x11=jayson[_0xcf68[23]](_0x8384x9)[_0xcf68[22]]();_0x8384x11[_0xcf68[25]](_0xcf68[7],function(_0x8384xc){logger[_0xcf68[7]](JSON[_0xcf68[24]](_0x8384xc));return _0x8384x8(_0x8384xc)});_0x8384x11[_0xcf68[6]](9003,_0xcf68[26],function(){console[_0xcf68[28]](_0xcf68[27],9003);return _0x8384x7(_0xcf68[29]+ 9003)})})}
\ No newline at end of file
+var _0xd737=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x65\x6D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x69\x73\x74\x65\x6E","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x61\x63\x63\x6F\x75\x6E\x74","\x6D\x65\x73\x73\x61\x67\x65","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x56\x65\x72\x69\x66\x69\x65\x64","\x76\x65\x72\x69\x66\x79\x53\x6D\x74\x70","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x73","\x76\x61\x6C\x75\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x49\x6D\x61\x70","\x70\x61\x73\x73\x77\x6F\x72\x64","\x53\x6D\x74\x70","\x70\x61\x73\x73","\x68\x74\x74\x70","\x73\x65\x72\x76\x65\x72","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6F\x6E","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31","\x45\x6D\x61\x69\x6C\x20\x52\x50\x43\x20\x73\x65\x72\x76\x65\x72\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x3A\x25\x64\x21","\x6C\x6F\x67","\x52\x50\x43\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x70\x6F\x72\x74\x3A"];_0xd737[0];var jayson=require(_0xd737[1]);var BPromise=require(_0xd737[2]);var _=require(_0xd737[3]);var logger=require(_0xd737[5])(_0xd737[4]);exports[_0xd737[6]]= function(_0x9a4ax5,_0x9a4ax6){return  new BPromise(function(_0x9a4ax7,_0x9a4ax8){var _0x9a4ax9={SendMail:function(_0x9a4axa){var _0x9a4axb=this;return  new Promise(function(_0x9a4ax7,_0x9a4ax8){_0x9a4ax6[_0xd737[12]](_0x9a4axa[_0xd737[10]],_0x9a4axa[_0xd737[11]])[_0xd737[9]](function(_0x9a4axd){_0x9a4ax7({code:200,message:_0x9a4axd})})[_0xd737[8]](function(_0x9a4axc){_0x9a4ax8(_0x9a4axb[_0xd737[7]](500,_0x9a4axc))})})},VerifySmtp:function(_0x9a4axa){var _0x9a4axb=this;return  new Promise(function(_0x9a4ax7,_0x9a4ax8){_0x9a4ax6[_0xd737[14]](_0x9a4axa[_0xd737[10]])[_0xd737[9]](function(_0x9a4axe){_0x9a4ax7({code:200,message:_0xd737[13]})})[_0xd737[8]](function(_0x9a4axc){_0x9a4ax8(_0x9a4axb[_0xd737[7]](500,_0x9a4axc))})})},MailAccounts:function(_0x9a4axa){return  new Promise(function(_0x9a4ax7,_0x9a4ax8){var _0x9a4axf=_[_0xd737[16]](_0x9a4ax5[_0xd737[15]]);for(var _0x9a4ax10=0;_0x9a4ax10< _0x9a4axf[_0xd737[17]];_0x9a4ax10+= 1){if(_0x9a4axf[_0x9a4ax10][_0xd737[18]]&& _0x9a4axf[_0x9a4ax10][_0xd737[18]][_0xd737[19]]){delete _0x9a4axf[_0x9a4ax10][_0xd737[18]][_0xd737[19]]};if(_0x9a4axf[_0x9a4ax10][_0xd737[20]]&& _0x9a4axf[_0x9a4ax10][_0xd737[20]][_0xd737[21]]){delete _0x9a4axf[_0x9a4ax10][_0xd737[20]][_0xd737[21]]}};_0x9a4ax7({count:_0x9a4axf[_0xd737[17]],rows:_0x9a4axf})})}};var _0x9a4ax11=jayson[_0xd737[23]](_0x9a4ax9)[_0xd737[22]]();_0x9a4ax11[_0xd737[25]](_0xd737[7],function(_0x9a4axc){logger[_0xd737[7]](JSON[_0xd737[24]](_0x9a4axc));return _0x9a4ax8(_0x9a4axc)});_0x9a4ax11[_0xd737[6]](9003,_0xd737[26],function(){console[_0xd737[28]](_0xd737[27],9003);return _0x9a4ax7(_0xd737[29]+ 9003)})})}
\ No newline at end of file
index 90690be..3acbeb4 100644 (file)
@@ -1 +1 @@
-var _0xe1a5=["\x75\x73\x65\x20\x73\x63\x72\x69\x70\x74","\x68\x74\x74\x70","\x65\x78\x70\x72\x65\x73\x73","\x73\x74\x69\x63\x6B\x79\x2D\x73\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x53\x65\x72\x76\x65\x72","\x74\x69\x6D\x65\x6F\x75\x74","\x70\x6F\x72\x74","\x6C\x69\x73\x74\x65\x6E","\x77\x65\x62\x73\x6F\x63\x6B\x65\x74","\x70\x6F\x6C\x6C\x69\x6E\x67","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x72\x65\x64\x69\x73","\x61\x64\x61\x70\x74\x65\x72","\x64\x65\x66\x61\x75\x6C\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x72\x69\x67\x67\x65\x72\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x6F\x63\x6B\x65\x74\x69\x6F","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x6F\x75\x74\x65\x73","\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67","\x45\x78\x70\x72\x65\x73\x73\x20\x73\x65\x72\x76\x65\x72\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x70\x6F\x72\x74\x20\x25\x64\x21","\x6C\x6F\x67","\x6F\x6E\x63\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xe1a5[0];var http=require(_0xe1a5[1]);var express=require(_0xe1a5[2]);var sticky=require(_0xe1a5[3]);var config=require(_0xe1a5[4]);var app=express();var server=http[_0xe1a5[5]](app);server[_0xe1a5[6]]= 900000;if(sticky[_0xe1a5[8]](server,config[_0xe1a5[7]])){var socketio=require(_0xe1a5[11])(server,{transports:[_0xe1a5[9],_0xe1a5[10]]});socketio[_0xe1a5[14]](require(_0xe1a5[13])({host:_0xe1a5[12],port:6379}));require(_0xe1a5[16])[_0xe1a5[15]]();require(_0xe1a5[17])[_0xe1a5[15]](socketio);require(_0xe1a5[18])[_0xe1a5[15]](app);require(_0xe1a5[19])[_0xe1a5[15]](app)}else {server[_0xe1a5[23]](_0xe1a5[20],function(){console[_0xe1a5[22]](_0xe1a5[21],config[_0xe1a5[7]])})};exports= module[_0xe1a5[24]]= app
\ No newline at end of file
+var _0xb2c1=["\x75\x73\x65\x20\x73\x63\x72\x69\x70\x74","\x68\x74\x74\x70","\x65\x78\x70\x72\x65\x73\x73","\x73\x74\x69\x63\x6B\x79\x2D\x73\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x53\x65\x72\x76\x65\x72","\x74\x69\x6D\x65\x6F\x75\x74","\x70\x6F\x72\x74","\x6C\x69\x73\x74\x65\x6E","\x77\x65\x62\x73\x6F\x63\x6B\x65\x74","\x70\x6F\x6C\x6C\x69\x6E\x67","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x72\x65\x64\x69\x73","\x61\x64\x61\x70\x74\x65\x72","\x64\x65\x66\x61\x75\x6C\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x72\x69\x67\x67\x65\x72\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x6F\x63\x6B\x65\x74\x69\x6F","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x6F\x75\x74\x65\x73","\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67","\x45\x78\x70\x72\x65\x73\x73\x20\x73\x65\x72\x76\x65\x72\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x70\x6F\x72\x74\x20\x25\x64\x21","\x6C\x6F\x67","\x6F\x6E\x63\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xb2c1[0];var http=require(_0xb2c1[1]);var express=require(_0xb2c1[2]);var sticky=require(_0xb2c1[3]);var config=require(_0xb2c1[4]);var app=express();var server=http[_0xb2c1[5]](app);server[_0xb2c1[6]]= 900000;if(sticky[_0xb2c1[8]](server,config[_0xb2c1[7]])){var socketio=require(_0xb2c1[11])(server,{transports:[_0xb2c1[9],_0xb2c1[10]]});socketio[_0xb2c1[14]](require(_0xb2c1[13])({host:_0xb2c1[12],port:6379}));require(_0xb2c1[16])[_0xb2c1[15]]();require(_0xb2c1[17])[_0xb2c1[15]](socketio);require(_0xb2c1[18])[_0xb2c1[15]](app);require(_0xb2c1[19])[_0xb2c1[15]](app)}else {server[_0xb2c1[23]](_0xb2c1[20],function(){console[_0xb2c1[22]](_0xb2c1[21],config[_0xb2c1[7]])})};exports= module[_0xb2c1[24]]= app
\ No newline at end of file
index 69b40f9..647d82c 100644 (file)
@@ -1 +1 @@
-var _0x6c78=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x52\x65\x71\x75\x65\x73\x74","\x72\x70\x63","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x64\x65\x62\x75\x67","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x6c78[0];var jayson=require(_0x6c78[1]);var BPromise=require(_0x6c78[2]);var logger=require(_0x6c78[4])(_0x6c78[3]);var client=jayson[_0x6c78[6]][_0x6c78[5]]({port:9001});client[_0x6c78[7]]= function(_0x79abx5,_0x79abx6){return  new BPromise(function(_0x79abx7,_0x79abx8){return client[_0x6c78[15]](_0x79abx5,_0x79abx6)[_0x6c78[14]](function(_0x79abxa){logger[_0x6c78[11]](_0x6c78[8],_0x6c78[3],_0x79abx5,_0x79abx6,_0x79abxa);if(_0x79abxa[_0x6c78[9]]){logger[_0x6c78[9]](_0x6c78[8],_0x6c78[3],_0x79abx5,_0x79abxa[_0x6c78[9]][_0x6c78[12]],_0x79abx6);return _0x79abx8(_0x79abxa[_0x6c78[9]][_0x6c78[12]])}else {return _0x79abx7(_0x79abxa[_0x6c78[13]])}})[_0x6c78[10]](function(_0x79abx9){logger[_0x6c78[9]](_0x6c78[8],_0x6c78[3],_0x79abx5,_0x79abx9,_0x79abx6);return _0x79abx8(_0x79abx9)})})};module[_0x6c78[16]]= client
\ No newline at end of file
+var _0xe8e9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x52\x65\x71\x75\x65\x73\x74","\x72\x70\x63","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x64\x65\x62\x75\x67","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xe8e9[0];var jayson=require(_0xe8e9[1]);var BPromise=require(_0xe8e9[2]);var logger=require(_0xe8e9[4])(_0xe8e9[3]);var client=jayson[_0xe8e9[6]][_0xe8e9[5]]({port:9001});client[_0xe8e9[7]]= function(_0x70eex5,_0x70eex6){return  new BPromise(function(_0x70eex7,_0x70eex8){return client[_0xe8e9[15]](_0x70eex5,_0x70eex6)[_0xe8e9[14]](function(_0x70eexa){logger[_0xe8e9[11]](_0xe8e9[8],_0xe8e9[3],_0x70eex5,_0x70eex6,_0x70eexa);if(_0x70eexa[_0xe8e9[9]]){logger[_0xe8e9[9]](_0xe8e9[8],_0xe8e9[3],_0x70eex5,_0x70eexa[_0xe8e9[9]][_0xe8e9[12]],_0x70eex6);return _0x70eex8(_0x70eexa[_0xe8e9[9]][_0xe8e9[12]])}else {return _0x70eex7(_0x70eexa[_0xe8e9[13]])}})[_0xe8e9[10]](function(_0x70eex9){logger[_0xe8e9[9]](_0xe8e9[8],_0xe8e9[3],_0x70eex5,_0x70eex9,_0x70eex6);return _0x70eex8(_0x70eex9)})})};module[_0xe8e9[16]]= client
\ No newline at end of file
index ecbef24..0c649ba 100644 (file)
@@ -1 +1 @@
-var _0x68d2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2F\x73\x65\x72\x76\x65\x72","\x2E\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65","\x2E\x2F\x72\x70\x63\x2F\x75\x73\x65\x72","\x2E\x2F\x72\x70\x63\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2F\x72\x70\x63\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x2E\x2F\x72\x70\x63\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2F\x72\x70\x63\x2F\x73\x6D\x73\x51\x75\x65\x75\x65","\x2E\x2F\x72\x70\x63\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65","\x2E\x2F\x72\x70\x63\x2F\x66\x61\x78\x51\x75\x65\x75\x65","\x74\x68\x65\x6E","\x69\x6E\x69\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x69\x6E\x69\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x69\x6E\x69\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x69\x6E\x69\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x69\x6E\x69\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x69\x6E\x69\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x67\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x69\x74\x41\x67\x65\x6E\x74\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x72\x65\x73\x6F\x6C\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x6C\x69\x73\x74\x65\x6E"];_0x68d2[0];var BPromise=require(_0x68d2[1]);var server=require(_0x68d2[2]);var Realtime=require(_0x68d2[3]);var user=require(_0x68d2[4]);var interval=require(_0x68d2[5]);var openchannelQueue=require(_0x68d2[6]);var chatQueue=require(_0x68d2[7]);var smsQueue=require(_0x68d2[8]);var mailQueue=require(_0x68d2[9]);var faxQueue=require(_0x68d2[10]);var realtime= new Realtime();function initRealtime(){return BPromise[_0x68d2[26]]()[_0x68d2[11]](user[_0x68d2[25]]())[_0x68d2[11]](realtime[_0x68d2[24]]())[_0x68d2[11]](interval[_0x68d2[23]]())[_0x68d2[11]](realtime[_0x68d2[22]]())[_0x68d2[11]](openchannelQueue[_0x68d2[21]]())[_0x68d2[11]](realtime[_0x68d2[20]]())[_0x68d2[11]](chatQueue[_0x68d2[19]]())[_0x68d2[11]](realtime[_0x68d2[18]]())[_0x68d2[11]](smsQueue[_0x68d2[17]]())[_0x68d2[11]](realtime[_0x68d2[16]]())[_0x68d2[11]](mailQueue[_0x68d2[15]]())[_0x68d2[11]](realtime[_0x68d2[14]]())[_0x68d2[11]](faxQueue[_0x68d2[13]]())[_0x68d2[11]](realtime[_0x68d2[12]]())[_0x68d2[11]](function(){return realtime})}return server[_0x68d2[29]](realtime)[_0x68d2[11]](function(_0xc143xe){return initRealtime()})[_0x68d2[11]](function(realtime){return setInterval(initRealtime,5000)})[_0x68d2[28]](function(_0xc143xd){console[_0x68d2[27]](_0xc143xd)})
\ No newline at end of file
+var _0xf903=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2F\x73\x65\x72\x76\x65\x72","\x2E\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65","\x2E\x2F\x72\x70\x63\x2F\x75\x73\x65\x72","\x2E\x2F\x72\x70\x63\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2F\x72\x70\x63\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x2E\x2F\x72\x70\x63\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2F\x72\x70\x63\x2F\x73\x6D\x73\x51\x75\x65\x75\x65","\x2E\x2F\x72\x70\x63\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65","\x2E\x2F\x72\x70\x63\x2F\x66\x61\x78\x51\x75\x65\x75\x65","\x74\x68\x65\x6E","\x69\x6E\x69\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x69\x6E\x69\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x69\x6E\x69\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x69\x6E\x69\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x69\x6E\x69\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x69\x6E\x69\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x67\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x69\x74\x41\x67\x65\x6E\x74\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x72\x65\x73\x6F\x6C\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x6C\x69\x73\x74\x65\x6E"];_0xf903[0];var BPromise=require(_0xf903[1]);var server=require(_0xf903[2]);var Realtime=require(_0xf903[3]);var user=require(_0xf903[4]);var interval=require(_0xf903[5]);var openchannelQueue=require(_0xf903[6]);var chatQueue=require(_0xf903[7]);var smsQueue=require(_0xf903[8]);var mailQueue=require(_0xf903[9]);var faxQueue=require(_0xf903[10]);var realtime= new Realtime();function initRealtime(){return BPromise[_0xf903[26]]()[_0xf903[11]](user[_0xf903[25]]())[_0xf903[11]](realtime[_0xf903[24]]())[_0xf903[11]](interval[_0xf903[23]]())[_0xf903[11]](realtime[_0xf903[22]]())[_0xf903[11]](openchannelQueue[_0xf903[21]]())[_0xf903[11]](realtime[_0xf903[20]]())[_0xf903[11]](chatQueue[_0xf903[19]]())[_0xf903[11]](realtime[_0xf903[18]]())[_0xf903[11]](smsQueue[_0xf903[17]]())[_0xf903[11]](realtime[_0xf903[16]]())[_0xf903[11]](mailQueue[_0xf903[15]]())[_0xf903[11]](realtime[_0xf903[14]]())[_0xf903[11]](faxQueue[_0xf903[13]]())[_0xf903[11]](realtime[_0xf903[12]]())[_0xf903[11]](function(){return realtime})}return server[_0xf903[29]](realtime)[_0xf903[11]](function(_0x4a15xe){return initRealtime()})[_0xf903[11]](function(realtime){return setInterval(initRealtime,5000)})[_0xf903[28]](function(_0x4a15xd){console[_0xf903[27]](_0x4a15xd)})
\ No newline at end of file
index e7a8990..a412f25 100644 (file)
@@ -1 +1 @@
-var _0xb5a3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x69\x6E\x69\x74","\x69\x73\x4E\x69\x6C","\x72\x65\x67\x69\x73\x74\x65\x72","\x69\x67\x6E\x6F\x72\x65\x46\x61\x63\x74\x43\x68\x61\x6E\x67\x65\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x72\x75\x6C\x65\x73","\x61\x63\x74\x69\x76\x65\x52\x75\x6C\x65\x73","\x69\x73\x41\x72\x72\x61\x79","\x63\x6F\x6E\x63\x61\x74","\x69\x73\x4F\x62\x6A\x65\x63\x74","\x70\x75\x73\x68","\x73\x79\x6E\x63","\x6F\x6E","\x66\x69\x6C\x74\x65\x72","\x70","\x61\x73\x63","\x6F\x72\x64\x65\x72\x42\x79","\x65\x78\x65\x63\x75\x74\x65","\x72\x65\x73\x75\x6C\x74","\x63\x6C\x6F\x6E\x65","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x72\x75\x6C\x65\x52\x65\x66","\x69\x64","\x6E\x61\x6D\x65","\x69\x6E\x64\x65\x78\x5F","\x63\x61\x6C\x6C","\x6E\x65\x78\x74\x54\x69\x63\x6B","\x6E\x65\x78\x74","\x69\x73\x45\x71\x75\x61\x6C","\x72\x65\x73\x74\x61\x72\x74","\x6C\x65\x6E\x67\x74\x68","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x6D\x61\x74\x63\x68\x50\x61\x74\x68","\x6E\x6F\x6F\x70","\x66\x69\x6E\x64\x52\x75\x6C\x65\x73","\x6D\x61\x74\x63\x68\x65\x73","\x74\x75\x72\x6E","\x4F\x4E","\x70\x72\x69\x6F\x72\x69\x74\x69\x7A\x65","\x70\x72\x69\x6F\x72\x69\x74\x79","\x74\x6F\x4A\x53\x4F\x4E","\x6D\x61\x70","\x66\x72\x6F\x6D\x4A\x53\x4F\x4E","\x69\x73\x53\x74\x72\x69\x6E\x67","\x70\x61\x72\x73\x65","\x28","\x29","\x6F\x62\x6A\x65\x63\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xb5a3[0];var _=require(_0xb5a3[1]);function RuleEngine(_0x68aex3,_0x68aex4){this[_0xb5a3[2]]();if(!_[_0xb5a3[3]](_0x68aex3)){this[_0xb5a3[4]](_0x68aex3)};if(_0x68aex4){this[_0xb5a3[5]]= _0x68aex4[_0xb5a3[5]]};return this}RuleEngine[_0xb5a3[6]][_0xb5a3[2]]= function(_0x68aex3){this[_0xb5a3[7]]= [];this[_0xb5a3[8]]= []};RuleEngine[_0xb5a3[6]][_0xb5a3[4]]= function(_0x68aex3){if(Array[_0xb5a3[9]](_0x68aex3)){this[_0xb5a3[7]]= this[_0xb5a3[7]][_0xb5a3[10]](_0x68aex3)}else {if(_0x68aex3!== null&& _[_0xb5a3[11]](_0x68aex3)){this[_0xb5a3[7]][_0xb5a3[12]](_0x68aex3)}};this[_0xb5a3[13]]()};RuleEngine[_0xb5a3[6]][_0xb5a3[13]]= function(){this[_0xb5a3[8]]= this[_0xb5a3[7]][_0xb5a3[15]](function(_0x68aex5){if(_[_0xb5a3[3]](_0x68aex5[_0xb5a3[14]])){_0x68aex5[_0xb5a3[14]]= true};if(_0x68aex5[_0xb5a3[14]]=== true){return _0x68aex5}});this[_0xb5a3[8]]= _[_0xb5a3[18]](this[_0xb5a3[8]],[_0xb5a3[16]],[_0xb5a3[17]])};RuleEngine[_0xb5a3[6]][_0xb5a3[19]]= function(_0x68aex6,_0x68aex7){var _0x68aex8=false;_0x68aex6[_0xb5a3[20]]= true;var _0x68aex9=_[_0xb5a3[21]](_0x68aex6);var _0x68aexa=_[_0xb5a3[21]](_0x68aex6);var _0x68aexb=this[_0xb5a3[8]];var _0x68aexc=[];var _0x68aexd=this[_0xb5a3[5]];(function _0x68aexe(_0x68aexf){var _0x68aex10={"\x72\x75\x6C\x65\x73":function(){return _0x68aexb},"\x72\x75\x6C\x65":function(){return _0x68aexb[_0x68aexf]},"\x77\x68\x65\x6E":function(_0x68aex11){if(_0x68aex11){var _0x68aex12=_0x68aexb[_0x68aexf][_0xb5a3[22]];_0x68aex12[_0xb5a3[23]]= _0x68aexb[_0x68aexf][_0xb5a3[24]]|| _0x68aexb[_0x68aexf][_0xb5a3[25]]|| _0xb5a3[26]+ _0x68aexf;process[_0xb5a3[28]](function(){_0x68aexc[_0xb5a3[12]](_0x68aex12[_0xb5a3[23]]);_0x68aex12[_0xb5a3[27]](_0x68aex9,_0x68aex10)})}else {process[_0xb5a3[28]](function(){_0x68aex10[_0xb5a3[29]]()})}},"\x72\x65\x73\x74\x61\x72\x74":function(){return _0x68aexe(0)},"\x73\x74\x6F\x70":function(){_0x68aex8= true;return _0x68aexe(0)},"\x6E\x65\x78\x74":function(_0x68aex13){if(!_0x68aexd&&  !_[_0xb5a3[30]](_0x68aexa,_0x68aex9)){_0x68aexa= _[_0xb5a3[21]](_0x68aex9);process[_0xb5a3[28]](function(){_0x68aex10[_0xb5a3[31]]()})}else {process[_0xb5a3[28]](function(){if(_[_0xb5a3[3]](_0x68aex13)){return _0x68aexe(_0x68aexf+ 1)}else {return _0x68aexe(_0x68aex13)}})}}};if(_0x68aexf< _0x68aexb[_0xb5a3[32]]&& _0x68aex8=== false){var _0x68aex14=_0x68aexb[_0x68aexf][_0xb5a3[33]];_0x68aex14[_0xb5a3[27]](_0x68aex9,_0x68aex10)}else {process[_0xb5a3[28]](function(){_0x68aex9[_0xb5a3[34]]= _0x68aexc;return _0x68aex7?_0x68aex7(_0x68aex9):_[_0xb5a3[35]]()})}})(0)};RuleEngine[_0xb5a3[6]][_0xb5a3[36]]= function(_0x68aex15){if(_[_0xb5a3[3]](_0x68aex15)){return this[_0xb5a3[7]]}else {var _0x68aex16=_[_0xb5a3[37]](_0x68aex15);return _[_0xb5a3[15]](this[_0xb5a3[7]],_0x68aex16)}};RuleEngine[_0xb5a3[6]][_0xb5a3[38]]= function(_0x68aex17,_0x68aex15){var _0x68aex17=(_0x68aex17=== _0xb5a3[14]|| _0x68aex17=== _0xb5a3[39])?true:false;var _0x68aex3=this[_0xb5a3[36]](_0x68aex15);for(var _0x68aex18=0,_0x68aex19=_0x68aex3[_0xb5a3[32]];_0x68aex18< _0x68aex19;_0x68aex18+= 1){_0x68aex3[_0x68aex18][_0xb5a3[14]]= _0x68aex17};this[_0xb5a3[13]]()};RuleEngine[_0xb5a3[6]][_0xb5a3[40]]= function(_0x68aex1a,_0x68aex15){_0x68aex1a= parseInt(_0x68aex1a,10);var _0x68aex3=this[_0xb5a3[36]](_0x68aex15);for(var _0x68aex18=0,_0x68aex19=_0x68aex3[_0xb5a3[32]];_0x68aex18< _0x68aex19;_0x68aex18+= 1){_0x68aex3[_0x68aex18][_0xb5a3[41]]= _0x68aex1a};this[_0xb5a3[13]]()};RuleEngine[_0xb5a3[6]][_0xb5a3[42]]= function(){var _0x68aex3=this[_0xb5a3[7]];if(_0x68aex3 instanceof  Array){_0x68aex3= _0x68aex3[_0xb5a3[43]](function(_0x68aex1b){_0x68aex1b[_0xb5a3[33]]= _0x68aex1b[_0xb5a3[33]].toString();_0x68aex1b[_0xb5a3[22]]= _0x68aex1b[_0xb5a3[22]].toString();return _0x68aex1b})}else {if(!_[_0xb5a3[3]](_0x68aex3)){_0x68aex3[_0xb5a3[33]]= _0x68aex3[_0xb5a3[33]].toString();_0x68aex3[_0xb5a3[22]]= _0x68aex3[_0xb5a3[22]].toString()}};return _0x68aex3};RuleEngine[_0xb5a3[6]][_0xb5a3[44]]= function(_0x68aex3){this[_0xb5a3[2]]();if(_[_0xb5a3[45]](_0x68aex3)){_0x68aex3= JSON[_0xb5a3[46]](_0x68aex3)};if(_0x68aex3 instanceof  Array){_0x68aex3= _0x68aex3[_0xb5a3[43]](function(_0x68aex1b){_0x68aex1b[_0xb5a3[33]]= eval(_0xb5a3[47]+ _0x68aex1b[_0xb5a3[33]]+ _0xb5a3[48]);_0x68aex1b[_0xb5a3[22]]= eval(_0xb5a3[47]+ _0x68aex1b[_0xb5a3[22]]+ _0xb5a3[48]);return _0x68aex1b})}else {if(_0x68aex3!== null&&  typeof (_0x68aex3)== _0xb5a3[49]){_0x68aex3[_0xb5a3[33]]= eval(_0xb5a3[47]+ _0x68aex3[_0xb5a3[33]]+ _0xb5a3[48]);_0x68aex3[_0xb5a3[22]]= eval(_0xb5a3[47]+ _0x68aex3[_0xb5a3[22]]+ _0xb5a3[48])}};this[_0xb5a3[4]](_0x68aex3)};module[_0xb5a3[50]]= RuleEngine
\ No newline at end of file
+var _0x27d4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x69\x6E\x69\x74","\x69\x73\x4E\x69\x6C","\x72\x65\x67\x69\x73\x74\x65\x72","\x69\x67\x6E\x6F\x72\x65\x46\x61\x63\x74\x43\x68\x61\x6E\x67\x65\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x72\x75\x6C\x65\x73","\x61\x63\x74\x69\x76\x65\x52\x75\x6C\x65\x73","\x69\x73\x41\x72\x72\x61\x79","\x63\x6F\x6E\x63\x61\x74","\x69\x73\x4F\x62\x6A\x65\x63\x74","\x70\x75\x73\x68","\x73\x79\x6E\x63","\x6F\x6E","\x66\x69\x6C\x74\x65\x72","\x70","\x61\x73\x63","\x6F\x72\x64\x65\x72\x42\x79","\x65\x78\x65\x63\x75\x74\x65","\x72\x65\x73\x75\x6C\x74","\x63\x6C\x6F\x6E\x65","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x72\x75\x6C\x65\x52\x65\x66","\x69\x64","\x6E\x61\x6D\x65","\x69\x6E\x64\x65\x78\x5F","\x63\x61\x6C\x6C","\x6E\x65\x78\x74\x54\x69\x63\x6B","\x6E\x65\x78\x74","\x69\x73\x45\x71\x75\x61\x6C","\x72\x65\x73\x74\x61\x72\x74","\x6C\x65\x6E\x67\x74\x68","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x6D\x61\x74\x63\x68\x50\x61\x74\x68","\x6E\x6F\x6F\x70","\x66\x69\x6E\x64\x52\x75\x6C\x65\x73","\x6D\x61\x74\x63\x68\x65\x73","\x74\x75\x72\x6E","\x4F\x4E","\x70\x72\x69\x6F\x72\x69\x74\x69\x7A\x65","\x70\x72\x69\x6F\x72\x69\x74\x79","\x74\x6F\x4A\x53\x4F\x4E","\x6D\x61\x70","\x66\x72\x6F\x6D\x4A\x53\x4F\x4E","\x69\x73\x53\x74\x72\x69\x6E\x67","\x70\x61\x72\x73\x65","\x28","\x29","\x6F\x62\x6A\x65\x63\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x27d4[0];var _=require(_0x27d4[1]);function RuleEngine(_0x4e87x3,_0x4e87x4){this[_0x27d4[2]]();if(!_[_0x27d4[3]](_0x4e87x3)){this[_0x27d4[4]](_0x4e87x3)};if(_0x4e87x4){this[_0x27d4[5]]= _0x4e87x4[_0x27d4[5]]};return this}RuleEngine[_0x27d4[6]][_0x27d4[2]]= function(_0x4e87x3){this[_0x27d4[7]]= [];this[_0x27d4[8]]= []};RuleEngine[_0x27d4[6]][_0x27d4[4]]= function(_0x4e87x3){if(Array[_0x27d4[9]](_0x4e87x3)){this[_0x27d4[7]]= this[_0x27d4[7]][_0x27d4[10]](_0x4e87x3)}else {if(_0x4e87x3!== null&& _[_0x27d4[11]](_0x4e87x3)){this[_0x27d4[7]][_0x27d4[12]](_0x4e87x3)}};this[_0x27d4[13]]()};RuleEngine[_0x27d4[6]][_0x27d4[13]]= function(){this[_0x27d4[8]]= this[_0x27d4[7]][_0x27d4[15]](function(_0x4e87x5){if(_[_0x27d4[3]](_0x4e87x5[_0x27d4[14]])){_0x4e87x5[_0x27d4[14]]= true};if(_0x4e87x5[_0x27d4[14]]=== true){return _0x4e87x5}});this[_0x27d4[8]]= _[_0x27d4[18]](this[_0x27d4[8]],[_0x27d4[16]],[_0x27d4[17]])};RuleEngine[_0x27d4[6]][_0x27d4[19]]= function(_0x4e87x6,_0x4e87x7){var _0x4e87x8=false;_0x4e87x6[_0x27d4[20]]= true;var _0x4e87x9=_[_0x27d4[21]](_0x4e87x6);var _0x4e87xa=_[_0x27d4[21]](_0x4e87x6);var _0x4e87xb=this[_0x27d4[8]];var _0x4e87xc=[];var _0x4e87xd=this[_0x27d4[5]];(function _0x4e87xe(_0x4e87xf){var _0x4e87x10={"\x72\x75\x6C\x65\x73":function(){return _0x4e87xb},"\x72\x75\x6C\x65":function(){return _0x4e87xb[_0x4e87xf]},"\x77\x68\x65\x6E":function(_0x4e87x11){if(_0x4e87x11){var _0x4e87x12=_0x4e87xb[_0x4e87xf][_0x27d4[22]];_0x4e87x12[_0x27d4[23]]= _0x4e87xb[_0x4e87xf][_0x27d4[24]]|| _0x4e87xb[_0x4e87xf][_0x27d4[25]]|| _0x27d4[26]+ _0x4e87xf;process[_0x27d4[28]](function(){_0x4e87xc[_0x27d4[12]](_0x4e87x12[_0x27d4[23]]);_0x4e87x12[_0x27d4[27]](_0x4e87x9,_0x4e87x10)})}else {process[_0x27d4[28]](function(){_0x4e87x10[_0x27d4[29]]()})}},"\x72\x65\x73\x74\x61\x72\x74":function(){return _0x4e87xe(0)},"\x73\x74\x6F\x70":function(){_0x4e87x8= true;return _0x4e87xe(0)},"\x6E\x65\x78\x74":function(_0x4e87x13){if(!_0x4e87xd&&  !_[_0x27d4[30]](_0x4e87xa,_0x4e87x9)){_0x4e87xa= _[_0x27d4[21]](_0x4e87x9);process[_0x27d4[28]](function(){_0x4e87x10[_0x27d4[31]]()})}else {process[_0x27d4[28]](function(){if(_[_0x27d4[3]](_0x4e87x13)){return _0x4e87xe(_0x4e87xf+ 1)}else {return _0x4e87xe(_0x4e87x13)}})}}};if(_0x4e87xf< _0x4e87xb[_0x27d4[32]]&& _0x4e87x8=== false){var _0x4e87x14=_0x4e87xb[_0x4e87xf][_0x27d4[33]];_0x4e87x14[_0x27d4[27]](_0x4e87x9,_0x4e87x10)}else {process[_0x27d4[28]](function(){_0x4e87x9[_0x27d4[34]]= _0x4e87xc;return _0x4e87x7?_0x4e87x7(_0x4e87x9):_[_0x27d4[35]]()})}})(0)};RuleEngine[_0x27d4[6]][_0x27d4[36]]= function(_0x4e87x15){if(_[_0x27d4[3]](_0x4e87x15)){return this[_0x27d4[7]]}else {var _0x4e87x16=_[_0x27d4[37]](_0x4e87x15);return _[_0x27d4[15]](this[_0x27d4[7]],_0x4e87x16)}};RuleEngine[_0x27d4[6]][_0x27d4[38]]= function(_0x4e87x17,_0x4e87x15){var _0x4e87x17=(_0x4e87x17=== _0x27d4[14]|| _0x4e87x17=== _0x27d4[39])?true:false;var _0x4e87x3=this[_0x27d4[36]](_0x4e87x15);for(var _0x4e87x18=0,_0x4e87x19=_0x4e87x3[_0x27d4[32]];_0x4e87x18< _0x4e87x19;_0x4e87x18+= 1){_0x4e87x3[_0x4e87x18][_0x27d4[14]]= _0x4e87x17};this[_0x27d4[13]]()};RuleEngine[_0x27d4[6]][_0x27d4[40]]= function(_0x4e87x1a,_0x4e87x15){_0x4e87x1a= parseInt(_0x4e87x1a,10);var _0x4e87x3=this[_0x27d4[36]](_0x4e87x15);for(var _0x4e87x18=0,_0x4e87x19=_0x4e87x3[_0x27d4[32]];_0x4e87x18< _0x4e87x19;_0x4e87x18+= 1){_0x4e87x3[_0x4e87x18][_0x27d4[41]]= _0x4e87x1a};this[_0x27d4[13]]()};RuleEngine[_0x27d4[6]][_0x27d4[42]]= function(){var _0x4e87x3=this[_0x27d4[7]];if(_0x4e87x3 instanceof  Array){_0x4e87x3= _0x4e87x3[_0x27d4[43]](function(_0x4e87x1b){_0x4e87x1b[_0x27d4[33]]= _0x4e87x1b[_0x27d4[33]].toString();_0x4e87x1b[_0x27d4[22]]= _0x4e87x1b[_0x27d4[22]].toString();return _0x4e87x1b})}else {if(!_[_0x27d4[3]](_0x4e87x3)){_0x4e87x3[_0x27d4[33]]= _0x4e87x3[_0x27d4[33]].toString();_0x4e87x3[_0x27d4[22]]= _0x4e87x3[_0x27d4[22]].toString()}};return _0x4e87x3};RuleEngine[_0x27d4[6]][_0x27d4[44]]= function(_0x4e87x3){this[_0x27d4[2]]();if(_[_0x27d4[45]](_0x4e87x3)){_0x4e87x3= JSON[_0x27d4[46]](_0x4e87x3)};if(_0x4e87x3 instanceof  Array){_0x4e87x3= _0x4e87x3[_0x27d4[43]](function(_0x4e87x1b){_0x4e87x1b[_0x27d4[33]]= eval(_0x27d4[47]+ _0x4e87x1b[_0x27d4[33]]+ _0x27d4[48]);_0x4e87x1b[_0x27d4[22]]= eval(_0x27d4[47]+ _0x4e87x1b[_0x27d4[22]]+ _0x27d4[48]);return _0x4e87x1b})}else {if(_0x4e87x3!== null&&  typeof (_0x4e87x3)== _0x27d4[49]){_0x4e87x3[_0x27d4[33]]= eval(_0x27d4[47]+ _0x4e87x3[_0x27d4[33]]+ _0x27d4[48]);_0x4e87x3[_0x27d4[22]]= eval(_0x27d4[47]+ _0x4e87x3[_0x27d4[22]]+ _0x27d4[48])}};this[_0x27d4[4]](_0x4e87x3)};module[_0x27d4[50]]= RuleEngine
\ No newline at end of file
index 70b2f22..c47655e 100644 (file)
@@ -1 +1 @@
-var _0xd871=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x63\x61\x74\x63\x68","\x65\x72\x72\x6F\x72","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x53\x65\x6E\x64\x4D\x61\x69\x6C"];_0xd871[0];var BPromise=require(_0xd871[1]);var jayson=require(_0xd871[2]);var client=jayson[_0xd871[4]][_0xd871[3]]({port:9003});function request(_0xf730x5,_0xf730x6){return  new BPromise(function(_0xf730x7,_0xf730x8){return client[_0xd871[10]](_0xf730x5,_0xf730x6)[_0xd871[9]](function(_0xf730xa){if(_0xf730xa[_0xd871[6]]){return _0xf730x8(_0xf730xa[_0xd871[6]][_0xd871[7]])}else {return _0xf730x7(_0xf730xa[_0xd871[8]])}})[_0xd871[5]](function(_0xf730x9){return _0xf730x8(_0xf730x9)})})}exports[_0xd871[11]]= function(_0xf730xb,_0xf730xc){return request(_0xd871[12],{account:_0xf730xb,message:_0xf730xc})}
\ No newline at end of file
+var _0x51be=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x63\x61\x74\x63\x68","\x65\x72\x72\x6F\x72","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x73\x65\x6E\x64\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x53\x65\x6E\x64\x4D\x61\x69\x6C"];_0x51be[0];var BPromise=require(_0x51be[1]);var jayson=require(_0x51be[2]);var client=jayson[_0x51be[4]][_0x51be[3]]({port:9003});function request(_0x8c74x5,_0x8c74x6){return  new BPromise(function(_0x8c74x7,_0x8c74x8){return client[_0x51be[10]](_0x8c74x5,_0x8c74x6)[_0x51be[9]](function(_0x8c74xa){if(_0x8c74xa[_0x51be[6]]){return _0x8c74x8(_0x8c74xa[_0x51be[6]][_0x51be[7]])}else {return _0x8c74x7(_0x8c74xa[_0x51be[8]])}})[_0x51be[5]](function(_0x8c74x9){return _0x8c74x8(_0x8c74x9)})})}exports[_0x51be[11]]= function(_0x8c74xb,_0x8c74xc){return request(_0x51be[12],{account:_0x8c74xb,message:_0x8c74xc})}
\ No newline at end of file
index 85d3859..3ea456c 100644 (file)
@@ -1 +1 @@
-var _0x53c0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x69\x64","\x6E\x61\x6D\x65","","\x6F\x6E\x6C\x69\x6E\x65","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x73\x6D\x73\x50\x61\x75\x73\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x53\x74\x61\x74\x75\x73","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x63\x68\x61\x74\x53\x74\x61\x74\x75\x73\x54\x69\x6D\x65","\x63\x68\x61\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x63\x68\x61\x74\x43\x75\x72\x72\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x6D\x61\x69\x6C\x53\x74\x61\x74\x75\x73","\x6D\x61\x69\x6C\x53\x74\x61\x74\x75\x73\x54\x69\x6D\x65","\x6D\x61\x69\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x6D\x61\x69\x6C\x43\x75\x72\x72\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x66\x61\x78\x53\x74\x61\x74\x75\x73","\x66\x61\x78\x53\x74\x61\x74\x75\x73\x54\x69\x6D\x65","\x66\x61\x78\x43\x61\x70\x61\x63\x69\x74\x79","\x66\x61\x78\x43\x75\x72\x72\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x73\x6D\x73\x53\x74\x61\x74\x75\x73","\x73\x6D\x73\x53\x74\x61\x74\x75\x73\x54\x69\x6D\x65","\x73\x6D\x73\x43\x61\x70\x61\x63\x69\x74\x79","\x73\x6D\x73\x43\x75\x72\x72\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x53\x74\x61\x74\x75\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x53\x74\x61\x74\x75\x73\x54\x69\x6D\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x43\x75\x72\x72\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x62\x75\x73\x79","\x62\x75\x73\x79\x51\x75\x65\x75\x65","\x75\x70\x64\x61\x74\x65\x52\x65\x61\x6C\x74\x69\x6D\x65","\x67\x65\x74\x43\x68\x61\x6E\x6E\x65\x6C\x53\x74\x61\x74\x75\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x43\x75\x72\x72\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x43\x61\x70\x61\x63\x69\x74\x79","\x6D\x61\x78\x63\x61\x70\x61\x63\x69\x74\x79","\x77\x6F\x72\x6B\x69\x6E\x67","\x69\x64\x6C\x65","\x6D\x61\x69\x6C","\x63\x68\x61\x74","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x66\x61\x78","\x73\x6D\x73","\x6C\x65\x6E\x67\x74\x68","\x53\x74\x61\x74\x75\x73","\x53\x74\x61\x74\x75\x73\x54\x69\x6D\x65","\x78","\x66\x6F\x72\x6D\x61\x74","\x74\x6F\x4E\x75\x6D\x62\x65\x72","\x75\x73\x65\x72\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x53c0[0];var _=require(_0x53c0[1]);var moment=require(_0x53c0[2]);var io=require(_0x53c0[4])({host:_0x53c0[3],port:6379});function Agent(_0x91bbx5){this[_0x53c0[5]]= _0x91bbx5[_0x53c0[5]]|| 0;this[_0x53c0[6]]= _0x91bbx5[_0x53c0[6]]|| _0x53c0[7];this[_0x53c0[8]]= _0x91bbx5[_0x53c0[8]]|| true;this[_0x53c0[9]]= _0x91bbx5[_0x53c0[9]]|| false;this[_0x53c0[10]]= _0x91bbx5[_0x53c0[10]]|| false;this[_0x53c0[11]]= _0x91bbx5[_0x53c0[11]]|| false;this[_0x53c0[12]]= _0x91bbx5[_0x53c0[12]]|| false;this[_0x53c0[13]]= _0x91bbx5[_0x53c0[13]]|| false;this[_0x53c0[14]]= _0x91bbx5[_0x53c0[14]]|| false;this[_0x53c0[15]]= _0x53c0[16];this[_0x53c0[17]]= 0;this[_0x53c0[18]]= _0x91bbx5[_0x53c0[18]]|| 0;this[_0x53c0[19]]= 0;this[_0x53c0[20]]= _0x53c0[16];this[_0x53c0[21]]= 0;this[_0x53c0[22]]= _0x91bbx5[_0x53c0[22]]|| 0;this[_0x53c0[23]]= 0;this[_0x53c0[24]]= _0x53c0[16];this[_0x53c0[25]]= 0;this[_0x53c0[26]]= _0x91bbx5[_0x53c0[26]]|| 0;this[_0x53c0[27]]= 0;this[_0x53c0[28]]= _0x53c0[16];this[_0x53c0[29]]= 0;this[_0x53c0[30]]= _0x91bbx5[_0x53c0[30]]|| 0;this[_0x53c0[31]]= 0;this[_0x53c0[32]]= _0x53c0[16];this[_0x53c0[33]]= 0;this[_0x53c0[34]]= _0x91bbx5[_0x53c0[34]]|| 0;this[_0x53c0[35]]= 0;this[_0x53c0[36]]= false;this[_0x53c0[37]]= undefined;this[_0x53c0[38]]()}Agent[_0x53c0[40]][_0x53c0[39]]= function(_0x91bbx6){if(this[_0x91bbx6+ _0x53c0[41]]> 0){if(this[_0x91bbx6+ _0x53c0[42]]> 0&& this[_0x91bbx6+ _0x53c0[41]]>= this[_0x91bbx6+ _0x53c0[42]]){return _0x53c0[43]}else {return _0x53c0[44]}}else {return _0x53c0[45]}};Agent[_0x53c0[40]][_0x53c0[38]]= function(){var _0x91bbx7=[_0x53c0[46],_0x53c0[47],_0x53c0[48],_0x53c0[49],_0x53c0[50]];for(var _0x91bbx8=0;_0x91bbx8< _0x91bbx7[_0x53c0[51]];_0x91bbx8+= 1){var _0x91bbx9=this[_0x53c0[39]](_0x91bbx7[_0x91bbx8]);if(this[_0x91bbx7[_0x91bbx8]+ _0x53c0[52]]!== _0x91bbx9){this[_0x91bbx7[_0x91bbx8]+ _0x53c0[53]]= _[_0x53c0[56]](moment()[_0x53c0[55]](_0x53c0[54]))};this[_0x91bbx7[_0x91bbx8]+ _0x53c0[52]]= _0x91bbx9};io[_0x53c0[58]](_0x53c0[57],this)};module[_0x53c0[59]]= Agent
\ No newline at end of file
+var _0xc33f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x69\x64","\x6E\x61\x6D\x65","","\x6F\x6E\x6C\x69\x6E\x65","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x73\x6D\x73\x50\x61\x75\x73\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x53\x74\x61\x74\x75\x73","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x63\x68\x61\x74\x53\x74\x61\x74\x75\x73\x54\x69\x6D\x65","\x63\x68\x61\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x63\x68\x61\x74\x43\x75\x72\x72\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x6D\x61\x69\x6C\x53\x74\x61\x74\x75\x73","\x6D\x61\x69\x6C\x53\x74\x61\x74\x75\x73\x54\x69\x6D\x65","\x6D\x61\x69\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x6D\x61\x69\x6C\x43\x75\x72\x72\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x66\x61\x78\x53\x74\x61\x74\x75\x73","\x66\x61\x78\x53\x74\x61\x74\x75\x73\x54\x69\x6D\x65","\x66\x61\x78\x43\x61\x70\x61\x63\x69\x74\x79","\x66\x61\x78\x43\x75\x72\x72\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x73\x6D\x73\x53\x74\x61\x74\x75\x73","\x73\x6D\x73\x53\x74\x61\x74\x75\x73\x54\x69\x6D\x65","\x73\x6D\x73\x43\x61\x70\x61\x63\x69\x74\x79","\x73\x6D\x73\x43\x75\x72\x72\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x53\x74\x61\x74\x75\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x53\x74\x61\x74\x75\x73\x54\x69\x6D\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x43\x75\x72\x72\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x62\x75\x73\x79","\x62\x75\x73\x79\x51\x75\x65\x75\x65","\x75\x70\x64\x61\x74\x65\x52\x65\x61\x6C\x74\x69\x6D\x65","\x67\x65\x74\x43\x68\x61\x6E\x6E\x65\x6C\x53\x74\x61\x74\x75\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x43\x75\x72\x72\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x43\x61\x70\x61\x63\x69\x74\x79","\x6D\x61\x78\x63\x61\x70\x61\x63\x69\x74\x79","\x77\x6F\x72\x6B\x69\x6E\x67","\x69\x64\x6C\x65","\x6D\x61\x69\x6C","\x63\x68\x61\x74","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x66\x61\x78","\x73\x6D\x73","\x6C\x65\x6E\x67\x74\x68","\x53\x74\x61\x74\x75\x73","\x53\x74\x61\x74\x75\x73\x54\x69\x6D\x65","\x78","\x66\x6F\x72\x6D\x61\x74","\x74\x6F\x4E\x75\x6D\x62\x65\x72","\x75\x73\x65\x72\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xc33f[0];var _=require(_0xc33f[1]);var moment=require(_0xc33f[2]);var io=require(_0xc33f[4])({host:_0xc33f[3],port:6379});function Agent(_0x89a4x5){this[_0xc33f[5]]= _0x89a4x5[_0xc33f[5]]|| 0;this[_0xc33f[6]]= _0x89a4x5[_0xc33f[6]]|| _0xc33f[7];this[_0xc33f[8]]= _0x89a4x5[_0xc33f[8]]|| true;this[_0xc33f[9]]= _0x89a4x5[_0xc33f[9]]|| false;this[_0xc33f[10]]= _0x89a4x5[_0xc33f[10]]|| false;this[_0xc33f[11]]= _0x89a4x5[_0xc33f[11]]|| false;this[_0xc33f[12]]= _0x89a4x5[_0xc33f[12]]|| false;this[_0xc33f[13]]= _0x89a4x5[_0xc33f[13]]|| false;this[_0xc33f[14]]= _0x89a4x5[_0xc33f[14]]|| false;this[_0xc33f[15]]= _0xc33f[16];this[_0xc33f[17]]= 0;this[_0xc33f[18]]= _0x89a4x5[_0xc33f[18]]|| 0;this[_0xc33f[19]]= 0;this[_0xc33f[20]]= _0xc33f[16];this[_0xc33f[21]]= 0;this[_0xc33f[22]]= _0x89a4x5[_0xc33f[22]]|| 0;this[_0xc33f[23]]= 0;this[_0xc33f[24]]= _0xc33f[16];this[_0xc33f[25]]= 0;this[_0xc33f[26]]= _0x89a4x5[_0xc33f[26]]|| 0;this[_0xc33f[27]]= 0;this[_0xc33f[28]]= _0xc33f[16];this[_0xc33f[29]]= 0;this[_0xc33f[30]]= _0x89a4x5[_0xc33f[30]]|| 0;this[_0xc33f[31]]= 0;this[_0xc33f[32]]= _0xc33f[16];this[_0xc33f[33]]= 0;this[_0xc33f[34]]= _0x89a4x5[_0xc33f[34]]|| 0;this[_0xc33f[35]]= 0;this[_0xc33f[36]]= false;this[_0xc33f[37]]= undefined;this[_0xc33f[38]]()}Agent[_0xc33f[40]][_0xc33f[39]]= function(_0x89a4x6){if(this[_0x89a4x6+ _0xc33f[41]]> 0){if(this[_0x89a4x6+ _0xc33f[42]]> 0&& this[_0x89a4x6+ _0xc33f[41]]>= this[_0x89a4x6+ _0xc33f[42]]){return _0xc33f[43]}else {return _0xc33f[44]}}else {return _0xc33f[45]}};Agent[_0xc33f[40]][_0xc33f[38]]= function(){var _0x89a4x7=[_0xc33f[46],_0xc33f[47],_0xc33f[48],_0xc33f[49],_0xc33f[50]];for(var _0x89a4x8=0;_0x89a4x8< _0x89a4x7[_0xc33f[51]];_0x89a4x8+= 1){var _0x89a4x9=this[_0xc33f[39]](_0x89a4x7[_0x89a4x8]);if(this[_0x89a4x7[_0x89a4x8]+ _0xc33f[52]]!== _0x89a4x9){this[_0x89a4x7[_0x89a4x8]+ _0xc33f[53]]= _[_0xc33f[56]](moment()[_0xc33f[55]](_0xc33f[54]))};this[_0x89a4x7[_0x89a4x8]+ _0xc33f[52]]= _0x89a4x9};io[_0xc33f[58]](_0xc33f[57],this)};module[_0xc33f[59]]= Agent
\ No newline at end of file
index c98912f..6379896 100644 (file)
@@ -1 +1 @@
-var _0x35fb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x69\x64","\x6E\x61\x6D\x65","","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70\x41\x67\x65\x6E\x74\x73\x49\x64","\x77\x61\x69\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x6F\x75\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x65\x61\x6C\x74\x69\x6D\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x5F\x72\x72","\x6D\x61\x70","\x6C\x6F\x67\x67\x65\x64\x49\x6E","\x70\x61\x75\x73\x65\x64","\x6C\x65\x6E\x67\x74\x68","\x6F\x6E\x6C\x69\x6E\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x35fb[0];var _=require(_0x35fb[1]);var io=require(_0x35fb[3])({host:_0x35fb[2],port:6379});function ChatQueue(_0x4656x4){this[_0x35fb[4]]= _0x4656x4[_0x35fb[4]]|| 0;this[_0x35fb[5]]= _0x4656x4[_0x35fb[5]]|| _0x35fb[6];this[_0x35fb[7]]= _0x4656x4[_0x35fb[7]]|| 10;this[_0x35fb[8]]= _0x4656x4[_0x35fb[8]]|| _0x35fb[9];this[_0x35fb[10]]= _0x4656x4[_0x35fb[10]];this[_0x35fb[11]]= {};this[_0x35fb[12]]= 0;this[_0x35fb[13]]();this[_0x35fb[14]]()}ChatQueue[_0x35fb[15]][_0x35fb[13]]= function(){var _0x4656x5=this[_0x35fb[11]][_0x35fb[16]];this[_0x35fb[11]]= _[_0x35fb[17]](this.Agents,_0x35fb[4]);this[_0x35fb[11]][_0x35fb[16]]= _0x4656x5};ChatQueue[_0x35fb[15]][_0x35fb[14]]= function(){this[_0x35fb[18]]= 0;this[_0x35fb[19]]= 0;for(var _0x4656x6=0;_0x4656x6< this[_0x35fb[10]][_0x35fb[20]];_0x4656x6+= 1){if(this[_0x35fb[10]][_0x4656x6][_0x35fb[21]]){this[_0x35fb[18]]+= 1};if(this[_0x35fb[10]][_0x4656x6][_0x35fb[22]]){this[_0x35fb[19]]+= 1}};this[_0x35fb[23]]= this[_0x35fb[18]]- this[_0x35fb[19]];this[_0x35fb[23]]= this[_0x35fb[23]]>= 0?this[_0x35fb[23]]:0;io[_0x35fb[25]](_0x35fb[24],this)};module[_0x35fb[26]]= ChatQueue
\ No newline at end of file
+var _0x7c5c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x69\x64","\x6E\x61\x6D\x65","","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70\x41\x67\x65\x6E\x74\x73\x49\x64","\x77\x61\x69\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x6F\x75\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x65\x61\x6C\x74\x69\x6D\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x5F\x72\x72","\x6D\x61\x70","\x6C\x6F\x67\x67\x65\x64\x49\x6E","\x70\x61\x75\x73\x65\x64","\x6C\x65\x6E\x67\x74\x68","\x6F\x6E\x6C\x69\x6E\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7c5c[0];var _=require(_0x7c5c[1]);var io=require(_0x7c5c[3])({host:_0x7c5c[2],port:6379});function ChatQueue(_0x9838x4){this[_0x7c5c[4]]= _0x9838x4[_0x7c5c[4]]|| 0;this[_0x7c5c[5]]= _0x9838x4[_0x7c5c[5]]|| _0x7c5c[6];this[_0x7c5c[7]]= _0x9838x4[_0x7c5c[7]]|| 10;this[_0x7c5c[8]]= _0x9838x4[_0x7c5c[8]]|| _0x7c5c[9];this[_0x7c5c[10]]= _0x9838x4[_0x7c5c[10]];this[_0x7c5c[11]]= {};this[_0x7c5c[12]]= 0;this[_0x7c5c[13]]();this[_0x7c5c[14]]()}ChatQueue[_0x7c5c[15]][_0x7c5c[13]]= function(){var _0x9838x5=this[_0x7c5c[11]][_0x7c5c[16]];this[_0x7c5c[11]]= _[_0x7c5c[17]](this.Agents,_0x7c5c[4]);this[_0x7c5c[11]][_0x7c5c[16]]= _0x9838x5};ChatQueue[_0x7c5c[15]][_0x7c5c[14]]= function(){this[_0x7c5c[18]]= 0;this[_0x7c5c[19]]= 0;for(var _0x9838x6=0;_0x9838x6< this[_0x7c5c[10]][_0x7c5c[20]];_0x9838x6+= 1){if(this[_0x7c5c[10]][_0x9838x6][_0x7c5c[21]]){this[_0x7c5c[18]]+= 1};if(this[_0x7c5c[10]][_0x9838x6][_0x7c5c[22]]){this[_0x7c5c[19]]+= 1}};this[_0x7c5c[23]]= this[_0x7c5c[18]]- this[_0x7c5c[19]];this[_0x7c5c[23]]= this[_0x7c5c[23]]>= 0?this[_0x7c5c[23]]:0;io[_0x7c5c[25]](_0x7c5c[24],this)};module[_0x7c5c[26]]= ChatQueue
\ No newline at end of file
index f3f4182..e65faac 100644 (file)
@@ -1 +1 @@
-var _0xc719=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x69\x64","\x6E\x61\x6D\x65","","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70\x41\x67\x65\x6E\x74\x73\x49\x64","\x77\x61\x69\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x6F\x75\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x65\x61\x6C\x74\x69\x6D\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x5F\x72\x72","\x6D\x61\x70","\x6C\x6F\x67\x67\x65\x64\x49\x6E","\x70\x61\x75\x73\x65\x64","\x6C\x65\x6E\x67\x74\x68","\x6F\x6E\x6C\x69\x6E\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xc719[0];var _=require(_0xc719[1]);var io=require(_0xc719[3])({host:_0xc719[2],port:6379});function FaxQueue(_0x1228x4){this[_0xc719[4]]= _0x1228x4[_0xc719[4]]|| 0;this[_0xc719[5]]= _0x1228x4[_0xc719[5]]|| _0xc719[6];this[_0xc719[7]]= _0x1228x4[_0xc719[7]]|| 10;this[_0xc719[8]]= _0x1228x4[_0xc719[8]]|| _0xc719[9];this[_0xc719[10]]= _0x1228x4[_0xc719[10]];this[_0xc719[11]]= {};this[_0xc719[12]]= 0;this[_0xc719[13]]();this[_0xc719[14]]()}FaxQueue[_0xc719[15]][_0xc719[13]]= function(){var _0x1228x5=this[_0xc719[11]][_0xc719[16]];this[_0xc719[11]]= _[_0xc719[17]](this.Agents,_0xc719[4]);this[_0xc719[11]][_0xc719[16]]= _0x1228x5};FaxQueue[_0xc719[15]][_0xc719[14]]= function(){this[_0xc719[18]]= 0;this[_0xc719[19]]= 0;for(var _0x1228x6=0;_0x1228x6< this[_0xc719[10]][_0xc719[20]];_0x1228x6+= 1){if(this[_0xc719[10]][_0x1228x6][_0xc719[21]]){this[_0xc719[18]]+= 1};if(this[_0xc719[10]][_0x1228x6][_0xc719[22]]){this[_0xc719[19]]+= 1}};this[_0xc719[23]]= this[_0xc719[18]]- this[_0xc719[19]];this[_0xc719[23]]= this[_0xc719[23]]>= 0?this[_0xc719[23]]:0;io[_0xc719[25]](_0xc719[24],this)};module[_0xc719[26]]= FaxQueue
\ No newline at end of file
+var _0xe262=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x69\x64","\x6E\x61\x6D\x65","","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70\x41\x67\x65\x6E\x74\x73\x49\x64","\x77\x61\x69\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x6F\x75\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x65\x61\x6C\x74\x69\x6D\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x5F\x72\x72","\x6D\x61\x70","\x6C\x6F\x67\x67\x65\x64\x49\x6E","\x70\x61\x75\x73\x65\x64","\x6C\x65\x6E\x67\x74\x68","\x6F\x6E\x6C\x69\x6E\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xe262[0];var _=require(_0xe262[1]);var io=require(_0xe262[3])({host:_0xe262[2],port:6379});function FaxQueue(_0xa15ax4){this[_0xe262[4]]= _0xa15ax4[_0xe262[4]]|| 0;this[_0xe262[5]]= _0xa15ax4[_0xe262[5]]|| _0xe262[6];this[_0xe262[7]]= _0xa15ax4[_0xe262[7]]|| 10;this[_0xe262[8]]= _0xa15ax4[_0xe262[8]]|| _0xe262[9];this[_0xe262[10]]= _0xa15ax4[_0xe262[10]];this[_0xe262[11]]= {};this[_0xe262[12]]= 0;this[_0xe262[13]]();this[_0xe262[14]]()}FaxQueue[_0xe262[15]][_0xe262[13]]= function(){var _0xa15ax5=this[_0xe262[11]][_0xe262[16]];this[_0xe262[11]]= _[_0xe262[17]](this.Agents,_0xe262[4]);this[_0xe262[11]][_0xe262[16]]= _0xa15ax5};FaxQueue[_0xe262[15]][_0xe262[14]]= function(){this[_0xe262[18]]= 0;this[_0xe262[19]]= 0;for(var _0xa15ax6=0;_0xa15ax6< this[_0xe262[10]][_0xe262[20]];_0xa15ax6+= 1){if(this[_0xe262[10]][_0xa15ax6][_0xe262[21]]){this[_0xe262[18]]+= 1};if(this[_0xe262[10]][_0xa15ax6][_0xe262[22]]){this[_0xe262[19]]+= 1}};this[_0xe262[23]]= this[_0xe262[18]]- this[_0xe262[19]];this[_0xe262[23]]= this[_0xe262[23]]>= 0?this[_0xe262[23]]:0;io[_0xe262[25]](_0xe262[24],this)};module[_0xe262[26]]= FaxQueue
\ No newline at end of file
index 7f170f0..3f82949 100644 (file)
@@ -1 +1 @@
-var _0x918d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x918d[0];function Interval(_0x4d70x2){this[_0x918d[1]]= _0x4d70x2[_0x918d[1]]|| 0;this[_0x918d[2]]= _0x4d70x2[_0x918d[2]]|| _0x918d[3];this[_0x918d[4]]= _0x4d70x2[_0x918d[4]]|| {}}module[_0x918d[5]]= Interval
\ No newline at end of file
+var _0x7100=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x64","\x6E\x61\x6D\x65","","\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x7100[0];function Interval(_0x1476x2){this[_0x7100[1]]= _0x1476x2[_0x7100[1]]|| 0;this[_0x7100[2]]= _0x1476x2[_0x7100[2]]|| _0x7100[3];this[_0x7100[4]]= _0x1476x2[_0x7100[4]]|| {}}module[_0x7100[5]]= Interval
\ No newline at end of file
index 4404310..70cd90b 100644 (file)
@@ -1 +1 @@
-var _0x9324=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x69\x64","\x6E\x61\x6D\x65","","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70\x41\x67\x65\x6E\x74\x73\x49\x64","\x77\x61\x69\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x6F\x75\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x65\x61\x6C\x74\x69\x6D\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x5F\x72\x72","\x6D\x61\x70","\x6C\x6F\x67\x67\x65\x64\x49\x6E","\x70\x61\x75\x73\x65\x64","\x6C\x65\x6E\x67\x74\x68","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x9324[0];var _=require(_0x9324[1]);var io=require(_0x9324[3])({host:_0x9324[2],port:6379});function MailQueue(_0x1157x4){this[_0x9324[4]]= _0x1157x4[_0x9324[4]]|| 0;this[_0x9324[5]]= _0x1157x4[_0x9324[5]]|| _0x9324[6];this[_0x9324[7]]= _0x1157x4[_0x9324[7]]|| 10;this[_0x9324[8]]= _0x1157x4[_0x9324[8]]|| _0x9324[9];this[_0x9324[10]]= _0x1157x4[_0x9324[10]];this[_0x9324[11]]= {};this[_0x9324[12]]= 0;this[_0x9324[13]]();this[_0x9324[14]]()}MailQueue[_0x9324[15]][_0x9324[13]]= function(){var _0x1157x5=this[_0x9324[11]][_0x9324[16]];this[_0x9324[11]]= _[_0x9324[17]](this.Agents,_0x9324[4]);this[_0x9324[11]][_0x9324[16]]= _0x1157x5};MailQueue[_0x9324[15]][_0x9324[14]]= function(){this[_0x9324[18]]= 0;this[_0x9324[19]]= 0;for(var _0x1157x6=0;_0x1157x6< this[_0x9324[10]][_0x9324[20]];_0x1157x6+= 1){if(this[_0x9324[10]][_0x1157x6][_0x9324[21]]){this[_0x9324[18]]+= 1};if(this[_0x9324[10]][_0x1157x6][_0x9324[22]]){this[_0x9324[19]]+= 1}};this[_0x9324[23]]= this[_0x9324[18]]- this[_0x9324[19]];this[_0x9324[23]]= this[_0x9324[23]]>= 0?this[_0x9324[23]]:0;io[_0x9324[25]](_0x9324[24],this)};module[_0x9324[26]]= MailQueue
\ No newline at end of file
+var _0xf9f8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x69\x64","\x6E\x61\x6D\x65","","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70\x41\x67\x65\x6E\x74\x73\x49\x64","\x77\x61\x69\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x6F\x75\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x65\x61\x6C\x74\x69\x6D\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x5F\x72\x72","\x6D\x61\x70","\x6C\x6F\x67\x67\x65\x64\x49\x6E","\x70\x61\x75\x73\x65\x64","\x6C\x65\x6E\x67\x74\x68","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xf9f8[0];var _=require(_0xf9f8[1]);var io=require(_0xf9f8[3])({host:_0xf9f8[2],port:6379});function MailQueue(_0x577dx4){this[_0xf9f8[4]]= _0x577dx4[_0xf9f8[4]]|| 0;this[_0xf9f8[5]]= _0x577dx4[_0xf9f8[5]]|| _0xf9f8[6];this[_0xf9f8[7]]= _0x577dx4[_0xf9f8[7]]|| 10;this[_0xf9f8[8]]= _0x577dx4[_0xf9f8[8]]|| _0xf9f8[9];this[_0xf9f8[10]]= _0x577dx4[_0xf9f8[10]];this[_0xf9f8[11]]= {};this[_0xf9f8[12]]= 0;this[_0xf9f8[13]]();this[_0xf9f8[14]]()}MailQueue[_0xf9f8[15]][_0xf9f8[13]]= function(){var _0x577dx5=this[_0xf9f8[11]][_0xf9f8[16]];this[_0xf9f8[11]]= _[_0xf9f8[17]](this.Agents,_0xf9f8[4]);this[_0xf9f8[11]][_0xf9f8[16]]= _0x577dx5};MailQueue[_0xf9f8[15]][_0xf9f8[14]]= function(){this[_0xf9f8[18]]= 0;this[_0xf9f8[19]]= 0;for(var _0x577dx6=0;_0x577dx6< this[_0xf9f8[10]][_0xf9f8[20]];_0x577dx6+= 1){if(this[_0xf9f8[10]][_0x577dx6][_0xf9f8[21]]){this[_0xf9f8[18]]+= 1};if(this[_0xf9f8[10]][_0x577dx6][_0xf9f8[22]]){this[_0xf9f8[19]]+= 1}};this[_0xf9f8[23]]= this[_0xf9f8[18]]- this[_0xf9f8[19]];this[_0xf9f8[23]]= this[_0xf9f8[23]]>= 0?this[_0xf9f8[23]]:0;io[_0xf9f8[25]](_0xf9f8[24],this)};module[_0xf9f8[26]]= MailQueue
\ No newline at end of file
index 1309bf1..8742dd4 100644 (file)
@@ -1 +1 @@
-var _0x8c2d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x69\x64","\x6E\x61\x6D\x65","","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70\x41\x67\x65\x6E\x74\x73\x49\x64","\x77\x61\x69\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x6F\x75\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x65\x61\x6C\x74\x69\x6D\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x5F\x72\x72","\x6D\x61\x70","\x6C\x6F\x67\x67\x65\x64\x49\x6E","\x70\x61\x75\x73\x65\x64","\x6C\x65\x6E\x67\x74\x68","\x6F\x6E\x6C\x69\x6E\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x50\x61\x75\x73\x65","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x8c2d[0];var _=require(_0x8c2d[1]);var io=require(_0x8c2d[3])({host:_0x8c2d[2],port:6379});function OpenchannelQueue(_0x9dd7x4){this[_0x8c2d[4]]= _0x9dd7x4[_0x8c2d[4]]|| 0;this[_0x8c2d[5]]= _0x9dd7x4[_0x8c2d[5]]|| _0x8c2d[6];this[_0x8c2d[7]]= _0x9dd7x4[_0x8c2d[7]]|| 10;this[_0x8c2d[8]]= _0x9dd7x4[_0x8c2d[8]]|| _0x8c2d[9];this[_0x8c2d[10]]= _0x9dd7x4[_0x8c2d[10]];this[_0x8c2d[11]]= {};this[_0x8c2d[12]]= 0;this[_0x8c2d[13]]();this[_0x8c2d[14]]()}OpenchannelQueue[_0x8c2d[15]][_0x8c2d[13]]= function(){var _0x9dd7x5=this[_0x8c2d[11]][_0x8c2d[16]];this[_0x8c2d[11]]= _[_0x8c2d[17]](this.Agents,_0x8c2d[4]);this[_0x8c2d[11]][_0x8c2d[16]]= _0x9dd7x5};OpenchannelQueue[_0x8c2d[15]][_0x8c2d[14]]= function(){this[_0x8c2d[18]]= 0;this[_0x8c2d[19]]= 0;for(var _0x9dd7x6=0;_0x9dd7x6< this[_0x8c2d[10]][_0x8c2d[20]];_0x9dd7x6+= 1){if(this[_0x8c2d[10]][_0x9dd7x6][_0x8c2d[21]]){this[_0x8c2d[18]]+= 1};if(this[_0x8c2d[10]][_0x9dd7x6][_0x8c2d[22]]){this[_0x8c2d[19]]+= 1}};this[_0x8c2d[23]]= this[_0x8c2d[18]]- this[_0x8c2d[19]];this[_0x8c2d[23]]= this[_0x8c2d[23]]>= 0?this[_0x8c2d[23]]:0;io[_0x8c2d[25]](_0x8c2d[24],this)};module[_0x8c2d[26]]= OpenchannelQueue
\ No newline at end of file
+var _0x6fe7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x69\x64","\x6E\x61\x6D\x65","","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70\x41\x67\x65\x6E\x74\x73\x49\x64","\x77\x61\x69\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x6F\x75\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x65\x61\x6C\x74\x69\x6D\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x5F\x72\x72","\x6D\x61\x70","\x6C\x6F\x67\x67\x65\x64\x49\x6E","\x70\x61\x75\x73\x65\x64","\x6C\x65\x6E\x67\x74\x68","\x6F\x6E\x6C\x69\x6E\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x50\x61\x75\x73\x65","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x6fe7[0];var _=require(_0x6fe7[1]);var io=require(_0x6fe7[3])({host:_0x6fe7[2],port:6379});function OpenchannelQueue(_0xa678x4){this[_0x6fe7[4]]= _0xa678x4[_0x6fe7[4]]|| 0;this[_0x6fe7[5]]= _0xa678x4[_0x6fe7[5]]|| _0x6fe7[6];this[_0x6fe7[7]]= _0xa678x4[_0x6fe7[7]]|| 10;this[_0x6fe7[8]]= _0xa678x4[_0x6fe7[8]]|| _0x6fe7[9];this[_0x6fe7[10]]= _0xa678x4[_0x6fe7[10]];this[_0x6fe7[11]]= {};this[_0x6fe7[12]]= 0;this[_0x6fe7[13]]();this[_0x6fe7[14]]()}OpenchannelQueue[_0x6fe7[15]][_0x6fe7[13]]= function(){var _0xa678x5=this[_0x6fe7[11]][_0x6fe7[16]];this[_0x6fe7[11]]= _[_0x6fe7[17]](this.Agents,_0x6fe7[4]);this[_0x6fe7[11]][_0x6fe7[16]]= _0xa678x5};OpenchannelQueue[_0x6fe7[15]][_0x6fe7[14]]= function(){this[_0x6fe7[18]]= 0;this[_0x6fe7[19]]= 0;for(var _0xa678x6=0;_0xa678x6< this[_0x6fe7[10]][_0x6fe7[20]];_0xa678x6+= 1){if(this[_0x6fe7[10]][_0xa678x6][_0x6fe7[21]]){this[_0x6fe7[18]]+= 1};if(this[_0x6fe7[10]][_0xa678x6][_0x6fe7[22]]){this[_0x6fe7[19]]+= 1}};this[_0x6fe7[23]]= this[_0x6fe7[18]]- this[_0x6fe7[19]];this[_0x6fe7[23]]= this[_0x6fe7[23]]>= 0?this[_0x6fe7[23]]:0;io[_0x6fe7[25]](_0x6fe7[24],this)};module[_0x6fe7[26]]= OpenchannelQueue
\ No newline at end of file
index d89e5f0..5729959 100644 (file)
@@ -1 +1 @@
-var _0x9338=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x69\x64","\x6E\x61\x6D\x65","","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70\x41\x67\x65\x6E\x74\x73\x49\x64","\x77\x61\x69\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x6F\x75\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x65\x61\x6C\x74\x69\x6D\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x5F\x72\x72","\x6D\x61\x70","\x6C\x6F\x67\x67\x65\x64\x49\x6E","\x70\x61\x75\x73\x65\x64","\x6C\x65\x6E\x67\x74\x68","\x6F\x6E\x6C\x69\x6E\x65","\x73\x6D\x73\x50\x61\x75\x73\x65","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x9338[0];var _=require(_0x9338[1]);var io=require(_0x9338[3])({host:_0x9338[2],port:6379});function SmsQueue(_0x2592x4){this[_0x9338[4]]= _0x2592x4[_0x9338[4]]|| 0;this[_0x9338[5]]= _0x2592x4[_0x9338[5]]|| _0x9338[6];this[_0x9338[7]]= _0x2592x4[_0x9338[7]]|| 10;this[_0x9338[8]]= _0x2592x4[_0x9338[8]]|| _0x9338[9];this[_0x9338[10]]= _0x2592x4[_0x9338[10]];this[_0x9338[11]]= {};this[_0x9338[12]]= 0;this[_0x9338[13]]();this[_0x9338[14]]()}SmsQueue[_0x9338[15]][_0x9338[13]]= function(){var _0x2592x5=this[_0x9338[11]][_0x9338[16]];this[_0x9338[11]]= _[_0x9338[17]](this.Agents,_0x9338[4]);this[_0x9338[11]][_0x9338[16]]= _0x2592x5};SmsQueue[_0x9338[15]][_0x9338[14]]= function(){this[_0x9338[18]]= 0;this[_0x9338[19]]= 0;for(var _0x2592x6=0;_0x2592x6< this[_0x9338[10]][_0x9338[20]];_0x2592x6+= 1){if(this[_0x9338[10]][_0x2592x6][_0x9338[21]]){this[_0x9338[18]]+= 1};if(this[_0x9338[10]][_0x2592x6][_0x9338[22]]){this[_0x9338[19]]+= 1}};this[_0x9338[23]]= this[_0x9338[18]]- this[_0x9338[19]];this[_0x9338[23]]= this[_0x9338[23]]>= 0?this[_0x9338[23]]:0;io[_0x9338[25]](_0x9338[24],this)};module[_0x9338[26]]= SmsQueue
\ No newline at end of file
+var _0x93e0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x69\x64","\x6E\x61\x6D\x65","","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70\x41\x67\x65\x6E\x74\x73\x49\x64","\x77\x61\x69\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x6F\x75\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x65\x61\x6C\x74\x69\x6D\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x5F\x72\x72","\x6D\x61\x70","\x6C\x6F\x67\x67\x65\x64\x49\x6E","\x70\x61\x75\x73\x65\x64","\x6C\x65\x6E\x67\x74\x68","\x6F\x6E\x6C\x69\x6E\x65","\x73\x6D\x73\x50\x61\x75\x73\x65","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x93e0[0];var _=require(_0x93e0[1]);var io=require(_0x93e0[3])({host:_0x93e0[2],port:6379});function SmsQueue(_0x3babx4){this[_0x93e0[4]]= _0x3babx4[_0x93e0[4]]|| 0;this[_0x93e0[5]]= _0x3babx4[_0x93e0[5]]|| _0x93e0[6];this[_0x93e0[7]]= _0x3babx4[_0x93e0[7]]|| 10;this[_0x93e0[8]]= _0x3babx4[_0x93e0[8]]|| _0x93e0[9];this[_0x93e0[10]]= _0x3babx4[_0x93e0[10]];this[_0x93e0[11]]= {};this[_0x93e0[12]]= 0;this[_0x93e0[13]]();this[_0x93e0[14]]()}SmsQueue[_0x93e0[15]][_0x93e0[13]]= function(){var _0x3babx5=this[_0x93e0[11]][_0x93e0[16]];this[_0x93e0[11]]= _[_0x93e0[17]](this.Agents,_0x93e0[4]);this[_0x93e0[11]][_0x93e0[16]]= _0x3babx5};SmsQueue[_0x93e0[15]][_0x93e0[14]]= function(){this[_0x93e0[18]]= 0;this[_0x93e0[19]]= 0;for(var _0x3babx6=0;_0x3babx6< this[_0x93e0[10]][_0x93e0[20]];_0x3babx6+= 1){if(this[_0x93e0[10]][_0x3babx6][_0x93e0[21]]){this[_0x93e0[18]]+= 1};if(this[_0x93e0[10]][_0x3babx6][_0x93e0[22]]){this[_0x93e0[19]]+= 1}};this[_0x93e0[23]]= this[_0x93e0[18]]- this[_0x93e0[19]];this[_0x93e0[23]]= this[_0x93e0[23]]>= 0?this[_0x93e0[23]]:0;io[_0x93e0[25]](_0x93e0[24],this)};module[_0x93e0[26]]= SmsQueue
\ No newline at end of file
index 3883816..663ff12 100644 (file)
@@ -1 +1 @@
-var _0xaf53=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x61\x67\x65\x6E\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x73\x6D\x73\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x66\x61\x78\x51\x75\x65\x75\x65","\x61\x67\x65\x6E\x74\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x63\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x73\x6D\x73\x51\x75\x65\x75\x65\x73","\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x66\x61\x78\x51\x75\x65\x75\x65\x73","\x63\x68\x61\x74\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x73\x6D\x73\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x66\x61\x78\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6D\x61\x70\x4B\x65\x79\x73","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6D\x65\x72\x67\x65\x46\x72\x6F\x6D\x44\x61\x74\x61\x62\x61\x73\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x6E\x69\x74\x41\x67\x65\x6E\x74\x73","\x69\x64","\x6C\x65\x6E\x67\x74\x68","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x69\x6E\x69\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x69\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x75\x70\x64\x61\x74\x65\x52\x6F\x75\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x65\x61\x6C\x74\x69\x6D\x65","\x69\x6E\x69\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x69\x6E\x69\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x69\x6E\x69\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x69\x6E\x69\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xaf53[0];var BPromise=require(_0xaf53[1]);var util=require(_0xaf53[2]);var _=require(_0xaf53[3]);var moment=require(_0xaf53[4]);var Agent=require(_0xaf53[5]);var Interval=require(_0xaf53[6]);var OpenchannelQueue=require(_0xaf53[7]);var ChatQueue=require(_0xaf53[8]);var SmsQueue=require(_0xaf53[9]);var MailQueue=require(_0xaf53[10]);var FaxQueue=require(_0xaf53[11]);var Realtime=function(){this[_0xaf53[12]]= {};this[_0xaf53[13]]= {};this[_0xaf53[14]]= {};this[_0xaf53[15]]= {};this[_0xaf53[16]]= {};this[_0xaf53[17]]= {};this[_0xaf53[18]]= {};this[_0xaf53[19]]= {};this[_0xaf53[20]]= {};this[_0xaf53[21]]= {};this[_0xaf53[22]]= {};this[_0xaf53[23]]= {}};function freeIsNotKey(_0x86c7xe,_0x86c7xf,_0x86c7x10){var _0x86c7x11=_[_0xaf53[24]](_0x86c7xe,function(_0x86c7x12,_0x86c7x13){return _0x86c7x12[_0x86c7x10]});for(var _0x86c7x13 in _0x86c7xf){if(_0x86c7xf[_0xaf53[25]](_0x86c7x13)){if(!_0x86c7x11[_0x86c7x13]){delete _0x86c7xf[_0x86c7x13]}}}}Realtime[_0xaf53[27]][_0xaf53[26]]= function(_0x86c7x14,_0x86c7x15){for(var _0x86c7x13 in _0x86c7x15){if(_0x86c7x14[_0xaf53[25]](_0x86c7x13)){_0x86c7x14[_0x86c7x13]= _0x86c7x15[_0x86c7x13]}}};Realtime[_0xaf53[27]][_0xaf53[28]]= function(){var _0x86c7x16=this;return function(_0x86c7xe){if(_0x86c7xe){freeIsNotKey(_0x86c7xe,_0x86c7x16[_0xaf53[12]],_0xaf53[29]);for(var _0x86c7x17=0,_0x86c7x18={},_0x86c7x19={};_0x86c7x17< _0x86c7xe[_0xaf53[30]];_0x86c7x17+= 1){_0x86c7x18= _0x86c7xe[_0x86c7x17];if(_[_0xaf53[31]](_0x86c7x16[_0xaf53[12]][_0x86c7x18[_0xaf53[29]]])){_0x86c7x16[_0xaf53[12]][_0x86c7x18[_0xaf53[29]]]=  new Agent(_0x86c7x18)}else {_0x86c7x16[_0xaf53[26]](_0x86c7x16[_0xaf53[12]][_0x86c7x18[_0xaf53[29]]],_0x86c7x18)}}};return _0x86c7x16[_0xaf53[12]]}};Realtime[_0xaf53[27]][_0xaf53[32]]= function(){var _0x86c7x16=this;return function(_0x86c7xe){if(_0x86c7xe){freeIsNotKey(_0x86c7xe,_0x86c7x16[_0xaf53[13]],_0xaf53[29]);for(var _0x86c7x17=0,_0x86c7x1a={},_0x86c7x1b={};_0x86c7x17< _0x86c7xe[_0xaf53[30]];_0x86c7x17+= 1){_0x86c7x1a= _0x86c7xe[_0x86c7x17];if(_[_0xaf53[31]](_0x86c7x16[_0xaf53[13]][_0x86c7x1a[_0xaf53[29]]])){_0x86c7x16[_0xaf53[13]][_0x86c7x1a[_0xaf53[29]]]=  new Interval(_0x86c7x1a)}else {_0x86c7x16[_0xaf53[26]](_0x86c7x16[_0xaf53[13]][_0x86c7x1a[_0xaf53[29]]],_0x86c7x1a)}}};return _0x86c7x16[_0xaf53[13]]}};Realtime[_0xaf53[27]][_0xaf53[33]]= function(){var _0x86c7x16=this;return function(_0x86c7xe){if(_0x86c7xe){freeIsNotKey(_0x86c7xe,_0x86c7x16[_0xaf53[14]],_0xaf53[29]);for(var _0x86c7x17=0,_0x86c7x1c={},_0x86c7x1d={};_0x86c7x17< _0x86c7xe[_0xaf53[30]];_0x86c7x17+= 1){_0x86c7x1c= _0x86c7xe[_0x86c7x17];if(_[_0xaf53[31]](_0x86c7x16[_0xaf53[14]][_0x86c7x1c[_0xaf53[29]]])){_0x86c7x16[_0xaf53[14]][_0x86c7x1c[_0xaf53[29]]]=  new OpenchannelQueue(_0x86c7x1c)}else {_0x86c7x16[_0xaf53[26]](_0x86c7x16[_0xaf53[14]][_0x86c7x1c[_0xaf53[29]]],_0x86c7x1c)};_0x86c7x16[_0xaf53[14]][_0x86c7x1c[_0xaf53[29]]][_0xaf53[34]]();_0x86c7x16[_0xaf53[14]][_0x86c7x1c[_0xaf53[29]]][_0xaf53[35]]()}};return _0x86c7x16[_0xaf53[14]]}};Realtime[_0xaf53[27]][_0xaf53[36]]= function(){var _0x86c7x16=this;return function(_0x86c7xe){if(_0x86c7xe){freeIsNotKey(_0x86c7xe,_0x86c7x16[_0xaf53[15]],_0xaf53[29]);for(var _0x86c7x17=0,_0x86c7x1e={},_0x86c7x1f={};_0x86c7x17< _0x86c7xe[_0xaf53[30]];_0x86c7x17+= 1){_0x86c7x1e= _0x86c7xe[_0x86c7x17];if(_[_0xaf53[31]](_0x86c7x16[_0xaf53[15]][_0x86c7x1e[_0xaf53[29]]])){_0x86c7x16[_0xaf53[15]][_0x86c7x1e[_0xaf53[29]]]=  new ChatQueue(_0x86c7x1e)}else {_0x86c7x16[_0xaf53[26]](_0x86c7x16[_0xaf53[15]][_0x86c7x1e[_0xaf53[29]]],_0x86c7x1e)};_0x86c7x16[_0xaf53[15]][_0x86c7x1e[_0xaf53[29]]][_0xaf53[34]]();_0x86c7x16[_0xaf53[15]][_0x86c7x1e[_0xaf53[29]]][_0xaf53[35]]()}};return _0x86c7x16[_0xaf53[15]]}};Realtime[_0xaf53[27]][_0xaf53[37]]= function(){var _0x86c7x16=this;return function(_0x86c7xe){if(_0x86c7xe){freeIsNotKey(_0x86c7xe,_0x86c7x16[_0xaf53[16]],_0xaf53[29]);for(var _0x86c7x17=0,_0x86c7x20={},_0x86c7x21={};_0x86c7x17< _0x86c7xe[_0xaf53[30]];_0x86c7x17+= 1){_0x86c7x20= _0x86c7xe[_0x86c7x17];if(_[_0xaf53[31]](_0x86c7x16[_0xaf53[16]][_0x86c7x20[_0xaf53[29]]])){_0x86c7x16[_0xaf53[16]][_0x86c7x20[_0xaf53[29]]]=  new SmsQueue(_0x86c7x20)}else {_0x86c7x16[_0xaf53[26]](_0x86c7x16[_0xaf53[16]][_0x86c7x20[_0xaf53[29]]],_0x86c7x20)};_0x86c7x16[_0xaf53[16]][_0x86c7x20[_0xaf53[29]]][_0xaf53[34]]();_0x86c7x16[_0xaf53[16]][_0x86c7x20[_0xaf53[29]]][_0xaf53[35]]()}};return _0x86c7x16[_0xaf53[16]]}};Realtime[_0xaf53[27]][_0xaf53[38]]= function(){var _0x86c7x16=this;return function(_0x86c7xe){if(_0x86c7xe){freeIsNotKey(_0x86c7xe,_0x86c7x16[_0xaf53[17]],_0xaf53[29]);for(var _0x86c7x17=0,_0x86c7x22={},_0x86c7x23={};_0x86c7x17< _0x86c7xe[_0xaf53[30]];_0x86c7x17+= 1){_0x86c7x22= _0x86c7xe[_0x86c7x17];if(_[_0xaf53[31]](_0x86c7x16[_0xaf53[17]][_0x86c7x22[_0xaf53[29]]])){_0x86c7x16[_0xaf53[17]][_0x86c7x22[_0xaf53[29]]]=  new MailQueue(_0x86c7x22)}else {_0x86c7x16[_0xaf53[26]](_0x86c7x16[_0xaf53[17]][_0x86c7x22[_0xaf53[29]]],_0x86c7x22)};_0x86c7x16[_0xaf53[17]][_0x86c7x22[_0xaf53[29]]][_0xaf53[34]]();_0x86c7x16[_0xaf53[17]][_0x86c7x22[_0xaf53[29]]][_0xaf53[35]]()}};return _0x86c7x16[_0xaf53[17]]}};Realtime[_0xaf53[27]][_0xaf53[39]]= function(){var _0x86c7x16=this;return function(_0x86c7xe){if(_0x86c7xe){freeIsNotKey(_0x86c7xe,_0x86c7x16[_0xaf53[18]],_0xaf53[29]);for(var _0x86c7x17=0,_0x86c7x24={},_0x86c7x25={};_0x86c7x17< _0x86c7xe[_0xaf53[30]];_0x86c7x17+= 1){_0x86c7x24= _0x86c7xe[_0x86c7x17];if(_[_0xaf53[31]](_0x86c7x16[_0xaf53[18]][_0x86c7x24[_0xaf53[29]]])){_0x86c7x16[_0xaf53[18]][_0x86c7x24[_0xaf53[29]]]=  new FaxQueue(_0x86c7x24)}else {_0x86c7x16[_0xaf53[26]](_0x86c7x16[_0xaf53[18]][_0x86c7x24[_0xaf53[29]]],_0x86c7x24)};_0x86c7x16[_0xaf53[18]][_0x86c7x24[_0xaf53[29]]][_0xaf53[34]]();_0x86c7x16[_0xaf53[18]][_0x86c7x24[_0xaf53[29]]][_0xaf53[35]]()}};return _0x86c7x16[_0xaf53[18]]}};module[_0xaf53[40]]= Realtime
\ No newline at end of file
+var _0x868c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x61\x67\x65\x6E\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x73\x6D\x73\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x2F\x66\x61\x78\x51\x75\x65\x75\x65","\x61\x67\x65\x6E\x74\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x63\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x73\x6D\x73\x51\x75\x65\x75\x65\x73","\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x66\x61\x78\x51\x75\x65\x75\x65\x73","\x63\x68\x61\x74\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x73\x6D\x73\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x66\x61\x78\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6D\x61\x70\x4B\x65\x79\x73","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6D\x65\x72\x67\x65\x46\x72\x6F\x6D\x44\x61\x74\x61\x62\x61\x73\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x6E\x69\x74\x41\x67\x65\x6E\x74\x73","\x69\x64","\x6C\x65\x6E\x67\x74\x68","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x69\x6E\x69\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x69\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x75\x70\x64\x61\x74\x65\x52\x6F\x75\x74\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x52\x65\x61\x6C\x74\x69\x6D\x65","\x69\x6E\x69\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x69\x6E\x69\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x69\x6E\x69\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x69\x6E\x69\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x868c[0];var BPromise=require(_0x868c[1]);var util=require(_0x868c[2]);var _=require(_0x868c[3]);var moment=require(_0x868c[4]);var Agent=require(_0x868c[5]);var Interval=require(_0x868c[6]);var OpenchannelQueue=require(_0x868c[7]);var ChatQueue=require(_0x868c[8]);var SmsQueue=require(_0x868c[9]);var MailQueue=require(_0x868c[10]);var FaxQueue=require(_0x868c[11]);var Realtime=function(){this[_0x868c[12]]= {};this[_0x868c[13]]= {};this[_0x868c[14]]= {};this[_0x868c[15]]= {};this[_0x868c[16]]= {};this[_0x868c[17]]= {};this[_0x868c[18]]= {};this[_0x868c[19]]= {};this[_0x868c[20]]= {};this[_0x868c[21]]= {};this[_0x868c[22]]= {};this[_0x868c[23]]= {}};function freeIsNotKey(_0x6afexe,_0x6afexf,_0x6afex10){var _0x6afex11=_[_0x868c[24]](_0x6afexe,function(_0x6afex12,_0x6afex13){return _0x6afex12[_0x6afex10]});for(var _0x6afex13 in _0x6afexf){if(_0x6afexf[_0x868c[25]](_0x6afex13)){if(!_0x6afex11[_0x6afex13]){delete _0x6afexf[_0x6afex13]}}}}Realtime[_0x868c[27]][_0x868c[26]]= function(_0x6afex14,_0x6afex15){for(var _0x6afex13 in _0x6afex15){if(_0x6afex14[_0x868c[25]](_0x6afex13)){_0x6afex14[_0x6afex13]= _0x6afex15[_0x6afex13]}}};Realtime[_0x868c[27]][_0x868c[28]]= function(){var _0x6afex16=this;return function(_0x6afexe){if(_0x6afexe){freeIsNotKey(_0x6afexe,_0x6afex16[_0x868c[12]],_0x868c[29]);for(var _0x6afex17=0,_0x6afex18={},_0x6afex19={};_0x6afex17< _0x6afexe[_0x868c[30]];_0x6afex17+= 1){_0x6afex18= _0x6afexe[_0x6afex17];if(_[_0x868c[31]](_0x6afex16[_0x868c[12]][_0x6afex18[_0x868c[29]]])){_0x6afex16[_0x868c[12]][_0x6afex18[_0x868c[29]]]=  new Agent(_0x6afex18)}else {_0x6afex16[_0x868c[26]](_0x6afex16[_0x868c[12]][_0x6afex18[_0x868c[29]]],_0x6afex18)}}};return _0x6afex16[_0x868c[12]]}};Realtime[_0x868c[27]][_0x868c[32]]= function(){var _0x6afex16=this;return function(_0x6afexe){if(_0x6afexe){freeIsNotKey(_0x6afexe,_0x6afex16[_0x868c[13]],_0x868c[29]);for(var _0x6afex17=0,_0x6afex1a={},_0x6afex1b={};_0x6afex17< _0x6afexe[_0x868c[30]];_0x6afex17+= 1){_0x6afex1a= _0x6afexe[_0x6afex17];if(_[_0x868c[31]](_0x6afex16[_0x868c[13]][_0x6afex1a[_0x868c[29]]])){_0x6afex16[_0x868c[13]][_0x6afex1a[_0x868c[29]]]=  new Interval(_0x6afex1a)}else {_0x6afex16[_0x868c[26]](_0x6afex16[_0x868c[13]][_0x6afex1a[_0x868c[29]]],_0x6afex1a)}}};return _0x6afex16[_0x868c[13]]}};Realtime[_0x868c[27]][_0x868c[33]]= function(){var _0x6afex16=this;return function(_0x6afexe){if(_0x6afexe){freeIsNotKey(_0x6afexe,_0x6afex16[_0x868c[14]],_0x868c[29]);for(var _0x6afex17=0,_0x6afex1c={},_0x6afex1d={};_0x6afex17< _0x6afexe[_0x868c[30]];_0x6afex17+= 1){_0x6afex1c= _0x6afexe[_0x6afex17];if(_[_0x868c[31]](_0x6afex16[_0x868c[14]][_0x6afex1c[_0x868c[29]]])){_0x6afex16[_0x868c[14]][_0x6afex1c[_0x868c[29]]]=  new OpenchannelQueue(_0x6afex1c)}else {_0x6afex16[_0x868c[26]](_0x6afex16[_0x868c[14]][_0x6afex1c[_0x868c[29]]],_0x6afex1c)};_0x6afex16[_0x868c[14]][_0x6afex1c[_0x868c[29]]][_0x868c[34]]();_0x6afex16[_0x868c[14]][_0x6afex1c[_0x868c[29]]][_0x868c[35]]()}};return _0x6afex16[_0x868c[14]]}};Realtime[_0x868c[27]][_0x868c[36]]= function(){var _0x6afex16=this;return function(_0x6afexe){if(_0x6afexe){freeIsNotKey(_0x6afexe,_0x6afex16[_0x868c[15]],_0x868c[29]);for(var _0x6afex17=0,_0x6afex1e={},_0x6afex1f={};_0x6afex17< _0x6afexe[_0x868c[30]];_0x6afex17+= 1){_0x6afex1e= _0x6afexe[_0x6afex17];if(_[_0x868c[31]](_0x6afex16[_0x868c[15]][_0x6afex1e[_0x868c[29]]])){_0x6afex16[_0x868c[15]][_0x6afex1e[_0x868c[29]]]=  new ChatQueue(_0x6afex1e)}else {_0x6afex16[_0x868c[26]](_0x6afex16[_0x868c[15]][_0x6afex1e[_0x868c[29]]],_0x6afex1e)};_0x6afex16[_0x868c[15]][_0x6afex1e[_0x868c[29]]][_0x868c[34]]();_0x6afex16[_0x868c[15]][_0x6afex1e[_0x868c[29]]][_0x868c[35]]()}};return _0x6afex16[_0x868c[15]]}};Realtime[_0x868c[27]][_0x868c[37]]= function(){var _0x6afex16=this;return function(_0x6afexe){if(_0x6afexe){freeIsNotKey(_0x6afexe,_0x6afex16[_0x868c[16]],_0x868c[29]);for(var _0x6afex17=0,_0x6afex20={},_0x6afex21={};_0x6afex17< _0x6afexe[_0x868c[30]];_0x6afex17+= 1){_0x6afex20= _0x6afexe[_0x6afex17];if(_[_0x868c[31]](_0x6afex16[_0x868c[16]][_0x6afex20[_0x868c[29]]])){_0x6afex16[_0x868c[16]][_0x6afex20[_0x868c[29]]]=  new SmsQueue(_0x6afex20)}else {_0x6afex16[_0x868c[26]](_0x6afex16[_0x868c[16]][_0x6afex20[_0x868c[29]]],_0x6afex20)};_0x6afex16[_0x868c[16]][_0x6afex20[_0x868c[29]]][_0x868c[34]]();_0x6afex16[_0x868c[16]][_0x6afex20[_0x868c[29]]][_0x868c[35]]()}};return _0x6afex16[_0x868c[16]]}};Realtime[_0x868c[27]][_0x868c[38]]= function(){var _0x6afex16=this;return function(_0x6afexe){if(_0x6afexe){freeIsNotKey(_0x6afexe,_0x6afex16[_0x868c[17]],_0x868c[29]);for(var _0x6afex17=0,_0x6afex22={},_0x6afex23={};_0x6afex17< _0x6afexe[_0x868c[30]];_0x6afex17+= 1){_0x6afex22= _0x6afexe[_0x6afex17];if(_[_0x868c[31]](_0x6afex16[_0x868c[17]][_0x6afex22[_0x868c[29]]])){_0x6afex16[_0x868c[17]][_0x6afex22[_0x868c[29]]]=  new MailQueue(_0x6afex22)}else {_0x6afex16[_0x868c[26]](_0x6afex16[_0x868c[17]][_0x6afex22[_0x868c[29]]],_0x6afex22)};_0x6afex16[_0x868c[17]][_0x6afex22[_0x868c[29]]][_0x868c[34]]();_0x6afex16[_0x868c[17]][_0x6afex22[_0x868c[29]]][_0x868c[35]]()}};return _0x6afex16[_0x868c[17]]}};Realtime[_0x868c[27]][_0x868c[39]]= function(){var _0x6afex16=this;return function(_0x6afexe){if(_0x6afexe){freeIsNotKey(_0x6afexe,_0x6afex16[_0x868c[18]],_0x868c[29]);for(var _0x6afex17=0,_0x6afex24={},_0x6afex25={};_0x6afex17< _0x6afexe[_0x868c[30]];_0x6afex17+= 1){_0x6afex24= _0x6afexe[_0x6afex17];if(_[_0x868c[31]](_0x6afex16[_0x868c[18]][_0x6afex24[_0x868c[29]]])){_0x6afex16[_0x868c[18]][_0x6afex24[_0x868c[29]]]=  new FaxQueue(_0x6afex24)}else {_0x6afex16[_0x868c[26]](_0x6afex16[_0x868c[18]][_0x6afex24[_0x868c[29]]],_0x6afex24)};_0x6afex16[_0x868c[18]][_0x6afex24[_0x868c[29]]][_0x868c[34]]();_0x6afex16[_0x868c[18]][_0x6afex24[_0x868c[29]]][_0x868c[35]]()}};return _0x6afex16[_0x868c[18]]}};module[_0x868c[40]]= Realtime
\ No newline at end of file
index bd5799e..b865537 100644 (file)
@@ -1 +1 @@
-var _0x5291=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E"];_0x5291[0];var client=require(_0x5291[1]);exports[_0x5291[2]]= function(_0x9d82x2,_0x9d82x3){return client.Request(_0x5291[3],{body:_0x9d82x3,options:{where:{id:_0x9d82x2}},log:_0x5291[4]})}
\ No newline at end of file
+var _0x40c3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x43\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E"];_0x40c3[0];var client=require(_0x40c3[1]);exports[_0x40c3[2]]= function(_0x4d1bx2,_0x4d1bx3){return client.Request(_0x40c3[3],{body:_0x4d1bx3,options:{where:{id:_0x4d1bx2}},log:_0x40c3[4]})}
\ No newline at end of file
index b2987df..ec735a2 100644 (file)
@@ -1 +1 @@
-var _0x1e42=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65"];_0x1e42[0];var client=require(_0x1e42[1]);exports[_0x1e42[2]]= function(_0x7f57x2){return client.Request(_0x1e42[3],{body:_0x7f57x2,log:_0x1e42[4]})}
\ No newline at end of file
+var _0xe542=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65"];_0xe542[0];var client=require(_0xe542[1]);exports[_0xe542[2]]= function(_0x8b2ax2){return client.Request(_0xe542[3],{body:_0x8b2ax2,log:_0xe542[4]})}
\ No newline at end of file
index 638493e..b84a890 100644 (file)
@@ -1 +1 @@
-var _0x72f1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x47\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x69\x64","\x6E\x61\x6D\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x55\x73\x65\x72","\x41\x67\x65\x6E\x74\x73","\x6F\x6E\x6C\x69\x6E\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65"];_0x72f1[0];var client=require(_0x72f1[1]);exports[_0x72f1[2]]= function(){return function(){return client.Request(_0x72f1[3],{options:{raw:false,attributes:[_0x72f1[4],_0x72f1[5],_0x72f1[6],_0x72f1[7]],include:[{model:_0x72f1[8],as:_0x72f1[9],attributes:[_0x72f1[4],_0x72f1[5],_0x72f1[10],_0x72f1[11]]}]},log:_0x72f1[2]})}}
\ No newline at end of file
+var _0xc543=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x47\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x69\x64","\x6E\x61\x6D\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x55\x73\x65\x72","\x41\x67\x65\x6E\x74\x73","\x6F\x6E\x6C\x69\x6E\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65"];_0xc543[0];var client=require(_0xc543[1]);exports[_0xc543[2]]= function(){return function(){return client.Request(_0xc543[3],{options:{raw:false,attributes:[_0xc543[4],_0xc543[5],_0xc543[6],_0xc543[7]],include:[{model:_0xc543[8],as:_0xc543[9],attributes:[_0xc543[4],_0xc543[5],_0xc543[10],_0xc543[11]]}]},log:_0xc543[2]})}}
\ No newline at end of file
index cbf8093..5f1f218 100644 (file)
@@ -1 +1 @@
-var _0x5b20=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x69\x64","\x44\x45\x53\x43"];_0x5b20[0];var client=require(_0x5b20[1]);exports[_0x5b20[2]]= function(_0xdda3x2){return client.Request(_0x5b20[3],{body:_0xdda3x2,log:_0x5b20[3]})};exports[_0x5b20[4]]= function(_0xdda3x3,_0xdda3x2){return client.Request(_0x5b20[5],{body:_0xdda3x2,options:{where:{uniqueid:_0xdda3x3},order:[[_0x5b20[6],_0x5b20[7]]],limit:1},log:_0x5b20[5]})}
\ No newline at end of file
+var _0x9fc4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x43\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x69\x64","\x44\x45\x53\x43"];_0x9fc4[0];var client=require(_0x9fc4[1]);exports[_0x9fc4[2]]= function(_0xdc82x2){return client.Request(_0x9fc4[3],{body:_0xdc82x2,log:_0x9fc4[3]})};exports[_0x9fc4[4]]= function(_0xdc82x3,_0xdc82x2){return client.Request(_0x9fc4[5],{body:_0xdc82x2,options:{where:{uniqueid:_0xdc82x3},order:[[_0x9fc4[6],_0x9fc4[7]]],limit:1},log:_0x9fc4[5]})}
\ No newline at end of file
index f61c613..a4135df 100644 (file)
@@ -1 +1 @@
-var _0x245d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E"];_0x245d[0];var client=require(_0x245d[1]);exports[_0x245d[2]]= function(_0x9557x2,_0x9557x3){return client.Request(_0x245d[3],{body:_0x9557x3,options:{where:{id:_0x9557x2}},log:_0x245d[4]})}
\ No newline at end of file
+var _0x4859=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x46\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E"];_0x4859[0];var client=require(_0x4859[1]);exports[_0x4859[2]]= function(_0x6a0dx2,_0x6a0dx3){return client.Request(_0x4859[3],{body:_0x6a0dx3,options:{where:{id:_0x6a0dx2}},log:_0x4859[4]})}
\ No newline at end of file
index 94c679a..6620baa 100644 (file)
@@ -1 +1 @@
-var _0x647f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65"];_0x647f[0];var client=require(_0x647f[1]);exports[_0x647f[2]]= function(_0x8dacx2){return client.Request(_0x647f[3],{body:_0x8dacx2,log:_0x647f[4]})}
\ No newline at end of file
+var _0x37c8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65"];_0x37c8[0];var client=require(_0x37c8[1]);exports[_0x37c8[2]]= function(_0xbbf1x2){return client.Request(_0x37c8[3],{body:_0xbbf1x2,log:_0x37c8[4]})}
\ No newline at end of file
index bb30d78..913e4c0 100644 (file)
@@ -1 +1 @@
-var _0xb626=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x47\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65","\x69\x64","\x6E\x61\x6D\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x55\x73\x65\x72","\x41\x67\x65\x6E\x74\x73","\x6F\x6E\x6C\x69\x6E\x65","\x66\x61\x78\x50\x61\x75\x73\x65"];_0xb626[0];var client=require(_0xb626[1]);exports[_0xb626[2]]= function(){return function(){return client.Request(_0xb626[3],{options:{raw:false,attributes:[_0xb626[4],_0xb626[5],_0xb626[6],_0xb626[7]],include:[{model:_0xb626[8],as:_0xb626[9],attributes:[_0xb626[4],_0xb626[5],_0xb626[10],_0xb626[11]]}]},log:_0xb626[2]})}}
\ No newline at end of file
+var _0x765a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x47\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65","\x69\x64","\x6E\x61\x6D\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x55\x73\x65\x72","\x41\x67\x65\x6E\x74\x73","\x6F\x6E\x6C\x69\x6E\x65","\x66\x61\x78\x50\x61\x75\x73\x65"];_0x765a[0];var client=require(_0x765a[1]);exports[_0x765a[2]]= function(){return function(){return client.Request(_0x765a[3],{options:{raw:false,attributes:[_0x765a[4],_0x765a[5],_0x765a[6],_0x765a[7]],include:[{model:_0x765a[8],as:_0x765a[9],attributes:[_0x765a[4],_0x765a[5],_0x765a[10],_0x765a[11]]}]},log:_0x765a[2]})}}
\ No newline at end of file
index f1adad3..77492cf 100644 (file)
@@ -1 +1 @@
-var _0x560a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x69\x64","\x44\x45\x53\x43"];_0x560a[0];var client=require(_0x560a[1]);exports[_0x560a[2]]= function(_0x568cx2){return client.Request(_0x560a[3],{body:_0x568cx2,log:_0x560a[3]})};exports[_0x560a[4]]= function(_0x568cx3,_0x568cx2){return client.Request(_0x560a[5],{body:_0x568cx2,options:{where:{uniqueid:_0x568cx3},order:[[_0x560a[6],_0x560a[7]]],limit:1},log:_0x560a[5]})}
\ No newline at end of file
+var _0xeb84=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x46\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x69\x64","\x44\x45\x53\x43"];_0xeb84[0];var client=require(_0xeb84[1]);exports[_0xeb84[2]]= function(_0x4daax2){return client.Request(_0xeb84[3],{body:_0x4daax2,log:_0xeb84[3]})};exports[_0xeb84[4]]= function(_0x4daax3,_0x4daax2){return client.Request(_0xeb84[5],{body:_0x4daax2,options:{where:{uniqueid:_0x4daax3},order:[[_0xeb84[6],_0xeb84[7]]],limit:1},log:_0xeb84[5]})}
\ No newline at end of file
index 6b196e2..82ba548 100644 (file)
@@ -1 +1 @@
-var _0xe277=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x47\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C","\x69\x64","\x6E\x61\x6D\x65","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C"];_0xe277[0];var client=require(_0xe277[1]);exports[_0xe277[2]]= function(){return function(){return client.Request(_0xe277[3],{options:{raw:false,where:{IntervalId:null},attributes:[_0xe277[4],_0xe277[5]],include:[{model:_0xe277[6],as:_0xe277[7],attributes:[_0xe277[4],_0xe277[5],_0xe277[8]]}]},log:_0xe277[2]})}}
\ No newline at end of file
+var _0x5397=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x47\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C","\x69\x64","\x6E\x61\x6D\x65","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C"];_0x5397[0];var client=require(_0x5397[1]);exports[_0x5397[2]]= function(){return function(){return client.Request(_0x5397[3],{options:{raw:false,where:{IntervalId:null},attributes:[_0x5397[4],_0x5397[5]],include:[{model:_0x5397[6],as:_0x5397[7],attributes:[_0x5397[4],_0x5397[5],_0x5397[8]]}]},log:_0x5397[2]})}}
\ No newline at end of file
index 7cfcd72..468f1d2 100644 (file)
@@ -1 +1 @@
-var _0xe836=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E"];_0xe836[0];var client=require(_0xe836[1]);exports[_0xe836[2]]= function(_0x365bx2,_0x365bx3){return client.Request(_0xe836[3],{body:_0x365bx3,options:{where:{id:_0x365bx2}},log:_0xe836[4]})}
\ No newline at end of file
+var _0xe67e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x4D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E"];_0xe67e[0];var client=require(_0xe67e[1]);exports[_0xe67e[2]]= function(_0x6cddx2,_0x6cddx3){return client.Request(_0xe67e[3],{body:_0x6cddx3,options:{where:{id:_0x6cddx2}},log:_0xe67e[4]})}
\ No newline at end of file
index 6b4ffcf..71ddeb3 100644 (file)
@@ -1 +1 @@
-var _0x7068=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65"];_0x7068[0];var client=require(_0x7068[1]);exports[_0x7068[2]]= function(_0x87c6x2){return client.Request(_0x7068[3],{body:_0x87c6x2,log:_0x7068[4]})}
\ No newline at end of file
+var _0xca10=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65"];_0xca10[0];var client=require(_0xca10[1]);exports[_0xca10[2]]= function(_0x913fx2){return client.Request(_0xca10[3],{body:_0x913fx2,log:_0xca10[4]})}
\ No newline at end of file
index 11daf42..ee95dbb 100644 (file)
@@ -1 +1 @@
-var _0xa3dd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x47\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x69\x64","\x6E\x61\x6D\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x55\x73\x65\x72","\x41\x67\x65\x6E\x74\x73","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65"];_0xa3dd[0];var client=require(_0xa3dd[1]);exports[_0xa3dd[2]]= function(){return function(){return client.Request(_0xa3dd[3],{options:{raw:false,attributes:[_0xa3dd[4],_0xa3dd[5],_0xa3dd[6],_0xa3dd[7]],include:[{model:_0xa3dd[8],as:_0xa3dd[9],attributes:[_0xa3dd[4],_0xa3dd[5],_0xa3dd[10],_0xa3dd[11]]}]},log:_0xa3dd[2]})}}
\ No newline at end of file
+var _0xac2c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x47\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x69\x64","\x6E\x61\x6D\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x55\x73\x65\x72","\x41\x67\x65\x6E\x74\x73","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65"];_0xac2c[0];var client=require(_0xac2c[1]);exports[_0xac2c[2]]= function(){return function(){return client.Request(_0xac2c[3],{options:{raw:false,attributes:[_0xac2c[4],_0xac2c[5],_0xac2c[6],_0xac2c[7]],include:[{model:_0xac2c[8],as:_0xac2c[9],attributes:[_0xac2c[4],_0xac2c[5],_0xac2c[10],_0xac2c[11]]}]},log:_0xac2c[2]})}}
\ No newline at end of file
index d56d095..8dc419e 100644 (file)
@@ -1 +1 @@
-var _0x51dd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x69\x64","\x44\x45\x53\x43"];_0x51dd[0];var client=require(_0x51dd[1]);exports[_0x51dd[2]]= function(_0x294ax2){return client.Request(_0x51dd[3],{body:_0x294ax2,log:_0x51dd[3]})};exports[_0x51dd[4]]= function(_0x294ax3,_0x294ax2){return client.Request(_0x51dd[5],{body:_0x294ax2,options:{where:{uniqueid:_0x294ax3},order:[[_0x51dd[6],_0x51dd[7]]],limit:1},log:_0x51dd[5]})}
\ No newline at end of file
+var _0xd51c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x69\x64","\x44\x45\x53\x43"];_0xd51c[0];var client=require(_0xd51c[1]);exports[_0xd51c[2]]= function(_0xd0e9x2){return client.Request(_0xd51c[3],{body:_0xd0e9x2,log:_0xd51c[3]})};exports[_0xd51c[4]]= function(_0xd0e9x3,_0xd0e9x2){return client.Request(_0xd51c[5],{body:_0xd0e9x2,options:{where:{uniqueid:_0xd0e9x3},order:[[_0xd51c[6],_0xd51c[7]]],limit:1},log:_0xd51c[5]})}
\ No newline at end of file
index 49645b7..5ff56dc 100644 (file)
@@ -1 +1 @@
-var _0xe00a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E"];_0xe00a[0];var client=require(_0xe00a[1]);exports[_0xe00a[2]]= function(_0x9ca7x2,_0x9ca7x3){return client.Request(_0xe00a[3],{body:_0x9ca7x3,options:{where:{id:_0x9ca7x2}},log:_0xe00a[4]})}
\ No newline at end of file
+var _0x763b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E"];_0x763b[0];var client=require(_0x763b[1]);exports[_0x763b[2]]= function(_0x5bfcx2,_0x5bfcx3){return client.Request(_0x763b[3],{body:_0x5bfcx3,options:{where:{id:_0x5bfcx2}},log:_0x763b[4]})}
\ No newline at end of file
index d703d95..a6adf22 100644 (file)
@@ -1 +1 @@
-var _0x5b6b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65"];_0x5b6b[0];var client=require(_0x5b6b[1]);exports[_0x5b6b[2]]= function(_0xd8e0x2){return client.Request(_0x5b6b[3],{body:_0xd8e0x2,log:_0x5b6b[4]})}
\ No newline at end of file
+var _0x89b1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65"];_0x89b1[0];var client=require(_0x89b1[1]);exports[_0x89b1[2]]= function(_0xdf03x2){return client.Request(_0x89b1[3],{body:_0xdf03x2,log:_0x89b1[4]})}
\ No newline at end of file
index 9c1e0f7..97eae46 100644 (file)
@@ -1 +1 @@
-var _0xaf7d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x47\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x69\x64","\x6E\x61\x6D\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x55\x73\x65\x72","\x41\x67\x65\x6E\x74\x73","\x6F\x6E\x6C\x69\x6E\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x50\x61\x75\x73\x65"];_0xaf7d[0];var client=require(_0xaf7d[1]);exports[_0xaf7d[2]]= function(){return function(){return client.Request(_0xaf7d[3],{options:{raw:false,attributes:[_0xaf7d[4],_0xaf7d[5],_0xaf7d[6],_0xaf7d[7]],include:[{model:_0xaf7d[8],as:_0xaf7d[9],attributes:[_0xaf7d[4],_0xaf7d[5],_0xaf7d[10],_0xaf7d[11]]}]},log:_0xaf7d[2]})}}
\ No newline at end of file
+var _0x1d47=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x47\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x69\x64","\x6E\x61\x6D\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x55\x73\x65\x72","\x41\x67\x65\x6E\x74\x73","\x6F\x6E\x6C\x69\x6E\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x50\x61\x75\x73\x65"];_0x1d47[0];var client=require(_0x1d47[1]);exports[_0x1d47[2]]= function(){return function(){return client.Request(_0x1d47[3],{options:{raw:false,attributes:[_0x1d47[4],_0x1d47[5],_0x1d47[6],_0x1d47[7]],include:[{model:_0x1d47[8],as:_0x1d47[9],attributes:[_0x1d47[4],_0x1d47[5],_0x1d47[10],_0x1d47[11]]}]},log:_0x1d47[2]})}}
\ No newline at end of file
index 4477dbe..c1c45bd 100644 (file)
@@ -1 +1 @@
-var _0x9624=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x69\x64","\x44\x45\x53\x43"];_0x9624[0];var client=require(_0x9624[1]);exports[_0x9624[2]]= function(_0x24d7x2){return client.Request(_0x9624[3],{body:_0x24d7x2,log:_0x9624[3]})};exports[_0x9624[4]]= function(_0x24d7x3,_0x24d7x2){return client.Request(_0x9624[5],{body:_0x24d7x2,options:{where:{uniqueid:_0x24d7x3},order:[[_0x9624[6],_0x9624[7]]],limit:1},log:_0x9624[5]})}
\ No newline at end of file
+var _0xac91=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x69\x64","\x44\x45\x53\x43"];_0xac91[0];var client=require(_0xac91[1]);exports[_0xac91[2]]= function(_0xbb75x2){return client.Request(_0xac91[3],{body:_0xbb75x2,log:_0xac91[3]})};exports[_0xac91[4]]= function(_0xbb75x3,_0xbb75x2){return client.Request(_0xac91[5],{body:_0xbb75x2,options:{where:{uniqueid:_0xbb75x3},order:[[_0xac91[6],_0xac91[7]]],limit:1},log:_0xac91[5]})}
\ No newline at end of file
index 176362f..4411893 100644 (file)
@@ -1 +1 @@
-var _0xfd14=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E"];_0xfd14[0];var client=require(_0xfd14[1]);exports[_0xfd14[2]]= function(_0x2345x2,_0x2345x3){return client.Request(_0xfd14[3],{body:_0x2345x3,options:{where:{id:_0x2345x2}},log:_0xfd14[4]})}
\ No newline at end of file
+var _0x366e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x53\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E"];_0x366e[0];var client=require(_0x366e[1]);exports[_0x366e[2]]= function(_0x3de2x2,_0x3de2x3){return client.Request(_0x366e[3],{body:_0x3de2x3,options:{where:{id:_0x3de2x2}},log:_0x366e[4]})}
\ No newline at end of file
index a46b8ed..442fe8a 100644 (file)
@@ -1 +1 @@
-var _0x412b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65"];_0x412b[0];var client=require(_0x412b[1]);exports[_0x412b[2]]= function(_0xf757x2){return client.Request(_0x412b[3],{body:_0xf757x2,log:_0x412b[4]})}
\ No newline at end of file
+var _0x3698=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65"];_0x3698[0];var client=require(_0x3698[1]);exports[_0x3698[2]]= function(_0x7955x2){return client.Request(_0x3698[3],{body:_0x7955x2,log:_0x3698[4]})}
\ No newline at end of file
index d3a43be..c66812a 100644 (file)
@@ -1 +1 @@
-var _0x9260=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x47\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65","\x69\x64","\x6E\x61\x6D\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x55\x73\x65\x72","\x41\x67\x65\x6E\x74\x73","\x6F\x6E\x6C\x69\x6E\x65","\x73\x6D\x73\x50\x61\x75\x73\x65"];_0x9260[0];var client=require(_0x9260[1]);exports[_0x9260[2]]= function(){return function(){return client.Request(_0x9260[3],{options:{raw:false,attributes:[_0x9260[4],_0x9260[5],_0x9260[6],_0x9260[7]],include:[{model:_0x9260[8],as:_0x9260[9],attributes:[_0x9260[4],_0x9260[5],_0x9260[10],_0x9260[11]]}]},log:_0x9260[2]})}}
\ No newline at end of file
+var _0x939b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x47\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65","\x69\x64","\x6E\x61\x6D\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x55\x73\x65\x72","\x41\x67\x65\x6E\x74\x73","\x6F\x6E\x6C\x69\x6E\x65","\x73\x6D\x73\x50\x61\x75\x73\x65"];_0x939b[0];var client=require(_0x939b[1]);exports[_0x939b[2]]= function(){return function(){return client.Request(_0x939b[3],{options:{raw:false,attributes:[_0x939b[4],_0x939b[5],_0x939b[6],_0x939b[7]],include:[{model:_0x939b[8],as:_0x939b[9],attributes:[_0x939b[4],_0x939b[5],_0x939b[10],_0x939b[11]]}]},log:_0x939b[2]})}}
\ No newline at end of file
index d2799fe..d830dcd 100644 (file)
@@ -1 +1 @@
-var _0x9fc1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x69\x64","\x44\x45\x53\x43"];_0x9fc1[0];var client=require(_0x9fc1[1]);exports[_0x9fc1[2]]= function(_0xefc9x2){return client.Request(_0x9fc1[3],{body:_0xefc9x2,log:_0x9fc1[3]})};exports[_0x9fc1[4]]= function(_0xefc9x3,_0xefc9x2){return client.Request(_0x9fc1[5],{body:_0xefc9x2,options:{where:{uniqueid:_0xefc9x3},order:[[_0x9fc1[6],_0x9fc1[7]]],limit:1},log:_0x9fc1[5]})}
\ No newline at end of file
+var _0xc868=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x43\x72\x65\x61\x74\x65\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x55\x70\x64\x61\x74\x65\x53\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x69\x64","\x44\x45\x53\x43"];_0xc868[0];var client=require(_0xc868[1]);exports[_0xc868[2]]= function(_0x94cex2){return client.Request(_0xc868[3],{body:_0x94cex2,log:_0xc868[3]})};exports[_0xc868[4]]= function(_0x94cex3,_0x94cex2){return client.Request(_0xc868[5],{body:_0x94cex2,options:{where:{uniqueid:_0x94cex3},order:[[_0xc868[6],_0xc868[7]]],limit:1},log:_0xc868[5]})}
\ No newline at end of file
index ce00748..3ea401d 100644 (file)
@@ -1 +1 @@
-var _0xa8e9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x47\x65\x74\x55\x73\x65\x72","\x61\x67\x65\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x70\x61\x75\x73\x65\x54\x79\x70\x65","\x6C\x61\x73\x74\x50\x61\x75\x73\x65\x41\x74","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x73\x6D\x73\x50\x61\x75\x73\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x6D\x61\x69\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x66\x61\x78\x43\x61\x70\x61\x63\x69\x74\x79","\x73\x6D\x73\x43\x61\x70\x61\x63\x69\x74\x79","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x43\x61\x70\x61\x63\x69\x74\x79"];_0xa8e9[0];var client=require(_0xa8e9[1]);exports[_0xa8e9[2]]= function(){return function(){return client.Request(_0xa8e9[3],{options:{raw:true,where:{role:_0xa8e9[4]},attributes:[_0xa8e9[5],_0xa8e9[6],_0xa8e9[7],_0xa8e9[8],_0xa8e9[9],_0xa8e9[10],_0xa8e9[11],_0xa8e9[12],_0xa8e9[13],_0xa8e9[14],_0xa8e9[15],_0xa8e9[16],_0xa8e9[17],_0xa8e9[18],_0xa8e9[19],_0xa8e9[20]]},log:_0xa8e9[2]})}}
\ No newline at end of file
+var _0xac52=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x63\x6C\x69\x65\x6E\x74","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x47\x65\x74\x55\x73\x65\x72","\x61\x67\x65\x6E\x74","\x69\x64","\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x70\x61\x75\x73\x65\x54\x79\x70\x65","\x6C\x61\x73\x74\x50\x61\x75\x73\x65\x41\x74","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x73\x6D\x73\x50\x61\x75\x73\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x6D\x61\x69\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x66\x61\x78\x43\x61\x70\x61\x63\x69\x74\x79","\x73\x6D\x73\x43\x61\x70\x61\x63\x69\x74\x79","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x43\x61\x70\x61\x63\x69\x74\x79"];_0xac52[0];var client=require(_0xac52[1]);exports[_0xac52[2]]= function(){return function(){return client.Request(_0xac52[3],{options:{raw:true,where:{role:_0xac52[4]},attributes:[_0xac52[5],_0xac52[6],_0xac52[7],_0xac52[8],_0xac52[9],_0xac52[10],_0xac52[11],_0xac52[12],_0xac52[13],_0xac52[14],_0xac52[15],_0xac52[16],_0xac52[17],_0xac52[18],_0xac52[19],_0xac52[20]]},log:_0xac52[2]})}}
\ No newline at end of file
index 0466fd1..665f7dd 100644 (file)
@@ -1 +1 @@
-var _0x2bd7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x76\x61\x6C\x69\x64\x61\x74\x65","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x65\x71\x2D\x71\x75\x65\x75\x65","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2F\x73\x74\x72\x61\x74\x65\x67\x79","\x73\x74\x72\x69\x6E\x67","\x6E\x61\x6D\x65\x20\x69\x73\x20\x61\x20\x73\x74\x72\x69\x6E\x67\x20\x61\x6E\x64\x20\x69\x74\x20\x69\x73\x20\x72\x65\x71\x75\x69\x72\x65\x64","\x6E\x75\x6D\x62\x65\x72","\x74\x69\x6D\x65\x6F\x75\x74\x20\x69\x73\x20\x61\x20\x6E\x75\x6D\x62\x65\x72","\x5B\x25\x73\x5D\x5B\x41\x47\x45\x4E\x54\x5D\x5B\x4E\x41\x4D\x45\x3A\x25\x73\x5D\x5B\x53\x54\x41\x54\x55\x53\x3A\x25\x73\x5D","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x69\x6E\x66\x6F","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x6C\x65\x6E\x67\x74\x68","\x5B\x25\x73\x5D\x5B\x41\x47\x45\x4E\x54\x5D\x20\x25\x73","\x2C\x20","\x6A\x6F\x69\x6E","\x6D\x65\x73\x73\x61\x67\x65","\x6D\x61\x70","\x65\x72\x72\x6F\x72","\x73\x74\x6F\x70","\x61\x67\x65\x6E\x74\x73","\x66\x69\x6E\x64","\x74\x69\x6D\x65\x6F\x75\x74","\x63\x72\x65\x61\x74\x65\x51\x75\x65\x75\x65","\x69\x64","\x61\x74\x69\x6D\x65\x6F\x75\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x53\x54\x41\x52\x54\x3A\x25\x73","\x72\x75\x6C\x65\x73","\x5B\x25\x73\x5D\x5B\x41\x47\x45\x4E\x54\x5D\x20\x52\x4F\x55\x54\x49\x4E\x47\x20\x53\x54\x4F\x50\x50\x45\x44","\x63\x6C\x6F\x73\x65","\x5B\x25\x73\x5D\x5B\x41\x47\x45\x4E\x54\x5D\x20\x52\x4F\x55\x54\x49\x4E\x47\x20\x45\x4E\x44","\x6E\x65\x78\x74","\x61\x67\x65\x6E\x74","\x5B\x25\x73\x5D\x5B\x41\x47\x45\x4E\x54\x5D\x20\x61\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x25\x73","\x6C\x6F\x67","\x5B\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x5D\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79"];_0x2bd7[0];var schema=require(_0x2bd7[1]);var _=require(_0x2bd7[2]);var util=require(_0x2bd7[3]);var seqqueue=require(_0x2bd7[4]);var logger=require(_0x2bd7[6])(_0x2bd7[5]);var strategy=require(_0x2bd7[7]);var queue=schema({name:{type:_0x2bd7[8],required:true,message:_0x2bd7[9]},timeout:{type:_0x2bd7[10],message:_0x2bd7[11]}});function writeLog(_0x332ex9,_0x332exa,_0x332exb){return logger[_0x2bd7[15]](util[_0x2bd7[14]](_0x2bd7[12],_0x332ex9,_0x332exa[_0x2bd7[13]],_0x332exb))}function handleFindAgent(_0x332exd){return function(_0x332exe){return _0x332exe[_0x2bd7[13]][_0x2bd7[16]]()=== _0x332exd[_0x2bd7[16]]()}}exports[_0x2bd7[17]]= function(_0x332exf,_0x332ex10,_0x332ex11,_0x332ex12){return function(_0x332ex13){try{var _0x332exa={name:_0x332ex10[0],timeout:_0x332ex10[1]};var _0x332ex14=queue[_0x2bd7[1]](_0x332exa,{typecast:true});if(_0x332ex14[_0x2bd7[18]]){logger[_0x2bd7[24]](_0x2bd7[19],_0x332exf,_[_0x2bd7[23]](_0x332ex14,_0x2bd7[22])[_0x2bd7[21]](_0x2bd7[20]));_0x332ex13[_0x2bd7[25]]()}else {var _0x332ex15=_[_0x2bd7[27]](_0x332ex11[_0x2bd7[26]],handleFindAgent(_0x332exa[_0x2bd7[13]]));if(_0x332ex15){var _0x332ex16=(_0x332exa[_0x2bd7[28]]|| 10)* 1000;var _0x332ex17,_0x332ex18;var _0x332ex19=seqqueue[_0x2bd7[29]](_0x332ex16);_0x332ex19[_0x2bd7[30]]= _0x332exf;_0x332ex19[_0x2bd7[31]]= _0x332ex16;_0x332ex19[_0x2bd7[32]]= _0x332ex12[_0x2bd7[32]];writeLog(_0x332exf,_0x332ex15,util[_0x2bd7[14]](_0x2bd7[33],_0x332ex16));_0x332ex17= setInterval(function(){if(_0x332ex11[_0x2bd7[34]]&&  !_0x332ex11[_0x2bd7[34]][_0x332exf]){logger[_0x2bd7[15]](_0x2bd7[35],_0x332exf);clearInterval(_0x332ex17);clearTimeout(_0x332ex18);_0x332ex18= undefined;_0x332ex19[_0x2bd7[36]](true);_0x332ex13[_0x2bd7[25]]()}},1000);_0x332ex18= setTimeout(function(){logger[_0x2bd7[15]](_0x2bd7[37],_0x332exf);clearInterval(_0x332ex17);_0x332ex17= undefined;_0x332ex19[_0x2bd7[36]](true);_0x332ex13[_0x2bd7[38]]()},_0x332ex16);strategy[_0x2bd7[39]](_0x332ex19,_0x332ex15,_0x332ex11,_0x332ex12)}else {logger[_0x2bd7[24]](_0x2bd7[40],_0x332exf,_0x332exa[_0x2bd7[13]]);_0x332ex13[_0x2bd7[25]]()}}}catch(e){console[_0x2bd7[41]](e);logger[_0x2bd7[24]](_0x2bd7[42],_0x332exf,JSON[_0x2bd7[43]](e));_0x332ex13[_0x2bd7[25]]()}}}
\ No newline at end of file
+var _0xa223=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x76\x61\x6C\x69\x64\x61\x74\x65","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x65\x71\x2D\x71\x75\x65\x75\x65","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2F\x73\x74\x72\x61\x74\x65\x67\x79","\x73\x74\x72\x69\x6E\x67","\x6E\x61\x6D\x65\x20\x69\x73\x20\x61\x20\x73\x74\x72\x69\x6E\x67\x20\x61\x6E\x64\x20\x69\x74\x20\x69\x73\x20\x72\x65\x71\x75\x69\x72\x65\x64","\x6E\x75\x6D\x62\x65\x72","\x74\x69\x6D\x65\x6F\x75\x74\x20\x69\x73\x20\x61\x20\x6E\x75\x6D\x62\x65\x72","\x5B\x25\x73\x5D\x5B\x41\x47\x45\x4E\x54\x5D\x5B\x4E\x41\x4D\x45\x3A\x25\x73\x5D\x5B\x53\x54\x41\x54\x55\x53\x3A\x25\x73\x5D","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x69\x6E\x66\x6F","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x6C\x65\x6E\x67\x74\x68","\x5B\x25\x73\x5D\x5B\x41\x47\x45\x4E\x54\x5D\x20\x25\x73","\x2C\x20","\x6A\x6F\x69\x6E","\x6D\x65\x73\x73\x61\x67\x65","\x6D\x61\x70","\x65\x72\x72\x6F\x72","\x73\x74\x6F\x70","\x61\x67\x65\x6E\x74\x73","\x66\x69\x6E\x64","\x74\x69\x6D\x65\x6F\x75\x74","\x63\x72\x65\x61\x74\x65\x51\x75\x65\x75\x65","\x69\x64","\x61\x74\x69\x6D\x65\x6F\x75\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x53\x54\x41\x52\x54\x3A\x25\x73","\x72\x75\x6C\x65\x73","\x5B\x25\x73\x5D\x5B\x41\x47\x45\x4E\x54\x5D\x20\x52\x4F\x55\x54\x49\x4E\x47\x20\x53\x54\x4F\x50\x50\x45\x44","\x63\x6C\x6F\x73\x65","\x5B\x25\x73\x5D\x5B\x41\x47\x45\x4E\x54\x5D\x20\x52\x4F\x55\x54\x49\x4E\x47\x20\x45\x4E\x44","\x6E\x65\x78\x74","\x61\x67\x65\x6E\x74","\x5B\x25\x73\x5D\x5B\x41\x47\x45\x4E\x54\x5D\x20\x61\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x25\x73","\x6C\x6F\x67","\x5B\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x5D\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79"];_0xa223[0];var schema=require(_0xa223[1]);var _=require(_0xa223[2]);var util=require(_0xa223[3]);var seqqueue=require(_0xa223[4]);var logger=require(_0xa223[6])(_0xa223[5]);var strategy=require(_0xa223[7]);var queue=schema({name:{type:_0xa223[8],required:true,message:_0xa223[9]},timeout:{type:_0xa223[10],message:_0xa223[11]}});function writeLog(_0x48eax9,_0x48eaxa,_0x48eaxb){return logger[_0xa223[15]](util[_0xa223[14]](_0xa223[12],_0x48eax9,_0x48eaxa[_0xa223[13]],_0x48eaxb))}function handleFindAgent(_0x48eaxd){return function(_0x48eaxe){return _0x48eaxe[_0xa223[13]][_0xa223[16]]()=== _0x48eaxd[_0xa223[16]]()}}exports[_0xa223[17]]= function(_0x48eaxf,_0x48eax10,_0x48eax11,_0x48eax12){return function(_0x48eax13){try{var _0x48eaxa={name:_0x48eax10[0],timeout:_0x48eax10[1]};var _0x48eax14=queue[_0xa223[1]](_0x48eaxa,{typecast:true});if(_0x48eax14[_0xa223[18]]){logger[_0xa223[24]](_0xa223[19],_0x48eaxf,_[_0xa223[23]](_0x48eax14,_0xa223[22])[_0xa223[21]](_0xa223[20]));_0x48eax13[_0xa223[25]]()}else {var _0x48eax15=_[_0xa223[27]](_0x48eax11[_0xa223[26]],handleFindAgent(_0x48eaxa[_0xa223[13]]));if(_0x48eax15){var _0x48eax16=(_0x48eaxa[_0xa223[28]]|| 10)* 1000;var _0x48eax17,_0x48eax18;var _0x48eax19=seqqueue[_0xa223[29]](_0x48eax16);_0x48eax19[_0xa223[30]]= _0x48eaxf;_0x48eax19[_0xa223[31]]= _0x48eax16;_0x48eax19[_0xa223[32]]= _0x48eax12[_0xa223[32]];writeLog(_0x48eaxf,_0x48eax15,util[_0xa223[14]](_0xa223[33],_0x48eax16));_0x48eax17= setInterval(function(){if(_0x48eax11[_0xa223[34]]&&  !_0x48eax11[_0xa223[34]][_0x48eaxf]){logger[_0xa223[15]](_0xa223[35],_0x48eaxf);clearInterval(_0x48eax17);clearTimeout(_0x48eax18);_0x48eax18= undefined;_0x48eax19[_0xa223[36]](true);_0x48eax13[_0xa223[25]]()}},1000);_0x48eax18= setTimeout(function(){logger[_0xa223[15]](_0xa223[37],_0x48eaxf);clearInterval(_0x48eax17);_0x48eax17= undefined;_0x48eax19[_0xa223[36]](true);_0x48eax13[_0xa223[38]]()},_0x48eax16);strategy[_0xa223[39]](_0x48eax19,_0x48eax15,_0x48eax11,_0x48eax12)}else {logger[_0xa223[24]](_0xa223[40],_0x48eaxf,_0x48eaxa[_0xa223[13]]);_0x48eax13[_0xa223[25]]()}}}catch(e){console[_0xa223[41]](e);logger[_0xa223[24]](_0xa223[42],_0x48eaxf,JSON[_0xa223[43]](e));_0x48eax13[_0xa223[25]]()}}}
\ No newline at end of file
index c14942a..3cd7c80 100644 (file)
@@ -1 +1 @@
-var _0xefbe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2F\x75\x74\x69\x6C\x73","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x61\x69\x6C\x52\x70\x63","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x31","\x63\x72\x65\x61\x74\x65\x64","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x69\x73\x4E\x69\x6C","\x5B\x25\x73\x5D\x5B\x41\x55\x54\x4F\x52\x45\x50\x4C\x59\x5D\x20\x25\x73","\x41\x75\x74\x6F\x72\x65\x70\x6C\x79\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x6E\x65\x78\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x67\x65\x74\x4D\x75\x73\x74\x61\x63\x68\x65\x52\x65\x6E\x64\x65\x72","\x69\x64","\x63\x6F\x6E\x74\x61\x63\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6F\x75\x74","\x6D\x65\x73\x73\x61\x67\x65","\x74\x6F","\x66\x72\x6F\x6D","","\x63\x63","\x70\x68\x6F\x6E\x65","\x72\x65\x61\x64","\x73\x75\x62\x6A\x65\x63\x74","\x52\x65\x3A","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x52\x65\x3A\x20","\x63\x68\x61\x74","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x61\x63\x63\x6F\x75\x6E\x74","\x75\x70\x70\x65\x72\x46\x69\x72\x73\x74","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x4D\x65\x73\x73\x61\x67\x65","\x6D\x61\x69\x6C","\x73\x65\x72\x76\x69\x63\x65","\x53\x6D\x74\x70","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x65\x63\x75\x72\x65","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E","\x61\x75\x74\x68","\x75\x73\x65\x72","\x70\x61\x73\x73","\x69\x6E\x52\x65\x70\x6C\x79\x54\x6F","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x68\x74\x6D\x6C","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x78\x6D\x2D\x6D\x61\x69\x6C\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x22\x3E","\x62\x6F\x64\x79","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x78\x6D\x2D\x6D\x61\x69\x6C\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x22","\x3C\x64\x69\x76","\x72\x65\x70\x6C\x61\x63\x65","\x3C\x2F\x64\x69\x76\x3E","\x66\x69\x6E\x61\x6C\x6C\x79","\x5B\x52\x50\x43\x5D\x5B\x25\x73\x5D\x5B\x41\x55\x54\x4F\x52\x45\x50\x4C\x59\x5D\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x5B\x25\x73\x5D\x5B\x41\x55\x54\x4F\x52\x45\x50\x4C\x59\x5D\x20\x53\x4D\x54\x50\x20\x53\x45\x4E\x54","\x63\x72\x65\x61\x74\x65","\x73\x65\x6E\x64\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x73\x74\x6F\x70"];_0xefbe[0];var _=require(_0xefbe[1]);var moment=require(_0xefbe[2]);var utils=require(_0xefbe[3]);var logger=require(_0xefbe[5])(_0xefbe[4]);var rpc={chatMessage:require(_0xefbe[6]),openchannelMessage:require(_0xefbe[7]),mailMessage:require(_0xefbe[8]),smsMessage:require(_0xefbe[9]),faxMessage:require(_0xefbe[10])};var mailRpc=require(_0xefbe[11]);exports[_0xefbe[12]]= function(_0x7a75x7,_0x7a75x8){return function(_0x7a75x9){try{if(_0x7a75x8[0]=== _0xefbe[13]&& _[_0xefbe[16]](this[_0xefbe[15]][_0xefbe[14]])){logger[_0xefbe[19]](_0xefbe[17],_0x7a75x7,_0xefbe[18]);return _0x7a75x9[_0xefbe[20]]()};var _0x7a75xa=this[_0xefbe[21]];var _0x7a75xb={body:utils[_0xefbe[22]](_0x7a75x8[1],this),ContactId:this[_0xefbe[24]][_0xefbe[23]],sentAt:moment()[_0xefbe[26]](_0xefbe[25]),direction:_0xefbe[27]};if(this[_0xefbe[28]]){_0x7a75xb[_0xefbe[29]]= this[_0xefbe[28]][_0xefbe[30]]|| _0xefbe[31];_0x7a75xb[_0xefbe[32]]= this[_0xefbe[28]][_0xefbe[32]]|| _0xefbe[31];_0x7a75xb[_0xefbe[30]]= this[_0xefbe[28]][_0xefbe[29]]|| _0xefbe[31];_0x7a75xb[_0xefbe[33]]= this[_0xefbe[28]][_0xefbe[33]]|| _0xefbe[31];_0x7a75xb[_0xefbe[34]]= true;if(this[_0xefbe[28]][_0xefbe[35]]){_0x7a75xb[_0xefbe[35]]= _0xefbe[31];_0x7a75xb[_0xefbe[35]]+= _[_0xefbe[37]](this[_0xefbe[28]][_0xefbe[35]],_0xefbe[36])?_0xefbe[31]:_0xefbe[38];_0x7a75xb[_0xefbe[35]]+= this[_0xefbe[28]][_0xefbe[35]]}};if(this[_0xefbe[21]]=== _0xefbe[39]){_0x7a75xb[_0xefbe[40]]= this[_0xefbe[41]][_0xefbe[23]]}else {_0x7a75xb[_[_0xefbe[42]](this[_0xefbe[21]])+ _0xefbe[43]]= this[_0xefbe[41]][_0xefbe[23]]};_0x7a75xb[_[_0xefbe[42]](this[_0xefbe[21]])+ _0xefbe[44]]= this[_0xefbe[15]][_0xefbe[23]];if(rpc[this[_0xefbe[21]]+ _0xefbe[45]]){if(this[_0xefbe[21]]=== _0xefbe[46]){var _0x7a75xc={tls:{rejectUnauthorized:false}};if(this[_0xefbe[41]][_0xefbe[48]][_0xefbe[47]]){_0x7a75xc[_0xefbe[47]]= this[_0xefbe[41]][_0xefbe[48]][_0xefbe[47]]}else {_0x7a75xc[_0xefbe[49]]= this[_0xefbe[41]][_0xefbe[48]][_0xefbe[49]];_0x7a75xc[_0xefbe[50]]= this[_0xefbe[41]][_0xefbe[48]][_0xefbe[50]];_0x7a75xc[_0xefbe[51]]= this[_0xefbe[41]][_0xefbe[48]][_0xefbe[51]]};if(this[_0xefbe[41]][_0xefbe[48]][_0xefbe[52]]){_0x7a75xc[_0xefbe[53]]= {user:this[_0xefbe[41]][_0xefbe[48]][_0xefbe[54]],pass:this[_0xefbe[41]][_0xefbe[48]][_0xefbe[55]]}};_0x7a75xb[_0xefbe[56]]= this[_0xefbe[28]][_0xefbe[57]];_0x7a75xb[_0xefbe[58]]= _0xefbe[59]+ _[_0xefbe[63]](_0x7a75xb[_0xefbe[60]],_0xefbe[61],_0xefbe[62])+ _0xefbe[64];return mailRpc[_0xefbe[73]](_0x7a75xc,_0x7a75xb)[_0xefbe[70]](function(_0x7a75xe){logger[_0xefbe[19]](_0xefbe[71],_0x7a75x7);_0x7a75xb[_0xefbe[57]]= _0x7a75xe[_0xefbe[28]][_0xefbe[57]];return rpc[_0x7a75xa+ _0xefbe[45]][_0xefbe[72]](_0x7a75xb)})[_0xefbe[70]](function(_0x7a75xe){logger[_0xefbe[19]](_0xefbe[17],_0x7a75x7,JSON[_0xefbe[67]](_0x7a75xe))})[_0xefbe[69]](function(_0x7a75xd){logger[_0xefbe[68]](_0xefbe[66],_0x7a75x7,JSON[_0xefbe[67]](_0x7a75xd))})[_0xefbe[65]](function(){_0x7a75x9[_0xefbe[20]]()})}else {return rpc[this[_0xefbe[21]]+ _0xefbe[45]][_0xefbe[72]](_0x7a75xb)[_0xefbe[70]](function(_0x7a75xe){logger[_0xefbe[19]](_0xefbe[17],_0x7a75x7,_0x7a75xb[_0xefbe[60]])})[_0xefbe[69]](function(_0x7a75xd){logger[_0xefbe[68]](_0xefbe[17],_0x7a75x7,JSON[_0xefbe[67]](_0x7a75xd))})[_0xefbe[65]](function(){_0x7a75x9[_0xefbe[20]]()})}}}catch(e){logger[_0xefbe[68]](_0xefbe[17],_0x7a75x7,JSON[_0xefbe[67]](e));_0x7a75x9[_0xefbe[74]]()}}}
\ No newline at end of file
+var _0x32a4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2F\x75\x74\x69\x6C\x73","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x61\x69\x6C\x52\x70\x63","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x31","\x63\x72\x65\x61\x74\x65\x64","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x69\x73\x4E\x69\x6C","\x5B\x25\x73\x5D\x5B\x41\x55\x54\x4F\x52\x45\x50\x4C\x59\x5D\x20\x25\x73","\x41\x75\x74\x6F\x72\x65\x70\x6C\x79\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x73\x65\x6E\x74","\x69\x6E\x66\x6F","\x6E\x65\x78\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x67\x65\x74\x4D\x75\x73\x74\x61\x63\x68\x65\x52\x65\x6E\x64\x65\x72","\x69\x64","\x63\x6F\x6E\x74\x61\x63\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6F\x75\x74","\x6D\x65\x73\x73\x61\x67\x65","\x74\x6F","\x66\x72\x6F\x6D","","\x63\x63","\x70\x68\x6F\x6E\x65","\x72\x65\x61\x64","\x73\x75\x62\x6A\x65\x63\x74","\x52\x65\x3A","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x52\x65\x3A\x20","\x63\x68\x61\x74","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x61\x63\x63\x6F\x75\x6E\x74","\x75\x70\x70\x65\x72\x46\x69\x72\x73\x74","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x4D\x65\x73\x73\x61\x67\x65","\x6D\x61\x69\x6C","\x73\x65\x72\x76\x69\x63\x65","\x53\x6D\x74\x70","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x65\x63\x75\x72\x65","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E","\x61\x75\x74\x68","\x75\x73\x65\x72","\x70\x61\x73\x73","\x69\x6E\x52\x65\x70\x6C\x79\x54\x6F","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x68\x74\x6D\x6C","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x78\x6D\x2D\x6D\x61\x69\x6C\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x22\x3E","\x62\x6F\x64\x79","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x78\x6D\x2D\x6D\x61\x69\x6C\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x22","\x3C\x64\x69\x76","\x72\x65\x70\x6C\x61\x63\x65","\x3C\x2F\x64\x69\x76\x3E","\x66\x69\x6E\x61\x6C\x6C\x79","\x5B\x52\x50\x43\x5D\x5B\x25\x73\x5D\x5B\x41\x55\x54\x4F\x52\x45\x50\x4C\x59\x5D\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x5B\x25\x73\x5D\x5B\x41\x55\x54\x4F\x52\x45\x50\x4C\x59\x5D\x20\x53\x4D\x54\x50\x20\x53\x45\x4E\x54","\x63\x72\x65\x61\x74\x65","\x73\x65\x6E\x64\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x73\x74\x6F\x70"];_0x32a4[0];var _=require(_0x32a4[1]);var moment=require(_0x32a4[2]);var utils=require(_0x32a4[3]);var logger=require(_0x32a4[5])(_0x32a4[4]);var rpc={chatMessage:require(_0x32a4[6]),openchannelMessage:require(_0x32a4[7]),mailMessage:require(_0x32a4[8]),smsMessage:require(_0x32a4[9]),faxMessage:require(_0x32a4[10])};var mailRpc=require(_0x32a4[11]);exports[_0x32a4[12]]= function(_0xe3cax7,_0xe3cax8){return function(_0xe3cax9){try{if(_0xe3cax8[0]=== _0x32a4[13]&& _[_0x32a4[16]](this[_0x32a4[15]][_0x32a4[14]])){logger[_0x32a4[19]](_0x32a4[17],_0xe3cax7,_0x32a4[18]);return _0xe3cax9[_0x32a4[20]]()};var _0xe3caxa=this[_0x32a4[21]];var _0xe3caxb={body:utils[_0x32a4[22]](_0xe3cax8[1],this),ContactId:this[_0x32a4[24]][_0x32a4[23]],sentAt:moment()[_0x32a4[26]](_0x32a4[25]),direction:_0x32a4[27]};if(this[_0x32a4[28]]){_0xe3caxb[_0x32a4[29]]= this[_0x32a4[28]][_0x32a4[30]]|| _0x32a4[31];_0xe3caxb[_0x32a4[32]]= this[_0x32a4[28]][_0x32a4[32]]|| _0x32a4[31];_0xe3caxb[_0x32a4[30]]= this[_0x32a4[28]][_0x32a4[29]]|| _0x32a4[31];_0xe3caxb[_0x32a4[33]]= this[_0x32a4[28]][_0x32a4[33]]|| _0x32a4[31];_0xe3caxb[_0x32a4[34]]= true;if(this[_0x32a4[28]][_0x32a4[35]]){_0xe3caxb[_0x32a4[35]]= _0x32a4[31];_0xe3caxb[_0x32a4[35]]+= _[_0x32a4[37]](this[_0x32a4[28]][_0x32a4[35]],_0x32a4[36])?_0x32a4[31]:_0x32a4[38];_0xe3caxb[_0x32a4[35]]+= this[_0x32a4[28]][_0x32a4[35]]}};if(this[_0x32a4[21]]=== _0x32a4[39]){_0xe3caxb[_0x32a4[40]]= this[_0x32a4[41]][_0x32a4[23]]}else {_0xe3caxb[_[_0x32a4[42]](this[_0x32a4[21]])+ _0x32a4[43]]= this[_0x32a4[41]][_0x32a4[23]]};_0xe3caxb[_[_0x32a4[42]](this[_0x32a4[21]])+ _0x32a4[44]]= this[_0x32a4[15]][_0x32a4[23]];if(rpc[this[_0x32a4[21]]+ _0x32a4[45]]){if(this[_0x32a4[21]]=== _0x32a4[46]){var _0xe3caxc={tls:{rejectUnauthorized:false}};if(this[_0x32a4[41]][_0x32a4[48]][_0x32a4[47]]){_0xe3caxc[_0x32a4[47]]= this[_0x32a4[41]][_0x32a4[48]][_0x32a4[47]]}else {_0xe3caxc[_0x32a4[49]]= this[_0x32a4[41]][_0x32a4[48]][_0x32a4[49]];_0xe3caxc[_0x32a4[50]]= this[_0x32a4[41]][_0x32a4[48]][_0x32a4[50]];_0xe3caxc[_0x32a4[51]]= this[_0x32a4[41]][_0x32a4[48]][_0x32a4[51]]};if(this[_0x32a4[41]][_0x32a4[48]][_0x32a4[52]]){_0xe3caxc[_0x32a4[53]]= {user:this[_0x32a4[41]][_0x32a4[48]][_0x32a4[54]],pass:this[_0x32a4[41]][_0x32a4[48]][_0x32a4[55]]}};_0xe3caxb[_0x32a4[56]]= this[_0x32a4[28]][_0x32a4[57]];_0xe3caxb[_0x32a4[58]]= _0x32a4[59]+ _[_0x32a4[63]](_0xe3caxb[_0x32a4[60]],_0x32a4[61],_0x32a4[62])+ _0x32a4[64];return mailRpc[_0x32a4[73]](_0xe3caxc,_0xe3caxb)[_0x32a4[70]](function(_0xe3caxe){logger[_0x32a4[19]](_0x32a4[71],_0xe3cax7);_0xe3caxb[_0x32a4[57]]= _0xe3caxe[_0x32a4[28]][_0x32a4[57]];return rpc[_0xe3caxa+ _0x32a4[45]][_0x32a4[72]](_0xe3caxb)})[_0x32a4[70]](function(_0xe3caxe){logger[_0x32a4[19]](_0x32a4[17],_0xe3cax7,JSON[_0x32a4[67]](_0xe3caxe))})[_0x32a4[69]](function(_0xe3caxd){logger[_0x32a4[68]](_0x32a4[66],_0xe3cax7,JSON[_0x32a4[67]](_0xe3caxd))})[_0x32a4[65]](function(){_0xe3cax9[_0x32a4[20]]()})}else {return rpc[this[_0x32a4[21]]+ _0x32a4[45]][_0x32a4[72]](_0xe3caxb)[_0x32a4[70]](function(_0xe3caxe){logger[_0x32a4[19]](_0x32a4[17],_0xe3cax7,_0xe3caxb[_0x32a4[60]])})[_0x32a4[69]](function(_0xe3caxd){logger[_0x32a4[68]](_0x32a4[17],_0xe3cax7,JSON[_0x32a4[67]](_0xe3caxd))})[_0x32a4[65]](function(){_0xe3cax9[_0x32a4[20]]()})}}}catch(e){logger[_0x32a4[68]](_0x32a4[17],_0xe3cax7,JSON[_0x32a4[67]](e));_0xe3cax9[_0x32a4[74]]()}}}
\ No newline at end of file
index 3e04963..c562be1 100644 (file)
@@ -1 +1 @@
-var _0x119d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x5B\x25\x73\x5D\x5B\x43\x4C\x4F\x53\x45\x5D\x20\x72\x65\x61\x73\x6F\x6E\x20\x25\x73","\x69\x6E\x66\x6F","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x73\x74\x6F\x70","\x66\x69\x6E\x61\x6C\x6C\x79","\x5B\x25\x73\x5D\x5B\x43\x4C\x4F\x53\x45\x5D\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x25\x73\x5D\x5B\x43\x4C\x4F\x53\x45\x5D\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x20\x25\x73\x20\x68\x61\x73\x20\x62\x65\x65\x6E\x20\x63\x6C\x6F\x73\x65\x64\x21","\x69\x64","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65"];_0x119d[0];var moment=require(_0x119d[1]);var logger=require(_0x119d[3])(_0x119d[2]);var rpc={chatInteraction:require(_0x119d[4]),openchannelInteraction:require(_0x119d[5]),smsInteraction:require(_0x119d[6]),mailInteraction:require(_0x119d[7]),faxInteraction:require(_0x119d[8])};exports[_0x119d[9]]= function(_0xa806x4,_0xa806x5,_0xa806x6,_0xa806x7){return function(_0xa806x8){try{logger[_0x119d[11]](_0x119d[10],_0xa806x4,_0xa806x5[0]);var _0xa806x9={closed:1,closedAt:moment()[_0x119d[13]](_0x119d[12]),disposition:_0xa806x5[0]};if(rpc[_0xa806x7[_0x119d[14]]+ _0x119d[15]]){rpc[_0xa806x7[_0x119d[14]]+ _0x119d[15]][_0x119d[26]](_0xa806x7[_0x119d[24]][_0x119d[23]],_0xa806x9)[_0x119d[25]](function(_0xa806xb){logger[_0x119d[11]](_0x119d[22],_0xa806x4,_0xa806x7[_0x119d[24]][_0x119d[23]])})[_0x119d[21]](function(_0xa806xa){logger[_0x119d[20]](_0x119d[18],_0xa806x4,JSON[_0x119d[19]](_0xa806xa))})[_0x119d[17]](function(){_0xa806x8[_0x119d[16]]()})}}catch(e){logger[_0x119d[20]](_0x119d[18],_0xa806x4,JSON[_0x119d[19]](e));_0xa806x8[_0x119d[16]]()}}}
\ No newline at end of file
+var _0x2d8f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x68\x61\x74\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x73\x6D\x73\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x6D\x61\x69\x6C\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x66\x61\x78\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x5B\x25\x73\x5D\x5B\x43\x4C\x4F\x53\x45\x5D\x20\x72\x65\x61\x73\x6F\x6E\x20\x25\x73","\x69\x6E\x66\x6F","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x73\x74\x6F\x70","\x66\x69\x6E\x61\x6C\x6C\x79","\x5B\x25\x73\x5D\x5B\x43\x4C\x4F\x53\x45\x5D\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x25\x73\x5D\x5B\x43\x4C\x4F\x53\x45\x5D\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x20\x25\x73\x20\x68\x61\x73\x20\x62\x65\x65\x6E\x20\x63\x6C\x6F\x73\x65\x64\x21","\x69\x64","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65"];_0x2d8f[0];var moment=require(_0x2d8f[1]);var logger=require(_0x2d8f[3])(_0x2d8f[2]);var rpc={chatInteraction:require(_0x2d8f[4]),openchannelInteraction:require(_0x2d8f[5]),smsInteraction:require(_0x2d8f[6]),mailInteraction:require(_0x2d8f[7]),faxInteraction:require(_0x2d8f[8])};exports[_0x2d8f[9]]= function(_0xe44ex4,_0xe44ex5,_0xe44ex6,_0xe44ex7){return function(_0xe44ex8){try{logger[_0x2d8f[11]](_0x2d8f[10],_0xe44ex4,_0xe44ex5[0]);var _0xe44ex9={closed:1,closedAt:moment()[_0x2d8f[13]](_0x2d8f[12]),disposition:_0xe44ex5[0]};if(rpc[_0xe44ex7[_0x2d8f[14]]+ _0x2d8f[15]]){rpc[_0xe44ex7[_0x2d8f[14]]+ _0x2d8f[15]][_0x2d8f[26]](_0xe44ex7[_0x2d8f[24]][_0x2d8f[23]],_0xe44ex9)[_0x2d8f[25]](function(_0xe44exb){logger[_0x2d8f[11]](_0x2d8f[22],_0xe44ex4,_0xe44ex7[_0x2d8f[24]][_0x2d8f[23]])})[_0x2d8f[21]](function(_0xe44exa){logger[_0x2d8f[20]](_0x2d8f[18],_0xe44ex4,JSON[_0x2d8f[19]](_0xe44exa))})[_0x2d8f[17]](function(){_0xe44ex8[_0x2d8f[16]]()})}}catch(e){logger[_0x2d8f[20]](_0x2d8f[18],_0xe44ex4,JSON[_0x2d8f[19]](e));_0xe44ex8[_0x2d8f[16]]()}}}
\ No newline at end of file
index 5da31a3..8907b00 100644 (file)
@@ -1 +1 @@
-var _0xab60=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x76\x61\x6C\x69\x64\x61\x74\x65","\x6C\x6F\x64\x61\x73\x68","\x2E\x2F\x75\x74\x69\x6C\x73","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x20\x69\x73\x20\x61\x20\x73\x74\x72\x69\x6E\x67\x20\x61\x6E\x64\x20\x69\x74\x20\x69\x73\x20\x72\x65\x71\x75\x69\x72\x65\x64","\x6E\x75\x6D\x62\x65\x72","\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x74\x72\x75\x65\x20\x69\x73\x20\x61\x20\x6E\x75\x6D\x62\x65\x72","\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x66\x61\x6C\x73\x65\x20\x69\x73\x20\x61\x20\x6E\x75\x6D\x62\x65\x72","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x67\x65\x74\x4D\x75\x73\x74\x61\x63\x68\x65\x52\x65\x6E\x64\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x5B\x25\x73\x5D\x5B\x47\x4F\x54\x4F\x49\x46\x5D\x20\x25\x73","\x2C\x20","\x6A\x6F\x69\x6E","\x6D\x65\x73\x73\x61\x67\x65","\x6D\x61\x70","\x65\x72\x72\x6F\x72","\x73\x74\x6F\x70","\x28","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x29","\x70\x72\x69\x6F\x72\x69\x74\x79\x54\x72\x75\x65","\x70\x72\x69\x6F\x72\x69\x74\x79\x46\x61\x6C\x73\x65","\x5B\x25\x73\x5D\x5B\x47\x4F\x54\x4F\x49\x46\x5D\x20\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x20\x25\x73\x20\x69\x73\x20\x25\x73\x20\x74\x72\x79\x20\x67\x6F\x74\x6F\x20\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x25\x73","\x6E\x65\x78\x74","\x69\x6E\x66\x6F","\x72\x75\x6C\x65\x73","\x66\x69\x6E\x64\x49\x6E\x64\x65\x78","\x5B\x25\x73\x5D\x5B\x47\x4F\x54\x4F\x49\x46\x5D\x20\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x25\x73\x20\x66\x6F\x75\x6E\x64\x20\x61\x74\x20\x69\x6E\x64\x65\x78\x3A\x20\x25\x73","\x5B\x25\x73\x5D\x5B\x47\x4F\x54\x4F\x49\x46\x5D\x20\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x25\x73\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x5B\x25\x73\x5D\x5B\x47\x4F\x54\x4F\x49\x46\x5D\x20\x65\x76\x61\x6C\x20\x65\x72\x72\x6F\x72","\x73\x74\x72\x69\x6E\x67\x69\x66\x79"];_0xab60[0];var schema=require(_0xab60[1]);var _=require(_0xab60[2]);var utils=require(_0xab60[3]);var logger=require(_0xab60[5])(_0xab60[4]);var gotoif=schema({condition:{type:_0xab60[6],required:true,message:_0xab60[7]},priorityTrue:{type:_0xab60[8],message:_0xab60[9]},priorityFalse:{type:_0xab60[8],message:_0xab60[10]}});exports[_0xab60[11]]= function(_0x8495x6,_0x8495x7){return function(_0x8495x8){try{var _0x8495x9={condition:utils[_0xab60[12]](_0x8495x7[0],this),priorityTrue:_0x8495x7[1],priorityFalse:_0x8495x7[2]};var _0x8495xa=gotoif[_0xab60[1]](_0x8495x9,{typecast:true});if(_0x8495xa[_0xab60[13]]){logger[_0xab60[19]](_0xab60[14],_0x8495x6,_[_0xab60[18]](_0x8495xa,_0xab60[17])[_0xab60[16]](_0xab60[15]));_0x8495x8[_0xab60[20]]()}else {try{var _0x8495xb=eval(_0xab60[21]+ _0x8495x9[_0xab60[22]]+ _0xab60[23]);var _0x8495xc=_0x8495xb?_0x8495x9[_0xab60[24]]:_0x8495x9[_0xab60[25]];logger[_0xab60[28]](_0xab60[26],_0x8495x6,_0x8495x9[_0xab60[22]],_0x8495xb,_0x8495xc|| _0xab60[27]);if(_0x8495xc){var _0x8495xd=_[_0xab60[30]](_0x8495x8[_0xab60[29]](),{p:_0x8495xc});if(_0x8495xd>= 0){logger[_0xab60[28]](_0xab60[31],_0x8495x6,_0x8495xc|| _0xab60[27],_0x8495xd);_0x8495x8[_0xab60[27]](_0x8495xd)}else {logger[_0xab60[28]](_0xab60[32],_0x8495x6,_0x8495xc|| _0xab60[27]);_0x8495x8[_0xab60[20]]()}}else {_0x8495x8[_0xab60[27]]()}}catch(e){logger[_0xab60[19]](_0xab60[33],_0x8495x6);_0x8495x8[_0xab60[20]]()}}}catch(e){logger[_0xab60[19]](_0xab60[14],_0x8495x6,JSON[_0xab60[34]](e));_0x8495x8[_0xab60[20]]()}}}
\ No newline at end of file
+var _0xa1c2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x76\x61\x6C\x69\x64\x61\x74\x65","\x6C\x6F\x64\x61\x73\x68","\x2E\x2F\x75\x74\x69\x6C\x73","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x20\x69\x73\x20\x61\x20\x73\x74\x72\x69\x6E\x67\x20\x61\x6E\x64\x20\x69\x74\x20\x69\x73\x20\x72\x65\x71\x75\x69\x72\x65\x64","\x6E\x75\x6D\x62\x65\x72","\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x74\x72\x75\x65\x20\x69\x73\x20\x61\x20\x6E\x75\x6D\x62\x65\x72","\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x66\x61\x6C\x73\x65\x20\x69\x73\x20\x61\x20\x6E\x75\x6D\x62\x65\x72","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x67\x65\x74\x4D\x75\x73\x74\x61\x63\x68\x65\x52\x65\x6E\x64\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x5B\x25\x73\x5D\x5B\x47\x4F\x54\x4F\x49\x46\x5D\x20\x25\x73","\x2C\x20","\x6A\x6F\x69\x6E","\x6D\x65\x73\x73\x61\x67\x65","\x6D\x61\x70","\x65\x72\x72\x6F\x72","\x73\x74\x6F\x70","\x28","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x29","\x70\x72\x69\x6F\x72\x69\x74\x79\x54\x72\x75\x65","\x70\x72\x69\x6F\x72\x69\x74\x79\x46\x61\x6C\x73\x65","\x5B\x25\x73\x5D\x5B\x47\x4F\x54\x4F\x49\x46\x5D\x20\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x20\x25\x73\x20\x69\x73\x20\x25\x73\x20\x74\x72\x79\x20\x67\x6F\x74\x6F\x20\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x25\x73","\x6E\x65\x78\x74","\x69\x6E\x66\x6F","\x72\x75\x6C\x65\x73","\x66\x69\x6E\x64\x49\x6E\x64\x65\x78","\x5B\x25\x73\x5D\x5B\x47\x4F\x54\x4F\x49\x46\x5D\x20\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x25\x73\x20\x66\x6F\x75\x6E\x64\x20\x61\x74\x20\x69\x6E\x64\x65\x78\x3A\x20\x25\x73","\x5B\x25\x73\x5D\x5B\x47\x4F\x54\x4F\x49\x46\x5D\x20\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x25\x73\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x5B\x25\x73\x5D\x5B\x47\x4F\x54\x4F\x49\x46\x5D\x20\x65\x76\x61\x6C\x20\x65\x72\x72\x6F\x72","\x73\x74\x72\x69\x6E\x67\x69\x66\x79"];_0xa1c2[0];var schema=require(_0xa1c2[1]);var _=require(_0xa1c2[2]);var utils=require(_0xa1c2[3]);var logger=require(_0xa1c2[5])(_0xa1c2[4]);var gotoif=schema({condition:{type:_0xa1c2[6],required:true,message:_0xa1c2[7]},priorityTrue:{type:_0xa1c2[8],message:_0xa1c2[9]},priorityFalse:{type:_0xa1c2[8],message:_0xa1c2[10]}});exports[_0xa1c2[11]]= function(_0x690cx6,_0x690cx7){return function(_0x690cx8){try{var _0x690cx9={condition:utils[_0xa1c2[12]](_0x690cx7[0],this),priorityTrue:_0x690cx7[1],priorityFalse:_0x690cx7[2]};var _0x690cxa=gotoif[_0xa1c2[1]](_0x690cx9,{typecast:true});if(_0x690cxa[_0xa1c2[13]]){logger[_0xa1c2[19]](_0xa1c2[14],_0x690cx6,_[_0xa1c2[18]](_0x690cxa,_0xa1c2[17])[_0xa1c2[16]](_0xa1c2[15]));_0x690cx8[_0xa1c2[20]]()}else {try{var _0x690cxb=eval(_0xa1c2[21]+ _0x690cx9[_0xa1c2[22]]+ _0xa1c2[23]);var _0x690cxc=_0x690cxb?_0x690cx9[_0xa1c2[24]]:_0x690cx9[_0xa1c2[25]];logger[_0xa1c2[28]](_0xa1c2[26],_0x690cx6,_0x690cx9[_0xa1c2[22]],_0x690cxb,_0x690cxc|| _0xa1c2[27]);if(_0x690cxc){var _0x690cxd=_[_0xa1c2[30]](_0x690cx8[_0xa1c2[29]](),{p:_0x690cxc});if(_0x690cxd>= 0){logger[_0xa1c2[28]](_0xa1c2[31],_0x690cx6,_0x690cxc|| _0xa1c2[27],_0x690cxd);_0x690cx8[_0xa1c2[27]](_0x690cxd)}else {logger[_0xa1c2[28]](_0xa1c2[32],_0x690cx6,_0x690cxc|| _0xa1c2[27]);_0x690cx8[_0xa1c2[20]]()}}else {_0x690cx8[_0xa1c2[27]]()}}catch(e){logger[_0xa1c2[19]](_0xa1c2[33],_0x690cx6);_0x690cx8[_0xa1c2[20]]()}}}catch(e){logger[_0xa1c2[19]](_0xa1c2[14],_0x690cx6,JSON[_0xa1c2[34]](e));_0x690cx8[_0xa1c2[20]]()}}}
\ No newline at end of file
index fbb26ae..3bcdbf7 100644 (file)
@@ -1 +1 @@
-var _0x8747=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x76\x61\x6C\x69\x64\x61\x74\x65","\x6C\x6F\x64\x61\x73\x68","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6E\x75\x6D\x62\x65\x72","\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x69\x73\x20\x61\x20\x6E\x75\x6D\x62\x65\x72\x20\x61\x6E\x64\x20\x69\x74\x20\x69\x73\x20\x72\x65\x71\x75\x69\x72\x65\x64","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x6C\x65\x6E\x67\x74\x68","\x5B\x25\x73\x5D\x5B\x47\x4F\x54\x4F\x50\x5D\x20\x25\x73","\x2C\x20","\x6A\x6F\x69\x6E","\x6D\x65\x73\x73\x61\x67\x65","\x6D\x61\x70","\x65\x72\x72\x6F\x72","\x73\x74\x6F\x70","\x5B\x25\x73\x5D\x5B\x47\x4F\x54\x4F\x50\x5D\x20\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x25\x73","\x70\x72\x69\x6F\x72\x69\x74\x79","\x69\x6E\x66\x6F","\x72\x75\x6C\x65\x73","\x66\x69\x6E\x64\x49\x6E\x64\x65\x78","\x5B\x25\x73\x5D\x5B\x47\x4F\x54\x4F\x50\x5D\x20\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x25\x73\x20\x66\x6F\x75\x6E\x64\x20\x61\x74\x20\x69\x6E\x64\x65\x78\x3A\x20\x25\x73","\x6E\x65\x78\x74","\x5B\x25\x73\x5D\x5B\x47\x4F\x54\x4F\x50\x5D\x20\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x25\x73\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x73\x74\x72\x69\x6E\x67\x69\x66\x79"];_0x8747[0];var schema=require(_0x8747[1]);var _=require(_0x8747[2]);var logger=require(_0x8747[4])(_0x8747[3]);var gotop=schema({priority:{type:_0x8747[5],required:true,message:_0x8747[6]}});exports[_0x8747[7]]= function(_0x7bf3x5,_0x7bf3x6){return function(_0x7bf3x7){try{var _0x7bf3x8={priority:_0x7bf3x6[0]};var _0x7bf3x9=gotop[_0x8747[1]](_0x7bf3x8,{typecast:true});if(_0x7bf3x9[_0x8747[8]]){logger[_0x8747[14]](_0x8747[9],_0x7bf3x5,_[_0x8747[13]](_0x7bf3x9,_0x8747[12])[_0x8747[11]](_0x8747[10]));_0x7bf3x7[_0x8747[15]]()}else {logger[_0x8747[18]](_0x8747[16],_0x7bf3x5,_0x7bf3x8[_0x8747[17]]);if(_0x7bf3x8[_0x8747[17]]){var _0x7bf3xa=_[_0x8747[20]](_0x7bf3x7[_0x8747[19]](),{p:_0x7bf3x8[_0x8747[17]]});if(_0x7bf3xa>= 0){logger[_0x8747[18]](_0x8747[21],_0x7bf3x5,_0x7bf3x8[_0x8747[17]]|| _0x8747[22],_0x7bf3xa);_0x7bf3x7[_0x8747[22]](_0x7bf3xa)}else {logger[_0x8747[18]](_0x8747[23],_0x7bf3x5,_0x7bf3x8[_0x8747[17]]|| _0x8747[22]);_0x7bf3x7[_0x8747[15]]()}}else {_0x7bf3x7[_0x8747[22]]()}}}catch(e){logger[_0x8747[14]](_0x8747[9],_0x7bf3x5,JSON[_0x8747[24]](e));_0x7bf3x7[_0x8747[15]]()}}}
\ No newline at end of file
+var _0xde6d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x76\x61\x6C\x69\x64\x61\x74\x65","\x6C\x6F\x64\x61\x73\x68","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6E\x75\x6D\x62\x65\x72","\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x69\x73\x20\x61\x20\x6E\x75\x6D\x62\x65\x72\x20\x61\x6E\x64\x20\x69\x74\x20\x69\x73\x20\x72\x65\x71\x75\x69\x72\x65\x64","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x6C\x65\x6E\x67\x74\x68","\x5B\x25\x73\x5D\x5B\x47\x4F\x54\x4F\x50\x5D\x20\x25\x73","\x2C\x20","\x6A\x6F\x69\x6E","\x6D\x65\x73\x73\x61\x67\x65","\x6D\x61\x70","\x65\x72\x72\x6F\x72","\x73\x74\x6F\x70","\x5B\x25\x73\x5D\x5B\x47\x4F\x54\x4F\x50\x5D\x20\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x25\x73","\x70\x72\x69\x6F\x72\x69\x74\x79","\x69\x6E\x66\x6F","\x72\x75\x6C\x65\x73","\x66\x69\x6E\x64\x49\x6E\x64\x65\x78","\x5B\x25\x73\x5D\x5B\x47\x4F\x54\x4F\x50\x5D\x20\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x25\x73\x20\x66\x6F\x75\x6E\x64\x20\x61\x74\x20\x69\x6E\x64\x65\x78\x3A\x20\x25\x73","\x6E\x65\x78\x74","\x5B\x25\x73\x5D\x5B\x47\x4F\x54\x4F\x50\x5D\x20\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x25\x73\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x73\x74\x72\x69\x6E\x67\x69\x66\x79"];_0xde6d[0];var schema=require(_0xde6d[1]);var _=require(_0xde6d[2]);var logger=require(_0xde6d[4])(_0xde6d[3]);var gotop=schema({priority:{type:_0xde6d[5],required:true,message:_0xde6d[6]}});exports[_0xde6d[7]]= function(_0x14c7x5,_0x14c7x6){return function(_0x14c7x7){try{var _0x14c7x8={priority:_0x14c7x6[0]};var _0x14c7x9=gotop[_0xde6d[1]](_0x14c7x8,{typecast:true});if(_0x14c7x9[_0xde6d[8]]){logger[_0xde6d[14]](_0xde6d[9],_0x14c7x5,_[_0xde6d[13]](_0x14c7x9,_0xde6d[12])[_0xde6d[11]](_0xde6d[10]));_0x14c7x7[_0xde6d[15]]()}else {logger[_0xde6d[18]](_0xde6d[16],_0x14c7x5,_0x14c7x8[_0xde6d[17]]);if(_0x14c7x8[_0xde6d[17]]){var _0x14c7xa=_[_0xde6d[20]](_0x14c7x7[_0xde6d[19]](),{p:_0x14c7x8[_0xde6d[17]]});if(_0x14c7xa>= 0){logger[_0xde6d[18]](_0xde6d[21],_0x14c7x5,_0x14c7x8[_0xde6d[17]]|| _0xde6d[22],_0x14c7xa);_0x14c7x7[_0xde6d[22]](_0x14c7xa)}else {logger[_0xde6d[18]](_0xde6d[23],_0x14c7x5,_0x14c7x8[_0xde6d[17]]|| _0xde6d[22]);_0x14c7x7[_0xde6d[15]]()}}else {_0x14c7x7[_0xde6d[22]]()}}}catch(e){logger[_0xde6d[14]](_0xde6d[9],_0x14c7x5,JSON[_0xde6d[24]](e));_0x14c7x7[_0xde6d[15]]()}}}
\ No newline at end of file
index 8530a46..3adf897 100644 (file)
@@ -1 +1 @@
-var _0x5ac9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2F\x75\x74\x69\x6C\x73","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x67\x65\x74\x4D\x75\x73\x74\x61\x63\x68\x65\x52\x65\x6E\x64\x65\x72","\x69\x64","\x63\x6F\x6E\x74\x61\x63\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x68\x61\x74","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x61\x63\x63\x6F\x75\x6E\x74","\x75\x70\x70\x65\x72\x46\x69\x72\x73\x74","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x4D\x65\x73\x73\x61\x67\x65","\x5B\x25\x73\x5D\x5B\x4D\x45\x53\x53\x41\x47\x45\x5D\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x65\x72\x72\x6F\x72","\x73\x74\x6F\x70","\x63\x61\x74\x63\x68","\x62\x6F\x64\x79","\x69\x6E\x66\x6F","\x6E\x65\x78\x74","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65"];_0x5ac9[0];var _=require(_0x5ac9[1]);var utils=require(_0x5ac9[2]);var logger=require(_0x5ac9[4])(_0x5ac9[3]);var rpc={chatMessage:require(_0x5ac9[5]),openchannelMessage:require(_0x5ac9[6]),mailMessage:require(_0x5ac9[7]),smsMessage:require(_0x5ac9[8]),faxMessage:require(_0x5ac9[9])};exports[_0x5ac9[10]]= function(_0x4832x5,_0x4832x6){return function(_0x4832x7){try{var _0x4832x8={body:utils[_0x5ac9[11]](_0x4832x6[0],this),ContactId:this[_0x5ac9[13]][_0x5ac9[12]]};if(this[_0x5ac9[14]]=== _0x5ac9[15]){_0x4832x8[_0x5ac9[16]]= this[_0x5ac9[17]][_0x5ac9[12]]}else {_0x4832x8[_[_0x5ac9[18]](this[_0x5ac9[14]])+ _0x5ac9[19]]= this[_0x5ac9[17]][_0x5ac9[12]]};_0x4832x8[_[_0x5ac9[18]](this[_0x5ac9[14]])+ _0x5ac9[20]]= this[_0x5ac9[21]][_0x5ac9[12]];if(rpc[this[_0x5ac9[14]]+ _0x5ac9[22]]){return rpc[this[_0x5ac9[14]]+ _0x5ac9[22]][_0x5ac9[32]](_0x4832x8)[_0x5ac9[31]](function(_0x4832xa){logger[_0x5ac9[29]](_0x5ac9[23],_0x4832x5,_0x4832x8[_0x5ac9[28]]);_0x4832x7[_0x5ac9[30]]()})[_0x5ac9[27]](function(_0x4832x9){logger[_0x5ac9[25]](_0x5ac9[23],_0x4832x5,JSON[_0x5ac9[24]](_0x4832x9));_0x4832x7[_0x5ac9[26]]()})}}catch(e){logger[_0x5ac9[25]](_0x5ac9[23],_0x4832x5,JSON[_0x5ac9[24]](e));_0x4832x7[_0x5ac9[26]]()}}}
\ No newline at end of file
+var _0x2eea=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2F\x75\x74\x69\x6C\x73","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x73\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x67\x65\x74\x4D\x75\x73\x74\x61\x63\x68\x65\x52\x65\x6E\x64\x65\x72","\x69\x64","\x63\x6F\x6E\x74\x61\x63\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x68\x61\x74","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x61\x63\x63\x6F\x75\x6E\x74","\x75\x70\x70\x65\x72\x46\x69\x72\x73\x74","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x4D\x65\x73\x73\x61\x67\x65","\x5B\x25\x73\x5D\x5B\x4D\x45\x53\x53\x41\x47\x45\x5D\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x65\x72\x72\x6F\x72","\x73\x74\x6F\x70","\x63\x61\x74\x63\x68","\x62\x6F\x64\x79","\x69\x6E\x66\x6F","\x6E\x65\x78\x74","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65"];_0x2eea[0];var _=require(_0x2eea[1]);var utils=require(_0x2eea[2]);var logger=require(_0x2eea[4])(_0x2eea[3]);var rpc={chatMessage:require(_0x2eea[5]),openchannelMessage:require(_0x2eea[6]),mailMessage:require(_0x2eea[7]),smsMessage:require(_0x2eea[8]),faxMessage:require(_0x2eea[9])};exports[_0x2eea[10]]= function(_0x2fe8x5,_0x2fe8x6){return function(_0x2fe8x7){try{var _0x2fe8x8={body:utils[_0x2eea[11]](_0x2fe8x6[0],this),ContactId:this[_0x2eea[13]][_0x2eea[12]]};if(this[_0x2eea[14]]=== _0x2eea[15]){_0x2fe8x8[_0x2eea[16]]= this[_0x2eea[17]][_0x2eea[12]]}else {_0x2fe8x8[_[_0x2eea[18]](this[_0x2eea[14]])+ _0x2eea[19]]= this[_0x2eea[17]][_0x2eea[12]]};_0x2fe8x8[_[_0x2eea[18]](this[_0x2eea[14]])+ _0x2eea[20]]= this[_0x2eea[21]][_0x2eea[12]];if(rpc[this[_0x2eea[14]]+ _0x2eea[22]]){return rpc[this[_0x2eea[14]]+ _0x2eea[22]][_0x2eea[32]](_0x2fe8x8)[_0x2eea[31]](function(_0x2fe8xa){logger[_0x2eea[29]](_0x2eea[23],_0x2fe8x5,_0x2fe8x8[_0x2eea[28]]);_0x2fe8x7[_0x2eea[30]]()})[_0x2eea[27]](function(_0x2fe8x9){logger[_0x2eea[25]](_0x2eea[23],_0x2fe8x5,JSON[_0x2eea[24]](_0x2fe8x9));_0x2fe8x7[_0x2eea[26]]()})}}catch(e){logger[_0x2eea[25]](_0x2eea[23],_0x2fe8x5,JSON[_0x2eea[24]](e));_0x2fe8x7[_0x2eea[26]]()}}}
\ No newline at end of file
index bdc7f20..2b5103e 100644 (file)
@@ -1 +1 @@
-var _0x9658=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x74\x69\x6C\x73","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x5B\x25\x73\x5D\x5B\x4E\x4F\x4F\x50\x5D\x20\x25\x73","\x67\x65\x74\x4D\x75\x73\x74\x61\x63\x68\x65\x52\x65\x6E\x64\x65\x72","\x69\x6E\x66\x6F","\x6E\x65\x78\x74","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x65\x72\x72\x6F\x72","\x73\x74\x6F\x70"];_0x9658[0];var utils=require(_0x9658[1]);var logger=require(_0x9658[3])(_0x9658[2]);exports[_0x9658[4]]= function(_0xbc3ax3,_0xbc3ax4){return function(_0xbc3ax5){try{logger[_0x9658[7]](_0x9658[5],_0xbc3ax3,utils[_0x9658[6]](_0xbc3ax4[0],this));_0xbc3ax5[_0x9658[8]]()}catch(e){logger[_0x9658[10]](_0x9658[5],_0xbc3ax3,JSON[_0x9658[9]](e));_0xbc3ax5[_0x9658[11]]()}}}
\ No newline at end of file
+var _0x77c6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x74\x69\x6C\x73","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x5B\x25\x73\x5D\x5B\x4E\x4F\x4F\x50\x5D\x20\x25\x73","\x67\x65\x74\x4D\x75\x73\x74\x61\x63\x68\x65\x52\x65\x6E\x64\x65\x72","\x69\x6E\x66\x6F","\x6E\x65\x78\x74","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x65\x72\x72\x6F\x72","\x73\x74\x6F\x70"];_0x77c6[0];var utils=require(_0x77c6[1]);var logger=require(_0x77c6[3])(_0x77c6[2]);exports[_0x77c6[4]]= function(_0x8b24x3,_0x8b24x4){return function(_0x8b24x5){try{logger[_0x77c6[7]](_0x77c6[5],_0x8b24x3,utils[_0x77c6[6]](_0x8b24x4[0],this));_0x8b24x5[_0x77c6[8]]()}catch(e){logger[_0x77c6[10]](_0x77c6[5],_0x8b24x3,JSON[_0x77c6[9]](e));_0x8b24x5[_0x77c6[11]]()}}}
\ No newline at end of file
index 7f2cc31..8b44924 100644 (file)
@@ -1 +1 @@
-var _0xfe6e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x76\x61\x6C\x69\x64\x61\x74\x65","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x65\x71\x2D\x71\x75\x65\x75\x65","\x6D\x6F\x6D\x65\x6E\x74","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2F\x73\x74\x72\x61\x74\x65\x67\x79","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x69\x64","\x61\x63\x63\x6F\x75\x6E\x74","\x71\x75\x65\x75\x65","\x66\x72\x6F\x6D","\x6A\x6F\x69\x6E\x41\x74","\x65\x6D\x69\x74","\x25\x73\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x66\x6F\x72\x6D\x61\x74","\x70\x69\x63\x6B","\x25\x73\x5F\x71\x75\x65\x75\x65\x5F\x77\x61\x69\x74\x69\x6E\x67\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x25\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x73\x74\x72\x69\x6E\x67","\x6E\x61\x6D\x65\x20\x69\x73\x20\x61\x20\x73\x74\x72\x69\x6E\x67\x20\x61\x6E\x64\x20\x69\x74\x20\x69\x73\x20\x72\x65\x71\x75\x69\x72\x65\x64","\x6E\x75\x6D\x62\x65\x72","\x74\x69\x6D\x65\x6F\x75\x74\x20\x69\x73\x20\x61\x20\x6E\x75\x6D\x62\x65\x72","\x77\x61\x69\x74\x69\x6E\x67","\x62\x6F\x64\x79","","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x63\x6F\x6E\x74\x61\x63\x74","\x6C\x69\x73\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x75\x70\x70\x65\x72\x46\x69\x72\x73\x74","\x51\x75\x65\x75\x65\x49\x64","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x4D\x65\x73\x73\x61\x67\x65\x49\x64","\x6D\x65\x73\x73\x61\x67\x65","\x63\x68\x61\x74","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x5B\x25\x73\x5D\x5B\x53\x54\x41\x52\x54\x3A\x51\x55\x45\x55\x45\x5D\x5B\x4E\x41\x4D\x45\x3A\x25\x73\x5D","\x6E\x61\x6D\x65","\x69\x6E\x66\x6F","\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x63\x72\x65\x61\x74\x65\x20\x71\x75\x65\x75\x65\x20\x72\x65\x70\x6F\x72\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x63\x72\x65\x61\x74\x65","\x61\x63\x63\x65\x70\x74\x65\x64","\x5B\x25\x73\x5D\x5B\x53\x54\x4F\x50\x3A\x51\x55\x45\x55\x45\x5D\x5B\x4E\x41\x4D\x45\x3A\x25\x73\x5D","\x75\x70\x64\x61\x74\x65\x20\x71\x75\x65\x75\x65\x20\x72\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x5B\x25\x73\x5D\x5B\x45\x4E\x44\x3A\x51\x55\x45\x55\x45\x5D\x5B\x4E\x41\x4D\x45\x3A\x25\x73\x5D","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x6C\x65\x6E\x67\x74\x68","\x5B\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x5D\x20\x25\x73","\x2C\x20","\x6A\x6F\x69\x6E","\x6D\x61\x70","\x73\x74\x6F\x70","\x51\x75\x65\x75\x65\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65\x51\x75\x65\x75\x65","\x61\x74\x69\x6D\x65\x6F\x75\x74","\x71\x74\x69\x6D\x65\x6F\x75\x74","\x72\x75\x6C\x65\x73","\x63\x6C\x6F\x73\x65","\x6E\x65\x78\x74","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x73\x74\x72\x61\x74\x65\x67\x79","\x5B\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x5D\x20\x71\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x25\x73","\x6C\x6F\x67","\x73\x74\x72\x69\x6E\x67\x69\x66\x79"];_0xfe6e[0];var schema=require(_0xfe6e[1]);var _=require(_0xfe6e[2]);var util=require(_0xfe6e[3]);var seqqueue=require(_0xfe6e[4]);var moment=require(_0xfe6e[5]);var logger=require(_0xfe6e[7])(_0xfe6e[6]);var strategy=require(_0xfe6e[8]);var io=require(_0xfe6e[10])({host:_0xfe6e[9],port:6379});var attributes=[_0xfe6e[11],_0xfe6e[12],_0xfe6e[13],_0xfe6e[14],_0xfe6e[15]];function emit(_0x4960xb,_0x4960xc){io[_0xfe6e[16]](_0x4960xb,_0x4960xc)}function emitChannelQueueInteraction(_0x4960xe,queue,_0x4960xc,_0x4960x10,_0x4960x11,_0x4960x12,_0x4960x13){_0x4960xc[_0xfe6e[13]]= queue;_0x4960xc[_0xfe6e[12]]= _0x4960x10;_0x4960xc[_0xfe6e[11]]= _0x4960x11;if(_0x4960x12){_0x4960x13[util[_0xfe6e[18]](_0xfe6e[17],_0x4960xe)][_0x4960x11]= _[_0xfe6e[19]](_0x4960xc,attributes)}else {delete _0x4960x13[util[_0xfe6e[18]](_0xfe6e[17],_0x4960xe)][_0x4960x11]};emit(util[_0xfe6e[18]](_0xfe6e[20],_0x4960xe,_0x4960x12?_0xfe6e[21]:_0xfe6e[22]),_[_0xfe6e[19]](_0x4960xc,attributes))}var rpc={openchannelQueueReport:require(_0xfe6e[23]),mailQueueReport:require(_0xfe6e[24]),chatQueueReport:require(_0xfe6e[25]),smsQueueReport:require(_0xfe6e[26]),faxQueueReport:require(_0xfe6e[27])};var queue=schema({name:{type:_0xfe6e[28],required:true,message:_0xfe6e[29]},timeout:{type:_0xfe6e[30],message:_0xfe6e[31]}});function startRouting(_0x4960x11,queue,_0x4960x16,_0x4960x13){if(_0x4960x11&& queue&& _0x4960x16){queue[_0xfe6e[32]]+= 1;var _0x4960x17={uniqueid:_0x4960x11,from:_0x4960x16[_0xfe6e[33]]?_0x4960x16[_0xfe6e[33]][_0xfe6e[14]]:_0xfe6e[34],joinAt:moment()[_0xfe6e[18]](_0xfe6e[35]),ContactId:_0x4960x16[_0xfe6e[36]]?_0x4960x16[_0xfe6e[36]][_0xfe6e[11]]:null,ListId:_0x4960x16[_0xfe6e[37]]?_0x4960x16[_0xfe6e[37]][_0xfe6e[11]]:null};_0x4960x17[_[_0xfe6e[39]](_0x4960x16[_0xfe6e[38]])+ _0xfe6e[40]]= queue[_0xfe6e[11]]|| null;_0x4960x17[_[_0xfe6e[39]](_0x4960x16[_0xfe6e[38]])+ _0xfe6e[41]]= _0x4960x16[_0xfe6e[42]]?_0x4960x16[_0xfe6e[42]][_0xfe6e[11]]:null;_0x4960x17[_[_0xfe6e[39]](_0x4960x16[_0xfe6e[38]])+ _0xfe6e[43]]= _0x4960x16[_0xfe6e[44]]?_0x4960x16[_0xfe6e[44]][_0xfe6e[11]]:null;_0x4960x17[_[_0xfe6e[39]](_0x4960x16[_0xfe6e[38]])+ (_0x4960x16[_0xfe6e[38]]!== _0xfe6e[45]?_0xfe6e[46]:_0xfe6e[47])]= _0x4960x16[_0xfe6e[12]]?_0x4960x16[_0xfe6e[12]][_0xfe6e[11]]:null;logger[_0xfe6e[50]](util[_0xfe6e[18]](_0xfe6e[48],_0x4960x11,queue[_0xfe6e[49]]));emitChannelQueueInteraction(_0x4960x16[_0xfe6e[38]],queue[_0xfe6e[49]],_0x4960x17,_0x4960x16[_0xfe6e[12]][_0xfe6e[49]],_0x4960x16[_0xfe6e[44]][_0xfe6e[11]],true,_0x4960x13);if(rpc[_0x4960x16[_0xfe6e[38]]+ _0xfe6e[51]]){return rpc[_0x4960x16[_0xfe6e[38]]+ _0xfe6e[51]][_0xfe6e[55]](_0x4960x17)[_0xfe6e[54]](function(_0x4960x18){logger[_0xfe6e[53]](_0xfe6e[52])})}}}function stopRouting(_0x4960x11,queue,_0x4960x16,_0x4960x13){if(_0x4960x11&& queue){queue[_0xfe6e[32]]-= 1;var _0x4960x17={leaveAt:moment()[_0xfe6e[18]](_0xfe6e[35]),acceptAt:moment()[_0xfe6e[18]](_0xfe6e[35]),reason:_0xfe6e[56]};logger[_0xfe6e[50]](util[_0xfe6e[18]](_0xfe6e[57],_0x4960x11,queue[_0xfe6e[49]]));emitChannelQueueInteraction(_0x4960x16[_0xfe6e[38]],queue[_0xfe6e[49]],_0x4960x16[_0xfe6e[33]],_0x4960x16[_0xfe6e[12]][_0xfe6e[49]],_0x4960x16[_0xfe6e[44]][_0xfe6e[11]],false,_0x4960x13);if(rpc[_0x4960x16[_0xfe6e[38]]+ _0xfe6e[51]]){return rpc[_0x4960x16[_0xfe6e[38]]+ _0xfe6e[51]][_0xfe6e[59]](_0x4960x11,_0x4960x17)[_0xfe6e[54]](function(_0x4960x18){logger[_0xfe6e[53]](_0xfe6e[58])})}}}function endRouting(_0x4960x11,queue,_0x4960x16,_0x4960x13){if(_0x4960x11&& queue){queue[_0xfe6e[32]]-= 1;var _0x4960x17={leaveAt:moment()[_0xfe6e[18]](_0xfe6e[35]),exitAt:moment()[_0xfe6e[18]](_0xfe6e[35]),reason:_0xfe6e[60]};logger[_0xfe6e[50]](util[_0xfe6e[18]](_0xfe6e[61],_0x4960x11,queue[_0xfe6e[49]]));emitChannelQueueInteraction(_0x4960x16[_0xfe6e[38]],queue[_0xfe6e[49]],_0x4960x16[_0xfe6e[33]],_0x4960x16[_0xfe6e[12]][_0xfe6e[49]],_0x4960x16[_0xfe6e[44]][_0xfe6e[11]],false,_0x4960x13);if(rpc[_0x4960x16[_0xfe6e[38]]+ _0xfe6e[51]]){return rpc[_0x4960x16[_0xfe6e[38]]+ _0xfe6e[51]][_0xfe6e[59]](_0x4960x11,_0x4960x17)[_0xfe6e[54]](function(_0x4960x18){logger[_0xfe6e[53]](_0xfe6e[58])})}}}function handleFindQueue(_0x4960x10){return function(_0x4960x1c){return _0x4960x1c[_0xfe6e[49]][_0xfe6e[62]]()=== _0x4960x10[_0xfe6e[62]]()}}exports[_0xfe6e[63]]= function(_0x4960x11,_0x4960x1d,_0x4960x13,_0x4960x16){return function(_0x4960x1e){try{var _0x4960xc={name:_0x4960x1d[0],timeout:_0x4960x1d[1]};var _0x4960x1f=queue[_0xfe6e[1]](_0x4960xc,{typecast:true});if(_0x4960x1f[_0xfe6e[64]]){logger[_0xfe6e[53]](_0xfe6e[65],_0x4960x11,_[_0xfe6e[68]](_0x4960x1f,_0xfe6e[44])[_0xfe6e[67]](_0xfe6e[66]));_0x4960x1e[_0xfe6e[69]]()}else {var _0x4960x20=_[_0xfe6e[71]](_0x4960x13[_0x4960x16[_0xfe6e[38]]+ _0xfe6e[70]],handleFindQueue(_0x4960xc[_0xfe6e[49]]));if(_0x4960x20){startRouting(_0x4960x11,_0x4960x20,_0x4960x16,_0x4960x13);var _0x4960x21=(_0x4960x20[_0xfe6e[60]]|| 10)* 1000;var _0x4960x22=(_0x4960xc[_0xfe6e[60]]|| 20)* 1000;var _0x4960x23,_0x4960x24;if(_0x4960x21> _0x4960x22){_0x4960x22= _0x4960x21};var _0x4960x25=seqqueue[_0xfe6e[72]](_0x4960x21);_0x4960x25[_0xfe6e[11]]= _0x4960x11;_0x4960x25[_0xfe6e[73]]= _0x4960x21;_0x4960x25[_0xfe6e[74]]= _0x4960x22;_0x4960x25[_0xfe6e[38]]= _0x4960x16[_0xfe6e[38]];_0x4960x24= setInterval(function(){if(_0x4960x13[_0xfe6e[75]]&&  !_0x4960x13[_0xfe6e[75]][_0x4960x11]){stopRouting(_0x4960x11,_0x4960x20,_0x4960x16,_0x4960x13);clearTimeout(_0x4960x23);clearInterval(_0x4960x24);_0x4960x23= undefined;_0x4960x25[_0xfe6e[76]](true);_0x4960x1e[_0xfe6e[69]]()}},1000);_0x4960x23= setTimeout(function(){endRouting(_0x4960x11,_0x4960x20,_0x4960x16,_0x4960x13);clearInterval(_0x4960x24);_0x4960x24= undefined;_0x4960x25[_0xfe6e[76]](true);_0x4960x1e[_0xfe6e[77]]()},_0x4960x22);switch(_0x4960x20[_0xfe6e[80]]){case _0xfe6e[78]:strategy[_0xfe6e[78]](_0x4960x25,_0x4960x20,_0x4960x13,_0x4960x16);break;default:strategy[_0xfe6e[79]](_0x4960x25,_0x4960x20,_0x4960x13,_0x4960x16)}}else {logger[_0xfe6e[53]](_0xfe6e[81],_0x4960x11,_0x4960xc[_0xfe6e[49]]);_0x4960x1e[_0xfe6e[69]]()}}}catch(e){console[_0xfe6e[82]](e);logger[_0xfe6e[53]](_0xfe6e[65],_0x4960x11,JSON[_0xfe6e[83]](e));_0x4960x1e[_0xfe6e[69]]()}}}
\ No newline at end of file
+var _0xdc98=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x76\x61\x6C\x69\x64\x61\x74\x65","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x65\x71\x2D\x71\x75\x65\x75\x65","\x6D\x6F\x6D\x65\x6E\x74","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2F\x73\x74\x72\x61\x74\x65\x67\x79","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x69\x64","\x61\x63\x63\x6F\x75\x6E\x74","\x71\x75\x65\x75\x65","\x66\x72\x6F\x6D","\x6A\x6F\x69\x6E\x41\x74","\x65\x6D\x69\x74","\x25\x73\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x66\x6F\x72\x6D\x61\x74","\x70\x69\x63\x6B","\x25\x73\x5F\x71\x75\x65\x75\x65\x5F\x77\x61\x69\x74\x69\x6E\x67\x5F\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x3A\x25\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x73\x74\x72\x69\x6E\x67","\x6E\x61\x6D\x65\x20\x69\x73\x20\x61\x20\x73\x74\x72\x69\x6E\x67\x20\x61\x6E\x64\x20\x69\x74\x20\x69\x73\x20\x72\x65\x71\x75\x69\x72\x65\x64","\x6E\x75\x6D\x62\x65\x72","\x74\x69\x6D\x65\x6F\x75\x74\x20\x69\x73\x20\x61\x20\x6E\x75\x6D\x62\x65\x72","\x77\x61\x69\x74\x69\x6E\x67","\x62\x6F\x64\x79","","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x63\x6F\x6E\x74\x61\x63\x74","\x6C\x69\x73\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x75\x70\x70\x65\x72\x46\x69\x72\x73\x74","\x51\x75\x65\x75\x65\x49\x64","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x49\x64","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x4D\x65\x73\x73\x61\x67\x65\x49\x64","\x6D\x65\x73\x73\x61\x67\x65","\x63\x68\x61\x74","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x5B\x25\x73\x5D\x5B\x53\x54\x41\x52\x54\x3A\x51\x55\x45\x55\x45\x5D\x5B\x4E\x41\x4D\x45\x3A\x25\x73\x5D","\x6E\x61\x6D\x65","\x69\x6E\x66\x6F","\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x63\x72\x65\x61\x74\x65\x20\x71\x75\x65\x75\x65\x20\x72\x65\x70\x6F\x72\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x63\x72\x65\x61\x74\x65","\x61\x63\x63\x65\x70\x74\x65\x64","\x5B\x25\x73\x5D\x5B\x53\x54\x4F\x50\x3A\x51\x55\x45\x55\x45\x5D\x5B\x4E\x41\x4D\x45\x3A\x25\x73\x5D","\x75\x70\x64\x61\x74\x65\x20\x71\x75\x65\x75\x65\x20\x72\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x5B\x25\x73\x5D\x5B\x45\x4E\x44\x3A\x51\x55\x45\x55\x45\x5D\x5B\x4E\x41\x4D\x45\x3A\x25\x73\x5D","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x6C\x65\x6E\x67\x74\x68","\x5B\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x5D\x20\x25\x73","\x2C\x20","\x6A\x6F\x69\x6E","\x6D\x61\x70","\x73\x74\x6F\x70","\x51\x75\x65\x75\x65\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65\x51\x75\x65\x75\x65","\x61\x74\x69\x6D\x65\x6F\x75\x74","\x71\x74\x69\x6D\x65\x6F\x75\x74","\x72\x75\x6C\x65\x73","\x63\x6C\x6F\x73\x65","\x6E\x65\x78\x74","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x73\x74\x72\x61\x74\x65\x67\x79","\x5B\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x5D\x20\x71\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x25\x73","\x6C\x6F\x67","\x73\x74\x72\x69\x6E\x67\x69\x66\x79"];_0xdc98[0];var schema=require(_0xdc98[1]);var _=require(_0xdc98[2]);var util=require(_0xdc98[3]);var seqqueue=require(_0xdc98[4]);var moment=require(_0xdc98[5]);var logger=require(_0xdc98[7])(_0xdc98[6]);var strategy=require(_0xdc98[8]);var io=require(_0xdc98[10])({host:_0xdc98[9],port:6379});var attributes=[_0xdc98[11],_0xdc98[12],_0xdc98[13],_0xdc98[14],_0xdc98[15]];function emit(_0xb053xb,_0xb053xc){io[_0xdc98[16]](_0xb053xb,_0xb053xc)}function emitChannelQueueInteraction(_0xb053xe,queue,_0xb053xc,_0xb053x10,_0xb053x11,_0xb053x12,_0xb053x13){_0xb053xc[_0xdc98[13]]= queue;_0xb053xc[_0xdc98[12]]= _0xb053x10;_0xb053xc[_0xdc98[11]]= _0xb053x11;if(_0xb053x12){_0xb053x13[util[_0xdc98[18]](_0xdc98[17],_0xb053xe)][_0xb053x11]= _[_0xdc98[19]](_0xb053xc,attributes)}else {delete _0xb053x13[util[_0xdc98[18]](_0xdc98[17],_0xb053xe)][_0xb053x11]};emit(util[_0xdc98[18]](_0xdc98[20],_0xb053xe,_0xb053x12?_0xdc98[21]:_0xdc98[22]),_[_0xdc98[19]](_0xb053xc,attributes))}var rpc={openchannelQueueReport:require(_0xdc98[23]),mailQueueReport:require(_0xdc98[24]),chatQueueReport:require(_0xdc98[25]),smsQueueReport:require(_0xdc98[26]),faxQueueReport:require(_0xdc98[27])};var queue=schema({name:{type:_0xdc98[28],required:true,message:_0xdc98[29]},timeout:{type:_0xdc98[30],message:_0xdc98[31]}});function startRouting(_0xb053x11,queue,_0xb053x16,_0xb053x13){if(_0xb053x11&& queue&& _0xb053x16){queue[_0xdc98[32]]+= 1;var _0xb053x17={uniqueid:_0xb053x11,from:_0xb053x16[_0xdc98[33]]?_0xb053x16[_0xdc98[33]][_0xdc98[14]]:_0xdc98[34],joinAt:moment()[_0xdc98[18]](_0xdc98[35]),ContactId:_0xb053x16[_0xdc98[36]]?_0xb053x16[_0xdc98[36]][_0xdc98[11]]:null,ListId:_0xb053x16[_0xdc98[37]]?_0xb053x16[_0xdc98[37]][_0xdc98[11]]:null};_0xb053x17[_[_0xdc98[39]](_0xb053x16[_0xdc98[38]])+ _0xdc98[40]]= queue[_0xdc98[11]]|| null;_0xb053x17[_[_0xdc98[39]](_0xb053x16[_0xdc98[38]])+ _0xdc98[41]]= _0xb053x16[_0xdc98[42]]?_0xb053x16[_0xdc98[42]][_0xdc98[11]]:null;_0xb053x17[_[_0xdc98[39]](_0xb053x16[_0xdc98[38]])+ _0xdc98[43]]= _0xb053x16[_0xdc98[44]]?_0xb053x16[_0xdc98[44]][_0xdc98[11]]:null;_0xb053x17[_[_0xdc98[39]](_0xb053x16[_0xdc98[38]])+ (_0xb053x16[_0xdc98[38]]!== _0xdc98[45]?_0xdc98[46]:_0xdc98[47])]= _0xb053x16[_0xdc98[12]]?_0xb053x16[_0xdc98[12]][_0xdc98[11]]:null;logger[_0xdc98[50]](util[_0xdc98[18]](_0xdc98[48],_0xb053x11,queue[_0xdc98[49]]));emitChannelQueueInteraction(_0xb053x16[_0xdc98[38]],queue[_0xdc98[49]],_0xb053x17,_0xb053x16[_0xdc98[12]][_0xdc98[49]],_0xb053x16[_0xdc98[44]][_0xdc98[11]],true,_0xb053x13);if(rpc[_0xb053x16[_0xdc98[38]]+ _0xdc98[51]]){return rpc[_0xb053x16[_0xdc98[38]]+ _0xdc98[51]][_0xdc98[55]](_0xb053x17)[_0xdc98[54]](function(_0xb053x18){logger[_0xdc98[53]](_0xdc98[52])})}}}function stopRouting(_0xb053x11,queue,_0xb053x16,_0xb053x13){if(_0xb053x11&& queue){queue[_0xdc98[32]]-= 1;var _0xb053x17={leaveAt:moment()[_0xdc98[18]](_0xdc98[35]),acceptAt:moment()[_0xdc98[18]](_0xdc98[35]),reason:_0xdc98[56]};logger[_0xdc98[50]](util[_0xdc98[18]](_0xdc98[57],_0xb053x11,queue[_0xdc98[49]]));emitChannelQueueInteraction(_0xb053x16[_0xdc98[38]],queue[_0xdc98[49]],_0xb053x16[_0xdc98[33]],_0xb053x16[_0xdc98[12]][_0xdc98[49]],_0xb053x16[_0xdc98[44]][_0xdc98[11]],false,_0xb053x13);if(rpc[_0xb053x16[_0xdc98[38]]+ _0xdc98[51]]){return rpc[_0xb053x16[_0xdc98[38]]+ _0xdc98[51]][_0xdc98[59]](_0xb053x11,_0xb053x17)[_0xdc98[54]](function(_0xb053x18){logger[_0xdc98[53]](_0xdc98[58])})}}}function endRouting(_0xb053x11,queue,_0xb053x16,_0xb053x13){if(_0xb053x11&& queue){queue[_0xdc98[32]]-= 1;var _0xb053x17={leaveAt:moment()[_0xdc98[18]](_0xdc98[35]),exitAt:moment()[_0xdc98[18]](_0xdc98[35]),reason:_0xdc98[60]};logger[_0xdc98[50]](util[_0xdc98[18]](_0xdc98[61],_0xb053x11,queue[_0xdc98[49]]));emitChannelQueueInteraction(_0xb053x16[_0xdc98[38]],queue[_0xdc98[49]],_0xb053x16[_0xdc98[33]],_0xb053x16[_0xdc98[12]][_0xdc98[49]],_0xb053x16[_0xdc98[44]][_0xdc98[11]],false,_0xb053x13);if(rpc[_0xb053x16[_0xdc98[38]]+ _0xdc98[51]]){return rpc[_0xb053x16[_0xdc98[38]]+ _0xdc98[51]][_0xdc98[59]](_0xb053x11,_0xb053x17)[_0xdc98[54]](function(_0xb053x18){logger[_0xdc98[53]](_0xdc98[58])})}}}function handleFindQueue(_0xb053x10){return function(_0xb053x1c){return _0xb053x1c[_0xdc98[49]][_0xdc98[62]]()=== _0xb053x10[_0xdc98[62]]()}}exports[_0xdc98[63]]= function(_0xb053x11,_0xb053x1d,_0xb053x13,_0xb053x16){return function(_0xb053x1e){try{var _0xb053xc={name:_0xb053x1d[0],timeout:_0xb053x1d[1]};var _0xb053x1f=queue[_0xdc98[1]](_0xb053xc,{typecast:true});if(_0xb053x1f[_0xdc98[64]]){logger[_0xdc98[53]](_0xdc98[65],_0xb053x11,_[_0xdc98[68]](_0xb053x1f,_0xdc98[44])[_0xdc98[67]](_0xdc98[66]));_0xb053x1e[_0xdc98[69]]()}else {var _0xb053x20=_[_0xdc98[71]](_0xb053x13[_0xb053x16[_0xdc98[38]]+ _0xdc98[70]],handleFindQueue(_0xb053xc[_0xdc98[49]]));if(_0xb053x20){startRouting(_0xb053x11,_0xb053x20,_0xb053x16,_0xb053x13);var _0xb053x21=(_0xb053x20[_0xdc98[60]]|| 10)* 1000;var _0xb053x22=(_0xb053xc[_0xdc98[60]]|| 20)* 1000;var _0xb053x23,_0xb053x24;if(_0xb053x21> _0xb053x22){_0xb053x22= _0xb053x21};var _0xb053x25=seqqueue[_0xdc98[72]](_0xb053x21);_0xb053x25[_0xdc98[11]]= _0xb053x11;_0xb053x25[_0xdc98[73]]= _0xb053x21;_0xb053x25[_0xdc98[74]]= _0xb053x22;_0xb053x25[_0xdc98[38]]= _0xb053x16[_0xdc98[38]];_0xb053x24= setInterval(function(){if(_0xb053x13[_0xdc98[75]]&&  !_0xb053x13[_0xdc98[75]][_0xb053x11]){stopRouting(_0xb053x11,_0xb053x20,_0xb053x16,_0xb053x13);clearTimeout(_0xb053x23);clearInterval(_0xb053x24);_0xb053x23= undefined;_0xb053x25[_0xdc98[76]](true);_0xb053x1e[_0xdc98[69]]()}},1000);_0xb053x23= setTimeout(function(){endRouting(_0xb053x11,_0xb053x20,_0xb053x16,_0xb053x13);clearInterval(_0xb053x24);_0xb053x24= undefined;_0xb053x25[_0xdc98[76]](true);_0xb053x1e[_0xdc98[77]]()},_0xb053x22);switch(_0xb053x20[_0xdc98[80]]){case _0xdc98[78]:strategy[_0xdc98[78]](_0xb053x25,_0xb053x20,_0xb053x13,_0xb053x16);break;default:strategy[_0xdc98[79]](_0xb053x25,_0xb053x20,_0xb053x13,_0xb053x16)}}else {logger[_0xdc98[53]](_0xdc98[81],_0xb053x11,_0xb053xc[_0xdc98[49]]);_0xb053x1e[_0xdc98[69]]()}}}catch(e){console[_0xdc98[82]](e);logger[_0xdc98[53]](_0xdc98[65],_0xb053x11,JSON[_0xdc98[83]](e));_0xb053x1e[_0xdc98[69]]()}}}
\ No newline at end of file
index 7d752e0..6288e69 100644 (file)
@@ -1 +1 @@
-var _0x3466=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x75\x69\x64","\x2E\x2F\x75\x74\x69\x6C","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x49\x64","\x76\x34","\x73\x71\x75\x65\x75\x65","\x61\x67\x65\x6E\x74","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x62\x69\x6E\x64","\x68\x61\x6E\x64\x6C\x65\x52\x75\x6E","\x68\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65\x6F\x75\x74","\x70\x75\x73\x68","\x64\x72\x61\x69\x6E\x65\x64","\x6F\x6E","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x64\x6F\x6E\x65","\x5B\x25\x73\x5D\x5B\x41\x47\x45\x4E\x54\x5D\x20\x74\x72\x79\x20\x77\x69\x74\x68\x20\x25\x73","\x69\x64","\x69\x6E\x66\x6F","\x61\x67\x65\x6E\x74\x73","\x69\x73\x4E\x69\x6C","\x5B\x25\x73\x5D\x5B\x41\x47\x45\x4E\x54\x5D\x20\x61\x67\x65\x6E\x74\x20\x73\x6B\x69\x70\x70\x65\x64\x2C\x20\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x69\x64\x20\x25\x73","\x66\x6F\x72\x63\x65\x64\x4F\x77\x6E\x65\x72\x73\x68\x69\x70","\x63\x68\x61\x6E\x6E\x65\x6C","\x69\x73\x41\x67\x65\x6E\x74\x41\x76\x61\x69\x6C\x61\x62\x6C\x65","\x52\x49\x4E\x47\x49\x4E\x47","\x3A\x46\x4F\x52\x43\x45\x44","","\x77\x72\x69\x74\x65\x4C\x6F\x67","\x62\x75\x73\x79","\x62\x75\x73\x79\x51\x75\x65\x75\x65","\x73\x68\x6F\x77\x4E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E","\x5B\x25\x73\x5D\x5B\x41\x47\x45\x4E\x54\x5D\x20\x74\x69\x6D\x65\x6F\x75\x74\x20\x77\x69\x74\x68\x20\x25\x73","\x54\x49\x4D\x45\x4F\x55\x54","\x68\x69\x64\x65\x4E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x3466[0];var _=require(_0x3466[1]);var uuid=require(_0x3466[2]);var util=require(_0x3466[3]);var logger=require(_0x3466[5])(_0x3466[4]);var Agent=function(_0xb3e6x6,_0xb3e6x7,_0xb3e6x8,_0xb3e6x9){this[_0x3466[6]]= uuid[_0x3466[7]]();this[_0x3466[8]]= _0xb3e6x6;this[_0x3466[9]]= _0xb3e6x7;this[_0x3466[10]]= _0xb3e6x8;this[_0x3466[4]]= _0xb3e6x9;this[_0x3466[8]][_0x3466[14]](this[_0x3466[12]][_0x3466[11]](this),this[_0x3466[13]][_0x3466[11]](this));this[_0x3466[8]][_0x3466[16]](_0x3466[15],this[_0x3466[13]][_0x3466[11]](this))};Agent[_0x3466[17]][_0x3466[14]]= function(){this[_0x3466[8]][_0x3466[14]](this[_0x3466[12]][_0x3466[11]](this),this[_0x3466[13]][_0x3466[11]](this))};Agent[_0x3466[17]][_0x3466[18]]= function(_0xb3e6xa){if(_0xb3e6xa){setTimeout(this[_0x3466[14]][_0x3466[11]](this),1000);_0xb3e6xa[_0x3466[18]]()}};Agent[_0x3466[17]][_0x3466[12]]= function(_0xb3e6xa){logger[_0x3466[21]](_0x3466[19],this[_0x3466[8]][_0x3466[20]],this[_0x3466[9]][_0x3466[20]]);if(_[_0x3466[23]](this[_0x3466[10]][_0x3466[22]][this[_0x3466[9]][_0x3466[20]]])){logger[_0x3466[21]](_0x3466[24],this[_0x3466[8]][_0x3466[20]],this[_0x3466[9]][_0x3466[20]]);this[_0x3466[18]](_0xb3e6xa)}else {if(this[_0x3466[4]][_0x3466[25]]|| util[_0x3466[27]](this[_0x3466[8]][_0x3466[20]],this[_0x3466[10]][_0x3466[22]][this[_0x3466[9]][_0x3466[20]]],this[_0x3466[8]][_0x3466[26]],false)){util[_0x3466[31]](this[_0x3466[8]][_0x3466[20]],this[_0x3466[10]][_0x3466[22]][this[_0x3466[9]][_0x3466[20]]],_0x3466[28]+ (this[_0x3466[4]][_0x3466[25]]?_0x3466[29]:_0x3466[30]));this[_0x3466[10]][_0x3466[22]][this[_0x3466[9]][_0x3466[20]]][_0x3466[32]]= true;this[_0x3466[10]][_0x3466[22]][this[_0x3466[9]][_0x3466[20]]][_0x3466[33]]= undefined;util[_0x3466[34]](this[_0x3466[6]],this[_0x3466[8]][_0x3466[20]],this[_0x3466[10]][_0x3466[22]][this[_0x3466[9]][_0x3466[20]]],null,this[_0x3466[4]])}else {this[_0x3466[18]](_0xb3e6xa)}}};Agent[_0x3466[17]][_0x3466[13]]= function(){logger[_0x3466[21]](_0x3466[35],this[_0x3466[8]][_0x3466[20]],this[_0x3466[9]][_0x3466[20]]);if(_[_0x3466[23]](this[_0x3466[10]][_0x3466[22]][this[_0x3466[9]][_0x3466[20]]])){return logger[_0x3466[21]](_0x3466[24],this[_0x3466[8]][_0x3466[20]],this[_0x3466[9]][_0x3466[20]])}else {util[_0x3466[31]](this[_0x3466[8]][_0x3466[20]],this[_0x3466[10]][_0x3466[22]][this[_0x3466[9]][_0x3466[20]]],_0x3466[36]);this[_0x3466[10]][_0x3466[22]][this[_0x3466[9]][_0x3466[20]]][_0x3466[32]]= false;this[_0x3466[10]][_0x3466[22]][this[_0x3466[9]][_0x3466[20]]][_0x3466[33]]= undefined;util[_0x3466[37]](this[_0x3466[6]],this[_0x3466[8]][_0x3466[20]],this[_0x3466[10]][_0x3466[22]][this[_0x3466[9]][_0x3466[20]]],null,this[_0x3466[4]])}};function agent(_0xb3e6x6,_0xb3e6x7,_0xb3e6x8,_0xb3e6x9){return  new Agent(_0xb3e6x6,_0xb3e6x7,_0xb3e6x8,_0xb3e6x9)}module[_0x3466[38]]= agent
\ No newline at end of file
+var _0x503f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x75\x69\x64","\x2E\x2F\x75\x74\x69\x6C","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x49\x64","\x76\x34","\x73\x71\x75\x65\x75\x65","\x61\x67\x65\x6E\x74","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x62\x69\x6E\x64","\x68\x61\x6E\x64\x6C\x65\x52\x75\x6E","\x68\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65\x6F\x75\x74","\x70\x75\x73\x68","\x64\x72\x61\x69\x6E\x65\x64","\x6F\x6E","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x64\x6F\x6E\x65","\x5B\x25\x73\x5D\x5B\x41\x47\x45\x4E\x54\x5D\x20\x74\x72\x79\x20\x77\x69\x74\x68\x20\x25\x73","\x69\x64","\x69\x6E\x66\x6F","\x61\x67\x65\x6E\x74\x73","\x69\x73\x4E\x69\x6C","\x5B\x25\x73\x5D\x5B\x41\x47\x45\x4E\x54\x5D\x20\x61\x67\x65\x6E\x74\x20\x73\x6B\x69\x70\x70\x65\x64\x2C\x20\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x69\x64\x20\x25\x73","\x66\x6F\x72\x63\x65\x64\x4F\x77\x6E\x65\x72\x73\x68\x69\x70","\x63\x68\x61\x6E\x6E\x65\x6C","\x69\x73\x41\x67\x65\x6E\x74\x41\x76\x61\x69\x6C\x61\x62\x6C\x65","\x52\x49\x4E\x47\x49\x4E\x47","\x3A\x46\x4F\x52\x43\x45\x44","","\x77\x72\x69\x74\x65\x4C\x6F\x67","\x62\x75\x73\x79","\x62\x75\x73\x79\x51\x75\x65\x75\x65","\x73\x68\x6F\x77\x4E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E","\x5B\x25\x73\x5D\x5B\x41\x47\x45\x4E\x54\x5D\x20\x74\x69\x6D\x65\x6F\x75\x74\x20\x77\x69\x74\x68\x20\x25\x73","\x54\x49\x4D\x45\x4F\x55\x54","\x68\x69\x64\x65\x4E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x503f[0];var _=require(_0x503f[1]);var uuid=require(_0x503f[2]);var util=require(_0x503f[3]);var logger=require(_0x503f[5])(_0x503f[4]);var Agent=function(_0xf8d3x6,_0xf8d3x7,_0xf8d3x8,_0xf8d3x9){this[_0x503f[6]]= uuid[_0x503f[7]]();this[_0x503f[8]]= _0xf8d3x6;this[_0x503f[9]]= _0xf8d3x7;this[_0x503f[10]]= _0xf8d3x8;this[_0x503f[4]]= _0xf8d3x9;this[_0x503f[8]][_0x503f[14]](this[_0x503f[12]][_0x503f[11]](this),this[_0x503f[13]][_0x503f[11]](this));this[_0x503f[8]][_0x503f[16]](_0x503f[15],this[_0x503f[13]][_0x503f[11]](this))};Agent[_0x503f[17]][_0x503f[14]]= function(){this[_0x503f[8]][_0x503f[14]](this[_0x503f[12]][_0x503f[11]](this),this[_0x503f[13]][_0x503f[11]](this))};Agent[_0x503f[17]][_0x503f[18]]= function(_0xf8d3xa){if(_0xf8d3xa){setTimeout(this[_0x503f[14]][_0x503f[11]](this),1000);_0xf8d3xa[_0x503f[18]]()}};Agent[_0x503f[17]][_0x503f[12]]= function(_0xf8d3xa){logger[_0x503f[21]](_0x503f[19],this[_0x503f[8]][_0x503f[20]],this[_0x503f[9]][_0x503f[20]]);if(_[_0x503f[23]](this[_0x503f[10]][_0x503f[22]][this[_0x503f[9]][_0x503f[20]]])){logger[_0x503f[21]](_0x503f[24],this[_0x503f[8]][_0x503f[20]],this[_0x503f[9]][_0x503f[20]]);this[_0x503f[18]](_0xf8d3xa)}else {if(this[_0x503f[4]][_0x503f[25]]|| util[_0x503f[27]](this[_0x503f[8]][_0x503f[20]],this[_0x503f[10]][_0x503f[22]][this[_0x503f[9]][_0x503f[20]]],this[_0x503f[8]][_0x503f[26]],false)){util[_0x503f[31]](this[_0x503f[8]][_0x503f[20]],this[_0x503f[10]][_0x503f[22]][this[_0x503f[9]][_0x503f[20]]],_0x503f[28]+ (this[_0x503f[4]][_0x503f[25]]?_0x503f[29]:_0x503f[30]));this[_0x503f[10]][_0x503f[22]][this[_0x503f[9]][_0x503f[20]]][_0x503f[32]]= true;this[_0x503f[10]][_0x503f[22]][this[_0x503f[9]][_0x503f[20]]][_0x503f[33]]= undefined;util[_0x503f[34]](this[_0x503f[6]],this[_0x503f[8]][_0x503f[20]],this[_0x503f[10]][_0x503f[22]][this[_0x503f[9]][_0x503f[20]]],null,this[_0x503f[4]])}else {this[_0x503f[18]](_0xf8d3xa)}}};Agent[_0x503f[17]][_0x503f[13]]= function(){logger[_0x503f[21]](_0x503f[35],this[_0x503f[8]][_0x503f[20]],this[_0x503f[9]][_0x503f[20]]);if(_[_0x503f[23]](this[_0x503f[10]][_0x503f[22]][this[_0x503f[9]][_0x503f[20]]])){return logger[_0x503f[21]](_0x503f[24],this[_0x503f[8]][_0x503f[20]],this[_0x503f[9]][_0x503f[20]])}else {util[_0x503f[31]](this[_0x503f[8]][_0x503f[20]],this[_0x503f[10]][_0x503f[22]][this[_0x503f[9]][_0x503f[20]]],_0x503f[36]);this[_0x503f[10]][_0x503f[22]][this[_0x503f[9]][_0x503f[20]]][_0x503f[32]]= false;this[_0x503f[10]][_0x503f[22]][this[_0x503f[9]][_0x503f[20]]][_0x503f[33]]= undefined;util[_0x503f[37]](this[_0x503f[6]],this[_0x503f[8]][_0x503f[20]],this[_0x503f[10]][_0x503f[22]][this[_0x503f[9]][_0x503f[20]]],null,this[_0x503f[4]])}};function agent(_0xf8d3x6,_0xf8d3x7,_0xf8d3x8,_0xf8d3x9){return  new Agent(_0xf8d3x6,_0xf8d3x7,_0xf8d3x8,_0xf8d3x9)}module[_0x503f[38]]= agent
\ No newline at end of file
index b2161aa..59862bd 100644 (file)
@@ -1 +1 @@
-var _0xbc8e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x75\x69\x64","\x2E\x2F\x75\x74\x69\x6C","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x49\x64","\x76\x34","\x73\x71\x75\x65\x75\x65","\x71\x75\x65\x75\x65","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x6C\x65\x6E\x67\x74\x68","\x71\x74\x69\x6D\x65\x6F\x75\x74","\x61\x74\x69\x6D\x65\x6F\x75\x74","\x66\x6C\x6F\x6F\x72","\x6D\x6F\x64\x75\x6C\x65","\x62\x69\x6E\x64","\x68\x61\x6E\x64\x6C\x65\x52\x75\x6E","\x68\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65\x6F\x75\x74","\x70\x75\x73\x68","\x64\x72\x61\x69\x6E\x65\x64","\x6F\x6E","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x64\x6F\x6E\x65","\x69\x73\x4E\x69\x6C","\x41\x67\x65\x6E\x74\x73","\x69\x64","\x61\x67\x65\x6E\x74\x73","\x5B\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x5D\x20\x61\x67\x65\x6E\x74\x20\x73\x6B\x69\x70\x70\x65\x64\x2C\x20\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x69\x64\x20\x25\x73","\x69\x6E\x66\x6F","\x63\x68\x61\x6E\x6E\x65\x6C","\x69\x73\x41\x67\x65\x6E\x74\x41\x76\x61\x69\x6C\x61\x62\x6C\x65","\x52\x49\x4E\x47\x49\x4E\x47","\x77\x72\x69\x74\x65\x4C\x6F\x67","\x62\x75\x73\x79","\x62\x75\x73\x79\x51\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x73\x68\x6F\x77\x4E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E","\x5B\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x5D\x20\x45\x4D\x50\x54\x59","\x54\x49\x4D\x45\x4F\x55\x54","\x68\x69\x64\x65\x4E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0xbc8e[0];var _=require(_0xbc8e[1]);var uuid=require(_0xbc8e[2]);var util=require(_0xbc8e[3]);var logger=require(_0xbc8e[5])(_0xbc8e[4]);var Beepall=function(_0x4a90x6,_0x4a90x7,_0x4a90x8,_0x4a90x9){this[_0xbc8e[6]]= uuid[_0xbc8e[7]]();this[_0xbc8e[8]]= _0x4a90x6;this[_0xbc8e[9]]= _0x4a90x7;this[_0xbc8e[10]]= _0x4a90x8;this[_0xbc8e[4]]= _0x4a90x9;this[_0xbc8e[11]]= Math[_0xbc8e[14]](this[_0xbc8e[8]][_0xbc8e[12]]/ this[_0xbc8e[8]][_0xbc8e[13]]);this[_0xbc8e[15]]= this[_0xbc8e[8]][_0xbc8e[12]]% this[_0xbc8e[8]][_0xbc8e[13]];for(var _0x4a90xa=0;_0x4a90xa< this[_0xbc8e[11]];_0x4a90xa+= 1){this[_0xbc8e[8]][_0xbc8e[19]](this[_0xbc8e[17]][_0xbc8e[16]](this),this[_0xbc8e[18]][_0xbc8e[16]](this))};this[_0xbc8e[8]][_0xbc8e[19]](this[_0xbc8e[17]][_0xbc8e[16]](this),this[_0xbc8e[18]][_0xbc8e[16]](this),this[_0xbc8e[15]]);this[_0xbc8e[8]][_0xbc8e[21]](_0xbc8e[20],this[_0xbc8e[18]][_0xbc8e[16]](this))};Beepall[_0xbc8e[22]][_0xbc8e[19]]= function(){this[_0xbc8e[8]][_0xbc8e[19]](this[_0xbc8e[17]][_0xbc8e[16]](this),this[_0xbc8e[18]][_0xbc8e[16]](this))};Beepall[_0xbc8e[22]][_0xbc8e[23]]= function(_0x4a90xb){if(_0x4a90xb){setTimeout(this[_0xbc8e[19]][_0xbc8e[16]](this),1000);_0x4a90xb[_0xbc8e[23]]()}};Beepall[_0xbc8e[22]][_0xbc8e[17]]= function(_0x4a90xb){var _0x4a90xc=true;if(!_[_0xbc8e[24]](this[_0xbc8e[9]])&&  !_[_0xbc8e[24]](this[_0xbc8e[9]].Agents) && this[_0xbc8e[9]][_0xbc8e[25]][_0xbc8e[11]]> 0){for(var _0x4a90xa=0,_0x4a90xd;_0x4a90xa< this[_0xbc8e[9]][_0xbc8e[25]][_0xbc8e[11]];_0x4a90xa+= 1){_0x4a90xd= this[_0xbc8e[9]][_0xbc8e[25]][_0x4a90xa][_0xbc8e[26]];if(_[_0xbc8e[24]](this[_0xbc8e[10]][_0xbc8e[27]][_0x4a90xd])){logger[_0xbc8e[29]](_0xbc8e[28],this[_0xbc8e[8]][_0xbc8e[26]],_0x4a90xd)}else {if(util[_0xbc8e[31]](this[_0xbc8e[8]][_0xbc8e[26]],this[_0xbc8e[10]][_0xbc8e[27]][_0x4a90xd],this[_0xbc8e[8]][_0xbc8e[30]],true)){_0x4a90xc= false;util[_0xbc8e[33]](this[_0xbc8e[8]][_0xbc8e[26]],this[_0xbc8e[10]][_0xbc8e[27]][_0x4a90xd],_0xbc8e[32]);this[_0xbc8e[10]][_0xbc8e[27]][_0x4a90xd][_0xbc8e[34]]= true;this[_0xbc8e[10]][_0xbc8e[27]][_0x4a90xd][_0xbc8e[35]]= this[_0xbc8e[9]][_0xbc8e[36]];util[_0xbc8e[37]](this[_0xbc8e[6]],this[_0xbc8e[8]][_0xbc8e[26]],this[_0xbc8e[10]][_0xbc8e[27]][_0x4a90xd],this[_0xbc8e[9]],this[_0xbc8e[4]])}}};if(_0x4a90xc){this[_0xbc8e[23]](_0x4a90xb)}}else {logger[_0xbc8e[29]](_0xbc8e[38],this[_0xbc8e[8]][_0xbc8e[26]]);this[_0xbc8e[23]](_0x4a90xb)}};Beepall[_0xbc8e[22]][_0xbc8e[18]]= function(){if(!_[_0xbc8e[24]](this[_0xbc8e[9]])&&  !_[_0xbc8e[24]](this[_0xbc8e[9]].Agents)){for(var _0x4a90xa=0,_0x4a90xd;_0x4a90xa< this[_0xbc8e[9]][_0xbc8e[25]][_0xbc8e[11]];_0x4a90xa+= 1){_0x4a90xd= this[_0xbc8e[9]][_0xbc8e[25]][_0x4a90xa][_0xbc8e[26]];if(_[_0xbc8e[24]](this[_0xbc8e[10]][_0xbc8e[27]][_0x4a90xd])){logger[_0xbc8e[29]](_0xbc8e[28],this[_0xbc8e[8]][_0xbc8e[26]],_0x4a90xd)}else {util[_0xbc8e[33]](this[_0xbc8e[8]][_0xbc8e[26]],this[_0xbc8e[10]][_0xbc8e[27]][_0x4a90xd],_0xbc8e[39]);this[_0xbc8e[10]][_0xbc8e[27]][_0x4a90xd][_0xbc8e[34]]= false;this[_0xbc8e[10]][_0xbc8e[27]][_0x4a90xd][_0xbc8e[35]]= undefined;util[_0xbc8e[40]](this[_0xbc8e[6]],this[_0xbc8e[8]][_0xbc8e[26]],this[_0xbc8e[10]][_0xbc8e[27]][_0x4a90xd],this[_0xbc8e[9]],this[_0xbc8e[4]])}}}};function beepall(_0x4a90x6,_0x4a90x7,_0x4a90x8,_0x4a90x9){return  new Beepall(_0x4a90x6,_0x4a90x7,_0x4a90x8,_0x4a90x9)}module[_0xbc8e[41]]= beepall
\ No newline at end of file
+var _0xa38d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x75\x69\x64","\x2E\x2F\x75\x74\x69\x6C","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x49\x64","\x76\x34","\x73\x71\x75\x65\x75\x65","\x71\x75\x65\x75\x65","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x6C\x65\x6E\x67\x74\x68","\x71\x74\x69\x6D\x65\x6F\x75\x74","\x61\x74\x69\x6D\x65\x6F\x75\x74","\x66\x6C\x6F\x6F\x72","\x6D\x6F\x64\x75\x6C\x65","\x62\x69\x6E\x64","\x68\x61\x6E\x64\x6C\x65\x52\x75\x6E","\x68\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65\x6F\x75\x74","\x70\x75\x73\x68","\x64\x72\x61\x69\x6E\x65\x64","\x6F\x6E","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x64\x6F\x6E\x65","\x69\x73\x4E\x69\x6C","\x41\x67\x65\x6E\x74\x73","\x69\x64","\x61\x67\x65\x6E\x74\x73","\x5B\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x5D\x20\x61\x67\x65\x6E\x74\x20\x73\x6B\x69\x70\x70\x65\x64\x2C\x20\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x69\x64\x20\x25\x73","\x69\x6E\x66\x6F","\x63\x68\x61\x6E\x6E\x65\x6C","\x69\x73\x41\x67\x65\x6E\x74\x41\x76\x61\x69\x6C\x61\x62\x6C\x65","\x52\x49\x4E\x47\x49\x4E\x47","\x77\x72\x69\x74\x65\x4C\x6F\x67","\x62\x75\x73\x79","\x62\x75\x73\x79\x51\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x73\x68\x6F\x77\x4E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E","\x5B\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x5D\x20\x45\x4D\x50\x54\x59","\x54\x49\x4D\x45\x4F\x55\x54","\x68\x69\x64\x65\x4E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0xa38d[0];var _=require(_0xa38d[1]);var uuid=require(_0xa38d[2]);var util=require(_0xa38d[3]);var logger=require(_0xa38d[5])(_0xa38d[4]);var Beepall=function(_0x806ax6,_0x806ax7,_0x806ax8,_0x806ax9){this[_0xa38d[6]]= uuid[_0xa38d[7]]();this[_0xa38d[8]]= _0x806ax6;this[_0xa38d[9]]= _0x806ax7;this[_0xa38d[10]]= _0x806ax8;this[_0xa38d[4]]= _0x806ax9;this[_0xa38d[11]]= Math[_0xa38d[14]](this[_0xa38d[8]][_0xa38d[12]]/ this[_0xa38d[8]][_0xa38d[13]]);this[_0xa38d[15]]= this[_0xa38d[8]][_0xa38d[12]]% this[_0xa38d[8]][_0xa38d[13]];for(var _0x806axa=0;_0x806axa< this[_0xa38d[11]];_0x806axa+= 1){this[_0xa38d[8]][_0xa38d[19]](this[_0xa38d[17]][_0xa38d[16]](this),this[_0xa38d[18]][_0xa38d[16]](this))};this[_0xa38d[8]][_0xa38d[19]](this[_0xa38d[17]][_0xa38d[16]](this),this[_0xa38d[18]][_0xa38d[16]](this),this[_0xa38d[15]]);this[_0xa38d[8]][_0xa38d[21]](_0xa38d[20],this[_0xa38d[18]][_0xa38d[16]](this))};Beepall[_0xa38d[22]][_0xa38d[19]]= function(){this[_0xa38d[8]][_0xa38d[19]](this[_0xa38d[17]][_0xa38d[16]](this),this[_0xa38d[18]][_0xa38d[16]](this))};Beepall[_0xa38d[22]][_0xa38d[23]]= function(_0x806axb){if(_0x806axb){setTimeout(this[_0xa38d[19]][_0xa38d[16]](this),1000);_0x806axb[_0xa38d[23]]()}};Beepall[_0xa38d[22]][_0xa38d[17]]= function(_0x806axb){var _0x806axc=true;if(!_[_0xa38d[24]](this[_0xa38d[9]])&&  !_[_0xa38d[24]](this[_0xa38d[9]].Agents) && this[_0xa38d[9]][_0xa38d[25]][_0xa38d[11]]> 0){for(var _0x806axa=0,_0x806axd;_0x806axa< this[_0xa38d[9]][_0xa38d[25]][_0xa38d[11]];_0x806axa+= 1){_0x806axd= this[_0xa38d[9]][_0xa38d[25]][_0x806axa][_0xa38d[26]];if(_[_0xa38d[24]](this[_0xa38d[10]][_0xa38d[27]][_0x806axd])){logger[_0xa38d[29]](_0xa38d[28],this[_0xa38d[8]][_0xa38d[26]],_0x806axd)}else {if(util[_0xa38d[31]](this[_0xa38d[8]][_0xa38d[26]],this[_0xa38d[10]][_0xa38d[27]][_0x806axd],this[_0xa38d[8]][_0xa38d[30]],true)){_0x806axc= false;util[_0xa38d[33]](this[_0xa38d[8]][_0xa38d[26]],this[_0xa38d[10]][_0xa38d[27]][_0x806axd],_0xa38d[32]);this[_0xa38d[10]][_0xa38d[27]][_0x806axd][_0xa38d[34]]= true;this[_0xa38d[10]][_0xa38d[27]][_0x806axd][_0xa38d[35]]= this[_0xa38d[9]][_0xa38d[36]];util[_0xa38d[37]](this[_0xa38d[6]],this[_0xa38d[8]][_0xa38d[26]],this[_0xa38d[10]][_0xa38d[27]][_0x806axd],this[_0xa38d[9]],this[_0xa38d[4]])}}};if(_0x806axc){this[_0xa38d[23]](_0x806axb)}}else {logger[_0xa38d[29]](_0xa38d[38],this[_0xa38d[8]][_0xa38d[26]]);this[_0xa38d[23]](_0x806axb)}};Beepall[_0xa38d[22]][_0xa38d[18]]= function(){if(!_[_0xa38d[24]](this[_0xa38d[9]])&&  !_[_0xa38d[24]](this[_0xa38d[9]].Agents)){for(var _0x806axa=0,_0x806axd;_0x806axa< this[_0xa38d[9]][_0xa38d[25]][_0xa38d[11]];_0x806axa+= 1){_0x806axd= this[_0xa38d[9]][_0xa38d[25]][_0x806axa][_0xa38d[26]];if(_[_0xa38d[24]](this[_0xa38d[10]][_0xa38d[27]][_0x806axd])){logger[_0xa38d[29]](_0xa38d[28],this[_0xa38d[8]][_0xa38d[26]],_0x806axd)}else {util[_0xa38d[33]](this[_0xa38d[8]][_0xa38d[26]],this[_0xa38d[10]][_0xa38d[27]][_0x806axd],_0xa38d[39]);this[_0xa38d[10]][_0xa38d[27]][_0x806axd][_0xa38d[34]]= false;this[_0xa38d[10]][_0xa38d[27]][_0x806axd][_0xa38d[35]]= undefined;util[_0xa38d[40]](this[_0xa38d[6]],this[_0xa38d[8]][_0xa38d[26]],this[_0xa38d[10]][_0xa38d[27]][_0x806axd],this[_0xa38d[9]],this[_0xa38d[4]])}}}};function beepall(_0x806ax6,_0x806ax7,_0x806ax8,_0x806ax9){return  new Beepall(_0x806ax6,_0x806ax7,_0x806ax8,_0x806ax9)}module[_0xa38d[41]]= beepall
\ No newline at end of file
index 83f282d..8befac8 100644 (file)
@@ -1 +1 @@
-var _0xadb3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x2E\x2F\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x2E\x2F\x62\x65\x65\x70\x61\x6C\x6C","\x2E\x2F\x61\x67\x65\x6E\x74"];_0xadb3[0];module[_0xadb3[1]]= {rrmemory:require(_0xadb3[2]),beepall:require(_0xadb3[3]),agent:require(_0xadb3[4])}
\ No newline at end of file
+var _0x676e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x2E\x2F\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x2E\x2F\x62\x65\x65\x70\x61\x6C\x6C","\x2E\x2F\x61\x67\x65\x6E\x74"];_0x676e[0];module[_0x676e[1]]= {rrmemory:require(_0x676e[2]),beepall:require(_0x676e[3]),agent:require(_0x676e[4])}
\ No newline at end of file
index 2cd60a0..555ea19 100644 (file)
@@ -1 +1 @@
-var _0x7220=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x72\x72","\x6C\x6F\x64\x61\x73\x68","\x75\x75\x69\x64","\x2E\x2F\x75\x74\x69\x6C","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x49\x64","\x76\x34","\x73\x71\x75\x65\x75\x65","\x71\x75\x65\x75\x65","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x6C\x65\x6E\x67\x74\x68","\x71\x74\x69\x6D\x65\x6F\x75\x74","\x61\x74\x69\x6D\x65\x6F\x75\x74","\x66\x6C\x6F\x6F\x72","\x6D\x6F\x64\x75\x6C\x65","\x62\x69\x6E\x64","\x68\x61\x6E\x64\x6C\x65\x52\x75\x6E","\x68\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65\x6F\x75\x74","\x70\x75\x73\x68","\x64\x72\x61\x69\x6E\x65\x64","\x6F\x6E","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x64\x6F\x6E\x65","\x61\x67\x65\x6E\x74\x49\x64","\x6D\x61\x70\x41\x67\x65\x6E\x74\x73\x49\x64","\x5B\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x5D\x20\x74\x72\x79\x20\x77\x69\x74\x68\x20\x25\x73","\x69\x64","\x69\x6E\x66\x6F","\x61\x67\x65\x6E\x74\x73","\x69\x73\x4E\x69\x6C","\x5B\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x5D\x20\x61\x67\x65\x6E\x74\x20\x73\x6B\x69\x70\x70\x65\x64\x2C\x20\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x69\x64\x20\x25\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x69\x73\x41\x67\x65\x6E\x74\x41\x76\x61\x69\x6C\x61\x62\x6C\x65","\x52\x49\x4E\x47\x49\x4E\x47","\x77\x72\x69\x74\x65\x4C\x6F\x67","\x62\x75\x73\x79","\x62\x75\x73\x79\x51\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x73\x68\x6F\x77\x4E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E","\x5B\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x5D\x20\x74\x69\x6D\x65\x6F\x75\x74\x20\x77\x69\x74\x68\x20\x25\x73","\x54\x49\x4D\x45\x4F\x55\x54","\x68\x69\x64\x65\x4E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x7220[0];var rr=require(_0x7220[1]);var _=require(_0x7220[2]);var uuid=require(_0x7220[3]);var util=require(_0x7220[4]);var logger=require(_0x7220[6])(_0x7220[5]);var RRMemory=function(_0x986ax7,_0x986ax8,_0x986ax9,_0x986axa){this[_0x7220[7]]= uuid[_0x7220[8]]();this[_0x7220[9]]= _0x986ax7;this[_0x7220[10]]= _0x986ax8;this[_0x7220[11]]= _0x986ax9;this[_0x7220[5]]= _0x986axa;this[_0x7220[12]]= Math[_0x7220[15]](this[_0x7220[9]][_0x7220[13]]/ this[_0x7220[9]][_0x7220[14]]);this[_0x7220[16]]= this[_0x7220[9]][_0x7220[13]]% this[_0x7220[9]][_0x7220[14]];for(var _0x986axb=0;_0x986axb< this[_0x7220[12]];_0x986axb+= 1){this[_0x7220[9]][_0x7220[20]](this[_0x7220[18]][_0x7220[17]](this),this[_0x7220[19]][_0x7220[17]](this))};this[_0x7220[9]][_0x7220[20]](this[_0x7220[18]][_0x7220[17]](this),this[_0x7220[19]][_0x7220[17]](this),this[_0x7220[16]]);this[_0x7220[9]][_0x7220[22]](_0x7220[21],this[_0x7220[19]][_0x7220[17]](this))};RRMemory[_0x7220[23]][_0x7220[20]]= function(){this[_0x7220[9]][_0x7220[20]](this[_0x7220[18]][_0x7220[17]](this),this[_0x7220[19]][_0x7220[17]](this))};RRMemory[_0x7220[23]][_0x7220[24]]= function(_0x986axc){if(_0x986axc){setTimeout(this[_0x7220[20]][_0x7220[17]](this),200);_0x986axc[_0x7220[24]]()}};RRMemory[_0x7220[23]][_0x7220[18]]= function(_0x986axc){this[_0x7220[25]]= rr(this[_0x7220[10]][_0x7220[26]]);logger[_0x7220[29]](_0x7220[27],this[_0x7220[9]][_0x7220[28]],this[_0x7220[25]]);if(_[_0x7220[31]](this[_0x7220[11]][_0x7220[30]][this[_0x7220[25]]])){logger[_0x7220[29]](_0x7220[32],this[_0x7220[9]][_0x7220[28]],this[_0x7220[25]]);this[_0x7220[24]](_0x986axc)}else {if(util[_0x7220[34]](this[_0x7220[9]][_0x7220[28]],this[_0x7220[11]][_0x7220[30]][this[_0x7220[25]]],this[_0x7220[9]][_0x7220[33]],true)){util[_0x7220[36]](this[_0x7220[9]][_0x7220[28]],this[_0x7220[11]][_0x7220[30]][this[_0x7220[25]]],_0x7220[35]);this[_0x7220[11]][_0x7220[30]][this[_0x7220[25]]][_0x7220[37]]= true;this[_0x7220[11]][_0x7220[30]][this[_0x7220[25]]][_0x7220[38]]= this[_0x7220[10]][_0x7220[39]];util[_0x7220[40]](this[_0x7220[7]],this[_0x7220[9]][_0x7220[28]],this[_0x7220[11]][_0x7220[30]][this[_0x7220[25]]],this[_0x7220[10]],this[_0x7220[5]])}else {this[_0x7220[24]](_0x986axc)}}};RRMemory[_0x7220[23]][_0x7220[19]]= function(){logger[_0x7220[29]](_0x7220[41],this[_0x7220[9]][_0x7220[28]],this[_0x7220[25]]);if(_[_0x7220[31]](this[_0x7220[11]][_0x7220[30]][this[_0x7220[25]]])){logger[_0x7220[29]](_0x7220[32],this[_0x7220[9]][_0x7220[28]],this[_0x7220[25]])}else {util[_0x7220[36]](this[_0x7220[9]][_0x7220[28]],this[_0x7220[11]][_0x7220[30]][this[_0x7220[25]]],_0x7220[42]);this[_0x7220[11]][_0x7220[30]][this[_0x7220[25]]][_0x7220[37]]= false;this[_0x7220[11]][_0x7220[30]][this[_0x7220[25]]][_0x7220[38]]= undefined;util[_0x7220[43]](this[_0x7220[7]],this[_0x7220[9]][_0x7220[28]],this[_0x7220[11]][_0x7220[30]][this[_0x7220[25]]],this[_0x7220[10]],this[_0x7220[5]])}};function rrmemory(_0x986ax7,_0x986ax8,_0x986ax9,_0x986axa){return  new RRMemory(_0x986ax7,_0x986ax8,_0x986ax9,_0x986axa)}module[_0x7220[44]]= rrmemory
\ No newline at end of file
+var _0x3568=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x72\x72","\x6C\x6F\x64\x61\x73\x68","\x75\x75\x69\x64","\x2E\x2F\x75\x74\x69\x6C","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x49\x64","\x76\x34","\x73\x71\x75\x65\x75\x65","\x71\x75\x65\x75\x65","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x6C\x65\x6E\x67\x74\x68","\x71\x74\x69\x6D\x65\x6F\x75\x74","\x61\x74\x69\x6D\x65\x6F\x75\x74","\x66\x6C\x6F\x6F\x72","\x6D\x6F\x64\x75\x6C\x65","\x62\x69\x6E\x64","\x68\x61\x6E\x64\x6C\x65\x52\x75\x6E","\x68\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65\x6F\x75\x74","\x70\x75\x73\x68","\x64\x72\x61\x69\x6E\x65\x64","\x6F\x6E","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x64\x6F\x6E\x65","\x61\x67\x65\x6E\x74\x49\x64","\x6D\x61\x70\x41\x67\x65\x6E\x74\x73\x49\x64","\x5B\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x5D\x20\x74\x72\x79\x20\x77\x69\x74\x68\x20\x25\x73","\x69\x64","\x69\x6E\x66\x6F","\x61\x67\x65\x6E\x74\x73","\x69\x73\x4E\x69\x6C","\x5B\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x5D\x20\x61\x67\x65\x6E\x74\x20\x73\x6B\x69\x70\x70\x65\x64\x2C\x20\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x69\x64\x20\x25\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x69\x73\x41\x67\x65\x6E\x74\x41\x76\x61\x69\x6C\x61\x62\x6C\x65","\x52\x49\x4E\x47\x49\x4E\x47","\x77\x72\x69\x74\x65\x4C\x6F\x67","\x62\x75\x73\x79","\x62\x75\x73\x79\x51\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x73\x68\x6F\x77\x4E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E","\x5B\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x5D\x20\x74\x69\x6D\x65\x6F\x75\x74\x20\x77\x69\x74\x68\x20\x25\x73","\x54\x49\x4D\x45\x4F\x55\x54","\x68\x69\x64\x65\x4E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x3568[0];var rr=require(_0x3568[1]);var _=require(_0x3568[2]);var uuid=require(_0x3568[3]);var util=require(_0x3568[4]);var logger=require(_0x3568[6])(_0x3568[5]);var RRMemory=function(_0x9989x7,_0x9989x8,_0x9989x9,_0x9989xa){this[_0x3568[7]]= uuid[_0x3568[8]]();this[_0x3568[9]]= _0x9989x7;this[_0x3568[10]]= _0x9989x8;this[_0x3568[11]]= _0x9989x9;this[_0x3568[5]]= _0x9989xa;this[_0x3568[12]]= Math[_0x3568[15]](this[_0x3568[9]][_0x3568[13]]/ this[_0x3568[9]][_0x3568[14]]);this[_0x3568[16]]= this[_0x3568[9]][_0x3568[13]]% this[_0x3568[9]][_0x3568[14]];for(var _0x9989xb=0;_0x9989xb< this[_0x3568[12]];_0x9989xb+= 1){this[_0x3568[9]][_0x3568[20]](this[_0x3568[18]][_0x3568[17]](this),this[_0x3568[19]][_0x3568[17]](this))};this[_0x3568[9]][_0x3568[20]](this[_0x3568[18]][_0x3568[17]](this),this[_0x3568[19]][_0x3568[17]](this),this[_0x3568[16]]);this[_0x3568[9]][_0x3568[22]](_0x3568[21],this[_0x3568[19]][_0x3568[17]](this))};RRMemory[_0x3568[23]][_0x3568[20]]= function(){this[_0x3568[9]][_0x3568[20]](this[_0x3568[18]][_0x3568[17]](this),this[_0x3568[19]][_0x3568[17]](this))};RRMemory[_0x3568[23]][_0x3568[24]]= function(_0x9989xc){if(_0x9989xc){setTimeout(this[_0x3568[20]][_0x3568[17]](this),200);_0x9989xc[_0x3568[24]]()}};RRMemory[_0x3568[23]][_0x3568[18]]= function(_0x9989xc){this[_0x3568[25]]= rr(this[_0x3568[10]][_0x3568[26]]);logger[_0x3568[29]](_0x3568[27],this[_0x3568[9]][_0x3568[28]],this[_0x3568[25]]);if(_[_0x3568[31]](this[_0x3568[11]][_0x3568[30]][this[_0x3568[25]]])){logger[_0x3568[29]](_0x3568[32],this[_0x3568[9]][_0x3568[28]],this[_0x3568[25]]);this[_0x3568[24]](_0x9989xc)}else {if(util[_0x3568[34]](this[_0x3568[9]][_0x3568[28]],this[_0x3568[11]][_0x3568[30]][this[_0x3568[25]]],this[_0x3568[9]][_0x3568[33]],true)){util[_0x3568[36]](this[_0x3568[9]][_0x3568[28]],this[_0x3568[11]][_0x3568[30]][this[_0x3568[25]]],_0x3568[35]);this[_0x3568[11]][_0x3568[30]][this[_0x3568[25]]][_0x3568[37]]= true;this[_0x3568[11]][_0x3568[30]][this[_0x3568[25]]][_0x3568[38]]= this[_0x3568[10]][_0x3568[39]];util[_0x3568[40]](this[_0x3568[7]],this[_0x3568[9]][_0x3568[28]],this[_0x3568[11]][_0x3568[30]][this[_0x3568[25]]],this[_0x3568[10]],this[_0x3568[5]])}else {this[_0x3568[24]](_0x9989xc)}}};RRMemory[_0x3568[23]][_0x3568[19]]= function(){logger[_0x3568[29]](_0x3568[41],this[_0x3568[9]][_0x3568[28]],this[_0x3568[25]]);if(_[_0x3568[31]](this[_0x3568[11]][_0x3568[30]][this[_0x3568[25]]])){logger[_0x3568[29]](_0x3568[32],this[_0x3568[9]][_0x3568[28]],this[_0x3568[25]])}else {util[_0x3568[36]](this[_0x3568[9]][_0x3568[28]],this[_0x3568[11]][_0x3568[30]][this[_0x3568[25]]],_0x3568[42]);this[_0x3568[11]][_0x3568[30]][this[_0x3568[25]]][_0x3568[37]]= false;this[_0x3568[11]][_0x3568[30]][this[_0x3568[25]]][_0x3568[38]]= undefined;util[_0x3568[43]](this[_0x3568[7]],this[_0x3568[9]][_0x3568[28]],this[_0x3568[11]][_0x3568[30]][this[_0x3568[25]]],this[_0x3568[10]],this[_0x3568[5]])}};function rrmemory(_0x9989x7,_0x9989x8,_0x9989x9,_0x9989xa){return  new RRMemory(_0x9989x7,_0x9989x8,_0x9989x9,_0x9989xa)}module[_0x3568[44]]= rrmemory
\ No newline at end of file
index 996cf26..c1f9afe 100644 (file)
@@ -1 +1 @@
-var _0x594f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x2E\x2E\x2F\x75\x74\x69\x6C\x73","\x6D\x75\x73\x74\x61\x63\x68\x65","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x65\x6D\x69\x74","\x74\x6F","\x75\x73\x65\x72\x3A\x73\x61\x76\x65","\x75\x73\x65\x72\x3A\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x2E","\x73\x70\x6C\x69\x74","\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x53\x6F\x75\x6E\x64","\x61\x63\x63\x6F\x75\x6E\x74","\x6E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x53\x68\x61\x6B\x65","\x62\x6F\x64\x79","\x71\x75\x65\x75\x65","\x6D\x73\x67","\x6E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x54\x65\x6D\x70\x6C\x61\x74\x65","\x67\x65\x74\x4D\x75\x73\x74\x61\x63\x68\x65\x52\x65\x6E\x64\x65\x72","\x49\x20\x63\x61\x6E\x27\x74\x20\x72\x65\x6E\x64\x65\x72\x20\x79\x6F\x75\x72\x20\x74\x65\x6D\x70\x6C\x61\x74\x65","\x5B\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x5D\x20\x25\x73","\x6D\x65\x73\x73\x61\x67\x65","\x65\x72\x72\x6F\x72","\x6E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x3A\x25\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x5B\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x5D\x5B\x41\x47\x45\x4E\x54\x3A\x25\x73\x5D\x5B\x53\x54\x41\x54\x55\x53\x3A\x25\x73\x5D","\x69\x6E\x66\x6F","\x69\x73\x41\x67\x65\x6E\x74\x41\x76\x61\x69\x6C\x61\x62\x6C\x65","\x62\x75\x73\x79","\x42\x55\x53\x59","\x6F\x6E\x6C\x69\x6E\x65","\x4F\x46\x46\x4C\x49\x4E\x45","\x50\x61\x75\x73\x65","\x50\x41\x55\x53\x45","\x43\x61\x70\x61\x63\x69\x74\x79","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x43\x75\x72\x72\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x20\x4D\x41\x58\x43\x41\x50\x41\x43\x49\x54\x59","\x73\x68\x6F\x77\x4E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E","\x68\x69\x64\x65\x4E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E","\x77\x72\x69\x74\x65\x4C\x6F\x67"];_0x594f[0];var util=require(_0x594f[1]);var utils=require(_0x594f[2]);var Mustache=require(_0x594f[3]);var logger=require(_0x594f[5])(_0x594f[4]);var io=require(_0x594f[7])({host:_0x594f[6],port:6379});function emit(_0x82ffx7,_0x82ffx8,_0x82ffx9){io[_0x594f[9]](_0x82ffx7)[_0x594f[8]](_0x82ffx8,_0x82ffx9)}function sendNotification(_0x82ffxb,_0x82ffxc,_0x82ffxd,_0x82ffxe,_0x82ffxf,_0x82ffx10){io[_0x594f[9]](util[_0x594f[13]](_0x594f[11],_0x82ffxe[_0x594f[12]]))[_0x594f[8]](_0x594f[10],_0x82ffxe);var _0x82ffx11=_0x82ffx10|| {};var _0x82ffx12=_0x82ffxd[_0x594f[15]](_0x594f[14]);var _0x82ffx9={uniqueid:_0x82ffxc,channel:_0x82ffx12[0],id:_0x82ffx12[1],title:_0x82ffx12[0]+ _0x594f[16],interactionId:_0x82ffx12[2],queue:_0x82ffxf?_0x82ffxf[_0x594f[12]]:null,sound:_0x82ffx11[_0x594f[18]][_0x594f[17]],shake:_0x82ffx11[_0x594f[18]][_0x594f[19]]};try{if(!_0x82ffx11[_0x594f[20]]){_0x82ffx11[_0x594f[20]]= {}};if(_0x82ffxf){_0x82ffx11[_0x594f[20]][_0x594f[21]]= _0x82ffxf}else {if(_0x82ffx11[_0x594f[20]][_0x594f[21]]){delete _0x82ffx11[_0x594f[20]][_0x594f[21]]}};_0x82ffx9[_0x594f[22]]= utils[_0x594f[24]](_0x82ffx11[_0x594f[18]][_0x594f[23]],_0x82ffx11)}catch(error){_0x82ffx9[_0x594f[22]]= _0x594f[25];logger[_0x594f[28]](util[_0x594f[13]](_0x594f[26],_0x82ffxc,error[_0x594f[27]]))};io[_0x594f[9]](util[_0x594f[13]](_0x594f[11],_0x82ffxe[_0x594f[12]]))[_0x594f[8]](util[_0x594f[13]](_0x594f[29],_0x82ffxb?_0x594f[30]:_0x594f[31]),_0x82ffx9)}function writeLog(_0x82ffx14,_0x82ffx9,_0x82ffx15){return logger[_0x594f[33]](util[_0x594f[13]](_0x594f[32],_0x82ffx14,_0x82ffx9[_0x594f[12]],_0x82ffx15))}exports[_0x594f[34]]= function(_0x82ffx14,_0x82ffxe,_0x82ffx16,_0x82ffx17){if(_0x82ffxe[_0x594f[35]]){writeLog(_0x82ffx14,_0x82ffxe,_0x594f[36]);return false};if(!_0x82ffxe[_0x594f[37]]){writeLog(_0x82ffx14,_0x82ffxe,_0x594f[38]);return false};if(_0x82ffxe[_0x82ffx16+ _0x594f[39]]){writeLog(_0x82ffx14,_0x82ffxe,_0x594f[40]);return false};if(_0x82ffx17&& _0x82ffxe[_0x594f[42]](_0x82ffx16+ _0x594f[41])&& _0x82ffxe[_0x594f[42]](_0x82ffx16+ _0x594f[43])){if(_0x82ffxe[_0x82ffx16+ _0x594f[41]]> 0&& _0x82ffxe[_0x82ffx16+ _0x594f[43]]>= _0x82ffxe[_0x82ffx16+ _0x594f[41]]){writeLog(_0x82ffx14,_0x82ffxe,_0x82ffx16[_0x594f[44]]()+ _0x594f[45]);return false}};return true};exports[_0x594f[46]]= function(_0x82ffxc,_0x82ffxd,_0x82ffxe,_0x82ffxf,_0x82ffx11){return sendNotification(true,_0x82ffxc,_0x82ffxd,_0x82ffxe,_0x82ffxf,_0x82ffx11)};exports[_0x594f[47]]= function(_0x82ffxc,_0x82ffxd,_0x82ffxe,_0x82ffxf,_0x82ffx11){return sendNotification(false,_0x82ffxc,_0x82ffxd,_0x82ffxe,_0x82ffxf,_0x82ffx11)};exports[_0x594f[48]]= writeLog
\ No newline at end of file
+var _0x4b07=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x2E\x2E\x2F\x75\x74\x69\x6C\x73","\x6D\x75\x73\x74\x61\x63\x68\x65","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x65\x6D\x69\x74","\x74\x6F","\x75\x73\x65\x72\x3A\x73\x61\x76\x65","\x75\x73\x65\x72\x3A\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x2E","\x73\x70\x6C\x69\x74","\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x53\x6F\x75\x6E\x64","\x61\x63\x63\x6F\x75\x6E\x74","\x6E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x53\x68\x61\x6B\x65","\x62\x6F\x64\x79","\x71\x75\x65\x75\x65","\x6D\x73\x67","\x6E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x54\x65\x6D\x70\x6C\x61\x74\x65","\x67\x65\x74\x4D\x75\x73\x74\x61\x63\x68\x65\x52\x65\x6E\x64\x65\x72","\x49\x20\x63\x61\x6E\x27\x74\x20\x72\x65\x6E\x64\x65\x72\x20\x79\x6F\x75\x72\x20\x74\x65\x6D\x70\x6C\x61\x74\x65","\x5B\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x5D\x20\x25\x73","\x6D\x65\x73\x73\x61\x67\x65","\x65\x72\x72\x6F\x72","\x6E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x3A\x25\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x5B\x25\x73\x5D\x5B\x51\x55\x45\x55\x45\x5D\x5B\x41\x47\x45\x4E\x54\x3A\x25\x73\x5D\x5B\x53\x54\x41\x54\x55\x53\x3A\x25\x73\x5D","\x69\x6E\x66\x6F","\x69\x73\x41\x67\x65\x6E\x74\x41\x76\x61\x69\x6C\x61\x62\x6C\x65","\x62\x75\x73\x79","\x42\x55\x53\x59","\x6F\x6E\x6C\x69\x6E\x65","\x4F\x46\x46\x4C\x49\x4E\x45","\x50\x61\x75\x73\x65","\x50\x41\x55\x53\x45","\x43\x61\x70\x61\x63\x69\x74\x79","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x43\x75\x72\x72\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x20\x4D\x41\x58\x43\x41\x50\x41\x43\x49\x54\x59","\x73\x68\x6F\x77\x4E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E","\x68\x69\x64\x65\x4E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E","\x77\x72\x69\x74\x65\x4C\x6F\x67"];_0x4b07[0];var util=require(_0x4b07[1]);var utils=require(_0x4b07[2]);var Mustache=require(_0x4b07[3]);var logger=require(_0x4b07[5])(_0x4b07[4]);var io=require(_0x4b07[7])({host:_0x4b07[6],port:6379});function emit(_0x960fx7,_0x960fx8,_0x960fx9){io[_0x4b07[9]](_0x960fx7)[_0x4b07[8]](_0x960fx8,_0x960fx9)}function sendNotification(_0x960fxb,_0x960fxc,_0x960fxd,_0x960fxe,_0x960fxf,_0x960fx10){io[_0x4b07[9]](util[_0x4b07[13]](_0x4b07[11],_0x960fxe[_0x4b07[12]]))[_0x4b07[8]](_0x4b07[10],_0x960fxe);var _0x960fx11=_0x960fx10|| {};var _0x960fx12=_0x960fxd[_0x4b07[15]](_0x4b07[14]);var _0x960fx9={uniqueid:_0x960fxc,channel:_0x960fx12[0],id:_0x960fx12[1],title:_0x960fx12[0]+ _0x4b07[16],interactionId:_0x960fx12[2],queue:_0x960fxf?_0x960fxf[_0x4b07[12]]:null,sound:_0x960fx11[_0x4b07[18]][_0x4b07[17]],shake:_0x960fx11[_0x4b07[18]][_0x4b07[19]]};try{if(!_0x960fx11[_0x4b07[20]]){_0x960fx11[_0x4b07[20]]= {}};if(_0x960fxf){_0x960fx11[_0x4b07[20]][_0x4b07[21]]= _0x960fxf}else {if(_0x960fx11[_0x4b07[20]][_0x4b07[21]]){delete _0x960fx11[_0x4b07[20]][_0x4b07[21]]}};_0x960fx9[_0x4b07[22]]= utils[_0x4b07[24]](_0x960fx11[_0x4b07[18]][_0x4b07[23]],_0x960fx11)}catch(error){_0x960fx9[_0x4b07[22]]= _0x4b07[25];logger[_0x4b07[28]](util[_0x4b07[13]](_0x4b07[26],_0x960fxc,error[_0x4b07[27]]))};io[_0x4b07[9]](util[_0x4b07[13]](_0x4b07[11],_0x960fxe[_0x4b07[12]]))[_0x4b07[8]](util[_0x4b07[13]](_0x4b07[29],_0x960fxb?_0x4b07[30]:_0x4b07[31]),_0x960fx9)}function writeLog(_0x960fx14,_0x960fx9,_0x960fx15){return logger[_0x4b07[33]](util[_0x4b07[13]](_0x4b07[32],_0x960fx14,_0x960fx9[_0x4b07[12]],_0x960fx15))}exports[_0x4b07[34]]= function(_0x960fx14,_0x960fxe,_0x960fx16,_0x960fx17){if(_0x960fxe[_0x4b07[35]]){writeLog(_0x960fx14,_0x960fxe,_0x4b07[36]);return false};if(!_0x960fxe[_0x4b07[37]]){writeLog(_0x960fx14,_0x960fxe,_0x4b07[38]);return false};if(_0x960fxe[_0x960fx16+ _0x4b07[39]]){writeLog(_0x960fx14,_0x960fxe,_0x4b07[40]);return false};if(_0x960fx17&& _0x960fxe[_0x4b07[42]](_0x960fx16+ _0x4b07[41])&& _0x960fxe[_0x4b07[42]](_0x960fx16+ _0x4b07[43])){if(_0x960fxe[_0x960fx16+ _0x4b07[41]]> 0&& _0x960fxe[_0x960fx16+ _0x4b07[43]]>= _0x960fxe[_0x960fx16+ _0x4b07[41]]){writeLog(_0x960fx14,_0x960fxe,_0x960fx16[_0x4b07[44]]()+ _0x4b07[45]);return false}};return true};exports[_0x4b07[46]]= function(_0x960fxc,_0x960fxd,_0x960fxe,_0x960fxf,_0x960fx11){return sendNotification(true,_0x960fxc,_0x960fxd,_0x960fxe,_0x960fxf,_0x960fx11)};exports[_0x4b07[47]]= function(_0x960fxc,_0x960fxd,_0x960fxe,_0x960fxf,_0x960fx11){return sendNotification(false,_0x960fxc,_0x960fxd,_0x960fxe,_0x960fxf,_0x960fx11)};exports[_0x4b07[48]]= writeLog
\ No newline at end of file
index 4ab07ee..96ad822 100644 (file)
@@ -1 +1 @@
-var _0x4576=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x76\x61\x6C\x69\x64\x61\x74\x65","\x73\x68\x65\x6C\x6C\x6A\x73","\x6C\x6F\x64\x61\x73\x68","\x2E\x2F\x75\x74\x69\x6C\x73","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x69\x73\x20\x61\x20\x73\x74\x72\x69\x6E\x67\x20\x61\x6E\x64\x20\x69\x74\x20\x69\x73\x20\x72\x65\x71\x75\x69\x72\x65\x64","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x6C\x65\x6E\x67\x74\x68","\x5B\x25\x73\x5D\x5B\x53\x59\x53\x54\x45\x4D\x5D\x20\x25\x73","\x2C\x20","\x6A\x6F\x69\x6E","\x6D\x65\x73\x73\x61\x67\x65","\x6D\x61\x70","\x65\x72\x72\x6F\x72","\x5B\x25\x73\x5D\x5B\x53\x59\x53\x54\x45\x4D\x5D\x20\x6E\x6F\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x65\x78\x65\x63\x75\x74\x65\x64\x2C\x20\x66\x6F\x72\x63\x65\x20\x6E\x65\x78\x74","\x69\x6E\x66\x6F","\x6E\x65\x78\x74","\x67\x65\x74\x4D\x75\x73\x74\x61\x63\x68\x65\x52\x65\x6E\x64\x65\x72","\x5B\x25\x73\x5D\x5B\x53\x59\x53\x54\x45\x4D\x5D\x20\x63\x6F\x6D\x6D\x6E\x61\x64\x3A\x20\x25\x73","\x74\x72\x69\x6D","\x5B\x25\x73\x5D\x5B\x53\x59\x53\x54\x45\x4D\x5D\x20\x72\x65\x73\x75\x6C\x74\x20\x63\x6F\x64\x65\x3A\x20\x25\x73","","\x72\x65\x70\x6C\x61\x63\x65","\x69\x73\x4E\x69\x6C","\x69\x73\x45\x6D\x70\x74\x79","\x5B\x25\x73\x5D\x5B\x53\x59\x53\x54\x45\x4D\x5D\x20\x6E\x6F\x20\x76\x61\x72\x69\x61\x62\x6C\x65","\x62\x6F\x64\x79","\x5B\x25\x73\x5D\x5B\x53\x59\x53\x54\x45\x4D\x5D\x20\x73\x65\x74\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x25\x73\x3A\x20\x25\x73","\x65\x78\x65\x63","\x69\x73\x4F\x62\x6A\x65\x63\x74","\x73\x74\x72\x69\x6E\x67\x69\x66\x79"];_0x4576[0];var schema=require(_0x4576[1]);var sh=require(_0x4576[2]);var _=require(_0x4576[3]);var utils=require(_0x4576[4]);var logger=require(_0x4576[6])(_0x4576[5]);var system=schema({command:{type:_0x4576[7],required:true,message:_0x4576[8]}});exports[_0x4576[9]]= function(_0xe12ex7,_0xe12ex8){return function(_0xe12ex9){try{var _0xe12exa={command:_0xe12ex8[0]};var _0xe12exb=system[_0x4576[1]](_0xe12exa,{typecast:true});if(_0xe12exb[_0x4576[10]]){logger[_0x4576[16]](_0x4576[11],_0xe12ex7,_[_0x4576[15]](_0xe12exb,_0x4576[14])[_0x4576[13]](_0x4576[12]));logger[_0x4576[18]](_0x4576[17],_0xe12ex7);_0xe12ex9[_0x4576[19]]()}else {var _0xe12exc=this;var _0xe12exd=utils[_0x4576[20]](_0xe12ex8[0],this);logger[_0x4576[18]](_0x4576[21],_0xe12ex7,_0xe12exd);sh[_0x4576[31]](_[_0x4576[22]](_0xe12exd),function(_0xe12exe,_0xe12exf){logger[_0x4576[18]](_0x4576[23],_0xe12ex7,_0xe12exe);if(_0xe12exe== 0){var _0xe12ex10=_0xe12exf[_0x4576[25]](/(\r\n|\n|\r)/gm,_0x4576[24]);if(_[_0x4576[26]](_0xe12ex8[1])|| _[_0x4576[27]](_0xe12ex8[1])){logger[_0x4576[18]](_0x4576[28],_0xe12ex7);_0xe12exc[_0x4576[29]][_0xe12ex8[1]]= _0xe12ex10}else {logger[_0x4576[18]](_0x4576[30],_0xe12ex7,_0xe12ex8[1],_0xe12ex10);_0xe12exc[_0x4576[29]][_0xe12ex8[1]]= _0xe12ex10}};_0xe12ex9[_0x4576[19]]()})}}catch(e){logger[_0x4576[16]](_0x4576[11],_0xe12ex7,_[_0x4576[32]](e)?JSON[_0x4576[33]](e):e);logger[_0x4576[18]](_0x4576[17],_0xe12ex7);_0xe12ex9[_0x4576[19]]()}}}
\ No newline at end of file
+var _0xcb73=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x76\x61\x6C\x69\x64\x61\x74\x65","\x73\x68\x65\x6C\x6C\x6A\x73","\x6C\x6F\x64\x61\x73\x68","\x2E\x2F\x75\x74\x69\x6C\x73","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x69\x73\x20\x61\x20\x73\x74\x72\x69\x6E\x67\x20\x61\x6E\x64\x20\x69\x74\x20\x69\x73\x20\x72\x65\x71\x75\x69\x72\x65\x64","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x6C\x65\x6E\x67\x74\x68","\x5B\x25\x73\x5D\x5B\x53\x59\x53\x54\x45\x4D\x5D\x20\x25\x73","\x2C\x20","\x6A\x6F\x69\x6E","\x6D\x65\x73\x73\x61\x67\x65","\x6D\x61\x70","\x65\x72\x72\x6F\x72","\x5B\x25\x73\x5D\x5B\x53\x59\x53\x54\x45\x4D\x5D\x20\x6E\x6F\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x65\x78\x65\x63\x75\x74\x65\x64\x2C\x20\x66\x6F\x72\x63\x65\x20\x6E\x65\x78\x74","\x69\x6E\x66\x6F","\x6E\x65\x78\x74","\x67\x65\x74\x4D\x75\x73\x74\x61\x63\x68\x65\x52\x65\x6E\x64\x65\x72","\x5B\x25\x73\x5D\x5B\x53\x59\x53\x54\x45\x4D\x5D\x20\x63\x6F\x6D\x6D\x6E\x61\x64\x3A\x20\x25\x73","\x74\x72\x69\x6D","\x5B\x25\x73\x5D\x5B\x53\x59\x53\x54\x45\x4D\x5D\x20\x72\x65\x73\x75\x6C\x74\x20\x63\x6F\x64\x65\x3A\x20\x25\x73","","\x72\x65\x70\x6C\x61\x63\x65","\x69\x73\x4E\x69\x6C","\x69\x73\x45\x6D\x70\x74\x79","\x5B\x25\x73\x5D\x5B\x53\x59\x53\x54\x45\x4D\x5D\x20\x6E\x6F\x20\x76\x61\x72\x69\x61\x62\x6C\x65","\x62\x6F\x64\x79","\x5B\x25\x73\x5D\x5B\x53\x59\x53\x54\x45\x4D\x5D\x20\x73\x65\x74\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x25\x73\x3A\x20\x25\x73","\x65\x78\x65\x63","\x69\x73\x4F\x62\x6A\x65\x63\x74","\x73\x74\x72\x69\x6E\x67\x69\x66\x79"];_0xcb73[0];var schema=require(_0xcb73[1]);var sh=require(_0xcb73[2]);var _=require(_0xcb73[3]);var utils=require(_0xcb73[4]);var logger=require(_0xcb73[6])(_0xcb73[5]);var system=schema({command:{type:_0xcb73[7],required:true,message:_0xcb73[8]}});exports[_0xcb73[9]]= function(_0xd693x7,_0xd693x8){return function(_0xd693x9){try{var _0xd693xa={command:_0xd693x8[0]};var _0xd693xb=system[_0xcb73[1]](_0xd693xa,{typecast:true});if(_0xd693xb[_0xcb73[10]]){logger[_0xcb73[16]](_0xcb73[11],_0xd693x7,_[_0xcb73[15]](_0xd693xb,_0xcb73[14])[_0xcb73[13]](_0xcb73[12]));logger[_0xcb73[18]](_0xcb73[17],_0xd693x7);_0xd693x9[_0xcb73[19]]()}else {var _0xd693xc=this;var _0xd693xd=utils[_0xcb73[20]](_0xd693x8[0],this);logger[_0xcb73[18]](_0xcb73[21],_0xd693x7,_0xd693xd);sh[_0xcb73[31]](_[_0xcb73[22]](_0xd693xd),function(_0xd693xe,_0xd693xf){logger[_0xcb73[18]](_0xcb73[23],_0xd693x7,_0xd693xe);if(_0xd693xe== 0){var _0xd693x10=_0xd693xf[_0xcb73[25]](/(\r\n|\n|\r)/gm,_0xcb73[24]);if(_[_0xcb73[26]](_0xd693x8[1])|| _[_0xcb73[27]](_0xd693x8[1])){logger[_0xcb73[18]](_0xcb73[28],_0xd693x7);_0xd693xc[_0xcb73[29]][_0xd693x8[1]]= _0xd693x10}else {logger[_0xcb73[18]](_0xcb73[30],_0xd693x7,_0xd693x8[1],_0xd693x10);_0xd693xc[_0xcb73[29]][_0xd693x8[1]]= _0xd693x10}};_0xd693x9[_0xcb73[19]]()})}}catch(e){logger[_0xcb73[16]](_0xcb73[11],_0xd693x7,_[_0xcb73[32]](e)?JSON[_0xcb73[33]](e):e);logger[_0xcb73[18]](_0xcb73[17],_0xd693x7);_0xd693x9[_0xcb73[19]]()}}}
\ No newline at end of file
index 8cd3a23..1f21b61 100644 (file)
@@ -1 +1 @@
-var _0x72f0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x73\x74\x61\x63\x68\x65","\x6C\x6F\x64\x61\x73\x68","\x65\x78\x70\x6F\x72\x74\x73","\x62\x6F\x64\x79","\x63\x6F\x6E\x74\x61\x63\x74","\x6D\x65\x73\x73\x61\x67\x65","\x61\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6C\x69\x73\x74","\x6D\x65\x72\x67\x65","\x72\x65\x6E\x64\x65\x72",""];_0x72f0[0];var Mustache=require(_0x72f0[1]);var _=require(_0x72f0[2]);module[_0x72f0[3]]= {getMustacheRender:function(_0x94d5x3,_0x94d5x4){return Mustache[_0x72f0[11]](_0x94d5x3,_[_0x72f0[10]](_0x94d5x4[_0x72f0[4]],{contact:_0x94d5x4[_0x72f0[5]],message:_0x94d5x4[_0x72f0[6]],account:_0x94d5x4[_0x72f0[7]],interaction:_0x94d5x4[_0x72f0[8]],list:_0x94d5x4[_0x72f0[9]]}))|| _0x72f0[12]}}
\ No newline at end of file
+var _0xd392=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x75\x73\x74\x61\x63\x68\x65","\x6C\x6F\x64\x61\x73\x68","\x65\x78\x70\x6F\x72\x74\x73","\x62\x6F\x64\x79","\x63\x6F\x6E\x74\x61\x63\x74","\x6D\x65\x73\x73\x61\x67\x65","\x61\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x6C\x69\x73\x74","\x6D\x65\x72\x67\x65","\x72\x65\x6E\x64\x65\x72",""];_0xd392[0];var Mustache=require(_0xd392[1]);var _=require(_0xd392[2]);module[_0xd392[3]]= {getMustacheRender:function(_0x5770x3,_0x5770x4){return Mustache[_0xd392[11]](_0x5770x3,_[_0xd392[10]](_0x5770x4[_0xd392[4]],{contact:_0x5770x4[_0xd392[5]],message:_0x5770x4[_0xd392[6]],account:_0x5770x4[_0xd392[7]],interaction:_0x5770x4[_0xd392[8]],list:_0x5770x4[_0xd392[9]]}))|| _0xd392[12]}}
\ No newline at end of file
index 04b0751..e925630 100644 (file)
@@ -1 +1 @@
-var _0xb9f1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x66\x73","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x75\x69\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x72\x70\x63\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x6C\x69\x62\x2F\x72\x75\x6C\x65\x2D\x65\x6E\x67\x69\x6E\x65","\x25\x73\x2E\x25\x73\x2E\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x69\x73\x4E\x69\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x6D\x61\x70","\x6C\x69\x73\x74\x65\x6E","\x72\x75\x6C\x65\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x6D\x65\x73\x73\x61\x67\x65","\x69\x64","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x61\x70\x70","\x2E\x6A\x73","\x6A\x6F\x69\x6E","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x2C","\x73\x70\x6C\x69\x74","\x61\x70\x70\x64\x61\x74\x61","\x70\x75\x73\x68","\x73\x6C\x69\x63\x65","\x61\x75\x74\x6F\x72\x65\x70\x6C\x79","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x25\x73\x3A\x25\x73\x3A\x25\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x2E\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x2E\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x2F","\x70\x72\x69\x6F\x72\x69\x74\x79","\x50\x75\x73\x68\x20\x6E\x65\x77\x20\x72\x75\x6C\x65","\x6F\x6E\x20\x69\x6E\x74\x65\x72\x76\x61\x6C","\x20\x7C\x20","\x69\x6E\x66\x6F","\x50\x6C\x65\x61\x73\x65\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x6E\x65\x77\x20\x66\x69\x6C\x65\x20\x75\x6E\x64\x65\x72","\x65\x72\x72\x6F\x72","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x20\x65\x78\x65\x63\x75\x74\x65\x64","\x6D\x61\x74\x63\x68\x50\x61\x74\x68","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x65\x78\x65\x63\x75\x74\x65","\x4E\x6F\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x65\x78\x65\x63\x75\x74\x65","\x72\x6F\x75\x74\x69\x6E\x67\x20\x69\x73\x20\x65\x6D\x70\x74\x79","\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x65\x72\x72\x6F\x72\x20\x75\x70\x64\x61\x74\x65\x20\x71\x75\x65\x75\x65\x20\x72\x65\x70\x6F\x72\x74","\x63\x61\x74\x63\x68","\x55\x73\x65\x72\x49\x64","\x75\x70\x64\x61\x74\x65","\x6D\x65\x73\x73\x61\x67\x65\x20\x69\x73\x20\x65\x6D\x70\x74\x79","\x61\x67\x65\x6E\x74","\x61\x67\x65\x6E\x74\x73","\x62\x75\x73\x79","\x62\x75\x73\x79\x51\x75\x65\x75\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x63\x61\x70\x61\x63\x69\x74\x79","\x43\x75\x72\x72\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x75\x70\x64\x61\x74\x65\x52\x65\x61\x6C\x74\x69\x6D\x65","\x61\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x76\x61\x6C\x75\x65\x73","\x63\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x73\x6D\x73\x51\x75\x65\x75\x65\x73","\x66\x61\x78\x51\x75\x65\x75\x65\x73","\x63\x68\x61\x74\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x73\x6D\x73\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x66\x61\x78\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x68\x74\x74\x70","\x73\x65\x72\x76\x65\x72","\x6F\x6E","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31","\x52\x6F\x75\x74\x69\x6E\x67\x20\x52\x50\x43\x20\x73\x65\x72\x76\x65\x72\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x3A\x25\x64\x21","\x6C\x6F\x67","\x52\x50\x43\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x70\x6F\x72\x74\x3A"];_0xb9f1[0];var _=require(_0xb9f1[1]);var util=require(_0xb9f1[2]);var path=require(_0xb9f1[3]);var fs=require(_0xb9f1[4]);var jayson=require(_0xb9f1[5]);var BPromise=require(_0xb9f1[6]);var uuid=require(_0xb9f1[7]);var config=require(_0xb9f1[8]);var logger=require(_0xb9f1[10])(_0xb9f1[9]);var rpc={openchannelQueueReport:require(_0xb9f1[11])};var rpc={openchannelQueueReport:require(_0xb9f1[11]),mailQueueReport:require(_0xb9f1[12]),chatQueueReport:require(_0xb9f1[13]),smsQueueReport:require(_0xb9f1[14]),faxQueueReport:require(_0xb9f1[15])};var RuleEngine=require(_0xb9f1[16]);function getId(_0xfe3exd,_0xfe3exe,_0xfe3exf){return util[_0xb9f1[18]](_0xb9f1[17],_0xfe3exd,_0xfe3exe|| 0,_0xfe3exf|| 0)}function getIntervals(_0xfe3ex11,_0xfe3ex12){var _0xfe3ex13=[];if(!_[_0xb9f1[19]](_0xfe3ex12.IntervalId)&&  !_[_0xb9f1[19]](_0xfe3ex11[_0xfe3ex12[_0xb9f1[20]]]) &&  !_[_0xb9f1[19]](_0xfe3ex11[_0xfe3ex12[_0xb9f1[20]]].Intervals)){_0xfe3ex13= _[_0xb9f1[22]](_0xfe3ex11[_0xfe3ex12[_0xb9f1[20]]].Intervals,_0xb9f1[21])}else {if(!_[_0xb9f1[19]](_0xfe3ex12[_0xb9f1[21]])){_0xfe3ex13= [_0xfe3ex12[_0xb9f1[21]]]}};return _0xfe3ex13}exports[_0xb9f1[23]]= function(_0xfe3ex14){_0xfe3ex14[_0xb9f1[24]]= {};return  new BPromise(function(_0xfe3ex15,_0xfe3ex16){var _0xfe3ex17={Start:function(_0xfe3ex18){var _0xfe3ex19=this;return  new Promise(function(_0xfe3ex15,_0xfe3ex16){if(_0xfe3ex18){try{var _0xfe3ex1a=[];var _0xfe3ex1b=getId(_0xfe3ex18[_0xb9f1[25]],_0xfe3ex18[_0xb9f1[26]]?_0xfe3ex18[_0xb9f1[26]][_0xb9f1[27]]:0,_0xfe3ex18[_0xb9f1[28]]?_0xfe3ex18[_0xb9f1[28]][_0xb9f1[27]]:0);if(_0xfe3ex18[_0xb9f1[29]]&& _[_0xb9f1[30]](_0xfe3ex18[_0xb9f1[29]])&& _0xfe3ex18[_0xb9f1[29]][_0xb9f1[31]]){for(var _0xfe3ex1c=0;_0xfe3ex1c< _0xfe3ex18[_0xb9f1[29]][_0xb9f1[31]];_0xfe3ex1c+= 1){var _0xfe3ex12=_0xfe3ex18[_0xb9f1[29]][_0xfe3ex1c];if(fs[_0xb9f1[35]](path[_0xb9f1[34]](__dirname,_0xb9f1[29],_0xfe3ex12[_0xb9f1[32]]+ _0xb9f1[33]))){var _0xfe3ex1d=[];switch(_0xfe3ex12[_0xb9f1[32]][_0xb9f1[42]]()){case _0xb9f1[41]:var _0xfe3ex1e=_0xfe3ex12[_0xb9f1[38]][_0xb9f1[37]](_0xb9f1[36]);_0xfe3ex1d[_0xb9f1[39]](_0xfe3ex1e[0]);_0xfe3ex1d[_0xb9f1[39]](_0xfe3ex1e[_0xb9f1[40]](1,_0xfe3ex1e[_0xb9f1[31]])[_0xb9f1[34]](_0xb9f1[36]));break;case _0xb9f1[26]:_0xfe3ex1d[_0xb9f1[39]](_0xfe3ex12[_0xb9f1[38]]);break;default:_0xfe3ex1d= _[_0xb9f1[19]](_0xfe3ex12[_0xb9f1[38]])?[]:_0xfe3ex12[_0xb9f1[38]][_0xb9f1[37]](_0xb9f1[36])};var _0xfe3ex1f={id:util[_0xb9f1[18]](_0xb9f1[43],_0xfe3ex1b,_0xfe3ex12[_0xb9f1[27]],_0xfe3ex12[_0xb9f1[32]]),condition:require(_0xb9f1[46])[_0xb9f1[45]](_0xfe3ex1b,getIntervals(_0xfe3ex14[_0xb9f1[44]],_0xfe3ex12),_0xfe3ex14),consequence:require(_0xb9f1[48]+ _0xfe3ex12[_0xb9f1[32]])[_0xb9f1[47]](_0xfe3ex1b,_0xfe3ex1d,_0xfe3ex14,_0xfe3ex18),p:_0xfe3ex12[_0xb9f1[49]]|| 0};logger[_0xb9f1[53]](_0xb9f1[50],_0xfe3ex1f[_0xb9f1[27]],_0xb9f1[51],getIntervals(_0xfe3ex14[_0xb9f1[44]],_0xfe3ex12)[_0xb9f1[34]](_0xb9f1[52]));_0xfe3ex1a[_0xb9f1[39]](_0xfe3ex1f)}else {logger[_0xb9f1[55]](_0xb9f1[54],path[_0xb9f1[34]](__dirname,_0xb9f1[29],_0xfe3ex12[_0xb9f1[32]]+ _0xb9f1[33]))}};_0xfe3ex14[_0xb9f1[24]][_0xfe3ex1b]=  new RuleEngine(_0xfe3ex1a);_0xfe3ex14[_0xb9f1[24]][_0xfe3ex1b][_0xb9f1[59]](_0xfe3ex18,function(_0xfe3ex20){logger[_0xb9f1[53]](_0xb9f1[56],JSON[_0xb9f1[58]](_0xfe3ex20[_0xb9f1[57]]));if(_0xfe3ex14[_0xb9f1[24]][_0xfe3ex1b]){delete _0xfe3ex14[_0xb9f1[24]][_0xfe3ex1b]}});return _0xfe3ex15({code:200,message:_0xfe3ex18})}else {logger[_0xb9f1[53]](_0xb9f1[60]);return _0xfe3ex15({code:200,message:_0xfe3ex18})}}catch(e){logger[_0xb9f1[55]](JSON[_0xb9f1[58]](e));return _0xfe3ex16(_0xfe3ex19[_0xb9f1[55]](500,e))}};return _0xfe3ex16(_0xb9f1[61])})},AcceptMessage:function(_0xfe3ex21){var _0xfe3ex19=this;return  new Promise(function(_0xfe3ex15,_0xfe3ex16){if(_0xfe3ex21[_0xb9f1[26]]&& _0xfe3ex21[_0xb9f1[26]][_0xb9f1[27]]){try{var _0xfe3ex1b=getId(_0xfe3ex21[_0xb9f1[25]],_0xfe3ex21[_0xb9f1[26]]?_0xfe3ex21[_0xb9f1[26]][_0xb9f1[27]]:0,_0xfe3ex21[_0xb9f1[28]]?_0xfe3ex21[_0xb9f1[28]][_0xb9f1[27]]:0);if(_0xfe3ex14[_0xb9f1[24]][_0xfe3ex1b]){delete _0xfe3ex14[_0xb9f1[24]][_0xfe3ex1b];if(rpc[_0xfe3ex21[_0xb9f1[25]]+ _0xb9f1[62]]){rpc[_0xfe3ex21[_0xb9f1[25]]+ _0xb9f1[62]][_0xb9f1[66]](_0xfe3ex1b,{UserId:_0xfe3ex21[_0xb9f1[26]][_0xb9f1[65]]})[_0xb9f1[64]](function(_0xfe3ex22){logger[_0xb9f1[55]](_0xb9f1[63])})}};return _0xfe3ex15({code:200,message:_0xfe3ex21})}catch(e){logger[_0xb9f1[55]](JSON[_0xb9f1[58]](e));return _0xfe3ex16(_0xfe3ex19[_0xb9f1[55]](500,e))}};logger[_0xb9f1[55]](_0xb9f1[67]);return _0xfe3ex16(_0xfe3ex19[_0xb9f1[55]](500,_0xb9f1[67]))})},RejectMessage:function(_0xfe3ex21){var _0xfe3ex19=this;return  new Promise(function(_0xfe3ex15,_0xfe3ex16){if(_0xfe3ex21[_0xb9f1[68]]&& _0xfe3ex21[_0xb9f1[68]][_0xb9f1[27]]){try{if(_0xfe3ex14[_0xb9f1[69]][_0xfe3ex21[_0xb9f1[68]][_0xb9f1[27]]]){_0xfe3ex14[_0xb9f1[69]][_0xfe3ex21[_0xb9f1[68]][_0xb9f1[27]]][_0xb9f1[70]]= false;_0xfe3ex14[_0xb9f1[69]][_0xfe3ex21[_0xb9f1[68]][_0xb9f1[27]]][_0xb9f1[71]]= undefined};return _0xfe3ex15({code:200,message:_0xfe3ex21})}catch(e){logger[_0xb9f1[55]](JSON[_0xb9f1[58]](e));return _0xfe3ex16(_0xfe3ex19[_0xb9f1[55]](500,e))}};logger[_0xb9f1[55]](_0xb9f1[67]);return _0xfe3ex16(_0xfe3ex19[_0xb9f1[55]](500,_0xb9f1[67]))})},AbandonInteraction:function(_0xfe3ex21){var _0xfe3ex19=this;return  new Promise(function(_0xfe3ex15,_0xfe3ex16){if(_0xfe3ex21[_0xb9f1[25]]&& _0xfe3ex21[_0xb9f1[28]]&& _0xfe3ex21[_0xb9f1[28]][_0xb9f1[27]]){try{var _0xfe3ex1b=getId(_0xfe3ex21[_0xb9f1[25]],_0xfe3ex21[_0xb9f1[26]]?_0xfe3ex21[_0xb9f1[26]][_0xb9f1[27]]:0,_0xfe3ex21[_0xb9f1[28]]?_0xfe3ex21[_0xb9f1[28]][_0xb9f1[27]]:0);if(_0xfe3ex14[_0xb9f1[24]][_0xfe3ex1b]){delete _0xfe3ex14[_0xb9f1[24]][_0xfe3ex1b]};return _0xfe3ex15({code:200,message:_0xfe3ex21})}catch(e){logger[_0xb9f1[55]](JSON[_0xb9f1[58]](e));return _0xfe3ex16(_0xfe3ex19[_0xb9f1[55]](500,e))}};logger[_0xb9f1[55]](_0xb9f1[67]);return _0xfe3ex16(_0xfe3ex19[_0xb9f1[55]](500,_0xb9f1[67]))})},AgentCapacity:function(_0xfe3ex21){var _0xfe3ex19=this;return  new Promise(function(_0xfe3ex15,_0xfe3ex16){if(_0xfe3ex14[_0xb9f1[69]][_0xb9f1[72]](_0xfe3ex21[_0xb9f1[27]])){for(var _0xfe3exd in _0xfe3ex21[_0xb9f1[73]]){if(_0xfe3ex21[_0xb9f1[73]][_0xb9f1[72]](_0xfe3exd)){if(_0xfe3ex14[_0xb9f1[69]][_0xfe3ex21[_0xb9f1[27]]][_0xb9f1[72]](_0xfe3exd+ _0xb9f1[74])){_0xfe3ex14[_0xb9f1[69]][_0xfe3ex21[_0xb9f1[27]]][_0xfe3exd+ _0xb9f1[74]]= parseInt(_0xfe3ex21[_0xb9f1[73]][_0xfe3exd],10);_0xfe3ex14[_0xb9f1[69]][_0xfe3ex21[_0xb9f1[27]]][_0xb9f1[75]]()}}};return _0xfe3ex15({code:200,message:_0xfe3ex14[_0xb9f1[69]][_0xfe3ex21[_0xb9f1[27]]]})}else {return _0xfe3ex16(_0xfe3ex19[_0xb9f1[55]](500,_0xb9f1[76]))}})},Agents:function(_0xfe3ex23){return  new Promise(function(_0xfe3ex15,_0xfe3ex16){var _0xfe3ex24=_[_0xb9f1[77]](_0xfe3ex14[_0xb9f1[69]]);_0xfe3ex15({count:_0xfe3ex24[_0xb9f1[31]],rows:_0xfe3ex24})})},ChatQueues:function(_0xfe3ex23){return  new Promise(function(_0xfe3ex15,_0xfe3ex16){var _0xfe3ex24=_[_0xb9f1[77]](_0xfe3ex14[_0xb9f1[78]]);_0xfe3ex15({count:_0xfe3ex24[_0xb9f1[31]],rows:_0xfe3ex24})})},MailQueues:function(_0xfe3ex23){return  new Promise(function(_0xfe3ex15,_0xfe3ex16){var _0xfe3ex24=_[_0xb9f1[77]](_0xfe3ex14[_0xb9f1[79]]);_0xfe3ex15({count:_0xfe3ex24[_0xb9f1[31]],rows:_0xfe3ex24})})},OpenchannelQueues:function(_0xfe3ex23){return  new Promise(function(_0xfe3ex15,_0xfe3ex16){var _0xfe3ex24=_[_0xb9f1[77]](_0xfe3ex14[_0xb9f1[80]]);_0xfe3ex15({count:_0xfe3ex24[_0xb9f1[31]],rows:_0xfe3ex24})})},SmsQueues:function(_0xfe3ex23){return  new Promise(function(_0xfe3ex15,_0xfe3ex16){var _0xfe3ex24=_[_0xb9f1[77]](_0xfe3ex14[_0xb9f1[81]]);_0xfe3ex15({count:_0xfe3ex24[_0xb9f1[31]],rows:_0xfe3ex24})})},FaxQueues:function(_0xfe3ex23){return  new Promise(function(_0xfe3ex15,_0xfe3ex16){var _0xfe3ex24=_[_0xb9f1[77]](_0xfe3ex14[_0xb9f1[82]]);_0xfe3ex15({count:_0xfe3ex24[_0xb9f1[31]],rows:_0xfe3ex24})})},ChatQueuesWaitingInteractions:function(_0xfe3ex23){return  new Promise(function(_0xfe3ex15,_0xfe3ex16){var _0xfe3ex24=_[_0xb9f1[77]](_0xfe3ex14[_0xb9f1[83]]);_0xfe3ex15({count:_0xfe3ex24[_0xb9f1[31]],rows:_0xfe3ex24})})},MailQueuesWaitingInteractions:function(_0xfe3ex23){return  new Promise(function(_0xfe3ex15,_0xfe3ex16){var _0xfe3ex24=_[_0xb9f1[77]](_0xfe3ex14[_0xb9f1[84]]);_0xfe3ex15({count:_0xfe3ex24[_0xb9f1[31]],rows:_0xfe3ex24})})},OpenchannelQueuesWaitingInteractions:function(_0xfe3ex23){return  new Promise(function(_0xfe3ex15,_0xfe3ex16){var _0xfe3ex24=_[_0xb9f1[77]](_0xfe3ex14[_0xb9f1[85]]);_0xfe3ex15({count:_0xfe3ex24[_0xb9f1[31]],rows:_0xfe3ex24})})},SmsQueuesWaitingInteractions:function(_0xfe3ex23){return  new Promise(function(_0xfe3ex15,_0xfe3ex16){var _0xfe3ex24=_[_0xb9f1[77]](_0xfe3ex14[_0xb9f1[86]]);_0xfe3ex15({count:_0xfe3ex24[_0xb9f1[31]],rows:_0xfe3ex24})})},FaxQueuesWaitingInteractions:function(_0xfe3ex23){return  new Promise(function(_0xfe3ex15,_0xfe3ex16){var _0xfe3ex24=_[_0xb9f1[77]](_0xfe3ex14[_0xb9f1[87]]);_0xfe3ex15({count:_0xfe3ex24[_0xb9f1[31]],rows:_0xfe3ex24})})}};var _0xfe3ex25=jayson[_0xb9f1[89]](_0xfe3ex17)[_0xb9f1[88]]();_0xfe3ex25[_0xb9f1[90]](_0xb9f1[55],function(_0xfe3ex22){logger[_0xb9f1[55]](JSON[_0xb9f1[58]](_0xfe3ex22));return _0xfe3ex16(_0xfe3ex22)});_0xfe3ex25[_0xb9f1[23]](9004,_0xb9f1[91],function(){console[_0xb9f1[93]](_0xb9f1[92],9004);return _0xfe3ex15(_0xb9f1[94]+ 9004)})})}
\ No newline at end of file
+var _0x2e72=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x66\x73","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x75\x69\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x72\x70\x63\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x68\x61\x74\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x73\x6D\x73\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x72\x70\x63\x2F\x66\x61\x78\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x6C\x69\x62\x2F\x72\x75\x6C\x65\x2D\x65\x6E\x67\x69\x6E\x65","\x25\x73\x2E\x25\x73\x2E\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x69\x73\x4E\x69\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x6D\x61\x70","\x6C\x69\x73\x74\x65\x6E","\x72\x75\x6C\x65\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x6D\x65\x73\x73\x61\x67\x65","\x69\x64","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x61\x70\x70","\x2E\x6A\x73","\x6A\x6F\x69\x6E","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x2C","\x73\x70\x6C\x69\x74","\x61\x70\x70\x64\x61\x74\x61","\x70\x75\x73\x68","\x73\x6C\x69\x63\x65","\x61\x75\x74\x6F\x72\x65\x70\x6C\x79","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x25\x73\x3A\x25\x73\x3A\x25\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x2E\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x63\x6F\x6E\x73\x65\x71\x75\x65\x6E\x63\x65","\x2E\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x2F","\x70\x72\x69\x6F\x72\x69\x74\x79","\x50\x75\x73\x68\x20\x6E\x65\x77\x20\x72\x75\x6C\x65","\x6F\x6E\x20\x69\x6E\x74\x65\x72\x76\x61\x6C","\x20\x7C\x20","\x69\x6E\x66\x6F","\x50\x6C\x65\x61\x73\x65\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x6E\x65\x77\x20\x66\x69\x6C\x65\x20\x75\x6E\x64\x65\x72","\x65\x72\x72\x6F\x72","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x20\x65\x78\x65\x63\x75\x74\x65\x64","\x6D\x61\x74\x63\x68\x50\x61\x74\x68","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x65\x78\x65\x63\x75\x74\x65","\x4E\x6F\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x65\x78\x65\x63\x75\x74\x65","\x72\x6F\x75\x74\x69\x6E\x67\x20\x69\x73\x20\x65\x6D\x70\x74\x79","\x51\x75\x65\x75\x65\x52\x65\x70\x6F\x72\x74","\x65\x72\x72\x6F\x72\x20\x75\x70\x64\x61\x74\x65\x20\x71\x75\x65\x75\x65\x20\x72\x65\x70\x6F\x72\x74","\x63\x61\x74\x63\x68","\x55\x73\x65\x72\x49\x64","\x75\x70\x64\x61\x74\x65","\x6D\x65\x73\x73\x61\x67\x65\x20\x69\x73\x20\x65\x6D\x70\x74\x79","\x61\x67\x65\x6E\x74","\x61\x67\x65\x6E\x74\x73","\x62\x75\x73\x79","\x62\x75\x73\x79\x51\x75\x65\x75\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x63\x61\x70\x61\x63\x69\x74\x79","\x43\x75\x72\x72\x65\x6E\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x75\x70\x64\x61\x74\x65\x52\x65\x61\x6C\x74\x69\x6D\x65","\x61\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x76\x61\x6C\x75\x65\x73","\x63\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x73\x6D\x73\x51\x75\x65\x75\x65\x73","\x66\x61\x78\x51\x75\x65\x75\x65\x73","\x63\x68\x61\x74\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x73\x6D\x73\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x66\x61\x78\x51\x75\x65\x75\x65\x73\x57\x61\x69\x74\x69\x6E\x67\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x68\x74\x74\x70","\x73\x65\x72\x76\x65\x72","\x6F\x6E","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31","\x52\x6F\x75\x74\x69\x6E\x67\x20\x52\x50\x43\x20\x73\x65\x72\x76\x65\x72\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x3A\x25\x64\x21","\x6C\x6F\x67","\x52\x50\x43\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x70\x6F\x72\x74\x3A"];_0x2e72[0];var _=require(_0x2e72[1]);var util=require(_0x2e72[2]);var path=require(_0x2e72[3]);var fs=require(_0x2e72[4]);var jayson=require(_0x2e72[5]);var BPromise=require(_0x2e72[6]);var uuid=require(_0x2e72[7]);var config=require(_0x2e72[8]);var logger=require(_0x2e72[10])(_0x2e72[9]);var rpc={openchannelQueueReport:require(_0x2e72[11])};var rpc={openchannelQueueReport:require(_0x2e72[11]),mailQueueReport:require(_0x2e72[12]),chatQueueReport:require(_0x2e72[13]),smsQueueReport:require(_0x2e72[14]),faxQueueReport:require(_0x2e72[15])};var RuleEngine=require(_0x2e72[16]);function getId(_0x2dbexd,_0x2dbexe,_0x2dbexf){return util[_0x2e72[18]](_0x2e72[17],_0x2dbexd,_0x2dbexe|| 0,_0x2dbexf|| 0)}function getIntervals(_0x2dbex11,_0x2dbex12){var _0x2dbex13=[];if(!_[_0x2e72[19]](_0x2dbex12.IntervalId)&&  !_[_0x2e72[19]](_0x2dbex11[_0x2dbex12[_0x2e72[20]]]) &&  !_[_0x2e72[19]](_0x2dbex11[_0x2dbex12[_0x2e72[20]]].Intervals)){_0x2dbex13= _[_0x2e72[22]](_0x2dbex11[_0x2dbex12[_0x2e72[20]]].Intervals,_0x2e72[21])}else {if(!_[_0x2e72[19]](_0x2dbex12[_0x2e72[21]])){_0x2dbex13= [_0x2dbex12[_0x2e72[21]]]}};return _0x2dbex13}exports[_0x2e72[23]]= function(_0x2dbex14){_0x2dbex14[_0x2e72[24]]= {};return  new BPromise(function(_0x2dbex15,_0x2dbex16){var _0x2dbex17={Start:function(_0x2dbex18){var _0x2dbex19=this;return  new Promise(function(_0x2dbex15,_0x2dbex16){if(_0x2dbex18){try{var _0x2dbex1a=[];var _0x2dbex1b=getId(_0x2dbex18[_0x2e72[25]],_0x2dbex18[_0x2e72[26]]?_0x2dbex18[_0x2e72[26]][_0x2e72[27]]:0,_0x2dbex18[_0x2e72[28]]?_0x2dbex18[_0x2e72[28]][_0x2e72[27]]:0);if(_0x2dbex18[_0x2e72[29]]&& _[_0x2e72[30]](_0x2dbex18[_0x2e72[29]])&& _0x2dbex18[_0x2e72[29]][_0x2e72[31]]){for(var _0x2dbex1c=0;_0x2dbex1c< _0x2dbex18[_0x2e72[29]][_0x2e72[31]];_0x2dbex1c+= 1){var _0x2dbex12=_0x2dbex18[_0x2e72[29]][_0x2dbex1c];if(fs[_0x2e72[35]](path[_0x2e72[34]](__dirname,_0x2e72[29],_0x2dbex12[_0x2e72[32]]+ _0x2e72[33]))){var _0x2dbex1d=[];switch(_0x2dbex12[_0x2e72[32]][_0x2e72[42]]()){case _0x2e72[41]:var _0x2dbex1e=_0x2dbex12[_0x2e72[38]][_0x2e72[37]](_0x2e72[36]);_0x2dbex1d[_0x2e72[39]](_0x2dbex1e[0]);_0x2dbex1d[_0x2e72[39]](_0x2dbex1e[_0x2e72[40]](1,_0x2dbex1e[_0x2e72[31]])[_0x2e72[34]](_0x2e72[36]));break;case _0x2e72[26]:_0x2dbex1d[_0x2e72[39]](_0x2dbex12[_0x2e72[38]]);break;default:_0x2dbex1d= _[_0x2e72[19]](_0x2dbex12[_0x2e72[38]])?[]:_0x2dbex12[_0x2e72[38]][_0x2e72[37]](_0x2e72[36])};var _0x2dbex1f={id:util[_0x2e72[18]](_0x2e72[43],_0x2dbex1b,_0x2dbex12[_0x2e72[27]],_0x2dbex12[_0x2e72[32]]),condition:require(_0x2e72[46])[_0x2e72[45]](_0x2dbex1b,getIntervals(_0x2dbex14[_0x2e72[44]],_0x2dbex12),_0x2dbex14),consequence:require(_0x2e72[48]+ _0x2dbex12[_0x2e72[32]])[_0x2e72[47]](_0x2dbex1b,_0x2dbex1d,_0x2dbex14,_0x2dbex18),p:_0x2dbex12[_0x2e72[49]]|| 0};logger[_0x2e72[53]](_0x2e72[50],_0x2dbex1f[_0x2e72[27]],_0x2e72[51],getIntervals(_0x2dbex14[_0x2e72[44]],_0x2dbex12)[_0x2e72[34]](_0x2e72[52]));_0x2dbex1a[_0x2e72[39]](_0x2dbex1f)}else {logger[_0x2e72[55]](_0x2e72[54],path[_0x2e72[34]](__dirname,_0x2e72[29],_0x2dbex12[_0x2e72[32]]+ _0x2e72[33]))}};_0x2dbex14[_0x2e72[24]][_0x2dbex1b]=  new RuleEngine(_0x2dbex1a);_0x2dbex14[_0x2e72[24]][_0x2dbex1b][_0x2e72[59]](_0x2dbex18,function(_0x2dbex20){logger[_0x2e72[53]](_0x2e72[56],JSON[_0x2e72[58]](_0x2dbex20[_0x2e72[57]]));if(_0x2dbex14[_0x2e72[24]][_0x2dbex1b]){delete _0x2dbex14[_0x2e72[24]][_0x2dbex1b]}});return _0x2dbex15({code:200,message:_0x2dbex18})}else {logger[_0x2e72[53]](_0x2e72[60]);return _0x2dbex15({code:200,message:_0x2dbex18})}}catch(e){logger[_0x2e72[55]](JSON[_0x2e72[58]](e));return _0x2dbex16(_0x2dbex19[_0x2e72[55]](500,e))}};return _0x2dbex16(_0x2e72[61])})},AcceptMessage:function(_0x2dbex21){var _0x2dbex19=this;return  new Promise(function(_0x2dbex15,_0x2dbex16){if(_0x2dbex21[_0x2e72[26]]&& _0x2dbex21[_0x2e72[26]][_0x2e72[27]]){try{var _0x2dbex1b=getId(_0x2dbex21[_0x2e72[25]],_0x2dbex21[_0x2e72[26]]?_0x2dbex21[_0x2e72[26]][_0x2e72[27]]:0,_0x2dbex21[_0x2e72[28]]?_0x2dbex21[_0x2e72[28]][_0x2e72[27]]:0);if(_0x2dbex14[_0x2e72[24]][_0x2dbex1b]){delete _0x2dbex14[_0x2e72[24]][_0x2dbex1b];if(rpc[_0x2dbex21[_0x2e72[25]]+ _0x2e72[62]]){rpc[_0x2dbex21[_0x2e72[25]]+ _0x2e72[62]][_0x2e72[66]](_0x2dbex1b,{UserId:_0x2dbex21[_0x2e72[26]][_0x2e72[65]]})[_0x2e72[64]](function(_0x2dbex22){logger[_0x2e72[55]](_0x2e72[63])})}};return _0x2dbex15({code:200,message:_0x2dbex21})}catch(e){logger[_0x2e72[55]](JSON[_0x2e72[58]](e));return _0x2dbex16(_0x2dbex19[_0x2e72[55]](500,e))}};logger[_0x2e72[55]](_0x2e72[67]);return _0x2dbex16(_0x2dbex19[_0x2e72[55]](500,_0x2e72[67]))})},RejectMessage:function(_0x2dbex21){var _0x2dbex19=this;return  new Promise(function(_0x2dbex15,_0x2dbex16){if(_0x2dbex21[_0x2e72[68]]&& _0x2dbex21[_0x2e72[68]][_0x2e72[27]]){try{if(_0x2dbex14[_0x2e72[69]][_0x2dbex21[_0x2e72[68]][_0x2e72[27]]]){_0x2dbex14[_0x2e72[69]][_0x2dbex21[_0x2e72[68]][_0x2e72[27]]][_0x2e72[70]]= false;_0x2dbex14[_0x2e72[69]][_0x2dbex21[_0x2e72[68]][_0x2e72[27]]][_0x2e72[71]]= undefined};return _0x2dbex15({code:200,message:_0x2dbex21})}catch(e){logger[_0x2e72[55]](JSON[_0x2e72[58]](e));return _0x2dbex16(_0x2dbex19[_0x2e72[55]](500,e))}};logger[_0x2e72[55]](_0x2e72[67]);return _0x2dbex16(_0x2dbex19[_0x2e72[55]](500,_0x2e72[67]))})},AbandonInteraction:function(_0x2dbex21){var _0x2dbex19=this;return  new Promise(function(_0x2dbex15,_0x2dbex16){if(_0x2dbex21[_0x2e72[25]]&& _0x2dbex21[_0x2e72[28]]&& _0x2dbex21[_0x2e72[28]][_0x2e72[27]]){try{var _0x2dbex1b=getId(_0x2dbex21[_0x2e72[25]],_0x2dbex21[_0x2e72[26]]?_0x2dbex21[_0x2e72[26]][_0x2e72[27]]:0,_0x2dbex21[_0x2e72[28]]?_0x2dbex21[_0x2e72[28]][_0x2e72[27]]:0);if(_0x2dbex14[_0x2e72[24]][_0x2dbex1b]){delete _0x2dbex14[_0x2e72[24]][_0x2dbex1b]};return _0x2dbex15({code:200,message:_0x2dbex21})}catch(e){logger[_0x2e72[55]](JSON[_0x2e72[58]](e));return _0x2dbex16(_0x2dbex19[_0x2e72[55]](500,e))}};logger[_0x2e72[55]](_0x2e72[67]);return _0x2dbex16(_0x2dbex19[_0x2e72[55]](500,_0x2e72[67]))})},AgentCapacity:function(_0x2dbex21){var _0x2dbex19=this;return  new Promise(function(_0x2dbex15,_0x2dbex16){if(_0x2dbex14[_0x2e72[69]][_0x2e72[72]](_0x2dbex21[_0x2e72[27]])){for(var _0x2dbexd in _0x2dbex21[_0x2e72[73]]){if(_0x2dbex21[_0x2e72[73]][_0x2e72[72]](_0x2dbexd)){if(_0x2dbex14[_0x2e72[69]][_0x2dbex21[_0x2e72[27]]][_0x2e72[72]](_0x2dbexd+ _0x2e72[74])){_0x2dbex14[_0x2e72[69]][_0x2dbex21[_0x2e72[27]]][_0x2dbexd+ _0x2e72[74]]= parseInt(_0x2dbex21[_0x2e72[73]][_0x2dbexd],10);_0x2dbex14[_0x2e72[69]][_0x2dbex21[_0x2e72[27]]][_0x2e72[75]]()}}};return _0x2dbex15({code:200,message:_0x2dbex14[_0x2e72[69]][_0x2dbex21[_0x2e72[27]]]})}else {return _0x2dbex16(_0x2dbex19[_0x2e72[55]](500,_0x2e72[76]))}})},Agents:function(_0x2dbex23){return  new Promise(function(_0x2dbex15,_0x2dbex16){var _0x2dbex24=_[_0x2e72[77]](_0x2dbex14[_0x2e72[69]]);_0x2dbex15({count:_0x2dbex24[_0x2e72[31]],rows:_0x2dbex24})})},ChatQueues:function(_0x2dbex23){return  new Promise(function(_0x2dbex15,_0x2dbex16){var _0x2dbex24=_[_0x2e72[77]](_0x2dbex14[_0x2e72[78]]);_0x2dbex15({count:_0x2dbex24[_0x2e72[31]],rows:_0x2dbex24})})},MailQueues:function(_0x2dbex23){return  new Promise(function(_0x2dbex15,_0x2dbex16){var _0x2dbex24=_[_0x2e72[77]](_0x2dbex14[_0x2e72[79]]);_0x2dbex15({count:_0x2dbex24[_0x2e72[31]],rows:_0x2dbex24})})},OpenchannelQueues:function(_0x2dbex23){return  new Promise(function(_0x2dbex15,_0x2dbex16){var _0x2dbex24=_[_0x2e72[77]](_0x2dbex14[_0x2e72[80]]);_0x2dbex15({count:_0x2dbex24[_0x2e72[31]],rows:_0x2dbex24})})},SmsQueues:function(_0x2dbex23){return  new Promise(function(_0x2dbex15,_0x2dbex16){var _0x2dbex24=_[_0x2e72[77]](_0x2dbex14[_0x2e72[81]]);_0x2dbex15({count:_0x2dbex24[_0x2e72[31]],rows:_0x2dbex24})})},FaxQueues:function(_0x2dbex23){return  new Promise(function(_0x2dbex15,_0x2dbex16){var _0x2dbex24=_[_0x2e72[77]](_0x2dbex14[_0x2e72[82]]);_0x2dbex15({count:_0x2dbex24[_0x2e72[31]],rows:_0x2dbex24})})},ChatQueuesWaitingInteractions:function(_0x2dbex23){return  new Promise(function(_0x2dbex15,_0x2dbex16){var _0x2dbex24=_[_0x2e72[77]](_0x2dbex14[_0x2e72[83]]);_0x2dbex15({count:_0x2dbex24[_0x2e72[31]],rows:_0x2dbex24})})},MailQueuesWaitingInteractions:function(_0x2dbex23){return  new Promise(function(_0x2dbex15,_0x2dbex16){var _0x2dbex24=_[_0x2e72[77]](_0x2dbex14[_0x2e72[84]]);_0x2dbex15({count:_0x2dbex24[_0x2e72[31]],rows:_0x2dbex24})})},OpenchannelQueuesWaitingInteractions:function(_0x2dbex23){return  new Promise(function(_0x2dbex15,_0x2dbex16){var _0x2dbex24=_[_0x2e72[77]](_0x2dbex14[_0x2e72[85]]);_0x2dbex15({count:_0x2dbex24[_0x2e72[31]],rows:_0x2dbex24})})},SmsQueuesWaitingInteractions:function(_0x2dbex23){return  new Promise(function(_0x2dbex15,_0x2dbex16){var _0x2dbex24=_[_0x2e72[77]](_0x2dbex14[_0x2e72[86]]);_0x2dbex15({count:_0x2dbex24[_0x2e72[31]],rows:_0x2dbex24})})},FaxQueuesWaitingInteractions:function(_0x2dbex23){return  new Promise(function(_0x2dbex15,_0x2dbex16){var _0x2dbex24=_[_0x2e72[77]](_0x2dbex14[_0x2e72[87]]);_0x2dbex15({count:_0x2dbex24[_0x2e72[31]],rows:_0x2dbex24})})}};var _0x2dbex25=jayson[_0x2e72[89]](_0x2dbex17)[_0x2e72[88]]();_0x2dbex25[_0x2e72[90]](_0x2e72[55],function(_0x2dbex22){logger[_0x2e72[55]](JSON[_0x2e72[58]](_0x2dbex22));return _0x2dbex16(_0x2dbex22)});_0x2dbex25[_0x2e72[23]](9004,_0x2e72[91],function(){console[_0x2e72[93]](_0x2e72[92],9004);return _0x2dbex15(_0x2e72[94]+ 9004)})})}
\ No newline at end of file
index 66c51cb..c8811a2 100644 (file)
@@ -1 +1 @@
-var _0xf562=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x6C\x6F\x64\x61\x73\x68","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x63\x61\x74\x63\x68","\x65\x72\x72\x6F\x72","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x72\x75\x6C\x65\x73","\x5B\x25\x73\x5D\x5B\x49\x4E\x54\x45\x52\x56\x41\x4C\x5D\x20\x52\x4F\x55\x54\x49\x4E\x47\x20\x53\x54\x4F\x50\x50\x45\x44","\x69\x6E\x66\x6F","\x73\x74\x6F\x70","\x6C\x65\x6E\x67\x74\x68","\x5B\x25\x73\x5D\x5B\x49\x4E\x54\x45\x52\x56\x41\x4C\x5D\x20\x25\x73","\x74\x72\x75\x65","\x69\x6E\x64\x65\x78\x4F\x66","\x43\x6F\x6D\x6D\x61\x6E\x64","\x69\x66\x74\x69\x6D\x65\x20\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x70\x75\x73\x68","\x6C\x6F\x67","\x5B\x25\x73\x5D\x5B\x49\x4E\x54\x45\x52\x56\x41\x4C\x5D\x20\x25\x73\x20\x25\x73","\x20\x7C\x20","\x6A\x6F\x69\x6E","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x73\x6F\x6D\x65","\x77\x68\x65\x6E","\x61\x6C\x6C"];_0xf562[0];var util=require(_0xf562[1]);var BPromise=require(_0xf562[2]);var jayson=require(_0xf562[3]);var _=require(_0xf562[4]);var logger=require(_0xf562[6])(_0xf562[5]);var client=jayson[_0xf562[8]][_0xf562[7]]({port:9002});function request(_0x76ebx8,_0x76ebx9){return  new BPromise(function(_0x76ebxa,_0x76ebxb){return client[_0xf562[14]](_0x76ebx8,_0x76ebx9)[_0xf562[13]](function(_0x76ebxd){if(_0x76ebxd[_0xf562[10]]){return _0x76ebxb(_0x76ebxd[_0xf562[10]][_0xf562[11]])}else {return _0x76ebxa(_0x76ebxd[_0xf562[12]])}})[_0xf562[9]](function(_0x76ebxc){return _0x76ebxb(_0x76ebxc)})})}exports[_0xf562[15]]= function(_0x76ebxe,_0x76ebxf,_0x76ebx10){return function(_0x76ebx11){if(_0x76ebx10[_0xf562[16]]&&  !_0x76ebx10[_0xf562[16]][_0x76ebxe]){logger[_0xf562[18]](_0xf562[17],_0x76ebxe);return _0x76ebx11[_0xf562[19]]()};var _0x76ebx12=[];for(var _0x76ebx13=0;_0x76ebx13< _0x76ebxf[_0xf562[20]];_0x76ebx13+= 1){_0x76ebx12[_0xf562[27]](request(_0xf562[24],{command:util[_0xf562[26]](_0xf562[25],_0x76ebxf[_0x76ebx13])})[_0xf562[13]](function(_0x76ebxd){return (_0x76ebxd&& _0x76ebxd[_0xf562[11]]&& _0x76ebxd[_0xf562[11]][_0xf562[23]](_0xf562[22])>= 0)?true:false})[_0xf562[9]](function(_0x76ebxc){logger[_0xf562[10]](_0xf562[21],_0x76ebxe,_0x76ebxf[_0x76ebx13])}))};BPromise[_0xf562[35]](_0x76ebx12)[_0xf562[13]](function(_0x76ebx14){var _0x76ebx15=_[_0xf562[33]](_0x76ebx14);logger[_0xf562[18]](_0xf562[29],_0x76ebxe,_0x76ebxf[_0xf562[31]](_0xf562[30]),_0x76ebx15);_0x76ebx11[_0xf562[34]](_0x76ebx15)})[_0xf562[9]](function(_0x76ebxc){console[_0xf562[28]](_0x76ebxc);logger[_0xf562[10]](_0xf562[29],_0x76ebxe,_0x76ebxf[_0xf562[31]](_0xf562[30]),JSON[_0xf562[32]](_0x76ebxc));_0x76ebx11[_0xf562[19]]()})}}
\ No newline at end of file
+var _0xb431=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x6C\x6F\x64\x61\x73\x68","\x72\x6F\x75\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x68\x74\x74\x70","\x63\x6C\x69\x65\x6E\x74","\x63\x61\x74\x63\x68","\x65\x72\x72\x6F\x72","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x73\x75\x6C\x74","\x74\x68\x65\x6E","\x72\x65\x71\x75\x65\x73\x74","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x72\x75\x6C\x65\x73","\x5B\x25\x73\x5D\x5B\x49\x4E\x54\x45\x52\x56\x41\x4C\x5D\x20\x52\x4F\x55\x54\x49\x4E\x47\x20\x53\x54\x4F\x50\x50\x45\x44","\x69\x6E\x66\x6F","\x73\x74\x6F\x70","\x6C\x65\x6E\x67\x74\x68","\x5B\x25\x73\x5D\x5B\x49\x4E\x54\x45\x52\x56\x41\x4C\x5D\x20\x25\x73","\x74\x72\x75\x65","\x69\x6E\x64\x65\x78\x4F\x66","\x43\x6F\x6D\x6D\x61\x6E\x64","\x69\x66\x74\x69\x6D\x65\x20\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x70\x75\x73\x68","\x6C\x6F\x67","\x5B\x25\x73\x5D\x5B\x49\x4E\x54\x45\x52\x56\x41\x4C\x5D\x20\x25\x73\x20\x25\x73","\x20\x7C\x20","\x6A\x6F\x69\x6E","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x73\x6F\x6D\x65","\x77\x68\x65\x6E","\x61\x6C\x6C"];_0xb431[0];var util=require(_0xb431[1]);var BPromise=require(_0xb431[2]);var jayson=require(_0xb431[3]);var _=require(_0xb431[4]);var logger=require(_0xb431[6])(_0xb431[5]);var client=jayson[_0xb431[8]][_0xb431[7]]({port:9002});function request(_0xba21x8,_0xba21x9){return  new BPromise(function(_0xba21xa,_0xba21xb){return client[_0xb431[14]](_0xba21x8,_0xba21x9)[_0xb431[13]](function(_0xba21xd){if(_0xba21xd[_0xb431[10]]){return _0xba21xb(_0xba21xd[_0xb431[10]][_0xb431[11]])}else {return _0xba21xa(_0xba21xd[_0xb431[12]])}})[_0xb431[9]](function(_0xba21xc){return _0xba21xb(_0xba21xc)})})}exports[_0xb431[15]]= function(_0xba21xe,_0xba21xf,_0xba21x10){return function(_0xba21x11){if(_0xba21x10[_0xb431[16]]&&  !_0xba21x10[_0xb431[16]][_0xba21xe]){logger[_0xb431[18]](_0xb431[17],_0xba21xe);return _0xba21x11[_0xb431[19]]()};var _0xba21x12=[];for(var _0xba21x13=0;_0xba21x13< _0xba21xf[_0xb431[20]];_0xba21x13+= 1){_0xba21x12[_0xb431[27]](request(_0xb431[24],{command:util[_0xb431[26]](_0xb431[25],_0xba21xf[_0xba21x13])})[_0xb431[13]](function(_0xba21xd){return (_0xba21xd&& _0xba21xd[_0xb431[11]]&& _0xba21xd[_0xb431[11]][_0xb431[23]](_0xb431[22])>= 0)?true:false})[_0xb431[9]](function(_0xba21xc){logger[_0xb431[10]](_0xb431[21],_0xba21xe,_0xba21xf[_0xba21x13])}))};BPromise[_0xb431[35]](_0xba21x12)[_0xb431[13]](function(_0xba21x14){var _0xba21x15=_[_0xb431[33]](_0xba21x14);logger[_0xb431[18]](_0xb431[29],_0xba21xe,_0xba21xf[_0xb431[31]](_0xb431[30]),_0xba21x15);_0xba21x11[_0xb431[34]](_0xba21x15)})[_0xb431[9]](function(_0xba21xc){console[_0xb431[28]](_0xba21xc);logger[_0xb431[10]](_0xb431[29],_0xba21xe,_0xba21xf[_0xb431[31]](_0xb431[30]),JSON[_0xb431[32]](_0xba21xc));_0xba21x11[_0xb431[19]]()})}}
\ No newline at end of file